@selectwin/kit 0.1.154 → 0.1.156

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -4702,11 +4702,18 @@ var Ir = r(function({ label: e, value: t, onChange: n, labelAction: r, hint: i,
4702
4702
  }), Rr = r(function({ value: e, onChange: t, options: n, ariaLabel: r, fullWidth: i = !1, label: a, hint: o, disabled: c = !1, error: u, className: p, ...m }, _) {
4703
4703
  let v = s(), y = Math.max(0, n.findIndex((t) => t.value === e)), b = d([]), [x, S] = f(null), C = n.map((e) => e.count ?? "").join(",");
4704
4704
  l(() => {
4705
- let e = b.current[y];
4706
- e && S({
4707
- left: e.offsetLeft,
4708
- width: e.offsetWidth
4709
- });
4705
+ let e = () => {
4706
+ let e = b.current[y];
4707
+ if (!e) return;
4708
+ let t = {
4709
+ left: e.offsetLeft,
4710
+ width: e.offsetWidth
4711
+ };
4712
+ S((e) => e && e.left === t.left && e.width === t.width ? e : t);
4713
+ };
4714
+ e();
4715
+ let t = typeof ResizeObserver < "u" ? new ResizeObserver(e) : null;
4716
+ return b.current.forEach((e) => e && (t == null ? void 0 : t.observe(e))), () => t == null ? void 0 : t.disconnect();
4710
4717
  }, [
4711
4718
  y,
4712
4719
  n.length,
@@ -12574,26 +12581,26 @@ function vu({ layout: e = "rows", children: t, className: n, ...r }) {
12574
12581
  });
12575
12582
  }
12576
12583
  function yu({ insight: e, locale: t, labels: n, index: r, locked: i = !1, unread: a = !1, selected: o = !1, layout: s = "row", cta: c, badge: l, href: u, onClick: d, className: f, ...p }) {
12577
- let { lang: _, labels: v } = eu(t, n), y = e.domain ? v.domain[e.domain] ?? e.domain : null, b = e.impact ? nu(e.impact.maxCents, e.impact.currency, _) : null, x = s === "card", S = "select-insightrow" + (x ? " select-insightrow--card" : "") + (o ? " is-selected" : "") + (i ? " select-insightrow--locked" : "") + (f ? " " + f : ""), C = i ? /* @__PURE__ */ h("span", {
12584
+ let { lang: _, labels: v } = eu(t, n), y = e.domain ? v.domain[e.domain] ?? e.domain : null, b = e.impact ? nu(e.impact.maxCents, e.impact.currency, _) : null, x = e.impact && e.impact.minCents === e.impact.maxCents ? v.about("").trim() : v.upTo, S = s === "card", C = "select-insightrow" + (S ? " select-insightrow--card" : "") + (o ? " is-selected" : "") + (i ? " select-insightrow--locked" : "") + (f ? " " + f : ""), w = i ? /* @__PURE__ */ h("span", {
12578
12585
  className: "select-insightrow__index select-insightrow__index--lock",
12579
12586
  "aria-hidden": "true",
12580
12587
  children: /* @__PURE__ */ h(nt, {})
12581
12588
  }) : r == null ? null : /* @__PURE__ */ h("span", {
12582
- className: `select-insightrow__index${o || x && r === 1 ? " select-insightrow__index--strong" : ""}`,
12589
+ className: `select-insightrow__index${o || S && r === 1 ? " select-insightrow__index--strong" : ""}`,
12583
12590
  children: r
12584
- }), w = /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(su, {
12591
+ }), T = /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(su, {
12585
12592
  severity: e.severity,
12586
12593
  labels: v
12587
- }), y && !i ? /* @__PURE__ */ h("span", { children: y }) : null] }), T = a && !i ? /* @__PURE__ */ h(cu, { label: v.unread }) : null, E = x ? /* @__PURE__ */ g(m, { children: [
12594
+ }), y && !i ? /* @__PURE__ */ h("span", { children: y }) : null] }), E = a && !i ? /* @__PURE__ */ h(cu, { label: v.unread }) : null, D = S ? /* @__PURE__ */ g(m, { children: [
12588
12595
  /* @__PURE__ */ g("span", {
12589
12596
  className: "select-insightrow__top",
12590
12597
  children: [
12591
- C,
12592
12598
  w,
12599
+ T,
12593
12600
  l,
12594
- T ? /* @__PURE__ */ h("span", {
12601
+ E ? /* @__PURE__ */ h("span", {
12595
12602
  className: "select-insightrow__topend",
12596
- children: T
12603
+ children: E
12597
12604
  }) : null
12598
12605
  ]
12599
12606
  }),
@@ -12606,7 +12613,7 @@ function yu({ insight: e, locale: t, labels: n, index: r, locked: i = !1, unread
12606
12613
  children: [b ? /* @__PURE__ */ g("span", {
12607
12614
  className: "select-insightrow__recover",
12608
12615
  children: [
12609
- /* @__PURE__ */ h("small", { children: v.upTo }),
12616
+ /* @__PURE__ */ h("small", { children: x }),
12610
12617
  /* @__PURE__ */ h("strong", { children: b }),
12611
12618
  /* @__PURE__ */ h("small", { children: v.toRecover })
12612
12619
  ]
@@ -12616,7 +12623,7 @@ function yu({ insight: e, locale: t, labels: n, index: r, locked: i = !1, unread
12616
12623
  }) : null]
12617
12624
  }) : null
12618
12625
  ] }) : /* @__PURE__ */ g(m, { children: [
12619
- C,
12626
+ w,
12620
12627
  /* @__PURE__ */ g("span", {
12621
12628
  className: "select-insightrow__text",
12622
12629
  children: [/* @__PURE__ */ h("span", {
@@ -12625,27 +12632,27 @@ function yu({ insight: e, locale: t, labels: n, index: r, locked: i = !1, unread
12625
12632
  }), /* @__PURE__ */ g("span", {
12626
12633
  className: "select-insightrow__meta",
12627
12634
  children: [
12628
- w,
12629
12635
  T,
12636
+ E,
12630
12637
  l
12631
12638
  ]
12632
12639
  })]
12633
12640
  }),
12634
12641
  b ? /* @__PURE__ */ g("span", {
12635
12642
  className: "select-insightrow__impact",
12636
- children: [/* @__PURE__ */ h("small", { children: v.upTo }), /* @__PURE__ */ h("strong", { children: b })]
12643
+ children: [/* @__PURE__ */ h("small", { children: x }), /* @__PURE__ */ h("strong", { children: b })]
12637
12644
  }) : null
12638
- ] }), D = ca(u);
12639
- return !D && !d ? /* @__PURE__ */ h("div", {
12640
- className: S,
12641
- children: E
12645
+ ] }), O = ca(u);
12646
+ return !O && !d ? /* @__PURE__ */ h("div", {
12647
+ className: C,
12648
+ children: D
12642
12649
  }) : /* @__PURE__ */ h("a", {
12643
12650
  ...p,
12644
- href: D,
12651
+ href: O,
12645
12652
  onClick: d,
12646
12653
  "aria-current": o ? "true" : void 0,
12647
- className: S,
12648
- children: E
12654
+ className: C,
12655
+ children: D
12649
12656
  });
12650
12657
  }
12651
12658
  //#endregion