@mondrianai/runyourai-design-system 0.0.19 → 0.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +54 -26
- package/dist/index.d.ts +54 -26
- package/dist/index.js +752 -804
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +738 -776
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1184,237 +1184,260 @@ function Drawer({
|
|
|
1184
1184
|
}
|
|
1185
1185
|
|
|
1186
1186
|
// src/components/ui/dropdown-menu.tsx
|
|
1187
|
-
import
|
|
1187
|
+
import * as React7 from "react";
|
|
1188
|
+
import { CheckIcon, ChevronRightIcon } from "lucide-react";
|
|
1188
1189
|
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
|
|
1190
|
+
|
|
1191
|
+
// src/components/ui/tooltip.tsx
|
|
1192
|
+
import * as React6 from "react";
|
|
1193
|
+
import { Tooltip as TooltipPrimitive } from "radix-ui";
|
|
1189
1194
|
import { jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
function DropdownMenuTrigger(_a) {
|
|
1199
|
-
var props = __objRest(_a, []);
|
|
1200
|
-
return /* @__PURE__ */ jsx12(
|
|
1201
|
-
DropdownMenuPrimitive.Trigger,
|
|
1202
|
-
__spreadValues({
|
|
1203
|
-
"data-slot": "dropdown-menu-trigger"
|
|
1204
|
-
}, props)
|
|
1205
|
-
);
|
|
1206
|
-
}
|
|
1207
|
-
function DropdownMenuContent(_a) {
|
|
1208
|
-
var _b = _a, {
|
|
1209
|
-
className,
|
|
1210
|
-
sideOffset = 4
|
|
1211
|
-
} = _b, props = __objRest(_b, [
|
|
1212
|
-
"className",
|
|
1213
|
-
"sideOffset"
|
|
1214
|
-
]);
|
|
1215
|
-
return /* @__PURE__ */ jsx12(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx12(
|
|
1216
|
-
DropdownMenuPrimitive.Content,
|
|
1217
|
-
__spreadValues({
|
|
1218
|
-
"data-slot": "dropdown-menu-content",
|
|
1195
|
+
var TooltipProvider = TooltipPrimitive.Provider;
|
|
1196
|
+
var TooltipContent = React6.forwardRef((_a, ref) => {
|
|
1197
|
+
var _b = _a, { className, side = "top", sideOffset = 4, children } = _b, props = __objRest(_b, ["className", "side", "sideOffset", "children"]);
|
|
1198
|
+
return /* @__PURE__ */ jsx12(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx12(
|
|
1199
|
+
TooltipPrimitive.Content,
|
|
1200
|
+
__spreadProps(__spreadValues({
|
|
1201
|
+
ref,
|
|
1202
|
+
side,
|
|
1219
1203
|
sideOffset,
|
|
1220
1204
|
className: cn(
|
|
1221
|
-
"z-50 max
|
|
1205
|
+
"z-50 w-max max-w-[200px]",
|
|
1206
|
+
"bg-primary rounded-md px-2.5 py-1.5",
|
|
1207
|
+
"animate-in fade-in-0 zoom-in-95",
|
|
1208
|
+
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
1209
|
+
"data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2",
|
|
1210
|
+
"data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1222
1211
|
className
|
|
1223
1212
|
)
|
|
1224
|
-
}, props)
|
|
1213
|
+
}, props), {
|
|
1214
|
+
children: /* @__PURE__ */ jsx12("span", { className: "block text-xs font-normal leading-snug tracking-tight text-primary-foreground whitespace-normal break-words", children })
|
|
1215
|
+
})
|
|
1225
1216
|
) });
|
|
1226
|
-
}
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
return /* @__PURE__ */ jsx12(DropdownMenuPrimitive.Group, __spreadValues({ "data-slot": "dropdown-menu-group" }, props));
|
|
1230
|
-
}
|
|
1231
|
-
function DropdownMenuItem(_a) {
|
|
1232
|
-
var _b = _a, {
|
|
1233
|
-
className,
|
|
1234
|
-
inset,
|
|
1235
|
-
variant = "default"
|
|
1236
|
-
} = _b, props = __objRest(_b, [
|
|
1237
|
-
"className",
|
|
1238
|
-
"inset",
|
|
1239
|
-
"variant"
|
|
1240
|
-
]);
|
|
1241
|
-
return /* @__PURE__ */ jsx12(
|
|
1242
|
-
DropdownMenuPrimitive.Item,
|
|
1243
|
-
__spreadValues({
|
|
1244
|
-
"data-slot": "dropdown-menu-item",
|
|
1245
|
-
"data-inset": inset,
|
|
1246
|
-
"data-variant": variant,
|
|
1247
|
-
className: cn(
|
|
1248
|
-
"relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!",
|
|
1249
|
-
className
|
|
1250
|
-
)
|
|
1251
|
-
}, props)
|
|
1252
|
-
);
|
|
1253
|
-
}
|
|
1254
|
-
function DropdownMenuCheckboxItem(_a) {
|
|
1217
|
+
});
|
|
1218
|
+
TooltipContent.displayName = "TooltipContent";
|
|
1219
|
+
function Tooltip(_a) {
|
|
1255
1220
|
var _b = _a, {
|
|
1256
|
-
|
|
1221
|
+
content,
|
|
1257
1222
|
children,
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1223
|
+
open,
|
|
1224
|
+
defaultOpen,
|
|
1225
|
+
onOpenChange,
|
|
1226
|
+
delayDuration
|
|
1227
|
+
} = _b, contentProps = __objRest(_b, [
|
|
1228
|
+
"content",
|
|
1261
1229
|
"children",
|
|
1262
|
-
"
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
__spreadProps(__spreadValues({
|
|
1267
|
-
"data-slot": "dropdown-menu-checkbox-item",
|
|
1268
|
-
className: cn(
|
|
1269
|
-
"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1270
|
-
className
|
|
1271
|
-
),
|
|
1272
|
-
checked
|
|
1273
|
-
}, props), {
|
|
1274
|
-
children: [
|
|
1275
|
-
/* @__PURE__ */ jsx12("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx12(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx12(CheckIcon, { className: "size-4" }) }) }),
|
|
1276
|
-
children
|
|
1277
|
-
]
|
|
1278
|
-
})
|
|
1279
|
-
);
|
|
1280
|
-
}
|
|
1281
|
-
function DropdownMenuRadioGroup(_a) {
|
|
1282
|
-
var props = __objRest(_a, []);
|
|
1283
|
-
return /* @__PURE__ */ jsx12(
|
|
1284
|
-
DropdownMenuPrimitive.RadioGroup,
|
|
1285
|
-
__spreadValues({
|
|
1286
|
-
"data-slot": "dropdown-menu-radio-group"
|
|
1287
|
-
}, props)
|
|
1288
|
-
);
|
|
1289
|
-
}
|
|
1290
|
-
function DropdownMenuRadioItem(_a) {
|
|
1291
|
-
var _b = _a, {
|
|
1292
|
-
className,
|
|
1293
|
-
children
|
|
1294
|
-
} = _b, props = __objRest(_b, [
|
|
1295
|
-
"className",
|
|
1296
|
-
"children"
|
|
1230
|
+
"open",
|
|
1231
|
+
"defaultOpen",
|
|
1232
|
+
"onOpenChange",
|
|
1233
|
+
"delayDuration"
|
|
1297
1234
|
]);
|
|
1235
|
+
if (!content) return children;
|
|
1298
1236
|
return /* @__PURE__ */ jsxs9(
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
)
|
|
1306
|
-
}, props), {
|
|
1237
|
+
TooltipPrimitive.Root,
|
|
1238
|
+
{
|
|
1239
|
+
open,
|
|
1240
|
+
defaultOpen,
|
|
1241
|
+
onOpenChange,
|
|
1242
|
+
delayDuration,
|
|
1307
1243
|
children: [
|
|
1308
|
-
/* @__PURE__ */ jsx12(
|
|
1309
|
-
children
|
|
1244
|
+
/* @__PURE__ */ jsx12(TooltipPrimitive.Trigger, { asChild: true, children }),
|
|
1245
|
+
/* @__PURE__ */ jsx12(TooltipContent, __spreadProps(__spreadValues({}, contentProps), { children: content }))
|
|
1310
1246
|
]
|
|
1311
|
-
}
|
|
1312
|
-
);
|
|
1313
|
-
}
|
|
1314
|
-
function DropdownMenuLabel(_a) {
|
|
1315
|
-
var _b = _a, {
|
|
1316
|
-
className,
|
|
1317
|
-
inset
|
|
1318
|
-
} = _b, props = __objRest(_b, [
|
|
1319
|
-
"className",
|
|
1320
|
-
"inset"
|
|
1321
|
-
]);
|
|
1322
|
-
return /* @__PURE__ */ jsx12(
|
|
1323
|
-
DropdownMenuPrimitive.Label,
|
|
1324
|
-
__spreadValues({
|
|
1325
|
-
"data-slot": "dropdown-menu-label",
|
|
1326
|
-
"data-inset": inset,
|
|
1327
|
-
className: cn(
|
|
1328
|
-
"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
|
|
1329
|
-
className
|
|
1330
|
-
)
|
|
1331
|
-
}, props)
|
|
1247
|
+
}
|
|
1332
1248
|
);
|
|
1333
1249
|
}
|
|
1334
|
-
function
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
return /* @__PURE__ */ jsx12(
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
className: cn("-
|
|
1345
|
-
}
|
|
1346
|
-
);
|
|
1250
|
+
function TooltipWithIcon({
|
|
1251
|
+
content,
|
|
1252
|
+
iconName = "info",
|
|
1253
|
+
className
|
|
1254
|
+
}) {
|
|
1255
|
+
if (!content) return null;
|
|
1256
|
+
return /* @__PURE__ */ jsx12(Tooltip, { content, children: /* @__PURE__ */ jsx12(
|
|
1257
|
+
Icon,
|
|
1258
|
+
{
|
|
1259
|
+
name: iconName,
|
|
1260
|
+
className: cn("size-4 text-muted-foreground cursor-help", className)
|
|
1261
|
+
}
|
|
1262
|
+
) });
|
|
1347
1263
|
}
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1264
|
+
|
|
1265
|
+
// src/components/ui/dropdown-menu.tsx
|
|
1266
|
+
import { jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1267
|
+
var baseItemClass = cn(
|
|
1268
|
+
"relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 my-0.5 text-sm outline-none",
|
|
1269
|
+
"transition-colors duration-100",
|
|
1270
|
+
"focus:bg-accent focus:text-accent-foreground",
|
|
1271
|
+
"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",
|
|
1272
|
+
'[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*="size-"])]:size-4',
|
|
1273
|
+
'[&_svg:not([class*="text-"])]:text-muted-foreground'
|
|
1274
|
+
);
|
|
1275
|
+
var destructiveItemClass = cn(
|
|
1276
|
+
"text-destructive focus:bg-destructive/10 focus:text-destructive dark:focus:bg-destructive/20",
|
|
1277
|
+
'[&_svg:not([class*="text-"])]:text-destructive!'
|
|
1278
|
+
);
|
|
1279
|
+
var indentItemClass = cn(
|
|
1280
|
+
"relative flex cursor-pointer select-none items-center gap-2 rounded-sm py-1.5 my-0.5 pr-2 pl-8 text-sm outline-none",
|
|
1281
|
+
"transition-colors duration-100",
|
|
1282
|
+
"focus:bg-accent focus:text-accent-foreground",
|
|
1283
|
+
"data-[state=checked]:bg-accent data-[state=checked]:text-accent-foreground",
|
|
1284
|
+
"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50"
|
|
1285
|
+
);
|
|
1286
|
+
var subTriggerClass = cn(
|
|
1287
|
+
"relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 my-0.5 text-sm outline-none",
|
|
1288
|
+
"transition-colors duration-100",
|
|
1289
|
+
"focus:bg-accent focus:text-accent-foreground",
|
|
1290
|
+
"data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
1291
|
+
"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",
|
|
1292
|
+
'[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*="size-"])]:size-4',
|
|
1293
|
+
'[&_svg:not([class*="text-"])]:text-muted-foreground'
|
|
1294
|
+
);
|
|
1295
|
+
var contentClass = cn(
|
|
1296
|
+
"z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-44",
|
|
1297
|
+
"origin-(--radix-dropdown-menu-content-transform-origin)",
|
|
1298
|
+
"overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
|
|
1299
|
+
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
1300
|
+
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
1301
|
+
"data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2",
|
|
1302
|
+
"data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2"
|
|
1303
|
+
);
|
|
1304
|
+
var labelClass = "px-2 py-1.5 text-sm font-medium";
|
|
1305
|
+
var separatorClass = "-mx-1 my-1 h-px bg-border";
|
|
1306
|
+
function withTooltip(tooltip, node, key) {
|
|
1307
|
+
if (!tooltip) return React7.cloneElement(node, { key });
|
|
1308
|
+
return /* @__PURE__ */ jsx13(Tooltip, { content: tooltip, side: "right", children: node }, key);
|
|
1309
|
+
}
|
|
1310
|
+
function renderItem(item) {
|
|
1311
|
+
if (item.subGroups) {
|
|
1312
|
+
return /* @__PURE__ */ jsxs10(DropdownMenuPrimitive.Sub, { children: [
|
|
1313
|
+
withTooltip(
|
|
1314
|
+
item.tooltip,
|
|
1315
|
+
/* @__PURE__ */ jsxs10(DropdownMenuPrimitive.SubTrigger, { disabled: item.disabled, className: subTriggerClass, children: [
|
|
1316
|
+
item.icon,
|
|
1317
|
+
item.label,
|
|
1318
|
+
/* @__PURE__ */ jsx13(ChevronRightIcon, { className: "ml-auto size-4" })
|
|
1319
|
+
] }),
|
|
1320
|
+
item.label
|
|
1321
|
+
),
|
|
1322
|
+
/* @__PURE__ */ jsx13(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx13(DropdownMenuPrimitive.SubContent, { className: contentClass, children: renderGroups(item.subGroups) }) })
|
|
1323
|
+
] }, item.label);
|
|
1324
|
+
}
|
|
1325
|
+
if (item.type === "checkbox") {
|
|
1326
|
+
return withTooltip(
|
|
1327
|
+
item.tooltip,
|
|
1328
|
+
/* @__PURE__ */ jsxs10(
|
|
1329
|
+
DropdownMenuPrimitive.CheckboxItem,
|
|
1330
|
+
{
|
|
1331
|
+
checked: item.checked,
|
|
1332
|
+
onCheckedChange: item.onCheckedChange,
|
|
1333
|
+
disabled: item.disabled,
|
|
1334
|
+
onSelect: (e) => e.preventDefault(),
|
|
1335
|
+
className: indentItemClass,
|
|
1336
|
+
children: [
|
|
1337
|
+
/* @__PURE__ */ jsxs10("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: [
|
|
1338
|
+
/* @__PURE__ */ jsx13(CheckIcon, { className: "size-4 text-foreground/20" }),
|
|
1339
|
+
/* @__PURE__ */ jsx13(DropdownMenuPrimitive.ItemIndicator, { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx13(CheckIcon, { className: "size-4" }) })
|
|
1340
|
+
] }),
|
|
1341
|
+
item.label
|
|
1342
|
+
]
|
|
1343
|
+
}
|
|
1344
|
+
),
|
|
1345
|
+
item.label
|
|
1346
|
+
);
|
|
1347
|
+
}
|
|
1348
|
+
return withTooltip(
|
|
1349
|
+
item.tooltip,
|
|
1350
|
+
/* @__PURE__ */ jsxs10(
|
|
1351
|
+
DropdownMenuPrimitive.Item,
|
|
1352
|
+
{
|
|
1353
|
+
disabled: item.disabled,
|
|
1354
|
+
onSelect: item.onClick,
|
|
1355
|
+
className: cn(baseItemClass, item.variant === "destructive" && destructiveItemClass),
|
|
1356
|
+
children: [
|
|
1357
|
+
item.icon,
|
|
1358
|
+
item.label,
|
|
1359
|
+
item.shortcut && /* @__PURE__ */ jsx13("span", { className: "ml-auto text-xs tracking-widest text-muted-foreground", children: item.shortcut })
|
|
1360
|
+
]
|
|
1361
|
+
}
|
|
1362
|
+
),
|
|
1363
|
+
item.label
|
|
1363
1364
|
);
|
|
1364
1365
|
}
|
|
1365
|
-
function
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1366
|
+
function renderGroups(groups) {
|
|
1367
|
+
return groups.map((group, i) => {
|
|
1368
|
+
var _a;
|
|
1369
|
+
const isRadioGroup = group.radioValue !== void 0 || group.onRadioValueChange !== void 0 || group.items.some((item) => item.type === "radio");
|
|
1370
|
+
return /* @__PURE__ */ jsxs10(React7.Fragment, { children: [
|
|
1371
|
+
group.separator && /* @__PURE__ */ jsx13(DropdownMenuPrimitive.Separator, { className: separatorClass }),
|
|
1372
|
+
isRadioGroup ? /* @__PURE__ */ jsxs10(
|
|
1373
|
+
DropdownMenuPrimitive.RadioGroup,
|
|
1374
|
+
{
|
|
1375
|
+
value: group.radioValue,
|
|
1376
|
+
onValueChange: group.onRadioValueChange,
|
|
1377
|
+
children: [
|
|
1378
|
+
group.label && /* @__PURE__ */ jsx13(DropdownMenuPrimitive.Label, { className: labelClass, children: group.label }),
|
|
1379
|
+
group.items.map(
|
|
1380
|
+
(item) => {
|
|
1381
|
+
var _a2;
|
|
1382
|
+
return withTooltip(
|
|
1383
|
+
item.tooltip,
|
|
1384
|
+
/* @__PURE__ */ jsxs10(
|
|
1385
|
+
DropdownMenuPrimitive.RadioItem,
|
|
1386
|
+
{
|
|
1387
|
+
value: (_a2 = item.value) != null ? _a2 : item.label,
|
|
1388
|
+
disabled: item.disabled,
|
|
1389
|
+
onSelect: (e) => e.preventDefault(),
|
|
1390
|
+
className: indentItemClass,
|
|
1391
|
+
children: [
|
|
1392
|
+
/* @__PURE__ */ jsxs10("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: [
|
|
1393
|
+
/* @__PURE__ */ jsx13("div", { className: "size-2 rounded-full bg-foreground/20" }),
|
|
1394
|
+
/* @__PURE__ */ jsx13(DropdownMenuPrimitive.ItemIndicator, { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx13("div", { className: "size-2 rounded-full bg-current" }) })
|
|
1395
|
+
] }),
|
|
1396
|
+
item.label
|
|
1397
|
+
]
|
|
1398
|
+
}
|
|
1399
|
+
),
|
|
1400
|
+
item.label
|
|
1401
|
+
);
|
|
1402
|
+
}
|
|
1403
|
+
)
|
|
1404
|
+
]
|
|
1405
|
+
}
|
|
1406
|
+
) : /* @__PURE__ */ jsxs10(DropdownMenuPrimitive.Group, { children: [
|
|
1407
|
+
group.label && /* @__PURE__ */ jsx13(DropdownMenuPrimitive.Label, { className: labelClass, children: group.label }),
|
|
1408
|
+
group.items.map(renderItem)
|
|
1409
|
+
] })
|
|
1410
|
+
] }, (_a = group.label) != null ? _a : String(i));
|
|
1411
|
+
});
|
|
1395
1412
|
}
|
|
1396
|
-
function
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1413
|
+
function DropdownMenu({
|
|
1414
|
+
trigger,
|
|
1415
|
+
groups,
|
|
1416
|
+
open,
|
|
1417
|
+
onOpenChange,
|
|
1418
|
+
side,
|
|
1419
|
+
align,
|
|
1420
|
+
className
|
|
1421
|
+
}) {
|
|
1422
|
+
return /* @__PURE__ */ jsxs10(DropdownMenuPrimitive.Root, { open, onOpenChange, children: [
|
|
1423
|
+
/* @__PURE__ */ jsx13(DropdownMenuPrimitive.Trigger, { asChild: true, children: trigger }),
|
|
1424
|
+
/* @__PURE__ */ jsx13(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx13(
|
|
1425
|
+
DropdownMenuPrimitive.Content,
|
|
1426
|
+
{
|
|
1427
|
+
side,
|
|
1428
|
+
align,
|
|
1429
|
+
sideOffset: 4,
|
|
1430
|
+
className: cn(contentClass, className),
|
|
1431
|
+
children: renderGroups(groups)
|
|
1432
|
+
}
|
|
1433
|
+
) })
|
|
1434
|
+
] });
|
|
1412
1435
|
}
|
|
1413
1436
|
|
|
1414
1437
|
// src/components/icons/custom/empty-tray.tsx
|
|
1415
|
-
import { jsx as
|
|
1438
|
+
import { jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1416
1439
|
function EmptyTrayIcon({ className }) {
|
|
1417
|
-
return /* @__PURE__ */
|
|
1440
|
+
return /* @__PURE__ */ jsxs11(
|
|
1418
1441
|
"svg",
|
|
1419
1442
|
{
|
|
1420
1443
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1425,22 +1448,22 @@ function EmptyTrayIcon({ className }) {
|
|
|
1425
1448
|
"aria-hidden": true,
|
|
1426
1449
|
className: cn("shrink-0", className),
|
|
1427
1450
|
children: [
|
|
1428
|
-
/* @__PURE__ */
|
|
1429
|
-
/* @__PURE__ */
|
|
1451
|
+
/* @__PURE__ */ jsxs11("g", { clipPath: "url(#clip0_19425_37257)", children: [
|
|
1452
|
+
/* @__PURE__ */ jsx14(
|
|
1430
1453
|
"path",
|
|
1431
1454
|
{
|
|
1432
1455
|
d: "M32 41C49.6731 41 64 37.866 64 34C64 30.134 49.6731 27 32 27C14.3269 27 0 30.134 0 34C0 37.866 14.3269 41 32 41Z",
|
|
1433
1456
|
fill: "#F5F5F5"
|
|
1434
1457
|
}
|
|
1435
1458
|
),
|
|
1436
|
-
/* @__PURE__ */
|
|
1459
|
+
/* @__PURE__ */ jsx14(
|
|
1437
1460
|
"path",
|
|
1438
1461
|
{
|
|
1439
1462
|
d: "M55 13.76L44.854 2.258C44.367 1.474 43.656 1 42.907 1H21.093C20.344 1 19.633 1.474 19.146 2.257L9 13.761V23H55V13.76Z",
|
|
1440
1463
|
stroke: "#D9D9D9"
|
|
1441
1464
|
}
|
|
1442
1465
|
),
|
|
1443
|
-
/* @__PURE__ */
|
|
1466
|
+
/* @__PURE__ */ jsx14(
|
|
1444
1467
|
"path",
|
|
1445
1468
|
{
|
|
1446
1469
|
d: "M41.613 16.931C41.613 15.326 42.607 14.001 43.84 14H55V32.137C55 34.26 53.68 36 52.05 36H11.95C10.32 36 9 34.259 9 32.137V14H20.16C21.393 14 22.387 15.323 22.387 16.928V16.95C22.387 18.555 23.392 19.851 24.624 19.851H39.376C40.608 19.851 41.613 18.543 41.613 16.938V16.931Z",
|
|
@@ -1449,16 +1472,16 @@ function EmptyTrayIcon({ className }) {
|
|
|
1449
1472
|
}
|
|
1450
1473
|
)
|
|
1451
1474
|
] }),
|
|
1452
|
-
/* @__PURE__ */
|
|
1475
|
+
/* @__PURE__ */ jsx14("defs", { children: /* @__PURE__ */ jsx14("clipPath", { id: "clip0_19425_37257", children: /* @__PURE__ */ jsx14("rect", { width: "64", height: "41", fill: "white" }) }) })
|
|
1453
1476
|
]
|
|
1454
1477
|
}
|
|
1455
1478
|
);
|
|
1456
1479
|
}
|
|
1457
1480
|
|
|
1458
1481
|
// src/components/ui/empty.tsx
|
|
1459
|
-
import { jsx as
|
|
1482
|
+
import { jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1460
1483
|
function Empty({ image, description, children, className }) {
|
|
1461
|
-
return /* @__PURE__ */
|
|
1484
|
+
return /* @__PURE__ */ jsxs12(
|
|
1462
1485
|
"div",
|
|
1463
1486
|
{
|
|
1464
1487
|
className: cn(
|
|
@@ -1466,20 +1489,20 @@ function Empty({ image, description, children, className }) {
|
|
|
1466
1489
|
className
|
|
1467
1490
|
),
|
|
1468
1491
|
children: [
|
|
1469
|
-
image !== void 0 ? image : /* @__PURE__ */
|
|
1470
|
-
description && /* @__PURE__ */
|
|
1471
|
-
children && /* @__PURE__ */
|
|
1492
|
+
image !== void 0 ? image : /* @__PURE__ */ jsx15(EmptyTrayIcon, {}),
|
|
1493
|
+
description && /* @__PURE__ */ jsx15("p", { className: "text-center text-sm leading-xs text-muted-foreground whitespace-pre-line", children: description }),
|
|
1494
|
+
children && /* @__PURE__ */ jsx15("div", { className: "flex items-center gap-2", children })
|
|
1472
1495
|
]
|
|
1473
1496
|
}
|
|
1474
1497
|
);
|
|
1475
1498
|
}
|
|
1476
1499
|
|
|
1477
1500
|
// src/components/ui/checkbox.tsx
|
|
1478
|
-
import * as
|
|
1501
|
+
import * as React8 from "react";
|
|
1479
1502
|
import { Checkbox as CheckboxPrimitive } from "radix-ui";
|
|
1480
|
-
import { jsx as
|
|
1503
|
+
import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1481
1504
|
function FilledSquareMinus({ className }) {
|
|
1482
|
-
return /* @__PURE__ */
|
|
1505
|
+
return /* @__PURE__ */ jsxs13(
|
|
1483
1506
|
"svg",
|
|
1484
1507
|
{
|
|
1485
1508
|
viewBox: "0 0 20 20",
|
|
@@ -1488,7 +1511,7 @@ function FilledSquareMinus({ className }) {
|
|
|
1488
1511
|
className: cn(className),
|
|
1489
1512
|
"aria-hidden": true,
|
|
1490
1513
|
children: [
|
|
1491
|
-
/* @__PURE__ */
|
|
1514
|
+
/* @__PURE__ */ jsx16(
|
|
1492
1515
|
"rect",
|
|
1493
1516
|
{
|
|
1494
1517
|
x: "2.5",
|
|
@@ -1501,7 +1524,7 @@ function FilledSquareMinus({ className }) {
|
|
|
1501
1524
|
strokeWidth: "1.5"
|
|
1502
1525
|
}
|
|
1503
1526
|
),
|
|
1504
|
-
/* @__PURE__ */
|
|
1527
|
+
/* @__PURE__ */ jsx16(
|
|
1505
1528
|
"path",
|
|
1506
1529
|
{
|
|
1507
1530
|
d: "M7 10H13",
|
|
@@ -1515,7 +1538,7 @@ function FilledSquareMinus({ className }) {
|
|
|
1515
1538
|
);
|
|
1516
1539
|
}
|
|
1517
1540
|
function FilledSquareCheck({ className }) {
|
|
1518
|
-
return /* @__PURE__ */
|
|
1541
|
+
return /* @__PURE__ */ jsxs13(
|
|
1519
1542
|
"svg",
|
|
1520
1543
|
{
|
|
1521
1544
|
viewBox: "0 0 20 20",
|
|
@@ -1524,7 +1547,7 @@ function FilledSquareCheck({ className }) {
|
|
|
1524
1547
|
className: cn(className),
|
|
1525
1548
|
"aria-hidden": true,
|
|
1526
1549
|
children: [
|
|
1527
|
-
/* @__PURE__ */
|
|
1550
|
+
/* @__PURE__ */ jsx16(
|
|
1528
1551
|
"rect",
|
|
1529
1552
|
{
|
|
1530
1553
|
x: "2.5",
|
|
@@ -1537,7 +1560,7 @@ function FilledSquareCheck({ className }) {
|
|
|
1537
1560
|
strokeWidth: "1.5"
|
|
1538
1561
|
}
|
|
1539
1562
|
),
|
|
1540
|
-
/* @__PURE__ */
|
|
1563
|
+
/* @__PURE__ */ jsx16(
|
|
1541
1564
|
"path",
|
|
1542
1565
|
{
|
|
1543
1566
|
d: "M7.5 10L9.16667 11.66667L12.5 8.33333",
|
|
@@ -1555,9 +1578,9 @@ function FilledSquareCheck({ className }) {
|
|
|
1555
1578
|
}
|
|
1556
1579
|
);
|
|
1557
1580
|
}
|
|
1558
|
-
var Checkbox =
|
|
1581
|
+
var Checkbox = React8.forwardRef((_a, ref) => {
|
|
1559
1582
|
var _b = _a, { className, id, label, description, disabled } = _b, props = __objRest(_b, ["className", "id", "label", "description", "disabled"]);
|
|
1560
|
-
const checkboxRoot = /* @__PURE__ */
|
|
1583
|
+
const checkboxRoot = /* @__PURE__ */ jsxs13(
|
|
1561
1584
|
CheckboxPrimitive.Root,
|
|
1562
1585
|
__spreadProps(__spreadValues({
|
|
1563
1586
|
ref,
|
|
@@ -1575,19 +1598,19 @@ var Checkbox = React6.forwardRef((_a, ref) => {
|
|
|
1575
1598
|
)
|
|
1576
1599
|
}, props), {
|
|
1577
1600
|
children: [
|
|
1578
|
-
/* @__PURE__ */
|
|
1601
|
+
/* @__PURE__ */ jsx16(
|
|
1579
1602
|
Icon,
|
|
1580
1603
|
{
|
|
1581
1604
|
name: "square",
|
|
1582
1605
|
className: "size-5 text-border group-data-[state=checked]:hidden"
|
|
1583
1606
|
}
|
|
1584
1607
|
),
|
|
1585
|
-
/* @__PURE__ */
|
|
1608
|
+
/* @__PURE__ */ jsx16(CheckboxPrimitive.Indicator, { className: "absolute inset-0 flex items-center justify-center animate-checkbox-in", children: props.checked === "indeterminate" ? /* @__PURE__ */ jsx16(FilledSquareMinus, { className: "size-5 text-foreground" }) : /* @__PURE__ */ jsx16(FilledSquareCheck, { className: "size-5 text-foreground" }) })
|
|
1586
1609
|
]
|
|
1587
1610
|
})
|
|
1588
1611
|
);
|
|
1589
1612
|
if (!label) return checkboxRoot;
|
|
1590
|
-
return /* @__PURE__ */
|
|
1613
|
+
return /* @__PURE__ */ jsxs13(
|
|
1591
1614
|
"label",
|
|
1592
1615
|
{
|
|
1593
1616
|
className: cn(
|
|
@@ -1598,18 +1621,18 @@ var Checkbox = React6.forwardRef((_a, ref) => {
|
|
|
1598
1621
|
),
|
|
1599
1622
|
children: [
|
|
1600
1623
|
checkboxRoot,
|
|
1601
|
-
/* @__PURE__ */
|
|
1602
|
-
/* @__PURE__ */
|
|
1603
|
-
description && /* @__PURE__ */
|
|
1624
|
+
/* @__PURE__ */ jsxs13("div", { className: "flex flex-col gap-2", children: [
|
|
1625
|
+
/* @__PURE__ */ jsx16("span", { className: "text-sm font-medium leading-5 tracking-tight text-foreground select-none", children: label }),
|
|
1626
|
+
description && /* @__PURE__ */ jsx16("p", { className: "text-sm font-normal leading-5 tracking-tight text-muted-foreground", children: description })
|
|
1604
1627
|
] })
|
|
1605
1628
|
]
|
|
1606
1629
|
}
|
|
1607
1630
|
);
|
|
1608
1631
|
});
|
|
1609
1632
|
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
1610
|
-
var CheckboxCard =
|
|
1633
|
+
var CheckboxCard = React8.forwardRef((_a, ref) => {
|
|
1611
1634
|
var _b = _a, { className, id, label, description, disabled } = _b, props = __objRest(_b, ["className", "id", "label", "description", "disabled"]);
|
|
1612
|
-
return /* @__PURE__ */
|
|
1635
|
+
return /* @__PURE__ */ jsxs13(
|
|
1613
1636
|
"label",
|
|
1614
1637
|
{
|
|
1615
1638
|
htmlFor: id,
|
|
@@ -1622,7 +1645,7 @@ var CheckboxCard = React6.forwardRef((_a, ref) => {
|
|
|
1622
1645
|
className
|
|
1623
1646
|
),
|
|
1624
1647
|
children: [
|
|
1625
|
-
/* @__PURE__ */
|
|
1648
|
+
/* @__PURE__ */ jsx16(
|
|
1626
1649
|
Checkbox,
|
|
1627
1650
|
__spreadValues({
|
|
1628
1651
|
ref,
|
|
@@ -1631,9 +1654,9 @@ var CheckboxCard = React6.forwardRef((_a, ref) => {
|
|
|
1631
1654
|
className: "mt-0.5"
|
|
1632
1655
|
}, props)
|
|
1633
1656
|
),
|
|
1634
|
-
/* @__PURE__ */
|
|
1635
|
-
/* @__PURE__ */
|
|
1636
|
-
description && /* @__PURE__ */
|
|
1657
|
+
/* @__PURE__ */ jsxs13("div", { className: "flex flex-col gap-2 flex-1 min-w-0", children: [
|
|
1658
|
+
/* @__PURE__ */ jsx16("span", { className: "text-sm font-medium leading-5 tracking-tight text-foreground", children: label }),
|
|
1659
|
+
description && /* @__PURE__ */ jsx16("span", { className: "text-sm font-normal leading-5 tracking-tight text-muted-foreground", children: description })
|
|
1637
1660
|
] })
|
|
1638
1661
|
]
|
|
1639
1662
|
}
|
|
@@ -1643,7 +1666,7 @@ CheckboxCard.displayName = "CheckboxCard";
|
|
|
1643
1666
|
|
|
1644
1667
|
// src/components/ui/choice-card.tsx
|
|
1645
1668
|
import { createContext, useContext, useState as useState2 } from "react";
|
|
1646
|
-
import { jsx as
|
|
1669
|
+
import { jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1647
1670
|
var ChoiceCardGroupContext = createContext({
|
|
1648
1671
|
value: "",
|
|
1649
1672
|
onChange: () => {
|
|
@@ -1663,7 +1686,7 @@ function ChoiceCardGroup({
|
|
|
1663
1686
|
if (!isControlled) setInternalValue(v);
|
|
1664
1687
|
onValueChange == null ? void 0 : onValueChange(v);
|
|
1665
1688
|
};
|
|
1666
|
-
return /* @__PURE__ */
|
|
1689
|
+
return /* @__PURE__ */ jsx17(ChoiceCardGroupContext.Provider, { value: { value, onChange }, children: /* @__PURE__ */ jsx17("div", { className: cn("flex flex-col gap-3", className), role: "radiogroup", children }) });
|
|
1667
1690
|
}
|
|
1668
1691
|
function ChoiceCardItem({
|
|
1669
1692
|
value,
|
|
@@ -1673,7 +1696,7 @@ function ChoiceCardItem({
|
|
|
1673
1696
|
}) {
|
|
1674
1697
|
const { value: groupValue, onChange } = useContext(ChoiceCardGroupContext);
|
|
1675
1698
|
const isSelected = groupValue === value;
|
|
1676
|
-
return /* @__PURE__ */
|
|
1699
|
+
return /* @__PURE__ */ jsxs14(
|
|
1677
1700
|
"button",
|
|
1678
1701
|
{
|
|
1679
1702
|
type: "button",
|
|
@@ -1685,18 +1708,18 @@ function ChoiceCardItem({
|
|
|
1685
1708
|
isSelected ? "border-primary bg-background" : "border-border bg-background hover:bg-secondary"
|
|
1686
1709
|
),
|
|
1687
1710
|
children: [
|
|
1688
|
-
/* @__PURE__ */
|
|
1689
|
-
/* @__PURE__ */
|
|
1690
|
-
description && /* @__PURE__ */
|
|
1711
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex flex-1 flex-col gap-1.5 min-w-0", children: [
|
|
1712
|
+
/* @__PURE__ */ jsx17("p", { className: "text-sm font-medium tracking-tight text-foreground", children: title }),
|
|
1713
|
+
description && /* @__PURE__ */ jsx17("p", { className: "text-xs tracking-tight text-muted-foreground", children: description })
|
|
1691
1714
|
] }),
|
|
1692
|
-
/* @__PURE__ */
|
|
1715
|
+
/* @__PURE__ */ jsx17(
|
|
1693
1716
|
"div",
|
|
1694
1717
|
{
|
|
1695
1718
|
className: cn(
|
|
1696
1719
|
"mt-px size-4 shrink-0 self-start rounded-full border shadow-button transition-colors",
|
|
1697
1720
|
isSelected ? "border-ring" : "border-border bg-background"
|
|
1698
1721
|
),
|
|
1699
|
-
children: isSelected && /* @__PURE__ */
|
|
1722
|
+
children: isSelected && /* @__PURE__ */ jsx17(
|
|
1700
1723
|
"div",
|
|
1701
1724
|
{
|
|
1702
1725
|
className: "mx-auto size-2 rounded-full bg-foreground",
|
|
@@ -1711,9 +1734,9 @@ function ChoiceCardItem({
|
|
|
1711
1734
|
}
|
|
1712
1735
|
|
|
1713
1736
|
// src/components/ui/collapsible.tsx
|
|
1714
|
-
import * as
|
|
1737
|
+
import * as React10 from "react";
|
|
1715
1738
|
import { Collapsible as CollapsiblePrimitive } from "radix-ui";
|
|
1716
|
-
import { jsx as
|
|
1739
|
+
import { jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1717
1740
|
function CollapsibleAvatar({
|
|
1718
1741
|
workspace,
|
|
1719
1742
|
size = "lg"
|
|
@@ -1721,7 +1744,7 @@ function CollapsibleAvatar({
|
|
|
1721
1744
|
var _a;
|
|
1722
1745
|
const sizeClass = size === "lg" ? "size-9 rounded-lg" : "size-8 rounded-md";
|
|
1723
1746
|
const bgClass = workspace.avatarColor === "chart-1" ? "bg-chart-1" : "bg-sidebar-ring";
|
|
1724
|
-
return /* @__PURE__ */
|
|
1747
|
+
return /* @__PURE__ */ jsx18(
|
|
1725
1748
|
"div",
|
|
1726
1749
|
{
|
|
1727
1750
|
className: cn(
|
|
@@ -1729,22 +1752,22 @@ function CollapsibleAvatar({
|
|
|
1729
1752
|
sizeClass,
|
|
1730
1753
|
bgClass
|
|
1731
1754
|
),
|
|
1732
|
-
children: workspace.avatarSrc ? /* @__PURE__ */
|
|
1755
|
+
children: workspace.avatarSrc ? /* @__PURE__ */ jsx18(
|
|
1733
1756
|
"img",
|
|
1734
1757
|
{
|
|
1735
1758
|
src: workspace.avatarSrc,
|
|
1736
1759
|
alt: workspace.name,
|
|
1737
1760
|
className: "absolute inset-0 size-full object-cover"
|
|
1738
1761
|
}
|
|
1739
|
-
) : /* @__PURE__ */
|
|
1762
|
+
) : /* @__PURE__ */ jsx18("span", { className: "absolute inset-0 flex items-center justify-center text-base font-medium leading-6 text-center text-white tracking-tight whitespace-nowrap", children: (_a = workspace.avatarText) != null ? _a : workspace.name[0] })
|
|
1740
1763
|
}
|
|
1741
1764
|
);
|
|
1742
1765
|
}
|
|
1743
1766
|
function CollapsibleBadge({ children }) {
|
|
1744
|
-
return /* @__PURE__ */
|
|
1767
|
+
return /* @__PURE__ */ jsx18("div", { className: "bg-background border border-border flex gap-1 h-5.5 items-center justify-center px-2.5 py-0.5 rounded-lg shrink-0", children: /* @__PURE__ */ jsx18("span", { className: "text-xs font-medium leading-xs text-foreground text-center tracking-tight whitespace-nowrap", children }) });
|
|
1745
1768
|
}
|
|
1746
1769
|
function ChevronsUpDownIcon({ className }) {
|
|
1747
|
-
return /* @__PURE__ */
|
|
1770
|
+
return /* @__PURE__ */ jsx18("div", { className: cn("overflow-hidden relative shrink-0 size-4", className), children: /* @__PURE__ */ jsx18("div", { className: "absolute", style: { inset: "16.67% 29.17%" }, children: /* @__PURE__ */ jsx18("div", { className: "absolute", style: { inset: "-4.69% -7.5%" }, children: /* @__PURE__ */ jsx18("img", { alt: "", "aria-hidden": true, src: "/icons/chevrons-up-down.svg", className: "block max-w-none size-full" }) }) }) });
|
|
1748
1771
|
}
|
|
1749
1772
|
function Collapsible({
|
|
1750
1773
|
activeWorkspace,
|
|
@@ -1756,27 +1779,27 @@ function Collapsible({
|
|
|
1756
1779
|
onSelectWorkspace,
|
|
1757
1780
|
className
|
|
1758
1781
|
}) {
|
|
1759
|
-
const [internalOpen, setInternalOpen] =
|
|
1782
|
+
const [internalOpen, setInternalOpen] = React10.useState(defaultOpen);
|
|
1760
1783
|
const isOpen = open !== void 0 ? open : internalOpen;
|
|
1761
1784
|
function handleOpenChange(next) {
|
|
1762
1785
|
setInternalOpen(next);
|
|
1763
1786
|
onOpenChange == null ? void 0 : onOpenChange(next);
|
|
1764
1787
|
}
|
|
1765
|
-
return /* @__PURE__ */
|
|
1788
|
+
return /* @__PURE__ */ jsxs15(
|
|
1766
1789
|
CollapsiblePrimitive.Root,
|
|
1767
1790
|
{
|
|
1768
1791
|
open: isOpen,
|
|
1769
1792
|
onOpenChange: handleOpenChange,
|
|
1770
1793
|
className: cn("relative flex flex-col w-full", className),
|
|
1771
1794
|
children: [
|
|
1772
|
-
isOpen && /* @__PURE__ */
|
|
1795
|
+
isOpen && /* @__PURE__ */ jsx18(
|
|
1773
1796
|
"div",
|
|
1774
1797
|
{
|
|
1775
1798
|
className: "fixed inset-0 z-10",
|
|
1776
1799
|
onClick: () => handleOpenChange(false)
|
|
1777
1800
|
}
|
|
1778
1801
|
),
|
|
1779
|
-
/* @__PURE__ */
|
|
1802
|
+
/* @__PURE__ */ jsx18(CollapsiblePrimitive.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs15(
|
|
1780
1803
|
"button",
|
|
1781
1804
|
{
|
|
1782
1805
|
className: cn(
|
|
@@ -1785,54 +1808,54 @@ function Collapsible({
|
|
|
1785
1808
|
"data-[state=open]:bg-sidebar-accent"
|
|
1786
1809
|
),
|
|
1787
1810
|
children: [
|
|
1788
|
-
/* @__PURE__ */
|
|
1789
|
-
/* @__PURE__ */
|
|
1790
|
-
/* @__PURE__ */
|
|
1791
|
-
/* @__PURE__ */
|
|
1792
|
-
/* @__PURE__ */
|
|
1811
|
+
/* @__PURE__ */ jsxs15("div", { className: "flex flex-1 gap-2 items-center min-w-0", children: [
|
|
1812
|
+
/* @__PURE__ */ jsx18(CollapsibleAvatar, { workspace: activeWorkspace, size: "lg" }),
|
|
1813
|
+
/* @__PURE__ */ jsxs15("div", { className: "flex gap-1 items-center min-w-0 shrink-0", children: [
|
|
1814
|
+
/* @__PURE__ */ jsx18("span", { className: "text-base font-medium leading-6 text-foreground tracking-tight whitespace-nowrap", children: activeWorkspace.name }),
|
|
1815
|
+
/* @__PURE__ */ jsx18(CollapsibleBadge, { children: activeWorkspace.badge })
|
|
1793
1816
|
] })
|
|
1794
1817
|
] }),
|
|
1795
|
-
/* @__PURE__ */
|
|
1818
|
+
/* @__PURE__ */ jsx18("div", { className: "flex items-center justify-center rounded-lg shrink-0 size-8", children: /* @__PURE__ */ jsx18(ChevronsUpDownIcon, {}) })
|
|
1796
1819
|
]
|
|
1797
1820
|
}
|
|
1798
1821
|
) }),
|
|
1799
|
-
/* @__PURE__ */
|
|
1822
|
+
/* @__PURE__ */ jsx18(CollapsiblePrimitive.Content, { className: cn(
|
|
1800
1823
|
"absolute left-0 top-full z-20 pt-1 w-80",
|
|
1801
1824
|
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 duration-200",
|
|
1802
1825
|
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:duration-150"
|
|
1803
|
-
), children: /* @__PURE__ */
|
|
1826
|
+
), children: /* @__PURE__ */ jsxs15("div", { className: "bg-background border border-border rounded-xl shadow-sm px-2 py-2 flex flex-col gap-1", children: [
|
|
1804
1827
|
workspaces.map(
|
|
1805
1828
|
(ws) => ws.isActive ? (
|
|
1806
1829
|
/* ── 활성 워크스페이스 (강조 + Check 아이콘) ── */
|
|
1807
|
-
/* @__PURE__ */
|
|
1830
|
+
/* @__PURE__ */ jsxs15(
|
|
1808
1831
|
"div",
|
|
1809
1832
|
{
|
|
1810
1833
|
className: "flex items-center justify-between h-12 px-2 py-2 rounded-md bg-accent",
|
|
1811
1834
|
children: [
|
|
1812
|
-
/* @__PURE__ */
|
|
1813
|
-
/* @__PURE__ */
|
|
1814
|
-
/* @__PURE__ */
|
|
1815
|
-
/* @__PURE__ */
|
|
1816
|
-
/* @__PURE__ */
|
|
1835
|
+
/* @__PURE__ */ jsxs15("div", { className: "flex gap-2 items-center", children: [
|
|
1836
|
+
/* @__PURE__ */ jsx18(CollapsibleAvatar, { workspace: ws, size: "md" }),
|
|
1837
|
+
/* @__PURE__ */ jsxs15("div", { className: "flex gap-1 items-center", children: [
|
|
1838
|
+
/* @__PURE__ */ jsx18("span", { className: "text-sm text-foreground leading-5 tracking-tight whitespace-nowrap", children: ws.name }),
|
|
1839
|
+
/* @__PURE__ */ jsx18(CollapsibleBadge, { children: ws.badge })
|
|
1817
1840
|
] })
|
|
1818
1841
|
] }),
|
|
1819
|
-
/* @__PURE__ */
|
|
1842
|
+
/* @__PURE__ */ jsx18("div", { className: "flex items-center justify-center size-9 shrink-0", children: /* @__PURE__ */ jsx18(Icon, { name: "check", className: "size-4 text-foreground" }) })
|
|
1820
1843
|
]
|
|
1821
1844
|
},
|
|
1822
1845
|
ws.id
|
|
1823
1846
|
)
|
|
1824
1847
|
) : (
|
|
1825
1848
|
/* ── 비활성 워크스페이스 (클릭 가능) ── */
|
|
1826
|
-
/* @__PURE__ */
|
|
1849
|
+
/* @__PURE__ */ jsx18(
|
|
1827
1850
|
"button",
|
|
1828
1851
|
{
|
|
1829
1852
|
className: "flex items-center w-full h-12 px-2 py-2 rounded-md hover:bg-accent transition-colors cursor-pointer",
|
|
1830
1853
|
onClick: () => onSelectWorkspace == null ? void 0 : onSelectWorkspace(ws),
|
|
1831
|
-
children: /* @__PURE__ */
|
|
1832
|
-
/* @__PURE__ */
|
|
1833
|
-
/* @__PURE__ */
|
|
1834
|
-
/* @__PURE__ */
|
|
1835
|
-
/* @__PURE__ */
|
|
1854
|
+
children: /* @__PURE__ */ jsxs15("div", { className: "flex gap-2 items-center", children: [
|
|
1855
|
+
/* @__PURE__ */ jsx18(CollapsibleAvatar, { workspace: ws, size: "md" }),
|
|
1856
|
+
/* @__PURE__ */ jsxs15("div", { className: "flex gap-1 items-center", children: [
|
|
1857
|
+
/* @__PURE__ */ jsx18("span", { className: "text-sm text-foreground leading-5 tracking-tight whitespace-nowrap", children: ws.name }),
|
|
1858
|
+
/* @__PURE__ */ jsx18(CollapsibleBadge, { children: ws.badge })
|
|
1836
1859
|
] })
|
|
1837
1860
|
] })
|
|
1838
1861
|
},
|
|
@@ -1840,14 +1863,14 @@ function Collapsible({
|
|
|
1840
1863
|
)
|
|
1841
1864
|
)
|
|
1842
1865
|
),
|
|
1843
|
-
/* @__PURE__ */
|
|
1866
|
+
/* @__PURE__ */ jsxs15(
|
|
1844
1867
|
"button",
|
|
1845
1868
|
{
|
|
1846
1869
|
className: "flex items-center justify-center gap-2 w-full h-12 px-2 py-2 rounded-md hover:bg-accent transition-colors cursor-pointer",
|
|
1847
1870
|
onClick: onCreateTeam,
|
|
1848
1871
|
children: [
|
|
1849
|
-
/* @__PURE__ */
|
|
1850
|
-
/* @__PURE__ */
|
|
1872
|
+
/* @__PURE__ */ jsx18(Icon, { name: "plus", className: "size-4 text-muted-foreground" }),
|
|
1873
|
+
/* @__PURE__ */ jsx18("span", { className: "text-sm text-muted-foreground leading-5 tracking-tight whitespace-nowrap", children: "\uD300 \uC0DD\uC131\uD558\uAE30" })
|
|
1851
1874
|
]
|
|
1852
1875
|
}
|
|
1853
1876
|
)
|
|
@@ -1861,13 +1884,13 @@ var CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;
|
|
|
1861
1884
|
var CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;
|
|
1862
1885
|
|
|
1863
1886
|
// src/components/ui/combobox.tsx
|
|
1864
|
-
import * as
|
|
1887
|
+
import * as React11 from "react";
|
|
1865
1888
|
import { Popover as PopoverPrimitive } from "radix-ui";
|
|
1866
1889
|
|
|
1867
1890
|
// src/components/icons/custom/chevrons-up-down.tsx
|
|
1868
|
-
import { jsx as
|
|
1891
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
1869
1892
|
function ChevronsUpDownIcon2({ className }) {
|
|
1870
|
-
return /* @__PURE__ */
|
|
1893
|
+
return /* @__PURE__ */ jsx19(
|
|
1871
1894
|
"svg",
|
|
1872
1895
|
{
|
|
1873
1896
|
viewBox: "-6.25 -3.25 24 24",
|
|
@@ -1878,13 +1901,13 @@ function ChevronsUpDownIcon2({ className }) {
|
|
|
1878
1901
|
strokeWidth: 1.5,
|
|
1879
1902
|
"aria-hidden": true,
|
|
1880
1903
|
className: cn("shrink-0", className),
|
|
1881
|
-
children: /* @__PURE__ */
|
|
1904
|
+
children: /* @__PURE__ */ jsx19("path", { d: "M0.75 11.75L5.75 16.75L10.75 11.75M0.75 5.75L5.75 0.75L10.75 5.75" })
|
|
1882
1905
|
}
|
|
1883
1906
|
);
|
|
1884
1907
|
}
|
|
1885
1908
|
|
|
1886
1909
|
// src/components/ui/combobox.tsx
|
|
1887
|
-
import { jsx as
|
|
1910
|
+
import { jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1888
1911
|
function Combobox({
|
|
1889
1912
|
options,
|
|
1890
1913
|
value,
|
|
@@ -1896,10 +1919,10 @@ function Combobox({
|
|
|
1896
1919
|
className,
|
|
1897
1920
|
disabled = false
|
|
1898
1921
|
}) {
|
|
1899
|
-
const [open, setOpen] =
|
|
1900
|
-
const [search, setSearch] =
|
|
1901
|
-
const inputRef =
|
|
1902
|
-
const filtered =
|
|
1922
|
+
const [open, setOpen] = React11.useState(false);
|
|
1923
|
+
const [search, setSearch] = React11.useState("");
|
|
1924
|
+
const inputRef = React11.useRef(null);
|
|
1925
|
+
const filtered = React11.useMemo(
|
|
1903
1926
|
() => showSearch && search.trim() ? options.filter(
|
|
1904
1927
|
(opt) => opt.label.toLowerCase().includes(search.toLowerCase())
|
|
1905
1928
|
) : options,
|
|
@@ -1910,7 +1933,7 @@ function Combobox({
|
|
|
1910
1933
|
setOpen(next);
|
|
1911
1934
|
if (!next) setSearch("");
|
|
1912
1935
|
}
|
|
1913
|
-
|
|
1936
|
+
React11.useEffect(() => {
|
|
1914
1937
|
if (open && showSearch) {
|
|
1915
1938
|
requestAnimationFrame(() => {
|
|
1916
1939
|
var _a;
|
|
@@ -1923,8 +1946,8 @@ function Combobox({
|
|
|
1923
1946
|
setOpen(false);
|
|
1924
1947
|
setSearch("");
|
|
1925
1948
|
}
|
|
1926
|
-
return /* @__PURE__ */
|
|
1927
|
-
/* @__PURE__ */
|
|
1949
|
+
return /* @__PURE__ */ jsxs16(PopoverPrimitive.Root, { open, onOpenChange: handleOpenChange, children: [
|
|
1950
|
+
/* @__PURE__ */ jsx20(PopoverPrimitive.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs16(
|
|
1928
1951
|
"button",
|
|
1929
1952
|
{
|
|
1930
1953
|
type: "button",
|
|
@@ -1939,9 +1962,9 @@ function Combobox({
|
|
|
1939
1962
|
className
|
|
1940
1963
|
),
|
|
1941
1964
|
children: [
|
|
1942
|
-
/* @__PURE__ */
|
|
1943
|
-
(selectedOption == null ? void 0 : selectedOption.icon) && /* @__PURE__ */
|
|
1944
|
-
/* @__PURE__ */
|
|
1965
|
+
/* @__PURE__ */ jsxs16("span", { className: "flex flex-1 min-w-0 items-center gap-1.5", children: [
|
|
1966
|
+
(selectedOption == null ? void 0 : selectedOption.icon) && /* @__PURE__ */ jsx20("span", { className: "shrink-0 flex items-center", children: selectedOption.icon }),
|
|
1967
|
+
/* @__PURE__ */ jsx20(
|
|
1945
1968
|
"span",
|
|
1946
1969
|
{
|
|
1947
1970
|
className: cn(
|
|
@@ -1952,11 +1975,11 @@ function Combobox({
|
|
|
1952
1975
|
}
|
|
1953
1976
|
)
|
|
1954
1977
|
] }),
|
|
1955
|
-
/* @__PURE__ */
|
|
1978
|
+
/* @__PURE__ */ jsx20(ChevronsUpDownIcon2, { className: "size-4 text-muted-foreground" })
|
|
1956
1979
|
]
|
|
1957
1980
|
}
|
|
1958
1981
|
) }),
|
|
1959
|
-
/* @__PURE__ */
|
|
1982
|
+
/* @__PURE__ */ jsx20(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsxs16(
|
|
1960
1983
|
PopoverPrimitive.Content,
|
|
1961
1984
|
{
|
|
1962
1985
|
align: "start",
|
|
@@ -1971,9 +1994,9 @@ function Combobox({
|
|
|
1971
1994
|
"duration-200 data-[state=closed]:duration-150"
|
|
1972
1995
|
),
|
|
1973
1996
|
children: [
|
|
1974
|
-
showSearch && /* @__PURE__ */
|
|
1975
|
-
/* @__PURE__ */
|
|
1976
|
-
/* @__PURE__ */
|
|
1997
|
+
showSearch && /* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-2 border-b border-border px-3", children: [
|
|
1998
|
+
/* @__PURE__ */ jsx20(Icon, { name: "search", className: "size-4 text-muted-foreground" }),
|
|
1999
|
+
/* @__PURE__ */ jsx20(
|
|
1977
2000
|
"input",
|
|
1978
2001
|
{
|
|
1979
2002
|
ref: inputRef,
|
|
@@ -1984,10 +2007,10 @@ function Combobox({
|
|
|
1984
2007
|
}
|
|
1985
2008
|
)
|
|
1986
2009
|
] }),
|
|
1987
|
-
/* @__PURE__ */
|
|
1988
|
-
filtered.length === 0 ? /* @__PURE__ */
|
|
2010
|
+
/* @__PURE__ */ jsxs16("div", { className: "p-1 flex flex-col overflow-y-auto", style: { maxHeight: 384 }, children: [
|
|
2011
|
+
filtered.length === 0 ? /* @__PURE__ */ jsx20("p", { className: "px-2 py-1.5 text-sm text-muted-foreground text-center", children: "\uACB0\uACFC \uC5C6\uC74C" }) : filtered.map((opt) => {
|
|
1989
2012
|
const isSelected = opt.value === value;
|
|
1990
|
-
return /* @__PURE__ */
|
|
2013
|
+
return /* @__PURE__ */ jsxs16(
|
|
1991
2014
|
"button",
|
|
1992
2015
|
{
|
|
1993
2016
|
type: "button",
|
|
@@ -1999,15 +2022,15 @@ function Combobox({
|
|
|
1999
2022
|
isSelected ? "bg-accent text-accent-foreground" : "text-popover-foreground hover:bg-accent hover:text-accent-foreground"
|
|
2000
2023
|
),
|
|
2001
2024
|
children: [
|
|
2002
|
-
opt.icon && /* @__PURE__ */
|
|
2003
|
-
/* @__PURE__ */
|
|
2004
|
-
isSelected && /* @__PURE__ */
|
|
2025
|
+
opt.icon && /* @__PURE__ */ jsx20("span", { className: "shrink-0 flex items-center", children: opt.icon }),
|
|
2026
|
+
/* @__PURE__ */ jsx20("span", { className: "flex-1 min-w-0 truncate text-left", children: opt.label }),
|
|
2027
|
+
isSelected && /* @__PURE__ */ jsx20(Icon, { name: "check", className: "size-4 text-foreground" })
|
|
2005
2028
|
]
|
|
2006
2029
|
},
|
|
2007
2030
|
opt.value
|
|
2008
2031
|
);
|
|
2009
2032
|
}),
|
|
2010
|
-
footer && /* @__PURE__ */
|
|
2033
|
+
footer && /* @__PURE__ */ jsxs16(
|
|
2011
2034
|
"button",
|
|
2012
2035
|
{
|
|
2013
2036
|
type: "button",
|
|
@@ -2017,8 +2040,8 @@ function Combobox({
|
|
|
2017
2040
|
},
|
|
2018
2041
|
className: "flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm font-normal leading-5 tracking-tight text-muted-foreground hover:bg-accent hover:text-accent-foreground cursor-pointer transition-colors",
|
|
2019
2042
|
children: [
|
|
2020
|
-
/* @__PURE__ */
|
|
2021
|
-
/* @__PURE__ */
|
|
2043
|
+
/* @__PURE__ */ jsx20(Icon, { name: "plus", className: "size-4 text-muted-foreground" }),
|
|
2044
|
+
/* @__PURE__ */ jsx20("span", { className: "flex-1 min-w-0 truncate text-left", children: footer.label })
|
|
2022
2045
|
]
|
|
2023
2046
|
}
|
|
2024
2047
|
)
|
|
@@ -2030,9 +2053,9 @@ function Combobox({
|
|
|
2030
2053
|
}
|
|
2031
2054
|
|
|
2032
2055
|
// src/components/ui/date-picker.tsx
|
|
2033
|
-
import * as
|
|
2056
|
+
import * as React12 from "react";
|
|
2034
2057
|
import { Popover as PopoverPrimitive2 } from "radix-ui";
|
|
2035
|
-
import { jsx as
|
|
2058
|
+
import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2036
2059
|
var EN_MONTHS = [
|
|
2037
2060
|
"January",
|
|
2038
2061
|
"February",
|
|
@@ -2178,9 +2201,9 @@ function CalendarGrid({
|
|
|
2178
2201
|
const rangeStartTime = rangeStart ? startOfDay(rangeStart).getTime() : null;
|
|
2179
2202
|
const rangeEndTime = rangeEnd ? startOfDay(rangeEnd).getTime() : null;
|
|
2180
2203
|
const visualEndTime = rangeEndTime != null ? rangeEndTime : rangeStartTime !== null && hoverDate ? startOfDay(hoverDate).getTime() : null;
|
|
2181
|
-
return /* @__PURE__ */
|
|
2182
|
-
/* @__PURE__ */
|
|
2183
|
-
/* @__PURE__ */
|
|
2204
|
+
return /* @__PURE__ */ jsxs17("div", { className: "px-5 pt-3 pb-4", children: [
|
|
2205
|
+
/* @__PURE__ */ jsxs17("div", { className: "mb-4 flex items-center justify-between", children: [
|
|
2206
|
+
/* @__PURE__ */ jsx21(
|
|
2184
2207
|
"button",
|
|
2185
2208
|
{
|
|
2186
2209
|
type: "button",
|
|
@@ -2190,21 +2213,21 @@ function CalendarGrid({
|
|
|
2190
2213
|
"flex size-8 items-center justify-center rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
2191
2214
|
isPrevDisabled ? "text-muted-foreground opacity-30 cursor-not-allowed" : "text-foreground hover:bg-accent active:bg-accent cursor-pointer"
|
|
2192
2215
|
),
|
|
2193
|
-
children: /* @__PURE__ */
|
|
2216
|
+
children: /* @__PURE__ */ jsx21(Icon, { name: "chevron-left", className: "size-4" })
|
|
2194
2217
|
}
|
|
2195
2218
|
),
|
|
2196
|
-
/* @__PURE__ */
|
|
2197
|
-
/* @__PURE__ */
|
|
2198
|
-
/* @__PURE__ */
|
|
2219
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-1.5", children: [
|
|
2220
|
+
/* @__PURE__ */ jsxs17("div", { className: "relative", children: [
|
|
2221
|
+
/* @__PURE__ */ jsx21(
|
|
2199
2222
|
"select",
|
|
2200
2223
|
{
|
|
2201
2224
|
value: year,
|
|
2202
2225
|
onChange: (e) => onYearChange(Number(e.target.value)),
|
|
2203
2226
|
className: "h-8 appearance-none rounded-lg border border-border bg-background pl-3 pr-6 text-sm font-medium text-foreground transition-colors hover:bg-accent focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 cursor-pointer",
|
|
2204
|
-
children: years.map((y) => /* @__PURE__ */
|
|
2227
|
+
children: years.map((y) => /* @__PURE__ */ jsx21("option", { value: y, children: config.formatYear(y) }, y))
|
|
2205
2228
|
}
|
|
2206
2229
|
),
|
|
2207
|
-
/* @__PURE__ */
|
|
2230
|
+
/* @__PURE__ */ jsx21(
|
|
2208
2231
|
Icon,
|
|
2209
2232
|
{
|
|
2210
2233
|
name: "chevron-down",
|
|
@@ -2212,17 +2235,17 @@ function CalendarGrid({
|
|
|
2212
2235
|
}
|
|
2213
2236
|
)
|
|
2214
2237
|
] }),
|
|
2215
|
-
/* @__PURE__ */
|
|
2216
|
-
/* @__PURE__ */
|
|
2238
|
+
/* @__PURE__ */ jsxs17("div", { className: "relative", children: [
|
|
2239
|
+
/* @__PURE__ */ jsx21(
|
|
2217
2240
|
"select",
|
|
2218
2241
|
{
|
|
2219
2242
|
value: month,
|
|
2220
2243
|
onChange: (e) => onMonthChange(Number(e.target.value)),
|
|
2221
2244
|
className: "h-8 appearance-none rounded-lg border border-border bg-background pl-3 pr-6 text-sm font-medium text-foreground transition-colors hover:bg-accent focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 cursor-pointer",
|
|
2222
|
-
children: Array.from({ length: 12 }, (_, i) => /* @__PURE__ */
|
|
2245
|
+
children: Array.from({ length: 12 }, (_, i) => /* @__PURE__ */ jsx21("option", { value: i, children: config.formatMonth(i) }, i))
|
|
2223
2246
|
}
|
|
2224
2247
|
),
|
|
2225
|
-
/* @__PURE__ */
|
|
2248
|
+
/* @__PURE__ */ jsx21(
|
|
2226
2249
|
Icon,
|
|
2227
2250
|
{
|
|
2228
2251
|
name: "chevron-down",
|
|
@@ -2231,7 +2254,7 @@ function CalendarGrid({
|
|
|
2231
2254
|
)
|
|
2232
2255
|
] })
|
|
2233
2256
|
] }),
|
|
2234
|
-
/* @__PURE__ */
|
|
2257
|
+
/* @__PURE__ */ jsx21(
|
|
2235
2258
|
"button",
|
|
2236
2259
|
{
|
|
2237
2260
|
type: "button",
|
|
@@ -2241,11 +2264,11 @@ function CalendarGrid({
|
|
|
2241
2264
|
"flex size-8 items-center justify-center rounded-md transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
2242
2265
|
isNextDisabled ? "text-muted-foreground opacity-30 cursor-not-allowed" : "text-foreground hover:bg-accent active:bg-accent cursor-pointer"
|
|
2243
2266
|
),
|
|
2244
|
-
children: /* @__PURE__ */
|
|
2267
|
+
children: /* @__PURE__ */ jsx21(Icon, { name: "chevron-right", className: "size-4" })
|
|
2245
2268
|
}
|
|
2246
2269
|
)
|
|
2247
2270
|
] }),
|
|
2248
|
-
/* @__PURE__ */
|
|
2271
|
+
/* @__PURE__ */ jsx21("div", { className: "mb-1 grid grid-cols-7 gap-1", children: config.dayHeaders.map((d) => /* @__PURE__ */ jsx21(
|
|
2249
2272
|
"div",
|
|
2250
2273
|
{
|
|
2251
2274
|
className: "flex h-10 items-center justify-center text-sm font-normal leading-xs text-muted-foreground",
|
|
@@ -2253,7 +2276,7 @@ function CalendarGrid({
|
|
|
2253
2276
|
},
|
|
2254
2277
|
d
|
|
2255
2278
|
)) }),
|
|
2256
|
-
/* @__PURE__ */
|
|
2279
|
+
/* @__PURE__ */ jsx21(
|
|
2257
2280
|
"div",
|
|
2258
2281
|
{
|
|
2259
2282
|
className: "grid grid-cols-7 gap-1",
|
|
@@ -2267,7 +2290,7 @@ function CalendarGrid({
|
|
|
2267
2290
|
const isRangeEnd = isRangeMode && rangeEndTime !== null && t === rangeEndTime;
|
|
2268
2291
|
const isInRange = isRangeMode && rangeStartTime !== null && visualEndTime !== null && !isRangeStart && !isRangeEnd && t > Math.min(rangeStartTime, visualEndTime) && t < Math.max(rangeStartTime, visualEndTime);
|
|
2269
2292
|
const isSelected = isRangeMode ? isRangeStart || isRangeEnd : (selectedStart == null ? void 0 : selectedStart.getTime()) === t;
|
|
2270
|
-
return /* @__PURE__ */
|
|
2293
|
+
return /* @__PURE__ */ jsx21(
|
|
2271
2294
|
"button",
|
|
2272
2295
|
{
|
|
2273
2296
|
type: "button",
|
|
@@ -2306,34 +2329,34 @@ function DatePicker({
|
|
|
2306
2329
|
disabled = false
|
|
2307
2330
|
}) {
|
|
2308
2331
|
var _a;
|
|
2309
|
-
const today =
|
|
2332
|
+
const today = React12.useMemo(() => /* @__PURE__ */ new Date(), []);
|
|
2310
2333
|
const config = LOCALE_CONFIG[locale];
|
|
2311
|
-
const disabledRules =
|
|
2334
|
+
const disabledRules = React12.useMemo(() => {
|
|
2312
2335
|
const rules = disabledDates ? Array.isArray(disabledDates) ? disabledDates : [disabledDates] : [];
|
|
2313
2336
|
if (disablePast && !rules.includes("past")) return [...rules, "past"];
|
|
2314
2337
|
return rules;
|
|
2315
2338
|
}, [disabledDates, disablePast]);
|
|
2316
|
-
const [open, setOpen] =
|
|
2317
|
-
const [selected, setSelected] =
|
|
2339
|
+
const [open, setOpen] = React12.useState(false);
|
|
2340
|
+
const [selected, setSelected] = React12.useState(defaultValue);
|
|
2318
2341
|
const activeDate = value !== void 0 ? value : selected;
|
|
2319
|
-
const [internalRange, setInternalRange] =
|
|
2342
|
+
const [internalRange, setInternalRange] = React12.useState(
|
|
2320
2343
|
defaultRange != null ? defaultRange : {}
|
|
2321
2344
|
);
|
|
2322
2345
|
const activeRange = range !== void 0 ? range : internalRange;
|
|
2323
|
-
const [pickingStage, setPickingStage] =
|
|
2324
|
-
const [hoverDate, setHoverDate] =
|
|
2346
|
+
const [pickingStage, setPickingStage] = React12.useState("start");
|
|
2347
|
+
const [hoverDate, setHoverDate] = React12.useState();
|
|
2325
2348
|
const initialViewDate = mode === "range" ? (_a = activeRange.start) != null ? _a : today : activeDate != null ? activeDate : today;
|
|
2326
|
-
const [viewYear, setViewYear] =
|
|
2327
|
-
const [viewMonth, setViewMonth] =
|
|
2328
|
-
const activeDateRef =
|
|
2349
|
+
const [viewYear, setViewYear] = React12.useState(() => initialViewDate.getFullYear());
|
|
2350
|
+
const [viewMonth, setViewMonth] = React12.useState(() => initialViewDate.getMonth());
|
|
2351
|
+
const activeDateRef = React12.useRef(activeDate);
|
|
2329
2352
|
activeDateRef.current = activeDate;
|
|
2330
|
-
const activeRangeRef =
|
|
2353
|
+
const activeRangeRef = React12.useRef(activeRange);
|
|
2331
2354
|
activeRangeRef.current = activeRange;
|
|
2332
|
-
const todayRef =
|
|
2355
|
+
const todayRef = React12.useRef(today);
|
|
2333
2356
|
todayRef.current = today;
|
|
2334
|
-
const modeRef =
|
|
2357
|
+
const modeRef = React12.useRef(mode);
|
|
2335
2358
|
modeRef.current = mode;
|
|
2336
|
-
|
|
2359
|
+
React12.useEffect(() => {
|
|
2337
2360
|
var _a2, _b;
|
|
2338
2361
|
if (!open) {
|
|
2339
2362
|
setHoverDate(void 0);
|
|
@@ -2345,7 +2368,7 @@ function DatePicker({
|
|
|
2345
2368
|
setViewYear(d.getFullYear());
|
|
2346
2369
|
setViewMonth(d.getMonth());
|
|
2347
2370
|
}, [open]);
|
|
2348
|
-
const effectiveYearRange =
|
|
2371
|
+
const effectiveYearRange = React12.useMemo(
|
|
2349
2372
|
() => yearRange != null ? yearRange : [today.getFullYear() - 10, today.getFullYear() + 10],
|
|
2350
2373
|
[yearRange, today]
|
|
2351
2374
|
);
|
|
@@ -2406,13 +2429,13 @@ function DatePicker({
|
|
|
2406
2429
|
triggerText = config.formatTriggerDate(activeDate);
|
|
2407
2430
|
showCalendarIcon = true;
|
|
2408
2431
|
}
|
|
2409
|
-
return /* @__PURE__ */
|
|
2432
|
+
return /* @__PURE__ */ jsx21("div", { className: cn(className), children: /* @__PURE__ */ jsxs17(
|
|
2410
2433
|
PopoverPrimitive2.Root,
|
|
2411
2434
|
{
|
|
2412
2435
|
open,
|
|
2413
2436
|
onOpenChange: disabled ? void 0 : setOpen,
|
|
2414
2437
|
children: [
|
|
2415
|
-
/* @__PURE__ */
|
|
2438
|
+
/* @__PURE__ */ jsx21(PopoverPrimitive2.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs17(
|
|
2416
2439
|
"button",
|
|
2417
2440
|
{
|
|
2418
2441
|
type: "button",
|
|
@@ -2424,14 +2447,14 @@ function DatePicker({
|
|
|
2424
2447
|
mode === "range" ? !activeRange.start && "text-muted-foreground" : !activeDate && "text-muted-foreground"
|
|
2425
2448
|
),
|
|
2426
2449
|
children: [
|
|
2427
|
-
/* @__PURE__ */
|
|
2428
|
-
showCalendarIcon ? /* @__PURE__ */
|
|
2450
|
+
/* @__PURE__ */ jsx21("span", { className: "truncate text-left", children: triggerText }),
|
|
2451
|
+
showCalendarIcon ? /* @__PURE__ */ jsx21(
|
|
2429
2452
|
Icon,
|
|
2430
2453
|
{
|
|
2431
2454
|
name: "calendar",
|
|
2432
2455
|
className: "size-4 shrink-0 text-foreground"
|
|
2433
2456
|
}
|
|
2434
|
-
) : /* @__PURE__ */
|
|
2457
|
+
) : /* @__PURE__ */ jsx21(
|
|
2435
2458
|
Icon,
|
|
2436
2459
|
{
|
|
2437
2460
|
name: "chevron-down",
|
|
@@ -2444,7 +2467,7 @@ function DatePicker({
|
|
|
2444
2467
|
]
|
|
2445
2468
|
}
|
|
2446
2469
|
) }),
|
|
2447
|
-
/* @__PURE__ */
|
|
2470
|
+
/* @__PURE__ */ jsx21(PopoverPrimitive2.Portal, { children: /* @__PURE__ */ jsx21(
|
|
2448
2471
|
PopoverPrimitive2.Content,
|
|
2449
2472
|
{
|
|
2450
2473
|
align: "start",
|
|
@@ -2457,7 +2480,7 @@ function DatePicker({
|
|
|
2457
2480
|
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
2458
2481
|
"duration-200 data-[state=closed]:duration-150"
|
|
2459
2482
|
),
|
|
2460
|
-
children: /* @__PURE__ */
|
|
2483
|
+
children: /* @__PURE__ */ jsx21(
|
|
2461
2484
|
CalendarGrid,
|
|
2462
2485
|
{
|
|
2463
2486
|
year: viewYear,
|
|
@@ -2485,14 +2508,14 @@ function DatePicker({
|
|
|
2485
2508
|
}
|
|
2486
2509
|
|
|
2487
2510
|
// src/components/ui/field.tsx
|
|
2488
|
-
import { Fragment as
|
|
2511
|
+
import { Fragment as Fragment4, jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2489
2512
|
function FieldLabel(_a) {
|
|
2490
2513
|
var _b = _a, {
|
|
2491
2514
|
className
|
|
2492
2515
|
} = _b, props = __objRest(_b, [
|
|
2493
2516
|
"className"
|
|
2494
2517
|
]);
|
|
2495
|
-
return /* @__PURE__ */
|
|
2518
|
+
return /* @__PURE__ */ jsx22(
|
|
2496
2519
|
"label",
|
|
2497
2520
|
__spreadValues({
|
|
2498
2521
|
className: cn(
|
|
@@ -2508,7 +2531,7 @@ function FieldDescription(_a) {
|
|
|
2508
2531
|
} = _b, props = __objRest(_b, [
|
|
2509
2532
|
"className"
|
|
2510
2533
|
]);
|
|
2511
|
-
return /* @__PURE__ */
|
|
2534
|
+
return /* @__PURE__ */ jsx22(
|
|
2512
2535
|
"p",
|
|
2513
2536
|
__spreadValues({
|
|
2514
2537
|
className: cn(
|
|
@@ -2527,14 +2550,14 @@ function Field({
|
|
|
2527
2550
|
className,
|
|
2528
2551
|
children
|
|
2529
2552
|
}) {
|
|
2530
|
-
return /* @__PURE__ */
|
|
2531
|
-
label && /* @__PURE__ */
|
|
2553
|
+
return /* @__PURE__ */ jsxs18("div", { className: cn("flex flex-col gap-3", className), children: [
|
|
2554
|
+
label && /* @__PURE__ */ jsxs18(FieldLabel, { htmlFor, children: [
|
|
2532
2555
|
label,
|
|
2533
|
-
required && /* @__PURE__ */
|
|
2556
|
+
required && /* @__PURE__ */ jsx22("span", { className: "ml-0.5 text-destructive", "aria-hidden": true, children: "*" })
|
|
2534
2557
|
] }),
|
|
2535
|
-
hint && /* @__PURE__ */
|
|
2558
|
+
hint && /* @__PURE__ */ jsx22(FieldDescription, { children: hint }),
|
|
2536
2559
|
children,
|
|
2537
|
-
description && /* @__PURE__ */
|
|
2560
|
+
description && /* @__PURE__ */ jsx22(FieldDescription, { children: description })
|
|
2538
2561
|
] });
|
|
2539
2562
|
}
|
|
2540
2563
|
function FieldSection({
|
|
@@ -2545,9 +2568,9 @@ function FieldSection({
|
|
|
2545
2568
|
className,
|
|
2546
2569
|
children
|
|
2547
2570
|
}) {
|
|
2548
|
-
return /* @__PURE__ */
|
|
2549
|
-
/* @__PURE__ */
|
|
2550
|
-
/* @__PURE__ */
|
|
2571
|
+
return /* @__PURE__ */ jsxs18("div", { className: cn("flex flex-col gap-6", className), children: [
|
|
2572
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex flex-col", children: [
|
|
2573
|
+
/* @__PURE__ */ jsx22(
|
|
2551
2574
|
"p",
|
|
2552
2575
|
{
|
|
2553
2576
|
className: cn(
|
|
@@ -2557,34 +2580,34 @@ function FieldSection({
|
|
|
2557
2580
|
children: title
|
|
2558
2581
|
}
|
|
2559
2582
|
),
|
|
2560
|
-
description && /* @__PURE__ */
|
|
2583
|
+
description && /* @__PURE__ */ jsx22(FieldDescription, { children: description })
|
|
2561
2584
|
] }),
|
|
2562
|
-
children && /* @__PURE__ */
|
|
2563
|
-
showDivider && /* @__PURE__ */
|
|
2564
|
-
/* @__PURE__ */
|
|
2585
|
+
children && /* @__PURE__ */ jsxs18(Fragment4, { children: [
|
|
2586
|
+
showDivider && /* @__PURE__ */ jsx22(FieldDivider, {}),
|
|
2587
|
+
/* @__PURE__ */ jsx22("div", { className: "flex flex-col gap-7", children })
|
|
2565
2588
|
] })
|
|
2566
2589
|
] });
|
|
2567
2590
|
}
|
|
2568
2591
|
function FieldRow({ label, description, className, children }) {
|
|
2569
|
-
return /* @__PURE__ */
|
|
2570
|
-
/* @__PURE__ */
|
|
2571
|
-
/* @__PURE__ */
|
|
2572
|
-
description && /* @__PURE__ */
|
|
2592
|
+
return /* @__PURE__ */ jsxs18("div", { className: cn("flex items-start gap-3", className), children: [
|
|
2593
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex flex-1 flex-col gap-1.5", children: [
|
|
2594
|
+
/* @__PURE__ */ jsx22("p", { className: "text-sm font-medium tracking-tight text-foreground", children: label }),
|
|
2595
|
+
description && /* @__PURE__ */ jsx22(FieldDescription, { children: description })
|
|
2573
2596
|
] }),
|
|
2574
|
-
/* @__PURE__ */
|
|
2597
|
+
/* @__PURE__ */ jsx22("div", { className: "shrink-0", children })
|
|
2575
2598
|
] });
|
|
2576
2599
|
}
|
|
2577
2600
|
function FieldDivider({ className }) {
|
|
2578
|
-
return /* @__PURE__ */
|
|
2601
|
+
return /* @__PURE__ */ jsx22("div", { className: cn("flex h-5 items-center", className), children: /* @__PURE__ */ jsx22("div", { className: "h-px w-full border-t border-border" }) });
|
|
2579
2602
|
}
|
|
2580
2603
|
|
|
2581
2604
|
// src/components/ui/header.tsx
|
|
2582
|
-
import * as
|
|
2605
|
+
import * as React13 from "react";
|
|
2583
2606
|
import { DropdownMenu as DropdownMenu2, Popover } from "radix-ui";
|
|
2584
|
-
import { Fragment as
|
|
2607
|
+
import { Fragment as Fragment6, jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2585
2608
|
var PANEL_CLS = "z-50 overflow-hidden rounded-md border border-border bg-popover shadow-dropdown animate-in fade-in-0 zoom-in-95 duration-200 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:duration-150";
|
|
2586
2609
|
function DropdownSectionLabel({ children }) {
|
|
2587
|
-
return /* @__PURE__ */
|
|
2610
|
+
return /* @__PURE__ */ jsx23("div", { className: "flex h-8 items-center px-2 py-1.5", children: /* @__PURE__ */ jsx23("span", { className: "text-sm font-medium tracking-tight text-popover-foreground", children }) });
|
|
2588
2611
|
}
|
|
2589
2612
|
function DropdownMenuRow({
|
|
2590
2613
|
icon,
|
|
@@ -2601,14 +2624,14 @@ function DropdownMenuRow({
|
|
|
2601
2624
|
variant === "destructive" ? "text-destructive" : "text-popover-foreground",
|
|
2602
2625
|
className
|
|
2603
2626
|
);
|
|
2604
|
-
const content = /* @__PURE__ */
|
|
2605
|
-
icon && /* @__PURE__ */
|
|
2627
|
+
const content = /* @__PURE__ */ jsxs19(Fragment6, { children: [
|
|
2628
|
+
icon && /* @__PURE__ */ jsx23(Icon, { name: icon, className: "size-4 text-foreground" }),
|
|
2606
2629
|
children
|
|
2607
2630
|
] });
|
|
2608
2631
|
if (href) {
|
|
2609
|
-
return /* @__PURE__ */
|
|
2632
|
+
return /* @__PURE__ */ jsx23(DropdownMenu2.Item, { asChild: true, onSelect, children: /* @__PURE__ */ jsx23("a", { href, target: "_blank", rel: "noopener noreferrer", className: itemClassName, children: content }) });
|
|
2610
2633
|
}
|
|
2611
|
-
return /* @__PURE__ */
|
|
2634
|
+
return /* @__PURE__ */ jsx23(DropdownMenu2.Item, { onSelect, className: itemClassName, children: content });
|
|
2612
2635
|
}
|
|
2613
2636
|
function Header({
|
|
2614
2637
|
logo,
|
|
@@ -2626,7 +2649,7 @@ function Header({
|
|
|
2626
2649
|
onLanguageChange,
|
|
2627
2650
|
className
|
|
2628
2651
|
}) {
|
|
2629
|
-
return /* @__PURE__ */
|
|
2652
|
+
return /* @__PURE__ */ jsxs19(
|
|
2630
2653
|
"header",
|
|
2631
2654
|
{
|
|
2632
2655
|
className: cn(
|
|
@@ -2635,18 +2658,18 @@ function Header({
|
|
|
2635
2658
|
className
|
|
2636
2659
|
),
|
|
2637
2660
|
children: [
|
|
2638
|
-
/* @__PURE__ */
|
|
2639
|
-
(logo || brandName) && /* @__PURE__ */
|
|
2661
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-4", children: [
|
|
2662
|
+
(logo || brandName) && /* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-2.5 shrink-0", children: [
|
|
2640
2663
|
logo,
|
|
2641
|
-
brandName && /* @__PURE__ */
|
|
2664
|
+
brandName && /* @__PURE__ */ jsx23("span", { className: "text-xl font-bold tracking-tight text-foreground whitespace-nowrap", children: brandName })
|
|
2642
2665
|
] }),
|
|
2643
|
-
/* @__PURE__ */
|
|
2666
|
+
/* @__PURE__ */ jsx23("nav", { className: "flex items-center gap-2", "aria-label": "\uC8FC\uC694 \uBA54\uB274", children: navItems.map(
|
|
2644
2667
|
(item) => {
|
|
2645
2668
|
var _a;
|
|
2646
2669
|
return ((_a = item.dropdownItems) == null ? void 0 : _a.length) ? (
|
|
2647
2670
|
// 드롭다운이 있는 nav 아이템 (예: 스토어)
|
|
2648
|
-
/* @__PURE__ */
|
|
2649
|
-
/* @__PURE__ */
|
|
2671
|
+
/* @__PURE__ */ jsxs19(DropdownMenu2.Root, { children: [
|
|
2672
|
+
/* @__PURE__ */ jsx23(
|
|
2650
2673
|
DropdownMenu2.Trigger,
|
|
2651
2674
|
{
|
|
2652
2675
|
className: cn(
|
|
@@ -2659,7 +2682,7 @@ function Header({
|
|
|
2659
2682
|
children: item.label
|
|
2660
2683
|
}
|
|
2661
2684
|
),
|
|
2662
|
-
/* @__PURE__ */
|
|
2685
|
+
/* @__PURE__ */ jsx23(DropdownMenu2.Portal, { children: /* @__PURE__ */ jsxs19(
|
|
2663
2686
|
DropdownMenu2.Content,
|
|
2664
2687
|
{
|
|
2665
2688
|
align: "start",
|
|
@@ -2667,8 +2690,8 @@ function Header({
|
|
|
2667
2690
|
className: cn(PANEL_CLS, "w-50 py-1 px-1"),
|
|
2668
2691
|
style: { maxHeight: "416px" },
|
|
2669
2692
|
children: [
|
|
2670
|
-
/* @__PURE__ */
|
|
2671
|
-
item.dropdownItems.map((di) => /* @__PURE__ */
|
|
2693
|
+
/* @__PURE__ */ jsx23(DropdownMenu2.Label, { asChild: true, children: /* @__PURE__ */ jsx23(DropdownSectionLabel, { children: item.label }) }),
|
|
2694
|
+
item.dropdownItems.map((di) => /* @__PURE__ */ jsx23(
|
|
2672
2695
|
DropdownMenuRow,
|
|
2673
2696
|
{
|
|
2674
2697
|
icon: di.icon,
|
|
@@ -2684,7 +2707,7 @@ function Header({
|
|
|
2684
2707
|
] }, item.label)
|
|
2685
2708
|
) : (
|
|
2686
2709
|
// 일반 nav 아이템
|
|
2687
|
-
/* @__PURE__ */
|
|
2710
|
+
/* @__PURE__ */ jsx23(
|
|
2688
2711
|
"button",
|
|
2689
2712
|
{
|
|
2690
2713
|
type: "button",
|
|
@@ -2702,8 +2725,8 @@ function Header({
|
|
|
2702
2725
|
}
|
|
2703
2726
|
) })
|
|
2704
2727
|
] }),
|
|
2705
|
-
/* @__PURE__ */
|
|
2706
|
-
/* @__PURE__ */
|
|
2728
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-2", children: [
|
|
2729
|
+
/* @__PURE__ */ jsxs19(
|
|
2707
2730
|
"button",
|
|
2708
2731
|
{
|
|
2709
2732
|
type: "button",
|
|
@@ -2715,13 +2738,13 @@ function Header({
|
|
|
2715
2738
|
"transition-opacity hover:opacity-90 active:opacity-80"
|
|
2716
2739
|
),
|
|
2717
2740
|
children: [
|
|
2718
|
-
/* @__PURE__ */
|
|
2741
|
+
/* @__PURE__ */ jsx23(Icon, { name: "circle-arrow-up", className: "size-4 text-primary-foreground" }),
|
|
2719
2742
|
upgradeLabel
|
|
2720
2743
|
]
|
|
2721
2744
|
}
|
|
2722
2745
|
),
|
|
2723
|
-
/* @__PURE__ */
|
|
2724
|
-
/* @__PURE__ */
|
|
2746
|
+
/* @__PURE__ */ jsxs19(DropdownMenu2.Root, { children: [
|
|
2747
|
+
/* @__PURE__ */ jsxs19(
|
|
2725
2748
|
DropdownMenu2.Trigger,
|
|
2726
2749
|
{
|
|
2727
2750
|
className: cn(
|
|
@@ -2732,13 +2755,13 @@ function Header({
|
|
|
2732
2755
|
"data-[state=open]:bg-accent"
|
|
2733
2756
|
),
|
|
2734
2757
|
children: [
|
|
2735
|
-
/* @__PURE__ */
|
|
2736
|
-
/* @__PURE__ */
|
|
2737
|
-
/* @__PURE__ */
|
|
2758
|
+
/* @__PURE__ */ jsx23(Icon, { name: "user", className: "size-4 text-foreground" }),
|
|
2759
|
+
/* @__PURE__ */ jsx23("span", { children: userEmail }),
|
|
2760
|
+
/* @__PURE__ */ jsx23(Icon, { name: "chevron-down", className: "size-4 text-foreground" })
|
|
2738
2761
|
]
|
|
2739
2762
|
}
|
|
2740
2763
|
),
|
|
2741
|
-
/* @__PURE__ */
|
|
2764
|
+
/* @__PURE__ */ jsx23(DropdownMenu2.Portal, { children: /* @__PURE__ */ jsx23(
|
|
2742
2765
|
DropdownMenu2.Content,
|
|
2743
2766
|
{
|
|
2744
2767
|
align: "end",
|
|
@@ -2747,11 +2770,11 @@ function Header({
|
|
|
2747
2770
|
PANEL_CLS
|
|
2748
2771
|
),
|
|
2749
2772
|
style: { minWidth: "var(--radix-dropdown-menu-trigger-width)", maxHeight: "416px" },
|
|
2750
|
-
children: userMenuSections.map((section, si) => /* @__PURE__ */
|
|
2751
|
-
si > 0 && /* @__PURE__ */
|
|
2752
|
-
/* @__PURE__ */
|
|
2753
|
-
section.label && /* @__PURE__ */
|
|
2754
|
-
section.items.map((item) => /* @__PURE__ */
|
|
2773
|
+
children: userMenuSections.map((section, si) => /* @__PURE__ */ jsxs19(React13.Fragment, { children: [
|
|
2774
|
+
si > 0 && /* @__PURE__ */ jsx23(DropdownMenu2.Separator, { className: "my-1 h-px bg-border mx-1" }),
|
|
2775
|
+
/* @__PURE__ */ jsxs19(DropdownMenu2.Group, { className: "py-1 px-1", children: [
|
|
2776
|
+
section.label && /* @__PURE__ */ jsx23(DropdownMenu2.Label, { asChild: true, children: /* @__PURE__ */ jsx23(DropdownSectionLabel, { children: section.label }) }),
|
|
2777
|
+
section.items.map((item) => /* @__PURE__ */ jsx23(
|
|
2755
2778
|
DropdownMenuRow,
|
|
2756
2779
|
{
|
|
2757
2780
|
icon: item.icon,
|
|
@@ -2766,8 +2789,8 @@ function Header({
|
|
|
2766
2789
|
}
|
|
2767
2790
|
) })
|
|
2768
2791
|
] }),
|
|
2769
|
-
/* @__PURE__ */
|
|
2770
|
-
/* @__PURE__ */
|
|
2792
|
+
/* @__PURE__ */ jsxs19(Popover.Root, { children: [
|
|
2793
|
+
/* @__PURE__ */ jsx23(Popover.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs19(
|
|
2771
2794
|
"button",
|
|
2772
2795
|
{
|
|
2773
2796
|
type: "button",
|
|
@@ -2780,8 +2803,8 @@ function Header({
|
|
|
2780
2803
|
"data-[state=open]:bg-accent"
|
|
2781
2804
|
),
|
|
2782
2805
|
children: [
|
|
2783
|
-
/* @__PURE__ */
|
|
2784
|
-
hasNotification && /* @__PURE__ */
|
|
2806
|
+
/* @__PURE__ */ jsx23(Icon, { name: "bell", className: "size-4 text-foreground" }),
|
|
2807
|
+
hasNotification && /* @__PURE__ */ jsx23(
|
|
2785
2808
|
"span",
|
|
2786
2809
|
{
|
|
2787
2810
|
"aria-hidden": true,
|
|
@@ -2792,7 +2815,7 @@ function Header({
|
|
|
2792
2815
|
]
|
|
2793
2816
|
}
|
|
2794
2817
|
) }),
|
|
2795
|
-
/* @__PURE__ */
|
|
2818
|
+
/* @__PURE__ */ jsx23(Popover.Portal, { children: /* @__PURE__ */ jsxs19(
|
|
2796
2819
|
Popover.Content,
|
|
2797
2820
|
{
|
|
2798
2821
|
align: "end",
|
|
@@ -2804,37 +2827,37 @@ function Header({
|
|
|
2804
2827
|
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:duration-150"
|
|
2805
2828
|
),
|
|
2806
2829
|
children: [
|
|
2807
|
-
/* @__PURE__ */
|
|
2808
|
-
/* @__PURE__ */
|
|
2809
|
-
/* @__PURE__ */
|
|
2830
|
+
/* @__PURE__ */ jsxs19("div", { className: "mb-4 flex items-center justify-between", children: [
|
|
2831
|
+
/* @__PURE__ */ jsx23("h3", { className: "text-lg font-semibold tracking-tight text-foreground", children: "\uC11C\uBE44\uC2A4 \uC5C5\uB370\uC774\uD2B8" }),
|
|
2832
|
+
/* @__PURE__ */ jsx23(
|
|
2810
2833
|
Popover.Close,
|
|
2811
2834
|
{
|
|
2812
2835
|
"aria-label": "\uB2EB\uAE30",
|
|
2813
2836
|
className: "opacity-70 hover:opacity-100 transition-opacity",
|
|
2814
|
-
children: /* @__PURE__ */
|
|
2837
|
+
children: /* @__PURE__ */ jsx23(Icon, { name: "x", className: "size-4 text-foreground" })
|
|
2815
2838
|
}
|
|
2816
2839
|
)
|
|
2817
2840
|
] }),
|
|
2818
|
-
/* @__PURE__ */
|
|
2819
|
-
i > 0 && /* @__PURE__ */
|
|
2820
|
-
/* @__PURE__ */
|
|
2841
|
+
/* @__PURE__ */ jsx23("div", { className: "flex flex-col", children: notifications.map((n, i) => /* @__PURE__ */ jsxs19(React13.Fragment, { children: [
|
|
2842
|
+
i > 0 && /* @__PURE__ */ jsx23("div", { className: "flex h-6 items-center", children: /* @__PURE__ */ jsx23("hr", { className: "w-full border-border" }) }),
|
|
2843
|
+
/* @__PURE__ */ jsxs19(
|
|
2821
2844
|
"div",
|
|
2822
2845
|
{
|
|
2823
2846
|
className: "flex flex-col gap-4 rounded-md p-3 cursor-pointer transition-colors hover:bg-secondary",
|
|
2824
2847
|
children: [
|
|
2825
|
-
/* @__PURE__ */
|
|
2826
|
-
n.badge && /* @__PURE__ */
|
|
2827
|
-
n.date && /* @__PURE__ */
|
|
2848
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex items-center justify-between", children: [
|
|
2849
|
+
n.badge && /* @__PURE__ */ jsx23("span", { className: "inline-flex h-5.5 items-center rounded-lg bg-amber-50 px-2.5 py-0.5 text-xs font-medium tracking-tight text-amber-700 whitespace-nowrap", children: n.badge }),
|
|
2850
|
+
n.date && /* @__PURE__ */ jsx23("span", { className: "text-sm font-normal tracking-tight text-muted-foreground", children: n.date })
|
|
2828
2851
|
] }),
|
|
2829
|
-
/* @__PURE__ */
|
|
2830
|
-
/* @__PURE__ */
|
|
2831
|
-
/* @__PURE__ */
|
|
2852
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-1", children: [
|
|
2853
|
+
/* @__PURE__ */ jsx23("p", { className: "text-base font-medium tracking-tight text-foreground whitespace-nowrap", children: n.title }),
|
|
2854
|
+
/* @__PURE__ */ jsx23("p", { className: "line-clamp-2 text-sm font-normal tracking-tight text-muted-foreground", children: n.description })
|
|
2832
2855
|
] })
|
|
2833
2856
|
]
|
|
2834
2857
|
}
|
|
2835
2858
|
)
|
|
2836
2859
|
] }, n.id)) }),
|
|
2837
|
-
/* @__PURE__ */
|
|
2860
|
+
/* @__PURE__ */ jsxs19(
|
|
2838
2861
|
"button",
|
|
2839
2862
|
{
|
|
2840
2863
|
type: "button",
|
|
@@ -2847,7 +2870,7 @@ function Header({
|
|
|
2847
2870
|
),
|
|
2848
2871
|
children: [
|
|
2849
2872
|
"\uC804\uCCB4 \uB0B4\uC5ED \uBCF4\uAE30",
|
|
2850
|
-
/* @__PURE__ */
|
|
2873
|
+
/* @__PURE__ */ jsx23(Icon, { name: "chevron-right", className: "size-4 text-foreground" })
|
|
2851
2874
|
]
|
|
2852
2875
|
}
|
|
2853
2876
|
)
|
|
@@ -2855,8 +2878,8 @@ function Header({
|
|
|
2855
2878
|
}
|
|
2856
2879
|
) })
|
|
2857
2880
|
] }),
|
|
2858
|
-
/* @__PURE__ */
|
|
2859
|
-
/* @__PURE__ */
|
|
2881
|
+
/* @__PURE__ */ jsxs19(DropdownMenu2.Root, { children: [
|
|
2882
|
+
/* @__PURE__ */ jsx23(
|
|
2860
2883
|
DropdownMenu2.Trigger,
|
|
2861
2884
|
{
|
|
2862
2885
|
"aria-label": "\uC5B8\uC5B4 \uC120\uD0DD",
|
|
@@ -2866,10 +2889,10 @@ function Header({
|
|
|
2866
2889
|
"transition-colors hover:bg-muted/60",
|
|
2867
2890
|
"data-[state=open]:bg-accent"
|
|
2868
2891
|
),
|
|
2869
|
-
children: /* @__PURE__ */
|
|
2892
|
+
children: /* @__PURE__ */ jsx23(Icon, { name: "globe", className: "size-4 text-foreground" })
|
|
2870
2893
|
}
|
|
2871
2894
|
),
|
|
2872
|
-
/* @__PURE__ */
|
|
2895
|
+
/* @__PURE__ */ jsx23(DropdownMenu2.Portal, { children: /* @__PURE__ */ jsxs19(
|
|
2873
2896
|
DropdownMenu2.Content,
|
|
2874
2897
|
{
|
|
2875
2898
|
align: "end",
|
|
@@ -2877,8 +2900,8 @@ function Header({
|
|
|
2877
2900
|
className: cn(PANEL_CLS, "w-50 py-1 px-1"),
|
|
2878
2901
|
style: { maxHeight: "416px" },
|
|
2879
2902
|
children: [
|
|
2880
|
-
/* @__PURE__ */
|
|
2881
|
-
languages.map((lang) => /* @__PURE__ */
|
|
2903
|
+
/* @__PURE__ */ jsx23(DropdownMenu2.Label, { asChild: true, children: /* @__PURE__ */ jsx23(DropdownSectionLabel, { children: "\uC5B8\uC5B4" }) }),
|
|
2904
|
+
languages.map((lang) => /* @__PURE__ */ jsxs19(
|
|
2882
2905
|
DropdownMenu2.Item,
|
|
2883
2906
|
{
|
|
2884
2907
|
onSelect: () => onLanguageChange == null ? void 0 : onLanguageChange(lang.code),
|
|
@@ -2889,7 +2912,7 @@ function Header({
|
|
|
2889
2912
|
lang.code === currentLanguage && "bg-accent/50"
|
|
2890
2913
|
),
|
|
2891
2914
|
children: [
|
|
2892
|
-
/* @__PURE__ */
|
|
2915
|
+
/* @__PURE__ */ jsx23(
|
|
2893
2916
|
"span",
|
|
2894
2917
|
{
|
|
2895
2918
|
className: "flex size-4 shrink-0 items-center justify-center overflow-hidden text-sm leading-none",
|
|
@@ -2913,10 +2936,10 @@ function Header({
|
|
|
2913
2936
|
}
|
|
2914
2937
|
|
|
2915
2938
|
// src/components/ui/input.tsx
|
|
2916
|
-
import { jsx as
|
|
2939
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
2917
2940
|
function Input(_a) {
|
|
2918
2941
|
var _b = _a, { className, type } = _b, props = __objRest(_b, ["className", "type"]);
|
|
2919
|
-
return /* @__PURE__ */
|
|
2942
|
+
return /* @__PURE__ */ jsx24(
|
|
2920
2943
|
"input",
|
|
2921
2944
|
__spreadValues({
|
|
2922
2945
|
type,
|
|
@@ -2935,10 +2958,10 @@ function Input(_a) {
|
|
|
2935
2958
|
import { cva as cva3 } from "class-variance-authority";
|
|
2936
2959
|
|
|
2937
2960
|
// src/components/ui/textarea.tsx
|
|
2938
|
-
import { jsx as
|
|
2961
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
2939
2962
|
function Textarea(_a) {
|
|
2940
2963
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2941
|
-
return /* @__PURE__ */
|
|
2964
|
+
return /* @__PURE__ */ jsx25(
|
|
2942
2965
|
"textarea",
|
|
2943
2966
|
__spreadValues({
|
|
2944
2967
|
"data-slot": "textarea",
|
|
@@ -2951,10 +2974,10 @@ function Textarea(_a) {
|
|
|
2951
2974
|
}
|
|
2952
2975
|
|
|
2953
2976
|
// src/components/ui/input-group.tsx
|
|
2954
|
-
import { jsx as
|
|
2977
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
2955
2978
|
function InputGroup(_a) {
|
|
2956
2979
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2957
|
-
return /* @__PURE__ */
|
|
2980
|
+
return /* @__PURE__ */ jsx26(
|
|
2958
2981
|
"div",
|
|
2959
2982
|
__spreadValues({
|
|
2960
2983
|
"data-slot": "input-group",
|
|
@@ -3000,7 +3023,7 @@ function InputGroupAddon(_a) {
|
|
|
3000
3023
|
"className",
|
|
3001
3024
|
"align"
|
|
3002
3025
|
]);
|
|
3003
|
-
return /* @__PURE__ */
|
|
3026
|
+
return /* @__PURE__ */ jsx26(
|
|
3004
3027
|
"div",
|
|
3005
3028
|
__spreadValues({
|
|
3006
3029
|
role: "group",
|
|
@@ -3045,7 +3068,7 @@ function InputGroupButton(_a) {
|
|
|
3045
3068
|
"variant",
|
|
3046
3069
|
"size"
|
|
3047
3070
|
]);
|
|
3048
|
-
return /* @__PURE__ */
|
|
3071
|
+
return /* @__PURE__ */ jsx26(
|
|
3049
3072
|
Button,
|
|
3050
3073
|
__spreadValues({
|
|
3051
3074
|
type,
|
|
@@ -3057,7 +3080,7 @@ function InputGroupButton(_a) {
|
|
|
3057
3080
|
}
|
|
3058
3081
|
function InputGroupText(_a) {
|
|
3059
3082
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3060
|
-
return /* @__PURE__ */
|
|
3083
|
+
return /* @__PURE__ */ jsx26(
|
|
3061
3084
|
"span",
|
|
3062
3085
|
__spreadValues({
|
|
3063
3086
|
className: cn(
|
|
@@ -3073,7 +3096,7 @@ function InputGroupInput(_a) {
|
|
|
3073
3096
|
} = _b, props = __objRest(_b, [
|
|
3074
3097
|
"className"
|
|
3075
3098
|
]);
|
|
3076
|
-
return /* @__PURE__ */
|
|
3099
|
+
return /* @__PURE__ */ jsx26(
|
|
3077
3100
|
Input,
|
|
3078
3101
|
__spreadValues({
|
|
3079
3102
|
"data-slot": "input-group-control",
|
|
@@ -3090,7 +3113,7 @@ function InputGroupTextarea(_a) {
|
|
|
3090
3113
|
} = _b, props = __objRest(_b, [
|
|
3091
3114
|
"className"
|
|
3092
3115
|
]);
|
|
3093
|
-
return /* @__PURE__ */
|
|
3116
|
+
return /* @__PURE__ */ jsx26(
|
|
3094
3117
|
Textarea,
|
|
3095
3118
|
__spreadValues({
|
|
3096
3119
|
"data-slot": "input-group-control",
|
|
@@ -3103,10 +3126,10 @@ function InputGroupTextarea(_a) {
|
|
|
3103
3126
|
}
|
|
3104
3127
|
|
|
3105
3128
|
// src/components/ui/input-otp.tsx
|
|
3106
|
-
import * as
|
|
3129
|
+
import * as React14 from "react";
|
|
3107
3130
|
import { OTPInput, OTPInputContext } from "input-otp";
|
|
3108
3131
|
import { MinusIcon } from "lucide-react";
|
|
3109
|
-
import { jsx as
|
|
3132
|
+
import { jsx as jsx27, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3110
3133
|
function InputOTP(_a) {
|
|
3111
3134
|
var _b = _a, {
|
|
3112
3135
|
className,
|
|
@@ -3115,7 +3138,7 @@ function InputOTP(_a) {
|
|
|
3115
3138
|
"className",
|
|
3116
3139
|
"containerClassName"
|
|
3117
3140
|
]);
|
|
3118
|
-
return /* @__PURE__ */
|
|
3141
|
+
return /* @__PURE__ */ jsx27(
|
|
3119
3142
|
OTPInput,
|
|
3120
3143
|
__spreadValues({
|
|
3121
3144
|
"data-slot": "input-otp",
|
|
@@ -3129,7 +3152,7 @@ function InputOTP(_a) {
|
|
|
3129
3152
|
}
|
|
3130
3153
|
function InputOTPGroup(_a) {
|
|
3131
3154
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3132
|
-
return /* @__PURE__ */
|
|
3155
|
+
return /* @__PURE__ */ jsx27(
|
|
3133
3156
|
"div",
|
|
3134
3157
|
__spreadValues({
|
|
3135
3158
|
"data-slot": "input-otp-group",
|
|
@@ -3146,9 +3169,9 @@ function InputOTPSlot(_a) {
|
|
|
3146
3169
|
"className"
|
|
3147
3170
|
]);
|
|
3148
3171
|
var _a2;
|
|
3149
|
-
const inputOTPContext =
|
|
3172
|
+
const inputOTPContext = React14.useContext(OTPInputContext);
|
|
3150
3173
|
const { char, hasFakeCaret, isActive } = (_a2 = inputOTPContext == null ? void 0 : inputOTPContext.slots[index]) != null ? _a2 : {};
|
|
3151
|
-
return /* @__PURE__ */
|
|
3174
|
+
return /* @__PURE__ */ jsxs20(
|
|
3152
3175
|
"div",
|
|
3153
3176
|
__spreadProps(__spreadValues({
|
|
3154
3177
|
"data-slot": "input-otp-slot",
|
|
@@ -3160,22 +3183,22 @@ function InputOTPSlot(_a) {
|
|
|
3160
3183
|
}, props), {
|
|
3161
3184
|
children: [
|
|
3162
3185
|
char,
|
|
3163
|
-
hasFakeCaret && /* @__PURE__ */
|
|
3186
|
+
hasFakeCaret && /* @__PURE__ */ jsx27("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx27("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" }) })
|
|
3164
3187
|
]
|
|
3165
3188
|
})
|
|
3166
3189
|
);
|
|
3167
3190
|
}
|
|
3168
3191
|
function InputOTPSeparator(_a) {
|
|
3169
3192
|
var props = __objRest(_a, []);
|
|
3170
|
-
return /* @__PURE__ */
|
|
3193
|
+
return /* @__PURE__ */ jsx27("div", __spreadProps(__spreadValues({ "data-slot": "input-otp-separator", role: "separator" }, props), { children: /* @__PURE__ */ jsx27(MinusIcon, {}) }));
|
|
3171
3194
|
}
|
|
3172
3195
|
|
|
3173
3196
|
// src/components/ui/kb-card.tsx
|
|
3174
|
-
import * as
|
|
3197
|
+
import * as React15 from "react";
|
|
3175
3198
|
|
|
3176
3199
|
// src/components/icons/custom/folder-amber.tsx
|
|
3177
3200
|
import { useId } from "react";
|
|
3178
|
-
import { jsx as
|
|
3201
|
+
import { jsx as jsx28, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3179
3202
|
function FolderAmberIcon({ className }) {
|
|
3180
3203
|
const id = useId().replace(/:/g, "");
|
|
3181
3204
|
const clip = `clip_${id}`;
|
|
@@ -3184,7 +3207,7 @@ function FolderAmberIcon({ className }) {
|
|
|
3184
3207
|
const f2 = `f2_${id}`;
|
|
3185
3208
|
const p0 = `p0_${id}`;
|
|
3186
3209
|
const p1 = `p1_${id}`;
|
|
3187
|
-
return /* @__PURE__ */
|
|
3210
|
+
return /* @__PURE__ */ jsxs21(
|
|
3188
3211
|
"svg",
|
|
3189
3212
|
{
|
|
3190
3213
|
width: "20",
|
|
@@ -3195,15 +3218,15 @@ function FolderAmberIcon({ className }) {
|
|
|
3195
3218
|
"aria-hidden": true,
|
|
3196
3219
|
className: cn("shrink-0", className),
|
|
3197
3220
|
children: [
|
|
3198
|
-
/* @__PURE__ */
|
|
3199
|
-
/* @__PURE__ */
|
|
3221
|
+
/* @__PURE__ */ jsx28("g", { clipPath: `url(#${clip})`, children: /* @__PURE__ */ jsxs21("g", { filter: `url(#${f0})`, children: [
|
|
3222
|
+
/* @__PURE__ */ jsx28("g", { filter: `url(#${f1})`, children: /* @__PURE__ */ jsx28(
|
|
3200
3223
|
"path",
|
|
3201
3224
|
{
|
|
3202
3225
|
d: "M6.9896 2C7.47943 2 7.95223 2.17976 8.31833 2.50518L9.43167 3.49482C9.79777 3.82024 10.2706 4 10.7604 4H17C18.1046 4 19 4.89543 19 6V15C19 16.6569 17.6569 18 16 18H4C2.34315 18 1 16.6569 1 15V4C1 2.89543 1.89543 2 3 2H6.9896Z",
|
|
3203
3226
|
fill: `url(#${p0})`
|
|
3204
3227
|
}
|
|
3205
3228
|
) }),
|
|
3206
|
-
/* @__PURE__ */
|
|
3229
|
+
/* @__PURE__ */ jsx28(
|
|
3207
3230
|
"path",
|
|
3208
3231
|
{
|
|
3209
3232
|
d: "M3 2.25H6.98926C7.41786 2.25 7.832 2.40764 8.15234 2.69238L9.26562 3.68164C9.67749 4.04774 10.2097 4.25 10.7607 4.25H17C17.9665 4.25 18.75 5.0335 18.75 6V15C18.75 16.5188 17.5188 17.75 16 17.75H4C2.48122 17.75 1.25 16.5188 1.25 15V4C1.25 3.0335 2.0335 2.25 3 2.25Z",
|
|
@@ -3212,15 +3235,15 @@ function FolderAmberIcon({ className }) {
|
|
|
3212
3235
|
strokeWidth: "0.5"
|
|
3213
3236
|
}
|
|
3214
3237
|
),
|
|
3215
|
-
/* @__PURE__ */
|
|
3216
|
-
/* @__PURE__ */
|
|
3238
|
+
/* @__PURE__ */ jsx28("rect", { x: "3", y: "6", width: "14", height: "9", rx: "0.75", fill: "white" }),
|
|
3239
|
+
/* @__PURE__ */ jsx28("g", { filter: `url(#${f2})`, children: /* @__PURE__ */ jsx28(
|
|
3217
3240
|
"path",
|
|
3218
3241
|
{
|
|
3219
3242
|
d: "M1 10C1 8.89543 1.89543 8 3 8H17C18.1046 8 19 8.89543 19 10V15.75C19 16.9927 17.9926 18 16.75 18H3.25C2.00736 18 1 16.9927 1 15.75V10Z",
|
|
3220
3243
|
fill: `url(#${p1})`
|
|
3221
3244
|
}
|
|
3222
3245
|
) }),
|
|
3223
|
-
/* @__PURE__ */
|
|
3246
|
+
/* @__PURE__ */ jsx28(
|
|
3224
3247
|
"path",
|
|
3225
3248
|
{
|
|
3226
3249
|
d: "M3 8.25H17C17.9665 8.25 18.75 9.0335 18.75 10V15.75C18.75 16.8546 17.8546 17.75 16.75 17.75H3.25C2.14543 17.75 1.25 16.8546 1.25 15.75V10C1.25 9.0335 2.0335 8.25 3 8.25Z",
|
|
@@ -3230,8 +3253,8 @@ function FolderAmberIcon({ className }) {
|
|
|
3230
3253
|
}
|
|
3231
3254
|
)
|
|
3232
3255
|
] }) }),
|
|
3233
|
-
/* @__PURE__ */
|
|
3234
|
-
/* @__PURE__ */
|
|
3256
|
+
/* @__PURE__ */ jsxs21("defs", { children: [
|
|
3257
|
+
/* @__PURE__ */ jsxs21(
|
|
3235
3258
|
"filter",
|
|
3236
3259
|
{
|
|
3237
3260
|
id: f0,
|
|
@@ -3242,8 +3265,8 @@ function FolderAmberIcon({ className }) {
|
|
|
3242
3265
|
filterUnits: "userSpaceOnUse",
|
|
3243
3266
|
colorInterpolationFilters: "sRGB",
|
|
3244
3267
|
children: [
|
|
3245
|
-
/* @__PURE__ */
|
|
3246
|
-
/* @__PURE__ */
|
|
3268
|
+
/* @__PURE__ */ jsx28("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }),
|
|
3269
|
+
/* @__PURE__ */ jsx28(
|
|
3247
3270
|
"feColorMatrix",
|
|
3248
3271
|
{
|
|
3249
3272
|
in: "SourceAlpha",
|
|
@@ -3252,17 +3275,17 @@ function FolderAmberIcon({ className }) {
|
|
|
3252
3275
|
result: "hardAlpha"
|
|
3253
3276
|
}
|
|
3254
3277
|
),
|
|
3255
|
-
/* @__PURE__ */
|
|
3256
|
-
/* @__PURE__ */
|
|
3257
|
-
/* @__PURE__ */
|
|
3258
|
-
/* @__PURE__ */
|
|
3278
|
+
/* @__PURE__ */ jsx28("feOffset", { dy: "0.75" }),
|
|
3279
|
+
/* @__PURE__ */ jsx28("feGaussianBlur", { stdDeviation: "1.125" }),
|
|
3280
|
+
/* @__PURE__ */ jsx28("feComposite", { in2: "hardAlpha", operator: "out" }),
|
|
3281
|
+
/* @__PURE__ */ jsx28(
|
|
3259
3282
|
"feColorMatrix",
|
|
3260
3283
|
{
|
|
3261
3284
|
type: "matrix",
|
|
3262
3285
|
values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"
|
|
3263
3286
|
}
|
|
3264
3287
|
),
|
|
3265
|
-
/* @__PURE__ */
|
|
3288
|
+
/* @__PURE__ */ jsx28(
|
|
3266
3289
|
"feBlend",
|
|
3267
3290
|
{
|
|
3268
3291
|
mode: "normal",
|
|
@@ -3270,7 +3293,7 @@ function FolderAmberIcon({ className }) {
|
|
|
3270
3293
|
result: `effect1_dropShadow_${id}`
|
|
3271
3294
|
}
|
|
3272
3295
|
),
|
|
3273
|
-
/* @__PURE__ */
|
|
3296
|
+
/* @__PURE__ */ jsx28(
|
|
3274
3297
|
"feBlend",
|
|
3275
3298
|
{
|
|
3276
3299
|
mode: "normal",
|
|
@@ -3282,7 +3305,7 @@ function FolderAmberIcon({ className }) {
|
|
|
3282
3305
|
]
|
|
3283
3306
|
}
|
|
3284
3307
|
),
|
|
3285
|
-
/* @__PURE__ */
|
|
3308
|
+
/* @__PURE__ */ jsxs21(
|
|
3286
3309
|
"filter",
|
|
3287
3310
|
{
|
|
3288
3311
|
id: f1,
|
|
@@ -3293,8 +3316,8 @@ function FolderAmberIcon({ className }) {
|
|
|
3293
3316
|
filterUnits: "userSpaceOnUse",
|
|
3294
3317
|
colorInterpolationFilters: "sRGB",
|
|
3295
3318
|
children: [
|
|
3296
|
-
/* @__PURE__ */
|
|
3297
|
-
/* @__PURE__ */
|
|
3319
|
+
/* @__PURE__ */ jsx28("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }),
|
|
3320
|
+
/* @__PURE__ */ jsx28(
|
|
3298
3321
|
"feBlend",
|
|
3299
3322
|
{
|
|
3300
3323
|
mode: "normal",
|
|
@@ -3303,7 +3326,7 @@ function FolderAmberIcon({ className }) {
|
|
|
3303
3326
|
result: "shape"
|
|
3304
3327
|
}
|
|
3305
3328
|
),
|
|
3306
|
-
/* @__PURE__ */
|
|
3329
|
+
/* @__PURE__ */ jsx28(
|
|
3307
3330
|
"feColorMatrix",
|
|
3308
3331
|
{
|
|
3309
3332
|
in: "SourceAlpha",
|
|
@@ -3312,17 +3335,17 @@ function FolderAmberIcon({ className }) {
|
|
|
3312
3335
|
result: "hardAlpha"
|
|
3313
3336
|
}
|
|
3314
3337
|
),
|
|
3315
|
-
/* @__PURE__ */
|
|
3316
|
-
/* @__PURE__ */
|
|
3317
|
-
/* @__PURE__ */
|
|
3318
|
-
/* @__PURE__ */
|
|
3338
|
+
/* @__PURE__ */ jsx28("feOffset", {}),
|
|
3339
|
+
/* @__PURE__ */ jsx28("feGaussianBlur", { stdDeviation: "0.375" }),
|
|
3340
|
+
/* @__PURE__ */ jsx28("feComposite", { in2: "hardAlpha", operator: "arithmetic", k2: "-1", k3: "1" }),
|
|
3341
|
+
/* @__PURE__ */ jsx28(
|
|
3319
3342
|
"feColorMatrix",
|
|
3320
3343
|
{
|
|
3321
3344
|
type: "matrix",
|
|
3322
3345
|
values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"
|
|
3323
3346
|
}
|
|
3324
3347
|
),
|
|
3325
|
-
/* @__PURE__ */
|
|
3348
|
+
/* @__PURE__ */ jsx28(
|
|
3326
3349
|
"feBlend",
|
|
3327
3350
|
{
|
|
3328
3351
|
mode: "normal",
|
|
@@ -3333,7 +3356,7 @@ function FolderAmberIcon({ className }) {
|
|
|
3333
3356
|
]
|
|
3334
3357
|
}
|
|
3335
3358
|
),
|
|
3336
|
-
/* @__PURE__ */
|
|
3359
|
+
/* @__PURE__ */ jsxs21(
|
|
3337
3360
|
"filter",
|
|
3338
3361
|
{
|
|
3339
3362
|
id: f2,
|
|
@@ -3344,8 +3367,8 @@ function FolderAmberIcon({ className }) {
|
|
|
3344
3367
|
filterUnits: "userSpaceOnUse",
|
|
3345
3368
|
colorInterpolationFilters: "sRGB",
|
|
3346
3369
|
children: [
|
|
3347
|
-
/* @__PURE__ */
|
|
3348
|
-
/* @__PURE__ */
|
|
3370
|
+
/* @__PURE__ */ jsx28("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }),
|
|
3371
|
+
/* @__PURE__ */ jsx28(
|
|
3349
3372
|
"feBlend",
|
|
3350
3373
|
{
|
|
3351
3374
|
mode: "normal",
|
|
@@ -3354,7 +3377,7 @@ function FolderAmberIcon({ className }) {
|
|
|
3354
3377
|
result: "shape"
|
|
3355
3378
|
}
|
|
3356
3379
|
),
|
|
3357
|
-
/* @__PURE__ */
|
|
3380
|
+
/* @__PURE__ */ jsx28(
|
|
3358
3381
|
"feColorMatrix",
|
|
3359
3382
|
{
|
|
3360
3383
|
in: "SourceAlpha",
|
|
@@ -3363,17 +3386,17 @@ function FolderAmberIcon({ className }) {
|
|
|
3363
3386
|
result: "hardAlpha"
|
|
3364
3387
|
}
|
|
3365
3388
|
),
|
|
3366
|
-
/* @__PURE__ */
|
|
3367
|
-
/* @__PURE__ */
|
|
3368
|
-
/* @__PURE__ */
|
|
3369
|
-
/* @__PURE__ */
|
|
3389
|
+
/* @__PURE__ */ jsx28("feOffset", {}),
|
|
3390
|
+
/* @__PURE__ */ jsx28("feGaussianBlur", { stdDeviation: "0.375" }),
|
|
3391
|
+
/* @__PURE__ */ jsx28("feComposite", { in2: "hardAlpha", operator: "arithmetic", k2: "-1", k3: "1" }),
|
|
3392
|
+
/* @__PURE__ */ jsx28(
|
|
3370
3393
|
"feColorMatrix",
|
|
3371
3394
|
{
|
|
3372
3395
|
type: "matrix",
|
|
3373
3396
|
values: "0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.4 0"
|
|
3374
3397
|
}
|
|
3375
3398
|
),
|
|
3376
|
-
/* @__PURE__ */
|
|
3399
|
+
/* @__PURE__ */ jsx28(
|
|
3377
3400
|
"feBlend",
|
|
3378
3401
|
{
|
|
3379
3402
|
mode: "normal",
|
|
@@ -3384,7 +3407,7 @@ function FolderAmberIcon({ className }) {
|
|
|
3384
3407
|
]
|
|
3385
3408
|
}
|
|
3386
3409
|
),
|
|
3387
|
-
/* @__PURE__ */
|
|
3410
|
+
/* @__PURE__ */ jsxs21(
|
|
3388
3411
|
"linearGradient",
|
|
3389
3412
|
{
|
|
3390
3413
|
id: p0,
|
|
@@ -3394,12 +3417,12 @@ function FolderAmberIcon({ className }) {
|
|
|
3394
3417
|
y2: "7.875",
|
|
3395
3418
|
gradientUnits: "userSpaceOnUse",
|
|
3396
3419
|
children: [
|
|
3397
|
-
/* @__PURE__ */
|
|
3398
|
-
/* @__PURE__ */
|
|
3420
|
+
/* @__PURE__ */ jsx28("stop", { stopColor: "#FFE386" }),
|
|
3421
|
+
/* @__PURE__ */ jsx28("stop", { offset: "1", stopColor: "#EAC448" })
|
|
3399
3422
|
]
|
|
3400
3423
|
}
|
|
3401
3424
|
),
|
|
3402
|
-
/* @__PURE__ */
|
|
3425
|
+
/* @__PURE__ */ jsxs21(
|
|
3403
3426
|
"linearGradient",
|
|
3404
3427
|
{
|
|
3405
3428
|
id: p1,
|
|
@@ -3409,12 +3432,12 @@ function FolderAmberIcon({ className }) {
|
|
|
3409
3432
|
y2: "18",
|
|
3410
3433
|
gradientUnits: "userSpaceOnUse",
|
|
3411
3434
|
children: [
|
|
3412
|
-
/* @__PURE__ */
|
|
3413
|
-
/* @__PURE__ */
|
|
3435
|
+
/* @__PURE__ */ jsx28("stop", { stopColor: "#FFE693" }),
|
|
3436
|
+
/* @__PURE__ */ jsx28("stop", { offset: "1", stopColor: "#FCC24D" })
|
|
3414
3437
|
]
|
|
3415
3438
|
}
|
|
3416
3439
|
),
|
|
3417
|
-
/* @__PURE__ */
|
|
3440
|
+
/* @__PURE__ */ jsx28("clipPath", { id: clip, children: /* @__PURE__ */ jsx28("rect", { width: "20", height: "20", fill: "white" }) })
|
|
3418
3441
|
] })
|
|
3419
3442
|
]
|
|
3420
3443
|
}
|
|
@@ -3422,7 +3445,7 @@ function FolderAmberIcon({ className }) {
|
|
|
3422
3445
|
}
|
|
3423
3446
|
|
|
3424
3447
|
// src/components/ui/kb-card.tsx
|
|
3425
|
-
import { Fragment as
|
|
3448
|
+
import { Fragment as Fragment7, jsx as jsx29, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
3426
3449
|
function KbCard({
|
|
3427
3450
|
name,
|
|
3428
3451
|
metadata = [],
|
|
@@ -3435,16 +3458,16 @@ function KbCard({
|
|
|
3435
3458
|
className,
|
|
3436
3459
|
variant = "grid"
|
|
3437
3460
|
}) {
|
|
3438
|
-
const id =
|
|
3439
|
-
const iconNode = icon != null ? icon : /* @__PURE__ */
|
|
3461
|
+
const id = React15.useId();
|
|
3462
|
+
const iconNode = icon != null ? icon : /* @__PURE__ */ jsx29(FolderAmberIcon, { className: "size-6" });
|
|
3440
3463
|
if (variant === "list") {
|
|
3441
|
-
const listContent = /* @__PURE__ */
|
|
3442
|
-
/* @__PURE__ */
|
|
3443
|
-
/* @__PURE__ */
|
|
3444
|
-
/* @__PURE__ */
|
|
3445
|
-
metadata.length > 0 && /* @__PURE__ */
|
|
3464
|
+
const listContent = /* @__PURE__ */ jsxs22(Fragment7, { children: [
|
|
3465
|
+
/* @__PURE__ */ jsx29("div", { className: "flex size-10 shrink-0 items-center justify-center rounded-xl bg-white shadow-[inset_0_0_0_0.5px_rgba(0,0,0,0.1),inset_0_2px_4px_rgba(0,0,0,0.1)]", children: iconNode }),
|
|
3466
|
+
/* @__PURE__ */ jsxs22("div", { className: "flex flex-col gap-0.5 flex-1 min-w-0", children: [
|
|
3467
|
+
/* @__PURE__ */ jsx29("p", { className: "text-sm font-semibold leading-5 text-foreground line-clamp-1", children: name }),
|
|
3468
|
+
metadata.length > 0 && /* @__PURE__ */ jsx29("p", { className: "text-sm text-muted-foreground truncate", children: metadata.map((item) => item.value).join(" \xB7 ") })
|
|
3446
3469
|
] }),
|
|
3447
|
-
selectable && /* @__PURE__ */
|
|
3470
|
+
selectable && /* @__PURE__ */ jsx29(
|
|
3448
3471
|
Checkbox,
|
|
3449
3472
|
{
|
|
3450
3473
|
id,
|
|
@@ -3456,7 +3479,7 @@ function KbCard({
|
|
|
3456
3479
|
)
|
|
3457
3480
|
] });
|
|
3458
3481
|
if (selectable) {
|
|
3459
|
-
return /* @__PURE__ */
|
|
3482
|
+
return /* @__PURE__ */ jsx29(
|
|
3460
3483
|
"label",
|
|
3461
3484
|
{
|
|
3462
3485
|
htmlFor: id,
|
|
@@ -3470,7 +3493,7 @@ function KbCard({
|
|
|
3470
3493
|
}
|
|
3471
3494
|
);
|
|
3472
3495
|
}
|
|
3473
|
-
return /* @__PURE__ */
|
|
3496
|
+
return /* @__PURE__ */ jsx29(
|
|
3474
3497
|
"div",
|
|
3475
3498
|
{
|
|
3476
3499
|
onClick,
|
|
@@ -3484,11 +3507,11 @@ function KbCard({
|
|
|
3484
3507
|
}
|
|
3485
3508
|
);
|
|
3486
3509
|
}
|
|
3487
|
-
const cardBody = /* @__PURE__ */
|
|
3488
|
-
/* @__PURE__ */
|
|
3489
|
-
/* @__PURE__ */
|
|
3490
|
-
/* @__PURE__ */
|
|
3491
|
-
selectable ? /* @__PURE__ */
|
|
3510
|
+
const cardBody = /* @__PURE__ */ jsxs22(Fragment7, { children: [
|
|
3511
|
+
/* @__PURE__ */ jsxs22("div", { className: "flex flex-col justify-between", children: [
|
|
3512
|
+
/* @__PURE__ */ jsxs22("div", { className: "flex items-center justify-between", children: [
|
|
3513
|
+
/* @__PURE__ */ jsx29("div", { className: "flex size-10 items-center justify-center rounded-xl bg-white shadow-[inset_0_0_0_0.5px_rgba(0,0,0,0.1),inset_0_2px_4px_rgba(0,0,0,0.1)]", children: iconNode }),
|
|
3514
|
+
selectable ? /* @__PURE__ */ jsx29(
|
|
3492
3515
|
Checkbox,
|
|
3493
3516
|
{
|
|
3494
3517
|
id,
|
|
@@ -3498,22 +3521,22 @@ function KbCard({
|
|
|
3498
3521
|
}
|
|
3499
3522
|
) : topRight ? topRight : null
|
|
3500
3523
|
] }),
|
|
3501
|
-
/* @__PURE__ */
|
|
3524
|
+
/* @__PURE__ */ jsx29("p", { className: "text-sm font-semibold leading-5 text-foreground line-clamp-1 mt-2", children: name })
|
|
3502
3525
|
] }),
|
|
3503
|
-
metadata.length > 0 && /* @__PURE__ */
|
|
3526
|
+
metadata.length > 0 && /* @__PURE__ */ jsx29("div", { className: "flex flex-col gap-2", children: metadata.map((item) => /* @__PURE__ */ jsxs22(
|
|
3504
3527
|
"div",
|
|
3505
3528
|
{
|
|
3506
3529
|
className: "flex items-center justify-between gap-4",
|
|
3507
3530
|
children: [
|
|
3508
|
-
/* @__PURE__ */
|
|
3509
|
-
/* @__PURE__ */
|
|
3531
|
+
/* @__PURE__ */ jsx29("span", { className: "text-sm text-muted-foreground", children: item.label }),
|
|
3532
|
+
/* @__PURE__ */ jsx29("span", { className: "text-sm text-foreground", children: item.value })
|
|
3510
3533
|
]
|
|
3511
3534
|
},
|
|
3512
3535
|
item.label
|
|
3513
3536
|
)) })
|
|
3514
3537
|
] });
|
|
3515
3538
|
if (selectable) {
|
|
3516
|
-
return /* @__PURE__ */
|
|
3539
|
+
return /* @__PURE__ */ jsx29(
|
|
3517
3540
|
"label",
|
|
3518
3541
|
{
|
|
3519
3542
|
htmlFor: id,
|
|
@@ -3527,7 +3550,7 @@ function KbCard({
|
|
|
3527
3550
|
}
|
|
3528
3551
|
);
|
|
3529
3552
|
}
|
|
3530
|
-
return /* @__PURE__ */
|
|
3553
|
+
return /* @__PURE__ */ jsx29(
|
|
3531
3554
|
"div",
|
|
3532
3555
|
{
|
|
3533
3556
|
onClick,
|
|
@@ -3543,91 +3566,15 @@ function KbCard({
|
|
|
3543
3566
|
}
|
|
3544
3567
|
|
|
3545
3568
|
// src/components/ui/markdown-message.tsx
|
|
3546
|
-
import * as
|
|
3569
|
+
import * as React17 from "react";
|
|
3547
3570
|
import { PrismLight as SyntaxHighlighter } from "react-syntax-highlighter";
|
|
3548
3571
|
|
|
3549
3572
|
// src/components/ui/message-footer.tsx
|
|
3550
|
-
import * as
|
|
3551
|
-
|
|
3552
|
-
// src/components/ui/tooltip.tsx
|
|
3553
|
-
import * as React14 from "react";
|
|
3554
|
-
import { Tooltip as TooltipPrimitive } from "radix-ui";
|
|
3555
|
-
import { jsx as jsx29, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
3556
|
-
var TooltipProvider = TooltipPrimitive.Provider;
|
|
3557
|
-
var TooltipContent = React14.forwardRef((_a, ref) => {
|
|
3558
|
-
var _b = _a, { className, side = "top", sideOffset = 4, children } = _b, props = __objRest(_b, ["className", "side", "sideOffset", "children"]);
|
|
3559
|
-
return /* @__PURE__ */ jsx29(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx29(
|
|
3560
|
-
TooltipPrimitive.Content,
|
|
3561
|
-
__spreadProps(__spreadValues({
|
|
3562
|
-
ref,
|
|
3563
|
-
side,
|
|
3564
|
-
sideOffset,
|
|
3565
|
-
className: cn(
|
|
3566
|
-
"z-50 w-max max-w-[200px]",
|
|
3567
|
-
"bg-primary rounded-md px-2.5 py-1.5",
|
|
3568
|
-
"animate-in fade-in-0 zoom-in-95",
|
|
3569
|
-
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
3570
|
-
"data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2",
|
|
3571
|
-
"data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
3572
|
-
className
|
|
3573
|
-
)
|
|
3574
|
-
}, props), {
|
|
3575
|
-
children: /* @__PURE__ */ jsx29("span", { className: "block text-xs font-normal leading-snug tracking-tight text-primary-foreground whitespace-normal break-words", children })
|
|
3576
|
-
})
|
|
3577
|
-
) });
|
|
3578
|
-
});
|
|
3579
|
-
TooltipContent.displayName = "TooltipContent";
|
|
3580
|
-
function Tooltip(_a) {
|
|
3581
|
-
var _b = _a, {
|
|
3582
|
-
content,
|
|
3583
|
-
children,
|
|
3584
|
-
open,
|
|
3585
|
-
defaultOpen,
|
|
3586
|
-
onOpenChange,
|
|
3587
|
-
delayDuration
|
|
3588
|
-
} = _b, contentProps = __objRest(_b, [
|
|
3589
|
-
"content",
|
|
3590
|
-
"children",
|
|
3591
|
-
"open",
|
|
3592
|
-
"defaultOpen",
|
|
3593
|
-
"onOpenChange",
|
|
3594
|
-
"delayDuration"
|
|
3595
|
-
]);
|
|
3596
|
-
if (!content) return children;
|
|
3597
|
-
return /* @__PURE__ */ jsxs22(
|
|
3598
|
-
TooltipPrimitive.Root,
|
|
3599
|
-
{
|
|
3600
|
-
open,
|
|
3601
|
-
defaultOpen,
|
|
3602
|
-
onOpenChange,
|
|
3603
|
-
delayDuration,
|
|
3604
|
-
children: [
|
|
3605
|
-
/* @__PURE__ */ jsx29(TooltipPrimitive.Trigger, { asChild: true, children }),
|
|
3606
|
-
/* @__PURE__ */ jsx29(TooltipContent, __spreadProps(__spreadValues({}, contentProps), { children: content }))
|
|
3607
|
-
]
|
|
3608
|
-
}
|
|
3609
|
-
);
|
|
3610
|
-
}
|
|
3611
|
-
function TooltipWithIcon({
|
|
3612
|
-
content,
|
|
3613
|
-
iconName = "info",
|
|
3614
|
-
className
|
|
3615
|
-
}) {
|
|
3616
|
-
if (!content) return null;
|
|
3617
|
-
return /* @__PURE__ */ jsx29(Tooltip, { content, children: /* @__PURE__ */ jsx29(
|
|
3618
|
-
Icon,
|
|
3619
|
-
{
|
|
3620
|
-
name: iconName,
|
|
3621
|
-
className: cn("size-4 text-muted-foreground cursor-help", className)
|
|
3622
|
-
}
|
|
3623
|
-
) });
|
|
3624
|
-
}
|
|
3625
|
-
|
|
3626
|
-
// src/components/ui/message-footer.tsx
|
|
3573
|
+
import * as React16 from "react";
|
|
3627
3574
|
import { jsx as jsx30, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
3628
3575
|
function MessageFooter({ content, meta }) {
|
|
3629
|
-
const [copied, setCopied] =
|
|
3630
|
-
const timerRef =
|
|
3576
|
+
const [copied, setCopied] = React16.useState(false);
|
|
3577
|
+
const timerRef = React16.useRef(null);
|
|
3631
3578
|
const handleCopy = async () => {
|
|
3632
3579
|
try {
|
|
3633
3580
|
await navigator.clipboard.writeText(content);
|
|
@@ -3637,7 +3584,7 @@ function MessageFooter({ content, meta }) {
|
|
|
3637
3584
|
} catch (e) {
|
|
3638
3585
|
}
|
|
3639
3586
|
};
|
|
3640
|
-
|
|
3587
|
+
React16.useEffect(() => {
|
|
3641
3588
|
return () => {
|
|
3642
3589
|
if (timerRef.current) clearTimeout(timerRef.current);
|
|
3643
3590
|
};
|
|
@@ -3682,7 +3629,7 @@ import swift from "react-syntax-highlighter/dist/esm/languages/prism/swift";
|
|
|
3682
3629
|
import yaml from "react-syntax-highlighter/dist/esm/languages/prism/yaml";
|
|
3683
3630
|
import markdown from "react-syntax-highlighter/dist/esm/languages/prism/markdown";
|
|
3684
3631
|
import diff from "react-syntax-highlighter/dist/esm/languages/prism/diff";
|
|
3685
|
-
import { Fragment as
|
|
3632
|
+
import { Fragment as Fragment9, jsx as jsx32, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3686
3633
|
SyntaxHighlighter.registerLanguage("javascript", javascript);
|
|
3687
3634
|
SyntaxHighlighter.registerLanguage("js", javascript);
|
|
3688
3635
|
SyntaxHighlighter.registerLanguage("typescript", typescript);
|
|
@@ -3747,7 +3694,7 @@ var codeTheme = {
|
|
|
3747
3694
|
italic: { fontStyle: "italic" }
|
|
3748
3695
|
};
|
|
3749
3696
|
function CodeBlock({ lang, code }) {
|
|
3750
|
-
const [copied, setCopied] =
|
|
3697
|
+
const [copied, setCopied] = React17.useState(false);
|
|
3751
3698
|
const handleCopy = () => {
|
|
3752
3699
|
navigator.clipboard.writeText(code).then(() => {
|
|
3753
3700
|
setCopied(true);
|
|
@@ -3815,7 +3762,7 @@ function renderInline(text) {
|
|
|
3815
3762
|
const pushText = (raw) => {
|
|
3816
3763
|
if (!raw) return;
|
|
3817
3764
|
raw.split("\n").forEach((line, i, arr) => {
|
|
3818
|
-
result.push(/* @__PURE__ */ jsx32(
|
|
3765
|
+
result.push(/* @__PURE__ */ jsx32(React17.Fragment, { children: line }, k++));
|
|
3819
3766
|
if (i < arr.length - 1) result.push(/* @__PURE__ */ jsx32("br", {}, k++));
|
|
3820
3767
|
});
|
|
3821
3768
|
};
|
|
@@ -3845,7 +3792,7 @@ function renderInline(text) {
|
|
|
3845
3792
|
last = regex.lastIndex;
|
|
3846
3793
|
}
|
|
3847
3794
|
pushText(normalized.slice(last));
|
|
3848
|
-
return result.length === 0 ? null : /* @__PURE__ */ jsx32(
|
|
3795
|
+
return result.length === 0 ? null : /* @__PURE__ */ jsx32(Fragment9, { children: result });
|
|
3849
3796
|
}
|
|
3850
3797
|
function parseMarkdown(text) {
|
|
3851
3798
|
var _a;
|
|
@@ -4107,8 +4054,8 @@ function MarkdownMessage({
|
|
|
4107
4054
|
}
|
|
4108
4055
|
|
|
4109
4056
|
// src/components/ui/modal.tsx
|
|
4110
|
-
import * as
|
|
4111
|
-
import { Fragment as
|
|
4057
|
+
import * as React18 from "react";
|
|
4058
|
+
import { Fragment as Fragment10, jsx as jsx33, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
4112
4059
|
function Modal({
|
|
4113
4060
|
id,
|
|
4114
4061
|
trigger,
|
|
@@ -4117,7 +4064,7 @@ function Modal({
|
|
|
4117
4064
|
variant = "confirm",
|
|
4118
4065
|
title,
|
|
4119
4066
|
description,
|
|
4120
|
-
showCloseButton =
|
|
4067
|
+
showCloseButton = true,
|
|
4121
4068
|
children,
|
|
4122
4069
|
cancelLabel = "\uCDE8\uC18C",
|
|
4123
4070
|
confirmLabel = "\uD655\uC778",
|
|
@@ -4129,11 +4076,11 @@ function Modal({
|
|
|
4129
4076
|
isLoading
|
|
4130
4077
|
}) {
|
|
4131
4078
|
const isControlled = openProp !== void 0;
|
|
4132
|
-
const [openState, setOpenState] =
|
|
4079
|
+
const [openState, setOpenState] = React18.useState(false);
|
|
4133
4080
|
const open = isControlled ? openProp : openState;
|
|
4134
|
-
const [loading, setLoading] =
|
|
4135
|
-
const overlayRef =
|
|
4136
|
-
const setOpen =
|
|
4081
|
+
const [loading, setLoading] = React18.useState(false);
|
|
4082
|
+
const overlayRef = React18.useRef(null);
|
|
4083
|
+
const setOpen = React18.useCallback(
|
|
4137
4084
|
(next) => {
|
|
4138
4085
|
if (!isControlled) setOpenState(next);
|
|
4139
4086
|
onOpenChange == null ? void 0 : onOpenChange(next);
|
|
@@ -4141,9 +4088,9 @@ function Modal({
|
|
|
4141
4088
|
[isControlled, onOpenChange]
|
|
4142
4089
|
);
|
|
4143
4090
|
const isLoadingCombined = loading || !!isLoading;
|
|
4144
|
-
const loadingRef =
|
|
4091
|
+
const loadingRef = React18.useRef(isLoadingCombined);
|
|
4145
4092
|
loadingRef.current = isLoadingCombined;
|
|
4146
|
-
const handleClose =
|
|
4093
|
+
const handleClose = React18.useCallback(() => {
|
|
4147
4094
|
if (loadingRef.current) return;
|
|
4148
4095
|
setOpen(false);
|
|
4149
4096
|
onCancel == null ? void 0 : onCancel();
|
|
@@ -4166,7 +4113,7 @@ function Modal({
|
|
|
4166
4113
|
setOpen(false);
|
|
4167
4114
|
}
|
|
4168
4115
|
}
|
|
4169
|
-
|
|
4116
|
+
React18.useEffect(() => {
|
|
4170
4117
|
if (!open) return;
|
|
4171
4118
|
function handleKeyDown(e) {
|
|
4172
4119
|
if (e.key === "Escape") handleClose();
|
|
@@ -4177,7 +4124,7 @@ function Modal({
|
|
|
4177
4124
|
function handleOverlayClick(e) {
|
|
4178
4125
|
if (closeOnOverlayClick && e.target === overlayRef.current) handleClose();
|
|
4179
4126
|
}
|
|
4180
|
-
return /* @__PURE__ */ jsxs25(
|
|
4127
|
+
return /* @__PURE__ */ jsxs25(Fragment10, { children: [
|
|
4181
4128
|
trigger == null ? void 0 : trigger(() => setOpen(true)),
|
|
4182
4129
|
open && /* @__PURE__ */ jsx33(
|
|
4183
4130
|
"div",
|
|
@@ -4250,10 +4197,10 @@ function Modal({
|
|
|
4250
4197
|
}
|
|
4251
4198
|
|
|
4252
4199
|
// src/components/ui/menubar.tsx
|
|
4253
|
-
import * as
|
|
4200
|
+
import * as React19 from "react";
|
|
4254
4201
|
import { Menubar as MenubarPrimitive } from "radix-ui";
|
|
4255
4202
|
import { jsx as jsx34, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
4256
|
-
var Menubar =
|
|
4203
|
+
var Menubar = React19.forwardRef((_a, ref) => {
|
|
4257
4204
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
4258
4205
|
return /* @__PURE__ */ jsx34(
|
|
4259
4206
|
MenubarPrimitive.Root,
|
|
@@ -4269,7 +4216,7 @@ var Menubar = React18.forwardRef((_a, ref) => {
|
|
|
4269
4216
|
});
|
|
4270
4217
|
Menubar.displayName = MenubarPrimitive.Root.displayName;
|
|
4271
4218
|
var MenubarMenu = MenubarPrimitive.Menu;
|
|
4272
|
-
var MenubarTrigger =
|
|
4219
|
+
var MenubarTrigger = React19.forwardRef((_a, ref) => {
|
|
4273
4220
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
4274
4221
|
return /* @__PURE__ */ jsx34(
|
|
4275
4222
|
MenubarPrimitive.Trigger,
|
|
@@ -4287,7 +4234,7 @@ var MenubarTrigger = React18.forwardRef((_a, ref) => {
|
|
|
4287
4234
|
);
|
|
4288
4235
|
});
|
|
4289
4236
|
MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;
|
|
4290
|
-
var MenubarContent =
|
|
4237
|
+
var MenubarContent = React19.forwardRef((_a, ref) => {
|
|
4291
4238
|
var _b = _a, { className, align = "start", alignOffset = -4, sideOffset = 8 } = _b, props = __objRest(_b, ["className", "align", "alignOffset", "sideOffset"]);
|
|
4292
4239
|
return /* @__PURE__ */ jsx34(MenubarPrimitive.Portal, { children: /* @__PURE__ */ jsx34(
|
|
4293
4240
|
MenubarPrimitive.Content,
|
|
@@ -4313,7 +4260,7 @@ var MenubarContent = React18.forwardRef((_a, ref) => {
|
|
|
4313
4260
|
});
|
|
4314
4261
|
MenubarContent.displayName = MenubarPrimitive.Content.displayName;
|
|
4315
4262
|
var MenubarGroup = MenubarPrimitive.Group;
|
|
4316
|
-
var MenubarItem =
|
|
4263
|
+
var MenubarItem = React19.forwardRef((_a, ref) => {
|
|
4317
4264
|
var _b = _a, { className, inset } = _b, props = __objRest(_b, ["className", "inset"]);
|
|
4318
4265
|
return /* @__PURE__ */ jsx34(
|
|
4319
4266
|
MenubarPrimitive.Item,
|
|
@@ -4334,7 +4281,7 @@ var MenubarItem = React18.forwardRef((_a, ref) => {
|
|
|
4334
4281
|
});
|
|
4335
4282
|
MenubarItem.displayName = MenubarPrimitive.Item.displayName;
|
|
4336
4283
|
var MenubarSub = MenubarPrimitive.Sub;
|
|
4337
|
-
var MenubarSubTrigger =
|
|
4284
|
+
var MenubarSubTrigger = React19.forwardRef((_a, ref) => {
|
|
4338
4285
|
var _b = _a, { className, inset, children } = _b, props = __objRest(_b, ["className", "inset", "children"]);
|
|
4339
4286
|
return /* @__PURE__ */ jsxs26(
|
|
4340
4287
|
MenubarPrimitive.SubTrigger,
|
|
@@ -4359,7 +4306,7 @@ var MenubarSubTrigger = React18.forwardRef((_a, ref) => {
|
|
|
4359
4306
|
);
|
|
4360
4307
|
});
|
|
4361
4308
|
MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;
|
|
4362
|
-
var MenubarSubContent =
|
|
4309
|
+
var MenubarSubContent = React19.forwardRef((_a, ref) => {
|
|
4363
4310
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
4364
4311
|
return /* @__PURE__ */ jsx34(
|
|
4365
4312
|
MenubarPrimitive.SubContent,
|
|
@@ -4398,7 +4345,7 @@ var MenubarShortcut = (_a) => {
|
|
|
4398
4345
|
);
|
|
4399
4346
|
};
|
|
4400
4347
|
MenubarShortcut.displayName = "MenubarShortcut";
|
|
4401
|
-
var MenubarSeparator =
|
|
4348
|
+
var MenubarSeparator = React19.forwardRef((_a, ref) => {
|
|
4402
4349
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
4403
4350
|
return /* @__PURE__ */ jsx34(
|
|
4404
4351
|
MenubarPrimitive.Separator,
|
|
@@ -4502,7 +4449,7 @@ function SegmentedControl({
|
|
|
4502
4449
|
}
|
|
4503
4450
|
|
|
4504
4451
|
// src/components/ui/search-input.tsx
|
|
4505
|
-
import * as
|
|
4452
|
+
import * as React20 from "react";
|
|
4506
4453
|
import { jsx as jsx38, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
4507
4454
|
function SearchInput(_a) {
|
|
4508
4455
|
var _b = _a, {
|
|
@@ -4518,13 +4465,13 @@ function SearchInput(_a) {
|
|
|
4518
4465
|
"className",
|
|
4519
4466
|
"debounce"
|
|
4520
4467
|
]);
|
|
4521
|
-
const [displayValue, setDisplayValue] =
|
|
4522
|
-
const isComposingRef =
|
|
4523
|
-
const pendingRef =
|
|
4524
|
-
const latestDisplayRef =
|
|
4525
|
-
const onChangeRef =
|
|
4468
|
+
const [displayValue, setDisplayValue] = React20.useState(value);
|
|
4469
|
+
const isComposingRef = React20.useRef(false);
|
|
4470
|
+
const pendingRef = React20.useRef(null);
|
|
4471
|
+
const latestDisplayRef = React20.useRef(value);
|
|
4472
|
+
const onChangeRef = React20.useRef(onChange);
|
|
4526
4473
|
onChangeRef.current = onChange;
|
|
4527
|
-
|
|
4474
|
+
React20.useEffect(() => {
|
|
4528
4475
|
if (isComposingRef.current) return;
|
|
4529
4476
|
if (debounceMs !== void 0) {
|
|
4530
4477
|
const pending = pendingRef.current;
|
|
@@ -4536,7 +4483,7 @@ function SearchInput(_a) {
|
|
|
4536
4483
|
latestDisplayRef.current = value;
|
|
4537
4484
|
setDisplayValue(value);
|
|
4538
4485
|
}, [value, debounceMs]);
|
|
4539
|
-
|
|
4486
|
+
React20.useEffect(() => {
|
|
4540
4487
|
if (debounceMs === void 0) return;
|
|
4541
4488
|
const timer = window.setTimeout(() => {
|
|
4542
4489
|
const next = latestDisplayRef.current;
|
|
@@ -4591,12 +4538,12 @@ function SearchInput(_a) {
|
|
|
4591
4538
|
}
|
|
4592
4539
|
|
|
4593
4540
|
// src/components/ui/select.tsx
|
|
4594
|
-
import * as
|
|
4541
|
+
import * as React21 from "react";
|
|
4595
4542
|
import { Popover as PopoverPrimitive3 } from "radix-ui";
|
|
4596
4543
|
import { jsx as jsx39, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
4597
4544
|
function TruncatedText({ text, className }) {
|
|
4598
|
-
const ref =
|
|
4599
|
-
const [open, setOpen] =
|
|
4545
|
+
const ref = React21.useRef(null);
|
|
4546
|
+
const [open, setOpen] = React21.useState(false);
|
|
4600
4547
|
const handleOpenChange = (nextOpen) => {
|
|
4601
4548
|
if (!nextOpen) {
|
|
4602
4549
|
setOpen(false);
|
|
@@ -4610,8 +4557,8 @@ function TruncatedText({ text, className }) {
|
|
|
4610
4557
|
function Select(props) {
|
|
4611
4558
|
var _a, _b, _c, _d;
|
|
4612
4559
|
const { placeholder = "\uC120\uD0DD\uD574 \uC8FC\uC138\uC694", className, disabled = false } = props;
|
|
4613
|
-
const [open, setOpen] =
|
|
4614
|
-
const [selected, setSelected] =
|
|
4560
|
+
const [open, setOpen] = React21.useState(false);
|
|
4561
|
+
const [selected, setSelected] = React21.useState(() => {
|
|
4615
4562
|
var _a2;
|
|
4616
4563
|
if (props.multiple) return new Set((_a2 = props.defaultValue) != null ? _a2 : []);
|
|
4617
4564
|
const dv = props.defaultValue;
|
|
@@ -4621,13 +4568,13 @@ function Select(props) {
|
|
|
4621
4568
|
const groupsProp = props.groups;
|
|
4622
4569
|
const valueProp = props.value;
|
|
4623
4570
|
const { multiple } = props;
|
|
4624
|
-
const groups =
|
|
4571
|
+
const groups = React21.useMemo(() => {
|
|
4625
4572
|
if (groupsProp) return groupsProp;
|
|
4626
4573
|
if (optionsProp) return [{ options: optionsProp }];
|
|
4627
4574
|
return [];
|
|
4628
4575
|
}, [groupsProp, optionsProp]);
|
|
4629
|
-
const options =
|
|
4630
|
-
const activeSet =
|
|
4576
|
+
const options = React21.useMemo(() => groups.flatMap((g) => g.options), [groups]);
|
|
4577
|
+
const activeSet = React21.useMemo(() => {
|
|
4631
4578
|
if (valueProp !== void 0) {
|
|
4632
4579
|
return multiple ? new Set(valueProp) : /* @__PURE__ */ new Set([valueProp]);
|
|
4633
4580
|
}
|
|
@@ -4846,7 +4793,7 @@ function Sheet({
|
|
|
4846
4793
|
}
|
|
4847
4794
|
|
|
4848
4795
|
// src/components/ui/sidebar.tsx
|
|
4849
|
-
import * as
|
|
4796
|
+
import * as React22 from "react";
|
|
4850
4797
|
import { ArrowUpRight } from "lucide-react";
|
|
4851
4798
|
|
|
4852
4799
|
// src/components/icons/custom/panel-left.tsx
|
|
@@ -4876,22 +4823,22 @@ var defaultSidebarLinkRender = ({
|
|
|
4876
4823
|
onClick,
|
|
4877
4824
|
children
|
|
4878
4825
|
}) => /* @__PURE__ */ jsx42("a", { href, className: cn(className), style, onClick, children });
|
|
4879
|
-
var SidebarLinkContext =
|
|
4826
|
+
var SidebarLinkContext = React22.createContext(
|
|
4880
4827
|
defaultSidebarLinkRender
|
|
4881
4828
|
);
|
|
4882
4829
|
function SidebarLinkProvider({
|
|
4883
4830
|
LinkComponent,
|
|
4884
4831
|
children
|
|
4885
4832
|
}) {
|
|
4886
|
-
const linkRef =
|
|
4887
|
-
|
|
4833
|
+
const linkRef = React22.useRef(LinkComponent);
|
|
4834
|
+
React22.useLayoutEffect(() => {
|
|
4888
4835
|
linkRef.current = LinkComponent;
|
|
4889
4836
|
});
|
|
4890
4837
|
function sidebarLinkRender(props) {
|
|
4891
4838
|
if (!linkRef.current) return defaultSidebarLinkRender(props);
|
|
4892
|
-
return
|
|
4839
|
+
return React22.createElement(linkRef.current, props);
|
|
4893
4840
|
}
|
|
4894
|
-
const [stableRender] =
|
|
4841
|
+
const [stableRender] = React22.useState(
|
|
4895
4842
|
() => sidebarLinkRender
|
|
4896
4843
|
);
|
|
4897
4844
|
return /* @__PURE__ */ jsx42(SidebarLinkContext.Provider, { value: stableRender, children });
|
|
@@ -4903,7 +4850,7 @@ function SidebarLink({
|
|
|
4903
4850
|
onClick,
|
|
4904
4851
|
children
|
|
4905
4852
|
}) {
|
|
4906
|
-
const renderLink =
|
|
4853
|
+
const renderLink = React22.useContext(SidebarLinkContext);
|
|
4907
4854
|
return renderLink({ href, className, style, onClick, children });
|
|
4908
4855
|
}
|
|
4909
4856
|
function Sidebar({
|
|
@@ -4922,9 +4869,9 @@ function Sidebar({
|
|
|
4922
4869
|
}) {
|
|
4923
4870
|
var _a, _b, _c;
|
|
4924
4871
|
const isControlled = isPanelOpenProp !== void 0;
|
|
4925
|
-
const [internalIsPanelOpen, setInternalIsPanelOpen] =
|
|
4872
|
+
const [internalIsPanelOpen, setInternalIsPanelOpen] = React22.useState(true);
|
|
4926
4873
|
const resolvedIsPanelOpen = isControlled ? isPanelOpenProp : internalIsPanelOpen;
|
|
4927
|
-
const activeMenu =
|
|
4874
|
+
const activeMenu = React22.useMemo(
|
|
4928
4875
|
() => {
|
|
4929
4876
|
var _a2;
|
|
4930
4877
|
return (_a2 = menus.filter((m) => m.type !== "divider").find((m) => m.isActive)) != null ? _a2 : null;
|
|
@@ -4933,15 +4880,15 @@ function Sidebar({
|
|
|
4933
4880
|
);
|
|
4934
4881
|
const subMenus = (_a = activeMenu == null ? void 0 : activeMenu.subMenus) != null ? _a : [];
|
|
4935
4882
|
const panelVisible = isControlled ? resolvedIsPanelOpen : resolvedIsPanelOpen && subMenus.length > 0;
|
|
4936
|
-
const handleSetPanelOpen =
|
|
4883
|
+
const handleSetPanelOpen = React22.useCallback(
|
|
4937
4884
|
(open) => {
|
|
4938
4885
|
if (!isControlled) setInternalIsPanelOpen(open);
|
|
4939
4886
|
onPanelOpenChange == null ? void 0 : onPanelOpenChange(open);
|
|
4940
4887
|
},
|
|
4941
4888
|
[isControlled, onPanelOpenChange]
|
|
4942
4889
|
);
|
|
4943
|
-
const prevPanelVisibleRef =
|
|
4944
|
-
|
|
4890
|
+
const prevPanelVisibleRef = React22.useRef(null);
|
|
4891
|
+
React22.useEffect(() => {
|
|
4945
4892
|
if (prevPanelVisibleRef.current !== panelVisible) {
|
|
4946
4893
|
prevPanelVisibleRef.current = panelVisible;
|
|
4947
4894
|
onPanelOpenChange == null ? void 0 : onPanelOpenChange(panelVisible);
|
|
@@ -4985,9 +4932,29 @@ function Sidebar({
|
|
|
4985
4932
|
className: "flex flex-col items-center",
|
|
4986
4933
|
onMouseEnter: (e) => {
|
|
4987
4934
|
var _a2;
|
|
4988
|
-
return (_a2 = item.onHover) == null ? void 0 : _a2.call(item, e);
|
|
4935
|
+
return !item.disabled && ((_a2 = item.onHover) == null ? void 0 : _a2.call(item, e));
|
|
4989
4936
|
},
|
|
4990
|
-
children: /* @__PURE__ */ jsxs30(
|
|
4937
|
+
children: item.disabled ? /* @__PURE__ */ jsxs30(
|
|
4938
|
+
"div",
|
|
4939
|
+
{
|
|
4940
|
+
className: "flex flex-col items-center cursor-not-allowed opacity-40",
|
|
4941
|
+
style: { gap: "4px" },
|
|
4942
|
+
"aria-disabled": "true",
|
|
4943
|
+
children: [
|
|
4944
|
+
/* @__PURE__ */ jsx42(
|
|
4945
|
+
"div",
|
|
4946
|
+
{
|
|
4947
|
+
className: cn(
|
|
4948
|
+
"relative flex items-center justify-center rounded-md",
|
|
4949
|
+
iconContainerClass
|
|
4950
|
+
),
|
|
4951
|
+
children: /* @__PURE__ */ jsx42("span", { className: "flex items-center justify-center size-5 shrink-0 [&_svg]:size-full", children: item.icon })
|
|
4952
|
+
}
|
|
4953
|
+
),
|
|
4954
|
+
/* @__PURE__ */ jsx42("span", { className: "text-2xs leading-xs text-foreground text-center tracking-tight whitespace-nowrap", children: item.title })
|
|
4955
|
+
]
|
|
4956
|
+
}
|
|
4957
|
+
) : /* @__PURE__ */ jsxs30(
|
|
4991
4958
|
SidebarLink,
|
|
4992
4959
|
{
|
|
4993
4960
|
href: item.href,
|
|
@@ -5029,7 +4996,7 @@ function Sidebar({
|
|
|
5029
4996
|
/* @__PURE__ */ jsx42("div", { className: "flex flex-col flex-1 items-center justify-end min-h-0 min-w-0 px-4 py-3 gap-3 w-full", children: utilities == null ? void 0 : utilities.map((util) => {
|
|
5030
4997
|
var _a2, _b2;
|
|
5031
4998
|
if (util.popover) {
|
|
5032
|
-
return /* @__PURE__ */ jsx42(
|
|
4999
|
+
return /* @__PURE__ */ jsx42(React22.Fragment, { children: util.popover }, util.id);
|
|
5033
5000
|
}
|
|
5034
5001
|
return util.href ? /* @__PURE__ */ jsx42(
|
|
5035
5002
|
Tooltip,
|
|
@@ -5188,10 +5155,10 @@ function Skeleton(_a) {
|
|
|
5188
5155
|
}
|
|
5189
5156
|
|
|
5190
5157
|
// src/components/ui/slider.tsx
|
|
5191
|
-
import * as
|
|
5158
|
+
import * as React23 from "react";
|
|
5192
5159
|
import { Slider as SliderPrimitive } from "radix-ui";
|
|
5193
5160
|
import { jsx as jsx44, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
5194
|
-
var Slider =
|
|
5161
|
+
var Slider = React23.forwardRef(
|
|
5195
5162
|
(_a, ref) => {
|
|
5196
5163
|
var _b = _a, {
|
|
5197
5164
|
className,
|
|
@@ -5211,15 +5178,15 @@ var Slider = React22.forwardRef(
|
|
|
5211
5178
|
"onValueCommit"
|
|
5212
5179
|
]);
|
|
5213
5180
|
var _a2;
|
|
5214
|
-
const [displayValues, setDisplayValues] =
|
|
5181
|
+
const [displayValues, setDisplayValues] = React23.useState(
|
|
5215
5182
|
(_a2 = valueProp != null ? valueProp : defaultValue) != null ? _a2 : [0]
|
|
5216
5183
|
);
|
|
5217
|
-
const [visibleSet, setVisibleSet] =
|
|
5218
|
-
const hideTimers =
|
|
5219
|
-
|
|
5184
|
+
const [visibleSet, setVisibleSet] = React23.useState(/* @__PURE__ */ new Set());
|
|
5185
|
+
const hideTimers = React23.useRef(/* @__PURE__ */ new Map());
|
|
5186
|
+
React23.useEffect(() => {
|
|
5220
5187
|
if (valueProp !== void 0) setDisplayValues(valueProp);
|
|
5221
5188
|
}, [valueProp]);
|
|
5222
|
-
|
|
5189
|
+
React23.useEffect(
|
|
5223
5190
|
() => () => hideTimers.current.forEach((t) => clearTimeout(t)),
|
|
5224
5191
|
[]
|
|
5225
5192
|
);
|
|
@@ -5239,7 +5206,7 @@ var Slider = React22.forwardRef(
|
|
|
5239
5206
|
}, delay);
|
|
5240
5207
|
hideTimers.current.set(i, t);
|
|
5241
5208
|
};
|
|
5242
|
-
const prevValuesRef =
|
|
5209
|
+
const prevValuesRef = React23.useRef(displayValues);
|
|
5243
5210
|
const handleValueChange = (newVals) => {
|
|
5244
5211
|
newVals.forEach((v, i) => {
|
|
5245
5212
|
if (v !== prevValuesRef.current[i]) showThumb(i);
|
|
@@ -5346,7 +5313,7 @@ var Slider = React22.forwardRef(
|
|
|
5346
5313
|
Slider.displayName = SliderPrimitive.Root.displayName;
|
|
5347
5314
|
|
|
5348
5315
|
// src/components/ui/stepper.tsx
|
|
5349
|
-
import
|
|
5316
|
+
import React24 from "react";
|
|
5350
5317
|
import { jsx as jsx45, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
5351
5318
|
function getStatus(index, currentStep) {
|
|
5352
5319
|
if (index < currentStep) return "complete";
|
|
@@ -5383,7 +5350,7 @@ function CircleCheckFilled({ className }) {
|
|
|
5383
5350
|
function Stepper({ steps, currentStep, className }) {
|
|
5384
5351
|
return /* @__PURE__ */ jsx45("div", { className: cn("flex items-center", className), children: steps.map((label, index) => {
|
|
5385
5352
|
const status = getStatus(index, currentStep);
|
|
5386
|
-
return /* @__PURE__ */ jsxs32(
|
|
5353
|
+
return /* @__PURE__ */ jsxs32(React24.Fragment, { children: [
|
|
5387
5354
|
/* @__PURE__ */ jsxs32("div", { className: "flex shrink-0 items-center gap-1.5 px-2.5 py-2.5", children: [
|
|
5388
5355
|
status === "complete" ? /* @__PURE__ */ jsx45(CircleCheckFilled, {}) : /* @__PURE__ */ jsx45(
|
|
5389
5356
|
Icon,
|
|
@@ -5491,10 +5458,7 @@ function Tabs({
|
|
|
5491
5458
|
return /* @__PURE__ */ jsxs33(
|
|
5492
5459
|
"div",
|
|
5493
5460
|
{
|
|
5494
|
-
className: cn(
|
|
5495
|
-
"flex w-full items-center border-b border-border",
|
|
5496
|
-
className
|
|
5497
|
-
),
|
|
5461
|
+
className: cn("flex w-full items-end", className),
|
|
5498
5462
|
children: [
|
|
5499
5463
|
/* @__PURE__ */ jsx46("div", { className: cn("flex items-center", block && "flex-1"), children: allTabs.map((tab) => {
|
|
5500
5464
|
const isActive = tab.value === current;
|
|
@@ -5504,16 +5468,16 @@ function Tabs({
|
|
|
5504
5468
|
type: "button",
|
|
5505
5469
|
onClick: () => onTabChange(tab.value),
|
|
5506
5470
|
className: cn(
|
|
5507
|
-
"cursor-pointer
|
|
5471
|
+
"cursor-pointer px-3 py-2 text-sm tracking-tight transition-colors",
|
|
5508
5472
|
block && "flex-1",
|
|
5509
|
-
isActive ? "border-b-2 border-foreground font-semibold text-foreground" : "font-medium text-muted-foreground hover:text-foreground"
|
|
5473
|
+
isActive ? "border-b-2 border-foreground font-semibold text-foreground" : "border-b border-border font-medium text-muted-foreground hover:text-foreground"
|
|
5510
5474
|
),
|
|
5511
5475
|
children: tab.label
|
|
5512
5476
|
},
|
|
5513
5477
|
tab.value
|
|
5514
5478
|
);
|
|
5515
5479
|
}) }),
|
|
5516
|
-
/* @__PURE__ */ jsx46("div", { className: "ml-auto flex items-center
|
|
5480
|
+
/* @__PURE__ */ jsx46("div", { className: "ml-auto flex items-center", children: activeRightContents })
|
|
5517
5481
|
]
|
|
5518
5482
|
}
|
|
5519
5483
|
);
|
|
@@ -5713,10 +5677,10 @@ function CircleIndicator({
|
|
|
5713
5677
|
}
|
|
5714
5678
|
|
|
5715
5679
|
// src/components/ui/switch.tsx
|
|
5716
|
-
import
|
|
5680
|
+
import React25 from "react";
|
|
5717
5681
|
import { Switch as SwitchPrimitive } from "radix-ui";
|
|
5718
5682
|
import { jsx as jsx50, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
5719
|
-
var Switch =
|
|
5683
|
+
var Switch = React25.forwardRef((_a, ref) => {
|
|
5720
5684
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
5721
5685
|
return /* @__PURE__ */ jsx50(
|
|
5722
5686
|
SwitchPrimitive.Root,
|
|
@@ -5768,7 +5732,7 @@ function SwitchField(_a) {
|
|
|
5768
5732
|
}
|
|
5769
5733
|
|
|
5770
5734
|
// src/components/ui/table.tsx
|
|
5771
|
-
import * as
|
|
5735
|
+
import * as React27 from "react";
|
|
5772
5736
|
import {
|
|
5773
5737
|
useReactTable,
|
|
5774
5738
|
getCoreRowModel,
|
|
@@ -5778,7 +5742,7 @@ import {
|
|
|
5778
5742
|
} from "@tanstack/react-table";
|
|
5779
5743
|
|
|
5780
5744
|
// src/components/ui/pagination.tsx
|
|
5781
|
-
import * as
|
|
5745
|
+
import * as React26 from "react";
|
|
5782
5746
|
import { jsx as jsx51, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
5783
5747
|
function getVisiblePageItems(currentPage, totalPages) {
|
|
5784
5748
|
if (totalPages <= 5) {
|
|
@@ -5818,7 +5782,7 @@ function PaginationRoot(_a) {
|
|
|
5818
5782
|
}, props)
|
|
5819
5783
|
);
|
|
5820
5784
|
}
|
|
5821
|
-
var PaginationContent =
|
|
5785
|
+
var PaginationContent = React26.forwardRef((_a, ref) => {
|
|
5822
5786
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
5823
5787
|
return /* @__PURE__ */ jsx51(
|
|
5824
5788
|
"ul",
|
|
@@ -5829,7 +5793,7 @@ var PaginationContent = React25.forwardRef((_a, ref) => {
|
|
|
5829
5793
|
);
|
|
5830
5794
|
});
|
|
5831
5795
|
PaginationContent.displayName = "PaginationContent";
|
|
5832
|
-
var PaginationItem =
|
|
5796
|
+
var PaginationItem = React26.forwardRef((_a, ref) => {
|
|
5833
5797
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
5834
5798
|
return /* @__PURE__ */ jsx51("li", __spreadValues({ ref, className: cn("", className) }, props));
|
|
5835
5799
|
});
|
|
@@ -5992,13 +5956,13 @@ function Pagination({
|
|
|
5992
5956
|
// src/components/ui/table.tsx
|
|
5993
5957
|
import { jsx as jsx52, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
5994
5958
|
function EllipsisCell({ rendered, tooltip }) {
|
|
5995
|
-
const [el, setEl] =
|
|
5996
|
-
const [overflowing, setOverflowing] =
|
|
5959
|
+
const [el, setEl] = React27.useState(null);
|
|
5960
|
+
const [overflowing, setOverflowing] = React27.useState(false);
|
|
5997
5961
|
const isPrimitiveText = typeof rendered === "string" || typeof rendered === "number";
|
|
5998
|
-
const refCallback =
|
|
5962
|
+
const refCallback = React27.useCallback((node) => {
|
|
5999
5963
|
setEl(node);
|
|
6000
5964
|
}, []);
|
|
6001
|
-
|
|
5965
|
+
React27.useLayoutEffect(() => {
|
|
6002
5966
|
if (!el) return;
|
|
6003
5967
|
const check = () => {
|
|
6004
5968
|
const selfOverflow = el.scrollWidth > el.clientWidth;
|
|
@@ -6054,6 +6018,9 @@ function SortIcon({ direction }) {
|
|
|
6054
6018
|
}
|
|
6055
6019
|
);
|
|
6056
6020
|
}
|
|
6021
|
+
function isEmptyConfig(value) {
|
|
6022
|
+
return typeof value === "object" && value !== null && !React27.isValidElement(value) && "description" in value;
|
|
6023
|
+
}
|
|
6057
6024
|
function Table({
|
|
6058
6025
|
columns,
|
|
6059
6026
|
data,
|
|
@@ -6061,21 +6028,23 @@ function Table({
|
|
|
6061
6028
|
pagination,
|
|
6062
6029
|
defaultSorting,
|
|
6063
6030
|
loading = false,
|
|
6031
|
+
empty,
|
|
6064
6032
|
enableRowSelection,
|
|
6065
6033
|
rowSelection: rowSelectionProp,
|
|
6066
6034
|
onRowSelectionChange,
|
|
6067
6035
|
rowActions,
|
|
6068
6036
|
onRowClick,
|
|
6037
|
+
isRowDisabled,
|
|
6069
6038
|
onSortingChange,
|
|
6070
6039
|
className,
|
|
6071
6040
|
maxHeight
|
|
6072
6041
|
}) {
|
|
6073
6042
|
var _a, _b, _c;
|
|
6074
|
-
const getRowKey =
|
|
6043
|
+
const getRowKey = React27.useCallback(
|
|
6075
6044
|
(row) => typeof rowKey === "function" ? rowKey(row) : String(row[rowKey]),
|
|
6076
6045
|
[rowKey]
|
|
6077
6046
|
);
|
|
6078
|
-
const [internalRowSelection, setInternalRowSelection] =
|
|
6047
|
+
const [internalRowSelection, setInternalRowSelection] = React27.useState({});
|
|
6079
6048
|
const isControlledSelection = rowSelectionProp !== void 0;
|
|
6080
6049
|
const effectiveRowSelection = isControlledSelection ? rowSelectionProp : internalRowSelection;
|
|
6081
6050
|
const handleRowSelectionChange = (updater) => {
|
|
@@ -6086,7 +6055,7 @@ function Table({
|
|
|
6086
6055
|
}
|
|
6087
6056
|
onRowSelectionChange == null ? void 0 : onRowSelectionChange(updater);
|
|
6088
6057
|
};
|
|
6089
|
-
const [sorting, setSorting] =
|
|
6058
|
+
const [sorting, setSorting] = React27.useState(
|
|
6090
6059
|
() => {
|
|
6091
6060
|
var _a2;
|
|
6092
6061
|
return (_a2 = defaultSorting == null ? void 0 : defaultSorting.map(({ key, desc }) => ({
|
|
@@ -6095,7 +6064,7 @@ function Table({
|
|
|
6095
6064
|
}))) != null ? _a2 : [];
|
|
6096
6065
|
}
|
|
6097
6066
|
);
|
|
6098
|
-
const handleSortingChange =
|
|
6067
|
+
const handleSortingChange = React27.useCallback(
|
|
6099
6068
|
(updater) => {
|
|
6100
6069
|
setSorting((prev) => {
|
|
6101
6070
|
const next = typeof updater === "function" ? updater(prev) : updater;
|
|
@@ -6105,11 +6074,11 @@ function Table({
|
|
|
6105
6074
|
},
|
|
6106
6075
|
[onSortingChange]
|
|
6107
6076
|
);
|
|
6108
|
-
const [internalPagination, setInternalPagination] =
|
|
6077
|
+
const [internalPagination, setInternalPagination] = React27.useState({
|
|
6109
6078
|
pageIndex: ((_a = pagination == null ? void 0 : pagination.currentPage) != null ? _a : 1) - 1,
|
|
6110
6079
|
pageSize: (_b = pagination == null ? void 0 : pagination.pageSize) != null ? _b : 10
|
|
6111
6080
|
});
|
|
6112
|
-
|
|
6081
|
+
React27.useEffect(() => {
|
|
6113
6082
|
if ((pagination == null ? void 0 : pagination.currentPage) !== void 0) {
|
|
6114
6083
|
setInternalPagination((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
6115
6084
|
pageIndex: pagination.currentPage - 1
|
|
@@ -6123,7 +6092,7 @@ function Table({
|
|
|
6123
6092
|
(_a2 = pagination == null ? void 0 : pagination.onPageChange) == null ? void 0 : _a2.call(pagination, next.pageIndex + 1);
|
|
6124
6093
|
};
|
|
6125
6094
|
const isSelectionActive = enableRowSelection === true;
|
|
6126
|
-
const selectionColumn =
|
|
6095
|
+
const selectionColumn = React27.useMemo(
|
|
6127
6096
|
() => ({
|
|
6128
6097
|
id: "__select__",
|
|
6129
6098
|
header: "__select_header__",
|
|
@@ -6132,6 +6101,7 @@ function Table({
|
|
|
6132
6101
|
Checkbox,
|
|
6133
6102
|
{
|
|
6134
6103
|
checked: row.getIsSelected(),
|
|
6104
|
+
disabled: !row.getCanSelect(),
|
|
6135
6105
|
onCheckedChange: (checked) => row.toggleSelected(!!checked),
|
|
6136
6106
|
"aria-label": "\uD589 \uC120\uD0DD",
|
|
6137
6107
|
onClick: (e) => e.stopPropagation()
|
|
@@ -6141,7 +6111,7 @@ function Table({
|
|
|
6141
6111
|
}),
|
|
6142
6112
|
[]
|
|
6143
6113
|
);
|
|
6144
|
-
const rowActionsColumn =
|
|
6114
|
+
const rowActionsColumn = React27.useMemo(
|
|
6145
6115
|
() => ({
|
|
6146
6116
|
id: "__row_actions__",
|
|
6147
6117
|
header: "",
|
|
@@ -6150,7 +6120,7 @@ function Table({
|
|
|
6150
6120
|
}),
|
|
6151
6121
|
[rowActions]
|
|
6152
6122
|
);
|
|
6153
|
-
const tanstackColumns =
|
|
6123
|
+
const tanstackColumns = React27.useMemo(
|
|
6154
6124
|
() => [
|
|
6155
6125
|
...isSelectionActive ? [selectionColumn] : [],
|
|
6156
6126
|
...columns.map((col) => {
|
|
@@ -6177,7 +6147,7 @@ function Table({
|
|
|
6177
6147
|
getRowId: (row) => getRowKey(row),
|
|
6178
6148
|
onSortingChange: handleSortingChange
|
|
6179
6149
|
}, hasPagination && { onPaginationChange: handlePaginationChange }), isSelectionActive && {
|
|
6180
|
-
enableRowSelection: true,
|
|
6150
|
+
enableRowSelection: isRowDisabled ? (row) => !isRowDisabled(row.original) : true,
|
|
6181
6151
|
onRowSelectionChange: handleRowSelectionChange
|
|
6182
6152
|
}), {
|
|
6183
6153
|
getCoreRowModel: getCoreRowModel(),
|
|
@@ -6189,7 +6159,7 @@ function Table({
|
|
|
6189
6159
|
}), (pagination == null ? void 0 : pagination.rowCount) !== void 0 && {
|
|
6190
6160
|
rowCount: pagination.rowCount
|
|
6191
6161
|
}));
|
|
6192
|
-
const colMap =
|
|
6162
|
+
const colMap = React27.useMemo(
|
|
6193
6163
|
() => Object.fromEntries(
|
|
6194
6164
|
columns.map((c) => {
|
|
6195
6165
|
var _a2, _b2, _c2, _d;
|
|
@@ -6286,81 +6256,87 @@ function Table({
|
|
|
6286
6256
|
name: "loader-2",
|
|
6287
6257
|
className: "mx-auto size-6 animate-spin text-muted-foreground"
|
|
6288
6258
|
}
|
|
6289
|
-
) }) }) : table.getRowModel().rows.
|
|
6290
|
-
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
|
-
|
|
6295
|
-
|
|
6296
|
-
isSelectionActive && row.
|
|
6297
|
-
|
|
6298
|
-
|
|
6299
|
-
|
|
6300
|
-
|
|
6301
|
-
|
|
6259
|
+
) }) }) : table.getRowModel().rows.length === 0 ? /* @__PURE__ */ jsx52("tr", { children: /* @__PURE__ */ jsx52("td", { colSpan: colCount, children: empty === void 0 ? /* @__PURE__ */ jsx52(Empty, { description: "No Data" }) : isEmptyConfig(empty) ? /* @__PURE__ */ jsx52(Empty, { description: empty.description }) : empty }) }) : table.getRowModel().rows.map((row) => {
|
|
6260
|
+
var _a2;
|
|
6261
|
+
const rowDisabled = (_a2 = isRowDisabled == null ? void 0 : isRowDisabled(row.original)) != null ? _a2 : false;
|
|
6262
|
+
return /* @__PURE__ */ jsx52(
|
|
6263
|
+
"tr",
|
|
6264
|
+
{
|
|
6265
|
+
"aria-disabled": rowDisabled || void 0,
|
|
6266
|
+
onClick: !isSelectionActive && onRowClick && !rowDisabled ? () => onRowClick(row.original) : void 0,
|
|
6267
|
+
className: cn(
|
|
6268
|
+
"group border-b border-border transition-colors hover:bg-accent/50 last:border-b-0",
|
|
6269
|
+
!isSelectionActive && onRowClick && !rowDisabled && "cursor-pointer",
|
|
6270
|
+
isSelectionActive && row.getIsSelected() && "bg-accent/30",
|
|
6271
|
+
rowDisabled && "cursor-not-allowed [&_td]:text-muted-foreground"
|
|
6272
|
+
),
|
|
6273
|
+
children: row.getVisibleCells().map((cell) => {
|
|
6274
|
+
var _a3;
|
|
6275
|
+
if (cell.column.id === "__select__") {
|
|
6276
|
+
return /* @__PURE__ */ jsx52("td", { className: "w-10 p-0 relative", children: isSelectionActive && /* @__PURE__ */ jsx52("div", { className: "absolute inset-0 flex items-center justify-center", children: flexRender(
|
|
6277
|
+
cell.column.columnDef.cell,
|
|
6278
|
+
cell.getContext()
|
|
6279
|
+
) }) }, cell.id);
|
|
6280
|
+
}
|
|
6281
|
+
if (cell.column.id === "__row_actions__") {
|
|
6282
|
+
return /* @__PURE__ */ jsx52(
|
|
6283
|
+
"td",
|
|
6284
|
+
{
|
|
6285
|
+
className: "w-12 px-2 py-4 align-middle text-right",
|
|
6286
|
+
children: flexRender(
|
|
6287
|
+
cell.column.columnDef.cell,
|
|
6288
|
+
cell.getContext()
|
|
6289
|
+
)
|
|
6290
|
+
},
|
|
6291
|
+
cell.id
|
|
6292
|
+
);
|
|
6293
|
+
}
|
|
6294
|
+
const {
|
|
6295
|
+
align,
|
|
6296
|
+
cellCls,
|
|
6297
|
+
ellipsis,
|
|
6298
|
+
ellipsisTooltip,
|
|
6299
|
+
cellFn
|
|
6300
|
+
} = (_a3 = colMap[cell.column.id]) != null ? _a3 : {
|
|
6301
|
+
align: "left",
|
|
6302
|
+
cellCls: "",
|
|
6303
|
+
ellipsis: false,
|
|
6304
|
+
ellipsisTooltip: void 0,
|
|
6305
|
+
cellFn: () => null
|
|
6306
|
+
};
|
|
6307
|
+
const rendered = flexRender(
|
|
6302
6308
|
cell.column.columnDef.cell,
|
|
6303
6309
|
cell.getContext()
|
|
6304
|
-
)
|
|
6305
|
-
|
|
6306
|
-
|
|
6310
|
+
);
|
|
6311
|
+
const rawContent = ellipsis ? cellFn(row.original) : null;
|
|
6312
|
+
const cellContent = ellipsis ? /* @__PURE__ */ jsx52(
|
|
6313
|
+
EllipsisCell,
|
|
6314
|
+
{
|
|
6315
|
+
rendered: rawContent,
|
|
6316
|
+
tooltip: ellipsisTooltip ? ellipsisTooltip(row.original) : rawContent
|
|
6317
|
+
}
|
|
6318
|
+
) : rendered;
|
|
6307
6319
|
return /* @__PURE__ */ jsx52(
|
|
6308
6320
|
"td",
|
|
6309
6321
|
{
|
|
6310
|
-
className:
|
|
6311
|
-
|
|
6312
|
-
|
|
6313
|
-
|
|
6314
|
-
|
|
6322
|
+
className: cn(
|
|
6323
|
+
"px-2 py-4 text-sm leading-none text-foreground align-middle",
|
|
6324
|
+
align === "center" && "text-center",
|
|
6325
|
+
align === "right" && "text-right",
|
|
6326
|
+
// ellipsis 컬럼은 max-w-0으로 table 레이아웃상 너비를 고정하고
|
|
6327
|
+
// overflow-hidden으로 td 밖으로 나가는 콘텐츠를 클리핑
|
|
6328
|
+
ellipsis && "max-w-0 overflow-hidden",
|
|
6329
|
+
cellCls
|
|
6330
|
+
),
|
|
6331
|
+
children: cellContent
|
|
6315
6332
|
},
|
|
6316
6333
|
cell.id
|
|
6317
6334
|
);
|
|
6318
|
-
}
|
|
6319
|
-
|
|
6320
|
-
|
|
6321
|
-
|
|
6322
|
-
|
|
6323
|
-
ellipsisTooltip,
|
|
6324
|
-
cellFn
|
|
6325
|
-
} = (_a2 = colMap[cell.column.id]) != null ? _a2 : {
|
|
6326
|
-
align: "left",
|
|
6327
|
-
cellCls: "",
|
|
6328
|
-
ellipsis: false,
|
|
6329
|
-
ellipsisTooltip: void 0,
|
|
6330
|
-
cellFn: () => null
|
|
6331
|
-
};
|
|
6332
|
-
const rendered = flexRender(
|
|
6333
|
-
cell.column.columnDef.cell,
|
|
6334
|
-
cell.getContext()
|
|
6335
|
-
);
|
|
6336
|
-
const rawContent = ellipsis ? cellFn(row.original) : null;
|
|
6337
|
-
const cellContent = ellipsis ? /* @__PURE__ */ jsx52(
|
|
6338
|
-
EllipsisCell,
|
|
6339
|
-
{
|
|
6340
|
-
rendered: rawContent,
|
|
6341
|
-
tooltip: ellipsisTooltip ? ellipsisTooltip(row.original) : rawContent
|
|
6342
|
-
}
|
|
6343
|
-
) : rendered;
|
|
6344
|
-
return /* @__PURE__ */ jsx52(
|
|
6345
|
-
"td",
|
|
6346
|
-
{
|
|
6347
|
-
className: cn(
|
|
6348
|
-
"px-2 py-4 text-sm leading-none text-foreground align-middle",
|
|
6349
|
-
align === "center" && "text-center",
|
|
6350
|
-
align === "right" && "text-right",
|
|
6351
|
-
// ellipsis 컬럼은 max-w-0으로 table 레이아웃상 너비를 고정하고
|
|
6352
|
-
// overflow-hidden으로 td 밖으로 나가는 콘텐츠를 클리핑
|
|
6353
|
-
ellipsis && "max-w-0 overflow-hidden",
|
|
6354
|
-
cellCls
|
|
6355
|
-
),
|
|
6356
|
-
children: cellContent
|
|
6357
|
-
},
|
|
6358
|
-
cell.id
|
|
6359
|
-
);
|
|
6360
|
-
})
|
|
6361
|
-
},
|
|
6362
|
-
getRowKey(row.original)
|
|
6363
|
-
)) })
|
|
6335
|
+
})
|
|
6336
|
+
},
|
|
6337
|
+
getRowKey(row.original)
|
|
6338
|
+
);
|
|
6339
|
+
}) })
|
|
6364
6340
|
] })
|
|
6365
6341
|
}
|
|
6366
6342
|
),
|
|
@@ -6376,12 +6352,12 @@ function Table({
|
|
|
6376
6352
|
}
|
|
6377
6353
|
|
|
6378
6354
|
// src/components/ui/user-message-bubble.tsx
|
|
6379
|
-
import * as
|
|
6355
|
+
import * as React28 from "react";
|
|
6380
6356
|
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
6381
6357
|
function UserMessageBubble({ content }) {
|
|
6382
|
-
const textRef =
|
|
6383
|
-
const [multiLine, setMultiLine] =
|
|
6384
|
-
|
|
6358
|
+
const textRef = React28.useRef(null);
|
|
6359
|
+
const [multiLine, setMultiLine] = React28.useState(false);
|
|
6360
|
+
React28.useEffect(() => {
|
|
6385
6361
|
const el = textRef.current;
|
|
6386
6362
|
if (!el) return;
|
|
6387
6363
|
const check = () => setMultiLine(el.offsetHeight > 28);
|
|
@@ -9700,20 +9676,6 @@ export {
|
|
|
9700
9676
|
Drawer,
|
|
9701
9677
|
DriveIcon,
|
|
9702
9678
|
DropdownMenu,
|
|
9703
|
-
DropdownMenuCheckboxItem,
|
|
9704
|
-
DropdownMenuContent,
|
|
9705
|
-
DropdownMenuGroup,
|
|
9706
|
-
DropdownMenuItem,
|
|
9707
|
-
DropdownMenuLabel,
|
|
9708
|
-
DropdownMenuPortal,
|
|
9709
|
-
DropdownMenuRadioGroup,
|
|
9710
|
-
DropdownMenuRadioItem,
|
|
9711
|
-
DropdownMenuSeparator,
|
|
9712
|
-
DropdownMenuShortcut,
|
|
9713
|
-
DropdownMenuSub,
|
|
9714
|
-
DropdownMenuSubContent,
|
|
9715
|
-
DropdownMenuSubTrigger,
|
|
9716
|
-
DropdownMenuTrigger,
|
|
9717
9679
|
Empty,
|
|
9718
9680
|
EmptyTrayIcon,
|
|
9719
9681
|
Field,
|