@nurix/ui-component-library 1.1.4-stage.113 → 1.1.4-stage.115

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/dist/index.js CHANGED
@@ -6548,6 +6548,7 @@ __export(index_exports, {
6548
6548
  SelectTrigger: () => SelectTrigger,
6549
6549
  SelectValue: () => SelectValue,
6550
6550
  ShadowDOMWrapper: () => ShadowDOMWrapper,
6551
+ SidePanel: () => SidePanel,
6551
6552
  Spinner: () => Spinner,
6552
6553
  Stepper: () => Stepper,
6553
6554
  StepperBar: () => StepperBar,
@@ -8109,8 +8110,12 @@ var NAVIGATION_TOKENS = {
8109
8110
  unselected: "bg-transparent",
8110
8111
  iconWrap: "shrink-0 [&>svg]:h-4 [&>svg]:w-4",
8111
8112
  groupTop: "flex items-center gap-0",
8112
- groupSide: "flex w-full flex-col items-start gap-1",
8113
- groupSection: "flex w-full flex-col items-start gap-1",
8113
+ // `items-stretch` so every tab fills the full cross-axis width of the
8114
+ // list. With `items-start` each tab shrank to its own text width, so
8115
+ // hover / selected surfaces looked ragged (the shorter labels got a
8116
+ // narrow pill, the longer labels clipped past their neighbours).
8117
+ groupSide: "flex w-full flex-col items-stretch gap-1",
8118
+ groupSection: "flex w-full flex-col items-stretch gap-1",
8114
8119
  labelBase: "shrink-0"
8115
8120
  },
8116
8121
  // --- ListNavigation ---
@@ -9314,9 +9319,12 @@ var SELECT_TOKENS = {
9314
9319
  text: "text-fg-black shrink-0",
9315
9320
  asterisk: "text-fg-destructive shrink-0"
9316
9321
  },
9317
- // Select group (label + select)
9322
+ // Select group (label + select). No `p-1` here — the outer `dropdown.base`
9323
+ // already paints 4px padding around the viewport, so adding it again on the
9324
+ // group produced 8px of whitespace on every edge (visible as extra space
9325
+ // below the last item).
9318
9326
  group: {
9319
- container: "flex flex-col gap-1 p-1 items-start"
9327
+ container: "flex flex-col gap-1 items-start"
9320
9328
  },
9321
9329
  // Spec card (for storybook)
9322
9330
  specCard: "border border-token-light flex flex-col gap-10 items-start p-14 rounded-3xl size-full",
@@ -10204,27 +10212,37 @@ var React25 = __toESM(require("react"));
10204
10212
 
10205
10213
  // src/list-card/variables.ts
10206
10214
  var LIST_TOKENS = {
10207
- base: "cursor-pointer transition-colors hover:bg-interaction-hov-solid-primary",
10215
+ base: "transition-all duration-150 cursor-pointer",
10208
10216
  type: {
10209
- card: "flex flex-col gap-4 items-start p-6",
10217
+ // Card: vertical stack, 20px padding, 16px gap
10218
+ card: "flex flex-col gap-4 items-start p-5",
10219
+ // List: horizontal row, 16px gap, 16px / 24px padding
10210
10220
  list: "flex gap-4 items-center py-4 px-6"
10211
10221
  },
10212
10222
  variant: {
10213
10223
  card: {
10214
- default: "bg-token-white",
10215
- outline: "bg-token-white border border-token-light px-6",
10216
- muted: "bg-token-grey"
10224
+ // Figma 6249:35274 — default rest state: white bg, 1px xlight border,
10225
+ // shadow-sm. On hover we darken the border to `light` and deepen the
10226
+ // shadow to `shadow-lg`; on press we scale down to 0.955 to mimic a
10227
+ // button press without shifting surrounding layout.
10228
+ default: "bg-token-white border border-token-xlight shadow-sm hover:border-token-light hover:shadow-lg active:scale-[0.955] active:shadow-sm",
10229
+ // Outline drops the shadow, keeps the border emphasis.
10230
+ outline: "bg-token-white border border-token-light hover:bg-interaction-hov-solid-primary active:scale-[0.955]",
10231
+ // Muted fill variant — unchanged interactive behaviour.
10232
+ muted: "bg-token-grey hover:bg-interaction-hov-solid-primary active:scale-[0.955]"
10217
10233
  },
10218
10234
  list: {
10219
- default: "",
10220
- outline: "border border-token-light px-4",
10221
- muted: "bg-token-grey"
10235
+ default: "hover:bg-interaction-hov-solid-primary",
10236
+ outline: "border border-token-light px-4 hover:bg-interaction-hov-solid-primary",
10237
+ muted: "bg-token-grey hover:bg-interaction-hov-solid-primary"
10222
10238
  }
10223
10239
  },
10224
10240
  radius: {
10225
10241
  none: `${DEFAULT_THEME.radius.mode1.roundedNone}px`,
10226
10242
  soft: `${DEFAULT_THEME.radius.mode1.roundedMd}px`,
10227
- rounded: `${DEFAULT_THEME.radius.mode1.rounded2xl}px`
10243
+ // Figma 6249:35274 specifies 20px corner radius on cards. The mode-1
10244
+ // `rounded2xl` token is 16px, so we pin the card-default to 20px here.
10245
+ rounded: "20px"
10228
10246
  }
10229
10247
  };
10230
10248
 
@@ -10279,8 +10297,8 @@ var SURFACE_TOKENS = {
10279
10297
  * the system (Dialog uses 24px as well).
10280
10298
  */
10281
10299
  padded: "p-6 gap-4",
10282
- header: "flex items-center gap-[10px] text-lg font-semibold leading-7 text-fg-black",
10283
- body: "flex flex-col gap-2 text-sm font-normal leading-5 text-fg-black",
10300
+ header: "flex items-center gap-[10px] text-lg font-semibold leading-7 text-fg-black min-w-0 break-words",
10301
+ body: "flex flex-col gap-2 text-sm font-normal leading-5 text-fg-black min-w-0 break-words",
10284
10302
  footer: "flex items-center justify-end gap-2"
10285
10303
  };
10286
10304
 
@@ -10332,8 +10350,55 @@ var SurfaceFooter = React26.forwardRef(
10332
10350
  );
10333
10351
  SurfaceFooter.displayName = "SurfaceFooter";
10334
10352
 
10335
- // src/tooltip/tooltip.tsx
10353
+ // src/side-panel/side-panel.tsx
10336
10354
  var React27 = __toESM(require("react"));
10355
+
10356
+ // src/side-panel/variables.ts
10357
+ var SIDE_PANEL_TOKENS = {
10358
+ base: "bg-token-white h-full overflow-hidden flex flex-col",
10359
+ size: {
10360
+ sm: "w-[420px]",
10361
+ md: "w-[620px]"
10362
+ },
10363
+ side: {
10364
+ // Panel anchored to the RIGHT edge of the viewport — its LEFT edge is
10365
+ // the inward-facing one, so only left corners are rounded.
10366
+ right: "rounded-l-2xl",
10367
+ // Panel anchored to the LEFT edge of the viewport — mirror.
10368
+ left: "rounded-r-2xl"
10369
+ }
10370
+ };
10371
+
10372
+ // src/side-panel/side-panel.tsx
10373
+ var import_jsx_runtime23 = require("react/jsx-runtime");
10374
+ var SidePanel = React27.forwardRef(
10375
+ ({
10376
+ size = "sm",
10377
+ side = "right",
10378
+ className,
10379
+ children,
10380
+ ...props
10381
+ }, ref) => {
10382
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
10383
+ "div",
10384
+ {
10385
+ ref,
10386
+ className: cn(
10387
+ SIDE_PANEL_TOKENS.base,
10388
+ SIDE_PANEL_TOKENS.size[size],
10389
+ SIDE_PANEL_TOKENS.side[side],
10390
+ className
10391
+ ),
10392
+ ...props,
10393
+ children
10394
+ }
10395
+ );
10396
+ }
10397
+ );
10398
+ SidePanel.displayName = "SidePanel";
10399
+
10400
+ // src/tooltip/tooltip.tsx
10401
+ var React28 = __toESM(require("react"));
10337
10402
  var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
10338
10403
 
10339
10404
  // src/tooltip/variables.ts
@@ -10351,10 +10416,10 @@ var TOOLTIP_TOKENS = {
10351
10416
  };
10352
10417
 
10353
10418
  // src/tooltip/tooltip.tsx
10354
- var import_jsx_runtime23 = require("react/jsx-runtime");
10419
+ var import_jsx_runtime24 = require("react/jsx-runtime");
10355
10420
  var useTooltipContainer = (anchorRef) => {
10356
- const [container, setContainer] = React27.useState(void 0);
10357
- React27.useEffect(() => {
10421
+ const [container, setContainer] = React28.useState(void 0);
10422
+ React28.useEffect(() => {
10358
10423
  var _a5;
10359
10424
  if (typeof document === "undefined") return;
10360
10425
  const anchor = anchorRef.current;
@@ -10366,10 +10431,10 @@ var useTooltipContainer = (anchorRef) => {
10366
10431
  var TooltipProvider = TooltipPrimitive.Provider;
10367
10432
  var Tooltip = TooltipPrimitive.Root;
10368
10433
  var TooltipTrigger = TooltipPrimitive.Trigger;
10369
- var TooltipContent = React27.forwardRef(({ className, sideOffset = 6, shortcut, children, ...props }, ref) => {
10370
- const anchorRef = React27.useRef(null);
10434
+ var TooltipContent = React28.forwardRef(({ className, sideOffset = 6, shortcut, children, ...props }, ref) => {
10435
+ const anchorRef = React28.useRef(null);
10371
10436
  const container = useTooltipContainer(anchorRef);
10372
- const content = /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
10437
+ const content = /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
10373
10438
  TooltipPrimitive.Content,
10374
10439
  {
10375
10440
  ref,
@@ -10382,9 +10447,9 @@ var TooltipContent = React27.forwardRef(({ className, sideOffset = 6, shortcut,
10382
10447
  ),
10383
10448
  ...props,
10384
10449
  children: [
10385
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex items-center", children: [
10450
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex items-center", children: [
10386
10451
  children,
10387
- shortcut && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
10452
+ shortcut && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10388
10453
  "span",
10389
10454
  {
10390
10455
  className: cn(
@@ -10396,7 +10461,7 @@ var TooltipContent = React27.forwardRef(({ className, sideOffset = 6, shortcut,
10396
10461
  }
10397
10462
  )
10398
10463
  ] }),
10399
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
10464
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10400
10465
  TooltipPrimitive.Arrow,
10401
10466
  {
10402
10467
  className: TOOLTIP_TOKENS.arrow,
@@ -10406,15 +10471,15 @@ var TooltipContent = React27.forwardRef(({ className, sideOffset = 6, shortcut,
10406
10471
  ]
10407
10472
  }
10408
10473
  );
10409
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
10410
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { ref: anchorRef, style: { display: "none" } }),
10411
- container ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(TooltipPrimitive.Portal, { container, children: content }) : content
10474
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
10475
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { ref: anchorRef, style: { display: "none" } }),
10476
+ container ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(TooltipPrimitive.Portal, { container, children: content }) : content
10412
10477
  ] });
10413
10478
  });
10414
10479
  TooltipContent.displayName = TooltipPrimitive.Content.displayName;
10415
10480
 
10416
10481
  // src/dialog/dialog.tsx
10417
- var React28 = __toESM(require("react"));
10482
+ var React29 = __toESM(require("react"));
10418
10483
  var import_lucide_react9 = require("lucide-react");
10419
10484
 
10420
10485
  // src/dialog/variables.ts
@@ -10450,10 +10515,10 @@ var DIALOG_TOKENS = {
10450
10515
  };
10451
10516
 
10452
10517
  // src/dialog/dialog.tsx
10453
- var import_jsx_runtime24 = require("react/jsx-runtime");
10454
- var DialogContext = React28.createContext({ close: () => {
10518
+ var import_jsx_runtime25 = require("react/jsx-runtime");
10519
+ var DialogContext = React29.createContext({ close: () => {
10455
10520
  } });
10456
- var Dialog = React28.forwardRef(
10521
+ var Dialog = React29.forwardRef(
10457
10522
  ({
10458
10523
  open,
10459
10524
  onOpenChange,
@@ -10469,8 +10534,8 @@ var Dialog = React28.forwardRef(
10469
10534
  onConfirm,
10470
10535
  className
10471
10536
  }, ref) => {
10472
- const close = React28.useCallback(() => onOpenChange(false), [onOpenChange]);
10473
- React28.useEffect(() => {
10537
+ const close = React29.useCallback(() => onOpenChange(false), [onOpenChange]);
10538
+ React29.useEffect(() => {
10474
10539
  if (!open) return;
10475
10540
  const handler = (e) => {
10476
10541
  if (e.key === "Escape") close();
@@ -10483,7 +10548,7 @@ var Dialog = React28.forwardRef(
10483
10548
  const hasFixedDividers = type === "scrollable-fixed";
10484
10549
  const hasIcon = type === "icon";
10485
10550
  const showClose = !hasIcon;
10486
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DialogContext.Provider, { value: { close }, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: DIALOG_TOKENS.overlay, onClick: close, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
10551
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(DialogContext.Provider, { value: { close }, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: DIALOG_TOKENS.overlay, onClick: close, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
10487
10552
  "div",
10488
10553
  {
10489
10554
  ref,
@@ -10497,24 +10562,24 @@ var Dialog = React28.forwardRef(
10497
10562
  ),
10498
10563
  onClick: (e) => e.stopPropagation(),
10499
10564
  children: [
10500
- hasIcon && icon && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: DIALOG_TOKENS.icon.wrapper, children: icon }),
10501
- title && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: DIALOG_TOKENS.header.wrapper, children: [
10502
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: DIALOG_TOKENS.header.row, children: [
10503
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("h2", { id: "dialog-title", className: DIALOG_TOKENS.header.title, children: title }),
10504
- showClose && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10565
+ hasIcon && icon && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: DIALOG_TOKENS.icon.wrapper, children: icon }),
10566
+ title && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: DIALOG_TOKENS.header.wrapper, children: [
10567
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: DIALOG_TOKENS.header.row, children: [
10568
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("h2", { id: "dialog-title", className: DIALOG_TOKENS.header.title, children: title }),
10569
+ showClose && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
10505
10570
  "button",
10506
10571
  {
10507
10572
  type: "button",
10508
10573
  onClick: close,
10509
10574
  className: DIALOG_TOKENS.header.closeBtn,
10510
10575
  "aria-label": "Close dialog",
10511
- children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react9.X, { className: "size-[18px]" })
10576
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react9.X, { className: "size-[18px]" })
10512
10577
  }
10513
10578
  )
10514
10579
  ] }),
10515
- hasFixedDividers && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: DIALOG_TOKENS.header.divider })
10580
+ hasFixedDividers && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: DIALOG_TOKENS.header.divider })
10516
10581
  ] }),
10517
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10582
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
10518
10583
  "div",
10519
10584
  {
10520
10585
  className: cn(
@@ -10524,10 +10589,10 @@ var Dialog = React28.forwardRef(
10524
10589
  children
10525
10590
  }
10526
10591
  ),
10527
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: DIALOG_TOKENS.footer.wrapper, children: [
10528
- hasFixedDividers && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: DIALOG_TOKENS.footer.divider }),
10529
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: DIALOG_TOKENS.footer.row, children: [
10530
- showCancel && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10592
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: DIALOG_TOKENS.footer.wrapper, children: [
10593
+ hasFixedDividers && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: DIALOG_TOKENS.footer.divider }),
10594
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: DIALOG_TOKENS.footer.row, children: [
10595
+ showCancel && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
10531
10596
  Button,
10532
10597
  {
10533
10598
  variant: "outline",
@@ -10536,7 +10601,7 @@ var Dialog = React28.forwardRef(
10536
10601
  children: cancelLabel
10537
10602
  }
10538
10603
  ),
10539
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10604
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
10540
10605
  Button,
10541
10606
  {
10542
10607
  variant: "primary",
@@ -10553,34 +10618,34 @@ var Dialog = React28.forwardRef(
10553
10618
  }
10554
10619
  );
10555
10620
  Dialog.displayName = "Dialog";
10556
- var DialogIcon = React28.forwardRef(
10557
- ({ children, className }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { ref, className: cn(DIALOG_TOKENS.icon.wrapper, className), children })
10621
+ var DialogIcon = React29.forwardRef(
10622
+ ({ children, className }, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { ref, className: cn(DIALOG_TOKENS.icon.wrapper, className), children })
10558
10623
  );
10559
10624
  DialogIcon.displayName = "DialogIcon";
10560
- var DialogHeader = React28.forwardRef(
10625
+ var DialogHeader = React29.forwardRef(
10561
10626
  ({ title, showClose = true, showDivider = false, className }, ref) => {
10562
- const { close } = React28.useContext(DialogContext);
10563
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { ref, className: cn(DIALOG_TOKENS.header.wrapper, className), children: [
10564
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: DIALOG_TOKENS.header.row, children: [
10565
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("h2", { className: DIALOG_TOKENS.header.title, children: title }),
10566
- showClose && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10627
+ const { close } = React29.useContext(DialogContext);
10628
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { ref, className: cn(DIALOG_TOKENS.header.wrapper, className), children: [
10629
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: DIALOG_TOKENS.header.row, children: [
10630
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("h2", { className: DIALOG_TOKENS.header.title, children: title }),
10631
+ showClose && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
10567
10632
  "button",
10568
10633
  {
10569
10634
  type: "button",
10570
10635
  onClick: close,
10571
10636
  className: DIALOG_TOKENS.header.closeBtn,
10572
10637
  "aria-label": "Close dialog",
10573
- children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react9.X, { className: "size-[18px]" })
10638
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react9.X, { className: "size-[18px]" })
10574
10639
  }
10575
10640
  )
10576
10641
  ] }),
10577
- showDivider && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: DIALOG_TOKENS.header.divider })
10642
+ showDivider && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: DIALOG_TOKENS.header.divider })
10578
10643
  ] });
10579
10644
  }
10580
10645
  );
10581
10646
  DialogHeader.displayName = "DialogHeader";
10582
- var DialogBody = React28.forwardRef(
10583
- ({ children, scrollable = false, className }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10647
+ var DialogBody = React29.forwardRef(
10648
+ ({ children, scrollable = false, className }, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
10584
10649
  "div",
10585
10650
  {
10586
10651
  ref,
@@ -10594,7 +10659,7 @@ var DialogBody = React28.forwardRef(
10594
10659
  )
10595
10660
  );
10596
10661
  DialogBody.displayName = "DialogBody";
10597
- var DialogFooter = React28.forwardRef(
10662
+ var DialogFooter = React29.forwardRef(
10598
10663
  ({
10599
10664
  cancelLabel = "Cancel",
10600
10665
  confirmLabel = "Continue",
@@ -10604,11 +10669,11 @@ var DialogFooter = React28.forwardRef(
10604
10669
  showDivider = false,
10605
10670
  className
10606
10671
  }, ref) => {
10607
- const { close } = React28.useContext(DialogContext);
10608
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { ref, className: cn(DIALOG_TOKENS.footer.wrapper, className), children: [
10609
- showDivider && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: DIALOG_TOKENS.footer.divider }),
10610
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: DIALOG_TOKENS.footer.row, children: [
10611
- showCancel && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10672
+ const { close } = React29.useContext(DialogContext);
10673
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { ref, className: cn(DIALOG_TOKENS.footer.wrapper, className), children: [
10674
+ showDivider && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: DIALOG_TOKENS.footer.divider }),
10675
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: DIALOG_TOKENS.footer.row, children: [
10676
+ showCancel && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
10612
10677
  Button,
10613
10678
  {
10614
10679
  variant: "outline",
@@ -10617,7 +10682,7 @@ var DialogFooter = React28.forwardRef(
10617
10682
  children: cancelLabel
10618
10683
  }
10619
10684
  ),
10620
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
10685
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
10621
10686
  Button,
10622
10687
  {
10623
10688
  variant: "primary",
@@ -10633,7 +10698,7 @@ var DialogFooter = React28.forwardRef(
10633
10698
  DialogFooter.displayName = "DialogFooter";
10634
10699
 
10635
10700
  // src/toast/toast.tsx
10636
- var React29 = __toESM(require("react"));
10701
+ var React30 = __toESM(require("react"));
10637
10702
  var import_sonner = require("sonner");
10638
10703
  var import_lucide_react10 = require("lucide-react");
10639
10704
 
@@ -10676,11 +10741,11 @@ var TOAST_TOKENS = {
10676
10741
  };
10677
10742
 
10678
10743
  // src/toast/toast.tsx
10679
- var import_jsx_runtime25 = require("react/jsx-runtime");
10744
+ var import_jsx_runtime26 = require("react/jsx-runtime");
10680
10745
  var Toaster = ({
10681
10746
  position = "bottom-right",
10682
10747
  ...props
10683
- }) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
10748
+ }) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
10684
10749
  import_sonner.Toaster,
10685
10750
  {
10686
10751
  position,
@@ -10694,7 +10759,7 @@ var TOAST_ICON = {
10694
10759
  error: import_lucide_react10.CircleAlert,
10695
10760
  default: import_lucide_react10.ThumbsUp
10696
10761
  };
10697
- var Toast = React29.forwardRef(
10762
+ var Toast = React30.forwardRef(
10698
10763
  ({
10699
10764
  variant = "default",
10700
10765
  title,
@@ -10709,36 +10774,36 @@ var Toast = React29.forwardRef(
10709
10774
  const Icon2 = TOAST_ICON[variant];
10710
10775
  const clampedProgress = Math.min(100, Math.max(0, progress));
10711
10776
  const useAnimation = showProgress && clampedProgress === 0;
10712
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
10777
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
10713
10778
  "div",
10714
10779
  {
10715
10780
  ref,
10716
10781
  className: cn(TOAST_TOKENS.root, className),
10717
10782
  style,
10718
10783
  children: [
10719
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: TOAST_TOKENS.innerRow, children: [
10720
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: TOAST_TOKENS.content, children: [
10721
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: TOAST_TOKENS.titleRow, children: [
10722
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Icon2, { className: TOAST_TOKENS.icon[variant] }),
10723
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: TOAST_TOKENS.title[variant], children: title })
10784
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: TOAST_TOKENS.innerRow, children: [
10785
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: TOAST_TOKENS.content, children: [
10786
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: TOAST_TOKENS.titleRow, children: [
10787
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon2, { className: TOAST_TOKENS.icon[variant] }),
10788
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: TOAST_TOKENS.title[variant], children: title })
10724
10789
  ] }),
10725
- subtext && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: TOAST_TOKENS.subtextRow, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: TOAST_TOKENS.subtext, children: subtext }) })
10790
+ subtext && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: TOAST_TOKENS.subtextRow, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: TOAST_TOKENS.subtext, children: subtext }) })
10726
10791
  ] }),
10727
- showCancel && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
10792
+ showCancel && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
10728
10793
  "button",
10729
10794
  {
10730
10795
  type: "button",
10731
10796
  onClick: onCancel,
10732
10797
  className: TOAST_TOKENS.cancelBtn,
10733
10798
  "aria-label": "Dismiss",
10734
- children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react10.ChevronRight, {})
10799
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react10.ChevronRight, {})
10735
10800
  }
10736
10801
  )
10737
10802
  ] }),
10738
- showProgress && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: TOAST_TOKENS.progress.wrapper, children: [
10739
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("style", { children: `@keyframes toast-shrink { from { width: 100% } to { width: 0% } }` }),
10740
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: TOAST_TOKENS.progress.track }),
10741
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
10803
+ showProgress && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: TOAST_TOKENS.progress.wrapper, children: [
10804
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("style", { children: `@keyframes toast-shrink { from { width: 100% } to { width: 0% } }` }),
10805
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: TOAST_TOKENS.progress.track }),
10806
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
10742
10807
  "div",
10743
10808
  {
10744
10809
  className: cn(
@@ -10760,7 +10825,7 @@ var showToast = ({
10760
10825
  ...props
10761
10826
  }) => {
10762
10827
  return import_sonner.toast.custom(
10763
- (id) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
10828
+ (id) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
10764
10829
  Toast,
10765
10830
  {
10766
10831
  ...props,
@@ -10772,7 +10837,7 @@ var showToast = ({
10772
10837
  };
10773
10838
 
10774
10839
  // src/stepper/stepper.tsx
10775
- var React30 = __toESM(require("react"));
10840
+ var React31 = __toESM(require("react"));
10776
10841
  var import_lucide_react11 = require("lucide-react");
10777
10842
 
10778
10843
  // src/stepper/variables.ts
@@ -10821,16 +10886,16 @@ var STEPPER_TOKENS = {
10821
10886
  };
10822
10887
 
10823
10888
  // src/stepper/stepper.tsx
10824
- var import_jsx_runtime26 = require("react/jsx-runtime");
10825
- var StepperBar = React30.forwardRef(
10889
+ var import_jsx_runtime27 = require("react/jsx-runtime");
10890
+ var StepperBar = React31.forwardRef(
10826
10891
  ({ totalSteps = 4, currentStep, className, style }, ref) => {
10827
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
10892
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
10828
10893
  "div",
10829
10894
  {
10830
10895
  ref,
10831
10896
  className: cn(STEPPER_TOKENS.bar.root, className),
10832
10897
  style,
10833
- children: Array.from({ length: totalSteps }).map((_2, index2) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
10898
+ children: Array.from({ length: totalSteps }).map((_2, index2) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
10834
10899
  "div",
10835
10900
  {
10836
10901
  className: cn(
@@ -10845,9 +10910,9 @@ var StepperBar = React30.forwardRef(
10845
10910
  }
10846
10911
  );
10847
10912
  StepperBar.displayName = "StepperBar";
10848
- var Stepper = React30.forwardRef(
10913
+ var Stepper = React31.forwardRef(
10849
10914
  ({ steps, className, style }, ref) => {
10850
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
10915
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
10851
10916
  "div",
10852
10917
  {
10853
10918
  ref,
@@ -10856,16 +10921,16 @@ var Stepper = React30.forwardRef(
10856
10921
  children: steps.map((step, index2) => {
10857
10922
  var _a5;
10858
10923
  const state2 = (_a5 = step.state) != null ? _a5 : "incomplete";
10859
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(React30.Fragment, { children: [
10860
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: STEPPER_TOKENS.stepper.step.wrapper, children: [
10861
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
10924
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(React31.Fragment, { children: [
10925
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: STEPPER_TOKENS.stepper.step.wrapper, children: [
10926
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
10862
10927
  "div",
10863
10928
  {
10864
10929
  className: cn(
10865
10930
  STEPPER_TOKENS.stepper.step.indicator.base,
10866
10931
  STEPPER_TOKENS.stepper.step.indicator[state2]
10867
10932
  ),
10868
- children: state2 === "complete" ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react11.Check, { className: STEPPER_TOKENS.stepper.step.checkIcon }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
10933
+ children: state2 === "complete" ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react11.Check, { className: STEPPER_TOKENS.stepper.step.checkIcon }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
10869
10934
  "span",
10870
10935
  {
10871
10936
  className: state2 === "active" ? STEPPER_TOKENS.stepper.step.number.active : STEPPER_TOKENS.stepper.step.number.incomplete,
@@ -10874,7 +10939,7 @@ var Stepper = React30.forwardRef(
10874
10939
  )
10875
10940
  }
10876
10941
  ),
10877
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
10942
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
10878
10943
  "span",
10879
10944
  {
10880
10945
  className: cn(
@@ -10885,7 +10950,7 @@ var Stepper = React30.forwardRef(
10885
10950
  }
10886
10951
  )
10887
10952
  ] }),
10888
- index2 < steps.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
10953
+ index2 < steps.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
10889
10954
  "div",
10890
10955
  {
10891
10956
  className: cn(
@@ -10901,10 +10966,10 @@ var Stepper = React30.forwardRef(
10901
10966
  }
10902
10967
  );
10903
10968
  Stepper.displayName = "Stepper";
10904
- var ProgressBar = React30.forwardRef(
10969
+ var ProgressBar = React31.forwardRef(
10905
10970
  ({ value, max = 100, className, style }, ref) => {
10906
10971
  const percentage = Math.min(100, Math.max(0, value / max * 100));
10907
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
10972
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
10908
10973
  "div",
10909
10974
  {
10910
10975
  ref,
@@ -10914,7 +10979,7 @@ var ProgressBar = React30.forwardRef(
10914
10979
  "aria-valuenow": value,
10915
10980
  "aria-valuemin": 0,
10916
10981
  "aria-valuemax": max,
10917
- children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: STEPPER_TOKENS.progressBar.track, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
10982
+ children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: STEPPER_TOKENS.progressBar.track, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
10918
10983
  "div",
10919
10984
  {
10920
10985
  className: STEPPER_TOKENS.progressBar.fill,
@@ -10928,7 +10993,7 @@ var ProgressBar = React30.forwardRef(
10928
10993
  ProgressBar.displayName = "ProgressBar";
10929
10994
 
10930
10995
  // src/icon/icon.tsx
10931
- var React31 = __toESM(require("react"));
10996
+ var React32 = __toESM(require("react"));
10932
10997
  var DropdownMenuPrimitive2 = __toESM(require("@radix-ui/react-dropdown-menu"));
10933
10998
  var import_lucide_react12 = require("lucide-react");
10934
10999
  var LucideIcons = __toESM(require("lucide-react"));
@@ -10977,10 +11042,10 @@ var ICON_TOKENS = {
10977
11042
  };
10978
11043
 
10979
11044
  // src/icon/icon.tsx
10980
- var import_jsx_runtime27 = require("react/jsx-runtime");
10981
- var IconWrapper = React31.forwardRef(
11045
+ var import_jsx_runtime28 = require("react/jsx-runtime");
11046
+ var IconWrapper = React32.forwardRef(
10982
11047
  ({ color = "default", size = "sm", children, className, style }, ref) => {
10983
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
11048
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
10984
11049
  "span",
10985
11050
  {
10986
11051
  ref,
@@ -11117,7 +11182,7 @@ function getLucideIcon(name) {
11117
11182
  }
11118
11183
  return null;
11119
11184
  }
11120
- var IconPicker = React31.forwardRef(
11185
+ var IconPicker = React32.forwardRef(
11121
11186
  ({
11122
11187
  value,
11123
11188
  onValueChange,
@@ -11130,24 +11195,24 @@ var IconPicker = React31.forwardRef(
11130
11195
  }, ref) => {
11131
11196
  const { theme } = useTheme();
11132
11197
  const themeClass = theme === "dark" ? "dark" : "light";
11133
- const [open, setOpen] = React31.useState(false);
11134
- const [query, setQuery] = React31.useState("");
11198
+ const [open, setOpen] = React32.useState(false);
11199
+ const [query, setQuery] = React32.useState("");
11135
11200
  const iconNames = icons != null ? icons : COMMON_ICON_NAMES;
11136
- const filtered = React31.useMemo(() => {
11201
+ const filtered = React32.useMemo(() => {
11137
11202
  if (!query.trim()) return iconNames;
11138
11203
  const q = query.toLowerCase().trim();
11139
11204
  return iconNames.filter((name) => name.toLowerCase().includes(q));
11140
11205
  }, [iconNames, query]);
11141
11206
  const SelectedIcon = value ? getLucideIcon(value) : null;
11142
- const container = React31.useMemo(
11207
+ const container = React32.useMemo(
11143
11208
  () => {
11144
11209
  var _a5;
11145
11210
  return typeof document !== "undefined" ? (_a5 = document.querySelector(".lego-land")) != null ? _a5 : void 0 : void 0;
11146
11211
  },
11147
11212
  []
11148
11213
  );
11149
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { ref, className: cn("inline-block", className), style, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(DropdownMenuPrimitive2.Root, { open, onOpenChange: setOpen, children: [
11150
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(DropdownMenuPrimitive2.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
11214
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { ref, className: cn("inline-block", className), style, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(DropdownMenuPrimitive2.Root, { open, onOpenChange: setOpen, children: [
11215
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DropdownMenuPrimitive2.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
11151
11216
  "button",
11152
11217
  {
11153
11218
  type: "button",
@@ -11155,10 +11220,10 @@ var IconPicker = React31.forwardRef(
11155
11220
  ICON_TOKENS.picker.trigger,
11156
11221
  ICON_TOKENS.color[color]
11157
11222
  ),
11158
- children: SelectedIcon ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(SelectedIcon, { className: ICON_TOKENS.size[size] }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "text-xs text-fg-placeholder", children: placeholder })
11223
+ children: SelectedIcon ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SelectedIcon, { className: ICON_TOKENS.size[size] }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-xs text-fg-placeholder", children: placeholder })
11159
11224
  }
11160
11225
  ) }),
11161
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(DropdownMenuPrimitive2.Portal, { container, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: cn(!container && "lego-land", !container && themeClass), children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
11226
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DropdownMenuPrimitive2.Portal, { container, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: cn(!container && "lego-land", !container && themeClass), children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
11162
11227
  DropdownMenuPrimitive2.Content,
11163
11228
  {
11164
11229
  className: cn(
@@ -11174,9 +11239,9 @@ var IconPicker = React31.forwardRef(
11174
11239
  sideOffset: 4,
11175
11240
  onCloseAutoFocus: (e) => e.preventDefault(),
11176
11241
  children: [
11177
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex items-center gap-2", children: [
11178
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_lucide_react12.Search, { className: "size-4 text-fg-grey-secondary shrink-0" }),
11179
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
11242
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex items-center gap-2", children: [
11243
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react12.Search, { className: "size-4 text-fg-grey-secondary shrink-0" }),
11244
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
11180
11245
  "input",
11181
11246
  {
11182
11247
  type: "search",
@@ -11189,11 +11254,11 @@ var IconPicker = React31.forwardRef(
11189
11254
  }
11190
11255
  )
11191
11256
  ] }),
11192
- filtered.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: ICON_TOKENS.picker.emptyText, children: "No icons found" }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: ICON_TOKENS.picker.grid, children: filtered.map((name) => {
11257
+ filtered.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: ICON_TOKENS.picker.emptyText, children: "No icons found" }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: ICON_TOKENS.picker.grid, children: filtered.map((name) => {
11193
11258
  const Icon2 = getLucideIcon(name);
11194
11259
  if (!Icon2) return null;
11195
11260
  const isSelected = name === value;
11196
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
11261
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
11197
11262
  DropdownMenuPrimitive2.Item,
11198
11263
  {
11199
11264
  className: cn(
@@ -11207,7 +11272,7 @@ var IconPicker = React31.forwardRef(
11207
11272
  setOpen(false);
11208
11273
  },
11209
11274
  title: name,
11210
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Icon2, { className: "size-4" })
11275
+ children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Icon2, { className: "size-4" })
11211
11276
  },
11212
11277
  name
11213
11278
  );
@@ -11221,9 +11286,9 @@ var IconPicker = React31.forwardRef(
11221
11286
  IconPicker.displayName = "IconPicker";
11222
11287
 
11223
11288
  // src/shadow-dom-wrapper.tsx
11224
- var React32 = __toESM(require("react"));
11289
+ var React33 = __toESM(require("react"));
11225
11290
  var import_react_dom = require("react-dom");
11226
- var import_jsx_runtime28 = require("react/jsx-runtime");
11291
+ var import_jsx_runtime29 = require("react/jsx-runtime");
11227
11292
  var ShadowDOMWrapper = ({
11228
11293
  children,
11229
11294
  styles,
@@ -11231,10 +11296,10 @@ var ShadowDOMWrapper = ({
11231
11296
  additionalStyles = "",
11232
11297
  copyCSSVariables = true
11233
11298
  }) => {
11234
- const containerRef = React32.useRef(null);
11235
- const shadowRootRef = React32.useRef(null);
11236
- const [shadowRoot, setShadowRoot] = React32.useState(null);
11237
- React32.useEffect(() => {
11299
+ const containerRef = React33.useRef(null);
11300
+ const shadowRootRef = React33.useRef(null);
11301
+ const [shadowRoot, setShadowRoot] = React33.useState(null);
11302
+ React33.useEffect(() => {
11238
11303
  if (!containerRef.current) return;
11239
11304
  if (!shadowRootRef.current) {
11240
11305
  shadowRootRef.current = containerRef.current.attachShadow({ mode });
@@ -11323,15 +11388,15 @@ var ShadowDOMWrapper = ({
11323
11388
  return () => {
11324
11389
  };
11325
11390
  }, [styles, mode, additionalStyles, copyCSSVariables]);
11326
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
11327
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { ref: containerRef }),
11391
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
11392
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { ref: containerRef }),
11328
11393
  shadowRoot && (0, import_react_dom.createPortal)(children, shadowRoot)
11329
11394
  ] });
11330
11395
  };
11331
11396
  ShadowDOMWrapper.displayName = "ShadowDOMWrapper";
11332
11397
 
11333
11398
  // src/table/table.tsx
11334
- var React33 = __toESM(require("react"));
11399
+ var React34 = __toESM(require("react"));
11335
11400
  var import_lucide_react13 = require("lucide-react");
11336
11401
 
11337
11402
  // src/table/variables.ts
@@ -11421,22 +11486,22 @@ function getColumnWidthPx(width) {
11421
11486
  }
11422
11487
 
11423
11488
  // src/table/table.tsx
11424
- var import_jsx_runtime29 = require("react/jsx-runtime");
11489
+ var import_jsx_runtime30 = require("react/jsx-runtime");
11425
11490
  function formatNumber(n) {
11426
11491
  if (n == null) return "0";
11427
11492
  return n.toLocaleString();
11428
11493
  }
11429
11494
  function isCellTextContent(value) {
11430
- return typeof value === "object" && value !== null && !React33.isValidElement(value) && "text" in value;
11495
+ return typeof value === "object" && value !== null && !React34.isValidElement(value) && "text" in value;
11431
11496
  }
11432
11497
  function renderCellContent(content) {
11433
11498
  if (content === null || content === void 0) return null;
11434
11499
  if (typeof content === "string" || typeof content === "number") {
11435
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { children: content });
11500
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: content });
11436
11501
  }
11437
11502
  if (isCellTextContent(content)) {
11438
11503
  const { text, className, style } = content;
11439
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className, style, children: text });
11504
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className, style, children: text });
11440
11505
  }
11441
11506
  return content;
11442
11507
  }
@@ -11458,8 +11523,8 @@ function Pagination({
11458
11523
  };
11459
11524
  const isFirstPage = currentPage === 1;
11460
11525
  const isLastPage = currentPage === totalPages || totalPages === 0;
11461
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: TABLE_TOKENS.paginationBar.root, children: [
11462
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("span", { className: TABLE_TOKENS.paginationBar.text, children: [
11526
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: TABLE_TOKENS.paginationBar.root, children: [
11527
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: TABLE_TOKENS.paginationBar.text, children: [
11463
11528
  "Showing ",
11464
11529
  formatNumber(start),
11465
11530
  "\u2013",
@@ -11471,17 +11536,17 @@ function Pagination({
11471
11536
  entityName,
11472
11537
  total !== 1 ? "s" : ""
11473
11538
  ] }),
11474
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: TABLE_TOKENS.paginationBar.rightSection, children: [
11475
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: TABLE_TOKENS.paginationBar.rowCountSection, children: [
11476
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: TABLE_TOKENS.paginationBar.text, children: "Rows per page" }),
11477
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
11539
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: TABLE_TOKENS.paginationBar.rightSection, children: [
11540
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: TABLE_TOKENS.paginationBar.rowCountSection, children: [
11541
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: TABLE_TOKENS.paginationBar.text, children: "Rows per page" }),
11542
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
11478
11543
  Select,
11479
11544
  {
11480
11545
  value: String(rowsPerPage),
11481
11546
  onValueChange: handleRowsPerPageSelect,
11482
11547
  children: [
11483
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SelectTrigger, { size: "small", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SelectValue, {}) }),
11484
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
11548
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SelectTrigger, { size: "small", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SelectValue, {}) }),
11549
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
11485
11550
  SelectContent,
11486
11551
  {
11487
11552
  items: ROWS_PER_PAGE_OPTIONS.map((n) => ({
@@ -11494,15 +11559,15 @@ function Pagination({
11494
11559
  }
11495
11560
  )
11496
11561
  ] }),
11497
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: TABLE_TOKENS.paginationBar.pageSection, children: [
11498
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("span", { className: TABLE_TOKENS.paginationBar.text, children: [
11562
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: TABLE_TOKENS.paginationBar.pageSection, children: [
11563
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: TABLE_TOKENS.paginationBar.text, children: [
11499
11564
  "Page ",
11500
11565
  formatNumber(currentPage),
11501
11566
  " of ",
11502
11567
  formatNumber(totalPages || 1)
11503
11568
  ] }),
11504
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: TABLE_TOKENS.paginationBar.navButtons, children: [
11505
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
11569
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: TABLE_TOKENS.paginationBar.navButtons, children: [
11570
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
11506
11571
  "button",
11507
11572
  {
11508
11573
  type: "button",
@@ -11513,10 +11578,10 @@ function Pagination({
11513
11578
  onClick: () => currentPage > 1 && handlePageChange(1),
11514
11579
  disabled: isFirstPage,
11515
11580
  "aria-label": "Go to first page",
11516
- children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react13.ChevronFirst, { className: isFirstPage ? TABLE_TOKENS.paginationBar.navIconDisabled : TABLE_TOKENS.paginationBar.navIcon })
11581
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react13.ChevronFirst, { className: isFirstPage ? TABLE_TOKENS.paginationBar.navIconDisabled : TABLE_TOKENS.paginationBar.navIcon })
11517
11582
  }
11518
11583
  ),
11519
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
11584
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
11520
11585
  "button",
11521
11586
  {
11522
11587
  type: "button",
@@ -11527,10 +11592,10 @@ function Pagination({
11527
11592
  onClick: () => currentPage > 1 && handlePageChange(currentPage - 1),
11528
11593
  disabled: isFirstPage,
11529
11594
  "aria-label": "Go to previous page",
11530
- children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react13.ChevronLeft, { className: isFirstPage ? TABLE_TOKENS.paginationBar.navIconDisabled : TABLE_TOKENS.paginationBar.navIcon })
11595
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react13.ChevronLeft, { className: isFirstPage ? TABLE_TOKENS.paginationBar.navIconDisabled : TABLE_TOKENS.paginationBar.navIcon })
11531
11596
  }
11532
11597
  ),
11533
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
11598
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
11534
11599
  "button",
11535
11600
  {
11536
11601
  type: "button",
@@ -11541,10 +11606,10 @@ function Pagination({
11541
11606
  onClick: () => currentPage < totalPages && handlePageChange(currentPage + 1),
11542
11607
  disabled: isLastPage,
11543
11608
  "aria-label": "Go to next page",
11544
- children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react13.ChevronRight, { className: isLastPage ? TABLE_TOKENS.paginationBar.navIconDisabled : TABLE_TOKENS.paginationBar.navIcon })
11609
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react13.ChevronRight, { className: isLastPage ? TABLE_TOKENS.paginationBar.navIconDisabled : TABLE_TOKENS.paginationBar.navIcon })
11545
11610
  }
11546
11611
  ),
11547
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
11612
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
11548
11613
  "button",
11549
11614
  {
11550
11615
  type: "button",
@@ -11555,7 +11620,7 @@ function Pagination({
11555
11620
  onClick: () => currentPage < totalPages && handlePageChange(totalPages),
11556
11621
  disabled: isLastPage,
11557
11622
  "aria-label": "Go to last page",
11558
- children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react13.ChevronLast, { className: isLastPage ? TABLE_TOKENS.paginationBar.navIconDisabled : TABLE_TOKENS.paginationBar.navIcon })
11623
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react13.ChevronLast, { className: isLastPage ? TABLE_TOKENS.paginationBar.navIconDisabled : TABLE_TOKENS.paginationBar.navIcon })
11559
11624
  }
11560
11625
  )
11561
11626
  ] })
@@ -11587,20 +11652,20 @@ function DataTable({
11587
11652
  loading = false,
11588
11653
  onRowClick
11589
11654
  }) {
11590
- const resolveId = React33.useCallback(
11655
+ const resolveId = React34.useCallback(
11591
11656
  (row, index2) => {
11592
11657
  if (getRowId) return getRowId(row);
11593
11658
  return String(index2);
11594
11659
  },
11595
11660
  [getRowId]
11596
11661
  );
11597
- const orderedColumns = React33.useMemo(() => {
11662
+ const orderedColumns = React34.useMemo(() => {
11598
11663
  const pinnedSet = new Set(pinnedColumns);
11599
11664
  const pinned = pinnedColumns.map((key) => columns.find((c) => c.key === key)).filter((c) => c !== void 0);
11600
11665
  const rest = columns.filter((c) => !pinnedSet.has(c.key));
11601
11666
  return [...pinned, ...rest];
11602
11667
  }, [columns, pinnedColumns]);
11603
- const stickyOffsets = React33.useMemo(() => {
11668
+ const stickyOffsets = React34.useMemo(() => {
11604
11669
  const offsets = {};
11605
11670
  let accumulated = showCheckbox ? CHECKBOX_COLUMN_WIDTH : 0;
11606
11671
  for (const col of orderedColumns) {
@@ -11611,7 +11676,7 @@ function DataTable({
11611
11676
  }
11612
11677
  return offsets;
11613
11678
  }, [orderedColumns, pinnedColumns, showCheckbox]);
11614
- const sortState = React33.useMemo(() => {
11679
+ const sortState = React34.useMemo(() => {
11615
11680
  const col = orderedColumns.find((c) => c.sort_direction);
11616
11681
  return col ? { key: col.key, direction: col.sort_direction } : null;
11617
11682
  }, [orderedColumns]);
@@ -11627,7 +11692,7 @@ function DataTable({
11627
11692
  onSortChange({ key, direction: null });
11628
11693
  }
11629
11694
  };
11630
- const selectedSet = React33.useMemo(
11695
+ const selectedSet = React34.useMemo(
11631
11696
  () => new Set(selectedRows),
11632
11697
  [selectedRows]
11633
11698
  );
@@ -11644,9 +11709,9 @@ function DataTable({
11644
11709
  const hasActions = actions.length > 0;
11645
11710
  const skeletonColumnCount = columns.length > 0 ? columns.length : 5;
11646
11711
  const skeletonRowCount = 10;
11647
- const scrollContainerRef = React33.useRef(null);
11648
- const [scrollContainerWidth, setScrollContainerWidth] = React33.useState(0);
11649
- React33.useEffect(() => {
11712
+ const scrollContainerRef = React34.useRef(null);
11713
+ const [scrollContainerWidth, setScrollContainerWidth] = React34.useState(0);
11714
+ React34.useEffect(() => {
11650
11715
  const el = scrollContainerRef.current;
11651
11716
  if (!el || typeof ResizeObserver === "undefined") return;
11652
11717
  const observer = new ResizeObserver((entries) => {
@@ -11657,10 +11722,10 @@ function DataTable({
11657
11722
  observer.observe(el);
11658
11723
  return () => observer.disconnect();
11659
11724
  }, []);
11660
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: cn(TABLE_TOKENS.wrapper, !showBorder && "border-0", className), children: [
11661
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { ref: scrollContainerRef, className: TABLE_TOKENS.scrollContainer, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("table", { className: TABLE_TOKENS.table, children: [
11662
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("tr", { className: TABLE_TOKENS.headerRow, children: [
11663
- showCheckbox && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
11725
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: cn(TABLE_TOKENS.wrapper, !showBorder && "border-0", className), children: [
11726
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { ref: scrollContainerRef, className: TABLE_TOKENS.scrollContainer, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("table", { className: TABLE_TOKENS.table, children: [
11727
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("tr", { className: TABLE_TOKENS.headerRow, children: [
11728
+ showCheckbox && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
11664
11729
  "th",
11665
11730
  {
11666
11731
  className: cn(
@@ -11676,7 +11741,7 @@ function DataTable({
11676
11741
  const isPinned = pinnedColumns.includes(col.key);
11677
11742
  const isLastPinned = col.key === lastPinnedKey;
11678
11743
  const isSorted = (sortState == null ? void 0 : sortState.key) === col.key;
11679
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
11744
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
11680
11745
  "th",
11681
11746
  {
11682
11747
  className: cn(
@@ -11692,16 +11757,16 @@ function DataTable({
11692
11757
  width: getColumnWidthPx(col.width)
11693
11758
  } : col.width ? { width: getColumnWidthPx(col.width) } : void 0,
11694
11759
  onClick: col.isSortable ? () => handleSortClick(col.key) : void 0,
11695
- children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("span", { className: "inline-flex items-center", children: [
11760
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: "inline-flex items-center", children: [
11696
11761
  col.header,
11697
- col.isSortable && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
11762
+ col.isSortable && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
11698
11763
  "span",
11699
11764
  {
11700
11765
  className: cn(
11701
11766
  TABLE_TOKENS.sortIconWrapper,
11702
11767
  isSorted && TABLE_TOKENS.sortIconActive
11703
11768
  ),
11704
- children: !isSorted ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react13.ChevronsUpDown, { className: "h-3.5 w-3.5" }) : (sortState == null ? void 0 : sortState.direction) === "asc" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react13.ChevronUp, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react13.ChevronDown, { className: "h-3.5 w-3.5" })
11769
+ children: !isSorted ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react13.ChevronsUpDown, { className: "h-3.5 w-3.5" }) : (sortState == null ? void 0 : sortState.direction) === "asc" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react13.ChevronUp, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react13.ChevronDown, { className: "h-3.5 w-3.5" })
11705
11770
  }
11706
11771
  )
11707
11772
  ] })
@@ -11711,20 +11776,20 @@ function DataTable({
11711
11776
  }) : (
11712
11777
  // Skeleton headers when columns is empty
11713
11778
  Array.from({ length: skeletonColumnCount }).map(
11714
- (_2, colIndex) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
11779
+ (_2, colIndex) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
11715
11780
  "th",
11716
11781
  {
11717
11782
  className: cn(
11718
11783
  TABLE_TOKENS.headerCell,
11719
11784
  stickyHeader && TABLE_TOKENS.headerCellStickyTop
11720
11785
  ),
11721
- children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "h-4 w-20 rounded bg-token-grey animate-pulse" })
11786
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "h-4 w-20 rounded bg-token-grey animate-pulse" })
11722
11787
  },
11723
11788
  `skeleton-header-${colIndex}`
11724
11789
  )
11725
11790
  )
11726
11791
  ),
11727
- hasActions && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
11792
+ hasActions && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
11728
11793
  "th",
11729
11794
  {
11730
11795
  className: cn(
@@ -11734,7 +11799,7 @@ function DataTable({
11734
11799
  style: { width: ACTIONS_COLUMN_WIDTH }
11735
11800
  }
11736
11801
  ),
11737
- headerAction && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
11802
+ headerAction && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
11738
11803
  "th",
11739
11804
  {
11740
11805
  className: cn(
@@ -11747,18 +11812,18 @@ function DataTable({
11747
11812
  padding: "8px",
11748
11813
  right: 0
11749
11814
  },
11750
- children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex items-center justify-center h-full w-full", children: headerAction })
11815
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "flex items-center justify-center h-full w-full", children: headerAction })
11751
11816
  }
11752
11817
  )
11753
11818
  ] }) }),
11754
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("tbody", { children: loading ? (
11819
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("tbody", { children: loading ? (
11755
11820
  // Skeleton loading rows
11756
- Array.from({ length: skeletonRowCount }).map((_2, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
11821
+ Array.from({ length: skeletonRowCount }).map((_2, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
11757
11822
  "tr",
11758
11823
  {
11759
11824
  className: cn("group", TABLE_TOKENS.bodyRow),
11760
11825
  children: [
11761
- showCheckbox && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
11826
+ showCheckbox && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
11762
11827
  "td",
11763
11828
  {
11764
11829
  className: cn(
@@ -11767,13 +11832,13 @@ function DataTable({
11767
11832
  checkboxIsLastPinned && TABLE_TOKENS.pinnedLastBorder
11768
11833
  ),
11769
11834
  style: { left: 0, width: CHECKBOX_COLUMN_WIDTH },
11770
- children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "h-4 w-4 rounded bg-token-grey animate-pulse" })
11835
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "h-4 w-4 rounded bg-token-grey animate-pulse" })
11771
11836
  }
11772
11837
  ),
11773
11838
  columns.length > 0 ? orderedColumns.map((col, colIndex) => {
11774
11839
  const isPinned = pinnedColumns.includes(col.key);
11775
11840
  const isLastPinned = col.key === lastPinnedKey;
11776
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
11841
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
11777
11842
  "td",
11778
11843
  {
11779
11844
  className: cn(
@@ -11785,21 +11850,21 @@ function DataTable({
11785
11850
  left: stickyOffsets[col.key],
11786
11851
  width: getColumnWidthPx(col.width)
11787
11852
  } : col.width ? { width: getColumnWidthPx(col.width) } : void 0,
11788
- children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "h-4 w-3/4 rounded bg-token-grey animate-pulse" })
11853
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "h-4 w-3/4 rounded bg-token-grey animate-pulse" })
11789
11854
  },
11790
11855
  `skeleton-col-${col.key}`
11791
11856
  );
11792
11857
  }) : Array.from({ length: skeletonColumnCount }).map(
11793
- (_3, colIndex) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
11858
+ (_3, colIndex) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
11794
11859
  "td",
11795
11860
  {
11796
11861
  className: TABLE_TOKENS.bodyCell,
11797
- children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "h-4 w-3/4 rounded bg-token-grey animate-pulse" })
11862
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "h-4 w-3/4 rounded bg-token-grey animate-pulse" })
11798
11863
  },
11799
11864
  `skeleton-col-${colIndex}`
11800
11865
  )
11801
11866
  ),
11802
- hasActions && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
11867
+ hasActions && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
11803
11868
  "td",
11804
11869
  {
11805
11870
  className: cn(
@@ -11807,7 +11872,7 @@ function DataTable({
11807
11872
  TABLE_TOKENS.actionsCell
11808
11873
  ),
11809
11874
  style: { width: ACTIONS_COLUMN_WIDTH },
11810
- children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex items-center gap-1 justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "h-6 w-6 rounded bg-token-grey animate-pulse" }) })
11875
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "flex items-center gap-1 justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "h-6 w-6 rounded bg-token-grey animate-pulse" }) })
11811
11876
  }
11812
11877
  )
11813
11878
  ]
@@ -11816,11 +11881,11 @@ function DataTable({
11816
11881
  ))
11817
11882
  ) : (
11818
11883
  // Actual data rows
11819
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
11884
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
11820
11885
  data.map((row, rowIndex) => {
11821
11886
  const id = resolveId(row, rowIndex);
11822
11887
  const isSelected = selectedSet.has(id);
11823
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
11888
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
11824
11889
  "tr",
11825
11890
  {
11826
11891
  className: cn(
@@ -11831,7 +11896,7 @@ function DataTable({
11831
11896
  "data-selected": isSelected ? "true" : void 0,
11832
11897
  onClick: onRowClick ? () => onRowClick(row) : void 0,
11833
11898
  children: [
11834
- showCheckbox && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
11899
+ showCheckbox && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
11835
11900
  "td",
11836
11901
  {
11837
11902
  className: cn(
@@ -11841,7 +11906,7 @@ function DataTable({
11841
11906
  checkboxIsLastPinned && TABLE_TOKENS.pinnedLastBorder
11842
11907
  ),
11843
11908
  style: { left: 0, width: CHECKBOX_COLUMN_WIDTH },
11844
- children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
11909
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
11845
11910
  Checkbox,
11846
11911
  {
11847
11912
  checked: isSelected,
@@ -11855,7 +11920,7 @@ function DataTable({
11855
11920
  const isPinned = pinnedColumns.includes(col.key);
11856
11921
  const isLastPinned = col.key === lastPinnedKey;
11857
11922
  const content = col.accessor(row);
11858
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
11923
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
11859
11924
  "td",
11860
11925
  {
11861
11926
  className: cn(
@@ -11867,12 +11932,12 @@ function DataTable({
11867
11932
  left: stickyOffsets[col.key],
11868
11933
  width: getColumnWidthPx(col.width)
11869
11934
  } : col.width ? { width: getColumnWidthPx(col.width) } : void 0,
11870
- children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex items-center", children: renderCellContent(content) })
11935
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "flex items-center", children: renderCellContent(content) })
11871
11936
  },
11872
11937
  col.key
11873
11938
  );
11874
11939
  }),
11875
- hasActions && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
11940
+ hasActions && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
11876
11941
  "td",
11877
11942
  {
11878
11943
  className: cn(
@@ -11880,8 +11945,8 @@ function DataTable({
11880
11945
  TABLE_TOKENS.actionsCell
11881
11946
  ),
11882
11947
  style: { width: ACTIONS_COLUMN_WIDTH },
11883
- children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex items-center gap-1 justify-end", children: actions.map((action, actionIndex) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Tooltip, { delayDuration: 0, children: [
11884
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
11948
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "flex items-center gap-1 justify-end", children: actions.map((action, actionIndex) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Tooltip, { delayDuration: 0, children: [
11949
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
11885
11950
  Button,
11886
11951
  {
11887
11952
  variant: "link",
@@ -11891,7 +11956,7 @@ function DataTable({
11891
11956
  children: action.icon
11892
11957
  }
11893
11958
  ) }) }),
11894
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TooltipContent, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { children: action.label }) })
11959
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TooltipContent, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { children: action.label }) })
11895
11960
  ] }, actionIndex)) })
11896
11961
  }
11897
11962
  )
@@ -11900,12 +11965,12 @@ function DataTable({
11900
11965
  id
11901
11966
  );
11902
11967
  }),
11903
- data.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
11968
+ data.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
11904
11969
  "td",
11905
11970
  {
11906
11971
  colSpan: orderedColumns.length + (hasActions ? 1 : 0) + (showCheckbox ? 1 : 0),
11907
11972
  className: "p-0",
11908
- children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
11973
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
11909
11974
  "div",
11910
11975
  {
11911
11976
  className: "sticky left-0 px-4 py-8 text-center text-sm text-fg-grey-secondary",
@@ -11918,7 +11983,7 @@ function DataTable({
11918
11983
  ] })
11919
11984
  ) })
11920
11985
  ] }) }),
11921
- showPagination && !loading && data.length > 0 && onPageChange && onRowsPerPageChange && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: cn(TABLE_TOKENS.pagination, !showBorder && "border-t-0"), children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
11986
+ showPagination && !loading && data.length > 0 && onPageChange && onRowsPerPageChange && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: cn(TABLE_TOKENS.pagination, !showBorder && "border-t-0"), children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
11922
11987
  Pagination,
11923
11988
  {
11924
11989
  handlePageChange: onPageChange,
@@ -11945,7 +12010,7 @@ var ColumnWidth = /* @__PURE__ */ ((ColumnWidth2) => {
11945
12010
  })(ColumnWidth || {});
11946
12011
 
11947
12012
  // src/filter-select/filter-select.tsx
11948
- var React36 = __toESM(require("react"));
12013
+ var React37 = __toESM(require("react"));
11949
12014
  var DropdownMenuPrimitive3 = __toESM(require("@radix-ui/react-dropdown-menu"));
11950
12015
  var import_lucide_react16 = require("lucide-react");
11951
12016
  var import_react_day_picker = require("react-day-picker");
@@ -11999,12 +12064,15 @@ var FILTER_SELECT_TOKENS = {
11999
12064
  dropdown: {
12000
12065
  base: [
12001
12066
  "bg-token-white flex flex-col items-stretch",
12002
- "pt-1 pb-2 px-1 rounded-[16px] shadow-sm",
12067
+ // Symmetric 4px padding on all sides — prevents the extra whitespace
12068
+ // below the last list item / footer that used to come from `pb-2`.
12069
+ "p-1 rounded-[16px] shadow-sm",
12003
12070
  "min-w-[196px] font-sans",
12004
12071
  "outline-none"
12005
12072
  ].join(" "),
12006
- // Date dropdown: Figma p-12, gap-16, rounded-16
12007
- date: "p-3 gap-4 rounded-[16px]"
12073
+ // Date dropdown tight 4px padding on all sides so the calendar / presets
12074
+ // sit flush against the 16px corner radius with no extra whitespace gutter.
12075
+ date: "p-1 gap-2 rounded-[16px]"
12008
12076
  },
12009
12077
  // ---------- List item (.menu - secondary) ----------
12010
12078
  // Figma 4085:5931 exact spec:
@@ -12096,7 +12164,22 @@ var FILTER_SELECT_TOKENS = {
12096
12164
  // ---------- Empty state ----------
12097
12165
  emptyState: "px-3 py-4 font-sans text-xs leading-4 text-fg-grey-secondary text-center w-full",
12098
12166
  // ---------- Date presets (left sidebar) ----------
12099
- datePresetSidebar: "flex flex-col gap-1 shrink-0 w-[116px] min-h-full",
12167
+ // `gap-0` on the outer column so the preset list and the bottom Remove/Clear
12168
+ // button own their own spacing — avoids a double-gap between the last preset
12169
+ // and the bottom action.
12170
+ datePresetSidebar: "flex flex-col shrink-0 w-[116px] min-h-full",
12171
+ // Bottom action (Remove/Clear) for the date filter. Lives INSIDE the preset
12172
+ // column so it only occupies the sidebar width, not the whole dropdown. No
12173
+ // sticky / no border-t / no rounded-b — those were artefacts of the old
12174
+ // full-width footer. Pinned to the BOTTOM of the sidebar via `mt-auto` so
12175
+ // the action row aligns with the calendar's bottom edge — no extra
12176
+ // whitespace opens between Remove and the dropdown's rounded corner.
12177
+ datePresetSidebarAction: {
12178
+ wrapper: "group/remove mt-auto w-full rounded-[8px] transition-colors hover:bg-interaction-hov-solid-primary",
12179
+ button: "flex items-center gap-2 w-full p-2 rounded-[8px] cursor-pointer outline-none bg-transparent",
12180
+ icon: "shrink-0 size-4 text-fg-black transition-colors group-hover/remove:text-fg-destructive",
12181
+ text: "font-sans font-normal text-xs leading-4 tracking-normal whitespace-nowrap text-fg-black transition-colors group-hover/remove:text-fg-destructive"
12182
+ },
12100
12183
  datePreset: {
12101
12184
  base: "w-full text-left px-2.5 py-2 rounded-full font-sans text-xs font-medium leading-4 cursor-pointer transition-colors border border-transparent outline-none",
12102
12185
  default: "text-fg-grey-secondary hover:bg-interaction-hov-solid-primary",
@@ -12232,11 +12315,11 @@ var FILTER_SELECT_TOKENS = {
12232
12315
  };
12233
12316
 
12234
12317
  // src/filter-select/filter-list-item.tsx
12235
- var React35 = __toESM(require("react"));
12318
+ var React36 = __toESM(require("react"));
12236
12319
  var import_lucide_react15 = require("lucide-react");
12237
12320
 
12238
12321
  // src/spinner/spinner.tsx
12239
- var React34 = __toESM(require("react"));
12322
+ var React35 = __toESM(require("react"));
12240
12323
  var import_lucide_react14 = require("lucide-react");
12241
12324
 
12242
12325
  // src/spinner/variables.ts
@@ -12257,10 +12340,10 @@ var SPINNER_TOKENS = {
12257
12340
  };
12258
12341
 
12259
12342
  // src/spinner/spinner.tsx
12260
- var import_jsx_runtime30 = require("react/jsx-runtime");
12261
- var Spinner = React34.forwardRef(
12343
+ var import_jsx_runtime31 = require("react/jsx-runtime");
12344
+ var Spinner = React35.forwardRef(
12262
12345
  ({ size = "md", className, ...props }, ref) => {
12263
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { ref, className: cn(SPINNER_TOKENS.base, className), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
12346
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { ref, className: cn(SPINNER_TOKENS.base, className), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
12264
12347
  import_lucide_react14.Loader2,
12265
12348
  {
12266
12349
  className: cn(SPINNER_TOKENS.size[size], SPINNER_TOKENS.icon),
@@ -12272,8 +12355,8 @@ var Spinner = React34.forwardRef(
12272
12355
  Spinner.displayName = "Spinner";
12273
12356
 
12274
12357
  // src/filter-select/filter-list-item.tsx
12275
- var import_jsx_runtime31 = require("react/jsx-runtime");
12276
- var FilterListItem = React35.forwardRef(
12358
+ var import_jsx_runtime32 = require("react/jsx-runtime");
12359
+ var FilterListItem = React36.forwardRef(
12277
12360
  ({
12278
12361
  value,
12279
12362
  label,
@@ -12294,18 +12377,18 @@ var FilterListItem = React35.forwardRef(
12294
12377
  className,
12295
12378
  ...props
12296
12379
  }, ref) => {
12297
- const handleClick = React35.useCallback(() => {
12380
+ const handleClick = React36.useCallback(() => {
12298
12381
  if (loading) return;
12299
12382
  onSelect == null ? void 0 : onSelect(value);
12300
12383
  }, [loading, onSelect, value]);
12301
- const handleDragStart = React35.useCallback(
12384
+ const handleDragStart = React36.useCallback(
12302
12385
  (e) => {
12303
12386
  e.dataTransfer.effectAllowed = "move";
12304
12387
  onDragStart == null ? void 0 : onDragStart(e);
12305
12388
  },
12306
12389
  [onDragStart]
12307
12390
  );
12308
- const handleDragOver = React35.useCallback(
12391
+ const handleDragOver = React36.useCallback(
12309
12392
  (e) => {
12310
12393
  e.preventDefault();
12311
12394
  e.dataTransfer.dropEffect = "move";
@@ -12313,40 +12396,40 @@ var FilterListItem = React35.forwardRef(
12313
12396
  },
12314
12397
  [onDragOver]
12315
12398
  );
12316
- const handleDragLeave = React35.useCallback(
12399
+ const handleDragLeave = React36.useCallback(
12317
12400
  (e) => {
12318
12401
  onDragLeave == null ? void 0 : onDragLeave(e);
12319
12402
  },
12320
12403
  [onDragLeave]
12321
12404
  );
12322
- const handleDrop = React35.useCallback(
12405
+ const handleDrop = React36.useCallback(
12323
12406
  (e) => {
12324
12407
  e.preventDefault();
12325
12408
  onDrop == null ? void 0 : onDrop(e);
12326
12409
  },
12327
12410
  [onDrop]
12328
12411
  );
12329
- const handleDragEnd = React35.useCallback(
12412
+ const handleDragEnd = React36.useCallback(
12330
12413
  (e) => {
12331
12414
  onDragEnd == null ? void 0 : onDragEnd(e);
12332
12415
  },
12333
12416
  [onDragEnd]
12334
12417
  );
12335
- const handleGripClick = React35.useCallback((e) => {
12418
+ const handleGripClick = React36.useCallback((e) => {
12336
12419
  e.stopPropagation();
12337
12420
  }, []);
12338
12421
  const renderIcon2 = () => {
12339
12422
  if (!icon) return null;
12340
- if (React35.isValidElement(icon)) return icon;
12423
+ if (React36.isValidElement(icon)) return icon;
12341
12424
  if (typeof icon === "function" || typeof icon === "object" && icon !== null && "$$typeof" in icon) {
12342
- return React35.createElement(
12425
+ return React36.createElement(
12343
12426
  icon,
12344
12427
  { className: "size-4" }
12345
12428
  );
12346
12429
  }
12347
12430
  return icon;
12348
12431
  };
12349
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
12432
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
12350
12433
  "div",
12351
12434
  {
12352
12435
  ref,
@@ -12372,23 +12455,23 @@ var FilterListItem = React35.forwardRef(
12372
12455
  onDragEnd: draggable ? handleDragEnd : void 0,
12373
12456
  ...props,
12374
12457
  children: [
12375
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex items-center gap-2 min-w-0 flex-1", children: [
12376
- draggable && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
12458
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex items-center gap-2 min-w-0 flex-1", children: [
12459
+ draggable && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
12377
12460
  "span",
12378
12461
  {
12379
12462
  className: FILTER_SELECT_TOKENS.dragHandle,
12380
12463
  onClick: handleGripClick,
12381
12464
  "aria-hidden": "true",
12382
- children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react15.GripHorizontal, { className: "size-4" })
12465
+ children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react15.GripHorizontal, { className: "size-4" })
12383
12466
  }
12384
12467
  ),
12385
- icon && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "shrink-0 flex items-center justify-center text-fg-grey-secondary", children: renderIcon2() }),
12386
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-col min-w-0 flex-1 gap-[2px]", children: [
12387
- labelNode ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "min-w-0", children: labelNode }) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: FILTER_SELECT_TOKENS.itemLabel, children: label }),
12388
- subtext && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: FILTER_SELECT_TOKENS.itemSubtext, children: subtext })
12468
+ icon && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "shrink-0 flex items-center justify-center text-fg-grey-secondary", children: renderIcon2() }),
12469
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex flex-col min-w-0 flex-1 gap-[2px]", children: [
12470
+ labelNode ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "min-w-0", children: labelNode }) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: FILTER_SELECT_TOKENS.itemLabel, children: label }),
12471
+ subtext && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: FILTER_SELECT_TOKENS.itemSubtext, children: subtext })
12389
12472
  ] })
12390
12473
  ] }),
12391
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "shrink-0 flex items-center justify-end w-4", children: loading ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Spinner, { size: "sm" }) : selected ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react15.Check, { className: FILTER_SELECT_TOKENS.itemTick, "aria-hidden": "true" }) : null })
12474
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "shrink-0 flex items-center justify-end w-4", children: loading ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Spinner, { size: "sm" }) : selected ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react15.Check, { className: FILTER_SELECT_TOKENS.itemTick, "aria-hidden": "true" }) : null })
12392
12475
  ]
12393
12476
  }
12394
12477
  );
@@ -12397,7 +12480,7 @@ var FilterListItem = React35.forwardRef(
12397
12480
  FilterListItem.displayName = "FilterListItem";
12398
12481
 
12399
12482
  // src/filter-select/filter-select.tsx
12400
- var import_jsx_runtime32 = require("react/jsx-runtime");
12483
+ var import_jsx_runtime33 = require("react/jsx-runtime");
12401
12484
  function startOfDay(d) {
12402
12485
  const x = new Date(d);
12403
12486
  x.setHours(0, 0, 0, 0);
@@ -12517,11 +12600,11 @@ var OperandDropdown = ({
12517
12600
  disabled
12518
12601
  }) => {
12519
12602
  var _a5, _b5;
12520
- const [open, setOpen] = React36.useState(false);
12603
+ const [open, setOpen] = React37.useState(false);
12521
12604
  const selectedLabel = (_b5 = (_a5 = options.find((o) => o.value === value)) == null ? void 0 : _a5.label) != null ? _b5 : "";
12522
12605
  const hasValue = Boolean(value);
12523
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(DropdownMenuPrimitive3.Root, { open, onOpenChange: setOpen, children: [
12524
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DropdownMenuPrimitive3.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
12606
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(DropdownMenuPrimitive3.Root, { open, onOpenChange: setOpen, children: [
12607
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(DropdownMenuPrimitive3.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
12525
12608
  "button",
12526
12609
  {
12527
12610
  type: "button",
@@ -12538,7 +12621,7 @@ var OperandDropdown = ({
12538
12621
  ),
12539
12622
  "aria-label": placeholder || "Select operand",
12540
12623
  children: [
12541
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
12624
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
12542
12625
  "span",
12543
12626
  {
12544
12627
  className: cn(
@@ -12548,7 +12631,7 @@ var OperandDropdown = ({
12548
12631
  children: hasValue ? selectedLabel : placeholder || ""
12549
12632
  }
12550
12633
  ),
12551
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
12634
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
12552
12635
  import_lucide_react16.ChevronDown,
12553
12636
  {
12554
12637
  className: cn(
@@ -12560,7 +12643,7 @@ var OperandDropdown = ({
12560
12643
  ]
12561
12644
  }
12562
12645
  ) }),
12563
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DropdownMenuPrimitive3.Portal, { container, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: cn(!container && "lego-land", !container && themeClass), children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
12646
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(DropdownMenuPrimitive3.Portal, { container, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: cn(!container && "lego-land", !container && themeClass), children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
12564
12647
  DropdownMenuPrimitive3.Content,
12565
12648
  {
12566
12649
  className: cn(FILTER_SELECT_TOKENS.operand.content, "z-[250]"),
@@ -12571,7 +12654,7 @@ var OperandDropdown = ({
12571
12654
  onCloseAutoFocus: (e) => e.preventDefault(),
12572
12655
  children: options.map((opt) => {
12573
12656
  const isSelected = opt.value === value;
12574
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
12657
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
12575
12658
  DropdownMenuPrimitive3.Item,
12576
12659
  {
12577
12660
  onSelect: (e) => {
@@ -12582,8 +12665,8 @@ var OperandDropdown = ({
12582
12665
  "data-state": isSelected ? "checked" : "unchecked",
12583
12666
  className: FILTER_SELECT_TOKENS.operand.item,
12584
12667
  children: [
12585
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "truncate", children: opt.label }),
12586
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "shrink-0 flex items-center justify-end w-4", children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
12668
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "truncate", children: opt.label }),
12669
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "shrink-0 flex items-center justify-end w-4", children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
12587
12670
  import_lucide_react16.Check,
12588
12671
  {
12589
12672
  className: FILTER_SELECT_TOKENS.operand.itemTick,
@@ -12621,12 +12704,12 @@ var TimeSelectPill = ({
12621
12704
  container,
12622
12705
  themeClass
12623
12706
  }) => {
12624
- const [open, setOpen] = React36.useState(false);
12625
- const selectedRef = React36.useRef(null);
12707
+ const [open, setOpen] = React37.useState(false);
12708
+ const selectedRef = React37.useRef(null);
12626
12709
  const currentHour = value.getHours();
12627
12710
  const currentMinute = value.getMinutes();
12628
12711
  const selectedSlotIndex = currentHour * 2 + (currentMinute >= 30 ? 1 : 0);
12629
- React36.useEffect(() => {
12712
+ React37.useEffect(() => {
12630
12713
  if (!open) return;
12631
12714
  const id = window.setTimeout(() => {
12632
12715
  var _a5;
@@ -12640,20 +12723,20 @@ var TimeSelectPill = ({
12640
12723
  onChange(out);
12641
12724
  setOpen(false);
12642
12725
  };
12643
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(DropdownMenuPrimitive3.Root, { open, onOpenChange: setOpen, children: [
12644
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DropdownMenuPrimitive3.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
12726
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(DropdownMenuPrimitive3.Root, { open, onOpenChange: setOpen, children: [
12727
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(DropdownMenuPrimitive3.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
12645
12728
  "button",
12646
12729
  {
12647
12730
  type: "button",
12648
12731
  className: FILTER_SELECT_TOKENS.timeSelectPill.trigger,
12649
12732
  "aria-label": ariaLabel,
12650
12733
  children: [
12651
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "truncate", children: formatTime12h(value) }),
12652
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react16.ChevronDown, { className: FILTER_SELECT_TOKENS.timeSelectPill.chevron })
12734
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "truncate", children: formatTime12h(value) }),
12735
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react16.ChevronDown, { className: FILTER_SELECT_TOKENS.timeSelectPill.chevron })
12653
12736
  ]
12654
12737
  }
12655
12738
  ) }),
12656
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DropdownMenuPrimitive3.Portal, { container, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: cn(!container && "lego-land", !container && themeClass), children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
12739
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(DropdownMenuPrimitive3.Portal, { container, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: cn(!container && "lego-land", !container && themeClass), children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
12657
12740
  DropdownMenuPrimitive3.Content,
12658
12741
  {
12659
12742
  className: cn(FILTER_SELECT_TOKENS.timeSelectPill.content, "z-[250]"),
@@ -12664,7 +12747,7 @@ var TimeSelectPill = ({
12664
12747
  onCloseAutoFocus: (e) => e.preventDefault(),
12665
12748
  children: TIME_OPTIONS_30M.map((opt, idx) => {
12666
12749
  const isSelected = idx === selectedSlotIndex;
12667
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
12750
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
12668
12751
  DropdownMenuPrimitive3.Item,
12669
12752
  {
12670
12753
  ref: isSelected ? selectedRef : void 0,
@@ -12674,7 +12757,7 @@ var TimeSelectPill = ({
12674
12757
  },
12675
12758
  "data-state": isSelected ? "checked" : "unchecked",
12676
12759
  className: FILTER_SELECT_TOKENS.timeSelectPill.item,
12677
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "truncate", children: opt.label })
12760
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "truncate", children: opt.label })
12678
12761
  },
12679
12762
  opt.label
12680
12763
  );
@@ -12703,9 +12786,9 @@ var MonthSelectPill = ({
12703
12786
  container,
12704
12787
  themeClass
12705
12788
  }) => {
12706
- const [open, setOpen] = React36.useState(false);
12707
- const selectedRef = React36.useRef(null);
12708
- React36.useEffect(() => {
12789
+ const [open, setOpen] = React37.useState(false);
12790
+ const selectedRef = React37.useRef(null);
12791
+ React37.useEffect(() => {
12709
12792
  if (!open) return;
12710
12793
  const id = window.setTimeout(() => {
12711
12794
  var _a5;
@@ -12713,20 +12796,20 @@ var MonthSelectPill = ({
12713
12796
  }, 0);
12714
12797
  return () => window.clearTimeout(id);
12715
12798
  }, [open]);
12716
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(DropdownMenuPrimitive3.Root, { open, onOpenChange: setOpen, children: [
12717
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DropdownMenuPrimitive3.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
12799
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(DropdownMenuPrimitive3.Root, { open, onOpenChange: setOpen, children: [
12800
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(DropdownMenuPrimitive3.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
12718
12801
  "button",
12719
12802
  {
12720
12803
  type: "button",
12721
12804
  className: FILTER_SELECT_TOKENS.timeSelectPill.trigger,
12722
12805
  "aria-label": "Select month",
12723
12806
  children: [
12724
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "truncate", children: MONTH_LABELS[monthIndex] }),
12725
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react16.ChevronDown, { className: FILTER_SELECT_TOKENS.timeSelectPill.chevron })
12807
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "truncate", children: MONTH_LABELS[monthIndex] }),
12808
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react16.ChevronDown, { className: FILTER_SELECT_TOKENS.timeSelectPill.chevron })
12726
12809
  ]
12727
12810
  }
12728
12811
  ) }),
12729
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DropdownMenuPrimitive3.Portal, { container, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: cn(!container && "lego-land", !container && themeClass), children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
12812
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(DropdownMenuPrimitive3.Portal, { container, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: cn(!container && "lego-land", !container && themeClass), children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
12730
12813
  DropdownMenuPrimitive3.Content,
12731
12814
  {
12732
12815
  className: cn(FILTER_SELECT_TOKENS.timeSelectPill.content, "z-[250]"),
@@ -12737,7 +12820,7 @@ var MonthSelectPill = ({
12737
12820
  onCloseAutoFocus: (e) => e.preventDefault(),
12738
12821
  children: MONTH_LABELS.map((label, idx) => {
12739
12822
  const isSelected = idx === monthIndex;
12740
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
12823
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
12741
12824
  DropdownMenuPrimitive3.Item,
12742
12825
  {
12743
12826
  ref: isSelected ? selectedRef : void 0,
@@ -12748,7 +12831,7 @@ var MonthSelectPill = ({
12748
12831
  },
12749
12832
  "data-state": isSelected ? "checked" : "unchecked",
12750
12833
  className: FILTER_SELECT_TOKENS.timeSelectPill.item,
12751
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "truncate", children: label })
12834
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "truncate", children: label })
12752
12835
  },
12753
12836
  label
12754
12837
  );
@@ -12765,14 +12848,14 @@ var YearSelectPill = ({
12765
12848
  container,
12766
12849
  themeClass
12767
12850
  }) => {
12768
- const [open, setOpen] = React36.useState(false);
12769
- const selectedRef = React36.useRef(null);
12770
- const years = React36.useMemo(() => {
12851
+ const [open, setOpen] = React37.useState(false);
12852
+ const selectedRef = React37.useRef(null);
12853
+ const years = React37.useMemo(() => {
12771
12854
  const out = [];
12772
12855
  for (let y = minYear; y <= maxYear; y++) out.push(y);
12773
12856
  return out;
12774
12857
  }, [minYear, maxYear]);
12775
- React36.useEffect(() => {
12858
+ React37.useEffect(() => {
12776
12859
  if (!open) return;
12777
12860
  const id = window.setTimeout(() => {
12778
12861
  var _a5;
@@ -12780,20 +12863,20 @@ var YearSelectPill = ({
12780
12863
  }, 0);
12781
12864
  return () => window.clearTimeout(id);
12782
12865
  }, [open]);
12783
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(DropdownMenuPrimitive3.Root, { open, onOpenChange: setOpen, children: [
12784
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DropdownMenuPrimitive3.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
12866
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(DropdownMenuPrimitive3.Root, { open, onOpenChange: setOpen, children: [
12867
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(DropdownMenuPrimitive3.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
12785
12868
  "button",
12786
12869
  {
12787
12870
  type: "button",
12788
12871
  className: FILTER_SELECT_TOKENS.timeSelectPill.trigger,
12789
12872
  "aria-label": "Select year",
12790
12873
  children: [
12791
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "truncate", children: year }),
12792
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react16.ChevronDown, { className: FILTER_SELECT_TOKENS.timeSelectPill.chevron })
12874
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "truncate", children: year }),
12875
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react16.ChevronDown, { className: FILTER_SELECT_TOKENS.timeSelectPill.chevron })
12793
12876
  ]
12794
12877
  }
12795
12878
  ) }),
12796
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DropdownMenuPrimitive3.Portal, { container, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: cn(!container && "lego-land", !container && themeClass), children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
12879
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(DropdownMenuPrimitive3.Portal, { container, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: cn(!container && "lego-land", !container && themeClass), children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
12797
12880
  DropdownMenuPrimitive3.Content,
12798
12881
  {
12799
12882
  className: cn(FILTER_SELECT_TOKENS.timeSelectPill.content, "z-[250]"),
@@ -12804,7 +12887,7 @@ var YearSelectPill = ({
12804
12887
  onCloseAutoFocus: (e) => e.preventDefault(),
12805
12888
  children: years.map((y) => {
12806
12889
  const isSelected = y === year;
12807
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
12890
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
12808
12891
  DropdownMenuPrimitive3.Item,
12809
12892
  {
12810
12893
  ref: isSelected ? selectedRef : void 0,
@@ -12815,7 +12898,7 @@ var YearSelectPill = ({
12815
12898
  },
12816
12899
  "data-state": isSelected ? "checked" : "unchecked",
12817
12900
  className: FILTER_SELECT_TOKENS.timeSelectPill.item,
12818
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "truncate", children: y })
12901
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "truncate", children: y })
12819
12902
  },
12820
12903
  y
12821
12904
  );
@@ -12824,15 +12907,15 @@ var YearSelectPill = ({
12824
12907
  ) }) })
12825
12908
  ] });
12826
12909
  };
12827
- var CalendarMonthCaptionContext = React36.createContext(null);
12910
+ var CalendarMonthCaptionContext = React37.createContext(null);
12828
12911
  var CalendarMonthCaption = ({
12829
12912
  calendarMonth,
12830
12913
  displayIndex
12831
12914
  }) => {
12832
12915
  var _a5, _b5;
12833
- const ctx = React36.useContext(CalendarMonthCaptionContext);
12916
+ const ctx = React37.useContext(CalendarMonthCaptionContext);
12834
12917
  const { goToMonth, previousMonth, nextMonth, months } = (0, import_react_day_picker.useDayPicker)();
12835
- if (!ctx) return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_jsx_runtime32.Fragment, {});
12918
+ if (!ctx) return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_jsx_runtime33.Fragment, {});
12836
12919
  const { date, onDateChange, container, themeClass, showTime, minYear, maxYear } = ctx;
12837
12920
  const monthDate = calendarMonth.date;
12838
12921
  const monthIndex = monthDate.getMonth();
@@ -12864,8 +12947,8 @@ var CalendarMonthCaption = ({
12864
12947
  onDateChange == null ? void 0 : onDateChange({ start: date == null ? void 0 : date.start, end: d });
12865
12948
  }
12866
12949
  };
12867
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex items-center justify-between gap-1 w-full px-0 py-1", children: [
12868
- isFirst && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
12950
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center justify-between gap-1 w-full px-0 py-1", children: [
12951
+ isFirst && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
12869
12952
  "button",
12870
12953
  {
12871
12954
  type: "button",
@@ -12873,11 +12956,11 @@ var CalendarMonthCaption = ({
12873
12956
  "aria-label": "Previous month",
12874
12957
  onClick: () => previousMonth && goToMonth(previousMonth),
12875
12958
  disabled: !previousMonth,
12876
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react16.ChevronLeft, { className: "size-4" })
12959
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react16.ChevronLeft, { className: "size-4" })
12877
12960
  }
12878
12961
  ),
12879
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex items-center gap-1 flex-1 justify-center", children: [
12880
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
12962
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center gap-1 flex-1 justify-start", children: [
12963
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
12881
12964
  MonthSelectPill,
12882
12965
  {
12883
12966
  monthIndex,
@@ -12886,7 +12969,7 @@ var CalendarMonthCaption = ({
12886
12969
  themeClass
12887
12970
  }
12888
12971
  ),
12889
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
12972
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
12890
12973
  YearSelectPill,
12891
12974
  {
12892
12975
  year,
@@ -12897,7 +12980,7 @@ var CalendarMonthCaption = ({
12897
12980
  themeClass
12898
12981
  }
12899
12982
  ),
12900
- showTime && timeValue && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
12983
+ showTime && timeValue && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
12901
12984
  TimeSelectPill,
12902
12985
  {
12903
12986
  value: timeValue,
@@ -12908,7 +12991,7 @@ var CalendarMonthCaption = ({
12908
12991
  }
12909
12992
  )
12910
12993
  ] }),
12911
- isLast && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
12994
+ isLast && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
12912
12995
  "button",
12913
12996
  {
12914
12997
  type: "button",
@@ -12916,7 +12999,7 @@ var CalendarMonthCaption = ({
12916
12999
  "aria-label": "Next month",
12917
13000
  onClick: () => nextMonth && goToMonth(nextMonth),
12918
13001
  disabled: !nextMonth,
12919
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react16.ChevronRight, { className: "size-4" })
13002
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react16.ChevronRight, { className: "size-4" })
12920
13003
  }
12921
13004
  )
12922
13005
  ] });
@@ -12926,7 +13009,7 @@ var DEFAULT_DURATION_UNITS = [
12926
13009
  { value: "min", label: "min" },
12927
13010
  { value: "hours", label: "hours" }
12928
13011
  ];
12929
- var FilterSelect = React36.forwardRef(
13012
+ var FilterSelect = React37.forwardRef(
12930
13013
  ({
12931
13014
  label = "Language",
12932
13015
  icon: Icon2,
@@ -12971,24 +13054,26 @@ var FilterSelect = React36.forwardRef(
12971
13054
  showTime = true,
12972
13055
  emptyStateLabel,
12973
13056
  labelClassName,
13057
+ isPersistent = false,
12974
13058
  ...props
12975
13059
  }, ref) => {
13060
+ const footerActionLabel = isPersistent ? "Clear" : "Remove";
12976
13061
  const { theme } = useTheme();
12977
13062
  const themeClass = theme === "dark" ? "dark" : "light";
12978
- const [internalOpen, setInternalOpen] = React36.useState(
13063
+ const [internalOpen, setInternalOpen] = React37.useState(
12979
13064
  defaultOpen != null ? defaultOpen : false
12980
13065
  );
12981
13066
  const open = controlledOpen != null ? controlledOpen : internalOpen;
12982
- const [searchQuery, setSearchQuery] = React36.useState("");
12983
- const triggerRef = React36.useRef(null);
12984
- const [triggerWidth, setTriggerWidth] = React36.useState(null);
12985
- const [focusedMonth, setFocusedMonth] = React36.useState(
13067
+ const [searchQuery, setSearchQuery] = React37.useState("");
13068
+ const triggerRef = React37.useRef(null);
13069
+ const [triggerWidth, setTriggerWidth] = React37.useState(null);
13070
+ const [focusedMonth, setFocusedMonth] = React37.useState(
12986
13071
  () => {
12987
13072
  var _a5;
12988
13073
  return (_a5 = date == null ? void 0 : date.start) != null ? _a5 : /* @__PURE__ */ new Date();
12989
13074
  }
12990
13075
  );
12991
- const setOpen = React36.useCallback(
13076
+ const setOpen = React37.useCallback(
12992
13077
  (newOpen) => {
12993
13078
  if (controlledOpen === void 0) {
12994
13079
  setInternalOpen(newOpen);
@@ -12997,25 +13082,25 @@ var FilterSelect = React36.forwardRef(
12997
13082
  },
12998
13083
  [controlledOpen, onOpenChange]
12999
13084
  );
13000
- const container = React36.useMemo(
13085
+ const container = React37.useMemo(
13001
13086
  () => {
13002
13087
  var _a5;
13003
13088
  return typeof document !== "undefined" ? (_a5 = document.querySelector(".lego-land")) != null ? _a5 : void 0 : void 0;
13004
13089
  },
13005
13090
  []
13006
13091
  );
13007
- const selectedItemsOrdered = React36.useMemo(() => {
13092
+ const selectedItemsOrdered = React37.useMemo(() => {
13008
13093
  if (!selectedItems.length) return [];
13009
13094
  return selectedItems;
13010
13095
  }, [selectedItems]);
13011
- const filteredItems = React36.useMemo(() => {
13096
+ const filteredItems = React37.useMemo(() => {
13012
13097
  return filterItemsBySearch2(items, searchQuery);
13013
13098
  }, [items, searchQuery]);
13014
- const isSectioned = React36.useMemo(
13099
+ const isSectioned = React37.useMemo(
13015
13100
  () => filteredItems.length > 0 && "sectionLabel" in filteredItems[0],
13016
13101
  [filteredItems]
13017
13102
  );
13018
- const sortedItems = React36.useMemo(() => {
13103
+ const sortedItems = React37.useMemo(() => {
13019
13104
  if (!draggable || !isSectioned) {
13020
13105
  if (!draggable) return filteredItems;
13021
13106
  const flatItems = filteredItems;
@@ -13048,7 +13133,7 @@ var FilterSelect = React36.forwardRef(
13048
13133
  return { ...section, items: sorted };
13049
13134
  });
13050
13135
  }, [filteredItems, selectedItemsOrdered, draggable, isSectioned]);
13051
- const selectedLabels = React36.useMemo(() => {
13136
+ const selectedLabels = React37.useMemo(() => {
13052
13137
  const itemMap = /* @__PURE__ */ new Map();
13053
13138
  const isSectionedItems = items.length > 0 && "sectionLabel" in items[0];
13054
13139
  if (isSectionedItems) {
@@ -13069,7 +13154,7 @@ var FilterSelect = React36.forwardRef(
13069
13154
  }
13070
13155
  );
13071
13156
  }, [selectedItemsOrdered, items]);
13072
- const selectedItemsText = React36.useMemo(() => {
13157
+ const selectedItemsText = React37.useMemo(() => {
13073
13158
  var _a5, _b5, _c, _d, _e2, _f;
13074
13159
  let trimmedText = text == null ? void 0 : text.trim();
13075
13160
  if (type === "text_with_operands" && trimmedText && trimmedText.length > 0) {
@@ -13124,10 +13209,10 @@ var FilterSelect = React36.forwardRef(
13124
13209
  durationUnits
13125
13210
  ]);
13126
13211
  const hasValue = Boolean(selectedItemsText);
13127
- const [visibleItemsCount, setVisibleItemsCount] = React36.useState(null);
13128
- const selectedItemsRef = React36.useRef(null);
13129
- const measureRef = React36.useRef(null);
13130
- React36.useEffect(() => {
13212
+ const [visibleItemsCount, setVisibleItemsCount] = React37.useState(null);
13213
+ const selectedItemsRef = React37.useRef(null);
13214
+ const measureRef = React37.useRef(null);
13215
+ React37.useEffect(() => {
13131
13216
  if (type !== "list" || selectedLabels.length === 0) {
13132
13217
  setVisibleItemsCount(null);
13133
13218
  return;
@@ -13199,7 +13284,7 @@ var FilterSelect = React36.forwardRef(
13199
13284
  ro.observe(containerEl);
13200
13285
  return () => ro.disconnect();
13201
13286
  }, [type, selectedLabels, selectedItemsMaxWidth, selectedItemsText]);
13202
- React36.useEffect(() => {
13287
+ React37.useEffect(() => {
13203
13288
  const el = triggerRef.current;
13204
13289
  if (!el) return;
13205
13290
  const m = () => setTriggerWidth(el.offsetWidth);
@@ -13208,27 +13293,27 @@ var FilterSelect = React36.forwardRef(
13208
13293
  ro.observe(el);
13209
13294
  return () => ro.disconnect();
13210
13295
  }, [open, selectedItemsText]);
13211
- const handleItemSelect = React36.useCallback(
13296
+ const handleItemSelect = React37.useCallback(
13212
13297
  (value) => {
13213
13298
  const newSelection = selectedItems.includes(value) ? selectedItems.filter((v2) => v2 !== value) : [...selectedItems, value];
13214
13299
  onSelectionChange == null ? void 0 : onSelectionChange(newSelection);
13215
13300
  },
13216
13301
  [selectedItems, onSelectionChange]
13217
13302
  );
13218
- const handleClearAll = React36.useCallback(() => {
13303
+ const handleClearAll = React37.useCallback(() => {
13219
13304
  onSelectionChange == null ? void 0 : onSelectionChange([]);
13220
13305
  onRemoveAll == null ? void 0 : onRemoveAll();
13221
13306
  }, [onSelectionChange, onRemoveAll]);
13222
- const handleTextClear = React36.useCallback(() => {
13307
+ const handleTextClear = React37.useCallback(() => {
13223
13308
  onTextChange == null ? void 0 : onTextChange("");
13224
13309
  onOperandChange == null ? void 0 : onOperandChange("");
13225
13310
  onRemoveAll == null ? void 0 : onRemoveAll();
13226
13311
  }, [onTextChange, onOperandChange, onRemoveAll]);
13227
- const handleDateClear = React36.useCallback(() => {
13312
+ const handleDateClear = React37.useCallback(() => {
13228
13313
  onDateChange == null ? void 0 : onDateChange({ start: void 0, end: void 0 });
13229
13314
  onRemoveAll == null ? void 0 : onRemoveAll();
13230
13315
  }, [onDateChange, onRemoveAll]);
13231
- const hasContentToClear = React36.useMemo(() => {
13316
+ const hasContentToClear = React37.useMemo(() => {
13232
13317
  if (type === "text" || type === "numeric") {
13233
13318
  return text !== void 0 && text !== "";
13234
13319
  }
@@ -13249,18 +13334,18 @@ var FilterSelect = React36.forwardRef(
13249
13334
  }
13250
13335
  return selectedItems.length > 0;
13251
13336
  }, [type, text, operand, selectedItems.length, date, rangeMin, rangeMax]);
13252
- const [draggedValue, setDraggedValue] = React36.useState(null);
13253
- const [dragOverValue, setDragOverValue] = React36.useState(
13337
+ const [draggedValue, setDraggedValue] = React37.useState(null);
13338
+ const [dragOverValue, setDragOverValue] = React37.useState(
13254
13339
  null
13255
13340
  );
13256
- const handleDragStart = React36.useCallback(
13341
+ const handleDragStart = React37.useCallback(
13257
13342
  (e, value) => {
13258
13343
  setDraggedValue(value);
13259
13344
  e.dataTransfer.effectAllowed = "move";
13260
13345
  },
13261
13346
  []
13262
13347
  );
13263
- const handleDragOver = React36.useCallback(
13348
+ const handleDragOver = React37.useCallback(
13264
13349
  (e, value) => {
13265
13350
  e.preventDefault();
13266
13351
  if (draggedValue !== null && draggedValue !== value && selectedItems.includes(value)) {
@@ -13269,10 +13354,10 @@ var FilterSelect = React36.forwardRef(
13269
13354
  },
13270
13355
  [draggedValue, selectedItems]
13271
13356
  );
13272
- const handleDragLeave = React36.useCallback(() => {
13357
+ const handleDragLeave = React37.useCallback(() => {
13273
13358
  setDragOverValue(null);
13274
13359
  }, []);
13275
- const handleDrop = React36.useCallback(
13360
+ const handleDrop = React37.useCallback(
13276
13361
  (e, dropValue) => {
13277
13362
  e.preventDefault();
13278
13363
  if (draggedValue === null || draggedValue === dropValue || !selectedItems.includes(dropValue)) {
@@ -13304,13 +13389,13 @@ var FilterSelect = React36.forwardRef(
13304
13389
  onSelectionChange
13305
13390
  ]
13306
13391
  );
13307
- const handleDragEnd = React36.useCallback(() => {
13392
+ const handleDragEnd = React37.useCallback(() => {
13308
13393
  setDraggedValue(null);
13309
13394
  setDragOverValue(null);
13310
13395
  }, []);
13311
13396
  const isCompactBody = type === "duration" || type === "numeric_with_operands" && !isRangeMode;
13312
13397
  const bodyMinWidth = isCompactBody ? Math.max(160, triggerWidth != null ? triggerWidth : 0) : Math.max(196, triggerWidth != null ? triggerWidth : 0);
13313
- const renderFooterClear = (onClick, labelText, ariaLabel) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: FILTER_SELECT_TOKENS.footer.wrapper, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
13398
+ const renderFooterClear = (onClick, labelText, ariaLabel) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: FILTER_SELECT_TOKENS.footer.wrapper, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
13314
13399
  "button",
13315
13400
  {
13316
13401
  type: "button",
@@ -13318,13 +13403,13 @@ var FilterSelect = React36.forwardRef(
13318
13403
  className: FILTER_SELECT_TOKENS.removeButton.base,
13319
13404
  "aria-label": ariaLabel,
13320
13405
  children: [
13321
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react16.Trash2, { className: FILTER_SELECT_TOKENS.removeButton.icon }),
13322
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: FILTER_SELECT_TOKENS.removeButton.text, children: labelText })
13406
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react16.Trash2, { className: FILTER_SELECT_TOKENS.removeButton.icon }),
13407
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: FILTER_SELECT_TOKENS.removeButton.text, children: labelText })
13323
13408
  ]
13324
13409
  }
13325
13410
  ) });
13326
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { ref, className: "inline-block font-sans", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(DropdownMenuPrimitive3.Root, { open, onOpenChange: setOpen, children: [
13327
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DropdownMenuPrimitive3.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
13411
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { ref, className: "inline-block font-sans", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(DropdownMenuPrimitive3.Root, { open, onOpenChange: setOpen, children: [
13412
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(DropdownMenuPrimitive3.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
13328
13413
  "button",
13329
13414
  {
13330
13415
  type: "button",
@@ -13340,9 +13425,9 @@ var FilterSelect = React36.forwardRef(
13340
13425
  triggerClassName
13341
13426
  ),
13342
13427
  children: [
13343
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex items-center gap-2 min-w-0", children: [
13344
- Icon2 && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Icon2, { className: FILTER_SELECT_TOKENS.icon }),
13345
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
13428
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center gap-2 min-w-0", children: [
13429
+ Icon2 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Icon2, { className: FILTER_SELECT_TOKENS.icon }),
13430
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
13346
13431
  "span",
13347
13432
  {
13348
13433
  "data-filter-label": "",
@@ -13350,8 +13435,16 @@ var FilterSelect = React36.forwardRef(
13350
13435
  children: label
13351
13436
  }
13352
13437
  ),
13353
- selectedItemsText && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
13354
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
13438
+ selectedItemsText && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
13439
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
13440
+ "span",
13441
+ {
13442
+ "aria-hidden": "true",
13443
+ "data-filter-separator": "",
13444
+ className: FILTER_SELECT_TOKENS.separator
13445
+ }
13446
+ ),
13447
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
13355
13448
  "span",
13356
13449
  {
13357
13450
  ref: selectedItemsRef,
@@ -13365,7 +13458,7 @@ var FilterSelect = React36.forwardRef(
13365
13458
  )}, +${selectedLabels.length - visibleItemsCount}` : selectedItemsText
13366
13459
  }
13367
13460
  ),
13368
- type === "list" && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
13461
+ type === "list" && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
13369
13462
  "span",
13370
13463
  {
13371
13464
  ref: measureRef,
@@ -13384,7 +13477,7 @@ var FilterSelect = React36.forwardRef(
13384
13477
  )
13385
13478
  ] })
13386
13479
  ] }),
13387
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
13480
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
13388
13481
  import_lucide_react16.ChevronDown,
13389
13482
  {
13390
13483
  className: cn(
@@ -13397,14 +13490,14 @@ var FilterSelect = React36.forwardRef(
13397
13490
  ]
13398
13491
  }
13399
13492
  ) }),
13400
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DropdownMenuPrimitive3.Portal, { container, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
13493
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(DropdownMenuPrimitive3.Portal, { container, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
13401
13494
  "div",
13402
13495
  {
13403
13496
  className: cn(
13404
13497
  !container && "lego-land",
13405
13498
  !container && themeClass
13406
13499
  ),
13407
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
13500
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
13408
13501
  DropdownMenuPrimitive3.Content,
13409
13502
  {
13410
13503
  className: cn(
@@ -13447,8 +13540,8 @@ var FilterSelect = React36.forwardRef(
13447
13540
  e.preventDefault();
13448
13541
  }
13449
13542
  },
13450
- children: loading ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Spinner, { size: "md" }) : type === "text" ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
13451
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "p-1", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
13543
+ children: loading ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Spinner, { size: "md" }) : type === "text" ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
13544
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "p-1", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
13452
13545
  "textarea",
13453
13546
  {
13454
13547
  value: text != null ? text : "",
@@ -13458,10 +13551,10 @@ var FilterSelect = React36.forwardRef(
13458
13551
  autoFocus: true
13459
13552
  }
13460
13553
  ) }),
13461
- (showClearBtn || hasContentToClear) && renderFooterClear(handleTextClear, "Remove", "Remove text")
13462
- ] }) : type === "text_with_operands" ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
13463
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "p-1 flex flex-col gap-2", children: [
13464
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "pb-2 -mx-1 px-1 border-b border-token-xlight", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
13554
+ (showClearBtn || hasContentToClear) && renderFooterClear(handleTextClear, footerActionLabel, `${footerActionLabel} text`)
13555
+ ] }) : type === "text_with_operands" ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
13556
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "p-1 flex flex-col gap-2", children: [
13557
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
13465
13558
  OperandDropdown,
13466
13559
  {
13467
13560
  value: operand != null ? operand : "",
@@ -13471,8 +13564,8 @@ var FilterSelect = React36.forwardRef(
13471
13564
  container,
13472
13565
  themeClass
13473
13566
  }
13474
- ) }),
13475
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
13567
+ ),
13568
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
13476
13569
  "textarea",
13477
13570
  {
13478
13571
  value: text != null ? text : "",
@@ -13485,12 +13578,12 @@ var FilterSelect = React36.forwardRef(
13485
13578
  ] }),
13486
13579
  (showClearBtn || hasContentToClear) && renderFooterClear(
13487
13580
  handleTextClear,
13488
- "Remove",
13489
- "Remove filter"
13581
+ footerActionLabel,
13582
+ `${footerActionLabel} filter`
13490
13583
  )
13491
- ] }) : type === "numeric" ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
13492
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "p-1", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: FILTER_SELECT_TOKENS.bodyInput.wrapper, children: [
13493
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
13584
+ ] }) : type === "numeric" ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
13585
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "p-1", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: FILTER_SELECT_TOKENS.bodyInput.wrapper, children: [
13586
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
13494
13587
  "input",
13495
13588
  {
13496
13589
  type: "number",
@@ -13501,12 +13594,12 @@ var FilterSelect = React36.forwardRef(
13501
13594
  autoFocus: true
13502
13595
  }
13503
13596
  ),
13504
- unitLabel && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: FILTER_SELECT_TOKENS.bodyInput.unit, children: unitLabel })
13597
+ unitLabel && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: FILTER_SELECT_TOKENS.bodyInput.unit, children: unitLabel })
13505
13598
  ] }) }),
13506
- (showClearBtn || hasContentToClear) && renderFooterClear(handleTextClear, "Remove", "Remove number")
13507
- ] }) : type === "numeric_with_operands" ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
13508
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "p-1 flex flex-col gap-2", children: [
13509
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "pb-2 -mx-1 px-1 border-b border-token-xlight", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
13599
+ (showClearBtn || hasContentToClear) && renderFooterClear(handleTextClear, footerActionLabel, `${footerActionLabel} number`)
13600
+ ] }) : type === "numeric_with_operands" ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
13601
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "p-1 flex flex-col gap-2", children: [
13602
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
13510
13603
  OperandDropdown,
13511
13604
  {
13512
13605
  value: operand != null ? operand : "",
@@ -13516,10 +13609,10 @@ var FilterSelect = React36.forwardRef(
13516
13609
  container,
13517
13610
  themeClass
13518
13611
  }
13519
- ) }),
13520
- isRangeMode ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex items-center gap-2 w-full", children: [
13521
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: FILTER_SELECT_TOKENS.bodyInput.wrapper, children: [
13522
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
13612
+ ),
13613
+ isRangeMode ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center gap-2 w-full", children: [
13614
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: FILTER_SELECT_TOKENS.bodyInput.wrapper, children: [
13615
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
13523
13616
  "input",
13524
13617
  {
13525
13618
  type: "text",
@@ -13536,7 +13629,7 @@ var FilterSelect = React36.forwardRef(
13536
13629
  className: FILTER_SELECT_TOKENS.bodyInput.input
13537
13630
  }
13538
13631
  ),
13539
- unitLabel && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
13632
+ unitLabel && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
13540
13633
  "span",
13541
13634
  {
13542
13635
  className: FILTER_SELECT_TOKENS.bodyInput.unit,
@@ -13544,9 +13637,9 @@ var FilterSelect = React36.forwardRef(
13544
13637
  }
13545
13638
  )
13546
13639
  ] }),
13547
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: FILTER_SELECT_TOKENS.rangeDivider, children: "-" }),
13548
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: FILTER_SELECT_TOKENS.bodyInput.wrapper, children: [
13549
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
13640
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: FILTER_SELECT_TOKENS.rangeDivider, children: "-" }),
13641
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: FILTER_SELECT_TOKENS.bodyInput.wrapper, children: [
13642
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
13550
13643
  "input",
13551
13644
  {
13552
13645
  type: "text",
@@ -13563,7 +13656,7 @@ var FilterSelect = React36.forwardRef(
13563
13656
  className: FILTER_SELECT_TOKENS.bodyInput.input
13564
13657
  }
13565
13658
  ),
13566
- unitLabel && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
13659
+ unitLabel && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
13567
13660
  "span",
13568
13661
  {
13569
13662
  className: FILTER_SELECT_TOKENS.bodyInput.unit,
@@ -13571,8 +13664,8 @@ var FilterSelect = React36.forwardRef(
13571
13664
  }
13572
13665
  )
13573
13666
  ] })
13574
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: FILTER_SELECT_TOKENS.bodyInput.wrapperCompact, children: [
13575
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
13667
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: FILTER_SELECT_TOKENS.bodyInput.wrapperCompact, children: [
13668
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
13576
13669
  "input",
13577
13670
  {
13578
13671
  type: "number",
@@ -13583,7 +13676,7 @@ var FilterSelect = React36.forwardRef(
13583
13676
  autoFocus: true
13584
13677
  }
13585
13678
  ),
13586
- unitLabel && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: FILTER_SELECT_TOKENS.bodyInput.unit, children: unitLabel })
13679
+ unitLabel && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: FILTER_SELECT_TOKENS.bodyInput.unit, children: unitLabel })
13587
13680
  ] })
13588
13681
  ] }),
13589
13682
  (showClearBtn || hasContentToClear) && renderFooterClear(
@@ -13594,13 +13687,13 @@ var FilterSelect = React36.forwardRef(
13594
13687
  onRangeMaxChange == null ? void 0 : onRangeMaxChange("");
13595
13688
  onRemoveAll == null ? void 0 : onRemoveAll();
13596
13689
  },
13597
- "Remove",
13598
- "Remove filter"
13690
+ footerActionLabel,
13691
+ `${footerActionLabel} filter`
13599
13692
  )
13600
- ] }) : type === "in_between" ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
13601
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "p-1", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex items-center gap-2 w-full", children: [
13602
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: FILTER_SELECT_TOKENS.bodyInput.wrapper, children: [
13603
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
13693
+ ] }) : type === "in_between" ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
13694
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "p-1", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center gap-2 w-full", children: [
13695
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: FILTER_SELECT_TOKENS.bodyInput.wrapper, children: [
13696
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
13604
13697
  "input",
13605
13698
  {
13606
13699
  type: "text",
@@ -13618,11 +13711,11 @@ var FilterSelect = React36.forwardRef(
13618
13711
  autoFocus: true
13619
13712
  }
13620
13713
  ),
13621
- unitLabel && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: FILTER_SELECT_TOKENS.bodyInput.unit, children: unitLabel })
13714
+ unitLabel && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: FILTER_SELECT_TOKENS.bodyInput.unit, children: unitLabel })
13622
13715
  ] }),
13623
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: FILTER_SELECT_TOKENS.rangeDivider, children: "-" }),
13624
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: FILTER_SELECT_TOKENS.bodyInput.wrapper, children: [
13625
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
13716
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: FILTER_SELECT_TOKENS.rangeDivider, children: "-" }),
13717
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: FILTER_SELECT_TOKENS.bodyInput.wrapper, children: [
13718
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
13626
13719
  "input",
13627
13720
  {
13628
13721
  type: "text",
@@ -13639,7 +13732,7 @@ var FilterSelect = React36.forwardRef(
13639
13732
  className: FILTER_SELECT_TOKENS.bodyInput.input
13640
13733
  }
13641
13734
  ),
13642
- unitLabel && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: FILTER_SELECT_TOKENS.bodyInput.unit, children: unitLabel })
13735
+ unitLabel && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: FILTER_SELECT_TOKENS.bodyInput.unit, children: unitLabel })
13643
13736
  ] })
13644
13737
  ] }) }),
13645
13738
  (showClearBtn || hasContentToClear) && renderFooterClear(
@@ -13648,12 +13741,12 @@ var FilterSelect = React36.forwardRef(
13648
13741
  onRangeMaxChange == null ? void 0 : onRangeMaxChange("");
13649
13742
  onRemoveAll == null ? void 0 : onRemoveAll();
13650
13743
  },
13651
- "Remove",
13652
- "Remove range"
13744
+ footerActionLabel,
13745
+ `${footerActionLabel} range`
13653
13746
  )
13654
- ] }) : type === "duration" ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
13655
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "p-1 flex items-center gap-2", children: [
13656
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: FILTER_SELECT_TOKENS.bodyInput.wrapperCompact, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
13747
+ ] }) : type === "duration" ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
13748
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "p-1 flex items-center gap-2", children: [
13749
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: FILTER_SELECT_TOKENS.bodyInput.wrapperCompact, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
13657
13750
  "input",
13658
13751
  {
13659
13752
  type: "number",
@@ -13664,7 +13757,7 @@ var FilterSelect = React36.forwardRef(
13664
13757
  autoFocus: true
13665
13758
  }
13666
13759
  ) }),
13667
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
13760
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
13668
13761
  OperandDropdown,
13669
13762
  {
13670
13763
  value: durationUnit != null ? durationUnit : "",
@@ -13682,41 +13775,75 @@ var FilterSelect = React36.forwardRef(
13682
13775
  onDurationUnitChange == null ? void 0 : onDurationUnitChange("");
13683
13776
  onRemoveAll == null ? void 0 : onRemoveAll();
13684
13777
  },
13685
- "Remove",
13686
- "Remove duration"
13778
+ footerActionLabel,
13779
+ `${footerActionLabel} duration`
13687
13780
  )
13688
- ] }) : type === "date" ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex flex-col min-h-0 flex-1", children: [
13689
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
13781
+ ] }) : type === "date" ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-col min-h-0 flex-1", children: [
13782
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
13690
13783
  "div",
13691
13784
  {
13692
13785
  className: cn(
13693
- "flex gap-4 flex-1 min-h-0",
13786
+ // Tight `gap-2` between presets and calendar so there
13787
+ // is no wide gutter between the two columns.
13788
+ "flex gap-2 flex-1 min-h-0",
13694
13789
  datePresets !== false && "flex-row"
13695
13790
  ),
13696
13791
  children: [
13697
- datePresets !== false && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: FILTER_SELECT_TOKENS.datePresetSidebar, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "flex flex-col gap-1", children: (Array.isArray(datePresets) ? datePresets : DEFAULT_DATE_PRESETS).map((preset) => {
13698
- const selected = isPresetSelected(preset, date);
13699
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
13700
- "button",
13701
- {
13702
- type: "button",
13703
- onClick: () => {
13704
- const range = preset.getRange();
13705
- onDateChange == null ? void 0 : onDateChange({
13706
- start: range.start,
13707
- end: range.end
13708
- });
13792
+ datePresets !== false && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: FILTER_SELECT_TOKENS.datePresetSidebar, children: [
13793
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex flex-col gap-1", children: (Array.isArray(datePresets) ? datePresets : DEFAULT_DATE_PRESETS).map((preset) => {
13794
+ const selected = isPresetSelected(preset, date);
13795
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
13796
+ "button",
13797
+ {
13798
+ type: "button",
13799
+ onClick: () => {
13800
+ const range = preset.getRange();
13801
+ onDateChange == null ? void 0 : onDateChange({
13802
+ start: range.start,
13803
+ end: range.end
13804
+ });
13805
+ },
13806
+ className: cn(
13807
+ FILTER_SELECT_TOKENS.datePreset.base,
13808
+ selected ? FILTER_SELECT_TOKENS.datePreset.selected : FILTER_SELECT_TOKENS.datePreset.default
13809
+ ),
13810
+ children: preset.label
13709
13811
  },
13710
- className: cn(
13711
- FILTER_SELECT_TOKENS.datePreset.base,
13712
- selected ? FILTER_SELECT_TOKENS.datePreset.selected : FILTER_SELECT_TOKENS.datePreset.default
13713
- ),
13714
- children: preset.label
13715
- },
13716
- preset.value
13717
- );
13718
- }) }) }),
13719
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "flex flex-col min-w-0 flex-1 gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
13812
+ preset.value
13813
+ );
13814
+ }) }),
13815
+ (showClearBtn || hasContentToClear) && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
13816
+ "div",
13817
+ {
13818
+ className: FILTER_SELECT_TOKENS.datePresetSidebarAction.wrapper,
13819
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
13820
+ "button",
13821
+ {
13822
+ type: "button",
13823
+ onClick: handleDateClear,
13824
+ className: FILTER_SELECT_TOKENS.datePresetSidebarAction.button,
13825
+ "aria-label": `${footerActionLabel} date range`,
13826
+ children: [
13827
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
13828
+ import_lucide_react16.Trash2,
13829
+ {
13830
+ className: FILTER_SELECT_TOKENS.datePresetSidebarAction.icon
13831
+ }
13832
+ ),
13833
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
13834
+ "span",
13835
+ {
13836
+ className: FILTER_SELECT_TOKENS.datePresetSidebarAction.text,
13837
+ children: footerActionLabel
13838
+ }
13839
+ )
13840
+ ]
13841
+ }
13842
+ )
13843
+ }
13844
+ )
13845
+ ] }),
13846
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex flex-col min-w-0 flex-1 gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
13720
13847
  CalendarMonthCaptionContext.Provider,
13721
13848
  {
13722
13849
  value: {
@@ -13728,7 +13855,7 @@ var FilterSelect = React36.forwardRef(
13728
13855
  minYear: 2020,
13729
13856
  maxYear: (/* @__PURE__ */ new Date()).getFullYear() + 5
13730
13857
  },
13731
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
13858
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
13732
13859
  import_react_day_picker.DayPicker,
13733
13860
  {
13734
13861
  mode: "range",
@@ -13766,7 +13893,7 @@ var FilterSelect = React36.forwardRef(
13766
13893
  MonthCaption: CalendarMonthCaption,
13767
13894
  // Hide the default nav toolbar — chevrons now live
13768
13895
  // inside our custom MonthCaption on the outer edges.
13769
- Nav: () => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_jsx_runtime32.Fragment, {})
13896
+ Nav: () => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_jsx_runtime33.Fragment, {})
13770
13897
  },
13771
13898
  className: "p-0 font-sans [&_.rdp-day_button]:rounded-[8px]"
13772
13899
  }
@@ -13776,19 +13903,19 @@ var FilterSelect = React36.forwardRef(
13776
13903
  ]
13777
13904
  }
13778
13905
  ),
13779
- (showClearBtn || hasContentToClear) && renderFooterClear(
13906
+ datePresets === false && (showClearBtn || hasContentToClear) && renderFooterClear(
13780
13907
  handleDateClear,
13781
- "Remove",
13782
- "Remove date range"
13908
+ footerActionLabel,
13909
+ `${footerActionLabel} date range`
13783
13910
  )
13784
13911
  ] }) : (
13785
13912
  // -----------------------------------------------------------------
13786
13913
  // Default: LIST type
13787
13914
  // -----------------------------------------------------------------
13788
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
13789
- showSearch && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: FILTER_SELECT_TOKENS.searchBar.wrapper, children: [
13790
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react16.Search, { className: FILTER_SELECT_TOKENS.searchBar.icon }),
13791
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
13915
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
13916
+ showSearch && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: FILTER_SELECT_TOKENS.searchBar.wrapper, children: [
13917
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react16.Search, { className: FILTER_SELECT_TOKENS.searchBar.icon }),
13918
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
13792
13919
  "input",
13793
13920
  {
13794
13921
  type: "text",
@@ -13799,20 +13926,20 @@ var FilterSelect = React36.forwardRef(
13799
13926
  className: FILTER_SELECT_TOKENS.searchBar.input
13800
13927
  }
13801
13928
  ),
13802
- searchQuery && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
13929
+ searchQuery && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
13803
13930
  "button",
13804
13931
  {
13805
13932
  type: "button",
13806
13933
  onClick: () => setSearchQuery(""),
13807
13934
  "aria-label": "Remove search",
13808
13935
  className: FILTER_SELECT_TOKENS.searchBar.clearBtn,
13809
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react16.X, { className: FILTER_SELECT_TOKENS.searchBar.icon })
13936
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_lucide_react16.X, { className: FILTER_SELECT_TOKENS.searchBar.icon })
13810
13937
  }
13811
13938
  )
13812
13939
  ] }),
13813
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "flex flex-col gap-1 w-full min-w-0 overflow-y-auto flex-1 min-h-0", children: isSectioned ? sortedItems.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: FILTER_SELECT_TOKENS.emptyState, children: emptyStateLabel || "No items available" }) : sortedItems.map(
13814
- (section, sectionIdx) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex flex-col gap-1", children: [
13815
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
13940
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex flex-col gap-1 w-full min-w-0 overflow-y-auto flex-1 min-h-0", children: isSectioned ? sortedItems.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: FILTER_SELECT_TOKENS.emptyState, children: emptyStateLabel || "No items available" }) : sortedItems.map(
13941
+ (section, sectionIdx) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-col gap-1", children: [
13942
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
13816
13943
  "div",
13817
13944
  {
13818
13945
  className: FILTER_SELECT_TOKENS.sectionHeader,
@@ -13823,7 +13950,7 @@ var FilterSelect = React36.forwardRef(
13823
13950
  const isSelected = selectedItems.includes(
13824
13951
  item.value
13825
13952
  );
13826
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
13953
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
13827
13954
  FilterListItem,
13828
13955
  {
13829
13956
  value: item.value,
@@ -13847,9 +13974,9 @@ var FilterSelect = React36.forwardRef(
13847
13974
  );
13848
13975
  })
13849
13976
  ] }, sectionIdx)
13850
- ) : sortedItems.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: FILTER_SELECT_TOKENS.emptyState, children: emptyStateLabel || "No items available" }) : sortedItems.map((item) => {
13977
+ ) : sortedItems.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: FILTER_SELECT_TOKENS.emptyState, children: emptyStateLabel || "No items available" }) : sortedItems.map((item) => {
13851
13978
  const isSelected = selectedItems.includes(item.value);
13852
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
13979
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
13853
13980
  FilterListItem,
13854
13981
  {
13855
13982
  value: item.value,
@@ -13874,8 +14001,8 @@ var FilterSelect = React36.forwardRef(
13874
14001
  }) }),
13875
14002
  showClearBtn && selectedItems.length > 0 && renderFooterClear(
13876
14003
  handleClearAll,
13877
- "Remove",
13878
- "Remove all selected items"
14004
+ footerActionLabel,
14005
+ `${footerActionLabel} all selected items`
13879
14006
  )
13880
14007
  ] })
13881
14008
  )
@@ -13889,17 +14016,17 @@ var FilterSelect = React36.forwardRef(
13889
14016
  FilterSelect.displayName = "FilterSelect";
13890
14017
 
13891
14018
  // src/filter-select/compound-filter-select.tsx
13892
- var React37 = __toESM(require("react"));
14019
+ var React38 = __toESM(require("react"));
13893
14020
  var DropdownMenuPrimitive4 = __toESM(require("@radix-ui/react-dropdown-menu"));
13894
14021
  var import_lucide_react17 = require("lucide-react");
13895
- var import_jsx_runtime33 = require("react/jsx-runtime");
14022
+ var import_jsx_runtime34 = require("react/jsx-runtime");
13896
14023
  function renderIcon(icon, className) {
13897
14024
  if (!icon) return null;
13898
- if (React37.isValidElement(icon)) {
13899
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "inline-flex items-center", children: icon });
14025
+ if (React38.isValidElement(icon)) {
14026
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "inline-flex items-center", children: icon });
13900
14027
  }
13901
14028
  if (typeof icon === "function" || typeof icon === "object" && icon !== null && "$$typeof" in icon) {
13902
- return React37.createElement(icon, {
14029
+ return React38.createElement(icon, {
13903
14030
  className: cn("size-4", className)
13904
14031
  });
13905
14032
  }
@@ -13918,8 +14045,8 @@ function CompoundFilterSelect({
13918
14045
  }) {
13919
14046
  const { theme } = useTheme();
13920
14047
  const themeClass = theme === "dark" ? "dark" : "light";
13921
- const [open, setOpen] = React37.useState(false);
13922
- const container = React37.useMemo(
14048
+ const [open, setOpen] = React38.useState(false);
14049
+ const container = React38.useMemo(
13923
14050
  () => {
13924
14051
  var _a5;
13925
14052
  return typeof document !== "undefined" ? (_a5 = document.querySelector(".lego-land")) != null ? _a5 : void 0 : void 0;
@@ -13928,7 +14055,7 @@ function CompoundFilterSelect({
13928
14055
  );
13929
14056
  const selectedOption = options.find((opt) => opt.value === value);
13930
14057
  const effectiveLeadingIcon = leadingIcon != null ? leadingIcon : selectedOption == null ? void 0 : selectedOption.icon;
13931
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
14058
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
13932
14059
  "div",
13933
14060
  {
13934
14061
  className: cn(
@@ -13938,8 +14065,8 @@ function CompoundFilterSelect({
13938
14065
  ),
13939
14066
  ...props,
13940
14067
  children: [
13941
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(DropdownMenuPrimitive4.Root, { open, onOpenChange: setOpen, children: [
13942
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(DropdownMenuPrimitive4.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
14068
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(DropdownMenuPrimitive4.Root, { open, onOpenChange: setOpen, children: [
14069
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(DropdownMenuPrimitive4.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
13943
14070
  "button",
13944
14071
  {
13945
14072
  type: "button",
@@ -13958,8 +14085,8 @@ function CompoundFilterSelect({
13958
14085
  "aria-label": "Toggle filter type",
13959
14086
  children: [
13960
14087
  renderIcon(effectiveLeadingIcon, "text-fg-black"),
13961
- leftLabel && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "font-sans text-xs font-medium leading-4 text-fg-black tracking-normal whitespace-nowrap", children: leftLabel }),
13962
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
14088
+ leftLabel && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "font-sans text-xs font-medium leading-4 text-fg-black tracking-normal whitespace-nowrap", children: leftLabel }),
14089
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
13963
14090
  import_lucide_react17.ChevronDown,
13964
14091
  {
13965
14092
  className: cn(
@@ -13971,7 +14098,7 @@ function CompoundFilterSelect({
13971
14098
  ]
13972
14099
  }
13973
14100
  ) }),
13974
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(DropdownMenuPrimitive4.Portal, { container, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: cn(!container && "lego-land", !container && themeClass), children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
14101
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(DropdownMenuPrimitive4.Portal, { container, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: cn(!container && "lego-land", !container && themeClass), children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
13975
14102
  DropdownMenuPrimitive4.Content,
13976
14103
  {
13977
14104
  className: cn(
@@ -13985,7 +14112,7 @@ function CompoundFilterSelect({
13985
14112
  sideOffset: 6,
13986
14113
  children: options.map((opt) => {
13987
14114
  const isSelected = opt.value === value;
13988
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
14115
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
13989
14116
  DropdownMenuPrimitive4.Item,
13990
14117
  {
13991
14118
  onSelect: () => {
@@ -14002,11 +14129,11 @@ function CompoundFilterSelect({
14002
14129
  "data-[selected=true]:hover:bg-interaction-hov-solid-primary"
14003
14130
  ),
14004
14131
  children: [
14005
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("span", { className: "flex items-center gap-2 min-w-0", children: [
14132
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { className: "flex items-center gap-2 min-w-0", children: [
14006
14133
  renderIcon(opt.icon, "text-fg-black"),
14007
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "font-sans text-xs font-normal leading-4 text-fg-black truncate", children: opt.label })
14134
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "font-sans text-xs font-normal leading-4 text-fg-black truncate", children: opt.label })
14008
14135
  ] }),
14009
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "shrink-0 flex items-center justify-end w-4", children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
14136
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "shrink-0 flex items-center justify-end w-4", children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
14010
14137
  import_lucide_react17.Check,
14011
14138
  {
14012
14139
  className: "size-4 text-fg-brand",
@@ -14021,7 +14148,7 @@ function CompoundFilterSelect({
14021
14148
  }
14022
14149
  ) }) })
14023
14150
  ] }),
14024
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
14151
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
14025
14152
  "div",
14026
14153
  {
14027
14154
  className: cn(
@@ -14031,7 +14158,11 @@ function CompoundFilterSelect({
14031
14158
  "[&_button[data-state]]:!rounded-none [&_button[data-state]]:!rounded-r-[16px]",
14032
14159
  // Paint the FilterSelect label in brand blue, regular weight (Figma 5427:32334).
14033
14160
  "[&_[data-filter-label]]:!text-fg-brand",
14034
- "[&_[data-filter-label]]:!font-normal"
14161
+ "[&_[data-filter-label]]:!font-normal",
14162
+ // In a compound pill, the right-side label IS the value — there is no
14163
+ // separate label/value split to divide. Hide the internal separator
14164
+ // so the trigger reads `[icon] Agent [chevron]`, not `Agent | ▼`.
14165
+ "[&_[data-filter-separator]]:!hidden"
14035
14166
  ),
14036
14167
  children
14037
14168
  }
@@ -14043,7 +14174,7 @@ function CompoundFilterSelect({
14043
14174
  CompoundFilterSelect.displayName = "CompoundFilterSelect";
14044
14175
 
14045
14176
  // src/button-list/button-list.tsx
14046
- var React38 = __toESM(require("react"));
14177
+ var React39 = __toESM(require("react"));
14047
14178
  var DropdownMenuPrimitive5 = __toESM(require("@radix-ui/react-dropdown-menu"));
14048
14179
  var import_lucide_react18 = require("lucide-react");
14049
14180
 
@@ -14056,8 +14187,8 @@ var BUTTON_LIST_TOKENS = {
14056
14187
  };
14057
14188
 
14058
14189
  // src/button-list/button-list.tsx
14059
- var import_jsx_runtime34 = require("react/jsx-runtime");
14060
- var ButtonList = React38.forwardRef(
14190
+ var import_jsx_runtime35 = require("react/jsx-runtime");
14191
+ var ButtonList = React39.forwardRef(
14061
14192
  ({
14062
14193
  label = "Button List",
14063
14194
  leadingIcon: LeadingIcon = import_lucide_react18.Code,
@@ -14072,53 +14203,53 @@ var ButtonList = React38.forwardRef(
14072
14203
  }, ref) => {
14073
14204
  const { theme } = useTheme();
14074
14205
  const themeClass = theme === "dark" ? "dark" : "light";
14075
- const container = React38.useMemo(
14206
+ const container = React39.useMemo(
14076
14207
  () => {
14077
14208
  var _a5;
14078
14209
  return typeof document !== "undefined" ? (_a5 = document.querySelector(".lego-land")) != null ? _a5 : void 0 : void 0;
14079
14210
  },
14080
14211
  []
14081
14212
  );
14082
- const [uncontrolledOpen, setUncontrolledOpen] = React38.useState(
14213
+ const [uncontrolledOpen, setUncontrolledOpen] = React39.useState(
14083
14214
  defaultOpen != null ? defaultOpen : false
14084
14215
  );
14085
14216
  const isControlled = controlledOpen !== void 0;
14086
14217
  const open = isControlled ? controlledOpen : uncontrolledOpen;
14087
- const setOpen = React38.useCallback(
14218
+ const setOpen = React39.useCallback(
14088
14219
  (next) => {
14089
14220
  if (!isControlled) setUncontrolledOpen(next);
14090
14221
  onOpenChange == null ? void 0 : onOpenChange(next);
14091
14222
  },
14092
14223
  [isControlled, onOpenChange]
14093
14224
  );
14094
- const handleSelect = React38.useCallback(
14225
+ const handleSelect = React39.useCallback(
14095
14226
  (value) => {
14096
14227
  onSelect == null ? void 0 : onSelect(value);
14097
14228
  setOpen(false);
14098
14229
  },
14099
14230
  [onSelect, setOpen]
14100
14231
  );
14101
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { ref, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(DropdownMenuPrimitive5.Root, { open, onOpenChange: setOpen, children: [
14102
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(DropdownMenuPrimitive5.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
14232
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { ref, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(DropdownMenuPrimitive5.Root, { open, onOpenChange: setOpen, children: [
14233
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DropdownMenuPrimitive5.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
14103
14234
  "button",
14104
14235
  {
14105
14236
  type: "button",
14106
14237
  className: cn(BUTTON_LIST_TOKENS.trigger, "group", className),
14107
14238
  children: [
14108
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(LeadingIcon, { className: BUTTON_LIST_TOKENS.icon }),
14109
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { children: label }),
14110
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react18.ChevronDown, { className: "size-4 shrink-0 transition-transform group-data-[state=open]:rotate-180" })
14239
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(LeadingIcon, { className: BUTTON_LIST_TOKENS.icon }),
14240
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { children: label }),
14241
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react18.ChevronDown, { className: "size-4 shrink-0 transition-transform group-data-[state=open]:rotate-180" })
14111
14242
  ]
14112
14243
  }
14113
14244
  ) }),
14114
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(DropdownMenuPrimitive5.Portal, { container, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
14245
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DropdownMenuPrimitive5.Portal, { container, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
14115
14246
  "div",
14116
14247
  {
14117
14248
  className: cn(
14118
14249
  !container && "lego-land",
14119
14250
  !container && themeClass
14120
14251
  ),
14121
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
14252
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
14122
14253
  DropdownMenuPrimitive5.Content,
14123
14254
  {
14124
14255
  className: cn(
@@ -14131,15 +14262,15 @@ var ButtonList = React38.forwardRef(
14131
14262
  sideOffset: 4,
14132
14263
  children: items.map((item) => {
14133
14264
  const Icon2 = item.icon;
14134
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
14265
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
14135
14266
  "button",
14136
14267
  {
14137
14268
  type: "button",
14138
14269
  className: cn(BUTTON_LIST_TOKENS.listItem),
14139
14270
  onClick: () => handleSelect(item.value),
14140
14271
  children: [
14141
- Icon2 && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Icon2, { className: BUTTON_LIST_TOKENS.icon }),
14142
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { children: item.label })
14272
+ Icon2 && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Icon2, { className: BUTTON_LIST_TOKENS.icon }),
14273
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { children: item.label })
14143
14274
  ]
14144
14275
  },
14145
14276
  item.value
@@ -15106,7 +15237,7 @@ function useJsonEditor({
15106
15237
  }
15107
15238
 
15108
15239
  // src/json-editor/JsonEditor.tsx
15109
- var import_jsx_runtime35 = require("react/jsx-runtime");
15240
+ var import_jsx_runtime36 = require("react/jsx-runtime");
15110
15241
  function JsonEditor({
15111
15242
  value,
15112
15243
  onChange,
@@ -15138,32 +15269,32 @@ function JsonEditor({
15138
15269
  language
15139
15270
  });
15140
15271
  const hasErrors = errors.length > 0;
15141
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
15142
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
15272
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
15273
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
15143
15274
  "div",
15144
15275
  {
15145
15276
  className: `rounded-[16px] border border-token-xlight overflow-hidden bg-token-white ${hideHeader ? "rounded-t-none border-t-0" : ""}`,
15146
15277
  children: [
15147
- !hideHeader && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center justify-between px-3 py-1.5 bg-token-light-grey rounded-t-xl", children: [
15148
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "text-xs font-semibold leading-4 text-fg-grey-secondary uppercase select-none", children: label }),
15149
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center gap-0.5", children: [
15150
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ToolbarButton, { onClick: formatJson, title: "Format JSON", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react19.WandSparkles, { className: "size-3" }) }),
15151
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Divider, {}),
15152
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ToolbarButton, { onClick: copyToClipboard, title: "Copy JSON", children: copied ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react19.Check, { className: "size-3 text-fg-success" }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react19.Copy, { className: "size-3" }) }),
15153
- showExpandButton && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
15154
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Divider, {}),
15155
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
15278
+ !hideHeader && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex items-center justify-between px-3 py-1.5 bg-token-light-grey rounded-t-xl", children: [
15279
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "text-xs font-semibold leading-4 text-fg-grey-secondary uppercase select-none", children: label }),
15280
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex items-center gap-0.5", children: [
15281
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ToolbarButton, { onClick: formatJson, title: "Format JSON", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react19.WandSparkles, { className: "size-3" }) }),
15282
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Divider, {}),
15283
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ToolbarButton, { onClick: copyToClipboard, title: "Copy JSON", children: copied ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react19.Check, { className: "size-3 text-fg-success" }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react19.Copy, { className: "size-3" }) }),
15284
+ showExpandButton && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
15285
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Divider, {}),
15286
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
15156
15287
  ToolbarButton,
15157
15288
  {
15158
15289
  onClick: () => setIsOpen(true),
15159
15290
  title: "Expand editor",
15160
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react19.Expand, { className: "size-3" })
15291
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react19.Expand, { className: "size-3" })
15161
15292
  }
15162
15293
  )
15163
15294
  ] })
15164
15295
  ] })
15165
15296
  ] }),
15166
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
15297
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
15167
15298
  Ft,
15168
15299
  {
15169
15300
  height,
@@ -15175,11 +15306,11 @@ function JsonEditor({
15175
15306
  theme: "vs"
15176
15307
  }
15177
15308
  ),
15178
- hasErrors && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ErrorBar, { errors })
15309
+ hasErrors && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ErrorBar, { errors })
15179
15310
  ]
15180
15311
  }
15181
15312
  ),
15182
- showExpandButton && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
15313
+ showExpandButton && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
15183
15314
  Dialog,
15184
15315
  {
15185
15316
  open: isOpen,
@@ -15189,29 +15320,29 @@ function JsonEditor({
15189
15320
  confirmLabel: "Close",
15190
15321
  onConfirm: () => setIsOpen(false),
15191
15322
  className: "w-[85vw] max-w-[85vw] h-[85vh]",
15192
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex flex-col overflow-hidden h-full", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex-1 min-h-0 flex flex-col rounded-[16px] border border-token-xlight overflow-hidden bg-token-white", children: [
15193
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex-none flex items-center justify-between px-3 py-1.5 bg-token-light-grey rounded-t-xl", children: [
15194
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "text-xs font-semibold leading-4 text-fg-grey-secondary uppercase select-none" }),
15195
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center gap-0.5", children: [
15196
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
15323
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "flex flex-col overflow-hidden h-full", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex-1 min-h-0 flex flex-col rounded-[16px] border border-token-xlight overflow-hidden bg-token-white", children: [
15324
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex-none flex items-center justify-between px-3 py-1.5 bg-token-light-grey rounded-t-xl", children: [
15325
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "text-xs font-semibold leading-4 text-fg-grey-secondary uppercase select-none" }),
15326
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex items-center gap-0.5", children: [
15327
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
15197
15328
  ToolbarButton,
15198
15329
  {
15199
15330
  onClick: formatExpandedJson,
15200
15331
  title: "Format JSON",
15201
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react19.WandSparkles, { className: "size-3" })
15332
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react19.WandSparkles, { className: "size-3" })
15202
15333
  }
15203
15334
  ),
15204
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Divider, {}),
15205
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ToolbarButton, { onClick: copyToClipboard, title: "Copy JSON", children: copied ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react19.Check, { className: "size-3 text-fg-success" }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react19.Copy, { className: "size-3" }) })
15335
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Divider, {}),
15336
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ToolbarButton, { onClick: copyToClipboard, title: "Copy JSON", children: copied ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react19.Check, { className: "size-3 text-fg-success" }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react19.Copy, { className: "size-3" }) })
15206
15337
  ] })
15207
15338
  ] }),
15208
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
15339
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
15209
15340
  DialogBody,
15210
15341
  {
15211
15342
  scrollable: true,
15212
15343
  className: "flex-1 min-h-0 p-0 overflow-hidden",
15213
15344
  children: [
15214
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "h-full min-h-[50vh] overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
15345
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "h-full min-h-[50vh] overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
15215
15346
  Ft,
15216
15347
  {
15217
15348
  height: "100%",
@@ -15223,7 +15354,7 @@ function JsonEditor({
15223
15354
  theme: "vs"
15224
15355
  }
15225
15356
  ) }),
15226
- hasErrors && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ErrorBar, { errors })
15357
+ hasErrors && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(ErrorBar, { errors })
15227
15358
  ]
15228
15359
  }
15229
15360
  )
@@ -15237,8 +15368,8 @@ function ToolbarButton({
15237
15368
  title,
15238
15369
  children
15239
15370
  }) {
15240
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Tooltip, { children: [
15241
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
15371
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Tooltip, { children: [
15372
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
15242
15373
  "button",
15243
15374
  {
15244
15375
  type: "button",
@@ -15247,16 +15378,16 @@ function ToolbarButton({
15247
15378
  children
15248
15379
  }
15249
15380
  ) }),
15250
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TooltipContent, { side: "top", sideOffset: 6, children: title })
15381
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(TooltipContent, { side: "top", sideOffset: 6, children: title })
15251
15382
  ] }) });
15252
15383
  }
15253
15384
  function Divider() {
15254
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "w-px h-3.5 bg-border-token-xlight mx-0.5" });
15385
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "w-px h-3.5 bg-border-token-xlight mx-0.5" });
15255
15386
  }
15256
15387
  function ErrorBar({ errors }) {
15257
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-start gap-2 bg-token-destructive-secondary border-t border-token-xlight text-fg-destructive text-xs px-3 py-2", children: [
15258
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "mt-px shrink-0", children: "\u26A0" }),
15259
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex flex-col gap-0.5", children: errors.map((err, idx) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { children: err }, idx)) })
15388
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex items-start gap-2 bg-token-destructive-secondary border-t border-token-xlight text-fg-destructive text-xs px-3 py-2", children: [
15389
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "mt-px shrink-0", children: "\u26A0" }),
15390
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "flex flex-col gap-0.5", children: errors.map((err, idx) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { children: err }, idx)) })
15260
15391
  ] });
15261
15392
  }
15262
15393
 
@@ -15275,7 +15406,7 @@ var JSON_EDITOR_LANGUAGE_OPTIONS = [
15275
15406
  ];
15276
15407
 
15277
15408
  // src/key-value-editor/key-value-editor.tsx
15278
- var React40 = __toESM(require("react"));
15409
+ var React41 = __toESM(require("react"));
15279
15410
  var import_lucide_react20 = require("lucide-react");
15280
15411
 
15281
15412
  // src/key-value-editor/variables.ts
@@ -15300,8 +15431,8 @@ var KEY_VALUE_EDITOR_TOKENS = {
15300
15431
  };
15301
15432
 
15302
15433
  // src/key-value-editor/key-value-editor.tsx
15303
- var import_jsx_runtime36 = require("react/jsx-runtime");
15304
- var KeyValueEditor = React40.forwardRef(
15434
+ var import_jsx_runtime37 = require("react/jsx-runtime");
15435
+ var KeyValueEditor = React41.forwardRef(
15305
15436
  ({
15306
15437
  pairs,
15307
15438
  onPairsChange,
@@ -15314,7 +15445,7 @@ var KeyValueEditor = React40.forwardRef(
15314
15445
  className,
15315
15446
  style
15316
15447
  }, ref) => {
15317
- const updatePair = React40.useCallback(
15448
+ const updatePair = React41.useCallback(
15318
15449
  (index2, field, value) => {
15319
15450
  const next = [...pairs];
15320
15451
  next[index2] = { ...next[index2], [field]: value };
@@ -15322,14 +15453,14 @@ var KeyValueEditor = React40.forwardRef(
15322
15453
  },
15323
15454
  [pairs, onPairsChange]
15324
15455
  );
15325
- const deletePair = React40.useCallback(
15456
+ const deletePair = React41.useCallback(
15326
15457
  (index2) => {
15327
15458
  const next = pairs.filter((_2, i) => i !== index2);
15328
15459
  onPairsChange(next);
15329
15460
  },
15330
15461
  [pairs, onPairsChange]
15331
15462
  );
15332
- const handleRowFocus = React40.useCallback(
15463
+ const handleRowFocus = React41.useCallback(
15333
15464
  (index2) => {
15334
15465
  if (index2 === pairs.length - 1) {
15335
15466
  onPairsChange([...pairs, { key: "", value: "" }]);
@@ -15337,20 +15468,20 @@ var KeyValueEditor = React40.forwardRef(
15337
15468
  },
15338
15469
  [pairs, onPairsChange]
15339
15470
  );
15340
- const defaultValueIcon = /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react20.GitCompare, {});
15341
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
15471
+ const defaultValueIcon = /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react20.GitCompare, {});
15472
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
15342
15473
  "div",
15343
15474
  {
15344
15475
  ref,
15345
15476
  className: cn(KEY_VALUE_EDITOR_TOKENS.root, className),
15346
15477
  style,
15347
15478
  children: [
15348
- !hideHeader && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: KEY_VALUE_EDITOR_TOKENS.header, children: [
15349
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: KEY_VALUE_EDITOR_TOKENS.headerCell, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: KEY_VALUE_EDITOR_TOKENS.headerLabel, children: "Key" }) }),
15350
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: KEY_VALUE_EDITOR_TOKENS.headerCell, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: KEY_VALUE_EDITOR_TOKENS.headerLabel, children: "Value" }) }),
15351
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: KEY_VALUE_EDITOR_TOKENS.headerCellActions, children: toolbar && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: KEY_VALUE_EDITOR_TOKENS.iconGroup, children: toolbar }) })
15479
+ !hideHeader && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: KEY_VALUE_EDITOR_TOKENS.header, children: [
15480
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: KEY_VALUE_EDITOR_TOKENS.headerCell, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: KEY_VALUE_EDITOR_TOKENS.headerLabel, children: "Key" }) }),
15481
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: KEY_VALUE_EDITOR_TOKENS.headerCell, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: KEY_VALUE_EDITOR_TOKENS.headerLabel, children: "Value" }) }),
15482
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: KEY_VALUE_EDITOR_TOKENS.headerCellActions, children: toolbar && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: KEY_VALUE_EDITOR_TOKENS.iconGroup, children: toolbar }) })
15352
15483
  ] }),
15353
- pairs.map((pair, index2) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
15484
+ pairs.map((pair, index2) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
15354
15485
  KeyValueRow,
15355
15486
  {
15356
15487
  pair,
@@ -15380,8 +15511,8 @@ function KeyValueRow({
15380
15511
  onFocus,
15381
15512
  showDelete
15382
15513
  }) {
15383
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: KEY_VALUE_EDITOR_TOKENS.row, children: [
15384
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: KEY_VALUE_EDITOR_TOKENS.rowCell, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
15514
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: KEY_VALUE_EDITOR_TOKENS.row, children: [
15515
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: KEY_VALUE_EDITOR_TOKENS.rowCell, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
15385
15516
  Input,
15386
15517
  {
15387
15518
  inputSize: "sm",
@@ -15396,7 +15527,7 @@ function KeyValueRow({
15396
15527
  hideSupportingText: !pair.keyError
15397
15528
  }
15398
15529
  ) }),
15399
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: KEY_VALUE_EDITOR_TOKENS.rowCell, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
15530
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: KEY_VALUE_EDITOR_TOKENS.rowCell, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
15400
15531
  Input,
15401
15532
  {
15402
15533
  inputSize: "sm",
@@ -15412,21 +15543,21 @@ function KeyValueRow({
15412
15543
  hideSupportingText: !pair.valueError
15413
15544
  }
15414
15545
  ) }),
15415
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: KEY_VALUE_EDITOR_TOKENS.rowCellActions, children: showDelete && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
15546
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: KEY_VALUE_EDITOR_TOKENS.rowCellActions, children: showDelete && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
15416
15547
  "button",
15417
15548
  {
15418
15549
  type: "button",
15419
15550
  className: KEY_VALUE_EDITOR_TOKENS.deleteButton,
15420
15551
  onClick: onDelete,
15421
15552
  "aria-label": "Delete row",
15422
- children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react20.Trash2, {})
15553
+ children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react20.Trash2, {})
15423
15554
  }
15424
15555
  ) })
15425
15556
  ] });
15426
15557
  }
15427
15558
 
15428
15559
  // src/audio-player/audio-player.tsx
15429
- var React41 = __toESM(require("react"));
15560
+ var React42 = __toESM(require("react"));
15430
15561
  var import_lucide_react21 = require("lucide-react");
15431
15562
 
15432
15563
  // src/audio-player/variables.ts
@@ -15452,14 +15583,14 @@ var AUDIO_PLAYER_TOKENS = {
15452
15583
  };
15453
15584
 
15454
15585
  // src/audio-player/audio-player.tsx
15455
- var import_jsx_runtime37 = require("react/jsx-runtime");
15586
+ var import_jsx_runtime38 = require("react/jsx-runtime");
15456
15587
  function defaultFormatTime(seconds) {
15457
15588
  if (!isFinite(seconds) || seconds < 0) return "0:00";
15458
15589
  const m = Math.floor(seconds / 60);
15459
15590
  const s = Math.floor(seconds % 60);
15460
15591
  return `${m}:${String(s).padStart(2, "0")}`;
15461
15592
  }
15462
- var AudioPlayer = React41.forwardRef(
15593
+ var AudioPlayer = React42.forwardRef(
15463
15594
  ({
15464
15595
  isPlaying,
15465
15596
  currentTime,
@@ -15475,7 +15606,7 @@ var AudioPlayer = React41.forwardRef(
15475
15606
  ...props
15476
15607
  }, ref) => {
15477
15608
  const progress = duration > 0 ? Math.min(1, Math.max(0, currentTime / duration)) : 0;
15478
- const handleWaveformClick = React41.useCallback(
15609
+ const handleWaveformClick = React42.useCallback(
15479
15610
  (e) => {
15480
15611
  if (!onSeek || duration <= 0) return;
15481
15612
  const rect = e.currentTarget.getBoundingClientRect();
@@ -15487,7 +15618,7 @@ var AudioPlayer = React41.forwardRef(
15487
15618
  },
15488
15619
  [onSeek, duration]
15489
15620
  );
15490
- const handleRateClick = React41.useCallback(() => {
15621
+ const handleRateClick = React42.useCallback(() => {
15491
15622
  var _a5;
15492
15623
  if (!onRateChange || !playbackRateOptions.length) return;
15493
15624
  const idx = playbackRateOptions.findIndex((r) => r === playbackRate);
@@ -15496,22 +15627,22 @@ var AudioPlayer = React41.forwardRef(
15496
15627
  }, [onRateChange, playbackRate, playbackRateOptions]);
15497
15628
  const activeBarIndex = waveform ? Math.floor(progress * waveform.length) : 0;
15498
15629
  const Icon2 = isPlaying ? import_lucide_react21.Pause : import_lucide_react21.Play;
15499
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
15630
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
15500
15631
  "div",
15501
15632
  {
15502
15633
  ref,
15503
15634
  className: cn(AUDIO_PLAYER_TOKENS.container, className),
15504
15635
  ...props,
15505
15636
  children: [
15506
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: AUDIO_PLAYER_TOKENS.leftGroup, children: [
15507
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
15637
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: AUDIO_PLAYER_TOKENS.leftGroup, children: [
15638
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
15508
15639
  "button",
15509
15640
  {
15510
15641
  type: "button",
15511
15642
  onClick: onPlayPause,
15512
15643
  className: AUDIO_PLAYER_TOKENS.btnXs,
15513
15644
  "aria-label": isPlaying ? "Pause" : "Play",
15514
- children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
15645
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
15515
15646
  Icon2,
15516
15647
  {
15517
15648
  className: AUDIO_PLAYER_TOKENS.playIcon,
@@ -15521,9 +15652,9 @@ var AudioPlayer = React41.forwardRef(
15521
15652
  )
15522
15653
  }
15523
15654
  ),
15524
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: AUDIO_PLAYER_TOKENS.time, children: formatTime(currentTime) })
15655
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: AUDIO_PLAYER_TOKENS.time, children: formatTime(currentTime) })
15525
15656
  ] }),
15526
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
15657
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
15527
15658
  "div",
15528
15659
  {
15529
15660
  className: AUDIO_PLAYER_TOKENS.waveform.wrapper,
@@ -15532,7 +15663,7 @@ var AudioPlayer = React41.forwardRef(
15532
15663
  "aria-valuemin": onSeek ? 0 : void 0,
15533
15664
  "aria-valuemax": onSeek ? duration : void 0,
15534
15665
  "aria-valuenow": onSeek ? currentTime : void 0,
15535
- children: waveform && waveform.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: AUDIO_PLAYER_TOKENS.waveform.bars, children: waveform.map((v2, i) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
15666
+ children: waveform && waveform.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: AUDIO_PLAYER_TOKENS.waveform.bars, children: waveform.map((v2, i) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
15536
15667
  "span",
15537
15668
  {
15538
15669
  className: cn(
@@ -15544,19 +15675,19 @@ var AudioPlayer = React41.forwardRef(
15544
15675
  }
15545
15676
  },
15546
15677
  i
15547
- )) }) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: AUDIO_PLAYER_TOKENS.waveform.baseline })
15678
+ )) }) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: AUDIO_PLAYER_TOKENS.waveform.baseline })
15548
15679
  }
15549
15680
  ),
15550
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: AUDIO_PLAYER_TOKENS.rightGroup, children: [
15551
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: AUDIO_PLAYER_TOKENS.time, children: formatTime(duration) }),
15552
- playbackRate != null && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
15681
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: AUDIO_PLAYER_TOKENS.rightGroup, children: [
15682
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: AUDIO_PLAYER_TOKENS.time, children: formatTime(duration) }),
15683
+ playbackRate != null && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
15553
15684
  "button",
15554
15685
  {
15555
15686
  type: "button",
15556
15687
  onClick: handleRateClick,
15557
15688
  className: AUDIO_PLAYER_TOKENS.ratePill,
15558
15689
  "aria-label": `Playback speed ${playbackRate}x`,
15559
- children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("span", { className: AUDIO_PLAYER_TOKENS.rateLabel, children: [
15690
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("span", { className: AUDIO_PLAYER_TOKENS.rateLabel, children: [
15560
15691
  playbackRate,
15561
15692
  "x"
15562
15693
  ] })
@@ -15571,7 +15702,7 @@ var AudioPlayer = React41.forwardRef(
15571
15702
  AudioPlayer.displayName = "AudioPlayer";
15572
15703
 
15573
15704
  // src/chat-bubble/chat-bubble.tsx
15574
- var React42 = __toESM(require("react"));
15705
+ var React43 = __toESM(require("react"));
15575
15706
  var import_lucide_react22 = require("lucide-react");
15576
15707
 
15577
15708
  // src/chat-bubble/variables.ts
@@ -15586,13 +15717,16 @@ var CHAT_BUBBLE_TOKENS = {
15586
15717
  // Row: bubble aligned to the right, avatar after it.
15587
15718
  row: "flex items-end justify-end gap-1 w-full",
15588
15719
  // Default bubble — background/grey #f5f5f5, rounded 12, p 12.
15589
- bubble: "max-w-[80%] p-3 rounded-xl bg-token-grey text-sm font-normal leading-5 text-fg-black",
15720
+ // `min-w-0 break-words` so long unbroken strings (URLs, tokens) wrap
15721
+ // inside the max-w-[80%] cap instead of overflowing horizontally.
15722
+ bubble: "max-w-[80%] min-w-0 p-3 rounded-xl bg-token-grey text-sm font-normal leading-5 text-fg-black break-words",
15590
15723
  // In-Focus: bubble becomes white (sits over the pale-blue row wash).
15591
15724
  bubbleFocused: "bg-token-white",
15592
15725
  // 16px avatar — by default a brand-primary circle.
15593
15726
  avatar: "shrink-0 size-4 rounded-full bg-token-brand-primary overflow-hidden",
15594
- // Timestamp row — right-aligned under the bubble, with a 20px gutter.
15595
- timestampRow: "flex items-center justify-end pr-5"
15727
+ // Timestamp row — timestamp first, then trailing (e.g. tool-call badge);
15728
+ // 8px gap between them, 20px right gutter. Figma: 3575:10751.
15729
+ timestampRow: "flex items-center justify-end gap-2 pr-5"
15596
15730
  },
15597
15731
  user: {
15598
15732
  // Row: avatar first, then text (no bubble).
@@ -15601,7 +15735,7 @@ var CHAT_BUBBLE_TOKENS = {
15601
15735
  avatar: "shrink-0 size-4 rounded-full bg-token-grey flex items-center justify-center text-fg-grey-secondary [&>svg]:size-3",
15602
15736
  // Message text — per Figma: 14px regular, grey-secondary.
15603
15737
  text: "flex-1 min-w-0 text-sm font-normal leading-5 text-fg-grey-secondary break-words",
15604
- timestampRow: "flex items-center pl-5"
15738
+ timestampRow: "flex items-center gap-2 pl-5"
15605
15739
  },
15606
15740
  timestamp: "text-xs font-normal leading-4 tracking-normal text-fg-grey-secondary whitespace-nowrap transition-opacity",
15607
15741
  timestampHidden: "opacity-0 group-hover:opacity-100"
@@ -15611,8 +15745,8 @@ var CHAT_BUBBLE_TOKENS = {
15611
15745
  var agent_avatar_default = "./agent-avatar-ZI4HOQHG.png";
15612
15746
 
15613
15747
  // src/chat-bubble/chat-bubble.tsx
15614
- var import_jsx_runtime38 = require("react/jsx-runtime");
15615
- var ChatBubbleAgent = React42.forwardRef(
15748
+ var import_jsx_runtime39 = require("react/jsx-runtime");
15749
+ var ChatBubbleAgent = React43.forwardRef(
15616
15750
  ({
15617
15751
  message,
15618
15752
  timestamp,
@@ -15623,7 +15757,7 @@ var ChatBubbleAgent = React42.forwardRef(
15623
15757
  className,
15624
15758
  ...props
15625
15759
  }, ref) => {
15626
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
15760
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
15627
15761
  "div",
15628
15762
  {
15629
15763
  ref,
@@ -15634,8 +15768,8 @@ var ChatBubbleAgent = React42.forwardRef(
15634
15768
  ),
15635
15769
  ...props,
15636
15770
  children: [
15637
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: CHAT_BUBBLE_TOKENS.agent.row, children: [
15638
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
15771
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: CHAT_BUBBLE_TOKENS.agent.row, children: [
15772
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
15639
15773
  "div",
15640
15774
  {
15641
15775
  className: cn(
@@ -15645,7 +15779,7 @@ var ChatBubbleAgent = React42.forwardRef(
15645
15779
  children: message
15646
15780
  }
15647
15781
  ),
15648
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: CHAT_BUBBLE_TOKENS.agent.avatar, children: avatar != null ? avatar : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
15782
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: CHAT_BUBBLE_TOKENS.agent.avatar, children: avatar != null ? avatar : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
15649
15783
  "img",
15650
15784
  {
15651
15785
  src: agent_avatar_default,
@@ -15654,19 +15788,18 @@ var ChatBubbleAgent = React42.forwardRef(
15654
15788
  }
15655
15789
  ) })
15656
15790
  ] }),
15657
- (timestamp || trailing) && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: CHAT_BUBBLE_TOKENS.agent.timestampRow, children: [
15658
- trailing,
15659
- timestamp && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
15791
+ (timestamp || trailing) && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: CHAT_BUBBLE_TOKENS.agent.timestampRow, children: [
15792
+ timestamp && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
15660
15793
  "span",
15661
15794
  {
15662
15795
  className: cn(
15663
15796
  CHAT_BUBBLE_TOKENS.timestamp,
15664
- trailing && "ml-2",
15665
15797
  !alwaysShowTimestamp && !focused && CHAT_BUBBLE_TOKENS.timestampHidden
15666
15798
  ),
15667
15799
  children: timestamp
15668
15800
  }
15669
- )
15801
+ ),
15802
+ trailing
15670
15803
  ] })
15671
15804
  ]
15672
15805
  }
@@ -15674,7 +15807,7 @@ var ChatBubbleAgent = React42.forwardRef(
15674
15807
  }
15675
15808
  );
15676
15809
  ChatBubbleAgent.displayName = "ChatBubbleAgent";
15677
- var ChatBubbleUser = React42.forwardRef(
15810
+ var ChatBubbleUser = React43.forwardRef(
15678
15811
  ({
15679
15812
  message,
15680
15813
  timestamp,
@@ -15685,7 +15818,7 @@ var ChatBubbleUser = React42.forwardRef(
15685
15818
  className,
15686
15819
  ...props
15687
15820
  }, ref) => {
15688
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
15821
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
15689
15822
  "div",
15690
15823
  {
15691
15824
  ref,
@@ -15697,23 +15830,22 @@ var ChatBubbleUser = React42.forwardRef(
15697
15830
  ),
15698
15831
  ...props,
15699
15832
  children: [
15700
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: CHAT_BUBBLE_TOKENS.user.row, children: [
15701
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: cn(CHAT_BUBBLE_TOKENS.user.avatar, "mb-0.5"), children: avatar != null ? avatar : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react22.User, {}) }),
15702
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: CHAT_BUBBLE_TOKENS.user.text, children: message })
15833
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: CHAT_BUBBLE_TOKENS.user.row, children: [
15834
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: cn(CHAT_BUBBLE_TOKENS.user.avatar, "mb-0.5"), children: avatar != null ? avatar : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react22.User, {}) }),
15835
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: CHAT_BUBBLE_TOKENS.user.text, children: message })
15703
15836
  ] }),
15704
- (timestamp || trailing) && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: CHAT_BUBBLE_TOKENS.user.timestampRow, children: [
15705
- trailing,
15706
- timestamp && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
15837
+ (timestamp || trailing) && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: CHAT_BUBBLE_TOKENS.user.timestampRow, children: [
15838
+ timestamp && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
15707
15839
  "span",
15708
15840
  {
15709
15841
  className: cn(
15710
15842
  CHAT_BUBBLE_TOKENS.timestamp,
15711
- trailing && "ml-2",
15712
15843
  !alwaysShowTimestamp && !focused && CHAT_BUBBLE_TOKENS.timestampHidden
15713
15844
  ),
15714
15845
  children: timestamp
15715
15846
  }
15716
- )
15847
+ ),
15848
+ trailing
15717
15849
  ] })
15718
15850
  ]
15719
15851
  }
@@ -15723,7 +15855,7 @@ var ChatBubbleUser = React42.forwardRef(
15723
15855
  ChatBubbleUser.displayName = "ChatBubbleUser";
15724
15856
 
15725
15857
  // src/popover/popover.tsx
15726
- var React43 = __toESM(require("react"));
15858
+ var React44 = __toESM(require("react"));
15727
15859
  var import_react_dom2 = require("react-dom");
15728
15860
  var import_lucide_react23 = require("lucide-react");
15729
15861
 
@@ -15760,7 +15892,7 @@ var POPOVER_TOKENS = {
15760
15892
  };
15761
15893
 
15762
15894
  // src/popover/popover.tsx
15763
- var import_jsx_runtime39 = require("react/jsx-runtime");
15895
+ var import_jsx_runtime40 = require("react/jsx-runtime");
15764
15896
  function flipSide(side) {
15765
15897
  if (side === "right") return "left";
15766
15898
  if (side === "left") return "right";
@@ -15825,7 +15957,7 @@ function computePosition(triggerRect, popoverRect, side, align, sideOffset) {
15825
15957
  const clampedTop = Math.max(margin, Math.min(primary.top, vh - popoverRect.height - margin));
15826
15958
  return { top: clampedTop, left: clampedLeft };
15827
15959
  }
15828
- var Popover = React43.forwardRef(
15960
+ var Popover = React44.forwardRef(
15829
15961
  ({
15830
15962
  open: controlledOpen,
15831
15963
  onOpenChange,
@@ -15849,21 +15981,21 @@ var Popover = React43.forwardRef(
15849
15981
  var _a5, _b5, _c;
15850
15982
  const { theme } = useTheme();
15851
15983
  const themeClass = theme === "dark" ? "dark" : "light";
15852
- const [internalOpen, setInternalOpen] = React43.useState(defaultOpen);
15984
+ const [internalOpen, setInternalOpen] = React44.useState(defaultOpen);
15853
15985
  const isControlled = controlledOpen !== void 0;
15854
15986
  const open = isControlled ? controlledOpen : internalOpen;
15855
- const triggerRef = React43.useRef(null);
15856
- const popoverRef = React43.useRef(null);
15857
- const [position, setPosition] = React43.useState({ top: 0, left: 0 });
15858
- const [triggerWidth, setTriggerWidth] = React43.useState(0);
15859
- const setOpen = React43.useCallback(
15987
+ const triggerRef = React44.useRef(null);
15988
+ const popoverRef = React44.useRef(null);
15989
+ const [position, setPosition] = React44.useState({ top: 0, left: 0 });
15990
+ const [triggerWidth, setTriggerWidth] = React44.useState(0);
15991
+ const setOpen = React44.useCallback(
15860
15992
  (next) => {
15861
15993
  if (!isControlled) setInternalOpen(next);
15862
15994
  onOpenChange == null ? void 0 : onOpenChange(next);
15863
15995
  },
15864
15996
  [isControlled, onOpenChange]
15865
15997
  );
15866
- React43.useLayoutEffect(() => {
15998
+ React44.useLayoutEffect(() => {
15867
15999
  if (!open) return;
15868
16000
  const t = triggerRef.current;
15869
16001
  const p = popoverRef.current;
@@ -15887,7 +16019,7 @@ var Popover = React43.forwardRef(
15887
16019
  window.removeEventListener("scroll", onScroll, true);
15888
16020
  };
15889
16021
  }, [open, side, align, sideOffset]);
15890
- React43.useEffect(() => {
16022
+ React44.useEffect(() => {
15891
16023
  if (!open) return;
15892
16024
  const onKey = (e) => {
15893
16025
  if (closeOnEscape && e.key === "Escape") setOpen(false);
@@ -15919,7 +16051,7 @@ var Popover = React43.forwardRef(
15919
16051
  maxHeight,
15920
16052
  zIndex: 50
15921
16053
  };
15922
- const popoverContent = open && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
16054
+ const popoverContent = open && /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
15923
16055
  "div",
15924
16056
  {
15925
16057
  ref: (node) => {
@@ -15940,9 +16072,9 @@ var Popover = React43.forwardRef(
15940
16072
  style: popoverStyle,
15941
16073
  onClick: (e) => e.stopPropagation(),
15942
16074
  children: [
15943
- search && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: POPOVER_TOKENS.searchWrapper, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: POPOVER_TOKENS.search.container, children: [
15944
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react23.Search, { className: POPOVER_TOKENS.search.icon }),
15945
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
16075
+ search && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: POPOVER_TOKENS.searchWrapper, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: POPOVER_TOKENS.search.container, children: [
16076
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react23.Search, { className: POPOVER_TOKENS.search.icon }),
16077
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
15946
16078
  "input",
15947
16079
  {
15948
16080
  type: "search",
@@ -15958,12 +16090,12 @@ var Popover = React43.forwardRef(
15958
16090
  }
15959
16091
  )
15960
16092
  ] }) }),
15961
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: POPOVER_TOKENS.content, children })
16093
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: POPOVER_TOKENS.content, children })
15962
16094
  ]
15963
16095
  }
15964
16096
  );
15965
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: cn("inline-block relative", wrapperClassName), children: [
15966
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
16097
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: cn("inline-block relative", wrapperClassName), children: [
16098
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
15967
16099
  "div",
15968
16100
  {
15969
16101
  ref: triggerRef,
@@ -15973,7 +16105,7 @@ var Popover = React43.forwardRef(
15973
16105
  }
15974
16106
  ),
15975
16107
  typeof document !== "undefined" && popoverContent && (0, import_react_dom2.createPortal)(
15976
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: cn("lego-land", themeClass), children: popoverContent }),
16108
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: cn("lego-land", themeClass), children: popoverContent }),
15977
16109
  document.body
15978
16110
  )
15979
16111
  ] });
@@ -16045,6 +16177,7 @@ Popover.displayName = "Popover";
16045
16177
  SelectTrigger,
16046
16178
  SelectValue,
16047
16179
  ShadowDOMWrapper,
16180
+ SidePanel,
16048
16181
  Spinner,
16049
16182
  Stepper,
16050
16183
  StepperBar,