@reopt-ai/opt-ui 1.12.1 → 1.12.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/COMPONENT_CATALOG.md +32 -30
- package/README.md +6 -1
- package/dist/core/index.cjs +2 -2
- package/dist/core/index.js +2 -2
- package/dist/docs/02-components/01-core.md +7 -7
- package/dist/docs/02-components/02-visuals.md +1 -1
- package/dist/docs/02-components/03-shells.md +26 -24
- package/dist/docs/02-components/04-surfaces.md +1 -1
- package/dist/docs/02-components/index.md +1 -1
- package/dist/{field-sidebar-uXmoyvd7.d.cts → field-sidebar-BdP0-TMs.d.cts} +26 -1
- package/dist/{field-sidebar-CrYlRZew.d.ts → field-sidebar-CHs8eEzs.d.ts} +26 -1
- package/dist/{field-sidebar-oa6zOmcd.cjs → field-sidebar-CQSlweP0.cjs} +42 -31
- package/dist/{field-sidebar-zkkqC7__.js → field-sidebar-DJKWQQeu.js} +42 -31
- package/dist/index.cjs +47 -18
- package/dist/index.d.cts +21 -6
- package/dist/index.d.ts +21 -6
- package/dist/index.js +47 -18
- package/dist/{key-pad-menu-SItoHPLu.cjs → key-pad-menu-1YN221Oi.cjs} +1 -1
- package/dist/{key-pad-menu-Di2aRGbM.js → key-pad-menu-CUiQ-vKw.js} +1 -1
- package/dist/meta.cjs +28 -14
- package/dist/meta.js +28 -14
- package/dist/query.cjs +19 -6
- package/dist/query.js +19 -6
- package/dist/shells/index.cjs +1 -1
- package/dist/shells/index.d.cts +1 -1
- package/dist/shells/index.d.ts +1 -1
- package/dist/shells/index.js +1 -1
- package/dist/{text-truncate-DSuZECy0.js → text-truncate-BFWd2cE_.js} +116 -116
- package/dist/{text-truncate-I1XLWmRa.cjs → text-truncate-DsG5UAOY.cjs} +115 -115
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const require_text_truncate = require("./text-truncate-
|
|
2
|
+
const require_text_truncate = require("./text-truncate-DsG5UAOY.cjs");
|
|
3
3
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
4
|
let react = require("react");
|
|
5
5
|
react = require_text_truncate.__toESM(react, 1);
|
|
@@ -254,7 +254,7 @@ function CommandPaletteTrigger({ commands, onSelect, labels }) {
|
|
|
254
254
|
}
|
|
255
255
|
//#endregion
|
|
256
256
|
//#region src/shells/dashboard-grid.tsx
|
|
257
|
-
const defaultLabels$
|
|
257
|
+
const defaultLabels$22 = { ariaLabel: "대시보드 통계" };
|
|
258
258
|
const MIN_DASHBOARD_COLUMNS = 1;
|
|
259
259
|
const MAX_DASHBOARD_COLUMNS = 12;
|
|
260
260
|
function normalizeDashboardColumns(columns) {
|
|
@@ -263,7 +263,7 @@ function normalizeDashboardColumns(columns) {
|
|
|
263
263
|
}
|
|
264
264
|
/** Renders the dashboard grid component. */
|
|
265
265
|
function DashboardGrid({ stats, columns = 3, labels: customLabels }) {
|
|
266
|
-
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$
|
|
266
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$22), customLabels);
|
|
267
267
|
const columnCount = normalizeDashboardColumns(columns);
|
|
268
268
|
const rowStyle = { "--opt-dashboard-grid-columns": `repeat(${columnCount}, minmax(0, 1fr))` };
|
|
269
269
|
const rows = [];
|
|
@@ -291,13 +291,13 @@ function DashboardGrid({ stats, columns = 3, labels: customLabels }) {
|
|
|
291
291
|
}
|
|
292
292
|
//#endregion
|
|
293
293
|
//#region src/shells/search-combobox.tsx
|
|
294
|
-
const defaultLabels$
|
|
294
|
+
const defaultLabels$21 = {
|
|
295
295
|
noResults: "결과가 없습니다.",
|
|
296
296
|
loading: "Loading…"
|
|
297
297
|
};
|
|
298
298
|
/** Renders the search combobox component. */
|
|
299
299
|
function SearchCombobox({ items, placeholder = "검색...", label = "검색", onSelect, labels: customLabels, async: isAsync = false, onSearch, debounceMs = 300 }) {
|
|
300
|
-
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$
|
|
300
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$21), customLabels);
|
|
301
301
|
const inputId = (0, react.useId)();
|
|
302
302
|
const [query, setQuery] = (0, react.useState)("");
|
|
303
303
|
const [asyncResults, setAsyncResults] = (0, react.useState)([]);
|
|
@@ -395,14 +395,14 @@ function SearchCombobox({ items, placeholder = "검색...", label = "검색", on
|
|
|
395
395
|
}
|
|
396
396
|
//#endregion
|
|
397
397
|
//#region src/shells/status-select.tsx
|
|
398
|
-
const defaultLabels$
|
|
398
|
+
const defaultLabels$20 = {
|
|
399
399
|
selectLabel: "상태",
|
|
400
400
|
emptyMessage: "사용 가능한 상태 옵션이 없습니다."
|
|
401
401
|
};
|
|
402
402
|
/** Renders the status select component. */
|
|
403
403
|
function StatusSelect({ options, value: controlledValue, onChange, label, labels: customLabels }) {
|
|
404
404
|
var _options$0$value, _options$;
|
|
405
|
-
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$
|
|
405
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$20), customLabels);
|
|
406
406
|
const resolvedLabel = label !== null && label !== void 0 ? label : labels.selectLabel;
|
|
407
407
|
const [internalValue, setInternalValue] = (0, react.useState)((_options$0$value = (_options$ = options[0]) === null || _options$ === void 0 ? void 0 : _options$.value) !== null && _options$0$value !== void 0 ? _options$0$value : "");
|
|
408
408
|
const value = controlledValue !== null && controlledValue !== void 0 ? controlledValue : internalValue;
|
|
@@ -469,7 +469,7 @@ function StatusSelect({ options, value: controlledValue, onChange, label, labels
|
|
|
469
469
|
}
|
|
470
470
|
//#endregion
|
|
471
471
|
//#region src/shells/app-menubar.tsx
|
|
472
|
-
const defaultLabels$
|
|
472
|
+
const defaultLabels$19 = { ariaLabel: "Application menu" };
|
|
473
473
|
function MenuSection({ menu }) {
|
|
474
474
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.MenuRoot, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.MenuTrigger, { children: [menu.label, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.MenuButtonArrow, {})] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.MenuPopover, { children: menu.items.map((item, i) => {
|
|
475
475
|
if (item.type === "separator") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.MenuSeparator, {}, `sep-${i}`);
|
|
@@ -513,7 +513,7 @@ function MenuSection({ menu }) {
|
|
|
513
513
|
}
|
|
514
514
|
/** Renders the app menubar component. */
|
|
515
515
|
function AppMenubar({ menus, labels: customLabels }) {
|
|
516
|
-
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$
|
|
516
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$19), customLabels);
|
|
517
517
|
if (menus.length === 0) return null;
|
|
518
518
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.MenubarRoot, {
|
|
519
519
|
"data-opt-id": "BGKHW",
|
|
@@ -552,10 +552,10 @@ const sectionStyles = {
|
|
|
552
552
|
Templates: "text-text-tertiary"
|
|
553
553
|
};
|
|
554
554
|
const defaultSectionStyle = "text-text-secondary";
|
|
555
|
-
const defaultLabels$
|
|
555
|
+
const defaultLabels$18 = { ariaLabel: "문서 네비게이션" };
|
|
556
556
|
/** Renders the sidebar nav component. */
|
|
557
557
|
function SidebarNav({ items, labels: customLabels }) {
|
|
558
|
-
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$
|
|
558
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$18), customLabels);
|
|
559
559
|
const pathname = (0, next_navigation.usePathname)();
|
|
560
560
|
const activeItem = items.find((item) => item.href === pathname);
|
|
561
561
|
const [activeId, setActiveId] = (0, react.useState)(activeItem ? domId(activeItem.id) : void 0);
|
|
@@ -603,7 +603,7 @@ function SidebarNav({ items, labels: customLabels }) {
|
|
|
603
603
|
}
|
|
604
604
|
//#endregion
|
|
605
605
|
//#region src/shells/editor-toolbar.tsx
|
|
606
|
-
const defaultLabels$
|
|
606
|
+
const defaultLabels$17 = { ariaLabel: "텍스트 편집기 툴바" };
|
|
607
607
|
function ToolbarButtonWithTooltip({ button, active, onAction }) {
|
|
608
608
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.TooltipProvider, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.TooltipAnchor, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.ToolbarButton, {
|
|
609
609
|
className: `text-text-primary data-[active-item]:bg-bg-subtle data-[focus-visible]:ring-ring rounded-md p-2 transition-colors outline-none data-[focus-visible]:ring-2 ${active ? "bg-bg-muted" : "hover:bg-bg-subtle"}`,
|
|
@@ -613,7 +613,7 @@ function ToolbarButtonWithTooltip({ button, active, onAction }) {
|
|
|
613
613
|
}
|
|
614
614
|
/** Renders the editor toolbar component. */
|
|
615
615
|
function EditorToolbar({ buttons, onAction, activeButtons = [], labels: customLabels }) {
|
|
616
|
-
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$
|
|
616
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$17), customLabels);
|
|
617
617
|
const groups = [];
|
|
618
618
|
let current = [];
|
|
619
619
|
for (const btn of buttons) {
|
|
@@ -646,14 +646,14 @@ function EditorToolbar({ buttons, onAction, activeButtons = [], labels: customLa
|
|
|
646
646
|
}
|
|
647
647
|
//#endregion
|
|
648
648
|
//#region src/shells/content-tabs.tsx
|
|
649
|
-
const defaultLabels$
|
|
649
|
+
const defaultLabels$16 = {
|
|
650
650
|
ariaLabel: "콘텐츠 탭",
|
|
651
651
|
emptyMessage: "표시할 탭이 없습니다."
|
|
652
652
|
};
|
|
653
653
|
/** Renders the content tabs component. */
|
|
654
654
|
function ContentTabs({ tabs, defaultTabId, labels: customLabels }) {
|
|
655
655
|
var _tabs$, _tabs$find;
|
|
656
|
-
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$
|
|
656
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$16), customLabels);
|
|
657
657
|
const [selectedTabId, setSelectedTabId] = (0, react.useState)(defaultTabId !== null && defaultTabId !== void 0 ? defaultTabId : (_tabs$ = tabs[0]) === null || _tabs$ === void 0 ? void 0 : _tabs$.id);
|
|
658
658
|
if (tabs.length === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
659
659
|
className: "text-text-secondary text-sm",
|
|
@@ -685,13 +685,13 @@ function ContentTabs({ tabs, defaultTabId, labels: customLabels }) {
|
|
|
685
685
|
}
|
|
686
686
|
//#endregion
|
|
687
687
|
//#region src/shells/faq-accordion.tsx
|
|
688
|
-
const defaultLabels$
|
|
688
|
+
const defaultLabels$15 = {
|
|
689
689
|
ariaLabel: "자주 묻는 질문",
|
|
690
690
|
emptyMessage: "등록된 FAQ가 없습니다."
|
|
691
691
|
};
|
|
692
692
|
/** Renders the faq accordion component. */
|
|
693
693
|
function FaqAccordion({ items, labels: customLabels }) {
|
|
694
|
-
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$
|
|
694
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$15), customLabels);
|
|
695
695
|
if (items.length === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
696
696
|
className: "text-text-secondary text-sm",
|
|
697
697
|
"data-opt-id": "QRBHV",
|
|
@@ -731,14 +731,14 @@ function FaqAccordion({ items, labels: customLabels }) {
|
|
|
731
731
|
}
|
|
732
732
|
//#endregion
|
|
733
733
|
//#region src/shells/settings-form.tsx
|
|
734
|
-
const defaultLabels$
|
|
734
|
+
const defaultLabels$14 = {
|
|
735
735
|
formAriaLabel: "설정 폼",
|
|
736
736
|
submitButton: "저장",
|
|
737
737
|
successMessage: "설정이 저장되었습니다."
|
|
738
738
|
};
|
|
739
739
|
/** Renders the settings form component. */
|
|
740
740
|
function SettingsForm({ fields, onSubmit, labels: customLabels }) {
|
|
741
|
-
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$
|
|
741
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$14), customLabels);
|
|
742
742
|
const [submitted, setSubmitted] = (0, react.useState)(false);
|
|
743
743
|
const defaultValues = {};
|
|
744
744
|
for (const field of fields) {
|
|
@@ -1064,7 +1064,7 @@ function ProjectSwitcher({ projects, value, onChange, placeholder = "프로젝
|
|
|
1064
1064
|
ProjectSwitcher.displayName = "ProjectSwitcher";
|
|
1065
1065
|
//#endregion
|
|
1066
1066
|
//#region src/shells/env-panel.tsx
|
|
1067
|
-
const defaultLabels$
|
|
1067
|
+
const defaultLabels$13 = {
|
|
1068
1068
|
varCount: (count) => `${count}개 변수`,
|
|
1069
1069
|
envVarsLabel: (env) => `${env} 환경 변수`,
|
|
1070
1070
|
secretBadge: "secret"
|
|
@@ -1076,7 +1076,7 @@ const envDot = {
|
|
|
1076
1076
|
};
|
|
1077
1077
|
/** Renders the env panel component. */
|
|
1078
1078
|
function EnvPanel({ groups, labels: customLabels }) {
|
|
1079
|
-
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$
|
|
1079
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$13), customLabels);
|
|
1080
1080
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1081
1081
|
className: `rounded-lg ${require_text_truncate.OPT_BORDER} divide-y ${require_text_truncate.OPT_DIVIDER} bg-surface`,
|
|
1082
1082
|
"data-opt-id": "ZBDWK",
|
|
@@ -1149,7 +1149,7 @@ function EnvPanel({ groups, labels: customLabels }) {
|
|
|
1149
1149
|
}
|
|
1150
1150
|
//#endregion
|
|
1151
1151
|
//#region src/shells/branch-select.tsx
|
|
1152
|
-
const defaultLabels$
|
|
1152
|
+
const defaultLabels$12 = {
|
|
1153
1153
|
selectLabel: "브랜치",
|
|
1154
1154
|
emptySelectionLabel: "선택...",
|
|
1155
1155
|
emptyMessage: "사용 가능한 브랜치가 없습니다.",
|
|
@@ -1158,7 +1158,7 @@ const defaultLabels$11 = {
|
|
|
1158
1158
|
/** Renders the branch select component. */
|
|
1159
1159
|
function BranchSelect({ branches, value: controlledValue, onChange, label, labels: customLabels }) {
|
|
1160
1160
|
var _ref, _defaultBranch$name, _branches$, _selected$name;
|
|
1161
|
-
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$
|
|
1161
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$12), customLabels);
|
|
1162
1162
|
const resolvedLabel = label !== null && label !== void 0 ? label : labels.selectLabel;
|
|
1163
1163
|
const defaultBranch = branches.find((b) => b.isDefault);
|
|
1164
1164
|
const [internalValue, setInternalValue] = (0, react.useState)((_ref = (_defaultBranch$name = defaultBranch === null || defaultBranch === void 0 ? void 0 : defaultBranch.name) !== null && _defaultBranch$name !== void 0 ? _defaultBranch$name : (_branches$ = branches[0]) === null || _branches$ === void 0 ? void 0 : _branches$.name) !== null && _ref !== void 0 ? _ref : "");
|
|
@@ -1267,7 +1267,7 @@ function BranchSelect({ branches, value: controlledValue, onChange, label, label
|
|
|
1267
1267
|
BranchSelect.displayName = "BranchSelect";
|
|
1268
1268
|
//#endregion
|
|
1269
1269
|
//#region src/shells/domain-table.tsx
|
|
1270
|
-
const defaultLabels$
|
|
1270
|
+
const defaultLabels$11 = {
|
|
1271
1271
|
domain: "Domain",
|
|
1272
1272
|
status: "Status",
|
|
1273
1273
|
ssl: "SSL",
|
|
@@ -1297,7 +1297,7 @@ const sslLabel = {
|
|
|
1297
1297
|
};
|
|
1298
1298
|
/** Renders the domain table component. */
|
|
1299
1299
|
function DomainTable({ domains, title = "도메인", labels: customLabels }) {
|
|
1300
|
-
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$
|
|
1300
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$11), customLabels);
|
|
1301
1301
|
if (domains.length === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1302
1302
|
className: "gap-group flex flex-col",
|
|
1303
1303
|
"data-opt-id": "A7SRM",
|
|
@@ -1415,6 +1415,13 @@ function DomainTable({ domains, title = "도메인", labels: customLabels }) {
|
|
|
1415
1415
|
}
|
|
1416
1416
|
//#endregion
|
|
1417
1417
|
//#region src/shells/data-table.tsx
|
|
1418
|
+
const defaultLabels$10 = {
|
|
1419
|
+
selectAll: "Select all",
|
|
1420
|
+
selectRow: (key) => `Select row ${key}`,
|
|
1421
|
+
resizeColumn: (header) => `Resize ${header}`,
|
|
1422
|
+
expandRow: (key) => `Expand row ${key}`,
|
|
1423
|
+
collapseRow: (key) => `Collapse row ${key}`
|
|
1424
|
+
};
|
|
1418
1425
|
const MIN_COLUMN_WIDTH = 40;
|
|
1419
1426
|
const DEFAULT_COLUMN_RESIZE_MAX = 1200;
|
|
1420
1427
|
const alignmentClass = {
|
|
@@ -1475,7 +1482,8 @@ function DataTableProgressBar({ value, barColor, label }) {
|
|
|
1475
1482
|
});
|
|
1476
1483
|
}
|
|
1477
1484
|
/** Renders the data table component. */
|
|
1478
|
-
function DataTable({ data, columns, keyExtractor, title, ariaLabel, onRowClick, emptyMessage = "No data available", activeRowId, sortable = false, selectable = false, selectedKeys, onSelectionChange, expandable = false, renderExpanded, pageSize, stickyHeader = false, resizableColumns = false, onSort: onSortExternal, className }) {
|
|
1485
|
+
function DataTable({ data, columns, keyExtractor, title, ariaLabel, onRowClick, emptyMessage = "No data available", activeRowId, sortable = false, selectable = false, selectedKeys, onSelectionChange, expandable = false, renderExpanded, pageSize, stickyHeader = false, resizableColumns = false, onSort: onSortExternal, labels: customLabels, className }) {
|
|
1486
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$10), customLabels);
|
|
1479
1487
|
const [sortCol, setSortCol] = (0, react.useState)(null);
|
|
1480
1488
|
const [sortDir, setSortDir] = (0, react.useState)(null);
|
|
1481
1489
|
const [expandedKeys, setExpandedKeys] = (0, react.useState)(/* @__PURE__ */ new Set());
|
|
@@ -1580,7 +1588,7 @@ function DataTable({ data, columns, keyExtractor, title, ariaLabel, onRowClick,
|
|
|
1580
1588
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Checkbox, {
|
|
1581
1589
|
checked: allSelected,
|
|
1582
1590
|
onChange: toggleSelectAll,
|
|
1583
|
-
"aria-label":
|
|
1591
|
+
"aria-label": labels.selectAll
|
|
1584
1592
|
})
|
|
1585
1593
|
}),
|
|
1586
1594
|
expandable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", { className: require_text_truncate.cn("px-3 py-2.5 text-left text-xs font-semibold uppercase tracking-wider text-text-tertiary", "w-10") }),
|
|
@@ -1602,11 +1610,14 @@ function DataTable({ data, columns, keyExtractor, title, ariaLabel, onRowClick,
|
|
|
1602
1610
|
"aria-sort": sortCol === col.id && sortDir ? sortDir === "asc" ? "ascending" : "descending" : void 0,
|
|
1603
1611
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
1604
1612
|
className: "flex items-center whitespace-nowrap",
|
|
1605
|
-
children: [
|
|
1613
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1614
|
+
className: require_text_truncate.cn(col.headerHidden && "sr-only"),
|
|
1615
|
+
children: col.header
|
|
1616
|
+
}), sortIndicator(col.id)]
|
|
1606
1617
|
}), resizableColumns && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1607
1618
|
role: "separator",
|
|
1608
1619
|
"aria-orientation": "vertical",
|
|
1609
|
-
"aria-label":
|
|
1620
|
+
"aria-label": labels.resizeColumn(col.header),
|
|
1610
1621
|
"aria-valuemin": MIN_COLUMN_WIDTH,
|
|
1611
1622
|
"aria-valuemax": resizeMax,
|
|
1612
1623
|
"aria-valuenow": resizeValue,
|
|
@@ -1669,7 +1680,7 @@ function DataTable({ data, columns, keyExtractor, title, ariaLabel, onRowClick,
|
|
|
1669
1680
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Checkbox, {
|
|
1670
1681
|
checked: isSelected,
|
|
1671
1682
|
onChange: () => toggleSelectRow(key),
|
|
1672
|
-
"aria-label":
|
|
1683
|
+
"aria-label": labels.selectRow(key)
|
|
1673
1684
|
})
|
|
1674
1685
|
}),
|
|
1675
1686
|
expandable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_reopt_ai_opt_ui_primitives.CompositeItem, {
|
|
@@ -1686,7 +1697,7 @@ function DataTable({ data, columns, keyExtractor, title, ariaLabel, onRowClick,
|
|
|
1686
1697
|
},
|
|
1687
1698
|
className: require_text_truncate.cn("rounded p-0.5 text-sm transition-transform", "text-text-secondary", "outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-ring-offset", isExpanded && "rotate-90"),
|
|
1688
1699
|
"aria-expanded": isExpanded,
|
|
1689
|
-
"aria-label":
|
|
1700
|
+
"aria-label": isExpanded ? labels.collapseRow(key) : labels.expandRow(key),
|
|
1690
1701
|
children: "▶"
|
|
1691
1702
|
})
|
|
1692
1703
|
}),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { $n as OPT_TEXT_LABEL, $t as
|
|
2
|
+
import { $n as OPT_TEXT_LABEL, $t as ToolbarButton$1, A as FormRadio$1, An as OPT_BADGE_RED, At as DialogPanel$1, B as FormSubmit$1, Bn as OPT_FOCUS, Bt as TabsRoot$1, Dn as OPT_BADGE_BLUE, E as FormLabel$1, En as OPT_ANIMATE_ENTER_EXIT, F as FormSelect, Fn as OPT_DIVIDER, Ft as SelectRoot$1, Gn as OPT_ITEM_BASE, Gt as CompositeItem, Ht as DisclosureRoot$1, I as FormSelectItem, It as SelectTrigger$1, K as useFormStore, Kn as OPT_SURFACE, Kt as CompositeProvider, L as FormSelectPopover, Ln as OPT_DOT_GREEN, Lt as Tab$1, Mn as OPT_BORDER, Mt as SelectItem$1, Nn as OPT_DISCLOSURE_CONTENT, Nt as SelectLabel$1, On as OPT_BADGE_GREEN, P as FormRoot$1, Pn as OPT_DISCLOSURE_TRIGGER, Pt as SelectPopover$1, Rn as OPT_DOT_RED, Rt as TabList$1, T as FormInput$1, U as FormTextarea, Un as OPT_INPUT, Ut as DisclosureTrigger$1, V as FormSwitch$1, Vn as OPT_FOCUS_VISIBLE, Vt as DisclosureContent$1, Wt as Composite, Xn as OPT_TD, Y as TagInput, Yn as OPT_TABLE_ROW_ACTIVE, Yt as Meter$1, Zn as OPT_TD_MUTED, Zt as Input, an as TooltipProvider$1, ar as _objectWithoutProperties, at as MenuButtonArrow$1, b as FormError$1, bt as ComboboxPopover$1, c as Checkbox, cn as Badge, ct as MenuItemRadio$1, dt as MenuSeparator$1, en as ToolbarContainer$1, er as OPT_TEXT_PRIMARY, et as PopoverContent$1, ft as MenuTrigger$1, h as FormCheckbox$1, hn as Skeleton, ht as ComboboxEmpty, i as FieldToken, in as TooltipAnchor$1, ir as _objectSpread2, j as FormRadioGroup$1, jn as OPT_BADGE_YELLOW, jt as DialogRoot$1, kn as OPT_BADGE_NEUTRAL, kt as DialogHeading$1, ln as EmptyState, lt as MenuPopover$1, m as formatOptTime, mn as StatCard, mt as MenubarRoot$1, n as Highlight, nn as ToolbarSeparator$1, nr as OPT_TEXT_TERTIARY, nt as PopoverTrigger$1, on as Alert, or as Kbd, ot as MenuItem$1, pt as MenubarContainer$1, qn as OPT_SURFACE_POPOVER, qt as CompositeRow, rn as Tooltip$1, rr as OPT_TH, s as Pagination, sn as Spinner, sr as cn, st as MenuItemCheckbox$1, t as TextTruncate, tn as ToolbarRoot$1, tr as OPT_TEXT_SECONDARY, tt as PopoverRoot$1, u as OPT_UI_DEFAULT_LOCALE, un as Button, ut as MenuRoot$1, vt as ComboboxInput$1, wn as OPT_ACTIVE_ITEM, wt as DialogDescription$1, xt as ComboboxRoot$1, yt as ComboboxItem$1, zn as OPT_DOT_YELLOW, zt as TabPanel$1 } from "./text-truncate-BFWd2cE_.js";
|
|
3
3
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { Fragment as Fragment$1, createContext, forwardRef, memo, useCallback, useContext, useEffect, useId, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
@@ -253,7 +253,7 @@ function CommandPaletteTrigger({ commands, onSelect, labels }) {
|
|
|
253
253
|
}
|
|
254
254
|
//#endregion
|
|
255
255
|
//#region src/shells/dashboard-grid.tsx
|
|
256
|
-
const defaultLabels$
|
|
256
|
+
const defaultLabels$22 = { ariaLabel: "대시보드 통계" };
|
|
257
257
|
const MIN_DASHBOARD_COLUMNS = 1;
|
|
258
258
|
const MAX_DASHBOARD_COLUMNS = 12;
|
|
259
259
|
function normalizeDashboardColumns(columns) {
|
|
@@ -262,7 +262,7 @@ function normalizeDashboardColumns(columns) {
|
|
|
262
262
|
}
|
|
263
263
|
/** Renders the dashboard grid component. */
|
|
264
264
|
function DashboardGrid({ stats, columns = 3, labels: customLabels }) {
|
|
265
|
-
const labels = _objectSpread2(_objectSpread2({}, defaultLabels$
|
|
265
|
+
const labels = _objectSpread2(_objectSpread2({}, defaultLabels$22), customLabels);
|
|
266
266
|
const columnCount = normalizeDashboardColumns(columns);
|
|
267
267
|
const rowStyle = { "--opt-dashboard-grid-columns": `repeat(${columnCount}, minmax(0, 1fr))` };
|
|
268
268
|
const rows = [];
|
|
@@ -290,13 +290,13 @@ function DashboardGrid({ stats, columns = 3, labels: customLabels }) {
|
|
|
290
290
|
}
|
|
291
291
|
//#endregion
|
|
292
292
|
//#region src/shells/search-combobox.tsx
|
|
293
|
-
const defaultLabels$
|
|
293
|
+
const defaultLabels$21 = {
|
|
294
294
|
noResults: "결과가 없습니다.",
|
|
295
295
|
loading: "Loading…"
|
|
296
296
|
};
|
|
297
297
|
/** Renders the search combobox component. */
|
|
298
298
|
function SearchCombobox({ items, placeholder = "검색...", label = "검색", onSelect, labels: customLabels, async: isAsync = false, onSearch, debounceMs = 300 }) {
|
|
299
|
-
const labels = _objectSpread2(_objectSpread2({}, defaultLabels$
|
|
299
|
+
const labels = _objectSpread2(_objectSpread2({}, defaultLabels$21), customLabels);
|
|
300
300
|
const inputId = useId();
|
|
301
301
|
const [query, setQuery] = useState("");
|
|
302
302
|
const [asyncResults, setAsyncResults] = useState([]);
|
|
@@ -394,14 +394,14 @@ function SearchCombobox({ items, placeholder = "검색...", label = "검색", on
|
|
|
394
394
|
}
|
|
395
395
|
//#endregion
|
|
396
396
|
//#region src/shells/status-select.tsx
|
|
397
|
-
const defaultLabels$
|
|
397
|
+
const defaultLabels$20 = {
|
|
398
398
|
selectLabel: "상태",
|
|
399
399
|
emptyMessage: "사용 가능한 상태 옵션이 없습니다."
|
|
400
400
|
};
|
|
401
401
|
/** Renders the status select component. */
|
|
402
402
|
function StatusSelect({ options, value: controlledValue, onChange, label, labels: customLabels }) {
|
|
403
403
|
var _options$0$value, _options$;
|
|
404
|
-
const labels = _objectSpread2(_objectSpread2({}, defaultLabels$
|
|
404
|
+
const labels = _objectSpread2(_objectSpread2({}, defaultLabels$20), customLabels);
|
|
405
405
|
const resolvedLabel = label !== null && label !== void 0 ? label : labels.selectLabel;
|
|
406
406
|
const [internalValue, setInternalValue] = useState((_options$0$value = (_options$ = options[0]) === null || _options$ === void 0 ? void 0 : _options$.value) !== null && _options$0$value !== void 0 ? _options$0$value : "");
|
|
407
407
|
const value = controlledValue !== null && controlledValue !== void 0 ? controlledValue : internalValue;
|
|
@@ -468,7 +468,7 @@ function StatusSelect({ options, value: controlledValue, onChange, label, labels
|
|
|
468
468
|
}
|
|
469
469
|
//#endregion
|
|
470
470
|
//#region src/shells/app-menubar.tsx
|
|
471
|
-
const defaultLabels$
|
|
471
|
+
const defaultLabels$19 = { ariaLabel: "Application menu" };
|
|
472
472
|
function MenuSection({ menu }) {
|
|
473
473
|
return /* @__PURE__ */ jsxs(MenuRoot$1, { children: [/* @__PURE__ */ jsxs(MenuTrigger$1, { children: [menu.label, /* @__PURE__ */ jsx(MenuButtonArrow$1, {})] }), /* @__PURE__ */ jsx(MenuPopover$1, { children: menu.items.map((item, i) => {
|
|
474
474
|
if (item.type === "separator") return /* @__PURE__ */ jsx(MenuSeparator$1, {}, `sep-${i}`);
|
|
@@ -512,7 +512,7 @@ function MenuSection({ menu }) {
|
|
|
512
512
|
}
|
|
513
513
|
/** Renders the app menubar component. */
|
|
514
514
|
function AppMenubar({ menus, labels: customLabels }) {
|
|
515
|
-
const labels = _objectSpread2(_objectSpread2({}, defaultLabels$
|
|
515
|
+
const labels = _objectSpread2(_objectSpread2({}, defaultLabels$19), customLabels);
|
|
516
516
|
if (menus.length === 0) return null;
|
|
517
517
|
return /* @__PURE__ */ jsx(MenubarRoot$1, {
|
|
518
518
|
"data-opt-id": "BGKHW",
|
|
@@ -551,10 +551,10 @@ const sectionStyles = {
|
|
|
551
551
|
Templates: "text-text-tertiary"
|
|
552
552
|
};
|
|
553
553
|
const defaultSectionStyle = "text-text-secondary";
|
|
554
|
-
const defaultLabels$
|
|
554
|
+
const defaultLabels$18 = { ariaLabel: "문서 네비게이션" };
|
|
555
555
|
/** Renders the sidebar nav component. */
|
|
556
556
|
function SidebarNav({ items, labels: customLabels }) {
|
|
557
|
-
const labels = _objectSpread2(_objectSpread2({}, defaultLabels$
|
|
557
|
+
const labels = _objectSpread2(_objectSpread2({}, defaultLabels$18), customLabels);
|
|
558
558
|
const pathname = usePathname();
|
|
559
559
|
const activeItem = items.find((item) => item.href === pathname);
|
|
560
560
|
const [activeId, setActiveId] = useState(activeItem ? domId(activeItem.id) : void 0);
|
|
@@ -602,7 +602,7 @@ function SidebarNav({ items, labels: customLabels }) {
|
|
|
602
602
|
}
|
|
603
603
|
//#endregion
|
|
604
604
|
//#region src/shells/editor-toolbar.tsx
|
|
605
|
-
const defaultLabels$
|
|
605
|
+
const defaultLabels$17 = { ariaLabel: "텍스트 편집기 툴바" };
|
|
606
606
|
function ToolbarButtonWithTooltip({ button, active, onAction }) {
|
|
607
607
|
return /* @__PURE__ */ jsxs(TooltipProvider$1, { children: [/* @__PURE__ */ jsx(TooltipAnchor$1, { children: /* @__PURE__ */ jsx(ToolbarButton$1, {
|
|
608
608
|
className: `text-text-primary data-[active-item]:bg-bg-subtle data-[focus-visible]:ring-ring rounded-md p-2 transition-colors outline-none data-[focus-visible]:ring-2 ${active ? "bg-bg-muted" : "hover:bg-bg-subtle"}`,
|
|
@@ -612,7 +612,7 @@ function ToolbarButtonWithTooltip({ button, active, onAction }) {
|
|
|
612
612
|
}
|
|
613
613
|
/** Renders the editor toolbar component. */
|
|
614
614
|
function EditorToolbar({ buttons, onAction, activeButtons = [], labels: customLabels }) {
|
|
615
|
-
const labels = _objectSpread2(_objectSpread2({}, defaultLabels$
|
|
615
|
+
const labels = _objectSpread2(_objectSpread2({}, defaultLabels$17), customLabels);
|
|
616
616
|
const groups = [];
|
|
617
617
|
let current = [];
|
|
618
618
|
for (const btn of buttons) {
|
|
@@ -645,14 +645,14 @@ function EditorToolbar({ buttons, onAction, activeButtons = [], labels: customLa
|
|
|
645
645
|
}
|
|
646
646
|
//#endregion
|
|
647
647
|
//#region src/shells/content-tabs.tsx
|
|
648
|
-
const defaultLabels$
|
|
648
|
+
const defaultLabels$16 = {
|
|
649
649
|
ariaLabel: "콘텐츠 탭",
|
|
650
650
|
emptyMessage: "표시할 탭이 없습니다."
|
|
651
651
|
};
|
|
652
652
|
/** Renders the content tabs component. */
|
|
653
653
|
function ContentTabs({ tabs, defaultTabId, labels: customLabels }) {
|
|
654
654
|
var _tabs$, _tabs$find;
|
|
655
|
-
const labels = _objectSpread2(_objectSpread2({}, defaultLabels$
|
|
655
|
+
const labels = _objectSpread2(_objectSpread2({}, defaultLabels$16), customLabels);
|
|
656
656
|
const [selectedTabId, setSelectedTabId] = useState(defaultTabId !== null && defaultTabId !== void 0 ? defaultTabId : (_tabs$ = tabs[0]) === null || _tabs$ === void 0 ? void 0 : _tabs$.id);
|
|
657
657
|
if (tabs.length === 0) return /* @__PURE__ */ jsx("div", {
|
|
658
658
|
className: "text-text-secondary text-sm",
|
|
@@ -684,13 +684,13 @@ function ContentTabs({ tabs, defaultTabId, labels: customLabels }) {
|
|
|
684
684
|
}
|
|
685
685
|
//#endregion
|
|
686
686
|
//#region src/shells/faq-accordion.tsx
|
|
687
|
-
const defaultLabels$
|
|
687
|
+
const defaultLabels$15 = {
|
|
688
688
|
ariaLabel: "자주 묻는 질문",
|
|
689
689
|
emptyMessage: "등록된 FAQ가 없습니다."
|
|
690
690
|
};
|
|
691
691
|
/** Renders the faq accordion component. */
|
|
692
692
|
function FaqAccordion({ items, labels: customLabels }) {
|
|
693
|
-
const labels = _objectSpread2(_objectSpread2({}, defaultLabels$
|
|
693
|
+
const labels = _objectSpread2(_objectSpread2({}, defaultLabels$15), customLabels);
|
|
694
694
|
if (items.length === 0) return /* @__PURE__ */ jsx("div", {
|
|
695
695
|
className: "text-text-secondary text-sm",
|
|
696
696
|
"data-opt-id": "QRBHV",
|
|
@@ -730,14 +730,14 @@ function FaqAccordion({ items, labels: customLabels }) {
|
|
|
730
730
|
}
|
|
731
731
|
//#endregion
|
|
732
732
|
//#region src/shells/settings-form.tsx
|
|
733
|
-
const defaultLabels$
|
|
733
|
+
const defaultLabels$14 = {
|
|
734
734
|
formAriaLabel: "설정 폼",
|
|
735
735
|
submitButton: "저장",
|
|
736
736
|
successMessage: "설정이 저장되었습니다."
|
|
737
737
|
};
|
|
738
738
|
/** Renders the settings form component. */
|
|
739
739
|
function SettingsForm({ fields, onSubmit, labels: customLabels }) {
|
|
740
|
-
const labels = _objectSpread2(_objectSpread2({}, defaultLabels$
|
|
740
|
+
const labels = _objectSpread2(_objectSpread2({}, defaultLabels$14), customLabels);
|
|
741
741
|
const [submitted, setSubmitted] = useState(false);
|
|
742
742
|
const defaultValues = {};
|
|
743
743
|
for (const field of fields) {
|
|
@@ -1063,7 +1063,7 @@ function ProjectSwitcher({ projects, value, onChange, placeholder = "프로젝
|
|
|
1063
1063
|
ProjectSwitcher.displayName = "ProjectSwitcher";
|
|
1064
1064
|
//#endregion
|
|
1065
1065
|
//#region src/shells/env-panel.tsx
|
|
1066
|
-
const defaultLabels$
|
|
1066
|
+
const defaultLabels$13 = {
|
|
1067
1067
|
varCount: (count) => `${count}개 변수`,
|
|
1068
1068
|
envVarsLabel: (env) => `${env} 환경 변수`,
|
|
1069
1069
|
secretBadge: "secret"
|
|
@@ -1075,7 +1075,7 @@ const envDot = {
|
|
|
1075
1075
|
};
|
|
1076
1076
|
/** Renders the env panel component. */
|
|
1077
1077
|
function EnvPanel({ groups, labels: customLabels }) {
|
|
1078
|
-
const labels = _objectSpread2(_objectSpread2({}, defaultLabels$
|
|
1078
|
+
const labels = _objectSpread2(_objectSpread2({}, defaultLabels$13), customLabels);
|
|
1079
1079
|
return /* @__PURE__ */ jsx("div", {
|
|
1080
1080
|
className: `rounded-lg ${OPT_BORDER} divide-y ${OPT_DIVIDER} bg-surface`,
|
|
1081
1081
|
"data-opt-id": "ZBDWK",
|
|
@@ -1148,7 +1148,7 @@ function EnvPanel({ groups, labels: customLabels }) {
|
|
|
1148
1148
|
}
|
|
1149
1149
|
//#endregion
|
|
1150
1150
|
//#region src/shells/branch-select.tsx
|
|
1151
|
-
const defaultLabels$
|
|
1151
|
+
const defaultLabels$12 = {
|
|
1152
1152
|
selectLabel: "브랜치",
|
|
1153
1153
|
emptySelectionLabel: "선택...",
|
|
1154
1154
|
emptyMessage: "사용 가능한 브랜치가 없습니다.",
|
|
@@ -1157,7 +1157,7 @@ const defaultLabels$11 = {
|
|
|
1157
1157
|
/** Renders the branch select component. */
|
|
1158
1158
|
function BranchSelect({ branches, value: controlledValue, onChange, label, labels: customLabels }) {
|
|
1159
1159
|
var _ref, _defaultBranch$name, _branches$, _selected$name;
|
|
1160
|
-
const labels = _objectSpread2(_objectSpread2({}, defaultLabels$
|
|
1160
|
+
const labels = _objectSpread2(_objectSpread2({}, defaultLabels$12), customLabels);
|
|
1161
1161
|
const resolvedLabel = label !== null && label !== void 0 ? label : labels.selectLabel;
|
|
1162
1162
|
const defaultBranch = branches.find((b) => b.isDefault);
|
|
1163
1163
|
const [internalValue, setInternalValue] = useState((_ref = (_defaultBranch$name = defaultBranch === null || defaultBranch === void 0 ? void 0 : defaultBranch.name) !== null && _defaultBranch$name !== void 0 ? _defaultBranch$name : (_branches$ = branches[0]) === null || _branches$ === void 0 ? void 0 : _branches$.name) !== null && _ref !== void 0 ? _ref : "");
|
|
@@ -1266,7 +1266,7 @@ function BranchSelect({ branches, value: controlledValue, onChange, label, label
|
|
|
1266
1266
|
BranchSelect.displayName = "BranchSelect";
|
|
1267
1267
|
//#endregion
|
|
1268
1268
|
//#region src/shells/domain-table.tsx
|
|
1269
|
-
const defaultLabels$
|
|
1269
|
+
const defaultLabels$11 = {
|
|
1270
1270
|
domain: "Domain",
|
|
1271
1271
|
status: "Status",
|
|
1272
1272
|
ssl: "SSL",
|
|
@@ -1296,7 +1296,7 @@ const sslLabel = {
|
|
|
1296
1296
|
};
|
|
1297
1297
|
/** Renders the domain table component. */
|
|
1298
1298
|
function DomainTable({ domains, title = "도메인", labels: customLabels }) {
|
|
1299
|
-
const labels = _objectSpread2(_objectSpread2({}, defaultLabels$
|
|
1299
|
+
const labels = _objectSpread2(_objectSpread2({}, defaultLabels$11), customLabels);
|
|
1300
1300
|
if (domains.length === 0) return /* @__PURE__ */ jsxs("div", {
|
|
1301
1301
|
className: "gap-group flex flex-col",
|
|
1302
1302
|
"data-opt-id": "A7SRM",
|
|
@@ -1414,6 +1414,13 @@ function DomainTable({ domains, title = "도메인", labels: customLabels }) {
|
|
|
1414
1414
|
}
|
|
1415
1415
|
//#endregion
|
|
1416
1416
|
//#region src/shells/data-table.tsx
|
|
1417
|
+
const defaultLabels$10 = {
|
|
1418
|
+
selectAll: "Select all",
|
|
1419
|
+
selectRow: (key) => `Select row ${key}`,
|
|
1420
|
+
resizeColumn: (header) => `Resize ${header}`,
|
|
1421
|
+
expandRow: (key) => `Expand row ${key}`,
|
|
1422
|
+
collapseRow: (key) => `Collapse row ${key}`
|
|
1423
|
+
};
|
|
1417
1424
|
const MIN_COLUMN_WIDTH = 40;
|
|
1418
1425
|
const DEFAULT_COLUMN_RESIZE_MAX = 1200;
|
|
1419
1426
|
const alignmentClass = {
|
|
@@ -1474,7 +1481,8 @@ function DataTableProgressBar({ value, barColor, label }) {
|
|
|
1474
1481
|
});
|
|
1475
1482
|
}
|
|
1476
1483
|
/** Renders the data table component. */
|
|
1477
|
-
function DataTable({ data, columns, keyExtractor, title, ariaLabel, onRowClick, emptyMessage = "No data available", activeRowId, sortable = false, selectable = false, selectedKeys, onSelectionChange, expandable = false, renderExpanded, pageSize, stickyHeader = false, resizableColumns = false, onSort: onSortExternal, className }) {
|
|
1484
|
+
function DataTable({ data, columns, keyExtractor, title, ariaLabel, onRowClick, emptyMessage = "No data available", activeRowId, sortable = false, selectable = false, selectedKeys, onSelectionChange, expandable = false, renderExpanded, pageSize, stickyHeader = false, resizableColumns = false, onSort: onSortExternal, labels: customLabels, className }) {
|
|
1485
|
+
const labels = _objectSpread2(_objectSpread2({}, defaultLabels$10), customLabels);
|
|
1478
1486
|
const [sortCol, setSortCol] = useState(null);
|
|
1479
1487
|
const [sortDir, setSortDir] = useState(null);
|
|
1480
1488
|
const [expandedKeys, setExpandedKeys] = useState(/* @__PURE__ */ new Set());
|
|
@@ -1579,7 +1587,7 @@ function DataTable({ data, columns, keyExtractor, title, ariaLabel, onRowClick,
|
|
|
1579
1587
|
children: /* @__PURE__ */ jsx(Checkbox, {
|
|
1580
1588
|
checked: allSelected,
|
|
1581
1589
|
onChange: toggleSelectAll,
|
|
1582
|
-
"aria-label":
|
|
1590
|
+
"aria-label": labels.selectAll
|
|
1583
1591
|
})
|
|
1584
1592
|
}),
|
|
1585
1593
|
expandable && /* @__PURE__ */ jsx("th", { className: cn("px-3 py-2.5 text-left text-xs font-semibold uppercase tracking-wider text-text-tertiary", "w-10") }),
|
|
@@ -1601,11 +1609,14 @@ function DataTable({ data, columns, keyExtractor, title, ariaLabel, onRowClick,
|
|
|
1601
1609
|
"aria-sort": sortCol === col.id && sortDir ? sortDir === "asc" ? "ascending" : "descending" : void 0,
|
|
1602
1610
|
children: [/* @__PURE__ */ jsxs("span", {
|
|
1603
1611
|
className: "flex items-center whitespace-nowrap",
|
|
1604
|
-
children: [
|
|
1612
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
1613
|
+
className: cn(col.headerHidden && "sr-only"),
|
|
1614
|
+
children: col.header
|
|
1615
|
+
}), sortIndicator(col.id)]
|
|
1605
1616
|
}), resizableColumns && /* @__PURE__ */ jsx("span", {
|
|
1606
1617
|
role: "separator",
|
|
1607
1618
|
"aria-orientation": "vertical",
|
|
1608
|
-
"aria-label":
|
|
1619
|
+
"aria-label": labels.resizeColumn(col.header),
|
|
1609
1620
|
"aria-valuemin": MIN_COLUMN_WIDTH,
|
|
1610
1621
|
"aria-valuemax": resizeMax,
|
|
1611
1622
|
"aria-valuenow": resizeValue,
|
|
@@ -1668,7 +1679,7 @@ function DataTable({ data, columns, keyExtractor, title, ariaLabel, onRowClick,
|
|
|
1668
1679
|
children: /* @__PURE__ */ jsx(Checkbox, {
|
|
1669
1680
|
checked: isSelected,
|
|
1670
1681
|
onChange: () => toggleSelectRow(key),
|
|
1671
|
-
"aria-label":
|
|
1682
|
+
"aria-label": labels.selectRow(key)
|
|
1672
1683
|
})
|
|
1673
1684
|
}),
|
|
1674
1685
|
expandable && /* @__PURE__ */ jsx(CompositeItem, {
|
|
@@ -1685,7 +1696,7 @@ function DataTable({ data, columns, keyExtractor, title, ariaLabel, onRowClick,
|
|
|
1685
1696
|
},
|
|
1686
1697
|
className: cn("rounded p-0.5 text-sm transition-transform", "text-text-secondary", "outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-ring-offset", isExpanded && "rotate-90"),
|
|
1687
1698
|
"aria-expanded": isExpanded,
|
|
1688
|
-
"aria-label":
|
|
1699
|
+
"aria-label": isExpanded ? labels.collapseRow(key) : labels.expandRow(key),
|
|
1689
1700
|
children: "▶"
|
|
1690
1701
|
})
|
|
1691
1702
|
}),
|