@cocso-ui/react 0.0.4-beta.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/{components/Accordion → accordion}/Accordion.d.ts +6 -3
- package/lib/body/Body.d.ts +11 -0
- package/lib/button/Button.d.ts +17 -0
- package/lib/checkbox/Checkbox.d.ts +13 -0
- package/lib/display/Display.d.ts +11 -0
- package/lib/heading/Heading.d.ts +10 -0
- package/lib/index.cjs +1 -1
- package/lib/index.css +1 -0
- package/lib/index.d.ts +20 -20
- package/lib/index.js +1 -1
- package/lib/link/Link.d.ts +11 -0
- package/lib/{components/Modal → modal}/Modal.d.ts +1 -1
- package/lib/pagination/Pagination.d.ts +8 -0
- package/lib/select/Select.d.ts +8 -0
- package/lib/spinner/Spinner.d.ts +9 -0
- package/lib/stock-quantity-status/StockQuantityStatus.d.ts +7 -0
- package/lib/switch/Switch.d.ts +11 -0
- package/lib/toast/index.d.ts +1 -0
- package/lib/token/color.d.ts +80 -0
- package/lib/token/index.d.ts +3 -0
- package/lib/token/spacing.d.ts +25 -0
- package/lib/token/typography.d.ts +44 -0
- package/lib/typography/Typography.d.ts +9 -0
- package/lib/typography/index.d.ts +1 -0
- package/package.json +25 -15
- package/lib/components/Body/Body.d.ts +0 -16
- package/lib/components/Button/Button.d.ts +0 -22
- package/lib/components/Checkbox/Checkbox.d.ts +0 -21
- package/lib/components/Display/Display.d.ts +0 -16
- package/lib/components/FileUpload/FileUpload.d.ts +0 -14
- package/lib/components/FileUpload/index.d.ts +0 -1
- package/lib/components/Heading/Heading.d.ts +0 -16
- package/lib/components/Label/Label.d.ts +0 -16
- package/lib/components/Label/index.d.ts +0 -1
- package/lib/components/Link/Link.d.ts +0 -16
- package/lib/components/Pagination/Pagination.d.ts +0 -15
- package/lib/components/Select/Select.d.ts +0 -11
- package/lib/components/Spinner/Spinner.d.ts +0 -19
- package/lib/components/StockQuantityStatus/StockQuantityStatus.d.ts +0 -10
- package/lib/components/Switch/Switch.d.ts +0 -18
- package/lib/components/Toast/Toast.d.ts +0 -5
- package/lib/components/Toast/index.d.ts +0 -1
- package/lib/utils/cn.d.ts +0 -2
- package/lib/utils/token.d.ts +0 -15
- /package/lib/{components/Accordion → accordion}/index.d.ts +0 -0
- /package/lib/{components/Body → body}/index.d.ts +0 -0
- /package/lib/{components/Button → button}/index.d.ts +0 -0
- /package/lib/{components/Checkbox → checkbox}/index.d.ts +0 -0
- /package/lib/{components/Display → display}/index.d.ts +0 -0
- /package/lib/{components/Dropdown → dropdown}/Dropdown.d.ts +0 -0
- /package/lib/{components/Dropdown → dropdown}/index.d.ts +0 -0
- /package/lib/{components/Heading → heading}/index.d.ts +0 -0
- /package/lib/{components/Link → link}/index.d.ts +0 -0
- /package/lib/{components/Modal → modal}/index.d.ts +0 -0
- /package/lib/{components/OneTimePasswordField → one-time-password-field}/OneTimePasswordField.d.ts +0 -0
- /package/lib/{components/OneTimePasswordField → one-time-password-field}/index.d.ts +0 -0
- /package/lib/{components/Pagination → pagination}/index.d.ts +0 -0
- /package/lib/{components/Popover → popover}/Popover.d.ts +0 -0
- /package/lib/{components/Popover → popover}/index.d.ts +0 -0
- /package/lib/{components/Select → select}/index.d.ts +0 -0
- /package/lib/{components/Spinner → spinner}/index.d.ts +0 -0
- /package/lib/{components/StockQuantityStatus → stock-quantity-status}/index.d.ts +0 -0
- /package/lib/{components/Switch → switch}/index.d.ts +0 -0
- /package/lib/{components/Tab → tab}/Tab.d.ts +0 -0
- /package/lib/{components/Tab → tab}/index.d.ts +0 -0
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
2
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
3
|
+
interface TriggerProps extends ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger> {
|
|
4
|
+
chevron?: boolean;
|
|
5
|
+
}
|
|
2
6
|
export declare const Accordion: import("react").ForwardRefExoticComponent<(AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps) & import("react").RefAttributes<HTMLDivElement>> & {
|
|
3
7
|
Item: import("react").ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
4
8
|
Header: import("react").ForwardRefExoticComponent<AccordionPrimitive.AccordionHeaderProps & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
5
|
-
Trigger: import("react").ForwardRefExoticComponent<
|
|
6
|
-
chevron?: boolean;
|
|
7
|
-
} & Omit<AccordionPrimitive.AccordionTriggerProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
Trigger: import("react").ForwardRefExoticComponent<TriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
8
10
|
Content: import("react").ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
11
|
};
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import type { FontWeight, LineHeight } from '../token';
|
|
3
|
+
export type BodySize = 'lg' | 'md' | 'sm' | 'xs';
|
|
4
|
+
export interface BodyProps extends ComponentPropsWithoutRef<'p'> {
|
|
5
|
+
asChild?: boolean;
|
|
6
|
+
color?: string;
|
|
7
|
+
size?: BodySize;
|
|
8
|
+
weight?: FontWeight;
|
|
9
|
+
lineHeight?: LineHeight;
|
|
10
|
+
}
|
|
11
|
+
export declare const Body: import("react").ForwardRefExoticComponent<BodyProps & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import { type FontWeight } from '../token';
|
|
3
|
+
export type ButtonSize = 'lg' | 'md' | 'sm' | 'xs';
|
|
4
|
+
export type ButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'success' | 'error' | 'warning' | 'neutral';
|
|
5
|
+
export type ButtonShape = 'square' | 'circle' | 'rounded';
|
|
6
|
+
export interface ButtonProps extends Omit<ComponentPropsWithoutRef<'button'>, 'prefix'> {
|
|
7
|
+
size?: ButtonSize;
|
|
8
|
+
variant?: ButtonVariant;
|
|
9
|
+
weight?: FontWeight;
|
|
10
|
+
shape?: ButtonShape;
|
|
11
|
+
prefix?: ReactNode;
|
|
12
|
+
suffix?: ReactNode;
|
|
13
|
+
svgOnly?: boolean;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
loading?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
2
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
3
|
+
export type CheckboxSize = 'lg' | 'md' | 'sm';
|
|
4
|
+
export type CheckboxStatus = 'on' | 'off' | 'intermediate';
|
|
5
|
+
export interface CheckboxProps extends Omit<ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>, 'checked' | 'onCheckedChange' | 'onChange'> {
|
|
6
|
+
id?: string;
|
|
7
|
+
size?: CheckboxSize;
|
|
8
|
+
status: CheckboxStatus;
|
|
9
|
+
onChange: (status: CheckboxStatus) => void;
|
|
10
|
+
label?: string;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const Checkbox: import("react").ForwardRefExoticComponent<CheckboxProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import type { FontWeight, LineHeight } from '../token';
|
|
3
|
+
export type DisplaySize = 'lg' | 'md' | 'sm';
|
|
4
|
+
export interface DisplayProps extends ComponentPropsWithoutRef<'h1'> {
|
|
5
|
+
asChild?: boolean;
|
|
6
|
+
color?: string;
|
|
7
|
+
size?: DisplaySize;
|
|
8
|
+
weight?: FontWeight;
|
|
9
|
+
lineHeight?: LineHeight;
|
|
10
|
+
}
|
|
11
|
+
export declare const Display: import("react").ForwardRefExoticComponent<DisplayProps & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import type { FontWeight, LineHeight } from '../token';
|
|
3
|
+
export type HeadingSize = 'xl' | 'lg' | 'md' | 'sm' | 'xs';
|
|
4
|
+
export interface HeadingProps extends ComponentPropsWithoutRef<'h2'> {
|
|
5
|
+
asChild?: boolean;
|
|
6
|
+
size?: HeadingSize;
|
|
7
|
+
weight?: FontWeight;
|
|
8
|
+
lineHeight?: LineHeight;
|
|
9
|
+
}
|
|
10
|
+
export declare const Heading: import("react").ForwardRefExoticComponent<HeadingProps & import("react").RefAttributes<HTMLHeadingElement>>;
|
package/lib/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var Zo=Object.create;var U=Object.defineProperty;var $o=Object.getOwnPropertyDescriptor;var _o=Object.getOwnPropertyNames;var Qo=Object.getPrototypeOf,Uo=Object.prototype.hasOwnProperty;var Go=(o,e)=>{for(var t in e)U(o,t,{get:e[t],enumerable:!0})},ho=(o,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of _o(e))!Uo.call(o,i)&&i!==t&&U(o,i,{get:()=>e[i],enumerable:!(r=$o(e,i))||r.enumerable});return o};var f=(o,e,t)=>(t=o!=null?Zo(Qo(o)):{},ho(e||!o||!o.__esModule?U(t,"default",{value:o,enumerable:!0}):t,o)),Ko=o=>ho(U({},"__esModule",{value:!0}),o);var $e={};Go($e,{Accordion:()=>oe,Body:()=>V,Button:()=>se,Checkbox:()=>De,Display:()=>ce,Dropdown:()=>pe,FileUpload:()=>he,Heading:()=>co,Label:()=>W,Link:()=>ue,Modal:()=>we,OneTimePasswordField:()=>Ne,Pagination:()=>Te,Popover:()=>Se,Select:()=>Ze,Spinner:()=>io,StockQuantityStatus:()=>Oe,Switch:()=>He,Tab:()=>ze,Toaster:()=>Ve,toast:()=>X.toast});module.exports=Ko($e);var L=f(require("@radix-ui/react-accordion"),1),G=require("react");var qo=(...o)=>o.filter(Boolean).join(" ").trim(),n=(o,e,t=[],...r)=>{let i=Object.entries(e).filter(([,m])=>m!==!1&&m!==null&&m!==void 0).map(([m,c])=>`${o}--${m}_${c}`).join(" "),s=t.filter(m=>Object.entries(m).every(([c,p])=>e[c]===p)).map(m=>{let c=Object.entries(m).map(([p,l])=>`${p}_${l}`).join("-");return`${o}--${c}`}).join(" ");return qo(o,i,s,...r)};var go=require("@radix-ui/react-slot"),O=require("react/jsx-runtime"),Jo=(0,G.forwardRef)(({className:o,...e},t)=>{let r=n("cocso-accordion-item",{},[],o);return(0,O.jsx)(L.Item,{ref:t,className:r,...e})}),Xo=(0,G.forwardRef)(({className:o,children:e,chevron:t=!0,...r},i)=>{let s=n("cocso-accordion-trigger",{},[],o);return(0,O.jsx)(L.Trigger,{ref:i,className:s,...r,children:(0,O.jsxs)(go.Slottable,{children:[e,t&&(0,O.jsx)("div",{className:"cocso-accordion-chevron",children:(0,O.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",children:(0,O.jsx)("path",{d:"m6 9 6 6 6-6"})})})]})})}),Yo=(0,G.forwardRef)(({className:o,...e},t)=>{let r=n("cocso-accordion-content",{},[],o);return(0,O.jsx)(L.Content,{ref:t,className:r,...e})}),oe=Object.assign(L.Root,{Item:Jo,Header:L.Header,Trigger:Xo,Content:Yo});var uo=f(require("react"),1),vo=require("@radix-ui/react-slot");function b(o){if(o)return o.includes(".")?`var(--color-${o.replace(/\./g,"-")})`:o}var Co={thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"};function y(o){if(o)return o in Co?Co[o]:o}var Po=require("react/jsx-runtime"),ee=uo.forwardRef(({asChild:o=!1,size:e="md",color:t,weight:r="normal",className:i,style:s,...m},c)=>{let l=n("cocso-body",{size:e},[],i);return(0,Po.jsx)(o?vo.Slot:"p",{ref:c,className:l,style:{"--cocso-body-color":b(t),"--cocso-body-weight":y(r),...s},...m})}),V=Object.assign(ee,{displayName:"Body"});var j=f(require("react"),1),bo=require("@radix-ui/react-slot");var Ro=f(require("react"),1);var A=require("react/jsx-runtime"),te=["div"],re=Ro.forwardRef(({as:o=te[0],size:e="md",color:t="palette.primary-500",bg:r="palette.gray-200",className:i,style:s,...m},c)=>{let p=o,d=n("cocso-spinner",{size:e},[],i);return(0,A.jsx)(p,{ref:c,className:d,style:{"--cocso-spinner-bg":b(r),"--cocso-spinner-color":b(t),...s},...m,children:(0,A.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,A.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"9",stroke:"var(--cocso-spinner-bg, currentColor)",strokeWidth:"3"}),(0,A.jsx)("path",{className:"opacity-75",fill:"var(--cocso-spinner-color, currentColor)",d:"M12 2a10 10 0 0110 10 10 10 0 01-5 8.66l-1-1.73a8 8 0 004-6.93 8 8 0 00-8-8V2z"})]})})}),io=Object.assign(re,{displayName:"Spinner"});var no=require("react/jsx-runtime"),ie=o=>({"2xs":"xs",xs:"xs",sm:"xs",md:"sm",lg:"md",xl:"md"})[o],ne=j.forwardRef(({asChild:o=!1,variant:e="primary",size:t="md",disabled:r=!1,loading:i=!1,color:s,weight:m="normal",className:c,style:p,children:l,onClick:d,onKeyDown:w,...D},z)=>{let R=r||i,x=j.useCallback(T=>{if(R){T.preventDefault();return}d?.(T)},[R,d]),Y=j.useCallback(T=>{(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),R||T.currentTarget.click()),w?.(T)},[R,w]),oo={variant:e,size:t,loading:i,disabled:R},eo=[...r?[{variant:e,disabled:r}]:[],...i?[{variant:e,loading:i}]:[]],to=n("cocso-button",oo,eo,c),ro={"--cocso-button-color":b(s),"--cocso-button-weight":y(m),...p};return(0,no.jsx)(o?bo.Slot:"button",{ref:z,className:to,onClick:x,onKeyDown:Y,role:"button",disabled:R,"aria-disabled":R,"aria-busy":i,style:ro,...D,children:i?(0,no.jsx)(io,{className:"cocso-button-spinner",size:ie(t),color:"currentColor"}):l})}),se=Object.assign(ne,{displayName:"Button"});var wo=f(require("react"),1),yo=require("@radix-ui/react-slot");var xo=require("react/jsx-runtime"),ae=wo.forwardRef(({asChild:o=!1,size:e="md",color:t,weight:r="bold",className:i,style:s,...m},c)=>{let l=n("cocso-display",{size:e},[],i);return(0,xo.jsx)(o?yo.Slot:"h1",{ref:c,className:l,style:{"--cocso-display-color":b(t),"--cocso-display-weight":y(r),...s},...m})}),ce=Object.assign(ae,{displayName:"Display"});var S=f(require("@radix-ui/react-dropdown-menu"),1),so=require("react");var ao=require("react/jsx-runtime"),me=(0,so.forwardRef)(({className:o,...e},t)=>{let r=n("cocso-dropdown-content",{},[],o);return(0,ao.jsx)(S.Content,{ref:t,className:r,...e})}),le=(0,so.forwardRef)(({className:o,...e},t)=>{let r=n("cocso-dropdown-item",{},[],o);return(0,ao.jsx)(S.Item,{ref:t,className:r,...e})}),pe=Object.assign(S.Root,{Trigger:S.Trigger,Portal:S.Portal,Content:me,Item:le});var Lo=f(require("react"),1),C=require("react");var No=f(require("react"),1),ko=require("@radix-ui/react-slot");var To=require("react/jsx-runtime"),de=No.forwardRef(({asChild:o=!1,size:e="md",color:t="text.basic",weight:r="normal",className:i,style:s,...m},c)=>{let l=n("cocso-label",{size:e},[],i);return(0,To.jsx)(o?ko.Slot:"label",{ref:c,className:l,style:{"--cocso-label-color":b(t),"--cocso-label-weight":y(r),...s},...m})}),W=Object.assign(de,{displayName:"Label"});var h=require("react/jsx-runtime"),fe=Lo.forwardRef(({maxFiles:o=2,files:e,onFilesChange:t,onRemove:r,multiple:i=!0,accept:s,...m},c)=>{let[p,l]=(0,C.useState)(!1),d=(0,C.useRef)(null),w=(0,C.useRef)(null),D=3*1024*1024,z=(0,C.useCallback)(a=>s?s.split(",").map(N=>N.trim()).some(N=>{if(N.endsWith("/*")){let Q=N.slice(0,-2);return a.type.startsWith(Q)}return a.type===N||a.name.toLowerCase().endsWith(N)}):!0,[s]),R=(0,C.useCallback)(a=>a.size>D?(alert(`${a.name}\uC740(\uB294) 3MB\uB97C \uCD08\uACFC\uD569\uB2C8\uB2E4.`),!1):!0,[]),x=(0,C.useCallback)(a=>{let N=Array.from(a).filter(B=>z(B)?R(B):(alert(`${B.name}\uC740(\uB294) \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uB294 \uD30C\uC77C \uD0C0\uC785\uC785\uB2C8\uB2E4.`),!1));if(N.length===0)return;let Q=o-e.length;if(Q<=0){alert(`\uCD5C\uB300 ${o}\uAC1C\uC758 \uD30C\uC77C\uB9CC \uC5C5\uB85C\uB4DC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.`);return}let jo=N.slice(0,Q).map(B=>({file:B,name:B.name,size:B.size}));t([...e,...jo])},[e,o,t,z,R]),Y=(0,C.useCallback)(a=>{a.preventDefault(),a.stopPropagation(),l(!0)},[]),oo=(0,C.useCallback)(a=>{a.preventDefault(),a.stopPropagation(),w.current&&!w.current.contains(a.relatedTarget)&&l(!1)},[]),eo=(0,C.useCallback)(a=>{a.preventDefault(),a.stopPropagation()},[]),to=(0,C.useCallback)(a=>{a.preventDefault(),a.stopPropagation(),l(!1);let{files:M}=a.dataTransfer;M&&x(M)},[x]),ro=(0,C.useCallback)(a=>{let{files:M}=a.target;M&&x(M)},[x]),po=(0,C.useCallback)(a=>{let M=e.filter(N=>N.name!==a);t(M),r?.(a)},[e,t,r]),T=(0,C.useCallback)(()=>{d.current?.click()},[]),fo=e.length>=o||!i&&e.length>=1;return(0,h.jsxs)("div",{className:"cocso-file-upload-wrapper",children:[!fo&&(0,h.jsxs)("div",{ref:w,onDragEnter:Y,onDragOver:eo,onDragLeave:oo,onDrop:to,onClick:T,className:"cocso-file-upload","data-drag-active":p,children:[(0,h.jsx)("input",{ref:a=>{d.current=a,typeof c=="function"?c(a):c&&(c.current=a)},type:"file",onChange:ro,multiple:i,accept:s,style:{display:"none"},...m}),(0,h.jsxs)(W,{size:"xs",color:"palette.gray-600",children:["\uD30C\uC77C\uC744 \uC5EC\uAE30\uC5D0 \uB04C\uC5B4\uB2E4 \uB193\uAC70\uB098, \uD074\uB9AD\uD558\uC5EC \uD30C\uC77C\uC744 \uC120\uD0DD\uD558\uC138\uC694",(0,h.jsx)("br",{}),"(\uCD5C\uB300 3MB)"]}),(0,h.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,h.jsx)("path",{d:"M5 12h14"}),(0,h.jsx)("path",{d:"M12 5v14"})]})]}),e.length>0&&(0,h.jsx)("div",{className:"cocso-file-upload-list",children:e.map(a=>(0,h.jsxs)("div",{className:"cocso-file-upload-item",children:[(0,h.jsx)(V,{size:"xs",children:a.name}),(0,h.jsx)("button",{type:"button",onClick:()=>po(a.name),className:"cocso-file-upload-remove",children:(0,h.jsxs)("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",children:[(0,h.jsx)("path",{d:"M18 6 6 18"}),(0,h.jsx)("path",{d:"m6 6 12 12"})]})})]},a.name))})]})}),he=Object.assign(fe,{displayName:"FileUpload"});var So=f(require("react"),1),Wo=require("@radix-ui/react-slot");var Do=require("react/jsx-runtime"),ge=So.forwardRef(({asChild:o=!1,size:e="md",color:t,weight:r="bold",className:i,style:s,...m},c)=>{let l=n("cocso-heading",{size:e},[],i);return(0,Do.jsx)(o?Wo.Slot:"h2",{ref:c,className:l,style:{"--cocso-heading-color":b(t),"--cocso-heading-weight":y(r),...s},...m})}),co=Object.assign(ge,{displayName:"Heading"});var Mo=f(require("react"),1),Oo=require("@radix-ui/react-slot");var Fo=require("react/jsx-runtime"),Ce=Mo.forwardRef(({asChild:o=!1,size:e="md",weight:t="normal",indicator:r=!0,className:i,style:s,...m},c)=>{let l=n("cocso-link",{size:e,indicator:r},[],i);return(0,Fo.jsx)(o?Oo.Slot:"a",{ref:c,className:l,style:{"--cocso-link-weight":y(t),...s},...m})}),ue=Object.assign(Ce,{displayName:"Link"});var u=f(require("@radix-ui/react-dialog"),1),Z=require("react");var P=require("react/jsx-runtime"),ve=(0,Z.forwardRef)(({className:o,children:e,...t},r)=>{let i=n("cocso-modal-content",{},[],o);return(0,P.jsxs)(u.Portal,{children:[(0,P.jsx)(u.Overlay,{className:"cocso-modal-overlay"}),(0,P.jsx)(u.Content,{ref:r,className:i,...t,children:e})]})}),Pe=(0,Z.forwardRef)(({className:o,children:e,...t},r)=>{let i=n("cocso-modal-close-wrapper",{},[],o);return(0,P.jsx)("div",{className:i,...t,children:(0,P.jsx)(u.Close,{className:"cocso-modal-close",children:(0,P.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,P.jsx)("path",{d:"M18 6 6 18"}),(0,P.jsx)("path",{d:"m6 6 12 12"})]})})})}),Re=(0,Z.forwardRef)(({className:o,children:e,...t},r)=>{let i=n("cocso-modal-title",{},[],o);return(0,P.jsx)(u.Title,{ref:r,className:i,asChild:!0,...t,children:(0,P.jsx)(co,{color:"text.basic",children:e})})}),be=(0,Z.forwardRef)(({className:o,children:e,...t},r)=>{let i=n("cocso-modal-description",{},[],o);return(0,P.jsx)(u.Description,{ref:r,className:i,asChild:!0,...t,children:(0,P.jsx)(V,{size:"sm",color:"text.subtle",children:e})})}),we=Object.assign(u.Root,{Trigger:u.Trigger,Content:ve,Close:Pe,Title:Re,Description:be});var K=f(require("@radix-ui/react-one-time-password-field"),1),mo=require("react");var lo=require("react/jsx-runtime"),ye=(0,mo.forwardRef)(({className:o,...e},t)=>{let r=n("cocso-otp",{},[],o);return(0,lo.jsx)(K.Root,{ref:t,className:r,...e})}),xe=(0,mo.forwardRef)(({className:o,...e},t)=>{let r=n("cocso-otp-input",{},[],o);return(0,lo.jsx)(K.Input,{ref:t,className:r,...e})}),Ne=Object.assign(ye,{Input:xe});var Ho=f(require("react"),1);var v=require("react/jsx-runtime"),ke=Ho.forwardRef(({className:o,page:e,totalPages:t,maxVisible:r=5,onChange:i,...s},m)=>{let c=Math.ceil(r/2),p=d=>(0,v.jsx)("button",{className:"cocso-pagination-item",onClick:()=>i(d),"data-active":e===d,children:d},d),l=n("cocso-pagination",{},[],o);return(0,v.jsxs)("div",{ref:m,className:l,...s,children:[t>1&&(0,v.jsx)("button",{className:"cocso-pagination-arrow",disabled:e===1,onClick:()=>e>1&&i(e-1),children:(0,v.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",children:(0,v.jsx)("path",{d:"m15 18-6-6 6-6"})})}),t<=r+2?Array(t).fill(0).map((d,w)=>p(w+1)):(0,v.jsxs)(v.Fragment,{children:[p(1),e>1+c&&(0,v.jsx)("span",{className:"cocso-pagination-trunc",children:"..."}),Array(r).fill(0).map((d,w)=>{let D=e-c+w+1;return D>1&&D<t?p(D):""}),e<t-c&&(0,v.jsx)("span",{className:"cocso-pagination-trunc",children:"..."}),p(t)]}),t>1&&(0,v.jsx)("button",{className:"cocso-pagination-arrow",disabled:e===t,onClick:()=>e<t&&i(e+1),children:(0,v.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",children:(0,v.jsx)("path",{d:"m9 18 6-6-6-6"})})})]})}),Te=Object.assign(ke,{displayName:"Pagination"});var F=f(require("@radix-ui/react-popover"),1),Bo=require("react");var Eo=require("react/jsx-runtime"),Le=(0,Bo.forwardRef)(({className:o,...e},t)=>{let r=n("cocso-popover-content",{},[],o);return(0,Eo.jsx)(F.Content,{ref:t,className:r,...e})}),Se=Object.assign(F.Root,{Trigger:F.Trigger,Portal:F.Portal,Content:Le});var Io=f(require("react"),1),q=f(require("@radix-ui/react-checkbox"),1);var k=require("react/jsx-runtime"),We=Io.forwardRef(({id:o,size:e="md",status:t,onChange:r,label:i,disabled:s=!1,className:m,...c},p)=>{let l={size:e,disabled:s,status:t},d=[...s?[{status:t,disabled:s}]:[]],w=n("cocso-checkbox",l,d,m),D=R=>{if(!s){let x;R===!0?x="on":R==="indeterminate"?x="intermediate":x="off",r(x)}};return(0,k.jsxs)("div",{className:"cocso-checkbox-wrapper",children:[(0,k.jsxs)(q.Root,{ref:p,id:o,className:w,checked:(()=>{switch(t){case"on":return!0;case"intermediate":return"indeterminate";case"off":default:return!1}})(),onCheckedChange:D,disabled:s,...c,children:[(0,k.jsx)(q.Indicator,{className:"cocso-checkbox-indicator",style:{opacity:t==="on"?1:0},children:(0,k.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",children:(0,k.jsx)("path",{d:"M20 6 9 17l-5-5"})})}),(0,k.jsx)("div",{className:"cocso-checkbox-indicator",style:{opacity:t==="intermediate"?1:0},children:(0,k.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:(0,k.jsx)("path",{d:"M5 12h14"})})})]}),i&&(0,k.jsx)(W,{className:n("cocso-checkbox-label",{disabled:s}),size:e,htmlFor:o,children:i})]})}),De=Object.assign(We,{displayName:"Checkbox"});var Ao=f(require("react"),1);var g=require("react/jsx-runtime"),Me=Ao.forwardRef(({quantity:o,className:e,onChange:t,...r},i)=>{let s=n("cocso-stock-quantity-status",{},[],e);return(0,g.jsxs)("div",{ref:i,className:s,"data-status":o,...r,children:[(0,g.jsx)("span",{className:"cocso-stock-quantity-status-indicator",children:o==="\uC5EC\uC720"?(0,g.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,g.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,g.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,g.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"})]}):o==="\uBCF4\uD1B5"?(0,g.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,g.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,g.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,g.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,g.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,g.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,g.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,g.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,g.jsx)(W,{size:"sm",color:"currentColor",children:o})]})}),Oe=Object.assign(Me,{displayName:"StockQuantityStatus"});var zo=f(require("react"),1),J=f(require("@radix-ui/react-switch"),1);var E=require("react/jsx-runtime"),Fe=zo.forwardRef(({id:o,size:e="md",disabled:t=!1,label:r,position:i="right",className:s,children:m,...c},p)=>{let l=n("cocso-switch",{size:e,disabled:t},[],s),d=n("cocso-switch-thumb",{size:e});return(0,E.jsxs)("div",{className:"cocso-switch-wrapper",children:[i==="left"&&(0,E.jsx)(W,{size:e,htmlFor:o,children:r}),(0,E.jsx)(J.Root,{ref:p,className:l,...c,children:(0,E.jsx)(J.Thumb,{className:d})}),i==="right"&&(0,E.jsx)(W,{size:e,htmlFor:o,children:r})]})}),He=Object.assign(Fe,{displayName:"Switch"});var H=f(require("@radix-ui/react-tabs"),1),$=require("react");var _=require("react/jsx-runtime"),Be=(0,$.forwardRef)(({className:o,...e},t)=>{let r=n("cocso-tab",{},[],o);return(0,_.jsx)(H.Root,{ref:t,className:r,...e})}),Ee=(0,$.forwardRef)(({className:o,...e},t)=>{let r=n("cocso-tab-list",{},[],o);return(0,_.jsx)(H.List,{ref:t,className:r,...e})}),Ie=(0,$.forwardRef)(({className:o,...e},t)=>{let r=n("cocso-tab-trigger",{},[],o);return(0,_.jsx)(H.Trigger,{ref:t,className:r,...e})}),Ae=(0,$.forwardRef)(({className:o,...e},t)=>{let r=n("cocso-tab-content",{},[],o);return(0,_.jsx)(H.Content,{ref:t,className:r,...e})}),ze=Object.assign(Be,{List:Ee,Trigger:Ie,Content:Ae});var X=require("sonner"),Ve=Object.assign(X.Toaster,{displayName:"Toast"});var Vo=f(require("react"),1);var I=require("react/jsx-runtime"),je=Vo.forwardRef(({size:o="md",disabled:e=!1,className:t,style:r,children:i,...s},m)=>{let c=n("cocso-select",{size:o,disabled:e},[],t);return(0,I.jsxs)("div",{className:"cocso-select-wrapper",children:[(0,I.jsx)("select",{ref:m,className:c,disabled:e,...s,children:i}),(0,I.jsx)("i",{className:"cocso-select-icon",children:(0,I.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,I.jsx)("path",{d:"m6 9 6 6 6-6"})})})]})}),Ze=Object.assign(je,{displayName:"Select"});
|
|
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");
|
package/lib/index.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.C,.c{overflow:hidden}.c[data-state=open]{animation:g .3s cubic-bezier(.87,0,.13,1)}.c[data-state=closed]{animation:b .3s cubic-bezier(.87,0,.13,1)}.s{display:flex;justify-content:space-between;width:100%;cursor:pointer}.d{display:inline-block;width:var(--number-10);height:var(--number-10);transition:transform .2s ease-in-out}.s[data-state=closed]>.d{transform:rotate(0)}.s[data-state=open]>.d{transform:rotate(180deg)}@keyframes b{0%{height:var(--radix-accordion-content-height)}to{height:0}}@keyframes g{0%{height:0}to{height:var(--radix-accordion-content-height)}}.i{color:var(--cocso-typography-font-color);font-size:var(--cocso-typography-font-size);font-weight:var(--cocso-typography-font-weight);line-height:var(--cocso-typography-line-height);--cocso-typography-font-color: inherit;--cocso-typography-font-size: inherit;--cocso-typography-font-weight: inherit;--cocso-typography-line-height: inherit}.i[aria-disabled=true]{cursor:not-allowed;opacity:.4}@media (min-width: 768px){.i{font-size:var(--cocso-tablet-typography-font-size, var(--cocso-typography-font-size))}}@media (min-width: 1024px){.i{font-size:var(--cocso-desktop-typography-font-size, var(--cocso-tablet-typography-font-size, var(--cocso-typography-font-size)))}}@keyframes u{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.D{position:relative;display:inline-block;width:var(--cocso-spinner-size);height:var(--cocso-spinner-size);border:var(--cocso-spinner-border-width) solid var(--cocso-spinner-bg-color);border-top-color:var(--cocso-spinner-border-color);border-radius:50%;animation:u .75s linear infinite;transform-origin:center center;--cocso-spinner-size: inherit;--cocso-spinner-border-width: inherit;--cocso-spinner-border-color: inherit;--cocso-spinner-bg-color: inherit}.l{position:relative;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;opacity:1;transition:background-color .15s ease-in-out;transform:translateZ(0);height:var(--cocso-button-height);padding-inline:var(--cocso-button-padding-inline);color:var(--cocso-button-font-color);font-size:var(--cocso-button-font-size);font-weight:var(--cocso-button-font-weight);border:var(--cocso-button-border);border-radius:var(--cocso-button-border-radius);background-color:var(--cocso-button-bg-color);--cocso-button-height: inherit;--cocso-button-padding-inline: inherit;--cocso-button-font-color: inherit;--cocso-button-font-size: inherit;--cocso-button-font-weight: inherit;--cocso-button-border: inherit;--cocso-button-border-radius: inherit;--cocso-button-bg-color: inherit}.l:not(.h):hover{background-color:var(--cocso-button-bg-color-hover);--cocso-button-bg-color-hover: inherit}.l:not(.h):active{background-color:var(--cocso-button-bg-color-active);--cocso-button-bg-color-active: inherit}.E{padding:0 6px}.F{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;min-width:20px;margin-right:2px}.G{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;min-width:20px;margin-left:2px}.h{opacity:.4;cursor:not-allowed}.H{aspect-ratio:1/1;padding:0}.I{display:flex;align-items:center;gap:var(--number-5)}.r{position:relative;display:inline-flex;align-items:center;justify-content:center;width:var(--cocso-checkbox-size);height:var(--cocso-checkbox-size);color:var(--cocso-checkbox-color);cursor:pointer;border:1px solid var(--cocso-checkbox-border-color);border-radius:4px;background-color:var(--cocso-checkbox-bg-color);opacity:1;transition:color .15s ease-in-out,border-color .15s ease-in-out,background-color .15s ease-in-out;--cocso-checkbox-size: inherit;--cocso-checkbox-color: inherit;--cocso-checkbox-border-color: inherit;--cocso-checkbox-bg-color: inherit}.r>svg{display:block;max-width:100%;height:auto;transition:stroke .15s ease-in-out;stroke:var(--cocso-checkbox-color)}.r input[type=checkbox]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.J{position:absolute;top:var(--number-1);right:var(--number-1);bottom:var(--number-1);left:var(--number-1);transition:opacity .15s ease-in-out}.v{opacity:1;cursor:pointer}.r[disabled],.v[aria-disabled=true]{opacity:.5;cursor:not-allowed}@keyframes f{0%{opacity:0;transform:translateY(2px)}to{opacity:1;transform:translateY(0)}}@keyframes m{0%{opacity:0;transform:translateY(-2px)}to{opacity:1;transform:translateY(0)}}.p{display:flex;flex-direction:column;border-radius:var(--ds-spacing-3);background-color:var(--color-background-white);will-change:transform,opacity;z-index:var(--z-index-overlay);box-shadow:var(--shadow-1)}.p[data-side=top]{animation:f .4s cubic-bezier(.16,1,.3,1)}.p[data-side=bottom]{animation:m .4s cubic-bezier(.16,1,.3,1)}.K{display:flex;flex-direction:column}.y{display:inline-flex;align-items:center;justify-content:center;width:fit-content;text-decoration:none;cursor:pointer;gap:var(--ds-spacing-2);transition:color .15s ease-in-out}.y>svg{width:var(--ds-spacing-8);height:var(--ds-spacing-8);flex-shrink:0}.L{text-decoration:underline}@keyframes w{0%{opacity:0}to{opacity:1}}.M{position:fixed;inset:0;background-color:var(--ds-black-alpha-30);animation:w .15s cubic-bezier(.16,1,.3,1);z-index:var(--z-index-overlay)}@keyframes x{0%{opacity:0;transform:translate(-50%,-48%) scale(.98)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}.N{position:fixed;display:flex;flex-direction:column;top:50%;left:50%;transform:translate(-50%,-50%);width:90vw;max-width:420px;max-height:85vh;padding:var(--number-8);border-radius:8px;background-color:var(--ds-white);animation:x .15s cubic-bezier(.16,1,.3,1);z-index:var(--z-index-modal)}.O{display:flex;justify-content:center;align-items:center;width:var(--ds-spacing-10);height:var(--ds-spacing-10);cursor:pointer}.P{text-align:center;word-break:keep-all}.Q{margin-top:var(--ds-spacing-5);text-align:center}.R{display:flex;align-items:center;gap:var(--ds-spacing-5)}.a{flex:1;display:inline-flex;justify-content:center;align-items:center;width:100%;height:100%;color:var(--ds-neutral-950);font-size:16px;font-weight:500;text-align:center;text-transform:uppercase;line-height:var(--letter-spacing-1);outline:none;border:none;border-radius:var(--ds-spacing-2);background-color:var(--ds-neutral-50);box-shadow:0 0 0 var(--ds-spacing-1, 1px) var(--ds-neutral-50);transition:background-color .15s ease-in-out,box-shadow .15s ease-in-out}.a:hover{box-shadow:0 0 0 var(--ds-spacing-1, 1px) var(--ds-neutral-200)}.a:focus{box-shadow:0 0 0 var(--number-1, 1px) var(--color-palette-gray-200)}.a::selection{background-color:var(--color-palette-gray-400)}.S{display:flex;align-items:center;justify-content:center;margin-inline:auto;gap:var(--ds-spacing-2)}.o,.e{display:inline-flex;align-items:center;justify-content:center;width:var(--ds-spacing-13);height:var(--ds-spacing-13);color:var(--cocso-pagination-font-color);font-size:16px;font-weight:var(--cocso-pagination-font-weight);cursor:pointer;border-radius:var(--ds-spacing-4);background-color:var(--cocso-pagination-bg-color);transition:background-color .15s ease-in-out;--cocso-pagination-font-color: var(--ds-neutral-950);--cocso-pagination-font-weight: inherit;--cocso-pagination-bg-color: inherit}.o:disabled{opacity:.4;cursor:not-allowed}.o:not([disabled]):hover{--cocso-pagination-bg-color: var(--ds-neutral-50)}.o:not([disabled]):active{--cocso-pagination-bg-color: var(--ds-neutral-100)}.o>svg{width:var(--ds-spacing-8);height:var(--ds-spacing-8);flex-shrink:0}.e[data-active=true]{--cocso-pagination-font-color: var(--ds-white);--cocso-pagination-bg-color: var(--ds-primary-500);--cocso-pagination-font-weight: 600}.e[data-active=false]:hover{--cocso-pagination-bg-color: var(--ds-neutral-50)}.e[data-active=false]:active{--cocso-pagination-bg-color: var(--ds-neutral-100)}.T{display:inline-flex;align-items:center;justify-content:center;width:var(--ds-spacing-13);height:var(--ds-spacing-13);color:var(--ds-neutral-950);font-size:16px}@keyframes k{0%{opacity:0;transform:translateY(2px)}to{opacity:1;transform:translateY(0)}}@keyframes z{0%{opacity:0;transform:translate(-2px)}to{opacity:1;transform:translate(0)}}@keyframes j{0%{opacity:0;transform:translateY(-2px)}to{opacity:1;transform:translateY(0)}}@keyframes Y{0%{opacity:0;transform:translate(2px)}to{opacity:1;transform:translate(0)}}.t{padding-block:var(--ds-spacing-6);padding-inline:var(--ds-spacing-8);border:1px solid var(--ds-neutral-100);border-radius:var(--ds-spacing-4);background-color:var(--ds-white);animation-duration:.4s;animation-timing-function:cubic-bezier(.16,1,.3,1);will-change:transform,opacity;box-shadow:var(--shadow-3)}.t[data-state=open][data-side=top]{animation-name:j}.t[data-state=open][data-side=right]{animation-name:Y}.t[data-state=open][data-side=bottom]{animation-name:k}.t[data-state=open][data-side=left]{animation-name:z}.U{position:relative;width:fit-content;cursor:pointer}.X{min-width:var(--cocso-select-min-width);height:var(--cocso-select-height);padding-left:var(--cocso-select-padding-left);padding-right:var(--cocso-select-padding-right);color:var(--color-text-basic);font-size:var(--cocso-select-font-size);border:1px solid var(--color-border-gray-light);border-radius:var(--cocso-select-border-radius);background-color:var(--cocso-select-bg-color);appearance:none;-o-appearance:none;-moz-appearance:none;-webkit-appearance:none;--cocso-select-min-width: inherit;--cocso-select-height: inherit;--cocso-select-padding-left: inherit;--cocso-select-padding-right: inherit;--cocso-select-font-size: inherit;--cocso-select-border-radius: inherit;--cocso-select-bg-color: var(--ds-white)}.X[disabled]{cursor:not-allowed}.q{position:absolute;top:50%;right:var(--ds-spacing-5);transform:translateY(-50%);pointer-events:none;color:var(--color-text-disabled)}.q[disabled]{cursor:not-allowed}.V{display:inline-flex;align-items:center;gap:var(--ds-spacing-2);color:var(--cocso-stock-quantity-status-color);--cocso-stock-quantity-status-color: inherit}.Z{width:var(--cocso-stock-quantity-status-indicator-width);height:auto;flex-shrink:0;--cocso-stock-quantity-status-indicator-width: inherit}.Z>svg{width:100%;height:100%}.A{display:flex;align-items:center;gap:var(--ds-spacing-5)}.A[aria-disabled=true]{cursor:not-allowed;opacity:.4}.n{position:relative;width:var(--cocso-switch-width);height:var(--cocso-switch-height);cursor:pointer;border-radius:var(--ds-spacing-max);background-color:var(--cocso-switch-bg-color);opacity:1;--cocso-switch-width: inherit;--cocso-switch-height: inherit;--cocso-switch-bg-color: inherit}.n[disabled],.n[data-disabled=true]{cursor:not-allowed;opacity:.4}.n[data-state=checked]{--cocso-switch-bg-color: var(--ds-primary-500)}.B{display:block;width:var(--cocso-switch-thumb-width);height:var(--cocso-switch-thumb-width);border-radius:var(--ds-spacing-max);background-color:var(--color-background-white);transform:translate(var(--ds-spacing-2));transition:transform .15s ease;will-change:transform;--cocso-switch-thumb-width: inherit;--cocso-switch-thumb-height: inherit}.B[data-state=checked]{transform:translate(calc(var(--cocso-switch-width) - var(--cocso-switch-thumb-width) - var(--ds-spacing-2)))}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './
|
|
6
|
-
export * from './
|
|
7
|
-
export * from './
|
|
8
|
-
export * from './
|
|
9
|
-
export * from './
|
|
10
|
-
export * from './
|
|
11
|
-
export * from './
|
|
12
|
-
export * from './
|
|
13
|
-
export * from './
|
|
14
|
-
export * from './
|
|
15
|
-
export * from './
|
|
16
|
-
export * from './
|
|
17
|
-
export * from './
|
|
18
|
-
export * from './
|
|
19
|
-
export * from './
|
|
20
|
-
export * from './
|
|
1
|
+
export * from './accordion';
|
|
2
|
+
export * from './body';
|
|
3
|
+
export * from './button';
|
|
4
|
+
export * from './checkbox';
|
|
5
|
+
export * from './display';
|
|
6
|
+
export * from './dropdown';
|
|
7
|
+
export * from './heading';
|
|
8
|
+
export * from './link';
|
|
9
|
+
export * from './modal';
|
|
10
|
+
export * from './one-time-password-field';
|
|
11
|
+
export * from './pagination';
|
|
12
|
+
export * from './popover';
|
|
13
|
+
export * from './select';
|
|
14
|
+
export * from './spinner';
|
|
15
|
+
export * from './stock-quantity-status';
|
|
16
|
+
export * from './switch';
|
|
17
|
+
export * from './tab';
|
|
18
|
+
export * from './toast';
|
|
19
|
+
export * from './token';
|
|
20
|
+
export * from './typography';
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as w from"@radix-ui/react-accordion";import{forwardRef as eo}from"react";var Do=(...e)=>e.filter(Boolean).join(" ").trim(),i=(e,o,t=[],...r)=>{let n=Object.entries(o).filter(([,m])=>m!==!1&&m!==null&&m!==void 0).map(([m,c])=>`${e}--${m}_${c}`).join(" "),s=t.filter(m=>Object.entries(m).every(([c,p])=>o[c]===p)).map(m=>{let c=Object.entries(m).map(([p,l])=>`${p}_${l}`).join("-");return`${e}--${c}`}).join(" ");return Do(e,n,s,...r)};import{Slottable as Mo}from"@radix-ui/react-slot";import{jsx as H,jsxs as Bo}from"react/jsx-runtime";var Oo=eo(({className:e,...o},t)=>{let r=i("cocso-accordion-item",{},[],e);return H(w.Item,{ref:t,className:r,...o})}),Fo=eo(({className:e,children:o,chevron:t=!0,...r},n)=>{let s=i("cocso-accordion-trigger",{},[],e);return H(w.Trigger,{ref:n,className:s,...r,children:Bo(Mo,{children:[o,t&&H("div",{className:"cocso-accordion-chevron",children:H("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",children:H("path",{d:"m6 9 6 6 6-6"})})})]})})}),Ho=eo(({className:e,...o},t)=>{let r=i("cocso-accordion-content",{},[],e);return H(w.Content,{ref:t,className:r,...o})}),Be=Object.assign(w.Root,{Item:Oo,Header:w.Header,Trigger:Fo,Content:Ho});import*as so from"react";import{Slot as Eo}from"@radix-ui/react-slot";function g(e){if(e)return e.includes(".")?`var(--color-${e.replace(/\./g,"-")})`:e}var no={thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"};function u(e){if(e)return e in no?no[e]:e}import{jsx as Ao}from"react/jsx-runtime";var Io=so.forwardRef(({asChild:e=!1,size:o="md",color:t,weight:r="normal",className:n,style:s,...m},c)=>{let l=i("cocso-body",{size:o},[],n);return Ao(e?Eo:"p",{ref:c,className:l,style:{"--cocso-body-color":g(t),"--cocso-body-weight":u(r),...s},...m})}),z=Object.assign(Io,{displayName:"Body"});import*as I from"react";import{Slot as Zo}from"@radix-ui/react-slot";import*as ao from"react";import{jsx as to,jsxs as jo}from"react/jsx-runtime";var zo=["div"],Vo=ao.forwardRef(({as:e=zo[0],size:o="md",color:t="palette.primary-500",bg:r="palette.gray-200",className:n,style:s,...m},c)=>{let p=e,d=i("cocso-spinner",{size:o},[],n);return to(p,{ref:c,className:d,style:{"--cocso-spinner-bg":g(r),"--cocso-spinner-color":g(t),...s},...m,children:jo("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[to("circle",{className:"opacity-25",cx:"12",cy:"12",r:"9",stroke:"var(--cocso-spinner-bg, currentColor)",strokeWidth:"3"}),to("path",{className:"opacity-75",fill:"var(--cocso-spinner-color, currentColor)",d:"M12 2a10 10 0 0110 10 10 10 0 01-5 8.66l-1-1.73a8 8 0 004-6.93 8 8 0 00-8-8V2z"})]})})}),co=Object.assign(Vo,{displayName:"Spinner"});import{jsx as mo}from"react/jsx-runtime";var $o=e=>({"2xs":"xs",xs:"xs",sm:"xs",md:"sm",lg:"md",xl:"md"})[e],_o=I.forwardRef(({asChild:e=!1,variant:o="primary",size:t="md",disabled:r=!1,loading:n=!1,color:s,weight:m="normal",className:c,style:p,children:l,onClick:d,onKeyDown:C,...k},E)=>{let h=r||n,v=I.useCallback(b=>{if(h){b.preventDefault();return}d?.(b)},[h,d]),q=I.useCallback(b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),h||b.currentTarget.click()),C?.(b)},[h,C]),J={variant:o,size:t,loading:n,disabled:h},X=[...r?[{variant:o,disabled:r}]:[],...n?[{variant:o,loading:n}]:[]],Y=i("cocso-button",J,X,c),oo={"--cocso-button-color":g(s),"--cocso-button-weight":u(m),...p};return mo(e?Zo:"button",{ref:E,className:Y,onClick:v,onKeyDown:q,role:"button",disabled:h,"aria-disabled":h,"aria-busy":n,style:oo,...k,children:n?mo(co,{className:"cocso-button-spinner",size:$o(t),color:"currentColor"}):l})}),nt=Object.assign(_o,{displayName:"Button"});import*as lo from"react";import{Slot as Qo}from"@radix-ui/react-slot";import{jsx as Go}from"react/jsx-runtime";var Uo=lo.forwardRef(({asChild:e=!1,size:o="md",color:t,weight:r="bold",className:n,style:s,...m},c)=>{let l=i("cocso-display",{size:o},[],n);return Go(e?Qo:"h1",{ref:c,className:l,style:{"--cocso-display-color":g(t),"--cocso-display-weight":u(r),...s},...m})}),ft=Object.assign(Uo,{displayName:"Display"});import*as y from"@radix-ui/react-dropdown-menu";import{forwardRef as po}from"react";import{jsx as fo}from"react/jsx-runtime";var Ko=po(({className:e,...o},t)=>{let r=i("cocso-dropdown-content",{},[],e);return fo(y.Content,{ref:t,className:r,...o})}),qo=po(({className:e,...o},t)=>{let r=i("cocso-dropdown-item",{},[],e);return fo(y.Item,{ref:t,className:r,...o})}),wt=Object.assign(y.Root,{Trigger:y.Trigger,Portal:y.Portal,Content:Ko,Item:qo});import*as Co from"react";import{useRef as go,useState as oe,useCallback as x}from"react";import*as ho from"react";import{Slot as Jo}from"@radix-ui/react-slot";import{jsx as Yo}from"react/jsx-runtime";var Xo=ho.forwardRef(({asChild:e=!1,size:o="md",color:t="text.basic",weight:r="normal",className:n,style:s,...m},c)=>{let l=i("cocso-label",{size:o},[],n);return Yo(e?Jo:"label",{ref:c,className:l,style:{"--cocso-label-color":g(t),"--cocso-label-weight":u(r),...s},...m})}),L=Object.assign(Xo,{displayName:"Label"});import{jsx as S,jsxs as B}from"react/jsx-runtime";var ee=Co.forwardRef(({maxFiles:e=2,files:o,onFilesChange:t,onRemove:r,multiple:n=!0,accept:s,...m},c)=>{let[p,l]=oe(!1),d=go(null),C=go(null),k=3*1024*1024,E=x(a=>s?s.split(",").map(P=>P.trim()).some(P=>{if(P.endsWith("/*")){let A=P.slice(0,-2);return a.type.startsWith(A)}return a.type===P||a.name.toLowerCase().endsWith(P)}):!0,[s]),h=x(a=>a.size>k?(alert(`${a.name}\uC740(\uB294) 3MB\uB97C \uCD08\uACFC\uD569\uB2C8\uB2E4.`),!1):!0,[]),v=x(a=>{let P=Array.from(a).filter(O=>E(O)?h(O):(alert(`${O.name}\uC740(\uB294) \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uB294 \uD30C\uC77C \uD0C0\uC785\uC785\uB2C8\uB2E4.`),!1));if(P.length===0)return;let A=e-o.length;if(A<=0){alert(`\uCD5C\uB300 ${e}\uAC1C\uC758 \uD30C\uC77C\uB9CC \uC5C5\uB85C\uB4DC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.`);return}let Wo=P.slice(0,A).map(O=>({file:O,name:O.name,size:O.size}));t([...o,...Wo])},[o,e,t,E,h]),q=x(a=>{a.preventDefault(),a.stopPropagation(),l(!0)},[]),J=x(a=>{a.preventDefault(),a.stopPropagation(),C.current&&!C.current.contains(a.relatedTarget)&&l(!1)},[]),X=x(a=>{a.preventDefault(),a.stopPropagation()},[]),Y=x(a=>{a.preventDefault(),a.stopPropagation(),l(!1);let{files:T}=a.dataTransfer;T&&v(T)},[v]),oo=x(a=>{let{files:T}=a.target;T&&v(T)},[v]),ro=x(a=>{let T=o.filter(P=>P.name!==a);t(T),r?.(a)},[o,t,r]),b=x(()=>{d.current?.click()},[]),io=o.length>=e||!n&&o.length>=1;return B("div",{className:"cocso-file-upload-wrapper",children:[!io&&B("div",{ref:C,onDragEnter:q,onDragOver:X,onDragLeave:J,onDrop:Y,onClick:b,className:"cocso-file-upload","data-drag-active":p,children:[S("input",{ref:a=>{d.current=a,typeof c=="function"?c(a):c&&(c.current=a)},type:"file",onChange:oo,multiple:n,accept:s,style:{display:"none"},...m}),B(L,{size:"xs",color:"palette.gray-600",children:["\uD30C\uC77C\uC744 \uC5EC\uAE30\uC5D0 \uB04C\uC5B4\uB2E4 \uB193\uAC70\uB098, \uD074\uB9AD\uD558\uC5EC \uD30C\uC77C\uC744 \uC120\uD0DD\uD558\uC138\uC694",S("br",{}),"(\uCD5C\uB300 3MB)"]}),B("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[S("path",{d:"M5 12h14"}),S("path",{d:"M12 5v14"})]})]}),o.length>0&&S("div",{className:"cocso-file-upload-list",children:o.map(a=>B("div",{className:"cocso-file-upload-item",children:[S(z,{size:"xs",children:a.name}),S("button",{type:"button",onClick:()=>ro(a.name),className:"cocso-file-upload-remove",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",children:[S("path",{d:"M18 6 6 18"}),S("path",{d:"m6 6 12 12"})]})})]},a.name))})]})}),Et=Object.assign(ee,{displayName:"FileUpload"});import*as uo from"react";import{Slot as te}from"@radix-ui/react-slot";import{jsx as ie}from"react/jsx-runtime";var re=uo.forwardRef(({asChild:e=!1,size:o="md",color:t,weight:r="bold",className:n,style:s,...m},c)=>{let l=i("cocso-heading",{size:o},[],n);return ie(e?te:"h2",{ref:c,className:l,style:{"--cocso-heading-color":g(t),"--cocso-heading-weight":u(r),...s},...m})}),vo=Object.assign(re,{displayName:"Heading"});import*as Po from"react";import{Slot as ne}from"@radix-ui/react-slot";import{jsx as ae}from"react/jsx-runtime";var se=Po.forwardRef(({asChild:e=!1,size:o="md",weight:t="normal",indicator:r=!0,className:n,style:s,...m},c)=>{let l=i("cocso-link",{size:o,indicator:r},[],n);return ae(e?ne:"a",{ref:c,className:l,style:{"--cocso-link-weight":u(t),...s},...m})}),Xt=Object.assign(se,{displayName:"Link"});import*as f from"@radix-ui/react-dialog";import{forwardRef as V}from"react";import{jsx as N,jsxs as Ro}from"react/jsx-runtime";var ce=V(({className:e,children:o,...t},r)=>{let n=i("cocso-modal-content",{},[],e);return Ro(f.Portal,{children:[N(f.Overlay,{className:"cocso-modal-overlay"}),N(f.Content,{ref:r,className:n,...t,children:o})]})}),me=V(({className:e,children:o,...t},r)=>{let n=i("cocso-modal-close-wrapper",{},[],e);return N("div",{className:n,...t,children:N(f.Close,{className:"cocso-modal-close",children:Ro("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[N("path",{d:"M18 6 6 18"}),N("path",{d:"m6 6 12 12"})]})})})}),le=V(({className:e,children:o,...t},r)=>{let n=i("cocso-modal-title",{},[],e);return N(f.Title,{ref:r,className:n,asChild:!0,...t,children:N(vo,{color:"text.basic",children:o})})}),pe=V(({className:e,children:o,...t},r)=>{let n=i("cocso-modal-description",{},[],e);return N(f.Description,{ref:r,className:n,asChild:!0,...t,children:N(z,{size:"sm",color:"text.subtle",children:o})})}),mr=Object.assign(f.Root,{Trigger:f.Trigger,Content:ce,Close:me,Title:le,Description:pe});import*as j from"@radix-ui/react-one-time-password-field";import{forwardRef as bo}from"react";import{jsx as wo}from"react/jsx-runtime";var de=bo(({className:e,...o},t)=>{let r=i("cocso-otp",{},[],e);return wo(j.Root,{ref:t,className:r,...o})}),fe=bo(({className:e,...o},t)=>{let r=i("cocso-otp-input",{},[],e);return wo(j.Input,{ref:t,className:r,...o})}),vr=Object.assign(de,{Input:fe});import*as xo from"react";import{Fragment as ge,jsx as W,jsxs as yo}from"react/jsx-runtime";var he=xo.forwardRef(({className:e,page:o,totalPages:t,maxVisible:r=5,onChange:n,...s},m)=>{let c=Math.ceil(r/2),p=d=>W("button",{className:"cocso-pagination-item",onClick:()=>n(d),"data-active":o===d,children:d},d),l=i("cocso-pagination",{},[],e);return yo("div",{ref:m,className:l,...s,children:[t>1&&W("button",{className:"cocso-pagination-arrow",disabled:o===1,onClick:()=>o>1&&n(o-1),children:W("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",children:W("path",{d:"m15 18-6-6 6-6"})})}),t<=r+2?Array(t).fill(0).map((d,C)=>p(C+1)):yo(ge,{children:[p(1),o>1+c&&W("span",{className:"cocso-pagination-trunc",children:"..."}),Array(r).fill(0).map((d,C)=>{let k=o-c+C+1;return k>1&&k<t?p(k):""}),o<t-c&&W("span",{className:"cocso-pagination-trunc",children:"..."}),p(t)]}),t>1&&W("button",{className:"cocso-pagination-arrow",disabled:o===t,onClick:()=>o<t&&n(o+1),children:W("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",children:W("path",{d:"m9 18 6-6-6-6"})})})]})}),xr=Object.assign(he,{displayName:"Pagination"});import*as D from"@radix-ui/react-popover";import{forwardRef as Ce}from"react";import{jsx as ve}from"react/jsx-runtime";var ue=Ce(({className:e,...o},t)=>{let r=i("cocso-popover-content",{},[],e);return ve(D.Content,{ref:t,className:r,...o})}),Or=Object.assign(D.Root,{Trigger:D.Trigger,Portal:D.Portal,Content:ue});import*as ko from"react";import*as Z from"@radix-ui/react-checkbox";import{jsx as F,jsxs as No}from"react/jsx-runtime";var Pe=ko.forwardRef(({id:e,size:o="md",status:t,onChange:r,label:n,disabled:s=!1,className:m,...c},p)=>{let l={size:o,disabled:s,status:t},d=[...s?[{status:t,disabled:s}]:[]],C=i("cocso-checkbox",l,d,m),k=h=>{if(!s){let v;h===!0?v="on":h==="indeterminate"?v="intermediate":v="off",r(v)}};return No("div",{className:"cocso-checkbox-wrapper",children:[No(Z.Root,{ref:p,id:e,className:C,checked:(()=>{switch(t){case"on":return!0;case"intermediate":return"indeterminate";case"off":default:return!1}})(),onCheckedChange:k,disabled:s,...c,children:[F(Z.Indicator,{className:"cocso-checkbox-indicator",style:{opacity:t==="on"?1:0},children:F("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",children:F("path",{d:"M20 6 9 17l-5-5"})})}),F("div",{className:"cocso-checkbox-indicator",style:{opacity:t==="intermediate"?1:0},children:F("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:F("path",{d:"M5 12h14"})})})]}),n&&F(L,{className:i("cocso-checkbox-label",{disabled:s}),size:o,htmlFor:e,children:n})]})}),zr=Object.assign(Pe,{displayName:"Checkbox"});import*as To from"react";import{jsx as R,jsxs as $}from"react/jsx-runtime";var Re=To.forwardRef(({quantity:e,className:o,onChange:t,...r},n)=>{let s=i("cocso-stock-quantity-status",{},[],o);return $("div",{ref:n,className:s,"data-status":e,...r,children:[R("span",{className:"cocso-stock-quantity-status-indicator",children:e==="\uC5EC\uC720"?$("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[R("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"}),R("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"}),R("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"})]}):e==="\uBCF4\uD1B5"?$("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[R("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"}),R("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"}),R("path",{d:"M9.48145 6.0752V6.10059H7.06641C5.99053 6.10059 5.11817 6.968 5.11816 8.03809C5.11839 9.10782 5.98991 9.97532 7.06543 9.97559H9.48145V13.0752H7.06543C4.35577 13.0749 2.14345 10.9585 2.00781 8.29688V7.77832C2.03849 7.17662 2.17568 6.60303 2.40039 6.0752H9.48145ZM12.0527 6.10059C13.1286 6.10059 14.001 6.968 14.001 8.03809C14.0008 9.10806 13.1285 9.97559 12.0527 9.97559H9.48145V6.10059H12.0527Z",fill:"currentColor"})]}):$("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[R("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"}),R("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"}),R("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"})]})}),R(L,{size:"sm",color:"currentColor",children:e})]})}),Ur=Object.assign(Re,{displayName:"StockQuantityStatus"});import*as Lo from"react";import*as Q from"@radix-ui/react-switch";import{jsx as _,jsxs as we}from"react/jsx-runtime";var be=Lo.forwardRef(({id:e,size:o="md",disabled:t=!1,label:r,position:n="right",className:s,children:m,...c},p)=>{let l=i("cocso-switch",{size:o,disabled:t},[],s),d=i("cocso-switch-thumb",{size:o});return we("div",{className:"cocso-switch-wrapper",children:[n==="left"&&_(L,{size:o,htmlFor:e,children:r}),_(Q.Root,{ref:p,className:l,...c,children:_(Q.Thumb,{className:d})}),n==="right"&&_(L,{size:o,htmlFor:e,children:r})]})}),oi=Object.assign(be,{displayName:"Switch"});import*as M from"@radix-ui/react-tabs";import{forwardRef as U}from"react";import{jsx as G}from"react/jsx-runtime";var ye=U(({className:e,...o},t)=>{let r=i("cocso-tab",{},[],e);return G(M.Root,{ref:t,className:r,...o})}),xe=U(({className:e,...o},t)=>{let r=i("cocso-tab-list",{},[],e);return G(M.List,{ref:t,className:r,...o})}),Ne=U(({className:e,...o},t)=>{let r=i("cocso-tab-trigger",{},[],e);return G(M.Trigger,{ref:t,className:r,...o})}),ke=U(({className:e,...o},t)=>{let r=i("cocso-tab-content",{},[],e);return G(M.Content,{ref:t,className:r,...o})}),mi=Object.assign(ye,{List:xe,Trigger:Ne,Content:ke});import{Toaster as Te,toast as gi}from"sonner";var Ci=Object.assign(Te,{displayName:"Toast"});import*as So from"react";import{jsx as K,jsxs as Se}from"react/jsx-runtime";var Le=So.forwardRef(({size:e="md",disabled:o=!1,className:t,style:r,children:n,...s},m)=>{let c=i("cocso-select",{size:e,disabled:o},[],t);return Se("div",{className:"cocso-select-wrapper",children:[K("select",{ref:m,className:c,disabled:o,...s,children:n}),K("i",{className:"cocso-select-icon",children:K("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:K("path",{d:"m6 9 6 6 6-6"})})})]})}),bi=Object.assign(Le,{displayName:"Select"});export{Be as Accordion,z as Body,nt as Button,zr as Checkbox,ft as Display,wt as Dropdown,Et as FileUpload,vo as Heading,L as Label,Xt as Link,mr as Modal,vr as OneTimePasswordField,xr as Pagination,Or as Popover,bi as Select,co as Spinner,Ur as StockQuantityStatus,oi as Switch,mi as Tab,Ci as Toaster,gi 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("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};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import type { FontWeight, LineHeight } from '../token';
|
|
3
|
+
export type LinkSize = 'lg' | 'md' | 'sm' | 'xs';
|
|
4
|
+
export interface LinkProps extends ComponentPropsWithoutRef<'a'> {
|
|
5
|
+
asChild?: boolean;
|
|
6
|
+
size?: LinkSize;
|
|
7
|
+
weight?: FontWeight;
|
|
8
|
+
lineHeight?: LineHeight;
|
|
9
|
+
indicator?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const Link: import("react").ForwardRefExoticComponent<LinkProps & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
@@ -2,7 +2,7 @@ import * as ModalPrimitive from '@radix-ui/react-dialog';
|
|
|
2
2
|
export declare const Modal: import("react").FC<ModalPrimitive.DialogProps> & {
|
|
3
3
|
Trigger: import("react").ForwardRefExoticComponent<ModalPrimitive.DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
4
4
|
Content: import("react").ForwardRefExoticComponent<Omit<ModalPrimitive.DialogContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
|
-
Close: import("react").ForwardRefExoticComponent<Omit<
|
|
5
|
+
Close: import("react").ForwardRefExoticComponent<Omit<ModalPrimitive.DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
6
6
|
Title: import("react").ForwardRefExoticComponent<Omit<ModalPrimitive.DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement>, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
7
7
|
Description: import("react").ForwardRefExoticComponent<Omit<ModalPrimitive.DialogDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
8
8
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export interface PaginationProps extends Omit<ComponentPropsWithoutRef<'div'>, 'onChange'> {
|
|
3
|
+
page: number;
|
|
4
|
+
totalPages: number;
|
|
5
|
+
maxVisible?: number;
|
|
6
|
+
onChange: (pageNumber: number) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const Pagination: import("react").ForwardRefExoticComponent<PaginationProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
type SelectSize = 'xl' | 'lg' | 'md' | 'sm' | 'xs' | '2xs';
|
|
3
|
+
export interface SelectProps extends Omit<ComponentPropsWithoutRef<'select'>, 'size'> {
|
|
4
|
+
size?: SelectSize;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const Select: import("react").ForwardRefExoticComponent<SelectProps & import("react").RefAttributes<HTMLSelectElement>>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export type SpinnerSize = 'xl' | 'lg' | 'md' | 'sm';
|
|
3
|
+
export type SpinnerColor = 'primary' | 'neutral' | 'white';
|
|
4
|
+
export interface SpinnerProps extends Omit<ComponentPropsWithoutRef<'div'>, 'size' | 'color'> {
|
|
5
|
+
asChild?: boolean;
|
|
6
|
+
size?: SpinnerSize;
|
|
7
|
+
color?: SpinnerColor;
|
|
8
|
+
}
|
|
9
|
+
export declare const Spinner: import("react").ForwardRefExoticComponent<SpinnerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export type QuantityStatus = '보통' | '여유' | '부족';
|
|
3
|
+
export interface QuantityStatusProps extends ComponentPropsWithoutRef<'div'> {
|
|
4
|
+
quantity: QuantityStatus;
|
|
5
|
+
}
|
|
6
|
+
export declare const StockQuantityStatus: import("react").ForwardRefExoticComponent<QuantityStatusProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export declare const getColor: (quantity: QuantityStatus) => string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
2
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
3
|
+
export type SwitchSize = 'lg' | 'md';
|
|
4
|
+
export interface SwitchProps extends ComponentPropsWithoutRef<typeof SwitchPrimitive.Root> {
|
|
5
|
+
id?: string;
|
|
6
|
+
size?: SwitchSize;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
label?: string;
|
|
9
|
+
position?: 'left' | 'right';
|
|
10
|
+
}
|
|
11
|
+
export declare const Switch: import("react").ForwardRefExoticComponent<SwitchProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Toaster, toast } from 'sonner';
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
export declare const colors: {
|
|
2
|
+
transparent: string;
|
|
3
|
+
white: string;
|
|
4
|
+
whiteAlpha5: string;
|
|
5
|
+
whiteAlpha10: string;
|
|
6
|
+
whiteAlpha20: string;
|
|
7
|
+
whiteAlpha30: string;
|
|
8
|
+
whiteAlpha40: string;
|
|
9
|
+
whiteAlpha50: string;
|
|
10
|
+
whiteAlpha60: string;
|
|
11
|
+
whiteAlpha70: string;
|
|
12
|
+
whiteAlpha80: string;
|
|
13
|
+
whiteAlpha90: string;
|
|
14
|
+
black: string;
|
|
15
|
+
blackAlpha5: string;
|
|
16
|
+
blackAlpha10: string;
|
|
17
|
+
blackAlpha20: string;
|
|
18
|
+
blackAlpha30: string;
|
|
19
|
+
blackAlpha40: string;
|
|
20
|
+
blackAlpha50: string;
|
|
21
|
+
blackAlpha60: string;
|
|
22
|
+
blackAlpha70: string;
|
|
23
|
+
blackAlpha80: string;
|
|
24
|
+
blackAlpha90: string;
|
|
25
|
+
neutral50: string;
|
|
26
|
+
neutral100: string;
|
|
27
|
+
neutral200: string;
|
|
28
|
+
neutral300: string;
|
|
29
|
+
neutral400: string;
|
|
30
|
+
neutral500: string;
|
|
31
|
+
neutral600: string;
|
|
32
|
+
neutral700: string;
|
|
33
|
+
neutral800: string;
|
|
34
|
+
neutral900: string;
|
|
35
|
+
neutral950: string;
|
|
36
|
+
primary50: string;
|
|
37
|
+
primary100: string;
|
|
38
|
+
primary200: string;
|
|
39
|
+
primary300: string;
|
|
40
|
+
primary400: string;
|
|
41
|
+
primary500: string;
|
|
42
|
+
primary600: string;
|
|
43
|
+
primary700: string;
|
|
44
|
+
primary800: string;
|
|
45
|
+
primary900: string;
|
|
46
|
+
primary950: string;
|
|
47
|
+
danger50: string;
|
|
48
|
+
danger100: string;
|
|
49
|
+
danger200: string;
|
|
50
|
+
danger300: string;
|
|
51
|
+
danger400: string;
|
|
52
|
+
danger500: string;
|
|
53
|
+
danger600: string;
|
|
54
|
+
danger700: string;
|
|
55
|
+
danger800: string;
|
|
56
|
+
danger900: string;
|
|
57
|
+
danger950: string;
|
|
58
|
+
warning50: string;
|
|
59
|
+
warning100: string;
|
|
60
|
+
warning200: string;
|
|
61
|
+
warning300: string;
|
|
62
|
+
warning400: string;
|
|
63
|
+
warning500: string;
|
|
64
|
+
warning600: string;
|
|
65
|
+
warning700: string;
|
|
66
|
+
warning800: string;
|
|
67
|
+
warning900: string;
|
|
68
|
+
warning950: string;
|
|
69
|
+
success50: string;
|
|
70
|
+
success100: string;
|
|
71
|
+
success200: string;
|
|
72
|
+
success300: string;
|
|
73
|
+
success400: string;
|
|
74
|
+
success500: string;
|
|
75
|
+
success600: string;
|
|
76
|
+
success700: string;
|
|
77
|
+
success800: string;
|
|
78
|
+
success900: string;
|
|
79
|
+
success950: string;
|
|
80
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const spacing: {
|
|
2
|
+
readonly s0: "var(--ds-spacing-0)";
|
|
3
|
+
readonly s1: "var(--ds-spacing-1)";
|
|
4
|
+
readonly s2: "var(--ds-spacing-2)";
|
|
5
|
+
readonly s3: "var(--ds-spacing-3)";
|
|
6
|
+
readonly s4: "var(--ds-spacing-4)";
|
|
7
|
+
readonly s5: "var(--ds-spacing-5)";
|
|
8
|
+
readonly s6: "var(--ds-spacing-6)";
|
|
9
|
+
readonly s7: "var(--ds-spacing-7)";
|
|
10
|
+
readonly s8: "var(--ds-spacing-8)";
|
|
11
|
+
readonly s9: "var(--ds-spacing-9)";
|
|
12
|
+
readonly s10: "var(--ds-spacing-10)";
|
|
13
|
+
readonly s11: "var(--ds-spacing-11)";
|
|
14
|
+
readonly s12: "var(--ds-spacing-12)";
|
|
15
|
+
readonly s13: "var(--ds-spacing-13)";
|
|
16
|
+
readonly s14: "var(--ds-spacing-14)";
|
|
17
|
+
readonly s15: "var(--ds-spacing-15)";
|
|
18
|
+
readonly s16: "var(--ds-spacing-16)";
|
|
19
|
+
readonly s17: "var(--ds-spacing-17)";
|
|
20
|
+
readonly s18: "var(--ds-spacing-18)";
|
|
21
|
+
readonly s19: "var(--ds-spacing-19)";
|
|
22
|
+
readonly s20: "var(--ds-spacing-20)";
|
|
23
|
+
readonly s21: "var(--ds-spacing-21)";
|
|
24
|
+
readonly max: "var(--ds-spacing-max)";
|
|
25
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export declare const fontSize: {
|
|
2
|
+
readonly 10: 10;
|
|
3
|
+
readonly 11: 11;
|
|
4
|
+
readonly 12: 12;
|
|
5
|
+
readonly 13: 13;
|
|
6
|
+
readonly 14: 14;
|
|
7
|
+
readonly 15: 15;
|
|
8
|
+
readonly 16: 16;
|
|
9
|
+
readonly 18: 18;
|
|
10
|
+
readonly 20: 20;
|
|
11
|
+
readonly 24: 24;
|
|
12
|
+
readonly 28: 28;
|
|
13
|
+
readonly 32: 32;
|
|
14
|
+
readonly 36: 36;
|
|
15
|
+
readonly 44: 44;
|
|
16
|
+
readonly 60: 60;
|
|
17
|
+
};
|
|
18
|
+
export type FontSize = keyof typeof fontSize;
|
|
19
|
+
export type ResponsiveFontSize = FontSize | [FontSize, FontSize?, FontSize?] | {
|
|
20
|
+
base: FontSize;
|
|
21
|
+
tablet?: FontSize;
|
|
22
|
+
desktop?: FontSize;
|
|
23
|
+
};
|
|
24
|
+
export declare const fontWeight: {
|
|
25
|
+
readonly thin: 100;
|
|
26
|
+
readonly extralight: 200;
|
|
27
|
+
readonly light: 300;
|
|
28
|
+
readonly normal: 400;
|
|
29
|
+
readonly medium: 500;
|
|
30
|
+
readonly semibold: 600;
|
|
31
|
+
readonly bold: 700;
|
|
32
|
+
readonly extrabold: 800;
|
|
33
|
+
readonly black: 900;
|
|
34
|
+
};
|
|
35
|
+
export type FontWeight = keyof typeof fontWeight;
|
|
36
|
+
export declare const lineHeight: {
|
|
37
|
+
readonly none: 1;
|
|
38
|
+
readonly tight: 1.25;
|
|
39
|
+
readonly snug: 1.375;
|
|
40
|
+
readonly normal: 1.5;
|
|
41
|
+
readonly relaxed: 1.625;
|
|
42
|
+
readonly loose: 2;
|
|
43
|
+
};
|
|
44
|
+
export type LineHeight = keyof typeof lineHeight;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import type { FontWeight, LineHeight, ResponsiveFontSize } from '../token';
|
|
3
|
+
export interface TypographyProps extends ComponentPropsWithoutRef<'p'> {
|
|
4
|
+
asChild?: boolean;
|
|
5
|
+
size?: ResponsiveFontSize;
|
|
6
|
+
weight?: FontWeight;
|
|
7
|
+
lineHeight?: LineHeight;
|
|
8
|
+
}
|
|
9
|
+
export declare const Typography: import("react").ForwardRefExoticComponent<TypographyProps & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Typography';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocso-ui/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/cocso/cocso-ui.git",
|
|
@@ -8,7 +8,9 @@
|
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
10
|
"build": "rm -rf lib && bun run build.js && bun x tsc",
|
|
11
|
-
"dev": "bun run build.js --watch"
|
|
11
|
+
"dev": "bun run build.js --watch",
|
|
12
|
+
"lint": "biome lint .",
|
|
13
|
+
"lint:fix": "biome lint . --fix"
|
|
12
14
|
},
|
|
13
15
|
"type": "module",
|
|
14
16
|
"main": "./lib/index.cjs",
|
|
@@ -19,32 +21,40 @@
|
|
|
19
21
|
"types": "./lib/index.d.ts",
|
|
20
22
|
"import": "./lib/index.js",
|
|
21
23
|
"require": "./lib/index.cjs"
|
|
24
|
+
},
|
|
25
|
+
"./styles.css": {
|
|
26
|
+
"import": "./lib/index.css",
|
|
27
|
+
"require": "./lib/index.css"
|
|
22
28
|
}
|
|
23
29
|
},
|
|
24
30
|
"files": [
|
|
25
31
|
"lib"
|
|
26
32
|
],
|
|
27
33
|
"dependencies": {
|
|
28
|
-
"@
|
|
29
|
-
"@radix-ui/react-
|
|
30
|
-
"@radix-ui/react-
|
|
31
|
-
"@radix-ui/react-
|
|
32
|
-
"@radix-ui/react-
|
|
33
|
-
"@radix-ui/react-
|
|
34
|
+
"@cocso-ui/react-icons": "workspace:*",
|
|
35
|
+
"@radix-ui/react-accordion": "^1.2.12",
|
|
36
|
+
"@radix-ui/react-checkbox": "^1.3.3",
|
|
37
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
38
|
+
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
39
|
+
"@radix-ui/react-one-time-password-field": "^0.1.8",
|
|
40
|
+
"@radix-ui/react-popover": "^1.1.15",
|
|
41
|
+
"@radix-ui/react-primitive": "^2.1.3",
|
|
34
42
|
"@radix-ui/react-slot": "^1.2.3",
|
|
35
|
-
"@radix-ui/react-switch": "^1.2.
|
|
36
|
-
"@radix-ui/react-tabs": "^1.1.
|
|
37
|
-
"
|
|
43
|
+
"@radix-ui/react-switch": "^1.2.6",
|
|
44
|
+
"@radix-ui/react-tabs": "^1.1.13",
|
|
45
|
+
"clsx": "^2.1.1",
|
|
46
|
+
"sonner": "^2.0.7",
|
|
47
|
+
"ts-pattern": "^5.8.0"
|
|
38
48
|
},
|
|
39
49
|
"peerDependencies": {
|
|
40
50
|
"react": "^19.1.1",
|
|
41
51
|
"react-dom": "^19.1.1"
|
|
42
52
|
},
|
|
43
53
|
"devDependencies": {
|
|
44
|
-
"@types/react": "^19.1.
|
|
45
|
-
"@types/react-dom": "^19.1.
|
|
46
|
-
"esbuild": "^0.25.
|
|
47
|
-
"typescript": "^5.
|
|
54
|
+
"@types/react": "^19.1.11",
|
|
55
|
+
"@types/react-dom": "^19.1.8",
|
|
56
|
+
"esbuild": "^0.25.9",
|
|
57
|
+
"typescript": "^5.9.2"
|
|
48
58
|
},
|
|
49
59
|
"publishConfig": {
|
|
50
60
|
"access": "public"
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { type FontWeightToken } from '../../utils/token';
|
|
3
|
-
export type BodyProps = {
|
|
4
|
-
asChild?: boolean;
|
|
5
|
-
size?: 'lg' | 'md' | 'sm' | 'xs';
|
|
6
|
-
color?: string;
|
|
7
|
-
weight?: FontWeightToken;
|
|
8
|
-
} & React.ComponentPropsWithoutRef<'p'>;
|
|
9
|
-
export declare const Body: React.ForwardRefExoticComponent<{
|
|
10
|
-
asChild?: boolean;
|
|
11
|
-
size?: "lg" | "md" | "sm" | "xs";
|
|
12
|
-
color?: string;
|
|
13
|
-
weight?: FontWeightToken;
|
|
14
|
-
} & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>> & {
|
|
15
|
-
displayName: string;
|
|
16
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { type FontWeightToken } from '../../utils/token';
|
|
3
|
-
export type ButtonProps = {
|
|
4
|
-
asChild?: boolean;
|
|
5
|
-
variant?: 'primary' | 'secondary' | 'tertiary' | 'danger' | 'success' | 'text';
|
|
6
|
-
size?: 'xl' | 'lg' | 'md' | 'sm' | 'xs' | '2xs';
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
loading?: boolean;
|
|
9
|
-
color?: string;
|
|
10
|
-
weight?: FontWeightToken;
|
|
11
|
-
} & React.ComponentPropsWithoutRef<'button'>;
|
|
12
|
-
export declare const Button: React.ForwardRefExoticComponent<{
|
|
13
|
-
asChild?: boolean;
|
|
14
|
-
variant?: "primary" | "secondary" | "tertiary" | "danger" | "success" | "text";
|
|
15
|
-
size?: "xl" | "lg" | "md" | "sm" | "xs" | "2xs";
|
|
16
|
-
disabled?: boolean;
|
|
17
|
-
loading?: boolean;
|
|
18
|
-
color?: string;
|
|
19
|
-
weight?: FontWeightToken;
|
|
20
|
-
} & Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>> & {
|
|
21
|
-
displayName: string;
|
|
22
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
3
|
-
export type CheckboxStatus = 'on' | 'off' | 'intermediate';
|
|
4
|
-
export type CheckboxProps = {
|
|
5
|
-
id?: string;
|
|
6
|
-
size?: 'lg' | 'md' | 'sm';
|
|
7
|
-
status: CheckboxStatus;
|
|
8
|
-
onChange: (next: CheckboxStatus) => void;
|
|
9
|
-
label?: string;
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
} & Omit<React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>, 'checked' | 'onCheckedChange'>;
|
|
12
|
-
export declare const Checkbox: React.ForwardRefExoticComponent<{
|
|
13
|
-
id?: string;
|
|
14
|
-
size?: "lg" | "md" | "sm";
|
|
15
|
-
status: CheckboxStatus;
|
|
16
|
-
onChange: (next: CheckboxStatus) => void;
|
|
17
|
-
label?: string;
|
|
18
|
-
disabled?: boolean;
|
|
19
|
-
} & Omit<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref">, "checked" | "onCheckedChange"> & React.RefAttributes<HTMLButtonElement>> & {
|
|
20
|
-
displayName: string;
|
|
21
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { type FontWeightToken } from '../../utils/token';
|
|
3
|
-
export type DisplayProps = {
|
|
4
|
-
asChild?: boolean;
|
|
5
|
-
size?: 'lg' | 'md' | 'sm';
|
|
6
|
-
color?: string;
|
|
7
|
-
weight?: FontWeightToken;
|
|
8
|
-
} & React.ComponentPropsWithoutRef<'h1'>;
|
|
9
|
-
export declare const Display: React.ForwardRefExoticComponent<{
|
|
10
|
-
asChild?: boolean;
|
|
11
|
-
size?: "lg" | "md" | "sm";
|
|
12
|
-
color?: string;
|
|
13
|
-
weight?: FontWeightToken;
|
|
14
|
-
} & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>> & {
|
|
15
|
-
displayName: string;
|
|
16
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export interface FileItem {
|
|
3
|
-
file: File;
|
|
4
|
-
name: string;
|
|
5
|
-
size: number;
|
|
6
|
-
}
|
|
7
|
-
export declare const FileUpload: React.ForwardRefExoticComponent<{
|
|
8
|
-
maxFiles?: number;
|
|
9
|
-
files: FileItem[];
|
|
10
|
-
onFilesChange: (files: FileItem[]) => void;
|
|
11
|
-
onRemove?: (fileName: string) => void;
|
|
12
|
-
} & Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>> & {
|
|
13
|
-
displayName: string;
|
|
14
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './FileUpload';
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { type FontWeightToken } from '../../utils/token';
|
|
3
|
-
export type HeadingProps = {
|
|
4
|
-
asChild?: boolean;
|
|
5
|
-
size?: 'xl' | 'lg' | 'md' | 'sm' | 'xs' | '2xs';
|
|
6
|
-
color?: string;
|
|
7
|
-
weight?: FontWeightToken;
|
|
8
|
-
} & React.ComponentPropsWithoutRef<'h2'>;
|
|
9
|
-
export declare const Heading: React.ForwardRefExoticComponent<{
|
|
10
|
-
asChild?: boolean;
|
|
11
|
-
size?: "xl" | "lg" | "md" | "sm" | "xs" | "2xs";
|
|
12
|
-
color?: string;
|
|
13
|
-
weight?: FontWeightToken;
|
|
14
|
-
} & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>> & {
|
|
15
|
-
displayName: string;
|
|
16
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { type FontWeightToken } from '../../utils/token';
|
|
3
|
-
export type LabelProps = {
|
|
4
|
-
asChild?: boolean;
|
|
5
|
-
size?: 'lg' | 'md' | 'sm' | 'xs';
|
|
6
|
-
color?: string;
|
|
7
|
-
weight?: FontWeightToken;
|
|
8
|
-
} & React.ComponentPropsWithoutRef<'label'>;
|
|
9
|
-
export declare const Label: React.ForwardRefExoticComponent<{
|
|
10
|
-
asChild?: boolean;
|
|
11
|
-
size?: "lg" | "md" | "sm" | "xs";
|
|
12
|
-
color?: string;
|
|
13
|
-
weight?: FontWeightToken;
|
|
14
|
-
} & Omit<React.DetailedHTMLProps<React.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref"> & React.RefAttributes<HTMLLabelElement>> & {
|
|
15
|
-
displayName: string;
|
|
16
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Label';
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { type FontWeightToken } from '../../utils/token';
|
|
3
|
-
export type LinkProps = {
|
|
4
|
-
asChild?: boolean;
|
|
5
|
-
size?: 'lg' | 'md' | 'sm' | 'xs';
|
|
6
|
-
weight?: FontWeightToken;
|
|
7
|
-
indicator?: boolean;
|
|
8
|
-
} & React.ComponentPropsWithoutRef<'a'>;
|
|
9
|
-
export declare const Link: React.ForwardRefExoticComponent<{
|
|
10
|
-
asChild?: boolean;
|
|
11
|
-
size?: "lg" | "md" | "sm" | "xs";
|
|
12
|
-
weight?: FontWeightToken;
|
|
13
|
-
indicator?: boolean;
|
|
14
|
-
} & Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & React.RefAttributes<HTMLAnchorElement>> & {
|
|
15
|
-
displayName: string;
|
|
16
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export type PaginationProps = {
|
|
3
|
-
page: number;
|
|
4
|
-
totalPages: number;
|
|
5
|
-
maxVisible?: number;
|
|
6
|
-
onChange: (pageNumber: number) => void;
|
|
7
|
-
} & Omit<React.ComponentPropsWithoutRef<'div'>, 'onChange'>;
|
|
8
|
-
export declare const Pagination: React.ForwardRefExoticComponent<{
|
|
9
|
-
page: number;
|
|
10
|
-
totalPages: number;
|
|
11
|
-
maxVisible?: number;
|
|
12
|
-
onChange: (pageNumber: number) => void;
|
|
13
|
-
} & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "onChange"> & React.RefAttributes<HTMLDivElement>> & {
|
|
14
|
-
displayName: string;
|
|
15
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export type SelectProps = {
|
|
3
|
-
size?: 'xl' | 'lg' | 'md' | 'sm' | 'xs' | '2xs';
|
|
4
|
-
disabled?: boolean;
|
|
5
|
-
} & Omit<React.ComponentPropsWithoutRef<'select'>, 'size'>;
|
|
6
|
-
export declare const Select: React.ForwardRefExoticComponent<{
|
|
7
|
-
size?: "xl" | "lg" | "md" | "sm" | "xs" | "2xs";
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
} & Omit<Omit<React.DetailedHTMLProps<React.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, "ref">, "size"> & React.RefAttributes<HTMLSelectElement>> & {
|
|
10
|
-
displayName: string;
|
|
11
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
declare const tags: readonly ["div"];
|
|
3
|
-
type Element = (typeof tags)[number];
|
|
4
|
-
type Default = (typeof tags)[0];
|
|
5
|
-
export type SpinnerProps<T extends Element = Default> = {
|
|
6
|
-
as?: T;
|
|
7
|
-
size?: 'xl' | 'lg' | 'md' | 'sm' | 'xs';
|
|
8
|
-
color?: string;
|
|
9
|
-
bg?: string;
|
|
10
|
-
} & Omit<React.ComponentPropsWithoutRef<T>, 'size' | 'color'>;
|
|
11
|
-
export declare const Spinner: React.ForwardRefExoticComponent<{
|
|
12
|
-
as?: "div" | undefined;
|
|
13
|
-
size?: "xl" | "lg" | "md" | "sm" | "xs";
|
|
14
|
-
color?: string;
|
|
15
|
-
bg?: string;
|
|
16
|
-
} & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "color" | "size"> & React.RefAttributes<HTMLDivElement>> & {
|
|
17
|
-
displayName: string;
|
|
18
|
-
};
|
|
19
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export type QuantityStatus = '보통' | '여유' | '부족';
|
|
3
|
-
export type QuantityStatusProps = {
|
|
4
|
-
quantity: QuantityStatus;
|
|
5
|
-
} & React.ComponentPropsWithoutRef<'div'>;
|
|
6
|
-
export declare const StockQuantityStatus: React.ForwardRefExoticComponent<{
|
|
7
|
-
quantity: QuantityStatus;
|
|
8
|
-
} & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>> & {
|
|
9
|
-
displayName: string;
|
|
10
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
3
|
-
export type SwitchProps = {
|
|
4
|
-
id: string;
|
|
5
|
-
size?: 'lg' | 'md';
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
label?: string;
|
|
8
|
-
position?: 'left' | 'right';
|
|
9
|
-
} & React.ComponentPropsWithoutRef<typeof SwitchPrimitive.Root>;
|
|
10
|
-
export declare const Switch: React.ForwardRefExoticComponent<{
|
|
11
|
-
id: string;
|
|
12
|
-
size?: "lg" | "md";
|
|
13
|
-
disabled?: boolean;
|
|
14
|
-
label?: string;
|
|
15
|
-
position?: "left" | "right";
|
|
16
|
-
} & Omit<SwitchPrimitive.SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>> & {
|
|
17
|
-
displayName: string;
|
|
18
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Toast';
|
package/lib/utils/cn.d.ts
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const cn: (...classes: (string | undefined | null | false)[]) => string;
|
|
2
|
-
export declare const createClassName: (baseClass: string, variants: Record<string, any>, compoundVariants?: Record<string, any>[], ...additionalClasses: (string | undefined | null | false)[]) => string;
|
package/lib/utils/token.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare function createColor(token: string | undefined): string | undefined;
|
|
2
|
-
declare const FONT_WEIGHT_MAP: {
|
|
3
|
-
readonly thin: "100";
|
|
4
|
-
readonly extralight: "200";
|
|
5
|
-
readonly light: "300";
|
|
6
|
-
readonly normal: "400";
|
|
7
|
-
readonly medium: "500";
|
|
8
|
-
readonly semibold: "600";
|
|
9
|
-
readonly bold: "700";
|
|
10
|
-
readonly extrabold: "800";
|
|
11
|
-
readonly black: "900";
|
|
12
|
-
};
|
|
13
|
-
export type FontWeightToken = keyof typeof FONT_WEIGHT_MAP;
|
|
14
|
-
export declare function createFontWeight(token: string | undefined): string | undefined;
|
|
15
|
-
export {};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/lib/{components/OneTimePasswordField → one-time-password-field}/OneTimePasswordField.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|