componenteszw-package 1.0.33 → 1.0.35
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 +30 -19
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2311,7 +2311,7 @@ var ot = ({ options: e, multiple: t = !1, placeholder: n = "Select...", label: r
|
|
|
2311
2311
|
};
|
|
2312
2312
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
2313
2313
|
}, []), /* @__PURE__ */ u("div", {
|
|
2314
|
-
className: Q("w-[300px] text-sm", p),
|
|
2314
|
+
className: Q("w-[300px] text-sm relative", p),
|
|
2315
2315
|
ref: w,
|
|
2316
2316
|
children: [
|
|
2317
2317
|
r && /* @__PURE__ */ u("label", {
|
|
@@ -2325,27 +2325,38 @@ var ot = ({ options: e, multiple: t = !1, placeholder: n = "Select...", label: r
|
|
|
2325
2325
|
})
|
|
2326
2326
|
]
|
|
2327
2327
|
}),
|
|
2328
|
-
/* @__PURE__ */
|
|
2329
|
-
className: Q("border rounded-lg px-3 py-2 flex
|
|
2328
|
+
/* @__PURE__ */ u("div", {
|
|
2329
|
+
className: Q("border rounded-lg px-3 py-2 flex items-center cursor-pointer justify-between", m),
|
|
2330
2330
|
onClick: () => x(!b),
|
|
2331
|
-
children:
|
|
2332
|
-
className: "
|
|
2333
|
-
children:
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
children:
|
|
2345
|
-
|
|
2331
|
+
children: [/* @__PURE__ */ l("span", {
|
|
2332
|
+
className: "flex-1 flex flex-wrap gap-2",
|
|
2333
|
+
children: t && Array.isArray(d) ? d.length > 0 ? d.map((t) => /* @__PURE__ */ u("span", {
|
|
2334
|
+
className: "bg-gray-200 px-2 py-1 rounded flex items-center gap-1",
|
|
2335
|
+
children: [e.find((e) => e.value === t)?.label, /* @__PURE__ */ l("button", {
|
|
2336
|
+
onClick: (e) => {
|
|
2337
|
+
e.stopPropagation(), te(t);
|
|
2338
|
+
},
|
|
2339
|
+
children: "×"
|
|
2340
|
+
})]
|
|
2341
|
+
}, t)) : /* @__PURE__ */ l("span", {
|
|
2342
|
+
className: "text-gray-400",
|
|
2343
|
+
children: n
|
|
2344
|
+
}) : /* @__PURE__ */ l("span", { children: e.find((e) => e.value === d)?.label || /* @__PURE__ */ l("span", {
|
|
2345
|
+
className: "text-gray-400",
|
|
2346
|
+
children: n
|
|
2347
|
+
}) })
|
|
2348
|
+
}), /* @__PURE__ */ l("span", {
|
|
2349
|
+
style: {
|
|
2350
|
+
transition: "transform 200ms",
|
|
2351
|
+
transform: b ? "rotate(180deg)" : "rotate(0deg)",
|
|
2352
|
+
marginLeft: "8px",
|
|
2353
|
+
flexShrink: 0
|
|
2354
|
+
},
|
|
2355
|
+
children: "▾"
|
|
2356
|
+
})]
|
|
2346
2357
|
}),
|
|
2347
2358
|
b && /* @__PURE__ */ u("div", {
|
|
2348
|
-
className: Q("border rounded-lg mt-2 p-2 bg-white shadow", h),
|
|
2359
|
+
className: Q("border rounded-lg mt-2 p-2 bg-white shadow absolute w-full z-50", h),
|
|
2349
2360
|
children: [/* @__PURE__ */ l("input", {
|
|
2350
2361
|
type: "text",
|
|
2351
2362
|
placeholder: "Buscar...",
|