@aivex/ui 1.2.0-dev.42 → 1.2.0-dev.44
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/dist/{Button-BrPqDGyO.js → Button-CH_7RCR4.js} +244 -194
- package/dist/Button-CH_7RCR4.js.map +1 -0
- package/dist/Button-D6MqxX_7.cjs +2 -0
- package/dist/Button-D6MqxX_7.cjs.map +1 -0
- package/dist/{IconButton-CK4en7H6.js → IconButton-7v0vHj6O.js} +2 -2
- package/dist/{IconButton-CK4en7H6.js.map → IconButton-7v0vHj6O.js.map} +1 -1
- package/dist/{IconButton-DBlsEy3m.cjs → IconButton-DwhPDE1m.cjs} +2 -2
- package/dist/{IconButton-DBlsEy3m.cjs.map → IconButton-DwhPDE1m.cjs.map} +1 -1
- package/dist/comment.cjs +1 -1
- package/dist/comment.js +2 -2
- package/dist/components/DataGrid/DataGrid.d.ts +8 -3
- package/dist/components/DataGrid/DataGridPrimitives.d.ts +10 -2
- package/dist/components/DataGrid/index.d.ts +1 -1
- package/dist/components/Icon/index.d.ts +2 -0
- package/dist/components/Table/Table.d.ts +10 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +628 -625
- package/dist/index.js.map +1 -1
- package/dist/{keyboard-BMCakKCv.js → keyboard-CnteNNEc.js} +2 -2
- package/dist/{keyboard-BMCakKCv.js.map → keyboard-CnteNNEc.js.map} +1 -1
- package/dist/{keyboard-DCewgvMV.cjs → keyboard-GVlhOfI6.cjs} +2 -2
- package/dist/{keyboard-DCewgvMV.cjs.map → keyboard-GVlhOfI6.cjs.map} +1 -1
- package/dist/shape-editor.cjs +1 -1
- package/dist/shape-editor.js +88 -88
- package/dist/styles.css +1 -1
- package/dist/utils.cjs +1 -1
- package/package.json +1 -1
- package/dist/Button-BrPqDGyO.js.map +0 -1
- package/dist/Button-EEErevS-.cjs +0 -2
- package/dist/Button-EEErevS-.cjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cn as e } from "./utils.js";
|
|
2
|
-
import { Gt as t, dt as n,
|
|
2
|
+
import { Gt as t, dt as n, ga as r } from "./Button-CH_7RCR4.js";
|
|
3
3
|
import { cva as i } from "class-variance-authority";
|
|
4
4
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
5
|
import * as s from "@radix-ui/react-dropdown-menu";
|
|
@@ -395,4 +395,4 @@ function X(e) {
|
|
|
395
395
|
//#endregion
|
|
396
396
|
export { U as a, j as c, W as i, Y as n, H as o, J as r, V as s, X as t };
|
|
397
397
|
|
|
398
|
-
//# sourceMappingURL=keyboard-
|
|
398
|
+
//# sourceMappingURL=keyboard-CnteNNEc.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyboard-BMCakKCv.js","names":[],"sources":["../src/components/Menu/Menu.tsx","../src/components/Popover/Popover.tsx","../src/components/Divider/Divider.tsx","../src/components/Slider/Slider.tsx","../src/components/Switch/Switch.tsx","../src/utils/keyboard.ts"],"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","\"use client\";\n\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport type { ComponentPropsWithoutRef, ReactNode, Ref } from \"react\";\nimport { cn } from \"@/utils/cn\";\n\n// ─── Content shell ─────────────────────────────────────────────────────────────\n\nconst contentClassName = cn(\n \"aivex:flex aivex:flex-col aivex:gap-lg aivex:w-[277px] aivex:max-h-[448px] aivex:p-xl\",\n \"aivex:bg-bg-primary aivex:border aivex:border-border-subtle aivex:rounded-xl aivex:shadow-md aivex:overflow-clip\",\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 PopoverRootProps = ComponentPropsWithoutRef<typeof PopoverPrimitive.Root>;\n\nfunction PopoverRoot(props: PopoverRootProps) {\n return <PopoverPrimitive.Root {...props} />;\n}\n\n// ─── Trigger ──────────────────────────────────────────────────────────────────\n\ntype PopoverTriggerProps = ComponentPropsWithoutRef<typeof PopoverPrimitive.Trigger> & {\n ref?: Ref<HTMLButtonElement>;\n};\n\n/** asChild로 ToggleButton 등 임의의 요소를 트리거로 사용할 수 있습니다. */\nfunction PopoverTrigger({ ref, ...props }: PopoverTriggerProps) {\n return <PopoverPrimitive.Trigger ref={ref} {...props} />;\n}\n\n// ─── Anchor ───────────────────────────────────────────────────────────────────\n\ntype PopoverAnchorProps = ComponentPropsWithoutRef<typeof PopoverPrimitive.Anchor>;\n\n/** 트리거와 다른 요소를 기준으로 위치를 잡고 싶을 때 사용합니다. */\nfunction PopoverAnchor(props: PopoverAnchorProps) {\n return <PopoverPrimitive.Anchor {...props} />;\n}\n\n// ─── Close ────────────────────────────────────────────────────────────────────\n\ntype PopoverCloseProps = ComponentPropsWithoutRef<typeof PopoverPrimitive.Close> & {\n ref?: Ref<HTMLButtonElement>;\n};\n\n/** asChild로 감싸면 하단 버튼 클릭 시 팝오버가 닫힙니다. */\nfunction PopoverClose({ ref, ...props }: PopoverCloseProps) {\n return <PopoverPrimitive.Close ref={ref} {...props} />;\n}\n\n// ─── Content ──────────────────────────────────────────────────────────────────\n\ntype PopoverContentProps = ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> & {\n ref?: Ref<HTMLDivElement>;\n};\n\nfunction PopoverContent({\n className,\n sideOffset = 8,\n align = \"start\",\n ref,\n ...props\n}: PopoverContentProps) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n align={align}\n className={cn(contentClassName, className)}\n {...props}\n />\n </PopoverPrimitive.Portal>\n );\n}\n\n// ─── Title ────────────────────────────────────────────────────────────────────\n\ntype PopoverTitleProps = ComponentPropsWithoutRef<\"div\"> & {\n ref?: Ref<HTMLDivElement>;\n};\n\nfunction PopoverTitle({ className, ref, ...props }: PopoverTitleProps) {\n return (\n <div\n ref={ref}\n className={cn(\n \"aivex:w-full aivex:px-xs aivex:text-body-md-medium aivex:text-text-primary aivex:truncate\",\n className,\n )}\n {...props}\n />\n );\n}\n\n// ─── Body (ItemArea) ────────────────────────────────────────────────────────────\n\ntype PopoverBodyProps = ComponentPropsWithoutRef<\"div\"> & {\n ref?: Ref<HTMLDivElement>;\n};\n\n/** 검색창·목록 등 자유롭게 들어가는 스크롤 영역입니다. */\nfunction PopoverBody({ className, ref, ...props }: PopoverBodyProps) {\n return (\n <div\n ref={ref}\n className={cn(\n \"aivex:flex aivex:min-h-0 aivex:w-full aivex:flex-1 aivex:flex-col aivex:gap-md aivex:overflow-y-auto\",\n className,\n )}\n {...props}\n />\n );\n}\n\n// ─── Footer (BtnContainer) ──────────────────────────────────────────────────────\n\ninterface PopoverFooterProps extends ComponentPropsWithoutRef<\"div\"> {\n /** 좌측에 넓게 붙는 영역(예: 옵션 tertiary 버튼). 지정 시 나머지 버튼은 우측 정렬됩니다. */\n start?: ReactNode;\n ref?: Ref<HTMLDivElement>;\n}\n\nfunction PopoverFooter({ className, start, children, ref, ...props }: PopoverFooterProps) {\n return (\n <div\n ref={ref}\n className={cn(\n \"aivex:flex aivex:w-full aivex:items-center aivex:justify-end aivex:gap-md\",\n className,\n )}\n {...props}\n >\n {start && (\n <div className=\"aivex:flex aivex:min-w-0 aivex:flex-1 aivex:flex-col aivex:items-start aivex:justify-center\">\n {start}\n </div>\n )}\n {children}\n </div>\n );\n}\n\n// ─── Compound export ──────────────────────────────────────────────────────────\n\nconst Popover = Object.assign(PopoverRoot, {\n Trigger: PopoverTrigger,\n Anchor: PopoverAnchor,\n Close: PopoverClose,\n Content: PopoverContent,\n Title: PopoverTitle,\n Body: PopoverBody,\n Footer: PopoverFooter,\n});\n\nexport type {\n PopoverAnchorProps,\n PopoverBodyProps,\n PopoverCloseProps,\n PopoverContentProps,\n PopoverFooterProps,\n PopoverRootProps,\n PopoverTitleProps,\n PopoverTriggerProps,\n};\nexport { Popover };\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","/** 현재 DOM 영역에 발생한 키만 처리하고 중첩된 대화상자·메뉴에는 양보한다. */\nexport function isShortcutTarget(host: HTMLElement | null, target: EventTarget | null): boolean {\n if (!host || !(target instanceof Element) || !host.contains(target)) return false;\n const boundary = target.closest(\n '[role=\"dialog\"],[role=\"alertdialog\"],[role=\"menu\"],[role=\"listbox\"]',\n );\n return !boundary || boundary.contains(host);\n}\n\nexport function isEditableTarget(target: EventTarget | null): boolean {\n if (!(target instanceof HTMLElement)) return false;\n return target.isContentEditable || !!target.closest('input,textarea,select,[role=\"textbox\"]');\n}\n"],"mappings":";;;;;;;;;;AAWA,IAAM,IAAmB,EACvB,2UACA;CACE,UAAU,EACR,QAAQ;EACN,MAAM;EACN,OAAO;EACR,EACF;CACD,iBAAiB,EACf,QAAQ,IACT;CACF,CACF,EAEK,IAAmB,EACvB,iGACA,+EACA,iCACA,4EACA,0EACA,2EACD;AAMD,SAAS,EAAS,GAAsB;AACtC,QAAO,kBAAC,EAAa,MAAd,EAAmB,GAAI,GAAS,CAAA;;AASzC,SAAS,EAAY,EAAE,QAAK,GAAG,KAA2B;AACxD,QAAO,kBAAC,EAAa,SAAd;EAA2B;EAAK,GAAI;EAAS,CAAA;;AAStD,SAAS,EAAY,EAAE,cAA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S,EAAO,CAAE,QAAO;CAC5E,IAAM,IAAW,EAAO,QACtB,8EACD;AACD,QAAO,CAAC,KAAY,EAAS,SAAS,EAAK;;AAG7C,SAAgB,EAAiB,GAAqC;AAEpE,QADM,aAAkB,cACjB,EAAO,qBAAqB,CAAC,CAAC,EAAO,QAAQ,2CAAyC,GADhD"}
|
|
1
|
+
{"version":3,"file":"keyboard-CnteNNEc.js","names":[],"sources":["../src/components/Menu/Menu.tsx","../src/components/Popover/Popover.tsx","../src/components/Divider/Divider.tsx","../src/components/Slider/Slider.tsx","../src/components/Switch/Switch.tsx","../src/utils/keyboard.ts"],"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","\"use client\";\n\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport type { ComponentPropsWithoutRef, ReactNode, Ref } from \"react\";\nimport { cn } from \"@/utils/cn\";\n\n// ─── Content shell ─────────────────────────────────────────────────────────────\n\nconst contentClassName = cn(\n \"aivex:flex aivex:flex-col aivex:gap-lg aivex:w-[277px] aivex:max-h-[448px] aivex:p-xl\",\n \"aivex:bg-bg-primary aivex:border aivex:border-border-subtle aivex:rounded-xl aivex:shadow-md aivex:overflow-clip\",\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 PopoverRootProps = ComponentPropsWithoutRef<typeof PopoverPrimitive.Root>;\n\nfunction PopoverRoot(props: PopoverRootProps) {\n return <PopoverPrimitive.Root {...props} />;\n}\n\n// ─── Trigger ──────────────────────────────────────────────────────────────────\n\ntype PopoverTriggerProps = ComponentPropsWithoutRef<typeof PopoverPrimitive.Trigger> & {\n ref?: Ref<HTMLButtonElement>;\n};\n\n/** asChild로 ToggleButton 등 임의의 요소를 트리거로 사용할 수 있습니다. */\nfunction PopoverTrigger({ ref, ...props }: PopoverTriggerProps) {\n return <PopoverPrimitive.Trigger ref={ref} {...props} />;\n}\n\n// ─── Anchor ───────────────────────────────────────────────────────────────────\n\ntype PopoverAnchorProps = ComponentPropsWithoutRef<typeof PopoverPrimitive.Anchor>;\n\n/** 트리거와 다른 요소를 기준으로 위치를 잡고 싶을 때 사용합니다. */\nfunction PopoverAnchor(props: PopoverAnchorProps) {\n return <PopoverPrimitive.Anchor {...props} />;\n}\n\n// ─── Close ────────────────────────────────────────────────────────────────────\n\ntype PopoverCloseProps = ComponentPropsWithoutRef<typeof PopoverPrimitive.Close> & {\n ref?: Ref<HTMLButtonElement>;\n};\n\n/** asChild로 감싸면 하단 버튼 클릭 시 팝오버가 닫힙니다. */\nfunction PopoverClose({ ref, ...props }: PopoverCloseProps) {\n return <PopoverPrimitive.Close ref={ref} {...props} />;\n}\n\n// ─── Content ──────────────────────────────────────────────────────────────────\n\ntype PopoverContentProps = ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> & {\n ref?: Ref<HTMLDivElement>;\n};\n\nfunction PopoverContent({\n className,\n sideOffset = 8,\n align = \"start\",\n ref,\n ...props\n}: PopoverContentProps) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n align={align}\n className={cn(contentClassName, className)}\n {...props}\n />\n </PopoverPrimitive.Portal>\n );\n}\n\n// ─── Title ────────────────────────────────────────────────────────────────────\n\ntype PopoverTitleProps = ComponentPropsWithoutRef<\"div\"> & {\n ref?: Ref<HTMLDivElement>;\n};\n\nfunction PopoverTitle({ className, ref, ...props }: PopoverTitleProps) {\n return (\n <div\n ref={ref}\n className={cn(\n \"aivex:w-full aivex:px-xs aivex:text-body-md-medium aivex:text-text-primary aivex:truncate\",\n className,\n )}\n {...props}\n />\n );\n}\n\n// ─── Body (ItemArea) ────────────────────────────────────────────────────────────\n\ntype PopoverBodyProps = ComponentPropsWithoutRef<\"div\"> & {\n ref?: Ref<HTMLDivElement>;\n};\n\n/** 검색창·목록 등 자유롭게 들어가는 스크롤 영역입니다. */\nfunction PopoverBody({ className, ref, ...props }: PopoverBodyProps) {\n return (\n <div\n ref={ref}\n className={cn(\n \"aivex:flex aivex:min-h-0 aivex:w-full aivex:flex-1 aivex:flex-col aivex:gap-md aivex:overflow-y-auto\",\n className,\n )}\n {...props}\n />\n );\n}\n\n// ─── Footer (BtnContainer) ──────────────────────────────────────────────────────\n\ninterface PopoverFooterProps extends ComponentPropsWithoutRef<\"div\"> {\n /** 좌측에 넓게 붙는 영역(예: 옵션 tertiary 버튼). 지정 시 나머지 버튼은 우측 정렬됩니다. */\n start?: ReactNode;\n ref?: Ref<HTMLDivElement>;\n}\n\nfunction PopoverFooter({ className, start, children, ref, ...props }: PopoverFooterProps) {\n return (\n <div\n ref={ref}\n className={cn(\n \"aivex:flex aivex:w-full aivex:items-center aivex:justify-end aivex:gap-md\",\n className,\n )}\n {...props}\n >\n {start && (\n <div className=\"aivex:flex aivex:min-w-0 aivex:flex-1 aivex:flex-col aivex:items-start aivex:justify-center\">\n {start}\n </div>\n )}\n {children}\n </div>\n );\n}\n\n// ─── Compound export ──────────────────────────────────────────────────────────\n\nconst Popover = Object.assign(PopoverRoot, {\n Trigger: PopoverTrigger,\n Anchor: PopoverAnchor,\n Close: PopoverClose,\n Content: PopoverContent,\n Title: PopoverTitle,\n Body: PopoverBody,\n Footer: PopoverFooter,\n});\n\nexport type {\n PopoverAnchorProps,\n PopoverBodyProps,\n PopoverCloseProps,\n PopoverContentProps,\n PopoverFooterProps,\n PopoverRootProps,\n PopoverTitleProps,\n PopoverTriggerProps,\n};\nexport { Popover };\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","/** 현재 DOM 영역에 발생한 키만 처리하고 중첩된 대화상자·메뉴에는 양보한다. */\nexport function isShortcutTarget(host: HTMLElement | null, target: EventTarget | null): boolean {\n if (!host || !(target instanceof Element) || !host.contains(target)) return false;\n const boundary = target.closest(\n '[role=\"dialog\"],[role=\"alertdialog\"],[role=\"menu\"],[role=\"listbox\"]',\n );\n return !boundary || boundary.contains(host);\n}\n\nexport function isEditableTarget(target: EventTarget | null): boolean {\n if (!(target instanceof HTMLElement)) return false;\n return target.isContentEditable || !!target.closest('input,textarea,select,[role=\"textbox\"]');\n}\n"],"mappings":";;;;;;;;;;AAWA,IAAM,IAAmB,EACvB,2UACA;CACE,UAAU,EACR,QAAQ;EACN,MAAM;EACN,OAAO;EACR,EACF;CACD,iBAAiB,EACf,QAAQ,IACT;CACF,CACF,EAEK,IAAmB,EACvB,iGACA,+EACA,iCACA,4EACA,0EACA,2EACD;AAMD,SAAS,EAAS,GAAsB;AACtC,QAAO,kBAAC,EAAa,MAAd,EAAmB,GAAI,GAAS,CAAA;;AASzC,SAAS,EAAY,EAAE,QAAK,GAAG,KAA2B;AACxD,QAAO,kBAAC,EAAa,SAAd;EAA2B;EAAK,GAAI;EAAS,CAAA;;AAStD,SAAS,EAAY,EAAE,cAAW,gBAAa,GAAG,QAAK,GAAG,KAA2B;AACnF,QACE,kBAAC,EAAa,QAAd,EAAA,UACE,kBAAC,EAAa,SAAd;EACO;EACO;EACZ,WAAW,EAAG,GAAkB,EAAU;EAC1C,GAAI;EACJ,CAAA,EACkB,CAAA;;AAU1B,SAAS,EAAU,EAAE,cAAW,QAAK,GAAG,KAAyB;AAC/D,QACE,kBAAC,EAAa,OAAd;EAC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button-EEErevS-.cjs`),t=require(`./utils.cjs`);let n=require(`class-variance-authority`),r=require(`react/jsx-runtime`),i=require(`@radix-ui/react-dropdown-menu`);i=e.ha(i,1);let a=require(`react`),o=require(`@radix-ui/react-popover`);o=e.ha(o,1);let s=require(`@radix-ui/react-slider`);s=e.ha(s,1);let c=require(`@radix-ui/react-switch`);c=e.ha(c,1);var l=(0,n.cva)(`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`,{variants:{danger:{true:`aivex:text-text-danger`,false:`aivex:text-text-primary`}},defaultVariants:{danger:!1}}),u=t.cn(`aivex:flex aivex:flex-col aivex:rounded-md aivex:bg-bg-primary aivex:p-md aivex:overflow-clip`,`aivex:shadow-md aivex:border aivex:border-border-subtle aivex:min-w-[160px]`,`aivex:z-50 aivex:outline-none`,`aivex:data-[state=open]:animate-in aivex:data-[state=closed]:animate-out`,`aivex:data-[state=closed]:fade-out-0 aivex:data-[state=open]:fade-in-0`,`aivex:data-[state=closed]:zoom-out-95 aivex:data-[state=open]:zoom-in-95`);function d(e){return(0,r.jsx)(i.Root,{...e})}function f({ref:e,...t}){return(0,r.jsx)(i.Trigger,{ref:e,...t})}function p({className:e,sideOffset:n=4,ref:a,...o}){return(0,r.jsx)(i.Portal,{children:(0,r.jsx)(i.Content,{ref:a,sideOffset:n,className:t.cn(u,e),...o})})}function m({className:e,ref:n,...a}){return(0,r.jsx)(i.Group,{ref:n,className:t.cn(`aivex:flex aivex:flex-col`,e),...a})}function h({className:e,ref:n,...a}){return(0,r.jsx)(i.Separator,{ref:n,className:t.cn(`aivex:h-px aivex:bg-border-subtle aivex:w-full aivex:my-xs`,e),...a})}function g({className:e,ref:n,...a}){return(0,r.jsx)(i.Label,{ref:n,className:t.cn(`aivex:px-md aivex:py-2xs aivex:text-label-md aivex:text-text-tertiary aivex:select-none`,e),...a})}function _({className:n,label:a,icon:o,danger:s=!1,asChild:c,children:u,ref:d,...f}){if(c)return(0,r.jsx)(i.Item,{ref:d,asChild:!0,className:t.cn(l({danger:s}),n),...f,children:u});let p=a??u;return(0,r.jsxs)(i.Item,{ref:d,className:t.cn(l({danger:s}),n),...f,children:[(0,r.jsx)(e.ma,{variant:s?`danger`:`default`}),o&&(0,r.jsx)(`span`,{className:t.cn(`aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0`,s?`aivex:text-icon-danger`:`aivex:text-icon-secondary`),children:o}),(0,r.jsx)(`span`,{className:`aivex:flex-1 aivex:min-w-0 aivex:truncate aivex:text-left`,children:p})]})}function v({className:n,label:a,icon:o,children:s,ref:c,...u}){let d=a??s;return(0,r.jsxs)(i.CheckboxItem,{ref:c,className:t.cn(l(),n),...u,children:[(0,r.jsx)(e.ma,{variant:`default`}),(0,r.jsx)(T,{children:(0,r.jsx)(i.ItemIndicator,{children:(0,r.jsx)(e.dt,{size:20})})}),o&&(0,r.jsx)(`span`,{className:`aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0 aivex:text-icon-secondary`,children:o}),(0,r.jsx)(`span`,{className:`aivex:flex-1 aivex:min-w-0 aivex:truncate aivex:text-left`,children:d})]})}function y({className:e,ref:n,...a}){return(0,r.jsx)(i.RadioGroup,{ref:n,className:t.cn(`aivex:flex aivex:flex-col`,e),...a})}function b({className:n,label:a,icon:o,children:s,ref:c,...u}){let d=a??s;return(0,r.jsxs)(i.RadioItem,{ref:c,className:t.cn(l(),n),...u,children:[(0,r.jsx)(e.ma,{variant:`default`}),(0,r.jsx)(T,{children:(0,r.jsx)(i.ItemIndicator,{children:(0,r.jsx)(e.dt,{size:20})})}),o&&(0,r.jsx)(`span`,{className:`aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0 aivex:text-icon-secondary`,children:o}),(0,r.jsx)(`span`,{className:`aivex:flex-1 aivex:min-w-0 aivex:truncate aivex:text-left`,children:d})]})}function x({className:e,ref:n,...i}){return(0,r.jsx)(`span`,{ref:n,className:t.cn(`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`,e),...i})}function S(e){return(0,r.jsx)(i.Sub,{...e})}function C({className:n,label:a,icon:o,children:s,ref:c,...u}){let d=a??s;return(0,r.jsxs)(i.SubTrigger,{ref:c,className:t.cn(l(),n),...u,children:[(0,r.jsx)(e.ma,{variant:`default`}),o&&(0,r.jsx)(`span`,{className:`aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0 aivex:text-icon-secondary`,children:o}),(0,r.jsx)(`span`,{className:`aivex:flex-1 aivex:min-w-0 aivex:truncate aivex:text-left`,children:d}),(0,r.jsx)(`span`,{className:`aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0 aivex:text-icon-secondary`,children:(0,r.jsx)(e.Gt,{size:16})})]})}function w({className:e,sideOffset:n=4,ref:a,...o}){return(0,r.jsx)(i.Portal,{children:(0,r.jsx)(i.SubContent,{ref:a,sideOffset:n,className:t.cn(u,e),...o})})}function T({children:e}){return(0,r.jsx)(`span`,{"aria-hidden":!0,className:`aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0 aivex:w-5 aivex:h-5 aivex:text-icon-primary`,children:e})}var E=Object.assign(d,{Trigger:f,Content:p,Item:_,Group:m,Separator:h,Label:g,CheckboxItem:v,RadioGroup:y,RadioItem:b,Sub:S,SubTrigger:C,SubContent:w,Shortcut:x}),D=t.cn(`aivex:flex aivex:flex-col aivex:gap-lg aivex:w-[277px] aivex:max-h-[448px] aivex:p-xl`,`aivex:bg-bg-primary aivex:border aivex:border-border-subtle aivex:rounded-xl aivex:shadow-md aivex:overflow-clip`,`aivex:z-50 aivex:outline-none`,`aivex:data-[state=open]:animate-in aivex:data-[state=closed]:animate-out`,`aivex:data-[state=closed]:fade-out-0 aivex:data-[state=open]:fade-in-0`,`aivex:data-[state=closed]:zoom-out-95 aivex:data-[state=open]:zoom-in-95`);function O(e){return(0,r.jsx)(o.Root,{...e})}function k({ref:e,...t}){return(0,r.jsx)(o.Trigger,{ref:e,...t})}function A(e){return(0,r.jsx)(o.Anchor,{...e})}function j({ref:e,...t}){return(0,r.jsx)(o.Close,{ref:e,...t})}function M({className:e,sideOffset:n=8,align:i=`start`,ref:a,...s}){return(0,r.jsx)(o.Portal,{children:(0,r.jsx)(o.Content,{ref:a,sideOffset:n,align:i,className:t.cn(D,e),...s})})}function N({className:e,ref:n,...i}){return(0,r.jsx)(`div`,{ref:n,className:t.cn(`aivex:w-full aivex:px-xs aivex:text-body-md-medium aivex:text-text-primary aivex:truncate`,e),...i})}function P({className:e,ref:n,...i}){return(0,r.jsx)(`div`,{ref:n,className:t.cn(`aivex:flex aivex:min-h-0 aivex:w-full aivex:flex-1 aivex:flex-col aivex:gap-md aivex:overflow-y-auto`,e),...i})}function F({className:e,start:n,children:i,ref:a,...o}){return(0,r.jsxs)(`div`,{ref:a,className:t.cn(`aivex:flex aivex:w-full aivex:items-center aivex:justify-end aivex:gap-md`,e),...o,children:[n&&(0,r.jsx)(`div`,{className:`aivex:flex aivex:min-w-0 aivex:flex-1 aivex:flex-col aivex:items-start aivex:justify-center`,children:n}),i]})}var I=Object.assign(O,{Trigger:k,Anchor:A,Close:j,Content:M,Title:N,Body:P,Footer:F}),L=(0,n.cva)(`aivex:shrink-0`,{variants:{strength:{basic:``,bold:``},direction:{horizontal:`aivex:w-full`,vertical:`aivex:h-full`}},compoundVariants:[{strength:`basic`,direction:`horizontal`,className:`aivex:border-t aivex:border-border-default`},{strength:`basic`,direction:`vertical`,className:`aivex:border-l aivex:border-border-default`},{strength:`bold`,direction:`horizontal`,className:`aivex:border-t-2 aivex:border-border-subtle`},{strength:`bold`,direction:`vertical`,className:`aivex:border-l-2 aivex:border-border-subtle`}],defaultVariants:{strength:`basic`,direction:`horizontal`}});function R({className:e,strength:n,direction:i,ref:a,...o}){return(0,r.jsx)(`hr`,{ref:a,"aria-orientation":i===`vertical`?`vertical`:`horizontal`,className:t.cn(L({strength:n,direction:i}),e),...o})}function z({className:e,trackClassName:n,trackRootClassName:i,thumbClassName:o,defaultValue:c=[50],value:l,min:u=0,max:d=100,step:f=1,onValueChange:p,ref:m,...h}){let g=l!==void 0,[_,v]=(0,a.useState)(c),y=g?l:_,b=e=>{g||v(e),p?.(e)},x=(0,a.useMemo)(()=>{let e=d-u||1;return[...y].sort((e,t)=>e-t).map(t=>(t-u)/e*100)},[y,u,d]),S=(0,a.useMemo)(()=>{let e=[0,...x,100];return e.slice(0,-1).map((t,n)=>({left:t,width:e[n+1]-t}))},[x]);return(0,r.jsxs)(s.Root,{ref:m,className:t.cn(`aivex:relative aivex:flex aivex:w-full aivex:touch-none aivex:select-none aivex:items-center aivex:outline-none`,`aivex:data-[disabled]:pointer-events-none aivex:data-[disabled]:opacity-disable`,e),defaultValue:c,value:l,min:u,max:d,step:f,onValueChange:b,...h,children:[(0,r.jsx)(s.Track,{className:t.cn(`aivex:relative aivex:h-2 aivex:w-full aivex:grow aivex:overflow-hidden aivex:rounded-full aivex:bg-bg-tertiary`,i),children:S.map(({left:e,width:i},a)=>{let o=a===+(x.length>=2)?`aivex:bg-bg-brand`:`aivex:bg-bg-tertiary`;return(0,r.jsx)(`div`,{className:t.cn(`aivex:absolute aivex:top-0 aivex:h-full aivex:rounded-full`,typeof n==`string`?n:n?.(a)??o),style:{left:`${e}%`,width:`${i}%`}},a)})}),y.map((e,n)=>(0,r.jsx)(s.Thumb,{className:t.cn(`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`,`aivex:cursor-pointer aivex:transition-transform aivex:hover:scale-110`,`aivex:focus-visible:outline-none aivex:focus-visible:ring-2 aivex:focus-visible:ring-border-brand`,`aivex:disabled:pointer-events-none`,typeof o==`string`?o:o?.(n))},n))]})}var B=(0,n.cva)(`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`,{variants:{size:{sm:`aivex:w-6 aivex:h-4`,md:`aivex:w-8 aivex:h-5`,lg:`aivex:w-10 aivex:h-6`}},defaultVariants:{size:`md`}}),V={sm:`aivex:w-2.5 aivex:h-2.5 aivex:translate-x-[3px] aivex:data-[state=checked]:translate-x-[11px]`,md:`aivex:w-3.5 aivex:h-3.5 aivex:translate-x-[3px] aivex:data-[state=checked]:translate-x-[15px]`,lg:`aivex:w-[18px] aivex:h-[18px] aivex:translate-x-[3px] aivex:data-[state=checked]:translate-x-[19px]`},H={sm:`aivex:h-4`,md:`aivex:h-5`,lg:`aivex:h-6`};function U({className:e,label:n,size:i=`md`,disabled:o,id:s,ref:l,...u}){let d=i??`md`,f=(0,a.useId)(),p=s??f;return(0,r.jsxs)(`span`,{className:t.cn(`aivex:inline-flex aivex:items-center aivex:gap-md`,o&&`aivex:opacity-disable`),children:[(0,r.jsx)(c.Root,{ref:l,id:p,disabled:o,className:t.cn(B({size:d}),e),...u,children:(0,r.jsx)(c.Thumb,{className:t.cn(`aivex:block aivex:rounded-full aivex:bg-white aivex:shadow-[var(--aivex-elevation-sm)] aivex:transition-transform aivex:duration-200 aivex:will-change-transform`,V[d])})}),n&&(0,r.jsx)(`label`,{htmlFor:p,className:t.cn(`aivex:inline-flex aivex:items-center aivex:cursor-pointer aivex:select-none aivex:text-label-lg aivex:text-text-primary`,o&&`aivex:cursor-not-allowed`,H[d]),children:n})]})}function W(e,t){if(!e||!(t instanceof Element)||!e.contains(t))return!1;let n=t.closest(`[role="dialog"],[role="alertdialog"],[role="menu"],[role="listbox"]`);return!n||n.contains(e)}function G(e){return e instanceof HTMLElement?e.isContentEditable||!!e.closest(`input,textarea,select,[role="textbox"]`):!1}Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return R}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return z}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return W}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return U}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return I}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return G}});
|
|
2
|
-
//# sourceMappingURL=keyboard-
|
|
1
|
+
const e=require(`./Button-D6MqxX_7.cjs`),t=require(`./utils.cjs`);let n=require(`class-variance-authority`),r=require(`react/jsx-runtime`),i=require(`@radix-ui/react-dropdown-menu`);i=e._a(i,1);let a=require(`react`),o=require(`@radix-ui/react-popover`);o=e._a(o,1);let s=require(`@radix-ui/react-slider`);s=e._a(s,1);let c=require(`@radix-ui/react-switch`);c=e._a(c,1);var l=(0,n.cva)(`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`,{variants:{danger:{true:`aivex:text-text-danger`,false:`aivex:text-text-primary`}},defaultVariants:{danger:!1}}),u=t.cn(`aivex:flex aivex:flex-col aivex:rounded-md aivex:bg-bg-primary aivex:p-md aivex:overflow-clip`,`aivex:shadow-md aivex:border aivex:border-border-subtle aivex:min-w-[160px]`,`aivex:z-50 aivex:outline-none`,`aivex:data-[state=open]:animate-in aivex:data-[state=closed]:animate-out`,`aivex:data-[state=closed]:fade-out-0 aivex:data-[state=open]:fade-in-0`,`aivex:data-[state=closed]:zoom-out-95 aivex:data-[state=open]:zoom-in-95`);function d(e){return(0,r.jsx)(i.Root,{...e})}function f({ref:e,...t}){return(0,r.jsx)(i.Trigger,{ref:e,...t})}function p({className:e,sideOffset:n=4,ref:a,...o}){return(0,r.jsx)(i.Portal,{children:(0,r.jsx)(i.Content,{ref:a,sideOffset:n,className:t.cn(u,e),...o})})}function m({className:e,ref:n,...a}){return(0,r.jsx)(i.Group,{ref:n,className:t.cn(`aivex:flex aivex:flex-col`,e),...a})}function h({className:e,ref:n,...a}){return(0,r.jsx)(i.Separator,{ref:n,className:t.cn(`aivex:h-px aivex:bg-border-subtle aivex:w-full aivex:my-xs`,e),...a})}function g({className:e,ref:n,...a}){return(0,r.jsx)(i.Label,{ref:n,className:t.cn(`aivex:px-md aivex:py-2xs aivex:text-label-md aivex:text-text-tertiary aivex:select-none`,e),...a})}function _({className:n,label:a,icon:o,danger:s=!1,asChild:c,children:u,ref:d,...f}){if(c)return(0,r.jsx)(i.Item,{ref:d,asChild:!0,className:t.cn(l({danger:s}),n),...f,children:u});let p=a??u;return(0,r.jsxs)(i.Item,{ref:d,className:t.cn(l({danger:s}),n),...f,children:[(0,r.jsx)(e.ga,{variant:s?`danger`:`default`}),o&&(0,r.jsx)(`span`,{className:t.cn(`aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0`,s?`aivex:text-icon-danger`:`aivex:text-icon-secondary`),children:o}),(0,r.jsx)(`span`,{className:`aivex:flex-1 aivex:min-w-0 aivex:truncate aivex:text-left`,children:p})]})}function v({className:n,label:a,icon:o,children:s,ref:c,...u}){let d=a??s;return(0,r.jsxs)(i.CheckboxItem,{ref:c,className:t.cn(l(),n),...u,children:[(0,r.jsx)(e.ga,{variant:`default`}),(0,r.jsx)(T,{children:(0,r.jsx)(i.ItemIndicator,{children:(0,r.jsx)(e.dt,{size:20})})}),o&&(0,r.jsx)(`span`,{className:`aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0 aivex:text-icon-secondary`,children:o}),(0,r.jsx)(`span`,{className:`aivex:flex-1 aivex:min-w-0 aivex:truncate aivex:text-left`,children:d})]})}function y({className:e,ref:n,...a}){return(0,r.jsx)(i.RadioGroup,{ref:n,className:t.cn(`aivex:flex aivex:flex-col`,e),...a})}function b({className:n,label:a,icon:o,children:s,ref:c,...u}){let d=a??s;return(0,r.jsxs)(i.RadioItem,{ref:c,className:t.cn(l(),n),...u,children:[(0,r.jsx)(e.ga,{variant:`default`}),(0,r.jsx)(T,{children:(0,r.jsx)(i.ItemIndicator,{children:(0,r.jsx)(e.dt,{size:20})})}),o&&(0,r.jsx)(`span`,{className:`aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0 aivex:text-icon-secondary`,children:o}),(0,r.jsx)(`span`,{className:`aivex:flex-1 aivex:min-w-0 aivex:truncate aivex:text-left`,children:d})]})}function x({className:e,ref:n,...i}){return(0,r.jsx)(`span`,{ref:n,className:t.cn(`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`,e),...i})}function S(e){return(0,r.jsx)(i.Sub,{...e})}function C({className:n,label:a,icon:o,children:s,ref:c,...u}){let d=a??s;return(0,r.jsxs)(i.SubTrigger,{ref:c,className:t.cn(l(),n),...u,children:[(0,r.jsx)(e.ga,{variant:`default`}),o&&(0,r.jsx)(`span`,{className:`aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0 aivex:text-icon-secondary`,children:o}),(0,r.jsx)(`span`,{className:`aivex:flex-1 aivex:min-w-0 aivex:truncate aivex:text-left`,children:d}),(0,r.jsx)(`span`,{className:`aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0 aivex:text-icon-secondary`,children:(0,r.jsx)(e.Gt,{size:16})})]})}function w({className:e,sideOffset:n=4,ref:a,...o}){return(0,r.jsx)(i.Portal,{children:(0,r.jsx)(i.SubContent,{ref:a,sideOffset:n,className:t.cn(u,e),...o})})}function T({children:e}){return(0,r.jsx)(`span`,{"aria-hidden":!0,className:`aivex:flex aivex:items-center aivex:justify-center aivex:shrink-0 aivex:w-5 aivex:h-5 aivex:text-icon-primary`,children:e})}var E=Object.assign(d,{Trigger:f,Content:p,Item:_,Group:m,Separator:h,Label:g,CheckboxItem:v,RadioGroup:y,RadioItem:b,Sub:S,SubTrigger:C,SubContent:w,Shortcut:x}),D=t.cn(`aivex:flex aivex:flex-col aivex:gap-lg aivex:w-[277px] aivex:max-h-[448px] aivex:p-xl`,`aivex:bg-bg-primary aivex:border aivex:border-border-subtle aivex:rounded-xl aivex:shadow-md aivex:overflow-clip`,`aivex:z-50 aivex:outline-none`,`aivex:data-[state=open]:animate-in aivex:data-[state=closed]:animate-out`,`aivex:data-[state=closed]:fade-out-0 aivex:data-[state=open]:fade-in-0`,`aivex:data-[state=closed]:zoom-out-95 aivex:data-[state=open]:zoom-in-95`);function O(e){return(0,r.jsx)(o.Root,{...e})}function k({ref:e,...t}){return(0,r.jsx)(o.Trigger,{ref:e,...t})}function A(e){return(0,r.jsx)(o.Anchor,{...e})}function j({ref:e,...t}){return(0,r.jsx)(o.Close,{ref:e,...t})}function M({className:e,sideOffset:n=8,align:i=`start`,ref:a,...s}){return(0,r.jsx)(o.Portal,{children:(0,r.jsx)(o.Content,{ref:a,sideOffset:n,align:i,className:t.cn(D,e),...s})})}function N({className:e,ref:n,...i}){return(0,r.jsx)(`div`,{ref:n,className:t.cn(`aivex:w-full aivex:px-xs aivex:text-body-md-medium aivex:text-text-primary aivex:truncate`,e),...i})}function P({className:e,ref:n,...i}){return(0,r.jsx)(`div`,{ref:n,className:t.cn(`aivex:flex aivex:min-h-0 aivex:w-full aivex:flex-1 aivex:flex-col aivex:gap-md aivex:overflow-y-auto`,e),...i})}function F({className:e,start:n,children:i,ref:a,...o}){return(0,r.jsxs)(`div`,{ref:a,className:t.cn(`aivex:flex aivex:w-full aivex:items-center aivex:justify-end aivex:gap-md`,e),...o,children:[n&&(0,r.jsx)(`div`,{className:`aivex:flex aivex:min-w-0 aivex:flex-1 aivex:flex-col aivex:items-start aivex:justify-center`,children:n}),i]})}var I=Object.assign(O,{Trigger:k,Anchor:A,Close:j,Content:M,Title:N,Body:P,Footer:F}),L=(0,n.cva)(`aivex:shrink-0`,{variants:{strength:{basic:``,bold:``},direction:{horizontal:`aivex:w-full`,vertical:`aivex:h-full`}},compoundVariants:[{strength:`basic`,direction:`horizontal`,className:`aivex:border-t aivex:border-border-default`},{strength:`basic`,direction:`vertical`,className:`aivex:border-l aivex:border-border-default`},{strength:`bold`,direction:`horizontal`,className:`aivex:border-t-2 aivex:border-border-subtle`},{strength:`bold`,direction:`vertical`,className:`aivex:border-l-2 aivex:border-border-subtle`}],defaultVariants:{strength:`basic`,direction:`horizontal`}});function R({className:e,strength:n,direction:i,ref:a,...o}){return(0,r.jsx)(`hr`,{ref:a,"aria-orientation":i===`vertical`?`vertical`:`horizontal`,className:t.cn(L({strength:n,direction:i}),e),...o})}function z({className:e,trackClassName:n,trackRootClassName:i,thumbClassName:o,defaultValue:c=[50],value:l,min:u=0,max:d=100,step:f=1,onValueChange:p,ref:m,...h}){let g=l!==void 0,[_,v]=(0,a.useState)(c),y=g?l:_,b=e=>{g||v(e),p?.(e)},x=(0,a.useMemo)(()=>{let e=d-u||1;return[...y].sort((e,t)=>e-t).map(t=>(t-u)/e*100)},[y,u,d]),S=(0,a.useMemo)(()=>{let e=[0,...x,100];return e.slice(0,-1).map((t,n)=>({left:t,width:e[n+1]-t}))},[x]);return(0,r.jsxs)(s.Root,{ref:m,className:t.cn(`aivex:relative aivex:flex aivex:w-full aivex:touch-none aivex:select-none aivex:items-center aivex:outline-none`,`aivex:data-[disabled]:pointer-events-none aivex:data-[disabled]:opacity-disable`,e),defaultValue:c,value:l,min:u,max:d,step:f,onValueChange:b,...h,children:[(0,r.jsx)(s.Track,{className:t.cn(`aivex:relative aivex:h-2 aivex:w-full aivex:grow aivex:overflow-hidden aivex:rounded-full aivex:bg-bg-tertiary`,i),children:S.map(({left:e,width:i},a)=>{let o=a===+(x.length>=2)?`aivex:bg-bg-brand`:`aivex:bg-bg-tertiary`;return(0,r.jsx)(`div`,{className:t.cn(`aivex:absolute aivex:top-0 aivex:h-full aivex:rounded-full`,typeof n==`string`?n:n?.(a)??o),style:{left:`${e}%`,width:`${i}%`}},a)})}),y.map((e,n)=>(0,r.jsx)(s.Thumb,{className:t.cn(`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`,`aivex:cursor-pointer aivex:transition-transform aivex:hover:scale-110`,`aivex:focus-visible:outline-none aivex:focus-visible:ring-2 aivex:focus-visible:ring-border-brand`,`aivex:disabled:pointer-events-none`,typeof o==`string`?o:o?.(n))},n))]})}var B=(0,n.cva)(`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`,{variants:{size:{sm:`aivex:w-6 aivex:h-4`,md:`aivex:w-8 aivex:h-5`,lg:`aivex:w-10 aivex:h-6`}},defaultVariants:{size:`md`}}),V={sm:`aivex:w-2.5 aivex:h-2.5 aivex:translate-x-[3px] aivex:data-[state=checked]:translate-x-[11px]`,md:`aivex:w-3.5 aivex:h-3.5 aivex:translate-x-[3px] aivex:data-[state=checked]:translate-x-[15px]`,lg:`aivex:w-[18px] aivex:h-[18px] aivex:translate-x-[3px] aivex:data-[state=checked]:translate-x-[19px]`},H={sm:`aivex:h-4`,md:`aivex:h-5`,lg:`aivex:h-6`};function U({className:e,label:n,size:i=`md`,disabled:o,id:s,ref:l,...u}){let d=i??`md`,f=(0,a.useId)(),p=s??f;return(0,r.jsxs)(`span`,{className:t.cn(`aivex:inline-flex aivex:items-center aivex:gap-md`,o&&`aivex:opacity-disable`),children:[(0,r.jsx)(c.Root,{ref:l,id:p,disabled:o,className:t.cn(B({size:d}),e),...u,children:(0,r.jsx)(c.Thumb,{className:t.cn(`aivex:block aivex:rounded-full aivex:bg-white aivex:shadow-[var(--aivex-elevation-sm)] aivex:transition-transform aivex:duration-200 aivex:will-change-transform`,V[d])})}),n&&(0,r.jsx)(`label`,{htmlFor:p,className:t.cn(`aivex:inline-flex aivex:items-center aivex:cursor-pointer aivex:select-none aivex:text-label-lg aivex:text-text-primary`,o&&`aivex:cursor-not-allowed`,H[d]),children:n})]})}function W(e,t){if(!e||!(t instanceof Element)||!e.contains(t))return!1;let n=t.closest(`[role="dialog"],[role="alertdialog"],[role="menu"],[role="listbox"]`);return!n||n.contains(e)}function G(e){return e instanceof HTMLElement?e.isContentEditable||!!e.closest(`input,textarea,select,[role="textbox"]`):!1}Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return R}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return z}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return W}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return U}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return I}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return G}});
|
|
2
|
+
//# sourceMappingURL=keyboard-GVlhOfI6.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyboard-DCewgvMV.cjs","names":[],"sources":["../src/components/Menu/Menu.tsx","../src/components/Popover/Popover.tsx","../src/components/Divider/Divider.tsx","../src/components/Slider/Slider.tsx","../src/components/Switch/Switch.tsx","../src/utils/keyboard.ts"],"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","\"use client\";\n\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport type { ComponentPropsWithoutRef, ReactNode, Ref } from \"react\";\nimport { cn } from \"@/utils/cn\";\n\n// ─── Content shell ─────────────────────────────────────────────────────────────\n\nconst contentClassName = cn(\n \"aivex:flex aivex:flex-col aivex:gap-lg aivex:w-[277px] aivex:max-h-[448px] aivex:p-xl\",\n \"aivex:bg-bg-primary aivex:border aivex:border-border-subtle aivex:rounded-xl aivex:shadow-md aivex:overflow-clip\",\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 PopoverRootProps = ComponentPropsWithoutRef<typeof PopoverPrimitive.Root>;\n\nfunction PopoverRoot(props: PopoverRootProps) {\n return <PopoverPrimitive.Root {...props} />;\n}\n\n// ─── Trigger ──────────────────────────────────────────────────────────────────\n\ntype PopoverTriggerProps = ComponentPropsWithoutRef<typeof PopoverPrimitive.Trigger> & {\n ref?: Ref<HTMLButtonElement>;\n};\n\n/** asChild로 ToggleButton 등 임의의 요소를 트리거로 사용할 수 있습니다. */\nfunction PopoverTrigger({ ref, ...props }: PopoverTriggerProps) {\n return <PopoverPrimitive.Trigger ref={ref} {...props} />;\n}\n\n// ─── Anchor ───────────────────────────────────────────────────────────────────\n\ntype PopoverAnchorProps = ComponentPropsWithoutRef<typeof PopoverPrimitive.Anchor>;\n\n/** 트리거와 다른 요소를 기준으로 위치를 잡고 싶을 때 사용합니다. */\nfunction PopoverAnchor(props: PopoverAnchorProps) {\n return <PopoverPrimitive.Anchor {...props} />;\n}\n\n// ─── Close ────────────────────────────────────────────────────────────────────\n\ntype PopoverCloseProps = ComponentPropsWithoutRef<typeof PopoverPrimitive.Close> & {\n ref?: Ref<HTMLButtonElement>;\n};\n\n/** asChild로 감싸면 하단 버튼 클릭 시 팝오버가 닫힙니다. */\nfunction PopoverClose({ ref, ...props }: PopoverCloseProps) {\n return <PopoverPrimitive.Close ref={ref} {...props} />;\n}\n\n// ─── Content ──────────────────────────────────────────────────────────────────\n\ntype PopoverContentProps = ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> & {\n ref?: Ref<HTMLDivElement>;\n};\n\nfunction PopoverContent({\n className,\n sideOffset = 8,\n align = \"start\",\n ref,\n ...props\n}: PopoverContentProps) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n align={align}\n className={cn(contentClassName, className)}\n {...props}\n />\n </PopoverPrimitive.Portal>\n );\n}\n\n// ─── Title ────────────────────────────────────────────────────────────────────\n\ntype PopoverTitleProps = ComponentPropsWithoutRef<\"div\"> & {\n ref?: Ref<HTMLDivElement>;\n};\n\nfunction PopoverTitle({ className, ref, ...props }: PopoverTitleProps) {\n return (\n <div\n ref={ref}\n className={cn(\n \"aivex:w-full aivex:px-xs aivex:text-body-md-medium aivex:text-text-primary aivex:truncate\",\n className,\n )}\n {...props}\n />\n );\n}\n\n// ─── Body (ItemArea) ────────────────────────────────────────────────────────────\n\ntype PopoverBodyProps = ComponentPropsWithoutRef<\"div\"> & {\n ref?: Ref<HTMLDivElement>;\n};\n\n/** 검색창·목록 등 자유롭게 들어가는 스크롤 영역입니다. */\nfunction PopoverBody({ className, ref, ...props }: PopoverBodyProps) {\n return (\n <div\n ref={ref}\n className={cn(\n \"aivex:flex aivex:min-h-0 aivex:w-full aivex:flex-1 aivex:flex-col aivex:gap-md aivex:overflow-y-auto\",\n className,\n )}\n {...props}\n />\n );\n}\n\n// ─── Footer (BtnContainer) ──────────────────────────────────────────────────────\n\ninterface PopoverFooterProps extends ComponentPropsWithoutRef<\"div\"> {\n /** 좌측에 넓게 붙는 영역(예: 옵션 tertiary 버튼). 지정 시 나머지 버튼은 우측 정렬됩니다. */\n start?: ReactNode;\n ref?: Ref<HTMLDivElement>;\n}\n\nfunction PopoverFooter({ className, start, children, ref, ...props }: PopoverFooterProps) {\n return (\n <div\n ref={ref}\n className={cn(\n \"aivex:flex aivex:w-full aivex:items-center aivex:justify-end aivex:gap-md\",\n className,\n )}\n {...props}\n >\n {start && (\n <div className=\"aivex:flex aivex:min-w-0 aivex:flex-1 aivex:flex-col aivex:items-start aivex:justify-center\">\n {start}\n </div>\n )}\n {children}\n </div>\n );\n}\n\n// ─── Compound export ──────────────────────────────────────────────────────────\n\nconst Popover = Object.assign(PopoverRoot, {\n Trigger: PopoverTrigger,\n Anchor: PopoverAnchor,\n Close: PopoverClose,\n Content: PopoverContent,\n Title: PopoverTitle,\n Body: PopoverBody,\n Footer: PopoverFooter,\n});\n\nexport type {\n PopoverAnchorProps,\n PopoverBodyProps,\n PopoverCloseProps,\n PopoverContentProps,\n PopoverFooterProps,\n PopoverRootProps,\n PopoverTitleProps,\n PopoverTriggerProps,\n};\nexport { Popover };\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","/** 현재 DOM 영역에 발생한 키만 처리하고 중첩된 대화상자·메뉴에는 양보한다. */\nexport function isShortcutTarget(host: HTMLElement | null, target: EventTarget | null): boolean {\n if (!host || !(target instanceof Element) || !host.contains(target)) return false;\n const boundary = target.closest(\n '[role=\"dialog\"],[role=\"alertdialog\"],[role=\"menu\"],[role=\"listbox\"]',\n );\n return !boundary || boundary.contains(host);\n}\n\nexport function isEditableTarget(target: EventTarget | null): boolean {\n if (!(target instanceof HTMLElement)) return false;\n return target.isContentEditable || !!target.closest('input,textarea,select,[role=\"textbox\"]');\n}\n"],"mappings":"kXAWA,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,CAStD,SAAS,EAAY,CAAE,YAAW,aAAa,EAAG,MAAK,GAAG,GAA2B,CACnF,OACE,EAAA,EAAA,KAAC,EAAa,OAAd,CAAA,UACE,EAAA,EAAA,KAAC,EAAa,QAAd,CACO,MACO,aACZ,UAAW,EAAA,GAAG,EAAkB,EAAU,CAC1C,GAAI,EACJ,CAAA,CACkB,CAAA,CAU1B,SAAS,EAAU,CAAE,YAAW,MAAK,GAAG,GAAyB,CAC/D,OACE,EAAA,EAAA,KAAC,EAAa,MAAd,CACO,MACL,UAAW,EAAA,GAAG,4BAA6B,EAAU,CACrD,GAAI,EACJ,CAAA,CAUN,SAAS,EAAc,CAAE,YAAW,MAAK,GAAG,GAA6B,CACvE,OACE,EAAA,EAAA,KAAC,EAAa,UAAd,CACO,MACL,UAAW,EAAA,GAAG,6DAA8D,EAAU,CACtF,GAAI,EACJ,CAAA,CAUN,SAAS,EAAU,CAAE,YAAW,MAAK,GAAG,GAAyB,CAC/D,OACE,EAAA,EAAA,KAAC,EAAa,MAAd,CACO,MACL,UAAW,EAAA,GACT,0FACA,EACD,CACD,GAAI,EACJ,CAAA,CAkBN,SA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AW,EAAA,GACT,0HACA,GAAY,2BACZ,EAAqB,GACtB,UAEA,EACK,CAAA,CAEL,GCrFX,SAAgB,EAAiB,EAA0B,EAAqC,CAC9F,GAAI,CAAC,GAAQ,EAAE,aAAkB,UAAY,CAAC,EAAK,SAAS,EAAO,CAAE,MAAO,GAC5E,IAAM,EAAW,EAAO,QACtB,sEACD,CACD,MAAO,CAAC,GAAY,EAAS,SAAS,EAAK,CAG7C,SAAgB,EAAiB,EAAqC,CAEpE,OADM,aAAkB,YACjB,EAAO,mBAAqB,CAAC,CAAC,EAAO,QAAQ,yCAAyC,CADhD"}
|
|
1
|
+
{"version":3,"file":"keyboard-GVlhOfI6.cjs","names":[],"sources":["../src/components/Menu/Menu.tsx","../src/components/Popover/Popover.tsx","../src/components/Divider/Divider.tsx","../src/components/Slider/Slider.tsx","../src/components/Switch/Switch.tsx","../src/utils/keyboard.ts"],"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","\"use client\";\n\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport type { ComponentPropsWithoutRef, ReactNode, Ref } from \"react\";\nimport { cn } from \"@/utils/cn\";\n\n// ─── Content shell ─────────────────────────────────────────────────────────────\n\nconst contentClassName = cn(\n \"aivex:flex aivex:flex-col aivex:gap-lg aivex:w-[277px] aivex:max-h-[448px] aivex:p-xl\",\n \"aivex:bg-bg-primary aivex:border aivex:border-border-subtle aivex:rounded-xl aivex:shadow-md aivex:overflow-clip\",\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 PopoverRootProps = ComponentPropsWithoutRef<typeof PopoverPrimitive.Root>;\n\nfunction PopoverRoot(props: PopoverRootProps) {\n return <PopoverPrimitive.Root {...props} />;\n}\n\n// ─── Trigger ──────────────────────────────────────────────────────────────────\n\ntype PopoverTriggerProps = ComponentPropsWithoutRef<typeof PopoverPrimitive.Trigger> & {\n ref?: Ref<HTMLButtonElement>;\n};\n\n/** asChild로 ToggleButton 등 임의의 요소를 트리거로 사용할 수 있습니다. */\nfunction PopoverTrigger({ ref, ...props }: PopoverTriggerProps) {\n return <PopoverPrimitive.Trigger ref={ref} {...props} />;\n}\n\n// ─── Anchor ───────────────────────────────────────────────────────────────────\n\ntype PopoverAnchorProps = ComponentPropsWithoutRef<typeof PopoverPrimitive.Anchor>;\n\n/** 트리거와 다른 요소를 기준으로 위치를 잡고 싶을 때 사용합니다. */\nfunction PopoverAnchor(props: PopoverAnchorProps) {\n return <PopoverPrimitive.Anchor {...props} />;\n}\n\n// ─── Close ────────────────────────────────────────────────────────────────────\n\ntype PopoverCloseProps = ComponentPropsWithoutRef<typeof PopoverPrimitive.Close> & {\n ref?: Ref<HTMLButtonElement>;\n};\n\n/** asChild로 감싸면 하단 버튼 클릭 시 팝오버가 닫힙니다. */\nfunction PopoverClose({ ref, ...props }: PopoverCloseProps) {\n return <PopoverPrimitive.Close ref={ref} {...props} />;\n}\n\n// ─── Content ──────────────────────────────────────────────────────────────────\n\ntype PopoverContentProps = ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> & {\n ref?: Ref<HTMLDivElement>;\n};\n\nfunction PopoverContent({\n className,\n sideOffset = 8,\n align = \"start\",\n ref,\n ...props\n}: PopoverContentProps) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n align={align}\n className={cn(contentClassName, className)}\n {...props}\n />\n </PopoverPrimitive.Portal>\n );\n}\n\n// ─── Title ────────────────────────────────────────────────────────────────────\n\ntype PopoverTitleProps = ComponentPropsWithoutRef<\"div\"> & {\n ref?: Ref<HTMLDivElement>;\n};\n\nfunction PopoverTitle({ className, ref, ...props }: PopoverTitleProps) {\n return (\n <div\n ref={ref}\n className={cn(\n \"aivex:w-full aivex:px-xs aivex:text-body-md-medium aivex:text-text-primary aivex:truncate\",\n className,\n )}\n {...props}\n />\n );\n}\n\n// ─── Body (ItemArea) ────────────────────────────────────────────────────────────\n\ntype PopoverBodyProps = ComponentPropsWithoutRef<\"div\"> & {\n ref?: Ref<HTMLDivElement>;\n};\n\n/** 검색창·목록 등 자유롭게 들어가는 스크롤 영역입니다. */\nfunction PopoverBody({ className, ref, ...props }: PopoverBodyProps) {\n return (\n <div\n ref={ref}\n className={cn(\n \"aivex:flex aivex:min-h-0 aivex:w-full aivex:flex-1 aivex:flex-col aivex:gap-md aivex:overflow-y-auto\",\n className,\n )}\n {...props}\n />\n );\n}\n\n// ─── Footer (BtnContainer) ──────────────────────────────────────────────────────\n\ninterface PopoverFooterProps extends ComponentPropsWithoutRef<\"div\"> {\n /** 좌측에 넓게 붙는 영역(예: 옵션 tertiary 버튼). 지정 시 나머지 버튼은 우측 정렬됩니다. */\n start?: ReactNode;\n ref?: Ref<HTMLDivElement>;\n}\n\nfunction PopoverFooter({ className, start, children, ref, ...props }: PopoverFooterProps) {\n return (\n <div\n ref={ref}\n className={cn(\n \"aivex:flex aivex:w-full aivex:items-center aivex:justify-end aivex:gap-md\",\n className,\n )}\n {...props}\n >\n {start && (\n <div className=\"aivex:flex aivex:min-w-0 aivex:flex-1 aivex:flex-col aivex:items-start aivex:justify-center\">\n {start}\n </div>\n )}\n {children}\n </div>\n );\n}\n\n// ─── Compound export ──────────────────────────────────────────────────────────\n\nconst Popover = Object.assign(PopoverRoot, {\n Trigger: PopoverTrigger,\n Anchor: PopoverAnchor,\n Close: PopoverClose,\n Content: PopoverContent,\n Title: PopoverTitle,\n Body: PopoverBody,\n Footer: PopoverFooter,\n});\n\nexport type {\n PopoverAnchorProps,\n PopoverBodyProps,\n PopoverCloseProps,\n PopoverContentProps,\n PopoverFooterProps,\n PopoverRootProps,\n PopoverTitleProps,\n PopoverTriggerProps,\n};\nexport { Popover };\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","/** 현재 DOM 영역에 발생한 키만 처리하고 중첩된 대화상자·메뉴에는 양보한다. */\nexport function isShortcutTarget(host: HTMLElement | null, target: EventTarget | null): boolean {\n if (!host || !(target instanceof Element) || !host.contains(target)) return false;\n const boundary = target.closest(\n '[role=\"dialog\"],[role=\"alertdialog\"],[role=\"menu\"],[role=\"listbox\"]',\n );\n return !boundary || boundary.contains(host);\n}\n\nexport function isEditableTarget(target: EventTarget | null): boolean {\n if (!(target instanceof HTMLElement)) return false;\n return target.isContentEditable || !!target.closest('input,textarea,select,[role=\"textbox\"]');\n}\n"],"mappings":"kXAWA,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,CAStD,SAAS,EAAY,CAAE,YAAW,aAAa,EAAG,MAAK,GAAG,GAA2B,CACnF,OACE,EAAA,EAAA,KAA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