@nl-design-system-community/clippy-components 1.2.0 → 2.0.0

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 (56) hide show
  1. package/dist/clippy-button/index.js +4 -4
  2. package/dist/clippy-code/index.js +18 -15
  3. package/dist/clippy-color-combobox/index.d.ts +9 -13
  4. package/dist/clippy-color-combobox/index.d.ts.map +1 -1
  5. package/dist/clippy-color-combobox/index.js +6 -5
  6. package/dist/clippy-color-combobox/lib.d.ts +16 -12
  7. package/dist/clippy-color-combobox/lib.d.ts.map +1 -1
  8. package/dist/clippy-color-combobox/messages/en.d.ts +14 -6
  9. package/dist/clippy-color-combobox/messages/en.d.ts.map +1 -1
  10. package/dist/clippy-color-combobox/messages/nl.d.ts +14 -6
  11. package/dist/clippy-color-combobox/messages/nl.d.ts.map +1 -1
  12. package/dist/clippy-combobox/index.d.ts +22 -8
  13. package/dist/clippy-combobox/index.d.ts.map +1 -1
  14. package/dist/clippy-combobox/index.js +703 -8
  15. package/dist/clippy-font-combobox/index.d.ts +4 -3
  16. package/dist/clippy-font-combobox/index.d.ts.map +1 -1
  17. package/dist/clippy-font-combobox/index.js +94 -59
  18. package/dist/clippy-heading/index.js +180 -174
  19. package/dist/clippy-html-image/index.js +51 -31
  20. package/dist/clippy-icon/index.js +22 -16
  21. package/dist/clippy-lang-combobox/index.d.ts +2 -4
  22. package/dist/clippy-lang-combobox/index.d.ts.map +1 -1
  23. package/dist/clippy-lang-combobox/index.js +104 -78
  24. package/dist/clippy-modal/index.d.ts +3 -3
  25. package/dist/clippy-modal/index.d.ts.map +1 -1
  26. package/dist/clippy-modal/index.js +98 -89
  27. package/dist/clippy-toggletip/index.d.ts +16 -0
  28. package/dist/clippy-toggletip/index.d.ts.map +1 -0
  29. package/dist/clippy-toggletip/index.js +180 -0
  30. package/dist/decorators-Cq82_-g_.js +11 -0
  31. package/dist/en-D1kE0w6o.js +4 -0
  32. package/dist/external-BCrp-PaG.js +4 -0
  33. package/dist/index-7tZ2Ykfm.js +135 -0
  34. package/dist/index-C9pF3BXT.js +10683 -0
  35. package/dist/lib/FormElement/index.d.ts +2 -1
  36. package/dist/lib/FormElement/index.d.ts.map +1 -1
  37. package/dist/lib/FormElement/index.js +95 -0
  38. package/dist/lib/LocalizationMixin/index.d.ts.map +1 -1
  39. package/dist/lib/LocalizationMixin/index.js +64 -0
  40. package/dist/lib/converters/index.d.ts +4 -0
  41. package/dist/lib/converters/index.d.ts.map +1 -1
  42. package/dist/lib/converters/index.js +35 -0
  43. package/dist/lib/sr-only/index.d.ts +3 -0
  44. package/dist/lib/sr-only/index.d.ts.map +1 -0
  45. package/dist/lib/sr-only/index.js +18 -0
  46. package/dist/nl-99gBQbne.js +19 -0
  47. package/package.json +19 -16
  48. package/dist/decorators-BGpMqJ7V.js +0 -7
  49. package/dist/en-B-D8DBsf.js +0 -4
  50. package/dist/external-Dtf6f6DP.js +0 -4
  51. package/dist/index-CT1z3SFL.js +0 -106
  52. package/dist/index-CaVpiaBC.js +0 -52
  53. package/dist/index-CmKtM5nD.js +0 -379
  54. package/dist/index-CtreqNZ6.js +0 -3602
  55. package/dist/index-D3FiqptQ.js +0 -65
  56. package/dist/nl-CJG2-yS5.js +0 -11
@@ -1,72 +1,71 @@
1
- import { s as q } from "../decorators-BGpMqJ7V.js";
2
- import { unsafeCSS as G, LitElement as J } from "lit";
3
- import { property as K } from "lit/decorators.js";
4
- const Q = ".nl-heading{break-after:avoid;break-inside:avoid}.nl-heading--level-1{color:var(--nl-heading-level-1-color, inherit);font-family:var(--nl-heading-level-1-font-family);font-size:var(--nl-heading-level-1-font-size, revert);font-weight:var(--nl-heading-level-1-font-weight, bold);line-height:var(--nl-heading-level-1-line-height);margin-block-end:var(--nl-heading-level-1-margin-block-end, revert);margin-block-start:var(--nl-heading-level-1-margin-block-start, revert)}.nl-heading--level-2{color:var(--nl-heading-level-2-color, inherit);font-family:var(--nl-heading-level-2-font-family);font-size:var(--nl-heading-level-2-font-size, revert);font-weight:var(--nl-heading-level-2-font-weight, bold);line-height:var(--nl-heading-level-2-line-height);margin-block-end:var(--nl-heading-level-2-margin-block-end, revert);margin-block-start:var(--nl-heading-level-2-margin-block-start, revert)}.nl-heading--level-3{color:var(--nl-heading-level-3-color, inherit);font-family:var(--nl-heading-level-3-font-family);font-size:var(--nl-heading-level-3-font-size, revert);font-weight:var(--nl-heading-level-3-font-weight, bold);line-height:var(--nl-heading-level-3-line-height);margin-block-end:var(--nl-heading-level-3-margin-block-end, revert);margin-block-start:var(--nl-heading-level-3-margin-block-start, revert)}.nl-heading--level-4{color:var(--nl-heading-level-4-color, inherit);font-family:var(--nl-heading-level-4-font-family);font-size:var(--nl-heading-level-4-font-size, revert);font-weight:var(--nl-heading-level-4-font-weight, bold);line-height:var(--nl-heading-level-4-line-height);margin-block-end:var(--nl-heading-level-4-margin-block-end, revert);margin-block-start:var(--nl-heading-level-4-margin-block-start, revert)}.nl-heading--level-5{color:var(--nl-heading-level-5-color, inherit);font-family:var(--nl-heading-level-5-font-family);font-size:var(--nl-heading-level-5-font-size, revert);font-weight:var(--nl-heading-level-5-font-weight, bold);line-height:var(--nl-heading-level-5-line-height);margin-block-end:var(--nl-heading-level-5-margin-block-end, revert);margin-block-start:var(--nl-heading-level-5-margin-block-start, revert)}.nl-heading--level-6{color:var(--nl-heading-level-6-color, inherit);font-family:var(--nl-heading-level-6-font-family);font-size:var(--nl-heading-level-6-font-size, revert);font-weight:var(--nl-heading-level-6-font-weight, bold);line-height:var(--nl-heading-level-6-line-height);margin-block-end:var(--nl-heading-level-6-margin-block-end, revert);margin-block-start:var(--nl-heading-level-6-margin-block-start, revert)}";
5
- const S = globalThis, E = (l) => l, N = S.trustedTypes, I = N ? N.createPolicy("lit-html", { createHTML: (l) => l }) : void 0, B = "$lit$", f = `lit$${Math.random().toFixed(9).slice(2)}$`, D = "?" + f, X = `<${D}>`, A = document, w = () => A.createComment(""), y = (l) => l === null || typeof l != "object" && typeof l != "function", z = Array.isArray, Y = (l) => z(l) || typeof l?.[Symbol.iterator] == "function", T = `[
6
- \f\r]`, u = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, O = /-->/g, P = />/g, _ = RegExp(`>|${T}(?:([^\\s"'>=/]+)(${T}*=${T}*(?:[^
7
- \f\r"'\`<>=]|("|')|))|$)`, "g"), j = /'/g, L = /"/g, W = /^(?:script|style|textarea|title)$/i, ee = (l) => (e, ...i) => ({ _$litType$: l, strings: e, values: i }), te = ee(1), b = /* @__PURE__ */ Symbol.for("lit-noChange"), g = /* @__PURE__ */ Symbol.for("lit-nothing"), R = /* @__PURE__ */ new WeakMap(), p = A.createTreeWalker(A, 129);
8
- function V(l, e) {
9
- if (!z(l) || !l.hasOwnProperty("raw")) throw Error("invalid template strings array");
10
- return I !== void 0 ? I.createHTML(e) : e;
1
+ import { s as safeCustomElement } from "../decorators-Cq82_-g_.js";
2
+ import { unsafeCSS, LitElement } from "lit";
3
+ import { property } from "lit/decorators.js";
4
+ const headingCss = ".nl-heading{break-after:avoid;break-inside:avoid}.nl-heading--level-1{color:var(--nl-heading-level-1-color, inherit);font-family:var(--nl-heading-level-1-font-family);font-size:var(--nl-heading-level-1-font-size, revert);font-weight:var(--nl-heading-level-1-font-weight, bold);line-height:var(--nl-heading-level-1-line-height);margin-block-end:var(--nl-heading-level-1-margin-block-end, revert);margin-block-start:var(--nl-heading-level-1-margin-block-start, revert)}.nl-heading--level-2{color:var(--nl-heading-level-2-color, inherit);font-family:var(--nl-heading-level-2-font-family);font-size:var(--nl-heading-level-2-font-size, revert);font-weight:var(--nl-heading-level-2-font-weight, bold);line-height:var(--nl-heading-level-2-line-height);margin-block-end:var(--nl-heading-level-2-margin-block-end, revert);margin-block-start:var(--nl-heading-level-2-margin-block-start, revert)}.nl-heading--level-3{color:var(--nl-heading-level-3-color, inherit);font-family:var(--nl-heading-level-3-font-family);font-size:var(--nl-heading-level-3-font-size, revert);font-weight:var(--nl-heading-level-3-font-weight, bold);line-height:var(--nl-heading-level-3-line-height);margin-block-end:var(--nl-heading-level-3-margin-block-end, revert);margin-block-start:var(--nl-heading-level-3-margin-block-start, revert)}.nl-heading--level-4{color:var(--nl-heading-level-4-color, inherit);font-family:var(--nl-heading-level-4-font-family);font-size:var(--nl-heading-level-4-font-size, revert);font-weight:var(--nl-heading-level-4-font-weight, bold);line-height:var(--nl-heading-level-4-line-height);margin-block-end:var(--nl-heading-level-4-margin-block-end, revert);margin-block-start:var(--nl-heading-level-4-margin-block-start, revert)}.nl-heading--level-5{color:var(--nl-heading-level-5-color, inherit);font-family:var(--nl-heading-level-5-font-family);font-size:var(--nl-heading-level-5-font-size, revert);font-weight:var(--nl-heading-level-5-font-weight, bold);line-height:var(--nl-heading-level-5-line-height);margin-block-end:var(--nl-heading-level-5-margin-block-end, revert);margin-block-start:var(--nl-heading-level-5-margin-block-start, revert)}.nl-heading--level-6{color:var(--nl-heading-level-6-color, inherit);font-family:var(--nl-heading-level-6-font-family);font-size:var(--nl-heading-level-6-font-size, revert);font-weight:var(--nl-heading-level-6-font-weight, bold);line-height:var(--nl-heading-level-6-line-height);margin-block-end:var(--nl-heading-level-6-margin-block-end, revert);margin-block-start:var(--nl-heading-level-6-margin-block-start, revert)}/*# sourceMappingURL=heading.css.map */\n";
5
+ const t = globalThis, i = (t2) => t2, s$1 = t.trustedTypes, e = s$1 ? s$1.createPolicy("lit-html", { createHTML: (t2) => t2 }) : void 0, h = "$lit$", o$1 = `lit$${Math.random().toFixed(9).slice(2)}$`, n$1 = "?" + o$1, r = `<${n$1}>`, l$1 = document, c = () => l$1.createComment(""), a$1 = (t2) => null === t2 || "object" != typeof t2 && "function" != typeof t2, u$1 = Array.isArray, d = (t2) => u$1(t2) || "function" == typeof t2?.[Symbol.iterator], f = "[ \n\f\r]", v = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, _ = /-->/g, m = />/g, p = RegExp(`>|${f}(?:([^\\s"'>=/]+)(${f}*=${f}*(?:[^
6
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), g = /'/g, $ = /"/g, y = /^(?:script|style|textarea|title)$/i, x = (t2) => (i2, ...s2) => ({ _$litType$: t2, strings: i2, values: s2 }), b = x(1), E = /* @__PURE__ */ Symbol.for("lit-noChange"), A = /* @__PURE__ */ Symbol.for("lit-nothing"), C = /* @__PURE__ */ new WeakMap(), P = l$1.createTreeWalker(l$1, 129);
7
+ function V(t2, i2) {
8
+ if (!u$1(t2) || !t2.hasOwnProperty("raw")) throw Error("invalid template strings array");
9
+ return void 0 !== e ? e.createHTML(i2) : i2;
11
10
  }
12
- const ie = (l, e) => {
13
- const i = l.length - 1, t = [];
14
- let n, r = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", s = u;
15
- for (let d = 0; d < i; d++) {
16
- const o = l[d];
17
- let h, v, a = -1, c = 0;
18
- for (; c < o.length && (s.lastIndex = c, v = s.exec(o), v !== null); ) c = s.lastIndex, s === u ? v[1] === "!--" ? s = O : v[1] !== void 0 ? s = P : v[2] !== void 0 ? (W.test(v[2]) && (n = RegExp("</" + v[2], "g")), s = _) : v[3] !== void 0 && (s = _) : s === _ ? v[0] === ">" ? (s = n ?? u, a = -1) : v[1] === void 0 ? a = -2 : (a = s.lastIndex - v[2].length, h = v[1], s = v[3] === void 0 ? _ : v[3] === '"' ? L : j) : s === L || s === j ? s = _ : s === O || s === P ? s = u : (s = _, n = void 0);
19
- const $ = s === _ && l[d + 1].startsWith("/>") ? " " : "";
20
- r += s === u ? o + X : a >= 0 ? (t.push(h), o.slice(0, a) + B + o.slice(a) + f + $) : o + f + (a === -2 ? d : $);
21
- }
22
- return [V(l, r + (l[i] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), t];
11
+ const N = (t2, i2) => {
12
+ const s2 = t2.length - 1, e2 = [];
13
+ let n2, l2 = 2 === i2 ? "<svg>" : 3 === i2 ? "<math>" : "", c2 = v;
14
+ for (let i3 = 0; i3 < s2; i3++) {
15
+ const s3 = t2[i3];
16
+ let a2, u2, d2 = -1, f2 = 0;
17
+ for (; f2 < s3.length && (c2.lastIndex = f2, u2 = c2.exec(s3), null !== u2); ) f2 = c2.lastIndex, c2 === v ? "!--" === u2[1] ? c2 = _ : void 0 !== u2[1] ? c2 = m : void 0 !== u2[2] ? (y.test(u2[2]) && (n2 = RegExp("</" + u2[2], "g")), c2 = p) : void 0 !== u2[3] && (c2 = p) : c2 === p ? ">" === u2[0] ? (c2 = n2 ?? v, d2 = -1) : void 0 === u2[1] ? d2 = -2 : (d2 = c2.lastIndex - u2[2].length, a2 = u2[1], c2 = void 0 === u2[3] ? p : '"' === u2[3] ? $ : g) : c2 === $ || c2 === g ? c2 = p : c2 === _ || c2 === m ? c2 = v : (c2 = p, n2 = void 0);
18
+ const x2 = c2 === p && t2[i3 + 1].startsWith("/>") ? " " : "";
19
+ l2 += c2 === v ? s3 + r : d2 >= 0 ? (e2.push(a2), s3.slice(0, d2) + h + s3.slice(d2) + o$1 + x2) : s3 + o$1 + (-2 === d2 ? i3 : x2);
20
+ }
21
+ return [V(t2, l2 + (t2[s2] || "<?>") + (2 === i2 ? "</svg>" : 3 === i2 ? "</math>" : "")), e2];
23
22
  };
24
- class x {
25
- constructor({ strings: e, _$litType$: i }, t) {
26
- let n;
23
+ class S {
24
+ constructor({ strings: t2, _$litType$: i2 }, e2) {
25
+ let r2;
27
26
  this.parts = [];
28
- let r = 0, s = 0;
29
- const d = e.length - 1, o = this.parts, [h, v] = ie(e, i);
30
- if (this.el = x.createElement(h, t), p.currentNode = this.el.content, i === 2 || i === 3) {
31
- const a = this.el.content.firstChild;
32
- a.replaceWith(...a.childNodes);
27
+ let l2 = 0, a2 = 0;
28
+ const u2 = t2.length - 1, d2 = this.parts, [f2, v2] = N(t2, i2);
29
+ if (this.el = S.createElement(f2, e2), P.currentNode = this.el.content, 2 === i2 || 3 === i2) {
30
+ const t3 = this.el.content.firstChild;
31
+ t3.replaceWith(...t3.childNodes);
33
32
  }
34
- for (; (n = p.nextNode()) !== null && o.length < d; ) {
35
- if (n.nodeType === 1) {
36
- if (n.hasAttributes()) for (const a of n.getAttributeNames()) if (a.endsWith(B)) {
37
- const c = v[s++], $ = n.getAttribute(a).split(f), H = /([.?@])?(.*)/.exec(c);
38
- o.push({ type: 1, index: r, name: H[2], strings: $, ctor: H[1] === "." ? le : H[1] === "?" ? se : H[1] === "@" ? re : M }), n.removeAttribute(a);
39
- } else a.startsWith(f) && (o.push({ type: 6, index: r }), n.removeAttribute(a));
40
- if (W.test(n.tagName)) {
41
- const a = n.textContent.split(f), c = a.length - 1;
42
- if (c > 0) {
43
- n.textContent = N ? N.emptyScript : "";
44
- for (let $ = 0; $ < c; $++) n.append(a[$], w()), p.nextNode(), o.push({ type: 2, index: ++r });
45
- n.append(a[c], w());
33
+ for (; null !== (r2 = P.nextNode()) && d2.length < u2; ) {
34
+ if (1 === r2.nodeType) {
35
+ if (r2.hasAttributes()) for (const t3 of r2.getAttributeNames()) if (t3.endsWith(h)) {
36
+ const i3 = v2[a2++], s2 = r2.getAttribute(t3).split(o$1), e3 = /([.?@])?(.*)/.exec(i3);
37
+ d2.push({ type: 1, index: l2, name: e3[2], strings: s2, ctor: "." === e3[1] ? I : "?" === e3[1] ? L : "@" === e3[1] ? z : H }), r2.removeAttribute(t3);
38
+ } else t3.startsWith(o$1) && (d2.push({ type: 6, index: l2 }), r2.removeAttribute(t3));
39
+ if (y.test(r2.tagName)) {
40
+ const t3 = r2.textContent.split(o$1), i3 = t3.length - 1;
41
+ if (i3 > 0) {
42
+ r2.textContent = s$1 ? s$1.emptyScript : "";
43
+ for (let s2 = 0; s2 < i3; s2++) r2.append(t3[s2], c()), P.nextNode(), d2.push({ type: 2, index: ++l2 });
44
+ r2.append(t3[i3], c());
46
45
  }
47
46
  }
48
- } else if (n.nodeType === 8) if (n.data === D) o.push({ type: 2, index: r });
47
+ } else if (8 === r2.nodeType) if (r2.data === n$1) d2.push({ type: 2, index: l2 });
49
48
  else {
50
- let a = -1;
51
- for (; (a = n.data.indexOf(f, a + 1)) !== -1; ) o.push({ type: 7, index: r }), a += f.length - 1;
49
+ let t3 = -1;
50
+ for (; -1 !== (t3 = r2.data.indexOf(o$1, t3 + 1)); ) d2.push({ type: 7, index: l2 }), t3 += o$1.length - 1;
52
51
  }
53
- r++;
52
+ l2++;
54
53
  }
55
54
  }
56
- static createElement(e, i) {
57
- const t = A.createElement("template");
58
- return t.innerHTML = e, t;
55
+ static createElement(t2, i2) {
56
+ const s2 = l$1.createElement("template");
57
+ return s2.innerHTML = t2, s2;
59
58
  }
60
59
  }
61
- function m(l, e, i = l, t) {
62
- if (e === b) return e;
63
- let n = t !== void 0 ? i._$Co?.[t] : i._$Cl;
64
- const r = y(e) ? void 0 : e._$litDirective$;
65
- return n?.constructor !== r && (n?._$AO?.(!1), r === void 0 ? n = void 0 : (n = new r(l), n._$AT(l, i, t)), t !== void 0 ? (i._$Co ??= [])[t] = n : i._$Cl = n), n !== void 0 && (e = m(l, n._$AS(l, e.values), n, t)), e;
60
+ function M(t2, i2, s2 = t2, e2) {
61
+ if (i2 === E) return i2;
62
+ let h2 = void 0 !== e2 ? s2._$Co?.[e2] : s2._$Cl;
63
+ const o2 = a$1(i2) ? void 0 : i2._$litDirective$;
64
+ return h2?.constructor !== o2 && (h2?._$AO?.(false), void 0 === o2 ? h2 = void 0 : (h2 = new o2(t2), h2._$AT(t2, s2, e2)), void 0 !== e2 ? (s2._$Co ??= [])[e2] = h2 : s2._$Cl = h2), void 0 !== h2 && (i2 = M(t2, h2._$AS(t2, i2.values), h2, e2)), i2;
66
65
  }
67
- class ne {
68
- constructor(e, i) {
69
- this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = i;
66
+ class R {
67
+ constructor(t2, i2) {
68
+ this._$AV = [], this._$AN = void 0, this._$AD = t2, this._$AM = i2;
70
69
  }
71
70
  get parentNode() {
72
71
  return this._$AM.parentNode;
@@ -74,35 +73,35 @@ class ne {
74
73
  get _$AU() {
75
74
  return this._$AM._$AU;
76
75
  }
77
- u(e) {
78
- const { el: { content: i }, parts: t } = this._$AD, n = (e?.creationScope ?? A).importNode(i, !0);
79
- p.currentNode = n;
80
- let r = p.nextNode(), s = 0, d = 0, o = t[0];
81
- for (; o !== void 0; ) {
82
- if (s === o.index) {
83
- let h;
84
- o.type === 2 ? h = new C(r, r.nextSibling, this, e) : o.type === 1 ? h = new o.ctor(r, o.name, o.strings, this, e) : o.type === 6 && (h = new oe(r, this, e)), this._$AV.push(h), o = t[++d];
76
+ u(t2) {
77
+ const { el: { content: i2 }, parts: s2 } = this._$AD, e2 = (t2?.creationScope ?? l$1).importNode(i2, true);
78
+ P.currentNode = e2;
79
+ let h2 = P.nextNode(), o2 = 0, n2 = 0, r2 = s2[0];
80
+ for (; void 0 !== r2; ) {
81
+ if (o2 === r2.index) {
82
+ let i3;
83
+ 2 === r2.type ? i3 = new k(h2, h2.nextSibling, this, t2) : 1 === r2.type ? i3 = new r2.ctor(h2, r2.name, r2.strings, this, t2) : 6 === r2.type && (i3 = new Z(h2, this, t2)), this._$AV.push(i3), r2 = s2[++n2];
85
84
  }
86
- s !== o?.index && (r = p.nextNode(), s++);
85
+ o2 !== r2?.index && (h2 = P.nextNode(), o2++);
87
86
  }
88
- return p.currentNode = A, n;
87
+ return P.currentNode = l$1, e2;
89
88
  }
90
- p(e) {
91
- let i = 0;
92
- for (const t of this._$AV) t !== void 0 && (t.strings !== void 0 ? (t._$AI(e, t, i), i += t.strings.length - 2) : t._$AI(e[i])), i++;
89
+ p(t2) {
90
+ let i2 = 0;
91
+ for (const s2 of this._$AV) void 0 !== s2 && (void 0 !== s2.strings ? (s2._$AI(t2, s2, i2), i2 += s2.strings.length - 2) : s2._$AI(t2[i2])), i2++;
93
92
  }
94
93
  }
95
- class C {
94
+ class k {
96
95
  get _$AU() {
97
96
  return this._$AM?._$AU ?? this._$Cv;
98
97
  }
99
- constructor(e, i, t, n) {
100
- this.type = 2, this._$AH = g, this._$AN = void 0, this._$AA = e, this._$AB = i, this._$AM = t, this.options = n, this._$Cv = n?.isConnected ?? !0;
98
+ constructor(t2, i2, s2, e2) {
99
+ this.type = 2, this._$AH = A, this._$AN = void 0, this._$AA = t2, this._$AB = i2, this._$AM = s2, this.options = e2, this._$Cv = e2?.isConnected ?? true;
101
100
  }
102
101
  get parentNode() {
103
- let e = this._$AA.parentNode;
104
- const i = this._$AM;
105
- return i !== void 0 && e?.nodeType === 11 && (e = i.parentNode), e;
102
+ let t2 = this._$AA.parentNode;
103
+ const i2 = this._$AM;
104
+ return void 0 !== i2 && 11 === t2?.nodeType && (t2 = i2.parentNode), t2;
106
105
  }
107
106
  get startNode() {
108
107
  return this._$AA;
@@ -110,153 +109,160 @@ class C {
110
109
  get endNode() {
111
110
  return this._$AB;
112
111
  }
113
- _$AI(e, i = this) {
114
- e = m(this, e, i), y(e) ? e === g || e == null || e === "" ? (this._$AH !== g && this._$AR(), this._$AH = g) : e !== this._$AH && e !== b && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Y(e) ? this.k(e) : this._(e);
112
+ _$AI(t2, i2 = this) {
113
+ t2 = M(this, t2, i2), a$1(t2) ? t2 === A || null == t2 || "" === t2 ? (this._$AH !== A && this._$AR(), this._$AH = A) : t2 !== this._$AH && t2 !== E && this._(t2) : void 0 !== t2._$litType$ ? this.$(t2) : void 0 !== t2.nodeType ? this.T(t2) : d(t2) ? this.k(t2) : this._(t2);
115
114
  }
116
- O(e) {
117
- return this._$AA.parentNode.insertBefore(e, this._$AB);
115
+ O(t2) {
116
+ return this._$AA.parentNode.insertBefore(t2, this._$AB);
118
117
  }
119
- T(e) {
120
- this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
118
+ T(t2) {
119
+ this._$AH !== t2 && (this._$AR(), this._$AH = this.O(t2));
121
120
  }
122
- _(e) {
123
- this._$AH !== g && y(this._$AH) ? this._$AA.nextSibling.data = e : this.T(A.createTextNode(e)), this._$AH = e;
121
+ _(t2) {
122
+ this._$AH !== A && a$1(this._$AH) ? this._$AA.nextSibling.data = t2 : this.T(l$1.createTextNode(t2)), this._$AH = t2;
124
123
  }
125
- $(e) {
126
- const { values: i, _$litType$: t } = e, n = typeof t == "number" ? this._$AC(e) : (t.el === void 0 && (t.el = x.createElement(V(t.h, t.h[0]), this.options)), t);
127
- if (this._$AH?._$AD === n) this._$AH.p(i);
124
+ $(t2) {
125
+ const { values: i2, _$litType$: s2 } = t2, e2 = "number" == typeof s2 ? this._$AC(t2) : (void 0 === s2.el && (s2.el = S.createElement(V(s2.h, s2.h[0]), this.options)), s2);
126
+ if (this._$AH?._$AD === e2) this._$AH.p(i2);
128
127
  else {
129
- const r = new ne(n, this), s = r.u(this.options);
130
- r.p(i), this.T(s), this._$AH = r;
128
+ const t3 = new R(e2, this), s3 = t3.u(this.options);
129
+ t3.p(i2), this.T(s3), this._$AH = t3;
131
130
  }
132
131
  }
133
- _$AC(e) {
134
- let i = R.get(e.strings);
135
- return i === void 0 && R.set(e.strings, i = new x(e)), i;
136
- }
137
- k(e) {
138
- z(this._$AH) || (this._$AH = [], this._$AR());
139
- const i = this._$AH;
140
- let t, n = 0;
141
- for (const r of e) n === i.length ? i.push(t = new C(this.O(w()), this.O(w()), this, this.options)) : t = i[n], t._$AI(r), n++;
142
- n < i.length && (this._$AR(t && t._$AB.nextSibling, n), i.length = n);
143
- }
144
- _$AR(e = this._$AA.nextSibling, i) {
145
- for (this._$AP?.(!1, !0, i); e !== this._$AB; ) {
146
- const t = E(e).nextSibling;
147
- E(e).remove(), e = t;
132
+ _$AC(t2) {
133
+ let i2 = C.get(t2.strings);
134
+ return void 0 === i2 && C.set(t2.strings, i2 = new S(t2)), i2;
135
+ }
136
+ k(t2) {
137
+ u$1(this._$AH) || (this._$AH = [], this._$AR());
138
+ const i2 = this._$AH;
139
+ let s2, e2 = 0;
140
+ for (const h2 of t2) e2 === i2.length ? i2.push(s2 = new k(this.O(c()), this.O(c()), this, this.options)) : s2 = i2[e2], s2._$AI(h2), e2++;
141
+ e2 < i2.length && (this._$AR(s2 && s2._$AB.nextSibling, e2), i2.length = e2);
142
+ }
143
+ _$AR(t2 = this._$AA.nextSibling, s2) {
144
+ for (this._$AP?.(false, true, s2); t2 !== this._$AB; ) {
145
+ const s3 = i(t2).nextSibling;
146
+ i(t2).remove(), t2 = s3;
148
147
  }
149
148
  }
150
- setConnected(e) {
151
- this._$AM === void 0 && (this._$Cv = e, this._$AP?.(e));
149
+ setConnected(t2) {
150
+ void 0 === this._$AM && (this._$Cv = t2, this._$AP?.(t2));
152
151
  }
153
152
  }
154
- class M {
153
+ class H {
155
154
  get tagName() {
156
155
  return this.element.tagName;
157
156
  }
158
157
  get _$AU() {
159
158
  return this._$AM._$AU;
160
159
  }
161
- constructor(e, i, t, n, r) {
162
- this.type = 1, this._$AH = g, this._$AN = void 0, this.element = e, this.name = i, this._$AM = n, this.options = r, t.length > 2 || t[0] !== "" || t[1] !== "" ? (this._$AH = Array(t.length - 1).fill(new String()), this.strings = t) : this._$AH = g;
160
+ constructor(t2, i2, s2, e2, h2) {
161
+ this.type = 1, this._$AH = A, this._$AN = void 0, this.element = t2, this.name = i2, this._$AM = e2, this.options = h2, s2.length > 2 || "" !== s2[0] || "" !== s2[1] ? (this._$AH = Array(s2.length - 1).fill(new String()), this.strings = s2) : this._$AH = A;
163
162
  }
164
- _$AI(e, i = this, t, n) {
165
- const r = this.strings;
166
- let s = !1;
167
- if (r === void 0) e = m(this, e, i, 0), s = !y(e) || e !== this._$AH && e !== b, s && (this._$AH = e);
163
+ _$AI(t2, i2 = this, s2, e2) {
164
+ const h2 = this.strings;
165
+ let o2 = false;
166
+ if (void 0 === h2) t2 = M(this, t2, i2, 0), o2 = !a$1(t2) || t2 !== this._$AH && t2 !== E, o2 && (this._$AH = t2);
168
167
  else {
169
- const d = e;
170
- let o, h;
171
- for (e = r[0], o = 0; o < r.length - 1; o++) h = m(this, d[t + o], i, o), h === b && (h = this._$AH[o]), s ||= !y(h) || h !== this._$AH[o], h === g ? e = g : e !== g && (e += (h ?? "") + r[o + 1]), this._$AH[o] = h;
168
+ const e3 = t2;
169
+ let n2, r2;
170
+ for (t2 = h2[0], n2 = 0; n2 < h2.length - 1; n2++) r2 = M(this, e3[s2 + n2], i2, n2), r2 === E && (r2 = this._$AH[n2]), o2 ||= !a$1(r2) || r2 !== this._$AH[n2], r2 === A ? t2 = A : t2 !== A && (t2 += (r2 ?? "") + h2[n2 + 1]), this._$AH[n2] = r2;
172
171
  }
173
- s && !n && this.j(e);
172
+ o2 && !e2 && this.j(t2);
174
173
  }
175
- j(e) {
176
- e === g ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
174
+ j(t2) {
175
+ t2 === A ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t2 ?? "");
177
176
  }
178
177
  }
179
- class le extends M {
178
+ class I extends H {
180
179
  constructor() {
181
180
  super(...arguments), this.type = 3;
182
181
  }
183
- j(e) {
184
- this.element[this.name] = e === g ? void 0 : e;
182
+ j(t2) {
183
+ this.element[this.name] = t2 === A ? void 0 : t2;
185
184
  }
186
185
  }
187
- class se extends M {
186
+ class L extends H {
188
187
  constructor() {
189
188
  super(...arguments), this.type = 4;
190
189
  }
191
- j(e) {
192
- this.element.toggleAttribute(this.name, !!e && e !== g);
190
+ j(t2) {
191
+ this.element.toggleAttribute(this.name, !!t2 && t2 !== A);
193
192
  }
194
193
  }
195
- class re extends M {
196
- constructor(e, i, t, n, r) {
197
- super(e, i, t, n, r), this.type = 5;
194
+ class z extends H {
195
+ constructor(t2, i2, s2, e2, h2) {
196
+ super(t2, i2, s2, e2, h2), this.type = 5;
198
197
  }
199
- _$AI(e, i = this) {
200
- if ((e = m(this, e, i, 0) ?? g) === b) return;
201
- const t = this._$AH, n = e === g && t !== g || e.capture !== t.capture || e.once !== t.once || e.passive !== t.passive, r = e !== g && (t === g || n);
202
- n && this.element.removeEventListener(this.name, this, t), r && this.element.addEventListener(this.name, this, e), this._$AH = e;
198
+ _$AI(t2, i2 = this) {
199
+ if ((t2 = M(this, t2, i2, 0) ?? A) === E) return;
200
+ const s2 = this._$AH, e2 = t2 === A && s2 !== A || t2.capture !== s2.capture || t2.once !== s2.once || t2.passive !== s2.passive, h2 = t2 !== A && (s2 === A || e2);
201
+ e2 && this.element.removeEventListener(this.name, this, s2), h2 && this.element.addEventListener(this.name, this, t2), this._$AH = t2;
203
202
  }
204
- handleEvent(e) {
205
- typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, e) : this._$AH.handleEvent(e);
203
+ handleEvent(t2) {
204
+ "function" == typeof this._$AH ? this._$AH.call(this.options?.host ?? this.element, t2) : this._$AH.handleEvent(t2);
206
205
  }
207
206
  }
208
- class oe {
209
- constructor(e, i, t) {
210
- this.element = e, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = t;
207
+ class Z {
208
+ constructor(t2, i2, s2) {
209
+ this.element = t2, this.type = 6, this._$AN = void 0, this._$AM = i2, this.options = s2;
211
210
  }
212
211
  get _$AU() {
213
212
  return this._$AM._$AU;
214
213
  }
215
- _$AI(e) {
216
- m(this, e);
214
+ _$AI(t2) {
215
+ M(this, t2);
217
216
  }
218
217
  }
219
- const he = S.litHtmlPolyfillSupport;
220
- he?.(x, C), (S.litHtmlVersions ??= []).push("3.3.2");
221
- const Z = /* @__PURE__ */ Symbol.for(""), ae = (l) => {
222
- if (l?.r === Z) return l?._$litStatic$;
223
- }, ve = (l) => ({ _$litStatic$: l, r: Z }), U = /* @__PURE__ */ new Map(), ge = (l) => (e, ...i) => {
224
- const t = i.length;
225
- let n, r;
226
- const s = [], d = [];
227
- let o, h = 0, v = !1;
228
- for (; h < t; ) {
229
- for (o = e[h]; h < t && (r = i[h], (n = ae(r)) !== void 0); ) o += n + e[++h], v = !0;
230
- h !== t && d.push(r), s.push(o), h++;
231
- }
232
- if (h === t && s.push(e[t]), v) {
233
- const a = s.join("$$lit$$");
234
- (e = U.get(a)) === void 0 && (s.raw = s, U.set(a, e = s)), i = d;
235
- }
236
- return l(e, ...i);
237
- }, de = ge(te);
238
- var ce = Object.defineProperty, $e = Object.getOwnPropertyDescriptor, F = (l, e, i, t) => {
239
- for (var n = t > 1 ? void 0 : t ? $e(e, i) : e, r = l.length - 1, s; r >= 0; r--)
240
- (s = l[r]) && (n = (t ? s(e, i, n) : s(n)) || n);
241
- return t && n && ce(e, i, n), n;
218
+ const B = t.litHtmlPolyfillSupport;
219
+ B?.(S, k), (t.litHtmlVersions ??= []).push("3.3.2");
220
+ const a = /* @__PURE__ */ Symbol.for(""), o = (t2) => {
221
+ if (t2?.r === a) return t2?._$litStatic$;
222
+ }, s = (t2) => ({ _$litStatic$: t2, r: a }), l = /* @__PURE__ */ new Map(), n = (t2) => (r2, ...e2) => {
223
+ const a2 = e2.length;
224
+ let s2, i2;
225
+ const n2 = [], u2 = [];
226
+ let c2, $2 = 0, f2 = false;
227
+ for (; $2 < a2; ) {
228
+ for (c2 = r2[$2]; $2 < a2 && void 0 !== (i2 = e2[$2], s2 = o(i2)); ) c2 += s2 + r2[++$2], f2 = true;
229
+ $2 !== a2 && u2.push(i2), n2.push(c2), $2++;
230
+ }
231
+ if ($2 === a2 && n2.push(r2[a2]), f2) {
232
+ const t3 = n2.join("$$lit$$");
233
+ void 0 === (r2 = l.get(t3)) && (n2.raw = n2, l.set(t3, r2 = n2)), e2 = u2;
234
+ }
235
+ return t2(r2, ...e2);
236
+ }, u = n(b);
237
+ var __defProp = Object.defineProperty;
238
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
239
+ var __decorateClass = (decorators, target, key, kind) => {
240
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
241
+ for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
242
+ if (decorator = decorators[i2])
243
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
244
+ if (kind && result) __defProp(target, key, result);
245
+ return result;
242
246
  };
243
- const fe = "clippy-heading";
244
- let k = class extends J {
247
+ const tag = "clippy-heading";
248
+ let ClippyHeading = class extends LitElement {
245
249
  constructor() {
246
- super(...arguments), this.level = 1;
250
+ super(...arguments);
251
+ this.level = 1;
247
252
  }
248
253
  render() {
249
- const l = Math.min(6, Math.max(1, Number(this.level) || 1)), e = ve(`h${l}`);
250
- return de`<${e} class="nl-heading nl-heading--level-${l}"><slot></slot></${e}>`;
254
+ const safeLevel = Math.min(6, Math.max(1, Number(this.level) || 1));
255
+ const tag2 = s(`h${safeLevel}`);
256
+ return u`<${tag2} class="nl-heading nl-heading--level-${safeLevel}"><slot></slot></${tag2}>`;
251
257
  }
252
258
  };
253
- k.styles = [G(Q)];
254
- F([
255
- K({ type: Number })
256
- ], k.prototype, "level", 2);
257
- k = F([
258
- q(fe)
259
- ], k);
259
+ ClippyHeading.styles = [unsafeCSS(headingCss)];
260
+ __decorateClass([
261
+ property({ type: Number })
262
+ ], ClippyHeading.prototype, "level", 2);
263
+ ClippyHeading = __decorateClass([
264
+ safeCustomElement(tag)
265
+ ], ClippyHeading);
260
266
  export {
261
- k as ClippyHeading
267
+ ClippyHeading
262
268
  };
@@ -1,7 +1,7 @@
1
- import { s as d } from "../decorators-BGpMqJ7V.js";
2
- import { css as h, LitElement as c, html as m } from "lit";
3
- import { query as b } from "lit/decorators.js";
4
- const p = h`
1
+ import { s as safeCustomElement } from "../decorators-Cq82_-g_.js";
2
+ import { css, LitElement, html } from "lit";
3
+ import { query } from "lit/decorators.js";
4
+ const styles = css`
5
5
  :host {
6
6
  cursor: default;
7
7
  forced-color-adjust: none;
@@ -12,39 +12,59 @@ const p = h`
12
12
  display: none;
13
13
  }
14
14
  `;
15
- var u = Object.defineProperty, v = Object.getOwnPropertyDescriptor, n = (a, t, o, s) => {
16
- for (var e = s > 1 ? void 0 : s ? v(t, o) : t, i = a.length - 1, r; i >= 0; i--)
17
- (r = a[i]) && (e = (s ? r(t, o, e) : r(e)) || e);
18
- return s && e && u(t, o, e), e;
15
+ var __defProp = Object.defineProperty;
16
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
17
+ var __decorateClass = (decorators, target, key, kind) => {
18
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
19
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
20
+ if (decorator = decorators[i])
21
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
22
+ if (kind && result) __defProp(target, key, result);
23
+ return result;
19
24
  };
20
- let g = 0;
21
- const f = "clippy-html-image";
22
- let l = class extends c {
25
+ let labelCounter = 0;
26
+ const tag = "clippy-html-image";
27
+ let ClippyHtmlImage = class extends LitElement {
23
28
  constructor() {
24
- super(...arguments), this.labelId = `clippy-html-image-label-${++g}`, this.onLabelSlotChange = () => {
29
+ super(...arguments);
30
+ this.labelId = `clippy-html-image-label-${++labelCounter}`;
31
+ this.onLabelSlotChange = () => {
25
32
  this.updateLabelledBy();
26
33
  };
27
34
  }
28
35
  connectedCallback() {
29
- super.connectedCallback(), this.observer = new MutationObserver(() => {
36
+ super.connectedCallback();
37
+ this.observer = new MutationObserver(() => {
30
38
  this.updateLabelledBy();
31
- }), this.observer.observe(this, {
32
- childList: !0,
33
- subtree: !0
39
+ });
40
+ this.observer.observe(this, {
41
+ childList: true,
42
+ subtree: true
34
43
  });
35
44
  }
36
45
  updated() {
37
- this.updateLabelledBy(), this.labelSlot && this.labelSlot.addEventListener("slotchange", this.onLabelSlotChange);
46
+ this.updateLabelledBy();
47
+ if (this.labelSlot) {
48
+ this.labelSlot.addEventListener("slotchange", this.onLabelSlotChange);
49
+ }
38
50
  }
39
51
  disconnectedCallback() {
40
- super.disconnectedCallback(), this.observer?.disconnect(), this.labelSlot?.removeEventListener("slotchange", this.onLabelSlotChange);
52
+ super.disconnectedCallback();
53
+ this.observer?.disconnect();
54
+ this.labelSlot?.removeEventListener("slotchange", this.onLabelSlotChange);
41
55
  }
42
56
  updateLabelledBy() {
43
57
  if (!this.labelSlot || !this.imgDiv) return;
44
- this.labelSlot.assignedNodes({ flatten: !0 }).length > 0 ? this.imgDiv.setAttribute("aria-labelledby", this.labelId) : this.imgDiv.removeAttribute("aria-labelledby");
58
+ const nodes = this.labelSlot.assignedNodes({ flatten: true });
59
+ const hasLabel = nodes.length > 0;
60
+ if (hasLabel) {
61
+ this.imgDiv.setAttribute("aria-labelledby", this.labelId);
62
+ } else {
63
+ this.imgDiv.removeAttribute("aria-labelledby");
64
+ }
45
65
  }
46
66
  render() {
47
- return m`<div role="img">
67
+ return html`<div role="img">
48
68
  <div inert>
49
69
  <slot></slot>
50
70
  </div>
@@ -52,16 +72,16 @@ let l = class extends c {
52
72
  <slot id=${this.labelId} name="label" @slotchange=${this.onLabelSlotChange}></slot>`;
53
73
  }
54
74
  };
55
- l.styles = [p];
56
- n([
57
- b('slot[name="label"]')
58
- ], l.prototype, "labelSlot", 2);
59
- n([
60
- b('[role="img"]')
61
- ], l.prototype, "imgDiv", 2);
62
- l = n([
63
- d(f)
64
- ], l);
75
+ ClippyHtmlImage.styles = [styles];
76
+ __decorateClass([
77
+ query('slot[name="label"]')
78
+ ], ClippyHtmlImage.prototype, "labelSlot", 2);
79
+ __decorateClass([
80
+ query('[role="img"]')
81
+ ], ClippyHtmlImage.prototype, "imgDiv", 2);
82
+ ClippyHtmlImage = __decorateClass([
83
+ safeCustomElement(tag)
84
+ ], ClippyHtmlImage);
65
85
  export {
66
- l as ClippyHtmlImage
86
+ ClippyHtmlImage
67
87
  };