@l3mpire/ui 2.9.0 → 2.10.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 +32 -1
- package/dist/index.d.mts +10 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.js +752 -661
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +750 -661
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -5
- package/src/styles/globals.css +15 -0
package/dist/index.js
CHANGED
|
@@ -99,6 +99,8 @@ __export(index_exports, {
|
|
|
99
99
|
OperatorSelector: () => OperatorSelector,
|
|
100
100
|
ProductLogo: () => ProductLogo,
|
|
101
101
|
PropertySelector: () => PropertySelector,
|
|
102
|
+
RadioGroup: () => RadioGroup,
|
|
103
|
+
RadioGroupItem: () => RadioGroupItem,
|
|
102
104
|
RowActions: () => RowActions,
|
|
103
105
|
SaveViewButton: () => SaveViewButton,
|
|
104
106
|
SearchBar: () => SearchBar,
|
|
@@ -1922,11 +1924,97 @@ var Checkbox = React14.forwardRef(({ className, label, disabled, id, ...props },
|
|
|
1922
1924
|
});
|
|
1923
1925
|
Checkbox.displayName = "Checkbox";
|
|
1924
1926
|
|
|
1925
|
-
// src/components/ui/
|
|
1927
|
+
// src/components/ui/radio.tsx
|
|
1926
1928
|
var React15 = __toESM(require("react"));
|
|
1929
|
+
var RadioGroupPrimitive = __toESM(require("@radix-ui/react-radio-group"));
|
|
1930
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1931
|
+
var itemStyles = {
|
|
1932
|
+
base: "peer shrink-0 size-4 rounded-full inline-flex items-center justify-center transition-colors cursor-pointer focus-visible:outline-none",
|
|
1933
|
+
unselected: [
|
|
1934
|
+
"bg-radio-unselected-bg",
|
|
1935
|
+
"border border-radio-unselected-border-default",
|
|
1936
|
+
"hover:border-radio-unselected-border-hover",
|
|
1937
|
+
"active:border-radio-unselected-border-pressed",
|
|
1938
|
+
"active:[box-shadow:0_0_0_3px_#316bff26]"
|
|
1939
|
+
],
|
|
1940
|
+
selected: [
|
|
1941
|
+
"data-[state=checked]:bg-radio-selected-bg-default",
|
|
1942
|
+
"data-[state=checked]:border-transparent",
|
|
1943
|
+
"data-[state=checked]:hover:bg-radio-selected-bg-hover",
|
|
1944
|
+
"data-[state=checked]:active:bg-radio-selected-bg-pressed",
|
|
1945
|
+
"data-[state=checked]:active:[box-shadow:0_0_0_3px_#316bff26]"
|
|
1946
|
+
],
|
|
1947
|
+
disabled: [
|
|
1948
|
+
"disabled:pointer-events-none",
|
|
1949
|
+
"disabled:bg-radio-disabled-bg",
|
|
1950
|
+
"disabled:border-radio-disabled-border",
|
|
1951
|
+
"data-[state=checked]:disabled:bg-radio-disabled-bg",
|
|
1952
|
+
"data-[state=checked]:disabled:border-transparent"
|
|
1953
|
+
]
|
|
1954
|
+
};
|
|
1955
|
+
var dotStyle = {
|
|
1956
|
+
default: "bg-radio-selected-dot",
|
|
1957
|
+
disabled: "bg-radio-disabled-dot"
|
|
1958
|
+
};
|
|
1959
|
+
var labelBase3 = "cursor-pointer select-none overflow-hidden text-ellipsis whitespace-nowrap text-sm font-medium leading-sm";
|
|
1960
|
+
var labelColor3 = {
|
|
1961
|
+
default: "text-radio-label-default",
|
|
1962
|
+
disabled: "pointer-events-none text-radio-label-disabled"
|
|
1963
|
+
};
|
|
1964
|
+
var RadioGroup = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1965
|
+
RadioGroupPrimitive.Root,
|
|
1966
|
+
{
|
|
1967
|
+
ref,
|
|
1968
|
+
className: cn("flex flex-col gap-base", className),
|
|
1969
|
+
...props
|
|
1970
|
+
}
|
|
1971
|
+
));
|
|
1972
|
+
RadioGroup.displayName = "RadioGroup";
|
|
1973
|
+
var RadioGroupItem = React15.forwardRef(({ className, label, disabled, id, ...props }, ref) => {
|
|
1974
|
+
const innerId = id ?? React15.useId();
|
|
1975
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "inline-flex items-center gap-base", children: [
|
|
1976
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1977
|
+
RadioGroupPrimitive.Item,
|
|
1978
|
+
{
|
|
1979
|
+
ref,
|
|
1980
|
+
id: innerId,
|
|
1981
|
+
disabled,
|
|
1982
|
+
className: cn(
|
|
1983
|
+
itemStyles.base,
|
|
1984
|
+
itemStyles.unselected,
|
|
1985
|
+
itemStyles.selected,
|
|
1986
|
+
itemStyles.disabled,
|
|
1987
|
+
className
|
|
1988
|
+
),
|
|
1989
|
+
...props,
|
|
1990
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1991
|
+
"span",
|
|
1992
|
+
{
|
|
1993
|
+
className: cn(
|
|
1994
|
+
"size-1.5 rounded-full transition-opacity",
|
|
1995
|
+
dotStyle[disabled ? "disabled" : "default"]
|
|
1996
|
+
)
|
|
1997
|
+
}
|
|
1998
|
+
) })
|
|
1999
|
+
}
|
|
2000
|
+
),
|
|
2001
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2002
|
+
"label",
|
|
2003
|
+
{
|
|
2004
|
+
htmlFor: innerId,
|
|
2005
|
+
className: cn(labelBase3, labelColor3[disabled ? "disabled" : "default"]),
|
|
2006
|
+
children: label
|
|
2007
|
+
}
|
|
2008
|
+
)
|
|
2009
|
+
] });
|
|
2010
|
+
});
|
|
2011
|
+
RadioGroupItem.displayName = "RadioGroupItem";
|
|
2012
|
+
|
|
2013
|
+
// src/components/ui/dropdown-menu.tsx
|
|
2014
|
+
var React16 = __toESM(require("react"));
|
|
1927
2015
|
var DropdownMenuPrimitive2 = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
1928
2016
|
var import_icons11 = require("@l3mpire/icons");
|
|
1929
|
-
var
|
|
2017
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1930
2018
|
var textSm = "text-sm font-regular leading-sm";
|
|
1931
2019
|
var textXs = "text-xs font-regular leading-xs";
|
|
1932
2020
|
var textXsMedium = "text-xs font-medium leading-xs";
|
|
@@ -1939,13 +2027,13 @@ var containerStyle = [
|
|
|
1939
2027
|
"p-base",
|
|
1940
2028
|
"shadow-lg"
|
|
1941
2029
|
];
|
|
1942
|
-
var DropdownMenu =
|
|
1943
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */ (0,
|
|
2030
|
+
var DropdownMenu = React16.forwardRef(
|
|
2031
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { ref, className: cn(containerStyle, className), ...props, children })
|
|
1944
2032
|
);
|
|
1945
2033
|
DropdownMenu.displayName = "DropdownMenu";
|
|
1946
2034
|
var DropdownMenuRoot = DropdownMenuPrimitive2.Root;
|
|
1947
2035
|
var DropdownMenuTrigger = DropdownMenuPrimitive2.Trigger;
|
|
1948
|
-
var DropdownMenuContent =
|
|
2036
|
+
var DropdownMenuContent = React16.forwardRef(({ className, sideOffset = 4, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DropdownMenuPrimitive2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1949
2037
|
DropdownMenuPrimitive2.Content,
|
|
1950
2038
|
{
|
|
1951
2039
|
ref,
|
|
@@ -1964,12 +2052,12 @@ var DropdownMenuContent = React15.forwardRef(({ className, sideOffset = 4, child
|
|
|
1964
2052
|
}
|
|
1965
2053
|
) }));
|
|
1966
2054
|
DropdownMenuContent.displayName = "DropdownMenuContent";
|
|
1967
|
-
var DropdownMenuList =
|
|
1968
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */ (0,
|
|
2055
|
+
var DropdownMenuList = React16.forwardRef(
|
|
2056
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { ref, className: cn("flex flex-col", className), role: "listbox", ...props, children })
|
|
1969
2057
|
);
|
|
1970
2058
|
DropdownMenuList.displayName = "DropdownMenuList";
|
|
1971
2059
|
var itemStyle = "flex items-center gap-base p-base rounded-base cursor-pointer hover:bg-dropdown-item-hover";
|
|
1972
|
-
var DropdownMenuItem =
|
|
2060
|
+
var DropdownMenuItem = React16.forwardRef(
|
|
1973
2061
|
({
|
|
1974
2062
|
className,
|
|
1975
2063
|
icon,
|
|
@@ -1984,7 +2072,7 @@ var DropdownMenuItem = React15.forwardRef(
|
|
|
1984
2072
|
onClick,
|
|
1985
2073
|
...props
|
|
1986
2074
|
}, ref) => {
|
|
1987
|
-
const handleClick =
|
|
2075
|
+
const handleClick = React16.useCallback(
|
|
1988
2076
|
(e) => {
|
|
1989
2077
|
const target = e.target;
|
|
1990
2078
|
if (!target.closest("button[role='checkbox']")) {
|
|
@@ -1997,7 +2085,7 @@ var DropdownMenuItem = React15.forwardRef(
|
|
|
1997
2085
|
},
|
|
1998
2086
|
[onClick]
|
|
1999
2087
|
);
|
|
2000
|
-
return /* @__PURE__ */ (0,
|
|
2088
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
2001
2089
|
"div",
|
|
2002
2090
|
{
|
|
2003
2091
|
ref,
|
|
@@ -2014,7 +2102,7 @@ var DropdownMenuItem = React15.forwardRef(
|
|
|
2014
2102
|
children,
|
|
2015
2103
|
avatar,
|
|
2016
2104
|
flag,
|
|
2017
|
-
icon && /* @__PURE__ */ (0,
|
|
2105
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2018
2106
|
import_icons11.Icon,
|
|
2019
2107
|
{
|
|
2020
2108
|
icon,
|
|
@@ -2022,9 +2110,9 @@ var DropdownMenuItem = React15.forwardRef(
|
|
|
2022
2110
|
className: "shrink-0 text-dropdown-item-icon"
|
|
2023
2111
|
}
|
|
2024
2112
|
),
|
|
2025
|
-
/* @__PURE__ */ (0,
|
|
2026
|
-
/* @__PURE__ */ (0,
|
|
2027
|
-
description && /* @__PURE__ */ (0,
|
|
2113
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex flex-1 items-center gap-sm min-w-0", children: [
|
|
2114
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: cn("truncate shrink-0", textSm, "text-dropdown-item-text"), children: label }),
|
|
2115
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: cn("truncate", textXs, "text-dropdown-item-secondary"), children: description })
|
|
2028
2116
|
] }),
|
|
2029
2117
|
badge,
|
|
2030
2118
|
action
|
|
@@ -2034,7 +2122,7 @@ var DropdownMenuItem = React15.forwardRef(
|
|
|
2034
2122
|
}
|
|
2035
2123
|
);
|
|
2036
2124
|
DropdownMenuItem.displayName = "DropdownMenuItem";
|
|
2037
|
-
var DropdownMenuRadixItem =
|
|
2125
|
+
var DropdownMenuRadixItem = React16.forwardRef(
|
|
2038
2126
|
({
|
|
2039
2127
|
className,
|
|
2040
2128
|
icon,
|
|
@@ -2046,7 +2134,7 @@ var DropdownMenuRadixItem = React15.forwardRef(
|
|
|
2046
2134
|
action,
|
|
2047
2135
|
children,
|
|
2048
2136
|
...props
|
|
2049
|
-
}, ref) => /* @__PURE__ */ (0,
|
|
2137
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
2050
2138
|
DropdownMenuPrimitive2.Item,
|
|
2051
2139
|
{
|
|
2052
2140
|
ref,
|
|
@@ -2060,7 +2148,7 @@ var DropdownMenuRadixItem = React15.forwardRef(
|
|
|
2060
2148
|
children,
|
|
2061
2149
|
avatar,
|
|
2062
2150
|
flag,
|
|
2063
|
-
icon && /* @__PURE__ */ (0,
|
|
2151
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2064
2152
|
import_icons11.Icon,
|
|
2065
2153
|
{
|
|
2066
2154
|
icon,
|
|
@@ -2068,9 +2156,9 @@ var DropdownMenuRadixItem = React15.forwardRef(
|
|
|
2068
2156
|
className: "shrink-0 text-dropdown-item-icon"
|
|
2069
2157
|
}
|
|
2070
2158
|
),
|
|
2071
|
-
/* @__PURE__ */ (0,
|
|
2072
|
-
/* @__PURE__ */ (0,
|
|
2073
|
-
description && /* @__PURE__ */ (0,
|
|
2159
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex flex-1 items-center gap-sm min-w-0", children: [
|
|
2160
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: cn("truncate shrink-0", textSm, "text-dropdown-item-text"), children: label }),
|
|
2161
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: cn("truncate", textXs, "text-dropdown-item-secondary"), children: description })
|
|
2074
2162
|
] }),
|
|
2075
2163
|
badge,
|
|
2076
2164
|
action
|
|
@@ -2079,7 +2167,7 @@ var DropdownMenuRadixItem = React15.forwardRef(
|
|
|
2079
2167
|
)
|
|
2080
2168
|
);
|
|
2081
2169
|
DropdownMenuRadixItem.displayName = "DropdownMenuRadixItem";
|
|
2082
|
-
var DropdownMenuHeading =
|
|
2170
|
+
var DropdownMenuHeading = React16.forwardRef(({ className, action, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
2083
2171
|
"div",
|
|
2084
2172
|
{
|
|
2085
2173
|
ref,
|
|
@@ -2089,7 +2177,7 @@ var DropdownMenuHeading = React15.forwardRef(({ className, action, children, ...
|
|
|
2089
2177
|
),
|
|
2090
2178
|
...props,
|
|
2091
2179
|
children: [
|
|
2092
|
-
/* @__PURE__ */ (0,
|
|
2180
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: cn("flex-1 truncate uppercase", textXsMedium, "text-dropdown-heading-text"), children }),
|
|
2093
2181
|
action
|
|
2094
2182
|
]
|
|
2095
2183
|
}
|
|
@@ -2104,7 +2192,7 @@ var clearStyle = [
|
|
|
2104
2192
|
"shadow-sm",
|
|
2105
2193
|
"cursor-pointer"
|
|
2106
2194
|
];
|
|
2107
|
-
var DropdownMenuClear =
|
|
2195
|
+
var DropdownMenuClear = React16.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2108
2196
|
"button",
|
|
2109
2197
|
{
|
|
2110
2198
|
ref,
|
|
@@ -2117,15 +2205,15 @@ var DropdownMenuClear = React15.forwardRef(({ className, children, ...props }, r
|
|
|
2117
2205
|
DropdownMenuClear.displayName = "DropdownMenuClear";
|
|
2118
2206
|
|
|
2119
2207
|
// src/components/ui/sidebar-heading-item.tsx
|
|
2120
|
-
var
|
|
2121
|
-
var
|
|
2122
|
-
var SidebarHeadingItem =
|
|
2208
|
+
var React17 = __toESM(require("react"));
|
|
2209
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
2210
|
+
var SidebarHeadingItem = React17.forwardRef(
|
|
2123
2211
|
({ className, label, ...props }, ref) => {
|
|
2124
2212
|
const { isCollapsed } = useSidebarContext();
|
|
2125
2213
|
if (isCollapsed) {
|
|
2126
|
-
return /* @__PURE__ */ (0,
|
|
2214
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { ref, className: "h-xs w-full", ...props });
|
|
2127
2215
|
}
|
|
2128
|
-
return /* @__PURE__ */ (0,
|
|
2216
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2129
2217
|
"div",
|
|
2130
2218
|
{
|
|
2131
2219
|
ref,
|
|
@@ -2143,10 +2231,10 @@ var SidebarHeadingItem = React16.forwardRef(
|
|
|
2143
2231
|
SidebarHeadingItem.displayName = "SidebarHeadingItem";
|
|
2144
2232
|
|
|
2145
2233
|
// src/components/ui/sidebar-item.tsx
|
|
2146
|
-
var
|
|
2234
|
+
var React18 = __toESM(require("react"));
|
|
2147
2235
|
var import_class_variance_authority10 = require("class-variance-authority");
|
|
2148
2236
|
var import_icons12 = require("@l3mpire/icons");
|
|
2149
|
-
var
|
|
2237
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
2150
2238
|
var sidebarItemVariants = (0, import_class_variance_authority10.cva)(
|
|
2151
2239
|
[
|
|
2152
2240
|
"flex items-center gap-base rounded-base transition-colors cursor-pointer"
|
|
@@ -2169,7 +2257,7 @@ var sidebarItemVariants = (0, import_class_variance_authority10.cva)(
|
|
|
2169
2257
|
}
|
|
2170
2258
|
}
|
|
2171
2259
|
);
|
|
2172
|
-
var SidebarItem =
|
|
2260
|
+
var SidebarItem = React18.forwardRef(
|
|
2173
2261
|
({
|
|
2174
2262
|
className,
|
|
2175
2263
|
state = "default",
|
|
@@ -2184,7 +2272,7 @@ var SidebarItem = React17.forwardRef(
|
|
|
2184
2272
|
isNew = false,
|
|
2185
2273
|
...props
|
|
2186
2274
|
}, ref) => {
|
|
2187
|
-
const [isHovered, setIsHovered] =
|
|
2275
|
+
const [isHovered, setIsHovered] = React18.useState(false);
|
|
2188
2276
|
const sidebarCtx = useSidebarContext();
|
|
2189
2277
|
const isActive = state === "active";
|
|
2190
2278
|
const resolvedType = type ?? (sidebarCtx.isCollapsed ? "collapsed" : "default");
|
|
@@ -2192,7 +2280,7 @@ var SidebarItem = React17.forwardRef(
|
|
|
2192
2280
|
const useSolid = isActive || state === "hover" || isHovered;
|
|
2193
2281
|
const iconColorClass = isActive ? "text-sidebar-item-active-icon" : "text-sidebar-item-default-icon";
|
|
2194
2282
|
const textColorClass = isActive ? "text-sidebar-item-active-text" : "text-sidebar-item-default-text";
|
|
2195
|
-
return /* @__PURE__ */ (0,
|
|
2283
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
2196
2284
|
"div",
|
|
2197
2285
|
{
|
|
2198
2286
|
ref,
|
|
@@ -2206,7 +2294,7 @@ var SidebarItem = React17.forwardRef(
|
|
|
2206
2294
|
),
|
|
2207
2295
|
...props,
|
|
2208
2296
|
children: [
|
|
2209
|
-
avatar ? /* @__PURE__ */ (0,
|
|
2297
|
+
avatar ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "shrink-0", children: avatar }) : icon ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2210
2298
|
import_icons12.Icon,
|
|
2211
2299
|
{
|
|
2212
2300
|
icon,
|
|
@@ -2216,8 +2304,8 @@ var SidebarItem = React17.forwardRef(
|
|
|
2216
2304
|
className: cn("shrink-0", iconColorClass)
|
|
2217
2305
|
}
|
|
2218
2306
|
) : null,
|
|
2219
|
-
!isCollapsed && /* @__PURE__ */ (0,
|
|
2220
|
-
/* @__PURE__ */ (0,
|
|
2307
|
+
!isCollapsed && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
2308
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2221
2309
|
"span",
|
|
2222
2310
|
{
|
|
2223
2311
|
className: cn(
|
|
@@ -2227,11 +2315,11 @@ var SidebarItem = React17.forwardRef(
|
|
|
2227
2315
|
children: label
|
|
2228
2316
|
}
|
|
2229
2317
|
),
|
|
2230
|
-
(isNew || hasBadge) && /* @__PURE__ */ (0,
|
|
2231
|
-
isNew && /* @__PURE__ */ (0,
|
|
2232
|
-
hasBadge && /* @__PURE__ */ (0,
|
|
2318
|
+
(isNew || hasBadge) && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex items-center gap-xs shrink-0", children: [
|
|
2319
|
+
isNew && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Badge, { variant: "light", type: "primary", size: "sm", icon: import_icons12.faStarsOutline, children: "New" }),
|
|
2320
|
+
hasBadge && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Badge, { variant: "solid", type: "critical", size: "sm", children: badgeCount })
|
|
2233
2321
|
] }),
|
|
2234
|
-
hasSubItems && /* @__PURE__ */ (0,
|
|
2322
|
+
hasSubItems && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2235
2323
|
import_icons12.Icon,
|
|
2236
2324
|
{
|
|
2237
2325
|
icon: import_icons12.faChevronDownSolid,
|
|
@@ -2248,12 +2336,12 @@ var SidebarItem = React17.forwardRef(
|
|
|
2248
2336
|
SidebarItem.displayName = "SidebarItem";
|
|
2249
2337
|
|
|
2250
2338
|
// src/components/ui/select.tsx
|
|
2251
|
-
var
|
|
2339
|
+
var React19 = __toESM(require("react"));
|
|
2252
2340
|
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"));
|
|
2253
2341
|
var TooltipPrimitive2 = __toESM(require("@radix-ui/react-tooltip"));
|
|
2254
2342
|
var import_class_variance_authority11 = require("class-variance-authority");
|
|
2255
2343
|
var import_icons13 = require("@l3mpire/icons");
|
|
2256
|
-
var
|
|
2344
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
2257
2345
|
var selectVariants = (0, import_class_variance_authority11.cva)(
|
|
2258
2346
|
[
|
|
2259
2347
|
"flex items-center w-full border cursor-pointer transition-colors",
|
|
@@ -2312,10 +2400,10 @@ var errorGuidance = {
|
|
|
2312
2400
|
text: "text-xs font-medium leading-xs text-select-error-text"
|
|
2313
2401
|
};
|
|
2314
2402
|
function SelectChips({ tags, onTagRemove, chipHeightPx }) {
|
|
2315
|
-
const containerRef =
|
|
2316
|
-
const measureRef =
|
|
2317
|
-
const [visibleCount, setVisibleCount] =
|
|
2318
|
-
|
|
2403
|
+
const containerRef = React19.useRef(null);
|
|
2404
|
+
const measureRef = React19.useRef(null);
|
|
2405
|
+
const [visibleCount, setVisibleCount] = React19.useState(tags.length);
|
|
2406
|
+
React19.useLayoutEffect(() => {
|
|
2319
2407
|
const container = containerRef.current;
|
|
2320
2408
|
const measureRow = measureRef.current;
|
|
2321
2409
|
if (!container || !measureRow) return;
|
|
@@ -2357,29 +2445,29 @@ function SelectChips({ tags, onTagRemove, chipHeightPx }) {
|
|
|
2357
2445
|
"text-xs font-medium leading-xs",
|
|
2358
2446
|
"whitespace-nowrap"
|
|
2359
2447
|
);
|
|
2360
|
-
return /* @__PURE__ */ (0,
|
|
2361
|
-
/* @__PURE__ */ (0,
|
|
2448
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex flex-1 items-center gap-xs min-w-0 overflow-hidden relative", children: [
|
|
2449
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2362
2450
|
"div",
|
|
2363
2451
|
{
|
|
2364
2452
|
ref: measureRef,
|
|
2365
2453
|
"aria-hidden": true,
|
|
2366
2454
|
className: "absolute flex items-center gap-xs pointer-events-none",
|
|
2367
2455
|
style: { visibility: "hidden", whiteSpace: "nowrap", top: 0, left: 0 },
|
|
2368
|
-
children: tags.map((tag) => /* @__PURE__ */ (0,
|
|
2369
|
-
/* @__PURE__ */ (0,
|
|
2370
|
-
onTagRemove && /* @__PURE__ */ (0,
|
|
2456
|
+
children: tags.map((tag) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { className: chipClass, style: { height: chipHeightPx }, children: [
|
|
2457
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "truncate max-w-[100px]", children: tag }),
|
|
2458
|
+
onTagRemove && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "inline-flex shrink-0 w-3 h-3" })
|
|
2371
2459
|
] }, tag))
|
|
2372
2460
|
}
|
|
2373
2461
|
),
|
|
2374
|
-
/* @__PURE__ */ (0,
|
|
2375
|
-
tags.slice(0, visibleCount).map((tag) => /* @__PURE__ */ (0,
|
|
2462
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { ref: containerRef, className: "flex flex-1 items-center gap-xs overflow-hidden", children: [
|
|
2463
|
+
tags.slice(0, visibleCount).map((tag) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
2376
2464
|
"span",
|
|
2377
2465
|
{
|
|
2378
2466
|
className: chipClass,
|
|
2379
2467
|
style: { height: chipHeightPx },
|
|
2380
2468
|
children: [
|
|
2381
|
-
/* @__PURE__ */ (0,
|
|
2382
|
-
onTagRemove && /* @__PURE__ */ (0,
|
|
2469
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "truncate max-w-[100px]", children: tag }),
|
|
2470
|
+
onTagRemove && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2383
2471
|
"button",
|
|
2384
2472
|
{
|
|
2385
2473
|
type: "button",
|
|
@@ -2390,15 +2478,15 @@ function SelectChips({ tags, onTagRemove, chipHeightPx }) {
|
|
|
2390
2478
|
e.preventDefault();
|
|
2391
2479
|
onTagRemove(tag);
|
|
2392
2480
|
},
|
|
2393
|
-
children: /* @__PURE__ */ (0,
|
|
2481
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_icons13.Icon, { icon: import_icons13.faXmarkSolid, size: "xs" })
|
|
2394
2482
|
}
|
|
2395
2483
|
)
|
|
2396
2484
|
]
|
|
2397
2485
|
},
|
|
2398
2486
|
tag
|
|
2399
2487
|
)),
|
|
2400
|
-
overflowCount > 0 && /* @__PURE__ */ (0,
|
|
2401
|
-
/* @__PURE__ */ (0,
|
|
2488
|
+
overflowCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TooltipPrimitive2.Provider, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(TooltipPrimitive2.Root, { children: [
|
|
2489
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TooltipPrimitive2.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
2402
2490
|
"span",
|
|
2403
2491
|
{
|
|
2404
2492
|
className: cn(chipClass, "cursor-default"),
|
|
@@ -2409,7 +2497,7 @@ function SelectChips({ tags, onTagRemove, chipHeightPx }) {
|
|
|
2409
2497
|
]
|
|
2410
2498
|
}
|
|
2411
2499
|
) }),
|
|
2412
|
-
/* @__PURE__ */ (0,
|
|
2500
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TooltipPrimitive2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
2413
2501
|
TooltipPrimitive2.Content,
|
|
2414
2502
|
{
|
|
2415
2503
|
sideOffset: 4,
|
|
@@ -2422,8 +2510,8 @@ function SelectChips({ tags, onTagRemove, chipHeightPx }) {
|
|
|
2422
2510
|
"data-[state=closed]:animate-[tooltip-out_100ms_ease-in]"
|
|
2423
2511
|
),
|
|
2424
2512
|
children: [
|
|
2425
|
-
overflowTags.map((t) => /* @__PURE__ */ (0,
|
|
2426
|
-
/* @__PURE__ */ (0,
|
|
2513
|
+
overflowTags.map((t) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: t }, t)),
|
|
2514
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TooltipPrimitive2.Arrow, { className: "fill-tooltip-default-bg" })
|
|
2427
2515
|
]
|
|
2428
2516
|
}
|
|
2429
2517
|
) })
|
|
@@ -2431,7 +2519,7 @@ function SelectChips({ tags, onTagRemove, chipHeightPx }) {
|
|
|
2431
2519
|
] })
|
|
2432
2520
|
] });
|
|
2433
2521
|
}
|
|
2434
|
-
var Select =
|
|
2522
|
+
var Select = React19.forwardRef(
|
|
2435
2523
|
({
|
|
2436
2524
|
className,
|
|
2437
2525
|
size,
|
|
@@ -2453,10 +2541,10 @@ var Select = React18.forwardRef(
|
|
|
2453
2541
|
children,
|
|
2454
2542
|
...props
|
|
2455
2543
|
}, ref) => {
|
|
2456
|
-
const autoId =
|
|
2544
|
+
const autoId = React19.useId();
|
|
2457
2545
|
const triggerId = props.id ?? autoId;
|
|
2458
2546
|
const errorId = error && errorMessage ? `${triggerId}-error` : void 0;
|
|
2459
|
-
const [internalOpen, setInternalOpen] =
|
|
2547
|
+
const [internalOpen, setInternalOpen] = React19.useState(false);
|
|
2460
2548
|
const isOpen = controlledOpen ?? internalOpen;
|
|
2461
2549
|
const handleOpenChange = (open) => {
|
|
2462
2550
|
if (disabled) return;
|
|
@@ -2470,15 +2558,15 @@ var Select = React18.forwardRef(
|
|
|
2470
2558
|
const icColor = iconColor[disabled ? "disabled" : "default"];
|
|
2471
2559
|
const triggerState = disabled ? triggerStates.disabled : error ? triggerStates.error : triggerStates.default;
|
|
2472
2560
|
const heightPx = selectHeight[resolvedSize];
|
|
2473
|
-
return /* @__PURE__ */ (0,
|
|
2561
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
2474
2562
|
PopoverPrimitive.Root,
|
|
2475
2563
|
{
|
|
2476
2564
|
open: isOpen,
|
|
2477
2565
|
onOpenChange: handleOpenChange,
|
|
2478
2566
|
children: [
|
|
2479
|
-
/* @__PURE__ */ (0,
|
|
2480
|
-
label && /* @__PURE__ */ (0,
|
|
2481
|
-
/* @__PURE__ */ (0,
|
|
2567
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "relative flex flex-col gap-xs", children: [
|
|
2568
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(InputLabel, { type: labelType, disabled, children: label }),
|
|
2569
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(PopoverPrimitive.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
2482
2570
|
"button",
|
|
2483
2571
|
{
|
|
2484
2572
|
ref,
|
|
@@ -2500,15 +2588,15 @@ var Select = React18.forwardRef(
|
|
|
2500
2588
|
children: [
|
|
2501
2589
|
avatar,
|
|
2502
2590
|
flag,
|
|
2503
|
-
icon && /* @__PURE__ */ (0,
|
|
2504
|
-
tags && tags.length > 0 ? /* @__PURE__ */ (0,
|
|
2591
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_icons13.Icon, { icon, size: "sm", className: cn("shrink-0", icColor) }),
|
|
2592
|
+
tags && tags.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2505
2593
|
SelectChips,
|
|
2506
2594
|
{
|
|
2507
2595
|
tags,
|
|
2508
2596
|
onTagRemove,
|
|
2509
2597
|
chipHeightPx: chipHeight[resolvedSize]
|
|
2510
2598
|
}
|
|
2511
|
-
) : /* @__PURE__ */ (0,
|
|
2599
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2512
2600
|
"span",
|
|
2513
2601
|
{
|
|
2514
2602
|
className: cn(
|
|
@@ -2518,12 +2606,12 @@ var Select = React18.forwardRef(
|
|
|
2518
2606
|
children: hasValue ? value : placeholder
|
|
2519
2607
|
}
|
|
2520
2608
|
),
|
|
2521
|
-
!hasTags && multiCount != null && multiCount > 0 && /* @__PURE__ */ (0,
|
|
2609
|
+
!hasTags && multiCount != null && multiCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { className: "shrink-0 text-xs leading-normal text-select-text-multi", children: [
|
|
2522
2610
|
"+",
|
|
2523
2611
|
multiCount,
|
|
2524
2612
|
" others"
|
|
2525
2613
|
] }),
|
|
2526
|
-
/* @__PURE__ */ (0,
|
|
2614
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2527
2615
|
import_icons13.Icon,
|
|
2528
2616
|
{
|
|
2529
2617
|
icon: isOpen ? import_icons13.faChevronUpSolid : import_icons13.faChevronDownSolid,
|
|
@@ -2534,12 +2622,12 @@ var Select = React18.forwardRef(
|
|
|
2534
2622
|
]
|
|
2535
2623
|
}
|
|
2536
2624
|
) }),
|
|
2537
|
-
error && errorMessage && /* @__PURE__ */ (0,
|
|
2538
|
-
/* @__PURE__ */ (0,
|
|
2539
|
-
/* @__PURE__ */ (0,
|
|
2625
|
+
error && errorMessage && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex items-center gap-xs", children: [
|
|
2626
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_icons13.Icon, { icon: import_icons13.faCircleExclamationOutline, size: "xs", className: errorGuidance.icon }),
|
|
2627
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { id: errorId, className: errorGuidance.text, children: errorMessage })
|
|
2540
2628
|
] })
|
|
2541
2629
|
] }),
|
|
2542
|
-
children && /* @__PURE__ */ (0,
|
|
2630
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(PopoverPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2543
2631
|
PopoverPrimitive.Content,
|
|
2544
2632
|
{
|
|
2545
2633
|
align: "start",
|
|
@@ -2562,12 +2650,12 @@ var Select = React18.forwardRef(
|
|
|
2562
2650
|
Select.displayName = "Select";
|
|
2563
2651
|
|
|
2564
2652
|
// src/components/ui/tab.tsx
|
|
2565
|
-
var
|
|
2653
|
+
var React20 = __toESM(require("react"));
|
|
2566
2654
|
var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"));
|
|
2567
|
-
var
|
|
2568
|
-
var Tabs =
|
|
2655
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
2656
|
+
var Tabs = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(TabsPrimitive.Root, { ref, className: cn("flex flex-col", className), ...props }));
|
|
2569
2657
|
Tabs.displayName = "Tabs";
|
|
2570
|
-
var TabList =
|
|
2658
|
+
var TabList = React20.forwardRef(({ className, hasOffset = false, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2571
2659
|
TabsPrimitive.List,
|
|
2572
2660
|
{
|
|
2573
2661
|
ref,
|
|
@@ -2580,7 +2668,7 @@ var TabList = React19.forwardRef(({ className, hasOffset = false, ...props }, re
|
|
|
2580
2668
|
}
|
|
2581
2669
|
));
|
|
2582
2670
|
TabList.displayName = "TabList";
|
|
2583
|
-
var TabTrigger =
|
|
2671
|
+
var TabTrigger = React20.forwardRef(({ className, badge, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2584
2672
|
TabsPrimitive.Trigger,
|
|
2585
2673
|
{
|
|
2586
2674
|
ref,
|
|
@@ -2591,7 +2679,7 @@ var TabTrigger = React19.forwardRef(({ className, badge, children, ...props }, r
|
|
|
2591
2679
|
className
|
|
2592
2680
|
),
|
|
2593
2681
|
...props,
|
|
2594
|
-
children: /* @__PURE__ */ (0,
|
|
2682
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
2595
2683
|
"div",
|
|
2596
2684
|
{
|
|
2597
2685
|
className: cn(
|
|
@@ -2600,7 +2688,7 @@ var TabTrigger = React19.forwardRef(({ className, badge, children, ...props }, r
|
|
|
2600
2688
|
"group-data-[state=active]:bg-tab-item-active-bg"
|
|
2601
2689
|
),
|
|
2602
2690
|
children: [
|
|
2603
|
-
/* @__PURE__ */ (0,
|
|
2691
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2604
2692
|
"span",
|
|
2605
2693
|
{
|
|
2606
2694
|
className: cn(
|
|
@@ -2611,14 +2699,14 @@ var TabTrigger = React19.forwardRef(({ className, badge, children, ...props }, r
|
|
|
2611
2699
|
children
|
|
2612
2700
|
}
|
|
2613
2701
|
),
|
|
2614
|
-
badge && /* @__PURE__ */ (0,
|
|
2702
|
+
badge && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Badge, { variant: "light", type: "neutral", size: "sm", children: badge })
|
|
2615
2703
|
]
|
|
2616
2704
|
}
|
|
2617
2705
|
)
|
|
2618
2706
|
}
|
|
2619
2707
|
));
|
|
2620
2708
|
TabTrigger.displayName = "TabTrigger";
|
|
2621
|
-
var TabContent =
|
|
2709
|
+
var TabContent = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2622
2710
|
TabsPrimitive.Content,
|
|
2623
2711
|
{
|
|
2624
2712
|
ref,
|
|
@@ -2629,10 +2717,10 @@ var TabContent = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
2629
2717
|
TabContent.displayName = "TabContent";
|
|
2630
2718
|
|
|
2631
2719
|
// src/components/ui/tag.tsx
|
|
2632
|
-
var
|
|
2720
|
+
var React21 = __toESM(require("react"));
|
|
2633
2721
|
var import_class_variance_authority12 = require("class-variance-authority");
|
|
2634
2722
|
var import_icons14 = require("@l3mpire/icons");
|
|
2635
|
-
var
|
|
2723
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2636
2724
|
var tagVariants = (0, import_class_variance_authority12.cva)(
|
|
2637
2725
|
[
|
|
2638
2726
|
"inline-flex items-center",
|
|
@@ -2673,19 +2761,19 @@ var tagVariants = (0, import_class_variance_authority12.cva)(
|
|
|
2673
2761
|
}
|
|
2674
2762
|
);
|
|
2675
2763
|
var iconSizeMap3 = { sm: "xs", md: "sm" };
|
|
2676
|
-
var Tag =
|
|
2764
|
+
var Tag = React21.forwardRef(
|
|
2677
2765
|
({ className, variant, size, icon, onClose, children, ...props }, ref) => {
|
|
2678
2766
|
const iconSize = iconSizeMap3[size ?? "sm"];
|
|
2679
|
-
return /* @__PURE__ */ (0,
|
|
2767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
2680
2768
|
"span",
|
|
2681
2769
|
{
|
|
2682
2770
|
ref,
|
|
2683
2771
|
className: cn(tagVariants({ variant, size }), className),
|
|
2684
2772
|
...props,
|
|
2685
2773
|
children: [
|
|
2686
|
-
icon && /* @__PURE__ */ (0,
|
|
2774
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_icons14.Icon, { icon, size: iconSize, className: "shrink-0" }),
|
|
2687
2775
|
children,
|
|
2688
|
-
onClose && /* @__PURE__ */ (0,
|
|
2776
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2689
2777
|
"button",
|
|
2690
2778
|
{
|
|
2691
2779
|
type: "button",
|
|
@@ -2697,7 +2785,7 @@ var Tag = React20.forwardRef(
|
|
|
2697
2785
|
size === "md" && "p-sm rounded-md"
|
|
2698
2786
|
),
|
|
2699
2787
|
"aria-label": "Remove",
|
|
2700
|
-
children: /* @__PURE__ */ (0,
|
|
2788
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_icons14.Icon, { icon: import_icons14.faXmarkSolid, size: iconSize })
|
|
2701
2789
|
}
|
|
2702
2790
|
)
|
|
2703
2791
|
]
|
|
@@ -2708,9 +2796,9 @@ var Tag = React20.forwardRef(
|
|
|
2708
2796
|
Tag.displayName = "Tag";
|
|
2709
2797
|
|
|
2710
2798
|
// src/components/ui/textarea.tsx
|
|
2711
|
-
var
|
|
2799
|
+
var React22 = __toESM(require("react"));
|
|
2712
2800
|
var import_icons15 = require("@l3mpire/icons");
|
|
2713
|
-
var
|
|
2801
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
2714
2802
|
var fieldStates = {
|
|
2715
2803
|
default: [
|
|
2716
2804
|
"bg-textarea-bg-default",
|
|
@@ -2752,7 +2840,7 @@ function resolveState(error, success, disabled) {
|
|
|
2752
2840
|
if (success) return "success";
|
|
2753
2841
|
return "default";
|
|
2754
2842
|
}
|
|
2755
|
-
var TextArea =
|
|
2843
|
+
var TextArea = React22.forwardRef(
|
|
2756
2844
|
({
|
|
2757
2845
|
className,
|
|
2758
2846
|
label,
|
|
@@ -2764,13 +2852,13 @@ var TextArea = React21.forwardRef(
|
|
|
2764
2852
|
disabled,
|
|
2765
2853
|
...props
|
|
2766
2854
|
}, ref) => {
|
|
2767
|
-
const autoId =
|
|
2855
|
+
const autoId = React22.useId();
|
|
2768
2856
|
const textareaId = props.id ?? autoId;
|
|
2769
2857
|
const errorId = error && errorMessage ? `${textareaId}-error` : void 0;
|
|
2770
2858
|
const state = resolveState(error, success, disabled);
|
|
2771
|
-
return /* @__PURE__ */ (0,
|
|
2772
|
-
label && /* @__PURE__ */ (0,
|
|
2773
|
-
/* @__PURE__ */ (0,
|
|
2859
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex flex-col gap-[4px]", children: [
|
|
2860
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(InputLabel, { type: labelType, disabled, children: label }),
|
|
2861
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2774
2862
|
"textarea",
|
|
2775
2863
|
{
|
|
2776
2864
|
ref,
|
|
@@ -2791,12 +2879,12 @@ var TextArea = React21.forwardRef(
|
|
|
2791
2879
|
...props
|
|
2792
2880
|
}
|
|
2793
2881
|
),
|
|
2794
|
-
error && errorMessage || characterLimit ? /* @__PURE__ */ (0,
|
|
2795
|
-
error && errorMessage && /* @__PURE__ */ (0,
|
|
2796
|
-
/* @__PURE__ */ (0,
|
|
2797
|
-
/* @__PURE__ */ (0,
|
|
2882
|
+
error && errorMessage || characterLimit ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex gap-base items-start w-full", children: [
|
|
2883
|
+
error && errorMessage && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex flex-1 items-center gap-xs", children: [
|
|
2884
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_icons15.Icon, { icon: import_icons15.faCircleExclamationOutline, size: "xs", className: errorGuidance2.icon }),
|
|
2885
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { id: errorId, className: errorGuidance2.text, children: errorMessage })
|
|
2798
2886
|
] }),
|
|
2799
|
-
characterLimit && /* @__PURE__ */ (0,
|
|
2887
|
+
characterLimit && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: cn(charLimitStyle, !error && "w-full"), children: characterLimit })
|
|
2800
2888
|
] }) : null
|
|
2801
2889
|
] });
|
|
2802
2890
|
}
|
|
@@ -2804,10 +2892,10 @@ var TextArea = React21.forwardRef(
|
|
|
2804
2892
|
TextArea.displayName = "TextArea";
|
|
2805
2893
|
|
|
2806
2894
|
// src/components/ui/text-input.tsx
|
|
2807
|
-
var
|
|
2895
|
+
var React23 = __toESM(require("react"));
|
|
2808
2896
|
var import_class_variance_authority13 = require("class-variance-authority");
|
|
2809
2897
|
var import_icons16 = require("@l3mpire/icons");
|
|
2810
|
-
var
|
|
2898
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2811
2899
|
var textInputVariants = (0, import_class_variance_authority13.cva)(
|
|
2812
2900
|
[
|
|
2813
2901
|
"flex items-center w-full border transition-colors",
|
|
@@ -2878,7 +2966,7 @@ function resolveState2(error, success, disabled) {
|
|
|
2878
2966
|
if (success) return "success";
|
|
2879
2967
|
return "default";
|
|
2880
2968
|
}
|
|
2881
|
-
var TextInput =
|
|
2969
|
+
var TextInput = React23.forwardRef(
|
|
2882
2970
|
({
|
|
2883
2971
|
className,
|
|
2884
2972
|
size,
|
|
@@ -2900,11 +2988,11 @@ var TextInput = React22.forwardRef(
|
|
|
2900
2988
|
onChange,
|
|
2901
2989
|
...props
|
|
2902
2990
|
}, ref) => {
|
|
2903
|
-
const autoId =
|
|
2991
|
+
const autoId = React23.useId();
|
|
2904
2992
|
const inputId = props.id ?? autoId;
|
|
2905
2993
|
const errorId = error && errorMessage ? `${inputId}-error` : void 0;
|
|
2906
2994
|
const isControlled = value !== void 0;
|
|
2907
|
-
const [uncontrolledValue, setUncontrolledValue] =
|
|
2995
|
+
const [uncontrolledValue, setUncontrolledValue] = React23.useState(
|
|
2908
2996
|
defaultValue ?? ""
|
|
2909
2997
|
);
|
|
2910
2998
|
const displayValue = isControlled ? value : uncontrolledValue;
|
|
@@ -2915,10 +3003,10 @@ var TextInput = React22.forwardRef(
|
|
|
2915
3003
|
if (!isControlled) setUncontrolledValue(e.target.value);
|
|
2916
3004
|
onChange?.(e);
|
|
2917
3005
|
};
|
|
2918
|
-
return /* @__PURE__ */ (0,
|
|
2919
|
-
label && /* @__PURE__ */ (0,
|
|
2920
|
-
/* @__PURE__ */ (0,
|
|
2921
|
-
/* @__PURE__ */ (0,
|
|
3006
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex flex-col gap-xs", children: [
|
|
3007
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(InputLabel, { type: labelType, disabled, children: label }),
|
|
3008
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex", children: [
|
|
3009
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
2922
3010
|
"div",
|
|
2923
3011
|
{
|
|
2924
3012
|
className: cn(
|
|
@@ -2928,8 +3016,8 @@ var TextInput = React22.forwardRef(
|
|
|
2928
3016
|
className
|
|
2929
3017
|
),
|
|
2930
3018
|
children: [
|
|
2931
|
-
iconLeft && /* @__PURE__ */ (0,
|
|
2932
|
-
/* @__PURE__ */ (0,
|
|
3019
|
+
iconLeft && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_icons16.Icon, { icon: iconLeft, size: "sm", className: cn("shrink-0", icColor) }),
|
|
3020
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2933
3021
|
"input",
|
|
2934
3022
|
{
|
|
2935
3023
|
ref,
|
|
@@ -2949,20 +3037,20 @@ var TextInput = React22.forwardRef(
|
|
|
2949
3037
|
...props
|
|
2950
3038
|
}
|
|
2951
3039
|
),
|
|
2952
|
-
showClear ? /* @__PURE__ */ (0,
|
|
3040
|
+
showClear ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2953
3041
|
"button",
|
|
2954
3042
|
{
|
|
2955
3043
|
type: "button",
|
|
2956
3044
|
onClick: onClear,
|
|
2957
3045
|
className: "shrink-0 flex items-center justify-center",
|
|
2958
3046
|
tabIndex: -1,
|
|
2959
|
-
children: /* @__PURE__ */ (0,
|
|
3047
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_icons16.Icon, { icon: import_icons16.faCircleXmarkSolid, size: "xs", className: iconColor2.default })
|
|
2960
3048
|
}
|
|
2961
|
-
) : iconRight && !onClear && /* @__PURE__ */ (0,
|
|
3049
|
+
) : iconRight && !onClear && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_icons16.Icon, { icon: iconRight, size: "xs", className: cn("shrink-0", icColor) })
|
|
2962
3050
|
]
|
|
2963
3051
|
}
|
|
2964
3052
|
),
|
|
2965
|
-
hasButton && /* @__PURE__ */ (0,
|
|
3053
|
+
hasButton && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2966
3054
|
"button",
|
|
2967
3055
|
{
|
|
2968
3056
|
type: "button",
|
|
@@ -2973,13 +3061,13 @@ var TextInput = React22.forwardRef(
|
|
|
2973
3061
|
size === "sm" ? "px-base rounded-r-base" : "px-md rounded-r-md",
|
|
2974
3062
|
attachedButtonStyles[disabled ? "disabled" : "enabled"]
|
|
2975
3063
|
),
|
|
2976
|
-
children: /* @__PURE__ */ (0,
|
|
3064
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_icons16.Icon, { icon: buttonIcon ?? import_icons16.faPlusSolid, size: "sm", className: icColor })
|
|
2977
3065
|
}
|
|
2978
3066
|
)
|
|
2979
3067
|
] }),
|
|
2980
|
-
error && errorMessage && /* @__PURE__ */ (0,
|
|
2981
|
-
/* @__PURE__ */ (0,
|
|
2982
|
-
/* @__PURE__ */ (0,
|
|
3068
|
+
error && errorMessage && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex items-center gap-xs", children: [
|
|
3069
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_icons16.Icon, { icon: import_icons16.faCircleExclamationOutline, size: "xs", className: errorGuidance3.icon }),
|
|
3070
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { id: errorId, className: errorGuidance3.text, children: errorMessage })
|
|
2983
3071
|
] })
|
|
2984
3072
|
] });
|
|
2985
3073
|
}
|
|
@@ -2987,10 +3075,10 @@ var TextInput = React22.forwardRef(
|
|
|
2987
3075
|
TextInput.displayName = "TextInput";
|
|
2988
3076
|
|
|
2989
3077
|
// src/components/ui/chip-input.tsx
|
|
2990
|
-
var
|
|
3078
|
+
var React24 = __toESM(require("react"));
|
|
2991
3079
|
var import_class_variance_authority14 = require("class-variance-authority");
|
|
2992
3080
|
var import_icons17 = require("@l3mpire/icons");
|
|
2993
|
-
var
|
|
3081
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2994
3082
|
var chipInputVariants = (0, import_class_variance_authority14.cva)(
|
|
2995
3083
|
[
|
|
2996
3084
|
"flex flex-wrap items-center w-full border transition-colors",
|
|
@@ -3041,7 +3129,7 @@ var errorGuidance4 = {
|
|
|
3041
3129
|
icon: "shrink-0 text-text-input-error-icon",
|
|
3042
3130
|
text: "text-xs font-medium leading-xs text-text-input-error-text"
|
|
3043
3131
|
};
|
|
3044
|
-
var ChipInput =
|
|
3132
|
+
var ChipInput = React24.forwardRef(
|
|
3045
3133
|
({
|
|
3046
3134
|
className,
|
|
3047
3135
|
size,
|
|
@@ -3057,11 +3145,11 @@ var ChipInput = React23.forwardRef(
|
|
|
3057
3145
|
max = 0,
|
|
3058
3146
|
...props
|
|
3059
3147
|
}, ref) => {
|
|
3060
|
-
const autoId =
|
|
3148
|
+
const autoId = React24.useId();
|
|
3061
3149
|
const inputId = props.id ?? autoId;
|
|
3062
3150
|
const errorId = error && errorMessage ? `${inputId}-error` : void 0;
|
|
3063
|
-
const inputRef =
|
|
3064
|
-
const [inputValue, setInputValue] =
|
|
3151
|
+
const inputRef = React24.useRef(null);
|
|
3152
|
+
const [inputValue, setInputValue] = React24.useState("");
|
|
3065
3153
|
const state = disabled ? "disabled" : error ? "error" : "default";
|
|
3066
3154
|
const addChip = (val) => {
|
|
3067
3155
|
const trimmed = val.trim();
|
|
@@ -3085,9 +3173,9 @@ var ChipInput = React23.forwardRef(
|
|
|
3085
3173
|
const handleWrapperClick = () => {
|
|
3086
3174
|
inputRef.current?.focus();
|
|
3087
3175
|
};
|
|
3088
|
-
return /* @__PURE__ */ (0,
|
|
3089
|
-
label && /* @__PURE__ */ (0,
|
|
3090
|
-
/* @__PURE__ */ (0,
|
|
3176
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex flex-col gap-xs", children: [
|
|
3177
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(InputLabel, { type: labelType, disabled, children: label }),
|
|
3178
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
3091
3179
|
"div",
|
|
3092
3180
|
{
|
|
3093
3181
|
ref,
|
|
@@ -3102,7 +3190,7 @@ var ChipInput = React23.forwardRef(
|
|
|
3102
3190
|
onClick: handleWrapperClick,
|
|
3103
3191
|
...props,
|
|
3104
3192
|
children: [
|
|
3105
|
-
iconLeft && /* @__PURE__ */ (0,
|
|
3193
|
+
iconLeft && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3106
3194
|
import_icons17.Icon,
|
|
3107
3195
|
{
|
|
3108
3196
|
icon: iconLeft,
|
|
@@ -3113,9 +3201,9 @@ var ChipInput = React23.forwardRef(
|
|
|
3113
3201
|
)
|
|
3114
3202
|
}
|
|
3115
3203
|
),
|
|
3116
|
-
values.map((val) => /* @__PURE__ */ (0,
|
|
3117
|
-
/* @__PURE__ */ (0,
|
|
3118
|
-
!disabled && /* @__PURE__ */ (0,
|
|
3204
|
+
values.map((val) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("span", { className: cn(chipStyle), children: [
|
|
3205
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "truncate max-w-[150px]", children: val }),
|
|
3206
|
+
!disabled && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3119
3207
|
"button",
|
|
3120
3208
|
{
|
|
3121
3209
|
type: "button",
|
|
@@ -3125,11 +3213,11 @@ var ChipInput = React23.forwardRef(
|
|
|
3125
3213
|
e.stopPropagation();
|
|
3126
3214
|
removeChip(val);
|
|
3127
3215
|
},
|
|
3128
|
-
children: /* @__PURE__ */ (0,
|
|
3216
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_icons17.Icon, { icon: import_icons17.faXmarkSolid, size: "xs" })
|
|
3129
3217
|
}
|
|
3130
3218
|
)
|
|
3131
3219
|
] }, val)),
|
|
3132
|
-
/* @__PURE__ */ (0,
|
|
3220
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3133
3221
|
"input",
|
|
3134
3222
|
{
|
|
3135
3223
|
ref: inputRef,
|
|
@@ -3152,9 +3240,9 @@ var ChipInput = React23.forwardRef(
|
|
|
3152
3240
|
]
|
|
3153
3241
|
}
|
|
3154
3242
|
),
|
|
3155
|
-
error && errorMessage && /* @__PURE__ */ (0,
|
|
3156
|
-
/* @__PURE__ */ (0,
|
|
3157
|
-
/* @__PURE__ */ (0,
|
|
3243
|
+
error && errorMessage && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex items-center gap-xs", children: [
|
|
3244
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_icons17.Icon, { icon: import_icons17.faCircleExclamationOutline, size: "xs", className: errorGuidance4.icon }),
|
|
3245
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { id: errorId, className: errorGuidance4.text, children: errorMessage })
|
|
3158
3246
|
] })
|
|
3159
3247
|
] });
|
|
3160
3248
|
}
|
|
@@ -3162,10 +3250,10 @@ var ChipInput = React23.forwardRef(
|
|
|
3162
3250
|
ChipInput.displayName = "ChipInput";
|
|
3163
3251
|
|
|
3164
3252
|
// src/components/ui/number-input.tsx
|
|
3165
|
-
var
|
|
3253
|
+
var React25 = __toESM(require("react"));
|
|
3166
3254
|
var import_class_variance_authority15 = require("class-variance-authority");
|
|
3167
3255
|
var import_icons18 = require("@l3mpire/icons");
|
|
3168
|
-
var
|
|
3256
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
3169
3257
|
var stepperButtonVariants = (0, import_class_variance_authority15.cva)(
|
|
3170
3258
|
[
|
|
3171
3259
|
"shrink-0 flex items-center justify-center",
|
|
@@ -3231,7 +3319,7 @@ var errorGuidance5 = {
|
|
|
3231
3319
|
icon: "shrink-0 text-text-input-error-icon",
|
|
3232
3320
|
text: "text-xs font-medium leading-xs text-text-input-error-text"
|
|
3233
3321
|
};
|
|
3234
|
-
var NumberInput =
|
|
3322
|
+
var NumberInput = React25.forwardRef(
|
|
3235
3323
|
({
|
|
3236
3324
|
className,
|
|
3237
3325
|
size,
|
|
@@ -3249,11 +3337,11 @@ var NumberInput = React24.forwardRef(
|
|
|
3249
3337
|
id,
|
|
3250
3338
|
...props
|
|
3251
3339
|
}, ref) => {
|
|
3252
|
-
const autoId =
|
|
3340
|
+
const autoId = React25.useId();
|
|
3253
3341
|
const inputId = id ?? autoId;
|
|
3254
3342
|
const errorId = error && errorMessage ? `${inputId}-error` : void 0;
|
|
3255
3343
|
const isControlled = controlledValue !== void 0;
|
|
3256
|
-
const [internalValue, setInternalValue] =
|
|
3344
|
+
const [internalValue, setInternalValue] = React25.useState(defaultValue);
|
|
3257
3345
|
const currentValue = isControlled ? controlledValue : internalValue;
|
|
3258
3346
|
const resolvedSize = size ?? "md";
|
|
3259
3347
|
const state = disabled ? "disabled" : error ? "error" : "default";
|
|
@@ -3292,9 +3380,9 @@ var NumberInput = React24.forwardRef(
|
|
|
3292
3380
|
const valueStr = String(currentValue);
|
|
3293
3381
|
const charCount = valueStr.length;
|
|
3294
3382
|
const inputWidth = charCount > 3 ? `${48 + (charCount - 3) * 9}px` : void 0;
|
|
3295
|
-
return /* @__PURE__ */ (0,
|
|
3296
|
-
label && /* @__PURE__ */ (0,
|
|
3297
|
-
/* @__PURE__ */ (0,
|
|
3383
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: cn("flex flex-col gap-xs", className), children: [
|
|
3384
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(InputLabel, { type: labelType, disabled, children: label }),
|
|
3385
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3298
3386
|
"div",
|
|
3299
3387
|
{
|
|
3300
3388
|
className: cn(
|
|
@@ -3302,7 +3390,7 @@ var NumberInput = React24.forwardRef(
|
|
|
3302
3390
|
wrapperStates3[state]
|
|
3303
3391
|
),
|
|
3304
3392
|
children: [
|
|
3305
|
-
/* @__PURE__ */ (0,
|
|
3393
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3306
3394
|
"button",
|
|
3307
3395
|
{
|
|
3308
3396
|
type: "button",
|
|
@@ -3314,7 +3402,7 @@ var NumberInput = React24.forwardRef(
|
|
|
3314
3402
|
"rounded-l-md -mr-px",
|
|
3315
3403
|
stepperButtonStates[disabled || atMin ? "disabled" : "enabled"]
|
|
3316
3404
|
),
|
|
3317
|
-
children: /* @__PURE__ */ (0,
|
|
3405
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3318
3406
|
import_icons18.Icon,
|
|
3319
3407
|
{
|
|
3320
3408
|
icon: import_icons18.faMinusOutline,
|
|
@@ -3326,7 +3414,7 @@ var NumberInput = React24.forwardRef(
|
|
|
3326
3414
|
)
|
|
3327
3415
|
}
|
|
3328
3416
|
),
|
|
3329
|
-
/* @__PURE__ */ (0,
|
|
3417
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3330
3418
|
"input",
|
|
3331
3419
|
{
|
|
3332
3420
|
ref,
|
|
@@ -3356,7 +3444,7 @@ var NumberInput = React24.forwardRef(
|
|
|
3356
3444
|
...props
|
|
3357
3445
|
}
|
|
3358
3446
|
),
|
|
3359
|
-
/* @__PURE__ */ (0,
|
|
3447
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3360
3448
|
"button",
|
|
3361
3449
|
{
|
|
3362
3450
|
type: "button",
|
|
@@ -3368,7 +3456,7 @@ var NumberInput = React24.forwardRef(
|
|
|
3368
3456
|
"rounded-r-md -ml-px",
|
|
3369
3457
|
stepperButtonStates[disabled || atMax ? "disabled" : "enabled"]
|
|
3370
3458
|
),
|
|
3371
|
-
children: /* @__PURE__ */ (0,
|
|
3459
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3372
3460
|
import_icons18.Icon,
|
|
3373
3461
|
{
|
|
3374
3462
|
icon: import_icons18.faPlusOutline,
|
|
@@ -3383,9 +3471,9 @@ var NumberInput = React24.forwardRef(
|
|
|
3383
3471
|
]
|
|
3384
3472
|
}
|
|
3385
3473
|
),
|
|
3386
|
-
error && errorMessage && /* @__PURE__ */ (0,
|
|
3387
|
-
/* @__PURE__ */ (0,
|
|
3388
|
-
/* @__PURE__ */ (0,
|
|
3474
|
+
error && errorMessage && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center gap-xs", children: [
|
|
3475
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_icons18.Icon, { icon: import_icons18.faCircleExclamationOutline, size: "xs", className: errorGuidance5.icon }),
|
|
3476
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { id: errorId, className: errorGuidance5.text, children: errorMessage })
|
|
3389
3477
|
] })
|
|
3390
3478
|
] });
|
|
3391
3479
|
}
|
|
@@ -3393,10 +3481,10 @@ var NumberInput = React24.forwardRef(
|
|
|
3393
3481
|
NumberInput.displayName = "NumberInput";
|
|
3394
3482
|
|
|
3395
3483
|
// src/components/ui/typography.tsx
|
|
3396
|
-
var
|
|
3484
|
+
var React26 = __toESM(require("react"));
|
|
3397
3485
|
var import_class_variance_authority16 = require("class-variance-authority");
|
|
3398
3486
|
var import_react_slot3 = require("@radix-ui/react-slot");
|
|
3399
|
-
var
|
|
3487
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
3400
3488
|
var typographyVariants = (0, import_class_variance_authority16.cva)("", {
|
|
3401
3489
|
variants: {
|
|
3402
3490
|
variant: {
|
|
@@ -3428,10 +3516,10 @@ var defaultElementMap = {
|
|
|
3428
3516
|
sm: "p",
|
|
3429
3517
|
xs: "p"
|
|
3430
3518
|
};
|
|
3431
|
-
var Typography =
|
|
3519
|
+
var Typography = React26.forwardRef(
|
|
3432
3520
|
({ className, variant = "md", weight, as, asChild = false, ...props }, ref) => {
|
|
3433
3521
|
const Comp = asChild ? import_react_slot3.Slot : as ?? defaultElementMap[variant ?? "md"] ?? "p";
|
|
3434
|
-
return /* @__PURE__ */ (0,
|
|
3522
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3435
3523
|
Comp,
|
|
3436
3524
|
{
|
|
3437
3525
|
ref,
|
|
@@ -3444,10 +3532,10 @@ var Typography = React25.forwardRef(
|
|
|
3444
3532
|
Typography.displayName = "Typography";
|
|
3445
3533
|
|
|
3446
3534
|
// src/components/ui/user-menu.tsx
|
|
3447
|
-
var
|
|
3448
|
-
var
|
|
3449
|
-
var UserMenu =
|
|
3450
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */ (0,
|
|
3535
|
+
var React27 = __toESM(require("react"));
|
|
3536
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
3537
|
+
var UserMenu = React27.forwardRef(
|
|
3538
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3451
3539
|
"div",
|
|
3452
3540
|
{
|
|
3453
3541
|
ref,
|
|
@@ -3466,8 +3554,8 @@ var UserMenu = React26.forwardRef(
|
|
|
3466
3554
|
)
|
|
3467
3555
|
);
|
|
3468
3556
|
UserMenu.displayName = "UserMenu";
|
|
3469
|
-
var UserMenuInfoRow =
|
|
3470
|
-
({ className, avatar, name, subtitle, action, ...props }, ref) => /* @__PURE__ */ (0,
|
|
3557
|
+
var UserMenuInfoRow = React27.forwardRef(
|
|
3558
|
+
({ className, avatar, name, subtitle, action, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
3471
3559
|
"div",
|
|
3472
3560
|
{
|
|
3473
3561
|
ref,
|
|
@@ -3475,9 +3563,9 @@ var UserMenuInfoRow = React26.forwardRef(
|
|
|
3475
3563
|
...props,
|
|
3476
3564
|
children: [
|
|
3477
3565
|
avatar,
|
|
3478
|
-
/* @__PURE__ */ (0,
|
|
3479
|
-
/* @__PURE__ */ (0,
|
|
3480
|
-
subtitle && /* @__PURE__ */ (0,
|
|
3566
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex flex-1 flex-col min-w-0", children: [
|
|
3567
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "text-sm font-medium leading-sm text-user-menu-name truncate", children: name }),
|
|
3568
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "text-xs font-regular leading-xs text-user-menu-subtitle truncate", children: subtitle })
|
|
3481
3569
|
] }),
|
|
3482
3570
|
action
|
|
3483
3571
|
]
|
|
@@ -3485,8 +3573,8 @@ var UserMenuInfoRow = React26.forwardRef(
|
|
|
3485
3573
|
)
|
|
3486
3574
|
);
|
|
3487
3575
|
UserMenuInfoRow.displayName = "UserMenuInfoRow";
|
|
3488
|
-
var UserMenuSection =
|
|
3489
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */ (0,
|
|
3576
|
+
var UserMenuSection = React27.forwardRef(
|
|
3577
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3490
3578
|
"div",
|
|
3491
3579
|
{
|
|
3492
3580
|
ref,
|
|
@@ -3499,11 +3587,11 @@ var UserMenuSection = React26.forwardRef(
|
|
|
3499
3587
|
UserMenuSection.displayName = "UserMenuSection";
|
|
3500
3588
|
|
|
3501
3589
|
// src/components/ui/modal.tsx
|
|
3502
|
-
var
|
|
3590
|
+
var React28 = __toESM(require("react"));
|
|
3503
3591
|
var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
|
|
3504
3592
|
var import_class_variance_authority17 = require("class-variance-authority");
|
|
3505
3593
|
var import_icons19 = require("@l3mpire/icons");
|
|
3506
|
-
var
|
|
3594
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
3507
3595
|
var modalVariants = (0, import_class_variance_authority17.cva)(
|
|
3508
3596
|
[
|
|
3509
3597
|
"fixed top-[50%] left-[50%] -translate-x-1/2 -translate-y-1/2 z-50",
|
|
@@ -3527,7 +3615,7 @@ var modalVariants = (0, import_class_variance_authority17.cva)(
|
|
|
3527
3615
|
var Modal = DialogPrimitive.Root;
|
|
3528
3616
|
var ModalTrigger = DialogPrimitive.Trigger;
|
|
3529
3617
|
var ModalClose = DialogPrimitive.Close;
|
|
3530
|
-
var ModalOverlay =
|
|
3618
|
+
var ModalOverlay = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3531
3619
|
DialogPrimitive.Overlay,
|
|
3532
3620
|
{
|
|
3533
3621
|
ref,
|
|
@@ -3540,9 +3628,9 @@ var ModalOverlay = React27.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
3540
3628
|
}
|
|
3541
3629
|
));
|
|
3542
3630
|
ModalOverlay.displayName = "ModalOverlay";
|
|
3543
|
-
var ModalContent =
|
|
3544
|
-
/* @__PURE__ */ (0,
|
|
3545
|
-
/* @__PURE__ */ (0,
|
|
3631
|
+
var ModalContent = React28.forwardRef(({ className, size, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(DialogPrimitive.Portal, { children: [
|
|
3632
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ModalOverlay, {}),
|
|
3633
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3546
3634
|
DialogPrimitive.Content,
|
|
3547
3635
|
{
|
|
3548
3636
|
ref,
|
|
@@ -3553,8 +3641,8 @@ var ModalContent = React27.forwardRef(({ className, size, children, ...props },
|
|
|
3553
3641
|
)
|
|
3554
3642
|
] }));
|
|
3555
3643
|
ModalContent.displayName = "ModalContent";
|
|
3556
|
-
var ModalHeader =
|
|
3557
|
-
({ className, showBorder = true, onClose, children, ...props }, ref) => /* @__PURE__ */ (0,
|
|
3644
|
+
var ModalHeader = React28.forwardRef(
|
|
3645
|
+
({ className, showBorder = true, onClose, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
3558
3646
|
"div",
|
|
3559
3647
|
{
|
|
3560
3648
|
ref,
|
|
@@ -3565,15 +3653,15 @@ var ModalHeader = React27.forwardRef(
|
|
|
3565
3653
|
),
|
|
3566
3654
|
...props,
|
|
3567
3655
|
children: [
|
|
3568
|
-
/* @__PURE__ */ (0,
|
|
3569
|
-
onClose && /* @__PURE__ */ (0,
|
|
3656
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "flex flex-1 flex-col gap-2xs", children }),
|
|
3657
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DialogPrimitive.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3570
3658
|
"button",
|
|
3571
3659
|
{
|
|
3572
3660
|
type: "button",
|
|
3573
3661
|
onClick: onClose,
|
|
3574
3662
|
className: "inline-flex shrink-0 items-center justify-center p-xs rounded-base text-modal-header-close hover:bg-black/5 transition-colors cursor-pointer",
|
|
3575
3663
|
"aria-label": "Close",
|
|
3576
|
-
children: /* @__PURE__ */ (0,
|
|
3664
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_icons19.Icon, { icon: import_icons19.faXmarkSolid, size: "sm" })
|
|
3577
3665
|
}
|
|
3578
3666
|
) })
|
|
3579
3667
|
]
|
|
@@ -3581,7 +3669,7 @@ var ModalHeader = React27.forwardRef(
|
|
|
3581
3669
|
)
|
|
3582
3670
|
);
|
|
3583
3671
|
ModalHeader.displayName = "ModalHeader";
|
|
3584
|
-
var ModalTitle =
|
|
3672
|
+
var ModalTitle = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3585
3673
|
DialogPrimitive.Title,
|
|
3586
3674
|
{
|
|
3587
3675
|
ref,
|
|
@@ -3590,7 +3678,7 @@ var ModalTitle = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
3590
3678
|
}
|
|
3591
3679
|
));
|
|
3592
3680
|
ModalTitle.displayName = "ModalTitle";
|
|
3593
|
-
var ModalDescription =
|
|
3681
|
+
var ModalDescription = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3594
3682
|
DialogPrimitive.Description,
|
|
3595
3683
|
{
|
|
3596
3684
|
ref,
|
|
@@ -3599,7 +3687,7 @@ var ModalDescription = React27.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
3599
3687
|
}
|
|
3600
3688
|
));
|
|
3601
3689
|
ModalDescription.displayName = "ModalDescription";
|
|
3602
|
-
var ModalBody =
|
|
3690
|
+
var ModalBody = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3603
3691
|
"div",
|
|
3604
3692
|
{
|
|
3605
3693
|
ref,
|
|
@@ -3608,8 +3696,8 @@ var ModalBody = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
3608
3696
|
}
|
|
3609
3697
|
));
|
|
3610
3698
|
ModalBody.displayName = "ModalBody";
|
|
3611
|
-
var ModalFooter =
|
|
3612
|
-
({ className, showBorder = true, infoMessage, children, ...props }, ref) => /* @__PURE__ */ (0,
|
|
3699
|
+
var ModalFooter = React28.forwardRef(
|
|
3700
|
+
({ className, showBorder = true, infoMessage, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
3613
3701
|
"div",
|
|
3614
3702
|
{
|
|
3615
3703
|
ref,
|
|
@@ -3620,9 +3708,9 @@ var ModalFooter = React27.forwardRef(
|
|
|
3620
3708
|
),
|
|
3621
3709
|
...props,
|
|
3622
3710
|
children: [
|
|
3623
|
-
infoMessage && /* @__PURE__ */ (0,
|
|
3624
|
-
/* @__PURE__ */ (0,
|
|
3625
|
-
/* @__PURE__ */ (0,
|
|
3711
|
+
infoMessage && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-1 items-center gap-base", children: [
|
|
3712
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_icons19.Icon, { icon: import_icons19.faCircleInfoSolid, size: "sm", className: "shrink-0 text-modal-footer-icon" }),
|
|
3713
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "text-sm font-regular leading-sm text-modal-footer-text", children: infoMessage })
|
|
3626
3714
|
] }),
|
|
3627
3715
|
children
|
|
3628
3716
|
]
|
|
@@ -3632,9 +3720,9 @@ var ModalFooter = React27.forwardRef(
|
|
|
3632
3720
|
ModalFooter.displayName = "ModalFooter";
|
|
3633
3721
|
|
|
3634
3722
|
// src/components/ui/dialog.tsx
|
|
3635
|
-
var
|
|
3636
|
-
var
|
|
3637
|
-
var Dialog =
|
|
3723
|
+
var React29 = __toESM(require("react"));
|
|
3724
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
3725
|
+
var Dialog = React29.forwardRef(
|
|
3638
3726
|
({
|
|
3639
3727
|
open,
|
|
3640
3728
|
onOpenChange,
|
|
@@ -3651,16 +3739,16 @@ var Dialog = React28.forwardRef(
|
|
|
3651
3739
|
className
|
|
3652
3740
|
}, ref) => {
|
|
3653
3741
|
const handleCancel = onCancel ?? (() => onOpenChange?.(false));
|
|
3654
|
-
return /* @__PURE__ */ (0,
|
|
3655
|
-
/* @__PURE__ */ (0,
|
|
3656
|
-
/* @__PURE__ */ (0,
|
|
3657
|
-
description && /* @__PURE__ */ (0,
|
|
3742
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Modal, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(ModalContent, { size: "sm", ref, className, children: [
|
|
3743
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(ModalHeader, { showBorder: false, onClose: handleCancel, children: [
|
|
3744
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ModalTitle, { children: title }),
|
|
3745
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ModalDescription, { children: description })
|
|
3658
3746
|
] }),
|
|
3659
|
-
/* @__PURE__ */ (0,
|
|
3660
|
-
/* @__PURE__ */ (0,
|
|
3661
|
-
/* @__PURE__ */ (0,
|
|
3662
|
-
secondaryLabel && /* @__PURE__ */ (0,
|
|
3663
|
-
/* @__PURE__ */ (0,
|
|
3747
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(ModalFooter, { children: [
|
|
3748
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ModalClose, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Button, { appearance: "ghost", intent: "brand", size: "md", onClick: handleCancel, children: cancelLabel }) }),
|
|
3749
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex items-center gap-md", children: [
|
|
3750
|
+
secondaryLabel && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Button, { appearance: "outlined", intent: "brand", size: "md", onClick: onSecondaryAction, children: secondaryLabel }),
|
|
3751
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3664
3752
|
Button,
|
|
3665
3753
|
{
|
|
3666
3754
|
appearance: "solid",
|
|
@@ -3679,10 +3767,10 @@ var Dialog = React28.forwardRef(
|
|
|
3679
3767
|
Dialog.displayName = "Dialog";
|
|
3680
3768
|
|
|
3681
3769
|
// src/components/ui/empty-state.tsx
|
|
3682
|
-
var
|
|
3770
|
+
var React30 = __toESM(require("react"));
|
|
3683
3771
|
var import_class_variance_authority18 = require("class-variance-authority");
|
|
3684
3772
|
var import_icons20 = require("@l3mpire/icons");
|
|
3685
|
-
var
|
|
3773
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
3686
3774
|
var emptyStateVariants = (0, import_class_variance_authority18.cva)(
|
|
3687
3775
|
"flex flex-col items-center text-center",
|
|
3688
3776
|
{
|
|
@@ -3715,7 +3803,7 @@ var iconContainerVariants2 = (0, import_class_variance_authority18.cva)(
|
|
|
3715
3803
|
}
|
|
3716
3804
|
}
|
|
3717
3805
|
);
|
|
3718
|
-
var EmptyState =
|
|
3806
|
+
var EmptyState = React30.forwardRef(
|
|
3719
3807
|
({
|
|
3720
3808
|
className,
|
|
3721
3809
|
size = "md",
|
|
@@ -3727,14 +3815,14 @@ var EmptyState = React29.forwardRef(
|
|
|
3727
3815
|
...props
|
|
3728
3816
|
}, ref) => {
|
|
3729
3817
|
const isMd = size === "md";
|
|
3730
|
-
return /* @__PURE__ */ (0,
|
|
3818
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
3731
3819
|
"div",
|
|
3732
3820
|
{
|
|
3733
3821
|
ref,
|
|
3734
3822
|
className: cn(emptyStateVariants({ size }), className),
|
|
3735
3823
|
...props,
|
|
3736
3824
|
children: [
|
|
3737
|
-
icon && /* @__PURE__ */ (0,
|
|
3825
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: iconContainerVariants2({ size }), children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
3738
3826
|
import_icons20.Icon,
|
|
3739
3827
|
{
|
|
3740
3828
|
icon,
|
|
@@ -3742,8 +3830,8 @@ var EmptyState = React29.forwardRef(
|
|
|
3742
3830
|
className: "text-table-cell-text-secondary"
|
|
3743
3831
|
}
|
|
3744
3832
|
) }),
|
|
3745
|
-
/* @__PURE__ */ (0,
|
|
3746
|
-
/* @__PURE__ */ (0,
|
|
3833
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex flex-col gap-xs w-full", children: [
|
|
3834
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
3747
3835
|
"p",
|
|
3748
3836
|
{
|
|
3749
3837
|
className: cn(
|
|
@@ -3753,7 +3841,7 @@ var EmptyState = React29.forwardRef(
|
|
|
3753
3841
|
children: title
|
|
3754
3842
|
}
|
|
3755
3843
|
),
|
|
3756
|
-
description && /* @__PURE__ */ (0,
|
|
3844
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
3757
3845
|
"p",
|
|
3758
3846
|
{
|
|
3759
3847
|
className: cn(
|
|
@@ -3764,7 +3852,7 @@ var EmptyState = React29.forwardRef(
|
|
|
3764
3852
|
}
|
|
3765
3853
|
)
|
|
3766
3854
|
] }),
|
|
3767
|
-
(primaryAction || secondaryAction) && /* @__PURE__ */ (0,
|
|
3855
|
+
(primaryAction || secondaryAction) && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
3768
3856
|
"div",
|
|
3769
3857
|
{
|
|
3770
3858
|
className: cn(
|
|
@@ -3772,7 +3860,7 @@ var EmptyState = React29.forwardRef(
|
|
|
3772
3860
|
isMd ? "gap-lg" : "gap-base"
|
|
3773
3861
|
),
|
|
3774
3862
|
children: [
|
|
3775
|
-
secondaryAction && /* @__PURE__ */ (0,
|
|
3863
|
+
secondaryAction && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
3776
3864
|
Button,
|
|
3777
3865
|
{
|
|
3778
3866
|
appearance: "outlined",
|
|
@@ -3782,7 +3870,7 @@ var EmptyState = React29.forwardRef(
|
|
|
3782
3870
|
children: secondaryAction.label
|
|
3783
3871
|
}
|
|
3784
3872
|
),
|
|
3785
|
-
primaryAction && /* @__PURE__ */ (0,
|
|
3873
|
+
primaryAction && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
3786
3874
|
Button,
|
|
3787
3875
|
{
|
|
3788
3876
|
appearance: "solid",
|
|
@@ -3803,8 +3891,8 @@ var EmptyState = React29.forwardRef(
|
|
|
3803
3891
|
EmptyState.displayName = "EmptyState";
|
|
3804
3892
|
|
|
3805
3893
|
// src/components/ui/table-cells.tsx
|
|
3806
|
-
var
|
|
3807
|
-
var
|
|
3894
|
+
var React31 = __toESM(require("react"));
|
|
3895
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
3808
3896
|
function getInitials(name) {
|
|
3809
3897
|
return name.split(" ").map((part) => part[0]).filter(Boolean).slice(0, 2).join("").toUpperCase();
|
|
3810
3898
|
}
|
|
@@ -3813,11 +3901,11 @@ var AvatarCell = ({
|
|
|
3813
3901
|
subtitle,
|
|
3814
3902
|
src,
|
|
3815
3903
|
className
|
|
3816
|
-
}) => /* @__PURE__ */ (0,
|
|
3817
|
-
/* @__PURE__ */ (0,
|
|
3818
|
-
/* @__PURE__ */ (0,
|
|
3819
|
-
/* @__PURE__ */ (0,
|
|
3820
|
-
subtitle && /* @__PURE__ */ (0,
|
|
3904
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: cn("flex items-center gap-md", className), children: [
|
|
3905
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Avatar, { initials: getInitials(name), src, alt: name, size: "lg", shape: "rounded" }),
|
|
3906
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-col", children: [
|
|
3907
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-sm font-medium text-table-cell-text-primary leading-sm", children: name }),
|
|
3908
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-xs font-regular text-table-cell-text-secondary leading-xs", children: subtitle })
|
|
3821
3909
|
] })
|
|
3822
3910
|
] });
|
|
3823
3911
|
AvatarCell.displayName = "AvatarCell";
|
|
@@ -3827,7 +3915,7 @@ var StatusCell = ({
|
|
|
3827
3915
|
type = "primary",
|
|
3828
3916
|
size = "sm",
|
|
3829
3917
|
className
|
|
3830
|
-
}) => /* @__PURE__ */ (0,
|
|
3918
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: cn("flex items-center", className), children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Badge, { variant, type, size, children: label }) });
|
|
3831
3919
|
StatusCell.displayName = "StatusCell";
|
|
3832
3920
|
var secondaryIntentColors = {
|
|
3833
3921
|
success: "text-badge-light-success-text",
|
|
@@ -3845,7 +3933,7 @@ var NumberCell = ({
|
|
|
3845
3933
|
className
|
|
3846
3934
|
}) => {
|
|
3847
3935
|
const formatted = typeof value === "number" && formatOptions ? new Intl.NumberFormat(locale, formatOptions).format(value) : String(value);
|
|
3848
|
-
return /* @__PURE__ */ (0,
|
|
3936
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
3849
3937
|
"div",
|
|
3850
3938
|
{
|
|
3851
3939
|
className: cn(
|
|
@@ -3854,8 +3942,8 @@ var NumberCell = ({
|
|
|
3854
3942
|
className
|
|
3855
3943
|
),
|
|
3856
3944
|
children: [
|
|
3857
|
-
/* @__PURE__ */ (0,
|
|
3858
|
-
secondaryStat && /* @__PURE__ */ (0,
|
|
3945
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "text-sm font-medium text-table-cell-text-primary", children: formatted }),
|
|
3946
|
+
secondaryStat && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3859
3947
|
"span",
|
|
3860
3948
|
{
|
|
3861
3949
|
className: cn(
|
|
@@ -3883,7 +3971,7 @@ var DateCell = ({
|
|
|
3883
3971
|
}) => {
|
|
3884
3972
|
const d = typeof date === "string" ? new Date(date) : date;
|
|
3885
3973
|
const formatted = d.toLocaleDateString(locale, format);
|
|
3886
|
-
return /* @__PURE__ */ (0,
|
|
3974
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3887
3975
|
"span",
|
|
3888
3976
|
{
|
|
3889
3977
|
className: cn(
|
|
@@ -3895,7 +3983,7 @@ var DateCell = ({
|
|
|
3895
3983
|
);
|
|
3896
3984
|
};
|
|
3897
3985
|
DateCell.displayName = "DateCell";
|
|
3898
|
-
var EmailCell = ({ email, className }) => /* @__PURE__ */ (0,
|
|
3986
|
+
var EmailCell = ({ email, className }) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3899
3987
|
Link,
|
|
3900
3988
|
{
|
|
3901
3989
|
intent: "neutral",
|
|
@@ -3911,13 +3999,13 @@ var LinkCell = ({
|
|
|
3911
3999
|
label,
|
|
3912
4000
|
target = "_blank",
|
|
3913
4001
|
className
|
|
3914
|
-
}) => /* @__PURE__ */ (0,
|
|
4002
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Link, { intent: "brand", size: "sm", href, target, className, children: label ?? href });
|
|
3915
4003
|
LinkCell.displayName = "LinkCell";
|
|
3916
4004
|
var TextCell = ({
|
|
3917
4005
|
value,
|
|
3918
4006
|
secondary = false,
|
|
3919
4007
|
className
|
|
3920
|
-
}) => /* @__PURE__ */ (0,
|
|
4008
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3921
4009
|
"span",
|
|
3922
4010
|
{
|
|
3923
4011
|
className: cn(
|
|
@@ -3933,20 +4021,20 @@ var ButtonCell = ({
|
|
|
3933
4021
|
className,
|
|
3934
4022
|
children,
|
|
3935
4023
|
...props
|
|
3936
|
-
}) => /* @__PURE__ */ (0,
|
|
4024
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: cn("flex items-center", className), children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Button, { size: "sm", appearance: "ghost", intent: "brand", ...props, children }) });
|
|
3937
4025
|
ButtonCell.displayName = "ButtonCell";
|
|
3938
4026
|
var EditableCell = ({
|
|
3939
4027
|
value,
|
|
3940
4028
|
onSave,
|
|
3941
4029
|
className
|
|
3942
4030
|
}) => {
|
|
3943
|
-
const [isEditing, setIsEditing] =
|
|
3944
|
-
const [draft, setDraft] =
|
|
3945
|
-
const inputRef =
|
|
3946
|
-
|
|
4031
|
+
const [isEditing, setIsEditing] = React31.useState(false);
|
|
4032
|
+
const [draft, setDraft] = React31.useState(value);
|
|
4033
|
+
const inputRef = React31.useRef(null);
|
|
4034
|
+
React31.useEffect(() => {
|
|
3947
4035
|
setDraft(value);
|
|
3948
4036
|
}, [value]);
|
|
3949
|
-
|
|
4037
|
+
React31.useEffect(() => {
|
|
3950
4038
|
if (isEditing) {
|
|
3951
4039
|
inputRef.current?.focus();
|
|
3952
4040
|
inputRef.current?.select();
|
|
@@ -3966,7 +4054,7 @@ var EditableCell = ({
|
|
|
3966
4054
|
}
|
|
3967
4055
|
};
|
|
3968
4056
|
if (isEditing) {
|
|
3969
|
-
return /* @__PURE__ */ (0,
|
|
4057
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3970
4058
|
"input",
|
|
3971
4059
|
{
|
|
3972
4060
|
ref: inputRef,
|
|
@@ -3982,7 +4070,7 @@ var EditableCell = ({
|
|
|
3982
4070
|
}
|
|
3983
4071
|
);
|
|
3984
4072
|
}
|
|
3985
|
-
return /* @__PURE__ */ (0,
|
|
4073
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3986
4074
|
"span",
|
|
3987
4075
|
{
|
|
3988
4076
|
role: "button",
|
|
@@ -4004,7 +4092,7 @@ var EditableCell = ({
|
|
|
4004
4092
|
);
|
|
4005
4093
|
};
|
|
4006
4094
|
EditableCell.displayName = "EditableCell";
|
|
4007
|
-
var RowActions = ({ children, className }) => /* @__PURE__ */ (0,
|
|
4095
|
+
var RowActions = ({ children, className }) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
4008
4096
|
"div",
|
|
4009
4097
|
{
|
|
4010
4098
|
className: cn(
|
|
@@ -4018,7 +4106,7 @@ var RowActions = ({ children, className }) => /* @__PURE__ */ (0, import_jsx_run
|
|
|
4018
4106
|
RowActions.displayName = "RowActions";
|
|
4019
4107
|
|
|
4020
4108
|
// src/components/ui/data-table.tsx
|
|
4021
|
-
var
|
|
4109
|
+
var React33 = __toESM(require("react"));
|
|
4022
4110
|
var import_react_table = require("@tanstack/react-table");
|
|
4023
4111
|
var import_core = require("@dnd-kit/core");
|
|
4024
4112
|
var import_sortable = require("@dnd-kit/sortable");
|
|
@@ -4027,9 +4115,9 @@ var import_icons21 = require("@l3mpire/icons");
|
|
|
4027
4115
|
var PopoverPrimitive2 = __toESM(require("@radix-ui/react-popover"));
|
|
4028
4116
|
|
|
4029
4117
|
// src/components/ui/table.tsx
|
|
4030
|
-
var
|
|
4031
|
-
var
|
|
4032
|
-
var Table =
|
|
4118
|
+
var React32 = __toESM(require("react"));
|
|
4119
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
4120
|
+
var Table = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4033
4121
|
"table",
|
|
4034
4122
|
{
|
|
4035
4123
|
ref,
|
|
@@ -4038,7 +4126,7 @@ var Table = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
4038
4126
|
}
|
|
4039
4127
|
) }));
|
|
4040
4128
|
Table.displayName = "Table";
|
|
4041
|
-
var TableHeader =
|
|
4129
|
+
var TableHeader = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4042
4130
|
"thead",
|
|
4043
4131
|
{
|
|
4044
4132
|
ref,
|
|
@@ -4047,9 +4135,9 @@ var TableHeader = React31.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
4047
4135
|
}
|
|
4048
4136
|
));
|
|
4049
4137
|
TableHeader.displayName = "TableHeader";
|
|
4050
|
-
var TableBody =
|
|
4138
|
+
var TableBody = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("tbody", { ref, className: cn("[&_tr:last-child_td]:border-b-0", className), ...props }));
|
|
4051
4139
|
TableBody.displayName = "TableBody";
|
|
4052
|
-
var TableFooter =
|
|
4140
|
+
var TableFooter = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4053
4141
|
"tfoot",
|
|
4054
4142
|
{
|
|
4055
4143
|
ref,
|
|
@@ -4061,7 +4149,7 @@ var TableFooter = React31.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
4061
4149
|
}
|
|
4062
4150
|
));
|
|
4063
4151
|
TableFooter.displayName = "TableFooter";
|
|
4064
|
-
var TableRow =
|
|
4152
|
+
var TableRow = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4065
4153
|
"tr",
|
|
4066
4154
|
{
|
|
4067
4155
|
ref,
|
|
@@ -4075,7 +4163,7 @@ var TableRow = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
4075
4163
|
}
|
|
4076
4164
|
));
|
|
4077
4165
|
TableRow.displayName = "TableRow";
|
|
4078
|
-
var TableHead =
|
|
4166
|
+
var TableHead = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4079
4167
|
"th",
|
|
4080
4168
|
{
|
|
4081
4169
|
ref,
|
|
@@ -4091,7 +4179,7 @@ var TableHead = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
4091
4179
|
}
|
|
4092
4180
|
));
|
|
4093
4181
|
TableHead.displayName = "TableHead";
|
|
4094
|
-
var TableCell =
|
|
4182
|
+
var TableCell = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4095
4183
|
"td",
|
|
4096
4184
|
{
|
|
4097
4185
|
ref,
|
|
@@ -4106,7 +4194,7 @@ var TableCell = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
4106
4194
|
}
|
|
4107
4195
|
));
|
|
4108
4196
|
TableCell.displayName = "TableCell";
|
|
4109
|
-
var TableCaption =
|
|
4197
|
+
var TableCaption = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4110
4198
|
"caption",
|
|
4111
4199
|
{
|
|
4112
4200
|
ref,
|
|
@@ -4117,7 +4205,7 @@ var TableCaption = React31.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
4117
4205
|
TableCaption.displayName = "TableCaption";
|
|
4118
4206
|
|
|
4119
4207
|
// src/components/ui/data-table.tsx
|
|
4120
|
-
var
|
|
4208
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
4121
4209
|
var filterOperatorsByType = {
|
|
4122
4210
|
string: [
|
|
4123
4211
|
{ value: "contains", label: "Contains" },
|
|
@@ -4167,12 +4255,12 @@ function ColumnFilterPopover({
|
|
|
4167
4255
|
children
|
|
4168
4256
|
}) {
|
|
4169
4257
|
const operators = filterOperatorsByType[filterType] ?? filterOperatorsByType.string;
|
|
4170
|
-
const [operator, setOperator] =
|
|
4258
|
+
const [operator, setOperator] = React33.useState(
|
|
4171
4259
|
operators[0].value
|
|
4172
4260
|
);
|
|
4173
|
-
const [inputValue, setInputValue] =
|
|
4174
|
-
const [open, setOpen] =
|
|
4175
|
-
|
|
4261
|
+
const [inputValue, setInputValue] = React33.useState("");
|
|
4262
|
+
const [open, setOpen] = React33.useState(false);
|
|
4263
|
+
React33.useEffect(() => {
|
|
4176
4264
|
if (open && filterValue && typeof filterValue === "object") {
|
|
4177
4265
|
const fv = filterValue;
|
|
4178
4266
|
if (fv.operator) setOperator(fv.operator);
|
|
@@ -4182,9 +4270,9 @@ function ColumnFilterPopover({
|
|
|
4182
4270
|
setInputValue("");
|
|
4183
4271
|
}
|
|
4184
4272
|
}, [open, filterValue, operators]);
|
|
4185
|
-
return /* @__PURE__ */ (0,
|
|
4186
|
-
/* @__PURE__ */ (0,
|
|
4187
|
-
/* @__PURE__ */ (0,
|
|
4273
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(PopoverPrimitive2.Root, { open, onOpenChange: setOpen, children: [
|
|
4274
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(PopoverPrimitive2.Trigger, { asChild: true, children }),
|
|
4275
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(PopoverPrimitive2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4188
4276
|
PopoverPrimitive2.Content,
|
|
4189
4277
|
{
|
|
4190
4278
|
align: "start",
|
|
@@ -4194,9 +4282,9 @@ function ColumnFilterPopover({
|
|
|
4194
4282
|
"animate-in fade-in-0 zoom-in-95"
|
|
4195
4283
|
),
|
|
4196
4284
|
onClick: (e) => e.stopPropagation(),
|
|
4197
|
-
children: /* @__PURE__ */ (0,
|
|
4198
|
-
/* @__PURE__ */ (0,
|
|
4199
|
-
/* @__PURE__ */ (0,
|
|
4285
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex flex-col gap-sm", children: [
|
|
4286
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-xs font-medium text-table-head-text", children: "Filter" }),
|
|
4287
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4200
4288
|
"select",
|
|
4201
4289
|
{
|
|
4202
4290
|
className: cn(
|
|
@@ -4206,10 +4294,10 @@ function ColumnFilterPopover({
|
|
|
4206
4294
|
),
|
|
4207
4295
|
value: operator,
|
|
4208
4296
|
onChange: (e) => setOperator(e.target.value),
|
|
4209
|
-
children: operators.map((op) => /* @__PURE__ */ (0,
|
|
4297
|
+
children: operators.map((op) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("option", { value: op.value, children: op.label }, op.value))
|
|
4210
4298
|
}
|
|
4211
4299
|
),
|
|
4212
|
-
!noValueOperators.has(operator) && /* @__PURE__ */ (0,
|
|
4300
|
+
!noValueOperators.has(operator) && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4213
4301
|
"input",
|
|
4214
4302
|
{
|
|
4215
4303
|
type: filterType === "number" ? "number" : filterType === "date" ? "date" : "text",
|
|
@@ -4229,8 +4317,8 @@ function ColumnFilterPopover({
|
|
|
4229
4317
|
}
|
|
4230
4318
|
}
|
|
4231
4319
|
),
|
|
4232
|
-
/* @__PURE__ */ (0,
|
|
4233
|
-
/* @__PURE__ */ (0,
|
|
4320
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center justify-end gap-xs pt-xs", children: [
|
|
4321
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4234
4322
|
Button,
|
|
4235
4323
|
{
|
|
4236
4324
|
appearance: "ghost",
|
|
@@ -4243,7 +4331,7 @@ function ColumnFilterPopover({
|
|
|
4243
4331
|
children: "Clear"
|
|
4244
4332
|
}
|
|
4245
4333
|
),
|
|
4246
|
-
/* @__PURE__ */ (0,
|
|
4334
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4247
4335
|
Button,
|
|
4248
4336
|
{
|
|
4249
4337
|
appearance: "solid",
|
|
@@ -4276,7 +4364,7 @@ function DraggableHeaderCell({
|
|
|
4276
4364
|
const leadingIcon = meta?.icon;
|
|
4277
4365
|
const canDrag = isDragEnabled && meta?.enableDrag !== false;
|
|
4278
4366
|
const filterType = meta?.filterType ?? "string";
|
|
4279
|
-
const [isHovered, setIsHovered] =
|
|
4367
|
+
const [isHovered, setIsHovered] = React33.useState(false);
|
|
4280
4368
|
const {
|
|
4281
4369
|
attributes,
|
|
4282
4370
|
listeners,
|
|
@@ -4298,7 +4386,7 @@ function DraggableHeaderCell({
|
|
|
4298
4386
|
opacity: isDragging ? 0.5 : 1,
|
|
4299
4387
|
zIndex: isDragging ? 1 : void 0
|
|
4300
4388
|
};
|
|
4301
|
-
return /* @__PURE__ */ (0,
|
|
4389
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
4302
4390
|
TableHead,
|
|
4303
4391
|
{
|
|
4304
4392
|
ref: setNodeRef,
|
|
@@ -4312,15 +4400,15 @@ function DraggableHeaderCell({
|
|
|
4312
4400
|
onMouseEnter: () => setIsHovered(true),
|
|
4313
4401
|
onMouseLeave: () => setIsHovered(false),
|
|
4314
4402
|
children: [
|
|
4315
|
-
/* @__PURE__ */ (0,
|
|
4316
|
-
leadingIcon && (canDrag ? /* @__PURE__ */ (0,
|
|
4403
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center gap-xs", children: [
|
|
4404
|
+
leadingIcon && (canDrag ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4317
4405
|
"div",
|
|
4318
4406
|
{
|
|
4319
4407
|
...attributes,
|
|
4320
4408
|
...listeners,
|
|
4321
4409
|
className: "shrink-0 flex items-center cursor-grab",
|
|
4322
4410
|
onClick: (e) => e.stopPropagation(),
|
|
4323
|
-
children: /* @__PURE__ */ (0,
|
|
4411
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4324
4412
|
import_icons21.Icon,
|
|
4325
4413
|
{
|
|
4326
4414
|
icon: isHovered ? import_icons21.faGripDotsVerticalSolid : leadingIcon,
|
|
@@ -4329,7 +4417,7 @@ function DraggableHeaderCell({
|
|
|
4329
4417
|
}
|
|
4330
4418
|
)
|
|
4331
4419
|
}
|
|
4332
|
-
) : /* @__PURE__ */ (0,
|
|
4420
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4333
4421
|
import_icons21.Icon,
|
|
4334
4422
|
{
|
|
4335
4423
|
icon: leadingIcon,
|
|
@@ -4337,14 +4425,14 @@ function DraggableHeaderCell({
|
|
|
4337
4425
|
className: "shrink-0 text-table-head-icon"
|
|
4338
4426
|
}
|
|
4339
4427
|
)),
|
|
4340
|
-
!leadingIcon && canDrag && isHovered && /* @__PURE__ */ (0,
|
|
4428
|
+
!leadingIcon && canDrag && isHovered && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4341
4429
|
"div",
|
|
4342
4430
|
{
|
|
4343
4431
|
...attributes,
|
|
4344
4432
|
...listeners,
|
|
4345
4433
|
className: "shrink-0 flex items-center cursor-grab",
|
|
4346
4434
|
onClick: (e) => e.stopPropagation(),
|
|
4347
|
-
children: /* @__PURE__ */ (0,
|
|
4435
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4348
4436
|
import_icons21.Icon,
|
|
4349
4437
|
{
|
|
4350
4438
|
icon: import_icons21.faGripDotsVerticalSolid,
|
|
@@ -4354,11 +4442,11 @@ function DraggableHeaderCell({
|
|
|
4354
4442
|
)
|
|
4355
4443
|
}
|
|
4356
4444
|
),
|
|
4357
|
-
/* @__PURE__ */ (0,
|
|
4445
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "flex-1 truncate", children: header.isPlaceholder ? null : (0, import_react_table.flexRender)(
|
|
4358
4446
|
header.column.columnDef.header,
|
|
4359
4447
|
header.getContext()
|
|
4360
4448
|
) }),
|
|
4361
|
-
canSort && (isSorted || isHovered) && /* @__PURE__ */ (0,
|
|
4449
|
+
canSort && (isSorted || isHovered) && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4362
4450
|
import_icons21.Icon,
|
|
4363
4451
|
{
|
|
4364
4452
|
icon: isSorted === "asc" ? import_icons21.faSortUpSolid : isSorted === "desc" ? import_icons21.faSortDownSolid : import_icons21.faSortSolid,
|
|
@@ -4366,20 +4454,20 @@ function DraggableHeaderCell({
|
|
|
4366
4454
|
className: "shrink-0 text-table-head-icon"
|
|
4367
4455
|
}
|
|
4368
4456
|
),
|
|
4369
|
-
enableFiltering && (isFiltered || isHovered) && /* @__PURE__ */ (0,
|
|
4457
|
+
enableFiltering && (isFiltered || isHovered) && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4370
4458
|
ColumnFilterPopover,
|
|
4371
4459
|
{
|
|
4372
4460
|
filterType,
|
|
4373
4461
|
filterValue: header.column.getFilterValue(),
|
|
4374
4462
|
onApply: (val) => header.column.setFilterValue(val),
|
|
4375
4463
|
onClear: () => header.column.setFilterValue(void 0),
|
|
4376
|
-
children: /* @__PURE__ */ (0,
|
|
4464
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4377
4465
|
"button",
|
|
4378
4466
|
{
|
|
4379
4467
|
type: "button",
|
|
4380
4468
|
onClick: (e) => e.stopPropagation(),
|
|
4381
4469
|
className: "shrink-0 p-0 border-0 bg-transparent cursor-pointer",
|
|
4382
|
-
children: /* @__PURE__ */ (0,
|
|
4470
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4383
4471
|
import_icons21.Icon,
|
|
4384
4472
|
{
|
|
4385
4473
|
icon: isFiltered ? import_icons21.faFilterSolid : import_icons21.faFilterOutline,
|
|
@@ -4392,7 +4480,7 @@ function DraggableHeaderCell({
|
|
|
4392
4480
|
}
|
|
4393
4481
|
)
|
|
4394
4482
|
] }),
|
|
4395
|
-
enableColumnResizing && header.column.getCanResize() && /* @__PURE__ */ (0,
|
|
4483
|
+
enableColumnResizing && header.column.getCanResize() && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4396
4484
|
"div",
|
|
4397
4485
|
{
|
|
4398
4486
|
onMouseDown: header.getResizeHandler(),
|
|
@@ -4510,17 +4598,17 @@ function DataTableInner({
|
|
|
4510
4598
|
emptyMessage = "No results.",
|
|
4511
4599
|
bordered = false
|
|
4512
4600
|
}) {
|
|
4513
|
-
const [internalSorting, setInternalSorting] =
|
|
4514
|
-
const [internalColumnFilters, setInternalColumnFilters] =
|
|
4515
|
-
const [internalPagination, setInternalPagination] =
|
|
4516
|
-
const [internalRowSelection, setInternalRowSelection] =
|
|
4517
|
-
const [internalColumnVisibility, setInternalColumnVisibility] =
|
|
4518
|
-
const [internalColumnOrder, setInternalColumnOrder] =
|
|
4519
|
-
const [internalColumnPinning, setInternalColumnPinning] =
|
|
4520
|
-
const [internalColumnSizing, setInternalColumnSizing] =
|
|
4601
|
+
const [internalSorting, setInternalSorting] = React33.useState([]);
|
|
4602
|
+
const [internalColumnFilters, setInternalColumnFilters] = React33.useState([]);
|
|
4603
|
+
const [internalPagination, setInternalPagination] = React33.useState({ pageIndex: 0, pageSize: 10 });
|
|
4604
|
+
const [internalRowSelection, setInternalRowSelection] = React33.useState({});
|
|
4605
|
+
const [internalColumnVisibility, setInternalColumnVisibility] = React33.useState({});
|
|
4606
|
+
const [internalColumnOrder, setInternalColumnOrder] = React33.useState([]);
|
|
4607
|
+
const [internalColumnPinning, setInternalColumnPinning] = React33.useState({});
|
|
4608
|
+
const [internalColumnSizing, setInternalColumnSizing] = React33.useState({});
|
|
4521
4609
|
const columnOrder = columnOrderProp ?? internalColumnOrder;
|
|
4522
4610
|
const setColumnOrder = onColumnOrderChange ?? setInternalColumnOrder;
|
|
4523
|
-
|
|
4611
|
+
React33.useEffect(() => {
|
|
4524
4612
|
if (enableColumnDrag && columnOrder.length === 0) {
|
|
4525
4613
|
const ids = columns.map((c) => {
|
|
4526
4614
|
if ("accessorKey" in c && c.accessorKey) return String(c.accessorKey);
|
|
@@ -4614,7 +4702,7 @@ function DataTableInner({
|
|
|
4614
4702
|
}),
|
|
4615
4703
|
(0, import_core.useSensor)(import_core.KeyboardSensor)
|
|
4616
4704
|
);
|
|
4617
|
-
const handleDragEnd =
|
|
4705
|
+
const handleDragEnd = React33.useCallback(
|
|
4618
4706
|
(event) => {
|
|
4619
4707
|
const { active, over } = event;
|
|
4620
4708
|
if (!over || active.id === over.id) return;
|
|
@@ -4628,12 +4716,12 @@ function DataTableInner({
|
|
|
4628
4716
|
},
|
|
4629
4717
|
[table, setColumnOrder]
|
|
4630
4718
|
);
|
|
4631
|
-
const columnIds =
|
|
4719
|
+
const columnIds = React33.useMemo(
|
|
4632
4720
|
() => table.getAllLeafColumns().map((c) => c.id),
|
|
4633
4721
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4634
4722
|
[table.getAllLeafColumns().length, columnOrder]
|
|
4635
4723
|
);
|
|
4636
|
-
const columnSizeVars =
|
|
4724
|
+
const columnSizeVars = React33.useMemo(() => {
|
|
4637
4725
|
if (!enableColumnResizing) return {};
|
|
4638
4726
|
const headers = table.getFlatHeaders();
|
|
4639
4727
|
const vars = {};
|
|
@@ -4644,23 +4732,23 @@ function DataTableInner({
|
|
|
4644
4732
|
return vars;
|
|
4645
4733
|
}, [enableColumnResizing, table.getState().columnSizing]);
|
|
4646
4734
|
const totalSize = enableColumnResizing ? table.getTotalSize() : void 0;
|
|
4647
|
-
const tableContent = /* @__PURE__ */ (0,
|
|
4648
|
-
/* @__PURE__ */ (0,
|
|
4735
|
+
const tableContent = /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: cn("w-full", className), style: columnSizeVars, children: [
|
|
4736
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
4649
4737
|
Table,
|
|
4650
4738
|
{
|
|
4651
4739
|
style: totalSize ? { width: totalSize, tableLayout: "fixed" } : void 0,
|
|
4652
4740
|
className: totalSize ? "w-auto" : void 0,
|
|
4653
4741
|
children: [
|
|
4654
|
-
/* @__PURE__ */ (0,
|
|
4742
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4655
4743
|
TableHeader,
|
|
4656
4744
|
{
|
|
4657
4745
|
className: cn(bordered && "border-t border-table-border"),
|
|
4658
|
-
children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0,
|
|
4746
|
+
children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TableRow, { children: enableColumnDrag ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4659
4747
|
import_sortable.SortableContext,
|
|
4660
4748
|
{
|
|
4661
4749
|
items: columnIds,
|
|
4662
4750
|
strategy: import_sortable.horizontalListSortingStrategy,
|
|
4663
|
-
children: headerGroup.headers.map((header) => /* @__PURE__ */ (0,
|
|
4751
|
+
children: headerGroup.headers.map((header) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4664
4752
|
DraggableHeaderCell,
|
|
4665
4753
|
{
|
|
4666
4754
|
header,
|
|
@@ -4672,7 +4760,7 @@ function DataTableInner({
|
|
|
4672
4760
|
header.id
|
|
4673
4761
|
))
|
|
4674
4762
|
}
|
|
4675
|
-
) : headerGroup.headers.map((header) => /* @__PURE__ */ (0,
|
|
4763
|
+
) : headerGroup.headers.map((header) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4676
4764
|
DraggableHeaderCell,
|
|
4677
4765
|
{
|
|
4678
4766
|
header,
|
|
@@ -4685,11 +4773,11 @@ function DataTableInner({
|
|
|
4685
4773
|
)) }, headerGroup.id))
|
|
4686
4774
|
}
|
|
4687
4775
|
),
|
|
4688
|
-
/* @__PURE__ */ (0,
|
|
4776
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TableBody, { children: table.getRowModel().rows?.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4689
4777
|
TableRow,
|
|
4690
4778
|
{
|
|
4691
4779
|
"data-state": row.getIsSelected() ? "selected" : void 0,
|
|
4692
|
-
children: row.getVisibleCells().map((cell) => /* @__PURE__ */ (0,
|
|
4780
|
+
children: row.getVisibleCells().map((cell) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4693
4781
|
TableCell,
|
|
4694
4782
|
{
|
|
4695
4783
|
style: enableColumnResizing ? { width: `var(--col-${cell.column.id}-size)` } : void 0,
|
|
@@ -4703,12 +4791,12 @@ function DataTableInner({
|
|
|
4703
4791
|
))
|
|
4704
4792
|
},
|
|
4705
4793
|
row.id
|
|
4706
|
-
)) : /* @__PURE__ */ (0,
|
|
4794
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TableRow, { className: "hover:bg-transparent", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4707
4795
|
TableCell,
|
|
4708
4796
|
{
|
|
4709
4797
|
colSpan: columns.length,
|
|
4710
4798
|
className: "h-48 text-center border-b-0",
|
|
4711
|
-
children: emptyState ?? /* @__PURE__ */ (0,
|
|
4799
|
+
children: emptyState ?? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-sm text-table-cell-text-secondary", children: emptyMessage })
|
|
4712
4800
|
}
|
|
4713
4801
|
) }) })
|
|
4714
4802
|
]
|
|
@@ -4717,7 +4805,7 @@ function DataTableInner({
|
|
|
4717
4805
|
children?.(table)
|
|
4718
4806
|
] });
|
|
4719
4807
|
if (enableColumnDrag) {
|
|
4720
|
-
return /* @__PURE__ */ (0,
|
|
4808
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4721
4809
|
import_core.DndContext,
|
|
4722
4810
|
{
|
|
4723
4811
|
sensors,
|
|
@@ -4738,7 +4826,7 @@ function DataTablePagination({
|
|
|
4738
4826
|
const totalCount = table.getFilteredRowModel().rows.length;
|
|
4739
4827
|
const pageIndex = table.getState().pagination.pageIndex;
|
|
4740
4828
|
const pageCount = table.getPageCount();
|
|
4741
|
-
return /* @__PURE__ */ (0,
|
|
4829
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
4742
4830
|
"div",
|
|
4743
4831
|
{
|
|
4744
4832
|
className: cn(
|
|
@@ -4746,16 +4834,16 @@ function DataTablePagination({
|
|
|
4746
4834
|
className
|
|
4747
4835
|
),
|
|
4748
4836
|
children: [
|
|
4749
|
-
/* @__PURE__ */ (0,
|
|
4837
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "text-xs text-table-cell-text-secondary", children: selectedCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("span", { children: [
|
|
4750
4838
|
selectedCount,
|
|
4751
4839
|
" of ",
|
|
4752
4840
|
totalCount,
|
|
4753
4841
|
" row(s) selected"
|
|
4754
4842
|
] }) }),
|
|
4755
|
-
/* @__PURE__ */ (0,
|
|
4756
|
-
/* @__PURE__ */ (0,
|
|
4757
|
-
/* @__PURE__ */ (0,
|
|
4758
|
-
/* @__PURE__ */ (0,
|
|
4843
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center gap-lg", children: [
|
|
4844
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center gap-sm", children: [
|
|
4845
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-xs text-table-cell-text-secondary whitespace-nowrap", children: "Rows per page" }),
|
|
4846
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4759
4847
|
"select",
|
|
4760
4848
|
{
|
|
4761
4849
|
className: cn(
|
|
@@ -4765,18 +4853,18 @@ function DataTablePagination({
|
|
|
4765
4853
|
),
|
|
4766
4854
|
value: table.getState().pagination.pageSize,
|
|
4767
4855
|
onChange: (e) => table.setPageSize(Number(e.target.value)),
|
|
4768
|
-
children: pageSizeOptions.map((size) => /* @__PURE__ */ (0,
|
|
4856
|
+
children: pageSizeOptions.map((size) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("option", { value: size, children: size }, size))
|
|
4769
4857
|
}
|
|
4770
4858
|
)
|
|
4771
4859
|
] }),
|
|
4772
|
-
/* @__PURE__ */ (0,
|
|
4860
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("span", { className: "text-xs text-table-cell-text-secondary whitespace-nowrap", children: [
|
|
4773
4861
|
"Page ",
|
|
4774
4862
|
pageIndex + 1,
|
|
4775
4863
|
" of ",
|
|
4776
4864
|
pageCount
|
|
4777
4865
|
] }),
|
|
4778
|
-
/* @__PURE__ */ (0,
|
|
4779
|
-
/* @__PURE__ */ (0,
|
|
4866
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center gap-xs", children: [
|
|
4867
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4780
4868
|
Button,
|
|
4781
4869
|
{
|
|
4782
4870
|
appearance: "outlined",
|
|
@@ -4788,7 +4876,7 @@ function DataTablePagination({
|
|
|
4788
4876
|
"aria-label": "Previous page"
|
|
4789
4877
|
}
|
|
4790
4878
|
),
|
|
4791
|
-
/* @__PURE__ */ (0,
|
|
4879
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
4792
4880
|
Button,
|
|
4793
4881
|
{
|
|
4794
4882
|
appearance: "outlined",
|
|
@@ -4810,15 +4898,15 @@ var DataTable = Object.assign(DataTableInner, { displayName: "DataTable" });
|
|
|
4810
4898
|
Object.assign(DataTablePagination, { displayName: "DataTablePagination" });
|
|
4811
4899
|
|
|
4812
4900
|
// src/components/ui/side-panel.tsx
|
|
4813
|
-
var
|
|
4901
|
+
var React34 = __toESM(require("react"));
|
|
4814
4902
|
var DialogPrimitive2 = __toESM(require("@radix-ui/react-dialog"));
|
|
4815
|
-
var
|
|
4903
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
4816
4904
|
var SidePanel = DialogPrimitive2.Root;
|
|
4817
4905
|
var SidePanelTrigger = DialogPrimitive2.Trigger;
|
|
4818
4906
|
var SidePanelClose = DialogPrimitive2.Close;
|
|
4819
|
-
var SidePanelContent =
|
|
4820
|
-
overlay && /* @__PURE__ */ (0,
|
|
4821
|
-
/* @__PURE__ */ (0,
|
|
4907
|
+
var SidePanelContent = React34.forwardRef(({ className, overlay = true, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(DialogPrimitive2.Portal, { children: [
|
|
4908
|
+
overlay && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ModalOverlay, {}),
|
|
4909
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
4822
4910
|
DialogPrimitive2.Content,
|
|
4823
4911
|
{
|
|
4824
4912
|
ref,
|
|
@@ -4839,10 +4927,10 @@ var SidePanelContent = React33.forwardRef(({ className, overlay = true, children
|
|
|
4839
4927
|
SidePanelContent.displayName = "SidePanelContent";
|
|
4840
4928
|
|
|
4841
4929
|
// src/components/ui/filter/filter-chip-segment.tsx
|
|
4842
|
-
var
|
|
4930
|
+
var React35 = __toESM(require("react"));
|
|
4843
4931
|
var import_class_variance_authority19 = require("class-variance-authority");
|
|
4844
4932
|
var import_icons22 = require("@l3mpire/icons");
|
|
4845
|
-
var
|
|
4933
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
4846
4934
|
var filterChipSegmentVariants = (0, import_class_variance_authority19.cva)(
|
|
4847
4935
|
["flex items-center shrink-0 transition-colors"],
|
|
4848
4936
|
{
|
|
@@ -4865,7 +4953,7 @@ var filterChipSegmentVariants = (0, import_class_variance_authority19.cva)(
|
|
|
4865
4953
|
}
|
|
4866
4954
|
}
|
|
4867
4955
|
);
|
|
4868
|
-
var FilterChipSegment =
|
|
4956
|
+
var FilterChipSegment = React35.forwardRef(
|
|
4869
4957
|
({
|
|
4870
4958
|
className,
|
|
4871
4959
|
segmentType = "property",
|
|
@@ -4879,24 +4967,24 @@ var FilterChipSegment = React34.forwardRef(
|
|
|
4879
4967
|
...props
|
|
4880
4968
|
}, ref) => {
|
|
4881
4969
|
if (segmentType === "button") {
|
|
4882
|
-
return /* @__PURE__ */ (0,
|
|
4970
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
4883
4971
|
"div",
|
|
4884
4972
|
{
|
|
4885
4973
|
ref,
|
|
4886
4974
|
className: cn(filterChipSegmentVariants({ type: "button", hasBorder: false }), className),
|
|
4887
4975
|
...props,
|
|
4888
4976
|
children: [
|
|
4889
|
-
/* @__PURE__ */ (0,
|
|
4977
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4890
4978
|
"button",
|
|
4891
4979
|
{
|
|
4892
4980
|
type: "button",
|
|
4893
4981
|
onClick: onKebabClick,
|
|
4894
4982
|
className: "flex items-center justify-center p-sm cursor-pointer hover:bg-filter-chip-segment-bg-hover active:bg-filter-chip-segment-bg-pressed transition-colors",
|
|
4895
4983
|
"aria-label": "Filter actions",
|
|
4896
|
-
children: /* @__PURE__ */ (0,
|
|
4897
|
-
/* @__PURE__ */ (0,
|
|
4898
|
-
/* @__PURE__ */ (0,
|
|
4899
|
-
/* @__PURE__ */ (0,
|
|
4984
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "size-5 flex items-center justify-center text-sm leading-sm text-filter-chip-kebab-text", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "currentColor", children: [
|
|
4985
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("circle", { cx: "10", cy: "4.5", r: "1.5" }),
|
|
4986
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("circle", { cx: "10", cy: "10", r: "1.5" }),
|
|
4987
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("circle", { cx: "10", cy: "15.5", r: "1.5" })
|
|
4900
4988
|
] }) })
|
|
4901
4989
|
}
|
|
4902
4990
|
),
|
|
@@ -4905,7 +4993,7 @@ var FilterChipSegment = React34.forwardRef(
|
|
|
4905
4993
|
}
|
|
4906
4994
|
);
|
|
4907
4995
|
}
|
|
4908
|
-
return /* @__PURE__ */ (0,
|
|
4996
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
4909
4997
|
"div",
|
|
4910
4998
|
{
|
|
4911
4999
|
ref,
|
|
@@ -4916,8 +5004,8 @@ var FilterChipSegment = React34.forwardRef(
|
|
|
4916
5004
|
),
|
|
4917
5005
|
...props,
|
|
4918
5006
|
children: [
|
|
4919
|
-
adornment && segmentType === "value" && /* @__PURE__ */ (0,
|
|
4920
|
-
icon && segmentType === "property" && /* @__PURE__ */ (0,
|
|
5007
|
+
adornment && segmentType === "value" && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "shrink-0 size-5", children: adornment }),
|
|
5008
|
+
icon && segmentType === "property" && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4921
5009
|
import_icons22.Icon,
|
|
4922
5010
|
{
|
|
4923
5011
|
icon,
|
|
@@ -4925,7 +5013,7 @@ var FilterChipSegment = React34.forwardRef(
|
|
|
4925
5013
|
className: "shrink-0 text-filter-chip-segment-icon"
|
|
4926
5014
|
}
|
|
4927
5015
|
),
|
|
4928
|
-
label && /* @__PURE__ */ (0,
|
|
5016
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4929
5017
|
"span",
|
|
4930
5018
|
{
|
|
4931
5019
|
className: cn(
|
|
@@ -4935,7 +5023,7 @@ var FilterChipSegment = React34.forwardRef(
|
|
|
4935
5023
|
children: label
|
|
4936
5024
|
}
|
|
4937
5025
|
),
|
|
4938
|
-
badgeCount != null && badgeCount > 0 && /* @__PURE__ */ (0,
|
|
5026
|
+
badgeCount != null && badgeCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "flex items-center gap-2xs p-2xs rounded-xs bg-filter-chip-badge-bg", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "text-[10px] font-medium leading-2xs text-filter-chip-badge-text", children: badgeCount }) }),
|
|
4939
5027
|
children
|
|
4940
5028
|
]
|
|
4941
5029
|
}
|
|
@@ -4945,9 +5033,9 @@ var FilterChipSegment = React34.forwardRef(
|
|
|
4945
5033
|
FilterChipSegment.displayName = "FilterChipSegment";
|
|
4946
5034
|
|
|
4947
5035
|
// src/components/ui/filter/filter-chip.tsx
|
|
4948
|
-
var
|
|
4949
|
-
var
|
|
4950
|
-
var FilterChip =
|
|
5036
|
+
var React36 = __toESM(require("react"));
|
|
5037
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
5038
|
+
var FilterChip = React36.forwardRef(
|
|
4951
5039
|
({
|
|
4952
5040
|
className,
|
|
4953
5041
|
icon,
|
|
@@ -4964,7 +5052,7 @@ var FilterChip = React35.forwardRef(
|
|
|
4964
5052
|
}, ref) => {
|
|
4965
5053
|
const hasOperator = !!operator;
|
|
4966
5054
|
const hasValue = hasOperator && value != null;
|
|
4967
|
-
return /* @__PURE__ */ (0,
|
|
5055
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
4968
5056
|
"div",
|
|
4969
5057
|
{
|
|
4970
5058
|
ref,
|
|
@@ -4975,7 +5063,7 @@ var FilterChip = React35.forwardRef(
|
|
|
4975
5063
|
),
|
|
4976
5064
|
...props,
|
|
4977
5065
|
children: [
|
|
4978
|
-
/* @__PURE__ */ (0,
|
|
5066
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
4979
5067
|
FilterChipSegment,
|
|
4980
5068
|
{
|
|
4981
5069
|
segmentType: "property",
|
|
@@ -4985,7 +5073,7 @@ var FilterChip = React35.forwardRef(
|
|
|
4985
5073
|
onClick: onPropertyClick
|
|
4986
5074
|
}
|
|
4987
5075
|
),
|
|
4988
|
-
/* @__PURE__ */ (0,
|
|
5076
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
4989
5077
|
FilterChipSegment,
|
|
4990
5078
|
{
|
|
4991
5079
|
segmentType: hasOperator ? "operator" : "placeholder",
|
|
@@ -4994,7 +5082,7 @@ var FilterChip = React35.forwardRef(
|
|
|
4994
5082
|
onClick: onOperatorClick
|
|
4995
5083
|
}
|
|
4996
5084
|
),
|
|
4997
|
-
hasOperator && /* @__PURE__ */ (0,
|
|
5085
|
+
hasOperator && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
4998
5086
|
FilterChipSegment,
|
|
4999
5087
|
{
|
|
5000
5088
|
segmentType: hasValue ? "value" : "placeholder",
|
|
@@ -5005,7 +5093,7 @@ var FilterChip = React35.forwardRef(
|
|
|
5005
5093
|
onClick: onValueClick
|
|
5006
5094
|
}
|
|
5007
5095
|
),
|
|
5008
|
-
hasOperator && /* @__PURE__ */ (0,
|
|
5096
|
+
hasOperator && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5009
5097
|
FilterChipSegment,
|
|
5010
5098
|
{
|
|
5011
5099
|
segmentType: "button",
|
|
@@ -5099,10 +5187,10 @@ function getValueInputType(type, operator) {
|
|
|
5099
5187
|
}
|
|
5100
5188
|
|
|
5101
5189
|
// src/components/ui/filter/filter-bar.tsx
|
|
5102
|
-
var
|
|
5103
|
-
var
|
|
5104
|
-
var FilterBar =
|
|
5105
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */ (0,
|
|
5190
|
+
var React37 = __toESM(require("react"));
|
|
5191
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
5192
|
+
var FilterBar = React37.forwardRef(
|
|
5193
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5106
5194
|
"div",
|
|
5107
5195
|
{
|
|
5108
5196
|
ref,
|
|
@@ -5119,8 +5207,8 @@ var FilterBar = React36.forwardRef(
|
|
|
5119
5207
|
)
|
|
5120
5208
|
);
|
|
5121
5209
|
FilterBar.displayName = "FilterBar";
|
|
5122
|
-
var FilterBarLeft =
|
|
5123
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */ (0,
|
|
5210
|
+
var FilterBarLeft = React37.forwardRef(
|
|
5211
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5124
5212
|
"div",
|
|
5125
5213
|
{
|
|
5126
5214
|
ref,
|
|
@@ -5131,8 +5219,8 @@ var FilterBarLeft = React36.forwardRef(
|
|
|
5131
5219
|
)
|
|
5132
5220
|
);
|
|
5133
5221
|
FilterBarLeft.displayName = "FilterBarLeft";
|
|
5134
|
-
var FilterBarRight =
|
|
5135
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */ (0,
|
|
5222
|
+
var FilterBarRight = React37.forwardRef(
|
|
5223
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5136
5224
|
"div",
|
|
5137
5225
|
{
|
|
5138
5226
|
ref,
|
|
@@ -5145,11 +5233,11 @@ var FilterBarRight = React36.forwardRef(
|
|
|
5145
5233
|
FilterBarRight.displayName = "FilterBarRight";
|
|
5146
5234
|
|
|
5147
5235
|
// src/components/ui/filter/sort-button.tsx
|
|
5148
|
-
var
|
|
5236
|
+
var React38 = __toESM(require("react"));
|
|
5149
5237
|
var PopoverPrimitive3 = __toESM(require("@radix-ui/react-popover"));
|
|
5150
5238
|
var import_icons23 = require("@l3mpire/icons");
|
|
5151
5239
|
var import_icons24 = require("@l3mpire/icons");
|
|
5152
|
-
var
|
|
5240
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
5153
5241
|
var SortButton = ({
|
|
5154
5242
|
className,
|
|
5155
5243
|
fields,
|
|
@@ -5159,11 +5247,11 @@ var SortButton = ({
|
|
|
5159
5247
|
iconOnly = false,
|
|
5160
5248
|
...props
|
|
5161
5249
|
}) => {
|
|
5162
|
-
const [open, setOpen] =
|
|
5250
|
+
const [open, setOpen] = React38.useState(false);
|
|
5163
5251
|
const activeFieldDef = fields.find((f) => f.id === activeField);
|
|
5164
5252
|
const activeLabel = activeFieldDef?.label ?? activeField;
|
|
5165
|
-
return /* @__PURE__ */ (0,
|
|
5166
|
-
/* @__PURE__ */ (0,
|
|
5253
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(PopoverPrimitive3.Root, { open, onOpenChange: setOpen, children: [
|
|
5254
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(PopoverPrimitive3.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
5167
5255
|
"button",
|
|
5168
5256
|
{
|
|
5169
5257
|
type: "button",
|
|
@@ -5178,7 +5266,7 @@ var SortButton = ({
|
|
|
5178
5266
|
className
|
|
5179
5267
|
),
|
|
5180
5268
|
children: [
|
|
5181
|
-
/* @__PURE__ */ (0,
|
|
5269
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
5182
5270
|
import_icons23.Icon,
|
|
5183
5271
|
{
|
|
5184
5272
|
icon: direction === "asc" ? import_icons24.faArrowUpSmallBigOutline : import_icons24.faArrowDownBigSmallOutline,
|
|
@@ -5186,17 +5274,17 @@ var SortButton = ({
|
|
|
5186
5274
|
className: "shrink-0 text-[var(--color-foreground)]"
|
|
5187
5275
|
}
|
|
5188
5276
|
),
|
|
5189
|
-
!iconOnly && /* @__PURE__ */ (0,
|
|
5190
|
-
/* @__PURE__ */ (0,
|
|
5277
|
+
!iconOnly && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("span", { className: "text-sm font-medium leading-sm whitespace-nowrap", children: [
|
|
5278
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("span", { className: "text-[var(--color-muted-foreground)]", children: [
|
|
5191
5279
|
"Sort by",
|
|
5192
5280
|
" "
|
|
5193
5281
|
] }),
|
|
5194
|
-
/* @__PURE__ */ (0,
|
|
5282
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "text-[var(--color-foreground)]", children: activeLabel })
|
|
5195
5283
|
] })
|
|
5196
5284
|
]
|
|
5197
5285
|
}
|
|
5198
5286
|
) }),
|
|
5199
|
-
/* @__PURE__ */ (0,
|
|
5287
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(PopoverPrimitive3.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
5200
5288
|
PopoverPrimitive3.Content,
|
|
5201
5289
|
{
|
|
5202
5290
|
sideOffset: 4,
|
|
@@ -5210,7 +5298,7 @@ var SortButton = ({
|
|
|
5210
5298
|
"min-w-[180px]"
|
|
5211
5299
|
),
|
|
5212
5300
|
children: [
|
|
5213
|
-
/* @__PURE__ */ (0,
|
|
5301
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "flex flex-col", children: fields.map((field) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
5214
5302
|
"button",
|
|
5215
5303
|
{
|
|
5216
5304
|
type: "button",
|
|
@@ -5224,7 +5312,7 @@ var SortButton = ({
|
|
|
5224
5312
|
field.id === activeField ? "bg-[var(--color-dropdown-item-hover)]" : ""
|
|
5225
5313
|
),
|
|
5226
5314
|
children: [
|
|
5227
|
-
/* @__PURE__ */ (0,
|
|
5315
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
5228
5316
|
import_icons23.Icon,
|
|
5229
5317
|
{
|
|
5230
5318
|
icon: field.icon,
|
|
@@ -5235,7 +5323,7 @@ var SortButton = ({
|
|
|
5235
5323
|
)
|
|
5236
5324
|
}
|
|
5237
5325
|
),
|
|
5238
|
-
/* @__PURE__ */ (0,
|
|
5326
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
5239
5327
|
"span",
|
|
5240
5328
|
{
|
|
5241
5329
|
className: cn(
|
|
@@ -5249,9 +5337,9 @@ var SortButton = ({
|
|
|
5249
5337
|
},
|
|
5250
5338
|
field.id
|
|
5251
5339
|
)) }),
|
|
5252
|
-
/* @__PURE__ */ (0,
|
|
5253
|
-
/* @__PURE__ */ (0,
|
|
5254
|
-
/* @__PURE__ */ (0,
|
|
5340
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "h-px bg-[var(--color-border)]" }),
|
|
5341
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex flex-col", children: [
|
|
5342
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
5255
5343
|
"button",
|
|
5256
5344
|
{
|
|
5257
5345
|
type: "button",
|
|
@@ -5265,7 +5353,7 @@ var SortButton = ({
|
|
|
5265
5353
|
direction === "asc" ? "bg-[var(--color-dropdown-item-hover)]" : ""
|
|
5266
5354
|
),
|
|
5267
5355
|
children: [
|
|
5268
|
-
/* @__PURE__ */ (0,
|
|
5356
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
5269
5357
|
import_icons23.Icon,
|
|
5270
5358
|
{
|
|
5271
5359
|
icon: import_icons24.faArrowUpSmallBigOutline,
|
|
@@ -5276,7 +5364,7 @@ var SortButton = ({
|
|
|
5276
5364
|
)
|
|
5277
5365
|
}
|
|
5278
5366
|
),
|
|
5279
|
-
/* @__PURE__ */ (0,
|
|
5367
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
5280
5368
|
"span",
|
|
5281
5369
|
{
|
|
5282
5370
|
className: cn(
|
|
@@ -5289,7 +5377,7 @@ var SortButton = ({
|
|
|
5289
5377
|
]
|
|
5290
5378
|
}
|
|
5291
5379
|
),
|
|
5292
|
-
/* @__PURE__ */ (0,
|
|
5380
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
5293
5381
|
"button",
|
|
5294
5382
|
{
|
|
5295
5383
|
type: "button",
|
|
@@ -5303,7 +5391,7 @@ var SortButton = ({
|
|
|
5303
5391
|
direction === "desc" ? "bg-[var(--color-dropdown-item-hover)]" : ""
|
|
5304
5392
|
),
|
|
5305
5393
|
children: [
|
|
5306
|
-
/* @__PURE__ */ (0,
|
|
5394
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
5307
5395
|
import_icons23.Icon,
|
|
5308
5396
|
{
|
|
5309
5397
|
icon: import_icons24.faArrowDownBigSmallOutline,
|
|
@@ -5314,7 +5402,7 @@ var SortButton = ({
|
|
|
5314
5402
|
)
|
|
5315
5403
|
}
|
|
5316
5404
|
),
|
|
5317
|
-
/* @__PURE__ */ (0,
|
|
5405
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
5318
5406
|
"span",
|
|
5319
5407
|
{
|
|
5320
5408
|
className: cn(
|
|
@@ -5336,10 +5424,10 @@ var SortButton = ({
|
|
|
5336
5424
|
SortButton.displayName = "SortButton";
|
|
5337
5425
|
|
|
5338
5426
|
// src/components/ui/filter/filter-bar-button.tsx
|
|
5339
|
-
var
|
|
5427
|
+
var React39 = __toESM(require("react"));
|
|
5340
5428
|
var import_icons25 = require("@l3mpire/icons");
|
|
5341
|
-
var
|
|
5342
|
-
var FilterBarButton =
|
|
5429
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
5430
|
+
var FilterBarButton = React39.forwardRef(({ className, count, iconOnly = false, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
5343
5431
|
"button",
|
|
5344
5432
|
{
|
|
5345
5433
|
ref,
|
|
@@ -5356,7 +5444,7 @@ var FilterBarButton = React38.forwardRef(({ className, count, iconOnly = false,
|
|
|
5356
5444
|
),
|
|
5357
5445
|
...props,
|
|
5358
5446
|
children: [
|
|
5359
|
-
/* @__PURE__ */ (0,
|
|
5447
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
5360
5448
|
import_icons25.Icon,
|
|
5361
5449
|
{
|
|
5362
5450
|
icon: import_icons25.faSlidersOutline,
|
|
@@ -5364,18 +5452,18 @@ var FilterBarButton = React38.forwardRef(({ className, count, iconOnly = false,
|
|
|
5364
5452
|
className: "shrink-0 text-[var(--color-foreground)]"
|
|
5365
5453
|
}
|
|
5366
5454
|
),
|
|
5367
|
-
!iconOnly && /* @__PURE__ */ (0,
|
|
5368
|
-
count != null && count > 0 && /* @__PURE__ */ (0,
|
|
5455
|
+
!iconOnly && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "text-sm font-medium leading-sm whitespace-nowrap text-[var(--color-foreground)]", children: children ?? "Filters" }),
|
|
5456
|
+
count != null && count > 0 && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "flex items-center p-2xs rounded-xs bg-filter-chip-badge-bg", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "text-[10px] font-medium leading-2xs text-filter-chip-badge-text", children: count }) })
|
|
5369
5457
|
]
|
|
5370
5458
|
}
|
|
5371
5459
|
));
|
|
5372
5460
|
FilterBarButton.displayName = "FilterBarButton";
|
|
5373
5461
|
|
|
5374
5462
|
// src/components/ui/filter/save-view-button.tsx
|
|
5375
|
-
var
|
|
5463
|
+
var React40 = __toESM(require("react"));
|
|
5376
5464
|
var import_icons26 = require("@l3mpire/icons");
|
|
5377
|
-
var
|
|
5378
|
-
var SaveViewButton =
|
|
5465
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
5466
|
+
var SaveViewButton = React40.forwardRef(
|
|
5379
5467
|
({ className, label = "Save view", onSave, onDropdown, ...props }, ref) => {
|
|
5380
5468
|
const sharedStyle = [
|
|
5381
5469
|
"flex items-center justify-center",
|
|
@@ -5385,14 +5473,14 @@ var SaveViewButton = React39.forwardRef(
|
|
|
5385
5473
|
"shadow-sm cursor-pointer transition-colors",
|
|
5386
5474
|
"hover:from-[var(--color-btn-solid-brand-bg-hover)] hover:to-[var(--color-btn-solid-brand-bg-gradient-to-hover)]"
|
|
5387
5475
|
];
|
|
5388
|
-
return /* @__PURE__ */ (0,
|
|
5476
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
5389
5477
|
"div",
|
|
5390
5478
|
{
|
|
5391
5479
|
ref,
|
|
5392
5480
|
className: cn("flex items-center", className),
|
|
5393
5481
|
...props,
|
|
5394
5482
|
children: [
|
|
5395
|
-
/* @__PURE__ */ (0,
|
|
5483
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
5396
5484
|
"button",
|
|
5397
5485
|
{
|
|
5398
5486
|
type: "button",
|
|
@@ -5403,12 +5491,12 @@ var SaveViewButton = React39.forwardRef(
|
|
|
5403
5491
|
"rounded-l-md -mr-px"
|
|
5404
5492
|
),
|
|
5405
5493
|
children: [
|
|
5406
|
-
/* @__PURE__ */ (0,
|
|
5407
|
-
/* @__PURE__ */ (0,
|
|
5494
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "text-sm font-medium leading-sm whitespace-nowrap text-[var(--color-btn-solid-brand-text-default)]", children: label }),
|
|
5495
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "absolute inset-0 rounded-l-[11px] border border-[var(--color-btn-solid-brand-inner-border-default)] shadow-sm pointer-events-none" })
|
|
5408
5496
|
]
|
|
5409
5497
|
}
|
|
5410
5498
|
),
|
|
5411
|
-
/* @__PURE__ */ (0,
|
|
5499
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
5412
5500
|
"button",
|
|
5413
5501
|
{
|
|
5414
5502
|
type: "button",
|
|
@@ -5419,7 +5507,7 @@ var SaveViewButton = React39.forwardRef(
|
|
|
5419
5507
|
"rounded-r-md -ml-px"
|
|
5420
5508
|
),
|
|
5421
5509
|
children: [
|
|
5422
|
-
/* @__PURE__ */ (0,
|
|
5510
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
5423
5511
|
import_icons26.Icon,
|
|
5424
5512
|
{
|
|
5425
5513
|
icon: import_icons26.faChevronDownOutline,
|
|
@@ -5427,7 +5515,7 @@ var SaveViewButton = React39.forwardRef(
|
|
|
5427
5515
|
className: "text-[var(--color-btn-solid-brand-text-default)]"
|
|
5428
5516
|
}
|
|
5429
5517
|
),
|
|
5430
|
-
/* @__PURE__ */ (0,
|
|
5518
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "absolute inset-0 rounded-r-[11px] border border-[var(--color-btn-solid-brand-inner-border-default)] shadow-sm pointer-events-none" })
|
|
5431
5519
|
]
|
|
5432
5520
|
}
|
|
5433
5521
|
)
|
|
@@ -5440,7 +5528,7 @@ SaveViewButton.displayName = "SaveViewButton";
|
|
|
5440
5528
|
|
|
5441
5529
|
// src/components/ui/filter/operator-selector.tsx
|
|
5442
5530
|
var PopoverPrimitive4 = __toESM(require("@radix-ui/react-popover"));
|
|
5443
|
-
var
|
|
5531
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
5444
5532
|
var OperatorSelector = ({
|
|
5445
5533
|
dataType,
|
|
5446
5534
|
activeOperator,
|
|
@@ -5450,9 +5538,9 @@ var OperatorSelector = ({
|
|
|
5450
5538
|
children
|
|
5451
5539
|
}) => {
|
|
5452
5540
|
const operators = OPERATORS_BY_TYPE[dataType];
|
|
5453
|
-
return /* @__PURE__ */ (0,
|
|
5454
|
-
/* @__PURE__ */ (0,
|
|
5455
|
-
/* @__PURE__ */ (0,
|
|
5541
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(PopoverPrimitive4.Root, { open, onOpenChange, children: [
|
|
5542
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(PopoverPrimitive4.Trigger, { asChild: true, children }),
|
|
5543
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(PopoverPrimitive4.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5456
5544
|
PopoverPrimitive4.Content,
|
|
5457
5545
|
{
|
|
5458
5546
|
sideOffset: 4,
|
|
@@ -5465,7 +5553,7 @@ var OperatorSelector = ({
|
|
|
5465
5553
|
"data-[side=bottom]:slide-in-from-top-2",
|
|
5466
5554
|
"min-w-[180px]"
|
|
5467
5555
|
),
|
|
5468
|
-
children: operators.map((op) => /* @__PURE__ */ (0,
|
|
5556
|
+
children: operators.map((op) => /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
5469
5557
|
"button",
|
|
5470
5558
|
{
|
|
5471
5559
|
type: "button",
|
|
@@ -5476,7 +5564,7 @@ var OperatorSelector = ({
|
|
|
5476
5564
|
op === activeOperator && "bg-[var(--color-dropdown-item-hover)]"
|
|
5477
5565
|
),
|
|
5478
5566
|
children: [
|
|
5479
|
-
/* @__PURE__ */ (0,
|
|
5567
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5480
5568
|
"span",
|
|
5481
5569
|
{
|
|
5482
5570
|
className: cn(
|
|
@@ -5486,7 +5574,7 @@ var OperatorSelector = ({
|
|
|
5486
5574
|
children: op
|
|
5487
5575
|
}
|
|
5488
5576
|
),
|
|
5489
|
-
isNoValueOperator(op) && /* @__PURE__ */ (0,
|
|
5577
|
+
isNoValueOperator(op) && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "ml-auto text-xs text-[var(--color-muted-foreground)]", children: "instant" })
|
|
5490
5578
|
]
|
|
5491
5579
|
},
|
|
5492
5580
|
op
|
|
@@ -5502,7 +5590,7 @@ var OperatorList = ({
|
|
|
5502
5590
|
onSelect
|
|
5503
5591
|
}) => {
|
|
5504
5592
|
const operators = OPERATORS_BY_TYPE[dataType];
|
|
5505
|
-
return /* @__PURE__ */ (0,
|
|
5593
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "flex flex-col", children: operators.map((op) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5506
5594
|
"button",
|
|
5507
5595
|
{
|
|
5508
5596
|
type: "button",
|
|
@@ -5512,7 +5600,7 @@ var OperatorList = ({
|
|
|
5512
5600
|
"hover:bg-[var(--color-dropdown-item-hover)]",
|
|
5513
5601
|
op === activeOperator && "bg-[var(--color-dropdown-item-hover)]"
|
|
5514
5602
|
),
|
|
5515
|
-
children: /* @__PURE__ */ (0,
|
|
5603
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5516
5604
|
"span",
|
|
5517
5605
|
{
|
|
5518
5606
|
className: cn(
|
|
@@ -5529,7 +5617,7 @@ var OperatorList = ({
|
|
|
5529
5617
|
OperatorList.displayName = "OperatorList";
|
|
5530
5618
|
|
|
5531
5619
|
// src/components/ui/filter/value-input.tsx
|
|
5532
|
-
var
|
|
5620
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
5533
5621
|
var RELATIVE_DATE_PRESETS = [
|
|
5534
5622
|
{ group: "Past", options: ["Today", "Yesterday", "Last 7 days", "Last 14 days", "Last 30 days", "Last 90 days"] },
|
|
5535
5623
|
{ group: "Current", options: ["This week", "This month", "This quarter", "This year"] },
|
|
@@ -5551,8 +5639,8 @@ var ValueInput = ({
|
|
|
5551
5639
|
};
|
|
5552
5640
|
switch (inputType) {
|
|
5553
5641
|
case "TextInput":
|
|
5554
|
-
return /* @__PURE__ */ (0,
|
|
5555
|
-
/* @__PURE__ */ (0,
|
|
5642
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: cn("flex flex-col gap-base p-base", className), children: [
|
|
5643
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5556
5644
|
"input",
|
|
5557
5645
|
{
|
|
5558
5646
|
type: "text",
|
|
@@ -5569,7 +5657,7 @@ var ValueInput = ({
|
|
|
5569
5657
|
)
|
|
5570
5658
|
}
|
|
5571
5659
|
),
|
|
5572
|
-
/* @__PURE__ */ (0,
|
|
5660
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5573
5661
|
"button",
|
|
5574
5662
|
{
|
|
5575
5663
|
type: "button",
|
|
@@ -5580,8 +5668,8 @@ var ValueInput = ({
|
|
|
5580
5668
|
)
|
|
5581
5669
|
] });
|
|
5582
5670
|
case "NumberInput":
|
|
5583
|
-
return /* @__PURE__ */ (0,
|
|
5584
|
-
/* @__PURE__ */ (0,
|
|
5671
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: cn("flex flex-col gap-base p-base", className), children: [
|
|
5672
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5585
5673
|
"input",
|
|
5586
5674
|
{
|
|
5587
5675
|
type: "number",
|
|
@@ -5598,7 +5686,7 @@ var ValueInput = ({
|
|
|
5598
5686
|
)
|
|
5599
5687
|
}
|
|
5600
5688
|
),
|
|
5601
|
-
/* @__PURE__ */ (0,
|
|
5689
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5602
5690
|
"button",
|
|
5603
5691
|
{
|
|
5604
5692
|
type: "button",
|
|
@@ -5610,9 +5698,9 @@ var ValueInput = ({
|
|
|
5610
5698
|
] });
|
|
5611
5699
|
case "NumberRange": {
|
|
5612
5700
|
const rangeVal = value ?? [0, 0];
|
|
5613
|
-
return /* @__PURE__ */ (0,
|
|
5614
|
-
/* @__PURE__ */ (0,
|
|
5615
|
-
/* @__PURE__ */ (0,
|
|
5701
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: cn("flex flex-col gap-base p-base", className), children: [
|
|
5702
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex items-center gap-base", children: [
|
|
5703
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5616
5704
|
"input",
|
|
5617
5705
|
{
|
|
5618
5706
|
type: "number",
|
|
@@ -5627,8 +5715,8 @@ var ValueInput = ({
|
|
|
5627
5715
|
)
|
|
5628
5716
|
}
|
|
5629
5717
|
),
|
|
5630
|
-
/* @__PURE__ */ (0,
|
|
5631
|
-
/* @__PURE__ */ (0,
|
|
5718
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "text-sm text-[var(--color-muted-foreground)]", children: "and" }),
|
|
5719
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5632
5720
|
"input",
|
|
5633
5721
|
{
|
|
5634
5722
|
type: "number",
|
|
@@ -5643,7 +5731,7 @@ var ValueInput = ({
|
|
|
5643
5731
|
}
|
|
5644
5732
|
)
|
|
5645
5733
|
] }),
|
|
5646
|
-
/* @__PURE__ */ (0,
|
|
5734
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5647
5735
|
"button",
|
|
5648
5736
|
{
|
|
5649
5737
|
type: "button",
|
|
@@ -5655,9 +5743,9 @@ var ValueInput = ({
|
|
|
5655
5743
|
] });
|
|
5656
5744
|
}
|
|
5657
5745
|
case "PresetTags":
|
|
5658
|
-
return /* @__PURE__ */ (0,
|
|
5659
|
-
/* @__PURE__ */ (0,
|
|
5660
|
-
/* @__PURE__ */ (0,
|
|
5746
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: cn("flex flex-col gap-base p-base max-w-[280px]", className), children: RELATIVE_DATE_PRESETS.map((group) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex flex-col gap-xs", children: [
|
|
5747
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "text-xs font-medium leading-xs text-[var(--color-muted-foreground)] uppercase px-xs", children: group.group }),
|
|
5748
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "flex flex-wrap gap-xs", children: group.options.map((preset) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5661
5749
|
"button",
|
|
5662
5750
|
{
|
|
5663
5751
|
type: "button",
|
|
@@ -5675,7 +5763,7 @@ var ValueInput = ({
|
|
|
5675
5763
|
)) })
|
|
5676
5764
|
] }, group.group)) });
|
|
5677
5765
|
case "SingleSelect":
|
|
5678
|
-
return /* @__PURE__ */ (0,
|
|
5766
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: cn("flex flex-col gap-xs p-base max-h-[250px] overflow-y-auto", className), children: options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5679
5767
|
"button",
|
|
5680
5768
|
{
|
|
5681
5769
|
type: "button",
|
|
@@ -5688,16 +5776,16 @@ var ValueInput = ({
|
|
|
5688
5776
|
"hover:bg-[var(--color-dropdown-item-hover)]",
|
|
5689
5777
|
value === opt && "bg-[var(--color-dropdown-item-hover)]"
|
|
5690
5778
|
),
|
|
5691
|
-
children: /* @__PURE__ */ (0,
|
|
5779
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "text-sm font-regular leading-sm text-[var(--color-foreground)]", children: opt })
|
|
5692
5780
|
},
|
|
5693
5781
|
opt
|
|
5694
5782
|
)) });
|
|
5695
5783
|
case "MultiSelect": {
|
|
5696
5784
|
const selected = Array.isArray(value) ? value : [];
|
|
5697
|
-
return /* @__PURE__ */ (0,
|
|
5698
|
-
/* @__PURE__ */ (0,
|
|
5785
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: cn("flex flex-col gap-xs p-base", className), children: [
|
|
5786
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "flex flex-col max-h-[200px] overflow-y-auto", children: options.map((opt) => {
|
|
5699
5787
|
const isSelected = selected.includes(opt);
|
|
5700
|
-
return /* @__PURE__ */ (0,
|
|
5788
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
5701
5789
|
"button",
|
|
5702
5790
|
{
|
|
5703
5791
|
type: "button",
|
|
@@ -5710,23 +5798,23 @@ var ValueInput = ({
|
|
|
5710
5798
|
"hover:bg-[var(--color-dropdown-item-hover)]"
|
|
5711
5799
|
),
|
|
5712
5800
|
children: [
|
|
5713
|
-
/* @__PURE__ */ (0,
|
|
5801
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5714
5802
|
"span",
|
|
5715
5803
|
{
|
|
5716
5804
|
className: cn(
|
|
5717
5805
|
"flex items-center justify-center size-4 rounded-xs border transition-colors",
|
|
5718
5806
|
isSelected ? "bg-[var(--color-primary)] border-[var(--color-primary)]" : "border-[var(--color-input)] bg-[var(--color-background)]"
|
|
5719
5807
|
),
|
|
5720
|
-
children: isSelected && /* @__PURE__ */ (0,
|
|
5808
|
+
children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("path", { d: "M2 5L4 7L8 3", stroke: "white", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
5721
5809
|
}
|
|
5722
5810
|
),
|
|
5723
|
-
/* @__PURE__ */ (0,
|
|
5811
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "text-sm font-regular leading-sm text-[var(--color-foreground)]", children: opt })
|
|
5724
5812
|
]
|
|
5725
5813
|
},
|
|
5726
5814
|
opt
|
|
5727
5815
|
);
|
|
5728
5816
|
}) }),
|
|
5729
|
-
/* @__PURE__ */ (0,
|
|
5817
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5730
5818
|
"button",
|
|
5731
5819
|
{
|
|
5732
5820
|
type: "button",
|
|
@@ -5740,8 +5828,8 @@ var ValueInput = ({
|
|
|
5740
5828
|
// DatePicker, DateRange, RelationPicker, MultiRelationPicker
|
|
5741
5829
|
// Stub as text inputs for now — will wire to actual DatePicker/relation components
|
|
5742
5830
|
case "DatePicker":
|
|
5743
|
-
return /* @__PURE__ */ (0,
|
|
5744
|
-
/* @__PURE__ */ (0,
|
|
5831
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: cn("flex flex-col gap-base p-base", className), children: [
|
|
5832
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5745
5833
|
"input",
|
|
5746
5834
|
{
|
|
5747
5835
|
type: "date",
|
|
@@ -5755,7 +5843,7 @@ var ValueInput = ({
|
|
|
5755
5843
|
)
|
|
5756
5844
|
}
|
|
5757
5845
|
),
|
|
5758
|
-
/* @__PURE__ */ (0,
|
|
5846
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5759
5847
|
"button",
|
|
5760
5848
|
{
|
|
5761
5849
|
type: "button",
|
|
@@ -5766,9 +5854,9 @@ var ValueInput = ({
|
|
|
5766
5854
|
)
|
|
5767
5855
|
] });
|
|
5768
5856
|
case "DateRange":
|
|
5769
|
-
return /* @__PURE__ */ (0,
|
|
5770
|
-
/* @__PURE__ */ (0,
|
|
5771
|
-
/* @__PURE__ */ (0,
|
|
5857
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: cn("flex flex-col gap-base p-base", className), children: [
|
|
5858
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex items-center gap-base", children: [
|
|
5859
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5772
5860
|
"input",
|
|
5773
5861
|
{
|
|
5774
5862
|
type: "date",
|
|
@@ -5780,8 +5868,8 @@ var ValueInput = ({
|
|
|
5780
5868
|
)
|
|
5781
5869
|
}
|
|
5782
5870
|
),
|
|
5783
|
-
/* @__PURE__ */ (0,
|
|
5784
|
-
/* @__PURE__ */ (0,
|
|
5871
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "text-sm text-[var(--color-muted-foreground)]", children: "to" }),
|
|
5872
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5785
5873
|
"input",
|
|
5786
5874
|
{
|
|
5787
5875
|
type: "date",
|
|
@@ -5793,7 +5881,7 @@ var ValueInput = ({
|
|
|
5793
5881
|
}
|
|
5794
5882
|
)
|
|
5795
5883
|
] }),
|
|
5796
|
-
/* @__PURE__ */ (0,
|
|
5884
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5797
5885
|
"button",
|
|
5798
5886
|
{
|
|
5799
5887
|
type: "button",
|
|
@@ -5805,8 +5893,8 @@ var ValueInput = ({
|
|
|
5805
5893
|
] });
|
|
5806
5894
|
case "RelationPicker":
|
|
5807
5895
|
case "MultiRelationPicker":
|
|
5808
|
-
return /* @__PURE__ */ (0,
|
|
5809
|
-
/* @__PURE__ */ (0,
|
|
5896
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: cn("flex flex-col gap-base p-base", className), children: [
|
|
5897
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5810
5898
|
"input",
|
|
5811
5899
|
{
|
|
5812
5900
|
type: "text",
|
|
@@ -5823,7 +5911,7 @@ var ValueInput = ({
|
|
|
5823
5911
|
)
|
|
5824
5912
|
}
|
|
5825
5913
|
),
|
|
5826
|
-
/* @__PURE__ */ (0,
|
|
5914
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5827
5915
|
"button",
|
|
5828
5916
|
{
|
|
5829
5917
|
type: "button",
|
|
@@ -5840,10 +5928,10 @@ var ValueInput = ({
|
|
|
5840
5928
|
ValueInput.displayName = "ValueInput";
|
|
5841
5929
|
|
|
5842
5930
|
// src/components/ui/filter/property-selector.tsx
|
|
5843
|
-
var
|
|
5931
|
+
var React41 = __toESM(require("react"));
|
|
5844
5932
|
var PopoverPrimitive5 = __toESM(require("@radix-ui/react-popover"));
|
|
5845
5933
|
var import_icons27 = require("@l3mpire/icons");
|
|
5846
|
-
var
|
|
5934
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
5847
5935
|
var PropertySelector = ({
|
|
5848
5936
|
properties,
|
|
5849
5937
|
onSelect,
|
|
@@ -5851,15 +5939,15 @@ var PropertySelector = ({
|
|
|
5851
5939
|
onOpenChange,
|
|
5852
5940
|
children
|
|
5853
5941
|
}) => {
|
|
5854
|
-
const [activeGroup, setActiveGroup] =
|
|
5855
|
-
const [search, setSearch] =
|
|
5856
|
-
|
|
5942
|
+
const [activeGroup, setActiveGroup] = React41.useState(null);
|
|
5943
|
+
const [search, setSearch] = React41.useState("");
|
|
5944
|
+
React41.useEffect(() => {
|
|
5857
5945
|
if (!open) {
|
|
5858
5946
|
setActiveGroup(null);
|
|
5859
5947
|
setSearch("");
|
|
5860
5948
|
}
|
|
5861
5949
|
}, [open]);
|
|
5862
|
-
const groups =
|
|
5950
|
+
const groups = React41.useMemo(() => {
|
|
5863
5951
|
const map = /* @__PURE__ */ new Map();
|
|
5864
5952
|
for (const prop of properties) {
|
|
5865
5953
|
const existing = map.get(prop.group);
|
|
@@ -5876,7 +5964,7 @@ var PropertySelector = ({
|
|
|
5876
5964
|
}
|
|
5877
5965
|
return Array.from(map.values());
|
|
5878
5966
|
}, [properties]);
|
|
5879
|
-
const filteredProperties =
|
|
5967
|
+
const filteredProperties = React41.useMemo(() => {
|
|
5880
5968
|
if (!activeGroup) return [];
|
|
5881
5969
|
const groupProps = properties.filter((p) => p.group === activeGroup);
|
|
5882
5970
|
if (!search) return groupProps;
|
|
@@ -5884,9 +5972,9 @@ var PropertySelector = ({
|
|
|
5884
5972
|
return groupProps.filter((p) => p.label.toLowerCase().includes(lower));
|
|
5885
5973
|
}, [properties, activeGroup, search]);
|
|
5886
5974
|
const activeGroupInfo = groups.find((g) => g.group === activeGroup);
|
|
5887
|
-
return /* @__PURE__ */ (0,
|
|
5888
|
-
/* @__PURE__ */ (0,
|
|
5889
|
-
/* @__PURE__ */ (0,
|
|
5975
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(PopoverPrimitive5.Root, { open, onOpenChange, children: [
|
|
5976
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(PopoverPrimitive5.Trigger, { asChild: true, children }),
|
|
5977
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(PopoverPrimitive5.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5890
5978
|
PopoverPrimitive5.Content,
|
|
5891
5979
|
{
|
|
5892
5980
|
sideOffset: 4,
|
|
@@ -5901,14 +5989,14 @@ var PropertySelector = ({
|
|
|
5901
5989
|
),
|
|
5902
5990
|
children: activeGroup === null ? (
|
|
5903
5991
|
/* ── Level 1: Categories ─────────────────────────────────── */
|
|
5904
|
-
/* @__PURE__ */ (0,
|
|
5992
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "flex flex-col", children: groups.map((g) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
5905
5993
|
"button",
|
|
5906
5994
|
{
|
|
5907
5995
|
type: "button",
|
|
5908
5996
|
onClick: () => setActiveGroup(g.group),
|
|
5909
5997
|
className: "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-[var(--color-dropdown-item-hover)]",
|
|
5910
5998
|
children: [
|
|
5911
|
-
/* @__PURE__ */ (0,
|
|
5999
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5912
6000
|
import_icons27.Icon,
|
|
5913
6001
|
{
|
|
5914
6002
|
icon: g.groupIcon,
|
|
@@ -5916,9 +6004,9 @@ var PropertySelector = ({
|
|
|
5916
6004
|
className: "shrink-0 text-[var(--color-dropdown-item-icon)]"
|
|
5917
6005
|
}
|
|
5918
6006
|
),
|
|
5919
|
-
/* @__PURE__ */ (0,
|
|
5920
|
-
/* @__PURE__ */ (0,
|
|
5921
|
-
/* @__PURE__ */ (0,
|
|
6007
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "flex-1 text-sm font-regular leading-sm text-[var(--color-dropdown-item-text)] text-left truncate", children: g.groupLabel }),
|
|
6008
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "text-xs font-medium leading-xs text-[var(--color-muted-foreground)]", children: g.count }),
|
|
6009
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5922
6010
|
import_icons27.Icon,
|
|
5923
6011
|
{
|
|
5924
6012
|
icon: import_icons27.faChevronRightOutline,
|
|
@@ -5932,8 +6020,8 @@ var PropertySelector = ({
|
|
|
5932
6020
|
)) })
|
|
5933
6021
|
) : (
|
|
5934
6022
|
/* ── Level 2: Properties ─────────────────────────────────── */
|
|
5935
|
-
/* @__PURE__ */ (0,
|
|
5936
|
-
/* @__PURE__ */ (0,
|
|
6023
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex flex-col gap-xs", children: [
|
|
6024
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
5937
6025
|
"button",
|
|
5938
6026
|
{
|
|
5939
6027
|
type: "button",
|
|
@@ -5943,7 +6031,7 @@ var PropertySelector = ({
|
|
|
5943
6031
|
},
|
|
5944
6032
|
className: "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-[var(--color-dropdown-item-hover)]",
|
|
5945
6033
|
children: [
|
|
5946
|
-
/* @__PURE__ */ (0,
|
|
6034
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5947
6035
|
import_icons27.Icon,
|
|
5948
6036
|
{
|
|
5949
6037
|
icon: import_icons27.faChevronLeftOutline,
|
|
@@ -5951,12 +6039,12 @@ var PropertySelector = ({
|
|
|
5951
6039
|
className: "shrink-0 text-[var(--color-dropdown-item-icon)]"
|
|
5952
6040
|
}
|
|
5953
6041
|
),
|
|
5954
|
-
/* @__PURE__ */ (0,
|
|
6042
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "flex-1 text-xs font-medium leading-xs text-[var(--color-muted-foreground)] text-left truncate", children: activeGroupInfo?.groupLabel })
|
|
5955
6043
|
]
|
|
5956
6044
|
}
|
|
5957
6045
|
),
|
|
5958
|
-
/* @__PURE__ */ (0,
|
|
5959
|
-
/* @__PURE__ */ (0,
|
|
6046
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex items-center gap-base px-md py-base border border-[var(--color-input)] rounded-md", children: [
|
|
6047
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5960
6048
|
import_icons27.Icon,
|
|
5961
6049
|
{
|
|
5962
6050
|
icon: import_icons27.faMagnifyingGlassOutline,
|
|
@@ -5964,7 +6052,7 @@ var PropertySelector = ({
|
|
|
5964
6052
|
className: "shrink-0 text-[var(--color-muted-foreground)]"
|
|
5965
6053
|
}
|
|
5966
6054
|
),
|
|
5967
|
-
/* @__PURE__ */ (0,
|
|
6055
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5968
6056
|
"input",
|
|
5969
6057
|
{
|
|
5970
6058
|
type: "text",
|
|
@@ -5976,8 +6064,8 @@ var PropertySelector = ({
|
|
|
5976
6064
|
}
|
|
5977
6065
|
)
|
|
5978
6066
|
] }),
|
|
5979
|
-
/* @__PURE__ */ (0,
|
|
5980
|
-
filteredProperties.map((prop) => /* @__PURE__ */ (0,
|
|
6067
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex flex-col max-h-[300px] overflow-y-auto", children: [
|
|
6068
|
+
filteredProperties.map((prop) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
5981
6069
|
"button",
|
|
5982
6070
|
{
|
|
5983
6071
|
type: "button",
|
|
@@ -5987,7 +6075,7 @@ var PropertySelector = ({
|
|
|
5987
6075
|
},
|
|
5988
6076
|
className: "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-[var(--color-dropdown-item-hover)]",
|
|
5989
6077
|
children: [
|
|
5990
|
-
/* @__PURE__ */ (0,
|
|
6078
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5991
6079
|
import_icons27.Icon,
|
|
5992
6080
|
{
|
|
5993
6081
|
icon: prop.icon,
|
|
@@ -5995,12 +6083,12 @@ var PropertySelector = ({
|
|
|
5995
6083
|
className: "shrink-0 text-[var(--color-dropdown-item-icon)]"
|
|
5996
6084
|
}
|
|
5997
6085
|
),
|
|
5998
|
-
/* @__PURE__ */ (0,
|
|
6086
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "flex-1 text-sm font-regular leading-sm text-[var(--color-dropdown-item-text)] text-left truncate", children: prop.label })
|
|
5999
6087
|
]
|
|
6000
6088
|
},
|
|
6001
6089
|
prop.id
|
|
6002
6090
|
)),
|
|
6003
|
-
filteredProperties.length === 0 && /* @__PURE__ */ (0,
|
|
6091
|
+
filteredProperties.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "p-base text-sm text-[var(--color-muted-foreground)]", children: "No results" })
|
|
6004
6092
|
] })
|
|
6005
6093
|
] })
|
|
6006
6094
|
)
|
|
@@ -6013,16 +6101,16 @@ PropertySelector.displayName = "PropertySelector";
|
|
|
6013
6101
|
// src/components/ui/filter/kebab-menu.tsx
|
|
6014
6102
|
var PopoverPrimitive6 = __toESM(require("@radix-ui/react-popover"));
|
|
6015
6103
|
var import_icons28 = require("@l3mpire/icons");
|
|
6016
|
-
var
|
|
6104
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
6017
6105
|
var KebabMenu = ({
|
|
6018
6106
|
onConvertToAdvanced,
|
|
6019
6107
|
onDelete,
|
|
6020
6108
|
open,
|
|
6021
6109
|
onOpenChange,
|
|
6022
6110
|
children
|
|
6023
|
-
}) => /* @__PURE__ */ (0,
|
|
6024
|
-
/* @__PURE__ */ (0,
|
|
6025
|
-
/* @__PURE__ */ (0,
|
|
6111
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(PopoverPrimitive6.Root, { open, onOpenChange, children: [
|
|
6112
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(PopoverPrimitive6.Trigger, { asChild: true, children }),
|
|
6113
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(PopoverPrimitive6.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
6026
6114
|
PopoverPrimitive6.Content,
|
|
6027
6115
|
{
|
|
6028
6116
|
sideOffset: 4,
|
|
@@ -6036,7 +6124,7 @@ var KebabMenu = ({
|
|
|
6036
6124
|
"min-w-[210px]"
|
|
6037
6125
|
),
|
|
6038
6126
|
children: [
|
|
6039
|
-
onConvertToAdvanced && /* @__PURE__ */ (0,
|
|
6127
|
+
onConvertToAdvanced && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
6040
6128
|
"button",
|
|
6041
6129
|
{
|
|
6042
6130
|
type: "button",
|
|
@@ -6046,7 +6134,7 @@ var KebabMenu = ({
|
|
|
6046
6134
|
},
|
|
6047
6135
|
className: "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-[var(--color-dropdown-item-hover)]",
|
|
6048
6136
|
children: [
|
|
6049
|
-
/* @__PURE__ */ (0,
|
|
6137
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
6050
6138
|
import_icons28.Icon,
|
|
6051
6139
|
{
|
|
6052
6140
|
icon: import_icons28.faArrowRightOutline,
|
|
@@ -6054,12 +6142,12 @@ var KebabMenu = ({
|
|
|
6054
6142
|
className: "shrink-0 text-[var(--color-dropdown-item-icon)]"
|
|
6055
6143
|
}
|
|
6056
6144
|
),
|
|
6057
|
-
/* @__PURE__ */ (0,
|
|
6145
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "text-sm font-regular leading-sm text-[var(--color-dropdown-item-text)]", children: "Convert to advanced" })
|
|
6058
6146
|
]
|
|
6059
6147
|
}
|
|
6060
6148
|
),
|
|
6061
|
-
onConvertToAdvanced && onDelete && /* @__PURE__ */ (0,
|
|
6062
|
-
onDelete && /* @__PURE__ */ (0,
|
|
6149
|
+
onConvertToAdvanced && onDelete && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "h-px mx-base my-xs bg-[var(--color-border)]" }),
|
|
6150
|
+
onDelete && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
6063
6151
|
"button",
|
|
6064
6152
|
{
|
|
6065
6153
|
type: "button",
|
|
@@ -6069,7 +6157,7 @@ var KebabMenu = ({
|
|
|
6069
6157
|
},
|
|
6070
6158
|
className: "flex items-center gap-base p-base rounded-base cursor-pointer transition-colors hover:bg-[var(--color-dropdown-item-hover)]",
|
|
6071
6159
|
children: [
|
|
6072
|
-
/* @__PURE__ */ (0,
|
|
6160
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
6073
6161
|
import_icons28.Icon,
|
|
6074
6162
|
{
|
|
6075
6163
|
icon: import_icons28.faTrashOutline,
|
|
@@ -6077,7 +6165,7 @@ var KebabMenu = ({
|
|
|
6077
6165
|
className: "shrink-0 text-[var(--color-destructive)]"
|
|
6078
6166
|
}
|
|
6079
6167
|
),
|
|
6080
|
-
/* @__PURE__ */ (0,
|
|
6168
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "text-sm font-regular leading-sm text-[var(--color-destructive)]", children: "Delete filter" })
|
|
6081
6169
|
]
|
|
6082
6170
|
}
|
|
6083
6171
|
)
|
|
@@ -6088,10 +6176,10 @@ var KebabMenu = ({
|
|
|
6088
6176
|
KebabMenu.displayName = "KebabMenu";
|
|
6089
6177
|
|
|
6090
6178
|
// src/components/ui/filter/filter-editor.tsx
|
|
6091
|
-
var
|
|
6179
|
+
var React42 = __toESM(require("react"));
|
|
6092
6180
|
var PopoverPrimitive7 = __toESM(require("@radix-ui/react-popover"));
|
|
6093
6181
|
var import_icons29 = require("@l3mpire/icons");
|
|
6094
|
-
var
|
|
6182
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
6095
6183
|
var FilterEditor = ({
|
|
6096
6184
|
propertyDef,
|
|
6097
6185
|
condition,
|
|
@@ -6102,16 +6190,16 @@ var FilterEditor = ({
|
|
|
6102
6190
|
onOpenChange,
|
|
6103
6191
|
children
|
|
6104
6192
|
}) => {
|
|
6105
|
-
const [view, setView] =
|
|
6193
|
+
const [view, setView] = React42.useState(
|
|
6106
6194
|
mode === "add" ? "value" : "operator"
|
|
6107
6195
|
);
|
|
6108
|
-
const [localOperator, setLocalOperator] =
|
|
6196
|
+
const [localOperator, setLocalOperator] = React42.useState(
|
|
6109
6197
|
condition.operator
|
|
6110
6198
|
);
|
|
6111
|
-
const [localValue, setLocalValue] =
|
|
6199
|
+
const [localValue, setLocalValue] = React42.useState(
|
|
6112
6200
|
condition.value
|
|
6113
6201
|
);
|
|
6114
|
-
|
|
6202
|
+
React42.useEffect(() => {
|
|
6115
6203
|
if (open) {
|
|
6116
6204
|
setView(mode === "add" ? "value" : "operator");
|
|
6117
6205
|
setLocalOperator(condition.operator);
|
|
@@ -6136,9 +6224,9 @@ var FilterEditor = ({
|
|
|
6136
6224
|
onOpenChange?.(false);
|
|
6137
6225
|
onClose();
|
|
6138
6226
|
};
|
|
6139
|
-
return /* @__PURE__ */ (0,
|
|
6140
|
-
/* @__PURE__ */ (0,
|
|
6141
|
-
/* @__PURE__ */ (0,
|
|
6227
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(PopoverPrimitive7.Root, { open, onOpenChange, children: [
|
|
6228
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(PopoverPrimitive7.Trigger, { asChild: true, children }),
|
|
6229
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(PopoverPrimitive7.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
6142
6230
|
PopoverPrimitive7.Content,
|
|
6143
6231
|
{
|
|
6144
6232
|
sideOffset: 4,
|
|
@@ -6152,8 +6240,8 @@ var FilterEditor = ({
|
|
|
6152
6240
|
"min-w-[240px]"
|
|
6153
6241
|
),
|
|
6154
6242
|
children: [
|
|
6155
|
-
/* @__PURE__ */ (0,
|
|
6156
|
-
/* @__PURE__ */ (0,
|
|
6243
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex items-center gap-base px-base pt-base pb-xs border-b border-[var(--color-border)]", children: [
|
|
6244
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
6157
6245
|
import_icons29.Icon,
|
|
6158
6246
|
{
|
|
6159
6247
|
icon: propertyDef.icon,
|
|
@@ -6161,8 +6249,8 @@ var FilterEditor = ({
|
|
|
6161
6249
|
className: "shrink-0 text-[var(--color-dropdown-item-icon)]"
|
|
6162
6250
|
}
|
|
6163
6251
|
),
|
|
6164
|
-
/* @__PURE__ */ (0,
|
|
6165
|
-
localOperator && view === "value" && /* @__PURE__ */ (0,
|
|
6252
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "text-sm font-medium leading-sm text-[var(--color-foreground)]", children: propertyDef.label }),
|
|
6253
|
+
localOperator && view === "value" && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
6166
6254
|
"button",
|
|
6167
6255
|
{
|
|
6168
6256
|
type: "button",
|
|
@@ -6175,14 +6263,14 @@ var FilterEditor = ({
|
|
|
6175
6263
|
}
|
|
6176
6264
|
)
|
|
6177
6265
|
] }),
|
|
6178
|
-
view === "operator" ? /* @__PURE__ */ (0,
|
|
6266
|
+
view === "operator" ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "p-xs", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
6179
6267
|
OperatorList,
|
|
6180
6268
|
{
|
|
6181
6269
|
dataType: propertyDef.type,
|
|
6182
6270
|
activeOperator: localOperator,
|
|
6183
6271
|
onSelect: handleOperatorSelect
|
|
6184
6272
|
}
|
|
6185
|
-
) }) : localOperator && /* @__PURE__ */ (0,
|
|
6273
|
+
) }) : localOperator && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
6186
6274
|
ValueInput,
|
|
6187
6275
|
{
|
|
6188
6276
|
dataType: propertyDef.type,
|
|
@@ -6201,9 +6289,9 @@ var FilterEditor = ({
|
|
|
6201
6289
|
FilterEditor.displayName = "FilterEditor";
|
|
6202
6290
|
|
|
6203
6291
|
// src/components/ui/filter/interactive-filter-chip.tsx
|
|
6204
|
-
var
|
|
6292
|
+
var React43 = __toESM(require("react"));
|
|
6205
6293
|
var PopoverPrimitive8 = __toESM(require("@radix-ui/react-popover"));
|
|
6206
|
-
var
|
|
6294
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
6207
6295
|
function formatFilterValue(value) {
|
|
6208
6296
|
if (value == null) return void 0;
|
|
6209
6297
|
if (typeof value === "boolean") return value ? "Yes" : "No";
|
|
@@ -6236,9 +6324,9 @@ var SegmentPopover = ({
|
|
|
6236
6324
|
children,
|
|
6237
6325
|
align = "start",
|
|
6238
6326
|
minWidth = "240px"
|
|
6239
|
-
}) => /* @__PURE__ */ (0,
|
|
6240
|
-
/* @__PURE__ */ (0,
|
|
6241
|
-
/* @__PURE__ */ (0,
|
|
6327
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(PopoverPrimitive8.Root, { open, onOpenChange, children: [
|
|
6328
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(PopoverPrimitive8.Trigger, { asChild: true, children: trigger }),
|
|
6329
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(PopoverPrimitive8.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6242
6330
|
PopoverPrimitive8.Content,
|
|
6243
6331
|
{
|
|
6244
6332
|
sideOffset: 4,
|
|
@@ -6267,11 +6355,11 @@ var InteractiveFilterChip = ({
|
|
|
6267
6355
|
onConvertToAdvanced,
|
|
6268
6356
|
className
|
|
6269
6357
|
}) => {
|
|
6270
|
-
const [operatorOpen, setOperatorOpen] =
|
|
6271
|
-
const [valueOpen, setValueOpen] =
|
|
6272
|
-
const [propertyOpen, setPropertyOpen] =
|
|
6273
|
-
const [kebabOpen, setKebabOpen] =
|
|
6274
|
-
|
|
6358
|
+
const [operatorOpen, setOperatorOpen] = React43.useState(false);
|
|
6359
|
+
const [valueOpen, setValueOpen] = React43.useState(false);
|
|
6360
|
+
const [propertyOpen, setPropertyOpen] = React43.useState(false);
|
|
6361
|
+
const [kebabOpen, setKebabOpen] = React43.useState(false);
|
|
6362
|
+
React43.useEffect(() => {
|
|
6275
6363
|
if (autoOpen && condition.operator && !isNoValueOperator(condition.operator)) {
|
|
6276
6364
|
const t = setTimeout(() => setValueOpen(true), 50);
|
|
6277
6365
|
return () => clearTimeout(t);
|
|
@@ -6300,7 +6388,7 @@ var InteractiveFilterChip = ({
|
|
|
6300
6388
|
const displayValue = formatFilterValue(condition.value);
|
|
6301
6389
|
const hasValue = hasOperator && displayValue != null;
|
|
6302
6390
|
const badgeCount = getBadgeCount(condition.value);
|
|
6303
|
-
return /* @__PURE__ */ (0,
|
|
6391
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
6304
6392
|
"div",
|
|
6305
6393
|
{
|
|
6306
6394
|
className: cn(
|
|
@@ -6309,7 +6397,7 @@ var InteractiveFilterChip = ({
|
|
|
6309
6397
|
className
|
|
6310
6398
|
),
|
|
6311
6399
|
children: [
|
|
6312
|
-
properties ? /* @__PURE__ */ (0,
|
|
6400
|
+
properties ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6313
6401
|
PropertySelector,
|
|
6314
6402
|
{
|
|
6315
6403
|
properties,
|
|
@@ -6319,7 +6407,7 @@ var InteractiveFilterChip = ({
|
|
|
6319
6407
|
},
|
|
6320
6408
|
open: propertyOpen,
|
|
6321
6409
|
onOpenChange: setPropertyOpen,
|
|
6322
|
-
children: /* @__PURE__ */ (0,
|
|
6410
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6323
6411
|
FilterChipSegment,
|
|
6324
6412
|
{
|
|
6325
6413
|
segmentType: "property",
|
|
@@ -6330,7 +6418,7 @@ var InteractiveFilterChip = ({
|
|
|
6330
6418
|
}
|
|
6331
6419
|
) })
|
|
6332
6420
|
}
|
|
6333
|
-
) : /* @__PURE__ */ (0,
|
|
6421
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6334
6422
|
FilterChipSegment,
|
|
6335
6423
|
{
|
|
6336
6424
|
segmentType: "property",
|
|
@@ -6339,13 +6427,13 @@ var InteractiveFilterChip = ({
|
|
|
6339
6427
|
label: propertyDef.label
|
|
6340
6428
|
}
|
|
6341
6429
|
),
|
|
6342
|
-
/* @__PURE__ */ (0,
|
|
6430
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6343
6431
|
SegmentPopover,
|
|
6344
6432
|
{
|
|
6345
6433
|
open: operatorOpen,
|
|
6346
6434
|
onOpenChange: setOperatorOpen,
|
|
6347
6435
|
minWidth: "180px",
|
|
6348
|
-
trigger: /* @__PURE__ */ (0,
|
|
6436
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6349
6437
|
FilterChipSegment,
|
|
6350
6438
|
{
|
|
6351
6439
|
segmentType: hasOperator ? "operator" : "placeholder",
|
|
@@ -6354,7 +6442,7 @@ var InteractiveFilterChip = ({
|
|
|
6354
6442
|
onClick: () => setOperatorOpen(true)
|
|
6355
6443
|
}
|
|
6356
6444
|
) }),
|
|
6357
|
-
children: /* @__PURE__ */ (0,
|
|
6445
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "p-xs", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6358
6446
|
OperatorList,
|
|
6359
6447
|
{
|
|
6360
6448
|
dataType: propertyDef.type,
|
|
@@ -6364,13 +6452,13 @@ var InteractiveFilterChip = ({
|
|
|
6364
6452
|
) })
|
|
6365
6453
|
}
|
|
6366
6454
|
),
|
|
6367
|
-
hasOperator && condition.operator && !isNoValueOperator(condition.operator) && /* @__PURE__ */ (0,
|
|
6455
|
+
hasOperator && condition.operator && !isNoValueOperator(condition.operator) && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6368
6456
|
SegmentPopover,
|
|
6369
6457
|
{
|
|
6370
6458
|
open: valueOpen,
|
|
6371
6459
|
onOpenChange: setValueOpen,
|
|
6372
6460
|
minWidth: "240px",
|
|
6373
|
-
trigger: /* @__PURE__ */ (0,
|
|
6461
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6374
6462
|
FilterChipSegment,
|
|
6375
6463
|
{
|
|
6376
6464
|
segmentType: hasValue ? "value" : "placeholder",
|
|
@@ -6380,7 +6468,7 @@ var InteractiveFilterChip = ({
|
|
|
6380
6468
|
onClick: () => setValueOpen(true)
|
|
6381
6469
|
}
|
|
6382
6470
|
) }),
|
|
6383
|
-
children: /* @__PURE__ */ (0,
|
|
6471
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6384
6472
|
ValueInput,
|
|
6385
6473
|
{
|
|
6386
6474
|
dataType: propertyDef.type,
|
|
@@ -6393,7 +6481,7 @@ var InteractiveFilterChip = ({
|
|
|
6393
6481
|
)
|
|
6394
6482
|
}
|
|
6395
6483
|
),
|
|
6396
|
-
hasOperator && condition.operator && isNoValueOperator(condition.operator) && /* @__PURE__ */ (0,
|
|
6484
|
+
hasOperator && condition.operator && isNoValueOperator(condition.operator) && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6397
6485
|
FilterChipSegment,
|
|
6398
6486
|
{
|
|
6399
6487
|
segmentType: "value",
|
|
@@ -6401,14 +6489,14 @@ var InteractiveFilterChip = ({
|
|
|
6401
6489
|
label: condition.operator
|
|
6402
6490
|
}
|
|
6403
6491
|
),
|
|
6404
|
-
hasOperator && /* @__PURE__ */ (0,
|
|
6492
|
+
hasOperator && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6405
6493
|
KebabMenu,
|
|
6406
6494
|
{
|
|
6407
6495
|
open: kebabOpen,
|
|
6408
6496
|
onOpenChange: setKebabOpen,
|
|
6409
6497
|
onConvertToAdvanced,
|
|
6410
6498
|
onDelete,
|
|
6411
|
-
children: /* @__PURE__ */ (0,
|
|
6499
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6412
6500
|
FilterChipSegment,
|
|
6413
6501
|
{
|
|
6414
6502
|
segmentType: "button",
|
|
@@ -6427,13 +6515,13 @@ var InteractiveFilterChip = ({
|
|
|
6427
6515
|
InteractiveFilterChip.displayName = "InteractiveFilterChip";
|
|
6428
6516
|
|
|
6429
6517
|
// src/components/ui/filter/filter-system.tsx
|
|
6430
|
-
var
|
|
6518
|
+
var React49 = __toESM(require("react"));
|
|
6431
6519
|
var import_icons34 = require("@l3mpire/icons");
|
|
6432
6520
|
|
|
6433
6521
|
// src/components/ui/filter/advanced-chip.tsx
|
|
6434
|
-
var
|
|
6522
|
+
var React44 = __toESM(require("react"));
|
|
6435
6523
|
var import_icons30 = require("@l3mpire/icons");
|
|
6436
|
-
var
|
|
6524
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
6437
6525
|
var btnBase = [
|
|
6438
6526
|
"flex items-center justify-center",
|
|
6439
6527
|
"min-h-[32px] max-h-[32px]",
|
|
@@ -6442,9 +6530,9 @@ var btnBase = [
|
|
|
6442
6530
|
"cursor-pointer transition-colors",
|
|
6443
6531
|
"hover:from-[var(--color-btn-outlined-neutral-bg-hover)] hover:to-[var(--color-btn-outlined-neutral-bg-gradient-to-hover)]"
|
|
6444
6532
|
];
|
|
6445
|
-
var AdvancedChip =
|
|
6446
|
-
({ className, count, onClear, onClick, ...props }, ref) => /* @__PURE__ */ (0,
|
|
6447
|
-
/* @__PURE__ */ (0,
|
|
6533
|
+
var AdvancedChip = React44.forwardRef(
|
|
6534
|
+
({ className, count, onClear, onClick, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: cn("inline-flex items-center", className), children: [
|
|
6535
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
6448
6536
|
"button",
|
|
6449
6537
|
{
|
|
6450
6538
|
ref,
|
|
@@ -6457,12 +6545,12 @@ var AdvancedChip = React43.forwardRef(
|
|
|
6457
6545
|
),
|
|
6458
6546
|
...props,
|
|
6459
6547
|
children: [
|
|
6460
|
-
/* @__PURE__ */ (0,
|
|
6461
|
-
/* @__PURE__ */ (0,
|
|
6548
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "text-sm font-medium leading-sm whitespace-nowrap text-[var(--color-foreground)]", children: "Advanced filters" }),
|
|
6549
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "flex items-center p-2xs rounded-xs bg-filter-chip-badge-bg", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "text-[10px] font-medium leading-2xs text-filter-chip-badge-text", children: count }) })
|
|
6462
6550
|
]
|
|
6463
6551
|
}
|
|
6464
6552
|
),
|
|
6465
|
-
onClear && /* @__PURE__ */ (0,
|
|
6553
|
+
onClear && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6466
6554
|
"button",
|
|
6467
6555
|
{
|
|
6468
6556
|
type: "button",
|
|
@@ -6476,7 +6564,7 @@ var AdvancedChip = React43.forwardRef(
|
|
|
6476
6564
|
"rounded-r-md -ml-px"
|
|
6477
6565
|
),
|
|
6478
6566
|
"aria-label": "Clear all advanced filters",
|
|
6479
|
-
children: /* @__PURE__ */ (0,
|
|
6567
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_icons30.Icon, { icon: import_icons30.faXmarkOutline, size: "sm", className: "text-[var(--color-foreground)]" })
|
|
6480
6568
|
}
|
|
6481
6569
|
)
|
|
6482
6570
|
] })
|
|
@@ -6484,15 +6572,15 @@ var AdvancedChip = React43.forwardRef(
|
|
|
6484
6572
|
AdvancedChip.displayName = "AdvancedChip";
|
|
6485
6573
|
|
|
6486
6574
|
// src/components/ui/filter/advanced-popover.tsx
|
|
6487
|
-
var
|
|
6575
|
+
var React46 = __toESM(require("react"));
|
|
6488
6576
|
var PopoverPrimitive10 = __toESM(require("@radix-ui/react-popover"));
|
|
6489
6577
|
var import_icons32 = require("@l3mpire/icons");
|
|
6490
6578
|
|
|
6491
6579
|
// src/components/ui/filter/advanced-row.tsx
|
|
6492
|
-
var
|
|
6580
|
+
var React45 = __toESM(require("react"));
|
|
6493
6581
|
var PopoverPrimitive9 = __toESM(require("@radix-ui/react-popover"));
|
|
6494
6582
|
var import_icons31 = require("@l3mpire/icons");
|
|
6495
|
-
var
|
|
6583
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
6496
6584
|
var selectBtnStyle = [
|
|
6497
6585
|
"flex items-center gap-base",
|
|
6498
6586
|
"px-base py-sm",
|
|
@@ -6511,8 +6599,8 @@ var AdvancedRow = ({
|
|
|
6511
6599
|
onPropertyChange,
|
|
6512
6600
|
onDelete
|
|
6513
6601
|
}) => {
|
|
6514
|
-
const [operatorOpen, setOperatorOpen] =
|
|
6515
|
-
const [propertyOpen, setPropertyOpen] =
|
|
6602
|
+
const [operatorOpen, setOperatorOpen] = React45.useState(false);
|
|
6603
|
+
const [propertyOpen, setPropertyOpen] = React45.useState(false);
|
|
6516
6604
|
const handleOperatorSelect = (op) => {
|
|
6517
6605
|
if (isNoValueOperator(op)) {
|
|
6518
6606
|
onUpdate({ ...condition, operator: op, value: null });
|
|
@@ -6526,8 +6614,8 @@ var AdvancedRow = ({
|
|
|
6526
6614
|
onUpdate({ ...condition, value: val });
|
|
6527
6615
|
};
|
|
6528
6616
|
const displayValue = condition.value == null ? "" : typeof condition.value === "string" ? condition.value : String(condition.value);
|
|
6529
|
-
return /* @__PURE__ */ (0,
|
|
6530
|
-
connector === "Where" ? /* @__PURE__ */ (0,
|
|
6617
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center gap-base w-full min-w-0", children: [
|
|
6618
|
+
connector === "Where" ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "shrink-0 w-[64px] flex items-center justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "text-xs font-medium leading-xs text-[var(--color-muted-foreground)]", children: "Where" }) }) : /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
6531
6619
|
"button",
|
|
6532
6620
|
{
|
|
6533
6621
|
type: "button",
|
|
@@ -6542,21 +6630,21 @@ var AdvancedRow = ({
|
|
|
6542
6630
|
),
|
|
6543
6631
|
children: [
|
|
6544
6632
|
connector,
|
|
6545
|
-
/* @__PURE__ */ (0,
|
|
6633
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_icons31.Icon, { icon: import_icons31.faRefreshOutline, size: "xs", className: "text-[var(--color-foreground)]" })
|
|
6546
6634
|
]
|
|
6547
6635
|
}
|
|
6548
6636
|
),
|
|
6549
|
-
/* @__PURE__ */ (0,
|
|
6550
|
-
/* @__PURE__ */ (0,
|
|
6551
|
-
/* @__PURE__ */ (0,
|
|
6552
|
-
/* @__PURE__ */ (0,
|
|
6637
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(PopoverPrimitive9.Root, { open: propertyOpen, onOpenChange: setPropertyOpen, children: [
|
|
6638
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(PopoverPrimitive9.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("button", { type: "button", className: cn(selectBtnStyle, "min-w-0"), children: [
|
|
6639
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_icons31.Icon, { icon: propertyDef.icon, size: "sm", className: "shrink-0 text-[var(--color-muted-foreground)]" }),
|
|
6640
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("span", { className: "text-sm font-regular leading-sm text-[var(--color-foreground)] whitespace-nowrap truncate", children: [
|
|
6553
6641
|
propertyDef.groupLabel,
|
|
6554
6642
|
" > ",
|
|
6555
6643
|
propertyDef.label
|
|
6556
6644
|
] }),
|
|
6557
|
-
/* @__PURE__ */ (0,
|
|
6645
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_icons31.Icon, { icon: import_icons31.faChevronDownOutline, size: "xs", className: "shrink-0 text-[var(--color-foreground)]" })
|
|
6558
6646
|
] }) }),
|
|
6559
|
-
/* @__PURE__ */ (0,
|
|
6647
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(PopoverPrimitive9.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6560
6648
|
PopoverPrimitive9.Content,
|
|
6561
6649
|
{
|
|
6562
6650
|
sideOffset: 4,
|
|
@@ -6568,7 +6656,7 @@ var AdvancedRow = ({
|
|
|
6568
6656
|
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
|
|
6569
6657
|
"min-w-[200px]"
|
|
6570
6658
|
),
|
|
6571
|
-
children: properties.map((p) => /* @__PURE__ */ (0,
|
|
6659
|
+
children: properties.map((p) => /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
6572
6660
|
"button",
|
|
6573
6661
|
{
|
|
6574
6662
|
type: "button",
|
|
@@ -6582,8 +6670,8 @@ var AdvancedRow = ({
|
|
|
6582
6670
|
p.id === condition.propertyId && "bg-[var(--color-dropdown-item-hover)]"
|
|
6583
6671
|
),
|
|
6584
6672
|
children: [
|
|
6585
|
-
/* @__PURE__ */ (0,
|
|
6586
|
-
/* @__PURE__ */ (0,
|
|
6673
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_icons31.Icon, { icon: p.icon, size: "sm", className: "shrink-0 text-[var(--color-dropdown-item-icon)]" }),
|
|
6674
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "text-sm font-regular leading-sm text-[var(--color-dropdown-item-text)] truncate", children: p.label })
|
|
6587
6675
|
]
|
|
6588
6676
|
},
|
|
6589
6677
|
p.id
|
|
@@ -6591,12 +6679,12 @@ var AdvancedRow = ({
|
|
|
6591
6679
|
}
|
|
6592
6680
|
) })
|
|
6593
6681
|
] }),
|
|
6594
|
-
/* @__PURE__ */ (0,
|
|
6595
|
-
/* @__PURE__ */ (0,
|
|
6596
|
-
/* @__PURE__ */ (0,
|
|
6597
|
-
/* @__PURE__ */ (0,
|
|
6682
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(PopoverPrimitive9.Root, { open: operatorOpen, onOpenChange: setOperatorOpen, children: [
|
|
6683
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(PopoverPrimitive9.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("button", { type: "button", className: cn(selectBtnStyle, "min-w-0"), children: [
|
|
6684
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "text-sm font-regular leading-sm text-[var(--color-foreground)] whitespace-nowrap truncate text-left", children: condition.operator ?? "Select" }),
|
|
6685
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_icons31.Icon, { icon: import_icons31.faChevronDownOutline, size: "xs", className: "shrink-0 text-[var(--color-foreground)]" })
|
|
6598
6686
|
] }) }),
|
|
6599
|
-
/* @__PURE__ */ (0,
|
|
6687
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(PopoverPrimitive9.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6600
6688
|
PopoverPrimitive9.Content,
|
|
6601
6689
|
{
|
|
6602
6690
|
sideOffset: 4,
|
|
@@ -6608,7 +6696,7 @@ var AdvancedRow = ({
|
|
|
6608
6696
|
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
|
|
6609
6697
|
"min-w-[160px]"
|
|
6610
6698
|
),
|
|
6611
|
-
children: /* @__PURE__ */ (0,
|
|
6699
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6612
6700
|
OperatorList,
|
|
6613
6701
|
{
|
|
6614
6702
|
dataType: propertyDef.type,
|
|
@@ -6619,7 +6707,7 @@ var AdvancedRow = ({
|
|
|
6619
6707
|
}
|
|
6620
6708
|
) })
|
|
6621
6709
|
] }),
|
|
6622
|
-
condition.operator && !isNoValueOperator(condition.operator) && /* @__PURE__ */ (0,
|
|
6710
|
+
condition.operator && !isNoValueOperator(condition.operator) && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6623
6711
|
"input",
|
|
6624
6712
|
{
|
|
6625
6713
|
type: "text",
|
|
@@ -6627,7 +6715,7 @@ var AdvancedRow = ({
|
|
|
6627
6715
|
onChange: (e) => handleValueChange(e.target.value),
|
|
6628
6716
|
placeholder: "Placeholder",
|
|
6629
6717
|
className: cn(
|
|
6630
|
-
"w-[
|
|
6718
|
+
"flex-1 min-w-[80px] px-base py-sm rounded-md",
|
|
6631
6719
|
"border border-[var(--color-input)]",
|
|
6632
6720
|
"bg-[var(--color-background)] text-sm font-regular leading-sm text-[var(--color-foreground)]",
|
|
6633
6721
|
"placeholder:text-[var(--color-muted-foreground)]",
|
|
@@ -6635,14 +6723,14 @@ var AdvancedRow = ({
|
|
|
6635
6723
|
)
|
|
6636
6724
|
}
|
|
6637
6725
|
),
|
|
6638
|
-
/* @__PURE__ */ (0,
|
|
6726
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6639
6727
|
"button",
|
|
6640
6728
|
{
|
|
6641
6729
|
type: "button",
|
|
6642
6730
|
onClick: onDelete,
|
|
6643
6731
|
className: "ml-auto shrink-0 flex items-center justify-center p-sm rounded-md cursor-pointer transition-colors hover:bg-[var(--color-accent)]",
|
|
6644
6732
|
"aria-label": "Remove filter",
|
|
6645
|
-
children: /* @__PURE__ */ (0,
|
|
6733
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_icons31.Icon, { icon: import_icons31.faXmarkOutline, size: "sm", className: "text-[var(--color-foreground)]" })
|
|
6646
6734
|
}
|
|
6647
6735
|
)
|
|
6648
6736
|
] });
|
|
@@ -6650,7 +6738,7 @@ var AdvancedRow = ({
|
|
|
6650
6738
|
AdvancedRow.displayName = "AdvancedRow";
|
|
6651
6739
|
|
|
6652
6740
|
// src/components/ui/filter/advanced-popover.tsx
|
|
6653
|
-
var
|
|
6741
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
6654
6742
|
var outlinedBtn = [
|
|
6655
6743
|
"flex items-center gap-sm px-base py-sm",
|
|
6656
6744
|
"min-h-[32px] max-h-[32px] min-w-[80px]",
|
|
@@ -6667,8 +6755,8 @@ var AdvancedPopover = ({
|
|
|
6667
6755
|
onOpenChange,
|
|
6668
6756
|
children
|
|
6669
6757
|
}) => {
|
|
6670
|
-
const [addSelectorOpen, setAddSelectorOpen] =
|
|
6671
|
-
const [logicOps, setLogicOps] =
|
|
6758
|
+
const [addSelectorOpen, setAddSelectorOpen] = React46.useState(false);
|
|
6759
|
+
const [logicOps, setLogicOps] = React46.useState({});
|
|
6672
6760
|
const getPropertyDef = (propertyId) => properties.find((p) => p.id === propertyId);
|
|
6673
6761
|
const handleUpdateFilter = (updated) => {
|
|
6674
6762
|
onFiltersChange(filters.map((f) => f.id === updated.id ? updated : f));
|
|
@@ -6697,26 +6785,28 @@ var AdvancedPopover = ({
|
|
|
6697
6785
|
[filterId]: (prev[filterId] ?? "and") === "and" ? "or" : "and"
|
|
6698
6786
|
}));
|
|
6699
6787
|
};
|
|
6700
|
-
return /* @__PURE__ */ (0,
|
|
6701
|
-
/* @__PURE__ */ (0,
|
|
6702
|
-
/* @__PURE__ */ (0,
|
|
6788
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(PopoverPrimitive10.Root, { open, onOpenChange, children: [
|
|
6789
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PopoverPrimitive10.Trigger, { asChild: true, children }),
|
|
6790
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PopoverPrimitive10.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
6703
6791
|
PopoverPrimitive10.Content,
|
|
6704
6792
|
{
|
|
6705
6793
|
sideOffset: 4,
|
|
6706
6794
|
align: "start",
|
|
6795
|
+
collisionPadding: 16,
|
|
6707
6796
|
className: cn(
|
|
6708
6797
|
"z-50 flex flex-col",
|
|
6709
6798
|
"bg-[var(--color-background)] rounded-md shadow-lg",
|
|
6710
6799
|
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
6711
6800
|
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
6712
|
-
"data-[side=bottom]:slide-in-from-top-2"
|
|
6801
|
+
"data-[side=bottom]:slide-in-from-top-2",
|
|
6802
|
+
"w-[min(520px,calc(100vw-32px))]"
|
|
6713
6803
|
),
|
|
6714
6804
|
children: [
|
|
6715
|
-
/* @__PURE__ */ (0,
|
|
6805
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-col gap-base p-base", children: [
|
|
6716
6806
|
filters.map((filter, i) => {
|
|
6717
6807
|
const propDef = getPropertyDef(filter.propertyId);
|
|
6718
6808
|
if (!propDef) return null;
|
|
6719
|
-
return /* @__PURE__ */ (0,
|
|
6809
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6720
6810
|
AdvancedRow,
|
|
6721
6811
|
{
|
|
6722
6812
|
connector: i === 0 ? "Where" : (logicOps[filter.id] ?? "and") === "and" ? "And" : "Or",
|
|
@@ -6731,23 +6821,23 @@ var AdvancedPopover = ({
|
|
|
6731
6821
|
filter.id
|
|
6732
6822
|
);
|
|
6733
6823
|
}),
|
|
6734
|
-
filters.length === 0 && /* @__PURE__ */ (0,
|
|
6824
|
+
filters.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "py-base text-sm text-[var(--color-muted-foreground)]", children: "No advanced filters yet." })
|
|
6735
6825
|
] }),
|
|
6736
|
-
/* @__PURE__ */ (0,
|
|
6737
|
-
/* @__PURE__ */ (0,
|
|
6826
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center justify-between p-base border-t border-[var(--color-border)]", children: [
|
|
6827
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6738
6828
|
PropertySelector,
|
|
6739
6829
|
{
|
|
6740
6830
|
properties,
|
|
6741
6831
|
onSelect: handleAddFilter,
|
|
6742
6832
|
open: addSelectorOpen,
|
|
6743
6833
|
onOpenChange: setAddSelectorOpen,
|
|
6744
|
-
children: /* @__PURE__ */ (0,
|
|
6745
|
-
/* @__PURE__ */ (0,
|
|
6834
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("button", { type: "button", className: cn(outlinedBtn), children: [
|
|
6835
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_icons32.Icon, { icon: import_icons32.faPlusOutline, size: "sm", className: "text-[var(--color-foreground)]" }),
|
|
6746
6836
|
"Add filter"
|
|
6747
6837
|
] })
|
|
6748
6838
|
}
|
|
6749
6839
|
),
|
|
6750
|
-
/* @__PURE__ */ (0,
|
|
6840
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6751
6841
|
"button",
|
|
6752
6842
|
{
|
|
6753
6843
|
type: "button",
|
|
@@ -6765,10 +6855,10 @@ var AdvancedPopover = ({
|
|
|
6765
6855
|
AdvancedPopover.displayName = "AdvancedPopover";
|
|
6766
6856
|
|
|
6767
6857
|
// src/components/ui/filter/summary-chip.tsx
|
|
6768
|
-
var
|
|
6858
|
+
var React47 = __toESM(require("react"));
|
|
6769
6859
|
var PopoverPrimitive11 = __toESM(require("@radix-ui/react-popover"));
|
|
6770
6860
|
var import_icons33 = require("@l3mpire/icons");
|
|
6771
|
-
var
|
|
6861
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
6772
6862
|
var SummaryChip = ({
|
|
6773
6863
|
count,
|
|
6774
6864
|
filters,
|
|
@@ -6777,9 +6867,9 @@ var SummaryChip = ({
|
|
|
6777
6867
|
onClearAll,
|
|
6778
6868
|
className
|
|
6779
6869
|
}) => {
|
|
6780
|
-
const [open, setOpen] =
|
|
6781
|
-
const [addSelectorOpen, setAddSelectorOpen] =
|
|
6782
|
-
const [logicOps, setLogicOps] =
|
|
6870
|
+
const [open, setOpen] = React47.useState(false);
|
|
6871
|
+
const [addSelectorOpen, setAddSelectorOpen] = React47.useState(false);
|
|
6872
|
+
const [logicOps, setLogicOps] = React47.useState({});
|
|
6783
6873
|
const getPropertyDef = (propertyId) => properties.find((p) => p.id === propertyId);
|
|
6784
6874
|
const handleUpdateFilter = (updated) => {
|
|
6785
6875
|
onFiltersChange(filters.map((f) => f.id === updated.id ? updated : f));
|
|
@@ -6800,8 +6890,8 @@ var SummaryChip = ({
|
|
|
6800
6890
|
onFiltersChange([...filters, newFilter]);
|
|
6801
6891
|
setAddSelectorOpen(false);
|
|
6802
6892
|
};
|
|
6803
|
-
return /* @__PURE__ */ (0,
|
|
6804
|
-
/* @__PURE__ */ (0,
|
|
6893
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(PopoverPrimitive11.Root, { open, onOpenChange: setOpen, children: [
|
|
6894
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(PopoverPrimitive11.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
6805
6895
|
"button",
|
|
6806
6896
|
{
|
|
6807
6897
|
type: "button",
|
|
@@ -6815,7 +6905,7 @@ var SummaryChip = ({
|
|
|
6815
6905
|
className
|
|
6816
6906
|
),
|
|
6817
6907
|
children: [
|
|
6818
|
-
/* @__PURE__ */ (0,
|
|
6908
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
6819
6909
|
import_icons33.Icon,
|
|
6820
6910
|
{
|
|
6821
6911
|
icon: import_icons33.faSlidersOutline,
|
|
@@ -6823,30 +6913,31 @@ var SummaryChip = ({
|
|
|
6823
6913
|
className: "shrink-0 text-[var(--color-foreground)]"
|
|
6824
6914
|
}
|
|
6825
6915
|
),
|
|
6826
|
-
/* @__PURE__ */ (0,
|
|
6827
|
-
count > 0 && /* @__PURE__ */ (0,
|
|
6916
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "text-sm font-medium leading-sm whitespace-nowrap text-[var(--color-foreground)]", children: "Filters" }),
|
|
6917
|
+
count > 0 && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "flex items-center p-2xs rounded-xs bg-filter-chip-badge-bg", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "text-[10px] font-medium leading-2xs text-filter-chip-badge-text", children: count }) })
|
|
6828
6918
|
]
|
|
6829
6919
|
}
|
|
6830
6920
|
) }),
|
|
6831
|
-
/* @__PURE__ */ (0,
|
|
6921
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(PopoverPrimitive11.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
6832
6922
|
PopoverPrimitive11.Content,
|
|
6833
6923
|
{
|
|
6834
6924
|
sideOffset: 4,
|
|
6835
6925
|
align: "start",
|
|
6926
|
+
collisionPadding: 16,
|
|
6836
6927
|
className: cn(
|
|
6837
6928
|
"z-50 flex flex-col overflow-clip",
|
|
6838
6929
|
"bg-[var(--color-dropdown-bg)] border border-[var(--color-dropdown-border)] rounded-md shadow-lg",
|
|
6839
6930
|
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
6840
6931
|
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
6841
6932
|
"data-[side=bottom]:slide-in-from-top-2",
|
|
6842
|
-
"
|
|
6933
|
+
"w-[min(520px,calc(100vw-32px))]"
|
|
6843
6934
|
),
|
|
6844
6935
|
children: [
|
|
6845
|
-
/* @__PURE__ */ (0,
|
|
6936
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex flex-col gap-base p-base", children: [
|
|
6846
6937
|
filters.map((filter, i) => {
|
|
6847
6938
|
const propDef = getPropertyDef(filter.propertyId);
|
|
6848
6939
|
if (!propDef) return null;
|
|
6849
|
-
return /* @__PURE__ */ (0,
|
|
6940
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
6850
6941
|
AdvancedRow,
|
|
6851
6942
|
{
|
|
6852
6943
|
connector: i === 0 ? "Where" : (logicOps[filter.id] ?? "and") === "and" ? "And" : "Or",
|
|
@@ -6861,17 +6952,17 @@ var SummaryChip = ({
|
|
|
6861
6952
|
filter.id
|
|
6862
6953
|
);
|
|
6863
6954
|
}),
|
|
6864
|
-
filters.length === 0 && /* @__PURE__ */ (0,
|
|
6955
|
+
filters.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: "py-base text-sm text-[var(--color-muted-foreground)]", children: "No active filters." })
|
|
6865
6956
|
] }),
|
|
6866
|
-
/* @__PURE__ */ (0,
|
|
6867
|
-
/* @__PURE__ */ (0,
|
|
6957
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex items-center justify-between p-base border-t border-[var(--color-border)]", children: [
|
|
6958
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
6868
6959
|
PropertySelector,
|
|
6869
6960
|
{
|
|
6870
6961
|
properties,
|
|
6871
6962
|
onSelect: handleAddFilter,
|
|
6872
6963
|
open: addSelectorOpen,
|
|
6873
6964
|
onOpenChange: setAddSelectorOpen,
|
|
6874
|
-
children: /* @__PURE__ */ (0,
|
|
6965
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
6875
6966
|
"button",
|
|
6876
6967
|
{
|
|
6877
6968
|
type: "button",
|
|
@@ -6884,14 +6975,14 @@ var SummaryChip = ({
|
|
|
6884
6975
|
"hover:from-[var(--color-btn-outlined-neutral-bg-hover)] hover:to-[var(--color-btn-outlined-neutral-bg-gradient-to-hover)]"
|
|
6885
6976
|
),
|
|
6886
6977
|
children: [
|
|
6887
|
-
/* @__PURE__ */ (0,
|
|
6978
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_icons33.Icon, { icon: import_icons33.faPlusOutline, size: "sm", className: "text-[var(--color-foreground)]" }),
|
|
6888
6979
|
"Add filter"
|
|
6889
6980
|
]
|
|
6890
6981
|
}
|
|
6891
6982
|
)
|
|
6892
6983
|
}
|
|
6893
6984
|
),
|
|
6894
|
-
filters.length > 0 && /* @__PURE__ */ (0,
|
|
6985
|
+
filters.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
6895
6986
|
"button",
|
|
6896
6987
|
{
|
|
6897
6988
|
type: "button",
|
|
@@ -6912,10 +7003,10 @@ var SummaryChip = ({
|
|
|
6912
7003
|
SummaryChip.displayName = "SummaryChip";
|
|
6913
7004
|
|
|
6914
7005
|
// src/components/ui/filter/use-filter-bar-mode.ts
|
|
6915
|
-
var
|
|
7006
|
+
var React48 = __toESM(require("react"));
|
|
6916
7007
|
function useFilterBarMode(ref, override) {
|
|
6917
|
-
const [mode, setMode] =
|
|
6918
|
-
|
|
7008
|
+
const [mode, setMode] = React48.useState("default");
|
|
7009
|
+
React48.useEffect(() => {
|
|
6919
7010
|
if (override) return;
|
|
6920
7011
|
const el = ref.current;
|
|
6921
7012
|
if (!el) return;
|
|
@@ -6930,7 +7021,7 @@ function useFilterBarMode(ref, override) {
|
|
|
6930
7021
|
}
|
|
6931
7022
|
|
|
6932
7023
|
// src/components/ui/filter/filter-system.tsx
|
|
6933
|
-
var
|
|
7024
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
6934
7025
|
var FilterSystem = ({
|
|
6935
7026
|
properties,
|
|
6936
7027
|
filterState,
|
|
@@ -6941,11 +7032,11 @@ var FilterSystem = ({
|
|
|
6941
7032
|
actions,
|
|
6942
7033
|
className
|
|
6943
7034
|
}) => {
|
|
6944
|
-
const containerRef =
|
|
7035
|
+
const containerRef = React49.useRef(null);
|
|
6945
7036
|
const mode = useFilterBarMode(containerRef, modeOverride);
|
|
6946
|
-
const [propertySelectorOpen, setPropertySelectorOpen] =
|
|
6947
|
-
const [advancedOpen, setAdvancedOpen] =
|
|
6948
|
-
const [pendingFilterId, setPendingFilterId] =
|
|
7037
|
+
const [propertySelectorOpen, setPropertySelectorOpen] = React49.useState(false);
|
|
7038
|
+
const [advancedOpen, setAdvancedOpen] = React49.useState(false);
|
|
7039
|
+
const [pendingFilterId, setPendingFilterId] = React49.useState(null);
|
|
6949
7040
|
const allFilters = [...filterState.basicFilters, ...filterState.advancedFilters];
|
|
6950
7041
|
const totalCount = allFilters.length;
|
|
6951
7042
|
const handleAddFilter = (property) => {
|
|
@@ -7020,10 +7111,10 @@ var FilterSystem = ({
|
|
|
7020
7111
|
const getPropertyDef = (propertyId) => properties.find((p) => p.id === propertyId);
|
|
7021
7112
|
const hasAdvanced = filterState.advancedFilters.length > 0;
|
|
7022
7113
|
const isMinimal = mode === "minimal";
|
|
7023
|
-
return /* @__PURE__ */ (0,
|
|
7024
|
-
/* @__PURE__ */ (0,
|
|
7114
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(FilterBar, { ref: containerRef, className, children: [
|
|
7115
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(FilterBarLeft, { children: [
|
|
7025
7116
|
children,
|
|
7026
|
-
sortFields && filterState.sort && /* @__PURE__ */ (0,
|
|
7117
|
+
sortFields && filterState.sort && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7027
7118
|
SortButton,
|
|
7028
7119
|
{
|
|
7029
7120
|
fields: sortFields,
|
|
@@ -7035,7 +7126,7 @@ var FilterSystem = ({
|
|
|
7035
7126
|
),
|
|
7036
7127
|
isMinimal ? totalCount > 0 ? (
|
|
7037
7128
|
/* Has filters → SummaryChip (interactive popover) */
|
|
7038
|
-
/* @__PURE__ */ (0,
|
|
7129
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7039
7130
|
SummaryChip,
|
|
7040
7131
|
{
|
|
7041
7132
|
count: totalCount,
|
|
@@ -7053,20 +7144,20 @@ var FilterSystem = ({
|
|
|
7053
7144
|
)
|
|
7054
7145
|
) : (
|
|
7055
7146
|
/* No filters → same FilterBarButton as default, icon-only */
|
|
7056
|
-
/* @__PURE__ */ (0,
|
|
7147
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7057
7148
|
PropertySelector,
|
|
7058
7149
|
{
|
|
7059
7150
|
properties,
|
|
7060
7151
|
onSelect: handleAddFilter,
|
|
7061
7152
|
open: propertySelectorOpen,
|
|
7062
7153
|
onOpenChange: setPropertySelectorOpen,
|
|
7063
|
-
children: /* @__PURE__ */ (0,
|
|
7154
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(FilterBarButton, { iconOnly: true })
|
|
7064
7155
|
}
|
|
7065
7156
|
)
|
|
7066
7157
|
) : (
|
|
7067
7158
|
/* ── DEFAULT MODE ────────────────────────────────────── */
|
|
7068
|
-
/* @__PURE__ */ (0,
|
|
7069
|
-
hasAdvanced && /* @__PURE__ */ (0,
|
|
7159
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
7160
|
+
hasAdvanced && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7070
7161
|
AdvancedPopover,
|
|
7071
7162
|
{
|
|
7072
7163
|
filters: filterState.advancedFilters,
|
|
@@ -7074,7 +7165,7 @@ var FilterSystem = ({
|
|
|
7074
7165
|
onFiltersChange: handleAdvancedFiltersChange,
|
|
7075
7166
|
open: advancedOpen,
|
|
7076
7167
|
onOpenChange: setAdvancedOpen,
|
|
7077
|
-
children: /* @__PURE__ */ (0,
|
|
7168
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7078
7169
|
AdvancedChip,
|
|
7079
7170
|
{
|
|
7080
7171
|
count: filterState.advancedFilters.length,
|
|
@@ -7087,7 +7178,7 @@ var FilterSystem = ({
|
|
|
7087
7178
|
filterState.basicFilters.map((filter) => {
|
|
7088
7179
|
const propDef = getPropertyDef(filter.propertyId);
|
|
7089
7180
|
if (!propDef) return null;
|
|
7090
|
-
return /* @__PURE__ */ (0,
|
|
7181
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7091
7182
|
InteractiveFilterChip,
|
|
7092
7183
|
{
|
|
7093
7184
|
propertyDef: propDef,
|
|
@@ -7103,14 +7194,14 @@ var FilterSystem = ({
|
|
|
7103
7194
|
filter.id
|
|
7104
7195
|
);
|
|
7105
7196
|
}),
|
|
7106
|
-
/* @__PURE__ */ (0,
|
|
7197
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7107
7198
|
PropertySelector,
|
|
7108
7199
|
{
|
|
7109
7200
|
properties,
|
|
7110
7201
|
onSelect: handleAddFilter,
|
|
7111
7202
|
open: propertySelectorOpen,
|
|
7112
7203
|
onOpenChange: setPropertySelectorOpen,
|
|
7113
|
-
children: /* @__PURE__ */ (0,
|
|
7204
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7114
7205
|
FilterBarButton,
|
|
7115
7206
|
{
|
|
7116
7207
|
count: totalCount || void 0
|
|
@@ -7119,29 +7210,27 @@ var FilterSystem = ({
|
|
|
7119
7210
|
}
|
|
7120
7211
|
)
|
|
7121
7212
|
] })
|
|
7122
|
-
)
|
|
7123
|
-
|
|
7124
|
-
(actions || totalCount > 0) && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(FilterBarRight, { children: [
|
|
7125
|
-
totalCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
7213
|
+
),
|
|
7214
|
+
totalCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7126
7215
|
"button",
|
|
7127
7216
|
{
|
|
7128
7217
|
type: "button",
|
|
7129
7218
|
onClick: handleClearAll,
|
|
7130
7219
|
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)]",
|
|
7131
|
-
children: isMinimal ? /* @__PURE__ */ (0,
|
|
7220
|
+
children: isMinimal ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_icons34.Icon, { icon: import_icons34.faXmarkOutline, size: "sm", className: "text-[var(--color-foreground)]" }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "text-sm font-medium leading-sm text-[var(--color-foreground)]", children: "Clear" })
|
|
7132
7221
|
}
|
|
7133
|
-
)
|
|
7134
|
-
|
|
7135
|
-
|
|
7222
|
+
)
|
|
7223
|
+
] }),
|
|
7224
|
+
actions && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(FilterBarRight, { children: actions })
|
|
7136
7225
|
] });
|
|
7137
7226
|
};
|
|
7138
7227
|
FilterSystem.displayName = "FilterSystem";
|
|
7139
7228
|
|
|
7140
7229
|
// src/components/ui/date-picker.tsx
|
|
7141
|
-
var
|
|
7230
|
+
var React50 = __toESM(require("react"));
|
|
7142
7231
|
var PopoverPrimitive12 = __toESM(require("@radix-ui/react-popover"));
|
|
7143
7232
|
var import_icons35 = require("@l3mpire/icons");
|
|
7144
|
-
var
|
|
7233
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
7145
7234
|
function getDaysInMonth(year, month) {
|
|
7146
7235
|
return new Date(year, month + 1, 0).getDate();
|
|
7147
7236
|
}
|
|
@@ -7173,16 +7262,16 @@ var MONTH_NAMES = [
|
|
|
7173
7262
|
"November",
|
|
7174
7263
|
"December"
|
|
7175
7264
|
];
|
|
7176
|
-
var DatePickerContext =
|
|
7265
|
+
var DatePickerContext = React50.createContext(
|
|
7177
7266
|
null
|
|
7178
7267
|
);
|
|
7179
7268
|
function useDatePickerContext() {
|
|
7180
|
-
const ctx =
|
|
7269
|
+
const ctx = React50.useContext(DatePickerContext);
|
|
7181
7270
|
if (!ctx)
|
|
7182
7271
|
throw new Error("DatePicker compound components must be used within <DatePicker>");
|
|
7183
7272
|
return ctx;
|
|
7184
7273
|
}
|
|
7185
|
-
var DatePicker =
|
|
7274
|
+
var DatePicker = React50.forwardRef(
|
|
7186
7275
|
({
|
|
7187
7276
|
className,
|
|
7188
7277
|
mode = "single",
|
|
@@ -7193,22 +7282,22 @@ var DatePicker = React49.forwardRef(
|
|
|
7193
7282
|
children,
|
|
7194
7283
|
...props
|
|
7195
7284
|
}, ref) => {
|
|
7196
|
-
const today =
|
|
7197
|
-
const initialDate =
|
|
7285
|
+
const today = React50.useMemo(() => startOfDay(/* @__PURE__ */ new Date()), []);
|
|
7286
|
+
const initialDate = React50.useMemo(() => {
|
|
7198
7287
|
if (value) {
|
|
7199
7288
|
if (value instanceof Date) return value;
|
|
7200
7289
|
return value.from;
|
|
7201
7290
|
}
|
|
7202
7291
|
return today;
|
|
7203
7292
|
}, []);
|
|
7204
|
-
const [month, setMonth] =
|
|
7293
|
+
const [month, setMonth] = React50.useState(
|
|
7205
7294
|
defaultMonth ?? initialDate.getMonth()
|
|
7206
7295
|
);
|
|
7207
|
-
const [year, setYear] =
|
|
7296
|
+
const [year, setYear] = React50.useState(
|
|
7208
7297
|
defaultYear ?? initialDate.getFullYear()
|
|
7209
7298
|
);
|
|
7210
|
-
const [hoveredDate, setHoveredDate] =
|
|
7211
|
-
const goToPrevMonth =
|
|
7299
|
+
const [hoveredDate, setHoveredDate] = React50.useState();
|
|
7300
|
+
const goToPrevMonth = React50.useCallback(() => {
|
|
7212
7301
|
setMonth((m) => {
|
|
7213
7302
|
if (m === 0) {
|
|
7214
7303
|
setYear((y) => y - 1);
|
|
@@ -7217,7 +7306,7 @@ var DatePicker = React49.forwardRef(
|
|
|
7217
7306
|
return m - 1;
|
|
7218
7307
|
});
|
|
7219
7308
|
}, []);
|
|
7220
|
-
const goToNextMonth =
|
|
7309
|
+
const goToNextMonth = React50.useCallback(() => {
|
|
7221
7310
|
setMonth((m) => {
|
|
7222
7311
|
if (m === 11) {
|
|
7223
7312
|
setYear((y) => y + 1);
|
|
@@ -7226,7 +7315,7 @@ var DatePicker = React49.forwardRef(
|
|
|
7226
7315
|
return m + 1;
|
|
7227
7316
|
});
|
|
7228
7317
|
}, []);
|
|
7229
|
-
const onSelect =
|
|
7318
|
+
const onSelect = React50.useCallback(
|
|
7230
7319
|
(date) => {
|
|
7231
7320
|
if (mode === "single") {
|
|
7232
7321
|
onValueChange?.(date);
|
|
@@ -7245,7 +7334,7 @@ var DatePicker = React49.forwardRef(
|
|
|
7245
7334
|
},
|
|
7246
7335
|
[mode, value, onValueChange]
|
|
7247
7336
|
);
|
|
7248
|
-
const ctxValue =
|
|
7337
|
+
const ctxValue = React50.useMemo(
|
|
7249
7338
|
() => ({
|
|
7250
7339
|
mode,
|
|
7251
7340
|
selected: value,
|
|
@@ -7272,7 +7361,7 @@ var DatePicker = React49.forwardRef(
|
|
|
7272
7361
|
hoveredDate
|
|
7273
7362
|
]
|
|
7274
7363
|
);
|
|
7275
|
-
return /* @__PURE__ */ (0,
|
|
7364
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(DatePickerContext.Provider, { value: ctxValue, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
7276
7365
|
"div",
|
|
7277
7366
|
{
|
|
7278
7367
|
ref,
|
|
@@ -7295,22 +7384,22 @@ function defaultFormatDate(date) {
|
|
|
7295
7384
|
year: "numeric"
|
|
7296
7385
|
});
|
|
7297
7386
|
}
|
|
7298
|
-
var DatePickerSelects =
|
|
7387
|
+
var DatePickerSelects = React50.forwardRef(({ className, formatDate = defaultFormatDate, ...props }, ref) => {
|
|
7299
7388
|
const { selected } = useDatePickerContext();
|
|
7300
7389
|
const fromDate = selected instanceof Date ? selected : selected?.from;
|
|
7301
7390
|
const toDate = selected instanceof Date ? void 0 : selected?.to;
|
|
7302
|
-
return /* @__PURE__ */ (0,
|
|
7391
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
7303
7392
|
"div",
|
|
7304
7393
|
{
|
|
7305
7394
|
ref,
|
|
7306
7395
|
className: cn("flex flex-col items-start pt-lg px-lg", className),
|
|
7307
7396
|
...props,
|
|
7308
|
-
children: /* @__PURE__ */ (0,
|
|
7309
|
-
/* @__PURE__ */ (0,
|
|
7310
|
-
/* @__PURE__ */ (0,
|
|
7311
|
-
/* @__PURE__ */ (0,
|
|
7397
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex items-center gap-base w-full", children: [
|
|
7398
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex-1 flex items-center gap-base min-w-0 px-base py-sm bg-gradient-to-t from-[var(--color-select-bg-default)] to-[var(--color-select-bg-gradient-to)] border border-[var(--color-select-border-default)] rounded-base shadow-sm", children: [
|
|
7399
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "flex-1 text-sm font-regular leading-sm text-datepicker-header-text truncate", children: fromDate ? formatDate(fromDate) : "Start date" }),
|
|
7400
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_icons35.Icon, { icon: import_icons35.faCalendarOutline, size: "sm", className: "shrink-0 text-datepicker-header-text" })
|
|
7312
7401
|
] }),
|
|
7313
|
-
/* @__PURE__ */ (0,
|
|
7402
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
7314
7403
|
import_icons35.Icon,
|
|
7315
7404
|
{
|
|
7316
7405
|
icon: import_icons35.faArrowRightOutline,
|
|
@@ -7318,9 +7407,9 @@ var DatePickerSelects = React49.forwardRef(({ className, formatDate = defaultFor
|
|
|
7318
7407
|
className: "shrink-0 text-datepicker-header-weekday"
|
|
7319
7408
|
}
|
|
7320
7409
|
),
|
|
7321
|
-
/* @__PURE__ */ (0,
|
|
7322
|
-
/* @__PURE__ */ (0,
|
|
7323
|
-
/* @__PURE__ */ (0,
|
|
7410
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex-1 flex items-center gap-base min-w-0 px-base py-sm bg-gradient-to-t from-[var(--color-select-bg-default)] to-[var(--color-select-bg-gradient-to)] border border-[var(--color-select-border-default)] rounded-base shadow-sm", children: [
|
|
7411
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "flex-1 text-sm font-regular leading-sm text-datepicker-header-text truncate", children: toDate ? formatDate(toDate) : "End date" }),
|
|
7412
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_icons35.Icon, { icon: import_icons35.faCalendarOutline, size: "sm", className: "shrink-0 text-datepicker-header-text" })
|
|
7324
7413
|
] })
|
|
7325
7414
|
] })
|
|
7326
7415
|
}
|
|
@@ -7336,7 +7425,7 @@ var DatePickerDay = ({ date, isOutside }) => {
|
|
|
7336
7425
|
const inRange = mode === "range" && selected && !(selected instanceof Date) && selected.from && selected.to && !isSelected && isInRange(date, selected.from, selected.to);
|
|
7337
7426
|
const inPreviewRange = mode === "range" && selected && !(selected instanceof Date) && selected.from && !selected.to && hoveredDate && !isSelected && hoveredDate.getTime() > selected.from.getTime() && isInRange(date, selected.from, hoveredDate);
|
|
7338
7427
|
const isInRangeOrPreview = inRange || inPreviewRange;
|
|
7339
|
-
return /* @__PURE__ */ (0,
|
|
7428
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
7340
7429
|
"button",
|
|
7341
7430
|
{
|
|
7342
7431
|
type: "button",
|
|
@@ -7360,14 +7449,14 @@ var DatePickerDay = ({ date, isOutside }) => {
|
|
|
7360
7449
|
),
|
|
7361
7450
|
children: [
|
|
7362
7451
|
date.getDate(),
|
|
7363
|
-
isToday && !isOutside && /* @__PURE__ */ (0,
|
|
7452
|
+
isToday && !isOutside && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "absolute bottom-0.5 left-1/2 -translate-x-1/2 size-1.5 rounded-full bg-datepicker-day-today" })
|
|
7364
7453
|
]
|
|
7365
7454
|
}
|
|
7366
7455
|
);
|
|
7367
7456
|
};
|
|
7368
|
-
var DatePickerCalendar =
|
|
7457
|
+
var DatePickerCalendar = React50.forwardRef(({ className, header, ...props }, ref) => {
|
|
7369
7458
|
const { month, year, goToPrevMonth, goToNextMonth } = useDatePickerContext();
|
|
7370
|
-
const weeks =
|
|
7459
|
+
const weeks = React50.useMemo(() => {
|
|
7371
7460
|
const firstDay = new Date(year, month, 1);
|
|
7372
7461
|
const startOffset = getWeekdayIndex(firstDay);
|
|
7373
7462
|
const daysInMonth = getDaysInMonth(year, month);
|
|
@@ -7407,7 +7496,7 @@ var DatePickerCalendar = React49.forwardRef(({ className, header, ...props }, re
|
|
|
7407
7496
|
}
|
|
7408
7497
|
return result;
|
|
7409
7498
|
}, [month, year]);
|
|
7410
|
-
return /* @__PURE__ */ (0,
|
|
7499
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
7411
7500
|
"div",
|
|
7412
7501
|
{
|
|
7413
7502
|
ref,
|
|
@@ -7415,38 +7504,38 @@ var DatePickerCalendar = React49.forwardRef(({ className, header, ...props }, re
|
|
|
7415
7504
|
...props,
|
|
7416
7505
|
children: [
|
|
7417
7506
|
header,
|
|
7418
|
-
/* @__PURE__ */ (0,
|
|
7419
|
-
/* @__PURE__ */ (0,
|
|
7420
|
-
/* @__PURE__ */ (0,
|
|
7507
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-col gap-lg p-lg", children: [
|
|
7508
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
7509
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { className: "text-base font-medium leading-base text-datepicker-header-text", children: [
|
|
7421
7510
|
MONTH_NAMES[month],
|
|
7422
7511
|
" ",
|
|
7423
7512
|
year
|
|
7424
7513
|
] }),
|
|
7425
|
-
/* @__PURE__ */ (0,
|
|
7426
|
-
/* @__PURE__ */ (0,
|
|
7514
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex items-center gap-xs", children: [
|
|
7515
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
7427
7516
|
"button",
|
|
7428
7517
|
{
|
|
7429
7518
|
type: "button",
|
|
7430
7519
|
onClick: goToPrevMonth,
|
|
7431
7520
|
className: "flex items-center justify-center p-xs rounded-base hover:bg-datepicker-day-bg-hover transition-colors cursor-pointer",
|
|
7432
7521
|
"aria-label": "Previous month",
|
|
7433
|
-
children: /* @__PURE__ */ (0,
|
|
7522
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_icons35.Icon, { icon: import_icons35.faChevronLeftOutline, size: "xs", className: "text-datepicker-header-nav" })
|
|
7434
7523
|
}
|
|
7435
7524
|
),
|
|
7436
|
-
/* @__PURE__ */ (0,
|
|
7525
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
7437
7526
|
"button",
|
|
7438
7527
|
{
|
|
7439
7528
|
type: "button",
|
|
7440
7529
|
onClick: goToNextMonth,
|
|
7441
7530
|
className: "flex items-center justify-center p-xs rounded-base hover:bg-datepicker-day-bg-hover transition-colors cursor-pointer",
|
|
7442
7531
|
"aria-label": "Next month",
|
|
7443
|
-
children: /* @__PURE__ */ (0,
|
|
7532
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_icons35.Icon, { icon: import_icons35.faChevronRightOutline, size: "xs", className: "text-datepicker-header-nav" })
|
|
7444
7533
|
}
|
|
7445
7534
|
)
|
|
7446
7535
|
] })
|
|
7447
7536
|
] }),
|
|
7448
|
-
/* @__PURE__ */ (0,
|
|
7449
|
-
/* @__PURE__ */ (0,
|
|
7537
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-col", children: [
|
|
7538
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "grid grid-cols-7 gap-base py-sm", children: WEEKDAYS.map((day) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
7450
7539
|
"span",
|
|
7451
7540
|
{
|
|
7452
7541
|
className: "w-9 text-center text-xs font-regular leading-xs text-datepicker-header-weekday",
|
|
@@ -7454,7 +7543,7 @@ var DatePickerCalendar = React49.forwardRef(({ className, header, ...props }, re
|
|
|
7454
7543
|
},
|
|
7455
7544
|
day
|
|
7456
7545
|
)) }),
|
|
7457
|
-
/* @__PURE__ */ (0,
|
|
7546
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex flex-col", children: weeks.map((week, wi) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "grid grid-cols-7 gap-base", children: week.map((day, di) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
7458
7547
|
DatePickerDay,
|
|
7459
7548
|
{
|
|
7460
7549
|
date: day.date,
|
|
@@ -7469,10 +7558,10 @@ var DatePickerCalendar = React49.forwardRef(({ className, header, ...props }, re
|
|
|
7469
7558
|
);
|
|
7470
7559
|
});
|
|
7471
7560
|
DatePickerCalendar.displayName = "DatePickerCalendar";
|
|
7472
|
-
var DatePickerSuggestions =
|
|
7561
|
+
var DatePickerSuggestions = React50.forwardRef(
|
|
7473
7562
|
({ className, suggestions, formatDate = defaultFormatDate, ...props }, ref) => {
|
|
7474
7563
|
const { onSelect, mode } = useDatePickerContext();
|
|
7475
|
-
const onValueChange =
|
|
7564
|
+
const onValueChange = React50.useContext(DatePickerContext) ? void 0 : void 0;
|
|
7476
7565
|
const ctx = useDatePickerContext();
|
|
7477
7566
|
const handleClick = (suggestion) => {
|
|
7478
7567
|
const val = suggestion.getValue();
|
|
@@ -7494,7 +7583,7 @@ var DatePickerSuggestions = React49.forwardRef(
|
|
|
7494
7583
|
const to = val.to ? formatDate(val.to) : "";
|
|
7495
7584
|
return to ? `${from} - ${to}` : from;
|
|
7496
7585
|
};
|
|
7497
|
-
return /* @__PURE__ */ (0,
|
|
7586
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
7498
7587
|
"div",
|
|
7499
7588
|
{
|
|
7500
7589
|
ref,
|
|
@@ -7504,16 +7593,16 @@ var DatePickerSuggestions = React49.forwardRef(
|
|
|
7504
7593
|
),
|
|
7505
7594
|
...props,
|
|
7506
7595
|
children: [
|
|
7507
|
-
/* @__PURE__ */ (0,
|
|
7508
|
-
/* @__PURE__ */ (0,
|
|
7596
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "pt-lg px-base", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex items-center p-base rounded-base", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "flex-1 text-xs font-medium leading-xs text-datepicker-suggestion-heading uppercase truncate", children: "Suggestions" }) }) }),
|
|
7597
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex flex-1 flex-col p-base min-w-[222px]", children: suggestions.map((suggestion, i) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
7509
7598
|
"button",
|
|
7510
7599
|
{
|
|
7511
7600
|
type: "button",
|
|
7512
7601
|
onClick: () => handleClick(suggestion),
|
|
7513
7602
|
className: "flex items-center gap-sm p-base rounded-base hover:bg-datepicker-suggestion-hover transition-colors cursor-pointer text-left",
|
|
7514
7603
|
children: [
|
|
7515
|
-
/* @__PURE__ */ (0,
|
|
7516
|
-
/* @__PURE__ */ (0,
|
|
7604
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "text-sm font-regular leading-sm text-datepicker-suggestion-text truncate shrink-0", children: suggestion.label }),
|
|
7605
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "text-xs font-regular leading-xs text-datepicker-suggestion-date truncate", children: formatSuggestionDate(suggestion) })
|
|
7517
7606
|
]
|
|
7518
7607
|
},
|
|
7519
7608
|
i
|
|
@@ -7524,8 +7613,8 @@ var DatePickerSuggestions = React49.forwardRef(
|
|
|
7524
7613
|
}
|
|
7525
7614
|
);
|
|
7526
7615
|
DatePickerSuggestions.displayName = "DatePickerSuggestions";
|
|
7527
|
-
var DatePickerFooter =
|
|
7528
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */ (0,
|
|
7616
|
+
var DatePickerFooter = React50.forwardRef(
|
|
7617
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
7529
7618
|
"div",
|
|
7530
7619
|
{
|
|
7531
7620
|
ref,
|
|
@@ -7541,8 +7630,8 @@ var DatePickerFooter = React49.forwardRef(
|
|
|
7541
7630
|
)
|
|
7542
7631
|
);
|
|
7543
7632
|
DatePickerFooter.displayName = "DatePickerFooter";
|
|
7544
|
-
var DatePickerPanel =
|
|
7545
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */ (0,
|
|
7633
|
+
var DatePickerPanel = React50.forwardRef(
|
|
7634
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
7546
7635
|
"div",
|
|
7547
7636
|
{
|
|
7548
7637
|
ref,
|
|
@@ -7555,7 +7644,7 @@ var DatePickerPanel = React49.forwardRef(
|
|
|
7555
7644
|
DatePickerPanel.displayName = "DatePickerPanel";
|
|
7556
7645
|
var DatePickerRoot = PopoverPrimitive12.Root;
|
|
7557
7646
|
var DatePickerTrigger = PopoverPrimitive12.Trigger;
|
|
7558
|
-
var DatePickerPopover =
|
|
7647
|
+
var DatePickerPopover = React50.forwardRef(({ className, sideOffset = 4, align = "start", children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(PopoverPrimitive12.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
7559
7648
|
PopoverPrimitive12.Content,
|
|
7560
7649
|
{
|
|
7561
7650
|
ref,
|
|
@@ -7700,6 +7789,8 @@ function getDefaultSuggestions(referenceDate) {
|
|
|
7700
7789
|
OperatorSelector,
|
|
7701
7790
|
ProductLogo,
|
|
7702
7791
|
PropertySelector,
|
|
7792
|
+
RadioGroup,
|
|
7793
|
+
RadioGroupItem,
|
|
7703
7794
|
RowActions,
|
|
7704
7795
|
SaveViewButton,
|
|
7705
7796
|
SearchBar,
|