@l3mpire/ui 2.24.1 → 2.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -4277,7 +4277,7 @@ var RowActions = ({ children, className }) => /* @__PURE__ */ jsx34(
4277
4277
  RowActions.displayName = "RowActions";
4278
4278
 
4279
4279
  // src/components/ui/data-table.tsx
4280
- import * as React36 from "react";
4280
+ import * as React37 from "react";
4281
4281
  import {
4282
4282
  flexRender,
4283
4283
  getCoreRowModel,
@@ -4311,7 +4311,8 @@ import {
4311
4311
  faSortDownSolid,
4312
4312
  faFilterSolid,
4313
4313
  faFilterOutline,
4314
- faGripDotsVerticalSolid as faGripDotsVerticalSolid2
4314
+ faGripDotsVerticalSolid as faGripDotsVerticalSolid2,
4315
+ faEllipsisVerticalSolid
4315
4316
  } from "@l3mpire/icons";
4316
4317
  import * as PopoverPrimitive2 from "@radix-ui/react-popover";
4317
4318
 
@@ -4405,8 +4406,176 @@ var TableCaption = React35.forwardRef(({ className, ...props }, ref) => /* @__PU
4405
4406
  ));
4406
4407
  TableCaption.displayName = "TableCaption";
4407
4408
 
4408
- // src/components/ui/data-table.tsx
4409
+ // src/components/ui/data-table-settings-modal.tsx
4410
+ import * as React36 from "react";
4409
4411
  import { jsx as jsx36, jsxs as jsxs32 } from "react/jsx-runtime";
4412
+ function getColKey(col) {
4413
+ return col.id ?? col.accessorKey ?? "";
4414
+ }
4415
+ function getColLabel(col) {
4416
+ const h = col.header;
4417
+ if (typeof h === "string") return h;
4418
+ return getColKey(col);
4419
+ }
4420
+ function inferLockedIds(columns) {
4421
+ const ids = ["select"];
4422
+ for (const c of columns) {
4423
+ if (c.enableHiding === false) {
4424
+ const key = getColKey(c);
4425
+ if (key) ids.push(key);
4426
+ }
4427
+ }
4428
+ return ids;
4429
+ }
4430
+ function DataTableSettingsModal({
4431
+ open,
4432
+ onOpenChange,
4433
+ columns,
4434
+ columnVisibility,
4435
+ onApply,
4436
+ lockedColumnIds,
4437
+ title = "Manage table",
4438
+ className
4439
+ }) {
4440
+ const [draft, setDraft] = React36.useState(columnVisibility);
4441
+ const [search, setSearch] = React36.useState("");
4442
+ const prevOpen = React36.useRef(open);
4443
+ if (open && !prevOpen.current) {
4444
+ setDraft(columnVisibility);
4445
+ setSearch("");
4446
+ }
4447
+ prevOpen.current = open;
4448
+ const lockedIds = React36.useMemo(
4449
+ () => lockedColumnIds ?? inferLockedIds(columns),
4450
+ [lockedColumnIds, columns]
4451
+ );
4452
+ const editable = React36.useMemo(
4453
+ () => columns.filter((c) => {
4454
+ const key = getColKey(c);
4455
+ return key && !lockedIds.includes(key);
4456
+ }),
4457
+ [columns, lockedIds]
4458
+ );
4459
+ const filtered = React36.useMemo(() => {
4460
+ if (!search) return editable;
4461
+ const q = search.toLowerCase();
4462
+ return editable.filter((c) => getColLabel(c).toLowerCase().includes(q));
4463
+ }, [editable, search]);
4464
+ const visibleCount = editable.filter(
4465
+ (c) => draft[getColKey(c)] !== false
4466
+ ).length;
4467
+ const totalCount = editable.length;
4468
+ const toggle = (key) => setDraft((p) => ({ ...p, [key]: p[key] === false ? true : false }));
4469
+ const showAll = () => {
4470
+ const next = { ...draft };
4471
+ for (const c of editable) next[getColKey(c)] = true;
4472
+ setDraft(next);
4473
+ };
4474
+ const hideAll = () => {
4475
+ const next = { ...draft };
4476
+ for (const c of editable) next[getColKey(c)] = false;
4477
+ setDraft(next);
4478
+ };
4479
+ return /* @__PURE__ */ jsx36(Modal, { open, onOpenChange, children: /* @__PURE__ */ jsxs32(ModalContent, { size: "sm", className, children: [
4480
+ /* @__PURE__ */ jsx36(ModalHeader, { onClose: () => onOpenChange(false), children: /* @__PURE__ */ jsx36(ModalTitle, { children: title }) }),
4481
+ /* @__PURE__ */ jsx36(ModalBody, { children: /* @__PURE__ */ jsxs32("div", { className: "flex flex-col gap-md", children: [
4482
+ /* @__PURE__ */ jsxs32("div", { className: "flex items-center justify-between gap-base", children: [
4483
+ /* @__PURE__ */ jsxs32("span", { className: "text-sm font-medium text-table-cell-text-secondary", children: [
4484
+ "Columns ",
4485
+ visibleCount,
4486
+ " / ",
4487
+ totalCount
4488
+ ] }),
4489
+ /* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-sm", children: [
4490
+ /* @__PURE__ */ jsx36(
4491
+ "button",
4492
+ {
4493
+ type: "button",
4494
+ onClick: showAll,
4495
+ className: "text-xs font-medium text-link-brand-text-default hover:text-link-brand-text-hover hover:underline cursor-pointer bg-transparent border-0 p-0",
4496
+ children: "Show all"
4497
+ }
4498
+ ),
4499
+ /* @__PURE__ */ jsx36("span", { className: "text-xs text-table-cell-text-secondary", children: "\xB7" }),
4500
+ /* @__PURE__ */ jsx36(
4501
+ "button",
4502
+ {
4503
+ type: "button",
4504
+ onClick: hideAll,
4505
+ className: "text-xs font-medium text-link-brand-text-default hover:text-link-brand-text-hover hover:underline cursor-pointer bg-transparent border-0 p-0",
4506
+ children: "Hide all"
4507
+ }
4508
+ )
4509
+ ] })
4510
+ ] }),
4511
+ /* @__PURE__ */ jsx36(
4512
+ SearchBar,
4513
+ {
4514
+ size: "sm",
4515
+ placeholder: "Search columns",
4516
+ value: search,
4517
+ onChange: (e) => setSearch(e.target.value),
4518
+ onClear: () => setSearch("")
4519
+ }
4520
+ ),
4521
+ /* @__PURE__ */ jsx36(
4522
+ "div",
4523
+ {
4524
+ className: cn(
4525
+ "flex flex-col max-h-[360px] overflow-auto rounded-base",
4526
+ "border border-table-border"
4527
+ ),
4528
+ children: filtered.length === 0 ? /* @__PURE__ */ jsx36("div", { className: "py-md text-center text-sm text-table-cell-text-secondary", children: "No columns found" }) : filtered.map((c) => {
4529
+ const key = getColKey(c);
4530
+ const label = getColLabel(c);
4531
+ const checked = draft[key] !== false;
4532
+ return /* @__PURE__ */ jsxs32(
4533
+ "label",
4534
+ {
4535
+ className: cn(
4536
+ "flex items-center gap-base px-base py-sm cursor-pointer",
4537
+ "border-b border-table-border last:border-b-0",
4538
+ "hover:bg-table-row-bg-hover transition-colors"
4539
+ ),
4540
+ children: [
4541
+ /* @__PURE__ */ jsx36(
4542
+ Checkbox,
4543
+ {
4544
+ checked,
4545
+ onCheckedChange: () => toggle(key)
4546
+ }
4547
+ ),
4548
+ /* @__PURE__ */ jsx36("span", { className: "text-sm text-table-cell-text-primary", children: label })
4549
+ ]
4550
+ },
4551
+ key
4552
+ );
4553
+ })
4554
+ }
4555
+ )
4556
+ ] }) }),
4557
+ /* @__PURE__ */ jsxs32(ModalFooter, { children: [
4558
+ /* @__PURE__ */ jsx36(ModalClose, { asChild: true, children: /* @__PURE__ */ jsx36(Button, { appearance: "ghost", intent: "brand", size: "md", children: "Cancel" }) }),
4559
+ /* @__PURE__ */ jsx36(
4560
+ Button,
4561
+ {
4562
+ appearance: "solid",
4563
+ intent: "brand",
4564
+ size: "md",
4565
+ onClick: () => {
4566
+ onApply(draft);
4567
+ onOpenChange(false);
4568
+ },
4569
+ children: "Apply"
4570
+ }
4571
+ )
4572
+ ] })
4573
+ ] }) });
4574
+ }
4575
+ DataTableSettingsModal.displayName = "DataTableSettingsModal";
4576
+
4577
+ // src/components/ui/data-table.tsx
4578
+ import { jsx as jsx37, jsxs as jsxs33 } from "react/jsx-runtime";
4410
4579
  var filterOperatorsByType = {
4411
4580
  string: [
4412
4581
  { value: "contains", label: "Contains" },
@@ -4456,12 +4625,12 @@ function ColumnFilterPopover({
4456
4625
  children
4457
4626
  }) {
4458
4627
  const operators = filterOperatorsByType[filterType] ?? filterOperatorsByType.string;
4459
- const [operator, setOperator] = React36.useState(
4628
+ const [operator, setOperator] = React37.useState(
4460
4629
  operators[0].value
4461
4630
  );
4462
- const [inputValue, setInputValue] = React36.useState("");
4463
- const [open, setOpen] = React36.useState(false);
4464
- React36.useEffect(() => {
4631
+ const [inputValue, setInputValue] = React37.useState("");
4632
+ const [open, setOpen] = React37.useState(false);
4633
+ React37.useEffect(() => {
4465
4634
  if (open && filterValue && typeof filterValue === "object") {
4466
4635
  const fv = filterValue;
4467
4636
  if (fv.operator) setOperator(fv.operator);
@@ -4471,9 +4640,9 @@ function ColumnFilterPopover({
4471
4640
  setInputValue("");
4472
4641
  }
4473
4642
  }, [open, filterValue, operators]);
4474
- return /* @__PURE__ */ jsxs32(PopoverPrimitive2.Root, { open, onOpenChange: setOpen, children: [
4475
- /* @__PURE__ */ jsx36(PopoverPrimitive2.Trigger, { asChild: true, children }),
4476
- /* @__PURE__ */ jsx36(PopoverPrimitive2.Portal, { children: /* @__PURE__ */ jsx36(
4643
+ return /* @__PURE__ */ jsxs33(PopoverPrimitive2.Root, { open, onOpenChange: setOpen, children: [
4644
+ /* @__PURE__ */ jsx37(PopoverPrimitive2.Trigger, { asChild: true, children }),
4645
+ /* @__PURE__ */ jsx37(PopoverPrimitive2.Portal, { children: /* @__PURE__ */ jsx37(
4477
4646
  PopoverPrimitive2.Content,
4478
4647
  {
4479
4648
  align: "start",
@@ -4483,9 +4652,9 @@ function ColumnFilterPopover({
4483
4652
  "animate-in fade-in-0 zoom-in-95"
4484
4653
  ),
4485
4654
  onClick: (e) => e.stopPropagation(),
4486
- children: /* @__PURE__ */ jsxs32("div", { className: "flex flex-col gap-sm", children: [
4487
- /* @__PURE__ */ jsx36("span", { className: "text-xs font-medium text-table-head-text", children: "Filter" }),
4488
- /* @__PURE__ */ jsx36(
4655
+ children: /* @__PURE__ */ jsxs33("div", { className: "flex flex-col gap-sm", children: [
4656
+ /* @__PURE__ */ jsx37("span", { className: "text-xs font-medium text-table-head-text", children: "Filter" }),
4657
+ /* @__PURE__ */ jsx37(
4489
4658
  "select",
4490
4659
  {
4491
4660
  className: cn(
@@ -4495,10 +4664,10 @@ function ColumnFilterPopover({
4495
4664
  ),
4496
4665
  value: operator,
4497
4666
  onChange: (e) => setOperator(e.target.value),
4498
- children: operators.map((op) => /* @__PURE__ */ jsx36("option", { value: op.value, children: op.label }, op.value))
4667
+ children: operators.map((op) => /* @__PURE__ */ jsx37("option", { value: op.value, children: op.label }, op.value))
4499
4668
  }
4500
4669
  ),
4501
- !noValueOperators.has(operator) && /* @__PURE__ */ jsx36(
4670
+ !noValueOperators.has(operator) && /* @__PURE__ */ jsx37(
4502
4671
  "input",
4503
4672
  {
4504
4673
  type: filterType === "number" ? "number" : filterType === "date" ? "date" : "text",
@@ -4518,8 +4687,8 @@ function ColumnFilterPopover({
4518
4687
  }
4519
4688
  }
4520
4689
  ),
4521
- /* @__PURE__ */ jsxs32("div", { className: "flex items-center justify-end gap-xs pt-xs", children: [
4522
- /* @__PURE__ */ jsx36(
4690
+ /* @__PURE__ */ jsxs33("div", { className: "flex items-center justify-end gap-xs pt-xs", children: [
4691
+ /* @__PURE__ */ jsx37(
4523
4692
  Button,
4524
4693
  {
4525
4694
  appearance: "ghost",
@@ -4532,7 +4701,7 @@ function ColumnFilterPopover({
4532
4701
  children: "Clear"
4533
4702
  }
4534
4703
  ),
4535
- /* @__PURE__ */ jsx36(
4704
+ /* @__PURE__ */ jsx37(
4536
4705
  Button,
4537
4706
  {
4538
4707
  appearance: "solid",
@@ -4565,7 +4734,7 @@ function DraggableHeaderCell({
4565
4734
  const leadingIcon = meta?.icon;
4566
4735
  const canDrag = isDragEnabled && meta?.enableDrag !== false;
4567
4736
  const filterType = meta?.filterType ?? "string";
4568
- const [isHovered, setIsHovered] = React36.useState(false);
4737
+ const [isHovered, setIsHovered] = React37.useState(false);
4569
4738
  const {
4570
4739
  attributes,
4571
4740
  listeners,
@@ -4587,7 +4756,7 @@ function DraggableHeaderCell({
4587
4756
  opacity: isDragging ? 0.5 : 1,
4588
4757
  zIndex: isDragging ? 1 : void 0
4589
4758
  };
4590
- return /* @__PURE__ */ jsxs32(
4759
+ return /* @__PURE__ */ jsxs33(
4591
4760
  TableHead,
4592
4761
  {
4593
4762
  ref: setNodeRef,
@@ -4601,15 +4770,15 @@ function DraggableHeaderCell({
4601
4770
  onMouseEnter: () => setIsHovered(true),
4602
4771
  onMouseLeave: () => setIsHovered(false),
4603
4772
  children: [
4604
- /* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-xs", children: [
4605
- leadingIcon && (canDrag ? /* @__PURE__ */ jsx36(
4773
+ /* @__PURE__ */ jsxs33("div", { className: "flex items-center gap-xs", children: [
4774
+ leadingIcon && (canDrag ? /* @__PURE__ */ jsx37(
4606
4775
  "div",
4607
4776
  {
4608
4777
  ...attributes,
4609
4778
  ...listeners,
4610
4779
  className: "shrink-0 flex items-center cursor-grab",
4611
4780
  onClick: (e) => e.stopPropagation(),
4612
- children: /* @__PURE__ */ jsx36(
4781
+ children: /* @__PURE__ */ jsx37(
4613
4782
  Icon24,
4614
4783
  {
4615
4784
  icon: isHovered ? faGripDotsVerticalSolid2 : leadingIcon,
@@ -4618,7 +4787,7 @@ function DraggableHeaderCell({
4618
4787
  }
4619
4788
  )
4620
4789
  }
4621
- ) : /* @__PURE__ */ jsx36(
4790
+ ) : /* @__PURE__ */ jsx37(
4622
4791
  Icon24,
4623
4792
  {
4624
4793
  icon: leadingIcon,
@@ -4626,14 +4795,14 @@ function DraggableHeaderCell({
4626
4795
  className: "shrink-0 text-table-head-icon"
4627
4796
  }
4628
4797
  )),
4629
- !leadingIcon && canDrag && isHovered && /* @__PURE__ */ jsx36(
4798
+ !leadingIcon && canDrag && isHovered && /* @__PURE__ */ jsx37(
4630
4799
  "div",
4631
4800
  {
4632
4801
  ...attributes,
4633
4802
  ...listeners,
4634
4803
  className: "shrink-0 flex items-center cursor-grab",
4635
4804
  onClick: (e) => e.stopPropagation(),
4636
- children: /* @__PURE__ */ jsx36(
4805
+ children: /* @__PURE__ */ jsx37(
4637
4806
  Icon24,
4638
4807
  {
4639
4808
  icon: faGripDotsVerticalSolid2,
@@ -4643,11 +4812,11 @@ function DraggableHeaderCell({
4643
4812
  )
4644
4813
  }
4645
4814
  ),
4646
- /* @__PURE__ */ jsx36("span", { className: "flex-1 truncate", children: header.isPlaceholder ? null : flexRender(
4815
+ /* @__PURE__ */ jsx37("span", { className: "flex-1 truncate", children: header.isPlaceholder ? null : flexRender(
4647
4816
  header.column.columnDef.header,
4648
4817
  header.getContext()
4649
4818
  ) }),
4650
- canSort && (isSorted || isHovered) && /* @__PURE__ */ jsx36(
4819
+ canSort && (isSorted || isHovered) && /* @__PURE__ */ jsx37(
4651
4820
  Icon24,
4652
4821
  {
4653
4822
  icon: isSorted === "asc" ? faSortUpSolid : isSorted === "desc" ? faSortDownSolid : faSortSolid,
@@ -4655,20 +4824,20 @@ function DraggableHeaderCell({
4655
4824
  className: "shrink-0 text-table-head-icon"
4656
4825
  }
4657
4826
  ),
4658
- enableFiltering && (isFiltered || isHovered) && /* @__PURE__ */ jsx36(
4827
+ enableFiltering && (isFiltered || isHovered) && /* @__PURE__ */ jsx37(
4659
4828
  ColumnFilterPopover,
4660
4829
  {
4661
4830
  filterType,
4662
4831
  filterValue: header.column.getFilterValue(),
4663
4832
  onApply: (val) => header.column.setFilterValue(val),
4664
4833
  onClear: () => header.column.setFilterValue(void 0),
4665
- children: /* @__PURE__ */ jsx36(
4834
+ children: /* @__PURE__ */ jsx37(
4666
4835
  "button",
4667
4836
  {
4668
4837
  type: "button",
4669
4838
  onClick: (e) => e.stopPropagation(),
4670
4839
  className: "shrink-0 p-0 border-0 bg-transparent cursor-pointer",
4671
- children: /* @__PURE__ */ jsx36(
4840
+ children: /* @__PURE__ */ jsx37(
4672
4841
  Icon24,
4673
4842
  {
4674
4843
  icon: isFiltered ? faFilterSolid : faFilterOutline,
@@ -4681,7 +4850,7 @@ function DraggableHeaderCell({
4681
4850
  }
4682
4851
  )
4683
4852
  ] }),
4684
- enableColumnResizing && header.column.getCanResize() && /* @__PURE__ */ jsx36(
4853
+ enableColumnResizing && header.column.getCanResize() && /* @__PURE__ */ jsx37(
4685
4854
  "div",
4686
4855
  {
4687
4856
  onMouseDown: header.getResizeHandler(),
@@ -4779,6 +4948,9 @@ function DataTableInner({
4779
4948
  enableColumnPinning = false,
4780
4949
  enableColumnResizing = false,
4781
4950
  enableColumnDrag = false,
4951
+ enableTableSettings = false,
4952
+ lockedColumnIds,
4953
+ tableSettingsTitle,
4782
4954
  sorting: sortingProp,
4783
4955
  onSortingChange,
4784
4956
  columnFilters: columnFiltersProp,
@@ -4799,17 +4971,19 @@ function DataTableInner({
4799
4971
  emptyMessage = "No results.",
4800
4972
  bordered = false
4801
4973
  }) {
4802
- const [internalSorting, setInternalSorting] = React36.useState([]);
4803
- const [internalColumnFilters, setInternalColumnFilters] = React36.useState([]);
4804
- const [internalPagination, setInternalPagination] = React36.useState({ pageIndex: 0, pageSize: 10 });
4805
- const [internalRowSelection, setInternalRowSelection] = React36.useState({});
4806
- const [internalColumnVisibility, setInternalColumnVisibility] = React36.useState({});
4807
- const [internalColumnOrder, setInternalColumnOrder] = React36.useState([]);
4808
- const [internalColumnPinning, setInternalColumnPinning] = React36.useState({});
4809
- const [internalColumnSizing, setInternalColumnSizing] = React36.useState({});
4974
+ const effectiveColumnVisibility = enableColumnVisibility || enableTableSettings;
4975
+ const [tableSettingsOpen, setTableSettingsOpen] = React37.useState(false);
4976
+ const [internalSorting, setInternalSorting] = React37.useState([]);
4977
+ const [internalColumnFilters, setInternalColumnFilters] = React37.useState([]);
4978
+ const [internalPagination, setInternalPagination] = React37.useState({ pageIndex: 0, pageSize: 10 });
4979
+ const [internalRowSelection, setInternalRowSelection] = React37.useState({});
4980
+ const [internalColumnVisibility, setInternalColumnVisibility] = React37.useState({});
4981
+ const [internalColumnOrder, setInternalColumnOrder] = React37.useState([]);
4982
+ const [internalColumnPinning, setInternalColumnPinning] = React37.useState({});
4983
+ const [internalColumnSizing, setInternalColumnSizing] = React37.useState({});
4810
4984
  const columnOrder = columnOrderProp ?? internalColumnOrder;
4811
4985
  const setColumnOrder = onColumnOrderChange ?? setInternalColumnOrder;
4812
- React36.useEffect(() => {
4986
+ React37.useEffect(() => {
4813
4987
  if (enableColumnDrag && columnOrder.length === 0) {
4814
4988
  const ids = columns.map((c) => {
4815
4989
  if ("accessorKey" in c && c.accessorKey) return String(c.accessorKey);
@@ -4853,7 +5027,7 @@ function DataTableInner({
4853
5027
  onRowSelectionChange: onRowSelectionChange ?? setInternalRowSelection
4854
5028
  },
4855
5029
  // Column visibility
4856
- ...enableColumnVisibility && {
5030
+ ...effectiveColumnVisibility && {
4857
5031
  onColumnVisibilityChange: onColumnVisibilityChange ?? setInternalColumnVisibility
4858
5032
  },
4859
5033
  // Column order (always wire up for drag reorder)
@@ -4882,7 +5056,7 @@ function DataTableInner({
4882
5056
  ...enableRowSelection && {
4883
5057
  rowSelection: rowSelectionProp ?? internalRowSelection
4884
5058
  },
4885
- ...enableColumnVisibility && {
5059
+ ...effectiveColumnVisibility && {
4886
5060
  columnVisibility: columnVisibilityProp ?? internalColumnVisibility
4887
5061
  },
4888
5062
  columnOrder,
@@ -4903,7 +5077,7 @@ function DataTableInner({
4903
5077
  }),
4904
5078
  useSensor(KeyboardSensor)
4905
5079
  );
4906
- const handleDragEnd = React36.useCallback(
5080
+ const handleDragEnd = React37.useCallback(
4907
5081
  (event) => {
4908
5082
  const { active, over } = event;
4909
5083
  if (!over || active.id === over.id) return;
@@ -4917,12 +5091,12 @@ function DataTableInner({
4917
5091
  },
4918
5092
  [table, setColumnOrder]
4919
5093
  );
4920
- const columnIds = React36.useMemo(
5094
+ const columnIds = React37.useMemo(
4921
5095
  () => table.getAllLeafColumns().map((c) => c.id),
4922
5096
  // eslint-disable-next-line react-hooks/exhaustive-deps
4923
5097
  [table.getAllLeafColumns().length, columnOrder]
4924
5098
  );
4925
- const columnSizeVars = React36.useMemo(() => {
5099
+ const columnSizeVars = React37.useMemo(() => {
4926
5100
  if (!enableColumnResizing) return {};
4927
5101
  const headers = table.getFlatHeaders();
4928
5102
  const vars = {};
@@ -4933,52 +5107,72 @@ function DataTableInner({
4933
5107
  return vars;
4934
5108
  }, [enableColumnResizing, table.getState().columnSizing]);
4935
5109
  const totalSize = enableColumnResizing ? table.getTotalSize() : void 0;
4936
- const tableContent = /* @__PURE__ */ jsxs32("div", { className: cn("w-full", className), style: columnSizeVars, children: [
4937
- /* @__PURE__ */ jsxs32(
5110
+ const tableContent = /* @__PURE__ */ jsxs33("div", { className: cn("w-full", className), style: columnSizeVars, children: [
5111
+ /* @__PURE__ */ jsxs33(
4938
5112
  Table,
4939
5113
  {
4940
5114
  style: totalSize ? { width: totalSize, tableLayout: "fixed" } : void 0,
4941
5115
  className: totalSize ? "w-auto" : void 0,
4942
5116
  children: [
4943
- /* @__PURE__ */ jsx36(
5117
+ /* @__PURE__ */ jsx37(
4944
5118
  TableHeader,
4945
5119
  {
4946
5120
  className: cn(bordered && "border-t border-table-border"),
4947
- children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx36(TableRow, { children: enableColumnDrag ? /* @__PURE__ */ jsx36(
4948
- SortableContext,
4949
- {
4950
- items: columnIds,
4951
- strategy: horizontalListSortingStrategy,
4952
- children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx36(
4953
- DraggableHeaderCell,
4954
- {
4955
- header,
4956
- enableSorting,
4957
- enableFiltering,
4958
- enableColumnResizing,
4959
- isDragEnabled: enableColumnDrag
4960
- },
4961
- header.id
4962
- ))
4963
- }
4964
- ) : headerGroup.headers.map((header) => /* @__PURE__ */ jsx36(
4965
- DraggableHeaderCell,
4966
- {
4967
- header,
4968
- enableSorting,
4969
- enableFiltering,
4970
- enableColumnResizing,
4971
- isDragEnabled: false
4972
- },
4973
- header.id
4974
- )) }, headerGroup.id))
5121
+ children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsxs33(TableRow, { children: [
5122
+ enableColumnDrag ? /* @__PURE__ */ jsx37(
5123
+ SortableContext,
5124
+ {
5125
+ items: columnIds,
5126
+ strategy: horizontalListSortingStrategy,
5127
+ children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx37(
5128
+ DraggableHeaderCell,
5129
+ {
5130
+ header,
5131
+ enableSorting,
5132
+ enableFiltering,
5133
+ enableColumnResizing,
5134
+ isDragEnabled: enableColumnDrag
5135
+ },
5136
+ header.id
5137
+ ))
5138
+ }
5139
+ ) : headerGroup.headers.map((header) => /* @__PURE__ */ jsx37(
5140
+ DraggableHeaderCell,
5141
+ {
5142
+ header,
5143
+ enableSorting,
5144
+ enableFiltering,
5145
+ enableColumnResizing,
5146
+ isDragEnabled: false
5147
+ },
5148
+ header.id
5149
+ )),
5150
+ enableTableSettings && /* @__PURE__ */ jsx37(
5151
+ "th",
5152
+ {
5153
+ role: "button",
5154
+ "aria-label": tableSettingsTitle ?? "Manage table",
5155
+ onClick: () => setTableSettingsOpen(true),
5156
+ className: cn(
5157
+ "sticky right-0 z-[4] w-10 min-w-10 p-0 cursor-pointer",
5158
+ "bg-table-head-bg-default border-b border-l border-table-border",
5159
+ "text-table-head-icon",
5160
+ "opacity-0 pointer-events-none",
5161
+ "transition-[opacity,color,background-color] duration-150",
5162
+ "group-hover/row:opacity-100 group-hover/row:pointer-events-auto",
5163
+ "hover:bg-table-head-bg-hover hover:text-table-cell-text-primary"
5164
+ ),
5165
+ children: /* @__PURE__ */ jsx37("span", { className: "flex items-center justify-center h-full", children: /* @__PURE__ */ jsx37(Icon24, { icon: faEllipsisVerticalSolid, size: "xs" }) })
5166
+ }
5167
+ )
5168
+ ] }, headerGroup.id))
4975
5169
  }
4976
5170
  ),
4977
- /* @__PURE__ */ jsx36(TableBody, { children: table.getRowModel().rows?.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx36(
5171
+ /* @__PURE__ */ jsx37(TableBody, { children: table.getRowModel().rows?.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx37(
4978
5172
  TableRow,
4979
5173
  {
4980
5174
  "data-state": row.getIsSelected() ? "selected" : void 0,
4981
- children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx36(
5175
+ children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx37(
4982
5176
  TableCell,
4983
5177
  {
4984
5178
  style: enableColumnResizing ? { width: `var(--col-${cell.column.id}-size)` } : void 0,
@@ -4992,21 +5186,36 @@ function DataTableInner({
4992
5186
  ))
4993
5187
  },
4994
5188
  row.id
4995
- )) : /* @__PURE__ */ jsx36(TableRow, { className: "hover:bg-transparent", children: /* @__PURE__ */ jsx36(
5189
+ )) : /* @__PURE__ */ jsx37(TableRow, { className: "hover:bg-transparent", children: /* @__PURE__ */ jsx37(
4996
5190
  TableCell,
4997
5191
  {
4998
5192
  colSpan: columns.length,
4999
5193
  className: "h-48 text-center border-b-0",
5000
- children: emptyState ?? /* @__PURE__ */ jsx36("span", { className: "text-sm text-table-cell-text-secondary", children: emptyMessage })
5194
+ children: emptyState ?? /* @__PURE__ */ jsx37("span", { className: "text-sm text-table-cell-text-secondary", children: emptyMessage })
5001
5195
  }
5002
5196
  ) }) })
5003
5197
  ]
5004
5198
  }
5005
5199
  ),
5006
- children?.(table)
5200
+ children?.(table),
5201
+ enableTableSettings && /* @__PURE__ */ jsx37(
5202
+ DataTableSettingsModal,
5203
+ {
5204
+ open: tableSettingsOpen,
5205
+ onOpenChange: setTableSettingsOpen,
5206
+ columns,
5207
+ columnVisibility: columnVisibilityProp ?? internalColumnVisibility,
5208
+ onApply: (next) => {
5209
+ const apply = onColumnVisibilityChange ?? setInternalColumnVisibility;
5210
+ apply(next);
5211
+ },
5212
+ lockedColumnIds,
5213
+ title: tableSettingsTitle
5214
+ }
5215
+ )
5007
5216
  ] });
5008
5217
  if (enableColumnDrag) {
5009
- return /* @__PURE__ */ jsx36(
5218
+ return /* @__PURE__ */ jsx37(
5010
5219
  DndContext,
5011
5220
  {
5012
5221
  sensors,
@@ -5027,7 +5236,7 @@ function DataTablePagination({
5027
5236
  const totalCount = table.getFilteredRowModel().rows.length;
5028
5237
  const pageIndex = table.getState().pagination.pageIndex;
5029
5238
  const pageCount = table.getPageCount();
5030
- return /* @__PURE__ */ jsxs32(
5239
+ return /* @__PURE__ */ jsxs33(
5031
5240
  "div",
5032
5241
  {
5033
5242
  className: cn(
@@ -5035,16 +5244,16 @@ function DataTablePagination({
5035
5244
  className
5036
5245
  ),
5037
5246
  children: [
5038
- /* @__PURE__ */ jsx36("div", { className: "text-xs text-table-cell-text-secondary", children: selectedCount > 0 && /* @__PURE__ */ jsxs32("span", { children: [
5247
+ /* @__PURE__ */ jsx37("div", { className: "text-xs text-table-cell-text-secondary", children: selectedCount > 0 && /* @__PURE__ */ jsxs33("span", { children: [
5039
5248
  selectedCount,
5040
5249
  " of ",
5041
5250
  totalCount,
5042
5251
  " row(s) selected"
5043
5252
  ] }) }),
5044
- /* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-lg", children: [
5045
- /* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-sm", children: [
5046
- /* @__PURE__ */ jsx36("span", { className: "text-xs text-table-cell-text-secondary whitespace-nowrap", children: "Rows per page" }),
5047
- /* @__PURE__ */ jsx36(
5253
+ /* @__PURE__ */ jsxs33("div", { className: "flex items-center gap-lg", children: [
5254
+ /* @__PURE__ */ jsxs33("div", { className: "flex items-center gap-sm", children: [
5255
+ /* @__PURE__ */ jsx37("span", { className: "text-xs text-table-cell-text-secondary whitespace-nowrap", children: "Rows per page" }),
5256
+ /* @__PURE__ */ jsx37(
5048
5257
  "select",
5049
5258
  {
5050
5259
  className: cn(
@@ -5054,18 +5263,18 @@ function DataTablePagination({
5054
5263
  ),
5055
5264
  value: table.getState().pagination.pageSize,
5056
5265
  onChange: (e) => table.setPageSize(Number(e.target.value)),
5057
- children: pageSizeOptions.map((size) => /* @__PURE__ */ jsx36("option", { value: size, children: size }, size))
5266
+ children: pageSizeOptions.map((size) => /* @__PURE__ */ jsx37("option", { value: size, children: size }, size))
5058
5267
  }
5059
5268
  )
5060
5269
  ] }),
5061
- /* @__PURE__ */ jsxs32("span", { className: "text-xs text-table-cell-text-secondary whitespace-nowrap", children: [
5270
+ /* @__PURE__ */ jsxs33("span", { className: "text-xs text-table-cell-text-secondary whitespace-nowrap", children: [
5062
5271
  "Page ",
5063
5272
  pageIndex + 1,
5064
5273
  " of ",
5065
5274
  pageCount
5066
5275
  ] }),
5067
- /* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-xs", children: [
5068
- /* @__PURE__ */ jsx36(
5276
+ /* @__PURE__ */ jsxs33("div", { className: "flex items-center gap-xs", children: [
5277
+ /* @__PURE__ */ jsx37(
5069
5278
  Button,
5070
5279
  {
5071
5280
  appearance: "outlined",
@@ -5077,7 +5286,7 @@ function DataTablePagination({
5077
5286
  "aria-label": "Previous page"
5078
5287
  }
5079
5288
  ),
5080
- /* @__PURE__ */ jsx36(
5289
+ /* @__PURE__ */ jsx37(
5081
5290
  Button,
5082
5291
  {
5083
5292
  appearance: "outlined",
@@ -5099,15 +5308,15 @@ var DataTable = Object.assign(DataTableInner, { displayName: "DataTable" });
5099
5308
  Object.assign(DataTablePagination, { displayName: "DataTablePagination" });
5100
5309
 
5101
5310
  // src/components/ui/side-panel.tsx
5102
- import * as React37 from "react";
5311
+ import * as React38 from "react";
5103
5312
  import * as DialogPrimitive2 from "@radix-ui/react-dialog";
5104
- import { jsx as jsx37, jsxs as jsxs33 } from "react/jsx-runtime";
5313
+ import { jsx as jsx38, jsxs as jsxs34 } from "react/jsx-runtime";
5105
5314
  var SidePanel = DialogPrimitive2.Root;
5106
5315
  var SidePanelTrigger = DialogPrimitive2.Trigger;
5107
5316
  var SidePanelClose = DialogPrimitive2.Close;
5108
- var SidePanelContent = React37.forwardRef(({ className, overlay = true, children, ...props }, ref) => /* @__PURE__ */ jsxs33(DialogPrimitive2.Portal, { children: [
5109
- overlay && /* @__PURE__ */ jsx37(ModalOverlay, {}),
5110
- /* @__PURE__ */ jsx37(
5317
+ var SidePanelContent = React38.forwardRef(({ className, overlay = true, children, ...props }, ref) => /* @__PURE__ */ jsxs34(DialogPrimitive2.Portal, { children: [
5318
+ overlay && /* @__PURE__ */ jsx38(ModalOverlay, {}),
5319
+ /* @__PURE__ */ jsx38(
5111
5320
  DialogPrimitive2.Content,
5112
5321
  {
5113
5322
  ref,
@@ -5128,11 +5337,11 @@ var SidePanelContent = React37.forwardRef(({ className, overlay = true, children
5128
5337
  SidePanelContent.displayName = "SidePanelContent";
5129
5338
 
5130
5339
  // src/components/ui/filter/filter-chip-segment.tsx
5131
- import * as React38 from "react";
5340
+ import * as React39 from "react";
5132
5341
  import * as TooltipPrimitive3 from "@radix-ui/react-tooltip";
5133
5342
  import { cva as cva19 } from "class-variance-authority";
5134
5343
  import { Icon as Icon25 } from "@l3mpire/icons";
5135
- import { jsx as jsx38, jsxs as jsxs34 } from "react/jsx-runtime";
5344
+ import { jsx as jsx39, jsxs as jsxs35 } from "react/jsx-runtime";
5136
5345
  var filterChipSegmentVariants = cva19(
5137
5346
  ["flex items-center shrink-0 transition-colors"],
5138
5347
  {
@@ -5160,15 +5369,15 @@ function TruncatedLabel({
5160
5369
  truncate,
5161
5370
  className
5162
5371
  }) {
5163
- const textRef = React38.useRef(null);
5164
- const [isTruncated, setIsTruncated] = React38.useState(false);
5165
- React38.useEffect(() => {
5372
+ const textRef = React39.useRef(null);
5373
+ const [isTruncated, setIsTruncated] = React39.useState(false);
5374
+ React39.useEffect(() => {
5166
5375
  const el = textRef.current;
5167
5376
  if (el && truncate) {
5168
5377
  setIsTruncated(el.scrollWidth > el.clientWidth);
5169
5378
  }
5170
5379
  }, [label, truncate]);
5171
- const span = /* @__PURE__ */ jsx38(
5380
+ const span = /* @__PURE__ */ jsx39(
5172
5381
  "span",
5173
5382
  {
5174
5383
  ref: textRef,
@@ -5177,22 +5386,22 @@ function TruncatedLabel({
5177
5386
  }
5178
5387
  );
5179
5388
  if (!isTruncated) return span;
5180
- return /* @__PURE__ */ jsx38(TooltipPrimitive3.Provider, { delayDuration: 300, children: /* @__PURE__ */ jsxs34(TooltipPrimitive3.Root, { children: [
5181
- /* @__PURE__ */ jsx38(TooltipPrimitive3.Trigger, { asChild: true, children: span }),
5182
- /* @__PURE__ */ jsx38(TooltipPrimitive3.Portal, { children: /* @__PURE__ */ jsxs34(
5389
+ return /* @__PURE__ */ jsx39(TooltipPrimitive3.Provider, { delayDuration: 300, children: /* @__PURE__ */ jsxs35(TooltipPrimitive3.Root, { children: [
5390
+ /* @__PURE__ */ jsx39(TooltipPrimitive3.Trigger, { asChild: true, children: span }),
5391
+ /* @__PURE__ */ jsx39(TooltipPrimitive3.Portal, { children: /* @__PURE__ */ jsxs35(
5183
5392
  TooltipPrimitive3.Content,
5184
5393
  {
5185
5394
  sideOffset: 4,
5186
5395
  className: "z-50 px-base py-sm rounded-md shadow-lg bg-tooltip-default-bg text-tooltip-default-text text-sm font-regular leading-sm max-w-[320px] data-[state=delayed-open]:animate-[tooltip-in_150ms_ease-out] data-[state=closed]:animate-[tooltip-out_100ms_ease-in]",
5187
5396
  children: [
5188
5397
  label,
5189
- /* @__PURE__ */ jsx38(TooltipPrimitive3.Arrow, { className: "fill-tooltip-default-bg" })
5398
+ /* @__PURE__ */ jsx39(TooltipPrimitive3.Arrow, { className: "fill-tooltip-default-bg" })
5190
5399
  ]
5191
5400
  }
5192
5401
  ) })
5193
5402
  ] }) });
5194
5403
  }
5195
- var FilterChipSegment = React38.forwardRef(
5404
+ var FilterChipSegment = React39.forwardRef(
5196
5405
  ({
5197
5406
  className,
5198
5407
  segmentType = "property",
@@ -5206,24 +5415,24 @@ var FilterChipSegment = React38.forwardRef(
5206
5415
  ...props
5207
5416
  }, ref) => {
5208
5417
  if (segmentType === "button") {
5209
- return /* @__PURE__ */ jsxs34(
5418
+ return /* @__PURE__ */ jsxs35(
5210
5419
  "div",
5211
5420
  {
5212
5421
  ref,
5213
5422
  className: cn(filterChipSegmentVariants({ type: "button", hasBorder: false }), className),
5214
5423
  ...props,
5215
5424
  children: [
5216
- /* @__PURE__ */ jsx38(
5425
+ /* @__PURE__ */ jsx39(
5217
5426
  "button",
5218
5427
  {
5219
5428
  type: "button",
5220
5429
  onClick: onKebabClick,
5221
5430
  className: "flex items-center justify-center p-sm cursor-pointer hover:bg-filter-chip-segment-bg-hover active:bg-filter-chip-segment-bg-pressed transition-colors",
5222
5431
  "aria-label": "Filter actions",
5223
- children: /* @__PURE__ */ jsx38("span", { className: "size-5 flex items-center justify-center text-sm leading-sm text-filter-chip-kebab-text", children: /* @__PURE__ */ jsxs34("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "currentColor", children: [
5224
- /* @__PURE__ */ jsx38("circle", { cx: "10", cy: "4.5", r: "1.5" }),
5225
- /* @__PURE__ */ jsx38("circle", { cx: "10", cy: "10", r: "1.5" }),
5226
- /* @__PURE__ */ jsx38("circle", { cx: "10", cy: "15.5", r: "1.5" })
5432
+ children: /* @__PURE__ */ jsx39("span", { className: "size-5 flex items-center justify-center text-sm leading-sm text-filter-chip-kebab-text", children: /* @__PURE__ */ jsxs35("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "currentColor", children: [
5433
+ /* @__PURE__ */ jsx39("circle", { cx: "10", cy: "4.5", r: "1.5" }),
5434
+ /* @__PURE__ */ jsx39("circle", { cx: "10", cy: "10", r: "1.5" }),
5435
+ /* @__PURE__ */ jsx39("circle", { cx: "10", cy: "15.5", r: "1.5" })
5227
5436
  ] }) })
5228
5437
  }
5229
5438
  ),
@@ -5232,7 +5441,7 @@ var FilterChipSegment = React38.forwardRef(
5232
5441
  }
5233
5442
  );
5234
5443
  }
5235
- return /* @__PURE__ */ jsxs34(
5444
+ return /* @__PURE__ */ jsxs35(
5236
5445
  "div",
5237
5446
  {
5238
5447
  ref,
@@ -5243,8 +5452,8 @@ var FilterChipSegment = React38.forwardRef(
5243
5452
  ),
5244
5453
  ...props,
5245
5454
  children: [
5246
- adornment && segmentType === "value" && /* @__PURE__ */ jsx38("span", { className: "shrink-0 inline-flex items-center justify-center leading-none", children: adornment }),
5247
- icon && segmentType === "property" && /* @__PURE__ */ jsx38(
5455
+ adornment && segmentType === "value" && /* @__PURE__ */ jsx39("span", { className: "shrink-0 inline-flex items-center justify-center leading-none", children: adornment }),
5456
+ icon && segmentType === "property" && /* @__PURE__ */ jsx39(
5248
5457
  Icon25,
5249
5458
  {
5250
5459
  icon,
@@ -5252,7 +5461,7 @@ var FilterChipSegment = React38.forwardRef(
5252
5461
  className: "shrink-0 text-filter-chip-segment-icon"
5253
5462
  }
5254
5463
  ),
5255
- label && /* @__PURE__ */ jsx38(
5464
+ label && /* @__PURE__ */ jsx39(
5256
5465
  TruncatedLabel,
5257
5466
  {
5258
5467
  label,
@@ -5263,7 +5472,7 @@ var FilterChipSegment = React38.forwardRef(
5263
5472
  )
5264
5473
  }
5265
5474
  ),
5266
- badgeCount != null && badgeCount > 0 && /* @__PURE__ */ jsx38("span", { className: "flex items-center gap-2xs p-2xs rounded-xs bg-filter-chip-badge-bg", children: /* @__PURE__ */ jsx38("span", { className: "text-[10px] font-medium leading-2xs text-filter-chip-badge-text", children: badgeCount }) }),
5475
+ badgeCount != null && badgeCount > 0 && /* @__PURE__ */ jsx39("span", { className: "flex items-center gap-2xs p-2xs rounded-xs bg-filter-chip-badge-bg", children: /* @__PURE__ */ jsx39("span", { className: "text-[10px] font-medium leading-2xs text-filter-chip-badge-text", children: badgeCount }) }),
5267
5476
  children
5268
5477
  ]
5269
5478
  }
@@ -5273,9 +5482,9 @@ var FilterChipSegment = React38.forwardRef(
5273
5482
  FilterChipSegment.displayName = "FilterChipSegment";
5274
5483
 
5275
5484
  // src/components/ui/filter/filter-chip.tsx
5276
- import * as React39 from "react";
5277
- import { jsx as jsx39, jsxs as jsxs35 } from "react/jsx-runtime";
5278
- var FilterChip = React39.forwardRef(
5485
+ import * as React40 from "react";
5486
+ import { jsx as jsx40, jsxs as jsxs36 } from "react/jsx-runtime";
5487
+ var FilterChip = React40.forwardRef(
5279
5488
  ({
5280
5489
  className,
5281
5490
  icon,
@@ -5292,7 +5501,7 @@ var FilterChip = React39.forwardRef(
5292
5501
  }, ref) => {
5293
5502
  const hasOperator = !!operator;
5294
5503
  const hasValue = hasOperator && value != null;
5295
- return /* @__PURE__ */ jsxs35(
5504
+ return /* @__PURE__ */ jsxs36(
5296
5505
  "div",
5297
5506
  {
5298
5507
  ref,
@@ -5303,7 +5512,7 @@ var FilterChip = React39.forwardRef(
5303
5512
  ),
5304
5513
  ...props,
5305
5514
  children: [
5306
- /* @__PURE__ */ jsx39(
5515
+ /* @__PURE__ */ jsx40(
5307
5516
  FilterChipSegment,
5308
5517
  {
5309
5518
  segmentType: "property",
@@ -5313,7 +5522,7 @@ var FilterChip = React39.forwardRef(
5313
5522
  onClick: onPropertyClick
5314
5523
  }
5315
5524
  ),
5316
- /* @__PURE__ */ jsx39(
5525
+ /* @__PURE__ */ jsx40(
5317
5526
  FilterChipSegment,
5318
5527
  {
5319
5528
  segmentType: hasOperator ? "operator" : "placeholder",
@@ -5322,7 +5531,7 @@ var FilterChip = React39.forwardRef(
5322
5531
  onClick: onOperatorClick
5323
5532
  }
5324
5533
  ),
5325
- hasOperator && /* @__PURE__ */ jsx39(
5534
+ hasOperator && /* @__PURE__ */ jsx40(
5326
5535
  FilterChipSegment,
5327
5536
  {
5328
5537
  segmentType: hasValue ? "value" : "placeholder",
@@ -5333,7 +5542,7 @@ var FilterChip = React39.forwardRef(
5333
5542
  onClick: onValueClick
5334
5543
  }
5335
5544
  ),
5336
- hasOperator && /* @__PURE__ */ jsx39(
5545
+ hasOperator && /* @__PURE__ */ jsx40(
5337
5546
  FilterChipSegment,
5338
5547
  {
5339
5548
  segmentType: "button",
@@ -5595,10 +5804,10 @@ function countConditions(nodes) {
5595
5804
  }
5596
5805
 
5597
5806
  // src/components/ui/filter/filter-bar.tsx
5598
- import * as React40 from "react";
5599
- import { jsx as jsx40 } from "react/jsx-runtime";
5600
- var FilterBar = React40.forwardRef(
5601
- ({ className, children, ...props }, ref) => /* @__PURE__ */ jsx40(
5807
+ import * as React41 from "react";
5808
+ import { jsx as jsx41 } from "react/jsx-runtime";
5809
+ var FilterBar = React41.forwardRef(
5810
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ jsx41(
5602
5811
  "div",
5603
5812
  {
5604
5813
  ref,
@@ -5615,8 +5824,8 @@ var FilterBar = React40.forwardRef(
5615
5824
  )
5616
5825
  );
5617
5826
  FilterBar.displayName = "FilterBar";
5618
- var FilterBarLeft = React40.forwardRef(
5619
- ({ className, children, ...props }, ref) => /* @__PURE__ */ jsx40(
5827
+ var FilterBarLeft = React41.forwardRef(
5828
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ jsx41(
5620
5829
  "div",
5621
5830
  {
5622
5831
  ref,
@@ -5627,8 +5836,8 @@ var FilterBarLeft = React40.forwardRef(
5627
5836
  )
5628
5837
  );
5629
5838
  FilterBarLeft.displayName = "FilterBarLeft";
5630
- var FilterBarRight = React40.forwardRef(
5631
- ({ className, children, ...props }, ref) => /* @__PURE__ */ jsx40(
5839
+ var FilterBarRight = React41.forwardRef(
5840
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ jsx41(
5632
5841
  "div",
5633
5842
  {
5634
5843
  ref,
@@ -5641,14 +5850,14 @@ var FilterBarRight = React40.forwardRef(
5641
5850
  FilterBarRight.displayName = "FilterBarRight";
5642
5851
 
5643
5852
  // src/components/ui/filter/sort-button.tsx
5644
- import * as React41 from "react";
5853
+ import * as React42 from "react";
5645
5854
  import * as PopoverPrimitive3 from "@radix-ui/react-popover";
5646
5855
  import { Icon as Icon26 } from "@l3mpire/icons";
5647
5856
  import {
5648
5857
  faArrowUpSmallBigOutline,
5649
5858
  faArrowDownBigSmallOutline
5650
5859
  } from "@l3mpire/icons";
5651
- import { jsx as jsx41, jsxs as jsxs36 } from "react/jsx-runtime";
5860
+ import { jsx as jsx42, jsxs as jsxs37 } from "react/jsx-runtime";
5652
5861
  var SortButton = ({
5653
5862
  className,
5654
5863
  fields,
@@ -5658,11 +5867,11 @@ var SortButton = ({
5658
5867
  iconOnly = false,
5659
5868
  ...props
5660
5869
  }) => {
5661
- const [open, setOpen] = React41.useState(false);
5870
+ const [open, setOpen] = React42.useState(false);
5662
5871
  const activeFieldDef = fields.find((f) => f.id === activeField);
5663
5872
  const activeLabel = activeFieldDef?.label ?? activeField;
5664
- return /* @__PURE__ */ jsxs36(PopoverPrimitive3.Root, { open, onOpenChange: setOpen, children: [
5665
- /* @__PURE__ */ jsx41(PopoverPrimitive3.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs36(
5873
+ return /* @__PURE__ */ jsxs37(PopoverPrimitive3.Root, { open, onOpenChange: setOpen, children: [
5874
+ /* @__PURE__ */ jsx42(PopoverPrimitive3.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs37(
5666
5875
  "button",
5667
5876
  {
5668
5877
  type: "button",
@@ -5677,7 +5886,7 @@ var SortButton = ({
5677
5886
  className
5678
5887
  ),
5679
5888
  children: [
5680
- /* @__PURE__ */ jsx41(
5889
+ /* @__PURE__ */ jsx42(
5681
5890
  Icon26,
5682
5891
  {
5683
5892
  icon: direction === "asc" ? faArrowUpSmallBigOutline : faArrowDownBigSmallOutline,
@@ -5685,17 +5894,17 @@ var SortButton = ({
5685
5894
  className: "shrink-0 text-foreground"
5686
5895
  }
5687
5896
  ),
5688
- !iconOnly && /* @__PURE__ */ jsxs36("span", { className: "text-sm font-medium leading-sm whitespace-nowrap", children: [
5689
- /* @__PURE__ */ jsxs36("span", { className: "text-muted-foreground", children: [
5897
+ !iconOnly && /* @__PURE__ */ jsxs37("span", { className: "text-sm font-medium leading-sm whitespace-nowrap", children: [
5898
+ /* @__PURE__ */ jsxs37("span", { className: "text-muted-foreground", children: [
5690
5899
  "Sort by",
5691
5900
  " "
5692
5901
  ] }),
5693
- /* @__PURE__ */ jsx41("span", { className: "text-foreground", children: activeLabel })
5902
+ /* @__PURE__ */ jsx42("span", { className: "text-foreground", children: activeLabel })
5694
5903
  ] })
5695
5904
  ]
5696
5905
  }
5697
5906
  ) }),
5698
- /* @__PURE__ */ jsx41(PopoverPrimitive3.Portal, { children: /* @__PURE__ */ jsxs36(
5907
+ /* @__PURE__ */ jsx42(PopoverPrimitive3.Portal, { children: /* @__PURE__ */ jsxs37(
5699
5908
  PopoverPrimitive3.Content,
5700
5909
  {
5701
5910
  sideOffset: 4,
@@ -5709,7 +5918,7 @@ var SortButton = ({
5709
5918
  "min-w-[180px]"
5710
5919
  ),
5711
5920
  children: [
5712
- /* @__PURE__ */ jsx41("div", { className: "flex flex-col", children: fields.map((field) => /* @__PURE__ */ jsxs36(
5921
+ /* @__PURE__ */ jsx42("div", { className: "flex flex-col", children: fields.map((field) => /* @__PURE__ */ jsxs37(
5713
5922
  "button",
5714
5923
  {
5715
5924
  type: "button",
@@ -5723,7 +5932,7 @@ var SortButton = ({
5723
5932
  field.id === activeField ? "bg-dropdown-item-hover" : ""
5724
5933
  ),
5725
5934
  children: [
5726
- /* @__PURE__ */ jsx41(
5935
+ /* @__PURE__ */ jsx42(
5727
5936
  Icon26,
5728
5937
  {
5729
5938
  icon: field.icon,
@@ -5734,7 +5943,7 @@ var SortButton = ({
5734
5943
  )
5735
5944
  }
5736
5945
  ),
5737
- /* @__PURE__ */ jsx41(
5946
+ /* @__PURE__ */ jsx42(
5738
5947
  "span",
5739
5948
  {
5740
5949
  className: cn(
@@ -5748,9 +5957,9 @@ var SortButton = ({
5748
5957
  },
5749
5958
  field.id
5750
5959
  )) }),
5751
- /* @__PURE__ */ jsx41("div", { className: "h-px bg-border" }),
5752
- /* @__PURE__ */ jsxs36("div", { className: "flex flex-col", children: [
5753
- /* @__PURE__ */ jsxs36(
5960
+ /* @__PURE__ */ jsx42("div", { className: "h-px bg-border" }),
5961
+ /* @__PURE__ */ jsxs37("div", { className: "flex flex-col", children: [
5962
+ /* @__PURE__ */ jsxs37(
5754
5963
  "button",
5755
5964
  {
5756
5965
  type: "button",
@@ -5764,7 +5973,7 @@ var SortButton = ({
5764
5973
  direction === "asc" ? "bg-dropdown-item-hover" : ""
5765
5974
  ),
5766
5975
  children: [
5767
- /* @__PURE__ */ jsx41(
5976
+ /* @__PURE__ */ jsx42(
5768
5977
  Icon26,
5769
5978
  {
5770
5979
  icon: faArrowUpSmallBigOutline,
@@ -5775,7 +5984,7 @@ var SortButton = ({
5775
5984
  )
5776
5985
  }
5777
5986
  ),
5778
- /* @__PURE__ */ jsx41(
5987
+ /* @__PURE__ */ jsx42(
5779
5988
  "span",
5780
5989
  {
5781
5990
  className: cn(
@@ -5788,7 +5997,7 @@ var SortButton = ({
5788
5997
  ]
5789
5998
  }
5790
5999
  ),
5791
- /* @__PURE__ */ jsxs36(
6000
+ /* @__PURE__ */ jsxs37(
5792
6001
  "button",
5793
6002
  {
5794
6003
  type: "button",
@@ -5802,7 +6011,7 @@ var SortButton = ({
5802
6011
  direction === "desc" ? "bg-dropdown-item-hover" : ""
5803
6012
  ),
5804
6013
  children: [
5805
- /* @__PURE__ */ jsx41(
6014
+ /* @__PURE__ */ jsx42(
5806
6015
  Icon26,
5807
6016
  {
5808
6017
  icon: faArrowDownBigSmallOutline,
@@ -5813,7 +6022,7 @@ var SortButton = ({
5813
6022
  )
5814
6023
  }
5815
6024
  ),
5816
- /* @__PURE__ */ jsx41(
6025
+ /* @__PURE__ */ jsx42(
5817
6026
  "span",
5818
6027
  {
5819
6028
  className: cn(
@@ -5835,10 +6044,10 @@ var SortButton = ({
5835
6044
  SortButton.displayName = "SortButton";
5836
6045
 
5837
6046
  // src/components/ui/filter/filter-bar-button.tsx
5838
- import * as React42 from "react";
6047
+ import * as React43 from "react";
5839
6048
  import { Icon as Icon27, faFilterOutline as faFilterOutline2 } from "@l3mpire/icons";
5840
- import { jsx as jsx42, jsxs as jsxs37 } from "react/jsx-runtime";
5841
- var FilterBarButton = React42.forwardRef(({ className, count, iconOnly = false, children, ...props }, ref) => /* @__PURE__ */ jsxs37(
6049
+ import { jsx as jsx43, jsxs as jsxs38 } from "react/jsx-runtime";
6050
+ var FilterBarButton = React43.forwardRef(({ className, count, iconOnly = false, children, ...props }, ref) => /* @__PURE__ */ jsxs38(
5842
6051
  "button",
5843
6052
  {
5844
6053
  ref,
@@ -5855,7 +6064,7 @@ var FilterBarButton = React42.forwardRef(({ className, count, iconOnly = false,
5855
6064
  ),
5856
6065
  ...props,
5857
6066
  children: [
5858
- /* @__PURE__ */ jsx42(
6067
+ /* @__PURE__ */ jsx43(
5859
6068
  Icon27,
5860
6069
  {
5861
6070
  icon: faFilterOutline2,
@@ -5863,18 +6072,18 @@ var FilterBarButton = React42.forwardRef(({ className, count, iconOnly = false,
5863
6072
  className: "shrink-0 text-foreground"
5864
6073
  }
5865
6074
  ),
5866
- !iconOnly && /* @__PURE__ */ jsx42("span", { className: "text-sm font-medium leading-sm whitespace-nowrap text-foreground", children: children ?? "Filters" }),
5867
- count != null && count > 0 && /* @__PURE__ */ jsx42("span", { className: "flex items-center p-2xs rounded-xs bg-filter-chip-badge-bg", children: /* @__PURE__ */ jsx42("span", { className: "text-[10px] font-medium leading-2xs text-filter-chip-badge-text", children: count }) })
6075
+ !iconOnly && /* @__PURE__ */ jsx43("span", { className: "text-sm font-medium leading-sm whitespace-nowrap text-foreground", children: children ?? "Filters" }),
6076
+ count != null && count > 0 && /* @__PURE__ */ jsx43("span", { className: "flex items-center p-2xs rounded-xs bg-filter-chip-badge-bg", children: /* @__PURE__ */ jsx43("span", { className: "text-[10px] font-medium leading-2xs text-filter-chip-badge-text", children: count }) })
5868
6077
  ]
5869
6078
  }
5870
6079
  ));
5871
6080
  FilterBarButton.displayName = "FilterBarButton";
5872
6081
 
5873
6082
  // src/components/ui/filter/save-view-button.tsx
5874
- import * as React43 from "react";
6083
+ import * as React44 from "react";
5875
6084
  import { Icon as Icon28, faChevronDownOutline } from "@l3mpire/icons";
5876
- import { jsx as jsx43, jsxs as jsxs38 } from "react/jsx-runtime";
5877
- var SaveViewButton = React43.forwardRef(
6085
+ import { jsx as jsx44, jsxs as jsxs39 } from "react/jsx-runtime";
6086
+ var SaveViewButton = React44.forwardRef(
5878
6087
  ({ className, label = "Save view", onSave, onDropdown, ...props }, ref) => {
5879
6088
  const sharedStyle = [
5880
6089
  "relative flex items-center justify-center",
@@ -5884,14 +6093,14 @@ var SaveViewButton = React43.forwardRef(
5884
6093
  "shadow-sm cursor-pointer transition-colors",
5885
6094
  "hover:from-btn-solid-brand-bg-hover hover:to-btn-solid-brand-bg-gradient-to-hover"
5886
6095
  ];
5887
- return /* @__PURE__ */ jsxs38(
6096
+ return /* @__PURE__ */ jsxs39(
5888
6097
  "div",
5889
6098
  {
5890
6099
  ref,
5891
6100
  className: cn("flex items-center", className),
5892
6101
  ...props,
5893
6102
  children: [
5894
- /* @__PURE__ */ jsxs38(
6103
+ /* @__PURE__ */ jsxs39(
5895
6104
  "button",
5896
6105
  {
5897
6106
  type: "button",
@@ -5902,12 +6111,12 @@ var SaveViewButton = React43.forwardRef(
5902
6111
  "rounded-l-md -mr-px"
5903
6112
  ),
5904
6113
  children: [
5905
- /* @__PURE__ */ jsx43("span", { className: "text-sm font-medium leading-sm whitespace-nowrap text-btn-solid-brand-text-default", children: label }),
5906
- /* @__PURE__ */ jsx43("span", { className: "absolute inset-0 rounded-l-[11px] border border-btn-solid-brand-inner-border-default shadow-sm pointer-events-none" })
6114
+ /* @__PURE__ */ jsx44("span", { className: "text-sm font-medium leading-sm whitespace-nowrap text-btn-solid-brand-text-default", children: label }),
6115
+ /* @__PURE__ */ jsx44("span", { className: "absolute inset-0 rounded-l-[11px] border border-btn-solid-brand-inner-border-default shadow-sm pointer-events-none" })
5907
6116
  ]
5908
6117
  }
5909
6118
  ),
5910
- /* @__PURE__ */ jsxs38(
6119
+ /* @__PURE__ */ jsxs39(
5911
6120
  "button",
5912
6121
  {
5913
6122
  type: "button",
@@ -5918,7 +6127,7 @@ var SaveViewButton = React43.forwardRef(
5918
6127
  "rounded-r-md -ml-px"
5919
6128
  ),
5920
6129
  children: [
5921
- /* @__PURE__ */ jsx43(
6130
+ /* @__PURE__ */ jsx44(
5922
6131
  Icon28,
5923
6132
  {
5924
6133
  icon: faChevronDownOutline,
@@ -5926,7 +6135,7 @@ var SaveViewButton = React43.forwardRef(
5926
6135
  className: "text-btn-solid-brand-text-default"
5927
6136
  }
5928
6137
  ),
5929
- /* @__PURE__ */ jsx43("span", { className: "absolute inset-0 rounded-r-[11px] border border-btn-solid-brand-inner-border-default shadow-sm pointer-events-none" })
6138
+ /* @__PURE__ */ jsx44("span", { className: "absolute inset-0 rounded-r-[11px] border border-btn-solid-brand-inner-border-default shadow-sm pointer-events-none" })
5930
6139
  ]
5931
6140
  }
5932
6141
  )
@@ -5939,7 +6148,7 @@ SaveViewButton.displayName = "SaveViewButton";
5939
6148
 
5940
6149
  // src/components/ui/filter/operator-selector.tsx
5941
6150
  import * as PopoverPrimitive4 from "@radix-ui/react-popover";
5942
- import { jsx as jsx44, jsxs as jsxs39 } from "react/jsx-runtime";
6151
+ import { jsx as jsx45, jsxs as jsxs40 } from "react/jsx-runtime";
5943
6152
  var OperatorSelector = ({
5944
6153
  dataType,
5945
6154
  activeOperator,
@@ -5949,9 +6158,9 @@ var OperatorSelector = ({
5949
6158
  children
5950
6159
  }) => {
5951
6160
  const operators = OPERATORS_BY_TYPE[dataType];
5952
- return /* @__PURE__ */ jsxs39(PopoverPrimitive4.Root, { open, onOpenChange, children: [
5953
- /* @__PURE__ */ jsx44(PopoverPrimitive4.Trigger, { asChild: true, children }),
5954
- /* @__PURE__ */ jsx44(PopoverPrimitive4.Portal, { children: /* @__PURE__ */ jsx44(
6161
+ return /* @__PURE__ */ jsxs40(PopoverPrimitive4.Root, { open, onOpenChange, children: [
6162
+ /* @__PURE__ */ jsx45(PopoverPrimitive4.Trigger, { asChild: true, children }),
6163
+ /* @__PURE__ */ jsx45(PopoverPrimitive4.Portal, { children: /* @__PURE__ */ jsx45(
5955
6164
  PopoverPrimitive4.Content,
5956
6165
  {
5957
6166
  sideOffset: 4,
@@ -5964,7 +6173,7 @@ var OperatorSelector = ({
5964
6173
  "data-[side=bottom]:slide-in-from-top-2",
5965
6174
  "min-w-[180px]"
5966
6175
  ),
5967
- children: operators.map((op) => /* @__PURE__ */ jsxs39(
6176
+ children: operators.map((op) => /* @__PURE__ */ jsxs40(
5968
6177
  "button",
5969
6178
  {
5970
6179
  type: "button",
@@ -5975,7 +6184,7 @@ var OperatorSelector = ({
5975
6184
  op === activeOperator && "bg-dropdown-item-hover"
5976
6185
  ),
5977
6186
  children: [
5978
- /* @__PURE__ */ jsx44(
6187
+ /* @__PURE__ */ jsx45(
5979
6188
  "span",
5980
6189
  {
5981
6190
  className: cn(
@@ -5985,7 +6194,7 @@ var OperatorSelector = ({
5985
6194
  children: op
5986
6195
  }
5987
6196
  ),
5988
- isNoValueOperator(op) && /* @__PURE__ */ jsx44("span", { className: "ml-auto text-xs text-muted-foreground", children: "instant" })
6197
+ isNoValueOperator(op) && /* @__PURE__ */ jsx45("span", { className: "ml-auto text-xs text-muted-foreground", children: "instant" })
5989
6198
  ]
5990
6199
  },
5991
6200
  op
@@ -6001,7 +6210,7 @@ var OperatorList = ({
6001
6210
  onSelect
6002
6211
  }) => {
6003
6212
  const operators = OPERATORS_BY_TYPE[dataType];
6004
- return /* @__PURE__ */ jsx44("div", { className: "flex flex-col", children: operators.map((op) => /* @__PURE__ */ jsx44(
6213
+ return /* @__PURE__ */ jsx45("div", { className: "flex flex-col", children: operators.map((op) => /* @__PURE__ */ jsx45(
6005
6214
  "button",
6006
6215
  {
6007
6216
  type: "button",
@@ -6011,7 +6220,7 @@ var OperatorList = ({
6011
6220
  "hover:bg-dropdown-item-hover",
6012
6221
  op === activeOperator && "bg-dropdown-item-hover"
6013
6222
  ),
6014
- children: /* @__PURE__ */ jsx44(
6223
+ children: /* @__PURE__ */ jsx45(
6015
6224
  "span",
6016
6225
  {
6017
6226
  className: cn(
@@ -6041,7 +6250,7 @@ var halfInputClasses = [
6041
6250
  ].join(" ");
6042
6251
 
6043
6252
  // src/components/ui/filter/value-inputs/text-value-input.tsx
6044
- import { jsx as jsx45, jsxs as jsxs40 } from "react/jsx-runtime";
6253
+ import { jsx as jsx46, jsxs as jsxs41 } from "react/jsx-runtime";
6045
6254
  var TextValueInput = ({
6046
6255
  value,
6047
6256
  onChange,
@@ -6051,8 +6260,8 @@ var TextValueInput = ({
6051
6260
  const handleKeyDown = (e) => {
6052
6261
  if (e.key === "Enter") onSubmit?.();
6053
6262
  };
6054
- return /* @__PURE__ */ jsxs40("div", { className: cn("flex flex-col gap-base p-xs", className), children: [
6055
- /* @__PURE__ */ jsx45(
6263
+ return /* @__PURE__ */ jsxs41("div", { className: cn("flex flex-col gap-base p-xs", className), children: [
6264
+ /* @__PURE__ */ jsx46(
6056
6265
  "input",
6057
6266
  {
6058
6267
  type: "text",
@@ -6064,13 +6273,13 @@ var TextValueInput = ({
6064
6273
  className: inputClasses
6065
6274
  }
6066
6275
  ),
6067
- /* @__PURE__ */ jsx45(Button, { appearance: "solid", intent: "brand", size: "sm", className: "self-end", onClick: onSubmit, children: "Apply" })
6276
+ /* @__PURE__ */ jsx46(Button, { appearance: "solid", intent: "brand", size: "sm", className: "self-end", onClick: onSubmit, children: "Apply" })
6068
6277
  ] });
6069
6278
  };
6070
6279
  TextValueInput.displayName = "TextValueInput";
6071
6280
 
6072
6281
  // src/components/ui/filter/value-inputs/number-value-input.tsx
6073
- import { jsx as jsx46, jsxs as jsxs41 } from "react/jsx-runtime";
6282
+ import { jsx as jsx47, jsxs as jsxs42 } from "react/jsx-runtime";
6074
6283
  var NumberValueInput = ({
6075
6284
  value,
6076
6285
  onChange,
@@ -6080,8 +6289,8 @@ var NumberValueInput = ({
6080
6289
  const handleKeyDown = (e) => {
6081
6290
  if (e.key === "Enter") onSubmit?.();
6082
6291
  };
6083
- return /* @__PURE__ */ jsxs41("div", { className: cn("flex flex-col gap-base p-xs", className), children: [
6084
- /* @__PURE__ */ jsx46(
6292
+ return /* @__PURE__ */ jsxs42("div", { className: cn("flex flex-col gap-base p-xs", className), children: [
6293
+ /* @__PURE__ */ jsx47(
6085
6294
  "input",
6086
6295
  {
6087
6296
  type: "number",
@@ -6093,7 +6302,7 @@ var NumberValueInput = ({
6093
6302
  className: inputClasses
6094
6303
  }
6095
6304
  ),
6096
- /* @__PURE__ */ jsx46(Button, { appearance: "solid", intent: "brand", size: "sm", className: "self-end", onClick: onSubmit, children: "Apply" })
6305
+ /* @__PURE__ */ jsx47(Button, { appearance: "solid", intent: "brand", size: "sm", className: "self-end", onClick: onSubmit, children: "Apply" })
6097
6306
  ] });
6098
6307
  };
6099
6308
  NumberValueInput.displayName = "NumberValueInput";
@@ -6104,9 +6313,9 @@ var NumberRangeValueInput = ({
6104
6313
  className
6105
6314
  }) => {
6106
6315
  const rangeVal = value ?? [0, 0];
6107
- return /* @__PURE__ */ jsxs41("div", { className: cn("flex flex-col gap-base p-xs", className), children: [
6108
- /* @__PURE__ */ jsxs41("div", { className: "flex items-center gap-base", children: [
6109
- /* @__PURE__ */ jsx46(
6316
+ return /* @__PURE__ */ jsxs42("div", { className: cn("flex flex-col gap-base p-xs", className), children: [
6317
+ /* @__PURE__ */ jsxs42("div", { className: "flex items-center gap-base", children: [
6318
+ /* @__PURE__ */ jsx47(
6110
6319
  "input",
6111
6320
  {
6112
6321
  type: "number",
@@ -6117,8 +6326,8 @@ var NumberRangeValueInput = ({
6117
6326
  className: halfInputClasses
6118
6327
  }
6119
6328
  ),
6120
- /* @__PURE__ */ jsx46("span", { className: "text-sm text-muted-foreground", children: "and" }),
6121
- /* @__PURE__ */ jsx46(
6329
+ /* @__PURE__ */ jsx47("span", { className: "text-sm text-muted-foreground", children: "and" }),
6330
+ /* @__PURE__ */ jsx47(
6122
6331
  "input",
6123
6332
  {
6124
6333
  type: "number",
@@ -6129,16 +6338,16 @@ var NumberRangeValueInput = ({
6129
6338
  }
6130
6339
  )
6131
6340
  ] }),
6132
- /* @__PURE__ */ jsx46(Button, { appearance: "solid", intent: "brand", size: "sm", className: "self-end", onClick: onSubmit, children: "Apply" })
6341
+ /* @__PURE__ */ jsx47(Button, { appearance: "solid", intent: "brand", size: "sm", className: "self-end", onClick: onSubmit, children: "Apply" })
6133
6342
  ] });
6134
6343
  };
6135
6344
  NumberRangeValueInput.displayName = "NumberRangeValueInput";
6136
6345
 
6137
6346
  // src/components/ui/filter/value-inputs/date-value-input.tsx
6138
- import * as React45 from "react";
6347
+ import * as React46 from "react";
6139
6348
 
6140
6349
  // src/components/ui/date-picker.tsx
6141
- import * as React44 from "react";
6350
+ import * as React45 from "react";
6142
6351
  import * as PopoverPrimitive5 from "@radix-ui/react-popover";
6143
6352
  import {
6144
6353
  Icon as Icon29,
@@ -6147,7 +6356,7 @@ import {
6147
6356
  faArrowRightOutline,
6148
6357
  faCalendarOutline
6149
6358
  } from "@l3mpire/icons";
6150
- import { jsx as jsx47, jsxs as jsxs42 } from "react/jsx-runtime";
6359
+ import { jsx as jsx48, jsxs as jsxs43 } from "react/jsx-runtime";
6151
6360
  function getDaysInMonth(year, month) {
6152
6361
  return new Date(year, month + 1, 0).getDate();
6153
6362
  }
@@ -6179,16 +6388,16 @@ var MONTH_NAMES = [
6179
6388
  "November",
6180
6389
  "December"
6181
6390
  ];
6182
- var DatePickerContext = React44.createContext(
6391
+ var DatePickerContext = React45.createContext(
6183
6392
  null
6184
6393
  );
6185
6394
  function useDatePickerContext() {
6186
- const ctx = React44.useContext(DatePickerContext);
6395
+ const ctx = React45.useContext(DatePickerContext);
6187
6396
  if (!ctx)
6188
6397
  throw new Error("DatePicker compound components must be used within <DatePicker>");
6189
6398
  return ctx;
6190
6399
  }
6191
- var DatePicker = React44.forwardRef(
6400
+ var DatePicker = React45.forwardRef(
6192
6401
  ({
6193
6402
  className,
6194
6403
  mode = "single",
@@ -6199,22 +6408,22 @@ var DatePicker = React44.forwardRef(
6199
6408
  children,
6200
6409
  ...props
6201
6410
  }, ref) => {
6202
- const today = React44.useMemo(() => startOfDay(/* @__PURE__ */ new Date()), []);
6203
- const initialDate = React44.useMemo(() => {
6411
+ const today = React45.useMemo(() => startOfDay(/* @__PURE__ */ new Date()), []);
6412
+ const initialDate = React45.useMemo(() => {
6204
6413
  if (value) {
6205
6414
  if (value instanceof Date) return value;
6206
6415
  return value.from;
6207
6416
  }
6208
6417
  return today;
6209
6418
  }, []);
6210
- const [month, setMonth] = React44.useState(
6419
+ const [month, setMonth] = React45.useState(
6211
6420
  defaultMonth ?? initialDate.getMonth()
6212
6421
  );
6213
- const [year, setYear] = React44.useState(
6422
+ const [year, setYear] = React45.useState(
6214
6423
  defaultYear ?? initialDate.getFullYear()
6215
6424
  );
6216
- const [hoveredDate, setHoveredDate] = React44.useState();
6217
- const goToPrevMonth = React44.useCallback(() => {
6425
+ const [hoveredDate, setHoveredDate] = React45.useState();
6426
+ const goToPrevMonth = React45.useCallback(() => {
6218
6427
  setMonth((m) => {
6219
6428
  if (m === 0) {
6220
6429
  setYear((y) => y - 1);
@@ -6223,7 +6432,7 @@ var DatePicker = React44.forwardRef(
6223
6432
  return m - 1;
6224
6433
  });
6225
6434
  }, []);
6226
- const goToNextMonth = React44.useCallback(() => {
6435
+ const goToNextMonth = React45.useCallback(() => {
6227
6436
  setMonth((m) => {
6228
6437
  if (m === 11) {
6229
6438
  setYear((y) => y + 1);
@@ -6232,7 +6441,7 @@ var DatePicker = React44.forwardRef(
6232
6441
  return m + 1;
6233
6442
  });
6234
6443
  }, []);
6235
- const onSelect = React44.useCallback(
6444
+ const onSelect = React45.useCallback(
6236
6445
  (date) => {
6237
6446
  if (mode === "single") {
6238
6447
  onValueChange?.(date);
@@ -6251,7 +6460,7 @@ var DatePicker = React44.forwardRef(
6251
6460
  },
6252
6461
  [mode, value, onValueChange]
6253
6462
  );
6254
- const ctxValue = React44.useMemo(
6463
+ const ctxValue = React45.useMemo(
6255
6464
  () => ({
6256
6465
  mode,
6257
6466
  selected: value,
@@ -6278,7 +6487,7 @@ var DatePicker = React44.forwardRef(
6278
6487
  hoveredDate
6279
6488
  ]
6280
6489
  );
6281
- return /* @__PURE__ */ jsx47(DatePickerContext.Provider, { value: ctxValue, children: /* @__PURE__ */ jsx47(
6490
+ return /* @__PURE__ */ jsx48(DatePickerContext.Provider, { value: ctxValue, children: /* @__PURE__ */ jsx48(
6282
6491
  "div",
6283
6492
  {
6284
6493
  ref,
@@ -6301,22 +6510,22 @@ function defaultFormatDate(date) {
6301
6510
  year: "numeric"
6302
6511
  });
6303
6512
  }
6304
- var DatePickerSelects = React44.forwardRef(({ className, formatDate = defaultFormatDate, ...props }, ref) => {
6513
+ var DatePickerSelects = React45.forwardRef(({ className, formatDate = defaultFormatDate, ...props }, ref) => {
6305
6514
  const { selected } = useDatePickerContext();
6306
6515
  const fromDate = selected instanceof Date ? selected : selected?.from;
6307
6516
  const toDate = selected instanceof Date ? void 0 : selected?.to;
6308
- return /* @__PURE__ */ jsx47(
6517
+ return /* @__PURE__ */ jsx48(
6309
6518
  "div",
6310
6519
  {
6311
6520
  ref,
6312
6521
  className: cn("flex flex-col items-start pt-lg px-lg", className),
6313
6522
  ...props,
6314
- children: /* @__PURE__ */ jsxs42("div", { className: "flex items-center gap-base w-full", children: [
6315
- /* @__PURE__ */ jsxs42("div", { className: "flex-1 flex items-center gap-base min-w-0 px-base py-sm bg-gradient-to-t from-[var(--color-select-bg-default)] to-[var(--color-select-bg-gradient-to)] border border-[var(--color-select-border-default)] rounded-base shadow-sm", children: [
6316
- /* @__PURE__ */ jsx47("span", { className: "flex-1 text-sm font-regular leading-sm text-datepicker-header-text truncate", children: fromDate ? formatDate(fromDate) : "Start date" }),
6317
- /* @__PURE__ */ jsx47(Icon29, { icon: faCalendarOutline, size: "sm", className: "shrink-0 text-datepicker-header-text" })
6523
+ children: /* @__PURE__ */ jsxs43("div", { className: "flex items-center gap-base w-full", children: [
6524
+ /* @__PURE__ */ jsxs43("div", { className: "flex-1 flex items-center gap-base min-w-0 px-base py-sm bg-gradient-to-t from-[var(--color-select-bg-default)] to-[var(--color-select-bg-gradient-to)] border border-[var(--color-select-border-default)] rounded-base shadow-sm", children: [
6525
+ /* @__PURE__ */ jsx48("span", { className: "flex-1 text-sm font-regular leading-sm text-datepicker-header-text truncate", children: fromDate ? formatDate(fromDate) : "Start date" }),
6526
+ /* @__PURE__ */ jsx48(Icon29, { icon: faCalendarOutline, size: "sm", className: "shrink-0 text-datepicker-header-text" })
6318
6527
  ] }),
6319
- /* @__PURE__ */ jsx47(
6528
+ /* @__PURE__ */ jsx48(
6320
6529
  Icon29,
6321
6530
  {
6322
6531
  icon: faArrowRightOutline,
@@ -6324,9 +6533,9 @@ var DatePickerSelects = React44.forwardRef(({ className, formatDate = defaultFor
6324
6533
  className: "shrink-0 text-datepicker-header-weekday"
6325
6534
  }
6326
6535
  ),
6327
- /* @__PURE__ */ jsxs42("div", { className: "flex-1 flex items-center gap-base min-w-0 px-base py-sm bg-gradient-to-t from-[var(--color-select-bg-default)] to-[var(--color-select-bg-gradient-to)] border border-[var(--color-select-border-default)] rounded-base shadow-sm", children: [
6328
- /* @__PURE__ */ jsx47("span", { className: "flex-1 text-sm font-regular leading-sm text-datepicker-header-text truncate", children: toDate ? formatDate(toDate) : "End date" }),
6329
- /* @__PURE__ */ jsx47(Icon29, { icon: faCalendarOutline, size: "sm", className: "shrink-0 text-datepicker-header-text" })
6536
+ /* @__PURE__ */ jsxs43("div", { className: "flex-1 flex items-center gap-base min-w-0 px-base py-sm bg-gradient-to-t from-[var(--color-select-bg-default)] to-[var(--color-select-bg-gradient-to)] border border-[var(--color-select-border-default)] rounded-base shadow-sm", children: [
6537
+ /* @__PURE__ */ jsx48("span", { className: "flex-1 text-sm font-regular leading-sm text-datepicker-header-text truncate", children: toDate ? formatDate(toDate) : "End date" }),
6538
+ /* @__PURE__ */ jsx48(Icon29, { icon: faCalendarOutline, size: "sm", className: "shrink-0 text-datepicker-header-text" })
6330
6539
  ] })
6331
6540
  ] })
6332
6541
  }
@@ -6342,7 +6551,7 @@ var DatePickerDay = ({ date, isOutside }) => {
6342
6551
  const inRange = mode === "range" && selected && !(selected instanceof Date) && selected.from && selected.to && !isSelected && isInRange(date, selected.from, selected.to);
6343
6552
  const inPreviewRange = mode === "range" && selected && !(selected instanceof Date) && selected.from && !selected.to && hoveredDate && !isSelected && hoveredDate.getTime() > selected.from.getTime() && isInRange(date, selected.from, hoveredDate);
6344
6553
  const isInRangeOrPreview = inRange || inPreviewRange;
6345
- return /* @__PURE__ */ jsxs42(
6554
+ return /* @__PURE__ */ jsxs43(
6346
6555
  "button",
6347
6556
  {
6348
6557
  type: "button",
@@ -6366,14 +6575,14 @@ var DatePickerDay = ({ date, isOutside }) => {
6366
6575
  ),
6367
6576
  children: [
6368
6577
  date.getDate(),
6369
- isToday && !isOutside && /* @__PURE__ */ jsx47("span", { className: "absolute bottom-0.5 left-1/2 -translate-x-1/2 size-1.5 rounded-full bg-datepicker-day-today" })
6578
+ isToday && !isOutside && /* @__PURE__ */ jsx48("span", { className: "absolute bottom-0.5 left-1/2 -translate-x-1/2 size-1.5 rounded-full bg-datepicker-day-today" })
6370
6579
  ]
6371
6580
  }
6372
6581
  );
6373
6582
  };
6374
- var DatePickerCalendar = React44.forwardRef(({ className, header, ...props }, ref) => {
6583
+ var DatePickerCalendar = React45.forwardRef(({ className, header, ...props }, ref) => {
6375
6584
  const { month, year, goToPrevMonth, goToNextMonth } = useDatePickerContext();
6376
- const weeks = React44.useMemo(() => {
6585
+ const weeks = React45.useMemo(() => {
6377
6586
  const firstDay = new Date(year, month, 1);
6378
6587
  const startOffset = getWeekdayIndex(firstDay);
6379
6588
  const daysInMonth = getDaysInMonth(year, month);
@@ -6413,7 +6622,7 @@ var DatePickerCalendar = React44.forwardRef(({ className, header, ...props }, re
6413
6622
  }
6414
6623
  return result;
6415
6624
  }, [month, year]);
6416
- return /* @__PURE__ */ jsxs42(
6625
+ return /* @__PURE__ */ jsxs43(
6417
6626
  "div",
6418
6627
  {
6419
6628
  ref,
@@ -6421,38 +6630,38 @@ var DatePickerCalendar = React44.forwardRef(({ className, header, ...props }, re
6421
6630
  ...props,
6422
6631
  children: [
6423
6632
  header,
6424
- /* @__PURE__ */ jsxs42("div", { className: "flex flex-col gap-lg p-lg", children: [
6425
- /* @__PURE__ */ jsxs42("div", { className: "flex items-center justify-between", children: [
6426
- /* @__PURE__ */ jsxs42("span", { className: "text-base font-medium leading-base text-datepicker-header-text", children: [
6633
+ /* @__PURE__ */ jsxs43("div", { className: "flex flex-col gap-lg p-lg", children: [
6634
+ /* @__PURE__ */ jsxs43("div", { className: "flex items-center justify-between", children: [
6635
+ /* @__PURE__ */ jsxs43("span", { className: "text-base font-medium leading-base text-datepicker-header-text", children: [
6427
6636
  MONTH_NAMES[month],
6428
6637
  " ",
6429
6638
  year
6430
6639
  ] }),
6431
- /* @__PURE__ */ jsxs42("div", { className: "flex items-center gap-xs", children: [
6432
- /* @__PURE__ */ jsx47(
6640
+ /* @__PURE__ */ jsxs43("div", { className: "flex items-center gap-xs", children: [
6641
+ /* @__PURE__ */ jsx48(
6433
6642
  "button",
6434
6643
  {
6435
6644
  type: "button",
6436
6645
  onClick: goToPrevMonth,
6437
6646
  className: "flex items-center justify-center p-xs rounded-base hover:bg-datepicker-day-bg-hover transition-colors cursor-pointer",
6438
6647
  "aria-label": "Previous month",
6439
- children: /* @__PURE__ */ jsx47(Icon29, { icon: faChevronLeftOutline2, size: "xs", className: "text-datepicker-header-nav" })
6648
+ children: /* @__PURE__ */ jsx48(Icon29, { icon: faChevronLeftOutline2, size: "xs", className: "text-datepicker-header-nav" })
6440
6649
  }
6441
6650
  ),
6442
- /* @__PURE__ */ jsx47(
6651
+ /* @__PURE__ */ jsx48(
6443
6652
  "button",
6444
6653
  {
6445
6654
  type: "button",
6446
6655
  onClick: goToNextMonth,
6447
6656
  className: "flex items-center justify-center p-xs rounded-base hover:bg-datepicker-day-bg-hover transition-colors cursor-pointer",
6448
6657
  "aria-label": "Next month",
6449
- children: /* @__PURE__ */ jsx47(Icon29, { icon: faChevronRightOutline2, size: "xs", className: "text-datepicker-header-nav" })
6658
+ children: /* @__PURE__ */ jsx48(Icon29, { icon: faChevronRightOutline2, size: "xs", className: "text-datepicker-header-nav" })
6450
6659
  }
6451
6660
  )
6452
6661
  ] })
6453
6662
  ] }),
6454
- /* @__PURE__ */ jsxs42("div", { className: "flex flex-col", children: [
6455
- /* @__PURE__ */ jsx47("div", { className: "grid grid-cols-7 gap-base py-sm", children: WEEKDAYS.map((day) => /* @__PURE__ */ jsx47(
6663
+ /* @__PURE__ */ jsxs43("div", { className: "flex flex-col", children: [
6664
+ /* @__PURE__ */ jsx48("div", { className: "grid grid-cols-7 gap-base py-sm", children: WEEKDAYS.map((day) => /* @__PURE__ */ jsx48(
6456
6665
  "span",
6457
6666
  {
6458
6667
  className: "w-9 text-center text-xs font-regular leading-xs text-datepicker-header-weekday",
@@ -6460,7 +6669,7 @@ var DatePickerCalendar = React44.forwardRef(({ className, header, ...props }, re
6460
6669
  },
6461
6670
  day
6462
6671
  )) }),
6463
- /* @__PURE__ */ jsx47("div", { className: "flex flex-col", children: weeks.map((week, wi) => /* @__PURE__ */ jsx47("div", { className: "grid grid-cols-7 gap-base", children: week.map((day, di) => /* @__PURE__ */ jsx47(
6672
+ /* @__PURE__ */ jsx48("div", { className: "flex flex-col", children: weeks.map((week, wi) => /* @__PURE__ */ jsx48("div", { className: "grid grid-cols-7 gap-base", children: week.map((day, di) => /* @__PURE__ */ jsx48(
6464
6673
  DatePickerDay,
6465
6674
  {
6466
6675
  date: day.date,
@@ -6475,10 +6684,10 @@ var DatePickerCalendar = React44.forwardRef(({ className, header, ...props }, re
6475
6684
  );
6476
6685
  });
6477
6686
  DatePickerCalendar.displayName = "DatePickerCalendar";
6478
- var DatePickerSuggestions = React44.forwardRef(
6687
+ var DatePickerSuggestions = React45.forwardRef(
6479
6688
  ({ className, suggestions, formatDate = defaultFormatDate, ...props }, ref) => {
6480
6689
  const { onSelect, mode } = useDatePickerContext();
6481
- const onValueChange = React44.useContext(DatePickerContext) ? void 0 : void 0;
6690
+ const onValueChange = React45.useContext(DatePickerContext) ? void 0 : void 0;
6482
6691
  const ctx = useDatePickerContext();
6483
6692
  const handleClick = (suggestion) => {
6484
6693
  const val = suggestion.getValue();
@@ -6500,7 +6709,7 @@ var DatePickerSuggestions = React44.forwardRef(
6500
6709
  const to = val.to ? formatDate(val.to) : "";
6501
6710
  return to ? `${from} - ${to}` : from;
6502
6711
  };
6503
- return /* @__PURE__ */ jsxs42(
6712
+ return /* @__PURE__ */ jsxs43(
6504
6713
  "div",
6505
6714
  {
6506
6715
  ref,
@@ -6510,16 +6719,16 @@ var DatePickerSuggestions = React44.forwardRef(
6510
6719
  ),
6511
6720
  ...props,
6512
6721
  children: [
6513
- /* @__PURE__ */ jsx47("div", { className: "pt-lg px-base", children: /* @__PURE__ */ jsx47("div", { className: "flex items-center p-base rounded-base", children: /* @__PURE__ */ jsx47("span", { className: "flex-1 text-xs font-medium leading-xs text-datepicker-suggestion-heading uppercase truncate", children: "Suggestions" }) }) }),
6514
- /* @__PURE__ */ jsx47("div", { className: "flex flex-1 flex-col p-base min-w-[222px]", children: suggestions.map((suggestion, i) => /* @__PURE__ */ jsxs42(
6722
+ /* @__PURE__ */ jsx48("div", { className: "pt-lg px-base", children: /* @__PURE__ */ jsx48("div", { className: "flex items-center p-base rounded-base", children: /* @__PURE__ */ jsx48("span", { className: "flex-1 text-xs font-medium leading-xs text-datepicker-suggestion-heading uppercase truncate", children: "Suggestions" }) }) }),
6723
+ /* @__PURE__ */ jsx48("div", { className: "flex flex-1 flex-col p-base min-w-[222px]", children: suggestions.map((suggestion, i) => /* @__PURE__ */ jsxs43(
6515
6724
  "button",
6516
6725
  {
6517
6726
  type: "button",
6518
6727
  onClick: () => handleClick(suggestion),
6519
6728
  className: "flex items-center gap-sm p-base rounded-base hover:bg-datepicker-suggestion-hover transition-colors cursor-pointer text-left",
6520
6729
  children: [
6521
- /* @__PURE__ */ jsx47("span", { className: "text-sm font-regular leading-sm text-datepicker-suggestion-text truncate shrink-0", children: suggestion.label }),
6522
- /* @__PURE__ */ jsx47("span", { className: "text-xs font-regular leading-xs text-datepicker-suggestion-date truncate", children: formatSuggestionDate(suggestion) })
6730
+ /* @__PURE__ */ jsx48("span", { className: "text-sm font-regular leading-sm text-datepicker-suggestion-text truncate shrink-0", children: suggestion.label }),
6731
+ /* @__PURE__ */ jsx48("span", { className: "text-xs font-regular leading-xs text-datepicker-suggestion-date truncate", children: formatSuggestionDate(suggestion) })
6523
6732
  ]
6524
6733
  },
6525
6734
  i
@@ -6530,8 +6739,8 @@ var DatePickerSuggestions = React44.forwardRef(
6530
6739
  }
6531
6740
  );
6532
6741
  DatePickerSuggestions.displayName = "DatePickerSuggestions";
6533
- var DatePickerFooter = React44.forwardRef(
6534
- ({ className, children, ...props }, ref) => /* @__PURE__ */ jsx47(
6742
+ var DatePickerFooter = React45.forwardRef(
6743
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ jsx48(
6535
6744
  "div",
6536
6745
  {
6537
6746
  ref,
@@ -6547,8 +6756,8 @@ var DatePickerFooter = React44.forwardRef(
6547
6756
  )
6548
6757
  );
6549
6758
  DatePickerFooter.displayName = "DatePickerFooter";
6550
- var DatePickerPanel = React44.forwardRef(
6551
- ({ className, children, ...props }, ref) => /* @__PURE__ */ jsx47(
6759
+ var DatePickerPanel = React45.forwardRef(
6760
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ jsx48(
6552
6761
  "div",
6553
6762
  {
6554
6763
  ref,
@@ -6561,7 +6770,7 @@ var DatePickerPanel = React44.forwardRef(
6561
6770
  DatePickerPanel.displayName = "DatePickerPanel";
6562
6771
  var DatePickerRoot = PopoverPrimitive5.Root;
6563
6772
  var DatePickerTrigger = PopoverPrimitive5.Trigger;
6564
- var DatePickerPopover = React44.forwardRef(({ className, sideOffset = 4, align = "start", children, ...props }, ref) => /* @__PURE__ */ jsx47(PopoverPrimitive5.Portal, { children: /* @__PURE__ */ jsx47(
6773
+ var DatePickerPopover = React45.forwardRef(({ className, sideOffset = 4, align = "start", children, ...props }, ref) => /* @__PURE__ */ jsx48(PopoverPrimitive5.Portal, { children: /* @__PURE__ */ jsx48(
6565
6774
  PopoverPrimitive5.Content,
6566
6775
  {
6567
6776
  ref,
@@ -6637,7 +6846,7 @@ function getDefaultSuggestions(referenceDate) {
6637
6846
  }
6638
6847
 
6639
6848
  // src/components/ui/filter/value-inputs/date-value-input.tsx
6640
- import { jsx as jsx48, jsxs as jsxs43 } from "react/jsx-runtime";
6849
+ import { jsx as jsx49, jsxs as jsxs44 } from "react/jsx-runtime";
6641
6850
  var RELATIVE_DATE_PRESETS = [
6642
6851
  { group: "Past", options: ["Today", "Yesterday", "Last 7 days", "Last 14 days", "Last 30 days", "Last 90 days"] },
6643
6852
  { group: "Current", options: ["This week", "This month", "This quarter", "This year"] },
@@ -6651,7 +6860,7 @@ var DateCalendarValueInput = ({
6651
6860
  className
6652
6861
  }) => {
6653
6862
  const isRange = operator === "is between";
6654
- const pickerValue = React45.useMemo(() => {
6863
+ const pickerValue = React46.useMemo(() => {
6655
6864
  if (isRange) {
6656
6865
  if (Array.isArray(value) && value.length === 2) {
6657
6866
  const [from, to] = value;
@@ -6676,22 +6885,22 @@ var DateCalendarValueInput = ({
6676
6885
  }
6677
6886
  }
6678
6887
  };
6679
- const suggestions = React45.useMemo(() => getDefaultSuggestions(), []);
6680
- return /* @__PURE__ */ jsx48("div", { className: cn("flex flex-col", className), children: /* @__PURE__ */ jsxs43(
6888
+ const suggestions = React46.useMemo(() => getDefaultSuggestions(), []);
6889
+ return /* @__PURE__ */ jsx49("div", { className: cn("flex flex-col", className), children: /* @__PURE__ */ jsxs44(
6681
6890
  DatePicker,
6682
6891
  {
6683
6892
  mode: isRange ? "range" : "single",
6684
6893
  value: pickerValue,
6685
6894
  onValueChange: handleValueChange,
6686
6895
  children: [
6687
- isRange && /* @__PURE__ */ jsx48(DatePickerSelects, {}),
6688
- isRange ? /* @__PURE__ */ jsxs43(DatePickerPanel, { children: [
6689
- /* @__PURE__ */ jsx48(DatePickerCalendar, {}),
6690
- /* @__PURE__ */ jsx48(DatePickerSuggestions, { suggestions })
6691
- ] }) : /* @__PURE__ */ jsx48(DatePickerCalendar, {}),
6692
- isRange && /* @__PURE__ */ jsxs43(DatePickerFooter, { children: [
6693
- /* @__PURE__ */ jsx48("div", {}),
6694
- /* @__PURE__ */ jsx48(Button, { appearance: "solid", intent: "brand", size: "sm", onClick: onSubmit, children: "Apply" })
6896
+ isRange && /* @__PURE__ */ jsx49(DatePickerSelects, {}),
6897
+ isRange ? /* @__PURE__ */ jsxs44(DatePickerPanel, { children: [
6898
+ /* @__PURE__ */ jsx49(DatePickerCalendar, {}),
6899
+ /* @__PURE__ */ jsx49(DatePickerSuggestions, { suggestions })
6900
+ ] }) : /* @__PURE__ */ jsx49(DatePickerCalendar, {}),
6901
+ isRange && /* @__PURE__ */ jsxs44(DatePickerFooter, { children: [
6902
+ /* @__PURE__ */ jsx49("div", {}),
6903
+ /* @__PURE__ */ jsx49(Button, { appearance: "solid", intent: "brand", size: "sm", onClick: onSubmit, children: "Apply" })
6695
6904
  ] })
6696
6905
  ]
6697
6906
  }
@@ -6703,9 +6912,9 @@ var PresetTagsValueInput = ({
6703
6912
  onChange,
6704
6913
  onSubmit,
6705
6914
  className
6706
- }) => /* @__PURE__ */ jsx48("div", { className: cn("flex flex-col gap-base p-xs max-w-[280px]", className), children: RELATIVE_DATE_PRESETS.map((group) => /* @__PURE__ */ jsxs43("div", { className: "flex flex-col gap-xs", children: [
6707
- /* @__PURE__ */ jsx48("span", { className: "text-xs font-medium leading-xs text-muted-foreground uppercase px-xs", children: group.group }),
6708
- /* @__PURE__ */ jsx48("div", { className: "flex flex-wrap gap-xs", children: group.options.map((preset) => /* @__PURE__ */ jsx48(
6915
+ }) => /* @__PURE__ */ jsx49("div", { className: cn("flex flex-col gap-base p-xs max-w-[280px]", className), children: RELATIVE_DATE_PRESETS.map((group) => /* @__PURE__ */ jsxs44("div", { className: "flex flex-col gap-xs", children: [
6916
+ /* @__PURE__ */ jsx49("span", { className: "text-xs font-medium leading-xs text-muted-foreground uppercase px-xs", children: group.group }),
6917
+ /* @__PURE__ */ jsx49("div", { className: "flex flex-wrap gap-xs", children: group.options.map((preset) => /* @__PURE__ */ jsx49(
6709
6918
  "button",
6710
6919
  {
6711
6920
  type: "button",
@@ -6726,7 +6935,7 @@ PresetTagsValueInput.displayName = "PresetTagsValueInput";
6726
6935
 
6727
6936
  // src/components/ui/filter/value-inputs/select-value-input.tsx
6728
6937
  import { Icon as Icon30 } from "@l3mpire/icons";
6729
- import { jsx as jsx49, jsxs as jsxs44 } from "react/jsx-runtime";
6938
+ import { jsx as jsx50, jsxs as jsxs45 } from "react/jsx-runtime";
6730
6939
  var intentDotClass = {
6731
6940
  primary: "bg-primary",
6732
6941
  success: "bg-success",
@@ -6734,7 +6943,7 @@ var intentDotClass = {
6734
6943
  critical: "bg-destructive",
6735
6944
  neutral: "bg-muted-foreground"
6736
6945
  };
6737
- var IntentDot = ({ intent }) => /* @__PURE__ */ jsx49(
6946
+ var IntentDot = ({ intent }) => /* @__PURE__ */ jsx50(
6738
6947
  "span",
6739
6948
  {
6740
6949
  className: cn(
@@ -6746,7 +6955,7 @@ var IntentDot = ({ intent }) => /* @__PURE__ */ jsx49(
6746
6955
  );
6747
6956
  var OptionLeading = ({ option }) => {
6748
6957
  if (option.icon) {
6749
- return /* @__PURE__ */ jsx49(
6958
+ return /* @__PURE__ */ jsx50(
6750
6959
  Icon30,
6751
6960
  {
6752
6961
  icon: option.icon,
@@ -6756,7 +6965,7 @@ var OptionLeading = ({ option }) => {
6756
6965
  );
6757
6966
  }
6758
6967
  if (option.intent) {
6759
- return /* @__PURE__ */ jsx49(IntentDot, { intent: option.intent });
6968
+ return /* @__PURE__ */ jsx50(IntentDot, { intent: option.intent });
6760
6969
  }
6761
6970
  return null;
6762
6971
  };
@@ -6765,7 +6974,7 @@ var DynamicOptionRow = ({
6765
6974
  selected,
6766
6975
  multi,
6767
6976
  onClick
6768
- }) => /* @__PURE__ */ jsxs44(
6977
+ }) => /* @__PURE__ */ jsxs45(
6769
6978
  "button",
6770
6979
  {
6771
6980
  type: "button",
@@ -6776,14 +6985,14 @@ var DynamicOptionRow = ({
6776
6985
  selected && "bg-dropdown-item-hover"
6777
6986
  ),
6778
6987
  children: [
6779
- multi && /* @__PURE__ */ jsx49(
6988
+ multi && /* @__PURE__ */ jsx50(
6780
6989
  "span",
6781
6990
  {
6782
6991
  className: cn(
6783
6992
  "mt-[2px] flex items-center justify-center size-4 rounded-xs border transition-colors shrink-0",
6784
6993
  selected ? "bg-primary border-primary" : "border-input bg-background"
6785
6994
  ),
6786
- children: selected && /* @__PURE__ */ jsx49("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", children: /* @__PURE__ */ jsx49(
6995
+ children: selected && /* @__PURE__ */ jsx50("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", children: /* @__PURE__ */ jsx50(
6787
6996
  "path",
6788
6997
  {
6789
6998
  d: "M2 5L4 7L8 3",
@@ -6795,9 +7004,9 @@ var DynamicOptionRow = ({
6795
7004
  ) })
6796
7005
  }
6797
7006
  ),
6798
- /* @__PURE__ */ jsxs44("span", { className: "flex-1 flex flex-col gap-2xs min-w-0", children: [
6799
- /* @__PURE__ */ jsx49("span", { className: "text-sm font-regular leading-sm text-foreground truncate", children: option.label }),
6800
- option.description && /* @__PURE__ */ jsx49("span", { className: "text-xs font-regular leading-xs text-muted-foreground", children: option.description })
7007
+ /* @__PURE__ */ jsxs45("span", { className: "flex-1 flex flex-col gap-2xs min-w-0", children: [
7008
+ /* @__PURE__ */ jsx50("span", { className: "text-sm font-regular leading-sm text-foreground truncate", children: option.label }),
7009
+ option.description && /* @__PURE__ */ jsx50("span", { className: "text-xs font-regular leading-xs text-muted-foreground", children: option.description })
6801
7010
  ] })
6802
7011
  ]
6803
7012
  }
@@ -6814,7 +7023,7 @@ var SingleSelectValueInput = ({
6814
7023
  onChange(v);
6815
7024
  onSubmit?.();
6816
7025
  };
6817
- return /* @__PURE__ */ jsxs44(
7026
+ return /* @__PURE__ */ jsxs45(
6818
7027
  "div",
6819
7028
  {
6820
7029
  className: cn(
@@ -6822,7 +7031,7 @@ var SingleSelectValueInput = ({
6822
7031
  className
6823
7032
  ),
6824
7033
  children: [
6825
- dynamicOptions?.map((opt) => /* @__PURE__ */ jsx49(
7034
+ dynamicOptions?.map((opt) => /* @__PURE__ */ jsx50(
6826
7035
  DynamicOptionRow,
6827
7036
  {
6828
7037
  option: opt,
@@ -6834,7 +7043,7 @@ var SingleSelectValueInput = ({
6834
7043
  )),
6835
7044
  options.map((rawOpt) => {
6836
7045
  const opt = resolveEnumOption(rawOpt);
6837
- return /* @__PURE__ */ jsxs44(
7046
+ return /* @__PURE__ */ jsxs45(
6838
7047
  "button",
6839
7048
  {
6840
7049
  type: "button",
@@ -6845,8 +7054,8 @@ var SingleSelectValueInput = ({
6845
7054
  value === opt.value && "bg-dropdown-item-hover"
6846
7055
  ),
6847
7056
  children: [
6848
- /* @__PURE__ */ jsx49(OptionLeading, { option: opt }),
6849
- /* @__PURE__ */ jsx49("span", { className: "text-sm font-regular leading-sm text-foreground truncate", children: opt.label })
7057
+ /* @__PURE__ */ jsx50(OptionLeading, { option: opt }),
7058
+ /* @__PURE__ */ jsx50("span", { className: "text-sm font-regular leading-sm text-foreground truncate", children: opt.label })
6850
7059
  ]
6851
7060
  },
6852
7061
  opt.value
@@ -6870,9 +7079,9 @@ var MultiSelectValueInput = ({
6870
7079
  const next = selected.includes(v) ? selected.filter((s) => s !== v) : [...selected, v];
6871
7080
  onChange(next);
6872
7081
  };
6873
- return /* @__PURE__ */ jsxs44("div", { className: cn("flex flex-col gap-xs p-xs", className), children: [
6874
- /* @__PURE__ */ jsxs44("div", { className: "flex flex-col max-h-[240px] overflow-y-auto", children: [
6875
- dynamicOptions?.map((opt) => /* @__PURE__ */ jsx49(
7082
+ return /* @__PURE__ */ jsxs45("div", { className: cn("flex flex-col gap-xs p-xs", className), children: [
7083
+ /* @__PURE__ */ jsxs45("div", { className: "flex flex-col max-h-[240px] overflow-y-auto", children: [
7084
+ dynamicOptions?.map((opt) => /* @__PURE__ */ jsx50(
6876
7085
  DynamicOptionRow,
6877
7086
  {
6878
7087
  option: opt,
@@ -6885,7 +7094,7 @@ var MultiSelectValueInput = ({
6885
7094
  options.map((rawOpt) => {
6886
7095
  const opt = resolveEnumOption(rawOpt);
6887
7096
  const isSelected = selected.includes(opt.value);
6888
- return /* @__PURE__ */ jsxs44(
7097
+ return /* @__PURE__ */ jsxs45(
6889
7098
  "button",
6890
7099
  {
6891
7100
  type: "button",
@@ -6895,14 +7104,14 @@ var MultiSelectValueInput = ({
6895
7104
  "hover:bg-dropdown-item-hover"
6896
7105
  ),
6897
7106
  children: [
6898
- /* @__PURE__ */ jsx49(
7107
+ /* @__PURE__ */ jsx50(
6899
7108
  "span",
6900
7109
  {
6901
7110
  className: cn(
6902
7111
  "flex items-center justify-center size-4 rounded-xs border transition-colors shrink-0",
6903
7112
  isSelected ? "bg-primary border-primary" : "border-input bg-background"
6904
7113
  ),
6905
- children: isSelected && /* @__PURE__ */ jsx49("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", children: /* @__PURE__ */ jsx49(
7114
+ children: isSelected && /* @__PURE__ */ jsx50("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", children: /* @__PURE__ */ jsx50(
6906
7115
  "path",
6907
7116
  {
6908
7117
  d: "M2 5L4 7L8 3",
@@ -6914,21 +7123,21 @@ var MultiSelectValueInput = ({
6914
7123
  ) })
6915
7124
  }
6916
7125
  ),
6917
- /* @__PURE__ */ jsx49(OptionLeading, { option: opt }),
6918
- /* @__PURE__ */ jsx49("span", { className: "text-sm font-regular leading-sm text-foreground truncate", children: opt.label })
7126
+ /* @__PURE__ */ jsx50(OptionLeading, { option: opt }),
7127
+ /* @__PURE__ */ jsx50("span", { className: "text-sm font-regular leading-sm text-foreground truncate", children: opt.label })
6919
7128
  ]
6920
7129
  },
6921
7130
  opt.value
6922
7131
  );
6923
7132
  })
6924
7133
  ] }),
6925
- /* @__PURE__ */ jsx49(Button, { appearance: "solid", intent: "brand", size: "sm", className: "self-end", onClick: onSubmit, children: "Apply" })
7134
+ /* @__PURE__ */ jsx50(Button, { appearance: "solid", intent: "brand", size: "sm", className: "self-end", onClick: onSubmit, children: "Apply" })
6926
7135
  ] });
6927
7136
  };
6928
7137
  MultiSelectValueInput.displayName = "MultiSelectValueInput";
6929
7138
 
6930
7139
  // src/components/ui/filter/value-inputs/relation-value-input.tsx
6931
- import { jsx as jsx50, jsxs as jsxs45 } from "react/jsx-runtime";
7140
+ import { jsx as jsx51, jsxs as jsxs46 } from "react/jsx-runtime";
6932
7141
  var RelationValueInput = ({
6933
7142
  value,
6934
7143
  onChange,
@@ -6938,8 +7147,8 @@ var RelationValueInput = ({
6938
7147
  const handleKeyDown = (e) => {
6939
7148
  if (e.key === "Enter") onSubmit?.();
6940
7149
  };
6941
- return /* @__PURE__ */ jsxs45("div", { className: cn("flex flex-col gap-base p-xs", className), children: [
6942
- /* @__PURE__ */ jsx50(
7150
+ return /* @__PURE__ */ jsxs46("div", { className: cn("flex flex-col gap-base p-xs", className), children: [
7151
+ /* @__PURE__ */ jsx51(
6943
7152
  "input",
6944
7153
  {
6945
7154
  type: "text",
@@ -6951,13 +7160,13 @@ var RelationValueInput = ({
6951
7160
  className: inputClasses
6952
7161
  }
6953
7162
  ),
6954
- /* @__PURE__ */ jsx50(Button, { appearance: "solid", intent: "brand", size: "sm", className: "self-end", onClick: onSubmit, children: "Apply" })
7163
+ /* @__PURE__ */ jsx51(Button, { appearance: "solid", intent: "brand", size: "sm", className: "self-end", onClick: onSubmit, children: "Apply" })
6955
7164
  ] });
6956
7165
  };
6957
7166
  RelationValueInput.displayName = "RelationValueInput";
6958
7167
 
6959
7168
  // src/components/ui/filter/value-input.tsx
6960
- import { jsx as jsx51 } from "react/jsx-runtime";
7169
+ import { jsx as jsx52 } from "react/jsx-runtime";
6961
7170
  var ValueInput = ({
6962
7171
  dataType,
6963
7172
  operator,
@@ -6972,13 +7181,13 @@ var ValueInput = ({
6972
7181
  if (!inputType) return null;
6973
7182
  switch (inputType) {
6974
7183
  case "TextInput":
6975
- return /* @__PURE__ */ jsx51(TextValueInput, { value, onChange, onSubmit, className });
7184
+ return /* @__PURE__ */ jsx52(TextValueInput, { value, onChange, onSubmit, className });
6976
7185
  case "NumberInput":
6977
- return /* @__PURE__ */ jsx51(NumberValueInput, { value, onChange, onSubmit, className });
7186
+ return /* @__PURE__ */ jsx52(NumberValueInput, { value, onChange, onSubmit, className });
6978
7187
  case "NumberRange":
6979
- return /* @__PURE__ */ jsx51(NumberRangeValueInput, { value, onChange, onSubmit, className });
7188
+ return /* @__PURE__ */ jsx52(NumberRangeValueInput, { value, onChange, onSubmit, className });
6980
7189
  case "SingleSelect":
6981
- return /* @__PURE__ */ jsx51(
7190
+ return /* @__PURE__ */ jsx52(
6982
7191
  SingleSelectValueInput,
6983
7192
  {
6984
7193
  value,
@@ -6990,7 +7199,7 @@ var ValueInput = ({
6990
7199
  }
6991
7200
  );
6992
7201
  case "MultiSelect":
6993
- return /* @__PURE__ */ jsx51(
7202
+ return /* @__PURE__ */ jsx52(
6994
7203
  MultiSelectValueInput,
6995
7204
  {
6996
7205
  value,
@@ -7003,7 +7212,7 @@ var ValueInput = ({
7003
7212
  );
7004
7213
  case "DatePicker":
7005
7214
  case "DateRange":
7006
- return /* @__PURE__ */ jsx51(
7215
+ return /* @__PURE__ */ jsx52(
7007
7216
  DateCalendarValueInput,
7008
7217
  {
7009
7218
  operator,
@@ -7015,7 +7224,7 @@ var ValueInput = ({
7015
7224
  );
7016
7225
  case "RelationPicker":
7017
7226
  case "MultiRelationPicker":
7018
- return /* @__PURE__ */ jsx51(RelationValueInput, { value, onChange, onSubmit, className });
7227
+ return /* @__PURE__ */ jsx52(RelationValueInput, { value, onChange, onSubmit, className });
7019
7228
  default:
7020
7229
  return null;
7021
7230
  }
@@ -7023,7 +7232,7 @@ var ValueInput = ({
7023
7232
  ValueInput.displayName = "ValueInput";
7024
7233
 
7025
7234
  // src/components/ui/filter/property-selector.tsx
7026
- import * as React46 from "react";
7235
+ import * as React47 from "react";
7027
7236
  import * as PopoverPrimitive6 from "@radix-ui/react-popover";
7028
7237
  import {
7029
7238
  Icon as Icon31,
@@ -7032,10 +7241,10 @@ import {
7032
7241
  faMagnifyingGlassOutline,
7033
7242
  faFilterOutline as faFilterOutline3
7034
7243
  } from "@l3mpire/icons";
7035
- import { jsx as jsx52, jsxs as jsxs46 } from "react/jsx-runtime";
7036
- var AdvancedFilterFooter = ({ onClick, count }) => /* @__PURE__ */ jsxs46("div", { className: "shrink-0 flex flex-col", children: [
7037
- /* @__PURE__ */ jsx52("div", { className: "h-px bg-dropdown-border mx-xs" }),
7038
- /* @__PURE__ */ jsxs46(
7244
+ import { jsx as jsx53, jsxs as jsxs47 } from "react/jsx-runtime";
7245
+ var AdvancedFilterFooter = ({ onClick, count }) => /* @__PURE__ */ jsxs47("div", { className: "shrink-0 flex flex-col", children: [
7246
+ /* @__PURE__ */ jsx53("div", { className: "h-px bg-dropdown-border mx-xs" }),
7247
+ /* @__PURE__ */ jsxs47(
7039
7248
  "button",
7040
7249
  {
7041
7250
  type: "button",
@@ -7043,7 +7252,7 @@ var AdvancedFilterFooter = ({ onClick, count }) => /* @__PURE__ */ jsxs46("div",
7043
7252
  onClick,
7044
7253
  className: "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-dropdown-item-hover",
7045
7254
  children: [
7046
- /* @__PURE__ */ jsx52(
7255
+ /* @__PURE__ */ jsx53(
7047
7256
  Icon31,
7048
7257
  {
7049
7258
  icon: faFilterOutline3,
@@ -7051,8 +7260,8 @@ var AdvancedFilterFooter = ({ onClick, count }) => /* @__PURE__ */ jsxs46("div",
7051
7260
  className: "shrink-0 text-dropdown-item-icon"
7052
7261
  }
7053
7262
  ),
7054
- /* @__PURE__ */ jsx52("span", { className: "flex-1 text-sm font-regular leading-sm text-dropdown-item-text text-left truncate", children: "Advanced filter" }),
7055
- count > 0 && /* @__PURE__ */ jsxs46("span", { className: "text-xs font-regular leading-xs text-muted-foreground", children: [
7263
+ /* @__PURE__ */ jsx53("span", { className: "flex-1 text-sm font-regular leading-sm text-dropdown-item-text text-left truncate", children: "Advanced filter" }),
7264
+ count > 0 && /* @__PURE__ */ jsxs47("span", { className: "text-xs font-regular leading-xs text-muted-foreground", children: [
7056
7265
  count,
7057
7266
  " ",
7058
7267
  count === 1 ? "rule" : "rules"
@@ -7076,26 +7285,26 @@ var PropertySelector = ({
7076
7285
  onAdvancedFilter?.();
7077
7286
  };
7078
7287
  const showAdvancedFooter = !!onAdvancedFilter;
7079
- const [activeGroup, setActiveGroup] = React46.useState(null);
7080
- const [search, setSearch] = React46.useState("");
7081
- React46.useEffect(() => {
7288
+ const [activeGroup, setActiveGroup] = React47.useState(null);
7289
+ const [search, setSearch] = React47.useState("");
7290
+ React47.useEffect(() => {
7082
7291
  if (!open) {
7083
7292
  setActiveGroup(null);
7084
7293
  setSearch("");
7085
7294
  }
7086
7295
  }, [open]);
7087
- const pinnedGroupIds = React46.useMemo(() => {
7296
+ const pinnedGroupIds = React47.useMemo(() => {
7088
7297
  const set = /* @__PURE__ */ new Set();
7089
7298
  for (const p of properties) {
7090
7299
  if (p.groupPinned) set.add(p.group);
7091
7300
  }
7092
7301
  return set;
7093
7302
  }, [properties]);
7094
- const pinnedProperties = React46.useMemo(
7303
+ const pinnedProperties = React47.useMemo(
7095
7304
  () => properties.filter((p) => pinnedGroupIds.has(p.group)),
7096
7305
  [properties, pinnedGroupIds]
7097
7306
  );
7098
- const groups = React46.useMemo(() => {
7307
+ const groups = React47.useMemo(() => {
7099
7308
  const map = /* @__PURE__ */ new Map();
7100
7309
  for (const prop of properties) {
7101
7310
  if (pinnedGroupIds.has(prop.group)) continue;
@@ -7113,14 +7322,14 @@ var PropertySelector = ({
7113
7322
  }
7114
7323
  return Array.from(map.values());
7115
7324
  }, [properties, pinnedGroupIds]);
7116
- const filteredPinnedProperties = React46.useMemo(() => {
7325
+ const filteredPinnedProperties = React47.useMemo(() => {
7117
7326
  if (!search || activeGroup) return pinnedProperties;
7118
7327
  const lower = search.toLowerCase();
7119
7328
  return pinnedProperties.filter(
7120
7329
  (p) => p.label.toLowerCase().includes(lower)
7121
7330
  );
7122
7331
  }, [pinnedProperties, search, activeGroup]);
7123
- const filteredGroups = React46.useMemo(() => {
7332
+ const filteredGroups = React47.useMemo(() => {
7124
7333
  if (!search || activeGroup) return groups;
7125
7334
  const lower = search.toLowerCase();
7126
7335
  return groups.filter(
@@ -7129,7 +7338,7 @@ var PropertySelector = ({
7129
7338
  )
7130
7339
  );
7131
7340
  }, [groups, properties, search, activeGroup]);
7132
- const filteredProperties = React46.useMemo(() => {
7341
+ const filteredProperties = React47.useMemo(() => {
7133
7342
  if (!activeGroup) return [];
7134
7343
  const groupProps = properties.filter((p) => p.group === activeGroup);
7135
7344
  if (!search) return groupProps;
@@ -7137,16 +7346,16 @@ var PropertySelector = ({
7137
7346
  return groupProps.filter((p) => p.label.toLowerCase().includes(lower));
7138
7347
  }, [properties, activeGroup, search]);
7139
7348
  const activeGroupInfo = groups.find((g) => g.group === activeGroup);
7140
- const nonPinnedSearchResults = React46.useMemo(() => {
7349
+ const nonPinnedSearchResults = React47.useMemo(() => {
7141
7350
  if (!search || activeGroup) return [];
7142
7351
  const lower = search.toLowerCase();
7143
7352
  return properties.filter(
7144
7353
  (p) => !pinnedGroupIds.has(p.group) && p.label.toLowerCase().includes(lower)
7145
7354
  );
7146
7355
  }, [properties, search, activeGroup, pinnedGroupIds]);
7147
- return /* @__PURE__ */ jsxs46(PopoverPrimitive6.Root, { open, onOpenChange, children: [
7148
- /* @__PURE__ */ jsx52(PopoverPrimitive6.Trigger, { asChild: true, children }),
7149
- /* @__PURE__ */ jsx52(PopoverPrimitive6.Portal, { children: /* @__PURE__ */ jsxs46(
7356
+ return /* @__PURE__ */ jsxs47(PopoverPrimitive6.Root, { open, onOpenChange, children: [
7357
+ /* @__PURE__ */ jsx53(PopoverPrimitive6.Trigger, { asChild: true, children }),
7358
+ /* @__PURE__ */ jsx53(PopoverPrimitive6.Portal, { children: /* @__PURE__ */ jsxs47(
7150
7359
  PopoverPrimitive6.Content,
7151
7360
  {
7152
7361
  sideOffset: 4,
@@ -7163,9 +7372,9 @@ var PropertySelector = ({
7163
7372
  children: [
7164
7373
  activeGroup === null ? (
7165
7374
  /* ── Level 1: Search + (pinned props) + Categories ──────── */
7166
- /* @__PURE__ */ jsxs46("div", { className: "flex flex-col gap-xs flex-1 min-h-0", children: [
7167
- /* @__PURE__ */ jsxs46("div", { className: "shrink-0 flex items-center gap-base px-md py-base border border-input rounded-md", children: [
7168
- /* @__PURE__ */ jsx52(
7375
+ /* @__PURE__ */ jsxs47("div", { className: "flex flex-col gap-xs flex-1 min-h-0", children: [
7376
+ /* @__PURE__ */ jsxs47("div", { className: "shrink-0 flex items-center gap-base px-md py-base border border-input rounded-md", children: [
7377
+ /* @__PURE__ */ jsx53(
7169
7378
  Icon31,
7170
7379
  {
7171
7380
  icon: faMagnifyingGlassOutline,
@@ -7173,7 +7382,7 @@ var PropertySelector = ({
7173
7382
  className: "shrink-0 text-muted-foreground"
7174
7383
  }
7175
7384
  ),
7176
- /* @__PURE__ */ jsx52(
7385
+ /* @__PURE__ */ jsx53(
7177
7386
  "input",
7178
7387
  {
7179
7388
  type: "text",
@@ -7185,8 +7394,8 @@ var PropertySelector = ({
7185
7394
  }
7186
7395
  )
7187
7396
  ] }),
7188
- /* @__PURE__ */ jsxs46("div", { className: "flex flex-col flex-1 min-h-0 overflow-y-auto", children: [
7189
- filteredPinnedProperties.map((prop) => /* @__PURE__ */ jsxs46(
7397
+ /* @__PURE__ */ jsxs47("div", { className: "flex flex-col flex-1 min-h-0 overflow-y-auto", children: [
7398
+ filteredPinnedProperties.map((prop) => /* @__PURE__ */ jsxs47(
7190
7399
  "button",
7191
7400
  {
7192
7401
  type: "button",
@@ -7196,7 +7405,7 @@ var PropertySelector = ({
7196
7405
  },
7197
7406
  className: "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-dropdown-item-hover",
7198
7407
  children: [
7199
- /* @__PURE__ */ jsx52(
7408
+ /* @__PURE__ */ jsx53(
7200
7409
  Icon31,
7201
7410
  {
7202
7411
  icon: prop.icon,
@@ -7204,14 +7413,14 @@ var PropertySelector = ({
7204
7413
  className: "shrink-0 text-dropdown-item-icon"
7205
7414
  }
7206
7415
  ),
7207
- /* @__PURE__ */ jsx52("span", { className: "flex-1 text-sm font-regular leading-sm text-dropdown-item-text text-left truncate", children: prop.label })
7416
+ /* @__PURE__ */ jsx53("span", { className: "flex-1 text-sm font-regular leading-sm text-dropdown-item-text text-left truncate", children: prop.label })
7208
7417
  ]
7209
7418
  },
7210
7419
  prop.id
7211
7420
  )),
7212
7421
  search ? (
7213
7422
  /* ── Flat matches across non-pinned groups ────────── */
7214
- nonPinnedSearchResults.map((prop) => /* @__PURE__ */ jsxs46(
7423
+ nonPinnedSearchResults.map((prop) => /* @__PURE__ */ jsxs47(
7215
7424
  "button",
7216
7425
  {
7217
7426
  type: "button",
@@ -7221,7 +7430,7 @@ var PropertySelector = ({
7221
7430
  },
7222
7431
  className: "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-dropdown-item-hover",
7223
7432
  children: [
7224
- /* @__PURE__ */ jsx52(
7433
+ /* @__PURE__ */ jsx53(
7225
7434
  Icon31,
7226
7435
  {
7227
7436
  icon: prop.icon,
@@ -7229,15 +7438,15 @@ var PropertySelector = ({
7229
7438
  className: "shrink-0 text-dropdown-item-icon"
7230
7439
  }
7231
7440
  ),
7232
- /* @__PURE__ */ jsx52("span", { className: "flex-1 text-sm font-regular leading-sm text-dropdown-item-text text-left truncate", children: prop.label }),
7233
- /* @__PURE__ */ jsx52("span", { className: "text-xs font-regular leading-xs text-muted-foreground", children: prop.groupLabel })
7441
+ /* @__PURE__ */ jsx53("span", { className: "flex-1 text-sm font-regular leading-sm text-dropdown-item-text text-left truncate", children: prop.label }),
7442
+ /* @__PURE__ */ jsx53("span", { className: "text-xs font-regular leading-xs text-muted-foreground", children: prop.groupLabel })
7234
7443
  ]
7235
7444
  },
7236
7445
  prop.id
7237
7446
  ))
7238
7447
  ) : (
7239
7448
  /* ── Category list ────────────────────────────────── */
7240
- filteredGroups.map((g) => /* @__PURE__ */ jsxs46(
7449
+ filteredGroups.map((g) => /* @__PURE__ */ jsxs47(
7241
7450
  "button",
7242
7451
  {
7243
7452
  type: "button",
@@ -7247,7 +7456,7 @@ var PropertySelector = ({
7247
7456
  },
7248
7457
  className: "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-dropdown-item-hover",
7249
7458
  children: [
7250
- /* @__PURE__ */ jsx52(
7459
+ /* @__PURE__ */ jsx53(
7251
7460
  Icon31,
7252
7461
  {
7253
7462
  icon: g.groupIcon,
@@ -7255,9 +7464,9 @@ var PropertySelector = ({
7255
7464
  className: "shrink-0 text-dropdown-item-icon"
7256
7465
  }
7257
7466
  ),
7258
- /* @__PURE__ */ jsx52("span", { className: "flex-1 text-sm font-regular leading-sm text-dropdown-item-text text-left truncate", children: g.groupLabel }),
7259
- /* @__PURE__ */ jsx52("span", { className: "text-xs font-medium leading-xs text-muted-foreground", children: g.count }),
7260
- /* @__PURE__ */ jsx52(
7467
+ /* @__PURE__ */ jsx53("span", { className: "flex-1 text-sm font-regular leading-sm text-dropdown-item-text text-left truncate", children: g.groupLabel }),
7468
+ /* @__PURE__ */ jsx53("span", { className: "text-xs font-medium leading-xs text-muted-foreground", children: g.count }),
7469
+ /* @__PURE__ */ jsx53(
7261
7470
  Icon31,
7262
7471
  {
7263
7472
  icon: faChevronRightOutline3,
@@ -7270,13 +7479,13 @@ var PropertySelector = ({
7270
7479
  g.group
7271
7480
  ))
7272
7481
  ),
7273
- filteredPinnedProperties.length === 0 && (search ? nonPinnedSearchResults.length === 0 : filteredGroups.length === 0) && /* @__PURE__ */ jsx52("span", { className: "p-base text-sm text-muted-foreground", children: "No results" })
7482
+ filteredPinnedProperties.length === 0 && (search ? nonPinnedSearchResults.length === 0 : filteredGroups.length === 0) && /* @__PURE__ */ jsx53("span", { className: "p-base text-sm text-muted-foreground", children: "No results" })
7274
7483
  ] })
7275
7484
  ] })
7276
7485
  ) : (
7277
7486
  /* ── Level 2: Properties ─────────────────────────────────── */
7278
- /* @__PURE__ */ jsxs46("div", { className: "flex flex-col gap-xs flex-1 min-h-0", children: [
7279
- /* @__PURE__ */ jsxs46(
7487
+ /* @__PURE__ */ jsxs47("div", { className: "flex flex-col gap-xs flex-1 min-h-0", children: [
7488
+ /* @__PURE__ */ jsxs47(
7280
7489
  "button",
7281
7490
  {
7282
7491
  type: "button",
@@ -7286,7 +7495,7 @@ var PropertySelector = ({
7286
7495
  },
7287
7496
  className: "shrink-0 flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-dropdown-item-hover",
7288
7497
  children: [
7289
- /* @__PURE__ */ jsx52(
7498
+ /* @__PURE__ */ jsx53(
7290
7499
  Icon31,
7291
7500
  {
7292
7501
  icon: faChevronLeftOutline3,
@@ -7294,12 +7503,12 @@ var PropertySelector = ({
7294
7503
  className: "shrink-0 text-dropdown-item-icon"
7295
7504
  }
7296
7505
  ),
7297
- /* @__PURE__ */ jsx52("span", { className: "flex-1 text-xs font-medium leading-xs text-muted-foreground text-left truncate", children: activeGroupInfo?.groupLabel })
7506
+ /* @__PURE__ */ jsx53("span", { className: "flex-1 text-xs font-medium leading-xs text-muted-foreground text-left truncate", children: activeGroupInfo?.groupLabel })
7298
7507
  ]
7299
7508
  }
7300
7509
  ),
7301
- /* @__PURE__ */ jsxs46("div", { className: "shrink-0 flex items-center gap-base px-md py-base border border-input rounded-md", children: [
7302
- /* @__PURE__ */ jsx52(
7510
+ /* @__PURE__ */ jsxs47("div", { className: "shrink-0 flex items-center gap-base px-md py-base border border-input rounded-md", children: [
7511
+ /* @__PURE__ */ jsx53(
7303
7512
  Icon31,
7304
7513
  {
7305
7514
  icon: faMagnifyingGlassOutline,
@@ -7307,7 +7516,7 @@ var PropertySelector = ({
7307
7516
  className: "shrink-0 text-muted-foreground"
7308
7517
  }
7309
7518
  ),
7310
- /* @__PURE__ */ jsx52(
7519
+ /* @__PURE__ */ jsx53(
7311
7520
  "input",
7312
7521
  {
7313
7522
  type: "text",
@@ -7319,8 +7528,8 @@ var PropertySelector = ({
7319
7528
  }
7320
7529
  )
7321
7530
  ] }),
7322
- /* @__PURE__ */ jsxs46("div", { className: "flex flex-col flex-1 min-h-0 overflow-y-auto", children: [
7323
- filteredProperties.map((prop) => /* @__PURE__ */ jsxs46(
7531
+ /* @__PURE__ */ jsxs47("div", { className: "flex flex-col flex-1 min-h-0 overflow-y-auto", children: [
7532
+ filteredProperties.map((prop) => /* @__PURE__ */ jsxs47(
7324
7533
  "button",
7325
7534
  {
7326
7535
  type: "button",
@@ -7330,7 +7539,7 @@ var PropertySelector = ({
7330
7539
  },
7331
7540
  className: "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-dropdown-item-hover",
7332
7541
  children: [
7333
- /* @__PURE__ */ jsx52(
7542
+ /* @__PURE__ */ jsx53(
7334
7543
  Icon31,
7335
7544
  {
7336
7545
  icon: prop.icon,
@@ -7338,16 +7547,16 @@ var PropertySelector = ({
7338
7547
  className: "shrink-0 text-dropdown-item-icon"
7339
7548
  }
7340
7549
  ),
7341
- /* @__PURE__ */ jsx52("span", { className: "flex-1 text-sm font-regular leading-sm text-dropdown-item-text text-left truncate", children: prop.label })
7550
+ /* @__PURE__ */ jsx53("span", { className: "flex-1 text-sm font-regular leading-sm text-dropdown-item-text text-left truncate", children: prop.label })
7342
7551
  ]
7343
7552
  },
7344
7553
  prop.id
7345
7554
  )),
7346
- filteredProperties.length === 0 && /* @__PURE__ */ jsx52("span", { className: "p-base text-sm text-muted-foreground", children: "No results" })
7555
+ filteredProperties.length === 0 && /* @__PURE__ */ jsx53("span", { className: "p-base text-sm text-muted-foreground", children: "No results" })
7347
7556
  ] })
7348
7557
  ] })
7349
7558
  ),
7350
- showAdvancedFooter && /* @__PURE__ */ jsx52(
7559
+ showAdvancedFooter && /* @__PURE__ */ jsx53(
7351
7560
  AdvancedFilterFooter,
7352
7561
  {
7353
7562
  onClick: handleAdvancedClick,
@@ -7364,7 +7573,7 @@ PropertySelector.displayName = "PropertySelector";
7364
7573
  // src/components/ui/filter/kebab-menu.tsx
7365
7574
  import * as PopoverPrimitive7 from "@radix-ui/react-popover";
7366
7575
  import { Icon as Icon32, faArrowRightOutline as faArrowRightOutline2, faTrashOutline } from "@l3mpire/icons";
7367
- import { jsx as jsx53, jsxs as jsxs47 } from "react/jsx-runtime";
7576
+ import { jsx as jsx54, jsxs as jsxs48 } from "react/jsx-runtime";
7368
7577
  var KebabMenu = ({
7369
7578
  onConvertToAdvanced,
7370
7579
  hasAdvancedFilters = false,
@@ -7372,9 +7581,9 @@ var KebabMenu = ({
7372
7581
  open,
7373
7582
  onOpenChange,
7374
7583
  children
7375
- }) => /* @__PURE__ */ jsxs47(PopoverPrimitive7.Root, { open, onOpenChange, children: [
7376
- /* @__PURE__ */ jsx53(PopoverPrimitive7.Trigger, { asChild: true, children }),
7377
- /* @__PURE__ */ jsx53(PopoverPrimitive7.Portal, { children: /* @__PURE__ */ jsxs47(
7584
+ }) => /* @__PURE__ */ jsxs48(PopoverPrimitive7.Root, { open, onOpenChange, children: [
7585
+ /* @__PURE__ */ jsx54(PopoverPrimitive7.Trigger, { asChild: true, children }),
7586
+ /* @__PURE__ */ jsx54(PopoverPrimitive7.Portal, { children: /* @__PURE__ */ jsxs48(
7378
7587
  PopoverPrimitive7.Content,
7379
7588
  {
7380
7589
  sideOffset: 4,
@@ -7388,7 +7597,7 @@ var KebabMenu = ({
7388
7597
  "min-w-[210px]"
7389
7598
  ),
7390
7599
  children: [
7391
- onConvertToAdvanced && /* @__PURE__ */ jsxs47(
7600
+ onConvertToAdvanced && /* @__PURE__ */ jsxs48(
7392
7601
  "button",
7393
7602
  {
7394
7603
  type: "button",
@@ -7398,7 +7607,7 @@ var KebabMenu = ({
7398
7607
  },
7399
7608
  className: "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-dropdown-item-hover",
7400
7609
  children: [
7401
- /* @__PURE__ */ jsx53(
7610
+ /* @__PURE__ */ jsx54(
7402
7611
  Icon32,
7403
7612
  {
7404
7613
  icon: faArrowRightOutline2,
@@ -7406,12 +7615,12 @@ var KebabMenu = ({
7406
7615
  className: "shrink-0 text-dropdown-item-icon"
7407
7616
  }
7408
7617
  ),
7409
- /* @__PURE__ */ jsx53("span", { className: "text-sm font-regular leading-sm text-dropdown-item-text", children: hasAdvancedFilters ? "Add to advanced filters" : "Convert to advanced" })
7618
+ /* @__PURE__ */ jsx54("span", { className: "text-sm font-regular leading-sm text-dropdown-item-text", children: hasAdvancedFilters ? "Add to advanced filters" : "Convert to advanced" })
7410
7619
  ]
7411
7620
  }
7412
7621
  ),
7413
- onConvertToAdvanced && onDelete && /* @__PURE__ */ jsx53("div", { className: "h-px mx-base my-xs bg-border" }),
7414
- onDelete && /* @__PURE__ */ jsxs47(
7622
+ onConvertToAdvanced && onDelete && /* @__PURE__ */ jsx54("div", { className: "h-px mx-base my-xs bg-border" }),
7623
+ onDelete && /* @__PURE__ */ jsxs48(
7415
7624
  "button",
7416
7625
  {
7417
7626
  type: "button",
@@ -7421,7 +7630,7 @@ var KebabMenu = ({
7421
7630
  },
7422
7631
  className: "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-dropdown-item-hover",
7423
7632
  children: [
7424
- /* @__PURE__ */ jsx53(
7633
+ /* @__PURE__ */ jsx54(
7425
7634
  Icon32,
7426
7635
  {
7427
7636
  icon: faTrashOutline,
@@ -7429,7 +7638,7 @@ var KebabMenu = ({
7429
7638
  className: "shrink-0 text-destructive"
7430
7639
  }
7431
7640
  ),
7432
- /* @__PURE__ */ jsx53("span", { className: "text-sm font-regular leading-sm text-destructive", children: "Delete filter" })
7641
+ /* @__PURE__ */ jsx54("span", { className: "text-sm font-regular leading-sm text-destructive", children: "Delete filter" })
7433
7642
  ]
7434
7643
  }
7435
7644
  )
@@ -7440,10 +7649,10 @@ var KebabMenu = ({
7440
7649
  KebabMenu.displayName = "KebabMenu";
7441
7650
 
7442
7651
  // src/components/ui/filter/filter-editor.tsx
7443
- import * as React47 from "react";
7652
+ import * as React48 from "react";
7444
7653
  import * as PopoverPrimitive8 from "@radix-ui/react-popover";
7445
7654
  import { Icon as Icon33 } from "@l3mpire/icons";
7446
- import { jsx as jsx54, jsxs as jsxs48 } from "react/jsx-runtime";
7655
+ import { jsx as jsx55, jsxs as jsxs49 } from "react/jsx-runtime";
7447
7656
  var FilterEditor = ({
7448
7657
  propertyDef,
7449
7658
  condition,
@@ -7454,16 +7663,16 @@ var FilterEditor = ({
7454
7663
  onOpenChange,
7455
7664
  children
7456
7665
  }) => {
7457
- const [view, setView] = React47.useState(
7666
+ const [view, setView] = React48.useState(
7458
7667
  mode === "add" ? "value" : "operator"
7459
7668
  );
7460
- const [localOperator, setLocalOperator] = React47.useState(
7669
+ const [localOperator, setLocalOperator] = React48.useState(
7461
7670
  condition.operator
7462
7671
  );
7463
- const [localValue, setLocalValue] = React47.useState(
7672
+ const [localValue, setLocalValue] = React48.useState(
7464
7673
  condition.value
7465
7674
  );
7466
- React47.useEffect(() => {
7675
+ React48.useEffect(() => {
7467
7676
  if (open) {
7468
7677
  setView(mode === "add" ? "value" : "operator");
7469
7678
  setLocalOperator(condition.operator);
@@ -7488,9 +7697,9 @@ var FilterEditor = ({
7488
7697
  onOpenChange?.(false);
7489
7698
  onClose();
7490
7699
  };
7491
- return /* @__PURE__ */ jsxs48(PopoverPrimitive8.Root, { open, onOpenChange, children: [
7492
- /* @__PURE__ */ jsx54(PopoverPrimitive8.Trigger, { asChild: true, children }),
7493
- /* @__PURE__ */ jsx54(PopoverPrimitive8.Portal, { children: /* @__PURE__ */ jsxs48(
7700
+ return /* @__PURE__ */ jsxs49(PopoverPrimitive8.Root, { open, onOpenChange, children: [
7701
+ /* @__PURE__ */ jsx55(PopoverPrimitive8.Trigger, { asChild: true, children }),
7702
+ /* @__PURE__ */ jsx55(PopoverPrimitive8.Portal, { children: /* @__PURE__ */ jsxs49(
7494
7703
  PopoverPrimitive8.Content,
7495
7704
  {
7496
7705
  sideOffset: 4,
@@ -7504,8 +7713,8 @@ var FilterEditor = ({
7504
7713
  "min-w-[240px]"
7505
7714
  ),
7506
7715
  children: [
7507
- /* @__PURE__ */ jsxs48("div", { className: "flex items-center gap-base px-base pt-base pb-xs border-b border-border", children: [
7508
- /* @__PURE__ */ jsx54(
7716
+ /* @__PURE__ */ jsxs49("div", { className: "flex items-center gap-base px-base pt-base pb-xs border-b border-border", children: [
7717
+ /* @__PURE__ */ jsx55(
7509
7718
  Icon33,
7510
7719
  {
7511
7720
  icon: propertyDef.icon,
@@ -7513,8 +7722,8 @@ var FilterEditor = ({
7513
7722
  className: "shrink-0 text-dropdown-item-icon"
7514
7723
  }
7515
7724
  ),
7516
- /* @__PURE__ */ jsx54("span", { className: "text-sm font-medium leading-sm text-foreground", children: propertyDef.label }),
7517
- localOperator && view === "value" && /* @__PURE__ */ jsxs48(
7725
+ /* @__PURE__ */ jsx55("span", { className: "text-sm font-medium leading-sm text-foreground", children: propertyDef.label }),
7726
+ localOperator && view === "value" && /* @__PURE__ */ jsxs49(
7518
7727
  "button",
7519
7728
  {
7520
7729
  type: "button",
@@ -7527,14 +7736,14 @@ var FilterEditor = ({
7527
7736
  }
7528
7737
  )
7529
7738
  ] }),
7530
- view === "operator" ? /* @__PURE__ */ jsx54("div", { className: "p-xs", children: /* @__PURE__ */ jsx54(
7739
+ view === "operator" ? /* @__PURE__ */ jsx55("div", { className: "p-xs", children: /* @__PURE__ */ jsx55(
7531
7740
  OperatorList,
7532
7741
  {
7533
7742
  dataType: propertyDef.type,
7534
7743
  activeOperator: localOperator,
7535
7744
  onSelect: handleOperatorSelect
7536
7745
  }
7537
- ) }) : localOperator && /* @__PURE__ */ jsx54(
7746
+ ) }) : localOperator && /* @__PURE__ */ jsx55(
7538
7747
  ValueInput,
7539
7748
  {
7540
7749
  dataType: propertyDef.type,
@@ -7554,10 +7763,10 @@ var FilterEditor = ({
7554
7763
  FilterEditor.displayName = "FilterEditor";
7555
7764
 
7556
7765
  // src/components/ui/filter/interactive-filter-chip.tsx
7557
- import * as React48 from "react";
7766
+ import * as React49 from "react";
7558
7767
  import * as PopoverPrimitive9 from "@radix-ui/react-popover";
7559
7768
  import { Icon as Icon34 } from "@l3mpire/icons";
7560
- import { jsx as jsx55, jsxs as jsxs49 } from "react/jsx-runtime";
7769
+ import { jsx as jsx56, jsxs as jsxs50 } from "react/jsx-runtime";
7561
7770
  var SegmentPopover = ({
7562
7771
  open,
7563
7772
  onOpenChange,
@@ -7565,9 +7774,9 @@ var SegmentPopover = ({
7565
7774
  children,
7566
7775
  align = "start",
7567
7776
  minWidth = "240px"
7568
- }) => /* @__PURE__ */ jsxs49(PopoverPrimitive9.Root, { open, onOpenChange, children: [
7569
- /* @__PURE__ */ jsx55(PopoverPrimitive9.Trigger, { asChild: true, children: trigger }),
7570
- /* @__PURE__ */ jsx55(PopoverPrimitive9.Portal, { children: /* @__PURE__ */ jsx55(
7777
+ }) => /* @__PURE__ */ jsxs50(PopoverPrimitive9.Root, { open, onOpenChange, children: [
7778
+ /* @__PURE__ */ jsx56(PopoverPrimitive9.Trigger, { asChild: true, children: trigger }),
7779
+ /* @__PURE__ */ jsx56(PopoverPrimitive9.Portal, { children: /* @__PURE__ */ jsx56(
7571
7780
  PopoverPrimitive9.Content,
7572
7781
  {
7573
7782
  sideOffset: 4,
@@ -7597,19 +7806,19 @@ var InteractiveFilterChip = ({
7597
7806
  hasAdvancedFilters = false,
7598
7807
  className
7599
7808
  }) => {
7600
- const [operatorOpen, setOperatorOpen] = React48.useState(false);
7601
- const [valueOpen, setValueOpen] = React48.useState(false);
7602
- const [propertyOpen, setPropertyOpen] = React48.useState(false);
7603
- const [kebabOpen, setKebabOpen] = React48.useState(false);
7604
- const [pendingValueOpen, setPendingValueOpen] = React48.useState(false);
7605
- const autoOpenHandled = React48.useRef(false);
7606
- React48.useEffect(() => {
7809
+ const [operatorOpen, setOperatorOpen] = React49.useState(false);
7810
+ const [valueOpen, setValueOpen] = React49.useState(false);
7811
+ const [propertyOpen, setPropertyOpen] = React49.useState(false);
7812
+ const [kebabOpen, setKebabOpen] = React49.useState(false);
7813
+ const [pendingValueOpen, setPendingValueOpen] = React49.useState(false);
7814
+ const autoOpenHandled = React49.useRef(false);
7815
+ React49.useEffect(() => {
7607
7816
  if (autoOpen && !autoOpenHandled.current && condition.operator && !isNoValueOperator(condition.operator)) {
7608
7817
  autoOpenHandled.current = true;
7609
7818
  setValueOpen(true);
7610
7819
  }
7611
7820
  }, [autoOpen, condition.operator]);
7612
- React48.useEffect(() => {
7821
+ React49.useEffect(() => {
7613
7822
  if (!operatorOpen && pendingValueOpen) {
7614
7823
  setPendingValueOpen(false);
7615
7824
  setValueOpen(true);
@@ -7643,13 +7852,13 @@ var InteractiveFilterChip = ({
7643
7852
  );
7644
7853
  const hasValue = hasOperator && displayValue != null;
7645
7854
  const badgeCount = getBadgeCount(condition.value);
7646
- const valueLeading = React48.useMemo(() => {
7855
+ const valueLeading = React49.useMemo(() => {
7647
7856
  const v = condition.value;
7648
7857
  const raw = typeof v === "string" ? v : Array.isArray(v) && typeof v[0] === "string" ? v[0] : null;
7649
7858
  if (!raw) return null;
7650
7859
  const opt = findEnumOption(raw, propertyDef.options);
7651
7860
  if (opt?.icon) {
7652
- return /* @__PURE__ */ jsx55(
7861
+ return /* @__PURE__ */ jsx56(
7653
7862
  Icon34,
7654
7863
  {
7655
7864
  icon: opt.icon,
@@ -7660,7 +7869,7 @@ var InteractiveFilterChip = ({
7660
7869
  }
7661
7870
  return null;
7662
7871
  }, [condition.value, propertyDef.options]);
7663
- return /* @__PURE__ */ jsxs49(
7872
+ return /* @__PURE__ */ jsxs50(
7664
7873
  "div",
7665
7874
  {
7666
7875
  className: cn(
@@ -7669,7 +7878,7 @@ var InteractiveFilterChip = ({
7669
7878
  className
7670
7879
  ),
7671
7880
  children: [
7672
- properties ? /* @__PURE__ */ jsx55(
7881
+ properties ? /* @__PURE__ */ jsx56(
7673
7882
  PropertySelector,
7674
7883
  {
7675
7884
  properties,
@@ -7679,7 +7888,7 @@ var InteractiveFilterChip = ({
7679
7888
  },
7680
7889
  open: propertyOpen,
7681
7890
  onOpenChange: setPropertyOpen,
7682
- children: /* @__PURE__ */ jsx55("div", { children: /* @__PURE__ */ jsx55(
7891
+ children: /* @__PURE__ */ jsx56("div", { children: /* @__PURE__ */ jsx56(
7683
7892
  FilterChipSegment,
7684
7893
  {
7685
7894
  segmentType: "property",
@@ -7690,7 +7899,7 @@ var InteractiveFilterChip = ({
7690
7899
  }
7691
7900
  ) })
7692
7901
  }
7693
- ) : /* @__PURE__ */ jsx55(
7902
+ ) : /* @__PURE__ */ jsx56(
7694
7903
  FilterChipSegment,
7695
7904
  {
7696
7905
  segmentType: "property",
@@ -7699,13 +7908,13 @@ var InteractiveFilterChip = ({
7699
7908
  label: propertyDef.label
7700
7909
  }
7701
7910
  ),
7702
- /* @__PURE__ */ jsx55(
7911
+ /* @__PURE__ */ jsx56(
7703
7912
  SegmentPopover,
7704
7913
  {
7705
7914
  open: operatorOpen,
7706
7915
  onOpenChange: setOperatorOpen,
7707
7916
  minWidth: "180px",
7708
- trigger: /* @__PURE__ */ jsx55("div", { children: /* @__PURE__ */ jsx55(
7917
+ trigger: /* @__PURE__ */ jsx56("div", { children: /* @__PURE__ */ jsx56(
7709
7918
  FilterChipSegment,
7710
7919
  {
7711
7920
  segmentType: hasOperator ? "operator" : "placeholder",
@@ -7714,7 +7923,7 @@ var InteractiveFilterChip = ({
7714
7923
  onClick: () => setOperatorOpen(true)
7715
7924
  }
7716
7925
  ) }),
7717
- children: /* @__PURE__ */ jsx55("div", { className: "p-xs", children: /* @__PURE__ */ jsx55(
7926
+ children: /* @__PURE__ */ jsx56("div", { className: "p-xs", children: /* @__PURE__ */ jsx56(
7718
7927
  OperatorList,
7719
7928
  {
7720
7929
  dataType: propertyDef.type,
@@ -7727,13 +7936,13 @@ var InteractiveFilterChip = ({
7727
7936
  hasOperator && condition.operator && !isNoValueOperator(condition.operator) && (() => {
7728
7937
  const inputType = getValueInputType(propertyDef.type, condition.operator);
7729
7938
  const dateWide = inputType === "DatePicker" || inputType === "DateRange";
7730
- return /* @__PURE__ */ jsx55(
7939
+ return /* @__PURE__ */ jsx56(
7731
7940
  SegmentPopover,
7732
7941
  {
7733
7942
  open: valueOpen,
7734
7943
  onOpenChange: setValueOpen,
7735
7944
  minWidth: dateWide ? "auto" : "240px",
7736
- trigger: /* @__PURE__ */ jsx55("div", { children: /* @__PURE__ */ jsx55(
7945
+ trigger: /* @__PURE__ */ jsx56("div", { children: /* @__PURE__ */ jsx56(
7737
7946
  FilterChipSegment,
7738
7947
  {
7739
7948
  segmentType: hasValue ? "value" : "placeholder",
@@ -7744,7 +7953,7 @@ var InteractiveFilterChip = ({
7744
7953
  onClick: () => setValueOpen(true)
7745
7954
  }
7746
7955
  ) }),
7747
- children: /* @__PURE__ */ jsx55(
7956
+ children: /* @__PURE__ */ jsx56(
7748
7957
  ValueInput,
7749
7958
  {
7750
7959
  dataType: propertyDef.type,
@@ -7759,7 +7968,7 @@ var InteractiveFilterChip = ({
7759
7968
  }
7760
7969
  );
7761
7970
  })(),
7762
- hasOperator && condition.operator && isNoValueOperator(condition.operator) && /* @__PURE__ */ jsx55(
7971
+ hasOperator && condition.operator && isNoValueOperator(condition.operator) && /* @__PURE__ */ jsx56(
7763
7972
  FilterChipSegment,
7764
7973
  {
7765
7974
  segmentType: "value",
@@ -7767,7 +7976,7 @@ var InteractiveFilterChip = ({
7767
7976
  label: condition.operator
7768
7977
  }
7769
7978
  ),
7770
- hasOperator && /* @__PURE__ */ jsx55(
7979
+ hasOperator && /* @__PURE__ */ jsx56(
7771
7980
  KebabMenu,
7772
7981
  {
7773
7982
  open: kebabOpen,
@@ -7775,7 +7984,7 @@ var InteractiveFilterChip = ({
7775
7984
  onConvertToAdvanced,
7776
7985
  hasAdvancedFilters,
7777
7986
  onDelete,
7778
- children: /* @__PURE__ */ jsx55("div", { children: /* @__PURE__ */ jsx55(
7987
+ children: /* @__PURE__ */ jsx56("div", { children: /* @__PURE__ */ jsx56(
7779
7988
  FilterChipSegment,
7780
7989
  {
7781
7990
  segmentType: "button",
@@ -7794,13 +8003,13 @@ var InteractiveFilterChip = ({
7794
8003
  InteractiveFilterChip.displayName = "InteractiveFilterChip";
7795
8004
 
7796
8005
  // src/components/ui/filter/filter-system.tsx
7797
- import * as React56 from "react";
8006
+ import * as React57 from "react";
7798
8007
  import { Icon as Icon41, faPlusOutline as faPlusOutline5 } from "@l3mpire/icons";
7799
8008
 
7800
8009
  // src/components/ui/filter/advanced-chip.tsx
7801
- import * as React49 from "react";
8010
+ import * as React50 from "react";
7802
8011
  import { Icon as Icon35, faXmarkOutline as faXmarkOutline3, faFilterOutline as faFilterOutline4 } from "@l3mpire/icons";
7803
- import { jsx as jsx56, jsxs as jsxs50 } from "react/jsx-runtime";
8012
+ import { jsx as jsx57, jsxs as jsxs51 } from "react/jsx-runtime";
7804
8013
  var btnBase = [
7805
8014
  "flex items-center justify-center",
7806
8015
  "min-h-[32px] max-h-[32px]",
@@ -7809,9 +8018,9 @@ var btnBase = [
7809
8018
  "cursor-pointer transition-colors",
7810
8019
  "hover:from-btn-outlined-neutral-bg-hover hover:to-btn-outlined-neutral-bg-gradient-to-hover"
7811
8020
  ];
7812
- var AdvancedChip = React49.forwardRef(
7813
- ({ className, count, onClear, onClick, ...props }, ref) => /* @__PURE__ */ jsxs50("div", { className: cn("inline-flex items-center", className), children: [
7814
- /* @__PURE__ */ jsxs50(
8021
+ var AdvancedChip = React50.forwardRef(
8022
+ ({ className, count, onClear, onClick, ...props }, ref) => /* @__PURE__ */ jsxs51("div", { className: cn("inline-flex items-center", className), children: [
8023
+ /* @__PURE__ */ jsxs51(
7815
8024
  "button",
7816
8025
  {
7817
8026
  ref,
@@ -7824,7 +8033,7 @@ var AdvancedChip = React49.forwardRef(
7824
8033
  ),
7825
8034
  ...props,
7826
8035
  children: [
7827
- /* @__PURE__ */ jsx56(
8036
+ /* @__PURE__ */ jsx57(
7828
8037
  Icon35,
7829
8038
  {
7830
8039
  icon: faFilterOutline4,
@@ -7832,12 +8041,12 @@ var AdvancedChip = React49.forwardRef(
7832
8041
  className: "shrink-0 text-foreground"
7833
8042
  }
7834
8043
  ),
7835
- /* @__PURE__ */ jsx56("span", { className: "text-sm font-medium leading-sm whitespace-nowrap text-foreground", children: "Advanced filters" }),
7836
- count > 0 && /* @__PURE__ */ jsx56("span", { className: "flex items-center p-2xs rounded-xs bg-filter-chip-badge-bg", children: /* @__PURE__ */ jsx56("span", { className: "text-[10px] font-medium leading-2xs text-filter-chip-badge-text", children: count }) })
8044
+ /* @__PURE__ */ jsx57("span", { className: "text-sm font-medium leading-sm whitespace-nowrap text-foreground", children: "Advanced filters" }),
8045
+ count > 0 && /* @__PURE__ */ jsx57("span", { className: "flex items-center p-2xs rounded-xs bg-filter-chip-badge-bg", children: /* @__PURE__ */ jsx57("span", { className: "text-[10px] font-medium leading-2xs text-filter-chip-badge-text", children: count }) })
7837
8046
  ]
7838
8047
  }
7839
8048
  ),
7840
- onClear && /* @__PURE__ */ jsx56(
8049
+ onClear && /* @__PURE__ */ jsx57(
7841
8050
  "button",
7842
8051
  {
7843
8052
  type: "button",
@@ -7851,7 +8060,7 @@ var AdvancedChip = React49.forwardRef(
7851
8060
  "rounded-r-md -ml-px"
7852
8061
  ),
7853
8062
  "aria-label": "Clear all advanced filters",
7854
- children: /* @__PURE__ */ jsx56(Icon35, { icon: faXmarkOutline3, size: "sm", className: "text-foreground" })
8063
+ children: /* @__PURE__ */ jsx57(Icon35, { icon: faXmarkOutline3, size: "sm", className: "text-foreground" })
7855
8064
  }
7856
8065
  )
7857
8066
  ] })
@@ -7859,18 +8068,18 @@ var AdvancedChip = React49.forwardRef(
7859
8068
  AdvancedChip.displayName = "AdvancedChip";
7860
8069
 
7861
8070
  // src/components/ui/filter/advanced-popover.tsx
7862
- import * as React53 from "react";
8071
+ import * as React54 from "react";
7863
8072
  import * as PopoverPrimitive12 from "@radix-ui/react-popover";
7864
8073
  import { Icon as Icon39, faPlusOutline as faPlusOutline3, faChevronDownOutline as faChevronDownOutline3, faXmarkOutline as faXmarkOutline4 } from "@l3mpire/icons";
7865
8074
 
7866
8075
  // src/components/ui/filter/advanced-row.tsx
7867
- import * as React51 from "react";
8076
+ import * as React52 from "react";
7868
8077
  import * as PopoverPrimitive11 from "@radix-ui/react-popover";
7869
8078
  import * as TooltipPrimitive4 from "@radix-ui/react-tooltip";
7870
8079
  import { Icon as Icon37, faChevronDownOutline as faChevronDownOutline2 } from "@l3mpire/icons";
7871
8080
 
7872
8081
  // src/components/ui/filter/filter-node-actions.tsx
7873
- import * as React50 from "react";
8082
+ import * as React51 from "react";
7874
8083
  import * as PopoverPrimitive10 from "@radix-ui/react-popover";
7875
8084
  import {
7876
8085
  Icon as Icon36,
@@ -7880,14 +8089,14 @@ import {
7880
8089
  faFolderOutline,
7881
8090
  faFilterOutline as faFilterOutline5
7882
8091
  } from "@l3mpire/icons";
7883
- import { jsx as jsx57, jsxs as jsxs51 } from "react/jsx-runtime";
8092
+ import { jsx as jsx58, jsxs as jsxs52 } from "react/jsx-runtime";
7884
8093
  var FilterNodeActions = ({
7885
8094
  nodeType,
7886
8095
  onDuplicate,
7887
8096
  onConvert,
7888
8097
  onDelete
7889
8098
  }) => {
7890
- const [open, setOpen] = React50.useState(false);
8099
+ const [open, setOpen] = React51.useState(false);
7891
8100
  const items = [
7892
8101
  {
7893
8102
  label: "Duplicate",
@@ -7906,14 +8115,14 @@ var FilterNodeActions = ({
7906
8115
  destructive: true
7907
8116
  }
7908
8117
  ];
7909
- return /* @__PURE__ */ jsxs51(PopoverPrimitive10.Root, { open, onOpenChange: setOpen, children: [
7910
- /* @__PURE__ */ jsx57(PopoverPrimitive10.Trigger, { asChild: true, children: /* @__PURE__ */ jsx57(
8118
+ return /* @__PURE__ */ jsxs52(PopoverPrimitive10.Root, { open, onOpenChange: setOpen, children: [
8119
+ /* @__PURE__ */ jsx58(PopoverPrimitive10.Trigger, { asChild: true, children: /* @__PURE__ */ jsx58(
7911
8120
  "button",
7912
8121
  {
7913
8122
  type: "button",
7914
8123
  className: "shrink-0 flex items-center justify-center p-sm rounded-md cursor-pointer transition-colors hover:bg-accent",
7915
8124
  "aria-label": "More actions",
7916
- children: /* @__PURE__ */ jsx57(
8125
+ children: /* @__PURE__ */ jsx58(
7917
8126
  Icon36,
7918
8127
  {
7919
8128
  icon: faEllipsisOutline2,
@@ -7923,7 +8132,7 @@ var FilterNodeActions = ({
7923
8132
  )
7924
8133
  }
7925
8134
  ) }),
7926
- /* @__PURE__ */ jsx57(PopoverPrimitive10.Portal, { children: /* @__PURE__ */ jsx57(
8135
+ /* @__PURE__ */ jsx58(PopoverPrimitive10.Portal, { children: /* @__PURE__ */ jsx58(
7927
8136
  PopoverPrimitive10.Content,
7928
8137
  {
7929
8138
  sideOffset: 4,
@@ -7935,7 +8144,7 @@ var FilterNodeActions = ({
7935
8144
  "data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
7936
8145
  "min-w-[180px]"
7937
8146
  ),
7938
- children: items.map((item) => /* @__PURE__ */ jsxs51(
8147
+ children: items.map((item) => /* @__PURE__ */ jsxs52(
7939
8148
  "button",
7940
8149
  {
7941
8150
  type: "button",
@@ -7949,7 +8158,7 @@ var FilterNodeActions = ({
7949
8158
  item.destructive && "text-destructive"
7950
8159
  ),
7951
8160
  children: [
7952
- /* @__PURE__ */ jsx57(
8161
+ /* @__PURE__ */ jsx58(
7953
8162
  Icon36,
7954
8163
  {
7955
8164
  icon: item.icon,
@@ -7960,7 +8169,7 @@ var FilterNodeActions = ({
7960
8169
  )
7961
8170
  }
7962
8171
  ),
7963
- /* @__PURE__ */ jsx57(
8172
+ /* @__PURE__ */ jsx58(
7964
8173
  "span",
7965
8174
  {
7966
8175
  className: cn(
@@ -7981,7 +8190,7 @@ var FilterNodeActions = ({
7981
8190
  FilterNodeActions.displayName = "FilterNodeActions";
7982
8191
 
7983
8192
  // src/components/ui/filter/advanced-row.tsx
7984
- import { Fragment as Fragment4, jsx as jsx58, jsxs as jsxs52 } from "react/jsx-runtime";
8193
+ import { Fragment as Fragment4, jsx as jsx59, jsxs as jsxs53 } from "react/jsx-runtime";
7985
8194
  var selectBtnStyle = [
7986
8195
  "flex items-center gap-base",
7987
8196
  "px-base py-sm",
@@ -8002,10 +8211,10 @@ var AdvancedRow = ({
8002
8211
  onDuplicate,
8003
8212
  onTurnIntoGroup
8004
8213
  }) => {
8005
- const [operatorOpen, setOperatorOpen] = React51.useState(false);
8006
- const [propertyOpen, setPropertyOpen] = React51.useState(false);
8007
- const [valueOpen, setValueOpen] = React51.useState(false);
8008
- const { pinnedProperties, unpinnedProperties } = React51.useMemo(() => {
8214
+ const [operatorOpen, setOperatorOpen] = React52.useState(false);
8215
+ const [propertyOpen, setPropertyOpen] = React52.useState(false);
8216
+ const [valueOpen, setValueOpen] = React52.useState(false);
8217
+ const { pinnedProperties, unpinnedProperties } = React52.useMemo(() => {
8009
8218
  const pinnedGroups = /* @__PURE__ */ new Set();
8010
8219
  for (const p of properties) {
8011
8220
  if (p.groupPinned) pinnedGroups.add(p.group);
@@ -8036,7 +8245,7 @@ var AdvancedRow = ({
8036
8245
  false,
8037
8246
  propertyDef.options
8038
8247
  );
8039
- const valueLeadingIcon = React51.useMemo(() => {
8248
+ const valueLeadingIcon = React52.useMemo(() => {
8040
8249
  const v = condition.value;
8041
8250
  const raw = typeof v === "string" ? v : Array.isArray(v) && typeof v[0] === "string" ? v[0] : null;
8042
8251
  if (!raw) return null;
@@ -8044,28 +8253,28 @@ var AdvancedRow = ({
8044
8253
  }, [condition.value, propertyDef.options]);
8045
8254
  const badgeCount = getBadgeCount(condition.value);
8046
8255
  const hasValue = displayValue != null;
8047
- return /* @__PURE__ */ jsxs52("div", { className: "flex items-center gap-base w-full min-w-0", children: [
8048
- connector === "Where" ? /* @__PURE__ */ jsx58("div", { className: "shrink-0 w-[64px] flex items-center justify-end", children: /* @__PURE__ */ jsx58("span", { className: "text-xs font-medium leading-xs text-muted-foreground", children: "Where" }) }) : /* @__PURE__ */ jsx58("div", { className: "shrink-0 w-[64px] flex items-center justify-end", children: /* @__PURE__ */ jsx58(TooltipPrimitive4.Provider, { delayDuration: 200, children: /* @__PURE__ */ jsxs52(TooltipPrimitive4.Root, { children: [
8049
- /* @__PURE__ */ jsx58(TooltipPrimitive4.Trigger, { asChild: true, children: /* @__PURE__ */ jsx58("span", { className: "text-xs font-medium leading-xs text-muted-foreground cursor-default", children: connector }) }),
8050
- /* @__PURE__ */ jsx58(TooltipPrimitive4.Portal, { children: /* @__PURE__ */ jsxs52(
8256
+ return /* @__PURE__ */ jsxs53("div", { className: "flex items-center gap-base w-full min-w-0", children: [
8257
+ connector === "Where" ? /* @__PURE__ */ jsx59("div", { className: "shrink-0 w-[64px] flex items-center justify-end", children: /* @__PURE__ */ jsx59("span", { className: "text-xs font-medium leading-xs text-muted-foreground", children: "Where" }) }) : /* @__PURE__ */ jsx59("div", { className: "shrink-0 w-[64px] flex items-center justify-end", children: /* @__PURE__ */ jsx59(TooltipPrimitive4.Provider, { delayDuration: 200, children: /* @__PURE__ */ jsxs53(TooltipPrimitive4.Root, { children: [
8258
+ /* @__PURE__ */ jsx59(TooltipPrimitive4.Trigger, { asChild: true, children: /* @__PURE__ */ jsx59("span", { className: "text-xs font-medium leading-xs text-muted-foreground cursor-default", children: connector }) }),
8259
+ /* @__PURE__ */ jsx59(TooltipPrimitive4.Portal, { children: /* @__PURE__ */ jsxs53(
8051
8260
  TooltipPrimitive4.Content,
8052
8261
  {
8053
8262
  sideOffset: 4,
8054
8263
  className: "z-50 px-base py-sm rounded-md shadow-lg bg-tooltip-default-bg text-tooltip-default-text text-sm font-regular leading-sm data-[state=delayed-open]:animate-[tooltip-in_150ms_ease-out] data-[state=closed]:animate-[tooltip-out_100ms_ease-in]",
8055
8264
  children: [
8056
8265
  '"Or" operator coming soon',
8057
- /* @__PURE__ */ jsx58(TooltipPrimitive4.Arrow, { className: "fill-tooltip-default-bg" })
8266
+ /* @__PURE__ */ jsx59(TooltipPrimitive4.Arrow, { className: "fill-tooltip-default-bg" })
8058
8267
  ]
8059
8268
  }
8060
8269
  ) })
8061
8270
  ] }) }) }),
8062
- /* @__PURE__ */ jsxs52(PopoverPrimitive11.Root, { open: propertyOpen, onOpenChange: setPropertyOpen, children: [
8063
- /* @__PURE__ */ jsx58(PopoverPrimitive11.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs52("button", { type: "button", className: cn(selectBtnStyle, "min-w-0"), children: [
8064
- /* @__PURE__ */ jsx58(Icon37, { icon: propertyDef.icon, size: "sm", className: "shrink-0 text-muted-foreground" }),
8065
- /* @__PURE__ */ jsx58("span", { className: "text-sm font-regular leading-sm text-foreground whitespace-nowrap truncate", children: propertyDef.label }),
8066
- /* @__PURE__ */ jsx58(Icon37, { icon: faChevronDownOutline2, size: "xs", className: "shrink-0 text-foreground" })
8271
+ /* @__PURE__ */ jsxs53(PopoverPrimitive11.Root, { open: propertyOpen, onOpenChange: setPropertyOpen, children: [
8272
+ /* @__PURE__ */ jsx59(PopoverPrimitive11.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs53("button", { type: "button", className: cn(selectBtnStyle, "min-w-0"), children: [
8273
+ /* @__PURE__ */ jsx59(Icon37, { icon: propertyDef.icon, size: "sm", className: "shrink-0 text-muted-foreground" }),
8274
+ /* @__PURE__ */ jsx59("span", { className: "text-sm font-regular leading-sm text-foreground whitespace-nowrap truncate", children: propertyDef.label }),
8275
+ /* @__PURE__ */ jsx59(Icon37, { icon: faChevronDownOutline2, size: "xs", className: "shrink-0 text-foreground" })
8067
8276
  ] }) }),
8068
- /* @__PURE__ */ jsx58(PopoverPrimitive11.Portal, { children: /* @__PURE__ */ jsxs52(
8277
+ /* @__PURE__ */ jsx59(PopoverPrimitive11.Portal, { children: /* @__PURE__ */ jsxs53(
8069
8278
  PopoverPrimitive11.Content,
8070
8279
  {
8071
8280
  sideOffset: 4,
@@ -8078,7 +8287,7 @@ var AdvancedRow = ({
8078
8287
  "min-w-[200px]"
8079
8288
  ),
8080
8289
  children: [
8081
- pinnedProperties.map((p) => /* @__PURE__ */ jsxs52(
8290
+ pinnedProperties.map((p) => /* @__PURE__ */ jsxs53(
8082
8291
  "button",
8083
8292
  {
8084
8293
  type: "button",
@@ -8092,13 +8301,13 @@ var AdvancedRow = ({
8092
8301
  p.id === condition.propertyId && "bg-dropdown-item-hover"
8093
8302
  ),
8094
8303
  children: [
8095
- /* @__PURE__ */ jsx58(Icon37, { icon: p.icon, size: "sm", className: "shrink-0 text-dropdown-item-icon" }),
8096
- /* @__PURE__ */ jsx58("span", { className: "text-sm font-regular leading-sm text-dropdown-item-text truncate", children: p.label })
8304
+ /* @__PURE__ */ jsx59(Icon37, { icon: p.icon, size: "sm", className: "shrink-0 text-dropdown-item-icon" }),
8305
+ /* @__PURE__ */ jsx59("span", { className: "text-sm font-regular leading-sm text-dropdown-item-text truncate", children: p.label })
8097
8306
  ]
8098
8307
  },
8099
8308
  p.id
8100
8309
  )),
8101
- unpinnedProperties.map((p) => /* @__PURE__ */ jsxs52(
8310
+ unpinnedProperties.map((p) => /* @__PURE__ */ jsxs53(
8102
8311
  "button",
8103
8312
  {
8104
8313
  type: "button",
@@ -8112,9 +8321,9 @@ var AdvancedRow = ({
8112
8321
  p.id === condition.propertyId && "bg-dropdown-item-hover"
8113
8322
  ),
8114
8323
  children: [
8115
- /* @__PURE__ */ jsx58(Icon37, { icon: p.icon, size: "sm", className: "shrink-0 text-dropdown-item-icon" }),
8116
- /* @__PURE__ */ jsx58("span", { className: "text-sm font-regular leading-sm text-dropdown-item-text truncate", children: p.label }),
8117
- /* @__PURE__ */ jsx58("span", { className: "ml-auto text-xs font-regular leading-xs text-muted-foreground", children: p.groupLabel })
8324
+ /* @__PURE__ */ jsx59(Icon37, { icon: p.icon, size: "sm", className: "shrink-0 text-dropdown-item-icon" }),
8325
+ /* @__PURE__ */ jsx59("span", { className: "text-sm font-regular leading-sm text-dropdown-item-text truncate", children: p.label }),
8326
+ /* @__PURE__ */ jsx59("span", { className: "ml-auto text-xs font-regular leading-xs text-muted-foreground", children: p.groupLabel })
8118
8327
  ]
8119
8328
  },
8120
8329
  p.id
@@ -8123,12 +8332,12 @@ var AdvancedRow = ({
8123
8332
  }
8124
8333
  ) })
8125
8334
  ] }),
8126
- /* @__PURE__ */ jsxs52(PopoverPrimitive11.Root, { open: operatorOpen, onOpenChange: setOperatorOpen, children: [
8127
- /* @__PURE__ */ jsx58(PopoverPrimitive11.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs52("button", { type: "button", className: cn(selectBtnStyle, "min-w-0"), children: [
8128
- /* @__PURE__ */ jsx58("span", { className: "text-sm font-regular leading-sm text-foreground whitespace-nowrap truncate text-left", children: condition.operator ?? "Select" }),
8129
- /* @__PURE__ */ jsx58(Icon37, { icon: faChevronDownOutline2, size: "xs", className: "shrink-0 text-foreground" })
8335
+ /* @__PURE__ */ jsxs53(PopoverPrimitive11.Root, { open: operatorOpen, onOpenChange: setOperatorOpen, children: [
8336
+ /* @__PURE__ */ jsx59(PopoverPrimitive11.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs53("button", { type: "button", className: cn(selectBtnStyle, "min-w-0"), children: [
8337
+ /* @__PURE__ */ jsx59("span", { className: "text-sm font-regular leading-sm text-foreground whitespace-nowrap truncate text-left", children: condition.operator ?? "Select" }),
8338
+ /* @__PURE__ */ jsx59(Icon37, { icon: faChevronDownOutline2, size: "xs", className: "shrink-0 text-foreground" })
8130
8339
  ] }) }),
8131
- /* @__PURE__ */ jsx58(PopoverPrimitive11.Portal, { children: /* @__PURE__ */ jsx58(
8340
+ /* @__PURE__ */ jsx59(PopoverPrimitive11.Portal, { children: /* @__PURE__ */ jsx59(
8132
8341
  PopoverPrimitive11.Content,
8133
8342
  {
8134
8343
  sideOffset: 4,
@@ -8140,7 +8349,7 @@ var AdvancedRow = ({
8140
8349
  "data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
8141
8350
  "min-w-[160px]"
8142
8351
  ),
8143
- children: /* @__PURE__ */ jsx58(
8352
+ children: /* @__PURE__ */ jsx59(
8144
8353
  OperatorList,
8145
8354
  {
8146
8355
  dataType: propertyDef.type,
@@ -8155,7 +8364,7 @@ var AdvancedRow = ({
8155
8364
  const inputType = getValueInputType(propertyDef.type, condition.operator);
8156
8365
  const isInline = inputType === "TextInput" || inputType === "NumberInput";
8157
8366
  if (isInline) {
8158
- return /* @__PURE__ */ jsx58(
8367
+ return /* @__PURE__ */ jsx59(
8159
8368
  "input",
8160
8369
  {
8161
8370
  type: inputType === "NumberInput" ? "number" : "text",
@@ -8180,15 +8389,15 @@ var AdvancedRow = ({
8180
8389
  const dyn = propertyDef.dynamicOptions?.find((o) => o.value === v);
8181
8390
  return dyn ? dyn.label : v;
8182
8391
  }) : null;
8183
- return /* @__PURE__ */ jsxs52(PopoverPrimitive11.Root, { open: valueOpen, onOpenChange: setValueOpen, children: [
8184
- /* @__PURE__ */ jsx58(PopoverPrimitive11.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs52(
8392
+ return /* @__PURE__ */ jsxs53(PopoverPrimitive11.Root, { open: valueOpen, onOpenChange: setValueOpen, children: [
8393
+ /* @__PURE__ */ jsx59(PopoverPrimitive11.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs53(
8185
8394
  "button",
8186
8395
  {
8187
8396
  type: "button",
8188
8397
  className: cn(selectBtnStyle, "flex-1 min-w-[80px] justify-between overflow-hidden"),
8189
8398
  children: [
8190
- multiTags && multiTags.length > 0 ? /* @__PURE__ */ jsx58(ValueTagRow, { tags: multiTags }) : /* @__PURE__ */ jsxs52(Fragment4, { children: [
8191
- valueLeadingIcon && /* @__PURE__ */ jsx58(
8399
+ multiTags && multiTags.length > 0 ? /* @__PURE__ */ jsx59(ValueTagRow, { tags: multiTags }) : /* @__PURE__ */ jsxs53(Fragment4, { children: [
8400
+ valueLeadingIcon && /* @__PURE__ */ jsx59(
8192
8401
  Icon37,
8193
8402
  {
8194
8403
  icon: valueLeadingIcon,
@@ -8196,7 +8405,7 @@ var AdvancedRow = ({
8196
8405
  className: "shrink-0 text-foreground"
8197
8406
  }
8198
8407
  ),
8199
- /* @__PURE__ */ jsx58(
8408
+ /* @__PURE__ */ jsx59(
8200
8409
  "span",
8201
8410
  {
8202
8411
  className: cn(
@@ -8208,7 +8417,7 @@ var AdvancedRow = ({
8208
8417
  }
8209
8418
  )
8210
8419
  ] }),
8211
- /* @__PURE__ */ jsx58(
8420
+ /* @__PURE__ */ jsx59(
8212
8421
  Icon37,
8213
8422
  {
8214
8423
  icon: faChevronDownOutline2,
@@ -8219,7 +8428,7 @@ var AdvancedRow = ({
8219
8428
  ]
8220
8429
  }
8221
8430
  ) }),
8222
- /* @__PURE__ */ jsx58(PopoverPrimitive11.Portal, { children: /* @__PURE__ */ jsx58(
8431
+ /* @__PURE__ */ jsx59(PopoverPrimitive11.Portal, { children: /* @__PURE__ */ jsx59(
8223
8432
  PopoverPrimitive11.Content,
8224
8433
  {
8225
8434
  sideOffset: 4,
@@ -8231,7 +8440,7 @@ var AdvancedRow = ({
8231
8440
  "data-[state=closed]:animate-out data-[state=closed]:fade-out-0"
8232
8441
  ),
8233
8442
  style: { minWidth: dateWide ? "auto" : "240px" },
8234
- children: /* @__PURE__ */ jsx58(
8443
+ children: /* @__PURE__ */ jsx59(
8235
8444
  ValueInput,
8236
8445
  {
8237
8446
  dataType: propertyDef.type,
@@ -8247,7 +8456,7 @@ var AdvancedRow = ({
8247
8456
  ) })
8248
8457
  ] });
8249
8458
  })(),
8250
- /* @__PURE__ */ jsx58(
8459
+ /* @__PURE__ */ jsx59(
8251
8460
  FilterNodeActions,
8252
8461
  {
8253
8462
  nodeType: "condition",
@@ -8268,10 +8477,10 @@ var tagChip = cn(
8268
8477
  "h-5"
8269
8478
  );
8270
8479
  function ValueTagRow({ tags }) {
8271
- const containerRef = React51.useRef(null);
8272
- const measureRef = React51.useRef(null);
8273
- const [visibleCount, setVisibleCount] = React51.useState(tags.length);
8274
- React51.useLayoutEffect(() => {
8480
+ const containerRef = React52.useRef(null);
8481
+ const measureRef = React52.useRef(null);
8482
+ const [visibleCount, setVisibleCount] = React52.useState(tags.length);
8483
+ React52.useLayoutEffect(() => {
8275
8484
  const container = containerRef.current;
8276
8485
  const measureRow = measureRef.current;
8277
8486
  if (!container || !measureRow) return;
@@ -8303,32 +8512,32 @@ function ValueTagRow({ tags }) {
8303
8512
  }, [tags]);
8304
8513
  const overflowCount = tags.length - visibleCount;
8305
8514
  const overflowTags = tags.slice(visibleCount);
8306
- return /* @__PURE__ */ jsxs52("div", { className: "flex flex-1 items-center gap-xs min-w-0 overflow-hidden relative", children: [
8307
- /* @__PURE__ */ jsx58(
8515
+ return /* @__PURE__ */ jsxs53("div", { className: "flex flex-1 items-center gap-xs min-w-0 overflow-hidden relative", children: [
8516
+ /* @__PURE__ */ jsx59(
8308
8517
  "div",
8309
8518
  {
8310
8519
  ref: measureRef,
8311
8520
  "aria-hidden": true,
8312
8521
  className: "absolute flex items-center gap-xs pointer-events-none",
8313
8522
  style: { visibility: "hidden", whiteSpace: "nowrap", top: 0, left: 0 },
8314
- children: tags.map((t) => /* @__PURE__ */ jsx58("span", { className: tagChip, children: t }, t))
8523
+ children: tags.map((t) => /* @__PURE__ */ jsx59("span", { className: tagChip, children: t }, t))
8315
8524
  }
8316
8525
  ),
8317
- /* @__PURE__ */ jsxs52("div", { ref: containerRef, className: "flex flex-1 items-center gap-xs overflow-hidden", children: [
8318
- tags.slice(0, visibleCount).map((t) => /* @__PURE__ */ jsx58("span", { className: tagChip, children: t }, t)),
8319
- overflowCount > 0 && /* @__PURE__ */ jsx58(TooltipPrimitive4.Provider, { delayDuration: 200, children: /* @__PURE__ */ jsxs52(TooltipPrimitive4.Root, { children: [
8320
- /* @__PURE__ */ jsx58(TooltipPrimitive4.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs52("span", { className: cn(tagChip, "cursor-default bg-filter-chip-badge-bg text-filter-chip-badge-text"), children: [
8526
+ /* @__PURE__ */ jsxs53("div", { ref: containerRef, className: "flex flex-1 items-center gap-xs overflow-hidden", children: [
8527
+ tags.slice(0, visibleCount).map((t) => /* @__PURE__ */ jsx59("span", { className: tagChip, children: t }, t)),
8528
+ overflowCount > 0 && /* @__PURE__ */ jsx59(TooltipPrimitive4.Provider, { delayDuration: 200, children: /* @__PURE__ */ jsxs53(TooltipPrimitive4.Root, { children: [
8529
+ /* @__PURE__ */ jsx59(TooltipPrimitive4.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs53("span", { className: cn(tagChip, "cursor-default bg-filter-chip-badge-bg text-filter-chip-badge-text"), children: [
8321
8530
  "+",
8322
8531
  overflowCount
8323
8532
  ] }) }),
8324
- /* @__PURE__ */ jsx58(TooltipPrimitive4.Portal, { children: /* @__PURE__ */ jsxs52(
8533
+ /* @__PURE__ */ jsx59(TooltipPrimitive4.Portal, { children: /* @__PURE__ */ jsxs53(
8325
8534
  TooltipPrimitive4.Content,
8326
8535
  {
8327
8536
  sideOffset: 4,
8328
8537
  className: "z-50 px-base py-sm rounded-md shadow-lg bg-tooltip-default-bg text-tooltip-default-text text-xs font-regular leading-xs flex flex-col gap-xs data-[state=delayed-open]:animate-[tooltip-in_150ms_ease-out] data-[state=closed]:animate-[tooltip-out_100ms_ease-in]",
8329
8538
  children: [
8330
- overflowTags.map((t) => /* @__PURE__ */ jsx58("span", { children: t }, t)),
8331
- /* @__PURE__ */ jsx58(TooltipPrimitive4.Arrow, { className: "fill-tooltip-default-bg" })
8539
+ overflowTags.map((t) => /* @__PURE__ */ jsx59("span", { children: t }, t)),
8540
+ /* @__PURE__ */ jsx59(TooltipPrimitive4.Arrow, { className: "fill-tooltip-default-bg" })
8332
8541
  ]
8333
8542
  }
8334
8543
  ) })
@@ -8338,10 +8547,10 @@ function ValueTagRow({ tags }) {
8338
8547
  }
8339
8548
 
8340
8549
  // src/components/ui/filter/advanced-group.tsx
8341
- import * as React52 from "react";
8550
+ import * as React53 from "react";
8342
8551
  import * as TooltipPrimitive5 from "@radix-ui/react-tooltip";
8343
8552
  import { Icon as Icon38, faPlusOutline as faPlusOutline2 } from "@l3mpire/icons";
8344
- import { jsx as jsx59, jsxs as jsxs53 } from "react/jsx-runtime";
8553
+ import { jsx as jsx60, jsxs as jsxs54 } from "react/jsx-runtime";
8345
8554
  var AdvancedGroup = ({
8346
8555
  connector,
8347
8556
  onConnectorToggle,
@@ -8352,25 +8561,25 @@ var AdvancedGroup = ({
8352
8561
  properties,
8353
8562
  children
8354
8563
  }) => {
8355
- const [addOpen, setAddOpen] = React52.useState(false);
8356
- return /* @__PURE__ */ jsxs53("div", { className: "flex items-start gap-base w-full min-w-0", children: [
8357
- connector === "Where" ? /* @__PURE__ */ jsx59("div", { className: "shrink-0 w-[64px] flex items-center justify-end pt-base", children: /* @__PURE__ */ jsx59("span", { className: "text-xs font-medium leading-xs text-muted-foreground", children: "Where" }) }) : /* @__PURE__ */ jsx59("div", { className: "shrink-0 w-[64px] flex items-center justify-end pt-base", children: /* @__PURE__ */ jsx59(TooltipPrimitive5.Provider, { delayDuration: 200, children: /* @__PURE__ */ jsxs53(TooltipPrimitive5.Root, { children: [
8358
- /* @__PURE__ */ jsx59(TooltipPrimitive5.Trigger, { asChild: true, children: /* @__PURE__ */ jsx59("span", { className: "text-xs font-medium leading-xs text-muted-foreground cursor-default", children: connector }) }),
8359
- /* @__PURE__ */ jsx59(TooltipPrimitive5.Portal, { children: /* @__PURE__ */ jsxs53(
8564
+ const [addOpen, setAddOpen] = React53.useState(false);
8565
+ return /* @__PURE__ */ jsxs54("div", { className: "flex items-start gap-base w-full min-w-0", children: [
8566
+ connector === "Where" ? /* @__PURE__ */ jsx60("div", { className: "shrink-0 w-[64px] flex items-center justify-end pt-base", children: /* @__PURE__ */ jsx60("span", { className: "text-xs font-medium leading-xs text-muted-foreground", children: "Where" }) }) : /* @__PURE__ */ jsx60("div", { className: "shrink-0 w-[64px] flex items-center justify-end pt-base", children: /* @__PURE__ */ jsx60(TooltipPrimitive5.Provider, { delayDuration: 200, children: /* @__PURE__ */ jsxs54(TooltipPrimitive5.Root, { children: [
8567
+ /* @__PURE__ */ jsx60(TooltipPrimitive5.Trigger, { asChild: true, children: /* @__PURE__ */ jsx60("span", { className: "text-xs font-medium leading-xs text-muted-foreground cursor-default", children: connector }) }),
8568
+ /* @__PURE__ */ jsx60(TooltipPrimitive5.Portal, { children: /* @__PURE__ */ jsxs54(
8360
8569
  TooltipPrimitive5.Content,
8361
8570
  {
8362
8571
  sideOffset: 4,
8363
8572
  className: "z-50 px-base py-sm rounded-md shadow-lg bg-tooltip-default-bg text-tooltip-default-text text-sm font-regular leading-sm data-[state=delayed-open]:animate-[tooltip-in_150ms_ease-out] data-[state=closed]:animate-[tooltip-out_100ms_ease-in]",
8364
8573
  children: [
8365
8574
  '"Or" operator coming soon',
8366
- /* @__PURE__ */ jsx59(TooltipPrimitive5.Arrow, { className: "fill-tooltip-default-bg" })
8575
+ /* @__PURE__ */ jsx60(TooltipPrimitive5.Arrow, { className: "fill-tooltip-default-bg" })
8367
8576
  ]
8368
8577
  }
8369
8578
  ) })
8370
8579
  ] }) }) }),
8371
- /* @__PURE__ */ jsxs53("div", { className: "flex-1 min-w-0 flex flex-col gap-base p-base border border-border rounded-md bg-secondary", children: [
8580
+ /* @__PURE__ */ jsxs54("div", { className: "flex-1 min-w-0 flex flex-col gap-base p-base border border-border rounded-md bg-secondary", children: [
8372
8581
  children,
8373
- onAddFilter && properties && /* @__PURE__ */ jsx59(
8582
+ onAddFilter && properties && /* @__PURE__ */ jsx60(
8374
8583
  PropertySelector,
8375
8584
  {
8376
8585
  properties,
@@ -8380,13 +8589,13 @@ var AdvancedGroup = ({
8380
8589
  },
8381
8590
  open: addOpen,
8382
8591
  onOpenChange: setAddOpen,
8383
- children: /* @__PURE__ */ jsxs53(
8592
+ children: /* @__PURE__ */ jsxs54(
8384
8593
  "button",
8385
8594
  {
8386
8595
  type: "button",
8387
8596
  className: "flex items-center gap-sm px-base py-sm text-sm font-medium leading-sm text-muted-foreground cursor-pointer transition-colors rounded-md hover:bg-accent hover:text-foreground w-fit",
8388
8597
  children: [
8389
- /* @__PURE__ */ jsx59(Icon38, { icon: faPlusOutline2, size: "sm" }),
8598
+ /* @__PURE__ */ jsx60(Icon38, { icon: faPlusOutline2, size: "sm" }),
8390
8599
  "Add filter"
8391
8600
  ]
8392
8601
  }
@@ -8394,7 +8603,7 @@ var AdvancedGroup = ({
8394
8603
  }
8395
8604
  )
8396
8605
  ] }),
8397
- /* @__PURE__ */ jsx59("div", { className: "shrink-0 pt-base", children: /* @__PURE__ */ jsx59(
8606
+ /* @__PURE__ */ jsx60("div", { className: "shrink-0 pt-base", children: /* @__PURE__ */ jsx60(
8398
8607
  FilterNodeActions,
8399
8608
  {
8400
8609
  nodeType: "group",
@@ -8408,7 +8617,7 @@ var AdvancedGroup = ({
8408
8617
  AdvancedGroup.displayName = "AdvancedGroup";
8409
8618
 
8410
8619
  // src/components/ui/filter/advanced-popover.tsx
8411
- import { jsx as jsx60, jsxs as jsxs54 } from "react/jsx-runtime";
8620
+ import { jsx as jsx61, jsxs as jsxs55 } from "react/jsx-runtime";
8412
8621
  var ghostBtn = [
8413
8622
  "flex items-center gap-sm px-base py-sm",
8414
8623
  "min-h-[32px]",
@@ -8424,9 +8633,9 @@ var AdvancedPopover = ({
8424
8633
  children,
8425
8634
  collisionBoundary
8426
8635
  }) => {
8427
- const [addSelectorOpen, setAddSelectorOpen] = React53.useState(false);
8428
- const [draftPickerOpen, setDraftPickerOpen] = React53.useState(false);
8429
- const [groupSelectorOpen, setGroupSelectorOpen] = React53.useState(false);
8636
+ const [addSelectorOpen, setAddSelectorOpen] = React54.useState(false);
8637
+ const [draftPickerOpen, setDraftPickerOpen] = React54.useState(false);
8638
+ const [groupSelectorOpen, setGroupSelectorOpen] = React54.useState(false);
8430
8639
  const getPropertyDef = (propertyId) => properties.find((p) => p.id === propertyId);
8431
8640
  const handleAddFilter = (property) => {
8432
8641
  const newFilter = createFilterWithDefaults(property.id, property.type);
@@ -8513,7 +8722,7 @@ var AdvancedPopover = ({
8513
8722
  const renderNode = (node, index) => {
8514
8723
  const connector = index === 0 ? "Where" : (node.logicOperator ?? "and") === "and" ? "And" : "Or";
8515
8724
  if (isFilterGroup(node)) {
8516
- return /* @__PURE__ */ jsx60(
8725
+ return /* @__PURE__ */ jsx61(
8517
8726
  AdvancedGroup,
8518
8727
  {
8519
8728
  connector,
@@ -8528,7 +8737,7 @@ var AdvancedPopover = ({
8528
8737
  },
8529
8738
  children: node.children.length === 0 ? (
8530
8739
  /* Draft row in empty group */
8531
- /* @__PURE__ */ jsx60(
8740
+ /* @__PURE__ */ jsx61(
8532
8741
  DraftRow,
8533
8742
  {
8534
8743
  properties,
@@ -8545,7 +8754,7 @@ var AdvancedPopover = ({
8545
8754
  }
8546
8755
  const propDef = getPropertyDef(node.propertyId);
8547
8756
  if (!propDef) return null;
8548
- return /* @__PURE__ */ jsx60(
8757
+ return /* @__PURE__ */ jsx61(
8549
8758
  AdvancedRow,
8550
8759
  {
8551
8760
  connector,
@@ -8565,9 +8774,9 @@ var AdvancedPopover = ({
8565
8774
  node.id
8566
8775
  );
8567
8776
  };
8568
- return /* @__PURE__ */ jsxs54(PopoverPrimitive12.Root, { open, onOpenChange, children: [
8569
- /* @__PURE__ */ jsx60(PopoverPrimitive12.Trigger, { asChild: true, children }),
8570
- /* @__PURE__ */ jsx60(PopoverPrimitive12.Portal, { children: /* @__PURE__ */ jsxs54(
8777
+ return /* @__PURE__ */ jsxs55(PopoverPrimitive12.Root, { open, onOpenChange, children: [
8778
+ /* @__PURE__ */ jsx61(PopoverPrimitive12.Trigger, { asChild: true, children }),
8779
+ /* @__PURE__ */ jsx61(PopoverPrimitive12.Portal, { children: /* @__PURE__ */ jsxs55(
8571
8780
  PopoverPrimitive12.Content,
8572
8781
  {
8573
8782
  sideOffset: 4,
@@ -8584,7 +8793,7 @@ var AdvancedPopover = ({
8584
8793
  collisionBoundary ? "w-[min(640px,var(--radix-popover-content-available-width))] min-w-0" : "w-[min(640px,calc(100vw-32px))] min-w-[360px]"
8585
8794
  ),
8586
8795
  children: [
8587
- /* @__PURE__ */ jsx60("div", { className: "flex flex-col gap-base p-base", children: filters.length > 0 ? filters.map((node, i) => renderNode(node, i)) : /* @__PURE__ */ jsx60(
8796
+ /* @__PURE__ */ jsx61("div", { className: "flex flex-col gap-base p-base", children: filters.length > 0 ? filters.map((node, i) => renderNode(node, i)) : /* @__PURE__ */ jsx61(
8588
8797
  DraftRow,
8589
8798
  {
8590
8799
  properties,
@@ -8593,42 +8802,42 @@ var AdvancedPopover = ({
8593
8802
  onOpenChange: setDraftPickerOpen
8594
8803
  }
8595
8804
  ) }),
8596
- /* @__PURE__ */ jsxs54("div", { className: "flex items-center justify-between p-base border-t border-border", children: [
8597
- /* @__PURE__ */ jsxs54("div", { className: "flex items-center gap-sm", children: [
8598
- /* @__PURE__ */ jsx60(
8805
+ /* @__PURE__ */ jsxs55("div", { className: "flex items-center justify-between p-base border-t border-border", children: [
8806
+ /* @__PURE__ */ jsxs55("div", { className: "flex items-center gap-sm", children: [
8807
+ /* @__PURE__ */ jsx61(
8599
8808
  PropertySelector,
8600
8809
  {
8601
8810
  properties,
8602
8811
  onSelect: handleAddFilter,
8603
8812
  open: addSelectorOpen,
8604
8813
  onOpenChange: setAddSelectorOpen,
8605
- children: /* @__PURE__ */ jsxs54("button", { type: "button", className: cn(ghostBtn, "text-foreground"), children: [
8606
- /* @__PURE__ */ jsx60(Icon39, { icon: faPlusOutline3, size: "sm", className: "text-foreground" }),
8814
+ children: /* @__PURE__ */ jsxs55("button", { type: "button", className: cn(ghostBtn, "text-foreground"), children: [
8815
+ /* @__PURE__ */ jsx61(Icon39, { icon: faPlusOutline3, size: "sm", className: "text-foreground" }),
8607
8816
  "Add filter"
8608
8817
  ] })
8609
8818
  }
8610
8819
  ),
8611
- /* @__PURE__ */ jsxs54(
8820
+ /* @__PURE__ */ jsxs55(
8612
8821
  "button",
8613
8822
  {
8614
8823
  type: "button",
8615
8824
  onClick: handleAddGroup,
8616
8825
  className: cn(ghostBtn, "text-foreground"),
8617
8826
  children: [
8618
- /* @__PURE__ */ jsx60(Icon39, { icon: faPlusOutline3, size: "sm", className: "text-foreground" }),
8827
+ /* @__PURE__ */ jsx61(Icon39, { icon: faPlusOutline3, size: "sm", className: "text-foreground" }),
8619
8828
  "Add filters group"
8620
8829
  ]
8621
8830
  }
8622
8831
  )
8623
8832
  ] }),
8624
- filters.length > 0 && /* @__PURE__ */ jsxs54(
8833
+ filters.length > 0 && /* @__PURE__ */ jsxs55(
8625
8834
  "button",
8626
8835
  {
8627
8836
  type: "button",
8628
8837
  onClick: handleClearAll,
8629
8838
  className: cn(ghostBtn, "text-destructive"),
8630
8839
  children: [
8631
- /* @__PURE__ */ jsx60(Icon39, { icon: faXmarkOutline4, size: "sm", className: "text-destructive" }),
8840
+ /* @__PURE__ */ jsx61(Icon39, { icon: faXmarkOutline4, size: "sm", className: "text-destructive" }),
8632
8841
  "Clear filters"
8633
8842
  ]
8634
8843
  }
@@ -8646,16 +8855,16 @@ var DraftRow = ({
8646
8855
  open: openProp,
8647
8856
  onOpenChange
8648
8857
  }) => {
8649
- const [internalOpen, setInternalOpen] = React53.useState(false);
8858
+ const [internalOpen, setInternalOpen] = React54.useState(false);
8650
8859
  const isControlled = openProp !== void 0;
8651
8860
  const open = isControlled ? openProp : internalOpen;
8652
8861
  const setOpen = (v) => {
8653
8862
  if (!isControlled) setInternalOpen(v);
8654
8863
  onOpenChange?.(v);
8655
8864
  };
8656
- return /* @__PURE__ */ jsxs54("div", { className: "flex items-center gap-base w-full min-w-0", children: [
8657
- /* @__PURE__ */ jsx60("div", { className: "shrink-0 w-[64px] flex items-center justify-end", children: /* @__PURE__ */ jsx60("span", { className: "text-xs font-medium leading-xs text-muted-foreground", children: "Where" }) }),
8658
- /* @__PURE__ */ jsx60(
8865
+ return /* @__PURE__ */ jsxs55("div", { className: "flex items-center gap-base w-full min-w-0", children: [
8866
+ /* @__PURE__ */ jsx61("div", { className: "shrink-0 w-[64px] flex items-center justify-end", children: /* @__PURE__ */ jsx61("span", { className: "text-xs font-medium leading-xs text-muted-foreground", children: "Where" }) }),
8867
+ /* @__PURE__ */ jsx61(
8659
8868
  PropertySelector,
8660
8869
  {
8661
8870
  properties,
@@ -8665,7 +8874,7 @@ var DraftRow = ({
8665
8874
  },
8666
8875
  open,
8667
8876
  onOpenChange: setOpen,
8668
- children: /* @__PURE__ */ jsxs54(
8877
+ children: /* @__PURE__ */ jsxs55(
8669
8878
  "button",
8670
8879
  {
8671
8880
  type: "button",
@@ -8677,8 +8886,8 @@ var DraftRow = ({
8677
8886
  "hover:from-btn-outlined-neutral-bg-hover hover:to-btn-outlined-neutral-bg-gradient-to-hover"
8678
8887
  ),
8679
8888
  children: [
8680
- /* @__PURE__ */ jsx60("span", { className: "text-sm font-regular leading-sm text-muted-foreground whitespace-nowrap", children: "Select property" }),
8681
- /* @__PURE__ */ jsx60(
8889
+ /* @__PURE__ */ jsx61("span", { className: "text-sm font-regular leading-sm text-muted-foreground whitespace-nowrap", children: "Select property" }),
8890
+ /* @__PURE__ */ jsx61(
8682
8891
  Icon39,
8683
8892
  {
8684
8893
  icon: faChevronDownOutline3,
@@ -8695,11 +8904,11 @@ var DraftRow = ({
8695
8904
  };
8696
8905
 
8697
8906
  // src/components/ui/filter/summary-chip.tsx
8698
- import * as React54 from "react";
8907
+ import * as React55 from "react";
8699
8908
  import * as PopoverPrimitive13 from "@radix-ui/react-popover";
8700
8909
  import * as TooltipPrimitive6 from "@radix-ui/react-tooltip";
8701
8910
  import { Icon as Icon40, faFilterOutline as faFilterOutline6, faPlusOutline as faPlusOutline4, faChevronDownOutline as faChevronDownOutline4, faXmarkOutline as faXmarkOutline5 } from "@l3mpire/icons";
8702
- import { jsx as jsx61, jsxs as jsxs55 } from "react/jsx-runtime";
8911
+ import { jsx as jsx62, jsxs as jsxs56 } from "react/jsx-runtime";
8703
8912
  var ghostBtn2 = [
8704
8913
  "flex items-center gap-sm px-base py-sm",
8705
8914
  "min-h-[32px]",
@@ -8719,15 +8928,15 @@ var SummaryChip = ({
8719
8928
  collisionBoundary,
8720
8929
  tooltipContent
8721
8930
  }) => {
8722
- const [uncontrolledOpen, setUncontrolledOpen] = React54.useState(false);
8931
+ const [uncontrolledOpen, setUncontrolledOpen] = React55.useState(false);
8723
8932
  const isControlled = openProp !== void 0;
8724
8933
  const open = isControlled ? openProp : uncontrolledOpen;
8725
8934
  const setOpen = (v) => {
8726
8935
  if (!isControlled) setUncontrolledOpen(v);
8727
8936
  onOpenChange?.(v);
8728
8937
  };
8729
- const [addSelectorOpen, setAddSelectorOpen] = React54.useState(false);
8730
- const [draftPickerOpen, setDraftPickerOpen] = React54.useState(false);
8938
+ const [addSelectorOpen, setAddSelectorOpen] = React55.useState(false);
8939
+ const [draftPickerOpen, setDraftPickerOpen] = React55.useState(false);
8731
8940
  const getPropertyDef = (propertyId) => properties.find((p) => p.id === propertyId);
8732
8941
  const handleAddFilter = (property) => {
8733
8942
  const newFilter = createFilterWithDefaults(property.id, property.type);
@@ -8809,7 +9018,7 @@ var SummaryChip = ({
8809
9018
  const renderNode = (node, index) => {
8810
9019
  const connector = index === 0 ? "Where" : (node.logicOperator ?? "and") === "and" ? "And" : "Or";
8811
9020
  if (isFilterGroup(node)) {
8812
- return /* @__PURE__ */ jsx61(
9021
+ return /* @__PURE__ */ jsx62(
8813
9022
  AdvancedGroup,
8814
9023
  {
8815
9024
  connector,
@@ -8822,7 +9031,7 @@ var SummaryChip = ({
8822
9031
  const newFilter = createFilterWithDefaults(prop.id, prop.type);
8823
9032
  handleGroupChildrenChange(node.id, [...node.children, newFilter]);
8824
9033
  },
8825
- children: node.children.length === 0 ? /* @__PURE__ */ jsx61(
9034
+ children: node.children.length === 0 ? /* @__PURE__ */ jsx62(
8826
9035
  DraftRow2,
8827
9036
  {
8828
9037
  properties,
@@ -8838,7 +9047,7 @@ var SummaryChip = ({
8838
9047
  }
8839
9048
  const propDef = getPropertyDef(node.propertyId);
8840
9049
  if (!propDef) return null;
8841
- return /* @__PURE__ */ jsx61(
9050
+ return /* @__PURE__ */ jsx62(
8842
9051
  AdvancedRow,
8843
9052
  {
8844
9053
  connector,
@@ -8858,7 +9067,7 @@ var SummaryChip = ({
8858
9067
  node.id
8859
9068
  );
8860
9069
  };
8861
- const trigger = children ?? /* @__PURE__ */ jsxs55(
9070
+ const trigger = children ?? /* @__PURE__ */ jsxs56(
8862
9071
  "button",
8863
9072
  {
8864
9073
  type: "button",
@@ -8872,27 +9081,27 @@ var SummaryChip = ({
8872
9081
  className
8873
9082
  ),
8874
9083
  children: [
8875
- /* @__PURE__ */ jsx61(Icon40, { icon: faFilterOutline6, size: "sm", className: "shrink-0 text-foreground" }),
8876
- /* @__PURE__ */ jsx61("span", { className: "text-sm font-medium leading-sm whitespace-nowrap text-foreground", children: "Filters" }),
8877
- count > 0 && /* @__PURE__ */ jsx61("span", { className: "flex items-center p-2xs rounded-xs bg-filter-chip-badge-bg", children: /* @__PURE__ */ jsx61("span", { className: "text-[10px] font-medium leading-2xs text-filter-chip-badge-text", children: count }) })
9084
+ /* @__PURE__ */ jsx62(Icon40, { icon: faFilterOutline6, size: "sm", className: "shrink-0 text-foreground" }),
9085
+ /* @__PURE__ */ jsx62("span", { className: "text-sm font-medium leading-sm whitespace-nowrap text-foreground", children: "Filters" }),
9086
+ count > 0 && /* @__PURE__ */ jsx62("span", { className: "flex items-center p-2xs rounded-xs bg-filter-chip-badge-bg", children: /* @__PURE__ */ jsx62("span", { className: "text-[10px] font-medium leading-2xs text-filter-chip-badge-text", children: count }) })
8878
9087
  ]
8879
9088
  }
8880
9089
  );
8881
9090
  const hasTooltip = tooltipContent && !open;
8882
- return /* @__PURE__ */ jsx61(TooltipPrimitive6.Provider, { delayDuration: 300, children: /* @__PURE__ */ jsx61(TooltipPrimitive6.Root, { open: hasTooltip ? void 0 : false, children: /* @__PURE__ */ jsxs55(PopoverPrimitive13.Root, { open, onOpenChange: setOpen, children: [
8883
- /* @__PURE__ */ jsx61(TooltipPrimitive6.Trigger, { asChild: true, children: /* @__PURE__ */ jsx61(PopoverPrimitive13.Trigger, { asChild: true, children: trigger }) }),
8884
- hasTooltip && /* @__PURE__ */ jsx61(TooltipPrimitive6.Portal, { children: /* @__PURE__ */ jsxs55(
9091
+ return /* @__PURE__ */ jsx62(TooltipPrimitive6.Provider, { delayDuration: 300, children: /* @__PURE__ */ jsx62(TooltipPrimitive6.Root, { open: hasTooltip ? void 0 : false, children: /* @__PURE__ */ jsxs56(PopoverPrimitive13.Root, { open, onOpenChange: setOpen, children: [
9092
+ /* @__PURE__ */ jsx62(TooltipPrimitive6.Trigger, { asChild: true, children: /* @__PURE__ */ jsx62(PopoverPrimitive13.Trigger, { asChild: true, children: trigger }) }),
9093
+ hasTooltip && /* @__PURE__ */ jsx62(TooltipPrimitive6.Portal, { children: /* @__PURE__ */ jsxs56(
8885
9094
  TooltipPrimitive6.Content,
8886
9095
  {
8887
9096
  sideOffset: 4,
8888
9097
  className: "z-50 px-base py-sm rounded-md shadow-lg bg-tooltip-default-bg text-tooltip-default-text text-sm font-regular leading-sm max-w-[320px] data-[state=delayed-open]:animate-[tooltip-in_150ms_ease-out] data-[state=closed]:animate-[tooltip-out_100ms_ease-in]",
8889
9098
  children: [
8890
9099
  tooltipContent,
8891
- /* @__PURE__ */ jsx61(TooltipPrimitive6.Arrow, { className: "fill-tooltip-default-bg" })
9100
+ /* @__PURE__ */ jsx62(TooltipPrimitive6.Arrow, { className: "fill-tooltip-default-bg" })
8892
9101
  ]
8893
9102
  }
8894
9103
  ) }),
8895
- /* @__PURE__ */ jsx61(PopoverPrimitive13.Portal, { children: /* @__PURE__ */ jsxs55(
9104
+ /* @__PURE__ */ jsx62(PopoverPrimitive13.Portal, { children: /* @__PURE__ */ jsxs56(
8896
9105
  PopoverPrimitive13.Content,
8897
9106
  {
8898
9107
  sideOffset: 4,
@@ -8909,7 +9118,7 @@ var SummaryChip = ({
8909
9118
  collisionBoundary ? "w-[min(640px,var(--radix-popover-content-available-width))]" : "w-[min(640px,calc(100vw-32px))]"
8910
9119
  ),
8911
9120
  children: [
8912
- /* @__PURE__ */ jsx61("div", { className: "flex flex-col gap-base p-base", children: filters.length > 0 ? filters.map((node, i) => renderNode(node, i)) : /* @__PURE__ */ jsx61(
9121
+ /* @__PURE__ */ jsx62("div", { className: "flex flex-col gap-base p-base", children: filters.length > 0 ? filters.map((node, i) => renderNode(node, i)) : /* @__PURE__ */ jsx62(
8913
9122
  DraftRow2,
8914
9123
  {
8915
9124
  properties,
@@ -8918,27 +9127,27 @@ var SummaryChip = ({
8918
9127
  onOpenChange: setDraftPickerOpen
8919
9128
  }
8920
9129
  ) }),
8921
- /* @__PURE__ */ jsxs55("div", { className: "flex items-center justify-between p-base border-t border-border", children: [
8922
- /* @__PURE__ */ jsxs55("div", { className: "flex items-center gap-sm", children: [
8923
- /* @__PURE__ */ jsx61(
9130
+ /* @__PURE__ */ jsxs56("div", { className: "flex items-center justify-between p-base border-t border-border", children: [
9131
+ /* @__PURE__ */ jsxs56("div", { className: "flex items-center gap-sm", children: [
9132
+ /* @__PURE__ */ jsx62(
8924
9133
  PropertySelector,
8925
9134
  {
8926
9135
  properties,
8927
9136
  onSelect: handleAddFilter,
8928
9137
  open: addSelectorOpen,
8929
9138
  onOpenChange: setAddSelectorOpen,
8930
- children: /* @__PURE__ */ jsxs55("button", { type: "button", className: cn(ghostBtn2, "text-foreground"), children: [
8931
- /* @__PURE__ */ jsx61(Icon40, { icon: faPlusOutline4, size: "sm", className: "text-foreground" }),
9139
+ children: /* @__PURE__ */ jsxs56("button", { type: "button", className: cn(ghostBtn2, "text-foreground"), children: [
9140
+ /* @__PURE__ */ jsx62(Icon40, { icon: faPlusOutline4, size: "sm", className: "text-foreground" }),
8932
9141
  "Add filter"
8933
9142
  ] })
8934
9143
  }
8935
9144
  ),
8936
- /* @__PURE__ */ jsxs55("button", { type: "button", onClick: handleAddGroup, className: cn(ghostBtn2, "text-foreground"), children: [
8937
- /* @__PURE__ */ jsx61(Icon40, { icon: faPlusOutline4, size: "sm", className: "text-foreground" }),
9145
+ /* @__PURE__ */ jsxs56("button", { type: "button", onClick: handleAddGroup, className: cn(ghostBtn2, "text-foreground"), children: [
9146
+ /* @__PURE__ */ jsx62(Icon40, { icon: faPlusOutline4, size: "sm", className: "text-foreground" }),
8938
9147
  "Add filters group"
8939
9148
  ] })
8940
9149
  ] }),
8941
- filters.length > 0 && /* @__PURE__ */ jsxs55(
9150
+ filters.length > 0 && /* @__PURE__ */ jsxs56(
8942
9151
  "button",
8943
9152
  {
8944
9153
  type: "button",
@@ -8948,7 +9157,7 @@ var SummaryChip = ({
8948
9157
  },
8949
9158
  className: cn(ghostBtn2, "text-destructive"),
8950
9159
  children: [
8951
- /* @__PURE__ */ jsx61(Icon40, { icon: faXmarkOutline5, size: "sm", className: "text-destructive" }),
9160
+ /* @__PURE__ */ jsx62(Icon40, { icon: faXmarkOutline5, size: "sm", className: "text-destructive" }),
8952
9161
  "Clear filters"
8953
9162
  ]
8954
9163
  }
@@ -8961,19 +9170,19 @@ var SummaryChip = ({
8961
9170
  };
8962
9171
  SummaryChip.displayName = "SummaryChip";
8963
9172
  var DraftRow2 = ({ properties, onSelect, open: openProp, onOpenChange }) => {
8964
- const [internalOpen, setInternalOpen] = React54.useState(false);
9173
+ const [internalOpen, setInternalOpen] = React55.useState(false);
8965
9174
  const isCtrl = openProp !== void 0;
8966
9175
  const open = isCtrl ? openProp : internalOpen;
8967
9176
  const setOpen = (v) => {
8968
9177
  if (!isCtrl) setInternalOpen(v);
8969
9178
  onOpenChange?.(v);
8970
9179
  };
8971
- return /* @__PURE__ */ jsxs55("div", { className: "flex items-center gap-base w-full min-w-0", children: [
8972
- /* @__PURE__ */ jsx61("div", { className: "shrink-0 w-[64px] flex items-center justify-end", children: /* @__PURE__ */ jsx61("span", { className: "text-xs font-medium leading-xs text-muted-foreground", children: "Where" }) }),
8973
- /* @__PURE__ */ jsx61(PropertySelector, { properties, onSelect: (p) => {
9180
+ return /* @__PURE__ */ jsxs56("div", { className: "flex items-center gap-base w-full min-w-0", children: [
9181
+ /* @__PURE__ */ jsx62("div", { className: "shrink-0 w-[64px] flex items-center justify-end", children: /* @__PURE__ */ jsx62("span", { className: "text-xs font-medium leading-xs text-muted-foreground", children: "Where" }) }),
9182
+ /* @__PURE__ */ jsx62(PropertySelector, { properties, onSelect: (p) => {
8974
9183
  onSelect(p);
8975
9184
  setOpen(false);
8976
- }, open, onOpenChange: setOpen, children: /* @__PURE__ */ jsxs55(
9185
+ }, open, onOpenChange: setOpen, children: /* @__PURE__ */ jsxs56(
8977
9186
  "button",
8978
9187
  {
8979
9188
  type: "button",
@@ -8984,8 +9193,8 @@ var DraftRow2 = ({ properties, onSelect, open: openProp, onOpenChange }) => {
8984
9193
  "hover:from-btn-outlined-neutral-bg-hover hover:to-btn-outlined-neutral-bg-gradient-to-hover"
8985
9194
  ),
8986
9195
  children: [
8987
- /* @__PURE__ */ jsx61("span", { className: "text-sm font-regular leading-sm text-muted-foreground whitespace-nowrap", children: "Select property" }),
8988
- /* @__PURE__ */ jsx61(Icon40, { icon: faChevronDownOutline4, size: "xs", className: "shrink-0 text-foreground" })
9196
+ /* @__PURE__ */ jsx62("span", { className: "text-sm font-regular leading-sm text-muted-foreground whitespace-nowrap", children: "Select property" }),
9197
+ /* @__PURE__ */ jsx62(Icon40, { icon: faChevronDownOutline4, size: "xs", className: "shrink-0 text-foreground" })
8989
9198
  ]
8990
9199
  }
8991
9200
  ) })
@@ -8993,11 +9202,11 @@ var DraftRow2 = ({ properties, onSelect, open: openProp, onOpenChange }) => {
8993
9202
  };
8994
9203
 
8995
9204
  // src/components/ui/filter/use-filter-bar-mode.ts
8996
- import * as React55 from "react";
9205
+ import * as React56 from "react";
8997
9206
  var DEFAULT_BREAKPOINT = 600;
8998
9207
  function useFilterBarMode(ref, override, breakpoint = DEFAULT_BREAKPOINT) {
8999
- const [mode, setMode] = React55.useState("default");
9000
- React55.useEffect(() => {
9208
+ const [mode, setMode] = React56.useState("default");
9209
+ React56.useEffect(() => {
9001
9210
  if (override) return;
9002
9211
  const el = ref.current;
9003
9212
  if (!el) return;
@@ -9012,7 +9221,7 @@ function useFilterBarMode(ref, override, breakpoint = DEFAULT_BREAKPOINT) {
9012
9221
  }
9013
9222
 
9014
9223
  // src/components/ui/filter/filter-system.tsx
9015
- import { Fragment as Fragment5, jsx as jsx62, jsxs as jsxs56 } from "react/jsx-runtime";
9224
+ import { jsx as jsx63, jsxs as jsxs57 } from "react/jsx-runtime";
9016
9225
  var FilterSystem = ({
9017
9226
  properties,
9018
9227
  filterState,
@@ -9023,16 +9232,39 @@ var FilterSystem = ({
9023
9232
  bounded = false,
9024
9233
  children,
9025
9234
  actions,
9235
+ filterActions,
9236
+ defaultFiltersRowExpanded = true,
9237
+ filtersRowExpanded,
9238
+ onFiltersRowExpandedChange,
9026
9239
  className
9027
9240
  }) => {
9028
- const containerRef = React56.useRef(null);
9241
+ const containerRef = React57.useRef(null);
9029
9242
  const mode = useFilterBarMode(containerRef, modeOverride, breakpoint);
9030
9243
  const collisionBoundary = bounded ? containerRef.current : void 0;
9031
- const [propertySelectorOpen, setPropertySelectorOpen] = React56.useState(false);
9032
- const [advancedOpen, setAdvancedOpen] = React56.useState(false);
9033
- const [summaryOpen, setSummaryOpen] = React56.useState(false);
9034
- const [pendingFilterId, setPendingFilterId] = React56.useState(null);
9244
+ const [propertySelectorOpen, setPropertySelectorOpen] = React57.useState(false);
9245
+ const [advancedOpen, setAdvancedOpen] = React57.useState(false);
9246
+ const [summaryOpen, setSummaryOpen] = React57.useState(false);
9247
+ const [pendingFilterId, setPendingFilterId] = React57.useState(null);
9248
+ const [internalExpanded, setInternalExpanded] = React57.useState(
9249
+ defaultFiltersRowExpanded
9250
+ );
9251
+ const isExpandedControlled = filtersRowExpanded !== void 0;
9252
+ const rowExpanded = isExpandedControlled ? filtersRowExpanded : internalExpanded;
9253
+ const setRowExpanded = React57.useCallback(
9254
+ (next) => {
9255
+ if (!isExpandedControlled) setInternalExpanded(next);
9256
+ onFiltersRowExpandedChange?.(next);
9257
+ },
9258
+ [isExpandedControlled, onFiltersRowExpandedChange]
9259
+ );
9035
9260
  const totalCount = filterState.basicFilters.length + countConditions(filterState.advancedFilters);
9261
+ const prevTotalCount = React57.useRef(totalCount);
9262
+ React57.useEffect(() => {
9263
+ if (prevTotalCount.current === 0 && totalCount > 0) {
9264
+ setRowExpanded(true);
9265
+ }
9266
+ prevTotalCount.current = totalCount;
9267
+ }, [totalCount, setRowExpanded]);
9036
9268
  const handleAddFilter = (property) => {
9037
9269
  const newFilter = createFilterWithDefaults(property.id, property.type);
9038
9270
  if (newFilter.operator && isNoValueOperator(newFilter.operator)) {
@@ -9118,120 +9350,171 @@ var FilterSystem = ({
9118
9350
  };
9119
9351
  const advancedFilterCount = filterState.advancedFilters.length;
9120
9352
  const showAdvancedChip = hasAdvanced || advancedOpen;
9121
- return /* @__PURE__ */ jsxs56(FilterBar, { ref: containerRef, className, children: [
9122
- /* @__PURE__ */ jsxs56(FilterBarLeft, { className: "flex-wrap flex-1 min-w-0", children: [
9123
- children,
9124
- sortFields && filterState.sort && /* @__PURE__ */ jsx62(
9125
- SortButton,
9126
- {
9127
- fields: sortFields,
9128
- activeField: filterState.sort.field,
9129
- direction: filterState.sort.direction,
9130
- onChange: handleSortChange,
9131
- iconOnly: isMinimal
9132
- }
9133
- ),
9134
- isMinimal ? /* @__PURE__ */ jsx62(Fragment5, { children: /* @__PURE__ */ jsx62(
9135
- SummaryChip,
9136
- {
9137
- count: totalCount,
9138
- filters: [...filterState.basicFilters, ...filterState.advancedFilters],
9139
- properties,
9140
- onFiltersChange: (nodes) => {
9141
- onFilterStateChange({
9142
- ...filterState,
9143
- basicFilters: [],
9144
- advancedFilters: nodes
9145
- });
9146
- },
9147
- onClearAll: handleClearAll,
9148
- open: summaryOpen,
9149
- onOpenChange: setSummaryOpen,
9150
- collisionBoundary,
9151
- tooltipContent: totalCount > 0 ? buildFilterTooltip([...filterState.basicFilters, ...filterState.advancedFilters], properties) : void 0,
9152
- children: /* @__PURE__ */ jsx62(
9153
- FilterBarButton,
9154
- {
9155
- iconOnly: isIconOnly,
9156
- count: totalCount > 0 ? totalCount : void 0
9157
- }
9158
- )
9159
- }
9160
- ) }) : (
9161
- /* ── DEFAULT MODE ────────────────────────────────────── */
9162
- /* @__PURE__ */ jsxs56(Fragment5, { children: [
9163
- showAdvancedChip && /* @__PURE__ */ jsx62(
9164
- AdvancedPopover,
9165
- {
9166
- filters: filterState.advancedFilters,
9167
- properties,
9168
- onFiltersChange: handleAdvancedFiltersChange,
9169
- open: advancedOpen,
9170
- onOpenChange: setAdvancedOpen,
9171
- collisionBoundary,
9172
- children: /* @__PURE__ */ jsx62(
9173
- AdvancedChip,
9174
- {
9175
- count: filterState.advancedFilters.length,
9176
- onClick: () => setAdvancedOpen(true),
9177
- onClear: handleClearAdvanced
9178
- }
9179
- )
9180
- }
9181
- ),
9182
- filterState.basicFilters.map((filter) => {
9183
- const propDef = getPropertyDef(filter.propertyId);
9184
- if (!propDef) return null;
9185
- return /* @__PURE__ */ jsx62(
9186
- InteractiveFilterChip,
9353
+ const showFiltersRow = !isMinimal && totalCount > 0 && rowExpanded;
9354
+ const filtersButton = totalCount === 0 ? /* @__PURE__ */ jsx63(
9355
+ PropertySelector,
9356
+ {
9357
+ properties,
9358
+ onSelect: handleAddFilter,
9359
+ open: propertySelectorOpen,
9360
+ onOpenChange: setPropertySelectorOpen,
9361
+ onAdvancedFilter: handleOpenAdvanced,
9362
+ advancedFilterCount,
9363
+ children: /* @__PURE__ */ jsx63(FilterBarButton, {})
9364
+ }
9365
+ ) : /* @__PURE__ */ jsx63(
9366
+ FilterBarButton,
9367
+ {
9368
+ count: totalCount,
9369
+ onClick: () => setRowExpanded(!rowExpanded),
9370
+ "aria-expanded": rowExpanded
9371
+ }
9372
+ );
9373
+ return /* @__PURE__ */ jsxs57(
9374
+ "div",
9375
+ {
9376
+ ref: containerRef,
9377
+ className: cn("w-full flex flex-col", className),
9378
+ children: [
9379
+ /* @__PURE__ */ jsxs57(FilterBar, { children: [
9380
+ /* @__PURE__ */ jsxs57(FilterBarLeft, { className: "flex-wrap flex-1 min-w-0", children: [
9381
+ children,
9382
+ sortFields && filterState.sort && /* @__PURE__ */ jsx63(
9383
+ SortButton,
9384
+ {
9385
+ fields: sortFields,
9386
+ activeField: filterState.sort.field,
9387
+ direction: filterState.sort.direction,
9388
+ onChange: handleSortChange,
9389
+ iconOnly: isMinimal
9390
+ }
9391
+ ),
9392
+ isMinimal ? /* @__PURE__ */ jsx63(
9393
+ SummaryChip,
9187
9394
  {
9188
- propertyDef: propDef,
9189
- condition: filter,
9395
+ count: totalCount,
9396
+ filters: [...filterState.basicFilters, ...filterState.advancedFilters],
9190
9397
  properties,
9191
- mode: pendingFilterId === filter.id ? "add" : "edit",
9192
- autoOpen: pendingFilterId === filter.id,
9193
- onUpdate: handleUpdateFilter,
9194
- onPropertyChange: (newProp) => handlePropertyChange(filter.id, newProp),
9195
- onDelete: () => handleDeleteFilter(filter.id),
9196
- onConvertToAdvanced: () => handleConvertToAdvanced(filter.id),
9197
- hasAdvancedFilters: hasAdvanced
9198
- },
9199
- filter.id
9200
- );
9201
- }),
9202
- /* @__PURE__ */ jsx62(
9203
- PropertySelector,
9204
- {
9205
- properties,
9206
- onSelect: handleAddFilter,
9207
- open: propertySelectorOpen,
9208
- onOpenChange: setPropertySelectorOpen,
9209
- onAdvancedFilter: handleOpenAdvanced,
9210
- advancedFilterCount,
9211
- children: totalCount > 0 ? /* @__PURE__ */ jsx62(
9212
- "button",
9213
- {
9214
- type: "button",
9215
- className: "shrink-0 inline-flex items-center justify-center size-8 rounded-md border border-btn-outlined-neutral-border-default bg-gradient-to-t from-btn-outlined-neutral-bg-default from-[10%] to-btn-outlined-neutral-bg-gradient-to-default shadow-sm cursor-pointer transition-colors hover:from-btn-outlined-neutral-bg-hover hover:to-btn-outlined-neutral-bg-gradient-to-hover",
9216
- children: /* @__PURE__ */ jsx62(Icon41, { icon: faPlusOutline5, size: "sm", className: "text-foreground" })
9217
- }
9218
- ) : /* @__PURE__ */ jsx62(FilterBarButton, {})
9219
- }
9220
- )
9221
- ] })
9222
- ),
9223
- totalCount > 0 && !isIconOnly && /* @__PURE__ */ jsx62(
9224
- "button",
9225
- {
9226
- type: "button",
9227
- onClick: handleClearAll,
9228
- className: "shrink-0 flex items-center gap-sm px-base py-sm min-h-[32px] max-h-[32px] rounded-md cursor-pointer transition-colors text-btn-ghost-brand-text-default hover:bg-btn-ghost-brand-bg-hover hover:text-btn-ghost-brand-text-hover active:bg-btn-ghost-brand-bg-pressed active:text-btn-ghost-brand-text-pressed",
9229
- children: /* @__PURE__ */ jsx62("span", { className: "text-sm font-medium leading-sm", children: "Clear" })
9230
- }
9231
- )
9232
- ] }),
9233
- actions && /* @__PURE__ */ jsx62(FilterBarRight, { className: "shrink-0", children: actions })
9234
- ] });
9398
+ onFiltersChange: (nodes) => {
9399
+ onFilterStateChange({
9400
+ ...filterState,
9401
+ basicFilters: [],
9402
+ advancedFilters: nodes
9403
+ });
9404
+ },
9405
+ onClearAll: handleClearAll,
9406
+ open: summaryOpen,
9407
+ onOpenChange: setSummaryOpen,
9408
+ collisionBoundary,
9409
+ tooltipContent: totalCount > 0 ? buildFilterTooltip([...filterState.basicFilters, ...filterState.advancedFilters], properties) : void 0,
9410
+ children: /* @__PURE__ */ jsx63(
9411
+ FilterBarButton,
9412
+ {
9413
+ iconOnly: isIconOnly,
9414
+ count: totalCount > 0 ? totalCount : void 0
9415
+ }
9416
+ )
9417
+ }
9418
+ ) : (
9419
+ /* ── FULL MODE — Filters button only on Row 1 ────────── */
9420
+ filtersButton
9421
+ ),
9422
+ isMinimal && !isIconOnly && totalCount > 0 && /* @__PURE__ */ jsx63(
9423
+ "button",
9424
+ {
9425
+ type: "button",
9426
+ onClick: handleClearAll,
9427
+ className: "shrink-0 flex items-center gap-sm px-base py-sm min-h-[32px] max-h-[32px] rounded-md cursor-pointer transition-colors text-btn-ghost-brand-text-default hover:bg-btn-ghost-brand-bg-hover hover:text-btn-ghost-brand-text-hover active:bg-btn-ghost-brand-bg-pressed active:text-btn-ghost-brand-text-pressed",
9428
+ children: /* @__PURE__ */ jsx63("span", { className: "text-sm font-medium leading-sm", children: "Clear" })
9429
+ }
9430
+ )
9431
+ ] }),
9432
+ actions && /* @__PURE__ */ jsx63(FilterBarRight, { className: "shrink-0", children: actions })
9433
+ ] }),
9434
+ showFiltersRow && /* @__PURE__ */ jsxs57(
9435
+ "div",
9436
+ {
9437
+ className: "flex items-start justify-between w-full pt-sm pb-md",
9438
+ role: "toolbar",
9439
+ "aria-label": "Active filters",
9440
+ children: [
9441
+ /* @__PURE__ */ jsxs57("div", { className: "flex items-center gap-base flex-wrap flex-1 min-w-0", children: [
9442
+ showAdvancedChip && /* @__PURE__ */ jsx63(
9443
+ AdvancedPopover,
9444
+ {
9445
+ filters: filterState.advancedFilters,
9446
+ properties,
9447
+ onFiltersChange: handleAdvancedFiltersChange,
9448
+ open: advancedOpen,
9449
+ onOpenChange: setAdvancedOpen,
9450
+ collisionBoundary,
9451
+ children: /* @__PURE__ */ jsx63(
9452
+ AdvancedChip,
9453
+ {
9454
+ count: filterState.advancedFilters.length,
9455
+ onClick: () => setAdvancedOpen(true),
9456
+ onClear: handleClearAdvanced
9457
+ }
9458
+ )
9459
+ }
9460
+ ),
9461
+ filterState.basicFilters.map((filter) => {
9462
+ const propDef = getPropertyDef(filter.propertyId);
9463
+ if (!propDef) return null;
9464
+ return /* @__PURE__ */ jsx63(
9465
+ InteractiveFilterChip,
9466
+ {
9467
+ propertyDef: propDef,
9468
+ condition: filter,
9469
+ properties,
9470
+ mode: pendingFilterId === filter.id ? "add" : "edit",
9471
+ autoOpen: pendingFilterId === filter.id,
9472
+ onUpdate: handleUpdateFilter,
9473
+ onPropertyChange: (newProp) => handlePropertyChange(filter.id, newProp),
9474
+ onDelete: () => handleDeleteFilter(filter.id),
9475
+ onConvertToAdvanced: () => handleConvertToAdvanced(filter.id),
9476
+ hasAdvancedFilters: hasAdvanced
9477
+ },
9478
+ filter.id
9479
+ );
9480
+ }),
9481
+ /* @__PURE__ */ jsx63(
9482
+ PropertySelector,
9483
+ {
9484
+ properties,
9485
+ onSelect: handleAddFilter,
9486
+ open: propertySelectorOpen,
9487
+ onOpenChange: setPropertySelectorOpen,
9488
+ onAdvancedFilter: handleOpenAdvanced,
9489
+ advancedFilterCount,
9490
+ children: /* @__PURE__ */ jsx63(
9491
+ "button",
9492
+ {
9493
+ type: "button",
9494
+ className: "shrink-0 inline-flex items-center justify-center size-8 rounded-md border border-btn-outlined-neutral-border-default bg-gradient-to-t from-btn-outlined-neutral-bg-default from-[10%] to-btn-outlined-neutral-bg-gradient-to-default shadow-sm cursor-pointer transition-colors hover:from-btn-outlined-neutral-bg-hover hover:to-btn-outlined-neutral-bg-gradient-to-hover",
9495
+ "aria-label": "Add filter",
9496
+ children: /* @__PURE__ */ jsx63(Icon41, { icon: faPlusOutline5, size: "sm", className: "text-foreground" })
9497
+ }
9498
+ )
9499
+ }
9500
+ ),
9501
+ /* @__PURE__ */ jsx63(
9502
+ "button",
9503
+ {
9504
+ type: "button",
9505
+ onClick: handleClearAll,
9506
+ className: "shrink-0 flex items-center gap-sm px-base py-sm min-h-[32px] max-h-[32px] rounded-md cursor-pointer transition-colors text-btn-ghost-brand-text-default hover:bg-btn-ghost-brand-bg-hover hover:text-btn-ghost-brand-text-hover active:bg-btn-ghost-brand-bg-pressed active:text-btn-ghost-brand-text-pressed",
9507
+ children: /* @__PURE__ */ jsx63("span", { className: "text-sm font-medium leading-sm", children: "Clear" })
9508
+ }
9509
+ )
9510
+ ] }),
9511
+ filterActions && /* @__PURE__ */ jsx63("div", { className: "flex items-center shrink-0 gap-sm", children: filterActions })
9512
+ ]
9513
+ }
9514
+ )
9515
+ ]
9516
+ }
9517
+ );
9235
9518
  };
9236
9519
  FilterSystem.displayName = "FilterSystem";
9237
9520
  function buildFilterTooltip(nodes, properties) {
@@ -9243,7 +9526,7 @@ function buildFilterTooltip(nodes, properties) {
9243
9526
  if ("children" in node && node.type === "group") {
9244
9527
  if (connector) {
9245
9528
  result.push(
9246
- /* @__PURE__ */ jsx62("div", { style: { paddingLeft: depth * 8 }, children: /* @__PURE__ */ jsx62("span", { className: "opacity-50 text-xs", children: connector }) }, `${node.id}-conn`)
9529
+ /* @__PURE__ */ jsx63("div", { style: { paddingLeft: depth * 8 }, children: /* @__PURE__ */ jsx63("span", { className: "opacity-50 text-xs", children: connector }) }, `${node.id}-conn`)
9247
9530
  );
9248
9531
  }
9249
9532
  result.push(...renderNodes(node.children, depth + 1));
@@ -9253,23 +9536,23 @@ function buildFilterTooltip(nodes, properties) {
9253
9536
  if (!prop) continue;
9254
9537
  const val = formatFilterValue(f.value, prop.dynamicOptions, true);
9255
9538
  result.push(
9256
- /* @__PURE__ */ jsxs56("div", { style: { paddingLeft: depth * 8 }, children: [
9257
- connector && /* @__PURE__ */ jsxs56("span", { className: "opacity-50 text-xs", children: [
9539
+ /* @__PURE__ */ jsxs57("div", { style: { paddingLeft: depth * 8 }, children: [
9540
+ connector && /* @__PURE__ */ jsxs57("span", { className: "opacity-50 text-xs", children: [
9258
9541
  connector,
9259
9542
  " "
9260
9543
  ] }),
9261
- /* @__PURE__ */ jsx62("span", { className: "font-medium", children: prop.label }),
9544
+ /* @__PURE__ */ jsx63("span", { className: "font-medium", children: prop.label }),
9262
9545
  " ",
9263
- /* @__PURE__ */ jsx62("span", { className: "opacity-60", children: f.operator }),
9546
+ /* @__PURE__ */ jsx63("span", { className: "opacity-60", children: f.operator }),
9264
9547
  " ",
9265
- val && /* @__PURE__ */ jsx62("span", { children: val })
9548
+ val && /* @__PURE__ */ jsx63("span", { children: val })
9266
9549
  ] }, f.id)
9267
9550
  );
9268
9551
  }
9269
9552
  }
9270
9553
  return result;
9271
9554
  };
9272
- return /* @__PURE__ */ jsx62("div", { className: "flex flex-col gap-2xs", children: renderNodes(nodes, 0) });
9555
+ return /* @__PURE__ */ jsx63("div", { className: "flex flex-col gap-2xs", children: renderNodes(nodes, 0) });
9273
9556
  }
9274
9557
  export {
9275
9558
  AdvancedChip,
@@ -9288,6 +9571,7 @@ export {
9288
9571
  DEFAULT_OPERATOR_BY_TYPE,
9289
9572
  DataTable,
9290
9573
  DataTablePagination,
9574
+ DataTableSettingsModal,
9291
9575
  DateCell,
9292
9576
  DatePicker,
9293
9577
  DatePickerCalendar,