@reopt-ai/opt-ui 1.12.5 → 1.14.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.
Files changed (42) hide show
  1. package/CHANGELOG.md +236 -0
  2. package/COMPONENT_CATALOG.md +670 -123
  3. package/README.md +9 -7
  4. package/dist/core/index.cjs +13 -13
  5. package/dist/core/index.d.cts +2 -2
  6. package/dist/core/index.d.ts +2 -2
  7. package/dist/core/index.js +2 -2
  8. package/dist/docs/02-components/01-core.md +260 -61
  9. package/dist/docs/02-components/02-visuals.md +1 -1
  10. package/dist/docs/02-components/03-shells.md +431 -63
  11. package/dist/docs/02-components/04-surfaces.md +1 -1
  12. package/dist/docs/02-components/index.md +4 -4
  13. package/dist/{field-sidebar-YaWHfLLW.d.ts → field-sidebar-CJ4HxP8D.d.cts} +824 -2
  14. package/dist/{field-sidebar-Ct8c9L4V.d.cts → field-sidebar-DnhpcT2A.d.ts} +824 -2
  15. package/dist/{field-sidebar-DwtrYSSt.cjs → field-sidebar-ePqFX6MN.cjs} +4339 -244
  16. package/dist/{field-sidebar-Ben7MQD4.js → field-sidebar-mSVCMAZp.js} +3976 -235
  17. package/dist/id-registry.cjs +80 -0
  18. package/dist/id-registry.js +80 -0
  19. package/dist/id-registry.json +170 -0
  20. package/dist/index.cjs +1096 -1476
  21. package/dist/index.d.cts +243 -92
  22. package/dist/index.d.ts +243 -92
  23. package/dist/index.js +1004 -1415
  24. package/dist/{key-pad-menu-BpQebDyw.cjs → key-pad-menu-BgtSL3xe.cjs} +60 -487
  25. package/dist/{key-pad-menu-CYYtS_Tl.js → key-pad-menu-CqFI6la9.js} +61 -422
  26. package/dist/{key-pad-menu-CwcY_Vps.d.cts → key-pad-menu-D6pYzaj-.d.cts} +14 -56
  27. package/dist/{key-pad-menu-WBJShCJn.d.ts → key-pad-menu-Yh7Fpb8m.d.ts} +14 -56
  28. package/dist/meta.cjs +1312 -12
  29. package/dist/meta.js +1312 -12
  30. package/dist/shells/index.cjs +20 -1
  31. package/dist/shells/index.d.cts +2 -2
  32. package/dist/shells/index.d.ts +2 -2
  33. package/dist/shells/index.js +2 -2
  34. package/dist/{text-truncate-CQyfUZvq.d.cts → text-truncate-Bbul-jMD.d.cts} +52 -30
  35. package/dist/{text-truncate-CQyfUZvq.d.ts → text-truncate-Bbul-jMD.d.ts} +52 -30
  36. package/dist/{text-truncate-Dlm7JwDf.js → text-truncate-Bd-0WkSP.js} +461 -97
  37. package/dist/{text-truncate-CqdiQuj8.cjs → text-truncate-BeYW6XZu.cjs} +523 -99
  38. package/dist/theme/server.cjs +2 -2
  39. package/dist/theme/server.d.cts +2 -2
  40. package/dist/theme/server.d.ts +2 -2
  41. package/dist/theme/server.js +2 -2
  42. package/package.json +6 -2
@@ -1,15 +1,14 @@
1
1
  "use client";
2
- import { Bn as OPT_FOCUS, Cn as getDescribedBy, En as OPT_ANIMATE_ENTER_EXIT, Ft as SelectRoot$1, It as SelectTrigger$1, Kn as OPT_SURFACE, Mn as OPT_BORDER, Mt as SelectItem$1, Pt as SelectPopover$1, Qn as OPT_TEXTAREA_SIZE, Qt as useInputId, Sn as RequiredMark, Tn as OPT_ANIMATE_DRAWER, Un as OPT_INPUT, Vn as OPT_FOCUS_VISIBLE, ar as _objectWithoutProperties, bn as useControlledState, cn as Badge, dn as koBreadcrumbLabels, dt as MenuSeparator$1, er as OPT_TEXT_PRIMARY, f as formatOptNumber, ft as MenuTrigger$1, ir as _objectSpread2, lt as MenuPopover$1, nr as OPT_TEXT_TERTIARY, ot as MenuItem$1, sn as Spinner, sr as cn, tr as OPT_TEXT_SECONDARY, un as Button, ut as MenuRoot$1, xn as FieldMessages } from "./text-truncate-Dlm7JwDf.js";
2
+ import { Bt as SelectItem$1, Ht as SelectPopover$1, In as OPT_ANIMATE_DRAWER, Ln as OPT_ANIMATE_ENTER_EXIT, Mn as FieldMessages, Nn as RequiredMark, Pn as getDescribedBy, Qn as OPT_FOCUS_VISIBLE, Sn as koBreadcrumbLabels, Un as OPT_BORDER, Ut as SelectRoot$1, Wt as SelectTrigger$1, Zn as OPT_FOCUS, _n as Spinner, _r as cn, b as formatOptNumber, dr as OPT_TEXT_SECONDARY, er as OPT_INPUT, fr as OPT_TEXT_TERTIARY, hr as _objectWithoutProperties, jn as useControlledState, mr as _objectSpread2, rr as OPT_SURFACE, ur as OPT_TEXT_PRIMARY, vn as Badge, xn as Button } from "./text-truncate-Bd-0WkSP.js";
3
3
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
4
  import * as React from "react";
5
5
  import { createContext, createElement, forwardRef, useCallback, useContext, useEffect, useId, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState } from "react";
6
6
  import { AccordionContent, AccordionItem, AccordionRoot, AccordionTrigger, DialogDismiss, DialogPanel, DialogRoot, RadioGroupRoot, Separator, Toggle, ToggleGroup, useDialogClose, useRadioGroupContext } from "@reopt-ai/opt-ui-primitives";
7
- import { Check, ChevronDown, Copy, GripVertical, Pencil, X } from "lucide-react";
8
- import { Group, Panel, Separator as Separator$1 } from "react-resizable-panels";
7
+ import { Check, ChevronDown, Pencil, X } from "lucide-react";
9
8
  import { Mesh, Program, Renderer, Triangle } from "ogl";
10
9
  import { hexToSrgb } from "@reopt-ai/opt-palette";
11
10
  //#region src/core/text.tsx
12
- const _excluded$15 = [
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 = _objectWithoutProperties(_ref, _excluded$15);
27
+ let { as, variant = "body", tone = "primary", truncate = false, className, children } = _ref, props = _objectWithoutProperties(_ref, _excluded$11);
29
28
  const Component = as !== null && as !== void 0 ? as : "span";
30
29
  const elementProps = _objectSpread2(_objectSpread2({}, props), {}, {
31
30
  className: 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$14 = [
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 = _objectWithoutProperties(_ref, _excluded$14);
50
+ let { level = 2, variant = `heading-${level}`, className, children } = _ref, props = _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$2({ orientation = "horizontal", decorative = false, children, className }) {
74
+ function Separator$1({ orientation = "horizontal", decorative = false, children, className }) {
76
75
  if (orientation === "horizontal" && children != null) return /* @__PURE__ */ jsxs("div", {
77
76
  className: cn("gap-element flex items-center", className),
78
77
  "data-opt-id": "7PWJS",
@@ -102,7 +101,7 @@ function Separator$2({ orientation = "horizontal", decorative = false, children,
102
101
  "data-opt-slug": "separator.Separator"
103
102
  });
104
103
  }
105
- Separator$2.displayName = "Separator";
104
+ Separator$1.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$13 = [
269
+ const _excluded$9 = [
271
270
  "size",
272
271
  "className",
273
272
  "children"
274
273
  ];
275
- const _excluded2$7 = [
274
+ const _excluded2$5 = [
276
275
  "className",
277
276
  "children",
278
277
  "orientation"
279
278
  ];
280
- const sizeStyles$7 = {
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 = 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", OPT_FOCUS_VISIBLE);
285
284
  /** A two-state (pressed) button. Use standalone or inside `ToggleGroup`. */
286
285
  function Toggle$1(_ref) {
287
- let { size = "md", className, children } = _ref, props = _objectWithoutProperties(_ref, _excluded$13);
288
- return /* @__PURE__ */ jsx(Toggle, _objectSpread2(_objectSpread2({ className: cn(toggleBase, sizeStyles$7[size], className) }, props), {}, {
286
+ let { size = "md", className, children } = _ref, props = _objectWithoutProperties(_ref, _excluded$9);
287
+ return /* @__PURE__ */ jsx(Toggle, _objectSpread2(_objectSpread2({ className: 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$1(_ref) {
294
293
  Toggle$1.displayName = "Toggle";
295
294
  /** A set of related toggles with shared selection and keyboard navigation. */
296
295
  function ToggleGroup$1(_ref2) {
297
- let { className, children, orientation = "horizontal" } = _ref2, props = _objectWithoutProperties(_ref2, _excluded2$7);
296
+ let { className, children, orientation = "horizontal" } = _ref2, props = _objectWithoutProperties(_ref2, _excluded2$5);
298
297
  return /* @__PURE__ */ jsx(ToggleGroup, _objectSpread2(_objectSpread2({
299
298
  orientation,
300
299
  "aria-orientation": orientation,
@@ -308,15 +307,15 @@ function ToggleGroup$1(_ref2) {
308
307
  ToggleGroup$1.displayName = "ToggleGroup";
309
308
  //#endregion
310
309
  //#region src/core/accordion.tsx
311
- const _excluded$12 = ["className"];
312
- const _excluded2$6 = ["className"];
313
- const _excluded3$3 = ["className", "children"];
314
- const _excluded4$2 = ["className", "children"];
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 ${OPT_FOCUS} disabled:cursor-not-allowed disabled:opacity-50`;
316
315
  const contentClass = `overflow-hidden text-sm text-text-secondary ${OPT_ANIMATE_ENTER_EXIT}`;
317
316
  /** A vertically stacked set of expandable panels (single or multiple open). */
318
317
  function AccordionRoot$1(_ref) {
319
- let { className } = _ref, props = _objectWithoutProperties(_ref, _excluded$12);
318
+ let { className } = _ref, props = _objectWithoutProperties(_ref, _excluded$8);
320
319
  return /* @__PURE__ */ jsx("div", {
321
320
  className: cn("border-border border-y", className),
322
321
  "data-opt-id": "CSBA9",
@@ -327,7 +326,7 @@ function AccordionRoot$1(_ref) {
327
326
  AccordionRoot$1.displayName = "AccordionRoot";
328
327
  /** A single accordion entry, identified by its `value`. */
329
328
  function AccordionItem$1(_ref2) {
330
- let { className } = _ref2, props = _objectWithoutProperties(_ref2, _excluded2$6);
329
+ let { className } = _ref2, props = _objectWithoutProperties(_ref2, _excluded2$4);
331
330
  return /* @__PURE__ */ jsx(AccordionItem, _objectSpread2(_objectSpread2({ className: 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$1(_ref2) {
336
335
  AccordionItem$1.displayName = "AccordionItem";
337
336
  /** The clickable header that expands/collapses its panel. */
338
337
  function AccordionTrigger$1(_ref3) {
339
- let { className, children } = _ref3, props = _objectWithoutProperties(_ref3, _excluded3$3);
338
+ let { className, children } = _ref3, props = _objectWithoutProperties(_ref3, _excluded3$1);
340
339
  return /* @__PURE__ */ jsxs(AccordionTrigger, _objectSpread2(_objectSpread2({ className: cn(triggerClass, className) }, props), {}, {
341
340
  "data-opt-id": "CWJZZ",
342
341
  "data-opt-slug": "accordion.AccordionTrigger",
@@ -352,7 +351,7 @@ function AccordionTrigger$1(_ref3) {
352
351
  AccordionTrigger$1.displayName = "AccordionTrigger";
353
352
  /** The collapsible panel body associated with a trigger. */
354
353
  function AccordionContent$1(_ref4) {
355
- let { className, children } = _ref4, props = _objectWithoutProperties(_ref4, _excluded4$2);
354
+ let { className, children } = _ref4, props = _objectWithoutProperties(_ref4, _excluded4$1);
356
355
  return /* @__PURE__ */ jsx(AccordionContent, _objectSpread2(_objectSpread2({ className: 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] = useState(false);
427
- const handleCopy = 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__ */ jsx("button", {
435
- type: "button",
436
- onClick: handleCopy,
437
- "aria-label": copied ? copiedLabel : label,
438
- className: cn(OPT_FOCUS_VISIBLE, OPT_TEXT_TERTIARY, "hover:text-text-primary shrink-0 rounded p-0.5 transition-colors"),
439
- children: copied ? /* @__PURE__ */ jsx(Check, {
440
- className: "size-3.5",
441
- "aria-hidden": "true"
442
- }) : /* @__PURE__ */ jsx(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 = _objectSpread2(_objectSpread2({}, defaultLabels$3), customLabels);
470
- if (layout === "inline") return /* @__PURE__ */ jsx("dl", {
471
- className: 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__ */ jsxs("div", {
475
- className: "flex items-baseline gap-2",
476
- children: [/* @__PURE__ */ jsx("dt", {
477
- className: cn(OPT_TEXT_TERTIARY, "text-xs"),
478
- title: item.hint,
479
- children: item.term
480
- }), /* @__PURE__ */ jsx("dd", {
481
- className: cn(OPT_TEXT_PRIMARY, "text-sm font-medium"),
482
- children: item.description || labels.empty
483
- })]
484
- }, item.id))
485
- });
486
- return /* @__PURE__ */ jsx("dl", {
487
- className: 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__ */ jsxs("div", {
491
- className: 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__ */ jsx("dt", {
497
- className: cn(OPT_TEXT_TERTIARY, "text-xs"),
498
- title: item.hint,
499
- children: item.term
500
- }), /* @__PURE__ */ jsxs("dd", {
501
- className: cn(OPT_TEXT_PRIMARY, "flex min-w-0 items-center gap-1.5 text-sm"),
502
- children: [/* @__PURE__ */ jsx("span", {
503
- className: cn("min-w-0", item.wrap ? "break-all" : "truncate", !item.description && "text-text-secondary"),
504
- children: item.description || labels.empty
505
- }), item.copyValue && /* @__PURE__ */ 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$11 = [
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$5 = [
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$6 = {
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 = _objectWithoutProperties(_ref, _excluded$11);
515
+ let { src, srcSet, sizes, crossOrigin, referrerPolicy, alt, name, size = "md", fallback, status, className, onLoadingStatusChange } = _ref, props = _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__ */ jsxs("span", _objectSpread2(_objectSpread2({
658
554
  role: "img",
659
555
  "aria-label": avatarLabel,
660
- className: cn("relative inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full", sizeStyles$6[size], !showImage && bgColor, className)
556
+ className: 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 = _objectWithoutProperties(_ref5, _excluded2$5);
568
+ let { max = 4, size = "md", children, className } = _ref5, props = _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,14 +576,14 @@ 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__ */ jsxs("span", {
683
- className: cn("bg-bg-subtle text-text-secondary ring-surface relative inline-flex items-center justify-center rounded-full font-medium ring-2", sizeStyles$6[size]),
579
+ className: 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
  }));
687
583
  }
688
584
  //#endregion
689
585
  //#region src/core/identity.tsx
690
- const defaultLabels$2 = {
586
+ const defaultLabels$3 = {
691
587
  identified: "Identified",
692
588
  anonymous: "Anonymous"
693
589
  };
@@ -717,7 +613,7 @@ function resolveDisplay(name, secondary, id) {
717
613
  * lose track of when a table mixes profiles and devices.
718
614
  */
719
615
  function Identity({ name, secondary, id, avatarSrc, state, badge, size = "md", hideAvatar = false, labels: customLabels, className }) {
720
- const labels = _objectSpread2(_objectSpread2({}, defaultLabels$2), customLabels);
616
+ const labels = _objectSpread2(_objectSpread2({}, defaultLabels$3), customLabels);
721
617
  const { primary, sub } = resolveDisplay(name, secondary, id);
722
618
  const anonymous = state === "anonymous";
723
619
  const badgeContent = badge !== null && badge !== void 0 ? badge : state ? anonymous ? labels.anonymous : labels.identified : null;
@@ -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$10 = [
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$4 = [
668
+ const _excluded2$2 = [
773
669
  "gap",
774
670
  "className",
775
671
  "children"
776
672
  ];
777
- const _excluded3$2 = [
673
+ const _excluded3 = [
778
674
  "as",
779
675
  "className",
780
676
  "children"
781
677
  ];
782
- const _excluded4$1 = ["className", "children"];
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 = _objectWithoutProperties(_ref, _excluded$10);
691
+ let { variant = "default", padding = "md", shadow = true, selectable = false, selected = false, onSelectedChange, className, children, onClick, onKeyDown, role, tabIndex } = _ref, props = _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 = _objectWithoutProperties(_ref2, _excluded2$4);
734
+ let { gap = "sm", className, children } = _ref2, props = _objectWithoutProperties(_ref2, _excluded2$2);
839
735
  return /* @__PURE__ */ jsx("div", _objectSpread2(_objectSpread2({ className: 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 = _objectWithoutProperties(_ref3, _excluded3$2);
743
+ let { as: Tag = "h3", className, children } = _ref3, props = _objectWithoutProperties(_ref3, _excluded3);
848
744
  return /* @__PURE__ */ jsx(Tag, _objectSpread2(_objectSpread2({ className: cn(`text-lg font-semibold ${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 = _objectWithoutProperties(_ref4, _excluded4$1);
752
+ let { className, children } = _ref4, props = _objectWithoutProperties(_ref4, _excluded4);
857
753
  return /* @__PURE__ */ jsx("p", _objectSpread2(_objectSpread2({ className: cn(`text-sm ${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 = 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 = _objectWithoutProperties(_ref, _excluded$9);
926
- const fallbackId = useId();
927
- const switchId = (_useInputId = 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] = useState(defaultChecked);
936
- const checked = isControlled ? controlledChecked : internalChecked;
937
- const handleClick = 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__ */ jsxs("div", {
949
- className: cn("flex flex-col gap-1.5", className),
950
- "data-opt-id": "51Z9R",
951
- "data-opt-slug": "switch.Switch",
952
- children: [/* @__PURE__ */ jsxs("div", {
953
- className: "flex items-start gap-3",
954
- children: [/* @__PURE__ */ jsx("button", _objectSpread2(_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: 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", OPT_FOCUS_VISIBLE),
964
- "aria-invalid": hasError,
965
- "aria-required": required,
966
- "aria-describedby": getDescribedBy(switchId, error, hintText),
967
- onClick: handleClick
968
- }, props), {}, { children: /* @__PURE__ */ jsx("span", { className: 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__ */ jsxs("div", {
969
- className: "flex flex-col",
970
- children: [label && /* @__PURE__ */ jsxs("span", {
971
- id: labelId,
972
- className: cn("text-text-primary text-sm font-medium", disabled && "opacity-50"),
973
- children: [label, required && /* @__PURE__ */ jsx(RequiredMark, {})]
974
- }), hintText && /* @__PURE__ */ jsx("p", {
975
- id: `${switchId}-hint`,
976
- className: cn("text-text-tertiary text-sm", disabled && "opacity-50"),
977
- children: hintText
978
- })]
979
- })]
980
- }), /* @__PURE__ */ jsx(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 = 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 = forwardRef((_ref, ref) => {
1009
- var _useInputId;
1010
- let { label, error, hint, fullWidth = false, required, resize = "vertical", size = "md", className, id, rows = 4 } = _ref, props = _objectWithoutProperties(_ref, _excluded$8);
1011
- const fallbackId = useId().replace(/:/g, "");
1012
- const textareaId = (_useInputId = useInputId(id, label, "textarea")) !== null && _useInputId !== void 0 ? _useInputId : `textarea-${fallbackId}`;
1013
- const hasError = Boolean(error);
1014
- return /* @__PURE__ */ jsxs("div", {
1015
- className: 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__ */ jsxs("label", {
1020
- htmlFor: textareaId,
1021
- className: "text-text-primary text-sm font-medium",
1022
- children: [label, required && /* @__PURE__ */ jsx(RequiredMark, {})]
1023
- }),
1024
- /* @__PURE__ */ jsx("textarea", _objectSpread2({
1025
- ref,
1026
- id: textareaId,
1027
- rows,
1028
- className: 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", 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": getDescribedBy(textareaId, error, hint)
1031
- }, props)),
1032
- /* @__PURE__ */ jsx(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$7 = [
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$3 = [
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 = _objectWithoutProperties(_ref, _excluded$7);
831
+ let { value, max = 100, size = "md", variant = "default", showLabel = false, label, animated = true, indeterminate = false, className } = _ref, props = _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__ */ jsxs("div", _objectSpread2(_objectSpread2({ className: 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 = _objectWithoutProperties(_ref2, _excluded2$3);
870
+ let { value, max = 100, size = 48, strokeWidth = 4, variant = "default", showLabel = false, label, indeterminate = false, className } = _ref2, props = _objectWithoutProperties(_ref2, _excluded2$1);
1129
871
  const labelId = useId();
1130
872
  const isIndeterminate = indeterminate || value === void 0;
1131
873
  const progress = isIndeterminate ? null : getProgressValue(value, max);
@@ -1342,6 +1084,7 @@ function StepBuilder({ steps, onChange, label, addLabel = "Add step", maxSteps,
1342
1084
  StepBuilder.displayName = "StepBuilder";
1343
1085
  //#endregion
1344
1086
  //#region src/core/condition-builder.tsx
1087
+ const defaultLabels$2 = { previewSuffix: "matches" };
1345
1088
  const OPERATOR_LABELS = {
1346
1089
  equals: "equals",
1347
1090
  not_equals: "does not equal",
@@ -1400,8 +1143,9 @@ function collectConditionBuilderIds(groups) {
1400
1143
  };
1401
1144
  }
1402
1145
  /** Renders the condition builder component. */
1403
- function ConditionBuilder({ groups, onChange, properties = DEFAULT_PROPERTIES, label, addConditionLabel = "Add condition", addGroupLabel = "Add group", addNestedGroupLabel = "Add nested group", nested = false, maxDepth = 3, conditionTypes, onPreview, previewCount, className, "aria-label": ariaLabel }) {
1146
+ function ConditionBuilder({ groups, onChange, properties = DEFAULT_PROPERTIES, label, addConditionLabel = "Add condition", addGroupLabel = "Add group", addNestedGroupLabel = "Add nested group", nested = false, maxDepth = 3, conditionTypes, onPreview, previewCount, labels: customLabels, className, "aria-label": ariaLabel }) {
1404
1147
  var _ref;
1148
+ const labels = _objectSpread2(_objectSpread2({}, defaultLabels$2), customLabels);
1405
1149
  const inheritedIdScope = React.useContext(ConditionBuilderIdScopeContext);
1406
1150
  const nextGroupIdRef = React.useRef(1);
1407
1151
  const nextConditionIdRef = React.useRef(1);
@@ -1618,7 +1362,8 @@ function ConditionBuilder({ groups, onChange, properties = DEFAULT_PROPERTIES, l
1618
1362
  addNestedGroupLabel,
1619
1363
  nested,
1620
1364
  maxDepth: maxDepth - 1,
1621
- conditionTypes
1365
+ conditionTypes,
1366
+ labels: customLabels
1622
1367
  })
1623
1368
  }),
1624
1369
  /* @__PURE__ */ jsxs("div", {
@@ -1661,9 +1406,9 @@ function ConditionBuilder({ groups, onChange, properties = DEFAULT_PROPERTIES, l
1661
1406
  onClick: addGroup,
1662
1407
  className: "self-start",
1663
1408
  children: ["+ ", addGroupLabel]
1664
- }), previewCount != null && /* @__PURE__ */ jsxs("span", {
1409
+ }), previewCount != null && /* @__PURE__ */ jsx("span", {
1665
1410
  className: cn("text-text-secondary", "text-sm"),
1666
- children: [formatOptNumber(previewCount), " matches"]
1411
+ children: labels.formatPreview ? labels.formatPreview(previewCount) : `${formatOptNumber(previewCount)} ${labels.previewSuffix}`
1667
1412
  })]
1668
1413
  })
1669
1414
  ]
@@ -1672,47 +1417,8 @@ function ConditionBuilder({ groups, onChange, properties = DEFAULT_PROPERTIES, l
1672
1417
  }
1673
1418
  ConditionBuilder.displayName = "ConditionBuilder";
1674
1419
  //#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 = MenuRoot$1;
1681
- /** Renders the dropdown trigger component. */
1682
- function DropdownTrigger(_ref) {
1683
- let { className } = _ref, props = _objectWithoutProperties(_ref, _excluded$6);
1684
- return /* @__PURE__ */ jsx(MenuTrigger$1, _objectSpread2(_objectSpread2({ className: 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 = _objectWithoutProperties(_ref2, _excluded2$2);
1692
- return /* @__PURE__ */ jsx(MenuPopover$1, _objectSpread2(_objectSpread2({ className: 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 = _objectWithoutProperties(_ref3, _excluded3$1);
1700
- return /* @__PURE__ */ jsx(MenuItem$1, _objectSpread2(_objectSpread2({ className: 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 = _objectWithoutProperties(_ref4, _excluded4);
1708
- return /* @__PURE__ */ jsx(MenuSeparator$1, _objectSpread2(_objectSpread2({ className: cn(className) }, props), {}, {
1709
- "data-opt-id": "K9Y54",
1710
- "data-opt-slug": "dropdown-menu.DropdownSeparator"
1711
- }));
1712
- }
1713
- //#endregion
1714
1420
  //#region src/core/radio-group.tsx
1715
- const _excluded$5 = [
1421
+ const _excluded$4 = [
1716
1422
  "label",
1717
1423
  "hint",
1718
1424
  "description",
@@ -1759,7 +1465,7 @@ function RadioGroup({ children, value, defaultValue = "", onChange, disabled, si
1759
1465
  children: [/* @__PURE__ */ jsxs(RadioGroupRoot, {
1760
1466
  value,
1761
1467
  defaultValue,
1762
- onChange,
1468
+ onValueChange: onChange,
1763
1469
  disabled,
1764
1470
  orientation,
1765
1471
  name,
@@ -1784,7 +1490,7 @@ function RadioGroup({ children, value, defaultValue = "", onChange, disabled, si
1784
1490
  }
1785
1491
  const Radio$1 = forwardRef((_ref, ref) => {
1786
1492
  var _ref2;
1787
- let { label, hint, description, value, name: _name, size: sizeProp, disabled: disabledProp, className } = _ref, props = _objectWithoutProperties(_ref, _excluded$5);
1493
+ let { label, hint, description, value, name: _name, size: sizeProp, disabled: disabledProp, className } = _ref, props = _objectWithoutProperties(_ref, _excluded$4);
1788
1494
  const groupContext = useContext(RadioGroupContext);
1789
1495
  const primContext = useRadioGroupContext();
1790
1496
  const size = sizeProp !== null && sizeProp !== void 0 ? sizeProp : groupContext.size;
@@ -1846,7 +1552,7 @@ const Radio$1 = forwardRef((_ref, ref) => {
1846
1552
  Radio$1.displayName = "Radio";
1847
1553
  //#endregion
1848
1554
  //#region src/core/loading-overlay.tsx
1849
- const _excluded$4 = [
1555
+ const _excluded$3 = [
1850
1556
  "loading",
1851
1557
  "children",
1852
1558
  "label",
@@ -1854,7 +1560,7 @@ const _excluded$4 = [
1854
1560
  ];
1855
1561
  /** Renders the loading overlay component. */
1856
1562
  function LoadingOverlay(_ref) {
1857
- let { loading, children, label = "Loading…", className } = _ref, props = _objectWithoutProperties(_ref, _excluded$4);
1563
+ let { loading, children, label = "Loading…", className } = _ref, props = _objectWithoutProperties(_ref, _excluded$3);
1858
1564
  return /* @__PURE__ */ jsxs("div", _objectSpread2(_objectSpread2({
1859
1565
  "data-opt-id": "380ZR",
1860
1566
  "data-opt-slug": "loading-overlay.LoadingOverlay"
@@ -1881,7 +1587,7 @@ function LoadingOverlay(_ref) {
1881
1587
  LoadingOverlay.displayName = "LoadingOverlay";
1882
1588
  //#endregion
1883
1589
  //#region src/core/block-layout.tsx
1884
- const _excluded$3 = [
1590
+ const _excluded$2 = [
1885
1591
  "children",
1886
1592
  "className",
1887
1593
  "spacing",
@@ -1903,7 +1609,7 @@ const insetClass = {
1903
1609
  };
1904
1610
  /** Renders the block layout component. */
1905
1611
  function BlockLayout(_ref) {
1906
- let { children, className, spacing = "section", inset, loading, loadingLabel } = _ref, props = _objectWithoutProperties(_ref, _excluded$3);
1612
+ let { children, className, spacing = "section", inset, loading, loadingLabel } = _ref, props = _objectWithoutProperties(_ref, _excluded$2);
1907
1613
  const layoutClassName = cn("flex flex-col", spacingClass[spacing], inset ? insetClass[inset] : void 0, className);
1908
1614
  if (loading) return /* @__PURE__ */ jsx(LoadingOverlay, _objectSpread2(_objectSpread2({
1909
1615
  "data-opt-id": "9D8QR",
@@ -1925,7 +1631,7 @@ function BlockLayout(_ref) {
1925
1631
  BlockLayout.displayName = "BlockLayout";
1926
1632
  //#endregion
1927
1633
  //#region src/core/create-block.tsx
1928
- const _excluded$2 = ["loading", "className"];
1634
+ const _excluded$1 = ["loading", "className"];
1929
1635
  /**
1930
1636
  * Block 팩토리. BlockLayout 래핑을 구조적으로 강제합니다.
1931
1637
  *
@@ -1935,7 +1641,7 @@ const _excluded$2 = ["loading", "className"];
1935
1641
  */
1936
1642
  function createBlock(name, render, options) {
1937
1643
  const Component = (props) => {
1938
- const { loading, className } = props, rest = _objectWithoutProperties(props, _excluded$2);
1644
+ const { loading, className } = props, rest = _objectWithoutProperties(props, _excluded$1);
1939
1645
  const layoutCn = (options === null || options === void 0 ? void 0 : options.layoutClassName) ? `${options.layoutClassName}${className ? ` ${className}` : ""}` : className;
1940
1646
  return /* @__PURE__ */ jsx(BlockLayout, {
1941
1647
  loading,
@@ -2032,73 +1738,6 @@ function Section({ children, title, description, className }) {
2032
1738
  }
2033
1739
  Section.displayName = "Section";
2034
1740
  //#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 = _objectWithoutProperties(_ref, _excluded$1);
2058
- return /* @__PURE__ */ jsx(Group, _objectSpread2(_objectSpread2({
2059
- orientation: direction,
2060
- id: id !== null && id !== void 0 ? id : autoSaveId,
2061
- className: 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 = _objectWithoutProperties(_ref2, _excluded2$1);
2072
- return /* @__PURE__ */ jsx(Panel, _objectSpread2(_objectSpread2({
2073
- collapsedSize: toPanelSize(collapsedSize),
2074
- defaultSize: toPanelSize(defaultSize),
2075
- minSize: toPanelSize(minSize),
2076
- maxSize: toPanelSize(maxSize),
2077
- className: 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 = _objectWithoutProperties(_ref3, _excluded3);
2088
- return /* @__PURE__ */ jsx(Separator$1, _objectSpread2(_objectSpread2({ className: 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__ */ 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__ */ jsx(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
1741
  //#region src/core/logo.tsx
2103
1742
  const markSizeStyles = {
2104
1743
  sm: "h-6 w-6",
@@ -4010,7 +3649,7 @@ function ColorPalettePicker({ palettes, value, onValueChange, label = "Colour pa
4010
3649
  children: label
4011
3650
  }), /* @__PURE__ */ jsxs(SelectRoot$1, {
4012
3651
  value: (_ref = value !== null && value !== void 0 ? value : selected === null || selected === void 0 ? void 0 : selected.id) !== null && _ref !== void 0 ? _ref : "",
4013
- setValue: (next) => {
3652
+ onValueChange: (next) => {
4014
3653
  if (typeof next === "string") onValueChange === null || onValueChange === void 0 || onValueChange(next);
4015
3654
  },
4016
3655
  children: [/* @__PURE__ */ jsx(SelectTrigger$1, {
@@ -4286,4 +3925,4 @@ function KeyPadMenu({ items, label, selection = "single", value, onValueChange,
4286
3925
  });
4287
3926
  }
4288
3927
  //#endregion
4289
- export { Identity as $, PageHeader as A, DropdownTrigger as B, Logo as C, Section as D, ResizablePanelGroup as E, RadioGroup as F, Textarea as G, StepBuilder as H, DropdownContent as I, CardContent as J, Switch as K, DropdownItem as L, BlockLayout as M, LoadingOverlay as N, Container as O, Radio$1 as P, CardTitle as Q, DropdownMenu as R, DrawerRoot as S, ResizablePanel as T, CircularProgress as U, ConditionBuilder as V, Progress as W, CardFooter as X, CardDescription as Y, CardHeader as Z, getShaderFragment as _, THEME_PALETTES as a, AccordionItem$1 as at, DrawerClose as b, ExpressionGroup as c, Toggle$1 as ct, ShaderSurface as d, Separator$2 as dt, Avatar as et, SHADER_OVERLAY_PARAM_KEYS as f, Heading as ft, SHADER_PRESET_IDS as g, SHADER_PRESETS as h, ColorPalettePicker as i, AccordionContent$1 as it, createBlock as j, ScrollArea as k, Facet as l, ToggleGroup$1 as lt, SHADER_PARAM_KEYS as m, InlineEdit as n, DescriptionList as nt, LiveRegion as o, AccordionRoot$1 as ot, SHADER_PARAM_FALLBACK as p, Text as pt, Card as q, ColorPaletteDisplay as r, Breadcrumb as rt, Expression as s, AccordionTrigger$1 as st, KeyPadMenu as t, AvatarGroup as tt, FacetGroup as u, OtpField as ut, getShaderPreset as v, ResizableHandle as w, DrawerPanel as x, VirtualList as y, DropdownSeparator as z };
3928
+ export { OtpField as $, LoadingOverlay as A, CardFooter as B, Logo as C, PageHeader as D, ScrollArea as E, CircularProgress as F, AvatarGroup as G, CardTitle as H, Progress as I, AccordionItem$1 as J, Breadcrumb as K, Card as L, RadioGroup as M, ConditionBuilder as N, createBlock as O, StepBuilder as P, ToggleGroup$1 as Q, CardContent as R, DrawerRoot as S, Container as T, Identity as U, CardHeader as V, Avatar as W, AccordionTrigger$1 as X, AccordionRoot$1 as Y, Toggle$1 as Z, getShaderFragment as _, THEME_PALETTES as a, DrawerClose as b, ExpressionGroup as c, ShaderSurface as d, Separator$1 as et, SHADER_OVERLAY_PARAM_KEYS as f, SHADER_PRESET_IDS as g, SHADER_PRESETS as h, ColorPalettePicker as i, Radio$1 as j, BlockLayout as k, Facet as l, SHADER_PARAM_KEYS as m, InlineEdit as n, Text as nt, LiveRegion as o, SHADER_PARAM_FALLBACK as p, AccordionContent$1 as q, ColorPaletteDisplay as r, Expression as s, KeyPadMenu as t, Heading as tt, FacetGroup as u, getShaderPreset as v, Section as w, DrawerPanel as x, VirtualList as y, CardDescription as z };