@cocso-ui/react 0.1.5 → 0.1.6

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,6 +1,6 @@
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'> {
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 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("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`}},Eo=(t,o)=>(0,w.match)(t).with("square",()=>(0,w.match)(o).with("xs",()=>"4px").otherwise(()=>"6px")).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");
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 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("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`}},ro=(t,o)=>w(t).with("square",()=>w(o).with("xs",()=>"4px").otherwise(()=>"6px")).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};
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.6",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/cocso/cocso-ui.git",