@selectwin/kit 0.1.153 → 0.1.155
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 +42 -27
- package/dist/style.css +1 -1
- package/package.json +1 -1
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 =
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
|
|
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,
|
|
@@ -10729,8 +10736,16 @@ var pl = r(function({ value: e, max: t = 5, onChange: n, size: r = 20, label: i,
|
|
|
10729
10736
|
"aria-valuemax": l ? t : void 0,
|
|
10730
10737
|
onMouseLeave: () => l && d(null),
|
|
10731
10738
|
children: Array.from({ length: t }, (e, t) => {
|
|
10732
|
-
let i = /* @__PURE__ */
|
|
10733
|
-
className:
|
|
10739
|
+
let i = l ? +(t < p) : Math.max(0, Math.min(1, p - t)), a = i >= .95 ? 1 : i <= .05 ? 0 : i, o = a > 0 && a < 1 ? /* @__PURE__ */ g("span", {
|
|
10740
|
+
className: "select-rating__star select-rating__star--part",
|
|
10741
|
+
style: { "--select-rating-fill": `${Math.round(a * 100)}%` },
|
|
10742
|
+
children: [/* @__PURE__ */ h(fl, { size: r }), /* @__PURE__ */ h("span", {
|
|
10743
|
+
className: "select-rating__fill",
|
|
10744
|
+
"aria-hidden": "true",
|
|
10745
|
+
children: /* @__PURE__ */ h(fl, { size: r })
|
|
10746
|
+
})]
|
|
10747
|
+
}) : /* @__PURE__ */ h("span", {
|
|
10748
|
+
className: `select-rating__star${a === 1 ? " is-filled" : ""}`,
|
|
10734
10749
|
children: /* @__PURE__ */ h(fl, { size: r })
|
|
10735
10750
|
});
|
|
10736
10751
|
return l ? /* @__PURE__ */ h("button", {
|
|
@@ -10741,8 +10756,8 @@ var pl = r(function({ value: e, max: t = 5, onChange: n, size: r = 20, label: i,
|
|
|
10741
10756
|
onFocus: () => d(t + 1),
|
|
10742
10757
|
onBlur: () => d(null),
|
|
10743
10758
|
onClick: () => n == null ? void 0 : n(t + 1),
|
|
10744
|
-
children:
|
|
10745
|
-
}, t) : /* @__PURE__ */ h("span", { children:
|
|
10759
|
+
children: o
|
|
10760
|
+
}, t) : /* @__PURE__ */ h("span", { children: o }, t);
|
|
10746
10761
|
})
|
|
10747
10762
|
});
|
|
10748
10763
|
}), ml = r(function({ stars: e, max: t = 5, title: n, text: r, className: i, ...a }, o) {
|
|
@@ -12566,26 +12581,26 @@ function vu({ layout: e = "rows", children: t, className: n, ...r }) {
|
|
|
12566
12581
|
});
|
|
12567
12582
|
}
|
|
12568
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 }) {
|
|
12569
|
-
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",
|
|
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", {
|
|
12570
12585
|
className: "select-insightrow__index select-insightrow__index--lock",
|
|
12571
12586
|
"aria-hidden": "true",
|
|
12572
12587
|
children: /* @__PURE__ */ h(nt, {})
|
|
12573
12588
|
}) : r == null ? null : /* @__PURE__ */ h("span", {
|
|
12574
|
-
className: `select-insightrow__index${o ||
|
|
12589
|
+
className: `select-insightrow__index${o || S && r === 1 ? " select-insightrow__index--strong" : ""}`,
|
|
12575
12590
|
children: r
|
|
12576
|
-
}),
|
|
12591
|
+
}), T = /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(su, {
|
|
12577
12592
|
severity: e.severity,
|
|
12578
12593
|
labels: v
|
|
12579
|
-
}), y && !i ? /* @__PURE__ */ h("span", { children: y }) : null] }),
|
|
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: [
|
|
12580
12595
|
/* @__PURE__ */ g("span", {
|
|
12581
12596
|
className: "select-insightrow__top",
|
|
12582
12597
|
children: [
|
|
12583
|
-
C,
|
|
12584
12598
|
w,
|
|
12599
|
+
T,
|
|
12585
12600
|
l,
|
|
12586
|
-
|
|
12601
|
+
E ? /* @__PURE__ */ h("span", {
|
|
12587
12602
|
className: "select-insightrow__topend",
|
|
12588
|
-
children:
|
|
12603
|
+
children: E
|
|
12589
12604
|
}) : null
|
|
12590
12605
|
]
|
|
12591
12606
|
}),
|
|
@@ -12598,7 +12613,7 @@ function yu({ insight: e, locale: t, labels: n, index: r, locked: i = !1, unread
|
|
|
12598
12613
|
children: [b ? /* @__PURE__ */ g("span", {
|
|
12599
12614
|
className: "select-insightrow__recover",
|
|
12600
12615
|
children: [
|
|
12601
|
-
/* @__PURE__ */ h("small", { children:
|
|
12616
|
+
/* @__PURE__ */ h("small", { children: x }),
|
|
12602
12617
|
/* @__PURE__ */ h("strong", { children: b }),
|
|
12603
12618
|
/* @__PURE__ */ h("small", { children: v.toRecover })
|
|
12604
12619
|
]
|
|
@@ -12608,7 +12623,7 @@ function yu({ insight: e, locale: t, labels: n, index: r, locked: i = !1, unread
|
|
|
12608
12623
|
}) : null]
|
|
12609
12624
|
}) : null
|
|
12610
12625
|
] }) : /* @__PURE__ */ g(m, { children: [
|
|
12611
|
-
|
|
12626
|
+
w,
|
|
12612
12627
|
/* @__PURE__ */ g("span", {
|
|
12613
12628
|
className: "select-insightrow__text",
|
|
12614
12629
|
children: [/* @__PURE__ */ h("span", {
|
|
@@ -12617,27 +12632,27 @@ function yu({ insight: e, locale: t, labels: n, index: r, locked: i = !1, unread
|
|
|
12617
12632
|
}), /* @__PURE__ */ g("span", {
|
|
12618
12633
|
className: "select-insightrow__meta",
|
|
12619
12634
|
children: [
|
|
12620
|
-
w,
|
|
12621
12635
|
T,
|
|
12636
|
+
E,
|
|
12622
12637
|
l
|
|
12623
12638
|
]
|
|
12624
12639
|
})]
|
|
12625
12640
|
}),
|
|
12626
12641
|
b ? /* @__PURE__ */ g("span", {
|
|
12627
12642
|
className: "select-insightrow__impact",
|
|
12628
|
-
children: [/* @__PURE__ */ h("small", { children:
|
|
12643
|
+
children: [/* @__PURE__ */ h("small", { children: x }), /* @__PURE__ */ h("strong", { children: b })]
|
|
12629
12644
|
}) : null
|
|
12630
|
-
] }),
|
|
12631
|
-
return !
|
|
12632
|
-
className:
|
|
12633
|
-
children:
|
|
12645
|
+
] }), O = ca(u);
|
|
12646
|
+
return !O && !d ? /* @__PURE__ */ h("div", {
|
|
12647
|
+
className: C,
|
|
12648
|
+
children: D
|
|
12634
12649
|
}) : /* @__PURE__ */ h("a", {
|
|
12635
12650
|
...p,
|
|
12636
|
-
href:
|
|
12651
|
+
href: O,
|
|
12637
12652
|
onClick: d,
|
|
12638
12653
|
"aria-current": o ? "true" : void 0,
|
|
12639
|
-
className:
|
|
12640
|
-
children:
|
|
12654
|
+
className: C,
|
|
12655
|
+
children: D
|
|
12641
12656
|
});
|
|
12642
12657
|
}
|
|
12643
12658
|
//#endregion
|