@aivex/ui 1.2.0-dev.32 → 1.2.0-dev.33

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.
Files changed (36) hide show
  1. package/dist/Button-B33c3wzf.cjs +2 -0
  2. package/dist/Button-B33c3wzf.cjs.map +1 -0
  3. package/dist/{Button-BSJwb59G.js → Button-CGgKeDv2.js} +183 -169
  4. package/dist/Button-CGgKeDv2.js.map +1 -0
  5. package/dist/{IconButton-Cl3T7MUr.cjs → IconButton-CfE0F-oc.cjs} +2 -2
  6. package/dist/{IconButton-Cl3T7MUr.cjs.map → IconButton-CfE0F-oc.cjs.map} +1 -1
  7. package/dist/{IconButton-DyUOtz87.js → IconButton-ObGRq2gH.js} +2 -2
  8. package/dist/{IconButton-DyUOtz87.js.map → IconButton-ObGRq2gH.js.map} +1 -1
  9. package/dist/{Switch-rIEhz2pk.js → Switch-CINu5Dqt.js} +12 -12
  10. package/dist/{Switch-rIEhz2pk.js.map → Switch-CINu5Dqt.js.map} +1 -1
  11. package/dist/{Switch-DP8FRLJK.cjs → Switch-DFFbGN33.cjs} +2 -2
  12. package/dist/{Switch-DP8FRLJK.cjs.map → Switch-DFFbGN33.cjs.map} +1 -1
  13. package/dist/comment.cjs +1 -1
  14. package/dist/comment.js +2 -2
  15. package/dist/components/{DatePicker → Calendar}/date.d.ts +1 -1
  16. package/dist/components/Calendar/index.d.ts +2 -0
  17. package/dist/components/Drawer/Drawer.d.ts +34 -0
  18. package/dist/components/Drawer/index.d.ts +2 -0
  19. package/dist/components/Icon/index.d.ts +1 -0
  20. package/dist/components/Modal/ModalBase.d.ts +33 -0
  21. package/dist/components/Modal/index.d.ts +2 -0
  22. package/dist/index.cjs +1 -1
  23. package/dist/index.cjs.map +1 -1
  24. package/dist/index.d.ts +2 -1
  25. package/dist/index.js +1274 -1580
  26. package/dist/index.js.map +1 -1
  27. package/dist/shape-editor.cjs +1 -1
  28. package/dist/shape-editor.js +60 -60
  29. package/dist/styles.css +3 -2
  30. package/package.json +1 -1
  31. package/dist/Button-BSJwb59G.js.map +0 -1
  32. package/dist/Button-OQscp8mY.cjs +0 -2
  33. package/dist/Button-OQscp8mY.cjs.map +0 -1
  34. package/dist/components/DatePicker/DatePicker.d.ts +0 -114
  35. package/dist/components/DatePicker/index.d.ts +0 -4
  36. /package/dist/components/{DatePicker → Calendar}/Calendar.d.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"Switch-DP8FRLJK.cjs","names":[],"sources":["../src/components/Menu/Menu.tsx","../src/components/Divider/Divider.tsx","../src/components/Slider/Slider.tsx","../src/components/Switch/Switch.tsx"],"sourcesContent":["\"use client\";\n\nimport * as DropdownMenu from \"@radix-ui/react-dropdown-menu\";\nimport { cva } from \"class-variance-authority\";\nimport type { ComponentPropsWithoutRef, ReactNode, Ref } from \"react\";\nimport { CheckIcon, DirectionRightIcon } from \"@/components/Icon\";\nimport { InteractionLayer } from \"@/components/InteractionLayer\";\nimport { cn } from \"@/utils/cn\";\n\n// ─── menuItemVariants ─────────────────────────────────────────────────────────\n\nconst menuItemVariants = cva(\n \"aivex:relative aivex:overflow-hidden aivex:group aivex:flex aivex:w-full aivex:items-center aivex:gap-md aivex:px-md aivex:py-sm aivex:text-label-lg aivex:rounded-md aivex:transition-colors aivex:cursor-pointer aivex:select-none aivex:outline-none aivex:data-[disabled]:opacity-disable aivex:data-[disabled]:pointer-events-none\",\n {\n variants: {\n danger: {\n true: \"aivex:text-text-danger\",\n false: \"aivex:text-text-primary\",\n },\n },\n defaultVariants: {\n danger: false,\n },\n },\n);\n\nconst contentClassName = cn(\n \"aivex:flex aivex:flex-col aivex:rounded-md aivex:bg-bg-primary aivex:p-md aivex:overflow-clip\",\n \"aivex:shadow-md aivex:border aivex:border-border-subtle aivex:min-w-[160px]\",\n \"aivex:z-50 aivex:outline-none\",\n \"aivex:data-[state=open]:animate-in aivex:data-[state=closed]:animate-out\",\n \"aivex:data-[state=closed]:fade-out-0 aivex:data-[state=open]:fade-in-0\",\n \"aivex:data-[state=closed]:zoom-out-95 aivex:data-[state=open]:zoom-in-95\",\n);\n\n// ─── Root ─────────────────────────────────────────────────────────────────────\n\ntype MenuRootProps = ComponentPropsWithoutRef<typeof DropdownMenu.Root>;\n\nfunction MenuRoot(props: MenuRootProps) {\n return <DropdownMenu.Root {...props} />;\n}\n\n// ─── Trigger ──────────────────────────────────────────────────────────────────\n\ntype MenuTriggerProps = ComponentPropsWithoutRef<typeof DropdownMenu.Trigger> & {\n ref?: Ref<HTMLButtonElement>;\n};\n\nfunction MenuTrigger({ ref, ...props }: MenuTriggerProps) {\n return <DropdownMenu.Trigger ref={ref} {...props} />;\n}\n\n// ─── Content ──────────────────────────────────────────────────────────────────\n\ntype MenuContentProps = ComponentPropsWithoutRef<typeof DropdownMenu.Content> & {\n ref?: Ref<HTMLDivElement>;\n};\n\nfunction MenuContent({ className, sideOffset = 4, ref, ...props }: MenuContentProps) {\n return (\n <DropdownMenu.Portal>\n <DropdownMenu.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(contentClassName, className)}\n {...props}\n />\n </DropdownMenu.Portal>\n );\n}\n\n// ─── Group ────────────────────────────────────────────────────────────────────\n\ntype MenuGroupProps = ComponentPropsWithoutRef<typeof DropdownMenu.Group> & {\n ref?: Ref<HTMLDivElement>;\n};\n\nfunction MenuGroup({ className, ref, ...props }: MenuGroupProps) {\n return (\n <DropdownMenu.Group\n ref={ref}\n className={cn(\"aivex:flex aivex:flex-col\", className)}\n {...props}\n />\n );\n}\n\n// ─── Separator ────────────────────────────────────────────────────────────────\n\ntype MenuSeparatorProps = ComponentPropsWithoutRef<typeof DropdownMenu.Separator> & {\n ref?: Ref<HTMLDivElement>;\n};\n\nfunction MenuSeparator({ className, ref, ...props }: MenuSeparatorProps) {\n return (\n <DropdownMenu.Separator\n ref={ref}\n className={cn(\"aivex:h-px aivex:bg-border-subtle aivex:w-full aivex:my-xs\", className)}\n {...props}\n />\n );\n}\n\n// ─── Label ────────────────────────────────────────────────────────────────────\n\ntype MenuLabelProps = ComponentPropsWithoutRef<typeof DropdownMenu.Label> & {\n ref?: Ref<HTMLDivElement>;\n};\n\nfunction MenuLabel({ className, ref, ...props }: MenuLabelProps) {\n return (\n <DropdownMenu.Label\n ref={ref}\n className={cn(\n \"aivex:px-md aivex:py-2xs aivex:text-label-md aivex:text-text-tertiary aivex:select-none\",\n className,\n )}\n {...props}\n />\n );\n}\n\n// ─── Item ─────────────────────────────────────────────────────────────────────\n\ninterface MenuItemProps\n extends Omit<ComponentPropsWithoutRef<typeof DropdownMenu.Item>, \"children\"> {\n /** label/icon으로 렌더할 때 사용. asChild 모드에선 무시 */\n label?: ReactNode;\n icon?: ReactNode;\n danger?: boolean;\n /** Radix asChild — 자식 컴포넌트(Link 등)에 메뉴 동작/스타일 위임 */\n asChild?: boolean;\n children?: ReactNode;\n ref?: Ref<HTMLDivElement>;\n}\n\nfunction MenuItem({\n className,\n label,\n icon,\n danger = false,\n asChild,\n children,\n ref,\n ...props\n}: MenuItemProps) {\n if (asChild) {\n return (\n <DropdownMenu.Item\n ref={ref}\n asChild\n className={cn(menuItemVariants({ danger }), className)}\n {...props}\n >\n {children}\n </DropdownMenu.Item>\n );\n }\n const content = label ?? children;\n return (\n <DropdownMenu.Item ref={ref} className={cn(menuItemVariants({ danger }), className)} {...props}>\n <InteractionLayer variant={danger ? \"danger\" : \"default\"} />\n {icon && (\n <span\n className={cn(\n \"aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0\",\n danger ? \"aivex:text-icon-danger\" : \"aivex:text-icon-secondary\",\n )}\n >\n {icon}\n </span>\n )}\n <span className=\"aivex:flex-1 aivex:min-w-0 aivex:truncate aivex:text-left\">{content}</span>\n </DropdownMenu.Item>\n );\n}\n\n// ─── CheckboxItem ─────────────────────────────────────────────────────────────\n\ninterface MenuCheckboxItemProps extends ComponentPropsWithoutRef<typeof DropdownMenu.CheckboxItem> {\n label?: ReactNode;\n icon?: ReactNode;\n ref?: Ref<HTMLDivElement>;\n}\n\nfunction MenuCheckboxItem({\n className,\n label,\n icon,\n children,\n ref,\n ...props\n}: MenuCheckboxItemProps) {\n const content = label ?? children;\n return (\n <DropdownMenu.CheckboxItem ref={ref} className={cn(menuItemVariants(), className)} {...props}>\n <InteractionLayer variant=\"default\" />\n <CheckSlot>\n <DropdownMenu.ItemIndicator>\n <CheckIcon size={20} />\n </DropdownMenu.ItemIndicator>\n </CheckSlot>\n {icon && (\n <span className=\"aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0 aivex:text-icon-secondary\">\n {icon}\n </span>\n )}\n <span className=\"aivex:flex-1 aivex:min-w-0 aivex:truncate aivex:text-left\">{content}</span>\n </DropdownMenu.CheckboxItem>\n );\n}\n\n// ─── RadioGroup ───────────────────────────────────────────────────────────────\n\ntype MenuRadioGroupProps = ComponentPropsWithoutRef<typeof DropdownMenu.RadioGroup> & {\n ref?: Ref<HTMLDivElement>;\n};\n\nfunction MenuRadioGroup({ className, ref, ...props }: MenuRadioGroupProps) {\n return (\n <DropdownMenu.RadioGroup\n ref={ref}\n className={cn(\"aivex:flex aivex:flex-col\", className)}\n {...props}\n />\n );\n}\n\n// ─── RadioItem ────────────────────────────────────────────────────────────────\n\ninterface MenuRadioItemProps extends ComponentPropsWithoutRef<typeof DropdownMenu.RadioItem> {\n label?: ReactNode;\n icon?: ReactNode;\n ref?: Ref<HTMLDivElement>;\n}\n\nfunction MenuRadioItem({ className, label, icon, children, ref, ...props }: MenuRadioItemProps) {\n const content = label ?? children;\n return (\n <DropdownMenu.RadioItem ref={ref} className={cn(menuItemVariants(), className)} {...props}>\n <InteractionLayer variant=\"default\" />\n <CheckSlot>\n <DropdownMenu.ItemIndicator>\n <CheckIcon size={20} />\n </DropdownMenu.ItemIndicator>\n </CheckSlot>\n {icon && (\n <span className=\"aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0 aivex:text-icon-secondary\">\n {icon}\n </span>\n )}\n <span className=\"aivex:flex-1 aivex:min-w-0 aivex:truncate aivex:text-left\">{content}</span>\n </DropdownMenu.RadioItem>\n );\n}\n\n// ─── Shortcut ─────────────────────────────────────────────────────────────────\n\ntype MenuShortcutProps = ComponentPropsWithoutRef<\"span\"> & {\n ref?: Ref<HTMLSpanElement>;\n};\n\nfunction MenuShortcut({ className, ref, ...props }: MenuShortcutProps) {\n return (\n <span\n ref={ref}\n className={cn(\n \"aivex:inline-flex aivex:items-center aivex:justify-center aivex:min-h-5 aivex:min-w-5 aivex:px-2xs aivex:rounded-xs aivex:border aivex:border-border-subtle aivex:text-label-md aivex:text-text-tertiary aivex:ml-auto\",\n className,\n )}\n {...props}\n />\n );\n}\n\n// ─── Sub ──────────────────────────────────────────────────────────────────────\n\ntype MenuSubProps = ComponentPropsWithoutRef<typeof DropdownMenu.Sub>;\n\nfunction MenuSub(props: MenuSubProps) {\n return <DropdownMenu.Sub {...props} />;\n}\n\ninterface MenuSubTriggerProps extends ComponentPropsWithoutRef<typeof DropdownMenu.SubTrigger> {\n label?: ReactNode;\n icon?: ReactNode;\n ref?: Ref<HTMLDivElement>;\n}\n\nfunction MenuSubTrigger({ className, label, icon, children, ref, ...props }: MenuSubTriggerProps) {\n const content = label ?? children;\n return (\n <DropdownMenu.SubTrigger ref={ref} className={cn(menuItemVariants(), className)} {...props}>\n <InteractionLayer variant=\"default\" />\n {icon && (\n <span className=\"aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0 aivex:text-icon-secondary\">\n {icon}\n </span>\n )}\n <span className=\"aivex:flex-1 aivex:min-w-0 aivex:truncate aivex:text-left\">{content}</span>\n <span className=\"aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0 aivex:text-icon-secondary\">\n <DirectionRightIcon size={16} />\n </span>\n </DropdownMenu.SubTrigger>\n );\n}\n\ntype MenuSubContentProps = ComponentPropsWithoutRef<typeof DropdownMenu.SubContent> & {\n ref?: Ref<HTMLDivElement>;\n};\n\nfunction MenuSubContent({ className, sideOffset = 4, ref, ...props }: MenuSubContentProps) {\n return (\n <DropdownMenu.Portal>\n <DropdownMenu.SubContent\n ref={ref}\n sideOffset={sideOffset}\n className={cn(contentClassName, className)}\n {...props}\n />\n </DropdownMenu.Portal>\n );\n}\n\n// ─── Internal: CheckSlot ──────────────────────────────────────────────────────\n\n/** 체크 아이콘 자리(20px) — indicator는 활성 시에만 보이지만 자리는 항상 확보 */\nfunction CheckSlot({ children }: { children: ReactNode }) {\n return (\n <span\n aria-hidden\n className=\"aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0 aivex:w-5 aivex:h-5 aivex:text-icon-primary\"\n >\n {children}\n </span>\n );\n}\n\n// ─── Compound export ──────────────────────────────────────────────────────────\n\nconst Menu = Object.assign(MenuRoot, {\n Trigger: MenuTrigger,\n Content: MenuContent,\n Item: MenuItem,\n Group: MenuGroup,\n Separator: MenuSeparator,\n Label: MenuLabel,\n CheckboxItem: MenuCheckboxItem,\n RadioGroup: MenuRadioGroup,\n RadioItem: MenuRadioItem,\n Sub: MenuSub,\n SubTrigger: MenuSubTrigger,\n SubContent: MenuSubContent,\n Shortcut: MenuShortcut,\n});\n\nexport type {\n MenuCheckboxItemProps,\n MenuContentProps,\n MenuGroupProps,\n MenuItemProps,\n MenuLabelProps,\n MenuRadioGroupProps,\n MenuRadioItemProps,\n MenuRootProps,\n MenuSeparatorProps,\n MenuShortcutProps,\n MenuSubContentProps,\n MenuSubProps,\n MenuSubTriggerProps,\n MenuTriggerProps,\n};\nexport { Menu };\n","import { cva, type VariantProps } from \"class-variance-authority\";\nimport type { HTMLAttributes, Ref } from \"react\";\nimport { cn } from \"@/utils/cn\";\n\nconst dividerVariants = cva(\"aivex:shrink-0\", {\n variants: {\n strength: {\n basic: \"\",\n bold: \"\",\n },\n direction: {\n horizontal: \"aivex:w-full\",\n vertical: \"aivex:h-full\",\n },\n },\n compoundVariants: [\n {\n strength: \"basic\",\n direction: \"horizontal\",\n className: \"aivex:border-t aivex:border-border-default\",\n },\n {\n strength: \"basic\",\n direction: \"vertical\",\n className: \"aivex:border-l aivex:border-border-default\",\n },\n {\n strength: \"bold\",\n direction: \"horizontal\",\n className: \"aivex:border-t-2 aivex:border-border-subtle\",\n },\n {\n strength: \"bold\",\n direction: \"vertical\",\n className: \"aivex:border-l-2 aivex:border-border-subtle\",\n },\n ],\n defaultVariants: {\n strength: \"basic\",\n direction: \"horizontal\",\n },\n});\n\nexport interface DividerProps\n extends HTMLAttributes<HTMLHRElement>,\n VariantProps<typeof dividerVariants> {\n ref?: Ref<HTMLHRElement>;\n}\n\nfunction Divider({ className, strength, direction, ref, ...props }: DividerProps) {\n return (\n <hr\n ref={ref}\n aria-orientation={direction === \"vertical\" ? \"vertical\" : \"horizontal\"}\n className={cn(dividerVariants({ strength, direction }), className)}\n {...props}\n />\n );\n}\n\nexport { Divider, dividerVariants };\n","import * as SliderPrimitive from \"@radix-ui/react-slider\";\nimport type { ComponentPropsWithoutRef, Ref } from \"react\";\nimport { useMemo, useState } from \"react\";\nimport { cn } from \"@/utils/cn\";\n\nexport interface SliderProps extends ComponentPropsWithoutRef<typeof SliderPrimitive.Root> {\n trackClassName?: string | ((index: number) => string | undefined);\n /** 트랙 자체(높이 등)를 한 번씩 다르게 써야 하는 호스트를 위한 국소 오버라이드. */\n trackRootClassName?: string;\n thumbClassName?: string | ((index: number) => string | undefined);\n ref?: Ref<HTMLSpanElement>;\n}\n\nfunction Slider({\n className,\n trackClassName,\n trackRootClassName,\n thumbClassName,\n defaultValue = [50],\n value,\n min = 0,\n max = 100,\n step = 1,\n onValueChange,\n ref,\n ...props\n}: SliderProps) {\n const isControlled = value !== undefined;\n const [internalValue, setInternalValue] = useState<number[]>(defaultValue);\n const currentValues = isControlled ? value : internalValue;\n\n const handleValueChange = (newValue: number[]) => {\n if (!isControlled) {\n setInternalValue(newValue);\n }\n onValueChange?.(newValue);\n };\n\n const percentages = useMemo(() => {\n const range = max - min || 1;\n const sortedValues = [...currentValues].sort((a, b) => a - b);\n\n return sortedValues.map((currentValue) => ((currentValue - min) / range) * 100);\n }, [currentValues, min, max]);\n\n const segments = useMemo(() => {\n const points = [0, ...percentages, 100];\n\n return points.slice(0, -1).map((left, index) => ({\n left,\n width: points[index + 1] - left,\n }));\n }, [percentages]);\n\n return (\n <SliderPrimitive.Root\n ref={ref}\n className={cn(\n \"aivex:relative aivex:flex aivex:w-full aivex:touch-none aivex:select-none aivex:items-center aivex:outline-none\",\n \"aivex:data-[disabled]:pointer-events-none aivex:data-[disabled]:opacity-disable\",\n className,\n )}\n defaultValue={defaultValue}\n value={value}\n min={min}\n max={max}\n step={step}\n onValueChange={handleValueChange}\n {...props}\n >\n <SliderPrimitive.Track\n className={cn(\n \"aivex:relative aivex:h-2 aivex:w-full aivex:grow aivex:overflow-hidden aivex:rounded-full aivex:bg-bg-tertiary\",\n trackRootClassName,\n )}\n >\n {segments.map(({ left, width }, index) => {\n const activeIndex = percentages.length >= 2 ? 1 : 0;\n const defaultSegmentClassName =\n index === activeIndex ? \"aivex:bg-bg-brand\" : \"aivex:bg-bg-tertiary\";\n\n return (\n <div\n key={index}\n className={cn(\n \"aivex:absolute aivex:top-0 aivex:h-full aivex:rounded-full\",\n typeof trackClassName === \"string\"\n ? trackClassName\n : (trackClassName?.(index) ?? defaultSegmentClassName),\n )}\n style={{ left: `${left}%`, width: `${width}%` }}\n />\n );\n })}\n </SliderPrimitive.Track>\n {currentValues.map((_, index) => (\n <SliderPrimitive.Thumb\n key={index}\n className={cn(\n \"aivex:z-10 aivex:block aivex:h-6 aivex:w-6 aivex:box-border aivex:rounded-full aivex:border-2 aivex:border-border-brand aivex:bg-bg-primary aivex:shadow-sm\",\n \"aivex:cursor-pointer aivex:transition-transform aivex:hover:scale-110\",\n \"aivex:focus-visible:outline-none aivex:focus-visible:ring-2 aivex:focus-visible:ring-border-brand\",\n \"aivex:disabled:pointer-events-none\",\n typeof thumbClassName === \"string\" ? thumbClassName : thumbClassName?.(index),\n )}\n />\n ))}\n </SliderPrimitive.Root>\n );\n}\n\nexport { Slider };\n","import * as SwitchPrimitive from \"@radix-ui/react-switch\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { type ComponentPropsWithoutRef, type Ref, useId } from \"react\";\nimport { cn } from \"@/utils/cn\";\n\nconst switchTrackVariants = cva(\n // off 트랙은 bg/tertiary(반투명 채움) — border/default를 쓰면 테두리색이 면으로 깔려 탁해진다.\n \"aivex:relative aivex:inline-flex aivex:shrink-0 aivex:items-center aivex:rounded-full aivex:transition-colors aivex:duration-200 aivex:cursor-pointer aivex:bg-bg-tertiary aivex:data-[state=checked]:bg-bg-brand aivex:focus-visible:outline-none aivex:focus-visible:ring-2 aivex:focus-visible:ring-border-brand aivex:disabled:cursor-not-allowed aivex:disabled:opacity-disable\",\n {\n variants: {\n size: {\n sm: \"aivex:w-6 aivex:h-4\",\n md: \"aivex:w-8 aivex:h-5\",\n lg: \"aivex:w-10 aivex:h-6\",\n },\n },\n defaultVariants: { size: \"md\" },\n },\n);\n\ntype SwitchSize = NonNullable<VariantProps<typeof switchTrackVariants>[\"size\"]>;\n\n// 시안 규칙: 노브는 트랙 상하좌우 3px 안쪽 → 노브 = 트랙 높이 - 6.\n// md(32×20, 노브 14px)가 시안 SM과 정확히 일치하고, sm·lg는 같은 규칙으로 맞춘다.\nconst thumbClass: Record<SwitchSize, string> = {\n sm: \"aivex:w-2.5 aivex:h-2.5 aivex:translate-x-[3px] aivex:data-[state=checked]:translate-x-[11px]\",\n md: \"aivex:w-3.5 aivex:h-3.5 aivex:translate-x-[3px] aivex:data-[state=checked]:translate-x-[15px]\",\n lg: \"aivex:w-[18px] aivex:h-[18px] aivex:translate-x-[3px] aivex:data-[state=checked]:translate-x-[19px]\",\n};\n\nconst switchLabelSizeClass: Record<SwitchSize, string> = {\n sm: \"aivex:h-4\",\n md: \"aivex:h-5\",\n lg: \"aivex:h-6\",\n};\n\nexport interface SwitchProps\n extends Omit<\n ComponentPropsWithoutRef<typeof SwitchPrimitive.Root>,\n \"asChild\" | \"children\" | \"onCheckedChange\"\n >,\n VariantProps<typeof switchTrackVariants> {\n label?: string;\n // 배포된 선언을 소비할 때도 콜백 인자의 contextual typing을 보존한다.\n onCheckedChange?: (checked: boolean) => void;\n ref?: Ref<HTMLButtonElement>;\n}\n\nfunction Switch({ className, label, size = \"md\", disabled, id, ref, ...props }: SwitchProps) {\n const resolvedSize = size ?? \"md\";\n const generatedId = useId();\n const switchId = id ?? generatedId;\n\n return (\n <span\n className={cn(\n \"aivex:inline-flex aivex:items-center aivex:gap-md\",\n disabled && \"aivex:opacity-disable\",\n )}\n >\n <SwitchPrimitive.Root\n ref={ref}\n id={switchId}\n disabled={disabled}\n className={cn(switchTrackVariants({ size: resolvedSize }), className)}\n {...props}\n >\n <SwitchPrimitive.Thumb\n className={cn(\n \"aivex:block aivex:rounded-full aivex:bg-white aivex:shadow-[var(--aivex-elevation-sm)] aivex:transition-transform aivex:duration-200 aivex:will-change-transform\",\n thumbClass[resolvedSize],\n )}\n />\n </SwitchPrimitive.Root>\n {label && (\n <label\n htmlFor={switchId}\n className={cn(\n \"aivex:inline-flex aivex:items-center aivex:cursor-pointer aivex:select-none aivex:text-label-lg aivex:text-text-primary\",\n disabled && \"aivex:cursor-not-allowed\",\n switchLabelSizeClass[resolvedSize],\n )}\n >\n {label}\n </label>\n )}\n </span>\n );\n}\n\nexport { Switch };\n"],"mappings":"oSAWA,IAAM,GAAA,EAAA,EAAA,KACJ,0UACA,CACE,SAAU,CACR,OAAQ,CACN,KAAM,yBACN,MAAO,0BACR,CACF,CACD,gBAAiB,CACf,OAAQ,GACT,CACF,CACF,CAEK,EAAmB,EAAA,GACvB,gGACA,8EACA,gCACA,2EACA,yEACA,2EACD,CAMD,SAAS,EAAS,EAAsB,CACtC,OAAO,EAAA,EAAA,KAAC,EAAa,KAAd,CAAmB,GAAI,EAAS,CAAA,CASzC,SAAS,EAAY,CAAE,MAAK,GAAG,GAA2B,CACxD,OAAO,EAAA,EAAA,KAAC,EAAa,QAAd,CAA2B,MAAK,GAAI,EAAS,CAAA,CASt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AI,YACJ,GAAI,YACL,CAcD,SAAS,EAAO,CAAE,YAAW,QAAO,OAAO,KAAM,WAAU,KAAI,MAAK,GAAG,GAAsB,CAC3F,IAAM,EAAe,GAAQ,KACvB,GAAA,EAAA,EAAA,QAAqB,CACrB,EAAW,GAAM,EAEvB,OACE,EAAA,EAAA,MAAC,OAAD,CACE,UAAW,EAAA,GACT,oDACA,GAAY,wBACb,UAJH,EAME,EAAA,EAAA,KAAC,EAAgB,KAAjB,CACO,MACL,GAAI,EACM,WACV,UAAW,EAAA,GAAG,EAAoB,CAAE,KAAM,EAAc,CAAC,CAAE,EAAU,CACrE,GAAI,YAEJ,EAAA,EAAA,KAAC,EAAgB,MAAjB,CACE,UAAW,EAAA,GACT,mKACA,EAAW,GACZ,CACD,CAAA,CACmB,CAAA,CACtB,IACC,EAAA,EAAA,KAAC,QAAD,CACE,QAAS,EACT,UAAW,EAAA,GACT,0HACA,GAAY,2BACZ,EAAqB,GACtB,UAEA,EACK,CAAA,CAEL"}
1
+ {"version":3,"file":"Switch-DFFbGN33.cjs","names":[],"sources":["../src/components/Menu/Menu.tsx","../src/components/Divider/Divider.tsx","../src/components/Slider/Slider.tsx","../src/components/Switch/Switch.tsx"],"sourcesContent":["\"use client\";\n\nimport * as DropdownMenu from \"@radix-ui/react-dropdown-menu\";\nimport { cva } from \"class-variance-authority\";\nimport type { ComponentPropsWithoutRef, ReactNode, Ref } from \"react\";\nimport { CheckIcon, DirectionRightIcon } from \"@/components/Icon\";\nimport { InteractionLayer } from \"@/components/InteractionLayer\";\nimport { cn } from \"@/utils/cn\";\n\n// ─── menuItemVariants ─────────────────────────────────────────────────────────\n\nconst menuItemVariants = cva(\n \"aivex:relative aivex:overflow-hidden aivex:group aivex:flex aivex:w-full aivex:items-center aivex:gap-md aivex:px-md aivex:py-sm aivex:text-label-lg aivex:rounded-md aivex:transition-colors aivex:cursor-pointer aivex:select-none aivex:outline-none aivex:data-[disabled]:opacity-disable aivex:data-[disabled]:pointer-events-none\",\n {\n variants: {\n danger: {\n true: \"aivex:text-text-danger\",\n false: \"aivex:text-text-primary\",\n },\n },\n defaultVariants: {\n danger: false,\n },\n },\n);\n\nconst contentClassName = cn(\n \"aivex:flex aivex:flex-col aivex:rounded-md aivex:bg-bg-primary aivex:p-md aivex:overflow-clip\",\n \"aivex:shadow-md aivex:border aivex:border-border-subtle aivex:min-w-[160px]\",\n \"aivex:z-50 aivex:outline-none\",\n \"aivex:data-[state=open]:animate-in aivex:data-[state=closed]:animate-out\",\n \"aivex:data-[state=closed]:fade-out-0 aivex:data-[state=open]:fade-in-0\",\n \"aivex:data-[state=closed]:zoom-out-95 aivex:data-[state=open]:zoom-in-95\",\n);\n\n// ─── Root ─────────────────────────────────────────────────────────────────────\n\ntype MenuRootProps = ComponentPropsWithoutRef<typeof DropdownMenu.Root>;\n\nfunction MenuRoot(props: MenuRootProps) {\n return <DropdownMenu.Root {...props} />;\n}\n\n// ─── Trigger ──────────────────────────────────────────────────────────────────\n\ntype MenuTriggerProps = ComponentPropsWithoutRef<typeof DropdownMenu.Trigger> & {\n ref?: Ref<HTMLButtonElement>;\n};\n\nfunction MenuTrigger({ ref, ...props }: MenuTriggerProps) {\n return <DropdownMenu.Trigger ref={ref} {...props} />;\n}\n\n// ─── Content ──────────────────────────────────────────────────────────────────\n\ntype MenuContentProps = ComponentPropsWithoutRef<typeof DropdownMenu.Content> & {\n ref?: Ref<HTMLDivElement>;\n};\n\nfunction MenuContent({ className, sideOffset = 4, ref, ...props }: MenuContentProps) {\n return (\n <DropdownMenu.Portal>\n <DropdownMenu.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(contentClassName, className)}\n {...props}\n />\n </DropdownMenu.Portal>\n );\n}\n\n// ─── Group ────────────────────────────────────────────────────────────────────\n\ntype MenuGroupProps = ComponentPropsWithoutRef<typeof DropdownMenu.Group> & {\n ref?: Ref<HTMLDivElement>;\n};\n\nfunction MenuGroup({ className, ref, ...props }: MenuGroupProps) {\n return (\n <DropdownMenu.Group\n ref={ref}\n className={cn(\"aivex:flex aivex:flex-col\", className)}\n {...props}\n />\n );\n}\n\n// ─── Separator ────────────────────────────────────────────────────────────────\n\ntype MenuSeparatorProps = ComponentPropsWithoutRef<typeof DropdownMenu.Separator> & {\n ref?: Ref<HTMLDivElement>;\n};\n\nfunction MenuSeparator({ className, ref, ...props }: MenuSeparatorProps) {\n return (\n <DropdownMenu.Separator\n ref={ref}\n className={cn(\"aivex:h-px aivex:bg-border-subtle aivex:w-full aivex:my-xs\", className)}\n {...props}\n />\n );\n}\n\n// ─── Label ────────────────────────────────────────────────────────────────────\n\ntype MenuLabelProps = ComponentPropsWithoutRef<typeof DropdownMenu.Label> & {\n ref?: Ref<HTMLDivElement>;\n};\n\nfunction MenuLabel({ className, ref, ...props }: MenuLabelProps) {\n return (\n <DropdownMenu.Label\n ref={ref}\n className={cn(\n \"aivex:px-md aivex:py-2xs aivex:text-label-md aivex:text-text-tertiary aivex:select-none\",\n className,\n )}\n {...props}\n />\n );\n}\n\n// ─── Item ─────────────────────────────────────────────────────────────────────\n\ninterface MenuItemProps\n extends Omit<ComponentPropsWithoutRef<typeof DropdownMenu.Item>, \"children\"> {\n /** label/icon으로 렌더할 때 사용. asChild 모드에선 무시 */\n label?: ReactNode;\n icon?: ReactNode;\n danger?: boolean;\n /** Radix asChild — 자식 컴포넌트(Link 등)에 메뉴 동작/스타일 위임 */\n asChild?: boolean;\n children?: ReactNode;\n ref?: Ref<HTMLDivElement>;\n}\n\nfunction MenuItem({\n className,\n label,\n icon,\n danger = false,\n asChild,\n children,\n ref,\n ...props\n}: MenuItemProps) {\n if (asChild) {\n return (\n <DropdownMenu.Item\n ref={ref}\n asChild\n className={cn(menuItemVariants({ danger }), className)}\n {...props}\n >\n {children}\n </DropdownMenu.Item>\n );\n }\n const content = label ?? children;\n return (\n <DropdownMenu.Item ref={ref} className={cn(menuItemVariants({ danger }), className)} {...props}>\n <InteractionLayer variant={danger ? \"danger\" : \"default\"} />\n {icon && (\n <span\n className={cn(\n \"aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0\",\n danger ? \"aivex:text-icon-danger\" : \"aivex:text-icon-secondary\",\n )}\n >\n {icon}\n </span>\n )}\n <span className=\"aivex:flex-1 aivex:min-w-0 aivex:truncate aivex:text-left\">{content}</span>\n </DropdownMenu.Item>\n );\n}\n\n// ─── CheckboxItem ─────────────────────────────────────────────────────────────\n\ninterface MenuCheckboxItemProps extends ComponentPropsWithoutRef<typeof DropdownMenu.CheckboxItem> {\n label?: ReactNode;\n icon?: ReactNode;\n ref?: Ref<HTMLDivElement>;\n}\n\nfunction MenuCheckboxItem({\n className,\n label,\n icon,\n children,\n ref,\n ...props\n}: MenuCheckboxItemProps) {\n const content = label ?? children;\n return (\n <DropdownMenu.CheckboxItem ref={ref} className={cn(menuItemVariants(), className)} {...props}>\n <InteractionLayer variant=\"default\" />\n <CheckSlot>\n <DropdownMenu.ItemIndicator>\n <CheckIcon size={20} />\n </DropdownMenu.ItemIndicator>\n </CheckSlot>\n {icon && (\n <span className=\"aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0 aivex:text-icon-secondary\">\n {icon}\n </span>\n )}\n <span className=\"aivex:flex-1 aivex:min-w-0 aivex:truncate aivex:text-left\">{content}</span>\n </DropdownMenu.CheckboxItem>\n );\n}\n\n// ─── RadioGroup ───────────────────────────────────────────────────────────────\n\ntype MenuRadioGroupProps = ComponentPropsWithoutRef<typeof DropdownMenu.RadioGroup> & {\n ref?: Ref<HTMLDivElement>;\n};\n\nfunction MenuRadioGroup({ className, ref, ...props }: MenuRadioGroupProps) {\n return (\n <DropdownMenu.RadioGroup\n ref={ref}\n className={cn(\"aivex:flex aivex:flex-col\", className)}\n {...props}\n />\n );\n}\n\n// ─── RadioItem ────────────────────────────────────────────────────────────────\n\ninterface MenuRadioItemProps extends ComponentPropsWithoutRef<typeof DropdownMenu.RadioItem> {\n label?: ReactNode;\n icon?: ReactNode;\n ref?: Ref<HTMLDivElement>;\n}\n\nfunction MenuRadioItem({ className, label, icon, children, ref, ...props }: MenuRadioItemProps) {\n const content = label ?? children;\n return (\n <DropdownMenu.RadioItem ref={ref} className={cn(menuItemVariants(), className)} {...props}>\n <InteractionLayer variant=\"default\" />\n <CheckSlot>\n <DropdownMenu.ItemIndicator>\n <CheckIcon size={20} />\n </DropdownMenu.ItemIndicator>\n </CheckSlot>\n {icon && (\n <span className=\"aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0 aivex:text-icon-secondary\">\n {icon}\n </span>\n )}\n <span className=\"aivex:flex-1 aivex:min-w-0 aivex:truncate aivex:text-left\">{content}</span>\n </DropdownMenu.RadioItem>\n );\n}\n\n// ─── Shortcut ─────────────────────────────────────────────────────────────────\n\ntype MenuShortcutProps = ComponentPropsWithoutRef<\"span\"> & {\n ref?: Ref<HTMLSpanElement>;\n};\n\nfunction MenuShortcut({ className, ref, ...props }: MenuShortcutProps) {\n return (\n <span\n ref={ref}\n className={cn(\n \"aivex:inline-flex aivex:items-center aivex:justify-center aivex:min-h-5 aivex:min-w-5 aivex:px-2xs aivex:rounded-xs aivex:border aivex:border-border-subtle aivex:text-label-md aivex:text-text-tertiary aivex:ml-auto\",\n className,\n )}\n {...props}\n />\n );\n}\n\n// ─── Sub ──────────────────────────────────────────────────────────────────────\n\ntype MenuSubProps = ComponentPropsWithoutRef<typeof DropdownMenu.Sub>;\n\nfunction MenuSub(props: MenuSubProps) {\n return <DropdownMenu.Sub {...props} />;\n}\n\ninterface MenuSubTriggerProps extends ComponentPropsWithoutRef<typeof DropdownMenu.SubTrigger> {\n label?: ReactNode;\n icon?: ReactNode;\n ref?: Ref<HTMLDivElement>;\n}\n\nfunction MenuSubTrigger({ className, label, icon, children, ref, ...props }: MenuSubTriggerProps) {\n const content = label ?? children;\n return (\n <DropdownMenu.SubTrigger ref={ref} className={cn(menuItemVariants(), className)} {...props}>\n <InteractionLayer variant=\"default\" />\n {icon && (\n <span className=\"aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0 aivex:text-icon-secondary\">\n {icon}\n </span>\n )}\n <span className=\"aivex:flex-1 aivex:min-w-0 aivex:truncate aivex:text-left\">{content}</span>\n <span className=\"aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0 aivex:text-icon-secondary\">\n <DirectionRightIcon size={16} />\n </span>\n </DropdownMenu.SubTrigger>\n );\n}\n\ntype MenuSubContentProps = ComponentPropsWithoutRef<typeof DropdownMenu.SubContent> & {\n ref?: Ref<HTMLDivElement>;\n};\n\nfunction MenuSubContent({ className, sideOffset = 4, ref, ...props }: MenuSubContentProps) {\n return (\n <DropdownMenu.Portal>\n <DropdownMenu.SubContent\n ref={ref}\n sideOffset={sideOffset}\n className={cn(contentClassName, className)}\n {...props}\n />\n </DropdownMenu.Portal>\n );\n}\n\n// ─── Internal: CheckSlot ──────────────────────────────────────────────────────\n\n/** 체크 아이콘 자리(20px) — indicator는 활성 시에만 보이지만 자리는 항상 확보 */\nfunction CheckSlot({ children }: { children: ReactNode }) {\n return (\n <span\n aria-hidden\n className=\"aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0 aivex:w-5 aivex:h-5 aivex:text-icon-primary\"\n >\n {children}\n </span>\n );\n}\n\n// ─── Compound export ──────────────────────────────────────────────────────────\n\nconst Menu = Object.assign(MenuRoot, {\n Trigger: MenuTrigger,\n Content: MenuContent,\n Item: MenuItem,\n Group: MenuGroup,\n Separator: MenuSeparator,\n Label: MenuLabel,\n CheckboxItem: MenuCheckboxItem,\n RadioGroup: MenuRadioGroup,\n RadioItem: MenuRadioItem,\n Sub: MenuSub,\n SubTrigger: MenuSubTrigger,\n SubContent: MenuSubContent,\n Shortcut: MenuShortcut,\n});\n\nexport type {\n MenuCheckboxItemProps,\n MenuContentProps,\n MenuGroupProps,\n MenuItemProps,\n MenuLabelProps,\n MenuRadioGroupProps,\n MenuRadioItemProps,\n MenuRootProps,\n MenuSeparatorProps,\n MenuShortcutProps,\n MenuSubContentProps,\n MenuSubProps,\n MenuSubTriggerProps,\n MenuTriggerProps,\n};\nexport { Menu };\n","import { cva, type VariantProps } from \"class-variance-authority\";\nimport type { HTMLAttributes, Ref } from \"react\";\nimport { cn } from \"@/utils/cn\";\n\nconst dividerVariants = cva(\"aivex:shrink-0\", {\n variants: {\n strength: {\n basic: \"\",\n bold: \"\",\n },\n direction: {\n horizontal: \"aivex:w-full\",\n vertical: \"aivex:h-full\",\n },\n },\n compoundVariants: [\n {\n strength: \"basic\",\n direction: \"horizontal\",\n className: \"aivex:border-t aivex:border-border-default\",\n },\n {\n strength: \"basic\",\n direction: \"vertical\",\n className: \"aivex:border-l aivex:border-border-default\",\n },\n {\n strength: \"bold\",\n direction: \"horizontal\",\n className: \"aivex:border-t-2 aivex:border-border-subtle\",\n },\n {\n strength: \"bold\",\n direction: \"vertical\",\n className: \"aivex:border-l-2 aivex:border-border-subtle\",\n },\n ],\n defaultVariants: {\n strength: \"basic\",\n direction: \"horizontal\",\n },\n});\n\nexport interface DividerProps\n extends HTMLAttributes<HTMLHRElement>,\n VariantProps<typeof dividerVariants> {\n ref?: Ref<HTMLHRElement>;\n}\n\nfunction Divider({ className, strength, direction, ref, ...props }: DividerProps) {\n return (\n <hr\n ref={ref}\n aria-orientation={direction === \"vertical\" ? \"vertical\" : \"horizontal\"}\n className={cn(dividerVariants({ strength, direction }), className)}\n {...props}\n />\n );\n}\n\nexport { Divider, dividerVariants };\n","import * as SliderPrimitive from \"@radix-ui/react-slider\";\nimport type { ComponentPropsWithoutRef, Ref } from \"react\";\nimport { useMemo, useState } from \"react\";\nimport { cn } from \"@/utils/cn\";\n\nexport interface SliderProps extends ComponentPropsWithoutRef<typeof SliderPrimitive.Root> {\n trackClassName?: string | ((index: number) => string | undefined);\n /** 트랙 자체(높이 등)를 한 번씩 다르게 써야 하는 호스트를 위한 국소 오버라이드. */\n trackRootClassName?: string;\n thumbClassName?: string | ((index: number) => string | undefined);\n ref?: Ref<HTMLSpanElement>;\n}\n\nfunction Slider({\n className,\n trackClassName,\n trackRootClassName,\n thumbClassName,\n defaultValue = [50],\n value,\n min = 0,\n max = 100,\n step = 1,\n onValueChange,\n ref,\n ...props\n}: SliderProps) {\n const isControlled = value !== undefined;\n const [internalValue, setInternalValue] = useState<number[]>(defaultValue);\n const currentValues = isControlled ? value : internalValue;\n\n const handleValueChange = (newValue: number[]) => {\n if (!isControlled) {\n setInternalValue(newValue);\n }\n onValueChange?.(newValue);\n };\n\n const percentages = useMemo(() => {\n const range = max - min || 1;\n const sortedValues = [...currentValues].sort((a, b) => a - b);\n\n return sortedValues.map((currentValue) => ((currentValue - min) / range) * 100);\n }, [currentValues, min, max]);\n\n const segments = useMemo(() => {\n const points = [0, ...percentages, 100];\n\n return points.slice(0, -1).map((left, index) => ({\n left,\n width: points[index + 1] - left,\n }));\n }, [percentages]);\n\n return (\n <SliderPrimitive.Root\n ref={ref}\n className={cn(\n \"aivex:relative aivex:flex aivex:w-full aivex:touch-none aivex:select-none aivex:items-center aivex:outline-none\",\n \"aivex:data-[disabled]:pointer-events-none aivex:data-[disabled]:opacity-disable\",\n className,\n )}\n defaultValue={defaultValue}\n value={value}\n min={min}\n max={max}\n step={step}\n onValueChange={handleValueChange}\n {...props}\n >\n <SliderPrimitive.Track\n className={cn(\n \"aivex:relative aivex:h-2 aivex:w-full aivex:grow aivex:overflow-hidden aivex:rounded-full aivex:bg-bg-tertiary\",\n trackRootClassName,\n )}\n >\n {segments.map(({ left, width }, index) => {\n const activeIndex = percentages.length >= 2 ? 1 : 0;\n const defaultSegmentClassName =\n index === activeIndex ? \"aivex:bg-bg-brand\" : \"aivex:bg-bg-tertiary\";\n\n return (\n <div\n key={index}\n className={cn(\n \"aivex:absolute aivex:top-0 aivex:h-full aivex:rounded-full\",\n typeof trackClassName === \"string\"\n ? trackClassName\n : (trackClassName?.(index) ?? defaultSegmentClassName),\n )}\n style={{ left: `${left}%`, width: `${width}%` }}\n />\n );\n })}\n </SliderPrimitive.Track>\n {currentValues.map((_, index) => (\n <SliderPrimitive.Thumb\n key={index}\n className={cn(\n \"aivex:z-10 aivex:block aivex:h-6 aivex:w-6 aivex:box-border aivex:rounded-full aivex:border-2 aivex:border-border-brand aivex:bg-bg-primary aivex:shadow-sm\",\n \"aivex:cursor-pointer aivex:transition-transform aivex:hover:scale-110\",\n \"aivex:focus-visible:outline-none aivex:focus-visible:ring-2 aivex:focus-visible:ring-border-brand\",\n \"aivex:disabled:pointer-events-none\",\n typeof thumbClassName === \"string\" ? thumbClassName : thumbClassName?.(index),\n )}\n />\n ))}\n </SliderPrimitive.Root>\n );\n}\n\nexport { Slider };\n","import * as SwitchPrimitive from \"@radix-ui/react-switch\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { type ComponentPropsWithoutRef, type Ref, useId } from \"react\";\nimport { cn } from \"@/utils/cn\";\n\nconst switchTrackVariants = cva(\n // off 트랙은 bg/tertiary(반투명 채움) — border/default를 쓰면 테두리색이 면으로 깔려 탁해진다.\n \"aivex:relative aivex:inline-flex aivex:shrink-0 aivex:items-center aivex:rounded-full aivex:transition-colors aivex:duration-200 aivex:cursor-pointer aivex:bg-bg-tertiary aivex:data-[state=checked]:bg-bg-brand aivex:focus-visible:outline-none aivex:focus-visible:ring-2 aivex:focus-visible:ring-border-brand aivex:disabled:cursor-not-allowed aivex:disabled:opacity-disable\",\n {\n variants: {\n size: {\n sm: \"aivex:w-6 aivex:h-4\",\n md: \"aivex:w-8 aivex:h-5\",\n lg: \"aivex:w-10 aivex:h-6\",\n },\n },\n defaultVariants: { size: \"md\" },\n },\n);\n\ntype SwitchSize = NonNullable<VariantProps<typeof switchTrackVariants>[\"size\"]>;\n\n// 시안 규칙: 노브는 트랙 상하좌우 3px 안쪽 → 노브 = 트랙 높이 - 6.\n// md(32×20, 노브 14px)가 시안 SM과 정확히 일치하고, sm·lg는 같은 규칙으로 맞춘다.\nconst thumbClass: Record<SwitchSize, string> = {\n sm: \"aivex:w-2.5 aivex:h-2.5 aivex:translate-x-[3px] aivex:data-[state=checked]:translate-x-[11px]\",\n md: \"aivex:w-3.5 aivex:h-3.5 aivex:translate-x-[3px] aivex:data-[state=checked]:translate-x-[15px]\",\n lg: \"aivex:w-[18px] aivex:h-[18px] aivex:translate-x-[3px] aivex:data-[state=checked]:translate-x-[19px]\",\n};\n\nconst switchLabelSizeClass: Record<SwitchSize, string> = {\n sm: \"aivex:h-4\",\n md: \"aivex:h-5\",\n lg: \"aivex:h-6\",\n};\n\nexport interface SwitchProps\n extends Omit<\n ComponentPropsWithoutRef<typeof SwitchPrimitive.Root>,\n \"asChild\" | \"children\" | \"onCheckedChange\"\n >,\n VariantProps<typeof switchTrackVariants> {\n label?: string;\n // 배포된 선언을 소비할 때도 콜백 인자의 contextual typing을 보존한다.\n onCheckedChange?: (checked: boolean) => void;\n ref?: Ref<HTMLButtonElement>;\n}\n\nfunction Switch({ className, label, size = \"md\", disabled, id, ref, ...props }: SwitchProps) {\n const resolvedSize = size ?? \"md\";\n const generatedId = useId();\n const switchId = id ?? generatedId;\n\n return (\n <span\n className={cn(\n \"aivex:inline-flex aivex:items-center aivex:gap-md\",\n disabled && \"aivex:opacity-disable\",\n )}\n >\n <SwitchPrimitive.Root\n ref={ref}\n id={switchId}\n disabled={disabled}\n className={cn(switchTrackVariants({ size: resolvedSize }), className)}\n {...props}\n >\n <SwitchPrimitive.Thumb\n className={cn(\n \"aivex:block aivex:rounded-full aivex:bg-white aivex:shadow-[var(--aivex-elevation-sm)] aivex:transition-transform aivex:duration-200 aivex:will-change-transform\",\n thumbClass[resolvedSize],\n )}\n />\n </SwitchPrimitive.Root>\n {label && (\n <label\n htmlFor={switchId}\n className={cn(\n \"aivex:inline-flex aivex:items-center aivex:cursor-pointer aivex:select-none aivex:text-label-lg aivex:text-text-primary\",\n disabled && \"aivex:cursor-not-allowed\",\n switchLabelSizeClass[resolvedSize],\n )}\n >\n {label}\n </label>\n )}\n </span>\n );\n}\n\nexport { Switch };\n"],"mappings":"oSAWA,IAAM,GAAA,EAAA,EAAA,KACJ,0UACA,CACE,SAAU,CACR,OAAQ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,8JACA,wEACA,oGACA,qCACA,OAAO,GAAmB,SAAW,EAAiB,IAAiB,EAAM,CAC9E,CACD,CARK,EAQL,CACF,CACmB,GCtG3B,IAAM,GAAA,EAAA,EAAA,KAEJ,uXACA,CACE,SAAU,CACR,KAAM,CACJ,GAAI,sBACJ,GAAI,sBACJ,GAAI,uBACL,CACF,CACD,gBAAiB,CAAE,KAAM,KAAM,CAChC,CACF,CAMK,EAAyC,CAC7C,GAAI,gGACJ,GAAI,gGACJ,GAAI,sGACL,CAEK,EAAmD,CACvD,GAAI,YACJ,GAAI,YACJ,GAAI,YACL,CAcD,SAAS,EAAO,CAAE,YAAW,QAAO,OAAO,KAAM,WAAU,KAAI,MAAK,GAAG,GAAsB,CAC3F,IAAM,EAAe,GAAQ,KACvB,GAAA,EAAA,EAAA,QAAqB,CACrB,EAAW,GAAM,EAEvB,OACE,EAAA,EAAA,MAAC,OAAD,CACE,UAAW,EAAA,GACT,oDACA,GAAY,wBACb,UAJH,EAME,EAAA,EAAA,KAAC,EAAgB,KAAjB,CACO,MACL,GAAI,EACM,WACV,UAAW,EAAA,GAAG,EAAoB,CAAE,KAAM,EAAc,CAAC,CAAE,EAAU,CACrE,GAAI,YAEJ,EAAA,EAAA,KAAC,EAAgB,MAAjB,CACE,UAAW,EAAA,GACT,mKACA,EAAW,GACZ,CACD,CAAA,CACmB,CAAA,CACtB,IACC,EAAA,EAAA,KAAC,QAAD,CACE,QAAS,EACT,UAAW,EAAA,GACT,0HACA,GAAY,2BACZ,EAAqB,GACtB,UAEA,EACK,CAAA,CAEL"}
package/dist/comment.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use client";require(`./styles.css`),Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./Button-OQscp8mY.cjs`),t=require(`./IconButton-Cl3T7MUr.cjs`);let n=require(`react/jsx-runtime`),r=require(`react`),i=require(`@tiptap/extension-mention`);i=e.pa(i,1);let a=require(`@tiptap/extension-placeholder`);a=e.pa(a,1);let o=require(`@tiptap/react`),s=require(`@tiptap/starter-kit`);s=e.pa(s,1);let c=require(`tippy.js`);c=e.pa(c,1);var l=(0,r.memo)(function({items:e,command:i,emptyText:a=`No results found.`,ref:o}){let[s,c]=(0,r.useState)(0),l=(0,r.useRef)([]),u=(0,r.useCallback)(t=>{let n=e[t];n&&i(n)},[e,i]),d=(0,r.useCallback)(t=>{c(n=>{let r=e.length;return t===`up`?(n+r-1)%r:(n+1)%r})},[e.length]),f=(0,r.useCallback)(e=>{switch(e.key){case`ArrowUp`:return d(`up`),!0;case`ArrowDown`:return d(`down`),!0;case`Enter`:return u(s),!0;default:return!1}},[d,u,s]);return(0,r.useEffect)(()=>{c(0),l.current=e.map(()=>null)},[e]),(0,r.useEffect)(()=>{l.current[s]?.scrollIntoView({behavior:`smooth`,block:`nearest`})},[s]),(0,r.useImperativeHandle)(o,()=>({onKeyDown:f}),[f]),e.length?(0,n.jsx)(`div`,{className:`aivex:h-full aivex:max-h-[248px] aivex:min-w-[298px] aivex:max-w-[328px] aivex:overflow-y-auto aivex:rounded-lg aivex:border aivex:border-border-subtle aivex:bg-bg-primary aivex:py-2 aivex:shadow-xl`,children:e.map((e,r)=>(0,n.jsxs)(`div`,{ref:e=>{l.current[r]=e},className:`aivex:flex aivex:h-[52px] aivex:cursor-pointer aivex:items-center aivex:gap-2 aivex:px-4 aivex:py-2 ${s===r?`aivex:bg-bg-brand-subtle`:``}`,onClick:()=>u(r),children:[(0,n.jsx)(t.r,{size:`sm`,src:e.avatarUrl,bgColor:e.color,name:e.name}),(0,n.jsxs)(`div`,{className:`aivex:flex aivex:max-w-[260px] aivex:flex-col`,children:[(0,n.jsx)(`div`,{className:`aivex:truncate aivex:text-label-md aivex:text-text-primary`,children:e.name}),e.email?(0,n.jsx)(`div`,{className:`aivex:truncate aivex:text-body-sm-regular aivex:text-text-secondary`,children:e.email}):null]})]},e.id))}):(0,n.jsx)(`div`,{className:`aivex:min-w-[298px] aivex:max-w-[328px] aivex:rounded-lg aivex:border aivex:border-border-subtle aivex:bg-bg-primary aivex:py-2 aivex:shadow-xl`,children:(0,n.jsx)(`div`,{className:`aivex:p-2 aivex:text-body-md-regular aivex:text-text-secondary`,children:a})})}),u=(e,t,n)=>(0,r.useMemo)(()=>{let r=t=>{if(!t)return e;let n=t.toLowerCase();return e.filter(e=>e.name.toLowerCase().includes(n)||(e.email??``).toLowerCase().includes(n))},i=e=>t=>{e({id:t.id,label:t.name})};return{items:({query:e})=>r(e),render:()=>{let e=null,r=null;return{onStart:a=>{e=new o.ReactRenderer(l,{props:{...a,emptyText:n,command:i(a.command)},editor:a.editor}),a.clientRect&&(r=(0,c.default)(`body`,{getReferenceClientRect:a.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:`manual`,placement:`bottom-start`}),t?.(!0))},onUpdate(t){e?.updateProps({...t,emptyText:n,command:i(t.command)}),t.clientRect&&r?.[0]?.setProps({getReferenceClientRect:t.clientRect})},onKeyDown(n){return n.event.key===`Escape`?(r?.[0]&&!r[0].state.isDestroyed&&r[0].hide(),t?.(!1),!0):e?.ref?.onKeyDown(n.event)||!1},onExit(){r?.[0]&&!r[0].state.isDestroyed&&r[0].destroy(),e?.destroy(),r=null,e=null,t?.(!1)}}}}},[e,t,n]);function d({value:e,onChange:t,placeholder:c,onSubmit:l,onEscape:d,userList:p=[],initialContent:m,mentionEmptyText:h,autoFocus:g=!0,handleRef:_}){let v=(0,r.useRef)(null),[y,b]=(0,r.useState)(!1),x=u(p,b,h),S=(0,o.useEditor)({extensions:[s.default,a.default.configure({placeholder:c,emptyEditorClass:`aivex:before:content-[attr(data-placeholder)] aivex:before:text-text-tertiary aivex:before:absolute aivex:before:left-3`}),i.default.configure({HTMLAttributes:{class:`aivex:text-text-brand aivex:px-1`},renderHTML({options:e,node:t}){return[`span`,(0,o.mergeAttributes)(e.HTMLAttributes),`${t.attrs.label}`]},renderText({node:e}){return`@[${e.attrs.label}](${e.attrs.id})`},deleteTriggerWithBackspace:!0,suggestion:x})],content:m||e,immediatelyRender:!1,editorProps:{attributes:{class:`aivex:px-3 aivex:py-1 aivex:rounded-lg aivex:border aivex:border-border-subtle aivex:bg-bg-secondary aivex:focus:border-border-brand aivex:outline-none aivex:text-body-md-regular aivex:text-text-primary aivex:cursor-text aivex:[&_p]:leading-[22px]`},handleKeyDown:(t,n)=>n.key===`Enter`?y||n.shiftKey||n.metaKey||n.ctrlKey||n.altKey?!1:(n.preventDefault(),e.trim()&&l&&l(),!0):n.key===`Escape`?y?!1:(n.preventDefault(),d?.(),!0):!1},onUpdate:({editor:e})=>{t(f(e.getJSON()))}});return(0,r.useEffect)(()=>{S&&!m&&e!==S.getText()&&S.commands.setContent(e)},[e,S,m]),(0,r.useEffect)(()=>{S&&g&&requestAnimationFrame(()=>{S.commands.focus()})},[S,g]),(0,r.useImperativeHandle)(_,()=>({focus:()=>{S?.commands.focus()}}),[S]),(0,n.jsx)(o.EditorContent,{ref:v,editor:S,className:`aivex:relative aivex:h-full aivex:w-full`,onKeyDown:e=>e.stopPropagation()})}function f(e){if(!e?.content)return``;let t=e=>e.type===`mention`&&e.attrs?`@[${e.attrs.label}](${e.attrs.id})`:e.type===`text`?e.text||``:e.type===`hardBreak`?`
1
+ "use client";require(`./styles.css`),Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./Button-B33c3wzf.cjs`),t=require(`./IconButton-CfE0F-oc.cjs`);let n=require(`react/jsx-runtime`),r=require(`react`),i=require(`@tiptap/extension-mention`);i=e.ma(i,1);let a=require(`@tiptap/extension-placeholder`);a=e.ma(a,1);let o=require(`@tiptap/react`),s=require(`@tiptap/starter-kit`);s=e.ma(s,1);let c=require(`tippy.js`);c=e.ma(c,1);var l=(0,r.memo)(function({items:e,command:i,emptyText:a=`No results found.`,ref:o}){let[s,c]=(0,r.useState)(0),l=(0,r.useRef)([]),u=(0,r.useCallback)(t=>{let n=e[t];n&&i(n)},[e,i]),d=(0,r.useCallback)(t=>{c(n=>{let r=e.length;return t===`up`?(n+r-1)%r:(n+1)%r})},[e.length]),f=(0,r.useCallback)(e=>{switch(e.key){case`ArrowUp`:return d(`up`),!0;case`ArrowDown`:return d(`down`),!0;case`Enter`:return u(s),!0;default:return!1}},[d,u,s]);return(0,r.useEffect)(()=>{c(0),l.current=e.map(()=>null)},[e]),(0,r.useEffect)(()=>{l.current[s]?.scrollIntoView({behavior:`smooth`,block:`nearest`})},[s]),(0,r.useImperativeHandle)(o,()=>({onKeyDown:f}),[f]),e.length?(0,n.jsx)(`div`,{className:`aivex:h-full aivex:max-h-[248px] aivex:min-w-[298px] aivex:max-w-[328px] aivex:overflow-y-auto aivex:rounded-lg aivex:border aivex:border-border-subtle aivex:bg-bg-primary aivex:py-2 aivex:shadow-xl`,children:e.map((e,r)=>(0,n.jsxs)(`div`,{ref:e=>{l.current[r]=e},className:`aivex:flex aivex:h-[52px] aivex:cursor-pointer aivex:items-center aivex:gap-2 aivex:px-4 aivex:py-2 ${s===r?`aivex:bg-bg-brand-subtle`:``}`,onClick:()=>u(r),children:[(0,n.jsx)(t.r,{size:`sm`,src:e.avatarUrl,bgColor:e.color,name:e.name}),(0,n.jsxs)(`div`,{className:`aivex:flex aivex:max-w-[260px] aivex:flex-col`,children:[(0,n.jsx)(`div`,{className:`aivex:truncate aivex:text-label-md aivex:text-text-primary`,children:e.name}),e.email?(0,n.jsx)(`div`,{className:`aivex:truncate aivex:text-body-sm-regular aivex:text-text-secondary`,children:e.email}):null]})]},e.id))}):(0,n.jsx)(`div`,{className:`aivex:min-w-[298px] aivex:max-w-[328px] aivex:rounded-lg aivex:border aivex:border-border-subtle aivex:bg-bg-primary aivex:py-2 aivex:shadow-xl`,children:(0,n.jsx)(`div`,{className:`aivex:p-2 aivex:text-body-md-regular aivex:text-text-secondary`,children:a})})}),u=(e,t,n)=>(0,r.useMemo)(()=>{let r=t=>{if(!t)return e;let n=t.toLowerCase();return e.filter(e=>e.name.toLowerCase().includes(n)||(e.email??``).toLowerCase().includes(n))},i=e=>t=>{e({id:t.id,label:t.name})};return{items:({query:e})=>r(e),render:()=>{let e=null,r=null;return{onStart:a=>{e=new o.ReactRenderer(l,{props:{...a,emptyText:n,command:i(a.command)},editor:a.editor}),a.clientRect&&(r=(0,c.default)(`body`,{getReferenceClientRect:a.clientRect,appendTo:()=>document.body,content:e.element,showOnCreate:!0,interactive:!0,trigger:`manual`,placement:`bottom-start`}),t?.(!0))},onUpdate(t){e?.updateProps({...t,emptyText:n,command:i(t.command)}),t.clientRect&&r?.[0]?.setProps({getReferenceClientRect:t.clientRect})},onKeyDown(n){return n.event.key===`Escape`?(r?.[0]&&!r[0].state.isDestroyed&&r[0].hide(),t?.(!1),!0):e?.ref?.onKeyDown(n.event)||!1},onExit(){r?.[0]&&!r[0].state.isDestroyed&&r[0].destroy(),e?.destroy(),r=null,e=null,t?.(!1)}}}}},[e,t,n]);function d({value:e,onChange:t,placeholder:c,onSubmit:l,onEscape:d,userList:p=[],initialContent:m,mentionEmptyText:h,autoFocus:g=!0,handleRef:_}){let v=(0,r.useRef)(null),[y,b]=(0,r.useState)(!1),x=u(p,b,h),S=(0,o.useEditor)({extensions:[s.default,a.default.configure({placeholder:c,emptyEditorClass:`aivex:before:content-[attr(data-placeholder)] aivex:before:text-text-tertiary aivex:before:absolute aivex:before:left-3`}),i.default.configure({HTMLAttributes:{class:`aivex:text-text-brand aivex:px-1`},renderHTML({options:e,node:t}){return[`span`,(0,o.mergeAttributes)(e.HTMLAttributes),`${t.attrs.label}`]},renderText({node:e}){return`@[${e.attrs.label}](${e.attrs.id})`},deleteTriggerWithBackspace:!0,suggestion:x})],content:m||e,immediatelyRender:!1,editorProps:{attributes:{class:`aivex:px-3 aivex:py-1 aivex:rounded-lg aivex:border aivex:border-border-subtle aivex:bg-bg-secondary aivex:focus:border-border-brand aivex:outline-none aivex:text-body-md-regular aivex:text-text-primary aivex:cursor-text aivex:[&_p]:leading-[22px]`},handleKeyDown:(t,n)=>n.key===`Enter`?y||n.shiftKey||n.metaKey||n.ctrlKey||n.altKey?!1:(n.preventDefault(),e.trim()&&l&&l(),!0):n.key===`Escape`?y?!1:(n.preventDefault(),d?.(),!0):!1},onUpdate:({editor:e})=>{t(f(e.getJSON()))}});return(0,r.useEffect)(()=>{S&&!m&&e!==S.getText()&&S.commands.setContent(e)},[e,S,m]),(0,r.useEffect)(()=>{S&&g&&requestAnimationFrame(()=>{S.commands.focus()})},[S,g]),(0,r.useImperativeHandle)(_,()=>({focus:()=>{S?.commands.focus()}}),[S]),(0,n.jsx)(o.EditorContent,{ref:v,editor:S,className:`aivex:relative aivex:h-full aivex:w-full`,onKeyDown:e=>e.stopPropagation()})}function f(e){if(!e?.content)return``;let t=e=>e.type===`mention`&&e.attrs?`@[${e.attrs.label}](${e.attrs.id})`:e.type===`text`?e.text||``:e.type===`hardBreak`?`
2
2
  `:e.content?e.content.map(t).join(``):``;return e.content.map(t).join(`
3
3
  `)}function p({user:r,value:i,onChange:a,onSubmit:o,onClose:s,title:c=`Comment`,placeholder:l,submitLabel:u=`Send`,showSubmit:f=!0,pending:p=!1,userList:m,mentionEmptyText:h,initialContent:g,className:_}){let v=()=>{!i.trim()||p||o()};return(0,n.jsx)(`div`,{className:`aivex:rounded-2xl aivex:bg-bg-primary aivex:shadow-xl ${_??``}`,children:(0,n.jsxs)(`div`,{className:`aivex:flex aivex:w-[360px] aivex:flex-col`,children:[(0,n.jsxs)(`div`,{className:`aivex:flex aivex:h-12 aivex:items-center aivex:justify-between aivex:border-border-subtle aivex:border-b aivex:px-5 aivex:py-2`,children:[(0,n.jsx)(`span`,{className:`aivex:text-body-lg-medium aivex:text-text-primary`,children:c}),(0,n.jsx)(t.t,{size:`sm`,className:`aivex:text-text-secondary`,onClick:s,children:(0,n.jsx)(e.xt,{size:20})})]}),(0,n.jsxs)(`div`,{className:`aivex:flex aivex:flex-col aivex:px-4 aivex:py-3`,children:[(0,n.jsxs)(`div`,{className:`aivex:flex aivex:gap-1.5`,children:[(0,n.jsx)(`div`,{className:`aivex:h-6 aivex:w-6 aivex:py-1`,children:r?(0,n.jsx)(t.r,{size:`sm`,src:r.avatarUrl,bgColor:r.color,name:r.name}):null}),(0,n.jsx)(`div`,{className:`aivex:min-w-0 aivex:flex-1`,children:(0,n.jsx)(d,{value:i,onChange:a,placeholder:l,onSubmit:v,onEscape:s,userList:m,mentionEmptyText:h,initialContent:g})})]}),f?(0,n.jsx)(`div`,{className:`aivex:grid aivex:transition-[grid-template-rows,opacity] aivex:duration-200 aivex:ease-out ${i.trim()?`aivex:grid-rows-[1fr] aivex:opacity-100`:`aivex:pointer-events-none aivex:grid-rows-[0fr] aivex:opacity-0`}`,children:(0,n.jsx)(`div`,{className:`aivex:flex aivex:justify-end aivex:overflow-hidden aivex:pt-1.5`,children:(0,n.jsx)(e.t,{size:`md`,disabled:!i.trim()||p,onClick:v,tabIndex:i.trim()?void 0:-1,children:u})})}):null]})]})})}function m({users:e,selected:r=!1,resolved:i=!1,onClick:a,maxAvatars:o=3,className:s}){let c=e.slice(0,o);return(0,n.jsxs)(`button`,{type:`button`,onClick:a,className:`aivex:flex aivex:h-fit aivex:cursor-pointer aivex:items-center aivex:rounded-t-full aivex:rounded-br-full aivex:border aivex:p-1 aivex:transition-colors ${r?`aivex:border-border-brand aivex:bg-bg-brand`:`aivex:border-border-subtle aivex:bg-bg-primary aivex:hover:border-border-brand`} ${i?`aivex:opacity-40`:``} ${s??``}`,children:[c.map((e,r)=>(0,n.jsx)(`span`,{className:`aivex:flex`,style:r>0?{marginLeft:`-4px`}:void 0,children:(0,n.jsx)(t.r,{size:`xs`,src:e.avatarUrl,bgColor:e.color,name:e.name})},e.id)),e.length>o?(0,n.jsxs)(`span`,{className:`aivex:px-1 aivex:text-label-sm aivex:text-text-secondary`,children:[`+`,e.length-o]}):null]})}exports.CommentInput=p,exports.CommentPin=m,exports.MentionInput=d;
4
4
  //# sourceMappingURL=comment.cjs.map
package/dist/comment.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import "./styles.css";
3
- import { t as e, xt as t } from "./Button-BSJwb59G.js";
4
- import { r as n, t as r } from "./IconButton-DyUOtz87.js";
3
+ import { t as e, xt as t } from "./Button-CGgKeDv2.js";
4
+ import { r as n, t as r } from "./IconButton-ObGRq2gH.js";
5
5
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
6
6
  import { memo as o, useCallback as s, useEffect as c, useImperativeHandle as l, useMemo as u, useRef as d, useState as f } from "react";
7
7
  import p from "@tiptap/extension-mention";
@@ -1,4 +1,4 @@
1
- /** DatePicker 내부 날짜 계산 유틸 — 외부 라이브러리 없이 네이티브 Date 사용 */
1
+ /** Calendar 내부 날짜 계산 유틸 — 외부 라이브러리 없이 네이티브 Date 사용 */
2
2
  export declare function pad2(n: number): string;
3
3
  /** 시각을 제거한 자정 기준 Date */
4
4
  export declare function startOfDay(date: Date): Date;
@@ -0,0 +1,2 @@
1
+ export type { CalendarProps } from "./Calendar";
2
+ export { Calendar } from "./Calendar";
@@ -0,0 +1,34 @@
1
+ import * as RadixDialog from "@radix-ui/react-dialog";
2
+ import type { ComponentPropsWithoutRef, CSSProperties, ReactNode, Ref } from "react";
3
+ type DialogContentProps = ComponentPropsWithoutRef<typeof RadixDialog.Content>;
4
+ export interface DrawerProps {
5
+ open?: boolean;
6
+ onOpenChange?: (open: boolean) => void;
7
+ /**
8
+ * 접근성 제목 — 화면에는 그리지 않는다. 눈에 보이는 헤더는 소비자가
9
+ * children으로 직접 구성한다.
10
+ */
11
+ title: string;
12
+ children: ReactNode;
13
+ side?: "left" | "right";
14
+ /**
15
+ * 모달 여부. 기본 false — 드로어를 연 채로 뒤 화면을 계속 쓰는 패턴이
16
+ * 기본값이다(딤·포커스 트랩 없음). true면 Radix 모달 동작을 그대로 따른다.
17
+ */
18
+ modal?: boolean;
19
+ /** 폭·레이아웃 등 표면 커스텀. 위치·애니메이션·기본 표면은 드로어가 소유한다. */
20
+ className?: string;
21
+ style?: CSSProperties;
22
+ /**
23
+ * 닫힘 애니메이션이 끝났을 때 통지 — open=false 전환 후 이 시점에
24
+ * 언마운트하면 슬라이드 아웃이 잘리지 않는다.
25
+ */
26
+ onExitComplete?: () => void;
27
+ onOpenAutoFocus?: DialogContentProps["onOpenAutoFocus"];
28
+ onCloseAutoFocus?: DialogContentProps["onCloseAutoFocus"];
29
+ onEscapeKeyDown?: DialogContentProps["onEscapeKeyDown"];
30
+ onInteractOutside?: DialogContentProps["onInteractOutside"];
31
+ ref?: Ref<HTMLDivElement>;
32
+ }
33
+ declare function Drawer({ open, onOpenChange, title, children, side, modal, className, style, onExitComplete, onOpenAutoFocus, onCloseAutoFocus, onEscapeKeyDown, onInteractOutside, ref, }: DrawerProps): import("react/jsx-runtime").JSX.Element;
34
+ export { Drawer };
@@ -0,0 +1,2 @@
1
+ export type { DrawerProps } from "./Drawer";
2
+ export { Drawer } from "./Drawer";
@@ -124,6 +124,7 @@ export declare const KeyReturnIcon: ({ size, color, className, ...props }: IconP
124
124
  export declare const LabelPointIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
125
125
  export declare const LanguageIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
126
126
  export declare const LineIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
127
+ export declare const LineLinkIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
127
128
  export declare const LinkIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
128
129
  export declare const LockIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
129
130
  export declare const LoginIcon: ({ size, color, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,33 @@
1
+ import * as RadixDialog from "@radix-ui/react-dialog";
2
+ import type { ComponentPropsWithoutRef, ReactNode, Ref } from "react";
3
+ type DialogContentProps = ComponentPropsWithoutRef<typeof RadixDialog.Content>;
4
+ /**
5
+ * 표준 카드(Modal) 틀 밖의 모달 레이어를 위한 저수준 변형 — 딤·레이어·접근성
6
+ * 배선만 제공하고 표면(위치·폭·패딩)은 소비자가 className으로 정한다.
7
+ * 검색 팔레트, 딤 없는 카드처럼 Modal의 고정 표면으로 표현할 수 없는
8
+ * 화면이 대상이다. 표준 카드면 Modal을 쓴다.
9
+ *
10
+ * 제목은 ModalBase.Title로 콘텐츠 안에서 배선한다(화면에 그리지 않으면
11
+ * className="aivex:sr-only"). 닫기 버튼은 ModalBase.Close로 감싼다.
12
+ */
13
+ export interface ModalBaseProps {
14
+ open?: boolean;
15
+ defaultOpen?: boolean;
16
+ onOpenChange?: (open: boolean) => void;
17
+ children: ReactNode;
18
+ /** 딤 표시 — false면 투명 오버레이(바깥 클릭 닫기만 받는다). */
19
+ dim?: boolean;
20
+ /** 콘텐츠 표면 — 위치·폭·패딩·배경을 소비자가 정한다. */
21
+ className?: string;
22
+ onOpenAutoFocus?: DialogContentProps["onOpenAutoFocus"];
23
+ onCloseAutoFocus?: DialogContentProps["onCloseAutoFocus"];
24
+ onEscapeKeyDown?: DialogContentProps["onEscapeKeyDown"];
25
+ onInteractOutside?: DialogContentProps["onInteractOutside"];
26
+ ref?: Ref<HTMLDivElement>;
27
+ }
28
+ declare function ModalBaseRoot({ open, defaultOpen, onOpenChange, children, dim, className, onOpenAutoFocus, onCloseAutoFocus, onEscapeKeyDown, onInteractOutside, ref, }: ModalBaseProps): import("react/jsx-runtime").JSX.Element;
29
+ declare const ModalBase: typeof ModalBaseRoot & {
30
+ Title: import("react").ForwardRefExoticComponent<RadixDialog.DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement>>;
31
+ Close: import("react").ForwardRefExoticComponent<RadixDialog.DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
32
+ };
33
+ export { ModalBase };
@@ -1,2 +1,4 @@
1
1
  export type { ModalButtonProps, ModalHeadingButtonProps, ModalProps, ModalSize, ModalSurfaceProps, } from "./Modal";
2
2
  export { Modal, ModalSurface } from "./Modal";
3
+ export type { ModalBaseProps } from "./ModalBase";
4
+ export { ModalBase } from "./ModalBase";