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 CHANGED
@@ -7,6 +7,7 @@ type CardRowProps = {
7
7
  hoverClassName?: string;
8
8
  skeletonClassName?: string;
9
9
  clickable?: boolean;
10
+ title?: string;
10
11
  };
11
12
  export declare const CardRow: React.FC<CardRowProps>;
12
13
  export {};
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
- label?: string;
4
+ labelActivo?: string;
5
+ labelInactivo?: string;
5
6
  disabled?: boolean;
6
7
  className?: string;
7
8
  };
8
- export declare function Switch({ checked, onChange, label, disabled, className, }: SwitchProps): import("react/jsx-runtime").JSX.Element;
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__ */ l("div", {
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: Q("min-h-[72px] px-6 py-4 flex items-center justify-between", r),
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, label: n, disabled: r = !1, className: i = "" }) {
2379
- let [a, o] = s(e);
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 ${i}`,
2382
- children: [/* @__PURE__ */ l("button", {
2383
- type: "button",
2384
- role: "switch",
2385
- "aria-checked": a,
2386
- disabled: r,
2387
- onClick: () => {
2388
- if (r) return;
2389
- let e = !a;
2390
- o(e), t?.(e);
2391
- },
2392
- className: `
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 focus:ring-2 focus:ring-offset-2 focus:ring-green-500
2395
- ${a ? "bg-green-500" : "bg-gray-300"}
2396
- ${r ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}
2406
+ focus:outline-none
2407
+ bg-gray-300
2408
+ ${i ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}
2397
2409
  `,
2398
- children: /* @__PURE__ */ l("span", { className: `
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
- ${a ? "translate-x-6" : "translate-x-1"}
2412
+ ${o ? "translate-x-6" : "translate-x-1"}
2401
2413
  ` })
2402
- }), n && /* @__PURE__ */ l("span", {
2403
- className: "text-sm font-medium",
2404
- children: n
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "componenteszw-package",
3
- "version": "1.0.29",
3
+ "version": "1.0.30",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",