@axis-ds/ui-react 1.6.3 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/README.md +2 -2
  2. package/dist/button/index.js +5 -5
  3. package/dist/button/index.mjs +5 -5
  4. package/dist/card/index.js +1 -1
  5. package/dist/card/index.mjs +1 -1
  6. package/dist/checkbox/index.js +1 -1
  7. package/dist/checkbox/index.mjs +1 -1
  8. package/dist/command/index.d.mts +7 -1
  9. package/dist/command/index.d.ts +7 -1
  10. package/dist/command/index.js +16 -8
  11. package/dist/command/index.mjs +17 -9
  12. package/dist/dialog/index.d.mts +6 -4
  13. package/dist/dialog/index.d.ts +6 -4
  14. package/dist/dialog/index.js +27 -3
  15. package/dist/dialog/index.mjs +27 -3
  16. package/dist/dropdown-menu/index.js +1 -1
  17. package/dist/dropdown-menu/index.mjs +1 -1
  18. package/dist/input/index.js +1 -1
  19. package/dist/input/index.mjs +1 -1
  20. package/dist/popover/index.d.mts +7 -4
  21. package/dist/popover/index.d.ts +7 -4
  22. package/dist/popover/index.js +26 -2
  23. package/dist/popover/index.mjs +26 -2
  24. package/dist/progress/index.js +4 -4
  25. package/dist/progress/index.mjs +4 -4
  26. package/dist/radio-group/index.js +1 -1
  27. package/dist/radio-group/index.mjs +1 -1
  28. package/dist/scroll-area/index.js +8 -1
  29. package/dist/scroll-area/index.mjs +8 -1
  30. package/dist/select/index.js +1 -1
  31. package/dist/select/index.mjs +1 -1
  32. package/dist/sheet/index.d.mts +7 -5
  33. package/dist/sheet/index.d.ts +7 -5
  34. package/dist/sheet/index.js +26 -2
  35. package/dist/sheet/index.mjs +26 -2
  36. package/dist/slider/index.js +1 -1
  37. package/dist/slider/index.mjs +1 -1
  38. package/dist/switch/index.js +1 -1
  39. package/dist/switch/index.mjs +1 -1
  40. package/dist/table/index.js +2 -2
  41. package/dist/table/index.mjs +2 -2
  42. package/dist/textarea/index.js +1 -1
  43. package/dist/textarea/index.mjs +1 -1
  44. package/dist/toast/index.js +1 -1
  45. package/dist/toast/index.mjs +1 -1
  46. package/dist/toggle/index.js +4 -4
  47. package/dist/toggle/index.mjs +4 -4
  48. package/dist/tooltip/index.d.mts +16 -3
  49. package/dist/tooltip/index.d.ts +16 -3
  50. package/dist/tooltip/index.js +87 -19
  51. package/dist/tooltip/index.mjs +87 -19
  52. package/package.json +2 -2
package/README.md CHANGED
@@ -93,8 +93,8 @@ export default function Page() {
93
93
 
94
94
  | 경계 | 컴포넌트 |
95
95
  |---|---|
96
- | 모듈 전체(패키지 `dist` 파일에 `"use client"`) | `Avatar`(이미지 로드 오류 상태와 대체 표시), `Command` · `CommandInput` · `CommandList` · `CommandEmpty` · `CommandGroup` · `CommandItem` · `CommandSeparator`(cmdk) |
97
- | Radix 부분만(Radix 패키지 자체의 `"use client"`) | Accordion · Checkbox · Collapsible · Dialog · Dropdown Menu · Label · Popover · Radio Group · Scroll Area · Select · Separator · Sheet · Slider · Switch · Tabs · Toast · Toggle · Tooltip. 래퍼는 서버에서 렌더되고 Radix 부분이 클라이언트 참조가 됩니다 |
96
+ | 모듈 전체(패키지 `dist` 파일에 `"use client"`) | `Avatar`(이미지 로드 오류 상태와 대체 표시), `Command` · `CommandInput` · `CommandList` · `CommandEmpty` · `CommandGroup` · `CommandItem` · `CommandSeparator`(cmdk), Dialog · Popover · Sheet(열림 상태를 알아 닫힌 트리거의 `aria-controls` 를 뺌, 1.8.0 · WI-0069), Tooltip(포커스 스크롤 닫힘 방지, WI-0073) |
97
+ | Radix 부분만(Radix 패키지 자체의 `"use client"`) | Accordion · Checkbox · Collapsible · Dropdown Menu · Label · Radio Group · Scroll Area · Select · Separator · Slider · Switch · Tabs · Toast · Toggle. 래퍼는 서버에서 렌더되고 Radix 부분이 클라이언트 참조가 됩니다 |
98
98
  | 없음(서버에서 렌더) | Alert · Badge · Breadcrumb · Button · Card · Input · Progress · Skeleton · Table · Textarea |
99
99
 
100
100
  판단 기준은 `useState` · `useEffect` · `useContext` · `createContext` 같은 클라이언트 전용 API, DOM 이벤트 핸들러를 직접 만드는 코드, `"use client"` 모듈 내보내기의 점 접근(`Command.Input` 등)입니다. 지시문을 붙이는 파일 목록은 패키지 소스 `scripts/client-modules.mjs` 한 곳에서 관리합니다.
@@ -38,7 +38,7 @@ var import_react_slot = require("@radix-ui/react-slot");
38
38
  var import_class_variance_authority = require("class-variance-authority");
39
39
  var import_utils = require("../utils.js");
40
40
  const buttonVariants = (0, import_class_variance_authority.cva)(
41
- "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
41
+ "inline-flex items-center justify-center whitespace-nowrap rounded-[var(--axis-radius-control,0.375rem)] text-[length:var(--axis-control-font-size-md,0.875rem)] leading-5 font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
42
42
  {
43
43
  variants: {
44
44
  variant: {
@@ -50,10 +50,10 @@ const buttonVariants = (0, import_class_variance_authority.cva)(
50
50
  link: "text-[var(--axis-text-brand)] underline-offset-4 hover:underline"
51
51
  },
52
52
  size: {
53
- sm: "h-8 px-3 text-xs",
54
- default: "h-10 px-4 py-2",
55
- lg: "h-12 px-6 text-base",
56
- icon: "h-10 w-10"
53
+ sm: "h-[var(--axis-control-h-sm,2rem)] px-3 text-[length:var(--axis-control-font-size-sm,0.75rem)] leading-4",
54
+ default: "h-[var(--axis-control-h-md,2.5rem)] px-4 py-2",
55
+ lg: "h-[var(--axis-control-h-lg,3rem)] px-6 text-[length:var(--axis-control-font-size-lg,1rem)] leading-6",
56
+ icon: "h-[var(--axis-control-h-md,2.5rem)] w-[var(--axis-control-h-md,2.5rem)]"
57
57
  }
58
58
  },
59
59
  defaultVariants: {
@@ -4,7 +4,7 @@ import { Slot } from "@radix-ui/react-slot";
4
4
  import { cva } from "class-variance-authority";
5
5
  import { cn } from "../utils.mjs";
6
6
  const buttonVariants = cva(
7
- "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
7
+ "inline-flex items-center justify-center whitespace-nowrap rounded-[var(--axis-radius-control,0.375rem)] text-[length:var(--axis-control-font-size-md,0.875rem)] leading-5 font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
8
8
  {
9
9
  variants: {
10
10
  variant: {
@@ -16,10 +16,10 @@ const buttonVariants = cva(
16
16
  link: "text-[var(--axis-text-brand)] underline-offset-4 hover:underline"
17
17
  },
18
18
  size: {
19
- sm: "h-8 px-3 text-xs",
20
- default: "h-10 px-4 py-2",
21
- lg: "h-12 px-6 text-base",
22
- icon: "h-10 w-10"
19
+ sm: "h-[var(--axis-control-h-sm,2rem)] px-3 text-[length:var(--axis-control-font-size-sm,0.75rem)] leading-4",
20
+ default: "h-[var(--axis-control-h-md,2.5rem)] px-4 py-2",
21
+ lg: "h-[var(--axis-control-h-lg,3rem)] px-6 text-[length:var(--axis-control-font-size-lg,1rem)] leading-6",
22
+ icon: "h-[var(--axis-control-h-md,2.5rem)] w-[var(--axis-control-h-md,2.5rem)]"
23
23
  }
24
24
  },
25
25
  defaultVariants: {
@@ -45,7 +45,7 @@ const Card = React.forwardRef(
45
45
  {
46
46
  ref,
47
47
  className: (0, import_utils.cn)(
48
- "rounded-lg border bg-[var(--axis-card-bg-default)] border-[var(--axis-card-border-default)] shadow-[shadow:var(--axis-card-shadow)]",
48
+ "rounded-[var(--axis-radius-surface,0.5rem)] border bg-[var(--axis-card-bg-default)] border-[var(--axis-card-border-default)] shadow-[shadow:var(--axis-card-shadow)]",
49
49
  className
50
50
  ),
51
51
  ...props
@@ -7,7 +7,7 @@ const Card = React.forwardRef(
7
7
  {
8
8
  ref,
9
9
  className: cn(
10
- "rounded-lg border bg-[var(--axis-card-bg-default)] border-[var(--axis-card-border-default)] shadow-[shadow:var(--axis-card-shadow)]",
10
+ "rounded-[var(--axis-radius-surface,0.5rem)] border bg-[var(--axis-card-bg-default)] border-[var(--axis-card-border-default)] shadow-[shadow:var(--axis-card-shadow)]",
11
11
  className
12
12
  ),
13
13
  ...props
@@ -40,7 +40,7 @@ const Checkbox = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__
40
40
  {
41
41
  ref,
42
42
  className: (0, import_utils.cn)(
43
- "peer h-4 w-4 shrink-0 rounded-sm border border-[var(--axis-border-default)]",
43
+ "peer h-4 w-4 shrink-0 rounded-sm border border-[var(--axis-form-control-border,var(--axis-border-default))]",
44
44
  "ring-offset-[var(--axis-surface-default)]",
45
45
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--axis-border-focus)] focus-visible:ring-offset-2",
46
46
  "disabled:cursor-not-allowed disabled:opacity-50",
@@ -7,7 +7,7 @@ const Checkbox = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__
7
7
  {
8
8
  ref,
9
9
  className: cn(
10
- "peer h-4 w-4 shrink-0 rounded-sm border border-[var(--axis-border-default)]",
10
+ "peer h-4 w-4 shrink-0 rounded-sm border border-[var(--axis-form-control-border,var(--axis-border-default))]",
11
11
  "ring-offset-[var(--axis-surface-default)]",
12
12
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--axis-border-focus)] focus-visible:ring-offset-2",
13
13
  "disabled:cursor-not-allowed disabled:opacity-50",
@@ -60,7 +60,13 @@ declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
60
60
  value?: string;
61
61
  forceMount?: boolean;
62
62
  } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
63
- /** 명령어 그룹 사이의 시각적 구분선 */
63
+ /**
64
+ * 명령어 그룹 사이의 시각적 구분선.
65
+ *
66
+ * cmdk 의 Separator 는 role="separator" 를 props 뒤에 고정해 listbox(CommandList) 안에 두면
67
+ * 허용되지 않는 자식이 된다(axe aria-required-children, WI-0069). 구분선은 시각 장식이라
68
+ * 역할 없이 보조기술에서 숨기고, 검색 중에는 숨기는 cmdk 동작(alwaysRender 로 끔)은 그대로 따른다.
69
+ */
64
70
  declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
65
71
  ref?: React.Ref<HTMLDivElement>;
66
72
  } & {
@@ -60,7 +60,13 @@ declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
60
60
  value?: string;
61
61
  forceMount?: boolean;
62
62
  } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
63
- /** 명령어 그룹 사이의 시각적 구분선 */
63
+ /**
64
+ * 명령어 그룹 사이의 시각적 구분선.
65
+ *
66
+ * cmdk 의 Separator 는 role="separator" 를 props 뒤에 고정해 listbox(CommandList) 안에 두면
67
+ * 허용되지 않는 자식이 된다(axe aria-required-children, WI-0069). 구분선은 시각 장식이라
68
+ * 역할 없이 보조기술에서 숨기고, 검색 중에는 숨기는 cmdk 동작(alwaysRender 로 끔)은 그대로 따른다.
69
+ */
64
70
  declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
65
71
  ref?: React.Ref<HTMLDivElement>;
66
72
  } & {
@@ -41,6 +41,7 @@ module.exports = __toCommonJS(command_exports);
41
41
  var import_jsx_runtime = require("react/jsx-runtime");
42
42
  var React = __toESM(require("react"));
43
43
  var import_cmdk = require("cmdk");
44
+ var import_react_slot = require("@radix-ui/react-slot");
44
45
  var import_utils = require("../utils.js");
45
46
  const Command = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
46
47
  import_cmdk.Command,
@@ -123,14 +124,21 @@ const CommandGroup = React.forwardRef(({ className, ...props }, ref) => /* @__PU
123
124
  }
124
125
  ));
125
126
  CommandGroup.displayName = "CommandGroup";
126
- const CommandSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
127
- import_cmdk.Command.Separator,
128
- {
129
- ref,
130
- className: (0, import_utils.cn)("-mx-1 h-px bg-[var(--axis-border-default)]", className),
131
- ...props
132
- }
133
- ));
127
+ const CommandSeparator = React.forwardRef(({ className, alwaysRender, asChild, ...props }, ref) => {
128
+ const searching = (0, import_cmdk.useCommandState)((state) => state.search !== "");
129
+ if (searching && !alwaysRender) return null;
130
+ const Comp = asChild ? import_react_slot.Slot : "div";
131
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
132
+ Comp,
133
+ {
134
+ ref,
135
+ "aria-hidden": "true",
136
+ "cmdk-separator": "",
137
+ className: (0, import_utils.cn)("-mx-1 h-px bg-[var(--axis-border-default)]", className),
138
+ ...props
139
+ }
140
+ );
141
+ });
134
142
  CommandSeparator.displayName = "CommandSeparator";
135
143
  const CommandItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
136
144
  import_cmdk.Command.Item,
@@ -1,7 +1,8 @@
1
1
  "use client";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
- import { Command as CommandPrimitive } from "cmdk";
4
+ import { Command as CommandPrimitive, useCommandState } from "cmdk";
5
+ import { Slot } from "@radix-ui/react-slot";
5
6
  import { cn } from "../utils.mjs";
6
7
  const Command = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7
8
  CommandPrimitive,
@@ -84,14 +85,21 @@ const CommandGroup = React.forwardRef(({ className, ...props }, ref) => /* @__PU
84
85
  }
85
86
  ));
86
87
  CommandGroup.displayName = "CommandGroup";
87
- const CommandSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
88
- CommandPrimitive.Separator,
89
- {
90
- ref,
91
- className: cn("-mx-1 h-px bg-[var(--axis-border-default)]", className),
92
- ...props
93
- }
94
- ));
88
+ const CommandSeparator = React.forwardRef(({ className, alwaysRender, asChild, ...props }, ref) => {
89
+ const searching = useCommandState((state) => state.search !== "");
90
+ if (searching && !alwaysRender) return null;
91
+ const Comp = asChild ? Slot : "div";
92
+ return /* @__PURE__ */ jsx(
93
+ Comp,
94
+ {
95
+ ref,
96
+ "aria-hidden": "true",
97
+ "cmdk-separator": "",
98
+ className: cn("-mx-1 h-px bg-[var(--axis-border-default)]", className),
99
+ ...props
100
+ }
101
+ );
102
+ });
95
103
  CommandSeparator.displayName = "CommandSeparator";
96
104
  const CommandItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
97
105
  CommandPrimitive.Item,
@@ -2,10 +2,12 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
3
  import * as DialogPrimitive from '@radix-ui/react-dialog';
4
4
 
5
- /** 다이얼로그의 루트 컴포넌트. 열림/닫힘 상태를 관리한다. */
6
- declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
7
- /** 다이얼로그를 여는 트리거 버튼 컴포넌트 */
8
- declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare function Dialog({ open: openProp, defaultOpen, onOpenChange, ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): react_jsx_runtime.JSX.Element;
6
+ declare namespace Dialog {
7
+ var displayName: string;
8
+ }
9
+ /** 다이얼로그를 여는 트리거 버튼 컴포넌트. 닫힌 동안에는 aria-controls 를 두지 않는다. */
10
+ declare const DialogTrigger: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
9
11
  /** 다이얼로그 콘텐츠를 포털로 렌더링하는 컴포넌트 */
10
12
  declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
11
13
  /** 다이얼로그를 닫는 버튼 컴포넌트 */
@@ -2,10 +2,12 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
3
  import * as DialogPrimitive from '@radix-ui/react-dialog';
4
4
 
5
- /** 다이얼로그의 루트 컴포넌트. 열림/닫힘 상태를 관리한다. */
6
- declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
7
- /** 다이얼로그를 여는 트리거 버튼 컴포넌트 */
8
- declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare function Dialog({ open: openProp, defaultOpen, onOpenChange, ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): react_jsx_runtime.JSX.Element;
6
+ declare namespace Dialog {
7
+ var displayName: string;
8
+ }
9
+ /** 다이얼로그를 여는 트리거 버튼 컴포넌트. 닫힌 동안에는 aria-controls 를 두지 않는다. */
10
+ declare const DialogTrigger: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
9
11
  /** 다이얼로그 콘텐츠를 포털로 렌더링하는 컴포넌트 */
10
12
  declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
11
13
  /** 다이얼로그를 닫는 버튼 컴포넌트 */
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  "use strict";
2
3
  var __create = Object.create;
3
4
  var __defProp = Object.defineProperty;
@@ -44,8 +45,31 @@ var import_jsx_runtime = require("react/jsx-runtime");
44
45
  var React = __toESM(require("react"));
45
46
  var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
46
47
  var import_utils = require("../utils.js");
47
- const Dialog = DialogPrimitive.Root;
48
- const DialogTrigger = DialogPrimitive.Trigger;
48
+ const DialogOpenContext = React.createContext(null);
49
+ function Dialog({
50
+ open: openProp,
51
+ defaultOpen,
52
+ onOpenChange,
53
+ ...props
54
+ }) {
55
+ const [uncontrolledOpen, setUncontrolledOpen] = React.useState(defaultOpen ?? false);
56
+ const isControlled = openProp !== void 0;
57
+ const open = isControlled ? openProp : uncontrolledOpen;
58
+ const handleOpenChange = React.useCallback(
59
+ (next) => {
60
+ if (!isControlled) setUncontrolledOpen(next);
61
+ onOpenChange?.(next);
62
+ },
63
+ [isControlled, onOpenChange]
64
+ );
65
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogOpenContext.Provider, { value: open, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogPrimitive.Root, { open, onOpenChange: handleOpenChange, ...props }) });
66
+ }
67
+ Dialog.displayName = "Dialog";
68
+ const DialogTrigger = React.forwardRef((props, ref) => {
69
+ const open = React.useContext(DialogOpenContext);
70
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogPrimitive.Trigger, { ref, ...open === false ? { "aria-controls": void 0 } : {}, ...props });
71
+ });
72
+ DialogTrigger.displayName = "DialogTrigger";
49
73
  const DialogPortal = DialogPrimitive.Portal;
50
74
  const DialogClose = DialogPrimitive.Close;
51
75
  const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
@@ -70,7 +94,7 @@ const DialogContent = React.forwardRef(({ className, children, ...props }, ref)
70
94
  "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-[shadow:var(--axis-shadow-lg)] duration-200",
71
95
  "bg-[var(--axis-dialog-content-bg)] border-[var(--axis-dialog-content-border)]",
72
96
  "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] motion-reduce:!animate-none",
73
- "sm:rounded-lg",
97
+ "sm:rounded-[var(--axis-radius-surface,0.5rem)]",
74
98
  className
75
99
  ),
76
100
  ...props,
@@ -1,9 +1,33 @@
1
+ "use client";
1
2
  import { jsx, jsxs } from "react/jsx-runtime";
2
3
  import * as React from "react";
3
4
  import * as DialogPrimitive from "@radix-ui/react-dialog";
4
5
  import { cn } from "../utils.mjs";
5
- const Dialog = DialogPrimitive.Root;
6
- const DialogTrigger = DialogPrimitive.Trigger;
6
+ const DialogOpenContext = React.createContext(null);
7
+ function Dialog({
8
+ open: openProp,
9
+ defaultOpen,
10
+ onOpenChange,
11
+ ...props
12
+ }) {
13
+ const [uncontrolledOpen, setUncontrolledOpen] = React.useState(defaultOpen ?? false);
14
+ const isControlled = openProp !== void 0;
15
+ const open = isControlled ? openProp : uncontrolledOpen;
16
+ const handleOpenChange = React.useCallback(
17
+ (next) => {
18
+ if (!isControlled) setUncontrolledOpen(next);
19
+ onOpenChange?.(next);
20
+ },
21
+ [isControlled, onOpenChange]
22
+ );
23
+ return /* @__PURE__ */ jsx(DialogOpenContext.Provider, { value: open, children: /* @__PURE__ */ jsx(DialogPrimitive.Root, { open, onOpenChange: handleOpenChange, ...props }) });
24
+ }
25
+ Dialog.displayName = "Dialog";
26
+ const DialogTrigger = React.forwardRef((props, ref) => {
27
+ const open = React.useContext(DialogOpenContext);
28
+ return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { ref, ...open === false ? { "aria-controls": void 0 } : {}, ...props });
29
+ });
30
+ DialogTrigger.displayName = "DialogTrigger";
7
31
  const DialogPortal = DialogPrimitive.Portal;
8
32
  const DialogClose = DialogPrimitive.Close;
9
33
  const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
@@ -28,7 +52,7 @@ const DialogContent = React.forwardRef(({ className, children, ...props }, ref)
28
52
  "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-[shadow:var(--axis-shadow-lg)] duration-200",
29
53
  "bg-[var(--axis-dialog-content-bg)] border-[var(--axis-dialog-content-border)]",
30
54
  "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] motion-reduce:!animate-none",
31
- "sm:rounded-lg",
55
+ "sm:rounded-[var(--axis-radius-surface,0.5rem)]",
32
56
  className
33
57
  ),
34
58
  ...props,
@@ -226,7 +226,7 @@ const DropdownMenuShortcut = ({
226
226
  "span",
227
227
  {
228
228
  className: (0, import_utils.cn)(
229
- "ml-auto text-xs tracking-widest text-[var(--axis-text-tertiary)]",
229
+ "ml-auto text-xs tracking-widest text-[var(--axis-text-secondary)]",
230
230
  className
231
231
  ),
232
232
  ...props
@@ -179,7 +179,7 @@ const DropdownMenuShortcut = ({
179
179
  "span",
180
180
  {
181
181
  className: cn(
182
- "ml-auto text-xs tracking-widest text-[var(--axis-text-tertiary)]",
182
+ "ml-auto text-xs tracking-widest text-[var(--axis-text-secondary)]",
183
183
  className
184
184
  ),
185
185
  ...props
@@ -41,7 +41,7 @@ const Input = React.forwardRef(
41
41
  {
42
42
  type,
43
43
  className: (0, import_utils.cn)(
44
- "flex h-10 w-full rounded-md border px-3 py-2 text-sm transition-colors",
44
+ "flex h-[var(--axis-field-h,2.5rem)] w-full rounded-[var(--axis-radius-field,0.375rem)] border px-3 py-2 text-[length:var(--axis-control-font-size-md,0.875rem)] leading-5 transition-colors",
45
45
  "bg-[var(--axis-input-bg-default)] text-[var(--axis-input-text-default)]",
46
46
  "border-[var(--axis-input-border-default)]",
47
47
  "placeholder:text-[var(--axis-input-text-placeholder)]",
@@ -8,7 +8,7 @@ const Input = React.forwardRef(
8
8
  {
9
9
  type,
10
10
  className: cn(
11
- "flex h-10 w-full rounded-md border px-3 py-2 text-sm transition-colors",
11
+ "flex h-[var(--axis-field-h,2.5rem)] w-full rounded-[var(--axis-radius-field,0.375rem)] border px-3 py-2 text-[length:var(--axis-control-font-size-md,0.875rem)] leading-5 transition-colors",
12
12
  "bg-[var(--axis-input-bg-default)] text-[var(--axis-input-text-default)]",
13
13
  "border-[var(--axis-input-border-default)]",
14
14
  "placeholder:text-[var(--axis-input-text-placeholder)]",
@@ -1,10 +1,13 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
1
2
  import * as React from 'react';
2
3
  import * as PopoverPrimitive from '@radix-ui/react-popover';
3
4
 
4
- /** 팝오버의 루트 컴포넌트. 열림/닫힘 상태를 관리한다. */
5
- declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
6
- /** 팝오버를 여는 트리거 요소 컴포넌트 */
7
- declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare function Popover({ open: openProp, defaultOpen, onOpenChange, ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>): react_jsx_runtime.JSX.Element;
6
+ declare namespace Popover {
7
+ var displayName: string;
8
+ }
9
+ /** 팝오버를 여는 트리거 요소 컴포넌트. 닫힌 동안에는 aria-controls 를 두지 않는다. */
10
+ declare const PopoverTrigger: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
8
11
  /** 팝오버의 본문 콘텐츠 컴포넌트. 포털을 통해 렌더링되며 트리거 요소에 상대적으로 위치한다. */
9
12
  declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
10
13
 
@@ -1,10 +1,13 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
1
2
  import * as React from 'react';
2
3
  import * as PopoverPrimitive from '@radix-ui/react-popover';
3
4
 
4
- /** 팝오버의 루트 컴포넌트. 열림/닫힘 상태를 관리한다. */
5
- declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
6
- /** 팝오버를 여는 트리거 요소 컴포넌트 */
7
- declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare function Popover({ open: openProp, defaultOpen, onOpenChange, ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>): react_jsx_runtime.JSX.Element;
6
+ declare namespace Popover {
7
+ var displayName: string;
8
+ }
9
+ /** 팝오버를 여는 트리거 요소 컴포넌트. 닫힌 동안에는 aria-controls 를 두지 않는다. */
10
+ declare const PopoverTrigger: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
8
11
  /** 팝오버의 본문 콘텐츠 컴포넌트. 포털을 통해 렌더링되며 트리거 요소에 상대적으로 위치한다. */
9
12
  declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
10
13
 
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  "use strict";
2
3
  var __create = Object.create;
3
4
  var __defProp = Object.defineProperty;
@@ -37,8 +38,31 @@ var import_jsx_runtime = require("react/jsx-runtime");
37
38
  var React = __toESM(require("react"));
38
39
  var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"));
39
40
  var import_utils = require("../utils.js");
40
- const Popover = PopoverPrimitive.Root;
41
- const PopoverTrigger = PopoverPrimitive.Trigger;
41
+ const PopoverOpenContext = React.createContext(null);
42
+ function Popover({
43
+ open: openProp,
44
+ defaultOpen,
45
+ onOpenChange,
46
+ ...props
47
+ }) {
48
+ const [uncontrolledOpen, setUncontrolledOpen] = React.useState(defaultOpen ?? false);
49
+ const isControlled = openProp !== void 0;
50
+ const open = isControlled ? openProp : uncontrolledOpen;
51
+ const handleOpenChange = React.useCallback(
52
+ (next) => {
53
+ if (!isControlled) setUncontrolledOpen(next);
54
+ onOpenChange?.(next);
55
+ },
56
+ [isControlled, onOpenChange]
57
+ );
58
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverOpenContext.Provider, { value: open, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverPrimitive.Root, { open, onOpenChange: handleOpenChange, ...props }) });
59
+ }
60
+ Popover.displayName = "Popover";
61
+ const PopoverTrigger = React.forwardRef((props, ref) => {
62
+ const open = React.useContext(PopoverOpenContext);
63
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverPrimitive.Trigger, { ref, ...open === false ? { "aria-controls": void 0 } : {}, ...props });
64
+ });
65
+ PopoverTrigger.displayName = "PopoverTrigger";
42
66
  const PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
43
67
  PopoverPrimitive.Content,
44
68
  {
@@ -1,9 +1,33 @@
1
+ "use client";
1
2
  import { jsx } from "react/jsx-runtime";
2
3
  import * as React from "react";
3
4
  import * as PopoverPrimitive from "@radix-ui/react-popover";
4
5
  import { cn } from "../utils.mjs";
5
- const Popover = PopoverPrimitive.Root;
6
- const PopoverTrigger = PopoverPrimitive.Trigger;
6
+ const PopoverOpenContext = React.createContext(null);
7
+ function Popover({
8
+ open: openProp,
9
+ defaultOpen,
10
+ onOpenChange,
11
+ ...props
12
+ }) {
13
+ const [uncontrolledOpen, setUncontrolledOpen] = React.useState(defaultOpen ?? false);
14
+ const isControlled = openProp !== void 0;
15
+ const open = isControlled ? openProp : uncontrolledOpen;
16
+ const handleOpenChange = React.useCallback(
17
+ (next) => {
18
+ if (!isControlled) setUncontrolledOpen(next);
19
+ onOpenChange?.(next);
20
+ },
21
+ [isControlled, onOpenChange]
22
+ );
23
+ return /* @__PURE__ */ jsx(PopoverOpenContext.Provider, { value: open, children: /* @__PURE__ */ jsx(PopoverPrimitive.Root, { open, onOpenChange: handleOpenChange, ...props }) });
24
+ }
25
+ Popover.displayName = "Popover";
26
+ const PopoverTrigger = React.forwardRef((props, ref) => {
27
+ const open = React.useContext(PopoverOpenContext);
28
+ return /* @__PURE__ */ jsx(PopoverPrimitive.Trigger, { ref, ...open === false ? { "aria-controls": void 0 } : {}, ...props });
29
+ });
30
+ PopoverTrigger.displayName = "PopoverTrigger";
7
31
  const PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
8
32
  PopoverPrimitive.Content,
9
33
  {
@@ -57,10 +57,10 @@ const progressIndicatorVariants = (0, import_class_variance_authority.cva)(
57
57
  {
58
58
  variants: {
59
59
  variant: {
60
- default: "bg-[var(--axis-surface-brand)]",
61
- success: "bg-[var(--axis-color-green-500)]",
62
- warning: "bg-[var(--axis-color-yellow-500)]",
63
- destructive: "bg-[var(--axis-color-red-500)]"
60
+ default: "bg-[var(--axis-progress-fill-default,var(--axis-surface-brand))]",
61
+ success: "bg-[var(--axis-progress-fill-success,var(--axis-color-green-500))]",
62
+ warning: "bg-[var(--axis-progress-fill-warning,var(--axis-color-yellow-500))]",
63
+ destructive: "bg-[var(--axis-progress-fill-destructive,var(--axis-color-red-500))]"
64
64
  }
65
65
  },
66
66
  defaultVariants: {
@@ -22,10 +22,10 @@ const progressIndicatorVariants = cva(
22
22
  {
23
23
  variants: {
24
24
  variant: {
25
- default: "bg-[var(--axis-surface-brand)]",
26
- success: "bg-[var(--axis-color-green-500)]",
27
- warning: "bg-[var(--axis-color-yellow-500)]",
28
- destructive: "bg-[var(--axis-color-red-500)]"
25
+ default: "bg-[var(--axis-progress-fill-default,var(--axis-surface-brand))]",
26
+ success: "bg-[var(--axis-progress-fill-success,var(--axis-color-green-500))]",
27
+ warning: "bg-[var(--axis-progress-fill-warning,var(--axis-color-yellow-500))]",
28
+ destructive: "bg-[var(--axis-progress-fill-destructive,var(--axis-color-red-500))]"
29
29
  }
30
30
  },
31
31
  defaultVariants: {
@@ -50,7 +50,7 @@ const RadioGroupItem = React.forwardRef(({ className, ...props }, ref) => /* @__
50
50
  {
51
51
  ref,
52
52
  className: (0, import_utils.cn)(
53
- "aspect-square h-4 w-4 rounded-full border border-[var(--axis-border-default)]",
53
+ "aspect-square h-4 w-4 rounded-full border border-[var(--axis-form-control-border,var(--axis-border-default))]",
54
54
  "ring-offset-[var(--axis-surface-default)]",
55
55
  "focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--axis-border-focus)] focus-visible:ring-offset-2",
56
56
  "disabled:cursor-not-allowed disabled:opacity-50",
@@ -16,7 +16,7 @@ const RadioGroupItem = React.forwardRef(({ className, ...props }, ref) => /* @__
16
16
  {
17
17
  ref,
18
18
  className: cn(
19
- "aspect-square h-4 w-4 rounded-full border border-[var(--axis-border-default)]",
19
+ "aspect-square h-4 w-4 rounded-full border border-[var(--axis-form-control-border,var(--axis-border-default))]",
20
20
  "ring-offset-[var(--axis-surface-default)]",
21
21
  "focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--axis-border-focus)] focus-visible:ring-offset-2",
22
22
  "disabled:cursor-not-allowed disabled:opacity-50",
@@ -43,7 +43,14 @@ const ScrollArea = React.forwardRef(({ className, children, ...props }, ref) =>
43
43
  className: (0, import_utils.cn)("relative overflow-hidden", className),
44
44
  ...props,
45
45
  children: [
46
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children }),
46
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
47
+ ScrollAreaPrimitive.Viewport,
48
+ {
49
+ tabIndex: 0,
50
+ className: "h-full w-full rounded-[inherit] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--axis-border-focus)]",
51
+ children
52
+ }
53
+ ),
47
54
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ScrollBar, {}),
48
55
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ScrollAreaPrimitive.Corner, {})
49
56
  ]
@@ -9,7 +9,14 @@ const ScrollArea = React.forwardRef(({ className, children, ...props }, ref) =>
9
9
  className: cn("relative overflow-hidden", className),
10
10
  ...props,
11
11
  children: [
12
- /* @__PURE__ */ jsx(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children }),
12
+ /* @__PURE__ */ jsx(
13
+ ScrollAreaPrimitive.Viewport,
14
+ {
15
+ tabIndex: 0,
16
+ className: "h-full w-full rounded-[inherit] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--axis-border-focus)]",
17
+ children
18
+ }
19
+ ),
13
20
  /* @__PURE__ */ jsx(ScrollBar, {}),
14
21
  /* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, {})
15
22
  ]
@@ -50,7 +50,7 @@ const SelectTrigger = React.forwardRef(({ className, children, ...props }, ref)
50
50
  {
51
51
  ref,
52
52
  className: (0, import_utils.cn)(
53
- "flex h-10 w-full items-center justify-between rounded-md border px-3 py-2 text-sm",
53
+ "flex h-[var(--axis-field-h,2.5rem)] w-full items-center justify-between rounded-[var(--axis-radius-field,0.375rem)] border px-3 py-2 text-sm",
54
54
  "bg-[var(--axis-input-bg-default)] border-[var(--axis-input-border-default)]",
55
55
  "placeholder:text-[var(--axis-input-text-placeholder)]",
56
56
  "hover:border-[var(--axis-input-border-hover)]",
@@ -10,7 +10,7 @@ const SelectTrigger = React.forwardRef(({ className, children, ...props }, ref)
10
10
  {
11
11
  ref,
12
12
  className: cn(
13
- "flex h-10 w-full items-center justify-between rounded-md border px-3 py-2 text-sm",
13
+ "flex h-[var(--axis-field-h,2.5rem)] w-full items-center justify-between rounded-[var(--axis-radius-field,0.375rem)] border px-3 py-2 text-sm",
14
14
  "bg-[var(--axis-input-bg-default)] border-[var(--axis-input-border-default)]",
15
15
  "placeholder:text-[var(--axis-input-text-placeholder)]",
16
16
  "hover:border-[var(--axis-input-border-hover)]",