@l3mpire/ui 2.22.0 → 2.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -5105,7 +5105,7 @@ var FilterChipSegment = React36.forwardRef(
5105
5105
  ),
5106
5106
  ...props,
5107
5107
  children: [
5108
- adornment && segmentType === "value" && /* @__PURE__ */ jsx36("div", { className: "shrink-0 size-5", children: adornment }),
5108
+ adornment && segmentType === "value" && /* @__PURE__ */ jsx36("span", { className: "shrink-0 inline-flex items-center justify-center leading-none", children: adornment }),
5109
5109
  icon && segmentType === "property" && /* @__PURE__ */ jsx36(
5110
5110
  Icon23,
5111
5111
  {
@@ -5210,6 +5210,23 @@ var FilterChip = React37.forwardRef(
5210
5210
  FilterChip.displayName = "FilterChip";
5211
5211
 
5212
5212
  // src/components/ui/filter/utils.ts
5213
+ function resolveEnumOption(opt) {
5214
+ if (typeof opt === "string") return { value: opt, label: opt };
5215
+ return {
5216
+ value: opt.value,
5217
+ label: opt.label ?? opt.value,
5218
+ icon: opt.icon,
5219
+ intent: opt.intent
5220
+ };
5221
+ }
5222
+ function findEnumOption(value, options) {
5223
+ if (!options) return void 0;
5224
+ for (const opt of options) {
5225
+ const r = resolveEnumOption(opt);
5226
+ if (r.value === value) return r;
5227
+ }
5228
+ return void 0;
5229
+ }
5213
5230
  var OPERATORS_BY_TYPE = {
5214
5231
  text: [
5215
5232
  "contains",
@@ -5285,7 +5302,7 @@ function getValueInputType(type, operator) {
5285
5302
  return ["is any of", "is none of"].includes(operator) ? "MultiRelationPicker" : "RelationPicker";
5286
5303
  return null;
5287
5304
  }
5288
- function formatFilterValue(value, dynamicOptions, full) {
5305
+ function formatFilterValue(value, dynamicOptions, full, options) {
5289
5306
  if (value == null) return void 0;
5290
5307
  if (typeof value === "boolean") return value ? "Yes" : "No";
5291
5308
  if (value instanceof Date) {
@@ -5305,18 +5322,19 @@ function formatFilterValue(value, dynamicOptions, full) {
5305
5322
  return `${fmt(value[0])} \u2013 ${value[1] instanceof Date ? fmt(value[1]) : "\u2026"}`;
5306
5323
  }
5307
5324
  if (full) {
5308
- return value.map((v) => resolveDynamic(String(v), dynamicOptions)).join(", ");
5325
+ return value.map((v) => resolveLabel(String(v), dynamicOptions, options)).join(", ");
5309
5326
  }
5310
- const resolved = resolveDynamic(String(value[0]), dynamicOptions);
5311
- return resolved;
5327
+ return resolveLabel(String(value[0]), dynamicOptions, options);
5312
5328
  }
5313
- return resolveDynamic(String(value), dynamicOptions);
5329
+ return resolveLabel(String(value), dynamicOptions, options);
5314
5330
  }
5315
- function resolveDynamic(raw, dynamicOptions) {
5331
+ function resolveLabel(raw, dynamicOptions, options) {
5316
5332
  if (dynamicOptions) {
5317
- const match = dynamicOptions.find((o) => o.value === raw);
5318
- if (match) return match.label;
5333
+ const dyn = dynamicOptions.find((o) => o.value === raw);
5334
+ if (dyn) return dyn.label;
5319
5335
  }
5336
+ const enumOpt = findEnumOption(raw, options);
5337
+ if (enumOpt) return enumOpt.label;
5320
5338
  return raw;
5321
5339
  }
5322
5340
  function getBadgeCount(value) {
@@ -6569,7 +6587,41 @@ var PresetTagsValueInput = ({
6569
6587
  PresetTagsValueInput.displayName = "PresetTagsValueInput";
6570
6588
 
6571
6589
  // src/components/ui/filter/value-inputs/select-value-input.tsx
6590
+ import { Icon as Icon28 } from "@l3mpire/icons";
6572
6591
  import { jsx as jsx47, jsxs as jsxs42 } from "react/jsx-runtime";
6592
+ var intentDotClass = {
6593
+ primary: "bg-primary",
6594
+ success: "bg-success",
6595
+ warning: "bg-warning",
6596
+ critical: "bg-destructive",
6597
+ neutral: "bg-muted-foreground"
6598
+ };
6599
+ var IntentDot = ({ intent }) => /* @__PURE__ */ jsx47(
6600
+ "span",
6601
+ {
6602
+ className: cn(
6603
+ "shrink-0 size-2 rounded-full",
6604
+ intentDotClass[intent]
6605
+ ),
6606
+ "aria-hidden": true
6607
+ }
6608
+ );
6609
+ var OptionLeading = ({ option }) => {
6610
+ if (option.icon) {
6611
+ return /* @__PURE__ */ jsx47(
6612
+ Icon28,
6613
+ {
6614
+ icon: option.icon,
6615
+ size: "sm",
6616
+ className: "shrink-0 text-dropdown-item-icon"
6617
+ }
6618
+ );
6619
+ }
6620
+ if (option.intent) {
6621
+ return /* @__PURE__ */ jsx47(IntentDot, { intent: option.intent });
6622
+ }
6623
+ return null;
6624
+ };
6573
6625
  var DynamicOptionRow = ({
6574
6626
  option,
6575
6627
  selected,
@@ -6642,20 +6694,26 @@ var SingleSelectValueInput = ({
6642
6694
  },
6643
6695
  opt.value
6644
6696
  )),
6645
- options.map((opt) => /* @__PURE__ */ jsx47(
6646
- "button",
6647
- {
6648
- type: "button",
6649
- onClick: () => pick(opt),
6650
- className: cn(
6651
- "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors text-left",
6652
- "hover:bg-dropdown-item-hover",
6653
- value === opt && "bg-dropdown-item-hover"
6654
- ),
6655
- children: /* @__PURE__ */ jsx47("span", { className: "text-sm font-regular leading-sm text-foreground", children: opt })
6656
- },
6657
- opt
6658
- ))
6697
+ options.map((rawOpt) => {
6698
+ const opt = resolveEnumOption(rawOpt);
6699
+ return /* @__PURE__ */ jsxs42(
6700
+ "button",
6701
+ {
6702
+ type: "button",
6703
+ onClick: () => pick(opt.value),
6704
+ className: cn(
6705
+ "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors text-left",
6706
+ "hover:bg-dropdown-item-hover",
6707
+ value === opt.value && "bg-dropdown-item-hover"
6708
+ ),
6709
+ children: [
6710
+ /* @__PURE__ */ jsx47(OptionLeading, { option: opt }),
6711
+ /* @__PURE__ */ jsx47("span", { className: "text-sm font-regular leading-sm text-foreground truncate", children: opt.label })
6712
+ ]
6713
+ },
6714
+ opt.value
6715
+ );
6716
+ })
6659
6717
  ]
6660
6718
  }
6661
6719
  );
@@ -6686,13 +6744,14 @@ var MultiSelectValueInput = ({
6686
6744
  },
6687
6745
  opt.value
6688
6746
  )),
6689
- options.map((opt) => {
6690
- const isSelected = selected.includes(opt);
6747
+ options.map((rawOpt) => {
6748
+ const opt = resolveEnumOption(rawOpt);
6749
+ const isSelected = selected.includes(opt.value);
6691
6750
  return /* @__PURE__ */ jsxs42(
6692
6751
  "button",
6693
6752
  {
6694
6753
  type: "button",
6695
- onClick: () => toggle(opt),
6754
+ onClick: () => toggle(opt.value),
6696
6755
  className: cn(
6697
6756
  "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors text-left",
6698
6757
  "hover:bg-dropdown-item-hover"
@@ -6702,7 +6761,7 @@ var MultiSelectValueInput = ({
6702
6761
  "span",
6703
6762
  {
6704
6763
  className: cn(
6705
- "flex items-center justify-center size-4 rounded-xs border transition-colors",
6764
+ "flex items-center justify-center size-4 rounded-xs border transition-colors shrink-0",
6706
6765
  isSelected ? "bg-primary border-primary" : "border-input bg-background"
6707
6766
  ),
6708
6767
  children: isSelected && /* @__PURE__ */ jsx47("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", children: /* @__PURE__ */ jsx47(
@@ -6717,10 +6776,11 @@ var MultiSelectValueInput = ({
6717
6776
  ) })
6718
6777
  }
6719
6778
  ),
6720
- /* @__PURE__ */ jsx47("span", { className: "text-sm font-regular leading-sm text-foreground", children: opt })
6779
+ /* @__PURE__ */ jsx47(OptionLeading, { option: opt }),
6780
+ /* @__PURE__ */ jsx47("span", { className: "text-sm font-regular leading-sm text-foreground truncate", children: opt.label })
6721
6781
  ]
6722
6782
  },
6723
- opt
6783
+ opt.value
6724
6784
  );
6725
6785
  })
6726
6786
  ] }),
@@ -6828,7 +6888,7 @@ ValueInput.displayName = "ValueInput";
6828
6888
  import * as React44 from "react";
6829
6889
  import * as PopoverPrimitive6 from "@radix-ui/react-popover";
6830
6890
  import {
6831
- Icon as Icon28,
6891
+ Icon as Icon29,
6832
6892
  faChevronLeftOutline as faChevronLeftOutline3,
6833
6893
  faChevronRightOutline as faChevronRightOutline3,
6834
6894
  faMagnifyingGlassOutline,
@@ -6846,7 +6906,7 @@ var AdvancedFilterFooter = ({ onClick, count }) => /* @__PURE__ */ jsxs44("div",
6846
6906
  className: "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-dropdown-item-hover",
6847
6907
  children: [
6848
6908
  /* @__PURE__ */ jsx50(
6849
- Icon28,
6909
+ Icon29,
6850
6910
  {
6851
6911
  icon: faFilterOutline3,
6852
6912
  size: "sm",
@@ -6968,7 +7028,7 @@ var PropertySelector = ({
6968
7028
  /* @__PURE__ */ jsxs44("div", { className: "flex flex-col gap-xs flex-1 min-h-0", children: [
6969
7029
  /* @__PURE__ */ jsxs44("div", { className: "shrink-0 flex items-center gap-base px-md py-base border border-input rounded-md", children: [
6970
7030
  /* @__PURE__ */ jsx50(
6971
- Icon28,
7031
+ Icon29,
6972
7032
  {
6973
7033
  icon: faMagnifyingGlassOutline,
6974
7034
  size: "sm",
@@ -6999,7 +7059,7 @@ var PropertySelector = ({
6999
7059
  className: "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-dropdown-item-hover",
7000
7060
  children: [
7001
7061
  /* @__PURE__ */ jsx50(
7002
- Icon28,
7062
+ Icon29,
7003
7063
  {
7004
7064
  icon: prop.icon,
7005
7065
  size: "sm",
@@ -7024,7 +7084,7 @@ var PropertySelector = ({
7024
7084
  className: "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-dropdown-item-hover",
7025
7085
  children: [
7026
7086
  /* @__PURE__ */ jsx50(
7027
- Icon28,
7087
+ Icon29,
7028
7088
  {
7029
7089
  icon: prop.icon,
7030
7090
  size: "sm",
@@ -7050,7 +7110,7 @@ var PropertySelector = ({
7050
7110
  className: "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-dropdown-item-hover",
7051
7111
  children: [
7052
7112
  /* @__PURE__ */ jsx50(
7053
- Icon28,
7113
+ Icon29,
7054
7114
  {
7055
7115
  icon: g.groupIcon,
7056
7116
  size: "sm",
@@ -7060,7 +7120,7 @@ var PropertySelector = ({
7060
7120
  /* @__PURE__ */ jsx50("span", { className: "flex-1 text-sm font-regular leading-sm text-dropdown-item-text text-left truncate", children: g.groupLabel }),
7061
7121
  /* @__PURE__ */ jsx50("span", { className: "text-xs font-medium leading-xs text-muted-foreground", children: g.count }),
7062
7122
  /* @__PURE__ */ jsx50(
7063
- Icon28,
7123
+ Icon29,
7064
7124
  {
7065
7125
  icon: faChevronRightOutline3,
7066
7126
  size: "xs",
@@ -7089,7 +7149,7 @@ var PropertySelector = ({
7089
7149
  className: "shrink-0 flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-dropdown-item-hover",
7090
7150
  children: [
7091
7151
  /* @__PURE__ */ jsx50(
7092
- Icon28,
7152
+ Icon29,
7093
7153
  {
7094
7154
  icon: faChevronLeftOutline3,
7095
7155
  size: "sm",
@@ -7102,7 +7162,7 @@ var PropertySelector = ({
7102
7162
  ),
7103
7163
  /* @__PURE__ */ jsxs44("div", { className: "shrink-0 flex items-center gap-base px-md py-base border border-input rounded-md", children: [
7104
7164
  /* @__PURE__ */ jsx50(
7105
- Icon28,
7165
+ Icon29,
7106
7166
  {
7107
7167
  icon: faMagnifyingGlassOutline,
7108
7168
  size: "sm",
@@ -7133,7 +7193,7 @@ var PropertySelector = ({
7133
7193
  className: "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-dropdown-item-hover",
7134
7194
  children: [
7135
7195
  /* @__PURE__ */ jsx50(
7136
- Icon28,
7196
+ Icon29,
7137
7197
  {
7138
7198
  icon: prop.icon,
7139
7199
  size: "sm",
@@ -7165,7 +7225,7 @@ PropertySelector.displayName = "PropertySelector";
7165
7225
 
7166
7226
  // src/components/ui/filter/kebab-menu.tsx
7167
7227
  import * as PopoverPrimitive7 from "@radix-ui/react-popover";
7168
- import { Icon as Icon29, faArrowRightOutline as faArrowRightOutline2, faTrashOutline } from "@l3mpire/icons";
7228
+ import { Icon as Icon30, faArrowRightOutline as faArrowRightOutline2, faTrashOutline } from "@l3mpire/icons";
7169
7229
  import { jsx as jsx51, jsxs as jsxs45 } from "react/jsx-runtime";
7170
7230
  var KebabMenu = ({
7171
7231
  onConvertToAdvanced,
@@ -7201,7 +7261,7 @@ var KebabMenu = ({
7201
7261
  className: "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-dropdown-item-hover",
7202
7262
  children: [
7203
7263
  /* @__PURE__ */ jsx51(
7204
- Icon29,
7264
+ Icon30,
7205
7265
  {
7206
7266
  icon: faArrowRightOutline2,
7207
7267
  size: "sm",
@@ -7224,7 +7284,7 @@ var KebabMenu = ({
7224
7284
  className: "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-dropdown-item-hover",
7225
7285
  children: [
7226
7286
  /* @__PURE__ */ jsx51(
7227
- Icon29,
7287
+ Icon30,
7228
7288
  {
7229
7289
  icon: faTrashOutline,
7230
7290
  size: "sm",
@@ -7244,7 +7304,7 @@ KebabMenu.displayName = "KebabMenu";
7244
7304
  // src/components/ui/filter/filter-editor.tsx
7245
7305
  import * as React45 from "react";
7246
7306
  import * as PopoverPrimitive8 from "@radix-ui/react-popover";
7247
- import { Icon as Icon30 } from "@l3mpire/icons";
7307
+ import { Icon as Icon31 } from "@l3mpire/icons";
7248
7308
  import { jsx as jsx52, jsxs as jsxs46 } from "react/jsx-runtime";
7249
7309
  var FilterEditor = ({
7250
7310
  propertyDef,
@@ -7308,7 +7368,7 @@ var FilterEditor = ({
7308
7368
  children: [
7309
7369
  /* @__PURE__ */ jsxs46("div", { className: "flex items-center gap-base px-base pt-base pb-xs border-b border-border", children: [
7310
7370
  /* @__PURE__ */ jsx52(
7311
- Icon30,
7371
+ Icon31,
7312
7372
  {
7313
7373
  icon: propertyDef.icon,
7314
7374
  size: "sm",
@@ -7358,6 +7418,7 @@ FilterEditor.displayName = "FilterEditor";
7358
7418
  // src/components/ui/filter/interactive-filter-chip.tsx
7359
7419
  import * as React46 from "react";
7360
7420
  import * as PopoverPrimitive9 from "@radix-ui/react-popover";
7421
+ import { Icon as Icon32 } from "@l3mpire/icons";
7361
7422
  import { jsx as jsx53, jsxs as jsxs47 } from "react/jsx-runtime";
7362
7423
  var SegmentPopover = ({
7363
7424
  open,
@@ -7436,9 +7497,31 @@ var InteractiveFilterChip = ({
7436
7497
  setValueOpen(false);
7437
7498
  };
7438
7499
  const hasOperator = !!condition.operator;
7439
- const displayValue = formatFilterValue(condition.value, propertyDef.dynamicOptions);
7500
+ const displayValue = formatFilterValue(
7501
+ condition.value,
7502
+ propertyDef.dynamicOptions,
7503
+ false,
7504
+ propertyDef.options
7505
+ );
7440
7506
  const hasValue = hasOperator && displayValue != null;
7441
7507
  const badgeCount = getBadgeCount(condition.value);
7508
+ const valueLeading = React46.useMemo(() => {
7509
+ const v = condition.value;
7510
+ const raw = typeof v === "string" ? v : Array.isArray(v) && typeof v[0] === "string" ? v[0] : null;
7511
+ if (!raw) return null;
7512
+ const opt = findEnumOption(raw, propertyDef.options);
7513
+ if (opt?.icon) {
7514
+ return /* @__PURE__ */ jsx53(
7515
+ Icon32,
7516
+ {
7517
+ icon: opt.icon,
7518
+ size: "sm",
7519
+ className: "shrink-0 text-filter-chip-segment-icon"
7520
+ }
7521
+ );
7522
+ }
7523
+ return null;
7524
+ }, [condition.value, propertyDef.options]);
7442
7525
  return /* @__PURE__ */ jsxs47(
7443
7526
  "div",
7444
7527
  {
@@ -7519,6 +7602,7 @@ var InteractiveFilterChip = ({
7519
7602
  hasBorder: true,
7520
7603
  label: hasValue ? displayValue : "Enter value",
7521
7604
  badgeCount,
7605
+ adornment: hasValue ? valueLeading : void 0,
7522
7606
  onClick: () => setValueOpen(true)
7523
7607
  }
7524
7608
  ) }),
@@ -7573,11 +7657,11 @@ InteractiveFilterChip.displayName = "InteractiveFilterChip";
7573
7657
 
7574
7658
  // src/components/ui/filter/filter-system.tsx
7575
7659
  import * as React54 from "react";
7576
- import { Icon as Icon37, faPlusOutline as faPlusOutline5 } from "@l3mpire/icons";
7660
+ import { Icon as Icon39, faPlusOutline as faPlusOutline5 } from "@l3mpire/icons";
7577
7661
 
7578
7662
  // src/components/ui/filter/advanced-chip.tsx
7579
7663
  import * as React47 from "react";
7580
- import { Icon as Icon31, faXmarkOutline as faXmarkOutline3, faFilterOutline as faFilterOutline4 } from "@l3mpire/icons";
7664
+ import { Icon as Icon33, faXmarkOutline as faXmarkOutline3, faFilterOutline as faFilterOutline4 } from "@l3mpire/icons";
7581
7665
  import { jsx as jsx54, jsxs as jsxs48 } from "react/jsx-runtime";
7582
7666
  var btnBase = [
7583
7667
  "flex items-center justify-center",
@@ -7603,7 +7687,7 @@ var AdvancedChip = React47.forwardRef(
7603
7687
  ...props,
7604
7688
  children: [
7605
7689
  /* @__PURE__ */ jsx54(
7606
- Icon31,
7690
+ Icon33,
7607
7691
  {
7608
7692
  icon: faFilterOutline4,
7609
7693
  size: "sm",
@@ -7629,7 +7713,7 @@ var AdvancedChip = React47.forwardRef(
7629
7713
  "rounded-r-md -ml-px"
7630
7714
  ),
7631
7715
  "aria-label": "Clear all advanced filters",
7632
- children: /* @__PURE__ */ jsx54(Icon31, { icon: faXmarkOutline3, size: "sm", className: "text-foreground" })
7716
+ children: /* @__PURE__ */ jsx54(Icon33, { icon: faXmarkOutline3, size: "sm", className: "text-foreground" })
7633
7717
  }
7634
7718
  )
7635
7719
  ] })
@@ -7639,19 +7723,19 @@ AdvancedChip.displayName = "AdvancedChip";
7639
7723
  // src/components/ui/filter/advanced-popover.tsx
7640
7724
  import * as React51 from "react";
7641
7725
  import * as PopoverPrimitive12 from "@radix-ui/react-popover";
7642
- import { Icon as Icon35, faPlusOutline as faPlusOutline3, faChevronDownOutline as faChevronDownOutline3, faXmarkOutline as faXmarkOutline4 } from "@l3mpire/icons";
7726
+ import { Icon as Icon37, faPlusOutline as faPlusOutline3, faChevronDownOutline as faChevronDownOutline3, faXmarkOutline as faXmarkOutline4 } from "@l3mpire/icons";
7643
7727
 
7644
7728
  // src/components/ui/filter/advanced-row.tsx
7645
7729
  import * as React49 from "react";
7646
7730
  import * as PopoverPrimitive11 from "@radix-ui/react-popover";
7647
7731
  import * as TooltipPrimitive4 from "@radix-ui/react-tooltip";
7648
- import { Icon as Icon33, faChevronDownOutline as faChevronDownOutline2 } from "@l3mpire/icons";
7732
+ import { Icon as Icon35, faChevronDownOutline as faChevronDownOutline2 } from "@l3mpire/icons";
7649
7733
 
7650
7734
  // src/components/ui/filter/filter-node-actions.tsx
7651
7735
  import * as React48 from "react";
7652
7736
  import * as PopoverPrimitive10 from "@radix-ui/react-popover";
7653
7737
  import {
7654
- Icon as Icon32,
7738
+ Icon as Icon34,
7655
7739
  faEllipsisOutline as faEllipsisOutline2,
7656
7740
  faCopyOutline,
7657
7741
  faTrashOutline as faTrashOutline2,
@@ -7692,7 +7776,7 @@ var FilterNodeActions = ({
7692
7776
  className: "shrink-0 flex items-center justify-center p-sm rounded-md cursor-pointer transition-colors hover:bg-accent",
7693
7777
  "aria-label": "More actions",
7694
7778
  children: /* @__PURE__ */ jsx55(
7695
- Icon32,
7779
+ Icon34,
7696
7780
  {
7697
7781
  icon: faEllipsisOutline2,
7698
7782
  size: "sm",
@@ -7728,7 +7812,7 @@ var FilterNodeActions = ({
7728
7812
  ),
7729
7813
  children: [
7730
7814
  /* @__PURE__ */ jsx55(
7731
- Icon32,
7815
+ Icon34,
7732
7816
  {
7733
7817
  icon: item.icon,
7734
7818
  size: "sm",
@@ -7759,7 +7843,7 @@ var FilterNodeActions = ({
7759
7843
  FilterNodeActions.displayName = "FilterNodeActions";
7760
7844
 
7761
7845
  // src/components/ui/filter/advanced-row.tsx
7762
- import { jsx as jsx56, jsxs as jsxs50 } from "react/jsx-runtime";
7846
+ import { Fragment as Fragment4, jsx as jsx56, jsxs as jsxs50 } from "react/jsx-runtime";
7763
7847
  var selectBtnStyle = [
7764
7848
  "flex items-center gap-base",
7765
7849
  "px-base py-sm",
@@ -7808,7 +7892,18 @@ var AdvancedRow = ({
7808
7892
  const handleValueChange = (val) => {
7809
7893
  onUpdate({ ...condition, value: val });
7810
7894
  };
7811
- const displayValue = formatFilterValue(condition.value, propertyDef.dynamicOptions);
7895
+ const displayValue = formatFilterValue(
7896
+ condition.value,
7897
+ propertyDef.dynamicOptions,
7898
+ false,
7899
+ propertyDef.options
7900
+ );
7901
+ const valueLeadingIcon = React49.useMemo(() => {
7902
+ const v = condition.value;
7903
+ const raw = typeof v === "string" ? v : Array.isArray(v) && typeof v[0] === "string" ? v[0] : null;
7904
+ if (!raw) return null;
7905
+ return findEnumOption(raw, propertyDef.options)?.icon ?? null;
7906
+ }, [condition.value, propertyDef.options]);
7812
7907
  const badgeCount = getBadgeCount(condition.value);
7813
7908
  const hasValue = displayValue != null;
7814
7909
  return /* @__PURE__ */ jsxs50("div", { className: "flex items-center gap-base w-full min-w-0", children: [
@@ -7828,9 +7923,9 @@ var AdvancedRow = ({
7828
7923
  ] }) }) }),
7829
7924
  /* @__PURE__ */ jsxs50(PopoverPrimitive11.Root, { open: propertyOpen, onOpenChange: setPropertyOpen, children: [
7830
7925
  /* @__PURE__ */ jsx56(PopoverPrimitive11.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs50("button", { type: "button", className: cn(selectBtnStyle, "min-w-0"), children: [
7831
- /* @__PURE__ */ jsx56(Icon33, { icon: propertyDef.icon, size: "sm", className: "shrink-0 text-muted-foreground" }),
7926
+ /* @__PURE__ */ jsx56(Icon35, { icon: propertyDef.icon, size: "sm", className: "shrink-0 text-muted-foreground" }),
7832
7927
  /* @__PURE__ */ jsx56("span", { className: "text-sm font-regular leading-sm text-foreground whitespace-nowrap truncate", children: propertyDef.label }),
7833
- /* @__PURE__ */ jsx56(Icon33, { icon: faChevronDownOutline2, size: "xs", className: "shrink-0 text-foreground" })
7928
+ /* @__PURE__ */ jsx56(Icon35, { icon: faChevronDownOutline2, size: "xs", className: "shrink-0 text-foreground" })
7834
7929
  ] }) }),
7835
7930
  /* @__PURE__ */ jsx56(PopoverPrimitive11.Portal, { children: /* @__PURE__ */ jsxs50(
7836
7931
  PopoverPrimitive11.Content,
@@ -7859,7 +7954,7 @@ var AdvancedRow = ({
7859
7954
  p.id === condition.propertyId && "bg-dropdown-item-hover"
7860
7955
  ),
7861
7956
  children: [
7862
- /* @__PURE__ */ jsx56(Icon33, { icon: p.icon, size: "sm", className: "shrink-0 text-dropdown-item-icon" }),
7957
+ /* @__PURE__ */ jsx56(Icon35, { icon: p.icon, size: "sm", className: "shrink-0 text-dropdown-item-icon" }),
7863
7958
  /* @__PURE__ */ jsx56("span", { className: "text-sm font-regular leading-sm text-dropdown-item-text truncate", children: p.label })
7864
7959
  ]
7865
7960
  },
@@ -7879,7 +7974,7 @@ var AdvancedRow = ({
7879
7974
  p.id === condition.propertyId && "bg-dropdown-item-hover"
7880
7975
  ),
7881
7976
  children: [
7882
- /* @__PURE__ */ jsx56(Icon33, { icon: p.icon, size: "sm", className: "shrink-0 text-dropdown-item-icon" }),
7977
+ /* @__PURE__ */ jsx56(Icon35, { icon: p.icon, size: "sm", className: "shrink-0 text-dropdown-item-icon" }),
7883
7978
  /* @__PURE__ */ jsx56("span", { className: "text-sm font-regular leading-sm text-dropdown-item-text truncate", children: p.label }),
7884
7979
  /* @__PURE__ */ jsx56("span", { className: "ml-auto text-xs font-regular leading-xs text-muted-foreground", children: p.groupLabel })
7885
7980
  ]
@@ -7893,7 +7988,7 @@ var AdvancedRow = ({
7893
7988
  /* @__PURE__ */ jsxs50(PopoverPrimitive11.Root, { open: operatorOpen, onOpenChange: setOperatorOpen, children: [
7894
7989
  /* @__PURE__ */ jsx56(PopoverPrimitive11.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs50("button", { type: "button", className: cn(selectBtnStyle, "min-w-0"), children: [
7895
7990
  /* @__PURE__ */ jsx56("span", { className: "text-sm font-regular leading-sm text-foreground whitespace-nowrap truncate text-left", children: condition.operator ?? "Select" }),
7896
- /* @__PURE__ */ jsx56(Icon33, { icon: faChevronDownOutline2, size: "xs", className: "shrink-0 text-foreground" })
7991
+ /* @__PURE__ */ jsx56(Icon35, { icon: faChevronDownOutline2, size: "xs", className: "shrink-0 text-foreground" })
7897
7992
  ] }) }),
7898
7993
  /* @__PURE__ */ jsx56(PopoverPrimitive11.Portal, { children: /* @__PURE__ */ jsx56(
7899
7994
  PopoverPrimitive11.Content,
@@ -7954,19 +8049,29 @@ var AdvancedRow = ({
7954
8049
  type: "button",
7955
8050
  className: cn(selectBtnStyle, "flex-1 min-w-[80px] justify-between overflow-hidden"),
7956
8051
  children: [
7957
- multiTags && multiTags.length > 0 ? /* @__PURE__ */ jsx56(ValueTagRow, { tags: multiTags }) : /* @__PURE__ */ jsx56(
7958
- "span",
7959
- {
7960
- className: cn(
7961
- "text-sm font-regular leading-sm whitespace-nowrap truncate text-left",
7962
- hasValue ? "text-foreground" : "text-muted-foreground"
7963
- ),
7964
- title: hasValue ? displayValue : void 0,
7965
- children: hasValue ? displayValue : "Select a value"
7966
- }
7967
- ),
8052
+ multiTags && multiTags.length > 0 ? /* @__PURE__ */ jsx56(ValueTagRow, { tags: multiTags }) : /* @__PURE__ */ jsxs50(Fragment4, { children: [
8053
+ valueLeadingIcon && /* @__PURE__ */ jsx56(
8054
+ Icon35,
8055
+ {
8056
+ icon: valueLeadingIcon,
8057
+ size: "sm",
8058
+ className: "shrink-0 text-foreground"
8059
+ }
8060
+ ),
8061
+ /* @__PURE__ */ jsx56(
8062
+ "span",
8063
+ {
8064
+ className: cn(
8065
+ "text-sm font-regular leading-sm whitespace-nowrap truncate text-left",
8066
+ hasValue ? "text-foreground" : "text-muted-foreground"
8067
+ ),
8068
+ title: hasValue ? displayValue : void 0,
8069
+ children: hasValue ? displayValue : "Select a value"
8070
+ }
8071
+ )
8072
+ ] }),
7968
8073
  /* @__PURE__ */ jsx56(
7969
- Icon33,
8074
+ Icon35,
7970
8075
  {
7971
8076
  icon: faChevronDownOutline2,
7972
8077
  size: "xs",
@@ -8097,7 +8202,7 @@ function ValueTagRow({ tags }) {
8097
8202
  // src/components/ui/filter/advanced-group.tsx
8098
8203
  import * as React50 from "react";
8099
8204
  import * as TooltipPrimitive5 from "@radix-ui/react-tooltip";
8100
- import { Icon as Icon34, faPlusOutline as faPlusOutline2 } from "@l3mpire/icons";
8205
+ import { Icon as Icon36, faPlusOutline as faPlusOutline2 } from "@l3mpire/icons";
8101
8206
  import { jsx as jsx57, jsxs as jsxs51 } from "react/jsx-runtime";
8102
8207
  var AdvancedGroup = ({
8103
8208
  connector,
@@ -8143,7 +8248,7 @@ var AdvancedGroup = ({
8143
8248
  type: "button",
8144
8249
  className: "flex items-center gap-sm px-base py-sm text-sm font-medium leading-sm text-muted-foreground cursor-pointer transition-colors rounded-md hover:bg-accent hover:text-foreground w-fit",
8145
8250
  children: [
8146
- /* @__PURE__ */ jsx57(Icon34, { icon: faPlusOutline2, size: "sm" }),
8251
+ /* @__PURE__ */ jsx57(Icon36, { icon: faPlusOutline2, size: "sm" }),
8147
8252
  "Add filter"
8148
8253
  ]
8149
8254
  }
@@ -8360,7 +8465,7 @@ var AdvancedPopover = ({
8360
8465
  open: addSelectorOpen,
8361
8466
  onOpenChange: setAddSelectorOpen,
8362
8467
  children: /* @__PURE__ */ jsxs52("button", { type: "button", className: cn(ghostBtn, "text-foreground"), children: [
8363
- /* @__PURE__ */ jsx58(Icon35, { icon: faPlusOutline3, size: "sm", className: "text-foreground" }),
8468
+ /* @__PURE__ */ jsx58(Icon37, { icon: faPlusOutline3, size: "sm", className: "text-foreground" }),
8364
8469
  "Add filter"
8365
8470
  ] })
8366
8471
  }
@@ -8372,7 +8477,7 @@ var AdvancedPopover = ({
8372
8477
  onClick: handleAddGroup,
8373
8478
  className: cn(ghostBtn, "text-foreground"),
8374
8479
  children: [
8375
- /* @__PURE__ */ jsx58(Icon35, { icon: faPlusOutline3, size: "sm", className: "text-foreground" }),
8480
+ /* @__PURE__ */ jsx58(Icon37, { icon: faPlusOutline3, size: "sm", className: "text-foreground" }),
8376
8481
  "Add filters group"
8377
8482
  ]
8378
8483
  }
@@ -8385,7 +8490,7 @@ var AdvancedPopover = ({
8385
8490
  onClick: handleClearAll,
8386
8491
  className: cn(ghostBtn, "text-destructive"),
8387
8492
  children: [
8388
- /* @__PURE__ */ jsx58(Icon35, { icon: faXmarkOutline4, size: "sm", className: "text-destructive" }),
8493
+ /* @__PURE__ */ jsx58(Icon37, { icon: faXmarkOutline4, size: "sm", className: "text-destructive" }),
8389
8494
  "Clear filters"
8390
8495
  ]
8391
8496
  }
@@ -8436,7 +8541,7 @@ var DraftRow = ({
8436
8541
  children: [
8437
8542
  /* @__PURE__ */ jsx58("span", { className: "text-sm font-regular leading-sm text-muted-foreground whitespace-nowrap", children: "Select property" }),
8438
8543
  /* @__PURE__ */ jsx58(
8439
- Icon35,
8544
+ Icon37,
8440
8545
  {
8441
8546
  icon: faChevronDownOutline3,
8442
8547
  size: "xs",
@@ -8455,7 +8560,7 @@ var DraftRow = ({
8455
8560
  import * as React52 from "react";
8456
8561
  import * as PopoverPrimitive13 from "@radix-ui/react-popover";
8457
8562
  import * as TooltipPrimitive6 from "@radix-ui/react-tooltip";
8458
- import { Icon as Icon36, faFilterOutline as faFilterOutline6, faPlusOutline as faPlusOutline4, faChevronDownOutline as faChevronDownOutline4, faXmarkOutline as faXmarkOutline5 } from "@l3mpire/icons";
8563
+ import { Icon as Icon38, faFilterOutline as faFilterOutline6, faPlusOutline as faPlusOutline4, faChevronDownOutline as faChevronDownOutline4, faXmarkOutline as faXmarkOutline5 } from "@l3mpire/icons";
8459
8564
  import { jsx as jsx59, jsxs as jsxs53 } from "react/jsx-runtime";
8460
8565
  var ghostBtn2 = [
8461
8566
  "flex items-center gap-sm px-base py-sm",
@@ -8629,7 +8734,7 @@ var SummaryChip = ({
8629
8734
  className
8630
8735
  ),
8631
8736
  children: [
8632
- /* @__PURE__ */ jsx59(Icon36, { icon: faFilterOutline6, size: "sm", className: "shrink-0 text-foreground" }),
8737
+ /* @__PURE__ */ jsx59(Icon38, { icon: faFilterOutline6, size: "sm", className: "shrink-0 text-foreground" }),
8633
8738
  /* @__PURE__ */ jsx59("span", { className: "text-sm font-medium leading-sm whitespace-nowrap text-foreground", children: "Filters" }),
8634
8739
  count > 0 && /* @__PURE__ */ jsx59("span", { className: "flex items-center p-2xs rounded-xs bg-filter-chip-badge-bg", children: /* @__PURE__ */ jsx59("span", { className: "text-[10px] font-medium leading-2xs text-filter-chip-badge-text", children: count }) })
8635
8740
  ]
@@ -8685,13 +8790,13 @@ var SummaryChip = ({
8685
8790
  open: addSelectorOpen,
8686
8791
  onOpenChange: setAddSelectorOpen,
8687
8792
  children: /* @__PURE__ */ jsxs53("button", { type: "button", className: cn(ghostBtn2, "text-foreground"), children: [
8688
- /* @__PURE__ */ jsx59(Icon36, { icon: faPlusOutline4, size: "sm", className: "text-foreground" }),
8793
+ /* @__PURE__ */ jsx59(Icon38, { icon: faPlusOutline4, size: "sm", className: "text-foreground" }),
8689
8794
  "Add filter"
8690
8795
  ] })
8691
8796
  }
8692
8797
  ),
8693
8798
  /* @__PURE__ */ jsxs53("button", { type: "button", onClick: handleAddGroup, className: cn(ghostBtn2, "text-foreground"), children: [
8694
- /* @__PURE__ */ jsx59(Icon36, { icon: faPlusOutline4, size: "sm", className: "text-foreground" }),
8799
+ /* @__PURE__ */ jsx59(Icon38, { icon: faPlusOutline4, size: "sm", className: "text-foreground" }),
8695
8800
  "Add filters group"
8696
8801
  ] })
8697
8802
  ] }),
@@ -8705,7 +8810,7 @@ var SummaryChip = ({
8705
8810
  },
8706
8811
  className: cn(ghostBtn2, "text-destructive"),
8707
8812
  children: [
8708
- /* @__PURE__ */ jsx59(Icon36, { icon: faXmarkOutline5, size: "sm", className: "text-destructive" }),
8813
+ /* @__PURE__ */ jsx59(Icon38, { icon: faXmarkOutline5, size: "sm", className: "text-destructive" }),
8709
8814
  "Clear filters"
8710
8815
  ]
8711
8816
  }
@@ -8742,7 +8847,7 @@ var DraftRow2 = ({ properties, onSelect, open: openProp, onOpenChange }) => {
8742
8847
  ),
8743
8848
  children: [
8744
8849
  /* @__PURE__ */ jsx59("span", { className: "text-sm font-regular leading-sm text-muted-foreground whitespace-nowrap", children: "Select property" }),
8745
- /* @__PURE__ */ jsx59(Icon36, { icon: faChevronDownOutline4, size: "xs", className: "shrink-0 text-foreground" })
8850
+ /* @__PURE__ */ jsx59(Icon38, { icon: faChevronDownOutline4, size: "xs", className: "shrink-0 text-foreground" })
8746
8851
  ]
8747
8852
  }
8748
8853
  ) })
@@ -8769,7 +8874,7 @@ function useFilterBarMode(ref, override, breakpoint = DEFAULT_BREAKPOINT) {
8769
8874
  }
8770
8875
 
8771
8876
  // src/components/ui/filter/filter-system.tsx
8772
- import { Fragment as Fragment4, jsx as jsx60, jsxs as jsxs54 } from "react/jsx-runtime";
8877
+ import { Fragment as Fragment5, jsx as jsx60, jsxs as jsxs54 } from "react/jsx-runtime";
8773
8878
  var FilterSystem = ({
8774
8879
  properties,
8775
8880
  filterState,
@@ -8888,7 +8993,7 @@ var FilterSystem = ({
8888
8993
  iconOnly: isMinimal
8889
8994
  }
8890
8995
  ),
8891
- isMinimal ? /* @__PURE__ */ jsx60(Fragment4, { children: /* @__PURE__ */ jsx60(
8996
+ isMinimal ? /* @__PURE__ */ jsx60(Fragment5, { children: /* @__PURE__ */ jsx60(
8892
8997
  SummaryChip,
8893
8998
  {
8894
8999
  count: totalCount,
@@ -8916,7 +9021,7 @@ var FilterSystem = ({
8916
9021
  }
8917
9022
  ) }) : (
8918
9023
  /* ── DEFAULT MODE ────────────────────────────────────── */
8919
- /* @__PURE__ */ jsxs54(Fragment4, { children: [
9024
+ /* @__PURE__ */ jsxs54(Fragment5, { children: [
8920
9025
  showAdvancedChip && /* @__PURE__ */ jsx60(
8921
9026
  AdvancedPopover,
8922
9027
  {
@@ -8970,7 +9075,7 @@ var FilterSystem = ({
8970
9075
  {
8971
9076
  type: "button",
8972
9077
  className: "shrink-0 inline-flex items-center justify-center size-8 rounded-md border border-btn-outlined-neutral-border-default bg-gradient-to-t from-btn-outlined-neutral-bg-default from-[10%] to-btn-outlined-neutral-bg-gradient-to-default shadow-sm cursor-pointer transition-colors hover:from-btn-outlined-neutral-bg-hover hover:to-btn-outlined-neutral-bg-gradient-to-hover",
8973
- children: /* @__PURE__ */ jsx60(Icon37, { icon: faPlusOutline5, size: "sm", className: "text-foreground" })
9078
+ children: /* @__PURE__ */ jsx60(Icon39, { icon: faPlusOutline5, size: "sm", className: "text-foreground" })
8974
9079
  }
8975
9080
  ) : /* @__PURE__ */ jsx60(FilterBarButton, {})
8976
9081
  }