@selectwin/kit 0.1.153 → 0.1.154
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 +12 -4
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10729,8 +10729,16 @@ var pl = r(function({ value: e, max: t = 5, onChange: n, size: r = 20, label: i,
|
|
|
10729
10729
|
"aria-valuemax": l ? t : void 0,
|
|
10730
10730
|
onMouseLeave: () => l && d(null),
|
|
10731
10731
|
children: Array.from({ length: t }, (e, t) => {
|
|
10732
|
-
let i = /* @__PURE__ */
|
|
10733
|
-
className:
|
|
10732
|
+
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", {
|
|
10733
|
+
className: "select-rating__star select-rating__star--part",
|
|
10734
|
+
style: { "--select-rating-fill": `${Math.round(a * 100)}%` },
|
|
10735
|
+
children: [/* @__PURE__ */ h(fl, { size: r }), /* @__PURE__ */ h("span", {
|
|
10736
|
+
className: "select-rating__fill",
|
|
10737
|
+
"aria-hidden": "true",
|
|
10738
|
+
children: /* @__PURE__ */ h(fl, { size: r })
|
|
10739
|
+
})]
|
|
10740
|
+
}) : /* @__PURE__ */ h("span", {
|
|
10741
|
+
className: `select-rating__star${a === 1 ? " is-filled" : ""}`,
|
|
10734
10742
|
children: /* @__PURE__ */ h(fl, { size: r })
|
|
10735
10743
|
});
|
|
10736
10744
|
return l ? /* @__PURE__ */ h("button", {
|
|
@@ -10741,8 +10749,8 @@ var pl = r(function({ value: e, max: t = 5, onChange: n, size: r = 20, label: i,
|
|
|
10741
10749
|
onFocus: () => d(t + 1),
|
|
10742
10750
|
onBlur: () => d(null),
|
|
10743
10751
|
onClick: () => n == null ? void 0 : n(t + 1),
|
|
10744
|
-
children:
|
|
10745
|
-
}, t) : /* @__PURE__ */ h("span", { children:
|
|
10752
|
+
children: o
|
|
10753
|
+
}, t) : /* @__PURE__ */ h("span", { children: o }, t);
|
|
10746
10754
|
})
|
|
10747
10755
|
});
|
|
10748
10756
|
}), ml = r(function({ stars: e, max: t = 5, title: n, text: r, className: i, ...a }, o) {
|