sellmate-design-system-react 9.0.0-beta.56 → 9.0.0-beta.57

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.cjs CHANGED
@@ -10,7 +10,7 @@ var reactDom = require('react-dom');
10
10
  var RCheckbox = require('@radix-ui/react-checkbox');
11
11
  var client = require('react-dom/client');
12
12
  var RTooltip = require('@radix-ui/react-tooltip');
13
- var RDropdown2 = require('@radix-ui/react-dropdown-menu');
13
+ var RDropdown3 = require('@radix-ui/react-dropdown-menu');
14
14
  var RSwitch = require('@radix-ui/react-switch');
15
15
  var RDialog = require('@radix-ui/react-dialog');
16
16
  var Ariakit = require('@ariakit/react');
@@ -36,7 +36,7 @@ function _interopNamespace(e) {
36
36
  var RPopover12__namespace = /*#__PURE__*/_interopNamespace(RPopover12);
37
37
  var RCheckbox__namespace = /*#__PURE__*/_interopNamespace(RCheckbox);
38
38
  var RTooltip__namespace = /*#__PURE__*/_interopNamespace(RTooltip);
39
- var RDropdown2__namespace = /*#__PURE__*/_interopNamespace(RDropdown2);
39
+ var RDropdown3__namespace = /*#__PURE__*/_interopNamespace(RDropdown3);
40
40
  var RSwitch__namespace = /*#__PURE__*/_interopNamespace(RSwitch);
41
41
  var RDialog__namespace = /*#__PURE__*/_interopNamespace(RDialog);
42
42
  var Ariakit__namespace = /*#__PURE__*/_interopNamespace(Ariakit);
@@ -4254,7 +4254,8 @@ var TAG_COLORS = [
4254
4254
  "green",
4255
4255
  "blue",
4256
4256
  "darkblue",
4257
- "indigo"
4257
+ "indigo",
4258
+ "purple"
4258
4259
  ];
4259
4260
  var TAG_SIZE_CONFIG = {
4260
4261
  xs: {
@@ -8495,8 +8496,8 @@ var SDropdownButtonImpl = /* @__PURE__ */ react.forwardRef(
8495
8496
  "border-[color:var(--dd-border)] bg-[var(--dd-bg)] text-[color:var(--dd-text)]",
8496
8497
  disabled ? "cursor-not-allowed" : "cursor-pointer hover:bg-[var(--dd-bg-hover)]"
8497
8498
  );
8498
- const menu = /* @__PURE__ */ jsxRuntime.jsx(RDropdown2__namespace.Portal, { container: portalContainer, children: /* @__PURE__ */ jsxRuntime.jsx(
8499
- RDropdown2__namespace.Content,
8499
+ const menu = /* @__PURE__ */ jsxRuntime.jsx(RDropdown3__namespace.Portal, { container: portalContainer, children: /* @__PURE__ */ jsxRuntime.jsx(
8500
+ RDropdown3__namespace.Content,
8500
8501
  {
8501
8502
  sideOffset: 4,
8502
8503
  align: "start",
@@ -8512,7 +8513,7 @@ var SDropdownButtonImpl = /* @__PURE__ */ react.forwardRef(
8512
8513
  ),
8513
8514
  style: split ? { minWidth: clampToAvailableWidth(splitWidth, DROPDOWN_AVAILABLE_WIDTH) } : void 0,
8514
8515
  children: items.map((it) => /* @__PURE__ */ jsxRuntime.jsxs(
8515
- RDropdown2__namespace.Item,
8516
+ RDropdown3__namespace.Item,
8516
8517
  {
8517
8518
  disabled: it.disabled,
8518
8519
  onSelect: () => onItemClick?.(it.value),
@@ -8533,7 +8534,7 @@ var SDropdownButtonImpl = /* @__PURE__ */ react.forwardRef(
8533
8534
  }
8534
8535
  ) });
8535
8536
  return /* @__PURE__ */ jsxRuntime.jsxs(
8536
- RDropdown2__namespace.Root,
8537
+ RDropdown3__namespace.Root,
8537
8538
  {
8538
8539
  modal: !insideModal,
8539
8540
  open,
@@ -8565,7 +8566,7 @@ var SDropdownButtonImpl = /* @__PURE__ */ react.forwardRef(
8565
8566
  children: label
8566
8567
  }
8567
8568
  ),
8568
- /* @__PURE__ */ jsxRuntime.jsx(RDropdown2__namespace.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
8569
+ /* @__PURE__ */ jsxRuntime.jsx(RDropdown3__namespace.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
8569
8570
  "button",
8570
8571
  {
8571
8572
  ref: splitToggleRef,
@@ -8584,7 +8585,7 @@ var SDropdownButtonImpl = /* @__PURE__ */ react.forwardRef(
8584
8585
  ) })
8585
8586
  ]
8586
8587
  }
8587
- ) : /* @__PURE__ */ jsxRuntime.jsx(RDropdown2__namespace.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
8588
+ ) : /* @__PURE__ */ jsxRuntime.jsx(RDropdown3__namespace.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
8588
8589
  "button",
8589
8590
  {
8590
8591
  type: "button",
@@ -13585,10 +13586,9 @@ function todayStr() {
13585
13586
  function formatDate(year, month, day) {
13586
13587
  return `${year}-${String(month).padStart(2, "0")}-${String(day).padStart(2, "0")}`;
13587
13588
  }
13588
- function calcYearMonth(year, month, dir) {
13589
- if (dir === "prev")
13590
- return month === 1 ? { year: year - 1, month: 12 } : { year, month: month - 1 };
13591
- return month === 12 ? { year: year + 1, month: 1 } : { year, month: month + 1 };
13589
+ function calcYearMonth(year, month, dir, step = 1) {
13590
+ const index = year * 12 + (month - 1) + (dir === "prev" ? -step : step);
13591
+ return { year: Math.floor(index / 12), month: index % 12 + 1 };
13592
13592
  }
13593
13593
  function monthCells(year, month) {
13594
13594
  const firstDayIndex = new Date(year, month - 1, 1).getDay();
@@ -15429,6 +15429,22 @@ var cellValue = (col, row) => {
15429
15429
  return col.format ? col.format(raw, row) : raw;
15430
15430
  };
15431
15431
  var DEFAULT_COLUMN_WIDTH = 120;
15432
+ var LOCKED_BG = "var(--cmp-table-body-disabled-bg)";
15433
+ var LOCKED_CONTENT = "var(--cmp-table-body-disabled-content)";
15434
+ var DRAG_BG = "var(--cmp-table-dragSelectable-bg-color)";
15435
+ var DRAG_EDGE_W = "var(--cmp-table-dragSelectable-border-width)";
15436
+ var DRAG_EDGE_NEG_W = `calc(-1 * ${DRAG_EDGE_W})`;
15437
+ var DRAG_EDGE_C = "var(--cmp-table-dragSelectable-border-color)";
15438
+ var CONTEXT_MENU_VIEWPORT_PADDING = 12;
15439
+ var CONTEXT_MENU_CURSOR_GAP = 2;
15440
+ var CONTEXT_MENU_ARM_FALLBACK_MS = 500;
15441
+ var CONTEXT_MENU_ITEM_CLASS = cn(
15442
+ "flex min-h-[28px] cursor-pointer select-none items-center gap-[8px] rounded-[2px] px-[12px] py-[4px] text-[12px] leading-[20px] outline-none",
15443
+ "text-[color:var(--sys-color-fg-secondary)]",
15444
+ "data-[disabled]:cursor-not-allowed data-[disabled]:text-[color:var(--cmp-button-text-disabled)]",
15445
+ "data-[highlighted]:bg-[var(--sys-color-bg-accent)] data-[highlighted]:text-[color:var(--sys-color-fg-inverse)]"
15446
+ );
15447
+ var ROW_INTERACTIVE_SELECTOR = 'button, a, input, select, textarea, label, [role="button"], [role="checkbox"], [contenteditable="true"]';
15432
15448
  var colWidthFromDef = (c) => {
15433
15449
  if (c.autoWidth) return 0;
15434
15450
  if (c.width == null) return DEFAULT_COLUMN_WIDTH;
@@ -15441,6 +15457,9 @@ var STable = /* @__PURE__ */ react.forwardRef(function STable2({
15441
15457
  rows = [],
15442
15458
  rowKey = "id",
15443
15459
  selectable = false,
15460
+ dragSelectable = false,
15461
+ contextMenuItems,
15462
+ onContextMenuItemClick,
15444
15463
  isRowSelectable,
15445
15464
  selected = [],
15446
15465
  onSelectedChange,
@@ -15556,6 +15575,10 @@ var STable = /* @__PURE__ */ react.forwardRef(function STable2({
15556
15575
  (row) => isRowSelectable ? isRowSelectable(row) : true,
15557
15576
  [isRowSelectable]
15558
15577
  );
15578
+ const dragSelectOn = dragSelectable && !selectable;
15579
+ const portalContainer = usePortalContainer();
15580
+ const [dragPreviewKeys, setDragPreviewKeys] = react.useState(null);
15581
+ const dragRef = react.useRef(null);
15559
15582
  const getIsAllChecked = react.useCallback(
15560
15583
  (rws) => {
15561
15584
  const targets = rws.filter(canSelectRow);
@@ -15897,6 +15920,76 @@ var STable = /* @__PURE__ */ react.forwardRef(function STable2({
15897
15920
  onSelectedChange?.(selected.filter((r) => r[rowKey] !== row[rowKey]));
15898
15921
  else onSelectedChange?.([...selected, row]);
15899
15922
  };
15923
+ const isViewSelected = (row) => row != null && (dragPreviewKeys ?? selectedKeys).has(row[rowKey]);
15924
+ const dragRangeRows = (from, to) => {
15925
+ const [a, b] = from <= to ? [from, to] : [to, from];
15926
+ return rows.slice(a, b + 1).filter(canSelectRow);
15927
+ };
15928
+ const dragPreviewOf = (base, anchor, to) => /* @__PURE__ */ new Set([...base, ...dragRangeRows(anchor, to).map((r) => r[rowKey])]);
15929
+ const startDragSelect = (index, event) => {
15930
+ if (event.button !== 0) return;
15931
+ const target = event.target;
15932
+ if (target?.closest?.(ROW_INTERACTIVE_SELECTOR)) return;
15933
+ event.preventDefault();
15934
+ const baseRows = event.ctrlKey || event.metaKey ? selected : [];
15935
+ const baseKeys = new Set(baseRows.map((r) => r[rowKey]));
15936
+ dragRef.current = { anchor: index, last: index, baseKeys, baseRows };
15937
+ setDragPreviewKeys(dragPreviewOf(baseKeys, index, index));
15938
+ };
15939
+ const extendDragSelect = (index) => {
15940
+ const d = dragRef.current;
15941
+ if (!d || d.last === index) return;
15942
+ d.last = index;
15943
+ setDragPreviewKeys(dragPreviewOf(d.baseKeys, d.anchor, index));
15944
+ };
15945
+ const finishDragSelectRef = react.useRef(() => {
15946
+ });
15947
+ finishDragSelectRef.current = () => {
15948
+ const d = dragRef.current;
15949
+ if (!d) return;
15950
+ dragRef.current = null;
15951
+ setDragPreviewKeys(null);
15952
+ const add = dragRangeRows(d.anchor, d.last).filter((r) => !d.baseKeys.has(r[rowKey]));
15953
+ onSelectedChange?.([...d.baseRows, ...add]);
15954
+ };
15955
+ react.useEffect(() => {
15956
+ if (!dragSelectOn) return;
15957
+ const onUp = () => finishDragSelectRef.current();
15958
+ window.addEventListener("mouseup", onUp);
15959
+ return () => {
15960
+ window.removeEventListener("mouseup", onUp);
15961
+ dragRef.current = null;
15962
+ };
15963
+ }, [dragSelectOn]);
15964
+ const contextMenuOn = dragSelectOn && (contextMenuItems?.length ?? 0) > 0;
15965
+ const [contextMenu, setContextMenu] = react.useState(null);
15966
+ const contextMenuOpen = contextMenu?.open === true;
15967
+ const [contextMenuArmed, setContextMenuArmed] = react.useState(false);
15968
+ react.useEffect(() => {
15969
+ if (!contextMenuOpen || contextMenuArmed) return;
15970
+ const arm = () => setContextMenuArmed(true);
15971
+ window.addEventListener("pointerup", arm, { once: true, capture: true });
15972
+ const timer = window.setTimeout(arm, CONTEXT_MENU_ARM_FALLBACK_MS);
15973
+ return () => {
15974
+ window.removeEventListener("pointerup", arm, { capture: true });
15975
+ window.clearTimeout(timer);
15976
+ };
15977
+ }, [contextMenuOpen, contextMenuArmed]);
15978
+ react.useEffect(() => {
15979
+ if (!contextMenuOpen) return;
15980
+ const close = () => setContextMenu((m) => m == null ? null : { ...m, open: false });
15981
+ window.addEventListener("scroll", close, { capture: true, passive: true });
15982
+ return () => window.removeEventListener("scroll", close, { capture: true });
15983
+ }, [contextMenuOpen]);
15984
+ const openContextMenu = (row, event) => {
15985
+ if (!canSelectRow(row)) return;
15986
+ event.preventDefault();
15987
+ const alreadySelected = selectedKeys.has(row[rowKey]);
15988
+ const rows2 = alreadySelected ? selected : [row];
15989
+ if (!alreadySelected) onSelectedChange?.(rows2);
15990
+ setContextMenuArmed(false);
15991
+ setContextMenu({ x: event.clientX, y: event.clientY, rows: rows2, open: true });
15992
+ };
15900
15993
  const radiusClass = radius === "full" ? "rounded-none" : radius === "useTop" ? "rounded-b-[var(--cmp-table-radius)] rounded-t-none" : "rounded-[var(--cmp-table-radius)]";
15901
15994
  const cellPadY = innerDense ? "var(--cmp-table-body-paddingY-dense)" : "var(--cmp-table-body-paddingY-default)";
15902
15995
  const cellPadXOf = (col) => col.contentType === "control" ? "var(--cmp-table-body-paddingX-default)" : "var(--cmp-table-body-paddingX-wide)";
@@ -15919,14 +16012,13 @@ var STable = /* @__PURE__ */ react.forwardRef(function STable2({
15919
16012
  zIndex: 6
15920
16013
  };
15921
16014
  };
15922
- const stickyShadowClass = (i) => {
16015
+ const stickyShadowValue = (i) => {
15923
16016
  const { isLeft, isRight } = stickyInfo(i);
15924
16017
  const isLeftEdge = isLeft && i === stickyLeft - 1;
15925
16018
  const isRightEdge = isRight && i === visibleCols.length - stickyRight;
15926
- return cn(
15927
- isLeftEdge && scrolledLeft && "shadow-[5px_0_8px_0_rgba(34,34,34,0.1)]",
15928
- isRightEdge && scrolledRight && "shadow-[-5px_0_8px_0_rgba(34,34,34,0.1)]"
15929
- );
16019
+ if (isLeftEdge && scrolledLeft) return "5px 0 8px 0 rgba(34,34,34,0.1)";
16020
+ if (isRightEdge && scrolledRight) return "-5px 0 8px 0 rgba(34,34,34,0.1)";
16021
+ return null;
15930
16022
  };
15931
16023
  const headerResizeHitArea = (i, key) => {
15932
16024
  const col = visibleCols[i];
@@ -16120,10 +16212,14 @@ var STable = /* @__PURE__ */ react.forwardRef(function STable2({
16120
16212
  headerGroupInfo && i === visibleCols.length - 1 && "border-r-0",
16121
16213
  "relative bg-[var(--cmp-table-header-bg)] px-[16px] text-[12px] font-medium leading-[0] text-[color:var(--sys-color-fg-primary)]",
16122
16214
  stickyInfo(i).isSticky && "z-[6]",
16123
- stickyShadowClass(i),
16124
16215
  col.thClass
16125
16216
  ),
16126
- style: { textAlign: col.align ?? "left", ...cellStyle(i), ...col.thStyle },
16217
+ style: {
16218
+ textAlign: col.align ?? "left",
16219
+ boxShadow: stickyShadowValue(i) ?? void 0,
16220
+ ...cellStyle(i),
16221
+ ...col.thStyle
16222
+ },
16127
16223
  "aria-sort": isSortable ? sortDir === "asc" ? "ascending" : sortDir === "desc" ? "descending" : "none" : void 0,
16128
16224
  children: [
16129
16225
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -16235,17 +16331,27 @@ var STable = /* @__PURE__ */ react.forwardRef(function STable2({
16235
16331
  /* @__PURE__ */ jsxRuntime.jsxs("tbody", { children: [
16236
16332
  virtualScroll && topSpacer > 0 && /* @__PURE__ */ jsxRuntime.jsx("tr", { "aria-hidden": true, style: { height: topSpacer }, children: /* @__PURE__ */ jsxRuntime.jsx("td", { colSpan: totalColSpan, className: "p-0" }) }),
16237
16333
  rowCount === 0 ? null : bodyRows.map((row, ri) => {
16238
- const isSel = selectedKeys.has(row[rowKey]);
16334
+ const rowIndex = rowOffset + ri;
16335
+ const isSel = isViewSelected(row);
16336
+ const dragSel = dragSelectOn && isSel;
16337
+ const dragTop = dragSel && !isViewSelected(rows[rowIndex - 1]);
16338
+ const dragBottom = dragSel && !isViewSelected(rows[rowIndex + 1]);
16339
+ const rowLocked = (selectable || dragSelectable) && !canSelectRow(row);
16239
16340
  const rowBg = "bg-white";
16341
+ const rowHover = hoverable && !rowLocked;
16240
16342
  return /* @__PURE__ */ jsxRuntime.jsxs(
16241
16343
  "tr",
16242
16344
  {
16243
- "data-row-index": rowOffset + ri,
16345
+ "data-row-index": rowIndex,
16244
16346
  onClick: () => onRowClick?.(row),
16347
+ onMouseDown: dragSelectOn ? (event) => startDragSelect(rowIndex, event) : void 0,
16348
+ onMouseEnter: dragSelectOn ? () => extendDragSelect(rowIndex) : void 0,
16349
+ onContextMenu: contextMenuOn ? (event) => openContextMenu(row, event) : void 0,
16245
16350
  className: cn(
16246
16351
  "group/table-row",
16247
- hoverable && "hover:bg-[var(--color-grey-05)]",
16248
- onRowClick && "cursor-pointer"
16352
+ rowHover && "hover:bg-[var(--color-grey-05)]",
16353
+ onRowClick && "cursor-pointer",
16354
+ dragSelectOn && "select-none"
16249
16355
  ),
16250
16356
  style: { height: virtualScroll ? effectiveRowHeight : rowH },
16251
16357
  children: [
@@ -16256,13 +16362,15 @@ var STable = /* @__PURE__ */ react.forwardRef(function STable2({
16256
16362
  // 원본 .td--selected: 48px 고정폭, 항상 left sticky, 체크박스 중앙정렬
16257
16363
  "sticky left-0 z-[2] border-b border-solid border-[color:var(--cmp-table-border-color)] align-middle",
16258
16364
  rowBg,
16259
- hoverable && "group-hover/table-row:bg-[var(--color-grey-05)]",
16365
+ rowHover && "group-hover/table-row:bg-[var(--color-grey-05)]",
16260
16366
  stickyLeft === 0 && scrolledLeft && "shadow-[5px_0_8px_0_rgba(34,34,34,0.1)]"
16261
16367
  ),
16262
16368
  style: {
16263
16369
  width: SELECTABLE_COLUMN_WIDTH,
16264
16370
  minWidth: SELECTABLE_COLUMN_WIDTH,
16265
- maxWidth: SELECTABLE_COLUMN_WIDTH
16371
+ maxWidth: SELECTABLE_COLUMN_WIDTH,
16372
+ // 선택 열도 행의 일부다 — 여기만 희지 않으면 회색 줄이 끊긴다
16373
+ background: rowLocked ? LOCKED_BG : void 0
16266
16374
  },
16267
16375
  onClick: (e) => e.stopPropagation(),
16268
16376
  onClickCapture: (e) => {
@@ -16285,17 +16393,29 @@ var STable = /* @__PURE__ */ react.forwardRef(function STable2({
16285
16393
  // 셀 배경은 흰색으로 채워 뒤 배경이 비치지 않게 하고, hover 시 행 배경(grey_05)을 따른다.
16286
16394
  "overflow-hidden text-ellipsis whitespace-nowrap border-b border-solid border-[color:var(--cmp-table-border-color)] text-[12px] leading-[20px] text-[color:var(--sys-color-fg-primary)]",
16287
16395
  rowBg,
16288
- hoverable && "group-hover/table-row:bg-[var(--color-grey-05)]",
16289
- stickyShadowClass(i),
16396
+ rowHover && "group-hover/table-row:bg-[var(--color-grey-05)]",
16290
16397
  typeof col.tdClass === "function" ? col.tdClass(row) : col.tdClass
16291
16398
  );
16292
16399
  const tdPadX = cellPadXOf(col);
16400
+ const dragEdges = dragSel ? [
16401
+ dragTop && `inset 0 ${DRAG_EDGE_W} 0 0 ${DRAG_EDGE_C}`,
16402
+ dragBottom && `inset 0 ${DRAG_EDGE_NEG_W} 0 0 ${DRAG_EDGE_C}`,
16403
+ i === 0 && `inset ${DRAG_EDGE_W} 0 0 0 ${DRAG_EDGE_C}`,
16404
+ i === visibleCols.length - 1 && `inset ${DRAG_EDGE_NEG_W} 0 0 0 ${DRAG_EDGE_C}`
16405
+ ].filter(Boolean) : [];
16406
+ const shadows = [...dragEdges, stickyShadowValue(i)].filter(Boolean);
16293
16407
  const tdStyle = {
16294
16408
  paddingLeft: tdPadX,
16295
16409
  paddingRight: tdPadX,
16296
16410
  paddingTop: cellPadY,
16297
16411
  paddingBottom: cellPadY,
16298
16412
  textAlign: col.align ?? "left",
16413
+ // 인라인이라 hover 배경보다 세다 — 고른 행은 hover 로 흐려지지 않는다.
16414
+ background: dragSel ? DRAG_BG : rowLocked ? LOCKED_BG : void 0,
16415
+ // 클래스의 기본 글자색을 덮는다. 셀이 자기 색을 정한 내용(SIcon 의
16416
+ // color, STag 등)까지는 닿지 않는다 — 그건 소비 앱 몫이다.
16417
+ color: rowLocked ? LOCKED_CONTENT : void 0,
16418
+ boxShadow: shadows.length > 0 ? shadows.join(", ") : void 0,
16299
16419
  ...cellStyle(i)
16300
16420
  };
16301
16421
  if (col.renderCell) {
@@ -16383,6 +16503,59 @@ var STable = /* @__PURE__ */ react.forwardRef(function STable2({
16383
16503
  ] })
16384
16504
  ]
16385
16505
  }
16506
+ ),
16507
+ contextMenuOn && typeof document !== "undefined" && reactDom.createPortal(
16508
+ /* @__PURE__ */ jsxRuntime.jsxs(
16509
+ RDropdown3__namespace.Root,
16510
+ {
16511
+ modal: false,
16512
+ open: contextMenuOpen,
16513
+ onOpenChange: (open) => {
16514
+ if (!open) setContextMenu((m) => m == null ? null : { ...m, open: false });
16515
+ },
16516
+ children: [
16517
+ /* @__PURE__ */ jsxRuntime.jsx(RDropdown3__namespace.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
16518
+ "span",
16519
+ {
16520
+ "aria-hidden": true,
16521
+ className: "pointer-events-none fixed block h-0 w-0",
16522
+ style: { left: contextMenu?.x ?? 0, top: contextMenu?.y ?? 0 }
16523
+ }
16524
+ ) }),
16525
+ /* @__PURE__ */ jsxRuntime.jsx(
16526
+ RDropdown3__namespace.Content,
16527
+ {
16528
+ align: "start",
16529
+ side: "bottom",
16530
+ sideOffset: CONTEXT_MENU_CURSOR_GAP,
16531
+ alignOffset: CONTEXT_MENU_CURSOR_GAP,
16532
+ collisionPadding: CONTEXT_MENU_VIEWPORT_PADDING,
16533
+ style: contextMenuArmed ? void 0 : { pointerEvents: "none" },
16534
+ className: cn(
16535
+ "z-50 overflow-hidden rounded-[var(--cmp-listBox-radius)] bg-[var(--cmp-listBox-bg)] shadow-normal-sm",
16536
+ "max-w-[var(--radix-dropdown-menu-content-available-width)]",
16537
+ FLOATING_SLIDE_ANIM
16538
+ ),
16539
+ children: contextMenuItems?.map((item4) => /* @__PURE__ */ jsxRuntime.jsxs(
16540
+ RDropdown3__namespace.Item,
16541
+ {
16542
+ disabled: item4.disabled,
16543
+ onSelect: () => onContextMenuItemClick?.(item4.value, contextMenu?.rows ?? []),
16544
+ className: CONTEXT_MENU_ITEM_CLASS,
16545
+ children: [
16546
+ item4.icon && /* @__PURE__ */ jsxRuntime.jsx(SIcon, { name: item4.icon, size: 12 }),
16547
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 break-words", children: item4.label })
16548
+ ]
16549
+ },
16550
+ item4.value
16551
+ ))
16552
+ }
16553
+ )
16554
+ ]
16555
+ },
16556
+ contextMenu == null ? "closed" : `${contextMenu.x},${contextMenu.y}`
16557
+ ),
16558
+ portalContainer ?? document.body
16386
16559
  )
16387
16560
  ]
16388
16561
  }
@@ -17901,11 +18074,11 @@ function RangeCalendar({
17901
18074
  const goPrevYear = () => setBase(y - 1, m);
17902
18075
  const goNextYear = () => setBase(y + 1, m);
17903
18076
  const goPrevMonth = () => {
17904
- const n = calcYearMonth(y, m, "prev");
18077
+ const n = calcYearMonth(y, m, "prev", 2);
17905
18078
  setBase(n.year, n.month);
17906
18079
  };
17907
18080
  const goNextMonth = () => {
17908
- const n = calcYearMonth(y, m, "next");
18081
+ const n = calcYearMonth(y, m, "next", 2);
17909
18082
  setBase(n.year, n.month);
17910
18083
  };
17911
18084
  const goToday = () => {
@@ -19250,20 +19423,24 @@ function ChartTooltip({
19250
19423
  },
19251
19424
  children: [
19252
19425
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "typo-body-md-bold text-(--cmp-chart-chartTooltip-title-color)", children: title }),
19253
- items.map((item4, index) => (
19254
- // TODO: 토큰 생성되면 gap 을 `--cmp-chart-chartTooltipItem-gap` 으로 교체
19255
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-sd-8", children: [
19256
- /* @__PURE__ */ jsxRuntime.jsx(
19257
- "span",
19258
- {
19259
- "aria-hidden": true,
19260
- className: "shrink-0 rounded-full",
19261
- style: { width: DOT_SIZE2, height: DOT_SIZE2, background: item4.color }
19262
- }
19263
- ),
19264
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "typo-body-sm-default text-(--sys-color-fg-primary)", children: item4.label }),
19265
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "typo-body-sm-bold ml-auto text-(--sys-color-fg-primary)", children: item4.value })
19266
- ] }, `${item4.label}-${index}`)
19426
+ items.map((item4, index) => /* @__PURE__ */ jsxRuntime.jsxs(
19427
+ "span",
19428
+ {
19429
+ className: "flex items-center gap-(--cmp-chart-chartTooltipItem-gap)",
19430
+ children: [
19431
+ /* @__PURE__ */ jsxRuntime.jsx(
19432
+ "span",
19433
+ {
19434
+ "aria-hidden": true,
19435
+ className: "shrink-0 rounded-full",
19436
+ style: { width: DOT_SIZE2, height: DOT_SIZE2, background: item4.color }
19437
+ }
19438
+ ),
19439
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "typo-body-sm-default text-(--cmp-chart-chartTooltipItem-label-color)", children: item4.label }),
19440
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "typo-body-sm-bold ml-auto text-(--cmp-chart-chartTooltipItem-dataValue-color)", children: item4.value })
19441
+ ]
19442
+ },
19443
+ `${item4.label}-${index}`
19267
19444
  ))
19268
19445
  ]
19269
19446
  }
@@ -21117,7 +21294,7 @@ var PaletteItem = ({
21117
21294
  className,
21118
21295
  onSelect,
21119
21296
  children
21120
- }) => asMenu ? /* @__PURE__ */ jsxRuntime.jsx(RDropdown2__namespace.Item, { title: label, "aria-label": label, className, onSelect, children }) : /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", title: label, "aria-label": label, className, onClick: onSelect, children });
21297
+ }) => asMenu ? /* @__PURE__ */ jsxRuntime.jsx(RDropdown3__namespace.Item, { title: label, "aria-label": label, className, onSelect, children }) : /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", title: label, "aria-label": label, className, onClick: onSelect, children });
21121
21298
  var ColorPalette = ({
21122
21299
  colors,
21123
21300
  columns,
@@ -21249,7 +21426,7 @@ var TableMenuItem = ({
21249
21426
  disabled,
21250
21427
  onSelect
21251
21428
  }) => /* @__PURE__ */ jsxRuntime.jsx(
21252
- RDropdown2__namespace.Item,
21429
+ RDropdown3__namespace.Item,
21253
21430
  {
21254
21431
  className: cn(menuItemClass, menuItemDisabledClass),
21255
21432
  disabled,
@@ -21416,8 +21593,8 @@ function EditorToolbarBar({
21416
21593
  const node = (item4) => {
21417
21594
  switch (item4) {
21418
21595
  case "heading":
21419
- return /* @__PURE__ */ jsxRuntime.jsxs(RDropdown2__namespace.Root, { modal: !insideModal, children: [
21420
- /* @__PURE__ */ jsxRuntime.jsx(RDropdown2__namespace.Trigger, { asChild: true, disabled: off, children: /* @__PURE__ */ jsxRuntime.jsxs(
21596
+ return /* @__PURE__ */ jsxRuntime.jsxs(RDropdown3__namespace.Root, { modal: !insideModal, children: [
21597
+ /* @__PURE__ */ jsxRuntime.jsx(RDropdown3__namespace.Trigger, { asChild: true, disabled: off, children: /* @__PURE__ */ jsxRuntime.jsxs(
21421
21598
  ToolbarButton,
21422
21599
  {
21423
21600
  label: "\uC81C\uBAA9 \uB2E8\uACC4",
@@ -21430,9 +21607,9 @@ function EditorToolbarBar({
21430
21607
  ]
21431
21608
  }
21432
21609
  ) }),
21433
- /* @__PURE__ */ jsxRuntime.jsx(RDropdown2__namespace.Portal, { container: portalContainer, children: /* @__PURE__ */ jsxRuntime.jsxs(RDropdown2__namespace.Content, { sideOffset: 4, align: "start", className: menuClass, children: [
21610
+ /* @__PURE__ */ jsxRuntime.jsx(RDropdown3__namespace.Portal, { container: portalContainer, children: /* @__PURE__ */ jsxRuntime.jsxs(RDropdown3__namespace.Content, { sideOffset: 4, align: "start", className: menuClass, children: [
21434
21611
  /* @__PURE__ */ jsxRuntime.jsx(
21435
- RDropdown2__namespace.Item,
21612
+ RDropdown3__namespace.Item,
21436
21613
  {
21437
21614
  className: menuItemClass,
21438
21615
  onSelect: () => chain()?.setParagraph().run(),
@@ -21440,7 +21617,7 @@ function EditorToolbarBar({
21440
21617
  }
21441
21618
  ),
21442
21619
  SEDITOR_HEADING_LEVELS.map((level) => /* @__PURE__ */ jsxRuntime.jsx(
21443
- RDropdown2__namespace.Item,
21620
+ RDropdown3__namespace.Item,
21444
21621
  {
21445
21622
  className: menuItemClass,
21446
21623
  onSelect: () => chain()?.setHeading({ level }).run(),
@@ -21451,13 +21628,13 @@ function EditorToolbarBar({
21451
21628
  ] }) })
21452
21629
  ] }, item4);
21453
21630
  case "fontSize":
21454
- return /* @__PURE__ */ jsxRuntime.jsxs(RDropdown2__namespace.Root, { modal: !insideModal, children: [
21455
- /* @__PURE__ */ jsxRuntime.jsx(RDropdown2__namespace.Trigger, { asChild: true, disabled: off, children: /* @__PURE__ */ jsxRuntime.jsxs(ToolbarButton, { label: "\uAE00\uC790 \uD06C\uAE30", disabled: off, className: "px-[6px]", children: [
21631
+ return /* @__PURE__ */ jsxRuntime.jsxs(RDropdown3__namespace.Root, { modal: !insideModal, children: [
21632
+ /* @__PURE__ */ jsxRuntime.jsx(RDropdown3__namespace.Trigger, { asChild: true, disabled: off, children: /* @__PURE__ */ jsxRuntime.jsxs(ToolbarButton, { label: "\uAE00\uC790 \uD06C\uAE30", disabled: off, className: "px-[6px]", children: [
21456
21633
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[12px] leading-[20px]", children: activeFontSize ?? FONT_SIZE_DEFAULT_LABEL }),
21457
21634
  /* @__PURE__ */ jsxRuntime.jsx(SIcon, { name: "caretDown", size: 12 })
21458
21635
  ] }) }),
21459
- /* @__PURE__ */ jsxRuntime.jsx(RDropdown2__namespace.Portal, { container: portalContainer, children: /* @__PURE__ */ jsxRuntime.jsxs(
21460
- RDropdown2__namespace.Content,
21636
+ /* @__PURE__ */ jsxRuntime.jsx(RDropdown3__namespace.Portal, { container: portalContainer, children: /* @__PURE__ */ jsxRuntime.jsxs(
21637
+ RDropdown3__namespace.Content,
21461
21638
  {
21462
21639
  sideOffset: 4,
21463
21640
  align: "start",
@@ -21465,7 +21642,7 @@ function EditorToolbarBar({
21465
21642
  style: { maxHeight: FONT_SIZE_MENU_MAX_HEIGHT },
21466
21643
  children: [
21467
21644
  /* @__PURE__ */ jsxRuntime.jsx(
21468
- RDropdown2__namespace.Item,
21645
+ RDropdown3__namespace.Item,
21469
21646
  {
21470
21647
  className: cn(menuItemClass, activeFontSize === null && menuItemSelectedClass),
21471
21648
  title: `${FONT_SIZE_DEFAULT_LABEL} (\uBCF8\uBB38 ${SEDITOR_DEFAULT_FONT_SIZE}px)`,
@@ -21474,7 +21651,7 @@ function EditorToolbarBar({
21474
21651
  }
21475
21652
  ),
21476
21653
  SEDITOR_FONT_SIZES.map((size) => /* @__PURE__ */ jsxRuntime.jsx(
21477
- RDropdown2__namespace.Item,
21654
+ RDropdown3__namespace.Item,
21478
21655
  {
21479
21656
  ref: activeFontSize === size ? (el) => {
21480
21657
  el?.scrollIntoView({ block: "nearest" });
@@ -21566,9 +21743,9 @@ function EditorToolbarBar({
21566
21743
  },
21567
21744
  item4
21568
21745
  );
21569
- return /* @__PURE__ */ jsxRuntime.jsxs(RDropdown2__namespace.Root, { modal: !insideModal, children: [
21570
- /* @__PURE__ */ jsxRuntime.jsx(RDropdown2__namespace.Trigger, { asChild: true, disabled: off, children: /* @__PURE__ */ jsxRuntime.jsx(ToolbarButton, { label: "\uAE00\uC790\uC0C9", disabled: off, children: /* @__PURE__ */ jsxRuntime.jsx(ColorIndicator, { color: off ? "currentColor" : activeColor, children: /* @__PURE__ */ jsxRuntime.jsx(IconTextColor, { size: ICON_SIZE }) }) }) }),
21571
- /* @__PURE__ */ jsxRuntime.jsx(RDropdown2__namespace.Portal, { container: portalContainer, children: /* @__PURE__ */ jsxRuntime.jsx(RDropdown2__namespace.Content, { sideOffset: 4, align: "start", className: menuClass, children: /* @__PURE__ */ jsxRuntime.jsx(
21746
+ return /* @__PURE__ */ jsxRuntime.jsxs(RDropdown3__namespace.Root, { modal: !insideModal, children: [
21747
+ /* @__PURE__ */ jsxRuntime.jsx(RDropdown3__namespace.Trigger, { asChild: true, disabled: off, children: /* @__PURE__ */ jsxRuntime.jsx(ToolbarButton, { label: "\uAE00\uC790\uC0C9", disabled: off, children: /* @__PURE__ */ jsxRuntime.jsx(ColorIndicator, { color: off ? "currentColor" : activeColor, children: /* @__PURE__ */ jsxRuntime.jsx(IconTextColor, { size: ICON_SIZE }) }) }) }),
21748
+ /* @__PURE__ */ jsxRuntime.jsx(RDropdown3__namespace.Portal, { container: portalContainer, children: /* @__PURE__ */ jsxRuntime.jsx(RDropdown3__namespace.Content, { sideOffset: 4, align: "start", className: menuClass, children: /* @__PURE__ */ jsxRuntime.jsx(
21572
21749
  ColorPalette,
21573
21750
  {
21574
21751
  asMenu: true,
@@ -21674,14 +21851,14 @@ function EditorToolbarBar({
21674
21851
  case "list": {
21675
21852
  const ListIcon = state2.orderedList ? IconOrderedList : state2.taskList ? IconTaskList : IconBulletList;
21676
21853
  const listActive = state2.bulletList || state2.orderedList || state2.taskList;
21677
- return /* @__PURE__ */ jsxRuntime.jsxs(RDropdown2__namespace.Root, { modal: !insideModal, children: [
21678
- /* @__PURE__ */ jsxRuntime.jsx(RDropdown2__namespace.Trigger, { asChild: true, disabled: off, children: /* @__PURE__ */ jsxRuntime.jsxs(ToolbarButton, { label: "\uBAA9\uB85D", active: listActive, disabled: off, className: "px-[4px]", children: [
21854
+ return /* @__PURE__ */ jsxRuntime.jsxs(RDropdown3__namespace.Root, { modal: !insideModal, children: [
21855
+ /* @__PURE__ */ jsxRuntime.jsx(RDropdown3__namespace.Trigger, { asChild: true, disabled: off, children: /* @__PURE__ */ jsxRuntime.jsxs(ToolbarButton, { label: "\uBAA9\uB85D", active: listActive, disabled: off, className: "px-[4px]", children: [
21679
21856
  /* @__PURE__ */ jsxRuntime.jsx(ListIcon, { size: ICON_SIZE }),
21680
21857
  /* @__PURE__ */ jsxRuntime.jsx(SIcon, { name: "caretDown", size: CARET_SIZE })
21681
21858
  ] }) }),
21682
- /* @__PURE__ */ jsxRuntime.jsx(RDropdown2__namespace.Portal, { container: portalContainer, children: /* @__PURE__ */ jsxRuntime.jsxs(RDropdown2__namespace.Content, { sideOffset: 4, align: "start", className: menuClass, children: [
21859
+ /* @__PURE__ */ jsxRuntime.jsx(RDropdown3__namespace.Portal, { container: portalContainer, children: /* @__PURE__ */ jsxRuntime.jsxs(RDropdown3__namespace.Content, { sideOffset: 4, align: "start", className: menuClass, children: [
21683
21860
  /* @__PURE__ */ jsxRuntime.jsxs(
21684
- RDropdown2__namespace.Item,
21861
+ RDropdown3__namespace.Item,
21685
21862
  {
21686
21863
  className: menuItemClass,
21687
21864
  onSelect: () => chain()?.toggleBulletList().run(),
@@ -21692,7 +21869,7 @@ function EditorToolbarBar({
21692
21869
  }
21693
21870
  ),
21694
21871
  /* @__PURE__ */ jsxRuntime.jsxs(
21695
- RDropdown2__namespace.Item,
21872
+ RDropdown3__namespace.Item,
21696
21873
  {
21697
21874
  className: menuItemClass,
21698
21875
  onSelect: () => chain()?.toggleOrderedList().run(),
@@ -21703,7 +21880,7 @@ function EditorToolbarBar({
21703
21880
  }
21704
21881
  ),
21705
21882
  /* @__PURE__ */ jsxRuntime.jsxs(
21706
- RDropdown2__namespace.Item,
21883
+ RDropdown3__namespace.Item,
21707
21884
  {
21708
21885
  className: menuItemClass,
21709
21886
  onSelect: () => chain()?.toggleTaskList().run(),
@@ -21807,17 +21984,17 @@ function EditorToolbarBar({
21807
21984
  );
21808
21985
  case "table":
21809
21986
  return /* @__PURE__ */ jsxRuntime.jsxs(
21810
- RDropdown2__namespace.Root,
21987
+ RDropdown3__namespace.Root,
21811
21988
  {
21812
21989
  open: tableOpen,
21813
21990
  onOpenChange: setTableOpen,
21814
21991
  modal: !insideModal,
21815
21992
  children: [
21816
- /* @__PURE__ */ jsxRuntime.jsx(RDropdown2__namespace.Trigger, { asChild: true, disabled: off, children: /* @__PURE__ */ jsxRuntime.jsxs(ToolbarButton, { label: "\uD45C", active: state2.inTable, disabled: off, className: "px-[6px]", children: [
21993
+ /* @__PURE__ */ jsxRuntime.jsx(RDropdown3__namespace.Trigger, { asChild: true, disabled: off, children: /* @__PURE__ */ jsxRuntime.jsxs(ToolbarButton, { label: "\uD45C", active: state2.inTable, disabled: off, className: "px-[6px]", children: [
21817
21994
  /* @__PURE__ */ jsxRuntime.jsx(IconTable, { size: ICON_SIZE }),
21818
21995
  /* @__PURE__ */ jsxRuntime.jsx(SIcon, { name: "caretDown", size: CARET_SIZE })
21819
21996
  ] }) }),
21820
- /* @__PURE__ */ jsxRuntime.jsx(RDropdown2__namespace.Portal, { container: portalContainer, children: /* @__PURE__ */ jsxRuntime.jsxs(RDropdown2__namespace.Content, { sideOffset: 4, align: "start", className: menuClass, children: [
21997
+ /* @__PURE__ */ jsxRuntime.jsx(RDropdown3__namespace.Portal, { container: portalContainer, children: /* @__PURE__ */ jsxRuntime.jsxs(RDropdown3__namespace.Content, { sideOffset: 4, align: "start", className: menuClass, children: [
21821
21998
  !state2.inTable && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
21822
21999
  /* @__PURE__ */ jsxRuntime.jsx(
21823
22000
  TableSizePicker,
@@ -21829,7 +22006,7 @@ function EditorToolbarBar({
21829
22006
  }
21830
22007
  }
21831
22008
  ),
21832
- /* @__PURE__ */ jsxRuntime.jsx(RDropdown2__namespace.Separator, { className: menuSeparatorClass })
22009
+ /* @__PURE__ */ jsxRuntime.jsx(RDropdown3__namespace.Separator, { className: menuSeparatorClass })
21833
22010
  ] }),
21834
22011
  /* @__PURE__ */ jsxRuntime.jsx(
21835
22012
  TableMenuItem,
@@ -21863,7 +22040,7 @@ function EditorToolbarBar({
21863
22040
  onSelect: () => chain()?.addColumnAfter().run()
21864
22041
  }
21865
22042
  ),
21866
- /* @__PURE__ */ jsxRuntime.jsx(RDropdown2__namespace.Separator, { className: menuSeparatorClass }),
22043
+ /* @__PURE__ */ jsxRuntime.jsx(RDropdown3__namespace.Separator, { className: menuSeparatorClass }),
21867
22044
  /* @__PURE__ */ jsxRuntime.jsx(
21868
22045
  TableMenuItem,
21869
22046
  {
@@ -21896,7 +22073,7 @@ function EditorToolbarBar({
21896
22073
  onSelect: () => chain()?.toggleHeaderColumn().run()
21897
22074
  }
21898
22075
  ),
21899
- /* @__PURE__ */ jsxRuntime.jsx(RDropdown2__namespace.Separator, { className: menuSeparatorClass }),
22076
+ /* @__PURE__ */ jsxRuntime.jsx(RDropdown3__namespace.Separator, { className: menuSeparatorClass }),
21900
22077
  /* @__PURE__ */ jsxRuntime.jsx(
21901
22078
  TableMenuItem,
21902
22079
  {