@simpli-route/apollo-ds 0.0.13 → 0.0.15

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.
@@ -21,4 +21,5 @@ export interface MarkIconProps {
21
21
  className?: string;
22
22
  isIndeterminate?: boolean;
23
23
  isSelected?: boolean;
24
+ isHovered?: boolean;
24
25
  }
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./index.cjs10.js"),m=require("react"),q=require("react-aria"),v=require("./index.cjs11.js"),x=require("./index.cjs14.js"),y=r=>{const{className:n,item:i,orientation:c,state:e,id:o=void 0}=r,{key:t,rendered:a}=i,u=e.selectedKey===t,s=m.useRef(null),{tabProps:d}=q.useTab({key:String(t)},e,s),l=v.cn(x.tabVariants({isActive:u,orientation:c}),n);return b.jsxRuntimeExports.jsx("div",{...d,ref:s,className:l,id:o,children:a})};exports.Tab=y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index.cjs10.js"),n=require("./index.cjs25.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 i=require("./index.cjs10.js"),l=require("react"),u=require("react-aria"),d=require("./index.cjs11.js"),b=r=>{var t;const{className:n,state:e,...c}=r,s=l.useRef(null),{tabPanelProps:a}=u.useTabPanel(c,e,s),o=d.cn("",n);return i.jsxRuntimeExports.jsx("div",{...a,ref:s,className:o,children:(t=e.selectedItem)==null?void 0:t.props.children})};exports.TabPanel=b;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index.cjs10.js"),l=require("./index.cjs11.js"),c=o=>{const{isIndeterminate:t,isSelected:e,className:n,isHovered:i}=o,r=i&&!e&&!t?"text-neutral-500":"",a=!!(r||e);return s.jsxRuntimeExports.jsx("svg",{className:l.cn("stroke-current",r,n),viewBox:"-1 1 17 17",children:t?s.jsxRuntimeExports.jsx("line",{x1:1,y1:10,x2:14,y2:10,fill:"none",strokeWidth:2,strokeDasharray:14,strokeDashoffset:e?28:42,style:{transition:"all 400ms"}}):s.jsxRuntimeExports.jsx("polyline",{points:"1 9 7 14 15 4",fill:"none",strokeWidth:2,strokeDasharray:22,strokeDashoffset:a?44:66,style:{transition:"all 400ms"}})})};exports.MarkIcon=c;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("class-variance-authority"),t=r.cva("flex h-full max-h-12",{variants:{orientation:{horizontal:"flex-col",vertical:"flex-row"}}}),e=r.cva("group inline-flex cursor-pointer items-center px-4 py-3 text-base font-semibold focus-visible:outline-none",{variants:{isActive:{true:"bg-primary-50 text-primary-600 ",false:"text-neutral-500 hover:text-primary-900"},orientation:{horizontal:"border-b-2 border-transparent",vertical:"border-r-2 border-transparent"}},compoundVariants:[{isActive:!0,orientation:"horizontal",class:"border-b-2 border-primary-500"},{isActive:!1,orientation:"horizontal",class:"border-b-2 border-primary-200"},{isActive:!1,orientation:"vertical",class:"border-r-2 border-primary-200"},{isActive:!0,orientation:"vertical",class:"border-r-2 border-primary-500"}]});exports.tabVariants=e;exports.tabsVariants=t;
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"},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 e=require("./index.cjs10.js"),o=require("./index.cjs11.js"),i=t=>{const{isIndeterminate:r,isSelected:s,className:n}=t;return e.jsxRuntimeExports.jsx("svg",{className:o.cn("stroke-current",n),viewBox:"-1 1 17 17",children:r?e.jsxRuntimeExports.jsx("line",{x1:1,y1:10,x2:14,y2:10,fill:"none",strokeWidth:2,strokeDasharray:14,strokeDashoffset:s?28:42,style:{transition:"all 400ms"}}):e.jsxRuntimeExports.jsx("polyline",{points:"1 9 7 14 15 4",fill:"none",strokeWidth:2,strokeDasharray:22,strokeDashoffset:s?44:66,style:{transition:"all 400ms"}})})};exports.MarkIcon=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index.cjs10.js"),r=require("./index.cjs11.js"),l=({label:e,description:n,errorMessage:x,isDisabled:s,isInvalid:c,children:u})=>!e&&!n&&!u?null:t.jsxRuntimeExports.jsxs("div",{className:"flex flex-col",children:[e?t.jsxRuntimeExports.jsx("p",{className:r.cn("text-sm font-semibold",s?"text-neutral-600":"text-neutral-900"),children:e}):u,n&&!x&&t.jsxRuntimeExports.jsx("p",{className:r.cn("text-xs",s?"text-neutral-600":"text-neutral-800"),children:n}),c&&x&&t.jsxRuntimeExports.jsx("p",{className:"text-sm text-red-500",children:x})]});exports.ContentSwitch=l;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("class-variance-authority"),e=r.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 bg-neutral-500"},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"}]});exports.checkboxVariants=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index.cjs10.js"),s=require("./index.cjs11.js"),a=require("./index.cjs17.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 s=require("./index.cjs10.js"),n=require("./index.cjs25.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 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 t=require("./index.cjs10.js"),r=require("./index.cjs11.js"),l=({label:e,description:n,errorMessage:x,isDisabled:s,isInvalid:c,children:u})=>!e&&!n&&!u?null:t.jsxRuntimeExports.jsxs("div",{className:"flex flex-col",children:[e?t.jsxRuntimeExports.jsx("p",{className:r.cn("text-sm font-semibold",s?"text-neutral-600":"text-neutral-900"),children:e}):u,n&&!x&&t.jsxRuntimeExports.jsx("p",{className:r.cn("text-xs",s?"text-neutral-600":"text-neutral-700"),children:n}),c&&x&&t.jsxRuntimeExports.jsx("p",{className:"text-sm text-red-500",children:x})]});exports.ContentSwitch=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./index.cjs10.js"),m=require("react"),q=require("react-aria"),v=require("./index.cjs11.js"),x=require("./index.cjs20.js"),y=r=>{const{className:n,item:i,orientation:c,state:e,id:o=void 0}=r,{key:t,rendered:a}=i,u=e.selectedKey===t,s=m.useRef(null),{tabProps:d}=q.useTab({key:String(t)},e,s),l=v.cn(x.tabVariants({isActive:u,orientation:c}),n);return b.jsxRuntimeExports.jsx("div",{...d,ref:s,className:l,id:o,children:a})};exports.Tab=y;
@@ -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.cjs20.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 i=require("./index.cjs10.js"),l=require("react"),u=require("react-aria"),d=require("./index.cjs11.js"),b=r=>{var t;const{className:n,state:e,...c}=r,s=l.useRef(null),{tabPanelProps:a}=u.useTabPanel(c,e,s),o=d.cn("",n);return i.jsxRuntimeExports.jsx("div",{...a,ref:s,className:o,children:(t=e.selectedItem)==null?void 0:t.props.children})};exports.TabPanel=b;
@@ -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.cjs17.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"),m=require("react"),g=require("./index.cjs11.js"),j=require("./index.cjs12.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 +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 r=require("class-variance-authority"),t=r.cva("flex h-full max-h-12",{variants:{orientation:{horizontal:"flex-col",vertical:"flex-row"}}}),e=r.cva("group inline-flex cursor-pointer items-center px-4 py-3 text-base font-semibold focus-visible:outline-none",{variants:{isActive:{true:"bg-primary-50 text-primary-600 ",false:"text-neutral-500 hover:text-primary-900"},orientation:{horizontal:"border-b-2 border-transparent",vertical:"border-r-2 border-transparent"}},compoundVariants:[{isActive:!0,orientation:"horizontal",class:"border-b-2 border-primary-500"},{isActive:!1,orientation:"horizontal",class:"border-b-2 border-primary-200"},{isActive:!1,orientation:"vertical",class:"border-r-2 border-primary-200"},{isActive:!0,orientation:"vertical",class:"border-r-2 border-primary-500"}]});exports.tabVariants=e;exports.tabsVariants=t;
@@ -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.cjs26.js");require("./index.cjs16.js");const w=require("./index.cjs5.js");require("./index.cjs20.js");require("./index.cjs21.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.cjs26.js");require("./index.cjs14.js");const w=require("./index.cjs5.js");require("./index.cjs17.js");require("./index.cjs21.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"),o=require("./index.cjs11.js"),p=require("./index.cjs15.js"),b=require("./index.cjs16.js"),h=({isIndeterminate:c=!1,isDisabled:t=!1,className:i,children:s,onChange:u,isSelected:r,id:x,...m})=>{const j=(n,a)=>o.cn(b.checkboxVariants({isDisabled:t,isFocusVisible:n,isHovered:a,isSelected:r,label:!!s}));return e.jsxRuntimeExports.jsx(l.Checkbox,{className:o.cn("group flex items-center",i),isSelected:r,isDisabled:t,id:x,onChange:u,...m,children:({isFocusVisible:n,isHovered:a})=>e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx("div",{className:j(n,a),"aria-hidden":"true",children:e.jsxRuntimeExports.jsx(p.MarkIcon,{isIndeterminate:c,isSelected:r,className:"size-3"})}),s&&e.jsxRuntimeExports.jsx("span",{className:o.cn("select-none text-base leading-6",t?"text-neutral-500":"text-primary-900"),id:x,children:s})]})})};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.cjs13.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 r=require("./index.cjs10.js"),d=require("react-aria-components"),o=require("./index.cjs11.js"),w=require("./index.cjs18.js"),q=require("./index.cjs19.js"),y=require("./index.cjs20.js"),R=({children:c,label:a,description:s,errorMessage:x,validationState:u,size:e="md",isDisabled:t=!1,isSelected:n=!1,onChange:f,"aria-label":m,"aria-describedby":h})=>{const j=u==="invalid"&&!t,l=e==="sm"?{offLeft:3,onLeft:19}:{offLeft:4,onLeft:28};return r.jsxRuntimeExports.jsxs("label",{className:o.cn("group flex flex-row items-center gap-2",t?"opacity-40":"opacity-100"),children:[r.jsxRuntimeExports.jsx(d.Switch,{isDisabled:t,isSelected:n,"aria-checked":n,"aria-label":m,"aria-describedby":h,onChange:f,children:({isFocusVisible:p,isHovered:i})=>r.jsxRuntimeExports.jsx("div",{className:o.cn(y.switchVariants({isSelected:n,isDisabled:t,isFocusVisible:p,size:e,isHoveredWhenOff:i&&!n})),children:r.jsxRuntimeExports.jsx(q.SwitchIndicator,{isSelected:n,isDisabled:t,isHovered:i,size:e,dimensions:l})})}),r.jsxRuntimeExports.jsx(w.ContentSwitch,{label:a,description:s,errorMessage:x,isDisabled:t,isInvalid:j,children:c})]})};exports.Switch=R;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index.cjs10.js"),w=require("react-aria-components"),s=require("./index.cjs11.js"),d=require("./index.cjs15.js"),q=require("./index.cjs16.js"),y=require("./index.cjs17.js"),R=({children:a,label:i,description:o,errorMessage:x,validationState:u,size:e="md",isDisabled:t=!1,isSelected:r=!1,onChange:f,"aria-label":m,"aria-describedby":h})=>{const j=u==="invalid"&&!t,p=e==="sm"?{offLeft:3,onLeft:19}:{offLeft:4,onLeft:28};return n.jsxRuntimeExports.jsxs("label",{className:s.cn("group flex flex-row gap-2",t?"opacity-40":"opacity-100",i&&o?"items-start":"items-center"),children:[n.jsxRuntimeExports.jsx(w.Switch,{isDisabled:t,isSelected:r,"aria-checked":r,"aria-label":m,"aria-describedby":h,onChange:f,children:({isFocusVisible:l,isHovered:c})=>n.jsxRuntimeExports.jsx("div",{className:s.cn(y.switchVariants({isSelected:r,isDisabled:t,isFocusVisible:l,size:e,isHoveredWhenOff:c&&!r})),children:n.jsxRuntimeExports.jsx(q.SwitchIndicator,{isSelected:r,isDisabled:t,isHovered:c,size:e,dimensions:p})})}),n.jsxRuntimeExports.jsx(d.ContentSwitch,{label:i,description:o,errorMessage:x,isDisabled:t,isInvalid:j,children:a})]})};exports.Switch=R;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index.cjs10.js"),j=require("react"),q=require("react-aria"),c=require("react-stately"),r=require("./index.cjs11.js"),T=require("./index.cjs12.js"),f=require("./index.cjs13.js"),p=require("./index.cjs14.js"),l=a=>{var i;const{rootClassName:u,tabClassName:x,tabPanelClassName:m,orientation:t="horizontal",id:b=void 0}=a,e=c.useTabListState(a),n=j.useRef(null),{tabListProps:d}=q.useTabList(a,e,n);return s.jsxRuntimeExports.jsxs("div",{className:r.cn(p.tabsVariants({orientation:t}),u),children:[s.jsxRuntimeExports.jsx("div",{...d,ref:n,className:r.cn("flex",t==="horizontal"?"flex-row flex-wrap":"flex-col"),children:[...e.collection].map(o=>s.jsxRuntimeExports.jsx(T.Tab,{item:o,state:e,orientation:t,className:x,id:b},o.key))}),s.jsxRuntimeExports.jsx(f.TabPanel,{state:e,className:r.cn("p-2",t==="horizontal"?"pl-2":"pt-2",m)},(i=e.selectedItem)==null?void 0:i.key)]})};l.Item=c.Item;exports.Tabs=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index.cjs10.js"),j=require("react"),q=require("react-aria"),c=require("react-stately"),r=require("./index.cjs11.js"),T=require("./index.cjs18.js"),f=require("./index.cjs19.js"),p=require("./index.cjs20.js"),l=a=>{var i;const{rootClassName:u,tabClassName:x,tabPanelClassName:m,orientation:t="horizontal",id:b=void 0}=a,e=c.useTabListState(a),n=j.useRef(null),{tabListProps:d}=q.useTabList(a,e,n);return s.jsxRuntimeExports.jsxs("div",{className:r.cn(p.tabsVariants({orientation:t}),u),children:[s.jsxRuntimeExports.jsx("div",{...d,ref:n,className:r.cn("flex",t==="horizontal"?"flex-row flex-wrap":"flex-col"),children:[...e.collection].map(o=>s.jsxRuntimeExports.jsx(T.Tab,{item:o,state:e,orientation:t,className:x,id:b},o.key))}),s.jsxRuntimeExports.jsx(f.TabPanel,{state:e,className:r.cn("p-2",t==="horizontal"?"pl-2":"pt-2",m)},(i=e.selectedItem)==null?void 0:i.key)]})};l.Item=c.Item;exports.Tabs=l;
@@ -1,12 +1,24 @@
1
- import { j as f } from "./index.es10.js";
2
- import { useRef as l } from "react";
3
- import { useTab as u } from "react-aria";
4
- import { cn as b } from "./index.es11.js";
5
- import { tabVariants as x } from "./index.es14.js";
6
- const R = (o) => {
7
- const { className: r, item: i, orientation: n, state: t, id: a = void 0 } = o, { key: s, rendered: c } = i, m = t.selectedKey === s, e = l(null), { tabProps: p } = u({ key: String(s) }, t, e), d = b(x({ isActive: m, orientation: n }), r);
8
- return /* @__PURE__ */ f.jsx("div", { ...p, ref: e, className: d, id: a, children: c });
1
+ import { j as s } from "./index.es10.js";
2
+ import { MinusIcon as p, PlusIcon as u } from "./index.es25.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
+ ] });
9
21
  };
10
22
  export {
11
- R as Tab
23
+ f as AccordionItem
12
24
  };
@@ -1,12 +1,32 @@
1
- import { j as m } from "./index.es10.js";
2
- import { useRef as l } from "react";
3
- import { useTabPanel as p } from "react-aria";
4
- import { cn as i } from "./index.es11.js";
5
- const P = (r) => {
6
- var t;
7
- const { className: o, state: s, ...n } = r, e = l(null), { tabPanelProps: a } = p(n, s, e), c = i("", o);
8
- return /* @__PURE__ */ m.jsx("div", { ...a, ref: e, className: c, children: (t = s.selectedItem) == null ? void 0 : t.props.children });
1
+ import { j as e } from "./index.es10.js";
2
+ import { cn as l } from "./index.es11.js";
3
+ const m = (r) => {
4
+ const { isIndeterminate: t, isSelected: s, className: n, isHovered: a } = r, o = a && !s && !t ? "text-neutral-500" : "", i = !!(o || s);
5
+ return /* @__PURE__ */ e.jsx("svg", { className: l("stroke-current", o, n), viewBox: "-1 1 17 17", children: t ? /* @__PURE__ */ e.jsx(
6
+ "line",
7
+ {
8
+ x1: 1,
9
+ y1: 10,
10
+ x2: 14,
11
+ y2: 10,
12
+ fill: "none",
13
+ strokeWidth: 2,
14
+ strokeDasharray: 14,
15
+ strokeDashoffset: s ? 28 : 42,
16
+ style: { transition: "all 400ms" }
17
+ }
18
+ ) : /* @__PURE__ */ e.jsx(
19
+ "polyline",
20
+ {
21
+ points: "1 9 7 14 15 4",
22
+ fill: "none",
23
+ strokeWidth: 2,
24
+ strokeDasharray: 22,
25
+ strokeDashoffset: i ? 44 : 66,
26
+ style: { transition: "all 400ms" }
27
+ }
28
+ ) });
9
29
  };
10
30
  export {
11
- P as TabPanel
31
+ m as MarkIcon
12
32
  };
@@ -1,33 +1,45 @@
1
1
  import { cva as r } from "class-variance-authority";
2
- const e = r("flex h-full max-h-12", {
3
- variants: {
4
- orientation: {
5
- horizontal: "flex-col",
6
- vertical: "flex-row"
7
- }
8
- }
9
- }), i = r(
10
- "group inline-flex cursor-pointer items-center px-4 py-3 text-base font-semibold focus-visible:outline-none",
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",
11
4
  {
12
5
  variants: {
13
- isActive: {
14
- true: "bg-primary-50 text-primary-600 ",
15
- false: "text-neutral-500 hover:text-primary-900"
6
+ isHovered: {
7
+ true: ""
8
+ },
9
+ isSelected: {
10
+ true: "border-primary-500 bg-primary-500",
11
+ false: "bg-white"
12
+ },
13
+ isFocusVisible: {
14
+ true: "border-primary-500 group-active:border-primary-500"
15
+ },
16
+ isDisabled: {
17
+ true: "border-neutral-500"
16
18
  },
17
- orientation: {
18
- horizontal: "border-b-2 border-transparent",
19
- vertical: "border-r-2 border-transparent"
19
+ label: {
20
+ true: "mr-2"
20
21
  }
21
22
  },
22
23
  compoundVariants: [
23
- { isActive: !0, orientation: "horizontal", class: "border-b-2 border-primary-500" },
24
- { isActive: !1, orientation: "horizontal", class: "border-b-2 border-primary-200" },
25
- { isActive: !1, orientation: "vertical", class: "border-r-2 border-primary-200" },
26
- { isActive: !0, orientation: "vertical", class: "border-r-2 border-primary-500" }
24
+ {
25
+ isHovered: !0,
26
+ isSelected: !0,
27
+ class: "border-none bg-primary-600 group-active:bg-primary-600"
28
+ },
29
+ {
30
+ isHovered: !0,
31
+ isSelected: !1,
32
+ isDisabled: !1,
33
+ class: "border-primary-700 group-active:bg-primary-600"
34
+ },
35
+ {
36
+ isDisabled: !0,
37
+ isSelected: !0,
38
+ class: "bg-neutral-500"
39
+ }
27
40
  ]
28
41
  }
29
42
  );
30
43
  export {
31
- i as tabVariants,
32
- e as tabsVariants
44
+ i as checkboxVariants
33
45
  };
@@ -1,32 +1,17 @@
1
- import { j as s } from "./index.es10.js";
2
- import { cn as n } from "./index.es11.js";
3
- const l = (e) => {
4
- const { isIndeterminate: r, isSelected: t, className: o } = e;
5
- return /* @__PURE__ */ s.jsx("svg", { className: n("stroke-current", o), viewBox: "-1 1 17 17", children: r ? /* @__PURE__ */ s.jsx(
6
- "line",
7
- {
8
- x1: 1,
9
- y1: 10,
10
- x2: 14,
11
- y2: 10,
12
- fill: "none",
13
- strokeWidth: 2,
14
- strokeDasharray: 14,
15
- strokeDashoffset: t ? 28 : 42,
16
- style: { transition: "all 400ms" }
17
- }
18
- ) : /* @__PURE__ */ s.jsx(
19
- "polyline",
20
- {
21
- points: "1 9 7 14 15 4",
22
- fill: "none",
23
- strokeWidth: 2,
24
- strokeDasharray: 22,
25
- strokeDashoffset: t ? 44 : 66,
26
- style: { transition: "all 400ms" }
27
- }
28
- ) });
29
- };
1
+ import { j as t } from "./index.es10.js";
2
+ import { cn as m } from "./index.es11.js";
3
+ const u = ({
4
+ label: x,
5
+ description: e,
6
+ errorMessage: n,
7
+ isDisabled: s,
8
+ isInvalid: r,
9
+ children: l
10
+ }) => !x && !e && !l ? null : /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col", children: [
11
+ x ? /* @__PURE__ */ t.jsx("p", { className: m("text-sm font-semibold", s ? "text-neutral-600" : "text-neutral-900"), children: x }) : l,
12
+ e && !n && /* @__PURE__ */ t.jsx("p", { className: m("text-xs", s ? "text-neutral-600" : "text-neutral-800"), children: e }),
13
+ r && n && /* @__PURE__ */ t.jsx("p", { className: "text-sm text-red-500", children: n })
14
+ ] });
30
15
  export {
31
- l as MarkIcon
16
+ u as ContentSwitch
32
17
  };
@@ -1,40 +1,22 @@
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",
1
+ import { j as i } from "./index.es10.js";
2
+ import { cn as m } from "./index.es11.js";
3
+ import { indicatorVariants as n } from "./index.es17.js";
4
+ const c = ({ isSelected: r, isDisabled: o, isHovered: f, size: a, dimensions: t }) => /* @__PURE__ */ i.jsx(
5
+ "div",
4
6
  {
5
- variants: {
6
- isHovered: {
7
- true: ""
8
- },
9
- isSelected: {
10
- true: "border-primary-500 bg-primary-500",
11
- false: "bg-white"
12
- },
13
- isFocusVisible: {
14
- true: "border-primary-500 group-active:border-primary-500"
15
- },
16
- isDisabled: {
17
- true: "border-neutral-500 bg-neutral-500"
18
- },
19
- label: {
20
- true: "mr-2"
21
- }
22
- },
23
- compoundVariants: [
24
- {
25
- isHovered: !0,
26
- isSelected: !0,
27
- class: "border-none bg-primary-600 group-active:bg-primary-600"
28
- },
29
- {
30
- isHovered: !0,
31
- isSelected: !1,
32
- isDisabled: !1,
33
- class: "border-primary-700 group-active:bg-primary-600"
34
- }
35
- ]
7
+ className: m(
8
+ n({
9
+ isSelected: r,
10
+ isDisabled: o,
11
+ size: a,
12
+ isHoveredWhenOff: f && !r
13
+ })
14
+ ),
15
+ style: {
16
+ left: r ? `${t.onLeft}px` : `${t.offLeft}px`
17
+ }
36
18
  }
37
19
  );
38
20
  export {
39
- i as checkboxVariants
21
+ c as SwitchIndicator
40
22
  };
@@ -1,24 +1,94 @@
1
- import { j as s } from "./index.es10.js";
2
- import { MinusIcon as p, PlusIcon as u } from "./index.es25.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
- };
1
+ import { cva as e } from "class-variance-authority";
2
+ const s = e("relative rounded-full transition-colors duration-300", {
3
+ variants: {
4
+ isSelected: {
5
+ true: "bg-primary-500",
6
+ false: "bg-neutral-50 border border-primary-200"
7
+ },
8
+ isDisabled: {
9
+ true: "cursor-not-allowed bg-neutral-400 border-none",
10
+ false: "cursor-pointer"
11
+ },
12
+ isHoveredWhenOff: {
13
+ true: "bg-neutral-200 border-primary-700",
14
+ false: ""
15
+ },
16
+ isFocusVisible: {
17
+ true: "ring-2 ring-sky-400 ring-offset-2",
18
+ false: ""
19
+ },
20
+ size: {
21
+ sm: "w-[42px] h-[24px]",
22
+ md: "w-[56px] h-[32px]"
23
+ }
24
+ },
25
+ defaultVariants: {
26
+ size: "md",
27
+ isSelected: !1,
28
+ isDisabled: !1,
29
+ isFocusVisible: !1,
30
+ isHoveredWhenOff: !1
31
+ },
32
+ compoundVariants: [
33
+ // Hover cuando el switch está apagado y no deshabilitado
34
+ {
35
+ isSelected: !1,
36
+ isDisabled: !1,
37
+ class: "hover:bg-neutral-200 hover:border-primary-700"
38
+ },
39
+ {
40
+ isSelected: !0,
41
+ isDisabled: !1,
42
+ class: "hover:bg-primary-700"
43
+ },
44
+ {
45
+ isSelected: !1,
46
+ isDisabled: !0,
47
+ class: "bg-neutral-400 border-none"
48
+ },
49
+ {
50
+ isSelected: !0,
51
+ isDisabled: !0,
52
+ class: "bg-neutral-500"
53
+ }
54
+ ]
55
+ }), a = e(
56
+ "absolute top-1/2 transform -translate-y-1/2 transition-all duration-300 rounded-full",
57
+ {
58
+ variants: {
59
+ isSelected: {
60
+ true: "bg-primary-50",
61
+ false: "bg-primary-200 border border-primary-200"
62
+ },
63
+ isDisabled: {
64
+ true: "bg-neutral-600 border-none",
65
+ false: ""
66
+ },
67
+ isHoveredWhenOff: {
68
+ true: "bg-primary-700 border-primary-700",
69
+ false: ""
70
+ },
71
+ size: {
72
+ sm: "w-[20px] h-[20px]",
73
+ md: "w-[24px] h-[24px]"
74
+ }
75
+ },
76
+ defaultVariants: {
77
+ size: "md",
78
+ isSelected: !1,
79
+ isDisabled: !1,
80
+ isHoveredWhenOff: !1
81
+ },
82
+ compoundVariants: [
83
+ {
84
+ isSelected: !0,
85
+ isDisabled: !0,
86
+ class: "bg-neutral-400"
87
+ }
88
+ ]
89
+ }
90
+ );
22
91
  export {
23
- f as AccordionItem
92
+ a as indicatorVariants,
93
+ s as switchVariants
24
94
  };
@@ -1,17 +1,12 @@
1
- import { j as t } from "./index.es10.js";
2
- import { cn as m } from "./index.es11.js";
3
- const u = ({
4
- label: x,
5
- description: e,
6
- errorMessage: n,
7
- isDisabled: s,
8
- isInvalid: r,
9
- children: l
10
- }) => !x && !e && !l ? null : /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col", children: [
11
- x ? /* @__PURE__ */ t.jsx("p", { className: m("text-sm font-semibold", s ? "text-neutral-600" : "text-neutral-900"), children: x }) : l,
12
- e && !n && /* @__PURE__ */ t.jsx("p", { className: m("text-xs", s ? "text-neutral-600" : "text-neutral-700"), children: e }),
13
- r && n && /* @__PURE__ */ t.jsx("p", { className: "text-sm text-red-500", children: n })
14
- ] });
1
+ import { j as f } from "./index.es10.js";
2
+ import { useRef as l } from "react";
3
+ import { useTab as u } from "react-aria";
4
+ import { cn as b } from "./index.es11.js";
5
+ import { tabVariants as x } from "./index.es20.js";
6
+ const R = (o) => {
7
+ const { className: r, item: i, orientation: n, state: t, id: a = void 0 } = o, { key: s, rendered: c } = i, m = t.selectedKey === s, e = l(null), { tabProps: p } = u({ key: String(s) }, t, e), d = b(x({ isActive: m, orientation: n }), r);
8
+ return /* @__PURE__ */ f.jsx("div", { ...p, ref: e, className: d, id: a, children: c });
9
+ };
15
10
  export {
16
- u as ContentSwitch
11
+ R as Tab
17
12
  };
@@ -1,22 +1,12 @@
1
- import { j as i } from "./index.es10.js";
2
- import { cn as m } from "./index.es11.js";
3
- import { indicatorVariants as n } from "./index.es20.js";
4
- const c = ({ isSelected: r, isDisabled: o, isHovered: f, size: a, dimensions: t }) => /* @__PURE__ */ i.jsx(
5
- "div",
6
- {
7
- className: m(
8
- n({
9
- isSelected: r,
10
- isDisabled: o,
11
- size: a,
12
- isHoveredWhenOff: f && !r
13
- })
14
- ),
15
- style: {
16
- left: r ? `${t.onLeft}px` : `${t.offLeft}px`
17
- }
18
- }
19
- );
1
+ import { j as m } from "./index.es10.js";
2
+ import { useRef as l } from "react";
3
+ import { useTabPanel as p } from "react-aria";
4
+ import { cn as i } from "./index.es11.js";
5
+ const P = (r) => {
6
+ var t;
7
+ const { className: o, state: s, ...n } = r, e = l(null), { tabPanelProps: a } = p(n, s, e), c = i("", o);
8
+ return /* @__PURE__ */ m.jsx("div", { ...a, ref: e, className: c, children: (t = s.selectedItem) == null ? void 0 : t.props.children });
9
+ };
20
10
  export {
21
- c as SwitchIndicator
11
+ P as TabPanel
22
12
  };
package/dist/index.es2.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { j as e } from "./index.es10.js";
2
2
  import { useState as u } from "react";
3
3
  import { cn as d } from "./index.es11.js";
4
- import { AccordionItem as f } from "./index.es17.js";
4
+ import { AccordionItem as f } from "./index.es12.js";
5
5
  const A = ({ items: s, accordionClassName: c, itemClassName: l, sectionClassName: m, hasIcon: a }) => {
6
6
  const [t, i] = u(null), p = d("flex flex-col gap-y-4", c), x = (o) => {
7
7
  i(o === t ? null : o);
@@ -1,94 +1,33 @@
1
- import { cva as e } from "class-variance-authority";
2
- const s = e("relative rounded-full transition-colors duration-300", {
1
+ import { cva as r } from "class-variance-authority";
2
+ const e = r("flex h-full max-h-12", {
3
3
  variants: {
4
- isSelected: {
5
- true: "bg-primary-500",
6
- false: "bg-neutral-50 border border-primary-200"
7
- },
8
- isDisabled: {
9
- true: "cursor-not-allowed bg-neutral-400 border-none",
10
- false: "cursor-pointer"
11
- },
12
- isHoveredWhenOff: {
13
- true: "bg-neutral-200 border-primary-700",
14
- false: ""
15
- },
16
- isFocusVisible: {
17
- true: "ring-2 ring-sky-400 ring-offset-2",
18
- false: ""
19
- },
20
- size: {
21
- sm: "w-[42px] h-[24px]",
22
- md: "w-[56px] h-[32px]"
4
+ orientation: {
5
+ horizontal: "flex-col",
6
+ vertical: "flex-row"
23
7
  }
24
- },
25
- defaultVariants: {
26
- size: "md",
27
- isSelected: !1,
28
- isDisabled: !1,
29
- isFocusVisible: !1,
30
- isHoveredWhenOff: !1
31
- },
32
- compoundVariants: [
33
- // Hover cuando el switch está apagado y no deshabilitado
34
- {
35
- isSelected: !1,
36
- isDisabled: !1,
37
- class: "hover:bg-neutral-200 hover:border-primary-700"
38
- },
39
- {
40
- isSelected: !0,
41
- isDisabled: !1,
42
- class: "hover:bg-primary-700"
43
- },
44
- {
45
- isSelected: !1,
46
- isDisabled: !0,
47
- class: "bg-neutral-400 border-none"
48
- },
49
- {
50
- isSelected: !0,
51
- isDisabled: !0,
52
- class: "bg-neutral-500"
53
- }
54
- ]
55
- }), a = e(
56
- "absolute top-1/2 transform -translate-y-1/2 transition-all duration-300 rounded-full",
8
+ }
9
+ }), i = r(
10
+ "group inline-flex cursor-pointer items-center px-4 py-3 text-base font-semibold focus-visible:outline-none",
57
11
  {
58
12
  variants: {
59
- isSelected: {
60
- true: "bg-primary-50",
61
- false: "bg-primary-200 border border-primary-200"
62
- },
63
- isDisabled: {
64
- true: "bg-neutral-600 border-none",
65
- false: ""
13
+ isActive: {
14
+ true: "bg-primary-50 text-primary-600 ",
15
+ false: "text-neutral-500 hover:text-primary-900"
66
16
  },
67
- isHoveredWhenOff: {
68
- true: "bg-primary-700 border-primary-700",
69
- false: ""
70
- },
71
- size: {
72
- sm: "w-[20px] h-[20px]",
73
- md: "w-[24px] h-[24px]"
17
+ orientation: {
18
+ horizontal: "border-b-2 border-transparent",
19
+ vertical: "border-r-2 border-transparent"
74
20
  }
75
21
  },
76
- defaultVariants: {
77
- size: "md",
78
- isSelected: !1,
79
- isDisabled: !1,
80
- isHoveredWhenOff: !1
81
- },
82
22
  compoundVariants: [
83
- {
84
- isSelected: !0,
85
- isDisabled: !0,
86
- class: "bg-neutral-400"
87
- }
23
+ { isActive: !0, orientation: "horizontal", class: "border-b-2 border-primary-500" },
24
+ { isActive: !1, orientation: "horizontal", class: "border-b-2 border-primary-200" },
25
+ { isActive: !1, orientation: "vertical", class: "border-r-2 border-primary-200" },
26
+ { isActive: !0, orientation: "vertical", class: "border-r-2 border-primary-500" }
88
27
  ]
89
28
  }
90
29
  );
91
30
  export {
92
- a as indicatorVariants,
93
- s as switchVariants
31
+ i as tabVariants,
32
+ e as tabsVariants
94
33
  };
package/dist/index.es3.js CHANGED
@@ -3,9 +3,9 @@ import { Button as I } from "react-aria-components";
3
3
  import { cn as x } from "./index.es11.js";
4
4
  import "react";
5
5
  import { buttonVariants as B } from "./index.es26.js";
6
- import "./index.es16.js";
6
+ import "./index.es14.js";
7
7
  import { Loader as y } from "./index.es5.js";
8
- import "./index.es20.js";
8
+ import "./index.es17.js";
9
9
  import "./index.es21.js";
10
10
  const j = ({
11
11
  renderPosition: t,
package/dist/index.es4.js CHANGED
@@ -1,44 +1,52 @@
1
1
  import { j as e } from "./index.es10.js";
2
- import { Checkbox as i } from "react-aria-components";
2
+ import { Checkbox as h } from "react-aria-components";
3
3
  import { cn as m } from "./index.es11.js";
4
- import { MarkIcon as h } from "./index.es15.js";
5
- import { checkboxVariants as j } from "./index.es16.js";
4
+ import { MarkIcon as i } from "./index.es13.js";
5
+ import { checkboxVariants as j } from "./index.es14.js";
6
6
  const g = ({
7
7
  isIndeterminate: x = !1,
8
- isDisabled: r = !1,
8
+ isDisabled: a = !1,
9
9
  className: c,
10
- children: a,
10
+ children: t,
11
11
  onChange: l,
12
12
  isSelected: s,
13
13
  id: n,
14
14
  ...p
15
15
  }) => {
16
- const f = (t, o) => m(
16
+ const f = (o, r) => m(
17
17
  j({
18
- isDisabled: r,
19
- isFocusVisible: t,
20
- isHovered: o,
18
+ isDisabled: a,
19
+ isFocusVisible: o,
20
+ isHovered: r,
21
21
  isSelected: s,
22
- label: !!a
22
+ label: !!t
23
23
  })
24
24
  );
25
25
  return /* @__PURE__ */ e.jsx(
26
- i,
26
+ h,
27
27
  {
28
28
  className: m("group flex items-center", c),
29
29
  isSelected: s,
30
- isDisabled: r,
30
+ isDisabled: a,
31
31
  id: n,
32
32
  onChange: l,
33
33
  ...p,
34
- children: ({ isFocusVisible: t, isHovered: o }) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
35
- /* @__PURE__ */ e.jsx("div", { className: f(t, o), "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(h, { isIndeterminate: x, isSelected: s, className: "size-3" }) }),
36
- a && /* @__PURE__ */ e.jsx(
34
+ children: ({ isFocusVisible: o, isHovered: r }) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
35
+ /* @__PURE__ */ e.jsx("div", { className: f(o, r), "aria-hidden": "true", children: /* @__PURE__ */ e.jsx(
36
+ i,
37
+ {
38
+ isIndeterminate: x,
39
+ isHovered: r,
40
+ isSelected: s,
41
+ className: "size-3"
42
+ }
43
+ ) }),
44
+ t && /* @__PURE__ */ e.jsx(
37
45
  "span",
38
46
  {
39
- className: m("select-none text-base leading-6", r ? "text-neutral-500" : "text-primary-900"),
47
+ className: m("select-none text-base leading-6", a ? "text-neutral-500" : "text-primary-900"),
40
48
  id: n,
41
- children: a
49
+ children: t
42
50
  }
43
51
  )
44
52
  ] })
package/dist/index.es6.js CHANGED
@@ -1,71 +1,81 @@
1
- import { j as t } from "./index.es10.js";
1
+ import { j as o } from "./index.es10.js";
2
2
  import { Switch as d } from "react-aria-components";
3
- import { cn as f } from "./index.es11.js";
4
- import { ContentSwitch as y } from "./index.es18.js";
5
- import { SwitchIndicator as L } from "./index.es19.js";
6
- import { switchVariants as u } from "./index.es20.js";
3
+ import { cn as c } from "./index.es11.js";
4
+ import { ContentSwitch as y } from "./index.es15.js";
5
+ import { SwitchIndicator as L } from "./index.es16.js";
6
+ import { switchVariants as u } from "./index.es17.js";
7
7
  const C = ({
8
- children: c,
9
- label: i,
8
+ children: i,
9
+ label: f,
10
10
  description: m,
11
- errorMessage: e,
12
- validationState: p,
11
+ errorMessage: s,
12
+ validationState: e,
13
13
  size: a = "md",
14
14
  isDisabled: r = !1,
15
- isSelected: o = !1,
16
- onChange: s,
17
- "aria-label": h,
15
+ isSelected: t = !1,
16
+ onChange: h,
17
+ "aria-label": p,
18
18
  "aria-describedby": x
19
19
  }) => {
20
- const l = p === "invalid" && !r, j = a === "sm" ? { offLeft: 3, onLeft: 19 } : { offLeft: 4, onLeft: 28 };
21
- return /* @__PURE__ */ t.jsxs("label", { className: f("group flex flex-row items-center gap-2", r ? "opacity-40" : "opacity-100"), children: [
22
- /* @__PURE__ */ t.jsx(
23
- d,
24
- {
25
- isDisabled: r,
26
- isSelected: o,
27
- "aria-checked": o,
28
- "aria-label": h,
29
- "aria-describedby": x,
30
- onChange: s,
31
- children: ({ isFocusVisible: w, isHovered: n }) => /* @__PURE__ */ t.jsx(
32
- "div",
20
+ const j = e === "invalid" && !r, w = a === "sm" ? { offLeft: 3, onLeft: 19 } : { offLeft: 4, onLeft: 28 };
21
+ return /* @__PURE__ */ o.jsxs(
22
+ "label",
23
+ {
24
+ className: c(
25
+ "group flex flex-row gap-2",
26
+ r ? "opacity-40" : "opacity-100",
27
+ f && m ? "items-start" : "items-center"
28
+ ),
29
+ children: [
30
+ /* @__PURE__ */ o.jsx(
31
+ d,
33
32
  {
34
- className: f(
35
- u({
36
- isSelected: o,
37
- isDisabled: r,
38
- isFocusVisible: w,
39
- size: a,
40
- isHoveredWhenOff: n && !o
41
- })
42
- ),
43
- children: /* @__PURE__ */ t.jsx(
44
- L,
33
+ isDisabled: r,
34
+ isSelected: t,
35
+ "aria-checked": t,
36
+ "aria-label": p,
37
+ "aria-describedby": x,
38
+ onChange: h,
39
+ children: ({ isFocusVisible: l, isHovered: n }) => /* @__PURE__ */ o.jsx(
40
+ "div",
45
41
  {
46
- isSelected: o,
47
- isDisabled: r,
48
- isHovered: n,
49
- size: a,
50
- dimensions: j
42
+ className: c(
43
+ u({
44
+ isSelected: t,
45
+ isDisabled: r,
46
+ isFocusVisible: l,
47
+ size: a,
48
+ isHoveredWhenOff: n && !t
49
+ })
50
+ ),
51
+ children: /* @__PURE__ */ o.jsx(
52
+ L,
53
+ {
54
+ isSelected: t,
55
+ isDisabled: r,
56
+ isHovered: n,
57
+ size: a,
58
+ dimensions: w
59
+ }
60
+ )
51
61
  }
52
62
  )
53
63
  }
64
+ ),
65
+ /* @__PURE__ */ o.jsx(
66
+ y,
67
+ {
68
+ label: f,
69
+ description: m,
70
+ errorMessage: s,
71
+ isDisabled: r,
72
+ isInvalid: j,
73
+ children: i
74
+ }
54
75
  )
55
- }
56
- ),
57
- /* @__PURE__ */ t.jsx(
58
- y,
59
- {
60
- label: i,
61
- description: m,
62
- errorMessage: e,
63
- isDisabled: r,
64
- isInvalid: l,
65
- children: c
66
- }
67
- )
68
- ] });
76
+ ]
77
+ }
78
+ );
69
79
  };
70
80
  export {
71
81
  C as Switch
package/dist/index.es9.js CHANGED
@@ -3,9 +3,9 @@ import { useRef as x } from "react";
3
3
  import { useTabList as b } from "react-aria";
4
4
  import { useTabListState as d, Item as N } from "react-stately";
5
5
  import { cn as e } from "./index.es11.js";
6
- import { Tab as j } from "./index.es12.js";
7
- import { TabPanel as u } from "./index.es13.js";
8
- import { tabsVariants as h } from "./index.es14.js";
6
+ import { Tab as j } from "./index.es18.js";
7
+ import { TabPanel as u } from "./index.es19.js";
8
+ import { tabsVariants as h } from "./index.es20.js";
9
9
  const T = (a) => {
10
10
  var m;
11
11
  const { rootClassName: i, tabClassName: n, tabPanelClassName: c, orientation: o = "horizontal", id: f = void 0 } = a, t = d(a), r = x(null), { tabListProps: p } = b(a, t, r);
@@ -7,6 +7,11 @@ declare const meta: {
7
7
  layout: string;
8
8
  };
9
9
  tags: string[];
10
+ argTypes: {
11
+ children: {
12
+ control: string;
13
+ };
14
+ };
10
15
  };
11
16
  export default meta;
12
17
  type Story = StoryObj<typeof meta>;
package/dist/style.css CHANGED
@@ -899,6 +899,9 @@ select {
899
899
  .flex-wrap {
900
900
  flex-wrap: wrap;
901
901
  }
902
+ .items-start {
903
+ align-items: flex-start;
904
+ }
902
905
  .items-end {
903
906
  align-items: flex-end;
904
907
  }
@@ -1248,6 +1251,10 @@ select {
1248
1251
  --tw-text-opacity: 1;
1249
1252
  color: rgb(115 118 140 / var(--tw-text-opacity));
1250
1253
  }
1254
+ .text-neutral-800 {
1255
+ --tw-text-opacity: 1;
1256
+ color: rgb(56 58 67 / var(--tw-text-opacity));
1257
+ }
1251
1258
  .text-neutral-900 {
1252
1259
  --tw-text-opacity: 1;
1253
1260
  color: rgb(34 36 42 / var(--tw-text-opacity));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simpli-route/apollo-ds",
3
- "version": "0.0.13",
3
+ "version": "0.0.15",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"