@cocso-ui/react 0.1.5 → 0.1.8

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,9 +1,10 @@
1
1
  import type { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
  import { type FontWeight } from '../token';
3
- export type ButtonSize = 'lg' | 'md' | 'sm' | 'xs';
3
+ export type ButtonSize = 'xl' | 'lg' | 'md' | 'sm' | 'xs';
4
4
  export type ButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'success' | 'error' | 'warning' | 'neutral';
5
5
  export type ButtonShape = 'square' | 'circle' | 'rounded';
6
6
  export interface ButtonProps extends Omit<ComponentPropsWithoutRef<'button'>, 'prefix'> {
7
+ asChild?: boolean;
7
8
  size?: ButtonSize;
8
9
  variant?: ButtonVariant;
9
10
  weight?: FontWeight;
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var xo=Object.create;var X=Object.defineProperty;var Co=Object.getOwnPropertyDescriptor;var Po=Object.getOwnPropertyNames;var ko=Object.getPrototypeOf,So=Object.prototype.hasOwnProperty;var zo=(t,o)=>{for(var e in o)X(t,e,{get:o[e],enumerable:!0})},Pt=(t,o,e,r)=>{if(o&&typeof o=="object"||typeof o=="function")for(let i of Po(o))!So.call(t,i)&&i!==e&&X(t,i,{get:()=>o[i],enumerable:!(r=Co(o,i))||r.enumerable});return t};var S=(t,o,e)=>(e=t!=null?xo(ko(t)):{},Pt(o||!t||!t.__esModule?X(e,"default",{value:t,enumerable:!0}):e,t)),Ro=t=>Pt(X({},"__esModule",{value:!0}),t);var Oe={};zo(Oe,{Accordion:()=>Bo,Body:()=>v,Button:()=>Zo,Checkbox:()=>Ko,Display:()=>te,Dropdown:()=>ne,Heading:()=>gt,Link:()=>ce,Modal:()=>fe,OneTimePasswordField:()=>we,Pagination:()=>be,Popover:()=>Pe,Select:()=>Se,Spinner:()=>at,StockQuantityStatus:()=>Te,Switch:()=>We,Tab:()=>Ne,Toaster:()=>it.Toaster,Typography:()=>T,colors:()=>n,fontSize:()=>I,fontWeight:()=>V,getColor:()=>uo,lineHeight:()=>st,spacing:()=>s,toast:()=>it.toast});module.exports=Ro(Oe);var kt=require("@cocso-ui/react-icons"),b=S(require("@radix-ui/react-accordion"),1),_=require("clsx"),j=require("react");var O={item:"C",content:"c","slide-down":"g","slide-up":"b",trigger:"s",chevron:"d"};var B=require("react/jsx-runtime"),Ho=(0,j.forwardRef)(({className:t,...o},e)=>(0,B.jsx)(b.Item,{ref:e,className:(0,_.clsx)(O.item,t),...o})),Wo=(0,j.forwardRef)(({className:t,children:o,chevron:e=!0,...r},i)=>(0,B.jsxs)(b.Trigger,{ref:i,className:(0,_.clsx)(O.trigger,t),...r,children:[o,e&&(0,B.jsx)(kt.KeyboardArrowDownIcon,{className:O.chevron})]})),Lo=(0,j.forwardRef)(({className:t,...o},e)=>(0,B.jsx)(b.Content,{ref:e,className:(0,_.clsx)(O.content,t),...o})),Bo=Object.assign(b.Root,{Item:Ho,Header:b.Header,Trigger:Wo,Content:Lo});var Lt=require("react"),Bt=require("ts-pattern");var zt=require("@radix-ui/react-primitive"),Rt=require("@radix-ui/react-slot"),Tt=require("clsx"),Ht=require("react");var n={transparent:"var(--ds-transparent)",white:"var(--ds-white)",whiteAlpha5:"var(--ds-white-alpha-5)",whiteAlpha10:"var(--ds-white-alpha-10)",whiteAlpha20:"var(--ds-white-alpha-20)",whiteAlpha30:"var(--ds-white-alpha-30)",whiteAlpha40:"var(--ds-white-alpha-40)",whiteAlpha50:"var(--ds-white-alpha-50)",whiteAlpha60:"var(--ds-white-alpha-60)",whiteAlpha70:"var(--ds-white-alpha-70)",whiteAlpha80:"var(--ds-white-alpha-80)",whiteAlpha90:"var(--ds-white-alpha-90)",black:"var(--ds-black)",blackAlpha5:"var(--ds-black-alpha-5)",blackAlpha10:"var(--ds-black-alpha-10)",blackAlpha20:"var(--ds-black-alpha-20)",blackAlpha30:"var(--ds-black-alpha-30)",blackAlpha40:"var(--ds-black-alpha-40)",blackAlpha50:"var(--ds-black-alpha-50)",blackAlpha60:"var(--ds-black-alpha-60)",blackAlpha70:"var(--ds-black-alpha-70)",blackAlpha80:"var(--ds-black-alpha-80)",blackAlpha90:"var(--ds-black-alpha-90)",neutral50:"var(--ds-neutral-50)",neutral100:"var(--ds-neutral-100)",neutral200:"var(--ds-neutral-200)",neutral300:"var(--ds-neutral-300)",neutral400:"var(--ds-neutral-400)",neutral500:"var(--ds-neutral-500)",neutral600:"var(--ds-neutral-600)",neutral700:"var(--ds-neutral-700)",neutral800:"var(--ds-neutral-800)",neutral900:"var(--ds-neutral-900)",neutral950:"var(--ds-neutral-950)",primary50:"var(--ds-primary-50)",primary100:"var(--ds-primary-100)",primary200:"var(--ds-primary-200)",primary300:"var(--ds-primary-300)",primary400:"var(--ds-primary-400)",primary500:"var(--ds-primary-500)",primary600:"var(--ds-primary-600)",primary700:"var(--ds-primary-700)",primary800:"var(--ds-primary-800)",primary900:"var(--ds-primary-900)",primary950:"var(--ds-primary-950)",danger50:"var(--ds-danger-50)",danger100:"var(--ds-danger-100)",danger200:"var(--ds-danger-200)",danger300:"var(--ds-danger-300)",danger400:"var(--ds-danger-400)",danger500:"var(--ds-danger-500)",danger600:"var(--ds-danger-600)",danger700:"var(--ds-danger-700)",danger800:"var(--ds-danger-800)",danger900:"var(--ds-danger-900)",danger950:"var(--ds-danger-950)",warning50:"var(--ds-warning-50)",warning100:"var(--ds-warning-100)",warning200:"var(--ds-warning-200)",warning300:"var(--ds-warning-300)",warning400:"var(--ds-warning-400)",warning500:"var(--ds-warning-500)",warning600:"var(--ds-warning-600)",warning700:"var(--ds-warning-700)",warning800:"var(--ds-warning-800)",warning900:"var(--ds-warning-900)",warning950:"var(--ds-warning-950)",success50:"var(--ds-success-50)",success100:"var(--ds-success-100)",success200:"var(--ds-success-200)",success300:"var(--ds-success-300)",success400:"var(--ds-success-400)",success500:"var(--ds-success-500)",success600:"var(--ds-success-600)",success700:"var(--ds-success-700)",success800:"var(--ds-success-800)",success900:"var(--ds-success-900)",success950:"var(--ds-success-950)"};var s={s0:"var(--ds-spacing-0)",s1:"var(--ds-spacing-1)",s2:"var(--ds-spacing-2)",s3:"var(--ds-spacing-3)",s4:"var(--ds-spacing-4)",s5:"var(--ds-spacing-5)",s6:"var(--ds-spacing-6)",s7:"var(--ds-spacing-7)",s8:"var(--ds-spacing-8)",s9:"var(--ds-spacing-9)",s10:"var(--ds-spacing-10)",s11:"var(--ds-spacing-11)",s12:"var(--ds-spacing-12)",s13:"var(--ds-spacing-13)",s14:"var(--ds-spacing-14)",s15:"var(--ds-spacing-15)",s16:"var(--ds-spacing-16)",s17:"var(--ds-spacing-17)",s18:"var(--ds-spacing-18)",s19:"var(--ds-spacing-19)",s20:"var(--ds-spacing-20)",s21:"var(--ds-spacing-21)",max:"var(--ds-spacing-max)"};var I={10:10,11:11,12:12,13:13,14:14,15:15,16:16,18:18,20:20,24:24,28:28,32:32,36:36,44:44,60:60},V={thin:100,extralight:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},st={none:1,tight:1.25,snug:1.375,normal:1.5,relaxed:1.625,loose:2};var St={typography:"i"};var Wt=require("react/jsx-runtime"),T=(0,Ht.forwardRef)(({asChild:t,className:o,style:e,color:r,size:i=16,weight:c="normal",lineHeight:p="normal",...a},l)=>{let d=t?Rt.Slot:zt.Primitive.p,g,m,k;Array.isArray(i)?[g,m,k]=i:typeof i=="object"?{base:g,tablet:m,desktop:k}=i:g=i;let N={...e,"--cocso-typography-font-color":r,"--cocso-typography-font-size":`${I[g]}px`,...m!==void 0&&{"--cocso-tablet-typography-font-size":`${I[m]}px`},...k!==void 0&&{"--cocso-desktop-typography-font-size":`${I[k]}px`},"--cocso-typography-font-weight":V[c],"--cocso-typography-line-height":st[p]};return(0,Wt.jsx)(d,{ref:l,className:(0,Tt.clsx)(St.typography,o),style:N,...a})});var Ft=require("react/jsx-runtime"),v=(0,Lt.forwardRef)(({asChild:t,style:o,color:e,size:r="md",weight:i,lineHeight:c,...p},a)=>{let l=Mo(r);return(0,Ft.jsx)(T,{ref:a,color:e,size:l,weight:i,lineHeight:c,asChild:t,...p})}),Mo=t=>(0,Bt.match)(t).with("lg",()=>18).with("md",()=>16).with("sm",()=>14).with("xs",()=>12).exhaustive();var Vt=require("@radix-ui/react-primitive"),Zt=require("clsx"),$t=require("react"),w=require("ts-pattern");var Dt=require("@radix-ui/react-primitive"),At=require("@radix-ui/react-slot"),Nt=require("clsx"),Ot=require("react"),Z=require("ts-pattern");var Mt={"donut-spin":"u",spinner:"D"};var It=require("react/jsx-runtime"),at=(0,Ot.forwardRef)(({asChild:t,className:o,style:e,size:r="md",color:i="primary",...c},p)=>{let a=t?At.Slot:Dt.Primitive.div,l={...e,"--cocso-spinner-size":Ao(r),"--cocso-spinner-border-width":No(r),"--cocso-spinner-border-color":Oo(i),"--cocso-spinner-bg-color":Io(i)};return(0,It.jsx)(a,{ref:p,className:(0,Nt.clsx)(Mt.spinner,o),style:l,...c})}),Ao=t=>(0,Z.match)(t).with("xl",()=>"40px").with("lg",()=>"32px").with("md",()=>"24px").with("sm",()=>"20px").exhaustive(),No=t=>(0,Z.match)(t).with("xl",()=>"5px").with("lg",()=>"4px").with("md",()=>"3px").with("sm",()=>"2px").exhaustive(),Oo=t=>(0,Z.match)(t).with("primary",()=>n.primary500).with("neutral",()=>n.neutral600).with("white",()=>n.white).exhaustive(),Io=t=>(0,Z.match)(t).with("primary",()=>n.primary100).with("neutral",()=>n.neutral100).with("white",()=>n.whiteAlpha20).exhaustive();var H={button:"l",disabled:"h",content:"E",prefix:"F",suffix:"G",svgOnly:"H"};var W=require("react/jsx-runtime"),Zo=(0,$t.forwardRef)(({className:t,style:o,children:e,size:r="md",variant:i="primary",weight:c="medium",shape:p="square",prefix:a,suffix:l,svgOnly:d=!1,disabled:g=!1,loading:m=!1,...k},N)=>{let nt={...o,...$o(r),"--cocso-button-font-color":Yo(i),"--cocso-button-font-weight":V[c],"--cocso-button-border":qo(i),"--cocso-button-border-radius":Eo(p,r),"--cocso-button-bg-color":Qo(i),"--cocso-button-bg-color-hover":Xo(i),"--cocso-button-bg-color-active":_o(i)},Q=g||m;return(0,W.jsxs)(Vt.Primitive.button,{ref:N,className:(0,Zt.clsx)(H.button,Q&&H.disabled,d&&H.svgOnly,t),disabled:Q,style:nt,...k,children:[m&&(0,W.jsx)(at,{size:"sm",color:"white"}),a&&(0,W.jsx)("span",{className:H.prefix,children:a}),(0,W.jsx)("span",{className:H.content,children:e}),l&&(0,W.jsx)("span",{className:H.suffix,children:l})]})}),$o=t=>{let o=(0,w.match)(t).with("lg",()=>48).with("md",()=>40).with("sm",()=>32).with("xs",()=>24).exhaustive(),e=(0,w.match)(t).with("lg",()=>14).with("md",()=>10).with("sm",()=>6).with("xs",()=>0).exhaustive(),r=(0,w.match)(t).with("lg",()=>16).with("xs",()=>12).otherwise(()=>14);return{"--cocso-button-height":`${o}px`,"--cocso-button-padding-inline":`${e}px`,"--cocso-button-font-size":`${r}px`}},Eo=(t,o)=>(0,w.match)(t).with("square",()=>(0,w.match)(o).with("lg",()=>"8px").with("md",()=>"6px").with("sm",()=>"6px").with("xs",()=>"4px").exhaustive()).with("circle",()=>"100%").with("rounded",()=>"100px").exhaustive(),Yo=t=>(0,w.match)(t).with("primary","success","error","neutral",()=>n.white).with("secondary","tertiary","warning",()=>n.neutral950).exhaustive(),qo=t=>(0,w.match)(t).with("tertiary",()=>`1px solid ${n.neutral100}`).otherwise(()=>"none"),Qo=t=>(0,w.match)(t).with("primary",()=>n.primary500).with("secondary",()=>n.white).with("tertiary",()=>n.transparent).with("success",()=>n.success500).with("error",()=>n.danger500).with("warning",()=>n.warning300).with("neutral",()=>n.neutral950).exhaustive(),Xo=t=>(0,w.match)(t).with("primary",()=>n.primary600).with("secondary",()=>n.neutral50).with("tertiary",()=>n.neutral50).with("success",()=>n.success600).with("error",()=>n.danger600).with("warning",()=>n.warning400).with("neutral",()=>n.neutral800).exhaustive(),_o=t=>(0,w.match)(t).with("primary",()=>n.primary700).with("secondary",()=>n.neutral100).with("tertiary",()=>n.neutral100).with("success",()=>n.success700).with("error",()=>n.danger700).with("warning",()=>n.warning500).with("neutral",()=>n.neutral700).exhaustive();var ct=require("@cocso-ui/react-icons"),K=S(require("@radix-ui/react-checkbox"),1),Et=require("clsx"),G=require("react"),M=require("ts-pattern");var F={wrapper:"I",checkbox:"r",indicator:"J",label:"v"};var x=require("react/jsx-runtime"),Ko=(0,G.forwardRef)(({id:t,className:o,style:e,size:r="md",status:i,onChange:c,label:p,disabled:a,...l},d)=>{let g=(0,G.useId)(),m=t??g,k=Q=>{if(!a){let bo=(0,M.match)(Q).with(!0,()=>"on").with("indeterminate",()=>"intermediate").with(!1,()=>"off").exhaustive();c(bo)}},N=()=>(0,M.match)(i).with("on",()=>!0).with("intermediate",()=>"indeterminate").with("off",()=>!1).exhaustive(),nt={...e,"--cocso-checkbox-size":Go(r),"--cocso-checkbox-color":n.white,"--cocso-checkbox-border-color":Jo(i),"--cocso-checkbox-bg-color":Uo(i)};return(0,x.jsxs)("div",{className:(0,Et.clsx)(F.wrapper,o),style:nt,children:[(0,x.jsxs)(K.Root,{ref:d,id:m,className:F.checkbox,checked:N(),onCheckedChange:k,disabled:a,...l,children:[(0,x.jsx)(K.Indicator,{className:F.indicator,style:{opacity:i==="on"?1:0},"aria-hidden":"true",children:(0,x.jsx)(ct.CheckIcon,{size:24})}),(0,x.jsx)("div",{className:F.indicator,style:{opacity:i==="intermediate"?1:0},"aria-hidden":"true",children:(0,x.jsx)(ct.CheckIcon,{size:24})})]}),p&&(0,x.jsx)(v,{className:F.label,size:r,"aria-disabled":a,asChild:!0,children:(0,x.jsx)("label",{htmlFor:m,children:p})})]})}),Go=t=>(0,M.match)(t).with("lg",()=>s.s10).with("md",()=>s.s9).with("sm",()=>s.s8).exhaustive(),Jo=t=>(0,M.match)(t).with("on",()=>n.primary500).with("intermediate",()=>n.primary500).with("off",()=>n.neutral100).exhaustive(),Uo=t=>(0,M.match)(t).with("on",()=>n.primary500).with("intermediate",()=>n.primary500).with("off",()=>n.white).exhaustive();var Yt=require("@radix-ui/react-slot"),qt=require("react"),Qt=require("ts-pattern");var pt=require("react/jsx-runtime"),te=(0,qt.forwardRef)(({asChild:t,className:o,color:e,size:r="md",weight:i,lineHeight:c,...p},a)=>{let l=t?Yt.Slot:"h1",d=oe(r);return(0,pt.jsx)(T,{ref:a,color:e,size:d,weight:i,lineHeight:c,asChild:!0,children:(0,pt.jsx)(l,{...p})})}),oe=t=>(0,Qt.match)(t).with("lg",()=>({base:44,tablet:60})).with("md",()=>({base:32,tablet:44})).with("sm",()=>({base:28,tablet:36})).exhaustive();var C=S(require("@radix-ui/react-dropdown-menu"),1),dt=require("clsx"),ht=require("react");var lt={"dropdown-slide-up":"f","dropdown-slide-down":"m",content:"p",item:"K"};var mt=require("react/jsx-runtime"),re=(0,ht.forwardRef)(({className:t,...o},e)=>(0,mt.jsx)(C.Content,{ref:e,className:(0,dt.clsx)(lt.content,t),...o})),ie=(0,ht.forwardRef)(({className:t,...o},e)=>(0,mt.jsx)(C.Item,{ref:e,className:(0,dt.clsx)(lt.item,t),...o})),ne=Object.assign(C.Root,{Trigger:C.Trigger,Portal:C.Portal,Content:re,Item:ie});var Xt=require("@radix-ui/react-primitive"),_t=require("@radix-ui/react-slot"),jt=require("react"),Kt=require("ts-pattern");var ft=require("react/jsx-runtime"),gt=(0,jt.forwardRef)(({asChild:t,className:o,color:e,size:r="md",weight:i="bold",lineHeight:c,...p},a)=>{let l=t?_t.Slot:Xt.Primitive.h2,d=se(r);return(0,ft.jsx)(T,{ref:a,color:e,size:d,weight:i,lineHeight:c,asChild:!0,children:(0,ft.jsx)(l,{...p})})}),se=t=>(0,Kt.match)(t).with("xl",()=>({base:28,tablet:40})).with("lg",()=>({base:24,tablet:32})).with("md",()=>({base:22,tablet:24})).with("sm",()=>18).with("xs",()=>16).exhaustive();var Gt=require("@radix-ui/react-primitive"),Jt=require("@radix-ui/react-slot"),Ut=require("clsx"),to=require("react");var ut={link:"y",indicator:"L"};var vt=require("react/jsx-runtime"),ce=(0,to.forwardRef)(({asChild:t,className:o,size:e,weight:r,lineHeight:i,indicator:c=!0,...p},a)=>{let l=t?Jt.Slot:Gt.Primitive.a;return(0,vt.jsx)(v,{size:e,weight:r,lineHeight:i,asChild:!0,children:(0,vt.jsx)(l,{ref:a,className:(0,Ut.clsx)(ut.link,c&&ut.indicator,o),...p})})});var oo=require("@cocso-ui/react-icons"),f=S(require("@radix-ui/react-dialog"),1),$=require("clsx"),E=require("react");var D={"overlay-show":"w",overlay:"M","content-show":"x",content:"N",close:"O",title:"P",description:"Q"};var y=require("react/jsx-runtime"),le=(0,E.forwardRef)(({className:t,children:o,...e},r)=>(0,y.jsxs)(f.Portal,{children:[(0,y.jsx)(f.Overlay,{className:D.overlay}),(0,y.jsx)(f.Content,{ref:r,className:(0,$.clsx)(D.content,t),...e,children:o})]})),de=(0,E.forwardRef)(({className:t,children:o,...e},r)=>(0,y.jsx)(f.Close,{ref:r,className:(0,$.clsx)(D.close,t),...e,children:(0,y.jsx)(oo.CloseIcon,{size:24})})),he=(0,E.forwardRef)(({className:t,children:o,...e},r)=>(0,y.jsx)(f.Title,{ref:r,className:(0,$.clsx)(D.title,t),asChild:!0,...e,children:(0,y.jsx)(gt,{color:"text.basic",children:o})})),me=(0,E.forwardRef)(({className:t,children:o,...e},r)=>(0,y.jsx)(f.Description,{ref:r,className:(0,$.clsx)(D.description,t),asChild:!0,...e,children:(0,y.jsx)(v,{size:"sm",color:"text.subtle",children:o})})),fe=Object.assign(f.Root,{Trigger:f.Trigger,Content:le,Close:de,Title:he,Description:me});var J=S(require("@radix-ui/react-one-time-password-field"),1),yt=require("clsx"),bt=require("react");var wt={otp:"R",input:"a"};var xt=require("react/jsx-runtime"),ue=(0,bt.forwardRef)(({className:t,...o},e)=>(0,xt.jsx)(J.Root,{ref:e,className:(0,yt.clsx)(wt.otp,t),...o})),ve=(0,bt.forwardRef)(({className:t,...o},e)=>(0,xt.jsx)(J.Input,{ref:e,className:(0,yt.clsx)(wt.input,t),...o})),we=Object.assign(ue,{Input:ve});var eo=require("clsx"),ro=require("react");var L={pagination:"S",arrow:"o",item:"e",trunc:"T"};var u=require("react/jsx-runtime"),be=(0,ro.forwardRef)(({className:t,page:o,totalPages:e,maxVisible:r=5,onChange:i,...c},p)=>{let a=Math.ceil(r/2),l=d=>(0,u.jsx)("button",{type:"button",className:L.item,onClick:()=>i(d),"data-active":o===d,children:d},d);return(0,u.jsxs)("div",{ref:p,className:(0,eo.clsx)(L.pagination,t),...c,children:[e>1&&(0,u.jsx)("button",{className:L.arrow,type:"button",disabled:o===1,onClick:()=>o>1&&i(o-1),children:(0,u.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,u.jsx)("path",{d:"m15 18-6-6 6-6"})})}),e<=r+2?Array(e).fill(0).map((d,g)=>l(g+1)):(0,u.jsxs)(u.Fragment,{children:[l(1),o>1+a&&(0,u.jsx)("span",{className:L.trunc,children:"..."}),Array(r).fill(0).map((d,g)=>{let m=o-a+g+1;return m>1&&m<e?l(m):""}),o<e-a&&(0,u.jsx)("span",{className:L.trunc,children:"..."}),l(e)]}),e>1&&(0,u.jsx)("button",{className:L.arrow,type:"button",disabled:o===e,onClick:()=>o<e&&i(o+1),children:(0,u.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,u.jsx)("path",{d:"m9 18 6-6-6-6"})})})]})});var z=S(require("@radix-ui/react-popover"),1),no=require("clsx"),so=require("react");var io={"slide-up-and-fade":"k","slide-right-and-fade":"z","slide-down-and-fade":"j","slide-left-and-fade":"Y",content:"t"};var ao=require("react/jsx-runtime"),Ce=(0,so.forwardRef)(({className:t,...o},e)=>(0,ao.jsx)(z.Content,{ref:e,className:(0,no.clsx)(io.content,t),...o})),Pe=Object.assign(z.Root,{Trigger:z.Trigger,Portal:z.Portal,Content:Ce});var co=require("@cocso-ui/react-icons"),po=require("clsx"),lo=require("react"),ho=require("ts-pattern");var U={wrapper:"U",select:"X",icon:"q"};var A=require("react/jsx-runtime"),Se=(0,lo.forwardRef)(({className:t,style:o,size:e="md",disabled:r=!1,children:i,...c},p)=>{let a={...o,...ze(e)};return(0,A.jsxs)("div",{className:U.wrapper,children:[(0,A.jsx)("select",{ref:p,className:(0,po.clsx)(U.select,t),style:a,disabled:r,...c,children:i}),(0,A.jsx)("span",{className:U.icon,children:(0,A.jsx)(co.KeyboardArrowDownIcon,{size:20})})]})}),ze=t=>(0,ho.match)(t).with("2xs",()=>({"--cocso-select-min-width":s.s11,"--cocso-select-height":s.s11,"--cocso-select-padding-left":s.s5,"--cocso-select-padding-right":`calc(${s.s8} + 16px)`,"--cocso-select-font-size":"12px","--cocso-select-border-radius":s.s3})).with("xs",()=>({"--cocso-select-min-width":s.s12,"--cocso-select-height":s.s12,"--cocso-select-padding-left":s.s6,"--cocso-select-padding-right":`calc(${s.s7} + 16px)`,"--cocso-select-font-size":"14px","--cocso-select-border-radius":s.s3})).with("sm",()=>({"--cocso-select-min-width":s.s14,"--cocso-select-height":s.s14,"--cocso-select-padding-left":s.s7,"--cocso-select-padding-right":`calc(${s.s7} + 16px)`,"--cocso-select-font-size":"14px","--cocso-select-border-radius":s.s3})).with("md",()=>({"--cocso-select-min-width":s.s16,"--cocso-select-height":s.s16,"--cocso-select-padding-left":s.s8,"--cocso-select-padding-right":`calc(${s.s8} + 16px)`,"--cocso-select-font-size":"16px","--cocso-select-border-radius":s.s4})).with("lg",()=>({"--cocso-select-min-width":s.s17,"--cocso-select-height":s.s17,"--cocso-select-padding-left":s.s9,"--cocso-select-padding-right":`calc(${s.s9} + 16px)`,"--cocso-select-font-size":"18px","--cocso-select-border-radius":s.s4})).with("xl",()=>({"--cocso-select-min-width":s.s18,"--cocso-select-height":s.s18,"--cocso-select-padding-left":s.s10,"--cocso-select-padding-right":`calc(${s.s10} + 16px)`,"--cocso-select-font-size":"18px","--cocso-select-border-radius":s.s4})).exhaustive();var mo=require("clsx"),fo=require("react"),go=require("ts-pattern");var Ct={stock:"V",indicator:"Z"};var h=require("react/jsx-runtime"),Te=(0,fo.forwardRef)(({className:t,style:o,onChange:e,quantity:r,...i},c)=>{let p={...o,"--cocso-stock-quantity-status-color":uo(r),"--cocso-stock-quantity-status-indicator-width":s.s9};return(0,h.jsxs)("div",{ref:c,className:(0,mo.clsx)(Ct.stock,t),style:p,...i,children:[(0,h.jsx)("span",{className:Ct.indicator,children:r==="\uC5EC\uC720"?(0,h.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[(0,h.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.06494 13.0754C4.26764 13.0754 1.99999 10.8199 2 8.03765C2.00001 5.25543 4.26766 3 7.06494 3L9.48051 3V6.10011L7.06494 6.10011C5.98906 6.10011 5.11689 6.96758 5.11689 8.03767C5.11688 9.10776 5.98906 9.97524 7.06494 9.97524L9.48051 9.97524V13.0754H7.06494Z",fill:"#D9D9D9",fillOpacity:"0.85098"}),(0,h.jsx)("path",{d:"M9.48051 9.97524L9.48051 6.10011L12.0519 6.10026C13.1278 6.10026 14 6.96774 14 8.03783C14 9.10792 13.1278 9.9754 12.0519 9.9754L9.48051 9.97524Z",fill:"#D9D9D9",fillOpacity:"0.85098"}),(0,h.jsx)("path",{d:"M9.48047 6.10059H7.06543C5.98955 6.10059 5.11719 6.968 5.11719 8.03809C5.11741 9.10782 5.98893 9.97532 7.06445 9.97559H9.48047V13.0752H7.06445C4.35911 13.0749 2.14983 10.9652 2.00781 8.30957V7.76465C2.15041 5.10939 4.36025 3 7.06543 3H9.48047V6.10059ZM12.0518 6.10059C13.1276 6.10059 14 6.968 14 8.03809C13.9999 9.10806 13.1276 9.97559 12.0518 9.97559H9.48047V6.10059H12.0518Z",fill:"currentColor"})]}):r==="\uBCF4\uD1B5"?(0,h.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[(0,h.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.06494 13.0754C4.26764 13.0754 1.99999 10.8199 2 8.03765C2.00001 5.25543 4.26766 3 7.06494 3L9.48051 3V6.10011L7.06494 6.10011C5.98906 6.10011 5.11689 6.96758 5.11689 8.03767C5.11688 9.10776 5.98906 9.97524 7.06494 9.97524L9.48051 9.97524V13.0754H7.06494Z",fill:"#D9D9D9",fillOpacity:"0.85098"}),(0,h.jsx)("path",{d:"M9.48051 9.97524L9.48051 6.10011L12.0519 6.10026C13.1278 6.10026 14 6.96774 14 8.03783C14 9.10792 13.1278 9.9754 12.0519 9.9754L9.48051 9.97524Z",fill:"#D9D9D9",fillOpacity:"0.85098"}),(0,h.jsx)("path",{d:"M9.48145 6.0752V6.10059H7.06641C5.99053 6.10059 5.11817 6.968 5.11816 8.03809C5.11839 9.10782 5.98991 9.97532 7.06543 9.97559H9.48145V13.0752H7.06543C4.35577 13.0749 2.14345 10.9585 2.00781 8.29688V7.77832C2.03849 7.17662 2.17568 6.60303 2.40039 6.0752H9.48145ZM12.0527 6.10059C13.1286 6.10059 14.001 6.968 14.001 8.03809C14.0008 9.10806 13.1285 9.97559 12.0527 9.97559H9.48145V6.10059H12.0527Z",fill:"currentColor"})]}):(0,h.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[(0,h.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.06494 13.0754C4.26764 13.0754 1.99999 10.8199 2 8.03765C2.00001 5.25543 4.26766 3 7.06494 3L9.48051 3V6.10011L7.06494 6.10011C5.98906 6.10011 5.11689 6.96758 5.11689 8.03767C5.11688 9.10776 5.98906 9.97524 7.06494 9.97524L9.48051 9.97524V13.0754H7.06494Z",fill:"#D9D9D9",fillOpacity:"0.85098"}),(0,h.jsx)("path",{d:"M9.48051 9.97524L9.48051 6.10011L12.0519 6.10026C13.1278 6.10026 14 6.96774 14 8.03783C14 9.10792 13.1278 9.9754 12.0519 9.9754L9.48051 9.97524Z",fill:"#D9D9D9",fillOpacity:"0.85098"}),(0,h.jsx)("path",{d:"M7.04688 9.97461C7.05273 9.97466 7.05859 9.97558 7.06445 9.97559H9.48047V13.0752H7.06445C4.95754 13.075 3.15182 11.7952 2.38867 9.97461H7.04688ZM12.0713 9.97461C12.0648 9.97467 12.0582 9.97559 12.0518 9.97559H9.48047V9.97461H12.0713Z",fill:"currentColor"})]})}),(0,h.jsx)(v,{size:"sm",color:"currentColor",children:r})]})}),uo=t=>(0,go.match)(t).with("\uC5EC\uC720",()=>n.primary500).with("\uBCF4\uD1B5",()=>n.success400).with("\uBD80\uC871",()=>n.danger500).exhaustive();var wo=require("@radix-ui/react-primitive"),ot=S(require("@radix-ui/react-switch"),1),yo=require("clsx"),et=require("react"),rt=require("ts-pattern");var tt={wrapper:"A",switch:"n",thumb:"B"};var P=require("react/jsx-runtime"),We=(0,et.forwardRef)(({id:t,className:o,style:e,size:r="md",position:i="right",disabled:c,label:p,...a},l)=>{let d=(0,et.useId)(),g=t??d,m={...e,"--cocso-switch-width":Le(r),"--cocso-switch-height":Be(r),"--cocso-switch-thumb-width":vo(r),"--cocso-switch-thumb-height":vo(r),"--cocso-switch-bg-color":n.neutral100};return(0,P.jsxs)(wo.Primitive.div,{className:(0,yo.clsx)(tt.wrapper,o),"aria-disabled":c,style:m,children:[i==="left"&&(0,P.jsx)(v,{size:r,asChild:!0,children:(0,P.jsx)("label",{htmlFor:g,children:p})}),(0,P.jsx)(ot.Root,{ref:l,className:tt.switch,disabled:c,...a,children:(0,P.jsx)(ot.Thumb,{className:tt.thumb})}),i==="right"&&(0,P.jsx)(v,{size:r,"aria-disabled":c,asChild:!0,children:(0,P.jsx)("label",{htmlFor:g,children:p})})]})}),Le=t=>(0,rt.match)(t).with("lg",()=>s.s14).with("md",()=>s.s12).exhaustive(),Be=t=>(0,rt.match)(t).with("lg",()=>s.s10).with("md",()=>s.s9).exhaustive(),vo=t=>(0,rt.match)(t).with("lg",()=>s.s9).with("md",()=>s.s8).exhaustive();var R=S(require("@radix-ui/react-tabs"),1),Y=require("react"),q=require("react/jsx-runtime"),Fe=(0,Y.forwardRef)(({...t},o)=>(0,q.jsx)(R.Root,{ref:o,...t})),Me=(0,Y.forwardRef)(({...t},o)=>(0,q.jsx)(R.List,{ref:o,...t})),De=(0,Y.forwardRef)(({...t},o)=>(0,q.jsx)(R.Trigger,{ref:o,...t})),Ae=(0,Y.forwardRef)(({...t},o)=>(0,q.jsx)(R.Content,{ref:o,...t})),Ne=Object.assign(Fe,{List:Me,Trigger:De,Content:Ae});var it=require("sonner");
1
+ "use strict";var So=Object.create;var G=Object.defineProperty;var Ro=Object.getOwnPropertyDescriptor;var zo=Object.getOwnPropertyNames;var To=Object.getPrototypeOf,Ho=Object.prototype.hasOwnProperty;var Wo=(t,o)=>{for(var e in o)G(t,e,{get:o[e],enumerable:!0})},Ht=(t,o,e,r)=>{if(o&&typeof o=="object"||typeof o=="function")for(let s of zo(o))!Ho.call(t,s)&&s!==e&&G(t,s,{get:()=>o[s],enumerable:!(r=Ro(o,s))||r.enumerable});return t};var R=(t,o,e)=>(e=t!=null?So(To(t)):{},Ht(o||!t||!t.__esModule?G(e,"default",{value:t,enumerable:!0}):e,t)),Bo=t=>Ht(G({},"__esModule",{value:!0}),t);var Ze={};Wo(Ze,{Accordion:()=>No,Body:()=>v,Button:()=>qo,Checkbox:()=>te,Display:()=>ie,Dropdown:()=>pe,Heading:()=>yt,Link:()=>he,Modal:()=>we,OneTimePasswordField:()=>Ce,Pagination:()=>ke,Popover:()=>ze,Select:()=>He,Spinner:()=>lt,StockQuantityStatus:()=>Le,Switch:()=>Me,Tab:()=>Ee,Toaster:()=>ct.Toaster,Typography:()=>W,colors:()=>i,fontSize:()=>E,fontWeight:()=>Z,getColor:()=>bo,lineHeight:()=>pt,spacing:()=>n,toast:()=>ct.toast});module.exports=Bo(Ze);var Wt=require("@cocso-ui/react-icons"),b=R(require("@radix-ui/react-accordion"),1),J=require("clsx"),U=require("react");var V={item:"C",content:"c","slide-down":"g","slide-up":"b",trigger:"s",chevron:"d"};var M=require("react/jsx-runtime"),Fo=(0,U.forwardRef)(({className:t,...o},e)=>(0,M.jsx)(b.Item,{ref:e,className:(0,J.clsx)(V.item,t),...o})),Mo=(0,U.forwardRef)(({className:t,children:o,chevron:e=!0,...r},s)=>(0,M.jsxs)(b.Trigger,{ref:s,className:(0,J.clsx)(V.trigger,t),...r,children:[o,e&&(0,M.jsx)(Wt.KeyboardArrowDownIcon,{className:V.chevron})]})),Do=(0,U.forwardRef)(({className:t,...o},e)=>(0,M.jsx)(b.Content,{ref:e,className:(0,J.clsx)(V.content,t),...o})),No=Object.assign(b.Root,{Item:Fo,Header:b.Header,Trigger:Mo,Content:Do});var At=require("react"),Ot=require("ts-pattern");var Lt=require("@radix-ui/react-primitive"),Ft=require("@radix-ui/react-slot"),Mt=require("clsx"),Dt=require("react");var i={transparent:"var(--ds-transparent)",white:"var(--ds-white)",whiteAlpha5:"var(--ds-white-alpha-5)",whiteAlpha10:"var(--ds-white-alpha-10)",whiteAlpha20:"var(--ds-white-alpha-20)",whiteAlpha30:"var(--ds-white-alpha-30)",whiteAlpha40:"var(--ds-white-alpha-40)",whiteAlpha50:"var(--ds-white-alpha-50)",whiteAlpha60:"var(--ds-white-alpha-60)",whiteAlpha70:"var(--ds-white-alpha-70)",whiteAlpha80:"var(--ds-white-alpha-80)",whiteAlpha90:"var(--ds-white-alpha-90)",black:"var(--ds-black)",blackAlpha5:"var(--ds-black-alpha-5)",blackAlpha10:"var(--ds-black-alpha-10)",blackAlpha20:"var(--ds-black-alpha-20)",blackAlpha30:"var(--ds-black-alpha-30)",blackAlpha40:"var(--ds-black-alpha-40)",blackAlpha50:"var(--ds-black-alpha-50)",blackAlpha60:"var(--ds-black-alpha-60)",blackAlpha70:"var(--ds-black-alpha-70)",blackAlpha80:"var(--ds-black-alpha-80)",blackAlpha90:"var(--ds-black-alpha-90)",neutral50:"var(--ds-neutral-50)",neutral100:"var(--ds-neutral-100)",neutral200:"var(--ds-neutral-200)",neutral300:"var(--ds-neutral-300)",neutral400:"var(--ds-neutral-400)",neutral500:"var(--ds-neutral-500)",neutral600:"var(--ds-neutral-600)",neutral700:"var(--ds-neutral-700)",neutral800:"var(--ds-neutral-800)",neutral900:"var(--ds-neutral-900)",neutral950:"var(--ds-neutral-950)",primary50:"var(--ds-primary-50)",primary100:"var(--ds-primary-100)",primary200:"var(--ds-primary-200)",primary300:"var(--ds-primary-300)",primary400:"var(--ds-primary-400)",primary500:"var(--ds-primary-500)",primary600:"var(--ds-primary-600)",primary700:"var(--ds-primary-700)",primary800:"var(--ds-primary-800)",primary900:"var(--ds-primary-900)",primary950:"var(--ds-primary-950)",danger50:"var(--ds-danger-50)",danger100:"var(--ds-danger-100)",danger200:"var(--ds-danger-200)",danger300:"var(--ds-danger-300)",danger400:"var(--ds-danger-400)",danger500:"var(--ds-danger-500)",danger600:"var(--ds-danger-600)",danger700:"var(--ds-danger-700)",danger800:"var(--ds-danger-800)",danger900:"var(--ds-danger-900)",danger950:"var(--ds-danger-950)",warning50:"var(--ds-warning-50)",warning100:"var(--ds-warning-100)",warning200:"var(--ds-warning-200)",warning300:"var(--ds-warning-300)",warning400:"var(--ds-warning-400)",warning500:"var(--ds-warning-500)",warning600:"var(--ds-warning-600)",warning700:"var(--ds-warning-700)",warning800:"var(--ds-warning-800)",warning900:"var(--ds-warning-900)",warning950:"var(--ds-warning-950)",success50:"var(--ds-success-50)",success100:"var(--ds-success-100)",success200:"var(--ds-success-200)",success300:"var(--ds-success-300)",success400:"var(--ds-success-400)",success500:"var(--ds-success-500)",success600:"var(--ds-success-600)",success700:"var(--ds-success-700)",success800:"var(--ds-success-800)",success900:"var(--ds-success-900)",success950:"var(--ds-success-950)"};var n={s0:"var(--ds-spacing-0)",s1:"var(--ds-spacing-1)",s2:"var(--ds-spacing-2)",s3:"var(--ds-spacing-3)",s4:"var(--ds-spacing-4)",s5:"var(--ds-spacing-5)",s6:"var(--ds-spacing-6)",s7:"var(--ds-spacing-7)",s8:"var(--ds-spacing-8)",s9:"var(--ds-spacing-9)",s10:"var(--ds-spacing-10)",s11:"var(--ds-spacing-11)",s12:"var(--ds-spacing-12)",s13:"var(--ds-spacing-13)",s14:"var(--ds-spacing-14)",s15:"var(--ds-spacing-15)",s16:"var(--ds-spacing-16)",s17:"var(--ds-spacing-17)",s18:"var(--ds-spacing-18)",s19:"var(--ds-spacing-19)",s20:"var(--ds-spacing-20)",s21:"var(--ds-spacing-21)",max:"var(--ds-spacing-max)"};var E={10:10,11:11,12:12,13:13,14:14,15:15,16:16,18:18,20:20,24:24,28:28,32:32,36:36,44:44,60:60},Z={thin:100,extralight:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},pt={none:1,tight:1.25,snug:1.375,normal:1.5,relaxed:1.625,loose:2};var Bt={typography:"i"};var Nt=require("react/jsx-runtime"),W=(0,Dt.forwardRef)(({asChild:t,className:o,style:e,color:r,size:s=16,weight:a="normal",lineHeight:c="normal",...p},l)=>{let d=t?Ft.Slot:Lt.Primitive.p,f,g,k;Array.isArray(s)?[f,g,k]=s:typeof s=="object"?{base:f,tablet:g,desktop:k}=s:f=s;let F={...e,"--cocso-typography-font-color":r,"--cocso-typography-font-size":`${E[f]}px`,...g!==void 0&&{"--cocso-tablet-typography-font-size":`${E[g]}px`},...k!==void 0&&{"--cocso-desktop-typography-font-size":`${E[k]}px`},"--cocso-typography-font-weight":Z[a],"--cocso-typography-line-height":pt[c]};return(0,Nt.jsx)(d,{ref:l,className:(0,Mt.clsx)(Bt.typography,o),style:F,...p})});var It=require("react/jsx-runtime"),v=(0,At.forwardRef)(({asChild:t,style:o,color:e,size:r="md",weight:s,lineHeight:a,...c},p)=>{let l=Oo(r);return(0,It.jsx)(W,{ref:p,color:e,size:l,weight:s,lineHeight:a,asChild:t,...c})}),Oo=t=>(0,Ot.match)(t).with("lg",()=>18).with("md",()=>16).with("sm",()=>14).with("xs",()=>12).exhaustive();var Qt=require("@radix-ui/react-primitive"),dt=require("clsx"),D=require("react"),w=require("ts-pattern");var Et=require("@radix-ui/react-primitive"),Zt=require("@radix-ui/react-slot"),$t=require("clsx"),Yt=require("react"),$=require("ts-pattern");var Vt={"donut-spin":"u",spinner:"D"};var qt=require("react/jsx-runtime"),lt=(0,Yt.forwardRef)(({asChild:t,className:o,style:e,size:r="md",color:s="primary",...a},c)=>{let p=t?Zt.Slot:Et.Primitive.div,l={...e,"--cocso-spinner-size":Vo(r),"--cocso-spinner-border-width":Eo(r),"--cocso-spinner-border-color":Zo(s),"--cocso-spinner-bg-color":$o(s)};return(0,qt.jsx)(p,{ref:c,className:(0,$t.clsx)(Vt.spinner,o),style:l,...a})}),Vo=t=>(0,$.match)(t).with("xl",()=>"40px").with("lg",()=>"32px").with("md",()=>"24px").with("sm",()=>"20px").exhaustive(),Eo=t=>(0,$.match)(t).with("xl",()=>"5px").with("lg",()=>"4px").with("md",()=>"3px").with("sm",()=>"2px").exhaustive(),Zo=t=>(0,$.match)(t).with("primary",()=>i.primary500).with("neutral",()=>i.neutral600).with("white",()=>i.white).exhaustive(),$o=t=>(0,$.match)(t).with("primary",()=>i.primary100).with("neutral",()=>i.neutral100).with("white",()=>i.whiteAlpha20).exhaustive();var B={button:"l",disabled:"h",content:"E",prefix:"F",suffix:"G",svgOnly:"H"};var x=require("react/jsx-runtime"),qo=(0,D.forwardRef)(({asChild:t,className:o,style:e,children:r,size:s="md",variant:a="primary",weight:c="medium",shape:p="square",prefix:l,suffix:d,svgOnly:f=!1,disabled:g=!1,loading:k=!1,...F},_)=>{let j={...e,...Qo(s),"--cocso-button-font-color":_o(a),"--cocso-button-font-weight":Z[c],"--cocso-button-border":jo(a),"--cocso-button-border-radius":Xo(p,s),"--cocso-button-bg-color":Ko(a),"--cocso-button-bg-color-hover":Go(a),"--cocso-button-bg-color-active":Jo(a)},K=g||k,zt=(0,dt.clsx)(B.button,K&&B.disabled,f&&B.svgOnly,o),Tt=H=>(0,x.jsxs)(x.Fragment,{children:[k&&(0,x.jsx)(lt,{size:"sm",color:"white"}),l&&(0,x.jsx)("span",{className:B.prefix,children:l}),(0,x.jsx)("span",{className:B.content,children:H}),d&&(0,x.jsx)("span",{className:B.suffix,children:d})]});if(t){if(!(0,D.isValidElement)(r))throw new Error("Button: asChild requires a single React element as a child");let H=r,ko=H.props.children;return(0,D.cloneElement)(H,{ref:_,...F,...H.props,className:(0,dt.clsx)(zt,H.props.className),style:{...j,...H.props.style},children:Tt(ko)})}return(0,x.jsx)(Qt.Primitive.button,{ref:_,className:zt,disabled:K,style:j,...F,children:Tt(r)})}),Qo=t=>{let o=(0,w.match)(t).with("xl",()=>56).with("lg",()=>48).with("md",()=>40).with("sm",()=>32).with("xs",()=>24).exhaustive(),e=(0,w.match)(t).with("xl",()=>16).with("lg",()=>14).with("md",()=>10).with("sm",()=>6).with("xs",()=>0).exhaustive(),r=(0,w.match)(t).with("xl",()=>16).with("lg",()=>16).with("xs",()=>12).otherwise(()=>14);return{"--cocso-button-height":`${o}px`,"--cocso-button-padding-inline":`${e}px`,"--cocso-button-font-size":`${r}px`}},Xo=(t,o)=>(0,w.match)(t).with("square",()=>(0,w.match)(o).with("xs",()=>"4px").otherwise(()=>"6px")).with("circle",()=>"100%").with("rounded",()=>"100px").exhaustive(),_o=t=>(0,w.match)(t).with("primary","success","error","neutral",()=>i.white).with("secondary","tertiary","warning",()=>i.neutral950).exhaustive(),jo=t=>(0,w.match)(t).with("tertiary",()=>`1px solid ${i.neutral100}`).otherwise(()=>"none"),Ko=t=>(0,w.match)(t).with("primary",()=>i.primary500).with("secondary",()=>i.white).with("tertiary",()=>i.transparent).with("success",()=>i.success500).with("error",()=>i.danger500).with("warning",()=>i.warning300).with("neutral",()=>i.neutral950).exhaustive(),Go=t=>(0,w.match)(t).with("primary",()=>i.primary600).with("secondary",()=>i.neutral50).with("tertiary",()=>i.neutral50).with("success",()=>i.success600).with("error",()=>i.danger600).with("warning",()=>i.warning400).with("neutral",()=>i.neutral800).exhaustive(),Jo=t=>(0,w.match)(t).with("primary",()=>i.primary700).with("secondary",()=>i.neutral100).with("tertiary",()=>i.neutral100).with("success",()=>i.success700).with("error",()=>i.danger700).with("warning",()=>i.warning500).with("neutral",()=>i.neutral700).exhaustive();var ht=require("@cocso-ui/react-icons"),tt=R(require("@radix-ui/react-checkbox"),1),Xt=require("clsx"),ot=require("react"),A=require("ts-pattern");var N={wrapper:"I",checkbox:"r",indicator:"J",label:"v"};var C=require("react/jsx-runtime"),te=(0,ot.forwardRef)(({id:t,className:o,style:e,size:r="md",status:s,onChange:a,label:c,disabled:p,...l},d)=>{let f=(0,ot.useId)(),g=t??f,k=j=>{if(!p){let K=(0,A.match)(j).with(!0,()=>"on").with("indeterminate",()=>"intermediate").with(!1,()=>"off").exhaustive();a(K)}},F=()=>(0,A.match)(s).with("on",()=>!0).with("intermediate",()=>"indeterminate").with("off",()=>!1).exhaustive(),_={...e,"--cocso-checkbox-size":oe(r),"--cocso-checkbox-color":i.white,"--cocso-checkbox-border-color":ee(s),"--cocso-checkbox-bg-color":re(s)};return(0,C.jsxs)("div",{className:(0,Xt.clsx)(N.wrapper,o),style:_,children:[(0,C.jsxs)(tt.Root,{ref:d,id:g,className:N.checkbox,checked:F(),onCheckedChange:k,disabled:p,...l,children:[(0,C.jsx)(tt.Indicator,{className:N.indicator,style:{opacity:s==="on"?1:0},"aria-hidden":"true",children:(0,C.jsx)(ht.CheckIcon,{size:24})}),(0,C.jsx)("div",{className:N.indicator,style:{opacity:s==="intermediate"?1:0},"aria-hidden":"true",children:(0,C.jsx)(ht.CheckIcon,{size:24})})]}),c&&(0,C.jsx)(v,{className:N.label,size:r,"aria-disabled":p,asChild:!0,children:(0,C.jsx)("label",{htmlFor:g,children:c})})]})}),oe=t=>(0,A.match)(t).with("lg",()=>n.s10).with("md",()=>n.s9).with("sm",()=>n.s8).exhaustive(),ee=t=>(0,A.match)(t).with("on",()=>i.primary500).with("intermediate",()=>i.primary500).with("off",()=>i.neutral100).exhaustive(),re=t=>(0,A.match)(t).with("on",()=>i.primary500).with("intermediate",()=>i.primary500).with("off",()=>i.white).exhaustive();var _t=require("@radix-ui/react-slot"),jt=require("react"),Kt=require("ts-pattern");var mt=require("react/jsx-runtime"),ie=(0,jt.forwardRef)(({asChild:t,className:o,color:e,size:r="md",weight:s,lineHeight:a,...c},p)=>{let l=t?_t.Slot:"h1",d=ne(r);return(0,mt.jsx)(W,{ref:p,color:e,size:d,weight:s,lineHeight:a,asChild:!0,children:(0,mt.jsx)(l,{...c})})}),ne=t=>(0,Kt.match)(t).with("lg",()=>({base:44,tablet:60})).with("md",()=>({base:32,tablet:44})).with("sm",()=>({base:28,tablet:36})).exhaustive();var P=R(require("@radix-ui/react-dropdown-menu"),1),gt=require("clsx"),ut=require("react");var ft={"dropdown-slide-up":"f","dropdown-slide-down":"m",content:"p",item:"K"};var vt=require("react/jsx-runtime"),ae=(0,ut.forwardRef)(({className:t,...o},e)=>(0,vt.jsx)(P.Content,{ref:e,className:(0,gt.clsx)(ft.content,t),...o})),ce=(0,ut.forwardRef)(({className:t,...o},e)=>(0,vt.jsx)(P.Item,{ref:e,className:(0,gt.clsx)(ft.item,t),...o})),pe=Object.assign(P.Root,{Trigger:P.Trigger,Portal:P.Portal,Content:ae,Item:ce});var Gt=require("@radix-ui/react-primitive"),Jt=require("@radix-ui/react-slot"),Ut=require("react"),to=require("ts-pattern");var wt=require("react/jsx-runtime"),yt=(0,Ut.forwardRef)(({asChild:t,className:o,color:e,size:r="md",weight:s="bold",lineHeight:a,...c},p)=>{let l=t?Jt.Slot:Gt.Primitive.h2,d=le(r);return(0,wt.jsx)(W,{ref:p,color:e,size:d,weight:s,lineHeight:a,asChild:!0,children:(0,wt.jsx)(l,{...c})})}),le=t=>(0,to.match)(t).with("xl",()=>({base:28,tablet:40})).with("lg",()=>({base:24,tablet:32})).with("md",()=>({base:22,tablet:24})).with("sm",()=>18).with("xs",()=>16).exhaustive();var oo=require("@radix-ui/react-primitive"),eo=require("@radix-ui/react-slot"),ro=require("clsx"),io=require("react");var bt={link:"y",indicator:"L"};var xt=require("react/jsx-runtime"),he=(0,io.forwardRef)(({asChild:t,className:o,size:e,weight:r,lineHeight:s,indicator:a=!0,...c},p)=>{let l=t?eo.Slot:oo.Primitive.a;return(0,xt.jsx)(v,{size:e,weight:r,lineHeight:s,asChild:!0,children:(0,xt.jsx)(l,{ref:p,className:(0,ro.clsx)(bt.link,a&&bt.indicator,o),...c})})});var no=require("@cocso-ui/react-icons"),m=R(require("@radix-ui/react-dialog"),1),Y=require("clsx"),q=require("react");var O={"overlay-show":"w",overlay:"M","content-show":"x",content:"N",close:"O",title:"P",description:"Q"};var y=require("react/jsx-runtime"),fe=(0,q.forwardRef)(({className:t,children:o,...e},r)=>(0,y.jsxs)(m.Portal,{children:[(0,y.jsx)(m.Overlay,{className:O.overlay}),(0,y.jsx)(m.Content,{ref:r,className:(0,Y.clsx)(O.content,t),...e,children:o})]})),ge=(0,q.forwardRef)(({className:t,children:o,...e},r)=>(0,y.jsx)(m.Close,{ref:r,className:(0,Y.clsx)(O.close,t),...e,children:(0,y.jsx)(no.CloseIcon,{size:24})})),ue=(0,q.forwardRef)(({className:t,children:o,...e},r)=>(0,y.jsx)(m.Title,{ref:r,className:(0,Y.clsx)(O.title,t),asChild:!0,...e,children:(0,y.jsx)(yt,{color:"text.basic",children:o})})),ve=(0,q.forwardRef)(({className:t,children:o,...e},r)=>(0,y.jsx)(m.Description,{ref:r,className:(0,Y.clsx)(O.description,t),asChild:!0,...e,children:(0,y.jsx)(v,{size:"sm",color:"text.subtle",children:o})})),we=Object.assign(m.Root,{Trigger:m.Trigger,Content:fe,Close:ge,Title:ue,Description:ve});var et=R(require("@radix-ui/react-one-time-password-field"),1),Pt=require("clsx"),kt=require("react");var Ct={otp:"R",input:"a"};var St=require("react/jsx-runtime"),be=(0,kt.forwardRef)(({className:t,...o},e)=>(0,St.jsx)(et.Root,{ref:e,className:(0,Pt.clsx)(Ct.otp,t),...o})),xe=(0,kt.forwardRef)(({className:t,...o},e)=>(0,St.jsx)(et.Input,{ref:e,className:(0,Pt.clsx)(Ct.input,t),...o})),Ce=Object.assign(be,{Input:xe});var so=require("clsx"),ao=require("react");var L={pagination:"S",arrow:"o",item:"e",trunc:"T"};var u=require("react/jsx-runtime"),ke=(0,ao.forwardRef)(({className:t,page:o,totalPages:e,maxVisible:r=5,onChange:s,...a},c)=>{let p=Math.ceil(r/2),l=d=>(0,u.jsx)("button",{type:"button",className:L.item,onClick:()=>s(d),"data-active":o===d,children:d},d);return(0,u.jsxs)("div",{ref:c,className:(0,so.clsx)(L.pagination,t),...a,children:[e>1&&(0,u.jsx)("button",{className:L.arrow,type:"button",disabled:o===1,onClick:()=>o>1&&s(o-1),children:(0,u.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,u.jsx)("path",{d:"m15 18-6-6 6-6"})})}),e<=r+2?Array(e).fill(0).map((d,f)=>l(f+1)):(0,u.jsxs)(u.Fragment,{children:[l(1),o>1+p&&(0,u.jsx)("span",{className:L.trunc,children:"..."}),Array(r).fill(0).map((d,f)=>{let g=o-p+f+1;return g>1&&g<e?l(g):""}),o<e-p&&(0,u.jsx)("span",{className:L.trunc,children:"..."}),l(e)]}),e>1&&(0,u.jsx)("button",{className:L.arrow,type:"button",disabled:o===e,onClick:()=>o<e&&s(o+1),children:(0,u.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,u.jsx)("path",{d:"m9 18 6-6-6-6"})})})]})});var z=R(require("@radix-ui/react-popover"),1),po=require("clsx"),lo=require("react");var co={"slide-up-and-fade":"k","slide-right-and-fade":"z","slide-down-and-fade":"j","slide-left-and-fade":"Y",content:"t"};var ho=require("react/jsx-runtime"),Re=(0,lo.forwardRef)(({className:t,...o},e)=>(0,ho.jsx)(z.Content,{ref:e,className:(0,po.clsx)(co.content,t),...o})),ze=Object.assign(z.Root,{Trigger:z.Trigger,Portal:z.Portal,Content:Re});var mo=require("@cocso-ui/react-icons"),fo=require("clsx"),go=require("react"),uo=require("ts-pattern");var rt={wrapper:"U",select:"X",icon:"q"};var I=require("react/jsx-runtime"),He=(0,go.forwardRef)(({className:t,style:o,size:e="md",disabled:r=!1,children:s,...a},c)=>{let p={...o,...We(e)};return(0,I.jsxs)("div",{className:rt.wrapper,children:[(0,I.jsx)("select",{ref:c,className:(0,fo.clsx)(rt.select,t),style:p,disabled:r,...a,children:s}),(0,I.jsx)("span",{className:rt.icon,children:(0,I.jsx)(mo.KeyboardArrowDownIcon,{size:20})})]})}),We=t=>(0,uo.match)(t).with("2xs",()=>({"--cocso-select-min-width":n.s11,"--cocso-select-height":n.s11,"--cocso-select-padding-left":n.s5,"--cocso-select-padding-right":`calc(${n.s8} + 16px)`,"--cocso-select-font-size":"12px","--cocso-select-border-radius":n.s3})).with("xs",()=>({"--cocso-select-min-width":n.s12,"--cocso-select-height":n.s12,"--cocso-select-padding-left":n.s6,"--cocso-select-padding-right":`calc(${n.s7} + 16px)`,"--cocso-select-font-size":"14px","--cocso-select-border-radius":n.s3})).with("sm",()=>({"--cocso-select-min-width":n.s14,"--cocso-select-height":n.s14,"--cocso-select-padding-left":n.s7,"--cocso-select-padding-right":`calc(${n.s7} + 16px)`,"--cocso-select-font-size":"14px","--cocso-select-border-radius":n.s3})).with("md",()=>({"--cocso-select-min-width":n.s16,"--cocso-select-height":n.s16,"--cocso-select-padding-left":n.s8,"--cocso-select-padding-right":`calc(${n.s8} + 16px)`,"--cocso-select-font-size":"16px","--cocso-select-border-radius":n.s4})).with("lg",()=>({"--cocso-select-min-width":n.s17,"--cocso-select-height":n.s17,"--cocso-select-padding-left":n.s9,"--cocso-select-padding-right":`calc(${n.s9} + 16px)`,"--cocso-select-font-size":"18px","--cocso-select-border-radius":n.s4})).with("xl",()=>({"--cocso-select-min-width":n.s18,"--cocso-select-height":n.s18,"--cocso-select-padding-left":n.s10,"--cocso-select-padding-right":`calc(${n.s10} + 16px)`,"--cocso-select-font-size":"18px","--cocso-select-border-radius":n.s4})).exhaustive();var vo=require("clsx"),wo=require("react"),yo=require("ts-pattern");var Rt={stock:"V",indicator:"Z"};var h=require("react/jsx-runtime"),Le=(0,wo.forwardRef)(({className:t,style:o,onChange:e,quantity:r,...s},a)=>{let c={...o,"--cocso-stock-quantity-status-color":bo(r),"--cocso-stock-quantity-status-indicator-width":n.s9};return(0,h.jsxs)("div",{ref:a,className:(0,vo.clsx)(Rt.stock,t),style:c,...s,children:[(0,h.jsx)("span",{className:Rt.indicator,children:r==="\uC5EC\uC720"?(0,h.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[(0,h.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.06494 13.0754C4.26764 13.0754 1.99999 10.8199 2 8.03765C2.00001 5.25543 4.26766 3 7.06494 3L9.48051 3V6.10011L7.06494 6.10011C5.98906 6.10011 5.11689 6.96758 5.11689 8.03767C5.11688 9.10776 5.98906 9.97524 7.06494 9.97524L9.48051 9.97524V13.0754H7.06494Z",fill:"#D9D9D9",fillOpacity:"0.85098"}),(0,h.jsx)("path",{d:"M9.48051 9.97524L9.48051 6.10011L12.0519 6.10026C13.1278 6.10026 14 6.96774 14 8.03783C14 9.10792 13.1278 9.9754 12.0519 9.9754L9.48051 9.97524Z",fill:"#D9D9D9",fillOpacity:"0.85098"}),(0,h.jsx)("path",{d:"M9.48047 6.10059H7.06543C5.98955 6.10059 5.11719 6.968 5.11719 8.03809C5.11741 9.10782 5.98893 9.97532 7.06445 9.97559H9.48047V13.0752H7.06445C4.35911 13.0749 2.14983 10.9652 2.00781 8.30957V7.76465C2.15041 5.10939 4.36025 3 7.06543 3H9.48047V6.10059ZM12.0518 6.10059C13.1276 6.10059 14 6.968 14 8.03809C13.9999 9.10806 13.1276 9.97559 12.0518 9.97559H9.48047V6.10059H12.0518Z",fill:"currentColor"})]}):r==="\uBCF4\uD1B5"?(0,h.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[(0,h.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.06494 13.0754C4.26764 13.0754 1.99999 10.8199 2 8.03765C2.00001 5.25543 4.26766 3 7.06494 3L9.48051 3V6.10011L7.06494 6.10011C5.98906 6.10011 5.11689 6.96758 5.11689 8.03767C5.11688 9.10776 5.98906 9.97524 7.06494 9.97524L9.48051 9.97524V13.0754H7.06494Z",fill:"#D9D9D9",fillOpacity:"0.85098"}),(0,h.jsx)("path",{d:"M9.48051 9.97524L9.48051 6.10011L12.0519 6.10026C13.1278 6.10026 14 6.96774 14 8.03783C14 9.10792 13.1278 9.9754 12.0519 9.9754L9.48051 9.97524Z",fill:"#D9D9D9",fillOpacity:"0.85098"}),(0,h.jsx)("path",{d:"M9.48145 6.0752V6.10059H7.06641C5.99053 6.10059 5.11817 6.968 5.11816 8.03809C5.11839 9.10782 5.98991 9.97532 7.06543 9.97559H9.48145V13.0752H7.06543C4.35577 13.0749 2.14345 10.9585 2.00781 8.29688V7.77832C2.03849 7.17662 2.17568 6.60303 2.40039 6.0752H9.48145ZM12.0527 6.10059C13.1286 6.10059 14.001 6.968 14.001 8.03809C14.0008 9.10806 13.1285 9.97559 12.0527 9.97559H9.48145V6.10059H12.0527Z",fill:"currentColor"})]}):(0,h.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[(0,h.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.06494 13.0754C4.26764 13.0754 1.99999 10.8199 2 8.03765C2.00001 5.25543 4.26766 3 7.06494 3L9.48051 3V6.10011L7.06494 6.10011C5.98906 6.10011 5.11689 6.96758 5.11689 8.03767C5.11688 9.10776 5.98906 9.97524 7.06494 9.97524L9.48051 9.97524V13.0754H7.06494Z",fill:"#D9D9D9",fillOpacity:"0.85098"}),(0,h.jsx)("path",{d:"M9.48051 9.97524L9.48051 6.10011L12.0519 6.10026C13.1278 6.10026 14 6.96774 14 8.03783C14 9.10792 13.1278 9.9754 12.0519 9.9754L9.48051 9.97524Z",fill:"#D9D9D9",fillOpacity:"0.85098"}),(0,h.jsx)("path",{d:"M7.04688 9.97461C7.05273 9.97466 7.05859 9.97558 7.06445 9.97559H9.48047V13.0752H7.06445C4.95754 13.075 3.15182 11.7952 2.38867 9.97461H7.04688ZM12.0713 9.97461C12.0648 9.97467 12.0582 9.97559 12.0518 9.97559H9.48047V9.97461H12.0713Z",fill:"currentColor"})]})}),(0,h.jsx)(v,{size:"sm",color:"currentColor",children:r})]})}),bo=t=>(0,yo.match)(t).with("\uC5EC\uC720",()=>i.primary500).with("\uBCF4\uD1B5",()=>i.success400).with("\uBD80\uC871",()=>i.danger500).exhaustive();var Co=require("@radix-ui/react-primitive"),nt=R(require("@radix-ui/react-switch"),1),Po=require("clsx"),st=require("react"),at=require("ts-pattern");var it={wrapper:"A",switch:"n",thumb:"B"};var S=require("react/jsx-runtime"),Me=(0,st.forwardRef)(({id:t,className:o,style:e,size:r="md",position:s="right",disabled:a,label:c,...p},l)=>{let d=(0,st.useId)(),f=t??d,g={...e,"--cocso-switch-width":De(r),"--cocso-switch-height":Ne(r),"--cocso-switch-thumb-width":xo(r),"--cocso-switch-thumb-height":xo(r),"--cocso-switch-bg-color":i.neutral100};return(0,S.jsxs)(Co.Primitive.div,{className:(0,Po.clsx)(it.wrapper,o),"aria-disabled":a,style:g,children:[s==="left"&&(0,S.jsx)(v,{size:r,asChild:!0,children:(0,S.jsx)("label",{htmlFor:f,children:c})}),(0,S.jsx)(nt.Root,{ref:l,className:it.switch,disabled:a,...p,children:(0,S.jsx)(nt.Thumb,{className:it.thumb})}),s==="right"&&(0,S.jsx)(v,{size:r,"aria-disabled":a,asChild:!0,children:(0,S.jsx)("label",{htmlFor:f,children:c})})]})}),De=t=>(0,at.match)(t).with("lg",()=>n.s14).with("md",()=>n.s12).exhaustive(),Ne=t=>(0,at.match)(t).with("lg",()=>n.s10).with("md",()=>n.s9).exhaustive(),xo=t=>(0,at.match)(t).with("lg",()=>n.s9).with("md",()=>n.s8).exhaustive();var T=R(require("@radix-ui/react-tabs"),1),Q=require("react"),X=require("react/jsx-runtime"),Ae=(0,Q.forwardRef)(({...t},o)=>(0,X.jsx)(T.Root,{ref:o,...t})),Oe=(0,Q.forwardRef)(({...t},o)=>(0,X.jsx)(T.List,{ref:o,...t})),Ie=(0,Q.forwardRef)(({...t},o)=>(0,X.jsx)(T.Trigger,{ref:o,...t})),Ve=(0,Q.forwardRef)(({...t},o)=>(0,X.jsx)(T.Content,{ref:o,...t})),Ee=Object.assign(Ae,{List:Oe,Trigger:Ie,Content:Ve});var ct=require("sonner");
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{KeyboardArrowDownIcon as Rt}from"@cocso-ui/react-icons";import*as v from"@radix-ui/react-accordion";import{clsx as G}from"clsx";import{forwardRef as J}from"react";var F={item:"C",content:"c","slide-down":"g","slide-up":"b",trigger:"s",chevron:"d"};import{jsx as U,jsxs as Lt}from"react/jsx-runtime";var Tt=J(({className:t,...o},e)=>U(v.Item,{ref:e,className:G(F.item,t),...o})),Ht=J(({className:t,children:o,chevron:e=!0,...r},s)=>Lt(v.Trigger,{ref:s,className:G(F.trigger,t),...r,children:[o,e&&U(Rt,{className:F.chevron})]})),Wt=J(({className:t,...o},e)=>U(v.Content,{ref:e,className:G(F.content,t),...o})),He=Object.assign(v.Root,{Item:Tt,Header:v.Header,Trigger:Ht,Content:Wt});import{forwardRef as Ot}from"react";import{match as It}from"ts-pattern";import{Primitive as Ft}from"@radix-ui/react-primitive";import{Slot as Mt}from"@radix-ui/react-slot";import{clsx as Dt}from"clsx";import{forwardRef as At}from"react";var i={transparent:"var(--ds-transparent)",white:"var(--ds-white)",whiteAlpha5:"var(--ds-white-alpha-5)",whiteAlpha10:"var(--ds-white-alpha-10)",whiteAlpha20:"var(--ds-white-alpha-20)",whiteAlpha30:"var(--ds-white-alpha-30)",whiteAlpha40:"var(--ds-white-alpha-40)",whiteAlpha50:"var(--ds-white-alpha-50)",whiteAlpha60:"var(--ds-white-alpha-60)",whiteAlpha70:"var(--ds-white-alpha-70)",whiteAlpha80:"var(--ds-white-alpha-80)",whiteAlpha90:"var(--ds-white-alpha-90)",black:"var(--ds-black)",blackAlpha5:"var(--ds-black-alpha-5)",blackAlpha10:"var(--ds-black-alpha-10)",blackAlpha20:"var(--ds-black-alpha-20)",blackAlpha30:"var(--ds-black-alpha-30)",blackAlpha40:"var(--ds-black-alpha-40)",blackAlpha50:"var(--ds-black-alpha-50)",blackAlpha60:"var(--ds-black-alpha-60)",blackAlpha70:"var(--ds-black-alpha-70)",blackAlpha80:"var(--ds-black-alpha-80)",blackAlpha90:"var(--ds-black-alpha-90)",neutral50:"var(--ds-neutral-50)",neutral100:"var(--ds-neutral-100)",neutral200:"var(--ds-neutral-200)",neutral300:"var(--ds-neutral-300)",neutral400:"var(--ds-neutral-400)",neutral500:"var(--ds-neutral-500)",neutral600:"var(--ds-neutral-600)",neutral700:"var(--ds-neutral-700)",neutral800:"var(--ds-neutral-800)",neutral900:"var(--ds-neutral-900)",neutral950:"var(--ds-neutral-950)",primary50:"var(--ds-primary-50)",primary100:"var(--ds-primary-100)",primary200:"var(--ds-primary-200)",primary300:"var(--ds-primary-300)",primary400:"var(--ds-primary-400)",primary500:"var(--ds-primary-500)",primary600:"var(--ds-primary-600)",primary700:"var(--ds-primary-700)",primary800:"var(--ds-primary-800)",primary900:"var(--ds-primary-900)",primary950:"var(--ds-primary-950)",danger50:"var(--ds-danger-50)",danger100:"var(--ds-danger-100)",danger200:"var(--ds-danger-200)",danger300:"var(--ds-danger-300)",danger400:"var(--ds-danger-400)",danger500:"var(--ds-danger-500)",danger600:"var(--ds-danger-600)",danger700:"var(--ds-danger-700)",danger800:"var(--ds-danger-800)",danger900:"var(--ds-danger-900)",danger950:"var(--ds-danger-950)",warning50:"var(--ds-warning-50)",warning100:"var(--ds-warning-100)",warning200:"var(--ds-warning-200)",warning300:"var(--ds-warning-300)",warning400:"var(--ds-warning-400)",warning500:"var(--ds-warning-500)",warning600:"var(--ds-warning-600)",warning700:"var(--ds-warning-700)",warning800:"var(--ds-warning-800)",warning900:"var(--ds-warning-900)",warning950:"var(--ds-warning-950)",success50:"var(--ds-success-50)",success100:"var(--ds-success-100)",success200:"var(--ds-success-200)",success300:"var(--ds-success-300)",success400:"var(--ds-success-400)",success500:"var(--ds-success-500)",success600:"var(--ds-success-600)",success700:"var(--ds-success-700)",success800:"var(--ds-success-800)",success900:"var(--ds-success-900)",success950:"var(--ds-success-950)"};var n={s0:"var(--ds-spacing-0)",s1:"var(--ds-spacing-1)",s2:"var(--ds-spacing-2)",s3:"var(--ds-spacing-3)",s4:"var(--ds-spacing-4)",s5:"var(--ds-spacing-5)",s6:"var(--ds-spacing-6)",s7:"var(--ds-spacing-7)",s8:"var(--ds-spacing-8)",s9:"var(--ds-spacing-9)",s10:"var(--ds-spacing-10)",s11:"var(--ds-spacing-11)",s12:"var(--ds-spacing-12)",s13:"var(--ds-spacing-13)",s14:"var(--ds-spacing-14)",s15:"var(--ds-spacing-15)",s16:"var(--ds-spacing-16)",s17:"var(--ds-spacing-17)",s18:"var(--ds-spacing-18)",s19:"var(--ds-spacing-19)",s20:"var(--ds-spacing-20)",s21:"var(--ds-spacing-21)",max:"var(--ds-spacing-max)"};var A={10:10,11:11,12:12,13:13,14:14,15:15,16:16,18:18,20:20,24:24,28:28,32:32,36:36,44:44,60:60},N={thin:100,extralight:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},st={none:1,tight:1.25,snug:1.375,normal:1.5,relaxed:1.625,loose:2};var at={typography:"i"};import{jsx as Nt}from"react/jsx-runtime";var R=At(({asChild:t,className:o,style:e,color:r,size:s=16,weight:c="normal",lineHeight:p="normal",...a},l)=>{let d=t?Mt:Ft.p,f,h,x;Array.isArray(s)?[f,h,x]=s:typeof s=="object"?{base:f,tablet:h,desktop:x}=s:f=s;let B={...e,"--cocso-typography-font-color":r,"--cocso-typography-font-size":`${A[f]}px`,...h!==void 0&&{"--cocso-tablet-typography-font-size":`${A[h]}px`},...x!==void 0&&{"--cocso-desktop-typography-font-size":`${A[x]}px`},"--cocso-typography-font-weight":N[c],"--cocso-typography-line-height":st[p]};return Nt(d,{ref:l,className:Dt(at.typography,o),style:B,...a})});import{jsx as Zt}from"react/jsx-runtime";var g=Ot(({asChild:t,style:o,color:e,size:r="md",weight:s,lineHeight:c,...p},a)=>{let l=Vt(r);return Zt(R,{ref:a,color:e,size:l,weight:s,lineHeight:c,asChild:t,...p})}),Vt=t=>It(t).with("lg",()=>18).with("md",()=>16).with("sm",()=>14).with("xs",()=>12).exhaustive();import{Primitive as Ut}from"@radix-ui/react-primitive";import{clsx as to}from"clsx";import{forwardRef as oo}from"react";import{match as w}from"ts-pattern";import{Primitive as Et}from"@radix-ui/react-primitive";import{Slot as Yt}from"@radix-ui/react-slot";import{clsx as qt}from"clsx";import{forwardRef as Qt}from"react";import{match as O}from"ts-pattern";var ct={"donut-spin":"u",spinner:"D"};import{jsx as Gt}from"react/jsx-runtime";var pt=Qt(({asChild:t,className:o,style:e,size:r="md",color:s="primary",...c},p)=>{let a=t?Yt:Et.div,l={...e,"--cocso-spinner-size":Xt(r),"--cocso-spinner-border-width":_t(r),"--cocso-spinner-border-color":jt(s),"--cocso-spinner-bg-color":Kt(s)};return Gt(a,{ref:p,className:qt(ct.spinner,o),style:l,...c})}),Xt=t=>O(t).with("xl",()=>"40px").with("lg",()=>"32px").with("md",()=>"24px").with("sm",()=>"20px").exhaustive(),_t=t=>O(t).with("xl",()=>"5px").with("lg",()=>"4px").with("md",()=>"3px").with("sm",()=>"2px").exhaustive(),jt=t=>O(t).with("primary",()=>i.primary500).with("neutral",()=>i.neutral600).with("white",()=>i.white).exhaustive(),Kt=t=>O(t).with("primary",()=>i.primary100).with("neutral",()=>i.neutral100).with("white",()=>i.whiteAlpha20).exhaustive();var S={button:"l",disabled:"h",content:"E",prefix:"F",suffix:"G",svgOnly:"H"};import{jsx as I,jsxs as po}from"react/jsx-runtime";var Sr=oo(({className:t,style:o,children:e,size:r="md",variant:s="primary",weight:c="medium",shape:p="square",prefix:a,suffix:l,svgOnly:d=!1,disabled:f=!1,loading:h=!1,...x},B)=>{let K={...o,...eo(r),"--cocso-button-font-color":io(s),"--cocso-button-font-weight":N[c],"--cocso-button-border":no(s),"--cocso-button-border-radius":ro(p,r),"--cocso-button-bg-color":so(s),"--cocso-button-bg-color-hover":ao(s),"--cocso-button-bg-color-active":co(s)},D=f||h;return po(Ut.button,{ref:B,className:to(S.button,D&&S.disabled,d&&S.svgOnly,t),disabled:D,style:K,...x,children:[h&&I(pt,{size:"sm",color:"white"}),a&&I("span",{className:S.prefix,children:a}),I("span",{className:S.content,children:e}),l&&I("span",{className:S.suffix,children:l})]})}),eo=t=>{let o=w(t).with("lg",()=>48).with("md",()=>40).with("sm",()=>32).with("xs",()=>24).exhaustive(),e=w(t).with("lg",()=>14).with("md",()=>10).with("sm",()=>6).with("xs",()=>0).exhaustive(),r=w(t).with("lg",()=>16).with("xs",()=>12).otherwise(()=>14);return{"--cocso-button-height":`${o}px`,"--cocso-button-padding-inline":`${e}px`,"--cocso-button-font-size":`${r}px`}},ro=(t,o)=>w(t).with("square",()=>w(o).with("lg",()=>"8px").with("md",()=>"6px").with("sm",()=>"6px").with("xs",()=>"4px").exhaustive()).with("circle",()=>"100%").with("rounded",()=>"100px").exhaustive(),io=t=>w(t).with("primary","success","error","neutral",()=>i.white).with("secondary","tertiary","warning",()=>i.neutral950).exhaustive(),no=t=>w(t).with("tertiary",()=>`1px solid ${i.neutral100}`).otherwise(()=>"none"),so=t=>w(t).with("primary",()=>i.primary500).with("secondary",()=>i.white).with("tertiary",()=>i.transparent).with("success",()=>i.success500).with("error",()=>i.danger500).with("warning",()=>i.warning300).with("neutral",()=>i.neutral950).exhaustive(),ao=t=>w(t).with("primary",()=>i.primary600).with("secondary",()=>i.neutral50).with("tertiary",()=>i.neutral50).with("success",()=>i.success600).with("error",()=>i.danger600).with("warning",()=>i.warning400).with("neutral",()=>i.neutral800).exhaustive(),co=t=>w(t).with("primary",()=>i.primary700).with("secondary",()=>i.neutral100).with("tertiary",()=>i.neutral100).with("success",()=>i.success700).with("error",()=>i.danger700).with("warning",()=>i.warning500).with("neutral",()=>i.neutral700).exhaustive();import{CheckIcon as lt}from"@cocso-ui/react-icons";import*as V from"@radix-ui/react-checkbox";import{clsx as ho}from"clsx";import{forwardRef as mo,useId as fo}from"react";import{match as M}from"ts-pattern";var T={wrapper:"I",checkbox:"r",indicator:"J",label:"v"};import{jsx as H,jsxs as dt}from"react/jsx-runtime";var Or=mo(({id:t,className:o,style:e,size:r="md",status:s,onChange:c,label:p,disabled:a,...l},d)=>{let f=fo(),h=t??f,x=D=>{if(!a){let St=M(D).with(!0,()=>"on").with("indeterminate",()=>"intermediate").with(!1,()=>"off").exhaustive();c(St)}},B=()=>M(s).with("on",()=>!0).with("intermediate",()=>"indeterminate").with("off",()=>!1).exhaustive(),K={...e,"--cocso-checkbox-size":go(r),"--cocso-checkbox-color":i.white,"--cocso-checkbox-border-color":uo(s),"--cocso-checkbox-bg-color":vo(s)};return dt("div",{className:ho(T.wrapper,o),style:K,children:[dt(V.Root,{ref:d,id:h,className:T.checkbox,checked:B(),onCheckedChange:x,disabled:a,...l,children:[H(V.Indicator,{className:T.indicator,style:{opacity:s==="on"?1:0},"aria-hidden":"true",children:H(lt,{size:24})}),H("div",{className:T.indicator,style:{opacity:s==="intermediate"?1:0},"aria-hidden":"true",children:H(lt,{size:24})})]}),p&&H(g,{className:T.label,size:r,"aria-disabled":a,asChild:!0,children:H("label",{htmlFor:h,children:p})})]})}),go=t=>M(t).with("lg",()=>n.s10).with("md",()=>n.s9).with("sm",()=>n.s8).exhaustive(),uo=t=>M(t).with("on",()=>i.primary500).with("intermediate",()=>i.primary500).with("off",()=>i.neutral100).exhaustive(),vo=t=>M(t).with("on",()=>i.primary500).with("intermediate",()=>i.primary500).with("off",()=>i.white).exhaustive();import{Slot as wo}from"@radix-ui/react-slot";import{forwardRef as yo}from"react";import{match as bo}from"ts-pattern";import{jsx as ht}from"react/jsx-runtime";var Xr=yo(({asChild:t,className:o,color:e,size:r="md",weight:s,lineHeight:c,...p},a)=>{let l=t?wo:"h1",d=xo(r);return ht(R,{ref:a,color:e,size:d,weight:s,lineHeight:c,asChild:!0,children:ht(l,{...p})})}),xo=t=>bo(t).with("lg",()=>({base:44,tablet:60})).with("md",()=>({base:32,tablet:44})).with("sm",()=>({base:28,tablet:36})).exhaustive();import*as y from"@radix-ui/react-dropdown-menu";import{clsx as mt}from"clsx";import{forwardRef as ft}from"react";var tt={"dropdown-slide-up":"f","dropdown-slide-down":"m",content:"p",item:"K"};import{jsx as gt}from"react/jsx-runtime";var Po=ft(({className:t,...o},e)=>gt(y.Content,{ref:e,className:mt(tt.content,t),...o})),ko=ft(({className:t,...o},e)=>gt(y.Item,{ref:e,className:mt(tt.item,t),...o})),ei=Object.assign(y.Root,{Trigger:y.Trigger,Portal:y.Portal,Content:Po,Item:ko});import{Primitive as So}from"@radix-ui/react-primitive";import{Slot as zo}from"@radix-ui/react-slot";import{forwardRef as Ro}from"react";import{match as To}from"ts-pattern";import{jsx as ut}from"react/jsx-runtime";var vt=Ro(({asChild:t,className:o,color:e,size:r="md",weight:s="bold",lineHeight:c,...p},a)=>{let l=t?zo:So.h2,d=Ho(r);return ut(R,{ref:a,color:e,size:d,weight:s,lineHeight:c,asChild:!0,children:ut(l,{...p})})}),Ho=t=>To(t).with("xl",()=>({base:28,tablet:40})).with("lg",()=>({base:24,tablet:32})).with("md",()=>({base:22,tablet:24})).with("sm",()=>18).with("xs",()=>16).exhaustive();import{Primitive as Lo}from"@radix-ui/react-primitive";import{Slot as Bo}from"@radix-ui/react-slot";import{clsx as Fo}from"clsx";import{forwardRef as Mo}from"react";var ot={link:"y",indicator:"L"};import{jsx as wt}from"react/jsx-runtime";var Pi=Mo(({asChild:t,className:o,size:e,weight:r,lineHeight:s,indicator:c=!0,...p},a)=>{let l=t?Bo:Lo.a;return wt(g,{size:e,weight:r,lineHeight:s,asChild:!0,children:wt(l,{ref:a,className:Fo(ot.link,c&&ot.indicator,o),...p})})});import{CloseIcon as Ao}from"@cocso-ui/react-icons";import*as m from"@radix-ui/react-dialog";import{clsx as Z}from"clsx";import{forwardRef as $}from"react";var W={"overlay-show":"w",overlay:"M","content-show":"x",content:"N",close:"O",title:"P",description:"Q"};import{jsx as C,jsxs as Zo}from"react/jsx-runtime";var No=$(({className:t,children:o,...e},r)=>Zo(m.Portal,{children:[C(m.Overlay,{className:W.overlay}),C(m.Content,{ref:r,className:Z(W.content,t),...e,children:o})]})),Oo=$(({className:t,children:o,...e},r)=>C(m.Close,{ref:r,className:Z(W.close,t),...e,children:C(Ao,{size:24})})),Io=$(({className:t,children:o,...e},r)=>C(m.Title,{ref:r,className:Z(W.title,t),asChild:!0,...e,children:C(vt,{color:"text.basic",children:o})})),Vo=$(({className:t,children:o,...e},r)=>C(m.Description,{ref:r,className:Z(W.description,t),asChild:!0,...e,children:C(g,{size:"sm",color:"text.subtle",children:o})})),Di=Object.assign(m.Root,{Trigger:m.Trigger,Content:No,Close:Oo,Title:Io,Description:Vo});import*as E from"@radix-ui/react-one-time-password-field";import{clsx as yt}from"clsx";import{forwardRef as bt}from"react";var et={otp:"R",input:"a"};import{jsx as xt}from"react/jsx-runtime";var Eo=bt(({className:t,...o},e)=>xt(E.Root,{ref:e,className:yt(et.otp,t),...o})),Yo=bt(({className:t,...o},e)=>xt(E.Input,{ref:e,className:yt(et.input,t),...o})),Yi=Object.assign(Eo,{Input:Yo});import{clsx as Qo}from"clsx";import{forwardRef as Xo}from"react";var z={pagination:"S",arrow:"o",item:"e",trunc:"T"};import{Fragment as _o,jsx as b,jsxs as Ct}from"react/jsx-runtime";var Ui=Xo(({className:t,page:o,totalPages:e,maxVisible:r=5,onChange:s,...c},p)=>{let a=Math.ceil(r/2),l=d=>b("button",{type:"button",className:z.item,onClick:()=>s(d),"data-active":o===d,children:d},d);return Ct("div",{ref:p,className:Qo(z.pagination,t),...c,children:[e>1&&b("button",{className:z.arrow,type:"button",disabled:o===1,onClick:()=>o>1&&s(o-1),children:b("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:b("path",{d:"m15 18-6-6 6-6"})})}),e<=r+2?Array(e).fill(0).map((d,f)=>l(f+1)):Ct(_o,{children:[l(1),o>1+a&&b("span",{className:z.trunc,children:"..."}),Array(r).fill(0).map((d,f)=>{let h=o-a+f+1;return h>1&&h<e?l(h):""}),o<e-a&&b("span",{className:z.trunc,children:"..."}),l(e)]}),e>1&&b("button",{className:z.arrow,type:"button",disabled:o===e,onClick:()=>o<e&&s(o+1),children:b("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:b("path",{d:"m9 18 6-6-6-6"})})})]})});import*as P from"@radix-ui/react-popover";import{clsx as Ko}from"clsx";import{forwardRef as Go}from"react";var Pt={"slide-up-and-fade":"k","slide-right-and-fade":"z","slide-down-and-fade":"j","slide-left-and-fade":"Y",content:"t"};import{jsx as Uo}from"react/jsx-runtime";var Jo=Go(({className:t,...o},e)=>Uo(P.Content,{ref:e,className:Ko(Pt.content,t),...o})),pn=Object.assign(P.Root,{Trigger:P.Trigger,Portal:P.Portal,Content:Jo});import{KeyboardArrowDownIcon as oe}from"@cocso-ui/react-icons";import{clsx as ee}from"clsx";import{forwardRef as re}from"react";import{match as ie}from"ts-pattern";var Y={wrapper:"U",select:"X",icon:"q"};import{jsx as rt,jsxs as se}from"react/jsx-runtime";var xn=re(({className:t,style:o,size:e="md",disabled:r=!1,children:s,...c},p)=>{let a={...o,...ne(e)};return se("div",{className:Y.wrapper,children:[rt("select",{ref:p,className:ee(Y.select,t),style:a,disabled:r,...c,children:s}),rt("span",{className:Y.icon,children:rt(oe,{size:20})})]})}),ne=t=>ie(t).with("2xs",()=>({"--cocso-select-min-width":n.s11,"--cocso-select-height":n.s11,"--cocso-select-padding-left":n.s5,"--cocso-select-padding-right":`calc(${n.s8} + 16px)`,"--cocso-select-font-size":"12px","--cocso-select-border-radius":n.s3})).with("xs",()=>({"--cocso-select-min-width":n.s12,"--cocso-select-height":n.s12,"--cocso-select-padding-left":n.s6,"--cocso-select-padding-right":`calc(${n.s7} + 16px)`,"--cocso-select-font-size":"14px","--cocso-select-border-radius":n.s3})).with("sm",()=>({"--cocso-select-min-width":n.s14,"--cocso-select-height":n.s14,"--cocso-select-padding-left":n.s7,"--cocso-select-padding-right":`calc(${n.s7} + 16px)`,"--cocso-select-font-size":"14px","--cocso-select-border-radius":n.s3})).with("md",()=>({"--cocso-select-min-width":n.s16,"--cocso-select-height":n.s16,"--cocso-select-padding-left":n.s8,"--cocso-select-padding-right":`calc(${n.s8} + 16px)`,"--cocso-select-font-size":"16px","--cocso-select-border-radius":n.s4})).with("lg",()=>({"--cocso-select-min-width":n.s17,"--cocso-select-height":n.s17,"--cocso-select-padding-left":n.s9,"--cocso-select-padding-right":`calc(${n.s9} + 16px)`,"--cocso-select-font-size":"18px","--cocso-select-border-radius":n.s4})).with("xl",()=>({"--cocso-select-min-width":n.s18,"--cocso-select-height":n.s18,"--cocso-select-padding-left":n.s10,"--cocso-select-padding-right":`calc(${n.s10} + 16px)`,"--cocso-select-font-size":"18px","--cocso-select-border-radius":n.s4})).exhaustive();import{clsx as ce}from"clsx";import{forwardRef as pe}from"react";import{match as le}from"ts-pattern";var it={stock:"V",indicator:"Z"};import{jsx as u,jsxs as q}from"react/jsx-runtime";var Fn=pe(({className:t,style:o,onChange:e,quantity:r,...s},c)=>{let p={...o,"--cocso-stock-quantity-status-color":de(r),"--cocso-stock-quantity-status-indicator-width":n.s9};return q("div",{ref:c,className:ce(it.stock,t),style:p,...s,children:[u("span",{className:it.indicator,children:r==="\uC5EC\uC720"?q("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[u("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.06494 13.0754C4.26764 13.0754 1.99999 10.8199 2 8.03765C2.00001 5.25543 4.26766 3 7.06494 3L9.48051 3V6.10011L7.06494 6.10011C5.98906 6.10011 5.11689 6.96758 5.11689 8.03767C5.11688 9.10776 5.98906 9.97524 7.06494 9.97524L9.48051 9.97524V13.0754H7.06494Z",fill:"#D9D9D9",fillOpacity:"0.85098"}),u("path",{d:"M9.48051 9.97524L9.48051 6.10011L12.0519 6.10026C13.1278 6.10026 14 6.96774 14 8.03783C14 9.10792 13.1278 9.9754 12.0519 9.9754L9.48051 9.97524Z",fill:"#D9D9D9",fillOpacity:"0.85098"}),u("path",{d:"M9.48047 6.10059H7.06543C5.98955 6.10059 5.11719 6.968 5.11719 8.03809C5.11741 9.10782 5.98893 9.97532 7.06445 9.97559H9.48047V13.0752H7.06445C4.35911 13.0749 2.14983 10.9652 2.00781 8.30957V7.76465C2.15041 5.10939 4.36025 3 7.06543 3H9.48047V6.10059ZM12.0518 6.10059C13.1276 6.10059 14 6.968 14 8.03809C13.9999 9.10806 13.1276 9.97559 12.0518 9.97559H9.48047V6.10059H12.0518Z",fill:"currentColor"})]}):r==="\uBCF4\uD1B5"?q("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[u("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.06494 13.0754C4.26764 13.0754 1.99999 10.8199 2 8.03765C2.00001 5.25543 4.26766 3 7.06494 3L9.48051 3V6.10011L7.06494 6.10011C5.98906 6.10011 5.11689 6.96758 5.11689 8.03767C5.11688 9.10776 5.98906 9.97524 7.06494 9.97524L9.48051 9.97524V13.0754H7.06494Z",fill:"#D9D9D9",fillOpacity:"0.85098"}),u("path",{d:"M9.48051 9.97524L9.48051 6.10011L12.0519 6.10026C13.1278 6.10026 14 6.96774 14 8.03783C14 9.10792 13.1278 9.9754 12.0519 9.9754L9.48051 9.97524Z",fill:"#D9D9D9",fillOpacity:"0.85098"}),u("path",{d:"M9.48145 6.0752V6.10059H7.06641C5.99053 6.10059 5.11817 6.968 5.11816 8.03809C5.11839 9.10782 5.98991 9.97532 7.06543 9.97559H9.48145V13.0752H7.06543C4.35577 13.0749 2.14345 10.9585 2.00781 8.29688V7.77832C2.03849 7.17662 2.17568 6.60303 2.40039 6.0752H9.48145ZM12.0527 6.10059C13.1286 6.10059 14.001 6.968 14.001 8.03809C14.0008 9.10806 13.1285 9.97559 12.0527 9.97559H9.48145V6.10059H12.0527Z",fill:"currentColor"})]}):q("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[u("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.06494 13.0754C4.26764 13.0754 1.99999 10.8199 2 8.03765C2.00001 5.25543 4.26766 3 7.06494 3L9.48051 3V6.10011L7.06494 6.10011C5.98906 6.10011 5.11689 6.96758 5.11689 8.03767C5.11688 9.10776 5.98906 9.97524 7.06494 9.97524L9.48051 9.97524V13.0754H7.06494Z",fill:"#D9D9D9",fillOpacity:"0.85098"}),u("path",{d:"M9.48051 9.97524L9.48051 6.10011L12.0519 6.10026C13.1278 6.10026 14 6.96774 14 8.03783C14 9.10792 13.1278 9.9754 12.0519 9.9754L9.48051 9.97524Z",fill:"#D9D9D9",fillOpacity:"0.85098"}),u("path",{d:"M7.04688 9.97461C7.05273 9.97466 7.05859 9.97558 7.06445 9.97559H9.48047V13.0752H7.06445C4.95754 13.075 3.15182 11.7952 2.38867 9.97461H7.04688ZM12.0713 9.97461C12.0648 9.97467 12.0582 9.97559 12.0518 9.97559H9.48047V9.97461H12.0713Z",fill:"currentColor"})]})}),u(g,{size:"sm",color:"currentColor",children:r})]})}),de=t=>le(t).with("\uC5EC\uC720",()=>i.primary500).with("\uBCF4\uD1B5",()=>i.success400).with("\uBD80\uC871",()=>i.danger500).exhaustive();import{Primitive as me}from"@radix-ui/react-primitive";import*as X from"@radix-ui/react-switch";import{clsx as fe}from"clsx";import{forwardRef as ge,useId as ue}from"react";import{match as nt}from"ts-pattern";var Q={wrapper:"A",switch:"n",thumb:"B"};import{jsx as L,jsxs as ye}from"react/jsx-runtime";var Qn=ge(({id:t,className:o,style:e,size:r="md",position:s="right",disabled:c,label:p,...a},l)=>{let d=ue(),f=t??d,h={...e,"--cocso-switch-width":ve(r),"--cocso-switch-height":we(r),"--cocso-switch-thumb-width":kt(r),"--cocso-switch-thumb-height":kt(r),"--cocso-switch-bg-color":i.neutral100};return ye(me.div,{className:fe(Q.wrapper,o),"aria-disabled":c,style:h,children:[s==="left"&&L(g,{size:r,asChild:!0,children:L("label",{htmlFor:f,children:p})}),L(X.Root,{ref:l,className:Q.switch,disabled:c,...a,children:L(X.Thumb,{className:Q.thumb})}),s==="right"&&L(g,{size:r,"aria-disabled":c,asChild:!0,children:L("label",{htmlFor:f,children:p})})]})}),ve=t=>nt(t).with("lg",()=>n.s14).with("md",()=>n.s12).exhaustive(),we=t=>nt(t).with("lg",()=>n.s10).with("md",()=>n.s9).exhaustive(),kt=t=>nt(t).with("lg",()=>n.s9).with("md",()=>n.s8).exhaustive();import*as k from"@radix-ui/react-tabs";import{forwardRef as _}from"react";import{jsx as j}from"react/jsx-runtime";var be=_(({...t},o)=>j(k.Root,{ref:o,...t})),xe=_(({...t},o)=>j(k.List,{ref:o,...t})),Ce=_(({...t},o)=>j(k.Trigger,{ref:o,...t})),Pe=_(({...t},o)=>j(k.Content,{ref:o,...t})),Jn=Object.assign(be,{List:xe,Trigger:Ce,Content:Pe});import{Toaster as ns,toast as ss}from"sonner";export{He as Accordion,g as Body,Sr as Button,Or as Checkbox,Xr as Display,ei as Dropdown,vt as Heading,Pi as Link,Di as Modal,Yi as OneTimePasswordField,Ui as Pagination,pn as Popover,xn as Select,pt as Spinner,Fn as StockQuantityStatus,Qn as Switch,Jn as Tab,ns as Toaster,R as Typography,i as colors,A as fontSize,N as fontWeight,de as getColor,st as lineHeight,n as spacing,ss as toast};
1
+ import{KeyboardArrowDownIcon as Lt}from"@cocso-ui/react-icons";import*as v from"@radix-ui/react-accordion";import{clsx as U}from"clsx";import{forwardRef as tt}from"react";var M={item:"C",content:"c","slide-down":"g","slide-up":"b",trigger:"s",chevron:"d"};import{jsx as ot,jsxs as Nt}from"react/jsx-runtime";var Ft=tt(({className:t,...o},e)=>ot(v.Item,{ref:e,className:U(M.item,t),...o})),Mt=tt(({className:t,children:o,chevron:e=!0,...r},s)=>Nt(v.Trigger,{ref:s,className:U(M.trigger,t),...r,children:[o,e&&ot(Lt,{className:M.chevron})]})),Dt=tt(({className:t,...o},e)=>ot(v.Content,{ref:e,className:U(M.content,t),...o})),Ne=Object.assign(v.Root,{Item:Ft,Header:v.Header,Trigger:Mt,Content:Dt});import{forwardRef as $t}from"react";import{match as Yt}from"ts-pattern";import{Primitive as Ot}from"@radix-ui/react-primitive";import{Slot as It}from"@radix-ui/react-slot";import{clsx as Vt}from"clsx";import{forwardRef as Et}from"react";var i={transparent:"var(--ds-transparent)",white:"var(--ds-white)",whiteAlpha5:"var(--ds-white-alpha-5)",whiteAlpha10:"var(--ds-white-alpha-10)",whiteAlpha20:"var(--ds-white-alpha-20)",whiteAlpha30:"var(--ds-white-alpha-30)",whiteAlpha40:"var(--ds-white-alpha-40)",whiteAlpha50:"var(--ds-white-alpha-50)",whiteAlpha60:"var(--ds-white-alpha-60)",whiteAlpha70:"var(--ds-white-alpha-70)",whiteAlpha80:"var(--ds-white-alpha-80)",whiteAlpha90:"var(--ds-white-alpha-90)",black:"var(--ds-black)",blackAlpha5:"var(--ds-black-alpha-5)",blackAlpha10:"var(--ds-black-alpha-10)",blackAlpha20:"var(--ds-black-alpha-20)",blackAlpha30:"var(--ds-black-alpha-30)",blackAlpha40:"var(--ds-black-alpha-40)",blackAlpha50:"var(--ds-black-alpha-50)",blackAlpha60:"var(--ds-black-alpha-60)",blackAlpha70:"var(--ds-black-alpha-70)",blackAlpha80:"var(--ds-black-alpha-80)",blackAlpha90:"var(--ds-black-alpha-90)",neutral50:"var(--ds-neutral-50)",neutral100:"var(--ds-neutral-100)",neutral200:"var(--ds-neutral-200)",neutral300:"var(--ds-neutral-300)",neutral400:"var(--ds-neutral-400)",neutral500:"var(--ds-neutral-500)",neutral600:"var(--ds-neutral-600)",neutral700:"var(--ds-neutral-700)",neutral800:"var(--ds-neutral-800)",neutral900:"var(--ds-neutral-900)",neutral950:"var(--ds-neutral-950)",primary50:"var(--ds-primary-50)",primary100:"var(--ds-primary-100)",primary200:"var(--ds-primary-200)",primary300:"var(--ds-primary-300)",primary400:"var(--ds-primary-400)",primary500:"var(--ds-primary-500)",primary600:"var(--ds-primary-600)",primary700:"var(--ds-primary-700)",primary800:"var(--ds-primary-800)",primary900:"var(--ds-primary-900)",primary950:"var(--ds-primary-950)",danger50:"var(--ds-danger-50)",danger100:"var(--ds-danger-100)",danger200:"var(--ds-danger-200)",danger300:"var(--ds-danger-300)",danger400:"var(--ds-danger-400)",danger500:"var(--ds-danger-500)",danger600:"var(--ds-danger-600)",danger700:"var(--ds-danger-700)",danger800:"var(--ds-danger-800)",danger900:"var(--ds-danger-900)",danger950:"var(--ds-danger-950)",warning50:"var(--ds-warning-50)",warning100:"var(--ds-warning-100)",warning200:"var(--ds-warning-200)",warning300:"var(--ds-warning-300)",warning400:"var(--ds-warning-400)",warning500:"var(--ds-warning-500)",warning600:"var(--ds-warning-600)",warning700:"var(--ds-warning-700)",warning800:"var(--ds-warning-800)",warning900:"var(--ds-warning-900)",warning950:"var(--ds-warning-950)",success50:"var(--ds-success-50)",success100:"var(--ds-success-100)",success200:"var(--ds-success-200)",success300:"var(--ds-success-300)",success400:"var(--ds-success-400)",success500:"var(--ds-success-500)",success600:"var(--ds-success-600)",success700:"var(--ds-success-700)",success800:"var(--ds-success-800)",success900:"var(--ds-success-900)",success950:"var(--ds-success-950)"};var n={s0:"var(--ds-spacing-0)",s1:"var(--ds-spacing-1)",s2:"var(--ds-spacing-2)",s3:"var(--ds-spacing-3)",s4:"var(--ds-spacing-4)",s5:"var(--ds-spacing-5)",s6:"var(--ds-spacing-6)",s7:"var(--ds-spacing-7)",s8:"var(--ds-spacing-8)",s9:"var(--ds-spacing-9)",s10:"var(--ds-spacing-10)",s11:"var(--ds-spacing-11)",s12:"var(--ds-spacing-12)",s13:"var(--ds-spacing-13)",s14:"var(--ds-spacing-14)",s15:"var(--ds-spacing-15)",s16:"var(--ds-spacing-16)",s17:"var(--ds-spacing-17)",s18:"var(--ds-spacing-18)",s19:"var(--ds-spacing-19)",s20:"var(--ds-spacing-20)",s21:"var(--ds-spacing-21)",max:"var(--ds-spacing-max)"};var V={10:10,11:11,12:12,13:13,14:14,15:15,16:16,18:18,20:20,24:24,28:28,32:32,36:36,44:44,60:60},E={thin:100,extralight:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},lt={none:1,tight:1.25,snug:1.375,normal:1.5,relaxed:1.625,loose:2};var dt={typography:"i"};import{jsx as Zt}from"react/jsx-runtime";var H=Et(({asChild:t,className:o,style:e,color:r,size:s=16,weight:a="normal",lineHeight:c="normal",...p},l)=>{let d=t?It:Ot.p,m,f,b;Array.isArray(s)?[m,f,b]=s:typeof s=="object"?{base:m,tablet:f,desktop:b}=s:m=s;let T={...e,"--cocso-typography-font-color":r,"--cocso-typography-font-size":`${V[m]}px`,...f!==void 0&&{"--cocso-tablet-typography-font-size":`${V[f]}px`},...b!==void 0&&{"--cocso-desktop-typography-font-size":`${V[b]}px`},"--cocso-typography-font-weight":E[a],"--cocso-typography-line-height":lt[c]};return Zt(d,{ref:l,className:Vt(dt.typography,o),style:T,...p})});import{jsx as Qt}from"react/jsx-runtime";var g=$t(({asChild:t,style:o,color:e,size:r="md",weight:s,lineHeight:a,...c},p)=>{let l=qt(r);return Qt(H,{ref:p,color:e,size:l,weight:s,lineHeight:a,asChild:t,...c})}),qt=t=>Yt(t).with("lg",()=>18).with("md",()=>16).with("sm",()=>14).with("xs",()=>12).exhaustive();import{Primitive as io}from"@radix-ui/react-primitive";import{clsx as ft}from"clsx";import{cloneElement as no,forwardRef as so,isValidElement as ao}from"react";import{match as w}from"ts-pattern";import{Primitive as _t}from"@radix-ui/react-primitive";import{Slot as jt}from"@radix-ui/react-slot";import{clsx as Kt}from"clsx";import{forwardRef as Gt}from"react";import{match as Z}from"ts-pattern";var ht={"donut-spin":"u",spinner:"D"};import{jsx as eo}from"react/jsx-runtime";var mt=Gt(({asChild:t,className:o,style:e,size:r="md",color:s="primary",...a},c)=>{let p=t?jt:_t.div,l={...e,"--cocso-spinner-size":Jt(r),"--cocso-spinner-border-width":Ut(r),"--cocso-spinner-border-color":to(s),"--cocso-spinner-bg-color":oo(s)};return eo(p,{ref:c,className:Kt(ht.spinner,o),style:l,...a})}),Jt=t=>Z(t).with("xl",()=>"40px").with("lg",()=>"32px").with("md",()=>"24px").with("sm",()=>"20px").exhaustive(),Ut=t=>Z(t).with("xl",()=>"5px").with("lg",()=>"4px").with("md",()=>"3px").with("sm",()=>"2px").exhaustive(),to=t=>Z(t).with("primary",()=>i.primary500).with("neutral",()=>i.neutral600).with("white",()=>i.white).exhaustive(),oo=t=>Z(t).with("primary",()=>i.primary100).with("neutral",()=>i.neutral100).with("white",()=>i.whiteAlpha20).exhaustive();var R={button:"l",disabled:"h",content:"E",prefix:"F",suffix:"G",svgOnly:"H"};import{Fragment as uo,jsx as D,jsxs as vo}from"react/jsx-runtime";var Lr=so(({asChild:t,className:o,style:e,children:r,size:s="md",variant:a="primary",weight:c="medium",shape:p="square",prefix:l,suffix:d,svgOnly:m=!1,disabled:f=!1,loading:b=!1,...T},A)=>{let O={...e,...co(s),"--cocso-button-font-color":lo(a),"--cocso-button-font-weight":E[c],"--cocso-button-border":ho(a),"--cocso-button-border-radius":po(p,s),"--cocso-button-bg-color":mo(a),"--cocso-button-bg-color-hover":fo(a),"--cocso-button-bg-color-active":go(a)},I=f||b,ct=ft(R.button,I&&R.disabled,m&&R.svgOnly,o),pt=S=>vo(uo,{children:[b&&D(mt,{size:"sm",color:"white"}),l&&D("span",{className:R.prefix,children:l}),D("span",{className:R.content,children:S}),d&&D("span",{className:R.suffix,children:d})]});if(t){if(!ao(r))throw new Error("Button: asChild requires a single React element as a child");let S=r,Wt=S.props.children;return no(S,{ref:A,...T,...S.props,className:ft(ct,S.props.className),style:{...O,...S.props.style},children:pt(Wt)})}return D(io.button,{ref:A,className:ct,disabled:I,style:O,...T,children:pt(r)})}),co=t=>{let o=w(t).with("xl",()=>56).with("lg",()=>48).with("md",()=>40).with("sm",()=>32).with("xs",()=>24).exhaustive(),e=w(t).with("xl",()=>16).with("lg",()=>14).with("md",()=>10).with("sm",()=>6).with("xs",()=>0).exhaustive(),r=w(t).with("xl",()=>16).with("lg",()=>16).with("xs",()=>12).otherwise(()=>14);return{"--cocso-button-height":`${o}px`,"--cocso-button-padding-inline":`${e}px`,"--cocso-button-font-size":`${r}px`}},po=(t,o)=>w(t).with("square",()=>w(o).with("xs",()=>"4px").otherwise(()=>"6px")).with("circle",()=>"100%").with("rounded",()=>"100px").exhaustive(),lo=t=>w(t).with("primary","success","error","neutral",()=>i.white).with("secondary","tertiary","warning",()=>i.neutral950).exhaustive(),ho=t=>w(t).with("tertiary",()=>`1px solid ${i.neutral100}`).otherwise(()=>"none"),mo=t=>w(t).with("primary",()=>i.primary500).with("secondary",()=>i.white).with("tertiary",()=>i.transparent).with("success",()=>i.success500).with("error",()=>i.danger500).with("warning",()=>i.warning300).with("neutral",()=>i.neutral950).exhaustive(),fo=t=>w(t).with("primary",()=>i.primary600).with("secondary",()=>i.neutral50).with("tertiary",()=>i.neutral50).with("success",()=>i.success600).with("error",()=>i.danger600).with("warning",()=>i.warning400).with("neutral",()=>i.neutral800).exhaustive(),go=t=>w(t).with("primary",()=>i.primary700).with("secondary",()=>i.neutral100).with("tertiary",()=>i.neutral100).with("success",()=>i.success700).with("error",()=>i.danger700).with("warning",()=>i.warning500).with("neutral",()=>i.neutral700).exhaustive();import{CheckIcon as gt}from"@cocso-ui/react-icons";import*as $ from"@radix-ui/react-checkbox";import{clsx as yo}from"clsx";import{forwardRef as bo,useId as xo}from"react";import{match as N}from"ts-pattern";var W={wrapper:"I",checkbox:"r",indicator:"J",label:"v"};import{jsx as B,jsxs as ut}from"react/jsx-runtime";var qr=bo(({id:t,className:o,style:e,size:r="md",status:s,onChange:a,label:c,disabled:p,...l},d)=>{let m=xo(),f=t??m,b=O=>{if(!p){let I=N(O).with(!0,()=>"on").with("indeterminate",()=>"intermediate").with(!1,()=>"off").exhaustive();a(I)}},T=()=>N(s).with("on",()=>!0).with("intermediate",()=>"indeterminate").with("off",()=>!1).exhaustive(),A={...e,"--cocso-checkbox-size":Co(r),"--cocso-checkbox-color":i.white,"--cocso-checkbox-border-color":Po(s),"--cocso-checkbox-bg-color":ko(s)};return ut("div",{className:yo(W.wrapper,o),style:A,children:[ut($.Root,{ref:d,id:f,className:W.checkbox,checked:T(),onCheckedChange:b,disabled:p,...l,children:[B($.Indicator,{className:W.indicator,style:{opacity:s==="on"?1:0},"aria-hidden":"true",children:B(gt,{size:24})}),B("div",{className:W.indicator,style:{opacity:s==="intermediate"?1:0},"aria-hidden":"true",children:B(gt,{size:24})})]}),c&&B(g,{className:W.label,size:r,"aria-disabled":p,asChild:!0,children:B("label",{htmlFor:f,children:c})})]})}),Co=t=>N(t).with("lg",()=>n.s10).with("md",()=>n.s9).with("sm",()=>n.s8).exhaustive(),Po=t=>N(t).with("on",()=>i.primary500).with("intermediate",()=>i.primary500).with("off",()=>i.neutral100).exhaustive(),ko=t=>N(t).with("on",()=>i.primary500).with("intermediate",()=>i.primary500).with("off",()=>i.white).exhaustive();import{Slot as So}from"@radix-ui/react-slot";import{forwardRef as Ro}from"react";import{match as zo}from"ts-pattern";import{jsx as vt}from"react/jsx-runtime";var ti=Ro(({asChild:t,className:o,color:e,size:r="md",weight:s,lineHeight:a,...c},p)=>{let l=t?So:"h1",d=To(r);return vt(H,{ref:p,color:e,size:d,weight:s,lineHeight:a,asChild:!0,children:vt(l,{...c})})}),To=t=>zo(t).with("lg",()=>({base:44,tablet:60})).with("md",()=>({base:32,tablet:44})).with("sm",()=>({base:28,tablet:36})).exhaustive();import*as y from"@radix-ui/react-dropdown-menu";import{clsx as wt}from"clsx";import{forwardRef as yt}from"react";var et={"dropdown-slide-up":"f","dropdown-slide-down":"m",content:"p",item:"K"};import{jsx as bt}from"react/jsx-runtime";var Wo=yt(({className:t,...o},e)=>bt(y.Content,{ref:e,className:wt(et.content,t),...o})),Bo=yt(({className:t,...o},e)=>bt(y.Item,{ref:e,className:wt(et.item,t),...o})),pi=Object.assign(y.Root,{Trigger:y.Trigger,Portal:y.Portal,Content:Wo,Item:Bo});import{Primitive as Lo}from"@radix-ui/react-primitive";import{Slot as Fo}from"@radix-ui/react-slot";import{forwardRef as Mo}from"react";import{match as Do}from"ts-pattern";import{jsx as xt}from"react/jsx-runtime";var Ct=Mo(({asChild:t,className:o,color:e,size:r="md",weight:s="bold",lineHeight:a,...c},p)=>{let l=t?Fo:Lo.h2,d=No(r);return xt(H,{ref:p,color:e,size:d,weight:s,lineHeight:a,asChild:!0,children:xt(l,{...c})})}),No=t=>Do(t).with("xl",()=>({base:28,tablet:40})).with("lg",()=>({base:24,tablet:32})).with("md",()=>({base:22,tablet:24})).with("sm",()=>18).with("xs",()=>16).exhaustive();import{Primitive as Oo}from"@radix-ui/react-primitive";import{Slot as Io}from"@radix-ui/react-slot";import{clsx as Vo}from"clsx";import{forwardRef as Eo}from"react";var rt={link:"y",indicator:"L"};import{jsx as Pt}from"react/jsx-runtime";var Wi=Eo(({asChild:t,className:o,size:e,weight:r,lineHeight:s,indicator:a=!0,...c},p)=>{let l=t?Io:Oo.a;return Pt(g,{size:e,weight:r,lineHeight:s,asChild:!0,children:Pt(l,{ref:p,className:Vo(rt.link,a&&rt.indicator,o),...c})})});import{CloseIcon as $o}from"@cocso-ui/react-icons";import*as h from"@radix-ui/react-dialog";import{clsx as Y}from"clsx";import{forwardRef as q}from"react";var L={"overlay-show":"w",overlay:"M","content-show":"x",content:"N",close:"O",title:"P",description:"Q"};import{jsx as C,jsxs as _o}from"react/jsx-runtime";var Yo=q(({className:t,children:o,...e},r)=>_o(h.Portal,{children:[C(h.Overlay,{className:L.overlay}),C(h.Content,{ref:r,className:Y(L.content,t),...e,children:o})]})),qo=q(({className:t,children:o,...e},r)=>C(h.Close,{ref:r,className:Y(L.close,t),...e,children:C($o,{size:24})})),Qo=q(({className:t,children:o,...e},r)=>C(h.Title,{ref:r,className:Y(L.title,t),asChild:!0,...e,children:C(Ct,{color:"text.basic",children:o})})),Xo=q(({className:t,children:o,...e},r)=>C(h.Description,{ref:r,className:Y(L.description,t),asChild:!0,...e,children:C(g,{size:"sm",color:"text.subtle",children:o})})),Zi=Object.assign(h.Root,{Trigger:h.Trigger,Content:Yo,Close:qo,Title:Qo,Description:Xo});import*as Q from"@radix-ui/react-one-time-password-field";import{clsx as kt}from"clsx";import{forwardRef as St}from"react";var it={otp:"R",input:"a"};import{jsx as Rt}from"react/jsx-runtime";var Ko=St(({className:t,...o},e)=>Rt(Q.Root,{ref:e,className:kt(it.otp,t),...o})),Go=St(({className:t,...o},e)=>Rt(Q.Input,{ref:e,className:kt(it.input,t),...o})),Gi=Object.assign(Ko,{Input:Go});import{clsx as Uo}from"clsx";import{forwardRef as te}from"react";var z={pagination:"S",arrow:"o",item:"e",trunc:"T"};import{Fragment as oe,jsx as x,jsxs as zt}from"react/jsx-runtime";var an=te(({className:t,page:o,totalPages:e,maxVisible:r=5,onChange:s,...a},c)=>{let p=Math.ceil(r/2),l=d=>x("button",{type:"button",className:z.item,onClick:()=>s(d),"data-active":o===d,children:d},d);return zt("div",{ref:c,className:Uo(z.pagination,t),...a,children:[e>1&&x("button",{className:z.arrow,type:"button",disabled:o===1,onClick:()=>o>1&&s(o-1),children:x("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:x("path",{d:"m15 18-6-6 6-6"})})}),e<=r+2?Array(e).fill(0).map((d,m)=>l(m+1)):zt(oe,{children:[l(1),o>1+p&&x("span",{className:z.trunc,children:"..."}),Array(r).fill(0).map((d,m)=>{let f=o-p+m+1;return f>1&&f<e?l(f):""}),o<e-p&&x("span",{className:z.trunc,children:"..."}),l(e)]}),e>1&&x("button",{className:z.arrow,type:"button",disabled:o===e,onClick:()=>o<e&&s(o+1),children:x("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:x("path",{d:"m9 18 6-6-6-6"})})})]})});import*as P from"@radix-ui/react-popover";import{clsx as re}from"clsx";import{forwardRef as ie}from"react";var Tt={"slide-up-and-fade":"k","slide-right-and-fade":"z","slide-down-and-fade":"j","slide-left-and-fade":"Y",content:"t"};import{jsx as se}from"react/jsx-runtime";var ne=ie(({className:t,...o},e)=>se(P.Content,{ref:e,className:re(Tt.content,t),...o})),un=Object.assign(P.Root,{Trigger:P.Trigger,Portal:P.Portal,Content:ne});import{KeyboardArrowDownIcon as ce}from"@cocso-ui/react-icons";import{clsx as pe}from"clsx";import{forwardRef as le}from"react";import{match as de}from"ts-pattern";var X={wrapper:"U",select:"X",icon:"q"};import{jsx as nt,jsxs as me}from"react/jsx-runtime";var Tn=le(({className:t,style:o,size:e="md",disabled:r=!1,children:s,...a},c)=>{let p={...o,...he(e)};return me("div",{className:X.wrapper,children:[nt("select",{ref:c,className:pe(X.select,t),style:p,disabled:r,...a,children:s}),nt("span",{className:X.icon,children:nt(ce,{size:20})})]})}),he=t=>de(t).with("2xs",()=>({"--cocso-select-min-width":n.s11,"--cocso-select-height":n.s11,"--cocso-select-padding-left":n.s5,"--cocso-select-padding-right":`calc(${n.s8} + 16px)`,"--cocso-select-font-size":"12px","--cocso-select-border-radius":n.s3})).with("xs",()=>({"--cocso-select-min-width":n.s12,"--cocso-select-height":n.s12,"--cocso-select-padding-left":n.s6,"--cocso-select-padding-right":`calc(${n.s7} + 16px)`,"--cocso-select-font-size":"14px","--cocso-select-border-radius":n.s3})).with("sm",()=>({"--cocso-select-min-width":n.s14,"--cocso-select-height":n.s14,"--cocso-select-padding-left":n.s7,"--cocso-select-padding-right":`calc(${n.s7} + 16px)`,"--cocso-select-font-size":"14px","--cocso-select-border-radius":n.s3})).with("md",()=>({"--cocso-select-min-width":n.s16,"--cocso-select-height":n.s16,"--cocso-select-padding-left":n.s8,"--cocso-select-padding-right":`calc(${n.s8} + 16px)`,"--cocso-select-font-size":"16px","--cocso-select-border-radius":n.s4})).with("lg",()=>({"--cocso-select-min-width":n.s17,"--cocso-select-height":n.s17,"--cocso-select-padding-left":n.s9,"--cocso-select-padding-right":`calc(${n.s9} + 16px)`,"--cocso-select-font-size":"18px","--cocso-select-border-radius":n.s4})).with("xl",()=>({"--cocso-select-min-width":n.s18,"--cocso-select-height":n.s18,"--cocso-select-padding-left":n.s10,"--cocso-select-padding-right":`calc(${n.s10} + 16px)`,"--cocso-select-font-size":"18px","--cocso-select-border-radius":n.s4})).exhaustive();import{clsx as ge}from"clsx";import{forwardRef as ue}from"react";import{match as ve}from"ts-pattern";var st={stock:"V",indicator:"Z"};import{jsx as u,jsxs as _}from"react/jsx-runtime";var Vn=ue(({className:t,style:o,onChange:e,quantity:r,...s},a)=>{let c={...o,"--cocso-stock-quantity-status-color":we(r),"--cocso-stock-quantity-status-indicator-width":n.s9};return _("div",{ref:a,className:ge(st.stock,t),style:c,...s,children:[u("span",{className:st.indicator,children:r==="\uC5EC\uC720"?_("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[u("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.06494 13.0754C4.26764 13.0754 1.99999 10.8199 2 8.03765C2.00001 5.25543 4.26766 3 7.06494 3L9.48051 3V6.10011L7.06494 6.10011C5.98906 6.10011 5.11689 6.96758 5.11689 8.03767C5.11688 9.10776 5.98906 9.97524 7.06494 9.97524L9.48051 9.97524V13.0754H7.06494Z",fill:"#D9D9D9",fillOpacity:"0.85098"}),u("path",{d:"M9.48051 9.97524L9.48051 6.10011L12.0519 6.10026C13.1278 6.10026 14 6.96774 14 8.03783C14 9.10792 13.1278 9.9754 12.0519 9.9754L9.48051 9.97524Z",fill:"#D9D9D9",fillOpacity:"0.85098"}),u("path",{d:"M9.48047 6.10059H7.06543C5.98955 6.10059 5.11719 6.968 5.11719 8.03809C5.11741 9.10782 5.98893 9.97532 7.06445 9.97559H9.48047V13.0752H7.06445C4.35911 13.0749 2.14983 10.9652 2.00781 8.30957V7.76465C2.15041 5.10939 4.36025 3 7.06543 3H9.48047V6.10059ZM12.0518 6.10059C13.1276 6.10059 14 6.968 14 8.03809C13.9999 9.10806 13.1276 9.97559 12.0518 9.97559H9.48047V6.10059H12.0518Z",fill:"currentColor"})]}):r==="\uBCF4\uD1B5"?_("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[u("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.06494 13.0754C4.26764 13.0754 1.99999 10.8199 2 8.03765C2.00001 5.25543 4.26766 3 7.06494 3L9.48051 3V6.10011L7.06494 6.10011C5.98906 6.10011 5.11689 6.96758 5.11689 8.03767C5.11688 9.10776 5.98906 9.97524 7.06494 9.97524L9.48051 9.97524V13.0754H7.06494Z",fill:"#D9D9D9",fillOpacity:"0.85098"}),u("path",{d:"M9.48051 9.97524L9.48051 6.10011L12.0519 6.10026C13.1278 6.10026 14 6.96774 14 8.03783C14 9.10792 13.1278 9.9754 12.0519 9.9754L9.48051 9.97524Z",fill:"#D9D9D9",fillOpacity:"0.85098"}),u("path",{d:"M9.48145 6.0752V6.10059H7.06641C5.99053 6.10059 5.11817 6.968 5.11816 8.03809C5.11839 9.10782 5.98991 9.97532 7.06543 9.97559H9.48145V13.0752H7.06543C4.35577 13.0749 2.14345 10.9585 2.00781 8.29688V7.77832C2.03849 7.17662 2.17568 6.60303 2.40039 6.0752H9.48145ZM12.0527 6.10059C13.1286 6.10059 14.001 6.968 14.001 8.03809C14.0008 9.10806 13.1285 9.97559 12.0527 9.97559H9.48145V6.10059H12.0527Z",fill:"currentColor"})]}):_("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[u("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.06494 13.0754C4.26764 13.0754 1.99999 10.8199 2 8.03765C2.00001 5.25543 4.26766 3 7.06494 3L9.48051 3V6.10011L7.06494 6.10011C5.98906 6.10011 5.11689 6.96758 5.11689 8.03767C5.11688 9.10776 5.98906 9.97524 7.06494 9.97524L9.48051 9.97524V13.0754H7.06494Z",fill:"#D9D9D9",fillOpacity:"0.85098"}),u("path",{d:"M9.48051 9.97524L9.48051 6.10011L12.0519 6.10026C13.1278 6.10026 14 6.96774 14 8.03783C14 9.10792 13.1278 9.9754 12.0519 9.9754L9.48051 9.97524Z",fill:"#D9D9D9",fillOpacity:"0.85098"}),u("path",{d:"M7.04688 9.97461C7.05273 9.97466 7.05859 9.97558 7.06445 9.97559H9.48047V13.0752H7.06445C4.95754 13.075 3.15182 11.7952 2.38867 9.97461H7.04688ZM12.0713 9.97461C12.0648 9.97467 12.0582 9.97559 12.0518 9.97559H9.48047V9.97461H12.0713Z",fill:"currentColor"})]})}),u(g,{size:"sm",color:"currentColor",children:r})]})}),we=t=>ve(t).with("\uC5EC\uC720",()=>i.primary500).with("\uBCF4\uD1B5",()=>i.success400).with("\uBD80\uC871",()=>i.danger500).exhaustive();import{Primitive as be}from"@radix-ui/react-primitive";import*as K from"@radix-ui/react-switch";import{clsx as xe}from"clsx";import{forwardRef as Ce,useId as Pe}from"react";import{match as at}from"ts-pattern";var j={wrapper:"A",switch:"n",thumb:"B"};import{jsx as F,jsxs as Re}from"react/jsx-runtime";var Un=Ce(({id:t,className:o,style:e,size:r="md",position:s="right",disabled:a,label:c,...p},l)=>{let d=Pe(),m=t??d,f={...e,"--cocso-switch-width":ke(r),"--cocso-switch-height":Se(r),"--cocso-switch-thumb-width":Ht(r),"--cocso-switch-thumb-height":Ht(r),"--cocso-switch-bg-color":i.neutral100};return Re(be.div,{className:xe(j.wrapper,o),"aria-disabled":a,style:f,children:[s==="left"&&F(g,{size:r,asChild:!0,children:F("label",{htmlFor:m,children:c})}),F(K.Root,{ref:l,className:j.switch,disabled:a,...p,children:F(K.Thumb,{className:j.thumb})}),s==="right"&&F(g,{size:r,"aria-disabled":a,asChild:!0,children:F("label",{htmlFor:m,children:c})})]})}),ke=t=>at(t).with("lg",()=>n.s14).with("md",()=>n.s12).exhaustive(),Se=t=>at(t).with("lg",()=>n.s10).with("md",()=>n.s9).exhaustive(),Ht=t=>at(t).with("lg",()=>n.s9).with("md",()=>n.s8).exhaustive();import*as k from"@radix-ui/react-tabs";import{forwardRef as G}from"react";import{jsx as J}from"react/jsx-runtime";var ze=G(({...t},o)=>J(k.Root,{ref:o,...t})),Te=G(({...t},o)=>J(k.List,{ref:o,...t})),He=G(({...t},o)=>J(k.Trigger,{ref:o,...t})),We=G(({...t},o)=>J(k.Content,{ref:o,...t})),ns=Object.assign(ze,{List:Te,Trigger:He,Content:We});import{Toaster as hs,toast as ms}from"sonner";export{Ne as Accordion,g as Body,Lr as Button,qr as Checkbox,ti as Display,pi as Dropdown,Ct as Heading,Wi as Link,Zi as Modal,Gi as OneTimePasswordField,an as Pagination,un as Popover,Tn as Select,mt as Spinner,Vn as StockQuantityStatus,Un as Switch,ns as Tab,hs as Toaster,H as Typography,i as colors,V as fontSize,E as fontWeight,we as getColor,lt as lineHeight,n as spacing,ms as toast};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocso-ui/react",
3
- "version": "0.1.5",
3
+ "version": "0.1.8",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/cocso/cocso-ui.git",
@@ -31,7 +31,7 @@
31
31
  "dist"
32
32
  ],
33
33
  "dependencies": {
34
- "@cocso-ui/react-icons": "^0.0.11",
34
+ "@cocso-ui/react-icons": "workspace:^",
35
35
  "@radix-ui/react-accordion": "^1.2.12",
36
36
  "@radix-ui/react-checkbox": "^1.3.3",
37
37
  "@radix-ui/react-dialog": "^1.1.15",