@reopt-ai/opt-ui 1.12.4 → 1.13.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/CHANGELOG.md +236 -0
- package/COMPONENT_CATALOG.md +290 -111
- package/dist/core/index.cjs +13 -13
- 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 +49 -49
- package/dist/docs/02-components/02-visuals.md +1 -1
- package/dist/docs/02-components/03-shells.md +260 -63
- package/dist/docs/02-components/04-surfaces.md +1 -1
- package/dist/docs/02-components/index.md +4 -4
- package/dist/{field-sidebar-C8bDzGPs.js → field-sidebar-CRdToHRO.js} +3975 -235
- package/dist/{field-sidebar-DX5wP0qn.cjs → field-sidebar-CxxSK4JO.cjs} +4338 -244
- package/dist/{field-sidebar-Ct8c9L4V.d.cts → field-sidebar-D-rwuN_w.d.cts} +824 -2
- package/dist/{field-sidebar-YaWHfLLW.d.ts → field-sidebar-Dz7J4ett.d.ts} +824 -2
- package/dist/id-registry.cjs +72 -0
- package/dist/id-registry.js +72 -0
- package/dist/id-registry.json +153 -0
- package/dist/index.cjs +334 -1419
- package/dist/index.d.cts +51 -86
- package/dist/index.d.ts +51 -86
- package/dist/index.js +248 -1356
- package/dist/{key-pad-menu-1YN221Oi.cjs → key-pad-menu-0KWOnELe.cjs} +53 -483
- package/dist/{key-pad-menu-CwcY_Vps.d.cts → key-pad-menu-BOVu97bj.d.cts} +4 -55
- package/dist/{key-pad-menu-CUiQ-vKw.js → key-pad-menu-DMmbQ1jF.js} +54 -418
- package/dist/{key-pad-menu-WBJShCJn.d.ts → key-pad-menu-NlZ9zNF8.d.ts} +4 -55
- package/dist/meta.cjs +896 -7
- package/dist/meta.js +896 -7
- package/dist/shells/index.cjs +20 -1
- package/dist/shells/index.d.cts +2 -2
- package/dist/shells/index.d.ts +2 -2
- package/dist/shells/index.js +2 -2
- package/dist/{text-truncate-BFWd2cE_.js → text-truncate-Bd-0WkSP.js} +463 -99
- package/dist/{text-truncate-DsG5UAOY.cjs → text-truncate-BeYW6XZu.cjs} +525 -101
- package/dist/{text-truncate-CQyfUZvq.d.cts → text-truncate-eMzvU_7k.d.cts} +52 -1
- package/dist/{text-truncate-CQyfUZvq.d.ts → text-truncate-eMzvU_7k.d.ts} +52 -1
- package/dist/theme/server.cjs +2 -2
- package/dist/theme/server.js +2 -2
- package/package.json +6 -2
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const require_text_truncate = require("./text-truncate-
|
|
2
|
+
const require_text_truncate = require("./text-truncate-BeYW6XZu.cjs");
|
|
3
3
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
4
|
let react = require("react");
|
|
5
5
|
react = require_text_truncate.__toESM(react, 1);
|
|
6
6
|
let _reopt_ai_opt_ui_primitives = require("@reopt-ai/opt-ui-primitives");
|
|
7
7
|
let lucide_react = require("lucide-react");
|
|
8
|
-
let react_resizable_panels = require("react-resizable-panels");
|
|
9
8
|
let ogl = require("ogl");
|
|
10
9
|
let _reopt_ai_opt_palette = require("@reopt-ai/opt-palette");
|
|
11
10
|
//#region src/core/text.tsx
|
|
12
|
-
const _excluded$
|
|
11
|
+
const _excluded$11 = [
|
|
13
12
|
"as",
|
|
14
13
|
"variant",
|
|
15
14
|
"tone",
|
|
@@ -25,7 +24,7 @@ const toneStyles$1 = {
|
|
|
25
24
|
};
|
|
26
25
|
/** Semantic body text whose visual role is controlled by foundation tokens. */
|
|
27
26
|
function Text(_ref) {
|
|
28
|
-
let { as, variant = "body", tone = "primary", truncate = false, className, children } = _ref, props = require_text_truncate._objectWithoutProperties(_ref, _excluded$
|
|
27
|
+
let { as, variant = "body", tone = "primary", truncate = false, className, children } = _ref, props = require_text_truncate._objectWithoutProperties(_ref, _excluded$11);
|
|
29
28
|
const Component = as !== null && as !== void 0 ? as : "span";
|
|
30
29
|
const elementProps = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, props), {}, {
|
|
31
30
|
className: require_text_truncate.cn(`opt-type-${variant}`, toneStyles$1[tone], truncate && "truncate", className),
|
|
@@ -40,7 +39,7 @@ function Text(_ref) {
|
|
|
40
39
|
}
|
|
41
40
|
//#endregion
|
|
42
41
|
//#region src/core/heading.tsx
|
|
43
|
-
const _excluded$
|
|
42
|
+
const _excluded$10 = [
|
|
44
43
|
"level",
|
|
45
44
|
"variant",
|
|
46
45
|
"className",
|
|
@@ -48,7 +47,7 @@ const _excluded$14 = [
|
|
|
48
47
|
];
|
|
49
48
|
/** Semantic heading with independently selectable visual hierarchy. */
|
|
50
49
|
function Heading(_ref) {
|
|
51
|
-
let { level = 2, variant = `heading-${level}`, className, children } = _ref, props = require_text_truncate._objectWithoutProperties(_ref, _excluded$
|
|
50
|
+
let { level = 2, variant = `heading-${level}`, className, children } = _ref, props = require_text_truncate._objectWithoutProperties(_ref, _excluded$10);
|
|
52
51
|
const Component = {
|
|
53
52
|
1: "h1",
|
|
54
53
|
2: "h2",
|
|
@@ -72,7 +71,7 @@ function Heading(_ref) {
|
|
|
72
71
|
* Visual divider between content. Wraps the headless primitive with design
|
|
73
72
|
* tokens. With `children`, renders a centered label flanked by rules.
|
|
74
73
|
*/
|
|
75
|
-
function Separator
|
|
74
|
+
function Separator({ orientation = "horizontal", decorative = false, children, className }) {
|
|
76
75
|
if (orientation === "horizontal" && children != null) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
77
76
|
className: require_text_truncate.cn("gap-element flex items-center", className),
|
|
78
77
|
"data-opt-id": "7PWJS",
|
|
@@ -102,7 +101,7 @@ function Separator$1({ orientation = "horizontal", decorative = false, children,
|
|
|
102
101
|
"data-opt-slug": "separator.Separator"
|
|
103
102
|
});
|
|
104
103
|
}
|
|
105
|
-
Separator
|
|
104
|
+
Separator.displayName = "Separator";
|
|
106
105
|
//#endregion
|
|
107
106
|
//#region src/core/otp-field.tsx
|
|
108
107
|
const PATTERNS = {
|
|
@@ -267,25 +266,25 @@ function OtpField({ length = 6, value: controlledValue, defaultValue = "", onCha
|
|
|
267
266
|
OtpField.displayName = "OtpField";
|
|
268
267
|
//#endregion
|
|
269
268
|
//#region src/core/toggle.tsx
|
|
270
|
-
const _excluded$
|
|
269
|
+
const _excluded$9 = [
|
|
271
270
|
"size",
|
|
272
271
|
"className",
|
|
273
272
|
"children"
|
|
274
273
|
];
|
|
275
|
-
const _excluded2$
|
|
274
|
+
const _excluded2$5 = [
|
|
276
275
|
"className",
|
|
277
276
|
"children",
|
|
278
277
|
"orientation"
|
|
279
278
|
];
|
|
280
|
-
const sizeStyles$
|
|
279
|
+
const sizeStyles$6 = {
|
|
281
280
|
sm: "h-8 min-w-8 px-2 text-xs gap-1.5",
|
|
282
281
|
md: "h-10 min-w-10 px-3 text-sm gap-2"
|
|
283
282
|
};
|
|
284
283
|
const toggleBase = require_text_truncate.cn("inline-flex cursor-pointer items-center justify-center rounded-md border border-border bg-surface font-medium text-text-secondary", "hover:bg-bg-subtle hover:text-text-primary", "data-[pressed]:border-accent data-[pressed]:bg-accent-subtle data-[pressed]:text-accent", "disabled:pointer-events-none disabled:opacity-40", require_text_truncate.OPT_FOCUS_VISIBLE);
|
|
285
284
|
/** A two-state (pressed) button. Use standalone or inside `ToggleGroup`. */
|
|
286
285
|
function Toggle(_ref) {
|
|
287
|
-
let { size = "md", className, children } = _ref, props = require_text_truncate._objectWithoutProperties(_ref, _excluded$
|
|
288
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_reopt_ai_opt_ui_primitives.Toggle, require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({ className: require_text_truncate.cn(toggleBase, sizeStyles$
|
|
286
|
+
let { size = "md", className, children } = _ref, props = require_text_truncate._objectWithoutProperties(_ref, _excluded$9);
|
|
287
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_reopt_ai_opt_ui_primitives.Toggle, require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({ className: require_text_truncate.cn(toggleBase, sizeStyles$6[size], className) }, props), {}, {
|
|
289
288
|
"data-opt-id": "GFCMY",
|
|
290
289
|
"data-opt-slug": "toggle.Toggle",
|
|
291
290
|
children
|
|
@@ -294,7 +293,7 @@ function Toggle(_ref) {
|
|
|
294
293
|
Toggle.displayName = "Toggle";
|
|
295
294
|
/** A set of related toggles with shared selection and keyboard navigation. */
|
|
296
295
|
function ToggleGroup(_ref2) {
|
|
297
|
-
let { className, children, orientation = "horizontal" } = _ref2, props = require_text_truncate._objectWithoutProperties(_ref2, _excluded2$
|
|
296
|
+
let { className, children, orientation = "horizontal" } = _ref2, props = require_text_truncate._objectWithoutProperties(_ref2, _excluded2$5);
|
|
298
297
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_reopt_ai_opt_ui_primitives.ToggleGroup, require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({
|
|
299
298
|
orientation,
|
|
300
299
|
"aria-orientation": orientation,
|
|
@@ -308,15 +307,15 @@ function ToggleGroup(_ref2) {
|
|
|
308
307
|
ToggleGroup.displayName = "ToggleGroup";
|
|
309
308
|
//#endregion
|
|
310
309
|
//#region src/core/accordion.tsx
|
|
311
|
-
const _excluded$
|
|
312
|
-
const _excluded2$
|
|
313
|
-
const _excluded3$
|
|
314
|
-
const _excluded4$
|
|
310
|
+
const _excluded$8 = ["className"];
|
|
311
|
+
const _excluded2$4 = ["className"];
|
|
312
|
+
const _excluded3$1 = ["className", "children"];
|
|
313
|
+
const _excluded4$1 = ["className", "children"];
|
|
315
314
|
const triggerClass = `group/acc-trigger flex w-full cursor-pointer items-center justify-between gap-2 py-4 text-left text-sm font-medium text-text-primary transition-colors hover:text-text-secondary ${require_text_truncate.OPT_FOCUS} disabled:cursor-not-allowed disabled:opacity-50`;
|
|
316
315
|
const contentClass = `overflow-hidden text-sm text-text-secondary ${require_text_truncate.OPT_ANIMATE_ENTER_EXIT}`;
|
|
317
316
|
/** A vertically stacked set of expandable panels (single or multiple open). */
|
|
318
317
|
function AccordionRoot(_ref) {
|
|
319
|
-
let { className } = _ref, props = require_text_truncate._objectWithoutProperties(_ref, _excluded$
|
|
318
|
+
let { className } = _ref, props = require_text_truncate._objectWithoutProperties(_ref, _excluded$8);
|
|
320
319
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
321
320
|
className: require_text_truncate.cn("border-border border-y", className),
|
|
322
321
|
"data-opt-id": "CSBA9",
|
|
@@ -327,7 +326,7 @@ function AccordionRoot(_ref) {
|
|
|
327
326
|
AccordionRoot.displayName = "AccordionRoot";
|
|
328
327
|
/** A single accordion entry, identified by its `value`. */
|
|
329
328
|
function AccordionItem(_ref2) {
|
|
330
|
-
let { className } = _ref2, props = require_text_truncate._objectWithoutProperties(_ref2, _excluded2$
|
|
329
|
+
let { className } = _ref2, props = require_text_truncate._objectWithoutProperties(_ref2, _excluded2$4);
|
|
331
330
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_reopt_ai_opt_ui_primitives.AccordionItem, require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({ className: require_text_truncate.cn("border-border border-b last:border-b-0", className) }, props), {}, {
|
|
332
331
|
"data-opt-id": "JTY9M",
|
|
333
332
|
"data-opt-slug": "accordion.AccordionItem"
|
|
@@ -336,7 +335,7 @@ function AccordionItem(_ref2) {
|
|
|
336
335
|
AccordionItem.displayName = "AccordionItem";
|
|
337
336
|
/** The clickable header that expands/collapses its panel. */
|
|
338
337
|
function AccordionTrigger(_ref3) {
|
|
339
|
-
let { className, children } = _ref3, props = require_text_truncate._objectWithoutProperties(_ref3, _excluded3$
|
|
338
|
+
let { className, children } = _ref3, props = require_text_truncate._objectWithoutProperties(_ref3, _excluded3$1);
|
|
340
339
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_reopt_ai_opt_ui_primitives.AccordionTrigger, require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({ className: require_text_truncate.cn(triggerClass, className) }, props), {}, {
|
|
341
340
|
"data-opt-id": "CWJZZ",
|
|
342
341
|
"data-opt-slug": "accordion.AccordionTrigger",
|
|
@@ -352,7 +351,7 @@ function AccordionTrigger(_ref3) {
|
|
|
352
351
|
AccordionTrigger.displayName = "AccordionTrigger";
|
|
353
352
|
/** The collapsible panel body associated with a trigger. */
|
|
354
353
|
function AccordionContent(_ref4) {
|
|
355
|
-
let { className, children } = _ref4, props = require_text_truncate._objectWithoutProperties(_ref4, _excluded4$
|
|
354
|
+
let { className, children } = _ref4, props = require_text_truncate._objectWithoutProperties(_ref4, _excluded4$1);
|
|
356
355
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_reopt_ai_opt_ui_primitives.AccordionContent, require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({ className: require_text_truncate.cn(contentClass, className) }, props), {}, {
|
|
357
356
|
"data-opt-id": "J98AG",
|
|
358
357
|
"data-opt-slug": "accordion.AccordionContent",
|
|
@@ -410,111 +409,8 @@ function Breadcrumb({ items, separator = "/", className, onNavigate, "aria-label
|
|
|
410
409
|
});
|
|
411
410
|
}
|
|
412
411
|
//#endregion
|
|
413
|
-
//#region src/core/description-list.tsx
|
|
414
|
-
const defaultLabels$3 = {
|
|
415
|
-
copy: (term) => `Copy ${term}`,
|
|
416
|
-
copied: "Copied",
|
|
417
|
-
empty: "—"
|
|
418
|
-
};
|
|
419
|
-
const columnsClass = {
|
|
420
|
-
1: "grid-cols-1",
|
|
421
|
-
2: "grid-cols-1 sm:grid-cols-2",
|
|
422
|
-
3: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",
|
|
423
|
-
4: "grid-cols-2 sm:grid-cols-3 lg:grid-cols-4"
|
|
424
|
-
};
|
|
425
|
-
function CopyButton({ value, label, copiedLabel }) {
|
|
426
|
-
const [copied, setCopied] = (0, react.useState)(false);
|
|
427
|
-
const handleCopy = (0, react.useCallback)(() => {
|
|
428
|
-
var _navigator$clipboard;
|
|
429
|
-
(_navigator$clipboard = navigator.clipboard) === null || _navigator$clipboard === void 0 || _navigator$clipboard.writeText(value).then(() => {
|
|
430
|
-
setCopied(true);
|
|
431
|
-
window.setTimeout(() => setCopied(false), 1500);
|
|
432
|
-
});
|
|
433
|
-
}, [value]);
|
|
434
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
435
|
-
type: "button",
|
|
436
|
-
onClick: handleCopy,
|
|
437
|
-
"aria-label": copied ? copiedLabel : label,
|
|
438
|
-
className: require_text_truncate.cn(require_text_truncate.OPT_FOCUS_VISIBLE, require_text_truncate.OPT_TEXT_TERTIARY, "hover:text-text-primary shrink-0 rounded p-0.5 transition-colors"),
|
|
439
|
-
children: copied ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Check, {
|
|
440
|
-
className: "size-3.5",
|
|
441
|
-
"aria-hidden": "true"
|
|
442
|
-
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Copy, {
|
|
443
|
-
className: "size-3.5",
|
|
444
|
-
"aria-hidden": "true"
|
|
445
|
-
})
|
|
446
|
-
});
|
|
447
|
-
}
|
|
448
|
-
/**
|
|
449
|
-
* DescriptionList — the labelled facts about one thing.
|
|
450
|
-
*
|
|
451
|
-
* Detail views collect a dozen short fields that each mean nothing without
|
|
452
|
-
* their label, and hand-rolling them as a `<div>` grid loses the term/value
|
|
453
|
-
* association that assistive tech needs. This keeps the pairs in a real `<dl>`
|
|
454
|
-
* while still laying them out as boxed cells.
|
|
455
|
-
*
|
|
456
|
-
* @example
|
|
457
|
-
* ```tsx
|
|
458
|
-
* <DescriptionList
|
|
459
|
-
* layout="grid"
|
|
460
|
-
* columns={2}
|
|
461
|
-
* items={[
|
|
462
|
-
* { id: "id", term: "Session ID", description: session.id, copyValue: session.id },
|
|
463
|
-
* { id: "entry", term: "Entry path", description: session.entryPath },
|
|
464
|
-
* ]}
|
|
465
|
-
* />
|
|
466
|
-
* ```
|
|
467
|
-
*/
|
|
468
|
-
function DescriptionList({ items, layout = "grid", columns = 2, compressed = false, labels: customLabels, className }) {
|
|
469
|
-
const labels = require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({}, defaultLabels$3), customLabels);
|
|
470
|
-
if (layout === "inline") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dl", {
|
|
471
|
-
className: require_text_truncate.cn("flex flex-wrap items-baseline gap-x-6 gap-y-2", className),
|
|
472
|
-
"data-opt-id": "1NPD2",
|
|
473
|
-
"data-opt-slug": "description-list.DescriptionList",
|
|
474
|
-
children: items.map((item) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
475
|
-
className: "flex items-baseline gap-2",
|
|
476
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", {
|
|
477
|
-
className: require_text_truncate.cn(require_text_truncate.OPT_TEXT_TERTIARY, "text-xs"),
|
|
478
|
-
title: item.hint,
|
|
479
|
-
children: item.term
|
|
480
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dd", {
|
|
481
|
-
className: require_text_truncate.cn(require_text_truncate.OPT_TEXT_PRIMARY, "text-sm font-medium"),
|
|
482
|
-
children: item.description || labels.empty
|
|
483
|
-
})]
|
|
484
|
-
}, item.id))
|
|
485
|
-
});
|
|
486
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dl", {
|
|
487
|
-
className: require_text_truncate.cn("grid", compressed ? "gap-element" : "gap-group", columnsClass[columns], className),
|
|
488
|
-
"data-opt-id": "1NPD2",
|
|
489
|
-
"data-opt-slug": "description-list.DescriptionList",
|
|
490
|
-
children: items.map((item) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
491
|
-
className: require_text_truncate.cn("flex min-w-0 flex-col gap-1", layout === "grid" && [
|
|
492
|
-
"border border-border",
|
|
493
|
-
"bg-bg-subtle rounded-lg",
|
|
494
|
-
compressed ? "px-2.5 py-1.5" : "px-3 py-2"
|
|
495
|
-
]),
|
|
496
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", {
|
|
497
|
-
className: require_text_truncate.cn(require_text_truncate.OPT_TEXT_TERTIARY, "text-xs"),
|
|
498
|
-
title: item.hint,
|
|
499
|
-
children: item.term
|
|
500
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("dd", {
|
|
501
|
-
className: require_text_truncate.cn(require_text_truncate.OPT_TEXT_PRIMARY, "flex min-w-0 items-center gap-1.5 text-sm"),
|
|
502
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
503
|
-
className: require_text_truncate.cn("min-w-0", item.wrap ? "break-all" : "truncate", !item.description && "text-text-secondary"),
|
|
504
|
-
children: item.description || labels.empty
|
|
505
|
-
}), item.copyValue && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CopyButton, {
|
|
506
|
-
value: item.copyValue,
|
|
507
|
-
label: labels.copy(typeof item.term === "string" ? item.term : item.id),
|
|
508
|
-
copiedLabel: labels.copied
|
|
509
|
-
})]
|
|
510
|
-
})]
|
|
511
|
-
}, item.id))
|
|
512
|
-
});
|
|
513
|
-
}
|
|
514
|
-
DescriptionList.displayName = "DescriptionList";
|
|
515
|
-
//#endregion
|
|
516
412
|
//#region src/core/avatar.tsx
|
|
517
|
-
const _excluded$
|
|
413
|
+
const _excluded$7 = [
|
|
518
414
|
"src",
|
|
519
415
|
"srcSet",
|
|
520
416
|
"sizes",
|
|
@@ -528,7 +424,7 @@ const _excluded$11 = [
|
|
|
528
424
|
"className",
|
|
529
425
|
"onLoadingStatusChange"
|
|
530
426
|
];
|
|
531
|
-
const _excluded2$
|
|
427
|
+
const _excluded2$3 = [
|
|
532
428
|
"max",
|
|
533
429
|
"size",
|
|
534
430
|
"children",
|
|
@@ -573,7 +469,7 @@ function useImageLoadingStatus(src, { srcSet, sizes, crossOrigin, referrerPolicy
|
|
|
573
469
|
]);
|
|
574
470
|
return status;
|
|
575
471
|
}
|
|
576
|
-
const sizeStyles$
|
|
472
|
+
const sizeStyles$5 = {
|
|
577
473
|
xs: "h-6 w-6 text-[10px]",
|
|
578
474
|
sm: "h-8 w-8 text-xs",
|
|
579
475
|
md: "h-10 w-10 text-sm",
|
|
@@ -616,7 +512,7 @@ function getColorFromName(name) {
|
|
|
616
512
|
/** Renders the avatar component. */
|
|
617
513
|
function Avatar(_ref) {
|
|
618
514
|
var _ref2, _ref3;
|
|
619
|
-
let { src, srcSet, sizes, crossOrigin, referrerPolicy, alt, name, size = "md", fallback, status, className, onLoadingStatusChange } = _ref, props = require_text_truncate._objectWithoutProperties(_ref, _excluded$
|
|
515
|
+
let { src, srcSet, sizes, crossOrigin, referrerPolicy, alt, name, size = "md", fallback, status, className, onLoadingStatusChange } = _ref, props = require_text_truncate._objectWithoutProperties(_ref, _excluded$7);
|
|
620
516
|
const loadingStatus = useImageLoadingStatus(src, {
|
|
621
517
|
srcSet,
|
|
622
518
|
sizes,
|
|
@@ -657,7 +553,7 @@ function Avatar(_ref) {
|
|
|
657
553
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({
|
|
658
554
|
role: "img",
|
|
659
555
|
"aria-label": avatarLabel,
|
|
660
|
-
className: require_text_truncate.cn("relative inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full", sizeStyles$
|
|
556
|
+
className: require_text_truncate.cn("relative inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full", sizeStyles$5[size], !showImage && bgColor, className)
|
|
661
557
|
}, props), {}, {
|
|
662
558
|
"data-opt-id": "SCMM0",
|
|
663
559
|
"data-opt-slug": "avatar.Avatar",
|
|
@@ -669,7 +565,7 @@ function Avatar(_ref) {
|
|
|
669
565
|
}
|
|
670
566
|
/** Renders the avatar group component. */
|
|
671
567
|
function AvatarGroup(_ref5) {
|
|
672
|
-
let { max = 4, size = "md", children, className } = _ref5, props = require_text_truncate._objectWithoutProperties(_ref5, _excluded2$
|
|
568
|
+
let { max = 4, size = "md", children, className } = _ref5, props = require_text_truncate._objectWithoutProperties(_ref5, _excluded2$3);
|
|
673
569
|
const avatars = Array.isArray(children) ? children : [children];
|
|
674
570
|
const visibleAvatars = avatars.slice(0, max);
|
|
675
571
|
const remainingCount = avatars.length - max;
|
|
@@ -680,7 +576,7 @@ function AvatarGroup(_ref5) {
|
|
|
680
576
|
className: "ring-surface relative -ml-2 inline-block rounded-full ring-2 first:ml-0",
|
|
681
577
|
children: child
|
|
682
578
|
}, index)), remainingCount > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
683
|
-
className: require_text_truncate.cn("bg-bg-subtle text-text-secondary ring-surface relative inline-flex items-center justify-center rounded-full font-medium ring-2", sizeStyles$
|
|
579
|
+
className: require_text_truncate.cn("bg-bg-subtle text-text-secondary ring-surface relative inline-flex items-center justify-center rounded-full font-medium ring-2", sizeStyles$5[size]),
|
|
684
580
|
children: ["+", remainingCount]
|
|
685
581
|
})]
|
|
686
582
|
}));
|
|
@@ -755,7 +651,7 @@ function Identity({ name, secondary, id, avatarSrc, state, badge, size = "md", h
|
|
|
755
651
|
Identity.displayName = "Identity";
|
|
756
652
|
//#endregion
|
|
757
653
|
//#region src/core/card.tsx
|
|
758
|
-
const _excluded$
|
|
654
|
+
const _excluded$6 = [
|
|
759
655
|
"variant",
|
|
760
656
|
"padding",
|
|
761
657
|
"shadow",
|
|
@@ -769,17 +665,17 @@ const _excluded$10 = [
|
|
|
769
665
|
"role",
|
|
770
666
|
"tabIndex"
|
|
771
667
|
];
|
|
772
|
-
const _excluded2$
|
|
668
|
+
const _excluded2$2 = [
|
|
773
669
|
"gap",
|
|
774
670
|
"className",
|
|
775
671
|
"children"
|
|
776
672
|
];
|
|
777
|
-
const _excluded3
|
|
673
|
+
const _excluded3 = [
|
|
778
674
|
"as",
|
|
779
675
|
"className",
|
|
780
676
|
"children"
|
|
781
677
|
];
|
|
782
|
-
const _excluded4
|
|
678
|
+
const _excluded4 = ["className", "children"];
|
|
783
679
|
const _excluded5 = [
|
|
784
680
|
"spacing",
|
|
785
681
|
"className",
|
|
@@ -792,7 +688,7 @@ const _excluded6 = [
|
|
|
792
688
|
];
|
|
793
689
|
/** Renders the card component. */
|
|
794
690
|
function Card(_ref) {
|
|
795
|
-
let { variant = "default", padding = "md", shadow = true, selectable = false, selected = false, onSelectedChange, className, children, onClick, onKeyDown, role, tabIndex } = _ref, props = require_text_truncate._objectWithoutProperties(_ref, _excluded$
|
|
691
|
+
let { variant = "default", padding = "md", shadow = true, selectable = false, selected = false, onSelectedChange, className, children, onClick, onKeyDown, role, tabIndex } = _ref, props = require_text_truncate._objectWithoutProperties(_ref, _excluded$6);
|
|
796
692
|
const isInteractive = selectable || !!onClick;
|
|
797
693
|
const handleClick = selectable ? (e) => {
|
|
798
694
|
onSelectedChange === null || onSelectedChange === void 0 || onSelectedChange(!selected);
|
|
@@ -835,7 +731,7 @@ const headerGapClasses = {
|
|
|
835
731
|
};
|
|
836
732
|
/** Renders the card header component. */
|
|
837
733
|
function CardHeader(_ref2) {
|
|
838
|
-
let { gap = "sm", className, children } = _ref2, props = require_text_truncate._objectWithoutProperties(_ref2, _excluded2$
|
|
734
|
+
let { gap = "sm", className, children } = _ref2, props = require_text_truncate._objectWithoutProperties(_ref2, _excluded2$2);
|
|
839
735
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({ className: require_text_truncate.cn("flex flex-col", headerGapClasses[gap], className) }, props), {}, {
|
|
840
736
|
"data-opt-id": "JST3J",
|
|
841
737
|
"data-opt-slug": "card.CardHeader",
|
|
@@ -844,7 +740,7 @@ function CardHeader(_ref2) {
|
|
|
844
740
|
}
|
|
845
741
|
/** Renders the card title component. */
|
|
846
742
|
function CardTitle(_ref3) {
|
|
847
|
-
let { as: Tag = "h3", className, children } = _ref3, props = require_text_truncate._objectWithoutProperties(_ref3, _excluded3
|
|
743
|
+
let { as: Tag = "h3", className, children } = _ref3, props = require_text_truncate._objectWithoutProperties(_ref3, _excluded3);
|
|
848
744
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Tag, require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({ className: require_text_truncate.cn(`text-lg font-semibold ${require_text_truncate.OPT_TEXT_PRIMARY}`, className) }, props), {}, {
|
|
849
745
|
"data-opt-id": "V15TX",
|
|
850
746
|
"data-opt-slug": "card.CardTitle",
|
|
@@ -853,7 +749,7 @@ function CardTitle(_ref3) {
|
|
|
853
749
|
}
|
|
854
750
|
/** Renders the card description component. */
|
|
855
751
|
function CardDescription(_ref4) {
|
|
856
|
-
let { className, children } = _ref4, props = require_text_truncate._objectWithoutProperties(_ref4, _excluded4
|
|
752
|
+
let { className, children } = _ref4, props = require_text_truncate._objectWithoutProperties(_ref4, _excluded4);
|
|
857
753
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({ className: require_text_truncate.cn(`text-sm ${require_text_truncate.OPT_TEXT_SECONDARY}`, className) }, props), {}, {
|
|
858
754
|
"data-opt-id": "YB1RN",
|
|
859
755
|
"data-opt-slug": "card.CardDescription",
|
|
@@ -885,162 +781,8 @@ function CardFooter(_ref6) {
|
|
|
885
781
|
}));
|
|
886
782
|
}
|
|
887
783
|
//#endregion
|
|
888
|
-
//#region src/core/switch.tsx
|
|
889
|
-
const _excluded$9 = [
|
|
890
|
-
"label",
|
|
891
|
-
"required",
|
|
892
|
-
"error",
|
|
893
|
-
"hint",
|
|
894
|
-
"description",
|
|
895
|
-
"checked",
|
|
896
|
-
"defaultChecked",
|
|
897
|
-
"onChange",
|
|
898
|
-
"size",
|
|
899
|
-
"disabled",
|
|
900
|
-
"className",
|
|
901
|
-
"id",
|
|
902
|
-
"onClick",
|
|
903
|
-
"aria-label",
|
|
904
|
-
"aria-labelledby"
|
|
905
|
-
];
|
|
906
|
-
const sizeStyles$5 = {
|
|
907
|
-
sm: {
|
|
908
|
-
track: "h-5 w-9",
|
|
909
|
-
thumb: "h-4 w-4",
|
|
910
|
-
translate: "translate-x-4"
|
|
911
|
-
},
|
|
912
|
-
md: {
|
|
913
|
-
track: "h-6 w-11",
|
|
914
|
-
thumb: "h-5 w-5",
|
|
915
|
-
translate: "translate-x-5"
|
|
916
|
-
},
|
|
917
|
-
lg: {
|
|
918
|
-
track: "h-7 w-14",
|
|
919
|
-
thumb: "h-6 w-6",
|
|
920
|
-
translate: "translate-x-7"
|
|
921
|
-
}
|
|
922
|
-
};
|
|
923
|
-
const Switch = (0, react.forwardRef)((_ref, ref) => {
|
|
924
|
-
var _useInputId;
|
|
925
|
-
let { label, required, error, hint, description, checked: controlledChecked, defaultChecked = false, onChange, size = "md", disabled, className, id, onClick, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy } = _ref, props = require_text_truncate._objectWithoutProperties(_ref, _excluded$9);
|
|
926
|
-
const fallbackId = (0, react.useId)();
|
|
927
|
-
const switchId = (_useInputId = require_text_truncate.useInputId(id, label, "switch")) !== null && _useInputId !== void 0 ? _useInputId : `switch-${fallbackId}`;
|
|
928
|
-
const hintText = hint !== null && hint !== void 0 ? hint : description;
|
|
929
|
-
const hasError = Boolean(error);
|
|
930
|
-
const styles = sizeStyles$5[size];
|
|
931
|
-
const labelId = label ? `${switchId}-label` : void 0;
|
|
932
|
-
const switchLabelledBy = ariaLabelledBy !== null && ariaLabelledBy !== void 0 ? ariaLabelledBy : ariaLabel ? void 0 : labelId;
|
|
933
|
-
const switchAriaLabel = ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : switchLabelledBy ? void 0 : "Switch";
|
|
934
|
-
const isControlled = controlledChecked !== void 0;
|
|
935
|
-
const [internalChecked, setInternalChecked] = (0, react.useState)(defaultChecked);
|
|
936
|
-
const checked = isControlled ? controlledChecked : internalChecked;
|
|
937
|
-
const handleClick = (0, react.useCallback)((e) => {
|
|
938
|
-
const next = !checked;
|
|
939
|
-
if (!isControlled) setInternalChecked(next);
|
|
940
|
-
onChange === null || onChange === void 0 || onChange(next);
|
|
941
|
-
onClick === null || onClick === void 0 || onClick(e);
|
|
942
|
-
}, [
|
|
943
|
-
checked,
|
|
944
|
-
isControlled,
|
|
945
|
-
onChange,
|
|
946
|
-
onClick
|
|
947
|
-
]);
|
|
948
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
949
|
-
className: require_text_truncate.cn("flex flex-col gap-1.5", className),
|
|
950
|
-
"data-opt-id": "51Z9R",
|
|
951
|
-
"data-opt-slug": "switch.Switch",
|
|
952
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
953
|
-
className: "flex items-start gap-3",
|
|
954
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({
|
|
955
|
-
ref,
|
|
956
|
-
type: "button",
|
|
957
|
-
role: "switch",
|
|
958
|
-
id: switchId,
|
|
959
|
-
"aria-checked": checked,
|
|
960
|
-
"aria-label": switchAriaLabel,
|
|
961
|
-
"aria-labelledby": switchLabelledBy,
|
|
962
|
-
disabled,
|
|
963
|
-
className: require_text_truncate.cn("group relative inline-flex shrink-0 cursor-pointer rounded-full p-0.5 transition-colors", styles.track, "bg-bg-muted", "aria-[checked=true]:bg-accent", "disabled:cursor-not-allowed disabled:opacity-50", require_text_truncate.OPT_FOCUS_VISIBLE),
|
|
964
|
-
"aria-invalid": hasError,
|
|
965
|
-
"aria-required": required,
|
|
966
|
-
"aria-describedby": require_text_truncate.getDescribedBy(switchId, error, hintText),
|
|
967
|
-
onClick: handleClick
|
|
968
|
-
}, props), {}, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: require_text_truncate.cn("pointer-events-none inline-block transform rounded-full bg-white shadow-sm ring-0 transition-transform", styles.thumb, "translate-x-0", size === "sm" && "group-aria-[checked=true]:translate-x-4", size === "md" && "group-aria-[checked=true]:translate-x-5", size === "lg" && "group-aria-[checked=true]:translate-x-7") }) })), (label || hintText) && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
969
|
-
className: "flex flex-col",
|
|
970
|
-
children: [label && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
971
|
-
id: labelId,
|
|
972
|
-
className: require_text_truncate.cn("text-text-primary text-sm font-medium", disabled && "opacity-50"),
|
|
973
|
-
children: [label, required && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.RequiredMark, {})]
|
|
974
|
-
}), hintText && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
975
|
-
id: `${switchId}-hint`,
|
|
976
|
-
className: require_text_truncate.cn("text-text-tertiary text-sm", disabled && "opacity-50"),
|
|
977
|
-
children: hintText
|
|
978
|
-
})]
|
|
979
|
-
})]
|
|
980
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FieldMessages, {
|
|
981
|
-
id: switchId,
|
|
982
|
-
error
|
|
983
|
-
})]
|
|
984
|
-
});
|
|
985
|
-
});
|
|
986
|
-
Switch.displayName = "Switch";
|
|
987
|
-
//#endregion
|
|
988
|
-
//#region src/core/textarea.tsx
|
|
989
|
-
const _excluded$8 = [
|
|
990
|
-
"label",
|
|
991
|
-
"error",
|
|
992
|
-
"hint",
|
|
993
|
-
"fullWidth",
|
|
994
|
-
"required",
|
|
995
|
-
"resize",
|
|
996
|
-
"size",
|
|
997
|
-
"className",
|
|
998
|
-
"id",
|
|
999
|
-
"rows"
|
|
1000
|
-
];
|
|
1001
|
-
const textareaSizeStyles = require_text_truncate.OPT_TEXTAREA_SIZE;
|
|
1002
|
-
const resizeStyles = {
|
|
1003
|
-
none: "resize-none",
|
|
1004
|
-
vertical: "resize-y",
|
|
1005
|
-
horizontal: "resize-x",
|
|
1006
|
-
both: "resize"
|
|
1007
|
-
};
|
|
1008
|
-
const Textarea = (0, react.forwardRef)((_ref, ref) => {
|
|
1009
|
-
var _useInputId;
|
|
1010
|
-
let { label, error, hint, fullWidth = false, required, resize = "vertical", size = "md", className, id, rows = 4 } = _ref, props = require_text_truncate._objectWithoutProperties(_ref, _excluded$8);
|
|
1011
|
-
const fallbackId = (0, react.useId)().replace(/:/g, "");
|
|
1012
|
-
const textareaId = (_useInputId = require_text_truncate.useInputId(id, label, "textarea")) !== null && _useInputId !== void 0 ? _useInputId : `textarea-${fallbackId}`;
|
|
1013
|
-
const hasError = Boolean(error);
|
|
1014
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1015
|
-
className: require_text_truncate.cn("flex flex-col gap-1.5", fullWidth && "w-full"),
|
|
1016
|
-
"data-opt-id": "6T58H",
|
|
1017
|
-
"data-opt-slug": "textarea.Textarea",
|
|
1018
|
-
children: [
|
|
1019
|
-
label && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
1020
|
-
htmlFor: textareaId,
|
|
1021
|
-
className: "text-text-primary text-sm font-medium",
|
|
1022
|
-
children: [label, required && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.RequiredMark, {})]
|
|
1023
|
-
}),
|
|
1024
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", require_text_truncate._objectSpread2({
|
|
1025
|
-
ref,
|
|
1026
|
-
id: textareaId,
|
|
1027
|
-
rows,
|
|
1028
|
-
className: require_text_truncate.cn("border-border bg-surface text-text-primary placeholder:text-text-tertiary w-full rounded-lg border px-4 py-3 text-sm outline-transparent", require_text_truncate.OPT_FOCUS_VISIBLE, textareaSizeStyles[size], resizeStyles[resize], hasError && "border-danger focus-visible:outline-danger", !fullWidth && "w-auto", className),
|
|
1029
|
-
"aria-invalid": hasError,
|
|
1030
|
-
"aria-describedby": require_text_truncate.getDescribedBy(textareaId, error, hint)
|
|
1031
|
-
}, props)),
|
|
1032
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.FieldMessages, {
|
|
1033
|
-
id: textareaId,
|
|
1034
|
-
error,
|
|
1035
|
-
hint
|
|
1036
|
-
})
|
|
1037
|
-
]
|
|
1038
|
-
});
|
|
1039
|
-
});
|
|
1040
|
-
Textarea.displayName = "Textarea";
|
|
1041
|
-
//#endregion
|
|
1042
784
|
//#region src/core/progress.tsx
|
|
1043
|
-
const _excluded$
|
|
785
|
+
const _excluded$5 = [
|
|
1044
786
|
"value",
|
|
1045
787
|
"max",
|
|
1046
788
|
"size",
|
|
@@ -1051,7 +793,7 @@ const _excluded$7 = [
|
|
|
1051
793
|
"indeterminate",
|
|
1052
794
|
"className"
|
|
1053
795
|
];
|
|
1054
|
-
const _excluded2$
|
|
796
|
+
const _excluded2$1 = [
|
|
1055
797
|
"value",
|
|
1056
798
|
"max",
|
|
1057
799
|
"size",
|
|
@@ -1086,7 +828,7 @@ function getProgressValue(value, max) {
|
|
|
1086
828
|
}
|
|
1087
829
|
/** Renders the progress component. */
|
|
1088
830
|
function Progress(_ref) {
|
|
1089
|
-
let { value, max = 100, size = "md", variant = "default", showLabel = false, label, animated = true, indeterminate = false, className } = _ref, props = require_text_truncate._objectWithoutProperties(_ref, _excluded$
|
|
831
|
+
let { value, max = 100, size = "md", variant = "default", showLabel = false, label, animated = true, indeterminate = false, className } = _ref, props = require_text_truncate._objectWithoutProperties(_ref, _excluded$5);
|
|
1090
832
|
const progress = indeterminate || value === void 0 ? null : getProgressValue(value, max);
|
|
1091
833
|
const shouldRenderHeader = Boolean(label) || showLabel && progress;
|
|
1092
834
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({ className: require_text_truncate.cn("w-full", className) }, props), {}, {
|
|
@@ -1125,7 +867,7 @@ const circularVariantStyles = {
|
|
|
1125
867
|
/** Renders the circular progress component. */
|
|
1126
868
|
function CircularProgress(_ref2) {
|
|
1127
869
|
var _progress$percentage;
|
|
1128
|
-
let { value, max = 100, size = 48, strokeWidth = 4, variant = "default", showLabel = false, label, indeterminate = false, className } = _ref2, props = require_text_truncate._objectWithoutProperties(_ref2, _excluded2$
|
|
870
|
+
let { value, max = 100, size = 48, strokeWidth = 4, variant = "default", showLabel = false, label, indeterminate = false, className } = _ref2, props = require_text_truncate._objectWithoutProperties(_ref2, _excluded2$1);
|
|
1129
871
|
const labelId = (0, react.useId)();
|
|
1130
872
|
const isIndeterminate = indeterminate || value === void 0;
|
|
1131
873
|
const progress = isIndeterminate ? null : getProgressValue(value, max);
|
|
@@ -1672,47 +1414,8 @@ function ConditionBuilder({ groups, onChange, properties = DEFAULT_PROPERTIES, l
|
|
|
1672
1414
|
}
|
|
1673
1415
|
ConditionBuilder.displayName = "ConditionBuilder";
|
|
1674
1416
|
//#endregion
|
|
1675
|
-
//#region src/core/dropdown-menu.tsx
|
|
1676
|
-
const _excluded$6 = ["className"];
|
|
1677
|
-
const _excluded2$2 = ["className"];
|
|
1678
|
-
const _excluded3$1 = ["className", "variant"];
|
|
1679
|
-
const _excluded4 = ["className"];
|
|
1680
|
-
const DropdownMenu = require_text_truncate.MenuRoot;
|
|
1681
|
-
/** Renders the dropdown trigger component. */
|
|
1682
|
-
function DropdownTrigger(_ref) {
|
|
1683
|
-
let { className } = _ref, props = require_text_truncate._objectWithoutProperties(_ref, _excluded$6);
|
|
1684
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.MenuTrigger, require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({ className: require_text_truncate.cn("cursor-pointer gap-2", className) }, props), {}, {
|
|
1685
|
-
"data-opt-id": "C4BSS",
|
|
1686
|
-
"data-opt-slug": "dropdown-menu.DropdownTrigger"
|
|
1687
|
-
}));
|
|
1688
|
-
}
|
|
1689
|
-
/** Renders the dropdown content component. */
|
|
1690
|
-
function DropdownContent(_ref2) {
|
|
1691
|
-
let { className } = _ref2, props = require_text_truncate._objectWithoutProperties(_ref2, _excluded2$2);
|
|
1692
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.MenuPopover, require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({ className: require_text_truncate.cn(className) }, props), {}, {
|
|
1693
|
-
"data-opt-id": "J6NF7",
|
|
1694
|
-
"data-opt-slug": "dropdown-menu.DropdownContent"
|
|
1695
|
-
}));
|
|
1696
|
-
}
|
|
1697
|
-
/** Renders the dropdown item component. */
|
|
1698
|
-
function DropdownItem(_ref3) {
|
|
1699
|
-
let { className, variant = "default" } = _ref3, props = require_text_truncate._objectWithoutProperties(_ref3, _excluded3$1);
|
|
1700
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.MenuItem, require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({ className: require_text_truncate.cn("cursor-pointer data-[disabled]:cursor-not-allowed", variant === "destructive" && "text-danger-fg data-[active-item]:bg-danger-subtle data-[active-item]:text-danger-fg", className) }, props), {}, {
|
|
1701
|
-
"data-opt-id": "5M6GA",
|
|
1702
|
-
"data-opt-slug": "dropdown-menu.DropdownItem"
|
|
1703
|
-
}));
|
|
1704
|
-
}
|
|
1705
|
-
/** Renders the dropdown separator component. */
|
|
1706
|
-
function DropdownSeparator(_ref4) {
|
|
1707
|
-
let { className } = _ref4, props = require_text_truncate._objectWithoutProperties(_ref4, _excluded4);
|
|
1708
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.MenuSeparator, require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({ className: require_text_truncate.cn(className) }, props), {}, {
|
|
1709
|
-
"data-opt-id": "K9Y54",
|
|
1710
|
-
"data-opt-slug": "dropdown-menu.DropdownSeparator"
|
|
1711
|
-
}));
|
|
1712
|
-
}
|
|
1713
|
-
//#endregion
|
|
1714
1417
|
//#region src/core/radio-group.tsx
|
|
1715
|
-
const _excluded$
|
|
1418
|
+
const _excluded$4 = [
|
|
1716
1419
|
"label",
|
|
1717
1420
|
"hint",
|
|
1718
1421
|
"description",
|
|
@@ -1759,7 +1462,7 @@ function RadioGroup({ children, value, defaultValue = "", onChange, disabled, si
|
|
|
1759
1462
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_reopt_ai_opt_ui_primitives.RadioGroupRoot, {
|
|
1760
1463
|
value,
|
|
1761
1464
|
defaultValue,
|
|
1762
|
-
onChange,
|
|
1465
|
+
onValueChange: onChange,
|
|
1763
1466
|
disabled,
|
|
1764
1467
|
orientation,
|
|
1765
1468
|
name,
|
|
@@ -1784,7 +1487,7 @@ function RadioGroup({ children, value, defaultValue = "", onChange, disabled, si
|
|
|
1784
1487
|
}
|
|
1785
1488
|
const Radio = (0, react.forwardRef)((_ref, ref) => {
|
|
1786
1489
|
var _ref2;
|
|
1787
|
-
let { label, hint, description, value, name: _name, size: sizeProp, disabled: disabledProp, className } = _ref, props = require_text_truncate._objectWithoutProperties(_ref, _excluded$
|
|
1490
|
+
let { label, hint, description, value, name: _name, size: sizeProp, disabled: disabledProp, className } = _ref, props = require_text_truncate._objectWithoutProperties(_ref, _excluded$4);
|
|
1788
1491
|
const groupContext = (0, react.useContext)(RadioGroupContext);
|
|
1789
1492
|
const primContext = (0, _reopt_ai_opt_ui_primitives.useRadioGroupContext)();
|
|
1790
1493
|
const size = sizeProp !== null && sizeProp !== void 0 ? sizeProp : groupContext.size;
|
|
@@ -1805,7 +1508,7 @@ const Radio = (0, react.forwardRef)((_ref, ref) => {
|
|
|
1805
1508
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({
|
|
1806
1509
|
ref,
|
|
1807
1510
|
"aria-checked": isChecked,
|
|
1808
|
-
className: require_text_truncate.cn("group flex items-start gap-3", disabled && "cursor-not-allowed opacity-50", !disabled && "cursor-pointer", className)
|
|
1511
|
+
className: require_text_truncate.cn("group relative flex items-start gap-3", disabled && "cursor-not-allowed opacity-50", !disabled && "cursor-pointer", className)
|
|
1809
1512
|
}, props), {}, {
|
|
1810
1513
|
"data-opt-id": "HY7YG",
|
|
1811
1514
|
"data-opt-slug": "radio-group.Radio",
|
|
@@ -1821,7 +1524,7 @@ const Radio = (0, react.forwardRef)((_ref, ref) => {
|
|
|
1821
1524
|
"aria-label": label ? void 0 : value !== null && value !== void 0 ? value : "Radio option",
|
|
1822
1525
|
"aria-labelledby": labelId,
|
|
1823
1526
|
"aria-describedby": hintId,
|
|
1824
|
-
className: "
|
|
1527
|
+
className: "absolute inset-0 m-0 h-full w-full cursor-pointer opacity-0 disabled:cursor-not-allowed"
|
|
1825
1528
|
}),
|
|
1826
1529
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1827
1530
|
className: require_text_truncate.cn("relative mt-0.5 inline-flex shrink-0 items-center justify-center rounded-full", styles.radio, "border-border border-2", "bg-surface", "group-aria-checked:border-accent", "transition-colors", "group-has-[:focus-visible]:outline-ring outline-transparent group-has-[:focus-visible]:outline-2 group-has-[:focus-visible]:-outline-offset-1"),
|
|
@@ -1846,7 +1549,7 @@ const Radio = (0, react.forwardRef)((_ref, ref) => {
|
|
|
1846
1549
|
Radio.displayName = "Radio";
|
|
1847
1550
|
//#endregion
|
|
1848
1551
|
//#region src/core/loading-overlay.tsx
|
|
1849
|
-
const _excluded$
|
|
1552
|
+
const _excluded$3 = [
|
|
1850
1553
|
"loading",
|
|
1851
1554
|
"children",
|
|
1852
1555
|
"label",
|
|
@@ -1854,7 +1557,7 @@ const _excluded$4 = [
|
|
|
1854
1557
|
];
|
|
1855
1558
|
/** Renders the loading overlay component. */
|
|
1856
1559
|
function LoadingOverlay(_ref) {
|
|
1857
|
-
let { loading, children, label = "Loading…", className } = _ref, props = require_text_truncate._objectWithoutProperties(_ref, _excluded$
|
|
1560
|
+
let { loading, children, label = "Loading…", className } = _ref, props = require_text_truncate._objectWithoutProperties(_ref, _excluded$3);
|
|
1858
1561
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({
|
|
1859
1562
|
"data-opt-id": "380ZR",
|
|
1860
1563
|
"data-opt-slug": "loading-overlay.LoadingOverlay"
|
|
@@ -1881,7 +1584,7 @@ function LoadingOverlay(_ref) {
|
|
|
1881
1584
|
LoadingOverlay.displayName = "LoadingOverlay";
|
|
1882
1585
|
//#endregion
|
|
1883
1586
|
//#region src/core/block-layout.tsx
|
|
1884
|
-
const _excluded$
|
|
1587
|
+
const _excluded$2 = [
|
|
1885
1588
|
"children",
|
|
1886
1589
|
"className",
|
|
1887
1590
|
"spacing",
|
|
@@ -1903,7 +1606,7 @@ const insetClass = {
|
|
|
1903
1606
|
};
|
|
1904
1607
|
/** Renders the block layout component. */
|
|
1905
1608
|
function BlockLayout(_ref) {
|
|
1906
|
-
let { children, className, spacing = "section", inset, loading, loadingLabel } = _ref, props = require_text_truncate._objectWithoutProperties(_ref, _excluded$
|
|
1609
|
+
let { children, className, spacing = "section", inset, loading, loadingLabel } = _ref, props = require_text_truncate._objectWithoutProperties(_ref, _excluded$2);
|
|
1907
1610
|
const layoutClassName = require_text_truncate.cn("flex flex-col", spacingClass[spacing], inset ? insetClass[inset] : void 0, className);
|
|
1908
1611
|
if (loading) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LoadingOverlay, require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({
|
|
1909
1612
|
"data-opt-id": "9D8QR",
|
|
@@ -1925,7 +1628,7 @@ function BlockLayout(_ref) {
|
|
|
1925
1628
|
BlockLayout.displayName = "BlockLayout";
|
|
1926
1629
|
//#endregion
|
|
1927
1630
|
//#region src/core/create-block.tsx
|
|
1928
|
-
const _excluded$
|
|
1631
|
+
const _excluded$1 = ["loading", "className"];
|
|
1929
1632
|
/**
|
|
1930
1633
|
* Block 팩토리. BlockLayout 래핑을 구조적으로 강제합니다.
|
|
1931
1634
|
*
|
|
@@ -1935,7 +1638,7 @@ const _excluded$2 = ["loading", "className"];
|
|
|
1935
1638
|
*/
|
|
1936
1639
|
function createBlock(name, render, options) {
|
|
1937
1640
|
const Component = (props) => {
|
|
1938
|
-
const { loading, className } = props, rest = require_text_truncate._objectWithoutProperties(props, _excluded$
|
|
1641
|
+
const { loading, className } = props, rest = require_text_truncate._objectWithoutProperties(props, _excluded$1);
|
|
1939
1642
|
const layoutCn = (options === null || options === void 0 ? void 0 : options.layoutClassName) ? `${options.layoutClassName}${className ? ` ${className}` : ""}` : className;
|
|
1940
1643
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BlockLayout, {
|
|
1941
1644
|
loading,
|
|
@@ -2032,73 +1735,6 @@ function Section({ children, title, description, className }) {
|
|
|
2032
1735
|
}
|
|
2033
1736
|
Section.displayName = "Section";
|
|
2034
1737
|
//#endregion
|
|
2035
|
-
//#region src/core/resizable.tsx
|
|
2036
|
-
const _excluded$1 = [
|
|
2037
|
-
"direction",
|
|
2038
|
-
"children",
|
|
2039
|
-
"className",
|
|
2040
|
-
"id",
|
|
2041
|
-
"autoSaveId"
|
|
2042
|
-
];
|
|
2043
|
-
const _excluded2$1 = [
|
|
2044
|
-
"collapsedSize",
|
|
2045
|
-
"defaultSize",
|
|
2046
|
-
"minSize",
|
|
2047
|
-
"maxSize",
|
|
2048
|
-
"children",
|
|
2049
|
-
"className"
|
|
2050
|
-
];
|
|
2051
|
-
const _excluded3 = ["className", "withHandle"];
|
|
2052
|
-
function toPanelSize(size) {
|
|
2053
|
-
return typeof size === "number" ? `${size}%` : size;
|
|
2054
|
-
}
|
|
2055
|
-
/** Renders the resizable panel group component. */
|
|
2056
|
-
function ResizablePanelGroup(_ref) {
|
|
2057
|
-
let { direction, children, className, id, autoSaveId } = _ref, props = require_text_truncate._objectWithoutProperties(_ref, _excluded$1);
|
|
2058
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_resizable_panels.Group, require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({
|
|
2059
|
-
orientation: direction,
|
|
2060
|
-
id: id !== null && id !== void 0 ? id : autoSaveId,
|
|
2061
|
-
className: require_text_truncate.cn("flex h-full w-full", className)
|
|
2062
|
-
}, props), {}, {
|
|
2063
|
-
"data-opt-id": "BM5RR",
|
|
2064
|
-
"data-opt-slug": "resizable.ResizablePanelGroup",
|
|
2065
|
-
children
|
|
2066
|
-
}));
|
|
2067
|
-
}
|
|
2068
|
-
ResizablePanelGroup.displayName = "ResizablePanelGroup";
|
|
2069
|
-
/** Renders the resizable panel component. */
|
|
2070
|
-
function ResizablePanel(_ref2) {
|
|
2071
|
-
let { collapsedSize, defaultSize, minSize, maxSize, children, className } = _ref2, props = require_text_truncate._objectWithoutProperties(_ref2, _excluded2$1);
|
|
2072
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_resizable_panels.Panel, require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({
|
|
2073
|
-
collapsedSize: toPanelSize(collapsedSize),
|
|
2074
|
-
defaultSize: toPanelSize(defaultSize),
|
|
2075
|
-
minSize: toPanelSize(minSize),
|
|
2076
|
-
maxSize: toPanelSize(maxSize),
|
|
2077
|
-
className: require_text_truncate.cn("overflow-auto", className)
|
|
2078
|
-
}, props), {}, {
|
|
2079
|
-
"data-opt-id": "88X4V",
|
|
2080
|
-
"data-opt-slug": "resizable.ResizablePanel",
|
|
2081
|
-
children
|
|
2082
|
-
}));
|
|
2083
|
-
}
|
|
2084
|
-
ResizablePanel.displayName = "ResizablePanel";
|
|
2085
|
-
/** Renders the resizable handle component. */
|
|
2086
|
-
function ResizableHandle(_ref3) {
|
|
2087
|
-
let { className, withHandle = false } = _ref3, props = require_text_truncate._objectWithoutProperties(_ref3, _excluded3);
|
|
2088
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_resizable_panels.Separator, require_text_truncate._objectSpread2(require_text_truncate._objectSpread2({ className: require_text_truncate.cn("bg-border relative flex items-center justify-center", "after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2", "data-[resize-handle-active]:bg-accent", "[&[data-orientation=vertical]]:h-px [&[data-orientation=vertical]]:w-full", "[&[data-orientation=horizontal]]:h-full [&[data-orientation=horizontal]]:w-px", className) }, props), {}, {
|
|
2089
|
-
"data-opt-id": "6Z22W",
|
|
2090
|
-
"data-opt-slug": "resizable.ResizableHandle",
|
|
2091
|
-
children: withHandle && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2092
|
-
className: "border-border bg-surface z-10 flex h-4 w-3 items-center justify-center rounded-sm border",
|
|
2093
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.GripVertical, {
|
|
2094
|
-
"aria-hidden": "true",
|
|
2095
|
-
className: "text-text-tertiary h-3 w-3"
|
|
2096
|
-
})
|
|
2097
|
-
})
|
|
2098
|
-
}));
|
|
2099
|
-
}
|
|
2100
|
-
ResizableHandle.displayName = "ResizableHandle";
|
|
2101
|
-
//#endregion
|
|
2102
1738
|
//#region src/core/logo.tsx
|
|
2103
1739
|
const markSizeStyles = {
|
|
2104
1740
|
sm: "h-6 w-6",
|
|
@@ -4010,7 +3646,7 @@ function ColorPalettePicker({ palettes, value, onValueChange, label = "Colour pa
|
|
|
4010
3646
|
children: label
|
|
4011
3647
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_text_truncate.SelectRoot, {
|
|
4012
3648
|
value: (_ref = value !== null && value !== void 0 ? value : selected === null || selected === void 0 ? void 0 : selected.id) !== null && _ref !== void 0 ? _ref : "",
|
|
4013
|
-
|
|
3649
|
+
onValueChange: (next) => {
|
|
4014
3650
|
if (typeof next === "string") onValueChange === null || onValueChange === void 0 || onValueChange(next);
|
|
4015
3651
|
},
|
|
4016
3652
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_text_truncate.SelectTrigger, {
|
|
@@ -4400,12 +4036,6 @@ Object.defineProperty(exports, "Container", {
|
|
|
4400
4036
|
return Container;
|
|
4401
4037
|
}
|
|
4402
4038
|
});
|
|
4403
|
-
Object.defineProperty(exports, "DescriptionList", {
|
|
4404
|
-
enumerable: true,
|
|
4405
|
-
get: function() {
|
|
4406
|
-
return DescriptionList;
|
|
4407
|
-
}
|
|
4408
|
-
});
|
|
4409
4039
|
Object.defineProperty(exports, "DrawerClose", {
|
|
4410
4040
|
enumerable: true,
|
|
4411
4041
|
get: function() {
|
|
@@ -4424,36 +4054,6 @@ Object.defineProperty(exports, "DrawerRoot", {
|
|
|
4424
4054
|
return DrawerRoot;
|
|
4425
4055
|
}
|
|
4426
4056
|
});
|
|
4427
|
-
Object.defineProperty(exports, "DropdownContent", {
|
|
4428
|
-
enumerable: true,
|
|
4429
|
-
get: function() {
|
|
4430
|
-
return DropdownContent;
|
|
4431
|
-
}
|
|
4432
|
-
});
|
|
4433
|
-
Object.defineProperty(exports, "DropdownItem", {
|
|
4434
|
-
enumerable: true,
|
|
4435
|
-
get: function() {
|
|
4436
|
-
return DropdownItem;
|
|
4437
|
-
}
|
|
4438
|
-
});
|
|
4439
|
-
Object.defineProperty(exports, "DropdownMenu", {
|
|
4440
|
-
enumerable: true,
|
|
4441
|
-
get: function() {
|
|
4442
|
-
return DropdownMenu;
|
|
4443
|
-
}
|
|
4444
|
-
});
|
|
4445
|
-
Object.defineProperty(exports, "DropdownSeparator", {
|
|
4446
|
-
enumerable: true,
|
|
4447
|
-
get: function() {
|
|
4448
|
-
return DropdownSeparator;
|
|
4449
|
-
}
|
|
4450
|
-
});
|
|
4451
|
-
Object.defineProperty(exports, "DropdownTrigger", {
|
|
4452
|
-
enumerable: true,
|
|
4453
|
-
get: function() {
|
|
4454
|
-
return DropdownTrigger;
|
|
4455
|
-
}
|
|
4456
|
-
});
|
|
4457
4057
|
Object.defineProperty(exports, "Expression", {
|
|
4458
4058
|
enumerable: true,
|
|
4459
4059
|
get: function() {
|
|
@@ -4550,24 +4150,6 @@ Object.defineProperty(exports, "RadioGroup", {
|
|
|
4550
4150
|
return RadioGroup;
|
|
4551
4151
|
}
|
|
4552
4152
|
});
|
|
4553
|
-
Object.defineProperty(exports, "ResizableHandle", {
|
|
4554
|
-
enumerable: true,
|
|
4555
|
-
get: function() {
|
|
4556
|
-
return ResizableHandle;
|
|
4557
|
-
}
|
|
4558
|
-
});
|
|
4559
|
-
Object.defineProperty(exports, "ResizablePanel", {
|
|
4560
|
-
enumerable: true,
|
|
4561
|
-
get: function() {
|
|
4562
|
-
return ResizablePanel;
|
|
4563
|
-
}
|
|
4564
|
-
});
|
|
4565
|
-
Object.defineProperty(exports, "ResizablePanelGroup", {
|
|
4566
|
-
enumerable: true,
|
|
4567
|
-
get: function() {
|
|
4568
|
-
return ResizablePanelGroup;
|
|
4569
|
-
}
|
|
4570
|
-
});
|
|
4571
4153
|
Object.defineProperty(exports, "SHADER_OVERLAY_PARAM_KEYS", {
|
|
4572
4154
|
enumerable: true,
|
|
4573
4155
|
get: function() {
|
|
@@ -4613,7 +4195,7 @@ Object.defineProperty(exports, "Section", {
|
|
|
4613
4195
|
Object.defineProperty(exports, "Separator", {
|
|
4614
4196
|
enumerable: true,
|
|
4615
4197
|
get: function() {
|
|
4616
|
-
return Separator
|
|
4198
|
+
return Separator;
|
|
4617
4199
|
}
|
|
4618
4200
|
});
|
|
4619
4201
|
Object.defineProperty(exports, "ShaderSurface", {
|
|
@@ -4628,12 +4210,6 @@ Object.defineProperty(exports, "StepBuilder", {
|
|
|
4628
4210
|
return StepBuilder;
|
|
4629
4211
|
}
|
|
4630
4212
|
});
|
|
4631
|
-
Object.defineProperty(exports, "Switch", {
|
|
4632
|
-
enumerable: true,
|
|
4633
|
-
get: function() {
|
|
4634
|
-
return Switch;
|
|
4635
|
-
}
|
|
4636
|
-
});
|
|
4637
4213
|
Object.defineProperty(exports, "THEME_PALETTES", {
|
|
4638
4214
|
enumerable: true,
|
|
4639
4215
|
get: function() {
|
|
@@ -4646,12 +4222,6 @@ Object.defineProperty(exports, "Text", {
|
|
|
4646
4222
|
return Text;
|
|
4647
4223
|
}
|
|
4648
4224
|
});
|
|
4649
|
-
Object.defineProperty(exports, "Textarea", {
|
|
4650
|
-
enumerable: true,
|
|
4651
|
-
get: function() {
|
|
4652
|
-
return Textarea;
|
|
4653
|
-
}
|
|
4654
|
-
});
|
|
4655
4225
|
Object.defineProperty(exports, "Toggle", {
|
|
4656
4226
|
enumerable: true,
|
|
4657
4227
|
get: function() {
|