@reopt-ai/opt-ui 1.9.0 → 1.10.0
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 +1 -1
- package/dist/core/index.cjs +98 -98
- package/dist/core/index.d.cts +2 -2
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +2 -2
- package/dist/docs/02-components/01-core.md +1 -1
- package/dist/docs/02-components/02-visuals.md +1 -1
- package/dist/docs/02-components/03-shells.md +1 -1
- package/dist/docs/02-components/04-surfaces.md +1 -1
- package/dist/docs/02-components/index.md +1 -1
- package/dist/{field-sidebar-mFHemxBz.cjs → field-sidebar-B6Ndr8HE.cjs} +292 -285
- package/dist/{field-sidebar-B7QkWvMG.js → field-sidebar-BXjvV7Cz.js} +12 -5
- package/dist/{field-sidebar-B7QkWvMG.js.map → field-sidebar-BXjvV7Cz.js.map} +1 -1
- package/dist/{field-sidebar-B5vk3luQ.d.cts → field-sidebar-DWfJAJlx.d.ts} +14 -2
- package/dist/{field-sidebar-Dk9gJGA_.d.ts.map → field-sidebar-DWfJAJlx.d.ts.map} +1 -1
- package/dist/{field-sidebar-Dk9gJGA_.d.ts → field-sidebar-nwcE9LC4.d.cts} +14 -2
- package/dist/{field-sidebar-B5vk3luQ.d.cts.map → field-sidebar-nwcE9LC4.d.cts.map} +1 -1
- package/dist/index.cjs +558 -558
- package/dist/index.d.cts +3 -3
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/{key-pad-menu-BFd79JoS.js → key-pad-menu-BQunU20e.js} +6 -134
- package/dist/key-pad-menu-BQunU20e.js.map +1 -0
- package/dist/{key-pad-menu-EEb6Ho5h.d.ts → key-pad-menu-BsgJMjD4.d.ts} +3 -47
- package/dist/key-pad-menu-BsgJMjD4.d.ts.map +1 -0
- package/dist/{key-pad-menu-DoGskWbp.cjs → key-pad-menu-D5mQcS5v.cjs} +228 -362
- package/dist/{key-pad-menu-D8OS_VCT.d.cts → key-pad-menu-DfZbeXhG.d.cts} +3 -47
- package/dist/key-pad-menu-DfZbeXhG.d.cts.map +1 -0
- 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/{field-token-CSOrU5gl.d.ts → text-truncate-BGr7bB_8.d.cts} +46 -2
- package/dist/text-truncate-BGr7bB_8.d.cts.map +1 -0
- package/dist/{field-token-CSOrU5gl.d.cts → text-truncate-BGr7bB_8.d.ts} +46 -2
- package/dist/text-truncate-BGr7bB_8.d.ts.map +1 -0
- package/dist/{highlight-CGcrYGMC.cjs → text-truncate-CxdzAnhS.cjs} +134 -0
- package/dist/{highlight-C2sfnJN8.js → text-truncate-j6X3z7Pv.js} +131 -3
- package/dist/text-truncate-j6X3z7Pv.js.map +1 -0
- package/package.json +2 -2
- package/dist/field-token-CSOrU5gl.d.cts.map +0 -1
- package/dist/field-token-CSOrU5gl.d.ts.map +0 -1
- package/dist/highlight-C2sfnJN8.js.map +0 -1
- package/dist/key-pad-menu-BFd79JoS.js.map +0 -1
- package/dist/key-pad-menu-D8OS_VCT.d.cts.map +0 -1
- package/dist/key-pad-menu-EEb6Ho5h.d.ts.map +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const
|
|
2
|
+
const require_text_truncate = require("./text-truncate-CxdzAnhS.cjs");
|
|
3
3
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
4
|
let react = require("react");
|
|
5
|
-
react =
|
|
5
|
+
react = require_text_truncate.__toESM(react, 1);
|
|
6
6
|
let _reopt_ai_opt_ui_primitives = require("@reopt-ai/opt-ui-primitives");
|
|
7
7
|
let lucide_react = require("lucide-react");
|
|
8
8
|
let _reopt_ai_opt_charts = require("@reopt-ai/opt-charts");
|
|
9
9
|
let match_sorter = require("match-sorter");
|
|
10
10
|
let next_link = require("next/link");
|
|
11
|
-
next_link =
|
|
11
|
+
next_link = require_text_truncate.__toESM(next_link, 1);
|
|
12
12
|
let next_navigation = require("next/navigation");
|
|
13
13
|
//#region src/core/command.tsx
|
|
14
14
|
const _excluded = ["className"];
|
|
@@ -27,27 +27,27 @@ const _excluded7 = ["className"];
|
|
|
27
27
|
const _excluded8 = ["className"];
|
|
28
28
|
/** Renders the `Command` component. */
|
|
29
29
|
function Command(_ref) {
|
|
30
|
-
let { className } = _ref, props =
|
|
31
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_reopt_ai_opt_ui_primitives.CommandRoot,
|
|
30
|
+
let { className } = _ref, props = require_text_truncate._objectWithoutProperties(_ref, _excluded);
|
|
31
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_reopt_ai_opt_ui_primitives.CommandRoot, require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({ className: require_text_truncate.cn("bg-surface text-text-primary flex w-full flex-col overflow-hidden rounded-xl", className) }, props), {}, {
|
|
32
32
|
"data-opt-id": "4FYBW",
|
|
33
33
|
"data-opt-slug": "command.Command"
|
|
34
34
|
}));
|
|
35
35
|
}
|
|
36
36
|
/** Renders a Command in a dialog overlay, à la Cmd+K palette. */
|
|
37
37
|
function CommandDialog({ open, onOpenChange, title = "Command Palette", description = "검색 후 Enter 또는 클릭으로 명령을 실행하세요.", className, commandClassName, shouldFilter, filter, children }) {
|
|
38
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
38
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.DialogRoot, {
|
|
39
39
|
open,
|
|
40
40
|
onOpenChange,
|
|
41
41
|
"data-opt-id": "DVRSX",
|
|
42
42
|
"data-opt-slug": "command.CommandDialog",
|
|
43
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
44
|
-
className:
|
|
43
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.DialogPanel, {
|
|
44
|
+
className: require_text_truncate.cn("top-[20%] left-1/2 -translate-x-1/2", "w-full max-w-lg overflow-hidden p-0 shadow-2xl", className),
|
|
45
45
|
children: [
|
|
46
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
46
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.DialogHeading, {
|
|
47
47
|
className: "sr-only",
|
|
48
48
|
children: title
|
|
49
49
|
}),
|
|
50
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
50
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.DialogDescription, {
|
|
51
51
|
className: "sr-only",
|
|
52
52
|
children: description
|
|
53
53
|
}),
|
|
@@ -63,10 +63,10 @@ function CommandDialog({ open, onOpenChange, title = "Command Palette", descript
|
|
|
63
63
|
}
|
|
64
64
|
/** Renders the `CommandInput` component with a leading search icon. */
|
|
65
65
|
function CommandInput(_ref2) {
|
|
66
|
-
let { className, trailing, wrapperClassName, placeholder, "aria-label": ariaLabel } = _ref2, props =
|
|
66
|
+
let { className, trailing, wrapperClassName, placeholder, "aria-label": ariaLabel } = _ref2, props = require_text_truncate._objectWithoutProperties(_ref2, _excluded2);
|
|
67
67
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
68
68
|
"data-slot": "command-input-wrapper",
|
|
69
|
-
className:
|
|
69
|
+
className: require_text_truncate.cn("border-border-subtle gap-element flex h-12 items-center border-b px-3", wrapperClassName),
|
|
70
70
|
"data-opt-id": "HB1K3",
|
|
71
71
|
"data-opt-slug": "command.CommandInput",
|
|
72
72
|
children: [
|
|
@@ -74,8 +74,8 @@ function CommandInput(_ref2) {
|
|
|
74
74
|
"aria-hidden": true,
|
|
75
75
|
className: "text-text-tertiary size-4 shrink-0"
|
|
76
76
|
}),
|
|
77
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_reopt_ai_opt_ui_primitives.CommandInput,
|
|
78
|
-
className:
|
|
77
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_reopt_ai_opt_ui_primitives.CommandInput, require_text_truncate._objectSpread2({
|
|
78
|
+
className: require_text_truncate.cn("text-text-primary placeholder:text-text-tertiary flex h-full w-full bg-transparent text-sm outline-none focus-visible:ring-0 focus-visible:outline-none", "disabled:cursor-not-allowed disabled:opacity-50", className),
|
|
79
79
|
placeholder,
|
|
80
80
|
"aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : typeof placeholder === "string" ? placeholder : "Command search"
|
|
81
81
|
}, props)),
|
|
@@ -85,9 +85,9 @@ function CommandInput(_ref2) {
|
|
|
85
85
|
}
|
|
86
86
|
/** Renders the `CommandList` component. */
|
|
87
87
|
function CommandList(_ref3) {
|
|
88
|
-
let { className, "aria-label": ariaLabel } = _ref3, props =
|
|
89
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_reopt_ai_opt_ui_primitives.CommandList,
|
|
90
|
-
className:
|
|
88
|
+
let { className, "aria-label": ariaLabel } = _ref3, props = require_text_truncate._objectWithoutProperties(_ref3, _excluded3);
|
|
89
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_reopt_ai_opt_ui_primitives.CommandList, require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({
|
|
90
|
+
className: require_text_truncate.cn("max-h-80 scroll-py-1 overflow-x-hidden overflow-y-auto p-1", className),
|
|
91
91
|
"aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : "Commands"
|
|
92
92
|
}, props), {}, {
|
|
93
93
|
"data-opt-id": "NPXC5",
|
|
@@ -96,21 +96,21 @@ function CommandList(_ref3) {
|
|
|
96
96
|
}
|
|
97
97
|
/** Renders the `CommandEmpty` component. */
|
|
98
98
|
function CommandEmpty(_ref4) {
|
|
99
|
-
let { className } = _ref4, props =
|
|
100
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_reopt_ai_opt_ui_primitives.CommandEmpty,
|
|
99
|
+
let { className } = _ref4, props = require_text_truncate._objectWithoutProperties(_ref4, _excluded4);
|
|
100
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_reopt_ai_opt_ui_primitives.CommandEmpty, require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({ className: require_text_truncate.cn("text-text-tertiary py-6 text-center text-sm", className) }, props), {}, {
|
|
101
101
|
"data-opt-id": "A8BZM",
|
|
102
102
|
"data-opt-slug": "command.CommandEmpty"
|
|
103
103
|
}));
|
|
104
104
|
}
|
|
105
105
|
/** Renders the `CommandGroup` component with an optional heading. */
|
|
106
106
|
function CommandGroup(_ref5) {
|
|
107
|
-
let { className, heading } = _ref5, props =
|
|
108
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_reopt_ai_opt_ui_primitives.CommandGroup,
|
|
107
|
+
let { className, heading } = _ref5, props = require_text_truncate._objectWithoutProperties(_ref5, _excluded5);
|
|
108
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_reopt_ai_opt_ui_primitives.CommandGroup, require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({
|
|
109
109
|
heading: heading != null ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
110
110
|
className: "text-text-tertiary px-2 py-1.5 text-xs font-medium",
|
|
111
111
|
children: heading
|
|
112
112
|
}) : void 0,
|
|
113
|
-
className:
|
|
113
|
+
className: require_text_truncate.cn("py-1", className)
|
|
114
114
|
}, props), {}, {
|
|
115
115
|
"data-opt-id": "JPK1Y",
|
|
116
116
|
"data-opt-slug": "command.CommandGroup"
|
|
@@ -118,26 +118,26 @@ function CommandGroup(_ref5) {
|
|
|
118
118
|
}
|
|
119
119
|
/** Renders the `CommandSeparator` component. */
|
|
120
120
|
function CommandSeparator(_ref6) {
|
|
121
|
-
let { className } = _ref6, props =
|
|
122
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_reopt_ai_opt_ui_primitives.CommandSeparator,
|
|
121
|
+
let { className } = _ref6, props = require_text_truncate._objectWithoutProperties(_ref6, _excluded6);
|
|
122
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_reopt_ai_opt_ui_primitives.CommandSeparator, require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({ className: require_text_truncate.cn("bg-border-subtle -mx-1 my-1 h-px", className) }, props), {}, {
|
|
123
123
|
"data-opt-id": "10P0E",
|
|
124
124
|
"data-opt-slug": "command.CommandSeparator"
|
|
125
125
|
}));
|
|
126
126
|
}
|
|
127
127
|
/** Renders the `CommandItem` component. */
|
|
128
128
|
function CommandItem(_ref7) {
|
|
129
|
-
let { className } = _ref7, props =
|
|
130
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_reopt_ai_opt_ui_primitives.CommandItem,
|
|
129
|
+
let { className } = _ref7, props = require_text_truncate._objectWithoutProperties(_ref7, _excluded7);
|
|
130
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_reopt_ai_opt_ui_primitives.CommandItem, require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({ className: require_text_truncate.cn("text-text-primary flex cursor-pointer items-center gap-2 rounded-md px-2 py-2 text-sm select-none", "data-[active-item]:bg-accent data-[active-item]:text-accent-fg", "data-[disabled]:pointer-events-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50", "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className) }, props), {}, {
|
|
131
131
|
"data-opt-id": "K674W",
|
|
132
132
|
"data-opt-slug": "command.CommandItem"
|
|
133
133
|
}));
|
|
134
134
|
}
|
|
135
135
|
/** Renders the `CommandShortcut` component (right-aligned hint). */
|
|
136
136
|
function CommandShortcut(_ref8) {
|
|
137
|
-
let { className } = _ref8, props =
|
|
138
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span",
|
|
137
|
+
let { className } = _ref8, props = require_text_truncate._objectWithoutProperties(_ref8, _excluded8);
|
|
138
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({
|
|
139
139
|
"data-slot": "command-shortcut",
|
|
140
|
-
className:
|
|
140
|
+
className: require_text_truncate.cn("text-text-tertiary ml-auto text-xs tracking-widest", "data-[active-item]:text-accent-fg/80", className)
|
|
141
141
|
}, props), {}, {
|
|
142
142
|
"data-opt-id": "75CQK",
|
|
143
143
|
"data-opt-slug": "command.CommandShortcut"
|
|
@@ -156,7 +156,7 @@ const DEFAULT_LABELS = {
|
|
|
156
156
|
};
|
|
157
157
|
/** Renders the command palette component. */
|
|
158
158
|
function CommandPalette({ commands, open, onOpenChange, onSelect, inline = false, labels, footer, empty, inputTrailing, className }) {
|
|
159
|
-
const resolvedLabels =
|
|
159
|
+
const resolvedLabels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, DEFAULT_LABELS), labels);
|
|
160
160
|
const hasCommands = commands.length > 0;
|
|
161
161
|
const grouped = (0, react.useMemo)(() => {
|
|
162
162
|
const map = /* @__PURE__ */ new Map();
|
|
@@ -185,7 +185,7 @@ function CommandPalette({ commands, open, onOpenChange, onSelect, inline = false
|
|
|
185
185
|
"aria-label": resolvedLabels.input,
|
|
186
186
|
placeholder: resolvedLabels.placeholder,
|
|
187
187
|
onKeyDown: handleInputKeyDown,
|
|
188
|
-
trailing: inputTrailing !== null && inputTrailing !== void 0 ? inputTrailing : !inline ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
188
|
+
trailing: inputTrailing !== null && inputTrailing !== void 0 ? inputTrailing : !inline ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Kbd, { children: resolvedLabels.escape }) : void 0
|
|
189
189
|
}),
|
|
190
190
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(CommandList, {
|
|
191
191
|
"aria-label": resolvedLabels.list,
|
|
@@ -208,7 +208,7 @@ function CommandPalette({ commands, open, onOpenChange, onSelect, inline = false
|
|
|
208
208
|
if (inline) {
|
|
209
209
|
if (!open) return null;
|
|
210
210
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Command, {
|
|
211
|
-
className:
|
|
211
|
+
className: require_text_truncate.cn("border-border bg-surface w-full max-w-lg border shadow-lg", className),
|
|
212
212
|
"data-opt-id": "ATTF5",
|
|
213
213
|
"data-opt-slug": "command-palette.CommandPalette",
|
|
214
214
|
children: body
|
|
@@ -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 =
|
|
266
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$18), customLabels);
|
|
267
267
|
const columnCount = normalizeDashboardColumns(columns);
|
|
268
268
|
const rowStyle = { "--opt-dashboard-grid-columns": `repeat(${columnCount}, minmax(0, 1fr))` };
|
|
269
269
|
const rows = [];
|
|
@@ -283,7 +283,7 @@ function DashboardGrid({ stats, columns = 3, labels: customLabels }) {
|
|
|
283
283
|
children: row.map((stat) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_reopt_ai_opt_ui_primitives.CompositeItem, {
|
|
284
284
|
className: "data-[active-item]:ring-ring data-[active-item]:ring-offset-ring-offset data-[focus-visible]:ring-ring data-[focus-visible]:ring-offset-ring-offset rounded-xl outline-none data-[active-item]:ring-2 data-[active-item]:ring-offset-2 data-[focus-visible]:ring-2 data-[focus-visible]:ring-offset-2",
|
|
285
285
|
render: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { role: "gridcell" }),
|
|
286
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
286
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.StatCard, require_text_truncate._objectSpread2({}, stat))
|
|
287
287
|
}, stat.id))
|
|
288
288
|
}, ri))
|
|
289
289
|
})
|
|
@@ -297,7 +297,7 @@ const defaultLabels$17 = {
|
|
|
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 =
|
|
300
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$17), customLabels);
|
|
301
301
|
const inputId = (0, react.useId)();
|
|
302
302
|
const [query, setQuery] = (0, react.useState)("");
|
|
303
303
|
const [asyncResults, setAsyncResults] = (0, react.useState)([]);
|
|
@@ -358,33 +358,33 @@ function SearchCombobox({ items, placeholder = "검색...", label = "검색", on
|
|
|
358
358
|
className: "gap-element flex flex-col",
|
|
359
359
|
"data-opt-id": "KH4TQ",
|
|
360
360
|
"data-opt-slug": "search-combobox.SearchCombobox",
|
|
361
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
361
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.ComboboxRoot, {
|
|
362
362
|
onValueChange: handleValueChange,
|
|
363
363
|
children: [
|
|
364
364
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
|
|
365
365
|
htmlFor: inputId,
|
|
366
|
-
className:
|
|
366
|
+
className: require_text_truncate.OPT_TEXT_LABEL,
|
|
367
367
|
children: label
|
|
368
368
|
}),
|
|
369
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
369
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.ComboboxInput, {
|
|
370
370
|
id: inputId,
|
|
371
371
|
placeholder,
|
|
372
372
|
className: "max-w-xs",
|
|
373
373
|
"aria-busy": loading || void 0,
|
|
374
374
|
onInput: handleInput
|
|
375
375
|
}),
|
|
376
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
376
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.ComboboxPopover, {
|
|
377
377
|
className: "max-w-xs",
|
|
378
378
|
children: isAsync && loading ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
379
379
|
className: "text-text-secondary gap-element flex items-center px-3 py-2 text-sm",
|
|
380
380
|
role: "status",
|
|
381
381
|
"aria-live": "polite",
|
|
382
382
|
"aria-busy": "true",
|
|
383
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
383
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Spinner, {
|
|
384
384
|
size: "sm",
|
|
385
385
|
"aria-hidden": "true"
|
|
386
386
|
}), labels.loading]
|
|
387
|
-
}) : matches.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
387
|
+
}) : matches.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.ComboboxEmpty, { children: labels.noResults }) : matches.map((item) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.ComboboxItem, {
|
|
388
388
|
value: item,
|
|
389
389
|
children: item
|
|
390
390
|
}, item))
|
|
@@ -402,7 +402,7 @@ const defaultLabels$16 = {
|
|
|
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 =
|
|
405
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$16), 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;
|
|
@@ -412,7 +412,7 @@ function StatusSelect({ options, value: controlledValue, onChange, label, labels
|
|
|
412
412
|
"data-opt-id": "R46E6",
|
|
413
413
|
"data-opt-slug": "status-select.StatusSelect",
|
|
414
414
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
415
|
-
className:
|
|
415
|
+
className: require_text_truncate.OPT_TEXT_LABEL,
|
|
416
416
|
children: resolvedLabel
|
|
417
417
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
418
418
|
className: "text-text-tertiary text-sm",
|
|
@@ -429,16 +429,16 @@ function StatusSelect({ options, value: controlledValue, onChange, label, labels
|
|
|
429
429
|
className: "gap-element flex flex-col",
|
|
430
430
|
"data-opt-id": "R46E6",
|
|
431
431
|
"data-opt-slug": "status-select.StatusSelect",
|
|
432
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
432
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.SelectRoot, {
|
|
433
433
|
value,
|
|
434
434
|
onValueChange: handleChange,
|
|
435
435
|
children: [
|
|
436
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
437
|
-
className:
|
|
436
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.SelectLabel, {
|
|
437
|
+
className: require_text_truncate.OPT_TEXT_LABEL,
|
|
438
438
|
children: resolvedLabel
|
|
439
439
|
}),
|
|
440
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
441
|
-
className: `${
|
|
440
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.SelectTrigger, {
|
|
441
|
+
className: `${require_text_truncate.OPT_INPUT} max-w-xs items-center justify-between ${require_text_truncate.OPT_FOCUS}`,
|
|
442
442
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
443
443
|
className: "gap-element flex items-center",
|
|
444
444
|
children: [(selected === null || selected === void 0 ? void 0 : selected.color) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: `h-2 w-2 rounded-full ${selected.color}` }), selected === null || selected === void 0 ? void 0 : selected.label]
|
|
@@ -456,9 +456,9 @@ function StatusSelect({ options, value: controlledValue, onChange, label, labels
|
|
|
456
456
|
})
|
|
457
457
|
})]
|
|
458
458
|
}),
|
|
459
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
460
|
-
className: `${
|
|
461
|
-
children: options.map((option) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
459
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.SelectPopover, {
|
|
460
|
+
className: `${require_text_truncate.OPT_SURFACE_POPOVER} ${require_text_truncate.OPT_ANIMATE_ENTER_EXIT} max-w-xs`,
|
|
461
|
+
children: options.map((option) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.SelectItem, {
|
|
462
462
|
value: option.value,
|
|
463
463
|
children: [option.color && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: `h-2 w-2 rounded-full ${option.color}` }), option.label]
|
|
464
464
|
}, option.value))
|
|
@@ -471,11 +471,11 @@ function StatusSelect({ options, value: controlledValue, onChange, label, labels
|
|
|
471
471
|
//#region src/shells/app-menubar.tsx
|
|
472
472
|
const defaultLabels$15 = { ariaLabel: "Application menu" };
|
|
473
473
|
function MenuSection({ menu }) {
|
|
474
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
475
|
-
if (item.type === "separator") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
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
|
+
if (item.type === "separator") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.MenuSeparator, {}, `sep-${i}`);
|
|
476
476
|
if (item.type === "checkbox") {
|
|
477
477
|
var _item$name, _item$value;
|
|
478
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
478
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.MenuItemCheckbox, {
|
|
479
479
|
name: (_item$name = item.name) !== null && _item$name !== void 0 ? _item$name : item.id,
|
|
480
480
|
value: (_item$value = item.value) !== null && _item$value !== void 0 ? _item$value : item.id,
|
|
481
481
|
checked: item.checked,
|
|
@@ -491,7 +491,7 @@ function MenuSection({ menu }) {
|
|
|
491
491
|
}
|
|
492
492
|
if (item.type === "radio") {
|
|
493
493
|
var _item$name2, _item$value2;
|
|
494
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
494
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.MenuItemRadio, {
|
|
495
495
|
name: (_item$name2 = item.name) !== null && _item$name2 !== void 0 ? _item$name2 : "",
|
|
496
496
|
value: (_item$value2 = item.value) !== null && _item$value2 !== void 0 ? _item$value2 : "",
|
|
497
497
|
checked: item.checked,
|
|
@@ -505,20 +505,20 @@ function MenuSection({ menu }) {
|
|
|
505
505
|
})
|
|
506
506
|
}, item.id);
|
|
507
507
|
}
|
|
508
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
508
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.MenuItem, {
|
|
509
509
|
onClick: item.onClick,
|
|
510
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: item.label }), item.shortcut && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
510
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: item.label }), item.shortcut && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Kbd, { children: item.shortcut })]
|
|
511
511
|
}, item.id);
|
|
512
512
|
}) })] });
|
|
513
513
|
}
|
|
514
514
|
/** Renders the app menubar component. */
|
|
515
515
|
function AppMenubar({ menus, labels: customLabels }) {
|
|
516
|
-
const labels =
|
|
516
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$15), customLabels);
|
|
517
517
|
if (menus.length === 0) return null;
|
|
518
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
518
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.MenubarRoot, {
|
|
519
519
|
"data-opt-id": "BGKHW",
|
|
520
520
|
"data-opt-slug": "app-menubar.AppMenubar",
|
|
521
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
521
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.MenubarContainer, {
|
|
522
522
|
"aria-label": labels.ariaLabel,
|
|
523
523
|
children: menus.map((menu) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MenuSection, { menu }, menu.id))
|
|
524
524
|
})
|
|
@@ -555,7 +555,7 @@ const defaultSectionStyle = "text-text-secondary";
|
|
|
555
555
|
const defaultLabels$14 = { ariaLabel: "문서 네비게이션" };
|
|
556
556
|
/** Renders the sidebar nav component. */
|
|
557
557
|
function SidebarNav({ items, labels: customLabels }) {
|
|
558
|
-
const labels =
|
|
558
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$14), 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);
|
|
@@ -581,18 +581,18 @@ function SidebarNav({ items, labels: customLabels }) {
|
|
|
581
581
|
const isFirstItem = index === 0;
|
|
582
582
|
const sectionTextStyle = item.sectionLabel ? (_sectionStyles$item$s = sectionStyles[item.sectionLabel]) !== null && _sectionStyles$item$s !== void 0 ? _sectionStyles$item$s : defaultSectionStyle : defaultSectionStyle;
|
|
583
583
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [item.separator && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
584
|
-
className:
|
|
584
|
+
className: require_text_truncate.cn("mb-2 pt-2", !isFirstItem && "mt-7"),
|
|
585
585
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
586
|
-
className:
|
|
586
|
+
className: require_text_truncate.cn("px-2 text-[11px] font-semibold tracking-wider uppercase", sectionTextStyle),
|
|
587
587
|
children: (_item$sectionLabel = item.sectionLabel) !== null && _item$sectionLabel !== void 0 ? _item$sectionLabel : ""
|
|
588
588
|
})
|
|
589
589
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_reopt_ai_opt_ui_primitives.CompositeItem, {
|
|
590
590
|
id: domId(item.id),
|
|
591
591
|
render: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(next_link.default, {
|
|
592
592
|
href: item.href,
|
|
593
|
-
className:
|
|
593
|
+
className: require_text_truncate.cn("group relative block rounded-md px-2 py-1.5 text-[13px] leading-snug outline-none", "transition-all duration-150", !isSelected && ["text-text-secondary", "hover:bg-bg-subtle hover:text-text-primary"], isSelected && ["bg-bg-subtle text-text-primary font-medium"], "data-[active-item]:bg-accent-subtle data-[active-item]:text-accent", "data-[focus-visible]:ring-ring data-[focus-visible]:ring-2", "data-[focus-visible]:ring-offset-ring-offset data-[focus-visible]:ring-offset-2", isSelected && ["data-[active-item]:bg-accent-subtle data-[active-item]:text-accent"])
|
|
594
594
|
}),
|
|
595
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className:
|
|
595
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: require_text_truncate.cn("absolute top-1/2 left-0 h-4 w-0.5 -translate-y-1/2 rounded-full transition-all duration-150", isSelected && "bg-accent", !isSelected && "group-data-[active-item]:bg-accent bg-transparent", "group-data-[focus-visible]:bg-accent") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
596
596
|
className: "pl-2",
|
|
597
597
|
children: item.label
|
|
598
598
|
})]
|
|
@@ -605,15 +605,15 @@ function SidebarNav({ items, labels: customLabels }) {
|
|
|
605
605
|
//#region src/shells/editor-toolbar.tsx
|
|
606
606
|
const defaultLabels$13 = { ariaLabel: "텍스트 편집기 툴바" };
|
|
607
607
|
function ToolbarButtonWithTooltip({ button, active, onAction }) {
|
|
608
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
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"}`,
|
|
610
610
|
onClick: () => onAction === null || onAction === void 0 ? void 0 : onAction(button.id),
|
|
611
611
|
children: button.icon
|
|
612
|
-
}) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
612
|
+
}) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Tooltip, { children: button.label })] });
|
|
613
613
|
}
|
|
614
614
|
/** Renders the editor toolbar component. */
|
|
615
615
|
function EditorToolbar({ buttons, onAction, activeButtons = [], labels: customLabels }) {
|
|
616
|
-
const labels =
|
|
616
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$13), customLabels);
|
|
617
617
|
const groups = [];
|
|
618
618
|
let current = [];
|
|
619
619
|
for (const btn of buttons) {
|
|
@@ -624,14 +624,14 @@ function EditorToolbar({ buttons, onAction, activeButtons = [], labels: customLa
|
|
|
624
624
|
current.push(btn);
|
|
625
625
|
}
|
|
626
626
|
if (current.length) groups.push(current);
|
|
627
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
627
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.ToolbarRoot, {
|
|
628
628
|
"data-opt-id": "Z73K6",
|
|
629
629
|
"data-opt-slug": "editor-toolbar.EditorToolbar",
|
|
630
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
630
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.ToolbarContainer, {
|
|
631
631
|
"aria-label": labels.ariaLabel,
|
|
632
632
|
children: groups.map((group, gi) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
633
633
|
className: "contents",
|
|
634
|
-
children: [gi > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
634
|
+
children: [gi > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.ToolbarSeparator, {}), group.map((item) => {
|
|
635
635
|
if (item === "separator") return null;
|
|
636
636
|
const btn = item;
|
|
637
637
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToolbarButtonWithTooltip, {
|
|
@@ -653,7 +653,7 @@ const defaultLabels$12 = {
|
|
|
653
653
|
/** Renders the content tabs component. */
|
|
654
654
|
function ContentTabs({ tabs, defaultTabId, labels: customLabels }) {
|
|
655
655
|
var _tabs$, _tabs$find;
|
|
656
|
-
const labels =
|
|
656
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$12), 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",
|
|
@@ -666,18 +666,18 @@ function ContentTabs({ tabs, defaultTabId, labels: customLabels }) {
|
|
|
666
666
|
setSelectedTabId(nextId !== null && nextId !== void 0 ? nextId : (_tabs$2 = tabs[0]) === null || _tabs$2 === void 0 ? void 0 : _tabs$2.id);
|
|
667
667
|
};
|
|
668
668
|
const activeTab = (_tabs$find = tabs.find((tab) => tab.id === selectedTabId)) !== null && _tabs$find !== void 0 ? _tabs$find : tabs[0];
|
|
669
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
669
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.TabsRoot, {
|
|
670
670
|
selectedId: selectedTabId,
|
|
671
671
|
onSelectedIdChange: handleSelectedTabId,
|
|
672
672
|
"data-opt-id": "9W97K",
|
|
673
673
|
"data-opt-slug": "content-tabs.ContentTabs",
|
|
674
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
674
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.TabList, {
|
|
675
675
|
"aria-label": labels.ariaLabel,
|
|
676
|
-
children: tabs.map((tab) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
676
|
+
children: tabs.map((tab) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Tab, {
|
|
677
677
|
id: tab.id,
|
|
678
678
|
children: tab.label
|
|
679
679
|
}, tab.id))
|
|
680
|
-
}), activeTab && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
680
|
+
}), activeTab && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.TabPanel, {
|
|
681
681
|
tabId: activeTab.id,
|
|
682
682
|
children: activeTab.content
|
|
683
683
|
})]
|
|
@@ -691,7 +691,7 @@ const defaultLabels$11 = {
|
|
|
691
691
|
};
|
|
692
692
|
/** Renders the faq accordion component. */
|
|
693
693
|
function FaqAccordion({ items, labels: customLabels }) {
|
|
694
|
-
const labels =
|
|
694
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$11), 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",
|
|
@@ -707,8 +707,8 @@ function FaqAccordion({ items, labels: customLabels }) {
|
|
|
707
707
|
role: "region",
|
|
708
708
|
"aria-label": labels.ariaLabel,
|
|
709
709
|
className: "divide-border-subtle border-border divide-y rounded-lg border",
|
|
710
|
-
children: items.map((faq) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
711
|
-
render: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
710
|
+
children: items.map((faq) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.DisclosureRoot, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_reopt_ai_opt_ui_primitives.CompositeItem, {
|
|
711
|
+
render: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.DisclosureTrigger, {}),
|
|
712
712
|
children: [faq.question, /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
|
|
713
713
|
className: "text-text-tertiary h-4 w-4 shrink-0 transition-transform [[data-open]>&]:rotate-180",
|
|
714
714
|
fill: "none",
|
|
@@ -722,7 +722,7 @@ function FaqAccordion({ items, labels: customLabels }) {
|
|
|
722
722
|
d: "m19.5 8.25-7.5 7.5-7.5-7.5"
|
|
723
723
|
})
|
|
724
724
|
})]
|
|
725
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
725
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.DisclosureContent, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
726
726
|
className: "text-text-secondary px-4 pt-2 pb-4 text-sm",
|
|
727
727
|
children: faq.answer
|
|
728
728
|
}) })] }) }, faq.id))
|
|
@@ -738,7 +738,7 @@ const defaultLabels$10 = {
|
|
|
738
738
|
};
|
|
739
739
|
/** Renders the settings form component. */
|
|
740
740
|
function SettingsForm({ fields, onSubmit, labels: customLabels }) {
|
|
741
|
-
const labels =
|
|
741
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$10), customLabels);
|
|
742
742
|
const [submitted, setSubmitted] = (0, react.useState)(false);
|
|
743
743
|
const defaultValues = {};
|
|
744
744
|
for (const field of fields) {
|
|
@@ -770,7 +770,7 @@ function SettingsForm({ fields, onSubmit, labels: customLabels }) {
|
|
|
770
770
|
onSubmit === null || onSubmit === void 0 || onSubmit(values);
|
|
771
771
|
}
|
|
772
772
|
});
|
|
773
|
-
if (fields.length === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
773
|
+
if (fields.length === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.EmptyState, {
|
|
774
774
|
title: "설정 항목이 없습니다.",
|
|
775
775
|
description: "표시할 설정 필드를 추가하면 이 폼이 렌더링됩니다.",
|
|
776
776
|
"data-opt-id": "9TEEJ",
|
|
@@ -780,7 +780,7 @@ function SettingsForm({ fields, onSubmit, labels: customLabels }) {
|
|
|
780
780
|
className: "gap-group flex flex-col",
|
|
781
781
|
"data-opt-id": "9TEEJ",
|
|
782
782
|
"data-opt-slug": "settings-form.SettingsForm",
|
|
783
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
783
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.FormRoot, {
|
|
784
784
|
store: form,
|
|
785
785
|
"aria-label": labels.formAriaLabel,
|
|
786
786
|
children: [fields.map((field) => {
|
|
@@ -795,16 +795,16 @@ function SettingsForm({ fields, onSubmit, labels: customLabels }) {
|
|
|
795
795
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
796
796
|
className: "gap-element flex flex-col",
|
|
797
797
|
children: [
|
|
798
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
798
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormLabel, {
|
|
799
799
|
name: field.name,
|
|
800
800
|
children: field.label
|
|
801
801
|
}),
|
|
802
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
802
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.TagInput, {
|
|
803
803
|
value: tags,
|
|
804
804
|
onChange: (next) => form.setValue(field.name, next),
|
|
805
805
|
placeholder: field.placeholder
|
|
806
806
|
}),
|
|
807
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
807
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormError, { name: field.name })
|
|
808
808
|
]
|
|
809
809
|
}, field.name);
|
|
810
810
|
}
|
|
@@ -817,17 +817,17 @@ function SettingsForm({ fields, onSubmit, labels: customLabels }) {
|
|
|
817
817
|
className: "text-text-primary text-sm font-medium",
|
|
818
818
|
children: field.label
|
|
819
819
|
}),
|
|
820
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
820
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormRadioGroup, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
821
821
|
className: "gap-group flex",
|
|
822
822
|
children: (_field$options = field.options) === null || _field$options === void 0 ? void 0 : _field$options.map((option) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
823
823
|
className: "text-text-primary gap-element flex items-center text-sm",
|
|
824
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
824
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormRadio, {
|
|
825
825
|
name: field.name,
|
|
826
826
|
value: option.value
|
|
827
827
|
}), option.label]
|
|
828
828
|
}, option.value))
|
|
829
829
|
}) }),
|
|
830
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
830
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormError, { name: field.name })
|
|
831
831
|
]
|
|
832
832
|
}, field.name);
|
|
833
833
|
}
|
|
@@ -835,26 +835,26 @@ function SettingsForm({ fields, onSubmit, labels: customLabels }) {
|
|
|
835
835
|
className: "gap-element flex flex-col",
|
|
836
836
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
837
837
|
className: "text-text-primary gap-element flex items-center text-sm",
|
|
838
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
839
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
838
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormCheckbox, { name: field.name }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: field.label })]
|
|
839
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormError, { name: field.name })]
|
|
840
840
|
}, field.name);
|
|
841
841
|
if (field.type === "textarea") {
|
|
842
842
|
var _field$rows, _field$resize;
|
|
843
843
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
844
844
|
className: "gap-element flex flex-col",
|
|
845
845
|
children: [
|
|
846
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
846
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormLabel, {
|
|
847
847
|
name: field.name,
|
|
848
848
|
children: field.label
|
|
849
849
|
}),
|
|
850
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
850
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormTextarea, {
|
|
851
851
|
name: field.name,
|
|
852
852
|
placeholder: field.placeholder,
|
|
853
853
|
rows: (_field$rows = field.rows) !== null && _field$rows !== void 0 ? _field$rows : 4,
|
|
854
854
|
resize: (_field$resize = field.resize) !== null && _field$resize !== void 0 ? _field$resize : "vertical",
|
|
855
855
|
className: field.font === "mono" ? "font-mono text-sm" : void 0
|
|
856
856
|
}),
|
|
857
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
857
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormError, { name: field.name })
|
|
858
858
|
]
|
|
859
859
|
}, field.name);
|
|
860
860
|
}
|
|
@@ -863,25 +863,25 @@ function SettingsForm({ fields, onSubmit, labels: customLabels }) {
|
|
|
863
863
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
864
864
|
className: "gap-element flex flex-col",
|
|
865
865
|
children: [
|
|
866
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
866
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormLabel, {
|
|
867
867
|
name: field.name,
|
|
868
868
|
children: field.label
|
|
869
869
|
}),
|
|
870
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
870
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormSelect, {
|
|
871
871
|
name: field.name,
|
|
872
872
|
placeholder: field.placeholder,
|
|
873
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
873
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormSelectPopover, { children: (_field$options2 = field.options) === null || _field$options2 === void 0 ? void 0 : _field$options2.map((option) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormSelectItem, {
|
|
874
874
|
value: option.value,
|
|
875
875
|
children: option.label
|
|
876
876
|
}, option.value)) })
|
|
877
877
|
}),
|
|
878
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
878
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormError, { name: field.name })
|
|
879
879
|
]
|
|
880
880
|
}, field.name);
|
|
881
881
|
}
|
|
882
882
|
if (field.type === "switch") return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
883
883
|
className: "gap-group flex items-center",
|
|
884
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
884
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormSwitch, { name: field.name }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
885
885
|
className: "flex flex-col",
|
|
886
886
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
887
887
|
className: "text-text-primary text-sm font-medium",
|
|
@@ -895,19 +895,19 @@ function SettingsForm({ fields, onSubmit, labels: customLabels }) {
|
|
|
895
895
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
896
896
|
className: "gap-element flex flex-col",
|
|
897
897
|
children: [
|
|
898
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
898
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormLabel, {
|
|
899
899
|
name: field.name,
|
|
900
900
|
children: field.label
|
|
901
901
|
}),
|
|
902
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
902
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormInput, {
|
|
903
903
|
name: field.name,
|
|
904
904
|
type: (_field$type = field.type) !== null && _field$type !== void 0 ? _field$type : "text",
|
|
905
905
|
placeholder: field.placeholder
|
|
906
906
|
}),
|
|
907
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
907
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormError, { name: field.name })
|
|
908
908
|
]
|
|
909
909
|
}, field.name);
|
|
910
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
910
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormSubmit, { children: labels.submitButton })]
|
|
911
911
|
}), submitted && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
912
912
|
className: "border-success bg-success-subtle text-success-fg rounded-lg border p-3 text-sm",
|
|
913
913
|
children: labels.successMessage
|
|
@@ -925,17 +925,17 @@ const statusIcon = {
|
|
|
925
925
|
};
|
|
926
926
|
const statusColor = {
|
|
927
927
|
success: "text-success-fg",
|
|
928
|
-
pending:
|
|
928
|
+
pending: require_text_truncate.OPT_TEXT_TERTIARY,
|
|
929
929
|
running: "text-accent",
|
|
930
930
|
error: "text-danger-fg",
|
|
931
931
|
skipped: "text-text-tertiary"
|
|
932
932
|
};
|
|
933
933
|
const statusBadge$1 = {
|
|
934
|
-
success:
|
|
935
|
-
pending:
|
|
934
|
+
success: require_text_truncate.OPT_BADGE_GREEN,
|
|
935
|
+
pending: require_text_truncate.OPT_BADGE_NEUTRAL,
|
|
936
936
|
running: "inline-flex items-center rounded-full px-2 py-0.5 text-[11px] font-medium bg-info-subtle text-info-fg",
|
|
937
|
-
error:
|
|
938
|
-
skipped:
|
|
937
|
+
error: require_text_truncate.OPT_BADGE_RED,
|
|
938
|
+
skipped: require_text_truncate.OPT_BADGE_NEUTRAL
|
|
939
939
|
};
|
|
940
940
|
const statusLabel$1 = {
|
|
941
941
|
success: "성공",
|
|
@@ -963,7 +963,7 @@ function DeploymentTimeline({ steps, title = "배포 타임라인" }) {
|
|
|
963
963
|
children: steps.map((step, i) => {
|
|
964
964
|
const isLast = i === steps.length - 1;
|
|
965
965
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_reopt_ai_opt_ui_primitives.CompositeItem, {
|
|
966
|
-
className: `group gap-group relative flex w-full scroll-m-2 rounded-lg px-3 py-2 ${
|
|
966
|
+
className: `group gap-group relative flex w-full scroll-m-2 rounded-lg px-3 py-2 ${require_text_truncate.OPT_FOCUS} data-[active-item]:bg-accent-subtle`,
|
|
967
967
|
role: "listitem",
|
|
968
968
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
969
969
|
className: "flex flex-col items-center",
|
|
@@ -978,7 +978,7 @@ function DeploymentTimeline({ steps, title = "배포 타임라인" }) {
|
|
|
978
978
|
className: "gap-element flex items-center",
|
|
979
979
|
children: [
|
|
980
980
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
981
|
-
className: `text-sm font-medium ${
|
|
981
|
+
className: `text-sm font-medium ${require_text_truncate.OPT_TEXT_PRIMARY}`,
|
|
982
982
|
children: step.name
|
|
983
983
|
}),
|
|
984
984
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -1004,9 +1004,9 @@ function DeploymentTimeline({ steps, title = "배포 타임라인" }) {
|
|
|
1004
1004
|
//#endregion
|
|
1005
1005
|
//#region src/shells/project-switcher.tsx
|
|
1006
1006
|
const statusDot = {
|
|
1007
|
-
active:
|
|
1008
|
-
paused:
|
|
1009
|
-
error:
|
|
1007
|
+
active: require_text_truncate.OPT_DOT_GREEN,
|
|
1008
|
+
paused: require_text_truncate.OPT_DOT_YELLOW,
|
|
1009
|
+
error: require_text_truncate.OPT_DOT_RED
|
|
1010
1010
|
};
|
|
1011
1011
|
/** Renders the project switcher component. */
|
|
1012
1012
|
function ProjectSwitcher({ projects, value, onChange, placeholder = "프로젝트 검색..." }) {
|
|
@@ -1020,26 +1020,26 @@ function ProjectSwitcher({ projects, value, onChange, placeholder = "프로젝
|
|
|
1020
1020
|
className: "gap-element flex flex-col",
|
|
1021
1021
|
"data-opt-id": "5R3AG",
|
|
1022
1022
|
"data-opt-slug": "project-switcher.ProjectSwitcher",
|
|
1023
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
1023
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.ComboboxRoot, {
|
|
1024
1024
|
onValueChange: setSearch,
|
|
1025
1025
|
children: [
|
|
1026
1026
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
|
|
1027
|
-
className:
|
|
1027
|
+
className: require_text_truncate.OPT_TEXT_LABEL,
|
|
1028
1028
|
children: "프로젝트"
|
|
1029
1029
|
}),
|
|
1030
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1030
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.ComboboxInput, {
|
|
1031
1031
|
placeholder: selected ? selected.name : placeholder,
|
|
1032
|
-
className:
|
|
1032
|
+
className: require_text_truncate.OPT_INPUT
|
|
1033
1033
|
}),
|
|
1034
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
1034
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.ComboboxPopover, {
|
|
1035
1035
|
className: "max-h-72 overflow-y-auto",
|
|
1036
1036
|
children: [matches.length === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
1037
1037
|
className: `py-6 text-center text-sm text-text-secondary`,
|
|
1038
1038
|
children: "결과가 없습니다."
|
|
1039
|
-
}), matches.map((project) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
1039
|
+
}), matches.map((project) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.ComboboxItem, {
|
|
1040
1040
|
value: project.name,
|
|
1041
1041
|
onClick: () => onChange === null || onChange === void 0 ? void 0 : onChange(project.id),
|
|
1042
|
-
className: `gap-element flex scroll-m-2 items-center ${
|
|
1042
|
+
className: `gap-element flex scroll-m-2 items-center ${require_text_truncate.OPT_ITEM_BASE} ${require_text_truncate.OPT_ACTIVE_ITEM}`,
|
|
1043
1043
|
children: [
|
|
1044
1044
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: `shrink-0 ${statusDot[project.status]}` }),
|
|
1045
1045
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -1047,7 +1047,7 @@ function ProjectSwitcher({ projects, value, onChange, placeholder = "프로젝
|
|
|
1047
1047
|
children: project.name
|
|
1048
1048
|
}),
|
|
1049
1049
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1050
|
-
className:
|
|
1050
|
+
className: require_text_truncate.OPT_BADGE_NEUTRAL,
|
|
1051
1051
|
children: project.framework
|
|
1052
1052
|
}),
|
|
1053
1053
|
project.domain && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -1070,23 +1070,23 @@ const defaultLabels$9 = {
|
|
|
1070
1070
|
secretBadge: "secret"
|
|
1071
1071
|
};
|
|
1072
1072
|
const envDot = {
|
|
1073
|
-
Production:
|
|
1074
|
-
Preview:
|
|
1075
|
-
Development:
|
|
1073
|
+
Production: require_text_truncate.OPT_DOT_RED,
|
|
1074
|
+
Preview: require_text_truncate.OPT_DOT_YELLOW,
|
|
1075
|
+
Development: require_text_truncate.OPT_DOT_GREEN
|
|
1076
1076
|
};
|
|
1077
1077
|
/** Renders the env panel component. */
|
|
1078
1078
|
function EnvPanel({ groups, labels: customLabels }) {
|
|
1079
|
-
const labels =
|
|
1079
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$9), customLabels);
|
|
1080
1080
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1081
|
-
className: `rounded-lg ${
|
|
1081
|
+
className: `rounded-lg ${require_text_truncate.OPT_BORDER} divide-y ${require_text_truncate.OPT_DIVIDER} bg-surface`,
|
|
1082
1082
|
"data-opt-id": "ZBDWK",
|
|
1083
1083
|
"data-opt-slug": "env-panel.EnvPanel",
|
|
1084
1084
|
children: groups.map((group) => {
|
|
1085
1085
|
var _envDot$group$env;
|
|
1086
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1086
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.DisclosureRoot, {
|
|
1087
1087
|
defaultOpen: group.env === "Production",
|
|
1088
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
1089
|
-
className:
|
|
1088
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.DisclosureTrigger, {
|
|
1089
|
+
className: require_text_truncate.OPT_DISCLOSURE_TRIGGER,
|
|
1090
1090
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
1091
1091
|
className: "gap-element flex items-center",
|
|
1092
1092
|
children: [
|
|
@@ -1096,7 +1096,7 @@ function EnvPanel({ groups, labels: customLabels }) {
|
|
|
1096
1096
|
children: group.env
|
|
1097
1097
|
}),
|
|
1098
1098
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1099
|
-
className: `text-xs ${
|
|
1099
|
+
className: `text-xs ${require_text_truncate.OPT_TEXT_TERTIARY}`,
|
|
1100
1100
|
children: labels.varCount(group.vars.length)
|
|
1101
1101
|
})
|
|
1102
1102
|
]
|
|
@@ -1113,8 +1113,8 @@ function EnvPanel({ groups, labels: customLabels }) {
|
|
|
1113
1113
|
d: "m19.5 8.25-7.5 7.5-7.5-7.5"
|
|
1114
1114
|
})
|
|
1115
1115
|
})]
|
|
1116
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1117
|
-
className:
|
|
1116
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.DisclosureContent, {
|
|
1117
|
+
className: require_text_truncate.OPT_DISCLOSURE_CONTENT,
|
|
1118
1118
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_reopt_ai_opt_ui_primitives.CompositeProvider, {
|
|
1119
1119
|
focusLoop: true,
|
|
1120
1120
|
orientation: "vertical",
|
|
@@ -1124,18 +1124,18 @@ function EnvPanel({ groups, labels: customLabels }) {
|
|
|
1124
1124
|
className: "px-4 pb-3",
|
|
1125
1125
|
children: group.vars.map((v) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_reopt_ai_opt_ui_primitives.CompositeItem, {
|
|
1126
1126
|
role: "listitem",
|
|
1127
|
-
className: `gap-group flex scroll-m-2 items-center rounded px-2 py-1.5 text-sm ${
|
|
1127
|
+
className: `gap-group flex scroll-m-2 items-center rounded px-2 py-1.5 text-sm ${require_text_truncate.OPT_FOCUS} data-[active-item]:bg-accent-subtle`,
|
|
1128
1128
|
children: [
|
|
1129
1129
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1130
|
-
className: `w-44 shrink-0 truncate font-mono text-xs font-medium ${
|
|
1130
|
+
className: `w-44 shrink-0 truncate font-mono text-xs font-medium ${require_text_truncate.OPT_TEXT_PRIMARY}`,
|
|
1131
1131
|
children: v.key
|
|
1132
1132
|
}),
|
|
1133
1133
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1134
|
-
className: `flex-1 truncate font-mono text-xs ${
|
|
1134
|
+
className: `flex-1 truncate font-mono text-xs ${require_text_truncate.OPT_TEXT_SECONDARY}`,
|
|
1135
1135
|
children: v.isSecret ? "••••••••" : v.value
|
|
1136
1136
|
}),
|
|
1137
1137
|
v.isSecret && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1138
|
-
className:
|
|
1138
|
+
className: require_text_truncate.OPT_BADGE_NEUTRAL,
|
|
1139
1139
|
children: labels.secretBadge
|
|
1140
1140
|
})
|
|
1141
1141
|
]
|
|
@@ -1158,7 +1158,7 @@ const defaultLabels$8 = {
|
|
|
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 =
|
|
1161
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$8), 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 : "");
|
|
@@ -1169,10 +1169,10 @@ function BranchSelect({ branches, value: controlledValue, onChange, label, label
|
|
|
1169
1169
|
"data-opt-id": "7EDEP",
|
|
1170
1170
|
"data-opt-slug": "branch-select.BranchSelect",
|
|
1171
1171
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1172
|
-
className:
|
|
1172
|
+
className: require_text_truncate.OPT_TEXT_LABEL,
|
|
1173
1173
|
children: resolvedLabel
|
|
1174
1174
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1175
|
-
className:
|
|
1175
|
+
className: require_text_truncate.OPT_TEXT_TERTIARY,
|
|
1176
1176
|
children: labels.emptyMessage
|
|
1177
1177
|
})]
|
|
1178
1178
|
});
|
|
@@ -1186,16 +1186,16 @@ function BranchSelect({ branches, value: controlledValue, onChange, label, label
|
|
|
1186
1186
|
className: "gap-element flex flex-col",
|
|
1187
1187
|
"data-opt-id": "7EDEP",
|
|
1188
1188
|
"data-opt-slug": "branch-select.BranchSelect",
|
|
1189
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
1189
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.SelectRoot, {
|
|
1190
1190
|
value,
|
|
1191
1191
|
onValueChange: handleChange,
|
|
1192
1192
|
children: [
|
|
1193
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1194
|
-
className:
|
|
1193
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.SelectLabel, {
|
|
1194
|
+
className: require_text_truncate.OPT_TEXT_LABEL,
|
|
1195
1195
|
children: resolvedLabel
|
|
1196
1196
|
}),
|
|
1197
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
1198
|
-
className: `${
|
|
1197
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.SelectTrigger, {
|
|
1198
|
+
className: `${require_text_truncate.OPT_INPUT} max-w-xs items-center justify-between gap-1`,
|
|
1199
1199
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
1200
1200
|
className: "gap-element flex items-center truncate",
|
|
1201
1201
|
children: [
|
|
@@ -1217,7 +1217,7 @@ function BranchSelect({ branches, value: controlledValue, onChange, label, label
|
|
|
1217
1217
|
children: (_selected$name = selected === null || selected === void 0 ? void 0 : selected.name) !== null && _selected$name !== void 0 ? _selected$name : labels.emptySelectionLabel
|
|
1218
1218
|
}),
|
|
1219
1219
|
(selected === null || selected === void 0 ? void 0 : selected.isDefault) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1220
|
-
className:
|
|
1220
|
+
className: require_text_truncate.OPT_BADGE_BLUE,
|
|
1221
1221
|
children: labels.defaultBadge
|
|
1222
1222
|
})
|
|
1223
1223
|
]
|
|
@@ -1235,11 +1235,11 @@ function BranchSelect({ branches, value: controlledValue, onChange, label, label
|
|
|
1235
1235
|
})
|
|
1236
1236
|
})]
|
|
1237
1237
|
}),
|
|
1238
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1238
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.SelectPopover, {
|
|
1239
1239
|
className: "max-w-xs",
|
|
1240
|
-
children: branches.map((branch) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
1240
|
+
children: branches.map((branch) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.SelectItem, {
|
|
1241
1241
|
value: branch.name,
|
|
1242
|
-
className: `gap-element flex scroll-m-2 items-center ${
|
|
1242
|
+
className: `gap-element flex scroll-m-2 items-center ${require_text_truncate.OPT_ITEM_BASE} ${require_text_truncate.OPT_ACTIVE_ITEM}`,
|
|
1243
1243
|
children: [
|
|
1244
1244
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1245
1245
|
className: "flex-1 truncate",
|
|
@@ -1276,14 +1276,14 @@ const defaultLabels$7 = {
|
|
|
1276
1276
|
emptyMessage: "No domains configured"
|
|
1277
1277
|
};
|
|
1278
1278
|
const statusBadge = {
|
|
1279
|
-
active:
|
|
1280
|
-
pending:
|
|
1281
|
-
error:
|
|
1279
|
+
active: require_text_truncate.OPT_BADGE_GREEN,
|
|
1280
|
+
pending: require_text_truncate.OPT_BADGE_YELLOW,
|
|
1281
|
+
error: require_text_truncate.OPT_BADGE_RED
|
|
1282
1282
|
};
|
|
1283
1283
|
const sslBadge = {
|
|
1284
|
-
valid:
|
|
1285
|
-
pending:
|
|
1286
|
-
expired:
|
|
1284
|
+
valid: require_text_truncate.OPT_BADGE_GREEN,
|
|
1285
|
+
pending: require_text_truncate.OPT_BADGE_YELLOW,
|
|
1286
|
+
expired: require_text_truncate.OPT_BADGE_RED
|
|
1287
1287
|
};
|
|
1288
1288
|
const statusLabel = {
|
|
1289
1289
|
active: "Active",
|
|
@@ -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 =
|
|
1300
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$7), 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",
|
|
@@ -1306,7 +1306,7 @@ function DomainTable({ domains, title = "도메인", labels: customLabels }) {
|
|
|
1306
1306
|
className: `text-sm font-semibold text-text-primary`,
|
|
1307
1307
|
children: title
|
|
1308
1308
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1309
|
-
className: `rounded-lg px-4 py-6 text-sm ${
|
|
1309
|
+
className: `rounded-lg px-4 py-6 text-sm ${require_text_truncate.OPT_BORDER} ${require_text_truncate.OPT_TEXT_SECONDARY} bg-surface`,
|
|
1310
1310
|
children: labels.emptyMessage
|
|
1311
1311
|
})]
|
|
1312
1312
|
});
|
|
@@ -1318,7 +1318,7 @@ function DomainTable({ domains, title = "도메인", labels: customLabels }) {
|
|
|
1318
1318
|
className: `text-sm font-semibold text-text-primary`,
|
|
1319
1319
|
children: title
|
|
1320
1320
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1321
|
-
className: `overflow-x-auto rounded-lg ${
|
|
1321
|
+
className: `overflow-x-auto rounded-lg ${require_text_truncate.OPT_BORDER} bg-surface`,
|
|
1322
1322
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_reopt_ai_opt_ui_primitives.CompositeProvider, {
|
|
1323
1323
|
focusLoop: true,
|
|
1324
1324
|
focusWrap: true,
|
|
@@ -1331,28 +1331,28 @@ function DomainTable({ domains, title = "도메인", labels: customLabels }) {
|
|
|
1331
1331
|
className: "border-border-subtle bg-surface-inset border-b",
|
|
1332
1332
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("tr", { children: [
|
|
1333
1333
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", {
|
|
1334
|
-
className:
|
|
1334
|
+
className: require_text_truncate.OPT_TH,
|
|
1335
1335
|
children: labels.domain
|
|
1336
1336
|
}),
|
|
1337
1337
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", {
|
|
1338
|
-
className:
|
|
1338
|
+
className: require_text_truncate.OPT_TH,
|
|
1339
1339
|
children: labels.status
|
|
1340
1340
|
}),
|
|
1341
1341
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", {
|
|
1342
|
-
className:
|
|
1342
|
+
className: require_text_truncate.OPT_TH,
|
|
1343
1343
|
children: labels.ssl
|
|
1344
1344
|
}),
|
|
1345
1345
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", {
|
|
1346
|
-
className:
|
|
1346
|
+
className: require_text_truncate.OPT_TH,
|
|
1347
1347
|
children: labels.redirect
|
|
1348
1348
|
}),
|
|
1349
1349
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", {
|
|
1350
|
-
className:
|
|
1350
|
+
className: require_text_truncate.OPT_TH,
|
|
1351
1351
|
children: labels.added
|
|
1352
1352
|
})
|
|
1353
1353
|
] })
|
|
1354
1354
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tbody", {
|
|
1355
|
-
className: `divide-y ${
|
|
1355
|
+
className: `divide-y ${require_text_truncate.OPT_DIVIDER}`,
|
|
1356
1356
|
children: domains.map((d) => {
|
|
1357
1357
|
var _d$redirect, _d$addedAt;
|
|
1358
1358
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_reopt_ai_opt_ui_primitives.CompositeRow, {
|
|
@@ -1360,18 +1360,18 @@ function DomainTable({ domains, title = "도메인", labels: customLabels }) {
|
|
|
1360
1360
|
children: [
|
|
1361
1361
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_reopt_ai_opt_ui_primitives.CompositeItem, {
|
|
1362
1362
|
render: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
|
|
1363
|
-
className: `${
|
|
1363
|
+
className: `${require_text_truncate.OPT_TD} font-mono font-medium`,
|
|
1364
1364
|
role: "gridcell"
|
|
1365
1365
|
}),
|
|
1366
|
-
className:
|
|
1366
|
+
className: require_text_truncate.OPT_TABLE_ROW_ACTIVE,
|
|
1367
1367
|
children: d.domain
|
|
1368
1368
|
}),
|
|
1369
1369
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_reopt_ai_opt_ui_primitives.CompositeItem, {
|
|
1370
1370
|
render: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
|
|
1371
|
-
className:
|
|
1371
|
+
className: require_text_truncate.OPT_TD,
|
|
1372
1372
|
role: "gridcell"
|
|
1373
1373
|
}),
|
|
1374
|
-
className:
|
|
1374
|
+
className: require_text_truncate.OPT_TABLE_ROW_ACTIVE,
|
|
1375
1375
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1376
1376
|
className: statusBadge[d.status],
|
|
1377
1377
|
children: statusLabel[d.status]
|
|
@@ -1379,10 +1379,10 @@ function DomainTable({ domains, title = "도메인", labels: customLabels }) {
|
|
|
1379
1379
|
}),
|
|
1380
1380
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_reopt_ai_opt_ui_primitives.CompositeItem, {
|
|
1381
1381
|
render: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
|
|
1382
|
-
className:
|
|
1382
|
+
className: require_text_truncate.OPT_TD,
|
|
1383
1383
|
role: "gridcell"
|
|
1384
1384
|
}),
|
|
1385
|
-
className:
|
|
1385
|
+
className: require_text_truncate.OPT_TABLE_ROW_ACTIVE,
|
|
1386
1386
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1387
1387
|
className: sslBadge[d.ssl],
|
|
1388
1388
|
children: sslLabel[d.ssl]
|
|
@@ -1390,18 +1390,18 @@ function DomainTable({ domains, title = "도메인", labels: customLabels }) {
|
|
|
1390
1390
|
}),
|
|
1391
1391
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_reopt_ai_opt_ui_primitives.CompositeItem, {
|
|
1392
1392
|
render: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
|
|
1393
|
-
className:
|
|
1393
|
+
className: require_text_truncate.OPT_TD,
|
|
1394
1394
|
role: "gridcell"
|
|
1395
1395
|
}),
|
|
1396
|
-
className:
|
|
1396
|
+
className: require_text_truncate.OPT_TABLE_ROW_ACTIVE,
|
|
1397
1397
|
children: (_d$redirect = d.redirect) !== null && _d$redirect !== void 0 ? _d$redirect : "—"
|
|
1398
1398
|
}),
|
|
1399
1399
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_reopt_ai_opt_ui_primitives.CompositeItem, {
|
|
1400
1400
|
render: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
|
|
1401
|
-
className:
|
|
1401
|
+
className: require_text_truncate.OPT_TD_MUTED,
|
|
1402
1402
|
role: "gridcell"
|
|
1403
1403
|
}),
|
|
1404
|
-
className:
|
|
1404
|
+
className: require_text_truncate.OPT_TABLE_ROW_ACTIVE,
|
|
1405
1405
|
children: (_d$addedAt = d.addedAt) !== null && _d$addedAt !== void 0 ? _d$addedAt : "—"
|
|
1406
1406
|
})
|
|
1407
1407
|
]
|
|
@@ -1469,7 +1469,7 @@ function DataTableProgressBar({ value, barColor, label }) {
|
|
|
1469
1469
|
"aria-valuetext": `${percent}%`,
|
|
1470
1470
|
"aria-label": label,
|
|
1471
1471
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1472
|
-
className:
|
|
1472
|
+
className: require_text_truncate.cn("h-full rounded-full transition-all", barColor),
|
|
1473
1473
|
style: { width: `${percent}%` }
|
|
1474
1474
|
})
|
|
1475
1475
|
});
|
|
@@ -1551,18 +1551,18 @@ function DataTable({ data, columns, keyExtractor, title = "Data Table", onRowCli
|
|
|
1551
1551
|
};
|
|
1552
1552
|
const colCount = columns.length + (selectable ? 1 : 0) + (expandable ? 1 : 0);
|
|
1553
1553
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1554
|
-
className:
|
|
1554
|
+
className: require_text_truncate.cn("gap-group flex flex-col", className),
|
|
1555
1555
|
"data-opt-id": "J1KN4",
|
|
1556
1556
|
"data-opt-slug": "data-table.DataTable",
|
|
1557
1557
|
children: [
|
|
1558
1558
|
title && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
|
|
1559
|
-
className:
|
|
1559
|
+
className: require_text_truncate.cn("text-sm font-semibold", "text-text-primary"),
|
|
1560
1560
|
children: title
|
|
1561
1561
|
}),
|
|
1562
1562
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1563
|
-
className:
|
|
1563
|
+
className: require_text_truncate.cn("overflow-x-auto rounded-lg", require_text_truncate.OPT_BORDER, "bg-surface"),
|
|
1564
1564
|
children: data.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1565
|
-
className:
|
|
1565
|
+
className: require_text_truncate.cn("px-4 py-8 text-center text-sm", require_text_truncate.OPT_TEXT_SECONDARY),
|
|
1566
1566
|
children: emptyMessage
|
|
1567
1567
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_reopt_ai_opt_ui_primitives.CompositeProvider, {
|
|
1568
1568
|
focusLoop: true,
|
|
@@ -1573,24 +1573,24 @@ function DataTable({ data, columns, keyExtractor, title = "Data Table", onRowCli
|
|
|
1573
1573
|
className: "w-full",
|
|
1574
1574
|
render: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("table", {}),
|
|
1575
1575
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("thead", {
|
|
1576
|
-
className:
|
|
1576
|
+
className: require_text_truncate.cn("border-border-subtle bg-surface-inset border-b", stickyHeader && "sticky top-0 z-10"),
|
|
1577
1577
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("tr", { children: [
|
|
1578
1578
|
selectable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", {
|
|
1579
|
-
className:
|
|
1580
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1579
|
+
className: require_text_truncate.cn("px-3 py-2.5 text-left text-xs font-semibold uppercase tracking-wider text-text-tertiary", "w-10"),
|
|
1580
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Checkbox, {
|
|
1581
1581
|
checked: allSelected,
|
|
1582
1582
|
onChange: toggleSelectAll,
|
|
1583
1583
|
"aria-label": "Select all"
|
|
1584
1584
|
})
|
|
1585
1585
|
}),
|
|
1586
|
-
expandable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", { className:
|
|
1586
|
+
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") }),
|
|
1587
1587
|
columns.map((col) => {
|
|
1588
1588
|
var _col$align;
|
|
1589
1589
|
const isSortable = sortable && col.sortable !== false;
|
|
1590
1590
|
const resizeValue = getResizeHandleValue(colWidths[col.id], col.width);
|
|
1591
1591
|
const resizeMax = Math.max(DEFAULT_COLUMN_RESIZE_MAX, resizeValue);
|
|
1592
1592
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("th", {
|
|
1593
|
-
className:
|
|
1593
|
+
className: require_text_truncate.cn(require_text_truncate.OPT_TH, "relative", alignmentClass[(_col$align = col.align) !== null && _col$align !== void 0 ? _col$align : "left"], isSortable && "hover:text-text-primary cursor-pointer select-none", isSortable && "outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-ring-offset"),
|
|
1594
1594
|
style: { width: colWidths[col.id] || col.width || void 0 },
|
|
1595
1595
|
onClick: isSortable ? () => handleSort(col.id) : void 0,
|
|
1596
1596
|
onKeyDown: (event) => {
|
|
@@ -1618,14 +1618,14 @@ function DataTable({ data, columns, keyExtractor, title = "Data Table", onRowCli
|
|
|
1618
1618
|
e.preventDefault();
|
|
1619
1619
|
e.stopPropagation();
|
|
1620
1620
|
if (e.key === "Home" || e.key === "End") {
|
|
1621
|
-
setColWidths((prev) =>
|
|
1621
|
+
setColWidths((prev) => require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, prev), {}, { [col.id]: e.key === "Home" ? MIN_COLUMN_WIDTH : resizeMax }));
|
|
1622
1622
|
return;
|
|
1623
1623
|
}
|
|
1624
1624
|
const delta = e.shiftKey ? 40 : 10;
|
|
1625
1625
|
const direction = e.key === "ArrowRight" ? 1 : -1;
|
|
1626
1626
|
setColWidths((prev) => {
|
|
1627
1627
|
const current = getResizeHandleValue(prev[col.id], col.width);
|
|
1628
|
-
return
|
|
1628
|
+
return require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, prev), {}, { [col.id]: Math.max(MIN_COLUMN_WIDTH, current + direction * delta) });
|
|
1629
1629
|
});
|
|
1630
1630
|
},
|
|
1631
1631
|
onMouseDown: (e) => {
|
|
@@ -1635,7 +1635,7 @@ function DataTable({ data, columns, keyExtractor, title = "Data Table", onRowCli
|
|
|
1635
1635
|
const startW = e.target.parentElement.offsetWidth;
|
|
1636
1636
|
const onMove = (ev) => {
|
|
1637
1637
|
const newW = Math.max(MIN_COLUMN_WIDTH, startW + ev.clientX - startX);
|
|
1638
|
-
setColWidths((prev) =>
|
|
1638
|
+
setColWidths((prev) => require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, prev), {}, { [col.id]: newW }));
|
|
1639
1639
|
};
|
|
1640
1640
|
const onUp = () => {
|
|
1641
1641
|
document.removeEventListener("mousemove", onMove);
|
|
@@ -1649,24 +1649,24 @@ function DataTable({ data, columns, keyExtractor, title = "Data Table", onRowCli
|
|
|
1649
1649
|
})
|
|
1650
1650
|
] })
|
|
1651
1651
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tbody", {
|
|
1652
|
-
className:
|
|
1652
|
+
className: require_text_truncate.cn("divide-y", require_text_truncate.OPT_DIVIDER),
|
|
1653
1653
|
children: pagedData.map((row) => {
|
|
1654
1654
|
const key = keyExtractor(row);
|
|
1655
1655
|
const isExpanded = expandedKeys.has(key);
|
|
1656
1656
|
const isSelected = selectedSet.has(key);
|
|
1657
1657
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_reopt_ai_opt_ui_primitives.CompositeRow, {
|
|
1658
1658
|
render: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tr", {
|
|
1659
|
-
className:
|
|
1659
|
+
className: require_text_truncate.cn(onRowClick ? "cursor-pointer" : void 0, (isSelected || activeRowId === key) && "bg-accent-subtle"),
|
|
1660
1660
|
onClick: onRowClick ? () => onRowClick(row) : void 0
|
|
1661
1661
|
}),
|
|
1662
1662
|
children: [
|
|
1663
1663
|
selectable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_reopt_ai_opt_ui_primitives.CompositeItem, {
|
|
1664
1664
|
render: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
|
|
1665
|
-
className:
|
|
1665
|
+
className: require_text_truncate.cn("px-3 py-2.5 text-sm text-text-primary whitespace-nowrap", "w-10"),
|
|
1666
1666
|
role: "gridcell"
|
|
1667
1667
|
}),
|
|
1668
1668
|
className: "outline-none data-[active-item]:bg-accent-subtle data-[focus-visible]:outline-2 data-[focus-visible]:outline-ring data-[focus-visible]:-outline-offset-1",
|
|
1669
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1669
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Checkbox, {
|
|
1670
1670
|
checked: isSelected,
|
|
1671
1671
|
onChange: () => toggleSelectRow(key),
|
|
1672
1672
|
"aria-label": `Select row ${key}`
|
|
@@ -1674,7 +1674,7 @@ function DataTable({ data, columns, keyExtractor, title = "Data Table", onRowCli
|
|
|
1674
1674
|
}),
|
|
1675
1675
|
expandable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_reopt_ai_opt_ui_primitives.CompositeItem, {
|
|
1676
1676
|
render: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
|
|
1677
|
-
className:
|
|
1677
|
+
className: require_text_truncate.cn("px-3 py-2.5 text-sm text-text-primary whitespace-nowrap", "w-10"),
|
|
1678
1678
|
role: "gridcell"
|
|
1679
1679
|
}),
|
|
1680
1680
|
className: "outline-none data-[active-item]:bg-accent-subtle data-[focus-visible]:outline-2 data-[focus-visible]:outline-ring data-[focus-visible]:-outline-offset-1",
|
|
@@ -1684,7 +1684,7 @@ function DataTable({ data, columns, keyExtractor, title = "Data Table", onRowCli
|
|
|
1684
1684
|
e.stopPropagation();
|
|
1685
1685
|
toggleExpand(key);
|
|
1686
1686
|
},
|
|
1687
|
-
className:
|
|
1687
|
+
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
1688
|
"aria-expanded": isExpanded,
|
|
1689
1689
|
"aria-label": `${isExpanded ? "Collapse" : "Expand"} row ${key}`,
|
|
1690
1690
|
children: "▶"
|
|
@@ -1694,10 +1694,10 @@ function DataTable({ data, columns, keyExtractor, title = "Data Table", onRowCli
|
|
|
1694
1694
|
var _col$align2, _col$barColor;
|
|
1695
1695
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_reopt_ai_opt_ui_primitives.CompositeItem, {
|
|
1696
1696
|
render: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
|
|
1697
|
-
className:
|
|
1697
|
+
className: require_text_truncate.cn(require_text_truncate.OPT_TD, alignmentClass[(_col$align2 = col.align) !== null && _col$align2 !== void 0 ? _col$align2 : "left"], colIndex === 0 ? "font-medium" : ""),
|
|
1698
1698
|
role: "gridcell"
|
|
1699
1699
|
}),
|
|
1700
|
-
className:
|
|
1700
|
+
className: require_text_truncate.OPT_TABLE_ROW_ACTIVE,
|
|
1701
1701
|
onKeyDown: (event) => {
|
|
1702
1702
|
if (!onRowClick || event.target !== event.currentTarget || event.key !== "Enter" && event.key !== " ") return;
|
|
1703
1703
|
event.preventDefault();
|
|
@@ -1721,7 +1721,7 @@ function DataTable({ data, columns, keyExtractor, title = "Data Table", onRowCli
|
|
|
1721
1721
|
})
|
|
1722
1722
|
})
|
|
1723
1723
|
}),
|
|
1724
|
-
pageSize && totalPages > 1 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1724
|
+
pageSize && totalPages > 1 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Pagination, {
|
|
1725
1725
|
totalItems: sortedData.length,
|
|
1726
1726
|
pageSize,
|
|
1727
1727
|
currentPage: page + 1,
|
|
@@ -1751,7 +1751,7 @@ const toastStore = {
|
|
|
1751
1751
|
add(input) {
|
|
1752
1752
|
var _input$variant;
|
|
1753
1753
|
const id = `toast-${++toastCounter}`;
|
|
1754
|
-
toasts = [...toasts,
|
|
1754
|
+
toasts = [...toasts, require_text_truncate._objectSpread2({
|
|
1755
1755
|
id,
|
|
1756
1756
|
variant: (_input$variant = input.variant) !== null && _input$variant !== void 0 ? _input$variant : "info"
|
|
1757
1757
|
}, input)];
|
|
@@ -1773,7 +1773,7 @@ const toastStore = {
|
|
|
1773
1773
|
}
|
|
1774
1774
|
};
|
|
1775
1775
|
function makeVariant(variant) {
|
|
1776
|
-
return (message, options) => toastStore.add(
|
|
1776
|
+
return (message, options) => toastStore.add(require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, options), {}, {
|
|
1777
1777
|
message,
|
|
1778
1778
|
variant
|
|
1779
1779
|
}));
|
|
@@ -1811,7 +1811,7 @@ function ToastProvider({ children, position = "top-right", defaultDuration = 5e3
|
|
|
1811
1811
|
removeToast
|
|
1812
1812
|
},
|
|
1813
1813
|
children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1814
|
-
className:
|
|
1814
|
+
className: require_text_truncate.cn("gap-element fixed z-50 flex flex-col", positionStyles[position]),
|
|
1815
1815
|
role: "region",
|
|
1816
1816
|
"aria-label": "Notifications",
|
|
1817
1817
|
"data-opt-id": "M0KTS",
|
|
@@ -1884,7 +1884,7 @@ function NotificationToast({ toast, onDismiss, defaultDuration = 5e3 }) {
|
|
|
1884
1884
|
},
|
|
1885
1885
|
"data-opt-id": "26YVM",
|
|
1886
1886
|
"data-opt-slug": "notification-toast.NotificationToast",
|
|
1887
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
1887
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.Alert, {
|
|
1888
1888
|
variant: toast.variant,
|
|
1889
1889
|
title: toast.title,
|
|
1890
1890
|
dismissible: true,
|
|
@@ -1964,7 +1964,7 @@ function FailureItemRow({ failure, isLast, onFailureClick, renderActions, merged
|
|
|
1964
1964
|
render: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("article", {}),
|
|
1965
1965
|
role: "article",
|
|
1966
1966
|
"aria-labelledby": itemId,
|
|
1967
|
-
className:
|
|
1967
|
+
className: require_text_truncate.cn("group gap-group relative flex w-full items-start p-3", require_text_truncate.OPT_FOCUS_VISIBLE, "data-[active-item]:bg-accent-subtle", onFailureClick && "cursor-pointer", !isLast && "border-border-subtle border-b", severityBorder[failure.severity]),
|
|
1968
1968
|
onClick: () => onFailureClick === null || onFailureClick === void 0 ? void 0 : onFailureClick(failure),
|
|
1969
1969
|
onKeyDown: handleKeyDown,
|
|
1970
1970
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -1972,13 +1972,13 @@ function FailureItemRow({ failure, isLast, onFailureClick, renderActions, merged
|
|
|
1972
1972
|
children: [
|
|
1973
1973
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1974
1974
|
className: "gap-element flex items-center",
|
|
1975
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1975
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Badge, {
|
|
1976
1976
|
variant: severityVariant[failure.severity],
|
|
1977
1977
|
size: "sm",
|
|
1978
1978
|
children: mergedSeverityLabels[failure.severity]
|
|
1979
1979
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1980
1980
|
id: itemId,
|
|
1981
|
-
className: `text-sm font-medium ${
|
|
1981
|
+
className: `text-sm font-medium ${require_text_truncate.OPT_TEXT_PRIMARY} truncate`,
|
|
1982
1982
|
children: failure.title
|
|
1983
1983
|
})]
|
|
1984
1984
|
}),
|
|
@@ -1988,7 +1988,7 @@ function FailureItemRow({ failure, isLast, onFailureClick, renderActions, merged
|
|
|
1988
1988
|
}),
|
|
1989
1989
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("time", {
|
|
1990
1990
|
dateTime: failure.timestamp,
|
|
1991
|
-
className: `mt-1 block text-xs ${
|
|
1991
|
+
className: `mt-1 block text-xs ${require_text_truncate.OPT_TEXT_TERTIARY}`,
|
|
1992
1992
|
children: formatRelativeTime(failure.timestamp, mergedTimeAgo, locale)
|
|
1993
1993
|
})
|
|
1994
1994
|
]
|
|
@@ -2038,7 +2038,7 @@ function FailureList({ failures, title, maxItems, grouped = false, onFailureClic
|
|
|
2038
2038
|
children: displayTitle
|
|
2039
2039
|
}), failures.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2040
2040
|
role: "status",
|
|
2041
|
-
className: `py-8 text-center text-sm ${
|
|
2041
|
+
className: `py-8 text-center text-sm ${require_text_truncate.OPT_TEXT_SECONDARY}`,
|
|
2042
2042
|
children: labels.emptyMessage
|
|
2043
2043
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_reopt_ai_opt_ui_primitives.CompositeProvider, {
|
|
2044
2044
|
focusLoop: true,
|
|
@@ -2047,7 +2047,7 @@ function FailureList({ failures, title, maxItems, grouped = false, onFailureClic
|
|
|
2047
2047
|
role: "feed",
|
|
2048
2048
|
"aria-label": displayTitle,
|
|
2049
2049
|
"aria-busy": loading,
|
|
2050
|
-
className: `rounded-lg ${
|
|
2050
|
+
className: `rounded-lg ${require_text_truncate.OPT_BORDER} bg-surface`,
|
|
2051
2051
|
children: grouped ? renderGrouped(allItems, remainingCount, rowProps, labels, onShowMore) : renderFlat(allItems, remainingCount, rowProps, labels, onShowMore)
|
|
2052
2052
|
})
|
|
2053
2053
|
})]
|
|
@@ -2055,7 +2055,7 @@ function FailureList({ failures, title, maxItems, grouped = false, onFailureClic
|
|
|
2055
2055
|
});
|
|
2056
2056
|
}
|
|
2057
2057
|
function renderFlat(items, remainingCount, rowProps, labels, onShowMore) {
|
|
2058
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [items.map((failure, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FailureItemRow,
|
|
2058
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [items.map((failure, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FailureItemRow, require_text_truncate._objectSpread2({
|
|
2059
2059
|
failure,
|
|
2060
2060
|
isLast: index === items.length - 1 && remainingCount === 0
|
|
2061
2061
|
}, rowProps), failure.id)), remainingCount > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_reopt_ai_opt_ui_primitives.CompositeItem, {
|
|
@@ -2075,9 +2075,9 @@ function renderGrouped(items, remainingCount, rowProps, labels, onShowMore) {
|
|
|
2075
2075
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [groupEntries.map(([groupName, groupItems], groupIndex) => {
|
|
2076
2076
|
const isLastGroup = groupIndex === groupEntries.length - 1 && remainingCount === 0;
|
|
2077
2077
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [groupName && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2078
|
-
className:
|
|
2078
|
+
className: require_text_truncate.cn(`px-3 py-2 text-xs font-semibold text-text-tertiary tracking-wider uppercase`, groupIndex > 0 && "border-border-subtle border-t"),
|
|
2079
2079
|
children: groupName
|
|
2080
|
-
}), groupItems.map((failure, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FailureItemRow,
|
|
2080
|
+
}), groupItems.map((failure, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FailureItemRow, require_text_truncate._objectSpread2({
|
|
2081
2081
|
failure,
|
|
2082
2082
|
isLast: isLastGroup && index === groupItems.length - 1
|
|
2083
2083
|
}, rowProps), failure.id))] }, groupName || "__ungrouped__");
|
|
@@ -2105,7 +2105,7 @@ function generateId() {
|
|
|
2105
2105
|
}
|
|
2106
2106
|
/** Renders the key value editor component. */
|
|
2107
2107
|
function KeyValueEditor({ value: controlledValue, defaultValue, onChange, showSecretToggle = false, maxEntries, readOnly = false, labels: customLabels, renderActions, validateKey, className }) {
|
|
2108
|
-
const labels =
|
|
2108
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$5), customLabels);
|
|
2109
2109
|
const [internalEntries, setInternalEntries] = (0, react.useState)(() => defaultValue !== null && defaultValue !== void 0 ? defaultValue : []);
|
|
2110
2110
|
const entries = controlledValue !== null && controlledValue !== void 0 ? controlledValue : internalEntries;
|
|
2111
2111
|
const keyInputRef = (0, react.useRef)(null);
|
|
@@ -2135,14 +2135,14 @@ function KeyValueEditor({ value: controlledValue, defaultValue, onChange, showSe
|
|
|
2135
2135
|
updateEntries(entries.filter((e) => e.id !== id));
|
|
2136
2136
|
}, [entries, updateEntries]);
|
|
2137
2137
|
const updateEntry = (0, react.useCallback)((id, field, val) => {
|
|
2138
|
-
updateEntries(entries.map((e) => e.id === id ?
|
|
2138
|
+
updateEntries(entries.map((e) => e.id === id ? require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, e), {}, { [field]: val }) : e));
|
|
2139
2139
|
}, [entries, updateEntries]);
|
|
2140
2140
|
const toggleSecret = (0, react.useCallback)((id) => {
|
|
2141
|
-
updateEntries(entries.map((e) => e.id === id ?
|
|
2141
|
+
updateEntries(entries.map((e) => e.id === id ? require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, e), {}, { isSecret: !e.isSecret }) : e));
|
|
2142
2142
|
}, [entries, updateEntries]);
|
|
2143
2143
|
const canAdd = !readOnly && (!maxEntries || entries.length < maxEntries);
|
|
2144
2144
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2145
|
-
className:
|
|
2145
|
+
className: require_text_truncate.cn("gap-group flex flex-col", className),
|
|
2146
2146
|
"data-opt-id": "NCBWA",
|
|
2147
2147
|
"data-opt-slug": "key-value-editor.KeyValueEditor",
|
|
2148
2148
|
children: [entries.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
@@ -2155,7 +2155,7 @@ function KeyValueEditor({ value: controlledValue, defaultValue, onChange, showSe
|
|
|
2155
2155
|
const keyError = validateKey === null || validateKey === void 0 ? void 0 : validateKey(entry.key, entries);
|
|
2156
2156
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2157
2157
|
"data-kv-id": entry.id,
|
|
2158
|
-
className:
|
|
2158
|
+
className: require_text_truncate.cn("gap-element flex items-start", "border-border rounded-lg border p-3", "bg-surface"),
|
|
2159
2159
|
children: [
|
|
2160
2160
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2161
2161
|
className: "flex min-w-0 flex-1 flex-col gap-1",
|
|
@@ -2168,7 +2168,7 @@ function KeyValueEditor({ value: controlledValue, defaultValue, onChange, showSe
|
|
|
2168
2168
|
placeholder: labels.keyPlaceholder,
|
|
2169
2169
|
readOnly,
|
|
2170
2170
|
"aria-label": `${labels.keyPlaceholder} ${index + 1}`,
|
|
2171
|
-
className:
|
|
2171
|
+
className: require_text_truncate.cn("border-border bg-bg-subtle text-text-primary placeholder:text-text-tertiary w-full rounded-md border px-3 py-1.5 font-mono text-sm", "focus:border-accent focus-visible:ring-ring focus-visible:ring-offset-ring-offset focus-visible:ring-2 focus-visible:ring-offset-1", readOnly && "cursor-default opacity-70", keyError && "border-error")
|
|
2172
2172
|
}), keyError && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2173
2173
|
className: "text-error text-xs",
|
|
2174
2174
|
children: keyError
|
|
@@ -2187,7 +2187,7 @@ function KeyValueEditor({ value: controlledValue, defaultValue, onChange, showSe
|
|
|
2187
2187
|
placeholder: labels.valuePlaceholder,
|
|
2188
2188
|
readOnly,
|
|
2189
2189
|
"aria-label": `${labels.valuePlaceholder} ${index + 1}`,
|
|
2190
|
-
className:
|
|
2190
|
+
className: require_text_truncate.cn("border-border bg-bg-subtle text-text-primary placeholder:text-text-tertiary w-full rounded-md border px-3 py-1.5 font-mono text-sm", "focus:border-accent focus-visible:ring-ring focus-visible:ring-offset-ring-offset focus-visible:ring-2 focus-visible:ring-offset-1", readOnly && "cursor-default opacity-70")
|
|
2191
2191
|
})
|
|
2192
2192
|
}),
|
|
2193
2193
|
showSecretToggle && !readOnly && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
@@ -2252,7 +2252,7 @@ function KeyValueEditor({ value: controlledValue, defaultValue, onChange, showSe
|
|
|
2252
2252
|
}), canAdd && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2253
2253
|
type: "button",
|
|
2254
2254
|
onClick: addEntry,
|
|
2255
|
-
className:
|
|
2255
|
+
className: require_text_truncate.cn("border-border text-text-secondary rounded-lg border border-dashed px-4 py-2 text-sm transition-colors", "hover:border-accent hover:text-accent"),
|
|
2256
2256
|
children: labels.addButton
|
|
2257
2257
|
})]
|
|
2258
2258
|
});
|
|
@@ -2276,11 +2276,11 @@ function WorkflowCanvas({ steps, connections = [], rows = 9, cols = 9, cellSize
|
|
|
2276
2276
|
const renderDefaultStep = react.useCallback((step, selected) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
2277
2277
|
type: "button",
|
|
2278
2278
|
onClick: () => onSelectStep === null || onSelectStep === void 0 ? void 0 : onSelectStep(step),
|
|
2279
|
-
className:
|
|
2279
|
+
className: require_text_truncate.cn("group absolute flex h-full w-full flex-col justify-between rounded-lg border p-2 text-left transition-colors", selected ? "border-accent bg-accent-subtle" : "border-border bg-surface hover:bg-bg-subtle"),
|
|
2280
2280
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2281
2281
|
className: "text-text-primary truncate text-xs font-medium",
|
|
2282
2282
|
children: step.title
|
|
2283
|
-
}), step.status && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2283
|
+
}), step.status && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Badge, {
|
|
2284
2284
|
variant: statusVariant[step.status],
|
|
2285
2285
|
size: "sm",
|
|
2286
2286
|
className: "w-fit",
|
|
@@ -2314,7 +2314,7 @@ function WorkflowCanvas({ steps, connections = [], rows = 9, cols = 9, cellSize
|
|
|
2314
2314
|
cols
|
|
2315
2315
|
]);
|
|
2316
2316
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2317
|
-
className:
|
|
2317
|
+
className: require_text_truncate.cn("gap-group flex flex-col", className),
|
|
2318
2318
|
"data-opt-id": "4TX11",
|
|
2319
2319
|
"data-opt-slug": "workflow-canvas.WorkflowCanvas",
|
|
2320
2320
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
|
|
@@ -2529,8 +2529,8 @@ function describeRange(range, labels, options) {
|
|
|
2529
2529
|
};
|
|
2530
2530
|
}
|
|
2531
2531
|
const dateOnly = (0, _reopt_ai_opt_charts.isDateOnly)(range.from) && (0, _reopt_ai_opt_charts.isDateOnly)(range.to);
|
|
2532
|
-
const from = (0, _reopt_ai_opt_charts.formatInstant)(window.from,
|
|
2533
|
-
const to = (0, _reopt_ai_opt_charts.formatInstant)(window.to,
|
|
2532
|
+
const from = (0, _reopt_ai_opt_charts.formatInstant)(window.from, require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, options), {}, { dateOnly }));
|
|
2533
|
+
const to = (0, _reopt_ai_opt_charts.formatInstant)(window.to, require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, options), {}, { dateOnly }));
|
|
2534
2534
|
return {
|
|
2535
2535
|
text: from === to ? from : `${from} – ${to}`,
|
|
2536
2536
|
isInvalid: false
|
|
@@ -2561,7 +2561,7 @@ function describeRange(range, labels, options) {
|
|
|
2561
2561
|
*/
|
|
2562
2562
|
function TimeRangeControl({ value, onChange, presets, recentRanges, timeZone, locale, showUpdateButton = true, showWindowButtons = true, zoomFactor = .5, refresh, onRefreshChange, onRefresh, isLoading = false, disabled = false, className, labels: customLabels, "aria-label": ariaLabel }) {
|
|
2563
2563
|
var _refresh$interval, _refresh$paused, _refresh$interval2;
|
|
2564
|
-
const labels =
|
|
2564
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$4), customLabels), {}, { units: require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$4.units), customLabels === null || customLabels === void 0 ? void 0 : customLabels.units) });
|
|
2565
2565
|
const [open, setOpen] = (0, react.useState)(false);
|
|
2566
2566
|
const [draft, setDraft] = (0, react.useState)(null);
|
|
2567
2567
|
const [quickCount, setQuickCount] = (0, react.useState)("15");
|
|
@@ -2631,17 +2631,17 @@ function TimeRangeControl({ value, onChange, presets, recentRanges, timeZone, lo
|
|
|
2631
2631
|
});
|
|
2632
2632
|
const refreshLabel = !refresh || refresh.paused || refresh.interval === 0 ? labels.autoRefreshOff : labels.every((0, _reopt_ai_opt_charts.formatDuration)(refresh.interval, locale));
|
|
2633
2633
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2634
|
-
className:
|
|
2634
|
+
className: require_text_truncate.cn("bg-surface inline-flex items-center rounded-lg border", require_text_truncate.OPT_BORDER, className),
|
|
2635
2635
|
role: "group",
|
|
2636
2636
|
"aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : labels.trigger,
|
|
2637
2637
|
"data-opt-id": "3WJ8H",
|
|
2638
2638
|
"data-opt-slug": "time-range-control.TimeRangeControl",
|
|
2639
2639
|
children: [
|
|
2640
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
2640
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.PopoverRoot, {
|
|
2641
2641
|
open,
|
|
2642
2642
|
onOpenChange: setOpen,
|
|
2643
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
2644
|
-
className:
|
|
2643
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.PopoverTrigger, {
|
|
2644
|
+
className: require_text_truncate.cn("text-text-primary h-10 gap-2", description.isInvalid && "text-danger-fg"),
|
|
2645
2645
|
disabled,
|
|
2646
2646
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Clock, {
|
|
2647
2647
|
className: "text-text-tertiary h-4 w-4",
|
|
@@ -2650,7 +2650,7 @@ function TimeRangeControl({ value, onChange, presets, recentRanges, timeZone, lo
|
|
|
2650
2650
|
className: "truncate text-sm",
|
|
2651
2651
|
children: description.text
|
|
2652
2652
|
})]
|
|
2653
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
2653
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.PopoverContent, {
|
|
2654
2654
|
className: "gap-group flex w-80 flex-col",
|
|
2655
2655
|
children: [
|
|
2656
2656
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -2661,7 +2661,7 @@ function TimeRangeControl({ value, onChange, presets, recentRanges, timeZone, lo
|
|
|
2661
2661
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2662
2662
|
className: "flex items-end gap-2",
|
|
2663
2663
|
children: [
|
|
2664
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2664
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Input, {
|
|
2665
2665
|
"aria-label": labels.quickSelect,
|
|
2666
2666
|
type: "number",
|
|
2667
2667
|
min: 1,
|
|
@@ -2673,18 +2673,18 @@ function TimeRangeControl({ value, onChange, presets, recentRanges, timeZone, lo
|
|
|
2673
2673
|
if (event.key === "Enter") applyQuick();
|
|
2674
2674
|
}
|
|
2675
2675
|
}),
|
|
2676
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
2676
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.SelectRoot, {
|
|
2677
2677
|
value: quickUnit,
|
|
2678
2678
|
setValue: (next) => setQuickUnit(selectValue(next)),
|
|
2679
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2679
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.SelectTrigger, {
|
|
2680
2680
|
minWidth: 110,
|
|
2681
2681
|
"aria-label": labels.quickSelect
|
|
2682
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2682
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.SelectPopover, { children: QUICK_UNITS.map((unit) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.SelectItem, {
|
|
2683
2683
|
value: unit,
|
|
2684
2684
|
children: labels.units[unit]
|
|
2685
2685
|
}, unit)) })]
|
|
2686
2686
|
}),
|
|
2687
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2687
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Button, {
|
|
2688
2688
|
variant: "secondary",
|
|
2689
2689
|
size: "sm",
|
|
2690
2690
|
onClick: applyQuick,
|
|
@@ -2695,20 +2695,20 @@ function TimeRangeControl({ value, onChange, presets, recentRanges, timeZone, lo
|
|
|
2695
2695
|
}),
|
|
2696
2696
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2697
2697
|
className: "gap-element flex flex-col",
|
|
2698
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2698
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Input, {
|
|
2699
2699
|
label: labels.start,
|
|
2700
2700
|
size: "sm",
|
|
2701
2701
|
value: editing.from,
|
|
2702
2702
|
error: boundState(editing.from),
|
|
2703
2703
|
hint: labels.startHint,
|
|
2704
|
-
onChange: (event) => setDraft(
|
|
2704
|
+
onChange: (event) => setDraft(require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, editing), {}, { from: event.target.value })),
|
|
2705
2705
|
onKeyDown: commitOnEnter
|
|
2706
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2706
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Input, {
|
|
2707
2707
|
label: labels.end,
|
|
2708
2708
|
size: "sm",
|
|
2709
2709
|
value: editing.to,
|
|
2710
2710
|
error: boundState(editing.to),
|
|
2711
|
-
onChange: (event) => setDraft(
|
|
2711
|
+
onChange: (event) => setDraft(require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, editing), {}, { to: event.target.value })),
|
|
2712
2712
|
onKeyDown: commitOnEnter
|
|
2713
2713
|
})]
|
|
2714
2714
|
}),
|
|
@@ -2733,7 +2733,7 @@ function TimeRangeControl({ value, onChange, presets, recentRanges, timeZone, lo
|
|
|
2733
2733
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
2734
2734
|
className: "text-text-primary text-xs font-medium",
|
|
2735
2735
|
children: labels.autoRefresh
|
|
2736
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
2736
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.SelectRoot, {
|
|
2737
2737
|
value: String((refresh === null || refresh === void 0 ? void 0 : refresh.paused) ? 0 : (_refresh$interval2 = refresh === null || refresh === void 0 ? void 0 : refresh.interval) !== null && _refresh$interval2 !== void 0 ? _refresh$interval2 : 0),
|
|
2738
2738
|
setValue: (next) => {
|
|
2739
2739
|
const interval = Number(selectValue(next));
|
|
@@ -2742,10 +2742,10 @@ function TimeRangeControl({ value, onChange, presets, recentRanges, timeZone, lo
|
|
|
2742
2742
|
paused: interval === 0
|
|
2743
2743
|
});
|
|
2744
2744
|
},
|
|
2745
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2745
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.SelectTrigger, {
|
|
2746
2746
|
minWidth: 140,
|
|
2747
2747
|
"aria-label": labels.autoRefresh
|
|
2748
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2748
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.SelectPopover, { children: REFRESH_INTERVALS.map((interval) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.SelectItem, {
|
|
2749
2749
|
value: String(interval),
|
|
2750
2750
|
children: interval === 0 ? labels.autoRefreshOff : labels.every((0, _reopt_ai_opt_charts.formatDuration)(interval, locale))
|
|
2751
2751
|
}, interval)) })]
|
|
@@ -2755,7 +2755,7 @@ function TimeRangeControl({ value, onChange, presets, recentRanges, timeZone, lo
|
|
|
2755
2755
|
})]
|
|
2756
2756
|
}),
|
|
2757
2757
|
showWindowButtons && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2758
|
-
className:
|
|
2758
|
+
className: require_text_truncate.cn("flex items-center border-l", "border border-border"),
|
|
2759
2759
|
role: "group",
|
|
2760
2760
|
"aria-label": labels.previous,
|
|
2761
2761
|
children: [
|
|
@@ -2798,8 +2798,8 @@ function TimeRangeControl({ value, onChange, presets, recentRanges, timeZone, lo
|
|
|
2798
2798
|
]
|
|
2799
2799
|
}),
|
|
2800
2800
|
(onRefresh || showUpdateButton) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2801
|
-
className:
|
|
2802
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2801
|
+
className: require_text_truncate.cn("border-l pl-2 pr-2", "border border-border"),
|
|
2802
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Button, {
|
|
2803
2803
|
variant: hasChanges ? "primary" : "secondary",
|
|
2804
2804
|
size: "sm",
|
|
2805
2805
|
loading: isLoading,
|
|
@@ -2818,7 +2818,7 @@ function TimeRangeControl({ value, onChange, presets, recentRanges, timeZone, lo
|
|
|
2818
2818
|
}
|
|
2819
2819
|
TimeRangeControl.displayName = "TimeRangeControl";
|
|
2820
2820
|
function IconButton({ label, disabled, onClick, children }) {
|
|
2821
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2821
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Button, {
|
|
2822
2822
|
variant: "ghost",
|
|
2823
2823
|
size: "sm",
|
|
2824
2824
|
"aria-label": label,
|
|
@@ -2838,7 +2838,7 @@ function RangeList({ title, items, onPick }) {
|
|
|
2838
2838
|
className: "grid grid-cols-2 gap-1",
|
|
2839
2839
|
children: items.map((item, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2840
2840
|
type: "button",
|
|
2841
|
-
className:
|
|
2841
|
+
className: require_text_truncate.cn("hover:bg-bg-subtle w-full cursor-pointer rounded px-2 py-1 text-left text-xs", require_text_truncate.OPT_TEXT_SECONDARY),
|
|
2842
2842
|
onClick: () => onPick(item.range),
|
|
2843
2843
|
children: item.label
|
|
2844
2844
|
}) }, `${item.label}-${index}`))
|
|
@@ -2939,7 +2939,7 @@ const defaultLabels$3 = {
|
|
|
2939
2939
|
* ```
|
|
2940
2940
|
*/
|
|
2941
2941
|
function TimeSeriesPanel({ title, description, actions, data, series, range, onRangeChange, granularity = "auto", timeZone, locale, showRangeControl = true, presets, recentRanges, refresh, onRefreshChange, onRefresh, toggleableLegend = false, annotations, isLoading = false, height = 280, className, chartProps, labels: customLabels, "aria-label": ariaLabel }) {
|
|
2942
|
-
const labels =
|
|
2942
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$3), customLabels);
|
|
2943
2943
|
const [history, setHistory] = (0, react.useState)([]);
|
|
2944
2944
|
const [hidden, setHidden] = (0, react.useState)([]);
|
|
2945
2945
|
const resolved = (0, react.useMemo)(() => (0, _reopt_ai_opt_charts.resolveTimeRange)(range, { timeZone }), [range, timeZone]);
|
|
@@ -2963,7 +2963,7 @@ function TimeSeriesPanel({ title, description, actions, data, series, range, onR
|
|
|
2963
2963
|
setHidden((current) => current.includes(dataKey) ? current.filter((key) => key !== dataKey) : [...current, dataKey]);
|
|
2964
2964
|
}, []);
|
|
2965
2965
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
2966
|
-
className:
|
|
2966
|
+
className: require_text_truncate.cn(require_text_truncate.OPT_SURFACE, require_text_truncate.OPT_BORDER, "flex flex-col", className),
|
|
2967
2967
|
"aria-label": ariaLabel,
|
|
2968
2968
|
"data-opt-id": "Y0XCY",
|
|
2969
2969
|
"data-opt-slug": "time-series-panel.TimeSeriesPanel",
|
|
@@ -2975,13 +2975,13 @@ function TimeSeriesPanel({ title, description, actions, data, series, range, onR
|
|
|
2975
2975
|
className: "text-text-primary truncate text-base font-semibold",
|
|
2976
2976
|
children: title
|
|
2977
2977
|
}), description && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
2978
|
-
className:
|
|
2978
|
+
className: require_text_truncate.cn("text-text-secondary", "truncate text-sm"),
|
|
2979
2979
|
children: description
|
|
2980
2980
|
})]
|
|
2981
2981
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2982
2982
|
className: "gap-element flex flex-wrap items-center",
|
|
2983
2983
|
children: [
|
|
2984
|
-
history.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2984
|
+
history.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Button, {
|
|
2985
2985
|
variant: "ghost",
|
|
2986
2986
|
size: "sm",
|
|
2987
2987
|
onClick: goBack,
|
|
@@ -3009,7 +3009,7 @@ function TimeSeriesPanel({ title, description, actions, data, series, range, onR
|
|
|
3009
3009
|
})]
|
|
3010
3010
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3011
3011
|
className: "px-2 pb-4",
|
|
3012
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_reopt_ai_opt_charts.TimeSeriesChart,
|
|
3012
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_reopt_ai_opt_charts.TimeSeriesChart, require_text_truncate._objectSpread2({
|
|
3013
3013
|
data,
|
|
3014
3014
|
series: visibleSeries,
|
|
3015
3015
|
from: resolved === null || resolved === void 0 ? void 0 : resolved.from,
|
|
@@ -3120,7 +3120,7 @@ function columnStyle(column) {
|
|
|
3120
3120
|
* ```
|
|
3121
3121
|
*/
|
|
3122
3122
|
function LogTableInner({ rows, columns, getRowId, selectedId = null, onSelect, onLoadMore, hasMore = false, loadingMore = false, prepending = false, onFollowChange, isNew, sort = null, onSortChange, onCellAction, highlightTerms, onColumnMove, density = "normal", showHeader = true, emptyState, labels: customLabels, className }, ref) {
|
|
3123
|
-
const labels =
|
|
3123
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$2), customLabels);
|
|
3124
3124
|
const rowHeight = ROW_HEIGHT[density];
|
|
3125
3125
|
const scrollRef = (0, react.useRef)(null);
|
|
3126
3126
|
const [scrollTop, setScrollTop] = (0, react.useState)(0);
|
|
@@ -3244,7 +3244,7 @@ function LogTableInner({ rows, columns, getRowId, selectedId = null, onSelect, o
|
|
|
3244
3244
|
lastVisible
|
|
3245
3245
|
]);
|
|
3246
3246
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3247
|
-
className:
|
|
3247
|
+
className: require_text_truncate.cn("@container/log flex min-h-0 flex-col", className),
|
|
3248
3248
|
"data-opt-id": "3ZR82",
|
|
3249
3249
|
"data-opt-slug": "log-table.LogTable",
|
|
3250
3250
|
children: [showHeader && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LogTableHeader, {
|
|
@@ -3287,13 +3287,13 @@ function LogTableInner({ rows, columns, getRowId, selectedId = null, onSelect, o
|
|
|
3287
3287
|
}),
|
|
3288
3288
|
loadingMore && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3289
3289
|
className: "gap-element text-text-tertiary flex items-center justify-center py-3 text-xs",
|
|
3290
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3290
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Spinner, {
|
|
3291
3291
|
size: "sm",
|
|
3292
3292
|
"aria-hidden": true
|
|
3293
3293
|
}), labels.loadingMore]
|
|
3294
3294
|
}),
|
|
3295
3295
|
!hasMore && rows.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
3296
|
-
className:
|
|
3296
|
+
className: require_text_truncate.cn("text-text-tertiary", "py-3 text-center text-xs"),
|
|
3297
3297
|
children: labels.endOfResults
|
|
3298
3298
|
})
|
|
3299
3299
|
]
|
|
@@ -3310,7 +3310,7 @@ const LogTable = (0, react.forwardRef)(LogTableInner);
|
|
|
3310
3310
|
function LogTableHeader({ columns, sort, onSortChange, onColumnMove, density, labels }) {
|
|
3311
3311
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3312
3312
|
role: "row",
|
|
3313
|
-
className:
|
|
3313
|
+
className: require_text_truncate.cn("border-border-subtle text-text-tertiary flex shrink-0 items-center gap-3 border-b px-3", DENSITY_TEXT[density]),
|
|
3314
3314
|
style: { height: ROW_HEIGHT[density] },
|
|
3315
3315
|
children: columns.map((column, index) => {
|
|
3316
3316
|
var _column$priority;
|
|
@@ -3337,7 +3337,7 @@ function LogTableHeader({ columns, sort, onSortChange, onColumnMove, density, la
|
|
|
3337
3337
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3338
3338
|
role: "columnheader",
|
|
3339
3339
|
"aria-sort": active ? sort.direction === "asc" ? "ascending" : "descending" : void 0,
|
|
3340
|
-
className:
|
|
3340
|
+
className: require_text_truncate.cn("group/header flex items-center gap-1.5", column.align === "right" && "justify-end", HIDE_BELOW[(_column$priority = column.priority) !== null && _column$priority !== void 0 ? _column$priority : "always"]),
|
|
3341
3341
|
style: columnStyle(column),
|
|
3342
3342
|
children: [sortable ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3343
3343
|
type: "button",
|
|
@@ -3349,7 +3349,7 @@ function LogTableHeader({ columns, sort, onSortChange, onColumnMove, density, la
|
|
|
3349
3349
|
}),
|
|
3350
3350
|
children: content
|
|
3351
3351
|
}) : content, onColumnMove && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3352
|
-
className:
|
|
3352
|
+
className: require_text_truncate.cn("ml-auto flex shrink-0 items-center gap-0.5", "opacity-0 transition-opacity", "group-hover/header:opacity-100 focus-within:opacity-100"),
|
|
3353
3353
|
children: [index > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3354
3354
|
type: "button",
|
|
3355
3355
|
className: "hover:text-text-primary cursor-pointer",
|
|
@@ -3393,13 +3393,13 @@ function LogTableRowImpl({ id, row, columns, top, height, density, selected, isN
|
|
|
3393
3393
|
top,
|
|
3394
3394
|
height
|
|
3395
3395
|
},
|
|
3396
|
-
className:
|
|
3396
|
+
className: require_text_truncate.cn("border-border-subtle/60 absolute inset-x-0 flex items-center gap-3 border-b px-3", DENSITY_TEXT[density], onSelect && "cursor-pointer", "transition-colors duration-100", "hover:bg-surface-hover", selected && "bg-accent-subtle hover:bg-accent-subtle", isNew && !selected && "opt-log-row-enter"),
|
|
3397
3397
|
children: columns.map((column) => {
|
|
3398
3398
|
var _column$priority2;
|
|
3399
3399
|
const raw = column.value(row);
|
|
3400
3400
|
const text = raw === null || raw === void 0 || raw === "" ? "" : String(raw);
|
|
3401
3401
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3402
|
-
className:
|
|
3402
|
+
className: require_text_truncate.cn("group/cell relative flex min-w-0 items-center gap-1.5", column.align === "right" && "justify-end", HIDE_BELOW[(_column$priority2 = column.priority) !== null && _column$priority2 !== void 0 ? _column$priority2 : "always"]),
|
|
3403
3403
|
style: columnStyle(column),
|
|
3404
3404
|
children: [
|
|
3405
3405
|
column.marker && text && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -3408,9 +3408,16 @@ function LogTableRowImpl({ id, row, columns, top, height, density, selected, isN
|
|
|
3408
3408
|
style: { backgroundColor: `hsl(${hueOf(text)} 65% 55%)` }
|
|
3409
3409
|
}),
|
|
3410
3410
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3411
|
-
className:
|
|
3412
|
-
title: text || void 0,
|
|
3413
|
-
children: column.render ? column.render(row) : text ?
|
|
3411
|
+
className: require_text_truncate.cn("min-w-0 flex-1", !column.truncate && "truncate", column.mono && "font-mono", text ? "text-text-secondary" : ABSENT),
|
|
3412
|
+
title: column.truncate ? void 0 : text || void 0,
|
|
3413
|
+
children: column.render ? column.render(row) : text ? column.truncate ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.TextTruncate, {
|
|
3414
|
+
text,
|
|
3415
|
+
truncation: column.truncate,
|
|
3416
|
+
children: (shown) => highlightTerms && highlightTerms.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Highlight, {
|
|
3417
|
+
text: shown,
|
|
3418
|
+
search: highlightTerms
|
|
3419
|
+
}) : shown
|
|
3420
|
+
}) : highlightTerms && highlightTerms.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Highlight, {
|
|
3414
3421
|
text,
|
|
3415
3422
|
search: highlightTerms
|
|
3416
3423
|
}) : text : EM_DASH
|
|
@@ -3442,7 +3449,7 @@ const LogTableRow = (0, react.memo)(LogTableRowImpl);
|
|
|
3442
3449
|
function CellActions({ field, value, onAction, labels }) {
|
|
3443
3450
|
const button = "cursor-pointer rounded-sm p-0.5 text-text-tertiary hover:bg-bg-muted hover:text-text-primary";
|
|
3444
3451
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
3445
|
-
className:
|
|
3452
|
+
className: require_text_truncate.cn("bg-surface/90 ml-auto flex shrink-0 items-center gap-0.5 rounded pl-1", "opacity-0 transition-opacity", "group-hover/cell:opacity-100 focus-within:opacity-100"),
|
|
3446
3453
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3447
3454
|
type: "button",
|
|
3448
3455
|
className: button,
|
|
@@ -3823,7 +3830,7 @@ const MAX_SUGGESTIONS = 8;
|
|
|
3823
3830
|
* ```
|
|
3824
3831
|
*/
|
|
3825
3832
|
function QueryBar({ value, onChange, fields = [], showClauses = false, live = false, disabled = false, className, labels: customLabels }) {
|
|
3826
|
-
const labels =
|
|
3833
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$1), customLabels);
|
|
3827
3834
|
const inputRef = (0, react.useRef)(null);
|
|
3828
3835
|
const [text, setText] = (0, react.useState)(() => formatQuery(value));
|
|
3829
3836
|
const [focused, setFocused] = (0, react.useState)(false);
|
|
@@ -3881,12 +3888,12 @@ function QueryBar({ value, onChange, fields = [], showClauses = false, live = fa
|
|
|
3881
3888
|
};
|
|
3882
3889
|
const showSuggestions = focused && suggestions.length > 0;
|
|
3883
3890
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3884
|
-
className:
|
|
3891
|
+
className: require_text_truncate.cn("relative flex min-w-0 flex-col gap-1.5", className),
|
|
3885
3892
|
"data-opt-id": "JSVZ1",
|
|
3886
3893
|
"data-opt-slug": "query-bar.QueryBar",
|
|
3887
3894
|
children: [
|
|
3888
3895
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3889
|
-
className:
|
|
3896
|
+
className: require_text_truncate.cn("bg-surface flex h-9 items-center gap-2 rounded-md border px-2.5", require_text_truncate.OPT_BORDER, "focus-within:border-accent transition-colors", disabled && "opacity-60"),
|
|
3890
3897
|
children: [
|
|
3891
3898
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Search, {
|
|
3892
3899
|
className: "text-text-tertiary size-4 shrink-0",
|
|
@@ -3902,7 +3909,7 @@ function QueryBar({ value, onChange, fields = [], showClauses = false, live = fa
|
|
|
3902
3909
|
"aria-label": labels.ariaLabel,
|
|
3903
3910
|
placeholder: labels.placeholder,
|
|
3904
3911
|
disabled,
|
|
3905
|
-
className:
|
|
3912
|
+
className: require_text_truncate.cn("text-text-primary placeholder:text-text-tertiary min-w-0 flex-1", "bg-transparent font-mono text-sm outline-none focus-visible:outline-none"),
|
|
3906
3913
|
value: text,
|
|
3907
3914
|
onChange: (event) => {
|
|
3908
3915
|
setText(event.target.value);
|
|
@@ -3920,7 +3927,7 @@ function QueryBar({ value, onChange, fields = [], showClauses = false, live = fa
|
|
|
3920
3927
|
type: "button",
|
|
3921
3928
|
"aria-label": labels.clear,
|
|
3922
3929
|
title: labels.clear,
|
|
3923
|
-
className:
|
|
3930
|
+
className: require_text_truncate.cn("text-text-tertiary hover:text-text-primary cursor-pointer rounded-sm p-0.5", "outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-ring-offset"),
|
|
3924
3931
|
onClick: () => {
|
|
3925
3932
|
setText("");
|
|
3926
3933
|
commit("");
|
|
@@ -3935,12 +3942,12 @@ function QueryBar({ value, onChange, fields = [], showClauses = false, live = fa
|
|
|
3935
3942
|
showSuggestions && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
|
|
3936
3943
|
id: "query-bar-suggestions",
|
|
3937
3944
|
role: "listbox",
|
|
3938
|
-
className:
|
|
3945
|
+
className: require_text_truncate.cn("bg-surface-overlay absolute top-10 z-40 max-h-64 w-full overflow-y-auto rounded-md border p-1 shadow-lg", "border border-border"),
|
|
3939
3946
|
children: suggestions.map((suggestion, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
3940
3947
|
type: "button",
|
|
3941
3948
|
role: "option",
|
|
3942
3949
|
"aria-selected": index === highlighted,
|
|
3943
|
-
className:
|
|
3950
|
+
className: require_text_truncate.cn("flex w-full cursor-pointer items-center justify-between gap-3 rounded px-2 py-1 text-left text-sm", index === highlighted ? "bg-bg-subtle" : "hover:bg-bg-subtle"),
|
|
3944
3951
|
onMouseEnter: () => setHighlighted(index),
|
|
3945
3952
|
onMouseDown: (event) => event.preventDefault(),
|
|
3946
3953
|
onClick: () => applySuggestion(suggestion),
|
|
@@ -3958,7 +3965,7 @@ function QueryBar({ value, onChange, fields = [], showClauses = false, live = fa
|
|
|
3958
3965
|
children: value.clauses.map((clause, index) => {
|
|
3959
3966
|
const label = describeClause(clause);
|
|
3960
3967
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
|
|
3961
|
-
className:
|
|
3968
|
+
className: require_text_truncate.cn("bg-bg-subtle text-text-secondary flex items-center gap-1 rounded px-1.5 py-0.5 text-xs", clause.negated && "text-danger-fg"),
|
|
3962
3969
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3963
3970
|
className: "truncate",
|
|
3964
3971
|
children: label
|
|
@@ -4083,7 +4090,7 @@ const defaultLabels = {
|
|
|
4083
4090
|
* ```
|
|
4084
4091
|
*/
|
|
4085
4092
|
function FieldSidebar({ fields, expandedField = null, onExpandedFieldChange, values, valuesLoading = false, sampledRows, onToggleColumn, onFilter, header, className, labels: customLabels }) {
|
|
4086
|
-
const labels =
|
|
4093
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels), customLabels);
|
|
4087
4094
|
const [search, setSearch] = (0, react.useState)("");
|
|
4088
4095
|
const groups = (0, react.useMemo)(() => {
|
|
4089
4096
|
const needle = search.trim().toLowerCase();
|
|
@@ -4100,14 +4107,14 @@ function FieldSidebar({ fields, expandedField = null, onExpandedFieldChange, val
|
|
|
4100
4107
|
}, [fields, search]);
|
|
4101
4108
|
const total = (0, react.useMemo)(() => (values !== null && values !== void 0 ? values : []).reduce((sum, entry) => sum + entry.count, 0), [values]);
|
|
4102
4109
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("aside", {
|
|
4103
|
-
className:
|
|
4110
|
+
className: require_text_truncate.cn("flex min-h-0 flex-col", className),
|
|
4104
4111
|
"aria-label": labels.heading,
|
|
4105
4112
|
"data-opt-id": "17D4Y",
|
|
4106
4113
|
"data-opt-slug": "field-sidebar.FieldSidebar",
|
|
4107
4114
|
children: [
|
|
4108
4115
|
header,
|
|
4109
4116
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4110
|
-
className:
|
|
4117
|
+
className: require_text_truncate.cn("flex items-center gap-2 border-b px-3 py-2", "focus-within:border-accent transition-colors", require_text_truncate.OPT_BORDER),
|
|
4111
4118
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Search, {
|
|
4112
4119
|
className: "text-text-tertiary size-3.5 shrink-0",
|
|
4113
4120
|
"aria-hidden": true
|
|
@@ -4115,7 +4122,7 @@ function FieldSidebar({ fields, expandedField = null, onExpandedFieldChange, val
|
|
|
4115
4122
|
type: "search",
|
|
4116
4123
|
"aria-label": labels.searchLabel,
|
|
4117
4124
|
placeholder: labels.searchPlaceholder,
|
|
4118
|
-
className:
|
|
4125
|
+
className: require_text_truncate.cn("text-text-primary placeholder:text-text-tertiary min-w-0 flex-1", "bg-transparent text-sm outline-none focus-visible:outline-none"),
|
|
4119
4126
|
value: search,
|
|
4120
4127
|
onChange: (event) => setSearch(event.target.value)
|
|
4121
4128
|
})]
|
|
@@ -4123,10 +4130,10 @@ function FieldSidebar({ fields, expandedField = null, onExpandedFieldChange, val
|
|
|
4123
4130
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4124
4131
|
className: "min-h-0 flex-1 overflow-y-auto",
|
|
4125
4132
|
children: groups.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
4126
|
-
className:
|
|
4133
|
+
className: require_text_truncate.cn(require_text_truncate.OPT_TEXT_TERTIARY, "px-3 py-4 text-xs"),
|
|
4127
4134
|
children: labels.empty
|
|
4128
4135
|
}) : groups.map(([group, groupFields]) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { children: [group && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h4", {
|
|
4129
|
-
className:
|
|
4136
|
+
className: require_text_truncate.cn("text-text-tertiary", "px-3 pt-3 pb-1 text-[11px] font-medium tracking-wide uppercase"),
|
|
4130
4137
|
children: group
|
|
4131
4138
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", { children: groupFields.map((field) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FieldRow, {
|
|
4132
4139
|
field,
|
|
@@ -4158,12 +4165,12 @@ function FieldRow({ field, expanded, onToggleExpanded, onToggleColumn, labels, c
|
|
|
4158
4165
|
className: "flex min-w-0 flex-1 cursor-pointer items-center gap-2 text-left",
|
|
4159
4166
|
"aria-expanded": expanded,
|
|
4160
4167
|
onClick: onToggleExpanded,
|
|
4161
|
-
children: [field.dataType ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
4168
|
+
children: [field.dataType ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FieldToken, {
|
|
4162
4169
|
type: field.dataType,
|
|
4163
4170
|
size: "xs",
|
|
4164
4171
|
title: (_field$type = field.type) !== null && _field$type !== void 0 ? _field$type : field.dataType
|
|
4165
4172
|
}) : field.type && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4166
|
-
className:
|
|
4173
|
+
className: require_text_truncate.cn("text-text-tertiary", "w-8 shrink-0 truncate font-mono text-[10px] uppercase"),
|
|
4167
4174
|
children: field.type
|
|
4168
4175
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4169
4176
|
className: "text-text-primary truncate font-mono text-xs",
|
|
@@ -4171,7 +4178,7 @@ function FieldRow({ field, expanded, onToggleExpanded, onToggleColumn, labels, c
|
|
|
4171
4178
|
})]
|
|
4172
4179
|
}), onToggleColumn && columnable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
4173
4180
|
type: "button",
|
|
4174
|
-
className:
|
|
4181
|
+
className: require_text_truncate.cn("cursor-pointer rounded-sm p-0.5", field.inTable ? "text-accent" : "text-text-tertiary hover:text-text-primary opacity-0 group-hover/field:opacity-100 focus-visible:opacity-100"),
|
|
4175
4182
|
"aria-label": field.inTable ? labels.removeColumn(field.name) : labels.addColumn(field.name),
|
|
4176
4183
|
title: field.inTable ? labels.removeColumn(field.name) : labels.addColumn(field.name),
|
|
4177
4184
|
"aria-pressed": (_field$inTable = field.inTable) !== null && _field$inTable !== void 0 ? _field$inTable : false,
|
|
@@ -4194,21 +4201,21 @@ function FieldRow({ field, expanded, onToggleExpanded, onToggleColumn, labels, c
|
|
|
4194
4201
|
*/
|
|
4195
4202
|
function FieldValues({ values, loading, total, sampledRows, onFilter, labels }) {
|
|
4196
4203
|
if (loading) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
|
|
4197
|
-
className:
|
|
4198
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
4204
|
+
className: require_text_truncate.cn(require_text_truncate.OPT_TEXT_TERTIARY, "flex items-center gap-2 px-3 pb-2 text-xs"),
|
|
4205
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Spinner, {
|
|
4199
4206
|
size: "sm",
|
|
4200
4207
|
"aria-hidden": true
|
|
4201
4208
|
}), labels.loadingValues]
|
|
4202
4209
|
});
|
|
4203
4210
|
if (!values || values.length === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
4204
|
-
className:
|
|
4211
|
+
className: require_text_truncate.cn(require_text_truncate.OPT_TEXT_TERTIARY, "px-3 pb-2 text-xs"),
|
|
4205
4212
|
children: labels.noValues
|
|
4206
4213
|
});
|
|
4207
4214
|
const denominator = sampledRows !== null && sampledRows !== void 0 ? sampledRows : total;
|
|
4208
4215
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4209
4216
|
className: "flex flex-col gap-1 px-3 pt-1 pb-2",
|
|
4210
4217
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
|
|
4211
|
-
className:
|
|
4218
|
+
className: require_text_truncate.cn(require_text_truncate.OPT_TEXT_TERTIARY, "text-[11px]"),
|
|
4212
4219
|
children: [labels.topValues(values.length), sampledRows ? ` · ${sampledRows.toLocaleString()}` : ""]
|
|
4213
4220
|
}), values.map((entry) => {
|
|
4214
4221
|
var _entry$share;
|
|
@@ -4224,11 +4231,11 @@ function FieldValues({ values, loading, total, sampledRows, onFilter, labels })
|
|
|
4224
4231
|
children: entry.value || "—"
|
|
4225
4232
|
}),
|
|
4226
4233
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
4227
|
-
className:
|
|
4234
|
+
className: require_text_truncate.cn(require_text_truncate.OPT_TEXT_TERTIARY, "shrink-0 text-[11px] tabular-nums"),
|
|
4228
4235
|
children: [Math.round(share * 100), "%"]
|
|
4229
4236
|
}),
|
|
4230
4237
|
onFilter && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
4231
|
-
className:
|
|
4238
|
+
className: require_text_truncate.cn("flex shrink-0 items-center gap-0.5", "opacity-0 transition-opacity", "group-hover/value:opacity-100 focus-within:opacity-100"),
|
|
4232
4239
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
4233
4240
|
type: "button",
|
|
4234
4241
|
className: "text-text-tertiary hover:text-text-primary cursor-pointer",
|