@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 +21 -0
- package/dist/{chunk-2T6PIVRA.cjs → chunk-5O3JWQP3.cjs} +69 -21
- package/dist/chunk-5O3JWQP3.cjs.map +1 -0
- package/dist/{chunk-4VVIGFI2.js → chunk-GOY465GH.js} +68 -22
- package/dist/chunk-GOY465GH.js.map +1 -0
- package/dist/{index-kM4bOlin.d.cts → index-gy-cc-DH.d.cts} +30 -7
- package/dist/{index-kM4bOlin.d.ts → index-gy-cc-DH.d.ts} +30 -7
- package/dist/index.cjs +468 -460
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -11
- package/dist/index.d.ts +14 -11
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/patterns/index.cjs +70 -71
- package/dist/patterns/index.cjs.map +1 -1
- package/dist/patterns/index.d.cts +1 -1
- package/dist/patterns/index.d.ts +1 -1
- package/dist/patterns/index.js +2 -3
- package/dist/patterns/index.js.map +1 -1
- package/dist/styles.css +31 -10
- package/package.json +1 -1
- package/skills/tds/SKILL.md +2 -2
- package/skills/tds/examples/detail-page.tsx +1 -1
- package/skills/tds/reference/components.md +7 -6
- package/dist/chunk-2T6PIVRA.cjs.map +0 -1
- package/dist/chunk-4VVIGFI2.js.map +0 -1
|
@@ -2839,15 +2839,12 @@ function Pagination({
|
|
|
2839
2839
|
const n = total.toLocaleString();
|
|
2840
2840
|
const start = total === 0 ? 0 : (page - 1) * rowsPerPage + 1;
|
|
2841
2841
|
const end = total === 0 ? 0 : Math.min(page * rowsPerPage, total);
|
|
2842
|
-
return /* @__PURE__ */ jsxs(
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
"\uAC1C \uC911",
|
|
2846
|
-
" ",
|
|
2842
|
+
return /* @__PURE__ */ jsxs("span", { className: "tabular-nums", children: [
|
|
2843
|
+
n,
|
|
2844
|
+
"\uAC1C \uC911 ",
|
|
2847
2845
|
start,
|
|
2848
|
-
"
|
|
2849
|
-
end
|
|
2850
|
-
"\uBC88\uC9F8"
|
|
2846
|
+
"\u2013",
|
|
2847
|
+
end
|
|
2851
2848
|
] });
|
|
2852
2849
|
}, [total, page, rowsPerPage]);
|
|
2853
2850
|
return /* @__PURE__ */ jsxs(PaginationWrapper, { className: "relative justify-center", ...rest, children: [
|
|
@@ -3070,7 +3067,7 @@ var Table = React12.forwardRef(
|
|
|
3070
3067
|
"table",
|
|
3071
3068
|
{
|
|
3072
3069
|
ref,
|
|
3073
|
-
className: cn("w-full table-
|
|
3070
|
+
className: cn("w-full table-auto border-collapse border-spacing-0 border-0", className),
|
|
3074
3071
|
...props
|
|
3075
3072
|
}
|
|
3076
3073
|
) })
|
|
@@ -3113,7 +3110,7 @@ var TablePagination = React12.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
3113
3110
|
"div",
|
|
3114
3111
|
{
|
|
3115
3112
|
ref,
|
|
3116
|
-
className: cn("mt-
|
|
3113
|
+
className: cn("mt-0 flex items-center justify-center", className),
|
|
3117
3114
|
...props
|
|
3118
3115
|
}
|
|
3119
3116
|
));
|
|
@@ -3979,6 +3976,8 @@ function AgGridContent() {
|
|
|
3979
3976
|
columnTypes: userColumnTypes,
|
|
3980
3977
|
onCellKeyDown,
|
|
3981
3978
|
onRowClicked,
|
|
3979
|
+
onFirstDataRendered,
|
|
3980
|
+
fitColumnsToContent: fitToContent = true,
|
|
3982
3981
|
...restTableProps
|
|
3983
3982
|
} = tableProps;
|
|
3984
3983
|
const handleCellKeyDown = (e) => {
|
|
@@ -3989,6 +3988,10 @@ function AgGridContent() {
|
|
|
3989
3988
|
if (!target?.matches(".ag-cell, .ag-full-width-row")) return;
|
|
3990
3989
|
onRowClicked({ ...e, type: "rowClicked" });
|
|
3991
3990
|
};
|
|
3991
|
+
const handleFirstDataRendered = (e) => {
|
|
3992
|
+
onFirstDataRendered?.(e);
|
|
3993
|
+
if (fitToContent && !restTableProps.autoSizeStrategy) fitColumnsToContent(e.api);
|
|
3994
|
+
};
|
|
3992
3995
|
const mergedDefaultColDef = {
|
|
3993
3996
|
...userDefaultColDef,
|
|
3994
3997
|
cellStyle: {
|
|
@@ -4007,12 +4010,14 @@ function AgGridContent() {
|
|
|
4007
4010
|
);
|
|
4008
4011
|
const columnDefs = useMemo(
|
|
4009
4012
|
() => withTypeClasses(
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4013
|
+
withWidthFloor(
|
|
4014
|
+
withHeaderMinWidth(
|
|
4015
|
+
withSortIconOffset(
|
|
4016
|
+
// 남는 폭 분배(2026-11-08 홀드아웃 21 뒤 결정 1): 글자 열이 하나뿐이면 ID·날짜 같은 넓은 고정 열도 flex 를 받는다 — 그 뒤 withFlexFill 이
|
|
4017
|
+
// 상한 있는 flex 열만 남았는지 본다(분배된 열은 상한이 없으므로 글자 열의 maxWidth 는 살아남는다)
|
|
4018
|
+
withExplicitSortIcons(
|
|
4019
|
+
withFlexFill(withBalancedFill(withNumberColumnWidth(restTableProps.columnDefs)))
|
|
4020
|
+
)
|
|
4016
4021
|
)
|
|
4017
4022
|
)
|
|
4018
4023
|
),
|
|
@@ -4032,6 +4037,7 @@ function AgGridContent() {
|
|
|
4032
4037
|
columnDefs,
|
|
4033
4038
|
onRowClicked,
|
|
4034
4039
|
onCellKeyDown: handleCellKeyDown,
|
|
4040
|
+
onFirstDataRendered: handleFirstDataRendered,
|
|
4035
4041
|
theme,
|
|
4036
4042
|
className,
|
|
4037
4043
|
domLayout: "normal"
|
|
@@ -4052,6 +4058,7 @@ function AgGridContent() {
|
|
|
4052
4058
|
columnDefs,
|
|
4053
4059
|
onRowClicked,
|
|
4054
4060
|
onCellKeyDown: handleCellKeyDown,
|
|
4061
|
+
onFirstDataRendered: handleFirstDataRendered,
|
|
4055
4062
|
theme,
|
|
4056
4063
|
className,
|
|
4057
4064
|
rowClass: `${onRowClicked ? "ag-row-clickable" : ""} ${tableProps.rowClass || ""}`,
|
|
@@ -4212,15 +4219,16 @@ function withBalancedFill(defs) {
|
|
|
4212
4219
|
}
|
|
4213
4220
|
};
|
|
4214
4221
|
collect(defs);
|
|
4215
|
-
if (flexCols.length
|
|
4216
|
-
const
|
|
4222
|
+
if (flexCols.length === 0) return defs;
|
|
4223
|
+
const uncapped = flexCols.filter((d) => d.maxWidth == null);
|
|
4224
|
+
const lone = uncapped.length === 1 ? uncapped[0] : null;
|
|
4217
4225
|
const share = (d) => !d.hide && !isFlex(d) && typeof d.width === "number" && d.width >= BALANCED_FILL_MIN_WIDTH && !columnTypesOf(d).includes("number");
|
|
4218
4226
|
let sharedCount = 0;
|
|
4219
4227
|
const walk = (list) => list.map((d) => {
|
|
4220
4228
|
if (!d || typeof d !== "object") return d;
|
|
4221
4229
|
const c = d;
|
|
4222
4230
|
if (Array.isArray(c.children)) return { ...c, children: walk(c.children) };
|
|
4223
|
-
if (c === lone) return c.flex >= 2 ? d : { ...c, flex: 2 };
|
|
4231
|
+
if (lone && c === lone) return c.flex >= 2 ? d : { ...c, flex: 2 };
|
|
4224
4232
|
if (!share(c)) return d;
|
|
4225
4233
|
sharedCount += 1;
|
|
4226
4234
|
const { width, ...rest } = c;
|
|
@@ -4281,6 +4289,44 @@ function withHeaderMinWidth(defs) {
|
|
|
4281
4289
|
return { ...d, minWidth, ...raiseWidth ? { width: minWidth } : {} };
|
|
4282
4290
|
});
|
|
4283
4291
|
}
|
|
4292
|
+
function withWidthFloor(defs) {
|
|
4293
|
+
if (!Array.isArray(defs)) return defs;
|
|
4294
|
+
let changed = false;
|
|
4295
|
+
const out = defs.map((d) => {
|
|
4296
|
+
if (!d || typeof d !== "object") return d;
|
|
4297
|
+
if (Array.isArray(d.children)) {
|
|
4298
|
+
const children = withWidthFloor(d.children);
|
|
4299
|
+
if (children === d.children) return d;
|
|
4300
|
+
changed = true;
|
|
4301
|
+
return { ...d, children };
|
|
4302
|
+
}
|
|
4303
|
+
if (typeof d.width !== "number" || d.flex != null) return d;
|
|
4304
|
+
if (typeof d.minWidth === "number" && d.minWidth >= d.width) return d;
|
|
4305
|
+
changed = true;
|
|
4306
|
+
return { ...d, minWidth: d.width };
|
|
4307
|
+
});
|
|
4308
|
+
return changed ? out : defs;
|
|
4309
|
+
}
|
|
4310
|
+
function isFittable(col) {
|
|
4311
|
+
const def = col.getColDef();
|
|
4312
|
+
return col.isVisible() && !col.isPinned() && !col.getColId().startsWith("ag-Grid-") && !def.suppressAutoSize && !def.suppressSizeToFit;
|
|
4313
|
+
}
|
|
4314
|
+
function fitColumnsToContent(api) {
|
|
4315
|
+
const onAutosized = (e) => {
|
|
4316
|
+
if (e.source !== "autosizeColumns" || !e.finished) return;
|
|
4317
|
+
api.removeEventListener("columnResized", onAutosized);
|
|
4318
|
+
const cols = (api.getColumns() ?? []).filter(isFittable);
|
|
4319
|
+
if (cols.length === 0) return;
|
|
4320
|
+
api.applyColumnState({
|
|
4321
|
+
state: cols.map((c) => ({
|
|
4322
|
+
colId: c.getColId(),
|
|
4323
|
+
flex: Math.max(1, Math.round(c.getActualWidth()))
|
|
4324
|
+
}))
|
|
4325
|
+
});
|
|
4326
|
+
};
|
|
4327
|
+
api.addEventListener("columnResized", onAutosized);
|
|
4328
|
+
api.autoSizeAllColumns();
|
|
4329
|
+
}
|
|
4284
4330
|
function getByPath(data, path) {
|
|
4285
4331
|
return path.split(".").reduce((o, k) => o == null ? void 0 : o[k], data);
|
|
4286
4332
|
}
|
|
@@ -4307,6 +4353,6 @@ function TwoLineCellRenderer(params) {
|
|
|
4307
4353
|
] });
|
|
4308
4354
|
}
|
|
4309
4355
|
|
|
4310
|
-
export { AG_GRID_LOCALE_KR, AgGridContext, AgGridTable, Alert, AlertActions, AlertDescription, AlertTitle, BADGE_OUTLINE_ACCENT, BALANCED_FILL_MIN_WIDTH, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardThumbnail, CardTitle, Checkbox, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuPortal, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyBoxIllustration, Form, FormControl, FormDescription, FormField, FormFooter, FormHeader, FormItem, FormLabel, FormMessage, FormSection, FormSectionLevelContext, FormValidMessage, HeaderCheckboxRenderer, IconButton, LucideIcon, NUMBER_COLUMN_CLASS, NUMBER_COLUMN_WIDTH, PageHeader, PageHeaderProvider, Pagination, PaginationContent, PaginationFirst, PaginationItem, PaginationLast, PaginationLink, PaginationNext, PaginationPrevious, PaginationWrapper, Panel, RowCheckboxRenderer, SORT_ICON_OFFSET_CLASS, Separator, Skeleton, SortIcon, Spinner, Stack, Table, TableBody, TableCell, TableHead, TableHeader, TablePagination, TableRow, TableSkeleton, Tabs, TabsContent, TabsList, TabsTrigger, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TwoLineCellRenderer, alignFromClassName, badgeVariants, buttonVariants, cn, estimateHeaderTextWidth, getPaginationRange, getSortedColumnState, sanitizeUserText, useFormControlContext, useFormField, usePageHeader, useRestoreFocusToOpener, withBalancedFill, withExplicitSortIcons, withFlexFill, withHeaderMinWidth, withNumberColumnWidth, withSortIconOffset, withTypeClasses };
|
|
4311
|
-
//# sourceMappingURL=chunk-
|
|
4312
|
-
//# sourceMappingURL=chunk-
|
|
4356
|
+
export { AG_GRID_LOCALE_KR, AgGridContext, AgGridTable, Alert, AlertActions, AlertDescription, AlertTitle, BADGE_OUTLINE_ACCENT, BALANCED_FILL_MIN_WIDTH, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardThumbnail, CardTitle, Checkbox, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuPortal, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyBoxIllustration, Form, FormControl, FormDescription, FormField, FormFooter, FormHeader, FormItem, FormLabel, FormMessage, FormSection, FormSectionLevelContext, FormValidMessage, HeaderCheckboxRenderer, IconButton, LucideIcon, NUMBER_COLUMN_CLASS, NUMBER_COLUMN_WIDTH, PageHeader, PageHeaderProvider, Pagination, PaginationContent, PaginationFirst, PaginationItem, PaginationLast, PaginationLink, PaginationNext, PaginationPrevious, PaginationWrapper, Panel, RowCheckboxRenderer, SORT_ICON_OFFSET_CLASS, Separator, Skeleton, SortIcon, Spinner, Stack, Table, TableBody, TableCell, TableHead, TableHeader, TablePagination, TableRow, TableSkeleton, Tabs, TabsContent, TabsList, TabsTrigger, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TwoLineCellRenderer, alignFromClassName, badgeVariants, buttonVariants, cn, estimateHeaderTextWidth, fitColumnsToContent, getPaginationRange, getSortedColumnState, sanitizeUserText, useFormControlContext, useFormField, usePageHeader, useRestoreFocusToOpener, withBalancedFill, withExplicitSortIcons, withFlexFill, withHeaderMinWidth, withNumberColumnWidth, withSortIconOffset, withTypeClasses, withWidthFloor };
|
|
4357
|
+
//# sourceMappingURL=chunk-GOY465GH.js.map
|
|
4358
|
+
//# sourceMappingURL=chunk-GOY465GH.js.map
|