@dnotrever2/super-kit 0.1.10 → 0.1.13

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 CHANGED
@@ -176,6 +176,7 @@ import { Input } from "@dnotrever2/super-kit";
176
176
  | `value` / `defaultValue` | `string` | `""` |
177
177
  | `onChange` | `ChangeEvent<HTMLInputElement>` | — |
178
178
  | `onValueChange` | `(change: { value, rawValue }) => void` | — |
179
+ | `inputProps` | `InputHTMLAttributes<HTMLInputElement>` | — |
179
180
  | `wrapperProps` | `HTMLAttributes<HTMLSpanElement>` | — |
180
181
  | `fieldProps` | `HTMLAttributes<HTMLDivElement>` | — |
181
182
 
@@ -418,6 +419,7 @@ const options = [
418
419
  | `showClearAll` | `boolean` | `true` |
419
420
  | `showSelectedValues` | `boolean` | `true` |
420
421
  | `closeOnSelect` | `boolean` | `true` single, `false` multi |
422
+ | `selectProps` | `ButtonHTMLAttributes<HTMLButtonElement>` | — |
421
423
  | `label` | `string` | — |
422
424
  | `onValueChange` | `(value, selectedOptions) => void` | — |
423
425
  | `filterOptions` | `(options, search) => options` | built-in case-insensitive |
@@ -488,6 +490,9 @@ import { Textarea } from "@dnotrever2/super-kit";
488
490
  | `mono` | `boolean` | `false` |
489
491
  | `value` / `defaultValue` | `string` | `""` |
490
492
  | `onValueChange` | `(value: string) => void` | — |
493
+ | `textareaProps` | `TextareaHTMLAttributes<HTMLTextAreaElement>` | — |
494
+ | `wrapperProps` | `HTMLAttributes<HTMLDivElement>` | — |
495
+ | `fieldProps` | `HTMLAttributes<HTMLDivElement>` | — |
491
496
 
492
497
  Forwards a `ref` to the underlying `<textarea>`.
493
498
 
@@ -534,7 +539,7 @@ function DeployButton() {
534
539
 
535
540
  ### Tooltip
536
541
 
537
- Hover/focus tooltip above or below a child element.
542
+ Hover/focus tooltip around a child element.
538
543
 
539
544
  ```tsx
540
545
  import { Tooltip } from "@dnotrever2/super-kit";
@@ -547,7 +552,7 @@ import { Tooltip } from "@dnotrever2/super-kit";
547
552
  | Prop | Type | Default |
548
553
  | -------------- | --------------------------------- | -------- |
549
554
  | `content` | `ReactNode` | required |
550
- | `side` | `"top" \| "bottom"` | `"top"` |
555
+ | `side` | `"top" \| "bottom" \| "left" \| "right"` | `"top"` |
551
556
  | `disabled` | `boolean` | `false` |
552
557
  | `wrapperProps` | `HTMLAttributes<HTMLSpanElement>` | — |
553
558
 
@@ -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>;
@@ -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>>;
@@ -1,5 +1,5 @@
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;
@@ -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"),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;
2
2
  //# sourceMappingURL=super-kit.cjs.map