@l3mpire/ui 2.10.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/USAGE.md +7 -4
- package/dist/index.d.mts +22 -5
- package/dist/index.d.ts +22 -5
- package/dist/index.js +907 -617
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +917 -621
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/styles/globals.css +10 -1
package/dist/index.mjs
CHANGED
|
@@ -27,7 +27,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
27
27
|
var badgeVariants = cva(
|
|
28
28
|
[
|
|
29
29
|
"inline-flex items-center justify-center whitespace-nowrap",
|
|
30
|
-
"font-
|
|
30
|
+
"font-semibold",
|
|
31
31
|
"border border-transparent"
|
|
32
32
|
],
|
|
33
33
|
{
|
|
@@ -116,7 +116,7 @@ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
|
116
116
|
var buttonVariants = cva2(
|
|
117
117
|
[
|
|
118
118
|
"inline-flex items-center justify-center whitespace-nowrap",
|
|
119
|
-
"font-
|
|
119
|
+
"font-semibold transition-colors",
|
|
120
120
|
"focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",
|
|
121
121
|
"disabled:pointer-events-none",
|
|
122
122
|
"border",
|
|
@@ -149,7 +149,7 @@ var buttonVariants = cva2(
|
|
|
149
149
|
},
|
|
150
150
|
size: {
|
|
151
151
|
sm: [
|
|
152
|
-
"h-6
|
|
152
|
+
"h-6 py-xs gap-xs",
|
|
153
153
|
"text-xs",
|
|
154
154
|
"min-w-16 rounded-base"
|
|
155
155
|
],
|
|
@@ -244,13 +244,13 @@ var buttonVariants = cva2(
|
|
|
244
244
|
appearance: "ghost",
|
|
245
245
|
intent: "brand",
|
|
246
246
|
class: [
|
|
247
|
-
"bg-btn-ghost-
|
|
248
|
-
"text-btn-ghost-
|
|
249
|
-
"border-btn-ghost-
|
|
250
|
-
"hover:bg-btn-ghost-
|
|
251
|
-
"hover:text-btn-ghost-
|
|
252
|
-
"active:bg-btn-ghost-
|
|
253
|
-
"active:text-btn-ghost-
|
|
247
|
+
"bg-btn-ghost-brand-bg-default",
|
|
248
|
+
"text-btn-ghost-brand-text-default",
|
|
249
|
+
"border-btn-ghost-brand-border-default",
|
|
250
|
+
"hover:bg-btn-ghost-brand-bg-hover",
|
|
251
|
+
"hover:text-btn-ghost-brand-text-hover",
|
|
252
|
+
"active:bg-btn-ghost-brand-bg-pressed",
|
|
253
|
+
"active:text-btn-ghost-brand-text-pressed"
|
|
254
254
|
]
|
|
255
255
|
},
|
|
256
256
|
// ── Ghost + Alert ──────────────────────────────────────────────────
|
|
@@ -308,13 +308,17 @@ var Button = React2.forwardRef(
|
|
|
308
308
|
const isDisabled = disabled || loading;
|
|
309
309
|
const isIconOnly = iconOnlyProp ?? !children;
|
|
310
310
|
const iconSize = iconSizeMap[size ?? "md"];
|
|
311
|
+
const smPadding = size === "sm" && !isIconOnly ? cn(
|
|
312
|
+
leftIcon || loading ? "pl-xs" : "pl-sm",
|
|
313
|
+
rightIcon ? "pr-xs" : "pr-sm"
|
|
314
|
+
) : "";
|
|
311
315
|
const variantClasses = buttonVariants({
|
|
312
316
|
appearance,
|
|
313
317
|
intent,
|
|
314
318
|
size,
|
|
315
319
|
iconOnly: isIconOnly || void 0,
|
|
316
320
|
fullWidth,
|
|
317
|
-
className
|
|
321
|
+
className: cn(smPadding, className)
|
|
318
322
|
});
|
|
319
323
|
if (asChild) {
|
|
320
324
|
return /* @__PURE__ */ jsx2(Slot, { ref, className: cn(variantClasses), ...props, children });
|
|
@@ -416,7 +420,7 @@ var BrowserTabItem = React3.forwardRef(
|
|
|
416
420
|
},
|
|
417
421
|
onClick: (e) => e.stopPropagation(),
|
|
418
422
|
className: cn(
|
|
419
|
-
"text-sm font-
|
|
423
|
+
"text-sm font-semibold leading-sm bg-transparent outline-none p-0 m-0",
|
|
420
424
|
"border-b border-browser-tab-item-border border-dashed border-t-0 border-l-0 border-r-0",
|
|
421
425
|
isActive ? "text-browser-tab-item-active-text" : "text-browser-tab-item-inactive-text"
|
|
422
426
|
),
|
|
@@ -426,7 +430,7 @@ var BrowserTabItem = React3.forwardRef(
|
|
|
426
430
|
"span",
|
|
427
431
|
{
|
|
428
432
|
className: cn(
|
|
429
|
-
"text-sm font-
|
|
433
|
+
"text-sm font-semibold leading-sm whitespace-nowrap",
|
|
430
434
|
isActive ? "text-browser-tab-item-active-text" : "text-browser-tab-item-inactive-text"
|
|
431
435
|
),
|
|
432
436
|
onDoubleClick: (e) => {
|
|
@@ -615,7 +619,7 @@ var BrowserTab = React3.forwardRef(
|
|
|
615
619
|
"span",
|
|
616
620
|
{
|
|
617
621
|
className: cn(
|
|
618
|
-
"text-sm font-
|
|
622
|
+
"text-sm font-semibold leading-sm whitespace-nowrap",
|
|
619
623
|
item.isActive ? "text-browser-tab-item-active-text" : "text-browser-tab-item-inactive-text"
|
|
620
624
|
),
|
|
621
625
|
children: item.label
|
|
@@ -718,7 +722,7 @@ import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
|
718
722
|
var linkVariants = cva4(
|
|
719
723
|
[
|
|
720
724
|
"inline-flex items-center",
|
|
721
|
-
"font-
|
|
725
|
+
"font-semibold",
|
|
722
726
|
"transition-colors cursor-pointer",
|
|
723
727
|
"disabled:pointer-events-none",
|
|
724
728
|
"[&_svg]:pointer-events-none [&_svg]:shrink-0"
|
|
@@ -850,7 +854,7 @@ var InputLabel = React6.forwardRef(({ className, type = "default", disabled, inf
|
|
|
850
854
|
className: cn(
|
|
851
855
|
"inline-flex items-center gap-xs",
|
|
852
856
|
"text-xs",
|
|
853
|
-
"font-
|
|
857
|
+
"font-semibold",
|
|
854
858
|
"leading-xs",
|
|
855
859
|
textColor2,
|
|
856
860
|
className
|
|
@@ -929,7 +933,7 @@ var typeIconMap = {
|
|
|
929
933
|
warning: { icon: faTriangleExclamationSolid, color: "text-info-message-warning-icon" },
|
|
930
934
|
empty: { icon: faCircleInfoSolid2, color: "text-info-message-empty-icon" }
|
|
931
935
|
};
|
|
932
|
-
var titleStyle = "text-sm font-
|
|
936
|
+
var titleStyle = "text-sm font-semibold leading-sm text-info-message-title";
|
|
933
937
|
var descriptionStyle = "text-xs font-regular leading-xs text-info-message-description";
|
|
934
938
|
var closeButtonStyle = "inline-flex shrink-0 items-center justify-center p-xs rounded-base text-info-message-close hover:bg-black/5 transition-colors";
|
|
935
939
|
var typeLinkIntentMap = {
|
|
@@ -1034,7 +1038,7 @@ var typeIconMap2 = {
|
|
|
1034
1038
|
alert: { icon: faCircleExclamationSolid2, color: "text-toast-alert-icon" },
|
|
1035
1039
|
warning: { icon: faTriangleExclamationSolid2, color: "text-toast-warning-icon" }
|
|
1036
1040
|
};
|
|
1037
|
-
var titleStyle2 = "text-sm font-
|
|
1041
|
+
var titleStyle2 = "text-sm font-semibold leading-sm text-toast-title";
|
|
1038
1042
|
var subtitleStyle = "text-sm font-regular leading-sm text-toast-subtitle";
|
|
1039
1043
|
var closeButtonStyle2 = "inline-flex shrink-0 items-center justify-center self-start p-sm rounded-md text-toast-close hover:bg-black/5 transition-colors";
|
|
1040
1044
|
var ToastProvider = ToastPrimitive.Provider;
|
|
@@ -1109,7 +1113,7 @@ var trackStyles = {
|
|
|
1109
1113
|
]
|
|
1110
1114
|
};
|
|
1111
1115
|
var thumbStyle = "pointer-events-none block rounded-full size-3 translate-x-0.5 bg-switch-thumb-bg shadow-md transition-transform data-[state=checked]:translate-x-[13px]";
|
|
1112
|
-
var labelBase = "cursor-pointer select-none text-sm font-
|
|
1116
|
+
var labelBase = "cursor-pointer select-none text-sm font-semibold leading-sm";
|
|
1113
1117
|
var labelColor = {
|
|
1114
1118
|
default: "text-switch-label-text",
|
|
1115
1119
|
disabled: "pointer-events-none text-switch-label-disabled"
|
|
@@ -1654,7 +1658,7 @@ var Avatar = React13.forwardRef(({ className, size = "xl", shape = "rounded", sr
|
|
|
1654
1658
|
{
|
|
1655
1659
|
delayMs: 0,
|
|
1656
1660
|
className: cn(
|
|
1657
|
-
"font-
|
|
1661
|
+
"font-semibold",
|
|
1658
1662
|
"text-avatar-fallback-text",
|
|
1659
1663
|
"select-none text-center",
|
|
1660
1664
|
initialsFontSize[size ?? "xl"]
|
|
@@ -1703,7 +1707,7 @@ var iconStyle = {
|
|
|
1703
1707
|
default: "text-checkbox-checked-icon",
|
|
1704
1708
|
disabled: "text-checkbox-disabled-icon"
|
|
1705
1709
|
};
|
|
1706
|
-
var labelBase2 = "cursor-pointer select-none overflow-hidden text-ellipsis whitespace-nowrap text-sm font-
|
|
1710
|
+
var labelBase2 = "cursor-pointer select-none overflow-hidden text-ellipsis whitespace-nowrap text-sm font-semibold leading-sm";
|
|
1707
1711
|
var labelColor2 = {
|
|
1708
1712
|
default: "text-checkbox-label-default",
|
|
1709
1713
|
disabled: "pointer-events-none text-checkbox-label-disabled"
|
|
@@ -1791,7 +1795,7 @@ var dotStyle = {
|
|
|
1791
1795
|
default: "bg-radio-selected-dot",
|
|
1792
1796
|
disabled: "bg-radio-disabled-dot"
|
|
1793
1797
|
};
|
|
1794
|
-
var labelBase3 = "cursor-pointer select-none overflow-hidden text-ellipsis whitespace-nowrap text-sm font-
|
|
1798
|
+
var labelBase3 = "cursor-pointer select-none overflow-hidden text-ellipsis whitespace-nowrap text-sm font-semibold leading-sm";
|
|
1795
1799
|
var labelColor3 = {
|
|
1796
1800
|
default: "text-radio-label-default",
|
|
1797
1801
|
disabled: "pointer-events-none text-radio-label-disabled"
|
|
@@ -1852,8 +1856,8 @@ import { Icon as Icon11 } from "@l3mpire/icons";
|
|
|
1852
1856
|
import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1853
1857
|
var textSm = "text-sm font-regular leading-sm";
|
|
1854
1858
|
var textXs = "text-xs font-regular leading-xs";
|
|
1855
|
-
var textXsMedium = "text-xs font-
|
|
1856
|
-
var textSmMedium = "text-sm font-
|
|
1859
|
+
var textXsMedium = "text-xs font-semibold leading-xs";
|
|
1860
|
+
var textSmMedium = "text-sm font-semibold leading-sm";
|
|
1857
1861
|
var containerStyle = [
|
|
1858
1862
|
"flex flex-col gap-base overflow-clip",
|
|
1859
1863
|
"bg-dropdown-bg",
|
|
@@ -2054,7 +2058,7 @@ var SidebarHeadingItem = React17.forwardRef(
|
|
|
2054
2058
|
ref,
|
|
2055
2059
|
className: cn(
|
|
2056
2060
|
"flex items-center w-full",
|
|
2057
|
-
"text-xs leading-xs font-
|
|
2061
|
+
"text-xs leading-xs font-semibold text-sidebar-heading-text mb-base",
|
|
2058
2062
|
className
|
|
2059
2063
|
),
|
|
2060
2064
|
...props,
|
|
@@ -2144,7 +2148,7 @@ var SidebarItem = React18.forwardRef(
|
|
|
2144
2148
|
"span",
|
|
2145
2149
|
{
|
|
2146
2150
|
className: cn(
|
|
2147
|
-
"flex-1 min-w-0 truncate text-sm leading-sm font-
|
|
2151
|
+
"flex-1 min-w-0 truncate text-sm leading-sm font-semibold",
|
|
2148
2152
|
textColorClass
|
|
2149
2153
|
),
|
|
2150
2154
|
children: label
|
|
@@ -2238,7 +2242,7 @@ var iconColor = {
|
|
|
2238
2242
|
};
|
|
2239
2243
|
var errorGuidance = {
|
|
2240
2244
|
icon: "shrink-0 text-select-error-icon",
|
|
2241
|
-
text: "text-xs font-
|
|
2245
|
+
text: "text-xs font-semibold leading-xs text-select-error-text"
|
|
2242
2246
|
};
|
|
2243
2247
|
function SelectChips({ tags, onTagRemove, chipHeightPx }) {
|
|
2244
2248
|
const containerRef = React19.useRef(null);
|
|
@@ -2283,7 +2287,7 @@ function SelectChips({ tags, onTagRemove, chipHeightPx }) {
|
|
|
2283
2287
|
"inline-flex items-center gap-xs shrink-0",
|
|
2284
2288
|
"px-sm rounded-base",
|
|
2285
2289
|
"bg-tag-neutral-bg text-tag-neutral-text",
|
|
2286
|
-
"text-xs font-
|
|
2290
|
+
"text-xs font-semibold leading-xs",
|
|
2287
2291
|
"whitespace-nowrap"
|
|
2288
2292
|
);
|
|
2289
2293
|
return /* @__PURE__ */ jsxs17("div", { className: "flex flex-1 items-center gap-xs min-w-0 overflow-hidden relative", children: [
|
|
@@ -2533,7 +2537,7 @@ var TabTrigger = React20.forwardRef(({ className, badge, children, ...props }, r
|
|
|
2533
2537
|
"span",
|
|
2534
2538
|
{
|
|
2535
2539
|
className: cn(
|
|
2536
|
-
"text-sm font-
|
|
2540
|
+
"text-sm font-semibold leading-sm whitespace-nowrap",
|
|
2537
2541
|
"text-tab-item-default-text",
|
|
2538
2542
|
"group-data-[state=active]:text-tab-item-active-text"
|
|
2539
2543
|
),
|
|
@@ -2567,7 +2571,7 @@ var tagVariants = cva12(
|
|
|
2567
2571
|
"inline-flex items-center",
|
|
2568
2572
|
"gap-xs",
|
|
2569
2573
|
"rounded-base",
|
|
2570
|
-
"font-
|
|
2574
|
+
"font-semibold",
|
|
2571
2575
|
"whitespace-nowrap"
|
|
2572
2576
|
],
|
|
2573
2577
|
{
|
|
@@ -2672,7 +2676,7 @@ var fieldStates = {
|
|
|
2672
2676
|
};
|
|
2673
2677
|
var errorGuidance2 = {
|
|
2674
2678
|
icon: "shrink-0 text-textarea-error-icon",
|
|
2675
|
-
text: "text-xs font-
|
|
2679
|
+
text: "text-xs font-semibold leading-xs text-textarea-error-text"
|
|
2676
2680
|
};
|
|
2677
2681
|
var charLimitStyle = "shrink-0 text-right text-xs font-regular leading-xs text-textarea-char-limit";
|
|
2678
2682
|
function resolveState(error, success, disabled) {
|
|
@@ -2804,7 +2808,7 @@ var attachedButtonStyles = {
|
|
|
2804
2808
|
};
|
|
2805
2809
|
var errorGuidance3 = {
|
|
2806
2810
|
icon: "shrink-0 text-text-input-error-icon",
|
|
2807
|
-
text: "text-xs font-
|
|
2811
|
+
text: "text-xs font-semibold leading-xs text-text-input-error-text"
|
|
2808
2812
|
};
|
|
2809
2813
|
function resolveState2(error, success, disabled) {
|
|
2810
2814
|
if (disabled) return "disabled";
|
|
@@ -2972,12 +2976,12 @@ var chipStyle = [
|
|
|
2972
2976
|
"inline-flex items-center gap-xs shrink-0",
|
|
2973
2977
|
"h-6 px-sm rounded-base",
|
|
2974
2978
|
"bg-tag-neutral-bg text-tag-neutral-text",
|
|
2975
|
-
"text-xs font-
|
|
2979
|
+
"text-xs font-semibold leading-xs",
|
|
2976
2980
|
"whitespace-nowrap"
|
|
2977
2981
|
];
|
|
2978
2982
|
var errorGuidance4 = {
|
|
2979
2983
|
icon: "shrink-0 text-text-input-error-icon",
|
|
2980
|
-
text: "text-xs font-
|
|
2984
|
+
text: "text-xs font-semibold leading-xs text-text-input-error-text"
|
|
2981
2985
|
};
|
|
2982
2986
|
var ChipInput = React24.forwardRef(
|
|
2983
2987
|
({
|
|
@@ -3172,7 +3176,7 @@ var wrapperStates3 = {
|
|
|
3172
3176
|
};
|
|
3173
3177
|
var errorGuidance5 = {
|
|
3174
3178
|
icon: "shrink-0 text-text-input-error-icon",
|
|
3175
|
-
text: "text-xs font-
|
|
3179
|
+
text: "text-xs font-semibold leading-xs text-text-input-error-text"
|
|
3176
3180
|
};
|
|
3177
3181
|
var NumberInput = React25.forwardRef(
|
|
3178
3182
|
({
|
|
@@ -3353,7 +3357,7 @@ var typographyVariants = cva16("", {
|
|
|
3353
3357
|
},
|
|
3354
3358
|
weight: {
|
|
3355
3359
|
regular: "font-regular",
|
|
3356
|
-
|
|
3360
|
+
semibold: "font-semibold",
|
|
3357
3361
|
bold: "font-bold"
|
|
3358
3362
|
}
|
|
3359
3363
|
},
|
|
@@ -3419,7 +3423,7 @@ var UserMenuInfoRow = React27.forwardRef(
|
|
|
3419
3423
|
children: [
|
|
3420
3424
|
avatar,
|
|
3421
3425
|
/* @__PURE__ */ jsxs24("div", { className: "flex flex-1 flex-col min-w-0", children: [
|
|
3422
|
-
/* @__PURE__ */ jsx27("span", { className: "text-sm font-
|
|
3426
|
+
/* @__PURE__ */ jsx27("span", { className: "text-sm font-semibold leading-sm text-user-menu-name truncate", children: name }),
|
|
3423
3427
|
subtitle && /* @__PURE__ */ jsx27("span", { className: "text-xs font-regular leading-xs text-user-menu-subtitle truncate", children: subtitle })
|
|
3424
3428
|
] }),
|
|
3425
3429
|
action
|
|
@@ -3528,7 +3532,7 @@ var ModalTitle = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
3528
3532
|
DialogPrimitive.Title,
|
|
3529
3533
|
{
|
|
3530
3534
|
ref,
|
|
3531
|
-
className: cn("text-base font-
|
|
3535
|
+
className: cn("text-base font-semibold leading-base text-modal-header-title", className),
|
|
3532
3536
|
...props
|
|
3533
3537
|
}
|
|
3534
3538
|
));
|
|
@@ -3690,7 +3694,7 @@ var EmptyState = React30.forwardRef(
|
|
|
3690
3694
|
"p",
|
|
3691
3695
|
{
|
|
3692
3696
|
className: cn(
|
|
3693
|
-
"font-
|
|
3697
|
+
"font-semibold text-table-cell-text-primary",
|
|
3694
3698
|
isMd ? "text-base leading-base" : "text-sm leading-sm"
|
|
3695
3699
|
),
|
|
3696
3700
|
children: title
|
|
@@ -3759,7 +3763,7 @@ var AvatarCell = ({
|
|
|
3759
3763
|
}) => /* @__PURE__ */ jsxs28("div", { className: cn("flex items-center gap-md", className), children: [
|
|
3760
3764
|
/* @__PURE__ */ jsx31(Avatar, { initials: getInitials(name), src, alt: name, size: "lg", shape: "rounded" }),
|
|
3761
3765
|
/* @__PURE__ */ jsxs28("div", { className: "flex flex-col", children: [
|
|
3762
|
-
/* @__PURE__ */ jsx31("span", { className: "text-sm font-
|
|
3766
|
+
/* @__PURE__ */ jsx31("span", { className: "text-sm font-semibold text-table-cell-text-primary leading-sm", children: name }),
|
|
3763
3767
|
subtitle && /* @__PURE__ */ jsx31("span", { className: "text-xs font-regular text-table-cell-text-secondary leading-xs", children: subtitle })
|
|
3764
3768
|
] })
|
|
3765
3769
|
] });
|
|
@@ -3797,7 +3801,7 @@ var NumberCell = ({
|
|
|
3797
3801
|
className
|
|
3798
3802
|
),
|
|
3799
3803
|
children: [
|
|
3800
|
-
/* @__PURE__ */ jsx31("span", { className: "text-sm font-
|
|
3804
|
+
/* @__PURE__ */ jsx31("span", { className: "text-sm font-semibold text-table-cell-text-primary", children: formatted }),
|
|
3801
3805
|
secondaryStat && /* @__PURE__ */ jsx31(
|
|
3802
3806
|
"span",
|
|
3803
3807
|
{
|
|
@@ -3865,7 +3869,7 @@ var TextCell = ({
|
|
|
3865
3869
|
{
|
|
3866
3870
|
className: cn(
|
|
3867
3871
|
"text-sm",
|
|
3868
|
-
secondary ? "font-regular text-table-cell-text-secondary" : "font-
|
|
3872
|
+
secondary ? "font-regular text-table-cell-text-secondary" : "font-semibold text-table-cell-text-primary",
|
|
3869
3873
|
className
|
|
3870
3874
|
),
|
|
3871
3875
|
children: value
|
|
@@ -3914,7 +3918,7 @@ var EditableCell = ({
|
|
|
3914
3918
|
{
|
|
3915
3919
|
ref: inputRef,
|
|
3916
3920
|
className: cn(
|
|
3917
|
-
"w-full bg-transparent text-sm font-
|
|
3921
|
+
"w-full bg-transparent text-sm font-semibold text-table-cell-text-primary",
|
|
3918
3922
|
"outline-none border-b border-table-border py-0 h-[20px]",
|
|
3919
3923
|
className
|
|
3920
3924
|
),
|
|
@@ -3931,7 +3935,7 @@ var EditableCell = ({
|
|
|
3931
3935
|
role: "button",
|
|
3932
3936
|
tabIndex: 0,
|
|
3933
3937
|
className: cn(
|
|
3934
|
-
"text-sm font-
|
|
3938
|
+
"text-sm font-semibold text-table-cell-text-primary cursor-text leading-sm h-[20px] inline-block",
|
|
3935
3939
|
className
|
|
3936
3940
|
),
|
|
3937
3941
|
onDoubleClick: () => setIsEditing(true),
|
|
@@ -4027,7 +4031,7 @@ var TableFooter = React32.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
4027
4031
|
{
|
|
4028
4032
|
ref,
|
|
4029
4033
|
className: cn(
|
|
4030
|
-
"border-t border-table-border bg-table-bg font-
|
|
4034
|
+
"border-t border-table-border bg-table-bg font-semibold",
|
|
4031
4035
|
className
|
|
4032
4036
|
),
|
|
4033
4037
|
...props
|
|
@@ -4053,7 +4057,7 @@ var TableHead = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
4053
4057
|
{
|
|
4054
4058
|
ref,
|
|
4055
4059
|
className: cn(
|
|
4056
|
-
"group/head h-10 px-md py-md text-left align-middle text-xs font-
|
|
4060
|
+
"group/head h-10 px-md py-md text-left align-middle text-xs font-semibold leading-xs",
|
|
4057
4061
|
"text-table-head-text bg-table-head-bg-default",
|
|
4058
4062
|
"hover:bg-table-head-bg-hover",
|
|
4059
4063
|
"border-b border-r border-table-border last:border-r-0",
|
|
@@ -4069,7 +4073,7 @@ var TableCell = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
4069
4073
|
{
|
|
4070
4074
|
ref,
|
|
4071
4075
|
className: cn(
|
|
4072
|
-
"px-md py-md align-middle text-sm font-
|
|
4076
|
+
"px-md py-md align-middle text-sm font-semibold max-h-[52px]",
|
|
4073
4077
|
"text-table-cell-text-primary",
|
|
4074
4078
|
"border-b border-r border-table-border last:border-r-0",
|
|
4075
4079
|
"[&:has([role=checkbox])]:pr-0",
|
|
@@ -4168,7 +4172,7 @@ function ColumnFilterPopover({
|
|
|
4168
4172
|
),
|
|
4169
4173
|
onClick: (e) => e.stopPropagation(),
|
|
4170
4174
|
children: /* @__PURE__ */ jsxs29("div", { className: "flex flex-col gap-sm", children: [
|
|
4171
|
-
/* @__PURE__ */ jsx33("span", { className: "text-xs font-
|
|
4175
|
+
/* @__PURE__ */ jsx33("span", { className: "text-xs font-semibold text-table-head-text", children: "Filter" }),
|
|
4172
4176
|
/* @__PURE__ */ jsx33(
|
|
4173
4177
|
"select",
|
|
4174
4178
|
{
|
|
@@ -4902,13 +4906,13 @@ var FilterChipSegment = React35.forwardRef(
|
|
|
4902
4906
|
"span",
|
|
4903
4907
|
{
|
|
4904
4908
|
className: cn(
|
|
4905
|
-
"text-sm font-
|
|
4909
|
+
"text-sm font-semibold leading-sm whitespace-nowrap",
|
|
4906
4910
|
segmentType === "placeholder" ? "text-filter-chip-segment-placeholder" : "text-filter-chip-segment-text"
|
|
4907
4911
|
),
|
|
4908
4912
|
children: label
|
|
4909
4913
|
}
|
|
4910
4914
|
),
|
|
4911
|
-
badgeCount != null && badgeCount > 0 && /* @__PURE__ */ jsx35("span", { className: "flex items-center gap-2xs p-2xs rounded-xs bg-filter-chip-badge-bg", children: /* @__PURE__ */ jsx35("span", { className: "text-[10px] font-
|
|
4915
|
+
badgeCount != null && badgeCount > 0 && /* @__PURE__ */ jsx35("span", { className: "flex items-center gap-2xs p-2xs rounded-xs bg-filter-chip-badge-bg", children: /* @__PURE__ */ jsx35("span", { className: "text-[10px] font-semibold leading-2xs text-filter-chip-badge-text", children: badgeCount }) }),
|
|
4912
4916
|
children
|
|
4913
4917
|
]
|
|
4914
4918
|
}
|
|
@@ -5162,7 +5166,7 @@ var SortButton = ({
|
|
|
5162
5166
|
className: "shrink-0 text-[var(--color-foreground)]"
|
|
5163
5167
|
}
|
|
5164
5168
|
),
|
|
5165
|
-
!iconOnly && /* @__PURE__ */ jsxs33("span", { className: "text-sm font-
|
|
5169
|
+
!iconOnly && /* @__PURE__ */ jsxs33("span", { className: "text-sm font-semibold leading-sm whitespace-nowrap", children: [
|
|
5166
5170
|
/* @__PURE__ */ jsxs33("span", { className: "text-[var(--color-muted-foreground)]", children: [
|
|
5167
5171
|
"Sort by",
|
|
5168
5172
|
" "
|
|
@@ -5321,7 +5325,7 @@ var FilterBarButton = React39.forwardRef(({ className, count, iconOnly = false,
|
|
|
5321
5325
|
ref,
|
|
5322
5326
|
type: "button",
|
|
5323
5327
|
className: cn(
|
|
5324
|
-
"flex items-center gap-sm",
|
|
5328
|
+
"shrink-0 flex items-center gap-sm overflow-hidden",
|
|
5325
5329
|
"min-h-[32px] max-h-[32px]",
|
|
5326
5330
|
"bg-gradient-to-t from-[var(--color-btn-outlined-neutral-bg-default)] to-[var(--color-btn-outlined-neutral-bg-gradient-to-default)]",
|
|
5327
5331
|
"border border-[var(--color-btn-outlined-neutral-border-default)] rounded-md shadow-sm",
|
|
@@ -5340,8 +5344,8 @@ var FilterBarButton = React39.forwardRef(({ className, count, iconOnly = false,
|
|
|
5340
5344
|
className: "shrink-0 text-[var(--color-foreground)]"
|
|
5341
5345
|
}
|
|
5342
5346
|
),
|
|
5343
|
-
!iconOnly && /* @__PURE__ */ jsx39("span", { className: "text-sm font-
|
|
5344
|
-
count != null && count > 0 && /* @__PURE__ */ jsx39("span", { className: "flex items-center p-2xs rounded-xs bg-filter-chip-badge-bg", children: /* @__PURE__ */ jsx39("span", { className: "text-[10px] font-
|
|
5347
|
+
!iconOnly && /* @__PURE__ */ jsx39("span", { className: "text-sm font-semibold leading-sm whitespace-nowrap text-[var(--color-foreground)]", children: children ?? "Filters" }),
|
|
5348
|
+
count != null && count > 0 && /* @__PURE__ */ jsx39("span", { className: "flex items-center p-2xs rounded-xs bg-filter-chip-badge-bg", children: /* @__PURE__ */ jsx39("span", { className: "text-[10px] font-semibold leading-2xs text-filter-chip-badge-text", children: count }) })
|
|
5345
5349
|
]
|
|
5346
5350
|
}
|
|
5347
5351
|
));
|
|
@@ -5354,7 +5358,7 @@ import { jsx as jsx40, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
|
5354
5358
|
var SaveViewButton = React40.forwardRef(
|
|
5355
5359
|
({ className, label = "Save view", onSave, onDropdown, ...props }, ref) => {
|
|
5356
5360
|
const sharedStyle = [
|
|
5357
|
-
"flex items-center justify-center",
|
|
5361
|
+
"relative flex items-center justify-center",
|
|
5358
5362
|
"min-h-[32px] max-h-[32px]",
|
|
5359
5363
|
"bg-gradient-to-t from-[var(--color-btn-solid-brand-bg-default)] from-[10%] to-[var(--color-btn-solid-brand-bg-gradient-to-default)]",
|
|
5360
5364
|
"border border-[var(--color-btn-solid-brand-border-default)]",
|
|
@@ -5379,7 +5383,7 @@ var SaveViewButton = React40.forwardRef(
|
|
|
5379
5383
|
"rounded-l-md -mr-px"
|
|
5380
5384
|
),
|
|
5381
5385
|
children: [
|
|
5382
|
-
/* @__PURE__ */ jsx40("span", { className: "text-sm font-
|
|
5386
|
+
/* @__PURE__ */ jsx40("span", { className: "text-sm font-semibold leading-sm whitespace-nowrap text-[var(--color-btn-solid-brand-text-default)]", children: label }),
|
|
5383
5387
|
/* @__PURE__ */ jsx40("span", { className: "absolute inset-0 rounded-l-[11px] border border-[var(--color-btn-solid-brand-inner-border-default)] shadow-sm pointer-events-none" })
|
|
5384
5388
|
]
|
|
5385
5389
|
}
|
|
@@ -5457,7 +5461,7 @@ var OperatorSelector = ({
|
|
|
5457
5461
|
{
|
|
5458
5462
|
className: cn(
|
|
5459
5463
|
"text-sm font-regular leading-sm",
|
|
5460
|
-
op === activeOperator ? "text-[var(--color-foreground)] font-
|
|
5464
|
+
op === activeOperator ? "text-[var(--color-foreground)] font-semibold" : "text-[var(--color-dropdown-item-text)]"
|
|
5461
5465
|
),
|
|
5462
5466
|
children: op
|
|
5463
5467
|
}
|
|
@@ -5493,7 +5497,7 @@ var OperatorList = ({
|
|
|
5493
5497
|
{
|
|
5494
5498
|
className: cn(
|
|
5495
5499
|
"text-sm font-regular leading-sm",
|
|
5496
|
-
op === activeOperator ? "text-[var(--color-foreground)] font-
|
|
5500
|
+
op === activeOperator ? "text-[var(--color-foreground)] font-semibold" : "text-[var(--color-dropdown-item-text)]"
|
|
5497
5501
|
),
|
|
5498
5502
|
children: op
|
|
5499
5503
|
}
|
|
@@ -5504,311 +5508,344 @@ var OperatorList = ({
|
|
|
5504
5508
|
};
|
|
5505
5509
|
OperatorList.displayName = "OperatorList";
|
|
5506
5510
|
|
|
5507
|
-
// src/components/ui/filter/value-
|
|
5511
|
+
// src/components/ui/filter/value-inputs/shared.ts
|
|
5512
|
+
var inputClasses = [
|
|
5513
|
+
"w-full px-base py-sm rounded-base border border-[var(--color-input)]",
|
|
5514
|
+
"bg-[var(--color-background)] text-sm font-regular leading-sm text-[var(--color-foreground)]",
|
|
5515
|
+
"placeholder:text-[var(--color-muted-foreground)]",
|
|
5516
|
+
"focus:outline-none focus:ring-2 focus:ring-[var(--color-ring)] focus:ring-offset-0"
|
|
5517
|
+
].join(" ");
|
|
5518
|
+
var halfInputClasses = [
|
|
5519
|
+
"flex-1 px-base py-sm rounded-base border border-[var(--color-input)]",
|
|
5520
|
+
"bg-[var(--color-background)] text-sm font-regular leading-sm text-[var(--color-foreground)]",
|
|
5521
|
+
"focus:outline-none focus:ring-2 focus:ring-[var(--color-ring)]"
|
|
5522
|
+
].join(" ");
|
|
5523
|
+
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";
|
|
5524
|
+
|
|
5525
|
+
// src/components/ui/filter/value-inputs/text-value-input.tsx
|
|
5508
5526
|
import { jsx as jsx42, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
5527
|
+
var TextValueInput = ({
|
|
5528
|
+
value,
|
|
5529
|
+
onChange,
|
|
5530
|
+
onSubmit,
|
|
5531
|
+
className
|
|
5532
|
+
}) => {
|
|
5533
|
+
const handleKeyDown = (e) => {
|
|
5534
|
+
if (e.key === "Enter") onSubmit?.();
|
|
5535
|
+
};
|
|
5536
|
+
return /* @__PURE__ */ jsxs37("div", { className: cn("flex flex-col gap-base p-base", className), children: [
|
|
5537
|
+
/* @__PURE__ */ jsx42(
|
|
5538
|
+
"input",
|
|
5539
|
+
{
|
|
5540
|
+
type: "text",
|
|
5541
|
+
value: value ?? "",
|
|
5542
|
+
onChange: (e) => onChange(e.target.value),
|
|
5543
|
+
onKeyDown: handleKeyDown,
|
|
5544
|
+
placeholder: "Enter value...",
|
|
5545
|
+
autoFocus: true,
|
|
5546
|
+
className: inputClasses
|
|
5547
|
+
}
|
|
5548
|
+
),
|
|
5549
|
+
/* @__PURE__ */ jsx42("button", { type: "button", onClick: onSubmit, className: applyBtnClasses, children: "Apply" })
|
|
5550
|
+
] });
|
|
5551
|
+
};
|
|
5552
|
+
TextValueInput.displayName = "TextValueInput";
|
|
5553
|
+
|
|
5554
|
+
// src/components/ui/filter/value-inputs/number-value-input.tsx
|
|
5555
|
+
import { jsx as jsx43, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
5556
|
+
var NumberValueInput = ({
|
|
5557
|
+
value,
|
|
5558
|
+
onChange,
|
|
5559
|
+
onSubmit,
|
|
5560
|
+
className
|
|
5561
|
+
}) => {
|
|
5562
|
+
const handleKeyDown = (e) => {
|
|
5563
|
+
if (e.key === "Enter") onSubmit?.();
|
|
5564
|
+
};
|
|
5565
|
+
return /* @__PURE__ */ jsxs38("div", { className: cn("flex flex-col gap-base p-base", className), children: [
|
|
5566
|
+
/* @__PURE__ */ jsx43(
|
|
5567
|
+
"input",
|
|
5568
|
+
{
|
|
5569
|
+
type: "number",
|
|
5570
|
+
value: value ?? "",
|
|
5571
|
+
onChange: (e) => onChange(e.target.value ? Number(e.target.value) : null),
|
|
5572
|
+
onKeyDown: handleKeyDown,
|
|
5573
|
+
placeholder: "Enter number...",
|
|
5574
|
+
autoFocus: true,
|
|
5575
|
+
className: inputClasses
|
|
5576
|
+
}
|
|
5577
|
+
),
|
|
5578
|
+
/* @__PURE__ */ jsx43("button", { type: "button", onClick: onSubmit, className: applyBtnClasses, children: "Apply" })
|
|
5579
|
+
] });
|
|
5580
|
+
};
|
|
5581
|
+
NumberValueInput.displayName = "NumberValueInput";
|
|
5582
|
+
var NumberRangeValueInput = ({
|
|
5583
|
+
value,
|
|
5584
|
+
onChange,
|
|
5585
|
+
onSubmit,
|
|
5586
|
+
className
|
|
5587
|
+
}) => {
|
|
5588
|
+
const rangeVal = value ?? [0, 0];
|
|
5589
|
+
return /* @__PURE__ */ jsxs38("div", { className: cn("flex flex-col gap-base p-base", className), children: [
|
|
5590
|
+
/* @__PURE__ */ jsxs38("div", { className: "flex items-center gap-base", children: [
|
|
5591
|
+
/* @__PURE__ */ jsx43(
|
|
5592
|
+
"input",
|
|
5593
|
+
{
|
|
5594
|
+
type: "number",
|
|
5595
|
+
value: rangeVal[0] ?? "",
|
|
5596
|
+
onChange: (e) => onChange([Number(e.target.value), rangeVal[1]]),
|
|
5597
|
+
placeholder: "Min",
|
|
5598
|
+
autoFocus: true,
|
|
5599
|
+
className: halfInputClasses
|
|
5600
|
+
}
|
|
5601
|
+
),
|
|
5602
|
+
/* @__PURE__ */ jsx43("span", { className: "text-sm text-[var(--color-muted-foreground)]", children: "and" }),
|
|
5603
|
+
/* @__PURE__ */ jsx43(
|
|
5604
|
+
"input",
|
|
5605
|
+
{
|
|
5606
|
+
type: "number",
|
|
5607
|
+
value: rangeVal[1] ?? "",
|
|
5608
|
+
onChange: (e) => onChange([rangeVal[0], Number(e.target.value)]),
|
|
5609
|
+
placeholder: "Max",
|
|
5610
|
+
className: halfInputClasses
|
|
5611
|
+
}
|
|
5612
|
+
)
|
|
5613
|
+
] }),
|
|
5614
|
+
/* @__PURE__ */ jsx43("button", { type: "button", onClick: onSubmit, className: applyBtnClasses, children: "Apply" })
|
|
5615
|
+
] });
|
|
5616
|
+
};
|
|
5617
|
+
NumberRangeValueInput.displayName = "NumberRangeValueInput";
|
|
5618
|
+
|
|
5619
|
+
// src/components/ui/filter/value-inputs/date-value-input.tsx
|
|
5620
|
+
import { jsx as jsx44, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
5509
5621
|
var RELATIVE_DATE_PRESETS = [
|
|
5510
5622
|
{ group: "Past", options: ["Today", "Yesterday", "Last 7 days", "Last 14 days", "Last 30 days", "Last 90 days"] },
|
|
5511
5623
|
{ group: "Current", options: ["This week", "This month", "This quarter", "This year"] },
|
|
5512
5624
|
{ group: "Future", options: ["Tomorrow", "Next 7 days", "Next 14 days", "Next 30 days", "Next week", "Next month", "Next quarter"] }
|
|
5513
5625
|
];
|
|
5514
|
-
var
|
|
5515
|
-
dataType,
|
|
5516
|
-
operator,
|
|
5626
|
+
var DatePickerValueInput = ({
|
|
5517
5627
|
value,
|
|
5518
5628
|
onChange,
|
|
5519
5629
|
onSubmit,
|
|
5520
|
-
options = [],
|
|
5521
5630
|
className
|
|
5522
|
-
}) => {
|
|
5523
|
-
|
|
5524
|
-
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
|
|
5528
|
-
|
|
5529
|
-
|
|
5530
|
-
|
|
5531
|
-
/* @__PURE__ */ jsx42(
|
|
5532
|
-
"input",
|
|
5533
|
-
{
|
|
5534
|
-
type: "text",
|
|
5535
|
-
value: value ?? "",
|
|
5536
|
-
onChange: (e) => onChange(e.target.value),
|
|
5537
|
-
onKeyDown: handleKeyDown,
|
|
5538
|
-
placeholder: "Enter value...",
|
|
5539
|
-
autoFocus: true,
|
|
5540
|
-
className: cn(
|
|
5541
|
-
"w-full px-base py-sm rounded-base border border-[var(--color-input)]",
|
|
5542
|
-
"bg-[var(--color-background)] text-sm font-regular leading-sm text-[var(--color-foreground)]",
|
|
5543
|
-
"placeholder:text-[var(--color-muted-foreground)]",
|
|
5544
|
-
"focus:outline-none focus:ring-2 focus:ring-[var(--color-ring)] focus:ring-offset-0"
|
|
5545
|
-
)
|
|
5546
|
-
}
|
|
5547
|
-
),
|
|
5548
|
-
/* @__PURE__ */ jsx42(
|
|
5549
|
-
"button",
|
|
5550
|
-
{
|
|
5551
|
-
type: "button",
|
|
5552
|
-
onClick: onSubmit,
|
|
5553
|
-
className: "self-end px-md py-sm text-sm font-medium leading-sm text-[var(--color-primary-foreground)] bg-[var(--color-primary)] rounded-base cursor-pointer hover:opacity-90 transition-opacity",
|
|
5554
|
-
children: "Apply"
|
|
5555
|
-
}
|
|
5556
|
-
)
|
|
5557
|
-
] });
|
|
5558
|
-
case "NumberInput":
|
|
5559
|
-
return /* @__PURE__ */ jsxs37("div", { className: cn("flex flex-col gap-base p-base", className), children: [
|
|
5560
|
-
/* @__PURE__ */ jsx42(
|
|
5561
|
-
"input",
|
|
5562
|
-
{
|
|
5563
|
-
type: "number",
|
|
5564
|
-
value: value ?? "",
|
|
5565
|
-
onChange: (e) => onChange(e.target.value ? Number(e.target.value) : null),
|
|
5566
|
-
onKeyDown: handleKeyDown,
|
|
5567
|
-
placeholder: "Enter number...",
|
|
5568
|
-
autoFocus: true,
|
|
5569
|
-
className: cn(
|
|
5570
|
-
"w-full px-base py-sm rounded-base border border-[var(--color-input)]",
|
|
5571
|
-
"bg-[var(--color-background)] text-sm font-regular leading-sm text-[var(--color-foreground)]",
|
|
5572
|
-
"placeholder:text-[var(--color-muted-foreground)]",
|
|
5573
|
-
"focus:outline-none focus:ring-2 focus:ring-[var(--color-ring)] focus:ring-offset-0"
|
|
5574
|
-
)
|
|
5575
|
-
}
|
|
5576
|
-
),
|
|
5577
|
-
/* @__PURE__ */ jsx42(
|
|
5578
|
-
"button",
|
|
5579
|
-
{
|
|
5580
|
-
type: "button",
|
|
5581
|
-
onClick: onSubmit,
|
|
5582
|
-
className: "self-end px-md py-sm text-sm font-medium leading-sm text-[var(--color-primary-foreground)] bg-[var(--color-primary)] rounded-base cursor-pointer hover:opacity-90 transition-opacity",
|
|
5583
|
-
children: "Apply"
|
|
5584
|
-
}
|
|
5585
|
-
)
|
|
5586
|
-
] });
|
|
5587
|
-
case "NumberRange": {
|
|
5588
|
-
const rangeVal = value ?? [0, 0];
|
|
5589
|
-
return /* @__PURE__ */ jsxs37("div", { className: cn("flex flex-col gap-base p-base", className), children: [
|
|
5590
|
-
/* @__PURE__ */ jsxs37("div", { className: "flex items-center gap-base", children: [
|
|
5591
|
-
/* @__PURE__ */ jsx42(
|
|
5592
|
-
"input",
|
|
5593
|
-
{
|
|
5594
|
-
type: "number",
|
|
5595
|
-
value: rangeVal[0] ?? "",
|
|
5596
|
-
onChange: (e) => onChange([Number(e.target.value), rangeVal[1]]),
|
|
5597
|
-
placeholder: "Min",
|
|
5598
|
-
autoFocus: true,
|
|
5599
|
-
className: cn(
|
|
5600
|
-
"flex-1 px-base py-sm rounded-base border border-[var(--color-input)]",
|
|
5601
|
-
"bg-[var(--color-background)] text-sm font-regular leading-sm text-[var(--color-foreground)]",
|
|
5602
|
-
"focus:outline-none focus:ring-2 focus:ring-[var(--color-ring)]"
|
|
5603
|
-
)
|
|
5604
|
-
}
|
|
5605
|
-
),
|
|
5606
|
-
/* @__PURE__ */ jsx42("span", { className: "text-sm text-[var(--color-muted-foreground)]", children: "and" }),
|
|
5607
|
-
/* @__PURE__ */ jsx42(
|
|
5608
|
-
"input",
|
|
5609
|
-
{
|
|
5610
|
-
type: "number",
|
|
5611
|
-
value: rangeVal[1] ?? "",
|
|
5612
|
-
onChange: (e) => onChange([rangeVal[0], Number(e.target.value)]),
|
|
5613
|
-
placeholder: "Max",
|
|
5614
|
-
className: cn(
|
|
5615
|
-
"flex-1 px-base py-sm rounded-base border border-[var(--color-input)]",
|
|
5616
|
-
"bg-[var(--color-background)] text-sm font-regular leading-sm text-[var(--color-foreground)]",
|
|
5617
|
-
"focus:outline-none focus:ring-2 focus:ring-[var(--color-ring)]"
|
|
5618
|
-
)
|
|
5619
|
-
}
|
|
5620
|
-
)
|
|
5621
|
-
] }),
|
|
5622
|
-
/* @__PURE__ */ jsx42(
|
|
5623
|
-
"button",
|
|
5624
|
-
{
|
|
5625
|
-
type: "button",
|
|
5626
|
-
onClick: onSubmit,
|
|
5627
|
-
className: "self-end px-md py-sm text-sm font-medium leading-sm text-[var(--color-primary-foreground)] bg-[var(--color-primary)] rounded-base cursor-pointer hover:opacity-90 transition-opacity",
|
|
5628
|
-
children: "Apply"
|
|
5629
|
-
}
|
|
5630
|
-
)
|
|
5631
|
-
] });
|
|
5631
|
+
}) => /* @__PURE__ */ jsxs39("div", { className: cn("flex flex-col gap-base p-base", className), children: [
|
|
5632
|
+
/* @__PURE__ */ jsx44(
|
|
5633
|
+
"input",
|
|
5634
|
+
{
|
|
5635
|
+
type: "date",
|
|
5636
|
+
value: value instanceof Date ? value.toISOString().split("T")[0] : value ?? "",
|
|
5637
|
+
onChange: (e) => onChange(e.target.value ? new Date(e.target.value) : null),
|
|
5638
|
+
autoFocus: true,
|
|
5639
|
+
className: inputClasses
|
|
5632
5640
|
}
|
|
5633
|
-
|
|
5634
|
-
|
|
5635
|
-
|
|
5636
|
-
|
|
5637
|
-
|
|
5638
|
-
|
|
5639
|
-
|
|
5640
|
-
|
|
5641
|
-
|
|
5642
|
-
|
|
5643
|
-
|
|
5644
|
-
|
|
5645
|
-
|
|
5646
|
-
|
|
5647
|
-
|
|
5648
|
-
|
|
5641
|
+
),
|
|
5642
|
+
/* @__PURE__ */ jsx44("button", { type: "button", onClick: onSubmit, className: applyBtnClasses, children: "Apply" })
|
|
5643
|
+
] });
|
|
5644
|
+
DatePickerValueInput.displayName = "DatePickerValueInput";
|
|
5645
|
+
function toDateString(d) {
|
|
5646
|
+
if (!d) return "";
|
|
5647
|
+
if (d instanceof Date) return d.toISOString().split("T")[0];
|
|
5648
|
+
return String(d);
|
|
5649
|
+
}
|
|
5650
|
+
var DateRangeValueInput = ({
|
|
5651
|
+
value,
|
|
5652
|
+
onChange,
|
|
5653
|
+
onSubmit,
|
|
5654
|
+
className
|
|
5655
|
+
}) => {
|
|
5656
|
+
const rangeVal = Array.isArray(value) ? value : [null, null];
|
|
5657
|
+
return /* @__PURE__ */ jsxs39("div", { className: cn("flex flex-col gap-base p-base", className), children: [
|
|
5658
|
+
/* @__PURE__ */ jsxs39("div", { className: "flex items-center gap-base", children: [
|
|
5659
|
+
/* @__PURE__ */ jsx44(
|
|
5660
|
+
"input",
|
|
5661
|
+
{
|
|
5662
|
+
type: "date",
|
|
5663
|
+
value: toDateString(rangeVal[0]),
|
|
5664
|
+
onChange: (e) => {
|
|
5665
|
+
const from = e.target.value ? new Date(e.target.value) : null;
|
|
5666
|
+
onChange([from, rangeVal[1]]);
|
|
5649
5667
|
},
|
|
5650
|
-
|
|
5651
|
-
|
|
5652
|
-
|
|
5653
|
-
|
|
5654
|
-
|
|
5668
|
+
autoFocus: true,
|
|
5669
|
+
className: halfInputClasses
|
|
5670
|
+
}
|
|
5671
|
+
),
|
|
5672
|
+
/* @__PURE__ */ jsx44("span", { className: "text-sm text-[var(--color-muted-foreground)]", children: "to" }),
|
|
5673
|
+
/* @__PURE__ */ jsx44(
|
|
5674
|
+
"input",
|
|
5675
|
+
{
|
|
5676
|
+
type: "date",
|
|
5677
|
+
value: toDateString(rangeVal[1]),
|
|
5678
|
+
onChange: (e) => {
|
|
5679
|
+
const to = e.target.value ? new Date(e.target.value) : null;
|
|
5680
|
+
onChange([rangeVal[0], to]);
|
|
5681
|
+
},
|
|
5682
|
+
className: halfInputClasses
|
|
5683
|
+
}
|
|
5684
|
+
)
|
|
5685
|
+
] }),
|
|
5686
|
+
/* @__PURE__ */ jsx44("button", { type: "button", onClick: onSubmit, className: applyBtnClasses, children: "Apply" })
|
|
5687
|
+
] });
|
|
5688
|
+
};
|
|
5689
|
+
DateRangeValueInput.displayName = "DateRangeValueInput";
|
|
5690
|
+
var PresetTagsValueInput = ({
|
|
5691
|
+
value,
|
|
5692
|
+
onChange,
|
|
5693
|
+
onSubmit,
|
|
5694
|
+
className
|
|
5695
|
+
}) => /* @__PURE__ */ jsx44("div", { className: cn("flex flex-col gap-base p-base max-w-[280px]", className), children: RELATIVE_DATE_PRESETS.map((group) => /* @__PURE__ */ jsxs39("div", { className: "flex flex-col gap-xs", children: [
|
|
5696
|
+
/* @__PURE__ */ jsx44("span", { className: "text-xs font-semibold leading-xs text-[var(--color-muted-foreground)] uppercase px-xs", children: group.group }),
|
|
5697
|
+
/* @__PURE__ */ jsx44("div", { className: "flex flex-wrap gap-xs", children: group.options.map((preset) => /* @__PURE__ */ jsx44(
|
|
5698
|
+
"button",
|
|
5699
|
+
{
|
|
5700
|
+
type: "button",
|
|
5701
|
+
onClick: () => {
|
|
5702
|
+
onChange(preset);
|
|
5703
|
+
onSubmit?.();
|
|
5704
|
+
},
|
|
5705
|
+
className: cn(
|
|
5706
|
+
"px-base py-2xs rounded-base border cursor-pointer transition-colors text-sm font-regular leading-sm",
|
|
5707
|
+
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)]"
|
|
5708
|
+
),
|
|
5709
|
+
children: preset
|
|
5710
|
+
},
|
|
5711
|
+
preset
|
|
5712
|
+
)) })
|
|
5713
|
+
] }, group.group)) });
|
|
5714
|
+
PresetTagsValueInput.displayName = "PresetTagsValueInput";
|
|
5715
|
+
|
|
5716
|
+
// src/components/ui/filter/value-inputs/select-value-input.tsx
|
|
5717
|
+
import { jsx as jsx45, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
5718
|
+
var SingleSelectValueInput = ({
|
|
5719
|
+
value,
|
|
5720
|
+
onChange,
|
|
5721
|
+
onSubmit,
|
|
5722
|
+
options,
|
|
5723
|
+
className
|
|
5724
|
+
}) => /* @__PURE__ */ jsx45("div", { className: cn("flex flex-col gap-xs p-base max-h-[250px] overflow-y-auto", className), children: options.map((opt) => /* @__PURE__ */ jsx45(
|
|
5725
|
+
"button",
|
|
5726
|
+
{
|
|
5727
|
+
type: "button",
|
|
5728
|
+
onClick: () => {
|
|
5729
|
+
onChange(opt);
|
|
5730
|
+
onSubmit?.();
|
|
5731
|
+
},
|
|
5732
|
+
className: cn(
|
|
5733
|
+
"flex items-center gap-base p-base rounded-base cursor-pointer transition-colors text-left",
|
|
5734
|
+
"hover:bg-[var(--color-dropdown-item-hover)]",
|
|
5735
|
+
value === opt && "bg-[var(--color-dropdown-item-hover)]"
|
|
5736
|
+
),
|
|
5737
|
+
children: /* @__PURE__ */ jsx45("span", { className: "text-sm font-regular leading-sm text-[var(--color-foreground)]", children: opt })
|
|
5738
|
+
},
|
|
5739
|
+
opt
|
|
5740
|
+
)) });
|
|
5741
|
+
SingleSelectValueInput.displayName = "SingleSelectValueInput";
|
|
5742
|
+
var MultiSelectValueInput = ({
|
|
5743
|
+
value,
|
|
5744
|
+
onChange,
|
|
5745
|
+
onSubmit,
|
|
5746
|
+
options,
|
|
5747
|
+
className
|
|
5748
|
+
}) => {
|
|
5749
|
+
const selected = Array.isArray(value) ? value : [];
|
|
5750
|
+
return /* @__PURE__ */ jsxs40("div", { className: cn("flex flex-col gap-xs p-base", className), children: [
|
|
5751
|
+
/* @__PURE__ */ jsx45("div", { className: "flex flex-col max-h-[200px] overflow-y-auto", children: options.map((opt) => {
|
|
5752
|
+
const isSelected = selected.includes(opt);
|
|
5753
|
+
return /* @__PURE__ */ jsxs40(
|
|
5655
5754
|
"button",
|
|
5656
5755
|
{
|
|
5657
5756
|
type: "button",
|
|
5658
5757
|
onClick: () => {
|
|
5659
|
-
|
|
5660
|
-
|
|
5758
|
+
const next = isSelected ? selected.filter((s) => s !== opt) : [...selected, opt];
|
|
5759
|
+
onChange(next);
|
|
5661
5760
|
},
|
|
5662
5761
|
className: cn(
|
|
5663
5762
|
"flex items-center gap-base p-base rounded-base cursor-pointer transition-colors text-left",
|
|
5664
|
-
"hover:bg-[var(--color-dropdown-item-hover)]"
|
|
5665
|
-
value === opt && "bg-[var(--color-dropdown-item-hover)]"
|
|
5763
|
+
"hover:bg-[var(--color-dropdown-item-hover)]"
|
|
5666
5764
|
),
|
|
5667
|
-
children:
|
|
5765
|
+
children: [
|
|
5766
|
+
/* @__PURE__ */ jsx45(
|
|
5767
|
+
"span",
|
|
5768
|
+
{
|
|
5769
|
+
className: cn(
|
|
5770
|
+
"flex items-center justify-center size-4 rounded-xs border transition-colors",
|
|
5771
|
+
isSelected ? "bg-[var(--color-primary)] border-[var(--color-primary)]" : "border-[var(--color-input)] bg-[var(--color-background)]"
|
|
5772
|
+
),
|
|
5773
|
+
children: isSelected && /* @__PURE__ */ jsx45("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", children: /* @__PURE__ */ jsx45("path", { d: "M2 5L4 7L8 3", stroke: "white", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
5774
|
+
}
|
|
5775
|
+
),
|
|
5776
|
+
/* @__PURE__ */ jsx45("span", { className: "text-sm font-regular leading-sm text-[var(--color-foreground)]", children: opt })
|
|
5777
|
+
]
|
|
5668
5778
|
},
|
|
5669
5779
|
opt
|
|
5670
|
-
)
|
|
5671
|
-
|
|
5672
|
-
|
|
5673
|
-
|
|
5674
|
-
|
|
5675
|
-
|
|
5676
|
-
|
|
5677
|
-
|
|
5678
|
-
|
|
5679
|
-
|
|
5680
|
-
|
|
5681
|
-
|
|
5682
|
-
|
|
5683
|
-
|
|
5684
|
-
|
|
5685
|
-
|
|
5686
|
-
|
|
5687
|
-
|
|
5688
|
-
|
|
5689
|
-
|
|
5690
|
-
|
|
5691
|
-
|
|
5692
|
-
|
|
5693
|
-
|
|
5694
|
-
|
|
5695
|
-
|
|
5696
|
-
|
|
5697
|
-
|
|
5698
|
-
|
|
5699
|
-
|
|
5700
|
-
|
|
5701
|
-
|
|
5702
|
-
|
|
5703
|
-
|
|
5704
|
-
|
|
5705
|
-
|
|
5706
|
-
|
|
5707
|
-
|
|
5708
|
-
|
|
5709
|
-
|
|
5710
|
-
|
|
5711
|
-
|
|
5712
|
-
|
|
5713
|
-
|
|
5714
|
-
|
|
5715
|
-
|
|
5716
|
-
|
|
5717
|
-
|
|
5780
|
+
);
|
|
5781
|
+
}) }),
|
|
5782
|
+
/* @__PURE__ */ jsx45("button", { type: "button", onClick: onSubmit, className: applyBtnClasses, children: "Apply" })
|
|
5783
|
+
] });
|
|
5784
|
+
};
|
|
5785
|
+
MultiSelectValueInput.displayName = "MultiSelectValueInput";
|
|
5786
|
+
|
|
5787
|
+
// src/components/ui/filter/value-inputs/relation-value-input.tsx
|
|
5788
|
+
import { jsx as jsx46, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
5789
|
+
var RelationValueInput = ({
|
|
5790
|
+
value,
|
|
5791
|
+
onChange,
|
|
5792
|
+
onSubmit,
|
|
5793
|
+
className
|
|
5794
|
+
}) => {
|
|
5795
|
+
const handleKeyDown = (e) => {
|
|
5796
|
+
if (e.key === "Enter") onSubmit?.();
|
|
5797
|
+
};
|
|
5798
|
+
return /* @__PURE__ */ jsxs41("div", { className: cn("flex flex-col gap-base p-base", className), children: [
|
|
5799
|
+
/* @__PURE__ */ jsx46(
|
|
5800
|
+
"input",
|
|
5801
|
+
{
|
|
5802
|
+
type: "text",
|
|
5803
|
+
value: value ?? "",
|
|
5804
|
+
onChange: (e) => onChange(e.target.value),
|
|
5805
|
+
onKeyDown: handleKeyDown,
|
|
5806
|
+
placeholder: "Search...",
|
|
5807
|
+
autoFocus: true,
|
|
5808
|
+
className: inputClasses
|
|
5809
|
+
}
|
|
5810
|
+
),
|
|
5811
|
+
/* @__PURE__ */ jsx46("button", { type: "button", onClick: onSubmit, className: applyBtnClasses, children: "Apply" })
|
|
5812
|
+
] });
|
|
5813
|
+
};
|
|
5814
|
+
RelationValueInput.displayName = "RelationValueInput";
|
|
5815
|
+
|
|
5816
|
+
// src/components/ui/filter/value-input.tsx
|
|
5817
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
5818
|
+
var ValueInput = ({
|
|
5819
|
+
dataType,
|
|
5820
|
+
operator,
|
|
5821
|
+
value,
|
|
5822
|
+
onChange,
|
|
5823
|
+
onSubmit,
|
|
5824
|
+
options = [],
|
|
5825
|
+
className
|
|
5826
|
+
}) => {
|
|
5827
|
+
const inputType = getValueInputType(dataType, operator);
|
|
5828
|
+
if (!inputType) return null;
|
|
5829
|
+
switch (inputType) {
|
|
5830
|
+
case "TextInput":
|
|
5831
|
+
return /* @__PURE__ */ jsx47(TextValueInput, { value, onChange, onSubmit, className });
|
|
5832
|
+
case "NumberInput":
|
|
5833
|
+
return /* @__PURE__ */ jsx47(NumberValueInput, { value, onChange, onSubmit, className });
|
|
5834
|
+
case "NumberRange":
|
|
5835
|
+
return /* @__PURE__ */ jsx47(NumberRangeValueInput, { value, onChange, onSubmit, className });
|
|
5836
|
+
case "PresetTags":
|
|
5837
|
+
return /* @__PURE__ */ jsx47(PresetTagsValueInput, { value, onChange, onSubmit, className });
|
|
5838
|
+
case "SingleSelect":
|
|
5839
|
+
return /* @__PURE__ */ jsx47(SingleSelectValueInput, { value, onChange, onSubmit, options, className });
|
|
5840
|
+
case "MultiSelect":
|
|
5841
|
+
return /* @__PURE__ */ jsx47(MultiSelectValueInput, { value, onChange, onSubmit, options, className });
|
|
5718
5842
|
case "DatePicker":
|
|
5719
|
-
return /* @__PURE__ */
|
|
5720
|
-
/* @__PURE__ */ jsx42(
|
|
5721
|
-
"input",
|
|
5722
|
-
{
|
|
5723
|
-
type: "date",
|
|
5724
|
-
value: value instanceof Date ? value.toISOString().split("T")[0] : value ?? "",
|
|
5725
|
-
onChange: (e) => onChange(e.target.value ? new Date(e.target.value) : null),
|
|
5726
|
-
autoFocus: true,
|
|
5727
|
-
className: cn(
|
|
5728
|
-
"w-full px-base py-sm rounded-base border border-[var(--color-input)]",
|
|
5729
|
-
"bg-[var(--color-background)] text-sm font-regular leading-sm text-[var(--color-foreground)]",
|
|
5730
|
-
"focus:outline-none focus:ring-2 focus:ring-[var(--color-ring)]"
|
|
5731
|
-
)
|
|
5732
|
-
}
|
|
5733
|
-
),
|
|
5734
|
-
/* @__PURE__ */ jsx42(
|
|
5735
|
-
"button",
|
|
5736
|
-
{
|
|
5737
|
-
type: "button",
|
|
5738
|
-
onClick: onSubmit,
|
|
5739
|
-
className: "self-end px-md py-sm text-sm font-medium 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
|
-
] });
|
|
5843
|
+
return /* @__PURE__ */ jsx47(DatePickerValueInput, { value, onChange, onSubmit, className });
|
|
5744
5844
|
case "DateRange":
|
|
5745
|
-
return /* @__PURE__ */
|
|
5746
|
-
/* @__PURE__ */ jsxs37("div", { className: "flex items-center gap-base", children: [
|
|
5747
|
-
/* @__PURE__ */ jsx42(
|
|
5748
|
-
"input",
|
|
5749
|
-
{
|
|
5750
|
-
type: "date",
|
|
5751
|
-
autoFocus: true,
|
|
5752
|
-
className: cn(
|
|
5753
|
-
"flex-1 px-base py-sm rounded-base border border-[var(--color-input)]",
|
|
5754
|
-
"bg-[var(--color-background)] text-sm font-regular leading-sm text-[var(--color-foreground)]",
|
|
5755
|
-
"focus:outline-none focus:ring-2 focus:ring-[var(--color-ring)]"
|
|
5756
|
-
)
|
|
5757
|
-
}
|
|
5758
|
-
),
|
|
5759
|
-
/* @__PURE__ */ jsx42("span", { className: "text-sm text-[var(--color-muted-foreground)]", children: "to" }),
|
|
5760
|
-
/* @__PURE__ */ jsx42(
|
|
5761
|
-
"input",
|
|
5762
|
-
{
|
|
5763
|
-
type: "date",
|
|
5764
|
-
className: cn(
|
|
5765
|
-
"flex-1 px-base py-sm rounded-base border border-[var(--color-input)]",
|
|
5766
|
-
"bg-[var(--color-background)] text-sm font-regular leading-sm text-[var(--color-foreground)]",
|
|
5767
|
-
"focus:outline-none focus:ring-2 focus:ring-[var(--color-ring)]"
|
|
5768
|
-
)
|
|
5769
|
-
}
|
|
5770
|
-
)
|
|
5771
|
-
] }),
|
|
5772
|
-
/* @__PURE__ */ jsx42(
|
|
5773
|
-
"button",
|
|
5774
|
-
{
|
|
5775
|
-
type: "button",
|
|
5776
|
-
onClick: onSubmit,
|
|
5777
|
-
className: "self-end px-md py-sm text-sm font-medium leading-sm text-[var(--color-primary-foreground)] bg-[var(--color-primary)] rounded-base cursor-pointer hover:opacity-90 transition-opacity",
|
|
5778
|
-
children: "Apply"
|
|
5779
|
-
}
|
|
5780
|
-
)
|
|
5781
|
-
] });
|
|
5845
|
+
return /* @__PURE__ */ jsx47(DateRangeValueInput, { value, onChange, onSubmit, className });
|
|
5782
5846
|
case "RelationPicker":
|
|
5783
5847
|
case "MultiRelationPicker":
|
|
5784
|
-
return /* @__PURE__ */
|
|
5785
|
-
/* @__PURE__ */ jsx42(
|
|
5786
|
-
"input",
|
|
5787
|
-
{
|
|
5788
|
-
type: "text",
|
|
5789
|
-
value: value ?? "",
|
|
5790
|
-
onChange: (e) => onChange(e.target.value),
|
|
5791
|
-
onKeyDown: handleKeyDown,
|
|
5792
|
-
placeholder: "Search...",
|
|
5793
|
-
autoFocus: true,
|
|
5794
|
-
className: cn(
|
|
5795
|
-
"w-full px-base py-sm rounded-base border border-[var(--color-input)]",
|
|
5796
|
-
"bg-[var(--color-background)] text-sm font-regular leading-sm text-[var(--color-foreground)]",
|
|
5797
|
-
"placeholder:text-[var(--color-muted-foreground)]",
|
|
5798
|
-
"focus:outline-none focus:ring-2 focus:ring-[var(--color-ring)]"
|
|
5799
|
-
)
|
|
5800
|
-
}
|
|
5801
|
-
),
|
|
5802
|
-
/* @__PURE__ */ jsx42(
|
|
5803
|
-
"button",
|
|
5804
|
-
{
|
|
5805
|
-
type: "button",
|
|
5806
|
-
onClick: onSubmit,
|
|
5807
|
-
className: "self-end px-md py-sm text-sm font-medium leading-sm text-[var(--color-primary-foreground)] bg-[var(--color-primary)] rounded-base cursor-pointer hover:opacity-90 transition-opacity",
|
|
5808
|
-
children: "Apply"
|
|
5809
|
-
}
|
|
5810
|
-
)
|
|
5811
|
-
] });
|
|
5848
|
+
return /* @__PURE__ */ jsx47(RelationValueInput, { value, onChange, onSubmit, className });
|
|
5812
5849
|
default:
|
|
5813
5850
|
return null;
|
|
5814
5851
|
}
|
|
@@ -5818,15 +5855,57 @@ ValueInput.displayName = "ValueInput";
|
|
|
5818
5855
|
// src/components/ui/filter/property-selector.tsx
|
|
5819
5856
|
import * as React41 from "react";
|
|
5820
5857
|
import * as PopoverPrimitive5 from "@radix-ui/react-popover";
|
|
5821
|
-
import {
|
|
5822
|
-
|
|
5858
|
+
import {
|
|
5859
|
+
Icon as Icon26,
|
|
5860
|
+
faChevronLeftOutline as faChevronLeftOutline2,
|
|
5861
|
+
faChevronRightOutline as faChevronRightOutline2,
|
|
5862
|
+
faMagnifyingGlassOutline,
|
|
5863
|
+
faFilterOutline as faFilterOutline2
|
|
5864
|
+
} from "@l3mpire/icons";
|
|
5865
|
+
import { Fragment as Fragment4, jsx as jsx48, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
5866
|
+
var AdvancedFilterFooter = ({ onClick, count }) => /* @__PURE__ */ jsxs42(Fragment4, { children: [
|
|
5867
|
+
/* @__PURE__ */ jsx48("div", { className: "h-px bg-[var(--color-dropdown-border)] mx-xs" }),
|
|
5868
|
+
/* @__PURE__ */ jsxs42(
|
|
5869
|
+
"button",
|
|
5870
|
+
{
|
|
5871
|
+
type: "button",
|
|
5872
|
+
onPointerDown: (e) => e.preventDefault(),
|
|
5873
|
+
onClick,
|
|
5874
|
+
className: "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-[var(--color-dropdown-item-hover)]",
|
|
5875
|
+
children: [
|
|
5876
|
+
/* @__PURE__ */ jsx48(
|
|
5877
|
+
Icon26,
|
|
5878
|
+
{
|
|
5879
|
+
icon: faFilterOutline2,
|
|
5880
|
+
size: "sm",
|
|
5881
|
+
className: "shrink-0 text-[var(--color-dropdown-item-icon)]"
|
|
5882
|
+
}
|
|
5883
|
+
),
|
|
5884
|
+
/* @__PURE__ */ jsx48("span", { className: "flex-1 text-sm font-regular leading-sm text-[var(--color-dropdown-item-text)] text-left truncate", children: "Advanced filter" }),
|
|
5885
|
+
count > 0 && /* @__PURE__ */ jsxs42("span", { className: "text-xs font-regular leading-xs text-[var(--color-muted-foreground)]", children: [
|
|
5886
|
+
count,
|
|
5887
|
+
" ",
|
|
5888
|
+
count === 1 ? "rule" : "rules"
|
|
5889
|
+
] })
|
|
5890
|
+
]
|
|
5891
|
+
}
|
|
5892
|
+
)
|
|
5893
|
+
] });
|
|
5823
5894
|
var PropertySelector = ({
|
|
5824
5895
|
properties,
|
|
5825
5896
|
onSelect,
|
|
5826
5897
|
open,
|
|
5827
5898
|
onOpenChange,
|
|
5828
|
-
children
|
|
5899
|
+
children,
|
|
5900
|
+
onAdvancedFilter,
|
|
5901
|
+
advancedFilterCount = 0
|
|
5829
5902
|
}) => {
|
|
5903
|
+
const handleAdvancedClick = (e) => {
|
|
5904
|
+
e.stopPropagation();
|
|
5905
|
+
e.preventDefault();
|
|
5906
|
+
onAdvancedFilter?.();
|
|
5907
|
+
};
|
|
5908
|
+
const showAdvancedFooter = !!onAdvancedFilter;
|
|
5830
5909
|
const [activeGroup, setActiveGroup] = React41.useState(null);
|
|
5831
5910
|
const [search, setSearch] = React41.useState("");
|
|
5832
5911
|
React41.useEffect(() => {
|
|
@@ -5852,6 +5931,20 @@ var PropertySelector = ({
|
|
|
5852
5931
|
}
|
|
5853
5932
|
return Array.from(map.values());
|
|
5854
5933
|
}, [properties]);
|
|
5934
|
+
const globalSearchResults = React41.useMemo(() => {
|
|
5935
|
+
if (!search || activeGroup) return [];
|
|
5936
|
+
const lower = search.toLowerCase();
|
|
5937
|
+
return properties.filter((p) => p.label.toLowerCase().includes(lower));
|
|
5938
|
+
}, [properties, search, activeGroup]);
|
|
5939
|
+
const filteredGroups = React41.useMemo(() => {
|
|
5940
|
+
if (!search || activeGroup) return groups;
|
|
5941
|
+
const lower = search.toLowerCase();
|
|
5942
|
+
return groups.filter(
|
|
5943
|
+
(g) => g.groupLabel.toLowerCase().includes(lower) || properties.some(
|
|
5944
|
+
(p) => p.group === g.group && p.label.toLowerCase().includes(lower)
|
|
5945
|
+
)
|
|
5946
|
+
);
|
|
5947
|
+
}, [groups, properties, search, activeGroup]);
|
|
5855
5948
|
const filteredProperties = React41.useMemo(() => {
|
|
5856
5949
|
if (!activeGroup) return [];
|
|
5857
5950
|
const groupProps = properties.filter((p) => p.group === activeGroup);
|
|
@@ -5860,13 +5953,15 @@ var PropertySelector = ({
|
|
|
5860
5953
|
return groupProps.filter((p) => p.label.toLowerCase().includes(lower));
|
|
5861
5954
|
}, [properties, activeGroup, search]);
|
|
5862
5955
|
const activeGroupInfo = groups.find((g) => g.group === activeGroup);
|
|
5863
|
-
|
|
5864
|
-
|
|
5865
|
-
/* @__PURE__ */
|
|
5956
|
+
const showGlobalResults = search.length > 0 && !activeGroup && globalSearchResults.length > 0;
|
|
5957
|
+
return /* @__PURE__ */ jsxs42(PopoverPrimitive5.Root, { open, onOpenChange, children: [
|
|
5958
|
+
/* @__PURE__ */ jsx48(PopoverPrimitive5.Trigger, { asChild: true, children }),
|
|
5959
|
+
/* @__PURE__ */ jsx48(PopoverPrimitive5.Portal, { children: /* @__PURE__ */ jsxs42(
|
|
5866
5960
|
PopoverPrimitive5.Content,
|
|
5867
5961
|
{
|
|
5868
5962
|
sideOffset: 4,
|
|
5869
5963
|
align: "start",
|
|
5964
|
+
onCloseAutoFocus: (e) => e.preventDefault(),
|
|
5870
5965
|
className: cn(
|
|
5871
5966
|
"z-50 flex flex-col gap-xs overflow-clip p-xs",
|
|
5872
5967
|
"bg-[var(--color-dropdown-bg)] border border-[var(--color-dropdown-border)] rounded-md shadow-lg",
|
|
@@ -5875,111 +5970,178 @@ var PropertySelector = ({
|
|
|
5875
5970
|
"data-[side=bottom]:slide-in-from-top-2",
|
|
5876
5971
|
"min-w-[230px]"
|
|
5877
5972
|
),
|
|
5878
|
-
children:
|
|
5879
|
-
|
|
5880
|
-
|
|
5881
|
-
"
|
|
5882
|
-
|
|
5883
|
-
|
|
5884
|
-
onClick: () => setActiveGroup(g.group),
|
|
5885
|
-
className: "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-[var(--color-dropdown-item-hover)]",
|
|
5886
|
-
children: [
|
|
5887
|
-
/* @__PURE__ */ jsx43(
|
|
5973
|
+
children: [
|
|
5974
|
+
activeGroup === null ? (
|
|
5975
|
+
/* ── Level 1: Search + Categories ───────────────────────── */
|
|
5976
|
+
/* @__PURE__ */ jsxs42("div", { className: "flex flex-col gap-xs", children: [
|
|
5977
|
+
/* @__PURE__ */ jsxs42("div", { className: "flex items-center gap-base px-md py-base border border-[var(--color-input)] rounded-md", children: [
|
|
5978
|
+
/* @__PURE__ */ jsx48(
|
|
5888
5979
|
Icon26,
|
|
5889
5980
|
{
|
|
5890
|
-
icon:
|
|
5981
|
+
icon: faMagnifyingGlassOutline,
|
|
5891
5982
|
size: "sm",
|
|
5892
|
-
className: "shrink-0 text-[var(--color-
|
|
5983
|
+
className: "shrink-0 text-[var(--color-muted-foreground)]"
|
|
5893
5984
|
}
|
|
5894
5985
|
),
|
|
5895
|
-
/* @__PURE__ */
|
|
5896
|
-
|
|
5897
|
-
/* @__PURE__ */ jsx43(
|
|
5898
|
-
Icon26,
|
|
5986
|
+
/* @__PURE__ */ jsx48(
|
|
5987
|
+
"input",
|
|
5899
5988
|
{
|
|
5900
|
-
|
|
5901
|
-
|
|
5902
|
-
|
|
5989
|
+
type: "text",
|
|
5990
|
+
value: search,
|
|
5991
|
+
onChange: (e) => setSearch(e.target.value),
|
|
5992
|
+
placeholder: "Search...",
|
|
5993
|
+
autoFocus: true,
|
|
5994
|
+
className: "flex-1 text-sm font-regular leading-sm text-[var(--color-foreground)] bg-transparent outline-none placeholder:text-[var(--color-muted-foreground)]"
|
|
5903
5995
|
}
|
|
5904
5996
|
)
|
|
5905
|
-
]
|
|
5906
|
-
|
|
5907
|
-
|
|
5908
|
-
|
|
5909
|
-
|
|
5910
|
-
|
|
5911
|
-
|
|
5912
|
-
|
|
5913
|
-
|
|
5914
|
-
|
|
5915
|
-
|
|
5916
|
-
|
|
5917
|
-
|
|
5918
|
-
|
|
5919
|
-
|
|
5920
|
-
|
|
5921
|
-
|
|
5922
|
-
|
|
5923
|
-
|
|
5997
|
+
] }),
|
|
5998
|
+
showGlobalResults ? (
|
|
5999
|
+
/* ── Global search results (flat property list) ─────── */
|
|
6000
|
+
/* @__PURE__ */ jsx48("div", { className: "flex flex-col max-h-[300px] overflow-y-auto", children: globalSearchResults.map((prop) => /* @__PURE__ */ jsxs42(
|
|
6001
|
+
"button",
|
|
6002
|
+
{
|
|
6003
|
+
type: "button",
|
|
6004
|
+
onClick: () => {
|
|
6005
|
+
onSelect(prop);
|
|
6006
|
+
onOpenChange?.(false);
|
|
6007
|
+
},
|
|
6008
|
+
className: "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-[var(--color-dropdown-item-hover)]",
|
|
6009
|
+
children: [
|
|
6010
|
+
/* @__PURE__ */ jsx48(
|
|
6011
|
+
Icon26,
|
|
6012
|
+
{
|
|
6013
|
+
icon: prop.icon,
|
|
6014
|
+
size: "sm",
|
|
6015
|
+
className: "shrink-0 text-[var(--color-dropdown-item-icon)]"
|
|
6016
|
+
}
|
|
6017
|
+
),
|
|
6018
|
+
/* @__PURE__ */ jsx48("span", { className: "flex-1 text-sm font-regular leading-sm text-[var(--color-dropdown-item-text)] text-left truncate", children: prop.label }),
|
|
6019
|
+
/* @__PURE__ */ jsx48("span", { className: "text-xs font-regular leading-xs text-[var(--color-muted-foreground)]", children: prop.groupLabel })
|
|
6020
|
+
]
|
|
6021
|
+
},
|
|
6022
|
+
prop.id
|
|
6023
|
+
)) })
|
|
6024
|
+
) : (
|
|
6025
|
+
/* ── Group list ─────────────────────────────────────── */
|
|
6026
|
+
/* @__PURE__ */ jsxs42("div", { className: "flex flex-col", children: [
|
|
6027
|
+
filteredGroups.map((g) => /* @__PURE__ */ jsxs42(
|
|
6028
|
+
"button",
|
|
5924
6029
|
{
|
|
5925
|
-
|
|
5926
|
-
|
|
5927
|
-
|
|
5928
|
-
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
|
|
5935
|
-
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
|
|
5940
|
-
|
|
5941
|
-
|
|
5942
|
-
|
|
5943
|
-
|
|
5944
|
-
|
|
5945
|
-
|
|
5946
|
-
|
|
5947
|
-
|
|
5948
|
-
|
|
5949
|
-
|
|
5950
|
-
|
|
5951
|
-
|
|
5952
|
-
|
|
6030
|
+
type: "button",
|
|
6031
|
+
onClick: () => {
|
|
6032
|
+
setActiveGroup(g.group);
|
|
6033
|
+
setSearch("");
|
|
6034
|
+
},
|
|
6035
|
+
className: "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-[var(--color-dropdown-item-hover)]",
|
|
6036
|
+
children: [
|
|
6037
|
+
/* @__PURE__ */ jsx48(
|
|
6038
|
+
Icon26,
|
|
6039
|
+
{
|
|
6040
|
+
icon: g.groupIcon,
|
|
6041
|
+
size: "sm",
|
|
6042
|
+
className: "shrink-0 text-[var(--color-dropdown-item-icon)]"
|
|
6043
|
+
}
|
|
6044
|
+
),
|
|
6045
|
+
/* @__PURE__ */ jsx48("span", { className: "flex-1 text-sm font-regular leading-sm text-[var(--color-dropdown-item-text)] text-left truncate", children: g.groupLabel }),
|
|
6046
|
+
/* @__PURE__ */ jsx48("span", { className: "text-xs font-semibold leading-xs text-[var(--color-muted-foreground)]", children: g.count }),
|
|
6047
|
+
/* @__PURE__ */ jsx48(
|
|
6048
|
+
Icon26,
|
|
6049
|
+
{
|
|
6050
|
+
icon: faChevronRightOutline2,
|
|
6051
|
+
size: "xs",
|
|
6052
|
+
className: "shrink-0 text-[var(--color-dropdown-item-icon)]"
|
|
6053
|
+
}
|
|
6054
|
+
)
|
|
6055
|
+
]
|
|
6056
|
+
},
|
|
6057
|
+
g.group
|
|
6058
|
+
)),
|
|
6059
|
+
filteredGroups.length === 0 && /* @__PURE__ */ jsx48("span", { className: "p-base text-sm text-[var(--color-muted-foreground)]", children: "No results" })
|
|
6060
|
+
] })
|
|
5953
6061
|
)
|
|
5954
|
-
] })
|
|
5955
|
-
|
|
5956
|
-
|
|
6062
|
+
] })
|
|
6063
|
+
) : (
|
|
6064
|
+
/* ── Level 2: Properties ─────────────────────────────────── */
|
|
6065
|
+
/* @__PURE__ */ jsxs42("div", { className: "flex flex-col gap-xs", children: [
|
|
6066
|
+
/* @__PURE__ */ jsxs42(
|
|
5957
6067
|
"button",
|
|
5958
6068
|
{
|
|
5959
6069
|
type: "button",
|
|
5960
6070
|
onClick: () => {
|
|
5961
|
-
|
|
5962
|
-
|
|
6071
|
+
setActiveGroup(null);
|
|
6072
|
+
setSearch("");
|
|
5963
6073
|
},
|
|
5964
6074
|
className: "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-[var(--color-dropdown-item-hover)]",
|
|
5965
6075
|
children: [
|
|
5966
|
-
/* @__PURE__ */
|
|
6076
|
+
/* @__PURE__ */ jsx48(
|
|
5967
6077
|
Icon26,
|
|
5968
6078
|
{
|
|
5969
|
-
icon:
|
|
6079
|
+
icon: faChevronLeftOutline2,
|
|
5970
6080
|
size: "sm",
|
|
5971
6081
|
className: "shrink-0 text-[var(--color-dropdown-item-icon)]"
|
|
5972
6082
|
}
|
|
5973
6083
|
),
|
|
5974
|
-
/* @__PURE__ */
|
|
6084
|
+
/* @__PURE__ */ jsx48("span", { className: "flex-1 text-xs font-semibold leading-xs text-[var(--color-muted-foreground)] text-left truncate", children: activeGroupInfo?.groupLabel })
|
|
5975
6085
|
]
|
|
5976
|
-
}
|
|
5977
|
-
|
|
5978
|
-
)
|
|
5979
|
-
|
|
6086
|
+
}
|
|
6087
|
+
),
|
|
6088
|
+
/* @__PURE__ */ jsxs42("div", { className: "flex items-center gap-base px-md py-base border border-[var(--color-input)] rounded-md", children: [
|
|
6089
|
+
/* @__PURE__ */ jsx48(
|
|
6090
|
+
Icon26,
|
|
6091
|
+
{
|
|
6092
|
+
icon: faMagnifyingGlassOutline,
|
|
6093
|
+
size: "sm",
|
|
6094
|
+
className: "shrink-0 text-[var(--color-muted-foreground)]"
|
|
6095
|
+
}
|
|
6096
|
+
),
|
|
6097
|
+
/* @__PURE__ */ jsx48(
|
|
6098
|
+
"input",
|
|
6099
|
+
{
|
|
6100
|
+
type: "text",
|
|
6101
|
+
value: search,
|
|
6102
|
+
onChange: (e) => setSearch(e.target.value),
|
|
6103
|
+
placeholder: "Search...",
|
|
6104
|
+
autoFocus: true,
|
|
6105
|
+
className: "flex-1 text-sm font-regular leading-sm text-[var(--color-foreground)] bg-transparent outline-none placeholder:text-[var(--color-muted-foreground)]"
|
|
6106
|
+
}
|
|
6107
|
+
)
|
|
6108
|
+
] }),
|
|
6109
|
+
/* @__PURE__ */ jsxs42("div", { className: "flex flex-col max-h-[300px] overflow-y-auto", children: [
|
|
6110
|
+
filteredProperties.map((prop) => /* @__PURE__ */ jsxs42(
|
|
6111
|
+
"button",
|
|
6112
|
+
{
|
|
6113
|
+
type: "button",
|
|
6114
|
+
onClick: () => {
|
|
6115
|
+
onSelect(prop);
|
|
6116
|
+
onOpenChange?.(false);
|
|
6117
|
+
},
|
|
6118
|
+
className: "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-[var(--color-dropdown-item-hover)]",
|
|
6119
|
+
children: [
|
|
6120
|
+
/* @__PURE__ */ jsx48(
|
|
6121
|
+
Icon26,
|
|
6122
|
+
{
|
|
6123
|
+
icon: prop.icon,
|
|
6124
|
+
size: "sm",
|
|
6125
|
+
className: "shrink-0 text-[var(--color-dropdown-item-icon)]"
|
|
6126
|
+
}
|
|
6127
|
+
),
|
|
6128
|
+
/* @__PURE__ */ jsx48("span", { className: "flex-1 text-sm font-regular leading-sm text-[var(--color-dropdown-item-text)] text-left truncate", children: prop.label })
|
|
6129
|
+
]
|
|
6130
|
+
},
|
|
6131
|
+
prop.id
|
|
6132
|
+
)),
|
|
6133
|
+
filteredProperties.length === 0 && /* @__PURE__ */ jsx48("span", { className: "p-base text-sm text-[var(--color-muted-foreground)]", children: "No results" })
|
|
6134
|
+
] })
|
|
5980
6135
|
] })
|
|
5981
|
-
|
|
5982
|
-
|
|
6136
|
+
),
|
|
6137
|
+
showAdvancedFooter && /* @__PURE__ */ jsx48(
|
|
6138
|
+
AdvancedFilterFooter,
|
|
6139
|
+
{
|
|
6140
|
+
onClick: handleAdvancedClick,
|
|
6141
|
+
count: advancedFilterCount
|
|
6142
|
+
}
|
|
6143
|
+
)
|
|
6144
|
+
]
|
|
5983
6145
|
}
|
|
5984
6146
|
) })
|
|
5985
6147
|
] });
|
|
@@ -5989,16 +6151,16 @@ PropertySelector.displayName = "PropertySelector";
|
|
|
5989
6151
|
// src/components/ui/filter/kebab-menu.tsx
|
|
5990
6152
|
import * as PopoverPrimitive6 from "@radix-ui/react-popover";
|
|
5991
6153
|
import { Icon as Icon27, faArrowRightOutline, faTrashOutline } from "@l3mpire/icons";
|
|
5992
|
-
import { jsx as
|
|
6154
|
+
import { jsx as jsx49, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
5993
6155
|
var KebabMenu = ({
|
|
5994
6156
|
onConvertToAdvanced,
|
|
5995
6157
|
onDelete,
|
|
5996
6158
|
open,
|
|
5997
6159
|
onOpenChange,
|
|
5998
6160
|
children
|
|
5999
|
-
}) => /* @__PURE__ */
|
|
6000
|
-
/* @__PURE__ */
|
|
6001
|
-
/* @__PURE__ */
|
|
6161
|
+
}) => /* @__PURE__ */ jsxs43(PopoverPrimitive6.Root, { open, onOpenChange, children: [
|
|
6162
|
+
/* @__PURE__ */ jsx49(PopoverPrimitive6.Trigger, { asChild: true, children }),
|
|
6163
|
+
/* @__PURE__ */ jsx49(PopoverPrimitive6.Portal, { children: /* @__PURE__ */ jsxs43(
|
|
6002
6164
|
PopoverPrimitive6.Content,
|
|
6003
6165
|
{
|
|
6004
6166
|
sideOffset: 4,
|
|
@@ -6012,7 +6174,7 @@ var KebabMenu = ({
|
|
|
6012
6174
|
"min-w-[210px]"
|
|
6013
6175
|
),
|
|
6014
6176
|
children: [
|
|
6015
|
-
onConvertToAdvanced && /* @__PURE__ */
|
|
6177
|
+
onConvertToAdvanced && /* @__PURE__ */ jsxs43(
|
|
6016
6178
|
"button",
|
|
6017
6179
|
{
|
|
6018
6180
|
type: "button",
|
|
@@ -6022,7 +6184,7 @@ var KebabMenu = ({
|
|
|
6022
6184
|
},
|
|
6023
6185
|
className: "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-[var(--color-dropdown-item-hover)]",
|
|
6024
6186
|
children: [
|
|
6025
|
-
/* @__PURE__ */
|
|
6187
|
+
/* @__PURE__ */ jsx49(
|
|
6026
6188
|
Icon27,
|
|
6027
6189
|
{
|
|
6028
6190
|
icon: faArrowRightOutline,
|
|
@@ -6030,12 +6192,12 @@ var KebabMenu = ({
|
|
|
6030
6192
|
className: "shrink-0 text-[var(--color-dropdown-item-icon)]"
|
|
6031
6193
|
}
|
|
6032
6194
|
),
|
|
6033
|
-
/* @__PURE__ */
|
|
6195
|
+
/* @__PURE__ */ jsx49("span", { className: "text-sm font-regular leading-sm text-[var(--color-dropdown-item-text)]", children: "Convert to advanced" })
|
|
6034
6196
|
]
|
|
6035
6197
|
}
|
|
6036
6198
|
),
|
|
6037
|
-
onConvertToAdvanced && onDelete && /* @__PURE__ */
|
|
6038
|
-
onDelete && /* @__PURE__ */
|
|
6199
|
+
onConvertToAdvanced && onDelete && /* @__PURE__ */ jsx49("div", { className: "h-px mx-base my-xs bg-[var(--color-border)]" }),
|
|
6200
|
+
onDelete && /* @__PURE__ */ jsxs43(
|
|
6039
6201
|
"button",
|
|
6040
6202
|
{
|
|
6041
6203
|
type: "button",
|
|
@@ -6045,7 +6207,7 @@ var KebabMenu = ({
|
|
|
6045
6207
|
},
|
|
6046
6208
|
className: "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-[var(--color-dropdown-item-hover)]",
|
|
6047
6209
|
children: [
|
|
6048
|
-
/* @__PURE__ */
|
|
6210
|
+
/* @__PURE__ */ jsx49(
|
|
6049
6211
|
Icon27,
|
|
6050
6212
|
{
|
|
6051
6213
|
icon: faTrashOutline,
|
|
@@ -6053,7 +6215,7 @@ var KebabMenu = ({
|
|
|
6053
6215
|
className: "shrink-0 text-[var(--color-destructive)]"
|
|
6054
6216
|
}
|
|
6055
6217
|
),
|
|
6056
|
-
/* @__PURE__ */
|
|
6218
|
+
/* @__PURE__ */ jsx49("span", { className: "text-sm font-regular leading-sm text-[var(--color-destructive)]", children: "Delete filter" })
|
|
6057
6219
|
]
|
|
6058
6220
|
}
|
|
6059
6221
|
)
|
|
@@ -6067,7 +6229,7 @@ KebabMenu.displayName = "KebabMenu";
|
|
|
6067
6229
|
import * as React42 from "react";
|
|
6068
6230
|
import * as PopoverPrimitive7 from "@radix-ui/react-popover";
|
|
6069
6231
|
import { Icon as Icon28 } from "@l3mpire/icons";
|
|
6070
|
-
import { jsx as
|
|
6232
|
+
import { jsx as jsx50, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
6071
6233
|
var FilterEditor = ({
|
|
6072
6234
|
propertyDef,
|
|
6073
6235
|
condition,
|
|
@@ -6112,9 +6274,9 @@ var FilterEditor = ({
|
|
|
6112
6274
|
onOpenChange?.(false);
|
|
6113
6275
|
onClose();
|
|
6114
6276
|
};
|
|
6115
|
-
return /* @__PURE__ */
|
|
6116
|
-
/* @__PURE__ */
|
|
6117
|
-
/* @__PURE__ */
|
|
6277
|
+
return /* @__PURE__ */ jsxs44(PopoverPrimitive7.Root, { open, onOpenChange, children: [
|
|
6278
|
+
/* @__PURE__ */ jsx50(PopoverPrimitive7.Trigger, { asChild: true, children }),
|
|
6279
|
+
/* @__PURE__ */ jsx50(PopoverPrimitive7.Portal, { children: /* @__PURE__ */ jsxs44(
|
|
6118
6280
|
PopoverPrimitive7.Content,
|
|
6119
6281
|
{
|
|
6120
6282
|
sideOffset: 4,
|
|
@@ -6128,8 +6290,8 @@ var FilterEditor = ({
|
|
|
6128
6290
|
"min-w-[240px]"
|
|
6129
6291
|
),
|
|
6130
6292
|
children: [
|
|
6131
|
-
/* @__PURE__ */
|
|
6132
|
-
/* @__PURE__ */
|
|
6293
|
+
/* @__PURE__ */ jsxs44("div", { className: "flex items-center gap-base px-base pt-base pb-xs border-b border-[var(--color-border)]", children: [
|
|
6294
|
+
/* @__PURE__ */ jsx50(
|
|
6133
6295
|
Icon28,
|
|
6134
6296
|
{
|
|
6135
6297
|
icon: propertyDef.icon,
|
|
@@ -6137,8 +6299,8 @@ var FilterEditor = ({
|
|
|
6137
6299
|
className: "shrink-0 text-[var(--color-dropdown-item-icon)]"
|
|
6138
6300
|
}
|
|
6139
6301
|
),
|
|
6140
|
-
/* @__PURE__ */
|
|
6141
|
-
localOperator && view === "value" && /* @__PURE__ */
|
|
6302
|
+
/* @__PURE__ */ jsx50("span", { className: "text-sm font-semibold leading-sm text-[var(--color-foreground)]", children: propertyDef.label }),
|
|
6303
|
+
localOperator && view === "value" && /* @__PURE__ */ jsxs44(
|
|
6142
6304
|
"button",
|
|
6143
6305
|
{
|
|
6144
6306
|
type: "button",
|
|
@@ -6151,14 +6313,14 @@ var FilterEditor = ({
|
|
|
6151
6313
|
}
|
|
6152
6314
|
)
|
|
6153
6315
|
] }),
|
|
6154
|
-
view === "operator" ? /* @__PURE__ */
|
|
6316
|
+
view === "operator" ? /* @__PURE__ */ jsx50("div", { className: "p-xs", children: /* @__PURE__ */ jsx50(
|
|
6155
6317
|
OperatorList,
|
|
6156
6318
|
{
|
|
6157
6319
|
dataType: propertyDef.type,
|
|
6158
6320
|
activeOperator: localOperator,
|
|
6159
6321
|
onSelect: handleOperatorSelect
|
|
6160
6322
|
}
|
|
6161
|
-
) }) : localOperator && /* @__PURE__ */
|
|
6323
|
+
) }) : localOperator && /* @__PURE__ */ jsx50(
|
|
6162
6324
|
ValueInput,
|
|
6163
6325
|
{
|
|
6164
6326
|
dataType: propertyDef.type,
|
|
@@ -6179,7 +6341,7 @@ FilterEditor.displayName = "FilterEditor";
|
|
|
6179
6341
|
// src/components/ui/filter/interactive-filter-chip.tsx
|
|
6180
6342
|
import * as React43 from "react";
|
|
6181
6343
|
import * as PopoverPrimitive8 from "@radix-ui/react-popover";
|
|
6182
|
-
import { jsx as
|
|
6344
|
+
import { jsx as jsx51, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
6183
6345
|
function formatFilterValue(value) {
|
|
6184
6346
|
if (value == null) return void 0;
|
|
6185
6347
|
if (typeof value === "boolean") return value ? "Yes" : "No";
|
|
@@ -6212,9 +6374,9 @@ var SegmentPopover = ({
|
|
|
6212
6374
|
children,
|
|
6213
6375
|
align = "start",
|
|
6214
6376
|
minWidth = "240px"
|
|
6215
|
-
}) => /* @__PURE__ */
|
|
6216
|
-
/* @__PURE__ */
|
|
6217
|
-
/* @__PURE__ */
|
|
6377
|
+
}) => /* @__PURE__ */ jsxs45(PopoverPrimitive8.Root, { open, onOpenChange, children: [
|
|
6378
|
+
/* @__PURE__ */ jsx51(PopoverPrimitive8.Trigger, { asChild: true, children: trigger }),
|
|
6379
|
+
/* @__PURE__ */ jsx51(PopoverPrimitive8.Portal, { children: /* @__PURE__ */ jsx51(
|
|
6218
6380
|
PopoverPrimitive8.Content,
|
|
6219
6381
|
{
|
|
6220
6382
|
sideOffset: 4,
|
|
@@ -6247,12 +6409,20 @@ var InteractiveFilterChip = ({
|
|
|
6247
6409
|
const [valueOpen, setValueOpen] = React43.useState(false);
|
|
6248
6410
|
const [propertyOpen, setPropertyOpen] = React43.useState(false);
|
|
6249
6411
|
const [kebabOpen, setKebabOpen] = React43.useState(false);
|
|
6412
|
+
const [pendingValueOpen, setPendingValueOpen] = React43.useState(false);
|
|
6413
|
+
const autoOpenHandled = React43.useRef(false);
|
|
6250
6414
|
React43.useEffect(() => {
|
|
6251
|
-
if (autoOpen && condition.operator && !isNoValueOperator(condition.operator)) {
|
|
6252
|
-
|
|
6253
|
-
|
|
6415
|
+
if (autoOpen && !autoOpenHandled.current && condition.operator && !isNoValueOperator(condition.operator)) {
|
|
6416
|
+
autoOpenHandled.current = true;
|
|
6417
|
+
setValueOpen(true);
|
|
6254
6418
|
}
|
|
6255
|
-
}, []);
|
|
6419
|
+
}, [autoOpen, condition.operator]);
|
|
6420
|
+
React43.useEffect(() => {
|
|
6421
|
+
if (!operatorOpen && pendingValueOpen) {
|
|
6422
|
+
setPendingValueOpen(false);
|
|
6423
|
+
setValueOpen(true);
|
|
6424
|
+
}
|
|
6425
|
+
}, [operatorOpen, pendingValueOpen]);
|
|
6256
6426
|
const handleOperatorSelect = (op) => {
|
|
6257
6427
|
if (isNoValueOperator(op)) {
|
|
6258
6428
|
onUpdate({ ...condition, operator: op, value: null });
|
|
@@ -6262,7 +6432,7 @@ var InteractiveFilterChip = ({
|
|
|
6262
6432
|
onUpdate({ ...condition, operator: op, value: resetValue });
|
|
6263
6433
|
setOperatorOpen(false);
|
|
6264
6434
|
if (resetValue == null) {
|
|
6265
|
-
|
|
6435
|
+
setPendingValueOpen(true);
|
|
6266
6436
|
}
|
|
6267
6437
|
}
|
|
6268
6438
|
};
|
|
@@ -6276,7 +6446,7 @@ var InteractiveFilterChip = ({
|
|
|
6276
6446
|
const displayValue = formatFilterValue(condition.value);
|
|
6277
6447
|
const hasValue = hasOperator && displayValue != null;
|
|
6278
6448
|
const badgeCount = getBadgeCount(condition.value);
|
|
6279
|
-
return /* @__PURE__ */
|
|
6449
|
+
return /* @__PURE__ */ jsxs45(
|
|
6280
6450
|
"div",
|
|
6281
6451
|
{
|
|
6282
6452
|
className: cn(
|
|
@@ -6285,7 +6455,7 @@ var InteractiveFilterChip = ({
|
|
|
6285
6455
|
className
|
|
6286
6456
|
),
|
|
6287
6457
|
children: [
|
|
6288
|
-
properties ? /* @__PURE__ */
|
|
6458
|
+
properties ? /* @__PURE__ */ jsx51(
|
|
6289
6459
|
PropertySelector,
|
|
6290
6460
|
{
|
|
6291
6461
|
properties,
|
|
@@ -6295,7 +6465,7 @@ var InteractiveFilterChip = ({
|
|
|
6295
6465
|
},
|
|
6296
6466
|
open: propertyOpen,
|
|
6297
6467
|
onOpenChange: setPropertyOpen,
|
|
6298
|
-
children: /* @__PURE__ */
|
|
6468
|
+
children: /* @__PURE__ */ jsx51("div", { children: /* @__PURE__ */ jsx51(
|
|
6299
6469
|
FilterChipSegment,
|
|
6300
6470
|
{
|
|
6301
6471
|
segmentType: "property",
|
|
@@ -6306,7 +6476,7 @@ var InteractiveFilterChip = ({
|
|
|
6306
6476
|
}
|
|
6307
6477
|
) })
|
|
6308
6478
|
}
|
|
6309
|
-
) : /* @__PURE__ */
|
|
6479
|
+
) : /* @__PURE__ */ jsx51(
|
|
6310
6480
|
FilterChipSegment,
|
|
6311
6481
|
{
|
|
6312
6482
|
segmentType: "property",
|
|
@@ -6315,13 +6485,13 @@ var InteractiveFilterChip = ({
|
|
|
6315
6485
|
label: propertyDef.label
|
|
6316
6486
|
}
|
|
6317
6487
|
),
|
|
6318
|
-
/* @__PURE__ */
|
|
6488
|
+
/* @__PURE__ */ jsx51(
|
|
6319
6489
|
SegmentPopover,
|
|
6320
6490
|
{
|
|
6321
6491
|
open: operatorOpen,
|
|
6322
6492
|
onOpenChange: setOperatorOpen,
|
|
6323
6493
|
minWidth: "180px",
|
|
6324
|
-
trigger: /* @__PURE__ */
|
|
6494
|
+
trigger: /* @__PURE__ */ jsx51("div", { children: /* @__PURE__ */ jsx51(
|
|
6325
6495
|
FilterChipSegment,
|
|
6326
6496
|
{
|
|
6327
6497
|
segmentType: hasOperator ? "operator" : "placeholder",
|
|
@@ -6330,7 +6500,7 @@ var InteractiveFilterChip = ({
|
|
|
6330
6500
|
onClick: () => setOperatorOpen(true)
|
|
6331
6501
|
}
|
|
6332
6502
|
) }),
|
|
6333
|
-
children: /* @__PURE__ */
|
|
6503
|
+
children: /* @__PURE__ */ jsx51("div", { className: "p-xs", children: /* @__PURE__ */ jsx51(
|
|
6334
6504
|
OperatorList,
|
|
6335
6505
|
{
|
|
6336
6506
|
dataType: propertyDef.type,
|
|
@@ -6340,13 +6510,13 @@ var InteractiveFilterChip = ({
|
|
|
6340
6510
|
) })
|
|
6341
6511
|
}
|
|
6342
6512
|
),
|
|
6343
|
-
hasOperator && condition.operator && !isNoValueOperator(condition.operator) && /* @__PURE__ */
|
|
6513
|
+
hasOperator && condition.operator && !isNoValueOperator(condition.operator) && /* @__PURE__ */ jsx51(
|
|
6344
6514
|
SegmentPopover,
|
|
6345
6515
|
{
|
|
6346
6516
|
open: valueOpen,
|
|
6347
6517
|
onOpenChange: setValueOpen,
|
|
6348
6518
|
minWidth: "240px",
|
|
6349
|
-
trigger: /* @__PURE__ */
|
|
6519
|
+
trigger: /* @__PURE__ */ jsx51("div", { children: /* @__PURE__ */ jsx51(
|
|
6350
6520
|
FilterChipSegment,
|
|
6351
6521
|
{
|
|
6352
6522
|
segmentType: hasValue ? "value" : "placeholder",
|
|
@@ -6356,7 +6526,7 @@ var InteractiveFilterChip = ({
|
|
|
6356
6526
|
onClick: () => setValueOpen(true)
|
|
6357
6527
|
}
|
|
6358
6528
|
) }),
|
|
6359
|
-
children: /* @__PURE__ */
|
|
6529
|
+
children: /* @__PURE__ */ jsx51(
|
|
6360
6530
|
ValueInput,
|
|
6361
6531
|
{
|
|
6362
6532
|
dataType: propertyDef.type,
|
|
@@ -6369,7 +6539,7 @@ var InteractiveFilterChip = ({
|
|
|
6369
6539
|
)
|
|
6370
6540
|
}
|
|
6371
6541
|
),
|
|
6372
|
-
hasOperator && condition.operator && isNoValueOperator(condition.operator) && /* @__PURE__ */
|
|
6542
|
+
hasOperator && condition.operator && isNoValueOperator(condition.operator) && /* @__PURE__ */ jsx51(
|
|
6373
6543
|
FilterChipSegment,
|
|
6374
6544
|
{
|
|
6375
6545
|
segmentType: "value",
|
|
@@ -6377,14 +6547,14 @@ var InteractiveFilterChip = ({
|
|
|
6377
6547
|
label: condition.operator
|
|
6378
6548
|
}
|
|
6379
6549
|
),
|
|
6380
|
-
hasOperator && /* @__PURE__ */
|
|
6550
|
+
hasOperator && /* @__PURE__ */ jsx51(
|
|
6381
6551
|
KebabMenu,
|
|
6382
6552
|
{
|
|
6383
6553
|
open: kebabOpen,
|
|
6384
6554
|
onOpenChange: setKebabOpen,
|
|
6385
6555
|
onConvertToAdvanced,
|
|
6386
6556
|
onDelete,
|
|
6387
|
-
children: /* @__PURE__ */
|
|
6557
|
+
children: /* @__PURE__ */ jsx51("div", { children: /* @__PURE__ */ jsx51(
|
|
6388
6558
|
FilterChipSegment,
|
|
6389
6559
|
{
|
|
6390
6560
|
segmentType: "button",
|
|
@@ -6404,12 +6574,12 @@ InteractiveFilterChip.displayName = "InteractiveFilterChip";
|
|
|
6404
6574
|
|
|
6405
6575
|
// src/components/ui/filter/filter-system.tsx
|
|
6406
6576
|
import * as React49 from "react";
|
|
6407
|
-
import { Icon as Icon33, faXmarkOutline as faXmarkOutline4 } from "@l3mpire/icons";
|
|
6577
|
+
import { Icon as Icon33, faXmarkOutline as faXmarkOutline4, faPlusOutline as faPlusOutline4 } from "@l3mpire/icons";
|
|
6408
6578
|
|
|
6409
6579
|
// src/components/ui/filter/advanced-chip.tsx
|
|
6410
6580
|
import * as React44 from "react";
|
|
6411
6581
|
import { Icon as Icon29, faXmarkOutline as faXmarkOutline2 } from "@l3mpire/icons";
|
|
6412
|
-
import { jsx as
|
|
6582
|
+
import { jsx as jsx52, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
6413
6583
|
var btnBase = [
|
|
6414
6584
|
"flex items-center justify-center",
|
|
6415
6585
|
"min-h-[32px] max-h-[32px]",
|
|
@@ -6419,8 +6589,8 @@ var btnBase = [
|
|
|
6419
6589
|
"hover:from-[var(--color-btn-outlined-neutral-bg-hover)] hover:to-[var(--color-btn-outlined-neutral-bg-gradient-to-hover)]"
|
|
6420
6590
|
];
|
|
6421
6591
|
var AdvancedChip = React44.forwardRef(
|
|
6422
|
-
({ className, count, onClear, onClick, ...props }, ref) => /* @__PURE__ */
|
|
6423
|
-
/* @__PURE__ */
|
|
6592
|
+
({ className, count, onClear, onClick, ...props }, ref) => /* @__PURE__ */ jsxs46("div", { className: cn("inline-flex items-center", className), children: [
|
|
6593
|
+
/* @__PURE__ */ jsxs46(
|
|
6424
6594
|
"button",
|
|
6425
6595
|
{
|
|
6426
6596
|
ref,
|
|
@@ -6433,12 +6603,12 @@ var AdvancedChip = React44.forwardRef(
|
|
|
6433
6603
|
),
|
|
6434
6604
|
...props,
|
|
6435
6605
|
children: [
|
|
6436
|
-
/* @__PURE__ */
|
|
6437
|
-
/* @__PURE__ */
|
|
6606
|
+
/* @__PURE__ */ jsx52("span", { className: "text-sm font-semibold leading-sm whitespace-nowrap text-[var(--color-foreground)]", children: "Advanced filters" }),
|
|
6607
|
+
count > 0 && /* @__PURE__ */ jsx52("span", { className: "flex items-center p-2xs rounded-xs bg-filter-chip-badge-bg", children: /* @__PURE__ */ jsx52("span", { className: "text-[10px] font-semibold leading-2xs text-filter-chip-badge-text", children: count }) })
|
|
6438
6608
|
]
|
|
6439
6609
|
}
|
|
6440
6610
|
),
|
|
6441
|
-
onClear && /* @__PURE__ */
|
|
6611
|
+
onClear && /* @__PURE__ */ jsx52(
|
|
6442
6612
|
"button",
|
|
6443
6613
|
{
|
|
6444
6614
|
type: "button",
|
|
@@ -6452,7 +6622,7 @@ var AdvancedChip = React44.forwardRef(
|
|
|
6452
6622
|
"rounded-r-md -ml-px"
|
|
6453
6623
|
),
|
|
6454
6624
|
"aria-label": "Clear all advanced filters",
|
|
6455
|
-
children: /* @__PURE__ */
|
|
6625
|
+
children: /* @__PURE__ */ jsx52(Icon29, { icon: faXmarkOutline2, size: "sm", className: "text-[var(--color-foreground)]" })
|
|
6456
6626
|
}
|
|
6457
6627
|
)
|
|
6458
6628
|
] })
|
|
@@ -6462,13 +6632,13 @@ AdvancedChip.displayName = "AdvancedChip";
|
|
|
6462
6632
|
// src/components/ui/filter/advanced-popover.tsx
|
|
6463
6633
|
import * as React46 from "react";
|
|
6464
6634
|
import * as PopoverPrimitive10 from "@radix-ui/react-popover";
|
|
6465
|
-
import { Icon as Icon31, faPlusOutline as faPlusOutline2 } from "@l3mpire/icons";
|
|
6635
|
+
import { Icon as Icon31, faPlusOutline as faPlusOutline2, faChevronDownOutline as faChevronDownOutline3 } from "@l3mpire/icons";
|
|
6466
6636
|
|
|
6467
6637
|
// src/components/ui/filter/advanced-row.tsx
|
|
6468
6638
|
import * as React45 from "react";
|
|
6469
6639
|
import * as PopoverPrimitive9 from "@radix-ui/react-popover";
|
|
6470
6640
|
import { Icon as Icon30, faXmarkOutline as faXmarkOutline3, faRefreshOutline, faChevronDownOutline as faChevronDownOutline2 } from "@l3mpire/icons";
|
|
6471
|
-
import { jsx as
|
|
6641
|
+
import { jsx as jsx53, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
6472
6642
|
var selectBtnStyle = [
|
|
6473
6643
|
"flex items-center gap-base",
|
|
6474
6644
|
"px-base py-sm",
|
|
@@ -6502,8 +6672,8 @@ var AdvancedRow = ({
|
|
|
6502
6672
|
onUpdate({ ...condition, value: val });
|
|
6503
6673
|
};
|
|
6504
6674
|
const displayValue = condition.value == null ? "" : typeof condition.value === "string" ? condition.value : String(condition.value);
|
|
6505
|
-
return /* @__PURE__ */
|
|
6506
|
-
connector === "Where" ? /* @__PURE__ */
|
|
6675
|
+
return /* @__PURE__ */ jsxs47("div", { className: "flex items-center gap-base w-full min-w-0", children: [
|
|
6676
|
+
connector === "Where" ? /* @__PURE__ */ jsx53("div", { className: "shrink-0 w-[64px] flex items-center justify-end", children: /* @__PURE__ */ jsx53("span", { className: "text-xs font-semibold leading-xs text-[var(--color-muted-foreground)]", children: "Where" }) }) : /* @__PURE__ */ jsxs47(
|
|
6507
6677
|
"button",
|
|
6508
6678
|
{
|
|
6509
6679
|
type: "button",
|
|
@@ -6513,26 +6683,26 @@ var AdvancedRow = ({
|
|
|
6513
6683
|
"min-w-[64px] min-h-[24px] max-h-[24px] p-xs",
|
|
6514
6684
|
"bg-gradient-to-t from-[var(--color-btn-outlined-neutral-bg-default)] from-[10%] to-[var(--color-btn-outlined-neutral-bg-gradient-to-default)]",
|
|
6515
6685
|
"border border-[var(--color-btn-outlined-neutral-border-default)] rounded-base shadow-sm",
|
|
6516
|
-
"cursor-pointer transition-colors text-xs font-
|
|
6686
|
+
"cursor-pointer transition-colors text-xs font-semibold leading-xs text-[var(--color-foreground)]",
|
|
6517
6687
|
"hover:from-[var(--color-btn-outlined-neutral-bg-hover)] hover:to-[var(--color-btn-outlined-neutral-bg-gradient-to-hover)]"
|
|
6518
6688
|
),
|
|
6519
6689
|
children: [
|
|
6520
6690
|
connector,
|
|
6521
|
-
/* @__PURE__ */
|
|
6691
|
+
/* @__PURE__ */ jsx53(Icon30, { icon: faRefreshOutline, size: "xs", className: "text-[var(--color-foreground)]" })
|
|
6522
6692
|
]
|
|
6523
6693
|
}
|
|
6524
6694
|
),
|
|
6525
|
-
/* @__PURE__ */
|
|
6526
|
-
/* @__PURE__ */
|
|
6527
|
-
/* @__PURE__ */
|
|
6528
|
-
/* @__PURE__ */
|
|
6695
|
+
/* @__PURE__ */ jsxs47(PopoverPrimitive9.Root, { open: propertyOpen, onOpenChange: setPropertyOpen, children: [
|
|
6696
|
+
/* @__PURE__ */ jsx53(PopoverPrimitive9.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs47("button", { type: "button", className: cn(selectBtnStyle, "min-w-0"), children: [
|
|
6697
|
+
/* @__PURE__ */ jsx53(Icon30, { icon: propertyDef.icon, size: "sm", className: "shrink-0 text-[var(--color-muted-foreground)]" }),
|
|
6698
|
+
/* @__PURE__ */ jsxs47("span", { className: "text-sm font-regular leading-sm text-[var(--color-foreground)] whitespace-nowrap truncate", children: [
|
|
6529
6699
|
propertyDef.groupLabel,
|
|
6530
6700
|
" > ",
|
|
6531
6701
|
propertyDef.label
|
|
6532
6702
|
] }),
|
|
6533
|
-
/* @__PURE__ */
|
|
6703
|
+
/* @__PURE__ */ jsx53(Icon30, { icon: faChevronDownOutline2, size: "xs", className: "shrink-0 text-[var(--color-foreground)]" })
|
|
6534
6704
|
] }) }),
|
|
6535
|
-
/* @__PURE__ */
|
|
6705
|
+
/* @__PURE__ */ jsx53(PopoverPrimitive9.Portal, { children: /* @__PURE__ */ jsx53(
|
|
6536
6706
|
PopoverPrimitive9.Content,
|
|
6537
6707
|
{
|
|
6538
6708
|
sideOffset: 4,
|
|
@@ -6544,7 +6714,7 @@ var AdvancedRow = ({
|
|
|
6544
6714
|
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
|
|
6545
6715
|
"min-w-[200px]"
|
|
6546
6716
|
),
|
|
6547
|
-
children: properties.map((p) => /* @__PURE__ */
|
|
6717
|
+
children: properties.map((p) => /* @__PURE__ */ jsxs47(
|
|
6548
6718
|
"button",
|
|
6549
6719
|
{
|
|
6550
6720
|
type: "button",
|
|
@@ -6558,8 +6728,8 @@ var AdvancedRow = ({
|
|
|
6558
6728
|
p.id === condition.propertyId && "bg-[var(--color-dropdown-item-hover)]"
|
|
6559
6729
|
),
|
|
6560
6730
|
children: [
|
|
6561
|
-
/* @__PURE__ */
|
|
6562
|
-
/* @__PURE__ */
|
|
6731
|
+
/* @__PURE__ */ jsx53(Icon30, { icon: p.icon, size: "sm", className: "shrink-0 text-[var(--color-dropdown-item-icon)]" }),
|
|
6732
|
+
/* @__PURE__ */ jsx53("span", { className: "text-sm font-regular leading-sm text-[var(--color-dropdown-item-text)] truncate", children: p.label })
|
|
6563
6733
|
]
|
|
6564
6734
|
},
|
|
6565
6735
|
p.id
|
|
@@ -6567,12 +6737,12 @@ var AdvancedRow = ({
|
|
|
6567
6737
|
}
|
|
6568
6738
|
) })
|
|
6569
6739
|
] }),
|
|
6570
|
-
/* @__PURE__ */
|
|
6571
|
-
/* @__PURE__ */
|
|
6572
|
-
/* @__PURE__ */
|
|
6573
|
-
/* @__PURE__ */
|
|
6740
|
+
/* @__PURE__ */ jsxs47(PopoverPrimitive9.Root, { open: operatorOpen, onOpenChange: setOperatorOpen, children: [
|
|
6741
|
+
/* @__PURE__ */ jsx53(PopoverPrimitive9.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs47("button", { type: "button", className: cn(selectBtnStyle, "min-w-0"), children: [
|
|
6742
|
+
/* @__PURE__ */ jsx53("span", { className: "text-sm font-regular leading-sm text-[var(--color-foreground)] whitespace-nowrap truncate text-left", children: condition.operator ?? "Select" }),
|
|
6743
|
+
/* @__PURE__ */ jsx53(Icon30, { icon: faChevronDownOutline2, size: "xs", className: "shrink-0 text-[var(--color-foreground)]" })
|
|
6574
6744
|
] }) }),
|
|
6575
|
-
/* @__PURE__ */
|
|
6745
|
+
/* @__PURE__ */ jsx53(PopoverPrimitive9.Portal, { children: /* @__PURE__ */ jsx53(
|
|
6576
6746
|
PopoverPrimitive9.Content,
|
|
6577
6747
|
{
|
|
6578
6748
|
sideOffset: 4,
|
|
@@ -6584,7 +6754,7 @@ var AdvancedRow = ({
|
|
|
6584
6754
|
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
|
|
6585
6755
|
"min-w-[160px]"
|
|
6586
6756
|
),
|
|
6587
|
-
children: /* @__PURE__ */
|
|
6757
|
+
children: /* @__PURE__ */ jsx53(
|
|
6588
6758
|
OperatorList,
|
|
6589
6759
|
{
|
|
6590
6760
|
dataType: propertyDef.type,
|
|
@@ -6595,7 +6765,7 @@ var AdvancedRow = ({
|
|
|
6595
6765
|
}
|
|
6596
6766
|
) })
|
|
6597
6767
|
] }),
|
|
6598
|
-
condition.operator && !isNoValueOperator(condition.operator) && /* @__PURE__ */
|
|
6768
|
+
condition.operator && !isNoValueOperator(condition.operator) && /* @__PURE__ */ jsx53(
|
|
6599
6769
|
"input",
|
|
6600
6770
|
{
|
|
6601
6771
|
type: "text",
|
|
@@ -6611,14 +6781,14 @@ var AdvancedRow = ({
|
|
|
6611
6781
|
)
|
|
6612
6782
|
}
|
|
6613
6783
|
),
|
|
6614
|
-
/* @__PURE__ */
|
|
6784
|
+
/* @__PURE__ */ jsx53(
|
|
6615
6785
|
"button",
|
|
6616
6786
|
{
|
|
6617
6787
|
type: "button",
|
|
6618
6788
|
onClick: onDelete,
|
|
6619
6789
|
className: "ml-auto shrink-0 flex items-center justify-center p-sm rounded-md cursor-pointer transition-colors hover:bg-[var(--color-accent)]",
|
|
6620
6790
|
"aria-label": "Remove filter",
|
|
6621
|
-
children: /* @__PURE__ */
|
|
6791
|
+
children: /* @__PURE__ */ jsx53(Icon30, { icon: faXmarkOutline3, size: "sm", className: "text-[var(--color-foreground)]" })
|
|
6622
6792
|
}
|
|
6623
6793
|
)
|
|
6624
6794
|
] });
|
|
@@ -6626,13 +6796,13 @@ var AdvancedRow = ({
|
|
|
6626
6796
|
AdvancedRow.displayName = "AdvancedRow";
|
|
6627
6797
|
|
|
6628
6798
|
// src/components/ui/filter/advanced-popover.tsx
|
|
6629
|
-
import { jsx as
|
|
6799
|
+
import { jsx as jsx54, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
6630
6800
|
var outlinedBtn = [
|
|
6631
6801
|
"flex items-center gap-sm px-base py-sm",
|
|
6632
6802
|
"min-h-[32px] max-h-[32px] min-w-[80px]",
|
|
6633
6803
|
"bg-gradient-to-t from-[var(--color-btn-outlined-neutral-bg-default)] from-[10%] to-[var(--color-btn-outlined-neutral-bg-gradient-to-default)]",
|
|
6634
6804
|
"border border-[var(--color-btn-outlined-neutral-border-default)] rounded-md shadow-sm",
|
|
6635
|
-
"cursor-pointer transition-colors text-sm font-
|
|
6805
|
+
"cursor-pointer transition-colors text-sm font-semibold leading-sm text-[var(--color-foreground)]",
|
|
6636
6806
|
"hover:from-[var(--color-btn-outlined-neutral-bg-hover)] hover:to-[var(--color-btn-outlined-neutral-bg-gradient-to-hover)]"
|
|
6637
6807
|
];
|
|
6638
6808
|
var AdvancedPopover = ({
|
|
@@ -6644,7 +6814,7 @@ var AdvancedPopover = ({
|
|
|
6644
6814
|
children
|
|
6645
6815
|
}) => {
|
|
6646
6816
|
const [addSelectorOpen, setAddSelectorOpen] = React46.useState(false);
|
|
6647
|
-
const [
|
|
6817
|
+
const [draftPickerOpen, setDraftPickerOpen] = React46.useState(false);
|
|
6648
6818
|
const getPropertyDef = (propertyId) => properties.find((p) => p.id === propertyId);
|
|
6649
6819
|
const handleUpdateFilter = (updated) => {
|
|
6650
6820
|
onFiltersChange(filters.map((f) => f.id === updated.id ? updated : f));
|
|
@@ -6668,19 +6838,21 @@ var AdvancedPopover = ({
|
|
|
6668
6838
|
onOpenChange?.(false);
|
|
6669
6839
|
};
|
|
6670
6840
|
const toggleLogicOp = (filterId) => {
|
|
6671
|
-
|
|
6672
|
-
|
|
6673
|
-
|
|
6674
|
-
|
|
6841
|
+
onFiltersChange(
|
|
6842
|
+
filters.map(
|
|
6843
|
+
(f) => f.id === filterId ? { ...f, logicOperator: (f.logicOperator ?? "and") === "and" ? "or" : "and" } : f
|
|
6844
|
+
)
|
|
6845
|
+
);
|
|
6675
6846
|
};
|
|
6676
|
-
return /* @__PURE__ */
|
|
6677
|
-
/* @__PURE__ */
|
|
6678
|
-
/* @__PURE__ */
|
|
6847
|
+
return /* @__PURE__ */ jsxs48(PopoverPrimitive10.Root, { open, onOpenChange, children: [
|
|
6848
|
+
/* @__PURE__ */ jsx54(PopoverPrimitive10.Trigger, { asChild: true, children }),
|
|
6849
|
+
/* @__PURE__ */ jsx54(PopoverPrimitive10.Portal, { children: /* @__PURE__ */ jsxs48(
|
|
6679
6850
|
PopoverPrimitive10.Content,
|
|
6680
6851
|
{
|
|
6681
6852
|
sideOffset: 4,
|
|
6682
6853
|
align: "start",
|
|
6683
6854
|
collisionPadding: 16,
|
|
6855
|
+
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
6684
6856
|
className: cn(
|
|
6685
6857
|
"z-50 flex flex-col",
|
|
6686
6858
|
"bg-[var(--color-background)] rounded-md shadow-lg",
|
|
@@ -6690,14 +6862,14 @@ var AdvancedPopover = ({
|
|
|
6690
6862
|
"w-[min(520px,calc(100vw-32px))]"
|
|
6691
6863
|
),
|
|
6692
6864
|
children: [
|
|
6693
|
-
/* @__PURE__ */
|
|
6865
|
+
/* @__PURE__ */ jsxs48("div", { className: "flex flex-col gap-base p-base", children: [
|
|
6694
6866
|
filters.map((filter, i) => {
|
|
6695
6867
|
const propDef = getPropertyDef(filter.propertyId);
|
|
6696
6868
|
if (!propDef) return null;
|
|
6697
|
-
return /* @__PURE__ */
|
|
6869
|
+
return /* @__PURE__ */ jsx54(
|
|
6698
6870
|
AdvancedRow,
|
|
6699
6871
|
{
|
|
6700
|
-
connector: i === 0 ? "Where" : (
|
|
6872
|
+
connector: i === 0 ? "Where" : (filter.logicOperator ?? "and") === "and" ? "And" : "Or",
|
|
6701
6873
|
onConnectorToggle: i > 0 ? () => toggleLogicOp(filter.id) : void 0,
|
|
6702
6874
|
propertyDef: propDef,
|
|
6703
6875
|
condition: filter,
|
|
@@ -6709,28 +6881,64 @@ var AdvancedPopover = ({
|
|
|
6709
6881
|
filter.id
|
|
6710
6882
|
);
|
|
6711
6883
|
}),
|
|
6712
|
-
filters.length === 0 && /*
|
|
6884
|
+
filters.length === 0 && /* ── Draft row: inline "Select property" placeholder ──── */
|
|
6885
|
+
/* @__PURE__ */ jsxs48("div", { className: "flex items-center gap-base w-full min-w-0", children: [
|
|
6886
|
+
/* @__PURE__ */ jsx54("div", { className: "shrink-0 w-[64px] flex items-center justify-end", children: /* @__PURE__ */ jsx54("span", { className: "text-xs font-semibold leading-xs text-[var(--color-muted-foreground)]", children: "Where" }) }),
|
|
6887
|
+
/* @__PURE__ */ jsx54(
|
|
6888
|
+
PropertySelector,
|
|
6889
|
+
{
|
|
6890
|
+
properties,
|
|
6891
|
+
onSelect: handleAddFilter,
|
|
6892
|
+
open: draftPickerOpen,
|
|
6893
|
+
onOpenChange: setDraftPickerOpen,
|
|
6894
|
+
children: /* @__PURE__ */ jsxs48(
|
|
6895
|
+
"button",
|
|
6896
|
+
{
|
|
6897
|
+
type: "button",
|
|
6898
|
+
className: cn(
|
|
6899
|
+
"flex items-center gap-base px-base py-sm min-w-0",
|
|
6900
|
+
"bg-gradient-to-t from-[var(--color-btn-outlined-neutral-bg-default)] to-[var(--color-btn-outlined-neutral-bg-gradient-to-default)]",
|
|
6901
|
+
"border border-[var(--color-btn-outlined-neutral-border-default)] rounded-md shadow-sm",
|
|
6902
|
+
"cursor-pointer transition-colors",
|
|
6903
|
+
"hover:from-[var(--color-btn-outlined-neutral-bg-hover)] hover:to-[var(--color-btn-outlined-neutral-bg-gradient-to-hover)]"
|
|
6904
|
+
),
|
|
6905
|
+
children: [
|
|
6906
|
+
/* @__PURE__ */ jsx54("span", { className: "text-sm font-regular leading-sm text-[var(--color-muted-foreground)] whitespace-nowrap", children: "Select property" }),
|
|
6907
|
+
/* @__PURE__ */ jsx54(
|
|
6908
|
+
Icon31,
|
|
6909
|
+
{
|
|
6910
|
+
icon: faChevronDownOutline3,
|
|
6911
|
+
size: "xs",
|
|
6912
|
+
className: "shrink-0 text-[var(--color-foreground)]"
|
|
6913
|
+
}
|
|
6914
|
+
)
|
|
6915
|
+
]
|
|
6916
|
+
}
|
|
6917
|
+
)
|
|
6918
|
+
}
|
|
6919
|
+
)
|
|
6920
|
+
] })
|
|
6713
6921
|
] }),
|
|
6714
|
-
/* @__PURE__ */
|
|
6715
|
-
/* @__PURE__ */
|
|
6922
|
+
/* @__PURE__ */ jsxs48("div", { className: "flex items-center justify-between p-base border-t border-[var(--color-border)]", children: [
|
|
6923
|
+
/* @__PURE__ */ jsx54(
|
|
6716
6924
|
PropertySelector,
|
|
6717
6925
|
{
|
|
6718
6926
|
properties,
|
|
6719
6927
|
onSelect: handleAddFilter,
|
|
6720
6928
|
open: addSelectorOpen,
|
|
6721
6929
|
onOpenChange: setAddSelectorOpen,
|
|
6722
|
-
children: /* @__PURE__ */
|
|
6723
|
-
/* @__PURE__ */
|
|
6930
|
+
children: /* @__PURE__ */ jsxs48("button", { type: "button", className: cn(outlinedBtn), children: [
|
|
6931
|
+
/* @__PURE__ */ jsx54(Icon31, { icon: faPlusOutline2, size: "sm", className: "text-[var(--color-foreground)]" }),
|
|
6724
6932
|
"Add filter"
|
|
6725
6933
|
] })
|
|
6726
6934
|
}
|
|
6727
6935
|
),
|
|
6728
|
-
/* @__PURE__ */
|
|
6936
|
+
/* @__PURE__ */ jsx54(
|
|
6729
6937
|
"button",
|
|
6730
6938
|
{
|
|
6731
6939
|
type: "button",
|
|
6732
6940
|
onClick: handleClearAll,
|
|
6733
|
-
className: "text-sm font-
|
|
6941
|
+
className: "text-sm font-semibold leading-sm text-[var(--color-foreground)] cursor-pointer transition-colors hover:opacity-70 px-base py-sm",
|
|
6734
6942
|
children: "Clear all filters"
|
|
6735
6943
|
}
|
|
6736
6944
|
)
|
|
@@ -6745,19 +6953,28 @@ AdvancedPopover.displayName = "AdvancedPopover";
|
|
|
6745
6953
|
// src/components/ui/filter/summary-chip.tsx
|
|
6746
6954
|
import * as React47 from "react";
|
|
6747
6955
|
import * as PopoverPrimitive11 from "@radix-ui/react-popover";
|
|
6748
|
-
import { Icon as Icon32, faSlidersOutline as faSlidersOutline2, faPlusOutline as faPlusOutline3 } from "@l3mpire/icons";
|
|
6749
|
-
import { jsx as
|
|
6956
|
+
import { Icon as Icon32, faSlidersOutline as faSlidersOutline2, faPlusOutline as faPlusOutline3, faChevronDownOutline as faChevronDownOutline4 } from "@l3mpire/icons";
|
|
6957
|
+
import { jsx as jsx55, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
6750
6958
|
var SummaryChip = ({
|
|
6751
6959
|
count,
|
|
6752
6960
|
filters,
|
|
6753
6961
|
properties,
|
|
6754
6962
|
onFiltersChange,
|
|
6755
6963
|
onClearAll,
|
|
6756
|
-
|
|
6964
|
+
children,
|
|
6965
|
+
className,
|
|
6966
|
+
open: openProp,
|
|
6967
|
+
onOpenChange
|
|
6757
6968
|
}) => {
|
|
6758
|
-
const [
|
|
6969
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React47.useState(false);
|
|
6970
|
+
const isControlled = openProp !== void 0;
|
|
6971
|
+
const open = isControlled ? openProp : uncontrolledOpen;
|
|
6972
|
+
const setOpen = (v) => {
|
|
6973
|
+
if (!isControlled) setUncontrolledOpen(v);
|
|
6974
|
+
onOpenChange?.(v);
|
|
6975
|
+
};
|
|
6759
6976
|
const [addSelectorOpen, setAddSelectorOpen] = React47.useState(false);
|
|
6760
|
-
const [
|
|
6977
|
+
const [draftPickerOpen, setDraftPickerOpen] = React47.useState(false);
|
|
6761
6978
|
const getPropertyDef = (propertyId) => properties.find((p) => p.id === propertyId);
|
|
6762
6979
|
const handleUpdateFilter = (updated) => {
|
|
6763
6980
|
onFiltersChange(filters.map((f) => f.id === updated.id ? updated : f));
|
|
@@ -6778,8 +6995,15 @@ var SummaryChip = ({
|
|
|
6778
6995
|
onFiltersChange([...filters, newFilter]);
|
|
6779
6996
|
setAddSelectorOpen(false);
|
|
6780
6997
|
};
|
|
6781
|
-
|
|
6782
|
-
|
|
6998
|
+
const toggleLogicOp = (filterId) => {
|
|
6999
|
+
onFiltersChange(
|
|
7000
|
+
filters.map(
|
|
7001
|
+
(f) => f.id === filterId ? { ...f, logicOperator: (f.logicOperator ?? "and") === "and" ? "or" : "and" } : f
|
|
7002
|
+
)
|
|
7003
|
+
);
|
|
7004
|
+
};
|
|
7005
|
+
return /* @__PURE__ */ jsxs49(PopoverPrimitive11.Root, { open, onOpenChange: setOpen, children: [
|
|
7006
|
+
/* @__PURE__ */ jsx55(PopoverPrimitive11.Trigger, { asChild: true, children: children ?? /* @__PURE__ */ jsxs49(
|
|
6783
7007
|
"button",
|
|
6784
7008
|
{
|
|
6785
7009
|
type: "button",
|
|
@@ -6793,7 +7017,7 @@ var SummaryChip = ({
|
|
|
6793
7017
|
className
|
|
6794
7018
|
),
|
|
6795
7019
|
children: [
|
|
6796
|
-
/* @__PURE__ */
|
|
7020
|
+
/* @__PURE__ */ jsx55(
|
|
6797
7021
|
Icon32,
|
|
6798
7022
|
{
|
|
6799
7023
|
icon: faSlidersOutline2,
|
|
@@ -6801,17 +7025,18 @@ var SummaryChip = ({
|
|
|
6801
7025
|
className: "shrink-0 text-[var(--color-foreground)]"
|
|
6802
7026
|
}
|
|
6803
7027
|
),
|
|
6804
|
-
/* @__PURE__ */
|
|
6805
|
-
count > 0 && /* @__PURE__ */
|
|
7028
|
+
/* @__PURE__ */ jsx55("span", { className: "text-sm font-semibold leading-sm whitespace-nowrap text-[var(--color-foreground)]", children: "Filters" }),
|
|
7029
|
+
count > 0 && /* @__PURE__ */ jsx55("span", { className: "flex items-center p-2xs rounded-xs bg-filter-chip-badge-bg", children: /* @__PURE__ */ jsx55("span", { className: "text-[10px] font-semibold leading-2xs text-filter-chip-badge-text", children: count }) })
|
|
6806
7030
|
]
|
|
6807
7031
|
}
|
|
6808
7032
|
) }),
|
|
6809
|
-
/* @__PURE__ */
|
|
7033
|
+
/* @__PURE__ */ jsx55(PopoverPrimitive11.Portal, { children: /* @__PURE__ */ jsxs49(
|
|
6810
7034
|
PopoverPrimitive11.Content,
|
|
6811
7035
|
{
|
|
6812
7036
|
sideOffset: 4,
|
|
6813
7037
|
align: "start",
|
|
6814
7038
|
collisionPadding: 16,
|
|
7039
|
+
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
6815
7040
|
className: cn(
|
|
6816
7041
|
"z-50 flex flex-col overflow-clip",
|
|
6817
7042
|
"bg-[var(--color-dropdown-bg)] border border-[var(--color-dropdown-border)] rounded-md shadow-lg",
|
|
@@ -6821,15 +7046,15 @@ var SummaryChip = ({
|
|
|
6821
7046
|
"w-[min(520px,calc(100vw-32px))]"
|
|
6822
7047
|
),
|
|
6823
7048
|
children: [
|
|
6824
|
-
/* @__PURE__ */
|
|
7049
|
+
/* @__PURE__ */ jsxs49("div", { className: "flex flex-col gap-base p-base", children: [
|
|
6825
7050
|
filters.map((filter, i) => {
|
|
6826
7051
|
const propDef = getPropertyDef(filter.propertyId);
|
|
6827
7052
|
if (!propDef) return null;
|
|
6828
|
-
return /* @__PURE__ */
|
|
7053
|
+
return /* @__PURE__ */ jsx55(
|
|
6829
7054
|
AdvancedRow,
|
|
6830
7055
|
{
|
|
6831
|
-
connector: i === 0 ? "Where" : (
|
|
6832
|
-
onConnectorToggle: i > 0 ? () =>
|
|
7056
|
+
connector: i === 0 ? "Where" : (filter.logicOperator ?? "and") === "and" ? "And" : "Or",
|
|
7057
|
+
onConnectorToggle: i > 0 ? () => toggleLogicOp(filter.id) : void 0,
|
|
6833
7058
|
propertyDef: propDef,
|
|
6834
7059
|
condition: filter,
|
|
6835
7060
|
properties,
|
|
@@ -6840,17 +7065,53 @@ var SummaryChip = ({
|
|
|
6840
7065
|
filter.id
|
|
6841
7066
|
);
|
|
6842
7067
|
}),
|
|
6843
|
-
filters.length === 0 && /*
|
|
7068
|
+
filters.length === 0 && /* ── Draft row: inline "Select property" placeholder ──── */
|
|
7069
|
+
/* @__PURE__ */ jsxs49("div", { className: "flex items-center gap-base w-full min-w-0", children: [
|
|
7070
|
+
/* @__PURE__ */ jsx55("div", { className: "shrink-0 w-[64px] flex items-center justify-end", children: /* @__PURE__ */ jsx55("span", { className: "text-xs font-semibold leading-xs text-[var(--color-muted-foreground)]", children: "Where" }) }),
|
|
7071
|
+
/* @__PURE__ */ jsx55(
|
|
7072
|
+
PropertySelector,
|
|
7073
|
+
{
|
|
7074
|
+
properties,
|
|
7075
|
+
onSelect: handleAddFilter,
|
|
7076
|
+
open: draftPickerOpen,
|
|
7077
|
+
onOpenChange: setDraftPickerOpen,
|
|
7078
|
+
children: /* @__PURE__ */ jsxs49(
|
|
7079
|
+
"button",
|
|
7080
|
+
{
|
|
7081
|
+
type: "button",
|
|
7082
|
+
className: cn(
|
|
7083
|
+
"flex items-center gap-base px-base py-sm min-w-0",
|
|
7084
|
+
"bg-gradient-to-t from-[var(--color-btn-outlined-neutral-bg-default)] to-[var(--color-btn-outlined-neutral-bg-gradient-to-default)]",
|
|
7085
|
+
"border border-[var(--color-btn-outlined-neutral-border-default)] rounded-md shadow-sm",
|
|
7086
|
+
"cursor-pointer transition-colors",
|
|
7087
|
+
"hover:from-[var(--color-btn-outlined-neutral-bg-hover)] hover:to-[var(--color-btn-outlined-neutral-bg-gradient-to-hover)]"
|
|
7088
|
+
),
|
|
7089
|
+
children: [
|
|
7090
|
+
/* @__PURE__ */ jsx55("span", { className: "text-sm font-regular leading-sm text-[var(--color-muted-foreground)] whitespace-nowrap", children: "Select property" }),
|
|
7091
|
+
/* @__PURE__ */ jsx55(
|
|
7092
|
+
Icon32,
|
|
7093
|
+
{
|
|
7094
|
+
icon: faChevronDownOutline4,
|
|
7095
|
+
size: "xs",
|
|
7096
|
+
className: "shrink-0 text-[var(--color-foreground)]"
|
|
7097
|
+
}
|
|
7098
|
+
)
|
|
7099
|
+
]
|
|
7100
|
+
}
|
|
7101
|
+
)
|
|
7102
|
+
}
|
|
7103
|
+
)
|
|
7104
|
+
] })
|
|
6844
7105
|
] }),
|
|
6845
|
-
/* @__PURE__ */
|
|
6846
|
-
/* @__PURE__ */
|
|
7106
|
+
/* @__PURE__ */ jsxs49("div", { className: "flex items-center justify-between p-base border-t border-[var(--color-border)]", children: [
|
|
7107
|
+
/* @__PURE__ */ jsx55(
|
|
6847
7108
|
PropertySelector,
|
|
6848
7109
|
{
|
|
6849
7110
|
properties,
|
|
6850
7111
|
onSelect: handleAddFilter,
|
|
6851
7112
|
open: addSelectorOpen,
|
|
6852
7113
|
onOpenChange: setAddSelectorOpen,
|
|
6853
|
-
children: /* @__PURE__ */
|
|
7114
|
+
children: /* @__PURE__ */ jsxs49(
|
|
6854
7115
|
"button",
|
|
6855
7116
|
{
|
|
6856
7117
|
type: "button",
|
|
@@ -6859,18 +7120,18 @@ var SummaryChip = ({
|
|
|
6859
7120
|
"min-h-[32px] max-h-[32px] min-w-[80px]",
|
|
6860
7121
|
"bg-gradient-to-t from-[var(--color-btn-outlined-neutral-bg-default)] from-[10%] to-[var(--color-btn-outlined-neutral-bg-gradient-to-default)]",
|
|
6861
7122
|
"border border-[var(--color-btn-outlined-neutral-border-default)] rounded-md shadow-sm",
|
|
6862
|
-
"cursor-pointer transition-colors text-sm font-
|
|
7123
|
+
"cursor-pointer transition-colors text-sm font-semibold leading-sm text-[var(--color-foreground)]",
|
|
6863
7124
|
"hover:from-[var(--color-btn-outlined-neutral-bg-hover)] hover:to-[var(--color-btn-outlined-neutral-bg-gradient-to-hover)]"
|
|
6864
7125
|
),
|
|
6865
7126
|
children: [
|
|
6866
|
-
/* @__PURE__ */
|
|
7127
|
+
/* @__PURE__ */ jsx55(Icon32, { icon: faPlusOutline3, size: "sm", className: "text-[var(--color-foreground)]" }),
|
|
6867
7128
|
"Add filter"
|
|
6868
7129
|
]
|
|
6869
7130
|
}
|
|
6870
7131
|
)
|
|
6871
7132
|
}
|
|
6872
7133
|
),
|
|
6873
|
-
filters.length > 0 && /* @__PURE__ */
|
|
7134
|
+
filters.length > 0 && /* @__PURE__ */ jsx55(
|
|
6874
7135
|
"button",
|
|
6875
7136
|
{
|
|
6876
7137
|
type: "button",
|
|
@@ -6878,7 +7139,7 @@ var SummaryChip = ({
|
|
|
6878
7139
|
onClearAll();
|
|
6879
7140
|
setOpen(false);
|
|
6880
7141
|
},
|
|
6881
|
-
className: "text-sm font-
|
|
7142
|
+
className: "text-sm font-semibold leading-sm text-[var(--color-foreground)] cursor-pointer transition-colors hover:opacity-70 px-base py-sm",
|
|
6882
7143
|
children: "Clear all filters"
|
|
6883
7144
|
}
|
|
6884
7145
|
)
|
|
@@ -6892,7 +7153,8 @@ SummaryChip.displayName = "SummaryChip";
|
|
|
6892
7153
|
|
|
6893
7154
|
// src/components/ui/filter/use-filter-bar-mode.ts
|
|
6894
7155
|
import * as React48 from "react";
|
|
6895
|
-
|
|
7156
|
+
var DEFAULT_BREAKPOINT = 600;
|
|
7157
|
+
function useFilterBarMode(ref, override, breakpoint = DEFAULT_BREAKPOINT) {
|
|
6896
7158
|
const [mode, setMode] = React48.useState("default");
|
|
6897
7159
|
React48.useEffect(() => {
|
|
6898
7160
|
if (override) return;
|
|
@@ -6900,30 +7162,32 @@ function useFilterBarMode(ref, override) {
|
|
|
6900
7162
|
if (!el) return;
|
|
6901
7163
|
const observer = new ResizeObserver((entries) => {
|
|
6902
7164
|
const width = entries[0]?.contentRect.width ?? 0;
|
|
6903
|
-
setMode(width >
|
|
7165
|
+
setMode(width > breakpoint ? "default" : "minimal");
|
|
6904
7166
|
});
|
|
6905
7167
|
observer.observe(el);
|
|
6906
7168
|
return () => observer.disconnect();
|
|
6907
|
-
}, [ref, override]);
|
|
7169
|
+
}, [ref, override, breakpoint]);
|
|
6908
7170
|
return override ?? mode;
|
|
6909
7171
|
}
|
|
6910
7172
|
|
|
6911
7173
|
// src/components/ui/filter/filter-system.tsx
|
|
6912
|
-
import { Fragment as
|
|
7174
|
+
import { Fragment as Fragment5, jsx as jsx56, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
6913
7175
|
var FilterSystem = ({
|
|
6914
7176
|
properties,
|
|
6915
7177
|
filterState,
|
|
6916
7178
|
onFilterStateChange,
|
|
6917
7179
|
sortFields,
|
|
6918
7180
|
mode: modeOverride,
|
|
7181
|
+
breakpoint,
|
|
6919
7182
|
children,
|
|
6920
7183
|
actions,
|
|
6921
7184
|
className
|
|
6922
7185
|
}) => {
|
|
6923
7186
|
const containerRef = React49.useRef(null);
|
|
6924
|
-
const mode = useFilterBarMode(containerRef, modeOverride);
|
|
7187
|
+
const mode = useFilterBarMode(containerRef, modeOverride, breakpoint);
|
|
6925
7188
|
const [propertySelectorOpen, setPropertySelectorOpen] = React49.useState(false);
|
|
6926
7189
|
const [advancedOpen, setAdvancedOpen] = React49.useState(false);
|
|
7190
|
+
const [summaryOpen, setSummaryOpen] = React49.useState(false);
|
|
6927
7191
|
const [pendingFilterId, setPendingFilterId] = React49.useState(null);
|
|
6928
7192
|
const allFilters = [...filterState.basicFilters, ...filterState.advancedFilters];
|
|
6929
7193
|
const totalCount = allFilters.length;
|
|
@@ -6999,10 +7263,23 @@ var FilterSystem = ({
|
|
|
6999
7263
|
const getPropertyDef = (propertyId) => properties.find((p) => p.id === propertyId);
|
|
7000
7264
|
const hasAdvanced = filterState.advancedFilters.length > 0;
|
|
7001
7265
|
const isMinimal = mode === "minimal";
|
|
7002
|
-
|
|
7003
|
-
|
|
7266
|
+
const handleOpenAdvanced = () => {
|
|
7267
|
+
setPropertySelectorOpen(false);
|
|
7268
|
+
requestAnimationFrame(() => {
|
|
7269
|
+
if (isMinimal) {
|
|
7270
|
+
setSummaryOpen(true);
|
|
7271
|
+
} else {
|
|
7272
|
+
setAdvancedOpen(true);
|
|
7273
|
+
}
|
|
7274
|
+
});
|
|
7275
|
+
};
|
|
7276
|
+
const advancedFilterCount = filterState.advancedFilters.length;
|
|
7277
|
+
const showAdvancedChip = hasAdvanced || advancedOpen;
|
|
7278
|
+
const showSummaryChip = totalCount > 0 || summaryOpen;
|
|
7279
|
+
return /* @__PURE__ */ jsxs50(FilterBar, { ref: containerRef, className, children: [
|
|
7280
|
+
/* @__PURE__ */ jsxs50(FilterBarLeft, { className: "flex-nowrap flex-1 min-w-0 overflow-x-auto scrollbar-none outline-none [&>*]:shrink-0", children: [
|
|
7004
7281
|
children,
|
|
7005
|
-
sortFields && filterState.sort && /* @__PURE__ */
|
|
7282
|
+
sortFields && filterState.sort && /* @__PURE__ */ jsx56(
|
|
7006
7283
|
SortButton,
|
|
7007
7284
|
{
|
|
7008
7285
|
fields: sortFields,
|
|
@@ -7012,40 +7289,48 @@ var FilterSystem = ({
|
|
|
7012
7289
|
iconOnly: isMinimal
|
|
7013
7290
|
}
|
|
7014
7291
|
),
|
|
7015
|
-
isMinimal ?
|
|
7016
|
-
/*
|
|
7017
|
-
|
|
7018
|
-
SummaryChip,
|
|
7292
|
+
isMinimal ? /* @__PURE__ */ jsxs50(Fragment5, { children: [
|
|
7293
|
+
/* @__PURE__ */ jsx56(
|
|
7294
|
+
"div",
|
|
7019
7295
|
{
|
|
7020
|
-
|
|
7021
|
-
|
|
7022
|
-
|
|
7023
|
-
|
|
7024
|
-
|
|
7025
|
-
|
|
7026
|
-
|
|
7027
|
-
|
|
7028
|
-
|
|
7029
|
-
|
|
7030
|
-
|
|
7296
|
+
className: showSummaryChip ? "inline-flex" : "inline-flex w-0 overflow-hidden opacity-0 pointer-events-none",
|
|
7297
|
+
"aria-hidden": !showSummaryChip || void 0,
|
|
7298
|
+
children: /* @__PURE__ */ jsx56(
|
|
7299
|
+
SummaryChip,
|
|
7300
|
+
{
|
|
7301
|
+
count: totalCount,
|
|
7302
|
+
filters: allFilters,
|
|
7303
|
+
properties,
|
|
7304
|
+
onFiltersChange: (filters) => {
|
|
7305
|
+
onFilterStateChange({
|
|
7306
|
+
...filterState,
|
|
7307
|
+
basicFilters: filters,
|
|
7308
|
+
advancedFilters: []
|
|
7309
|
+
});
|
|
7310
|
+
},
|
|
7311
|
+
onClearAll: handleClearAll,
|
|
7312
|
+
open: summaryOpen,
|
|
7313
|
+
onOpenChange: setSummaryOpen
|
|
7314
|
+
}
|
|
7315
|
+
)
|
|
7031
7316
|
}
|
|
7032
|
-
)
|
|
7033
|
-
|
|
7034
|
-
/* No filters → same FilterBarButton as default, icon-only */
|
|
7035
|
-
/* @__PURE__ */ jsx51(
|
|
7317
|
+
),
|
|
7318
|
+
!showSummaryChip && /* @__PURE__ */ jsx56(
|
|
7036
7319
|
PropertySelector,
|
|
7037
7320
|
{
|
|
7038
7321
|
properties,
|
|
7039
7322
|
onSelect: handleAddFilter,
|
|
7040
7323
|
open: propertySelectorOpen,
|
|
7041
7324
|
onOpenChange: setPropertySelectorOpen,
|
|
7042
|
-
|
|
7325
|
+
onAdvancedFilter: handleOpenAdvanced,
|
|
7326
|
+
advancedFilterCount,
|
|
7327
|
+
children: /* @__PURE__ */ jsx56(FilterBarButton, { iconOnly: true })
|
|
7043
7328
|
}
|
|
7044
7329
|
)
|
|
7045
|
-
) : (
|
|
7330
|
+
] }) : (
|
|
7046
7331
|
/* ── DEFAULT MODE ────────────────────────────────────── */
|
|
7047
|
-
/* @__PURE__ */
|
|
7048
|
-
|
|
7332
|
+
/* @__PURE__ */ jsxs50(Fragment5, { children: [
|
|
7333
|
+
/* @__PURE__ */ jsx56(
|
|
7049
7334
|
AdvancedPopover,
|
|
7050
7335
|
{
|
|
7051
7336
|
filters: filterState.advancedFilters,
|
|
@@ -7053,12 +7338,19 @@ var FilterSystem = ({
|
|
|
7053
7338
|
onFiltersChange: handleAdvancedFiltersChange,
|
|
7054
7339
|
open: advancedOpen,
|
|
7055
7340
|
onOpenChange: setAdvancedOpen,
|
|
7056
|
-
children: /* @__PURE__ */
|
|
7057
|
-
|
|
7341
|
+
children: /* @__PURE__ */ jsx56(
|
|
7342
|
+
"div",
|
|
7058
7343
|
{
|
|
7059
|
-
|
|
7060
|
-
|
|
7061
|
-
|
|
7344
|
+
className: showAdvancedChip ? "inline-flex" : "inline-flex w-0 overflow-hidden opacity-0 pointer-events-none",
|
|
7345
|
+
"aria-hidden": !showAdvancedChip || void 0,
|
|
7346
|
+
children: /* @__PURE__ */ jsx56(
|
|
7347
|
+
AdvancedChip,
|
|
7348
|
+
{
|
|
7349
|
+
count: filterState.advancedFilters.length,
|
|
7350
|
+
onClick: () => setAdvancedOpen(true),
|
|
7351
|
+
onClear: handleClearAdvanced
|
|
7352
|
+
}
|
|
7353
|
+
)
|
|
7062
7354
|
}
|
|
7063
7355
|
)
|
|
7064
7356
|
}
|
|
@@ -7066,7 +7358,7 @@ var FilterSystem = ({
|
|
|
7066
7358
|
filterState.basicFilters.map((filter) => {
|
|
7067
7359
|
const propDef = getPropertyDef(filter.propertyId);
|
|
7068
7360
|
if (!propDef) return null;
|
|
7069
|
-
return /* @__PURE__ */
|
|
7361
|
+
return /* @__PURE__ */ jsx56(
|
|
7070
7362
|
InteractiveFilterChip,
|
|
7071
7363
|
{
|
|
7072
7364
|
propertyDef: propDef,
|
|
@@ -7082,34 +7374,38 @@ var FilterSystem = ({
|
|
|
7082
7374
|
filter.id
|
|
7083
7375
|
);
|
|
7084
7376
|
}),
|
|
7085
|
-
/* @__PURE__ */
|
|
7377
|
+
/* @__PURE__ */ jsx56(
|
|
7086
7378
|
PropertySelector,
|
|
7087
7379
|
{
|
|
7088
7380
|
properties,
|
|
7089
7381
|
onSelect: handleAddFilter,
|
|
7090
7382
|
open: propertySelectorOpen,
|
|
7091
7383
|
onOpenChange: setPropertySelectorOpen,
|
|
7092
|
-
|
|
7093
|
-
|
|
7384
|
+
onAdvancedFilter: handleOpenAdvanced,
|
|
7385
|
+
advancedFilterCount,
|
|
7386
|
+
children: totalCount > 0 ? /* @__PURE__ */ jsx56(
|
|
7387
|
+
"button",
|
|
7094
7388
|
{
|
|
7095
|
-
|
|
7389
|
+
type: "button",
|
|
7390
|
+
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)]",
|
|
7391
|
+
children: /* @__PURE__ */ jsx56(Icon33, { icon: faPlusOutline4, size: "sm", className: "text-[var(--color-foreground)]" })
|
|
7096
7392
|
}
|
|
7097
|
-
)
|
|
7393
|
+
) : /* @__PURE__ */ jsx56(FilterBarButton, {})
|
|
7098
7394
|
}
|
|
7099
7395
|
)
|
|
7100
7396
|
] })
|
|
7101
7397
|
),
|
|
7102
|
-
totalCount > 0 && /* @__PURE__ */
|
|
7398
|
+
totalCount > 0 && /* @__PURE__ */ jsx56(
|
|
7103
7399
|
"button",
|
|
7104
7400
|
{
|
|
7105
7401
|
type: "button",
|
|
7106
7402
|
onClick: handleClearAll,
|
|
7107
|
-
className: "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)]",
|
|
7108
|
-
children: isMinimal ? /* @__PURE__ */
|
|
7403
|
+
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)]",
|
|
7404
|
+
children: isMinimal ? /* @__PURE__ */ jsx56(Icon33, { icon: faXmarkOutline4, size: "sm", className: "text-[var(--color-foreground)]" }) : /* @__PURE__ */ jsx56("span", { className: "text-sm font-semibold leading-sm text-[var(--color-foreground)]", children: "Clear" })
|
|
7109
7405
|
}
|
|
7110
7406
|
)
|
|
7111
7407
|
] }),
|
|
7112
|
-
actions && /* @__PURE__ */
|
|
7408
|
+
actions && /* @__PURE__ */ jsx56(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 })
|
|
7113
7409
|
] });
|
|
7114
7410
|
};
|
|
7115
7411
|
FilterSystem.displayName = "FilterSystem";
|
|
@@ -7124,7 +7420,7 @@ import {
|
|
|
7124
7420
|
faArrowRightOutline as faArrowRightOutline2,
|
|
7125
7421
|
faCalendarOutline
|
|
7126
7422
|
} from "@l3mpire/icons";
|
|
7127
|
-
import { jsx as
|
|
7423
|
+
import { jsx as jsx57, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
7128
7424
|
function getDaysInMonth(year, month) {
|
|
7129
7425
|
return new Date(year, month + 1, 0).getDate();
|
|
7130
7426
|
}
|
|
@@ -7255,7 +7551,7 @@ var DatePicker = React50.forwardRef(
|
|
|
7255
7551
|
hoveredDate
|
|
7256
7552
|
]
|
|
7257
7553
|
);
|
|
7258
|
-
return /* @__PURE__ */
|
|
7554
|
+
return /* @__PURE__ */ jsx57(DatePickerContext.Provider, { value: ctxValue, children: /* @__PURE__ */ jsx57(
|
|
7259
7555
|
"div",
|
|
7260
7556
|
{
|
|
7261
7557
|
ref,
|
|
@@ -7282,18 +7578,18 @@ var DatePickerSelects = React50.forwardRef(({ className, formatDate = defaultFor
|
|
|
7282
7578
|
const { selected } = useDatePickerContext();
|
|
7283
7579
|
const fromDate = selected instanceof Date ? selected : selected?.from;
|
|
7284
7580
|
const toDate = selected instanceof Date ? void 0 : selected?.to;
|
|
7285
|
-
return /* @__PURE__ */
|
|
7581
|
+
return /* @__PURE__ */ jsx57(
|
|
7286
7582
|
"div",
|
|
7287
7583
|
{
|
|
7288
7584
|
ref,
|
|
7289
7585
|
className: cn("flex flex-col items-start pt-lg px-lg", className),
|
|
7290
7586
|
...props,
|
|
7291
|
-
children: /* @__PURE__ */
|
|
7292
|
-
/* @__PURE__ */
|
|
7293
|
-
/* @__PURE__ */
|
|
7294
|
-
/* @__PURE__ */
|
|
7587
|
+
children: /* @__PURE__ */ jsxs51("div", { className: "flex items-center gap-base w-full", children: [
|
|
7588
|
+
/* @__PURE__ */ jsxs51("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: [
|
|
7589
|
+
/* @__PURE__ */ jsx57("span", { className: "flex-1 text-sm font-regular leading-sm text-datepicker-header-text truncate", children: fromDate ? formatDate(fromDate) : "Start date" }),
|
|
7590
|
+
/* @__PURE__ */ jsx57(Icon34, { icon: faCalendarOutline, size: "sm", className: "shrink-0 text-datepicker-header-text" })
|
|
7295
7591
|
] }),
|
|
7296
|
-
/* @__PURE__ */
|
|
7592
|
+
/* @__PURE__ */ jsx57(
|
|
7297
7593
|
Icon34,
|
|
7298
7594
|
{
|
|
7299
7595
|
icon: faArrowRightOutline2,
|
|
@@ -7301,9 +7597,9 @@ var DatePickerSelects = React50.forwardRef(({ className, formatDate = defaultFor
|
|
|
7301
7597
|
className: "shrink-0 text-datepicker-header-weekday"
|
|
7302
7598
|
}
|
|
7303
7599
|
),
|
|
7304
|
-
/* @__PURE__ */
|
|
7305
|
-
/* @__PURE__ */
|
|
7306
|
-
/* @__PURE__ */
|
|
7600
|
+
/* @__PURE__ */ jsxs51("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: [
|
|
7601
|
+
/* @__PURE__ */ jsx57("span", { className: "flex-1 text-sm font-regular leading-sm text-datepicker-header-text truncate", children: toDate ? formatDate(toDate) : "End date" }),
|
|
7602
|
+
/* @__PURE__ */ jsx57(Icon34, { icon: faCalendarOutline, size: "sm", className: "shrink-0 text-datepicker-header-text" })
|
|
7307
7603
|
] })
|
|
7308
7604
|
] })
|
|
7309
7605
|
}
|
|
@@ -7319,7 +7615,7 @@ var DatePickerDay = ({ date, isOutside }) => {
|
|
|
7319
7615
|
const inRange = mode === "range" && selected && !(selected instanceof Date) && selected.from && selected.to && !isSelected && isInRange(date, selected.from, selected.to);
|
|
7320
7616
|
const inPreviewRange = mode === "range" && selected && !(selected instanceof Date) && selected.from && !selected.to && hoveredDate && !isSelected && hoveredDate.getTime() > selected.from.getTime() && isInRange(date, selected.from, hoveredDate);
|
|
7321
7617
|
const isInRangeOrPreview = inRange || inPreviewRange;
|
|
7322
|
-
return /* @__PURE__ */
|
|
7618
|
+
return /* @__PURE__ */ jsxs51(
|
|
7323
7619
|
"button",
|
|
7324
7620
|
{
|
|
7325
7621
|
type: "button",
|
|
@@ -7329,7 +7625,7 @@ var DatePickerDay = ({ date, isOutside }) => {
|
|
|
7329
7625
|
disabled: isOutside,
|
|
7330
7626
|
className: cn(
|
|
7331
7627
|
"relative flex flex-col items-center justify-center w-9 rounded-full p-2 cursor-pointer transition-colors",
|
|
7332
|
-
"text-sm font-
|
|
7628
|
+
"text-sm font-semibold leading-sm text-center",
|
|
7333
7629
|
// Default
|
|
7334
7630
|
!isOutside && !isSelected && !isInRangeOrPreview && "text-datepicker-day-text-default hover:bg-datepicker-day-bg-hover",
|
|
7335
7631
|
// Outside month (disabled)
|
|
@@ -7343,7 +7639,7 @@ var DatePickerDay = ({ date, isOutside }) => {
|
|
|
7343
7639
|
),
|
|
7344
7640
|
children: [
|
|
7345
7641
|
date.getDate(),
|
|
7346
|
-
isToday && !isOutside && /* @__PURE__ */
|
|
7642
|
+
isToday && !isOutside && /* @__PURE__ */ jsx57("span", { className: "absolute bottom-0.5 left-1/2 -translate-x-1/2 size-1.5 rounded-full bg-datepicker-day-today" })
|
|
7347
7643
|
]
|
|
7348
7644
|
}
|
|
7349
7645
|
);
|
|
@@ -7390,7 +7686,7 @@ var DatePickerCalendar = React50.forwardRef(({ className, header, ...props }, re
|
|
|
7390
7686
|
}
|
|
7391
7687
|
return result;
|
|
7392
7688
|
}, [month, year]);
|
|
7393
|
-
return /* @__PURE__ */
|
|
7689
|
+
return /* @__PURE__ */ jsxs51(
|
|
7394
7690
|
"div",
|
|
7395
7691
|
{
|
|
7396
7692
|
ref,
|
|
@@ -7398,38 +7694,38 @@ var DatePickerCalendar = React50.forwardRef(({ className, header, ...props }, re
|
|
|
7398
7694
|
...props,
|
|
7399
7695
|
children: [
|
|
7400
7696
|
header,
|
|
7401
|
-
/* @__PURE__ */
|
|
7402
|
-
/* @__PURE__ */
|
|
7403
|
-
/* @__PURE__ */
|
|
7697
|
+
/* @__PURE__ */ jsxs51("div", { className: "flex flex-col gap-lg p-lg", children: [
|
|
7698
|
+
/* @__PURE__ */ jsxs51("div", { className: "flex items-center justify-between", children: [
|
|
7699
|
+
/* @__PURE__ */ jsxs51("span", { className: "text-base font-semibold leading-base text-datepicker-header-text", children: [
|
|
7404
7700
|
MONTH_NAMES[month],
|
|
7405
7701
|
" ",
|
|
7406
7702
|
year
|
|
7407
7703
|
] }),
|
|
7408
|
-
/* @__PURE__ */
|
|
7409
|
-
/* @__PURE__ */
|
|
7704
|
+
/* @__PURE__ */ jsxs51("div", { className: "flex items-center gap-xs", children: [
|
|
7705
|
+
/* @__PURE__ */ jsx57(
|
|
7410
7706
|
"button",
|
|
7411
7707
|
{
|
|
7412
7708
|
type: "button",
|
|
7413
7709
|
onClick: goToPrevMonth,
|
|
7414
7710
|
className: "flex items-center justify-center p-xs rounded-base hover:bg-datepicker-day-bg-hover transition-colors cursor-pointer",
|
|
7415
7711
|
"aria-label": "Previous month",
|
|
7416
|
-
children: /* @__PURE__ */
|
|
7712
|
+
children: /* @__PURE__ */ jsx57(Icon34, { icon: faChevronLeftOutline3, size: "xs", className: "text-datepicker-header-nav" })
|
|
7417
7713
|
}
|
|
7418
7714
|
),
|
|
7419
|
-
/* @__PURE__ */
|
|
7715
|
+
/* @__PURE__ */ jsx57(
|
|
7420
7716
|
"button",
|
|
7421
7717
|
{
|
|
7422
7718
|
type: "button",
|
|
7423
7719
|
onClick: goToNextMonth,
|
|
7424
7720
|
className: "flex items-center justify-center p-xs rounded-base hover:bg-datepicker-day-bg-hover transition-colors cursor-pointer",
|
|
7425
7721
|
"aria-label": "Next month",
|
|
7426
|
-
children: /* @__PURE__ */
|
|
7722
|
+
children: /* @__PURE__ */ jsx57(Icon34, { icon: faChevronRightOutline3, size: "xs", className: "text-datepicker-header-nav" })
|
|
7427
7723
|
}
|
|
7428
7724
|
)
|
|
7429
7725
|
] })
|
|
7430
7726
|
] }),
|
|
7431
|
-
/* @__PURE__ */
|
|
7432
|
-
/* @__PURE__ */
|
|
7727
|
+
/* @__PURE__ */ jsxs51("div", { className: "flex flex-col", children: [
|
|
7728
|
+
/* @__PURE__ */ jsx57("div", { className: "grid grid-cols-7 gap-base py-sm", children: WEEKDAYS.map((day) => /* @__PURE__ */ jsx57(
|
|
7433
7729
|
"span",
|
|
7434
7730
|
{
|
|
7435
7731
|
className: "w-9 text-center text-xs font-regular leading-xs text-datepicker-header-weekday",
|
|
@@ -7437,7 +7733,7 @@ var DatePickerCalendar = React50.forwardRef(({ className, header, ...props }, re
|
|
|
7437
7733
|
},
|
|
7438
7734
|
day
|
|
7439
7735
|
)) }),
|
|
7440
|
-
/* @__PURE__ */
|
|
7736
|
+
/* @__PURE__ */ jsx57("div", { className: "flex flex-col", children: weeks.map((week, wi) => /* @__PURE__ */ jsx57("div", { className: "grid grid-cols-7 gap-base", children: week.map((day, di) => /* @__PURE__ */ jsx57(
|
|
7441
7737
|
DatePickerDay,
|
|
7442
7738
|
{
|
|
7443
7739
|
date: day.date,
|
|
@@ -7477,7 +7773,7 @@ var DatePickerSuggestions = React50.forwardRef(
|
|
|
7477
7773
|
const to = val.to ? formatDate(val.to) : "";
|
|
7478
7774
|
return to ? `${from} - ${to}` : from;
|
|
7479
7775
|
};
|
|
7480
|
-
return /* @__PURE__ */
|
|
7776
|
+
return /* @__PURE__ */ jsxs51(
|
|
7481
7777
|
"div",
|
|
7482
7778
|
{
|
|
7483
7779
|
ref,
|
|
@@ -7487,16 +7783,16 @@ var DatePickerSuggestions = React50.forwardRef(
|
|
|
7487
7783
|
),
|
|
7488
7784
|
...props,
|
|
7489
7785
|
children: [
|
|
7490
|
-
/* @__PURE__ */
|
|
7491
|
-
/* @__PURE__ */
|
|
7786
|
+
/* @__PURE__ */ jsx57("div", { className: "pt-lg px-base", children: /* @__PURE__ */ jsx57("div", { className: "flex items-center p-base rounded-base", children: /* @__PURE__ */ jsx57("span", { className: "flex-1 text-xs font-semibold leading-xs text-datepicker-suggestion-heading uppercase truncate", children: "Suggestions" }) }) }),
|
|
7787
|
+
/* @__PURE__ */ jsx57("div", { className: "flex flex-1 flex-col p-base min-w-[222px]", children: suggestions.map((suggestion, i) => /* @__PURE__ */ jsxs51(
|
|
7492
7788
|
"button",
|
|
7493
7789
|
{
|
|
7494
7790
|
type: "button",
|
|
7495
7791
|
onClick: () => handleClick(suggestion),
|
|
7496
7792
|
className: "flex items-center gap-sm p-base rounded-base hover:bg-datepicker-suggestion-hover transition-colors cursor-pointer text-left",
|
|
7497
7793
|
children: [
|
|
7498
|
-
/* @__PURE__ */
|
|
7499
|
-
/* @__PURE__ */
|
|
7794
|
+
/* @__PURE__ */ jsx57("span", { className: "text-sm font-regular leading-sm text-datepicker-suggestion-text truncate shrink-0", children: suggestion.label }),
|
|
7795
|
+
/* @__PURE__ */ jsx57("span", { className: "text-xs font-regular leading-xs text-datepicker-suggestion-date truncate", children: formatSuggestionDate(suggestion) })
|
|
7500
7796
|
]
|
|
7501
7797
|
},
|
|
7502
7798
|
i
|
|
@@ -7508,7 +7804,7 @@ var DatePickerSuggestions = React50.forwardRef(
|
|
|
7508
7804
|
);
|
|
7509
7805
|
DatePickerSuggestions.displayName = "DatePickerSuggestions";
|
|
7510
7806
|
var DatePickerFooter = React50.forwardRef(
|
|
7511
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */
|
|
7807
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ jsx57(
|
|
7512
7808
|
"div",
|
|
7513
7809
|
{
|
|
7514
7810
|
ref,
|
|
@@ -7525,7 +7821,7 @@ var DatePickerFooter = React50.forwardRef(
|
|
|
7525
7821
|
);
|
|
7526
7822
|
DatePickerFooter.displayName = "DatePickerFooter";
|
|
7527
7823
|
var DatePickerPanel = React50.forwardRef(
|
|
7528
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */
|
|
7824
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ jsx57(
|
|
7529
7825
|
"div",
|
|
7530
7826
|
{
|
|
7531
7827
|
ref,
|
|
@@ -7538,7 +7834,7 @@ var DatePickerPanel = React50.forwardRef(
|
|
|
7538
7834
|
DatePickerPanel.displayName = "DatePickerPanel";
|
|
7539
7835
|
var DatePickerRoot = PopoverPrimitive12.Root;
|
|
7540
7836
|
var DatePickerTrigger = PopoverPrimitive12.Trigger;
|
|
7541
|
-
var DatePickerPopover = React50.forwardRef(({ className, sideOffset = 4, align = "start", children, ...props }, ref) => /* @__PURE__ */
|
|
7837
|
+
var DatePickerPopover = React50.forwardRef(({ className, sideOffset = 4, align = "start", children, ...props }, ref) => /* @__PURE__ */ jsx57(PopoverPrimitive12.Portal, { children: /* @__PURE__ */ jsx57(
|
|
7542
7838
|
PopoverPrimitive12.Content,
|
|
7543
7839
|
{
|
|
7544
7840
|
ref,
|