@yuno-payments/dashboard-design-system 2.7.7 → 2.7.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/molecules/empty-state-onboarding/{animated-illustration.d.ts → animated-empty.d.ts} +2 -2
- package/dist/components/molecules/empty-state-onboarding/{animated-illustration.js → animated-empty.js} +12 -12
- package/dist/components/molecules/empty-state-onboarding/empty-state-onboarding.js +13 -13
- package/dist/components/molecules/empty-state-onboarding/index.d.ts +1 -1
- package/dist/components/molecules/index.d.ts +1 -1
- package/dist/index.esm.min.js +1 -1
- package/dist/index.js +24 -24
- package/dist/index.umd.min.js +1 -1
- package/package.json +1 -1
- package/registry/components-registry.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EmptyStateVariant } from './types';
|
|
2
|
-
export interface
|
|
2
|
+
export interface AnimatedEmptyProps {
|
|
3
3
|
variant: EmptyStateVariant;
|
|
4
4
|
className?: string;
|
|
5
5
|
alt?: string;
|
|
@@ -10,4 +10,4 @@ export interface AnimatedIllustrationProps {
|
|
|
10
10
|
* images and toggles them via Tailwind `dark:` variants — no React
|
|
11
11
|
* re-render needed when the theme changes.
|
|
12
12
|
*/
|
|
13
|
-
export declare function
|
|
13
|
+
export declare function AnimatedEmpty({ variant, className, alt, }: AnimatedEmptyProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { cn as
|
|
1
|
+
import { j as m } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import { cn as a } from "../../../lib/utils.js";
|
|
3
3
|
import { ILLUSTRATIONS as i } from "./illustrations.js";
|
|
4
4
|
import { ThemedImage as s } from "../../atoms/themed-image/themed-image.js";
|
|
5
|
-
function
|
|
6
|
-
variant:
|
|
7
|
-
className:
|
|
5
|
+
function f({
|
|
6
|
+
variant: o,
|
|
7
|
+
className: t,
|
|
8
8
|
alt: r = ""
|
|
9
9
|
}) {
|
|
10
|
-
const
|
|
11
|
-
return /* @__PURE__ */
|
|
10
|
+
const e = i[o];
|
|
11
|
+
return /* @__PURE__ */ m.jsx(
|
|
12
12
|
s,
|
|
13
13
|
{
|
|
14
|
-
lightSrc:
|
|
15
|
-
darkSrc:
|
|
14
|
+
lightSrc: e.light,
|
|
15
|
+
darkSrc: e.dark,
|
|
16
16
|
alt: r,
|
|
17
17
|
"aria-hidden": r === "" ? !0 : void 0,
|
|
18
18
|
draggable: !1,
|
|
19
|
-
className:
|
|
19
|
+
className: a(
|
|
20
20
|
"w-full max-w-[592px] h-auto select-none",
|
|
21
|
-
|
|
21
|
+
t
|
|
22
22
|
)
|
|
23
23
|
}
|
|
24
24
|
);
|
|
25
25
|
}
|
|
26
26
|
export {
|
|
27
|
-
|
|
27
|
+
f as AnimatedEmpty
|
|
28
28
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { j as e } from "../../../_virtual/jsx-runtime.js";
|
|
2
2
|
import { forwardRef as p } from "react";
|
|
3
|
-
import { cn as
|
|
3
|
+
import { cn as h } from "../../../lib/utils.js";
|
|
4
4
|
import { Button as n } from "../../atoms/button/button.js";
|
|
5
|
-
import {
|
|
6
|
-
import { Typography as
|
|
5
|
+
import { AnimatedEmpty as u } from "./animated-empty.js";
|
|
6
|
+
import { Typography as d } from "../../atoms/typography/typography.js";
|
|
7
7
|
const g = p(
|
|
8
8
|
({
|
|
9
|
-
variant:
|
|
10
|
-
tagline:
|
|
9
|
+
variant: l,
|
|
10
|
+
tagline: r,
|
|
11
11
|
title: s,
|
|
12
12
|
description: o,
|
|
13
13
|
cta: t,
|
|
@@ -23,8 +23,8 @@ const g = p(
|
|
|
23
23
|
"div",
|
|
24
24
|
{
|
|
25
25
|
ref: x,
|
|
26
|
-
"data-variant":
|
|
27
|
-
className:
|
|
26
|
+
"data-variant": l,
|
|
27
|
+
className: h(
|
|
28
28
|
"yuno-empty-state-onboarding",
|
|
29
29
|
"flex flex-col md:flex-row items-center gap-8",
|
|
30
30
|
"bg-card rounded-lg p-8 md:p-12",
|
|
@@ -32,25 +32,25 @@ const g = p(
|
|
|
32
32
|
c
|
|
33
33
|
),
|
|
34
34
|
children: [
|
|
35
|
-
/* @__PURE__ */ e.jsx("div", { className: "hidden md:block yuno-empty-state-illustration bg-muted rounded-lg overflow-hidden flex-shrink-0", children: m ?? /* @__PURE__ */ e.jsx(
|
|
35
|
+
/* @__PURE__ */ e.jsx("div", { className: "hidden md:block yuno-empty-state-illustration bg-muted rounded-lg overflow-hidden flex-shrink-0", children: m ?? /* @__PURE__ */ e.jsx(u, { variant: l }) }),
|
|
36
36
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 items-start w-full", children: [
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
r && /* @__PURE__ */ e.jsx(
|
|
38
|
+
d,
|
|
39
39
|
{
|
|
40
40
|
variant: "muted",
|
|
41
41
|
className: "uppercase tracking-wide text-xs font-semibold",
|
|
42
|
-
children:
|
|
42
|
+
children: r
|
|
43
43
|
}
|
|
44
44
|
),
|
|
45
45
|
/* @__PURE__ */ e.jsx(
|
|
46
|
-
|
|
46
|
+
d,
|
|
47
47
|
{
|
|
48
48
|
as: "h3",
|
|
49
49
|
className: "text-2xl font-semibold leading-tight",
|
|
50
50
|
children: s
|
|
51
51
|
}
|
|
52
52
|
),
|
|
53
|
-
/* @__PURE__ */ e.jsx(
|
|
53
|
+
/* @__PURE__ */ e.jsx(d, { variant: "muted", className: "text-sm", children: o }),
|
|
54
54
|
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-3 items-center mt-2", children: [
|
|
55
55
|
/* @__PURE__ */ e.jsx(
|
|
56
56
|
n,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { EmptyStateOnboarding } from './empty-state-onboarding';
|
|
2
|
-
export {
|
|
2
|
+
export { AnimatedEmpty, type AnimatedEmptyProps } from './animated-empty';
|
|
3
3
|
export { ILLUSTRATIONS, ASSETS_BASE_URL } from './illustrations';
|
|
4
4
|
export type { EmptyStateOnboardingProps, EmptyStateVariant, EmptyStateAction, } from './types';
|
|
@@ -8,7 +8,7 @@ export { NavTabs, type NavTab, type NavTabsProps } from './nav-tabs';
|
|
|
8
8
|
export { HighlightBanner, type HighlightBannerProps } from './highlight-banner';
|
|
9
9
|
export { Empty, type EmptyProps } from './empty';
|
|
10
10
|
export { EmptyIcon, type EmptyIconProps } from './empty';
|
|
11
|
-
export { EmptyStateOnboarding,
|
|
11
|
+
export { EmptyStateOnboarding, AnimatedEmpty, type EmptyStateOnboardingProps, type EmptyStateVariant, type EmptyStateAction, type AnimatedEmptyProps, } from './empty-state-onboarding';
|
|
12
12
|
export { ProviderCard, type ProviderCardProps } from './provider-card';
|
|
13
13
|
export { FileUpload, type FileUploadProps, type UploadFile, } from './file-upload';
|
|
14
14
|
export { Stepper, type StepperProps, type StepperStep } from './stepper';
|
package/dist/index.esm.min.js
CHANGED
|
@@ -36445,7 +36445,7 @@ export {
|
|
|
36445
36445
|
_b as AccordionTrigger,
|
|
36446
36446
|
xI as AggregatedTable,
|
|
36447
36447
|
Pm as Alert,
|
|
36448
|
-
gj as
|
|
36448
|
+
gj as AnimatedEmpty,
|
|
36449
36449
|
eV as Avatar,
|
|
36450
36450
|
N1 as Badge,
|
|
36451
36451
|
qR as Breadcrumb,
|
package/dist/index.js
CHANGED
|
@@ -6,12 +6,12 @@ import { AccessDeniedAlert as d } from "./components/atoms/access-denied-alert/a
|
|
|
6
6
|
import { Accordion as u, AccordionContent as D, AccordionItem as T, AccordionTrigger as c } from "./components/atoms/accordion/accordion.js";
|
|
7
7
|
import { AggregatedTable as A } from "./components/organisms/aggregated-table/aggregated-table.js";
|
|
8
8
|
import { Alert as F } from "./components/atoms/alert/alert.js";
|
|
9
|
-
import {
|
|
9
|
+
import { AnimatedEmpty as C } from "./components/molecules/empty-state-onboarding/animated-empty.js";
|
|
10
10
|
import { Avatar as b } from "./components/atoms/avatar/avatar.js";
|
|
11
11
|
import { Badge as L } from "./components/atoms/badge/badge.js";
|
|
12
|
-
import { Breadcrumb as
|
|
12
|
+
import { Breadcrumb as I } from "./components/molecules/breadcrumb/breadcrumb.js";
|
|
13
13
|
import { Button as E } from "./components/atoms/button/button.js";
|
|
14
|
-
import { Card as k, CardBase as
|
|
14
|
+
import { Card as k, CardBase as y, CardContent as O, CardDescription as v, CardFooter as B, CardHeader as N, CardTitle as _ } from "./components/atoms/card/card.js";
|
|
15
15
|
import { Checkbox as U } from "./components/molecules/checkbox/checkbox.js";
|
|
16
16
|
import { Combobox as K } from "./components/organisms/combobox/combobox.js";
|
|
17
17
|
import { CurrencyField as Q } from "./components/atoms/currency-field/currency-field.js";
|
|
@@ -27,8 +27,8 @@ import { DialogContent as lo } from "./components/molecules/dialog-content/dialo
|
|
|
27
27
|
import { DialogFooter as uo } from "./components/molecules/dialog-footer/dialog-footer.js";
|
|
28
28
|
import { DialogHeader as To } from "./components/molecules/dialog-header/dialog-header.js";
|
|
29
29
|
import { DotsMenu as so } from "./components/molecules/dots-menu/dots-menu.js";
|
|
30
|
-
import { DropdownMenu as So, DropdownMenuCheckboxItem as Fo, DropdownMenuContent as Po, DropdownMenuGroup as Co, DropdownMenuItem as Mo, DropdownMenuLabel as bo, DropdownMenuPortal as wo, DropdownMenuRadioGroup as Lo, DropdownMenuRadioItem as
|
|
31
|
-
import { Empty as
|
|
30
|
+
import { DropdownMenu as So, DropdownMenuCheckboxItem as Fo, DropdownMenuContent as Po, DropdownMenuGroup as Co, DropdownMenuItem as Mo, DropdownMenuLabel as bo, DropdownMenuPortal as wo, DropdownMenuRadioGroup as Lo, DropdownMenuRadioItem as Ro, DropdownMenuSeparator as Io, DropdownMenuShortcut as ho, DropdownMenuSub as Eo, DropdownMenuSubContent as Go, DropdownMenuSubTrigger as ko, DropdownMenuTrigger as yo } from "./components/atoms/dropdown-menu/dropdown-menu.js";
|
|
31
|
+
import { Empty as vo } from "./components/molecules/empty/empty.js";
|
|
32
32
|
import { EmptyIcon as No } from "./components/molecules/empty/empty-icon.js";
|
|
33
33
|
import { EmptyStateOnboarding as Ho } from "./components/molecules/empty-state-onboarding/empty-state-onboarding.js";
|
|
34
34
|
import { Field as zo } from "./components/molecules/field/field.js";
|
|
@@ -47,9 +47,9 @@ import { MultiValuesField as Fr } from "./components/molecules/multi-values-fiel
|
|
|
47
47
|
import { NavLink as Cr } from "./components/molecules/nav-link/nav-link.js";
|
|
48
48
|
import { NavTabs as br } from "./components/molecules/nav-tabs/nav-tabs.js";
|
|
49
49
|
import { OTPField as Lr } from "./components/molecules/otp-field/otp-field.js";
|
|
50
|
-
import { PageTitle as
|
|
50
|
+
import { PageTitle as Ir } from "./components/atoms/page-title/page-title.js";
|
|
51
51
|
import { Pagination as Er, Pagination as Gr } from "./components/molecules/pagination/pagination.js";
|
|
52
|
-
import { PaginationContent as
|
|
52
|
+
import { PaginationContent as yr, PaginationEllipsis as Or, PaginationItem as vr, PaginationLink as Br, PaginationNext as Nr, PaginationPrevious as _r } from "./vendor/shadcn/pagination.js";
|
|
53
53
|
import { PasswordField as Ur } from "./components/molecules/password-field/password-field.js";
|
|
54
54
|
import { Popover as Kr, PopoverContent as Vr, PopoverTrigger as Qr } from "./components/atoms/popover/popover.js";
|
|
55
55
|
import { Progress as Yr } from "./components/atoms/progress/progress.js";
|
|
@@ -69,10 +69,10 @@ import { Switch as Se } from "./components/molecules/switch/switch.js";
|
|
|
69
69
|
import { TOTALS_ROW_ID as Pe } from "./components/organisms/aggregated-table/aggregated-table.constants.js";
|
|
70
70
|
import { Textarea as Me } from "./components/molecules/textarea/textarea.js";
|
|
71
71
|
import { ThemedImage as we } from "./components/atoms/themed-image/themed-image.js";
|
|
72
|
-
import { TimePicker as
|
|
72
|
+
import { TimePicker as Re } from "./components/molecules/time-picker/time-picker.js";
|
|
73
73
|
import { Toaster as he } from "./vendor/shadcn/sonner.js";
|
|
74
74
|
import { ToggleGroup as Ge, ToggleGroupItem as ke } from "./components/atoms/toggle-group/toggle-group.js";
|
|
75
|
-
import { Tooltip as
|
|
75
|
+
import { Tooltip as Oe } from "./components/atoms/tooltip/tooltip.js";
|
|
76
76
|
import { TooltipProvider as Be } from "./vendor/shadcn/tooltip.js";
|
|
77
77
|
import { TransferList as _e } from "./components/organisms/transfer-list/transfer-list.js";
|
|
78
78
|
import { TransferListEmptyState as Ue } from "./components/organisms/transfer-list/transfer-list-empty-state.js";
|
|
@@ -91,15 +91,15 @@ export {
|
|
|
91
91
|
c as AccordionTrigger,
|
|
92
92
|
A as AggregatedTable,
|
|
93
93
|
F as Alert,
|
|
94
|
-
C as
|
|
94
|
+
C as AnimatedEmpty,
|
|
95
95
|
b as Avatar,
|
|
96
96
|
L as Badge,
|
|
97
|
-
|
|
97
|
+
I as Breadcrumb,
|
|
98
98
|
E as Button,
|
|
99
99
|
k as Card,
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
100
|
+
y as CardBase,
|
|
101
|
+
O as CardContent,
|
|
102
|
+
v as CardDescription,
|
|
103
103
|
B as CardFooter,
|
|
104
104
|
N as CardHeader,
|
|
105
105
|
_ as CardTitle,
|
|
@@ -127,14 +127,14 @@ export {
|
|
|
127
127
|
bo as DropdownMenuLabel,
|
|
128
128
|
wo as DropdownMenuPortal,
|
|
129
129
|
Lo as DropdownMenuRadioGroup,
|
|
130
|
-
|
|
131
|
-
|
|
130
|
+
Ro as DropdownMenuRadioItem,
|
|
131
|
+
Io as DropdownMenuSeparator,
|
|
132
132
|
ho as DropdownMenuShortcut,
|
|
133
133
|
Eo as DropdownMenuSub,
|
|
134
134
|
Go as DropdownMenuSubContent,
|
|
135
135
|
ko as DropdownMenuSubTrigger,
|
|
136
|
-
|
|
137
|
-
|
|
136
|
+
yo as DropdownMenuTrigger,
|
|
137
|
+
vo as Empty,
|
|
138
138
|
No as EmptyIcon,
|
|
139
139
|
Ho as EmptyStateOnboarding,
|
|
140
140
|
zo as Field,
|
|
@@ -163,11 +163,11 @@ export {
|
|
|
163
163
|
Cr as NavLink,
|
|
164
164
|
br as NavTabs,
|
|
165
165
|
Lr as OTPField,
|
|
166
|
-
|
|
166
|
+
Ir as PageTitle,
|
|
167
167
|
Er as Pagination,
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
168
|
+
yr as PaginationContent,
|
|
169
|
+
Or as PaginationEllipsis,
|
|
170
|
+
vr as PaginationItem,
|
|
171
171
|
Br as PaginationLink,
|
|
172
172
|
Nr as PaginationNext,
|
|
173
173
|
_r as PaginationPrevious,
|
|
@@ -194,11 +194,11 @@ export {
|
|
|
194
194
|
Pe as TOTALS_ROW_ID,
|
|
195
195
|
Me as Textarea,
|
|
196
196
|
we as ThemedImage,
|
|
197
|
-
|
|
197
|
+
Re as TimePicker,
|
|
198
198
|
he as Toaster,
|
|
199
199
|
Ge as ToggleGroup,
|
|
200
200
|
ke as ToggleGroupItem,
|
|
201
|
-
|
|
201
|
+
Oe as Tooltip,
|
|
202
202
|
Be as TooltipProvider,
|
|
203
203
|
_e as TransferList,
|
|
204
204
|
Ue as TransferListEmptyState,
|
package/dist/index.umd.min.js
CHANGED
|
@@ -138,4 +138,4 @@ For more information, see https://radix-ui.com/primitives/docs/components/${a.do
|
|
|
138
138
|
.react-joyride__spotlight {
|
|
139
139
|
border-radius: 8px !important;
|
|
140
140
|
}
|
|
141
|
-
`}),c.jsxs("div",{...l,ref:p,className:w("bg-popover rounded-md border border-border shadow-md p-4","max-w-[368px]",d&&`max-w-[${d}px]`),style:d?{maxWidth:`${d}px`}:void 0,children:[c.jsxs("div",{className:"flex items-start justify-between gap-4 mb-2",children:[c.jsx("div",{className:"flex-1",children:a.title&&c.jsx(P0,{variant:"h4",className:"text-base font-medium leading-none",children:a.title})}),!a.hideCloseButton&&c.jsx(J0,{variant:"ghost",size:"icon",className:"h-8 w-8 shrink-0",onClick:n?.onClick,children:c.jsx(n0,{name:"X",size:"sm"})})]}),c.jsx("div",{className:"mb-6",children:c.jsx(P0,{variant:"sm",className:"text-muted-foreground font-normal",children:a.content})}),c.jsxs("div",{className:"flex items-center justify-between gap-4",children:[m&&f!==(u??0)-1&&c.jsx("div",{className:"flex-1",children:c.jsx(Tr,{...m,onClick:n?.onClick,underline:!1,className:"text-xs",children:m.title})}),(u??0)>1&&c.jsx("div",{className:"flex-shrink-0",children:c.jsxs(P0,{variant:"xs",className:"text-muted-foreground mr-6",children:["Step ",(f??0)+1," of ",u]})}),e&&r&&c.jsx("div",{className:"flex-shrink-0",children:c.jsx(J0,{size:"default",...r,children:r.title})})]}),!e&&i.length>0&&c.jsxs("div",{className:w("flex items-center mt-6 gap-3",i.length>1?"justify-between":"justify-end"),children:[o&&s&&c.jsx(p1,{variant:"default",className:"bg-green-100 text-green-800",children:s}),i.map((v,A)=>c.jsx(J0,{variant:v.variant||"default",size:v.size||"default",loading:v.loading,disabled:v.disabled,onClick:M=>g(M,v.event),children:v.label},A))]})]})]})});VM.displayName="Tutorial";const nz=({item:e,onMove:a,moveIconName:n="PlusCircle",isSelected:r=!1})=>c.jsxs("div",{className:"flex items-center py-1.5 px-2 bg-muted border border-border rounded gap-2 cursor-grabbing",role:"option","aria-selected":r,tabIndex:-1,children:[c.jsx("span",{className:"flex items-center shrink-0",children:c.jsx(n0,{name:"DotsSixVertical",className:"text-muted-foreground"})}),c.jsxs("span",{className:"text-xs text-foreground flex-1 flex flex-col gap-0.5",children:[c.jsx("span",{children:e.label}),e.description&&c.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:e.description})]}),e.actions,a&&c.jsx(J0,{variant:"ghost",size:"icon",onClick:l=>l.stopPropagation(),children:c.jsx(n0,{name:n,className:"text-muted-foreground"})})]}),rz=({item:e,index:a,group:n,onMove:r,moveIconName:l="PlusCircle",isSelected:o=!1})=>{const{ref:s,isDragging:i}=yM({id:e.id,index:a,group:n});return c.jsxs("div",{ref:s,className:w("flex items-center py-1.5 px-2 bg-muted border border-border rounded gap-2 cursor-grab",i&&"opacity-50 cursor-grabbing"),role:"option","aria-selected":o,tabIndex:0,onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&r&&(d.preventDefault(),r(e))},children:[c.jsx("span",{className:"flex items-center shrink-0",children:c.jsx(n0,{name:"DotsSixVertical",className:"text-muted-foreground"})}),c.jsxs("span",{className:"text-xs text-foreground flex-1 flex flex-col gap-0.5",children:[c.jsx("span",{children:e.label}),e.description&&c.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:e.description})]}),e.actions,r&&c.jsx(J0,{variant:"ghost",size:"icon",onClick:d=>{d.stopPropagation(),r(e)},children:c.jsx(n0,{name:l,className:"text-muted-foreground"})})]})},CM=({title:e="No items",description:a="No items available",iconName:n="TextColumns"})=>c.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 border border-border rounded-lg p-4 bg-muted",children:[c.jsx(n0,{name:n,className:"text-muted-foreground",size:"xl"}),c.jsx("p",{className:"text-base text-center text-foreground font-bold",children:e}),c.jsx("p",{className:"text-xs text-center text-muted-foreground",children:a})]}),lz=1,LM=({id:e,title:a,items:n,height:r,showSearch:l,search:o,searchPlaceholder:s,onSearchChange:i,onMove:d,moveIconName:m,emptyState:f,isSelected:u=!1})=>{const p=`${e}-title`,h=n.length===0,{ref:g}=KO({id:e,collisionPriority:lz}),v=f??c.jsx(CM,{});return c.jsxs("div",{className:"border border-border rounded-lg p-4 w-full flex flex-col gap-2",style:{height:r},children:[c.jsx("p",{id:p,className:"text-sm text-foreground mb-2",children:a}),l&&(!h||o.length>0)&&c.jsx(Et,{placeholder:s,value:o,onChange:A=>i(A.target.value),"aria-label":`${a} search`}),c.jsx("div",{ref:g,className:"h-full overflow-auto w-full flex flex-col gap-2",role:"listbox","aria-labelledby":p,"aria-multiselectable":!0,children:h?v:n.map((A,M)=>c.jsx(rz,{item:A,index:M,group:e,onMove:d,moveIconName:m,isSelected:u},A.id))})]})},SM=Z.forwardRef(({left:e,right:a,onChange:n,leftTitle:r="Available",rightTitle:l="Chosen",height:o=420,showSearch:s=!0,searchPlaceholder:i="Search",emptyState:d,leftEmptyState:m,className:f,...u},p)=>{const[h,g]=Z.useState(""),[v,A]=Z.useState(""),[M,E]=Z.useState({left:e,right:a}),y=Z.useRef(M),H=Z.useRef(!1),x=Z.useRef({left:e,right:a});Z.useEffect(()=>{if(!H.current){const j={left:e,right:a};E(j),y.current=j}},[e,a]);const b=Z.useMemo(()=>{const j=h.trim().toLowerCase();return j?M.left.filter(G=>G.label.toLowerCase().includes(j)):M.left},[M.left,h]),V=Z.useMemo(()=>{const j=v.trim().toLowerCase();return j?M.right.filter(G=>G.label.toLowerCase().includes(j)):M.right},[M.right,v]),S=()=>{H.current=!0,x.current=y.current},_=j=>{h.length>0||v.length>0||E(G=>{const U=XA(G,j);return y.current=U,U})},D=j=>{if(H.current=!1,j.canceled||h.length>0||v.length>0){E(x.current),y.current=x.current;return}n(y.current.left,y.current.right)},z=j=>{n(e.filter(G=>G.id!==j.id),[...a,j])},k=j=>{n([...e,j],a.filter(G=>G.id!==j.id))};return c.jsxs(kA,{onDragStart:S,onDragOver:_,onDragEnd:D,children:[c.jsxs("div",{ref:p,className:w("flex flex-col md:flex-row gap-4 md:gap-8",f),...u,children:[c.jsx(LM,{id:"left",title:r,items:b,height:o,showSearch:s,searchPlaceholder:i,search:h,onSearchChange:g,onMove:z,moveIconName:"PlusCircle",isSelected:!1,emptyState:m}),c.jsx(LM,{id:"right",title:l,items:V,height:o,showSearch:s,searchPlaceholder:i,search:v,onSearchChange:A,onMove:k,moveIconName:"MinusCircle",emptyState:d,isSelected:!0})]}),c.jsx(RO,{children:j=>{const G=y.current.left.concat(y.current.right).find(U=>U.id===j.id);return G?c.jsx(nz,{item:G}):null}})]})});SM.displayName="TransferList";const oz=({message:e="No results"})=>c.jsx("div",{className:"p-4 text-center",children:c.jsx(P0,{variant:"sm",className:"text-muted-foreground",children:e})}),FM=Z.forwardRef(({value:e,options:a,selectPlaceholder:n="Select",searchPlaceholder:r="Search",onChange:l,onCloseChip:o,valueProp:s="value",fullWidth:i=!1,disabled:d=!1,withSearch:m=!0,limitTags:f=10,maxHeightList:u=320,emptyState:p=c.jsx(oz,{}),label:h,description:g,error:v,deleteAll:A,className:M,id:E,renderOption:y,renderChip:H},x)=>{const[b,V]=Z.useState(!1),[S,_]=Z.useState(""),[D,z]=Z.useState(a),k=Z.useRef(null);Z.useEffect(()=>{z(a)},[a]),Z.useEffect(()=>{b&&k.current&&m&&setTimeout(()=>{k.current?.focus()},0)},[b,m]);const j=L=>{const T=L.label||L[s];return String(T)},G=L=>{const T=L.target.value;if(_(T),T==="")z(a);else{const W=a.filter(e0=>j(e0).toLowerCase().includes(T.toLowerCase()));z(W)}},U=L=>{if(d)return;const T=e.includes(L)?e.filter(W=>W!==L):[...e,L];l(T)},O=L=>{if(!d)if(o)o(L);else{const T=e.filter(W=>W!==L);l(T)}},R=()=>{d||!A?.onClick||A.onClick()},F=(L,T)=>L?.length<=T?L:L?.substring(0,T)+"...",P=e.map(L=>a.find(T=>T[s]===L)).filter(Boolean),J=A&&!d&&e.length>=A.length,o0=P.slice(0,f),N=P.length-f;return c.jsxs("div",{className:w("w-full",i&&"w-full",M),children:[h&&c.jsx(ye,{htmlFor:E,className:w("mb-2 block",d&&"opacity-50"),children:h}),g&&!v&&c.jsx(P0,{variant:"sm",className:w("text-muted-foreground mb-2",d&&"opacity-50"),children:g}),c.jsxs(sp,{open:b,onOpenChange:V,children:[c.jsx(ip,{asChild:!0,children:c.jsxs("button",{ref:x,id:E,type:"button",disabled:d,role:"combobox","aria-expanded":b,"aria-haspopup":"listbox","aria-controls":b?`${E}-listbox`:void 0,className:w("flex h-auto min-h-[38px] w-full items-center justify-between gap-2 rounded-md border border-input bg-input px-3 py-1.5 text-sm shadow-xs ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",v&&"border-destructive",i&&"w-full"),children:[c.jsx("div",{className:"flex flex-wrap gap-1 flex-1 items-center",children:e.length===0?c.jsx("span",{className:"text-muted-foreground",children:n}):c.jsxs(c.Fragment,{children:[J&&c.jsx("div",{onClick:L=>{L.preventDefault(),L.stopPropagation(),R()},children:c.jsx(p1,{variant:"secondary",className:"gap-1 cursor-pointer flex items-center",children:A.label||"Delete all"})}),o0.map(L=>c.jsx("div",{onClick:T=>{o&&!d&&(T.preventDefault(),T.stopPropagation(),O(L[s]))},children:H?H(L):c.jsx(p1,{variant:"outline",className:"gap-1 flex items-center",endIcon:o&&!d?"X":void 0,children:F(j(L),8)})},L[s])),N>0&&c.jsx(p1,{variant:"outline",className:"flex items-center",children:`+${N}`})]})}),c.jsx(n0,{name:"CaretUpDown",size:"sm",className:w("opacity-50 transition-transform",b&&"transform rotate-180")})]})}),c.jsx(Z6,{className:"p-0",align:"start",style:{maxHeight:u},id:E?`${E}-listbox`:void 0,role:"listbox",children:c.jsxs("div",{className:"flex flex-col",children:[m&&a.length>0&&c.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 border-b",children:[c.jsx(n0,{name:"MagnifyingGlass",size:"sm",className:"text-muted-foreground"}),c.jsx("input",{ref:k,type:"text",placeholder:r,value:S,onChange:G,onKeyDown:L=>{L.stopPropagation(),L.key==="Escape"&&V(!1)},className:"flex-1 outline-none bg-transparent text-sm placeholder:text-muted-foreground","aria-label":r})]}),c.jsx("div",{className:"overflow-y-auto",style:{maxHeight:m?u-48:u},children:D.length>0?D.map(L=>c.jsx("div",{role:"option","aria-selected":e.includes(L[s]),className:"flex items-center gap-2 px-3 py-2 cursor-pointer hover:bg-accent transition-colors",onClick:()=>U(L[s]),onKeyDown:T=>{(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),U(L[s]))},children:y?y(L,e.includes(L[s])):c.jsxs(c.Fragment,{children:[c.jsx(Fn,{checked:e.includes(L[s]),onChange:()=>U(L[s]),onClick:T=>T.stopPropagation()}),c.jsx("span",{className:"text-sm flex-1",children:j(L)})]})},L[s])):p})]})})]}),v&&c.jsx(P0,{variant:"sm",className:"text-destructive mt-2",children:v})]})});FM.displayName="Combobox";const _M=t.forwardRef(({options:e,value:a=[],onChange:n,placeholder:r="Select items...",searchPlaceholder:l="Search",emptyMessage:o="No results found.",disabled:s=!1,label:i,description:d,error:m,maxDisplay:f=3,className:u,showBadges:p=!0,allowClear:h=!0},g)=>{const[v,A]=t.useState(!1),[M,E]=t.useState(""),y=_=>{const D=a.includes(_)?a.filter(z=>z!==_):[...a,_];n?.(D)},H=(_,D)=>{D?.preventDefault(),D?.stopPropagation();const z=a.filter(k=>k!==_);n?.(z)},x=_=>{_.preventDefault(),_.stopPropagation(),n?.([])},b=a.map(_=>e.find(D=>D.value===_)).filter(Boolean),V=p?b.slice(0,f):[],S=b.length>f?b.length-f:0;return c.jsxs("div",{className:"w-full",children:[i&&c.jsx("label",{className:"text-sm font-medium text-foreground mb-1.5 block",children:i}),d&&c.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:d}),c.jsxs(Cr,{open:v,onOpenChange:A,children:[c.jsx(Lr,{asChild:!0,children:c.jsxs(ae,{ref:g,variant:"outline",role:"combobox","aria-expanded":v,disabled:s,className:w("w-full justify-between h-auto min-h-9 py-2",m&&"border-destructive",!a.length&&"text-muted-foreground",u),children:[c.jsx("div",{className:"flex flex-wrap gap-1 items-center flex-1",children:a.length===0?c.jsx("span",{children:r}):p?c.jsxs(c.Fragment,{children:[V.map(_=>c.jsxs("span",{className:"inline-flex items-center mr-1 px-2 py-0.5 h-6 text-xs font-normal rounded-md border border-border bg-secondary text-secondary-foreground",children:[c.jsx("span",{className:"max-w-[150px] truncate",children:_.label}),c.jsx("button",{type:"button",className:"ml-1 rounded-full outline-hidden hover:bg-muted-foreground/20",onClick:D=>H(_.value,D),children:c.jsx(lo,{className:"h-3 w-3"})})]},_.value)),S>0&&c.jsxs("span",{className:"inline-flex items-center px-2 py-0.5 h-6 text-xs font-normal rounded-md border border-border bg-secondary text-secondary-foreground",children:["+",S," more"]})]}):c.jsxs("span",{className:"text-sm",children:[b.length," selected"]})}),c.jsxs("div",{className:"flex items-center gap-1 ml-2",children:[h&&a.length>0&&c.jsx("button",{type:"button",onClick:x,className:"h-4 w-4 rounded-full hover:bg-muted p-0.5",children:c.jsx(lo,{className:"h-3 w-3"})}),c.jsx("svg",{className:"h-4 w-4 shrink-0 opacity-50",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]})}),c.jsx(Hn,{className:"w-[var(--radix-popover-trigger-width)] p-0",children:c.jsxs(_p,{shouldFilter:!1,children:[c.jsx(Np,{placeholder:l,value:M,onValueChange:E}),c.jsx(Pp,{children:o}),c.jsx(Rp,{children:c.jsx(jp,{children:e.filter(_=>_.label.toLowerCase().includes(M.toLowerCase())).map(_=>c.jsxs(N6,{value:_.value,onSelect:()=>{y(_.value)},children:[c.jsx(no,{className:w("mr-2 h-4 w-4",a.includes(_.value)?"opacity-100":"opacity-0")}),_.label]},_.value))})})]})})]}),m&&c.jsx("p",{className:"text-sm text-destructive mt-1.5",children:m})]})});_M.displayName="MultiSelect";const NM={addFilter:"Add filter",clearFilters:"Clear filters",noFiltersApplied:"No filters applied",moreFilters:"+{count} more",selectAll:"Select all",inverse:"Inverse",none:"None",search:"Search",typeAndPressEnter:"Type and press Enter...",onlyNumericAllowed:"Only numeric values are allowed",clearAll:"Clear all",custom:"Custom",today:"Today",last3Days:"Last 3 days",last7Days:"Last 7 days",last30Days:"Last 30 days",thisMonth:"This month",allTime:"All time",startDate:"Start date",endDate:"End date",selectDate:"Select date",sunday:"Sunday",monday:"Monday",tuesday:"Tuesday",wednesday:"Wednesday",thursday:"Thursday",friday:"Friday",saturday:"Saturday",jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"},sz={en:NM,es:{addFilter:"Agregar filtro",clearFilters:"Limpiar filtros",noFiltersApplied:"Sin filtros aplicados",moreFilters:"+{count} más",selectAll:"Seleccionar todo",inverse:"Invertir",none:"Ninguno",search:"Buscar",typeAndPressEnter:"Escribe y presiona Enter...",onlyNumericAllowed:"Solo se permiten valores numéricos",clearAll:"Limpiar todo",custom:"Personalizado",today:"Hoy",last3Days:"Últimos 3 días",last7Days:"Últimos 7 días",last30Days:"Últimos 30 días",thisMonth:"Este mes",allTime:"Todo el tiempo",startDate:"Fecha inicio",endDate:"Fecha fin",selectDate:"Seleccionar fecha",sunday:"Domingo",monday:"Lunes",tuesday:"Martes",wednesday:"Miércoles",thursday:"Jueves",friday:"Viernes",saturday:"Sábado",jan:"Ene",feb:"Feb",mar:"Mar",apr:"Abr",may:"May",jun:"Jun",jul:"Jul",aug:"Ago",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dic"},ja:{addFilter:"フィルターを追加",clearFilters:"フィルターをクリア",noFiltersApplied:"フィルターが適用されていません",moreFilters:"+{count}件",selectAll:"すべて選択",inverse:"反転",none:"なし",search:"検索",typeAndPressEnter:"入力してEnterを押す...",onlyNumericAllowed:"数値のみ入力可能です",clearAll:"すべてクリア",custom:"カスタム",today:"今日",last3Days:"過去3日間",last7Days:"過去7日間",last30Days:"過去30日間",thisMonth:"今月",allTime:"全期間",startDate:"開始日",endDate:"終了日",selectDate:"日付を選択",sunday:"日曜日",monday:"月曜日",tuesday:"火曜日",wednesday:"水曜日",thursday:"木曜日",friday:"金曜日",saturday:"土曜日",jan:"1月",feb:"2月",mar:"3月",apr:"4月",may:"5月",jun:"6月",jul:"7月",aug:"8月",sep:"9月",oct:"10月",nov:"11月",dec:"12月"},ar:{addFilter:"إضافة فلتر",clearFilters:"مسح الفلاتر",noFiltersApplied:"لم يتم تطبيق فلاتر",moreFilters:"+{count} أخرى",selectAll:"تحديد الكل",inverse:"عكس",none:"لا شيء",search:"بحث",typeAndPressEnter:"اكتب واضغط Enter...",onlyNumericAllowed:"مسموح بالقيم الرقمية فقط",clearAll:"مسح الكل",custom:"مخصص",today:"اليوم",last3Days:"آخر 3 أيام",last7Days:"آخر 7 أيام",last30Days:"آخر 30 يوماً",thisMonth:"هذا الشهر",allTime:"كل الوقت",startDate:"تاريخ البدء",endDate:"تاريخ الانتهاء",selectDate:"اختر التاريخ",sunday:"الأحد",monday:"الاثنين",tuesday:"الثلاثاء",wednesday:"الأربعاء",thursday:"الخميس",friday:"الجمعة",saturday:"السبت",jan:"يناير",feb:"فبراير",mar:"مارس",apr:"أبريل",may:"مايو",jun:"يونيو",jul:"يوليو",aug:"أغسطس",sep:"سبتمبر",oct:"أكتوبر",nov:"نوفمبر",dec:"ديسمبر"},fr:{addFilter:"Ajouter un filtre",clearFilters:"Effacer les filtres",noFiltersApplied:"Aucun filtre appliqué",moreFilters:"+{count} autres",selectAll:"Tout sélectionner",inverse:"Inverser",none:"Aucun",search:"Rechercher",typeAndPressEnter:"Tapez et appuyez sur Entrée...",onlyNumericAllowed:"Seules les valeurs numériques sont autorisées",clearAll:"Tout effacer",custom:"Personnalisé",today:"Aujourd'hui",last3Days:"3 derniers jours",last7Days:"7 derniers jours",last30Days:"30 derniers jours",thisMonth:"Ce mois-ci",allTime:"Tout le temps",startDate:"Date de début",endDate:"Date de fin",selectDate:"Sélectionner une date",sunday:"Dimanche",monday:"Lundi",tuesday:"Mardi",wednesday:"Mercredi",thursday:"Jeudi",friday:"Vendredi",saturday:"Samedi",jan:"Janv",feb:"Févr",mar:"Mars",apr:"Avr",may:"Mai",jun:"Juin",jul:"Juil",aug:"Août",sep:"Sept",oct:"Oct",nov:"Nov",dec:"Déc"},pt:{addFilter:"Adicionar filtro",clearFilters:"Limpar filtros",noFiltersApplied:"Nenhum filtro aplicado",moreFilters:"+{count} mais",selectAll:"Selecionar tudo",inverse:"Inverter",none:"Nenhum",search:"Pesquisar",typeAndPressEnter:"Digite e pressione Enter...",onlyNumericAllowed:"Apenas valores numéricos são permitidos",clearAll:"Limpar tudo",custom:"Personalizado",today:"Hoje",last3Days:"Últimos 3 dias",last7Days:"Últimos 7 dias",last30Days:"Últimos 30 dias",thisMonth:"Este mês",allTime:"Todo o período",startDate:"Data inicial",endDate:"Data final",selectDate:"Selecionar data",sunday:"Domingo",monday:"Segunda-feira",tuesday:"Terça-feira",wednesday:"Quarta-feira",thursday:"Quinta-feira",friday:"Sexta-feira",saturday:"Sábado",jan:"Jan",feb:"Fev",mar:"Mar",apr:"Abr",may:"Mai",jun:"Jun",jul:"Jul",aug:"Ago",sep:"Set",oct:"Out",nov:"Nov",dec:"Dez"},tr:{addFilter:"Filtre ekle",clearFilters:"Filtreleri temizle",noFiltersApplied:"Uygulanan filtre yok",moreFilters:"+{count} daha",selectAll:"Tümünü seç",inverse:"Tersine çevir",none:"Hiçbiri",search:"Ara",typeAndPressEnter:"Yazın ve Enter'a basın...",onlyNumericAllowed:"Yalnızca sayısal değerlere izin verilir",clearAll:"Tümünü temizle",custom:"Özel",today:"Bugün",last3Days:"Son 3 gün",last7Days:"Son 7 gün",last30Days:"Son 30 gün",thisMonth:"Bu ay",allTime:"Tüm zamanlar",startDate:"Başlangıç tarihi",endDate:"Bitiş tarihi",selectDate:"Tarih seçin",sunday:"Pazar",monday:"Pazartesi",tuesday:"Salı",wednesday:"Çarşamba",thursday:"Perşembe",friday:"Cuma",saturday:"Cumartesi",jan:"Oca",feb:"Şub",mar:"Mar",apr:"Nis",may:"May",jun:"Haz",jul:"Tem",aug:"Ağu",sep:"Eyl",oct:"Eki",nov:"Kas",dec:"Ara"},ru:{addFilter:"Добавить фильтр",clearFilters:"Очистить фильтры",noFiltersApplied:"Фильтры не применены",moreFilters:"+{count} ещё",selectAll:"Выбрать все",inverse:"Инвертировать",none:"Ничего",search:"Поиск",typeAndPressEnter:"Введите и нажмите Enter...",onlyNumericAllowed:"Допускаются только числовые значения",clearAll:"Очистить все",custom:"Произвольный",today:"Сегодня",last3Days:"Последние 3 дня",last7Days:"Последние 7 дней",last30Days:"Последние 30 дней",thisMonth:"Этот месяц",allTime:"Все время",startDate:"Дата начала",endDate:"Дата окончания",selectDate:"Выберите дату",sunday:"Воскресенье",monday:"Понедельник",tuesday:"Вторник",wednesday:"Среда",thursday:"Четверг",friday:"Пятница",saturday:"Суббота",jan:"Янв",feb:"Фев",mar:"Мар",apr:"Апр",may:"Май",jun:"Июн",jul:"Июл",aug:"Авг",sep:"Сен",oct:"Окт",nov:"Ноя",dec:"Дек"},de:{addFilter:"Filter hinzufügen",clearFilters:"Filter löschen",noFiltersApplied:"Keine Filter angewendet",moreFilters:"+{count} weitere",selectAll:"Alle auswählen",inverse:"Umkehren",none:"Keine",search:"Suchen",typeAndPressEnter:"Eingeben und Enter drücken...",onlyNumericAllowed:"Nur numerische Werte sind erlaubt",clearAll:"Alle löschen",custom:"Benutzerdefiniert",today:"Heute",last3Days:"Letzte 3 Tage",last7Days:"Letzte 7 Tage",last30Days:"Letzte 30 Tage",thisMonth:"Dieser Monat",allTime:"Gesamter Zeitraum",startDate:"Startdatum",endDate:"Enddatum",selectDate:"Datum auswählen",sunday:"Sonntag",monday:"Montag",tuesday:"Dienstag",wednesday:"Mittwoch",thursday:"Donnerstag",friday:"Freitag",saturday:"Samstag",jan:"Jan",feb:"Feb",mar:"Mär",apr:"Apr",may:"Mai",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Okt",nov:"Nov",dec:"Dez"},zh:{addFilter:"添加筛选",clearFilters:"清除筛选",noFiltersApplied:"未应用筛选",moreFilters:"+{count}个",selectAll:"全选",inverse:"反选",none:"清空",search:"搜索",typeAndPressEnter:"输入并按回车...",onlyNumericAllowed:"仅允许输入数字",clearAll:"清除全部",custom:"自定义",today:"今天",last3Days:"最近3天",last7Days:"最近7天",last30Days:"最近30天",thisMonth:"本月",allTime:"全部时间",startDate:"开始日期",endDate:"结束日期",selectDate:"选择日期",sunday:"星期日",monday:"星期一",tuesday:"星期二",wednesday:"星期三",thursday:"星期四",friday:"星期五",saturday:"星期六",jan:"1月",feb:"2月",mar:"3月",apr:"4月",may:"5月",jun:"6月",jul:"7月",aug:"8月",sep:"9月",oct:"10月",nov:"11月",dec:"12月"}},iz=NM;function Ja(e){const a=e??nn();return sz[a]??iz}function cz(e){return[e.sunday,e.monday,e.tuesday,e.wednesday,e.thursday,e.friday,e.saturday]}function dz(e){return[e.jan,e.feb,e.mar,e.apr,e.may,e.jun,e.jul,e.aug,e.sep,e.oct,e.nov,e.dec]}function RM(e,a){return e.moreFilters.replace("{count}",String(a))}const Js=Z.forwardRef(({label:e,onRemove:a,className:n,...r},l)=>c.jsxs(zl,{ref:l,variant:"secondary",className:w("h-8 gap-2 px-3 py-2 shadow-xs",n),...r,children:[c.jsx("span",{className:"text-xs font-medium leading-none",children:e}),a&&c.jsx("button",{onClick:a,className:"inline-flex items-center justify-center","aria-label":`Remove ${e} filter`,children:c.jsx(n0,{name:"X",className:"size-4"})})]}));Js.displayName="FilterTag";const PM=Z.forwardRef(({appliedFilters:e=[],onRemoveFilter:a,onClearAll:n,maxVisibleTags:r=4,className:l,lang:o,translations:s,...i},d)=>{const m=Z.useMemo(()=>{const h=Ja(o);return s?{...h,...s}:h},[o,s]),f=e.length>0,u=e.slice(0,r),p=e.length-r;return c.jsxs("div",{className:"flex items-center gap-4",children:[c.jsxs(ae,{ref:d,variant:"outline",size:"sm",className:w("h-8 gap-2 px-3 py-2",l),...i,children:[c.jsx(n0,{name:"FunnelSimple",className:"size-4"}),c.jsx("span",{className:"text-xs font-medium leading-none",children:m.addFilter})]}),f&&c.jsxs(c.Fragment,{children:[c.jsx(At,{orientation:"vertical",className:"h-5"}),c.jsxs("div",{className:"flex items-center gap-2",children:[u.map(h=>c.jsx(Js,{label:h.label,onRemove:()=>a?.(h.id)},h.id)),p>0&&c.jsx(zl,{variant:"default",className:"h-8 px-3 py-2 shadow-xs",children:c.jsx("span",{className:"text-xs font-medium leading-none",children:RM(m,p)})}),n&&c.jsx(ae,{variant:"ghost",size:"sm",onClick:n,className:"h-8 px-3 py-2",children:c.jsx("span",{className:"text-xs font-medium leading-none text-primary",children:m.clearFilters})})]})]}),!f&&c.jsxs(c.Fragment,{children:[c.jsx(At,{orientation:"vertical",className:"h-5"}),c.jsx("span",{className:"text-sm font-normal text-muted-foreground",children:m.noFiltersApplied})]})]})});PM.displayName="FilterButton";const el=Z.forwardRef((e,a)=>{const{title:n,items:r,className:l,searchable:o=!1,searchPlaceholder:s,showActions:i=!1,enableSelectAll:d=!0,enableInverse:m=!0,enableNone:f=!0,description:u,lang:p,translations:h}=e,g=Z.useMemo(()=>{const _=Ja(p);return h?{..._,...h}:_},[p,h]),v=e.type||"checkbox",A=v==="radio",M=v==="checkbox"||!e.type,[E,y]=Z.useState(""),H=Z.useMemo(()=>E?r.filter(_=>_.label.toLowerCase().includes(E.toLowerCase())):r,[r,E]),x=()=>{if(v==="checkbox"&&"selectedValues"in e){const _=H.map(z=>z.value),D=E?[...new Set([...e.selectedValues,..._])]:_;e.onChange(D)}},b=()=>{if(v==="checkbox"&&"selectedValues"in e)if(E){const _=new Set(H.map(k=>k.value)),D=e.selectedValues.filter(k=>!_.has(k)),z=H.filter(k=>!e.selectedValues.includes(k.value)).map(k=>k.value);e.onChange([...D,...z])}else{const _=r.filter(D=>!e.selectedValues.includes(D.value)).map(D=>D.value);e.onChange(_)}},V=()=>{if(v==="checkbox"&&"selectedValues"in e)if(E){const _=new Set(H.map(z=>z.value)),D=e.selectedValues.filter(z=>!_.has(z));e.onChange(D)}else e.onChange([]);else v==="radio"&&"selectedValue"in e&&e.onChange("")},S=(_,D)=>{if(v==="checkbox"&&"selectedValues"in e){const z=D?[...e.selectedValues,_]:e.selectedValues.filter(k=>k!==_);e.onChange(z)}};return c.jsxs("div",{ref:a,dir:mt(p),className:w("flex flex-col h-full",l),children:[o&&c.jsx(Et,{placeholder:s??g.search,value:E,onChange:_=>y(_.target.value),startIcon:"MagnifyingGlass",className:"mb-4"}),u&&c.jsx("p",{className:"text-xs font-normal text-muted-foreground mb-4",children:u}),c.jsxs("div",{className:"flex items-center justify-between mb-1",children:[c.jsx("span",{className:"text-sm font-normal text-foreground",children:n}),i&&v==="checkbox"&&c.jsxs("div",{className:"flex items-center justify-end gap-4",children:[d&&c.jsx(ae,{variant:"link",size:"sm",onClick:x,className:"h-auto p-0 text-xs font-medium text-primary hover:text-primary/80",children:g.selectAll}),m&&c.jsx(ae,{variant:"link",size:"sm",onClick:b,className:"h-auto p-0 text-xs font-medium text-primary hover:text-primary/80",children:g.inverse}),f&&c.jsx(ae,{variant:"link",size:"sm",onClick:V,className:"h-auto p-0 text-xs font-medium text-primary hover:text-primary/80",children:g.none})]})]}),c.jsx(At,{className:"w-full mb-6"}),A&&"selectedValue"in e?c.jsx(Yr,{value:e.selectedValue,onValueChange:e.onChange,className:"grid grid-cols-2 gap-x-4 gap-y-5 overflow-y-auto",children:H.map(_=>c.jsx(ti,{label:_.label,value:_.value,description:_.description},_.value))}):M&&"selectedValues"in e?c.jsx("div",{className:"grid grid-cols-2 gap-x-4 gap-y-5 overflow-y-auto",children:H.map(_=>c.jsx(ei,{label:_.label,description:_.description,icon:_.icon,checked:e.selectedValues.includes(_.value),onCheckedChange:D=>S(_.value,D)},_.value))}):null]})});el.displayName="FilterSection";const ei=Z.forwardRef(({label:e,checked:a,onCheckedChange:n,description:r,className:l,icon:o},s)=>c.jsxs("label",{className:w("flex items-start gap-2 cursor-pointer",l),children:[c.jsx(Ih,{ref:s,checked:a,onCheckedChange:n}),o&&c.jsx("img",{src:o,alt:"",className:"size-4 object-contain shrink-0",onError:i=>{i.currentTarget.style.display="none"}}),c.jsxs("div",{className:"flex flex-col gap-0.5 min-w-0",children:[c.jsx(L1,{content:e,triggerProps:{className:"w-fit"},children:c.jsx("p",{className:"text-sm font-medium leading-4 truncate max-w-[165px]",children:e})}),r&&c.jsx(L1,{content:r,triggerProps:{className:"w-fit mt-2"},children:c.jsx("p",{className:"text-sm font-normal leading-5 text-muted-foreground truncate max-w-[165px]",children:r})})]})]}));ei.displayName="FilterCheckboxOption";const ti=Z.forwardRef(({label:e,value:a,description:n,className:r},l)=>c.jsxs("div",{className:w("flex items-start gap-3",r),children:[c.jsx(qr,{ref:l,value:a,id:`radio-${a}`}),c.jsxs("label",{htmlFor:`radio-${a}`,className:"flex flex-col gap-0.5 cursor-pointer min-w-0 truncate",children:[c.jsx(L1,{content:e,triggerProps:{className:"w-fit"},children:c.jsx("p",{className:"text-sm font-medium leading-4 truncate max-w-[165px]",children:e})}),n&&c.jsx(L1,{content:n,triggerProps:{className:"w-fit mt-2"},children:c.jsx("p",{className:"w-fittext-sm font-normal leading-4 text-muted-foreground truncate max-w-[165px]",children:n})})]})]}));ti.displayName="FilterRadioOption";const jM=Z.forwardRef(({children:e,showSearch:a=!1,searchPlaceholder:n,searchValue:r,onSearchChange:l,className:o,lang:s,translations:i},d)=>{const m=Z.useMemo(()=>{const f=Ja(s);return i?{...f,...i}:f},[s,i]);return c.jsxs("div",{ref:d,dir:mt(s),className:w("flex flex-col gap-6 bg-input rounded-md p-6 min-w-[448px]",o),children:[a&&c.jsx("div",{className:"flex flex-col gap-2",children:c.jsxs("div",{className:"relative",children:[c.jsx(n0,{name:"MagnifyingGlass",className:"absolute start-3 top-1/2 -translate-y-1/2 size-4 text-muted-foreground"}),c.jsx(Et,{placeholder:n??m.search,value:r,onChange:f=>l?.(f.target.value),className:"ps-9"})]})}),c.jsx("div",{className:"flex flex-col gap-6",children:e})]})});jM.displayName="FilterContent";const ze={CUSTOM:"CUSTOM",TODAY:"TODAY",LAST_3_DAYS:"LAST_3_DAYS",LAST_7_DAYS:"LAST_7_DAYS",LAST_30_DAYS:"LAST_30_DAYS",THIS_MONTH:"THIS_MONTH",ALL_TIME:"ALL_TIME"},Bt=(e,a)=>{const n=e.getDate();return`${a[e.getMonth()]} ${n}`},uz=(e,a)=>{const n=a[e.getMonth()],r=e.getFullYear();return`${n} ${r}`},mz=(e,a)=>a[e.getDay()],fz=(e,a)=>{const n=new Date;n.setHours(0,0,0,0);const r=`${mz(n,e)}, ${Bt(n,a)}`,l=new Date(n);l.setDate(l.getDate()-2);const o=`${Bt(l,a)} - ${Bt(n,a)}`,s=new Date(n);s.setDate(s.getDate()-6);const i=`${Bt(s,a)} - ${Bt(n,a)}`,d=new Date(n);d.setDate(d.getDate()-29);const m=`${Bt(d,a)} - ${Bt(n,a)}`,f=uz(n,a);return{today:r,last3Days:o,last7Days:i,last30Days:m,thisMonth:f}},D1=Z.forwardRef(({label:e,description:a,value:n,className:r,...l},o)=>{const s=`date-range-${n}`;return c.jsxs("div",{className:"flex items-start gap-4 w-full py-1",children:[c.jsxs("label",{ref:o,className:w("flex-1 flex items-start gap-3 cursor-pointer",r),...l,children:[c.jsx(qr,{id:s,value:n,className:"mt-px"}),c.jsx("div",{className:"flex flex-col gap-1.5 items-start justify-center pb-0 pt-px px-0",children:c.jsx("span",{className:"text-sm font-medium leading-none text-foreground",children:e})})]}),a&&c.jsx("div",{className:"flex items-center gap-2",children:c.jsx("span",{className:"text-xs font-normal leading-none text-muted-foreground whitespace-nowrap",children:a})})]})});D1.displayName="FilterDateRangeOption";const ai=Z.forwardRef(({showCustomFields:e=!1,onCustomFieldsChange:a,startDate:n,endDate:r,startTime:l="",endTime:o="",onStartDateChange:s,onEndDateChange:i,onStartTimeChange:d,onEndTimeChange:m,mode:f="range",singleDayLabel:u,showAllTime:p=!1,className:h,value:g,onValueChange:v,announcement:A,labels:M,lang:E,translations:y,...H},x)=>{const b=Z.useMemo(()=>{const k=Ja(E);return y?{...k,...y}:k},[E,y]),V=Z.useMemo(()=>cz(b),[b]),S=Z.useMemo(()=>dz(b),[b]),_=Z.useMemo(()=>fz(V,S),[V,S]),D=k=>{v?.(k),a?.(k===ze.CUSTOM)},z=k=>{if(k){const j=new Date(k);j.setHours(0,0,0,0);const G=new Date(k);G.setHours(23,59,59,999),s?.(j),i?.(G)}else s?.(void 0),i?.(void 0)};return c.jsxs("div",{ref:x,dir:mt(E),className:w("flex flex-col gap-4 w-full",h),children:[A&&(typeof A=="string"?c.jsx(_l,{icon:"Info",description:A}):A),c.jsxs(Yr,{value:g,onValueChange:D,className:"gap-2",...H,children:[c.jsx(D1,{label:M?.custom??b.custom,value:ze.CUSTOM}),e&&c.jsxs("div",{className:"flex flex-col gap-4 ps-7 mb-2",children:[f==="single"?c.jsx("div",{className:"flex flex-col gap-3",children:c.jsx(Sr,{date:n,onChange:z,placeholder:u??b.selectDate,className:"h-9",iconPosition:"none"})}):c.jsxs("div",{className:"flex gap-4 items-start w-full",children:[c.jsx("div",{className:"flex-1 flex flex-col gap-3",children:c.jsx(Sr,{date:n,onChange:s,placeholder:M?.startDate??b.startDate,className:"h-9",iconPosition:"none"})}),c.jsx("div",{className:"flex-1 flex flex-col gap-3",children:c.jsx(Sr,{date:r,onChange:i,placeholder:M?.endDate??b.endDate,className:"h-9",iconPosition:"none"})})]}),c.jsxs("div",{className:"flex gap-4 items-start w-full",children:[c.jsx("div",{className:"flex-1 flex flex-col gap-3",children:c.jsx(Kr,{value:l,onChange:d,mode:"dropdown",use24Hour:!0,width:"100%"})}),c.jsx("div",{className:"flex-1 flex flex-col gap-3",children:c.jsx(Kr,{value:o,onChange:m,mode:"dropdown",use24Hour:!0,width:"100%"})})]})]}),c.jsxs("div",{className:"flex flex-col gap-2",children:[c.jsx(D1,{label:M?.today??b.today,value:ze.TODAY,description:_.today}),c.jsx(D1,{label:M?.last3Days??b.last3Days,value:ze.LAST_3_DAYS,description:_.last3Days}),c.jsx(D1,{label:M?.last7Days??b.last7Days,value:ze.LAST_7_DAYS,description:_.last7Days}),c.jsx(D1,{label:M?.last30Days??b.last30Days,value:ze.LAST_30_DAYS,description:_.last30Days}),c.jsx(D1,{label:M?.thisMonth??b.thisMonth,value:ze.THIS_MONTH,description:_.thisMonth}),p&&c.jsx(D1,{label:M?.allTime??b.allTime,value:ze.ALL_TIME})]})]})]})});ai.displayName="FilterDateRange";const kM=Z.forwardRef(({title:e,value:a,onChange:n,placeholder:r,description:l,error:o,numericOnly:s=!1,maxItems:i,disabled:d=!1,className:m,allowDuplicates:f=!1,lang:u,translations:p},h)=>{const g=Z.useMemo(()=>{const A=Ja(u);return p?{...A,...p}:A},[u,p]),v=s?A=>/^\d+$/.test(A)?!0:g.onlyNumericAllowed:void 0;return c.jsxs("div",{ref:h,className:w("flex flex-col h-full",m),children:[c.jsx("div",{className:"flex items-center justify-between mb-1",children:c.jsx("span",{className:"text-sm font-normal text-foreground",children:e})}),c.jsx(At,{className:"w-full mb-6"}),c.jsx(m6,{value:a,onChange:n,placeholder:r??g.typeAndPressEnter,description:l,error:o,disabled:d,maxItems:i,allowDuplicates:f,validate:v,triggerKeys:["Enter","Tab","Comma"],deleteAll:a.length>0?{label:g.clearAll,length:1,onClick:()=>n([])}:void 0})]})});kM.displayName="FilterMultiInput";const ni=Z.forwardRef(({icon:e,label:a,isActive:n=!1,showChevron:r=!1,className:l,...o},s)=>c.jsxs("button",{ref:s,className:w("flex items-center gap-2 h-8 px-2 rounded-md w-full transition-colors shrink-0 hover:bg-secondary",l),...o,children:[e&&c.jsx(n0,{name:e,className:w("size-4 shrink-0",n?"text-primary":"text-foreground")}),c.jsx("span",{className:w("flex-1 text-sm font-normal text-left truncate",n?"text-primary":"text-foreground"),children:a}),(n||r)&&c.jsx(n0,{name:"CaretRight",className:w("size-4 shrink-0",n?"text-primary":"text-foreground")})]}));ni.displayName="FilterMenuItem";const ri=Z.forwardRef(({items:e,activeItemId:a,onItemClick:n,className:r},l)=>c.jsx("div",{ref:l,className:w("flex flex-col gap-2 w-64 h-full p-2 bg-muted border border-border rounded-md overflow-y-auto",r),children:e.map(o=>c.jsx(ni,{icon:o.icon,label:o.label,isActive:a===o.id,showChevron:o.showChevron,onClick:()=>n?.(o.id)},o.id))}));ri.displayName="FilterMenu";const DM=Z.forwardRef(({filters:e,buttonText:a,appliedFilters:n=[],onRemoveFilter:r,onClearAllFilters:l,onOpenChange:o,maxVisibleTags:s=4,className:i,disabled:d=!1,applyOnClose:m=!1,lang:f,translations:u},p)=>{const h=Z.useMemo(()=>{const $=Ja(f);return u?{...$,...u}:$},[f,u]),[g,v]=Z.useState(!1),[A,M]=Z.useState({}),E=Z.useRef({}),y=Z.useRef(e),H=Z.useCallback($=>{M(K=>{const t0=typeof $=="function"?$(K):$;return E.current=t0,t0})},[]);Z.useEffect(()=>{y.current=e},[e]);const x=Z.useCallback(()=>{if(!m)return;const $=E.current,K=y.current;Object.entries($).forEach(([t0,Q])=>{const d0=K.find(R0=>R0.id===t0);if(d0)switch(Q.type){case"checkbox":Q.checkboxValues!==void 0&&d0.onChange?.(Q.checkboxValues);break;case"radio":Q.radioValue!==void 0&&d0.onValueChange?.(Q.radioValue);break;case"date":Q.dateValue!==void 0&&d0.onDateValueChange?.(Q.dateValue),Q.dateInit!==void 0&&d0.onDateInitChange?.(Q.dateInit),Q.dateEnd!==void 0&&d0.onDateEndChange?.(Q.dateEnd),Q.startTime!==void 0&&d0.onStartTimeChange?.(Q.startTime),Q.endTime!==void 0&&d0.onEndTimeChange?.(Q.endTime);break;case"custom":Q.customValue!==void 0&&d0.onCustomChange?.(Q.customValue);break}}),H({})},[m,H]),b=Z.useCallback($=>{if(!$&&g&&m){o?.($),x(),v($);return}$&&!g&&m&&H({}),v($),o?.($)},[o,g,m,x,H]),[V,S]=Z.useState(e.length>0&&e[0]?.id||""),_=Z.useRef(null),D=Z.useCallback($=>{_.current=$,typeof p=="function"?p($):p&&(p.current=$)},[p]);Z.useEffect(()=>{if(!g)return;const $=Q=>{const d0=Q.target;_.current?.contains(d0)||d0.closest?.("[data-radix-popper-content-wrapper], [data-radix-portal]")||d0.closest?.(".rdp, .rdp-root, [data-calendar]")||b(!1)},K=Q=>{Q.key==="Escape"&&b(!1)},t0=setTimeout(()=>{document.addEventListener("mousedown",$),document.addEventListener("keydown",K)},0);return()=>{clearTimeout(t0),document.removeEventListener("mousedown",$),document.removeEventListener("keydown",K)}},[g,b]);const z=n.length>0,k=n.slice(0,s),j=n.length-s,G=$=>{if(e.find(Q=>Q.id===$))return $;const t0=$.split("-");if(t0.length>1){const Q=t0[0];if(e.find(R0=>R0.id===Q))return Q}return $},U=$=>{const K=G($);return e.find(Q=>Q.id===K)?.clearable!==!1},O=$=>{const K=G($);S(K),b(!0)},R=n.some($=>U($.id)),F=e.map($=>({id:$.id,icon:$.icon,label:$.label})),P=e.find($=>$.id===V),J=($,K)=>m?A[$]?.checkboxValues??K:K,o0=($,K)=>m?A[$]?.radioValue??K:K,N=($,K)=>m?A[$]?.dateValue??K:K,L=($,K)=>m?A[$]?.dateInit??K:K,T=($,K)=>m?A[$]?.dateEnd??K:K,W=($,K)=>m?A[$]?.startTime??K:K,e0=($,K)=>m?A[$]?.endTime??K:K,B=($,K,t0)=>Q=>{t0!==void 0&&t0>0&&Q.length<t0||(m?H(d0=>({...d0,[$]:{...d0[$],type:"checkbox",checkboxValues:Q}})):K?.(Q))},q=($,K)=>t0=>{m?H(Q=>({...Q,[$]:{...Q[$],type:"radio",radioValue:t0}})):K?.(t0)},c0=($,K)=>t0=>{m?H(Q=>({...Q,[$]:{...Q[$],type:"date",dateValue:t0}})):K?.(t0)},Y=($,K)=>t0=>{m?H(Q=>({...Q,[$]:{...Q[$],type:"date",dateInit:t0}})):K?.(t0)},i0=($,K)=>t0=>{m?H(Q=>({...Q,[$]:{...Q[$],type:"date",dateEnd:t0}})):K?.(t0)},f0=($,K)=>t0=>{m?H(Q=>({...Q,[$]:{...Q[$],type:"date",startTime:t0}})):K?.(t0)},x0=($,K)=>t0=>{m?H(Q=>({...Q,[$]:{...Q[$],type:"date",endTime:t0}})):K?.(t0)},s0=()=>{if(!P)return null;switch(P.type){case"checkbox":{const $=J(P.id,P.selectedValues||[]),K=P.description&&(P.descriptionMinSelection===void 0||$.length>=P.descriptionMinSelection);return c.jsx(el,{title:P.label,items:P.items||[],selectedValues:$,onChange:B(P.id,P.onChange,P.minSelection),searchable:P.searchable,searchPlaceholder:P.searchPlaceholder,showActions:P.showActions,enableSelectAll:P.enableSelectAll,enableInverse:P.enableInverse,enableNone:P.enableNone,description:K?P.description:void 0,lang:f,translations:u})}case"radio":return c.jsx(el,{type:"radio",title:P.label,items:P.items||[],selectedValue:o0(P.id,P.selectedValue||""),onChange:q(P.id,P.onValueChange),searchable:P.searchable,searchPlaceholder:P.searchPlaceholder,showActions:P.showActions,enableSelectAll:P.enableSelectAll,enableInverse:P.enableInverse,enableNone:P.enableNone,description:P.description,lang:f,translations:u});case"date":{const $=N(P.id,P.dateValue||ze.LAST_7_DAYS),K=L(P.id,P.dateInit),t0=T(P.id,P.dateEnd),Q=W(P.id,P.startTime||""),d0=e0(P.id,P.endTime||""),R0=m&&A[P.id]?.dateInit!==void 0,Be=m&&A[P.id]?.dateEnd!==void 0,w0=c0(P.id,P.onDateValueChange),B0=Y(P.id,P.onDateInitChange),ie=i0(P.id,P.onDateEndChange),ce=f0(P.id,P.onStartTimeChange),K0=x0(P.id,P.onEndTimeChange),Ae=x1=>{if(w0(x1),x1===ze.CUSTOM&&!R0&&!Be){const We=new Date,Ne=new Date(We);Ne.setHours(23,59,59,999);const Z0=new Date(We);Z0.setHours(0,0,0,0),B0(Z0),ie(Ne),ce("00:00:00"),K0("23:59:59")}};return c.jsx(ai,{value:$,onValueChange:Ae,showCustomFields:$===ze.CUSTOM,startDate:K,endDate:t0,startTime:Q,endTime:d0,mode:P.dateMode||"range",singleDayLabel:P.singleDayLabel,showAllTime:P.showAllTime,onStartDateChange:B0,onEndDateChange:ie,onStartTimeChange:ce,onEndTimeChange:K0,announcement:P.description,labels:P.dateLabels,lang:f,translations:u})}case"custom":{const $=m?{bufferedValue:A[P.id]?.customValue,onDeferredChange:K=>{H(t0=>({...t0,[P.id]:{...t0[P.id],type:"custom",customValue:K}}))},isDeferred:!0}:void 0;return P.renderContent?.($)}default:return null}};return c.jsxs("div",{ref:D,className:w("flex flex-col gap-1 relative",i),children:[c.jsxs("div",{className:"flex items-center gap-4",children:[c.jsxs(ae,{variant:"outline",size:"sm",className:"gap-2",onClick:()=>b(!g),disabled:d,children:[c.jsx(n0,{name:"FunnelSimple",className:"size-4"}),a??h.addFilter]}),z?c.jsxs(c.Fragment,{children:[c.jsx(At,{orientation:"vertical",className:"h-5"}),c.jsxs("div",{className:"flex items-center gap-2",children:[k.map($=>{const K=U($.id);return c.jsxs(ae,{variant:"secondary",onClick:()=>O($.id),className:"display-flex items-center gap-2",size:"sm",children:[$.label,r&&K&&c.jsx("button",{onClick:t0=>{t0.stopPropagation(),r($.id)},className:"inline-flex items-center justify-center","aria-label":`Remove ${$.label} filter`,children:c.jsx(n0,{name:"X",className:"size-4"})})]},$.id)}),j>0&&c.jsx(ae,{children:RM(h,j)}),l&&R&&c.jsx(ae,{variant:"ghost",size:"sm",className:"h-8 px-3 py-2",onClick:l,children:c.jsx("span",{className:"text-xs font-medium leading-none text-primary",children:h.clearFilters})})]})]}):c.jsxs(c.Fragment,{children:[c.jsx(At,{orientation:"vertical",className:"h-5"}),c.jsx("span",{className:"text-sm font-normal text-muted-foreground",children:h.noFiltersApplied})]})]}),g&&c.jsxs("div",{className:w("z-popover shadow-lg","absolute top-full start-0 mt-1","flex flex-row gap-2","w-[728px] h-[448px]","bg-popover border border-border rounded-md p-2"),children:[c.jsx(ri,{items:F,activeItemId:V,onItemClick:S}),c.jsx("div",{className:"flex flex-col gap-4 p-6 bg-popover w-[448px] h-full rounded-md overflow-y-auto",children:s0()})]})]})});DM.displayName="FilterDropdown";function hz(e,a=!1){const[n,r]=Z.useState(()=>typeof window>"u"?a:window.matchMedia(e).matches);return Z.useEffect(()=>{if(typeof window>"u")return;const l=window.matchMedia(e);r(l.matches);const o=s=>{r(s.matches)};return l.addEventListener?(l.addEventListener("change",o),()=>{l.removeEventListener("change",o)}):(l.addListener(o),()=>{l.removeListener(o)})},[e]),n}function pz(e){return mt(e)}const gz={success:"CheckCircle",error:"WarningCircle",warning:"Warning",info:"Info"},vz={success:"var(--color-success)",error:"var(--color-destructive)",warning:"var(--color-warning)",info:"var(--color-info)"},Az={success:"default",error:"destructive",warning:"default",info:"default"},Mz=()=>c.jsx("div",{className:"w-full h-1 bg-border rounded-full overflow-hidden mt-3",children:c.jsx("div",{className:"h-full bg-primary animate-progress-indeterminate"})}),Ez=({mode:e,title:a,message:n,primaryActionLabel:r,onAction:l,timeToLive:o=5e3,withCloseButton:s=!0,withProgress:i=!1})=>{const d=gz[e],m=!!a,f=!!(r&&l),u=c.jsx(n0,{name:d,className:"size-4",weight:"fill",style:{color:vz[e]}}),p=c.jsxs("div",{className:"flex flex-col gap-0 w-full",children:[c.jsx("div",{className:"flex items-start gap-2",children:c.jsx("div",{className:"flex-1 min-w-0",children:c.jsx("p",{className:m?"text-sm font-semibold":"text-sm",children:m?a:n})})}),m&&c.jsx("div",{className:"mt-1",children:c.jsx("p",{className:"text-sm text-muted-foreground",children:n})}),i&&c.jsx(Mz,{}),f&&c.jsx("div",{className:"mt-3",children:c.jsx(J0,{variant:Az[e],size:"sm",onClick:()=>{l(),ga.dismiss()},children:r})})]}),h={duration:o,closeButton:s,icon:u,position:"top-right",classNames:{toast:`notification-alert-toast notification-alert-${e}`}};switch(e){case"success":return ga.success(p,h);case"error":return ga.error(p,h);case"warning":return ga.warning(p,h);case"info":return ga.info(p,h)}};I.AccessDeniedAlert=Xm,I.Accordion=Um,I.AccordionContent=Km,I.AccordionItem=Ym,I.AccordionTrigger=qm,I.AggregatedTable=rg,I.Alert=_l,I.AnimatedIllustration=bh,I.Avatar=s5,I.Badge=p1,I.Breadcrumb=Mh,I.Button=J0,I.Card=p5,I.CardBase=dr,I.CardContent=ur,I.CardDescription=Gl,I.CardFooter=mr,I.CardHeader=Bl,I.CardTitle=Wl,I.Checkbox=Fn,I.Combobox=FM,I.CurrencyField=g5,I.DATA_TABLE_TRANSLATIONS=QA,I.DEFAULT_DATA_TABLE_TRANSLATIONS=G8,I.DataTable=ez,I.DataTableColumnHeader=Qs,I.DataTableListCell=wM,I.DataTableSortIndicator=xM,I.DatePicker=Sr,I.DateRangePicker=f_,I.Dialog=Xs,I.DialogContent=l6,I.DialogFooter=o6,I.DialogHeader=r6,I.DotsMenu=g9,I.DropdownMenu=Pr,I.DropdownMenuCheckboxItem=Lf,I.DropdownMenuContent=kr,I.DropdownMenuGroup=Vf,I.DropdownMenuItem=e1,I.DropdownMenuLabel=Cf,I.DropdownMenuPortal=bf,I.DropdownMenuRadioGroup=Sf,I.DropdownMenuRadioItem=Ff,I.DropdownMenuSeparator=Dr,I.DropdownMenuShortcut=_f,I.DropdownMenuSub=Nf,I.DropdownMenuSubContent=Pf,I.DropdownMenuSubTrigger=Rf,I.DropdownMenuTrigger=jr,I.Empty=i6,I.EmptyIcon=fP,I.EmptyStateOnboarding=Vh,I.Field=Et,I.FileUpload=Lh,I.FilterButton=PM,I.FilterCheckboxOption=ei,I.FilterContent=jM,I.FilterDateRange=ai,I.FilterDateRangeOption=D1,I.FilterDateRangeValue=ze,I.FilterDropdown=DM,I.FilterMenu=ri,I.FilterMenuItem=ni,I.FilterMultiInput=kM,I.FilterRadioOption=ti,I.FilterSection=el,I.FilterTag=Js,I.HighlightBanner=xh,I.Icon=n0,I.LANGUAGE_STORAGE_KEY=Li,I.Label=ye,I.Link=Tr,I.Loading=lh,I.MultiSelect=_M,I.MultiValuesField=m6,I.NavLink=s6,I.NavTabs=Zh,I.OTPField=Qh,I.PageTitle=oh,I.Pagination=n6,I.PaginationContent=Jo,I.PaginationEllipsis=a6,I.PaginationItem=Mt,I.PaginationLink=va,I.PaginationNext=t6,I.PaginationPrevious=e6,I.PaginationRoot=n6,I.PasswordField=v9,I.Popover=Jf,I.PopoverContent=th,I.PopoverTrigger=eh,I.Progress=Ko,I.ProtectedField=AR,I.ProviderCard=Ch,I.RadioGroup=m9,I.RadioGroupBase=Yr,I.RadioGroupItem=qr,I.RadioGroupOption=u9,I.SearchField=p6,I.SearchSelect=kp,I.Select=op,I.Separator=rh,I.Sheet=bM,I.Skeleton=Uo,I.Stepper=Sh,I.Switch=d6,I.TOTALS_ROW_ID=ng,I.Textarea=Wh,I.ThemedImage=Xo,I.TimePicker=Kr,I.Toaster=JR,I.ToggleGroup=Xf,I.ToggleGroupItem=Qf,I.Tooltip=L1,I.TooltipProvider=er,I.TransferList=SM,I.TransferListEmptyState=CM,I.Tutorial=VM,I.Typography=P0,I.avgAggregation=Jp,I.cn=w,I.getDataTableTranslations=JA,I.getDefaultLanguage=nn,I.maxAggregation=ag,I.minAggregation=tg,I.normalizeDimension=an,I.showNotificationAlert=Ez,I.sizeAggregation=eg,I.sumAggregation=Qp,I.toast=ga,I.useBodyScrollLock=qs,I.useDirection=pz,I.useEscapeKey=Ks,I.useMediaQuery=hz,Object.defineProperty(I,Symbol.toStringTag,{value:"Module"})}));
|
|
141
|
+
`}),c.jsxs("div",{...l,ref:p,className:w("bg-popover rounded-md border border-border shadow-md p-4","max-w-[368px]",d&&`max-w-[${d}px]`),style:d?{maxWidth:`${d}px`}:void 0,children:[c.jsxs("div",{className:"flex items-start justify-between gap-4 mb-2",children:[c.jsx("div",{className:"flex-1",children:a.title&&c.jsx(P0,{variant:"h4",className:"text-base font-medium leading-none",children:a.title})}),!a.hideCloseButton&&c.jsx(J0,{variant:"ghost",size:"icon",className:"h-8 w-8 shrink-0",onClick:n?.onClick,children:c.jsx(n0,{name:"X",size:"sm"})})]}),c.jsx("div",{className:"mb-6",children:c.jsx(P0,{variant:"sm",className:"text-muted-foreground font-normal",children:a.content})}),c.jsxs("div",{className:"flex items-center justify-between gap-4",children:[m&&f!==(u??0)-1&&c.jsx("div",{className:"flex-1",children:c.jsx(Tr,{...m,onClick:n?.onClick,underline:!1,className:"text-xs",children:m.title})}),(u??0)>1&&c.jsx("div",{className:"flex-shrink-0",children:c.jsxs(P0,{variant:"xs",className:"text-muted-foreground mr-6",children:["Step ",(f??0)+1," of ",u]})}),e&&r&&c.jsx("div",{className:"flex-shrink-0",children:c.jsx(J0,{size:"default",...r,children:r.title})})]}),!e&&i.length>0&&c.jsxs("div",{className:w("flex items-center mt-6 gap-3",i.length>1?"justify-between":"justify-end"),children:[o&&s&&c.jsx(p1,{variant:"default",className:"bg-green-100 text-green-800",children:s}),i.map((v,A)=>c.jsx(J0,{variant:v.variant||"default",size:v.size||"default",loading:v.loading,disabled:v.disabled,onClick:M=>g(M,v.event),children:v.label},A))]})]})]})});VM.displayName="Tutorial";const nz=({item:e,onMove:a,moveIconName:n="PlusCircle",isSelected:r=!1})=>c.jsxs("div",{className:"flex items-center py-1.5 px-2 bg-muted border border-border rounded gap-2 cursor-grabbing",role:"option","aria-selected":r,tabIndex:-1,children:[c.jsx("span",{className:"flex items-center shrink-0",children:c.jsx(n0,{name:"DotsSixVertical",className:"text-muted-foreground"})}),c.jsxs("span",{className:"text-xs text-foreground flex-1 flex flex-col gap-0.5",children:[c.jsx("span",{children:e.label}),e.description&&c.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:e.description})]}),e.actions,a&&c.jsx(J0,{variant:"ghost",size:"icon",onClick:l=>l.stopPropagation(),children:c.jsx(n0,{name:n,className:"text-muted-foreground"})})]}),rz=({item:e,index:a,group:n,onMove:r,moveIconName:l="PlusCircle",isSelected:o=!1})=>{const{ref:s,isDragging:i}=yM({id:e.id,index:a,group:n});return c.jsxs("div",{ref:s,className:w("flex items-center py-1.5 px-2 bg-muted border border-border rounded gap-2 cursor-grab",i&&"opacity-50 cursor-grabbing"),role:"option","aria-selected":o,tabIndex:0,onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&r&&(d.preventDefault(),r(e))},children:[c.jsx("span",{className:"flex items-center shrink-0",children:c.jsx(n0,{name:"DotsSixVertical",className:"text-muted-foreground"})}),c.jsxs("span",{className:"text-xs text-foreground flex-1 flex flex-col gap-0.5",children:[c.jsx("span",{children:e.label}),e.description&&c.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:e.description})]}),e.actions,r&&c.jsx(J0,{variant:"ghost",size:"icon",onClick:d=>{d.stopPropagation(),r(e)},children:c.jsx(n0,{name:l,className:"text-muted-foreground"})})]})},CM=({title:e="No items",description:a="No items available",iconName:n="TextColumns"})=>c.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 border border-border rounded-lg p-4 bg-muted",children:[c.jsx(n0,{name:n,className:"text-muted-foreground",size:"xl"}),c.jsx("p",{className:"text-base text-center text-foreground font-bold",children:e}),c.jsx("p",{className:"text-xs text-center text-muted-foreground",children:a})]}),lz=1,LM=({id:e,title:a,items:n,height:r,showSearch:l,search:o,searchPlaceholder:s,onSearchChange:i,onMove:d,moveIconName:m,emptyState:f,isSelected:u=!1})=>{const p=`${e}-title`,h=n.length===0,{ref:g}=KO({id:e,collisionPriority:lz}),v=f??c.jsx(CM,{});return c.jsxs("div",{className:"border border-border rounded-lg p-4 w-full flex flex-col gap-2",style:{height:r},children:[c.jsx("p",{id:p,className:"text-sm text-foreground mb-2",children:a}),l&&(!h||o.length>0)&&c.jsx(Et,{placeholder:s,value:o,onChange:A=>i(A.target.value),"aria-label":`${a} search`}),c.jsx("div",{ref:g,className:"h-full overflow-auto w-full flex flex-col gap-2",role:"listbox","aria-labelledby":p,"aria-multiselectable":!0,children:h?v:n.map((A,M)=>c.jsx(rz,{item:A,index:M,group:e,onMove:d,moveIconName:m,isSelected:u},A.id))})]})},SM=Z.forwardRef(({left:e,right:a,onChange:n,leftTitle:r="Available",rightTitle:l="Chosen",height:o=420,showSearch:s=!0,searchPlaceholder:i="Search",emptyState:d,leftEmptyState:m,className:f,...u},p)=>{const[h,g]=Z.useState(""),[v,A]=Z.useState(""),[M,E]=Z.useState({left:e,right:a}),y=Z.useRef(M),H=Z.useRef(!1),x=Z.useRef({left:e,right:a});Z.useEffect(()=>{if(!H.current){const j={left:e,right:a};E(j),y.current=j}},[e,a]);const b=Z.useMemo(()=>{const j=h.trim().toLowerCase();return j?M.left.filter(G=>G.label.toLowerCase().includes(j)):M.left},[M.left,h]),V=Z.useMemo(()=>{const j=v.trim().toLowerCase();return j?M.right.filter(G=>G.label.toLowerCase().includes(j)):M.right},[M.right,v]),S=()=>{H.current=!0,x.current=y.current},_=j=>{h.length>0||v.length>0||E(G=>{const U=XA(G,j);return y.current=U,U})},D=j=>{if(H.current=!1,j.canceled||h.length>0||v.length>0){E(x.current),y.current=x.current;return}n(y.current.left,y.current.right)},z=j=>{n(e.filter(G=>G.id!==j.id),[...a,j])},k=j=>{n([...e,j],a.filter(G=>G.id!==j.id))};return c.jsxs(kA,{onDragStart:S,onDragOver:_,onDragEnd:D,children:[c.jsxs("div",{ref:p,className:w("flex flex-col md:flex-row gap-4 md:gap-8",f),...u,children:[c.jsx(LM,{id:"left",title:r,items:b,height:o,showSearch:s,searchPlaceholder:i,search:h,onSearchChange:g,onMove:z,moveIconName:"PlusCircle",isSelected:!1,emptyState:m}),c.jsx(LM,{id:"right",title:l,items:V,height:o,showSearch:s,searchPlaceholder:i,search:v,onSearchChange:A,onMove:k,moveIconName:"MinusCircle",emptyState:d,isSelected:!0})]}),c.jsx(RO,{children:j=>{const G=y.current.left.concat(y.current.right).find(U=>U.id===j.id);return G?c.jsx(nz,{item:G}):null}})]})});SM.displayName="TransferList";const oz=({message:e="No results"})=>c.jsx("div",{className:"p-4 text-center",children:c.jsx(P0,{variant:"sm",className:"text-muted-foreground",children:e})}),FM=Z.forwardRef(({value:e,options:a,selectPlaceholder:n="Select",searchPlaceholder:r="Search",onChange:l,onCloseChip:o,valueProp:s="value",fullWidth:i=!1,disabled:d=!1,withSearch:m=!0,limitTags:f=10,maxHeightList:u=320,emptyState:p=c.jsx(oz,{}),label:h,description:g,error:v,deleteAll:A,className:M,id:E,renderOption:y,renderChip:H},x)=>{const[b,V]=Z.useState(!1),[S,_]=Z.useState(""),[D,z]=Z.useState(a),k=Z.useRef(null);Z.useEffect(()=>{z(a)},[a]),Z.useEffect(()=>{b&&k.current&&m&&setTimeout(()=>{k.current?.focus()},0)},[b,m]);const j=L=>{const T=L.label||L[s];return String(T)},G=L=>{const T=L.target.value;if(_(T),T==="")z(a);else{const W=a.filter(e0=>j(e0).toLowerCase().includes(T.toLowerCase()));z(W)}},U=L=>{if(d)return;const T=e.includes(L)?e.filter(W=>W!==L):[...e,L];l(T)},O=L=>{if(!d)if(o)o(L);else{const T=e.filter(W=>W!==L);l(T)}},R=()=>{d||!A?.onClick||A.onClick()},F=(L,T)=>L?.length<=T?L:L?.substring(0,T)+"...",P=e.map(L=>a.find(T=>T[s]===L)).filter(Boolean),J=A&&!d&&e.length>=A.length,o0=P.slice(0,f),N=P.length-f;return c.jsxs("div",{className:w("w-full",i&&"w-full",M),children:[h&&c.jsx(ye,{htmlFor:E,className:w("mb-2 block",d&&"opacity-50"),children:h}),g&&!v&&c.jsx(P0,{variant:"sm",className:w("text-muted-foreground mb-2",d&&"opacity-50"),children:g}),c.jsxs(sp,{open:b,onOpenChange:V,children:[c.jsx(ip,{asChild:!0,children:c.jsxs("button",{ref:x,id:E,type:"button",disabled:d,role:"combobox","aria-expanded":b,"aria-haspopup":"listbox","aria-controls":b?`${E}-listbox`:void 0,className:w("flex h-auto min-h-[38px] w-full items-center justify-between gap-2 rounded-md border border-input bg-input px-3 py-1.5 text-sm shadow-xs ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",v&&"border-destructive",i&&"w-full"),children:[c.jsx("div",{className:"flex flex-wrap gap-1 flex-1 items-center",children:e.length===0?c.jsx("span",{className:"text-muted-foreground",children:n}):c.jsxs(c.Fragment,{children:[J&&c.jsx("div",{onClick:L=>{L.preventDefault(),L.stopPropagation(),R()},children:c.jsx(p1,{variant:"secondary",className:"gap-1 cursor-pointer flex items-center",children:A.label||"Delete all"})}),o0.map(L=>c.jsx("div",{onClick:T=>{o&&!d&&(T.preventDefault(),T.stopPropagation(),O(L[s]))},children:H?H(L):c.jsx(p1,{variant:"outline",className:"gap-1 flex items-center",endIcon:o&&!d?"X":void 0,children:F(j(L),8)})},L[s])),N>0&&c.jsx(p1,{variant:"outline",className:"flex items-center",children:`+${N}`})]})}),c.jsx(n0,{name:"CaretUpDown",size:"sm",className:w("opacity-50 transition-transform",b&&"transform rotate-180")})]})}),c.jsx(Z6,{className:"p-0",align:"start",style:{maxHeight:u},id:E?`${E}-listbox`:void 0,role:"listbox",children:c.jsxs("div",{className:"flex flex-col",children:[m&&a.length>0&&c.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 border-b",children:[c.jsx(n0,{name:"MagnifyingGlass",size:"sm",className:"text-muted-foreground"}),c.jsx("input",{ref:k,type:"text",placeholder:r,value:S,onChange:G,onKeyDown:L=>{L.stopPropagation(),L.key==="Escape"&&V(!1)},className:"flex-1 outline-none bg-transparent text-sm placeholder:text-muted-foreground","aria-label":r})]}),c.jsx("div",{className:"overflow-y-auto",style:{maxHeight:m?u-48:u},children:D.length>0?D.map(L=>c.jsx("div",{role:"option","aria-selected":e.includes(L[s]),className:"flex items-center gap-2 px-3 py-2 cursor-pointer hover:bg-accent transition-colors",onClick:()=>U(L[s]),onKeyDown:T=>{(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),U(L[s]))},children:y?y(L,e.includes(L[s])):c.jsxs(c.Fragment,{children:[c.jsx(Fn,{checked:e.includes(L[s]),onChange:()=>U(L[s]),onClick:T=>T.stopPropagation()}),c.jsx("span",{className:"text-sm flex-1",children:j(L)})]})},L[s])):p})]})})]}),v&&c.jsx(P0,{variant:"sm",className:"text-destructive mt-2",children:v})]})});FM.displayName="Combobox";const _M=t.forwardRef(({options:e,value:a=[],onChange:n,placeholder:r="Select items...",searchPlaceholder:l="Search",emptyMessage:o="No results found.",disabled:s=!1,label:i,description:d,error:m,maxDisplay:f=3,className:u,showBadges:p=!0,allowClear:h=!0},g)=>{const[v,A]=t.useState(!1),[M,E]=t.useState(""),y=_=>{const D=a.includes(_)?a.filter(z=>z!==_):[...a,_];n?.(D)},H=(_,D)=>{D?.preventDefault(),D?.stopPropagation();const z=a.filter(k=>k!==_);n?.(z)},x=_=>{_.preventDefault(),_.stopPropagation(),n?.([])},b=a.map(_=>e.find(D=>D.value===_)).filter(Boolean),V=p?b.slice(0,f):[],S=b.length>f?b.length-f:0;return c.jsxs("div",{className:"w-full",children:[i&&c.jsx("label",{className:"text-sm font-medium text-foreground mb-1.5 block",children:i}),d&&c.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:d}),c.jsxs(Cr,{open:v,onOpenChange:A,children:[c.jsx(Lr,{asChild:!0,children:c.jsxs(ae,{ref:g,variant:"outline",role:"combobox","aria-expanded":v,disabled:s,className:w("w-full justify-between h-auto min-h-9 py-2",m&&"border-destructive",!a.length&&"text-muted-foreground",u),children:[c.jsx("div",{className:"flex flex-wrap gap-1 items-center flex-1",children:a.length===0?c.jsx("span",{children:r}):p?c.jsxs(c.Fragment,{children:[V.map(_=>c.jsxs("span",{className:"inline-flex items-center mr-1 px-2 py-0.5 h-6 text-xs font-normal rounded-md border border-border bg-secondary text-secondary-foreground",children:[c.jsx("span",{className:"max-w-[150px] truncate",children:_.label}),c.jsx("button",{type:"button",className:"ml-1 rounded-full outline-hidden hover:bg-muted-foreground/20",onClick:D=>H(_.value,D),children:c.jsx(lo,{className:"h-3 w-3"})})]},_.value)),S>0&&c.jsxs("span",{className:"inline-flex items-center px-2 py-0.5 h-6 text-xs font-normal rounded-md border border-border bg-secondary text-secondary-foreground",children:["+",S," more"]})]}):c.jsxs("span",{className:"text-sm",children:[b.length," selected"]})}),c.jsxs("div",{className:"flex items-center gap-1 ml-2",children:[h&&a.length>0&&c.jsx("button",{type:"button",onClick:x,className:"h-4 w-4 rounded-full hover:bg-muted p-0.5",children:c.jsx(lo,{className:"h-3 w-3"})}),c.jsx("svg",{className:"h-4 w-4 shrink-0 opacity-50",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:c.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]})}),c.jsx(Hn,{className:"w-[var(--radix-popover-trigger-width)] p-0",children:c.jsxs(_p,{shouldFilter:!1,children:[c.jsx(Np,{placeholder:l,value:M,onValueChange:E}),c.jsx(Pp,{children:o}),c.jsx(Rp,{children:c.jsx(jp,{children:e.filter(_=>_.label.toLowerCase().includes(M.toLowerCase())).map(_=>c.jsxs(N6,{value:_.value,onSelect:()=>{y(_.value)},children:[c.jsx(no,{className:w("mr-2 h-4 w-4",a.includes(_.value)?"opacity-100":"opacity-0")}),_.label]},_.value))})})]})})]}),m&&c.jsx("p",{className:"text-sm text-destructive mt-1.5",children:m})]})});_M.displayName="MultiSelect";const NM={addFilter:"Add filter",clearFilters:"Clear filters",noFiltersApplied:"No filters applied",moreFilters:"+{count} more",selectAll:"Select all",inverse:"Inverse",none:"None",search:"Search",typeAndPressEnter:"Type and press Enter...",onlyNumericAllowed:"Only numeric values are allowed",clearAll:"Clear all",custom:"Custom",today:"Today",last3Days:"Last 3 days",last7Days:"Last 7 days",last30Days:"Last 30 days",thisMonth:"This month",allTime:"All time",startDate:"Start date",endDate:"End date",selectDate:"Select date",sunday:"Sunday",monday:"Monday",tuesday:"Tuesday",wednesday:"Wednesday",thursday:"Thursday",friday:"Friday",saturday:"Saturday",jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"},sz={en:NM,es:{addFilter:"Agregar filtro",clearFilters:"Limpiar filtros",noFiltersApplied:"Sin filtros aplicados",moreFilters:"+{count} más",selectAll:"Seleccionar todo",inverse:"Invertir",none:"Ninguno",search:"Buscar",typeAndPressEnter:"Escribe y presiona Enter...",onlyNumericAllowed:"Solo se permiten valores numéricos",clearAll:"Limpiar todo",custom:"Personalizado",today:"Hoy",last3Days:"Últimos 3 días",last7Days:"Últimos 7 días",last30Days:"Últimos 30 días",thisMonth:"Este mes",allTime:"Todo el tiempo",startDate:"Fecha inicio",endDate:"Fecha fin",selectDate:"Seleccionar fecha",sunday:"Domingo",monday:"Lunes",tuesday:"Martes",wednesday:"Miércoles",thursday:"Jueves",friday:"Viernes",saturday:"Sábado",jan:"Ene",feb:"Feb",mar:"Mar",apr:"Abr",may:"May",jun:"Jun",jul:"Jul",aug:"Ago",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dic"},ja:{addFilter:"フィルターを追加",clearFilters:"フィルターをクリア",noFiltersApplied:"フィルターが適用されていません",moreFilters:"+{count}件",selectAll:"すべて選択",inverse:"反転",none:"なし",search:"検索",typeAndPressEnter:"入力してEnterを押す...",onlyNumericAllowed:"数値のみ入力可能です",clearAll:"すべてクリア",custom:"カスタム",today:"今日",last3Days:"過去3日間",last7Days:"過去7日間",last30Days:"過去30日間",thisMonth:"今月",allTime:"全期間",startDate:"開始日",endDate:"終了日",selectDate:"日付を選択",sunday:"日曜日",monday:"月曜日",tuesday:"火曜日",wednesday:"水曜日",thursday:"木曜日",friday:"金曜日",saturday:"土曜日",jan:"1月",feb:"2月",mar:"3月",apr:"4月",may:"5月",jun:"6月",jul:"7月",aug:"8月",sep:"9月",oct:"10月",nov:"11月",dec:"12月"},ar:{addFilter:"إضافة فلتر",clearFilters:"مسح الفلاتر",noFiltersApplied:"لم يتم تطبيق فلاتر",moreFilters:"+{count} أخرى",selectAll:"تحديد الكل",inverse:"عكس",none:"لا شيء",search:"بحث",typeAndPressEnter:"اكتب واضغط Enter...",onlyNumericAllowed:"مسموح بالقيم الرقمية فقط",clearAll:"مسح الكل",custom:"مخصص",today:"اليوم",last3Days:"آخر 3 أيام",last7Days:"آخر 7 أيام",last30Days:"آخر 30 يوماً",thisMonth:"هذا الشهر",allTime:"كل الوقت",startDate:"تاريخ البدء",endDate:"تاريخ الانتهاء",selectDate:"اختر التاريخ",sunday:"الأحد",monday:"الاثنين",tuesday:"الثلاثاء",wednesday:"الأربعاء",thursday:"الخميس",friday:"الجمعة",saturday:"السبت",jan:"يناير",feb:"فبراير",mar:"مارس",apr:"أبريل",may:"مايو",jun:"يونيو",jul:"يوليو",aug:"أغسطس",sep:"سبتمبر",oct:"أكتوبر",nov:"نوفمبر",dec:"ديسمبر"},fr:{addFilter:"Ajouter un filtre",clearFilters:"Effacer les filtres",noFiltersApplied:"Aucun filtre appliqué",moreFilters:"+{count} autres",selectAll:"Tout sélectionner",inverse:"Inverser",none:"Aucun",search:"Rechercher",typeAndPressEnter:"Tapez et appuyez sur Entrée...",onlyNumericAllowed:"Seules les valeurs numériques sont autorisées",clearAll:"Tout effacer",custom:"Personnalisé",today:"Aujourd'hui",last3Days:"3 derniers jours",last7Days:"7 derniers jours",last30Days:"30 derniers jours",thisMonth:"Ce mois-ci",allTime:"Tout le temps",startDate:"Date de début",endDate:"Date de fin",selectDate:"Sélectionner une date",sunday:"Dimanche",monday:"Lundi",tuesday:"Mardi",wednesday:"Mercredi",thursday:"Jeudi",friday:"Vendredi",saturday:"Samedi",jan:"Janv",feb:"Févr",mar:"Mars",apr:"Avr",may:"Mai",jun:"Juin",jul:"Juil",aug:"Août",sep:"Sept",oct:"Oct",nov:"Nov",dec:"Déc"},pt:{addFilter:"Adicionar filtro",clearFilters:"Limpar filtros",noFiltersApplied:"Nenhum filtro aplicado",moreFilters:"+{count} mais",selectAll:"Selecionar tudo",inverse:"Inverter",none:"Nenhum",search:"Pesquisar",typeAndPressEnter:"Digite e pressione Enter...",onlyNumericAllowed:"Apenas valores numéricos são permitidos",clearAll:"Limpar tudo",custom:"Personalizado",today:"Hoje",last3Days:"Últimos 3 dias",last7Days:"Últimos 7 dias",last30Days:"Últimos 30 dias",thisMonth:"Este mês",allTime:"Todo o período",startDate:"Data inicial",endDate:"Data final",selectDate:"Selecionar data",sunday:"Domingo",monday:"Segunda-feira",tuesday:"Terça-feira",wednesday:"Quarta-feira",thursday:"Quinta-feira",friday:"Sexta-feira",saturday:"Sábado",jan:"Jan",feb:"Fev",mar:"Mar",apr:"Abr",may:"Mai",jun:"Jun",jul:"Jul",aug:"Ago",sep:"Set",oct:"Out",nov:"Nov",dec:"Dez"},tr:{addFilter:"Filtre ekle",clearFilters:"Filtreleri temizle",noFiltersApplied:"Uygulanan filtre yok",moreFilters:"+{count} daha",selectAll:"Tümünü seç",inverse:"Tersine çevir",none:"Hiçbiri",search:"Ara",typeAndPressEnter:"Yazın ve Enter'a basın...",onlyNumericAllowed:"Yalnızca sayısal değerlere izin verilir",clearAll:"Tümünü temizle",custom:"Özel",today:"Bugün",last3Days:"Son 3 gün",last7Days:"Son 7 gün",last30Days:"Son 30 gün",thisMonth:"Bu ay",allTime:"Tüm zamanlar",startDate:"Başlangıç tarihi",endDate:"Bitiş tarihi",selectDate:"Tarih seçin",sunday:"Pazar",monday:"Pazartesi",tuesday:"Salı",wednesday:"Çarşamba",thursday:"Perşembe",friday:"Cuma",saturday:"Cumartesi",jan:"Oca",feb:"Şub",mar:"Mar",apr:"Nis",may:"May",jun:"Haz",jul:"Tem",aug:"Ağu",sep:"Eyl",oct:"Eki",nov:"Kas",dec:"Ara"},ru:{addFilter:"Добавить фильтр",clearFilters:"Очистить фильтры",noFiltersApplied:"Фильтры не применены",moreFilters:"+{count} ещё",selectAll:"Выбрать все",inverse:"Инвертировать",none:"Ничего",search:"Поиск",typeAndPressEnter:"Введите и нажмите Enter...",onlyNumericAllowed:"Допускаются только числовые значения",clearAll:"Очистить все",custom:"Произвольный",today:"Сегодня",last3Days:"Последние 3 дня",last7Days:"Последние 7 дней",last30Days:"Последние 30 дней",thisMonth:"Этот месяц",allTime:"Все время",startDate:"Дата начала",endDate:"Дата окончания",selectDate:"Выберите дату",sunday:"Воскресенье",monday:"Понедельник",tuesday:"Вторник",wednesday:"Среда",thursday:"Четверг",friday:"Пятница",saturday:"Суббота",jan:"Янв",feb:"Фев",mar:"Мар",apr:"Апр",may:"Май",jun:"Июн",jul:"Июл",aug:"Авг",sep:"Сен",oct:"Окт",nov:"Ноя",dec:"Дек"},de:{addFilter:"Filter hinzufügen",clearFilters:"Filter löschen",noFiltersApplied:"Keine Filter angewendet",moreFilters:"+{count} weitere",selectAll:"Alle auswählen",inverse:"Umkehren",none:"Keine",search:"Suchen",typeAndPressEnter:"Eingeben und Enter drücken...",onlyNumericAllowed:"Nur numerische Werte sind erlaubt",clearAll:"Alle löschen",custom:"Benutzerdefiniert",today:"Heute",last3Days:"Letzte 3 Tage",last7Days:"Letzte 7 Tage",last30Days:"Letzte 30 Tage",thisMonth:"Dieser Monat",allTime:"Gesamter Zeitraum",startDate:"Startdatum",endDate:"Enddatum",selectDate:"Datum auswählen",sunday:"Sonntag",monday:"Montag",tuesday:"Dienstag",wednesday:"Mittwoch",thursday:"Donnerstag",friday:"Freitag",saturday:"Samstag",jan:"Jan",feb:"Feb",mar:"Mär",apr:"Apr",may:"Mai",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Okt",nov:"Nov",dec:"Dez"},zh:{addFilter:"添加筛选",clearFilters:"清除筛选",noFiltersApplied:"未应用筛选",moreFilters:"+{count}个",selectAll:"全选",inverse:"反选",none:"清空",search:"搜索",typeAndPressEnter:"输入并按回车...",onlyNumericAllowed:"仅允许输入数字",clearAll:"清除全部",custom:"自定义",today:"今天",last3Days:"最近3天",last7Days:"最近7天",last30Days:"最近30天",thisMonth:"本月",allTime:"全部时间",startDate:"开始日期",endDate:"结束日期",selectDate:"选择日期",sunday:"星期日",monday:"星期一",tuesday:"星期二",wednesday:"星期三",thursday:"星期四",friday:"星期五",saturday:"星期六",jan:"1月",feb:"2月",mar:"3月",apr:"4月",may:"5月",jun:"6月",jul:"7月",aug:"8月",sep:"9月",oct:"10月",nov:"11月",dec:"12月"}},iz=NM;function Ja(e){const a=e??nn();return sz[a]??iz}function cz(e){return[e.sunday,e.monday,e.tuesday,e.wednesday,e.thursday,e.friday,e.saturday]}function dz(e){return[e.jan,e.feb,e.mar,e.apr,e.may,e.jun,e.jul,e.aug,e.sep,e.oct,e.nov,e.dec]}function RM(e,a){return e.moreFilters.replace("{count}",String(a))}const Js=Z.forwardRef(({label:e,onRemove:a,className:n,...r},l)=>c.jsxs(zl,{ref:l,variant:"secondary",className:w("h-8 gap-2 px-3 py-2 shadow-xs",n),...r,children:[c.jsx("span",{className:"text-xs font-medium leading-none",children:e}),a&&c.jsx("button",{onClick:a,className:"inline-flex items-center justify-center","aria-label":`Remove ${e} filter`,children:c.jsx(n0,{name:"X",className:"size-4"})})]}));Js.displayName="FilterTag";const PM=Z.forwardRef(({appliedFilters:e=[],onRemoveFilter:a,onClearAll:n,maxVisibleTags:r=4,className:l,lang:o,translations:s,...i},d)=>{const m=Z.useMemo(()=>{const h=Ja(o);return s?{...h,...s}:h},[o,s]),f=e.length>0,u=e.slice(0,r),p=e.length-r;return c.jsxs("div",{className:"flex items-center gap-4",children:[c.jsxs(ae,{ref:d,variant:"outline",size:"sm",className:w("h-8 gap-2 px-3 py-2",l),...i,children:[c.jsx(n0,{name:"FunnelSimple",className:"size-4"}),c.jsx("span",{className:"text-xs font-medium leading-none",children:m.addFilter})]}),f&&c.jsxs(c.Fragment,{children:[c.jsx(At,{orientation:"vertical",className:"h-5"}),c.jsxs("div",{className:"flex items-center gap-2",children:[u.map(h=>c.jsx(Js,{label:h.label,onRemove:()=>a?.(h.id)},h.id)),p>0&&c.jsx(zl,{variant:"default",className:"h-8 px-3 py-2 shadow-xs",children:c.jsx("span",{className:"text-xs font-medium leading-none",children:RM(m,p)})}),n&&c.jsx(ae,{variant:"ghost",size:"sm",onClick:n,className:"h-8 px-3 py-2",children:c.jsx("span",{className:"text-xs font-medium leading-none text-primary",children:m.clearFilters})})]})]}),!f&&c.jsxs(c.Fragment,{children:[c.jsx(At,{orientation:"vertical",className:"h-5"}),c.jsx("span",{className:"text-sm font-normal text-muted-foreground",children:m.noFiltersApplied})]})]})});PM.displayName="FilterButton";const el=Z.forwardRef((e,a)=>{const{title:n,items:r,className:l,searchable:o=!1,searchPlaceholder:s,showActions:i=!1,enableSelectAll:d=!0,enableInverse:m=!0,enableNone:f=!0,description:u,lang:p,translations:h}=e,g=Z.useMemo(()=>{const _=Ja(p);return h?{..._,...h}:_},[p,h]),v=e.type||"checkbox",A=v==="radio",M=v==="checkbox"||!e.type,[E,y]=Z.useState(""),H=Z.useMemo(()=>E?r.filter(_=>_.label.toLowerCase().includes(E.toLowerCase())):r,[r,E]),x=()=>{if(v==="checkbox"&&"selectedValues"in e){const _=H.map(z=>z.value),D=E?[...new Set([...e.selectedValues,..._])]:_;e.onChange(D)}},b=()=>{if(v==="checkbox"&&"selectedValues"in e)if(E){const _=new Set(H.map(k=>k.value)),D=e.selectedValues.filter(k=>!_.has(k)),z=H.filter(k=>!e.selectedValues.includes(k.value)).map(k=>k.value);e.onChange([...D,...z])}else{const _=r.filter(D=>!e.selectedValues.includes(D.value)).map(D=>D.value);e.onChange(_)}},V=()=>{if(v==="checkbox"&&"selectedValues"in e)if(E){const _=new Set(H.map(z=>z.value)),D=e.selectedValues.filter(z=>!_.has(z));e.onChange(D)}else e.onChange([]);else v==="radio"&&"selectedValue"in e&&e.onChange("")},S=(_,D)=>{if(v==="checkbox"&&"selectedValues"in e){const z=D?[...e.selectedValues,_]:e.selectedValues.filter(k=>k!==_);e.onChange(z)}};return c.jsxs("div",{ref:a,dir:mt(p),className:w("flex flex-col h-full",l),children:[o&&c.jsx(Et,{placeholder:s??g.search,value:E,onChange:_=>y(_.target.value),startIcon:"MagnifyingGlass",className:"mb-4"}),u&&c.jsx("p",{className:"text-xs font-normal text-muted-foreground mb-4",children:u}),c.jsxs("div",{className:"flex items-center justify-between mb-1",children:[c.jsx("span",{className:"text-sm font-normal text-foreground",children:n}),i&&v==="checkbox"&&c.jsxs("div",{className:"flex items-center justify-end gap-4",children:[d&&c.jsx(ae,{variant:"link",size:"sm",onClick:x,className:"h-auto p-0 text-xs font-medium text-primary hover:text-primary/80",children:g.selectAll}),m&&c.jsx(ae,{variant:"link",size:"sm",onClick:b,className:"h-auto p-0 text-xs font-medium text-primary hover:text-primary/80",children:g.inverse}),f&&c.jsx(ae,{variant:"link",size:"sm",onClick:V,className:"h-auto p-0 text-xs font-medium text-primary hover:text-primary/80",children:g.none})]})]}),c.jsx(At,{className:"w-full mb-6"}),A&&"selectedValue"in e?c.jsx(Yr,{value:e.selectedValue,onValueChange:e.onChange,className:"grid grid-cols-2 gap-x-4 gap-y-5 overflow-y-auto",children:H.map(_=>c.jsx(ti,{label:_.label,value:_.value,description:_.description},_.value))}):M&&"selectedValues"in e?c.jsx("div",{className:"grid grid-cols-2 gap-x-4 gap-y-5 overflow-y-auto",children:H.map(_=>c.jsx(ei,{label:_.label,description:_.description,icon:_.icon,checked:e.selectedValues.includes(_.value),onCheckedChange:D=>S(_.value,D)},_.value))}):null]})});el.displayName="FilterSection";const ei=Z.forwardRef(({label:e,checked:a,onCheckedChange:n,description:r,className:l,icon:o},s)=>c.jsxs("label",{className:w("flex items-start gap-2 cursor-pointer",l),children:[c.jsx(Ih,{ref:s,checked:a,onCheckedChange:n}),o&&c.jsx("img",{src:o,alt:"",className:"size-4 object-contain shrink-0",onError:i=>{i.currentTarget.style.display="none"}}),c.jsxs("div",{className:"flex flex-col gap-0.5 min-w-0",children:[c.jsx(L1,{content:e,triggerProps:{className:"w-fit"},children:c.jsx("p",{className:"text-sm font-medium leading-4 truncate max-w-[165px]",children:e})}),r&&c.jsx(L1,{content:r,triggerProps:{className:"w-fit mt-2"},children:c.jsx("p",{className:"text-sm font-normal leading-5 text-muted-foreground truncate max-w-[165px]",children:r})})]})]}));ei.displayName="FilterCheckboxOption";const ti=Z.forwardRef(({label:e,value:a,description:n,className:r},l)=>c.jsxs("div",{className:w("flex items-start gap-3",r),children:[c.jsx(qr,{ref:l,value:a,id:`radio-${a}`}),c.jsxs("label",{htmlFor:`radio-${a}`,className:"flex flex-col gap-0.5 cursor-pointer min-w-0 truncate",children:[c.jsx(L1,{content:e,triggerProps:{className:"w-fit"},children:c.jsx("p",{className:"text-sm font-medium leading-4 truncate max-w-[165px]",children:e})}),n&&c.jsx(L1,{content:n,triggerProps:{className:"w-fit mt-2"},children:c.jsx("p",{className:"w-fittext-sm font-normal leading-4 text-muted-foreground truncate max-w-[165px]",children:n})})]})]}));ti.displayName="FilterRadioOption";const jM=Z.forwardRef(({children:e,showSearch:a=!1,searchPlaceholder:n,searchValue:r,onSearchChange:l,className:o,lang:s,translations:i},d)=>{const m=Z.useMemo(()=>{const f=Ja(s);return i?{...f,...i}:f},[s,i]);return c.jsxs("div",{ref:d,dir:mt(s),className:w("flex flex-col gap-6 bg-input rounded-md p-6 min-w-[448px]",o),children:[a&&c.jsx("div",{className:"flex flex-col gap-2",children:c.jsxs("div",{className:"relative",children:[c.jsx(n0,{name:"MagnifyingGlass",className:"absolute start-3 top-1/2 -translate-y-1/2 size-4 text-muted-foreground"}),c.jsx(Et,{placeholder:n??m.search,value:r,onChange:f=>l?.(f.target.value),className:"ps-9"})]})}),c.jsx("div",{className:"flex flex-col gap-6",children:e})]})});jM.displayName="FilterContent";const ze={CUSTOM:"CUSTOM",TODAY:"TODAY",LAST_3_DAYS:"LAST_3_DAYS",LAST_7_DAYS:"LAST_7_DAYS",LAST_30_DAYS:"LAST_30_DAYS",THIS_MONTH:"THIS_MONTH",ALL_TIME:"ALL_TIME"},Bt=(e,a)=>{const n=e.getDate();return`${a[e.getMonth()]} ${n}`},uz=(e,a)=>{const n=a[e.getMonth()],r=e.getFullYear();return`${n} ${r}`},mz=(e,a)=>a[e.getDay()],fz=(e,a)=>{const n=new Date;n.setHours(0,0,0,0);const r=`${mz(n,e)}, ${Bt(n,a)}`,l=new Date(n);l.setDate(l.getDate()-2);const o=`${Bt(l,a)} - ${Bt(n,a)}`,s=new Date(n);s.setDate(s.getDate()-6);const i=`${Bt(s,a)} - ${Bt(n,a)}`,d=new Date(n);d.setDate(d.getDate()-29);const m=`${Bt(d,a)} - ${Bt(n,a)}`,f=uz(n,a);return{today:r,last3Days:o,last7Days:i,last30Days:m,thisMonth:f}},D1=Z.forwardRef(({label:e,description:a,value:n,className:r,...l},o)=>{const s=`date-range-${n}`;return c.jsxs("div",{className:"flex items-start gap-4 w-full py-1",children:[c.jsxs("label",{ref:o,className:w("flex-1 flex items-start gap-3 cursor-pointer",r),...l,children:[c.jsx(qr,{id:s,value:n,className:"mt-px"}),c.jsx("div",{className:"flex flex-col gap-1.5 items-start justify-center pb-0 pt-px px-0",children:c.jsx("span",{className:"text-sm font-medium leading-none text-foreground",children:e})})]}),a&&c.jsx("div",{className:"flex items-center gap-2",children:c.jsx("span",{className:"text-xs font-normal leading-none text-muted-foreground whitespace-nowrap",children:a})})]})});D1.displayName="FilterDateRangeOption";const ai=Z.forwardRef(({showCustomFields:e=!1,onCustomFieldsChange:a,startDate:n,endDate:r,startTime:l="",endTime:o="",onStartDateChange:s,onEndDateChange:i,onStartTimeChange:d,onEndTimeChange:m,mode:f="range",singleDayLabel:u,showAllTime:p=!1,className:h,value:g,onValueChange:v,announcement:A,labels:M,lang:E,translations:y,...H},x)=>{const b=Z.useMemo(()=>{const k=Ja(E);return y?{...k,...y}:k},[E,y]),V=Z.useMemo(()=>cz(b),[b]),S=Z.useMemo(()=>dz(b),[b]),_=Z.useMemo(()=>fz(V,S),[V,S]),D=k=>{v?.(k),a?.(k===ze.CUSTOM)},z=k=>{if(k){const j=new Date(k);j.setHours(0,0,0,0);const G=new Date(k);G.setHours(23,59,59,999),s?.(j),i?.(G)}else s?.(void 0),i?.(void 0)};return c.jsxs("div",{ref:x,dir:mt(E),className:w("flex flex-col gap-4 w-full",h),children:[A&&(typeof A=="string"?c.jsx(_l,{icon:"Info",description:A}):A),c.jsxs(Yr,{value:g,onValueChange:D,className:"gap-2",...H,children:[c.jsx(D1,{label:M?.custom??b.custom,value:ze.CUSTOM}),e&&c.jsxs("div",{className:"flex flex-col gap-4 ps-7 mb-2",children:[f==="single"?c.jsx("div",{className:"flex flex-col gap-3",children:c.jsx(Sr,{date:n,onChange:z,placeholder:u??b.selectDate,className:"h-9",iconPosition:"none"})}):c.jsxs("div",{className:"flex gap-4 items-start w-full",children:[c.jsx("div",{className:"flex-1 flex flex-col gap-3",children:c.jsx(Sr,{date:n,onChange:s,placeholder:M?.startDate??b.startDate,className:"h-9",iconPosition:"none"})}),c.jsx("div",{className:"flex-1 flex flex-col gap-3",children:c.jsx(Sr,{date:r,onChange:i,placeholder:M?.endDate??b.endDate,className:"h-9",iconPosition:"none"})})]}),c.jsxs("div",{className:"flex gap-4 items-start w-full",children:[c.jsx("div",{className:"flex-1 flex flex-col gap-3",children:c.jsx(Kr,{value:l,onChange:d,mode:"dropdown",use24Hour:!0,width:"100%"})}),c.jsx("div",{className:"flex-1 flex flex-col gap-3",children:c.jsx(Kr,{value:o,onChange:m,mode:"dropdown",use24Hour:!0,width:"100%"})})]})]}),c.jsxs("div",{className:"flex flex-col gap-2",children:[c.jsx(D1,{label:M?.today??b.today,value:ze.TODAY,description:_.today}),c.jsx(D1,{label:M?.last3Days??b.last3Days,value:ze.LAST_3_DAYS,description:_.last3Days}),c.jsx(D1,{label:M?.last7Days??b.last7Days,value:ze.LAST_7_DAYS,description:_.last7Days}),c.jsx(D1,{label:M?.last30Days??b.last30Days,value:ze.LAST_30_DAYS,description:_.last30Days}),c.jsx(D1,{label:M?.thisMonth??b.thisMonth,value:ze.THIS_MONTH,description:_.thisMonth}),p&&c.jsx(D1,{label:M?.allTime??b.allTime,value:ze.ALL_TIME})]})]})]})});ai.displayName="FilterDateRange";const kM=Z.forwardRef(({title:e,value:a,onChange:n,placeholder:r,description:l,error:o,numericOnly:s=!1,maxItems:i,disabled:d=!1,className:m,allowDuplicates:f=!1,lang:u,translations:p},h)=>{const g=Z.useMemo(()=>{const A=Ja(u);return p?{...A,...p}:A},[u,p]),v=s?A=>/^\d+$/.test(A)?!0:g.onlyNumericAllowed:void 0;return c.jsxs("div",{ref:h,className:w("flex flex-col h-full",m),children:[c.jsx("div",{className:"flex items-center justify-between mb-1",children:c.jsx("span",{className:"text-sm font-normal text-foreground",children:e})}),c.jsx(At,{className:"w-full mb-6"}),c.jsx(m6,{value:a,onChange:n,placeholder:r??g.typeAndPressEnter,description:l,error:o,disabled:d,maxItems:i,allowDuplicates:f,validate:v,triggerKeys:["Enter","Tab","Comma"],deleteAll:a.length>0?{label:g.clearAll,length:1,onClick:()=>n([])}:void 0})]})});kM.displayName="FilterMultiInput";const ni=Z.forwardRef(({icon:e,label:a,isActive:n=!1,showChevron:r=!1,className:l,...o},s)=>c.jsxs("button",{ref:s,className:w("flex items-center gap-2 h-8 px-2 rounded-md w-full transition-colors shrink-0 hover:bg-secondary",l),...o,children:[e&&c.jsx(n0,{name:e,className:w("size-4 shrink-0",n?"text-primary":"text-foreground")}),c.jsx("span",{className:w("flex-1 text-sm font-normal text-left truncate",n?"text-primary":"text-foreground"),children:a}),(n||r)&&c.jsx(n0,{name:"CaretRight",className:w("size-4 shrink-0",n?"text-primary":"text-foreground")})]}));ni.displayName="FilterMenuItem";const ri=Z.forwardRef(({items:e,activeItemId:a,onItemClick:n,className:r},l)=>c.jsx("div",{ref:l,className:w("flex flex-col gap-2 w-64 h-full p-2 bg-muted border border-border rounded-md overflow-y-auto",r),children:e.map(o=>c.jsx(ni,{icon:o.icon,label:o.label,isActive:a===o.id,showChevron:o.showChevron,onClick:()=>n?.(o.id)},o.id))}));ri.displayName="FilterMenu";const DM=Z.forwardRef(({filters:e,buttonText:a,appliedFilters:n=[],onRemoveFilter:r,onClearAllFilters:l,onOpenChange:o,maxVisibleTags:s=4,className:i,disabled:d=!1,applyOnClose:m=!1,lang:f,translations:u},p)=>{const h=Z.useMemo(()=>{const $=Ja(f);return u?{...$,...u}:$},[f,u]),[g,v]=Z.useState(!1),[A,M]=Z.useState({}),E=Z.useRef({}),y=Z.useRef(e),H=Z.useCallback($=>{M(K=>{const t0=typeof $=="function"?$(K):$;return E.current=t0,t0})},[]);Z.useEffect(()=>{y.current=e},[e]);const x=Z.useCallback(()=>{if(!m)return;const $=E.current,K=y.current;Object.entries($).forEach(([t0,Q])=>{const d0=K.find(R0=>R0.id===t0);if(d0)switch(Q.type){case"checkbox":Q.checkboxValues!==void 0&&d0.onChange?.(Q.checkboxValues);break;case"radio":Q.radioValue!==void 0&&d0.onValueChange?.(Q.radioValue);break;case"date":Q.dateValue!==void 0&&d0.onDateValueChange?.(Q.dateValue),Q.dateInit!==void 0&&d0.onDateInitChange?.(Q.dateInit),Q.dateEnd!==void 0&&d0.onDateEndChange?.(Q.dateEnd),Q.startTime!==void 0&&d0.onStartTimeChange?.(Q.startTime),Q.endTime!==void 0&&d0.onEndTimeChange?.(Q.endTime);break;case"custom":Q.customValue!==void 0&&d0.onCustomChange?.(Q.customValue);break}}),H({})},[m,H]),b=Z.useCallback($=>{if(!$&&g&&m){o?.($),x(),v($);return}$&&!g&&m&&H({}),v($),o?.($)},[o,g,m,x,H]),[V,S]=Z.useState(e.length>0&&e[0]?.id||""),_=Z.useRef(null),D=Z.useCallback($=>{_.current=$,typeof p=="function"?p($):p&&(p.current=$)},[p]);Z.useEffect(()=>{if(!g)return;const $=Q=>{const d0=Q.target;_.current?.contains(d0)||d0.closest?.("[data-radix-popper-content-wrapper], [data-radix-portal]")||d0.closest?.(".rdp, .rdp-root, [data-calendar]")||b(!1)},K=Q=>{Q.key==="Escape"&&b(!1)},t0=setTimeout(()=>{document.addEventListener("mousedown",$),document.addEventListener("keydown",K)},0);return()=>{clearTimeout(t0),document.removeEventListener("mousedown",$),document.removeEventListener("keydown",K)}},[g,b]);const z=n.length>0,k=n.slice(0,s),j=n.length-s,G=$=>{if(e.find(Q=>Q.id===$))return $;const t0=$.split("-");if(t0.length>1){const Q=t0[0];if(e.find(R0=>R0.id===Q))return Q}return $},U=$=>{const K=G($);return e.find(Q=>Q.id===K)?.clearable!==!1},O=$=>{const K=G($);S(K),b(!0)},R=n.some($=>U($.id)),F=e.map($=>({id:$.id,icon:$.icon,label:$.label})),P=e.find($=>$.id===V),J=($,K)=>m?A[$]?.checkboxValues??K:K,o0=($,K)=>m?A[$]?.radioValue??K:K,N=($,K)=>m?A[$]?.dateValue??K:K,L=($,K)=>m?A[$]?.dateInit??K:K,T=($,K)=>m?A[$]?.dateEnd??K:K,W=($,K)=>m?A[$]?.startTime??K:K,e0=($,K)=>m?A[$]?.endTime??K:K,B=($,K,t0)=>Q=>{t0!==void 0&&t0>0&&Q.length<t0||(m?H(d0=>({...d0,[$]:{...d0[$],type:"checkbox",checkboxValues:Q}})):K?.(Q))},q=($,K)=>t0=>{m?H(Q=>({...Q,[$]:{...Q[$],type:"radio",radioValue:t0}})):K?.(t0)},c0=($,K)=>t0=>{m?H(Q=>({...Q,[$]:{...Q[$],type:"date",dateValue:t0}})):K?.(t0)},Y=($,K)=>t0=>{m?H(Q=>({...Q,[$]:{...Q[$],type:"date",dateInit:t0}})):K?.(t0)},i0=($,K)=>t0=>{m?H(Q=>({...Q,[$]:{...Q[$],type:"date",dateEnd:t0}})):K?.(t0)},f0=($,K)=>t0=>{m?H(Q=>({...Q,[$]:{...Q[$],type:"date",startTime:t0}})):K?.(t0)},x0=($,K)=>t0=>{m?H(Q=>({...Q,[$]:{...Q[$],type:"date",endTime:t0}})):K?.(t0)},s0=()=>{if(!P)return null;switch(P.type){case"checkbox":{const $=J(P.id,P.selectedValues||[]),K=P.description&&(P.descriptionMinSelection===void 0||$.length>=P.descriptionMinSelection);return c.jsx(el,{title:P.label,items:P.items||[],selectedValues:$,onChange:B(P.id,P.onChange,P.minSelection),searchable:P.searchable,searchPlaceholder:P.searchPlaceholder,showActions:P.showActions,enableSelectAll:P.enableSelectAll,enableInverse:P.enableInverse,enableNone:P.enableNone,description:K?P.description:void 0,lang:f,translations:u})}case"radio":return c.jsx(el,{type:"radio",title:P.label,items:P.items||[],selectedValue:o0(P.id,P.selectedValue||""),onChange:q(P.id,P.onValueChange),searchable:P.searchable,searchPlaceholder:P.searchPlaceholder,showActions:P.showActions,enableSelectAll:P.enableSelectAll,enableInverse:P.enableInverse,enableNone:P.enableNone,description:P.description,lang:f,translations:u});case"date":{const $=N(P.id,P.dateValue||ze.LAST_7_DAYS),K=L(P.id,P.dateInit),t0=T(P.id,P.dateEnd),Q=W(P.id,P.startTime||""),d0=e0(P.id,P.endTime||""),R0=m&&A[P.id]?.dateInit!==void 0,Be=m&&A[P.id]?.dateEnd!==void 0,w0=c0(P.id,P.onDateValueChange),B0=Y(P.id,P.onDateInitChange),ie=i0(P.id,P.onDateEndChange),ce=f0(P.id,P.onStartTimeChange),K0=x0(P.id,P.onEndTimeChange),Ae=x1=>{if(w0(x1),x1===ze.CUSTOM&&!R0&&!Be){const We=new Date,Ne=new Date(We);Ne.setHours(23,59,59,999);const Z0=new Date(We);Z0.setHours(0,0,0,0),B0(Z0),ie(Ne),ce("00:00:00"),K0("23:59:59")}};return c.jsx(ai,{value:$,onValueChange:Ae,showCustomFields:$===ze.CUSTOM,startDate:K,endDate:t0,startTime:Q,endTime:d0,mode:P.dateMode||"range",singleDayLabel:P.singleDayLabel,showAllTime:P.showAllTime,onStartDateChange:B0,onEndDateChange:ie,onStartTimeChange:ce,onEndTimeChange:K0,announcement:P.description,labels:P.dateLabels,lang:f,translations:u})}case"custom":{const $=m?{bufferedValue:A[P.id]?.customValue,onDeferredChange:K=>{H(t0=>({...t0,[P.id]:{...t0[P.id],type:"custom",customValue:K}}))},isDeferred:!0}:void 0;return P.renderContent?.($)}default:return null}};return c.jsxs("div",{ref:D,className:w("flex flex-col gap-1 relative",i),children:[c.jsxs("div",{className:"flex items-center gap-4",children:[c.jsxs(ae,{variant:"outline",size:"sm",className:"gap-2",onClick:()=>b(!g),disabled:d,children:[c.jsx(n0,{name:"FunnelSimple",className:"size-4"}),a??h.addFilter]}),z?c.jsxs(c.Fragment,{children:[c.jsx(At,{orientation:"vertical",className:"h-5"}),c.jsxs("div",{className:"flex items-center gap-2",children:[k.map($=>{const K=U($.id);return c.jsxs(ae,{variant:"secondary",onClick:()=>O($.id),className:"display-flex items-center gap-2",size:"sm",children:[$.label,r&&K&&c.jsx("button",{onClick:t0=>{t0.stopPropagation(),r($.id)},className:"inline-flex items-center justify-center","aria-label":`Remove ${$.label} filter`,children:c.jsx(n0,{name:"X",className:"size-4"})})]},$.id)}),j>0&&c.jsx(ae,{children:RM(h,j)}),l&&R&&c.jsx(ae,{variant:"ghost",size:"sm",className:"h-8 px-3 py-2",onClick:l,children:c.jsx("span",{className:"text-xs font-medium leading-none text-primary",children:h.clearFilters})})]})]}):c.jsxs(c.Fragment,{children:[c.jsx(At,{orientation:"vertical",className:"h-5"}),c.jsx("span",{className:"text-sm font-normal text-muted-foreground",children:h.noFiltersApplied})]})]}),g&&c.jsxs("div",{className:w("z-popover shadow-lg","absolute top-full start-0 mt-1","flex flex-row gap-2","w-[728px] h-[448px]","bg-popover border border-border rounded-md p-2"),children:[c.jsx(ri,{items:F,activeItemId:V,onItemClick:S}),c.jsx("div",{className:"flex flex-col gap-4 p-6 bg-popover w-[448px] h-full rounded-md overflow-y-auto",children:s0()})]})]})});DM.displayName="FilterDropdown";function hz(e,a=!1){const[n,r]=Z.useState(()=>typeof window>"u"?a:window.matchMedia(e).matches);return Z.useEffect(()=>{if(typeof window>"u")return;const l=window.matchMedia(e);r(l.matches);const o=s=>{r(s.matches)};return l.addEventListener?(l.addEventListener("change",o),()=>{l.removeEventListener("change",o)}):(l.addListener(o),()=>{l.removeListener(o)})},[e]),n}function pz(e){return mt(e)}const gz={success:"CheckCircle",error:"WarningCircle",warning:"Warning",info:"Info"},vz={success:"var(--color-success)",error:"var(--color-destructive)",warning:"var(--color-warning)",info:"var(--color-info)"},Az={success:"default",error:"destructive",warning:"default",info:"default"},Mz=()=>c.jsx("div",{className:"w-full h-1 bg-border rounded-full overflow-hidden mt-3",children:c.jsx("div",{className:"h-full bg-primary animate-progress-indeterminate"})}),Ez=({mode:e,title:a,message:n,primaryActionLabel:r,onAction:l,timeToLive:o=5e3,withCloseButton:s=!0,withProgress:i=!1})=>{const d=gz[e],m=!!a,f=!!(r&&l),u=c.jsx(n0,{name:d,className:"size-4",weight:"fill",style:{color:vz[e]}}),p=c.jsxs("div",{className:"flex flex-col gap-0 w-full",children:[c.jsx("div",{className:"flex items-start gap-2",children:c.jsx("div",{className:"flex-1 min-w-0",children:c.jsx("p",{className:m?"text-sm font-semibold":"text-sm",children:m?a:n})})}),m&&c.jsx("div",{className:"mt-1",children:c.jsx("p",{className:"text-sm text-muted-foreground",children:n})}),i&&c.jsx(Mz,{}),f&&c.jsx("div",{className:"mt-3",children:c.jsx(J0,{variant:Az[e],size:"sm",onClick:()=>{l(),ga.dismiss()},children:r})})]}),h={duration:o,closeButton:s,icon:u,position:"top-right",classNames:{toast:`notification-alert-toast notification-alert-${e}`}};switch(e){case"success":return ga.success(p,h);case"error":return ga.error(p,h);case"warning":return ga.warning(p,h);case"info":return ga.info(p,h)}};I.AccessDeniedAlert=Xm,I.Accordion=Um,I.AccordionContent=Km,I.AccordionItem=Ym,I.AccordionTrigger=qm,I.AggregatedTable=rg,I.Alert=_l,I.AnimatedEmpty=bh,I.Avatar=s5,I.Badge=p1,I.Breadcrumb=Mh,I.Button=J0,I.Card=p5,I.CardBase=dr,I.CardContent=ur,I.CardDescription=Gl,I.CardFooter=mr,I.CardHeader=Bl,I.CardTitle=Wl,I.Checkbox=Fn,I.Combobox=FM,I.CurrencyField=g5,I.DATA_TABLE_TRANSLATIONS=QA,I.DEFAULT_DATA_TABLE_TRANSLATIONS=G8,I.DataTable=ez,I.DataTableColumnHeader=Qs,I.DataTableListCell=wM,I.DataTableSortIndicator=xM,I.DatePicker=Sr,I.DateRangePicker=f_,I.Dialog=Xs,I.DialogContent=l6,I.DialogFooter=o6,I.DialogHeader=r6,I.DotsMenu=g9,I.DropdownMenu=Pr,I.DropdownMenuCheckboxItem=Lf,I.DropdownMenuContent=kr,I.DropdownMenuGroup=Vf,I.DropdownMenuItem=e1,I.DropdownMenuLabel=Cf,I.DropdownMenuPortal=bf,I.DropdownMenuRadioGroup=Sf,I.DropdownMenuRadioItem=Ff,I.DropdownMenuSeparator=Dr,I.DropdownMenuShortcut=_f,I.DropdownMenuSub=Nf,I.DropdownMenuSubContent=Pf,I.DropdownMenuSubTrigger=Rf,I.DropdownMenuTrigger=jr,I.Empty=i6,I.EmptyIcon=fP,I.EmptyStateOnboarding=Vh,I.Field=Et,I.FileUpload=Lh,I.FilterButton=PM,I.FilterCheckboxOption=ei,I.FilterContent=jM,I.FilterDateRange=ai,I.FilterDateRangeOption=D1,I.FilterDateRangeValue=ze,I.FilterDropdown=DM,I.FilterMenu=ri,I.FilterMenuItem=ni,I.FilterMultiInput=kM,I.FilterRadioOption=ti,I.FilterSection=el,I.FilterTag=Js,I.HighlightBanner=xh,I.Icon=n0,I.LANGUAGE_STORAGE_KEY=Li,I.Label=ye,I.Link=Tr,I.Loading=lh,I.MultiSelect=_M,I.MultiValuesField=m6,I.NavLink=s6,I.NavTabs=Zh,I.OTPField=Qh,I.PageTitle=oh,I.Pagination=n6,I.PaginationContent=Jo,I.PaginationEllipsis=a6,I.PaginationItem=Mt,I.PaginationLink=va,I.PaginationNext=t6,I.PaginationPrevious=e6,I.PaginationRoot=n6,I.PasswordField=v9,I.Popover=Jf,I.PopoverContent=th,I.PopoverTrigger=eh,I.Progress=Ko,I.ProtectedField=AR,I.ProviderCard=Ch,I.RadioGroup=m9,I.RadioGroupBase=Yr,I.RadioGroupItem=qr,I.RadioGroupOption=u9,I.SearchField=p6,I.SearchSelect=kp,I.Select=op,I.Separator=rh,I.Sheet=bM,I.Skeleton=Uo,I.Stepper=Sh,I.Switch=d6,I.TOTALS_ROW_ID=ng,I.Textarea=Wh,I.ThemedImage=Xo,I.TimePicker=Kr,I.Toaster=JR,I.ToggleGroup=Xf,I.ToggleGroupItem=Qf,I.Tooltip=L1,I.TooltipProvider=er,I.TransferList=SM,I.TransferListEmptyState=CM,I.Tutorial=VM,I.Typography=P0,I.avgAggregation=Jp,I.cn=w,I.getDataTableTranslations=JA,I.getDefaultLanguage=nn,I.maxAggregation=ag,I.minAggregation=tg,I.normalizeDimension=an,I.showNotificationAlert=Ez,I.sizeAggregation=eg,I.sumAggregation=Qp,I.toast=ga,I.useBodyScrollLock=qs,I.useDirection=pz,I.useEscapeKey=Ks,I.useMediaQuery=hz,Object.defineProperty(I,Symbol.toStringTag,{value:"Module"})}));
|
package/package.json
CHANGED