@l3mpire/ui 2.11.0 → 2.12.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.js CHANGED
@@ -328,7 +328,7 @@ var buttonVariants = (0, import_class_variance_authority2.cva)(
328
328
  },
329
329
  size: {
330
330
  sm: [
331
- "h-6 p-xs gap-xs",
331
+ "h-6 py-xs gap-xs",
332
332
  "text-xs",
333
333
  "min-w-16 rounded-base"
334
334
  ],
@@ -423,13 +423,13 @@ var buttonVariants = (0, import_class_variance_authority2.cva)(
423
423
  appearance: "ghost",
424
424
  intent: "brand",
425
425
  class: [
426
- "bg-btn-ghost-neutral-bg-default",
427
- "text-btn-ghost-neutral-text-default",
428
- "border-btn-ghost-neutral-border-default",
429
- "hover:bg-btn-ghost-neutral-bg-hover",
430
- "hover:text-btn-ghost-neutral-text-hover",
431
- "active:bg-btn-ghost-neutral-bg-pressed",
432
- "active:text-btn-ghost-neutral-text-pressed"
426
+ "bg-btn-ghost-brand-bg-default",
427
+ "text-btn-ghost-brand-text-default",
428
+ "border-btn-ghost-brand-border-default",
429
+ "hover:bg-btn-ghost-brand-bg-hover",
430
+ "hover:text-btn-ghost-brand-text-hover",
431
+ "active:bg-btn-ghost-brand-bg-pressed",
432
+ "active:text-btn-ghost-brand-text-pressed"
433
433
  ]
434
434
  },
435
435
  // ── Ghost + Alert ──────────────────────────────────────────────────
@@ -487,13 +487,17 @@ var Button = React2.forwardRef(
487
487
  const isDisabled = disabled || loading;
488
488
  const isIconOnly = iconOnlyProp ?? !children;
489
489
  const iconSize = iconSizeMap[size ?? "md"];
490
+ const smPadding = size === "sm" && !isIconOnly ? cn(
491
+ leftIcon || loading ? "pl-xs" : "pl-sm",
492
+ rightIcon ? "pr-xs" : "pr-sm"
493
+ ) : "";
490
494
  const variantClasses = buttonVariants({
491
495
  appearance,
492
496
  intent,
493
497
  size,
494
498
  iconOnly: isIconOnly || void 0,
495
499
  fullWidth,
496
- className
500
+ className: cn(smPadding, className)
497
501
  });
498
502
  if (asChild) {
499
503
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_slot.Slot, { ref, className: cn(variantClasses), ...props, children });
@@ -5466,7 +5470,7 @@ var import_jsx_runtime40 = require("react/jsx-runtime");
5466
5470
  var SaveViewButton = React40.forwardRef(
5467
5471
  ({ className, label = "Save view", onSave, onDropdown, ...props }, ref) => {
5468
5472
  const sharedStyle = [
5469
- "flex items-center justify-center",
5473
+ "relative flex items-center justify-center",
5470
5474
  "min-h-[32px] max-h-[32px]",
5471
5475
  "bg-gradient-to-t from-[var(--color-btn-solid-brand-bg-default)] from-[10%] to-[var(--color-btn-solid-brand-bg-gradient-to-default)]",
5472
5476
  "border border-[var(--color-btn-solid-brand-border-default)]",
@@ -5616,311 +5620,344 @@ var OperatorList = ({
5616
5620
  };
5617
5621
  OperatorList.displayName = "OperatorList";
5618
5622
 
5619
- // src/components/ui/filter/value-input.tsx
5623
+ // src/components/ui/filter/value-inputs/shared.ts
5624
+ var inputClasses = [
5625
+ "w-full px-base py-sm rounded-base border border-[var(--color-input)]",
5626
+ "bg-[var(--color-background)] text-sm font-regular leading-sm text-[var(--color-foreground)]",
5627
+ "placeholder:text-[var(--color-muted-foreground)]",
5628
+ "focus:outline-none focus:ring-2 focus:ring-[var(--color-ring)] focus:ring-offset-0"
5629
+ ].join(" ");
5630
+ var halfInputClasses = [
5631
+ "flex-1 px-base py-sm rounded-base border border-[var(--color-input)]",
5632
+ "bg-[var(--color-background)] text-sm font-regular leading-sm text-[var(--color-foreground)]",
5633
+ "focus:outline-none focus:ring-2 focus:ring-[var(--color-ring)]"
5634
+ ].join(" ");
5635
+ var applyBtnClasses = "self-end px-md py-sm text-sm font-semibold leading-sm text-[var(--color-primary-foreground)] bg-[var(--color-primary)] rounded-base cursor-pointer hover:opacity-90 transition-opacity";
5636
+
5637
+ // src/components/ui/filter/value-inputs/text-value-input.tsx
5620
5638
  var import_jsx_runtime42 = require("react/jsx-runtime");
5639
+ var TextValueInput = ({
5640
+ value,
5641
+ onChange,
5642
+ onSubmit,
5643
+ className
5644
+ }) => {
5645
+ const handleKeyDown = (e) => {
5646
+ if (e.key === "Enter") onSubmit?.();
5647
+ };
5648
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: cn("flex flex-col gap-base p-base", className), children: [
5649
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5650
+ "input",
5651
+ {
5652
+ type: "text",
5653
+ value: value ?? "",
5654
+ onChange: (e) => onChange(e.target.value),
5655
+ onKeyDown: handleKeyDown,
5656
+ placeholder: "Enter value...",
5657
+ autoFocus: true,
5658
+ className: inputClasses
5659
+ }
5660
+ ),
5661
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("button", { type: "button", onClick: onSubmit, className: applyBtnClasses, children: "Apply" })
5662
+ ] });
5663
+ };
5664
+ TextValueInput.displayName = "TextValueInput";
5665
+
5666
+ // src/components/ui/filter/value-inputs/number-value-input.tsx
5667
+ var import_jsx_runtime43 = require("react/jsx-runtime");
5668
+ var NumberValueInput = ({
5669
+ value,
5670
+ onChange,
5671
+ onSubmit,
5672
+ className
5673
+ }) => {
5674
+ const handleKeyDown = (e) => {
5675
+ if (e.key === "Enter") onSubmit?.();
5676
+ };
5677
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: cn("flex flex-col gap-base p-base", className), children: [
5678
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
5679
+ "input",
5680
+ {
5681
+ type: "number",
5682
+ value: value ?? "",
5683
+ onChange: (e) => onChange(e.target.value ? Number(e.target.value) : null),
5684
+ onKeyDown: handleKeyDown,
5685
+ placeholder: "Enter number...",
5686
+ autoFocus: true,
5687
+ className: inputClasses
5688
+ }
5689
+ ),
5690
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("button", { type: "button", onClick: onSubmit, className: applyBtnClasses, children: "Apply" })
5691
+ ] });
5692
+ };
5693
+ NumberValueInput.displayName = "NumberValueInput";
5694
+ var NumberRangeValueInput = ({
5695
+ value,
5696
+ onChange,
5697
+ onSubmit,
5698
+ className
5699
+ }) => {
5700
+ const rangeVal = value ?? [0, 0];
5701
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: cn("flex flex-col gap-base p-base", className), children: [
5702
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex items-center gap-base", children: [
5703
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
5704
+ "input",
5705
+ {
5706
+ type: "number",
5707
+ value: rangeVal[0] ?? "",
5708
+ onChange: (e) => onChange([Number(e.target.value), rangeVal[1]]),
5709
+ placeholder: "Min",
5710
+ autoFocus: true,
5711
+ className: halfInputClasses
5712
+ }
5713
+ ),
5714
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "text-sm text-[var(--color-muted-foreground)]", children: "and" }),
5715
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
5716
+ "input",
5717
+ {
5718
+ type: "number",
5719
+ value: rangeVal[1] ?? "",
5720
+ onChange: (e) => onChange([rangeVal[0], Number(e.target.value)]),
5721
+ placeholder: "Max",
5722
+ className: halfInputClasses
5723
+ }
5724
+ )
5725
+ ] }),
5726
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("button", { type: "button", onClick: onSubmit, className: applyBtnClasses, children: "Apply" })
5727
+ ] });
5728
+ };
5729
+ NumberRangeValueInput.displayName = "NumberRangeValueInput";
5730
+
5731
+ // src/components/ui/filter/value-inputs/date-value-input.tsx
5732
+ var import_jsx_runtime44 = require("react/jsx-runtime");
5621
5733
  var RELATIVE_DATE_PRESETS = [
5622
5734
  { group: "Past", options: ["Today", "Yesterday", "Last 7 days", "Last 14 days", "Last 30 days", "Last 90 days"] },
5623
5735
  { group: "Current", options: ["This week", "This month", "This quarter", "This year"] },
5624
5736
  { group: "Future", options: ["Tomorrow", "Next 7 days", "Next 14 days", "Next 30 days", "Next week", "Next month", "Next quarter"] }
5625
5737
  ];
5626
- var ValueInput = ({
5627
- dataType,
5628
- operator,
5738
+ var DatePickerValueInput = ({
5629
5739
  value,
5630
5740
  onChange,
5631
5741
  onSubmit,
5632
- options = [],
5633
5742
  className
5634
- }) => {
5635
- const inputType = getValueInputType(dataType, operator);
5636
- if (!inputType) return null;
5637
- const handleKeyDown = (e) => {
5638
- if (e.key === "Enter") onSubmit?.();
5639
- };
5640
- switch (inputType) {
5641
- case "TextInput":
5642
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: cn("flex flex-col gap-base p-base", className), children: [
5643
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5644
- "input",
5645
- {
5646
- type: "text",
5647
- value: value ?? "",
5648
- onChange: (e) => onChange(e.target.value),
5649
- onKeyDown: handleKeyDown,
5650
- placeholder: "Enter value...",
5651
- autoFocus: true,
5652
- className: cn(
5653
- "w-full px-base py-sm rounded-base border border-[var(--color-input)]",
5654
- "bg-[var(--color-background)] text-sm font-regular leading-sm text-[var(--color-foreground)]",
5655
- "placeholder:text-[var(--color-muted-foreground)]",
5656
- "focus:outline-none focus:ring-2 focus:ring-[var(--color-ring)] focus:ring-offset-0"
5657
- )
5658
- }
5659
- ),
5660
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5661
- "button",
5662
- {
5663
- type: "button",
5664
- onClick: onSubmit,
5665
- className: "self-end px-md py-sm text-sm font-semibold leading-sm text-[var(--color-primary-foreground)] bg-[var(--color-primary)] rounded-base cursor-pointer hover:opacity-90 transition-opacity",
5666
- children: "Apply"
5667
- }
5668
- )
5669
- ] });
5670
- case "NumberInput":
5671
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: cn("flex flex-col gap-base p-base", className), children: [
5672
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5673
- "input",
5674
- {
5675
- type: "number",
5676
- value: value ?? "",
5677
- onChange: (e) => onChange(e.target.value ? Number(e.target.value) : null),
5678
- onKeyDown: handleKeyDown,
5679
- placeholder: "Enter number...",
5680
- autoFocus: true,
5681
- className: cn(
5682
- "w-full px-base py-sm rounded-base border border-[var(--color-input)]",
5683
- "bg-[var(--color-background)] text-sm font-regular leading-sm text-[var(--color-foreground)]",
5684
- "placeholder:text-[var(--color-muted-foreground)]",
5685
- "focus:outline-none focus:ring-2 focus:ring-[var(--color-ring)] focus:ring-offset-0"
5686
- )
5687
- }
5688
- ),
5689
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5690
- "button",
5691
- {
5692
- type: "button",
5693
- onClick: onSubmit,
5694
- className: "self-end px-md py-sm text-sm font-semibold leading-sm text-[var(--color-primary-foreground)] bg-[var(--color-primary)] rounded-base cursor-pointer hover:opacity-90 transition-opacity",
5695
- children: "Apply"
5696
- }
5697
- )
5698
- ] });
5699
- case "NumberRange": {
5700
- const rangeVal = value ?? [0, 0];
5701
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: cn("flex flex-col gap-base p-base", className), children: [
5702
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex items-center gap-base", children: [
5703
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5704
- "input",
5705
- {
5706
- type: "number",
5707
- value: rangeVal[0] ?? "",
5708
- onChange: (e) => onChange([Number(e.target.value), rangeVal[1]]),
5709
- placeholder: "Min",
5710
- autoFocus: true,
5711
- className: cn(
5712
- "flex-1 px-base py-sm rounded-base border border-[var(--color-input)]",
5713
- "bg-[var(--color-background)] text-sm font-regular leading-sm text-[var(--color-foreground)]",
5714
- "focus:outline-none focus:ring-2 focus:ring-[var(--color-ring)]"
5715
- )
5716
- }
5717
- ),
5718
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "text-sm text-[var(--color-muted-foreground)]", children: "and" }),
5719
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5720
- "input",
5721
- {
5722
- type: "number",
5723
- value: rangeVal[1] ?? "",
5724
- onChange: (e) => onChange([rangeVal[0], Number(e.target.value)]),
5725
- placeholder: "Max",
5726
- className: cn(
5727
- "flex-1 px-base py-sm rounded-base border border-[var(--color-input)]",
5728
- "bg-[var(--color-background)] text-sm font-regular leading-sm text-[var(--color-foreground)]",
5729
- "focus:outline-none focus:ring-2 focus:ring-[var(--color-ring)]"
5730
- )
5731
- }
5732
- )
5733
- ] }),
5734
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5735
- "button",
5736
- {
5737
- type: "button",
5738
- onClick: onSubmit,
5739
- className: "self-end px-md py-sm text-sm font-semibold leading-sm text-[var(--color-primary-foreground)] bg-[var(--color-primary)] rounded-base cursor-pointer hover:opacity-90 transition-opacity",
5740
- children: "Apply"
5741
- }
5742
- )
5743
- ] });
5743
+ }) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: cn("flex flex-col gap-base p-base", className), children: [
5744
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
5745
+ "input",
5746
+ {
5747
+ type: "date",
5748
+ value: value instanceof Date ? value.toISOString().split("T")[0] : value ?? "",
5749
+ onChange: (e) => onChange(e.target.value ? new Date(e.target.value) : null),
5750
+ autoFocus: true,
5751
+ className: inputClasses
5744
5752
  }
5745
- case "PresetTags":
5746
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: cn("flex flex-col gap-base p-base max-w-[280px]", className), children: RELATIVE_DATE_PRESETS.map((group) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex flex-col gap-xs", children: [
5747
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "text-xs font-semibold leading-xs text-[var(--color-muted-foreground)] uppercase px-xs", children: group.group }),
5748
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "flex flex-wrap gap-xs", children: group.options.map((preset) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5749
- "button",
5750
- {
5751
- type: "button",
5752
- onClick: () => {
5753
- onChange(preset);
5754
- onSubmit?.();
5755
- },
5756
- className: cn(
5757
- "px-base py-2xs rounded-base border cursor-pointer transition-colors text-sm font-regular leading-sm",
5758
- value === preset ? "border-[var(--color-ring)] bg-[var(--color-primary)] text-[var(--color-primary-foreground)]" : "border-[var(--color-input)] bg-[var(--color-background)] text-[var(--color-foreground)] hover:bg-[var(--color-accent)]"
5759
- ),
5760
- children: preset
5753
+ ),
5754
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("button", { type: "button", onClick: onSubmit, className: applyBtnClasses, children: "Apply" })
5755
+ ] });
5756
+ DatePickerValueInput.displayName = "DatePickerValueInput";
5757
+ function toDateString(d) {
5758
+ if (!d) return "";
5759
+ if (d instanceof Date) return d.toISOString().split("T")[0];
5760
+ return String(d);
5761
+ }
5762
+ var DateRangeValueInput = ({
5763
+ value,
5764
+ onChange,
5765
+ onSubmit,
5766
+ className
5767
+ }) => {
5768
+ const rangeVal = Array.isArray(value) ? value : [null, null];
5769
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: cn("flex flex-col gap-base p-base", className), children: [
5770
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex items-center gap-base", children: [
5771
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
5772
+ "input",
5773
+ {
5774
+ type: "date",
5775
+ value: toDateString(rangeVal[0]),
5776
+ onChange: (e) => {
5777
+ const from = e.target.value ? new Date(e.target.value) : null;
5778
+ onChange([from, rangeVal[1]]);
5761
5779
  },
5762
- preset
5763
- )) })
5764
- ] }, group.group)) });
5765
- case "SingleSelect":
5766
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: cn("flex flex-col gap-xs p-base max-h-[250px] overflow-y-auto", className), children: options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5780
+ autoFocus: true,
5781
+ className: halfInputClasses
5782
+ }
5783
+ ),
5784
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "text-sm text-[var(--color-muted-foreground)]", children: "to" }),
5785
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
5786
+ "input",
5787
+ {
5788
+ type: "date",
5789
+ value: toDateString(rangeVal[1]),
5790
+ onChange: (e) => {
5791
+ const to = e.target.value ? new Date(e.target.value) : null;
5792
+ onChange([rangeVal[0], to]);
5793
+ },
5794
+ className: halfInputClasses
5795
+ }
5796
+ )
5797
+ ] }),
5798
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("button", { type: "button", onClick: onSubmit, className: applyBtnClasses, children: "Apply" })
5799
+ ] });
5800
+ };
5801
+ DateRangeValueInput.displayName = "DateRangeValueInput";
5802
+ var PresetTagsValueInput = ({
5803
+ value,
5804
+ onChange,
5805
+ onSubmit,
5806
+ className
5807
+ }) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: cn("flex flex-col gap-base p-base max-w-[280px]", className), children: RELATIVE_DATE_PRESETS.map((group) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex flex-col gap-xs", children: [
5808
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "text-xs font-semibold leading-xs text-[var(--color-muted-foreground)] uppercase px-xs", children: group.group }),
5809
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "flex flex-wrap gap-xs", children: group.options.map((preset) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
5810
+ "button",
5811
+ {
5812
+ type: "button",
5813
+ onClick: () => {
5814
+ onChange(preset);
5815
+ onSubmit?.();
5816
+ },
5817
+ className: cn(
5818
+ "px-base py-2xs rounded-base border cursor-pointer transition-colors text-sm font-regular leading-sm",
5819
+ value === preset ? "border-[var(--color-ring)] bg-[var(--color-primary)] text-[var(--color-primary-foreground)]" : "border-[var(--color-input)] bg-[var(--color-background)] text-[var(--color-foreground)] hover:bg-[var(--color-accent)]"
5820
+ ),
5821
+ children: preset
5822
+ },
5823
+ preset
5824
+ )) })
5825
+ ] }, group.group)) });
5826
+ PresetTagsValueInput.displayName = "PresetTagsValueInput";
5827
+
5828
+ // src/components/ui/filter/value-inputs/select-value-input.tsx
5829
+ var import_jsx_runtime45 = require("react/jsx-runtime");
5830
+ var SingleSelectValueInput = ({
5831
+ value,
5832
+ onChange,
5833
+ onSubmit,
5834
+ options,
5835
+ className
5836
+ }) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: cn("flex flex-col gap-xs p-base max-h-[250px] overflow-y-auto", className), children: options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
5837
+ "button",
5838
+ {
5839
+ type: "button",
5840
+ onClick: () => {
5841
+ onChange(opt);
5842
+ onSubmit?.();
5843
+ },
5844
+ className: cn(
5845
+ "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors text-left",
5846
+ "hover:bg-[var(--color-dropdown-item-hover)]",
5847
+ value === opt && "bg-[var(--color-dropdown-item-hover)]"
5848
+ ),
5849
+ children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "text-sm font-regular leading-sm text-[var(--color-foreground)]", children: opt })
5850
+ },
5851
+ opt
5852
+ )) });
5853
+ SingleSelectValueInput.displayName = "SingleSelectValueInput";
5854
+ var MultiSelectValueInput = ({
5855
+ value,
5856
+ onChange,
5857
+ onSubmit,
5858
+ options,
5859
+ className
5860
+ }) => {
5861
+ const selected = Array.isArray(value) ? value : [];
5862
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: cn("flex flex-col gap-xs p-base", className), children: [
5863
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "flex flex-col max-h-[200px] overflow-y-auto", children: options.map((opt) => {
5864
+ const isSelected = selected.includes(opt);
5865
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
5767
5866
  "button",
5768
5867
  {
5769
5868
  type: "button",
5770
5869
  onClick: () => {
5771
- onChange(opt);
5772
- onSubmit?.();
5870
+ const next = isSelected ? selected.filter((s) => s !== opt) : [...selected, opt];
5871
+ onChange(next);
5773
5872
  },
5774
5873
  className: cn(
5775
5874
  "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors text-left",
5776
- "hover:bg-[var(--color-dropdown-item-hover)]",
5777
- value === opt && "bg-[var(--color-dropdown-item-hover)]"
5875
+ "hover:bg-[var(--color-dropdown-item-hover)]"
5778
5876
  ),
5779
- children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "text-sm font-regular leading-sm text-[var(--color-foreground)]", children: opt })
5877
+ children: [
5878
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
5879
+ "span",
5880
+ {
5881
+ className: cn(
5882
+ "flex items-center justify-center size-4 rounded-xs border transition-colors",
5883
+ isSelected ? "bg-[var(--color-primary)] border-[var(--color-primary)]" : "border-[var(--color-input)] bg-[var(--color-background)]"
5884
+ ),
5885
+ children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("path", { d: "M2 5L4 7L8 3", stroke: "white", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
5886
+ }
5887
+ ),
5888
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "text-sm font-regular leading-sm text-[var(--color-foreground)]", children: opt })
5889
+ ]
5780
5890
  },
5781
5891
  opt
5782
- )) });
5783
- case "MultiSelect": {
5784
- const selected = Array.isArray(value) ? value : [];
5785
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: cn("flex flex-col gap-xs p-base", className), children: [
5786
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "flex flex-col max-h-[200px] overflow-y-auto", children: options.map((opt) => {
5787
- const isSelected = selected.includes(opt);
5788
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
5789
- "button",
5790
- {
5791
- type: "button",
5792
- onClick: () => {
5793
- const next = isSelected ? selected.filter((s) => s !== opt) : [...selected, opt];
5794
- onChange(next);
5795
- },
5796
- className: cn(
5797
- "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors text-left",
5798
- "hover:bg-[var(--color-dropdown-item-hover)]"
5799
- ),
5800
- children: [
5801
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5802
- "span",
5803
- {
5804
- className: cn(
5805
- "flex items-center justify-center size-4 rounded-xs border transition-colors",
5806
- isSelected ? "bg-[var(--color-primary)] border-[var(--color-primary)]" : "border-[var(--color-input)] bg-[var(--color-background)]"
5807
- ),
5808
- children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("path", { d: "M2 5L4 7L8 3", stroke: "white", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
5809
- }
5810
- ),
5811
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "text-sm font-regular leading-sm text-[var(--color-foreground)]", children: opt })
5812
- ]
5813
- },
5814
- opt
5815
- );
5816
- }) }),
5817
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5818
- "button",
5819
- {
5820
- type: "button",
5821
- onClick: onSubmit,
5822
- className: "self-end px-md py-sm text-sm font-semibold leading-sm text-[var(--color-primary-foreground)] bg-[var(--color-primary)] rounded-base cursor-pointer hover:opacity-90 transition-opacity",
5823
- children: "Apply"
5824
- }
5825
- )
5826
- ] });
5827
- }
5828
- // DatePicker, DateRange, RelationPicker, MultiRelationPicker
5829
- // Stub as text inputs for now — will wire to actual DatePicker/relation components
5892
+ );
5893
+ }) }),
5894
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("button", { type: "button", onClick: onSubmit, className: applyBtnClasses, children: "Apply" })
5895
+ ] });
5896
+ };
5897
+ MultiSelectValueInput.displayName = "MultiSelectValueInput";
5898
+
5899
+ // src/components/ui/filter/value-inputs/relation-value-input.tsx
5900
+ var import_jsx_runtime46 = require("react/jsx-runtime");
5901
+ var RelationValueInput = ({
5902
+ value,
5903
+ onChange,
5904
+ onSubmit,
5905
+ className
5906
+ }) => {
5907
+ const handleKeyDown = (e) => {
5908
+ if (e.key === "Enter") onSubmit?.();
5909
+ };
5910
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: cn("flex flex-col gap-base p-base", className), children: [
5911
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
5912
+ "input",
5913
+ {
5914
+ type: "text",
5915
+ value: value ?? "",
5916
+ onChange: (e) => onChange(e.target.value),
5917
+ onKeyDown: handleKeyDown,
5918
+ placeholder: "Search...",
5919
+ autoFocus: true,
5920
+ className: inputClasses
5921
+ }
5922
+ ),
5923
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("button", { type: "button", onClick: onSubmit, className: applyBtnClasses, children: "Apply" })
5924
+ ] });
5925
+ };
5926
+ RelationValueInput.displayName = "RelationValueInput";
5927
+
5928
+ // src/components/ui/filter/value-input.tsx
5929
+ var import_jsx_runtime47 = require("react/jsx-runtime");
5930
+ var ValueInput = ({
5931
+ dataType,
5932
+ operator,
5933
+ value,
5934
+ onChange,
5935
+ onSubmit,
5936
+ options = [],
5937
+ className
5938
+ }) => {
5939
+ const inputType = getValueInputType(dataType, operator);
5940
+ if (!inputType) return null;
5941
+ switch (inputType) {
5942
+ case "TextInput":
5943
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TextValueInput, { value, onChange, onSubmit, className });
5944
+ case "NumberInput":
5945
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(NumberValueInput, { value, onChange, onSubmit, className });
5946
+ case "NumberRange":
5947
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(NumberRangeValueInput, { value, onChange, onSubmit, className });
5948
+ case "PresetTags":
5949
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(PresetTagsValueInput, { value, onChange, onSubmit, className });
5950
+ case "SingleSelect":
5951
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SingleSelectValueInput, { value, onChange, onSubmit, options, className });
5952
+ case "MultiSelect":
5953
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(MultiSelectValueInput, { value, onChange, onSubmit, options, className });
5830
5954
  case "DatePicker":
5831
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: cn("flex flex-col gap-base p-base", className), children: [
5832
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5833
- "input",
5834
- {
5835
- type: "date",
5836
- value: value instanceof Date ? value.toISOString().split("T")[0] : value ?? "",
5837
- onChange: (e) => onChange(e.target.value ? new Date(e.target.value) : null),
5838
- autoFocus: true,
5839
- className: cn(
5840
- "w-full px-base py-sm rounded-base border border-[var(--color-input)]",
5841
- "bg-[var(--color-background)] text-sm font-regular leading-sm text-[var(--color-foreground)]",
5842
- "focus:outline-none focus:ring-2 focus:ring-[var(--color-ring)]"
5843
- )
5844
- }
5845
- ),
5846
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5847
- "button",
5848
- {
5849
- type: "button",
5850
- onClick: onSubmit,
5851
- className: "self-end px-md py-sm text-sm font-semibold leading-sm text-[var(--color-primary-foreground)] bg-[var(--color-primary)] rounded-base cursor-pointer hover:opacity-90 transition-opacity",
5852
- children: "Apply"
5853
- }
5854
- )
5855
- ] });
5955
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(DatePickerValueInput, { value, onChange, onSubmit, className });
5856
5956
  case "DateRange":
5857
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: cn("flex flex-col gap-base p-base", className), children: [
5858
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex items-center gap-base", children: [
5859
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5860
- "input",
5861
- {
5862
- type: "date",
5863
- autoFocus: true,
5864
- className: cn(
5865
- "flex-1 px-base py-sm rounded-base border border-[var(--color-input)]",
5866
- "bg-[var(--color-background)] text-sm font-regular leading-sm text-[var(--color-foreground)]",
5867
- "focus:outline-none focus:ring-2 focus:ring-[var(--color-ring)]"
5868
- )
5869
- }
5870
- ),
5871
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "text-sm text-[var(--color-muted-foreground)]", children: "to" }),
5872
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5873
- "input",
5874
- {
5875
- type: "date",
5876
- className: cn(
5877
- "flex-1 px-base py-sm rounded-base border border-[var(--color-input)]",
5878
- "bg-[var(--color-background)] text-sm font-regular leading-sm text-[var(--color-foreground)]",
5879
- "focus:outline-none focus:ring-2 focus:ring-[var(--color-ring)]"
5880
- )
5881
- }
5882
- )
5883
- ] }),
5884
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5885
- "button",
5886
- {
5887
- type: "button",
5888
- onClick: onSubmit,
5889
- className: "self-end px-md py-sm text-sm font-semibold leading-sm text-[var(--color-primary-foreground)] bg-[var(--color-primary)] rounded-base cursor-pointer hover:opacity-90 transition-opacity",
5890
- children: "Apply"
5891
- }
5892
- )
5893
- ] });
5957
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(DateRangeValueInput, { value, onChange, onSubmit, className });
5894
5958
  case "RelationPicker":
5895
5959
  case "MultiRelationPicker":
5896
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: cn("flex flex-col gap-base p-base", className), children: [
5897
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5898
- "input",
5899
- {
5900
- type: "text",
5901
- value: value ?? "",
5902
- onChange: (e) => onChange(e.target.value),
5903
- onKeyDown: handleKeyDown,
5904
- placeholder: "Search...",
5905
- autoFocus: true,
5906
- className: cn(
5907
- "w-full px-base py-sm rounded-base border border-[var(--color-input)]",
5908
- "bg-[var(--color-background)] text-sm font-regular leading-sm text-[var(--color-foreground)]",
5909
- "placeholder:text-[var(--color-muted-foreground)]",
5910
- "focus:outline-none focus:ring-2 focus:ring-[var(--color-ring)]"
5911
- )
5912
- }
5913
- ),
5914
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
5915
- "button",
5916
- {
5917
- type: "button",
5918
- onClick: onSubmit,
5919
- className: "self-end px-md py-sm text-sm font-semibold leading-sm text-[var(--color-primary-foreground)] bg-[var(--color-primary)] rounded-base cursor-pointer hover:opacity-90 transition-opacity",
5920
- children: "Apply"
5921
- }
5922
- )
5923
- ] });
5960
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(RelationValueInput, { value, onChange, onSubmit, className });
5924
5961
  default:
5925
5962
  return null;
5926
5963
  }
@@ -5931,14 +5968,50 @@ ValueInput.displayName = "ValueInput";
5931
5968
  var React41 = __toESM(require("react"));
5932
5969
  var PopoverPrimitive5 = __toESM(require("@radix-ui/react-popover"));
5933
5970
  var import_icons27 = require("@l3mpire/icons");
5934
- var import_jsx_runtime43 = require("react/jsx-runtime");
5971
+ var import_jsx_runtime48 = require("react/jsx-runtime");
5972
+ var AdvancedFilterFooter = ({ onClick, count }) => /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
5973
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "h-px bg-[var(--color-dropdown-border)] mx-xs" }),
5974
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
5975
+ "button",
5976
+ {
5977
+ type: "button",
5978
+ onPointerDown: (e) => e.preventDefault(),
5979
+ onClick,
5980
+ className: "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-[var(--color-dropdown-item-hover)]",
5981
+ children: [
5982
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
5983
+ import_icons27.Icon,
5984
+ {
5985
+ icon: import_icons27.faFilterOutline,
5986
+ size: "sm",
5987
+ className: "shrink-0 text-[var(--color-dropdown-item-icon)]"
5988
+ }
5989
+ ),
5990
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "flex-1 text-sm font-regular leading-sm text-[var(--color-dropdown-item-text)] text-left truncate", children: "Advanced filter" }),
5991
+ count > 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("span", { className: "text-xs font-regular leading-xs text-[var(--color-muted-foreground)]", children: [
5992
+ count,
5993
+ " ",
5994
+ count === 1 ? "rule" : "rules"
5995
+ ] })
5996
+ ]
5997
+ }
5998
+ )
5999
+ ] });
5935
6000
  var PropertySelector = ({
5936
6001
  properties,
5937
6002
  onSelect,
5938
6003
  open,
5939
6004
  onOpenChange,
5940
- children
6005
+ children,
6006
+ onAdvancedFilter,
6007
+ advancedFilterCount = 0
5941
6008
  }) => {
6009
+ const handleAdvancedClick = (e) => {
6010
+ e.stopPropagation();
6011
+ e.preventDefault();
6012
+ onAdvancedFilter?.();
6013
+ };
6014
+ const showAdvancedFooter = !!onAdvancedFilter;
5942
6015
  const [activeGroup, setActiveGroup] = React41.useState(null);
5943
6016
  const [search, setSearch] = React41.useState("");
5944
6017
  React41.useEffect(() => {
@@ -5964,6 +6037,20 @@ var PropertySelector = ({
5964
6037
  }
5965
6038
  return Array.from(map.values());
5966
6039
  }, [properties]);
6040
+ const globalSearchResults = React41.useMemo(() => {
6041
+ if (!search || activeGroup) return [];
6042
+ const lower = search.toLowerCase();
6043
+ return properties.filter((p) => p.label.toLowerCase().includes(lower));
6044
+ }, [properties, search, activeGroup]);
6045
+ const filteredGroups = React41.useMemo(() => {
6046
+ if (!search || activeGroup) return groups;
6047
+ const lower = search.toLowerCase();
6048
+ return groups.filter(
6049
+ (g) => g.groupLabel.toLowerCase().includes(lower) || properties.some(
6050
+ (p) => p.group === g.group && p.label.toLowerCase().includes(lower)
6051
+ )
6052
+ );
6053
+ }, [groups, properties, search, activeGroup]);
5967
6054
  const filteredProperties = React41.useMemo(() => {
5968
6055
  if (!activeGroup) return [];
5969
6056
  const groupProps = properties.filter((p) => p.group === activeGroup);
@@ -5972,13 +6059,15 @@ var PropertySelector = ({
5972
6059
  return groupProps.filter((p) => p.label.toLowerCase().includes(lower));
5973
6060
  }, [properties, activeGroup, search]);
5974
6061
  const activeGroupInfo = groups.find((g) => g.group === activeGroup);
5975
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(PopoverPrimitive5.Root, { open, onOpenChange, children: [
5976
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(PopoverPrimitive5.Trigger, { asChild: true, children }),
5977
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(PopoverPrimitive5.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
6062
+ const showGlobalResults = search.length > 0 && !activeGroup && globalSearchResults.length > 0;
6063
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(PopoverPrimitive5.Root, { open, onOpenChange, children: [
6064
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(PopoverPrimitive5.Trigger, { asChild: true, children }),
6065
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(PopoverPrimitive5.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
5978
6066
  PopoverPrimitive5.Content,
5979
6067
  {
5980
6068
  sideOffset: 4,
5981
6069
  align: "start",
6070
+ onCloseAutoFocus: (e) => e.preventDefault(),
5982
6071
  className: cn(
5983
6072
  "z-50 flex flex-col gap-xs overflow-clip p-xs",
5984
6073
  "bg-[var(--color-dropdown-bg)] border border-[var(--color-dropdown-border)] rounded-md shadow-lg",
@@ -5987,111 +6076,178 @@ var PropertySelector = ({
5987
6076
  "data-[side=bottom]:slide-in-from-top-2",
5988
6077
  "min-w-[230px]"
5989
6078
  ),
5990
- children: activeGroup === null ? (
5991
- /* ── Level 1: Categories ─────────────────────────────────── */
5992
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "flex flex-col", children: groups.map((g) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
5993
- "button",
5994
- {
5995
- type: "button",
5996
- onClick: () => setActiveGroup(g.group),
5997
- className: "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-[var(--color-dropdown-item-hover)]",
5998
- children: [
5999
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
6079
+ children: [
6080
+ activeGroup === null ? (
6081
+ /* ── Level 1: Search + Categories ───────────────────────── */
6082
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex flex-col gap-xs", children: [
6083
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center gap-base px-md py-base border border-[var(--color-input)] rounded-md", children: [
6084
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6000
6085
  import_icons27.Icon,
6001
6086
  {
6002
- icon: g.groupIcon,
6087
+ icon: import_icons27.faMagnifyingGlassOutline,
6003
6088
  size: "sm",
6004
- className: "shrink-0 text-[var(--color-dropdown-item-icon)]"
6089
+ className: "shrink-0 text-[var(--color-muted-foreground)]"
6005
6090
  }
6006
6091
  ),
6007
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "flex-1 text-sm font-regular leading-sm text-[var(--color-dropdown-item-text)] text-left truncate", children: g.groupLabel }),
6008
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "text-xs font-semibold leading-xs text-[var(--color-muted-foreground)]", children: g.count }),
6009
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
6010
- import_icons27.Icon,
6092
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6093
+ "input",
6011
6094
  {
6012
- icon: import_icons27.faChevronRightOutline,
6013
- size: "xs",
6014
- className: "shrink-0 text-[var(--color-dropdown-item-icon)]"
6095
+ type: "text",
6096
+ value: search,
6097
+ onChange: (e) => setSearch(e.target.value),
6098
+ placeholder: "Search...",
6099
+ autoFocus: true,
6100
+ className: "flex-1 text-sm font-regular leading-sm text-[var(--color-foreground)] bg-transparent outline-none placeholder:text-[var(--color-muted-foreground)]"
6015
6101
  }
6016
6102
  )
6017
- ]
6018
- },
6019
- g.group
6020
- )) })
6021
- ) : (
6022
- /* ── Level 2: Properties ─────────────────────────────────── */
6023
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex flex-col gap-xs", children: [
6024
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
6025
- "button",
6026
- {
6027
- type: "button",
6028
- onClick: () => {
6029
- setActiveGroup(null);
6030
- setSearch("");
6031
- },
6032
- className: "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-[var(--color-dropdown-item-hover)]",
6033
- children: [
6034
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
6035
- import_icons27.Icon,
6103
+ ] }),
6104
+ showGlobalResults ? (
6105
+ /* ── Global search results (flat property list) ─────── */
6106
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "flex flex-col max-h-[300px] overflow-y-auto", children: globalSearchResults.map((prop) => /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
6107
+ "button",
6108
+ {
6109
+ type: "button",
6110
+ onClick: () => {
6111
+ onSelect(prop);
6112
+ onOpenChange?.(false);
6113
+ },
6114
+ className: "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-[var(--color-dropdown-item-hover)]",
6115
+ children: [
6116
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6117
+ import_icons27.Icon,
6118
+ {
6119
+ icon: prop.icon,
6120
+ size: "sm",
6121
+ className: "shrink-0 text-[var(--color-dropdown-item-icon)]"
6122
+ }
6123
+ ),
6124
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "flex-1 text-sm font-regular leading-sm text-[var(--color-dropdown-item-text)] text-left truncate", children: prop.label }),
6125
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "text-xs font-regular leading-xs text-[var(--color-muted-foreground)]", children: prop.groupLabel })
6126
+ ]
6127
+ },
6128
+ prop.id
6129
+ )) })
6130
+ ) : (
6131
+ /* ── Group list ─────────────────────────────────────── */
6132
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex flex-col", children: [
6133
+ filteredGroups.map((g) => /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
6134
+ "button",
6036
6135
  {
6037
- icon: import_icons27.faChevronLeftOutline,
6038
- size: "sm",
6039
- className: "shrink-0 text-[var(--color-dropdown-item-icon)]"
6040
- }
6041
- ),
6042
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "flex-1 text-xs font-semibold leading-xs text-[var(--color-muted-foreground)] text-left truncate", children: activeGroupInfo?.groupLabel })
6043
- ]
6044
- }
6045
- ),
6046
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex items-center gap-base px-md py-base border border-[var(--color-input)] rounded-md", children: [
6047
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
6048
- import_icons27.Icon,
6049
- {
6050
- icon: import_icons27.faMagnifyingGlassOutline,
6051
- size: "sm",
6052
- className: "shrink-0 text-[var(--color-muted-foreground)]"
6053
- }
6054
- ),
6055
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
6056
- "input",
6057
- {
6058
- type: "text",
6059
- value: search,
6060
- onChange: (e) => setSearch(e.target.value),
6061
- placeholder: "Search...",
6062
- autoFocus: true,
6063
- className: "flex-1 text-sm font-regular leading-sm text-[var(--color-foreground)] bg-transparent outline-none placeholder:text-[var(--color-muted-foreground)]"
6064
- }
6136
+ type: "button",
6137
+ onClick: () => {
6138
+ setActiveGroup(g.group);
6139
+ setSearch("");
6140
+ },
6141
+ className: "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-[var(--color-dropdown-item-hover)]",
6142
+ children: [
6143
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6144
+ import_icons27.Icon,
6145
+ {
6146
+ icon: g.groupIcon,
6147
+ size: "sm",
6148
+ className: "shrink-0 text-[var(--color-dropdown-item-icon)]"
6149
+ }
6150
+ ),
6151
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "flex-1 text-sm font-regular leading-sm text-[var(--color-dropdown-item-text)] text-left truncate", children: g.groupLabel }),
6152
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "text-xs font-semibold leading-xs text-[var(--color-muted-foreground)]", children: g.count }),
6153
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6154
+ import_icons27.Icon,
6155
+ {
6156
+ icon: import_icons27.faChevronRightOutline,
6157
+ size: "xs",
6158
+ className: "shrink-0 text-[var(--color-dropdown-item-icon)]"
6159
+ }
6160
+ )
6161
+ ]
6162
+ },
6163
+ g.group
6164
+ )),
6165
+ filteredGroups.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "p-base text-sm text-[var(--color-muted-foreground)]", children: "No results" })
6166
+ ] })
6065
6167
  )
6066
- ] }),
6067
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex flex-col max-h-[300px] overflow-y-auto", children: [
6068
- filteredProperties.map((prop) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
6168
+ ] })
6169
+ ) : (
6170
+ /* ── Level 2: Properties ─────────────────────────────────── */
6171
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex flex-col gap-xs", children: [
6172
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
6069
6173
  "button",
6070
6174
  {
6071
6175
  type: "button",
6072
6176
  onClick: () => {
6073
- onSelect(prop);
6074
- onOpenChange?.(false);
6177
+ setActiveGroup(null);
6178
+ setSearch("");
6075
6179
  },
6076
6180
  className: "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-[var(--color-dropdown-item-hover)]",
6077
6181
  children: [
6078
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
6182
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6079
6183
  import_icons27.Icon,
6080
6184
  {
6081
- icon: prop.icon,
6185
+ icon: import_icons27.faChevronLeftOutline,
6082
6186
  size: "sm",
6083
6187
  className: "shrink-0 text-[var(--color-dropdown-item-icon)]"
6084
6188
  }
6085
6189
  ),
6086
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "flex-1 text-sm font-regular leading-sm text-[var(--color-dropdown-item-text)] text-left truncate", children: prop.label })
6190
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "flex-1 text-xs font-semibold leading-xs text-[var(--color-muted-foreground)] text-left truncate", children: activeGroupInfo?.groupLabel })
6087
6191
  ]
6088
- },
6089
- prop.id
6090
- )),
6091
- filteredProperties.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "p-base text-sm text-[var(--color-muted-foreground)]", children: "No results" })
6192
+ }
6193
+ ),
6194
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center gap-base px-md py-base border border-[var(--color-input)] rounded-md", children: [
6195
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6196
+ import_icons27.Icon,
6197
+ {
6198
+ icon: import_icons27.faMagnifyingGlassOutline,
6199
+ size: "sm",
6200
+ className: "shrink-0 text-[var(--color-muted-foreground)]"
6201
+ }
6202
+ ),
6203
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6204
+ "input",
6205
+ {
6206
+ type: "text",
6207
+ value: search,
6208
+ onChange: (e) => setSearch(e.target.value),
6209
+ placeholder: "Search...",
6210
+ autoFocus: true,
6211
+ className: "flex-1 text-sm font-regular leading-sm text-[var(--color-foreground)] bg-transparent outline-none placeholder:text-[var(--color-muted-foreground)]"
6212
+ }
6213
+ )
6214
+ ] }),
6215
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex flex-col max-h-[300px] overflow-y-auto", children: [
6216
+ filteredProperties.map((prop) => /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
6217
+ "button",
6218
+ {
6219
+ type: "button",
6220
+ onClick: () => {
6221
+ onSelect(prop);
6222
+ onOpenChange?.(false);
6223
+ },
6224
+ className: "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-[var(--color-dropdown-item-hover)]",
6225
+ children: [
6226
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6227
+ import_icons27.Icon,
6228
+ {
6229
+ icon: prop.icon,
6230
+ size: "sm",
6231
+ className: "shrink-0 text-[var(--color-dropdown-item-icon)]"
6232
+ }
6233
+ ),
6234
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "flex-1 text-sm font-regular leading-sm text-[var(--color-dropdown-item-text)] text-left truncate", children: prop.label })
6235
+ ]
6236
+ },
6237
+ prop.id
6238
+ )),
6239
+ filteredProperties.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "p-base text-sm text-[var(--color-muted-foreground)]", children: "No results" })
6240
+ ] })
6092
6241
  ] })
6093
- ] })
6094
- )
6242
+ ),
6243
+ showAdvancedFooter && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6244
+ AdvancedFilterFooter,
6245
+ {
6246
+ onClick: handleAdvancedClick,
6247
+ count: advancedFilterCount
6248
+ }
6249
+ )
6250
+ ]
6095
6251
  }
6096
6252
  ) })
6097
6253
  ] });
@@ -6101,16 +6257,16 @@ PropertySelector.displayName = "PropertySelector";
6101
6257
  // src/components/ui/filter/kebab-menu.tsx
6102
6258
  var PopoverPrimitive6 = __toESM(require("@radix-ui/react-popover"));
6103
6259
  var import_icons28 = require("@l3mpire/icons");
6104
- var import_jsx_runtime44 = require("react/jsx-runtime");
6260
+ var import_jsx_runtime49 = require("react/jsx-runtime");
6105
6261
  var KebabMenu = ({
6106
6262
  onConvertToAdvanced,
6107
6263
  onDelete,
6108
6264
  open,
6109
6265
  onOpenChange,
6110
6266
  children
6111
- }) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(PopoverPrimitive6.Root, { open, onOpenChange, children: [
6112
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(PopoverPrimitive6.Trigger, { asChild: true, children }),
6113
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(PopoverPrimitive6.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
6267
+ }) => /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(PopoverPrimitive6.Root, { open, onOpenChange, children: [
6268
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PopoverPrimitive6.Trigger, { asChild: true, children }),
6269
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PopoverPrimitive6.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
6114
6270
  PopoverPrimitive6.Content,
6115
6271
  {
6116
6272
  sideOffset: 4,
@@ -6124,7 +6280,7 @@ var KebabMenu = ({
6124
6280
  "min-w-[210px]"
6125
6281
  ),
6126
6282
  children: [
6127
- onConvertToAdvanced && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
6283
+ onConvertToAdvanced && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
6128
6284
  "button",
6129
6285
  {
6130
6286
  type: "button",
@@ -6134,7 +6290,7 @@ var KebabMenu = ({
6134
6290
  },
6135
6291
  className: "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-[var(--color-dropdown-item-hover)]",
6136
6292
  children: [
6137
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
6293
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
6138
6294
  import_icons28.Icon,
6139
6295
  {
6140
6296
  icon: import_icons28.faArrowRightOutline,
@@ -6142,12 +6298,12 @@ var KebabMenu = ({
6142
6298
  className: "shrink-0 text-[var(--color-dropdown-item-icon)]"
6143
6299
  }
6144
6300
  ),
6145
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "text-sm font-regular leading-sm text-[var(--color-dropdown-item-text)]", children: "Convert to advanced" })
6301
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "text-sm font-regular leading-sm text-[var(--color-dropdown-item-text)]", children: "Convert to advanced" })
6146
6302
  ]
6147
6303
  }
6148
6304
  ),
6149
- onConvertToAdvanced && onDelete && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "h-px mx-base my-xs bg-[var(--color-border)]" }),
6150
- onDelete && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
6305
+ onConvertToAdvanced && onDelete && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "h-px mx-base my-xs bg-[var(--color-border)]" }),
6306
+ onDelete && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
6151
6307
  "button",
6152
6308
  {
6153
6309
  type: "button",
@@ -6157,7 +6313,7 @@ var KebabMenu = ({
6157
6313
  },
6158
6314
  className: "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-[var(--color-dropdown-item-hover)]",
6159
6315
  children: [
6160
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
6316
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
6161
6317
  import_icons28.Icon,
6162
6318
  {
6163
6319
  icon: import_icons28.faTrashOutline,
@@ -6165,7 +6321,7 @@ var KebabMenu = ({
6165
6321
  className: "shrink-0 text-[var(--color-destructive)]"
6166
6322
  }
6167
6323
  ),
6168
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "text-sm font-regular leading-sm text-[var(--color-destructive)]", children: "Delete filter" })
6324
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "text-sm font-regular leading-sm text-[var(--color-destructive)]", children: "Delete filter" })
6169
6325
  ]
6170
6326
  }
6171
6327
  )
@@ -6179,7 +6335,7 @@ KebabMenu.displayName = "KebabMenu";
6179
6335
  var React42 = __toESM(require("react"));
6180
6336
  var PopoverPrimitive7 = __toESM(require("@radix-ui/react-popover"));
6181
6337
  var import_icons29 = require("@l3mpire/icons");
6182
- var import_jsx_runtime45 = require("react/jsx-runtime");
6338
+ var import_jsx_runtime50 = require("react/jsx-runtime");
6183
6339
  var FilterEditor = ({
6184
6340
  propertyDef,
6185
6341
  condition,
@@ -6224,9 +6380,9 @@ var FilterEditor = ({
6224
6380
  onOpenChange?.(false);
6225
6381
  onClose();
6226
6382
  };
6227
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(PopoverPrimitive7.Root, { open, onOpenChange, children: [
6228
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(PopoverPrimitive7.Trigger, { asChild: true, children }),
6229
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(PopoverPrimitive7.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
6383
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(PopoverPrimitive7.Root, { open, onOpenChange, children: [
6384
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(PopoverPrimitive7.Trigger, { asChild: true, children }),
6385
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(PopoverPrimitive7.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
6230
6386
  PopoverPrimitive7.Content,
6231
6387
  {
6232
6388
  sideOffset: 4,
@@ -6240,8 +6396,8 @@ var FilterEditor = ({
6240
6396
  "min-w-[240px]"
6241
6397
  ),
6242
6398
  children: [
6243
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex items-center gap-base px-base pt-base pb-xs border-b border-[var(--color-border)]", children: [
6244
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
6399
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex items-center gap-base px-base pt-base pb-xs border-b border-[var(--color-border)]", children: [
6400
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
6245
6401
  import_icons29.Icon,
6246
6402
  {
6247
6403
  icon: propertyDef.icon,
@@ -6249,8 +6405,8 @@ var FilterEditor = ({
6249
6405
  className: "shrink-0 text-[var(--color-dropdown-item-icon)]"
6250
6406
  }
6251
6407
  ),
6252
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "text-sm font-semibold leading-sm text-[var(--color-foreground)]", children: propertyDef.label }),
6253
- localOperator && view === "value" && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
6408
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "text-sm font-semibold leading-sm text-[var(--color-foreground)]", children: propertyDef.label }),
6409
+ localOperator && view === "value" && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
6254
6410
  "button",
6255
6411
  {
6256
6412
  type: "button",
@@ -6263,14 +6419,14 @@ var FilterEditor = ({
6263
6419
  }
6264
6420
  )
6265
6421
  ] }),
6266
- view === "operator" ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "p-xs", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
6422
+ view === "operator" ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "p-xs", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
6267
6423
  OperatorList,
6268
6424
  {
6269
6425
  dataType: propertyDef.type,
6270
6426
  activeOperator: localOperator,
6271
6427
  onSelect: handleOperatorSelect
6272
6428
  }
6273
- ) }) : localOperator && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
6429
+ ) }) : localOperator && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
6274
6430
  ValueInput,
6275
6431
  {
6276
6432
  dataType: propertyDef.type,
@@ -6291,7 +6447,7 @@ FilterEditor.displayName = "FilterEditor";
6291
6447
  // src/components/ui/filter/interactive-filter-chip.tsx
6292
6448
  var React43 = __toESM(require("react"));
6293
6449
  var PopoverPrimitive8 = __toESM(require("@radix-ui/react-popover"));
6294
- var import_jsx_runtime46 = require("react/jsx-runtime");
6450
+ var import_jsx_runtime51 = require("react/jsx-runtime");
6295
6451
  function formatFilterValue(value) {
6296
6452
  if (value == null) return void 0;
6297
6453
  if (typeof value === "boolean") return value ? "Yes" : "No";
@@ -6324,9 +6480,9 @@ var SegmentPopover = ({
6324
6480
  children,
6325
6481
  align = "start",
6326
6482
  minWidth = "240px"
6327
- }) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(PopoverPrimitive8.Root, { open, onOpenChange, children: [
6328
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(PopoverPrimitive8.Trigger, { asChild: true, children: trigger }),
6329
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(PopoverPrimitive8.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
6483
+ }) => /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(PopoverPrimitive8.Root, { open, onOpenChange, children: [
6484
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(PopoverPrimitive8.Trigger, { asChild: true, children: trigger }),
6485
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(PopoverPrimitive8.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
6330
6486
  PopoverPrimitive8.Content,
6331
6487
  {
6332
6488
  sideOffset: 4,
@@ -6359,12 +6515,20 @@ var InteractiveFilterChip = ({
6359
6515
  const [valueOpen, setValueOpen] = React43.useState(false);
6360
6516
  const [propertyOpen, setPropertyOpen] = React43.useState(false);
6361
6517
  const [kebabOpen, setKebabOpen] = React43.useState(false);
6518
+ const [pendingValueOpen, setPendingValueOpen] = React43.useState(false);
6519
+ const autoOpenHandled = React43.useRef(false);
6362
6520
  React43.useEffect(() => {
6363
- if (autoOpen && condition.operator && !isNoValueOperator(condition.operator)) {
6364
- const t = setTimeout(() => setValueOpen(true), 50);
6365
- return () => clearTimeout(t);
6521
+ if (autoOpen && !autoOpenHandled.current && condition.operator && !isNoValueOperator(condition.operator)) {
6522
+ autoOpenHandled.current = true;
6523
+ setValueOpen(true);
6366
6524
  }
6367
- }, []);
6525
+ }, [autoOpen, condition.operator]);
6526
+ React43.useEffect(() => {
6527
+ if (!operatorOpen && pendingValueOpen) {
6528
+ setPendingValueOpen(false);
6529
+ setValueOpen(true);
6530
+ }
6531
+ }, [operatorOpen, pendingValueOpen]);
6368
6532
  const handleOperatorSelect = (op) => {
6369
6533
  if (isNoValueOperator(op)) {
6370
6534
  onUpdate({ ...condition, operator: op, value: null });
@@ -6374,7 +6538,7 @@ var InteractiveFilterChip = ({
6374
6538
  onUpdate({ ...condition, operator: op, value: resetValue });
6375
6539
  setOperatorOpen(false);
6376
6540
  if (resetValue == null) {
6377
- setTimeout(() => setValueOpen(true), 100);
6541
+ setPendingValueOpen(true);
6378
6542
  }
6379
6543
  }
6380
6544
  };
@@ -6388,7 +6552,7 @@ var InteractiveFilterChip = ({
6388
6552
  const displayValue = formatFilterValue(condition.value);
6389
6553
  const hasValue = hasOperator && displayValue != null;
6390
6554
  const badgeCount = getBadgeCount(condition.value);
6391
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
6555
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
6392
6556
  "div",
6393
6557
  {
6394
6558
  className: cn(
@@ -6397,7 +6561,7 @@ var InteractiveFilterChip = ({
6397
6561
  className
6398
6562
  ),
6399
6563
  children: [
6400
- properties ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
6564
+ properties ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
6401
6565
  PropertySelector,
6402
6566
  {
6403
6567
  properties,
@@ -6407,7 +6571,7 @@ var InteractiveFilterChip = ({
6407
6571
  },
6408
6572
  open: propertyOpen,
6409
6573
  onOpenChange: setPropertyOpen,
6410
- children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
6574
+ children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
6411
6575
  FilterChipSegment,
6412
6576
  {
6413
6577
  segmentType: "property",
@@ -6418,7 +6582,7 @@ var InteractiveFilterChip = ({
6418
6582
  }
6419
6583
  ) })
6420
6584
  }
6421
- ) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
6585
+ ) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
6422
6586
  FilterChipSegment,
6423
6587
  {
6424
6588
  segmentType: "property",
@@ -6427,13 +6591,13 @@ var InteractiveFilterChip = ({
6427
6591
  label: propertyDef.label
6428
6592
  }
6429
6593
  ),
6430
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
6594
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
6431
6595
  SegmentPopover,
6432
6596
  {
6433
6597
  open: operatorOpen,
6434
6598
  onOpenChange: setOperatorOpen,
6435
6599
  minWidth: "180px",
6436
- trigger: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
6600
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
6437
6601
  FilterChipSegment,
6438
6602
  {
6439
6603
  segmentType: hasOperator ? "operator" : "placeholder",
@@ -6442,7 +6606,7 @@ var InteractiveFilterChip = ({
6442
6606
  onClick: () => setOperatorOpen(true)
6443
6607
  }
6444
6608
  ) }),
6445
- children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "p-xs", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
6609
+ children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "p-xs", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
6446
6610
  OperatorList,
6447
6611
  {
6448
6612
  dataType: propertyDef.type,
@@ -6452,13 +6616,13 @@ var InteractiveFilterChip = ({
6452
6616
  ) })
6453
6617
  }
6454
6618
  ),
6455
- hasOperator && condition.operator && !isNoValueOperator(condition.operator) && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
6619
+ hasOperator && condition.operator && !isNoValueOperator(condition.operator) && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
6456
6620
  SegmentPopover,
6457
6621
  {
6458
6622
  open: valueOpen,
6459
6623
  onOpenChange: setValueOpen,
6460
6624
  minWidth: "240px",
6461
- trigger: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
6625
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
6462
6626
  FilterChipSegment,
6463
6627
  {
6464
6628
  segmentType: hasValue ? "value" : "placeholder",
@@ -6468,7 +6632,7 @@ var InteractiveFilterChip = ({
6468
6632
  onClick: () => setValueOpen(true)
6469
6633
  }
6470
6634
  ) }),
6471
- children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
6635
+ children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
6472
6636
  ValueInput,
6473
6637
  {
6474
6638
  dataType: propertyDef.type,
@@ -6481,7 +6645,7 @@ var InteractiveFilterChip = ({
6481
6645
  )
6482
6646
  }
6483
6647
  ),
6484
- hasOperator && condition.operator && isNoValueOperator(condition.operator) && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
6648
+ hasOperator && condition.operator && isNoValueOperator(condition.operator) && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
6485
6649
  FilterChipSegment,
6486
6650
  {
6487
6651
  segmentType: "value",
@@ -6489,14 +6653,14 @@ var InteractiveFilterChip = ({
6489
6653
  label: condition.operator
6490
6654
  }
6491
6655
  ),
6492
- hasOperator && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
6656
+ hasOperator && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
6493
6657
  KebabMenu,
6494
6658
  {
6495
6659
  open: kebabOpen,
6496
6660
  onOpenChange: setKebabOpen,
6497
6661
  onConvertToAdvanced,
6498
6662
  onDelete,
6499
- children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
6663
+ children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
6500
6664
  FilterChipSegment,
6501
6665
  {
6502
6666
  segmentType: "button",
@@ -6521,7 +6685,7 @@ var import_icons34 = require("@l3mpire/icons");
6521
6685
  // src/components/ui/filter/advanced-chip.tsx
6522
6686
  var React44 = __toESM(require("react"));
6523
6687
  var import_icons30 = require("@l3mpire/icons");
6524
- var import_jsx_runtime47 = require("react/jsx-runtime");
6688
+ var import_jsx_runtime52 = require("react/jsx-runtime");
6525
6689
  var btnBase = [
6526
6690
  "flex items-center justify-center",
6527
6691
  "min-h-[32px] max-h-[32px]",
@@ -6531,8 +6695,8 @@ var btnBase = [
6531
6695
  "hover:from-[var(--color-btn-outlined-neutral-bg-hover)] hover:to-[var(--color-btn-outlined-neutral-bg-gradient-to-hover)]"
6532
6696
  ];
6533
6697
  var AdvancedChip = React44.forwardRef(
6534
- ({ className, count, onClear, onClick, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: cn("inline-flex items-center", className), children: [
6535
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
6698
+ ({ className, count, onClear, onClick, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: cn("inline-flex items-center", className), children: [
6699
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
6536
6700
  "button",
6537
6701
  {
6538
6702
  ref,
@@ -6545,12 +6709,12 @@ var AdvancedChip = React44.forwardRef(
6545
6709
  ),
6546
6710
  ...props,
6547
6711
  children: [
6548
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "text-sm font-semibold leading-sm whitespace-nowrap text-[var(--color-foreground)]", children: "Advanced filters" }),
6549
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "flex items-center p-2xs rounded-xs bg-filter-chip-badge-bg", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "text-[10px] font-semibold leading-2xs text-filter-chip-badge-text", children: count }) })
6712
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "text-sm font-semibold leading-sm whitespace-nowrap text-[var(--color-foreground)]", children: "Advanced filters" }),
6713
+ count > 0 && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "flex items-center p-2xs rounded-xs bg-filter-chip-badge-bg", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "text-[10px] font-semibold leading-2xs text-filter-chip-badge-text", children: count }) })
6550
6714
  ]
6551
6715
  }
6552
6716
  ),
6553
- onClear && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
6717
+ onClear && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
6554
6718
  "button",
6555
6719
  {
6556
6720
  type: "button",
@@ -6564,7 +6728,7 @@ var AdvancedChip = React44.forwardRef(
6564
6728
  "rounded-r-md -ml-px"
6565
6729
  ),
6566
6730
  "aria-label": "Clear all advanced filters",
6567
- children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_icons30.Icon, { icon: import_icons30.faXmarkOutline, size: "sm", className: "text-[var(--color-foreground)]" })
6731
+ children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_icons30.Icon, { icon: import_icons30.faXmarkOutline, size: "sm", className: "text-[var(--color-foreground)]" })
6568
6732
  }
6569
6733
  )
6570
6734
  ] })
@@ -6580,7 +6744,7 @@ var import_icons32 = require("@l3mpire/icons");
6580
6744
  var React45 = __toESM(require("react"));
6581
6745
  var PopoverPrimitive9 = __toESM(require("@radix-ui/react-popover"));
6582
6746
  var import_icons31 = require("@l3mpire/icons");
6583
- var import_jsx_runtime48 = require("react/jsx-runtime");
6747
+ var import_jsx_runtime53 = require("react/jsx-runtime");
6584
6748
  var selectBtnStyle = [
6585
6749
  "flex items-center gap-base",
6586
6750
  "px-base py-sm",
@@ -6614,8 +6778,8 @@ var AdvancedRow = ({
6614
6778
  onUpdate({ ...condition, value: val });
6615
6779
  };
6616
6780
  const displayValue = condition.value == null ? "" : typeof condition.value === "string" ? condition.value : String(condition.value);
6617
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center gap-base w-full min-w-0", children: [
6618
- connector === "Where" ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "shrink-0 w-[64px] flex items-center justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "text-xs font-semibold leading-xs text-[var(--color-muted-foreground)]", children: "Where" }) }) : /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
6781
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex items-center gap-base w-full min-w-0", children: [
6782
+ connector === "Where" ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "shrink-0 w-[64px] flex items-center justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "text-xs font-semibold leading-xs text-[var(--color-muted-foreground)]", children: "Where" }) }) : /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
6619
6783
  "button",
6620
6784
  {
6621
6785
  type: "button",
@@ -6630,21 +6794,21 @@ var AdvancedRow = ({
6630
6794
  ),
6631
6795
  children: [
6632
6796
  connector,
6633
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_icons31.Icon, { icon: import_icons31.faRefreshOutline, size: "xs", className: "text-[var(--color-foreground)]" })
6797
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_icons31.Icon, { icon: import_icons31.faRefreshOutline, size: "xs", className: "text-[var(--color-foreground)]" })
6634
6798
  ]
6635
6799
  }
6636
6800
  ),
6637
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(PopoverPrimitive9.Root, { open: propertyOpen, onOpenChange: setPropertyOpen, children: [
6638
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(PopoverPrimitive9.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("button", { type: "button", className: cn(selectBtnStyle, "min-w-0"), children: [
6639
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_icons31.Icon, { icon: propertyDef.icon, size: "sm", className: "shrink-0 text-[var(--color-muted-foreground)]" }),
6640
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("span", { className: "text-sm font-regular leading-sm text-[var(--color-foreground)] whitespace-nowrap truncate", children: [
6801
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(PopoverPrimitive9.Root, { open: propertyOpen, onOpenChange: setPropertyOpen, children: [
6802
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(PopoverPrimitive9.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("button", { type: "button", className: cn(selectBtnStyle, "min-w-0"), children: [
6803
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_icons31.Icon, { icon: propertyDef.icon, size: "sm", className: "shrink-0 text-[var(--color-muted-foreground)]" }),
6804
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("span", { className: "text-sm font-regular leading-sm text-[var(--color-foreground)] whitespace-nowrap truncate", children: [
6641
6805
  propertyDef.groupLabel,
6642
6806
  " > ",
6643
6807
  propertyDef.label
6644
6808
  ] }),
6645
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_icons31.Icon, { icon: import_icons31.faChevronDownOutline, size: "xs", className: "shrink-0 text-[var(--color-foreground)]" })
6809
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_icons31.Icon, { icon: import_icons31.faChevronDownOutline, size: "xs", className: "shrink-0 text-[var(--color-foreground)]" })
6646
6810
  ] }) }),
6647
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(PopoverPrimitive9.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6811
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(PopoverPrimitive9.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
6648
6812
  PopoverPrimitive9.Content,
6649
6813
  {
6650
6814
  sideOffset: 4,
@@ -6656,7 +6820,7 @@ var AdvancedRow = ({
6656
6820
  "data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
6657
6821
  "min-w-[200px]"
6658
6822
  ),
6659
- children: properties.map((p) => /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
6823
+ children: properties.map((p) => /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
6660
6824
  "button",
6661
6825
  {
6662
6826
  type: "button",
@@ -6670,8 +6834,8 @@ var AdvancedRow = ({
6670
6834
  p.id === condition.propertyId && "bg-[var(--color-dropdown-item-hover)]"
6671
6835
  ),
6672
6836
  children: [
6673
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_icons31.Icon, { icon: p.icon, size: "sm", className: "shrink-0 text-[var(--color-dropdown-item-icon)]" }),
6674
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "text-sm font-regular leading-sm text-[var(--color-dropdown-item-text)] truncate", children: p.label })
6837
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_icons31.Icon, { icon: p.icon, size: "sm", className: "shrink-0 text-[var(--color-dropdown-item-icon)]" }),
6838
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "text-sm font-regular leading-sm text-[var(--color-dropdown-item-text)] truncate", children: p.label })
6675
6839
  ]
6676
6840
  },
6677
6841
  p.id
@@ -6679,12 +6843,12 @@ var AdvancedRow = ({
6679
6843
  }
6680
6844
  ) })
6681
6845
  ] }),
6682
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(PopoverPrimitive9.Root, { open: operatorOpen, onOpenChange: setOperatorOpen, children: [
6683
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(PopoverPrimitive9.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("button", { type: "button", className: cn(selectBtnStyle, "min-w-0"), children: [
6684
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "text-sm font-regular leading-sm text-[var(--color-foreground)] whitespace-nowrap truncate text-left", children: condition.operator ?? "Select" }),
6685
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_icons31.Icon, { icon: import_icons31.faChevronDownOutline, size: "xs", className: "shrink-0 text-[var(--color-foreground)]" })
6846
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(PopoverPrimitive9.Root, { open: operatorOpen, onOpenChange: setOperatorOpen, children: [
6847
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(PopoverPrimitive9.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("button", { type: "button", className: cn(selectBtnStyle, "min-w-0"), children: [
6848
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "text-sm font-regular leading-sm text-[var(--color-foreground)] whitespace-nowrap truncate text-left", children: condition.operator ?? "Select" }),
6849
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_icons31.Icon, { icon: import_icons31.faChevronDownOutline, size: "xs", className: "shrink-0 text-[var(--color-foreground)]" })
6686
6850
  ] }) }),
6687
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(PopoverPrimitive9.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6851
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(PopoverPrimitive9.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
6688
6852
  PopoverPrimitive9.Content,
6689
6853
  {
6690
6854
  sideOffset: 4,
@@ -6696,7 +6860,7 @@ var AdvancedRow = ({
6696
6860
  "data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
6697
6861
  "min-w-[160px]"
6698
6862
  ),
6699
- children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6863
+ children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
6700
6864
  OperatorList,
6701
6865
  {
6702
6866
  dataType: propertyDef.type,
@@ -6707,7 +6871,7 @@ var AdvancedRow = ({
6707
6871
  }
6708
6872
  ) })
6709
6873
  ] }),
6710
- condition.operator && !isNoValueOperator(condition.operator) && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6874
+ condition.operator && !isNoValueOperator(condition.operator) && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
6711
6875
  "input",
6712
6876
  {
6713
6877
  type: "text",
@@ -6723,14 +6887,14 @@ var AdvancedRow = ({
6723
6887
  )
6724
6888
  }
6725
6889
  ),
6726
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
6890
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
6727
6891
  "button",
6728
6892
  {
6729
6893
  type: "button",
6730
6894
  onClick: onDelete,
6731
6895
  className: "ml-auto shrink-0 flex items-center justify-center p-sm rounded-md cursor-pointer transition-colors hover:bg-[var(--color-accent)]",
6732
6896
  "aria-label": "Remove filter",
6733
- children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_icons31.Icon, { icon: import_icons31.faXmarkOutline, size: "sm", className: "text-[var(--color-foreground)]" })
6897
+ children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_icons31.Icon, { icon: import_icons31.faXmarkOutline, size: "sm", className: "text-[var(--color-foreground)]" })
6734
6898
  }
6735
6899
  )
6736
6900
  ] });
@@ -6738,7 +6902,7 @@ var AdvancedRow = ({
6738
6902
  AdvancedRow.displayName = "AdvancedRow";
6739
6903
 
6740
6904
  // src/components/ui/filter/advanced-popover.tsx
6741
- var import_jsx_runtime49 = require("react/jsx-runtime");
6905
+ var import_jsx_runtime54 = require("react/jsx-runtime");
6742
6906
  var outlinedBtn = [
6743
6907
  "flex items-center gap-sm px-base py-sm",
6744
6908
  "min-h-[32px] max-h-[32px] min-w-[80px]",
@@ -6756,7 +6920,7 @@ var AdvancedPopover = ({
6756
6920
  children
6757
6921
  }) => {
6758
6922
  const [addSelectorOpen, setAddSelectorOpen] = React46.useState(false);
6759
- const [logicOps, setLogicOps] = React46.useState({});
6923
+ const [draftPickerOpen, setDraftPickerOpen] = React46.useState(false);
6760
6924
  const getPropertyDef = (propertyId) => properties.find((p) => p.id === propertyId);
6761
6925
  const handleUpdateFilter = (updated) => {
6762
6926
  onFiltersChange(filters.map((f) => f.id === updated.id ? updated : f));
@@ -6780,19 +6944,21 @@ var AdvancedPopover = ({
6780
6944
  onOpenChange?.(false);
6781
6945
  };
6782
6946
  const toggleLogicOp = (filterId) => {
6783
- setLogicOps((prev) => ({
6784
- ...prev,
6785
- [filterId]: (prev[filterId] ?? "and") === "and" ? "or" : "and"
6786
- }));
6947
+ onFiltersChange(
6948
+ filters.map(
6949
+ (f) => f.id === filterId ? { ...f, logicOperator: (f.logicOperator ?? "and") === "and" ? "or" : "and" } : f
6950
+ )
6951
+ );
6787
6952
  };
6788
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(PopoverPrimitive10.Root, { open, onOpenChange, children: [
6789
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PopoverPrimitive10.Trigger, { asChild: true, children }),
6790
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PopoverPrimitive10.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
6953
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(PopoverPrimitive10.Root, { open, onOpenChange, children: [
6954
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(PopoverPrimitive10.Trigger, { asChild: true, children }),
6955
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(PopoverPrimitive10.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
6791
6956
  PopoverPrimitive10.Content,
6792
6957
  {
6793
6958
  sideOffset: 4,
6794
6959
  align: "start",
6795
6960
  collisionPadding: 16,
6961
+ onOpenAutoFocus: (e) => e.preventDefault(),
6796
6962
  className: cn(
6797
6963
  "z-50 flex flex-col",
6798
6964
  "bg-[var(--color-background)] rounded-md shadow-lg",
@@ -6802,14 +6968,14 @@ var AdvancedPopover = ({
6802
6968
  "w-[min(520px,calc(100vw-32px))]"
6803
6969
  ),
6804
6970
  children: [
6805
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-col gap-base p-base", children: [
6971
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex flex-col gap-base p-base", children: [
6806
6972
  filters.map((filter, i) => {
6807
6973
  const propDef = getPropertyDef(filter.propertyId);
6808
6974
  if (!propDef) return null;
6809
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
6975
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
6810
6976
  AdvancedRow,
6811
6977
  {
6812
- connector: i === 0 ? "Where" : (logicOps[filter.id] ?? "and") === "and" ? "And" : "Or",
6978
+ connector: i === 0 ? "Where" : (filter.logicOperator ?? "and") === "and" ? "And" : "Or",
6813
6979
  onConnectorToggle: i > 0 ? () => toggleLogicOp(filter.id) : void 0,
6814
6980
  propertyDef: propDef,
6815
6981
  condition: filter,
@@ -6821,23 +6987,59 @@ var AdvancedPopover = ({
6821
6987
  filter.id
6822
6988
  );
6823
6989
  }),
6824
- filters.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "py-base text-sm text-[var(--color-muted-foreground)]", children: "No advanced filters yet." })
6990
+ filters.length === 0 && /* ── Draft row: inline "Select property" placeholder ──── */
6991
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex items-center gap-base w-full min-w-0", children: [
6992
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "shrink-0 w-[64px] flex items-center justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "text-xs font-semibold leading-xs text-[var(--color-muted-foreground)]", children: "Where" }) }),
6993
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
6994
+ PropertySelector,
6995
+ {
6996
+ properties,
6997
+ onSelect: handleAddFilter,
6998
+ open: draftPickerOpen,
6999
+ onOpenChange: setDraftPickerOpen,
7000
+ children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
7001
+ "button",
7002
+ {
7003
+ type: "button",
7004
+ className: cn(
7005
+ "flex items-center gap-base px-base py-sm min-w-0",
7006
+ "bg-gradient-to-t from-[var(--color-btn-outlined-neutral-bg-default)] to-[var(--color-btn-outlined-neutral-bg-gradient-to-default)]",
7007
+ "border border-[var(--color-btn-outlined-neutral-border-default)] rounded-md shadow-sm",
7008
+ "cursor-pointer transition-colors",
7009
+ "hover:from-[var(--color-btn-outlined-neutral-bg-hover)] hover:to-[var(--color-btn-outlined-neutral-bg-gradient-to-hover)]"
7010
+ ),
7011
+ children: [
7012
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "text-sm font-regular leading-sm text-[var(--color-muted-foreground)] whitespace-nowrap", children: "Select property" }),
7013
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
7014
+ import_icons32.Icon,
7015
+ {
7016
+ icon: import_icons32.faChevronDownOutline,
7017
+ size: "xs",
7018
+ className: "shrink-0 text-[var(--color-foreground)]"
7019
+ }
7020
+ )
7021
+ ]
7022
+ }
7023
+ )
7024
+ }
7025
+ )
7026
+ ] })
6825
7027
  ] }),
6826
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center justify-between p-base border-t border-[var(--color-border)]", children: [
6827
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
7028
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex items-center justify-between p-base border-t border-[var(--color-border)]", children: [
7029
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
6828
7030
  PropertySelector,
6829
7031
  {
6830
7032
  properties,
6831
7033
  onSelect: handleAddFilter,
6832
7034
  open: addSelectorOpen,
6833
7035
  onOpenChange: setAddSelectorOpen,
6834
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("button", { type: "button", className: cn(outlinedBtn), children: [
6835
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_icons32.Icon, { icon: import_icons32.faPlusOutline, size: "sm", className: "text-[var(--color-foreground)]" }),
7036
+ children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("button", { type: "button", className: cn(outlinedBtn), children: [
7037
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_icons32.Icon, { icon: import_icons32.faPlusOutline, size: "sm", className: "text-[var(--color-foreground)]" }),
6836
7038
  "Add filter"
6837
7039
  ] })
6838
7040
  }
6839
7041
  ),
6840
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
7042
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
6841
7043
  "button",
6842
7044
  {
6843
7045
  type: "button",
@@ -6858,7 +7060,7 @@ AdvancedPopover.displayName = "AdvancedPopover";
6858
7060
  var React47 = __toESM(require("react"));
6859
7061
  var PopoverPrimitive11 = __toESM(require("@radix-ui/react-popover"));
6860
7062
  var import_icons33 = require("@l3mpire/icons");
6861
- var import_jsx_runtime50 = require("react/jsx-runtime");
7063
+ var import_jsx_runtime55 = require("react/jsx-runtime");
6862
7064
  var SummaryChip = ({
6863
7065
  count,
6864
7066
  filters,
@@ -6866,11 +7068,19 @@ var SummaryChip = ({
6866
7068
  onFiltersChange,
6867
7069
  onClearAll,
6868
7070
  children,
6869
- className
7071
+ className,
7072
+ open: openProp,
7073
+ onOpenChange
6870
7074
  }) => {
6871
- const [open, setOpen] = React47.useState(false);
7075
+ const [uncontrolledOpen, setUncontrolledOpen] = React47.useState(false);
7076
+ const isControlled = openProp !== void 0;
7077
+ const open = isControlled ? openProp : uncontrolledOpen;
7078
+ const setOpen = (v) => {
7079
+ if (!isControlled) setUncontrolledOpen(v);
7080
+ onOpenChange?.(v);
7081
+ };
6872
7082
  const [addSelectorOpen, setAddSelectorOpen] = React47.useState(false);
6873
- const [logicOps, setLogicOps] = React47.useState({});
7083
+ const [draftPickerOpen, setDraftPickerOpen] = React47.useState(false);
6874
7084
  const getPropertyDef = (propertyId) => properties.find((p) => p.id === propertyId);
6875
7085
  const handleUpdateFilter = (updated) => {
6876
7086
  onFiltersChange(filters.map((f) => f.id === updated.id ? updated : f));
@@ -6891,8 +7101,15 @@ var SummaryChip = ({
6891
7101
  onFiltersChange([...filters, newFilter]);
6892
7102
  setAddSelectorOpen(false);
6893
7103
  };
6894
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(PopoverPrimitive11.Root, { open, onOpenChange: setOpen, children: [
6895
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(PopoverPrimitive11.Trigger, { asChild: true, children: children ?? /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
7104
+ const toggleLogicOp = (filterId) => {
7105
+ onFiltersChange(
7106
+ filters.map(
7107
+ (f) => f.id === filterId ? { ...f, logicOperator: (f.logicOperator ?? "and") === "and" ? "or" : "and" } : f
7108
+ )
7109
+ );
7110
+ };
7111
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(PopoverPrimitive11.Root, { open, onOpenChange: setOpen, children: [
7112
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(PopoverPrimitive11.Trigger, { asChild: true, children: children ?? /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
6896
7113
  "button",
6897
7114
  {
6898
7115
  type: "button",
@@ -6906,7 +7123,7 @@ var SummaryChip = ({
6906
7123
  className
6907
7124
  ),
6908
7125
  children: [
6909
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
7126
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
6910
7127
  import_icons33.Icon,
6911
7128
  {
6912
7129
  icon: import_icons33.faSlidersOutline,
@@ -6914,17 +7131,18 @@ var SummaryChip = ({
6914
7131
  className: "shrink-0 text-[var(--color-foreground)]"
6915
7132
  }
6916
7133
  ),
6917
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "text-sm font-semibold leading-sm whitespace-nowrap text-[var(--color-foreground)]", children: "Filters" }),
6918
- count > 0 && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "flex items-center p-2xs rounded-xs bg-filter-chip-badge-bg", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "text-[10px] font-semibold leading-2xs text-filter-chip-badge-text", children: count }) })
7134
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "text-sm font-semibold leading-sm whitespace-nowrap text-[var(--color-foreground)]", children: "Filters" }),
7135
+ count > 0 && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "flex items-center p-2xs rounded-xs bg-filter-chip-badge-bg", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "text-[10px] font-semibold leading-2xs text-filter-chip-badge-text", children: count }) })
6919
7136
  ]
6920
7137
  }
6921
7138
  ) }),
6922
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(PopoverPrimitive11.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
7139
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(PopoverPrimitive11.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
6923
7140
  PopoverPrimitive11.Content,
6924
7141
  {
6925
7142
  sideOffset: 4,
6926
7143
  align: "start",
6927
7144
  collisionPadding: 16,
7145
+ onOpenAutoFocus: (e) => e.preventDefault(),
6928
7146
  className: cn(
6929
7147
  "z-50 flex flex-col overflow-clip",
6930
7148
  "bg-[var(--color-dropdown-bg)] border border-[var(--color-dropdown-border)] rounded-md shadow-lg",
@@ -6934,15 +7152,15 @@ var SummaryChip = ({
6934
7152
  "w-[min(520px,calc(100vw-32px))]"
6935
7153
  ),
6936
7154
  children: [
6937
- /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex flex-col gap-base p-base", children: [
7155
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex flex-col gap-base p-base", children: [
6938
7156
  filters.map((filter, i) => {
6939
7157
  const propDef = getPropertyDef(filter.propertyId);
6940
7158
  if (!propDef) return null;
6941
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
7159
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
6942
7160
  AdvancedRow,
6943
7161
  {
6944
- connector: i === 0 ? "Where" : (logicOps[filter.id] ?? "and") === "and" ? "And" : "Or",
6945
- onConnectorToggle: i > 0 ? () => setLogicOps((prev) => ({ ...prev, [filter.id]: (prev[filter.id] ?? "and") === "and" ? "or" : "and" })) : void 0,
7162
+ connector: i === 0 ? "Where" : (filter.logicOperator ?? "and") === "and" ? "And" : "Or",
7163
+ onConnectorToggle: i > 0 ? () => toggleLogicOp(filter.id) : void 0,
6946
7164
  propertyDef: propDef,
6947
7165
  condition: filter,
6948
7166
  properties,
@@ -6953,17 +7171,53 @@ var SummaryChip = ({
6953
7171
  filter.id
6954
7172
  );
6955
7173
  }),
6956
- filters.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: "py-base text-sm text-[var(--color-muted-foreground)]", children: "No active filters." })
7174
+ filters.length === 0 && /* ── Draft row: inline "Select property" placeholder ──── */
7175
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex items-center gap-base w-full min-w-0", children: [
7176
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "shrink-0 w-[64px] flex items-center justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "text-xs font-semibold leading-xs text-[var(--color-muted-foreground)]", children: "Where" }) }),
7177
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
7178
+ PropertySelector,
7179
+ {
7180
+ properties,
7181
+ onSelect: handleAddFilter,
7182
+ open: draftPickerOpen,
7183
+ onOpenChange: setDraftPickerOpen,
7184
+ children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
7185
+ "button",
7186
+ {
7187
+ type: "button",
7188
+ className: cn(
7189
+ "flex items-center gap-base px-base py-sm min-w-0",
7190
+ "bg-gradient-to-t from-[var(--color-btn-outlined-neutral-bg-default)] to-[var(--color-btn-outlined-neutral-bg-gradient-to-default)]",
7191
+ "border border-[var(--color-btn-outlined-neutral-border-default)] rounded-md shadow-sm",
7192
+ "cursor-pointer transition-colors",
7193
+ "hover:from-[var(--color-btn-outlined-neutral-bg-hover)] hover:to-[var(--color-btn-outlined-neutral-bg-gradient-to-hover)]"
7194
+ ),
7195
+ children: [
7196
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "text-sm font-regular leading-sm text-[var(--color-muted-foreground)] whitespace-nowrap", children: "Select property" }),
7197
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
7198
+ import_icons33.Icon,
7199
+ {
7200
+ icon: import_icons33.faChevronDownOutline,
7201
+ size: "xs",
7202
+ className: "shrink-0 text-[var(--color-foreground)]"
7203
+ }
7204
+ )
7205
+ ]
7206
+ }
7207
+ )
7208
+ }
7209
+ )
7210
+ ] })
6957
7211
  ] }),
6958
- /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex items-center justify-between p-base border-t border-[var(--color-border)]", children: [
6959
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
7212
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex items-center justify-between p-base border-t border-[var(--color-border)]", children: [
7213
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
6960
7214
  PropertySelector,
6961
7215
  {
6962
7216
  properties,
6963
7217
  onSelect: handleAddFilter,
6964
7218
  open: addSelectorOpen,
6965
7219
  onOpenChange: setAddSelectorOpen,
6966
- children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
7220
+ children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
6967
7221
  "button",
6968
7222
  {
6969
7223
  type: "button",
@@ -6976,14 +7230,14 @@ var SummaryChip = ({
6976
7230
  "hover:from-[var(--color-btn-outlined-neutral-bg-hover)] hover:to-[var(--color-btn-outlined-neutral-bg-gradient-to-hover)]"
6977
7231
  ),
6978
7232
  children: [
6979
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_icons33.Icon, { icon: import_icons33.faPlusOutline, size: "sm", className: "text-[var(--color-foreground)]" }),
7233
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_icons33.Icon, { icon: import_icons33.faPlusOutline, size: "sm", className: "text-[var(--color-foreground)]" }),
6980
7234
  "Add filter"
6981
7235
  ]
6982
7236
  }
6983
7237
  )
6984
7238
  }
6985
7239
  ),
6986
- filters.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
7240
+ filters.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
6987
7241
  "button",
6988
7242
  {
6989
7243
  type: "button",
@@ -7005,7 +7259,8 @@ SummaryChip.displayName = "SummaryChip";
7005
7259
 
7006
7260
  // src/components/ui/filter/use-filter-bar-mode.ts
7007
7261
  var React48 = __toESM(require("react"));
7008
- function useFilterBarMode(ref, override) {
7262
+ var DEFAULT_BREAKPOINT = 600;
7263
+ function useFilterBarMode(ref, override, breakpoint = DEFAULT_BREAKPOINT) {
7009
7264
  const [mode, setMode] = React48.useState("default");
7010
7265
  React48.useEffect(() => {
7011
7266
  if (override) return;
@@ -7013,30 +7268,32 @@ function useFilterBarMode(ref, override) {
7013
7268
  if (!el) return;
7014
7269
  const observer = new ResizeObserver((entries) => {
7015
7270
  const width = entries[0]?.contentRect.width ?? 0;
7016
- setMode(width > 600 ? "default" : "minimal");
7271
+ setMode(width > breakpoint ? "default" : "minimal");
7017
7272
  });
7018
7273
  observer.observe(el);
7019
7274
  return () => observer.disconnect();
7020
- }, [ref, override]);
7275
+ }, [ref, override, breakpoint]);
7021
7276
  return override ?? mode;
7022
7277
  }
7023
7278
 
7024
7279
  // src/components/ui/filter/filter-system.tsx
7025
- var import_jsx_runtime51 = require("react/jsx-runtime");
7280
+ var import_jsx_runtime56 = require("react/jsx-runtime");
7026
7281
  var FilterSystem = ({
7027
7282
  properties,
7028
7283
  filterState,
7029
7284
  onFilterStateChange,
7030
7285
  sortFields,
7031
7286
  mode: modeOverride,
7287
+ breakpoint,
7032
7288
  children,
7033
7289
  actions,
7034
7290
  className
7035
7291
  }) => {
7036
7292
  const containerRef = React49.useRef(null);
7037
- const mode = useFilterBarMode(containerRef, modeOverride);
7293
+ const mode = useFilterBarMode(containerRef, modeOverride, breakpoint);
7038
7294
  const [propertySelectorOpen, setPropertySelectorOpen] = React49.useState(false);
7039
7295
  const [advancedOpen, setAdvancedOpen] = React49.useState(false);
7296
+ const [summaryOpen, setSummaryOpen] = React49.useState(false);
7040
7297
  const [pendingFilterId, setPendingFilterId] = React49.useState(null);
7041
7298
  const allFilters = [...filterState.basicFilters, ...filterState.advancedFilters];
7042
7299
  const totalCount = allFilters.length;
@@ -7112,10 +7369,23 @@ var FilterSystem = ({
7112
7369
  const getPropertyDef = (propertyId) => properties.find((p) => p.id === propertyId);
7113
7370
  const hasAdvanced = filterState.advancedFilters.length > 0;
7114
7371
  const isMinimal = mode === "minimal";
7115
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(FilterBar, { ref: containerRef, className, children: [
7116
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(FilterBarLeft, { className: "flex-nowrap flex-1 min-w-0 overflow-x-auto scrollbar-none outline-none [&>*]:shrink-0", children: [
7372
+ const handleOpenAdvanced = () => {
7373
+ setPropertySelectorOpen(false);
7374
+ requestAnimationFrame(() => {
7375
+ if (isMinimal) {
7376
+ setSummaryOpen(true);
7377
+ } else {
7378
+ setAdvancedOpen(true);
7379
+ }
7380
+ });
7381
+ };
7382
+ const advancedFilterCount = filterState.advancedFilters.length;
7383
+ const showAdvancedChip = hasAdvanced || advancedOpen;
7384
+ const showSummaryChip = totalCount > 0 || summaryOpen;
7385
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(FilterBar, { ref: containerRef, className, children: [
7386
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(FilterBarLeft, { className: "flex-nowrap flex-1 min-w-0 overflow-x-auto scrollbar-none outline-none [&>*]:shrink-0", children: [
7117
7387
  children,
7118
- sortFields && filterState.sort && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
7388
+ sortFields && filterState.sort && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
7119
7389
  SortButton,
7120
7390
  {
7121
7391
  fields: sortFields,
@@ -7125,40 +7395,48 @@ var FilterSystem = ({
7125
7395
  iconOnly: isMinimal
7126
7396
  }
7127
7397
  ),
7128
- isMinimal ? totalCount > 0 ? (
7129
- /* Has filters → SummaryChip (interactive popover) */
7130
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
7131
- SummaryChip,
7398
+ isMinimal ? /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
7399
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
7400
+ "div",
7132
7401
  {
7133
- count: totalCount,
7134
- filters: allFilters,
7135
- properties,
7136
- onFiltersChange: (filters) => {
7137
- onFilterStateChange({
7138
- ...filterState,
7139
- basicFilters: filters,
7140
- advancedFilters: []
7141
- });
7142
- },
7143
- onClearAll: handleClearAll
7402
+ className: showSummaryChip ? "inline-flex" : "inline-flex w-0 overflow-hidden opacity-0 pointer-events-none",
7403
+ "aria-hidden": !showSummaryChip || void 0,
7404
+ children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
7405
+ SummaryChip,
7406
+ {
7407
+ count: totalCount,
7408
+ filters: allFilters,
7409
+ properties,
7410
+ onFiltersChange: (filters) => {
7411
+ onFilterStateChange({
7412
+ ...filterState,
7413
+ basicFilters: filters,
7414
+ advancedFilters: []
7415
+ });
7416
+ },
7417
+ onClearAll: handleClearAll,
7418
+ open: summaryOpen,
7419
+ onOpenChange: setSummaryOpen
7420
+ }
7421
+ )
7144
7422
  }
7145
- )
7146
- ) : (
7147
- /* No filters → same FilterBarButton as default, icon-only */
7148
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
7423
+ ),
7424
+ !showSummaryChip && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
7149
7425
  PropertySelector,
7150
7426
  {
7151
7427
  properties,
7152
7428
  onSelect: handleAddFilter,
7153
7429
  open: propertySelectorOpen,
7154
7430
  onOpenChange: setPropertySelectorOpen,
7155
- children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(FilterBarButton, { iconOnly: true })
7431
+ onAdvancedFilter: handleOpenAdvanced,
7432
+ advancedFilterCount,
7433
+ children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(FilterBarButton, { iconOnly: true })
7156
7434
  }
7157
7435
  )
7158
- ) : (
7436
+ ] }) : (
7159
7437
  /* ── DEFAULT MODE ────────────────────────────────────── */
7160
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
7161
- hasAdvanced && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
7438
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
7439
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
7162
7440
  AdvancedPopover,
7163
7441
  {
7164
7442
  filters: filterState.advancedFilters,
@@ -7166,12 +7444,19 @@ var FilterSystem = ({
7166
7444
  onFiltersChange: handleAdvancedFiltersChange,
7167
7445
  open: advancedOpen,
7168
7446
  onOpenChange: setAdvancedOpen,
7169
- children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
7170
- AdvancedChip,
7447
+ children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
7448
+ "div",
7171
7449
  {
7172
- count: filterState.advancedFilters.length,
7173
- onClick: () => setAdvancedOpen(true),
7174
- onClear: handleClearAdvanced
7450
+ className: showAdvancedChip ? "inline-flex" : "inline-flex w-0 overflow-hidden opacity-0 pointer-events-none",
7451
+ "aria-hidden": !showAdvancedChip || void 0,
7452
+ children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
7453
+ AdvancedChip,
7454
+ {
7455
+ count: filterState.advancedFilters.length,
7456
+ onClick: () => setAdvancedOpen(true),
7457
+ onClear: handleClearAdvanced
7458
+ }
7459
+ )
7175
7460
  }
7176
7461
  )
7177
7462
  }
@@ -7179,7 +7464,7 @@ var FilterSystem = ({
7179
7464
  filterState.basicFilters.map((filter) => {
7180
7465
  const propDef = getPropertyDef(filter.propertyId);
7181
7466
  if (!propDef) return null;
7182
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
7467
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
7183
7468
  InteractiveFilterChip,
7184
7469
  {
7185
7470
  propertyDef: propDef,
@@ -7195,36 +7480,38 @@ var FilterSystem = ({
7195
7480
  filter.id
7196
7481
  );
7197
7482
  }),
7198
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
7483
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
7199
7484
  PropertySelector,
7200
7485
  {
7201
7486
  properties,
7202
7487
  onSelect: handleAddFilter,
7203
7488
  open: propertySelectorOpen,
7204
7489
  onOpenChange: setPropertySelectorOpen,
7205
- children: totalCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
7490
+ onAdvancedFilter: handleOpenAdvanced,
7491
+ advancedFilterCount,
7492
+ children: totalCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
7206
7493
  "button",
7207
7494
  {
7208
7495
  type: "button",
7209
7496
  className: "shrink-0 inline-flex items-center justify-center size-8 rounded-md border border-[var(--color-btn-outlined-neutral-border-default)] bg-gradient-to-t from-[var(--color-btn-outlined-neutral-bg-default)] from-[10%] to-[var(--color-btn-outlined-neutral-bg-gradient-to-default)] shadow-sm cursor-pointer transition-colors hover:from-[var(--color-btn-outlined-neutral-bg-hover)] hover:to-[var(--color-btn-outlined-neutral-bg-gradient-to-hover)]",
7210
- children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_icons34.Icon, { icon: import_icons34.faPlusOutline, size: "sm", className: "text-[var(--color-foreground)]" })
7497
+ children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_icons34.Icon, { icon: import_icons34.faPlusOutline, size: "sm", className: "text-[var(--color-foreground)]" })
7211
7498
  }
7212
- ) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(FilterBarButton, {})
7499
+ ) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(FilterBarButton, {})
7213
7500
  }
7214
7501
  )
7215
7502
  ] })
7216
7503
  ),
7217
- totalCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
7504
+ totalCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
7218
7505
  "button",
7219
7506
  {
7220
7507
  type: "button",
7221
7508
  onClick: handleClearAll,
7222
7509
  className: "shrink-0 flex items-center gap-sm px-base py-sm min-h-[32px] max-h-[32px] rounded-md cursor-pointer transition-colors hover:bg-[var(--color-accent)]",
7223
- children: isMinimal ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_icons34.Icon, { icon: import_icons34.faXmarkOutline, size: "sm", className: "text-[var(--color-foreground)]" }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "text-sm font-semibold leading-sm text-[var(--color-foreground)]", children: "Clear" })
7510
+ children: isMinimal ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_icons34.Icon, { icon: import_icons34.faXmarkOutline, size: "sm", className: "text-[var(--color-foreground)]" }) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "text-sm font-semibold leading-sm text-[var(--color-foreground)]", children: "Clear" })
7224
7511
  }
7225
7512
  )
7226
7513
  ] }),
7227
- actions && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(FilterBarRight, { className: "shrink-0 -ml-2xl pl-2xl relative z-10 bg-[linear-gradient(to_right,transparent_0px,var(--filter-bar-bg,var(--color-background,#fff))_24px)]", children: actions })
7514
+ actions && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(FilterBarRight, { className: "shrink-0 -ml-2xl pl-2xl relative z-10 bg-[linear-gradient(to_right,transparent_0px,var(--filter-bar-bg,var(--color-background,#fff))_24px)]", children: actions })
7228
7515
  ] });
7229
7516
  };
7230
7517
  FilterSystem.displayName = "FilterSystem";
@@ -7233,7 +7520,7 @@ FilterSystem.displayName = "FilterSystem";
7233
7520
  var React50 = __toESM(require("react"));
7234
7521
  var PopoverPrimitive12 = __toESM(require("@radix-ui/react-popover"));
7235
7522
  var import_icons35 = require("@l3mpire/icons");
7236
- var import_jsx_runtime52 = require("react/jsx-runtime");
7523
+ var import_jsx_runtime57 = require("react/jsx-runtime");
7237
7524
  function getDaysInMonth(year, month) {
7238
7525
  return new Date(year, month + 1, 0).getDate();
7239
7526
  }
@@ -7364,7 +7651,7 @@ var DatePicker = React50.forwardRef(
7364
7651
  hoveredDate
7365
7652
  ]
7366
7653
  );
7367
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(DatePickerContext.Provider, { value: ctxValue, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
7654
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(DatePickerContext.Provider, { value: ctxValue, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
7368
7655
  "div",
7369
7656
  {
7370
7657
  ref,
@@ -7391,18 +7678,18 @@ var DatePickerSelects = React50.forwardRef(({ className, formatDate = defaultFor
7391
7678
  const { selected } = useDatePickerContext();
7392
7679
  const fromDate = selected instanceof Date ? selected : selected?.from;
7393
7680
  const toDate = selected instanceof Date ? void 0 : selected?.to;
7394
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
7681
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
7395
7682
  "div",
7396
7683
  {
7397
7684
  ref,
7398
7685
  className: cn("flex flex-col items-start pt-lg px-lg", className),
7399
7686
  ...props,
7400
- children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex items-center gap-base w-full", children: [
7401
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("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: [
7402
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "flex-1 text-sm font-regular leading-sm text-datepicker-header-text truncate", children: fromDate ? formatDate(fromDate) : "Start date" }),
7403
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_icons35.Icon, { icon: import_icons35.faCalendarOutline, size: "sm", className: "shrink-0 text-datepicker-header-text" })
7687
+ children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex items-center gap-base w-full", children: [
7688
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("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: [
7689
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "flex-1 text-sm font-regular leading-sm text-datepicker-header-text truncate", children: fromDate ? formatDate(fromDate) : "Start date" }),
7690
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_icons35.Icon, { icon: import_icons35.faCalendarOutline, size: "sm", className: "shrink-0 text-datepicker-header-text" })
7404
7691
  ] }),
7405
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
7692
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
7406
7693
  import_icons35.Icon,
7407
7694
  {
7408
7695
  icon: import_icons35.faArrowRightOutline,
@@ -7410,9 +7697,9 @@ var DatePickerSelects = React50.forwardRef(({ className, formatDate = defaultFor
7410
7697
  className: "shrink-0 text-datepicker-header-weekday"
7411
7698
  }
7412
7699
  ),
7413
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("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: [
7414
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "flex-1 text-sm font-regular leading-sm text-datepicker-header-text truncate", children: toDate ? formatDate(toDate) : "End date" }),
7415
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_icons35.Icon, { icon: import_icons35.faCalendarOutline, size: "sm", className: "shrink-0 text-datepicker-header-text" })
7700
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("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: [
7701
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "flex-1 text-sm font-regular leading-sm text-datepicker-header-text truncate", children: toDate ? formatDate(toDate) : "End date" }),
7702
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_icons35.Icon, { icon: import_icons35.faCalendarOutline, size: "sm", className: "shrink-0 text-datepicker-header-text" })
7416
7703
  ] })
7417
7704
  ] })
7418
7705
  }
@@ -7428,7 +7715,7 @@ var DatePickerDay = ({ date, isOutside }) => {
7428
7715
  const inRange = mode === "range" && selected && !(selected instanceof Date) && selected.from && selected.to && !isSelected && isInRange(date, selected.from, selected.to);
7429
7716
  const inPreviewRange = mode === "range" && selected && !(selected instanceof Date) && selected.from && !selected.to && hoveredDate && !isSelected && hoveredDate.getTime() > selected.from.getTime() && isInRange(date, selected.from, hoveredDate);
7430
7717
  const isInRangeOrPreview = inRange || inPreviewRange;
7431
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
7718
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
7432
7719
  "button",
7433
7720
  {
7434
7721
  type: "button",
@@ -7452,7 +7739,7 @@ var DatePickerDay = ({ date, isOutside }) => {
7452
7739
  ),
7453
7740
  children: [
7454
7741
  date.getDate(),
7455
- isToday && !isOutside && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "absolute bottom-0.5 left-1/2 -translate-x-1/2 size-1.5 rounded-full bg-datepicker-day-today" })
7742
+ isToday && !isOutside && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "absolute bottom-0.5 left-1/2 -translate-x-1/2 size-1.5 rounded-full bg-datepicker-day-today" })
7456
7743
  ]
7457
7744
  }
7458
7745
  );
@@ -7499,7 +7786,7 @@ var DatePickerCalendar = React50.forwardRef(({ className, header, ...props }, re
7499
7786
  }
7500
7787
  return result;
7501
7788
  }, [month, year]);
7502
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
7789
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
7503
7790
  "div",
7504
7791
  {
7505
7792
  ref,
@@ -7507,38 +7794,38 @@ var DatePickerCalendar = React50.forwardRef(({ className, header, ...props }, re
7507
7794
  ...props,
7508
7795
  children: [
7509
7796
  header,
7510
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-col gap-lg p-lg", children: [
7511
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex items-center justify-between", children: [
7512
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { className: "text-base font-semibold leading-base text-datepicker-header-text", children: [
7797
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex flex-col gap-lg p-lg", children: [
7798
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex items-center justify-between", children: [
7799
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("span", { className: "text-base font-semibold leading-base text-datepicker-header-text", children: [
7513
7800
  MONTH_NAMES[month],
7514
7801
  " ",
7515
7802
  year
7516
7803
  ] }),
7517
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex items-center gap-xs", children: [
7518
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
7804
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex items-center gap-xs", children: [
7805
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
7519
7806
  "button",
7520
7807
  {
7521
7808
  type: "button",
7522
7809
  onClick: goToPrevMonth,
7523
7810
  className: "flex items-center justify-center p-xs rounded-base hover:bg-datepicker-day-bg-hover transition-colors cursor-pointer",
7524
7811
  "aria-label": "Previous month",
7525
- children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_icons35.Icon, { icon: import_icons35.faChevronLeftOutline, size: "xs", className: "text-datepicker-header-nav" })
7812
+ children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_icons35.Icon, { icon: import_icons35.faChevronLeftOutline, size: "xs", className: "text-datepicker-header-nav" })
7526
7813
  }
7527
7814
  ),
7528
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
7815
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
7529
7816
  "button",
7530
7817
  {
7531
7818
  type: "button",
7532
7819
  onClick: goToNextMonth,
7533
7820
  className: "flex items-center justify-center p-xs rounded-base hover:bg-datepicker-day-bg-hover transition-colors cursor-pointer",
7534
7821
  "aria-label": "Next month",
7535
- children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_icons35.Icon, { icon: import_icons35.faChevronRightOutline, size: "xs", className: "text-datepicker-header-nav" })
7822
+ children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_icons35.Icon, { icon: import_icons35.faChevronRightOutline, size: "xs", className: "text-datepicker-header-nav" })
7536
7823
  }
7537
7824
  )
7538
7825
  ] })
7539
7826
  ] }),
7540
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-col", children: [
7541
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "grid grid-cols-7 gap-base py-sm", children: WEEKDAYS.map((day) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
7827
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex flex-col", children: [
7828
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "grid grid-cols-7 gap-base py-sm", children: WEEKDAYS.map((day) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
7542
7829
  "span",
7543
7830
  {
7544
7831
  className: "w-9 text-center text-xs font-regular leading-xs text-datepicker-header-weekday",
@@ -7546,7 +7833,7 @@ var DatePickerCalendar = React50.forwardRef(({ className, header, ...props }, re
7546
7833
  },
7547
7834
  day
7548
7835
  )) }),
7549
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex flex-col", children: weeks.map((week, wi) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "grid grid-cols-7 gap-base", children: week.map((day, di) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
7836
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "flex flex-col", children: weeks.map((week, wi) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "grid grid-cols-7 gap-base", children: week.map((day, di) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
7550
7837
  DatePickerDay,
7551
7838
  {
7552
7839
  date: day.date,
@@ -7586,7 +7873,7 @@ var DatePickerSuggestions = React50.forwardRef(
7586
7873
  const to = val.to ? formatDate(val.to) : "";
7587
7874
  return to ? `${from} - ${to}` : from;
7588
7875
  };
7589
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
7876
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
7590
7877
  "div",
7591
7878
  {
7592
7879
  ref,
@@ -7596,16 +7883,16 @@ var DatePickerSuggestions = React50.forwardRef(
7596
7883
  ),
7597
7884
  ...props,
7598
7885
  children: [
7599
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "pt-lg px-base", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex items-center p-base rounded-base", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "flex-1 text-xs font-semibold leading-xs text-datepicker-suggestion-heading uppercase truncate", children: "Suggestions" }) }) }),
7600
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex flex-1 flex-col p-base min-w-[222px]", children: suggestions.map((suggestion, i) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
7886
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "pt-lg px-base", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "flex items-center p-base rounded-base", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "flex-1 text-xs font-semibold leading-xs text-datepicker-suggestion-heading uppercase truncate", children: "Suggestions" }) }) }),
7887
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "flex flex-1 flex-col p-base min-w-[222px]", children: suggestions.map((suggestion, i) => /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
7601
7888
  "button",
7602
7889
  {
7603
7890
  type: "button",
7604
7891
  onClick: () => handleClick(suggestion),
7605
7892
  className: "flex items-center gap-sm p-base rounded-base hover:bg-datepicker-suggestion-hover transition-colors cursor-pointer text-left",
7606
7893
  children: [
7607
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "text-sm font-regular leading-sm text-datepicker-suggestion-text truncate shrink-0", children: suggestion.label }),
7608
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "text-xs font-regular leading-xs text-datepicker-suggestion-date truncate", children: formatSuggestionDate(suggestion) })
7894
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "text-sm font-regular leading-sm text-datepicker-suggestion-text truncate shrink-0", children: suggestion.label }),
7895
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "text-xs font-regular leading-xs text-datepicker-suggestion-date truncate", children: formatSuggestionDate(suggestion) })
7609
7896
  ]
7610
7897
  },
7611
7898
  i
@@ -7617,7 +7904,7 @@ var DatePickerSuggestions = React50.forwardRef(
7617
7904
  );
7618
7905
  DatePickerSuggestions.displayName = "DatePickerSuggestions";
7619
7906
  var DatePickerFooter = React50.forwardRef(
7620
- ({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
7907
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
7621
7908
  "div",
7622
7909
  {
7623
7910
  ref,
@@ -7634,7 +7921,7 @@ var DatePickerFooter = React50.forwardRef(
7634
7921
  );
7635
7922
  DatePickerFooter.displayName = "DatePickerFooter";
7636
7923
  var DatePickerPanel = React50.forwardRef(
7637
- ({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
7924
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
7638
7925
  "div",
7639
7926
  {
7640
7927
  ref,
@@ -7647,7 +7934,7 @@ var DatePickerPanel = React50.forwardRef(
7647
7934
  DatePickerPanel.displayName = "DatePickerPanel";
7648
7935
  var DatePickerRoot = PopoverPrimitive12.Root;
7649
7936
  var DatePickerTrigger = PopoverPrimitive12.Trigger;
7650
- var DatePickerPopover = React50.forwardRef(({ className, sideOffset = 4, align = "start", children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(PopoverPrimitive12.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
7937
+ var DatePickerPopover = React50.forwardRef(({ className, sideOffset = 4, align = "start", children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(PopoverPrimitive12.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
7651
7938
  PopoverPrimitive12.Content,
7652
7939
  {
7653
7940
  ref,