lizaui 3.0.18 → 3.0.19
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/button/index.cjs.js +1 -1
- package/dist/button/index.es.js +1 -1
- package/dist/calendar/index.cjs.js +1 -1
- package/dist/calendar/index.es.js +1 -1
- package/dist/chunks/{button-BFiQhp-f.js → button-DY6HAc8R.js} +1047 -907
- package/dist/chunks/button-DY6HAc8R.js.map +1 -0
- package/dist/chunks/button-DbkElM5k.js +10 -0
- package/dist/chunks/button-DbkElM5k.js.map +1 -0
- package/dist/chunks/index-BxJKdzwL.js +6383 -0
- package/dist/chunks/index-BxJKdzwL.js.map +1 -0
- package/dist/chunks/index-Dtsw1VqP.js +65 -0
- package/dist/chunks/index-Dtsw1VqP.js.map +1 -0
- package/dist/components/ui/switch.d.ts +1 -1
- package/dist/components/ui/switch.d.ts.map +1 -1
- package/dist/pagination/index.cjs.js +1 -1
- package/dist/pagination/index.es.js +2 -2
- package/dist/types/switch.type.d.ts +3 -0
- package/dist/types/switch.type.d.ts.map +1 -1
- package/dist/ui/index.cjs.js +1 -1
- package/dist/ui/index.cjs.js.map +1 -1
- package/dist/ui/index.es.js +4 -4
- package/dist/ui/index.es.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/button-BFiQhp-f.js.map +0 -1
- package/dist/chunks/button-CBLcH0I-.js +0 -10
- package/dist/chunks/button-CBLcH0I-.js.map +0 -1
- package/dist/chunks/index-jBeQP53E.js +0 -65
- package/dist/chunks/index-jBeQP53E.js.map +0 -1
- package/dist/chunks/index-ui7isTRa.js +0 -5030
- package/dist/chunks/index-ui7isTRa.js.map +0 -1
|
@@ -6,7 +6,7 @@ declare const SwitchClassProps: (props?: ({
|
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
export type SwitchProps = VariantProps<typeof SwitchClassProps> & SwitchComponentType;
|
|
8
8
|
export declare const Switch: {
|
|
9
|
-
({ id, color, size, className, disabled, label, description, positionLabel, required, error, touched, value, onChange, ...props }: SwitchProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
({ id, color, size, className, disabled, label, description, positionLabel, required, error, touched, value, leftIcon, rightIcon, thumbIcon, onChange, ...props }: SwitchProps): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
displayName: string;
|
|
11
11
|
};
|
|
12
12
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../../src/components/ui/switch.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAQlE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,QAAA,MAAM,gBAAgB;;;8EAoBpB,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,YAAY,CAAC,OAAO,gBAAgB,CAAC,GAAG,mBAAmB,CAAC;AAEtF,eAAO,MAAM,MAAM;
|
|
1
|
+
{"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../../src/components/ui/switch.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAQlE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,QAAA,MAAM,gBAAgB;;;8EAoBpB,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,YAAY,CAAC,OAAO,gBAAgB,CAAC,GAAG,mBAAmB,CAAC;AAEtF,eAAO,MAAM,MAAM;uKAkBhB,WAAW;;CAsHb,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../chunks/jsx-runtime-DFswc9zO.js"),p=require("../chunks/bundle-mjs-Bta93uUH.js"),y=require("../chunks/index-CeBD7F1N.js"),h=require("react"),d=require("../chunks/clsx-C11secjj.js"),m=require("../chunks/index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../chunks/jsx-runtime-DFswc9zO.js"),p=require("../chunks/bundle-mjs-Bta93uUH.js"),y=require("../chunks/index-CeBD7F1N.js"),h=require("react"),d=require("../chunks/clsx-C11secjj.js"),m=require("../chunks/index-Dtsw1VqP.js");require("../chunks/button-DbkElM5k.js");const R=({className:o,color:e="primary",active:t,children:a,text:r,onClick:c})=>{const l=d.clsx({"bg-primary":e==="primary"&&t,"bg-success":e==="success"&&t,"bg-danger":e==="danger"&&t,"bg-warning":e==="warning"&&t,"bg-default":e==="default"&&t}),u=p.twMerge(d.clsx("text-sm",{"group-hover:text-primary-500":e==="primary"&&!t,"group-hover:text-success-500":e==="success"&&!t,"group-hover:text-danger-500":e==="danger"&&!t,"group-hover:text-warning-500":e==="warning"&&!t,"group-hover:text-default-500":e==="default"&&!t,"text-default-foreground":t&&e==="default","text-primary-foreground":t&&e==="primary","text-success-foreground":t&&e==="success","text-danger-foreground":t&&e==="danger","text-warning-foreground":t&&e==="warning"}));return s.jsxRuntimeExports.jsx("div",{className:p.twMerge("w-[33px] h-[32px] flex items-center justify-center group",l,o),onClick:c,children:a||s.jsxRuntimeExports.jsx("p",{className:u,children:r})})},b=({page:o,total:e,siblings:t=1})=>{if(7+t>=e)return Array.from({length:e},(n,x)=>x+1);const r=Math.max(o-t,1),c=Math.min(o+t,e),l=r>2,u=c<e-2;if(!l&&u){const n=3+2*t;return[...Array.from({length:n},(g,j)=>j+1),"...",e]}else if(l&&!u){const n=3+2*t;return[1,"...",...Array.from({length:n},(g,j)=>e-n+j+1)]}else return[1,"...",...Array.from({length:c-r+1},(x,g)=>r+g),"...",e]},P=o=>o.map(e=>({id:e,name:e})),I=({className:o,color:e="primary",total:t,limit:a=20,page:r=1,siblings:c=1,isLimitSelect:l=!0,dataLimit:u=[10,15,20,50,100,200],onChange:n})=>{const x=Math.ceil(t/a),g=b({page:r,siblings:c,total:x}),j=P(u),E=i=>{i!=="..."&&n&&n({limit:a,page:Number(i)})},N=()=>{r!==1&&n&&n({limit:a,page:r-1})},w=()=>{r===x||x===0||n&&n({limit:a,page:r+1})},S=i=>{n&&n({page:r,limit:i?Number(i):20})};return s.jsxRuntimeExports.jsxs("div",{className:p.twMerge("flex justify-between gap-x-2 items-center",o),children:[l?s.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-x-2.5",children:[s.jsxRuntimeExports.jsx("div",{children:s.jsxRuntimeExports.jsx("span",{className:"text-sm text-gray-500",children:"Filas por pagina"})}),s.jsxRuntimeExports.jsxs(m.Select,{value:a==null?void 0:a.toString(),onValueChange:S,children:[s.jsxRuntimeExports.jsx(m.SelectTrigger,{className:"min-w-20",children:s.jsxRuntimeExports.jsx(m.SelectValue,{placeholder:"Select a fruit"})}),s.jsxRuntimeExports.jsx(m.SelectContent,{children:s.jsxRuntimeExports.jsxs(m.SelectGroup,{children:[s.jsxRuntimeExports.jsx(m.SelectLabel,{children:"Limites"}),j.map(i=>{var f;return s.jsxRuntimeExports.jsx(m.SelectItem,{value:(f=i.id)==null?void 0:f.toString(),children:i.name},i.id)})]})})]}),s.jsxRuntimeExports.jsxs("div",{className:"text-sm text-gray-500",children:[s.jsxRuntimeExports.jsx("span",{className:"text-gray-900",children:`${r} - ${a}`})," de ",s.jsxRuntimeExports.jsx("span",{className:"text-gray-900",children:t})]})]}):null,s.jsxRuntimeExports.jsxs("div",{className:"flex items-center border border-gray-300 bg-white rounded-lg cursor-pointer",children:[s.jsxRuntimeExports.jsx(R,{className:d.clsx(r===1&&"cursor-no-drop"),onClick:N,children:s.jsxRuntimeExports.jsx(y.IoIosArrowBack,{className:p.twMerge("fill-gray-500",d.clsx(r===1&&"fill-gray-300"))})}),g.map((i,f)=>s.jsxRuntimeExports.jsx(R,{text:i,active:r===i,color:e,onClick:()=>E(i),className:"border-l"},f)),s.jsxRuntimeExports.jsx(R,{className:d.clsx("border-l",(r===x||x===0)&&"cursor-no-drop"),onClick:w,children:s.jsxRuntimeExports.jsx(y.IoIosArrowBack,{className:p.twMerge("fill-gray-500 transform rotate-180",d.clsx((r===x||x===0)&&"fill-gray-300"))})})]})]})},M=({initialPage:o=1,initialLimit:e=20})=>{const[t,a]=h.useState(o),[r,c]=h.useState(e);return{handleSetPagination:h.useCallback(({page:u,limit:n})=>{u!==t&&a(u),n!==r&&c(n)},[r,t]),page:t,limit:r}};exports.Pagination=I;exports.usePagination=M;
|
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -3,8 +3,8 @@ import { t as f } from "../chunks/bundle-mjs-kGHm2Pod.js";
|
|
|
3
3
|
import { I as j } from "../chunks/index-DK44x_HP.js";
|
|
4
4
|
import { useState as y, useCallback as P } from "react";
|
|
5
5
|
import { c as g } from "../chunks/clsx-OuTLNxxd.js";
|
|
6
|
-
import { S as I, a as C, b as R, c as A, d as L, e as k, f as F } from "../chunks/index-
|
|
7
|
-
import "../chunks/button-
|
|
6
|
+
import { S as I, a as C, b as R, c as A, d as L, e as k, f as F } from "../chunks/index-BxJKdzwL.js";
|
|
7
|
+
import "../chunks/button-DY6HAc8R.js";
|
|
8
8
|
const p = ({
|
|
9
9
|
className: c,
|
|
10
10
|
color: e = "primary",
|
|
@@ -74,5 +74,8 @@ export type SwitchComponentType = {
|
|
|
74
74
|
* Propiedad para brindar clases personalizadas al componente
|
|
75
75
|
*/
|
|
76
76
|
className?: string;
|
|
77
|
+
leftIcon?: React.ReactNode;
|
|
78
|
+
rightIcon?: React.ReactNode;
|
|
79
|
+
thumbIcon?: React.ReactNode;
|
|
77
80
|
};
|
|
78
81
|
//# sourceMappingURL=switch.type.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.type.d.ts","sourceRoot":"","sources":["../../src/types/switch.type.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,mBAAmB,GAAG;IACjC,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB;;;;;;;OAOG;IACH,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