componenteszw-package 1.0.29 → 1.0.30
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/Card.d.ts +1 -0
- package/dist/Switch.d.ts +3 -2
- package/dist/index.js +42 -27
- package/package.json +1 -1
package/dist/Card.d.ts
CHANGED
package/dist/Switch.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
type SwitchProps = {
|
|
2
2
|
checked?: boolean;
|
|
3
3
|
onChange?: (checked: boolean) => void;
|
|
4
|
-
|
|
4
|
+
labelActivo?: string;
|
|
5
|
+
labelInactivo?: string;
|
|
5
6
|
disabled?: boolean;
|
|
6
7
|
className?: string;
|
|
7
8
|
};
|
|
8
|
-
export declare function Switch({ checked, onChange,
|
|
9
|
+
export declare function Switch({ checked, onChange, labelActivo, labelInactivo, disabled, className, }: SwitchProps): import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
export {};
|
package/dist/index.js
CHANGED
|
@@ -2071,11 +2071,17 @@ var tt = ({ title: e, subtitle: n, iconFile: r, loading: i = !1, state: a = "def
|
|
|
2071
2071
|
})]
|
|
2072
2072
|
})]
|
|
2073
2073
|
});
|
|
2074
|
-
}, nt = ({ children: e, onClick: t, className: n, contentClassName: r, hoverClassName: i, skeletonClassName: a, clickable: o = !0 }) => /* @__PURE__ */
|
|
2074
|
+
}, nt = ({ children: e, onClick: t, className: n, contentClassName: r, hoverClassName: i, skeletonClassName: a, clickable: o = !0, title: s }) => /* @__PURE__ */ u("div", {
|
|
2075
2075
|
onClick: t,
|
|
2076
2076
|
className: Q("w-full bg-white rounded-2xl border border-gray-200 shadow-sm overflow-hidden transition-all duration-200", o && "cursor-pointer", o && "hover:shadow-md", i, n),
|
|
2077
|
-
children: /* @__PURE__ */ l("div", {
|
|
2078
|
-
className:
|
|
2077
|
+
children: [s && /* @__PURE__ */ l("div", {
|
|
2078
|
+
className: "px-6 py-4 border-b border-gray-200",
|
|
2079
|
+
children: /* @__PURE__ */ l("span", {
|
|
2080
|
+
className: "font-semibold text-base",
|
|
2081
|
+
children: s
|
|
2082
|
+
})
|
|
2083
|
+
}), /* @__PURE__ */ l("div", {
|
|
2084
|
+
className: r ?? "min-h-[72px] px-6 py-4 flex items-center justify-between",
|
|
2079
2085
|
children: e || /* @__PURE__ */ u(c, { children: [
|
|
2080
2086
|
/* @__PURE__ */ l("div", { className: Q("flex-1 h-5 rounded-md bg-gray-100", a) }),
|
|
2081
2087
|
/* @__PURE__ */ l("div", { className: Q("w-24 h-5 rounded-md bg-gray-100 ml-6", a) }),
|
|
@@ -2083,7 +2089,7 @@ var tt = ({ title: e, subtitle: n, iconFile: r, loading: i = !1, state: a = "def
|
|
|
2083
2089
|
/* @__PURE__ */ l("div", { className: Q("w-32 h-5 rounded-md bg-gray-100 ml-6", a) }),
|
|
2084
2090
|
/* @__PURE__ */ l("div", { className: Q("w-6 h-6 rounded-md bg-gray-100 ml-6", a) })
|
|
2085
2091
|
] })
|
|
2086
|
-
})
|
|
2092
|
+
})]
|
|
2087
2093
|
}), rt = ({ open: e, onClose: n, variant: r = "content", title: i, description: a, children: o, primaryAction: s, secondaryAction: c, size: d = "medium", closeOnOverlayClick: f = !0, closeOnEsc: p = !0, hideIcon: m = !1, className: h, overlayClassName: g, contentClassName: _, headerClassName: v, bodyClassName: y, footerClassName: b, iconClassName: x, titleClassName: S, descriptionClassName: C }) => {
|
|
2088
2094
|
if (t.useEffect(() => {
|
|
2089
2095
|
if (!e) return;
|
|
@@ -2375,34 +2381,43 @@ var ot = ({ options: e, multiple: t = !1, placeholder: n = "Select...", label: r
|
|
|
2375
2381
|
};
|
|
2376
2382
|
//#endregion
|
|
2377
2383
|
//#region src/Switch.tsx
|
|
2378
|
-
function st({ checked: e = !1, onChange: t,
|
|
2379
|
-
let [
|
|
2384
|
+
function st({ checked: e = !1, onChange: t, labelActivo: n = "Activo", labelInactivo: r = "Inactivo", disabled: i = !1, className: a = "" }) {
|
|
2385
|
+
let [o, c] = s(e);
|
|
2380
2386
|
return /* @__PURE__ */ u("div", {
|
|
2381
|
-
className: `flex items-center gap-2 ${
|
|
2382
|
-
children: [
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2387
|
+
className: `flex items-center gap-2 ${a}`,
|
|
2388
|
+
children: [
|
|
2389
|
+
/* @__PURE__ */ l("span", {
|
|
2390
|
+
className: "text-sm font-medium",
|
|
2391
|
+
style: { color: o ? "#BB2111" : void 0 },
|
|
2392
|
+
children: n
|
|
2393
|
+
}),
|
|
2394
|
+
/* @__PURE__ */ l("button", {
|
|
2395
|
+
type: "button",
|
|
2396
|
+
role: "switch",
|
|
2397
|
+
"aria-checked": o,
|
|
2398
|
+
disabled: i,
|
|
2399
|
+
onClick: () => {
|
|
2400
|
+
if (i) return;
|
|
2401
|
+
let e = !o;
|
|
2402
|
+
c(e), t?.(e);
|
|
2403
|
+
},
|
|
2404
|
+
className: `
|
|
2393
2405
|
relative inline-flex h-6 w-11 items-center rounded-full transition-colors duration-200
|
|
2394
|
-
focus:outline-none
|
|
2395
|
-
|
|
2396
|
-
${
|
|
2406
|
+
focus:outline-none
|
|
2407
|
+
bg-gray-300
|
|
2408
|
+
${i ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}
|
|
2397
2409
|
`,
|
|
2398
|
-
|
|
2410
|
+
children: /* @__PURE__ */ l("span", { className: `
|
|
2399
2411
|
inline-block h-4 w-4 transform rounded-full bg-white shadow transition-transform duration-200
|
|
2400
|
-
${
|
|
2412
|
+
${o ? "translate-x-6" : "translate-x-1"}
|
|
2401
2413
|
` })
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2414
|
+
}),
|
|
2415
|
+
/* @__PURE__ */ l("span", {
|
|
2416
|
+
className: "text-sm font-medium",
|
|
2417
|
+
style: { color: o ? void 0 : "#BB2111" },
|
|
2418
|
+
children: r
|
|
2419
|
+
})
|
|
2420
|
+
]
|
|
2406
2421
|
});
|
|
2407
2422
|
}
|
|
2408
2423
|
//#endregion
|