@novie/ui 1.0.3 → 1.0.4
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/components/ui/search-input.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +11 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/index.css +9 -1
package/dist/index.js
CHANGED
|
@@ -5059,10 +5059,10 @@ function gi({ className: e, inputSize: t = "sm", clearable: n = !0, onClear: r,
|
|
|
5059
5059
|
}, b = String(_).length > 0, x = n && b && !c && !s, S = s && !c;
|
|
5060
5060
|
return /* @__PURE__ */ a("div", {
|
|
5061
5061
|
"data-slot": "search-input",
|
|
5062
|
-
className: w("flex items-center gap-2 rounded-full border border-
|
|
5062
|
+
className: w("flex w-80 max-w-full items-center gap-2 rounded-full border border-transparent bg-background px-2", "transition-colors focus-within:border-input", (b || S) && "border-input", t === "sm" && "h-8", t === "default" && "h-10", t === "default" && "pl-3", c && "cursor-not-allowed border-transparent bg-interactive-disabled", e),
|
|
5063
5063
|
children: [
|
|
5064
5064
|
/* @__PURE__ */ i("span", {
|
|
5065
|
-
className:
|
|
5065
|
+
className: "inline-flex size-[22.8px] shrink-0 items-center justify-center text-foreground [&_svg]:h-[16.8px] [&_svg]:w-[16.8px]",
|
|
5066
5066
|
children: /* @__PURE__ */ i(ye, {})
|
|
5067
5067
|
}),
|
|
5068
5068
|
/* @__PURE__ */ i(On, {
|
|
@@ -5071,20 +5071,24 @@ function gi({ className: e, inputSize: t = "sm", clearable: n = !0, onClear: r,
|
|
|
5071
5071
|
value: _,
|
|
5072
5072
|
onChange: v,
|
|
5073
5073
|
placeholder: f,
|
|
5074
|
-
className: w("h-
|
|
5074
|
+
className: w("h-5 min-w-0 flex-1 border-0 bg-transparent px-0 py-0 text-input-text text-foreground shadow-none ring-0 ring-offset-0", "focus-visible:shadow-none focus-visible:ring-0 focus-visible:ring-offset-0", "placeholder:text-[hsl(var(--text-primary-secondary))] focus:placeholder:text-foreground", "disabled:text-[hsl(var(--text-primary-tertiary))] disabled:placeholder:text-[hsl(var(--text-primary-tertiary))] disabled:opacity-100", "[&::-webkit-search-cancel-button]:hidden [&::-webkit-search-decoration]:hidden"),
|
|
5075
5075
|
...p
|
|
5076
5076
|
}),
|
|
5077
5077
|
S && /* @__PURE__ */ i("span", {
|
|
5078
|
-
className: "inline-flex shrink-0 animate-spin text-
|
|
5078
|
+
className: "inline-flex size-6 shrink-0 animate-spin items-center justify-center text-foreground [&_svg]:h-6 [&_svg]:w-6",
|
|
5079
5079
|
children: /* @__PURE__ */ i(Qt, {})
|
|
5080
5080
|
}),
|
|
5081
|
-
x && /* @__PURE__ */
|
|
5081
|
+
x && /* @__PURE__ */ a("button", {
|
|
5082
5082
|
type: "button",
|
|
5083
|
+
"data-slot": "search-input-clear",
|
|
5083
5084
|
onClick: y,
|
|
5084
5085
|
disabled: c,
|
|
5085
|
-
className: w("inline-flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-full disabled:pointer-events-none disabled:cursor-not-allowed", "
|
|
5086
|
+
className: w("relative inline-flex h-6 w-6 shrink-0 cursor-pointer appearance-none items-center justify-center overflow-hidden rounded-full disabled:pointer-events-none disabled:cursor-not-allowed", "text-foreground transition-colors hover:text-foreground", "focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring"),
|
|
5086
5087
|
"aria-label": "Clear search",
|
|
5087
|
-
children: /* @__PURE__ */ i(
|
|
5088
|
+
children: [/* @__PURE__ */ i("span", {
|
|
5089
|
+
"data-slot": "search-input-clear-background",
|
|
5090
|
+
className: "absolute inset-0 rounded-full bg-muted transition-opacity"
|
|
5091
|
+
}), /* @__PURE__ */ i(re, { className: "relative h-4 w-4" })]
|
|
5088
5092
|
})
|
|
5089
5093
|
]
|
|
5090
5094
|
});
|