@goliapkg/gds 0.9.2 → 0.9.3
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
|
@@ -3869,20 +3869,20 @@ var Y = o(function({ children: e, className: t, disabled: n, fullWidth: r, glass
|
|
|
3869
3869
|
})
|
|
3870
3870
|
});
|
|
3871
3871
|
}), Ti = o(function({ text: e, query: t, highlightClass: n = "bg-accent/20 text-accent", caseSensitive: r = !1, className: i, ...a }, o) {
|
|
3872
|
-
if (t === "") return /* @__PURE__ */ h("span", {
|
|
3872
|
+
if (t == null || t === "") return /* @__PURE__ */ h("span", {
|
|
3873
3873
|
className: i,
|
|
3874
3874
|
"data-component": "highlight",
|
|
3875
3875
|
ref: o,
|
|
3876
3876
|
...a,
|
|
3877
3877
|
children: e
|
|
3878
3878
|
});
|
|
3879
|
-
let s = r ? "g" : "gi",
|
|
3879
|
+
let s = e ?? "", c = t ?? "", l = r ? "g" : "gi", u = c.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), d = s.split(RegExp(`(${u})`, l));
|
|
3880
3880
|
return /* @__PURE__ */ h("span", {
|
|
3881
3881
|
className: q(i),
|
|
3882
3882
|
"data-component": "highlight",
|
|
3883
3883
|
ref: o,
|
|
3884
3884
|
...a,
|
|
3885
|
-
children:
|
|
3885
|
+
children: d.map((e, i) => (r ? e === t : e.toLowerCase() === t.toLowerCase()) ? /* @__PURE__ */ h("mark", {
|
|
3886
3886
|
className: q("bg-transparent", n),
|
|
3887
3887
|
children: e
|
|
3888
3888
|
}, i) : e)
|