@dnotrever2/super-kit 0.1.13 → 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 +68 -3
- package/dist/Breadcrumb/Breadcrumb.d.ts +20 -0
- package/dist/Breadcrumb/index.d.ts +1 -0
- package/dist/Toast/Toast.d.ts +4 -2
- package/dist/Tooltip/Tooltip.d.ts +2 -1
- 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 +1053 -963
- 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.
|
|
@@ -522,18 +560,40 @@ function DeployButton() {
|
|
|
522
560
|
</Button>
|
|
523
561
|
);
|
|
524
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
|
+
}
|
|
525
584
|
```
|
|
526
585
|
|
|
527
586
|
**`toast(options)` options**
|
|
528
587
|
|
|
529
588
|
| Field | Type | Default |
|
|
530
589
|
| ---------- | ---------------------------------------- | --------------------------- |
|
|
531
|
-
| `variant` | `"ok" \| "error" \| "warning" \| "info"` | required
|
|
590
|
+
| `variant` | `"ok" \| "error" \| "warning" \| "info" \| "loading"` | required |
|
|
532
591
|
| `title` | `string` | required |
|
|
533
592
|
| `message` | `string` | — |
|
|
534
|
-
| `duration` | `number` (ms) | `4000`
|
|
593
|
+
| `duration` | `number` (ms) | `4000`; `loading` defaults to `0` |
|
|
594
|
+
| `overlay` | `boolean` | `false` — only applies to `loading` |
|
|
535
595
|
|
|
536
|
-
`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.
|
|
537
597
|
|
|
538
598
|
---
|
|
539
599
|
|
|
@@ -547,12 +607,17 @@ import { Tooltip } from "@dnotrever2/super-kit";
|
|
|
547
607
|
<Tooltip content="Deploy to production" side="top">
|
|
548
608
|
<Button variant="primary">Deploy</Button>
|
|
549
609
|
</Tooltip>
|
|
610
|
+
|
|
611
|
+
<Tooltip content="No delay" delay={0}>
|
|
612
|
+
<Button variant="primary">Deploy</Button>
|
|
613
|
+
</Tooltip>
|
|
550
614
|
```
|
|
551
615
|
|
|
552
616
|
| Prop | Type | Default |
|
|
553
617
|
| -------------- | --------------------------------- | -------- |
|
|
554
618
|
| `content` | `ReactNode` | required |
|
|
555
619
|
| `side` | `"top" \| "bottom" \| "left" \| "right"` | `"top"` |
|
|
620
|
+
| `delay` | `number` (ms) | `800` |
|
|
556
621
|
| `disabled` | `boolean` | `false` |
|
|
557
622
|
| `wrapperProps` | `HTMLAttributes<HTMLSpanElement>` | — |
|
|
558
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/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
|
}
|
|
@@ -3,11 +3,12 @@ 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"),m=require("react"),Ye=require("react-dom"),Ze="_badge_lyltm_1",Je="_neutral_lyltm_18",Qe="_accent_lyltm_24",Pe="_outline_lyltm_29",et="_success_lyltm_35",tt="_warning_lyltm_40",st="_danger_lyltm_45",nt="_info_lyltm_50",lt="_count_lyltm_55",ot="_mono_lyltm_63",at="_version_lyltm_71",ct="_dismiss_lyltm_80",it="_dismissBtn_lyltm_84",rt="_dot_lyltm_98",dt="_dotIndicator_lyltm_111",_t="_pill_lyltm_119",V={badge:Ze,neutral:Je,accent:Qe,outline:Pe,success:et,warning:tt,danger:st,info:nt,count:lt,mono:ot,version:at,dismiss:ct,dismissBtn:it,dot:rt,dotIndicator:dt,pill:_t},ut=()=>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 je({variant:n="neutral",icon:l,pill:t=!1,dismissable:s=!1,onDismiss:c,dotColor:a,children:i,className:r,...o}){if(n==="dot"){const f=[V.badge,V.dot,r].filter(Boolean).join(" ");return e.jsxs("span",{...o,className:f,children:[e.jsx("span",{className:V.dotIndicator,style:{background:a??"var(--accent)"}}),i]})}const h=[V.badge,V[n],t?V.pill:null,s?V.dismiss:null,r].filter(Boolean).join(" ");return e.jsxs("span",{...o,className:h,children:[l||null,i,s&&e.jsx("button",{type:"button",className:V.dismissBtn,"aria-label":"Remove",onClick:c,children:e.jsx(ut,{})})]})}je.displayName="Badge";function ge({direction:n="vertical",track:l=!1,arrows:t=!1,autoHide:s=!1,expand:c=!1,scrollbarSize:a,height:i,children:r,className:o,style:h,...f}){const j=["sb",l?"sb-track":null,t?"sb-arrows":null,s?"sb-auto-hide":null,c?"sb-expand":null,o].filter(Boolean).join(" "),g=n==="vertical"?{overflowY:"auto",overflowX:"hidden"}:n==="horizontal"?{overflowX:"auto",overflowY:"hidden"}:{overflow:"auto"},u=a!==void 0?{"--sb-w":`${a}px`}:void 0;return e.jsx("div",{...f,className:j,style:{height:i,...g,...u,...h},children:r})}ge.displayName="Scrollable";const ht="_btn_xuv7s_1",mt="_icon_xuv7s_33",xt="_primary_xuv7s_42",ft="_secondary_xuv7s_50",jt="_ghost_xuv7s_60",gt="_danger_xuv7s_70",vt="_success_xuv7s_78",bt="_warning_xuv7s_86",kt="_sm_xuv7s_95",yt="_md_xuv7s_103",Nt="_lg_xuv7s_105",le={btn:ht,icon:mt,primary:xt,secondary:ft,ghost:jt,danger:gt,success:vt,warning:bt,sm:kt,md:yt,lg:Nt},ve=m.forwardRef(({type:n="button",variant:l="secondary",size:t="md",icon:s,loading:c=!1,children:a,className:i,disabled:r,...o},h)=>{const f=[le.btn,le[l],le[t],i].filter(Boolean).join(" ");return e.jsxs("button",{ref:h,type:n,disabled:r||c,className:f,...o,children:[s?e.jsx("span",{className:le.icon,children:s}):null,a]})});ve.displayName="Button";const pt="_card_1gxgi_1",wt="_bordered_1gxgi_8",Bt="_tilt_1gxgi_12",Ct="_closeBtn_1gxgi_20",It="_padSm_1gxgi_41",$t="_padMd_1gxgi_42",Mt="_padLg_1gxgi_43",St="_padNone_1gxgi_44",Lt="_header_1gxgi_47",Rt="_headerIcon_1gxgi_54",Tt="_title_1gxgi_63",qt="_subtitle_1gxgi_69",At="_stat_1gxgi_76",Dt="_statValue_1gxgi_83",Ot="_statUnit_1gxgi_91",Et="_statDelta_1gxgi_97",Wt="_deltaPositive_1gxgi_102",Ft="_deltaNegative_1gxgi_103",zt="_deltaNeutral_1gxgi_104",k={card:pt,bordered:wt,tilt:Bt,closeBtn:Ct,padSm:It,padMd:$t,padLg:Mt,padNone:St,header:Lt,headerIcon:Rt,title:Tt,subtitle:qt,stat:At,statValue:Dt,statUnit:Ot,statDelta:Et,deltaPositive:Wt,deltaNegative:Ft,deltaNeutral:zt},Vt={none:k.padNone,sm:k.padSm,md:k.padMd,lg:k.padLg},Xt=()=>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 be({padding:n="md",bordered:l=!1,tilt:t=!1,onClose:s,closeBtnProps:c,children:a,className:i,...r}){const o=[k.card,Vt[n],l?k.bordered:null,t?k.tilt:null,i].filter(Boolean).join(" ");return e.jsxs("div",{...r,className:o,children:[s&&e.jsx("button",{type:"button","aria-label":"Close",...c,className:[k.closeBtn,c==null?void 0:c.className].filter(Boolean).join(" "),onClick:s,children:e.jsx(Xt,{})}),a]})}be.displayName="Card";function ke({icon:n,title:l,subtitle:t,className:s,...c}){return e.jsxs("div",{...c,className:[k.header,s].filter(Boolean).join(" "),children:[n&&e.jsx("span",{className:k.headerIcon,children:n}),e.jsxs("div",{children:[e.jsx("div",{className:k.title,children:l}),t&&e.jsx("div",{className:k.subtitle,children:t})]})]})}ke.displayName="CardHeader";function ye({value:n,unit:l,delta:t,deltaDirection:s="positive",className:c,...a}){const i=[k.statDelta,s==="positive"?k.deltaPositive:s==="negative"?k.deltaNegative:k.deltaNeutral].filter(Boolean).join(" ");return e.jsxs("div",{...a,className:[k.stat,c].filter(Boolean).join(" "),children:[e.jsxs("span",{className:k.statValue,children:[n,l&&e.jsxs("span",{className:k.statUnit,children:[" ",l]})]}),t&&e.jsx("span",{className:i,children:t})]})}ye.displayName="CardStat";function oe(n,l,t){const[s,c]=m.useState(l),a=n!==void 0,i=a?n:s,r=m.useCallback(o=>{a||c(o),t==null||t(o)},[a,t]);return[i,r,a]}const Gt="X",Ut=/[a-zA-Z0-9]/;function re(n,l={}){const t=l.allowedPattern??Ut;return n.split("").filter(s=>t.test(s)).join("")}function Ne(n,l,t={}){const s=t.placeholder??Gt,c=re(n,t);let a=0,i="";for(const r of l){if(a>=c.length)break;if(r===s){i+=c[a],a+=1;continue}i+=r}return i}const Ht="_wrapper_25x8h_1",Kt="_field_25x8h_7",Yt="_label_25x8h_13",Zt="_input_25x8h_22",Jt="_hasIcon_25x8h_52",Qt="_hasIconRight_25x8h_55",Pt="_hasClear_25x8h_58",es="_hasClearAndIconRight_25x8h_61",ts="_iconSlot_25x8h_64",ss="_iconSlotRight_25x8h_78",ns="_iconSlotRightWithClear_25x8h_92",ls="_clearBtn_25x8h_95",I={wrapper:Ht,field:Kt,label:Yt,input:Zt,hasIcon:Jt,hasIconRight:Qt,hasClear:Pt,hasClearAndIconRight:es,iconSlot:ts,iconSlotRight:ss,iconSlotRightWithClear:ns,clearBtn:ls},os=()=>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"})}),pe=m.forwardRef(({label:n,icon:l,iconPosition:t="left",clearable:s=!1,clearButtonProps:c,clearLabel:a,defaultValue:i="",disabled:r,mask:o,maskAllowedPattern:h,maskPlaceholder:f,selectOnFocus:j=!1,textAlign:g,inputProps:u,onChange:p,onValueChange:$,value:T,wrapperProps:N,fieldProps:v,className:M,style:F,...x},G)=>{const U=m.useRef(null),[J,ee]=oe(T,i,b=>{$==null||$({value:b,rawValue:o?re(b,{allowedPattern:h}):b})});m.useImperativeHandle(G,()=>U.current);const C=m.useCallback(b=>o?Ne(b,o,{allowedPattern:h,placeholder:f}):b,[o,h,f]),S=b=>{var Y;const K=C(b.target.value);b.target.value=K,ee(K),p==null||p(b),(Y=u==null?void 0:u.onChange)==null||Y.call(u,b)},D=()=>{var b;ee(""),(b=U.current)==null||b.focus()},L=l&&t==="right",O=l&&t==="left",H=[I.input,O?I.hasIcon:null,L?I.hasIconRight:null,s&&L?I.hasClearAndIconRight:s?I.hasClear:null,M,u==null?void 0:u.className].filter(Boolean).join(" "),Q=b=>{var K,Y;j&&b.target.select(),(K=x.onFocus)==null||K.call(x,b),(Y=u==null?void 0:u.onFocus)==null||Y.call(u,b)},w={...F,...u==null?void 0:u.style,...g?{textAlign:g}:null},z=r||(u==null?void 0:u.disabled),se=e.jsx("input",{...x,...u,ref:U,disabled:z,value:C(J),onChange:S,onFocus:Q,className:H,style:w}),te=[I.wrapper,N==null?void 0:N.className].filter(Boolean).join(" "),ne=e.jsxs("span",{...N,className:te,children:[O?e.jsx("span",{className:I.iconSlot,children:l}):null,se,L?e.jsx("span",{className:[I.iconSlotRight,s?I.iconSlotRightWithClear:null].filter(Boolean).join(" "),children:l}):null,s?e.jsx("button",{type:"button","aria-label":"Clear",title:"Clear",disabled:z||J.length===0,onClick:D,className:I.clearBtn,...c,children:(c==null?void 0:c.children)??e.jsx(os,{})}):null]});return!n&&!v?ne: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,ne]})});pe.displayName="Input";const as="_checkbox_7kjwa_2",cs="_checkboxBox_7kjwa_13",is="_checked_7kjwa_33",rs="_indeterminate_7kjwa_42",ds="_disabled_7kjwa_55",_s="_radio_7kjwa_61",us="_radioDot_7kjwa_72",hs="_radioChecked_7kjwa_85",ms="_radioDisabled_7kjwa_97",xs="_radioGroup_7kjwa_102",fs="_switchWrap_7kjwa_109",js="_switchTrack_7kjwa_120",gs="_switchOn_7kjwa_143",vs="_switchDisabled_7kjwa_153",B={checkbox:as,checkboxBox:cs,checked:is,indeterminate:rs,disabled:ds,radio:_s,radioDot:us,radioChecked:hs,radioDisabled:ms,radioGroup:xs,switchWrap:fs,switchTrack:js,switchOn:gs,switchDisabled:vs},bs=()=>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 we({label:n,checked:l,defaultChecked:t,indeterminate:s=!1,disabled:c=!1,onChange:a,className:i,...r}){const o=l??t??!1,h=[B.checkbox,o&&!s?B.checked:null,s?B.indeterminate:null,c?B.disabled:null,i].filter(Boolean).join(" ");return e.jsxs("label",{className:h,children:[e.jsx("input",{...r,type:"checkbox",checked:o,disabled:c,style:{display:"none"},onChange:f=>a==null?void 0:a(f.currentTarget.checked)}),e.jsx("span",{className:B.checkboxBox,children:!s&&e.jsx(bs,{})}),n]})}we.displayName="Checkbox";function Be({label:n,checked:l=!1,disabled:t=!1,onChange:s,value:c,className:a,...i}){const r=[B.radio,l?B.radioChecked:null,t?B.radioDisabled:null,a].filter(Boolean).join(" ");return e.jsxs("label",{className:r,children:[e.jsx("input",{...i,type:"radio",checked:l,disabled:t,value:c,style:{display:"none"},onChange:o=>s==null?void 0:s(o.currentTarget.value)}),e.jsx("span",{className:B.radioDot}),n]})}Be.displayName="Radio";function Ce({children:n,className:l,...t}){const s=[B.radioGroup,l].filter(Boolean).join(" ");return e.jsx("div",{...t,className:s,role:"radiogroup",children:n})}Ce.displayName="RadioGroup";function Ie({label:n,checked:l,defaultChecked:t,disabled:s=!1,onChange:c,className:a,...i}){const r=l??t??!1,o=[B.switchWrap,r?B.switchOn:null,s?B.switchDisabled:null,a].filter(Boolean).join(" ");return e.jsxs("label",{className:o,children:[e.jsx("input",{...i,type:"checkbox",checked:r,disabled:s,style:{display:"none"},onChange:h=>c==null?void 0:c(h.currentTarget.checked)}),e.jsx("span",{className:B.switchTrack}),n]})}Ie.displayName="Switch";const ks="_menu_pga52_1",ys="_item_pga52_13",Ns="_active_pga52_41",ps="_danger_pga52_53",ws="_disabled_pga52_65",Bs="_kbd_pga52_71",Cs="_separator_pga52_79",Z={menu:ks,item:ys,active:Ns,danger:ps,disabled:ws,kbd:Bs,separator:Cs};function $e({children:n,className:l,...t}){const s=[Z.menu,l].filter(Boolean).join(" ");return e.jsx("div",{...t,className:s,role:"menu",children:n})}$e.displayName="Menu";function Me({icon:n,kbd:l,active:t=!1,danger:s=!1,disabled:c=!1,children:a,className:i,...r}){const o=[Z.item,t?Z.active:null,s?Z.danger:null,c?Z.disabled:null,i].filter(Boolean).join(" ");return e.jsxs("button",{...r,type:"button",className:o,disabled:c,role:"menuitem",children:[n,a,l&&e.jsx("span",{className:Z.kbd,children:l})]})}Me.displayName="MenuItem";function Se({className:n,...l}){const t=[Z.separator,n].filter(Boolean).join(" ");return e.jsx("div",{...l,className:t,role:"separator"})}Se.displayName="MenuSeparator";const Is="_backdrop_pya14_1",$s="_modal_pya14_23",Ms="_header_pya14_37",Ss="_titleBlock_pya14_45",Ls="_title_pya14_45",Rs="_subtitle_pya14_58",Ts="_closeBtn_pya14_64",qs="_body_pya14_86",As="_footer_pya14_92",E={backdrop:Is,modal:$s,header:Ms,titleBlock:Ss,title:Ls,subtitle:Rs,closeBtn:Ts,body:qs,footer:As},Ds=()=>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"})}),Le=m.forwardRef(({open:n,title:l,subtitle:t,children:s,footer:c,closeOnBackdrop:a=!0,showCloseButton:i=!0,backdropProps:r,modalProps:o,headerProps:h,bodyProps:f,footerProps:j,closeButtonProps:g,onOpenChange:u,onClose:p},$)=>{const T=m.useRef(null);m.useImperativeHandle($,()=>T.current),m.useEffect(()=>{if(!n)return;const x=G=>{G.key==="Escape"&&N()};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[n]);const N=()=>{u==null||u(!1),p==null||p()},v=x=>{a&&x.target===x.currentTarget&&N()};if(!n)return null;const M=[E.backdrop,r==null?void 0:r.className].filter(Boolean).join(" "),F=[E.modal,o==null?void 0:o.className].filter(Boolean).join(" ");return e.jsx("div",{...r,className:M,onClick:v,role:"presentation",children:e.jsxs("div",{ref:T,...o,className:F,role:"dialog","aria-modal":"true",children:[(l||i)&&e.jsxs("header",{...h,className:[E.header,h==null?void 0:h.className].filter(Boolean).join(" "),children:[e.jsxs("div",{className:E.titleBlock,children:[l?e.jsx("div",{className:E.title,children:l}):null,t?e.jsx("div",{className:E.subtitle,children:t}):null]}),i&&e.jsx("button",{type:"button","aria-label":"Close",className:E.closeBtn,onClick:N,...g,children:(g==null?void 0:g.children)??e.jsx(Ds,{})})]}),e.jsx("section",{...f,className:[E.body,f==null?void 0:f.className].filter(Boolean).join(" "),children:s}),c&&e.jsx("footer",{...j,className:[E.footer,j==null?void 0:j.className].filter(Boolean).join(" "),children:c})]})})});Le.displayName="Modal";const Os="_wrapper_10d4l_1",Es="_pop_10d4l_8",Ws="_sideRight_10d4l_22",Fs="_sideTop_10d4l_27",zs="_arrow_10d4l_34",Vs="_head_10d4l_60",Xs="_title_10d4l_67",Gs="_closeBtn_10d4l_74",Us="_body_10d4l_105",W={wrapper:Os,pop:Es,sideRight:Ws,sideTop:Fs,arrow:zs,head:Vs,title:Xs,closeBtn:Gs,body:Us},Hs=()=>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 Re({open:n,defaultOpen:l=!1,title:t,children:s,trigger:c,side:a="bottom-start",showCloseButton:i=!0,onOpenChange:r,popProps:o}){const[h,f]=m.useState(l),j=n!==void 0,g=j?n:h,u=m.useRef(null);function p(v){j||f(v),r==null||r(v)}m.useEffect(()=>{function v(M){u.current&&!u.current.contains(M.target)&&p(!1)}return g&&document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[g]);const $=a.startsWith("top"),T=a.endsWith("end"),N=[W.pop,T?W.sideRight:null,$?W.sideTop:null,o==null?void 0:o.className].filter(Boolean).join(" ");return e.jsxs("div",{ref:u,className:W.wrapper,children:[c&&e.jsx("div",{onClick:()=>p(!g),style:{display:"inline-flex"},children:c}),g&&e.jsxs("div",{...o,className:N,children:[e.jsx("span",{className:W.arrow}),(t||i)&&e.jsxs("div",{className:W.head,children:[t&&e.jsx("span",{className:W.title,children:t}),i&&e.jsx("button",{type:"button",className:W.closeBtn,"aria-label":"Close",onClick:()=>p(!1),children:e.jsx(Hs,{})})]}),e.jsx("div",{className:W.body,children:s})]})]})}Re.displayName="Popover";const Ks="_group_1ltkm_1",Ys="_pb_1ltkm_11",Zs="_on_1ltkm_40",Js="_accent_1ltkm_45",Qs="_solo_1ltkm_50",Ps="_disabled_1ltkm_65",P={group:Ks,pb:Ys,on:Zs,accent:Js,solo:Qs,disabled:Ps};function Te({children:n,className:l,...t}){const s=[P.group,l].filter(Boolean).join(" ");return e.jsx("div",{...t,className:s,role:"group",children:n})}Te.displayName="PushButtonGroup";function qe({on:n=!1,accent:l=!1,solo:t=!1,icon:s,children:c,disabled:a=!1,className:i,...r}){const o=[P.pb,n?P.on:null,n&&l?P.accent:null,t?P.solo:null,a?P.disabled:null,i].filter(Boolean).join(" ");return e.jsxs("button",{...r,type:"button",className:o,disabled:a,children:[s,c]})}qe.displayName="PushButton";const en="_root_qhol4_1",tn="_field_qhol4_6",sn="_label_qhol4_12",nn="_labelMeta_qhol4_24",ln="_trigger_qhol4_33",on="_triggerOpen_qhol4_59",an="_triggerConnectedBottom_qhol4_64",cn="_triggerConnectedTop_qhol4_69",rn="_triggerValue_qhol4_74",dn="_triggerPlaceholder_qhol4_83",_n="_chevron_qhol4_85",un="_chevronOpen_qhol4_94",hn="_chips_qhol4_97",mn="_chip_qhol4_97",xn="_chipOverflow_qhol4_120",fn="_clearBtn_qhol4_123",jn="_popover_qhol4_143",gn="_popoverBottom_qhol4_154",vn="_popoverTop_qhol4_162",bn="_search_qhol4_181",kn="_searchIcon_qhol4_188",yn="_searchInput_qhol4_195",Nn="_list_qhol4_209",pn="_item_qhol4_217",wn="_itemAlignLeft_qhol4_230",Bn="_itemAlignCenter_qhol4_231",Cn="_itemAlignRight_qhol4_232",In="_itemActive_qhol4_235",$n="_itemDisabled_qhol4_243",Mn="_itemMeta_qhol4_245",Sn="_checkbox_qhol4_254",Ln="_checkboxChecked_qhol4_266",Rn="_checkIcon_qhol4_278",Tn="_emptyState_qhol4_299",qn="_popFooter_qhol4_307",An="_popFooterBtn_qhol4_317",_={root:en,field:tn,label:sn,labelMeta:nn,trigger:ln,triggerOpen:on,triggerConnectedBottom:an,triggerConnectedTop:cn,triggerValue:rn,triggerPlaceholder:dn,chevron:_n,chevronOpen:un,chips:hn,chip:mn,chipOverflow:xn,clearBtn:fn,popover:jn,popoverBottom:gn,popoverTop:vn,search:bn,searchIcon:kn,searchInput:yn,list:Nn,item:pn,itemAlignLeft:wn,itemAlignCenter:Bn,itemAlignRight:Cn,itemActive:In,itemDisabled:$n,itemMeta:Mn,checkbox:Sn,checkboxChecked:Ln,checkIcon:Rn,emptyState:Tn,popFooter:qn,popFooterBtn:An},Dn=()=>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"})}),fe=()=>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"})}),On=()=>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"})]}),ce=()=>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"})}),En=(n,l)=>{const t=l.trim().toLowerCase();return t?n.filter(s=>String(s.label).toLowerCase().includes(t)):n},Ae=m.forwardRef(({label:n,clearable:l=!1,defaultValue:t=null,disabled:s=!1,emptyLabel:c="No options found",filterOptions:a=En,isLoading:i=!1,loadingLabel:r="Loading...",multiple:o=!1,onSearchChange:h,onValueChange:f,options:j,optionsAlign:g="left",optionsPosition:u="bottom",placeholder:p="Select",searchable:$=!1,searchPlaceholder:T="Search...",showSelectedCount:N=!0,showClearAll:v=!0,showSelectedValues:M=!0,closeOnSelect:F,selectProps:x,value:G,className:U,...J},ee)=>{const[C,S]=m.useState(!1),[D,L]=m.useState(""),O=m.useRef(null),[H,Q]=oe(G,t,d=>{const y=j.filter(q=>Array.isArray(d)?d.includes(q.value):q.value===d);f==null||f(d,y)}),w=m.useMemo(()=>Array.isArray(H)?H:H?[H]:[],[H]),z=m.useMemo(()=>j.filter(d=>w.includes(d.value)),[j,w]),se=m.useMemo(()=>a(j,D),[a,j,D]);m.useEffect(()=>{if(!C)return;const d=y=>{O.current&&!O.current.contains(y.target)&&S(!1)};return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[C]);const te=d=>{L(d),h==null||h(d)},ne=d=>{if(!d.disabled){if(o){const y=w.includes(d.value)?w.filter(q=>q!==d.value):[...w,d.value];Q(y),F&&S(!1);return}Q(d.value),(F??!0)&&S(!1)}},b=()=>{Q(o?[]:null),te("")},K=()=>{if(w.length>0){b();return}Q(j.filter(d=>!d.disabled).map(d=>d.value))},Y=d=>{var y;(y=x==null?void 0:x.onClick)==null||y.call(x,d),!d.defaultPrevented&&!s&&S(q=>!q)},ze=d=>{var y;(y=x==null?void 0:x.onKeyDown)==null||y.call(x,d),!d.defaultPrevented&&((d.key==="Enter"||d.key===" ")&&(d.preventDefault(),S(q=>!q)),d.key==="Escape"&&S(!1))},_e=u==="top",Ve=[_.trigger,C?_.triggerOpen:null,C?_e?_.triggerConnectedTop:_.triggerConnectedBottom:null,x==null?void 0:x.className].filter(Boolean).join(" "),Xe=!o||M,Ge=o&&M&&z.length>0,ae=o,Ue=o&&(w.length>0||v),ue=Xe&&z.length>0,he=2,me=z.length-he,He=[_.root,U].filter(Boolean).join(" "),Ke={left:_.itemAlignLeft,center:_.itemAlignCenter,right:_.itemAlignRight}[g],xe=e.jsxs("div",{ref:O,...J,className:He,children:[e.jsxs("button",{...x,type:"button",className:Ve,disabled:s,"aria-haspopup":"listbox","aria-expanded":C,onClick:Y,onKeyDown:ze,children:[Ge?e.jsxs("div",{className:_.chips,children:[z.slice(0,he).map(d=>e.jsx("span",{className:_.chip,children:d.label},d.value)),me>0&&e.jsxs("span",{className:[_.chip,_.chipOverflow].join(" "),children:["+",me]})]}):e.jsx("span",{className:[_.triggerValue,ue?null:_.triggerPlaceholder].filter(Boolean).join(" "),children:ue?z.map(d=>d.label).join(", "):p}),l&&w.length>0&&e.jsx("button",{type:"button","aria-label":"Clear",className:_.clearBtn,disabled:s,onClick:d=>{d.stopPropagation(),b()},children:e.jsx(fe,{})}),e.jsx("span",{className:[_.chevron,C?_.chevronOpen:null].filter(Boolean).join(" "),children:e.jsx(Dn,{})})]}),C&&e.jsxs("div",{className:[_.popover,_e?_.popoverTop:_.popoverBottom].join(" "),role:"listbox","aria-multiselectable":o||void 0,children:[$&&e.jsxs("div",{className:_.search,children:[e.jsx("span",{className:_.searchIcon,children:e.jsx(On,{})}),e.jsx("input",{autoFocus:!0,value:D,placeholder:T,className:_.searchInput,onChange:d=>te(d.target.value)}),D&&e.jsx("button",{className:_.clearBtn,onClick:()=>te(""),children:e.jsx(fe,{})})]}),e.jsxs("ul",{className:[_.list,"sb"].join(" "),children:[i&&e.jsx("li",{className:_.emptyState,children:r}),!i&&se.length===0&&e.jsx("li",{className:_.emptyState,children:c}),!i&&se.map(d=>{const y=w.includes(d.value),q=[_.item,Ke,y?_.itemActive:null,d.disabled?_.itemDisabled:null].filter(Boolean).join(" ");return e.jsxs("li",{className:q,role:"option","aria-selected":y,onClick:()=>ne(d),children:[!ae&&g==="right"&&y&&e.jsx("span",{className:_.checkIcon,children:e.jsx(ce,{})}),ae?e.jsx("span",{className:[_.checkbox,y?_.checkboxChecked:null].filter(Boolean).join(" "),children:y&&e.jsx(ce,{})}):null,e.jsx("span",{children:d.label}),d.meta&&e.jsx("span",{className:_.itemMeta,children:d.meta}),!ae&&g!=="right"&&y&&e.jsx("span",{className:_.checkIcon,children:e.jsx(ce,{})})]},d.value)})]}),Ue&&(N||v)&&e.jsxs("div",{className:_.popFooter,children:[N&&e.jsxs("span",{children:[w.length," selected"]}),v&&e.jsx("button",{className:_.popFooterBtn,onClick:K,children:w.length>0?"Clear all":"Check all"})]})]})]});return n?e.jsxs("div",{className:_.field,children:[e.jsxs("label",{className:_.label,children:[n,o&&N&&w.length>0&&e.jsxs("span",{className:_.labelMeta,children:["· ",w.length," selected"]})]}),xe]}):xe});Ae.displayName="Select";const Wn="_ring_mxe7t_2",Fn="_spin_mxe7t_1",zn="_ringMuted_mxe7t_12",Vn="_sm_mxe7t_14",Xn="_md_mxe7t_15",Gn="_lg_mxe7t_16",Un="_onAccent_mxe7t_19",Hn="_dots_mxe7t_29",Kn="_dot_mxe7t_29",Yn="_dotPulse_mxe7t_1",Zn="_bar_mxe7t_52",Jn="_barFill_mxe7t_62",Qn="_barSlide_mxe7t_1",A={ring:Wn,spin:Fn,ringMuted:zn,sm:Vn,md:Xn,lg:Gn,onAccent:Un,dots:Hn,dot:Kn,dotPulse:Yn,bar:Zn,barFill:Jn,barSlide:Qn};function De({variant:n="ring",size:l="md",muted:t=!1,onAccent:s=!1,className:c,...a}){if(n==="dots"){const r=[A.dots,c].filter(Boolean).join(" ");return e.jsxs("span",{...a,className:r,role:"status","aria-label":"Loading",children:[e.jsx("span",{className:A.dot}),e.jsx("span",{className:A.dot}),e.jsx("span",{className:A.dot})]})}if(n==="bar"){const r=[A.bar,c].filter(Boolean).join(" ");return e.jsx("span",{...a,className:r,role:"status","aria-label":"Loading",children:e.jsx("span",{className:A.barFill})})}const i=[A.ring,A[l],t?A.ringMuted:null,s?A.onAccent:null,c].filter(Boolean).join(" ");return e.jsx("span",{...a,className:i,role:"status","aria-label":"Loading"})}De.displayName="Spinner";const Pn="_field_fazrx_1",el="_label_fazrx_7",tl="_wrapper_fazrx_16",sl="_textarea_fazrx_20",nl="_mono_fazrx_53",ll="_hasClear_fazrx_59",ol="_clearBtn_fazrx_62",al="_footer_fazrx_84",cl="_helpText_fazrx_92",il="_charCount_fazrx_94",rl="_charCountOver_fazrx_100",R={field:Pn,label:el,wrapper:tl,textarea:sl,mono:nl,hasClear:ll,clearBtn:ol,footer:al,helpText:cl,charCount:il,charCountOver:rl},dl=()=>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"})}),Oe=m.forwardRef(({label:n,helpText:l,maxLength:t,clearable:s=!1,mono:c=!1,value:a,defaultValue:i="",disabled:r,textareaProps:o,wrapperProps:h,fieldProps:f,clearButtonProps:j,onChange:g,onValueChange:u,className:p,style:$,...T},N)=>{const[v,M]=oe(a,i,L=>u==null?void 0:u(L)),F=L=>{var O;M(L.target.value),g==null||g(L),(O=o==null?void 0:o.onChange)==null||O.call(o,L)},x=()=>{M("")},G=t!==void 0&&v.length>t,U=[R.textarea,"sb",c?R.mono:null,s?R.hasClear:null,p,o==null?void 0:o.className].filter(Boolean).join(" "),J=[R.wrapper,h==null?void 0:h.className].filter(Boolean).join(" "),ee=[R.field,f==null?void 0:f.className].filter(Boolean).join(" "),C={...$,...o==null?void 0:o.style},S=r||(o==null?void 0:o.disabled),D=e.jsxs("div",{...h,className:J,children:[e.jsx("textarea",{...T,...o,ref:N,disabled:S,maxLength:t,value:v,onChange:F,className:U,style:C}),s&&e.jsx("button",{type:"button",className:R.clearBtn,disabled:S||v.length===0,"aria-label":"Clear",onClick:x,...j,children:(j==null?void 0:j.children)??e.jsx(dl,{})})]});return!n&&!l&&t===void 0?D:e.jsxs("div",{...f,className:ee,children:[n&&e.jsx("label",{className:R.label,children:n}),D,(l||t!==void 0)&&e.jsxs("div",{className:R.footer,children:[l&&e.jsx("span",{className:R.helpText,children:l}),t!==void 0&&e.jsxs("span",{className:[R.charCount,G?R.charCountOver:null].filter(Boolean).join(" "),children:[v.length," / ",t]})]})]})});Oe.displayName="Textarea";const _l="_toast_d6t69_1",ul="_slideUp_d6t69_1",hl="_toastExiting_d6t69_26",ml="_slideOut_d6t69_1",xl="_lead_d6t69_30",fl="_body_d6t69_37",jl="_title_d6t69_45",gl="_message_d6t69_51",vl="_closeBtn_d6t69_56",bl="_ok_d6t69_79",kl="_error_d6t69_82",yl="_warning_d6t69_85",Nl="_info_d6t69_88",pl="_stack_d6t69_92",X={toast:_l,slideUp:ul,toastExiting:hl,slideOut:ml,lead:xl,body:fl,title:jl,message:gl,closeBtn:vl,ok:bl,error:kl,warning:yl,info:Nl,stack:pl},wl=()=>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"})}),Ee=()=>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"})}),Bl=()=>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"})]}),Cl=()=>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"})]}),Il={ok:e.jsx(wl,{}),error:e.jsx(Ee,{}),warning:e.jsx(Bl,{}),info:e.jsx(Cl,{})};function de({variant:n="ok",title:l,message:t,onDismiss:s,className:c,...a}){const i=[X.toast,X[n],c].filter(Boolean).join(" ");return e.jsxs("div",{...a,className:i,role:"alert",children:[e.jsx("span",{className:X.lead,children:Il[n]}),e.jsxs("div",{className:X.body,children:[e.jsx("div",{className:X.title,children:l}),t&&e.jsx("div",{className:X.message,children:t})]}),s&&e.jsx("button",{type:"button",className:X.closeBtn,"aria-label":"Dismiss",onClick:s,children:e.jsx(Ee,{})})]})}de.displayName="Toast";const We=m.createContext(null);function $l({children:n}){const[l,t]=m.useState([]),s=m.useCallback(a=>{t(i=>i.filter(r=>r.id!==a))},[]),c=m.useCallback(a=>{const i=Math.random().toString(36).slice(2),r=a.duration??4e3;return t(o=>[...o,{...a,id:i}]),r>0&&setTimeout(()=>s(i),r),i},[s]);return e.jsxs(We.Provider,{value:{toast:c,dismiss:s},children:[n,typeof document<"u"&&Ye.createPortal(e.jsx("div",{className:X.stack,children:l.map(a=>e.jsx(de,{variant:a.variant,title:a.title,message:a.message,onDismiss:()=>s(a.id)},a.id))}),document.body)]})}function Ml(){const n=m.useContext(We);if(!n)throw new Error("useToast must be used within a ToastProvider");return n}const Sl="_wrapper_1pjxy_1",Ll="_tooltip_1pjxy_6",Rl="_fadeIn_1pjxy_1",Tl="_top_1pjxy_33",ql="_bottom_1pjxy_52",Al="_left_1pjxy_72",Dl="_right_1pjxy_94",Ol="_kbd_1pjxy_115",ie={wrapper:Sl,tooltip:Ll,fadeIn:Rl,top:Tl,bottom:ql,left:Al,right:Dl,kbd:Ol};function Fe({content:n,side:l="top",children:t,wrapperProps:s,disabled:c=!1}){const[a,i]=m.useState(!1);if(c)return e.jsx(e.Fragment,{children:t});const r=[ie.tooltip,ie[l]].filter(Boolean).join(" "),o=[ie.wrapper,s==null?void 0:s.className].filter(Boolean).join(" ");return e.jsxs("span",{...s,className:o,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),onFocus:()=>i(!0),onBlur:()=>i(!1),children:[t,a&&e.jsx("span",{className:r,role:"tooltip",children:n})]})}Fe.displayName="Tooltip";exports.Badge=je;exports.Button=ve;exports.Card=be;exports.CardHeader=ke;exports.CardStat=ye;exports.Checkbox=we;exports.Input=pe;exports.Menu=$e;exports.MenuItem=Me;exports.MenuSeparator=Se;exports.Modal=Le;exports.Popover=Re;exports.PushButton=qe;exports.PushButtonGroup=Te;exports.Radio=Be;exports.RadioGroup=Ce;exports.Scrollable=ge;exports.Select=Ae;exports.Spinner=De;exports.Switch=Ie;exports.Textarea=Oe;exports.Toast=de;exports.ToastProvider=$l;exports.Tooltip=Fe;exports.applyMask=Ne;exports.getRawMaskValue=re;exports.useControlledState=oe;exports.useToast=Ml;
|
|
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
|