@t3q-ui/design-system 1.62.0 → 1.63.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 (38) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/chunk-DWF6AFPQ.js +409 -0
  3. package/dist/chunk-DWF6AFPQ.js.map +1 -0
  4. package/dist/{chunk-B7EVWGOO.cjs → chunk-ESAMXUUJ.cjs} +2264 -1129
  5. package/dist/chunk-ESAMXUUJ.cjs.map +1 -0
  6. package/dist/{chunk-RWXQIS6W.js → chunk-GZZXYYDY.js} +2182 -1049
  7. package/dist/chunk-GZZXYYDY.js.map +1 -0
  8. package/dist/chunk-OQOBPYZT.cjs +443 -0
  9. package/dist/chunk-OQOBPYZT.cjs.map +1 -0
  10. package/dist/{index-49sVdPlX.d.cts → index-DoIChamr.d.cts} +177 -1
  11. package/dist/{index-49sVdPlX.d.ts → index-DoIChamr.d.ts} +177 -1
  12. package/dist/index.cjs +1146 -1799
  13. package/dist/index.cjs.map +1 -1
  14. package/dist/index.css +12 -0
  15. package/dist/index.css.map +1 -1
  16. package/dist/index.d.cts +54 -7
  17. package/dist/index.d.ts +54 -7
  18. package/dist/index.js +584 -1264
  19. package/dist/index.js.map +1 -1
  20. package/dist/markdown/index.cjs +412 -0
  21. package/dist/markdown/index.cjs.map +1 -0
  22. package/dist/markdown/index.d.cts +24 -0
  23. package/dist/markdown/index.d.ts +24 -0
  24. package/dist/markdown/index.js +405 -0
  25. package/dist/markdown/index.js.map +1 -0
  26. package/dist/patterns/index.cjs +586 -69
  27. package/dist/patterns/index.cjs.map +1 -1
  28. package/dist/patterns/index.d.cts +119 -2
  29. package/dist/patterns/index.d.ts +119 -2
  30. package/dist/patterns/index.js +520 -5
  31. package/dist/patterns/index.js.map +1 -1
  32. package/dist/styles.css +23 -0
  33. package/mcp/manifests/components.json +2620 -68
  34. package/package.json +19 -2
  35. package/skills/tds/examples/chat-page.tsx +313 -0
  36. package/skills/tds/reference/components.md +238 -11
  37. package/dist/chunk-B7EVWGOO.cjs.map +0 -1
  38. package/dist/chunk-RWXQIS6W.js.map +0 -1
@@ -1,20 +1,21 @@
1
1
  'use strict';
2
2
 
3
- var clsx = require('clsx');
4
- var tailwindMerge = require('tailwind-merge');
3
+ var chunkOQOBPYZT_cjs = require('./chunk-OQOBPYZT.cjs');
5
4
  var classVarianceAuthority = require('class-variance-authority');
6
5
  var jsxRuntime = require('react/jsx-runtime');
7
- var React12 = require('react');
6
+ var React10 = require('react');
8
7
  var LottieImport = require('react-lottie');
9
8
  var reactSlot = require('@radix-ui/react-slot');
10
9
  var TooltipPrimitive = require('@radix-ui/react-tooltip');
11
10
  var ToggleGroupPrimitive = require('@radix-ui/react-toggle-group');
12
11
  var CheckboxPrimitive = require('@radix-ui/react-checkbox');
13
- var DialogPrimitive = require('@radix-ui/react-dialog');
14
- var lucide = require('lucide-react');
15
- var SeparatorPrimitive = require('@radix-ui/react-separator');
16
12
  var DropdownMenuPrimitive = require('@radix-ui/react-dropdown-menu');
13
+ var lucide = require('lucide-react');
17
14
  var reactHookForm = require('react-hook-form');
15
+ var TextareaAutosize = require('react-textarea-autosize');
16
+ var dateFns = require('date-fns');
17
+ var DialogPrimitive = require('@radix-ui/react-dialog');
18
+ var SeparatorPrimitive = require('@radix-ui/react-separator');
18
19
  var TabsPrimitive = require('@radix-ui/react-tabs');
19
20
  var agGridCommunity = require('ag-grid-community');
20
21
  var agGridReact = require('ag-grid-react');
@@ -39,52 +40,18 @@ function _interopNamespace(e) {
39
40
  return Object.freeze(n);
40
41
  }
41
42
 
42
- var React12__namespace = /*#__PURE__*/_interopNamespace(React12);
43
+ var React10__namespace = /*#__PURE__*/_interopNamespace(React10);
43
44
  var LottieImport__default = /*#__PURE__*/_interopDefault(LottieImport);
44
45
  var TooltipPrimitive__namespace = /*#__PURE__*/_interopNamespace(TooltipPrimitive);
45
46
  var ToggleGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(ToggleGroupPrimitive);
46
47
  var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimitive);
47
- var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(DialogPrimitive);
48
+ var DropdownMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(DropdownMenuPrimitive);
48
49
  var lucide__namespace = /*#__PURE__*/_interopNamespace(lucide);
50
+ var TextareaAutosize__default = /*#__PURE__*/_interopDefault(TextareaAutosize);
51
+ var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(DialogPrimitive);
49
52
  var SeparatorPrimitive__namespace = /*#__PURE__*/_interopNamespace(SeparatorPrimitive);
50
- var DropdownMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(DropdownMenuPrimitive);
51
53
  var TabsPrimitive__namespace = /*#__PURE__*/_interopNamespace(TabsPrimitive);
52
54
 
53
- function cn(...inputs) {
54
- return twMerge(clsx.clsx(inputs));
55
- }
56
- var fontSize = [
57
- "h1",
58
- "h2",
59
- "h3",
60
- "h4",
61
- "h5",
62
- "h6",
63
- "base-semibold",
64
- "base-medium",
65
- "base-regular",
66
- "large-medium",
67
- "large-semibold",
68
- "small-bold-h",
69
- "small-medium-h",
70
- "small-regular-h",
71
- "small-bold",
72
- "small-medium",
73
- "small-regular",
74
- "xsmall-bold",
75
- "xsmall-medium",
76
- "xsmall-regular"
77
- ];
78
- var borderRadius = ["none", "xsmall", "small", "medium", "large", "xlarge", "full"];
79
- var twMerge = tailwindMerge.extendTailwindMerge({
80
- extend: {
81
- classGroups: {
82
- "font-size": fontSize.map((item) => "text-" + item),
83
- "border-radius": borderRadius.map((item) => "rounded-" + item)
84
- }
85
- }
86
- });
87
-
88
55
  // src/utils/sanitizeUserText.ts
89
56
  function sanitizeUserText(node) {
90
57
  if (typeof node === "string") return node.replace(/[\r\n]+/g, " ");
@@ -118,7 +85,7 @@ function Alert({
118
85
  {
119
86
  "data-slot": "alert",
120
87
  role: "alert",
121
- className: cn(alertVariants({ variant }), className),
88
+ className: chunkOQOBPYZT_cjs.cn(alertVariants({ variant }), className),
122
89
  ...props
123
90
  }
124
91
  );
@@ -128,7 +95,7 @@ function AlertTitle({ className, children, ...props }) {
128
95
  "div",
129
96
  {
130
97
  "data-slot": "alert-title",
131
- className: cn("text-h5 col-start-2 line-clamp-1 whitespace-pre", className),
98
+ className: chunkOQOBPYZT_cjs.cn("text-h5 col-start-2 line-clamp-1 whitespace-pre", className),
132
99
  ...props,
133
100
  children: sanitizeUserText(children)
134
101
  }
@@ -139,7 +106,7 @@ function AlertDescription({ className, children, ...props }) {
139
106
  "div",
140
107
  {
141
108
  "data-slot": "alert-description",
142
- className: cn("text-base-medium col-start-2 whitespace-pre-wrap", className),
109
+ className: chunkOQOBPYZT_cjs.cn("text-base-medium col-start-2 whitespace-pre-wrap", className),
143
110
  ...props,
144
111
  children: sanitizeUserText(children)
145
112
  }
@@ -150,7 +117,7 @@ function AlertActions({ className, ...props }) {
150
117
  "div",
151
118
  {
152
119
  "data-slot": "alert-actions",
153
- className: cn(
120
+ className: chunkOQOBPYZT_cjs.cn(
154
121
  "col-start-2 mt-[4px] flex flex-wrap items-center gap-[8px]",
155
122
  "[&>button]:px-0 [&>button]:text-current [&>button]:underline [&>button:hover]:text-current [&>button:active]:text-current",
156
123
  className
@@ -1037,12 +1004,6 @@ var sizeVariants = {
1037
1004
  large: 48,
1038
1005
  xlarge: 96
1039
1006
  };
1040
- var dotSizeVariants = {
1041
- small: "w-[8px] h-[8px]",
1042
- medium: "w-[12px] h-[12px]",
1043
- large: "w-[24px] h-[24px]",
1044
- xlarge: "w-[48px] h-[48px]"
1045
- };
1046
1007
  var spinnerVariants = classVarianceAuthority.cva("tds-spinner [&_path]:fill-current", {
1047
1008
  variants: {
1048
1009
  variant: {
@@ -1072,17 +1033,17 @@ function Spinner({
1072
1033
  shape = "spinner",
1073
1034
  ...props
1074
1035
  }) {
1075
- const lottieWrapperRef = React12.useRef(null);
1076
- React12.useEffect(() => {
1036
+ const px = typeof size === "number" ? size : sizeVariants[size];
1037
+ const lottieWrapperRef = React10.useRef(null);
1038
+ React10.useEffect(() => {
1077
1039
  lottieWrapperRef.current?.querySelector("[tabindex]")?.setAttribute("tabindex", "-1");
1078
1040
  });
1079
1041
  if (shape === "dot") {
1080
- const px = sizeVariants[size];
1081
1042
  return /* @__PURE__ */ jsxRuntime.jsx(
1082
1043
  "div",
1083
1044
  {
1084
1045
  ...props,
1085
- className: cn(
1046
+ className: chunkOQOBPYZT_cjs.cn(
1086
1047
  spinnerVariants({ variant }),
1087
1048
  "inline-flex items-center justify-center",
1088
1049
  props.className
@@ -1092,7 +1053,8 @@ function Spinner({
1092
1053
  "span",
1093
1054
  {
1094
1055
  "aria-hidden": true,
1095
- className: cn("rounded-full bg-current animate-pulse", dotSizeVariants[size])
1056
+ className: "rounded-full bg-current animate-pulse",
1057
+ style: { width: px / 2, height: px / 2 }
1096
1058
  }
1097
1059
  )
1098
1060
  }
@@ -1103,12 +1065,12 @@ function Spinner({
1103
1065
  {
1104
1066
  ...props,
1105
1067
  ref: lottieWrapperRef,
1106
- className: cn(spinnerVariants({ variant }), props.className),
1068
+ className: chunkOQOBPYZT_cjs.cn(spinnerVariants({ variant }), props.className),
1107
1069
  children: /* @__PURE__ */ jsxRuntime.jsx(
1108
1070
  Lottie,
1109
1071
  {
1110
- height: sizeVariants[size],
1111
- width: sizeVariants[size],
1072
+ height: px,
1073
+ width: px,
1112
1074
  ariaRole: "presentation",
1113
1075
  ariaLabel: "",
1114
1076
  isClickToPauseDisabled: true,
@@ -1223,7 +1185,7 @@ var buttonVariants = classVarianceAuthority.cva(
1223
1185
  defaultVariants: defaultButtonVariants
1224
1186
  }
1225
1187
  );
1226
- var Button = React12__namespace.forwardRef(
1188
+ var Button = React10__namespace.forwardRef(
1227
1189
  ({
1228
1190
  className,
1229
1191
  variant,
@@ -1238,11 +1200,11 @@ var Button = React12__namespace.forwardRef(
1238
1200
  }, ref) => {
1239
1201
  const Comp = asChild ? reactSlot.Slot : "button";
1240
1202
  const resolvedWeightClass = buttonWeightVariants[weight ?? defaultButtonVariants.weight];
1241
- const slotChild = asChild && React12__namespace.isValidElement(children) ? children : null;
1203
+ const slotChild = asChild && React10__namespace.isValidElement(children) ? children : null;
1242
1204
  const labelSource = slotChild ? slotChild.props.children : children;
1243
- const processedChildren = React12__namespace.useMemo(() => {
1244
- const flatten = (nodes) => React12__namespace.Children.toArray(nodes).flatMap(
1245
- (child) => React12__namespace.isValidElement(child) && child.type === React12__namespace.Fragment ? flatten(child.props.children) : [child]
1205
+ const processedChildren = React10__namespace.useMemo(() => {
1206
+ const flatten = (nodes) => React10__namespace.Children.toArray(nodes).flatMap(
1207
+ (child) => React10__namespace.isValidElement(child) && child.type === React10__namespace.Fragment ? flatten(child.props.children) : [child]
1246
1208
  );
1247
1209
  const childrenArray = flatten(labelSource);
1248
1210
  const result = [];
@@ -1255,7 +1217,7 @@ var Button = React12__namespace.forwardRef(
1255
1217
  "span",
1256
1218
  {
1257
1219
  className: "box-border flex items-center justify-center px-[4px] h-[24px] shrink-0",
1258
- children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex flex-col justify-center leading-[0] shrink-0 text-[14px]", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("text-[14px] leading-[24px]", resolvedWeightClass), children: combinedText }) })
1220
+ children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex flex-col justify-center leading-[0] shrink-0 text-[14px]", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: chunkOQOBPYZT_cjs.cn("text-[14px] leading-[24px]", resolvedWeightClass), children: combinedText }) })
1259
1221
  },
1260
1222
  `text-${result.length}`
1261
1223
  )
@@ -1278,7 +1240,7 @@ var Button = React12__namespace.forwardRef(
1278
1240
  Comp,
1279
1241
  {
1280
1242
  type: asChild ? type : type ?? "button",
1281
- className: cn(buttonVariants({ variant, shape, spacing, weight, loading }), className),
1243
+ className: chunkOQOBPYZT_cjs.cn(buttonVariants({ variant, shape, spacing, weight, loading }), className),
1282
1244
  ref,
1283
1245
  ...props,
1284
1246
  children: [
@@ -1289,7 +1251,7 @@ var Button = React12__namespace.forwardRef(
1289
1251
  size: "medium"
1290
1252
  }
1291
1253
  ) }),
1292
- /* @__PURE__ */ jsxRuntime.jsx(reactSlot.Slottable, { children: slotChild ? React12__namespace.cloneElement(slotChild, void 0, processedChildren) : asChild ? children : processedChildren })
1254
+ /* @__PURE__ */ jsxRuntime.jsx(reactSlot.Slottable, { children: slotChild ? React10__namespace.cloneElement(slotChild, void 0, processedChildren) : asChild ? children : processedChildren })
1293
1255
  ]
1294
1256
  }
1295
1257
  );
@@ -1334,14 +1296,14 @@ var stackVariant = classVarianceAuthority.cva("flex", {
1334
1296
  alignItems: "normal"
1335
1297
  }
1336
1298
  });
1337
- var Stack = React12.forwardRef(
1299
+ var Stack = React10.forwardRef(
1338
1300
  ({ direction = "row", spacing, justifyContent, alignItems, children, ...props }, ref) => {
1339
1301
  return /* @__PURE__ */ jsxRuntime.jsx(
1340
1302
  "div",
1341
1303
  {
1342
1304
  ref,
1343
1305
  ...props,
1344
- className: cn(stackVariant({ direction, justifyContent, alignItems }), props.className),
1306
+ className: chunkOQOBPYZT_cjs.cn(stackVariant({ direction, justifyContent, alignItems }), props.className),
1345
1307
  style: {
1346
1308
  gap: Number(spacing) ? `${spacing}px` : `${spacing}`,
1347
1309
  ...props.style
@@ -1416,7 +1378,7 @@ var badgeVariants = classVarianceAuthority.cva(
1416
1378
  }
1417
1379
  );
1418
1380
  function Badge({ className, variant, rounded, appearance, size, children, ...props }) {
1419
- const wrappedChildren = React12__namespace.Children.map(children, (child) => {
1381
+ const wrappedChildren = React10__namespace.Children.map(children, (child) => {
1420
1382
  if (typeof child === "string" || typeof child === "number") {
1421
1383
  return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "px-[3px]", children: child });
1422
1384
  }
@@ -1425,7 +1387,7 @@ function Badge({ className, variant, rounded, appearance, size, children, ...pro
1425
1387
  return /* @__PURE__ */ jsxRuntime.jsx(
1426
1388
  "div",
1427
1389
  {
1428
- className: cn(badgeVariants({ variant, rounded, appearance, size }), className),
1390
+ className: chunkOQOBPYZT_cjs.cn(badgeVariants({ variant, rounded, appearance, size }), className),
1429
1391
  ...props,
1430
1392
  children: wrappedChildren
1431
1393
  }
@@ -1433,14 +1395,14 @@ function Badge({ className, variant, rounded, appearance, size, children, ...pro
1433
1395
  }
1434
1396
  var TooltipProvider = TooltipPrimitive__namespace.Provider;
1435
1397
  var Tooltip = TooltipPrimitive__namespace.Root;
1436
- var TooltipTrigger = React12__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Trigger, { type: "button", ref, className: cn(className), ...props }));
1398
+ var TooltipTrigger = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Trigger, { type: "button", ref, className: chunkOQOBPYZT_cjs.cn(className), ...props }));
1437
1399
  TooltipTrigger.displayName = TooltipPrimitive__namespace.Trigger.displayName;
1438
- var TooltipContent = React12__namespace.forwardRef(({ className, sideOffset = 4, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
1400
+ var TooltipContent = React10__namespace.forwardRef(({ className, sideOffset = 4, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
1439
1401
  TooltipPrimitive__namespace.Content,
1440
1402
  {
1441
1403
  ref,
1442
1404
  sideOffset,
1443
- className: cn(
1405
+ className: chunkOQOBPYZT_cjs.cn(
1444
1406
  "z-[var(--root-z-index)] overflow-hidden rounded-small bg-secondary70 px-[6px] py-[4px] text-small-regular text-sys-background whitespace-pre-wrap break-keep wrap-break-word animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",
1445
1407
  className
1446
1408
  ),
@@ -1449,7 +1411,7 @@ var TooltipContent = React12__namespace.forwardRef(({ className, sideOffset = 4,
1449
1411
  }
1450
1412
  ) }));
1451
1413
  TooltipContent.displayName = TooltipPrimitive__namespace.Content.displayName;
1452
- var ToggleGroupContext = React12__namespace.createContext({
1414
+ var ToggleGroupContext = React10__namespace.createContext({
1453
1415
  variant: "default",
1454
1416
  spacing: false
1455
1417
  });
@@ -1466,7 +1428,7 @@ function ToggleGroup({
1466
1428
  {
1467
1429
  ...{ type, ...props },
1468
1430
  "data-slot": "toggle-group",
1469
- className: cn(rootClass, className)
1431
+ className: chunkOQOBPYZT_cjs.cn(rootClass, className)
1470
1432
  }
1471
1433
  ) });
1472
1434
  }
@@ -1478,7 +1440,7 @@ function ToggleGroupItem({
1478
1440
  className,
1479
1441
  ...props
1480
1442
  }) {
1481
- const { variant, spacing } = React12__namespace.useContext(ToggleGroupContext);
1443
+ const { variant, spacing } = React10__namespace.useContext(ToggleGroupContext);
1482
1444
  const shapeClass = variant === "outline" && !spacing ? "rounded-none first:rounded-l-small last:rounded-r-small" : variant === "outline" && spacing ? "rounded-small border border-secondary30" : "rounded-small";
1483
1445
  const focusClass = variant === "outline" && !spacing ? "focus-visible:relative focus-visible:z-10 focus-visible:outline-[2px] focus-visible:outline-sys-focus-ring-main focus-visible:outline-offset-[2px]" : "focus-visible:outline-[2px] focus-visible:outline-sys-focus-ring-main focus-visible:outline-offset-[1px]";
1484
1446
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -1486,7 +1448,7 @@ function ToggleGroupItem({
1486
1448
  {
1487
1449
  value,
1488
1450
  "data-slot": "toggle-group-item",
1489
- className: cn(
1451
+ className: chunkOQOBPYZT_cjs.cn(
1490
1452
  // whitespace-nowrap: 좁은 자리에서 항목 라벨이 한 글자씩 줄바꿈되지 않게 (2026-10-16 홀드아웃 6 schedule-list 지적)
1491
1453
  "inline-flex items-center justify-center gap-[4px] px-[12px] h-[32px] whitespace-nowrap",
1492
1454
  "text-base-medium leading-none transition-colors",
@@ -1505,62 +1467,12 @@ function ToggleGroupItem({
1505
1467
  }
1506
1468
  );
1507
1469
  }
1508
- var iconButtonVariants = classVarianceAuthority.cva(
1509
- "inline-flex items-center justify-center h-fit whitespace-nowrap text-h6 transition-colors hover:cursor-pointer disabled:pointer-events-none disabled:text-sys-button-disabled-text disabled:bg-sys-button-disabled-background",
1510
- {
1511
- variants: {
1512
- variant: {
1513
- primary: "bg-sys-button-primary-subtle-background text-sys-button-primary-subtle-text hover:bg-sys-button-primary-subtle-background-hover active:bg-sys-button-primary-subtle-background-press",
1514
- primaryBold: "bg-sys-button-primary-background text-sys-button-primary-text hover:bg-sys-button-primary-background-hover active:bg-sys-button-primary-background-press",
1515
- primaryLink: "text-sys-button-primary-link-text hover:text-sys-button-primary-link-text-hover active:text-sys-button-primary-link-text-press",
1516
- danger: "bg-sys-button-danger-subtle-background text-sys-button-danger-subtle-text hover:bg-sys-button-danger-subtle-background-hover active:bg-sys-button-danger-subtle-background-press",
1517
- dangerBold: "bg-sys-button-danger-background text-sys-button-danger-text hover:bg-sys-button-danger-background-hover active:bg-sys-button-danger-background-press",
1518
- dangerLink: "text-sys-button-danger-link-text hover:text-sys-button-danger-link-text-hover active:text-sys-button-danger-link-text-press",
1519
- secondary: "bg-sys-button-secondary-subtle-background text-sys-button-secondary-subtle-text hover:bg-sys-button-secondary-subtle-background-hover active:bg-sys-button-secondary-subtle-background-press",
1520
- secondaryBold: "bg-sys-button-secondary-background text-sys-button-secondary-text hover:bg-sys-button-secondary-background-hover active:bg-sys-button-secondary-background-press",
1521
- secondaryLink: "text-sys-button-secondary-link-text hover:text-sys-button-secondary-link-text-hover active:text-sys-button-secondary-link-text-press",
1522
- warning: "bg-sys-button-warning-subtle-background text-sys-button-warning-subtle-text hover:bg-sys-button-warning-subtle-background-hover active:bg-sys-button-warning-subtle-background-press",
1523
- warningBold: "bg-sys-button-warning-background text-sys-button-warning-text hover:bg-sys-button-warning-background-hover active:bg-sys-button-warning-background-press",
1524
- warningLink: "text-sys-button-warning-link-text hover:text-sys-button-warning-link-text-hover active:text-sys-button-warning-link-text-press",
1525
- outline: "border border-secondary30 text-sys-text-subtler text-base-medium"
1526
- },
1527
- spacing: {
1528
- normal: "p-[6px]",
1529
- compact: "p-[2px] max-h-[28px] max-w-[28px]"
1530
- },
1531
- shape: {
1532
- normal: "rounded-small",
1533
- rounded: "rounded-full"
1534
- }
1535
- },
1536
- defaultVariants: {
1537
- variant: "primary",
1538
- shape: "normal",
1539
- spacing: "normal"
1540
- }
1541
- }
1542
- );
1543
- var IconButton = React12__namespace.forwardRef(
1544
- ({ className, variant, shape, spacing, asChild = false, type, ...props }, ref) => {
1545
- const Comp = asChild ? reactSlot.Slot : "button";
1546
- return /* @__PURE__ */ jsxRuntime.jsx(
1547
- Comp,
1548
- {
1549
- className: cn(iconButtonVariants({ variant, shape, spacing }), className),
1550
- ref,
1551
- type: asChild ? type : type ?? "button",
1552
- ...props
1553
- }
1554
- );
1555
- }
1556
- );
1557
- IconButton.displayName = "IconButton";
1558
1470
  function Card({ className, ...props }) {
1559
1471
  return /* @__PURE__ */ jsxRuntime.jsx(
1560
1472
  "div",
1561
1473
  {
1562
1474
  "data-slot": "card",
1563
- className: cn(
1475
+ className: chunkOQOBPYZT_cjs.cn(
1564
1476
  "rounded-medium shadow-gray-small bg-sys-background flex flex-col border border-sys-divider-subtle",
1565
1477
  className
1566
1478
  ),
@@ -1573,7 +1485,7 @@ function CardHeader({ className, ...props }) {
1573
1485
  "div",
1574
1486
  {
1575
1487
  "data-slot": "card-header",
1576
- className: cn("flex flex-col px-[16px] gap-[8px]", className),
1488
+ className: chunkOQOBPYZT_cjs.cn("flex flex-col px-[16px] gap-[8px]", className),
1577
1489
  ...props
1578
1490
  }
1579
1491
  );
@@ -1583,7 +1495,7 @@ function CardTitle({ className, children, ...props }) {
1583
1495
  "div",
1584
1496
  {
1585
1497
  "data-slot": "card-title",
1586
- className: cn("text-sys-text-main text-h5 whitespace-pre-wrap", className),
1498
+ className: chunkOQOBPYZT_cjs.cn("text-sys-text-main text-h5 whitespace-pre-wrap", className),
1587
1499
  ...props,
1588
1500
  children: sanitizeUserText(children)
1589
1501
  }
@@ -1594,7 +1506,7 @@ function CardDescription({ className, children, ...props }) {
1594
1506
  "div",
1595
1507
  {
1596
1508
  "data-slot": "card-description",
1597
- className: cn("text-sys-text-subtler text-small-regular-h whitespace-pre-wrap", className),
1509
+ className: chunkOQOBPYZT_cjs.cn("text-sys-text-subtler text-small-regular-h whitespace-pre-wrap", className),
1598
1510
  ...props,
1599
1511
  children: sanitizeUserText(children)
1600
1512
  }
@@ -1605,7 +1517,7 @@ function CardContent({ className, ...props }) {
1605
1517
  "div",
1606
1518
  {
1607
1519
  "data-slot": "card-content",
1608
- className: cn("px-[16px] text-sys-text-subtler text-small-regular-h", className),
1520
+ className: chunkOQOBPYZT_cjs.cn("px-[16px] text-sys-text-subtler text-small-regular-h", className),
1609
1521
  ...props
1610
1522
  }
1611
1523
  );
@@ -1615,7 +1527,7 @@ function CardFooter({ className, ...props }) {
1615
1527
  "div",
1616
1528
  {
1617
1529
  "data-slot": "card-footer",
1618
- className: cn(
1530
+ className: chunkOQOBPYZT_cjs.cn(
1619
1531
  "flex items-center px-[16px] text-sys-text-subtle text-small-medium",
1620
1532
  className
1621
1533
  ),
@@ -1628,7 +1540,7 @@ function CardThumbnail({ className, ...props }) {
1628
1540
  "div",
1629
1541
  {
1630
1542
  "data-slot": "card-thumbnail",
1631
- className: cn("rounded-t-medium overflow-hidden", className),
1543
+ className: chunkOQOBPYZT_cjs.cn("rounded-t-medium overflow-hidden", className),
1632
1544
  ...props
1633
1545
  }
1634
1546
  );
@@ -1649,18 +1561,18 @@ var checkboxVariants = classVarianceAuthority.cva(
1649
1561
  defaultVariants
1650
1562
  }
1651
1563
  );
1652
- var Checkbox = React12__namespace.forwardRef(
1564
+ var Checkbox = React10__namespace.forwardRef(
1653
1565
  ({ className, size = defaultVariants.size, indeterminate = false, ...props }, ref) => {
1654
1566
  return /* @__PURE__ */ jsxRuntime.jsx(
1655
1567
  CheckboxPrimitive__namespace.Root,
1656
1568
  {
1657
1569
  ref,
1658
- className: cn(checkboxVariants({ size }), className),
1570
+ className: chunkOQOBPYZT_cjs.cn(checkboxVariants({ size }), className),
1659
1571
  ...props,
1660
1572
  children: /* @__PURE__ */ jsxRuntime.jsx(
1661
1573
  CheckboxPrimitive__namespace.Indicator,
1662
1574
  {
1663
- className: cn("flex items-center justify-center text-current"),
1575
+ className: chunkOQOBPYZT_cjs.cn("flex items-center justify-center text-current"),
1664
1576
  children: indeterminate ? /* @__PURE__ */ jsxRuntime.jsx(IndeterminateIcon, { size }) : /* @__PURE__ */ jsxRuntime.jsx(CheckIcon, { size })
1665
1577
  }
1666
1578
  )
@@ -1779,684 +1691,2245 @@ function IndeterminateIcon({ size }) {
1779
1691
  );
1780
1692
  }
1781
1693
  }
1782
- function useRestoreFocusToOpener({
1783
- onOpenAutoFocus,
1784
- onCloseAutoFocus
1694
+ function DropdownMenu({ ...props }) {
1695
+ return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Root, { "data-slot": "dropdown-menu", ...props });
1696
+ }
1697
+ function DropdownMenuPortal({
1698
+ ...props
1699
+ }) {
1700
+ return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { "data-slot": "dropdown-menu-portal", ...props });
1701
+ }
1702
+ function DropdownMenuTrigger({
1703
+ ...props
1704
+ }) {
1705
+ return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Trigger, { "data-slot": "dropdown-menu-trigger", ...props });
1706
+ }
1707
+ function DropdownMenuContent({
1708
+ className,
1709
+ sideOffset = 4,
1710
+ ...props
1711
+ }) {
1712
+ return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
1713
+ DropdownMenuPrimitive__namespace.Content,
1714
+ {
1715
+ "data-slot": "dropdown-menu-content",
1716
+ sideOffset,
1717
+ className: chunkOQOBPYZT_cjs.cn(
1718
+ "bg-sys-background text-base-regular",
1719
+ "overflow-x-hidden overflow-y-auto shadow-gray-small rounded-xsmall p-[4px] border border-sys-divider-subtler",
1720
+ "max-h-(--radix-dropdown-menu-content-available-height) ",
1721
+ "min-w-[200px] origin-(--radix-dropdown-menu-content-transform-origin)",
1722
+ "data-[state=open]:animate-[fade-in_150ms_ease-out,zoom-in_150ms_ease-out]",
1723
+ "data-[state=closed]:animate-[fade-out_150ms_ease-in,zoom-out_150ms_ease-in]",
1724
+ "data-[side=top]:animate-[slide-in-bottom_150ms_ease-out]",
1725
+ "data-[side=bottom]:animate-[slide-in-top_150ms_ease-out]",
1726
+ "data-[side=left]:animate-[slide-in-right_150ms_ease-out]",
1727
+ "data-[side=right]:animate-[slide-in-left_150ms_ease-out]",
1728
+ className
1729
+ ),
1730
+ ...props
1731
+ }
1732
+ ) });
1733
+ }
1734
+ function DropdownMenuGroup({ ...props }) {
1735
+ return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Group, { "data-slot": "dropdown-menu-group", ...props });
1736
+ }
1737
+ function DropdownMenuItem({
1738
+ className,
1739
+ variant = "default",
1740
+ keepOpen = false,
1741
+ onSelect,
1742
+ ...props
1785
1743
  }) {
1786
- const openerRef = React12.useRef(null);
1787
- const handleOpenAutoFocus = React12.useCallback(
1744
+ const handleSelect = React10__namespace.useCallback(
1788
1745
  (event) => {
1789
- openerRef.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
1790
- onOpenAutoFocus?.(event);
1746
+ onSelect?.(event);
1747
+ if (keepOpen) event.preventDefault();
1791
1748
  },
1792
- [onOpenAutoFocus]
1749
+ [onSelect, keepOpen]
1793
1750
  );
1794
- const handleCloseAutoFocus = React12.useCallback(
1795
- (event) => {
1796
- onCloseAutoFocus?.(event);
1797
- if (event.defaultPrevented) return;
1798
- const opener = openerRef.current;
1799
- if (!opener || opener === document.body || !opener.isConnected) return;
1800
- event.preventDefault();
1801
- opener.focus({ preventScroll: true });
1802
- },
1803
- [onCloseAutoFocus]
1751
+ return /* @__PURE__ */ jsxRuntime.jsx(
1752
+ DropdownMenuPrimitive__namespace.Item,
1753
+ {
1754
+ "data-slot": "dropdown-menu-item",
1755
+ "data-variant": variant,
1756
+ onSelect: handleSelect,
1757
+ className: chunkOQOBPYZT_cjs.cn(
1758
+ "relative flex cursor-default items-center gap-[12px] rounded-xsmall p-[6px] text-base-regular outline-hidden select-none",
1759
+ "data-[variant=danger]:text-danger30",
1760
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:size-[20px]",
1761
+ "focus:bg-secondary-o10",
1762
+ "data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1763
+ className
1764
+ ),
1765
+ ...props
1766
+ }
1804
1767
  );
1805
- return { onOpenAutoFocus: handleOpenAutoFocus, onCloseAutoFocus: handleCloseAutoFocus };
1806
1768
  }
1807
- var Dialog = DialogPrimitive__namespace.Root;
1808
- var DialogTrigger = DialogPrimitive__namespace.Trigger;
1809
- var DialogPortal = DialogPrimitive__namespace.Portal;
1810
- var DialogClose = DialogPrimitive__namespace.Close;
1811
- var DialogOverlay = React12__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1812
- DialogPrimitive__namespace.Overlay,
1813
- {
1814
- ...props,
1815
- ref,
1816
- className: cn(
1817
- "fixed inset-0 z-[var(--root-z-index)] bg-sys-blanket",
1818
- "data-[state=open]:animate-[fade-in_0ms_ease-out,zoom-in_0ms_ease-out]",
1819
- "data-[state=closed]:animate-[fade-out_0ms_ease-in,zoom-out_0ms_ease-in]",
1820
- className
1821
- )
1769
+ function DropdownMenuSeparator({
1770
+ className,
1771
+ ...props
1772
+ }) {
1773
+ return /* @__PURE__ */ jsxRuntime.jsx(
1774
+ DropdownMenuPrimitive__namespace.Separator,
1775
+ {
1776
+ "data-slot": "dropdown-menu-separator",
1777
+ className: chunkOQOBPYZT_cjs.cn("bg-sys-divider-subtle -mx-[1px] my-[1px] h-[1px]", className),
1778
+ ...props
1779
+ }
1780
+ );
1781
+ }
1782
+ function DropdownMenuSub({ ...props }) {
1783
+ return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Sub, { "data-slot": "dropdown-menu-sub", ...props });
1784
+ }
1785
+ function DropdownMenuSubTrigger({
1786
+ className,
1787
+ children,
1788
+ ...props
1789
+ }) {
1790
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1791
+ DropdownMenuPrimitive__namespace.SubTrigger,
1792
+ {
1793
+ "data-slot": "dropdown-menu-sub-trigger",
1794
+ className: chunkOQOBPYZT_cjs.cn(
1795
+ "relative flex cursor-default items-center gap-[12px] rounded-xsmall p-[6px] text-base-regular outline-hidden select-none",
1796
+ "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:size-[20px]",
1797
+ "focus:bg-secondary-o10",
1798
+ "data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1799
+ className
1800
+ ),
1801
+ ...props,
1802
+ children: [
1803
+ children,
1804
+ /* @__PURE__ */ jsxRuntime.jsx(lucide.ChevronRightIcon, { className: "ml-auto size-[20px]" })
1805
+ ]
1806
+ }
1807
+ );
1808
+ }
1809
+ function DropdownMenuSubContent({
1810
+ className,
1811
+ ...props
1812
+ }) {
1813
+ return /* @__PURE__ */ jsxRuntime.jsx(
1814
+ DropdownMenuPrimitive__namespace.SubContent,
1815
+ {
1816
+ "data-slot": "dropdown-menu-sub-content",
1817
+ className: chunkOQOBPYZT_cjs.cn(
1818
+ "bg-sys-background text-base-regular",
1819
+ "overflow-x-hidden overflow-y-auto z-[var(--root-z-index)] shadow-gray-small rounded-xsmall p-[4px] border border-sys-divider-subtler",
1820
+ "max-h-(--radix-dropdown-menu-content-available-height) ",
1821
+ "min-w-[200px] origin-(--radix-dropdown-menu-content-transform-origin)",
1822
+ "data-[state=open]:animate-[fade-in_150ms_ease-out,zoom-in_150ms_ease-out]",
1823
+ "data-[state=closed]:animate-[fade-out_150ms_ease-in,zoom-out_150ms_ease-in]",
1824
+ "data-[side=top]:animate-[slide-in-bottom_150ms_ease-out]",
1825
+ "data-[side=bottom]:animate-[slide-in-top_150ms_ease-out]",
1826
+ "data-[side=left]:animate-[slide-in-right_150ms_ease-out]",
1827
+ "data-[side=right]:animate-[slide-in-left_150ms_ease-out]",
1828
+ className
1829
+ ),
1830
+ ...props
1831
+ }
1832
+ );
1833
+ }
1834
+ var X_MASK = `url("data:image/svg+xml,${encodeURIComponent(
1835
+ '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>'
1836
+ )}")`;
1837
+ var CancelIcon = React10__namespace.forwardRef(
1838
+ ({ size = 20, className, iconClassName, ...props }, ref) => {
1839
+ let innerSize = Math.round(size * 0.75);
1840
+ if (size % 2 !== innerSize % 2) innerSize -= 1;
1841
+ return /* @__PURE__ */ jsxRuntime.jsx(
1842
+ "span",
1843
+ {
1844
+ ref,
1845
+ "aria-hidden": "true",
1846
+ className: chunkOQOBPYZT_cjs.cn(
1847
+ "inline-flex items-center justify-center align-middle rounded-full bg-current",
1848
+ className
1849
+ ),
1850
+ style: { width: size, height: size },
1851
+ ...props,
1852
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1853
+ "span",
1854
+ {
1855
+ className: chunkOQOBPYZT_cjs.cn("block bg-current text-sys-background", iconClassName),
1856
+ style: {
1857
+ width: innerSize,
1858
+ height: innerSize,
1859
+ maskImage: X_MASK,
1860
+ WebkitMaskImage: X_MASK,
1861
+ maskSize: "contain",
1862
+ WebkitMaskSize: "contain"
1863
+ }
1864
+ }
1865
+ )
1866
+ }
1867
+ );
1822
1868
  }
1823
- ));
1824
- DialogOverlay.displayName = DialogPrimitive__namespace.Overlay.displayName;
1825
- var dialogContentVariants = classVarianceAuthority.cva(null, {
1826
- variants: {
1827
- width: {
1828
- small: "w-[400px]",
1829
- medium: "w-[600px]",
1830
- large: "w-[800px]",
1831
- xlarge: "w-[1000px]"
1869
+ );
1870
+ CancelIcon.displayName = "CancelIcon";
1871
+ var CLEAR_HOST_CLASS = "group/clear-host";
1872
+ var CLEAR_REVEAL_CLASS = "opacity-0 group-hover/clear-host:opacity-100 group-focus-within/clear-host:opacity-100 [@media(hover:none)]:opacity-100";
1873
+ var tagVariants = classVarianceAuthority.cva(
1874
+ // whitespace-nowrap: 좁은 칸에서 태그 글자가 줄바꿈되지 않게 (2026-10-19 15차 D1, Badge 와 같은 규칙)
1875
+ "inline-flex items-center whitespace-nowrap py-[4px] text-small-bold gap-[4px] w-fit transition-colors",
1876
+ {
1877
+ variants: {
1878
+ variant: {
1879
+ primary: "bg-primary10 text-primary50",
1880
+ primaryBold: "bg-primary30 text-secondary10",
1881
+ secondary: "bg-secondary-o20 text-sys-text-main",
1882
+ secondaryBold: "bg-secondary60 text-secondary10",
1883
+ danger: "bg-danger10 text-danger50",
1884
+ dangerBold: "bg-danger30 text-secondary10",
1885
+ warning: "bg-warning10 text-warning50",
1886
+ warningBold: "bg-warning30 text-grayscale80",
1887
+ success: "bg-success10 text-success50",
1888
+ successBold: "bg-success30 text-secondary10",
1889
+ info: "bg-info10 text-info50",
1890
+ infoBold: "bg-info30 text-grayscale80",
1891
+ etc: "bg-etc10 text-etc50",
1892
+ etcBold: "bg-etc30 text-secondary10"
1893
+ },
1894
+ shape: {
1895
+ normal: "rounded-xsmall",
1896
+ rounded: "rounded-full"
1897
+ }
1898
+ },
1899
+ defaultVariants: {
1900
+ variant: "primary",
1901
+ shape: "normal"
1832
1902
  }
1833
- },
1834
- defaultVariants: {
1835
- width: "small"
1836
1903
  }
1837
- });
1838
- var DialogContent = React12__namespace.forwardRef(
1839
- ({
1840
- children,
1841
- className,
1842
- width,
1843
- overlayClassName,
1844
- hideCloseButton,
1845
- onOpenAutoFocus,
1846
- onCloseAutoFocus,
1847
- ...props
1848
- }, ref) => {
1849
- const focusHandlers = useRestoreFocusToOpener({ onOpenAutoFocus, onCloseAutoFocus });
1850
- return /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
1851
- /* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, { className: overlayClassName }),
1852
- /* @__PURE__ */ jsxRuntime.jsxs(
1853
- DialogPrimitive__namespace.Content,
1904
+ );
1905
+ var cancelIconXColor = {
1906
+ primary: "text-primary10",
1907
+ primaryBold: "text-primary30",
1908
+ secondary: "text-secondary-o20",
1909
+ secondaryBold: "text-secondary60",
1910
+ danger: "text-danger10",
1911
+ dangerBold: "text-danger30",
1912
+ warning: "text-warning10",
1913
+ warningBold: "text-warning30",
1914
+ success: "text-success10",
1915
+ successBold: "text-success30",
1916
+ info: "text-info10",
1917
+ infoBold: "text-info30",
1918
+ etc: "text-etc10",
1919
+ etcBold: "text-etc30"
1920
+ };
1921
+ var tagTextColor = {
1922
+ primary: "text-primary50",
1923
+ primaryBold: "text-secondary10",
1924
+ secondary: "text-sys-text-main",
1925
+ secondaryBold: "text-secondary10",
1926
+ danger: "text-danger50",
1927
+ dangerBold: "text-secondary10",
1928
+ warning: "text-warning50",
1929
+ warningBold: "text-grayscale80",
1930
+ success: "text-success50",
1931
+ successBold: "text-secondary10",
1932
+ info: "text-info50",
1933
+ infoBold: "text-grayscale80",
1934
+ etc: "text-etc50",
1935
+ etcBold: "text-secondary10"
1936
+ };
1937
+ var linkHoverBg = {
1938
+ primary: "hover:bg-[image:linear-gradient(var(--color-primary-o30),var(--color-primary-o30))]",
1939
+ primaryBold: "hover:bg-[image:linear-gradient(var(--color-primary-o30),var(--color-primary-o30))]",
1940
+ secondary: "hover:bg-secondary-o30",
1941
+ secondaryBold: "hover:bg-[image:linear-gradient(var(--color-secondary-o30),var(--color-secondary-o30))]",
1942
+ danger: "hover:bg-[image:linear-gradient(var(--color-danger-o30),var(--color-danger-o30))]",
1943
+ dangerBold: "hover:bg-[image:linear-gradient(var(--color-danger-o30),var(--color-danger-o30))]",
1944
+ warning: "hover:bg-[image:linear-gradient(var(--color-warning-o30),var(--color-warning-o30))]",
1945
+ warningBold: "hover:bg-[image:linear-gradient(var(--color-warning-o30),var(--color-warning-o30))]",
1946
+ success: "hover:bg-[image:linear-gradient(var(--color-success-o30),var(--color-success-o30))]",
1947
+ successBold: "hover:bg-[image:linear-gradient(var(--color-success-o30),var(--color-success-o30))]",
1948
+ info: "hover:bg-[image:linear-gradient(var(--color-info-o30),var(--color-info-o30))]",
1949
+ infoBold: "hover:bg-[image:linear-gradient(var(--color-info-o30),var(--color-info-o30))]",
1950
+ etc: "hover:bg-[image:linear-gradient(var(--color-etc-o30),var(--color-etc-o30))]",
1951
+ etcBold: "hover:bg-[image:linear-gradient(var(--color-etc-o30),var(--color-etc-o30))]"
1952
+ };
1953
+ var linkPressBg = {
1954
+ primary: "active:bg-[image:linear-gradient(var(--color-primary-o50),var(--color-primary-o50))]",
1955
+ primaryBold: "active:bg-[image:linear-gradient(var(--color-primary-o50),var(--color-primary-o50))]",
1956
+ secondary: "active:bg-secondary-o50",
1957
+ secondaryBold: "active:bg-[image:linear-gradient(var(--color-secondary-o50),var(--color-secondary-o50))]",
1958
+ danger: "active:bg-[image:linear-gradient(var(--color-danger-o50),var(--color-danger-o50))]",
1959
+ dangerBold: "active:bg-[image:linear-gradient(var(--color-danger-o50),var(--color-danger-o50))]",
1960
+ warning: "active:bg-[image:linear-gradient(var(--color-warning-o50),var(--color-warning-o50))]",
1961
+ warningBold: "active:bg-[image:linear-gradient(var(--color-warning-o50),var(--color-warning-o50))]",
1962
+ success: "active:bg-[image:linear-gradient(var(--color-success-o50),var(--color-success-o50))]",
1963
+ successBold: "active:bg-[image:linear-gradient(var(--color-success-o50),var(--color-success-o50))]",
1964
+ info: "active:bg-[image:linear-gradient(var(--color-info-o50),var(--color-info-o50))]",
1965
+ infoBold: "active:bg-[image:linear-gradient(var(--color-info-o50),var(--color-info-o50))]",
1966
+ etc: "active:bg-[image:linear-gradient(var(--color-etc-o50),var(--color-etc-o50))]",
1967
+ etcBold: "active:bg-[image:linear-gradient(var(--color-etc-o50),var(--color-etc-o50))]"
1968
+ };
1969
+ var linkHoverXColor = {
1970
+ primary: "group-hover/tag:bg-[image:linear-gradient(var(--color-primary-o30),var(--color-primary-o30))]",
1971
+ primaryBold: "group-hover/tag:bg-[image:linear-gradient(var(--color-primary-o30),var(--color-primary-o30))]",
1972
+ secondary: "group-hover/tag:text-secondary-o30",
1973
+ secondaryBold: "group-hover/tag:bg-[image:linear-gradient(var(--color-secondary-o30),var(--color-secondary-o30))]",
1974
+ danger: "group-hover/tag:bg-[image:linear-gradient(var(--color-danger-o30),var(--color-danger-o30))]",
1975
+ dangerBold: "group-hover/tag:bg-[image:linear-gradient(var(--color-danger-o30),var(--color-danger-o30))]",
1976
+ warning: "group-hover/tag:bg-[image:linear-gradient(var(--color-warning-o30),var(--color-warning-o30))]",
1977
+ warningBold: "group-hover/tag:bg-[image:linear-gradient(var(--color-warning-o30),var(--color-warning-o30))]",
1978
+ success: "group-hover/tag:bg-[image:linear-gradient(var(--color-success-o30),var(--color-success-o30))]",
1979
+ successBold: "group-hover/tag:bg-[image:linear-gradient(var(--color-success-o30),var(--color-success-o30))]",
1980
+ info: "group-hover/tag:bg-[image:linear-gradient(var(--color-info-o30),var(--color-info-o30))]",
1981
+ infoBold: "group-hover/tag:bg-[image:linear-gradient(var(--color-info-o30),var(--color-info-o30))]",
1982
+ etc: "group-hover/tag:bg-[image:linear-gradient(var(--color-etc-o30),var(--color-etc-o30))]",
1983
+ etcBold: "group-hover/tag:bg-[image:linear-gradient(var(--color-etc-o30),var(--color-etc-o30))]"
1984
+ };
1985
+ var linkPressXColor = {
1986
+ primary: "group-active/tag:bg-[image:linear-gradient(var(--color-primary-o50),var(--color-primary-o50))]",
1987
+ primaryBold: "group-active/tag:bg-[image:linear-gradient(var(--color-primary-o50),var(--color-primary-o50))]",
1988
+ secondary: "group-active/tag:text-secondary-o50",
1989
+ secondaryBold: "group-active/tag:bg-[image:linear-gradient(var(--color-secondary-o50),var(--color-secondary-o50))]",
1990
+ danger: "group-active/tag:bg-[image:linear-gradient(var(--color-danger-o50),var(--color-danger-o50))]",
1991
+ dangerBold: "group-active/tag:bg-[image:linear-gradient(var(--color-danger-o50),var(--color-danger-o50))]",
1992
+ warning: "group-active/tag:bg-[image:linear-gradient(var(--color-warning-o50),var(--color-warning-o50))]",
1993
+ warningBold: "group-active/tag:bg-[image:linear-gradient(var(--color-warning-o50),var(--color-warning-o50))]",
1994
+ success: "group-active/tag:bg-[image:linear-gradient(var(--color-success-o50),var(--color-success-o50))]",
1995
+ successBold: "group-active/tag:bg-[image:linear-gradient(var(--color-success-o50),var(--color-success-o50))]",
1996
+ info: "group-active/tag:bg-[image:linear-gradient(var(--color-info-o50),var(--color-info-o50))]",
1997
+ infoBold: "group-active/tag:bg-[image:linear-gradient(var(--color-info-o50),var(--color-info-o50))]",
1998
+ etc: "group-active/tag:bg-[image:linear-gradient(var(--color-etc-o50),var(--color-etc-o50))]",
1999
+ etcBold: "group-active/tag:bg-[image:linear-gradient(var(--color-etc-o50),var(--color-etc-o50))]"
2000
+ };
2001
+ function Tag({
2002
+ className,
2003
+ variant,
2004
+ shape,
2005
+ asChild = false,
2006
+ elemBefore,
2007
+ onRemove,
2008
+ removeLabel = "\uC0AD\uC81C",
2009
+ children,
2010
+ ...props
2011
+ }) {
2012
+ const Comp = asChild ? reactSlot.Slot : "div";
2013
+ const v = variant ?? "primary";
2014
+ const removeOutside = asChild && !!onRemove;
2015
+ const removeButton = onRemove && /* @__PURE__ */ jsxRuntime.jsx(
2016
+ "button",
2017
+ {
2018
+ type: "button",
2019
+ onClick: (e) => {
2020
+ e.preventDefault();
2021
+ e.stopPropagation();
2022
+ onRemove();
2023
+ },
2024
+ onKeyDown: (e) => {
2025
+ if (e.key === "Backspace" || e.key === "Delete") {
2026
+ e.preventDefault();
2027
+ onRemove();
2028
+ }
2029
+ },
2030
+ className: "absolute right-[4px] top-1/2 -translate-y-1/2 inline-flex items-center justify-center size-[16px] rounded-full focus-visible:outline-[2px] focus-visible:outline-sys-focus-ring-main focus-visible:outline-offset-[-1px] group/remove",
2031
+ "aria-label": removeLabel,
2032
+ children: /* @__PURE__ */ jsxRuntime.jsx(
2033
+ CancelIcon,
2034
+ {
2035
+ size: 14,
2036
+ iconClassName: chunkOQOBPYZT_cjs.cn(
2037
+ cancelIconXColor[v],
2038
+ asChild && [linkHoverXColor[v], linkPressXColor[v]],
2039
+ "group-hover/remove:bg-sys-background hover:group-hover/remove:bg-[image:linear-gradient(var(--color-danger-o10),var(--color-danger-o10))]",
2040
+ "group-active/remove:bg-sys-background active:group-active/remove:bg-[image:linear-gradient(var(--color-danger-o20),var(--color-danger-o20))]"
2041
+ )
2042
+ }
2043
+ )
2044
+ }
2045
+ );
2046
+ const tag = /* @__PURE__ */ jsxRuntime.jsxs(
2047
+ Comp,
2048
+ {
2049
+ className: chunkOQOBPYZT_cjs.cn(
2050
+ tagVariants({ variant, shape }),
2051
+ elemBefore ? "pl-[6px]" : "pl-[8px]",
2052
+ onRemove ? "pr-[24px]" : "pr-[8px]",
2053
+ onRemove && !removeOutside && "relative",
2054
+ asChild && [
2055
+ !removeOutside && "group/tag",
2056
+ "cursor-pointer hover:underline active:underline",
2057
+ "focus-visible:outline-[2px] focus-visible:outline-sys-focus-ring-main focus-visible:outline-offset-[1px] focus-visible:underline",
2058
+ linkHoverBg[v],
2059
+ linkPressBg[v]
2060
+ ],
2061
+ onRemove && "transition-colors",
2062
+ onRemove && !removeOutside && [
2063
+ "has-[button:hover]:bg-sys-background has-[button:hover]:bg-[image:linear-gradient(var(--color-danger-o10),var(--color-danger-o10))] has-[button:hover]:text-danger40",
2064
+ "active:has-[button:active]:bg-sys-background active:has-[button:active]:bg-[image:linear-gradient(var(--color-danger-o20),var(--color-danger-o20))] active:has-[button:active]:text-danger40"
2065
+ ],
2066
+ removeOutside && [
2067
+ "group-has-[button:hover]/tag:bg-sys-background group-has-[button:hover]/tag:bg-[image:linear-gradient(var(--color-danger-o10),var(--color-danger-o10))] group-has-[button:hover]/tag:text-danger40",
2068
+ "group-has-[button:active]/tag:bg-sys-background group-has-[button:active]/tag:bg-[image:linear-gradient(var(--color-danger-o20),var(--color-danger-o20))] group-has-[button:active]/tag:text-danger40"
2069
+ ],
2070
+ className
2071
+ ),
2072
+ ...props,
2073
+ children: [
2074
+ elemBefore && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 inline-flex items-center size-[16px]", children: elemBefore }),
2075
+ /* @__PURE__ */ jsxRuntime.jsx(reactSlot.Slottable, { children }),
2076
+ !removeOutside && removeButton
2077
+ ]
2078
+ }
2079
+ );
2080
+ if (removeOutside) {
2081
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2082
+ "span",
2083
+ {
2084
+ className: chunkOQOBPYZT_cjs.cn(
2085
+ "group/tag relative inline-flex w-fit",
2086
+ // 삭제 버튼(currentColor)이 태그 글자색을, 삭제 hover·press 시 danger 색을 따르게 한다
2087
+ tagTextColor[v],
2088
+ "has-[button:hover]:text-danger40 has-[button:active]:text-danger40"
2089
+ ),
2090
+ children: [
2091
+ tag,
2092
+ removeButton
2093
+ ]
2094
+ }
2095
+ );
2096
+ }
2097
+ return tag;
2098
+ }
2099
+ function getLabelColorClass(options) {
2100
+ const { isDisabled, isInvalid, isOpen, isFocused, hasValue } = options;
2101
+ if (isDisabled) return "text-sys-text-disabled";
2102
+ if (isInvalid) {
2103
+ if (hasValue || isOpen || isFocused) return "text-danger30";
2104
+ return "text-sys-text-placeholder";
2105
+ }
2106
+ if (isOpen || isFocused) return "text-sys-focus-ring-bold";
2107
+ if (hasValue) return "text-sys-text-subtler";
2108
+ return "text-sys-text-placeholder";
2109
+ }
2110
+ function getBorderColorClass(options) {
2111
+ const { isDisabled, isInvalid, isOpen, isFocused } = options;
2112
+ if (isDisabled) return "border-sys-divider-main";
2113
+ if (isInvalid) return "border-danger30";
2114
+ if (isOpen || isFocused) return "border-sys-focus-ring-bold";
2115
+ return "border-sys-divider-main";
2116
+ }
2117
+ function useFloatingLabel(options) {
2118
+ const {
2119
+ label,
2120
+ hasValue,
2121
+ isOpen = false,
2122
+ isFocused = false,
2123
+ isInvalid = false,
2124
+ isDisabled = false
2125
+ } = options;
2126
+ const hasLabel = !!label;
2127
+ const isFloating = hasValue || isOpen || isFocused;
2128
+ const [isMounted, setIsMounted] = React10__namespace.useState(false);
2129
+ React10__namespace.useEffect(() => {
2130
+ const id = requestAnimationFrame(() => setIsMounted(true));
2131
+ return () => cancelAnimationFrame(id);
2132
+ }, []);
2133
+ const labelId = React10__namespace.useId();
2134
+ const labelColorClass = getLabelColorClass({
2135
+ isDisabled,
2136
+ isInvalid,
2137
+ isOpen,
2138
+ isFocused,
2139
+ hasValue
2140
+ });
2141
+ const borderColorClass = getBorderColorClass({
2142
+ isDisabled,
2143
+ isInvalid,
2144
+ isOpen,
2145
+ isFocused
2146
+ });
2147
+ const isThickBorder = !!isInvalid || isOpen || isFocused;
2148
+ return {
2149
+ hasLabel,
2150
+ isFloating,
2151
+ isMounted,
2152
+ labelColorClass,
2153
+ borderColorClass,
2154
+ isThickBorder,
2155
+ labelId
2156
+ };
2157
+ }
2158
+ var Form = reactHookForm.FormProvider;
2159
+ var FormFieldContext = React10__namespace.createContext({});
2160
+ var FormField = ({
2161
+ ...props
2162
+ }) => {
2163
+ return /* @__PURE__ */ jsxRuntime.jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsxRuntime.jsx(reactHookForm.Controller, { ...props }) });
2164
+ };
2165
+ var useFormField = () => {
2166
+ const fieldContext = React10__namespace.useContext(FormFieldContext);
2167
+ const itemContext = React10__namespace.useContext(FormItemContext);
2168
+ const { getFieldState, formState } = reactHookForm.useFormContext();
2169
+ const fieldState = getFieldState(fieldContext.name, formState);
2170
+ if (!fieldContext) {
2171
+ throw new Error("useFormField should be used within <FormField>");
2172
+ }
2173
+ const { id } = itemContext;
2174
+ return {
2175
+ id,
2176
+ name: fieldContext.name,
2177
+ formItemId: `${id}-form-item`,
2178
+ formDescriptionId: `${id}-form-item-description`,
2179
+ formMessageId: `${id}-form-item-message`,
2180
+ ...fieldState
2181
+ };
2182
+ };
2183
+ var FormItemContext = React10__namespace.createContext({});
2184
+ var FormItem = React10__namespace.forwardRef(
2185
+ ({ className, ...props }, ref) => {
2186
+ const id = React10__namespace.useId();
2187
+ return /* @__PURE__ */ jsxRuntime.jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: chunkOQOBPYZT_cjs.cn("space-y-[4px]", className), ...props }) });
2188
+ }
2189
+ );
2190
+ FormItem.displayName = "FormItem";
2191
+ var FormLabel = React10__namespace.forwardRef(({ className, required, ...props }, ref) => {
2192
+ const { error, formItemId } = useFormField();
2193
+ if (required) {
2194
+ return /* @__PURE__ */ jsxRuntime.jsxs(Stack, { direction: "row", justifyContent: "start", children: [
2195
+ /* @__PURE__ */ jsxRuntime.jsx(
2196
+ "label",
1854
2197
  {
1855
2198
  ref,
1856
- ...focusHandlers,
1857
- className: cn(
1858
- "fixed left-[50%] top-[50%] z-[var(--root-z-index)] translate-x-[-50%] translate-y-[-50%] w-full max-w-[70vw]",
1859
- "flex flex-col gap-[16px] rounded-medium bg-sys-background p-[32px] shadow-gray-medium duration-200",
1860
- "data-[state=open]:animate-[fade-in_0ms_ease-out,zoom-in_0ms_ease-out]",
1861
- "data-[state=closed]:animate-[fade-out_0ms_ease-in,zoom-out_0ms_ease-in]",
1862
- dialogContentVariants({ width }),
2199
+ className: chunkOQOBPYZT_cjs.cn(
2200
+ error && "text-destructive",
2201
+ "inline-block text-sys-text-subtle text-base-medium",
1863
2202
  className
1864
2203
  ),
1865
- ...props,
1866
- children: [
1867
- children,
1868
- !hideCloseButton && /* @__PURE__ */ jsxRuntime.jsx(
1869
- IconButton,
1870
- {
1871
- asChild: true,
1872
- variant: "secondaryLink",
1873
- className: cn("absolute right-[32px] top-[32px]"),
1874
- children: /* @__PURE__ */ jsxRuntime.jsxs(DialogPrimitive__namespace.Close, { children: [
1875
- /* @__PURE__ */ jsxRuntime.jsx(lucide.X, {}),
1876
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only a11y", children: "Close" })
1877
- ] })
1878
- }
1879
- )
1880
- ]
2204
+ htmlFor: formItemId,
2205
+ ...props
1881
2206
  }
1882
- )
2207
+ ),
2208
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base-medium text-danger30", children: "*" })
1883
2209
  ] });
1884
2210
  }
1885
- );
1886
- DialogContent.displayName = DialogPrimitive__namespace.Content.displayName;
1887
- var DialogHeader = (props) => /* @__PURE__ */ jsxRuntime.jsx(
1888
- "div",
1889
- {
1890
- ...props,
1891
- className: cn("flex flex-col gap-[16px] text-center sm:text-left", props.className)
1892
- }
1893
- );
1894
- DialogHeader.displayName = "DialogHeader";
1895
- var DialogFooter = (props) => /* @__PURE__ */ jsxRuntime.jsx(
1896
- "div",
1897
- {
1898
- ...props,
1899
- className: cn("flex flex-col-reverse gap-[8px] sm:flex-row sm:justify-end", props.className)
2211
+ return /* @__PURE__ */ jsxRuntime.jsx(
2212
+ "label",
2213
+ {
2214
+ ref,
2215
+ className: chunkOQOBPYZT_cjs.cn(
2216
+ error && "text-destructive",
2217
+ "inline-block text-sys-text-subtle text-base-medium",
2218
+ className
2219
+ ),
2220
+ htmlFor: formItemId,
2221
+ ...props
2222
+ }
2223
+ );
2224
+ });
2225
+ FormLabel.displayName = "FormLabel";
2226
+ var FormControlContext = React10__namespace.createContext(null);
2227
+ var useFormControlContext = () => React10__namespace.useContext(FormControlContext);
2228
+ var formControlVariants = classVarianceAuthority.cva("", {
2229
+ variants: {
2230
+ maxWidth: {
2231
+ default: "max-w-[var(--max-w-form-control)]",
2232
+ narrow: "max-w-[var(--max-w-form-control-narrow)]",
2233
+ full: ""
2234
+ }
2235
+ },
2236
+ defaultVariants: {
2237
+ maxWidth: "default"
1900
2238
  }
1901
- );
1902
- DialogFooter.displayName = "DialogFooter";
1903
- var variantToIcon = {
1904
- normal: null,
1905
- success: /* @__PURE__ */ jsxRuntime.jsx(lucide.CircleCheck, { className: "text-success30" }),
1906
- info: /* @__PURE__ */ jsxRuntime.jsx(lucide.Info, { className: "text-sys-text-subtler" }),
1907
- warning: /* @__PURE__ */ jsxRuntime.jsx(lucide.TriangleAlert, { className: "text-critical30" }),
1908
- danger: /* @__PURE__ */ jsxRuntime.jsx(lucide.CircleX, { className: "text-danger30" })
1909
- };
1910
- var DialogTitle = React12__namespace.forwardRef(({ variant, children, ...props }, ref) => {
1911
- if (variant) {
1912
- return /* @__PURE__ */ jsxRuntime.jsxs(Stack, { spacing: 8, children: [
1913
- variantToIcon[variant],
2239
+ });
2240
+ var FormControl = React10__namespace.forwardRef(({ className, maxWidth, ...props }, ref) => {
2241
+ const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
2242
+ const isInvalid = !!error;
2243
+ return /* @__PURE__ */ jsxRuntime.jsx(FormControlContext.Provider, { value: { isInvalid }, children: /* @__PURE__ */ jsxRuntime.jsx(
2244
+ reactSlot.Slot,
2245
+ {
2246
+ ref,
2247
+ id: formItemId,
2248
+ className: chunkOQOBPYZT_cjs.cn(formControlVariants({ maxWidth }), className),
2249
+ "aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
2250
+ "aria-invalid": isInvalid,
2251
+ ...props
2252
+ }
2253
+ ) });
2254
+ });
2255
+ FormControl.displayName = "FormControl";
2256
+ var FormDescription = React10__namespace.forwardRef(
2257
+ ({ className, icon = true, ...props }, ref) => {
2258
+ const { formDescriptionId, error } = useFormField();
2259
+ if (error) return null;
2260
+ return /* @__PURE__ */ jsxRuntime.jsxs(Stack, { spacing: 5, className: "pt-[2px]", children: [
2261
+ icon ? /* @__PURE__ */ jsxRuntime.jsx(lucide.Info, { size: 16, "aria-hidden": true, className: "text-sys-text-subtle" }) : null,
1914
2262
  /* @__PURE__ */ jsxRuntime.jsx(
1915
- DialogPrimitive__namespace.Title,
2263
+ "p",
1916
2264
  {
1917
- ...props,
1918
2265
  ref,
1919
- className: cn("text-h4 text-sys-text-main whitespace-pre-wrap", props.className),
1920
- children: sanitizeUserText(children)
2266
+ id: formDescriptionId,
2267
+ className: chunkOQOBPYZT_cjs.cn("text-small-regular text-sys-text-subtle", className),
2268
+ ...props
1921
2269
  }
1922
2270
  )
1923
2271
  ] });
1924
- } else {
1925
- return /* @__PURE__ */ jsxRuntime.jsx(
1926
- DialogPrimitive__namespace.Title,
2272
+ }
2273
+ );
2274
+ FormDescription.displayName = "FormDescription";
2275
+ var FormMessage = React10__namespace.forwardRef(({ className, children, ...props }, ref) => {
2276
+ const { error, formMessageId } = useFormField();
2277
+ const body = error ? String(error?.message ?? "") : children;
2278
+ if (!body) {
2279
+ return null;
2280
+ }
2281
+ return /* @__PURE__ */ jsxRuntime.jsxs(Stack, { spacing: 5, className: "pt-[2px]", children: [
2282
+ /* @__PURE__ */ jsxRuntime.jsx(lucide.TriangleAlert, { size: 16, className: "text-danger30" }),
2283
+ /* @__PURE__ */ jsxRuntime.jsx(
2284
+ "p",
1927
2285
  {
1928
- ...props,
1929
2286
  ref,
1930
- className: cn("text-h4 text-sys-text-main whitespace-pre-wrap", props.className),
1931
- children: sanitizeUserText(children)
2287
+ id: formMessageId,
2288
+ className: chunkOQOBPYZT_cjs.cn("text-small-regular text-danger30", className),
2289
+ ...props,
2290
+ children: body
1932
2291
  }
1933
- );
2292
+ )
2293
+ ] });
2294
+ });
2295
+ FormMessage.displayName = "FormMessage";
2296
+ var FormValidMessage = React10__namespace.forwardRef(({ className, children, ...props }, ref) => {
2297
+ if (!children) {
2298
+ return null;
1934
2299
  }
2300
+ return /* @__PURE__ */ jsxRuntime.jsxs(Stack, { spacing: 5, className: "pt-[2px]", children: [
2301
+ /* @__PURE__ */ jsxRuntime.jsx(lucide.Check, { size: 16, className: "text-success30" }),
2302
+ /* @__PURE__ */ jsxRuntime.jsx("p", { ref, className: chunkOQOBPYZT_cjs.cn("text-small-regular text-success30", className), ...props, children })
2303
+ ] });
1935
2304
  });
1936
- DialogTitle.displayName = DialogPrimitive__namespace.Title.displayName;
1937
- var DialogDescription = React12__namespace.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1938
- DialogPrimitive__namespace.Description,
1939
- {
1940
- ...props,
1941
- ref,
1942
- className: cn("text-base-regular text-sys-text-main whitespace-pre-wrap", props.className),
1943
- children: sanitizeUserText(children)
2305
+ FormValidMessage.displayName = "FormValidMessage";
2306
+ var FormHeader = React10__namespace.forwardRef(
2307
+ ({ className, title, description, children, ...props }, ref) => {
2308
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2309
+ "div",
2310
+ {
2311
+ ref,
2312
+ className: chunkOQOBPYZT_cjs.cn("flex flex-col gap-[2px] items-start w-full", className),
2313
+ ...props,
2314
+ children: [
2315
+ title && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-h4 text-sys-text-main w-full", children: title }),
2316
+ description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-base-regular text-sys-text-main", children: description }),
2317
+ children
2318
+ ]
2319
+ }
2320
+ );
1944
2321
  }
1945
- ));
1946
- DialogDescription.displayName = DialogPrimitive__namespace.Description.displayName;
1947
- var Separator = React12__namespace.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1948
- SeparatorPrimitive__namespace.Root,
1949
- {
1950
- ref,
1951
- decorative,
1952
- orientation,
1953
- className: cn(
1954
- "shrink-0 bg-sys-divider-subtle",
1955
- orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
1956
- className
1957
- ),
1958
- ...props
2322
+ );
2323
+ FormHeader.displayName = "FormHeader";
2324
+ var FormSectionLevelContext = React10__namespace.createContext(3);
2325
+ var FormSection = React10__namespace.forwardRef(
2326
+ ({ className, title, level, children, ...props }, ref) => {
2327
+ const contextLevel = React10__namespace.useContext(FormSectionLevelContext);
2328
+ const Heading = (level ?? contextLevel) === 2 ? "h2" : "h3";
2329
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2330
+ "div",
2331
+ {
2332
+ ref,
2333
+ className: chunkOQOBPYZT_cjs.cn(
2334
+ // 섹션 사이 간격 48px 를 구분선 위아래 24px 씩으로 나눈다 (2026-10-13: 앞 섹션의 설명 글줄이 선에 붙어 있었다)
2335
+ // 필드 사이 16(한 묶음 안) — 섹션 사이 48(pt-24+pb-24)과 구분되는 단계. 2026-10-17 8차 D2
2336
+ "flex flex-col gap-[16px] w-full pt-[24px]",
2337
+ // 부모 컨테이너 안에서 자기가 첫 자식이면 (= FormHeader 같은 형제가 앞에 없으면)
2338
+ // 16px 의 상단 여백만 둔다 (컨테이너 상단 과공백 방지). FormHeader 가 앞에 있으면 :first-child 가 아니므로 pt-[24px] + 선.
2339
+ "first:pt-[16px]",
2340
+ // 마지막 섹션 아래에는 여백이 없다 (푸터 버튼 줄이 자기 간격을 가진다)
2341
+ "[&:not(:last-child)]:pb-[24px]",
2342
+ // 섹션 사이에 연한 가로 구분선 (2026-10-12 블라인드 평가: 구획이 없으면 "제목뿐" 으로 읽혔다). 첫 섹션 위에는 없다
2343
+ "[&:not(:first-child)]:border-t [&:not(:first-child)]:border-sys-divider-subtle",
2344
+ className
2345
+ ),
2346
+ ...props,
2347
+ children: [
2348
+ title && /* @__PURE__ */ jsxRuntime.jsx(Heading, { className: "text-h4 text-sys-text-main w-full", children: title }),
2349
+ children
2350
+ ]
2351
+ }
2352
+ );
1959
2353
  }
1960
- ));
1961
- Separator.displayName = SeparatorPrimitive__namespace.Root.displayName;
1962
- var DrawerModalContext = React12__namespace.createContext(true);
1963
- var Drawer = ({ modal = true, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(DrawerModalContext.Provider, { value: modal, children: /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Root, { modal, ...props }) });
1964
- Drawer.displayName = "Drawer";
1965
- var DrawerTrigger = DialogPrimitive__namespace.Trigger;
1966
- var DrawerClose = DialogPrimitive__namespace.Close;
1967
- var DrawerPortal = DialogPrimitive__namespace.Portal;
1968
- var DrawerOverlay = React12__namespace.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
1969
- DialogPrimitive__namespace.Overlay,
1970
- {
1971
- ...props,
1972
- className: cn(
1973
- "fixed inset-0 z-[var(--root-z-index)] bg-sys-blanket",
1974
- "data-[state=open]:animate-fade-in",
1975
- "data-[state=closed]:animate-fade-out",
1976
- props.className
1977
- ),
1978
- ref
2354
+ );
2355
+ FormSection.displayName = "FormSection";
2356
+ var formFooterVariants = classVarianceAuthority.cva("flex flex-col justify-end overflow-clip pt-[48px] w-full", {
2357
+ variants: {
2358
+ align: {
2359
+ start: "items-start",
2360
+ end: "items-end",
2361
+ center: "items-center",
2362
+ stretch: "items-stretch"
2363
+ }
2364
+ },
2365
+ defaultVariants: {
2366
+ align: "end"
1979
2367
  }
1980
- ));
1981
- DrawerOverlay.displayName = DialogPrimitive__namespace.Overlay.displayName;
1982
- var sheetVariants = classVarianceAuthority.cva(
1983
- "fixed z-[var(--root-z-index)] flex flex-col overflow-hidden bg-sys-background shadow-gray-medium",
2368
+ });
2369
+ var FormFooter = React10__namespace.forwardRef(
2370
+ ({ className, align, children, ...props }, ref) => {
2371
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: chunkOQOBPYZT_cjs.cn(formFooterVariants({ align }), className), ...props, children });
2372
+ }
2373
+ );
2374
+ FormFooter.displayName = "FormFooter";
2375
+ function FloatingLabelOutline({
2376
+ mode,
2377
+ label,
2378
+ required,
2379
+ isFloating,
2380
+ isMounted,
2381
+ labelColorClass,
2382
+ borderColorClass,
2383
+ isThickBorder,
2384
+ labelId
2385
+ }) {
2386
+ const transitionClass = chunkOQOBPYZT_cjs.cn(
2387
+ isMounted && "transition-[top,translate,scale,color] duration-150 ease-[cubic-bezier(0.4,0,0.2,1)]",
2388
+ "motion-reduce:transition-none"
2389
+ );
2390
+ if (mode === "standard") {
2391
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2392
+ "div",
2393
+ {
2394
+ className: "pointer-events-none absolute inset-0 flex rounded-small",
2395
+ "data-slot": "notched-outline",
2396
+ children: [
2397
+ /* @__PURE__ */ jsxRuntime.jsx(
2398
+ "span",
2399
+ {
2400
+ className: chunkOQOBPYZT_cjs.cn(
2401
+ "h-full w-[8px] rounded-l-small",
2402
+ borderColorClass,
2403
+ isThickBorder ? "border-t-[2px] border-b-[2px] border-l-[2px] border-r-0" : "border-t border-b border-l border-r-0"
2404
+ )
2405
+ }
2406
+ ),
2407
+ /* @__PURE__ */ jsxRuntime.jsxs(
2408
+ "span",
2409
+ {
2410
+ className: chunkOQOBPYZT_cjs.cn(
2411
+ "h-full relative",
2412
+ borderColorClass,
2413
+ isThickBorder ? "border-t-[2px] border-b-[2px] border-l-0 border-r-0" : "border-t border-b border-l-0 border-r-0",
2414
+ isFloating && "!border-t-transparent",
2415
+ isMounted && "transition-[border-top-color] duration-150 ease-[cubic-bezier(0.4,0,0.2,1)]",
2416
+ "motion-reduce:transition-none"
2417
+ ),
2418
+ children: [
2419
+ /* @__PURE__ */ jsxRuntime.jsxs(
2420
+ "span",
2421
+ {
2422
+ className: "invisible text-small-medium px-[2px] leading-none whitespace-nowrap",
2423
+ "aria-hidden": "true",
2424
+ children: [
2425
+ label,
2426
+ required && "*"
2427
+ ]
2428
+ }
2429
+ ),
2430
+ /* @__PURE__ */ jsxRuntime.jsxs(
2431
+ "span",
2432
+ {
2433
+ id: labelId,
2434
+ "data-slot": "floating-label",
2435
+ "data-floating": isFloating,
2436
+ className: chunkOQOBPYZT_cjs.cn(
2437
+ "absolute left-0 px-[2px] whitespace-nowrap origin-left",
2438
+ "text-small-medium leading-none -translate-y-1/2",
2439
+ isFloating ? chunkOQOBPYZT_cjs.cn("scale-100 -top-[2px]", isThickBorder && "-mt-[1px]") : "top-[min(50%,18px)] scale-[1.167]",
2440
+ labelColorClass,
2441
+ transitionClass
2442
+ ),
2443
+ children: [
2444
+ label,
2445
+ required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-danger30 ml-[1px]", "aria-hidden": "true", children: "*" })
2446
+ ]
2447
+ }
2448
+ )
2449
+ ]
2450
+ }
2451
+ ),
2452
+ /* @__PURE__ */ jsxRuntime.jsx(
2453
+ "span",
2454
+ {
2455
+ className: chunkOQOBPYZT_cjs.cn(
2456
+ "h-full flex-1 rounded-r-small",
2457
+ borderColorClass,
2458
+ isThickBorder ? "border-t-[2px] border-b-[2px] border-r-[2px] border-l-0" : "border-t border-b border-r border-l-0"
2459
+ )
2460
+ }
2461
+ )
2462
+ ]
2463
+ }
2464
+ );
2465
+ }
2466
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2467
+ "span",
2468
+ {
2469
+ id: labelId,
2470
+ "data-slot": "floating-label",
2471
+ "data-floating": isFloating,
2472
+ className: chunkOQOBPYZT_cjs.cn(
2473
+ "absolute left-[8px] pointer-events-none origin-left z-10",
2474
+ "text-small-medium leading-none whitespace-nowrap -translate-y-1/2",
2475
+ isFloating ? "-top-[2px] scale-100" : "top-[min(50%,18px)] scale-[1.167]",
2476
+ labelColorClass,
2477
+ transitionClass
2478
+ ),
2479
+ children: [
2480
+ label,
2481
+ required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-danger30 ml-[1px]", "aria-hidden": "true", children: "*" })
2482
+ ]
2483
+ }
2484
+ );
2485
+ }
2486
+ var textareaContainerVariants = classVarianceAuthority.cva(
2487
+ [
2488
+ "flex w-full items-start bg-transparent",
2489
+ "rounded-small min-h-[84px] text-base-medium text-sys-text-main",
2490
+ "transition-colors"
2491
+ ].join(" "),
1984
2492
  {
1985
2493
  variants: {
1986
- side: {
1987
- top: [
1988
- "inset-x-0 top-0 bottom-auto",
1989
- "data-[state=open]:animate-slide-in-from-top",
1990
- "data-[state=closed]:animate-slide-out-to-top"
1991
- ],
1992
- bottom: [
1993
- "inset-x-0 bottom-0 top-auto",
1994
- "data-[state=open]:animate-slide-in-from-bottom",
1995
- "data-[state=closed]:animate-slide-out-to-bottom"
1996
- ],
1997
- left: [
1998
- "inset-y-0 left-0 right-auto h-full",
1999
- "data-[state=open]:animate-slide-in-from-left",
2000
- "data-[state=closed]:animate-slide-out-to-left"
2001
- ],
2002
- right: [
2003
- "inset-y-0 right-0 left-auto h-full",
2004
- "data-[state=open]:animate-slide-in-from-right",
2005
- "data-[state=closed]:animate-slide-out-to-right"
2006
- ]
2494
+ appearance: {
2495
+ standard: [
2496
+ "bg-sys-background border border-sys-divider-main py-[3px] px-[5px]",
2497
+ "hover:bg-secondary-o10"
2498
+ ].join(" "),
2499
+ none: "bg-transparent border-none py-[4px] px-[6px]"
2007
2500
  },
2008
- size: {
2009
- small: "w-[360px] max-w-[70vw]",
2010
- medium: "w-[480px] max-w-[70vw]",
2011
- large: "w-[720px] max-w-[70vw]",
2012
- xLarge: "w-[1080px] max-w-[70vw]"
2501
+ isInvalid: {
2502
+ true: "",
2503
+ false: ""
2013
2504
  }
2014
2505
  },
2506
+ compoundVariants: [
2507
+ {
2508
+ appearance: "standard",
2509
+ isInvalid: true,
2510
+ class: "border-[2px] border-danger30 py-[2px] px-[4px]"
2511
+ }
2512
+ ],
2015
2513
  defaultVariants: {
2016
- side: "right",
2017
- size: "large"
2514
+ appearance: "standard",
2515
+ isInvalid: false
2018
2516
  }
2019
2517
  }
2020
2518
  );
2021
- var DrawerContent = React12__namespace.forwardRef(
2022
- ({ side, size, children, onOpenAutoFocus, onCloseAutoFocus, onInteractOutside, ...props }, ref) => {
2023
- const focusHandlers = useRestoreFocusToOpener({ onOpenAutoFocus, onCloseAutoFocus });
2024
- const modal = React12__namespace.useContext(DrawerModalContext);
2025
- return /* @__PURE__ */ jsxRuntime.jsxs(DrawerPortal, { children: [
2026
- modal ? /* @__PURE__ */ jsxRuntime.jsx(DrawerOverlay, {}) : null,
2027
- /* @__PURE__ */ jsxRuntime.jsxs(
2028
- DialogPrimitive__namespace.Content,
2029
- {
2030
- ...props,
2031
- ...focusHandlers,
2032
- onInteractOutside: (e) => {
2033
- onInteractOutside?.(e);
2034
- if (!modal && !e.defaultPrevented) e.preventDefault();
2035
- },
2036
- ref,
2037
- className: cn(
2038
- sheetVariants({ side, size }),
2039
- !modal && "border-l border-sys-border-subtle shadow-none",
2040
- props.className
2519
+ var Textarea = React10__namespace.forwardRef(
2520
+ ({
2521
+ appearance = "standard",
2522
+ label,
2523
+ required: requiredProp,
2524
+ isInvalid: isInvalidProp,
2525
+ containerClassName,
2526
+ className,
2527
+ disabled,
2528
+ readOnly,
2529
+ resize = false,
2530
+ minRows = 3,
2531
+ maxRows,
2532
+ value: valueProp,
2533
+ defaultValue,
2534
+ onChange: onChangeProp,
2535
+ onFocus: onFocusProp,
2536
+ onBlur: onBlurProp,
2537
+ style,
2538
+ ...textareaProps
2539
+ }, forwardedRef) => {
2540
+ const formControl = useFormControlContext();
2541
+ const isInvalid = isInvalidProp ?? formControl?.isInvalid ?? false;
2542
+ const textareaRef = React10__namespace.useRef(null);
2543
+ const [isFocused, setIsFocused] = React10__namespace.useState(false);
2544
+ const isControlled = valueProp !== void 0;
2545
+ const [internalValue, setInternalValue] = React10__namespace.useState(
2546
+ defaultValue !== void 0 ? String(defaultValue) : ""
2547
+ );
2548
+ const hasValue = isControlled ? String(valueProp) !== "" : internalValue !== "";
2549
+ const composedRef = React10__namespace.useCallback(
2550
+ (node) => {
2551
+ textareaRef.current = node;
2552
+ if (typeof forwardedRef === "function") forwardedRef(node);
2553
+ else if (forwardedRef)
2554
+ forwardedRef.current = node;
2555
+ },
2556
+ [forwardedRef]
2557
+ );
2558
+ const {
2559
+ hasLabel,
2560
+ isFloating,
2561
+ isMounted,
2562
+ labelColorClass,
2563
+ borderColorClass,
2564
+ isThickBorder,
2565
+ labelId
2566
+ } = useFloatingLabel({
2567
+ label,
2568
+ hasValue,
2569
+ isFocused,
2570
+ isInvalid: !!isInvalid,
2571
+ isDisabled: !!disabled});
2572
+ const showNotchedOutline = hasLabel && appearance !== "none";
2573
+ const showNoneLabel = hasLabel && appearance === "none";
2574
+ const handleChange = React10__namespace.useCallback(
2575
+ (e) => {
2576
+ if (!isControlled) setInternalValue(e.target.value);
2577
+ onChangeProp?.(e);
2578
+ },
2579
+ [isControlled, onChangeProp]
2580
+ );
2581
+ const handleFocus = React10__namespace.useCallback(
2582
+ (e) => {
2583
+ setIsFocused(true);
2584
+ onFocusProp?.(e);
2585
+ },
2586
+ [onFocusProp]
2587
+ );
2588
+ const handleBlur = React10__namespace.useCallback(
2589
+ (e) => {
2590
+ setIsFocused(false);
2591
+ onBlurProp?.(e);
2592
+ },
2593
+ [onBlurProp]
2594
+ );
2595
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2596
+ "div",
2597
+ {
2598
+ "data-slot": "textarea",
2599
+ "aria-disabled": disabled || void 0,
2600
+ className: chunkOQOBPYZT_cjs.cn(
2601
+ textareaContainerVariants({ appearance, isInvalid }),
2602
+ // Focus styling (state-managed, standard appearance without notched outline only)
2603
+ isFocused && !isInvalid && appearance === "standard" && !showNotchedOutline && "border-[2px] border-sys-focus-ring-bold py-[2px] px-[4px]",
2604
+ // Floating label positioning
2605
+ (showNotchedOutline || showNoneLabel) && "relative",
2606
+ // Notched outline draws border — remove container's own border
2607
+ showNotchedOutline && "!border-0 !py-[4px] !px-[6px]",
2608
+ // Disabled / cursor
2609
+ disabled ? "cursor-not-allowed opacity-50" : "cursor-text",
2610
+ // disabled 시 hover 배경 무력화 (div container라 :disabled 불가 → JS 조건부; none은 원래 hover bg 없음)
2611
+ disabled && appearance !== "none" && "hover:bg-sys-background",
2612
+ containerClassName,
2613
+ // 외부 className 은 root container 에 적용 — FormControl 의 maxWidth 가
2614
+ // 자식 className 에 inject 되는데, wrapper div 의 폭 제어가 의도이므로
2615
+ // inner textarea 가 아닌 여기에 머지한다.
2616
+ className
2617
+ ),
2618
+ style: {
2619
+ resize: resize ? "vertical" : "none",
2620
+ overflow: resize ? "hidden" : void 0
2621
+ },
2622
+ children: [
2623
+ (showNotchedOutline || showNoneLabel) && /* @__PURE__ */ jsxRuntime.jsx(
2624
+ FloatingLabelOutline,
2625
+ {
2626
+ mode: showNotchedOutline ? "standard" : "none",
2627
+ label,
2628
+ required: requiredProp,
2629
+ isFloating,
2630
+ isMounted,
2631
+ labelColorClass,
2632
+ borderColorClass,
2633
+ isThickBorder,
2634
+ labelId
2635
+ }
2041
2636
  ),
2042
- children: [
2043
- /* @__PURE__ */ jsxRuntime.jsxs(
2044
- DialogPrimitive__namespace.Close,
2045
- {
2046
- className: cn("absolute right-[24px] top-[24px] disabled:pointer-events-none"),
2047
- children: [
2048
- /* @__PURE__ */ jsxRuntime.jsx(lucide.X, { size: 24 }),
2049
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only a11y", children: "Close" })
2050
- ]
2051
- }
2052
- ),
2053
- children
2054
- ]
2055
- }
2056
- )
2057
- ] });
2637
+ /* @__PURE__ */ jsxRuntime.jsx(
2638
+ TextareaAutosize__default.default,
2639
+ {
2640
+ ref: composedRef,
2641
+ minRows,
2642
+ maxRows,
2643
+ disabled,
2644
+ readOnly,
2645
+ value: isControlled ? valueProp : void 0,
2646
+ defaultValue: !isControlled ? defaultValue : void 0,
2647
+ onChange: handleChange,
2648
+ onFocus: handleFocus,
2649
+ onBlur: handleBlur,
2650
+ "aria-labelledby": hasLabel ? labelId : void 0,
2651
+ "aria-required": hasLabel && requiredProp ? true : void 0,
2652
+ className: chunkOQOBPYZT_cjs.cn(
2653
+ "flex-1 min-w-0 bg-transparent border-none outline-none",
2654
+ "text-base-medium text-sys-text-main",
2655
+ "placeholder:text-sys-text-placeholder",
2656
+ "disabled:cursor-not-allowed",
2657
+ "px-[4px] py-[2px]",
2658
+ // maxRows 미지정(무한 auto-grow) 시 자체 스크롤바 숨김: 스크롤바가 뜨면 content 폭이 줄어
2659
+ // autosize 재측정과 어긋나 스크롤바가 고착되는 피드백 루프를 막는다(스크롤바 없으면 content 가
2660
+ // height 에 정확히 맞아 잘림 없음). maxRows 지정(바운드) 시엔 기본 overflow-y:auto 로 캡 초과분 스크롤.
2661
+ maxRows == null && "overflow-hidden",
2662
+ // When label is down (acting as placeholder), hide textarea's placeholder
2663
+ hasLabel && !hasValue && !isFocused && "placeholder:text-transparent"
2664
+ ),
2665
+ style: {
2666
+ resize: "none",
2667
+ ...style
2668
+ },
2669
+ ...textareaProps
2670
+ }
2671
+ )
2672
+ ]
2673
+ }
2674
+ );
2058
2675
  }
2059
2676
  );
2060
- DrawerContent.displayName = DialogPrimitive__namespace.Content.displayName;
2061
- var DrawerHeader = ({ ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { ...props, className: cn("flex flex-col gap-[8px] text-left p-[24px]", props.className) });
2062
- DrawerHeader.displayName = "DrawerHeader";
2063
- var DrawerBody = ({ ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
2064
- "div",
2065
- {
2066
- tabIndex: 0,
2067
- ...props,
2068
- className: cn(
2069
- "flex-1 min-h-0 overflow-y-auto scrollbar-gutter-stable",
2070
- // DrawerContent 가 overflow-hidden 이라 바깥 outline 은 잘린다 → 안쪽 링
2071
- "outline-none focus-visible:ring-[2px] focus-visible:ring-inset focus-visible:ring-sys-focus-ring-main",
2072
- props.className
2073
- )
2677
+ Textarea.displayName = "Textarea";
2678
+ var ChatComposer = React10__namespace.forwardRef(
2679
+ ({
2680
+ value,
2681
+ onValueChange,
2682
+ onSubmit,
2683
+ streaming = false,
2684
+ onStop,
2685
+ disabled = false,
2686
+ placeholder = "\uBA54\uC2DC\uC9C0\uB97C \uC785\uB825\uD558\uC138\uC694",
2687
+ label = "\uBA54\uC2DC\uC9C0",
2688
+ maxRows = 6,
2689
+ menu,
2690
+ elemBefore,
2691
+ elemAfter,
2692
+ attachments,
2693
+ onAttach,
2694
+ onRemoveAttachment,
2695
+ accept,
2696
+ multiple = true,
2697
+ className
2698
+ }, forwardedRef) => {
2699
+ const textareaRef = React10__namespace.useRef(null);
2700
+ const setRef = React10__namespace.useCallback(
2701
+ (el) => {
2702
+ textareaRef.current = el;
2703
+ if (typeof forwardedRef === "function") forwardedRef(el);
2704
+ else if (forwardedRef) forwardedRef.current = el;
2705
+ },
2706
+ [forwardedRef]
2707
+ );
2708
+ const fileRef = React10__namespace.useRef(null);
2709
+ const [inner, setInner] = React10__namespace.useState("");
2710
+ const text = value ?? inner;
2711
+ const setText = (next) => {
2712
+ if (value === void 0) setInner(next);
2713
+ onValueChange?.(next);
2714
+ };
2715
+ const files = attachments ?? [];
2716
+ const uploading = files.some((file) => file.status === "uploading");
2717
+ const hasContent = text.trim() !== "" || files.length > 0;
2718
+ const canSend = !disabled && !streaming && hasContent && !uploading;
2719
+ const submit = () => {
2720
+ if (!canSend) return;
2721
+ onSubmit(text.trim());
2722
+ setText("");
2723
+ textareaRef.current?.focus();
2724
+ };
2725
+ const handleKeyDown = (e) => {
2726
+ if (e.nativeEvent.isComposing || e.keyCode === 229) return;
2727
+ if (e.key !== "Enter" || e.shiftKey) return;
2728
+ e.preventDefault();
2729
+ submit();
2730
+ };
2731
+ const handleFiles = (e) => {
2732
+ const picked = Array.from(e.target.files ?? []);
2733
+ e.target.value = "";
2734
+ if (picked.length) onAttach?.(picked);
2735
+ };
2736
+ const failed = files.filter((file) => file.status === "error" && file.error);
2737
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2738
+ "div",
2739
+ {
2740
+ "data-slot": "chat-composer",
2741
+ className: chunkOQOBPYZT_cjs.cn(
2742
+ "flex flex-col gap-[4px] rounded-xlarge border border-sys-divider-subtle bg-sys-background p-[8px] shadow-gray-small",
2743
+ // Textarea 의 appearance='none' 은 포커스 표시가 없다 — 상자가 대신 보여 준다
2744
+ "has-[textarea:focus-visible]:border-primary30 has-[textarea:focus-visible]:outline-[2px] has-[textarea:focus-visible]:outline-sys-focus-ring-main",
2745
+ disabled && "bg-sys-background-subtle shadow-none",
2746
+ className
2747
+ ),
2748
+ children: [
2749
+ files.length ? /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "m-0 flex list-none flex-wrap gap-[8px] px-[4px] pt-[4px]", children: files.map((file) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: "min-w-0", children: /* @__PURE__ */ jsxRuntime.jsxs(
2750
+ Tag,
2751
+ {
2752
+ variant: file.status === "error" ? "danger" : "secondary",
2753
+ elemBefore: file.status === "uploading" ? /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: "small", variant: "current", "aria-hidden": true }) : /* @__PURE__ */ jsxRuntime.jsx(lucide.Paperclip, { size: 14, "aria-hidden": true }),
2754
+ onRemove: onRemoveAttachment ? () => onRemoveAttachment(file.id) : void 0,
2755
+ removeLabel: `${file.name} \uC0AD\uC81C`,
2756
+ className: "max-w-[240px]",
2757
+ children: [
2758
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: file.name }),
2759
+ file.status === "uploading" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: " \uC62C\uB9AC\uB294 \uC911" }) : null
2760
+ ]
2761
+ }
2762
+ ) }, file.id)) }) : null,
2763
+ failed.length ? /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "m-0 flex list-none flex-col px-[4px] text-small-regular-h text-danger40", children: failed.map((file) => /* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
2764
+ file.name,
2765
+ ": ",
2766
+ file.error
2767
+ ] }, file.id)) }) : null,
2768
+ /* @__PURE__ */ jsxRuntime.jsx(
2769
+ Textarea,
2770
+ {
2771
+ ref: setRef,
2772
+ appearance: "none",
2773
+ "aria-label": label,
2774
+ className: "min-h-[36px]",
2775
+ minRows: 1,
2776
+ maxRows,
2777
+ placeholder,
2778
+ value: text,
2779
+ disabled,
2780
+ onChange: (e) => setText(e.target.value),
2781
+ onKeyDown: handleKeyDown
2782
+ }
2783
+ ),
2784
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-[8px]", children: [
2785
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 items-center gap-[8px]", children: [
2786
+ onAttach ? /* @__PURE__ */ jsxRuntime.jsx(
2787
+ "input",
2788
+ {
2789
+ ref: fileRef,
2790
+ type: "file",
2791
+ hidden: true,
2792
+ tabIndex: -1,
2793
+ accept,
2794
+ multiple,
2795
+ onChange: handleFiles
2796
+ }
2797
+ ) : null,
2798
+ onAttach || menu ? /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { children: [
2799
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(chunkOQOBPYZT_cjs.IconButton, { variant: "secondaryLink", "aria-label": "\uCD94\uAC00", disabled, children: /* @__PURE__ */ jsxRuntime.jsx(lucide.Plus, { size: 20 }) }) }),
2800
+ /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuContent, { side: "top", align: "start", children: [
2801
+ onAttach ? /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuItem, { onSelect: () => fileRef.current?.click(), children: [
2802
+ /* @__PURE__ */ jsxRuntime.jsx(lucide.Paperclip, { size: 16, "aria-hidden": true }),
2803
+ "\uD30C\uC77C \uCCA8\uBD80"
2804
+ ] }) : null,
2805
+ menu
2806
+ ] })
2807
+ ] }) : null,
2808
+ elemBefore
2809
+ ] }),
2810
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex shrink-0 items-center gap-[8px]", children: [
2811
+ elemAfter,
2812
+ streaming && onStop ? /* @__PURE__ */ jsxRuntime.jsx(
2813
+ chunkOQOBPYZT_cjs.IconButton,
2814
+ {
2815
+ variant: "secondaryBold",
2816
+ shape: "rounded",
2817
+ "aria-label": "\uC751\uB2F5 \uC911\uC9C0",
2818
+ onClick: () => {
2819
+ onStop();
2820
+ textareaRef.current?.focus();
2821
+ },
2822
+ children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "20", height: "20", viewBox: "0 0 20 20", "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "5", y: "5", width: "10", height: "10", rx: "2", fill: "currentColor" }) })
2823
+ }
2824
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
2825
+ chunkOQOBPYZT_cjs.IconButton,
2826
+ {
2827
+ variant: "primaryBold",
2828
+ shape: "rounded",
2829
+ "aria-label": "\uBCF4\uB0B4\uAE30",
2830
+ disabled: !canSend,
2831
+ onClick: submit,
2832
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucide.ArrowUp, { size: 20 })
2833
+ }
2834
+ )
2835
+ ] })
2836
+ ] })
2837
+ ]
2838
+ }
2839
+ );
2074
2840
  }
2075
2841
  );
2076
- DrawerBody.displayName = "DrawerBody";
2077
- var DrawerFooter = ({ ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
2078
- "div",
2079
- {
2080
- ...props,
2081
- className: cn("flex gap-[8px] justify-end mt-[16px] px-[24px] pb-[26px]", props.className)
2842
+ ChatComposer.displayName = "ChatComposer";
2843
+ function Skeleton({ className, ...props }) {
2844
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkOQOBPYZT_cjs.cn("animate-pulse rounded-md bg-secondary20", className), ...props });
2845
+ }
2846
+ function seededWidth(row, col, min, max) {
2847
+ const hash = (row * 31 + col * 17 + 7) * 2654435761 >>> 0;
2848
+ return min + hash % (max - min + 1);
2849
+ }
2850
+ function buildColumns(columnDefs, selectionColumnWidth) {
2851
+ const cols = [];
2852
+ if (selectionColumnWidth != null) {
2853
+ cols.push({ width: selectionColumnWidth });
2082
2854
  }
2083
- );
2084
- DrawerFooter.displayName = "DrawerFooter";
2085
- var DrawerTitle = React12__namespace.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
2086
- DialogPrimitive__namespace.Title,
2087
- {
2088
- ref,
2089
- ...props,
2090
- className: cn("text-h4 text-sys-text-main", props.className)
2855
+ for (const def of columnDefs) {
2856
+ cols.push({
2857
+ width: def.width,
2858
+ flex: def.flex,
2859
+ minWidth: def.minWidth
2860
+ });
2091
2861
  }
2092
- ));
2093
- DrawerTitle.displayName = DialogPrimitive__namespace.Title.displayName;
2094
- var DrawerDescription = React12__namespace.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
2095
- DialogPrimitive__namespace.Description,
2096
- {
2097
- ref,
2098
- ...props,
2099
- className: cn("text-base-regular text-sys-text-main", props.className)
2862
+ return cols;
2863
+ }
2864
+ function getColStyle(col) {
2865
+ if (col.width != null) {
2866
+ return { width: col.width, flexShrink: 0 };
2100
2867
  }
2101
- ));
2102
- DrawerDescription.displayName = DialogPrimitive__namespace.Description.displayName;
2103
- function DropdownMenu({ ...props }) {
2104
- return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Root, { "data-slot": "dropdown-menu", ...props });
2868
+ if (col.flex != null) {
2869
+ return { flex: col.flex, minWidth: col.minWidth };
2870
+ }
2871
+ return { flex: 1 };
2105
2872
  }
2106
- function DropdownMenuPortal({
2107
- ...props
2873
+ function TableSkeleton({
2874
+ columnDefs = [],
2875
+ rowLength = 3,
2876
+ rowHeight = 50,
2877
+ headerHeight = 40,
2878
+ selectionColumnWidth
2108
2879
  }) {
2109
- return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { "data-slot": "dropdown-menu-portal", ...props });
2880
+ const displayRowLength = rowLength && rowLength > 0 ? rowLength : 5;
2881
+ const columns = buildColumns(columnDefs, selectionColumnWidth);
2882
+ return /* @__PURE__ */ jsxRuntime.jsxs(Stack, { direction: "column", className: "w-full", children: [
2883
+ /* @__PURE__ */ jsxRuntime.jsx(
2884
+ "div",
2885
+ {
2886
+ className: "flex items-center bg-sys-table-header-background border-b border-sys-divider-subtler rounded-[6px]",
2887
+ style: { height: headerHeight + 1, paddingLeft: 10, paddingRight: 10 },
2888
+ children: columns.map((col, colIndex) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center px-[6px]", style: getColStyle(col), children: /* @__PURE__ */ jsxRuntime.jsx(
2889
+ Skeleton,
2890
+ {
2891
+ className: "h-[12px] rounded-[3px] !bg-grayscale-s20",
2892
+ style: { width: `${seededWidth(0, colIndex, 40, 70)}%` }
2893
+ }
2894
+ ) }, colIndex))
2895
+ }
2896
+ ),
2897
+ Array.from({ length: displayRowLength }).map((_, rowIndex) => /* @__PURE__ */ jsxRuntime.jsx(
2898
+ "div",
2899
+ {
2900
+ className: chunkOQOBPYZT_cjs.cn(
2901
+ "flex items-center",
2902
+ rowIndex < displayRowLength - 1 && "border-b border-sys-divider-subtler"
2903
+ ),
2904
+ style: { height: rowHeight, paddingLeft: 10, paddingRight: 10 },
2905
+ children: columns.map((col, colIndex) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center px-[6px]", style: getColStyle(col), children: /* @__PURE__ */ jsxRuntime.jsx(
2906
+ Skeleton,
2907
+ {
2908
+ className: "h-[14px] rounded-[3px]",
2909
+ style: { width: `${seededWidth(rowIndex + 1, colIndex, 40, 80)}%` }
2910
+ }
2911
+ ) }, colIndex))
2912
+ },
2913
+ rowIndex
2914
+ ))
2915
+ ] });
2110
2916
  }
2111
- function DropdownMenuTrigger({
2112
- ...props
2113
- }) {
2114
- return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Trigger, { "data-slot": "dropdown-menu-trigger", ...props });
2917
+ var textFieldContainerVariants = classVarianceAuthority.cva(
2918
+ [
2919
+ "flex w-full items-center gap-[2px] bg-transparent",
2920
+ "rounded-small min-h-[36px] text-base-medium text-sys-text-main",
2921
+ "transition-colors"
2922
+ ].join(" "),
2923
+ {
2924
+ variants: {
2925
+ appearance: {
2926
+ standard: [
2927
+ "bg-sys-background border border-sys-divider-main py-[3px] px-[5px]",
2928
+ "hover:bg-secondary-o10"
2929
+ ].join(" "),
2930
+ none: "bg-transparent border-none py-[4px] px-[6px]"
2931
+ },
2932
+ isInvalid: {
2933
+ true: "",
2934
+ false: ""
2935
+ }
2936
+ },
2937
+ compoundVariants: [
2938
+ {
2939
+ appearance: "standard",
2940
+ isInvalid: true,
2941
+ class: "border-[2px] border-danger30 py-[2px] px-[4px]"
2942
+ }
2943
+ ],
2944
+ defaultVariants: {
2945
+ appearance: "standard",
2946
+ isInvalid: false
2947
+ }
2948
+ }
2949
+ );
2950
+ var TextField = React10__namespace.forwardRef(
2951
+ ({
2952
+ appearance = "standard",
2953
+ label,
2954
+ required: requiredProp,
2955
+ hasClearButton,
2956
+ elemBeforeInput,
2957
+ elemAfterInput,
2958
+ isInvalid: isInvalidProp,
2959
+ containerClassName,
2960
+ className,
2961
+ disabled,
2962
+ readOnly,
2963
+ value: valueProp,
2964
+ defaultValue,
2965
+ onChange: onChangeProp,
2966
+ onFocus: onFocusProp,
2967
+ onBlur: onBlurProp,
2968
+ ...inputProps
2969
+ }, forwardedRef) => {
2970
+ const formControl = useFormControlContext();
2971
+ const isInvalid = isInvalidProp ?? formControl?.isInvalid ?? false;
2972
+ const inputRef = React10__namespace.useRef(null);
2973
+ const [isFocused, setIsFocused] = React10__namespace.useState(false);
2974
+ const isControlled = valueProp !== void 0;
2975
+ const [internalValue, setInternalValue] = React10__namespace.useState(
2976
+ defaultValue !== void 0 ? String(defaultValue) : ""
2977
+ );
2978
+ const hasValue = isControlled ? String(valueProp) !== "" : internalValue !== "";
2979
+ const composedRef = React10__namespace.useCallback(
2980
+ (node) => {
2981
+ inputRef.current = node;
2982
+ if (typeof forwardedRef === "function") forwardedRef(node);
2983
+ else if (forwardedRef)
2984
+ forwardedRef.current = node;
2985
+ },
2986
+ [forwardedRef]
2987
+ );
2988
+ const {
2989
+ hasLabel,
2990
+ isFloating,
2991
+ isMounted,
2992
+ labelColorClass,
2993
+ borderColorClass,
2994
+ isThickBorder,
2995
+ labelId
2996
+ } = useFloatingLabel({
2997
+ label,
2998
+ hasValue,
2999
+ isFocused,
3000
+ isInvalid: !!isInvalid,
3001
+ isDisabled: !!disabled});
3002
+ const showNotchedOutline = hasLabel && appearance !== "none";
3003
+ const showNoneLabel = hasLabel && appearance === "none";
3004
+ const handleChange = React10__namespace.useCallback(
3005
+ (e) => {
3006
+ if (!isControlled) setInternalValue(e.target.value);
3007
+ onChangeProp?.(e);
3008
+ },
3009
+ [isControlled, onChangeProp]
3010
+ );
3011
+ const handleFocus = React10__namespace.useCallback(
3012
+ (e) => {
3013
+ setIsFocused(true);
3014
+ onFocusProp?.(e);
3015
+ },
3016
+ [onFocusProp]
3017
+ );
3018
+ const handleBlur = React10__namespace.useCallback(
3019
+ (e) => {
3020
+ setIsFocused(false);
3021
+ onBlurProp?.(e);
3022
+ },
3023
+ [onBlurProp]
3024
+ );
3025
+ const handleClear = React10__namespace.useCallback(() => {
3026
+ const input = inputRef.current;
3027
+ if (!input) return;
3028
+ if (!isControlled) setInternalValue("");
3029
+ const nativeSetter = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set;
3030
+ if (nativeSetter) {
3031
+ nativeSetter.call(input, "");
3032
+ input.dispatchEvent(new Event("input", { bubbles: true }));
3033
+ }
3034
+ input.focus();
3035
+ }, [isControlled]);
3036
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3037
+ "div",
3038
+ {
3039
+ "data-slot": "text-field",
3040
+ "aria-disabled": disabled || void 0,
3041
+ className: chunkOQOBPYZT_cjs.cn(
3042
+ textFieldContainerVariants({ appearance, isInvalid }),
3043
+ CLEAR_HOST_CLASS,
3044
+ // Focus styling (state-managed, standard appearance without notched outline only)
3045
+ isFocused && !isInvalid && appearance === "standard" && !showNotchedOutline && "border-[2px] border-sys-focus-ring-bold py-[2px] px-[4px]",
3046
+ // Floating label positioning
3047
+ (showNotchedOutline || showNoneLabel) && "relative",
3048
+ // Notched outline draws border — remove container's own border
3049
+ showNotchedOutline && "!border-0 !py-[4px] !px-[6px]",
3050
+ // Disabled / cursor
3051
+ disabled ? "cursor-not-allowed opacity-50" : "cursor-text",
3052
+ // disabled 시 hover 배경 무력화 (div container라 :disabled 불가 → JS 조건부; none은 원래 hover bg 없음)
3053
+ disabled && appearance !== "none" && "hover:bg-sys-background",
3054
+ containerClassName,
3055
+ // 외부 className 은 root container 에 적용 — FormControl 의 maxWidth 가
3056
+ // 자식 className 에 inject 되는데, wrapper div 의 폭 제어가 의도이므로
3057
+ // inner input 이 아닌 여기에 머지한다.
3058
+ className
3059
+ ),
3060
+ children: [
3061
+ (showNotchedOutline || showNoneLabel) && /* @__PURE__ */ jsxRuntime.jsx(
3062
+ FloatingLabelOutline,
3063
+ {
3064
+ mode: showNotchedOutline ? "standard" : "none",
3065
+ label,
3066
+ required: requiredProp,
3067
+ isFloating,
3068
+ isMounted,
3069
+ labelColorClass,
3070
+ borderColorClass,
3071
+ isThickBorder,
3072
+ labelId
3073
+ }
3074
+ ),
3075
+ elemBeforeInput && /* @__PURE__ */ jsxRuntime.jsx(
3076
+ "span",
3077
+ {
3078
+ className: chunkOQOBPYZT_cjs.cn(
3079
+ // 아이콘은 24×24, 글자("개"·"코어")는 줄바꿈 없이 폭이 늘어난다 — 고정 size-[24px] 는 두 글자가 두 줄로 깨졌다 (2026-10-12)
3080
+ "shrink-0 flex items-center justify-center h-[24px] min-w-[24px] whitespace-nowrap",
3081
+ typeof elemBeforeInput === "string" && "px-[2px] text-sys-text-subtle",
3082
+ hasLabel && !isFloating && "invisible"
3083
+ ),
3084
+ children: elemBeforeInput
3085
+ }
3086
+ ),
3087
+ /* @__PURE__ */ jsxRuntime.jsx(
3088
+ "input",
3089
+ {
3090
+ ref: composedRef,
3091
+ disabled,
3092
+ readOnly,
3093
+ value: isControlled ? valueProp : void 0,
3094
+ defaultValue: !isControlled ? defaultValue : void 0,
3095
+ onChange: handleChange,
3096
+ onFocus: handleFocus,
3097
+ onBlur: handleBlur,
3098
+ "aria-labelledby": hasLabel ? labelId : void 0,
3099
+ "aria-required": hasLabel && requiredProp ? true : void 0,
3100
+ className: chunkOQOBPYZT_cjs.cn(
3101
+ "flex-1 min-w-0 bg-transparent border-none outline-none",
3102
+ "text-base-medium text-sys-text-main",
3103
+ "placeholder:text-sys-text-placeholder",
3104
+ "disabled:cursor-not-allowed",
3105
+ "px-[4px] py-[2px]",
3106
+ // When label is down (acting as placeholder), hide input's placeholder
3107
+ hasLabel && !hasValue && !isFocused && "placeholder:text-transparent"
3108
+ ),
3109
+ ...inputProps
3110
+ }
3111
+ ),
3112
+ hasClearButton && /* @__PURE__ */ jsxRuntime.jsx(
3113
+ "button",
3114
+ {
3115
+ type: "button",
3116
+ onClick: handleClear,
3117
+ className: chunkOQOBPYZT_cjs.cn(
3118
+ "shrink-0 flex items-center justify-center p-[2px] rounded-small hover:bg-secondary-o10 text-sys-text-subtler",
3119
+ CLEAR_REVEAL_CLASS,
3120
+ (!hasValue || disabled || readOnly) && "invisible"
3121
+ ),
3122
+ "aria-label": "\uC785\uB825 \uC9C0\uC6B0\uAE30",
3123
+ tabIndex: -1,
3124
+ children: /* @__PURE__ */ jsxRuntime.jsx(CancelIcon, { size: 20 })
3125
+ }
3126
+ ),
3127
+ elemAfterInput && /* @__PURE__ */ jsxRuntime.jsx(
3128
+ "span",
3129
+ {
3130
+ className: chunkOQOBPYZT_cjs.cn(
3131
+ "shrink-0 flex items-center justify-center h-[24px] min-w-[24px] whitespace-nowrap",
3132
+ typeof elemAfterInput === "string" && "px-[2px] text-sys-text-subtle"
3133
+ ),
3134
+ children: elemAfterInput
3135
+ }
3136
+ )
3137
+ ]
3138
+ }
3139
+ );
3140
+ }
3141
+ );
3142
+ TextField.displayName = "TextField";
3143
+ var GROUP_LABELS = ["\uC624\uB298", "\uC5B4\uC81C", "\uC9C0\uB09C 7\uC77C", "\uC9C0\uB09C 30\uC77C", "\uC774\uC804"];
3144
+ function groupChatHistoryByDate(items, now) {
3145
+ if (items.length === 0) return [];
3146
+ const dates = items.map((item) => item.updatedAt == null ? null : new Date(item.updatedAt));
3147
+ if (dates.some((date) => date == null || !dateFns.isValid(date))) return [{ label: null, items }];
3148
+ const buckets = GROUP_LABELS.map(() => []);
3149
+ items.forEach((item, i) => {
3150
+ const days = dateFns.differenceInCalendarDays(now, dates[i]);
3151
+ const index = days <= 0 ? 0 : days === 1 ? 1 : days <= 7 ? 2 : days <= 30 ? 3 : 4;
3152
+ buckets[index].push(item);
3153
+ });
3154
+ return buckets.map((bucket, i) => ({ label: GROUP_LABELS[i], items: bucket })).filter((group) => group.items.length > 0);
3155
+ }
3156
+ function HistoryRow({ item, active, onSelect, onRename, onDelete }) {
3157
+ const title = item.title.trim() || "\uC81C\uBAA9 \uC5C6\uC74C";
3158
+ const [editing, setEditing] = React10__namespace.useState(false);
3159
+ const [draft, setDraft] = React10__namespace.useState("");
3160
+ const inputRef = React10__namespace.useRef(null);
3161
+ const triggerRef = React10__namespace.useRef(null);
3162
+ const pendingRef = React10__namespace.useRef(void 0);
3163
+ React10__namespace.useEffect(() => {
3164
+ if (!editing) return;
3165
+ inputRef.current?.focus();
3166
+ inputRef.current?.select();
3167
+ }, [editing]);
3168
+ const finish = (commit) => {
3169
+ setEditing(false);
3170
+ const next = draft.trim();
3171
+ if (commit && next !== "" && next !== item.title) onRename?.(item.id, next);
3172
+ };
3173
+ const hasMenu = Boolean(onRename || onDelete);
3174
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3175
+ "li",
3176
+ {
3177
+ className: chunkOQOBPYZT_cjs.cn(
3178
+ "group/row relative flex h-[36px] items-center gap-[4px] rounded-small pr-[4px] pl-[12px]",
3179
+ active ? "bg-primary-o10" : "hover:bg-secondary-o10"
3180
+ ),
3181
+ children: [
3182
+ editing ? (
3183
+ // 줄 높이 안에 들어가는 그 자리 입력. TextField 는 높이·테두리가 줄보다 크다
3184
+ /* @__PURE__ */ jsxRuntime.jsx(
3185
+ "input",
3186
+ {
3187
+ ref: inputRef,
3188
+ value: draft,
3189
+ "aria-label": `${title} \uC774\uB984 \uBCC0\uACBD`,
3190
+ onChange: (e) => setDraft(e.target.value),
3191
+ onBlur: () => finish(true),
3192
+ onKeyDown: (e) => {
3193
+ if (e.nativeEvent.isComposing || e.keyCode === 229) return;
3194
+ if (e.key === "Enter") {
3195
+ e.preventDefault();
3196
+ finish(true);
3197
+ } else if (e.key === "Escape") {
3198
+ e.preventDefault();
3199
+ finish(false);
3200
+ }
3201
+ },
3202
+ className: "-ml-[8px] min-w-0 flex-1 rounded-xsmall bg-sys-background px-[8px] py-[2px] text-base-regular text-sys-text-main outline-none ring-[2px] ring-inset ring-sys-focus-ring-main"
3203
+ }
3204
+ )
3205
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
3206
+ "button",
3207
+ {
3208
+ type: "button",
3209
+ "aria-current": active ? "true" : void 0,
3210
+ title,
3211
+ onClick: () => onSelect(item.id),
3212
+ className: chunkOQOBPYZT_cjs.cn(
3213
+ "h-full min-w-0 flex-1 cursor-pointer truncate rounded-xsmall text-left focus-visible:outline-[2px] focus-visible:outline-sys-focus-ring-main",
3214
+ active ? "text-base-medium text-primary40" : "text-base-regular text-sys-text-main"
3215
+ ),
3216
+ children: title
3217
+ }
3218
+ ),
3219
+ hasMenu && !editing ? /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { children: [
3220
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
3221
+ chunkOQOBPYZT_cjs.IconButton,
3222
+ {
3223
+ ref: triggerRef,
3224
+ variant: "secondaryLink",
3225
+ "aria-label": `${title} \uB354\uBCF4\uAE30`,
3226
+ className: chunkOQOBPYZT_cjs.cn(
3227
+ // 고른 줄은 항상, 나머지는 올리거나 포커스했을 때 보인다(키보드로는 항상 닿는다)
3228
+ "shrink-0 opacity-0 group-hover/row:opacity-100 focus-visible:opacity-100 data-[state=open]:opacity-100",
3229
+ active && "opacity-100"
3230
+ ),
3231
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucide.Ellipsis, { size: 16 })
3232
+ }
3233
+ ) }),
3234
+ /* @__PURE__ */ jsxRuntime.jsxs(
3235
+ DropdownMenuContent,
3236
+ {
3237
+ align: "end",
3238
+ onCloseAutoFocus: (e) => {
3239
+ e.preventDefault();
3240
+ triggerRef.current?.focus();
3241
+ const fn = pendingRef.current;
3242
+ pendingRef.current = void 0;
3243
+ fn?.();
3244
+ },
3245
+ children: [
3246
+ onRename ? /* @__PURE__ */ jsxRuntime.jsx(
3247
+ DropdownMenuItem,
3248
+ {
3249
+ onSelect: () => {
3250
+ pendingRef.current = () => {
3251
+ setDraft(item.title);
3252
+ setEditing(true);
3253
+ };
3254
+ },
3255
+ children: "\uC774\uB984 \uBCC0\uACBD"
3256
+ }
3257
+ ) : null,
3258
+ onDelete ? /* @__PURE__ */ jsxRuntime.jsx(
3259
+ DropdownMenuItem,
3260
+ {
3261
+ variant: "danger",
3262
+ onSelect: () => {
3263
+ pendingRef.current = () => onDelete(item.id);
3264
+ },
3265
+ children: "\uC0AD\uC81C"
3266
+ }
3267
+ ) : null
3268
+ ]
3269
+ }
3270
+ )
3271
+ ] }) : null
3272
+ ]
3273
+ }
3274
+ );
2115
3275
  }
2116
- function DropdownMenuContent({
2117
- className,
2118
- sideOffset = 4,
2119
- ...props
3276
+ function Notice({
3277
+ role,
3278
+ icon,
3279
+ title,
3280
+ description,
3281
+ action
2120
3282
  }) {
2121
- return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
2122
- DropdownMenuPrimitive__namespace.Content,
3283
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3284
+ "div",
2123
3285
  {
2124
- "data-slot": "dropdown-menu-content",
2125
- sideOffset,
2126
- className: cn(
2127
- "bg-sys-background text-base-regular",
2128
- "overflow-x-hidden overflow-y-auto shadow-gray-small rounded-xsmall p-[4px] border border-sys-divider-subtler",
2129
- "max-h-(--radix-dropdown-menu-content-available-height) ",
2130
- "min-w-[200px] origin-(--radix-dropdown-menu-content-transform-origin)",
2131
- "data-[state=open]:animate-[fade-in_150ms_ease-out,zoom-in_150ms_ease-out]",
2132
- "data-[state=closed]:animate-[fade-out_150ms_ease-in,zoom-out_150ms_ease-in]",
2133
- "data-[side=top]:animate-[slide-in-bottom_150ms_ease-out]",
2134
- "data-[side=bottom]:animate-[slide-in-top_150ms_ease-out]",
2135
- "data-[side=left]:animate-[slide-in-right_150ms_ease-out]",
2136
- "data-[side=right]:animate-[slide-in-left_150ms_ease-out]",
2137
- className
2138
- ),
2139
- ...props
3286
+ role,
3287
+ className: "flex flex-col items-center gap-[4px] px-[12px] py-[32px] text-center",
3288
+ children: [
3289
+ /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: "mb-[4px] flex text-sys-text-subtler", children: icon }),
3290
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base-medium text-sys-text-main", children: title }),
3291
+ description ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "break-keep text-small-regular-h text-sys-text-subtle wrap-break-word", children: description }) : null,
3292
+ action ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-[8px]", children: action }) : null
3293
+ ]
2140
3294
  }
2141
- ) });
2142
- }
2143
- function DropdownMenuGroup({ ...props }) {
2144
- return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Group, { "data-slot": "dropdown-menu-group", ...props });
3295
+ );
2145
3296
  }
2146
- function DropdownMenuItem({
2147
- className,
2148
- variant = "default",
2149
- keepOpen = false,
3297
+ function ChatHistory({
3298
+ items,
3299
+ activeId,
2150
3300
  onSelect,
2151
- ...props
3301
+ onNew,
3302
+ onRename,
3303
+ onDelete,
3304
+ search,
3305
+ loading = false,
3306
+ error,
3307
+ onRetry,
3308
+ hasMore = false,
3309
+ onLoadMore,
3310
+ now,
3311
+ className
2152
3312
  }) {
2153
- const handleSelect = React12__namespace.useCallback(
2154
- (event) => {
2155
- onSelect?.(event);
2156
- if (keepOpen) event.preventDefault();
2157
- },
2158
- [onSelect, keepOpen]
2159
- );
2160
- return /* @__PURE__ */ jsxRuntime.jsx(
2161
- DropdownMenuPrimitive__namespace.Item,
2162
- {
2163
- "data-slot": "dropdown-menu-item",
2164
- "data-variant": variant,
2165
- onSelect: handleSelect,
2166
- className: cn(
2167
- "relative flex cursor-default items-center gap-[12px] rounded-xsmall p-[6px] text-base-regular outline-hidden select-none",
2168
- "data-[variant=danger]:text-danger30",
2169
- "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:size-[20px]",
2170
- "focus:bg-secondary-o10",
2171
- "data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
2172
- className
2173
- ),
2174
- ...props
2175
- }
3313
+ const [mountedAt] = React10__namespace.useState(() => Date.now());
3314
+ const groups = React10__namespace.useMemo(
3315
+ () => groupChatHistoryByDate(items, now ?? mountedAt),
3316
+ [items, now, mountedAt]
2176
3317
  );
3318
+ const moreRef = React10__namespace.useRef(null);
3319
+ const loadMoreRef = React10__namespace.useRef(onLoadMore);
3320
+ React10__namespace.useEffect(() => {
3321
+ loadMoreRef.current = onLoadMore;
3322
+ }, [onLoadMore]);
3323
+ React10__namespace.useEffect(() => {
3324
+ const el = moreRef.current;
3325
+ if (!hasMore || !el || typeof IntersectionObserver === "undefined") return;
3326
+ const io = new IntersectionObserver((entries) => {
3327
+ if (entries.some((entry) => entry.isIntersecting)) loadMoreRef.current?.();
3328
+ });
3329
+ io.observe(el);
3330
+ return () => io.disconnect();
3331
+ }, [hasMore, items.length]);
3332
+ const searching = Boolean(search?.value.trim());
3333
+ return /* @__PURE__ */ jsxRuntime.jsxs("nav", { "aria-label": "\uB300\uD654 \uAE30\uB85D", className: chunkOQOBPYZT_cjs.cn("flex min-h-0 flex-col gap-[8px]", className), children: [
3334
+ onNew ? /* @__PURE__ */ jsxRuntime.jsxs(
3335
+ Button,
3336
+ {
3337
+ type: "button",
3338
+ variant: "primaryLink",
3339
+ className: "w-full justify-start px-[12px]",
3340
+ onClick: onNew,
3341
+ children: [
3342
+ /* @__PURE__ */ jsxRuntime.jsx(lucide.Plus, { size: 16, "aria-hidden": true, className: "mr-[6px]" }),
3343
+ "\uC0C8 \uB300\uD654"
3344
+ ]
3345
+ }
3346
+ ) : null,
3347
+ search ? /* @__PURE__ */ jsxRuntime.jsx(
3348
+ TextField,
3349
+ {
3350
+ appearance: "none",
3351
+ "aria-label": "\uB300\uD654 \uAC80\uC0C9",
3352
+ placeholder: "\uB300\uD654 \uAC80\uC0C9",
3353
+ value: search.value,
3354
+ onChange: (e) => search.onChange(e.target.value),
3355
+ hasClearButton: true,
3356
+ elemBeforeInput: /* @__PURE__ */ jsxRuntime.jsx(lucide.Search, { size: 16, "aria-hidden": true, className: "text-sys-text-subtler" }),
3357
+ className: "rounded-none border-b border-solid border-sys-divider-subtler px-[8px] focus-within:border-sys-focus-ring-bold"
3358
+ }
3359
+ ) : null,
3360
+ /* @__PURE__ */ jsxRuntime.jsx(
3361
+ "div",
3362
+ {
3363
+ tabIndex: 0,
3364
+ className: chunkOQOBPYZT_cjs.cn(
3365
+ "-mx-[4px] min-h-0 flex-1 overflow-y-auto px-[4px] outline-none focus-visible:ring-[2px] focus-visible:ring-inset focus-visible:ring-sys-focus-ring-main",
3366
+ // 목록은 위의 도구(새 대화·검색)와 다른 묶음 — 묶음 사이는 24(nav 의 gap 8 + 16)
3367
+ (onNew || search) && "mt-[16px]"
3368
+ ),
3369
+ children: loading ? /* @__PURE__ */ jsxRuntime.jsx(
3370
+ "div",
3371
+ {
3372
+ role: "status",
3373
+ "aria-label": "\uB300\uD654 \uAE30\uB85D\uC744 \uBD88\uB7EC\uC624\uB294 \uC911",
3374
+ className: "flex flex-col gap-[4px]",
3375
+ children: Array.from({ length: 6 }, (_, i) => /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-[36px] w-full rounded-small" }, i))
3376
+ }
3377
+ ) : error ? /* @__PURE__ */ jsxRuntime.jsx(
3378
+ Notice,
3379
+ {
3380
+ role: "alert",
3381
+ icon: /* @__PURE__ */ jsxRuntime.jsx(lucide.CircleAlert, { size: 32, className: "text-danger30" }),
3382
+ title: "\uAE30\uB85D\uC744 \uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4",
3383
+ description: error,
3384
+ action: onRetry ? /* @__PURE__ */ jsxRuntime.jsx(Button, { type: "button", variant: "primary", spacing: "compact", onClick: onRetry, children: "\uB2E4\uC2DC \uC2DC\uB3C4" }) : null
3385
+ }
3386
+ ) : items.length === 0 ? searching ? /* @__PURE__ */ jsxRuntime.jsx(
3387
+ Notice,
3388
+ {
3389
+ role: "status",
3390
+ icon: /* @__PURE__ */ jsxRuntime.jsx(lucide.SearchX, { size: 32 }),
3391
+ title: "\uAC80\uC0C9 \uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4",
3392
+ description: "\uB2E4\uB978 \uAC80\uC0C9\uC5B4\uB85C \uB2E4\uC2DC \uCC3E\uC544\uBCF4\uC138\uC694"
3393
+ }
3394
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
3395
+ Notice,
3396
+ {
3397
+ role: "status",
3398
+ icon: /* @__PURE__ */ jsxRuntime.jsx(lucide.MessagesSquare, { size: 32 }),
3399
+ title: "\uB300\uD654 \uAE30\uB85D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4",
3400
+ description: "\uB300\uD654\uB97C \uC2DC\uC791\uD558\uBA74 \uC5EC\uAE30\uC5D0 \uAE30\uB85D\uC774 \uC313\uC785\uB2C8\uB2E4"
3401
+ }
3402
+ ) : (
3403
+ // 날짜 묶음 사이 18 — 간격 단계(16·24) 밖 값이지만 디자이너 지정(2026-11-18, 12 의 1.5배)
3404
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-[18px]", children: [
3405
+ groups.map((group) => /* @__PURE__ */ jsxRuntime.jsxs("section", { "aria-label": group.label ?? void 0, children: [
3406
+ group.label ? /* @__PURE__ */ jsxRuntime.jsx(
3407
+ "div",
3408
+ {
3409
+ "aria-hidden": true,
3410
+ className: "px-[12px] pb-[4px] text-small-medium-h text-sys-text-subtler",
3411
+ children: group.label
3412
+ }
3413
+ ) : null,
3414
+ /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "m-0 flex list-none flex-col gap-[2px] p-0", children: group.items.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
3415
+ HistoryRow,
3416
+ {
3417
+ item,
3418
+ active: item.id === activeId,
3419
+ onSelect,
3420
+ onRename,
3421
+ onDelete
3422
+ },
3423
+ item.id
3424
+ )) })
3425
+ ] }, group.label ?? "all")),
3426
+ hasMore ? /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "m-0 list-none p-0", children: /* @__PURE__ */ jsxRuntime.jsx(
3427
+ "li",
3428
+ {
3429
+ ref: moreRef,
3430
+ role: "status",
3431
+ "aria-label": "\uB300\uD654 \uAE30\uB85D\uC744 \uB354 \uBD88\uB7EC\uC624\uB294 \uC911",
3432
+ className: "flex h-[36px] items-center justify-center",
3433
+ children: /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: "small", variant: "primary", "aria-hidden": true })
3434
+ }
3435
+ ) }) : null
3436
+ ] })
3437
+ )
3438
+ }
3439
+ )
3440
+ ] });
2177
3441
  }
2178
- function DropdownMenuSeparator({
2179
- className,
2180
- ...props
3442
+ function ActionButton({
3443
+ label,
3444
+ pressed,
3445
+ onClick,
3446
+ children
2181
3447
  }) {
2182
- return /* @__PURE__ */ jsxRuntime.jsx(
2183
- DropdownMenuPrimitive__namespace.Separator,
3448
+ return /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
3449
+ /* @__PURE__ */ jsxRuntime.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
3450
+ chunkOQOBPYZT_cjs.IconButton,
3451
+ {
3452
+ variant: pressed ? "primaryLink" : "secondaryLink",
3453
+ "aria-label": label,
3454
+ "aria-pressed": pressed,
3455
+ onClick,
3456
+ children
3457
+ }
3458
+ ) }),
3459
+ /* @__PURE__ */ jsxRuntime.jsx(TooltipContent, { children: label })
3460
+ ] });
3461
+ }
3462
+ function CopyAction({ text }) {
3463
+ const { copied, failed, copy } = chunkOQOBPYZT_cjs.useCopy();
3464
+ if (failed) return null;
3465
+ return /* @__PURE__ */ jsxRuntime.jsx(ActionButton, { label: copied ? "\uBCF5\uC0AC\uB428" : "\uBCF5\uC0AC", onClick: () => void copy(text), children: copied ? /* @__PURE__ */ jsxRuntime.jsx(lucide.Check, { size: 16 }) : /* @__PURE__ */ jsxRuntime.jsx(lucide.Copy, { size: 16 }) });
3466
+ }
3467
+ function Attachments({ items }) {
3468
+ return /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "m-0 flex list-none flex-wrap justify-end gap-[8px] p-0", children: items.map((file) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: "min-w-0", children: /* @__PURE__ */ jsxRuntime.jsx(
3469
+ Tag,
2184
3470
  {
2185
- "data-slot": "dropdown-menu-separator",
2186
- className: cn("bg-sys-divider-subtle -mx-[1px] my-[1px] h-[1px]", className),
2187
- ...props
3471
+ variant: "secondary",
3472
+ asChild: Boolean(file.href),
3473
+ elemBefore: /* @__PURE__ */ jsxRuntime.jsx(lucide.Paperclip, { size: 14, "aria-hidden": true }),
3474
+ className: "max-w-[240px]",
3475
+ children: file.href ? /* @__PURE__ */ jsxRuntime.jsx("a", { href: file.href, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: file.name }) }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: file.name })
2188
3476
  }
2189
- );
3477
+ ) }, file.id)) });
2190
3478
  }
2191
- function DropdownMenuSub({ ...props }) {
2192
- return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Sub, { "data-slot": "dropdown-menu-sub", ...props });
3479
+ function Sources({ items }) {
3480
+ return /* @__PURE__ */ jsxRuntime.jsxs("details", { className: "group/sources", children: [
3481
+ /* @__PURE__ */ jsxRuntime.jsxs("summary", { className: "inline-flex cursor-pointer list-none items-center gap-[4px] rounded-small text-small-medium-h text-sys-text-subtle hover:text-sys-text-main focus-visible:outline-[2px] focus-visible:outline-sys-focus-ring-main [&::-webkit-details-marker]:hidden", children: [
3482
+ /* @__PURE__ */ jsxRuntime.jsx(
3483
+ lucide.ChevronRight,
3484
+ {
3485
+ size: 14,
3486
+ "aria-hidden": true,
3487
+ className: "transition-transform group-open/sources:rotate-90"
3488
+ }
3489
+ ),
3490
+ "\uCD9C\uCC98 ",
3491
+ items.length,
3492
+ "\uAC1C"
3493
+ ] }),
3494
+ /* @__PURE__ */ jsxRuntime.jsx("ol", { className: "m-0 mt-[8px] flex list-none flex-col gap-[8px] p-0", children: items.map((source, i) => (
3495
+ // 출처는 순서(번호)로 구분된다
3496
+ // eslint-disable-next-line react/no-array-index-key
3497
+ /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex gap-[8px] text-small-regular-h text-sys-text-subtle", children: [
3498
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { "aria-hidden": true, className: "shrink-0 text-sys-text-subtler", children: [
3499
+ i + 1,
3500
+ "."
3501
+ ] }),
3502
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
3503
+ source.href ? /* @__PURE__ */ jsxRuntime.jsx(
3504
+ "a",
3505
+ {
3506
+ href: source.href,
3507
+ target: "_blank",
3508
+ rel: "noopener noreferrer",
3509
+ className: "block truncate text-small-medium-h text-primary40 underline",
3510
+ children: source.title
3511
+ }
3512
+ ) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "block truncate text-small-medium-h text-sys-text-main", children: source.title }),
3513
+ source.description ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "line-clamp-2 break-keep wrap-break-word", children: source.description }) : null
3514
+ ] })
3515
+ ] }, i)
3516
+ )) })
3517
+ ] });
2193
3518
  }
2194
- function DropdownMenuSubTrigger({
2195
- className,
3519
+ function ChatMessage({
3520
+ from,
2196
3521
  children,
2197
- ...props
3522
+ pending = false,
3523
+ streaming = false,
3524
+ error,
3525
+ onRetry,
3526
+ attachments,
3527
+ sources,
3528
+ meta,
3529
+ actions,
3530
+ copyText,
3531
+ onRegenerate,
3532
+ onFeedback,
3533
+ feedback,
3534
+ headingLevel = 2,
3535
+ className
2198
3536
  }) {
3537
+ const id = React10__namespace.useId();
3538
+ const Heading = `h${headingLevel}`;
3539
+ const isUser = from === "user";
3540
+ if (isUser) {
3541
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3542
+ "article",
3543
+ {
3544
+ "aria-labelledby": id,
3545
+ "data-role": "user",
3546
+ className: chunkOQOBPYZT_cjs.cn("flex flex-col items-end gap-[8px]", className),
3547
+ children: [
3548
+ /* @__PURE__ */ jsxRuntime.jsx(Heading, { id, className: "sr-only", children: "\uB0B4 \uBA54\uC2DC\uC9C0" }),
3549
+ attachments?.length ? /* @__PURE__ */ jsxRuntime.jsx(Attachments, { items: attachments }) : null,
3550
+ children ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-w-[80%] rounded-xlarge bg-secondary-o10 px-[16px] py-[12px] text-base-regular whitespace-pre-wrap text-sys-text-main wrap-break-word", children }) : null
3551
+ ]
3552
+ }
3553
+ );
3554
+ }
3555
+ const done = !pending && !streaming;
3556
+ const hasActions = done && (copyText != null || onRegenerate != null || onFeedback != null || actions != null);
2199
3557
  return /* @__PURE__ */ jsxRuntime.jsxs(
2200
- DropdownMenuPrimitive__namespace.SubTrigger,
3558
+ "article",
2201
3559
  {
2202
- "data-slot": "dropdown-menu-sub-trigger",
2203
- className: cn(
2204
- "relative flex cursor-default items-center gap-[12px] rounded-xsmall p-[6px] text-base-regular outline-hidden select-none",
2205
- "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:size-[20px]",
2206
- "focus:bg-secondary-o10",
2207
- "data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
2208
- className
2209
- ),
2210
- ...props,
3560
+ "aria-labelledby": id,
3561
+ "data-role": "assistant",
3562
+ className: chunkOQOBPYZT_cjs.cn("flex min-w-0 flex-col gap-[8px]", className),
2211
3563
  children: [
2212
- children,
2213
- /* @__PURE__ */ jsxRuntime.jsx(lucide.ChevronRightIcon, { className: "ml-auto size-[20px]" })
3564
+ /* @__PURE__ */ jsxRuntime.jsx(Heading, { id, className: "sr-only", children: "AI \uB2F5\uBCC0" }),
3565
+ pending ? (
3566
+ // 로딩 표시는 보이는 글자와 함께(스피너만 두지 않는다). 낭독은 패턴의 상태 영역이 맡으므로 여기는 live 가 아니다
3567
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-[8px] text-base-regular text-sys-text-subtle", children: [
3568
+ /* @__PURE__ */ jsxRuntime.jsx(Spinner, { size: 20, variant: "primary", "aria-hidden": true }),
3569
+ "\uC751\uB2F5\uC744 \uC0DD\uC131\uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4"
3570
+ ] })
3571
+ ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-0 text-base-regular text-sys-text-main wrap-break-word", children }),
3572
+ error ? (
3573
+ // role 을 지운다 — 실패 낭독은 패턴의 상태 영역(polite)이 한 번만 한다
3574
+ /* @__PURE__ */ jsxRuntime.jsxs(Alert, { variant: "danger", role: void 0, children: [
3575
+ /* @__PURE__ */ jsxRuntime.jsx(AlertDescription, { children: error }),
3576
+ onRetry ? /* @__PURE__ */ jsxRuntime.jsx(AlertActions, { children: /* @__PURE__ */ jsxRuntime.jsx(Button, { type: "button", variant: "secondaryLink", onClick: onRetry, children: "\uB2E4\uC2DC \uC2DC\uB3C4" }) }) : null
3577
+ ] })
3578
+ ) : null,
3579
+ done && sources?.length ? /* @__PURE__ */ jsxRuntime.jsx(Sources, { items: sources }) : null,
3580
+ hasActions || done && meta ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-[8px]", children: [
3581
+ hasActions ? /* @__PURE__ */ jsxRuntime.jsx(TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "-ml-[6px] flex items-center", children: [
3582
+ copyText != null ? /* @__PURE__ */ jsxRuntime.jsx(CopyAction, { text: copyText }) : null,
3583
+ onRegenerate ? /* @__PURE__ */ jsxRuntime.jsx(ActionButton, { label: "\uB2E4\uC2DC \uC0DD\uC131", onClick: onRegenerate, children: /* @__PURE__ */ jsxRuntime.jsx(lucide.RefreshCw, { size: 16 }) }) : null,
3584
+ onFeedback ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3585
+ /* @__PURE__ */ jsxRuntime.jsx(
3586
+ ActionButton,
3587
+ {
3588
+ label: "\uB3C4\uC6C0\uC774 \uB410\uC5B4\uC694",
3589
+ pressed: feedback === "up",
3590
+ onClick: () => onFeedback("up"),
3591
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucide.ThumbsUp, { size: 16 })
3592
+ }
3593
+ ),
3594
+ /* @__PURE__ */ jsxRuntime.jsx(
3595
+ ActionButton,
3596
+ {
3597
+ label: "\uB3C4\uC6C0\uC774 \uC548 \uB410\uC5B4\uC694",
3598
+ pressed: feedback === "down",
3599
+ onClick: () => onFeedback("down"),
3600
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucide.ThumbsDown, { size: 16 })
3601
+ }
3602
+ )
3603
+ ] }) : null,
3604
+ actions
3605
+ ] }) }) : null,
3606
+ meta ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-[8px] text-small-regular-h text-sys-text-subtler", children: meta }) : null
3607
+ ] }) : null
2214
3608
  ]
2215
3609
  }
2216
3610
  );
2217
3611
  }
2218
- function DropdownMenuSubContent({
2219
- className,
2220
- ...props
3612
+ function useRestoreFocusToOpener({
3613
+ onOpenAutoFocus,
3614
+ onCloseAutoFocus
2221
3615
  }) {
2222
- return /* @__PURE__ */ jsxRuntime.jsx(
2223
- DropdownMenuPrimitive__namespace.SubContent,
2224
- {
2225
- "data-slot": "dropdown-menu-sub-content",
2226
- className: cn(
2227
- "bg-sys-background text-base-regular",
2228
- "overflow-x-hidden overflow-y-auto z-[var(--root-z-index)] shadow-gray-small rounded-xsmall p-[4px] border border-sys-divider-subtler",
2229
- "max-h-(--radix-dropdown-menu-content-available-height) ",
2230
- "min-w-[200px] origin-(--radix-dropdown-menu-content-transform-origin)",
2231
- "data-[state=open]:animate-[fade-in_150ms_ease-out,zoom-in_150ms_ease-out]",
2232
- "data-[state=closed]:animate-[fade-out_150ms_ease-in,zoom-out_150ms_ease-in]",
2233
- "data-[side=top]:animate-[slide-in-bottom_150ms_ease-out]",
2234
- "data-[side=bottom]:animate-[slide-in-top_150ms_ease-out]",
2235
- "data-[side=left]:animate-[slide-in-right_150ms_ease-out]",
2236
- "data-[side=right]:animate-[slide-in-left_150ms_ease-out]",
2237
- className
2238
- ),
2239
- ...props
2240
- }
3616
+ const openerRef = React10.useRef(null);
3617
+ const handleOpenAutoFocus = React10.useCallback(
3618
+ (event) => {
3619
+ openerRef.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
3620
+ onOpenAutoFocus?.(event);
3621
+ },
3622
+ [onOpenAutoFocus]
3623
+ );
3624
+ const handleCloseAutoFocus = React10.useCallback(
3625
+ (event) => {
3626
+ onCloseAutoFocus?.(event);
3627
+ if (event.defaultPrevented) return;
3628
+ const opener = openerRef.current;
3629
+ if (!opener || opener === document.body || !opener.isConnected) return;
3630
+ event.preventDefault();
3631
+ opener.focus({ preventScroll: true });
3632
+ },
3633
+ [onCloseAutoFocus]
2241
3634
  );
3635
+ return { onOpenAutoFocus: handleOpenAutoFocus, onCloseAutoFocus: handleCloseAutoFocus };
2242
3636
  }
2243
- var Form = reactHookForm.FormProvider;
2244
- var FormFieldContext = React12__namespace.createContext({});
2245
- var FormField = ({
2246
- ...props
2247
- }) => {
2248
- return /* @__PURE__ */ jsxRuntime.jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsxRuntime.jsx(reactHookForm.Controller, { ...props }) });
2249
- };
2250
- var useFormField = () => {
2251
- const fieldContext = React12__namespace.useContext(FormFieldContext);
2252
- const itemContext = React12__namespace.useContext(FormItemContext);
2253
- const { getFieldState, formState } = reactHookForm.useFormContext();
2254
- const fieldState = getFieldState(fieldContext.name, formState);
2255
- if (!fieldContext) {
2256
- throw new Error("useFormField should be used within <FormField>");
3637
+ var Dialog = DialogPrimitive__namespace.Root;
3638
+ var DialogTrigger = DialogPrimitive__namespace.Trigger;
3639
+ var DialogPortal = DialogPrimitive__namespace.Portal;
3640
+ var DialogClose = DialogPrimitive__namespace.Close;
3641
+ var DialogOverlay = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
3642
+ DialogPrimitive__namespace.Overlay,
3643
+ {
3644
+ ...props,
3645
+ ref,
3646
+ className: chunkOQOBPYZT_cjs.cn(
3647
+ "fixed inset-0 z-[var(--root-z-index)] bg-sys-blanket",
3648
+ "data-[state=open]:animate-[fade-in_0ms_ease-out,zoom-in_0ms_ease-out]",
3649
+ "data-[state=closed]:animate-[fade-out_0ms_ease-in,zoom-out_0ms_ease-in]",
3650
+ className
3651
+ )
3652
+ }
3653
+ ));
3654
+ DialogOverlay.displayName = DialogPrimitive__namespace.Overlay.displayName;
3655
+ var dialogContentVariants = classVarianceAuthority.cva(null, {
3656
+ variants: {
3657
+ width: {
3658
+ small: "w-[400px]",
3659
+ medium: "w-[600px]",
3660
+ large: "w-[800px]",
3661
+ xlarge: "w-[1000px]"
3662
+ }
3663
+ },
3664
+ defaultVariants: {
3665
+ width: "small"
3666
+ }
3667
+ });
3668
+ var DialogContent = React10__namespace.forwardRef(
3669
+ ({
3670
+ children,
3671
+ className,
3672
+ width,
3673
+ overlayClassName,
3674
+ hideCloseButton,
3675
+ onOpenAutoFocus,
3676
+ onCloseAutoFocus,
3677
+ ...props
3678
+ }, ref) => {
3679
+ const focusHandlers = useRestoreFocusToOpener({ onOpenAutoFocus, onCloseAutoFocus });
3680
+ return /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
3681
+ /* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, { className: overlayClassName }),
3682
+ /* @__PURE__ */ jsxRuntime.jsxs(
3683
+ DialogPrimitive__namespace.Content,
3684
+ {
3685
+ ref,
3686
+ ...focusHandlers,
3687
+ className: chunkOQOBPYZT_cjs.cn(
3688
+ "fixed left-[50%] top-[50%] z-[var(--root-z-index)] translate-x-[-50%] translate-y-[-50%] w-full max-w-[70vw]",
3689
+ "flex flex-col gap-[16px] rounded-medium bg-sys-background p-[32px] shadow-gray-medium duration-200",
3690
+ "data-[state=open]:animate-[fade-in_0ms_ease-out,zoom-in_0ms_ease-out]",
3691
+ "data-[state=closed]:animate-[fade-out_0ms_ease-in,zoom-out_0ms_ease-in]",
3692
+ dialogContentVariants({ width }),
3693
+ className
3694
+ ),
3695
+ ...props,
3696
+ children: [
3697
+ children,
3698
+ !hideCloseButton && /* @__PURE__ */ jsxRuntime.jsx(
3699
+ chunkOQOBPYZT_cjs.IconButton,
3700
+ {
3701
+ asChild: true,
3702
+ variant: "secondaryLink",
3703
+ className: chunkOQOBPYZT_cjs.cn("absolute right-[32px] top-[32px]"),
3704
+ children: /* @__PURE__ */ jsxRuntime.jsxs(DialogPrimitive__namespace.Close, { children: [
3705
+ /* @__PURE__ */ jsxRuntime.jsx(lucide.X, {}),
3706
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only a11y", children: "Close" })
3707
+ ] })
3708
+ }
3709
+ )
3710
+ ]
3711
+ }
3712
+ )
3713
+ ] });
2257
3714
  }
2258
- const { id } = itemContext;
2259
- return {
2260
- id,
2261
- name: fieldContext.name,
2262
- formItemId: `${id}-form-item`,
2263
- formDescriptionId: `${id}-form-item-description`,
2264
- formMessageId: `${id}-form-item-message`,
2265
- ...fieldState
2266
- };
2267
- };
2268
- var FormItemContext = React12__namespace.createContext({});
2269
- var FormItem = React12__namespace.forwardRef(
2270
- ({ className, ...props }, ref) => {
2271
- const id = React12__namespace.useId();
2272
- return /* @__PURE__ */ jsxRuntime.jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("space-y-[4px]", className), ...props }) });
3715
+ );
3716
+ DialogContent.displayName = DialogPrimitive__namespace.Content.displayName;
3717
+ var DialogHeader = (props) => /* @__PURE__ */ jsxRuntime.jsx(
3718
+ "div",
3719
+ {
3720
+ ...props,
3721
+ className: chunkOQOBPYZT_cjs.cn("flex flex-col gap-[16px] text-center sm:text-left", props.className)
2273
3722
  }
2274
3723
  );
2275
- FormItem.displayName = "FormItem";
2276
- var FormLabel = React12__namespace.forwardRef(({ className, required, ...props }, ref) => {
2277
- const { error, formItemId } = useFormField();
2278
- if (required) {
2279
- return /* @__PURE__ */ jsxRuntime.jsxs(Stack, { direction: "row", justifyContent: "start", children: [
3724
+ DialogHeader.displayName = "DialogHeader";
3725
+ var DialogFooter = (props) => /* @__PURE__ */ jsxRuntime.jsx(
3726
+ "div",
3727
+ {
3728
+ ...props,
3729
+ className: chunkOQOBPYZT_cjs.cn("flex flex-col-reverse gap-[8px] sm:flex-row sm:justify-end", props.className)
3730
+ }
3731
+ );
3732
+ DialogFooter.displayName = "DialogFooter";
3733
+ var variantToIcon = {
3734
+ normal: null,
3735
+ success: /* @__PURE__ */ jsxRuntime.jsx(lucide.CircleCheck, { className: "text-success30" }),
3736
+ info: /* @__PURE__ */ jsxRuntime.jsx(lucide.Info, { className: "text-sys-text-subtler" }),
3737
+ warning: /* @__PURE__ */ jsxRuntime.jsx(lucide.TriangleAlert, { className: "text-critical30" }),
3738
+ danger: /* @__PURE__ */ jsxRuntime.jsx(lucide.CircleX, { className: "text-danger30" })
3739
+ };
3740
+ var DialogTitle = React10__namespace.forwardRef(({ variant, children, ...props }, ref) => {
3741
+ if (variant) {
3742
+ return /* @__PURE__ */ jsxRuntime.jsxs(Stack, { spacing: 8, children: [
3743
+ variantToIcon[variant],
2280
3744
  /* @__PURE__ */ jsxRuntime.jsx(
2281
- "label",
3745
+ DialogPrimitive__namespace.Title,
2282
3746
  {
3747
+ ...props,
2283
3748
  ref,
2284
- className: cn(
2285
- error && "text-destructive",
2286
- "inline-block text-sys-text-subtle text-base-medium",
2287
- className
2288
- ),
2289
- htmlFor: formItemId,
2290
- ...props
3749
+ className: chunkOQOBPYZT_cjs.cn("text-h4 text-sys-text-main whitespace-pre-wrap", props.className),
3750
+ children: sanitizeUserText(children)
2291
3751
  }
2292
- ),
2293
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base-medium text-danger30", children: "*" })
3752
+ )
2294
3753
  ] });
3754
+ } else {
3755
+ return /* @__PURE__ */ jsxRuntime.jsx(
3756
+ DialogPrimitive__namespace.Title,
3757
+ {
3758
+ ...props,
3759
+ ref,
3760
+ className: chunkOQOBPYZT_cjs.cn("text-h4 text-sys-text-main whitespace-pre-wrap", props.className),
3761
+ children: sanitizeUserText(children)
3762
+ }
3763
+ );
2295
3764
  }
2296
- return /* @__PURE__ */ jsxRuntime.jsx(
2297
- "label",
2298
- {
2299
- ref,
2300
- className: cn(
2301
- error && "text-destructive",
2302
- "inline-block text-sys-text-subtle text-base-medium",
2303
- className
2304
- ),
2305
- htmlFor: formItemId,
2306
- ...props
2307
- }
2308
- );
2309
3765
  });
2310
- FormLabel.displayName = "FormLabel";
2311
- var FormControlContext = React12__namespace.createContext(null);
2312
- var useFormControlContext = () => React12__namespace.useContext(FormControlContext);
2313
- var formControlVariants = classVarianceAuthority.cva("", {
2314
- variants: {
2315
- maxWidth: {
2316
- default: "max-w-[var(--max-w-form-control)]",
2317
- narrow: "max-w-[var(--max-w-form-control-narrow)]",
2318
- full: ""
2319
- }
2320
- },
2321
- defaultVariants: {
2322
- maxWidth: "default"
3766
+ DialogTitle.displayName = DialogPrimitive__namespace.Title.displayName;
3767
+ var DialogDescription = React10__namespace.forwardRef(({ children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
3768
+ DialogPrimitive__namespace.Description,
3769
+ {
3770
+ ...props,
3771
+ ref,
3772
+ className: chunkOQOBPYZT_cjs.cn("text-base-regular text-sys-text-main whitespace-pre-wrap", props.className),
3773
+ children: sanitizeUserText(children)
2323
3774
  }
2324
- });
2325
- var FormControl = React12__namespace.forwardRef(({ className, maxWidth, ...props }, ref) => {
2326
- const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
2327
- const isInvalid = !!error;
2328
- return /* @__PURE__ */ jsxRuntime.jsx(FormControlContext.Provider, { value: { isInvalid }, children: /* @__PURE__ */ jsxRuntime.jsx(
2329
- reactSlot.Slot,
2330
- {
2331
- ref,
2332
- id: formItemId,
2333
- className: cn(formControlVariants({ maxWidth }), className),
2334
- "aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
2335
- "aria-invalid": isInvalid,
2336
- ...props
3775
+ ));
3776
+ DialogDescription.displayName = DialogPrimitive__namespace.Description.displayName;
3777
+ var Separator2 = React10__namespace.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
3778
+ SeparatorPrimitive__namespace.Root,
3779
+ {
3780
+ ref,
3781
+ decorative,
3782
+ orientation,
3783
+ className: chunkOQOBPYZT_cjs.cn(
3784
+ "shrink-0 bg-sys-divider-subtle",
3785
+ orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
3786
+ className
3787
+ ),
3788
+ ...props
3789
+ }
3790
+ ));
3791
+ Separator2.displayName = SeparatorPrimitive__namespace.Root.displayName;
3792
+ var DrawerModalContext = React10__namespace.createContext(true);
3793
+ var Drawer = ({ modal = true, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(DrawerModalContext.Provider, { value: modal, children: /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Root, { modal, ...props }) });
3794
+ Drawer.displayName = "Drawer";
3795
+ var DrawerTrigger = DialogPrimitive__namespace.Trigger;
3796
+ var DrawerClose = DialogPrimitive__namespace.Close;
3797
+ var DrawerPortal = DialogPrimitive__namespace.Portal;
3798
+ var DrawerOverlay = React10__namespace.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
3799
+ DialogPrimitive__namespace.Overlay,
3800
+ {
3801
+ ...props,
3802
+ className: chunkOQOBPYZT_cjs.cn(
3803
+ "fixed inset-0 z-[var(--root-z-index)] bg-sys-blanket",
3804
+ "data-[state=open]:animate-fade-in",
3805
+ "data-[state=closed]:animate-fade-out",
3806
+ props.className
3807
+ ),
3808
+ ref
3809
+ }
3810
+ ));
3811
+ DrawerOverlay.displayName = DialogPrimitive__namespace.Overlay.displayName;
3812
+ var sheetVariants = classVarianceAuthority.cva(
3813
+ "fixed z-[var(--root-z-index)] flex flex-col overflow-hidden bg-sys-background shadow-gray-medium",
3814
+ {
3815
+ variants: {
3816
+ side: {
3817
+ top: [
3818
+ "inset-x-0 top-0 bottom-auto",
3819
+ "data-[state=open]:animate-slide-in-from-top",
3820
+ "data-[state=closed]:animate-slide-out-to-top"
3821
+ ],
3822
+ bottom: [
3823
+ "inset-x-0 bottom-0 top-auto",
3824
+ "data-[state=open]:animate-slide-in-from-bottom",
3825
+ "data-[state=closed]:animate-slide-out-to-bottom"
3826
+ ],
3827
+ left: [
3828
+ "inset-y-0 left-0 right-auto h-full",
3829
+ "data-[state=open]:animate-slide-in-from-left",
3830
+ "data-[state=closed]:animate-slide-out-to-left"
3831
+ ],
3832
+ right: [
3833
+ "inset-y-0 right-0 left-auto h-full",
3834
+ "data-[state=open]:animate-slide-in-from-right",
3835
+ "data-[state=closed]:animate-slide-out-to-right"
3836
+ ]
3837
+ },
3838
+ size: {
3839
+ small: "w-[360px] max-w-[70vw]",
3840
+ medium: "w-[480px] max-w-[70vw]",
3841
+ large: "w-[720px] max-w-[70vw]",
3842
+ xLarge: "w-[1080px] max-w-[70vw]"
3843
+ }
3844
+ },
3845
+ defaultVariants: {
3846
+ side: "right",
3847
+ size: "large"
2337
3848
  }
2338
- ) });
2339
- });
2340
- FormControl.displayName = "FormControl";
2341
- var FormDescription = React12__namespace.forwardRef(
2342
- ({ className, icon = true, ...props }, ref) => {
2343
- const { formDescriptionId, error } = useFormField();
2344
- if (error) return null;
2345
- return /* @__PURE__ */ jsxRuntime.jsxs(Stack, { spacing: 5, className: "pt-[2px]", children: [
2346
- icon ? /* @__PURE__ */ jsxRuntime.jsx(lucide.Info, { size: 16, "aria-hidden": true, className: "text-sys-text-subtle" }) : null,
2347
- /* @__PURE__ */ jsxRuntime.jsx(
2348
- "p",
3849
+ }
3850
+ );
3851
+ var DrawerContent = React10__namespace.forwardRef(
3852
+ ({ side, size, children, onOpenAutoFocus, onCloseAutoFocus, onInteractOutside, ...props }, ref) => {
3853
+ const focusHandlers = useRestoreFocusToOpener({ onOpenAutoFocus, onCloseAutoFocus });
3854
+ const modal = React10__namespace.useContext(DrawerModalContext);
3855
+ return /* @__PURE__ */ jsxRuntime.jsxs(DrawerPortal, { children: [
3856
+ modal ? /* @__PURE__ */ jsxRuntime.jsx(DrawerOverlay, {}) : null,
3857
+ /* @__PURE__ */ jsxRuntime.jsxs(
3858
+ DialogPrimitive__namespace.Content,
2349
3859
  {
3860
+ ...props,
3861
+ ...focusHandlers,
3862
+ onInteractOutside: (e) => {
3863
+ onInteractOutside?.(e);
3864
+ if (!modal && !e.defaultPrevented) e.preventDefault();
3865
+ },
2350
3866
  ref,
2351
- id: formDescriptionId,
2352
- className: cn("text-small-regular text-sys-text-subtle", className),
2353
- ...props
3867
+ className: chunkOQOBPYZT_cjs.cn(
3868
+ sheetVariants({ side, size }),
3869
+ !modal && "border-l border-sys-border-subtle shadow-none",
3870
+ props.className
3871
+ ),
3872
+ children: [
3873
+ /* @__PURE__ */ jsxRuntime.jsxs(
3874
+ DialogPrimitive__namespace.Close,
3875
+ {
3876
+ className: chunkOQOBPYZT_cjs.cn("absolute right-[24px] top-[24px] disabled:pointer-events-none"),
3877
+ children: [
3878
+ /* @__PURE__ */ jsxRuntime.jsx(lucide.X, { size: 24 }),
3879
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only a11y", children: "Close" })
3880
+ ]
3881
+ }
3882
+ ),
3883
+ children
3884
+ ]
2354
3885
  }
2355
3886
  )
2356
3887
  ] });
2357
3888
  }
2358
3889
  );
2359
- FormDescription.displayName = "FormDescription";
2360
- var FormMessage = React12__namespace.forwardRef(({ className, children, ...props }, ref) => {
2361
- const { error, formMessageId } = useFormField();
2362
- const body = error ? String(error?.message ?? "") : children;
2363
- if (!body) {
2364
- return null;
2365
- }
2366
- return /* @__PURE__ */ jsxRuntime.jsxs(Stack, { spacing: 5, className: "pt-[2px]", children: [
2367
- /* @__PURE__ */ jsxRuntime.jsx(lucide.TriangleAlert, { size: 16, className: "text-danger30" }),
2368
- /* @__PURE__ */ jsxRuntime.jsx(
2369
- "p",
2370
- {
2371
- ref,
2372
- id: formMessageId,
2373
- className: cn("text-small-regular text-danger30", className),
2374
- ...props,
2375
- children: body
2376
- }
3890
+ DrawerContent.displayName = DialogPrimitive__namespace.Content.displayName;
3891
+ var DrawerHeader = ({ ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { ...props, className: chunkOQOBPYZT_cjs.cn("flex flex-col gap-[8px] text-left p-[24px]", props.className) });
3892
+ DrawerHeader.displayName = "DrawerHeader";
3893
+ var DrawerBody = ({ ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
3894
+ "div",
3895
+ {
3896
+ tabIndex: 0,
3897
+ ...props,
3898
+ className: chunkOQOBPYZT_cjs.cn(
3899
+ "flex-1 min-h-0 overflow-y-auto scrollbar-gutter-stable",
3900
+ // DrawerContent 가 overflow-hidden 이라 바깥 outline 은 잘린다 → 안쪽 링
3901
+ "outline-none focus-visible:ring-[2px] focus-visible:ring-inset focus-visible:ring-sys-focus-ring-main",
3902
+ props.className
2377
3903
  )
2378
- ] });
2379
- });
2380
- FormMessage.displayName = "FormMessage";
2381
- var FormValidMessage = React12__namespace.forwardRef(({ className, children, ...props }, ref) => {
2382
- if (!children) {
2383
- return null;
2384
- }
2385
- return /* @__PURE__ */ jsxRuntime.jsxs(Stack, { spacing: 5, className: "pt-[2px]", children: [
2386
- /* @__PURE__ */ jsxRuntime.jsx(lucide.Check, { size: 16, className: "text-success30" }),
2387
- /* @__PURE__ */ jsxRuntime.jsx("p", { ref, className: cn("text-small-regular text-success30", className), ...props, children })
2388
- ] });
2389
- });
2390
- FormValidMessage.displayName = "FormValidMessage";
2391
- var FormHeader = React12__namespace.forwardRef(
2392
- ({ className, title, description, children, ...props }, ref) => {
2393
- return /* @__PURE__ */ jsxRuntime.jsxs(
2394
- "div",
2395
- {
2396
- ref,
2397
- className: cn("flex flex-col gap-[2px] items-start w-full", className),
2398
- ...props,
2399
- children: [
2400
- title && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-h4 text-sys-text-main w-full", children: title }),
2401
- description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-base-regular text-sys-text-main", children: description }),
2402
- children
2403
- ]
2404
- }
2405
- );
2406
3904
  }
2407
3905
  );
2408
- FormHeader.displayName = "FormHeader";
2409
- var FormSectionLevelContext = React12__namespace.createContext(3);
2410
- var FormSection = React12__namespace.forwardRef(
2411
- ({ className, title, level, children, ...props }, ref) => {
2412
- const contextLevel = React12__namespace.useContext(FormSectionLevelContext);
2413
- const Heading = (level ?? contextLevel) === 2 ? "h2" : "h3";
2414
- return /* @__PURE__ */ jsxRuntime.jsxs(
2415
- "div",
2416
- {
2417
- ref,
2418
- className: cn(
2419
- // 섹션 사이 간격 48px 를 구분선 위아래 24px 씩으로 나눈다 (2026-10-13: 앞 섹션의 설명 글줄이 선에 붙어 있었다)
2420
- // 필드 사이 16(한 묶음 안) — 섹션 사이 48(pt-24+pb-24)과 구분되는 단계. 2026-10-17 8차 D2
2421
- "flex flex-col gap-[16px] w-full pt-[24px]",
2422
- // 부모 컨테이너 안에서 자기가 첫 자식이면 (= FormHeader 같은 형제가 앞에 없으면)
2423
- // 16px 의 상단 여백만 둔다 (컨테이너 상단 과공백 방지). FormHeader 가 앞에 있으면 :first-child 가 아니므로 pt-[24px] + 선.
2424
- "first:pt-[16px]",
2425
- // 마지막 섹션 아래에는 여백이 없다 (푸터 버튼 줄이 자기 간격을 가진다)
2426
- "[&:not(:last-child)]:pb-[24px]",
2427
- // 섹션 사이에 연한 가로 구분선 (2026-10-12 블라인드 평가: 구획이 없으면 "제목뿐" 으로 읽혔다). 첫 섹션 위에는 없다
2428
- "[&:not(:first-child)]:border-t [&:not(:first-child)]:border-sys-divider-subtle",
2429
- className
2430
- ),
2431
- ...props,
2432
- children: [
2433
- title && /* @__PURE__ */ jsxRuntime.jsx(Heading, { className: "text-h4 text-sys-text-main w-full", children: title }),
2434
- children
2435
- ]
2436
- }
2437
- );
3906
+ DrawerBody.displayName = "DrawerBody";
3907
+ var DrawerFooter = ({ ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
3908
+ "div",
3909
+ {
3910
+ ...props,
3911
+ className: chunkOQOBPYZT_cjs.cn("flex gap-[8px] justify-end mt-[16px] px-[24px] pb-[26px]", props.className)
2438
3912
  }
2439
3913
  );
2440
- FormSection.displayName = "FormSection";
2441
- var formFooterVariants = classVarianceAuthority.cva("flex flex-col justify-end overflow-clip pt-[48px] w-full", {
2442
- variants: {
2443
- align: {
2444
- start: "items-start",
2445
- end: "items-end",
2446
- center: "items-center",
2447
- stretch: "items-stretch"
2448
- }
2449
- },
2450
- defaultVariants: {
2451
- align: "end"
3914
+ DrawerFooter.displayName = "DrawerFooter";
3915
+ var DrawerTitle = React10__namespace.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
3916
+ DialogPrimitive__namespace.Title,
3917
+ {
3918
+ ref,
3919
+ ...props,
3920
+ className: chunkOQOBPYZT_cjs.cn("text-h4 text-sys-text-main", props.className)
2452
3921
  }
2453
- });
2454
- var FormFooter = React12__namespace.forwardRef(
2455
- ({ className, align, children, ...props }, ref) => {
2456
- return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn(formFooterVariants({ align }), className), ...props, children });
3922
+ ));
3923
+ DrawerTitle.displayName = DialogPrimitive__namespace.Title.displayName;
3924
+ var DrawerDescription = React10__namespace.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
3925
+ DialogPrimitive__namespace.Description,
3926
+ {
3927
+ ref,
3928
+ ...props,
3929
+ className: chunkOQOBPYZT_cjs.cn("text-base-regular text-sys-text-main", props.className)
2457
3930
  }
2458
- );
2459
- FormFooter.displayName = "FormFooter";
3931
+ ));
3932
+ DrawerDescription.displayName = DialogPrimitive__namespace.Description.displayName;
2460
3933
  function isValidIconComponent(componentName) {
2461
3934
  return componentName in lucide__namespace.icons;
2462
3935
  }
@@ -2474,7 +3947,7 @@ function LucideIcon({ iconComponentName, size = 16, ...props }) {
2474
3947
  if (!Icon) return null;
2475
3948
  return /* @__PURE__ */ jsxRuntime.jsx(Icon, { size, ...props });
2476
3949
  }
2477
- var EmptyBoxIllustration = React12__namespace.forwardRef(
3950
+ var EmptyBoxIllustration = React10__namespace.forwardRef(
2478
3951
  ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
2479
3952
  "svg",
2480
3953
  {
@@ -2485,7 +3958,7 @@ var EmptyBoxIllustration = React12__namespace.forwardRef(
2485
3958
  fill: "none",
2486
3959
  "aria-hidden": "true",
2487
3960
  focusable: "false",
2488
- className: cn("shrink-0 text-sys-text-subtler", className),
3961
+ className: chunkOQOBPYZT_cjs.cn("shrink-0 text-sys-text-subtler", className),
2489
3962
  ...props,
2490
3963
  children: [
2491
3964
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -2568,7 +4041,7 @@ var EmptyBoxIllustration = React12__namespace.forwardRef(
2568
4041
  )
2569
4042
  );
2570
4043
  EmptyBoxIllustration.displayName = "EmptyBoxIllustration";
2571
- var TabsContext = React12__namespace.createContext({
4044
+ var TabsContext = React10__namespace.createContext({
2572
4045
  variant: "box",
2573
4046
  size: "medium"
2574
4047
  });
@@ -2578,7 +4051,7 @@ function Tabs({
2578
4051
  size = "medium",
2579
4052
  ...props
2580
4053
  }) {
2581
- return /* @__PURE__ */ jsxRuntime.jsx(TabsContext.Provider, { value: { variant, size }, children: /* @__PURE__ */ jsxRuntime.jsx(TabsPrimitive__namespace.Root, { "data-slot": "tabs", className: cn("flex flex-col", className), ...props }) });
4054
+ return /* @__PURE__ */ jsxRuntime.jsx(TabsContext.Provider, { value: { variant, size }, children: /* @__PURE__ */ jsxRuntime.jsx(TabsPrimitive__namespace.Root, { "data-slot": "tabs", className: chunkOQOBPYZT_cjs.cn("flex flex-col", className), ...props }) });
2582
4055
  }
2583
4056
  var tabListVariants = classVarianceAuthority.cva("inline-flex w-fit items-center justify-center", {
2584
4057
  variants: {
@@ -2602,15 +4075,15 @@ function TabsList({
2602
4075
  size: sizeProp,
2603
4076
  ...props
2604
4077
  }) {
2605
- const context = React12__namespace.useContext(TabsContext);
4078
+ const context = React10__namespace.useContext(TabsContext);
2606
4079
  const variant = variantProp ?? context.variant;
2607
4080
  const size = sizeProp ?? context.size;
2608
- const value = React12__namespace.useMemo(() => ({ variant, size }), [variant, size]);
4081
+ const value = React10__namespace.useMemo(() => ({ variant, size }), [variant, size]);
2609
4082
  return /* @__PURE__ */ jsxRuntime.jsx(TabsContext.Provider, { value, children: /* @__PURE__ */ jsxRuntime.jsx(
2610
4083
  TabsPrimitive__namespace.List,
2611
4084
  {
2612
4085
  "data-slot": "tabs-list",
2613
- className: cn(tabListVariants({ variant, size }), className),
4086
+ className: chunkOQOBPYZT_cjs.cn(tabListVariants({ variant, size }), className),
2614
4087
  ...props
2615
4088
  }
2616
4089
  ) });
@@ -2644,12 +4117,12 @@ var tabTriggerVariants = classVarianceAuthority.cva("text-sys-text-subtle", {
2644
4117
  }
2645
4118
  });
2646
4119
  function TabsTrigger({ className, ...props }) {
2647
- const { variant, size } = React12__namespace.useContext(TabsContext);
4120
+ const { variant, size } = React10__namespace.useContext(TabsContext);
2648
4121
  return /* @__PURE__ */ jsxRuntime.jsx(
2649
4122
  TabsPrimitive__namespace.Trigger,
2650
4123
  {
2651
4124
  "data-slot": "tabs-trigger",
2652
- className: cn(
4125
+ className: chunkOQOBPYZT_cjs.cn(
2653
4126
  "inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center rounded-xsmall whitespace-nowrap transition-[color,box-shadow]",
2654
4127
  "focus-visible:outline-sys-focus-ring-main focus-visible:outline-[2px]",
2655
4128
  "disabled:pointer-events-none disabled:opacity-50",
@@ -2665,35 +4138,35 @@ function TabsContent({ className, ...props }) {
2665
4138
  TabsPrimitive__namespace.Content,
2666
4139
  {
2667
4140
  "data-slot": "tabs-content",
2668
- className: cn("flex-1 outline-none", className),
4141
+ className: chunkOQOBPYZT_cjs.cn("flex-1 outline-none", className),
2669
4142
  ...props
2670
4143
  }
2671
4144
  );
2672
4145
  }
2673
- var PageHeaderContext = React12.createContext(void 0);
4146
+ var PageHeaderContext = React10.createContext(void 0);
2674
4147
  function PageHeaderProvider({ children }) {
2675
- const [pageHeader, setPageHeaderState] = React12.useState({});
2676
- const setPageHeader = React12.useCallback((state) => {
4148
+ const [pageHeader, setPageHeaderState] = React10.useState({});
4149
+ const setPageHeader = React10.useCallback((state) => {
2677
4150
  setPageHeaderState((prev) => typeof state === "function" ? state(prev) : state);
2678
4151
  }, []);
2679
- const resetPageHeader = React12.useCallback(() => {
4152
+ const resetPageHeader = React10.useCallback(() => {
2680
4153
  setPageHeaderState({});
2681
4154
  }, []);
2682
- const value = React12.useMemo(
4155
+ const value = React10.useMemo(
2683
4156
  () => ({ pageHeader, setPageHeader, resetPageHeader }),
2684
4157
  [pageHeader, resetPageHeader, setPageHeader]
2685
4158
  );
2686
4159
  return /* @__PURE__ */ jsxRuntime.jsx(PageHeaderContext.Provider, { value, children });
2687
4160
  }
2688
4161
  function usePageHeader() {
2689
- const context = React12.useContext(PageHeaderContext);
4162
+ const context = React10.useContext(PageHeaderContext);
2690
4163
  if (context === void 0) {
2691
4164
  throw new Error("usePageHeader must be used within a PageHeaderProvider");
2692
4165
  }
2693
4166
  return context;
2694
4167
  }
2695
4168
  function PageHeaderTabs({ tabs, activeTab, onTabChange }) {
2696
- const value = React12.useMemo(() => {
4169
+ const value = React10.useMemo(() => {
2697
4170
  const selected = tabs.find((tab) => {
2698
4171
  const values = [tab.value, ...tab.matchValues ?? []];
2699
4172
  return values.includes(activeTab ?? "");
@@ -2719,7 +4192,7 @@ function PageHeaderTabs({ tabs, activeTab, onTabChange }) {
2719
4192
  value: tab.value,
2720
4193
  disabled: tab.disabled,
2721
4194
  "aria-controls": void 0,
2722
- className: cn("gap-[4px]", "disabled:text-sys-text-disabled disabled:opacity-100"),
4195
+ className: chunkOQOBPYZT_cjs.cn("gap-[4px]", "disabled:text-sys-text-disabled disabled:opacity-100"),
2723
4196
  children: [
2724
4197
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: tab.label }),
2725
4198
  tab.badge ? /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "primary", children: tab.badge }) : null
@@ -2775,7 +4248,7 @@ function PageHeader({
2775
4248
  /* @__PURE__ */ jsxRuntime.jsx(
2776
4249
  "header",
2777
4250
  {
2778
- className: cn(
4251
+ className: chunkOQOBPYZT_cjs.cn(
2779
4252
  // 양옆 24: 띠(배경)는 화면 끝까지인데 내용·표가 64 안쪽이라 심판이 "header band is wider than the table" — 2026-10-18 10차 ①
2780
4253
  // 띠 끝 선은 탭이 있어도 header 가 전체 폭으로 그린다(탭 줄에만 그리면 양끝에서 선이 끊겨 "ends abruptly behind the tabs")
2781
4254
  "@container w-full shrink-0 bg-sys-background bg-[image:var(--color-page-header-bg)] px-[24px] pt-[24px]",
@@ -2801,7 +4274,7 @@ function PageHeader({
2801
4274
  hasControlsRow ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full flex-wrap items-start gap-[12px] pb-[24px]", children: [
2802
4275
  bottomLeft ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex shrink-0 items-center gap-[8px]", children: bottomLeft }) : null,
2803
4276
  hasBottomDivider ? /* @__PURE__ */ jsxRuntime.jsx(
2804
- Separator,
4277
+ Separator2,
2805
4278
  {
2806
4279
  "aria-hidden": true,
2807
4280
  orientation: "vertical",
@@ -2828,14 +4301,14 @@ function Pagination({
2828
4301
  ...rest
2829
4302
  }) {
2830
4303
  const countOfAllPages = total > 0 && rowsPerPage > 0 ? Math.ceil(total / rowsPerPage) : 0;
2831
- const [pageStartIdx, setPageStartIdx] = React12__namespace.useState(1);
2832
- const [pageEndIdx, setPageEndIdx] = React12__namespace.useState(count);
2833
- const handleGoToFirst = React12__namespace.useCallback(() => {
4304
+ const [pageStartIdx, setPageStartIdx] = React10__namespace.useState(1);
4305
+ const [pageEndIdx, setPageEndIdx] = React10__namespace.useState(count);
4306
+ const handleGoToFirst = React10__namespace.useCallback(() => {
2834
4307
  setPageStartIdx(1);
2835
4308
  setPageEndIdx(count);
2836
4309
  onChange(1);
2837
4310
  }, [onChange, count]);
2838
- const handleGoToPrev = React12__namespace.useCallback(() => {
4311
+ const handleGoToPrev = React10__namespace.useCallback(() => {
2839
4312
  if (page === 1) {
2840
4313
  return;
2841
4314
  }
@@ -2845,7 +4318,7 @@ function Pagination({
2845
4318
  }
2846
4319
  onChange(page - 1);
2847
4320
  }, [onChange, page, pageStartIdx]);
2848
- const handleGoToNext = React12__namespace.useCallback(() => {
4321
+ const handleGoToNext = React10__namespace.useCallback(() => {
2849
4322
  if (page === countOfAllPages) {
2850
4323
  return;
2851
4324
  }
@@ -2855,12 +4328,12 @@ function Pagination({
2855
4328
  }
2856
4329
  onChange(page + 1);
2857
4330
  }, [countOfAllPages, onChange, page, pageEndIdx]);
2858
- const handleGoToEnd = React12__namespace.useCallback(() => {
4331
+ const handleGoToEnd = React10__namespace.useCallback(() => {
2859
4332
  setPageStartIdx(countOfAllPages - (count - 1));
2860
4333
  setPageEndIdx(countOfAllPages);
2861
4334
  onChange(countOfAllPages);
2862
4335
  }, [countOfAllPages, onChange, count]);
2863
- React12__namespace.useEffect(() => {
4336
+ React10__namespace.useEffect(() => {
2864
4337
  if (page < pageStartIdx || page > pageEndIdx) {
2865
4338
  const currentBlock = Math.ceil(page / count);
2866
4339
  const newStart = (currentBlock - 1) * count + 1;
@@ -2868,7 +4341,7 @@ function Pagination({
2868
4341
  setPageEndIdx(newStart + count - 1);
2869
4342
  }
2870
4343
  }, [count, page, pageStartIdx, pageEndIdx]);
2871
- const label = React12__namespace.useMemo(() => {
4344
+ const label = React10__namespace.useMemo(() => {
2872
4345
  const n = total.toLocaleString();
2873
4346
  const start = total === 0 ? 0 : (page - 1) * rowsPerPage + 1;
2874
4347
  const end = total === 0 ? 0 : Math.min(page * rowsPerPage, total);
@@ -2941,7 +4414,7 @@ function PaginationWrapper({ className, ...props }) {
2941
4414
  role: "navigation",
2942
4415
  "aria-label": "pagination",
2943
4416
  "data-slot": "pagination",
2944
- className: cn("mx-auto flex w-full items-center justify-center", className),
4417
+ className: chunkOQOBPYZT_cjs.cn("mx-auto flex w-full items-center justify-center", className),
2945
4418
  style: { paddingTop: "16px" },
2946
4419
  ...props
2947
4420
  }
@@ -2952,13 +4425,13 @@ function PaginationContent({ className, ...props }) {
2952
4425
  "ul",
2953
4426
  {
2954
4427
  "data-slot": "pagination-content",
2955
- className: cn("flex flex-row items-center gap-[4px]", className),
4428
+ className: chunkOQOBPYZT_cjs.cn("flex flex-row items-center gap-[4px]", className),
2956
4429
  ...props
2957
4430
  }
2958
4431
  );
2959
4432
  }
2960
4433
  function PaginationItem({ className, ...props }) {
2961
- return /* @__PURE__ */ jsxRuntime.jsx("li", { "data-slot": "pagination-item", className: cn("flex", className), ...props });
4434
+ return /* @__PURE__ */ jsxRuntime.jsx("li", { "data-slot": "pagination-item", className: chunkOQOBPYZT_cjs.cn("flex", className), ...props });
2962
4435
  }
2963
4436
  var paginationLinkVariants = classVarianceAuthority.cva(
2964
4437
  "inline-flex min-w-[28px] h-[28px] p-[2px] flex-col justify-center items-center gap-[4px] text-base-semibold shrink-0 cursor-pointer transition-colors",
@@ -2988,13 +4461,13 @@ function PaginationLink({
2988
4461
  href,
2989
4462
  ...props
2990
4463
  }) {
2991
- const wrappedChildren = React12__namespace.Children.map(children, (child) => {
4464
+ const wrappedChildren = React10__namespace.Children.map(children, (child) => {
2992
4465
  if (typeof child === "string" || typeof child === "number") {
2993
4466
  return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex items-center justify-center", children: child });
2994
4467
  }
2995
4468
  return child;
2996
4469
  });
2997
- const handleClick = React12__namespace.useCallback(
4470
+ const handleClick = React10__namespace.useCallback(
2998
4471
  (e) => {
2999
4472
  e.preventDefault();
3000
4473
  onClick?.(e);
@@ -3019,7 +4492,7 @@ function PaginationLink({
3019
4492
  "aria-current": isActive ? "page" : void 0,
3020
4493
  "data-slot": "pagination-link",
3021
4494
  "data-active": isActive,
3022
- className: cn(paginationLinkVariants({ variant: isActive, disabled }), className),
4495
+ className: chunkOQOBPYZT_cjs.cn(paginationLinkVariants({ variant: isActive, disabled }), className),
3023
4496
  ...buttonLike,
3024
4497
  ...props,
3025
4498
  onClick: handleClick,
@@ -3028,16 +4501,16 @@ function PaginationLink({
3028
4501
  );
3029
4502
  }
3030
4503
  function PaginationFirst({ className, ...props }) {
3031
- return /* @__PURE__ */ jsxRuntime.jsx(PaginationLink, { "aria-label": "\uCCAB \uD398\uC774\uC9C0", className: cn(className), ...props, children: /* @__PURE__ */ jsxRuntime.jsx(lucide.ChevronsLeft, {}) });
4504
+ return /* @__PURE__ */ jsxRuntime.jsx(PaginationLink, { "aria-label": "\uCCAB \uD398\uC774\uC9C0", className: chunkOQOBPYZT_cjs.cn(className), ...props, children: /* @__PURE__ */ jsxRuntime.jsx(lucide.ChevronsLeft, {}) });
3032
4505
  }
3033
4506
  function PaginationPrevious({ className, ...props }) {
3034
- return /* @__PURE__ */ jsxRuntime.jsx(PaginationLink, { "aria-label": "\uC774\uC804", className: cn(className), ...props, children: /* @__PURE__ */ jsxRuntime.jsx(lucide.ChevronLeft, {}) });
4507
+ return /* @__PURE__ */ jsxRuntime.jsx(PaginationLink, { "aria-label": "\uC774\uC804", className: chunkOQOBPYZT_cjs.cn(className), ...props, children: /* @__PURE__ */ jsxRuntime.jsx(lucide.ChevronLeft, {}) });
3035
4508
  }
3036
4509
  function PaginationLast({ className, ...props }) {
3037
- return /* @__PURE__ */ jsxRuntime.jsx(PaginationLink, { "aria-label": "\uB9C8\uC9C0\uB9C9 \uD398\uC774\uC9C0", className: cn(className), ...props, children: /* @__PURE__ */ jsxRuntime.jsx(lucide.ChevronsRight, {}) });
4510
+ return /* @__PURE__ */ jsxRuntime.jsx(PaginationLink, { "aria-label": "\uB9C8\uC9C0\uB9C9 \uD398\uC774\uC9C0", className: chunkOQOBPYZT_cjs.cn(className), ...props, children: /* @__PURE__ */ jsxRuntime.jsx(lucide.ChevronsRight, {}) });
3038
4511
  }
3039
4512
  function PaginationNext({ className, ...props }) {
3040
- return /* @__PURE__ */ jsxRuntime.jsx(PaginationLink, { "aria-label": "\uB2E4\uC74C", className: cn(className), ...props, children: /* @__PURE__ */ jsxRuntime.jsx(lucide.ChevronRight, {}) });
4513
+ return /* @__PURE__ */ jsxRuntime.jsx(PaginationLink, { "aria-label": "\uB2E4\uC74C", className: chunkOQOBPYZT_cjs.cn(className), ...props, children: /* @__PURE__ */ jsxRuntime.jsx(lucide.ChevronRight, {}) });
3041
4514
  }
3042
4515
  var getPaginationRange = (total, page, limit) => {
3043
4516
  if (total === 0) return { start: 0, end: 0 };
@@ -3058,7 +4531,7 @@ function Panel({
3058
4531
  children,
3059
4532
  ...props
3060
4533
  }) {
3061
- const id = React12__namespace.useId();
4534
+ const id = React10__namespace.useId();
3062
4535
  const hasTitle = title != null;
3063
4536
  const Heading = level === 3 ? "h3" : "h2";
3064
4537
  const Root9 = hasTitle ? "section" : "div";
@@ -3067,7 +4540,7 @@ function Panel({
3067
4540
  {
3068
4541
  "aria-labelledby": hasTitle ? id : void 0,
3069
4542
  "data-slot": "panel",
3070
- className: cn(
4543
+ className: chunkOQOBPYZT_cjs.cn(
3071
4544
  "flex min-w-0 flex-col",
3072
4545
  appearance !== "none" && "rounded-medium border border-sys-divider-subtle bg-sys-background",
3073
4546
  padding === "large" ? "gap-[16px]" : "gap-[12px]",
@@ -3096,346 +4569,7 @@ function Panel({
3096
4569
  }
3097
4570
  );
3098
4571
  }
3099
-
3100
- // src/utils/columnWidths.ts
3101
- var TEXT_COLUMN_GROW_LIMIT = 2;
3102
- function distributeColumnWidths(cols, available) {
3103
- const widths = cols.map((c) => c.content);
3104
- let extra = available - widths.reduce((a, b) => a + b, 0);
3105
- if (extra <= 0) return widths;
3106
- const weight = (i) => Math.max(1, cols[i].content);
3107
- const fill = (idx, cap) => {
3108
- let active = idx.filter((i) => widths[i] < cap(i));
3109
- while (extra > 0.01 && active.length > 0) {
3110
- const total = active.reduce((s, i) => s + weight(i), 0);
3111
- let used = 0;
3112
- for (const i of active) {
3113
- const give = Math.min(extra * weight(i) / total, cap(i) - widths[i]);
3114
- widths[i] += give;
3115
- used += give;
3116
- }
3117
- extra -= used;
3118
- active = active.filter((i) => widths[i] < cap(i) - 0.01);
3119
- }
3120
- };
3121
- const all = cols.map((_, i) => i);
3122
- const grow = all.filter((i) => cols[i].grow);
3123
- const maxOf = (i) => cols[i].max ?? Infinity;
3124
- fill(grow, (i) => Math.min(maxOf(i), cols[i].content * TEXT_COLUMN_GROW_LIMIT));
3125
- fill(all, maxOf);
3126
- const last = grow.length > 0 ? grow : all;
3127
- fill(last, () => Infinity);
3128
- const rounded = widths.map((w) => Math.round(w));
3129
- rounded[last[last.length - 1]] += Math.round(available) - rounded.reduce((a, b) => a + b, 0);
3130
- return rounded;
3131
- }
3132
- var useIsoLayoutEffect = typeof window === "undefined" ? React12__namespace.useEffect : React12__namespace.useLayoutEffect;
3133
- function measureColumnWidths(table) {
3134
- const cells = Array.from(table.rows[0]?.cells ?? []);
3135
- if (cells.length === 0 || cells.some((c) => c.colSpan > 1)) return null;
3136
- const cols = Array.from(table.querySelectorAll(":scope > colgroup > col"));
3137
- const saved = [table.style.width, table.style.tableLayout, ...cols.map((c) => c.style.width)];
3138
- table.style.width = "max-content";
3139
- table.style.tableLayout = "auto";
3140
- cols.forEach((c) => c.style.width = "");
3141
- const widths = cells.map((c) => c.getBoundingClientRect().width);
3142
- table.style.width = saved[0];
3143
- table.style.tableLayout = saved[1];
3144
- cols.forEach((c, i) => c.style.width = saved[i + 2]);
3145
- return widths.every((w) => w > 0) ? widths : null;
3146
- }
3147
- var sameWidths = (a, b) => a === b || !!a && !!b && a.length === b.length && a.every((w, i) => w === b[i]);
3148
- var Table = React12__namespace.forwardRef(
3149
- ({ className, children, ...props }, ref) => {
3150
- const tableRef = React12__namespace.useRef(null);
3151
- const setRef = React12__namespace.useCallback(
3152
- (el) => {
3153
- tableRef.current = el;
3154
- if (typeof ref === "function") ref(el);
3155
- else if (ref) ref.current = el;
3156
- },
3157
- [ref]
3158
- );
3159
- const [widths, setWidths] = React12__namespace.useState(null);
3160
- const fit = !/(^|\s)table-fixed(\s|$)/.test(className ?? "");
3161
- useIsoLayoutEffect(() => {
3162
- const table = tableRef.current;
3163
- const wrap = table?.parentElement;
3164
- if (!fit || !table || !wrap) return;
3165
- const update = () => {
3166
- const content = measureColumnWidths(table);
3167
- const available = wrap.clientWidth;
3168
- let next = null;
3169
- if (content && available > content.reduce((a, b) => a + b, 0)) {
3170
- const firstIsNumber = table.rows[0].cells[0].dataset.align === "right";
3171
- next = distributeColumnWidths(
3172
- content.map((w, i) => ({ content: w, grow: i === 0 && !firstIsNumber })),
3173
- available
3174
- );
3175
- }
3176
- setWidths((prev) => sameWidths(prev, next) ? prev : next);
3177
- };
3178
- update();
3179
- const ro = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(update);
3180
- ro?.observe(wrap);
3181
- const mo = new MutationObserver(update);
3182
- mo.observe(table, { childList: true, subtree: true, characterData: true });
3183
- return () => {
3184
- ro?.disconnect();
3185
- mo.disconnect();
3186
- };
3187
- }, [fit]);
3188
- return (
3189
- // 둥근 테두리 상자(AgGridTable 과 같은 8px·같은 선). overflow-auto 라 내용이 라운드로 잘린다 (2026-10-17 이슈 47 4차)
3190
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full overflow-auto rounded-medium border border-sys-divider-subtle", children: /* @__PURE__ */ jsxRuntime.jsxs(
3191
- "table",
3192
- {
3193
- ref: setRef,
3194
- className: cn(
3195
- "w-full border-collapse border-spacing-0 border-0",
3196
- widths ? "table-fixed" : "table-auto",
3197
- className
3198
- ),
3199
- ...props,
3200
- children: [
3201
- widths && /* @__PURE__ */ jsxRuntime.jsx("colgroup", { children: widths.map((w, i) => (
3202
- // 열은 순서로만 구분된다(첫 행 셀 순서)
3203
- // eslint-disable-next-line react/no-array-index-key
3204
- /* @__PURE__ */ jsxRuntime.jsx("col", { style: { width: w } }, i)
3205
- )) }),
3206
- children
3207
- ]
3208
- }
3209
- ) })
3210
- );
3211
- }
3212
- );
3213
- var tableHeaderVariant = classVarianceAuthority.cva(
3214
- // 헤더: 아주 연한 바탕(sys-table-header-background = o10) + 아래 1px 선(행 선과 같은 토큰). 양끝 라운드는 바깥 상자가 맡는다.
3215
- // 선은 th 에 — border-separate(ParameterTable)에서도 그려지도록 (2026-10-17 이슈 47 4차)
3216
- "[&_tr]:border-none [&_tr:hover]:bg-transparent [&_tr:active]:bg-transparent [&_th]:bg-sys-table-header-background [&_th]:border-b [&_th]:border-sys-divider-subtle [&_th]:text-sys-text-subtle [&_th]:text-h6",
3217
- {
3218
- variants: {
3219
- spacing: {
3220
- compact: "[&_th]:px-[12px] [&_th]:py-[2px]",
3221
- normal: "[&_th]:px-[12px] [&_th]:py-[8px]"
3222
- }
3223
- },
3224
- defaultVariants: {
3225
- spacing: "normal"
3226
- }
3227
- }
3228
- );
3229
- var TableHeader = React12__namespace.forwardRef(
3230
- ({ className, spacing, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("thead", { ref, className: cn(tableHeaderVariant({ spacing }), className), ...props })
3231
- );
3232
- var tableBodyVariant = classVarianceAuthority.cva(null, {
3233
- variants: {
3234
- spacing: {
3235
- normal: "[&_td]:h-[50px]",
3236
- compact: "[&_td]:h-[36px]"
3237
- }
3238
- },
3239
- defaultVariants: {
3240
- spacing: "normal"
3241
- }
3242
- });
3243
- var TableBody = React12__namespace.forwardRef(
3244
- ({ className, spacing, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("tbody", { ref, className: cn(tableBodyVariant({ spacing }), className), ...props })
3245
- );
3246
- var TablePagination = React12__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
3247
- "div",
3248
- {
3249
- ref,
3250
- className: cn("mt-0 flex items-center justify-center", className),
3251
- ...props
3252
- }
3253
- ));
3254
- var TableRow = React12__namespace.forwardRef(
3255
- ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
3256
- "tr",
3257
- {
3258
- ref,
3259
- className: cn(
3260
- // 행 선은 헤더·바깥 테두리와 같은 토큰, 마지막 행은 바깥 테두리와 겹치지 않게 선 없음
3261
- "border-b border-sys-divider-subtle border-solid last:border-b-0 hover:bg-sys-table-hover active:bg-sys-table-press data-[state=selected]:bg-sys-table-select",
3262
- className
3263
- ),
3264
- ...props
3265
- }
3266
- )
3267
- );
3268
- var NUMBER_COLUMN_CLASS = "whitespace-nowrap";
3269
- var tableHeadVariant = classVarianceAuthority.cva(null, {
3270
- variants: {
3271
- align: {
3272
- left: "text-left",
3273
- center: "text-center",
3274
- right: `text-right ${NUMBER_COLUMN_CLASS}`
3275
- }
3276
- },
3277
- defaultVariants: {
3278
- align: "left"
3279
- }
3280
- });
3281
- var TableHead = React12__namespace.forwardRef(
3282
- ({ className, align, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
3283
- "th",
3284
- {
3285
- ref,
3286
- "data-align": alignFromClassName(align, className) ?? "left",
3287
- className: cn(tableHeadVariant({ align: alignFromClassName(align, className) }), className),
3288
- ...props
3289
- }
3290
- )
3291
- );
3292
- var tableCellMasterVariant = classVarianceAuthority.cva("align-middle px-[12px]", {
3293
- variants: {
3294
- align: {
3295
- left: "",
3296
- center: "[&>_.c-wrap-main]:justify-center",
3297
- // 머리글 없는 표도 숫자 셀은 한 줄
3298
- right: `[&>_.c-wrap-main]:justify-end ${NUMBER_COLUMN_CLASS}`
3299
- }
3300
- },
3301
- defaultVariants: {
3302
- align: "left"
3303
- }
3304
- });
3305
- function alignFromClassName(align, className) {
3306
- if (align) return align;
3307
- if (/(^|\s)text-right(\s|$)/.test(className ?? "")) return "right";
3308
- if (/(^|\s)text-center(\s|$)/.test(className ?? "")) return "center";
3309
- return void 0;
3310
- }
3311
- var TableCell = React12__namespace.forwardRef(
3312
- ({ className, children, desc, customElement, align, ...props }, ref) => {
3313
- return /* @__PURE__ */ jsxRuntime.jsx(
3314
- "td",
3315
- {
3316
- ref,
3317
- "data-align": alignFromClassName(align, className) ?? "left",
3318
- className: cn(
3319
- tableCellMasterVariant({ align: alignFromClassName(align, className) }),
3320
- className
3321
- ),
3322
- ...props,
3323
- children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "c-wrap-main flex gap-[12px] items-center w-full h-full text-base-regular text-sys-text-main", children: [
3324
- customElement && customElement,
3325
- React12__namespace.isValidElement(children) ? desc ? (
3326
- // 엘리먼트 자식(Badge 등)도 desc 를 아래에 함께 보여준다
3327
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
3328
- children,
3329
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "c-text-overflow text-small-regular text-sys-text-subtler", children: desc })
3330
- ] })
3331
- ) : /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
3332
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "c-text-overflow text-base-regular text-sys-text-main", children }),
3333
- desc && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "c-text-overflow text-small-regular text-sys-text-subtler", children: desc })
3334
- ] })
3335
- ] })
3336
- }
3337
- );
3338
- }
3339
- );
3340
- function SortIcon({ direction = "asc" }) {
3341
- const activeColor = "var(--color-secondary60)";
3342
- const inactiveColor = "var(--color-secondary30)";
3343
- return /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "22", height: "24", viewBox: "0 0 22 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: direction ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3344
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M11 5L6 10H16L11 5Z", fill: direction === "asc" ? activeColor : inactiveColor }),
3345
- /* @__PURE__ */ jsxRuntime.jsx(
3346
- "path",
3347
- {
3348
- d: "M11 19L16 14L6 14L11 19Z",
3349
- fill: direction === "asc" ? inactiveColor : activeColor
3350
- }
3351
- )
3352
- ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3353
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M11 5L6 10H16L11 5Z", fill: inactiveColor }),
3354
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M11 19L16 14L6 14L11 19Z", fill: inactiveColor })
3355
- ] }) });
3356
- }
3357
- Table.displayName = "Table";
3358
- TableHeader.displayName = "TableHeader";
3359
- TableBody.displayName = "TableBody";
3360
- TablePagination.displayName = "TablePagination";
3361
- TableRow.displayName = "TableRow";
3362
- TableHead.displayName = "TableHead";
3363
- TableCell.displayName = "TableCell";
3364
- function Skeleton({ className, ...props }) {
3365
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("animate-pulse rounded-md bg-secondary20", className), ...props });
3366
- }
3367
- function seededWidth(row, col, min, max) {
3368
- const hash = (row * 31 + col * 17 + 7) * 2654435761 >>> 0;
3369
- return min + hash % (max - min + 1);
3370
- }
3371
- function buildColumns(columnDefs, selectionColumnWidth) {
3372
- const cols = [];
3373
- if (selectionColumnWidth != null) {
3374
- cols.push({ width: selectionColumnWidth });
3375
- }
3376
- for (const def of columnDefs) {
3377
- cols.push({
3378
- width: def.width,
3379
- flex: def.flex,
3380
- minWidth: def.minWidth
3381
- });
3382
- }
3383
- return cols;
3384
- }
3385
- function getColStyle(col) {
3386
- if (col.width != null) {
3387
- return { width: col.width, flexShrink: 0 };
3388
- }
3389
- if (col.flex != null) {
3390
- return { flex: col.flex, minWidth: col.minWidth };
3391
- }
3392
- return { flex: 1 };
3393
- }
3394
- function TableSkeleton({
3395
- columnDefs = [],
3396
- rowLength = 3,
3397
- rowHeight = 50,
3398
- headerHeight = 40,
3399
- selectionColumnWidth
3400
- }) {
3401
- const displayRowLength = rowLength && rowLength > 0 ? rowLength : 5;
3402
- const columns = buildColumns(columnDefs, selectionColumnWidth);
3403
- return /* @__PURE__ */ jsxRuntime.jsxs(Stack, { direction: "column", className: "w-full", children: [
3404
- /* @__PURE__ */ jsxRuntime.jsx(
3405
- "div",
3406
- {
3407
- className: "flex items-center bg-sys-table-header-background border-b border-sys-divider-subtler rounded-[6px]",
3408
- style: { height: headerHeight + 1, paddingLeft: 10, paddingRight: 10 },
3409
- children: columns.map((col, colIndex) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center px-[6px]", style: getColStyle(col), children: /* @__PURE__ */ jsxRuntime.jsx(
3410
- Skeleton,
3411
- {
3412
- className: "h-[12px] rounded-[3px] !bg-grayscale-s20",
3413
- style: { width: `${seededWidth(0, colIndex, 40, 70)}%` }
3414
- }
3415
- ) }, colIndex))
3416
- }
3417
- ),
3418
- Array.from({ length: displayRowLength }).map((_, rowIndex) => /* @__PURE__ */ jsxRuntime.jsx(
3419
- "div",
3420
- {
3421
- className: cn(
3422
- "flex items-center",
3423
- rowIndex < displayRowLength - 1 && "border-b border-sys-divider-subtler"
3424
- ),
3425
- style: { height: rowHeight, paddingLeft: 10, paddingRight: 10 },
3426
- children: columns.map((col, colIndex) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center px-[6px]", style: getColStyle(col), children: /* @__PURE__ */ jsxRuntime.jsx(
3427
- Skeleton,
3428
- {
3429
- className: "h-[14px] rounded-[3px]",
3430
- style: { width: `${seededWidth(rowIndex + 1, colIndex, 40, 80)}%` }
3431
- }
3432
- ) }, colIndex))
3433
- },
3434
- rowIndex
3435
- ))
3436
- ] });
3437
- }
3438
- var AgGridContext = React12.createContext({
4572
+ var AgGridContext = React10.createContext({
3439
4573
  containerHeight: 0,
3440
4574
  isEmpty: false,
3441
4575
  tableProps: {},
@@ -4065,11 +5199,11 @@ function sanitizeAgGridClassName(className, theme) {
4065
5199
  if (!className || theme === "legacy") return className;
4066
5200
  return className.split(/\s+/).filter((token) => token && !token.startsWith("ag-theme-")).join(" ");
4067
5201
  }
4068
- var AgGridTable = React12.forwardRef(function AgGridTable2({ containerStyle, noRowsOverlayComponentContainerStyle, ...tableProps }, ref) {
4069
- const isEmpty = React12.useMemo(() => {
5202
+ var AgGridTable = React10.forwardRef(function AgGridTable2({ containerStyle, noRowsOverlayComponentContainerStyle, ...tableProps }, ref) {
5203
+ const isEmpty = React10.useMemo(() => {
4070
5204
  return tableProps.rowData?.length === 0;
4071
5205
  }, [tableProps.rowData]);
4072
- const containerHeight = React12.useMemo(() => {
5206
+ const containerHeight = React10.useMemo(() => {
4073
5207
  try {
4074
5208
  if (tableProps.noRowsOverlayComponent && isEmpty) {
4075
5209
  return noRowsOverlayComponentContainerStyle?.height || init.containerStyle.height;
@@ -4082,7 +5216,7 @@ var AgGridTable = React12.forwardRef(function AgGridTable2({ containerStyle, noR
4082
5216
  return init.containerStyle.height;
4083
5217
  }
4084
5218
  }, [containerStyle, isEmpty, noRowsOverlayComponentContainerStyle, tableProps]);
4085
- const contextValue = React12.useMemo(
5219
+ const contextValue = React10.useMemo(
4086
5220
  () => ({
4087
5221
  containerHeight,
4088
5222
  containerStyle,
@@ -4107,7 +5241,7 @@ var AgGridTable = React12.forwardRef(function AgGridTable2({ containerStyle, noR
4107
5241
  return /* @__PURE__ */ jsxRuntime.jsx(AgGridContextProvider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(AgGridContainer, { children: /* @__PURE__ */ jsxRuntime.jsx(AgGridContent, {}) }) });
4108
5242
  });
4109
5243
  function AgGridContent() {
4110
- const { isEmpty, tableProps, ref } = React12.useContext(AgGridContext);
5244
+ const { isEmpty, tableProps, ref } = React10.useContext(AgGridContext);
4111
5245
  const className = sanitizeAgGridClassName(tableProps.className, tableProps.theme);
4112
5246
  const theme = tableProps.theme ?? defaultAgGridTheme;
4113
5247
  const {
@@ -4127,7 +5261,7 @@ function AgGridContent() {
4127
5261
  if (!target?.matches(".ag-cell, .ag-full-width-row")) return;
4128
5262
  onRowClicked({ ...e, type: "rowClicked" });
4129
5263
  };
4130
- const growIds = React12.useMemo(
5264
+ const growIds = React10.useMemo(
4131
5265
  () => growColumnIds(restTableProps.columnDefs),
4132
5266
  [restTableProps.columnDefs]
4133
5267
  );
@@ -4143,7 +5277,7 @@ function AgGridContent() {
4143
5277
  ...userDefaultColDef?.cellStyle
4144
5278
  }
4145
5279
  };
4146
- const mergedColumnTypes = React12.useMemo(
5280
+ const mergedColumnTypes = React10.useMemo(
4147
5281
  () => ({
4148
5282
  primary: { cellClass: "ag-cell-primary" },
4149
5283
  number: { headerClass: "ag-right-aligned-header", cellClass: "ag-right-aligned-cell" },
@@ -4151,7 +5285,7 @@ function AgGridContent() {
4151
5285
  }),
4152
5286
  [userColumnTypes]
4153
5287
  );
4154
- const columnDefs = React12.useMemo(
5288
+ const columnDefs = React10.useMemo(
4155
5289
  () => withTypeClasses(
4156
5290
  withWidthFloor(
4157
5291
  withHeaderMinWidth(
@@ -4209,22 +5343,22 @@ function AgGridContent() {
4209
5343
  ...tableProps.selectionColumnDef,
4210
5344
  headerComponent: tableProps.selectionColumnDef?.headerComponent ?? HeaderCheckboxRenderer,
4211
5345
  cellRenderer: tableProps.selectionColumnDef?.cellRenderer ?? RowCheckboxRenderer,
4212
- cellClass: cn(
5346
+ cellClass: chunkOQOBPYZT_cjs.cn(
4213
5347
  "[&_.ag-selection-checkbox]:!hidden",
4214
5348
  tableProps.selectionColumnDef?.cellClass,
4215
5349
  "!flex items-center"
4216
5350
  ),
4217
- headerClass: cn("[&_.ag-checkbox]:!hidden", tableProps.selectionColumnDef?.headerClass)
5351
+ headerClass: chunkOQOBPYZT_cjs.cn("[&_.ag-checkbox]:!hidden", tableProps.selectionColumnDef?.headerClass)
4218
5352
  }
4219
5353
  }
4220
5354
  );
4221
5355
  }
4222
5356
  function AgGridContainer({ children }) {
4223
- const { containerHeight, containerStyle, isEmpty } = React12.useContext(AgGridContext);
5357
+ const { containerHeight, containerStyle, isEmpty } = React10.useContext(AgGridContext);
4224
5358
  return /* @__PURE__ */ jsxRuntime.jsx(
4225
5359
  "div",
4226
5360
  {
4227
- className: cn(
5361
+ className: chunkOQOBPYZT_cjs.cn(
4228
5362
  "ag-grid-container",
4229
5363
  "w-full h-[100px]",
4230
5364
  !isEmpty ? "ag-grid-container-auto-height-nonEmpty" : ""
@@ -4241,9 +5375,9 @@ function AgGridContainer({ children }) {
4241
5375
  );
4242
5376
  }
4243
5377
  function HeaderCheckboxRenderer(props) {
4244
- const [selectedCount, setSelectedCount] = React12.useState(props.api.getSelectedRows().length);
5378
+ const [selectedCount, setSelectedCount] = React10.useState(props.api.getSelectedRows().length);
4245
5379
  const totalCount = props.api.getDisplayedRowCount();
4246
- React12.useEffect(() => {
5380
+ React10.useEffect(() => {
4247
5381
  const handler = () => setSelectedCount(props.api.getSelectedRows().length);
4248
5382
  props.api.addEventListener("selectionChanged", handler);
4249
5383
  return () => props.api.removeEventListener("selectionChanged", handler);
@@ -4271,8 +5405,8 @@ function HeaderCheckboxRenderer(props) {
4271
5405
  );
4272
5406
  }
4273
5407
  function RowCheckboxRenderer(params) {
4274
- const [checked, setChecked] = React12.useState(!!params.node.isSelected());
4275
- React12.useEffect(() => {
5408
+ const [checked, setChecked] = React10.useState(!!params.node.isSelected());
5409
+ React10.useEffect(() => {
4276
5410
  const handler = () => setChecked(!!params.node.isSelected());
4277
5411
  params.api.addEventListener("selectionChanged", handler);
4278
5412
  return () => params.api.removeEventListener("selectionChanged", handler);
@@ -4486,7 +5620,7 @@ function fitColumnsToContent(api, grow = /* @__PURE__ */ new Set()) {
4486
5620
  const fixed = all.filter((c) => c.isVisible() && !c.isPinned() && !isFittable(c)).reduce((sum, c) => sum + c.getActualWidth(), 0);
4487
5621
  const available = range.right - range.left - fixed;
4488
5622
  if (available > 0)
4489
- widths = distributeColumnWidths(
5623
+ widths = chunkOQOBPYZT_cjs.distributeColumnWidths(
4490
5624
  cols.map((c, i) => ({
4491
5625
  content: widths[i],
4492
5626
  grow: grow.has(c.getColId()),
@@ -4523,7 +5657,7 @@ function TwoLineCellRenderer(params) {
4523
5657
  "span",
4524
5658
  {
4525
5659
  "data-slot": "cell-secondary",
4526
- className: cn(
5660
+ className: chunkOQOBPYZT_cjs.cn(
4527
5661
  "mt-[2px] block truncate text-small-regular text-sys-text-subtle",
4528
5662
  params.secondaryClassName
4529
5663
  ),
@@ -4545,6 +5679,9 @@ exports.BADGE_OUTLINE_ACCENT = BADGE_OUTLINE_ACCENT;
4545
5679
  exports.BALANCED_FILL_MIN_WIDTH = BALANCED_FILL_MIN_WIDTH;
4546
5680
  exports.Badge = Badge;
4547
5681
  exports.Button = Button;
5682
+ exports.CLEAR_HOST_CLASS = CLEAR_HOST_CLASS;
5683
+ exports.CLEAR_REVEAL_CLASS = CLEAR_REVEAL_CLASS;
5684
+ exports.CancelIcon = CancelIcon;
4548
5685
  exports.Card = Card;
4549
5686
  exports.CardContent = CardContent;
4550
5687
  exports.CardDescription = CardDescription;
@@ -4552,6 +5689,9 @@ exports.CardFooter = CardFooter;
4552
5689
  exports.CardHeader = CardHeader;
4553
5690
  exports.CardThumbnail = CardThumbnail;
4554
5691
  exports.CardTitle = CardTitle;
5692
+ exports.ChatComposer = ChatComposer;
5693
+ exports.ChatHistory = ChatHistory;
5694
+ exports.ChatMessage = ChatMessage;
4555
5695
  exports.Checkbox = Checkbox;
4556
5696
  exports.Dialog = Dialog;
4557
5697
  exports.DialogClose = DialogClose;
@@ -4585,6 +5725,7 @@ exports.DropdownMenuSubContent = DropdownMenuSubContent;
4585
5725
  exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger;
4586
5726
  exports.DropdownMenuTrigger = DropdownMenuTrigger;
4587
5727
  exports.EmptyBoxIllustration = EmptyBoxIllustration;
5728
+ exports.FloatingLabelOutline = FloatingLabelOutline;
4588
5729
  exports.Form = Form;
4589
5730
  exports.FormControl = FormControl;
4590
5731
  exports.FormDescription = FormDescription;
@@ -4598,9 +5739,7 @@ exports.FormSection = FormSection;
4598
5739
  exports.FormSectionLevelContext = FormSectionLevelContext;
4599
5740
  exports.FormValidMessage = FormValidMessage;
4600
5741
  exports.HeaderCheckboxRenderer = HeaderCheckboxRenderer;
4601
- exports.IconButton = IconButton;
4602
5742
  exports.LucideIcon = LucideIcon;
4603
- exports.NUMBER_COLUMN_CLASS = NUMBER_COLUMN_CLASS;
4604
5743
  exports.NUMBER_COLUMN_WIDTH = NUMBER_COLUMN_WIDTH;
4605
5744
  exports.PageHeader = PageHeader;
4606
5745
  exports.PageHeaderProvider = PageHeaderProvider;
@@ -4616,23 +5755,18 @@ exports.PaginationWrapper = PaginationWrapper;
4616
5755
  exports.Panel = Panel;
4617
5756
  exports.RowCheckboxRenderer = RowCheckboxRenderer;
4618
5757
  exports.SORT_ICON_OFFSET_CLASS = SORT_ICON_OFFSET_CLASS;
4619
- exports.Separator = Separator;
5758
+ exports.Separator = Separator2;
4620
5759
  exports.Skeleton = Skeleton;
4621
- exports.SortIcon = SortIcon;
4622
5760
  exports.Spinner = Spinner;
4623
5761
  exports.Stack = Stack;
4624
- exports.Table = Table;
4625
- exports.TableBody = TableBody;
4626
- exports.TableCell = TableCell;
4627
- exports.TableHead = TableHead;
4628
- exports.TableHeader = TableHeader;
4629
- exports.TablePagination = TablePagination;
4630
- exports.TableRow = TableRow;
4631
5762
  exports.TableSkeleton = TableSkeleton;
4632
5763
  exports.Tabs = Tabs;
4633
5764
  exports.TabsContent = TabsContent;
4634
5765
  exports.TabsList = TabsList;
4635
5766
  exports.TabsTrigger = TabsTrigger;
5767
+ exports.Tag = Tag;
5768
+ exports.TextField = TextField;
5769
+ exports.Textarea = Textarea;
4636
5770
  exports.ToggleGroup = ToggleGroup;
4637
5771
  exports.ToggleGroupItem = ToggleGroupItem;
4638
5772
  exports.Tooltip = Tooltip;
@@ -4640,16 +5774,17 @@ exports.TooltipContent = TooltipContent;
4640
5774
  exports.TooltipProvider = TooltipProvider;
4641
5775
  exports.TooltipTrigger = TooltipTrigger;
4642
5776
  exports.TwoLineCellRenderer = TwoLineCellRenderer;
4643
- exports.alignFromClassName = alignFromClassName;
4644
5777
  exports.badgeVariants = badgeVariants;
4645
5778
  exports.buttonVariants = buttonVariants;
4646
- exports.cn = cn;
4647
5779
  exports.estimateHeaderTextWidth = estimateHeaderTextWidth;
4648
5780
  exports.fitColumnsToContent = fitColumnsToContent;
4649
5781
  exports.getPaginationRange = getPaginationRange;
4650
5782
  exports.getSortedColumnState = getSortedColumnState;
5783
+ exports.groupChatHistoryByDate = groupChatHistoryByDate;
4651
5784
  exports.growColumnIds = growColumnIds;
4652
5785
  exports.sanitizeUserText = sanitizeUserText;
5786
+ exports.tagVariants = tagVariants;
5787
+ exports.useFloatingLabel = useFloatingLabel;
4653
5788
  exports.useFormControlContext = useFormControlContext;
4654
5789
  exports.useFormField = useFormField;
4655
5790
  exports.usePageHeader = usePageHeader;
@@ -4662,5 +5797,5 @@ exports.withNumberColumnWidth = withNumberColumnWidth;
4662
5797
  exports.withSortIconOffset = withSortIconOffset;
4663
5798
  exports.withTypeClasses = withTypeClasses;
4664
5799
  exports.withWidthFloor = withWidthFloor;
4665
- //# sourceMappingURL=chunk-B7EVWGOO.cjs.map
4666
- //# sourceMappingURL=chunk-B7EVWGOO.cjs.map
5800
+ //# sourceMappingURL=chunk-ESAMXUUJ.cjs.map
5801
+ //# sourceMappingURL=chunk-ESAMXUUJ.cjs.map