@l3mpire/ui 2.21.1 → 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/USAGE.md +43 -0
- package/dist/index.d.mts +25 -2
- package/dist/index.d.ts +25 -2
- package/dist/index.js +329 -145
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +317 -133
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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("
|
|
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) =>
|
|
5325
|
+
return value.map((v) => resolveLabel(String(v), dynamicOptions, options)).join(", ");
|
|
5309
5326
|
}
|
|
5310
|
-
|
|
5311
|
-
return resolved;
|
|
5327
|
+
return resolveLabel(String(value[0]), dynamicOptions, options);
|
|
5312
5328
|
}
|
|
5313
|
-
return
|
|
5329
|
+
return resolveLabel(String(value), dynamicOptions, options);
|
|
5314
5330
|
}
|
|
5315
|
-
function
|
|
5331
|
+
function resolveLabel(raw, dynamicOptions, options) {
|
|
5316
5332
|
if (dynamicOptions) {
|
|
5317
|
-
const
|
|
5318
|
-
if (
|
|
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((
|
|
6646
|
-
|
|
6647
|
-
|
|
6648
|
-
|
|
6649
|
-
|
|
6650
|
-
|
|
6651
|
-
|
|
6652
|
-
|
|
6653
|
-
|
|
6654
|
-
|
|
6655
|
-
|
|
6656
|
-
|
|
6657
|
-
|
|
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((
|
|
6690
|
-
const
|
|
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(
|
|
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,14 +6888,14 @@ 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
|
|
6891
|
+
Icon as Icon29,
|
|
6832
6892
|
faChevronLeftOutline as faChevronLeftOutline3,
|
|
6833
6893
|
faChevronRightOutline as faChevronRightOutline3,
|
|
6834
6894
|
faMagnifyingGlassOutline,
|
|
6835
6895
|
faFilterOutline as faFilterOutline3
|
|
6836
6896
|
} from "@l3mpire/icons";
|
|
6837
|
-
import {
|
|
6838
|
-
var AdvancedFilterFooter = ({ onClick, count }) => /* @__PURE__ */ jsxs44(
|
|
6897
|
+
import { jsx as jsx50, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
6898
|
+
var AdvancedFilterFooter = ({ onClick, count }) => /* @__PURE__ */ jsxs44("div", { className: "shrink-0 flex flex-col", children: [
|
|
6839
6899
|
/* @__PURE__ */ jsx50("div", { className: "h-px bg-dropdown-border mx-xs" }),
|
|
6840
6900
|
/* @__PURE__ */ jsxs44(
|
|
6841
6901
|
"button",
|
|
@@ -6846,7 +6906,7 @@ var AdvancedFilterFooter = ({ onClick, count }) => /* @__PURE__ */ jsxs44(Fragme
|
|
|
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
|
-
|
|
6909
|
+
Icon29,
|
|
6850
6910
|
{
|
|
6851
6911
|
icon: faFilterOutline3,
|
|
6852
6912
|
size: "sm",
|
|
@@ -6886,9 +6946,21 @@ var PropertySelector = ({
|
|
|
6886
6946
|
setSearch("");
|
|
6887
6947
|
}
|
|
6888
6948
|
}, [open]);
|
|
6949
|
+
const pinnedGroupIds = React44.useMemo(() => {
|
|
6950
|
+
const set = /* @__PURE__ */ new Set();
|
|
6951
|
+
for (const p of properties) {
|
|
6952
|
+
if (p.groupPinned) set.add(p.group);
|
|
6953
|
+
}
|
|
6954
|
+
return set;
|
|
6955
|
+
}, [properties]);
|
|
6956
|
+
const pinnedProperties = React44.useMemo(
|
|
6957
|
+
() => properties.filter((p) => pinnedGroupIds.has(p.group)),
|
|
6958
|
+
[properties, pinnedGroupIds]
|
|
6959
|
+
);
|
|
6889
6960
|
const groups = React44.useMemo(() => {
|
|
6890
6961
|
const map = /* @__PURE__ */ new Map();
|
|
6891
6962
|
for (const prop of properties) {
|
|
6963
|
+
if (pinnedGroupIds.has(prop.group)) continue;
|
|
6892
6964
|
const existing = map.get(prop.group);
|
|
6893
6965
|
if (existing) {
|
|
6894
6966
|
existing.count++;
|
|
@@ -6902,12 +6974,14 @@ var PropertySelector = ({
|
|
|
6902
6974
|
}
|
|
6903
6975
|
}
|
|
6904
6976
|
return Array.from(map.values());
|
|
6905
|
-
}, [properties]);
|
|
6906
|
-
const
|
|
6907
|
-
if (!search || activeGroup) return
|
|
6977
|
+
}, [properties, pinnedGroupIds]);
|
|
6978
|
+
const filteredPinnedProperties = React44.useMemo(() => {
|
|
6979
|
+
if (!search || activeGroup) return pinnedProperties;
|
|
6908
6980
|
const lower = search.toLowerCase();
|
|
6909
|
-
return
|
|
6910
|
-
|
|
6981
|
+
return pinnedProperties.filter(
|
|
6982
|
+
(p) => p.label.toLowerCase().includes(lower)
|
|
6983
|
+
);
|
|
6984
|
+
}, [pinnedProperties, search, activeGroup]);
|
|
6911
6985
|
const filteredGroups = React44.useMemo(() => {
|
|
6912
6986
|
if (!search || activeGroup) return groups;
|
|
6913
6987
|
const lower = search.toLowerCase();
|
|
@@ -6925,7 +6999,13 @@ var PropertySelector = ({
|
|
|
6925
6999
|
return groupProps.filter((p) => p.label.toLowerCase().includes(lower));
|
|
6926
7000
|
}, [properties, activeGroup, search]);
|
|
6927
7001
|
const activeGroupInfo = groups.find((g) => g.group === activeGroup);
|
|
6928
|
-
const
|
|
7002
|
+
const nonPinnedSearchResults = React44.useMemo(() => {
|
|
7003
|
+
if (!search || activeGroup) return [];
|
|
7004
|
+
const lower = search.toLowerCase();
|
|
7005
|
+
return properties.filter(
|
|
7006
|
+
(p) => !pinnedGroupIds.has(p.group) && p.label.toLowerCase().includes(lower)
|
|
7007
|
+
);
|
|
7008
|
+
}, [properties, search, activeGroup, pinnedGroupIds]);
|
|
6929
7009
|
return /* @__PURE__ */ jsxs44(PopoverPrimitive6.Root, { open, onOpenChange, children: [
|
|
6930
7010
|
/* @__PURE__ */ jsx50(PopoverPrimitive6.Trigger, { asChild: true, children }),
|
|
6931
7011
|
/* @__PURE__ */ jsx50(PopoverPrimitive6.Portal, { children: /* @__PURE__ */ jsxs44(
|
|
@@ -6935,20 +7015,20 @@ var PropertySelector = ({
|
|
|
6935
7015
|
align: "start",
|
|
6936
7016
|
onCloseAutoFocus: (e) => e.preventDefault(),
|
|
6937
7017
|
className: cn(
|
|
6938
|
-
"z-50 flex flex-col gap-xs overflow-
|
|
7018
|
+
"z-50 flex flex-col gap-xs overflow-hidden p-xs",
|
|
6939
7019
|
"bg-dropdown-bg border border-dropdown-border rounded-md shadow-lg",
|
|
6940
7020
|
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
6941
7021
|
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
6942
7022
|
"data-[side=bottom]:slide-in-from-top-2",
|
|
6943
|
-
"min-w-[230px]"
|
|
7023
|
+
"min-w-[230px] max-h-[360px]"
|
|
6944
7024
|
),
|
|
6945
7025
|
children: [
|
|
6946
7026
|
activeGroup === null ? (
|
|
6947
|
-
/* ── Level 1: Search + Categories
|
|
6948
|
-
/* @__PURE__ */ jsxs44("div", { className: "flex flex-col gap-xs", children: [
|
|
6949
|
-
/* @__PURE__ */ jsxs44("div", { className: "flex items-center gap-base px-md py-base border border-input rounded-md", children: [
|
|
7027
|
+
/* ── Level 1: Search + (pinned props) + Categories ──────── */
|
|
7028
|
+
/* @__PURE__ */ jsxs44("div", { className: "flex flex-col gap-xs flex-1 min-h-0", children: [
|
|
7029
|
+
/* @__PURE__ */ jsxs44("div", { className: "shrink-0 flex items-center gap-base px-md py-base border border-input rounded-md", children: [
|
|
6950
7030
|
/* @__PURE__ */ jsx50(
|
|
6951
|
-
|
|
7031
|
+
Icon29,
|
|
6952
7032
|
{
|
|
6953
7033
|
icon: faMagnifyingGlassOutline,
|
|
6954
7034
|
size: "sm",
|
|
@@ -6967,9 +7047,8 @@ var PropertySelector = ({
|
|
|
6967
7047
|
}
|
|
6968
7048
|
)
|
|
6969
7049
|
] }),
|
|
6970
|
-
|
|
6971
|
-
|
|
6972
|
-
/* @__PURE__ */ jsx50("div", { className: "flex flex-col max-h-[300px] overflow-y-auto", children: globalSearchResults.map((prop) => /* @__PURE__ */ jsxs44(
|
|
7050
|
+
/* @__PURE__ */ jsxs44("div", { className: "flex flex-col flex-1 min-h-0 overflow-y-auto", children: [
|
|
7051
|
+
filteredPinnedProperties.map((prop) => /* @__PURE__ */ jsxs44(
|
|
6973
7052
|
"button",
|
|
6974
7053
|
{
|
|
6975
7054
|
type: "button",
|
|
@@ -6980,22 +7059,46 @@ var PropertySelector = ({
|
|
|
6980
7059
|
className: "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-dropdown-item-hover",
|
|
6981
7060
|
children: [
|
|
6982
7061
|
/* @__PURE__ */ jsx50(
|
|
6983
|
-
|
|
7062
|
+
Icon29,
|
|
6984
7063
|
{
|
|
6985
7064
|
icon: prop.icon,
|
|
6986
7065
|
size: "sm",
|
|
6987
7066
|
className: "shrink-0 text-dropdown-item-icon"
|
|
6988
7067
|
}
|
|
6989
7068
|
),
|
|
6990
|
-
/* @__PURE__ */ jsx50("span", { className: "flex-1 text-sm font-regular leading-sm text-dropdown-item-text text-left truncate", children: prop.label })
|
|
6991
|
-
/* @__PURE__ */ jsx50("span", { className: "text-xs font-regular leading-xs text-muted-foreground", children: prop.groupLabel })
|
|
7069
|
+
/* @__PURE__ */ jsx50("span", { className: "flex-1 text-sm font-regular leading-sm text-dropdown-item-text text-left truncate", children: prop.label })
|
|
6992
7070
|
]
|
|
6993
7071
|
},
|
|
6994
7072
|
prop.id
|
|
6995
|
-
))
|
|
6996
|
-
|
|
6997
|
-
|
|
6998
|
-
|
|
7073
|
+
)),
|
|
7074
|
+
search ? (
|
|
7075
|
+
/* ── Flat matches across non-pinned groups ────────── */
|
|
7076
|
+
nonPinnedSearchResults.map((prop) => /* @__PURE__ */ jsxs44(
|
|
7077
|
+
"button",
|
|
7078
|
+
{
|
|
7079
|
+
type: "button",
|
|
7080
|
+
onClick: () => {
|
|
7081
|
+
onSelect(prop);
|
|
7082
|
+
onOpenChange?.(false);
|
|
7083
|
+
},
|
|
7084
|
+
className: "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-dropdown-item-hover",
|
|
7085
|
+
children: [
|
|
7086
|
+
/* @__PURE__ */ jsx50(
|
|
7087
|
+
Icon29,
|
|
7088
|
+
{
|
|
7089
|
+
icon: prop.icon,
|
|
7090
|
+
size: "sm",
|
|
7091
|
+
className: "shrink-0 text-dropdown-item-icon"
|
|
7092
|
+
}
|
|
7093
|
+
),
|
|
7094
|
+
/* @__PURE__ */ jsx50("span", { className: "flex-1 text-sm font-regular leading-sm text-dropdown-item-text text-left truncate", children: prop.label }),
|
|
7095
|
+
/* @__PURE__ */ jsx50("span", { className: "text-xs font-regular leading-xs text-muted-foreground", children: prop.groupLabel })
|
|
7096
|
+
]
|
|
7097
|
+
},
|
|
7098
|
+
prop.id
|
|
7099
|
+
))
|
|
7100
|
+
) : (
|
|
7101
|
+
/* ── Category list ────────────────────────────────── */
|
|
6999
7102
|
filteredGroups.map((g) => /* @__PURE__ */ jsxs44(
|
|
7000
7103
|
"button",
|
|
7001
7104
|
{
|
|
@@ -7007,7 +7110,7 @@ var PropertySelector = ({
|
|
|
7007
7110
|
className: "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-dropdown-item-hover",
|
|
7008
7111
|
children: [
|
|
7009
7112
|
/* @__PURE__ */ jsx50(
|
|
7010
|
-
|
|
7113
|
+
Icon29,
|
|
7011
7114
|
{
|
|
7012
7115
|
icon: g.groupIcon,
|
|
7013
7116
|
size: "sm",
|
|
@@ -7017,7 +7120,7 @@ var PropertySelector = ({
|
|
|
7017
7120
|
/* @__PURE__ */ jsx50("span", { className: "flex-1 text-sm font-regular leading-sm text-dropdown-item-text text-left truncate", children: g.groupLabel }),
|
|
7018
7121
|
/* @__PURE__ */ jsx50("span", { className: "text-xs font-medium leading-xs text-muted-foreground", children: g.count }),
|
|
7019
7122
|
/* @__PURE__ */ jsx50(
|
|
7020
|
-
|
|
7123
|
+
Icon29,
|
|
7021
7124
|
{
|
|
7022
7125
|
icon: faChevronRightOutline3,
|
|
7023
7126
|
size: "xs",
|
|
@@ -7027,14 +7130,14 @@ var PropertySelector = ({
|
|
|
7027
7130
|
]
|
|
7028
7131
|
},
|
|
7029
7132
|
g.group
|
|
7030
|
-
))
|
|
7031
|
-
|
|
7032
|
-
|
|
7033
|
-
)
|
|
7133
|
+
))
|
|
7134
|
+
),
|
|
7135
|
+
filteredPinnedProperties.length === 0 && (search ? nonPinnedSearchResults.length === 0 : filteredGroups.length === 0) && /* @__PURE__ */ jsx50("span", { className: "p-base text-sm text-muted-foreground", children: "No results" })
|
|
7136
|
+
] })
|
|
7034
7137
|
] })
|
|
7035
7138
|
) : (
|
|
7036
7139
|
/* ── Level 2: Properties ─────────────────────────────────── */
|
|
7037
|
-
/* @__PURE__ */ jsxs44("div", { className: "flex flex-col gap-xs", children: [
|
|
7140
|
+
/* @__PURE__ */ jsxs44("div", { className: "flex flex-col gap-xs flex-1 min-h-0", children: [
|
|
7038
7141
|
/* @__PURE__ */ jsxs44(
|
|
7039
7142
|
"button",
|
|
7040
7143
|
{
|
|
@@ -7043,10 +7146,10 @@ var PropertySelector = ({
|
|
|
7043
7146
|
setActiveGroup(null);
|
|
7044
7147
|
setSearch("");
|
|
7045
7148
|
},
|
|
7046
|
-
className: "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-dropdown-item-hover",
|
|
7149
|
+
className: "shrink-0 flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-dropdown-item-hover",
|
|
7047
7150
|
children: [
|
|
7048
7151
|
/* @__PURE__ */ jsx50(
|
|
7049
|
-
|
|
7152
|
+
Icon29,
|
|
7050
7153
|
{
|
|
7051
7154
|
icon: faChevronLeftOutline3,
|
|
7052
7155
|
size: "sm",
|
|
@@ -7057,9 +7160,9 @@ var PropertySelector = ({
|
|
|
7057
7160
|
]
|
|
7058
7161
|
}
|
|
7059
7162
|
),
|
|
7060
|
-
/* @__PURE__ */ jsxs44("div", { className: "flex items-center gap-base px-md py-base border border-input rounded-md", children: [
|
|
7163
|
+
/* @__PURE__ */ jsxs44("div", { className: "shrink-0 flex items-center gap-base px-md py-base border border-input rounded-md", children: [
|
|
7061
7164
|
/* @__PURE__ */ jsx50(
|
|
7062
|
-
|
|
7165
|
+
Icon29,
|
|
7063
7166
|
{
|
|
7064
7167
|
icon: faMagnifyingGlassOutline,
|
|
7065
7168
|
size: "sm",
|
|
@@ -7078,7 +7181,7 @@ var PropertySelector = ({
|
|
|
7078
7181
|
}
|
|
7079
7182
|
)
|
|
7080
7183
|
] }),
|
|
7081
|
-
/* @__PURE__ */ jsxs44("div", { className: "flex flex-col
|
|
7184
|
+
/* @__PURE__ */ jsxs44("div", { className: "flex flex-col flex-1 min-h-0 overflow-y-auto", children: [
|
|
7082
7185
|
filteredProperties.map((prop) => /* @__PURE__ */ jsxs44(
|
|
7083
7186
|
"button",
|
|
7084
7187
|
{
|
|
@@ -7090,7 +7193,7 @@ var PropertySelector = ({
|
|
|
7090
7193
|
className: "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-dropdown-item-hover",
|
|
7091
7194
|
children: [
|
|
7092
7195
|
/* @__PURE__ */ jsx50(
|
|
7093
|
-
|
|
7196
|
+
Icon29,
|
|
7094
7197
|
{
|
|
7095
7198
|
icon: prop.icon,
|
|
7096
7199
|
size: "sm",
|
|
@@ -7122,7 +7225,7 @@ PropertySelector.displayName = "PropertySelector";
|
|
|
7122
7225
|
|
|
7123
7226
|
// src/components/ui/filter/kebab-menu.tsx
|
|
7124
7227
|
import * as PopoverPrimitive7 from "@radix-ui/react-popover";
|
|
7125
|
-
import { Icon as
|
|
7228
|
+
import { Icon as Icon30, faArrowRightOutline as faArrowRightOutline2, faTrashOutline } from "@l3mpire/icons";
|
|
7126
7229
|
import { jsx as jsx51, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
7127
7230
|
var KebabMenu = ({
|
|
7128
7231
|
onConvertToAdvanced,
|
|
@@ -7158,7 +7261,7 @@ var KebabMenu = ({
|
|
|
7158
7261
|
className: "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-dropdown-item-hover",
|
|
7159
7262
|
children: [
|
|
7160
7263
|
/* @__PURE__ */ jsx51(
|
|
7161
|
-
|
|
7264
|
+
Icon30,
|
|
7162
7265
|
{
|
|
7163
7266
|
icon: faArrowRightOutline2,
|
|
7164
7267
|
size: "sm",
|
|
@@ -7181,7 +7284,7 @@ var KebabMenu = ({
|
|
|
7181
7284
|
className: "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-dropdown-item-hover",
|
|
7182
7285
|
children: [
|
|
7183
7286
|
/* @__PURE__ */ jsx51(
|
|
7184
|
-
|
|
7287
|
+
Icon30,
|
|
7185
7288
|
{
|
|
7186
7289
|
icon: faTrashOutline,
|
|
7187
7290
|
size: "sm",
|
|
@@ -7201,7 +7304,7 @@ KebabMenu.displayName = "KebabMenu";
|
|
|
7201
7304
|
// src/components/ui/filter/filter-editor.tsx
|
|
7202
7305
|
import * as React45 from "react";
|
|
7203
7306
|
import * as PopoverPrimitive8 from "@radix-ui/react-popover";
|
|
7204
|
-
import { Icon as
|
|
7307
|
+
import { Icon as Icon31 } from "@l3mpire/icons";
|
|
7205
7308
|
import { jsx as jsx52, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
7206
7309
|
var FilterEditor = ({
|
|
7207
7310
|
propertyDef,
|
|
@@ -7265,7 +7368,7 @@ var FilterEditor = ({
|
|
|
7265
7368
|
children: [
|
|
7266
7369
|
/* @__PURE__ */ jsxs46("div", { className: "flex items-center gap-base px-base pt-base pb-xs border-b border-border", children: [
|
|
7267
7370
|
/* @__PURE__ */ jsx52(
|
|
7268
|
-
|
|
7371
|
+
Icon31,
|
|
7269
7372
|
{
|
|
7270
7373
|
icon: propertyDef.icon,
|
|
7271
7374
|
size: "sm",
|
|
@@ -7315,6 +7418,7 @@ FilterEditor.displayName = "FilterEditor";
|
|
|
7315
7418
|
// src/components/ui/filter/interactive-filter-chip.tsx
|
|
7316
7419
|
import * as React46 from "react";
|
|
7317
7420
|
import * as PopoverPrimitive9 from "@radix-ui/react-popover";
|
|
7421
|
+
import { Icon as Icon32 } from "@l3mpire/icons";
|
|
7318
7422
|
import { jsx as jsx53, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
7319
7423
|
var SegmentPopover = ({
|
|
7320
7424
|
open,
|
|
@@ -7393,9 +7497,31 @@ var InteractiveFilterChip = ({
|
|
|
7393
7497
|
setValueOpen(false);
|
|
7394
7498
|
};
|
|
7395
7499
|
const hasOperator = !!condition.operator;
|
|
7396
|
-
const displayValue = formatFilterValue(
|
|
7500
|
+
const displayValue = formatFilterValue(
|
|
7501
|
+
condition.value,
|
|
7502
|
+
propertyDef.dynamicOptions,
|
|
7503
|
+
false,
|
|
7504
|
+
propertyDef.options
|
|
7505
|
+
);
|
|
7397
7506
|
const hasValue = hasOperator && displayValue != null;
|
|
7398
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]);
|
|
7399
7525
|
return /* @__PURE__ */ jsxs47(
|
|
7400
7526
|
"div",
|
|
7401
7527
|
{
|
|
@@ -7476,6 +7602,7 @@ var InteractiveFilterChip = ({
|
|
|
7476
7602
|
hasBorder: true,
|
|
7477
7603
|
label: hasValue ? displayValue : "Enter value",
|
|
7478
7604
|
badgeCount,
|
|
7605
|
+
adornment: hasValue ? valueLeading : void 0,
|
|
7479
7606
|
onClick: () => setValueOpen(true)
|
|
7480
7607
|
}
|
|
7481
7608
|
) }),
|
|
@@ -7530,11 +7657,11 @@ InteractiveFilterChip.displayName = "InteractiveFilterChip";
|
|
|
7530
7657
|
|
|
7531
7658
|
// src/components/ui/filter/filter-system.tsx
|
|
7532
7659
|
import * as React54 from "react";
|
|
7533
|
-
import { Icon as
|
|
7660
|
+
import { Icon as Icon39, faPlusOutline as faPlusOutline5 } from "@l3mpire/icons";
|
|
7534
7661
|
|
|
7535
7662
|
// src/components/ui/filter/advanced-chip.tsx
|
|
7536
7663
|
import * as React47 from "react";
|
|
7537
|
-
import { Icon as
|
|
7664
|
+
import { Icon as Icon33, faXmarkOutline as faXmarkOutline3, faFilterOutline as faFilterOutline4 } from "@l3mpire/icons";
|
|
7538
7665
|
import { jsx as jsx54, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
7539
7666
|
var btnBase = [
|
|
7540
7667
|
"flex items-center justify-center",
|
|
@@ -7560,7 +7687,7 @@ var AdvancedChip = React47.forwardRef(
|
|
|
7560
7687
|
...props,
|
|
7561
7688
|
children: [
|
|
7562
7689
|
/* @__PURE__ */ jsx54(
|
|
7563
|
-
|
|
7690
|
+
Icon33,
|
|
7564
7691
|
{
|
|
7565
7692
|
icon: faFilterOutline4,
|
|
7566
7693
|
size: "sm",
|
|
@@ -7586,7 +7713,7 @@ var AdvancedChip = React47.forwardRef(
|
|
|
7586
7713
|
"rounded-r-md -ml-px"
|
|
7587
7714
|
),
|
|
7588
7715
|
"aria-label": "Clear all advanced filters",
|
|
7589
|
-
children: /* @__PURE__ */ jsx54(
|
|
7716
|
+
children: /* @__PURE__ */ jsx54(Icon33, { icon: faXmarkOutline3, size: "sm", className: "text-foreground" })
|
|
7590
7717
|
}
|
|
7591
7718
|
)
|
|
7592
7719
|
] })
|
|
@@ -7596,19 +7723,19 @@ AdvancedChip.displayName = "AdvancedChip";
|
|
|
7596
7723
|
// src/components/ui/filter/advanced-popover.tsx
|
|
7597
7724
|
import * as React51 from "react";
|
|
7598
7725
|
import * as PopoverPrimitive12 from "@radix-ui/react-popover";
|
|
7599
|
-
import { Icon as
|
|
7726
|
+
import { Icon as Icon37, faPlusOutline as faPlusOutline3, faChevronDownOutline as faChevronDownOutline3, faXmarkOutline as faXmarkOutline4 } from "@l3mpire/icons";
|
|
7600
7727
|
|
|
7601
7728
|
// src/components/ui/filter/advanced-row.tsx
|
|
7602
7729
|
import * as React49 from "react";
|
|
7603
7730
|
import * as PopoverPrimitive11 from "@radix-ui/react-popover";
|
|
7604
7731
|
import * as TooltipPrimitive4 from "@radix-ui/react-tooltip";
|
|
7605
|
-
import { Icon as
|
|
7732
|
+
import { Icon as Icon35, faChevronDownOutline as faChevronDownOutline2 } from "@l3mpire/icons";
|
|
7606
7733
|
|
|
7607
7734
|
// src/components/ui/filter/filter-node-actions.tsx
|
|
7608
7735
|
import * as React48 from "react";
|
|
7609
7736
|
import * as PopoverPrimitive10 from "@radix-ui/react-popover";
|
|
7610
7737
|
import {
|
|
7611
|
-
Icon as
|
|
7738
|
+
Icon as Icon34,
|
|
7612
7739
|
faEllipsisOutline as faEllipsisOutline2,
|
|
7613
7740
|
faCopyOutline,
|
|
7614
7741
|
faTrashOutline as faTrashOutline2,
|
|
@@ -7649,7 +7776,7 @@ var FilterNodeActions = ({
|
|
|
7649
7776
|
className: "shrink-0 flex items-center justify-center p-sm rounded-md cursor-pointer transition-colors hover:bg-accent",
|
|
7650
7777
|
"aria-label": "More actions",
|
|
7651
7778
|
children: /* @__PURE__ */ jsx55(
|
|
7652
|
-
|
|
7779
|
+
Icon34,
|
|
7653
7780
|
{
|
|
7654
7781
|
icon: faEllipsisOutline2,
|
|
7655
7782
|
size: "sm",
|
|
@@ -7685,7 +7812,7 @@ var FilterNodeActions = ({
|
|
|
7685
7812
|
),
|
|
7686
7813
|
children: [
|
|
7687
7814
|
/* @__PURE__ */ jsx55(
|
|
7688
|
-
|
|
7815
|
+
Icon34,
|
|
7689
7816
|
{
|
|
7690
7817
|
icon: item.icon,
|
|
7691
7818
|
size: "sm",
|
|
@@ -7716,7 +7843,7 @@ var FilterNodeActions = ({
|
|
|
7716
7843
|
FilterNodeActions.displayName = "FilterNodeActions";
|
|
7717
7844
|
|
|
7718
7845
|
// src/components/ui/filter/advanced-row.tsx
|
|
7719
|
-
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";
|
|
7720
7847
|
var selectBtnStyle = [
|
|
7721
7848
|
"flex items-center gap-base",
|
|
7722
7849
|
"px-base py-sm",
|
|
@@ -7740,6 +7867,19 @@ var AdvancedRow = ({
|
|
|
7740
7867
|
const [operatorOpen, setOperatorOpen] = React49.useState(false);
|
|
7741
7868
|
const [propertyOpen, setPropertyOpen] = React49.useState(false);
|
|
7742
7869
|
const [valueOpen, setValueOpen] = React49.useState(false);
|
|
7870
|
+
const { pinnedProperties, unpinnedProperties } = React49.useMemo(() => {
|
|
7871
|
+
const pinnedGroups = /* @__PURE__ */ new Set();
|
|
7872
|
+
for (const p of properties) {
|
|
7873
|
+
if (p.groupPinned) pinnedGroups.add(p.group);
|
|
7874
|
+
}
|
|
7875
|
+
const pinned = [];
|
|
7876
|
+
const unpinned = [];
|
|
7877
|
+
for (const p of properties) {
|
|
7878
|
+
if (pinnedGroups.has(p.group)) pinned.push(p);
|
|
7879
|
+
else unpinned.push(p);
|
|
7880
|
+
}
|
|
7881
|
+
return { pinnedProperties: pinned, unpinnedProperties: unpinned };
|
|
7882
|
+
}, [properties]);
|
|
7743
7883
|
const handleOperatorSelect = (op) => {
|
|
7744
7884
|
if (isNoValueOperator(op)) {
|
|
7745
7885
|
onUpdate({ ...condition, operator: op, value: null });
|
|
@@ -7752,7 +7892,18 @@ var AdvancedRow = ({
|
|
|
7752
7892
|
const handleValueChange = (val) => {
|
|
7753
7893
|
onUpdate({ ...condition, value: val });
|
|
7754
7894
|
};
|
|
7755
|
-
const displayValue = formatFilterValue(
|
|
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]);
|
|
7756
7907
|
const badgeCount = getBadgeCount(condition.value);
|
|
7757
7908
|
const hasValue = displayValue != null;
|
|
7758
7909
|
return /* @__PURE__ */ jsxs50("div", { className: "flex items-center gap-base w-full min-w-0", children: [
|
|
@@ -7772,11 +7923,11 @@ var AdvancedRow = ({
|
|
|
7772
7923
|
] }) }) }),
|
|
7773
7924
|
/* @__PURE__ */ jsxs50(PopoverPrimitive11.Root, { open: propertyOpen, onOpenChange: setPropertyOpen, children: [
|
|
7774
7925
|
/* @__PURE__ */ jsx56(PopoverPrimitive11.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs50("button", { type: "button", className: cn(selectBtnStyle, "min-w-0"), children: [
|
|
7775
|
-
/* @__PURE__ */ jsx56(
|
|
7926
|
+
/* @__PURE__ */ jsx56(Icon35, { icon: propertyDef.icon, size: "sm", className: "shrink-0 text-muted-foreground" }),
|
|
7776
7927
|
/* @__PURE__ */ jsx56("span", { className: "text-sm font-regular leading-sm text-foreground whitespace-nowrap truncate", children: propertyDef.label }),
|
|
7777
|
-
/* @__PURE__ */ jsx56(
|
|
7928
|
+
/* @__PURE__ */ jsx56(Icon35, { icon: faChevronDownOutline2, size: "xs", className: "shrink-0 text-foreground" })
|
|
7778
7929
|
] }) }),
|
|
7779
|
-
/* @__PURE__ */ jsx56(PopoverPrimitive11.Portal, { children: /* @__PURE__ */
|
|
7930
|
+
/* @__PURE__ */ jsx56(PopoverPrimitive11.Portal, { children: /* @__PURE__ */ jsxs50(
|
|
7780
7931
|
PopoverPrimitive11.Content,
|
|
7781
7932
|
{
|
|
7782
7933
|
sideOffset: 4,
|
|
@@ -7788,33 +7939,56 @@ var AdvancedRow = ({
|
|
|
7788
7939
|
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
|
|
7789
7940
|
"min-w-[200px]"
|
|
7790
7941
|
),
|
|
7791
|
-
children:
|
|
7792
|
-
|
|
7793
|
-
|
|
7794
|
-
|
|
7795
|
-
|
|
7796
|
-
|
|
7797
|
-
|
|
7942
|
+
children: [
|
|
7943
|
+
pinnedProperties.map((p) => /* @__PURE__ */ jsxs50(
|
|
7944
|
+
"button",
|
|
7945
|
+
{
|
|
7946
|
+
type: "button",
|
|
7947
|
+
onClick: () => {
|
|
7948
|
+
onPropertyChange(p);
|
|
7949
|
+
setPropertyOpen(false);
|
|
7950
|
+
},
|
|
7951
|
+
className: cn(
|
|
7952
|
+
"flex items-center gap-base p-base rounded-base cursor-pointer transition-colors text-left",
|
|
7953
|
+
"hover:bg-dropdown-item-hover",
|
|
7954
|
+
p.id === condition.propertyId && "bg-dropdown-item-hover"
|
|
7955
|
+
),
|
|
7956
|
+
children: [
|
|
7957
|
+
/* @__PURE__ */ jsx56(Icon35, { icon: p.icon, size: "sm", className: "shrink-0 text-dropdown-item-icon" }),
|
|
7958
|
+
/* @__PURE__ */ jsx56("span", { className: "text-sm font-regular leading-sm text-dropdown-item-text truncate", children: p.label })
|
|
7959
|
+
]
|
|
7798
7960
|
},
|
|
7799
|
-
|
|
7800
|
-
|
|
7801
|
-
|
|
7802
|
-
|
|
7803
|
-
|
|
7804
|
-
|
|
7805
|
-
|
|
7806
|
-
|
|
7807
|
-
|
|
7808
|
-
|
|
7809
|
-
|
|
7810
|
-
|
|
7961
|
+
p.id
|
|
7962
|
+
)),
|
|
7963
|
+
unpinnedProperties.map((p) => /* @__PURE__ */ jsxs50(
|
|
7964
|
+
"button",
|
|
7965
|
+
{
|
|
7966
|
+
type: "button",
|
|
7967
|
+
onClick: () => {
|
|
7968
|
+
onPropertyChange(p);
|
|
7969
|
+
setPropertyOpen(false);
|
|
7970
|
+
},
|
|
7971
|
+
className: cn(
|
|
7972
|
+
"flex items-center gap-base p-base rounded-base cursor-pointer transition-colors text-left",
|
|
7973
|
+
"hover:bg-dropdown-item-hover",
|
|
7974
|
+
p.id === condition.propertyId && "bg-dropdown-item-hover"
|
|
7975
|
+
),
|
|
7976
|
+
children: [
|
|
7977
|
+
/* @__PURE__ */ jsx56(Icon35, { icon: p.icon, size: "sm", className: "shrink-0 text-dropdown-item-icon" }),
|
|
7978
|
+
/* @__PURE__ */ jsx56("span", { className: "text-sm font-regular leading-sm text-dropdown-item-text truncate", children: p.label }),
|
|
7979
|
+
/* @__PURE__ */ jsx56("span", { className: "ml-auto text-xs font-regular leading-xs text-muted-foreground", children: p.groupLabel })
|
|
7980
|
+
]
|
|
7981
|
+
},
|
|
7982
|
+
p.id
|
|
7983
|
+
))
|
|
7984
|
+
]
|
|
7811
7985
|
}
|
|
7812
7986
|
) })
|
|
7813
7987
|
] }),
|
|
7814
7988
|
/* @__PURE__ */ jsxs50(PopoverPrimitive11.Root, { open: operatorOpen, onOpenChange: setOperatorOpen, children: [
|
|
7815
7989
|
/* @__PURE__ */ jsx56(PopoverPrimitive11.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs50("button", { type: "button", className: cn(selectBtnStyle, "min-w-0"), children: [
|
|
7816
7990
|
/* @__PURE__ */ jsx56("span", { className: "text-sm font-regular leading-sm text-foreground whitespace-nowrap truncate text-left", children: condition.operator ?? "Select" }),
|
|
7817
|
-
/* @__PURE__ */ jsx56(
|
|
7991
|
+
/* @__PURE__ */ jsx56(Icon35, { icon: faChevronDownOutline2, size: "xs", className: "shrink-0 text-foreground" })
|
|
7818
7992
|
] }) }),
|
|
7819
7993
|
/* @__PURE__ */ jsx56(PopoverPrimitive11.Portal, { children: /* @__PURE__ */ jsx56(
|
|
7820
7994
|
PopoverPrimitive11.Content,
|
|
@@ -7875,19 +8049,29 @@ var AdvancedRow = ({
|
|
|
7875
8049
|
type: "button",
|
|
7876
8050
|
className: cn(selectBtnStyle, "flex-1 min-w-[80px] justify-between overflow-hidden"),
|
|
7877
8051
|
children: [
|
|
7878
|
-
multiTags && multiTags.length > 0 ? /* @__PURE__ */ jsx56(ValueTagRow, { tags: multiTags }) : /* @__PURE__ */
|
|
7879
|
-
|
|
7880
|
-
|
|
7881
|
-
|
|
7882
|
-
|
|
7883
|
-
|
|
7884
|
-
|
|
7885
|
-
|
|
7886
|
-
|
|
7887
|
-
|
|
7888
|
-
|
|
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
|
+
] }),
|
|
7889
8073
|
/* @__PURE__ */ jsx56(
|
|
7890
|
-
|
|
8074
|
+
Icon35,
|
|
7891
8075
|
{
|
|
7892
8076
|
icon: faChevronDownOutline2,
|
|
7893
8077
|
size: "xs",
|
|
@@ -8018,7 +8202,7 @@ function ValueTagRow({ tags }) {
|
|
|
8018
8202
|
// src/components/ui/filter/advanced-group.tsx
|
|
8019
8203
|
import * as React50 from "react";
|
|
8020
8204
|
import * as TooltipPrimitive5 from "@radix-ui/react-tooltip";
|
|
8021
|
-
import { Icon as
|
|
8205
|
+
import { Icon as Icon36, faPlusOutline as faPlusOutline2 } from "@l3mpire/icons";
|
|
8022
8206
|
import { jsx as jsx57, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
8023
8207
|
var AdvancedGroup = ({
|
|
8024
8208
|
connector,
|
|
@@ -8064,7 +8248,7 @@ var AdvancedGroup = ({
|
|
|
8064
8248
|
type: "button",
|
|
8065
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",
|
|
8066
8250
|
children: [
|
|
8067
|
-
/* @__PURE__ */ jsx57(
|
|
8251
|
+
/* @__PURE__ */ jsx57(Icon36, { icon: faPlusOutline2, size: "sm" }),
|
|
8068
8252
|
"Add filter"
|
|
8069
8253
|
]
|
|
8070
8254
|
}
|
|
@@ -8281,7 +8465,7 @@ var AdvancedPopover = ({
|
|
|
8281
8465
|
open: addSelectorOpen,
|
|
8282
8466
|
onOpenChange: setAddSelectorOpen,
|
|
8283
8467
|
children: /* @__PURE__ */ jsxs52("button", { type: "button", className: cn(ghostBtn, "text-foreground"), children: [
|
|
8284
|
-
/* @__PURE__ */ jsx58(
|
|
8468
|
+
/* @__PURE__ */ jsx58(Icon37, { icon: faPlusOutline3, size: "sm", className: "text-foreground" }),
|
|
8285
8469
|
"Add filter"
|
|
8286
8470
|
] })
|
|
8287
8471
|
}
|
|
@@ -8293,7 +8477,7 @@ var AdvancedPopover = ({
|
|
|
8293
8477
|
onClick: handleAddGroup,
|
|
8294
8478
|
className: cn(ghostBtn, "text-foreground"),
|
|
8295
8479
|
children: [
|
|
8296
|
-
/* @__PURE__ */ jsx58(
|
|
8480
|
+
/* @__PURE__ */ jsx58(Icon37, { icon: faPlusOutline3, size: "sm", className: "text-foreground" }),
|
|
8297
8481
|
"Add filters group"
|
|
8298
8482
|
]
|
|
8299
8483
|
}
|
|
@@ -8306,7 +8490,7 @@ var AdvancedPopover = ({
|
|
|
8306
8490
|
onClick: handleClearAll,
|
|
8307
8491
|
className: cn(ghostBtn, "text-destructive"),
|
|
8308
8492
|
children: [
|
|
8309
|
-
/* @__PURE__ */ jsx58(
|
|
8493
|
+
/* @__PURE__ */ jsx58(Icon37, { icon: faXmarkOutline4, size: "sm", className: "text-destructive" }),
|
|
8310
8494
|
"Clear filters"
|
|
8311
8495
|
]
|
|
8312
8496
|
}
|
|
@@ -8357,7 +8541,7 @@ var DraftRow = ({
|
|
|
8357
8541
|
children: [
|
|
8358
8542
|
/* @__PURE__ */ jsx58("span", { className: "text-sm font-regular leading-sm text-muted-foreground whitespace-nowrap", children: "Select property" }),
|
|
8359
8543
|
/* @__PURE__ */ jsx58(
|
|
8360
|
-
|
|
8544
|
+
Icon37,
|
|
8361
8545
|
{
|
|
8362
8546
|
icon: faChevronDownOutline3,
|
|
8363
8547
|
size: "xs",
|
|
@@ -8376,7 +8560,7 @@ var DraftRow = ({
|
|
|
8376
8560
|
import * as React52 from "react";
|
|
8377
8561
|
import * as PopoverPrimitive13 from "@radix-ui/react-popover";
|
|
8378
8562
|
import * as TooltipPrimitive6 from "@radix-ui/react-tooltip";
|
|
8379
|
-
import { Icon as
|
|
8563
|
+
import { Icon as Icon38, faFilterOutline as faFilterOutline6, faPlusOutline as faPlusOutline4, faChevronDownOutline as faChevronDownOutline4, faXmarkOutline as faXmarkOutline5 } from "@l3mpire/icons";
|
|
8380
8564
|
import { jsx as jsx59, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
8381
8565
|
var ghostBtn2 = [
|
|
8382
8566
|
"flex items-center gap-sm px-base py-sm",
|
|
@@ -8550,7 +8734,7 @@ var SummaryChip = ({
|
|
|
8550
8734
|
className
|
|
8551
8735
|
),
|
|
8552
8736
|
children: [
|
|
8553
|
-
/* @__PURE__ */ jsx59(
|
|
8737
|
+
/* @__PURE__ */ jsx59(Icon38, { icon: faFilterOutline6, size: "sm", className: "shrink-0 text-foreground" }),
|
|
8554
8738
|
/* @__PURE__ */ jsx59("span", { className: "text-sm font-medium leading-sm whitespace-nowrap text-foreground", children: "Filters" }),
|
|
8555
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 }) })
|
|
8556
8740
|
]
|
|
@@ -8606,13 +8790,13 @@ var SummaryChip = ({
|
|
|
8606
8790
|
open: addSelectorOpen,
|
|
8607
8791
|
onOpenChange: setAddSelectorOpen,
|
|
8608
8792
|
children: /* @__PURE__ */ jsxs53("button", { type: "button", className: cn(ghostBtn2, "text-foreground"), children: [
|
|
8609
|
-
/* @__PURE__ */ jsx59(
|
|
8793
|
+
/* @__PURE__ */ jsx59(Icon38, { icon: faPlusOutline4, size: "sm", className: "text-foreground" }),
|
|
8610
8794
|
"Add filter"
|
|
8611
8795
|
] })
|
|
8612
8796
|
}
|
|
8613
8797
|
),
|
|
8614
8798
|
/* @__PURE__ */ jsxs53("button", { type: "button", onClick: handleAddGroup, className: cn(ghostBtn2, "text-foreground"), children: [
|
|
8615
|
-
/* @__PURE__ */ jsx59(
|
|
8799
|
+
/* @__PURE__ */ jsx59(Icon38, { icon: faPlusOutline4, size: "sm", className: "text-foreground" }),
|
|
8616
8800
|
"Add filters group"
|
|
8617
8801
|
] })
|
|
8618
8802
|
] }),
|
|
@@ -8626,7 +8810,7 @@ var SummaryChip = ({
|
|
|
8626
8810
|
},
|
|
8627
8811
|
className: cn(ghostBtn2, "text-destructive"),
|
|
8628
8812
|
children: [
|
|
8629
|
-
/* @__PURE__ */ jsx59(
|
|
8813
|
+
/* @__PURE__ */ jsx59(Icon38, { icon: faXmarkOutline5, size: "sm", className: "text-destructive" }),
|
|
8630
8814
|
"Clear filters"
|
|
8631
8815
|
]
|
|
8632
8816
|
}
|
|
@@ -8663,7 +8847,7 @@ var DraftRow2 = ({ properties, onSelect, open: openProp, onOpenChange }) => {
|
|
|
8663
8847
|
),
|
|
8664
8848
|
children: [
|
|
8665
8849
|
/* @__PURE__ */ jsx59("span", { className: "text-sm font-regular leading-sm text-muted-foreground whitespace-nowrap", children: "Select property" }),
|
|
8666
|
-
/* @__PURE__ */ jsx59(
|
|
8850
|
+
/* @__PURE__ */ jsx59(Icon38, { icon: faChevronDownOutline4, size: "xs", className: "shrink-0 text-foreground" })
|
|
8667
8851
|
]
|
|
8668
8852
|
}
|
|
8669
8853
|
) })
|
|
@@ -8891,7 +9075,7 @@ var FilterSystem = ({
|
|
|
8891
9075
|
{
|
|
8892
9076
|
type: "button",
|
|
8893
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",
|
|
8894
|
-
children: /* @__PURE__ */ jsx60(
|
|
9078
|
+
children: /* @__PURE__ */ jsx60(Icon39, { icon: faPlusOutline5, size: "sm", className: "text-foreground" })
|
|
8895
9079
|
}
|
|
8896
9080
|
) : /* @__PURE__ */ jsx60(FilterBarButton, {})
|
|
8897
9081
|
}
|