@t3q-ui/design-system 1.59.1 → 1.59.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ <!-- release: v1.59.3 -->
4
+ ## 1.59.3 (2026-11-08)
5
+
6
+
7
+ ### Bug Fixes
8
+
9
+ * **agGridTable:** 열 폭을 내용에 맞춘 뒤 그 비율로 분배(fitColumnsToContent), 앱 width 는 하한 (홀드아웃 23 열 간격 7건, 사용자 결정 ③ A) (7aecb72)
10
+ * **listPage:** 페이지네이션 왼쪽 건수 라벨 제거 — 가운데 버튼만 (홀드아웃 23 "어디에도 붙어 있지 않다" 2건, 사용자 결정 ②) (3c6d0bb)
11
+ * **table:** 기본 table-auto — 폭 없는 열이 남는 폭을 내용 비율로 (홀드아웃 23 상세 단계 표 첫 열 과대 5건, 사용자 결정 ④ A) (82b30a1)
12
+ * **tokens:** Alert 배경 다섯 variant 를 새 단계 -o05(8%) 로 — 오류 배너 "무겁다" (홀드아웃 23 Opus 2건, 사용자 결정 ⑤) (846ed62), closes #ffe4e4 #fff2f2
13
+
14
+ <!-- release: v1.59.2 -->
15
+ ## 1.59.2 (2026-11-08)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * **agGridTable:** 남는 폭 분배를 flex 열 수와 무관하게 — 넓은 고정 글자 열은 늘 나눠 받음 (홀드아웃 22 "wide empty gap" 5건) (90a6fcb)
21
+ * **pagination:** 라벨을 "N개 중 X–Y" 로 — "전체 N개 중 X - Y번째"·굵은 N 제거 (사용자 결정 2026-11-08 ③) (771e8ea)
22
+ * **table:** 표와 페이지네이션 간격 16 → 0 — 붙여 둠 (사용자 2026-11-08, 홀드아웃 22 "떠 있다" 1건 뒤) (8d708f6)
23
+
3
24
  <!-- release: v1.59.1 -->
4
25
  ## 1.59.1 (2026-11-08)
5
26
 
@@ -2870,15 +2870,12 @@ function Pagination({
2870
2870
  const n = total.toLocaleString();
2871
2871
  const start = total === 0 ? 0 : (page - 1) * rowsPerPage + 1;
2872
2872
  const end = total === 0 ? 0 : Math.min(page * rowsPerPage, total);
2873
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2874
- "\uC804\uCCB4 ",
2875
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-large-medium text-sys-text-main tabular-nums", children: n }),
2876
- "\uAC1C \uC911",
2877
- " ",
2873
+ return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "tabular-nums", children: [
2874
+ n,
2875
+ "\uAC1C \uC911 ",
2878
2876
  start,
2879
- " - ",
2880
- end,
2881
- "\uBC88\uC9F8"
2877
+ "\u2013",
2878
+ end
2882
2879
  ] });
2883
2880
  }, [total, page, rowsPerPage]);
2884
2881
  return /* @__PURE__ */ jsxRuntime.jsxs(PaginationWrapper, { className: "relative justify-center", ...rest, children: [
@@ -3101,7 +3098,7 @@ var Table = React12__namespace.forwardRef(
3101
3098
  "table",
3102
3099
  {
3103
3100
  ref,
3104
- className: cn("w-full table-fixed border-collapse border-spacing-0 border-0", className),
3101
+ className: cn("w-full table-auto border-collapse border-spacing-0 border-0", className),
3105
3102
  ...props
3106
3103
  }
3107
3104
  ) })
@@ -3144,7 +3141,7 @@ var TablePagination = React12__namespace.forwardRef(({ className, ...props }, re
3144
3141
  "div",
3145
3142
  {
3146
3143
  ref,
3147
- className: cn("mt-[16px] flex items-center justify-center", className),
3144
+ className: cn("mt-0 flex items-center justify-center", className),
3148
3145
  ...props
3149
3146
  }
3150
3147
  ));
@@ -4010,6 +4007,8 @@ function AgGridContent() {
4010
4007
  columnTypes: userColumnTypes,
4011
4008
  onCellKeyDown,
4012
4009
  onRowClicked,
4010
+ onFirstDataRendered,
4011
+ fitColumnsToContent: fitToContent = true,
4013
4012
  ...restTableProps
4014
4013
  } = tableProps;
4015
4014
  const handleCellKeyDown = (e) => {
@@ -4020,6 +4019,10 @@ function AgGridContent() {
4020
4019
  if (!target?.matches(".ag-cell, .ag-full-width-row")) return;
4021
4020
  onRowClicked({ ...e, type: "rowClicked" });
4022
4021
  };
4022
+ const handleFirstDataRendered = (e) => {
4023
+ onFirstDataRendered?.(e);
4024
+ if (fitToContent && !restTableProps.autoSizeStrategy) fitColumnsToContent(e.api);
4025
+ };
4023
4026
  const mergedDefaultColDef = {
4024
4027
  ...userDefaultColDef,
4025
4028
  cellStyle: {
@@ -4038,12 +4041,14 @@ function AgGridContent() {
4038
4041
  );
4039
4042
  const columnDefs = React12.useMemo(
4040
4043
  () => withTypeClasses(
4041
- withHeaderMinWidth(
4042
- withSortIconOffset(
4043
- // 남는 폭 분배(2026-11-08 홀드아웃 21 뒤 결정 1): 글자 열이 하나뿐이면 ID·날짜 같은 넓은 고정 열도 flex 를 받는다 — 그 뒤 withFlexFill 이
4044
- // 상한 있는 flex 열만 남았는지 본다(분배된 열은 상한이 없으므로 글자 열의 maxWidth 는 살아남는다)
4045
- withExplicitSortIcons(
4046
- withFlexFill(withBalancedFill(withNumberColumnWidth(restTableProps.columnDefs)))
4044
+ withWidthFloor(
4045
+ withHeaderMinWidth(
4046
+ withSortIconOffset(
4047
+ // 남는 폭 분배(2026-11-08 홀드아웃 21 뒤 결정 1): 글자 열이 하나뿐이면 ID·날짜 같은 넓은 고정 열도 flex 를 받는다 — 그 뒤 withFlexFill 이
4048
+ // 상한 있는 flex 열만 남았는지 본다(분배된 열은 상한이 없으므로 글자 열의 maxWidth 는 살아남는다)
4049
+ withExplicitSortIcons(
4050
+ withFlexFill(withBalancedFill(withNumberColumnWidth(restTableProps.columnDefs)))
4051
+ )
4047
4052
  )
4048
4053
  )
4049
4054
  ),
@@ -4063,6 +4068,7 @@ function AgGridContent() {
4063
4068
  columnDefs,
4064
4069
  onRowClicked,
4065
4070
  onCellKeyDown: handleCellKeyDown,
4071
+ onFirstDataRendered: handleFirstDataRendered,
4066
4072
  theme,
4067
4073
  className,
4068
4074
  domLayout: "normal"
@@ -4083,6 +4089,7 @@ function AgGridContent() {
4083
4089
  columnDefs,
4084
4090
  onRowClicked,
4085
4091
  onCellKeyDown: handleCellKeyDown,
4092
+ onFirstDataRendered: handleFirstDataRendered,
4086
4093
  theme,
4087
4094
  className,
4088
4095
  rowClass: `${onRowClicked ? "ag-row-clickable" : ""} ${tableProps.rowClass || ""}`,
@@ -4243,15 +4250,16 @@ function withBalancedFill(defs) {
4243
4250
  }
4244
4251
  };
4245
4252
  collect(defs);
4246
- if (flexCols.length !== 1) return defs;
4247
- const lone = flexCols[0];
4253
+ if (flexCols.length === 0) return defs;
4254
+ const uncapped = flexCols.filter((d) => d.maxWidth == null);
4255
+ const lone = uncapped.length === 1 ? uncapped[0] : null;
4248
4256
  const share = (d) => !d.hide && !isFlex(d) && typeof d.width === "number" && d.width >= BALANCED_FILL_MIN_WIDTH && !columnTypesOf(d).includes("number");
4249
4257
  let sharedCount = 0;
4250
4258
  const walk = (list) => list.map((d) => {
4251
4259
  if (!d || typeof d !== "object") return d;
4252
4260
  const c = d;
4253
4261
  if (Array.isArray(c.children)) return { ...c, children: walk(c.children) };
4254
- if (c === lone) return c.flex >= 2 ? d : { ...c, flex: 2 };
4262
+ if (lone && c === lone) return c.flex >= 2 ? d : { ...c, flex: 2 };
4255
4263
  if (!share(c)) return d;
4256
4264
  sharedCount += 1;
4257
4265
  const { width, ...rest } = c;
@@ -4312,6 +4320,44 @@ function withHeaderMinWidth(defs) {
4312
4320
  return { ...d, minWidth, ...raiseWidth ? { width: minWidth } : {} };
4313
4321
  });
4314
4322
  }
4323
+ function withWidthFloor(defs) {
4324
+ if (!Array.isArray(defs)) return defs;
4325
+ let changed = false;
4326
+ const out = defs.map((d) => {
4327
+ if (!d || typeof d !== "object") return d;
4328
+ if (Array.isArray(d.children)) {
4329
+ const children = withWidthFloor(d.children);
4330
+ if (children === d.children) return d;
4331
+ changed = true;
4332
+ return { ...d, children };
4333
+ }
4334
+ if (typeof d.width !== "number" || d.flex != null) return d;
4335
+ if (typeof d.minWidth === "number" && d.minWidth >= d.width) return d;
4336
+ changed = true;
4337
+ return { ...d, minWidth: d.width };
4338
+ });
4339
+ return changed ? out : defs;
4340
+ }
4341
+ function isFittable(col) {
4342
+ const def = col.getColDef();
4343
+ return col.isVisible() && !col.isPinned() && !col.getColId().startsWith("ag-Grid-") && !def.suppressAutoSize && !def.suppressSizeToFit;
4344
+ }
4345
+ function fitColumnsToContent(api) {
4346
+ const onAutosized = (e) => {
4347
+ if (e.source !== "autosizeColumns" || !e.finished) return;
4348
+ api.removeEventListener("columnResized", onAutosized);
4349
+ const cols = (api.getColumns() ?? []).filter(isFittable);
4350
+ if (cols.length === 0) return;
4351
+ api.applyColumnState({
4352
+ state: cols.map((c) => ({
4353
+ colId: c.getColId(),
4354
+ flex: Math.max(1, Math.round(c.getActualWidth()))
4355
+ }))
4356
+ });
4357
+ };
4358
+ api.addEventListener("columnResized", onAutosized);
4359
+ api.autoSizeAllColumns();
4360
+ }
4315
4361
  function getByPath(data, path) {
4316
4362
  return path.split(".").reduce((o, k) => o == null ? void 0 : o[k], data);
4317
4363
  }
@@ -4449,6 +4495,7 @@ exports.badgeVariants = badgeVariants;
4449
4495
  exports.buttonVariants = buttonVariants;
4450
4496
  exports.cn = cn;
4451
4497
  exports.estimateHeaderTextWidth = estimateHeaderTextWidth;
4498
+ exports.fitColumnsToContent = fitColumnsToContent;
4452
4499
  exports.getPaginationRange = getPaginationRange;
4453
4500
  exports.getSortedColumnState = getSortedColumnState;
4454
4501
  exports.sanitizeUserText = sanitizeUserText;
@@ -4463,5 +4510,6 @@ exports.withHeaderMinWidth = withHeaderMinWidth;
4463
4510
  exports.withNumberColumnWidth = withNumberColumnWidth;
4464
4511
  exports.withSortIconOffset = withSortIconOffset;
4465
4512
  exports.withTypeClasses = withTypeClasses;
4466
- //# sourceMappingURL=chunk-2T6PIVRA.cjs.map
4467
- //# sourceMappingURL=chunk-2T6PIVRA.cjs.map
4513
+ exports.withWidthFloor = withWidthFloor;
4514
+ //# sourceMappingURL=chunk-5O3JWQP3.cjs.map
4515
+ //# sourceMappingURL=chunk-5O3JWQP3.cjs.map