next-flow-design 1.5.13 → 1.6.1

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.
@@ -1,7 +1,7 @@
1
1
  import { createComponent as N } from "@lit/react";
2
2
  import T from "react";
3
3
  import { css as C, LitElement as W, html as f } from "lit";
4
- const G = globalThis, ie = G.ShadowRoot && (G.ShadyCSS === void 0 || G.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, xe = /* @__PURE__ */ Symbol(), ue = /* @__PURE__ */ new WeakMap();
4
+ const G = globalThis, se = G.ShadowRoot && (G.ShadyCSS === void 0 || G.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, xe = /* @__PURE__ */ Symbol(), de = /* @__PURE__ */ new WeakMap();
5
5
  let Pe = class {
6
6
  constructor(e, o, r) {
7
7
  if (this._$cssResult$ = !0, r !== xe) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
@@ -10,9 +10,9 @@ let Pe = class {
10
10
  get styleSheet() {
11
11
  let e = this.o;
12
12
  const o = this.t;
13
- if (ie && e === void 0) {
13
+ if (se && e === void 0) {
14
14
  const r = o !== void 0 && o.length === 1;
15
- r && (e = ue.get(o)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), r && ue.set(o, e));
15
+ r && (e = de.get(o)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), r && de.set(o, e));
16
16
  }
17
17
  return e;
18
18
  }
@@ -21,17 +21,17 @@ let Pe = class {
21
21
  }
22
22
  };
23
23
  const Me = (t) => new Pe(typeof t == "string" ? t : t + "", void 0, xe), De = (t, e) => {
24
- if (ie) t.adoptedStyleSheets = e.map((o) => o instanceof CSSStyleSheet ? o : o.styleSheet);
24
+ if (se) t.adoptedStyleSheets = e.map((o) => o instanceof CSSStyleSheet ? o : o.styleSheet);
25
25
  else for (const o of e) {
26
26
  const r = document.createElement("style"), s = G.litNonce;
27
27
  s !== void 0 && r.setAttribute("nonce", s), r.textContent = o.cssText, t.appendChild(r);
28
28
  }
29
- }, pe = ie ? (t) => t : (t) => t instanceof CSSStyleSheet ? ((e) => {
29
+ }, ue = se ? (t) => t : (t) => t instanceof CSSStyleSheet ? ((e) => {
30
30
  let o = "";
31
31
  for (const r of e.cssRules) o += r.cssText;
32
32
  return Me(o);
33
33
  })(t) : t;
34
- const { is: Ne, defineProperty: Te, getOwnPropertyDescriptor: Oe, getOwnPropertyNames: Be, getOwnPropertySymbols: Ve, getPrototypeOf: He } = Object, te = globalThis, fe = te.trustedTypes, Ue = fe ? fe.emptyScript : "", Fe = te.reactiveElementPolyfillSupport, z = (t, e) => t, J = { toAttribute(t, e) {
34
+ const { is: Ne, defineProperty: Te, getOwnPropertyDescriptor: Oe, getOwnPropertyNames: Be, getOwnPropertySymbols: Ve, getPrototypeOf: He } = Object, ee = globalThis, pe = ee.trustedTypes, Ue = pe ? pe.emptyScript : "", Fe = ee.reactiveElementPolyfillSupport, z = (t, e) => t, J = { toAttribute(t, e) {
35
35
  switch (e) {
36
36
  case Boolean:
37
37
  t = t ? Ue : null;
@@ -59,8 +59,8 @@ const { is: Ne, defineProperty: Te, getOwnPropertyDescriptor: Oe, getOwnProperty
59
59
  }
60
60
  }
61
61
  return o;
62
- } }, ne = (t, e) => !Ne(t, e), be = { attribute: !0, type: String, converter: J, reflect: !1, useDefault: !1, hasChanged: ne };
63
- Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), te.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
62
+ } }, ie = (t, e) => !Ne(t, e), fe = { attribute: !0, type: String, converter: J, reflect: !1, useDefault: !1, hasChanged: ie };
63
+ Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), ee.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
64
64
  let V = class extends HTMLElement {
65
65
  static addInitializer(e) {
66
66
  this._$Ei(), (this.l ??= []).push(e);
@@ -68,7 +68,7 @@ let V = class extends HTMLElement {
68
68
  static get observedAttributes() {
69
69
  return this.finalize(), this._$Eh && [...this._$Eh.keys()];
70
70
  }
71
- static createProperty(e, o = be) {
71
+ static createProperty(e, o = fe) {
72
72
  if (o.state && (o.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(e) && ((o = Object.create(o)).wrapped = !0), this.elementProperties.set(e, o), !o.noAccessor) {
73
73
  const r = /* @__PURE__ */ Symbol(), s = this.getPropertyDescriptor(e, r, o);
74
74
  s !== void 0 && Te(this.prototype, e, s);
@@ -86,7 +86,7 @@ let V = class extends HTMLElement {
86
86
  }, configurable: !0, enumerable: !0 };
87
87
  }
88
88
  static getPropertyOptions(e) {
89
- return this.elementProperties.get(e) ?? be;
89
+ return this.elementProperties.get(e) ?? fe;
90
90
  }
91
91
  static _$Ei() {
92
92
  if (this.hasOwnProperty(z("elementProperties"))) return;
@@ -115,8 +115,8 @@ let V = class extends HTMLElement {
115
115
  const o = [];
116
116
  if (Array.isArray(e)) {
117
117
  const r = new Set(e.flat(1 / 0).reverse());
118
- for (const s of r) o.unshift(pe(s));
119
- } else e !== void 0 && o.push(pe(e));
118
+ for (const s of r) o.unshift(ue(s));
119
+ } else e !== void 0 && o.push(ue(e));
120
120
  return o;
121
121
  }
122
122
  static _$Eu(e, o) {
@@ -174,7 +174,7 @@ let V = class extends HTMLElement {
174
174
  requestUpdate(e, o, r, s = !1, i) {
175
175
  if (e !== void 0) {
176
176
  const n = this.constructor;
177
- if (s === !1 && (i = this[e]), r ??= n.getPropertyOptions(e), !((r.hasChanged ?? ne)(i, o) || r.useDefault && r.reflect && i === this._$Ej?.get(e) && !this.hasAttribute(n._$Eu(e, r)))) return;
177
+ if (s === !1 && (i = this[e]), r ??= n.getPropertyOptions(e), !((r.hasChanged ?? ie)(i, o) || r.useDefault && r.reflect && i === this._$Ej?.get(e) && !this.hasAttribute(n._$Eu(e, r)))) return;
178
178
  this.C(e, o, r);
179
179
  }
180
180
  this.isUpdatePending === !1 && (this._$ES = this._$EP());
@@ -242,8 +242,8 @@ let V = class extends HTMLElement {
242
242
  firstUpdated(e) {
243
243
  }
244
244
  };
245
- V.elementStyles = [], V.shadowRootOptions = { mode: "open" }, V[z("elementProperties")] = /* @__PURE__ */ new Map(), V[z("finalized")] = /* @__PURE__ */ new Map(), Fe?.({ ReactiveElement: V }), (te.reactiveElementVersions ??= []).push("2.1.2");
246
- const Le = { attribute: !0, type: String, converter: J, reflect: !1, hasChanged: ne }, Ie = (t = Le, e, o) => {
245
+ V.elementStyles = [], V.shadowRootOptions = { mode: "open" }, V[z("elementProperties")] = /* @__PURE__ */ new Map(), V[z("finalized")] = /* @__PURE__ */ new Map(), Fe?.({ ReactiveElement: V }), (ee.reactiveElementVersions ??= []).push("2.1.2");
246
+ const Le = { attribute: !0, type: String, converter: J, reflect: !1, hasChanged: ie }, Ie = (t = Le, e, o) => {
247
247
  const { kind: r, metadata: s } = o;
248
248
  let i = globalThis.litPropertyMetadata.get(s);
249
249
  if (i === void 0 && globalThis.litPropertyMetadata.set(s, i = /* @__PURE__ */ new Map()), r === "setter" && ((t = Object.create(t)).wrapped = !0), i.set(o.name, t), r === "accessor") {
@@ -375,8 +375,8 @@ async function qe(t) {
375
375
  return new Promise((e) => setTimeout(e, t));
376
376
  }
377
377
  const We = C`:host{width:var(--nf-width);-webkit-user-select:none;user-select:none;cursor:pointer}:host .text{flex-grow:1;display:inline-block;outline:0;white-space:nowrap}:host .icon{width:1.5rem;height:1.5rem;display:inline-block;fill:none;stroke:var(--nf-select-icon-color);stroke-width:1;stroke-linecap:round;margin:0 -.3rem 0 .5rem}:host .dropdown{position:absolute;top:2rem;right:0;left:0;padding:.3rem;background:var(--nf-dropdown-background);-webkit-backdrop-filter:blur(32px);backdrop-filter:blur(32px);border-radius:.5rem;opacity:0;pointer-events:none;color:var(--nf-color);box-shadow:0 0 1rem 0 var(--nf-dropdown-shadow);z-index:1000;transition:opacity var(--nf-transition) ease-out,transform var(--nf-transition) ease-out}:host .dropdown .item{white-space:nowrap;padding:.4rem .7rem;overflow:hidden;text-overflow:ellipsis;border-radius:.3rem;cursor:pointer}:host .dropdown .item-unselected:hover{background:var(--nf-item-background-hover);transition:background-color var(--nf-transition) ease-in-out}:host .dropdown .item-unselected:active{background:var(--nf-item-background-active)}:host .dropdown .item-selected{background-color:color-mix(in srgb,var(--nf-primary-color) 30%,transparent)}:host([disabled]){cursor:not-allowed}:host([disabled]) .text{color:var(--nf-color-disabled)}:host([disabled]) .icon{stroke:var(--nf-color-disabled)}:host([disabled]) .dropdown{display:none}:host(:focus:not([disabled])){color:var(--nf-focus-text-color)}:host(:focus:not([disabled])) .dropdown{transform:translateY(.5rem);opacity:1;pointer-events:auto}:host(:focus:not([disabled])) .cover{pointer-events:auto}`;
378
- var Ke = Object.defineProperty, Ze = Object.getOwnPropertyDescriptor, Z = (t, e, o, r) => {
379
- for (var s = r > 1 ? void 0 : r ? Ze(e, o) : e, i = t.length - 1, n; i >= 0; i--)
378
+ var Ke = Object.defineProperty, Ye = Object.getOwnPropertyDescriptor, Y = (t, e, o, r) => {
379
+ for (var s = r > 1 ? void 0 : r ? Ye(e, o) : e, i = t.length - 1, n; i >= 0; i--)
380
380
  (n = t[i]) && (s = (r ? n(e, o, s) : n(s)) || s);
381
381
  return r && s && Ke(e, o, s), s;
382
382
  };
@@ -417,10 +417,10 @@ let A = class extends W {
417
417
  }
418
418
  };
419
419
  A.styles = [K, We];
420
- Z([
420
+ Y([
421
421
  h({ type: String })
422
422
  ], A.prototype, "value", 2);
423
- Z([
423
+ Y([
424
424
  h({
425
425
  type: Array,
426
426
  converter: (t) => {
@@ -436,13 +436,13 @@ Z([
436
436
  }
437
437
  })
438
438
  ], A.prototype, "options", 2);
439
- Z([
439
+ Y([
440
440
  h({ type: Boolean, reflect: !0 })
441
441
  ], A.prototype, "disabled", 2);
442
- Z([
442
+ Y([
443
443
  w()
444
444
  ], A.prototype, "showDropdown", 2);
445
- A = Z([
445
+ A = Y([
446
446
  O("nf-select")
447
447
  ], A);
448
448
  const Tt = N({
@@ -454,12 +454,12 @@ const Tt = N({
454
454
  onChange: "change"
455
455
  }
456
456
  });
457
- const ae = globalThis, me = (t) => t, Q = ae.trustedTypes, ge = Q ? Q.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, ke = "$lit$", E = `lit$${Math.random().toFixed(9).slice(2)}$`, Ee = "?" + E, Ye = `<${Ee}>`, M = document, j = () => M.createComment(""), R = (t) => t === null || typeof t != "object" && typeof t != "function", le = Array.isArray, Xe = (t) => le(t) || typeof t?.[Symbol.iterator] == "function", re = `[
458
- \f\r]`, I = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ve = /-->/g, _e = />/g, S = RegExp(`>|${re}(?:([^\\s"'>=/]+)(${re}*=${re}*(?:[^
459
- \f\r"'\`<>=]|("|')|))|$)`, "g"), ye = /'/g, we = /"/g, Ae = /^(?:script|style|textarea|title)$/i, Ge = (t) => (e, ...o) => ({ _$litType$: t, strings: e, values: o }), se = Ge(1), D = /* @__PURE__ */ Symbol.for("lit-noChange"), b = /* @__PURE__ */ Symbol.for("lit-nothing"), $e = /* @__PURE__ */ new WeakMap(), P = M.createTreeWalker(M, 129);
457
+ const ne = globalThis, be = (t) => t, Q = ne.trustedTypes, me = Q ? Q.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, ke = "$lit$", E = `lit$${Math.random().toFixed(9).slice(2)}$`, Ee = "?" + E, Ze = `<${Ee}>`, M = document, j = () => M.createComment(""), R = (t) => t === null || typeof t != "object" && typeof t != "function", ae = Array.isArray, Xe = (t) => ae(t) || typeof t?.[Symbol.iterator] == "function", oe = `[
458
+ \f\r]`, I = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ge = /-->/g, ve = />/g, S = RegExp(`>|${oe}(?:([^\\s"'>=/]+)(${oe}*=${oe}*(?:[^
459
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), _e = /'/g, ye = /"/g, Ae = /^(?:script|style|textarea|title)$/i, Ge = (t) => (e, ...o) => ({ _$litType$: t, strings: e, values: o }), re = Ge(1), D = /* @__PURE__ */ Symbol.for("lit-noChange"), m = /* @__PURE__ */ Symbol.for("lit-nothing"), we = /* @__PURE__ */ new WeakMap(), P = M.createTreeWalker(M, 129);
460
460
  function Ce(t, e) {
461
- if (!le(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
462
- return ge !== void 0 ? ge.createHTML(e) : e;
461
+ if (!ae(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
462
+ return me !== void 0 ? me.createHTML(e) : e;
463
463
  }
464
464
  const Je = (t, e) => {
465
465
  const o = t.length - 1, r = [];
@@ -467,9 +467,9 @@ const Je = (t, e) => {
467
467
  for (let l = 0; l < o; l++) {
468
468
  const a = t[l];
469
469
  let c, p, d = -1, x = 0;
470
- for (; x < a.length && (n.lastIndex = x, p = n.exec(a), p !== null); ) x = n.lastIndex, n === I ? p[1] === "!--" ? n = ve : p[1] !== void 0 ? n = _e : p[2] !== void 0 ? (Ae.test(p[2]) && (s = RegExp("</" + p[2], "g")), n = S) : p[3] !== void 0 && (n = S) : n === S ? p[0] === ">" ? (n = s ?? I, d = -1) : p[1] === void 0 ? d = -2 : (d = n.lastIndex - p[2].length, c = p[1], n = p[3] === void 0 ? S : p[3] === '"' ? we : ye) : n === we || n === ye ? n = S : n === ve || n === _e ? n = I : (n = S, s = void 0);
470
+ for (; x < a.length && (n.lastIndex = x, p = n.exec(a), p !== null); ) x = n.lastIndex, n === I ? p[1] === "!--" ? n = ge : p[1] !== void 0 ? n = ve : p[2] !== void 0 ? (Ae.test(p[2]) && (s = RegExp("</" + p[2], "g")), n = S) : p[3] !== void 0 && (n = S) : n === S ? p[0] === ">" ? (n = s ?? I, d = -1) : p[1] === void 0 ? d = -2 : (d = n.lastIndex - p[2].length, c = p[1], n = p[3] === void 0 ? S : p[3] === '"' ? ye : _e) : n === ye || n === _e ? n = S : n === ge || n === ve ? n = I : (n = S, s = void 0);
471
471
  const k = n === S && t[l + 1].startsWith("/>") ? " " : "";
472
- i += n === I ? a + Ye : d >= 0 ? (r.push(c), a.slice(0, d) + ke + a.slice(d) + E + k) : a + E + (d === -2 ? l : k);
472
+ i += n === I ? a + Ze : d >= 0 ? (r.push(c), a.slice(0, d) + ke + a.slice(d) + E + k) : a + E + (d === -2 ? l : k);
473
473
  }
474
474
  return [Ce(t, i + (t[o] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), r];
475
475
  };
@@ -487,7 +487,7 @@ class q {
487
487
  if (s.nodeType === 1) {
488
488
  if (s.hasAttributes()) for (const d of s.getAttributeNames()) if (d.endsWith(ke)) {
489
489
  const x = p[n++], k = s.getAttribute(d).split(E), X = /([.?@])?(.*)/.exec(x);
490
- a.push({ type: 1, index: i, name: X[2], strings: k, ctor: X[1] === "." ? et : X[1] === "?" ? tt : X[1] === "@" ? ot : oe }), s.removeAttribute(d);
490
+ a.push({ type: 1, index: i, name: X[2], strings: k, ctor: X[1] === "." ? et : X[1] === "?" ? tt : X[1] === "@" ? ot : te }), s.removeAttribute(d);
491
491
  } else d.startsWith(E) && (a.push({ type: 6, index: i }), s.removeAttribute(d));
492
492
  if (Ae.test(s.tagName)) {
493
493
  const d = s.textContent.split(E), x = d.length - 1;
@@ -533,7 +533,7 @@ class Qe {
533
533
  for (; a !== void 0; ) {
534
534
  if (n === a.index) {
535
535
  let c;
536
- a.type === 2 ? c = new Y(i, i.nextSibling, this, e) : a.type === 1 ? c = new a.ctor(i, a.name, a.strings, this, e) : a.type === 6 && (c = new rt(i, this, e)), this._$AV.push(c), a = r[++l];
536
+ a.type === 2 ? c = new Z(i, i.nextSibling, this, e) : a.type === 1 ? c = new a.ctor(i, a.name, a.strings, this, e) : a.type === 6 && (c = new rt(i, this, e)), this._$AV.push(c), a = r[++l];
537
537
  }
538
538
  n !== a?.index && (i = P.nextNode(), n++);
539
539
  }
@@ -544,12 +544,12 @@ class Qe {
544
544
  for (const r of this._$AV) r !== void 0 && (r.strings !== void 0 ? (r._$AI(e, r, o), o += r.strings.length - 2) : r._$AI(e[o])), o++;
545
545
  }
546
546
  }
547
- class Y {
547
+ class Z {
548
548
  get _$AU() {
549
549
  return this._$AM?._$AU ?? this._$Cv;
550
550
  }
551
551
  constructor(e, o, r, s) {
552
- this.type = 2, this._$AH = b, this._$AN = void 0, this._$AA = e, this._$AB = o, this._$AM = r, this.options = s, this._$Cv = s?.isConnected ?? !0;
552
+ this.type = 2, this._$AH = m, this._$AN = void 0, this._$AA = e, this._$AB = o, this._$AM = r, this.options = s, this._$Cv = s?.isConnected ?? !0;
553
553
  }
554
554
  get parentNode() {
555
555
  let e = this._$AA.parentNode;
@@ -563,7 +563,7 @@ class Y {
563
563
  return this._$AB;
564
564
  }
565
565
  _$AI(e, o = this) {
566
- e = U(this, e, o), R(e) ? e === b || e == null || e === "" ? (this._$AH !== b && this._$AR(), this._$AH = b) : e !== this._$AH && e !== D && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Xe(e) ? this.k(e) : this._(e);
566
+ e = U(this, e, o), R(e) ? e === m || e == null || e === "" ? (this._$AH !== m && this._$AR(), this._$AH = m) : e !== this._$AH && e !== D && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Xe(e) ? this.k(e) : this._(e);
567
567
  }
568
568
  O(e) {
569
569
  return this._$AA.parentNode.insertBefore(e, this._$AB);
@@ -572,7 +572,7 @@ class Y {
572
572
  this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
573
573
  }
574
574
  _(e) {
575
- this._$AH !== b && R(this._$AH) ? this._$AA.nextSibling.data = e : this.T(M.createTextNode(e)), this._$AH = e;
575
+ this._$AH !== m && R(this._$AH) ? this._$AA.nextSibling.data = e : this.T(M.createTextNode(e)), this._$AH = e;
576
576
  }
577
577
  $(e) {
578
578
  const { values: o, _$litType$: r } = e, s = typeof r == "number" ? this._$AC(e) : (r.el === void 0 && (r.el = q.createElement(Ce(r.h, r.h[0]), this.options)), r);
@@ -583,27 +583,27 @@ class Y {
583
583
  }
584
584
  }
585
585
  _$AC(e) {
586
- let o = $e.get(e.strings);
587
- return o === void 0 && $e.set(e.strings, o = new q(e)), o;
586
+ let o = we.get(e.strings);
587
+ return o === void 0 && we.set(e.strings, o = new q(e)), o;
588
588
  }
589
589
  k(e) {
590
- le(this._$AH) || (this._$AH = [], this._$AR());
590
+ ae(this._$AH) || (this._$AH = [], this._$AR());
591
591
  const o = this._$AH;
592
592
  let r, s = 0;
593
- for (const i of e) s === o.length ? o.push(r = new Y(this.O(j()), this.O(j()), this, this.options)) : r = o[s], r._$AI(i), s++;
593
+ for (const i of e) s === o.length ? o.push(r = new Z(this.O(j()), this.O(j()), this, this.options)) : r = o[s], r._$AI(i), s++;
594
594
  s < o.length && (this._$AR(r && r._$AB.nextSibling, s), o.length = s);
595
595
  }
596
596
  _$AR(e = this._$AA.nextSibling, o) {
597
597
  for (this._$AP?.(!1, !0, o); e !== this._$AB; ) {
598
- const r = me(e).nextSibling;
599
- me(e).remove(), e = r;
598
+ const r = be(e).nextSibling;
599
+ be(e).remove(), e = r;
600
600
  }
601
601
  }
602
602
  setConnected(e) {
603
603
  this._$AM === void 0 && (this._$Cv = e, this._$AP?.(e));
604
604
  }
605
605
  }
606
- class oe {
606
+ class te {
607
607
  get tagName() {
608
608
  return this.element.tagName;
609
609
  }
@@ -611,7 +611,7 @@ class oe {
611
611
  return this._$AM._$AU;
612
612
  }
613
613
  constructor(e, o, r, s, i) {
614
- this.type = 1, this._$AH = b, this._$AN = void 0, this.element = e, this.name = o, this._$AM = s, this.options = i, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = b;
614
+ this.type = 1, this._$AH = m, this._$AN = void 0, this.element = e, this.name = o, this._$AM = s, this.options = i, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = m;
615
615
  }
616
616
  _$AI(e, o = this, r, s) {
617
617
  const i = this.strings;
@@ -620,37 +620,37 @@ class oe {
620
620
  else {
621
621
  const l = e;
622
622
  let a, c;
623
- for (e = i[0], a = 0; a < i.length - 1; a++) c = U(this, l[r + a], o, a), c === D && (c = this._$AH[a]), n ||= !R(c) || c !== this._$AH[a], c === b ? e = b : e !== b && (e += (c ?? "") + i[a + 1]), this._$AH[a] = c;
623
+ for (e = i[0], a = 0; a < i.length - 1; a++) c = U(this, l[r + a], o, a), c === D && (c = this._$AH[a]), n ||= !R(c) || c !== this._$AH[a], c === m ? e = m : e !== m && (e += (c ?? "") + i[a + 1]), this._$AH[a] = c;
624
624
  }
625
625
  n && !s && this.j(e);
626
626
  }
627
627
  j(e) {
628
- e === b ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
628
+ e === m ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
629
629
  }
630
630
  }
631
- class et extends oe {
631
+ class et extends te {
632
632
  constructor() {
633
633
  super(...arguments), this.type = 3;
634
634
  }
635
635
  j(e) {
636
- this.element[this.name] = e === b ? void 0 : e;
636
+ this.element[this.name] = e === m ? void 0 : e;
637
637
  }
638
638
  }
639
- class tt extends oe {
639
+ class tt extends te {
640
640
  constructor() {
641
641
  super(...arguments), this.type = 4;
642
642
  }
643
643
  j(e) {
644
- this.element.toggleAttribute(this.name, !!e && e !== b);
644
+ this.element.toggleAttribute(this.name, !!e && e !== m);
645
645
  }
646
646
  }
647
- class ot extends oe {
647
+ class ot extends te {
648
648
  constructor(e, o, r, s, i) {
649
649
  super(e, o, r, s, i), this.type = 5;
650
650
  }
651
651
  _$AI(e, o = this) {
652
- if ((e = U(this, e, o, 0) ?? b) === D) return;
653
- const r = this._$AH, s = e === b && r !== b || e.capture !== r.capture || e.once !== r.once || e.passive !== r.passive, i = e !== b && (r === b || s);
652
+ if ((e = U(this, e, o, 0) ?? m) === D) return;
653
+ const r = this._$AH, s = e === m && r !== m || e.capture !== r.capture || e.once !== r.once || e.passive !== r.passive, i = e !== m && (r === m || s);
654
654
  s && this.element.removeEventListener(this.name, this, r), i && this.element.addEventListener(this.name, this, e), this._$AH = e;
655
655
  }
656
656
  handleEvent(e) {
@@ -668,18 +668,18 @@ class rt {
668
668
  U(this, e);
669
669
  }
670
670
  }
671
- const st = ae.litHtmlPolyfillSupport;
672
- st?.(q, Y), (ae.litHtmlVersions ??= []).push("3.3.2");
671
+ const st = ne.litHtmlPolyfillSupport;
672
+ st?.(q, Z), (ne.litHtmlVersions ??= []).push("3.3.2");
673
673
  const it = (t, e, o) => {
674
674
  const r = o?.renderBefore ?? e;
675
675
  let s = r._$litPart$;
676
676
  if (s === void 0) {
677
677
  const i = o?.renderBefore ?? null;
678
- r._$litPart$ = s = new Y(e.insertBefore(j(), i), i, void 0, o ?? {});
678
+ r._$litPart$ = s = new Z(e.insertBefore(j(), i), i, void 0, o ?? {});
679
679
  }
680
680
  return s._$AI(t), s;
681
681
  };
682
- const he = globalThis;
682
+ const le = globalThis;
683
683
  let H = class extends V {
684
684
  constructor() {
685
685
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
@@ -702,12 +702,12 @@ let H = class extends V {
702
702
  return D;
703
703
  }
704
704
  };
705
- H._$litElement$ = !0, H.finalized = !0, he.litElementHydrateSupport?.({ LitElement: H });
706
- const nt = he.litElementPolyfillSupport;
705
+ H._$litElement$ = !0, H.finalized = !0, le.litElementHydrateSupport?.({ LitElement: H });
706
+ const nt = le.litElementPolyfillSupport;
707
707
  nt?.({ LitElement: H });
708
- (he.litElementVersions ??= []).push("4.2.2");
708
+ (le.litElementVersions ??= []).push("4.2.2");
709
709
  const at = C`:host{display:inline-flex;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none;outline:0;--nf-switch-padding:.1rem}:host[disabled]{cursor:not-allowed;opacity:.6}.switch-wrapper{position:relative;display:inline-block}.switch-container{position:relative;z-index:1;width:3.1rem;height:1.5rem;background-color:var(--nf-background-color);border-radius:.75rem;transition:background-color .2s ease;overflow:hidden}:host(:not([disabled]):not([checked])) .switch-container:hover{background:var(--nf-background-color-hover)}:host([checked]) .switch-container{background-color:var(--nf-primary-color,var(--nf-primary-color))}:host([disabled]) .switch-container{opacity:.5}.ripple{position:absolute;border-radius:.875rem;inset:-.2rem;background-color:#6464641a;animation:ripple-animation 1s ease-out forwards;pointer-events:none;opacity:1}@keyframes ripple-animation{0%{opacity:0}20%{opacity:1}to{opacity:0}}.switch-thumb{position:absolute;top:.125rem;left:0;width:1.25rem;height:1.25rem;transition:transform .2s ease-in-out}.switch-thumb:before{content:\"\";position:absolute;top:0;left:0;width:1.25rem;height:1.25rem;background-color:#fff;border-radius:.625rem;box-shadow:0 .125rem .25rem #0003;transition:width .2s ease-in-out,transform .2s ease-in-out}:host(:not([checked])) .switch-thumb{transform:translate(.125rem)}:host(:not([checked])) .switch-container:active .switch-thumb:before{width:1.625rem;border-radius:.625rem}:host([checked]) .switch-thumb{transform:translate(1.725rem)}:host([checked]) .switch-container:active .switch-thumb:before{width:1.625rem;border-radius:.625rem;transform:translate(-.375rem)}:host(:focus) .switch-container{outline:.125rem solid var(--nf-primary-color,var(--nf-primary-color));outline-offset:.125rem}`;
710
- var lt = Object.defineProperty, ht = Object.getOwnPropertyDescriptor, ce = (t, e, o, r) => {
710
+ var lt = Object.defineProperty, ht = Object.getOwnPropertyDescriptor, he = (t, e, o, r) => {
711
711
  for (var s = r > 1 ? void 0 : r ? ht(e, o) : e, i = t.length - 1, n; i >= 0; i--)
712
712
  (n = t[i]) && (s = (r ? n(e, o, s) : n(s)) || s);
713
713
  return r && s && lt(e, o, s), s;
@@ -738,7 +738,7 @@ let F = class extends H {
738
738
  }
739
739
  // 渲染开关组件
740
740
  render() {
741
- return se`<div class=switch-wrapper><div class=switch-container @click=${this.toggleSwitch} aria-checked=${this.checked} aria-disabled=${this.disabled} role=switch><div class=switch-thumb></div></div></div>`;
741
+ return re`<div class=switch-wrapper><div class=switch-container @click=${this.toggleSwitch} aria-checked=${this.checked} aria-disabled=${this.disabled} role=switch><div class=switch-thumb></div></div></div>`;
742
742
  }
743
743
  connectedCallback() {
744
744
  this.style.transition = "none", super.connectedCallback(), requestAnimationFrame(() => {
@@ -747,13 +747,13 @@ let F = class extends H {
747
747
  }
748
748
  };
749
749
  F.styles = [at];
750
- ce([
750
+ he([
751
751
  h({ type: Boolean, reflect: !0 })
752
752
  ], F.prototype, "checked", 2);
753
- ce([
753
+ he([
754
754
  h({ type: Boolean, reflect: !0 })
755
755
  ], F.prototype, "disabled", 2);
756
- F = ce([
756
+ F = he([
757
757
  O("nf-switch")
758
758
  ], F);
759
759
  const Bt = N({
@@ -763,8 +763,8 @@ const Bt = N({
763
763
  events: {
764
764
  onChange: "change"
765
765
  }
766
- }), ct = C`:host{width:10rem;position:relative;display:inline-flex;align-items:center;box-sizing:border-box;padding:0;overflow:hidden;--nf-input-number-color:var(--nf-color);--nf-input-number-prefix-color:color-mix(in srgb, var(--nf-color), transparent 20%);--nf-input-number-surfix-color:color-mix(in srgb, var(--nf-color), transparent 20%)}.input-number{position:relative;padding-right:.6125rem;flex:1;height:100%;outline:0;border:none;background:0 0;box-sizing:border-box;color:var(--nf-input-number-color);font-weight:var(--nf-font-weight);text-align:left;transition:padding-right var(--nf-transition-fast) ease}.input-number .input-number-input-wrapper{height:100%}.input-number .input-number-input-wrapper .input-number-input{background:0 0;width:100%;height:100%;text-align:start;border:0;outline:0;padding:0;box-sizing:border-box;color:var(--nf-input-number-color);font-size:var(--nf-font-size);font-weight:var(--nf-font-weight);font-family:var(--nf-font-family),sans-serif}.input-number::-webkit-inner-spin-button,.input-number::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.input-number[type=number]{appearance:textfield}:host([controls]) .input-number:hover{padding-right:1.5rem}:host([controls]) .input-number:hover .controls{width:1.5rem}:host([center]) .input-number{padding-left:1.5rem!important;padding-right:1.5rem!important}:host([center]) .input-number .input-number-input{text-align:center}:host([center]) .input-number:hover{padding-left:1.5rem!important;padding-right:1.5rem!important}:host([center]) .input-prefix{position:absolute;left:0;top:0;bottom:0;z-index:1;pointer-events:none}:host([center]) .input-suffix{position:absolute;right:0;top:0;bottom:0;z-index:1;pointer-events:none}:host([center]) .input-number{flex:1;width:100%}.input-prefix{display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding-inline-start:.6125rem;color:var(--nf-input-number-prefix-color);font-size:var(--nf-font-size);pointer-events:none;-webkit-user-select:none;user-select:none}.input-prefix:not(:empty){padding-inline-end:.25rem}.input-suffix{display:flex;align-items:center;justify-content:center;color:var(--nf-input-number-surfix-color);font-size:var(--nf-font-size);pointer-events:none;-webkit-user-select:none;user-select:none}.input-suffix:not(:empty){padding-inline-end:.6125rem;padding-inline-start:.5rem}.controls{position:absolute;top:0;right:0;height:100%;width:0;overflow:hidden;display:flex;flex-direction:column;box-sizing:border-box;transition:width var(--nf-transition-fast) ease}.controls:before{content:\"\";position:absolute;left:0;top:0;bottom:0;width:.67px;background-color:var(--nf-control-divider-color)}:host([suffix]) .controls:after{content:\"\";position:absolute;right:0;top:0;bottom:0;width:.67px;background-color:var(--nf-control-divider-color)}.control-btn{flex:1;display:flex;align-items:center;justify-content:center;background:0 0;border:none;cursor:pointer;transition:background-color var(--nf-transition-fast) ease;outline:0;-webkit-user-select:none;user-select:none}.control-btn:hover{background-color:var(--nf-control-btn-background-hover)}.control-btn:active{background-color:var(--nf-control-btn-background-active)}.control-btn:focus-visible{background-color:var(--nf-control-btn-background-hover)}.control-btn svg{display:block;pointer-events:none;fill:none;stroke:var(--nf-select-icon-color);stroke-width:1;stroke-linecap:round}.control-btn-up{border-bottom:.67px solid var(--nf-control-divider-color)}:host(:not([suffix])) .control-btn-up{border-top-right-radius:var(--nf-border-radius)}:host(:not([suffix])) .control-btn-down{border-bottom-right-radius:var(--nf-border-radius)}:host([disabled]) .input-number-input{cursor:not-allowed;color:var(--nf-color-disabled)}:host([disabled]) .input-prefix,:host([disabled]) .input-suffix{color:var(--nf-color-disabled)}:host([disabled]) .controls{display:none}:host([disabled]) .control-btn{cursor:not-allowed;pointer-events:none;opacity:.5}`;
767
- var dt = Object.defineProperty, ut = Object.getOwnPropertyDescriptor, m = (t, e, o, r) => {
766
+ }), ct = C`:host{width:10rem;position:relative;display:inline-flex;align-items:center;box-sizing:border-box;padding:0;overflow:hidden;--nf-input-number-color:var(--nf-color);--nf-input-number-prefix-color:color-mix(in srgb, var(--nf-color), transparent 20%);--nf-input-number-surfix-color:color-mix(in srgb, var(--nf-color), transparent 20%)}.input-number{position:relative;padding-right:.6125rem;flex:1;height:100%;outline:0;border:none;background:0 0;box-sizing:border-box;color:var(--nf-input-number-color);font-weight:var(--nf-font-weight);text-align:left;transition:padding-right var(--nf-transition-fast) ease}.input-number .input-number-input-wrapper{height:100%;position:relative;display:flex;align-items:center}.input-number .input-number-input-wrapper .input-number-input{background:0 0;width:100%;height:100%;text-align:start;border:0;outline:0;padding:0;box-sizing:border-box;color:var(--nf-input-number-color);font-size:var(--nf-font-size);font-weight:var(--nf-font-weight);font-family:var(--nf-font-family),sans-serif}.input-number .input-number-input-wrapper .input-unit{position:absolute;right:0;top:50%;transform:translateY(-50%);color:var(--nf-input-number-surfix-color);font-size:var(--nf-font-size);pointer-events:none;-webkit-user-select:none;user-select:none;padding-right:.25rem}.input-number::-webkit-inner-spin-button,.input-number::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.input-number[type=number]{appearance:textfield}:host([unit]) .input-number-input{padding-right:2rem}:host([controls]) .input-number:hover{padding-right:1.5rem}:host([controls]) .input-number:hover .controls{width:1.5rem}:host([center]) .input-number{padding-left:1.5rem!important;padding-right:1.5rem!important}:host([center]) .input-number .input-number-input{text-align:center}:host([center]) .input-number:hover{padding-left:1.5rem!important;padding-right:1.5rem!important}:host([center]) .input-prefix{position:absolute;left:0;top:0;bottom:0;z-index:1;pointer-events:none}:host([center]) .input-suffix{position:absolute;right:0;top:0;bottom:0;z-index:1;pointer-events:none}:host([center]) .input-number{flex:1;width:100%}.input-prefix{display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding-inline-start:.6125rem;color:var(--nf-input-number-prefix-color);font-size:var(--nf-font-size);pointer-events:none;-webkit-user-select:none;user-select:none}.input-prefix:not(:empty){padding-inline-end:.25rem}.input-suffix{display:flex;align-items:center;justify-content:center;color:var(--nf-input-number-surfix-color);font-size:var(--nf-font-size);pointer-events:none;-webkit-user-select:none;user-select:none}.input-suffix:not(:empty){padding-inline-end:.6125rem;padding-inline-start:.5rem}.controls{position:absolute;top:0;right:0;height:100%;width:0;overflow:hidden;display:flex;flex-direction:column;box-sizing:border-box;transition:width var(--nf-transition-fast) ease}.controls:before{content:\"\";position:absolute;left:0;top:0;bottom:0;width:.67px;background-color:var(--nf-control-divider-color)}:host([suffix]) .controls:after{content:\"\";position:absolute;right:0;top:0;bottom:0;width:.67px;background-color:var(--nf-control-divider-color)}.control-btn{flex:1;display:flex;align-items:center;justify-content:center;background:0 0;border:none;cursor:pointer;transition:background-color var(--nf-transition-fast) ease;outline:0;-webkit-user-select:none;user-select:none}.control-btn:hover{background-color:var(--nf-control-btn-background-hover)}.control-btn:active{background-color:var(--nf-control-btn-background-active)}.control-btn:focus-visible{background-color:var(--nf-control-btn-background-hover)}.control-btn svg{display:block;pointer-events:none;fill:none;stroke:var(--nf-select-icon-color);stroke-width:1;stroke-linecap:round}.control-btn-up{border-bottom:.67px solid var(--nf-control-divider-color)}:host(:not([suffix])) .control-btn-up{border-top-right-radius:var(--nf-border-radius)}:host(:not([suffix])) .control-btn-down{border-bottom-right-radius:var(--nf-border-radius)}:host([disabled]) .input-number-input{cursor:not-allowed;color:var(--nf-color-disabled)}:host([disabled]) .input-prefix,:host([disabled]) .input-suffix{color:var(--nf-color-disabled)}:host([disabled]) .controls{display:none}:host([disabled]) .control-btn{cursor:not-allowed;pointer-events:none;opacity:.5}`;
767
+ var dt = Object.defineProperty, ut = Object.getOwnPropertyDescriptor, b = (t, e, o, r) => {
768
768
  for (var s = r > 1 ? void 0 : r ? ut(e, o) : e, i = t.length - 1, n; i >= 0; i--)
769
769
  (n = t[i]) && (s = (r ? n(e, o, s) : n(s)) || s);
770
770
  return r && s && dt(e, o, s), s;
@@ -784,7 +784,7 @@ let u = class extends W {
784
784
  return null;
785
785
  const e = Number(t);
786
786
  return Number.isNaN(e) ? null : this.clampValue(e);
787
- }, this.prefix = null, this.suffix = null, this.controls = !0, this.step = 1, this.min = null, this.max = null, this.changeOnWheel = !0, this.disabled = !1, this.noDecimal = !1, this.noZero = !1, this.noNegative = !1, this.center = !1, this.text = "", this.isTyping = !1, this.isFocused = !1;
787
+ }, this.prefix = null, this.suffix = null, this.unit = null, this.controls = !0, this.step = 1, this.min = null, this.max = null, this.changeOnWheel = !0, this.disabled = !1, this.noDecimal = !1, this.noZero = !1, this.noNegative = !1, this.center = !1, this.text = "", this.isTyping = !1, this.isFocused = !1;
788
788
  }
789
789
  // 对解析结果进行额外验证
790
790
  validateParsed(t) {
@@ -871,26 +871,29 @@ let u = class extends W {
871
871
  }
872
872
  /* ================== Render ================== */
873
873
  render() {
874
- return f`<div class=input-prefix>${this.prefix}</div><div class=input-number><div class=input-number-input-wrapper><input inputmode=decimal class=input-number-input .value=${this.text} ?disabled=${this.disabled} @blur=${this.onBlur} @focus=${this.onFocus} @input=${this.onInput} @keydown=${this.onKeyDown} @wheel=${this.onWheel} @keyup=${this.onKeyUp}></div>${this.controls ? f`<div class=controls><button class="control-btn control-btn-up"type=button ?disabled=${this.disabled} @click=${() => this.handleStepChange(1)} aria-label="Increase value"><svg width=12 height=12 viewBox="0 0 24 24"><path d="M6 14.6l6-6.6 6 6.6"/></svg></button><button class="control-btn control-btn-down"type=button ?disabled=${this.disabled} @click=${() => this.handleStepChange(-1)} aria-label="Decrease value"><svg width=12 height=12 viewBox="0 0 24 24"><path d="M18 9.4l-6 6.6-6-6.6"/></svg></button></div>` : ""}</div>${this.suffix ? f`<div class=input-suffix>${this.suffix}</div>` : ""}`;
874
+ return f`<div class=input-prefix>${this.prefix}</div><div class=input-number><div class=input-number-input-wrapper><input inputmode=decimal class=input-number-input .value=${this.text} ?disabled=${this.disabled} @blur=${this.onBlur} @focus=${this.onFocus} @input=${this.onInput} @keydown=${this.onKeyDown} @wheel=${this.onWheel} @keyup=${this.onKeyUp}> ${this.unit ? f`<div class=input-unit>${this.unit}</div>` : ""}</div>${this.controls ? f`<div class=controls><button class="control-btn control-btn-up"type=button ?disabled=${this.disabled} @click=${() => this.handleStepChange(1)} aria-label="Increase value"><svg width=12 height=12 viewBox="0 0 24 24"><path d="M6 14.6l6-6.6 6 6.6"/></svg></button><button class="control-btn control-btn-down"type=button ?disabled=${this.disabled} @click=${() => this.handleStepChange(-1)} aria-label="Decrease value"><svg width=12 height=12 viewBox="0 0 24 24"><path d="M18 9.4l-6 6.6-6-6.6"/></svg></button></div>` : ""}</div>${this.suffix ? f`<div class=input-suffix>${this.suffix}</div>` : ""}`;
875
875
  }
876
876
  };
877
877
  u.styles = [K, ct];
878
- m([
878
+ b([
879
879
  h({ type: Number })
880
880
  ], u.prototype, "value", 2);
881
- m([
881
+ b([
882
882
  h({ attribute: !1 })
883
883
  ], u.prototype, "formatter", 2);
884
- m([
884
+ b([
885
885
  h({ attribute: !1 })
886
886
  ], u.prototype, "parser", 2);
887
- m([
887
+ b([
888
888
  h({ type: String, reflect: !0 })
889
889
  ], u.prototype, "prefix", 2);
890
- m([
890
+ b([
891
891
  h({ type: String, reflect: !0 })
892
892
  ], u.prototype, "suffix", 2);
893
- m([
893
+ b([
894
+ h({ type: String, reflect: !0 })
895
+ ], u.prototype, "unit", 2);
896
+ b([
894
897
  h({
895
898
  type: Boolean,
896
899
  reflect: !0,
@@ -900,16 +903,16 @@ m([
900
903
  }
901
904
  })
902
905
  ], u.prototype, "controls", 2);
903
- m([
906
+ b([
904
907
  h({ type: Number })
905
908
  ], u.prototype, "step", 2);
906
- m([
909
+ b([
907
910
  h({ type: Number })
908
911
  ], u.prototype, "min", 2);
909
- m([
912
+ b([
910
913
  h({ type: Number })
911
914
  ], u.prototype, "max", 2);
912
- m([
915
+ b([
913
916
  h({
914
917
  type: Boolean,
915
918
  attribute: "change-on-wheel",
@@ -919,28 +922,28 @@ m([
919
922
  }
920
923
  })
921
924
  ], u.prototype, "changeOnWheel", 2);
922
- m([
925
+ b([
923
926
  h({ type: Boolean, reflect: !0 })
924
927
  ], u.prototype, "disabled", 2);
925
- m([
928
+ b([
926
929
  h({ type: Boolean, attribute: "no-decimal" })
927
930
  ], u.prototype, "noDecimal", 2);
928
- m([
931
+ b([
929
932
  h({ type: Boolean, attribute: "no-zero" })
930
933
  ], u.prototype, "noZero", 2);
931
- m([
934
+ b([
932
935
  h({ type: Boolean, attribute: "no-negative" })
933
936
  ], u.prototype, "noNegative", 2);
934
- m([
937
+ b([
935
938
  h({ type: Boolean, reflect: !0 })
936
939
  ], u.prototype, "center", 2);
937
- m([
940
+ b([
938
941
  w()
939
942
  ], u.prototype, "text", 2);
940
- m([
943
+ b([
941
944
  w()
942
945
  ], u.prototype, "isFocused", 2);
943
- u = m([
946
+ u = b([
944
947
  O("nf-input-number")
945
948
  ], u);
946
949
  const pt = N({
@@ -951,7 +954,7 @@ const pt = N({
951
954
  onChange: "change"
952
955
  }
953
956
  }), Vt = pt, ft = C`:host{cursor:pointer;-webkit-user-select:none;user-select:none;width:calc(1rem + 2px);height:calc(1rem + 2px)}:host([disabled]){cursor:not-allowed;opacity:.6}.checkbox-container{position:relative;transition:opacity .2s ease}.checkbox-box{width:1rem;height:1rem;border-radius:.25rem;background-color:var(--nf-background-color);border:1px solid var(--nf-border-color);display:flex;align-items:center;justify-content:center;transition:background-color .2s ease,border-color .2s ease}:host(:hover:not([checked]):not([disabled])) .checkbox-box{border-color:var(--nf-primary-color,var(--nf-primary-color))}:host([checked]) .checkbox-box{background-color:var(--nf-primary-color,var(--nf-primary-color));border-color:var(--nf-primary-color,var(--nf-primary-color))}:host([disabled]) .checkbox-box{border-color:#fffc;background:#fffc;cursor:not-allowed;pointer-events:none}:host([disabled][checked]) .checkbox-box{background-color:#fffc;border-color:#fffc}.checkbox-icon{color:#fff;font-size:.75rem;line-height:1;font-weight:700;transition:transform .2s ease;display:flex;align-items:center}:host([checked]) .checkbox-icon{transform:scale(1)}:host(:focus) .checkbox-container{outline:.125rem solid var(--nf-primary-color,var(--nf-primary-color));outline-offset:.125rem}`;
954
- var bt = Object.defineProperty, mt = Object.getOwnPropertyDescriptor, de = (t, e, o, r) => {
957
+ var bt = Object.defineProperty, mt = Object.getOwnPropertyDescriptor, ce = (t, e, o, r) => {
955
958
  for (var s = r > 1 ? void 0 : r ? mt(e, o) : e, i = t.length - 1, n; i >= 0; i--)
956
959
  (n = t[i]) && (s = (r ? n(e, o, s) : n(s)) || s);
957
960
  return r && s && bt(e, o, s), s;
@@ -972,7 +975,7 @@ let L = class extends H {
972
975
  }
973
976
  // 渲染复选框组件
974
977
  render() {
975
- return se`<div class=checkbox-container @click=${this.toggleCheckbox} aria-checked=${this.checked} aria-disabled=${this.disabled} role=checkbox><div class=checkbox-box>${this.checked ? se`<div class=checkbox-icon><svg viewBox="64 64 896 896"focusable=false data-icon=check width=0.625rem height=0.625rem fill=currentColor aria-hidden=true><path d="M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"></path></svg></div>` : ""}</div></div>`;
978
+ return re`<div class=checkbox-container @click=${this.toggleCheckbox} aria-checked=${this.checked} aria-disabled=${this.disabled} role=checkbox><div class=checkbox-box>${this.checked ? re`<div class=checkbox-icon><svg viewBox="64 64 896 896"focusable=false data-icon=check width=0.625rem height=0.625rem fill=currentColor aria-hidden=true><path d="M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"></path></svg></div>` : ""}</div></div>`;
976
979
  }
977
980
  connectedCallback() {
978
981
  this.style.transition = "none", super.connectedCallback(), requestAnimationFrame(() => {
@@ -981,13 +984,13 @@ let L = class extends H {
981
984
  }
982
985
  };
983
986
  L.styles = [ft];
984
- de([
987
+ ce([
985
988
  h({ type: Boolean, reflect: !0 })
986
989
  ], L.prototype, "checked", 2);
987
- de([
990
+ ce([
988
991
  h({ type: Boolean, reflect: !0 })
989
992
  ], L.prototype, "disabled", 2);
990
- L = de([
993
+ L = ce([
991
994
  O("nf-checkbox")
992
995
  ], L);
993
996
  const Ht = N({
@@ -997,53 +1000,11 @@ const Ht = N({
997
1000
  events: {
998
1001
  onChange: "change"
999
1002
  }
1000
- });
1001
- const gt = { ATTRIBUTE: 1 }, vt = (t) => (...e) => ({ _$litDirective$: t, values: e });
1002
- let _t = class {
1003
- constructor(e) {
1004
- }
1005
- get _$AU() {
1006
- return this._$AM._$AU;
1007
- }
1008
- _$AT(e, o, r) {
1009
- this._$Ct = e, this._$AM = o, this._$Ci = r;
1010
- }
1011
- _$AS(e, o) {
1012
- return this.update(e, o);
1013
- }
1014
- update(e, o) {
1015
- return this.render(...o);
1016
- }
1017
- };
1018
- const Se = "important", yt = " !" + Se, ee = vt(class extends _t {
1019
- constructor(t) {
1020
- if (super(t), t.type !== gt.ATTRIBUTE || t.name !== "style" || t.strings?.length > 2) throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
1021
- }
1022
- render(t) {
1023
- return Object.keys(t).reduce((e, o) => {
1024
- const r = t[o];
1025
- return r == null ? e : e + `${o = o.includes("-") ? o : o.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g, "-$&").toLowerCase()}:${r};`;
1026
- }, "");
1027
- }
1028
- update(t, [e]) {
1029
- const { style: o } = t.element;
1030
- if (this.ft === void 0) return this.ft = new Set(Object.keys(e)), this.render(e);
1031
- for (const r of this.ft) e[r] == null && (this.ft.delete(r), r.includes("-") ? o.removeProperty(r) : o[r] = null);
1032
- for (const r in e) {
1033
- const s = e[r];
1034
- if (s != null) {
1035
- this.ft.add(r);
1036
- const i = typeof s == "string" && s.endsWith(yt);
1037
- r.includes("-") || i ? o.setProperty(r, i ? s.slice(0, -11) : s, i ? Se : "") : o[r] = s;
1038
- }
1039
- }
1040
- return D;
1041
- }
1042
- }), wt = C`:host{display:inline-block;position:relative}:host([disabled]){cursor:not-allowed;opacity:.6}:host([disabled]:hover){border-color:var(--nf-border-color);background:var(--nf-background-color)}:host([open]){border-color:var(--nf-border-color-hover);box-shadow:0 0 0 .15rem var(--nf-box-shadow-color-focus)}.trigger{width:calc(100% + 1.5rem + 2px);height:calc(100% + 2px);margin:-1px -.75rem;padding:1px .75rem;box-sizing:border-box;display:flex;align-items:center;cursor:pointer;transition:all .2s;font-size:.875rem;position:relative}:host(:not([disabled])) .trigger:hover{border-color:var(--nf-color-primary)}.trigger[disabled]{cursor:not-allowed;opacity:.6}:host([disabled]) .trigger{cursor:not-allowed;color:var(--nf-color-disabled)}.color-block{width:1.25rem;height:1.25rem;border-radius:.125rem;margin-left:calc((var(--nf-height) - 1.25rem)/ 2 - .75rem);margin-right:.4rem}:host(.hide-text) .color-block{margin-right:calc((var(--nf-height) - 1.25rem)/ 2 - .75rem)}.color-text{flex:1}.panel{position:absolute;z-index:1000;background:var(--nf-color-picker-card-background,var(--nf-dropdown-background));-webkit-backdrop-filter:blur(64px);backdrop-filter:blur(64px);border-radius:var(--nf-border-radius);box-shadow:0 6px 16px 0 var(--nf-color-picker-card-shadow,var(--nf-dropdown-shadow)),0 3px 6px -4px var(--nf-color-picker-card-shadow,var(--nf-dropdown-shadow)),0 9px 28px 8px var(--nf-color-picker-card-shadow,var(--nf-dropdown-shadow));-webkit-user-select:none;user-select:none}.panel-content{padding:.75rem;width:15rem}.color-selector{height:9.375rem;position:relative;margin-bottom:.75rem;border-radius:var(--nf-border-radius);overflow:hidden}.color-sb{width:100%;height:100%;position:relative;cursor:pointer}.sb-white{position:absolute;inset:0;background:linear-gradient(to right,#fff,#fff0)}.sb-black{position:absolute;inset:0;background:linear-gradient(to top,#000,#0000)}.selector{position:absolute;width:.625rem;height:.625rem;border:.125rem solid #fff;border-radius:50%;transform:translate(-50%,-50%);box-shadow:0 0 .125rem #00000080;pointer-events:none}.slider-container{margin-bottom:.5rem}.slider-container:last-child{margin-bottom:0}.sliders-row{display:flex;align-items:center;gap:.75rem}.sliders{flex:1}.slider{position:relative;height:.75rem;border-radius:.375rem}.hue-slider{background:linear-gradient(to right,red,#ff0,#0f0,#0ff,#00f,#f0f,red)}.alpha-slider{position:relative;background-image:linear-gradient(45deg,var(--nf-color-picker-card-checker,#ccc) 25%,transparent 25%),linear-gradient(-45deg,var(--nf-color-picker-card-checker,#ccc) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--nf-color-picker-card-checker,#ccc) 75%),linear-gradient(-45deg,transparent 75%,var(--nf-color-picker-card-checker,#ccc) 75%);background-size:.375rem .375rem;background-position:0 0,0 .1875rem,.1875rem -.1875rem,-.1875rem 0;background-color:var(--nf-color-picker-card-checker-bg,#fff);border-radius:.375rem}.alpha-slider-input{position:relative;z-index:2}.alpha-gradient{position:absolute;inset:0;border-radius:.375rem}input[type=range]{-webkit-appearance:none;width:100%;height:100%;background:0 0;outline:0;position:absolute;top:0;left:0;margin:0;padding:0}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:1rem;height:1rem;border-radius:50%;background:#fff;border:.125rem solid var(--nf-color-border);cursor:pointer;box-shadow:0 0 .125rem #00000080;position:relative;z-index:1}input[type=range]::-moz-range-thumb{width:1rem;height:1rem;border-radius:50%;background:#fff;border:.125rem solid var(--nf-color-border);cursor:pointer;box-shadow:0 0 .125rem #00000080}.current-color-container{display:flex}.current-color{width:2rem;height:2rem;border-radius:var(--nf-border-radius);border:.0625rem solid var(--nf-color-border)}:host(:not([disabled-alpha])) .current-color{width:2.5rem;height:2.5rem}`;
1043
- var $t = Object.defineProperty, xt = Object.getOwnPropertyDescriptor, _ = (t, e, o, r) => {
1044
- for (var s = r > 1 ? void 0 : r ? xt(e, o) : e, i = t.length - 1, n; i >= 0; i--)
1003
+ }), gt = C`:host{display:inline-block;position:relative;width:calc(.9rem + (var(--nf-height) - 1.25rem)/ 2 + 7ch)}:host(:not([disabled-alpha])){width:calc(.9rem + (var(--nf-height) - 1.25rem)/ 2 + 9ch)}:host([disabled]){cursor:not-allowed;opacity:.6}:host([disabled]:hover){border-color:var(--nf-border-color);background:var(--nf-background-color)}:host([open]){border-color:var(--nf-border-color-hover);box-shadow:0 0 0 .15rem var(--nf-box-shadow-color-focus)}.trigger{width:calc(100% + 1.5rem + 2px);height:calc(100% + 2px);margin:-1px -.75rem;padding:1px .75rem;box-sizing:border-box;display:flex;align-items:center;cursor:pointer;transition:all .2s;font-size:.875rem;position:relative}:host(:not([disabled])) .trigger:hover{border-color:var(--nf-color-primary)}.trigger[disabled]{cursor:not-allowed;opacity:.6}:host([disabled]) .trigger{cursor:not-allowed;color:var(--nf-color-disabled)}.color-block{width:1.25rem;height:1.25rem;border-radius:.125rem;margin-left:calc((var(--nf-height) - 1.25rem)/ 2 - .75rem);margin-right:.4rem}:host(.hide-text) .color-block{margin-right:calc((var(--nf-height) - 1.25rem)/ 2 - .75rem)}.color-text{flex:1;text-align:center;text-transform:uppercase}.panel{position:absolute;z-index:1000;background:var(--nf-color-picker-card-background,var(--nf-dropdown-background));-webkit-backdrop-filter:blur(64px);backdrop-filter:blur(64px);border-radius:var(--nf-border-radius);box-shadow:0 6px 16px 0 var(--nf-color-picker-card-shadow,var(--nf-dropdown-shadow)),0 3px 6px -4px var(--nf-color-picker-card-shadow,var(--nf-dropdown-shadow)),0 9px 28px 8px var(--nf-color-picker-card-shadow,var(--nf-dropdown-shadow));-webkit-user-select:none;user-select:none}.panel-content{padding:.75rem;width:15rem}.color-selector{height:9.375rem;position:relative;margin-bottom:.75rem;border-radius:var(--nf-border-radius);overflow:hidden}.color-sb{width:100%;height:100%;position:relative;cursor:pointer}.sb-white{position:absolute;inset:0;background:linear-gradient(to right,#fff,#fff0)}.sb-black{position:absolute;inset:0;background:linear-gradient(to top,#000,#0000)}.selector{position:absolute;width:.625rem;height:.625rem;border:.125rem solid #fff;border-radius:50%;transform:translate(-50%,-50%);box-shadow:0 0 .125rem #00000080;pointer-events:none}.slider-container{margin-bottom:.5rem}.slider-container:last-child{margin-bottom:0}.sliders-row{display:flex;align-items:center;gap:.75rem}.sliders{flex:1}.slider{position:relative;height:.75rem;border-radius:.375rem}.hue-slider{background:linear-gradient(to right,red,#ff0,#0f0,#0ff,#00f,#f0f,red)}.alpha-slider{position:relative;background-image:linear-gradient(45deg,var(--nf-color-picker-card-checker,#ccc) 25%,transparent 25%),linear-gradient(-45deg,var(--nf-color-picker-card-checker,#ccc) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--nf-color-picker-card-checker,#ccc) 75%),linear-gradient(-45deg,transparent 75%,var(--nf-color-picker-card-checker,#ccc) 75%);background-size:.375rem .375rem;background-position:0 0,0 .1875rem,.1875rem -.1875rem,-.1875rem 0;background-color:var(--nf-color-picker-card-checker-bg,#fff);border-radius:.375rem}.alpha-slider-input{position:relative;z-index:2}.alpha-gradient{position:absolute;inset:0;border-radius:.375rem}input[type=range]{-webkit-appearance:none;width:100%;height:100%;background:0 0;outline:0;position:absolute;top:0;left:0;margin:0;padding:0}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:1rem;height:1rem;border-radius:50%;background:#fff;border:.125rem solid var(--nf-color-border);cursor:pointer;box-shadow:0 0 .125rem #00000080;position:relative;z-index:1}input[type=range]::-moz-range-thumb{width:1rem;height:1rem;border-radius:50%;background:#fff;border:.125rem solid var(--nf-color-border);cursor:pointer;box-shadow:0 0 .125rem #00000080}.current-color-container{display:flex}.current-color{width:2rem;height:2rem;border-radius:var(--nf-border-radius);border:.0625rem solid var(--nf-color-border)}:host(:not([disabled-alpha])) .current-color{width:2.5rem;height:2.5rem}`;
1004
+ var vt = Object.defineProperty, _t = Object.getOwnPropertyDescriptor, _ = (t, e, o, r) => {
1005
+ for (var s = r > 1 ? void 0 : r ? _t(e, o) : e, i = t.length - 1, n; i >= 0; i--)
1045
1006
  (n = t[i]) && (s = (r ? n(e, o, s) : n(s)) || s);
1046
- return r && s && $t(e, o, s), s;
1007
+ return r && s && vt(e, o, s), s;
1047
1008
  };
1048
1009
  let g = class extends W {
1049
1010
  constructor() {
@@ -1199,9 +1160,7 @@ let g = class extends W {
1199
1160
  <div class="color-selector">
1200
1161
  <div
1201
1162
  class="color-sb"
1202
- style=${ee({
1203
- "background-color": t
1204
- })}
1163
+ style="background-color: ${t};"
1205
1164
  @mousedown="${this._handleSBMouseDown}"
1206
1165
  @touchstart="${this._handleSBTouchMove}"
1207
1166
  @touchmove="${this._handleSBTouchMove}"
@@ -1210,10 +1169,7 @@ let g = class extends W {
1210
1169
  <div class="sb-black"></div>
1211
1170
  <div
1212
1171
  class="selector"
1213
- style=${ee({
1214
- left: `${e}%`,
1215
- top: `${o}%`
1216
- })}
1172
+ style="left: ${e}%; top: ${o}%;"
1217
1173
  ></div>
1218
1174
  </div>
1219
1175
  </div>
@@ -1297,7 +1253,7 @@ let g = class extends W {
1297
1253
  `;
1298
1254
  }
1299
1255
  };
1300
- g.styles = [K, wt];
1256
+ g.styles = [K, gt];
1301
1257
  _([
1302
1258
  h({ type: String })
1303
1259
  ], g.prototype, "value", 2);
@@ -1350,7 +1306,7 @@ _([
1350
1306
  g = _([
1351
1307
  O("nf-color-picker")
1352
1308
  ], g);
1353
- const Ft = N({
1309
+ const Ut = N({
1354
1310
  tagName: "nf-color-picker",
1355
1311
  elementClass: g,
1356
1312
  react: T,
@@ -1358,6 +1314,48 @@ const Ft = N({
1358
1314
  onChange: "change",
1359
1315
  onOpenChange: "openChange"
1360
1316
  }
1317
+ });
1318
+ const yt = { ATTRIBUTE: 1 }, wt = (t) => (...e) => ({ _$litDirective$: t, values: e });
1319
+ let $t = class {
1320
+ constructor(e) {
1321
+ }
1322
+ get _$AU() {
1323
+ return this._$AM._$AU;
1324
+ }
1325
+ _$AT(e, o, r) {
1326
+ this._$Ct = e, this._$AM = o, this._$Ci = r;
1327
+ }
1328
+ _$AS(e, o) {
1329
+ return this.update(e, o);
1330
+ }
1331
+ update(e, o) {
1332
+ return this.render(...o);
1333
+ }
1334
+ };
1335
+ const Se = "important", xt = " !" + Se, $e = wt(class extends $t {
1336
+ constructor(t) {
1337
+ if (super(t), t.type !== yt.ATTRIBUTE || t.name !== "style" || t.strings?.length > 2) throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
1338
+ }
1339
+ render(t) {
1340
+ return Object.keys(t).reduce((e, o) => {
1341
+ const r = t[o];
1342
+ return r == null ? e : e + `${o = o.includes("-") ? o : o.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g, "-$&").toLowerCase()}:${r};`;
1343
+ }, "");
1344
+ }
1345
+ update(t, [e]) {
1346
+ const { style: o } = t.element;
1347
+ if (this.ft === void 0) return this.ft = new Set(Object.keys(e)), this.render(e);
1348
+ for (const r of this.ft) e[r] == null && (this.ft.delete(r), r.includes("-") ? o.removeProperty(r) : o[r] = null);
1349
+ for (const r in e) {
1350
+ const s = e[r];
1351
+ if (s != null) {
1352
+ this.ft.add(r);
1353
+ const i = typeof s == "string" && s.endsWith(xt);
1354
+ r.includes("-") || i ? o.setProperty(r, i ? s.slice(0, -11) : s, i ? Se : "") : o[r] = s;
1355
+ }
1356
+ }
1357
+ return D;
1358
+ }
1361
1359
  }), kt = C`:host{display:inline-flex;align-items:center;position:relative;width:100%;height:1.25rem;background-color:var(--nf-border-color,#e0e0e0);border-radius:.625rem;cursor:pointer;-webkit-user-select:none;user-select:none;border:none;box-shadow:none;padding:0}:host:hover{background-color:var(--nf-border-color,#e0e0e0);border:none}:host:focus{box-shadow:none;outline:0}:host([disabled]){cursor:not-allowed;opacity:.6}.slider-fill{position:absolute;left:0;top:0;height:100%;background-color:var(--nf-primary-color,#5e72f9);border-radius:.625rem 0 0 .625rem;pointer-events:none}.slider-handle{position:absolute;width:1.25rem;height:1.25rem;background-color:#fff;border-radius:50%;top:50%;transform:translate(-50%,-50%);cursor:grab;outline:0;box-shadow:0 1px 3px #0000004d;transition:transform .15s ease,box-shadow .15s ease;z-index:1}:host([disabled]) .slider-handle{cursor:not-allowed}:host(:not([disabled])) .slider-handle:hover{transform:translate(-50%,-50%) scale(1.05)}:host(:not([disabled])) .slider-handle:active{cursor:grabbing;transform:translate(-50%,-50%) scale(1.15);box-shadow:0 3px 8px #0006}.slider-handle:focus{box-shadow:0 0 0 3px #5e72f94d}.slider-tooltip{position:absolute;bottom:calc(100% + .5rem);left:50%;transform:translate(-50%);background-color:var(--nf-slider-tooltip-background);color:var(--nf-color);padding:.25rem .5rem;border-radius:.25rem;font-size:.75rem;white-space:nowrap;opacity:0;transition:opacity .2s ease;pointer-events:none;box-shadow:0 0 .4rem .1rem #0000001a}.slider-tooltip.visible{opacity:1}`;
1362
1360
  var Et = Object.defineProperty, At = Object.getOwnPropertyDescriptor, y = (t, e, o, r) => {
1363
1361
  for (var s = r > 1 ? void 0 : r ? At(e, o) : e, i = t.length - 1, n; i >= 0; i--)
@@ -1444,7 +1442,7 @@ let v = class extends W {
1444
1442
  }
1445
1443
  render() {
1446
1444
  const t = this._getValuePercentage(), e = `${t}%`, o = `${t}%`, r = `slider-tooltip ${this._showTooltip || this.tooltip ? "visible" : ""}`;
1447
- return f`<div class=slider-fill style=${ee({ width: o })}></div><div class=slider-handle style=${ee({ left: e })} tabindex=${this.disabled ? -1 : 0} @mousedown=${this._handleMouseDown} @touchstart=${this._handleTouchStart} @keydown=${this._handleKeyDown}><div class=${r}>${this._currentValue}</div></div>`;
1445
+ return f`<div class=slider-fill style=${$e({ width: o })}></div><div class=slider-handle style=${$e({ left: e })} tabindex=${this.disabled ? -1 : 0} @mousedown=${this._handleMouseDown} @touchstart=${this._handleTouchStart} @keydown=${this._handleKeyDown}><div class=${r}>${this._currentValue}</div></div>`;
1448
1446
  }
1449
1447
  };
1450
1448
  v.styles = [K, kt];
@@ -1498,7 +1496,7 @@ function It(t) {
1498
1496
  }
1499
1497
  export {
1500
1498
  Ht as NfCheckbox,
1501
- Ft as NfColorPicker,
1499
+ Ut as NfColorPicker,
1502
1500
  Nt as NfInput,
1503
1501
  Vt as NfInputNumber,
1504
1502
  It as NfRoot,