@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
package/dist/index.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const
|
|
4
|
-
const require_key_pad_menu = require("./key-pad-menu-
|
|
5
|
-
const require_field_sidebar = require("./field-sidebar-
|
|
3
|
+
const require_text_truncate = require("./text-truncate-CxdzAnhS.cjs");
|
|
4
|
+
const require_key_pad_menu = require("./key-pad-menu-D5mQcS5v.cjs");
|
|
5
|
+
const require_field_sidebar = require("./field-sidebar-B6Ndr8HE.cjs");
|
|
6
6
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
7
|
let react = require("react");
|
|
8
|
-
react =
|
|
8
|
+
react = require_text_truncate.__toESM(react, 1);
|
|
9
9
|
let lucide_react = require("lucide-react");
|
|
10
10
|
let _reopt_ai_opt_palette = require("@reopt-ai/opt-palette");
|
|
11
11
|
let _reopt_ai_opt_charts = require("@reopt-ai/opt-charts");
|
|
@@ -45,7 +45,7 @@ var ErrorBoundary = class extends react.Component {
|
|
|
45
45
|
const { fallback } = this.props;
|
|
46
46
|
if (typeof fallback === "function") return fallback(this.state.error);
|
|
47
47
|
if (fallback !== void 0) return fallback;
|
|
48
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
48
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Alert, {
|
|
49
49
|
variant: "error",
|
|
50
50
|
children: this.state.error.message || "Something went wrong"
|
|
51
51
|
});
|
|
@@ -64,20 +64,20 @@ ErrorBoundary.displayName = "ErrorBoundary";
|
|
|
64
64
|
function PageAside({ header, children, footer, widthClassName = "w-60", label, hideOnMobile = true, className, headerClassName, bodyClassName, footerClassName }) {
|
|
65
65
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("aside", {
|
|
66
66
|
"aria-label": label,
|
|
67
|
-
className:
|
|
67
|
+
className: require_text_truncate.cn("bg-surface sticky top-[var(--global-header-height)] h-[calc(100vh-var(--global-header-height))] shrink-0 flex-col", widthClassName, hideOnMobile ? "hidden md:flex" : "flex", className),
|
|
68
68
|
"data-opt-id": "ZQDMX",
|
|
69
69
|
"data-opt-slug": "page-aside.PageAside",
|
|
70
70
|
children: [
|
|
71
71
|
header ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
72
|
-
className:
|
|
72
|
+
className: require_text_truncate.cn("shrink-0", headerClassName !== null && headerClassName !== void 0 ? headerClassName : "px-3 py-3"),
|
|
73
73
|
children: header
|
|
74
74
|
}) : null,
|
|
75
75
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
76
|
-
className:
|
|
76
|
+
className: require_text_truncate.cn("flex-1 overflow-y-auto", bodyClassName !== null && bodyClassName !== void 0 ? bodyClassName : "px-3 py-3"),
|
|
77
77
|
children
|
|
78
78
|
}),
|
|
79
79
|
footer ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
80
|
-
className:
|
|
80
|
+
className: require_text_truncate.cn("shrink-0", footerClassName !== null && footerClassName !== void 0 ? footerClassName : "px-4 py-3"),
|
|
81
81
|
children: footer
|
|
82
82
|
}) : null
|
|
83
83
|
]
|
|
@@ -106,9 +106,9 @@ const defaultLabels$31 = {
|
|
|
106
106
|
};
|
|
107
107
|
/** Renders the task list component. */
|
|
108
108
|
function TaskList({ tasks, title, onTaskClick, onTaskStatusChange, emptyMessage, showSubtasks = false, maxItems, labels: customLabels, className }) {
|
|
109
|
-
const labels =
|
|
110
|
-
priority:
|
|
111
|
-
status:
|
|
109
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$31), customLabels), {}, {
|
|
110
|
+
priority: require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$31.priority), customLabels === null || customLabels === void 0 ? void 0 : customLabels.priority),
|
|
111
|
+
status: require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$31.status), customLabels === null || customLabels === void 0 ? void 0 : customLabels.status)
|
|
112
112
|
});
|
|
113
113
|
const displayTitle = title !== null && title !== void 0 ? title : labels.title;
|
|
114
114
|
const displayEmptyMessage = emptyMessage !== null && emptyMessage !== void 0 ? emptyMessage : labels.emptyMessage;
|
|
@@ -117,16 +117,16 @@ function TaskList({ tasks, title, onTaskClick, onTaskStatusChange, emptyMessage,
|
|
|
117
117
|
const completedCount = tasks.filter((t) => t.status === "done").length;
|
|
118
118
|
const progress = tasks.length > 0 ? completedCount / tasks.length * 100 : 0;
|
|
119
119
|
const priorityBadge = {
|
|
120
|
-
low:
|
|
121
|
-
medium:
|
|
122
|
-
high:
|
|
123
|
-
urgent:
|
|
120
|
+
low: require_text_truncate.OPT_BADGE_NEUTRAL,
|
|
121
|
+
medium: require_text_truncate.OPT_BADGE_BLUE,
|
|
122
|
+
high: require_text_truncate.OPT_BADGE_YELLOW,
|
|
123
|
+
urgent: require_text_truncate.OPT_BADGE_RED
|
|
124
124
|
};
|
|
125
125
|
const statusBadge = {
|
|
126
|
-
todo:
|
|
127
|
-
"in-progress":
|
|
128
|
-
review:
|
|
129
|
-
done:
|
|
126
|
+
todo: require_text_truncate.OPT_BADGE_NEUTRAL,
|
|
127
|
+
"in-progress": require_text_truncate.OPT_BADGE_BLUE,
|
|
128
|
+
review: require_text_truncate.OPT_BADGE_YELLOW,
|
|
129
|
+
done: require_text_truncate.OPT_BADGE_GREEN
|
|
130
130
|
};
|
|
131
131
|
const completedText = labels.completedOf.replace("{completed}", String(completedCount)).replace("{total}", String(tasks.length));
|
|
132
132
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -139,10 +139,10 @@ function TaskList({ tasks, title, onTaskClick, onTaskStatusChange, emptyMessage,
|
|
|
139
139
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
140
140
|
className: "flex items-center justify-between",
|
|
141
141
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
|
|
142
|
-
className: `text-sm font-semibold ${
|
|
142
|
+
className: `text-sm font-semibold ${require_text_truncate.OPT_TEXT_PRIMARY}`,
|
|
143
143
|
children: displayTitle
|
|
144
144
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
145
|
-
className: `text-xs ${
|
|
145
|
+
className: `text-xs ${require_text_truncate.OPT_TEXT_TERTIARY}`,
|
|
146
146
|
children: completedText
|
|
147
147
|
})]
|
|
148
148
|
}),
|
|
@@ -160,7 +160,7 @@ function TaskList({ tasks, title, onTaskClick, onTaskStatusChange, emptyMessage,
|
|
|
160
160
|
}),
|
|
161
161
|
tasks.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
162
162
|
role: "status",
|
|
163
|
-
className: `py-8 text-center text-sm ${
|
|
163
|
+
className: `py-8 text-center text-sm ${require_text_truncate.OPT_TEXT_SECONDARY}`,
|
|
164
164
|
children: displayEmptyMessage
|
|
165
165
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_reopt_ai_opt_ui_primitives.CompositeProvider, {
|
|
166
166
|
focusLoop: true,
|
|
@@ -168,16 +168,16 @@ function TaskList({ tasks, title, onTaskClick, onTaskStatusChange, emptyMessage,
|
|
|
168
168
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_reopt_ai_opt_ui_primitives.Composite, {
|
|
169
169
|
role: "list",
|
|
170
170
|
"aria-label": displayTitle,
|
|
171
|
-
className: `rounded-lg ${
|
|
171
|
+
className: `rounded-lg ${require_text_truncate.OPT_BORDER} divide-border-subtle bg-surface divide-y`,
|
|
172
172
|
children: [displayTasks.map((task) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_reopt_ai_opt_ui_primitives.CompositeItem, {
|
|
173
173
|
role: "listitem",
|
|
174
|
-
className: `group gap-group flex w-full items-start p-3 ${
|
|
174
|
+
className: `group gap-group flex w-full items-start p-3 ${require_text_truncate.OPT_FOCUS} data-[active-item]:bg-accent-subtle ${onTaskClick ? "cursor-pointer" : ""}`,
|
|
175
175
|
onClick: () => onTaskClick === null || onTaskClick === void 0 ? void 0 : onTaskClick(task),
|
|
176
176
|
children: [onTaskStatusChange && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
177
177
|
className: "pt-0.5",
|
|
178
178
|
role: "presentation",
|
|
179
179
|
onClick: (e) => e.stopPropagation(),
|
|
180
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
180
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Checkbox, {
|
|
181
181
|
checked: task.status === "done",
|
|
182
182
|
onChange: (checked) => onTaskStatusChange(task, checked),
|
|
183
183
|
"aria-label": `${task.title} 완료 표시`
|
|
@@ -189,7 +189,7 @@ function TaskList({ tasks, title, onTaskClick, onTaskStatusChange, emptyMessage,
|
|
|
189
189
|
className: "gap-element flex items-center",
|
|
190
190
|
children: [
|
|
191
191
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
192
|
-
className: `text-sm font-medium ${
|
|
192
|
+
className: `text-sm font-medium ${require_text_truncate.OPT_TEXT_PRIMARY} ${task.status === "done" ? "line-through opacity-60" : ""}`,
|
|
193
193
|
children: task.title
|
|
194
194
|
}),
|
|
195
195
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -210,7 +210,7 @@ function TaskList({ tasks, title, onTaskClick, onTaskStatusChange, emptyMessage,
|
|
|
210
210
|
className: "gap-element mt-2 flex flex-col",
|
|
211
211
|
children: task.subtasks.map((subtask) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
212
212
|
className: `text-xs text-text-tertiary flex items-center gap-1.5`,
|
|
213
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
213
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Checkbox, {
|
|
214
214
|
checked: subtask.completed,
|
|
215
215
|
disabled: true,
|
|
216
216
|
"aria-label": subtask.title,
|
|
@@ -358,7 +358,7 @@ function ActivityFeed({ activities, title, maxItems, onActivityClick, onShowMore
|
|
|
358
358
|
children: displayTitle
|
|
359
359
|
}), activities.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
360
360
|
role: "status",
|
|
361
|
-
className: `py-8 text-center text-sm ${
|
|
361
|
+
className: `py-8 text-center text-sm ${require_text_truncate.OPT_TEXT_SECONDARY}`,
|
|
362
362
|
children: displayEmptyMessage
|
|
363
363
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_reopt_ai_opt_ui_primitives.CompositeProvider, {
|
|
364
364
|
focusLoop: true,
|
|
@@ -367,7 +367,7 @@ function ActivityFeed({ activities, title, maxItems, onActivityClick, onShowMore
|
|
|
367
367
|
role: "feed",
|
|
368
368
|
"aria-label": displayTitle,
|
|
369
369
|
"aria-busy": loading,
|
|
370
|
-
className: `rounded-lg ${
|
|
370
|
+
className: `rounded-lg ${require_text_truncate.OPT_BORDER} bg-surface`,
|
|
371
371
|
children: [displayActivities.map((activity, index) => {
|
|
372
372
|
var _activity$variant;
|
|
373
373
|
const ActivityIcon = activityIcon[activity.type];
|
|
@@ -377,7 +377,7 @@ function ActivityFeed({ activities, title, maxItems, onActivityClick, onShowMore
|
|
|
377
377
|
render: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("article", {}),
|
|
378
378
|
role: "article",
|
|
379
379
|
"aria-labelledby": activityId,
|
|
380
|
-
className:
|
|
380
|
+
className: require_text_truncate.cn("group gap-group relative flex w-full p-3", require_text_truncate.OPT_FOCUS_VISIBLE, "data-[active-item]:bg-accent-subtle", onActivityClick && "cursor-pointer", !isLast && "border-border-subtle border-b", variantBorder[(_activity$variant = activity.variant) !== null && _activity$variant !== void 0 ? _activity$variant : ""]),
|
|
381
381
|
onClick: () => onActivityClick === null || onActivityClick === void 0 ? void 0 : onActivityClick(activity),
|
|
382
382
|
onKeyDown: (event) => handleActivityKeyDown(event, activity),
|
|
383
383
|
children: [
|
|
@@ -405,7 +405,7 @@ function ActivityFeed({ activities, title, maxItems, onActivityClick, onShowMore
|
|
|
405
405
|
"aria-hidden": true
|
|
406
406
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
407
407
|
id: activityId,
|
|
408
|
-
className: `text-sm ${
|
|
408
|
+
className: `text-sm ${require_text_truncate.OPT_TEXT_PRIMARY} truncate`,
|
|
409
409
|
children: [
|
|
410
410
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
411
411
|
className: "font-medium",
|
|
@@ -413,7 +413,7 @@ function ActivityFeed({ activities, title, maxItems, onActivityClick, onShowMore
|
|
|
413
413
|
}),
|
|
414
414
|
" ",
|
|
415
415
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
416
|
-
className:
|
|
416
|
+
className: require_text_truncate.OPT_TEXT_SECONDARY,
|
|
417
417
|
children: labels.activityVerbs[activity.type]
|
|
418
418
|
}),
|
|
419
419
|
" ",
|
|
@@ -467,7 +467,7 @@ const defaultLabels$29 = {
|
|
|
467
467
|
};
|
|
468
468
|
/** Renders the filter bar component. */
|
|
469
469
|
function FilterBar({ filters, onFilterChange, onDateRangeChange, onClearAll, labels: customLabels, presetActions, className }) {
|
|
470
|
-
const labels =
|
|
470
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$29), customLabels);
|
|
471
471
|
const [searchValues, setSearchValues] = (0, react.useState)({});
|
|
472
472
|
const [tagInputValues, setTagInputValues] = (0, react.useState)({});
|
|
473
473
|
const [multiSelectOpen, setMultiSelectOpen] = (0, react.useState)({});
|
|
@@ -496,7 +496,7 @@ function FilterBar({ filters, onFilterChange, onDateRangeChange, onClearAll, lab
|
|
|
496
496
|
const currentTags = (_ref2 = filter === null || filter === void 0 ? void 0 : filter.value) !== null && _ref2 !== void 0 ? _ref2 : [];
|
|
497
497
|
if (currentTags.includes(val)) return;
|
|
498
498
|
onFilterChange === null || onFilterChange === void 0 || onFilterChange(filterId, [...currentTags, val]);
|
|
499
|
-
setTagInputValues((prev) =>
|
|
499
|
+
setTagInputValues((prev) => require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, prev), {}, { [filterId]: "" }));
|
|
500
500
|
}, [
|
|
501
501
|
filters,
|
|
502
502
|
tagInputValues,
|
|
@@ -520,12 +520,12 @@ function FilterBar({ filters, onFilterChange, onDateRangeChange, onClearAll, lab
|
|
|
520
520
|
var _searchValues$filter$;
|
|
521
521
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
522
522
|
className: "relative",
|
|
523
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
523
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Input, {
|
|
524
524
|
placeholder: filter.label || labels.searchPlaceholder,
|
|
525
525
|
value: (_searchValues$filter$ = searchValues[filter.id]) !== null && _searchValues$filter$ !== void 0 ? _searchValues$filter$ : "",
|
|
526
526
|
onChange: (e) => {
|
|
527
527
|
const value = e.target.value;
|
|
528
|
-
setSearchValues((prev) =>
|
|
528
|
+
setSearchValues((prev) => require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, prev), {}, { [filter.id]: value }));
|
|
529
529
|
onFilterChange === null || onFilterChange === void 0 || onFilterChange(filter.id, value);
|
|
530
530
|
},
|
|
531
531
|
"aria-label": filter.label || labels.searchPlaceholder,
|
|
@@ -539,14 +539,14 @@ function FilterBar({ filters, onFilterChange, onDateRangeChange, onClearAll, lab
|
|
|
539
539
|
}
|
|
540
540
|
if (filter.type === "select" && filter.options) {
|
|
541
541
|
var _filter$options$find$, _filter$options$find;
|
|
542
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
542
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.SelectRoot, {
|
|
543
543
|
value: filter.value,
|
|
544
544
|
onValueChange: (value) => onFilterChange === null || onFilterChange === void 0 ? void 0 : onFilterChange(filter.id, value),
|
|
545
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
545
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.SelectTrigger, {
|
|
546
546
|
className: "h-9 min-w-[120px] text-sm",
|
|
547
547
|
"aria-label": filter.label,
|
|
548
548
|
children: (_filter$options$find$ = (_filter$options$find = filter.options.find((o) => o.value === filter.value)) === null || _filter$options$find === void 0 ? void 0 : _filter$options$find.label) !== null && _filter$options$find$ !== void 0 ? _filter$options$find$ : filter.label
|
|
549
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
549
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.SelectPopover, { children: filter.options.map((option) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.SelectItem, {
|
|
550
550
|
value: option.value,
|
|
551
551
|
children: option.label
|
|
552
552
|
}, option.id)) })]
|
|
@@ -557,20 +557,20 @@ function FilterBar({ filters, onFilterChange, onDateRangeChange, onClearAll, lab
|
|
|
557
557
|
const selectedValues = (_ref4 = filter.value) !== null && _ref4 !== void 0 ? _ref4 : [];
|
|
558
558
|
const isOpen = (_multiSelectOpen$filt = multiSelectOpen[filter.id]) !== null && _multiSelectOpen$filt !== void 0 ? _multiSelectOpen$filt : false;
|
|
559
559
|
const handleOpenChange = (open) => {
|
|
560
|
-
setMultiSelectOpen((prev) =>
|
|
560
|
+
setMultiSelectOpen((prev) => require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, prev), {}, { [filter.id]: open }));
|
|
561
561
|
if (!open) requestAnimationFrame(() => {
|
|
562
562
|
var _triggerRefs$current$;
|
|
563
563
|
(_triggerRefs$current$ = triggerRefs.current[filter.id]) === null || _triggerRefs$current$ === void 0 || _triggerRefs$current$.focus();
|
|
564
564
|
});
|
|
565
565
|
};
|
|
566
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
566
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.PopoverRoot, {
|
|
567
567
|
open: isOpen,
|
|
568
568
|
onOpenChange: handleOpenChange,
|
|
569
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
569
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.PopoverTrigger, {
|
|
570
570
|
ref: (el) => {
|
|
571
571
|
triggerRefs.current[filter.id] = el;
|
|
572
572
|
},
|
|
573
|
-
className: `gap-element inline-flex h-9 items-center rounded-lg px-3 text-sm ${
|
|
573
|
+
className: `gap-element inline-flex h-9 items-center rounded-lg px-3 text-sm ${require_text_truncate.OPT_BORDER} bg-surface ${require_text_truncate.OPT_TEXT_PRIMARY} ${require_text_truncate.OPT_FOCUS} hover:bg-bg-subtle transition-colors`,
|
|
574
574
|
"aria-expanded": isOpen,
|
|
575
575
|
"aria-label": `${filter.label} 필터 ${selectedValues.length > 0 ? `(${selectedValues.length}개 선택됨)` : ""}`,
|
|
576
576
|
children: [
|
|
@@ -586,15 +586,15 @@ function FilterBar({ filters, onFilterChange, onDateRangeChange, onClearAll, lab
|
|
|
586
586
|
children: "▼"
|
|
587
587
|
})
|
|
588
588
|
]
|
|
589
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
590
|
-
className: `z-50 mt-1 min-w-[180px] rounded-lg ${
|
|
589
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.PopoverContent, {
|
|
590
|
+
className: `z-50 mt-1 min-w-[180px] rounded-lg ${require_text_truncate.OPT_BORDER} bg-surface p-2 shadow-lg`,
|
|
591
591
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
592
592
|
className: "gap-element flex flex-col",
|
|
593
593
|
children: filter.options.map((option) => {
|
|
594
594
|
const isChecked = selectedValues.includes(option.value);
|
|
595
595
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
596
|
-
className: `hover:bg-bg-subtle gap-element flex cursor-pointer items-center rounded-md px-2 py-1.5 text-sm ${
|
|
597
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
596
|
+
className: `hover:bg-bg-subtle gap-element flex cursor-pointer items-center rounded-md px-2 py-1.5 text-sm ${require_text_truncate.OPT_TEXT_PRIMARY}`,
|
|
597
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Checkbox, {
|
|
598
598
|
checked: isChecked,
|
|
599
599
|
onChange: () => handleMultiSelectToggle(filter.id, option.value),
|
|
600
600
|
"aria-label": option.label
|
|
@@ -605,7 +605,7 @@ function FilterBar({ filters, onFilterChange, onDateRangeChange, onClearAll, lab
|
|
|
605
605
|
})]
|
|
606
606
|
}, filter.id);
|
|
607
607
|
}
|
|
608
|
-
if (filter.type === "date-range") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
608
|
+
if (filter.type === "date-range") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.DateRangePicker, {
|
|
609
609
|
"aria-label": filter.label,
|
|
610
610
|
placeholder: filter.label,
|
|
611
611
|
onChange: (range) => onDateRangeChange === null || onDateRangeChange === void 0 ? void 0 : onDateRangeChange(filter.id, range),
|
|
@@ -640,7 +640,7 @@ function FilterBar({ filters, onFilterChange, onDateRangeChange, onClearAll, lab
|
|
|
640
640
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
641
641
|
type: "text",
|
|
642
642
|
value: (_tagInputValues$filte2 = tagInputValues[filter.id]) !== null && _tagInputValues$filte2 !== void 0 ? _tagInputValues$filte2 : "",
|
|
643
|
-
onChange: (e) => setTagInputValues((prev) =>
|
|
643
|
+
onChange: (e) => setTagInputValues((prev) => require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, prev), {}, { [filter.id]: e.target.value })),
|
|
644
644
|
onKeyDown: (e) => {
|
|
645
645
|
if (e.key === "Enter") {
|
|
646
646
|
e.preventDefault();
|
|
@@ -648,7 +648,7 @@ function FilterBar({ filters, onFilterChange, onDateRangeChange, onClearAll, lab
|
|
|
648
648
|
}
|
|
649
649
|
},
|
|
650
650
|
placeholder: filter.label,
|
|
651
|
-
className: `border-border bg-surface placeholder:text-text-tertiary focus-visible:ring-ring h-8 w-24 rounded-md border px-2 text-xs outline-none focus-visible:ring-2 ${
|
|
651
|
+
className: `border-border bg-surface placeholder:text-text-tertiary focus-visible:ring-ring h-8 w-24 rounded-md border px-2 text-xs outline-none focus-visible:ring-2 ${require_text_truncate.OPT_TEXT_PRIMARY}`,
|
|
652
652
|
"aria-label": filter.label
|
|
653
653
|
})
|
|
654
654
|
})]
|
|
@@ -662,7 +662,7 @@ function FilterBar({ filters, onFilterChange, onDateRangeChange, onClearAll, lab
|
|
|
662
662
|
}, filter.id);
|
|
663
663
|
return null;
|
|
664
664
|
}),
|
|
665
|
-
hasActiveFilters && onClearAll && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
665
|
+
hasActiveFilters && onClearAll && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Button, {
|
|
666
666
|
onClick: onClearAll,
|
|
667
667
|
variant: "ghost",
|
|
668
668
|
className: "text-danger-fg hover:bg-danger-subtle h-9 px-3 text-sm",
|
|
@@ -696,7 +696,7 @@ function matchesShortcut(event, shortcut) {
|
|
|
696
696
|
const defaultLabels$28 = { title: "빠른 작업" };
|
|
697
697
|
/** Renders the quick actions component. */
|
|
698
698
|
function QuickActions({ actions, title, layout = "grid", columns = 3, showDescriptionInGrid = false, bindShortcuts = false, labels: customLabels, className }) {
|
|
699
|
-
const labels =
|
|
699
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$28), customLabels);
|
|
700
700
|
const displayTitle = title !== null && title !== void 0 ? title : labels.title;
|
|
701
701
|
const titleId = (0, react.useId)();
|
|
702
702
|
(0, react.useEffect)(() => {
|
|
@@ -738,12 +738,12 @@ function QuickActions({ actions, title, layout = "grid", columns = 3, showDescri
|
|
|
738
738
|
2: "grid-cols-2",
|
|
739
739
|
3: "grid-cols-3",
|
|
740
740
|
4: "grid-cols-4"
|
|
741
|
-
}[columns]}` : `flex flex-col rounded-lg ${
|
|
741
|
+
}[columns]}` : `flex flex-col rounded-lg ${require_text_truncate.OPT_BORDER} divide-border-subtle bg-surface divide-y`,
|
|
742
742
|
children: actions.map((action) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_reopt_ai_opt_ui_primitives.CompositeItem, {
|
|
743
743
|
onClick: action.onClick,
|
|
744
744
|
disabled: action.disabled,
|
|
745
745
|
"aria-label": action.icon && typeof action.icon === "string" ? `${action.label}${action.description ? `: ${action.description}` : ""}` : void 0,
|
|
746
|
-
className: layout === "grid" ? `gap-element flex flex-col items-center rounded-lg p-4 ${
|
|
746
|
+
className: layout === "grid" ? `gap-element flex flex-col items-center rounded-lg p-4 ${require_text_truncate.OPT_BORDER} bg-surface ${require_text_truncate.OPT_FOCUS} ${require_text_truncate.OPT_HOVER_ITEM} cursor-pointer transition-colors disabled:cursor-not-allowed disabled:opacity-50` : `gap-group flex w-full items-center p-3 ${require_text_truncate.OPT_FOCUS} ${require_text_truncate.OPT_HOVER_ITEM} cursor-pointer first:rounded-t-lg last:rounded-b-lg disabled:cursor-not-allowed disabled:opacity-50`,
|
|
747
747
|
children: [
|
|
748
748
|
action.icon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
749
749
|
className: layout === "grid" ? "text-2xl" : "bg-bg-subtle flex h-8 w-8 items-center justify-center rounded-lg text-lg",
|
|
@@ -753,14 +753,14 @@ function QuickActions({ actions, title, layout = "grid", columns = 3, showDescri
|
|
|
753
753
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
754
754
|
className: layout === "grid" ? "text-center" : "min-w-0 flex-1",
|
|
755
755
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
756
|
-
className: `text-sm font-medium ${
|
|
756
|
+
className: `text-sm font-medium ${require_text_truncate.OPT_TEXT_PRIMARY} ${layout === "grid" ? "block" : ""}`,
|
|
757
757
|
children: action.label
|
|
758
758
|
}), action.description && (layout === "list" || showDescriptionInGrid) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
759
759
|
className: `text-xs text-text-secondary ${layout === "grid" ? "mt-1" : "mt-0.5"}`,
|
|
760
760
|
children: action.description
|
|
761
761
|
})]
|
|
762
762
|
}),
|
|
763
|
-
action.shortcut && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
763
|
+
action.shortcut && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Kbd, {
|
|
764
764
|
className: layout === "grid" ? "mt-1" : "",
|
|
765
765
|
children: action.shortcut
|
|
766
766
|
})
|
|
@@ -788,14 +788,14 @@ const defaultLabels$27 = {
|
|
|
788
788
|
}
|
|
789
789
|
};
|
|
790
790
|
const statusDot = {
|
|
791
|
-
online:
|
|
792
|
-
away:
|
|
793
|
-
busy:
|
|
794
|
-
offline:
|
|
791
|
+
online: require_text_truncate.OPT_DOT_GREEN,
|
|
792
|
+
away: require_text_truncate.OPT_DOT_YELLOW,
|
|
793
|
+
busy: require_text_truncate.OPT_DOT_RED,
|
|
794
|
+
offline: require_text_truncate.OPT_DOT_GRAY
|
|
795
795
|
};
|
|
796
796
|
/** Renders the team member list component. */
|
|
797
797
|
function TeamMemberList({ members, title, layout = "list", maxDisplay, onMemberClick, onShowMore, emptyMessage, labels: customLabels, className }) {
|
|
798
|
-
const labels =
|
|
798
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$27), customLabels), {}, { status: require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$27.status), customLabels === null || customLabels === void 0 ? void 0 : customLabels.status) });
|
|
799
799
|
const displayTitle = title !== null && title !== void 0 ? title : labels.title;
|
|
800
800
|
const displayEmptyMessage = emptyMessage !== null && emptyMessage !== void 0 ? emptyMessage : labels.emptyMessage;
|
|
801
801
|
const titleId = (0, react.useId)();
|
|
@@ -844,7 +844,7 @@ function TeamMemberList({ members, title, layout = "list", maxDisplay, onMemberC
|
|
|
844
844
|
children: [displayMembers.map((member) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_reopt_ai_opt_ui_primitives.CompositeItem, {
|
|
845
845
|
role: "listitem",
|
|
846
846
|
onClick: () => onMemberClick === null || onMemberClick === void 0 ? void 0 : onMemberClick(member),
|
|
847
|
-
className: `gap-element inline-flex items-center rounded-full py-1 pr-3 pl-1 ${
|
|
847
|
+
className: `gap-element inline-flex items-center rounded-full py-1 pr-3 pl-1 ${require_text_truncate.OPT_BORDER} bg-surface ${require_text_truncate.OPT_FOCUS} hover:bg-bg-subtle data-[active-item]:bg-accent-subtle transition-colors`,
|
|
848
848
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
849
849
|
className: "relative",
|
|
850
850
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_key_pad_menu.Avatar, {
|
|
@@ -856,7 +856,7 @@ function TeamMemberList({ members, title, layout = "list", maxDisplay, onMemberC
|
|
|
856
856
|
"aria-label": labels.status[member.status]
|
|
857
857
|
})]
|
|
858
858
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
859
|
-
className: `text-sm ${
|
|
859
|
+
className: `text-sm ${require_text_truncate.OPT_TEXT_PRIMARY}`,
|
|
860
860
|
children: member.name
|
|
861
861
|
})]
|
|
862
862
|
}, member.id)), remainingCount > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_reopt_ai_opt_ui_primitives.CompositeItem, {
|
|
@@ -888,7 +888,7 @@ function TeamMemberList({ members, title, layout = "list", maxDisplay, onMemberC
|
|
|
888
888
|
})]
|
|
889
889
|
}), members.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
890
890
|
role: "status",
|
|
891
|
-
className: `py-8 text-center text-sm ${
|
|
891
|
+
className: `py-8 text-center text-sm ${require_text_truncate.OPT_TEXT_SECONDARY}`,
|
|
892
892
|
children: displayEmptyMessage
|
|
893
893
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_reopt_ai_opt_ui_primitives.CompositeProvider, {
|
|
894
894
|
focusLoop: true,
|
|
@@ -897,11 +897,11 @@ function TeamMemberList({ members, title, layout = "list", maxDisplay, onMemberC
|
|
|
897
897
|
role: "list",
|
|
898
898
|
"aria-labelledby": displayTitle ? titleId : void 0,
|
|
899
899
|
"aria-label": displayTitle ? void 0 : labels.title,
|
|
900
|
-
className: `rounded-lg ${
|
|
900
|
+
className: `rounded-lg ${require_text_truncate.OPT_BORDER} divide-border-subtle bg-surface divide-y`,
|
|
901
901
|
children: [displayMembers.map((member) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_reopt_ai_opt_ui_primitives.CompositeItem, {
|
|
902
902
|
role: "listitem",
|
|
903
903
|
onClick: () => onMemberClick === null || onMemberClick === void 0 ? void 0 : onMemberClick(member),
|
|
904
|
-
className: `group gap-group flex w-full items-center p-3 ${
|
|
904
|
+
className: `group gap-group flex w-full items-center p-3 ${require_text_truncate.OPT_FOCUS} data-[active-item]:bg-accent-subtle ${onMemberClick ? "cursor-pointer" : ""}`,
|
|
905
905
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
906
906
|
className: "relative",
|
|
907
907
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_key_pad_menu.Avatar, {
|
|
@@ -917,14 +917,14 @@ function TeamMemberList({ members, title, layout = "list", maxDisplay, onMemberC
|
|
|
917
917
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
918
918
|
className: "gap-element flex items-center",
|
|
919
919
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
920
|
-
className: `text-sm font-medium ${
|
|
920
|
+
className: `text-sm font-medium ${require_text_truncate.OPT_TEXT_PRIMARY}`,
|
|
921
921
|
children: member.name
|
|
922
922
|
}), member.status && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
923
923
|
className: `text-xs text-text-tertiary`,
|
|
924
924
|
children: ["· ", labels.status[member.status]]
|
|
925
925
|
})]
|
|
926
926
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
927
|
-
className: `text-xs ${
|
|
927
|
+
className: `text-xs ${require_text_truncate.OPT_TEXT_SECONDARY}`,
|
|
928
928
|
children: [
|
|
929
929
|
member.role && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: member.role }),
|
|
930
930
|
member.role && member.email && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: " · " }),
|
|
@@ -992,7 +992,7 @@ function AuthForm({ defaultMode = "login", mode: controlledMode, onModeChange, s
|
|
|
992
992
|
onSubmit: (values) => {
|
|
993
993
|
setSubmitted(true);
|
|
994
994
|
setTimeout(() => setSubmitted(false), 3e3);
|
|
995
|
-
if (onSubmit) onSubmit(
|
|
995
|
+
if (onSubmit) onSubmit(require_text_truncate._objectSpread2(require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({
|
|
996
996
|
email: values.email,
|
|
997
997
|
password: values.password
|
|
998
998
|
}, mode === "signup" ? { confirmPassword: values.confirmPassword } : {}), mode === "login" ? { rememberMe: values.rememberMe } : {}), {}, { mode }));
|
|
@@ -1019,59 +1019,59 @@ function AuthForm({ defaultMode = "login", mode: controlledMode, onModeChange, s
|
|
|
1019
1019
|
children: signupTitle
|
|
1020
1020
|
})]
|
|
1021
1021
|
}),
|
|
1022
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
1022
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.FormRoot, {
|
|
1023
1023
|
store: form,
|
|
1024
1024
|
"aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : mode === "login" ? "로그인 폼" : "회원가입 폼",
|
|
1025
1025
|
children: [
|
|
1026
1026
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1027
1027
|
className: "gap-element flex flex-col",
|
|
1028
1028
|
children: [
|
|
1029
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1029
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormLabel, {
|
|
1030
1030
|
name: "email",
|
|
1031
1031
|
children: (_labels$emailLabel = labels.emailLabel) !== null && _labels$emailLabel !== void 0 ? _labels$emailLabel : "이메일"
|
|
1032
1032
|
}),
|
|
1033
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1033
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormInput, {
|
|
1034
1034
|
name: "email",
|
|
1035
1035
|
type: "email",
|
|
1036
1036
|
placeholder: "email@example.com"
|
|
1037
1037
|
}),
|
|
1038
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1038
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormError, { name: "email" })
|
|
1039
1039
|
]
|
|
1040
1040
|
}),
|
|
1041
1041
|
renderExtraFields === null || renderExtraFields === void 0 ? void 0 : renderExtraFields(mode),
|
|
1042
1042
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1043
1043
|
className: "gap-element flex flex-col",
|
|
1044
1044
|
children: [
|
|
1045
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1045
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormLabel, {
|
|
1046
1046
|
name: "password",
|
|
1047
1047
|
children: (_labels$passwordLabel = labels.passwordLabel) !== null && _labels$passwordLabel !== void 0 ? _labels$passwordLabel : "비밀번호"
|
|
1048
1048
|
}),
|
|
1049
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1049
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormInput, {
|
|
1050
1050
|
name: "password",
|
|
1051
1051
|
type: "password",
|
|
1052
1052
|
placeholder: `${minPasswordLength}자 이상 입력하세요`
|
|
1053
1053
|
}),
|
|
1054
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1054
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormError, { name: "password" })
|
|
1055
1055
|
]
|
|
1056
1056
|
}),
|
|
1057
1057
|
mode === "signup" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1058
1058
|
className: "gap-element flex flex-col",
|
|
1059
1059
|
children: [
|
|
1060
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1060
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormLabel, {
|
|
1061
1061
|
name: "confirmPassword",
|
|
1062
1062
|
children: (_labels$confirmPasswo = labels.confirmPasswordLabel) !== null && _labels$confirmPasswo !== void 0 ? _labels$confirmPasswo : "비밀번호 확인"
|
|
1063
1063
|
}),
|
|
1064
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1064
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormInput, {
|
|
1065
1065
|
name: "confirmPassword",
|
|
1066
1066
|
type: "password",
|
|
1067
1067
|
placeholder: "비밀번호를 다시 입력하세요"
|
|
1068
1068
|
}),
|
|
1069
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1069
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormError, { name: "confirmPassword" })
|
|
1070
1070
|
]
|
|
1071
1071
|
}),
|
|
1072
1072
|
mode === "login" && showRememberMe && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
1073
1073
|
className: "gap-group flex items-center",
|
|
1074
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1074
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormSwitch, {
|
|
1075
1075
|
name: "rememberMe",
|
|
1076
1076
|
size: "sm"
|
|
1077
1077
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -1079,7 +1079,7 @@ function AuthForm({ defaultMode = "login", mode: controlledMode, onModeChange, s
|
|
|
1079
1079
|
children: (_labels$rememberMeLab = labels.rememberMeLabel) !== null && _labels$rememberMeLab !== void 0 ? _labels$rememberMeLab : "로그인 상태 유지"
|
|
1080
1080
|
})]
|
|
1081
1081
|
}),
|
|
1082
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1082
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormSubmit, {
|
|
1083
1083
|
disabled: form.isSubmitting(),
|
|
1084
1084
|
children: mode === "login" ? (_labels$loginButton = labels.loginButton) !== null && _labels$loginButton !== void 0 ? _labels$loginButton : "로그인" : (_labels$signupButton = labels.signupButton) !== null && _labels$signupButton !== void 0 ? _labels$signupButton : "회원가입"
|
|
1085
1085
|
})
|
|
@@ -1160,7 +1160,7 @@ function DynamicFieldForm({ initialCount = 1, minFields = 1, maxFields, fieldTyp
|
|
|
1160
1160
|
className: "gap-group flex flex-col",
|
|
1161
1161
|
"data-opt-id": "8RYG7",
|
|
1162
1162
|
"data-opt-slug": "form-dynamic.DynamicFieldForm",
|
|
1163
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
1163
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.FormRoot, {
|
|
1164
1164
|
store: form,
|
|
1165
1165
|
"aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : "동적 필드 폼",
|
|
1166
1166
|
children: [
|
|
@@ -1171,7 +1171,7 @@ function DynamicFieldForm({ initialCount = 1, minFields = 1, maxFields, fieldTyp
|
|
|
1171
1171
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1172
1172
|
className: "gap-element flex flex-col",
|
|
1173
1173
|
children: [
|
|
1174
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1174
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormLabel, {
|
|
1175
1175
|
name: fieldName,
|
|
1176
1176
|
children: formatTemplate(itemLabel, displayIndex + 1)
|
|
1177
1177
|
}),
|
|
@@ -1179,7 +1179,7 @@ function DynamicFieldForm({ initialCount = 1, minFields = 1, maxFields, fieldTyp
|
|
|
1179
1179
|
className: "gap-element flex",
|
|
1180
1180
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1181
1181
|
className: "flex-1",
|
|
1182
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1182
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormInput, {
|
|
1183
1183
|
name: fieldName,
|
|
1184
1184
|
type: fieldType,
|
|
1185
1185
|
placeholder: formatTemplate(itemPlaceholder, displayIndex + 1)
|
|
@@ -1193,7 +1193,7 @@ function DynamicFieldForm({ initialCount = 1, minFields = 1, maxFields, fieldTyp
|
|
|
1193
1193
|
children: "✕"
|
|
1194
1194
|
})]
|
|
1195
1195
|
}),
|
|
1196
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1196
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormError, { name: fieldName })
|
|
1197
1197
|
]
|
|
1198
1198
|
}, field.id);
|
|
1199
1199
|
})
|
|
@@ -1205,7 +1205,7 @@ function DynamicFieldForm({ initialCount = 1, minFields = 1, maxFields, fieldTyp
|
|
|
1205
1205
|
className: "border-border text-text-secondary hover:border-accent hover:bg-accent-subtle hover:text-accent w-full rounded-lg border border-dashed px-4 py-2.5 text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-30",
|
|
1206
1206
|
children: (_labels$addButton = labels.addButton) !== null && _labels$addButton !== void 0 ? _labels$addButton : "+ 항목 추가"
|
|
1207
1207
|
}),
|
|
1208
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1208
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormSubmit, {
|
|
1209
1209
|
disabled: form.isSubmitting(),
|
|
1210
1210
|
children: (_labels$submitButton = labels.submitButton) !== null && _labels$submitButton !== void 0 ? _labels$submitButton : "제출"
|
|
1211
1211
|
})
|
|
@@ -1295,30 +1295,30 @@ function FileUploadForm({ accept = "image/*,.pdf,.doc,.docx", showPreview = true
|
|
|
1295
1295
|
className: "gap-group flex flex-col",
|
|
1296
1296
|
"data-opt-id": "4E3MD",
|
|
1297
1297
|
"data-opt-slug": "form-upload.FileUploadForm",
|
|
1298
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
1298
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.FormRoot, {
|
|
1299
1299
|
store: form,
|
|
1300
1300
|
"aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : "파일 업로드 폼",
|
|
1301
1301
|
children: [
|
|
1302
1302
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1303
1303
|
className: "gap-element flex flex-col",
|
|
1304
1304
|
children: [
|
|
1305
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1305
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormLabel, {
|
|
1306
1306
|
name: "title",
|
|
1307
1307
|
children: (_labels$titleLabel = labels.titleLabel) !== null && _labels$titleLabel !== void 0 ? _labels$titleLabel : "제목"
|
|
1308
1308
|
}),
|
|
1309
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1309
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormInput, {
|
|
1310
1310
|
name: "title",
|
|
1311
1311
|
placeholder: (_labels$titlePlacehol = labels.titlePlaceholder) !== null && _labels$titlePlacehol !== void 0 ? _labels$titlePlacehol : "파일 제목을 입력하세요"
|
|
1312
1312
|
}),
|
|
1313
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1313
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormError, { name: "title" })
|
|
1314
1314
|
]
|
|
1315
1315
|
}),
|
|
1316
1316
|
showDescription && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1317
1317
|
className: "gap-element flex flex-col",
|
|
1318
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1318
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormLabel, {
|
|
1319
1319
|
name: "description",
|
|
1320
1320
|
children: (_labels$descriptionLa = labels.descriptionLabel) !== null && _labels$descriptionLa !== void 0 ? _labels$descriptionLa : "설명"
|
|
1321
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1321
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormTextarea, {
|
|
1322
1322
|
name: "description",
|
|
1323
1323
|
placeholder: (_labels$descriptionPl = labels.descriptionPlaceholder) !== null && _labels$descriptionPl !== void 0 ? _labels$descriptionPl : "파일에 대한 설명을 입력하세요",
|
|
1324
1324
|
rows: descriptionRows,
|
|
@@ -1382,7 +1382,7 @@ function FileUploadForm({ accept = "image/*,.pdf,.doc,.docx", showPreview = true
|
|
|
1382
1382
|
"aria-label": (_labels$columnMapping = labels.columnMappingLabel) !== null && _labels$columnMapping !== void 0 ? _labels$columnMapping : "Column mapping",
|
|
1383
1383
|
children: columnMapping
|
|
1384
1384
|
}),
|
|
1385
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1385
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormSubmit, {
|
|
1386
1386
|
disabled: form.isSubmitting(),
|
|
1387
1387
|
children: (_labels$submitButton = labels.submitButton) !== null && _labels$submitButton !== void 0 ? _labels$submitButton : "업로드"
|
|
1388
1388
|
})
|
|
@@ -1472,17 +1472,17 @@ function WizardForm({ fields, steps, showReview = true, onSubmit, onStepChange,
|
|
|
1472
1472
|
className: "text-text-primary text-sm font-medium",
|
|
1473
1473
|
children: field.label
|
|
1474
1474
|
}),
|
|
1475
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1475
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormRadioGroup, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1476
1476
|
className: "gap-group flex",
|
|
1477
1477
|
children: (_field$options = field.options) === null || _field$options === void 0 ? void 0 : _field$options.map((option) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
1478
1478
|
className: "text-text-primary gap-element flex items-center text-sm",
|
|
1479
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1479
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormRadio, {
|
|
1480
1480
|
name: field.name,
|
|
1481
1481
|
value: option.value
|
|
1482
1482
|
}), option.label]
|
|
1483
1483
|
}, option.value))
|
|
1484
1484
|
}) }),
|
|
1485
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1485
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormError, { name: field.name })
|
|
1486
1486
|
]
|
|
1487
1487
|
}, field.name);
|
|
1488
1488
|
}
|
|
@@ -1490,25 +1490,25 @@ function WizardForm({ fields, steps, showReview = true, onSubmit, onStepChange,
|
|
|
1490
1490
|
className: "gap-element flex flex-col",
|
|
1491
1491
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
1492
1492
|
className: "text-text-primary gap-element flex items-center text-sm",
|
|
1493
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1494
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1493
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormCheckbox, { name: field.name }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: field.label })]
|
|
1494
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormError, { name: field.name })]
|
|
1495
1495
|
}, field.name);
|
|
1496
1496
|
if (field.type === "textarea") {
|
|
1497
1497
|
var _field$rows, _field$resize;
|
|
1498
1498
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1499
1499
|
className: "gap-element flex flex-col",
|
|
1500
1500
|
children: [
|
|
1501
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1501
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormLabel, {
|
|
1502
1502
|
name: field.name,
|
|
1503
1503
|
children: field.label
|
|
1504
1504
|
}),
|
|
1505
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1505
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormTextarea, {
|
|
1506
1506
|
name: field.name,
|
|
1507
1507
|
placeholder: field.placeholder,
|
|
1508
1508
|
rows: (_field$rows = field.rows) !== null && _field$rows !== void 0 ? _field$rows : 4,
|
|
1509
1509
|
resize: (_field$resize = field.resize) !== null && _field$resize !== void 0 ? _field$resize : "vertical"
|
|
1510
1510
|
}),
|
|
1511
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1511
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormError, { name: field.name })
|
|
1512
1512
|
]
|
|
1513
1513
|
}, field.name);
|
|
1514
1514
|
}
|
|
@@ -1517,25 +1517,25 @@ function WizardForm({ fields, steps, showReview = true, onSubmit, onStepChange,
|
|
|
1517
1517
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1518
1518
|
className: "gap-element flex flex-col",
|
|
1519
1519
|
children: [
|
|
1520
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1520
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormLabel, {
|
|
1521
1521
|
name: field.name,
|
|
1522
1522
|
children: field.label
|
|
1523
1523
|
}),
|
|
1524
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1524
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormSelect, {
|
|
1525
1525
|
name: field.name,
|
|
1526
1526
|
placeholder: field.placeholder,
|
|
1527
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1527
|
+
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, {
|
|
1528
1528
|
value: option.value,
|
|
1529
1529
|
children: option.label
|
|
1530
1530
|
}, option.value)) })
|
|
1531
1531
|
}),
|
|
1532
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1532
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormError, { name: field.name })
|
|
1533
1533
|
]
|
|
1534
1534
|
}, field.name);
|
|
1535
1535
|
}
|
|
1536
1536
|
if (field.type === "switch") return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
1537
1537
|
className: "gap-group flex items-center",
|
|
1538
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1538
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormSwitch, { name: field.name }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1539
1539
|
className: "flex flex-col",
|
|
1540
1540
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1541
1541
|
className: "text-text-primary text-sm font-medium",
|
|
@@ -1549,16 +1549,16 @@ function WizardForm({ fields, steps, showReview = true, onSubmit, onStepChange,
|
|
|
1549
1549
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1550
1550
|
className: "gap-element flex flex-col",
|
|
1551
1551
|
children: [
|
|
1552
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1552
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormLabel, {
|
|
1553
1553
|
name: field.name,
|
|
1554
1554
|
children: field.label
|
|
1555
1555
|
}),
|
|
1556
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1556
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormInput, {
|
|
1557
1557
|
name: field.name,
|
|
1558
1558
|
type: (_field$type = field.type) !== null && _field$type !== void 0 ? _field$type : "text",
|
|
1559
1559
|
placeholder: field.placeholder
|
|
1560
1560
|
}),
|
|
1561
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1561
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormError, { name: field.name })
|
|
1562
1562
|
]
|
|
1563
1563
|
}, field.name);
|
|
1564
1564
|
};
|
|
@@ -1597,7 +1597,7 @@ function WizardForm({ fields, steps, showReview = true, onSubmit, onStepChange,
|
|
|
1597
1597
|
]
|
|
1598
1598
|
}, label))
|
|
1599
1599
|
}),
|
|
1600
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
1600
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.FormRoot, {
|
|
1601
1601
|
store: form,
|
|
1602
1602
|
"aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : "다단계 폼",
|
|
1603
1603
|
children: [
|
|
@@ -1638,7 +1638,7 @@ function WizardForm({ fields, steps, showReview = true, onSubmit, onStepChange,
|
|
|
1638
1638
|
onClick: handleBack,
|
|
1639
1639
|
className: "border-border text-text-primary hover:bg-bg-subtle rounded-lg border px-4 py-2 text-sm font-medium",
|
|
1640
1640
|
children: (_labels$backButton = labels.backButton) !== null && _labels$backButton !== void 0 ? _labels$backButton : "이전"
|
|
1641
|
-
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1641
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FormSubmit, { children: isLastStep ? (_labels$submitButton = labels.submitButton) !== null && _labels$submitButton !== void 0 ? _labels$submitButton : "제출" : (_labels$nextButton = labels.nextButton) !== null && _labels$nextButton !== void 0 ? _labels$nextButton : "다음" })]
|
|
1642
1642
|
})
|
|
1643
1643
|
]
|
|
1644
1644
|
}),
|
|
@@ -1726,10 +1726,10 @@ function getEventIconStyle(color) {
|
|
|
1726
1726
|
/** Renders the event icon component. */
|
|
1727
1727
|
function EventIcon({ icon, color, size = "md", className, labels: customLabels }) {
|
|
1728
1728
|
var _iconEntry$label;
|
|
1729
|
-
const labels =
|
|
1729
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$26), customLabels);
|
|
1730
1730
|
const sizes = SIZE_MAP[size];
|
|
1731
1731
|
const resolvedColor = (color === null || color === void 0 ? void 0 : color.trim()) ? color : void 0;
|
|
1732
|
-
const iconEntry = typeof icon === "string" ?
|
|
1732
|
+
const iconEntry = typeof icon === "string" ? require_text_truncate.getIconRegistryEntry(icon) : void 0;
|
|
1733
1733
|
const iconElement = react.isValidElement(icon) ? icon : null;
|
|
1734
1734
|
const ariaLabel = typeof icon === "string" ? `${labels.eventLabelPrefix}: ${(_iconEntry$label = iconEntry === null || iconEntry === void 0 ? void 0 : iconEntry.label) !== null && _iconEntry$label !== void 0 ? _iconEntry$label : icon}` : labels.defaultAriaLabel;
|
|
1735
1735
|
let iconContent;
|
|
@@ -1738,13 +1738,13 @@ function EventIcon({ icon, color, size = "md", className, labels: customLabels }
|
|
|
1738
1738
|
size: sizes.iconSize
|
|
1739
1739
|
});
|
|
1740
1740
|
else if (typeof icon === "string") iconContent = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1741
|
-
className:
|
|
1741
|
+
className: require_text_truncate.cn(sizes.text, "leading-none"),
|
|
1742
1742
|
children: icon
|
|
1743
1743
|
});
|
|
1744
1744
|
else if (iconElement) iconContent = react.cloneElement(iconElement, {
|
|
1745
1745
|
"aria-hidden": true,
|
|
1746
1746
|
size: sizes.iconSize,
|
|
1747
|
-
className:
|
|
1747
|
+
className: require_text_truncate.cn("shrink-0", iconElement.props.className)
|
|
1748
1748
|
});
|
|
1749
1749
|
else iconContent = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1750
1750
|
className: "flex shrink-0 items-center justify-center",
|
|
@@ -1753,7 +1753,7 @@ function EventIcon({ icon, color, size = "md", className, labels: customLabels }
|
|
|
1753
1753
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1754
1754
|
role: "img",
|
|
1755
1755
|
"aria-label": ariaLabel,
|
|
1756
|
-
className:
|
|
1756
|
+
className: require_text_truncate.cn("inline-flex shrink-0 items-center justify-center rounded-lg", !resolvedColor && "bg-accent-subtle text-accent", sizes.container, className),
|
|
1757
1757
|
style: getEventIconStyle(resolvedColor),
|
|
1758
1758
|
"data-opt-id": "ZNSD9",
|
|
1759
1759
|
"data-opt-slug": "event-icon.EventIcon",
|
|
@@ -1803,12 +1803,12 @@ function ConnectionIndicator({ status, tone, label, showLabel = true, pulse, cla
|
|
|
1803
1803
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
1804
1804
|
role: "status",
|
|
1805
1805
|
"aria-label": displayLabel || void 0,
|
|
1806
|
-
className:
|
|
1806
|
+
className: require_text_truncate.cn("inline-flex min-w-0 items-center gap-1.5", className),
|
|
1807
1807
|
"data-opt-id": "191EC",
|
|
1808
1808
|
"data-opt-slug": "connection-indicator.ConnectionIndicator",
|
|
1809
1809
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
1810
1810
|
className: "relative flex h-2.5 w-2.5 flex-none",
|
|
1811
|
-
children: [resolvedPulse && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className:
|
|
1811
|
+
children: [resolvedPulse && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: require_text_truncate.cn("absolute inline-flex h-full w-full animate-ping rounded-full opacity-75", dotClass) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: require_text_truncate.cn("relative inline-flex h-2.5 w-2.5 rounded-full", dotClass) })]
|
|
1812
1812
|
}), showLabel && displayLabel && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1813
1813
|
className: "text-text-secondary truncate text-xs",
|
|
1814
1814
|
children: displayLabel
|
|
@@ -1825,12 +1825,12 @@ const defaultLabels$25 = {
|
|
|
1825
1825
|
};
|
|
1826
1826
|
/** Renders the floating action bar component. */
|
|
1827
1827
|
function FloatingActionBar({ actions, selectedCount, onAction, onDismiss, className, labels: customLabels }) {
|
|
1828
|
-
const labels =
|
|
1828
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$25), customLabels);
|
|
1829
1829
|
if (actions.length === 0) return null;
|
|
1830
1830
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1831
1831
|
role: "toolbar",
|
|
1832
1832
|
"aria-label": labels.toolbarAriaLabel,
|
|
1833
|
-
className:
|
|
1833
|
+
className: require_text_truncate.cn("fixed bottom-6 left-1/2 z-50 -translate-x-1/2", "gap-element flex items-center rounded-xl px-4 py-2.5", "bg-black/90 shadow-xl", "backdrop-blur-sm", className),
|
|
1834
1834
|
"data-opt-id": "S390B",
|
|
1835
1835
|
"data-opt-slug": "floating-action-bar.FloatingActionBar",
|
|
1836
1836
|
children: [
|
|
@@ -1840,12 +1840,12 @@ function FloatingActionBar({ actions, selectedCount, onAction, onDismiss, classN
|
|
|
1840
1840
|
}),
|
|
1841
1841
|
actions.map((action) => {
|
|
1842
1842
|
const variant = action.variant === "danger" ? "danger" : action.variant === "primary" ? "primary" : "ghost";
|
|
1843
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
1843
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.Button, {
|
|
1844
1844
|
variant,
|
|
1845
1845
|
size: "sm",
|
|
1846
1846
|
disabled: action.disabled,
|
|
1847
1847
|
onClick: () => onAction(action.id),
|
|
1848
|
-
className:
|
|
1848
|
+
className: require_text_truncate.cn(variant === "ghost" && "text-white hover:bg-white/10"),
|
|
1849
1849
|
children: [action.icon, action.label]
|
|
1850
1850
|
}, action.id);
|
|
1851
1851
|
}),
|
|
@@ -1870,7 +1870,7 @@ const defaultLabels$24 = {
|
|
|
1870
1870
|
};
|
|
1871
1871
|
/** Renders the template picker component. */
|
|
1872
1872
|
function TemplatePicker({ templates, selected, onSelect, labels: customLabels, showSearch = false, className }) {
|
|
1873
|
-
const labels =
|
|
1873
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$24), customLabels);
|
|
1874
1874
|
const [search, setSearch] = react.useState("");
|
|
1875
1875
|
const filtered = react.useMemo(() => {
|
|
1876
1876
|
if (!showSearch || !search) return templates;
|
|
@@ -1895,7 +1895,7 @@ function TemplatePicker({ templates, selected, onSelect, labels: customLabels, s
|
|
|
1895
1895
|
return map;
|
|
1896
1896
|
}, [filtered, labels.defaultCategory]);
|
|
1897
1897
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1898
|
-
className:
|
|
1898
|
+
className: require_text_truncate.cn("gap-group flex flex-col", className),
|
|
1899
1899
|
role: "listbox",
|
|
1900
1900
|
"aria-label": labels.ariaLabel,
|
|
1901
1901
|
"data-opt-id": "PVFJP",
|
|
@@ -1906,7 +1906,7 @@ function TemplatePicker({ templates, selected, onSelect, labels: customLabels, s
|
|
|
1906
1906
|
onChange: (e) => setSearch(e.target.value),
|
|
1907
1907
|
placeholder: labels.searchPlaceholder,
|
|
1908
1908
|
"aria-label": labels.searchPlaceholder,
|
|
1909
|
-
className:
|
|
1909
|
+
className: require_text_truncate.cn("border-border bg-surface text-text-primary placeholder:text-text-tertiary focus:border-accent w-full rounded-lg border px-3 py-2 text-sm", "outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-ring-offset")
|
|
1910
1910
|
}), Array.from(grouped).map(([category, items]) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
|
|
1911
1911
|
className: "text-text-tertiary mb-2 text-xs font-semibold tracking-wider uppercase",
|
|
1912
1912
|
children: category
|
|
@@ -1916,7 +1916,7 @@ function TemplatePicker({ templates, selected, onSelect, labels: customLabels, s
|
|
|
1916
1916
|
role: "option",
|
|
1917
1917
|
"aria-selected": selected === t.id,
|
|
1918
1918
|
onClick: () => onSelect(t.id),
|
|
1919
|
-
className:
|
|
1919
|
+
className: require_text_truncate.cn("flex flex-col items-start gap-1 rounded-lg border p-3 text-left transition-colors", "hover:bg-bg-subtle", selected === t.id ? "border-accent bg-accent-subtle" : "border-border"),
|
|
1920
1920
|
children: [
|
|
1921
1921
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1922
1922
|
className: "gap-element flex w-full items-center",
|
|
@@ -1929,7 +1929,7 @@ function TemplatePicker({ templates, selected, onSelect, labels: customLabels, s
|
|
|
1929
1929
|
className: "text-text-primary text-sm font-medium",
|
|
1930
1930
|
children: t.name
|
|
1931
1931
|
}),
|
|
1932
|
-
t.featured && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1932
|
+
t.featured && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Badge, {
|
|
1933
1933
|
variant: "info",
|
|
1934
1934
|
size: "sm",
|
|
1935
1935
|
className: "ml-auto",
|
|
@@ -1994,7 +1994,7 @@ const syntaxThemeClasses = {
|
|
|
1994
1994
|
/** Renders the code snippet viewer component. */
|
|
1995
1995
|
function CodeSnippetViewer({ code, language = "text", title, showLineNumbers = true, showCopyButton = true, maxHeight = 400, syntaxTheme = "default", className, labels: customLabels }) {
|
|
1996
1996
|
var _syntaxThemeClasses$s;
|
|
1997
|
-
const labels =
|
|
1997
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$23), customLabels);
|
|
1998
1998
|
const [copied, setCopied] = react.useState(false);
|
|
1999
1999
|
const lines = code.split("\n");
|
|
2000
2000
|
const theme = (_syntaxThemeClasses$s = syntaxThemeClasses[syntaxTheme]) !== null && _syntaxThemeClasses$s !== void 0 ? _syntaxThemeClasses$s : syntaxThemeClasses.default;
|
|
@@ -2007,11 +2007,11 @@ function CodeSnippetViewer({ code, language = "text", title, showLineNumbers = t
|
|
|
2007
2007
|
} catch (_unused) {}
|
|
2008
2008
|
}, [code]);
|
|
2009
2009
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2010
|
-
className:
|
|
2010
|
+
className: require_text_truncate.cn("border-border overflow-hidden rounded-lg border", theme.root, className),
|
|
2011
2011
|
"data-opt-id": "9GDXY",
|
|
2012
2012
|
"data-opt-slug": "code-snippet-viewer.CodeSnippetViewer",
|
|
2013
2013
|
children: [(title || showCopyButton) && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2014
|
-
className:
|
|
2014
|
+
className: require_text_truncate.cn("border-border flex items-center justify-between border-b px-3 py-1.5", theme.header),
|
|
2015
2015
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2016
2016
|
className: "text-text-tertiary text-xs font-medium",
|
|
2017
2017
|
children: title !== null && title !== void 0 ? title : language
|
|
@@ -2022,20 +2022,20 @@ function CodeSnippetViewer({ code, language = "text", title, showLineNumbers = t
|
|
|
2022
2022
|
children: copied ? labels.copied : labels.copy
|
|
2023
2023
|
})]
|
|
2024
2024
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2025
|
-
className:
|
|
2025
|
+
className: require_text_truncate.cn("overflow-auto", require_text_truncate.OPT_FOCUS_VISIBLE),
|
|
2026
2026
|
style: { maxHeight },
|
|
2027
2027
|
tabIndex: 0,
|
|
2028
2028
|
role: "region",
|
|
2029
2029
|
"aria-label": regionLabel,
|
|
2030
2030
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("pre", {
|
|
2031
|
-
className:
|
|
2031
|
+
className: require_text_truncate.cn("p-3 font-mono text-sm", theme.pre),
|
|
2032
2032
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", { children: lines.map((line, i) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2033
2033
|
className: "flex",
|
|
2034
2034
|
children: [showLineNumbers && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2035
|
-
className:
|
|
2035
|
+
className: require_text_truncate.cn("min-w-[2.5rem] pr-4 text-right select-none", theme.lineNumber),
|
|
2036
2036
|
children: i + 1
|
|
2037
2037
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2038
|
-
className:
|
|
2038
|
+
className: require_text_truncate.cn("whitespace-pre", theme.code),
|
|
2039
2039
|
children: line
|
|
2040
2040
|
})]
|
|
2041
2041
|
}, i)) })
|
|
@@ -2052,21 +2052,21 @@ const defaultLabels$22 = {
|
|
|
2052
2052
|
};
|
|
2053
2053
|
/** Renders the property explorer component. */
|
|
2054
2054
|
function PropertyExplorer({ groups, onSelect, className, labels: customLabels }) {
|
|
2055
|
-
const labels =
|
|
2055
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$22), customLabels);
|
|
2056
2056
|
const [search, setSearch] = react.useState("");
|
|
2057
2057
|
const filtered = react.useMemo(() => {
|
|
2058
2058
|
if (!search) return groups;
|
|
2059
2059
|
const q = search.toLowerCase();
|
|
2060
|
-
return groups.map((g) =>
|
|
2060
|
+
return groups.map((g) => require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, g), {}, { properties: g.properties.filter((p) => {
|
|
2061
2061
|
var _p$description;
|
|
2062
2062
|
return p.name.toLowerCase().includes(q) || p.type.toLowerCase().includes(q) || ((_p$description = p.description) === null || _p$description === void 0 ? void 0 : _p$description.toLowerCase().includes(q));
|
|
2063
2063
|
}) })).filter((g) => g.properties.length > 0);
|
|
2064
2064
|
}, [groups, search]);
|
|
2065
2065
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2066
|
-
className:
|
|
2066
|
+
className: require_text_truncate.cn("gap-element flex flex-col", className),
|
|
2067
2067
|
"data-opt-id": "HJF32",
|
|
2068
2068
|
"data-opt-slug": "property-explorer.PropertyExplorer",
|
|
2069
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2069
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Input, {
|
|
2070
2070
|
placeholder: labels.searchPlaceholder,
|
|
2071
2071
|
value: search,
|
|
2072
2072
|
onChange: (e) => setSearch(e.target.value),
|
|
@@ -2080,12 +2080,12 @@ function PropertyExplorer({ groups, onSelect, className, labels: customLabels })
|
|
|
2080
2080
|
className: "gap-element flex flex-col",
|
|
2081
2081
|
children: group.properties.map((prop) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
2082
2082
|
onClick: () => onSelect === null || onSelect === void 0 ? void 0 : onSelect(prop),
|
|
2083
|
-
className:
|
|
2083
|
+
className: require_text_truncate.cn("flex w-full items-center justify-between rounded-md px-2.5 py-1.5 text-left", "hover:bg-bg-subtle transition-colors"),
|
|
2084
2084
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2085
2085
|
className: "min-w-0",
|
|
2086
2086
|
children: [
|
|
2087
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2088
|
-
type:
|
|
2087
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FieldToken, {
|
|
2088
|
+
type: require_text_truncate.resolveFieldType(prop.type),
|
|
2089
2089
|
size: "xs",
|
|
2090
2090
|
title: prop.type,
|
|
2091
2091
|
className: "mr-2 align-[-2px]"
|
|
@@ -2125,9 +2125,9 @@ const defaultLabels$21 = {
|
|
|
2125
2125
|
};
|
|
2126
2126
|
/** Renders the query results table component. */
|
|
2127
2127
|
function QueryResultsTable({ columns, rows, maxHeight = 400, emptyMessage, loading = false, error, labels: customLabels, className }) {
|
|
2128
|
-
const labels =
|
|
2128
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$21), customLabels);
|
|
2129
2129
|
if (error) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2130
|
-
className:
|
|
2130
|
+
className: require_text_truncate.cn("border-danger bg-danger-subtle rounded-lg border p-4", className),
|
|
2131
2131
|
role: "alert",
|
|
2132
2132
|
"aria-live": "assertive",
|
|
2133
2133
|
"data-opt-id": "PNC1V",
|
|
@@ -2138,7 +2138,7 @@ function QueryResultsTable({ columns, rows, maxHeight = 400, emptyMessage, loadi
|
|
|
2138
2138
|
})
|
|
2139
2139
|
});
|
|
2140
2140
|
if (loading) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2141
|
-
className:
|
|
2141
|
+
className: require_text_truncate.cn("border-border rounded-lg border p-8 text-center", className),
|
|
2142
2142
|
role: "status",
|
|
2143
2143
|
"aria-live": "polite",
|
|
2144
2144
|
"aria-busy": "true",
|
|
@@ -2153,7 +2153,7 @@ function QueryResultsTable({ columns, rows, maxHeight = 400, emptyMessage, loadi
|
|
|
2153
2153
|
})]
|
|
2154
2154
|
});
|
|
2155
2155
|
if (rows.length === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2156
|
-
className:
|
|
2156
|
+
className: require_text_truncate.cn("border-border rounded-lg border p-8 text-center", className),
|
|
2157
2157
|
"data-opt-id": "PNC1V",
|
|
2158
2158
|
"data-opt-slug": "query-results-table.QueryResultsTable",
|
|
2159
2159
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
@@ -2162,7 +2162,7 @@ function QueryResultsTable({ columns, rows, maxHeight = 400, emptyMessage, loadi
|
|
|
2162
2162
|
})
|
|
2163
2163
|
});
|
|
2164
2164
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2165
|
-
className:
|
|
2165
|
+
className: require_text_truncate.cn("border-border overflow-hidden rounded-lg border", className),
|
|
2166
2166
|
"data-opt-id": "PNC1V",
|
|
2167
2167
|
"data-opt-slug": "query-results-table.QueryResultsTable",
|
|
2168
2168
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -2280,16 +2280,16 @@ function AlertBuilder({ value, onChange, metrics = [
|
|
|
2280
2280
|
], labels: customLabels, className }) {
|
|
2281
2281
|
const resolvedMetrics = eventOptions ? eventOptions.map((e) => e.id) : metrics;
|
|
2282
2282
|
const metricLabelMap = eventOptions ? Object.fromEntries(eventOptions.map((e) => [e.id, e.name])) : null;
|
|
2283
|
-
const labels =
|
|
2283
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$20), customLabels);
|
|
2284
2284
|
const alertNameId = react.useId();
|
|
2285
2285
|
const conditionsId = react.useId();
|
|
2286
2286
|
const checkFrequencyId = react.useId();
|
|
2287
2287
|
const notificationChannelsId = react.useId();
|
|
2288
2288
|
const update = (partial) => {
|
|
2289
|
-
onChange(
|
|
2289
|
+
onChange(require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, value), partial));
|
|
2290
2290
|
};
|
|
2291
2291
|
if (resolvedMetrics.length === 0 || channels.length === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2292
|
-
className:
|
|
2292
|
+
className: require_text_truncate.cn("text-text-secondary text-sm", className),
|
|
2293
2293
|
"data-opt-id": "VTENR",
|
|
2294
2294
|
"data-opt-slug": "alert-builder.AlertBuilder",
|
|
2295
2295
|
children: labels.emptyMessage
|
|
@@ -2302,7 +2302,7 @@ function AlertBuilder({ value, onChange, metrics = [
|
|
|
2302
2302
|
}] });
|
|
2303
2303
|
};
|
|
2304
2304
|
const updateCondition = (index, partial) => {
|
|
2305
|
-
const next = value.conditions.map((c, i) => i === index ?
|
|
2305
|
+
const next = value.conditions.map((c, i) => i === index ? require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, c), partial) : c);
|
|
2306
2306
|
update({ conditions: next });
|
|
2307
2307
|
};
|
|
2308
2308
|
const removeCondition = (index) => {
|
|
@@ -2313,7 +2313,7 @@ function AlertBuilder({ value, onChange, metrics = [
|
|
|
2313
2313
|
update({ channels: next });
|
|
2314
2314
|
};
|
|
2315
2315
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2316
|
-
className:
|
|
2316
|
+
className: require_text_truncate.cn("gap-group flex flex-col", className),
|
|
2317
2317
|
"data-opt-id": "VTENR",
|
|
2318
2318
|
"data-opt-slug": "alert-builder.AlertBuilder",
|
|
2319
2319
|
children: [
|
|
@@ -2321,7 +2321,7 @@ function AlertBuilder({ value, onChange, metrics = [
|
|
|
2321
2321
|
htmlFor: alertNameId,
|
|
2322
2322
|
className: "text-text-tertiary mb-1 block text-xs font-medium",
|
|
2323
2323
|
children: labels.alertNameLabel
|
|
2324
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2324
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Input, {
|
|
2325
2325
|
id: alertNameId,
|
|
2326
2326
|
value: value.name,
|
|
2327
2327
|
onChange: (e) => update({ name: e.target.value }),
|
|
@@ -2372,7 +2372,7 @@ function AlertBuilder({ value, onChange, metrics = [
|
|
|
2372
2372
|
children: op.label
|
|
2373
2373
|
}, op.value))
|
|
2374
2374
|
}),
|
|
2375
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2375
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Input, {
|
|
2376
2376
|
type: "number",
|
|
2377
2377
|
value: cond.threshold,
|
|
2378
2378
|
onChange: (e) => updateCondition(i, { threshold: Number(e.target.value) }),
|
|
@@ -2389,7 +2389,7 @@ function AlertBuilder({ value, onChange, metrics = [
|
|
|
2389
2389
|
]
|
|
2390
2390
|
}, i))
|
|
2391
2391
|
}),
|
|
2392
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2392
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Button, {
|
|
2393
2393
|
variant: "ghost",
|
|
2394
2394
|
size: "sm",
|
|
2395
2395
|
onClick: addCondition,
|
|
@@ -2409,7 +2409,7 @@ function AlertBuilder({ value, onChange, metrics = [
|
|
|
2409
2409
|
type: "button",
|
|
2410
2410
|
onClick: () => update({ frequency: f.value }),
|
|
2411
2411
|
"aria-pressed": value.frequency === f.value,
|
|
2412
|
-
className:
|
|
2412
|
+
className: require_text_truncate.cn("focus-visible:ring-accent rounded-md px-3 py-1.5 text-sm transition-colors focus-visible:ring-2 focus-visible:outline-none", value.frequency === f.value ? "bg-accent text-accent-fg" : "bg-bg-subtle text-text-secondary hover:bg-bg-muted"),
|
|
2413
2413
|
children: f.label
|
|
2414
2414
|
}, f.value))
|
|
2415
2415
|
})] }),
|
|
@@ -2425,7 +2425,7 @@ function AlertBuilder({ value, onChange, metrics = [
|
|
|
2425
2425
|
type: "button",
|
|
2426
2426
|
onClick: () => toggleChannel(ch.id),
|
|
2427
2427
|
"aria-pressed": value.channels.includes(ch.id),
|
|
2428
|
-
className:
|
|
2428
|
+
className: require_text_truncate.cn("focus-visible:ring-accent rounded-md px-3 py-1.5 text-sm transition-colors focus-visible:ring-2 focus-visible:outline-none", value.channels.includes(ch.id) ? "bg-accent text-accent-fg" : "bg-bg-subtle text-text-secondary hover:bg-bg-muted"),
|
|
2429
2429
|
children: ch.label
|
|
2430
2430
|
}, ch.id))
|
|
2431
2431
|
})] })
|
|
@@ -2443,7 +2443,7 @@ const defaultLabels$19 = {
|
|
|
2443
2443
|
};
|
|
2444
2444
|
/** Renders the sql editor component. */
|
|
2445
2445
|
function SqlEditor({ value, onChange, onRun, onRunAndAdvance, placeholder, readOnly = false, height = 200, schema, completionSources, keymap: customKeymap, extensions: customExtensions, ariaLabel, autoFocus = false, showFooter, labels: customLabels, className }) {
|
|
2446
|
-
const labels =
|
|
2446
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$19), customLabels);
|
|
2447
2447
|
const fill = height === "fill";
|
|
2448
2448
|
const footerVisible = showFooter !== null && showFooter !== void 0 ? showFooter : Boolean(onRun);
|
|
2449
2449
|
const editorRef = react.useRef(null);
|
|
@@ -2591,19 +2591,19 @@ function SqlEditor({ value, onChange, onRun, onRunAndAdvance, placeholder, readO
|
|
|
2591
2591
|
};
|
|
2592
2592
|
}, [readOnly]);
|
|
2593
2593
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2594
|
-
className:
|
|
2594
|
+
className: require_text_truncate.cn("gap-element flex flex-col", fill && "h-full min-h-0", className),
|
|
2595
2595
|
"data-opt-id": "RSGKV",
|
|
2596
2596
|
"data-opt-slug": "sql-editor.SqlEditor",
|
|
2597
2597
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2598
2598
|
ref: editorRef,
|
|
2599
|
-
className:
|
|
2599
|
+
className: require_text_truncate.cn("border-border overflow-hidden rounded-lg border", fill && "min-h-0 flex-1"),
|
|
2600
2600
|
style: fill ? void 0 : { height }
|
|
2601
2601
|
}), footerVisible && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2602
2602
|
className: "flex flex-none items-center justify-between",
|
|
2603
2603
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2604
2604
|
className: "text-text-tertiary text-xs",
|
|
2605
2605
|
children: labels.runHint
|
|
2606
|
-
}), onRun && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2606
|
+
}), onRun && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Button, {
|
|
2607
2607
|
variant: "primary",
|
|
2608
2608
|
size: "sm",
|
|
2609
2609
|
onClick: () => onRun(value),
|
|
@@ -2630,17 +2630,17 @@ const defaultLabels$18 = {
|
|
|
2630
2630
|
};
|
|
2631
2631
|
/** Renders the event meta editor component. */
|
|
2632
2632
|
function EventMetaEditor({ value, onChange, icons, className, labels: customLabels }) {
|
|
2633
|
-
const labels =
|
|
2633
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$18), customLabels);
|
|
2634
2634
|
const hasTags = value.tags.length > 0;
|
|
2635
2635
|
const nameId = react.useId();
|
|
2636
2636
|
const displayNameId = react.useId();
|
|
2637
2637
|
const descriptionId = react.useId();
|
|
2638
2638
|
const tagsId = react.useId();
|
|
2639
2639
|
const update = (partial) => {
|
|
2640
|
-
onChange(
|
|
2640
|
+
onChange(require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, value), partial));
|
|
2641
2641
|
};
|
|
2642
2642
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2643
|
-
className:
|
|
2643
|
+
className: require_text_truncate.cn("gap-group flex flex-col", className),
|
|
2644
2644
|
"data-opt-id": "EZR35",
|
|
2645
2645
|
"data-opt-slug": "event-meta-editor.EventMetaEditor",
|
|
2646
2646
|
children: [
|
|
@@ -2650,7 +2650,7 @@ function EventMetaEditor({ value, onChange, icons, className, labels: customLabe
|
|
|
2650
2650
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2651
2651
|
className: "text-text-tertiary mb-1 block text-xs font-medium",
|
|
2652
2652
|
children: labels.icon
|
|
2653
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2653
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.IconPicker, {
|
|
2654
2654
|
value: value.icon,
|
|
2655
2655
|
onChange: (icon) => update({ icon }),
|
|
2656
2656
|
icons,
|
|
@@ -2659,7 +2659,7 @@ function EventMetaEditor({ value, onChange, icons, className, labels: customLabe
|
|
|
2659
2659
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2660
2660
|
className: "text-text-tertiary mb-1 block text-xs font-medium",
|
|
2661
2661
|
children: labels.color
|
|
2662
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2662
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.ColorPicker, {
|
|
2663
2663
|
value: value.color,
|
|
2664
2664
|
onChange: (color) => update({ color }),
|
|
2665
2665
|
"aria-label": labels.color
|
|
@@ -2680,7 +2680,7 @@ function EventMetaEditor({ value, onChange, icons, className, labels: customLabe
|
|
|
2680
2680
|
htmlFor: nameId,
|
|
2681
2681
|
className: "text-text-tertiary mb-1 block text-xs font-medium",
|
|
2682
2682
|
children: labels.name
|
|
2683
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2683
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Input, {
|
|
2684
2684
|
id: nameId,
|
|
2685
2685
|
value: value.name,
|
|
2686
2686
|
onChange: (e) => update({ name: e.target.value }),
|
|
@@ -2690,7 +2690,7 @@ function EventMetaEditor({ value, onChange, icons, className, labels: customLabe
|
|
|
2690
2690
|
htmlFor: displayNameId,
|
|
2691
2691
|
className: "text-text-tertiary mb-1 block text-xs font-medium",
|
|
2692
2692
|
children: labels.displayName
|
|
2693
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2693
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Input, {
|
|
2694
2694
|
id: displayNameId,
|
|
2695
2695
|
value: value.displayName,
|
|
2696
2696
|
onChange: (e) => update({ displayName: e.target.value }),
|
|
@@ -2701,7 +2701,7 @@ function EventMetaEditor({ value, onChange, icons, className, labels: customLabe
|
|
|
2701
2701
|
htmlFor: descriptionId,
|
|
2702
2702
|
className: "text-text-tertiary mb-1 block text-xs font-medium",
|
|
2703
2703
|
children: labels.description
|
|
2704
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2704
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Input, {
|
|
2705
2705
|
id: descriptionId,
|
|
2706
2706
|
value: value.description,
|
|
2707
2707
|
onChange: (e) => update({ description: e.target.value }),
|
|
@@ -2712,7 +2712,7 @@ function EventMetaEditor({ value, onChange, icons, className, labels: customLabe
|
|
|
2712
2712
|
className: "text-text-tertiary mb-1 block text-xs font-medium",
|
|
2713
2713
|
children: labels.tags
|
|
2714
2714
|
}),
|
|
2715
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2715
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.TagInput, {
|
|
2716
2716
|
id: tagsId,
|
|
2717
2717
|
value: value.tags,
|
|
2718
2718
|
onChange: (tags) => update({ tags }),
|
|
@@ -2733,17 +2733,17 @@ EventMetaEditor.displayName = "EventMetaEditor";
|
|
|
2733
2733
|
const defaultLabels$17 = { emptyMessage: "No widgets to display" };
|
|
2734
2734
|
/** Renders the widget grid component. */
|
|
2735
2735
|
function WidgetGrid({ widgets, cols = 12, rowHeight = 80, gap = 16, editable = false, onReorder, labels: customLabels, className }) {
|
|
2736
|
-
const labels =
|
|
2736
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$17), customLabels);
|
|
2737
2737
|
const [dragIdx, setDragIdx] = react.useState(null);
|
|
2738
2738
|
const [overIdx, setOverIdx] = react.useState(null);
|
|
2739
2739
|
if (widgets.length === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2740
|
-
className:
|
|
2740
|
+
className: require_text_truncate.cn("text-text-secondary text-sm", className),
|
|
2741
2741
|
"data-opt-id": "QJY9W",
|
|
2742
2742
|
"data-opt-slug": "widget-grid.WidgetGrid",
|
|
2743
2743
|
children: labels.emptyMessage
|
|
2744
2744
|
});
|
|
2745
2745
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2746
|
-
className:
|
|
2746
|
+
className: require_text_truncate.cn("grid", className),
|
|
2747
2747
|
style: {
|
|
2748
2748
|
gridTemplateColumns: `repeat(${cols}, 1fr)`,
|
|
2749
2749
|
gap
|
|
@@ -2766,7 +2766,7 @@ function WidgetGrid({ widgets, cols = 12, rowHeight = 80, gap = 16, editable = f
|
|
|
2766
2766
|
setDragIdx(null);
|
|
2767
2767
|
setOverIdx(null);
|
|
2768
2768
|
} : void 0,
|
|
2769
|
-
className:
|
|
2769
|
+
className: require_text_truncate.cn("overflow-hidden rounded-lg", editable && "cursor-grab", editable && dragIdx === i && "opacity-50", editable && overIdx === i && dragIdx !== i && "ring-accent ring-2"),
|
|
2770
2770
|
style: {
|
|
2771
2771
|
gridColumn: `span ${Math.min(w.w, cols)}`,
|
|
2772
2772
|
minHeight: w.h * rowHeight
|
|
@@ -2854,7 +2854,7 @@ const STEPS = [
|
|
|
2854
2854
|
];
|
|
2855
2855
|
/** Renders the report builder component. */
|
|
2856
2856
|
function ReportBuilder({ chartTypes = DEFAULT_CHART_TYPES, dataSources = [], onSave, onCancel, configForm, styleForm, preview, onChartTypeChange, onDataSourceChange, onStepChange, selectedChartType: controlledChartType, selectedDataSource: controlledDataSource, labels: customLabels, className }) {
|
|
2857
|
-
const labels =
|
|
2857
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$16), customLabels);
|
|
2858
2858
|
const [stepIndex, setStepIndex] = react.useState(0);
|
|
2859
2859
|
const [internalChartType, setInternalChartType] = react.useState(null);
|
|
2860
2860
|
const [internalDataSource, setInternalDataSource] = react.useState("");
|
|
@@ -2910,7 +2910,7 @@ function ReportBuilder({ chartTypes = DEFAULT_CHART_TYPES, dataSources = [], onS
|
|
|
2910
2910
|
});
|
|
2911
2911
|
};
|
|
2912
2912
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2913
|
-
className:
|
|
2913
|
+
className: require_text_truncate.cn("gap-group flex flex-col", className),
|
|
2914
2914
|
"data-opt-id": "K9STD",
|
|
2915
2915
|
"data-opt-slug": "report-builder.ReportBuilder",
|
|
2916
2916
|
children: [
|
|
@@ -2923,16 +2923,16 @@ function ReportBuilder({ chartTypes = DEFAULT_CHART_TYPES, dataSources = [], onS
|
|
|
2923
2923
|
children: [
|
|
2924
2924
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2925
2925
|
"aria-hidden": "true",
|
|
2926
|
-
className:
|
|
2926
|
+
className: require_text_truncate.cn("flex h-8 w-8 shrink-0 items-center justify-center rounded-full text-xs font-medium", i <= stepIndex ? "bg-accent text-accent-fg" : "bg-bg-subtle text-text-secondary"),
|
|
2927
2927
|
children: i + 1
|
|
2928
2928
|
}),
|
|
2929
2929
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2930
|
-
className:
|
|
2930
|
+
className: require_text_truncate.cn("hidden text-sm sm:inline", i <= stepIndex ? "text-text-primary font-medium" : "text-text-secondary"),
|
|
2931
2931
|
children: stepLabels[step]
|
|
2932
2932
|
}),
|
|
2933
2933
|
i < STEPS.length - 1 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2934
2934
|
"aria-hidden": "true",
|
|
2935
|
-
className:
|
|
2935
|
+
className: require_text_truncate.cn("h-px flex-1", i < stepIndex ? "bg-accent" : "bg-border-subtle")
|
|
2936
2936
|
})
|
|
2937
2937
|
]
|
|
2938
2938
|
}, step))
|
|
@@ -2945,7 +2945,7 @@ function ReportBuilder({ chartTypes = DEFAULT_CHART_TYPES, dataSources = [], onS
|
|
|
2945
2945
|
htmlFor: reportNameId,
|
|
2946
2946
|
className: "text-text-tertiary text-xs font-medium",
|
|
2947
2947
|
children: labels.reportNameLabel
|
|
2948
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2948
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Input, {
|
|
2949
2949
|
id: reportNameId,
|
|
2950
2950
|
value: reportName,
|
|
2951
2951
|
onChange: (e) => setReportName(e.target.value),
|
|
@@ -2957,7 +2957,7 @@ function ReportBuilder({ chartTypes = DEFAULT_CHART_TYPES, dataSources = [], onS
|
|
|
2957
2957
|
htmlFor: reportDescriptionId,
|
|
2958
2958
|
className: "text-text-tertiary text-xs font-medium",
|
|
2959
2959
|
children: labels.reportDescriptionLabel
|
|
2960
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2960
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Input, {
|
|
2961
2961
|
id: reportDescriptionId,
|
|
2962
2962
|
value: reportDescription,
|
|
2963
2963
|
onChange: (e) => setReportDescription(e.target.value),
|
|
@@ -2980,14 +2980,14 @@ function ReportBuilder({ chartTypes = DEFAULT_CHART_TYPES, dataSources = [], onS
|
|
|
2980
2980
|
children: chartTypes.map((ct) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
2981
2981
|
type: "button",
|
|
2982
2982
|
onClick: () => handleChartTypeSelect(ct.type),
|
|
2983
|
-
className:
|
|
2983
|
+
className: require_text_truncate.cn("flex cursor-pointer flex-col items-center justify-center gap-1 rounded-lg border p-3 text-center transition-colors", "focus-visible:ring-ring focus-visible:ring-2 focus-visible:outline-none", chartType === ct.type ? "border-accent bg-accent-subtle" : "border-border hover:bg-bg-subtle"),
|
|
2984
2984
|
"aria-pressed": chartType === ct.type,
|
|
2985
2985
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2986
2986
|
className: "text-xl leading-none",
|
|
2987
2987
|
"aria-hidden": "true",
|
|
2988
2988
|
children: ct.icon
|
|
2989
2989
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2990
|
-
className:
|
|
2990
|
+
className: require_text_truncate.cn("text-xs leading-tight", chartType === ct.type ? "text-accent font-medium" : "text-text-tertiary"),
|
|
2991
2991
|
children: ct.label
|
|
2992
2992
|
})]
|
|
2993
2993
|
}, ct.type))
|
|
@@ -3002,7 +3002,7 @@ function ReportBuilder({ chartTypes = DEFAULT_CHART_TYPES, dataSources = [], onS
|
|
|
3002
3002
|
id: dataSourceSelectId,
|
|
3003
3003
|
value: dataSourceId,
|
|
3004
3004
|
onChange: (e) => handleDataSourceChange(e.target.value),
|
|
3005
|
-
className:
|
|
3005
|
+
className: require_text_truncate.cn("border-border text-text-primary bg-surface w-full rounded-lg border px-3 py-2 text-sm", "outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-ring-offset"),
|
|
3006
3006
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
3007
3007
|
value: "",
|
|
3008
3008
|
children: labels.dataSourcePlaceholder
|
|
@@ -3041,26 +3041,26 @@ function ReportBuilder({ chartTypes = DEFAULT_CHART_TYPES, dataSources = [], onS
|
|
|
3041
3041
|
className: "flex items-center justify-between",
|
|
3042
3042
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3043
3043
|
className: "gap-element flex",
|
|
3044
|
-
children: stepIndex > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3044
|
+
children: stepIndex > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Button, {
|
|
3045
3045
|
variant: "secondary",
|
|
3046
3046
|
onClick: goBack,
|
|
3047
3047
|
children: labels.backButton
|
|
3048
|
-
}) : onCancel ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3048
|
+
}) : onCancel ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Button, {
|
|
3049
3049
|
variant: "secondary",
|
|
3050
3050
|
onClick: onCancel,
|
|
3051
3051
|
children: labels.cancelButton
|
|
3052
3052
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {})
|
|
3053
3053
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3054
3054
|
className: "gap-element flex",
|
|
3055
|
-
children: [onCancel && stepIndex > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3055
|
+
children: [onCancel && stepIndex > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Button, {
|
|
3056
3056
|
variant: "ghost",
|
|
3057
3057
|
onClick: onCancel,
|
|
3058
3058
|
children: labels.cancelButton
|
|
3059
|
-
}), currentStep === "preview" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3059
|
+
}), currentStep === "preview" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Button, {
|
|
3060
3060
|
variant: "primary",
|
|
3061
3061
|
onClick: handleSave,
|
|
3062
3062
|
children: labels.saveButton
|
|
3063
|
-
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3063
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Button, {
|
|
3064
3064
|
variant: "primary",
|
|
3065
3065
|
onClick: goNext,
|
|
3066
3066
|
disabled: !canGoNext(),
|
|
@@ -3099,7 +3099,7 @@ const actionDotColor = {
|
|
|
3099
3099
|
};
|
|
3100
3100
|
function DiffTable({ changes, labels }) {
|
|
3101
3101
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3102
|
-
className:
|
|
3102
|
+
className: require_text_truncate.cn("mt-2 overflow-hidden rounded-md", require_text_truncate.OPT_BORDER),
|
|
3103
3103
|
role: "table",
|
|
3104
3104
|
"aria-label": "Field changes",
|
|
3105
3105
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -3107,18 +3107,18 @@ function DiffTable({ changes, labels }) {
|
|
|
3107
3107
|
role: "row",
|
|
3108
3108
|
children: [
|
|
3109
3109
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3110
|
-
className:
|
|
3110
|
+
className: require_text_truncate.cn("text-xs font-semibold tracking-wider uppercase", require_text_truncate.OPT_TEXT_TERTIARY),
|
|
3111
3111
|
role: "columnheader",
|
|
3112
3112
|
children: labels.fieldHeader
|
|
3113
3113
|
}),
|
|
3114
3114
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3115
|
-
className:
|
|
3115
|
+
className: require_text_truncate.cn("text-xs font-semibold tracking-wider uppercase", require_text_truncate.OPT_TEXT_TERTIARY),
|
|
3116
3116
|
role: "columnheader",
|
|
3117
3117
|
children: labels.beforeHeader
|
|
3118
3118
|
}),
|
|
3119
3119
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { "aria-hidden": "true" }),
|
|
3120
3120
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3121
|
-
className:
|
|
3121
|
+
className: require_text_truncate.cn("text-xs font-semibold tracking-wider uppercase", require_text_truncate.OPT_TEXT_TERTIARY),
|
|
3122
3122
|
role: "columnheader",
|
|
3123
3123
|
children: labels.afterHeader
|
|
3124
3124
|
})
|
|
@@ -3128,7 +3128,7 @@ function DiffTable({ changes, labels }) {
|
|
|
3128
3128
|
role: "row",
|
|
3129
3129
|
children: [
|
|
3130
3130
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3131
|
-
className:
|
|
3131
|
+
className: require_text_truncate.cn("text-xs font-medium", require_text_truncate.OPT_TEXT_PRIMARY),
|
|
3132
3132
|
role: "cell",
|
|
3133
3133
|
children: change.field
|
|
3134
3134
|
}),
|
|
@@ -3138,7 +3138,7 @@ function DiffTable({ changes, labels }) {
|
|
|
3138
3138
|
children: change.before || "—"
|
|
3139
3139
|
}),
|
|
3140
3140
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3141
|
-
className:
|
|
3141
|
+
className: require_text_truncate.cn("text-xs", require_text_truncate.OPT_TEXT_TERTIARY),
|
|
3142
3142
|
"aria-hidden": "true",
|
|
3143
3143
|
children: labels.diffArrow
|
|
3144
3144
|
}),
|
|
@@ -3153,7 +3153,7 @@ function DiffTable({ changes, labels }) {
|
|
|
3153
3153
|
}
|
|
3154
3154
|
/** Renders the audit timeline component. */
|
|
3155
3155
|
function AuditTimeline({ entries, labels: customLabels, className, onEntryClick }) {
|
|
3156
|
-
const labels =
|
|
3156
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$15), customLabels);
|
|
3157
3157
|
const [expandedIds, setExpandedIds] = react.useState(/* @__PURE__ */ new Set());
|
|
3158
3158
|
const toggleExpanded = react.useCallback((id) => {
|
|
3159
3159
|
setExpandedIds((prev) => {
|
|
@@ -3172,14 +3172,14 @@ function AuditTimeline({ entries, labels: customLabels, className, onEntryClick
|
|
|
3172
3172
|
event.preventDefault();
|
|
3173
3173
|
onEntryClick(entry);
|
|
3174
3174
|
}, [onEntryClick]);
|
|
3175
|
-
if (entries.length === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3175
|
+
if (entries.length === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.EmptyState, {
|
|
3176
3176
|
title: labels.empty,
|
|
3177
3177
|
className,
|
|
3178
3178
|
"data-opt-id": "XJQ8A",
|
|
3179
3179
|
"data-opt-slug": "audit-timeline.AuditTimeline"
|
|
3180
3180
|
});
|
|
3181
3181
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3182
|
-
className:
|
|
3182
|
+
className: require_text_truncate.cn("gap-group flex flex-col", className),
|
|
3183
3183
|
"data-opt-id": "XJQ8A",
|
|
3184
3184
|
"data-opt-slug": "audit-timeline.AuditTimeline",
|
|
3185
3185
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -3198,50 +3198,50 @@ function AuditTimeline({ entries, labels: customLabels, className, onEntryClick
|
|
|
3198
3198
|
className: "relative pb-4 pl-8 last:pb-0",
|
|
3199
3199
|
role: "listitem",
|
|
3200
3200
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3201
|
-
className:
|
|
3201
|
+
className: require_text_truncate.cn("border-surface absolute top-1.5 left-1 h-[14px] w-[14px] rounded-full border-2", actionDotColor[entry.action]),
|
|
3202
3202
|
"aria-hidden": "true"
|
|
3203
3203
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3204
|
-
className:
|
|
3204
|
+
className: require_text_truncate.cn("rounded-lg p-3", require_text_truncate.OPT_BORDER, "bg-surface transition-colors", onEntryClick && "hover:bg-bg-subtle cursor-pointer"),
|
|
3205
3205
|
"aria-labelledby": entryId,
|
|
3206
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div",
|
|
3206
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, onEntryClick ? {
|
|
3207
3207
|
role: "button",
|
|
3208
3208
|
tabIndex: 0,
|
|
3209
3209
|
onClick: () => onEntryClick(entry),
|
|
3210
3210
|
onKeyDown: (event) => handleEntryKeyDown(event, entry)
|
|
3211
3211
|
} : {}), {}, {
|
|
3212
|
-
className:
|
|
3212
|
+
className: require_text_truncate.cn(onEntryClick && "rounded-md", onEntryClick && "outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-ring-offset"),
|
|
3213
3213
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3214
3214
|
className: "gap-element flex items-center",
|
|
3215
3215
|
children: [
|
|
3216
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3216
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Badge, {
|
|
3217
3217
|
variant: actionBadgeVariant[entry.action],
|
|
3218
3218
|
size: "sm",
|
|
3219
3219
|
dot: true,
|
|
3220
3220
|
children: actionLabel(entry.action)
|
|
3221
3221
|
}),
|
|
3222
3222
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3223
|
-
className:
|
|
3223
|
+
className: require_text_truncate.cn("text-xs", require_text_truncate.OPT_TEXT_TERTIARY),
|
|
3224
3224
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("time", {
|
|
3225
3225
|
dateTime: entry.timestamp,
|
|
3226
3226
|
children: entry.timestamp
|
|
3227
3227
|
})
|
|
3228
3228
|
}),
|
|
3229
3229
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3230
|
-
className:
|
|
3230
|
+
className: require_text_truncate.cn("ml-auto text-xs font-medium", require_text_truncate.OPT_TEXT_SECONDARY),
|
|
3231
3231
|
children: entry.actor
|
|
3232
3232
|
})
|
|
3233
3233
|
]
|
|
3234
3234
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
3235
3235
|
id: entryId,
|
|
3236
|
-
className:
|
|
3236
|
+
className: require_text_truncate.cn("mt-1.5 text-sm", require_text_truncate.OPT_TEXT_PRIMARY),
|
|
3237
3237
|
children: entry.summary
|
|
3238
3238
|
})]
|
|
3239
3239
|
})), hasChanges && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3240
3240
|
className: "mt-2",
|
|
3241
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
3241
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.Button, {
|
|
3242
3242
|
variant: "ghost",
|
|
3243
3243
|
size: "sm",
|
|
3244
|
-
className:
|
|
3244
|
+
className: require_text_truncate.cn("outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-ring-offset"),
|
|
3245
3245
|
onClick: (e) => {
|
|
3246
3246
|
e.stopPropagation();
|
|
3247
3247
|
toggleExpanded(entry.id);
|
|
@@ -3249,7 +3249,7 @@ function AuditTimeline({ entries, labels: customLabels, className, onEntryClick
|
|
|
3249
3249
|
"aria-expanded": isExpanded,
|
|
3250
3250
|
"aria-controls": contentId,
|
|
3251
3251
|
children: [isExpanded ? labels.collapse : labels.expand, /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
|
|
3252
|
-
className:
|
|
3252
|
+
className: require_text_truncate.cn("ml-1 h-3.5 w-3.5 transition-transform", isExpanded && "rotate-180"),
|
|
3253
3253
|
viewBox: "0 0 16 16",
|
|
3254
3254
|
fill: "none",
|
|
3255
3255
|
stroke: "currentColor",
|
|
@@ -3397,7 +3397,7 @@ function SegmentBuilder({ groups, onChange, eventOptions = [
|
|
|
3397
3397
|
"New Users",
|
|
3398
3398
|
"Power Users"
|
|
3399
3399
|
], className, labels: customLabels }) {
|
|
3400
|
-
const labels =
|
|
3400
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$14), customLabels);
|
|
3401
3401
|
const builderId = react.useId().replace(/:/g, "");
|
|
3402
3402
|
const nextIdRef = react.useRef(1);
|
|
3403
3403
|
const createId = react.useCallback(() => {
|
|
@@ -3425,10 +3425,10 @@ function SegmentBuilder({ groups, onChange, eventOptions = [
|
|
|
3425
3425
|
onChange(groups.filter((g) => g.id !== groupId));
|
|
3426
3426
|
};
|
|
3427
3427
|
const updateGroup = (groupId, partial) => {
|
|
3428
|
-
onChange(groups.map((g) => g.id === groupId ?
|
|
3428
|
+
onChange(groups.map((g) => g.id === groupId ? require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, g), partial) : g));
|
|
3429
3429
|
};
|
|
3430
3430
|
const addCondition = (groupId) => {
|
|
3431
|
-
onChange(groups.map((g) => g.id === groupId ?
|
|
3431
|
+
onChange(groups.map((g) => g.id === groupId ? require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, g), {}, { conditions: [...g.conditions, {
|
|
3432
3432
|
id: createId(),
|
|
3433
3433
|
type: "event",
|
|
3434
3434
|
field: eventOptions[0],
|
|
@@ -3437,10 +3437,10 @@ function SegmentBuilder({ groups, onChange, eventOptions = [
|
|
|
3437
3437
|
}] }) : g));
|
|
3438
3438
|
};
|
|
3439
3439
|
const updateCondition = (groupId, condId, partial) => {
|
|
3440
|
-
onChange(groups.map((g) => g.id === groupId ?
|
|
3440
|
+
onChange(groups.map((g) => g.id === groupId ? require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, g), {}, { conditions: g.conditions.map((c) => c.id === condId ? require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, c), partial) : c) }) : g));
|
|
3441
3441
|
};
|
|
3442
3442
|
const removeCondition = (groupId, condId) => {
|
|
3443
|
-
onChange(groups.map((g) => g.id === groupId ?
|
|
3443
|
+
onChange(groups.map((g) => g.id === groupId ? require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, g), {}, { conditions: g.conditions.filter((c) => c.id !== condId) }) : g));
|
|
3444
3444
|
};
|
|
3445
3445
|
const getFieldOptions = (type) => {
|
|
3446
3446
|
switch (type) {
|
|
@@ -3451,7 +3451,7 @@ function SegmentBuilder({ groups, onChange, eventOptions = [
|
|
|
3451
3451
|
}
|
|
3452
3452
|
};
|
|
3453
3453
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3454
|
-
className:
|
|
3454
|
+
className: require_text_truncate.cn("gap-group flex flex-col", className),
|
|
3455
3455
|
"data-opt-id": "ZSC94",
|
|
3456
3456
|
"data-opt-slug": "segment-builder.SegmentBuilder",
|
|
3457
3457
|
children: [groups.map((group, gi) => {
|
|
@@ -3557,7 +3557,7 @@ function SegmentBuilder({ groups, onChange, eventOptions = [
|
|
|
3557
3557
|
value: f,
|
|
3558
3558
|
children: f
|
|
3559
3559
|
}, f))
|
|
3560
|
-
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3560
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Input, {
|
|
3561
3561
|
value: cond.field,
|
|
3562
3562
|
onChange: (e) => updateCondition(group.id, cond.id, { field: e.target.value }),
|
|
3563
3563
|
placeholder: "Expression",
|
|
@@ -3574,7 +3574,7 @@ function SegmentBuilder({ groups, onChange, eventOptions = [
|
|
|
3574
3574
|
children: op.label
|
|
3575
3575
|
}, op.value))
|
|
3576
3576
|
}),
|
|
3577
|
-
needsValue && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3577
|
+
needsValue && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Input, {
|
|
3578
3578
|
value: cond.value,
|
|
3579
3579
|
onChange: (e) => updateCondition(group.id, cond.id, { value: e.target.value }),
|
|
3580
3580
|
placeholder: "Value",
|
|
@@ -3591,7 +3591,7 @@ function SegmentBuilder({ groups, onChange, eventOptions = [
|
|
|
3591
3591
|
]
|
|
3592
3592
|
}, cond.id);
|
|
3593
3593
|
}),
|
|
3594
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3594
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Button, {
|
|
3595
3595
|
variant: "ghost",
|
|
3596
3596
|
size: "sm",
|
|
3597
3597
|
onClick: () => addCondition(group.id),
|
|
@@ -3599,7 +3599,7 @@ function SegmentBuilder({ groups, onChange, eventOptions = [
|
|
|
3599
3599
|
})
|
|
3600
3600
|
]
|
|
3601
3601
|
})] }, group.id);
|
|
3602
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3602
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Button, {
|
|
3603
3603
|
variant: "ghost",
|
|
3604
3604
|
size: "sm",
|
|
3605
3605
|
onClick: addGroup,
|
|
@@ -3641,14 +3641,14 @@ const severityConfig = {
|
|
|
3641
3641
|
/** Renders the insights panel component. */
|
|
3642
3642
|
function InsightsPanel({ insights, stats, detectionTypes, onDetectionTypeToggle, detectionConfig, onDetectionConfigChange, onDismiss, onInsightClick, onStatClick, header, actions, labels: customLabels, className }) {
|
|
3643
3643
|
var _detectionConfig$days, _detectionConfig$zSco;
|
|
3644
|
-
const labels =
|
|
3644
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$13), customLabels);
|
|
3645
3645
|
const [showDismissed, setShowDismissed] = react.useState(false);
|
|
3646
3646
|
const visibleInsights = showDismissed ? insights : insights.filter((i) => !i.dismissed);
|
|
3647
3647
|
const hasStats = stats && stats.length > 0;
|
|
3648
3648
|
const hasDetection = detectionTypes && detectionTypes.length > 0 || detectionConfig != null;
|
|
3649
3649
|
const isEmpty = visibleInsights.length === 0;
|
|
3650
3650
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3651
|
-
className:
|
|
3651
|
+
className: require_text_truncate.cn("gap-group flex flex-col", className),
|
|
3652
3652
|
"data-opt-id": "HCYZV",
|
|
3653
3653
|
"data-opt-slug": "insights-panel.InsightsPanel",
|
|
3654
3654
|
children: [
|
|
@@ -3663,7 +3663,7 @@ function InsightsPanel({ insights, stats, detectionTypes, onDetectionTypeToggle,
|
|
|
3663
3663
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h2", {
|
|
3664
3664
|
className: "text-text-primary text-lg font-semibold",
|
|
3665
3665
|
children: labels.title
|
|
3666
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3666
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Button, {
|
|
3667
3667
|
variant: "ghost",
|
|
3668
3668
|
size: "sm",
|
|
3669
3669
|
onClick: () => setShowDismissed((v) => !v),
|
|
@@ -3671,10 +3671,10 @@ function InsightsPanel({ insights, stats, detectionTypes, onDetectionTypeToggle,
|
|
|
3671
3671
|
})]
|
|
3672
3672
|
}),
|
|
3673
3673
|
hasDetection && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3674
|
-
className:
|
|
3674
|
+
className: require_text_truncate.cn("rounded-lg border p-3", "rounded-lg bg-surface shadow-sm", "border border-border"),
|
|
3675
3675
|
children: [
|
|
3676
3676
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
|
|
3677
|
-
className:
|
|
3677
|
+
className: require_text_truncate.cn("mb-2 text-xs font-medium", "text-text-secondary"),
|
|
3678
3678
|
children: labels.detectionTitle
|
|
3679
3679
|
}),
|
|
3680
3680
|
detectionTypes && detectionTypes.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -3682,7 +3682,7 @@ function InsightsPanel({ insights, stats, detectionTypes, onDetectionTypeToggle,
|
|
|
3682
3682
|
children: detectionTypes.map((dt) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3683
3683
|
type: "button",
|
|
3684
3684
|
onClick: () => onDetectionTypeToggle === null || onDetectionTypeToggle === void 0 ? void 0 : onDetectionTypeToggle(dt.id, !dt.enabled),
|
|
3685
|
-
className:
|
|
3685
|
+
className: require_text_truncate.cn("focus-visible:ring-accent rounded-md px-2.5 py-1 text-xs font-medium transition-colors focus-visible:ring-2 focus-visible:outline-none", dt.enabled ? "bg-accent text-accent-fg" : "bg-bg-subtle text-text-secondary"),
|
|
3686
3686
|
children: dt.label
|
|
3687
3687
|
}, dt.id))
|
|
3688
3688
|
}),
|
|
@@ -3698,8 +3698,8 @@ function InsightsPanel({ insights, stats, detectionTypes, onDetectionTypeToggle,
|
|
|
3698
3698
|
min: 1,
|
|
3699
3699
|
max: 365,
|
|
3700
3700
|
value: (_detectionConfig$days = detectionConfig.days) !== null && _detectionConfig$days !== void 0 ? _detectionConfig$days : 30,
|
|
3701
|
-
onChange: (e) => onDetectionConfigChange(
|
|
3702
|
-
className:
|
|
3701
|
+
onChange: (e) => onDetectionConfigChange(require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, detectionConfig), {}, { days: Number(e.target.value) || 30 })),
|
|
3702
|
+
className: require_text_truncate.cn("w-16 rounded-md border px-2 py-1 text-xs", "border border-border", "text-text-primary", "bg-transparent")
|
|
3703
3703
|
})]
|
|
3704
3704
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
3705
3705
|
className: "flex items-center gap-1.5 text-xs",
|
|
@@ -3712,8 +3712,8 @@ function InsightsPanel({ insights, stats, detectionTypes, onDetectionTypeToggle,
|
|
|
3712
3712
|
max: 10,
|
|
3713
3713
|
step: .1,
|
|
3714
3714
|
value: (_detectionConfig$zSco = detectionConfig.zScoreThreshold) !== null && _detectionConfig$zSco !== void 0 ? _detectionConfig$zSco : 2,
|
|
3715
|
-
onChange: (e) => onDetectionConfigChange(
|
|
3716
|
-
className:
|
|
3715
|
+
onChange: (e) => onDetectionConfigChange(require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, detectionConfig), {}, { zScoreThreshold: Number(e.target.value) || 2 })),
|
|
3716
|
+
className: require_text_truncate.cn("w-16 rounded-md border px-2 py-1 text-xs", "border border-border", "text-text-primary", "bg-transparent")
|
|
3717
3717
|
})]
|
|
3718
3718
|
})]
|
|
3719
3719
|
})
|
|
@@ -3724,12 +3724,12 @@ function InsightsPanel({ insights, stats, detectionTypes, onDetectionTypeToggle,
|
|
|
3724
3724
|
children: stats.map((s) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
3725
3725
|
type: "button",
|
|
3726
3726
|
onClick: () => onStatClick === null || onStatClick === void 0 ? void 0 : onStatClick(s.id),
|
|
3727
|
-
className:
|
|
3727
|
+
className: require_text_truncate.cn("rounded-lg bg-surface shadow-sm", "border border-border", "hover:bg-bg-subtle flex flex-col items-center gap-1 rounded-lg p-3 text-center transition-colors", onStatClick && "cursor-pointer"),
|
|
3728
3728
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3729
|
-
className:
|
|
3729
|
+
className: require_text_truncate.cn("text-2xl font-bold", "text-text-primary"),
|
|
3730
3730
|
children: s.count
|
|
3731
3731
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3732
|
-
className:
|
|
3732
|
+
className: require_text_truncate.cn("text-xs", "text-text-secondary"),
|
|
3733
3733
|
children: s.label
|
|
3734
3734
|
})]
|
|
3735
3735
|
}, s.id))
|
|
@@ -3748,7 +3748,7 @@ function InsightsPanel({ insights, stats, detectionTypes, onDetectionTypeToggle,
|
|
|
3748
3748
|
className: "gap-element flex flex-col",
|
|
3749
3749
|
children: visibleInsights.map((insight) => {
|
|
3750
3750
|
const config = severityConfig[insight.severity];
|
|
3751
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(onInsightClick ? "button" : "div",
|
|
3751
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(onInsightClick ? "button" : "div", require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({ className: require_text_truncate.cn("w-full rounded-lg border p-4 text-left", config.bg, insight.dismissed && "opacity-50", onInsightClick && "cursor-pointer") }, onInsightClick ? {
|
|
3752
3752
|
type: "button",
|
|
3753
3753
|
onClick: () => onInsightClick(insight)
|
|
3754
3754
|
} : {}), {}, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -3756,7 +3756,7 @@ function InsightsPanel({ insights, stats, detectionTypes, onDetectionTypeToggle,
|
|
|
3756
3756
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3757
3757
|
className: "gap-group flex items-start",
|
|
3758
3758
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3759
|
-
className:
|
|
3759
|
+
className: require_text_truncate.cn("mt-0.5 inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-xs font-bold", config.color, "bg-surface/60"),
|
|
3760
3760
|
"aria-hidden": "true",
|
|
3761
3761
|
children: config.icon
|
|
3762
3762
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -3766,10 +3766,10 @@ function InsightsPanel({ insights, stats, detectionTypes, onDetectionTypeToggle,
|
|
|
3766
3766
|
className: "gap-element flex items-center",
|
|
3767
3767
|
children: [
|
|
3768
3768
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3769
|
-
className:
|
|
3769
|
+
className: require_text_truncate.cn("text-sm font-medium", require_text_truncate.OPT_TEXT_PRIMARY),
|
|
3770
3770
|
children: insight.title
|
|
3771
3771
|
}),
|
|
3772
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3772
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Badge, {
|
|
3773
3773
|
variant: insight.severity === "critical" ? "error" : insight.severity,
|
|
3774
3774
|
size: "sm",
|
|
3775
3775
|
children: insight.severity
|
|
@@ -3781,7 +3781,7 @@ function InsightsPanel({ insights, stats, detectionTypes, onDetectionTypeToggle,
|
|
|
3781
3781
|
]
|
|
3782
3782
|
}),
|
|
3783
3783
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
3784
|
-
className:
|
|
3784
|
+
className: require_text_truncate.cn("mt-0.5 text-sm", require_text_truncate.OPT_TEXT_SECONDARY),
|
|
3785
3785
|
children: insight.description
|
|
3786
3786
|
}),
|
|
3787
3787
|
insight.metrics && Object.keys(insight.metrics).length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -3800,7 +3800,7 @@ function InsightsPanel({ insights, stats, detectionTypes, onDetectionTypeToggle,
|
|
|
3800
3800
|
})
|
|
3801
3801
|
]
|
|
3802
3802
|
})]
|
|
3803
|
-
}), onDismiss && !insight.dismissed && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3803
|
+
}), onDismiss && !insight.dismissed && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Button, {
|
|
3804
3804
|
variant: "ghost",
|
|
3805
3805
|
size: "sm",
|
|
3806
3806
|
onClick: (e) => {
|
|
@@ -3869,7 +3869,7 @@ function TimeRangeSelector({ value, onChange, presets = DEFAULT_PRESETS$1, label
|
|
|
3869
3869
|
})), [presets]);
|
|
3870
3870
|
if (presets.length === 0) {
|
|
3871
3871
|
var _labels$placeholder;
|
|
3872
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3872
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.DateRangePicker, {
|
|
3873
3873
|
value: range,
|
|
3874
3874
|
onChange: setRange,
|
|
3875
3875
|
placeholder: (_labels$placeholder = labels === null || labels === void 0 ? void 0 : labels.placeholder) !== null && _labels$placeholder !== void 0 ? _labels$placeholder : "Select time range",
|
|
@@ -3880,18 +3880,18 @@ function TimeRangeSelector({ value, onChange, presets = DEFAULT_PRESETS$1, label
|
|
|
3880
3880
|
});
|
|
3881
3881
|
}
|
|
3882
3882
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3883
|
-
className:
|
|
3883
|
+
className: require_text_truncate.cn("border-border bg-surface inline-flex items-center rounded-lg border", className),
|
|
3884
3884
|
"data-opt-id": "K0D7C",
|
|
3885
3885
|
"data-opt-slug": "time-range-selector.TimeRangeSelector",
|
|
3886
3886
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3887
3887
|
className: "hidden items-center sm:flex",
|
|
3888
|
-
children: presets.map((p) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3888
|
+
children: presets.map((p) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Button, {
|
|
3889
3889
|
variant: "ghost",
|
|
3890
3890
|
size: "md",
|
|
3891
3891
|
onClick: () => handlePreset(p.days),
|
|
3892
3892
|
children: p.label
|
|
3893
3893
|
}, p.label))
|
|
3894
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3894
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.DateRangePicker, {
|
|
3895
3895
|
value: range,
|
|
3896
3896
|
onChange: setRange,
|
|
3897
3897
|
presets: datePickerPresets,
|
|
@@ -3931,7 +3931,7 @@ function download(content, fileName, mime) {
|
|
|
3931
3931
|
function ExportButton({ data, columns, fileName = "export", formats = ["csv", "json"], onExport, labels: customLabels, guided = false, className }) {
|
|
3932
3932
|
const [guidedOpen, setGuidedOpen] = react.useState(false);
|
|
3933
3933
|
const [guidedFormat, setGuidedFormat] = react.useState(formats[0]);
|
|
3934
|
-
const labels =
|
|
3934
|
+
const labels = require_text_truncate._objectSpread2({
|
|
3935
3935
|
export: "Export",
|
|
3936
3936
|
csv: "CSV",
|
|
3937
3937
|
json: "JSON",
|
|
@@ -3964,27 +3964,27 @@ function ExportButton({ data, columns, fileName = "export", formats = ["csv", "j
|
|
|
3964
3964
|
className: "inline-flex",
|
|
3965
3965
|
"data-opt-id": "MGP2B",
|
|
3966
3966
|
"data-opt-slug": "export-button.ExportButton",
|
|
3967
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
3967
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.Button, {
|
|
3968
3968
|
variant: "secondary",
|
|
3969
3969
|
size: "sm",
|
|
3970
|
-
className:
|
|
3970
|
+
className: require_text_truncate.cn(className),
|
|
3971
3971
|
onClick: () => setGuidedOpen(true),
|
|
3972
3972
|
"aria-label": labels.export,
|
|
3973
3973
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3974
3974
|
"aria-hidden": "true",
|
|
3975
3975
|
children: "⬇"
|
|
3976
3976
|
}), labels.export]
|
|
3977
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3977
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.DialogRoot, {
|
|
3978
3978
|
open: guidedOpen,
|
|
3979
3979
|
onOpenChange: setGuidedOpen,
|
|
3980
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
3980
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.DialogPanel, {
|
|
3981
3981
|
size: "xs",
|
|
3982
3982
|
children: [
|
|
3983
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
3983
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.DialogHeader, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.DialogHeading, {
|
|
3984
3984
|
className: "text-sm",
|
|
3985
3985
|
children: labels.guidedTitle
|
|
3986
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3987
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
3986
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.DialogDescription, { children: labels.guidedDescription(data.length, formatLabels[guidedFormat]) })] }),
|
|
3987
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.DialogBody, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3988
3988
|
className: "gap-element flex flex-col",
|
|
3989
3989
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
|
|
3990
3990
|
className: "text-text-secondary text-xs",
|
|
@@ -3994,16 +3994,16 @@ function ExportButton({ data, columns, fileName = "export", formats = ["csv", "j
|
|
|
3994
3994
|
children: formats.map((fmt) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
3995
3995
|
type: "button",
|
|
3996
3996
|
onClick: () => setGuidedFormat(fmt),
|
|
3997
|
-
className:
|
|
3997
|
+
className: require_text_truncate.cn("focus-visible:ring-accent rounded-md border px-3 py-1.5 text-sm focus-visible:ring-2 focus-visible:outline-none", guidedFormat === fmt ? "border-accent bg-accent/10 text-accent" : "border-border text-text-secondary"),
|
|
3998
3998
|
children: formatLabels[fmt]
|
|
3999
3999
|
}, fmt))
|
|
4000
4000
|
})]
|
|
4001
4001
|
}) }),
|
|
4002
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
4002
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.DialogFooter, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Button, {
|
|
4003
4003
|
variant: "ghost",
|
|
4004
4004
|
onClick: () => setGuidedOpen(false),
|
|
4005
4005
|
children: labels.cancel
|
|
4006
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
4006
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Button, {
|
|
4007
4007
|
onClick: () => {
|
|
4008
4008
|
handleExport(guidedFormat);
|
|
4009
4009
|
setGuidedOpen(false);
|
|
@@ -4018,7 +4018,7 @@ function ExportButton({ data, columns, fileName = "export", formats = ["csv", "j
|
|
|
4018
4018
|
"data-opt-id": "MGP2B",
|
|
4019
4019
|
"data-opt-slug": "export-button.ExportButton",
|
|
4020
4020
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_key_pad_menu.DropdownTrigger, {
|
|
4021
|
-
className:
|
|
4021
|
+
className: require_text_truncate.cn("inline-flex items-center justify-center rounded-lg font-medium transition-colors", "border-border bg-surface text-text-primary hover:bg-bg-subtle active:bg-bg-muted border", "h-8 gap-1.5 px-3 text-xs", className),
|
|
4022
4022
|
"aria-label": labels.export,
|
|
4023
4023
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4024
4024
|
"aria-hidden": "true",
|
|
@@ -4055,29 +4055,29 @@ const colsClass = {
|
|
|
4055
4055
|
};
|
|
4056
4056
|
/** Renders the summary row component. */
|
|
4057
4057
|
function SummaryRow({ stats, columns = 4, onStatClick, formatValue, durationFractionDigits = 1, percentageFractionDigits = 1, loading = false, labels: customLabels, className }) {
|
|
4058
|
-
const labels =
|
|
4058
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$12), customLabels);
|
|
4059
4059
|
if (loading) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4060
|
-
className:
|
|
4060
|
+
className: require_text_truncate.cn("gap-group grid", colsClass[columns], className),
|
|
4061
4061
|
"data-opt-id": "DA0AX",
|
|
4062
4062
|
"data-opt-slug": "summary-row.SummaryRow",
|
|
4063
4063
|
children: Array.from({ length: columns }).map((_, i) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_key_pad_menu.SkeletonCard, {}, i))
|
|
4064
4064
|
});
|
|
4065
4065
|
if (stats.length === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4066
|
-
className:
|
|
4066
|
+
className: require_text_truncate.cn("flex min-h-40 items-center justify-center", className),
|
|
4067
4067
|
"data-opt-id": "DA0AX",
|
|
4068
4068
|
"data-opt-slug": "summary-row.SummaryRow",
|
|
4069
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
4069
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.EmptyState, {
|
|
4070
4070
|
title: labels.emptyTitle,
|
|
4071
4071
|
description: labels.emptyDescription
|
|
4072
4072
|
})
|
|
4073
4073
|
});
|
|
4074
4074
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4075
|
-
className:
|
|
4075
|
+
className: require_text_truncate.cn("gap-group grid", colsClass[columns], className),
|
|
4076
4076
|
"data-opt-id": "DA0AX",
|
|
4077
4077
|
"data-opt-slug": "summary-row.SummaryRow",
|
|
4078
4078
|
children: stats.map((s) => {
|
|
4079
4079
|
const displayValue = formatValue ? formatValue(s) : formatByStatType(s, durationFractionDigits, percentageFractionDigits);
|
|
4080
|
-
const card = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
4080
|
+
const card = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.StatCard, {
|
|
4081
4081
|
id: s.id,
|
|
4082
4082
|
title: s.title,
|
|
4083
4083
|
value: displayValue,
|
|
@@ -4101,7 +4101,7 @@ SummaryRow.displayName = "SummaryRow";
|
|
|
4101
4101
|
function ComparisonSelector({ segments, valueA, valueB, onChangeA, onChangeB, values, onValuesChange, maxItems = 5, labels: customLabels, className }) {
|
|
4102
4102
|
var _segments$find$label, _segments$find, _segments$find$label2, _segments$find2;
|
|
4103
4103
|
const selectorId = react.useId().replace(/:/g, "");
|
|
4104
|
-
const labels =
|
|
4104
|
+
const labels = require_text_truncate._objectSpread2({
|
|
4105
4105
|
groupLabel: "Comparison selector",
|
|
4106
4106
|
selectorA: "Base",
|
|
4107
4107
|
selectorB: "Compare",
|
|
@@ -4123,7 +4123,7 @@ function ComparisonSelector({ segments, valueA, valueB, onChangeA, onChangeB, va
|
|
|
4123
4123
|
const selected = values !== null && values !== void 0 ? values : [];
|
|
4124
4124
|
const atMax = selected.length >= maxItems;
|
|
4125
4125
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4126
|
-
className:
|
|
4126
|
+
className: require_text_truncate.cn("gap-group flex flex-wrap items-center", className),
|
|
4127
4127
|
role: "group",
|
|
4128
4128
|
"aria-label": labels.groupLabel,
|
|
4129
4129
|
"data-opt-id": "2EH9H",
|
|
@@ -4138,7 +4138,7 @@ function ComparisonSelector({ segments, valueA, valueB, onChangeA, onChangeB, va
|
|
|
4138
4138
|
},
|
|
4139
4139
|
disabled: !isSelected && atMax,
|
|
4140
4140
|
"aria-pressed": isSelected,
|
|
4141
|
-
className:
|
|
4141
|
+
className: require_text_truncate.cn("rounded-full px-3 py-1.5 text-sm font-medium transition-colors", isSelected ? "bg-accent-subtle text-text-primary" : "bg-bg-subtle text-text-tertiary hover:text-text-secondary", !isSelected && atMax && "cursor-not-allowed opacity-50"),
|
|
4142
4142
|
children: s.label
|
|
4143
4143
|
}, s.value);
|
|
4144
4144
|
})
|
|
@@ -4151,7 +4151,7 @@ function ComparisonSelector({ segments, valueA, valueB, onChangeA, onChangeB, va
|
|
|
4151
4151
|
const selectorAText = (_segments$find$label = (_segments$find = segments.find((s) => s.value === valueA)) === null || _segments$find === void 0 ? void 0 : _segments$find.label) !== null && _segments$find$label !== void 0 ? _segments$find$label : "Select…";
|
|
4152
4152
|
const selectorBText = (_segments$find$label2 = (_segments$find2 = segments.find((s) => s.value === valueB)) === null || _segments$find2 === void 0 ? void 0 : _segments$find2.label) !== null && _segments$find$label2 !== void 0 ? _segments$find$label2 : "Select…";
|
|
4153
4153
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4154
|
-
className:
|
|
4154
|
+
className: require_text_truncate.cn("gap-group flex items-end", className),
|
|
4155
4155
|
role: "group",
|
|
4156
4156
|
"aria-label": labels.groupLabel,
|
|
4157
4157
|
"data-opt-id": "2EH9H",
|
|
@@ -4163,23 +4163,23 @@ function ComparisonSelector({ segments, valueA, valueB, onChangeA, onChangeB, va
|
|
|
4163
4163
|
id: selectorALabelId,
|
|
4164
4164
|
className: "text-text-tertiary text-xs font-medium",
|
|
4165
4165
|
children: labels.selectorA
|
|
4166
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
4166
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.SelectRoot, {
|
|
4167
4167
|
value: valueA,
|
|
4168
4168
|
onValueChange: (v) => onChangeA === null || onChangeA === void 0 ? void 0 : onChangeA(v),
|
|
4169
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
4169
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.SelectTrigger, {
|
|
4170
4170
|
"aria-labelledby": `${selectorALabelId} ${selectorAValueId}`,
|
|
4171
4171
|
className: "min-w-[140px]",
|
|
4172
4172
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4173
4173
|
id: selectorAValueId,
|
|
4174
4174
|
children: selectorAText
|
|
4175
4175
|
})
|
|
4176
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
4176
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.SelectPopover, { children: segments.map((s) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.SelectItem, {
|
|
4177
4177
|
value: s.value,
|
|
4178
4178
|
children: s.label
|
|
4179
4179
|
}, s.value)) })]
|
|
4180
4180
|
})]
|
|
4181
4181
|
}),
|
|
4182
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
4182
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Button, {
|
|
4183
4183
|
variant: "ghost",
|
|
4184
4184
|
size: "sm",
|
|
4185
4185
|
onClick: handleSwap,
|
|
@@ -4193,17 +4193,17 @@ function ComparisonSelector({ segments, valueA, valueB, onChangeA, onChangeB, va
|
|
|
4193
4193
|
id: selectorBLabelId,
|
|
4194
4194
|
className: "text-text-tertiary text-xs font-medium",
|
|
4195
4195
|
children: labels.selectorB
|
|
4196
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
4196
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.SelectRoot, {
|
|
4197
4197
|
value: valueB,
|
|
4198
4198
|
onValueChange: (v) => onChangeB === null || onChangeB === void 0 ? void 0 : onChangeB(v),
|
|
4199
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
4199
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.SelectTrigger, {
|
|
4200
4200
|
"aria-labelledby": `${selectorBLabelId} ${selectorBValueId}`,
|
|
4201
4201
|
className: "min-w-[140px]",
|
|
4202
4202
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
4203
4203
|
id: selectorBValueId,
|
|
4204
4204
|
children: selectorBText
|
|
4205
4205
|
})
|
|
4206
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
4206
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.SelectPopover, { children: segments.map((s) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.SelectItem, {
|
|
4207
4207
|
value: s.value,
|
|
4208
4208
|
children: s.label
|
|
4209
4209
|
}, s.value)) })]
|
|
@@ -4361,7 +4361,7 @@ function presetTheme(preset, overrides) {
|
|
|
4361
4361
|
}
|
|
4362
4362
|
/** Construct a `GeneratedThemeSpec` from an inline `PaletteConfig`. */
|
|
4363
4363
|
function generatedTheme(palette, options) {
|
|
4364
|
-
return
|
|
4364
|
+
return require_text_truncate._objectSpread2({
|
|
4365
4365
|
kind: "generated",
|
|
4366
4366
|
palette
|
|
4367
4367
|
}, options);
|
|
@@ -4421,7 +4421,7 @@ function generatePaletteCached(config) {
|
|
|
4421
4421
|
/** Apply sparse override maps onto a base token record. */
|
|
4422
4422
|
function applyOverrides(base, overrides, mode) {
|
|
4423
4423
|
if (!overrides) return base;
|
|
4424
|
-
const merged =
|
|
4424
|
+
const merged = require_text_truncate._objectSpread2({}, base);
|
|
4425
4425
|
if (overrides.shared) Object.assign(merged, overrides.shared);
|
|
4426
4426
|
const modeOverrides = mode === "light" ? overrides.light : overrides.dark;
|
|
4427
4427
|
if (modeOverrides) Object.assign(merged, modeOverrides);
|
|
@@ -5145,7 +5145,7 @@ function resolveLabels(user) {
|
|
|
5145
5145
|
return {
|
|
5146
5146
|
heading: (_user$heading = user === null || user === void 0 ? void 0 : user.heading) !== null && _user$heading !== void 0 ? _user$heading : DEFAULT_LABELS.heading,
|
|
5147
5147
|
activeSuffix: (_user$activeSuffix = user === null || user === void 0 ? void 0 : user.activeSuffix) !== null && _user$activeSuffix !== void 0 ? _user$activeSuffix : DEFAULT_LABELS.activeSuffix,
|
|
5148
|
-
modeLabels:
|
|
5148
|
+
modeLabels: require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, DEFAULT_MODE_LABELS), user === null || user === void 0 ? void 0 : user.modeLabels)
|
|
5149
5149
|
};
|
|
5150
5150
|
}
|
|
5151
5151
|
/** Renders the theme switcher component. */
|
|
@@ -5164,7 +5164,7 @@ function ThemeSwitcher({ className, labels: userLabels, variant = "default", cus
|
|
|
5164
5164
|
const showCustomBadge = controlledPreset === void 0 && ((themeContext === null || themeContext === void 0 ? void 0 : themeContext.isGenerated) === true || (themeContext === null || themeContext === void 0 ? void 0 : themeContext.isPromoted) === true);
|
|
5165
5165
|
if (options.length === 0) return null;
|
|
5166
5166
|
if (variant === "compact") return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5167
|
-
className:
|
|
5167
|
+
className: require_text_truncate.cn("flex items-center gap-1.5", className),
|
|
5168
5168
|
"data-opt-id": "8JX0N",
|
|
5169
5169
|
"data-opt-slug": "theme-switcher.ThemeSwitcher",
|
|
5170
5170
|
children: [
|
|
@@ -5175,7 +5175,7 @@ function ThemeSwitcher({ className, labels: userLabels, variant = "default", cus
|
|
|
5175
5175
|
"aria-label": isActive ? `${theme.label} ${labels.activeSuffix}` : theme.label,
|
|
5176
5176
|
"aria-pressed": isActive,
|
|
5177
5177
|
onClick: () => setPreset(theme.value),
|
|
5178
|
-
className:
|
|
5178
|
+
className: require_text_truncate.cn("flex h-7 w-7 items-center justify-center rounded-full transition-all", isActive ? "ring-accent ring-2 ring-offset-1" : "hover:ring-border-hover hover:ring-1"),
|
|
5179
5179
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5180
5180
|
className: "h-4 w-4 rounded-full",
|
|
5181
5181
|
style: { backgroundColor: theme.swatches[0] }
|
|
@@ -5192,13 +5192,13 @@ function ThemeSwitcher({ className, labels: userLabels, variant = "default", cus
|
|
|
5192
5192
|
"aria-pressed": mode === m,
|
|
5193
5193
|
onClick: () => setMode(m),
|
|
5194
5194
|
disabled: forcedMode,
|
|
5195
|
-
className:
|
|
5195
|
+
className: require_text_truncate.cn("flex h-7 w-7 items-center justify-center rounded-full transition-all", forcedMode && "pointer-events-none opacity-40", mode === m ? "bg-accent/15 text-accent" : "text-text-tertiary hover:text-text-primary hover:bg-bg-subtle"),
|
|
5196
5196
|
children: MODE_ICONS[m]
|
|
5197
5197
|
}, m))
|
|
5198
5198
|
]
|
|
5199
5199
|
});
|
|
5200
5200
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5201
|
-
className:
|
|
5201
|
+
className: require_text_truncate.cn("gap-group flex flex-col", className),
|
|
5202
5202
|
"data-opt-id": "8JX0N",
|
|
5203
5203
|
"data-opt-slug": "theme-switcher.ThemeSwitcher",
|
|
5204
5204
|
children: [
|
|
@@ -5213,7 +5213,7 @@ function ThemeSwitcher({ className, labels: userLabels, variant = "default", cus
|
|
|
5213
5213
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
5214
5214
|
onClick: () => setPreset(theme.value),
|
|
5215
5215
|
"aria-pressed": isActive,
|
|
5216
|
-
className:
|
|
5216
|
+
className: require_text_truncate.cn("gap-element flex flex-col rounded-lg border p-3 text-left transition-all", isActive ? "border-accent bg-accent-subtle ring-accent ring-2" : "border-border bg-surface hover:border-border-hover hover:bg-bg-subtle"),
|
|
5217
5217
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
5218
5218
|
className: "flex gap-1.5",
|
|
5219
5219
|
children: theme.swatches.map((color, i) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -5231,12 +5231,12 @@ function ThemeSwitcher({ className, labels: userLabels, variant = "default", cus
|
|
|
5231
5231
|
})
|
|
5232
5232
|
}),
|
|
5233
5233
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
5234
|
-
className:
|
|
5234
|
+
className: require_text_truncate.cn("bg-bg-subtle flex gap-1 rounded-lg p-1", forcedMode && "pointer-events-none opacity-50"),
|
|
5235
5235
|
children: MODE_VALUES.map((m) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
5236
5236
|
onClick: () => setMode(m),
|
|
5237
5237
|
disabled: forcedMode,
|
|
5238
5238
|
"aria-pressed": mode === m,
|
|
5239
|
-
className:
|
|
5239
|
+
className: require_text_truncate.cn("flex-1 rounded-md px-3 py-1.5 text-xs font-medium transition-all", mode === m ? "bg-surface text-text-primary shadow-sm" : "text-text-tertiary hover:text-text-secondary"),
|
|
5240
5240
|
children: labels.modeLabels[m]
|
|
5241
5241
|
}, m))
|
|
5242
5242
|
}),
|
|
@@ -5260,7 +5260,7 @@ function renderPrompt(template, values) {
|
|
|
5260
5260
|
}
|
|
5261
5261
|
/** Renders the prompt template component. */
|
|
5262
5262
|
function PromptTemplate({ title, description, template, variables = [], className, labels: customLabels }) {
|
|
5263
|
-
const labels =
|
|
5263
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$11), customLabels);
|
|
5264
5264
|
const [values, setValues] = react.useState(() => {
|
|
5265
5265
|
const initial = {};
|
|
5266
5266
|
for (const v of variables) if (v.defaultValue) initial[v.name] = v.defaultValue;
|
|
@@ -5278,7 +5278,7 @@ function PromptTemplate({ title, description, template, variables = [], classNam
|
|
|
5278
5278
|
} catch (_unused) {}
|
|
5279
5279
|
}, [rendered]);
|
|
5280
5280
|
const handleChange = react.useCallback((name, value) => {
|
|
5281
|
-
setValues((prev) =>
|
|
5281
|
+
setValues((prev) => require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, prev), {}, { [name]: value }));
|
|
5282
5282
|
}, []);
|
|
5283
5283
|
const renderHighlighted = react.useMemo(() => {
|
|
5284
5284
|
const parts = [];
|
|
@@ -5291,7 +5291,7 @@ function PromptTemplate({ title, description, template, variables = [], classNam
|
|
|
5291
5291
|
const val = values[key];
|
|
5292
5292
|
const hasValue = val !== void 0 && val !== "";
|
|
5293
5293
|
parts.push(/* @__PURE__ */ (0, react_jsx_runtime.jsx)("mark", {
|
|
5294
|
-
className:
|
|
5294
|
+
className: require_text_truncate.cn("rounded px-0.5", hasValue ? "bg-accent/20 text-accent-fg" : "bg-warning/20 text-warning-fg"),
|
|
5295
5295
|
children: hasValue ? val : match[0]
|
|
5296
5296
|
}, `${key}-${match.index}`));
|
|
5297
5297
|
lastIndex = match.index + match[0].length;
|
|
@@ -5300,7 +5300,7 @@ function PromptTemplate({ title, description, template, variables = [], classNam
|
|
|
5300
5300
|
return parts;
|
|
5301
5301
|
}, [template, values]);
|
|
5302
5302
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5303
|
-
className:
|
|
5303
|
+
className: require_text_truncate.cn("border-border overflow-hidden rounded-lg border", className),
|
|
5304
5304
|
"data-opt-id": "5E56D",
|
|
5305
5305
|
"data-opt-slug": "prompt-template.PromptTemplate",
|
|
5306
5306
|
children: [
|
|
@@ -5362,7 +5362,7 @@ function useSidebar() {
|
|
|
5362
5362
|
}
|
|
5363
5363
|
function SidebarHeader({ children, className }) {
|
|
5364
5364
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
5365
|
-
className:
|
|
5365
|
+
className: require_text_truncate.cn("shrink-0 p-4", className),
|
|
5366
5366
|
children
|
|
5367
5367
|
});
|
|
5368
5368
|
}
|
|
@@ -5388,7 +5388,7 @@ function SidebarContent({ children, className, onKeyDown }) {
|
|
|
5388
5388
|
nextItem === null || nextItem === void 0 || (_nextItem$scrollIntoV = nextItem.scrollIntoView) === null || _nextItem$scrollIntoV === void 0 || _nextItem$scrollIntoV.call(nextItem, { block: "nearest" });
|
|
5389
5389
|
};
|
|
5390
5390
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("nav", {
|
|
5391
|
-
className:
|
|
5391
|
+
className: require_text_truncate.cn("flex-1 overflow-x-hidden overflow-y-auto px-2 py-1", className),
|
|
5392
5392
|
onKeyDown: handleKeyDown,
|
|
5393
5393
|
children
|
|
5394
5394
|
});
|
|
@@ -5396,7 +5396,7 @@ function SidebarContent({ children, className, onKeyDown }) {
|
|
|
5396
5396
|
SidebarContent.displayName = "Sidebar.Content";
|
|
5397
5397
|
function SidebarFooter({ children, className }) {
|
|
5398
5398
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
5399
|
-
className:
|
|
5399
|
+
className: require_text_truncate.cn("shrink-0 p-4", className),
|
|
5400
5400
|
children
|
|
5401
5401
|
});
|
|
5402
5402
|
}
|
|
@@ -5409,7 +5409,7 @@ function SidebarTrigger({ className, children }) {
|
|
|
5409
5409
|
onClick: toggle,
|
|
5410
5410
|
"aria-expanded": !collapsed,
|
|
5411
5411
|
"aria-label": collapsed ? "사이드바 열기" : "사이드바 닫기",
|
|
5412
|
-
className:
|
|
5412
|
+
className: require_text_truncate.cn("text-text-secondary hover:bg-bg-subtle hover:text-text-primary inline-flex h-8 w-8 items-center justify-center rounded-md transition-colors", className),
|
|
5413
5413
|
children: children !== null && children !== void 0 ? children : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
|
|
5414
5414
|
width: "16",
|
|
5415
5415
|
height: "16",
|
|
@@ -5443,7 +5443,7 @@ function SidebarGroup({ children, label, className }) {
|
|
|
5443
5443
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5444
5444
|
role: "group",
|
|
5445
5445
|
"aria-labelledby": label ? labelId : void 0,
|
|
5446
|
-
className:
|
|
5446
|
+
className: require_text_truncate.cn("flex flex-col gap-0.5", className),
|
|
5447
5447
|
children: [label && !collapsed && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5448
5448
|
id: labelId,
|
|
5449
5449
|
className: "text-text-tertiary mt-4 mb-1 px-2 text-[11px] font-semibold tracking-wider uppercase",
|
|
@@ -5456,7 +5456,7 @@ function SidebarItem({ children, icon, active = false, onClick, href, tooltip, b
|
|
|
5456
5456
|
const { collapsed, collapsible } = useSidebar();
|
|
5457
5457
|
const isCollapsed = collapsible && collapsed;
|
|
5458
5458
|
const tooltipText = tooltip !== null && tooltip !== void 0 ? tooltip : typeof children === "string" ? children : void 0;
|
|
5459
|
-
const sharedClassName =
|
|
5459
|
+
const sharedClassName = require_text_truncate.cn("relative flex w-full items-center gap-2 rounded-md text-left text-sm transition-colors outline-none", isCollapsed ? "justify-center px-0 py-2" : "px-2 py-1.5", active ? "bg-bg-subtle text-text-primary font-medium" : "text-text-secondary hover:bg-bg-subtle hover:text-text-primary", "focus-visible:ring-ring focus-visible:ring-2 focus-visible:ring-offset-1", className);
|
|
5460
5460
|
const inner = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
5461
5461
|
active && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: "bg-accent absolute top-1/2 left-0 h-4 w-0.5 -translate-y-1/2 rounded-full" }),
|
|
5462
5462
|
icon && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
@@ -5489,10 +5489,10 @@ function SidebarItem({ children, icon, active = false, onClick, href, tooltip, b
|
|
|
5489
5489
|
className: sharedClassName,
|
|
5490
5490
|
children: inner
|
|
5491
5491
|
});
|
|
5492
|
-
if (isCollapsed && tooltipText) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
5492
|
+
if (isCollapsed && tooltipText) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.TooltipProvider, {
|
|
5493
5493
|
placement: "right",
|
|
5494
5494
|
portal: true,
|
|
5495
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
5495
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.TooltipAnchor, { render: element }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Tooltip, {
|
|
5496
5496
|
className: "bg-foreground text-background z-[120] rounded-md px-2 py-1 text-xs shadow-lg",
|
|
5497
5497
|
children: tooltipText
|
|
5498
5498
|
})]
|
|
@@ -5501,7 +5501,7 @@ function SidebarItem({ children, icon, active = false, onClick, href, tooltip, b
|
|
|
5501
5501
|
}
|
|
5502
5502
|
SidebarItem.displayName = "Sidebar.Item";
|
|
5503
5503
|
function SidebarSeparator({ className }) {
|
|
5504
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hr", { className:
|
|
5504
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hr", { className: require_text_truncate.cn("my-2 border-0", className) });
|
|
5505
5505
|
}
|
|
5506
5506
|
SidebarSeparator.displayName = "Sidebar.Separator";
|
|
5507
5507
|
function SidebarRoot({ children, collapsible = false, defaultCollapsed = false, collapsed: controlledCollapsed, onCollapsedChange, width = 280, collapsedWidth = 56, className, side = "left", label }) {
|
|
@@ -5548,7 +5548,7 @@ function SidebarRoot({ children, collapsible = false, defaultCollapsed = false,
|
|
|
5548
5548
|
"aria-label": label !== null && label !== void 0 ? label : "사이드바",
|
|
5549
5549
|
"data-collapsed": collapsed || void 0,
|
|
5550
5550
|
"data-side": side,
|
|
5551
|
-
className:
|
|
5551
|
+
className: require_text_truncate.cn("bg-surface sticky top-0 flex h-screen shrink-0 flex-col transition-[width] duration-200", className),
|
|
5552
5552
|
style: { width: currentWidth },
|
|
5553
5553
|
"data-opt-id": "FG8ZG",
|
|
5554
5554
|
"data-opt-slug": "sidebar.Sidebar",
|
|
@@ -5571,28 +5571,28 @@ const Sidebar = Object.assign(SidebarRoot, {
|
|
|
5571
5571
|
const AppShellContext = react.createContext({ hasSidebar: false });
|
|
5572
5572
|
function AppShellHeader({ children, className }) {
|
|
5573
5573
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("header", {
|
|
5574
|
-
className:
|
|
5574
|
+
className: require_text_truncate.cn("border-border bg-surface/80 shrink-0 border-b px-4 py-3 backdrop-blur", className),
|
|
5575
5575
|
children
|
|
5576
5576
|
});
|
|
5577
5577
|
}
|
|
5578
5578
|
AppShellHeader.displayName = "AppShell.Header";
|
|
5579
5579
|
function AppShellSidebar({ children, className }) {
|
|
5580
5580
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
5581
|
-
className:
|
|
5581
|
+
className: require_text_truncate.cn("shrink-0", className),
|
|
5582
5582
|
children
|
|
5583
5583
|
});
|
|
5584
5584
|
}
|
|
5585
5585
|
AppShellSidebar.displayName = "AppShell.Sidebar";
|
|
5586
5586
|
function AppShellContent({ children, className }) {
|
|
5587
5587
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("main", {
|
|
5588
|
-
className:
|
|
5588
|
+
className: require_text_truncate.cn("min-w-0 flex-1 overflow-auto", className),
|
|
5589
5589
|
children
|
|
5590
5590
|
});
|
|
5591
5591
|
}
|
|
5592
5592
|
AppShellContent.displayName = "AppShell.Content";
|
|
5593
5593
|
function AppShellFooter({ children, className }) {
|
|
5594
5594
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("footer", {
|
|
5595
|
-
className:
|
|
5595
|
+
className: require_text_truncate.cn("border-border border-t px-4 py-3", className),
|
|
5596
5596
|
children
|
|
5597
5597
|
});
|
|
5598
5598
|
}
|
|
@@ -5620,7 +5620,7 @@ function AppShellRoot({ children, className }) {
|
|
|
5620
5620
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AppShellContext.Provider, {
|
|
5621
5621
|
value: ctx,
|
|
5622
5622
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5623
|
-
className:
|
|
5623
|
+
className: require_text_truncate.cn("flex min-h-screen flex-col", className),
|
|
5624
5624
|
"data-opt-id": "EQGGQ",
|
|
5625
5625
|
"data-opt-slug": "app-shell.AppShell",
|
|
5626
5626
|
children: [
|
|
@@ -5645,21 +5645,21 @@ const AppShell = Object.assign(AppShellRoot, {
|
|
|
5645
5645
|
//#region src/shells/confirm-dialog.tsx
|
|
5646
5646
|
/** Renders the confirm dialog component. */
|
|
5647
5647
|
function ConfirmDialog({ open, onConfirm, onCancel, title, description, confirmLabel = "Confirm", cancelLabel = "Cancel", variant = "default", children }) {
|
|
5648
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
5648
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.DialogRoot, {
|
|
5649
5649
|
open,
|
|
5650
5650
|
onOpenChange: (v) => !v && onCancel(),
|
|
5651
5651
|
"data-opt-id": "0VNJQ",
|
|
5652
5652
|
"data-opt-slug": "confirm-dialog.ConfirmDialog",
|
|
5653
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
5653
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.DialogPanel, {
|
|
5654
5654
|
size: "sm",
|
|
5655
5655
|
children: [
|
|
5656
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
5657
|
-
children && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
5658
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
5656
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.DialogHeader, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.DialogHeading, { children: title }), description && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.DialogDescription, { children: description })] }),
|
|
5657
|
+
children && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.DialogBody, { children }),
|
|
5658
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.DialogFooter, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Button, {
|
|
5659
5659
|
variant: "secondary",
|
|
5660
5660
|
onClick: onCancel,
|
|
5661
5661
|
children: cancelLabel
|
|
5662
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
5662
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Button, {
|
|
5663
5663
|
variant: variant === "danger" ? "danger" : "primary",
|
|
5664
5664
|
onClick: onConfirm,
|
|
5665
5665
|
children: confirmLabel
|
|
@@ -5673,7 +5673,7 @@ ConfirmDialog.displayName = "ConfirmDialog";
|
|
|
5673
5673
|
//#region src/shells/async-combobox.tsx
|
|
5674
5674
|
/** Renders the async combobox component. */
|
|
5675
5675
|
function AsyncCombobox({ onSearch, debounceMs = 300, loadingText, minChars = 1, placeholder, onSelect, labels: customLabels, className }) {
|
|
5676
|
-
const labels =
|
|
5676
|
+
const labels = require_text_truncate._objectSpread2({
|
|
5677
5677
|
input: placeholder !== null && placeholder !== void 0 ? placeholder : "Search",
|
|
5678
5678
|
loading: loadingText !== null && loadingText !== void 0 ? loadingText : "Loading…",
|
|
5679
5679
|
noResults: "No results",
|
|
@@ -5722,26 +5722,26 @@ function AsyncCombobox({ onSearch, debounceMs = 300, loadingText, minChars = 1,
|
|
|
5722
5722
|
debounceMs,
|
|
5723
5723
|
onSearch
|
|
5724
5724
|
]);
|
|
5725
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
5725
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.ComboboxRoot, {
|
|
5726
5726
|
onValueChange: handleValueChange,
|
|
5727
5727
|
"data-opt-id": "KAKTV",
|
|
5728
5728
|
"data-opt-slug": "async-combobox.AsyncCombobox",
|
|
5729
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
5730
|
-
className:
|
|
5729
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.ComboboxInput, {
|
|
5730
|
+
className: require_text_truncate.cn(className),
|
|
5731
5731
|
"aria-label": labels.input,
|
|
5732
5732
|
"aria-busy": loading || void 0,
|
|
5733
5733
|
placeholder: labels.placeholder,
|
|
5734
5734
|
onInput: handleInput
|
|
5735
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
5735
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.ComboboxPopover, { children: loading ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5736
5736
|
className: "text-text-secondary gap-element flex items-center px-3 py-2 text-sm",
|
|
5737
5737
|
role: "status",
|
|
5738
5738
|
"aria-live": "polite",
|
|
5739
5739
|
"aria-busy": "true",
|
|
5740
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
5740
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Spinner, {
|
|
5741
5741
|
size: "sm",
|
|
5742
5742
|
"aria-hidden": "true"
|
|
5743
5743
|
}), labels.loading]
|
|
5744
|
-
}) : results.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
5744
|
+
}) : results.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.ComboboxEmpty, { children: labels.noResults }) : results.map((item) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.ComboboxItem, {
|
|
5745
5745
|
value: item,
|
|
5746
5746
|
children: item
|
|
5747
5747
|
}, item)) })]
|
|
@@ -5756,30 +5756,30 @@ const defaultLabels$10 = {
|
|
|
5756
5756
|
/** Renders the vertical tabs component. */
|
|
5757
5757
|
function VerticalTabs({ tabs, defaultTabId, labels: customLabels, className }) {
|
|
5758
5758
|
var _tabs$;
|
|
5759
|
-
const labels =
|
|
5759
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$10), customLabels);
|
|
5760
5760
|
if (tabs.length === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
5761
|
-
className:
|
|
5761
|
+
className: require_text_truncate.cn("text-text-secondary text-sm", className),
|
|
5762
5762
|
"data-opt-id": "J81G4",
|
|
5763
5763
|
"data-opt-slug": "vertical-tabs.VerticalTabs",
|
|
5764
5764
|
children: labels.emptyMessage
|
|
5765
5765
|
});
|
|
5766
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
5766
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.TabsRoot, {
|
|
5767
5767
|
defaultSelectedId: defaultTabId !== null && defaultTabId !== void 0 ? defaultTabId : (_tabs$ = tabs[0]) === null || _tabs$ === void 0 ? void 0 : _tabs$.id,
|
|
5768
5768
|
"data-opt-id": "J81G4",
|
|
5769
5769
|
"data-opt-slug": "vertical-tabs.VerticalTabs",
|
|
5770
5770
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5771
|
-
className:
|
|
5772
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
5771
|
+
className: require_text_truncate.cn("gap-group flex", className),
|
|
5772
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.TabList, {
|
|
5773
5773
|
"aria-label": labels.ariaLabel,
|
|
5774
5774
|
className: "gap-element border-border flex flex-col border-r pr-4",
|
|
5775
|
-
children: tabs.map((tab) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
5775
|
+
children: tabs.map((tab) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Tab, {
|
|
5776
5776
|
id: tab.id,
|
|
5777
5777
|
className: "justify-start text-left",
|
|
5778
5778
|
children: tab.label
|
|
5779
5779
|
}, tab.id))
|
|
5780
5780
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
5781
5781
|
className: "flex-1",
|
|
5782
|
-
children: tabs.map((tab) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
5782
|
+
children: tabs.map((tab) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.TabPanel, {
|
|
5783
5783
|
tabId: tab.id,
|
|
5784
5784
|
children: tab.content
|
|
5785
5785
|
}, tab.id))
|
|
@@ -5795,26 +5795,26 @@ const defaultLabels$9 = {
|
|
|
5795
5795
|
};
|
|
5796
5796
|
/** Renders the column toggler component. */
|
|
5797
5797
|
function ColumnToggler({ columns, visibleColumns, onChange, className, labels: customLabels }) {
|
|
5798
|
-
const labels =
|
|
5798
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$9), customLabels);
|
|
5799
5799
|
const visibleCount = visibleColumns.length;
|
|
5800
5800
|
const hasColumns = columns.length > 0;
|
|
5801
5801
|
const toggle = (id) => {
|
|
5802
5802
|
if (visibleColumns.includes(id)) onChange(visibleColumns.filter((c) => c !== id));
|
|
5803
5803
|
else onChange([...visibleColumns, id]);
|
|
5804
5804
|
};
|
|
5805
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
5805
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.PopoverRoot, {
|
|
5806
5806
|
"data-opt-id": "PPN5M",
|
|
5807
5807
|
"data-opt-slug": "column-toggler.ColumnToggler",
|
|
5808
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
5809
|
-
className:
|
|
5808
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.PopoverTrigger, {
|
|
5809
|
+
className: require_text_truncate.cn("border-border bg-surface text-text-primary hover:bg-bg-subtle inline-flex h-9 items-center gap-1.5 rounded-lg border px-3 text-sm font-medium", className),
|
|
5810
5810
|
children: labels.triggerLabel(visibleCount)
|
|
5811
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
5811
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.PopoverContent, {
|
|
5812
5812
|
className: "w-56",
|
|
5813
5813
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
5814
5814
|
className: "gap-element flex flex-col p-1",
|
|
5815
5815
|
children: hasColumns ? columns.map((col) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
5816
5816
|
className: "text-text-primary hover:bg-bg-subtle gap-element flex cursor-pointer items-center rounded-md px-2 py-1.5 text-sm",
|
|
5817
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
5817
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Checkbox, {
|
|
5818
5818
|
checked: visibleColumns.includes(col.id),
|
|
5819
5819
|
onChange: () => toggle(col.id)
|
|
5820
5820
|
}), col.header]
|
|
@@ -5831,7 +5831,7 @@ ColumnToggler.displayName = "ColumnToggler";
|
|
|
5831
5831
|
//#region src/shells/bulk-actions.tsx
|
|
5832
5832
|
/** Renders the bulk actions component. */
|
|
5833
5833
|
function BulkActions({ selectedCount, actions, onAction, onClear, labels: customLabels, className }) {
|
|
5834
|
-
const labels =
|
|
5834
|
+
const labels = require_text_truncate._objectSpread2({
|
|
5835
5835
|
selected: "selected",
|
|
5836
5836
|
actions: "Actions",
|
|
5837
5837
|
clear: "Clear",
|
|
@@ -5840,11 +5840,11 @@ function BulkActions({ selectedCount, actions, onAction, onClear, labels: custom
|
|
|
5840
5840
|
if (selectedCount === 0) return null;
|
|
5841
5841
|
const hasActions = actions.length > 0;
|
|
5842
5842
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5843
|
-
className:
|
|
5843
|
+
className: require_text_truncate.cn("gap-group border-border bg-surface flex items-center rounded-lg border px-4 py-2", className),
|
|
5844
5844
|
"data-opt-id": "Q3J33",
|
|
5845
5845
|
"data-opt-slug": "bulk-actions.BulkActions",
|
|
5846
5846
|
children: [
|
|
5847
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
5847
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.Badge, {
|
|
5848
5848
|
variant: "info",
|
|
5849
5849
|
children: [
|
|
5850
5850
|
selectedCount,
|
|
@@ -5885,7 +5885,7 @@ const defaultLabels$8 = {
|
|
|
5885
5885
|
};
|
|
5886
5886
|
/** Renders the saved filters component. */
|
|
5887
5887
|
function SavedFilters({ currentFilters, presets, onSavePreset, onLoadPreset, onDeletePreset, className, labels: customLabels }) {
|
|
5888
|
-
const labels =
|
|
5888
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$8), customLabels);
|
|
5889
5889
|
const [newName, setNewName] = react.useState("");
|
|
5890
5890
|
const [pendingDeleteId, setPendingDeleteId] = react.useState(null);
|
|
5891
5891
|
const triggerId = react.useId();
|
|
@@ -5910,14 +5910,14 @@ function SavedFilters({ currentFilters, presets, onSavePreset, onLoadPreset, onD
|
|
|
5910
5910
|
window.addEventListener("keydown", cancelDelete);
|
|
5911
5911
|
return () => window.removeEventListener("keydown", cancelDelete);
|
|
5912
5912
|
}, [cancelPendingDelete, pendingDeleteId]);
|
|
5913
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
5913
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.PopoverRoot, {
|
|
5914
5914
|
"data-opt-id": "SPRCB",
|
|
5915
5915
|
"data-opt-slug": "saved-filters.SavedFilters",
|
|
5916
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
5916
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.PopoverTrigger, {
|
|
5917
5917
|
id: triggerId,
|
|
5918
|
-
className:
|
|
5918
|
+
className: require_text_truncate.cn("border-border bg-surface text-text-primary hover:bg-bg-subtle inline-flex h-9 items-center gap-1.5 rounded-lg border px-3 text-sm font-medium", className),
|
|
5919
5919
|
children: labels.triggerLabel(presets.length)
|
|
5920
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
5920
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.PopoverContent, {
|
|
5921
5921
|
className: "w-72",
|
|
5922
5922
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
|
|
5923
5923
|
className: "gap-group flex flex-col p-2",
|
|
@@ -5953,7 +5953,7 @@ function SavedFilters({ currentFilters, presets, onSavePreset, onLoadPreset, onD
|
|
|
5953
5953
|
},
|
|
5954
5954
|
children: preset.name
|
|
5955
5955
|
}),
|
|
5956
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
5956
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Button, {
|
|
5957
5957
|
variant: "ghost",
|
|
5958
5958
|
size: "sm",
|
|
5959
5959
|
className: "text-text-tertiary hover:text-danger size-7 p-0",
|
|
@@ -5976,7 +5976,7 @@ function SavedFilters({ currentFilters, presets, onSavePreset, onLoadPreset, onD
|
|
|
5976
5976
|
cancelPendingDelete(preset.id);
|
|
5977
5977
|
}
|
|
5978
5978
|
},
|
|
5979
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
5979
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Button, {
|
|
5980
5980
|
id: `${triggerId}-${preset.id}`,
|
|
5981
5981
|
variant: "danger",
|
|
5982
5982
|
size: "sm",
|
|
@@ -5991,7 +5991,7 @@ function SavedFilters({ currentFilters, presets, onSavePreset, onLoadPreset, onD
|
|
|
5991
5991
|
});
|
|
5992
5992
|
},
|
|
5993
5993
|
children: labels.confirmDeleteLabel
|
|
5994
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
5994
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Button, {
|
|
5995
5995
|
variant: "ghost",
|
|
5996
5996
|
size: "sm",
|
|
5997
5997
|
className: "h-7 px-2",
|
|
@@ -6016,13 +6016,13 @@ function SavedFilters({ currentFilters, presets, onSavePreset, onLoadPreset, onD
|
|
|
6016
6016
|
setPendingDeleteId(null);
|
|
6017
6017
|
}
|
|
6018
6018
|
},
|
|
6019
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6019
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Input, {
|
|
6020
6020
|
value: newName,
|
|
6021
6021
|
onChange: (e) => setNewName(e.target.value),
|
|
6022
6022
|
placeholder: labels.namePlaceholder,
|
|
6023
6023
|
"aria-label": labels.namePlaceholder,
|
|
6024
6024
|
className: "h-8 text-sm"
|
|
6025
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6025
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Button, {
|
|
6026
6026
|
type: "submit",
|
|
6027
6027
|
size: "sm",
|
|
6028
6028
|
disabled: !newName.trim(),
|
|
@@ -6046,13 +6046,13 @@ const defaultLabels$7 = {
|
|
|
6046
6046
|
};
|
|
6047
6047
|
/** Renders the notification center component. */
|
|
6048
6048
|
function NotificationCenter({ notifications, onMarkRead, onMarkAllRead, onAction, className, labels: customLabels }) {
|
|
6049
|
-
const labels =
|
|
6049
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$7), customLabels);
|
|
6050
6050
|
const unreadCount = notifications.filter((n) => !n.read).length;
|
|
6051
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
6051
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.PopoverRoot, {
|
|
6052
6052
|
"data-opt-id": "7A0XY",
|
|
6053
6053
|
"data-opt-slug": "notification-center.NotificationCenter",
|
|
6054
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
6055
|
-
className:
|
|
6054
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.PopoverTrigger, {
|
|
6055
|
+
className: require_text_truncate.cn("border-border bg-surface hover:bg-bg-subtle relative inline-flex h-9 w-9 items-center justify-center rounded-lg border", className),
|
|
6056
6056
|
"aria-label": `${labels.triggerLabel}${unreadCount > 0 ? ` ${labels.unreadSuffix(unreadCount)}` : ""}`,
|
|
6057
6057
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
|
|
6058
6058
|
width: "16",
|
|
@@ -6068,7 +6068,7 @@ function NotificationCenter({ notifications, onMarkRead, onMarkAllRead, onAction
|
|
|
6068
6068
|
className: "bg-danger text-danger-fg absolute -top-1 -right-1 flex h-4 min-w-4 items-center justify-center rounded-full px-1 text-[10px] font-bold",
|
|
6069
6069
|
children: unreadCount
|
|
6070
6070
|
})]
|
|
6071
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
6071
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.PopoverContent, {
|
|
6072
6072
|
className: "w-80 p-0",
|
|
6073
6073
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6074
6074
|
className: "border-border flex items-center justify-between border-b px-4 py-3",
|
|
@@ -6086,7 +6086,7 @@ function NotificationCenter({ notifications, onMarkRead, onMarkAllRead, onAction
|
|
|
6086
6086
|
children: notifications.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
6087
6087
|
className: "text-text-tertiary px-4 py-8 text-center text-sm",
|
|
6088
6088
|
children: labels.emptyMessage
|
|
6089
|
-
}) : notifications.map((n) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div",
|
|
6089
|
+
}) : notifications.map((n) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({ className: require_text_truncate.cn("border-border flex flex-col gap-1 border-b px-4 py-3 last:border-b-0", !n.read && "bg-accent-subtle/30 cursor-pointer") }, !n.read ? {
|
|
6090
6090
|
role: "button",
|
|
6091
6091
|
tabIndex: 0,
|
|
6092
6092
|
onClick: () => onMarkRead(n.id),
|
|
@@ -6143,20 +6143,20 @@ const ACTION_DOT_COLOR = {
|
|
|
6143
6143
|
};
|
|
6144
6144
|
/** Renders the audit log component. */
|
|
6145
6145
|
function AuditLog({ entries, onLoadMore, loading, labels: customLabels, className }) {
|
|
6146
|
-
const labels =
|
|
6146
|
+
const labels = require_text_truncate._objectSpread2({
|
|
6147
6147
|
title: "Activity log",
|
|
6148
6148
|
loading: "Loading…",
|
|
6149
6149
|
loadMore: "Load more",
|
|
6150
6150
|
empty: "No activity yet"
|
|
6151
6151
|
}, customLabels);
|
|
6152
|
-
if (entries.length === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6152
|
+
if (entries.length === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.EmptyState, {
|
|
6153
6153
|
title: labels.empty,
|
|
6154
6154
|
className,
|
|
6155
6155
|
"data-opt-id": "VZ046",
|
|
6156
6156
|
"data-opt-slug": "audit-log.AuditLog"
|
|
6157
6157
|
});
|
|
6158
6158
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6159
|
-
className:
|
|
6159
|
+
className: require_text_truncate.cn("gap-group flex flex-col", className),
|
|
6160
6160
|
"data-opt-id": "VZ046",
|
|
6161
6161
|
"data-opt-slug": "audit-log.AuditLog",
|
|
6162
6162
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -6179,36 +6179,36 @@ function AuditLog({ entries, onLoadMore, loading, labels: customLabels, classNam
|
|
|
6179
6179
|
fallback: entry.user.name[0],
|
|
6180
6180
|
size: "sm"
|
|
6181
6181
|
}), dotColor && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
6182
|
-
className:
|
|
6182
|
+
className: require_text_truncate.cn("border-surface absolute -right-0.5 -bottom-0.5 h-3 w-3 rounded-full border-2", dotColor),
|
|
6183
6183
|
"aria-hidden": "true"
|
|
6184
6184
|
})]
|
|
6185
6185
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6186
|
-
className:
|
|
6186
|
+
className: require_text_truncate.cn("rounded-lg p-3", require_text_truncate.OPT_BORDER, "bg-surface transition-colors"),
|
|
6187
6187
|
children: [
|
|
6188
6188
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6189
6189
|
className: "gap-element flex items-center",
|
|
6190
6190
|
children: [
|
|
6191
|
-
badgeVariant ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6191
|
+
badgeVariant ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Badge, {
|
|
6192
6192
|
variant: badgeVariant,
|
|
6193
6193
|
size: "sm",
|
|
6194
6194
|
dot: true,
|
|
6195
6195
|
children: entry.action
|
|
6196
6196
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6197
|
-
className:
|
|
6197
|
+
className: require_text_truncate.cn("text-xs font-medium", require_text_truncate.OPT_TEXT_SECONDARY),
|
|
6198
6198
|
children: entry.action
|
|
6199
6199
|
}),
|
|
6200
6200
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6201
|
-
className:
|
|
6201
|
+
className: require_text_truncate.cn("text-xs", require_text_truncate.OPT_TEXT_TERTIARY),
|
|
6202
6202
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("time", { children: entry.timestamp })
|
|
6203
6203
|
}),
|
|
6204
6204
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6205
|
-
className:
|
|
6205
|
+
className: require_text_truncate.cn("ml-auto text-xs font-medium", require_text_truncate.OPT_TEXT_SECONDARY),
|
|
6206
6206
|
children: entry.user.name
|
|
6207
6207
|
})
|
|
6208
6208
|
]
|
|
6209
6209
|
}),
|
|
6210
6210
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
|
|
6211
|
-
className:
|
|
6211
|
+
className: require_text_truncate.cn("mt-1.5 text-sm", require_text_truncate.OPT_TEXT_PRIMARY),
|
|
6212
6212
|
children: [
|
|
6213
6213
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6214
6214
|
className: "font-medium",
|
|
@@ -6242,7 +6242,7 @@ function AuditLog({ entries, onLoadMore, loading, labels: customLabels, classNam
|
|
|
6242
6242
|
type: "button",
|
|
6243
6243
|
onClick: onLoadMore,
|
|
6244
6244
|
disabled: loading,
|
|
6245
|
-
className:
|
|
6245
|
+
className: require_text_truncate.cn("text-accent mt-1 self-center rounded-md px-3 py-1.5 text-sm hover:underline disabled:opacity-50", "outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-ring-offset"),
|
|
6246
6246
|
children: loading ? labels.loading : labels.loadMore
|
|
6247
6247
|
})]
|
|
6248
6248
|
});
|
|
@@ -6272,7 +6272,7 @@ function TreeTable({ data, columns, defaultExpanded = [], indentSize = 24, class
|
|
|
6272
6272
|
return [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("tr", {
|
|
6273
6273
|
className: "border-border border-b",
|
|
6274
6274
|
children: columns.map((col, ci) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
|
|
6275
|
-
className:
|
|
6275
|
+
className: require_text_truncate.cn(require_text_truncate.OPT_TD),
|
|
6276
6276
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6277
6277
|
className: "flex items-center",
|
|
6278
6278
|
style: ci === 0 ? { paddingLeft: depth * indentSize } : void 0,
|
|
@@ -6280,7 +6280,7 @@ function TreeTable({ data, columns, defaultExpanded = [], indentSize = 24, class
|
|
|
6280
6280
|
ci === 0 && hasChildren && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
6281
6281
|
type: "button",
|
|
6282
6282
|
onClick: () => toggle(node.id),
|
|
6283
|
-
className:
|
|
6283
|
+
className: require_text_truncate.cn("mr-1 flex h-5 w-5 items-center justify-center rounded text-xs", "outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-ring-offset"),
|
|
6284
6284
|
"aria-expanded": isExpanded,
|
|
6285
6285
|
"aria-label": isExpanded ? "Collapse" : "Expand",
|
|
6286
6286
|
children: isExpanded ? "▼" : "▶"
|
|
@@ -6293,15 +6293,15 @@ function TreeTable({ data, columns, defaultExpanded = [], indentSize = 24, class
|
|
|
6293
6293
|
}, node.id), ...isExpanded && hasChildren ? renderRows(node.children, depth + 1) : []];
|
|
6294
6294
|
});
|
|
6295
6295
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
6296
|
-
className:
|
|
6296
|
+
className: require_text_truncate.cn("overflow-auto", className),
|
|
6297
6297
|
"data-opt-id": "EJRTW",
|
|
6298
6298
|
"data-opt-slug": "tree-table.TreeTable",
|
|
6299
6299
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("table", {
|
|
6300
|
-
className:
|
|
6300
|
+
className: require_text_truncate.cn("w-full border-collapse", require_text_truncate.OPT_BORDER),
|
|
6301
6301
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("thead", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tr", {
|
|
6302
6302
|
className: "border-border border-b",
|
|
6303
6303
|
children: columns.map((col) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", {
|
|
6304
|
-
className:
|
|
6304
|
+
className: require_text_truncate.cn(require_text_truncate.OPT_TH),
|
|
6305
6305
|
style: { width: col.width },
|
|
6306
6306
|
children: col.header
|
|
6307
6307
|
}, col.id))
|
|
@@ -6314,7 +6314,7 @@ function TreeTable({ data, columns, defaultExpanded = [], indentSize = 24, class
|
|
|
6314
6314
|
const defaultLabels$6 = { emptyMessage: "No rows to edit" };
|
|
6315
6315
|
/** Renders the inline edit table component. */
|
|
6316
6316
|
function InlineEditTable({ data, columns, keyExtractor, onCellEdit, labels: customLabels, className }) {
|
|
6317
|
-
const labels =
|
|
6317
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$6), customLabels);
|
|
6318
6318
|
const [editCell, setEditCell] = react.useState(null);
|
|
6319
6319
|
const [editValue, setEditValue] = react.useState("");
|
|
6320
6320
|
const inputRef = react.useRef(null);
|
|
@@ -6340,21 +6340,21 @@ function InlineEditTable({ data, columns, keyExtractor, onCellEdit, labels: cust
|
|
|
6340
6340
|
if (editCell) (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.focus();
|
|
6341
6341
|
}, [editCell]);
|
|
6342
6342
|
if (data.length === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
6343
|
-
className:
|
|
6343
|
+
className: require_text_truncate.cn("flex min-h-40 items-center justify-center", className),
|
|
6344
6344
|
"data-opt-id": "5W3J1",
|
|
6345
6345
|
"data-opt-slug": "inline-edit-table.InlineEditTable",
|
|
6346
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6346
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.EmptyState, { title: labels.emptyMessage })
|
|
6347
6347
|
});
|
|
6348
6348
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
6349
|
-
className:
|
|
6349
|
+
className: require_text_truncate.cn("overflow-auto", className),
|
|
6350
6350
|
"data-opt-id": "5W3J1",
|
|
6351
6351
|
"data-opt-slug": "inline-edit-table.InlineEditTable",
|
|
6352
6352
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("table", {
|
|
6353
|
-
className:
|
|
6353
|
+
className: require_text_truncate.cn("w-full border-collapse", require_text_truncate.OPT_BORDER),
|
|
6354
6354
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("thead", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tr", {
|
|
6355
6355
|
className: "border-border border-b",
|
|
6356
6356
|
children: columns.map((col) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", {
|
|
6357
|
-
className:
|
|
6357
|
+
className: require_text_truncate.cn(require_text_truncate.OPT_TH),
|
|
6358
6358
|
style: { width: col.width },
|
|
6359
6359
|
children: col.header
|
|
6360
6360
|
}, col.id))
|
|
@@ -6366,10 +6366,10 @@ function InlineEditTable({ data, columns, keyExtractor, onCellEdit, labels: cust
|
|
|
6366
6366
|
const isEditing = (editCell === null || editCell === void 0 ? void 0 : editCell.rowId) === rowId && (editCell === null || editCell === void 0 ? void 0 : editCell.colId) === col.id;
|
|
6367
6367
|
const value = getCellValue(row, col);
|
|
6368
6368
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
|
|
6369
|
-
className:
|
|
6369
|
+
className: require_text_truncate.cn(require_text_truncate.OPT_TD),
|
|
6370
6370
|
children: isEditing ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
6371
6371
|
ref: inputRef,
|
|
6372
|
-
className:
|
|
6372
|
+
className: require_text_truncate.cn("w-full rounded px-2 py-1 text-sm", require_text_truncate.OPT_INPUT),
|
|
6373
6373
|
value: editValue,
|
|
6374
6374
|
onChange: (e) => setEditValue(e.target.value),
|
|
6375
6375
|
onKeyDown: (e) => {
|
|
@@ -6428,14 +6428,14 @@ function KanbanBoard({ columns, onDragEnd, renderCard, keyExtractor, emptyMessag
|
|
|
6428
6428
|
setDragItem(null);
|
|
6429
6429
|
setDropTarget(null);
|
|
6430
6430
|
};
|
|
6431
|
-
if (columns.length === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6431
|
+
if (columns.length === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.EmptyState, {
|
|
6432
6432
|
title: emptyMessage,
|
|
6433
6433
|
className,
|
|
6434
6434
|
"data-opt-id": "T6JWY",
|
|
6435
6435
|
"data-opt-slug": "kanban-board.KanbanBoard"
|
|
6436
6436
|
});
|
|
6437
6437
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
6438
|
-
className:
|
|
6438
|
+
className: require_text_truncate.cn("gap-group flex overflow-x-auto", className),
|
|
6439
6439
|
"data-opt-id": "T6JWY",
|
|
6440
6440
|
"data-opt-slug": "kanban-board.KanbanBoard",
|
|
6441
6441
|
children: columns.map((col) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -6470,7 +6470,7 @@ function KanbanBoard({ columns, onDragEnd, renderCard, keyExtractor, emptyMessag
|
|
|
6470
6470
|
onDragOver: handleDragOver(col.id, i),
|
|
6471
6471
|
onDrop: handleDrop(col.id, i),
|
|
6472
6472
|
onDragEnd: handleDragEnd,
|
|
6473
|
-
className:
|
|
6473
|
+
className: require_text_truncate.cn("bg-surface border-border cursor-grab rounded-lg border p-3 shadow-sm transition-opacity", (dragItem === null || dragItem === void 0 ? void 0 : dragItem.id) === id && "opacity-50"),
|
|
6474
6474
|
children: renderCard(item)
|
|
6475
6475
|
})] }, id);
|
|
6476
6476
|
}), (dropTarget === null || dropTarget === void 0 ? void 0 : dropTarget.colId) === col.id && (dropTarget === null || dropTarget === void 0 ? void 0 : dropTarget.index) === col.items.length && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: "bg-accent h-0.5 rounded-full" })]
|
|
@@ -6562,7 +6562,7 @@ function RichTextEditor({ value, onChange, placeholder = "Write something…", t
|
|
|
6562
6562
|
}, 0);
|
|
6563
6563
|
};
|
|
6564
6564
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6565
|
-
className:
|
|
6565
|
+
className: require_text_truncate.cn("border-border flex flex-col overflow-hidden rounded-lg border", className),
|
|
6566
6566
|
"data-opt-id": "441JQ",
|
|
6567
6567
|
"data-opt-slug": "rich-text-editor.RichTextEditor",
|
|
6568
6568
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -6570,7 +6570,7 @@ function RichTextEditor({ value, onChange, placeholder = "Write something…", t
|
|
|
6570
6570
|
children: toolbar.map((action) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
6571
6571
|
type: "button",
|
|
6572
6572
|
onClick: () => applyFormat(action),
|
|
6573
|
-
className:
|
|
6573
|
+
className: require_text_truncate.cn("text-text-secondary hover:bg-surface hover:text-text-primary inline-flex h-7 min-w-7 items-center justify-center rounded px-1.5 text-xs font-medium", require_text_truncate.OPT_FOCUS_VISIBLE),
|
|
6574
6574
|
title: action,
|
|
6575
6575
|
"aria-label": action,
|
|
6576
6576
|
children: TOOLBAR_BUTTONS[action].label
|
|
@@ -6636,7 +6636,7 @@ const LINE_PREFIXES = {
|
|
|
6636
6636
|
function CodeDiffViewer({ original, modified, mode = "unified", showLineNumbers = true, scrollLabel, className }) {
|
|
6637
6637
|
const diff = react.useMemo(() => computeDiff(original, modified), [original, modified]);
|
|
6638
6638
|
if (mode === "split") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
6639
|
-
className:
|
|
6639
|
+
className: require_text_truncate.cn("border-border overflow-auto rounded-lg border", require_text_truncate.OPT_FOCUS_VISIBLE, className),
|
|
6640
6640
|
tabIndex: 0,
|
|
6641
6641
|
role: "region",
|
|
6642
6642
|
"aria-label": scrollLabel !== null && scrollLabel !== void 0 ? scrollLabel : "Code diff",
|
|
@@ -6652,7 +6652,7 @@ function CodeDiffViewer({ original, modified, mode = "unified", showLineNumbers
|
|
|
6652
6652
|
children: diff.filter((l) => l.type !== "add").map((line, i) => {
|
|
6653
6653
|
var _line$oldLineNo;
|
|
6654
6654
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6655
|
-
className:
|
|
6655
|
+
className: require_text_truncate.cn("px-3", LINE_STYLES[line.type]),
|
|
6656
6656
|
children: [
|
|
6657
6657
|
showLineNumbers && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6658
6658
|
className: "text-text-tertiary mr-4 inline-block w-8 text-right select-none",
|
|
@@ -6674,7 +6674,7 @@ function CodeDiffViewer({ original, modified, mode = "unified", showLineNumbers
|
|
|
6674
6674
|
children: diff.filter((l) => l.type !== "remove").map((line, i) => {
|
|
6675
6675
|
var _line$newLineNo;
|
|
6676
6676
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6677
|
-
className:
|
|
6677
|
+
className: require_text_truncate.cn("px-3", LINE_STYLES[line.type]),
|
|
6678
6678
|
children: [
|
|
6679
6679
|
showLineNumbers && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6680
6680
|
className: "text-text-tertiary mr-4 inline-block w-8 text-right select-none",
|
|
@@ -6692,7 +6692,7 @@ function CodeDiffViewer({ original, modified, mode = "unified", showLineNumbers
|
|
|
6692
6692
|
})
|
|
6693
6693
|
});
|
|
6694
6694
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
6695
|
-
className:
|
|
6695
|
+
className: require_text_truncate.cn("border-border overflow-auto rounded-lg border", require_text_truncate.OPT_FOCUS_VISIBLE, className),
|
|
6696
6696
|
tabIndex: 0,
|
|
6697
6697
|
role: "region",
|
|
6698
6698
|
"aria-label": scrollLabel !== null && scrollLabel !== void 0 ? scrollLabel : "Code diff",
|
|
@@ -6703,7 +6703,7 @@ function CodeDiffViewer({ original, modified, mode = "unified", showLineNumbers
|
|
|
6703
6703
|
children: diff.map((line, i) => {
|
|
6704
6704
|
var _line$oldLineNo2, _line$newLineNo2;
|
|
6705
6705
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6706
|
-
className:
|
|
6706
|
+
className: require_text_truncate.cn("px-3", LINE_STYLES[line.type]),
|
|
6707
6707
|
children: [
|
|
6708
6708
|
showLineNumbers && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6709
6709
|
className: "text-text-tertiary mr-2 inline-block w-8 text-right select-none",
|
|
@@ -6732,13 +6732,13 @@ const defaultLabels$5 = {
|
|
|
6732
6732
|
};
|
|
6733
6733
|
/** Renders the webhook config component. */
|
|
6734
6734
|
function WebhookConfig({ webhook, onChange, availableEvents, onTest, className, labels: customLabels }) {
|
|
6735
|
-
const labels =
|
|
6735
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$5), customLabels);
|
|
6736
6736
|
const toggleEvent = (event) => {
|
|
6737
6737
|
const events = webhook.events.includes(event) ? webhook.events.filter((e) => e !== event) : [...webhook.events, event];
|
|
6738
|
-
onChange(
|
|
6738
|
+
onChange(require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, webhook), {}, { events }));
|
|
6739
6739
|
};
|
|
6740
6740
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6741
|
-
className:
|
|
6741
|
+
className: require_text_truncate.cn("gap-group flex flex-col", className),
|
|
6742
6742
|
"data-opt-id": "B6B1Z",
|
|
6743
6743
|
"data-opt-slug": "webhook-config.WebhookConfig",
|
|
6744
6744
|
children: [
|
|
@@ -6747,9 +6747,9 @@ function WebhookConfig({ webhook, onChange, availableEvents, onTest, className,
|
|
|
6747
6747
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
|
|
6748
6748
|
className: "text-text-primary text-sm font-medium",
|
|
6749
6749
|
children: labels.webhookUrl
|
|
6750
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6750
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Input, {
|
|
6751
6751
|
value: webhook.url,
|
|
6752
|
-
onChange: (e) => onChange(
|
|
6752
|
+
onChange: (e) => onChange(require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, webhook), {}, { url: e.target.value })),
|
|
6753
6753
|
placeholder: "https://example.com/webhook"
|
|
6754
6754
|
})]
|
|
6755
6755
|
}),
|
|
@@ -6762,7 +6762,7 @@ function WebhookConfig({ webhook, onChange, availableEvents, onTest, className,
|
|
|
6762
6762
|
className: "gap-element flex flex-wrap",
|
|
6763
6763
|
children: availableEvents.length > 0 ? availableEvents.map((event) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
6764
6764
|
className: "flex items-center gap-1.5 text-sm",
|
|
6765
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6765
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Checkbox, {
|
|
6766
6766
|
name: `event-${event}`,
|
|
6767
6767
|
checked: webhook.events.includes(event),
|
|
6768
6768
|
onChange: () => toggleEvent(event)
|
|
@@ -6781,16 +6781,16 @@ function WebhookConfig({ webhook, onChange, availableEvents, onTest, className,
|
|
|
6781
6781
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
|
|
6782
6782
|
className: "text-text-primary text-sm font-medium",
|
|
6783
6783
|
children: labels.retries
|
|
6784
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6784
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.NumberInput, {
|
|
6785
6785
|
value: webhook.retries,
|
|
6786
|
-
onChange: (v) => onChange(
|
|
6786
|
+
onChange: (v) => onChange(require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, webhook), {}, { retries: v })),
|
|
6787
6787
|
min: 0,
|
|
6788
6788
|
max: 10
|
|
6789
6789
|
})]
|
|
6790
6790
|
}),
|
|
6791
6791
|
onTest && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
6792
6792
|
className: "flex justify-end",
|
|
6793
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6793
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Button, {
|
|
6794
6794
|
variant: "secondary",
|
|
6795
6795
|
onClick: onTest,
|
|
6796
6796
|
children: labels.testWebhook
|
|
@@ -6809,15 +6809,15 @@ const defaultLabels$4 = {
|
|
|
6809
6809
|
};
|
|
6810
6810
|
/** Renders the feature flag panel component. */
|
|
6811
6811
|
function FeatureFlagPanel({ flags, onToggle, onRolloutChange, environments, className, labels: customLabels }) {
|
|
6812
|
-
const labels =
|
|
6812
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$4), customLabels);
|
|
6813
6813
|
if (flags.length === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
6814
|
-
className:
|
|
6814
|
+
className: require_text_truncate.cn("text-text-tertiary text-sm", className),
|
|
6815
6815
|
"data-opt-id": "JW164",
|
|
6816
6816
|
"data-opt-slug": "feature-flag-panel.FeatureFlagPanel",
|
|
6817
6817
|
children: labels.emptyMessage
|
|
6818
6818
|
});
|
|
6819
6819
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
6820
|
-
className:
|
|
6820
|
+
className: require_text_truncate.cn("gap-group flex flex-col", className),
|
|
6821
6821
|
"data-opt-id": "JW164",
|
|
6822
6822
|
"data-opt-slug": "feature-flag-panel.FeatureFlagPanel",
|
|
6823
6823
|
children: flags.map((flag) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -6842,7 +6842,7 @@ function FeatureFlagPanel({ flags, onToggle, onRolloutChange, environments, clas
|
|
|
6842
6842
|
}),
|
|
6843
6843
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
6844
6844
|
className: "flex flex-wrap gap-1",
|
|
6845
|
-
children: environments.map((env) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6845
|
+
children: environments.map((env) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Badge, {
|
|
6846
6846
|
variant: flag.environments.includes(env) ? "success" : "default",
|
|
6847
6847
|
children: env
|
|
6848
6848
|
}, env))
|
|
@@ -6852,7 +6852,7 @@ function FeatureFlagPanel({ flags, onToggle, onRolloutChange, environments, clas
|
|
|
6852
6852
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6853
6853
|
className: "text-text-secondary text-xs",
|
|
6854
6854
|
children: labels.rolloutLabel
|
|
6855
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6855
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.NumberInput, {
|
|
6856
6856
|
value: flag.rolloutPercentage,
|
|
6857
6857
|
onChange: (v) => onRolloutChange(flag.id, v),
|
|
6858
6858
|
min: 0,
|
|
@@ -6868,7 +6868,7 @@ function FeatureFlagPanel({ flags, onToggle, onRolloutChange, environments, clas
|
|
|
6868
6868
|
//#region src/shells/data-import-wizard.tsx
|
|
6869
6869
|
/** Renders the data import wizard component. */
|
|
6870
6870
|
function DataImportWizard({ fields, onImport, acceptedFormats = ".csv", labels: customLabels, className }) {
|
|
6871
|
-
const labels =
|
|
6871
|
+
const labels = require_text_truncate._objectSpread2({
|
|
6872
6872
|
stepsLabel: "Import steps",
|
|
6873
6873
|
upload: "Upload",
|
|
6874
6874
|
mapColumns: "Map Columns",
|
|
@@ -6910,7 +6910,7 @@ function DataImportWizard({ fields, onImport, acceptedFormats = ".csv", labels:
|
|
|
6910
6910
|
labels.confirm
|
|
6911
6911
|
];
|
|
6912
6912
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6913
|
-
className:
|
|
6913
|
+
className: require_text_truncate.cn("gap-group flex flex-col", className),
|
|
6914
6914
|
"data-opt-id": "QD9XR",
|
|
6915
6915
|
"data-opt-slug": "data-import-wizard.DataImportWizard",
|
|
6916
6916
|
children: [
|
|
@@ -6923,11 +6923,11 @@ function DataImportWizard({ fields, onImport, acceptedFormats = ".csv", labels:
|
|
|
6923
6923
|
children: [
|
|
6924
6924
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
6925
6925
|
"aria-hidden": "true",
|
|
6926
|
-
className:
|
|
6926
|
+
className: require_text_truncate.cn("flex h-6 w-6 items-center justify-center rounded-full text-xs font-medium", i <= step ? "bg-accent text-accent-fg" : "bg-bg-subtle text-text-tertiary"),
|
|
6927
6927
|
children: i + 1
|
|
6928
6928
|
}),
|
|
6929
6929
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6930
|
-
className:
|
|
6930
|
+
className: require_text_truncate.cn("text-xs", i <= step ? "text-text-primary" : "text-text-tertiary"),
|
|
6931
6931
|
children: s
|
|
6932
6932
|
}),
|
|
6933
6933
|
i < steps.length - 1 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -6963,7 +6963,7 @@ function DataImportWizard({ fields, onImport, acceptedFormats = ".csv", labels:
|
|
|
6963
6963
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
6964
6964
|
className: "border-border bg-surface text-text-primary rounded-md border px-2 py-1 text-sm",
|
|
6965
6965
|
value: mapping[field.id] || "",
|
|
6966
|
-
onChange: (e) => setMapping(
|
|
6966
|
+
onChange: (e) => setMapping(require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, mapping), {}, { [field.id]: e.target.value })),
|
|
6967
6967
|
"aria-label": `Map ${field.label}`,
|
|
6968
6968
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
6969
6969
|
value: "",
|
|
@@ -6975,11 +6975,11 @@ function DataImportWizard({ fields, onImport, acceptedFormats = ".csv", labels:
|
|
|
6975
6975
|
})]
|
|
6976
6976
|
}, field.id)), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6977
6977
|
className: "gap-element flex justify-end",
|
|
6978
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6978
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Button, {
|
|
6979
6979
|
variant: "secondary",
|
|
6980
6980
|
onClick: () => setStep(0),
|
|
6981
6981
|
children: labels.back
|
|
6982
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6982
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Button, {
|
|
6983
6983
|
onClick: () => setStep(2),
|
|
6984
6984
|
children: labels.next
|
|
6985
6985
|
})]
|
|
@@ -7013,11 +7013,11 @@ function DataImportWizard({ fields, onImport, acceptedFormats = ".csv", labels:
|
|
|
7013
7013
|
}),
|
|
7014
7014
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
7015
7015
|
className: "gap-element flex justify-end",
|
|
7016
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
7016
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Button, {
|
|
7017
7017
|
variant: "secondary",
|
|
7018
7018
|
onClick: () => setStep(1),
|
|
7019
7019
|
children: labels.back
|
|
7020
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
7020
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Button, {
|
|
7021
7021
|
onClick: () => setStep(3),
|
|
7022
7022
|
children: labels.next
|
|
7023
7023
|
})]
|
|
@@ -7031,11 +7031,11 @@ function DataImportWizard({ fields, onImport, acceptedFormats = ".csv", labels:
|
|
|
7031
7031
|
children: labels.confirmSummary(rows.length, Object.keys(mapping).length)
|
|
7032
7032
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
7033
7033
|
className: "gap-element flex",
|
|
7034
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
7034
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Button, {
|
|
7035
7035
|
variant: "secondary",
|
|
7036
7036
|
onClick: () => setStep(2),
|
|
7037
7037
|
children: labels.back
|
|
7038
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
7038
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Button, {
|
|
7039
7039
|
onClick: () => onImport(mapping, rows),
|
|
7040
7040
|
children: labels.import
|
|
7041
7041
|
})]
|
|
@@ -7049,14 +7049,14 @@ function DataImportWizard({ fields, onImport, acceptedFormats = ".csv", labels:
|
|
|
7049
7049
|
const defaultLabels$3 = { trigger: "Menu" };
|
|
7050
7050
|
/** Renders the mega menu component. */
|
|
7051
7051
|
function MegaMenu({ menus, columns = 3, footer, triggerLabel, labels: customLabels, className }) {
|
|
7052
|
-
const labels =
|
|
7052
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$3), customLabels);
|
|
7053
7053
|
const resolvedTriggerLabel = triggerLabel !== null && triggerLabel !== void 0 ? triggerLabel : labels.trigger;
|
|
7054
7054
|
if (menus.length === 0) return null;
|
|
7055
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
7055
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.PopoverRoot, {
|
|
7056
7056
|
"data-opt-id": "42177",
|
|
7057
7057
|
"data-opt-slug": "mega-menu.MegaMenu",
|
|
7058
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
7059
|
-
className:
|
|
7058
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.PopoverTrigger, {
|
|
7059
|
+
className: require_text_truncate.cn("border-border bg-surface text-text-primary hover:bg-bg-subtle inline-flex h-9 items-center gap-1.5 rounded-lg border px-3 text-sm font-medium", className),
|
|
7060
7060
|
children: [resolvedTriggerLabel, /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
|
|
7061
7061
|
width: "12",
|
|
7062
7062
|
height: "12",
|
|
@@ -7066,7 +7066,7 @@ function MegaMenu({ menus, columns = 3, footer, triggerLabel, labels: customLabe
|
|
|
7066
7066
|
strokeWidth: "1.5",
|
|
7067
7067
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M3 5l3 3 3-3" })
|
|
7068
7068
|
})]
|
|
7069
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
7069
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.PopoverContent, {
|
|
7070
7070
|
className: "w-auto max-w-2xl p-0",
|
|
7071
7071
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
7072
7072
|
className: "gap-group grid p-4",
|
|
@@ -7112,7 +7112,7 @@ const defaultLabels$2 = {
|
|
|
7112
7112
|
};
|
|
7113
7113
|
/** Renders the chat sidebar component. */
|
|
7114
7114
|
function ChatSidebar({ conversations, activeConversationId, onConversationSelect, onNewChat, onSearch, labels: customLabels, className }) {
|
|
7115
|
-
const labels =
|
|
7115
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$2), customLabels);
|
|
7116
7116
|
const [searchQuery, setSearchQuery] = (0, react.useState)("");
|
|
7117
7117
|
const [isHydrated, setIsHydrated] = (0, react.useState)(false);
|
|
7118
7118
|
(0, react.useEffect)(() => {
|
|
@@ -7127,11 +7127,11 @@ function ChatSidebar({ conversations, activeConversationId, onConversationSelect
|
|
|
7127
7127
|
return c.title.toLowerCase().includes(searchQuery.toLowerCase()) || ((_c$lastMessage = c.lastMessage) === null || _c$lastMessage === void 0 ? void 0 : _c$lastMessage.toLowerCase().includes(searchQuery.toLowerCase()));
|
|
7128
7128
|
}) : conversations;
|
|
7129
7129
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
7130
|
-
className:
|
|
7130
|
+
className: require_text_truncate.cn("gap-group flex h-full flex-col", className),
|
|
7131
7131
|
"data-opt-id": "TBVMY",
|
|
7132
7132
|
"data-opt-slug": "chat-sidebar.ChatSidebar",
|
|
7133
7133
|
children: [
|
|
7134
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
7134
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.Button, {
|
|
7135
7135
|
onClick: onNewChat,
|
|
7136
7136
|
className: "w-full",
|
|
7137
7137
|
size: "sm",
|
|
@@ -7160,14 +7160,14 @@ function ChatSidebar({ conversations, activeConversationId, onConversationSelect
|
|
|
7160
7160
|
})]
|
|
7161
7161
|
}), labels.newChat]
|
|
7162
7162
|
}),
|
|
7163
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
7163
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Input, {
|
|
7164
7164
|
placeholder: labels.searchPlaceholder,
|
|
7165
7165
|
value: searchQuery,
|
|
7166
7166
|
onChange: (e) => handleSearch(e.target.value),
|
|
7167
7167
|
size: "sm",
|
|
7168
7168
|
"aria-label": labels.searchPlaceholder
|
|
7169
7169
|
}),
|
|
7170
|
-
filtered.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
7170
|
+
filtered.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.EmptyState, {
|
|
7171
7171
|
title: labels.emptyTitle,
|
|
7172
7172
|
description: labels.emptyDescription
|
|
7173
7173
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_key_pad_menu.ScrollArea, {
|
|
@@ -7183,25 +7183,25 @@ function ChatSidebar({ conversations, activeConversationId, onConversationSelect
|
|
|
7183
7183
|
role: "option",
|
|
7184
7184
|
"aria-selected": isActive,
|
|
7185
7185
|
onClick: () => onConversationSelect === null || onConversationSelect === void 0 ? void 0 : onConversationSelect(conversation),
|
|
7186
|
-
className:
|
|
7186
|
+
className: require_text_truncate.cn("relative rounded-lg px-3 py-2.5 text-left transition-colors", require_text_truncate.OPT_FOCUS_VISIBLE, isActive ? "bg-accent-subtle" : "hover:bg-bg-subtle"),
|
|
7187
7187
|
children: [
|
|
7188
7188
|
isActive && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: "bg-accent absolute top-1/2 left-0 h-5 w-0.5 -translate-y-1/2 rounded-full" }),
|
|
7189
7189
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
7190
7190
|
className: "gap-element flex items-start justify-between",
|
|
7191
7191
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
7192
|
-
className:
|
|
7192
|
+
className: require_text_truncate.cn("truncate text-sm font-medium", isActive ? "text-accent" : require_text_truncate.OPT_TEXT_PRIMARY),
|
|
7193
7193
|
children: conversation.title
|
|
7194
7194
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
7195
7195
|
className: "flex shrink-0 items-center gap-1.5",
|
|
7196
7196
|
children: [conversation.unread && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: "bg-accent h-2 w-2 rounded-full" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("time", {
|
|
7197
|
-
className:
|
|
7197
|
+
className: require_text_truncate.cn("text-[11px]", require_text_truncate.OPT_TEXT_TERTIARY),
|
|
7198
7198
|
dateTime: conversation.timestamp,
|
|
7199
7199
|
children: formatTimestamp(conversation.timestamp, isHydrated ? /* @__PURE__ */ new Date() : null)
|
|
7200
7200
|
})]
|
|
7201
7201
|
})]
|
|
7202
7202
|
}),
|
|
7203
7203
|
conversation.lastMessage && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
7204
|
-
className:
|
|
7204
|
+
className: require_text_truncate.cn("mt-0.5 truncate text-xs", "text-text-secondary"),
|
|
7205
7205
|
children: conversation.lastMessage
|
|
7206
7206
|
})
|
|
7207
7207
|
]
|
|
@@ -7237,8 +7237,8 @@ const defaultLabels$1 = {
|
|
|
7237
7237
|
/** Renders the chat input component. */
|
|
7238
7238
|
function ChatInput({ value: controlledValue, defaultValue = "", onChange, onSend, onFileAttach, models, selectedModel, onModelChange, stylePresets, selectedStyle, onStyleChange, disabled = false, maxRows = 6, showHint = true, labels: customLabels, className }) {
|
|
7239
7239
|
var _models$, _models$find$label, _models$find, _stylePresets$, _stylePresets$find$la, _stylePresets$find;
|
|
7240
|
-
const labels =
|
|
7241
|
-
const [value, setValue] =
|
|
7240
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$1), customLabels);
|
|
7241
|
+
const [value, setValue] = require_text_truncate.useControlledState(defaultValue, controlledValue, onChange);
|
|
7242
7242
|
const textareaRef = (0, react.useRef)(null);
|
|
7243
7243
|
const hasToolbar = models && models.length > 0 || stylePresets && stylePresets.length > 0;
|
|
7244
7244
|
(0, react.useLayoutEffect)(() => {
|
|
@@ -7266,48 +7266,48 @@ function ChatInput({ value: controlledValue, defaultValue = "", onChange, onSend
|
|
|
7266
7266
|
}
|
|
7267
7267
|
}, [handleSend]);
|
|
7268
7268
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
7269
|
-
className:
|
|
7269
|
+
className: require_text_truncate.cn("gap-element flex flex-col", className),
|
|
7270
7270
|
"data-opt-id": "M8KX1",
|
|
7271
7271
|
"data-opt-slug": "chat-input.ChatInput",
|
|
7272
7272
|
children: [hasToolbar && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
7273
7273
|
className: "gap-element flex items-center",
|
|
7274
|
-
children: [models && models.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
7274
|
+
children: [models && models.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.SelectRoot, {
|
|
7275
7275
|
value: selectedModel !== null && selectedModel !== void 0 ? selectedModel : (_models$ = models[0]) === null || _models$ === void 0 ? void 0 : _models$.id,
|
|
7276
7276
|
onValueChange: (v) => onModelChange === null || onModelChange === void 0 ? void 0 : onModelChange(v),
|
|
7277
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
7277
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.SelectTrigger, {
|
|
7278
7278
|
minWidth: 120,
|
|
7279
7279
|
className: "h-8 text-xs",
|
|
7280
7280
|
children: (_models$find$label = (_models$find = models.find((m) => {
|
|
7281
7281
|
var _models$2;
|
|
7282
7282
|
return m.id === (selectedModel !== null && selectedModel !== void 0 ? selectedModel : (_models$2 = models[0]) === null || _models$2 === void 0 ? void 0 : _models$2.id);
|
|
7283
7283
|
})) === null || _models$find === void 0 ? void 0 : _models$find.label) !== null && _models$find$label !== void 0 ? _models$find$label : labels.modelLabel
|
|
7284
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
7284
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.SelectPopover, { children: models.map((model) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.SelectItem, {
|
|
7285
7285
|
value: model.id,
|
|
7286
7286
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
7287
7287
|
className: "text-sm",
|
|
7288
7288
|
children: model.label
|
|
7289
7289
|
}), model.description && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
7290
|
-
className:
|
|
7290
|
+
className: require_text_truncate.cn("text-xs", "text-text-tertiary"),
|
|
7291
7291
|
children: model.description
|
|
7292
7292
|
})] })
|
|
7293
7293
|
}, model.id)) })]
|
|
7294
|
-
}), stylePresets && stylePresets.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
7294
|
+
}), stylePresets && stylePresets.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.SelectRoot, {
|
|
7295
7295
|
value: selectedStyle !== null && selectedStyle !== void 0 ? selectedStyle : (_stylePresets$ = stylePresets[0]) === null || _stylePresets$ === void 0 ? void 0 : _stylePresets$.id,
|
|
7296
7296
|
onValueChange: (v) => onStyleChange === null || onStyleChange === void 0 ? void 0 : onStyleChange(v),
|
|
7297
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
7297
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.SelectTrigger, {
|
|
7298
7298
|
minWidth: 100,
|
|
7299
7299
|
className: "h-8 text-xs",
|
|
7300
7300
|
children: (_stylePresets$find$la = (_stylePresets$find = stylePresets.find((s) => {
|
|
7301
7301
|
var _stylePresets$2;
|
|
7302
7302
|
return s.id === (selectedStyle !== null && selectedStyle !== void 0 ? selectedStyle : (_stylePresets$2 = stylePresets[0]) === null || _stylePresets$2 === void 0 ? void 0 : _stylePresets$2.id);
|
|
7303
7303
|
})) === null || _stylePresets$find === void 0 ? void 0 : _stylePresets$find.label) !== null && _stylePresets$find$la !== void 0 ? _stylePresets$find$la : labels.styleLabel
|
|
7304
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
7304
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.SelectPopover, { children: stylePresets.map((preset) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.SelectItem, {
|
|
7305
7305
|
value: preset.id,
|
|
7306
7306
|
children: preset.label
|
|
7307
7307
|
}, preset.id)) })]
|
|
7308
7308
|
})]
|
|
7309
7309
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
7310
|
-
className:
|
|
7310
|
+
className: require_text_truncate.cn("bg-surface rounded-lg", require_text_truncate.OPT_BORDER, "focus-within:ring-ring focus-within:ring-offset-ring-offset focus-within:ring-2 focus-within:ring-offset-1"),
|
|
7311
7311
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
|
|
7312
7312
|
ref: textareaRef,
|
|
7313
7313
|
value,
|
|
@@ -7316,14 +7316,14 @@ function ChatInput({ value: controlledValue, defaultValue = "", onChange, onSend
|
|
|
7316
7316
|
placeholder: labels.placeholder,
|
|
7317
7317
|
disabled,
|
|
7318
7318
|
rows: 1,
|
|
7319
|
-
className:
|
|
7319
|
+
className: require_text_truncate.cn("text-text-primary placeholder:text-text-tertiary focus-visible:ring-ring focus-visible:ring-offset-ring-offset w-full resize-none border-none bg-transparent px-4 pt-3 pb-2 text-sm outline-none focus-visible:ring-2 focus-visible:ring-offset-1", "disabled:cursor-not-allowed disabled:opacity-50"),
|
|
7320
7320
|
"aria-label": labels.placeholder
|
|
7321
7321
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
7322
7322
|
className: "flex items-center justify-between px-3 pb-2",
|
|
7323
7323
|
children: [
|
|
7324
7324
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
7325
7325
|
className: "flex items-center gap-1",
|
|
7326
|
-
children: onFileAttach && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
7326
|
+
children: onFileAttach && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Button, {
|
|
7327
7327
|
variant: "ghost",
|
|
7328
7328
|
size: "sm",
|
|
7329
7329
|
onClick: onFileAttach,
|
|
@@ -7346,14 +7346,14 @@ function ChatInput({ value: controlledValue, defaultValue = "", onChange, onSend
|
|
|
7346
7346
|
})
|
|
7347
7347
|
}),
|
|
7348
7348
|
showHint && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
7349
|
-
className:
|
|
7349
|
+
className: require_text_truncate.cn("flex items-center gap-1 text-xs", "text-text-tertiary"),
|
|
7350
7350
|
children: [
|
|
7351
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
7352
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
7351
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Kbd, { children: labels.shiftKey }),
|
|
7352
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.Kbd, { children: labels.enterKey }),
|
|
7353
7353
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: labels.hint })
|
|
7354
7354
|
]
|
|
7355
7355
|
}),
|
|
7356
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
7356
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.Button, {
|
|
7357
7357
|
size: "sm",
|
|
7358
7358
|
onClick: handleSend,
|
|
7359
7359
|
disabled: disabled || !value.trim(),
|
|
@@ -7396,7 +7396,7 @@ const defaultLabels = {
|
|
|
7396
7396
|
};
|
|
7397
7397
|
/** Renders the chat message list component. */
|
|
7398
7398
|
function ChatMessageList({ messages, loading = false, renderContent, assistantAvatar, userName, showTimestamps = true, autoScroll = true, labels: customLabels, className }) {
|
|
7399
|
-
const labels =
|
|
7399
|
+
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels), customLabels), userName ? { userLabel: userName } : {});
|
|
7400
7400
|
const scrollRef = (0, react.useRef)(null);
|
|
7401
7401
|
const [isUserScrolledUp, setIsUserScrolledUp] = (0, react.useState)(false);
|
|
7402
7402
|
const scrollToBottom = (0, react.useCallback)(() => {
|
|
@@ -7420,16 +7420,16 @@ function ChatMessageList({ messages, loading = false, renderContent, assistantAv
|
|
|
7420
7420
|
scrollToBottom
|
|
7421
7421
|
]);
|
|
7422
7422
|
if (messages.length === 0 && !loading) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
7423
|
-
className:
|
|
7423
|
+
className: require_text_truncate.cn("flex flex-1 items-center justify-center", className),
|
|
7424
7424
|
"data-opt-id": "YK725",
|
|
7425
7425
|
"data-opt-slug": "chat-message-list.ChatMessageList",
|
|
7426
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
7426
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.EmptyState, {
|
|
7427
7427
|
title: labels.emptyTitle,
|
|
7428
7428
|
description: labels.emptyDescription
|
|
7429
7429
|
})
|
|
7430
7430
|
});
|
|
7431
7431
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_key_pad_menu.ScrollArea, {
|
|
7432
|
-
className:
|
|
7432
|
+
className: require_text_truncate.cn("flex-1", className),
|
|
7433
7433
|
"data-opt-id": "YK725",
|
|
7434
7434
|
"data-opt-slug": "chat-message-list.ChatMessageList",
|
|
7435
7435
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -7442,20 +7442,20 @@ function ChatMessageList({ messages, loading = false, renderContent, assistantAv
|
|
|
7442
7442
|
children: [messages.map((message) => {
|
|
7443
7443
|
const isUser = message.role === "user";
|
|
7444
7444
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
7445
|
-
className:
|
|
7445
|
+
className: require_text_truncate.cn("gap-element flex", isUser ? "flex-row-reverse" : "flex-row"),
|
|
7446
7446
|
children: [!isUser && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_key_pad_menu.Avatar, {
|
|
7447
7447
|
name: labels.assistantLabel,
|
|
7448
7448
|
src: assistantAvatar,
|
|
7449
7449
|
size: "sm",
|
|
7450
7450
|
className: "mt-1 shrink-0"
|
|
7451
7451
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
7452
|
-
className:
|
|
7452
|
+
className: require_text_truncate.cn("max-w-[80%] rounded-2xl px-4 py-2.5", isUser ? "bg-accent text-accent-fg rounded-tr-sm" : "bg-surface-input text-text-primary rounded-tl-sm"),
|
|
7453
7453
|
children: [renderContent ? renderContent(message) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
7454
7454
|
className: "text-sm whitespace-pre-wrap",
|
|
7455
7455
|
children: message.content
|
|
7456
7456
|
}), showTimestamps && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("time", {
|
|
7457
7457
|
dateTime: message.timestamp,
|
|
7458
|
-
className:
|
|
7458
|
+
className: require_text_truncate.cn("mt-1 block text-[11px]", isUser ? "text-accent-fg/70" : "text-text-tertiary"),
|
|
7459
7459
|
children: formatMessageTime(message.timestamp)
|
|
7460
7460
|
})]
|
|
7461
7461
|
})]
|
|
@@ -8031,12 +8031,12 @@ components/
|
|
|
8031
8031
|
}
|
|
8032
8032
|
/** Renders the design guide panel component. */
|
|
8033
8033
|
function DesignGuidePanel({ className }) {
|
|
8034
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
8034
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.DisclosureRoot, {
|
|
8035
8035
|
"data-opt-id": "65F6W",
|
|
8036
8036
|
"data-opt-slug": "design-guide-panel.DesignGuidePanel",
|
|
8037
8037
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
8038
|
-
className:
|
|
8039
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(
|
|
8038
|
+
className: require_text_truncate.cn("border-border bg-surface rounded-xl border", className),
|
|
8039
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.DisclosureTrigger, {
|
|
8040
8040
|
className: "hover:bg-bg-subtle data-[focus-visible]:ring-ring flex w-full items-center justify-between px-5 py-4 text-left transition-colors outline-none data-[focus-visible]:ring-2 data-[focus-visible]:ring-inset",
|
|
8041
8041
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h2", {
|
|
8042
8042
|
className: "text-text-primary text-sm font-semibold",
|
|
@@ -8056,7 +8056,7 @@ function DesignGuidePanel({ className }) {
|
|
|
8056
8056
|
d: "m19.5 8.25-7.5 7.5-7.5-7.5"
|
|
8057
8057
|
})
|
|
8058
8058
|
})]
|
|
8059
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
8059
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.DisclosureContent, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
8060
8060
|
className: "border-border gap-section flex flex-col border-t px-5 py-5",
|
|
8061
8061
|
children: [
|
|
8062
8062
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(PrimitiveComponentMap, {}),
|
|
@@ -8362,9 +8362,9 @@ exports.AccordionItem = require_key_pad_menu.AccordionItem;
|
|
|
8362
8362
|
exports.AccordionRoot = require_key_pad_menu.AccordionRoot;
|
|
8363
8363
|
exports.AccordionTrigger = require_key_pad_menu.AccordionTrigger;
|
|
8364
8364
|
exports.ActivityFeed = ActivityFeed;
|
|
8365
|
-
exports.Alert =
|
|
8365
|
+
exports.Alert = require_text_truncate.Alert;
|
|
8366
8366
|
exports.AlertBuilder = AlertBuilder;
|
|
8367
|
-
exports.AlertDialogPanel =
|
|
8367
|
+
exports.AlertDialogPanel = require_text_truncate.AlertDialogPanel;
|
|
8368
8368
|
exports.AppMenubar = require_field_sidebar.AppMenubar;
|
|
8369
8369
|
exports.AppShell = AppShell;
|
|
8370
8370
|
exports.AsyncCombobox = AsyncCombobox;
|
|
@@ -8373,12 +8373,12 @@ exports.AuditTimeline = AuditTimeline;
|
|
|
8373
8373
|
exports.AuthForm = AuthForm;
|
|
8374
8374
|
exports.Avatar = require_key_pad_menu.Avatar;
|
|
8375
8375
|
exports.AvatarGroup = require_key_pad_menu.AvatarGroup;
|
|
8376
|
-
exports.Badge =
|
|
8376
|
+
exports.Badge = require_text_truncate.Badge;
|
|
8377
8377
|
exports.BlockLayout = require_key_pad_menu.BlockLayout;
|
|
8378
8378
|
exports.BranchSelect = require_field_sidebar.BranchSelect;
|
|
8379
8379
|
exports.Breadcrumb = require_key_pad_menu.Breadcrumb;
|
|
8380
8380
|
exports.BulkActions = BulkActions;
|
|
8381
|
-
exports.Button =
|
|
8381
|
+
exports.Button = require_text_truncate.Button;
|
|
8382
8382
|
exports.COLOR_PRESETS = COLOR_PRESETS;
|
|
8383
8383
|
exports.Card = require_key_pad_menu.Card;
|
|
8384
8384
|
exports.CardContent = require_key_pad_menu.CardContent;
|
|
@@ -8389,22 +8389,22 @@ exports.CardTitle = require_key_pad_menu.CardTitle;
|
|
|
8389
8389
|
exports.ChatInput = ChatInput;
|
|
8390
8390
|
exports.ChatMessageList = ChatMessageList;
|
|
8391
8391
|
exports.ChatSidebar = ChatSidebar;
|
|
8392
|
-
exports.Checkbox =
|
|
8393
|
-
exports.CheckboxGroup =
|
|
8392
|
+
exports.Checkbox = require_text_truncate.Checkbox;
|
|
8393
|
+
exports.CheckboxGroup = require_text_truncate.CheckboxGroup;
|
|
8394
8394
|
exports.CircularProgress = require_key_pad_menu.CircularProgress;
|
|
8395
8395
|
exports.CodeDiffViewer = CodeDiffViewer;
|
|
8396
8396
|
exports.CodeSnippetViewer = CodeSnippetViewer;
|
|
8397
8397
|
exports.ColorPaletteDisplay = require_key_pad_menu.ColorPaletteDisplay;
|
|
8398
8398
|
exports.ColorPalettePicker = require_key_pad_menu.ColorPalettePicker;
|
|
8399
|
-
exports.ColorPicker =
|
|
8399
|
+
exports.ColorPicker = require_text_truncate.ColorPicker;
|
|
8400
8400
|
exports.ColumnToggler = ColumnToggler;
|
|
8401
|
-
exports.ComboboxEmpty =
|
|
8402
|
-
exports.ComboboxGroup =
|
|
8403
|
-
exports.ComboboxGroupLabel =
|
|
8404
|
-
exports.ComboboxInput =
|
|
8405
|
-
exports.ComboboxItem =
|
|
8406
|
-
exports.ComboboxPopover =
|
|
8407
|
-
exports.ComboboxRoot =
|
|
8401
|
+
exports.ComboboxEmpty = require_text_truncate.ComboboxEmpty;
|
|
8402
|
+
exports.ComboboxGroup = require_text_truncate.ComboboxGroup;
|
|
8403
|
+
exports.ComboboxGroupLabel = require_text_truncate.ComboboxGroupLabel;
|
|
8404
|
+
exports.ComboboxInput = require_text_truncate.ComboboxInput;
|
|
8405
|
+
exports.ComboboxItem = require_text_truncate.ComboboxItem;
|
|
8406
|
+
exports.ComboboxPopover = require_text_truncate.ComboboxPopover;
|
|
8407
|
+
exports.ComboboxRoot = require_text_truncate.ComboboxRoot;
|
|
8408
8408
|
exports.Command = require_field_sidebar.Command;
|
|
8409
8409
|
exports.CommandDialog = require_field_sidebar.CommandDialog;
|
|
8410
8410
|
exports.CommandEmpty = require_field_sidebar.CommandEmpty;
|
|
@@ -8421,32 +8421,32 @@ exports.Composite = _reopt_ai_opt_ui_primitives.Composite;
|
|
|
8421
8421
|
exports.CompositeItem = _reopt_ai_opt_ui_primitives.CompositeItem;
|
|
8422
8422
|
exports.CompositeProvider = _reopt_ai_opt_ui_primitives.CompositeProvider;
|
|
8423
8423
|
exports.CompositeRow = _reopt_ai_opt_ui_primitives.CompositeRow;
|
|
8424
|
-
exports.CompositeZone =
|
|
8424
|
+
exports.CompositeZone = require_text_truncate.CompositeZone;
|
|
8425
8425
|
exports.ConditionBuilder = require_key_pad_menu.ConditionBuilder;
|
|
8426
8426
|
exports.ConfirmDialog = ConfirmDialog;
|
|
8427
8427
|
exports.ConnectionIndicator = ConnectionIndicator;
|
|
8428
8428
|
exports.Container = require_key_pad_menu.Container;
|
|
8429
8429
|
exports.ContentTabs = require_field_sidebar.ContentTabs;
|
|
8430
|
-
exports.DEFAULT_PRESETS =
|
|
8430
|
+
exports.DEFAULT_PRESETS = require_text_truncate.DEFAULT_PRESETS;
|
|
8431
8431
|
exports.DEFAULT_TIME_PRESETS = require_field_sidebar.DEFAULT_TIME_PRESETS;
|
|
8432
8432
|
exports.DashboardGrid = require_field_sidebar.DashboardGrid;
|
|
8433
8433
|
exports.DataImportWizard = DataImportWizard;
|
|
8434
8434
|
exports.DataTable = require_field_sidebar.DataTable;
|
|
8435
|
-
exports.DateRangePicker =
|
|
8435
|
+
exports.DateRangePicker = require_text_truncate.DateRangePicker;
|
|
8436
8436
|
exports.DeploymentTimeline = require_field_sidebar.DeploymentTimeline;
|
|
8437
8437
|
exports.DesignGuidePanel = DesignGuidePanel;
|
|
8438
|
-
exports.DialogBody =
|
|
8439
|
-
exports.DialogDescription =
|
|
8440
|
-
exports.DialogDisclosure =
|
|
8441
|
-
exports.DialogDismiss =
|
|
8442
|
-
exports.DialogFooter =
|
|
8443
|
-
exports.DialogHeader =
|
|
8444
|
-
exports.DialogHeading =
|
|
8445
|
-
exports.DialogPanel =
|
|
8446
|
-
exports.DialogRoot =
|
|
8447
|
-
exports.DisclosureContent =
|
|
8448
|
-
exports.DisclosureRoot =
|
|
8449
|
-
exports.DisclosureTrigger =
|
|
8438
|
+
exports.DialogBody = require_text_truncate.DialogBody;
|
|
8439
|
+
exports.DialogDescription = require_text_truncate.DialogDescription;
|
|
8440
|
+
exports.DialogDisclosure = require_text_truncate.DialogDisclosure;
|
|
8441
|
+
exports.DialogDismiss = require_text_truncate.DialogDismiss;
|
|
8442
|
+
exports.DialogFooter = require_text_truncate.DialogFooter;
|
|
8443
|
+
exports.DialogHeader = require_text_truncate.DialogHeader;
|
|
8444
|
+
exports.DialogHeading = require_text_truncate.DialogHeading;
|
|
8445
|
+
exports.DialogPanel = require_text_truncate.DialogPanel;
|
|
8446
|
+
exports.DialogRoot = require_text_truncate.DialogRoot;
|
|
8447
|
+
exports.DisclosureContent = require_text_truncate.DisclosureContent;
|
|
8448
|
+
exports.DisclosureRoot = require_text_truncate.DisclosureRoot;
|
|
8449
|
+
exports.DisclosureTrigger = require_text_truncate.DisclosureTrigger;
|
|
8450
8450
|
exports.DomainTable = require_field_sidebar.DomainTable;
|
|
8451
8451
|
exports.DrawerClose = require_key_pad_menu.DrawerClose;
|
|
8452
8452
|
exports.DrawerPanel = require_key_pad_menu.DrawerPanel;
|
|
@@ -8459,7 +8459,7 @@ exports.DropdownTrigger = require_key_pad_menu.DropdownTrigger;
|
|
|
8459
8459
|
exports.DynamicFieldForm = DynamicFieldForm;
|
|
8460
8460
|
exports.EMPTY_QUERY = require_field_sidebar.EMPTY_QUERY;
|
|
8461
8461
|
exports.EditorToolbar = require_field_sidebar.EditorToolbar;
|
|
8462
|
-
exports.EmptyState =
|
|
8462
|
+
exports.EmptyState = require_text_truncate.EmptyState;
|
|
8463
8463
|
exports.EnvPanel = require_field_sidebar.EnvPanel;
|
|
8464
8464
|
exports.ErrorBoundary = ErrorBoundary;
|
|
8465
8465
|
exports.EventIcon = EventIcon;
|
|
@@ -8473,7 +8473,7 @@ Object.defineProperty(exports, "EventSparkline", {
|
|
|
8473
8473
|
exports.ExportButton = ExportButton;
|
|
8474
8474
|
exports.Expression = require_key_pad_menu.Expression;
|
|
8475
8475
|
exports.ExpressionGroup = require_key_pad_menu.ExpressionGroup;
|
|
8476
|
-
exports.FIELD_TYPE_TOKENS =
|
|
8476
|
+
exports.FIELD_TYPE_TOKENS = require_text_truncate.FIELD_TYPE_TOKENS;
|
|
8477
8477
|
exports.FORCE_LIGHT_PRESETS = FORCE_LIGHT_PRESETS;
|
|
8478
8478
|
exports.FORCE_LIGHT_PRESET_IDS = FORCE_LIGHT_PRESET_IDS;
|
|
8479
8479
|
exports.Facet = require_key_pad_menu.Facet;
|
|
@@ -8482,50 +8482,50 @@ exports.FailureList = require_field_sidebar.FailureList;
|
|
|
8482
8482
|
exports.FaqAccordion = require_field_sidebar.FaqAccordion;
|
|
8483
8483
|
exports.FeatureFlagPanel = FeatureFlagPanel;
|
|
8484
8484
|
exports.FieldSidebar = require_field_sidebar.FieldSidebar;
|
|
8485
|
-
exports.FieldToken =
|
|
8485
|
+
exports.FieldToken = require_text_truncate.FieldToken;
|
|
8486
8486
|
exports.FileUploadForm = FileUploadForm;
|
|
8487
8487
|
exports.FilterBar = FilterBar;
|
|
8488
8488
|
exports.FloatingActionBar = FloatingActionBar;
|
|
8489
|
-
exports.FormCheckbox =
|
|
8490
|
-
exports.FormColorPicker =
|
|
8491
|
-
exports.FormControl =
|
|
8492
|
-
exports.FormDateRangePicker =
|
|
8493
|
-
exports.FormDescription =
|
|
8494
|
-
exports.FormError =
|
|
8495
|
-
exports.FormField =
|
|
8496
|
-
exports.FormGroup =
|
|
8497
|
-
exports.FormGroupLabel =
|
|
8498
|
-
exports.FormIconPicker =
|
|
8499
|
-
exports.FormInput =
|
|
8500
|
-
exports.FormLabel =
|
|
8501
|
-
exports.FormNumberInput =
|
|
8502
|
-
exports.FormProvider =
|
|
8503
|
-
exports.FormPush =
|
|
8504
|
-
exports.FormRadio =
|
|
8505
|
-
exports.FormRadioGroup =
|
|
8506
|
-
exports.FormRemove =
|
|
8507
|
-
exports.FormReset =
|
|
8508
|
-
exports.FormRoot =
|
|
8509
|
-
exports.FormSelect =
|
|
8510
|
-
exports.FormSelectItem =
|
|
8511
|
-
exports.FormSelectPopover =
|
|
8512
|
-
exports.FormSlider =
|
|
8513
|
-
exports.FormStarRating =
|
|
8514
|
-
exports.FormSubmit =
|
|
8515
|
-
exports.FormSwitch =
|
|
8516
|
-
exports.FormTagInput =
|
|
8517
|
-
exports.FormTextarea =
|
|
8489
|
+
exports.FormCheckbox = require_text_truncate.FormCheckbox;
|
|
8490
|
+
exports.FormColorPicker = require_text_truncate.FormColorPicker;
|
|
8491
|
+
exports.FormControl = require_text_truncate.FormControl;
|
|
8492
|
+
exports.FormDateRangePicker = require_text_truncate.FormDateRangePicker;
|
|
8493
|
+
exports.FormDescription = require_text_truncate.FormDescription;
|
|
8494
|
+
exports.FormError = require_text_truncate.FormError;
|
|
8495
|
+
exports.FormField = require_text_truncate.FormField;
|
|
8496
|
+
exports.FormGroup = require_text_truncate.FormGroup;
|
|
8497
|
+
exports.FormGroupLabel = require_text_truncate.FormGroupLabel;
|
|
8498
|
+
exports.FormIconPicker = require_text_truncate.FormIconPicker;
|
|
8499
|
+
exports.FormInput = require_text_truncate.FormInput;
|
|
8500
|
+
exports.FormLabel = require_text_truncate.FormLabel;
|
|
8501
|
+
exports.FormNumberInput = require_text_truncate.FormNumberInput;
|
|
8502
|
+
exports.FormProvider = require_text_truncate.FormProvider;
|
|
8503
|
+
exports.FormPush = require_text_truncate.FormPush;
|
|
8504
|
+
exports.FormRadio = require_text_truncate.FormRadio;
|
|
8505
|
+
exports.FormRadioGroup = require_text_truncate.FormRadioGroup;
|
|
8506
|
+
exports.FormRemove = require_text_truncate.FormRemove;
|
|
8507
|
+
exports.FormReset = require_text_truncate.FormReset;
|
|
8508
|
+
exports.FormRoot = require_text_truncate.FormRoot;
|
|
8509
|
+
exports.FormSelect = require_text_truncate.FormSelect;
|
|
8510
|
+
exports.FormSelectItem = require_text_truncate.FormSelectItem;
|
|
8511
|
+
exports.FormSelectPopover = require_text_truncate.FormSelectPopover;
|
|
8512
|
+
exports.FormSlider = require_text_truncate.FormSlider;
|
|
8513
|
+
exports.FormStarRating = require_text_truncate.FormStarRating;
|
|
8514
|
+
exports.FormSubmit = require_text_truncate.FormSubmit;
|
|
8515
|
+
exports.FormSwitch = require_text_truncate.FormSwitch;
|
|
8516
|
+
exports.FormTagInput = require_text_truncate.FormTagInput;
|
|
8517
|
+
exports.FormTextarea = require_text_truncate.FormTextarea;
|
|
8518
8518
|
exports.GENERATED_THEME_ID_DEFAULT = GENERATED_THEME_ID_DEFAULT;
|
|
8519
8519
|
exports.GLOBAL_THEME_STYLE_ID = GLOBAL_THEME_STYLE_ID;
|
|
8520
8520
|
exports.Heading = require_key_pad_menu.Heading;
|
|
8521
|
-
exports.Highlight =
|
|
8522
|
-
exports.IconPicker =
|
|
8521
|
+
exports.Highlight = require_text_truncate.Highlight;
|
|
8522
|
+
exports.IconPicker = require_text_truncate.IconPicker;
|
|
8523
8523
|
exports.InlineEdit = require_key_pad_menu.InlineEdit;
|
|
8524
8524
|
exports.InlineEditTable = InlineEditTable;
|
|
8525
|
-
exports.Input =
|
|
8525
|
+
exports.Input = require_text_truncate.Input;
|
|
8526
8526
|
exports.InsightsPanel = InsightsPanel;
|
|
8527
8527
|
exports.KanbanBoard = KanbanBoard;
|
|
8528
|
-
exports.Kbd =
|
|
8528
|
+
exports.Kbd = require_text_truncate.Kbd;
|
|
8529
8529
|
exports.KeyPadMenu = require_key_pad_menu.KeyPadMenu;
|
|
8530
8530
|
exports.KeyValueEditor = require_field_sidebar.KeyValueEditor;
|
|
8531
8531
|
exports.LiveRegion = require_key_pad_menu.LiveRegion;
|
|
@@ -8533,16 +8533,16 @@ exports.LoadingOverlay = require_key_pad_menu.LoadingOverlay;
|
|
|
8533
8533
|
exports.LogTable = require_field_sidebar.LogTable;
|
|
8534
8534
|
exports.Logo = require_key_pad_menu.Logo;
|
|
8535
8535
|
exports.MegaMenu = MegaMenu;
|
|
8536
|
-
exports.MenuButtonArrow =
|
|
8537
|
-
exports.MenuItem =
|
|
8538
|
-
exports.MenuItemCheckbox =
|
|
8539
|
-
exports.MenuItemRadio =
|
|
8540
|
-
exports.MenuPopover =
|
|
8541
|
-
exports.MenuRoot =
|
|
8542
|
-
exports.MenuSeparator =
|
|
8543
|
-
exports.MenuTrigger =
|
|
8544
|
-
exports.MenubarContainer =
|
|
8545
|
-
exports.MenubarRoot =
|
|
8536
|
+
exports.MenuButtonArrow = require_text_truncate.MenuButtonArrow;
|
|
8537
|
+
exports.MenuItem = require_text_truncate.MenuItem;
|
|
8538
|
+
exports.MenuItemCheckbox = require_text_truncate.MenuItemCheckbox;
|
|
8539
|
+
exports.MenuItemRadio = require_text_truncate.MenuItemRadio;
|
|
8540
|
+
exports.MenuPopover = require_text_truncate.MenuPopover;
|
|
8541
|
+
exports.MenuRoot = require_text_truncate.MenuRoot;
|
|
8542
|
+
exports.MenuSeparator = require_text_truncate.MenuSeparator;
|
|
8543
|
+
exports.MenuTrigger = require_text_truncate.MenuTrigger;
|
|
8544
|
+
exports.MenubarContainer = require_text_truncate.MenubarContainer;
|
|
8545
|
+
exports.MenubarRoot = require_text_truncate.MenubarRoot;
|
|
8546
8546
|
exports.Meter = require_key_pad_menu.Meter;
|
|
8547
8547
|
Object.defineProperty(exports, "MetricsCard", {
|
|
8548
8548
|
enumerable: true,
|
|
@@ -8552,20 +8552,20 @@ Object.defineProperty(exports, "MetricsCard", {
|
|
|
8552
8552
|
});
|
|
8553
8553
|
exports.NotificationCenter = NotificationCenter;
|
|
8554
8554
|
exports.NotificationToast = require_field_sidebar.NotificationToast;
|
|
8555
|
-
exports.NumberInput =
|
|
8556
|
-
exports.OPT_TEXT_PRIMARY =
|
|
8557
|
-
exports.OPT_TEXT_SECONDARY =
|
|
8555
|
+
exports.NumberInput = require_text_truncate.NumberInput;
|
|
8556
|
+
exports.OPT_TEXT_PRIMARY = require_text_truncate.OPT_TEXT_PRIMARY;
|
|
8557
|
+
exports.OPT_TEXT_SECONDARY = require_text_truncate.OPT_TEXT_SECONDARY;
|
|
8558
8558
|
exports.OptThemeControllerContext = OptThemeControllerContext;
|
|
8559
8559
|
exports.OptThemeProvider = OptThemeProvider;
|
|
8560
8560
|
exports.OtpField = require_key_pad_menu.OtpField;
|
|
8561
8561
|
exports.POPULAR_ICONS = POPULAR_ICONS;
|
|
8562
8562
|
exports.PageAside = PageAside;
|
|
8563
8563
|
exports.PageHeader = require_key_pad_menu.PageHeader;
|
|
8564
|
-
exports.Pagination =
|
|
8565
|
-
exports.PopoverClose =
|
|
8566
|
-
exports.PopoverContent =
|
|
8567
|
-
exports.PopoverRoot =
|
|
8568
|
-
exports.PopoverTrigger =
|
|
8564
|
+
exports.Pagination = require_text_truncate.Pagination;
|
|
8565
|
+
exports.PopoverClose = require_text_truncate.PopoverClose;
|
|
8566
|
+
exports.PopoverContent = require_text_truncate.PopoverContent;
|
|
8567
|
+
exports.PopoverRoot = require_text_truncate.PopoverRoot;
|
|
8568
|
+
exports.PopoverTrigger = require_text_truncate.PopoverTrigger;
|
|
8569
8569
|
exports.Progress = require_key_pad_menu.Progress;
|
|
8570
8570
|
exports.ProjectSwitcher = require_field_sidebar.ProjectSwitcher;
|
|
8571
8571
|
exports.PromptTemplate = PromptTemplate;
|
|
@@ -8597,11 +8597,11 @@ exports.ScrollArea = require_key_pad_menu.ScrollArea;
|
|
|
8597
8597
|
exports.SearchCombobox = require_field_sidebar.SearchCombobox;
|
|
8598
8598
|
exports.Section = require_key_pad_menu.Section;
|
|
8599
8599
|
exports.SegmentBuilder = SegmentBuilder;
|
|
8600
|
-
exports.SelectItem =
|
|
8601
|
-
exports.SelectLabel =
|
|
8602
|
-
exports.SelectPopover =
|
|
8603
|
-
exports.SelectRoot =
|
|
8604
|
-
exports.SelectTrigger =
|
|
8600
|
+
exports.SelectItem = require_text_truncate.SelectItem;
|
|
8601
|
+
exports.SelectLabel = require_text_truncate.SelectLabel;
|
|
8602
|
+
exports.SelectPopover = require_text_truncate.SelectPopover;
|
|
8603
|
+
exports.SelectRoot = require_text_truncate.SelectRoot;
|
|
8604
|
+
exports.SelectTrigger = require_text_truncate.SelectTrigger;
|
|
8605
8605
|
exports.Separator = require_key_pad_menu.Separator;
|
|
8606
8606
|
exports.SettingsForm = require_field_sidebar.SettingsForm;
|
|
8607
8607
|
exports.ShaderSurface = require_key_pad_menu.ShaderSurface;
|
|
@@ -8612,12 +8612,12 @@ exports.SkeletonAvatar = require_key_pad_menu.SkeletonAvatar;
|
|
|
8612
8612
|
exports.SkeletonCard = require_key_pad_menu.SkeletonCard;
|
|
8613
8613
|
exports.SkeletonTable = require_key_pad_menu.SkeletonTable;
|
|
8614
8614
|
exports.SkeletonText = require_key_pad_menu.SkeletonText;
|
|
8615
|
-
exports.Slider =
|
|
8615
|
+
exports.Slider = require_text_truncate.Slider;
|
|
8616
8616
|
exports.SpatialNavProvider = SpatialNavProvider;
|
|
8617
|
-
exports.Spinner =
|
|
8617
|
+
exports.Spinner = require_text_truncate.Spinner;
|
|
8618
8618
|
exports.SqlEditor = SqlEditor;
|
|
8619
|
-
exports.StarRating =
|
|
8620
|
-
exports.StatCard =
|
|
8619
|
+
exports.StarRating = require_text_truncate.StarRating;
|
|
8620
|
+
exports.StatCard = require_text_truncate.StatCard;
|
|
8621
8621
|
exports.StatusSelect = require_field_sidebar.StatusSelect;
|
|
8622
8622
|
exports.StepBuilder = require_key_pad_menu.StepBuilder;
|
|
8623
8623
|
exports.SummaryRow = SummaryRow;
|
|
@@ -8628,16 +8628,16 @@ exports.THEME_PRESET_IDS = THEME_PRESET_IDS;
|
|
|
8628
8628
|
exports.THEME_REGISTRY = THEME_REGISTRY;
|
|
8629
8629
|
exports.THEME_SPEC_STORAGE_KEY = THEME_SPEC_STORAGE_KEY;
|
|
8630
8630
|
exports.THEME_TOKENS_STORAGE_KEY = THEME_TOKENS_STORAGE_KEY;
|
|
8631
|
-
exports.Tab =
|
|
8632
|
-
exports.TabList =
|
|
8633
|
-
exports.TabPanel =
|
|
8634
|
-
exports.TabsRoot =
|
|
8635
|
-
exports.TagInput =
|
|
8631
|
+
exports.Tab = require_text_truncate.Tab;
|
|
8632
|
+
exports.TabList = require_text_truncate.TabList;
|
|
8633
|
+
exports.TabPanel = require_text_truncate.TabPanel;
|
|
8634
|
+
exports.TabsRoot = require_text_truncate.TabsRoot;
|
|
8635
|
+
exports.TagInput = require_text_truncate.TagInput;
|
|
8636
8636
|
exports.TaskList = TaskList;
|
|
8637
8637
|
exports.TeamMemberList = TeamMemberList;
|
|
8638
8638
|
exports.TemplatePicker = TemplatePicker;
|
|
8639
8639
|
exports.Text = require_key_pad_menu.Text;
|
|
8640
|
-
exports.TextTruncate =
|
|
8640
|
+
exports.TextTruncate = require_text_truncate.TextTruncate;
|
|
8641
8641
|
exports.Textarea = require_key_pad_menu.Textarea;
|
|
8642
8642
|
exports.ThemeSwitcher = ThemeSwitcher;
|
|
8643
8643
|
exports.TimeRangeControl = require_field_sidebar.TimeRangeControl;
|
|
@@ -8646,13 +8646,13 @@ exports.TimeSeriesPanel = require_field_sidebar.TimeSeriesPanel;
|
|
|
8646
8646
|
exports.ToastProvider = require_field_sidebar.ToastProvider;
|
|
8647
8647
|
exports.Toggle = require_key_pad_menu.Toggle;
|
|
8648
8648
|
exports.ToggleGroup = require_key_pad_menu.ToggleGroup;
|
|
8649
|
-
exports.ToolbarButton =
|
|
8650
|
-
exports.ToolbarContainer =
|
|
8651
|
-
exports.ToolbarRoot =
|
|
8652
|
-
exports.ToolbarSeparator =
|
|
8653
|
-
exports.Tooltip =
|
|
8654
|
-
exports.TooltipAnchor =
|
|
8655
|
-
exports.TooltipProvider =
|
|
8649
|
+
exports.ToolbarButton = require_text_truncate.ToolbarButton;
|
|
8650
|
+
exports.ToolbarContainer = require_text_truncate.ToolbarContainer;
|
|
8651
|
+
exports.ToolbarRoot = require_text_truncate.ToolbarRoot;
|
|
8652
|
+
exports.ToolbarSeparator = require_text_truncate.ToolbarSeparator;
|
|
8653
|
+
exports.Tooltip = require_text_truncate.Tooltip;
|
|
8654
|
+
exports.TooltipAnchor = require_text_truncate.TooltipAnchor;
|
|
8655
|
+
exports.TooltipProvider = require_text_truncate.TooltipProvider;
|
|
8656
8656
|
exports.TreeTable = TreeTable;
|
|
8657
8657
|
Object.defineProperty(exports, "TrendChart", {
|
|
8658
8658
|
enumerable: true,
|
|
@@ -8669,7 +8669,7 @@ exports.WorkflowCanvas = require_field_sidebar.WorkflowCanvas;
|
|
|
8669
8669
|
exports.addClause = require_field_sidebar.addClause;
|
|
8670
8670
|
exports.applyCellAction = require_field_sidebar.applyCellAction;
|
|
8671
8671
|
exports.buildTokenCache = buildTokenCache;
|
|
8672
|
-
exports.cn =
|
|
8672
|
+
exports.cn = require_text_truncate.cn;
|
|
8673
8673
|
exports.coerceThemeMode = coerceThemeMode;
|
|
8674
8674
|
exports.computeGeneratedTokens = computeGeneratedTokens;
|
|
8675
8675
|
exports.computeSpatialTargets = computeSpatialTargets;
|
|
@@ -8701,9 +8701,9 @@ exports.isForceLightSpec = isForceLightSpec;
|
|
|
8701
8701
|
exports.isGeneratedSpec = isGeneratedSpec;
|
|
8702
8702
|
exports.isPresetSpec = isPresetSpec;
|
|
8703
8703
|
exports.isThemePresetId = isThemePresetId;
|
|
8704
|
-
exports.koBreadcrumbLabels =
|
|
8705
|
-
exports.koComboboxLabels =
|
|
8706
|
-
exports.koStarRatingLabels =
|
|
8704
|
+
exports.koBreadcrumbLabels = require_text_truncate.koBreadcrumbLabels;
|
|
8705
|
+
exports.koComboboxLabels = require_text_truncate.koComboboxLabels;
|
|
8706
|
+
exports.koStarRatingLabels = require_text_truncate.koStarRatingLabels;
|
|
8707
8707
|
exports.matchesQuery = matchesQuery;
|
|
8708
8708
|
exports.matchesQueryObject = matchesQueryObject;
|
|
8709
8709
|
exports.parseQuery = require_field_sidebar.parseQuery;
|
|
@@ -8714,7 +8714,7 @@ exports.quoteValue = require_field_sidebar.quoteValue;
|
|
|
8714
8714
|
exports.readStoredTheme = readStoredTheme;
|
|
8715
8715
|
exports.removeClause = require_field_sidebar.removeClause;
|
|
8716
8716
|
exports.resolveDescriptor = resolveDescriptor;
|
|
8717
|
-
exports.resolveFieldType =
|
|
8717
|
+
exports.resolveFieldType = require_text_truncate.resolveFieldType;
|
|
8718
8718
|
exports.resolveThemeMode = resolveThemeMode;
|
|
8719
8719
|
exports.safeParseStoredSpec = safeParseStoredSpec;
|
|
8720
8720
|
exports.safeParseStoredTokens = safeParseStoredTokens;
|
|
@@ -8725,11 +8725,11 @@ exports.serializeTokenBody = serializeTokenBody;
|
|
|
8725
8725
|
exports.shouldSkipArrow = shouldSkipArrow;
|
|
8726
8726
|
exports.toast = require_field_sidebar.toast;
|
|
8727
8727
|
exports.useAutoRefresh = require_field_sidebar.useAutoRefresh;
|
|
8728
|
-
exports.useControlledState =
|
|
8728
|
+
exports.useControlledState = require_text_truncate.useControlledState;
|
|
8729
8729
|
exports.useFieldValue = _reopt_ai_opt_ui_primitives.useFieldValue;
|
|
8730
8730
|
exports.useFormContext = _reopt_ai_opt_ui_primitives.useFormContext;
|
|
8731
8731
|
exports.useFormStore = _reopt_ai_opt_ui_primitives.useFormStore;
|
|
8732
|
-
exports.useInputId =
|
|
8732
|
+
exports.useInputId = require_text_truncate.useInputId;
|
|
8733
8733
|
exports.useOptTheme = useOptTheme;
|
|
8734
8734
|
exports.useOptThemeController = useOptThemeController;
|
|
8735
8735
|
exports.useOptionalOptTheme = useOptionalOptTheme;
|