@t3q-ui/design-system 1.70.2 → 1.71.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ <!-- release: v1.71.1 -->
4
+ ## 1.71.1 (2026-11-24)
5
+
6
+
7
+ ### Bug Fixes
8
+
9
+ * **Checkbox:** :bug: checked='indeterminate' 가 빈 상자가 아니라 부분 선택으로 보이게 (9974c4b)
10
+
11
+ <!-- release: v1.71.0 -->
12
+ # 1.71.0 (2026-11-24)
13
+
14
+
15
+ ### Features
16
+
17
+ * **Dialog:** :dizzy: Dialog·AlertDialog 가 0.15초 동안 나타나고 사라지게 (오너 결정 37C) (f36f2ad)
18
+
3
19
  <!-- release: v1.70.2 -->
4
20
  ## 1.70.2 (2026-11-24)
5
21
 
@@ -38,8 +38,9 @@ const AlertDialogOverlay = React__namespace.forwardRef(({ className, ...props },
38
38
  ...props,
39
39
  className: cn.cn(
40
40
  "fixed inset-0 z-[var(--z-index-overlay)] bg-sys-blanket",
41
- "data-[state=open]:animate-[fade-in_0ms_ease-out,zoom-in_0ms_ease-out]",
42
- "data-[state=closed]:animate-[fade-out_0ms_ease-in,zoom-out_0ms_ease-in]",
41
+ // 화면 전체를 덮으므로 fade 만 쓴다. zoom 을 걸면 95% 로 줄어 가장자리가 비친다
42
+ "data-[state=open]:animate-[fade-in_150ms_ease-out]",
43
+ "data-[state=closed]:animate-[fade-out_150ms_ease-in]",
43
44
  className
44
45
  ),
45
46
  ref
@@ -75,8 +76,9 @@ const AlertDialogContent = React__namespace.forwardRef(({ className, width, vari
75
76
  className: cn.cn(
76
77
  "fixed left-[50%] top-[50%] z-[var(--z-index-overlay)] translate-x-[-50%] translate-y-[-50%] w-full max-w-[70vw]",
77
78
  "grid gap-[16px] rounded-medium bg-sys-background p-[32px] shadow-gray-medium duration-200",
78
- "data-[state=open]:animate-[fade-in_0ms_ease-out,zoom-in_0ms_ease-out]",
79
- "data-[state=closed]:animate-[fade-out_0ms_ease-in,zoom-out_0ms_ease-in]",
79
+ // Popover 와 같은 움직임(2026-11-24 결정 37C)
80
+ "data-[state=open]:animate-[fade-in_150ms_ease-out,zoom-in_150ms_ease-out]",
81
+ "data-[state=closed]:animate-[fade-out_150ms_ease-in,zoom-out_150ms_ease-in]",
80
82
  alertDialogContentVariants({ width }),
81
83
  className
82
84
  )
@@ -1 +1 @@
1
- {"version":3,"file":"alertDialog.cjs","sources":["../../src/components/alertDialog.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog'\nimport { cva, VariantProps } from 'class-variance-authority'\nimport { CircleCheck, CircleX, Info, TriangleAlert } from 'lucide-react'\n\nimport { useRestoreFocusToOpener } from './_internal/useRestoreFocusToOpener'\nimport { cn } from '../utils/cn'\nimport { sanitizeUserText } from '../utils/sanitizeUserText'\nimport { Button, buttonVariants } from './button'\nimport { Stack } from './stack'\n\nconst AlertDialog = AlertDialogPrimitive.Root\n\nconst AlertDialogTrigger = AlertDialogPrimitive.Trigger\nconst AlertDialogPortal = AlertDialogPrimitive.Portal\n\nconst AlertDialogOverlay = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Overlay\n {...props}\n className={cn(\n 'fixed inset-0 z-[var(--z-index-overlay)] bg-sys-blanket',\n 'data-[state=open]:animate-[fade-in_0ms_ease-out,zoom-in_0ms_ease-out]',\n 'data-[state=closed]:animate-[fade-out_0ms_ease-in,zoom-out_0ms_ease-in]',\n className,\n )}\n ref={ref}\n />\n))\nAlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName\n\nconst alertDialogContentVariants = cva(null, {\n variants: {\n width: {\n small: 'w-[400px]',\n medium: 'w-[600px]',\n large: 'w-[800px]',\n xlarge: 'w-[1000px]',\n },\n },\n defaultVariants: {\n width: 'small',\n },\n})\n\ntype AlertDialogContextType = {\n variant?: 'success' | 'info' | 'warning' | 'danger'\n}\nconst AlertDialogContext = React.createContext<AlertDialogContextType>({\n variant: 'info',\n})\n\n/**\n * 확인 대화상자 본체. 되돌릴 수 없는 행동 직전의 최종 확인에만 쓴다.\n *\n * 언제 쓰나: 삭제·중지·초기화처럼 결과가 사라지는 행동. 제목에 대상 이름을 넣고, 확인 버튼은 `danger*` variant 로 행동 이름(\"삭제\")을 쓴다.\n * 언제 안 쓰나: 입력이 필요한 작업(→ Dialog), 단순 정보 안내(→ Alert·Toast), 되돌릴 수 있는 행동(확인 없이 실행 후 Toast).\n * 대신/함께: 실수 방지가 더 필요하면 이름을 입력해야 삭제되는 방식을 소비 앱에서 더한다.\n */\nconst AlertDialogContent = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content> &\n VariantProps<typeof alertDialogContentVariants> &\n AlertDialogContextType\n>(({ className, width, variant, onOpenAutoFocus, onCloseAutoFocus, ...props }, ref) => {\n // 닫힐 때 포커스를 연 요소로 돌린다 — Radix 는 Trigger 가 없으면 body 로 떨어뜨린다\n const focusHandlers = useRestoreFocusToOpener({ onOpenAutoFocus, onCloseAutoFocus })\n return (\n <AlertDialogContext.Provider value={{ variant }}>\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Content\n {...props}\n {...focusHandlers}\n ref={ref}\n className={cn(\n 'fixed left-[50%] top-[50%] z-[var(--z-index-overlay)] translate-x-[-50%] translate-y-[-50%] w-full max-w-[70vw]',\n 'grid gap-[16px] rounded-medium bg-sys-background p-[32px] shadow-gray-medium duration-200',\n 'data-[state=open]:animate-[fade-in_0ms_ease-out,zoom-in_0ms_ease-out]',\n 'data-[state=closed]:animate-[fade-out_0ms_ease-in,zoom-out_0ms_ease-in]',\n alertDialogContentVariants({ width }),\n className,\n )}\n />\n </AlertDialogPortal>\n </AlertDialogContext.Provider>\n )\n})\nAlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName\n\nconst AlertDialogHeader = (props: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n {...props}\n className={cn('flex flex-col gap-[16px] text-center sm:text-left', props.className)}\n />\n)\nAlertDialogHeader.displayName = 'AlertDialogHeader'\n\nconst AlertDialogFooter = (props: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n {...props}\n className={cn('flex flex-row justify-end gap-[8px] sm:flex-row', props.className)}\n />\n)\nAlertDialogFooter.displayName = 'AlertDialogFooter'\n\nconst variantToIcon = {\n success: <CircleCheck className='text-success30' />,\n info: <Info className='text-sys-text-subtler' />,\n warning: <TriangleAlert className='text-critical30' />,\n danger: <CircleX className='text-danger30' />,\n} as const\n\nconst AlertDialogTitle = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>\n>(({ children, ...props }, ref) => {\n const { variant } = React.useContext(AlertDialogContext)\n\n return (\n <Stack spacing={8}>\n {variantToIcon[variant || 'info']}\n <AlertDialogPrimitive.Title\n {...props}\n ref={ref}\n className={cn('text-h4 text-sys-text-main whitespace-pre-wrap', props.className)}\n >\n {sanitizeUserText(children)}\n </AlertDialogPrimitive.Title>\n </Stack>\n )\n})\nAlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName\n\nconst AlertDialogDescription = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>\n>(({ children, ...props }, ref) => (\n <AlertDialogPrimitive.Description\n {...props}\n ref={ref}\n className={cn('text-base-regular text-sys-text-main whitespace-pre-wrap', props.className)}\n >\n {sanitizeUserText(children)}\n </AlertDialogPrimitive.Description>\n))\nAlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName\n\nconst AlertDialogAction = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Action>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action> &\n Pick<VariantProps<typeof buttonVariants>, 'variant' | 'loading'>\n>(({ variant, loading, children, ...props }, ref) => {\n const { variant: dialogVariant } = React.useContext(AlertDialogContext)\n\n const buttonVariant = {\n success: 'primaryBold',\n info: 'primaryBold',\n warning: 'warningBold',\n danger: 'dangerBold',\n } as const\n\n return (\n <AlertDialogPrimitive.Action ref={ref} asChild {...props}>\n <Button variant={variant || buttonVariant[dialogVariant || 'info']} loading={loading}>\n {children}\n </Button>\n </AlertDialogPrimitive.Action>\n )\n})\nAlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName\n\nconst AlertDialogCancel = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Cancel>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>\n>(({ children, ...props }, ref) => (\n <AlertDialogPrimitive.Cancel ref={ref} asChild {...props}>\n <Button variant='secondary'>{children}</Button>\n </AlertDialogPrimitive.Cancel>\n))\nAlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName\n\nexport {\n AlertDialog,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogTrigger,\n AlertDialogContent,\n AlertDialogHeader,\n AlertDialogFooter,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogAction,\n AlertDialogCancel,\n}\n"],"names":["AlertDialogPrimitive","React","jsx","cn","cva","useRestoreFocusToOpener","jsxs","CircleCheck","Info","TriangleAlert","CircleX","Stack","Button"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,MAAM,cAAcA,gCAAqB;AAEzC,MAAM,qBAAqBA,gCAAqB;AAChD,MAAM,oBAAoBA,gCAAqB;AAE/C,MAAM,qBAAqBC,iBAAM,WAG/B,CAAC,EAAE,WAAW,GAAG,MAAA,GAAS,QAC1BC,2BAAAA;AAAAA,EAACF,gCAAqB;AAAA,EAArB;AAAA,IACE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AS;AAAA,IAExF,4CAAiB,QAAQ;AAAA,EAAA;AAC5B,CACD;AACD,uBAAuB,cAAcH,gCAAqB,YAAY;AAEtE,MAAM,oBAAoBC,iBAAM,WAI9B,CAAC,EAAE,SAAS,SAAS,UAAU,GAAG,MAAA,GAAS,QAAQ;AACnD,QAAM,EAAE,SAAS,cAAA,IAAkBA,iBAAM,WAAW,kBAAkB;AAEtE,QAAM,gBAAgB;AAAA,IACpB,SAAS;AAAA,IACT,MAAM;AAAA,IACN,SAAS;AAAA,IACT,QAAQ;AAAA,EAAA;AAGV,wCACGD,gCAAqB,QAArB,EAA4B,KAAU,SAAO,MAAE,GAAG,OACjD,yCAACY,OAAAA,QAAA,EAAO,SAAS,WAAW,cAAc,iBAAiB,MAAM,GAAG,SACjE,UACH,GACF;AAEJ,CAAC;AACD,kBAAkB,cAAcZ,gCAAqB,OAAO;AAE5D,MAAM,oBAAoBC,iBAAM,WAG9B,CAAC,EAAE,UAAU,GAAG,MAAA,GAAS,QACzBC,+BAACF,gCAAqB,QAArB,EAA4B,KAAU,SAAO,MAAE,GAAG,OACjD,UAAAE,2BAAAA,IAACU,eAAA,EAAO,SAAQ,aAAa,SAAA,CAAS,EAAA,CACxC,CACD;AACD,kBAAkB,cAAcZ,gCAAqB,OAAO;;;;;;;;;;;;"}
1
+ {"version":3,"file":"alertDialog.cjs","sources":["../../src/components/alertDialog.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog'\nimport { cva, VariantProps } from 'class-variance-authority'\nimport { CircleCheck, CircleX, Info, TriangleAlert } from 'lucide-react'\n\nimport { useRestoreFocusToOpener } from './_internal/useRestoreFocusToOpener'\nimport { cn } from '../utils/cn'\nimport { sanitizeUserText } from '../utils/sanitizeUserText'\nimport { Button, buttonVariants } from './button'\nimport { Stack } from './stack'\n\nconst AlertDialog = AlertDialogPrimitive.Root\n\nconst AlertDialogTrigger = AlertDialogPrimitive.Trigger\nconst AlertDialogPortal = AlertDialogPrimitive.Portal\n\nconst AlertDialogOverlay = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Overlay\n {...props}\n className={cn(\n 'fixed inset-0 z-[var(--z-index-overlay)] bg-sys-blanket',\n // 화면 전체를 덮으므로 fade 만 쓴다. zoom 을 걸면 95% 로 줄어 가장자리가 비친다\n 'data-[state=open]:animate-[fade-in_150ms_ease-out]',\n 'data-[state=closed]:animate-[fade-out_150ms_ease-in]',\n className,\n )}\n ref={ref}\n />\n))\nAlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName\n\nconst alertDialogContentVariants = cva(null, {\n variants: {\n width: {\n small: 'w-[400px]',\n medium: 'w-[600px]',\n large: 'w-[800px]',\n xlarge: 'w-[1000px]',\n },\n },\n defaultVariants: {\n width: 'small',\n },\n})\n\ntype AlertDialogContextType = {\n variant?: 'success' | 'info' | 'warning' | 'danger'\n}\nconst AlertDialogContext = React.createContext<AlertDialogContextType>({\n variant: 'info',\n})\n\n/**\n * 확인 대화상자 본체. 되돌릴 수 없는 행동 직전의 최종 확인에만 쓴다.\n *\n * 언제 쓰나: 삭제·중지·초기화처럼 결과가 사라지는 행동. 제목에 대상 이름을 넣고, 확인 버튼은 `danger*` variant 로 행동 이름(\"삭제\")을 쓴다.\n * 언제 안 쓰나: 입력이 필요한 작업(→ Dialog), 단순 정보 안내(→ Alert·Toast), 되돌릴 수 있는 행동(확인 없이 실행 후 Toast).\n * 대신/함께: 실수 방지가 더 필요하면 이름을 입력해야 삭제되는 방식을 소비 앱에서 더한다.\n */\nconst AlertDialogContent = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content> &\n VariantProps<typeof alertDialogContentVariants> &\n AlertDialogContextType\n>(({ className, width, variant, onOpenAutoFocus, onCloseAutoFocus, ...props }, ref) => {\n // 닫힐 때 포커스를 연 요소로 돌린다 — Radix 는 Trigger 가 없으면 body 로 떨어뜨린다\n const focusHandlers = useRestoreFocusToOpener({ onOpenAutoFocus, onCloseAutoFocus })\n return (\n <AlertDialogContext.Provider value={{ variant }}>\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Content\n {...props}\n {...focusHandlers}\n ref={ref}\n className={cn(\n 'fixed left-[50%] top-[50%] z-[var(--z-index-overlay)] translate-x-[-50%] translate-y-[-50%] w-full max-w-[70vw]',\n 'grid gap-[16px] rounded-medium bg-sys-background p-[32px] shadow-gray-medium duration-200',\n // Popover 와 같은 움직임(2026-11-24 결정 37C)\n 'data-[state=open]:animate-[fade-in_150ms_ease-out,zoom-in_150ms_ease-out]',\n 'data-[state=closed]:animate-[fade-out_150ms_ease-in,zoom-out_150ms_ease-in]',\n alertDialogContentVariants({ width }),\n className,\n )}\n />\n </AlertDialogPortal>\n </AlertDialogContext.Provider>\n )\n})\nAlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName\n\nconst AlertDialogHeader = (props: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n {...props}\n className={cn('flex flex-col gap-[16px] text-center sm:text-left', props.className)}\n />\n)\nAlertDialogHeader.displayName = 'AlertDialogHeader'\n\nconst AlertDialogFooter = (props: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n {...props}\n className={cn('flex flex-row justify-end gap-[8px] sm:flex-row', props.className)}\n />\n)\nAlertDialogFooter.displayName = 'AlertDialogFooter'\n\nconst variantToIcon = {\n success: <CircleCheck className='text-success30' />,\n info: <Info className='text-sys-text-subtler' />,\n warning: <TriangleAlert className='text-critical30' />,\n danger: <CircleX className='text-danger30' />,\n} as const\n\nconst AlertDialogTitle = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>\n>(({ children, ...props }, ref) => {\n const { variant } = React.useContext(AlertDialogContext)\n\n return (\n <Stack spacing={8}>\n {variantToIcon[variant || 'info']}\n <AlertDialogPrimitive.Title\n {...props}\n ref={ref}\n className={cn('text-h4 text-sys-text-main whitespace-pre-wrap', props.className)}\n >\n {sanitizeUserText(children)}\n </AlertDialogPrimitive.Title>\n </Stack>\n )\n})\nAlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName\n\nconst AlertDialogDescription = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>\n>(({ children, ...props }, ref) => (\n <AlertDialogPrimitive.Description\n {...props}\n ref={ref}\n className={cn('text-base-regular text-sys-text-main whitespace-pre-wrap', props.className)}\n >\n {sanitizeUserText(children)}\n </AlertDialogPrimitive.Description>\n))\nAlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName\n\nconst AlertDialogAction = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Action>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action> &\n Pick<VariantProps<typeof buttonVariants>, 'variant' | 'loading'>\n>(({ variant, loading, children, ...props }, ref) => {\n const { variant: dialogVariant } = React.useContext(AlertDialogContext)\n\n const buttonVariant = {\n success: 'primaryBold',\n info: 'primaryBold',\n warning: 'warningBold',\n danger: 'dangerBold',\n } as const\n\n return (\n <AlertDialogPrimitive.Action ref={ref} asChild {...props}>\n <Button variant={variant || buttonVariant[dialogVariant || 'info']} loading={loading}>\n {children}\n </Button>\n </AlertDialogPrimitive.Action>\n )\n})\nAlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName\n\nconst AlertDialogCancel = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Cancel>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>\n>(({ children, ...props }, ref) => (\n <AlertDialogPrimitive.Cancel ref={ref} asChild {...props}>\n <Button variant='secondary'>{children}</Button>\n </AlertDialogPrimitive.Cancel>\n))\nAlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName\n\nexport {\n AlertDialog,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogTrigger,\n AlertDialogContent,\n AlertDialogHeader,\n AlertDialogFooter,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogAction,\n AlertDialogCancel,\n}\n"],"names":["AlertDialogPrimitive","React","jsx","cn","cva","useRestoreFocusToOpener","jsxs","CircleCheck","Info","TriangleAlert","CircleX","Stack","Button"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,MAAM,cAAcA,gCAAqB;AAEzC,MAAM,qBAAqBA,gCAAqB;AAChD,MAAM,oBAAoBA,gCAAqB;AAE/C,MAAM,qBAAqBC,iBAAM,WAG/B,CAAC,EAAE,WAAW,GAAG,MAAA,GAAS,QAC1BC,2BAAAA;AAAAA,EAACF,gCAAqB;AAAA,EAArB;AAAA,IACE,GAAG;AAAA,IACJ,WAAWG,GAAAA;AAAAA,MACT;AAAA;AAAA,MAEA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,IAEF;AAAA,EAAA;AACF,CACD;AACD,mBAAmB,cAAcH,gCAAqB,QAAQ;AAE9D,MAAM,6BAA6BI,uBAAAA,IAAI,MAAM;AAAA,EAC3C,UAAU;AAAA,IACR,OAAO;AAAA,MACL,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,OAAO;AAAA,MACP,QAAQ;AAAA,IAAA;AAAA,EACV;AAAA,EAEF,iBAAiB;AAAA,IACf,OAAO;AAAA,EAAA;AAEX,CAAC;AAKD,MAAM,qBAAqBH,iBAAM,cAAsC;AAAA,EACrE,SAAS;AACX,CAAC;AASD,MAAM,qBAAqBA,iBAAM,WAK/B,CAAC,EAAE,WAAW,OAAO,SAAS,iBAAiB,kBAAkB,GAAG,MAAA,GAAS,QAAQ;AAErF,QAAM,gBAAgBI,wBAAAA,wBAAwB,EAAE,iBAAiB,kBAAkB;AACnF,SACEH,+BAA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,QAArB,EAA4B,KAAU,SAAO,MAAE,GAAG,OACjD,UAAAE,2BAAAA,IAACU,eAAA,EAAO,SAAQ,aAAa,SAAA,CAAS,EAAA,CACxC,CACD;AACD,kBAAkB,cAAcZ,gCAAqB,OAAO;;;;;;;;;;;;"}
@@ -18,8 +18,9 @@ const AlertDialogOverlay = React.forwardRef(({ className, ...props }, ref) => /*
18
18
  ...props,
19
19
  className: cn(
20
20
  "fixed inset-0 z-[var(--z-index-overlay)] bg-sys-blanket",
21
- "data-[state=open]:animate-[fade-in_0ms_ease-out,zoom-in_0ms_ease-out]",
22
- "data-[state=closed]:animate-[fade-out_0ms_ease-in,zoom-out_0ms_ease-in]",
21
+ // 화면 전체를 덮으므로 fade 만 쓴다. zoom 을 걸면 95% 로 줄어 가장자리가 비친다
22
+ "data-[state=open]:animate-[fade-in_150ms_ease-out]",
23
+ "data-[state=closed]:animate-[fade-out_150ms_ease-in]",
23
24
  className
24
25
  ),
25
26
  ref
@@ -55,8 +56,9 @@ const AlertDialogContent = React.forwardRef(({ className, width, variant, onOpen
55
56
  className: cn(
56
57
  "fixed left-[50%] top-[50%] z-[var(--z-index-overlay)] translate-x-[-50%] translate-y-[-50%] w-full max-w-[70vw]",
57
58
  "grid gap-[16px] rounded-medium bg-sys-background p-[32px] shadow-gray-medium duration-200",
58
- "data-[state=open]:animate-[fade-in_0ms_ease-out,zoom-in_0ms_ease-out]",
59
- "data-[state=closed]:animate-[fade-out_0ms_ease-in,zoom-out_0ms_ease-in]",
59
+ // Popover 와 같은 움직임(2026-11-24 결정 37C)
60
+ "data-[state=open]:animate-[fade-in_150ms_ease-out,zoom-in_150ms_ease-out]",
61
+ "data-[state=closed]:animate-[fade-out_150ms_ease-in,zoom-out_150ms_ease-in]",
60
62
  alertDialogContentVariants({ width }),
61
63
  className
62
64
  )
@@ -1 +1 @@
1
- {"version":3,"file":"alertDialog.js","sources":["../../src/components/alertDialog.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog'\nimport { cva, VariantProps } from 'class-variance-authority'\nimport { CircleCheck, CircleX, Info, TriangleAlert } from 'lucide-react'\n\nimport { useRestoreFocusToOpener } from './_internal/useRestoreFocusToOpener'\nimport { cn } from '../utils/cn'\nimport { sanitizeUserText } from '../utils/sanitizeUserText'\nimport { Button, buttonVariants } from './button'\nimport { Stack } from './stack'\n\nconst AlertDialog = AlertDialogPrimitive.Root\n\nconst AlertDialogTrigger = AlertDialogPrimitive.Trigger\nconst AlertDialogPortal = AlertDialogPrimitive.Portal\n\nconst AlertDialogOverlay = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Overlay\n {...props}\n className={cn(\n 'fixed inset-0 z-[var(--z-index-overlay)] bg-sys-blanket',\n 'data-[state=open]:animate-[fade-in_0ms_ease-out,zoom-in_0ms_ease-out]',\n 'data-[state=closed]:animate-[fade-out_0ms_ease-in,zoom-out_0ms_ease-in]',\n className,\n )}\n ref={ref}\n />\n))\nAlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName\n\nconst alertDialogContentVariants = cva(null, {\n variants: {\n width: {\n small: 'w-[400px]',\n medium: 'w-[600px]',\n large: 'w-[800px]',\n xlarge: 'w-[1000px]',\n },\n },\n defaultVariants: {\n width: 'small',\n },\n})\n\ntype AlertDialogContextType = {\n variant?: 'success' | 'info' | 'warning' | 'danger'\n}\nconst AlertDialogContext = React.createContext<AlertDialogContextType>({\n variant: 'info',\n})\n\n/**\n * 확인 대화상자 본체. 되돌릴 수 없는 행동 직전의 최종 확인에만 쓴다.\n *\n * 언제 쓰나: 삭제·중지·초기화처럼 결과가 사라지는 행동. 제목에 대상 이름을 넣고, 확인 버튼은 `danger*` variant 로 행동 이름(\"삭제\")을 쓴다.\n * 언제 안 쓰나: 입력이 필요한 작업(→ Dialog), 단순 정보 안내(→ Alert·Toast), 되돌릴 수 있는 행동(확인 없이 실행 후 Toast).\n * 대신/함께: 실수 방지가 더 필요하면 이름을 입력해야 삭제되는 방식을 소비 앱에서 더한다.\n */\nconst AlertDialogContent = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content> &\n VariantProps<typeof alertDialogContentVariants> &\n AlertDialogContextType\n>(({ className, width, variant, onOpenAutoFocus, onCloseAutoFocus, ...props }, ref) => {\n // 닫힐 때 포커스를 연 요소로 돌린다 — Radix 는 Trigger 가 없으면 body 로 떨어뜨린다\n const focusHandlers = useRestoreFocusToOpener({ onOpenAutoFocus, onCloseAutoFocus })\n return (\n <AlertDialogContext.Provider value={{ variant }}>\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Content\n {...props}\n {...focusHandlers}\n ref={ref}\n className={cn(\n 'fixed left-[50%] top-[50%] z-[var(--z-index-overlay)] translate-x-[-50%] translate-y-[-50%] w-full max-w-[70vw]',\n 'grid gap-[16px] rounded-medium bg-sys-background p-[32px] shadow-gray-medium duration-200',\n 'data-[state=open]:animate-[fade-in_0ms_ease-out,zoom-in_0ms_ease-out]',\n 'data-[state=closed]:animate-[fade-out_0ms_ease-in,zoom-out_0ms_ease-in]',\n alertDialogContentVariants({ width }),\n className,\n )}\n />\n </AlertDialogPortal>\n </AlertDialogContext.Provider>\n )\n})\nAlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName\n\nconst AlertDialogHeader = (props: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n {...props}\n className={cn('flex flex-col gap-[16px] text-center sm:text-left', props.className)}\n />\n)\nAlertDialogHeader.displayName = 'AlertDialogHeader'\n\nconst AlertDialogFooter = (props: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n {...props}\n className={cn('flex flex-row justify-end gap-[8px] sm:flex-row', props.className)}\n />\n)\nAlertDialogFooter.displayName = 'AlertDialogFooter'\n\nconst variantToIcon = {\n success: <CircleCheck className='text-success30' />,\n info: <Info className='text-sys-text-subtler' />,\n warning: <TriangleAlert className='text-critical30' />,\n danger: <CircleX className='text-danger30' />,\n} as const\n\nconst AlertDialogTitle = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>\n>(({ children, ...props }, ref) => {\n const { variant } = React.useContext(AlertDialogContext)\n\n return (\n <Stack spacing={8}>\n {variantToIcon[variant || 'info']}\n <AlertDialogPrimitive.Title\n {...props}\n ref={ref}\n className={cn('text-h4 text-sys-text-main whitespace-pre-wrap', props.className)}\n >\n {sanitizeUserText(children)}\n </AlertDialogPrimitive.Title>\n </Stack>\n )\n})\nAlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName\n\nconst AlertDialogDescription = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>\n>(({ children, ...props }, ref) => (\n <AlertDialogPrimitive.Description\n {...props}\n ref={ref}\n className={cn('text-base-regular text-sys-text-main whitespace-pre-wrap', props.className)}\n >\n {sanitizeUserText(children)}\n </AlertDialogPrimitive.Description>\n))\nAlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName\n\nconst AlertDialogAction = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Action>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action> &\n Pick<VariantProps<typeof buttonVariants>, 'variant' | 'loading'>\n>(({ variant, loading, children, ...props }, ref) => {\n const { variant: dialogVariant } = React.useContext(AlertDialogContext)\n\n const buttonVariant = {\n success: 'primaryBold',\n info: 'primaryBold',\n warning: 'warningBold',\n danger: 'dangerBold',\n } as const\n\n return (\n <AlertDialogPrimitive.Action ref={ref} asChild {...props}>\n <Button variant={variant || buttonVariant[dialogVariant || 'info']} loading={loading}>\n {children}\n </Button>\n </AlertDialogPrimitive.Action>\n )\n})\nAlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName\n\nconst AlertDialogCancel = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Cancel>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>\n>(({ children, ...props }, ref) => (\n <AlertDialogPrimitive.Cancel ref={ref} asChild {...props}>\n <Button variant='secondary'>{children}</Button>\n </AlertDialogPrimitive.Cancel>\n))\nAlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName\n\nexport {\n AlertDialog,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogTrigger,\n AlertDialogContent,\n AlertDialogHeader,\n AlertDialogFooter,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogAction,\n AlertDialogCancel,\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAaA,MAAM,cAAc,qBAAqB;AAEzC,MAAM,qBAAqB,qBAAqB;AAChD,MAAM,oBAAoB,qBAAqB;AAE/C,MAAM,qBAAqB,MAAM,WAG/B,CAAC,EAAE,WAAW,GAAG,MAAA,GAAS,QAC1B;AAAA,EAAC,qBAAqB;AAAA,EAArB;AAAA,IACE,GAAG;AAAA,IACJ,WAAW;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,IAEF;AAAA,EAAA;AACF,CACD;AACD,mBAAmB,cAAc,qBAAqB,QAAQ;AAE9D,MAAM,6BAA6B,IAAI,MAAM;AAAA,EAC3C,UAAU;AAAA,IACR,OAAO;AAAA,MACL,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,OAAO;AAAA,MACP,QAAQ;AAAA,IAAA;AAAA,EACV;AAAA,EAEF,iBAAiB;AAAA,IACf,OAAO;AAAA,EAAA;AAEX,CAAC;AAKD,MAAM,qBAAqB,MAAM,cAAsC;AAAA,EACrE,SAAS;AACX,CAAC;AASD,MAAM,qBAAqB,MAAM,WAK/B,CAAC,EAAE,WAAW,OAAO,SAAS,iBAAiB,kBAAkB,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AqB,OAAO;"}
1
+ {"version":3,"file":"alertDialog.js","sources":["../../src/components/alertDialog.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog'\nimport { cva, VariantProps } from 'class-variance-authority'\nimport { CircleCheck, CircleX, Info, TriangleAlert } from 'lucide-react'\n\nimport { useRestoreFocusToOpener } from './_internal/useRestoreFocusToOpener'\nimport { cn } from '../utils/cn'\nimport { sanitizeUserText } from '../utils/sanitizeUserText'\nimport { Button, buttonVariants } from './button'\nimport { Stack } from './stack'\n\nconst AlertDialog = AlertDialogPrimitive.Root\n\nconst AlertDialogTrigger = AlertDialogPrimitive.Trigger\nconst AlertDialogPortal = AlertDialogPrimitive.Portal\n\nconst AlertDialogOverlay = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Overlay\n {...props}\n className={cn(\n 'fixed inset-0 z-[var(--z-index-overlay)] bg-sys-blanket',\n // 화면 전체를 덮으므로 fade 만 쓴다. zoom 을 걸면 95% 로 줄어 가장자리가 비친다\n 'data-[state=open]:animate-[fade-in_150ms_ease-out]',\n 'data-[state=closed]:animate-[fade-out_150ms_ease-in]',\n className,\n )}\n ref={ref}\n />\n))\nAlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName\n\nconst alertDialogContentVariants = cva(null, {\n variants: {\n width: {\n small: 'w-[400px]',\n medium: 'w-[600px]',\n large: 'w-[800px]',\n xlarge: 'w-[1000px]',\n },\n },\n defaultVariants: {\n width: 'small',\n },\n})\n\ntype AlertDialogContextType = {\n variant?: 'success' | 'info' | 'warning' | 'danger'\n}\nconst AlertDialogContext = React.createContext<AlertDialogContextType>({\n variant: 'info',\n})\n\n/**\n * 확인 대화상자 본체. 되돌릴 수 없는 행동 직전의 최종 확인에만 쓴다.\n *\n * 언제 쓰나: 삭제·중지·초기화처럼 결과가 사라지는 행동. 제목에 대상 이름을 넣고, 확인 버튼은 `danger*` variant 로 행동 이름(\"삭제\")을 쓴다.\n * 언제 안 쓰나: 입력이 필요한 작업(→ Dialog), 단순 정보 안내(→ Alert·Toast), 되돌릴 수 있는 행동(확인 없이 실행 후 Toast).\n * 대신/함께: 실수 방지가 더 필요하면 이름을 입력해야 삭제되는 방식을 소비 앱에서 더한다.\n */\nconst AlertDialogContent = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content> &\n VariantProps<typeof alertDialogContentVariants> &\n AlertDialogContextType\n>(({ className, width, variant, onOpenAutoFocus, onCloseAutoFocus, ...props }, ref) => {\n // 닫힐 때 포커스를 연 요소로 돌린다 — Radix 는 Trigger 가 없으면 body 로 떨어뜨린다\n const focusHandlers = useRestoreFocusToOpener({ onOpenAutoFocus, onCloseAutoFocus })\n return (\n <AlertDialogContext.Provider value={{ variant }}>\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Content\n {...props}\n {...focusHandlers}\n ref={ref}\n className={cn(\n 'fixed left-[50%] top-[50%] z-[var(--z-index-overlay)] translate-x-[-50%] translate-y-[-50%] w-full max-w-[70vw]',\n 'grid gap-[16px] rounded-medium bg-sys-background p-[32px] shadow-gray-medium duration-200',\n // Popover 와 같은 움직임(2026-11-24 결정 37C)\n 'data-[state=open]:animate-[fade-in_150ms_ease-out,zoom-in_150ms_ease-out]',\n 'data-[state=closed]:animate-[fade-out_150ms_ease-in,zoom-out_150ms_ease-in]',\n alertDialogContentVariants({ width }),\n className,\n )}\n />\n </AlertDialogPortal>\n </AlertDialogContext.Provider>\n )\n})\nAlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName\n\nconst AlertDialogHeader = (props: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n {...props}\n className={cn('flex flex-col gap-[16px] text-center sm:text-left', props.className)}\n />\n)\nAlertDialogHeader.displayName = 'AlertDialogHeader'\n\nconst AlertDialogFooter = (props: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n {...props}\n className={cn('flex flex-row justify-end gap-[8px] sm:flex-row', props.className)}\n />\n)\nAlertDialogFooter.displayName = 'AlertDialogFooter'\n\nconst variantToIcon = {\n success: <CircleCheck className='text-success30' />,\n info: <Info className='text-sys-text-subtler' />,\n warning: <TriangleAlert className='text-critical30' />,\n danger: <CircleX className='text-danger30' />,\n} as const\n\nconst AlertDialogTitle = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>\n>(({ children, ...props }, ref) => {\n const { variant } = React.useContext(AlertDialogContext)\n\n return (\n <Stack spacing={8}>\n {variantToIcon[variant || 'info']}\n <AlertDialogPrimitive.Title\n {...props}\n ref={ref}\n className={cn('text-h4 text-sys-text-main whitespace-pre-wrap', props.className)}\n >\n {sanitizeUserText(children)}\n </AlertDialogPrimitive.Title>\n </Stack>\n )\n})\nAlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName\n\nconst AlertDialogDescription = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>\n>(({ children, ...props }, ref) => (\n <AlertDialogPrimitive.Description\n {...props}\n ref={ref}\n className={cn('text-base-regular text-sys-text-main whitespace-pre-wrap', props.className)}\n >\n {sanitizeUserText(children)}\n </AlertDialogPrimitive.Description>\n))\nAlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName\n\nconst AlertDialogAction = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Action>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action> &\n Pick<VariantProps<typeof buttonVariants>, 'variant' | 'loading'>\n>(({ variant, loading, children, ...props }, ref) => {\n const { variant: dialogVariant } = React.useContext(AlertDialogContext)\n\n const buttonVariant = {\n success: 'primaryBold',\n info: 'primaryBold',\n warning: 'warningBold',\n danger: 'dangerBold',\n } as const\n\n return (\n <AlertDialogPrimitive.Action ref={ref} asChild {...props}>\n <Button variant={variant || buttonVariant[dialogVariant || 'info']} loading={loading}>\n {children}\n </Button>\n </AlertDialogPrimitive.Action>\n )\n})\nAlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName\n\nconst AlertDialogCancel = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Cancel>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>\n>(({ children, ...props }, ref) => (\n <AlertDialogPrimitive.Cancel ref={ref} asChild {...props}>\n <Button variant='secondary'>{children}</Button>\n </AlertDialogPrimitive.Cancel>\n))\nAlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName\n\nexport {\n AlertDialog,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogTrigger,\n AlertDialogContent,\n AlertDialogHeader,\n AlertDialogFooter,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogAction,\n AlertDialogCancel,\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAaA,MAAM,cAAc,qBAAqB;AAEzC,MAAM,qBAAqB,qBAAqB;AAChD,MAAM,oBAAoB,qBAAqB;AAE/C,MAAM,qBAAqB,MAAM,WAG/B,CAAC,EAAE,WAAW,GAAG,MAAA,GAAS,QAC1B;AAAA,EAAC,qBAAqB;AAAA,EAArB;AAAA,IACE,GAAG;AAAA,IACJ,WAAW;AAAA,MACT;AAAA;AAAA,MAEA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,IAEF;AAAA,EAAA;AACF,CACD;AACD,mBAAmB,cAAc,qBAAqB,QAAQ;AAE9D,MAAM,6BAA6B,IAAI,MAAM;AAAA,EAC3C,UAAU;AAAA,IACR,OAAO;AAAA,MACL,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,OAAO;AAAA,MACP,QAAQ;AAAA,IAAA;AAAA,EACV;AAAA,EAEF,iBAAiB;AAAA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EAAE,UAAU,GAAG,MAAA,GAAS,QACzB,oBAAC,qBAAqB,QAArB,EAA4B,KAAU,SAAO,MAAE,GAAG,OACjD,UAAA,oBAAC,QAAA,EAAO,SAAQ,aAAa,SAAA,CAAS,EAAA,CACxC,CACD;AACD,kBAAkB,cAAc,qBAAqB,OAAO;"}
@@ -42,7 +42,7 @@ const checkboxVariants = classVarianceAuthority.cva(
42
42
  }
43
43
  );
44
44
  const boxVariants = classVarianceAuthority.cva(
45
- "flex items-center justify-center rounded-xsmall bg-sys-background border-[2px] border-sys-divider-main group-hover/checkbox:bg-secondary-o10 group-focus-visible/checkbox:outline-[2px] group-focus-visible/checkbox:outline-sys-focus-ring-main group-focus-visible/checkbox:outline-offset-[1px] group-data-[state=checked]/checkbox:bg-primary30 group-data-[state=checked]/checkbox:border-primary30 group-data-[state=checked]/checkbox:group-hover/checkbox:bg-primary40 group-data-[state=checked]/checkbox:group-hover/checkbox:border-primary40",
45
+ "flex items-center justify-center rounded-xsmall bg-sys-background border-[2px] border-sys-divider-main group-hover/checkbox:bg-secondary-o10 group-focus-visible/checkbox:outline-[2px] group-focus-visible/checkbox:outline-sys-focus-ring-main group-focus-visible/checkbox:outline-offset-[1px] group-data-[state=checked]/checkbox:bg-primary30 group-data-[state=checked]/checkbox:border-primary30 group-data-[state=checked]/checkbox:group-hover/checkbox:bg-primary40 group-data-[state=checked]/checkbox:group-hover/checkbox:border-primary40 group-data-[state=indeterminate]/checkbox:bg-primary30 group-data-[state=indeterminate]/checkbox:border-primary30 group-data-[state=indeterminate]/checkbox:group-hover/checkbox:bg-primary40 group-data-[state=indeterminate]/checkbox:group-hover/checkbox:border-primary40",
46
46
  {
47
47
  variants: {
48
48
  size: {
@@ -63,35 +63,50 @@ const Checkbox = React__namespace.forwardRef(
63
63
  className: cn.cn(checkboxVariants({ size }), className),
64
64
  ...indeterminate && props.checked === true ? { "aria-checked": "mixed" } : {},
65
65
  ...props,
66
- children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: boxVariants({ size }), children: /* @__PURE__ */ jsxRuntime.jsx(
67
- CheckboxPrimitive__namespace.Indicator,
68
- {
69
- className: cn.cn("flex items-center justify-center text-current"),
70
- children: indeterminate ? /* @__PURE__ */ jsxRuntime.jsx(IndeterminateIcon, { size }) : /* @__PURE__ */ jsxRuntime.jsx(CheckIcon, { size })
71
- }
72
- ) })
66
+ children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: boxVariants({ size }), children: /* @__PURE__ */ jsxRuntime.jsxs(CheckboxPrimitive__namespace.Indicator, { className: "flex items-center justify-center text-current", children: [
67
+ /* @__PURE__ */ jsxRuntime.jsx(CheckIcon, { size, className: "group-aria-[checked=mixed]/checkbox:hidden" }),
68
+ /* @__PURE__ */ jsxRuntime.jsx(
69
+ IndeterminateIcon,
70
+ {
71
+ size,
72
+ className: "hidden group-aria-[checked=mixed]/checkbox:block"
73
+ }
74
+ )
75
+ ] }) })
73
76
  }
74
77
  );
75
78
  }
76
79
  );
77
80
  Checkbox.displayName = CheckboxPrimitive__namespace.Root.displayName;
78
- function CheckIcon({ size }) {
81
+ function CheckIcon({ size, className }) {
79
82
  if (!size) return null;
80
83
  switch (size) {
81
84
  case "small":
82
- return /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "8", height: "6", viewBox: "0 0 8 6", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntime.jsx(
83
- "path",
85
+ return /* @__PURE__ */ jsxRuntime.jsx(
86
+ "svg",
84
87
  {
85
- fillRule: "evenodd",
86
- clipRule: "evenodd",
87
- d: "M7.22148 0.621289C7.51437 0.914182 7.51437 1.38906 7.22148 1.68195L3.43693 5.4665C3.43528 5.46817 3.43363 5.46984 3.43197 5.47151C3.28494 5.61853 3.09206 5.69175 2.89936 5.69117C2.70817 5.69061 2.51714 5.61739 2.37126 5.47151C2.3696 5.46984 2.36794 5.46817 2.3663 5.4665L0.780317 3.88052C0.487423 3.58762 0.487423 3.11275 0.780317 2.81986C1.07321 2.52696 1.54808 2.52696 1.84098 2.81986L2.90161 3.88049L6.16082 0.621289C6.45371 0.328396 6.92858 0.328396 7.22148 0.621289Z",
88
- fill: "var(--color-sys-background)"
88
+ className,
89
+ width: "8",
90
+ height: "6",
91
+ viewBox: "0 0 8 6",
92
+ fill: "none",
93
+ xmlns: "http://www.w3.org/2000/svg",
94
+ children: /* @__PURE__ */ jsxRuntime.jsx(
95
+ "path",
96
+ {
97
+ fillRule: "evenodd",
98
+ clipRule: "evenodd",
99
+ d: "M7.22148 0.621289C7.51437 0.914182 7.51437 1.38906 7.22148 1.68195L3.43693 5.4665C3.43528 5.46817 3.43363 5.46984 3.43197 5.47151C3.28494 5.61853 3.09206 5.69175 2.89936 5.69117C2.70817 5.69061 2.51714 5.61739 2.37126 5.47151C2.3696 5.46984 2.36794 5.46817 2.3663 5.4665L0.780317 3.88052C0.487423 3.58762 0.487423 3.11275 0.780317 2.81986C1.07321 2.52696 1.54808 2.52696 1.84098 2.81986L2.90161 3.88049L6.16082 0.621289C6.45371 0.328396 6.92858 0.328396 7.22148 0.621289Z",
100
+ fill: "var(--color-sys-background)"
101
+ }
102
+ )
89
103
  }
90
- ) });
104
+ );
91
105
  case "medium":
92
106
  return /* @__PURE__ */ jsxRuntime.jsx(
93
107
  "svg",
94
108
  {
109
+ className,
95
110
  width: "10",
96
111
  height: "8",
97
112
  viewBox: "0 0 10 8",
@@ -112,6 +127,7 @@ function CheckIcon({ size }) {
112
127
  return /* @__PURE__ */ jsxRuntime.jsx(
113
128
  "svg",
114
129
  {
130
+ className,
115
131
  width: "14",
116
132
  height: "12",
117
133
  viewBox: "0 0 14 12",
@@ -130,23 +146,35 @@ function CheckIcon({ size }) {
130
146
  );
131
147
  }
132
148
  }
133
- function IndeterminateIcon({ size }) {
149
+ function IndeterminateIcon({ size, className }) {
134
150
  if (!size) return null;
135
151
  switch (size) {
136
152
  case "small":
137
- return /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "8", height: "2", viewBox: "0 0 8 2", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntime.jsx(
138
- "path",
153
+ return /* @__PURE__ */ jsxRuntime.jsx(
154
+ "svg",
139
155
  {
140
- fillRule: "evenodd",
141
- clipRule: "evenodd",
142
- d: "M0.25 1C0.25 0.585786 0.585787 0.25 1 0.25H7C7.41421 0.25 7.75 0.585786 7.75 1C7.75 1.41421 7.41421 1.75 7 1.75H1C0.585786 1.75 0.25 1.41421 0.25 1Z",
143
- fill: "var(--color-sys-background)"
156
+ className,
157
+ width: "8",
158
+ height: "2",
159
+ viewBox: "0 0 8 2",
160
+ fill: "none",
161
+ xmlns: "http://www.w3.org/2000/svg",
162
+ children: /* @__PURE__ */ jsxRuntime.jsx(
163
+ "path",
164
+ {
165
+ fillRule: "evenodd",
166
+ clipRule: "evenodd",
167
+ d: "M0.25 1C0.25 0.585786 0.585787 0.25 1 0.25H7C7.41421 0.25 7.75 0.585786 7.75 1C7.75 1.41421 7.41421 1.75 7 1.75H1C0.585786 1.75 0.25 1.41421 0.25 1Z",
168
+ fill: "var(--color-sys-background)"
169
+ }
170
+ )
144
171
  }
145
- ) });
172
+ );
146
173
  case "medium":
147
174
  return /* @__PURE__ */ jsxRuntime.jsx(
148
175
  "svg",
149
176
  {
177
+ className,
150
178
  width: "10",
151
179
  height: "2",
152
180
  viewBox: "0 0 10 2",
@@ -167,6 +195,7 @@ function IndeterminateIcon({ size }) {
167
195
  return /* @__PURE__ */ jsxRuntime.jsx(
168
196
  "svg",
169
197
  {
198
+ className,
170
199
  width: "16",
171
200
  height: "4",
172
201
  viewBox: "0 0 16 4",
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox.cjs","sources":["../../src/components/checkbox.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox'\nimport { cva, VariantProps } from 'class-variance-authority'\n\nimport { cn } from '../utils/cn'\n\nconst defaultVariants = {\n size: 'medium',\n} as const\n\n// 누르는 영역(버튼)과 보이는 상자(안쪽 span)를 나눈다 — small 은 상자 12px 그대로 누르는 영역만 24px (WCAG 2.5.8, 2026-11-23 3A)\nconst checkboxVariants = cva(\n 'peer group/checkbox shrink-0 inline-flex items-center justify-center outline-none disabled:cursor-not-allowed disabled:opacity-50',\n {\n variants: {\n size: {\n // 늘린 6px 씩을 음수 margin 으로 되돌려 옆 요소 자리는 그대로\n small: 'size-[24px] -m-[6px]',\n medium: 'size-[16px]',\n large: 'size-[24px]',\n },\n },\n defaultVariants,\n },\n)\n\nconst boxVariants = cva(\n 'flex items-center justify-center rounded-xsmall bg-sys-background border-[2px] border-sys-divider-main group-hover/checkbox:bg-secondary-o10 group-focus-visible/checkbox:outline-[2px] group-focus-visible/checkbox:outline-sys-focus-ring-main group-focus-visible/checkbox:outline-offset-[1px] group-data-[state=checked]/checkbox:bg-primary30 group-data-[state=checked]/checkbox:border-primary30 group-data-[state=checked]/checkbox:group-hover/checkbox:bg-primary40 group-data-[state=checked]/checkbox:group-hover/checkbox:border-primary40',\n {\n variants: {\n size: {\n small: 'size-[12px]',\n medium: 'size-[16px]',\n large: 'size-[24px]',\n },\n },\n defaultVariants,\n },\n)\n\nexport interface CheckboxProps\n extends\n React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>,\n VariantProps<typeof checkboxVariants> {\n /** 부분 선택 표시(−)와 aria-checked=\"mixed\". `checked` 와 함께 쓴다 — checked 가 아니면 빈 상자 */\n indeterminate?: boolean\n}\n\n/**\n * 켜기/끄기 또는 여러 항목 중 복수 선택. 폼의 동의·옵션 플래그와 표의 행 선택에 쓴다.\n *\n * 언제 쓰나: 서로 독립인 옵션을 여러 개 고를 때. 표의 행 선택은 AgGridTable 이 rowSelection 을 켜면 이 Checkbox 를 쓴 HeaderCheckboxRenderer·RowCheckboxRenderer 를 자동으로 넣으므로 셀에 직접 넣지 않는다(바꾸려면 그 렌더러를 감싼다).\n * 언제 안 쓰나: 하나만 골라야 할 때(→ Radio·RadioGroup), 켜기/끄기 하나의 설정(→ SwitchSection·Switch — 폼 제출값이어도), 선택지마다 제목·설명이 붙는 복수 선택(→ CheckboxSectionGroup), 선택지가 많을 때(→ MultiSelect).\n * 대신/함께: 라벨은 `Label` 또는 `FormLabel` 로 연결해 클릭 영역을 넓힌다.\n */\nconst Checkbox = React.forwardRef<React.ElementRef<typeof CheckboxPrimitive.Root>, CheckboxProps>(\n ({ className, size = defaultVariants.size, indeterminate = false, ...props }, ref) => {\n return (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(checkboxVariants({ size }), className)}\n // 아이콘만 바뀌고 \"선택됨\" 으로 읽히던 것 — 상태(onCheckedChange 값)는 그대로 두고 알리는 값만 mixed.\n // undefined 를 넘기면 Radix 가 단 aria-checked 를 지우므로 mixed 일 때만 넘긴다\n {...(indeterminate && props.checked === true ? { 'aria-checked': 'mixed' as const } : {})}\n {...props}\n >\n <span className={boxVariants({ size })}>\n <CheckboxPrimitive.Indicator\n className={cn('flex items-center justify-center text-current')}\n >\n {indeterminate ? <IndeterminateIcon size={size} /> : <CheckIcon size={size} />}\n </CheckboxPrimitive.Indicator>\n </span>\n </CheckboxPrimitive.Root>\n )\n },\n)\nCheckbox.displayName = CheckboxPrimitive.Root.displayName\n\nexport { Checkbox }\n\nfunction CheckIcon({ size }: VariantProps<typeof checkboxVariants>) {\n if (!size) return null\n switch (size) {\n case 'small':\n return (\n <svg width='8' height='6' viewBox='0 0 8 6' fill='none' xmlns='http://www.w3.org/2000/svg'>\n <path\n fillRule='evenodd'\n clipRule='evenodd'\n d='M7.22148 0.621289C7.51437 0.914182 7.51437 1.38906 7.22148 1.68195L3.43693 5.4665C3.43528 5.46817 3.43363 5.46984 3.43197 5.47151C3.28494 5.61853 3.09206 5.69175 2.89936 5.69117C2.70817 5.69061 2.51714 5.61739 2.37126 5.47151C2.3696 5.46984 2.36794 5.46817 2.3663 5.4665L0.780317 3.88052C0.487423 3.58762 0.487423 3.11275 0.780317 2.81986C1.07321 2.52696 1.54808 2.52696 1.84098 2.81986L2.90161 3.88049L6.16082 0.621289C6.45371 0.328396 6.92858 0.328396 7.22148 0.621289Z'\n fill='var(--color-sys-background)'\n />\n </svg>\n )\n case 'medium':\n return (\n <svg\n width='10'\n height='8'\n viewBox='0 0 10 8'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n >\n <path\n fillRule='evenodd'\n clipRule='evenodd'\n d='M9.2953 0.828385C9.68583 1.21891 9.68583 1.85207 9.2953 2.2426L4.24923 7.28867C4.24704 7.2909 4.24484 7.29313 4.24262 7.29534C4.04812 7.48985 3.79342 7.58748 3.53848 7.58823C3.28155 7.589 3.02438 7.49137 2.82835 7.29534C2.82614 7.29313 2.82394 7.29092 2.82176 7.28869L0.707088 5.17402C0.316564 4.7835 0.316564 4.15033 0.707088 3.75981C1.09761 3.36928 1.73078 3.36928 2.1213 3.75981L3.53549 5.17399L7.88109 0.828385C8.27161 0.437861 8.90478 0.437861 9.2953 0.828385Z'\n fill='var(--color-sys-background)'\n />\n </svg>\n )\n\n case 'large':\n return (\n <svg\n width='14'\n height='12'\n viewBox='0 0 14 12'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n >\n <path\n fillRule='evenodd'\n clipRule='evenodd'\n d='M13.4431 1.24258C14.0289 1.82836 14.0289 2.77811 13.4431 3.3639L5.87394 10.933C5.87066 10.9364 5.86737 10.9397 5.86406 10.943C5.57001 11.2371 5.18425 11.3835 4.79885 11.3823C4.41645 11.3812 4.03441 11.2348 3.74264 10.943C3.73934 10.9397 3.73606 10.9364 3.7328 10.9331L0.560755 7.76103C-0.025032 7.17525 -0.025032 6.2255 0.560755 5.63971C1.14654 5.05393 2.09629 5.05393 2.68207 5.63971L4.80335 7.76099L11.3218 1.24258C11.9075 0.656792 12.8573 0.656791 13.4431 1.24258Z'\n fill='var(--color-sys-background)'\n />\n </svg>\n )\n }\n}\n\nfunction IndeterminateIcon({ size }: VariantProps<typeof checkboxVariants>) {\n if (!size) return null\n switch (size) {\n case 'small':\n return (\n <svg width='8' height='2' viewBox='0 0 8 2' fill='none' xmlns='http://www.w3.org/2000/svg'>\n <path\n fillRule='evenodd'\n clipRule='evenodd'\n d='M0.25 1C0.25 0.585786 0.585787 0.25 1 0.25H7C7.41421 0.25 7.75 0.585786 7.75 1C7.75 1.41421 7.41421 1.75 7 1.75H1C0.585786 1.75 0.25 1.41421 0.25 1Z'\n fill='var(--color-sys-background)'\n />\n </svg>\n )\n\n case 'medium':\n return (\n <svg\n width='10'\n height='2'\n viewBox='0 0 10 2'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n >\n <path\n fillRule='evenodd'\n clipRule='evenodd'\n d='M0 1C0 0.447715 0.447715 0 1 0H9C9.55229 0 10 0.447715 10 1C10 1.55228 9.55228 2 9 2H1C0.447715 2 0 1.55228 0 1Z'\n fill='var(--color-sys-background)'\n />\n </svg>\n )\n\n case 'large':\n return (\n <svg\n width='16'\n height='4'\n viewBox='0 0 16 4'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n >\n <path\n fillRule='evenodd'\n clipRule='evenodd'\n d='M0.5 2C0.5 1.17157 1.17157 0.5 2 0.5H14C14.8284 0.5 15.5 1.17157 15.5 2C15.5 2.82843 14.8284 3.5 14 3.5H2C1.17157 3.5 0.5 2.82843 0.5 2Z'\n fill='var(--color-sys-background)'\n />\n </svg>\n )\n }\n}\n"],"names":["cva","React","jsx","CheckboxPrimitive","cn"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,MAAM,kBAAkB;AAAA,EACtB,MAAM;AACR;AAGA,MAAM,mBAAmBA,uBAAAA;AAAAA,EACvB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,MAAM;AAAA;AAAA,QAEJ,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,OAAO;AAAA,MAAA;AAAA,IACT;AAAA,IAEF;AAAA,EAAA;AAEJ;AAEA,MAAM,cAAcA,uBAAAA;AAAAA,EAClB;AAAA,EACA;AAAA,I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AA;AAAA,QACP;AAAA,MAAA;AAAA,IAIN,KAAK;AACH,aACEA,2BAAAA;AAAAA,QAAC;AAAA,QAAA;AAAA,UACC,OAAM;AAAA,UACN,QAAO;AAAA,UACP,SAAQ;AAAA,UACR,MAAK;AAAA,UACL,OAAM;AAAA,UAEN,UAAAA,2BAAAA;AAAAA,YAAC;AAAA,YAAA;AAAA,cACC,UAAS;AAAA,cACT,UAAS;AAAA,cACT,GAAE;AAAA,cACF,MAAK;AAAA,YAAA;AAAA,UAAA;AAAA,QACP;AAAA,MAAA;AAAA,EACF;AAGR;;"}
1
+ {"version":3,"file":"checkbox.cjs","sources":["../../src/components/checkbox.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox'\nimport { cva, VariantProps } from 'class-variance-authority'\n\nimport { cn } from '../utils/cn'\n\nconst defaultVariants = {\n size: 'medium',\n} as const\n\n// 누르는 영역(버튼)과 보이는 상자(안쪽 span)를 나눈다 — small 은 상자 12px 그대로 누르는 영역만 24px (WCAG 2.5.8, 2026-11-23 3A)\nconst checkboxVariants = cva(\n 'peer group/checkbox shrink-0 inline-flex items-center justify-center outline-none disabled:cursor-not-allowed disabled:opacity-50',\n {\n variants: {\n size: {\n // 늘린 6px 씩을 음수 margin 으로 되돌려 옆 요소 자리는 그대로\n small: 'size-[24px] -m-[6px]',\n medium: 'size-[16px]',\n large: 'size-[24px]',\n },\n },\n defaultVariants,\n },\n)\n\nconst boxVariants = cva(\n 'flex items-center justify-center rounded-xsmall bg-sys-background border-[2px] border-sys-divider-main group-hover/checkbox:bg-secondary-o10 group-focus-visible/checkbox:outline-[2px] group-focus-visible/checkbox:outline-sys-focus-ring-main group-focus-visible/checkbox:outline-offset-[1px] group-data-[state=checked]/checkbox:bg-primary30 group-data-[state=checked]/checkbox:border-primary30 group-data-[state=checked]/checkbox:group-hover/checkbox:bg-primary40 group-data-[state=checked]/checkbox:group-hover/checkbox:border-primary40 group-data-[state=indeterminate]/checkbox:bg-primary30 group-data-[state=indeterminate]/checkbox:border-primary30 group-data-[state=indeterminate]/checkbox:group-hover/checkbox:bg-primary40 group-data-[state=indeterminate]/checkbox:group-hover/checkbox:border-primary40',\n {\n variants: {\n size: {\n small: 'size-[12px]',\n medium: 'size-[16px]',\n large: 'size-[24px]',\n },\n },\n defaultVariants,\n },\n)\n\nexport interface CheckboxProps\n extends\n React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>,\n VariantProps<typeof checkboxVariants> {\n /** 부분 선택 표시(−)와 aria-checked=\"mixed\". `checked` 와 함께 쓴다 — checked 가 아니면 빈 상자. `checked='indeterminate'` 도 같은 모양 */\n indeterminate?: boolean\n}\n\n/**\n * 켜기/끄기 또는 여러 항목 중 복수 선택. 폼의 동의·옵션 플래그와 표의 행 선택에 쓴다.\n *\n * 언제 쓰나: 서로 독립인 옵션을 여러 개 고를 때. 표의 행 선택은 AgGridTable 이 rowSelection 을 켜면 이 Checkbox 를 쓴 HeaderCheckboxRenderer·RowCheckboxRenderer 를 자동으로 넣으므로 셀에 직접 넣지 않는다(바꾸려면 그 렌더러를 감싼다).\n * 언제 안 쓰나: 하나만 골라야 할 때(→ Radio·RadioGroup), 켜기/끄기 하나의 설정(→ SwitchSection·Switch — 폼 제출값이어도), 선택지마다 제목·설명이 붙는 복수 선택(→ CheckboxSectionGroup), 선택지가 많을 때(→ MultiSelect).\n * 대신/함께: 라벨은 `Label` 또는 `FormLabel` 로 연결해 클릭 영역을 넓힌다.\n */\nconst Checkbox = React.forwardRef<React.ElementRef<typeof CheckboxPrimitive.Root>, CheckboxProps>(\n ({ className, size = defaultVariants.size, indeterminate = false, ...props }, ref) => {\n return (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(checkboxVariants({ size }), className)}\n // 아이콘만 바뀌고 \"선택됨\" 으로 읽히던 것 — 상태(onCheckedChange 값)는 그대로 두고 알리는 값만 mixed.\n // undefined 를 넘기면 Radix 가 단 aria-checked 를 지우므로 mixed 일 때만 넘긴다\n {...(indeterminate && props.checked === true ? { 'aria-checked': 'mixed' as const } : {})}\n {...props}\n >\n <span className={boxVariants({ size })}>\n <CheckboxPrimitive.Indicator className='flex items-center justify-center text-current'>\n {/* 그림은 aria-checked 를 따른다 — indeterminate prop 과 checked='indeterminate'(비제어 포함)를 함께 잡는 값이 이것뿐이다 */}\n <CheckIcon size={size} className='group-aria-[checked=mixed]/checkbox:hidden' />\n <IndeterminateIcon\n size={size}\n className='hidden group-aria-[checked=mixed]/checkbox:block'\n />\n </CheckboxPrimitive.Indicator>\n </span>\n </CheckboxPrimitive.Root>\n )\n },\n)\nCheckbox.displayName = CheckboxPrimitive.Root.displayName\n\nexport { Checkbox }\n\ntype IconProps = VariantProps<typeof checkboxVariants> & { className?: string }\n\nfunction CheckIcon({ size, className }: IconProps) {\n if (!size) return null\n switch (size) {\n case 'small':\n return (\n <svg\n className={className}\n width='8'\n height='6'\n viewBox='0 0 8 6'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n >\n <path\n fillRule='evenodd'\n clipRule='evenodd'\n d='M7.22148 0.621289C7.51437 0.914182 7.51437 1.38906 7.22148 1.68195L3.43693 5.4665C3.43528 5.46817 3.43363 5.46984 3.43197 5.47151C3.28494 5.61853 3.09206 5.69175 2.89936 5.69117C2.70817 5.69061 2.51714 5.61739 2.37126 5.47151C2.3696 5.46984 2.36794 5.46817 2.3663 5.4665L0.780317 3.88052C0.487423 3.58762 0.487423 3.11275 0.780317 2.81986C1.07321 2.52696 1.54808 2.52696 1.84098 2.81986L2.90161 3.88049L6.16082 0.621289C6.45371 0.328396 6.92858 0.328396 7.22148 0.621289Z'\n fill='var(--color-sys-background)'\n />\n </svg>\n )\n case 'medium':\n return (\n <svg\n className={className}\n width='10'\n height='8'\n viewBox='0 0 10 8'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n >\n <path\n fillRule='evenodd'\n clipRule='evenodd'\n d='M9.2953 0.828385C9.68583 1.21891 9.68583 1.85207 9.2953 2.2426L4.24923 7.28867C4.24704 7.2909 4.24484 7.29313 4.24262 7.29534C4.04812 7.48985 3.79342 7.58748 3.53848 7.58823C3.28155 7.589 3.02438 7.49137 2.82835 7.29534C2.82614 7.29313 2.82394 7.29092 2.82176 7.28869L0.707088 5.17402C0.316564 4.7835 0.316564 4.15033 0.707088 3.75981C1.09761 3.36928 1.73078 3.36928 2.1213 3.75981L3.53549 5.17399L7.88109 0.828385C8.27161 0.437861 8.90478 0.437861 9.2953 0.828385Z'\n fill='var(--color-sys-background)'\n />\n </svg>\n )\n\n case 'large':\n return (\n <svg\n className={className}\n width='14'\n height='12'\n viewBox='0 0 14 12'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n >\n <path\n fillRule='evenodd'\n clipRule='evenodd'\n d='M13.4431 1.24258C14.0289 1.82836 14.0289 2.77811 13.4431 3.3639L5.87394 10.933C5.87066 10.9364 5.86737 10.9397 5.86406 10.943C5.57001 11.2371 5.18425 11.3835 4.79885 11.3823C4.41645 11.3812 4.03441 11.2348 3.74264 10.943C3.73934 10.9397 3.73606 10.9364 3.7328 10.9331L0.560755 7.76103C-0.025032 7.17525 -0.025032 6.2255 0.560755 5.63971C1.14654 5.05393 2.09629 5.05393 2.68207 5.63971L4.80335 7.76099L11.3218 1.24258C11.9075 0.656792 12.8573 0.656791 13.4431 1.24258Z'\n fill='var(--color-sys-background)'\n />\n </svg>\n )\n }\n}\n\nfunction IndeterminateIcon({ size, className }: IconProps) {\n if (!size) return null\n switch (size) {\n case 'small':\n return (\n <svg\n className={className}\n width='8'\n height='2'\n viewBox='0 0 8 2'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n >\n <path\n fillRule='evenodd'\n clipRule='evenodd'\n d='M0.25 1C0.25 0.585786 0.585787 0.25 1 0.25H7C7.41421 0.25 7.75 0.585786 7.75 1C7.75 1.41421 7.41421 1.75 7 1.75H1C0.585786 1.75 0.25 1.41421 0.25 1Z'\n fill='var(--color-sys-background)'\n />\n </svg>\n )\n\n case 'medium':\n return (\n <svg\n className={className}\n width='10'\n height='2'\n viewBox='0 0 10 2'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n >\n <path\n fillRule='evenodd'\n clipRule='evenodd'\n d='M0 1C0 0.447715 0.447715 0 1 0H9C9.55229 0 10 0.447715 10 1C10 1.55228 9.55228 2 9 2H1C0.447715 2 0 1.55228 0 1Z'\n fill='var(--color-sys-background)'\n />\n </svg>\n )\n\n case 'large':\n return (\n <svg\n className={className}\n width='16'\n height='4'\n viewBox='0 0 16 4'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n >\n <path\n fillRule='evenodd'\n clipRule='evenodd'\n d='M0.5 2C0.5 1.17157 1.17157 0.5 2 0.5H14C14.8284 0.5 15.5 1.17157 15.5 2C15.5 2.82843 14.8284 3.5 14 3.5H2C1.17157 3.5 0.5 2.82843 0.5 2Z'\n fill='var(--color-sys-background)'\n />\n </svg>\n )\n }\n}\n"],"names":["cva","React","jsx","CheckboxPrimitive","cn","jsxs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,MAAM,kBAAkB;AAAA,EACtB,MAAM;AACR;AAGA,MAAM,mBAAmBA,uBAAAA;AAAAA,EACvB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,MAAM;AAAA;AAAA,QAEJ,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,OAAO;AAAA,MAAA;AAAA,IACT;AAAA,IAEF;AAAA,EAAA;AAEJ;AAEA,MAAM,cAAcA,uBAAAA;AAAAA,EAClB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,MAAM;AAAA,QACJ,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,OAAO;AAAA,MAAA;AAAA,IACT;AAAA,IAEF;AAAA,EAAA;AAEJ;AAiBA,MAAM,WAAWC,iBAAM;AAAA,EACrB,CAAC,EAAE,WAAW,OAAO,gBAAgB,MAAM,gBAAgB,OAAO,GAAG,MAAA,GAAS,QAAQ;AACpF,WACE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AAAA,IAIN,KAAK;AACH,aACEA,2BAAAA;AAAAA,QAAC;AAAA,QAAA;AAAA,UACC;AAAA,UACA,OAAM;AAAA,UACN,QAAO;AAAA,UACP,SAAQ;AAAA,UACR,MAAK;AAAA,UACL,OAAM;AAAA,UAEN,UAAAA,2BAAAA;AAAAA,YAAC;AAAA,YAAA;AAAA,cACC,UAAS;AAAA,cACT,UAAS;AAAA,cACT,GAAE;AAAA,cACF,MAAK;AAAA,YAAA;AAAA,UAAA;AAAA,QACP;AAAA,MAAA;AAAA,EACF;AAGR;;"}
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { jsx } from "react/jsx-runtime";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
4
  import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
5
5
  import { cva } from "class-variance-authority";
@@ -22,7 +22,7 @@ const checkboxVariants = cva(
22
22
  }
23
23
  );
24
24
  const boxVariants = cva(
25
- "flex items-center justify-center rounded-xsmall bg-sys-background border-[2px] border-sys-divider-main group-hover/checkbox:bg-secondary-o10 group-focus-visible/checkbox:outline-[2px] group-focus-visible/checkbox:outline-sys-focus-ring-main group-focus-visible/checkbox:outline-offset-[1px] group-data-[state=checked]/checkbox:bg-primary30 group-data-[state=checked]/checkbox:border-primary30 group-data-[state=checked]/checkbox:group-hover/checkbox:bg-primary40 group-data-[state=checked]/checkbox:group-hover/checkbox:border-primary40",
25
+ "flex items-center justify-center rounded-xsmall bg-sys-background border-[2px] border-sys-divider-main group-hover/checkbox:bg-secondary-o10 group-focus-visible/checkbox:outline-[2px] group-focus-visible/checkbox:outline-sys-focus-ring-main group-focus-visible/checkbox:outline-offset-[1px] group-data-[state=checked]/checkbox:bg-primary30 group-data-[state=checked]/checkbox:border-primary30 group-data-[state=checked]/checkbox:group-hover/checkbox:bg-primary40 group-data-[state=checked]/checkbox:group-hover/checkbox:border-primary40 group-data-[state=indeterminate]/checkbox:bg-primary30 group-data-[state=indeterminate]/checkbox:border-primary30 group-data-[state=indeterminate]/checkbox:group-hover/checkbox:bg-primary40 group-data-[state=indeterminate]/checkbox:group-hover/checkbox:border-primary40",
26
26
  {
27
27
  variants: {
28
28
  size: {
@@ -43,35 +43,50 @@ const Checkbox = React.forwardRef(
43
43
  className: cn(checkboxVariants({ size }), className),
44
44
  ...indeterminate && props.checked === true ? { "aria-checked": "mixed" } : {},
45
45
  ...props,
46
- children: /* @__PURE__ */ jsx("span", { className: boxVariants({ size }), children: /* @__PURE__ */ jsx(
47
- CheckboxPrimitive.Indicator,
48
- {
49
- className: cn("flex items-center justify-center text-current"),
50
- children: indeterminate ? /* @__PURE__ */ jsx(IndeterminateIcon, { size }) : /* @__PURE__ */ jsx(CheckIcon, { size })
51
- }
52
- ) })
46
+ children: /* @__PURE__ */ jsx("span", { className: boxVariants({ size }), children: /* @__PURE__ */ jsxs(CheckboxPrimitive.Indicator, { className: "flex items-center justify-center text-current", children: [
47
+ /* @__PURE__ */ jsx(CheckIcon, { size, className: "group-aria-[checked=mixed]/checkbox:hidden" }),
48
+ /* @__PURE__ */ jsx(
49
+ IndeterminateIcon,
50
+ {
51
+ size,
52
+ className: "hidden group-aria-[checked=mixed]/checkbox:block"
53
+ }
54
+ )
55
+ ] }) })
53
56
  }
54
57
  );
55
58
  }
56
59
  );
57
60
  Checkbox.displayName = CheckboxPrimitive.Root.displayName;
58
- function CheckIcon({ size }) {
61
+ function CheckIcon({ size, className }) {
59
62
  if (!size) return null;
60
63
  switch (size) {
61
64
  case "small":
62
- return /* @__PURE__ */ jsx("svg", { width: "8", height: "6", viewBox: "0 0 8 6", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx(
63
- "path",
65
+ return /* @__PURE__ */ jsx(
66
+ "svg",
64
67
  {
65
- fillRule: "evenodd",
66
- clipRule: "evenodd",
67
- d: "M7.22148 0.621289C7.51437 0.914182 7.51437 1.38906 7.22148 1.68195L3.43693 5.4665C3.43528 5.46817 3.43363 5.46984 3.43197 5.47151C3.28494 5.61853 3.09206 5.69175 2.89936 5.69117C2.70817 5.69061 2.51714 5.61739 2.37126 5.47151C2.3696 5.46984 2.36794 5.46817 2.3663 5.4665L0.780317 3.88052C0.487423 3.58762 0.487423 3.11275 0.780317 2.81986C1.07321 2.52696 1.54808 2.52696 1.84098 2.81986L2.90161 3.88049L6.16082 0.621289C6.45371 0.328396 6.92858 0.328396 7.22148 0.621289Z",
68
- fill: "var(--color-sys-background)"
68
+ className,
69
+ width: "8",
70
+ height: "6",
71
+ viewBox: "0 0 8 6",
72
+ fill: "none",
73
+ xmlns: "http://www.w3.org/2000/svg",
74
+ children: /* @__PURE__ */ jsx(
75
+ "path",
76
+ {
77
+ fillRule: "evenodd",
78
+ clipRule: "evenodd",
79
+ d: "M7.22148 0.621289C7.51437 0.914182 7.51437 1.38906 7.22148 1.68195L3.43693 5.4665C3.43528 5.46817 3.43363 5.46984 3.43197 5.47151C3.28494 5.61853 3.09206 5.69175 2.89936 5.69117C2.70817 5.69061 2.51714 5.61739 2.37126 5.47151C2.3696 5.46984 2.36794 5.46817 2.3663 5.4665L0.780317 3.88052C0.487423 3.58762 0.487423 3.11275 0.780317 2.81986C1.07321 2.52696 1.54808 2.52696 1.84098 2.81986L2.90161 3.88049L6.16082 0.621289C6.45371 0.328396 6.92858 0.328396 7.22148 0.621289Z",
80
+ fill: "var(--color-sys-background)"
81
+ }
82
+ )
69
83
  }
70
- ) });
84
+ );
71
85
  case "medium":
72
86
  return /* @__PURE__ */ jsx(
73
87
  "svg",
74
88
  {
89
+ className,
75
90
  width: "10",
76
91
  height: "8",
77
92
  viewBox: "0 0 10 8",
@@ -92,6 +107,7 @@ function CheckIcon({ size }) {
92
107
  return /* @__PURE__ */ jsx(
93
108
  "svg",
94
109
  {
110
+ className,
95
111
  width: "14",
96
112
  height: "12",
97
113
  viewBox: "0 0 14 12",
@@ -110,23 +126,35 @@ function CheckIcon({ size }) {
110
126
  );
111
127
  }
112
128
  }
113
- function IndeterminateIcon({ size }) {
129
+ function IndeterminateIcon({ size, className }) {
114
130
  if (!size) return null;
115
131
  switch (size) {
116
132
  case "small":
117
- return /* @__PURE__ */ jsx("svg", { width: "8", height: "2", viewBox: "0 0 8 2", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx(
118
- "path",
133
+ return /* @__PURE__ */ jsx(
134
+ "svg",
119
135
  {
120
- fillRule: "evenodd",
121
- clipRule: "evenodd",
122
- d: "M0.25 1C0.25 0.585786 0.585787 0.25 1 0.25H7C7.41421 0.25 7.75 0.585786 7.75 1C7.75 1.41421 7.41421 1.75 7 1.75H1C0.585786 1.75 0.25 1.41421 0.25 1Z",
123
- fill: "var(--color-sys-background)"
136
+ className,
137
+ width: "8",
138
+ height: "2",
139
+ viewBox: "0 0 8 2",
140
+ fill: "none",
141
+ xmlns: "http://www.w3.org/2000/svg",
142
+ children: /* @__PURE__ */ jsx(
143
+ "path",
144
+ {
145
+ fillRule: "evenodd",
146
+ clipRule: "evenodd",
147
+ d: "M0.25 1C0.25 0.585786 0.585787 0.25 1 0.25H7C7.41421 0.25 7.75 0.585786 7.75 1C7.75 1.41421 7.41421 1.75 7 1.75H1C0.585786 1.75 0.25 1.41421 0.25 1Z",
148
+ fill: "var(--color-sys-background)"
149
+ }
150
+ )
124
151
  }
125
- ) });
152
+ );
126
153
  case "medium":
127
154
  return /* @__PURE__ */ jsx(
128
155
  "svg",
129
156
  {
157
+ className,
130
158
  width: "10",
131
159
  height: "2",
132
160
  viewBox: "0 0 10 2",
@@ -147,6 +175,7 @@ function IndeterminateIcon({ size }) {
147
175
  return /* @__PURE__ */ jsx(
148
176
  "svg",
149
177
  {
178
+ className,
150
179
  width: "16",
151
180
  height: "4",
152
181
  viewBox: "0 0 16 4",
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox.js","sources":["../../src/components/checkbox.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox'\nimport { cva, VariantProps } from 'class-variance-authority'\n\nimport { cn } from '../utils/cn'\n\nconst defaultVariants = {\n size: 'medium',\n} as const\n\n// 누르는 영역(버튼)과 보이는 상자(안쪽 span)를 나눈다 — small 은 상자 12px 그대로 누르는 영역만 24px (WCAG 2.5.8, 2026-11-23 3A)\nconst checkboxVariants = cva(\n 'peer group/checkbox shrink-0 inline-flex items-center justify-center outline-none disabled:cursor-not-allowed disabled:opacity-50',\n {\n variants: {\n size: {\n // 늘린 6px 씩을 음수 margin 으로 되돌려 옆 요소 자리는 그대로\n small: 'size-[24px] -m-[6px]',\n medium: 'size-[16px]',\n large: 'size-[24px]',\n },\n },\n defaultVariants,\n },\n)\n\nconst boxVariants = cva(\n 'flex items-center justify-center rounded-xsmall bg-sys-background border-[2px] border-sys-divider-main group-hover/checkbox:bg-secondary-o10 group-focus-visible/checkbox:outline-[2px] group-focus-visible/checkbox:outline-sys-focus-ring-main group-focus-visible/checkbox:outline-offset-[1px] group-data-[state=checked]/checkbox:bg-primary30 group-data-[state=checked]/checkbox:border-primary30 group-data-[state=checked]/checkbox:group-hover/checkbox:bg-primary40 group-data-[state=checked]/checkbox:group-hover/checkbox:border-primary40',\n {\n variants: {\n size: {\n small: 'size-[12px]',\n medium: 'size-[16px]',\n large: 'size-[24px]',\n },\n },\n defaultVariants,\n },\n)\n\nexport interface CheckboxProps\n extends\n React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>,\n VariantProps<typeof checkboxVariants> {\n /** 부분 선택 표시(−)와 aria-checked=\"mixed\". `checked` 와 함께 쓴다 — checked 가 아니면 빈 상자 */\n indeterminate?: boolean\n}\n\n/**\n * 켜기/끄기 또는 여러 항목 중 복수 선택. 폼의 동의·옵션 플래그와 표의 행 선택에 쓴다.\n *\n * 언제 쓰나: 서로 독립인 옵션을 여러 개 고를 때. 표의 행 선택은 AgGridTable 이 rowSelection 을 켜면 이 Checkbox 를 쓴 HeaderCheckboxRenderer·RowCheckboxRenderer 를 자동으로 넣으므로 셀에 직접 넣지 않는다(바꾸려면 그 렌더러를 감싼다).\n * 언제 안 쓰나: 하나만 골라야 할 때(→ Radio·RadioGroup), 켜기/끄기 하나의 설정(→ SwitchSection·Switch — 폼 제출값이어도), 선택지마다 제목·설명이 붙는 복수 선택(→ CheckboxSectionGroup), 선택지가 많을 때(→ MultiSelect).\n * 대신/함께: 라벨은 `Label` 또는 `FormLabel` 로 연결해 클릭 영역을 넓힌다.\n */\nconst Checkbox = React.forwardRef<React.ElementRef<typeof CheckboxPrimitive.Root>, CheckboxProps>(\n ({ className, size = defaultVariants.size, indeterminate = false, ...props }, ref) => {\n return (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(checkboxVariants({ size }), className)}\n // 아이콘만 바뀌고 \"선택됨\" 으로 읽히던 것 — 상태(onCheckedChange 값)는 그대로 두고 알리는 값만 mixed.\n // undefined 를 넘기면 Radix 가 단 aria-checked 를 지우므로 mixed 일 때만 넘긴다\n {...(indeterminate && props.checked === true ? { 'aria-checked': 'mixed' as const } : {})}\n {...props}\n >\n <span className={boxVariants({ size })}>\n <CheckboxPrimitive.Indicator\n className={cn('flex items-center justify-center text-current')}\n >\n {indeterminate ? <IndeterminateIcon size={size} /> : <CheckIcon size={size} />}\n </CheckboxPrimitive.Indicator>\n </span>\n </CheckboxPrimitive.Root>\n )\n },\n)\nCheckbox.displayName = CheckboxPrimitive.Root.displayName\n\nexport { Checkbox }\n\nfunction CheckIcon({ size }: VariantProps<typeof checkboxVariants>) {\n if (!size) return null\n switch (size) {\n case 'small':\n return (\n <svg width='8' height='6' viewBox='0 0 8 6' fill='none' xmlns='http://www.w3.org/2000/svg'>\n <path\n fillRule='evenodd'\n clipRule='evenodd'\n d='M7.22148 0.621289C7.51437 0.914182 7.51437 1.38906 7.22148 1.68195L3.43693 5.4665C3.43528 5.46817 3.43363 5.46984 3.43197 5.47151C3.28494 5.61853 3.09206 5.69175 2.89936 5.69117C2.70817 5.69061 2.51714 5.61739 2.37126 5.47151C2.3696 5.46984 2.36794 5.46817 2.3663 5.4665L0.780317 3.88052C0.487423 3.58762 0.487423 3.11275 0.780317 2.81986C1.07321 2.52696 1.54808 2.52696 1.84098 2.81986L2.90161 3.88049L6.16082 0.621289C6.45371 0.328396 6.92858 0.328396 7.22148 0.621289Z'\n fill='var(--color-sys-background)'\n />\n </svg>\n )\n case 'medium':\n return (\n <svg\n width='10'\n height='8'\n viewBox='0 0 10 8'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n >\n <path\n fillRule='evenodd'\n clipRule='evenodd'\n d='M9.2953 0.828385C9.68583 1.21891 9.68583 1.85207 9.2953 2.2426L4.24923 7.28867C4.24704 7.2909 4.24484 7.29313 4.24262 7.29534C4.04812 7.48985 3.79342 7.58748 3.53848 7.58823C3.28155 7.589 3.02438 7.49137 2.82835 7.29534C2.82614 7.29313 2.82394 7.29092 2.82176 7.28869L0.707088 5.17402C0.316564 4.7835 0.316564 4.15033 0.707088 3.75981C1.09761 3.36928 1.73078 3.36928 2.1213 3.75981L3.53549 5.17399L7.88109 0.828385C8.27161 0.437861 8.90478 0.437861 9.2953 0.828385Z'\n fill='var(--color-sys-background)'\n />\n </svg>\n )\n\n case 'large':\n return (\n <svg\n width='14'\n height='12'\n viewBox='0 0 14 12'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n >\n <path\n fillRule='evenodd'\n clipRule='evenodd'\n d='M13.4431 1.24258C14.0289 1.82836 14.0289 2.77811 13.4431 3.3639L5.87394 10.933C5.87066 10.9364 5.86737 10.9397 5.86406 10.943C5.57001 11.2371 5.18425 11.3835 4.79885 11.3823C4.41645 11.3812 4.03441 11.2348 3.74264 10.943C3.73934 10.9397 3.73606 10.9364 3.7328 10.9331L0.560755 7.76103C-0.025032 7.17525 -0.025032 6.2255 0.560755 5.63971C1.14654 5.05393 2.09629 5.05393 2.68207 5.63971L4.80335 7.76099L11.3218 1.24258C11.9075 0.656792 12.8573 0.656791 13.4431 1.24258Z'\n fill='var(--color-sys-background)'\n />\n </svg>\n )\n }\n}\n\nfunction IndeterminateIcon({ size }: VariantProps<typeof checkboxVariants>) {\n if (!size) return null\n switch (size) {\n case 'small':\n return (\n <svg width='8' height='2' viewBox='0 0 8 2' fill='none' xmlns='http://www.w3.org/2000/svg'>\n <path\n fillRule='evenodd'\n clipRule='evenodd'\n d='M0.25 1C0.25 0.585786 0.585787 0.25 1 0.25H7C7.41421 0.25 7.75 0.585786 7.75 1C7.75 1.41421 7.41421 1.75 7 1.75H1C0.585786 1.75 0.25 1.41421 0.25 1Z'\n fill='var(--color-sys-background)'\n />\n </svg>\n )\n\n case 'medium':\n return (\n <svg\n width='10'\n height='2'\n viewBox='0 0 10 2'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n >\n <path\n fillRule='evenodd'\n clipRule='evenodd'\n d='M0 1C0 0.447715 0.447715 0 1 0H9C9.55229 0 10 0.447715 10 1C10 1.55228 9.55228 2 9 2H1C0.447715 2 0 1.55228 0 1Z'\n fill='var(--color-sys-background)'\n />\n </svg>\n )\n\n case 'large':\n return (\n <svg\n width='16'\n height='4'\n viewBox='0 0 16 4'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n >\n <path\n fillRule='evenodd'\n clipRule='evenodd'\n d='M0.5 2C0.5 1.17157 1.17157 0.5 2 0.5H14C14.8284 0.5 15.5 1.17157 15.5 2C15.5 2.82843 14.8284 3.5 14 3.5H2C1.17157 3.5 0.5 2.82843 0.5 2Z'\n fill='var(--color-sys-background)'\n />\n </svg>\n )\n }\n}\n"],"names":[],"mappings":";;;;;;AAQA,MAAM,kBAAkB;AAAA,EACtB,MAAM;AACR;AAGA,MAAM,mBAAmB;AAAA,EACvB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,MAAM;AAAA;AAAA,QAEJ,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,OAAO;AAAA,MAAA;AAAA,IACT;AAAA,IAEF;AAAA,EAAA;AAEJ;AAEA,MAAM,cAAc;AAAA,EAClB;AAAA,EACA;AA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,OAAM;AAAA,UAEN,UAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,UAAS;AAAA,cACT,UAAS;AAAA,cACT,GAAE;AAAA,cACF,MAAK;AAAA,YAAA;AAAA,UAAA;AAAA,QACP;AAAA,MAAA;AAAA,EACF;AAGR;"}
1
+ {"version":3,"file":"checkbox.js","sources":["../../src/components/checkbox.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox'\nimport { cva, VariantProps } from 'class-variance-authority'\n\nimport { cn } from '../utils/cn'\n\nconst defaultVariants = {\n size: 'medium',\n} as const\n\n// 누르는 영역(버튼)과 보이는 상자(안쪽 span)를 나눈다 — small 은 상자 12px 그대로 누르는 영역만 24px (WCAG 2.5.8, 2026-11-23 3A)\nconst checkboxVariants = cva(\n 'peer group/checkbox shrink-0 inline-flex items-center justify-center outline-none disabled:cursor-not-allowed disabled:opacity-50',\n {\n variants: {\n size: {\n // 늘린 6px 씩을 음수 margin 으로 되돌려 옆 요소 자리는 그대로\n small: 'size-[24px] -m-[6px]',\n medium: 'size-[16px]',\n large: 'size-[24px]',\n },\n },\n defaultVariants,\n },\n)\n\nconst boxVariants = cva(\n 'flex items-center justify-center rounded-xsmall bg-sys-background border-[2px] border-sys-divider-main group-hover/checkbox:bg-secondary-o10 group-focus-visible/checkbox:outline-[2px] group-focus-visible/checkbox:outline-sys-focus-ring-main group-focus-visible/checkbox:outline-offset-[1px] group-data-[state=checked]/checkbox:bg-primary30 group-data-[state=checked]/checkbox:border-primary30 group-data-[state=checked]/checkbox:group-hover/checkbox:bg-primary40 group-data-[state=checked]/checkbox:group-hover/checkbox:border-primary40 group-data-[state=indeterminate]/checkbox:bg-primary30 group-data-[state=indeterminate]/checkbox:border-primary30 group-data-[state=indeterminate]/checkbox:group-hover/checkbox:bg-primary40 group-data-[state=indeterminate]/checkbox:group-hover/checkbox:border-primary40',\n {\n variants: {\n size: {\n small: 'size-[12px]',\n medium: 'size-[16px]',\n large: 'size-[24px]',\n },\n },\n defaultVariants,\n },\n)\n\nexport interface CheckboxProps\n extends\n React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>,\n VariantProps<typeof checkboxVariants> {\n /** 부분 선택 표시(−)와 aria-checked=\"mixed\". `checked` 와 함께 쓴다 — checked 가 아니면 빈 상자. `checked='indeterminate'` 도 같은 모양 */\n indeterminate?: boolean\n}\n\n/**\n * 켜기/끄기 또는 여러 항목 중 복수 선택. 폼의 동의·옵션 플래그와 표의 행 선택에 쓴다.\n *\n * 언제 쓰나: 서로 독립인 옵션을 여러 개 고를 때. 표의 행 선택은 AgGridTable 이 rowSelection 을 켜면 이 Checkbox 를 쓴 HeaderCheckboxRenderer·RowCheckboxRenderer 를 자동으로 넣으므로 셀에 직접 넣지 않는다(바꾸려면 그 렌더러를 감싼다).\n * 언제 안 쓰나: 하나만 골라야 할 때(→ Radio·RadioGroup), 켜기/끄기 하나의 설정(→ SwitchSection·Switch — 폼 제출값이어도), 선택지마다 제목·설명이 붙는 복수 선택(→ CheckboxSectionGroup), 선택지가 많을 때(→ MultiSelect).\n * 대신/함께: 라벨은 `Label` 또는 `FormLabel` 로 연결해 클릭 영역을 넓힌다.\n */\nconst Checkbox = React.forwardRef<React.ElementRef<typeof CheckboxPrimitive.Root>, CheckboxProps>(\n ({ className, size = defaultVariants.size, indeterminate = false, ...props }, ref) => {\n return (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(checkboxVariants({ size }), className)}\n // 아이콘만 바뀌고 \"선택됨\" 으로 읽히던 것 — 상태(onCheckedChange 값)는 그대로 두고 알리는 값만 mixed.\n // undefined 를 넘기면 Radix 가 단 aria-checked 를 지우므로 mixed 일 때만 넘긴다\n {...(indeterminate && props.checked === true ? { 'aria-checked': 'mixed' as const } : {})}\n {...props}\n >\n <span className={boxVariants({ size })}>\n <CheckboxPrimitive.Indicator className='flex items-center justify-center text-current'>\n {/* 그림은 aria-checked 를 따른다 — indeterminate prop 과 checked='indeterminate'(비제어 포함)를 함께 잡는 값이 이것뿐이다 */}\n <CheckIcon size={size} className='group-aria-[checked=mixed]/checkbox:hidden' />\n <IndeterminateIcon\n size={size}\n className='hidden group-aria-[checked=mixed]/checkbox:block'\n />\n </CheckboxPrimitive.Indicator>\n </span>\n </CheckboxPrimitive.Root>\n )\n },\n)\nCheckbox.displayName = CheckboxPrimitive.Root.displayName\n\nexport { Checkbox }\n\ntype IconProps = VariantProps<typeof checkboxVariants> & { className?: string }\n\nfunction CheckIcon({ size, className }: IconProps) {\n if (!size) return null\n switch (size) {\n case 'small':\n return (\n <svg\n className={className}\n width='8'\n height='6'\n viewBox='0 0 8 6'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n >\n <path\n fillRule='evenodd'\n clipRule='evenodd'\n d='M7.22148 0.621289C7.51437 0.914182 7.51437 1.38906 7.22148 1.68195L3.43693 5.4665C3.43528 5.46817 3.43363 5.46984 3.43197 5.47151C3.28494 5.61853 3.09206 5.69175 2.89936 5.69117C2.70817 5.69061 2.51714 5.61739 2.37126 5.47151C2.3696 5.46984 2.36794 5.46817 2.3663 5.4665L0.780317 3.88052C0.487423 3.58762 0.487423 3.11275 0.780317 2.81986C1.07321 2.52696 1.54808 2.52696 1.84098 2.81986L2.90161 3.88049L6.16082 0.621289C6.45371 0.328396 6.92858 0.328396 7.22148 0.621289Z'\n fill='var(--color-sys-background)'\n />\n </svg>\n )\n case 'medium':\n return (\n <svg\n className={className}\n width='10'\n height='8'\n viewBox='0 0 10 8'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n >\n <path\n fillRule='evenodd'\n clipRule='evenodd'\n d='M9.2953 0.828385C9.68583 1.21891 9.68583 1.85207 9.2953 2.2426L4.24923 7.28867C4.24704 7.2909 4.24484 7.29313 4.24262 7.29534C4.04812 7.48985 3.79342 7.58748 3.53848 7.58823C3.28155 7.589 3.02438 7.49137 2.82835 7.29534C2.82614 7.29313 2.82394 7.29092 2.82176 7.28869L0.707088 5.17402C0.316564 4.7835 0.316564 4.15033 0.707088 3.75981C1.09761 3.36928 1.73078 3.36928 2.1213 3.75981L3.53549 5.17399L7.88109 0.828385C8.27161 0.437861 8.90478 0.437861 9.2953 0.828385Z'\n fill='var(--color-sys-background)'\n />\n </svg>\n )\n\n case 'large':\n return (\n <svg\n className={className}\n width='14'\n height='12'\n viewBox='0 0 14 12'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n >\n <path\n fillRule='evenodd'\n clipRule='evenodd'\n d='M13.4431 1.24258C14.0289 1.82836 14.0289 2.77811 13.4431 3.3639L5.87394 10.933C5.87066 10.9364 5.86737 10.9397 5.86406 10.943C5.57001 11.2371 5.18425 11.3835 4.79885 11.3823C4.41645 11.3812 4.03441 11.2348 3.74264 10.943C3.73934 10.9397 3.73606 10.9364 3.7328 10.9331L0.560755 7.76103C-0.025032 7.17525 -0.025032 6.2255 0.560755 5.63971C1.14654 5.05393 2.09629 5.05393 2.68207 5.63971L4.80335 7.76099L11.3218 1.24258C11.9075 0.656792 12.8573 0.656791 13.4431 1.24258Z'\n fill='var(--color-sys-background)'\n />\n </svg>\n )\n }\n}\n\nfunction IndeterminateIcon({ size, className }: IconProps) {\n if (!size) return null\n switch (size) {\n case 'small':\n return (\n <svg\n className={className}\n width='8'\n height='2'\n viewBox='0 0 8 2'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n >\n <path\n fillRule='evenodd'\n clipRule='evenodd'\n d='M0.25 1C0.25 0.585786 0.585787 0.25 1 0.25H7C7.41421 0.25 7.75 0.585786 7.75 1C7.75 1.41421 7.41421 1.75 7 1.75H1C0.585786 1.75 0.25 1.41421 0.25 1Z'\n fill='var(--color-sys-background)'\n />\n </svg>\n )\n\n case 'medium':\n return (\n <svg\n className={className}\n width='10'\n height='2'\n viewBox='0 0 10 2'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n >\n <path\n fillRule='evenodd'\n clipRule='evenodd'\n d='M0 1C0 0.447715 0.447715 0 1 0H9C9.55229 0 10 0.447715 10 1C10 1.55228 9.55228 2 9 2H1C0.447715 2 0 1.55228 0 1Z'\n fill='var(--color-sys-background)'\n />\n </svg>\n )\n\n case 'large':\n return (\n <svg\n className={className}\n width='16'\n height='4'\n viewBox='0 0 16 4'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n >\n <path\n fillRule='evenodd'\n clipRule='evenodd'\n d='M0.5 2C0.5 1.17157 1.17157 0.5 2 0.5H14C14.8284 0.5 15.5 1.17157 15.5 2C15.5 2.82843 14.8284 3.5 14 3.5H2C1.17157 3.5 0.5 2.82843 0.5 2Z'\n fill='var(--color-sys-background)'\n />\n </svg>\n )\n }\n}\n"],"names":[],"mappings":";;;;;;AAQA,MAAM,kBAAkB;AAAA,EACtB,MAAM;AACR;AAGA,MAAM,mBAAmB;AAAA,EACvB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,MAAM;AAAA;AAAA,QAEJ,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,OAAO;AAAA,MAAA;AAAA,IACT;AAAA,IAEF;AAAA,EAAA;AAEJ;AAEA,MAAM,cAAc;AAAA,EAClB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,MAAM;AAAA,QACJ,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,OAAO;AAAA,MAAA;AAAA,IACT;AAAA,IAEF;AAAA,EAAA;AAEJ;AAiBA,MAAM,WAAW,MAAM;AAAA,EACrB,CAAC,EAAE,WAAW,OAAO,gBAAgB,MAAM,gBAAgB,OAAO,GAAG,MAAA,GAAS,QAAQ;AACpF,WACE;AAAA,MAAC,kBAAkB;AAAA,MAAlB;AAAA,QACC;AAAA,QACA,WAAW,GAAG,iBAAiB,EAAE,KAAA,CAAM,GAAG,SAAS;AAAA,QAGlD,GAAI,iBAAiB,MAAM,YAAY,OAAO,EAAE,gBAAgB,QAAA,IAAqB,CAAA;AAAA,QACrF,GAAG;AAAA,QAEJ,UAAA,oBAAC,QAAA,EAAK,WAAW,YAAY,EAAE,KA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cACT,UAAS;AAAA,cACT,GAAE;AAAA,cACF,MAAK;AAAA,YAAA;AAAA,UAAA;AAAA,QACP;AAAA,MAAA;AAAA,EACF;AAGR;AAEA,SAAS,kBAAkB,EAAE,MAAM,aAAwB;AACzD,MAAI,CAAC,KAAM,QAAO;AAClB,UAAQ,MAAA;AAAA,IACN,KAAK;AACH,aACE;AAAA,QAAC;AAAA,QAAA;AAAA,UACC;AAAA,UACA,OAAM;AAAA,UACN,QAAO;AAAA,UACP,SAAQ;AAAA,UACR,MAAK;AAAA,UACL,OAAM;AAAA,UAEN,UAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,UAAS;AAAA,cACT,UAAS;AAAA,cACT,GAAE;AAAA,cACF,MAAK;AAAA,YAAA;AAAA,UAAA;AAAA,QACP;AAAA,MAAA;AAAA,IAIN,KAAK;AACH,aACE;AAAA,QAAC;AAAA,QAAA;AAAA,UACC;AAAA,UACA,OAAM;AAAA,UACN,QAAO;AAAA,UACP,SAAQ;AAAA,UACR,MAAK;AAAA,UACL,OAAM;AAAA,UAEN,UAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,UAAS;AAAA,cACT,UAAS;AAAA,cACT,GAAE;AAAA,cACF,MAAK;AAAA,YAAA;AAAA,UAAA;AAAA,QACP;AAAA,MAAA;AAAA,IAIN,KAAK;AACH,aACE;AAAA,QAAC;AAAA,QAAA;AAAA,UACC;AAAA,UACA,OAAM;AAAA,UACN,QAAO;AAAA,UACP,SAAQ;AAAA,UACR,MAAK;AAAA,UACL,OAAM;AAAA,UAEN,UAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,UAAS;AAAA,cACT,UAAS;AAAA,cACT,GAAE;AAAA,cACF,MAAK;AAAA,YAAA;AAAA,UAAA;AAAA,QACP;AAAA,MAAA;AAAA,EACF;AAGR;"}
@@ -40,8 +40,9 @@ const DialogOverlay = React__namespace.forwardRef(({ className, ...props }, ref)
40
40
  ref,
41
41
  className: cn.cn(
42
42
  "fixed inset-0 z-[var(--z-index-overlay)] bg-sys-blanket",
43
- "data-[state=open]:animate-[fade-in_0ms_ease-out,zoom-in_0ms_ease-out]",
44
- "data-[state=closed]:animate-[fade-out_0ms_ease-in,zoom-out_0ms_ease-in]",
43
+ // 화면 전체를 덮으므로 fade 만 쓴다. zoom 을 걸면 95% 로 줄어 가장자리가 비친다
44
+ "data-[state=open]:animate-[fade-in_150ms_ease-out]",
45
+ "data-[state=closed]:animate-[fade-out_150ms_ease-in]",
45
46
  className
46
47
  )
47
48
  }
@@ -82,8 +83,9 @@ const DialogContent = React__namespace.forwardRef(
82
83
  className: cn.cn(
83
84
  "fixed left-[50%] top-[50%] z-[var(--z-index-overlay)] translate-x-[-50%] translate-y-[-50%] w-full max-w-[70vw]",
84
85
  "flex flex-col gap-[16px] rounded-medium bg-sys-background p-[32px] shadow-gray-medium duration-200",
85
- "data-[state=open]:animate-[fade-in_0ms_ease-out,zoom-in_0ms_ease-out]",
86
- "data-[state=closed]:animate-[fade-out_0ms_ease-in,zoom-out_0ms_ease-in]",
86
+ // Popover 와 같은 움직임(2026-11-24 결정 37C)
87
+ "data-[state=open]:animate-[fade-in_150ms_ease-out,zoom-in_150ms_ease-out]",
88
+ "data-[state=closed]:animate-[fade-out_150ms_ease-in,zoom-out_150ms_ease-in]",
87
89
  dialogContentVariants({ width }),
88
90
  className
89
91
  ),
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.cjs","sources":["../../src/components/dialog.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport * as DialogPrimitive from '@radix-ui/react-dialog'\nimport { cva, VariantProps } from 'class-variance-authority'\nimport { CircleCheck, CircleX, Info, TriangleAlert, X } from 'lucide-react'\n\nimport { useRestoreFocusToOpener } from './_internal/useRestoreFocusToOpener'\nimport { cn } from '../utils/cn'\nimport { sanitizeUserText } from '../utils/sanitizeUserText'\nimport { IconButton } from './iconButton'\nimport { Stack } from './stack'\n\nconst Dialog = DialogPrimitive.Root\nconst DialogTrigger = DialogPrimitive.Trigger\nconst DialogPortal = DialogPrimitive.Portal\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n {...props}\n ref={ref}\n className={cn(\n 'fixed inset-0 z-[var(--z-index-overlay)] bg-sys-blanket',\n 'data-[state=open]:animate-[fade-in_0ms_ease-out,zoom-in_0ms_ease-out]',\n 'data-[state=closed]:animate-[fade-out_0ms_ease-in,zoom-out_0ms_ease-in]',\n className,\n )}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst dialogContentVariants = cva(null, {\n variants: {\n width: {\n small: 'w-[400px]',\n medium: 'w-[600px]',\n large: 'w-[800px]',\n xlarge: 'w-[1000px]',\n },\n },\n defaultVariants: {\n width: 'small',\n },\n})\n\n/**\n * 모달 대화상자 본체. 짧은 입력이나 복합 상호작용을 현재 화면 위에서 처리할 때 쓴다.\n *\n * 언제 쓰나: 이름 바꾸기·태그 추가처럼 필드 서너 개의 입력, 미리보기·선택기처럼 맥락을 잠시 가리는 작업. `DialogTitle` 은 항상 넣는다.\n * 언제 안 쓰나: 되돌릴 수 없는 행동의 최종 확인(→ AlertDialog), 섹션이 여럿인 긴 폼·상세 보기(→ Drawer), 지나가는 결과 알림(→ Toast).\n * 대신/함께: 폼이면 `@t3q-ui/design-system/patterns` 의 FormDialog 가 제출 중 닫힘 차단까지 포함한다.\n */\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> &\n VariantProps<typeof dialogContentVariants> & {\n overlayClassName?: string\n hideCloseButton?: boolean\n }\n>(\n (\n {\n children,\n className,\n width,\n overlayClassName,\n hideCloseButton,\n onOpenAutoFocus,\n onCloseAutoFocus,\n ...props\n },\n ref,\n ) => {\n // 닫힐 때 포커스를 연 요소로 돌린다 — Radix 는 Trigger 가 없으면 body 로 떨어뜨린다\n const focusHandlers = useRestoreFocusToOpener({ onOpenAutoFocus, onCloseAutoFocus })\n return (\n <DialogPortal>\n <DialogOverlay className={overlayClassName} />\n <DialogPrimitive.Content\n ref={ref}\n {...focusHandlers}\n className={cn(\n 'fixed left-[50%] top-[50%] z-[var(--z-index-overlay)] translate-x-[-50%] translate-y-[-50%] w-full max-w-[70vw]',\n 'flex flex-col gap-[16px] rounded-medium bg-sys-background p-[32px] shadow-gray-medium duration-200',\n 'data-[state=open]:animate-[fade-in_0ms_ease-out,zoom-in_0ms_ease-out]',\n 'data-[state=closed]:animate-[fade-out_0ms_ease-in,zoom-out_0ms_ease-in]',\n dialogContentVariants({ width }),\n className,\n )}\n {...props}\n >\n {children}\n {!hideCloseButton && (\n <IconButton\n asChild\n variant='secondaryLink'\n className={cn('absolute right-[32px] top-[32px]')}\n >\n <DialogPrimitive.Close>\n <X />\n <span className='sr-only a11y'>Close</span>\n </DialogPrimitive.Close>\n </IconButton>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n )\n },\n)\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = (props: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n {...props}\n className={cn('flex flex-col gap-[16px] text-center sm:text-left', props.className)}\n />\n)\nDialogHeader.displayName = 'DialogHeader'\n\nconst DialogFooter = (props: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n {...props}\n className={cn('flex flex-col-reverse gap-[8px] sm:flex-row sm:justify-end', props.className)}\n />\n)\nDialogFooter.displayName = 'DialogFooter'\n\nconst variantToIcon = {\n normal: null,\n success: <CircleCheck className='text-success30' />,\n info: <Info className='text-sys-text-subtler' />,\n warning: <TriangleAlert className='text-critical30' />,\n danger: <CircleX className='text-danger30' />,\n} as const\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title> & {\n variant?: 'success' | 'info' | 'warning' | 'danger'\n }\n>(({ variant, children, ...props }, ref) => {\n if (variant) {\n return (\n <Stack spacing={8}>\n {variantToIcon[variant]}\n <DialogPrimitive.Title\n {...props}\n ref={ref}\n className={cn('text-h4 text-sys-text-main whitespace-pre-wrap', props.className)}\n >\n {sanitizeUserText(children)}\n </DialogPrimitive.Title>\n </Stack>\n )\n } else {\n return (\n <DialogPrimitive.Title\n {...props}\n ref={ref}\n className={cn('text-h4 text-sys-text-main whitespace-pre-wrap', props.className)}\n >\n {sanitizeUserText(children)}\n </DialogPrimitive.Title>\n )\n }\n})\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ children, ...props }, ref) => (\n <DialogPrimitive.Description\n {...props}\n ref={ref}\n className={cn('text-base-regular text-sys-text-main whitespace-pre-wrap', props.className)}\n >\n {sanitizeUserText(children)}\n </DialogPrimitive.Description>\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogTrigger,\n DialogClose,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n}\n"],"names":["DialogPrimitive","React","jsx","cn","cva","useRestoreFocusToOpener","jsxs","IconButton","X","CircleCheck","Info","TriangleAlert","CircleX","Stack"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,MAAM,SAASA,2BAAgB;AAC/B,MAAM,gBAAgBA,2BAAgB;AACtC,MAAM,eAAeA,2BAAgB;AACrC,MAAM,cAAcA,2BAAgB;AAEpC,MAAM,gBAAgBC,iBAAM,WAG1B,CAAC,EAAE,WAAW,GAAG,MAAA,GAAS,QAC1BC,2BAAAA;AAAAA,EAACF,2BAAgB;AAAA,EAAhB;AAAA,IACE,GAAG;AAAA,IACJ;AAAA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QAAA;AAAA,MAAA;AAAA,IAC5B,GACF;AAAA,EAEJ,OAAO;AACL,WACED,2BAAAA;AAAAA,MAACF,2BAAgB;AAAA,MAAhB;AAAA,QACE,GAAG;AAAA,QACJ;AAAA,QACA,WAAWG,GAAAA,GAAG,kDAAkD,MAAM,SAAS;AAAA,QAE9E,4CAAiB,QAAQ;AAAA,MAAA;AAAA,IAAA;AAAA,EAGhC;AACF,CAAC;AACD,YAAY,cAAcH,2BAAgB,MAAM;AAEhD,MAAM,oBAAoBC,iBAAM,WAG9B,CAAC,EAAE,UAAU,GAAG,MAAA,GAAS,QACzBC,2BAAAA;AAAAA,EAACF,2BAAgB;AAAA,EAAhB;AAAA,IACE,GAAG;AAAA,IACJ;AAAA,IACA,WAAWG,GAAAA,GAAG,4DAA4D,MAAM,SAAS;AAAA,IAExF,4CAAiB,QAAQ;AAAA,EAAA;AAC5B,CACD;AACD,kBAAkB,cAAcH,2BAAgB,YAAY;;;;;;;;;;;"}
1
+ {"version":3,"file":"dialog.cjs","sources":["../../src/components/dialog.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport * as DialogPrimitive from '@radix-ui/react-dialog'\nimport { cva, VariantProps } from 'class-variance-authority'\nimport { CircleCheck, CircleX, Info, TriangleAlert, X } from 'lucide-react'\n\nimport { useRestoreFocusToOpener } from './_internal/useRestoreFocusToOpener'\nimport { cn } from '../utils/cn'\nimport { sanitizeUserText } from '../utils/sanitizeUserText'\nimport { IconButton } from './iconButton'\nimport { Stack } from './stack'\n\nconst Dialog = DialogPrimitive.Root\nconst DialogTrigger = DialogPrimitive.Trigger\nconst DialogPortal = DialogPrimitive.Portal\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n {...props}\n ref={ref}\n className={cn(\n 'fixed inset-0 z-[var(--z-index-overlay)] bg-sys-blanket',\n // 화면 전체를 덮으므로 fade 만 쓴다. zoom 을 걸면 95% 로 줄어 가장자리가 비친다\n 'data-[state=open]:animate-[fade-in_150ms_ease-out]',\n 'data-[state=closed]:animate-[fade-out_150ms_ease-in]',\n className,\n )}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst dialogContentVariants = cva(null, {\n variants: {\n width: {\n small: 'w-[400px]',\n medium: 'w-[600px]',\n large: 'w-[800px]',\n xlarge: 'w-[1000px]',\n },\n },\n defaultVariants: {\n width: 'small',\n },\n})\n\n/**\n * 모달 대화상자 본체. 짧은 입력이나 복합 상호작용을 현재 화면 위에서 처리할 때 쓴다.\n *\n * 언제 쓰나: 이름 바꾸기·태그 추가처럼 필드 서너 개의 입력, 미리보기·선택기처럼 맥락을 잠시 가리는 작업. `DialogTitle` 은 항상 넣는다.\n * 언제 안 쓰나: 되돌릴 수 없는 행동의 최종 확인(→ AlertDialog), 섹션이 여럿인 긴 폼·상세 보기(→ Drawer), 지나가는 결과 알림(→ Toast).\n * 대신/함께: 폼이면 `@t3q-ui/design-system/patterns` 의 FormDialog 가 제출 중 닫힘 차단까지 포함한다.\n */\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> &\n VariantProps<typeof dialogContentVariants> & {\n overlayClassName?: string\n hideCloseButton?: boolean\n }\n>(\n (\n {\n children,\n className,\n width,\n overlayClassName,\n hideCloseButton,\n onOpenAutoFocus,\n onCloseAutoFocus,\n ...props\n },\n ref,\n ) => {\n // 닫힐 때 포커스를 연 요소로 돌린다 — Radix 는 Trigger 가 없으면 body 로 떨어뜨린다\n const focusHandlers = useRestoreFocusToOpener({ onOpenAutoFocus, onCloseAutoFocus })\n return (\n <DialogPortal>\n <DialogOverlay className={overlayClassName} />\n <DialogPrimitive.Content\n ref={ref}\n {...focusHandlers}\n className={cn(\n 'fixed left-[50%] top-[50%] z-[var(--z-index-overlay)] translate-x-[-50%] translate-y-[-50%] w-full max-w-[70vw]',\n 'flex flex-col gap-[16px] rounded-medium bg-sys-background p-[32px] shadow-gray-medium duration-200',\n // Popover 와 같은 움직임(2026-11-24 결정 37C)\n 'data-[state=open]:animate-[fade-in_150ms_ease-out,zoom-in_150ms_ease-out]',\n 'data-[state=closed]:animate-[fade-out_150ms_ease-in,zoom-out_150ms_ease-in]',\n dialogContentVariants({ width }),\n className,\n )}\n {...props}\n >\n {children}\n {!hideCloseButton && (\n <IconButton\n asChild\n variant='secondaryLink'\n className={cn('absolute right-[32px] top-[32px]')}\n >\n <DialogPrimitive.Close>\n <X />\n <span className='sr-only a11y'>Close</span>\n </DialogPrimitive.Close>\n </IconButton>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n )\n },\n)\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = (props: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n {...props}\n className={cn('flex flex-col gap-[16px] text-center sm:text-left', props.className)}\n />\n)\nDialogHeader.displayName = 'DialogHeader'\n\nconst DialogFooter = (props: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n {...props}\n className={cn('flex flex-col-reverse gap-[8px] sm:flex-row sm:justify-end', props.className)}\n />\n)\nDialogFooter.displayName = 'DialogFooter'\n\nconst variantToIcon = {\n normal: null,\n success: <CircleCheck className='text-success30' />,\n info: <Info className='text-sys-text-subtler' />,\n warning: <TriangleAlert className='text-critical30' />,\n danger: <CircleX className='text-danger30' />,\n} as const\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title> & {\n variant?: 'success' | 'info' | 'warning' | 'danger'\n }\n>(({ variant, children, ...props }, ref) => {\n if (variant) {\n return (\n <Stack spacing={8}>\n {variantToIcon[variant]}\n <DialogPrimitive.Title\n {...props}\n ref={ref}\n className={cn('text-h4 text-sys-text-main whitespace-pre-wrap', props.className)}\n >\n {sanitizeUserText(children)}\n </DialogPrimitive.Title>\n </Stack>\n )\n } else {\n return (\n <DialogPrimitive.Title\n {...props}\n ref={ref}\n className={cn('text-h4 text-sys-text-main whitespace-pre-wrap', props.className)}\n >\n {sanitizeUserText(children)}\n </DialogPrimitive.Title>\n )\n }\n})\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ children, ...props }, ref) => (\n <DialogPrimitive.Description\n {...props}\n ref={ref}\n className={cn('text-base-regular text-sys-text-main whitespace-pre-wrap', props.className)}\n >\n {sanitizeUserText(children)}\n </DialogPrimitive.Description>\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogTrigger,\n DialogClose,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n}\n"],"names":["DialogPrimitive","React","jsx","cn","cva","useRestoreFocusToOpener","jsxs","IconButton","X","CircleCheck","Info","TriangleAlert","CircleX","Stack"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,MAAM,SAASA,2BAAgB;AAC/B,MAAM,gBAAgBA,2BAAgB;AACtC,MAAM,eAAeA,2BAAgB;AACrC,MAAM,cAAcA,2BAAgB;AAEpC,MAAM,gBAAgBC,iBAAM,WAG1B,CAAC,EAAE,WAAW,GAAG,MAAA,GAAS,QAC1BC,2BAAAA;AAAAA,EAACF,2BAAgB;AAAA,EAAhB;AAAA,IACE,GAAG;AAAA,IACJ;AAAA,IACA,WAAWG,GAAAA;AAAAA,MACT;AAAA;AAAA,MAEA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EACF;AACF,CACD;AACD,cAAc,cAAcH,2BAAgB,QAAQ;AAEpD,MAAM,wBAAwBI,uBAAAA,IAAI,MAAM;AAA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AAkD,MAAM,SAAS;AAAA,QAE9E,4CAAiB,QAAQ;AAAA,MAAA;AAAA,IAAA;AAAA,EAGhC;AACF,CAAC;AACD,YAAY,cAAcH,2BAAgB,MAAM;AAEhD,MAAM,oBAAoBC,iBAAM,WAG9B,CAAC,EAAE,UAAU,GAAG,MAAA,GAAS,QACzBC,2BAAAA;AAAAA,EAACF,2BAAgB;AAAA,EAAhB;AAAA,IACE,GAAG;AAAA,IACJ;AAAA,IACA,WAAWG,GAAAA,GAAG,4DAA4D,MAAM,SAAS;AAAA,IAExF,4CAAiB,QAAQ;AAAA,EAAA;AAC5B,CACD;AACD,kBAAkB,cAAcH,2BAAgB,YAAY;;;;;;;;;;;"}
@@ -20,8 +20,9 @@ const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__P
20
20
  ref,
21
21
  className: cn(
22
22
  "fixed inset-0 z-[var(--z-index-overlay)] bg-sys-blanket",
23
- "data-[state=open]:animate-[fade-in_0ms_ease-out,zoom-in_0ms_ease-out]",
24
- "data-[state=closed]:animate-[fade-out_0ms_ease-in,zoom-out_0ms_ease-in]",
23
+ // 화면 전체를 덮으므로 fade 만 쓴다. zoom 을 걸면 95% 로 줄어 가장자리가 비친다
24
+ "data-[state=open]:animate-[fade-in_150ms_ease-out]",
25
+ "data-[state=closed]:animate-[fade-out_150ms_ease-in]",
25
26
  className
26
27
  )
27
28
  }
@@ -62,8 +63,9 @@ const DialogContent = React.forwardRef(
62
63
  className: cn(
63
64
  "fixed left-[50%] top-[50%] z-[var(--z-index-overlay)] translate-x-[-50%] translate-y-[-50%] w-full max-w-[70vw]",
64
65
  "flex flex-col gap-[16px] rounded-medium bg-sys-background p-[32px] shadow-gray-medium duration-200",
65
- "data-[state=open]:animate-[fade-in_0ms_ease-out,zoom-in_0ms_ease-out]",
66
- "data-[state=closed]:animate-[fade-out_0ms_ease-in,zoom-out_0ms_ease-in]",
66
+ // Popover 와 같은 움직임(2026-11-24 결정 37C)
67
+ "data-[state=open]:animate-[fade-in_150ms_ease-out,zoom-in_150ms_ease-out]",
68
+ "data-[state=closed]:animate-[fade-out_150ms_ease-in,zoom-out_150ms_ease-in]",
67
69
  dialogContentVariants({ width }),
68
70
  className
69
71
  ),
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.js","sources":["../../src/components/dialog.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport * as DialogPrimitive from '@radix-ui/react-dialog'\nimport { cva, VariantProps } from 'class-variance-authority'\nimport { CircleCheck, CircleX, Info, TriangleAlert, X } from 'lucide-react'\n\nimport { useRestoreFocusToOpener } from './_internal/useRestoreFocusToOpener'\nimport { cn } from '../utils/cn'\nimport { sanitizeUserText } from '../utils/sanitizeUserText'\nimport { IconButton } from './iconButton'\nimport { Stack } from './stack'\n\nconst Dialog = DialogPrimitive.Root\nconst DialogTrigger = DialogPrimitive.Trigger\nconst DialogPortal = DialogPrimitive.Portal\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n {...props}\n ref={ref}\n className={cn(\n 'fixed inset-0 z-[var(--z-index-overlay)] bg-sys-blanket',\n 'data-[state=open]:animate-[fade-in_0ms_ease-out,zoom-in_0ms_ease-out]',\n 'data-[state=closed]:animate-[fade-out_0ms_ease-in,zoom-out_0ms_ease-in]',\n className,\n )}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst dialogContentVariants = cva(null, {\n variants: {\n width: {\n small: 'w-[400px]',\n medium: 'w-[600px]',\n large: 'w-[800px]',\n xlarge: 'w-[1000px]',\n },\n },\n defaultVariants: {\n width: 'small',\n },\n})\n\n/**\n * 모달 대화상자 본체. 짧은 입력이나 복합 상호작용을 현재 화면 위에서 처리할 때 쓴다.\n *\n * 언제 쓰나: 이름 바꾸기·태그 추가처럼 필드 서너 개의 입력, 미리보기·선택기처럼 맥락을 잠시 가리는 작업. `DialogTitle` 은 항상 넣는다.\n * 언제 안 쓰나: 되돌릴 수 없는 행동의 최종 확인(→ AlertDialog), 섹션이 여럿인 긴 폼·상세 보기(→ Drawer), 지나가는 결과 알림(→ Toast).\n * 대신/함께: 폼이면 `@t3q-ui/design-system/patterns` 의 FormDialog 가 제출 중 닫힘 차단까지 포함한다.\n */\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> &\n VariantProps<typeof dialogContentVariants> & {\n overlayClassName?: string\n hideCloseButton?: boolean\n }\n>(\n (\n {\n children,\n className,\n width,\n overlayClassName,\n hideCloseButton,\n onOpenAutoFocus,\n onCloseAutoFocus,\n ...props\n },\n ref,\n ) => {\n // 닫힐 때 포커스를 연 요소로 돌린다 — Radix 는 Trigger 가 없으면 body 로 떨어뜨린다\n const focusHandlers = useRestoreFocusToOpener({ onOpenAutoFocus, onCloseAutoFocus })\n return (\n <DialogPortal>\n <DialogOverlay className={overlayClassName} />\n <DialogPrimitive.Content\n ref={ref}\n {...focusHandlers}\n className={cn(\n 'fixed left-[50%] top-[50%] z-[var(--z-index-overlay)] translate-x-[-50%] translate-y-[-50%] w-full max-w-[70vw]',\n 'flex flex-col gap-[16px] rounded-medium bg-sys-background p-[32px] shadow-gray-medium duration-200',\n 'data-[state=open]:animate-[fade-in_0ms_ease-out,zoom-in_0ms_ease-out]',\n 'data-[state=closed]:animate-[fade-out_0ms_ease-in,zoom-out_0ms_ease-in]',\n dialogContentVariants({ width }),\n className,\n )}\n {...props}\n >\n {children}\n {!hideCloseButton && (\n <IconButton\n asChild\n variant='secondaryLink'\n className={cn('absolute right-[32px] top-[32px]')}\n >\n <DialogPrimitive.Close>\n <X />\n <span className='sr-only a11y'>Close</span>\n </DialogPrimitive.Close>\n </IconButton>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n )\n },\n)\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = (props: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n {...props}\n className={cn('flex flex-col gap-[16px] text-center sm:text-left', props.className)}\n />\n)\nDialogHeader.displayName = 'DialogHeader'\n\nconst DialogFooter = (props: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n {...props}\n className={cn('flex flex-col-reverse gap-[8px] sm:flex-row sm:justify-end', props.className)}\n />\n)\nDialogFooter.displayName = 'DialogFooter'\n\nconst variantToIcon = {\n normal: null,\n success: <CircleCheck className='text-success30' />,\n info: <Info className='text-sys-text-subtler' />,\n warning: <TriangleAlert className='text-critical30' />,\n danger: <CircleX className='text-danger30' />,\n} as const\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title> & {\n variant?: 'success' | 'info' | 'warning' | 'danger'\n }\n>(({ variant, children, ...props }, ref) => {\n if (variant) {\n return (\n <Stack spacing={8}>\n {variantToIcon[variant]}\n <DialogPrimitive.Title\n {...props}\n ref={ref}\n className={cn('text-h4 text-sys-text-main whitespace-pre-wrap', props.className)}\n >\n {sanitizeUserText(children)}\n </DialogPrimitive.Title>\n </Stack>\n )\n } else {\n return (\n <DialogPrimitive.Title\n {...props}\n ref={ref}\n className={cn('text-h4 text-sys-text-main whitespace-pre-wrap', props.className)}\n >\n {sanitizeUserText(children)}\n </DialogPrimitive.Title>\n )\n }\n})\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ children, ...props }, ref) => (\n <DialogPrimitive.Description\n {...props}\n ref={ref}\n className={cn('text-base-regular text-sys-text-main whitespace-pre-wrap', props.className)}\n >\n {sanitizeUserText(children)}\n </DialogPrimitive.Description>\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogTrigger,\n DialogClose,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAaA,MAAM,SAAS,gBAAgB;AAC/B,MAAM,gBAAgB,gBAAgB;AACtC,MAAM,eAAe,gBAAgB;AACrC,MAAM,cAAc,gBAAgB;AAEpC,MAAM,gBAAgB,MAAM,WAG1B,CAAC,EAAE,WAAW,GAAG,MAAA,GAAS,QAC1B;AAAA,EAAC,gBAAgB;AAAA,EAAhB;AAAA,IACE,GAAG;AAAA,IACJ;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EACF;AACF,CACD;AACD,cAAc,cAAc,gBAAgB,QAAQ;AAEpD,MAAM,wBAAwB,IAAI,MAAM;AAAA,EACtC,UAAU;AAAA,IACR,OAAO;AAAA,MACL,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,OAAO;AAAA,MACP,QAAQ;AAAA,IAAA;AAAA,EACV;AAAA,EAEF,iBAAiB;AAAA,IACf,OAAO;AAAA,EAAA;AAEX,CAAC;AASD,MAAM,gBAAgB,MAAM;AAAA,EAQ1B,CACE;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EAAA,GAEL,QACG;AAEH,UAAM,gBAAgB,wBAAwB,EAAE,iBAAiB,kBAAkB;AACnF,gCACG,cAAA,EACC,UAAA;AAAA,MAAA,oBAAC,eAAA,EAAc,WAAW,iBAAA,CAAkB;AAAA,MAC5C;AAAA,QAAC,gBAAgB;AAAA,QAAhB;AAAA,UACC;AAAA,UACC,GAAG;AAAA,UACJ,WAAW;AAAA,YACT;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA,sBAAsB,EAAE,OAAO;AAAA,YAC/B;AAAA,UAAA;AAAA,UA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,QAAC,gBAAgB;AAAA,QAAhB;AAAA,UACE,GAAG;AAAA,UACJ;AAAA,UACA,WAAW,GAAG,kDAAkD,MAAM,SAAS;AAAA,UAE9E,2BAAiB,QAAQ;AAAA,QAAA;AAAA,MAAA;AAAA,IAC5B,GACF;AAAA,EAEJ,OAAO;AACL,WACE;AAAA,MAAC,gBAAgB;AAAA,MAAhB;AAAA,QACE,GAAG;AAAA,QACJ;AAAA,QACA,WAAW,GAAG,kDAAkD,MAAM,SAAS;AAAA,QAE9E,2BAAiB,QAAQ;AAAA,MAAA;AAAA,IAAA;AAAA,EAGhC;AACF,CAAC;AACD,YAAY,cAAc,gBAAgB,MAAM;AAEhD,MAAM,oBAAoB,MAAM,WAG9B,CAAC,EAAE,UAAU,GAAG,MAAA,GAAS,QACzB;AAAA,EAAC,gBAAgB;AAAA,EAAhB;AAAA,IACE,GAAG;AAAA,IACJ;AAAA,IACA,WAAW,GAAG,4DAA4D,MAAM,SAAS;AAAA,IAExF,2BAAiB,QAAQ;AAAA,EAAA;AAC5B,CACD;AACD,kBAAkB,cAAc,gBAAgB,YAAY;"}
1
+ {"version":3,"file":"dialog.js","sources":["../../src/components/dialog.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport * as DialogPrimitive from '@radix-ui/react-dialog'\nimport { cva, VariantProps } from 'class-variance-authority'\nimport { CircleCheck, CircleX, Info, TriangleAlert, X } from 'lucide-react'\n\nimport { useRestoreFocusToOpener } from './_internal/useRestoreFocusToOpener'\nimport { cn } from '../utils/cn'\nimport { sanitizeUserText } from '../utils/sanitizeUserText'\nimport { IconButton } from './iconButton'\nimport { Stack } from './stack'\n\nconst Dialog = DialogPrimitive.Root\nconst DialogTrigger = DialogPrimitive.Trigger\nconst DialogPortal = DialogPrimitive.Portal\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n {...props}\n ref={ref}\n className={cn(\n 'fixed inset-0 z-[var(--z-index-overlay)] bg-sys-blanket',\n // 화면 전체를 덮으므로 fade 만 쓴다. zoom 을 걸면 95% 로 줄어 가장자리가 비친다\n 'data-[state=open]:animate-[fade-in_150ms_ease-out]',\n 'data-[state=closed]:animate-[fade-out_150ms_ease-in]',\n className,\n )}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst dialogContentVariants = cva(null, {\n variants: {\n width: {\n small: 'w-[400px]',\n medium: 'w-[600px]',\n large: 'w-[800px]',\n xlarge: 'w-[1000px]',\n },\n },\n defaultVariants: {\n width: 'small',\n },\n})\n\n/**\n * 모달 대화상자 본체. 짧은 입력이나 복합 상호작용을 현재 화면 위에서 처리할 때 쓴다.\n *\n * 언제 쓰나: 이름 바꾸기·태그 추가처럼 필드 서너 개의 입력, 미리보기·선택기처럼 맥락을 잠시 가리는 작업. `DialogTitle` 은 항상 넣는다.\n * 언제 안 쓰나: 되돌릴 수 없는 행동의 최종 확인(→ AlertDialog), 섹션이 여럿인 긴 폼·상세 보기(→ Drawer), 지나가는 결과 알림(→ Toast).\n * 대신/함께: 폼이면 `@t3q-ui/design-system/patterns` 의 FormDialog 가 제출 중 닫힘 차단까지 포함한다.\n */\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> &\n VariantProps<typeof dialogContentVariants> & {\n overlayClassName?: string\n hideCloseButton?: boolean\n }\n>(\n (\n {\n children,\n className,\n width,\n overlayClassName,\n hideCloseButton,\n onOpenAutoFocus,\n onCloseAutoFocus,\n ...props\n },\n ref,\n ) => {\n // 닫힐 때 포커스를 연 요소로 돌린다 — Radix 는 Trigger 가 없으면 body 로 떨어뜨린다\n const focusHandlers = useRestoreFocusToOpener({ onOpenAutoFocus, onCloseAutoFocus })\n return (\n <DialogPortal>\n <DialogOverlay className={overlayClassName} />\n <DialogPrimitive.Content\n ref={ref}\n {...focusHandlers}\n className={cn(\n 'fixed left-[50%] top-[50%] z-[var(--z-index-overlay)] translate-x-[-50%] translate-y-[-50%] w-full max-w-[70vw]',\n 'flex flex-col gap-[16px] rounded-medium bg-sys-background p-[32px] shadow-gray-medium duration-200',\n // Popover 와 같은 움직임(2026-11-24 결정 37C)\n 'data-[state=open]:animate-[fade-in_150ms_ease-out,zoom-in_150ms_ease-out]',\n 'data-[state=closed]:animate-[fade-out_150ms_ease-in,zoom-out_150ms_ease-in]',\n dialogContentVariants({ width }),\n className,\n )}\n {...props}\n >\n {children}\n {!hideCloseButton && (\n <IconButton\n asChild\n variant='secondaryLink'\n className={cn('absolute right-[32px] top-[32px]')}\n >\n <DialogPrimitive.Close>\n <X />\n <span className='sr-only a11y'>Close</span>\n </DialogPrimitive.Close>\n </IconButton>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n )\n },\n)\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = (props: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n {...props}\n className={cn('flex flex-col gap-[16px] text-center sm:text-left', props.className)}\n />\n)\nDialogHeader.displayName = 'DialogHeader'\n\nconst DialogFooter = (props: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n {...props}\n className={cn('flex flex-col-reverse gap-[8px] sm:flex-row sm:justify-end', props.className)}\n />\n)\nDialogFooter.displayName = 'DialogFooter'\n\nconst variantToIcon = {\n normal: null,\n success: <CircleCheck className='text-success30' />,\n info: <Info className='text-sys-text-subtler' />,\n warning: <TriangleAlert className='text-critical30' />,\n danger: <CircleX className='text-danger30' />,\n} as const\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title> & {\n variant?: 'success' | 'info' | 'warning' | 'danger'\n }\n>(({ variant, children, ...props }, ref) => {\n if (variant) {\n return (\n <Stack spacing={8}>\n {variantToIcon[variant]}\n <DialogPrimitive.Title\n {...props}\n ref={ref}\n className={cn('text-h4 text-sys-text-main whitespace-pre-wrap', props.className)}\n >\n {sanitizeUserText(children)}\n </DialogPrimitive.Title>\n </Stack>\n )\n } else {\n return (\n <DialogPrimitive.Title\n {...props}\n ref={ref}\n className={cn('text-h4 text-sys-text-main whitespace-pre-wrap', props.className)}\n >\n {sanitizeUserText(children)}\n </DialogPrimitive.Title>\n )\n }\n})\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ children, ...props }, ref) => (\n <DialogPrimitive.Description\n {...props}\n ref={ref}\n className={cn('text-base-regular text-sys-text-main whitespace-pre-wrap', props.className)}\n >\n {sanitizeUserText(children)}\n </DialogPrimitive.Description>\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogTrigger,\n DialogClose,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAaA,MAAM,SAAS,gBAAgB;AAC/B,MAAM,gBAAgB,gBAAgB;AACtC,MAAM,eAAe,gBAAgB;AACrC,MAAM,cAAc,gBAAgB;AAEpC,MAAM,gBAAgB,MAAM,WAG1B,CAAC,EAAE,WAAW,GAAG,MAAA,GAAS,QAC1B;AAAA,EAAC,gBAAgB;AAAA,EAAhB;AAAA,IACE,GAAG;AAAA,IACJ;AAAA,IACA,WAAW;AAAA,MACT;AAAA;AAAA,MAEA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EACF;AACF,CACD;AACD,cAAc,cAAc,gBAAgB,QAAQ;AAEpD,MAAM,wBAAwB,IAAI,MAAM;AAAA,EACtC,UAAU;AAAA,IACR,OAAO;AAAA,MACL,OAAO;AAAA,MACP,QAAQ;AAA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B,QAAQ;AAAA,EAAA;AAC5B,CACD;AACD,kBAAkB,cAAc,gBAAgB,YAAY;"}
package/dist/index.d.cts CHANGED
@@ -210,7 +210,7 @@ declare const checkboxVariants: (props?: ({
210
210
  size?: "small" | "medium" | "large" | null | undefined;
211
211
  } & class_variance_authority_types.ClassProp) | undefined) => string;
212
212
  interface CheckboxProps extends React$1.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>, VariantProps<typeof checkboxVariants> {
213
- /** 부분 선택 표시(−)와 aria-checked="mixed". `checked` 와 함께 쓴다 — checked 가 아니면 빈 상자 */
213
+ /** 부분 선택 표시(−)와 aria-checked="mixed". `checked` 와 함께 쓴다 — checked 가 아니면 빈 상자. `checked='indeterminate'` 도 같은 모양 */
214
214
  indeterminate?: boolean;
215
215
  }
216
216
  /**
package/dist/index.d.ts CHANGED
@@ -210,7 +210,7 @@ declare const checkboxVariants: (props?: ({
210
210
  size?: "small" | "medium" | "large" | null | undefined;
211
211
  } & class_variance_authority_types.ClassProp) | undefined) => string;
212
212
  interface CheckboxProps extends React$1.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>, VariantProps<typeof checkboxVariants> {
213
- /** 부분 선택 표시(−)와 aria-checked="mixed". `checked` 와 함께 쓴다 — checked 가 아니면 빈 상자 */
213
+ /** 부분 선택 표시(−)와 aria-checked="mixed". `checked` 와 함께 쓴다 — checked 가 아니면 빈 상자. `checked='indeterminate'` 도 같은 모양 */
214
214
  indeterminate?: boolean;
215
215
  }
216
216
  /**
@@ -3665,7 +3665,7 @@
3665
3665
  "defaultValue": {
3666
3666
  "value": "false"
3667
3667
  },
3668
- "description": "부분 선택 표시(−)와 aria-checked=\"mixed\". `checked` 와 함께 쓴다 — checked 가 아니면 빈 상자",
3668
+ "description": "부분 선택 표시(−)와 aria-checked=\"mixed\". `checked` 와 함께 쓴다 — checked 가 아니면 빈 상자. `checked='indeterminate'` 도 같은 모양",
3669
3669
  "name": "indeterminate",
3670
3670
  "parent": {
3671
3671
  "fileName": "src/components/checkbox.tsx",
@@ -3804,6 +3804,11 @@
3804
3804
  "name": "Indeterminate — 부분 선택 (checked 필요)",
3805
3805
  "snippet": "const Indeterminate = () => (\n <div className='flex items-center gap-[24px]'>\n {SIZES.map((size) => (\n <Checkbox key={size} size={size} checked indeterminate aria-label={`${size} 부분 선택`} />\n ))}\n </div>\n);"
3806
3806
  },
3807
+ {
3808
+ "id": "components-inputs-checkbox--indeterminate-value",
3809
+ "name": "Indeterminate — checked=\"indeterminate\"",
3810
+ "snippet": "const IndeterminateValue = () => (\n <div className='flex flex-col gap-[16px]'>\n {[false, true].map((disabled) => (\n <div key={String(disabled)} className='flex items-center gap-[24px]'>\n {SIZES.map((size) => (\n <Checkbox\n key={size}\n size={size}\n checked='indeterminate'\n disabled={disabled}\n aria-label={`${size} 부분 선택${disabled ? ' 비활성' : ''}`}\n />\n ))}\n </div>\n ))}\n </div>\n);"
3811
+ },
3807
3812
  {
3808
3813
  "id": "components-inputs-checkbox--disabled",
3809
3814
  "name": "Disabled — 비활성",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@t3q-ui/design-system",
3
- "version": "1.70.2",
3
+ "version": "1.71.1",
4
4
  "description": "T3Q Design System - React Components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -790,7 +790,7 @@ const Default = () => <Demo />;
790
790
 
791
791
  | prop | 타입 | 기본값 | 설명 |
792
792
  |---|---|---|---|
793
- | `indeterminate` | `boolean` | `false` | 부분 선택 표시(−)와 aria-checked="mixed". `checked` 와 함께 쓴다 — checked 가 아니면 빈 상자 |
793
+ | `indeterminate` | `boolean` | `false` | 부분 선택 표시(−)와 aria-checked="mixed". `checked` 와 함께 쓴다 — checked 가 아니면 빈 상자. `checked='indeterminate'` 도 같은 모양 |
794
794
 
795
795
  예시 — story "WithLabel — Label 조합 (controlled)":
796
796