bo-ui-kit 0.1.0 → 0.2.0
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/README.md +54 -95
- package/dist/components/ui/accordion.d.ts +27 -0
- package/dist/components/ui/alert-dialog.d.ts +22 -0
- package/dist/components/ui/alert.d.ts +23 -0
- package/dist/components/ui/avatar-group.d.ts +16 -0
- package/dist/components/ui/avatar.d.ts +23 -0
- package/dist/components/ui/badge.d.ts +19 -0
- package/dist/components/ui/breadcrumb.d.ts +17 -0
- package/dist/components/ui/button.d.ts +5 -2
- package/dist/components/ui/collapsible.d.ts +16 -0
- package/dist/components/ui/dialog.d.ts +22 -0
- package/dist/components/ui/drawer.d.ts +16 -0
- package/dist/components/ui/index.d.ts +46 -0
- package/dist/components/ui/input.d.ts +1 -1
- package/dist/components/ui/number-field.d.ts +22 -0
- package/dist/components/ui/overlay.d.ts +36 -0
- package/dist/components/ui/radio-group.d.ts +19 -0
- package/dist/components/ui/scroll-area.d.ts +13 -0
- package/dist/components/ui/segmented-control.d.ts +29 -0
- package/dist/components/ui/separator.d.ts +15 -0
- package/dist/components/ui/sheet.d.ts +23 -0
- package/dist/components/ui/skeleton.d.ts +13 -0
- package/dist/components/ui/spinner.d.ts +15 -0
- package/dist/components/ui/switch.d.ts +22 -0
- package/dist/components/ui/tabs.d.ts +26 -0
- package/dist/components/ui/textarea.d.ts +17 -0
- package/dist/components/ui/toast.d.ts +19 -0
- package/dist/components/ui/tooltip.d.ts +14 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1390 -278
- package/dist/styles.css +16 -5
- package/package.json +1 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface SheetProps {
|
|
3
|
+
open?: boolean;
|
|
4
|
+
defaultOpen?: boolean;
|
|
5
|
+
onOpenChange?: (open: boolean) => void;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
declare function Sheet({ open, defaultOpen, onOpenChange, children }: SheetProps): React.JSX.Element;
|
|
9
|
+
declare const SheetTrigger: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
declare const SheetClose: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
type Side = "left" | "right" | "top" | "bottom";
|
|
12
|
+
export interface SheetContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
13
|
+
side?: Side;
|
|
14
|
+
/** 여백 있는 플로팅 패널(rounded-2xl) */
|
|
15
|
+
inset?: boolean;
|
|
16
|
+
showClose?: boolean;
|
|
17
|
+
}
|
|
18
|
+
declare const SheetContent: React.ForwardRefExoticComponent<SheetContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
declare const SheetHeader: ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => React.JSX.Element;
|
|
20
|
+
declare const SheetTitle: ({ className, id, ...props }: React.HTMLAttributes<HTMLHeadingElement>) => React.JSX.Element;
|
|
21
|
+
declare const SheetDescription: ({ className, id, ...props }: React.HTMLAttributes<HTMLParagraphElement>) => React.JSX.Element;
|
|
22
|
+
declare const SheetFooter: ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => React.JSX.Element;
|
|
23
|
+
export { Sheet, SheetTrigger, SheetContent, SheetHeader, SheetTitle, SheetDescription, SheetFooter, SheetClose };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Skeleton — Figma "BO UI Kit" Skeleton(node 7669:1885)의 로딩 플레이스홀더 프리미티브.
|
|
4
|
+
*
|
|
5
|
+
* Figma 의 Skeleton 노드는 아바타+텍스트+버튼이 배치된 **사용 예시**라, 재사용 가능한
|
|
6
|
+
* 단위 프리미티브(펄스 애니메이션이 있는 muted 블록)로 만든다. 크기/모양은 className 으로 지정.
|
|
7
|
+
* 배경색: Figma `muted`(#e2e8f0) = 프로젝트 `secondary` 토큰(우리 `muted`=foreground@4% 와 다름).
|
|
8
|
+
*
|
|
9
|
+
* @example <Skeleton className="h-10 w-10 rounded-full" /> // 아바타 자리
|
|
10
|
+
*/
|
|
11
|
+
export type SkeletonProps = React.HTMLAttributes<HTMLDivElement>;
|
|
12
|
+
declare const Skeleton: React.ForwardRefExoticComponent<SkeletonProps & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
export { Skeleton };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
/**
|
|
4
|
+
* Spinner — Figma "BO UI Kit" Spinner(node 7707:393). 로딩 인디케이터.
|
|
5
|
+
*
|
|
6
|
+
* Figma 의 회전 프레임(이미지 에셋)은 7일 만료라 라이브러리 영구성을 위해 **인라인 SVG 링 +
|
|
7
|
+
* `animate-spin`** 으로 그린다(색은 currentColor 상속). size sm/md/lg(16/24/32).
|
|
8
|
+
*/
|
|
9
|
+
declare const spinnerVariants: (props?: ({
|
|
10
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
|
+
export interface SpinnerProps extends React.SVGAttributes<SVGSVGElement>, VariantProps<typeof spinnerVariants> {
|
|
13
|
+
}
|
|
14
|
+
declare const Spinner: React.ForwardRefExoticComponent<SpinnerProps & React.RefAttributes<SVGSVGElement>>;
|
|
15
|
+
export { Spinner, spinnerVariants };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
/**
|
|
4
|
+
* Switch — Figma "BO UI Kit" Switch(node 7715:1962). 설정 on/off 토글.
|
|
5
|
+
*
|
|
6
|
+
* Figma 변형: Size(Default 18×30 / Large 24×44) · Checked · Disabled.
|
|
7
|
+
* 트랙: off=input(테두리 8%) / on=success(#00d492) + 안쪽 그림자. thumb: card(흰색) + shadow-xs.
|
|
8
|
+
* 제어/비제어(`checked`/`defaultChecked`/`onCheckedChange`). 접근성: role=switch + aria-checked.
|
|
9
|
+
*/
|
|
10
|
+
declare const switchVariants: (props?: ({
|
|
11
|
+
size?: "md" | "lg" | null | undefined;
|
|
12
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
13
|
+
export interface SwitchProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "onChange">, VariantProps<typeof switchVariants> {
|
|
14
|
+
/** 켜짐 상태(제어). */
|
|
15
|
+
checked?: boolean;
|
|
16
|
+
/** 비제어 초기 상태. */
|
|
17
|
+
defaultChecked?: boolean;
|
|
18
|
+
/** 상태 변경 콜백. */
|
|
19
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
20
|
+
}
|
|
21
|
+
declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLButtonElement>>;
|
|
22
|
+
export { Switch, switchVariants };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Tabs — Figma "BO UI Kit" Tabs(node 7722:82). 관련 패널 전환.
|
|
4
|
+
*
|
|
5
|
+
* Type: Default(알약 — bg-secondary 트랙 + 선택 탭 흰 카드+shadow) / WithLine(밑줄).
|
|
6
|
+
* 합성: Tabs(상태) > TabsList > TabsTrigger / TabsContent. (Figma `muted`#e2e8f0 = secondary.)
|
|
7
|
+
* 제어/비제어(value/defaultValue/onValueChange).
|
|
8
|
+
*/
|
|
9
|
+
type TabsVariant = "default" | "line";
|
|
10
|
+
export interface TabsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
11
|
+
value?: string;
|
|
12
|
+
defaultValue?: string;
|
|
13
|
+
onValueChange?: (value: string) => void;
|
|
14
|
+
variant?: TabsVariant;
|
|
15
|
+
}
|
|
16
|
+
declare const Tabs: React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
declare const TabsList: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
export interface TabsTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
19
|
+
value: string;
|
|
20
|
+
}
|
|
21
|
+
declare const TabsTrigger: React.ForwardRefExoticComponent<TabsTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
22
|
+
export interface TabsContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
23
|
+
value: string;
|
|
24
|
+
}
|
|
25
|
+
declare const TabsContent: React.ForwardRefExoticComponent<TabsContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
26
|
+
export { Tabs, TabsList, TabsTrigger, TabsContent };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
/**
|
|
4
|
+
* Textarea — Figma "BO UI Kit" Textarea(node 7751:1067). 여러 줄 입력.
|
|
5
|
+
*
|
|
6
|
+
* Input 과 동일한 토큰/포커스 관례(회색 3px 링, border-input→focus 시 disabled/30)를 재사용한다.
|
|
7
|
+
* bg=background(#f8fafc), rounded-radius, shadow-xs. size sm/md/lg(최소높이). invalid→destructive.
|
|
8
|
+
* Figma 의 코너 리사이즈 그립은 네이티브 `resize-y` 로 대체.
|
|
9
|
+
*/
|
|
10
|
+
declare const textareaVariants: (props?: ({
|
|
11
|
+
inputSize?: "sm" | "md" | "lg" | null | undefined;
|
|
12
|
+
invalid?: boolean | null | undefined;
|
|
13
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
14
|
+
export interface TextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "size">, VariantProps<typeof textareaVariants> {
|
|
15
|
+
}
|
|
16
|
+
declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
17
|
+
export { Textarea, textareaVariants };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
/**
|
|
4
|
+
* Toast — Figma "BO UI Kit" Toast(node 7728:238). 떠 있는 알림 카드.
|
|
5
|
+
*
|
|
6
|
+
* Alert 과 구조는 같으나 popover 배경 + border + shadow-popover(플로팅). Type: Default/Loading/Info/
|
|
7
|
+
* Success/Warning/Error. Loading=Spinner 아이콘, 상태=색 아이콘. 제목=foreground, 설명=muted.
|
|
8
|
+
* (배치/타이머 등 알림 큐 로직은 앱이 담당 — 이 컴포넌트는 표현 단위.)
|
|
9
|
+
*/
|
|
10
|
+
declare const toastIconColor: (props?: ({
|
|
11
|
+
type?: "default" | "error" | "info" | "success" | "warning" | "loading" | null | undefined;
|
|
12
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
13
|
+
export interface ToastProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title">, VariantProps<typeof toastIconColor> {
|
|
14
|
+
title?: React.ReactNode;
|
|
15
|
+
icon?: React.ReactNode | false;
|
|
16
|
+
action?: React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
declare const Toast: React.ForwardRefExoticComponent<ToastProps & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
export { Toast };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Tooltip — Figma "BO UI Kit" Tooltip(node 5685:185). hover/focus 시 뜨는 힌트.
|
|
4
|
+
*
|
|
5
|
+
* 트리거를 감싸고, hover/focus 시 popover 배경 + border + shadow 라벨을 표시(+화살표).
|
|
6
|
+
* side top/right/bottom/left. CSS group-hover/focus-within 기반(경량). 내용 text-xs foreground.
|
|
7
|
+
*/
|
|
8
|
+
export interface TooltipProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "content"> {
|
|
9
|
+
/** 툴팁 내용 */
|
|
10
|
+
content: React.ReactNode;
|
|
11
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
12
|
+
}
|
|
13
|
+
declare const Tooltip: React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<HTMLSpanElement>>;
|
|
14
|
+
export { Tooltip };
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),ee=require("react"),S=require("class-variance-authority"),te=require("clsx"),re=require("tailwind-merge");function se(t){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(s,n,a.get?a:{enumerable:!0,get:()=>t[n]})}}return s.default=t,Object.freeze(s)}const o=se(ee);function f(...t){return re.twMerge(te.clsx(t))}const _=S.cva("inline-flex shrink-0 items-center justify-center gap-0 whitespace-nowrap border font-medium transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"border-primary bg-primary text-primary-foreground shadow-btn hover:bg-primary/90",outline:"border-border bg-card text-foreground shadow-xs hover:bg-secondary/50",secondary:"border-transparent bg-secondary text-foreground hover:bg-secondary/80",destructive:"border-border bg-destructive text-primary-foreground shadow-btn hover:bg-destructive/90","destructive-outline":"border-border bg-background text-destructive-foreground shadow-xs hover:bg-destructive/10",ghost:"border-transparent bg-transparent text-foreground hover:bg-secondary",link:"border-transparent bg-transparent text-foreground underline-offset-4 hover:underline"},size:{xs:"h-6 min-w-6 rounded-radius-lg px-1 text-xs [&_svg]:size-4",sm:"h-7 min-w-7 rounded-radius px-1.5 text-sm [&_svg]:size-4",md:"h-8 min-w-8 rounded-radius px-1.5 text-sm [&_svg]:size-[18px]",lg:"h-9 min-w-9 rounded-radius px-2 text-sm [&_svg]:size-5 [&_[data-label]]:px-1.5",xl:"h-10 min-w-10 rounded-radius px-2.5 text-base [&_svg]:size-5 [&_[data-label]]:px-1.5"}},defaultVariants:{variant:"default",size:"md"}}),M=o.forwardRef(({className:t,variant:s,size:n,type:a="button",icon:l,rightIcon:d,children:i,...u},c)=>e.jsxs("button",{ref:c,type:a,className:f(_({variant:s,size:n}),t),"data-node-id":"1692:74",...u,children:[l?e.jsx("span",{className:"inline-flex shrink-0 opacity-80",children:l}):null,i!=null?e.jsx("span",{"data-label":!0,className:"px-1",children:i}):null,d?e.jsx("span",{className:"inline-flex shrink-0 opacity-80",children:d}):null]}));M.displayName="Button";const A=o.forwardRef(({checked:t,defaultChecked:s,indeterminate:n=!1,disabled:a=!1,mobile:l=!1,onCheckedChange:d,className:i,...u},c)=>{const g=t!==void 0,[b,m]=o.useState(s??!1),j=g?t:b,x=o.useRef(null);o.useImperativeHandle(c,()=>x.current);const v=j&&!n,w=j&&n;o.useEffect(()=>{x.current&&(x.current.indeterminate=w)},[w]);const y=h=>{const N=h.target.checked;g||m(N),d==null||d(N)};return e.jsxs("label",{className:f("inline-flex shrink-0 items-center justify-center",a?"cursor-not-allowed opacity-[0.64]":"cursor-pointer",i),children:[e.jsx("input",{ref:x,type:"checkbox",className:"peer sr-only",checked:g?t:void 0,defaultChecked:g?void 0:s,disabled:a,onChange:y,...u}),e.jsxs("span",{"aria-hidden":!0,className:f("relative flex items-center justify-center rounded-radius-sm border transition-colors","peer-focus-visible:ring-2 peer-focus-visible:ring-ring peer-focus-visible:ring-offset-1 peer-focus-visible:ring-offset-background",l?"size-[18px]":"size-4",v?"border-transparent bg-primary text-primary-foreground":"border-input bg-card shadow-xs"),children:[v&&e.jsx("svg",{viewBox:"0 0 8 8",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:l?"size-2.5":"size-2","aria-hidden":!0,children:e.jsx("path",{d:"M1 4.2 3 6l4-4.5",strokeLinecap:"round",strokeLinejoin:"round"})}),w&&e.jsx("span",{className:f("h-0.5 rounded-full bg-primary",l?"w-2":"w-1.5")})]})]})});A.displayName="Checkbox";const E=S.cva("flex w-full items-center gap-1 rounded-radius border bg-card text-sm text-foreground shadow-xs transition-colors focus-within:ring-[3px] focus-within:ring-offset-0 has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-[0.64]",{variants:{inputSize:{sm:"h-7 px-1.5",md:"h-8 px-2",lg:"h-9 px-2"},invalid:{true:"border-destructive focus-within:ring-destructive/[0.15]",false:"border-input focus-within:border-disabled/30 focus-within:ring-disabled/[0.07]"}},defaultVariants:{inputSize:"md",invalid:!1}}),D=o.forwardRef(({className:t,containerClassName:s,inputSize:n,invalid:a=!1,leftIcon:l,rightIcon:d,prefix:i,suffix:u,type:c="text",...g},b)=>e.jsxs("div",{className:f(E({inputSize:n,invalid:a}),s),"data-node-id":"7745:699",children:[l?e.jsx("span",{className:"inline-flex shrink-0 opacity-80 [&_svg]:size-4",children:l}):null,i!=null?e.jsx("span",{className:"shrink-0 text-muted-foreground",children:i}):null,e.jsx("input",{ref:b,type:c,className:f("min-w-0 flex-1 bg-transparent px-1 text-foreground outline-none placeholder:text-muted-foreground",t),...g}),u!=null?e.jsx("span",{className:"shrink-0 text-muted-foreground",children:u}):null,d?e.jsx("span",{className:"inline-flex shrink-0 opacity-80 [&_svg]:size-4",children:d}):null]}));D.displayName="Input";const P=o.forwardRef(({className:t,...s},n)=>e.jsx("label",{ref:n,className:f("inline-flex items-center text-xs font-medium text-foreground","peer-disabled:cursor-not-allowed peer-disabled:opacity-70",t),"data-node-id":"7658:2157",...s}));P.displayName="Label";const G=o.forwardRef(({className:t,label:s,required:n=!1,htmlFor:a,description:l,error:d,validity:i,children:u,...c},g)=>e.jsxs("div",{ref:g,className:f("flex w-full flex-col gap-2",t),"data-node-id":"7745:713",...c,children:[e.jsxs("div",{className:"flex flex-col gap-1.5",children:[s!=null&&e.jsxs("label",{htmlFor:a,className:"flex items-center gap-1.5 text-sm font-medium leading-5 text-foreground",children:[s,n&&e.jsx("span",{className:"text-destructive-foreground","aria-hidden":!0,children:"*"})]}),u]}),d!=null?e.jsx("p",{className:"text-xs leading-[14px] tracking-[0.12px] text-destructive-foreground",children:d}):l!=null?e.jsx("p",{className:"text-xs leading-[14px] tracking-[0.12px] text-muted-foreground",children:l}):null,i!=null&&e.jsx("div",{className:"rounded-radius-lg bg-secondary p-2",children:e.jsx("p",{className:"text-xs leading-[14px] tracking-[0.12px] text-foreground",children:i})})]}));G.displayName="Field";const q=o.createContext(!1),B=o.forwardRef(({className:t,isLarge:s=!1,title:n="Verification code",showTitle:a=!0,belowText:l="Enter the 6-digit code sent to your email.",showBelowText:d=!0,children:i,...u},c)=>e.jsx(q.Provider,{value:s,children:e.jsxs("div",{ref:c,className:f("flex flex-col items-center gap-2",t),"data-node-id":"8060:1580",...u,children:[a?e.jsx("p",{className:"w-full text-center text-sm font-medium text-foreground",children:n}):null,e.jsx("div",{className:"flex items-center justify-center gap-2",children:i}),d?e.jsx("p",{className:"w-full text-center text-xs text-muted-foreground",children:l}):null]})}));B.displayName="InputOTP";const C=S.cva("relative flex shrink-0 items-center justify-center rounded-radius border bg-card text-sm text-foreground shadow-xs transition-[color,box-shadow]",{variants:{isLarge:{true:"size-9",false:"size-8"},active:{true:"z-10 border-disabled/30 ring-[3px] ring-disabled/20",false:"border-input"}},defaultVariants:{isLarge:!1,active:!1}}),F=o.forwardRef(({className:t,char:s,active:n=!1,isLarge:a,...l},d)=>{const i=o.useContext(q),u=a??i;return e.jsx("div",{ref:d,className:f(C({isLarge:u,active:n}),t),...l,children:s!=null?e.jsx("span",{className:"text-center",children:s}):null})});F.displayName="InputOTPSlot";const W=o.forwardRef(({className:t,...s},n)=>e.jsx("div",{ref:n,role:"separator",className:f("flex w-3 shrink-0 items-center justify-center",t),...s,children:e.jsx("div",{className:"h-0.5 w-full rounded-full bg-border"})}));W.displayName="InputOTPSeparator";const K=o.forwardRef(({className:t,value:s=50,min:n=0,max:a=100,label:l="Label",valueLabel:d,showLabels:i=!0,showSecondaryLabel:u=!0,...c},g)=>{const b=a-n||1,m=Math.min(100,Math.max(0,(s-n)/b*100));return e.jsxs("div",{ref:g,role:"meter","aria-valuenow":s,"aria-valuemin":n,"aria-valuemax":a,"aria-label":l,className:f("flex w-full flex-col gap-2",t),"data-node-id":"7664:31",...c,children:[i?e.jsxs("div",{className:"flex items-center justify-between",children:[l!=null?e.jsx("span",{className:"text-xs font-medium text-foreground",children:l}):null,u?e.jsx("span",{className:"text-xs font-medium text-foreground",children:d??`${Math.round(m)}%`}):null]}):null,e.jsx("div",{className:"relative h-2 w-full overflow-hidden bg-input","data-node-id":"7664:42",children:e.jsx("div",{className:"absolute inset-y-0 left-0 bg-primary transition-[width]",style:{width:`${m}%`},"data-node-id":"7664:44"})})]})});K.displayName="Meter";const I=S.cva("inline-flex shrink-0 items-center justify-center gap-1 rounded-radius-lg text-sm text-foreground transition-colors outline-none focus-visible:ring-[3px] focus-visible:ring-offset-0 focus-visible:ring-disabled/[0.07] disabled:pointer-events-none disabled:opacity-50 data-[state=off]:hover:bg-card/50 data-[state=on]:bg-secondary/[0.64] [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"border border-transparent",outline:"border border-border bg-card shadow-xs"},size:{sm:"h-7 px-1.5",md:"h-8 px-2",lg:"h-9 px-2.5"},iconOnly:{true:"px-0",false:""}},compoundVariants:[{iconOnly:!0,size:"sm",class:"w-7"},{iconOnly:!0,size:"md",class:"w-8"},{iconOnly:!0,size:"lg",class:"w-9"}],defaultVariants:{variant:"default",size:"md",iconOnly:!1}}),$=o.forwardRef(({className:t,variant:s,size:n,iconOnly:a,pressed:l,defaultPressed:d=!1,onPressedChange:i,onClick:u,...c},g)=>{const b=l!==void 0,[m,j]=o.useState(d),x=b?l:m;return e.jsx("button",{ref:g,type:"button","aria-pressed":x,"data-state":x?"on":"off",className:f(I({variant:s,size:n,iconOnly:a}),t),onClick:v=>{b||j(w=>!w),i==null||i(!x),u==null||u(v)},"data-node-id":"5685:204",...c})});$.displayName="Toggle";const H=o.createContext(null),U=o.forwardRef((t,s)=>{const{type:n,variant:a="outline",size:l="md",orientation:d="horizontal",className:i,children:u}=t,c=t.value!==void 0,[g,b]=o.useState(()=>t.defaultValue==null?[]:Array.isArray(t.defaultValue)?t.defaultValue:[t.defaultValue]),m=c?Array.isArray(t.value)?t.value:t.value?[t.value]:[]:g,j=x=>{var w,y;let v;n==="single"?(v=m[0]===x?[]:[x],c||b(v),(w=t.onValueChange)==null||w.call(t,v[0]??"")):(v=m.includes(x)?m.filter(h=>h!==x):[...m,x],c||b(v),(y=t.onValueChange)==null||y.call(t,v))};return e.jsx(H.Provider,{value:{value:m,toggle:j,variant:a,size:l,orientation:d},children:e.jsx("div",{ref:s,role:"group","data-node-id":"5686:270",className:f("inline-flex w-fit overflow-hidden rounded-radius-lg",d==="vertical"?"flex-col [&>*:not(:first-child)]:-mt-px":"flex-row [&>*:not(:first-child)]:-ml-px",i),children:u})})});U.displayName="ToggleGroup";const J=o.forwardRef(({value:t,iconOnly:s,className:n,onClick:a,...l},d)=>{const i=o.useContext(H);if(!i)throw new Error("ToggleGroupItem must be used within ToggleGroup");const u=i.value.includes(t);return e.jsx("button",{ref:d,type:"button","aria-pressed":u,"data-state":u?"on":"off",className:f(I({variant:i.variant,size:i.size,iconOnly:s}),"!rounded-none focus-visible:z-10",n),onClick:c=>{i.toggle(t),a==null||a(c)},...l})});J.displayName="ToggleGroupItem";const Q=S.cva("flex w-full select-none items-center justify-between gap-1 rounded-radius border bg-card text-sm text-foreground shadow-xs transition-colors outline-none focus-visible:ring-[3px] focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-[0.64]",{variants:{inputSize:{sm:"h-7 px-1.5",md:"h-8 px-2",lg:"h-9 px-2"},invalid:{true:"border-destructive focus-visible:ring-destructive/[0.15]",false:"border-input focus-visible:border-disabled/30 focus-visible:ring-disabled/[0.07]"}},defaultVariants:{inputSize:"md",invalid:!1}});function ne({className:t}){return e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:t,"aria-hidden":!0,children:e.jsx("path",{d:"m6 9 6 6 6-6",strokeLinecap:"round",strokeLinejoin:"round"})})}function ae(){return e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",className:"size-4","aria-hidden":!0,children:e.jsx("path",{d:"M20 6 9 17l-5-5",strokeLinecap:"round",strokeLinejoin:"round"})})}const X=o.forwardRef(({options:t,value:s,defaultValue:n,onValueChange:a,placeholder:l="Select…",disabled:d=!1,inputSize:i,invalid:u,className:c,contentClassName:g,id:b,name:m},j)=>{const x=s!==void 0,[v,w]=o.useState(n),y=x?s:v,[h,N]=o.useState(!1),T=o.useRef(null),O=o.useRef(null),R=t.find(r=>r.value===y);o.useEffect(()=>{if(!h)return;const r=p=>{T.current&&!T.current.contains(p.target)&&N(!1)};return document.addEventListener("mousedown",r),()=>document.removeEventListener("mousedown",r)},[h]),o.useEffect(()=>{var k;if(!h)return;const r=(k=O.current)==null?void 0:k.querySelectorAll("[data-select-item]:not([disabled])");if(!(r!=null&&r.length))return;(Array.from(r).find(z=>z.dataset.value===y)??r[0]).focus()},[h,y]);const Y=r=>{x||w(r),a==null||a(r),N(!1)},L=r=>{var V;const p=Array.from(((V=O.current)==null?void 0:V.querySelectorAll("[data-select-item]:not([disabled])"))??[]),k=p.findIndex(Z=>Z===document.activeElement),z=p[(k+r+p.length)%p.length];z==null||z.focus()};return e.jsxs("div",{ref:T,className:"relative",children:[e.jsxs("button",{ref:j,type:"button",id:b,name:m,disabled:d,"aria-haspopup":"listbox","aria-expanded":h,"data-node-id":"7751:1561",className:f(Q({inputSize:i,invalid:u}),c),onClick:()=>N(r=>!r),onKeyDown:r=>{(r.key==="ArrowDown"||r.key==="Enter"||r.key===" ")&&(r.preventDefault(),N(!0))},children:[e.jsx("span",{className:f("truncate",!R&&"text-muted-foreground"),children:R?R.label:l}),e.jsx(ne,{className:f("size-4 shrink-0 opacity-50 transition-transform",h&&"rotate-180")})]}),h&&e.jsx("div",{ref:O,role:"listbox",tabIndex:-1,className:f("absolute left-0 top-full z-50 mt-1 flex max-h-64 w-full flex-col gap-px overflow-auto rounded-radius-xl border border-border bg-popover p-1 shadow-popover",g),onKeyDown:r=>{var p,k;r.key==="Escape"?(N(!1),(k=(p=T.current)==null?void 0:p.querySelector("button"))==null||k.focus()):r.key==="ArrowDown"?(r.preventDefault(),L(1)):r.key==="ArrowUp"&&(r.preventDefault(),L(-1))},children:t.map(r=>{const p=r.value===y;return e.jsxs("button",{type:"button",role:"option","aria-selected":p,disabled:r.disabled,"data-select-item":"","data-value":r.value,className:f("flex h-7 w-full items-center gap-0.5 rounded-radius-lg px-0.5 text-left text-xs font-medium text-accent-foreground outline-none transition-colors","hover:bg-accent focus-visible:bg-accent","disabled:pointer-events-none disabled:opacity-[0.64]",p&&"bg-primary/[0.04]"),onClick:()=>Y(r.value),children:[e.jsx("span",{className:"flex size-7 shrink-0 items-center justify-center",children:p?e.jsx(ae,{}):null}),r.icon?e.jsx("span",{className:"inline-flex size-4 shrink-0 items-center justify-center [&_svg]:size-4",children:r.icon}):null,e.jsx("span",{className:"min-w-0 flex-1 truncate",children:r.label})]},r.value)})})]})});X.displayName="Select";exports.Button=M;exports.Checkbox=A;exports.Field=G;exports.Input=D;exports.InputOTP=B;exports.InputOTPSeparator=W;exports.InputOTPSlot=F;exports.Label=P;exports.Meter=K;exports.Select=X;exports.Toggle=$;exports.ToggleGroup=U;exports.ToggleGroupItem=J;exports.buttonVariants=_;exports.inputVariants=E;exports.selectTriggerVariants=Q;exports.slotVariants=C;exports.toggleVariants=I;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),ut=require("react"),y=require("class-variance-authority"),ft=require("clsx"),xt=require("tailwind-merge"),mt=require("react-dom");function gt(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const s in t)if(s!=="default"){const n=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(r,s,n.get?n:{enumerable:!0,get:()=>t[s]})}}return r.default=t,Object.freeze(r)}const o=gt(ut);function f(...t){return xt.twMerge(ft.clsx(t))}const W=y.cva("inline-flex shrink-0 items-center justify-center gap-0 whitespace-nowrap border font-medium transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"border-primary bg-primary text-primary-foreground shadow-btn hover:bg-primary/90",outline:"border-border bg-card text-foreground shadow-xs hover:bg-secondary/50",secondary:"border-transparent bg-secondary text-foreground hover:bg-secondary/80",destructive:"border-border bg-destructive text-primary-foreground shadow-btn hover:bg-destructive/90","destructive-tinted":"border-transparent bg-destructive/[0.08] text-destructive-foreground hover:bg-destructive/[0.12]",ghost:"border-transparent bg-transparent text-foreground hover:bg-secondary",link:"border-transparent bg-transparent text-foreground underline-offset-4 hover:underline"},size:{xs:"h-6 min-w-6 rounded-radius-lg px-1 text-xs [&_svg]:size-4",sm:"h-7 min-w-7 rounded-radius px-1.5 text-sm [&_svg]:size-4",md:"h-8 min-w-8 rounded-radius px-1.5 text-sm [&_svg]:size-[18px]",lg:"h-9 min-w-9 rounded-radius px-2 text-sm [&_svg]:size-5 [&_[data-label]]:px-1.5",xl:"h-10 min-w-10 rounded-radius px-2.5 text-base [&_svg]:size-5 [&_[data-label]]:px-1.5"}},defaultVariants:{variant:"default",size:"md"}}),I=o.forwardRef(({className:t,variant:r,size:s,type:n="button",icon:a,rightIcon:l,pill:d,children:i,...c},u)=>e.jsxs("button",{ref:u,type:n,className:f(W({variant:r,size:s}),d&&"!rounded-radius-full",t),"data-node-id":"1692:74",...c,children:[a?e.jsx("span",{className:"inline-flex shrink-0 opacity-80",children:a}):null,i!=null?e.jsx("span",{"data-label":!0,className:"px-1",children:i}):null,l?e.jsx("span",{className:"inline-flex shrink-0 opacity-80",children:l}):null]}));I.displayName="Button";const q=o.forwardRef(({checked:t,defaultChecked:r,indeterminate:s=!1,disabled:n=!1,mobile:a=!1,onCheckedChange:l,className:d,...i},c)=>{const u=t!==void 0,[g,x]=o.useState(r??!1),m=u?t:g,v=o.useRef(null);o.useImperativeHandle(c,()=>v.current);const b=m&&!s,h=m&&s;o.useEffect(()=>{v.current&&(v.current.indeterminate=h)},[h]);const k=w=>{const j=w.target.checked;u||x(j),l==null||l(j)};return e.jsxs("label",{className:f("inline-flex shrink-0 items-center justify-center",n?"cursor-not-allowed opacity-[0.64]":"cursor-pointer",d),children:[e.jsx("input",{ref:v,type:"checkbox",className:"peer sr-only",checked:u?t:void 0,defaultChecked:u?void 0:r,disabled:n,onChange:k,...i}),e.jsxs("span",{"aria-hidden":!0,className:f("relative flex items-center justify-center rounded-radius-sm border transition-colors","peer-focus-visible:ring-2 peer-focus-visible:ring-ring peer-focus-visible:ring-offset-1 peer-focus-visible:ring-offset-background",a?"size-[18px]":"size-4",b?"border-transparent bg-primary text-primary-foreground":"border-input bg-card shadow-xs"),children:[b&&e.jsx("svg",{viewBox:"0 0 8 8",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:a?"size-2.5":"size-2","aria-hidden":!0,children:e.jsx("path",{d:"M1 4.2 3 6l4-4.5",strokeLinecap:"round",strokeLinejoin:"round"})}),h&&e.jsx("span",{className:f("h-0.5 rounded-full bg-primary",a?"w-2":"w-1.5")})]})]})});q.displayName="Checkbox";const K=y.cva("flex w-full items-center gap-1 rounded-radius border bg-card text-sm text-foreground shadow-xs transition-colors focus-within:ring-[3px] focus-within:ring-offset-0 has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-[0.64]",{variants:{inputSize:{sm:"h-7 px-1.5",md:"h-8 px-2",lg:"h-9 px-2"},invalid:{true:"border-destructive focus-within:ring-destructive/[0.15]",false:"border-input focus-within:border-disabled/30 focus-within:ring-disabled/[0.07]"}},defaultVariants:{inputSize:"md",invalid:!1}}),$=o.forwardRef(({className:t,containerClassName:r,inputSize:s,invalid:n=!1,leftIcon:a,rightIcon:l,prefix:d,suffix:i,type:c="text",...u},g)=>e.jsxs("div",{className:f(K({inputSize:s,invalid:n}),r),"data-node-id":"7745:699",children:[a?e.jsx("span",{className:"inline-flex shrink-0 opacity-80 [&_svg]:size-4",children:a}):null,d!=null?e.jsx("span",{className:"shrink-0 text-muted-foreground",children:d}):null,e.jsx("input",{ref:g,type:c,className:f("min-w-0 flex-1 bg-transparent px-1 text-foreground outline-none placeholder:text-muted-foreground",t),...u}),i!=null?e.jsx("span",{className:"shrink-0 text-muted-foreground",children:i}):null,l?e.jsx("span",{className:"inline-flex shrink-0 opacity-80 [&_svg]:size-4",children:l}):null]}));$.displayName="Input";const U=o.forwardRef(({className:t,...r},s)=>e.jsx("label",{ref:s,className:f("inline-flex items-center text-xs font-medium text-foreground","peer-disabled:cursor-not-allowed peer-disabled:opacity-70",t),"data-node-id":"7658:2157",...r}));U.displayName="Label";const Z=o.forwardRef(({className:t,label:r,required:s=!1,htmlFor:n,description:a,error:l,validity:d,children:i,...c},u)=>e.jsxs("div",{ref:u,className:f("flex w-full flex-col gap-2",t),"data-node-id":"7745:713",...c,children:[e.jsxs("div",{className:"flex flex-col gap-1.5",children:[r!=null&&e.jsxs("label",{htmlFor:n,className:"flex items-center gap-1.5 text-sm font-medium leading-5 text-foreground",children:[r,s&&e.jsx("span",{className:"text-destructive-foreground","aria-hidden":!0,children:"*"})]}),i]}),l!=null?e.jsx("p",{className:"text-xs leading-[14px] tracking-[0.12px] text-destructive-foreground",children:l}):a!=null?e.jsx("p",{className:"text-xs leading-[14px] tracking-[0.12px] text-muted-foreground",children:a}):null,d!=null&&e.jsx("div",{className:"rounded-radius-lg bg-secondary p-2",children:e.jsx("p",{className:"text-xs leading-[14px] tracking-[0.12px] text-foreground",children:d})})]}));Z.displayName="Field";const J=o.createContext(!1),Q=o.forwardRef(({className:t,isLarge:r=!1,title:s="Verification code",showTitle:n=!0,belowText:a="Enter the 6-digit code sent to your email.",showBelowText:l=!0,children:d,...i},c)=>e.jsx(J.Provider,{value:r,children:e.jsxs("div",{ref:c,className:f("flex flex-col items-center gap-2",t),"data-node-id":"8060:1580",...i,children:[n?e.jsx("p",{className:"w-full text-center text-sm font-medium text-foreground",children:s}):null,e.jsx("div",{className:"flex items-center justify-center gap-2",children:d}),l?e.jsx("p",{className:"w-full text-center text-xs text-muted-foreground",children:a}):null]})}));Q.displayName="InputOTP";const X=y.cva("relative flex shrink-0 items-center justify-center rounded-radius border bg-card text-sm text-foreground shadow-xs transition-[color,box-shadow]",{variants:{isLarge:{true:"size-9",false:"size-8"},active:{true:"z-10 border-disabled/30 ring-[3px] ring-disabled/20",false:"border-input"}},defaultVariants:{isLarge:!1,active:!1}}),Y=o.forwardRef(({className:t,char:r,active:s=!1,isLarge:n,...a},l)=>{const d=o.useContext(J),i=n??d;return e.jsx("div",{ref:l,className:f(X({isLarge:i,active:s}),t),...a,children:r!=null?e.jsx("span",{className:"text-center",children:r}):null})});Y.displayName="InputOTPSlot";const ee=o.forwardRef(({className:t,...r},s)=>e.jsx("div",{ref:s,role:"separator",className:f("flex w-3 shrink-0 items-center justify-center",t),...r,children:e.jsx("div",{className:"h-0.5 w-full rounded-full bg-border"})}));ee.displayName="InputOTPSeparator";const te=o.forwardRef(({className:t,value:r=50,min:s=0,max:n=100,label:a="Label",valueLabel:l,showLabels:d=!0,showSecondaryLabel:i=!0,...c},u)=>{const g=n-s||1,x=Math.min(100,Math.max(0,(r-s)/g*100));return e.jsxs("div",{ref:u,role:"meter","aria-valuenow":r,"aria-valuemin":s,"aria-valuemax":n,"aria-label":a,className:f("flex w-full flex-col gap-2",t),"data-node-id":"7664:31",...c,children:[d?e.jsxs("div",{className:"flex items-center justify-between",children:[a!=null?e.jsx("span",{className:"text-xs font-medium text-foreground",children:a}):null,i?e.jsx("span",{className:"text-xs font-medium text-foreground",children:l??`${Math.round(x)}%`}):null]}):null,e.jsx("div",{className:"relative h-2 w-full overflow-hidden bg-input","data-node-id":"7664:42",children:e.jsx("div",{className:"absolute inset-y-0 left-0 bg-primary transition-[width]",style:{width:`${x}%`},"data-node-id":"7664:44"})})]})});te.displayName="Meter";const _=y.cva("inline-flex shrink-0 items-center justify-center gap-1 rounded-radius-lg text-sm text-foreground transition-colors outline-none focus-visible:ring-[3px] focus-visible:ring-offset-0 focus-visible:ring-disabled/[0.07] disabled:pointer-events-none disabled:opacity-50 data-[state=off]:hover:bg-card/50 data-[state=on]:bg-secondary/[0.64] [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"border border-transparent",outline:"border border-border bg-card shadow-xs"},size:{sm:"h-7 px-1.5",md:"h-8 px-2",lg:"h-9 px-2.5"},iconOnly:{true:"px-0",false:""}},compoundVariants:[{iconOnly:!0,size:"sm",class:"w-7"},{iconOnly:!0,size:"md",class:"w-8"},{iconOnly:!0,size:"lg",class:"w-9"}],defaultVariants:{variant:"default",size:"md",iconOnly:!1}}),re=o.forwardRef(({className:t,variant:r,size:s,iconOnly:n,pressed:a,defaultPressed:l=!1,onPressedChange:d,onClick:i,...c},u)=>{const g=a!==void 0,[x,m]=o.useState(l),v=g?a:x;return e.jsx("button",{ref:u,type:"button","aria-pressed":v,"data-state":v?"on":"off",className:f(_({variant:r,size:s,iconOnly:n}),t),onClick:b=>{g||m(h=>!h),d==null||d(!v),i==null||i(b)},"data-node-id":"5685:204",...c})});re.displayName="Toggle";const se=o.createContext(null),ne=o.forwardRef((t,r)=>{const{type:s,variant:n="outline",size:a="md",orientation:l="horizontal",className:d,children:i}=t,c=t.value!==void 0,[u,g]=o.useState(()=>t.defaultValue==null?[]:Array.isArray(t.defaultValue)?t.defaultValue:[t.defaultValue]),x=c?Array.isArray(t.value)?t.value:t.value?[t.value]:[]:u,m=v=>{var h,k;let b;s==="single"?(b=x[0]===v?[]:[v],c||g(b),(h=t.onValueChange)==null||h.call(t,b[0]??"")):(b=x.includes(v)?x.filter(w=>w!==v):[...x,v],c||g(b),(k=t.onValueChange)==null||k.call(t,b))};return e.jsx(se.Provider,{value:{value:x,toggle:m,variant:n,size:a,orientation:l},children:e.jsx("div",{ref:r,role:"group","data-node-id":"5686:270",className:f("inline-flex w-fit overflow-hidden rounded-radius-lg",l==="vertical"?"flex-col [&>*:not(:first-child)]:-mt-px":"flex-row [&>*:not(:first-child)]:-ml-px",d),children:i})})});ne.displayName="ToggleGroup";const ae=o.forwardRef(({value:t,iconOnly:r,className:s,onClick:n,...a},l)=>{const d=o.useContext(se);if(!d)throw new Error("ToggleGroupItem must be used within ToggleGroup");const i=d.value.includes(t);return e.jsx("button",{ref:l,type:"button","aria-pressed":i,"data-state":i?"on":"off",className:f(_({variant:d.variant,size:d.size,iconOnly:r}),"!rounded-none focus-visible:z-10",s),onClick:c=>{d.toggle(t),n==null||n(c)},...a})});ae.displayName="ToggleGroupItem";const oe=y.cva("flex w-full select-none items-center justify-between gap-1 rounded-radius border bg-card text-sm text-foreground shadow-xs transition-colors outline-none focus-visible:ring-[3px] focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-[0.64]",{variants:{inputSize:{sm:"h-7 px-1.5",md:"h-8 px-2",lg:"h-9 px-2"},invalid:{true:"border-destructive focus-visible:ring-destructive/[0.15]",false:"border-input focus-visible:border-disabled/30 focus-visible:ring-disabled/[0.07]"}},defaultVariants:{inputSize:"md",invalid:!1}});function pt({className:t}){return e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:t,"aria-hidden":!0,children:e.jsx("path",{d:"m6 9 6 6 6-6",strokeLinecap:"round",strokeLinejoin:"round"})})}function bt(){return e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",className:"size-4","aria-hidden":!0,children:e.jsx("path",{d:"M20 6 9 17l-5-5",strokeLinecap:"round",strokeLinejoin:"round"})})}const ie=o.forwardRef(({options:t,value:r,defaultValue:s,onValueChange:n,placeholder:a="Select…",disabled:l=!1,inputSize:d,invalid:i,className:c,contentClassName:u,id:g,name:x},m)=>{const v=r!==void 0,[b,h]=o.useState(s),k=v?r:b,[w,j]=o.useState(!1),D=o.useRef(null),A=o.useRef(null),L=t.find(p=>p.value===k);o.useEffect(()=>{if(!w)return;const p=N=>{D.current&&!D.current.contains(N.target)&&j(!1)};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[w]),o.useEffect(()=>{var S;if(!w)return;const p=(S=A.current)==null?void 0:S.querySelectorAll("[data-select-item]:not([disabled])");if(!(p!=null&&p.length))return;(Array.from(p).find(z=>z.dataset.value===k)??p[0]).focus()},[w,k]);const dt=p=>{v||h(p),n==null||n(p),j(!1)},G=p=>{var F;const N=Array.from(((F=A.current)==null?void 0:F.querySelectorAll("[data-select-item]:not([disabled])"))??[]),S=N.findIndex(ct=>ct===document.activeElement),z=N[(S+p+N.length)%N.length];z==null||z.focus()};return e.jsxs("div",{ref:D,className:"relative",children:[e.jsxs("button",{ref:m,type:"button",id:g,name:x,disabled:l,"aria-haspopup":"listbox","aria-expanded":w,"data-node-id":"7751:1561",className:f(oe({inputSize:d,invalid:i}),c),onClick:()=>j(p=>!p),onKeyDown:p=>{(p.key==="ArrowDown"||p.key==="Enter"||p.key===" ")&&(p.preventDefault(),j(!0))},children:[e.jsx("span",{className:f("truncate",!L&&"text-muted-foreground"),children:L?L.label:a}),e.jsx(pt,{className:f("size-4 shrink-0 opacity-50 transition-transform",w&&"rotate-180")})]}),w&&e.jsx("div",{ref:A,role:"listbox",tabIndex:-1,className:f("absolute left-0 top-full z-50 mt-1 flex max-h-64 w-full flex-col gap-px overflow-auto rounded-radius-xl border border-border bg-popover p-1 shadow-popover",u),onKeyDown:p=>{var N,S;p.key==="Escape"?(j(!1),(S=(N=D.current)==null?void 0:N.querySelector("button"))==null||S.focus()):p.key==="ArrowDown"?(p.preventDefault(),G(1)):p.key==="ArrowUp"&&(p.preventDefault(),G(-1))},children:t.map(p=>{const N=p.value===k;return e.jsxs("button",{type:"button",role:"option","aria-selected":N,disabled:p.disabled,"data-select-item":"","data-value":p.value,className:f("flex h-7 w-full items-center gap-0.5 rounded-radius-lg px-0.5 text-left text-xs font-medium text-accent-foreground outline-none transition-colors","hover:bg-accent focus-visible:bg-accent","disabled:pointer-events-none disabled:opacity-[0.64]",N&&"bg-primary/[0.04]"),onClick:()=>dt(p.value),children:[e.jsx("span",{className:"flex size-7 shrink-0 items-center justify-center",children:N?e.jsx(bt,{}):null}),p.icon?e.jsx("span",{className:"inline-flex size-4 shrink-0 items-center justify-center [&_svg]:size-4",children:p.icon}):null,e.jsx("span",{className:"min-w-0 flex-1 truncate",children:p.label})]},p.value)})})]})});ie.displayName="Select";const le=y.cva("relative inline-flex shrink-0 cursor-pointer items-center rounded-radius-full p-0.5 outline-none transition-colors shadow-[inset_0_2px_4px_0_rgb(0_0_0_/_0.05)] focus-visible:ring-[3px] focus-visible:ring-offset-0 focus-visible:ring-disabled/[0.07] disabled:cursor-not-allowed disabled:opacity-[0.64] data-[state=on]:bg-success data-[state=off]:bg-input",{variants:{size:{md:"h-[18px] w-[30px]",lg:"h-6 w-11"}},defaultVariants:{size:"md"}}),vt=y.cva("pointer-events-none block rounded-radius-full bg-card shadow-xs transition-transform",{variants:{size:{md:"size-[14px] data-[state=on]:translate-x-3",lg:"size-5 data-[state=on]:translate-x-5"}},defaultVariants:{size:"md"}}),de=o.forwardRef(({className:t,size:r,checked:s,defaultChecked:n=!1,onCheckedChange:a,onClick:l,disabled:d,...i},c)=>{const u=s!==void 0,[g,x]=o.useState(n),m=u?s:g,v=m?"on":"off";return e.jsx("button",{ref:c,type:"button",role:"switch","aria-checked":m,disabled:d,"data-state":v,className:f(le({size:r}),t),onClick:b=>{u||x(h=>!h),a==null||a(!m),l==null||l(b)},"data-node-id":"7715:1962",...i,children:e.jsx("span",{"data-state":v,className:vt({size:r})})})});de.displayName="Switch";const ce=o.forwardRef(({className:t,orientation:r="horizontal",decorative:s=!0,...n},a)=>e.jsx("div",{ref:a,role:s?"none":"separator","aria-orientation":s?void 0:r,"data-node-id":"3605:3065",className:f("shrink-0 bg-border",r==="horizontal"?"h-px w-full":"h-full w-px",t),...n}));ce.displayName="Separator";const ue=o.forwardRef(({className:t,...r},s)=>e.jsx("div",{ref:s,"data-node-id":"7669:1885",className:f("animate-pulse rounded-radius-lg bg-secondary",t),...r}));ue.displayName="Skeleton";const fe=y.cva("animate-spin",{variants:{size:{sm:"size-4",md:"size-6",lg:"size-8"}},defaultVariants:{size:"md"}}),C=o.forwardRef(({className:t,size:r,...s},n)=>e.jsxs("svg",{ref:n,viewBox:"0 0 24 24",fill:"none",role:"status","aria-label":"로딩 중","data-node-id":"7707:393",className:f(fe({size:r}),t),...s,children:[e.jsx("circle",{cx:"12",cy:"12",r:"9",stroke:"currentColor",strokeWidth:"2.5",className:"opacity-20"}),e.jsx("path",{d:"M21 12a9 9 0 0 0-9-9",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round"})]}));C.displayName="Spinner";const xe=y.cva("flex w-full resize-y rounded-radius border bg-background text-sm text-foreground shadow-xs outline-none transition-colors placeholder:text-muted-foreground focus-visible:ring-[3px] focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-[0.64]",{variants:{inputSize:{sm:"min-h-16 px-2 py-1",md:"min-h-[76px] px-3 py-1.5",lg:"min-h-24 px-3 py-2"},invalid:{true:"border-destructive focus-visible:ring-destructive/[0.15]",false:"border-input focus-visible:border-disabled/30 focus-visible:ring-disabled/[0.07]"}},defaultVariants:{inputSize:"md",invalid:!1}}),me=o.forwardRef(({className:t,inputSize:r,invalid:s,...n},a)=>e.jsx("textarea",{ref:a,"data-node-id":"7751:1067",className:f(xe({inputSize:r,invalid:s}),t),...n}));me.displayName="Textarea";const ge=y.cva("relative inline-flex shrink-0 select-none items-center justify-center overflow-hidden bg-secondary font-medium text-muted-foreground",{variants:{size:{xs:"size-6 text-xs",sm:"size-7 text-xs",md:"size-8 text-sm",lg:"size-9 text-sm",xl:"size-10 text-base","2xl":"size-12 text-base"},shape:{circle:"rounded-radius-full",square:"rounded-radius"}},defaultVariants:{size:"md",shape:"circle"}}),E=o.forwardRef(({className:t,size:r,shape:s,src:n,alt:a,fallback:l,ring:d,...i},c)=>{const[u,g]=o.useState(!1),x=n&&!u;return e.jsx("div",{ref:c,"data-node-id":"1696:153",className:f(ge({size:r,shape:s}),d&&"ring-2 ring-background",t),...i,children:x?e.jsx("img",{src:n,alt:a,className:"size-full object-cover",onError:()=>g(!0)}):e.jsx("span",{children:l})})});E.displayName="Avatar";const pe=o.forwardRef(({className:t,size:r="md",max:s,children:n,...a},l)=>{const d=o.Children.toArray(n).filter(o.isValidElement),i=s!=null?d.slice(0,s):d,c=s!=null?d.length-i.length:0;return e.jsxs("div",{ref:l,"data-node-id":"1696:220",className:f("flex items-center [&>*:not(:first-child)]:-ml-3",t),...a,children:[i.map((u,g)=>o.cloneElement(u,{key:u.key??g,ring:!0,size:u.props.size??r})),c>0&&e.jsx(E,{size:r,ring:!0,fallback:`+${c}`})]})});pe.displayName="AvatarGroup";const be=y.cva("inline-flex h-5 items-center justify-center gap-1 rounded-radius-full px-2 py-0.5 text-xs font-medium leading-[14px] tracking-[0.12px] whitespace-nowrap",{variants:{color:{info:"",success:"",warning:"",destructive:"",neutral:""},variant:{fill:"",tinted:""}},compoundVariants:[{variant:"fill",color:"info",class:"bg-info text-primary-foreground"},{variant:"fill",color:"success",class:"bg-success text-primary-foreground"},{variant:"fill",color:"warning",class:"bg-warning text-primary-foreground"},{variant:"fill",color:"destructive",class:"bg-destructive text-primary-foreground"},{variant:"fill",color:"neutral",class:"bg-foreground text-background"},{variant:"tinted",color:"info",class:"bg-info/[0.08] text-info-foreground"},{variant:"tinted",color:"success",class:"bg-success/[0.08] text-success-foreground"},{variant:"tinted",color:"warning",class:"bg-warning/[0.08] text-warning-foreground"},{variant:"tinted",color:"destructive",class:"bg-destructive/[0.08] text-destructive-foreground"},{variant:"tinted",color:"neutral",class:"bg-foreground/[0.08] text-foreground"}],defaultVariants:{color:"neutral",variant:"fill"}}),ve=o.forwardRef(({className:t,color:r,variant:s,...n},a)=>e.jsx("span",{ref:a,"data-node-id":"9929:48567",className:f(be({color:r,variant:s}),t),...n}));ve.displayName="Badge";const he=y.cva("flex items-center rounded-radius border border-input bg-background text-foreground shadow-xs transition-colors focus-within:border-disabled/30 focus-within:ring-[3px] focus-within:ring-offset-0 focus-within:ring-disabled/[0.07] has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-[0.64]",{variants:{size:{sm:"h-7",md:"h-8",lg:"h-9"}},defaultVariants:{size:"md"}});function H({dir:t,...r}){return e.jsx("button",{type:"button",tabIndex:-1,className:"inline-flex h-full w-9 shrink-0 items-center justify-center text-foreground transition-colors hover:bg-secondary/50 disabled:opacity-40 [&_svg]:size-4",...r,children:e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":!0,children:t==="dec"?e.jsx("path",{d:"M5 12h14",strokeLinecap:"round"}):e.jsx("path",{d:"M12 5v14M5 12h14",strokeLinecap:"round"})})})}const we=o.forwardRef(({className:t,size:r,value:s,defaultValue:n=0,onValueChange:a,min:l,max:d,step:i=1,disabled:c,...u},g)=>{const x=s!==void 0,[m,v]=o.useState(n),b=x?s:m,h=w=>Math.min(d??1/0,Math.max(l??-1/0,w)),k=w=>{const j=h(w);x||v(j),a==null||a(j)};return e.jsxs("div",{className:f(he({size:r}),t),"data-node-id":"7781:5501",children:[e.jsx(H,{dir:"dec",disabled:c||l!=null&&b<=l,onClick:()=>k(b-i),"aria-label":"감소"}),e.jsx("input",{ref:g,type:"text",inputMode:"numeric",disabled:c,value:b,onChange:w=>{const j=Number(w.target.value);Number.isNaN(j)||k(j)},className:"min-w-0 flex-1 bg-transparent text-center text-sm text-foreground outline-none",...u}),e.jsx(H,{dir:"inc",disabled:c||d!=null&&b>=d,onClick:()=>k(b+i),"aria-label":"증가"})]})});we.displayName="NumberField";const ye=o.createContext(null);let ht=0;const je=o.forwardRef(({className:t,value:r,defaultValue:s,onValueChange:n,name:a,disabled:l,children:d,...i},c)=>{const u=r!==void 0,[g,x]=o.useState(s),m=u?r:g,v=o.useMemo(()=>a??`radio-group-${++ht}`,[a]);return e.jsx(ye.Provider,{value:{value:m,name:v,disabled:l,onValueChange:b=>{u||x(b),n==null||n(b)}},children:e.jsx("div",{ref:c,role:"radiogroup","data-node-id":"7669:1454",className:f("flex flex-col gap-3",t),...i,children:d})})});je.displayName="RadioGroup";const Ne=o.forwardRef(({className:t,value:r,title:s,description:n,disabled:a,cardStyle:l,children:d,...i},c)=>{const u=o.useContext(ye);if(!u)throw new Error("RadioGroupItem must be used within RadioGroup");const g=a||u.disabled,x=u.value===r;return e.jsxs("label",{ref:c,className:f("flex items-start gap-2",l&&"rounded-radius border border-border p-3",g?"cursor-not-allowed opacity-[0.64]":"cursor-pointer",t),...i,children:[e.jsx("input",{type:"radio",name:u.name,value:r,checked:x,disabled:g,onChange:()=>{var m;return(m=u.onValueChange)==null?void 0:m.call(u,r)},className:"peer sr-only"}),e.jsx("span",{"aria-hidden":!0,className:f("mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-radius-full border shadow-xs transition-colors","peer-focus-visible:ring-[3px] peer-focus-visible:ring-offset-0 peer-focus-visible:ring-disabled/[0.07]",x?"border-foreground bg-foreground":"border-input bg-background"),children:x&&e.jsx("span",{className:"size-1.5 rounded-radius-full bg-card"})}),(s!=null||n!=null||d!=null)&&e.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-1.5",children:[s!=null&&e.jsx("span",{className:"text-base leading-6 text-foreground",children:s}),d,n!=null&&e.jsx("span",{className:"text-xs leading-[14px] tracking-[0.12px] text-muted-foreground",children:n})]})]})});Ne.displayName="RadioGroupItem";const wt=y.cva("inline-flex w-full items-center gap-0 bg-background p-0.5",{variants:{segStyle:{rounded:"rounded-radius-full",regular:"rounded-radius",sharp:"rounded-none"}},defaultVariants:{segStyle:"rounded"}}),ke=y.cva("flex flex-1 items-center justify-center gap-1 px-3 py-2 text-sm font-medium outline-none transition-colors focus-visible:ring-[3px] focus-visible:ring-offset-0 focus-visible:ring-disabled/[0.07] focus-visible:z-10 disabled:pointer-events-none disabled:opacity-[0.64]",{variants:{segStyle:{rounded:"rounded-radius-full",regular:"rounded-radius-lg",sharp:"rounded-none"},active:{true:"bg-card text-foreground shadow-xs",false:"text-muted-foreground hover:text-foreground"}},defaultVariants:{segStyle:"rounded",active:!1}}),Se=o.forwardRef(({className:t,options:r,value:s,defaultValue:n,onValueChange:a,segStyle:l,...d},i)=>{var v;const c=s!==void 0,[u,g]=o.useState(n??((v=r[0])==null?void 0:v.value)),x=c?s:u,m=b=>{c||g(b),a==null||a(b)};return e.jsx("div",{ref:i,role:"radiogroup","data-node-id":"9705:88227",className:f(wt({segStyle:l}),t),...d,children:r.map(b=>{const h=b.value===x;return e.jsx("button",{type:"button",role:"radio","aria-checked":h,disabled:b.disabled,className:ke({segStyle:l,active:h}),onClick:()=>m(b.value),children:b.label},b.value)})})});Se.displayName="SegmentedControl";const ze=o.createContext(null),M=()=>{const t=o.useContext(ze);if(!t)throw new Error("Tabs components must be used within <Tabs>");return t},Te=o.forwardRef(({className:t,value:r,defaultValue:s,onValueChange:n,variant:a="default",children:l,...d},i)=>{const c=r!==void 0,[u,g]=o.useState(s),x=c?r:u;return e.jsx(ze.Provider,{value:{value:x,variant:a,setValue:m=>{c||g(m),n==null||n(m)}},children:e.jsx("div",{ref:i,"data-node-id":"7722:82",className:f("flex flex-col gap-3",t),...d,children:l})})});Te.displayName="Tabs";const Re=o.forwardRef(({className:t,...r},s)=>{const{variant:n}=M();return e.jsx("div",{ref:s,role:"tablist",className:f("inline-flex items-center",n==="default"?"gap-0.5 rounded-radius-lg bg-secondary p-0.5":"gap-1 border-b border-border",t),...r})});Re.displayName="TabsList";const De=o.forwardRef(({className:t,value:r,...s},n)=>{const{value:a,setValue:l,variant:d}=M(),i=a===r;return e.jsx("button",{ref:n,type:"button",role:"tab","aria-selected":i,"data-state":i?"active":"inactive",onClick:()=>l(r),className:f("inline-flex min-w-9 items-center justify-center gap-1 text-sm font-medium outline-none transition-colors","focus-visible:ring-[3px] focus-visible:ring-offset-0 focus-visible:ring-disabled/[0.07] disabled:pointer-events-none disabled:opacity-[0.64]",d==="default"?f("rounded-radius-lg px-2 py-1.5",i?"bg-card text-foreground shadow-xs":"text-muted-foreground hover:text-foreground"):f("-mb-px border-b-2 px-2 pb-2",i?"border-foreground text-foreground":"border-transparent text-muted-foreground hover:text-foreground"),t),...s})});De.displayName="TabsTrigger";const Ie=o.forwardRef(({className:t,value:r,...s},n)=>{const{value:a}=M();return a!==r?null:e.jsx("div",{ref:n,role:"tabpanel",className:f("text-sm text-foreground",t),...s})});Ie.displayName="TabsContent";const Ve=o.createContext(null),Ae=o.forwardRef((t,r)=>{const{type:s="single",className:n,children:a}=t,l=t.value!==void 0,[d,i]=o.useState(()=>{const x=t.defaultValue;return x==null?[]:Array.isArray(x)?x:[x]}),c=t.value,u=l?Array.isArray(c)?c:c?[c]:[]:d,g=x=>{var v,b;let m;s==="multiple"?(m=u.includes(x)?u.filter(h=>h!==x):[...u,x],l||i(m),(v=t.onValueChange)==null||v.call(t,m)):(m=u.includes(x)?[]:[x],l||i(m),(b=t.onValueChange)==null||b.call(t,m[0]??""))};return e.jsx(Ve.Provider,{value:{isOpen:x=>u.includes(x),toggle:g},children:e.jsx("div",{ref:r,"data-node-id":"1673:58",className:f("w-full",n),children:a})})});Ae.displayName="Accordion";const Le=o.forwardRef(({className:t,value:r,title:s,icon:n,showSeparator:a=!0,children:l,...d},i)=>{const c=o.useContext(Ve);if(!c)throw new Error("AccordionItem must be used within Accordion");const u=c.isOpen(r);return e.jsxs("div",{ref:i,className:f("w-full",a&&"border-b border-border",t),...d,children:[e.jsxs("button",{type:"button","aria-expanded":u,onClick:()=>c.toggle(r),className:"flex w-full items-center gap-1 py-4 text-left outline-none focus-visible:ring-[3px] focus-visible:ring-offset-0 focus-visible:ring-disabled/[0.07]",children:[e.jsxs("span",{className:"flex flex-1 items-center gap-2.5 text-sm font-medium text-foreground",children:[n?e.jsx("span",{className:"inline-flex shrink-0 [&_svg]:size-5",children:n}):null,s]}),e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":!0,className:f("size-5 shrink-0 text-foreground transition-transform",u&&"rotate-180"),children:e.jsx("path",{d:"m6 9 6 6 6-6",strokeLinecap:"round",strokeLinejoin:"round"})})]}),u&&e.jsx("div",{className:"pb-4 text-sm text-muted-foreground",children:l})]})});Le.displayName="AccordionItem";const _e=o.forwardRef(({className:t,title:r,open:s,defaultOpen:n=!1,onOpenChange:a,disabled:l,children:d,...i},c)=>{const u=s!==void 0,[g,x]=o.useState(n),m=u?s:g;return e.jsxs("div",{ref:c,"data-node-id":"5677:165",className:f("w-full",t),...i,children:[e.jsxs("button",{type:"button","aria-expanded":m,disabled:l,onClick:()=>{u||x(v=>!v),a==null||a(!m)},className:"flex w-full items-center gap-1 text-left text-sm text-foreground outline-none focus-visible:ring-[3px] focus-visible:ring-offset-0 focus-visible:ring-disabled/[0.07] disabled:cursor-not-allowed disabled:opacity-[0.64]",children:[e.jsx("span",{className:"min-w-0 flex-1",children:r}),e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":!0,className:f("size-5 shrink-0 transition-transform",m&&"rotate-180"),children:e.jsx("path",{d:"m6 9 6 6 6-6",strokeLinecap:"round",strokeLinejoin:"round"})})]}),m&&e.jsx("div",{className:"pt-2 text-sm text-muted-foreground",children:d})]})});_e.displayName="Collapsible";function yt(){return e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":!0,className:"size-4 shrink-0 opacity-80",children:e.jsx("path",{d:"m9 18 6-6-6-6",strokeLinecap:"round",strokeLinejoin:"round"})})}const Ce=o.forwardRef(({className:t,items:r,separator:s="chevron",...n},a)=>e.jsx("nav",{ref:a,"aria-label":"breadcrumb","data-node-id":"5665:4391",className:f("flex items-center",t),...n,children:e.jsx("ol",{className:"flex items-center gap-1 text-sm",children:r.map((l,d)=>{const i=d===r.length-1;return e.jsxs("li",{className:"flex items-center gap-1",children:[l.href&&!i?e.jsx("a",{href:l.href,className:"text-muted-foreground transition-colors hover:text-foreground",children:l.label}):e.jsx("span",{className:i?"text-foreground":"text-muted-foreground","aria-current":i?"page":void 0,children:l.label}),!i&&(s==="slash"?e.jsx("span",{className:"text-muted-foreground/60","aria-hidden":!0,children:"/"}):e.jsx("span",{className:"text-muted-foreground","aria-hidden":!0,children:e.jsx(yt,{})}))]},d)})})}));Ce.displayName="Breadcrumb";const Ee=y.cva("relative flex w-full flex-wrap items-center gap-3 overflow-hidden rounded-radius-xl border px-3.5 py-3 text-sm",{variants:{type:{default:"border-border bg-card [&_[data-alert-icon]]:text-foreground",info:"border-info/[0.32] bg-info/[0.04] [&_[data-alert-icon]]:text-info",success:"border-success/[0.32] bg-success/[0.04] [&_[data-alert-icon]]:text-success",warning:"border-warning/[0.32] bg-warning/[0.04] [&_[data-alert-icon]]:text-warning",error:"border-destructive/[0.32] bg-destructive/[0.04] [&_[data-alert-icon]]:text-destructive"}},defaultVariants:{type:"default"}});function Me({type:t}){const r={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,"aria-hidden":!0,className:"size-full"};return e.jsxs("svg",{...r,strokeLinecap:"round",strokeLinejoin:"round",children:[t==="success"&&e.jsxs(e.Fragment,{children:[e.jsx("circle",{cx:"12",cy:"12",r:"9"}),e.jsx("path",{d:"m8.5 12 2.5 2.5 4.5-5"})]}),t==="warning"&&e.jsxs(e.Fragment,{children:[e.jsx("path",{d:"M12 3 2 20h20L12 3Z"}),e.jsx("path",{d:"M12 9v5M12 17.5v.5"})]}),t==="error"&&e.jsxs(e.Fragment,{children:[e.jsx("circle",{cx:"12",cy:"12",r:"9"}),e.jsx("path",{d:"m9 9 6 6M15 9l-6 6"})]}),(t==="info"||t==="default")&&e.jsxs(e.Fragment,{children:[e.jsx("circle",{cx:"12",cy:"12",r:"9"}),e.jsx("path",{d:"M12 11v5M12 8v.5"})]})]})}const Oe=o.forwardRef(({className:t,type:r="default",title:s,icon:n,action:a,children:l,...d},i)=>e.jsxs("div",{ref:i,role:"alert","data-node-id":"5655:4958",className:f(Ee({type:r}),t),...d,children:[e.jsxs("div",{className:"flex min-w-[240px] flex-1 items-start gap-2",children:[n!==!1&&e.jsx("span",{"data-alert-icon":!0,className:"inline-flex size-5 shrink-0 [&_svg]:size-5",children:n??e.jsx(Me,{type:r??"default"})}),e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-1 leading-5",children:[s!=null&&e.jsx("p",{className:"font-medium text-foreground",children:s}),l!=null&&e.jsx("p",{className:"text-muted-foreground",children:l})]})]}),a&&e.jsx("div",{className:"flex shrink-0 items-start gap-2",children:a})]}));Oe.displayName="Alert";const jt=y.cva("inline-flex size-5 shrink-0 [&_svg]:size-5",{variants:{type:{default:"text-foreground",loading:"text-muted-foreground",info:"text-info",success:"text-success",warning:"text-warning",error:"text-destructive"}},defaultVariants:{type:"default"}}),Pe=o.forwardRef(({className:t,type:r="default",title:s,icon:n,action:a,children:l,...d},i)=>{const c=r==="info"||r==="success"||r==="warning"||r==="error"?r:"default",u=n??(r==="loading"?e.jsx(C,{size:"sm"}):e.jsx(Me,{type:c}));return e.jsxs("div",{ref:i,role:"status","data-node-id":"7728:238",className:f("flex w-full flex-wrap items-center gap-3 rounded-radius-xl border border-border bg-popover px-3.5 py-3 text-sm shadow-popover",t),...d,children:[e.jsxs("div",{className:"flex min-w-[240px] flex-1 items-start gap-2",children:[n!==!1&&e.jsx("span",{className:jt({type:r}),children:u}),e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-1 leading-5",children:[s!=null&&e.jsx("p",{className:"font-medium text-foreground",children:s}),l!=null&&e.jsx("p",{className:"text-muted-foreground",children:l})]})]}),a&&e.jsx("div",{className:"flex shrink-0 items-start gap-2",children:a})]})});Pe.displayName="Toast";const Nt={top:"bottom-full left-1/2 mb-1.5 -translate-x-1/2",bottom:"top-full left-1/2 mt-1.5 -translate-x-1/2",left:"right-full top-1/2 mr-1.5 -translate-y-1/2",right:"left-full top-1/2 ml-1.5 -translate-y-1/2"},Be=o.forwardRef(({className:t,content:r,side:s="top",children:n,...a},l)=>e.jsxs("span",{ref:l,className:f("group relative inline-flex",t),...a,children:[n,e.jsx("span",{role:"tooltip",className:f("pointer-events-none absolute z-50 w-max max-w-xs whitespace-nowrap rounded-radius-lg border border-border bg-popover px-2 py-1 text-xs text-popover-foreground opacity-0 shadow-popover transition-opacity duration-150","group-hover:opacity-100 group-focus-within:opacity-100",Nt[s]),children:r})]}));Be.displayName="Tooltip";const Ge=o.forwardRef(({className:t,bordered:r=!0,children:s,...n},a)=>e.jsx("div",{ref:a,"data-node-id":"7669:1745",className:f("max-h-[204px] overflow-auto","[scrollbar-width:thin] [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar]:h-1.5","[&::-webkit-scrollbar-track]:bg-transparent","[&::-webkit-scrollbar-thumb]:rounded-radius-full [&::-webkit-scrollbar-thumb]:bg-foreground/20 hover:[&::-webkit-scrollbar-thumb]:bg-foreground/30",r&&"rounded-radius border border-border px-4 py-2",t),...n,children:s}));Ge.displayName="ScrollArea";function Fe({children:t}){const[r]=o.useState(()=>typeof document<"u"?document.body:null);return r?mt.createPortal(t,r):null}function He(t,r){o.useEffect(()=>{if(!t)return;const s=a=>{a.key==="Escape"&&r()};document.addEventListener("keydown",s);const n=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",s),document.body.style.overflow=n}},[t,r])}const We="fixed inset-0 z-50 bg-[rgb(16_16_18_/_0.32)] backdrop-blur-sm";function O(t,r,s){const n=t!==void 0,[a,l]=o.useState(r),d=n?t:a,i=o.useCallback(c=>{n||l(c),s==null||s(c)},[n,s]);return[d,i]}const kt='a[href],button:not([disabled]),textarea:not([disabled]),input:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])';function qe(t,r){o.useEffect(()=>{if(!t)return;const s=r.current;if(!s)return;const n=document.activeElement,a=()=>Array.from(s.querySelectorAll(kt)).filter(i=>i.offsetParent!==null),l=setTimeout(()=>{const i=r.current;i&&!i.contains(document.activeElement)&&i.focus()},0),d=i=>{if(i.key!=="Tab")return;const c=a();if(c.length===0){i.preventDefault(),s.focus();return}const u=c[0],g=c[c.length-1],x=document.activeElement;i.shiftKey&&(x===u||x===s)?(i.preventDefault(),g.focus()):!i.shiftKey&&x===g&&(i.preventDefault(),u.focus())};return s.addEventListener("keydown",d),()=>{clearTimeout(l),s.removeEventListener("keydown",d),n!=null&&n.isConnected&&n.focus()}},[t,r])}function Ke(){const t=o.useId(),r=o.useId(),[s,n]=o.useState(!1),[a,l]=o.useState(!1);return{titleId:t,descId:r,setHasTitle:n,setHasDesc:l,labelProps:{"aria-labelledby":s?t:void 0,"aria-describedby":a?r:void 0}}}function V(t){o.useEffect(()=>(t(!0),()=>t(!1)),[t])}const $e=o.createContext(null),T=()=>{const t=o.useContext($e);if(!t)throw new Error("Dialog parts must be used within <Dialog>");return t};function Ue({open:t,defaultOpen:r=!1,onOpenChange:s,role:n="dialog",dismissable:a=!0,children:l}){const[d,i]=O(t,r,s),c=Ke();return e.jsx($e.Provider,{value:{open:d,setOpen:i,role:n,dismissable:a,...c},children:l})}const Ze=o.forwardRef(({onClick:t,...r},s)=>{const{setOpen:n}=T();return e.jsx("button",{ref:s,type:"button",onClick:a=>{n(!0),t==null||t(a)},...r})});Ze.displayName="DialogTrigger";const Je=o.forwardRef(({onClick:t,...r},s)=>{const{setOpen:n}=T();return e.jsx("button",{ref:s,type:"button",onClick:a=>{n(!1),t==null||t(a)},...r})});Je.displayName="DialogClose";const P=o.forwardRef(({className:t,showClose:r=!0,children:s,...n},a)=>{const{open:l,setOpen:d,role:i,dismissable:c,labelProps:u}=T(),g=o.useRef(null),x=o.useCallback(m=>{g.current=m,typeof a=="function"?a(m):a&&(a.current=m)},[a]);return He(l,()=>c&&d(!1)),qe(l,g),l?e.jsx(Fe,{children:e.jsx("div",{className:f(We,"flex items-center justify-center p-4"),onClick:()=>c&&d(!1),children:e.jsxs("div",{ref:x,role:i,"aria-modal":!0,tabIndex:-1,...u,onClick:m=>m.stopPropagation(),className:f("relative flex w-full max-w-[448px] flex-col overflow-hidden rounded-radius-2xl border border-border bg-popover shadow-popover outline-none",t),...n,children:[r&&e.jsx("button",{type:"button","aria-label":"닫기",onClick:()=>d(!1),className:"absolute right-4 top-4 inline-flex size-6 items-center justify-center rounded-radius text-muted-foreground transition-colors hover:bg-secondary hover:text-foreground",children:e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"size-4","aria-hidden":!0,children:e.jsx("path",{d:"M18 6 6 18M6 6l12 12",strokeLinecap:"round"})})}),s]})})}):null});P.displayName="DialogContent";const Qe=({className:t,...r})=>e.jsx("div",{className:f("flex flex-col gap-1 p-6",t),...r}),Xe=({className:t,id:r,...s})=>{const{titleId:n,setHasTitle:a}=T();return V(a),e.jsx("h2",{id:r??n,className:f("text-xl font-semibold leading-7 tracking-[-0.2px] text-foreground",t),...s})},Ye=({className:t,id:r,...s})=>{const{descId:n,setHasDesc:a}=T();return V(a),e.jsx("p",{id:r??n,className:f("text-sm leading-5 text-muted-foreground",t),...s})},et=({className:t,...r})=>e.jsx("div",{className:f("flex items-center justify-end gap-2 border-t border-border bg-secondary/[0.72] px-6 py-4",t),...r});function St({open:t,defaultOpen:r=!1,onOpenChange:s,title:n,description:a,cancelText:l="취소",actionText:d="확인",onAction:i,onCancel:c,destructive:u,children:g}){const[x,m]=O(t,r,s);return e.jsx(Ue,{open:x,onOpenChange:m,role:"alertdialog",dismissable:!1,children:e.jsxs(P,{showClose:!1,children:[e.jsxs(Qe,{children:[e.jsx(Xe,{children:n}),a!=null&&e.jsx(Ye,{children:a}),g]}),e.jsxs(et,{children:[e.jsx(I,{variant:"secondary",onClick:()=>{c==null||c(),m(!1)},children:l}),e.jsx(I,{variant:u?"destructive":"default",onClick:()=>{i==null||i(),m(!1)},children:d})]})]})})}const tt=o.createContext(null),R=()=>{const t=o.useContext(tt);if(!t)throw new Error("Sheet parts must be used within <Sheet>");return t};function rt({open:t,defaultOpen:r=!1,onOpenChange:s,children:n}){const[a,l]=O(t,r,s),d=Ke();return e.jsx(tt.Provider,{value:{open:a,setOpen:l,...d},children:n})}const st=o.forwardRef(({onClick:t,...r},s)=>{const{setOpen:n}=R();return e.jsx("button",{ref:s,type:"button",onClick:a=>{n(!0),t==null||t(a)},...r})});st.displayName="SheetTrigger";const nt=o.forwardRef(({onClick:t,...r},s)=>{const{setOpen:n}=R();return e.jsx("button",{ref:s,type:"button",onClick:a=>{n(!1),t==null||t(a)},...r})});nt.displayName="SheetClose";const zt={right:"inset-y-0 right-0 h-full w-full max-w-sm border-l rounded-l-radius-2xl",left:"inset-y-0 left-0 h-full w-full max-w-sm border-r rounded-r-radius-2xl",top:"inset-x-0 top-0 w-full border-b rounded-b-radius-2xl",bottom:"inset-x-0 bottom-0 w-full border-t rounded-t-radius-2xl"},Tt={right:"inset-y-4 right-4 w-full max-w-sm",left:"inset-y-4 left-4 w-full max-w-sm",top:"inset-x-4 top-4",bottom:"inset-x-4 bottom-4"},B=o.forwardRef(({className:t,side:r="right",inset:s=!1,showClose:n=!0,children:a,...l},d)=>{const{open:i,setOpen:c,labelProps:u}=R(),g=o.useRef(null),x=o.useCallback(m=>{g.current=m,typeof d=="function"?d(m):d&&(d.current=m)},[d]);return He(i,()=>c(!1)),qe(i,g),i?e.jsx(Fe,{children:e.jsx("div",{className:We,onClick:()=>c(!1),children:e.jsxs("div",{ref:x,role:"dialog","aria-modal":!0,tabIndex:-1,...u,onClick:m=>m.stopPropagation(),className:f("fixed flex flex-col overflow-auto border-border bg-popover shadow-popover outline-none",s?f(Tt[r],"rounded-radius-2xl border"):zt[r],t),...l,children:[n&&e.jsx("button",{type:"button","aria-label":"닫기",onClick:()=>c(!1),className:"absolute right-4 top-4 inline-flex size-6 items-center justify-center rounded-radius text-muted-foreground transition-colors hover:bg-secondary hover:text-foreground",children:e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"size-4","aria-hidden":!0,children:e.jsx("path",{d:"M18 6 6 18M6 6l12 12",strokeLinecap:"round"})})}),a]})})}):null});B.displayName="SheetContent";const at=({className:t,...r})=>e.jsx("div",{className:f("flex flex-col gap-1 p-6",t),...r}),ot=({className:t,id:r,...s})=>{const{titleId:n,setHasTitle:a}=R();return V(a),e.jsx("h2",{id:r??n,className:f("text-xl font-semibold leading-7 tracking-[-0.2px] text-foreground",t),...s})},it=({className:t,id:r,...s})=>{const{descId:n,setHasDesc:a}=R();return V(a),e.jsx("p",{id:r??n,className:f("text-sm leading-5 text-muted-foreground",t),...s})},lt=({className:t,...r})=>e.jsx("div",{className:f("mt-auto flex items-center justify-end gap-2 border-t border-border px-6 py-4",t),...r});function Rt({open:t,defaultOpen:r,onOpenChange:s,side:n="bottom",inset:a=!0,children:l,...d}){return e.jsx(rt,{open:t,defaultOpen:r,onOpenChange:s,children:e.jsx(B,{side:n,inset:a,...d,children:l})})}exports.Accordion=Ae;exports.AccordionItem=Le;exports.Alert=Oe;exports.AlertDialog=St;exports.Avatar=E;exports.AvatarGroup=pe;exports.Badge=ve;exports.Breadcrumb=Ce;exports.Button=I;exports.Checkbox=q;exports.Collapsible=_e;exports.Dialog=Ue;exports.DialogClose=Je;exports.DialogContent=P;exports.DialogDescription=Ye;exports.DialogFooter=et;exports.DialogHeader=Qe;exports.DialogTitle=Xe;exports.DialogTrigger=Ze;exports.Drawer=Rt;exports.DrawerDescription=it;exports.DrawerFooter=lt;exports.DrawerHeader=at;exports.DrawerTitle=ot;exports.Field=Z;exports.Input=$;exports.InputOTP=Q;exports.InputOTPSeparator=ee;exports.InputOTPSlot=Y;exports.Label=U;exports.Meter=te;exports.NumberField=we;exports.RadioGroup=je;exports.RadioGroupItem=Ne;exports.ScrollArea=Ge;exports.SegmentedControl=Se;exports.Select=ie;exports.Separator=ce;exports.Sheet=rt;exports.SheetClose=nt;exports.SheetContent=B;exports.SheetDescription=it;exports.SheetFooter=lt;exports.SheetHeader=at;exports.SheetTitle=ot;exports.SheetTrigger=st;exports.Skeleton=ue;exports.Spinner=C;exports.Switch=de;exports.Tabs=Te;exports.TabsContent=Ie;exports.TabsList=Re;exports.TabsTrigger=De;exports.Textarea=me;exports.Toast=Pe;exports.Toggle=re;exports.ToggleGroup=ne;exports.ToggleGroupItem=ae;exports.Tooltip=Be;exports.alertVariants=Ee;exports.avatarVariants=ge;exports.badgeVariants=be;exports.buttonVariants=W;exports.inputVariants=K;exports.numberFieldVariants=he;exports.segmentVariants=ke;exports.selectTriggerVariants=oe;exports.slotVariants=X;exports.spinnerVariants=fe;exports.switchVariants=le;exports.textareaVariants=xe;exports.toggleVariants=_;
|