@dnotrever2/super-kit 0.1.11 → 0.1.14
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/README.md +75 -5
- package/dist/Breadcrumb/Breadcrumb.d.ts +20 -0
- package/dist/Breadcrumb/index.d.ts +1 -0
- package/dist/Input/Input.d.ts +2 -0
- package/dist/Select/Select.d.ts +3 -1
- package/dist/Textarea/Textarea.d.ts +9 -1
- package/dist/Toast/Toast.d.ts +4 -2
- package/dist/Tooltip/Tooltip.d.ts +3 -2
- package/dist/index.d.ts +1 -0
- package/dist/super-kit.cjs +1 -1
- package/dist/super-kit.cjs.map +1 -1
- package/dist/super-kit.css +1 -1
- package/dist/super-kit.js +1033 -912
- package/dist/super-kit.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -58,6 +58,44 @@ import { Badge } from "@dnotrever2/super-kit";
|
|
|
58
58
|
|
|
59
59
|
---
|
|
60
60
|
|
|
61
|
+
### Breadcrumb
|
|
62
|
+
|
|
63
|
+
Page hierarchy navigation with links, actions, and automatic current-page state.
|
|
64
|
+
|
|
65
|
+
```tsx
|
|
66
|
+
import { Breadcrumb } from "@dnotrever2/super-kit";
|
|
67
|
+
|
|
68
|
+
<Breadcrumb
|
|
69
|
+
items={[
|
|
70
|
+
{ label: "Projects", href: "/projects" },
|
|
71
|
+
{ label: "super-kit", href: "/projects/super-kit" },
|
|
72
|
+
{ label: "Components" }
|
|
73
|
+
]}
|
|
74
|
+
/>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
| Prop | Type | Default |
|
|
78
|
+
| ----------- | ------------------ | -------------- |
|
|
79
|
+
| `items` | `BreadcrumbItem[]` | required |
|
|
80
|
+
| `separator` | `ReactNode` | chevron icon |
|
|
81
|
+
| `label` | `string` | `"Breadcrumb"` |
|
|
82
|
+
|
|
83
|
+
**BreadcrumbItem fields**
|
|
84
|
+
|
|
85
|
+
| Field | Type |
|
|
86
|
+
| ------------- | --------------------------------------- |
|
|
87
|
+
| `label` | `ReactNode` |
|
|
88
|
+
| `href` | `string` |
|
|
89
|
+
| `current` | `boolean` |
|
|
90
|
+
| `disabled` | `boolean` |
|
|
91
|
+
| `onClick` | `() => void` |
|
|
92
|
+
| `linkProps` | `AnchorHTMLAttributes<HTMLAnchorElement>` |
|
|
93
|
+
| `buttonProps` | `ButtonHTMLAttributes<HTMLButtonElement>` |
|
|
94
|
+
|
|
95
|
+
The last item is treated as the current page unless `current` is set explicitly.
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
61
99
|
### Button
|
|
62
100
|
|
|
63
101
|
Standard action button with semantic variants and loading state.
|
|
@@ -176,6 +214,7 @@ import { Input } from "@dnotrever2/super-kit";
|
|
|
176
214
|
| `value` / `defaultValue` | `string` | `""` |
|
|
177
215
|
| `onChange` | `ChangeEvent<HTMLInputElement>` | — |
|
|
178
216
|
| `onValueChange` | `(change: { value, rawValue }) => void` | — |
|
|
217
|
+
| `inputProps` | `InputHTMLAttributes<HTMLInputElement>` | — |
|
|
179
218
|
| `wrapperProps` | `HTMLAttributes<HTMLSpanElement>` | — |
|
|
180
219
|
| `fieldProps` | `HTMLAttributes<HTMLDivElement>` | — |
|
|
181
220
|
|
|
@@ -418,6 +457,7 @@ const options = [
|
|
|
418
457
|
| `showClearAll` | `boolean` | `true` |
|
|
419
458
|
| `showSelectedValues` | `boolean` | `true` |
|
|
420
459
|
| `closeOnSelect` | `boolean` | `true` single, `false` multi |
|
|
460
|
+
| `selectProps` | `ButtonHTMLAttributes<HTMLButtonElement>` | — |
|
|
421
461
|
| `label` | `string` | — |
|
|
422
462
|
| `onValueChange` | `(value, selectedOptions) => void` | — |
|
|
423
463
|
| `filterOptions` | `(options, search) => options` | built-in case-insensitive |
|
|
@@ -488,6 +528,9 @@ import { Textarea } from "@dnotrever2/super-kit";
|
|
|
488
528
|
| `mono` | `boolean` | `false` |
|
|
489
529
|
| `value` / `defaultValue` | `string` | `""` |
|
|
490
530
|
| `onValueChange` | `(value: string) => void` | — |
|
|
531
|
+
| `textareaProps` | `TextareaHTMLAttributes<HTMLTextAreaElement>` | — |
|
|
532
|
+
| `wrapperProps` | `HTMLAttributes<HTMLDivElement>` | — |
|
|
533
|
+
| `fieldProps` | `HTMLAttributes<HTMLDivElement>` | — |
|
|
491
534
|
|
|
492
535
|
Forwards a `ref` to the underlying `<textarea>`.
|
|
493
536
|
|
|
@@ -517,24 +560,46 @@ function DeployButton() {
|
|
|
517
560
|
</Button>
|
|
518
561
|
);
|
|
519
562
|
}
|
|
563
|
+
|
|
564
|
+
function LoadingDeployButton() {
|
|
565
|
+
const { toast, dismiss } = useToast();
|
|
566
|
+
|
|
567
|
+
return (
|
|
568
|
+
<Button
|
|
569
|
+
onClick={() => {
|
|
570
|
+
const id = toast({
|
|
571
|
+
variant: "loading",
|
|
572
|
+
title: "Deploying",
|
|
573
|
+
message: "Please wait",
|
|
574
|
+
overlay: true
|
|
575
|
+
});
|
|
576
|
+
|
|
577
|
+
deploy().finally(() => dismiss(id));
|
|
578
|
+
}}
|
|
579
|
+
>
|
|
580
|
+
Deploy
|
|
581
|
+
</Button>
|
|
582
|
+
);
|
|
583
|
+
}
|
|
520
584
|
```
|
|
521
585
|
|
|
522
586
|
**`toast(options)` options**
|
|
523
587
|
|
|
524
588
|
| Field | Type | Default |
|
|
525
589
|
| ---------- | ---------------------------------------- | --------------------------- |
|
|
526
|
-
| `variant` | `"ok" \| "error" \| "warning" \| "info"` | required
|
|
590
|
+
| `variant` | `"ok" \| "error" \| "warning" \| "info" \| "loading"` | required |
|
|
527
591
|
| `title` | `string` | required |
|
|
528
592
|
| `message` | `string` | — |
|
|
529
|
-
| `duration` | `number` (ms) | `4000`
|
|
593
|
+
| `duration` | `number` (ms) | `4000`; `loading` defaults to `0` |
|
|
594
|
+
| `overlay` | `boolean` | `false` — only applies to `loading` |
|
|
530
595
|
|
|
531
|
-
`toast()` returns the toast `id`. Dismiss manually with `dismiss(id)`.
|
|
596
|
+
`toast()` returns the toast `id`. Dismiss manually with `dismiss(id)`. Loading toasts show a spinner and do not render a close button.
|
|
532
597
|
|
|
533
598
|
---
|
|
534
599
|
|
|
535
600
|
### Tooltip
|
|
536
601
|
|
|
537
|
-
Hover/focus tooltip
|
|
602
|
+
Hover/focus tooltip around a child element.
|
|
538
603
|
|
|
539
604
|
```tsx
|
|
540
605
|
import { Tooltip } from "@dnotrever2/super-kit";
|
|
@@ -542,12 +607,17 @@ import { Tooltip } from "@dnotrever2/super-kit";
|
|
|
542
607
|
<Tooltip content="Deploy to production" side="top">
|
|
543
608
|
<Button variant="primary">Deploy</Button>
|
|
544
609
|
</Tooltip>
|
|
610
|
+
|
|
611
|
+
<Tooltip content="No delay" delay={0}>
|
|
612
|
+
<Button variant="primary">Deploy</Button>
|
|
613
|
+
</Tooltip>
|
|
545
614
|
```
|
|
546
615
|
|
|
547
616
|
| Prop | Type | Default |
|
|
548
617
|
| -------------- | --------------------------------- | -------- |
|
|
549
618
|
| `content` | `ReactNode` | required |
|
|
550
|
-
| `side` | `"top" \| "bottom"`
|
|
619
|
+
| `side` | `"top" \| "bottom" \| "left" \| "right"` | `"top"` |
|
|
620
|
+
| `delay` | `number` (ms) | `800` |
|
|
551
621
|
| `disabled` | `boolean` | `false` |
|
|
552
622
|
| `wrapperProps` | `HTMLAttributes<HTMLSpanElement>` | — |
|
|
553
623
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AnchorHTMLAttributes, ButtonHTMLAttributes, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export type BreadcrumbItem = {
|
|
3
|
+
label: ReactNode;
|
|
4
|
+
href?: string;
|
|
5
|
+
current?: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
linkProps?: AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
9
|
+
buttonProps?: ButtonHTMLAttributes<HTMLButtonElement>;
|
|
10
|
+
};
|
|
11
|
+
export type BreadcrumbProps = HTMLAttributes<HTMLElement> & {
|
|
12
|
+
items: BreadcrumbItem[];
|
|
13
|
+
separator?: ReactNode;
|
|
14
|
+
label?: string;
|
|
15
|
+
};
|
|
16
|
+
export declare function Breadcrumb({ items, separator, label, className, ...props }: BreadcrumbProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare namespace Breadcrumb {
|
|
18
|
+
var displayName: string;
|
|
19
|
+
}
|
|
20
|
+
export declare const BreadCrumb: typeof Breadcrumb;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Breadcrumb';
|
package/dist/Input/Input.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, "defaultVal
|
|
|
16
16
|
clearLabel?: string;
|
|
17
17
|
selectOnFocus?: boolean;
|
|
18
18
|
textAlign?: "left" | "center" | "right";
|
|
19
|
+
inputProps?: InputHTMLAttributes<HTMLInputElement>;
|
|
19
20
|
wrapperProps?: HTMLAttributes<HTMLSpanElement>;
|
|
20
21
|
fieldProps?: HTMLAttributes<HTMLDivElement>;
|
|
21
22
|
clearButtonProps?: ButtonHTMLAttributes<HTMLButtonElement>;
|
|
@@ -35,6 +36,7 @@ export declare const Input: React.ForwardRefExoticComponent<Omit<React.InputHTML
|
|
|
35
36
|
clearLabel?: string;
|
|
36
37
|
selectOnFocus?: boolean;
|
|
37
38
|
textAlign?: "left" | "center" | "right";
|
|
39
|
+
inputProps?: InputHTMLAttributes<HTMLInputElement>;
|
|
38
40
|
wrapperProps?: HTMLAttributes<HTMLSpanElement>;
|
|
39
41
|
fieldProps?: HTMLAttributes<HTMLDivElement>;
|
|
40
42
|
clearButtonProps?: ButtonHTMLAttributes<HTMLButtonElement>;
|
package/dist/Select/Select.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HTMLAttributes, ReactNode } from 'react';
|
|
1
|
+
import { ButtonHTMLAttributes, HTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
export type SelectOption<Value extends string = string> = {
|
|
3
3
|
value: Value;
|
|
4
4
|
label: ReactNode;
|
|
@@ -28,6 +28,7 @@ export type SelectProps<Value extends string = string> = Omit<HTMLAttributes<HTM
|
|
|
28
28
|
showClearAll?: boolean;
|
|
29
29
|
showSelectedValues?: boolean;
|
|
30
30
|
closeOnSelect?: boolean;
|
|
31
|
+
selectProps?: ButtonHTMLAttributes<HTMLButtonElement>;
|
|
31
32
|
filterOptions?: (options: SelectOption<Value>[], searchValue: string) => SelectOption<Value>[];
|
|
32
33
|
onSearchChange?: (searchValue: string) => void;
|
|
33
34
|
onValueChange?: (value: SelectValue<Value>, selectedOptions: SelectOption<Value>[]) => void;
|
|
@@ -52,6 +53,7 @@ export declare const Select: import('react').ForwardRefExoticComponent<Omit<HTML
|
|
|
52
53
|
showClearAll?: boolean;
|
|
53
54
|
showSelectedValues?: boolean;
|
|
54
55
|
closeOnSelect?: boolean;
|
|
56
|
+
selectProps?: ButtonHTMLAttributes<HTMLButtonElement>;
|
|
55
57
|
filterOptions?: ((options: SelectOption<string>[], searchValue: string) => SelectOption<string>[]) | undefined;
|
|
56
58
|
onSearchChange?: (searchValue: string) => void;
|
|
57
59
|
onValueChange?: ((value: SelectValue<string>, selectedOptions: SelectOption<string>[]) => void) | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TextareaHTMLAttributes } from 'react';
|
|
1
|
+
import { ButtonHTMLAttributes, HTMLAttributes, TextareaHTMLAttributes } from 'react';
|
|
2
2
|
export type TextareaProps = Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "defaultValue" | "onChange" | "value"> & {
|
|
3
3
|
label?: string;
|
|
4
4
|
helpText?: string;
|
|
@@ -7,6 +7,10 @@ export type TextareaProps = Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "d
|
|
|
7
7
|
mono?: boolean;
|
|
8
8
|
value?: string;
|
|
9
9
|
defaultValue?: string;
|
|
10
|
+
textareaProps?: TextareaHTMLAttributes<HTMLTextAreaElement>;
|
|
11
|
+
wrapperProps?: HTMLAttributes<HTMLDivElement>;
|
|
12
|
+
fieldProps?: HTMLAttributes<HTMLDivElement>;
|
|
13
|
+
clearButtonProps?: ButtonHTMLAttributes<HTMLButtonElement>;
|
|
10
14
|
onChange?: TextareaHTMLAttributes<HTMLTextAreaElement>["onChange"];
|
|
11
15
|
onValueChange?: (value: string) => void;
|
|
12
16
|
};
|
|
@@ -18,6 +22,10 @@ export declare const Textarea: import('react').ForwardRefExoticComponent<Omit<Te
|
|
|
18
22
|
mono?: boolean;
|
|
19
23
|
value?: string;
|
|
20
24
|
defaultValue?: string;
|
|
25
|
+
textareaProps?: TextareaHTMLAttributes<HTMLTextAreaElement>;
|
|
26
|
+
wrapperProps?: HTMLAttributes<HTMLDivElement>;
|
|
27
|
+
fieldProps?: HTMLAttributes<HTMLDivElement>;
|
|
28
|
+
clearButtonProps?: ButtonHTMLAttributes<HTMLButtonElement>;
|
|
21
29
|
onChange?: TextareaHTMLAttributes<HTMLTextAreaElement>["onChange"];
|
|
22
30
|
onValueChange?: (value: string) => void;
|
|
23
31
|
} & import('react').RefAttributes<HTMLTextAreaElement>>;
|
package/dist/Toast/Toast.d.ts
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
export type ToastVariant = "ok" | "error" | "warning" | "info";
|
|
2
|
+
export type ToastVariant = "ok" | "error" | "warning" | "info" | "loading";
|
|
3
3
|
export type ToastItem = {
|
|
4
4
|
id: string;
|
|
5
5
|
variant: ToastVariant;
|
|
6
6
|
title: string;
|
|
7
7
|
message?: string;
|
|
8
8
|
duration?: number;
|
|
9
|
+
overlay?: boolean;
|
|
9
10
|
};
|
|
10
11
|
export type ToastProps = HTMLAttributes<HTMLDivElement> & {
|
|
11
12
|
variant?: ToastVariant;
|
|
12
13
|
title: string;
|
|
13
14
|
message?: string;
|
|
15
|
+
overlay?: boolean;
|
|
14
16
|
onDismiss?: () => void;
|
|
15
17
|
};
|
|
16
|
-
export declare function Toast({ variant, title, message, onDismiss, className, ...props }: ToastProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function Toast({ variant, title, message, overlay, onDismiss, className, ...props }: ToastProps): import("react/jsx-runtime").JSX.Element;
|
|
17
19
|
export declare namespace Toast {
|
|
18
20
|
var displayName: string;
|
|
19
21
|
}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
export type TooltipSide = "top" | "bottom";
|
|
2
|
+
export type TooltipSide = "top" | "bottom" | "left" | "right";
|
|
3
3
|
export type TooltipProps = {
|
|
4
4
|
content: ReactNode;
|
|
5
5
|
side?: TooltipSide;
|
|
6
|
+
delay?: number;
|
|
6
7
|
children: ReactNode;
|
|
7
8
|
wrapperProps?: HTMLAttributes<HTMLSpanElement>;
|
|
8
9
|
disabled?: boolean;
|
|
9
10
|
};
|
|
10
|
-
export declare function Tooltip({ content, side, children, wrapperProps, disabled }: TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function Tooltip({ content, side, delay, children, wrapperProps, disabled }: TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
export declare namespace Tooltip {
|
|
12
13
|
var displayName: string;
|
|
13
14
|
}
|
package/dist/index.d.ts
CHANGED
package/dist/super-kit.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("react"),He=require("react-dom"),Ke="_badge_lyltm_1",Ye="_neutral_lyltm_18",Ze="_accent_lyltm_24",Je="_outline_lyltm_29",Qe="_success_lyltm_35",Pe="_warning_lyltm_40",et="_danger_lyltm_45",tt="_info_lyltm_50",st="_count_lyltm_55",nt="_mono_lyltm_63",ot="_version_lyltm_71",lt="_dismiss_lyltm_80",at="_dismissBtn_lyltm_84",ct="_dot_lyltm_98",it="_dotIndicator_lyltm_111",rt="_pill_lyltm_119",F={badge:Ke,neutral:Ye,accent:Ze,outline:Je,success:Qe,warning:Pe,danger:et,info:tt,count:st,mono:nt,version:ot,dismiss:lt,dismissBtn:at,dot:ct,dotIndicator:it,pill:rt},dt=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:"10",height:"10",children:e.jsx("path",{d:"M18 6 6 18M6 6l12 12"})});function he({variant:n="neutral",icon:o,pill:t=!1,dismissable:s=!1,onDismiss:a,dotColor:l,children:c,className:r,...i}){if(n==="dot"){const x=[F.badge,F.dot,r].filter(Boolean).join(" ");return e.jsxs("span",{...i,className:x,children:[e.jsx("span",{className:F.dotIndicator,style:{background:l??"var(--accent)"}}),c]})}const h=[F.badge,F[n],t?F.pill:null,s?F.dismiss:null,r].filter(Boolean).join(" ");return e.jsxs("span",{...i,className:h,children:[o||null,c,s&&e.jsx("button",{type:"button",className:F.dismissBtn,"aria-label":"Remove",onClick:a,children:e.jsx(dt,{})})]})}he.displayName="Badge";function xe({direction:n="vertical",track:o=!1,arrows:t=!1,autoHide:s=!1,expand:a=!1,scrollbarSize:l,height:c,children:r,className:i,style:h,...x}){const m=["sb",o?"sb-track":null,t?"sb-arrows":null,s?"sb-auto-hide":null,a?"sb-expand":null,i].filter(Boolean).join(" "),f=n==="vertical"?{overflowY:"auto",overflowX:"hidden"}:n==="horizontal"?{overflowX:"auto",overflowY:"hidden"}:{overflow:"auto"},p=l!==void 0?{"--sb-w":`${l}px`}:void 0;return e.jsx("div",{...x,className:m,style:{height:c,...f,...p,...h},children:r})}xe.displayName="Scrollable";const _t="_btn_xuv7s_1",ut="_icon_xuv7s_33",ht="_primary_xuv7s_42",xt="_secondary_xuv7s_50",mt="_ghost_xuv7s_60",ft="_danger_xuv7s_70",pt="_success_xuv7s_78",jt="_warning_xuv7s_86",gt="_sm_xuv7s_95",vt="_md_xuv7s_103",kt="_lg_xuv7s_105",Q={btn:_t,icon:ut,primary:ht,secondary:xt,ghost:mt,danger:ft,success:pt,warning:jt,sm:gt,md:vt,lg:kt},me=u.forwardRef(({type:n="button",variant:o="secondary",size:t="md",icon:s,loading:a=!1,children:l,className:c,disabled:r,...i},h)=>{const x=[Q.btn,Q[o],Q[t],c].filter(Boolean).join(" ");return e.jsxs("button",{ref:h,type:n,disabled:r||a,className:x,...i,children:[s?e.jsx("span",{className:Q.icon,children:s}):null,l]})});me.displayName="Button";const bt="_card_1gxgi_1",Nt="_bordered_1gxgi_8",yt="_tilt_1gxgi_12",wt="_closeBtn_1gxgi_20",Bt="_padSm_1gxgi_41",Ct="_padMd_1gxgi_42",It="_padLg_1gxgi_43",$t="_padNone_1gxgi_44",Mt="_header_1gxgi_47",St="_headerIcon_1gxgi_54",Lt="_title_1gxgi_63",Rt="_subtitle_1gxgi_69",Tt="_stat_1gxgi_76",qt="_statValue_1gxgi_83",At="_statUnit_1gxgi_91",Dt="_statDelta_1gxgi_97",Ot="_deltaPositive_1gxgi_102",Et="_deltaNegative_1gxgi_103",Wt="_deltaNeutral_1gxgi_104",g={card:bt,bordered:Nt,tilt:yt,closeBtn:wt,padSm:Bt,padMd:Ct,padLg:It,padNone:$t,header:Mt,headerIcon:St,title:Lt,subtitle:Rt,stat:Tt,statValue:qt,statUnit:At,statDelta:Dt,deltaPositive:Ot,deltaNegative:Et,deltaNeutral:Wt},Ft={none:g.padNone,sm:g.padSm,md:g.padMd,lg:g.padLg},zt=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"10",height:"10",children:e.jsx("path",{d:"M18 6 6 18M6 6l12 12"})});function fe({padding:n="md",bordered:o=!1,tilt:t=!1,onClose:s,closeBtnProps:a,children:l,className:c,...r}){const i=[g.card,Ft[n],o?g.bordered:null,t?g.tilt:null,c].filter(Boolean).join(" ");return e.jsxs("div",{...r,className:i,children:[s&&e.jsx("button",{type:"button","aria-label":"Close",...a,className:[g.closeBtn,a==null?void 0:a.className].filter(Boolean).join(" "),onClick:s,children:e.jsx(zt,{})}),l]})}fe.displayName="Card";function pe({icon:n,title:o,subtitle:t,className:s,...a}){return e.jsxs("div",{...a,className:[g.header,s].filter(Boolean).join(" "),children:[n&&e.jsx("span",{className:g.headerIcon,children:n}),e.jsxs("div",{children:[e.jsx("div",{className:g.title,children:o}),t&&e.jsx("div",{className:g.subtitle,children:t})]})]})}pe.displayName="CardHeader";function je({value:n,unit:o,delta:t,deltaDirection:s="positive",className:a,...l}){const c=[g.statDelta,s==="positive"?g.deltaPositive:s==="negative"?g.deltaNegative:g.deltaNeutral].filter(Boolean).join(" ");return e.jsxs("div",{...l,className:[g.stat,a].filter(Boolean).join(" "),children:[e.jsxs("span",{className:g.statValue,children:[n,o&&e.jsxs("span",{className:g.statUnit,children:[" ",o]})]}),t&&e.jsx("span",{className:c,children:t})]})}je.displayName="CardStat";function P(n,o,t){const[s,a]=u.useState(o),l=n!==void 0,c=l?n:s,r=u.useCallback(i=>{l||a(i),t==null||t(i)},[l,t]);return[c,r,l]}const Vt="X",Xt=/[a-zA-Z0-9]/;function oe(n,o={}){const t=o.allowedPattern??Xt;return n.split("").filter(s=>t.test(s)).join("")}function ge(n,o,t={}){const s=t.placeholder??Vt,a=oe(n,t);let l=0,c="";for(const r of o){if(l>=a.length)break;if(r===s){c+=a[l],l+=1;continue}c+=r}return c}const Gt="_wrapper_25x8h_1",Ut="_field_25x8h_7",Ht="_label_25x8h_13",Kt="_input_25x8h_22",Yt="_hasIcon_25x8h_52",Zt="_hasIconRight_25x8h_55",Jt="_hasClear_25x8h_58",Qt="_hasClearAndIconRight_25x8h_61",Pt="_iconSlot_25x8h_64",es="_iconSlotRight_25x8h_78",ts="_iconSlotRightWithClear_25x8h_92",ss="_clearBtn_25x8h_95",I={wrapper:Gt,field:Ut,label:Ht,input:Kt,hasIcon:Yt,hasIconRight:Zt,hasClear:Jt,hasClearAndIconRight:Qt,iconSlot:Pt,iconSlotRight:es,iconSlotRightWithClear:ts,clearBtn:ss},ns=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:"12",height:"12",children:e.jsx("path",{d:"M18 6 6 18M6 6l12 12"})}),ve=u.forwardRef(({label:n,icon:o,iconPosition:t="left",clearable:s=!1,clearButtonProps:a,clearLabel:l,defaultValue:c="",disabled:r,mask:i,maskAllowedPattern:h,maskPlaceholder:x,selectOnFocus:m=!1,textAlign:f,onChange:p,onValueChange:k,value:R,wrapperProps:C,fieldProps:v,className:N,...b},$)=>{const M=u.useRef(null),[G,Z]=P(R,c,j=>{k==null||k({value:j,rawValue:i?oe(j,{allowedPattern:h}):j})});u.useImperativeHandle($,()=>M.current);const ee=u.useCallback(j=>i?ge(j,i,{allowedPattern:h,placeholder:x}):j,[i,h,x]),T=j=>{const q=ee(j.target.value);j.target.value=q,Z(q),p==null||p(j)},O=()=>{var j;Z(""),(j=M.current)==null||j.focus()},E=o&&t==="right",J=o&&t==="left",Y=[I.input,J?I.hasIcon:null,E?I.hasIconRight:null,s&&E?I.hasClearAndIconRight:s?I.hasClear:null,N].filter(Boolean).join(" "),V=j=>{var q;m&&j.target.select(),(q=b.onFocus)==null||q.call(b,j)},U=e.jsx("input",{ref:M,disabled:r,value:ee(G),onChange:T,onFocus:V,className:Y,style:f?{textAlign:f,...b.style}:b.style,...b}),y=[I.wrapper,C==null?void 0:C.className].filter(Boolean).join(" "),W=e.jsxs("span",{...C,className:y,children:[J?e.jsx("span",{className:I.iconSlot,children:o}):null,U,E?e.jsx("span",{className:[I.iconSlotRight,s?I.iconSlotRightWithClear:null].filter(Boolean).join(" "),children:o}):null,s?e.jsx("button",{type:"button","aria-label":"Clear",title:"Clear",disabled:r||G.length===0,onClick:O,className:I.clearBtn,...a,children:(a==null?void 0:a.children)??e.jsx(ns,{})}):null]});return!n&&!v?W:e.jsxs("div",{...v,className:[I.field,v==null?void 0:v.className].filter(Boolean).join(" "),children:[n?e.jsx("label",{className:I.label,children:n}):null,W]})});ve.displayName="Input";const os="_checkbox_7kjwa_2",ls="_checkboxBox_7kjwa_13",as="_checked_7kjwa_33",cs="_indeterminate_7kjwa_42",is="_disabled_7kjwa_55",rs="_radio_7kjwa_61",ds="_radioDot_7kjwa_72",_s="_radioChecked_7kjwa_85",us="_radioDisabled_7kjwa_97",hs="_radioGroup_7kjwa_102",xs="_switchWrap_7kjwa_109",ms="_switchTrack_7kjwa_120",fs="_switchOn_7kjwa_143",ps="_switchDisabled_7kjwa_153",B={checkbox:os,checkboxBox:ls,checked:as,indeterminate:cs,disabled:is,radio:rs,radioDot:ds,radioChecked:_s,radioDisabled:us,radioGroup:hs,switchWrap:xs,switchTrack:ms,switchOn:fs,switchDisabled:ps},js=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M20 6 9 17l-5-5"})});function ke({label:n,checked:o,defaultChecked:t,indeterminate:s=!1,disabled:a=!1,onChange:l,className:c,...r}){const i=o??t??!1,h=[B.checkbox,i&&!s?B.checked:null,s?B.indeterminate:null,a?B.disabled:null,c].filter(Boolean).join(" ");return e.jsxs("label",{className:h,children:[e.jsx("input",{...r,type:"checkbox",checked:i,disabled:a,style:{display:"none"},onChange:x=>l==null?void 0:l(x.currentTarget.checked)}),e.jsx("span",{className:B.checkboxBox,children:!s&&e.jsx(js,{})}),n]})}ke.displayName="Checkbox";function be({label:n,checked:o=!1,disabled:t=!1,onChange:s,value:a,className:l,...c}){const r=[B.radio,o?B.radioChecked:null,t?B.radioDisabled:null,l].filter(Boolean).join(" ");return e.jsxs("label",{className:r,children:[e.jsx("input",{...c,type:"radio",checked:o,disabled:t,value:a,style:{display:"none"},onChange:i=>s==null?void 0:s(i.currentTarget.value)}),e.jsx("span",{className:B.radioDot}),n]})}be.displayName="Radio";function Ne({children:n,className:o,...t}){const s=[B.radioGroup,o].filter(Boolean).join(" ");return e.jsx("div",{...t,className:s,role:"radiogroup",children:n})}Ne.displayName="RadioGroup";function ye({label:n,checked:o,defaultChecked:t,disabled:s=!1,onChange:a,className:l,...c}){const r=o??t??!1,i=[B.switchWrap,r?B.switchOn:null,s?B.switchDisabled:null,l].filter(Boolean).join(" ");return e.jsxs("label",{className:i,children:[e.jsx("input",{...c,type:"checkbox",checked:r,disabled:s,style:{display:"none"},onChange:h=>a==null?void 0:a(h.currentTarget.checked)}),e.jsx("span",{className:B.switchTrack}),n]})}ye.displayName="Switch";const gs="_menu_pga52_1",vs="_item_pga52_13",ks="_active_pga52_41",bs="_danger_pga52_53",Ns="_disabled_pga52_65",ys="_kbd_pga52_71",ws="_separator_pga52_79",X={menu:gs,item:vs,active:ks,danger:bs,disabled:Ns,kbd:ys,separator:ws};function we({children:n,className:o,...t}){const s=[X.menu,o].filter(Boolean).join(" ");return e.jsx("div",{...t,className:s,role:"menu",children:n})}we.displayName="Menu";function Be({icon:n,kbd:o,active:t=!1,danger:s=!1,disabled:a=!1,children:l,className:c,...r}){const i=[X.item,t?X.active:null,s?X.danger:null,a?X.disabled:null,c].filter(Boolean).join(" ");return e.jsxs("button",{...r,type:"button",className:i,disabled:a,role:"menuitem",children:[n,l,o&&e.jsx("span",{className:X.kbd,children:o})]})}Be.displayName="MenuItem";function Ce({className:n,...o}){const t=[X.separator,n].filter(Boolean).join(" ");return e.jsx("div",{...o,className:t,role:"separator"})}Ce.displayName="MenuSeparator";const Bs="_backdrop_pya14_1",Cs="_modal_pya14_23",Is="_header_pya14_37",$s="_titleBlock_pya14_45",Ms="_title_pya14_45",Ss="_subtitle_pya14_58",Ls="_closeBtn_pya14_64",Rs="_body_pya14_86",Ts="_footer_pya14_92",A={backdrop:Bs,modal:Cs,header:Is,titleBlock:$s,title:Ms,subtitle:Ss,closeBtn:Ls,body:Rs,footer:Ts},qs=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:"11",height:"11",children:e.jsx("path",{d:"M18 6 6 18M6 6l12 12"})}),Ie=u.forwardRef(({open:n,title:o,subtitle:t,children:s,footer:a,closeOnBackdrop:l=!0,showCloseButton:c=!0,backdropProps:r,modalProps:i,headerProps:h,bodyProps:x,footerProps:m,closeButtonProps:f,onOpenChange:p,onClose:k},R)=>{const C=u.useRef(null);u.useImperativeHandle(R,()=>C.current),u.useEffect(()=>{if(!n)return;const M=G=>{G.key==="Escape"&&v()};return document.addEventListener("keydown",M),()=>document.removeEventListener("keydown",M)},[n]);const v=()=>{p==null||p(!1),k==null||k()},N=M=>{l&&M.target===M.currentTarget&&v()};if(!n)return null;const b=[A.backdrop,r==null?void 0:r.className].filter(Boolean).join(" "),$=[A.modal,i==null?void 0:i.className].filter(Boolean).join(" ");return e.jsx("div",{...r,className:b,onClick:N,role:"presentation",children:e.jsxs("div",{ref:C,...i,className:$,role:"dialog","aria-modal":"true",children:[(o||c)&&e.jsxs("header",{...h,className:[A.header,h==null?void 0:h.className].filter(Boolean).join(" "),children:[e.jsxs("div",{className:A.titleBlock,children:[o?e.jsx("div",{className:A.title,children:o}):null,t?e.jsx("div",{className:A.subtitle,children:t}):null]}),c&&e.jsx("button",{type:"button","aria-label":"Close",className:A.closeBtn,onClick:v,...f,children:(f==null?void 0:f.children)??e.jsx(qs,{})})]}),e.jsx("section",{...x,className:[A.body,x==null?void 0:x.className].filter(Boolean).join(" "),children:s}),a&&e.jsx("footer",{...m,className:[A.footer,m==null?void 0:m.className].filter(Boolean).join(" "),children:a})]})})});Ie.displayName="Modal";const As="_wrapper_10d4l_1",Ds="_pop_10d4l_8",Os="_sideRight_10d4l_22",Es="_sideTop_10d4l_27",Ws="_arrow_10d4l_34",Fs="_head_10d4l_60",zs="_title_10d4l_67",Vs="_closeBtn_10d4l_74",Xs="_body_10d4l_105",D={wrapper:As,pop:Ds,sideRight:Os,sideTop:Es,arrow:Ws,head:Fs,title:zs,closeBtn:Vs,body:Xs},Gs=()=>e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]});function $e({open:n,defaultOpen:o=!1,title:t,children:s,trigger:a,side:l="bottom-start",showCloseButton:c=!0,onOpenChange:r,popProps:i}){const[h,x]=u.useState(o),m=n!==void 0,f=m?n:h,p=u.useRef(null);function k(N){m||x(N),r==null||r(N)}u.useEffect(()=>{function N(b){p.current&&!p.current.contains(b.target)&&k(!1)}return f&&document.addEventListener("mousedown",N),()=>document.removeEventListener("mousedown",N)},[f]);const R=l.startsWith("top"),C=l.endsWith("end"),v=[D.pop,C?D.sideRight:null,R?D.sideTop:null,i==null?void 0:i.className].filter(Boolean).join(" ");return e.jsxs("div",{ref:p,className:D.wrapper,children:[a&&e.jsx("div",{onClick:()=>k(!f),style:{display:"inline-flex"},children:a}),f&&e.jsxs("div",{...i,className:v,children:[e.jsx("span",{className:D.arrow}),(t||c)&&e.jsxs("div",{className:D.head,children:[t&&e.jsx("span",{className:D.title,children:t}),c&&e.jsx("button",{type:"button",className:D.closeBtn,"aria-label":"Close",onClick:()=>k(!1),children:e.jsx(Gs,{})})]}),e.jsx("div",{className:D.body,children:s})]})]})}$e.displayName="Popover";const Us="_group_1ltkm_1",Hs="_pb_1ltkm_11",Ks="_on_1ltkm_40",Ys="_accent_1ltkm_45",Zs="_solo_1ltkm_50",Js="_disabled_1ltkm_65",K={group:Us,pb:Hs,on:Ks,accent:Ys,solo:Zs,disabled:Js};function Me({children:n,className:o,...t}){const s=[K.group,o].filter(Boolean).join(" ");return e.jsx("div",{...t,className:s,role:"group",children:n})}Me.displayName="PushButtonGroup";function Se({on:n=!1,accent:o=!1,solo:t=!1,icon:s,children:a,disabled:l=!1,className:c,...r}){const i=[K.pb,n?K.on:null,n&&o?K.accent:null,t?K.solo:null,l?K.disabled:null,c].filter(Boolean).join(" ");return e.jsxs("button",{...r,type:"button",className:i,disabled:l,children:[s,a]})}Se.displayName="PushButton";const Qs="_root_qhol4_1",Ps="_field_qhol4_6",en="_label_qhol4_12",tn="_labelMeta_qhol4_24",sn="_trigger_qhol4_33",nn="_triggerOpen_qhol4_59",on="_triggerConnectedBottom_qhol4_64",ln="_triggerConnectedTop_qhol4_69",an="_triggerValue_qhol4_74",cn="_triggerPlaceholder_qhol4_83",rn="_chevron_qhol4_85",dn="_chevronOpen_qhol4_94",_n="_chips_qhol4_97",un="_chip_qhol4_97",hn="_chipOverflow_qhol4_120",xn="_clearBtn_qhol4_123",mn="_popover_qhol4_143",fn="_popoverBottom_qhol4_154",pn="_popoverTop_qhol4_162",jn="_search_qhol4_181",gn="_searchIcon_qhol4_188",vn="_searchInput_qhol4_195",kn="_list_qhol4_209",bn="_item_qhol4_217",Nn="_itemAlignLeft_qhol4_230",yn="_itemAlignCenter_qhol4_231",wn="_itemAlignRight_qhol4_232",Bn="_itemActive_qhol4_235",Cn="_itemDisabled_qhol4_243",In="_itemMeta_qhol4_245",$n="_checkbox_qhol4_254",Mn="_checkboxChecked_qhol4_266",Sn="_checkIcon_qhol4_278",Ln="_emptyState_qhol4_299",Rn="_popFooter_qhol4_307",Tn="_popFooterBtn_qhol4_317",_={root:Qs,field:Ps,label:en,labelMeta:tn,trigger:sn,triggerOpen:nn,triggerConnectedBottom:on,triggerConnectedTop:ln,triggerValue:an,triggerPlaceholder:cn,chevron:rn,chevronOpen:dn,chips:_n,chip:un,chipOverflow:hn,clearBtn:xn,popover:mn,popoverBottom:fn,popoverTop:pn,search:jn,searchIcon:gn,searchInput:vn,list:kn,item:bn,itemAlignLeft:Nn,itemAlignCenter:yn,itemAlignRight:wn,itemActive:Bn,itemDisabled:Cn,itemMeta:In,checkbox:$n,checkboxChecked:Mn,checkIcon:Sn,emptyState:Ln,popFooter:Rn,popFooterBtn:Tn},qn=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:"14",height:"14",children:e.jsx("path",{d:"m6 9 6 6 6-6"})}),ue=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:"12",height:"12",children:e.jsx("path",{d:"M18 6 6 18M6 6l12 12"})}),An=()=>e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("circle",{cx:"11",cy:"11",r:"7"}),e.jsx("path",{d:"m20 20-3.5-3.5"})]}),se=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",width:"10",height:"10",children:e.jsx("path",{d:"M20 6 9 17l-5-5"})}),Dn=(n,o)=>{const t=o.trim().toLowerCase();return t?n.filter(s=>String(s.label).toLowerCase().includes(t)):n},Le=u.forwardRef(({label:n,clearable:o=!1,defaultValue:t=null,disabled:s=!1,emptyLabel:a="No options found",filterOptions:l=Dn,isLoading:c=!1,loadingLabel:r="Loading...",multiple:i=!1,onSearchChange:h,onValueChange:x,options:m,optionsAlign:f="left",optionsPosition:p="bottom",placeholder:k="Select",searchable:R=!1,searchPlaceholder:C="Search...",showSelectedCount:v=!0,showClearAll:N=!0,showSelectedValues:b=!0,closeOnSelect:$,value:M,className:G,...Z},ee)=>{const[T,O]=u.useState(!1),[E,J]=u.useState(""),Y=u.useRef(null),[V,U]=P(M,t,d=>{const w=m.filter(H=>Array.isArray(d)?d.includes(H.value):H.value===d);x==null||x(d,w)}),y=u.useMemo(()=>Array.isArray(V)?V:V?[V]:[],[V]),W=u.useMemo(()=>m.filter(d=>y.includes(d.value)),[m,y]),j=u.useMemo(()=>l(m,E),[l,m,E]);u.useEffect(()=>{if(!T)return;const d=w=>{Y.current&&!Y.current.contains(w.target)&&O(!1)};return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[T]);const q=d=>{J(d),h==null||h(d)},Oe=d=>{if(!d.disabled){if(i){const w=y.includes(d.value)?y.filter(H=>H!==d.value):[...y,d.value];U(w),$&&O(!1);return}U(d.value),($??!0)&&O(!1)}},ae=()=>{U(i?[]:null),q("")},Ee=()=>{if(y.length>0){ae();return}U(m.filter(d=>!d.disabled).map(d=>d.value))},We=d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),O(w=>!w)),d.key==="Escape"&&O(!1)},ce=p==="top",Fe=[_.trigger,T?_.triggerOpen:null,T?ce?_.triggerConnectedTop:_.triggerConnectedBottom:null].filter(Boolean).join(" "),ze=!i||b,Ve=i&&b&&W.length>0,te=i,Xe=i&&(y.length>0||N),ie=ze&&W.length>0,re=2,de=W.length-re,Ge=[_.root,G].filter(Boolean).join(" "),Ue={left:_.itemAlignLeft,center:_.itemAlignCenter,right:_.itemAlignRight}[f],_e=e.jsxs("div",{ref:Y,...Z,className:Ge,children:[e.jsxs("button",{type:"button",className:Fe,disabled:s,"aria-haspopup":"listbox","aria-expanded":T,onClick:()=>!s&&O(d=>!d),onKeyDown:We,children:[Ve?e.jsxs("div",{className:_.chips,children:[W.slice(0,re).map(d=>e.jsx("span",{className:_.chip,children:d.label},d.value)),de>0&&e.jsxs("span",{className:[_.chip,_.chipOverflow].join(" "),children:["+",de]})]}):e.jsx("span",{className:[_.triggerValue,ie?null:_.triggerPlaceholder].filter(Boolean).join(" "),children:ie?W.map(d=>d.label).join(", "):k}),o&&y.length>0&&e.jsx("button",{type:"button","aria-label":"Clear",className:_.clearBtn,disabled:s,onClick:d=>{d.stopPropagation(),ae()},children:e.jsx(ue,{})}),e.jsx("span",{className:[_.chevron,T?_.chevronOpen:null].filter(Boolean).join(" "),children:e.jsx(qn,{})})]}),T&&e.jsxs("div",{className:[_.popover,ce?_.popoverTop:_.popoverBottom].join(" "),role:"listbox","aria-multiselectable":i||void 0,children:[R&&e.jsxs("div",{className:_.search,children:[e.jsx("span",{className:_.searchIcon,children:e.jsx(An,{})}),e.jsx("input",{autoFocus:!0,value:E,placeholder:C,className:_.searchInput,onChange:d=>q(d.target.value)}),E&&e.jsx("button",{className:_.clearBtn,onClick:()=>q(""),children:e.jsx(ue,{})})]}),e.jsxs("ul",{className:[_.list,"sb"].join(" "),children:[c&&e.jsx("li",{className:_.emptyState,children:r}),!c&&j.length===0&&e.jsx("li",{className:_.emptyState,children:a}),!c&&j.map(d=>{const w=y.includes(d.value),H=[_.item,Ue,w?_.itemActive:null,d.disabled?_.itemDisabled:null].filter(Boolean).join(" ");return e.jsxs("li",{className:H,role:"option","aria-selected":w,onClick:()=>Oe(d),children:[!te&&f==="right"&&w&&e.jsx("span",{className:_.checkIcon,children:e.jsx(se,{})}),te?e.jsx("span",{className:[_.checkbox,w?_.checkboxChecked:null].filter(Boolean).join(" "),children:w&&e.jsx(se,{})}):null,e.jsx("span",{children:d.label}),d.meta&&e.jsx("span",{className:_.itemMeta,children:d.meta}),!te&&f!=="right"&&w&&e.jsx("span",{className:_.checkIcon,children:e.jsx(se,{})})]},d.value)})]}),Xe&&(v||N)&&e.jsxs("div",{className:_.popFooter,children:[v&&e.jsxs("span",{children:[y.length," selected"]}),N&&e.jsx("button",{className:_.popFooterBtn,onClick:Ee,children:y.length>0?"Clear all":"Check all"})]})]})]});return n?e.jsxs("div",{className:_.field,children:[e.jsxs("label",{className:_.label,children:[n,i&&v&&y.length>0&&e.jsxs("span",{className:_.labelMeta,children:["· ",y.length," selected"]})]}),_e]}):_e});Le.displayName="Select";const On="_ring_mxe7t_2",En="_spin_mxe7t_1",Wn="_ringMuted_mxe7t_12",Fn="_sm_mxe7t_14",zn="_md_mxe7t_15",Vn="_lg_mxe7t_16",Xn="_onAccent_mxe7t_19",Gn="_dots_mxe7t_29",Un="_dot_mxe7t_29",Hn="_dotPulse_mxe7t_1",Kn="_bar_mxe7t_52",Yn="_barFill_mxe7t_62",Zn="_barSlide_mxe7t_1",L={ring:On,spin:En,ringMuted:Wn,sm:Fn,md:zn,lg:Vn,onAccent:Xn,dots:Gn,dot:Un,dotPulse:Hn,bar:Kn,barFill:Yn,barSlide:Zn};function Re({variant:n="ring",size:o="md",muted:t=!1,onAccent:s=!1,className:a,...l}){if(n==="dots"){const r=[L.dots,a].filter(Boolean).join(" ");return e.jsxs("span",{...l,className:r,role:"status","aria-label":"Loading",children:[e.jsx("span",{className:L.dot}),e.jsx("span",{className:L.dot}),e.jsx("span",{className:L.dot})]})}if(n==="bar"){const r=[L.bar,a].filter(Boolean).join(" ");return e.jsx("span",{...l,className:r,role:"status","aria-label":"Loading",children:e.jsx("span",{className:L.barFill})})}const c=[L.ring,L[o],t?L.ringMuted:null,s?L.onAccent:null,a].filter(Boolean).join(" ");return e.jsx("span",{...l,className:c,role:"status","aria-label":"Loading"})}Re.displayName="Spinner";const Jn="_field_fazrx_1",Qn="_label_fazrx_7",Pn="_wrapper_fazrx_16",eo="_textarea_fazrx_20",to="_mono_fazrx_53",so="_hasClear_fazrx_59",no="_clearBtn_fazrx_62",oo="_footer_fazrx_84",lo="_helpText_fazrx_92",ao="_charCount_fazrx_94",co="_charCountOver_fazrx_100",S={field:Jn,label:Qn,wrapper:Pn,textarea:eo,mono:to,hasClear:so,clearBtn:no,footer:oo,helpText:lo,charCount:ao,charCountOver:co},io=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:"12",height:"12",children:e.jsx("path",{d:"M18 6 6 18M6 6l12 12"})}),Te=u.forwardRef(({label:n,helpText:o,maxLength:t,clearable:s=!1,mono:a=!1,value:l,defaultValue:c="",disabled:r,onChange:i,onValueChange:h,className:x,...m},f)=>{const[p,k]=P(l,c,$=>h==null?void 0:h($)),R=$=>{k($.target.value),i==null||i($)},C=()=>{k("")},v=t!==void 0&&p.length>t,N=[S.textarea,"sb",a?S.mono:null,s?S.hasClear:null,x].filter(Boolean).join(" "),b=e.jsxs("div",{className:S.wrapper,children:[e.jsx("textarea",{ref:f,disabled:r,maxLength:t,value:p,onChange:R,className:N,...m}),s&&e.jsx("button",{type:"button",className:S.clearBtn,disabled:r||p.length===0,"aria-label":"Clear",onClick:C,children:e.jsx(io,{})})]});return!n&&!o&&t===void 0?b:e.jsxs("div",{className:S.field,children:[n&&e.jsx("label",{className:S.label,children:n}),b,(o||t!==void 0)&&e.jsxs("div",{className:S.footer,children:[o&&e.jsx("span",{className:S.helpText,children:o}),t!==void 0&&e.jsxs("span",{className:[S.charCount,v?S.charCountOver:null].filter(Boolean).join(" "),children:[p.length," / ",t]})]})]})});Te.displayName="Textarea";const ro="_toast_d6t69_1",_o="_slideUp_d6t69_1",uo="_toastExiting_d6t69_26",ho="_slideOut_d6t69_1",xo="_lead_d6t69_30",mo="_body_d6t69_37",fo="_title_d6t69_45",po="_message_d6t69_51",jo="_closeBtn_d6t69_56",go="_ok_d6t69_79",vo="_error_d6t69_82",ko="_warning_d6t69_85",bo="_info_d6t69_88",No="_stack_d6t69_92",z={toast:ro,slideUp:_o,toastExiting:uo,slideOut:ho,lead:xo,body:mo,title:fo,message:po,closeBtn:jo,ok:go,error:vo,warning:ko,info:bo,stack:No},yo=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"16",height:"16",children:e.jsx("path",{d:"M20 6 9 17l-5-5"})}),qe=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:"11",height:"11",children:e.jsx("path",{d:"M18 6 6 18M6 6l12 12"})}),wo=()=>e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:"16",height:"16",children:[e.jsx("path",{d:"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),e.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),e.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),Bo=()=>e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:"16",height:"16",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),e.jsx("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]}),Co={ok:e.jsx(yo,{}),error:e.jsx(qe,{}),warning:e.jsx(wo,{}),info:e.jsx(Bo,{})};function le({variant:n="ok",title:o,message:t,onDismiss:s,className:a,...l}){const c=[z.toast,z[n],a].filter(Boolean).join(" ");return e.jsxs("div",{...l,className:c,role:"alert",children:[e.jsx("span",{className:z.lead,children:Co[n]}),e.jsxs("div",{className:z.body,children:[e.jsx("div",{className:z.title,children:o}),t&&e.jsx("div",{className:z.message,children:t})]}),s&&e.jsx("button",{type:"button",className:z.closeBtn,"aria-label":"Dismiss",onClick:s,children:e.jsx(qe,{})})]})}le.displayName="Toast";const Ae=u.createContext(null);function Io({children:n}){const[o,t]=u.useState([]),s=u.useCallback(l=>{t(c=>c.filter(r=>r.id!==l))},[]),a=u.useCallback(l=>{const c=Math.random().toString(36).slice(2),r=l.duration??4e3;return t(i=>[...i,{...l,id:c}]),r>0&&setTimeout(()=>s(c),r),c},[s]);return e.jsxs(Ae.Provider,{value:{toast:a,dismiss:s},children:[n,typeof document<"u"&&He.createPortal(e.jsx("div",{className:z.stack,children:o.map(l=>e.jsx(le,{variant:l.variant,title:l.title,message:l.message,onDismiss:()=>s(l.id)},l.id))}),document.body)]})}function $o(){const n=u.useContext(Ae);if(!n)throw new Error("useToast must be used within a ToastProvider");return n}const Mo="_wrapper_18lxw_1",So="_tooltip_18lxw_6",Lo="_fadeIn_18lxw_1",Ro="_top_18lxw_33",To="_bottom_18lxw_52",qo="_kbd_18lxw_72",ne={wrapper:Mo,tooltip:So,fadeIn:Lo,top:Ro,bottom:To,kbd:qo};function De({content:n,side:o="top",children:t,wrapperProps:s,disabled:a=!1}){const[l,c]=u.useState(!1);if(a)return e.jsx(e.Fragment,{children:t});const r=[ne.tooltip,ne[o]].filter(Boolean).join(" "),i=[ne.wrapper,s==null?void 0:s.className].filter(Boolean).join(" ");return e.jsxs("span",{...s,className:i,onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),onFocus:()=>c(!0),onBlur:()=>c(!1),children:[t,l&&e.jsx("span",{className:r,role:"tooltip",children:n})]})}De.displayName="Tooltip";exports.Badge=he;exports.Button=me;exports.Card=fe;exports.CardHeader=pe;exports.CardStat=je;exports.Checkbox=ke;exports.Input=ve;exports.Menu=we;exports.MenuItem=Be;exports.MenuSeparator=Ce;exports.Modal=Ie;exports.Popover=$e;exports.PushButton=Se;exports.PushButtonGroup=Me;exports.Radio=be;exports.RadioGroup=Ne;exports.Scrollable=xe;exports.Select=Le;exports.Spinner=Re;exports.Switch=ye;exports.Textarea=Te;exports.Toast=le;exports.ToastProvider=Io;exports.Tooltip=De;exports.applyMask=ge;exports.getRawMaskValue=oe;exports.useControlledState=P;exports.useToast=$o;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),x=require("react"),Je=require("react-dom"),Qe="_badge_lyltm_1",Pe="_neutral_lyltm_18",et="_accent_lyltm_24",tt="_outline_lyltm_29",st="_success_lyltm_35",nt="_warning_lyltm_40",lt="_danger_lyltm_45",ot="_info_lyltm_50",at="_count_lyltm_55",ct="_mono_lyltm_63",it="_version_lyltm_71",rt="_dismiss_lyltm_80",dt="_dismissBtn_lyltm_84",_t="_dot_lyltm_98",ut="_dotIndicator_lyltm_111",ht="_pill_lyltm_119",G={badge:Qe,neutral:Pe,accent:et,outline:tt,success:st,warning:nt,danger:lt,info:ot,count:at,mono:ct,version:it,dismiss:rt,dismissBtn:dt,dot:_t,dotIndicator:ut,pill:ht},mt=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:"10",height:"10",children:e.jsx("path",{d:"M18 6 6 18M6 6l12 12"})});function be({variant:s="neutral",icon:c,pill:n=!1,dismissable:a=!1,onDismiss:t,dotColor:r,children:o,className:i,...l}){if(s==="dot"){const m=[G.badge,G.dot,i].filter(Boolean).join(" ");return e.jsxs("span",{...l,className:m,children:[e.jsx("span",{className:G.dotIndicator,style:{background:r??"var(--accent)"}}),o]})}const _=[G.badge,G[s],n?G.pill:null,a?G.dismiss:null,i].filter(Boolean).join(" ");return e.jsxs("span",{...l,className:_,children:[c||null,o,a&&e.jsx("button",{type:"button",className:G.dismissBtn,"aria-label":"Remove",onClick:t,children:e.jsx(mt,{})})]})}be.displayName="Badge";const xt="_breadcrumb_1y22n_1",ft="_list_1y22n_7",jt="_item_1y22n_17",gt="_separator_1y22n_23",vt="_link_1y22n_33",bt="_current_1y22n_34",kt="_button_1y22n_68",yt="_disabled_1y22n_79",F={breadcrumb:xt,list:ft,item:jt,separator:gt,link:vt,current:bt,button:kt,disabled:yt},Nt=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",width:"12",height:"12",children:e.jsx("path",{d:"m9 18 6-6-6-6"})});function de({items:s,separator:c=e.jsx(Nt,{}),label:n="Breadcrumb",className:a,...t}){const r=[F.breadcrumb,a].filter(Boolean).join(" ");return e.jsx("nav",{...t,className:r,"aria-label":n,children:e.jsx("ol",{className:F.list,children:s.map((o,i)=>{var j,g;const l=i===s.length-1,_=o.current??l,m=o.disabled||_;return e.jsxs("li",{className:F.item,children:[i>0&&e.jsx("span",{className:F.separator,"aria-hidden":"true",children:c}),o.href&&!m?e.jsx("a",{...o.linkProps,className:[F.link,(j=o.linkProps)==null?void 0:j.className].filter(Boolean).join(" "),href:o.href,children:o.label}):o.onClick&&!m?e.jsx("button",{...o.buttonProps,type:"button",className:[F.link,F.button,(g=o.buttonProps)==null?void 0:g.className].filter(Boolean).join(" "),onClick:o.onClick,children:o.label}):e.jsx("span",{className:[F.current,o.disabled?F.disabled:null].filter(Boolean).join(" "),"aria-current":_?"page":void 0,children:o.label})]},i)})})})}de.displayName="Breadcrumb";const Bt=de;function ke({direction:s="vertical",track:c=!1,arrows:n=!1,autoHide:a=!1,expand:t=!1,scrollbarSize:r,height:o,children:i,className:l,style:_,...m}){const j=["sb",c?"sb-track":null,n?"sb-arrows":null,a?"sb-auto-hide":null,t?"sb-expand":null,l].filter(Boolean).join(" "),g=s==="vertical"?{overflowY:"auto",overflowX:"hidden"}:s==="horizontal"?{overflowX:"auto",overflowY:"hidden"}:{overflow:"auto"},h=r!==void 0?{"--sb-w":`${r}px`}:void 0;return e.jsx("div",{...m,className:j,style:{height:o,...g,...h,..._},children:i})}ke.displayName="Scrollable";const Ct="_btn_xuv7s_1",wt="_icon_xuv7s_33",It="_primary_xuv7s_42",$t="_secondary_xuv7s_50",Lt="_ghost_xuv7s_60",Mt="_danger_xuv7s_70",Tt="_success_xuv7s_78",St="_warning_xuv7s_86",Rt="_sm_xuv7s_95",pt="_md_xuv7s_103",qt="_lg_xuv7s_105",oe={btn:Ct,icon:wt,primary:It,secondary:$t,ghost:Lt,danger:Mt,success:Tt,warning:St,sm:Rt,md:pt,lg:qt},ye=x.forwardRef(({type:s="button",variant:c="secondary",size:n="md",icon:a,loading:t=!1,children:r,className:o,disabled:i,...l},_)=>{const m=[oe.btn,oe[c],oe[n],o].filter(Boolean).join(" ");return e.jsxs("button",{ref:_,type:s,disabled:i||t,className:m,...l,children:[a?e.jsx("span",{className:oe.icon,children:a}):null,r]})});ye.displayName="Button";const Dt="_card_1gxgi_1",At="_bordered_1gxgi_8",Ot="_tilt_1gxgi_12",Et="_closeBtn_1gxgi_20",Ft="_padSm_1gxgi_41",Wt="_padMd_1gxgi_42",zt="_padLg_1gxgi_43",Vt="_padNone_1gxgi_44",Xt="_header_1gxgi_47",Gt="_headerIcon_1gxgi_54",Ut="_title_1gxgi_63",Ht="_subtitle_1gxgi_69",Kt="_stat_1gxgi_76",Yt="_statValue_1gxgi_83",Zt="_statUnit_1gxgi_91",Jt="_statDelta_1gxgi_97",Qt="_deltaPositive_1gxgi_102",Pt="_deltaNegative_1gxgi_103",es="_deltaNeutral_1gxgi_104",y={card:Dt,bordered:At,tilt:Ot,closeBtn:Et,padSm:Ft,padMd:Wt,padLg:zt,padNone:Vt,header:Xt,headerIcon:Gt,title:Ut,subtitle:Ht,stat:Kt,statValue:Yt,statUnit:Zt,statDelta:Jt,deltaPositive:Qt,deltaNegative:Pt,deltaNeutral:es},ts={none:y.padNone,sm:y.padSm,md:y.padMd,lg:y.padLg},ss=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"10",height:"10",children:e.jsx("path",{d:"M18 6 6 18M6 6l12 12"})});function Ne({padding:s="md",bordered:c=!1,tilt:n=!1,onClose:a,closeBtnProps:t,children:r,className:o,...i}){const l=[y.card,ts[s],c?y.bordered:null,n?y.tilt:null,o].filter(Boolean).join(" ");return e.jsxs("div",{...i,className:l,children:[a&&e.jsx("button",{type:"button","aria-label":"Close",...t,className:[y.closeBtn,t==null?void 0:t.className].filter(Boolean).join(" "),onClick:a,children:e.jsx(ss,{})}),r]})}Ne.displayName="Card";function Be({icon:s,title:c,subtitle:n,className:a,...t}){return e.jsxs("div",{...t,className:[y.header,a].filter(Boolean).join(" "),children:[s&&e.jsx("span",{className:y.headerIcon,children:s}),e.jsxs("div",{children:[e.jsx("div",{className:y.title,children:c}),n&&e.jsx("div",{className:y.subtitle,children:n})]})]})}Be.displayName="CardHeader";function Ce({value:s,unit:c,delta:n,deltaDirection:a="positive",className:t,...r}){const o=[y.statDelta,a==="positive"?y.deltaPositive:a==="negative"?y.deltaNegative:y.deltaNeutral].filter(Boolean).join(" ");return e.jsxs("div",{...r,className:[y.stat,t].filter(Boolean).join(" "),children:[e.jsxs("span",{className:y.statValue,children:[s,c&&e.jsxs("span",{className:y.statUnit,children:[" ",c]})]}),n&&e.jsx("span",{className:o,children:n})]})}Ce.displayName="CardStat";function ae(s,c,n){const[a,t]=x.useState(c),r=s!==void 0,o=r?s:a,i=x.useCallback(l=>{r||t(l),n==null||n(l)},[r,n]);return[o,i,r]}const ns="X",ls=/[a-zA-Z0-9]/;function _e(s,c={}){const n=c.allowedPattern??ls;return s.split("").filter(a=>n.test(a)).join("")}function we(s,c,n={}){const a=n.placeholder??ns,t=_e(s,n);let r=0,o="";for(const i of c){if(r>=t.length)break;if(i===a){o+=t[r],r+=1;continue}o+=i}return o}const os="_wrapper_25x8h_1",as="_field_25x8h_7",cs="_label_25x8h_13",is="_input_25x8h_22",rs="_hasIcon_25x8h_52",ds="_hasIconRight_25x8h_55",_s="_hasClear_25x8h_58",us="_hasClearAndIconRight_25x8h_61",hs="_iconSlot_25x8h_64",ms="_iconSlotRight_25x8h_78",xs="_iconSlotRightWithClear_25x8h_92",fs="_clearBtn_25x8h_95",T={wrapper:os,field:as,label:cs,input:is,hasIcon:rs,hasIconRight:ds,hasClear:_s,hasClearAndIconRight:us,iconSlot:hs,iconSlotRight:ms,iconSlotRightWithClear:xs,clearBtn:fs},js=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:"12",height:"12",children:e.jsx("path",{d:"M18 6 6 18M6 6l12 12"})}),Ie=x.forwardRef(({label:s,icon:c,iconPosition:n="left",clearable:a=!1,clearButtonProps:t,clearLabel:r,defaultValue:o="",disabled:i,mask:l,maskAllowedPattern:_,maskPlaceholder:m,selectOnFocus:j=!1,textAlign:g,inputProps:h,onChange:C,onValueChange:$,value:L,wrapperProps:N,fieldProps:f,className:b,style:V,...v},U)=>{const H=x.useRef(null),[Q,te]=ae(L,o,k=>{$==null||$({value:k,rawValue:l?_e(k,{allowedPattern:_}):k})});x.useImperativeHandle(U,()=>H.current);const M=x.useCallback(k=>l?we(k,l,{allowedPattern:_,placeholder:m}):k,[l,_,m]),S=k=>{var Z;const Y=M(k.target.value);k.target.value=Y,te(Y),C==null||C(k),(Z=h==null?void 0:h.onChange)==null||Z.call(h,k)},O=()=>{var k;te(""),(k=H.current)==null||k.focus()},R=c&&n==="right",E=c&&n==="left",K=[T.input,E?T.hasIcon:null,R?T.hasIconRight:null,a&&R?T.hasClearAndIconRight:a?T.hasClear:null,b,h==null?void 0:h.className].filter(Boolean).join(" "),P=k=>{var Y,Z;j&&k.target.select(),(Y=v.onFocus)==null||Y.call(v,k),(Z=h==null?void 0:h.onFocus)==null||Z.call(h,k)},w={...V,...h==null?void 0:h.style,...g?{textAlign:g}:null},X=i||(h==null?void 0:h.disabled),ne=e.jsx("input",{...v,...h,ref:H,disabled:X,value:M(Q),onChange:S,onFocus:P,className:K,style:w}),se=[T.wrapper,N==null?void 0:N.className].filter(Boolean).join(" "),le=e.jsxs("span",{...N,className:se,children:[E?e.jsx("span",{className:T.iconSlot,children:c}):null,ne,R?e.jsx("span",{className:[T.iconSlotRight,a?T.iconSlotRightWithClear:null].filter(Boolean).join(" "),children:c}):null,a?e.jsx("button",{type:"button","aria-label":"Clear",title:"Clear",disabled:X||Q.length===0,onClick:O,className:T.clearBtn,...t,children:(t==null?void 0:t.children)??e.jsx(js,{})}):null]});return!s&&!f?le:e.jsxs("div",{...f,className:[T.field,f==null?void 0:f.className].filter(Boolean).join(" "),children:[s?e.jsx("label",{className:T.label,children:s}):null,le]})});Ie.displayName="Input";const gs="_checkbox_7kjwa_2",vs="_checkboxBox_7kjwa_13",bs="_checked_7kjwa_33",ks="_indeterminate_7kjwa_42",ys="_disabled_7kjwa_55",Ns="_radio_7kjwa_61",Bs="_radioDot_7kjwa_72",Cs="_radioChecked_7kjwa_85",ws="_radioDisabled_7kjwa_97",Is="_radioGroup_7kjwa_102",$s="_switchWrap_7kjwa_109",Ls="_switchTrack_7kjwa_120",Ms="_switchOn_7kjwa_143",Ts="_switchDisabled_7kjwa_153",I={checkbox:gs,checkboxBox:vs,checked:bs,indeterminate:ks,disabled:ys,radio:Ns,radioDot:Bs,radioChecked:Cs,radioDisabled:ws,radioGroup:Is,switchWrap:$s,switchTrack:Ls,switchOn:Ms,switchDisabled:Ts},Ss=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M20 6 9 17l-5-5"})});function $e({label:s,checked:c,defaultChecked:n,indeterminate:a=!1,disabled:t=!1,onChange:r,className:o,...i}){const l=c??n??!1,_=[I.checkbox,l&&!a?I.checked:null,a?I.indeterminate:null,t?I.disabled:null,o].filter(Boolean).join(" ");return e.jsxs("label",{className:_,children:[e.jsx("input",{...i,type:"checkbox",checked:l,disabled:t,style:{display:"none"},onChange:m=>r==null?void 0:r(m.currentTarget.checked)}),e.jsx("span",{className:I.checkboxBox,children:!a&&e.jsx(Ss,{})}),s]})}$e.displayName="Checkbox";function Le({label:s,checked:c=!1,disabled:n=!1,onChange:a,value:t,className:r,...o}){const i=[I.radio,c?I.radioChecked:null,n?I.radioDisabled:null,r].filter(Boolean).join(" ");return e.jsxs("label",{className:i,children:[e.jsx("input",{...o,type:"radio",checked:c,disabled:n,value:t,style:{display:"none"},onChange:l=>a==null?void 0:a(l.currentTarget.value)}),e.jsx("span",{className:I.radioDot}),s]})}Le.displayName="Radio";function Me({children:s,className:c,...n}){const a=[I.radioGroup,c].filter(Boolean).join(" ");return e.jsx("div",{...n,className:a,role:"radiogroup",children:s})}Me.displayName="RadioGroup";function Te({label:s,checked:c,defaultChecked:n,disabled:a=!1,onChange:t,className:r,...o}){const i=c??n??!1,l=[I.switchWrap,i?I.switchOn:null,a?I.switchDisabled:null,r].filter(Boolean).join(" ");return e.jsxs("label",{className:l,children:[e.jsx("input",{...o,type:"checkbox",checked:i,disabled:a,style:{display:"none"},onChange:_=>t==null?void 0:t(_.currentTarget.checked)}),e.jsx("span",{className:I.switchTrack}),s]})}Te.displayName="Switch";const Rs="_menu_pga52_1",ps="_item_pga52_13",qs="_active_pga52_41",Ds="_danger_pga52_53",As="_disabled_pga52_65",Os="_kbd_pga52_71",Es="_separator_pga52_79",J={menu:Rs,item:ps,active:qs,danger:Ds,disabled:As,kbd:Os,separator:Es};function Se({children:s,className:c,...n}){const a=[J.menu,c].filter(Boolean).join(" ");return e.jsx("div",{...n,className:a,role:"menu",children:s})}Se.displayName="Menu";function Re({icon:s,kbd:c,active:n=!1,danger:a=!1,disabled:t=!1,children:r,className:o,...i}){const l=[J.item,n?J.active:null,a?J.danger:null,t?J.disabled:null,o].filter(Boolean).join(" ");return e.jsxs("button",{...i,type:"button",className:l,disabled:t,role:"menuitem",children:[s,r,c&&e.jsx("span",{className:J.kbd,children:c})]})}Re.displayName="MenuItem";function pe({className:s,...c}){const n=[J.separator,s].filter(Boolean).join(" ");return e.jsx("div",{...c,className:n,role:"separator"})}pe.displayName="MenuSeparator";const Fs="_backdrop_pya14_1",Ws="_modal_pya14_23",zs="_header_pya14_37",Vs="_titleBlock_pya14_45",Xs="_title_pya14_45",Gs="_subtitle_pya14_58",Us="_closeBtn_pya14_64",Hs="_body_pya14_86",Ks="_footer_pya14_92",W={backdrop:Fs,modal:Ws,header:zs,titleBlock:Vs,title:Xs,subtitle:Gs,closeBtn:Us,body:Hs,footer:Ks},Ys=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:"11",height:"11",children:e.jsx("path",{d:"M18 6 6 18M6 6l12 12"})}),qe=x.forwardRef(({open:s,title:c,subtitle:n,children:a,footer:t,closeOnBackdrop:r=!0,showCloseButton:o=!0,backdropProps:i,modalProps:l,headerProps:_,bodyProps:m,footerProps:j,closeButtonProps:g,onOpenChange:h,onClose:C},$)=>{const L=x.useRef(null);x.useImperativeHandle($,()=>L.current),x.useEffect(()=>{if(!s)return;const v=U=>{U.key==="Escape"&&N()};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[s]);const N=()=>{h==null||h(!1),C==null||C()},f=v=>{r&&v.target===v.currentTarget&&N()};if(!s)return null;const b=[W.backdrop,i==null?void 0:i.className].filter(Boolean).join(" "),V=[W.modal,l==null?void 0:l.className].filter(Boolean).join(" ");return e.jsx("div",{...i,className:b,onClick:f,role:"presentation",children:e.jsxs("div",{ref:L,...l,className:V,role:"dialog","aria-modal":"true",children:[(c||o)&&e.jsxs("header",{..._,className:[W.header,_==null?void 0:_.className].filter(Boolean).join(" "),children:[e.jsxs("div",{className:W.titleBlock,children:[c?e.jsx("div",{className:W.title,children:c}):null,n?e.jsx("div",{className:W.subtitle,children:n}):null]}),o&&e.jsx("button",{type:"button","aria-label":"Close",className:W.closeBtn,onClick:N,...g,children:(g==null?void 0:g.children)??e.jsx(Ys,{})})]}),e.jsx("section",{...m,className:[W.body,m==null?void 0:m.className].filter(Boolean).join(" "),children:a}),t&&e.jsx("footer",{...j,className:[W.footer,j==null?void 0:j.className].filter(Boolean).join(" "),children:t})]})})});qe.displayName="Modal";const Zs="_wrapper_10d4l_1",Js="_pop_10d4l_8",Qs="_sideRight_10d4l_22",Ps="_sideTop_10d4l_27",en="_arrow_10d4l_34",tn="_head_10d4l_60",sn="_title_10d4l_67",nn="_closeBtn_10d4l_74",ln="_body_10d4l_105",z={wrapper:Zs,pop:Js,sideRight:Qs,sideTop:Ps,arrow:en,head:tn,title:sn,closeBtn:nn,body:ln},on=()=>e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]});function De({open:s,defaultOpen:c=!1,title:n,children:a,trigger:t,side:r="bottom-start",showCloseButton:o=!0,onOpenChange:i,popProps:l}){const[_,m]=x.useState(c),j=s!==void 0,g=j?s:_,h=x.useRef(null);function C(f){j||m(f),i==null||i(f)}x.useEffect(()=>{function f(b){h.current&&!h.current.contains(b.target)&&C(!1)}return g&&document.addEventListener("mousedown",f),()=>document.removeEventListener("mousedown",f)},[g]);const $=r.startsWith("top"),L=r.endsWith("end"),N=[z.pop,L?z.sideRight:null,$?z.sideTop:null,l==null?void 0:l.className].filter(Boolean).join(" ");return e.jsxs("div",{ref:h,className:z.wrapper,children:[t&&e.jsx("div",{onClick:()=>C(!g),style:{display:"inline-flex"},children:t}),g&&e.jsxs("div",{...l,className:N,children:[e.jsx("span",{className:z.arrow}),(n||o)&&e.jsxs("div",{className:z.head,children:[n&&e.jsx("span",{className:z.title,children:n}),o&&e.jsx("button",{type:"button",className:z.closeBtn,"aria-label":"Close",onClick:()=>C(!1),children:e.jsx(on,{})})]}),e.jsx("div",{className:z.body,children:a})]})]})}De.displayName="Popover";const an="_group_1ltkm_1",cn="_pb_1ltkm_11",rn="_on_1ltkm_40",dn="_accent_1ltkm_45",_n="_solo_1ltkm_50",un="_disabled_1ltkm_65",ee={group:an,pb:cn,on:rn,accent:dn,solo:_n,disabled:un};function Ae({children:s,className:c,...n}){const a=[ee.group,c].filter(Boolean).join(" ");return e.jsx("div",{...n,className:a,role:"group",children:s})}Ae.displayName="PushButtonGroup";function Oe({on:s=!1,accent:c=!1,solo:n=!1,icon:a,children:t,disabled:r=!1,className:o,...i}){const l=[ee.pb,s?ee.on:null,s&&c?ee.accent:null,n?ee.solo:null,r?ee.disabled:null,o].filter(Boolean).join(" ");return e.jsxs("button",{...i,type:"button",className:l,disabled:r,children:[a,t]})}Oe.displayName="PushButton";const hn="_root_qhol4_1",mn="_field_qhol4_6",xn="_label_qhol4_12",fn="_labelMeta_qhol4_24",jn="_trigger_qhol4_33",gn="_triggerOpen_qhol4_59",vn="_triggerConnectedBottom_qhol4_64",bn="_triggerConnectedTop_qhol4_69",kn="_triggerValue_qhol4_74",yn="_triggerPlaceholder_qhol4_83",Nn="_chevron_qhol4_85",Bn="_chevronOpen_qhol4_94",Cn="_chips_qhol4_97",wn="_chip_qhol4_97",In="_chipOverflow_qhol4_120",$n="_clearBtn_qhol4_123",Ln="_popover_qhol4_143",Mn="_popoverBottom_qhol4_154",Tn="_popoverTop_qhol4_162",Sn="_search_qhol4_181",Rn="_searchIcon_qhol4_188",pn="_searchInput_qhol4_195",qn="_list_qhol4_209",Dn="_item_qhol4_217",An="_itemAlignLeft_qhol4_230",On="_itemAlignCenter_qhol4_231",En="_itemAlignRight_qhol4_232",Fn="_itemActive_qhol4_235",Wn="_itemDisabled_qhol4_243",zn="_itemMeta_qhol4_245",Vn="_checkbox_qhol4_254",Xn="_checkboxChecked_qhol4_266",Gn="_checkIcon_qhol4_278",Un="_emptyState_qhol4_299",Hn="_popFooter_qhol4_307",Kn="_popFooterBtn_qhol4_317",u={root:hn,field:mn,label:xn,labelMeta:fn,trigger:jn,triggerOpen:gn,triggerConnectedBottom:vn,triggerConnectedTop:bn,triggerValue:kn,triggerPlaceholder:yn,chevron:Nn,chevronOpen:Bn,chips:Cn,chip:wn,chipOverflow:In,clearBtn:$n,popover:Ln,popoverBottom:Mn,popoverTop:Tn,search:Sn,searchIcon:Rn,searchInput:pn,list:qn,item:Dn,itemAlignLeft:An,itemAlignCenter:On,itemAlignRight:En,itemActive:Fn,itemDisabled:Wn,itemMeta:zn,checkbox:Vn,checkboxChecked:Xn,checkIcon:Gn,emptyState:Un,popFooter:Hn,popFooterBtn:Kn},Yn=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:"14",height:"14",children:e.jsx("path",{d:"m6 9 6 6 6-6"})}),ve=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:"12",height:"12",children:e.jsx("path",{d:"M18 6 6 18M6 6l12 12"})}),Zn=()=>e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("circle",{cx:"11",cy:"11",r:"7"}),e.jsx("path",{d:"m20 20-3.5-3.5"})]}),ie=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",width:"10",height:"10",children:e.jsx("path",{d:"M20 6 9 17l-5-5"})}),Jn=(s,c)=>{const n=c.trim().toLowerCase();return n?s.filter(a=>String(a.label).toLowerCase().includes(n)):s},Ee=x.forwardRef(({label:s,clearable:c=!1,defaultValue:n=null,disabled:a=!1,emptyLabel:t="No options found",filterOptions:r=Jn,isLoading:o=!1,loadingLabel:i="Loading...",multiple:l=!1,onSearchChange:_,onValueChange:m,options:j,optionsAlign:g="left",optionsPosition:h="bottom",placeholder:C="Select",searchable:$=!1,searchPlaceholder:L="Search...",showSelectedCount:N=!0,showClearAll:f=!0,showSelectedValues:b=!0,closeOnSelect:V,selectProps:v,value:U,className:H,...Q},te)=>{const[M,S]=x.useState(!1),[O,R]=x.useState(""),E=x.useRef(null),[K,P]=ae(U,n,d=>{const B=j.filter(q=>Array.isArray(d)?d.includes(q.value):q.value===d);m==null||m(d,B)}),w=x.useMemo(()=>Array.isArray(K)?K:K?[K]:[],[K]),X=x.useMemo(()=>j.filter(d=>w.includes(d.value)),[j,w]),ne=x.useMemo(()=>r(j,O),[r,j,O]);x.useEffect(()=>{if(!M)return;const d=B=>{E.current&&!E.current.contains(B.target)&&S(!1)};return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[M]);const se=d=>{R(d),_==null||_(d)},le=d=>{if(!d.disabled){if(l){const B=w.includes(d.value)?w.filter(q=>q!==d.value):[...w,d.value];P(B),V&&S(!1);return}P(d.value),(V??!0)&&S(!1)}},k=()=>{P(l?[]:null),se("")},Y=()=>{if(w.length>0){k();return}P(j.filter(d=>!d.disabled).map(d=>d.value))},Z=d=>{var B;(B=v==null?void 0:v.onClick)==null||B.call(v,d),!d.defaultPrevented&&!a&&S(q=>!q)},Xe=d=>{var B;(B=v==null?void 0:v.onKeyDown)==null||B.call(v,d),!d.defaultPrevented&&((d.key==="Enter"||d.key===" ")&&(d.preventDefault(),S(q=>!q)),d.key==="Escape"&&S(!1))},me=h==="top",Ge=[u.trigger,M?u.triggerOpen:null,M?me?u.triggerConnectedTop:u.triggerConnectedBottom:null,v==null?void 0:v.className].filter(Boolean).join(" "),Ue=!l||b,He=l&&b&&X.length>0,ce=l,Ke=l&&(w.length>0||f),xe=Ue&&X.length>0,fe=2,je=X.length-fe,Ye=[u.root,H].filter(Boolean).join(" "),Ze={left:u.itemAlignLeft,center:u.itemAlignCenter,right:u.itemAlignRight}[g],ge=e.jsxs("div",{ref:E,...Q,className:Ye,children:[e.jsxs("button",{...v,type:"button",className:Ge,disabled:a,"aria-haspopup":"listbox","aria-expanded":M,onClick:Z,onKeyDown:Xe,children:[He?e.jsxs("div",{className:u.chips,children:[X.slice(0,fe).map(d=>e.jsx("span",{className:u.chip,children:d.label},d.value)),je>0&&e.jsxs("span",{className:[u.chip,u.chipOverflow].join(" "),children:["+",je]})]}):e.jsx("span",{className:[u.triggerValue,xe?null:u.triggerPlaceholder].filter(Boolean).join(" "),children:xe?X.map(d=>d.label).join(", "):C}),c&&w.length>0&&e.jsx("button",{type:"button","aria-label":"Clear",className:u.clearBtn,disabled:a,onClick:d=>{d.stopPropagation(),k()},children:e.jsx(ve,{})}),e.jsx("span",{className:[u.chevron,M?u.chevronOpen:null].filter(Boolean).join(" "),children:e.jsx(Yn,{})})]}),M&&e.jsxs("div",{className:[u.popover,me?u.popoverTop:u.popoverBottom].join(" "),role:"listbox","aria-multiselectable":l||void 0,children:[$&&e.jsxs("div",{className:u.search,children:[e.jsx("span",{className:u.searchIcon,children:e.jsx(Zn,{})}),e.jsx("input",{autoFocus:!0,value:O,placeholder:L,className:u.searchInput,onChange:d=>se(d.target.value)}),O&&e.jsx("button",{className:u.clearBtn,onClick:()=>se(""),children:e.jsx(ve,{})})]}),e.jsxs("ul",{className:[u.list,"sb"].join(" "),children:[o&&e.jsx("li",{className:u.emptyState,children:i}),!o&&ne.length===0&&e.jsx("li",{className:u.emptyState,children:t}),!o&&ne.map(d=>{const B=w.includes(d.value),q=[u.item,Ze,B?u.itemActive:null,d.disabled?u.itemDisabled:null].filter(Boolean).join(" ");return e.jsxs("li",{className:q,role:"option","aria-selected":B,onClick:()=>le(d),children:[!ce&&g==="right"&&B&&e.jsx("span",{className:u.checkIcon,children:e.jsx(ie,{})}),ce?e.jsx("span",{className:[u.checkbox,B?u.checkboxChecked:null].filter(Boolean).join(" "),children:B&&e.jsx(ie,{})}):null,e.jsx("span",{children:d.label}),d.meta&&e.jsx("span",{className:u.itemMeta,children:d.meta}),!ce&&g!=="right"&&B&&e.jsx("span",{className:u.checkIcon,children:e.jsx(ie,{})})]},d.value)})]}),Ke&&(N||f)&&e.jsxs("div",{className:u.popFooter,children:[N&&e.jsxs("span",{children:[w.length," selected"]}),f&&e.jsx("button",{className:u.popFooterBtn,onClick:Y,children:w.length>0?"Clear all":"Check all"})]})]})]});return s?e.jsxs("div",{className:u.field,children:[e.jsxs("label",{className:u.label,children:[s,l&&N&&w.length>0&&e.jsxs("span",{className:u.labelMeta,children:["· ",w.length," selected"]})]}),ge]}):ge});Ee.displayName="Select";const Qn="_ring_mxe7t_2",Pn="_spin_mxe7t_1",el="_ringMuted_mxe7t_12",tl="_sm_mxe7t_14",sl="_md_mxe7t_15",nl="_lg_mxe7t_16",ll="_onAccent_mxe7t_19",ol="_dots_mxe7t_29",al="_dot_mxe7t_29",cl="_dotPulse_mxe7t_1",il="_bar_mxe7t_52",rl="_barFill_mxe7t_62",dl="_barSlide_mxe7t_1",D={ring:Qn,spin:Pn,ringMuted:el,sm:tl,md:sl,lg:nl,onAccent:ll,dots:ol,dot:al,dotPulse:cl,bar:il,barFill:rl,barSlide:dl};function ue({variant:s="ring",size:c="md",muted:n=!1,onAccent:a=!1,className:t,...r}){if(s==="dots"){const i=[D.dots,t].filter(Boolean).join(" ");return e.jsxs("span",{...r,className:i,role:"status","aria-label":"Loading",children:[e.jsx("span",{className:D.dot}),e.jsx("span",{className:D.dot}),e.jsx("span",{className:D.dot})]})}if(s==="bar"){const i=[D.bar,t].filter(Boolean).join(" ");return e.jsx("span",{...r,className:i,role:"status","aria-label":"Loading",children:e.jsx("span",{className:D.barFill})})}const o=[D.ring,D[c],n?D.ringMuted:null,a?D.onAccent:null,t].filter(Boolean).join(" ");return e.jsx("span",{...r,className:o,role:"status","aria-label":"Loading"})}ue.displayName="Spinner";const _l="_field_fazrx_1",ul="_label_fazrx_7",hl="_wrapper_fazrx_16",ml="_textarea_fazrx_20",xl="_mono_fazrx_53",fl="_hasClear_fazrx_59",jl="_clearBtn_fazrx_62",gl="_footer_fazrx_84",vl="_helpText_fazrx_92",bl="_charCount_fazrx_94",kl="_charCountOver_fazrx_100",p={field:_l,label:ul,wrapper:hl,textarea:ml,mono:xl,hasClear:fl,clearBtn:jl,footer:gl,helpText:vl,charCount:bl,charCountOver:kl},yl=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:"12",height:"12",children:e.jsx("path",{d:"M18 6 6 18M6 6l12 12"})}),Fe=x.forwardRef(({label:s,helpText:c,maxLength:n,clearable:a=!1,mono:t=!1,value:r,defaultValue:o="",disabled:i,textareaProps:l,wrapperProps:_,fieldProps:m,clearButtonProps:j,onChange:g,onValueChange:h,className:C,style:$,...L},N)=>{const[f,b]=ae(r,o,R=>h==null?void 0:h(R)),V=R=>{var E;b(R.target.value),g==null||g(R),(E=l==null?void 0:l.onChange)==null||E.call(l,R)},v=()=>{b("")},U=n!==void 0&&f.length>n,H=[p.textarea,"sb",t?p.mono:null,a?p.hasClear:null,C,l==null?void 0:l.className].filter(Boolean).join(" "),Q=[p.wrapper,_==null?void 0:_.className].filter(Boolean).join(" "),te=[p.field,m==null?void 0:m.className].filter(Boolean).join(" "),M={...$,...l==null?void 0:l.style},S=i||(l==null?void 0:l.disabled),O=e.jsxs("div",{..._,className:Q,children:[e.jsx("textarea",{...L,...l,ref:N,disabled:S,maxLength:n,value:f,onChange:V,className:H,style:M}),a&&e.jsx("button",{type:"button",className:p.clearBtn,disabled:S||f.length===0,"aria-label":"Clear",onClick:v,...j,children:(j==null?void 0:j.children)??e.jsx(yl,{})})]});return!s&&!c&&n===void 0?O:e.jsxs("div",{...m,className:te,children:[s&&e.jsx("label",{className:p.label,children:s}),O,(c||n!==void 0)&&e.jsxs("div",{className:p.footer,children:[c&&e.jsx("span",{className:p.helpText,children:c}),n!==void 0&&e.jsxs("span",{className:[p.charCount,U?p.charCountOver:null].filter(Boolean).join(" "),children:[f.length," / ",n]})]})]})});Fe.displayName="Textarea";const Nl="_toast_4d9rv_1",Bl="_slideUp_4d9rv_1",Cl="_toastExiting_4d9rv_27",wl="_slideOut_4d9rv_1",Il="_lead_4d9rv_31",$l="_body_4d9rv_41",Ll="_title_4d9rv_49",Ml="_message_4d9rv_55",Tl="_closeBtn_4d9rv_60",Sl="_ok_4d9rv_83",Rl="_error_4d9rv_86",pl="_warning_4d9rv_89",ql="_info_4d9rv_92",Dl="_loading_4d9rv_95",Al="_overlay_4d9rv_99",Ol="_stack_4d9rv_108",A={toast:Nl,slideUp:Bl,toastExiting:Cl,slideOut:wl,lead:Il,body:$l,title:Ll,message:Ml,closeBtn:Tl,ok:Sl,error:Rl,warning:pl,info:ql,loading:Dl,overlay:Al,stack:Ol},El=()=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"16",height:"16",children:e.jsx("path",{d:"M20 6 9 17l-5-5"})}),We=({size:s=11})=>e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:s,height:s,children:e.jsx("path",{d:"M18 6 6 18M6 6l12 12"})}),Fl=()=>e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:"16",height:"16",children:[e.jsx("path",{d:"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),e.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),e.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),Wl=()=>e.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:"16",height:"16",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),e.jsx("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]}),zl={ok:e.jsx(El,{}),error:e.jsx(We,{size:18}),warning:e.jsx(Fl,{}),info:e.jsx(Wl,{}),loading:e.jsx(ue,{size:"sm",muted:!0})};function he({variant:s="ok",title:c,message:n,overlay:a=!1,onDismiss:t,className:r,...o}){const i=s==="loading",l=[A.toast,A[s],r].filter(Boolean).join(" "),_=e.jsxs("div",{...o,className:l,role:"alert",children:[e.jsx("span",{className:A.lead,children:zl[s]}),e.jsxs("div",{className:A.body,children:[e.jsx("div",{className:A.title,children:c}),n&&e.jsx("div",{className:A.message,children:n})]}),t&&!i&&e.jsx("button",{type:"button",className:A.closeBtn,"aria-label":"Dismiss",onClick:t,children:e.jsx(We,{})})]});return!a||!i?_:e.jsxs(e.Fragment,{children:[e.jsx("div",{className:A.overlay,"aria-hidden":"true"}),_]})}he.displayName="Toast";const ze=x.createContext(null);function Vl({children:s}){const[c,n]=x.useState([]),a=x.useCallback(o=>{n(i=>i.filter(l=>l.id!==o))},[]),t=x.useCallback(o=>{const i=Math.random().toString(36).slice(2),l=o.duration??(o.variant==="loading"?0:4e3);return n(_=>[..._,{...o,id:i}]),l>0&&setTimeout(()=>a(i),l),i},[a]),r=c.some(o=>o.variant==="loading"&&o.overlay);return e.jsxs(ze.Provider,{value:{toast:t,dismiss:a},children:[s,typeof document<"u"&&Je.createPortal(e.jsxs(e.Fragment,{children:[r&&e.jsx("div",{className:A.overlay,"aria-hidden":"true"}),e.jsx("div",{className:A.stack,children:c.map(o=>e.jsx(he,{variant:o.variant,title:o.title,message:o.message,onDismiss:()=>a(o.id)},o.id))})]}),document.body)]})}function Xl(){const s=x.useContext(ze);if(!s)throw new Error("useToast must be used within a ToastProvider");return s}const Gl="_wrapper_1pjxy_1",Ul="_tooltip_1pjxy_6",Hl="_fadeIn_1pjxy_1",Kl="_top_1pjxy_33",Yl="_bottom_1pjxy_52",Zl="_left_1pjxy_72",Jl="_right_1pjxy_94",Ql="_kbd_1pjxy_115",re={wrapper:Gl,tooltip:Ul,fadeIn:Hl,top:Kl,bottom:Yl,left:Zl,right:Jl,kbd:Ql},Pl=800;function Ve({content:s,side:c="top",delay:n=Pl,children:a,wrapperProps:t,disabled:r=!1}){const[o,i]=x.useState(!1),l=x.useRef(null),_=()=>{l.current!==null&&(window.clearTimeout(l.current),l.current=null)};if(x.useEffect(()=>_,[]),r)return e.jsx(e.Fragment,{children:a});const m=()=>{if(_(),n<=0){i(!0);return}l.current=window.setTimeout(()=>{i(!0),l.current=null},n)},j=()=>{_(),i(!1)},g=f=>{var b;(b=t==null?void 0:t.onMouseEnter)==null||b.call(t,f),m()},h=f=>{var b;(b=t==null?void 0:t.onMouseLeave)==null||b.call(t,f),j()},C=f=>{var b;(b=t==null?void 0:t.onFocus)==null||b.call(t,f),m()},$=f=>{var b;(b=t==null?void 0:t.onBlur)==null||b.call(t,f),j()},L=[re.tooltip,re[c]].filter(Boolean).join(" "),N=[re.wrapper,t==null?void 0:t.className].filter(Boolean).join(" ");return e.jsxs("span",{...t,className:N,onMouseEnter:g,onMouseLeave:h,onFocus:C,onBlur:$,children:[a,o&&e.jsx("span",{className:L,role:"tooltip",children:s})]})}Ve.displayName="Tooltip";exports.Badge=be;exports.BreadCrumb=Bt;exports.Breadcrumb=de;exports.Button=ye;exports.Card=Ne;exports.CardHeader=Be;exports.CardStat=Ce;exports.Checkbox=$e;exports.Input=Ie;exports.Menu=Se;exports.MenuItem=Re;exports.MenuSeparator=pe;exports.Modal=qe;exports.Popover=De;exports.PushButton=Oe;exports.PushButtonGroup=Ae;exports.Radio=Le;exports.RadioGroup=Me;exports.Scrollable=ke;exports.Select=Ee;exports.Spinner=ue;exports.Switch=Te;exports.Textarea=Fe;exports.Toast=he;exports.ToastProvider=Vl;exports.Tooltip=Ve;exports.applyMask=we;exports.getRawMaskValue=_e;exports.useControlledState=ae;exports.useToast=Xl;
|
|
2
2
|
//# sourceMappingURL=super-kit.cjs.map
|