@mondrianai/runyourai-design-system 0.0.21 → 0.0.22

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.js CHANGED
@@ -692,6 +692,7 @@ var buttonVariants = (0, import_class_variance_authority.cva)(
692
692
  * outline 흰 배경 + 테두리, 검정 글자 / hover: accent 배경 (텍스트 색 변화 없음)
693
693
  * ghost 배경 없음, 검정 글자 / hover: accent 배경 (텍스트 색 변화 없음)
694
694
  * destructive 빨간 배경, 흰 글자(95% opacity) / hover: opacity-90
695
+ * ghostDestructive 배경 없음, destructive 색 글자 / hover: 옅은 destructive 배경
695
696
  * link 배경/테두리 없음, primary 색 글자 / hover: underline
696
697
  */
697
698
  variant: {
@@ -700,6 +701,7 @@ var buttonVariants = (0, import_class_variance_authority.cva)(
700
701
  outline: "border border-border bg-background text-foreground hover:bg-accent",
701
702
  ghost: "text-foreground hover:bg-accent",
702
703
  destructive: "bg-destructive text-white/95 shadow-button hover:opacity-90",
704
+ ghostDestructive: "text-destructive hover:bg-destructive/10",
703
705
  link: "text-primary underline-offset-4 hover:underline"
704
706
  },
705
707
  /**
@@ -1450,28 +1452,46 @@ var React6 = __toESM(require("react"));
1450
1452
  var import_radix_ui5 = require("radix-ui");
1451
1453
  var import_jsx_runtime12 = require("react/jsx-runtime");
1452
1454
  var TooltipProvider = import_radix_ui5.Tooltip.Provider;
1453
- var TooltipContent = React6.forwardRef((_a, ref) => {
1454
- var _b = _a, { className, side = "top", sideOffset = 4, children } = _b, props = __objRest(_b, ["className", "side", "sideOffset", "children"]);
1455
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_radix_ui5.Tooltip.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1456
- import_radix_ui5.Tooltip.Content,
1457
- __spreadProps(__spreadValues({
1458
- ref,
1459
- side,
1460
- sideOffset,
1461
- className: cn(
1462
- "z-50 w-max max-w-[200px]",
1463
- "bg-primary rounded-md px-2.5 py-1.5",
1464
- "animate-in fade-in-0 zoom-in-95",
1465
- "data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
1466
- "data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2",
1467
- "data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
1468
- className
1469
- )
1470
- }, props), {
1471
- children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "block text-xs font-normal leading-snug tracking-tight text-primary-foreground whitespace-normal break-words", children })
1472
- })
1473
- ) });
1474
- });
1455
+ var DEFAULT_TOOLTIP_MAX_WIDTH = 280;
1456
+ var TooltipContent = React6.forwardRef(
1457
+ (_a, ref) => {
1458
+ var _b = _a, {
1459
+ className,
1460
+ side = "top",
1461
+ sideOffset = 4,
1462
+ maxWidth = DEFAULT_TOOLTIP_MAX_WIDTH,
1463
+ style,
1464
+ children
1465
+ } = _b, props = __objRest(_b, [
1466
+ "className",
1467
+ "side",
1468
+ "sideOffset",
1469
+ "maxWidth",
1470
+ "style",
1471
+ "children"
1472
+ ]);
1473
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_radix_ui5.Tooltip.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1474
+ import_radix_ui5.Tooltip.Content,
1475
+ __spreadProps(__spreadValues({
1476
+ ref,
1477
+ side,
1478
+ sideOffset,
1479
+ className: cn(
1480
+ "z-50 w-max",
1481
+ "bg-primary rounded-md px-2.5 py-1.5",
1482
+ "animate-in fade-in-0 zoom-in-95",
1483
+ "data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
1484
+ "data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2",
1485
+ "data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
1486
+ className
1487
+ ),
1488
+ style: __spreadValues({ maxWidth }, style)
1489
+ }, props), {
1490
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "block text-xs font-normal leading-snug tracking-tight text-primary-foreground whitespace-normal break-words", children })
1491
+ })
1492
+ ) });
1493
+ }
1494
+ );
1475
1495
  TooltipContent.displayName = "TooltipContent";
1476
1496
  function Tooltip(_a) {
1477
1497
  var _b = _a, {
@@ -4313,6 +4333,12 @@ function MarkdownMessage({
4313
4333
  // src/components/ui/modal.tsx
4314
4334
  var React18 = __toESM(require("react"));
4315
4335
  var import_jsx_runtime32 = require("react/jsx-runtime");
4336
+ function withIconSize(icon) {
4337
+ if (!React18.isValidElement(icon)) return icon;
4338
+ return React18.cloneElement(icon, {
4339
+ className: cn("size-4", icon.props.className)
4340
+ });
4341
+ }
4316
4342
  function Modal({
4317
4343
  id,
4318
4344
  trigger,
@@ -4323,15 +4349,29 @@ function Modal({
4323
4349
  description,
4324
4350
  showCloseButton = true,
4325
4351
  children,
4326
- cancelLabel = "\uCDE8\uC18C",
4327
- confirmLabel = "\uD655\uC778",
4352
+ cancelButtonProps,
4353
+ confirmButtonProps,
4328
4354
  onConfirm,
4329
4355
  onCancel,
4330
- confirmDisabled = false,
4331
4356
  closeOnOverlayClick = true,
4332
- className,
4333
- isLoading
4357
+ className
4334
4358
  }) {
4359
+ const {
4360
+ label: cancelLabel = "\uCDE8\uC18C",
4361
+ iconStart: cancelIconStart,
4362
+ iconEnd: cancelIconEnd,
4363
+ disabled: cancelDisabled = false,
4364
+ isLoading: cancelLoading = false,
4365
+ className: cancelClassName
4366
+ } = cancelButtonProps != null ? cancelButtonProps : {};
4367
+ const {
4368
+ label: confirmLabel = "\uD655\uC778",
4369
+ iconStart: confirmIconStart,
4370
+ iconEnd: confirmIconEnd,
4371
+ disabled: confirmDisabled = false,
4372
+ isLoading: confirmLoading = false,
4373
+ className: confirmClassName
4374
+ } = confirmButtonProps != null ? confirmButtonProps : {};
4335
4375
  const isControlled = openProp !== void 0;
4336
4376
  const [openState, setOpenState] = React18.useState(false);
4337
4377
  const open = isControlled ? openProp : openState;
@@ -4344,7 +4384,7 @@ function Modal({
4344
4384
  },
4345
4385
  [isControlled, onOpenChange]
4346
4386
  );
4347
- const isLoadingCombined = loading || !!isLoading;
4387
+ const isLoadingCombined = loading || confirmLoading;
4348
4388
  const loadingRef = React18.useRef(isLoadingCombined);
4349
4389
  loadingRef.current = isLoadingCombined;
4350
4390
  const handleClose = React18.useCallback(() => {
@@ -4395,7 +4435,7 @@ function Modal({
4395
4435
  {
4396
4436
  id,
4397
4437
  className: cn(
4398
- "bg-background border border-border rounded-2xl shadow-modal flex flex-col gap-4 p-6 w-423 animate-kb-modal-in",
4438
+ "bg-background border border-border rounded-2xl shadow-modal flex flex-col gap-4 p-6 w-120 animate-kb-modal-in",
4399
4439
  className
4400
4440
  ),
4401
4441
  children: [
@@ -4430,7 +4470,11 @@ function Modal({
4430
4470
  {
4431
4471
  variant: "outline",
4432
4472
  onClick: handleClose,
4433
- disabled: isLoadingCombined,
4473
+ disabled: isLoadingCombined || cancelDisabled,
4474
+ loading: cancelLoading,
4475
+ iconStart: withIconSize(cancelIconStart),
4476
+ iconEnd: withIconSize(cancelIconEnd),
4477
+ className: cancelClassName,
4434
4478
  children: cancelLabel
4435
4479
  }
4436
4480
  ),
@@ -4441,6 +4485,9 @@ function Modal({
4441
4485
  onClick: handleConfirm,
4442
4486
  disabled: confirmDisabled,
4443
4487
  loading: isLoadingCombined,
4488
+ iconStart: withIconSize(confirmIconStart),
4489
+ iconEnd: withIconSize(confirmIconEnd),
4490
+ className: confirmClassName,
4444
4491
  children: confirmLabel
4445
4492
  }
4446
4493
  )
@@ -6429,6 +6476,53 @@ function Table({
6429
6476
  ),
6430
6477
  [columns]
6431
6478
  );
6479
+ const usesFlexLayout = React27.useMemo(
6480
+ () => columns.some(
6481
+ (c) => c.width != null || c.minWidth != null || c.grow != null
6482
+ ),
6483
+ [columns]
6484
+ );
6485
+ const scrollRef = React27.useRef(null);
6486
+ const [containerWidth, setContainerWidth] = React27.useState(
6487
+ null
6488
+ );
6489
+ React27.useEffect(() => {
6490
+ if (!usesFlexLayout) return;
6491
+ const el = scrollRef.current;
6492
+ if (!el || typeof ResizeObserver === "undefined") return;
6493
+ const measure = () => setContainerWidth(el.clientWidth);
6494
+ measure();
6495
+ const ro = new ResizeObserver(measure);
6496
+ ro.observe(el);
6497
+ return () => ro.disconnect();
6498
+ }, [usesFlexLayout]);
6499
+ const flexWidths = React27.useMemo(() => {
6500
+ var _a2, _b2;
6501
+ if (!usesFlexLayout) return null;
6502
+ const selectionW = isSelectionActive ? 40 : 0;
6503
+ const actionsW = rowActions ? 48 : 0;
6504
+ const fixedSum = columns.reduce((sum, c) => {
6505
+ var _a3;
6506
+ return sum + ((_a3 = c.width) != null ? _a3 : 0);
6507
+ }, 0);
6508
+ const flexCols = columns.filter((c) => c.width == null);
6509
+ const minSum = flexCols.reduce((sum, c) => {
6510
+ var _a3;
6511
+ return sum + ((_a3 = c.minWidth) != null ? _a3 : 0);
6512
+ }, 0);
6513
+ const growSum = flexCols.reduce((sum, c) => {
6514
+ var _a3;
6515
+ return sum + ((_a3 = c.grow) != null ? _a3 : 1);
6516
+ }, 0) || 1;
6517
+ const avail = (containerWidth != null ? containerWidth : 0) - selectionW - actionsW - fixedSum;
6518
+ const free = Math.max(0, avail - minSum);
6519
+ const byKey = {};
6520
+ for (const c of columns) {
6521
+ byKey[c.key] = c.width != null ? c.width : Math.round(((_a2 = c.minWidth) != null ? _a2 : 0) + free * ((_b2 = c.grow) != null ? _b2 : 1) / growSum);
6522
+ }
6523
+ const total = selectionW + actionsW + columns.reduce((sum, c) => sum + byKey[c.key], 0);
6524
+ return { byKey, total, selectionW, actionsW };
6525
+ }, [usesFlexLayout, columns, containerWidth, isSelectionActive, rowActions]);
6432
6526
  const { pageIndex } = (_c = table.getState().pagination) != null ? _c : { pageIndex: 0 };
6433
6527
  const totalPages = hasPagination ? table.getPageCount() : 1;
6434
6528
  const currentPage = pageIndex + 1;
@@ -6439,156 +6533,169 @@ function Table({
6439
6533
  /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
6440
6534
  "div",
6441
6535
  {
6536
+ ref: scrollRef,
6442
6537
  className: cn("w-full overflow-x-auto", maxHeight && "overflow-y-auto"),
6443
6538
  style: maxHeight ? { maxHeight } : void 0,
6444
- children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("table", { className: "w-full border-collapse", children: [
6445
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("thead", { className: cn(maxHeight && "sticky top-0 z-10 bg-background"), children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("tr", { className: "border-b border-border", children: headerGroup.headers.map((header, headerIdx) => {
6446
- var _a2;
6447
- if (header.id === "__select__") {
6448
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("th", { className: "w-10 p-0 relative", children: isSelectionActive && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
6449
- Checkbox,
6450
- {
6451
- checked: table.getIsAllPageRowsSelected() ? true : table.getIsSomePageRowsSelected() ? "indeterminate" : false,
6452
- onCheckedChange: (checked) => table.toggleAllPageRowsSelected(!!checked),
6453
- "aria-label": "\uC804\uCCB4 \uC120\uD0DD"
6539
+ children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
6540
+ "table",
6541
+ {
6542
+ className: "w-full table-fixed border-collapse",
6543
+ style: flexWidths ? { minWidth: flexWidths.total } : void 0,
6544
+ children: [
6545
+ flexWidths && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("colgroup", { children: [
6546
+ isSelectionActive && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("col", { style: { width: flexWidths.selectionW } }),
6547
+ columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("col", { style: { width: flexWidths.byKey[col.key] } }, col.key)),
6548
+ rowActions && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("col", { style: { width: flexWidths.actionsW } })
6549
+ ] }),
6550
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("thead", { className: cn(maxHeight && "sticky top-0 z-10 bg-background"), children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("tr", { className: "border-b border-border", children: headerGroup.headers.map((header, headerIdx) => {
6551
+ var _a2;
6552
+ if (header.id === "__select__") {
6553
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("th", { className: "w-10 p-0 relative", children: isSelectionActive && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
6554
+ Checkbox,
6555
+ {
6556
+ checked: table.getIsAllPageRowsSelected() ? true : table.getIsSomePageRowsSelected() ? "indeterminate" : false,
6557
+ onCheckedChange: (checked) => table.toggleAllPageRowsSelected(!!checked),
6558
+ "aria-label": "\uC804\uCCB4 \uC120\uD0DD"
6559
+ }
6560
+ ) }) }, header.id);
6454
6561
  }
6455
- ) }) }, header.id);
6456
- }
6457
- if (header.id === "__row_actions__") {
6458
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("th", { className: "w-12 px-2 py-3" }, header.id);
6459
- }
6460
- const { align, headerCls } = (_a2 = colMap[header.id]) != null ? _a2 : {
6461
- align: "left",
6462
- headerCls: ""
6463
- };
6464
- const canSort = header.column.getCanSort();
6465
- const sorted = header.column.getIsSorted();
6466
- const direction = sorted === "asc" ? "ASC" : sorted === "desc" ? "DESC" : null;
6467
- const isFirstDataCol = isSelectionActive ? headerIdx === 1 : headerIdx === 0;
6468
- const showSelectionLabel = isSelectionActive && hasSelection && isFirstDataCol;
6469
- const hideLabel = isSelectionActive && hasSelection && !isFirstDataCol;
6470
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
6471
- "th",
6472
- {
6473
- className: cn(
6474
- "px-2 py-3 text-sm font-medium text-muted-foreground transition-colors",
6475
- align === "center" && "text-center",
6476
- align === "right" && "text-right",
6477
- align === "left" && "text-left",
6478
- canSort && !hideLabel && !showSelectionLabel && "group cursor-pointer select-none hover:font-semibold hover:text-foreground",
6479
- showSelectionLabel && "text-foreground",
6480
- headerCls
6481
- ),
6482
- onClick: showSelectionLabel || hideLabel ? void 0 : header.column.getToggleSortingHandler(),
6483
- children: showSelectionLabel ? `${selectedCount}\uAC1C \uC120\uD0DD\uB428` : hideLabel ? null : /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
6484
- "div",
6562
+ if (header.id === "__row_actions__") {
6563
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("th", { className: "w-12 px-2 py-3" }, header.id);
6564
+ }
6565
+ const { align, headerCls } = (_a2 = colMap[header.id]) != null ? _a2 : {
6566
+ align: "left",
6567
+ headerCls: ""
6568
+ };
6569
+ const canSort = header.column.getCanSort();
6570
+ const sorted = header.column.getIsSorted();
6571
+ const direction = sorted === "asc" ? "ASC" : sorted === "desc" ? "DESC" : null;
6572
+ const isFirstDataCol = isSelectionActive ? headerIdx === 1 : headerIdx === 0;
6573
+ const showSelectionLabel = isSelectionActive && hasSelection && isFirstDataCol;
6574
+ const hideLabel = isSelectionActive && hasSelection && !isFirstDataCol;
6575
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
6576
+ "th",
6485
6577
  {
6486
6578
  className: cn(
6487
- "inline-flex items-center gap-1",
6488
- align === "center" && "justify-center",
6489
- align === "right" && "justify-end"
6579
+ "px-2 py-3 text-sm font-medium text-muted-foreground transition-colors",
6580
+ align === "center" && "text-center",
6581
+ align === "right" && "text-right",
6582
+ align === "left" && "text-left",
6583
+ canSort && !hideLabel && !showSelectionLabel && "group cursor-pointer select-none hover:font-semibold hover:text-foreground",
6584
+ showSelectionLabel && "text-foreground",
6585
+ headerCls
6490
6586
  ),
6491
- children: [
6492
- (0, import_react_table.flexRender)(
6493
- header.column.columnDef.header,
6494
- header.getContext()
6495
- ),
6496
- canSort && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SortIcon, { direction })
6497
- ]
6498
- }
6499
- )
6500
- },
6501
- header.id
6502
- );
6503
- }) }, headerGroup.id)) }),
6504
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("tbody", { children: loading ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("td", { colSpan: colCount, className: "py-16 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
6505
- Icon,
6506
- {
6507
- name: "loader-2",
6508
- className: "mx-auto size-6 animate-spin text-muted-foreground"
6509
- }
6510
- ) }) }) : table.getRowModel().rows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("td", { colSpan: colCount, children: empty === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Empty, { description: "No Data" }) : isEmptyConfig(empty) ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Empty, { description: empty.description }) : empty }) }) : table.getRowModel().rows.map((row) => {
6511
- var _a2;
6512
- const rowDisabled = (_a2 = isRowDisabled == null ? void 0 : isRowDisabled(row.original)) != null ? _a2 : false;
6513
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
6514
- "tr",
6515
- {
6516
- "aria-disabled": rowDisabled || void 0,
6517
- onClick: !isSelectionActive && onRowClick && !rowDisabled ? () => onRowClick(row.original) : void 0,
6518
- className: cn(
6519
- "group border-b border-border transition-colors hover:bg-accent/50 last:border-b-0",
6520
- !isSelectionActive && onRowClick && !rowDisabled && "cursor-pointer",
6521
- isSelectionActive && row.getIsSelected() && "bg-accent/30",
6522
- rowDisabled && "cursor-not-allowed [&_td]:text-muted-foreground"
6523
- ),
6524
- children: row.getVisibleCells().map((cell) => {
6525
- var _a3;
6526
- if (cell.column.id === "__select__") {
6527
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("td", { className: "w-10 p-0 relative", children: isSelectionActive && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "absolute inset-0 flex items-center justify-center", children: (0, import_react_table.flexRender)(
6528
- cell.column.columnDef.cell,
6529
- cell.getContext()
6530
- ) }) }, cell.id);
6531
- }
6532
- if (cell.column.id === "__row_actions__") {
6533
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
6534
- "td",
6587
+ onClick: showSelectionLabel || hideLabel ? void 0 : header.column.getToggleSortingHandler(),
6588
+ children: showSelectionLabel ? `${selectedCount}\uAC1C \uC120\uD0DD\uB428` : hideLabel ? null : /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
6589
+ "div",
6535
6590
  {
6536
- className: "w-12 px-2 py-4 align-middle text-right",
6537
- children: (0, import_react_table.flexRender)(
6591
+ className: cn(
6592
+ "inline-flex items-center gap-1",
6593
+ align === "center" && "justify-center",
6594
+ align === "right" && "justify-end"
6595
+ ),
6596
+ children: [
6597
+ (0, import_react_table.flexRender)(
6598
+ header.column.columnDef.header,
6599
+ header.getContext()
6600
+ ),
6601
+ canSort && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SortIcon, { direction })
6602
+ ]
6603
+ }
6604
+ )
6605
+ },
6606
+ header.id
6607
+ );
6608
+ }) }, headerGroup.id)) }),
6609
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("tbody", { children: loading ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("td", { colSpan: colCount, className: "py-16 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
6610
+ Icon,
6611
+ {
6612
+ name: "loader-2",
6613
+ className: "mx-auto size-6 animate-spin text-muted-foreground"
6614
+ }
6615
+ ) }) }) : table.getRowModel().rows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("td", { colSpan: colCount, children: empty === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Empty, { description: "No Data" }) : isEmptyConfig(empty) ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Empty, { description: empty.description }) : empty }) }) : table.getRowModel().rows.map((row) => {
6616
+ var _a2;
6617
+ const rowDisabled = (_a2 = isRowDisabled == null ? void 0 : isRowDisabled(row.original)) != null ? _a2 : false;
6618
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
6619
+ "tr",
6620
+ {
6621
+ "aria-disabled": rowDisabled || void 0,
6622
+ onClick: !isSelectionActive && onRowClick && !rowDisabled ? () => onRowClick(row.original) : void 0,
6623
+ className: cn(
6624
+ "group border-b border-border transition-colors hover:bg-accent/50 last:border-b-0",
6625
+ !isSelectionActive && onRowClick && !rowDisabled && "cursor-pointer",
6626
+ isSelectionActive && row.getIsSelected() && "bg-accent/30",
6627
+ rowDisabled && "cursor-not-allowed [&_td]:text-muted-foreground"
6628
+ ),
6629
+ children: row.getVisibleCells().map((cell) => {
6630
+ var _a3;
6631
+ if (cell.column.id === "__select__") {
6632
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("td", { className: "w-10 p-0 relative", children: isSelectionActive && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "absolute inset-0 flex items-center justify-center", children: (0, import_react_table.flexRender)(
6538
6633
  cell.column.columnDef.cell,
6539
6634
  cell.getContext()
6540
- )
6541
- },
6542
- cell.id
6543
- );
6544
- }
6545
- const {
6546
- align,
6547
- cellCls,
6548
- ellipsis,
6549
- ellipsisTooltip,
6550
- cellFn
6551
- } = (_a3 = colMap[cell.column.id]) != null ? _a3 : {
6552
- align: "left",
6553
- cellCls: "",
6554
- ellipsis: false,
6555
- ellipsisTooltip: void 0,
6556
- cellFn: () => null
6557
- };
6558
- const rendered = (0, import_react_table.flexRender)(
6559
- cell.column.columnDef.cell,
6560
- cell.getContext()
6561
- );
6562
- const rawContent = ellipsis ? cellFn(row.original) : null;
6563
- const cellContent = ellipsis ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
6564
- EllipsisCell,
6565
- {
6566
- rendered: rawContent,
6567
- tooltip: ellipsisTooltip ? ellipsisTooltip(row.original) : rawContent
6568
- }
6569
- ) : rendered;
6570
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
6571
- "td",
6572
- {
6573
- className: cn(
6574
- "px-2 py-4 text-sm leading-none text-foreground align-middle",
6575
- align === "center" && "text-center",
6576
- align === "right" && "text-right",
6577
- // ellipsis 컬럼은 max-w-0으로 table 레이아웃상 너비를 고정하고
6578
- // overflow-hidden으로 td 밖으로 나가는 콘텐츠를 클리핑
6579
- ellipsis && "max-w-0 overflow-hidden",
6580
- cellCls
6581
- ),
6582
- children: cellContent
6583
- },
6584
- cell.id
6585
- );
6586
- })
6587
- },
6588
- getRowKey(row.original)
6589
- );
6590
- }) })
6591
- ] })
6635
+ ) }) }, cell.id);
6636
+ }
6637
+ if (cell.column.id === "__row_actions__") {
6638
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
6639
+ "td",
6640
+ {
6641
+ className: "w-12 px-2 py-4 align-middle text-right",
6642
+ children: (0, import_react_table.flexRender)(
6643
+ cell.column.columnDef.cell,
6644
+ cell.getContext()
6645
+ )
6646
+ },
6647
+ cell.id
6648
+ );
6649
+ }
6650
+ const {
6651
+ align,
6652
+ cellCls,
6653
+ ellipsis,
6654
+ ellipsisTooltip,
6655
+ cellFn
6656
+ } = (_a3 = colMap[cell.column.id]) != null ? _a3 : {
6657
+ align: "left",
6658
+ cellCls: "",
6659
+ ellipsis: false,
6660
+ ellipsisTooltip: void 0,
6661
+ cellFn: () => null
6662
+ };
6663
+ const rendered = (0, import_react_table.flexRender)(
6664
+ cell.column.columnDef.cell,
6665
+ cell.getContext()
6666
+ );
6667
+ const rawContent = ellipsis ? cellFn(row.original) : null;
6668
+ const cellContent = ellipsis ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
6669
+ EllipsisCell,
6670
+ {
6671
+ rendered: rawContent,
6672
+ tooltip: ellipsisTooltip ? ellipsisTooltip(row.original) : rawContent
6673
+ }
6674
+ ) : rendered;
6675
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
6676
+ "td",
6677
+ {
6678
+ className: cn(
6679
+ "px-2 py-4 text-sm leading-none text-foreground align-middle",
6680
+ align === "center" && "text-center",
6681
+ align === "right" && "text-right",
6682
+ // ellipsis 컬럼은 max-w-0으로 table 레이아웃상 너비를 고정하고
6683
+ // overflow-hidden으로 td 밖으로 나가는 콘텐츠를 클리핑
6684
+ ellipsis && "max-w-0 overflow-hidden",
6685
+ cellCls
6686
+ ),
6687
+ children: cellContent
6688
+ },
6689
+ cell.id
6690
+ );
6691
+ })
6692
+ },
6693
+ getRowKey(row.original)
6694
+ );
6695
+ }) })
6696
+ ]
6697
+ }
6698
+ )
6592
6699
  }
6593
6700
  ),
6594
6701
  !loading && hasPagination && totalPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "pt-4 flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(