@simpli-route/apollo-ds 0.0.21 → 0.0.22

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.
@@ -1,3 +1,3 @@
1
1
  import { AccordionProps } from './types';
2
2
 
3
- export declare const Accordion: ({ items, accordionClassName, itemClassName, sectionClassName, hasIcon }: AccordionProps) => import("react/jsx-runtime").JSX.Element;
3
+ export declare const Accordion: ({ items, accordionClassName, itemClassName, sectionClassName, hasIcon, allowMultipleOpen, }: AccordionProps) => import("react/jsx-runtime").JSX.Element;
@@ -13,6 +13,11 @@ type ItemProps = {
13
13
  };
14
14
  export interface AccordionProps {
15
15
  items: ItemProps[];
16
+ /**
17
+ * Define whether the accordion is allowed to be multiple open or not
18
+ * @default false
19
+ */
20
+ allowMultipleOpen?: boolean;
16
21
  /**
17
22
  * Defines the styling for accordion container (optional)
18
23
  */
@@ -27,6 +32,7 @@ export interface AccordionProps {
27
32
  sectionClassName?: string;
28
33
  /**
29
34
  * Defines whether or not to show the plus or minus icon
35
+ * @default true
30
36
  */
31
37
  hasIcon?: boolean;
32
38
  }
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("class-variance-authority"),r=e.cva("inline-flex select-none items-center justify-center text-center text-base font-semibold leading-6 transition duration-150 ease-in-out focus:outline-none",{variants:{intent:{primary:"bg-primary-500 text-primary-50",secondary:"border border-primary-500 bg-primary-50 text-primary-500",tertiary:"text-primary-500",outline:"border border-primary-500 text-primary-500",success:"border bg-success-500 text-success-50",error:"border bg-error-500 text-error-50",orangeWarning:"border bg-orange-warning-500 text-orange-warning-50",yellowWarning:"border bg-yellow-warning-500 text-[#6F5711]",info:"border bg-blue-500 text-blue-50"},size:{xs:"rounded px-3 py-1",sm:"rounded px-3 py-2",md:"rounded-lg px-4 py-3",lg:"rounded-lg px-6 py-4"},isDisabled:{true:"pointer-events-none cursor-not-allowed border-none bg-neutral-400 text-neutral-600"},isHovered:{true:""},isActive:{true:""},fullWidth:{true:"w-full",false:"w-fit"},isLoading:{true:"pointer-events-none cursor-not-allowed opacity-70"},isFocused:{true:"focus:outline-none focus:ring-2 focus:ring-sky-400 focus:ring-offset-[0.4px] border-none",false:""}},defaultVariants:{intent:"primary",size:"md"},compoundVariants:[{intent:"primary",isHovered:!0,class:"bg-primary-700"},{intent:"secondary",isHovered:!0,class:"bg-primary-200"},{intent:"tertiary",isHovered:!0,class:"bg-primary-300 text-primary-800"},{intent:"outline",isHovered:!0,class:"bg-primary-500 text-primary-50"},{intent:"success",isHovered:!0,class:"bg-success-700 text-neutral-50"},{intent:"error",isHovered:!0,class:"bg-error-700 text-error-50"},{intent:"orangeWarning",isHovered:!0,class:"bg-orange-warning-700 text-orange-warning-50"},{intent:"yellowWarning",isHovered:!0,class:"bg-yellow-warning-700 text-neutral-50"},{intent:"info",isHovered:!0,class:"bg-blue-700 text-blue-50"},{intent:"success",isFocused:!0,class:"border-[1.5px] focus:ring-success-500"},{intent:"error",isFocused:!0,class:"border-[1.5px] focus:ring-error-500"},{intent:"orangeWarning",isFocused:!0,class:"border-[1.5px] focus:ring-orange-500"},{intent:"yellowWarning",isFocused:!0,class:"border-[1.5px] focus:ring-yellow-500"},{intent:"info",isFocused:!0,class:"border-[1.5px] focus:ring-blue-500"},{intent:"primary",isActive:!0,class:"bg-primary-900"},{intent:"secondary",isActive:!0,class:"bg-primary-300"},{intent:"tertiary",isActive:!0,class:"bg-primary-500 text-white"},{intent:"outline",isActive:!0,class:"border border-primary-500 bg-primary-300 text-primary-500"},{intent:"success",isActive:!0,class:"border border-transparent bg-success-300 text-success-900"},{intent:"error",isActive:!0,class:"border border-transparent bg-error-300 text-error-900"},{intent:"orangeWarning",isActive:!0,class:"border border-transparent bg-orange-warning-300 text-orange-warning-900"},{intent:"yellowWarning",isActive:!0,class:"border border-transparent bg-yellow-warning-300 text-[#6F5711]"},{intent:"info",isActive:!0,class:"border border-transparent bg-blue-200 text-blue-900"}]});exports.buttonVariants=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index.cjs10.js"),n=require("./index.cjs24.js"),r=require("./index.cjs11.js"),m=({label:t,section:o,active:e,onToggle:i,itemClassName:c,sectionClassName:l,hasIcon:u=!0})=>{const x=r.cn("rounded-md border border-solid border-purple-200 bg-gray-100",c),d=r.cn("px-4 pb-4",l),a=e?n.MinusIcon:n.PlusIcon;return s.jsxRuntimeExports.jsxs("div",{className:x,children:[s.jsxRuntimeExports.jsxs("button",{className:"flex w-full cursor-pointer items-center gap-x-4 p-4",onClick:i,children:[s.jsxRuntimeExports.jsx("div",{className:"flex-1",children:t}),u?s.jsxRuntimeExports.jsx("span",{className:`shrink-0 transition duration-300 ${e?"-rotate-180":"rotate-0"}`,children:s.jsxRuntimeExports.jsx(a,{className:"size-6"})}):null]}),e?s.jsxRuntimeExports.jsx("div",{className:d,children:o}):null]})};exports.AccordionItem=m;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("class-variance-authority"),r=e.cva("flex h-5 w-5 shrink-0 cursor-pointer items-center justify-center rounded border-2 border-primary-200 text-white transition duration-150 ease-in-out",{variants:{isHovered:{true:""},isSelected:{true:"border-primary-500 bg-primary-500",false:"bg-white"},isFocusVisible:{true:"border-primary-500 group-active:border-primary-500"},isDisabled:{true:"border-neutral-500 cursor-not-allowed"},label:{true:"mr-2"}},compoundVariants:[{isHovered:!0,isSelected:!0,class:"border-none bg-primary-600 group-active:bg-primary-600"},{isHovered:!0,isSelected:!1,isDisabled:!1,class:"border-primary-700 group-active:bg-primary-600"},{isDisabled:!0,isSelected:!0,class:"bg-neutral-500"}]});exports.checkboxVariants=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("class-variance-authority"),r=e.cva("inline-flex select-none items-center justify-center text-center text-base font-semibold leading-6 transition duration-150 ease-in-out focus:outline-none",{variants:{intent:{primary:"bg-primary-500 text-primary-50",secondary:"border border-primary-500 bg-primary-50 text-primary-500",tertiary:"text-primary-500",outline:"border border-primary-500 text-primary-500",success:"border bg-success-500 text-success-50",error:"border bg-error-500 text-error-50",orangeWarning:"border bg-orange-warning-500 text-orange-warning-50",yellowWarning:"border bg-yellow-warning-500 text-[#6F5711]",info:"border bg-blue-500 text-blue-50"},size:{xs:"rounded px-3 py-1",sm:"rounded px-3 py-2",md:"rounded-lg px-4 py-3",lg:"rounded-lg px-6 py-4"},isDisabled:{true:"pointer-events-none cursor-not-allowed border-none bg-neutral-400 text-neutral-600"},isHovered:{true:""},isActive:{true:""},fullWidth:{true:"w-full",false:"w-fit"},isLoading:{true:"pointer-events-none cursor-not-allowed opacity-70"},isFocused:{true:"focus:outline-none focus:ring-2 focus:ring-sky-400 focus:ring-offset-[0.4px] border-none",false:""}},defaultVariants:{intent:"primary",size:"md"},compoundVariants:[{intent:"primary",isHovered:!0,class:"bg-primary-700"},{intent:"secondary",isHovered:!0,class:"bg-primary-200"},{intent:"tertiary",isHovered:!0,class:"bg-primary-300 text-primary-800"},{intent:"outline",isHovered:!0,class:"bg-primary-500 text-primary-50"},{intent:"success",isHovered:!0,class:"bg-success-700 text-neutral-50"},{intent:"error",isHovered:!0,class:"bg-error-700 text-error-50"},{intent:"orangeWarning",isHovered:!0,class:"bg-orange-warning-700 text-orange-warning-50"},{intent:"yellowWarning",isHovered:!0,class:"bg-yellow-warning-700 text-neutral-50"},{intent:"info",isHovered:!0,class:"bg-blue-700 text-blue-50"},{intent:"success",isFocused:!0,class:"border-[1.5px] focus:ring-success-500"},{intent:"error",isFocused:!0,class:"border-[1.5px] focus:ring-error-500"},{intent:"orangeWarning",isFocused:!0,class:"border-[1.5px] focus:ring-orange-500"},{intent:"yellowWarning",isFocused:!0,class:"border-[1.5px] focus:ring-yellow-500"},{intent:"info",isFocused:!0,class:"border-[1.5px] focus:ring-blue-500"},{intent:"primary",isActive:!0,class:"bg-primary-900"},{intent:"secondary",isActive:!0,class:"bg-primary-300"},{intent:"tertiary",isActive:!0,class:"bg-primary-500 text-white"},{intent:"outline",isActive:!0,class:"border border-primary-500 bg-primary-300 text-primary-500"},{intent:"success",isActive:!0,class:"border border-transparent bg-success-300 text-success-900"},{intent:"error",isActive:!0,class:"border border-transparent bg-error-300 text-error-900"},{intent:"orangeWarning",isActive:!0,class:"border border-transparent bg-orange-warning-300 text-orange-warning-900"},{intent:"yellowWarning",isActive:!0,class:"border border-transparent bg-yellow-warning-300 text-[#6F5711]"},{intent:"info",isActive:!0,class:"border border-transparent bg-blue-200 text-blue-900"}]});exports.buttonVariants=r;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("class-variance-authority"),r=e.cva("relative rounded-full transition-colors duration-300",{variants:{isSelected:{true:"bg-primary-500",false:"bg-neutral-50 border border-primary-200"},isDisabled:{true:"cursor-not-allowed bg-neutral-400 border-none",false:"cursor-pointer"},isHoveredWhenOff:{true:"bg-neutral-200 border-primary-700",false:""},isFocusVisible:{true:"ring-2 ring-sky-400 ring-offset-2",false:""},size:{sm:"w-[42px] h-[24px]",md:"w-[56px] h-[32px]"}},defaultVariants:{size:"md",isSelected:!1,isDisabled:!1,isFocusVisible:!1,isHoveredWhenOff:!1},compoundVariants:[{isSelected:!1,isDisabled:!1,class:"hover:bg-neutral-200 hover:border-primary-700"},{isSelected:!0,isDisabled:!1,class:"hover:bg-primary-700"},{isSelected:!1,isDisabled:!0,class:"bg-neutral-400 border-none"},{isSelected:!0,isDisabled:!0,class:"bg-neutral-500"}]}),s=e.cva("absolute top-1/2 transform -translate-y-1/2 transition-all duration-300 rounded-full",{variants:{isSelected:{true:"bg-primary-50",false:"bg-primary-200 border border-primary-200"},isDisabled:{true:"bg-neutral-600 border-none",false:""},isHoveredWhenOff:{true:"bg-primary-700 border-primary-700",false:""},size:{sm:"w-[20px] h-[20px]",md:"w-[24px] h-[24px]"}},defaultVariants:{size:"md",isSelected:!1,isDisabled:!1,isHoveredWhenOff:!1},compoundVariants:[{isSelected:!0,isDisabled:!0,class:"bg-neutral-400"}]});exports.indicatorVariants=s;exports.switchVariants=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("class-variance-authority"),r=e.cva("flex h-5 w-5 shrink-0 cursor-pointer items-center justify-center rounded border-2 border-primary-200 text-white transition duration-150 ease-in-out",{variants:{isHovered:{true:""},isSelected:{true:"border-primary-500 bg-primary-500",false:"bg-white"},isFocusVisible:{true:"border-primary-500 group-active:border-primary-500"},isDisabled:{true:"border-neutral-500 cursor-not-allowed"},label:{true:"mr-2"}},compoundVariants:[{isHovered:!0,isSelected:!0,class:"border-none bg-primary-600 group-active:bg-primary-600"},{isHovered:!0,isSelected:!1,isDisabled:!1,class:"border-primary-700 group-active:bg-primary-600"},{isDisabled:!0,isSelected:!0,class:"bg-neutral-500"}]});exports.checkboxVariants=r;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("class-variance-authority"),e=t.cva("scroll-m-12 text-neutral-900",{variants:{size:{h1:"text-[2rem] font-bold leading-10",h2:"text-[1.75rem] font-bold leading-9",h3:"text-2xl font-semibold",h4:"text-[1.375rem] font-semibold leading-7",h5:"text-xl font-semibold",h6:"text-lg font-semibold"}}}),a=t.cva("",{variants:{type:{body:"text-base text-neutral-900",caption:"text-xs text-neutral-700"}}});exports.textVariants=a;exports.titleVariants=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("class-variance-authority"),r=e.cva("relative rounded-full transition-colors duration-300",{variants:{isSelected:{true:"bg-primary-500",false:"bg-neutral-50 border border-primary-200"},isDisabled:{true:"cursor-not-allowed bg-neutral-400 border-none",false:"cursor-pointer"},isHoveredWhenOff:{true:"bg-neutral-200 border-primary-700",false:""},isFocusVisible:{true:"ring-2 ring-sky-400 ring-offset-2",false:""},size:{sm:"w-[42px] h-[24px]",md:"w-[56px] h-[32px]"}},defaultVariants:{size:"md",isSelected:!1,isDisabled:!1,isFocusVisible:!1,isHoveredWhenOff:!1},compoundVariants:[{isSelected:!1,isDisabled:!1,class:"hover:bg-neutral-200 hover:border-primary-700"},{isSelected:!0,isDisabled:!1,class:"hover:bg-primary-700"},{isSelected:!1,isDisabled:!0,class:"bg-neutral-400 border-none"},{isSelected:!0,isDisabled:!0,class:"bg-neutral-500"}]}),s=e.cva("absolute top-1/2 transform -translate-y-1/2 transition-all duration-300 rounded-full",{variants:{isSelected:{true:"bg-primary-50",false:"bg-primary-200 border border-primary-200"},isDisabled:{true:"bg-neutral-600 border-none",false:""},isHoveredWhenOff:{true:"bg-primary-700 border-primary-700",false:""},size:{sm:"w-[20px] h-[20px]",md:"w-[24px] h-[24px]"}},defaultVariants:{size:"md",isSelected:!1,isDisabled:!1,isHoveredWhenOff:!1},compoundVariants:[{isSelected:!0,isDisabled:!0,class:"bg-neutral-400"}]});exports.indicatorVariants=s;exports.switchVariants=r;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index.cjs10.js"),n=require("./index.cjs24.js"),r=require("./index.cjs11.js"),m=({label:t,section:o,active:e,onToggle:i,itemClassName:c,sectionClassName:l,hasIcon:u=!0})=>{const x=r.cn("rounded-md border border-solid border-purple-200 bg-gray-100",c),d=r.cn("px-4 pb-4",l),a=e?n.MinusIcon:n.PlusIcon;return s.jsxRuntimeExports.jsxs("div",{className:x,children:[s.jsxRuntimeExports.jsxs("button",{className:"flex w-full cursor-pointer items-center gap-x-4 p-4",onClick:i,children:[s.jsxRuntimeExports.jsx("div",{className:"flex-1",children:t}),u?s.jsxRuntimeExports.jsx("span",{className:`shrink-0 transition duration-300 ${e?"-rotate-180":"rotate-0"}`,children:s.jsxRuntimeExports.jsx(a,{className:"size-6"})}):null]}),e?s.jsxRuntimeExports.jsx("div",{className:d,children:o}):null]})};exports.AccordionItem=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("class-variance-authority"),e=t.cva("scroll-m-12 text-neutral-900",{variants:{size:{h1:"text-[2rem] font-bold leading-10",h2:"text-[1.75rem] font-bold leading-9",h3:"text-2xl font-semibold",h4:"text-[1.375rem] font-semibold leading-7",h5:"text-xl font-semibold",h6:"text-lg font-semibold"}}}),a=t.cva("",{variants:{type:{body:"text-base text-neutral-900",caption:"text-xs text-neutral-700"}}});exports.textVariants=a;exports.titleVariants=e;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("class-variance-authority"),t=[{intent:"primary",isHovered:!0,isDisabled:!1,isActive:!1,class:"bg-primary-100"},{intent:"secondary",isHovered:!0,isDisabled:!1,isActive:!1,class:"bg-primary-500 text-primary-50"},{intent:"minimal",isHovered:!0,isDisabled:!1,isActive:!1,class:"bg-neutral-200 text-neutral-800"}],i=[{intent:"primary",isActive:!0,isDisabled:!1,class:"bg-primary-500 text-primary-50"},{intent:"primary",isActive:!0,isDisabled:!0,class:"bg-primary-300 text-primary-100"},{intent:"secondary",isActive:!0,isDisabled:!1,class:"bg-primary-500 text-primary-50"},{intent:"secondary",isActive:!0,isDisabled:!0,class:"bg-primary-100 text-primary-300"},{intent:"minimal",isActive:!0,isDisabled:!1,class:"text-primary-500"},{intent:"minimal",isActive:!0,isDisabled:!0,class:"text-neutral-700"}],s=[{intent:"primary",isDisabled:!0,isActive:!1,class:"text-neutral-600"},{intent:"primary",isDisabled:!0,isActive:!0,class:"bg-primary-300 text-primary-100"},{intent:"secondary",isDisabled:!0,isActive:!1,class:"bg-neutral-400 text-neutral-600"},{intent:"secondary",isDisabled:!0,isActive:!0,class:"bg-primary-100 text-primary-300"},{intent:"minimal",isDisabled:!0,isActive:!1,class:"text-neutral-600"},{intent:"minimal",isDisabled:!0,isActive:!0,class:"text-neutral-700"}],r=e.cva("inline-flex items-center justify-center border border-transparent transition duration-150 ease-in-out",{variants:{intent:{primary:"bg-transparent text-primary-500",secondary:"bg-primary-200 text-primary-500",minimal:"bg-transparent text-neutral-700"},size:{xxs:"p-1",xs:"p-2",sm:"p-2.5",md:"p-3",lg:"p-4"},isDisabled:{true:"pointer-events-none cursor-not-allowed"},isHovered:{true:""},isActive:{true:""},isFocused:{false:"",true:"focus:outline-none focus:ring-offset-2 outline-none ring-2 ring-sky-400"}},compoundVariants:[...t,...i,...s]});exports.buttonVariants=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index.cjs10.js"),i=require("./index.cjs11.js"),m=({label:e,description:s,errorMessage:x,isDisabled:n,isInvalid:l,children:r,renderLabelIcon:u})=>!e&&!s&&!r?null:t.jsxRuntimeExports.jsxs("div",{className:"flex flex-col",children:[e?t.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-x-1",children:[t.jsxRuntimeExports.jsx("p",{className:i.cn("text-sm font-semibold",n?"text-neutral-600":"text-neutral-900"),children:e}),u?t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:u}):null]}):r,s&&!x&&t.jsxRuntimeExports.jsx("p",{className:i.cn("text-xs",n?"text-neutral-600":"text-neutral-800"),children:s}),l&&x&&t.jsxRuntimeExports.jsx("p",{className:"text-sm text-red-500",children:x})]});exports.ContentSwitch=m;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index.cjs10.js"),i=require("./index.cjs11.js"),m=({label:e,description:s,errorMessage:x,isDisabled:n,isInvalid:l,children:r,renderLabelIcon:u})=>!e&&!s&&!r?null:t.jsxRuntimeExports.jsxs("div",{className:"flex flex-col",children:[e?t.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-x-1",children:[t.jsxRuntimeExports.jsx("p",{className:i.cn("text-sm font-semibold",n?"text-neutral-600":"text-neutral-900"),children:e}),u?t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:u}):null]}):r,s&&!x&&t.jsxRuntimeExports.jsx("p",{className:i.cn("text-xs",n?"text-neutral-600":"text-neutral-800"),children:s}),l&&x&&t.jsxRuntimeExports.jsx("p",{className:"text-sm text-red-500",children:x})]});exports.ContentSwitch=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index.cjs10.js"),s=require("./index.cjs11.js"),a=require("./index.cjs15.js"),c=({isSelected:t,isDisabled:e,isHovered:n,size:i,dimensions:r})=>o.jsxRuntimeExports.jsx("div",{className:s.cn(a.indicatorVariants({isSelected:t,isDisabled:e,size:i,isHoveredWhenOff:n&&!t})),style:{left:t?`${r.onLeft}px`:`${r.offLeft}px`}});exports.SwitchIndicator=c;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index.cjs10.js"),m=require("react"),g=require("./index.cjs11.js"),j=require("./index.cjs16.js"),p=({items:c,accordionClassName:s,itemClassName:i,sectionClassName:u,hasIcon:l})=>{const[o,a]=m.useState(null),d=g.cn("flex flex-col gap-y-4",s),x=e=>{a(e===o?null:e)};return r.jsxRuntimeExports.jsx("div",{className:d,children:c.map(({label:e,section:t},n)=>r.jsxRuntimeExports.jsx(j.AccordionItem,{hasIcon:l,label:e,section:t,active:o===n,itemClassName:i,sectionClassName:u,onToggle:()=>x(n)},n))})};exports.Accordion=p;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index.cjs10.js"),j=require("react"),q=require("./index.cjs11.js"),d=require("./index.cjs12.js"),x=({items:n,accordionClassName:c,itemClassName:i,sectionClassName:u,hasIcon:l,allowMultipleOpen:a=!1})=>{const[m,t]=j.useState([]),g=q.cn("flex flex-col gap-y-4",c),f=e=>{t(a?o=>o.includes(e)?o.filter(s=>s!==e):[...o,e]:o=>o.includes(e)?[]:[e])};return r.jsxRuntimeExports.jsx("div",{className:g,children:n.map(({label:e,section:o},s)=>r.jsxRuntimeExports.jsx(d.AccordionItem,{hasIcon:l,label:e,section:o,active:m.includes(s),itemClassName:i,sectionClassName:u,onToggle:()=>f(s)},s))})};exports.Accordion=x;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index.cjs10.js"),s=require("./index.cjs11.js"),a=require("./index.cjs14.js"),c=({isSelected:t,isDisabled:e,isHovered:n,size:i,dimensions:r})=>o.jsxRuntimeExports.jsx("div",{className:s.cn(a.indicatorVariants({isSelected:t,isDisabled:e,size:i,isHoveredWhenOff:n&&!t})),style:{left:t?`${r.onLeft}px`:`${r.offLeft}px`}});exports.SwitchIndicator=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("class-variance-authority"),t=[{intent:"primary",isHovered:!0,isDisabled:!1,isActive:!1,class:"bg-primary-100"},{intent:"secondary",isHovered:!0,isDisabled:!1,isActive:!1,class:"bg-primary-500 text-primary-50"},{intent:"minimal",isHovered:!0,isDisabled:!1,isActive:!1,class:"bg-neutral-200 text-neutral-800"}],i=[{intent:"primary",isActive:!0,isDisabled:!1,class:"bg-primary-500 text-primary-50"},{intent:"primary",isActive:!0,isDisabled:!0,class:"bg-primary-300 text-primary-100"},{intent:"secondary",isActive:!0,isDisabled:!1,class:"bg-primary-500 text-primary-50"},{intent:"secondary",isActive:!0,isDisabled:!0,class:"bg-primary-100 text-primary-300"},{intent:"minimal",isActive:!0,isDisabled:!1,class:"text-primary-500"},{intent:"minimal",isActive:!0,isDisabled:!0,class:"text-neutral-700"}],s=[{intent:"primary",isDisabled:!0,isActive:!1,class:"text-neutral-600"},{intent:"primary",isDisabled:!0,isActive:!0,class:"bg-primary-300 text-primary-100"},{intent:"secondary",isDisabled:!0,isActive:!1,class:"bg-neutral-400 text-neutral-600"},{intent:"secondary",isDisabled:!0,isActive:!0,class:"bg-primary-100 text-primary-300"},{intent:"minimal",isDisabled:!0,isActive:!1,class:"text-neutral-600"},{intent:"minimal",isDisabled:!0,isActive:!0,class:"text-neutral-700"}],r=e.cva("inline-flex items-center justify-center border border-transparent transition duration-150 ease-in-out focus:outline-none",{variants:{intent:{primary:"bg-transparent text-primary-500",secondary:"bg-primary-200 text-primary-500",minimal:"bg-transparent text-neutral-700"},size:{xxs:"p-1",xs:"p-2",sm:"p-2.5",md:"p-3",lg:"p-4"},isDisabled:{true:"pointer-events-none cursor-not-allowed"},isHovered:{true:""},isActive:{true:""},isFocused:{false:"",true:"focus:outline-none focus:ring-offset-2 outline-none ring-2 ring-sky-400"}},compoundVariants:[...t,...i,...s]});exports.buttonVariants=r;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index.cjs10.js"),E=require("react-aria-components"),p=require("./index.cjs11.js");require("react");const N=require("./index.cjs12.js");require("./index.cjs13.js");require("./index.cjs5.js");const w=require("./index.cjs6.js");require("./index.cjs14.js");require("./index.cjs15.js");const h=({renderPosition:e,leftIcon:u,rightIcon:c,isLoading:r,loaderPosition:n,loaderProps:t})=>{const i=e==="left"?u:e==="right"?c:null;return i||r&&n===e?s.jsxRuntimeExports.jsx("span",{className:e==="left"?"mr-1":"ml-1",children:r&&n===e?s.jsxRuntimeExports.jsx(w.Loader,{size:"sm",...t}):i}):null},y=e=>{const{intent:u="primary",size:c="md",leftIcon:r,rightIcon:n,isDisabled:t,children:i,className:q,isLoading:l,loaderPosition:x="left",loaderProps:f,fullWidth:R=!1,unstyled:d=!1,focus:j=!0,isMobileFullWidth:b=!1,...g}=e,v=(m,a,o)=>p.cn(d?"":N.buttonVariants({intent:u,size:c,isHovered:a||(j||!d?o:!1),isActive:m,isDisabled:t,isFocused:j||!d?o:!1,fullWidth:R,isLoading:l}),q);return s.jsxRuntimeExports.jsxs(E.Button,{"data-disabled":t||void 0,"data-loading":l||void 0,isDisabled:t,className:({isPressed:m,isHovered:a,isFocusVisible:o})=>v(m,a,o),...g,children:[s.jsxRuntimeExports.jsx(h,{renderPosition:"left",loaderPosition:x,loaderProps:f,isLoading:l,leftIcon:r}),s.jsxRuntimeExports.jsx("span",{className:p.cn("flex h-full items-center overflow-hidden whitespace-nowrap",b?"w-full":""),children:i}),s.jsxRuntimeExports.jsx(h,{renderPosition:"right",loaderPosition:x,loaderProps:f,isLoading:l,rightIcon:n})]})};exports.Button=y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index.cjs10.js"),E=require("react-aria-components"),p=require("./index.cjs11.js");require("react");const N=require("./index.cjs13.js");require("./index.cjs14.js");require("./index.cjs5.js");const w=require("./index.cjs6.js");require("./index.cjs15.js");require("./index.cjs16.js");const h=({renderPosition:e,leftIcon:u,rightIcon:c,isLoading:r,loaderPosition:n,loaderProps:t})=>{const i=e==="left"?u:e==="right"?c:null;return i||r&&n===e?s.jsxRuntimeExports.jsx("span",{className:e==="left"?"mr-1":"ml-1",children:r&&n===e?s.jsxRuntimeExports.jsx(w.Loader,{size:"sm",...t}):i}):null},y=e=>{const{intent:u="primary",size:c="md",leftIcon:r,rightIcon:n,isDisabled:t,children:i,className:q,isLoading:l,loaderPosition:x="left",loaderProps:f,fullWidth:R=!1,unstyled:d=!1,focus:j=!0,isMobileFullWidth:b=!1,...g}=e,v=(m,a,o)=>p.cn(d?"":N.buttonVariants({intent:u,size:c,isHovered:a||(j||!d?o:!1),isActive:m,isDisabled:t,isFocused:j||!d?o:!1,fullWidth:R,isLoading:l}),q);return s.jsxRuntimeExports.jsxs(E.Button,{"data-disabled":t||void 0,"data-loading":l||void 0,isDisabled:t,className:({isPressed:m,isHovered:a,isFocusVisible:o})=>v(m,a,o),...g,children:[s.jsxRuntimeExports.jsx(h,{renderPosition:"left",loaderPosition:x,loaderProps:f,isLoading:l,leftIcon:r}),s.jsxRuntimeExports.jsx("span",{className:p.cn("flex h-full items-center overflow-hidden whitespace-nowrap",b?"w-full":""),children:i}),s.jsxRuntimeExports.jsx(h,{renderPosition:"right",loaderPosition:x,loaderProps:f,isLoading:l,rightIcon:n})]})};exports.Button=y;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index.cjs10.js"),l=require("react-aria-components"),x=require("./index.cjs11.js"),p=require("./index.cjs17.js"),b=require("./index.cjs13.js"),h=({isIndeterminate:c=!1,isDisabled:s=!1,className:u,children:r,onChange:i,isSelected:n,id:o,...m})=>{const j=(a,t)=>x.cn(b.checkboxVariants({isDisabled:s,isFocusVisible:a,isHovered:t,isSelected:n,label:!!r}));return e.jsxRuntimeExports.jsx(l.Checkbox,{className:x.cn("group flex items-center",u),isSelected:n,isDisabled:s,id:o,onChange:i,...m,children:({isFocusVisible:a,isHovered:t})=>e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx("div",{className:j(a,t),"aria-hidden":"true",children:e.jsxRuntimeExports.jsx(p.MarkIcon,{isIndeterminate:c,isHovered:t,isSelected:n,className:"size-3"})}),r&&e.jsxRuntimeExports.jsx("span",{className:x.cn("select-none text-base leading-6",s?"text-neutral-500":"text-primary-900"),id:o,children:r})]})})};exports.Checkbox=h;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index.cjs10.js"),l=require("react-aria-components"),x=require("./index.cjs11.js"),p=require("./index.cjs17.js"),b=require("./index.cjs14.js"),h=({isIndeterminate:c=!1,isDisabled:s=!1,className:u,children:r,onChange:i,isSelected:n,id:o,...m})=>{const j=(a,t)=>x.cn(b.checkboxVariants({isDisabled:s,isFocusVisible:a,isHovered:t,isSelected:n,label:!!r}));return e.jsxRuntimeExports.jsx(l.Checkbox,{className:x.cn("group flex items-center",u),isSelected:n,isDisabled:s,id:o,onChange:i,...m,children:({isFocusVisible:a,isHovered:t})=>e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx("div",{className:j(a,t),"aria-hidden":"true",children:e.jsxRuntimeExports.jsx(p.MarkIcon,{isIndeterminate:c,isHovered:t,isSelected:n,className:"size-3"})}),r&&e.jsxRuntimeExports.jsx("span",{className:x.cn("select-none text-base leading-6",s?"text-neutral-500":"text-primary-900"),id:o,children:r})]})})};exports.Checkbox=h;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index.cjs10.js"),q=require("react"),n=require("react-aria-components"),R=require("./index.cjs11.js"),g=require("./index.cjs18.js");function v(i,c){const[a,u]=n.useContextProps(i,c,n.ButtonContext),{intent:l="secondary",size:d="lg",isDisabled:o=!1,isActive:x=!1,children:e,className:f,...m}=a,r="flex h-full items-center overflow-hidden whitespace-nowrap";return s.jsxRuntimeExports.jsx(n.Button,{ref:u,className:({isPressed:t,isHovered:p,isFocusVisible:j,isFocused:h})=>R.cn(g.buttonVariants({intent:l,size:d,isDisabled:o,isActive:x||t,isHovered:p,isFocused:j||h}),f),isDisabled:o,...m,children:typeof e=="function"?t=>s.jsxRuntimeExports.jsx("span",{className:r+"p-2.",children:e(t)}):s.jsxRuntimeExports.jsx("span",{className:r,children:e})})}const B=q.forwardRef(v);exports.IconButton=B;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index.cjs10.js"),h=require("react"),n=require("react-aria-components"),q=require("./index.cjs11.js"),R=require("./index.cjs20.js");function g(i,c){const[a,u]=n.useContextProps(i,c,n.ButtonContext),{intent:l="secondary",size:d="lg",isDisabled:o=!1,isActive:x=!1,children:e,className:f,...m}=a,r="flex h-full items-center overflow-hidden whitespace-nowrap";return s.jsxRuntimeExports.jsx(n.Button,{ref:u,className:({isPressed:t,isHovered:p,isFocusVisible:j})=>q.cn(R.buttonVariants({intent:l,size:d,isDisabled:o,isActive:x||t,isHovered:p,isFocused:j}),f),isDisabled:o,...m,children:typeof e=="function"?t=>s.jsxRuntimeExports.jsx("span",{className:r+"p-2.",children:e(t)}):s.jsxRuntimeExports.jsx("span",{className:r,children:e})})}const v=h.forwardRef(g);exports.IconButton=v;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index.cjs10.js"),p=require("react-aria-components"),c=require("./index.cjs11.js"),q=require("./index.cjs19.js"),R=require("./index.cjs20.js"),v=require("./index.cjs14.js"),E=({children:s,label:i,description:o,errorMessage:x,validationState:u,size:e="md",isDisabled:t=!1,isSelected:n=!1,onChange:f,renderLabelIcon:m=null,"aria-label":h,"aria-describedby":j})=>{const l=u==="invalid"&&!t,w=e==="sm"?{offLeft:3,onLeft:19}:{offLeft:4,onLeft:28};return r.jsxRuntimeExports.jsxs("label",{className:c.cn("group flex flex-row gap-2",(i||s)&&o?"items-start":"items-center"),children:[r.jsxRuntimeExports.jsx(p.Switch,{isDisabled:t,isSelected:n,"aria-checked":n,"aria-label":h,"aria-describedby":j,onChange:f,children:({isFocusVisible:d,isHovered:a})=>r.jsxRuntimeExports.jsx("div",{className:c.cn(v.switchVariants({isSelected:n,isDisabled:t,isFocusVisible:d,size:e,isHoveredWhenOff:a&&!n})),children:r.jsxRuntimeExports.jsx(R.SwitchIndicator,{isSelected:n,isDisabled:t,isHovered:a,size:e,dimensions:w})})}),r.jsxRuntimeExports.jsx(q.ContentSwitch,{label:i,description:o,errorMessage:x,isDisabled:t,isInvalid:l,renderLabelIcon:m,children:s})]})};exports.Switch=E;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index.cjs10.js"),p=require("react-aria-components"),c=require("./index.cjs11.js"),q=require("./index.cjs18.js"),R=require("./index.cjs19.js"),v=require("./index.cjs15.js"),E=({children:s,label:i,description:o,errorMessage:x,validationState:u,size:e="md",isDisabled:t=!1,isSelected:n=!1,onChange:f,renderLabelIcon:m=null,"aria-label":h,"aria-describedby":j})=>{const l=u==="invalid"&&!t,w=e==="sm"?{offLeft:3,onLeft:19}:{offLeft:4,onLeft:28};return r.jsxRuntimeExports.jsxs("label",{className:c.cn("group flex flex-row gap-2",(i||s)&&o?"items-start":"items-center"),children:[r.jsxRuntimeExports.jsx(p.Switch,{isDisabled:t,isSelected:n,"aria-checked":n,"aria-label":h,"aria-describedby":j,onChange:f,children:({isFocusVisible:d,isHovered:a})=>r.jsxRuntimeExports.jsx("div",{className:c.cn(v.switchVariants({isSelected:n,isDisabled:t,isFocusVisible:d,size:e,isHoveredWhenOff:a&&!n})),children:r.jsxRuntimeExports.jsx(R.SwitchIndicator,{isSelected:n,isDisabled:t,isHovered:a,size:e,dimensions:w})})}),r.jsxRuntimeExports.jsx(q.ContentSwitch,{label:i,description:o,errorMessage:x,isDisabled:t,isInvalid:l,renderLabelIcon:m,children:s})]})};exports.Switch=E;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index.cjs10.js"),c=require("./index.cjs11.js"),o=require("./index.cjs15.js");function a(e){const{children:t,type:s="body",className:n}=e,r=c.cn(o.textVariants({type:s}),n);return i.jsxRuntimeExports.jsx("p",{className:r,children:t})}exports.Text=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index.cjs10.js"),c=require("./index.cjs11.js"),o=require("./index.cjs16.js");function a(e){const{children:t,type:s="body",className:n}=e,r=c.cn(o.textVariants({type:s}),n);return i.jsxRuntimeExports.jsx("p",{className:r,children:t})}exports.Text=a;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index.cjs10.js"),o=require("./index.cjs11.js"),u=require("./index.cjs15.js");function m(t){const{children:s,type:e="h1",size:i=e,className:n,...r}=t,c=e,a=o.cn(u.titleVariants({size:i}),n);return l.jsxRuntimeExports.jsx(c,{className:a,...r,children:s})}exports.Title=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index.cjs10.js"),o=require("./index.cjs11.js"),u=require("./index.cjs16.js");function m(t){const{children:s,type:e="h1",size:i=e,className:n,...r}=t,c=e,a=o.cn(u.titleVariants({size:i}),n);return l.jsxRuntimeExports.jsx(c,{className:a,...r,children:s})}exports.Title=m;
@@ -1,175 +1,24 @@
1
- import { cva as r } from "class-variance-authority";
2
- const t = r(
3
- "inline-flex select-none items-center justify-center text-center text-base font-semibold leading-6 transition duration-150 ease-in-out focus:outline-none",
4
- {
5
- variants: {
6
- intent: {
7
- primary: "bg-primary-500 text-primary-50",
8
- secondary: "border border-primary-500 bg-primary-50 text-primary-500",
9
- tertiary: "text-primary-500",
10
- outline: "border border-primary-500 text-primary-500",
11
- success: "border bg-success-500 text-success-50",
12
- error: "border bg-error-500 text-error-50",
13
- orangeWarning: "border bg-orange-warning-500 text-orange-warning-50",
14
- yellowWarning: "border bg-yellow-warning-500 text-[#6F5711]",
15
- //TODO: Este color yellow-warning-900 esta mal en @simpli-route/tailwind-preset, debe borrarse la 'h' al final del color
16
- info: "border bg-blue-500 text-blue-50"
17
- },
18
- size: {
19
- xs: "rounded px-3 py-1",
20
- sm: "rounded px-3 py-2",
21
- md: "rounded-lg px-4 py-3",
22
- lg: "rounded-lg px-6 py-4"
23
- },
24
- isDisabled: {
25
- true: "pointer-events-none cursor-not-allowed border-none bg-neutral-400 text-neutral-600"
26
- },
27
- isHovered: {
28
- true: ""
29
- },
30
- isActive: {
31
- true: ""
32
- },
33
- fullWidth: {
34
- true: "w-full",
35
- false: "w-fit"
36
- },
37
- isLoading: {
38
- true: "pointer-events-none cursor-not-allowed opacity-70"
39
- },
40
- isFocused: {
41
- true: "focus:outline-none focus:ring-2 focus:ring-sky-400 focus:ring-offset-[0.4px] border-none",
42
- false: ""
43
- }
44
- },
45
- defaultVariants: {
46
- intent: "primary",
47
- size: "md"
48
- },
49
- compoundVariants: [
50
- /* Hover State */
51
- {
52
- intent: "primary",
53
- isHovered: !0,
54
- class: "bg-primary-700"
55
- },
56
- {
57
- intent: "secondary",
58
- isHovered: !0,
59
- class: "bg-primary-200"
60
- },
61
- {
62
- intent: "tertiary",
63
- isHovered: !0,
64
- class: "bg-primary-300 text-primary-800"
65
- },
66
- {
67
- intent: "outline",
68
- isHovered: !0,
69
- class: "bg-primary-500 text-primary-50"
70
- },
71
- {
72
- intent: "success",
73
- isHovered: !0,
74
- class: "bg-success-700 text-neutral-50"
75
- },
76
- {
77
- intent: "error",
78
- isHovered: !0,
79
- class: "bg-error-700 text-error-50"
80
- },
81
- {
82
- intent: "orangeWarning",
83
- isHovered: !0,
84
- class: "bg-orange-warning-700 text-orange-warning-50"
85
- },
86
- {
87
- intent: "yellowWarning",
88
- isHovered: !0,
89
- class: "bg-yellow-warning-700 text-neutral-50"
90
- },
91
- {
92
- intent: "info",
93
- isHovered: !0,
94
- class: "bg-blue-700 text-blue-50"
95
- },
96
- /* /Focus State */
97
- {
98
- intent: "success",
99
- isFocused: !0,
100
- class: "border-[1.5px] focus:ring-success-500"
101
- },
102
- {
103
- intent: "error",
104
- isFocused: !0,
105
- class: "border-[1.5px] focus:ring-error-500"
106
- },
107
- {
108
- intent: "orangeWarning",
109
- isFocused: !0,
110
- class: "border-[1.5px] focus:ring-orange-500"
111
- },
112
- {
113
- intent: "yellowWarning",
114
- isFocused: !0,
115
- class: "border-[1.5px] focus:ring-yellow-500"
116
- },
117
- {
118
- intent: "info",
119
- isFocused: !0,
120
- class: "border-[1.5px] focus:ring-blue-500"
121
- },
122
- /* Active State */
123
- {
124
- intent: "primary",
125
- isActive: !0,
126
- class: "bg-primary-900"
127
- },
128
- {
129
- intent: "secondary",
130
- isActive: !0,
131
- class: "bg-primary-300"
132
- },
133
- {
134
- intent: "tertiary",
135
- isActive: !0,
136
- class: "bg-primary-500 text-white"
137
- },
138
- {
139
- intent: "outline",
140
- isActive: !0,
141
- class: "border border-primary-500 bg-primary-300 text-primary-500"
142
- },
143
- {
144
- intent: "success",
145
- isActive: !0,
146
- class: "border border-transparent bg-success-300 text-success-900"
147
- },
148
- {
149
- intent: "error",
150
- isActive: !0,
151
- class: "border border-transparent bg-error-300 text-error-900"
152
- },
153
- {
154
- intent: "orangeWarning",
155
- isActive: !0,
156
- class: "border border-transparent bg-orange-warning-300 text-orange-warning-900"
157
- },
158
- {
159
- intent: "yellowWarning",
160
- isActive: !0,
161
- class: "border border-transparent bg-yellow-warning-300 text-[#6F5711]"
162
- //TODO: Este color yellow-warning-900 esta mal en @simpli-route/tailwind-preset, debe borrarse la 'h' al final del color
163
- },
164
- {
165
- intent: "info",
166
- isActive: !0,
167
- class: "border border-transparent bg-blue-200 text-blue-900"
168
- }
169
- /* /Active State */
170
- ]
171
- }
172
- );
1
+ import { j as s } from "./index.es10.js";
2
+ import { MinusIcon as p, PlusIcon as u } from "./index.es24.js";
3
+ import { cn as e } from "./index.es11.js";
4
+ const f = ({
5
+ label: o,
6
+ section: n,
7
+ active: r,
8
+ onToggle: l,
9
+ itemClassName: t,
10
+ sectionClassName: c,
11
+ hasIcon: i = !0
12
+ }) => {
13
+ const a = e("rounded-md border border-solid border-purple-200 bg-gray-100", t), d = e("px-4 pb-4", c), m = r ? p : u;
14
+ return /* @__PURE__ */ s.jsxs("div", { className: a, children: [
15
+ /* @__PURE__ */ s.jsxs("button", { className: "flex w-full cursor-pointer items-center gap-x-4 p-4", onClick: l, children: [
16
+ /* @__PURE__ */ s.jsx("div", { className: "flex-1", children: o }),
17
+ i ? /* @__PURE__ */ s.jsx("span", { className: `shrink-0 transition duration-300 ${r ? "-rotate-180" : "rotate-0"}`, children: /* @__PURE__ */ s.jsx(m, { className: "size-6" }) }) : null
18
+ ] }),
19
+ r ? /* @__PURE__ */ s.jsx("div", { className: d, children: n }) : null
20
+ ] });
21
+ };
173
22
  export {
174
- t as buttonVariants
23
+ f as AccordionItem
175
24
  };
@@ -1,45 +1,175 @@
1
1
  import { cva as r } from "class-variance-authority";
2
- const i = r(
3
- "flex h-5 w-5 shrink-0 cursor-pointer items-center justify-center rounded border-2 border-primary-200 text-white transition duration-150 ease-in-out",
2
+ const t = r(
3
+ "inline-flex select-none items-center justify-center text-center text-base font-semibold leading-6 transition duration-150 ease-in-out focus:outline-none",
4
4
  {
5
5
  variants: {
6
+ intent: {
7
+ primary: "bg-primary-500 text-primary-50",
8
+ secondary: "border border-primary-500 bg-primary-50 text-primary-500",
9
+ tertiary: "text-primary-500",
10
+ outline: "border border-primary-500 text-primary-500",
11
+ success: "border bg-success-500 text-success-50",
12
+ error: "border bg-error-500 text-error-50",
13
+ orangeWarning: "border bg-orange-warning-500 text-orange-warning-50",
14
+ yellowWarning: "border bg-yellow-warning-500 text-[#6F5711]",
15
+ //TODO: Este color yellow-warning-900 esta mal en @simpli-route/tailwind-preset, debe borrarse la 'h' al final del color
16
+ info: "border bg-blue-500 text-blue-50"
17
+ },
18
+ size: {
19
+ xs: "rounded px-3 py-1",
20
+ sm: "rounded px-3 py-2",
21
+ md: "rounded-lg px-4 py-3",
22
+ lg: "rounded-lg px-6 py-4"
23
+ },
24
+ isDisabled: {
25
+ true: "pointer-events-none cursor-not-allowed border-none bg-neutral-400 text-neutral-600"
26
+ },
6
27
  isHovered: {
7
28
  true: ""
8
29
  },
9
- isSelected: {
10
- true: "border-primary-500 bg-primary-500",
11
- false: "bg-white"
30
+ isActive: {
31
+ true: ""
12
32
  },
13
- isFocusVisible: {
14
- true: "border-primary-500 group-active:border-primary-500"
33
+ fullWidth: {
34
+ true: "w-full",
35
+ false: "w-fit"
15
36
  },
16
- isDisabled: {
17
- true: "border-neutral-500 cursor-not-allowed"
37
+ isLoading: {
38
+ true: "pointer-events-none cursor-not-allowed opacity-70"
18
39
  },
19
- label: {
20
- true: "mr-2"
40
+ isFocused: {
41
+ true: "focus:outline-none focus:ring-2 focus:ring-sky-400 focus:ring-offset-[0.4px] border-none",
42
+ false: ""
21
43
  }
22
44
  },
45
+ defaultVariants: {
46
+ intent: "primary",
47
+ size: "md"
48
+ },
23
49
  compoundVariants: [
50
+ /* Hover State */
51
+ {
52
+ intent: "primary",
53
+ isHovered: !0,
54
+ class: "bg-primary-700"
55
+ },
56
+ {
57
+ intent: "secondary",
58
+ isHovered: !0,
59
+ class: "bg-primary-200"
60
+ },
61
+ {
62
+ intent: "tertiary",
63
+ isHovered: !0,
64
+ class: "bg-primary-300 text-primary-800"
65
+ },
66
+ {
67
+ intent: "outline",
68
+ isHovered: !0,
69
+ class: "bg-primary-500 text-primary-50"
70
+ },
71
+ {
72
+ intent: "success",
73
+ isHovered: !0,
74
+ class: "bg-success-700 text-neutral-50"
75
+ },
76
+ {
77
+ intent: "error",
78
+ isHovered: !0,
79
+ class: "bg-error-700 text-error-50"
80
+ },
81
+ {
82
+ intent: "orangeWarning",
83
+ isHovered: !0,
84
+ class: "bg-orange-warning-700 text-orange-warning-50"
85
+ },
24
86
  {
87
+ intent: "yellowWarning",
25
88
  isHovered: !0,
26
- isSelected: !0,
27
- class: "border-none bg-primary-600 group-active:bg-primary-600"
89
+ class: "bg-yellow-warning-700 text-neutral-50"
28
90
  },
29
91
  {
92
+ intent: "info",
30
93
  isHovered: !0,
31
- isSelected: !1,
32
- isDisabled: !1,
33
- class: "border-primary-700 group-active:bg-primary-600"
94
+ class: "bg-blue-700 text-blue-50"
95
+ },
96
+ /* /Focus State */
97
+ {
98
+ intent: "success",
99
+ isFocused: !0,
100
+ class: "border-[1.5px] focus:ring-success-500"
101
+ },
102
+ {
103
+ intent: "error",
104
+ isFocused: !0,
105
+ class: "border-[1.5px] focus:ring-error-500"
106
+ },
107
+ {
108
+ intent: "orangeWarning",
109
+ isFocused: !0,
110
+ class: "border-[1.5px] focus:ring-orange-500"
111
+ },
112
+ {
113
+ intent: "yellowWarning",
114
+ isFocused: !0,
115
+ class: "border-[1.5px] focus:ring-yellow-500"
116
+ },
117
+ {
118
+ intent: "info",
119
+ isFocused: !0,
120
+ class: "border-[1.5px] focus:ring-blue-500"
121
+ },
122
+ /* Active State */
123
+ {
124
+ intent: "primary",
125
+ isActive: !0,
126
+ class: "bg-primary-900"
127
+ },
128
+ {
129
+ intent: "secondary",
130
+ isActive: !0,
131
+ class: "bg-primary-300"
132
+ },
133
+ {
134
+ intent: "tertiary",
135
+ isActive: !0,
136
+ class: "bg-primary-500 text-white"
137
+ },
138
+ {
139
+ intent: "outline",
140
+ isActive: !0,
141
+ class: "border border-primary-500 bg-primary-300 text-primary-500"
142
+ },
143
+ {
144
+ intent: "success",
145
+ isActive: !0,
146
+ class: "border border-transparent bg-success-300 text-success-900"
147
+ },
148
+ {
149
+ intent: "error",
150
+ isActive: !0,
151
+ class: "border border-transparent bg-error-300 text-error-900"
152
+ },
153
+ {
154
+ intent: "orangeWarning",
155
+ isActive: !0,
156
+ class: "border border-transparent bg-orange-warning-300 text-orange-warning-900"
157
+ },
158
+ {
159
+ intent: "yellowWarning",
160
+ isActive: !0,
161
+ class: "border border-transparent bg-yellow-warning-300 text-[#6F5711]"
162
+ //TODO: Este color yellow-warning-900 esta mal en @simpli-route/tailwind-preset, debe borrarse la 'h' al final del color
34
163
  },
35
164
  {
36
- isDisabled: !0,
37
- isSelected: !0,
38
- class: "bg-neutral-500"
165
+ intent: "info",
166
+ isActive: !0,
167
+ class: "border border-transparent bg-blue-200 text-blue-900"
39
168
  }
169
+ /* /Active State */
40
170
  ]
41
171
  }
42
172
  );
43
173
  export {
44
- i as checkboxVariants
174
+ t as buttonVariants
45
175
  };