@epa-wg/custom-element-dist 0.0.28 → 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.
Files changed (162) hide show
  1. package/.idea/custom-element-dist.iml +11 -0
  2. package/.idea/inspectionProfiles/Project_Default.xml +24 -0
  3. package/.idea/misc.xml +6 -0
  4. package/.idea/modules.xml +8 -0
  5. package/.idea/vcs.xml +6 -0
  6. package/.storybook/main.ts +21 -19
  7. package/.storybook/preview.ts +25 -25
  8. package/README.md +4 -4
  9. package/coverage/coverage-final.json +21 -22
  10. package/coverage/index.html +24 -39
  11. package/coverage/src/custom-element/coverage.svg +1 -1
  12. package/coverage/src/custom-element/custom-element.js/coverage.svg +1 -1
  13. package/coverage/src/custom-element/custom-element.js.html +248 -242
  14. package/coverage/src/custom-element/http-request.js.html +12 -12
  15. package/coverage/src/custom-element/index.html +14 -14
  16. package/coverage/src/custom-element/local-storage.js.html +52 -52
  17. package/coverage/src/custom-element/location-element.js.html +4 -4
  18. package/coverage/src/custom-element/module-url.js.html +1 -1
  19. package/coverage/src/index.html +1 -1
  20. package/coverage/src/mocks/handlers.ts.html +1 -1
  21. package/coverage/src/mocks/index.html +1 -1
  22. package/coverage/src/stories/attributes.test.stories.ts.html +28 -28
  23. package/coverage/src/stories/coverage.svg +1 -1
  24. package/coverage/src/stories/css.test.stories.ts.html +1 -1
  25. package/coverage/src/stories/dom-merge.test.stories.ts.html +1 -1
  26. package/coverage/src/stories/external-template.test.stories.ts.html +1 -1
  27. package/coverage/src/stories/form.test.stories.ts.html +1 -1
  28. package/coverage/src/stories/http-request.stories.ts.html +1 -1
  29. package/coverage/src/stories/index.html +19 -19
  30. package/coverage/src/stories/local-storage.test.stories.ts.html +17 -17
  31. package/coverage/src/stories/location-element.test.stories.ts.html +3 -6
  32. package/coverage/src/stories/module-url.test.stories.ts.html +1 -1
  33. package/coverage/src/stories/set-url.test.stories.ts.html +1 -1
  34. package/coverage/src/stories/slice-events.test.stories.ts/coverage.svg +1 -1
  35. package/coverage/src/stories/slice-events.test.stories.ts.html +284 -23
  36. package/coverage/src/stories/slots.test.stories.ts.html +1 -1
  37. package/coverage/src/stories/testStoryBook.ts.html +7 -7
  38. package/coverage/src/stories/version-select.test.stories.ts.html +1 -1
  39. package/coverage/src/sum.ts.html +1 -1
  40. package/dist/custom-element-BbJMY20-.cjs +97 -0
  41. package/dist/{custom-element-BOIPgtxz.js → custom-element-CoRNKeEP.js} +122 -120
  42. package/dist/custom-element-bundle.cjs +1 -1
  43. package/dist/custom-element-bundle.js +2 -2
  44. package/dist/demo/a.svg +26 -26
  45. package/dist/demo/data-slices.html +37 -0
  46. package/dist/demo/demo.css +0 -3
  47. package/package.json +13 -13
  48. package/public/demo/a.svg +26 -26
  49. package/public/demo/data-slices.html +37 -0
  50. package/public/demo/demo.css +0 -3
  51. package/src/custom-element/custom-element.js +4 -2
  52. package/src/custom-element/demo/a.svg +26 -26
  53. package/src/custom-element/demo/data-slices.html +37 -0
  54. package/src/custom-element/demo/demo.css +0 -3
  55. package/src/custom-element/ide/web-types-dce.json +1 -1
  56. package/src/custom-element/ide/web-types-xsl.json +1 -1
  57. package/src/material/angular.css +987 -987
  58. package/src/material/components/autocomplete.html +239 -240
  59. package/src/material/components/dropdown.html +93 -46
  60. package/src/material/components/icon-link.html +161 -0
  61. package/src/material/components/menu.html +234 -234
  62. package/src/material/components.html +121 -108
  63. package/src/material/demo.css +36 -31
  64. package/src/material/index.html +110 -168
  65. package/src/material/material.css +356 -356
  66. package/src/material/theme/README.md +17 -17
  67. package/src/material/theme/semantic.css +113 -112
  68. package/src/mocks/versions.mock.ts +8 -8
  69. package/src/stories/attributes.test.stories.ts +20 -20
  70. package/src/stories/location-element.test.stories.ts +1 -2
  71. package/src/stories/slice-events.test.stories.ts +87 -0
  72. package/storybook-static/assets/Color-F6OSRLHC-CFyd3TND.js +1 -0
  73. package/storybook-static/assets/{Configure-CJVwFVjC.js → Configure-UGTbPRKK.js} +1 -1
  74. package/storybook-static/assets/{DocsRenderer-CFRXHY34-Bz6q-OqD.js → DocsRenderer-CFRXHY34-Dpr5iB0o.js} +2 -2
  75. package/storybook-static/assets/{attributes.test.stories-BJBuuXgZ.js → attributes.test.stories-DSOLHHOW.js} +38 -36
  76. package/storybook-static/assets/{css.test.stories-pgbBc17d.js → css.test.stories-Cgn6ICr0.js} +1 -1
  77. package/storybook-static/assets/custom-element-D59Fok1f.js +97 -0
  78. package/storybook-static/assets/{dom-merge.test.stories-CXcYP_-J.js → dom-merge.test.stories-CBObfPWg.js} +1 -1
  79. package/storybook-static/assets/entry-preview-DHVXbf3x.js +26 -0
  80. package/storybook-static/assets/entry-preview-docs-BbcIMweR.js +2 -0
  81. package/storybook-static/assets/{external-template.test.stories-CpJ68Ghy.js → external-template.test.stories-VfKUQ8eu.js} +1 -1
  82. package/storybook-static/assets/{form.test.stories-D35lyqd8.js → form.test.stories-CnuGN7Zw.js} +1 -1
  83. package/storybook-static/assets/{handlers-B-OZtf2K.js → handlers-V_T7WjNK.js} +21 -21
  84. package/storybook-static/assets/{http-request.stories-DccXgHyF.js → http-request.stories-8NN1Coqm.js} +1 -1
  85. package/storybook-static/assets/iframe-DnhkgdtG.js +2 -0
  86. package/storybook-static/assets/index-3Sfy-t3H.js +769 -0
  87. package/storybook-static/assets/index-BcZLpTeD.js +8 -0
  88. package/storybook-static/assets/index-CIBI7sCB.js +1 -0
  89. package/storybook-static/assets/{index-BSz1w4Gl.js → index-CxRwF5Or.js} +130 -130
  90. package/storybook-static/assets/{index-lY6s0fkU.js → index-DN1RoK17.js} +1 -1
  91. package/storybook-static/assets/{index-f2MAjm2i.js → index-DjJD7gkO.js} +1 -1
  92. package/storybook-static/assets/{local-storage.test.stories-BY-PWhuk.js → local-storage.test.stories-Dk5Yqc7m.js} +1 -1
  93. package/storybook-static/assets/{location-element.test.stories-3auBYEaU.js → location-element.test.stories-56um6s5L.js} +1 -1
  94. package/storybook-static/assets/{module-url.test.stories-B7L9cL60.js → module-url.test.stories-DEponQ7l.js} +1 -1
  95. package/storybook-static/assets/{preview-BRPR-UXC.js → preview-CNKoaWES.js} +1 -1
  96. package/storybook-static/assets/preview-Czc-sw5H.js +2 -0
  97. package/storybook-static/assets/preview-DAeyCMnM.js +1 -0
  98. package/storybook-static/assets/{preview-BUQm51_C.js → preview-vbpHsp94.js} +2 -2
  99. package/storybook-static/assets/{set-url.test.stories-CuSuDLIx.js → set-url.test.stories-B4E6hIe-.js} +1 -1
  100. package/storybook-static/assets/{slice-events.test.stories-BkRKsKem.js → slice-events.test.stories-BR0F-B6I.js} +138 -13
  101. package/storybook-static/assets/{slots.test.stories-BJCUWFkE.js → slots.test.stories-CgfJIyCr.js} +1 -1
  102. package/storybook-static/assets/tiny-invariant-CopsF_GD.js +1 -0
  103. package/storybook-static/assets/{version-select.test.stories-B3ybJn_Z.js → version-select.test.stories-nmxATIwv.js} +1 -1
  104. package/storybook-static/demo/a.svg +26 -26
  105. package/storybook-static/demo/data-slices.html +37 -0
  106. package/storybook-static/demo/demo.css +0 -3
  107. package/storybook-static/iframe.html +2 -2
  108. package/storybook-static/index.html +4 -0
  109. package/storybook-static/index.json +1 -1
  110. package/storybook-static/project.json +1 -1
  111. package/storybook-static/sb-addons/chromatic-com-storybook-10/manager-bundle.js +333 -0
  112. package/storybook-static/sb-addons/chromatic-com-storybook-10/manager-bundle.js.LEGAL.txt +40 -0
  113. package/storybook-static/sb-addons/essentials-actions-3/manager-bundle.js +1 -1
  114. package/storybook-static/sb-addons/essentials-backgrounds-4/manager-bundle.js +8 -8
  115. package/storybook-static/sb-addons/essentials-controls-2/manager-bundle.js +82 -85
  116. package/storybook-static/sb-addons/essentials-measure-7/manager-bundle.js +1 -1
  117. package/storybook-static/sb-addons/essentials-outline-8/manager-bundle.js +1 -1
  118. package/storybook-static/sb-addons/essentials-viewport-5/manager-bundle.js +1 -1
  119. package/storybook-static/sb-addons/interactions-9/manager-bundle.js +66 -67
  120. package/storybook-static/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +1 -1
  121. package/storybook-static/sb-manager/globals-module-info.js +25 -3
  122. package/storybook-static/sb-manager/globals-runtime.js +29585 -43124
  123. package/storybook-static/sb-manager/runtime.js +10647 -9399
  124. package/storybook-static/sb-preview/runtime.js +3536 -5860
  125. package/test-runner-jest.config.js +15 -0
  126. package/coverage/src/custom-element/demo/coverage.svg +0 -10
  127. package/coverage/src/custom-element/demo/index.html +0 -116
  128. package/coverage/src/custom-element/demo/z.js/coverage.svg +0 -10
  129. package/coverage/src/custom-element/demo/z.js.html +0 -112
  130. package/dist/custom-element-CUsSENWc.cjs +0 -97
  131. package/dist/demo/s1.xslt +0 -60
  132. package/dist/demo/z.html +0 -33
  133. package/dist/demo/z.js +0 -9
  134. package/dist/demo/z.xml +0 -60
  135. package/dist/demo/z1.html +0 -34
  136. package/public/demo/s1.xslt +0 -60
  137. package/public/demo/z.html +0 -33
  138. package/public/demo/z.js +0 -9
  139. package/public/demo/z.xml +0 -60
  140. package/public/demo/z1.html +0 -34
  141. package/src/custom-element/demo/s1.xslt +0 -60
  142. package/src/custom-element/demo/z.html +0 -33
  143. package/src/custom-element/demo/z.js +0 -9
  144. package/src/custom-element/demo/z.xml +0 -60
  145. package/src/custom-element/demo/z1.html +0 -34
  146. package/src/stories/__screenshots__/http-request.test.ts/http-request-url-change-1.png +0 -0
  147. package/storybook-static/assets/Color-ERTF36HU-ChyYtq0t.js +0 -1
  148. package/storybook-static/assets/custom-element-BDGsYgbP.js +0 -97
  149. package/storybook-static/assets/entry-preview-C313OLrj.js +0 -26
  150. package/storybook-static/assets/entry-preview-docs-B7ORr9w5.js +0 -2
  151. package/storybook-static/assets/iframe-Ddc_axoC.js +0 -2
  152. package/storybook-static/assets/index-BdcJ-iJ7.js +0 -8
  153. package/storybook-static/assets/index-CiCdFubk.js +0 -634
  154. package/storybook-static/assets/index-tfEkrhWr.js +0 -1
  155. package/storybook-static/assets/preview-CcS4DQh8.js +0 -1
  156. package/storybook-static/assets/preview-CfH4_OzN.js +0 -2
  157. package/storybook-static/assets/tiny-invariant-BxWVcicq.js +0 -1
  158. package/storybook-static/demo/s1.xslt +0 -60
  159. package/storybook-static/demo/z.html +0 -33
  160. package/storybook-static/demo/z.js +0 -9
  161. package/storybook-static/demo/z.xml +0 -60
  162. package/storybook-static/demo/z1.html +0 -34
@@ -1,8 +1,8 @@
1
- const W = "http://www.w3.org/1999/XSL/Transform", k = "http://www.w3.org/1999/xhtml", ue = "http://exslt.org/common", f = (e, l) => e.getAttribute?.(l), Z = (e) => e.nodeType === 3, de = (e) => typeof e == "string", pe = (e) => e && typeof e.nodeType == "number", $ = (e, l) => (e.ownerDocument || e).createTextNode(l), se = (e) => {
1
+ const W = "http://www.w3.org/1999/XSL/Transform", H = "http://www.w3.org/1999/xhtml", ue = "http://exslt.org/common", f = (e, l) => e.getAttribute?.(l), Z = (e) => e.nodeType === 3, de = (e) => typeof e == "string", pe = (e) => e && typeof e.nodeType == "number", D = (e, l) => (e.ownerDocument || e).createTextNode(l), se = (e) => {
2
2
  for (; e.firstChild; ) e.firstChild.remove();
3
3
  return e;
4
- }, V = (e) => (e.getAttributeNames().map((l) => e.removeAttribute(l)), se(e)), le = (e) => (e?.setAttribute("xmlns:xsl", W), e), ae = (e) => (e?.setAttribute("xmlns:xhtml", k), le(e)), ne = (e) => /^[_a-zA-Z][-_:a-zA-Z0-9]*$/.test(e), w = (e, l = "", t = document) => {
5
- const s = (i) => ((r) => (l && r.append($(t.ownerDocument || t, l)), r))((t.ownerDocument || t).createElement(i));
4
+ }, V = (e) => (e.getAttributeNames().map((l) => e.removeAttribute(l)), se(e)), le = (e) => (e?.setAttribute("xmlns:xsl", W), e), ae = (e) => (e?.setAttribute("xmlns:xhtml", H), le(e)), ne = (e) => /^[_a-zA-Z][-_:a-zA-Z0-9]*$/.test(e), T = (e, l = "", t = document) => {
5
+ const s = (i) => ((r) => (l && r.append(D(t.ownerDocument || t, l)), r))((t.ownerDocument || t).createElement(i));
6
6
  if (ne(e))
7
7
  return s(e);
8
8
  const a = s("dce-object");
@@ -15,54 +15,54 @@ const W = "http://www.w3.org/1999/XSL/Transform", k = "http://www.w3.org/1999/xh
15
15
  t.append(e.firstChild);
16
16
  return t;
17
17
  };
18
- function X(e) {
18
+ function q(e) {
19
19
  return new DOMParser().parseFromString(e, "application/xml");
20
20
  }
21
- function I(e) {
21
+ function X(e) {
22
22
  return new XMLSerializer().serializeToString(e);
23
23
  }
24
- function H(e, l, t, s) {
25
- const a = (x) => e.ownerDocument.createElement(x), r = ((x, p, u) => (p.append(u = a(x)), u))(l, e);
24
+ function U(e, l, t, s) {
25
+ const a = (x) => e.ownerDocument.createElement(x), r = ((x, p, N) => (p.append(N = a(x)), N))(l, e);
26
26
  return [...t].forEach((x) => r.append(s(x))), r;
27
27
  }
28
28
  function fe(e) {
29
- return e.slot || (e.setAttribute || (e = w("span", e.textContent.replaceAll(`
29
+ return e.slot || (e.setAttribute || (e = T("span", e.textContent.replaceAll(`
30
30
  `, ""))), e.setAttribute("slot", "")), e;
31
31
  }
32
32
  function K(e, l) {
33
33
  e.getAttributeNames().forEach((t) => l.includes(t) || e.removeAttribute(t));
34
34
  }
35
35
  const Q = (e) => [...e].filter((l) => !(l.nodeType === 3 && l.data.trim() === ""));
36
- function D(e, l, t) {
36
+ function z(e, l, t) {
37
37
  const s = typeof e;
38
38
  if (s === "string")
39
- return w(l, e, t);
39
+ return T(l, e, t);
40
40
  if (s === "number")
41
- return w(l, "" + e, t);
41
+ return T(l, "" + e, t);
42
42
  if (e instanceof Array) {
43
- const i = w("array", "", t);
44
- return e.map((r) => i.append(D(r, l, t))), i;
43
+ const i = T("array", "", t);
44
+ return e.map((r) => i.append(z(r, l, t))), i;
45
45
  }
46
46
  if (e instanceof FormData) {
47
- const i = w("form-data", "", t);
47
+ const i = T("form-data", "", t);
48
48
  for (const r of e)
49
- i.append(D(r[1], r[0], t));
49
+ i.append(z(r[1], r[0], t));
50
50
  return i;
51
51
  }
52
- const a = w(l, "", t);
52
+ const a = T(l, "", t);
53
53
  for (let i in e)
54
- pe(e[i]) || typeof e[i] == "function" || e[i] instanceof Window || (typeof e[i] != "object" && ne(i) ? a.setAttribute(i, e[i]) : a.append(D(e[i], i, t)));
54
+ pe(e[i]) || typeof e[i] == "function" || e[i] instanceof Window || (typeof e[i] != "object" && ne(i) ? a.setAttribute(i, e[i]) : a.append(z(e[i], i, t)));
55
55
  return a;
56
56
  }
57
57
  function ee(e) {
58
- if (L(e, "*", (l) => [...l.childNodes].filter((t) => t.nodeType === 3 && t.parentNode.localName !== "style" && t.data).forEach((t) => {
58
+ if ($(e, "*", (l) => [...l.childNodes].filter((t) => t.nodeType === 3 && t.parentNode.localName !== "style" && t.data).forEach((t) => {
59
59
  const s = t.data, a = s.matchAll(/{([^}]*)}/g);
60
60
  if (a) {
61
- let i = 0, r = (p) => $(t, p), x = [];
61
+ let i = 0, r = (p) => D(t, p), x = [];
62
62
  if ([...a].forEach((p) => {
63
63
  p.index > i && x.push(r(p.input.substring(i, p.index)));
64
- const u = e.querySelector("value-of").cloneNode();
65
- u.setAttribute("select", p[1]), x.push(u), i = p.index + p[0].length;
64
+ const N = e.querySelector("value-of").cloneNode();
65
+ N.setAttribute("select", p[1]), x.push(N), i = p.index + p[0].length;
66
66
  }), i < s.length && x.push(r(s.substring(i, s.length))), x.length) {
67
67
  for (let p of x)
68
68
  l.insertBefore(p, t);
@@ -79,9 +79,9 @@ function ee(e) {
79
79
  function he(e, l = "xsl:stylesheet") {
80
80
  if (e.tagName === l || e.documentElement?.tagName === l)
81
81
  return ee(e);
82
- const t = X(`<xsl:stylesheet version="1.0" xmlns:xsl="${W}" xmlns:xhtml="${k}" xmlns:exsl="${ue}" exclude-result-prefixes="exsl" >
82
+ const t = q(`<xsl:stylesheet version="1.0" xmlns:xsl="${W}" xmlns:xhtml="${H}" xmlns:exsl="${ue}" exclude-result-prefixes="exsl" >
83
83
  <xsl:output method="xml"/>
84
- <xsl:template match="/"><dce-root xmlns="${k}"><xsl:apply-templates select="*" /></dce-root></xsl:template>
84
+ <xsl:template match="/"><dce-root xmlns="${H}"><xsl:apply-templates select="*" /></dce-root></xsl:template>
85
85
  <xsl:template match="*[name()='template']">
86
86
  <xsl:apply-templates mode="sanitize" select="*|text()"/>
87
87
  </xsl:template>
@@ -136,24 +136,24 @@ function he(e, l = "xsl:stylesheet") {
136
136
  </xsl:for-each>
137
137
  </xsl:template>
138
138
  </xsl:stylesheet>`), s = new XSLTProcessor(), a = ((n) => {
139
- L(n, "custom-element", (b) => {
139
+ $(n, "custom-element", (b) => {
140
140
  b.firstElementChild.localName === "template" && ([...b.firstElementChild.content.childNodes].forEach((y) => b.append(y)), b.firstElementChild.remove());
141
- }), L(n, "script", (b) => b.remove());
141
+ }), $(n, "script", (b) => b.remove());
142
142
  const c = n.content ?? n.firstElementChild?.content ?? n.body ?? n;
143
- we.forEach((b) => L(c, b, (y) => Te(y, c)));
144
- const N = n.firstElementChild?.content || n.content, E = (b) => {
145
- const y = X("<xhtml/>"), M = y.importNode(b, !0);
146
- return y.replaceChild(M, y.documentElement), ae(M);
143
+ we.forEach((b) => $(c, b, (y) => Te(y, c)));
144
+ const A = n.firstElementChild?.content || n.content, E = (b) => {
145
+ const y = q("<xhtml/>"), j = y.importNode(b, !0);
146
+ return y.replaceChild(j, y.documentElement), ae(j);
147
147
  };
148
- if (N) {
149
- const b = w("div");
150
- return [...N.childNodes].map((y) => b.append(y.cloneNode(!0))), E(b);
148
+ if (A) {
149
+ const b = T("div");
150
+ return [...A.childNodes].map((y) => b.append(y.cloneNode(!0))), E(b);
151
151
  }
152
152
  return E(n.documentElement || n.body || n);
153
- })(e), i = X(
153
+ })(e), i = q(
154
154
  `<xsl:stylesheet version="1.0"
155
155
  xmlns:xsl="${W}"
156
- xmlns:xhtml="${k}"
156
+ xmlns:xhtml="${H}"
157
157
  xmlns:dce="urn:schemas-epa-wg:dce"
158
158
  xmlns:exsl="http://exslt.org/common"
159
159
  exclude-result-prefixes="exsl"
@@ -190,26 +190,26 @@ function he(e, l = "xsl:stylesheet") {
190
190
  s.importStylesheet(t);
191
191
  const r = s.transformToFragment(a, document), x = (n, c) => n.querySelector(c), p = x(i, 'template[mode="payload"]');
192
192
  if (!r)
193
- return console.error("transformation error", { xml: a.outerHTML, xsl: I(t) });
193
+ return console.error("transformation error", { xml: a.outerHTML, xsl: X(t) });
194
194
  if (r.firstElementChild.localName !== "dce-root") {
195
195
  const n = r.ownerDocument.createElement("dce-root");
196
196
  [...r.childNodes].forEach((c) => n.append(c)), r.append(n);
197
197
  }
198
- const u = [];
198
+ const N = [];
199
199
  [...r.querySelectorAll("dce-root>attribute")].forEach((n) => {
200
200
  K(n, "namespace,name,select");
201
- const c = J(n, "xsl:param"), N = f(n, "name");
201
+ const c = J(n, "xsl:param"), A = f(n, "name");
202
202
  p.append(c), K(c, "select,name");
203
203
  let E = f(c, "select")?.split("??");
204
- E || (E = ["//" + N, `'${c.textContent}'`], V(c), c.setAttribute("name", N));
204
+ E || (E = ["//" + A, `'${c.textContent}'`], V(c), c.setAttribute("name", A));
205
205
  let b;
206
206
  if (E?.length > 1) {
207
207
  c.removeAttribute("select");
208
208
  const y = x(i, 'template[match="ignore"]>choose').cloneNode(!0);
209
- V(y.firstElementChild).append($(y, "{" + E[0] + "}")), V(y.lastElementChild).append($(y, "{" + E[1] + "}")), y.firstElementChild.setAttribute("test", E[0]), c.append(y), b = y.cloneNode(!0);
209
+ V(y.firstElementChild).append(D(y, "{" + E[0] + "}")), V(y.lastElementChild).append(D(y, "{" + E[1] + "}")), y.firstElementChild.setAttribute("test", E[0]), c.append(y), b = y.cloneNode(!0);
210
210
  } else
211
211
  b = J(n, "xsl:value-of");
212
- b.removeAttribute("name"), n.append(b), n.removeAttribute("select"), u.push(c);
212
+ b.removeAttribute("name"), n.append(b), n.removeAttribute("select"), N.push(c);
213
213
  }), [...r.querySelectorAll("[value]")].filter((n) => n.getAttribute("value").match(/\{(.*)\?\?(.*)\}/g)).forEach((n) => {
214
214
  const c = f(n, "value");
215
215
  c && n.setAttribute("value", Ae(c));
@@ -217,22 +217,22 @@ function he(e, l = "xsl:stylesheet") {
217
217
  for (const n of r.childNodes)
218
218
  p.append(i.importNode(n, !0));
219
219
  [...p.getElementsByTagName("xsl:template")].forEach((n) => p.ownerDocument.documentElement.append(n));
220
- const q = x(i, 'call-template[name="slot"]'), d = (n) => {
221
- const c = q.cloneNode(!0), N = f(n, "name");
222
- N && c.firstElementChild.setAttribute("select", `'${N}'`);
220
+ const S = x(i, 'call-template[name="slot"]'), u = (n) => {
221
+ const c = S.cloneNode(!0), A = f(n, "name");
222
+ A && c.firstElementChild.setAttribute("select", `'${A}'`);
223
223
  for (let E of n.childNodes)
224
224
  c.lastElementChild.append(E);
225
225
  return c;
226
226
  };
227
- L(p, "slot", (n) => n.parentNode.replaceChild(d(n), n));
227
+ $(p, "slot", (n) => n.parentNode.replaceChild(u(n), n));
228
228
  const m = ee(i);
229
- return m.params = u, m;
229
+ return m.params = N, m;
230
230
  }
231
231
  async function xe(e) {
232
232
  return await new Promise((t, s) => {
233
233
  const a = new XMLHttpRequest();
234
234
  a.open("GET", e), a.responseType = "document", a.onload = () => {
235
- a.readyState === a.DONE && a.status === 200 ? t(a.responseXML?.body || a.responseXML || w("div", a.responseText)) : s(`${a.statusText} - ${e}`);
235
+ a.readyState === a.DONE && a.status === 200 ? t(a.responseXML?.body || a.responseXML || T("div", a.responseText)) : s(`${a.statusText} - ${e}`);
236
236
  }, a.addEventListener("error", (i) => s(i)), a.send();
237
237
  });
238
238
  }
@@ -254,26 +254,28 @@ const ie = (e) => e.split("|").map((l) => l.trim()).filter((l) => l), ye = (e, l
254
254
  i.push(x);
255
255
  return i;
256
256
  }
257
- return [...e.childNodes].find((i) => i.localName === t) || a(w(t, "", s));
257
+ return [...e.childNodes].find((i) => i.localName === t) || a(T(t, "", s));
258
258
  }).flat();
259
259
  function te(e, l, t, s) {
260
260
  if (!t.sliceProcessed)
261
261
  return t.sliceProcessed = 1, ye(e, l ?? "").map((a) => {
262
- const i = e.ownerDocument, r = t.sliceEventSource, x = t.sliceElement, p = () => [...a.childNodes].filter((u) => u.nodeType === 3 || u.localName === "value" || u.localName === "form-data").map((u) => u.remove());
263
- if (r.getAttributeNames().map((u) => a.setAttribute(u, f(r, u))), [...a.childNodes].filter((u) => u.localName === "event").map((u) => u.remove()), "validationMessage" in r && a.setAttribute("validation-message", r.validationMessage), t.type === "init" && p(), a.append(D(t, "event", i)), x.hasAttribute("slice-value")) {
262
+ const i = e.ownerDocument, r = t.sliceEventSource, x = t.sliceElement, p = () => [...a.childNodes].filter((d) => d.nodeType === 3 || d.localName === "value" || d.localName === "form-data").map((d) => d.remove());
263
+ r.getAttributeNames().map((d) => a.setAttribute(d, f(r, d))), [...a.childNodes].filter((d) => d.localName === "event").map((d) => d.remove()), "validationMessage" in r && a.setAttribute("validation-message", r.validationMessage), t.type === "init" && p(), a.append(z(t, "event", i));
264
+ const N = (r.type === "checkbox" || r.type === "radio") && !r.checked;
265
+ if (x.hasAttribute("slice-value")) {
264
266
  r.value === void 0 ? a.removeAttribute("value") : a.setAttribute("value", r.value);
265
- const u = z(f(x, "slice-value"), a);
266
- p(), a.append($(i, u));
267
+ const d = N ? "" : M(f(x, "slice-value"), a);
268
+ p(), a.append(D(i, d));
267
269
  } else {
268
270
  if ("elements" in r)
269
- return p(), a.append(D(new FormData(r), "value", a.ownerDocument)), a;
270
- const u = r.value ?? f(r, "value");
271
- p(), u == null ? [...a.childNodes].filter((T) => T.localName !== "event").map((T) => T.remove()) : de(u) ? a.append($(i, u)) : a.append(D(u, "value", a.ownerDocument));
271
+ return p(), a.append(z(new FormData(r), "value", a.ownerDocument)), a;
272
+ const d = N ? "" : r.value ?? f(r, "value");
273
+ p(), d == null ? [...a.childNodes].filter((S) => S.localName !== "event").map((S) => S.remove()) : de(d) ? a.append(D(i, d)) : a.append(z(d, "value", a.ownerDocument));
272
274
  }
273
275
  return a;
274
276
  });
275
277
  }
276
- function L(e, l, t) {
278
+ function $(e, l, t) {
277
279
  e.querySelectorAll && [...e.querySelectorAll(l)].forEach(t);
278
280
  }
279
281
  const ge = async (e, l) => {
@@ -351,10 +353,10 @@ const Ae = (e) => [...e?.matchAll(/([^{}]*)(\{)([^}]+)}([^{}]*)/g)].map((t) => `
351
353
  return e;
352
354
  const l = e.split("??"), t = l.shift(), s = Y(l.join("??"));
353
355
  return l.length ? `concat( ${t} , substring( ${s} , (1+string-length( ${s} )) * string-length( ${t} ) ) )` : e;
354
- }, z = (e, l) => {
356
+ }, M = (e, l) => {
355
357
  const t = e.split("??");
356
358
  if (t.length > 1)
357
- return z(t[0], l) || z(t[1], l);
359
+ return M(t[0], l) || M(t[1], l);
358
360
  e = Y(e);
359
361
  const s = l.ownerDocument.evaluate(e, l);
360
362
  switch (s.resultType) {
@@ -370,7 +372,7 @@ const Ae = (e) => [...e?.matchAll(/([^{}]*)(\{)([^}]+)}([^{}]*)/g)].map((t) => `
370
372
  a += i.textContent;
371
373
  return a;
372
374
  }, we = "stylesheet,transform,import,include,strip-space,preserve-space,output,key,decimal-format,namespace-alias,value-of,copy-of,number,apply-templates,apply-imports,for-each,sort,if,choose,when,otherwise,attribute-set,call-template,with-param,variable,param,text,processing-instruction,element,attribute,comment,copy,message,fallback".split(","), Te = (e, l) => {
373
- const t = w("xsl:" + e.localName);
375
+ const t = T("xsl:" + e.localName);
374
376
  for (let s of e.attributes)
375
377
  t.setAttribute(s.name, s.value);
376
378
  for (; e.firstChild; )
@@ -384,32 +386,32 @@ const Ae = (e) => [...e?.matchAll(/([^{}]*)(\{)([^}]+)}([^{}]*)/g)].map((t) => `
384
386
  }), s.replaceChildren(...a);
385
387
  }
386
388
  };
387
- class Se extends HTMLElement {
389
+ class Ce extends HTMLElement {
388
390
  static observedAttributes = ["src", "tag", "hidden"];
389
391
  async connectedCallback() {
390
392
  this.firstElementChild && this.firstElementChild.localName !== "template" && console.warn(`custom-element used without template wrapping content
391
393
  `, this.outerHTML);
392
394
  const l = await ge(f(this, "src"), this), t = f(this, "tag"), s = t || "dce-" + crypto.randomUUID();
393
- for (const d of l)
394
- L(d.templateNode || d.content || d, "style", (m) => {
395
+ for (const u of l)
396
+ $(u.templateNode || u.content || u, "style", (m) => {
395
397
  const n = m.closest("slot"), c = n ? `slot[name="${n.name}"]` : "";
396
398
  m.innerHTML = `${s} ${c}{${m.innerHTML}}`, this.append(m);
397
399
  });
398
- const a = l.map((d) => he(d)), i = a.map((d, m) => {
400
+ const a = l.map((u) => he(u)), i = a.map((u, m) => {
399
401
  m = new XSLTProcessor();
400
402
  try {
401
- m.importStylesheet(d);
403
+ m.importStylesheet(u);
402
404
  } catch (n) {
403
- console.error(n, I(d));
405
+ console.error(n, X(u));
404
406
  }
405
407
  return m;
406
408
  });
407
- Object.defineProperty(this, "xsltString", { get: () => a.map((d) => I(d)).join(`
409
+ Object.defineProperty(this, "xsltString", { get: () => a.map((u) => X(u)).join(`
408
410
  `) });
409
- const r = this, x = [...this.templateNode.querySelectorAll("[slice]")], p = x.map((d) => f(d, "slice")).filter((d) => !d.includes("/")).filter((d, m, n) => n.indexOf(d) === m).map(ie).flat(), u = a.reduce((d, m) => (m.params && d.push(...m.params), d), []);
410
- class T extends HTMLElement {
411
+ const r = this, x = [...this.templateNode.querySelectorAll("[slice]")], p = x.map((u) => f(u, "slice")).filter((u) => !u.includes("/")).filter((u, m, n) => n.indexOf(u) === m).map(ie).flat(), N = a.reduce((u, m) => (m.params && u.push(...m.params), u), []);
412
+ class d extends HTMLElement {
411
413
  static get observedAttributes() {
412
- return u.map((m) => f(m, "name"));
414
+ return N.map((m) => f(m, "name"));
413
415
  }
414
416
  #e = 0;
415
417
  connectedCallback() {
@@ -425,90 +427,90 @@ class Se extends HTMLElement {
425
427
  } else
426
428
  g.nodeType === 1 ? h.insertAdjacentElement("beforebegin", g) : g.nodeType === 3 && h.insertAdjacentText("beforebegin", g.data);
427
429
  }
428
- const n = X("<datadom/>").documentElement, c = (h, g = "") => ((o) => (g && o.append($(n, g)), o))(n.ownerDocument.createElement(h)), N = H(n, "payload", m, fe);
429
- le(N), ae(N), this.innerHTML = "";
430
- const E = H(n, "attributes", this.attributes, (h) => c(h.nodeName, h.value));
431
- H(n, "dataset", Object.keys(this.dataset), (h) => c(h, this.dataset[h]));
432
- const b = H(n, "slice", p, (h) => c(h, "")), y = (h) => z(h, b);
430
+ const n = q("<datadom/>").documentElement, c = (h, g = "") => ((o) => (g && o.append(D(n, g)), o))(n.ownerDocument.createElement(h)), A = U(n, "payload", m, fe);
431
+ le(A), ae(A), this.innerHTML = "";
432
+ const E = U(n, "attributes", this.attributes, (h) => c(h.nodeName, h.value));
433
+ U(n, "dataset", Object.keys(this.dataset), (h) => c(h, this.dataset[h]));
434
+ const b = U(n, "slice", p, (h) => c(h, "")), y = (h) => M(h, b);
433
435
  this.xml = n;
434
- const M = [], G = () => {
436
+ const j = [], G = () => {
435
437
  const h = {};
436
- for (let g; g = M.pop(); ) {
438
+ for (let g; g = j.pop(); ) {
437
439
  const o = f(g.sliceElement, "slice");
438
440
  h[o] || (te(b, o, g), h[o] = g);
439
441
  }
440
- Object.keys(h).length !== 0 && U();
442
+ Object.keys(h).length !== 0 && k();
441
443
  };
442
444
  let O;
443
445
  this.onSlice = (h) => {
444
- M.push(h), O || (O = setTimeout(() => {
446
+ j.push(h), O || (O = setTimeout(() => {
445
447
  G(), O = 0;
446
448
  }, 1));
447
449
  };
448
- const U = this.transform = () => {
450
+ const k = this.transform = () => {
449
451
  if (this.#e)
450
452
  debugger;
451
453
  this.#e = 1, i.map((o, v) => {
452
- const S = o.transformToFragment(n.ownerDocument, document);
453
- return S || console.error(`XSLT transformation error. xsl:
454
- `, I(a[v]), `
454
+ const C = o.transformToFragment(n.ownerDocument, document);
455
+ return C || console.error(`XSLT transformation error. xsl:
456
+ `, X(a[v]), `
455
457
  xml:
456
- `, I(n)), S;
458
+ `, X(n)), C;
457
459
  }).map((o) => {
458
460
  o && (oe(o), re(this, o.childNodes));
459
- }), T.observedAttributes.map((o) => {
461
+ }), d.observedAttributes.map((o) => {
460
462
  let v = f(this.firstElementChild, o);
461
463
  v !== f(this, o) && (this.setAttribute(o, v), this.#t(o, v));
462
464
  });
463
465
  function g(o) {
464
466
  let v = o;
465
467
  if (o.localName === "slice") {
466
- const S = f(o, "for");
467
- if (S || (v = o.parentElement), S === "^")
468
+ const C = f(o, "for");
469
+ if (C || (v = o.parentElement), C === "^")
468
470
  do
469
471
  v = v.previousElementSibling;
470
472
  while (v.localName === "slice");
471
473
  else
472
- v = this.querySelector(S);
474
+ v = this.querySelector(C);
473
475
  if (!v)
474
- return console.warn(`can not find selector in "slice for=${S}" `, o.outerHTML);
476
+ return console.warn(`can not find selector in "slice for=${C}" `, o.outerHTML);
475
477
  f(o, "slice") || o.setAttribute("slice", f(o, "name"));
476
478
  }
477
479
  return v;
478
480
  }
479
- L(this, "[slice],[slice-event]", (o) => {
481
+ $(this, "[slice],[slice-event]", (o) => {
480
482
  let v = f(o, "slice-event");
481
- const S = o.hasAttribute("slice-value") || o.hasAttribute("value") || o.value, j = g(o);
482
- o.dceInitialized || (o.dceInitialized = 1, j.hasAttribute("custom-validity") && (v += " change submit"), [...new Set((v || "change").split(" "))].forEach((ce) => j.addEventListener(ce, (A) => {
483
- A.sliceElement = o, A.sliceEventSource = A.currentTarget || A.target, A.sliceProcessed = 0;
484
- const me = te(b, f(A.sliceElement, "slice"), A);
485
- L(this, "[custom-validity]", (P) => {
486
- if (!P.setCustomValidity)
483
+ const C = o.hasAttribute("slice-value") || o.hasAttribute("value") || o.value, P = g(o);
484
+ o.dceInitialized || (o.dceInitialized = 1, P.hasAttribute("custom-validity") && (v += " change submit"), [...new Set((v || "change").split(" "))].forEach((ce) => P.addEventListener(ce, (w) => {
485
+ w.sliceElement = o, w.sliceEventSource = w.currentTarget || w.target, w.sliceProcessed = 0;
486
+ const me = te(b, f(w.sliceElement, "slice"), w);
487
+ $(this, "[custom-validity]", (R) => {
488
+ if (!R.setCustomValidity)
487
489
  return;
488
- const F = f(P, "custom-validity");
490
+ const F = f(R, "custom-validity");
489
491
  try {
490
- const R = F && z(F, E);
491
- P.setCustomValidity(R === !0 ? "" : R === !1 ? "invalid" : R);
492
- } catch (R) {
493
- console.error(R, "xPath", F);
492
+ const I = F && M(F, E);
493
+ R.setCustomValidity(I === !0 ? "" : I === !1 ? "invalid" : I);
494
+ } catch (I) {
495
+ console.error(I, "xPath", F);
494
496
  }
495
497
  });
496
- const _ = f(j, "custom-validity"), C = _ && z(_, E), B = C === !0 ? "" : C;
498
+ const _ = f(P, "custom-validity"), L = _ && M(_, E), B = L === !0 ? "" : L;
497
499
  if (_) {
498
- if (o.setCustomValidity ? o.setCustomValidity(B) : o.validationMessage = B, me.map((P) => P.setAttribute("validation-message", B)), A.type === "submit")
499
- return C === !0 ? void 0 : (setTimeout(U, 1), !!C === C ? (C || A.preventDefault(), C) : C ? (A.preventDefault(), !1) : void 0);
500
- setTimeout(U, 1);
500
+ if (o.setCustomValidity ? o.setCustomValidity(B) : o.validationMessage = B, me.map((R) => R.setAttribute("validation-message", B)), w.type === "submit")
501
+ return L === !0 ? void 0 : (setTimeout(k, 1), !!L === L ? (L || w.preventDefault(), L) : L ? (w.preventDefault(), !1) : void 0);
502
+ setTimeout(k, 1);
501
503
  }
502
- this.onSlice(A);
503
- })), (!v || v.includes("init")) && (S ? this.onSlice({ type: "init", target: j, sliceElement: o, sliceEventSource: j }) : o.value = y(f(o, "slice"))));
504
+ this.onSlice(w);
505
+ })), (!v || v.includes("init")) && (C ? this.onSlice({ type: "init", target: P, sliceElement: o, sliceEventSource: P }) : o.value = y(f(o, "slice"))));
504
506
  }), this.#e = 0;
505
507
  };
506
- U(), G();
508
+ k(), G();
507
509
  }
508
510
  #t(m, n) {
509
511
  m === "value" && (this.value = n);
510
512
  let c = this.xml.querySelector(`attributes>${m}`);
511
- c ? V(c).append($(c, n)) : (c = w(m, n, this.xml), this.xml.querySelector("attributes").append(c)), this.dispatchEvent(new CustomEvent("change", { bubbles: !0, detail: { [m]: n } }));
513
+ c ? V(c).append(D(c, n)) : (c = T(m, n, this.xml), this.xml.querySelector("attributes").append(c)), this.dispatchEvent(new CustomEvent("change", { bubbles: !0, detail: { [m]: n } }));
512
514
  }
513
515
  attributeChangedCallback(m, n, c) {
514
516
  !this.xml || this.#e || (this.#t(m, c), this.transform());
@@ -517,15 +519,15 @@ xml:
517
519
  return r;
518
520
  }
519
521
  }
520
- const q = (d) => {
521
- window.customElements.get(d) !== T && window.customElements.define(d, T);
522
+ const S = (u) => {
523
+ window.customElements.get(u) !== d && window.customElements.define(u, d);
522
524
  };
523
525
  if (t)
524
- q(t);
526
+ S(t);
525
527
  else {
526
- const d = s;
527
- this.setAttribute("tag", d), q(d);
528
- const m = document.createElement(d);
528
+ const u = s;
529
+ this.setAttribute("tag", u), S(u);
530
+ const m = document.createElement(u);
529
531
  this.getAttributeNames().forEach((n) => m.setAttribute(n, this.getAttribute(n))), m.append(...[...this.childNodes].filter((n) => n.localName !== "style")), this.append(m);
530
532
  }
531
533
  }
@@ -536,13 +538,13 @@ xml:
536
538
  return this;
537
539
  }
538
540
  get xslt() {
539
- return X(this.xsltString);
541
+ return q(this.xsltString);
540
542
  }
541
543
  }
542
- window.customElements.define("custom-element", Se);
544
+ window.customElements.define("custom-element", Ce);
543
545
  export {
544
- Se as C,
545
- I as a,
546
+ Ce as C,
547
+ X as a,
546
548
  xe as b,
547
549
  he as c,
548
550
  be as d,
@@ -555,11 +557,11 @@ export {
555
557
  Ae as k,
556
558
  Y as l,
557
559
  ve as m,
558
- z as n,
559
- D as o,
560
+ M as n,
561
+ z as o,
560
562
  we as p,
561
563
  Te as q,
562
564
  Q as s,
563
565
  ee as t,
564
- X as x
566
+ q as x
565
567
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./custom-element-CUsSENWc.cjs"),l=require("./http-request-DPrY7mGh.cjs"),t=require("./local-storage-78EivJ_B.cjs"),a=require("./location-element-DRB7hCwA.cjs");exports.CustomElement=e.CustomElement;exports.appendByDceId=e.appendByDceId;exports.assureSlices=e.assureSlices;exports.assureUID=e.assureUID;exports.assureUnique=e.assureUnique;exports.createXsltFromDom=e.createXsltFromDom;exports.deepEqual=e.deepEqual;exports.default=e.CustomElement;exports.evalCurly=e.evalCurly;exports.event2slice=e.event2slice;exports.merge=e.merge;exports.mergeAttr=e.mergeAttr;exports.obj2node=e.obj2node;exports.sanitizeBlankText=e.sanitizeBlankText;exports.tagUid=e.tagUid;exports.toXsl=e.toXsl;exports.xPath=e.xPath;exports.xPathDefaults=e.xPathDefaults;exports.xhrTemplate=e.xhrTemplate;exports.xml2dom=e.xml2dom;exports.xmlString=e.xmlString;exports.xslTags=e.xslTags;exports.HttpRequestElement=l.HttpRequestElement;exports.LocalStorageElement=t.LocalStorageElement;exports.localStorageSetItem=t.localStorageSetItem;exports.localStorage_clear=t.localStorage_clear;exports.localStorage_removeItem=t.localStorage_removeItem;exports.localStorage_setItem=t.localStorage_setItem;exports.LocationElement=a.LocationElement;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./custom-element-BbJMY20-.cjs"),l=require("./http-request-DPrY7mGh.cjs"),t=require("./local-storage-78EivJ_B.cjs"),a=require("./location-element-DRB7hCwA.cjs");exports.CustomElement=e.CustomElement;exports.appendByDceId=e.appendByDceId;exports.assureSlices=e.assureSlices;exports.assureUID=e.assureUID;exports.assureUnique=e.assureUnique;exports.createXsltFromDom=e.createXsltFromDom;exports.deepEqual=e.deepEqual;exports.default=e.CustomElement;exports.evalCurly=e.evalCurly;exports.event2slice=e.event2slice;exports.merge=e.merge;exports.mergeAttr=e.mergeAttr;exports.obj2node=e.obj2node;exports.sanitizeBlankText=e.sanitizeBlankText;exports.tagUid=e.tagUid;exports.toXsl=e.toXsl;exports.xPath=e.xPath;exports.xPathDefaults=e.xPathDefaults;exports.xhrTemplate=e.xhrTemplate;exports.xml2dom=e.xml2dom;exports.xmlString=e.xmlString;exports.xslTags=e.xslTags;exports.HttpRequestElement=l.HttpRequestElement;exports.LocalStorageElement=t.LocalStorageElement;exports.localStorageSetItem=t.localStorageSetItem;exports.localStorage_clear=t.localStorage_clear;exports.localStorage_removeItem=t.localStorage_removeItem;exports.localStorage_setItem=t.localStorage_setItem;exports.LocationElement=a.LocationElement;
@@ -1,5 +1,5 @@
1
- import { C as e } from "./custom-element-BOIPgtxz.js";
2
- import { h as o, e as l, j as r, g as m, c, d as n, k as x, f as p, i as g, m as i, o as u, s as d, t as f, q as S, n as E, l as I, b as h, x as q, a as D, p as L } from "./custom-element-BOIPgtxz.js";
1
+ import { C as e } from "./custom-element-CoRNKeEP.js";
2
+ import { h as o, e as l, j as r, g as m, c, d as n, k as x, f as p, i as g, m as i, o as u, s as d, t as f, q as S, n as E, l as I, b as h, x as q, a as D, p as L } from "./custom-element-CoRNKeEP.js";
3
3
  import { H as v } from "./http-request-BOvP4KTl.js";
4
4
  import { L as T, c as U, b as _, a as j, l as k } from "./local-storage-DzmNKzgN.js";
5
5
  import { L as B } from "./location-element-FJlONi2n.js";
package/dist/demo/a.svg CHANGED
@@ -1,27 +1,27 @@
1
- <svg id="dwc-logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 216 209.18" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
2
- <defs>
3
-
4
- </defs>
5
- <polygon class="cls-3" points="0 82.47 0 126.71 34.84 146.83 34.84 187.06 73.16 209.18 108 189.07 142.84 209.18 181.16 187.06 181.16 146.83 216 126.71 216 82.47 181.16 62.35 181.16 22.12 142.84 0 108 20.12 73.16 0 34.84 22.12 34.84 62.35 0 82.47"/>
6
- <path class="cls-2" d="m114.33,56.69l20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0Z"/>
7
- <path class="cls-2" d="m98.19,62.71h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97Z"/>
8
- <path class="cls-1" d="m48.12,66.01l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97Z"/>
9
- <path class="cls-2" d="m46.18,24.66l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0s20.64-11.92,20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06Z"/>
10
- <path class="cls-2" d="m115.87,24.66l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0s20.64-11.92,20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06Z"/>
11
- <path class="cls-2" d="m152.65,42.59c-4.44,2.56-6.33,5.84-6.33,10.97v23.84c0,.54.45.8.92.54l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0v-23.84c0-.54-.45-.8-.92-.53l-20.64,11.92h0Z"/>
12
- <path class="cls-2" d="m77.55,158.4l20.65-11.92h0c4.44-2.57,6.33-5.84,6.33-10.97v-23.84c0-.54-.45-.8-.92-.53l-20.64,11.92c-4.44,2.57-6.33,5.84-6.33,10.97h0s0,23.84,0,23.84c0,.54.45.8.92.54Z"/>
13
- <path class="cls-4" d="m146.31,134.03v23.84c0,.54.45.8.92.54l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0s0-23.84,0-23.84c0-.54-.45-.8-.92-.53l-20.64,11.92h0c-4.44,2.57-6.33,5.84-6.33,10.97Z"/>
14
- <path class="cls-4" d="m63.35,123.06h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97Z"/>
15
- <path class="cls-4" d="m103.61,151.37l-20.64,11.92c-4.44,2.57-6.33,5.84-6.33,10.97h0s0,23.84,0,23.84c0,.54.45.8.92.54l20.65-11.92h0c4.44-2.57,6.33-5.84,6.33-10.97v-23.84c0-.54-.45-.8-.92-.53Z"/>
16
- <path class="cls-4" d="m63.35,163.29h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97Z"/>
17
- <path class="cls-4" d="m28.51,102.94h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97Z"/>
18
- <path class="cls-4" d="m133.04,163.29l-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84c0,5.13,1.89,8.4,6.33,10.97h0s20.65,11.92,20.65,11.92c.47.27.92,0,.92-.54v-23.84s0,0,0,0c0-5.13-1.89-8.4-6.33-10.97Z"/>
19
- <path class="cls-4" d="m173.29,151.37l-20.64,11.92h0c-4.44,2.57-6.33,5.84-6.33,10.97v23.84c0,.54.45.8.92.54l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0s0-23.84,0-23.84c0-.54-.45-.8-.92-.53Z"/>
20
- <path class="cls-4" d="m209.06,91.55c0-.54-.45-.8-.92-.53l-20.64,11.92h0c-4.44,2.57-6.33,5.84-6.33,10.97v23.84c0,.54.45.8.92.54l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0v-23.84Z"/>
21
- <path class="cls-2" d="m149.18,117.04l20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0Z"/>
22
- <path class="cls-1" d="m112.39,98.05l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0v-23.84c0-.54-.45-.8-.92-.53l-20.64,11.92h0c-4.44,2.57-6.33,5.84-6.33,10.97v23.84c0,.54.45.8.92.54Z"/>
23
- <path class="cls-1" d="m100.13,105.12c.47-.27.47-.79,0-1.06l-20.65-11.92c-4.44-2.57-8.22-2.57-12.67,0h0s-20.65,11.92-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92h0c4.44,2.57,8.22,2.57,12.67,0l20.64-11.92Z"/>
24
- <path class="cls-2" d="m65.29,85.01c.47-.27.47-.79,0-1.06l-20.65-11.92c-4.44-2.57-8.22-2.57-12.67,0h0s-20.65,11.92-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92h0c4.44,2.57,8.22,2.57,12.67,0l20.64-11.92Z"/>
25
- <path class="cls-1" d="m133.04,123.06l-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84c0,5.13,1.89,8.4,6.33,10.97h0s20.65,11.92,20.65,11.92c.47.27.92,0,.92-.54v-23.84s0,0,0,0c0-5.13-1.89-8.4-6.33-10.97Z"/>
26
- <path class="cls-1" d="m184.02,96.93l20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0Z"/>
1
+ <svg id="dwc-logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 216 209.18" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
2
+ <defs>
3
+
4
+ </defs>
5
+ <polygon class="cls-3" points="0 82.47 0 126.71 34.84 146.83 34.84 187.06 73.16 209.18 108 189.07 142.84 209.18 181.16 187.06 181.16 146.83 216 126.71 216 82.47 181.16 62.35 181.16 22.12 142.84 0 108 20.12 73.16 0 34.84 22.12 34.84 62.35 0 82.47"/>
6
+ <path class="cls-2" d="m114.33,56.69l20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0Z"/>
7
+ <path class="cls-2" d="m98.19,62.71h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97Z"/>
8
+ <path class="cls-1" d="m48.12,66.01l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97Z"/>
9
+ <path class="cls-2" d="m46.18,24.66l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0s20.64-11.92,20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06Z"/>
10
+ <path class="cls-2" d="m115.87,24.66l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0s20.64-11.92,20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06Z"/>
11
+ <path class="cls-2" d="m152.65,42.59c-4.44,2.56-6.33,5.84-6.33,10.97v23.84c0,.54.45.8.92.54l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0v-23.84c0-.54-.45-.8-.92-.53l-20.64,11.92h0Z"/>
12
+ <path class="cls-2" d="m77.55,158.4l20.65-11.92h0c4.44-2.57,6.33-5.84,6.33-10.97v-23.84c0-.54-.45-.8-.92-.53l-20.64,11.92c-4.44,2.57-6.33,5.84-6.33,10.97h0s0,23.84,0,23.84c0,.54.45.8.92.54Z"/>
13
+ <path class="cls-4" d="m146.31,134.03v23.84c0,.54.45.8.92.54l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0s0-23.84,0-23.84c0-.54-.45-.8-.92-.53l-20.64,11.92h0c-4.44,2.57-6.33,5.84-6.33,10.97Z"/>
14
+ <path class="cls-4" d="m63.35,123.06h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97Z"/>
15
+ <path class="cls-4" d="m103.61,151.37l-20.64,11.92c-4.44,2.57-6.33,5.84-6.33,10.97h0s0,23.84,0,23.84c0,.54.45.8.92.54l20.65-11.92h0c4.44-2.57,6.33-5.84,6.33-10.97v-23.84c0-.54-.45-.8-.92-.53Z"/>
16
+ <path class="cls-4" d="m63.35,163.29h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97Z"/>
17
+ <path class="cls-4" d="m28.51,102.94h0s-20.64-11.92-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84s0,0,0,0c0,5.13,1.89,8.4,6.33,10.97l20.65,11.92c.47.27.92,0,.92-.54v-23.84c0-5.13-1.89-8.4-6.33-10.97Z"/>
18
+ <path class="cls-4" d="m133.04,163.29l-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84c0,5.13,1.89,8.4,6.33,10.97h0s20.65,11.92,20.65,11.92c.47.27.92,0,.92-.54v-23.84s0,0,0,0c0-5.13-1.89-8.4-6.33-10.97Z"/>
19
+ <path class="cls-4" d="m173.29,151.37l-20.64,11.92h0c-4.44,2.57-6.33,5.84-6.33,10.97v23.84c0,.54.45.8.92.54l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0s0-23.84,0-23.84c0-.54-.45-.8-.92-.53Z"/>
20
+ <path class="cls-4" d="m209.06,91.55c0-.54-.45-.8-.92-.53l-20.64,11.92h0c-4.44,2.57-6.33,5.84-6.33,10.97v23.84c0,.54.45.8.92.54l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0v-23.84Z"/>
21
+ <path class="cls-2" d="m149.18,117.04l20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0Z"/>
22
+ <path class="cls-1" d="m112.39,98.05l20.65-11.92c4.44-2.57,6.33-5.84,6.33-10.97h0v-23.84c0-.54-.45-.8-.92-.53l-20.64,11.92h0c-4.44,2.57-6.33,5.84-6.33,10.97v23.84c0,.54.45.8.92.54Z"/>
23
+ <path class="cls-1" d="m100.13,105.12c.47-.27.47-.79,0-1.06l-20.65-11.92c-4.44-2.57-8.22-2.57-12.67,0h0s-20.65,11.92-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92h0c4.44,2.57,8.22,2.57,12.67,0l20.64-11.92Z"/>
24
+ <path class="cls-2" d="m65.29,85.01c.47-.27.47-.79,0-1.06l-20.65-11.92c-4.44-2.57-8.22-2.57-12.67,0h0s-20.65,11.92-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92h0c4.44,2.57,8.22,2.57,12.67,0l20.64-11.92Z"/>
25
+ <path class="cls-1" d="m133.04,123.06l-20.64-11.92c-.47-.27-.92-.01-.92.53v23.84c0,5.13,1.89,8.4,6.33,10.97h0s20.65,11.92,20.65,11.92c.47.27.92,0,.92-.54v-23.84s0,0,0,0c0-5.13-1.89-8.4-6.33-10.97Z"/>
26
+ <path class="cls-1" d="m184.02,96.93l20.64-11.92c.47-.27.47-.79,0-1.06l-20.65-11.92h0c-4.44-2.57-8.22-2.57-12.67,0l-20.65,11.92c-.47.27-.47.79,0,1.06l20.64,11.92c4.44,2.57,8.22,2.57,12.67,0h0Z"/>
27
27
  </svg>
@@ -210,6 +210,43 @@
210
210
  </template>
211
211
  </html-demo-element>
212
212
 
213
+ <html-demo-element legend="12. checkbox use"
214
+ description="The value is empty when unchecked. Otherwise taken either from slice-value or value attribute.">
215
+ <p>Check the box to see the value in slice</p>
216
+ <template>
217
+ <custom-element>
218
+ <template>
219
+ <input type="checkbox" slice="is-checked" value="V0" checked/>
220
+ slice: {/datadom/slice/is-checked} <br/>
221
+ <xsl:variable name="v1">V1</xsl:variable> <br/>
222
+ $v1={$v1}<br/>
223
+
224
+ <!-- slice-variable is XPath. $v1 is available only in template, embedding trick -->
225
+ <input type="checkbox" slice="s2" slice-value="'{$v1}'"/>
226
+ slice 2: {//s2} <br/>
227
+
228
+ <!-- variable is used in template scope -->
229
+ <input type="checkbox" slice="s3" value="{$v1}"/>
230
+ slice 3: {//s3}
231
+ </template>
232
+ </custom-element>
233
+ </template>
234
+ </html-demo-element>
235
+
236
+ <html-demo-element legend="13. Radio buttons use"
237
+ description="The value is empty when unchecked. Otherwise taken either from slice-value or value attribute.">
238
+ <p>Check the radiobutton to see the value in slice</p>
239
+ <template>
240
+ <custom-element>
241
+ <template>
242
+ V0: <input type="radio" slice="radio-group" value="V0" name="g1"/> <br/>
243
+ V1: <input type="radio" slice="radio-group" value="V1" name="g1" checked/> <br/>
244
+ slice: {//radio-group} <br/>
245
+ </template>
246
+ </custom-element>
247
+ </template>
248
+ </html-demo-element>
249
+
213
250
  <script type="module" src="https://unpkg.com/html-demo-element@1/html-demo-element.js"></script>
214
251
 
215
252
  </body>
@@ -14,9 +14,6 @@ script{ display:none !important; }
14
14
  dd{ padding: 1rem;}
15
15
  p{ margin: 0;}
16
16
  code{ font-weight: bold; color: green; text-wrap: nowrap; }
17
- *{
18
- gap: 1rem;
19
- }
20
17
 
21
18
  html-demo-element h3
22
19
  { text-shadow: 0 0 0.25em white;