trust-ui-react 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +654 -0
- package/dist/components/Avatar/Avatar.d.ts +17 -0
- package/dist/components/Avatar/index.d.ts +2 -0
- package/dist/components/Badge/Badge.d.ts +16 -0
- package/dist/components/Badge/index.d.ts +2 -0
- package/dist/components/Button/Button.d.ts +18 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/Checkbox/Checkbox.d.ts +22 -0
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/Chip/Chip.d.ts +22 -0
- package/dist/components/Chip/index.d.ts +2 -0
- package/dist/components/DatePicker/Calendar.d.ts +20 -0
- package/dist/components/DatePicker/DatePicker.d.ts +36 -0
- package/dist/components/DatePicker/index.d.ts +4 -0
- package/dist/components/DatePicker/utils.d.ts +20 -0
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +45 -0
- package/dist/components/DateRangePicker/index.d.ts +2 -0
- package/dist/components/Dialog/Dialog.d.ts +59 -0
- package/dist/components/Dialog/index.d.ts +2 -0
- package/dist/components/Expander/Expander.d.ts +63 -0
- package/dist/components/Expander/index.d.ts +2 -0
- package/dist/components/Menu/Menu.d.ts +60 -0
- package/dist/components/Menu/index.d.ts +2 -0
- package/dist/components/Pagination/Pagination.d.ts +25 -0
- package/dist/components/Pagination/index.d.ts +2 -0
- package/dist/components/Progress/Progress.d.ts +17 -0
- package/dist/components/Progress/index.d.ts +2 -0
- package/dist/components/Radio/Radio.d.ts +14 -0
- package/dist/components/Radio/RadioContext.d.ts +9 -0
- package/dist/components/Radio/RadioGroup.d.ts +27 -0
- package/dist/components/Radio/index.d.ts +4 -0
- package/dist/components/Select/Select.d.ts +38 -0
- package/dist/components/Select/index.d.ts +2 -0
- package/dist/components/Slider/Slider.d.ts +27 -0
- package/dist/components/Slider/index.d.ts +2 -0
- package/dist/components/Switch/Switch.d.ts +21 -0
- package/dist/components/Switch/index.d.ts +2 -0
- package/dist/components/Table/Table.d.ts +43 -0
- package/dist/components/Table/index.d.ts +2 -0
- package/dist/components/Tabs/Tabs.d.ts +63 -0
- package/dist/components/Tabs/index.d.ts +2 -0
- package/dist/components/TextField/TextField.d.ts +46 -0
- package/dist/components/TextField/formatters.d.ts +31 -0
- package/dist/components/TextField/index.d.ts +2 -0
- package/dist/components/Toast/Toast.d.ts +24 -0
- package/dist/components/Toast/index.d.ts +2 -0
- package/dist/components/Tooltip/Tooltip.d.ts +21 -0
- package/dist/components/Tooltip/index.d.ts +2 -0
- package/dist/hooks/useTheme.d.ts +2 -0
- package/dist/hooks/useToast.d.ts +2 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.d.ts +51 -0
- package/dist/index.es.js +3029 -0
- package/dist/providers/ThemeProvider.d.ts +14 -0
- package/dist/providers/ToastProvider.d.ts +24 -0
- package/dist/styles.css +1 -0
- package/package.json +56 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
export interface Column<T> {
|
|
3
|
+
/** Property key to access in row data */
|
|
4
|
+
key: string;
|
|
5
|
+
/** Column header text */
|
|
6
|
+
header: string;
|
|
7
|
+
/** Custom cell renderer */
|
|
8
|
+
render?: (value: any, row: T, index: number) => ReactNode;
|
|
9
|
+
/** Enable sorting for this column */
|
|
10
|
+
sortable?: boolean;
|
|
11
|
+
/** Fixed column width */
|
|
12
|
+
width?: string | number;
|
|
13
|
+
/** Text alignment */
|
|
14
|
+
align?: 'left' | 'center' | 'right';
|
|
15
|
+
}
|
|
16
|
+
export interface TableProps<T> {
|
|
17
|
+
/** Column definitions */
|
|
18
|
+
columns: Column<T>[];
|
|
19
|
+
/** Data rows */
|
|
20
|
+
data: T[];
|
|
21
|
+
/** Visual variant (default: 'default') */
|
|
22
|
+
variant?: 'default' | 'striped' | 'bordered';
|
|
23
|
+
/** Size preset (default: 'md') */
|
|
24
|
+
size?: 'sm' | 'md' | 'lg';
|
|
25
|
+
/** Sticky header on scroll (default: false) */
|
|
26
|
+
stickyHeader?: boolean;
|
|
27
|
+
/** Highlight rows on hover (default: true) */
|
|
28
|
+
hoverable?: boolean;
|
|
29
|
+
/** Text shown when data is empty */
|
|
30
|
+
emptyText?: string;
|
|
31
|
+
/** Row click handler */
|
|
32
|
+
onRowClick?: (row: T, index: number) => void;
|
|
33
|
+
/** Key extractor for row identity */
|
|
34
|
+
rowKey?: string | ((row: T) => string);
|
|
35
|
+
/** Additional CSS class name */
|
|
36
|
+
className?: string;
|
|
37
|
+
/** Additional inline styles */
|
|
38
|
+
style?: CSSProperties;
|
|
39
|
+
}
|
|
40
|
+
export declare function Table<T extends Record<string, any>>({ columns, data, variant, size, stickyHeader, hoverable, emptyText, onRowClick, rowKey, className, style, }: TableProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
export declare namespace Table {
|
|
42
|
+
var displayName: string;
|
|
43
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
export interface TabsProps {
|
|
3
|
+
/** Initial active tab (uncontrolled mode) */
|
|
4
|
+
defaultValue?: string;
|
|
5
|
+
/** Active tab value (controlled mode) */
|
|
6
|
+
value?: string;
|
|
7
|
+
/** Callback when active tab changes */
|
|
8
|
+
onChange?: (value: string) => void;
|
|
9
|
+
/** Visual variant (default: 'underline') */
|
|
10
|
+
variant?: 'underline' | 'pill';
|
|
11
|
+
/** Children */
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
/** Additional CSS class name */
|
|
14
|
+
className?: string;
|
|
15
|
+
/** Additional inline styles */
|
|
16
|
+
style?: CSSProperties;
|
|
17
|
+
}
|
|
18
|
+
declare function TabsRoot({ defaultValue, value, onChange, variant, children, className, style, }: TabsProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare namespace TabsRoot {
|
|
20
|
+
var displayName: string;
|
|
21
|
+
}
|
|
22
|
+
interface TabsListProps {
|
|
23
|
+
/** Tab triggers */
|
|
24
|
+
children: ReactNode;
|
|
25
|
+
/** Additional CSS class name */
|
|
26
|
+
className?: string;
|
|
27
|
+
}
|
|
28
|
+
declare function TabsList({ children, className }: TabsListProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
declare namespace TabsList {
|
|
30
|
+
var displayName: string;
|
|
31
|
+
}
|
|
32
|
+
interface TabsTriggerProps {
|
|
33
|
+
/** Value that identifies this tab */
|
|
34
|
+
value: string;
|
|
35
|
+
/** Disable the trigger */
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
/** Trigger label */
|
|
38
|
+
children: ReactNode;
|
|
39
|
+
/** Additional CSS class name */
|
|
40
|
+
className?: string;
|
|
41
|
+
}
|
|
42
|
+
declare function TabsTrigger({ value, disabled, children, className }: TabsTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
declare namespace TabsTrigger {
|
|
44
|
+
var displayName: string;
|
|
45
|
+
}
|
|
46
|
+
interface TabsContentProps {
|
|
47
|
+
/** Value that identifies which tab this content belongs to */
|
|
48
|
+
value: string;
|
|
49
|
+
/** Panel content */
|
|
50
|
+
children: ReactNode;
|
|
51
|
+
/** Additional CSS class name */
|
|
52
|
+
className?: string;
|
|
53
|
+
}
|
|
54
|
+
declare function TabsContent({ value, children, className }: TabsContentProps): import("react/jsx-runtime").JSX.Element | null;
|
|
55
|
+
declare namespace TabsContent {
|
|
56
|
+
var displayName: string;
|
|
57
|
+
}
|
|
58
|
+
export declare const Tabs: typeof TabsRoot & {
|
|
59
|
+
List: typeof TabsList;
|
|
60
|
+
Trigger: typeof TabsTrigger;
|
|
61
|
+
Content: typeof TabsContent;
|
|
62
|
+
};
|
|
63
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { InputHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
type InputBaseProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'prefix' | 'type'>;
|
|
3
|
+
export interface TextFieldProps extends InputBaseProps {
|
|
4
|
+
/** Input type */
|
|
5
|
+
type?: 'text' | 'tel' | 'password' | 'number' | 'email' | 'url' | 'search';
|
|
6
|
+
/** Visual variant */
|
|
7
|
+
variant?: 'outlined' | 'filled';
|
|
8
|
+
/** Size of the field */
|
|
9
|
+
size?: 'sm' | 'md' | 'lg';
|
|
10
|
+
/** Shape of the input border */
|
|
11
|
+
shape?: 'square' | 'rounded' | 'pill';
|
|
12
|
+
/** Label displayed above the input */
|
|
13
|
+
label?: string;
|
|
14
|
+
/** Placeholder text */
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
/** Helper text displayed below the input */
|
|
17
|
+
helperText?: string;
|
|
18
|
+
/** Whether the field is in error state */
|
|
19
|
+
error?: boolean;
|
|
20
|
+
/** Error message displayed below the input */
|
|
21
|
+
errorMessage?: string;
|
|
22
|
+
/** Whether the field is disabled */
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
/** Stretches the field to fill its container */
|
|
25
|
+
fullWidth?: boolean;
|
|
26
|
+
/** Renders a textarea instead of input */
|
|
27
|
+
multiline?: boolean;
|
|
28
|
+
/** Number of rows for textarea */
|
|
29
|
+
rows?: number;
|
|
30
|
+
/** Auto-formatting for number type */
|
|
31
|
+
format?: 'currency' | 'decimal';
|
|
32
|
+
/** Callback with unformatted value */
|
|
33
|
+
onValueChange?: (rawValue: string) => void;
|
|
34
|
+
/** Content before the input */
|
|
35
|
+
prefix?: ReactNode;
|
|
36
|
+
/** Content after the input */
|
|
37
|
+
suffix?: ReactNode;
|
|
38
|
+
/** Maximum character count (shows counter) */
|
|
39
|
+
maxLength?: number;
|
|
40
|
+
/** Additional CSS class */
|
|
41
|
+
className?: string;
|
|
42
|
+
/** Inline styles */
|
|
43
|
+
style?: React.CSSProperties;
|
|
44
|
+
}
|
|
45
|
+
export declare const TextField: import('react').ForwardRefExoticComponent<TextFieldProps & import('react').RefAttributes<HTMLInputElement | HTMLTextAreaElement>>;
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Strip all non-digit characters from a string.
|
|
3
|
+
*/
|
|
4
|
+
export declare function stripNonDigits(value: string): string;
|
|
5
|
+
/**
|
|
6
|
+
* Format a phone number string as Korean mobile format: 010-1234-5678.
|
|
7
|
+
* Accepts raw digits and progressively formats them (3-4-4 pattern).
|
|
8
|
+
*/
|
|
9
|
+
export declare function formatTel(value: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* Extract raw digits from a formatted telephone string.
|
|
12
|
+
*/
|
|
13
|
+
export declare function unformatTel(value: string): string;
|
|
14
|
+
/**
|
|
15
|
+
* Format integer digits with comma separators: 1234567 -> 1,234,567.
|
|
16
|
+
* Strips non-digit characters.
|
|
17
|
+
*/
|
|
18
|
+
export declare function formatCurrency(value: string): string;
|
|
19
|
+
/**
|
|
20
|
+
* Extract raw numeric string from a currency-formatted value.
|
|
21
|
+
*/
|
|
22
|
+
export declare function unformatCurrency(value: string): string;
|
|
23
|
+
/**
|
|
24
|
+
* Format a decimal number string with commas on the integer part.
|
|
25
|
+
* Allows a single decimal point and preserves the decimal portion.
|
|
26
|
+
*/
|
|
27
|
+
export declare function formatDecimal(value: string): string;
|
|
28
|
+
/**
|
|
29
|
+
* Extract raw numeric string from a decimal-formatted value.
|
|
30
|
+
*/
|
|
31
|
+
export declare function unformatDecimal(value: string): string;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
export type ToastVariant = 'success' | 'danger' | 'warning' | 'info';
|
|
3
|
+
export interface ToastProps {
|
|
4
|
+
/** Unique identifier for the toast */
|
|
5
|
+
id: string;
|
|
6
|
+
/** Visual variant */
|
|
7
|
+
variant: ToastVariant;
|
|
8
|
+
/** Main message text */
|
|
9
|
+
message: string;
|
|
10
|
+
/** Optional description below the message */
|
|
11
|
+
description?: string;
|
|
12
|
+
/** Auto-dismiss duration in milliseconds (default: 4000) */
|
|
13
|
+
duration?: number;
|
|
14
|
+
/** Callback when toast is closed */
|
|
15
|
+
onClose?: () => void;
|
|
16
|
+
/** Additional CSS class name */
|
|
17
|
+
className?: string;
|
|
18
|
+
/** Additional inline styles */
|
|
19
|
+
style?: CSSProperties;
|
|
20
|
+
}
|
|
21
|
+
export declare function Toast({ variant, message, description, duration, onClose, className, style, }: ToastProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare namespace Toast {
|
|
23
|
+
var displayName: string;
|
|
24
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
export interface TooltipProps {
|
|
3
|
+
/** Content to display inside the tooltip */
|
|
4
|
+
content: ReactNode;
|
|
5
|
+
/** Placement relative to the trigger (default: 'top') */
|
|
6
|
+
placement?: 'top' | 'bottom' | 'left' | 'right';
|
|
7
|
+
/** Visual variant (default: 'dark') */
|
|
8
|
+
variant?: 'dark' | 'light';
|
|
9
|
+
/** Delay in milliseconds before showing (default: 200) */
|
|
10
|
+
delay?: number;
|
|
11
|
+
/** Maximum width in pixels (default: 250) */
|
|
12
|
+
maxWidth?: number;
|
|
13
|
+
/** Trigger element */
|
|
14
|
+
children: ReactElement;
|
|
15
|
+
/** Additional CSS class name */
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function Tooltip({ content, placement, variant, delay, maxWidth, children, className, }: TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare namespace Tooltip {
|
|
20
|
+
var displayName: string;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("react"),Re=require("react-dom"),Ve=r.createContext(null);function Bt({defaultTheme:t,children:s}){const[n,o]=r.useState(()=>t||(typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light")),l=r.useCallback(c=>{o(c),document.documentElement.setAttribute("data-theme",c)},[]),d=r.useCallback(()=>{l(n==="light"?"dark":"light")},[n,l]);return r.useEffect(()=>{document.documentElement.setAttribute("data-theme",n)},[n]),e.jsx(Ve.Provider,{value:{theme:n,setTheme:l,toggleTheme:d},children:s})}const St="_toast_5o6tq_2",Dt="_slideIn_5o6tq_1",Mt="_exiting_5o6tq_17",Et="_slideOut_5o6tq_1",Lt="_success_5o6tq_22",Tt="_danger_5o6tq_28",zt="_warning_5o6tq_34",Wt="_info_5o6tq_40",qt="_icon_5o6tq_47",Ot="_body_5o6tq_80",Pt="_message_5o6tq_85",At="_description_5o6tq_92",Yt="_closeButton_5o6tq_99",Ht="_container_5o6tq_127",Ft="_topRight_5o6tq_138",Vt="_topLeft_5o6tq_144",Kt="_topCenter_5o6tq_150",Gt="_bottomRight_5o6tq_157",Ut="_bottomLeft_5o6tq_163",Xt="_bottomCenter_5o6tq_169",Qt="_slideInLeft_5o6tq_1",Jt="_slideInCenter_5o6tq_1",se={toast:St,slideIn:Dt,exiting:Mt,slideOut:Et,success:Lt,danger:Tt,warning:zt,info:Wt,icon:qt,body:Ot,message:Pt,description:At,closeButton:Yt,container:Ht,topRight:Ft,topLeft:Vt,topCenter:Kt,bottomRight:Gt,bottomLeft:Ut,bottomCenter:Xt,slideInLeft:Qt,slideInCenter:Jt},Zt={success:"✓",danger:"✕",warning:"⚠",info:"ℹ"};function We({variant:t,message:s,description:n,duration:o=4e3,onClose:l,className:d,style:c}){const a=r.useRef(void 0);r.useEffect(()=>(o>0&&(a.current=setTimeout(()=>{l==null||l()},o)),()=>{a.current&&clearTimeout(a.current)}),[o,l]);const i=[se.toast,se[t],d].filter(Boolean).join(" ");return e.jsxs("div",{role:"alert",className:i,style:c,children:[e.jsx("span",{className:se.icon,"aria-hidden":"true",children:Zt[t]}),e.jsxs("div",{className:se.body,children:[e.jsx("p",{className:se.message,children:s}),n&&e.jsx("p",{className:se.description,children:n})]}),e.jsx("button",{type:"button",className:se.closeButton,onClick:l,"aria-label":"Close notification",children:"✕"})]})}We.displayName="Toast";const Ke=r.createContext(null);let en=0;const tn={"top-right":se.topRight,"top-left":se.topLeft,"top-center":se.topCenter,"bottom-right":se.bottomRight,"bottom-left":se.bottomLeft,"bottom-center":se.bottomCenter};function nn({position:t="top-right",children:s}){const[n,o]=r.useState([]),l=r.useCallback(i=>{o(_=>_.filter(u=>u.id!==i))},[]),d=r.useCallback(()=>{o([])},[]),c=r.useCallback(i=>{const _=`toast-${++en}`;return o(u=>[...u,{...i,id:_}]),_},[]),a=[se.container,tn[t]].filter(Boolean).join(" ");return e.jsxs(Ke.Provider,{value:{toast:c,dismiss:l,dismissAll:d},children:[s,typeof document<"u"&&Re.createPortal(e.jsx("div",{className:a,children:n.map(i=>e.jsx(We,{id:i.id,variant:i.variant,message:i.message,description:i.description,duration:i.duration,onClose:()=>l(i.id)},i.id))}),document.body)]})}function sn(){const t=r.useContext(Ve);if(!t)throw new Error("useTheme must be used within a ThemeProvider");return t}function rn(){const t=r.useContext(Ke);if(!t)throw new Error("useToast must be used within a ToastProvider");return t}const on="_button_atqt9_2",an="_sm_atqt9_32",ln="_md_atqt9_38",cn="_lg_atqt9_44",dn="_primary_atqt9_51",un="_secondary_atqt9_64",_n="_outline_atqt9_77",pn="_ghost_atqt9_92",fn="_danger_atqt9_105",hn="_square_atqt9_119",mn="_rounded_atqt9_123",gn="_pill_atqt9_127",bn="_fullWidth_atqt9_132",yn="_icon_atqt9_137",xn="_label_atqt9_145",vn="_spinner_atqt9_151",jn="_spin_atqt9_151",kn="_loading_atqt9_161",ue={button:on,sm:an,md:ln,lg:cn,primary:dn,secondary:un,outline:_n,ghost:pn,danger:fn,square:hn,rounded:mn,pill:gn,fullWidth:bn,icon:yn,label:xn,spinner:vn,spin:jn,loading:kn},Ge=r.forwardRef(({variant:t="primary",size:s="md",shape:n="square",loading:o=!1,disabled:l=!1,startIcon:d,endIcon:c,fullWidth:a=!1,className:i,style:_,children:u,...f},C)=>{const x=[ue.button,ue[t],ue[s],ue[n],a?ue.fullWidth:"",o?ue.loading:"",i??""].filter(Boolean).join(" ");return e.jsxs("button",{ref:C,className:x,disabled:l||o,style:_,...f,children:[o&&e.jsx("span",{className:ue.spinner,"aria-hidden":"true"}),!o&&d&&e.jsx("span",{className:ue.icon,children:d}),u&&e.jsx("span",{className:ue.label,children:u}),!o&&c&&e.jsx("span",{className:ue.icon,children:c})]})});Ge.displayName="Button";const wn="_badge_brd92_2",Nn="_sm_brd92_15",$n="_md_brd92_22",Cn="_dot_brd92_30",Rn="_primary_brd92_39",In="_secondary_brd92_44",Bn="_success_brd92_49",Sn="_danger_brd92_54",Dn="_warning_brd92_59",Mn="_info_brd92_64",Me={badge:wn,sm:Nn,md:$n,dot:Cn,primary:Rn,secondary:In,success:Bn,danger:Sn,warning:Dn,info:Mn};function En({variant:t="primary",size:s="md",dot:n=!1,children:o,className:l,style:d}){const c=[Me.badge,Me[t],Me[s],n?Me.dot:"",l??""].filter(Boolean).join(" ");return e.jsx("span",{className:c,style:d,children:!n&&o})}const Ln="_avatar_zquny_2",Tn="_sm_zquny_12",zn="_md_zquny_18",Wn="_lg_zquny_24",qn="_circle_zquny_31",On="_square_zquny_35",Pn="_image_zquny_40",An="_fallback_zquny_47",Yn="_initials_zquny_53",$e={avatar:Ln,sm:Tn,md:zn,lg:Wn,circle:qn,square:On,image:Pn,fallback:An,initials:Yn};function Hn(t){var n;const s=t.trim().split(/\s+/);return s.length>=2?(s[0][0]+s[1][0]).toUpperCase():(((n=s[0])==null?void 0:n[0])??"").toUpperCase()}function Fn(){return e.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:"60%",height:"60%","aria-hidden":"true",children:e.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"})})}function Vn({src:t,alt:s="",name:n,shape:o="circle",size:l="md",className:d,style:c}){const[a,i]=r.useState(!1),_=t&&!a,u=n?Hn(n):"",f=[$e.avatar,$e[l],$e[o],_?"":$e.fallback,d??""].filter(Boolean).join(" ");return e.jsx("span",{className:f,style:c,role:"img","aria-label":s||n||"avatar",children:_?e.jsx("img",{className:$e.image,src:t,alt:s,onError:()=>i(!0)}):u?e.jsx("span",{className:$e.initials,"aria-hidden":"true",children:u}):e.jsx(Fn,{})})}const Kn="_chip_1w25s_2",Gn="_sm_1w25s_20",Un="_md_1w25s_26",Xn="_clickable_1w25s_33",Qn="_filled_1w25s_44",Jn="_primary_1w25s_44",Zn="_secondary_1w25s_53",es="_success_1w25s_62",ts="_danger_1w25s_71",ns="_outlined_1w25s_81",ss="_icon_1w25s_122",rs="_label_1w25s_130",os="_deleteButton_1w25s_136",ge={chip:Kn,sm:Gn,md:Un,clickable:Xn,filled:Qn,primary:Jn,secondary:Zn,success:es,danger:ts,outlined:ns,icon:ss,label:rs,deleteButton:os};function as(){return e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",width:"14",height:"14","aria-hidden":"true",children:e.jsx("path",{d:"M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z"})})}function is({variant:t="filled",color:s="primary",size:n="md",onDelete:o,onClick:l,startIcon:d,children:c,className:a,style:i}){const _=[ge.chip,ge[t],ge[s],ge[n],l?ge.clickable:"",a??""].filter(Boolean).join(" "),u=f=>{l&&(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),l())};return e.jsxs("span",{className:_,style:i,role:l?"button":void 0,tabIndex:l?0:void 0,onClick:l,onKeyDown:l?u:void 0,children:[d&&e.jsx("span",{className:ge.icon,children:d}),e.jsx("span",{className:ge.label,children:c}),o&&e.jsx("button",{type:"button",className:ge.deleteButton,onClick:f=>{f.stopPropagation(),o()},"aria-label":"Remove",children:e.jsx(as,{})})]})}const ls="_wrapper_ic6yn_2",cs="_progress_ic6yn_10",ds="_sm_ic6yn_22",us="_md_ic6yn_26",_s="_lg_ic6yn_30",ps="_primary_ic6yn_53",fs="_secondary_ic6yn_57",hs="_success_ic6yn_61",ms="_danger_ic6yn_65",gs="_indeterminate_ic6yn_87",bs="_label_ic6yn_143",Ce={wrapper:ls,progress:cs,sm:ds,md:us,lg:_s,primary:ps,secondary:fs,success:hs,danger:ms,indeterminate:gs,label:bs};function ys({value:t=0,variant:s="primary",size:n="md",indeterminate:o=!1,showLabel:l=!1,className:d,style:c}){const a=Math.min(100,Math.max(0,t)),i=[Ce.wrapper,d??""].filter(Boolean).join(" "),_=[Ce.progress,Ce[s],Ce[n],o?Ce.indeterminate:""].filter(Boolean).join(" ");return e.jsxs("div",{className:i,style:c,children:[e.jsx("progress",{className:_,value:o?void 0:a,max:100,"aria-valuenow":o?void 0:a,"aria-valuemin":0,"aria-valuemax":100}),l&&!o&&e.jsxs("span",{className:Ce.label,children:[Math.round(a),"%"]})]})}const xs="_container_y7b56_2",vs="_fullWidth_y7b56_10",js="_label_y7b56_15",ks="_labelError_y7b56_23",ws="_labelDisabled_y7b56_27",Ns="_shape_square_y7b56_32",$s="_shape_square_y7b56_32",Cs="_inputWrapper_y7b56_32",Rs="_shape_rounded_y7b56_36",Is="_shape_rounded_y7b56_36",Bs="_shape_pill_y7b56_40",Ss="_shape_pill_y7b56_40",Ds="_inputWrapperMultiline_y7b56_55",Ms="_outlined_y7b56_60",Es="_disabled_y7b56_65",Ls="_error_y7b56_65",Ts="_focused_y7b56_69",zs="_filled_y7b56_75",Ws="_sm_y7b56_106",qs="_input_y7b56_32",Os="_md_y7b56_112",Ps="_lg_y7b56_118",As="_textarea_y7b56_146",Ys="_prefix_y7b56_183",Hs="_suffix_y7b56_199",Fs="_visibilityToggle_y7b56_216",Vs="_helperText_y7b56_239",Ks="_errorMessage_y7b56_245",Gs="_characterCount_y7b56_252",Us="_characterCountOver_y7b56_258",Xs="_footer_y7b56_263",Y={container:xs,fullWidth:vs,label:js,labelError:ks,labelDisabled:ws,shape_square:Ns,shapeSquare:$s,inputWrapper:Cs,shape_rounded:Rs,shapeRounded:Is,shape_pill:Bs,shapePill:Ss,inputWrapperMultiline:Ds,outlined:Ms,disabled:Es,error:Ls,focused:Ts,filled:zs,sm:Ws,input:qs,md:Os,lg:Ps,textarea:As,prefix:Ys,suffix:Hs,visibilityToggle:Fs,helperText:Vs,errorMessage:Ks,characterCount:Gs,characterCountOver:Us,footer:Xs};function Ee(t){return t.replace(/\D/g,"")}function Qs(t){const s=Ee(t).slice(0,11);return s.length<=3?s:s.length<=7?`${s.slice(0,3)}-${s.slice(3)}`:`${s.slice(0,3)}-${s.slice(3,7)}-${s.slice(7)}`}function Js(t){return Ee(t)}function Zs(t){const s=Ee(t);return s?Number(s).toLocaleString("en-US"):""}function er(t){return Ee(t)}function tr(t){const s=t.replace(/[^\d.]/g,""),n=s.split("."),o=n[0]??"",l=n.length>1?n[1]:void 0,d=o?Number(o).toLocaleString("en-US"):"";return l!==void 0?`${d}.${l}`:s.endsWith(".")?`${d}.`:d}function nr(t){return t.replace(/,/g,"")}function sr(){return e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[e.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),e.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}function rr(){return e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[e.jsx("path",{d:"M17.94 17.94A10.07 10.07 0 0112 20c-7 0-11-8-11-8a18.45 18.45 0 015.06-5.94M9.9 4.24A9.12 9.12 0 0112 4c7 0 11 8 11 8a18.5 18.5 0 01-2.16 3.19m-6.72-1.07a3 3 0 11-4.24-4.24"}),e.jsx("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]})}const Ue=r.forwardRef(({type:t="text",variant:s="outlined",size:n="md",shape:o="square",label:l,placeholder:d,helperText:c,error:a=!1,errorMessage:i,disabled:_=!1,fullWidth:u=!1,multiline:f=!1,rows:C=3,format:x,onValueChange:j,prefix:v,suffix:g,maxLength:I,className:p,style:R,value:b,defaultValue:h,onChange:m,...k},$)=>{const[B,q]=r.useState(!1),[A,Q]=r.useState(!1),[z,L]=r.useState(h??""),G=b!==void 0,O=G?String(b):z,K=r.useRef(null),ae=r.useCallback(P=>{K.current=P,typeof $=="function"?$(P):$&&($.current=P)},[$]),V=t==="tel"||x==="currency"||x==="decimal",U=r.useCallback(P=>t==="tel"?Qs(P):x==="currency"?Zs(P):x==="decimal"?tr(P):P,[t,x]),ie=r.useCallback(P=>t==="tel"?Js(P):x==="currency"?er(P):x==="decimal"?nr(P):P,[t,x]),le=r.useRef(null);r.useEffect(()=>{le.current!==null&&K.current&&V&&(K.current.setSelectionRange(le.current,le.current),le.current=null)});const ce=P=>{const me=P.target.value;if(V&&!f){const Ne=ie(me),xe=U(Ne),D=P.target.selectionStart??0,y=xe.length-me.length;le.current=Math.max(0,D+y),G||L(xe),j==null||j(Ne);const T={...P,target:{...P.target,value:xe}};m==null||m(T)}else G||L(me),j==null||j(me),m==null||m(P)},oe=V&&!f?U(G?ie(O):O):O;r.useEffect(()=>{!G&&V&&h&&L(U(String(h)))},[]);const de=(ie(oe)||"").length,he=V?"text":t==="password"&&A||t==="tel"?"text":t,X=a||!!i,N=[Y.container,u?Y.fullWidth:"",p??""].filter(Boolean).join(" "),W=[Y.inputWrapper,Y[s],Y[n],Y[`shape_${o}`],B?Y.focused:"",X?Y.error:"",_?Y.disabled:"",f?Y.inputWrapperMultiline:""].filter(Boolean).join(" "),S=[Y.label,X?Y.labelError:"",_?Y.labelDisabled:""].filter(Boolean).join(" "),F=t==="password"?e.jsx("button",{type:"button",className:Y.visibilityToggle,onClick:()=>Q(P=>!P),tabIndex:-1,"aria-label":A?"Hide password":"Show password",children:A?e.jsx(rr,{}):e.jsx(sr,{})}):null,we=g??F;return e.jsxs("div",{className:N,style:R,children:[l&&e.jsx("label",{className:S,children:l}),e.jsxs("div",{className:W,children:[v&&e.jsx("span",{className:Y.prefix,children:v}),f?e.jsx("textarea",{ref:$,className:Y.textarea,placeholder:d,disabled:_,rows:C,maxLength:I,value:G?O:z,onChange:ce,onFocus:()=>q(!0),onBlur:()=>q(!1),"aria-invalid":X||void 0,"aria-describedby":i?"error-msg":c?"helper-text":void 0,...k}):e.jsx("input",{ref:ae,className:Y.input,type:he,placeholder:d,disabled:_,maxLength:V?void 0:I,value:oe,onChange:ce,onFocus:()=>q(!0),onBlur:()=>q(!1),"aria-invalid":X||void 0,"aria-describedby":i?"error-msg":c?"helper-text":void 0,...k}),we&&e.jsx("span",{className:Y.suffix,children:we})]}),e.jsxs("div",{className:Y.footer,children:[e.jsxs("div",{children:[i&&e.jsx("p",{className:Y.errorMessage,id:"error-msg",role:"alert",children:i}),!i&&c&&e.jsx("p",{className:Y.helperText,id:"helper-text",children:c})]}),I!==void 0&&e.jsxs("span",{className:[Y.characterCount,de>I?Y.characterCountOver:""].filter(Boolean).join(" "),children:[de,"/",I]})]})]})});Ue.displayName="TextField";const or="_container_jptr3_2",ar="_disabled_jptr3_11",ir="_hiddenInput_jptr3_17",lr="_indicator_jptr3_30",cr="_primary_jptr3_57",dr="_secondary_jptr3_68",ur="_indeterminate_jptr3_79",_r="_checkIcon_jptr3_91",pr="_checked_jptr3_105",fr="_dashIcon_jptr3_110",hr="_label_jptr3_125",_e={container:or,disabled:ar,hiddenInput:ir,indicator:lr,primary:cr,secondary:dr,indeterminate:ur,checkIcon:_r,checked:pr,dashIcon:fr,label:hr};function mr(){return e.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e.jsx("polyline",{points:"20 6 9 17 4 12"})})}function gr(){return e.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round","aria-hidden":"true",children:e.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})})}const Xe=r.forwardRef(({checked:t,defaultChecked:s,indeterminate:n=!1,onChange:o,variant:l="primary",label:d,disabled:c=!1,className:a,style:i,..._},u)=>{const f=r.useRef(null),C=r.useCallback(g=>{f.current=g,typeof u=="function"?u(g):u&&(u.current=g)},[u]);r.useEffect(()=>{f.current&&(f.current.indeterminate=n)},[n]);const x=t??!1,j=[_e.container,c?_e.disabled:"",a??""].filter(Boolean).join(" "),v=[_e.indicator,_e[l],n?_e.indeterminate:"",!n&&(t!==void 0&&x)?_e.checked:""].filter(Boolean).join(" ");return e.jsxs("label",{className:j,style:i,children:[e.jsx("input",{ref:C,type:"checkbox",className:_e.hiddenInput,checked:t,defaultChecked:s,onChange:o,disabled:c,..._}),e.jsxs("span",{className:v,children:[e.jsx("span",{className:_e.checkIcon,children:e.jsx(mr,{})}),e.jsx("span",{className:_e.dashIcon,children:e.jsx(gr,{})})]}),d&&e.jsx("span",{className:_e.label,children:d})]})});Xe.displayName="Checkbox";const br="_container_1rpyd_2",yr="_disabled_1rpyd_11",xr="_hiddenInput_1rpyd_17",vr="_indicator_1rpyd_30",jr="_dot_1rpyd_47",kr="_primary_1rpyd_66",wr="_secondary_1rpyd_84",Nr="_label_1rpyd_102",$r="_group_1rpyd_109",Cr="_vertical_1rpyd_114",Rr="_horizontal_1rpyd_118",pe={container:br,disabled:yr,hiddenInput:xr,indicator:vr,dot:jr,primary:kr,secondary:wr,label:Nr,group:$r,vertical:Cr,horizontal:Rr},Qe=r.createContext(null);function Ir(){return r.useContext(Qe)}const Je=r.forwardRef(({value:t,label:s,disabled:n=!1,className:o,style:l,...d},c)=>{const a=Ir(),i=n||(a==null?void 0:a.disabled)||!1,_=(a==null?void 0:a.variant)??"primary",u=(a==null?void 0:a.value)!==void 0?a.value===t:void 0,f=()=>{var x;i||(x=a==null?void 0:a.onChange)==null||x.call(a,t)},C=[pe.container,i?pe.disabled:"",o??""].filter(Boolean).join(" ");return e.jsxs("label",{className:C,style:l,children:[e.jsx("input",{ref:c,type:"radio",className:pe.hiddenInput,name:a==null?void 0:a.name,value:t,checked:u,onChange:f,disabled:i,...d}),e.jsx("span",{className:`${pe.indicator} ${pe[_]}`,children:e.jsx("span",{className:pe.dot})}),s&&e.jsx("span",{className:pe.label,children:s})]})});Je.displayName="Radio";function Ze({name:t,value:s,defaultValue:n,onChange:o,variant:l="primary",direction:d="vertical",disabled:c=!1,children:a,className:i,style:_}){const[u,f]=r.useState(n),C=s!==void 0,x=C?s:u,j=g=>{C||f(g),o==null||o(g)},v=[pe.group,pe[d],i??""].filter(Boolean).join(" ");return e.jsx(Qe.Provider,{value:{name:t,value:x,variant:l,disabled:c,onChange:j},children:e.jsx("div",{role:"radiogroup",className:v,style:_,children:a})})}Ze.displayName="RadioGroup";const Br="_container_1etn6_2",Sr="_sm_1etn6_36",Dr="_md_1etn6_41",Mr="_lg_1etn6_46",Er="_thumb_1etn6_52",Lr="_checked_1etn6_76",Tr="_primary_1etn6_89",zr="_secondary_1etn6_98",Wr="_label_1etn6_112",ve={container:Br,switch:"_switch_1etn6_10",sm:Sr,md:Dr,lg:Mr,thumb:Er,checked:Lr,primary:Tr,secondary:zr,label:Wr},et=r.forwardRef(({checked:t,defaultChecked:s=!1,onChange:n,variant:o="primary",size:l="md",label:d,disabled:c=!1,className:a,style:i},_)=>{const[u,f]=r.useState(s),C=r.useId(),x=t!==void 0,j=x?t:u,v=()=>{if(c)return;const I=!j;x||f(I),n==null||n(I)},g=[ve.switch,ve[l],ve[o],j?ve.checked:"",a??""].filter(Boolean).join(" ");return e.jsxs("div",{className:ve.container,style:i,children:[e.jsx("button",{ref:_,type:"button",role:"switch","aria-checked":j,"aria-labelledby":d?`${C}-label`:void 0,className:g,disabled:c,onClick:v,children:e.jsx("span",{className:ve.thumb})}),d&&e.jsx("span",{id:`${C}-label`,className:ve.label,onClick:c?void 0:v,children:d})]})});et.displayName="Switch";const qr="_container_n7z7e_2",Or="_fullWidth_n7z7e_10",Pr="_trigger_n7z7e_15",Ar="_sm_n7z7e_32",Yr="_md_n7z7e_38",Hr="_lg_n7z7e_44",Fr="_outlined_n7z7e_51",Vr="_triggerDisabled_n7z7e_56",Kr="_triggerOpen_n7z7e_60",Gr="_triggerError_n7z7e_60",Ur="_filled_n7z7e_66",Xr="_triggerValue_n7z7e_103",Qr="_triggerPlaceholder_n7z7e_112",Jr="_triggerChips_n7z7e_117",Zr="_chip_n7z7e_125",eo="_chipRemove_n7z7e_140",to="_arrow_n7z7e_157",no="_arrowOpen_n7z7e_166",so="_searchWrapper_n7z7e_171",ro="_searchInput_n7z7e_176",oo="_dropdown_n7z7e_197",ao="_optionsList_n7z7e_208",io="_option_n7z7e_208",lo="_optionHighlighted_n7z7e_230",co="_optionSelected_n7z7e_234",uo="_optionDisabled_n7z7e_245",_o="_checkmark_n7z7e_255",po="_checkmarkHidden_n7z7e_265",fo="_noResults_n7z7e_270",ho="_errorMessage_n7z7e_278",E={container:qr,fullWidth:Or,trigger:Pr,sm:Ar,md:Yr,lg:Hr,outlined:Fr,triggerDisabled:Vr,triggerOpen:Kr,triggerError:Gr,filled:Ur,triggerValue:Xr,triggerPlaceholder:Qr,triggerChips:Jr,chip:Zr,chipRemove:eo,arrow:to,arrowOpen:no,searchWrapper:so,searchInput:ro,dropdown:oo,optionsList:ao,option:io,optionHighlighted:lo,optionSelected:co,optionDisabled:uo,checkmark:_o,checkmarkHidden:po,noResults:fo,errorMessage:ho};function mo(){return e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e.jsx("polyline",{points:"6 9 12 15 18 9"})})}function go(){return e.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e.jsx("polyline",{points:"20 6 9 17 4 12"})})}function bo(){return e.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}const tt=r.forwardRef(({options:t,value:s,defaultValue:n,onChange:o,placeholder:l="Select...",variant:d="outlined",size:c="md",searchable:a=!1,multiple:i=!1,disabled:_=!1,error:u=!1,errorMessage:f,fullWidth:C=!1,className:x,style:j},v)=>{const[g,I]=r.useState(!1),[p,R]=r.useState(n??(i?[]:"")),[b,h]=r.useState(""),[m,k]=r.useState(-1),$=r.useRef(null),B=r.useRef(null),q=r.useRef(null),[A,Q]=r.useState({}),z=s!==void 0,L=z?s:p,G=u||!!f,O=r.useMemo(()=>Array.isArray(L)?L:L?[L]:[],[L]),K=r.useMemo(()=>{if(!b)return t;const N=b.toLowerCase();return t.filter(W=>W.label.toLowerCase().includes(N))},[t,b]),ae=r.useCallback(()=>{if(!$.current)return;const N=$.current.getBoundingClientRect();Q({position:"fixed",top:N.bottom+4,left:N.left,width:N.width,zIndex:"var(--tui-z-dropdown)"})},[]),V=r.useCallback(()=>{_||(ae(),I(!0),h(""),k(-1))},[_,ae]),U=r.useCallback(()=>{I(!1),h(""),k(-1)},[]),ie=r.useCallback(()=>{g?U():V()},[g,U,V]);r.useEffect(()=>{g&&a&&q.current&&q.current.focus()},[g,a]),r.useEffect(()=>{if(!g)return;const N=W=>{const S=W.target;$.current&&!$.current.contains(S)&&B.current&&!B.current.contains(S)&&U()};return document.addEventListener("mousedown",N),()=>document.removeEventListener("mousedown",N)},[g,U]),r.useEffect(()=>{if(!g)return;const N=()=>ae();return window.addEventListener("scroll",N,!0),window.addEventListener("resize",N),()=>{window.removeEventListener("scroll",N,!0),window.removeEventListener("resize",N)}},[g,ae]);const le=r.useCallback(N=>{if(i){const W=O.includes(N)?O.filter(S=>S!==N):[...O,N];z||R(W),o==null||o(W)}else z||R(N),o==null||o(N),U()},[i,O,z,o,U]),ce=r.useCallback((N,W)=>{W.stopPropagation();const S=O.filter(F=>F!==N);z||R(S),o==null||o(S)},[O,z,o]),oe=N=>{var W;if(!_)switch(N.key){case"Enter":case" ":if(N.preventDefault(),!g)V();else if(m>=0&&m<K.length){const S=K[m];S.disabled||le(S.value)}break;case"ArrowDown":N.preventDefault(),g?k(S=>{let F=S+1;for(;F<K.length&&K[F].disabled;)F++;return F<K.length?F:S}):V();break;case"ArrowUp":N.preventDefault(),g&&k(S=>{let F=S-1;for(;F>=0&&K[F].disabled;)F--;return F>=0?F:S});break;case"Escape":N.preventDefault(),U(),(W=$.current)==null||W.focus();break;case"Tab":U();break}},de=N=>{var W;return((W=t.find(S=>S.value===N))==null?void 0:W.label)??N},ee=()=>{if(i)return O.length===0?e.jsx("span",{className:`${E.triggerValue} ${E.triggerPlaceholder}`,children:l}):e.jsx("span",{className:E.triggerChips,children:O.map(W=>e.jsxs("span",{className:E.chip,children:[de(W),e.jsx("button",{type:"button",className:E.chipRemove,onClick:S=>ce(W,S),"aria-label":`Remove ${de(W)}`,children:e.jsx(bo,{})})]},W))});const N=Array.isArray(L)?L[0]:L;return N?e.jsx("span",{className:E.triggerValue,children:de(N)}):e.jsx("span",{className:`${E.triggerValue} ${E.triggerPlaceholder}`,children:l})},he=[E.container,E[d],E[c],C?E.fullWidth:"",x??""].filter(Boolean).join(" "),X=[E.trigger,g?E.triggerOpen:"",G?E.triggerError:"",_?E.triggerDisabled:""].filter(Boolean).join(" ");return e.jsxs("div",{ref:v,className:he,style:j,children:[e.jsxs("div",{ref:$,role:"combobox","aria-expanded":g,"aria-haspopup":"listbox","aria-disabled":_||void 0,tabIndex:_?-1:0,className:X,onClick:ie,onKeyDown:oe,children:[ee(),e.jsx("span",{className:`${E.arrow} ${g?E.arrowOpen:""}`,children:e.jsx(mo,{})})]}),f&&e.jsx("p",{className:E.errorMessage,role:"alert",children:f}),g&&Re.createPortal(e.jsxs("div",{ref:B,className:E.dropdown,style:A,role:"listbox","aria-multiselectable":i||void 0,children:[a&&e.jsx("div",{className:E.searchWrapper,children:e.jsx("input",{ref:q,className:E.searchInput,type:"text",placeholder:"Search...",value:b,onChange:N=>{h(N.target.value),k(-1)},onKeyDown:oe})}),e.jsx("div",{className:E.optionsList,children:K.length===0?e.jsx("div",{className:E.noResults,children:"No options found"}):K.map((N,W)=>{const S=O.includes(N.value),F=[E.option,S?E.optionSelected:"",W===m?E.optionHighlighted:"",N.disabled?E.optionDisabled:""].filter(Boolean).join(" ");return e.jsxs("div",{role:"option","aria-selected":S,"aria-disabled":N.disabled||void 0,className:F,onClick:()=>{N.disabled||le(N.value)},onMouseEnter:()=>{N.disabled||k(W)},children:[i&&e.jsx("span",{className:`${E.checkmark} ${S?"":E.checkmarkHidden}`,children:e.jsx(go,{})}),N.label]},N.value)})})]}),document.body)]})});tt.displayName="Select";const yo="_container_g0kta_2",xo="_disabled_g0kta_10",vo="_sliderWrapper_g0kta_15",jo="_slider_g0kta_15",ko="_sm_g0kta_46",wo="_md_g0kta_50",No="_lg_g0kta_54",$o="_primary_g0kta_79",Co="_secondary_g0kta_84",Ro="_valueLabel_g0kta_185",je={container:yo,disabled:xo,sliderWrapper:vo,slider:jo,sm:ko,md:wo,lg:No,primary:$o,secondary:Co,valueLabel:Ro},nt=r.forwardRef(({value:t,defaultValue:s,min:n=0,max:o=100,step:l=1,onChange:d,variant:c="primary",size:a="md",showValue:i=!1,disabled:_=!1,className:u,style:f},C)=>{const[x,j]=r.useState(s??n),v=t!==void 0,g=v?t:x,I=r.useCallback(m=>{const k=Number(m.target.value);v||j(k),d==null||d(k)},[v,d]),p=r.useMemo(()=>o===n?0:(g-n)/(o-n)*100,[g,n,o]),R=r.useMemo(()=>{const m=c==="primary"?"var(--tui-primary)":"var(--tui-secondary)";return`linear-gradient(to right, ${m} 0%, ${m} ${p}%, var(--tui-bg-hover) ${p}%, var(--tui-bg-hover) 100%)`},[c,p]),b=[je.container,je[a],_?je.disabled:"",u??""].filter(Boolean).join(" "),h=[je.slider,je[c]].filter(Boolean).join(" ");return e.jsx("div",{className:b,style:f,children:e.jsxs("div",{className:je.sliderWrapper,children:[e.jsx("input",{ref:C,type:"range",className:h,min:n,max:o,step:l,value:g,disabled:_,onChange:I,"aria-valuenow":g,"aria-valuemin":n,"aria-valuemax":o,style:{background:R,borderRadius:"var(--tui-radius-full)"}}),i&&e.jsx("span",{className:je.valueLabel,children:g})]})})});nt.displayName="Slider";const Io="_tooltip_ctnzp_2",Bo="_visible_ctnzp_16",So="_dark_ctnzp_21",Do="_light_ctnzp_27",Mo="_arrow_ctnzp_35",Eo="_top_ctnzp_42",Lo="_bottom_ctnzp_59",To="_left_ctnzp_76",zo="_right_ctnzp_93",Ie={tooltip:Io,visible:Bo,dark:So,light:Do,arrow:Mo,top:Eo,bottom:Lo,left:To,right:zo};function st({content:t,placement:s="top",variant:n="dark",delay:o=200,maxWidth:l=250,children:d,className:c}){const[a,i]=r.useState(!1),[_,u]=r.useState({top:0,left:0}),f=r.useRef(null),C=r.useRef(null),x=r.useRef(void 0),j=r.useId(),v=r.useCallback(()=>{const m=f.current,k=C.current;if(!m||!k)return;const $=m.getBoundingClientRect(),B=k.getBoundingClientRect(),q=window.scrollX,A=window.scrollY,Q=8;let z=0,L=0;switch(s){case"top":z=$.top+A-B.height-Q,L=$.left+q+$.width/2-B.width/2;break;case"bottom":z=$.bottom+A+Q,L=$.left+q+$.width/2-B.width/2;break;case"left":z=$.top+A+$.height/2-B.height/2,L=$.left+q-B.width-Q;break;case"right":z=$.top+A+$.height/2-B.height/2,L=$.right+q+Q;break}u({top:z,left:L})},[s]),g=r.useCallback(()=>{x.current=setTimeout(()=>{i(!0)},o)},[o]),I=r.useCallback(()=>{x.current&&clearTimeout(x.current),i(!1)},[]);r.useEffect(()=>{if(a){const m=requestAnimationFrame(()=>{v()});return()=>cancelAnimationFrame(m)}},[a,v]),r.useEffect(()=>()=>{x.current&&clearTimeout(x.current)},[]);const p=[Ie.tooltip,Ie[n],Ie[s],a?Ie.visible:"",c].filter(Boolean).join(" "),R={top:_.top,left:_.left,maxWidth:l},b=d.props,h=r.cloneElement(d,{ref:m=>{f.current=m;const k=d.ref;typeof k=="function"?k(m):k&&typeof k=="object"&&(k.current=m)},onMouseEnter:m=>{var k;g(),(k=b.onMouseEnter)==null||k.call(b,m)},onMouseLeave:m=>{var k;I(),(k=b.onMouseLeave)==null||k.call(b,m)},onFocus:m=>{var k;g(),(k=b.onFocus)==null||k.call(b,m)},onBlur:m=>{var k;I(),(k=b.onBlur)==null||k.call(b,m)},"aria-describedby":a?j:void 0});return e.jsxs(e.Fragment,{children:[h,typeof document<"u"&&Re.createPortal(e.jsxs("div",{ref:C,id:j,role:"tooltip",className:p,style:R,children:[t,e.jsx("span",{className:Ie.arrow,"aria-hidden":"true"})]}),document.body)]})}st.displayName="Tooltip";const Wo="_dialog_1a224_2",qo="_sm_1a224_52",Oo="_md_1a224_56",Po="_lg_1a224_60",Ao="_fullscreen_1a224_64",Yo="_inner_1a224_72",Ho="_titleBar_1a224_83",Fo="_title_1a224_83",Vo="_closeButton_1a224_100",Ko="_content_1a224_127",Go="_actions_1a224_137",ye={dialog:Wo,sm:qo,md:Oo,lg:Po,fullscreen:Ao,inner:Yo,titleBar:Ho,title:Fo,closeButton:Vo,content:Ko,actions:Go},rt=r.forwardRef(({open:t,onClose:s,size:n="md",closeOnBackdrop:o=!0,closeOnEscape:l=!0,className:d,style:c,children:a},i)=>{const _=r.useRef(null),u=i??_;r.useEffect(()=>{const j=u.current;j&&(t?j.open||j.showModal():j.open&&j.close())},[t,u]);const f=r.useCallback(j=>{l?s():j.preventDefault()},[l,s]),C=r.useCallback(j=>{o&&j.target===j.currentTarget&&s()},[o,s]),x=[ye.dialog,ye[n],d].filter(Boolean).join(" ");return e.jsx("dialog",{ref:u,className:x,style:c,onCancel:f,onClick:C,children:e.jsx("div",{className:ye.inner,children:a})})});rt.displayName="Dialog";function ot({showClose:t=!0,onClose:s,className:n,children:o,...l}){const d=[ye.title,n].filter(Boolean).join(" ");return e.jsxs("div",{className:ye.titleBar,children:[e.jsx("h2",{className:d,...l,children:o}),t&&e.jsx("button",{type:"button",className:ye.closeButton,onClick:s,"aria-label":"Close dialog",children:e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:e.jsx("path",{d:"M4 4l8 8M12 4l-8 8"})})})]})}ot.displayName="Dialog.Title";function at({className:t,children:s,...n}){const o=[ye.content,t].filter(Boolean).join(" ");return e.jsx("div",{className:o,...n,children:s})}at.displayName="Dialog.Content";function it({className:t,children:s,...n}){const o=[ye.actions,t].filter(Boolean).join(" ");return e.jsx("div",{className:o,...n,children:s})}it.displayName="Dialog.Actions";const Uo=Object.assign(rt,{Title:ot,Content:at,Actions:it}),Xo="_menu_1el9o_2",Qo="_content_1el9o_8",Jo="_item_1el9o_22",Zo="_disabled_1el9o_40",ea="_danger_1el9o_50",ta="_itemIcon_1el9o_66",na="_itemLabel_1el9o_77",sa="_divider_1el9o_83",be={menu:Xo,content:Qo,item:Jo,disabled:Zo,danger:ea,itemIcon:ta,itemLabel:na,divider:sa},lt=r.createContext(null);function qe(){const t=r.useContext(lt);if(!t)throw new Error("Menu compound components must be used within a Menu");return t}function ct({children:t}){const[s,n]=r.useState(!1),o=r.useRef(null);return e.jsx(lt.Provider,{value:{open:s,setOpen:n,triggerRef:o},children:e.jsx("div",{className:be.menu,children:t})})}ct.displayName="Menu";function dt({children:t}){const{open:s,setOpen:n,triggerRef:o}=qe(),l=r.useCallback(()=>{n(!s)},[s,n]),d=r.useCallback(a=>{(a.key==="ArrowDown"||a.key==="Enter"||a.key===" ")&&(a.preventDefault(),n(!0))},[n]),c=t.props;return r.cloneElement(t,{ref:a=>{o.current=a;const i=t.ref;typeof i=="function"?i(a):i&&typeof i=="object"&&(i.current=a)},onClick:a=>{var i;l(),(i=c.onClick)==null||i.call(c,a)},onKeyDown:a=>{var i;d(a),(i=c.onKeyDown)==null||i.call(c,a)},"aria-haspopup":"menu","aria-expanded":s})}dt.displayName="Menu.Trigger";function ut({className:t,style:s,align:n="start",children:o}){const{open:l,setOpen:d,triggerRef:c}=qe(),a=r.useRef(null),[i,_]=r.useState(null);r.useLayoutEffect(()=>{if(!l){_(null);return}const x=c.current,j=a.current;if(!x||!j)return;const v=x.getBoundingClientRect(),g=j.getBoundingClientRect(),I=window.scrollX,p=window.scrollY,R=4;let b=v.bottom+p+R,h;n==="end"?h=v.right+I-g.width:h=v.left+I,h+g.width>window.innerWidth&&(h=window.innerWidth-g.width-8),h<0&&(h=8),b+g.height>window.innerHeight+window.scrollY&&(b=v.top+p-g.height-R),_({top:b,left:h})},[l,n,c]),r.useEffect(()=>{if(!l)return;function x(j){const v=a.current,g=c.current;v&&!v.contains(j.target)&&g&&!g.contains(j.target)&&d(!1)}return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[l,d,c]),r.useEffect(()=>{if(!l)return;const x=requestAnimationFrame(()=>{const j=a.current;if(!j)return;const v=j.querySelector('[role="menuitem"]:not([aria-disabled="true"])');v==null||v.focus()});return()=>cancelAnimationFrame(x)},[l]);const u=r.useCallback(x=>{var I,p,R;const j=a.current;if(!j)return;const v=Array.from(j.querySelectorAll('[role="menuitem"]:not([aria-disabled="true"])')),g=v.indexOf(document.activeElement);switch(x.key){case"ArrowDown":{x.preventDefault();const b=g<v.length-1?g+1:0;(I=v[b])==null||I.focus();break}case"ArrowUp":{x.preventDefault();const b=g>0?g-1:v.length-1;(p=v[b])==null||p.focus();break}case"Escape":{x.preventDefault(),d(!1),(R=c.current)==null||R.focus();break}case"Tab":{d(!1);break}}},[d,c]);if(!l)return null;const f=[be.content,t].filter(Boolean).join(" "),C={...s,top:(i==null?void 0:i.top)??0,left:(i==null?void 0:i.left)??0,visibility:i?"visible":"hidden"};return typeof document<"u"?Re.createPortal(e.jsx("div",{ref:a,role:"menu",className:f,style:C,onKeyDown:u,children:o}),document.body):null}ut.displayName="Menu.Content";function _t({onClick:t,disabled:s=!1,danger:n=!1,startIcon:o,children:l,className:d}){const{setOpen:c}=qe(),a=r.useCallback(()=>{s||(t==null||t(),c(!1))},[s,t,c]),i=r.useCallback(u=>{(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),a())},[a]),_=[be.item,n?be.danger:"",s?be.disabled:"",d].filter(Boolean).join(" ");return e.jsxs("div",{role:"menuitem",tabIndex:s?-1:0,"aria-disabled":s,className:_,onClick:a,onKeyDown:i,children:[o&&e.jsx("span",{className:be.itemIcon,"aria-hidden":"true",children:o}),e.jsx("span",{className:be.itemLabel,children:l})]})}_t.displayName="Menu.Item";function pt(){return e.jsx("hr",{className:be.divider})}pt.displayName="Menu.Divider";const ra=Object.assign(ct,{Trigger:dt,Content:ut,Item:_t,Divider:pt}),oa="_wrapper_1keih_2",aa="_stickyWrapper_1keih_8",ia="_table_1keih_13",la="_th_1keih_21",ca="_headerContent_1keih_31",da="_sortable_1keih_38",ua="_sorted_1keih_47",_a="_sortIndicator_1keih_51",pa="_stickyHeader_1keih_58",fa="_td_1keih_66",ha="_emptyCell_1keih_72",ma="_clickableRow_1keih_80",ga="_hoverable_1keih_85",ba="_sm_1keih_90",ya="_md_1keih_97",xa="_lg_1keih_104",va="_striped_1keih_112",ja="_bordered_1keih_121",ne={wrapper:oa,stickyWrapper:aa,table:ia,th:la,headerContent:ca,sortable:da,sorted:ua,sortIndicator:_a,stickyHeader:pa,td:fa,emptyCell:ha,clickableRow:ma,hoverable:ga,sm:ba,md:ya,lg:xa,striped:va,bordered:ja};function Be(t,s){return s.split(".").reduce((n,o)=>n==null?void 0:n[o],t)}function ft({columns:t,data:s,variant:n="default",size:o="md",stickyHeader:l=!1,hoverable:d=!0,emptyText:c="No data available",onRowClick:a,rowKey:i,className:_,style:u}){const[f,C]=r.useState({key:null,direction:null}),x=r.useCallback(p=>{C(R=>R.key!==p?{key:p,direction:"asc"}:R.direction==="asc"?{key:p,direction:"desc"}:{key:null,direction:null})},[]),j=r.useMemo(()=>!f.key||!f.direction?s:[...s].sort((R,b)=>{const h=Be(R,f.key),m=Be(b,f.key);if(h==null&&m==null)return 0;if(h==null)return 1;if(m==null)return-1;if(typeof h=="number"&&typeof m=="number")return f.direction==="asc"?h-m:m-h;const k=String(h),$=String(m),B=k.localeCompare($);return f.direction==="asc"?B:-B}),[s,f.key,f.direction]),v=r.useCallback((p,R)=>i?typeof i=="function"?i(p):String(Be(p,i)??R):String(R),[i]),g=[ne.wrapper,l?ne.stickyWrapper:"",_].filter(Boolean).join(" "),I=[ne.table,ne[n],ne[o],d?ne.hoverable:""].filter(Boolean).join(" ");return e.jsx("div",{className:g,style:u,children:e.jsxs("table",{className:I,children:[e.jsx("thead",{className:l?ne.stickyHeader:void 0,children:e.jsx("tr",{children:t.map(p=>{const R={};p.width&&(R.width=typeof p.width=="number"?`${p.width}px`:p.width),p.align&&(R.textAlign=p.align);const b=f.key===p.key,h=[ne.th,p.sortable?ne.sortable:"",b?ne.sorted:""].filter(Boolean).join(" ");return e.jsx("th",{className:h,style:R,onClick:p.sortable?()=>x(p.key):void 0,"aria-sort":b&&f.direction==="asc"?"ascending":b&&f.direction==="desc"?"descending":void 0,children:e.jsxs("span",{className:ne.headerContent,children:[p.header,p.sortable&&e.jsxs("span",{className:ne.sortIndicator,"aria-hidden":"true",children:[b&&f.direction==="asc"&&e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M6 9V3M3 5l3-3 3 3"})}),b&&f.direction==="desc"&&e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M6 3v6M3 7l3 3 3-3"})}),!b&&e.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",opacity:"0.4",children:e.jsx("path",{d:"M4 4.5L6 2.5l2 2M4 7.5L6 9.5l2-2"})})]})]})},p.key)})})}),e.jsx("tbody",{children:j.length===0?e.jsx("tr",{children:e.jsx("td",{className:ne.emptyCell,colSpan:t.length,children:c})}):j.map((p,R)=>{const b=h=>{const m={};return h.align&&(m.textAlign=h.align),m};return e.jsx("tr",{className:a?ne.clickableRow:void 0,onClick:a?()=>a(p,R):void 0,children:t.map(h=>e.jsx("td",{className:ne.td,style:b(h),children:h.render?h.render(Be(p,h.key),p,R):Be(p,h.key)},h.key))},v(p,R))})})]})})}ft.displayName="Table";const ka="_pagination_spaxh_2",wa="_list_spaxh_7",Na="_button_spaxh_17",$a="_pageButton_spaxh_52",Ca="_active_spaxh_57",Ra="_navButton_spaxh_70",Ia="_ellipsis_spaxh_75",Ba="_pageInfo_spaxh_86",Sa="_sm_spaxh_95",Da="_md_spaxh_111",Ma="_lg_spaxh_127",J={pagination:ka,list:wa,button:Na,pageButton:$a,active:Ca,navButton:Ra,ellipsis:Ia,pageInfo:Ba,sm:Sa,md:Da,lg:Ma};function Ea(t,s,n){const o=n*2+5;if(t<=o)return Array.from({length:t},(_,u)=>u+1);const l=Math.max(s-n,1),d=Math.min(s+n,t),c=l>2,a=d<t-1;return!c&&a?[...Array.from({length:n*2+3},(u,f)=>f+1),"ellipsis-end",t]:c&&!a?[1,"ellipsis-start",...Array.from({length:n*2+3},(u,f)=>t-(n*2+2)+f)]:[1,"ellipsis-start",...Array.from({length:d-l+1},(_,u)=>l+u),"ellipsis-end",t]}function Ae(){return e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M10 4l-4 4 4 4"})})}function Ye(){return e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M6 4l4 4-4 4"})})}function ht({totalPages:t,currentPage:s,onChange:n,siblingCount:o=1,variant:l="default",size:d="md",disabled:c=!1,className:a,style:i}){const _=r.useMemo(()=>Ea(t,s,o),[t,s,o]),u=s<=1,f=s>=t,C=[J.pagination,J[d],a].filter(Boolean).join(" ");return l==="simple"?e.jsx("nav",{"aria-label":"pagination",className:C,style:i,children:e.jsxs("ul",{className:J.list,children:[e.jsx("li",{children:e.jsxs("button",{type:"button",className:[J.button,J.navButton].join(" "),onClick:()=>n(s-1),disabled:c||u,"aria-label":"Previous page",children:[e.jsx(Ae,{}),e.jsx("span",{children:"Previous"})]})}),e.jsx("li",{children:e.jsxs("span",{className:J.pageInfo,children:["Page ",s," of ",t]})}),e.jsx("li",{children:e.jsxs("button",{type:"button",className:[J.button,J.navButton].join(" "),onClick:()=>n(s+1),disabled:c||f,"aria-label":"Next page",children:[e.jsx("span",{children:"Next"}),e.jsx(Ye,{})]})})]})}):e.jsx("nav",{"aria-label":"pagination",className:C,style:i,children:e.jsxs("ul",{className:J.list,children:[e.jsx("li",{children:e.jsx("button",{type:"button",className:[J.button,J.navButton].join(" "),onClick:()=>n(s-1),disabled:c||u,"aria-label":"Previous page",children:e.jsx(Ae,{})})}),_.map((x,j)=>{if(x==="ellipsis-start"||x==="ellipsis-end")return e.jsx("li",{children:e.jsx("span",{className:J.ellipsis,"aria-hidden":"true",children:"..."})},x);const v=x,g=v===s;return e.jsx("li",{children:e.jsx("button",{type:"button",className:[J.button,J.pageButton,g?J.active:""].filter(Boolean).join(" "),onClick:()=>n(v),disabled:c,"aria-label":`Page ${v}`,"aria-current":g?"page":void 0,children:v})},v)}),e.jsx("li",{children:e.jsx("button",{type:"button",className:[J.button,J.navButton].join(" "),onClick:()=>n(s+1),disabled:c||f,"aria-label":"Next page",children:e.jsx(Ye,{})})})]})})}ht.displayName="Pagination";const La="_tabs_103dv_2",Ta="_list_103dv_8",za="_listUnderline_103dv_15",Wa="_listPill_103dv_21",qa="_trigger_103dv_29",Oa="_triggerUnderline_103dv_64",Pa="_triggerActive_103dv_71",Aa="_triggerPill_103dv_77",Ya="_content_103dv_89",fe={tabs:La,list:Ta,listUnderline:za,listPill:Wa,trigger:qa,triggerUnderline:Oa,triggerActive:Pa,triggerPill:Aa,content:Ya},mt=r.createContext(null);function Oe(){const t=r.useContext(mt);if(!t)throw new Error("Tabs compound components must be used within <Tabs>");return t}function gt({defaultValue:t,value:s,onChange:n,variant:o="underline",children:l,className:d,style:c}){const[a,i]=r.useState(t??""),_=r.useId(),u=s!==void 0,f=u?s:a,C=r.useCallback(j=>{u||i(j),n==null||n(j)},[u,n]),x=[fe.tabs,d].filter(Boolean).join(" ");return e.jsx(mt.Provider,{value:{activeValue:f,setActiveValue:C,variant:o,baseId:_},children:e.jsx("div",{className:x,style:c,children:l})})}gt.displayName="Tabs";function bt({children:t,className:s}){const{variant:n}=Oe(),o=r.useRef(null),l=r.useCallback(c=>{const a=o.current;if(!a)return;const i=Array.from(a.querySelectorAll('[role="tab"]:not([disabled])')),_=i.findIndex(f=>f===document.activeElement);if(_===-1)return;let u=null;c.key==="ArrowRight"?u=(_+1)%i.length:c.key==="ArrowLeft"?u=(_-1+i.length)%i.length:c.key==="Home"?u=0:c.key==="End"&&(u=i.length-1),u!==null&&(c.preventDefault(),i[u].focus())},[]),d=[fe.list,n==="underline"?fe.listUnderline:fe.listPill,s].filter(Boolean).join(" ");return e.jsx("div",{ref:o,role:"tablist",className:d,onKeyDown:l,children:t})}bt.displayName="Tabs.List";function yt({value:t,disabled:s=!1,children:n,className:o}){const{activeValue:l,setActiveValue:d,variant:c,baseId:a}=Oe(),i=l===t,_=`${a}-trigger-${t}`,u=`${a}-panel-${t}`,f=[fe.trigger,c==="underline"?fe.triggerUnderline:fe.triggerPill,i?fe.triggerActive:"",o].filter(Boolean).join(" ");return e.jsx("button",{type:"button",id:_,role:"tab",className:f,"aria-selected":i,"aria-controls":u,tabIndex:i?0:-1,disabled:s,onClick:()=>d(t),children:n})}yt.displayName="Tabs.Trigger";function xt({value:t,children:s,className:n}){const{activeValue:o,baseId:l}=Oe();if(!(o===t))return null;const c=`${l}-trigger-${t}`,a=`${l}-panel-${t}`,i=[fe.content,n].filter(Boolean).join(" ");return e.jsx("div",{id:a,role:"tabpanel",className:i,"aria-labelledby":c,tabIndex:0,children:s})}xt.displayName="Tabs.Content";const Ha=Object.assign(gt,{List:bt,Trigger:yt,Content:xt}),Fa="_container_hexh0_2",Va="_label_hexh0_12",Ka="_labelError_hexh0_20",Ga="_labelDisabled_hexh0_24",Ua="_inputWrapper_hexh0_29",Xa="_sm_hexh0_44",Qa="_md_hexh0_50",Ja="_lg_hexh0_56",Za="_outlined_hexh0_63",ei="_disabled_hexh0_68",ti="_focused_hexh0_72",ni="_error_hexh0_72",si="_filled_hexh0_78",ri="_input_hexh0_29",oi="_calendarIcon_hexh0_134",ai="_popup_hexh0_153",ii="_navHeader_hexh0_165",li="_navButton_hexh0_172",ci="_monthYearLabel_hexh0_198",di="_yearGrid_hexh0_216",ui="_yearCell_hexh0_223",_i="_yearCellSelected_hexh0_244",pi="_errorMessage_hexh0_254",H={container:Fa,label:Va,labelError:Ka,labelDisabled:Ga,inputWrapper:Ua,sm:Xa,md:Qa,lg:Ja,outlined:Za,disabled:ei,focused:ti,error:ni,filled:si,input:ri,calendarIcon:oi,popup:ai,navHeader:ii,navButton:li,monthYearLabel:ci,yearGrid:di,yearCell:ui,yearCellSelected:_i,errorMessage:pi},fi="_calendar_1l17k_2",hi="_weekHeader_1l17k_8",mi="_weekLabel_1l17k_15",gi="_daysGrid_1l17k_23",bi="_day_1l17k_23",yi="_dayDisabled_1l17k_47",xi="_daySelected_1l17k_47",vi="_dayOutside_1l17k_52",ji="_dayToday_1l17k_58",ki="_dayRangeStart_1l17k_81",wi="_dayRangeEnd_1l17k_88",Ni="_dayInRange_1l17k_95",$i="_dayCell_1l17k_106",Ci="_dayCellRangeMiddle_1l17k_113",Ri="_dayCellRangeStart_1l17k_117",Ii="_dayCellRangeEnd_1l17k_121",Bi="_dayCellRangeStartEnd_1l17k_125",Z={calendar:fi,weekHeader:hi,weekLabel:mi,daysGrid:gi,day:bi,dayDisabled:yi,daySelected:xi,dayOutside:vi,dayToday:ji,dayRangeStart:ki,dayRangeEnd:wi,dayInRange:Ni,dayCell:$i,dayCellRangeMiddle:Ci,dayCellRangeStart:Ri,dayCellRangeEnd:Ii,dayCellRangeStartEnd:Bi};function Le(t,s){return new Date(t,s+1,0).getDate()}function Si(t,s){return new Date(t,s,1).getDay()}function Te(t,s){const n=String(t.getFullYear()),o=String(t.getMonth()+1).padStart(2,"0"),l=String(t.getDate()).padStart(2,"0");let d=s;return d=d.replace("yyyy",n),d=d.replace("MM",o),d=d.replace("dd",l),d}function Di(t,s){const n=s.indexOf("yyyy"),o=s.indexOf("MM"),l=s.indexOf("dd");if(n===-1||o===-1||l===-1)return null;const d=t.substring(n,n+4),c=t.substring(o,o+2),a=t.substring(l,l+2),i=parseInt(d,10),_=parseInt(c,10),u=parseInt(a,10);return isNaN(i)||isNaN(_)||isNaN(u)||_<1||_>12||u<1||u>Le(i,_-1)?null:new Date(i,_-1,u)}function ke(t,s){return t.getFullYear()===s.getFullYear()&&t.getMonth()===s.getMonth()&&t.getDate()===s.getDate()}function He(t,s,n){const o=new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime();if(s){const l=new Date(s.getFullYear(),s.getMonth(),s.getDate()).getTime();if(o<l)return!1}if(n){const l=new Date(n.getFullYear(),n.getMonth(),n.getDate()).getTime();if(o>l)return!1}return!0}function Mi(t,s){const n=[],o=Si(t,s),l=Le(t,s),d=Le(s===0?t-1:t,s===0?11:s-1);for(let a=o-1;a>=0;a--){const i=s===0?11:s-1,_=s===0?t-1:t;n.push({date:new Date(_,i,d-a),isCurrentMonth:!1})}for(let a=1;a<=l;a++)n.push({date:new Date(t,s,a),isCurrentMonth:!0});const c=42-n.length;for(let a=1;a<=c;a++){const i=s===11?0:s+1,_=s===11?t+1:t;n.push({date:new Date(_,i,a),isCurrentMonth:!1})}return n}function Ei(t){return t.startsWith("ko")?["일","월","화","수","목","금","토"]:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]}function ze(t,s){return new Date(2e3,t,1).toLocaleString(s,{month:"long"})}function Li(t,s,n){const o=new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime(),l=new Date(s.getFullYear(),s.getMonth(),s.getDate()).getTime(),d=new Date(n.getFullYear(),n.getMonth(),n.getDate()).getTime(),c=Math.min(l,d),a=Math.max(l,d);return o>=c&&o<=a}function Se({currentMonth:t,currentYear:s,selectedDate:n,selectedRange:o,hoverDate:l,minDate:d,maxDate:c,onDateClick:a,onDateHover:i,locale:_="ko-KR",className:u}){const f=r.useMemo(()=>Mi(s,t),[s,t]),C=r.useMemo(()=>Ei(_),[_]),x=r.useMemo(()=>new Date,[]),j=[Z.calendar,u].filter(Boolean).join(" "),v=r.useMemo(()=>{if(!o)return null;const{start:p,end:R}=o;return p&&R?{start:p,end:R}:p&&l?{start:p,end:l}:null},[o,l]),g=(p,R)=>{const b=!He(p,d,c),h=ke(p,x),m=n?ke(p,n):!1;let k=!1,$=!1,B=!1;if(v&&v.start&&v.end){k=ke(p,v.start),$=ke(p,v.end),B=Li(p,v.start,v.end);const z=v.start.getTime(),L=v.end.getTime();z>L&&(k=ke(p,v.end),$=ke(p,v.start))}const q=[Z.day,R?"":Z.dayOutside,h&&!m&&!k&&!$?Z.dayToday:"",m?Z.daySelected:"",k?Z.dayRangeStart:"",$&&!k?Z.dayRangeEnd:"",B&&!k&&!$?Z.dayInRange:"",b?Z.dayDisabled:""].filter(Boolean).join(" "),A=k&&$;return{cellClass:[Z.dayCell,B&&!k&&!$?Z.dayCellRangeMiddle:"",k&&!A&&B?Z.dayCellRangeStart:"",$&&!A&&B?Z.dayCellRangeEnd:"",A?Z.dayCellRangeStartEnd:""].filter(Boolean).join(" "),dayClass:q}},I=[];for(let p=0;p<6;p++){const R=[];for(let b=0;b<7;b++){const h=p*7+b,{date:m,isCurrentMonth:k}=f[h],$=!He(m,d,c),{cellClass:B,dayClass:q}=g(m,k);R.push(e.jsx("div",{className:B,children:e.jsx("div",{className:q,onClick:()=>{$||a(m)},onMouseEnter:()=>{$||i==null||i(m)},role:"gridcell","aria-disabled":$||void 0,"aria-selected":n?ke(m,n):void 0,tabIndex:-1,children:m.getDate()})},h))}I.push(e.jsx("div",{className:Z.daysGrid,role:"row",children:R},p))}return e.jsxs("div",{className:j,role:"grid","aria-label":"Calendar",children:[e.jsx("div",{className:Z.weekHeader,role:"row",children:C.map(p=>e.jsx("div",{className:Z.weekLabel,role:"columnheader",children:p},p))}),I]})}Se.displayName="Calendar";function Ti(){return e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[e.jsx("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"}),e.jsx("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),e.jsx("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),e.jsx("line",{x1:"3",y1:"10",x2:"21",y2:"10"})]})}function zi(){return e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e.jsx("polyline",{points:"15 18 9 12 15 6"})})}function Wi(){return e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e.jsx("polyline",{points:"9 18 15 12 9 6"})})}const vt=r.forwardRef(({value:t,defaultValue:s,onChange:n,placeholder:o,variant:l="outlined",size:d="md",locale:c="ko-KR",dateFormat:a="yyyy.MM.dd",minDate:i,maxDate:_,disabled:u=!1,error:f=!1,errorMessage:C,label:x,className:j,style:v},g)=>{const I=t!==void 0,[p,R]=r.useState(s??null),b=I?t:p,[h,m]=r.useState(!1),[k,$]=r.useState(!1),B=r.useMemo(()=>new Date,[]),[q,A]=r.useState(b?b.getMonth():B.getMonth()),[Q,z]=r.useState(b?b.getFullYear():B.getFullYear()),[L,G]=r.useState(Math.floor(((b==null?void 0:b.getFullYear())??B.getFullYear())/12)*12),O=r.useRef(null),K=r.useRef(null),ae=r.useRef(null),[V,U]=r.useState({}),ie=f||!!C,le=r.useMemo(()=>b?Te(b,a):"",[b,a]),ce=o??a,oe=r.useCallback(()=>{if(!O.current)return;const w=O.current.getBoundingClientRect(),D=window.innerHeight-w.bottom,y=340,T=D>y?w.bottom+4:w.top-y-4;U({position:"fixed",top:T,left:w.left,zIndex:"var(--tui-z-dropdown)"})},[]),de=r.useCallback(()=>{if(u)return;oe(),m(!0),$(!1);const w=b??new Date;A(w.getMonth()),z(w.getFullYear())},[u,oe,b]),ee=r.useCallback(()=>{m(!1),$(!1)},[]);r.useEffect(()=>{if(!h)return;const w=D=>{const y=D.target;O.current&&!O.current.contains(y)&&K.current&&!K.current.contains(y)&&ee()};return document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[h,ee]),r.useEffect(()=>{if(!h)return;const w=()=>oe();return window.addEventListener("scroll",w,!0),window.addEventListener("resize",w),()=>{window.removeEventListener("scroll",w,!0),window.removeEventListener("resize",w)}},[h,oe]);const he=w=>{var D;w.key==="Escape"&&h&&(w.preventDefault(),ee(),(D=ae.current)==null||D.focus()),w.key==="Enter"&&!h&&(w.preventDefault(),de())},X=r.useCallback(()=>{A(w=>w===0?(z(D=>D-1),11):w-1)},[]),N=r.useCallback(()=>{A(w=>w===11?(z(D=>D+1),0):w+1)},[]),W=r.useCallback(w=>{I||R(w),n==null||n(w),ee()},[I,n,ee]),S=r.useCallback(w=>{z(w),$(!1)},[]),F=r.useCallback(w=>{const D=w.target.value;if(!D){I||R(null),n==null||n(null);return}const y=Di(D,a);y&&(I||R(y),n==null||n(y))},[I,n,a]),we=`${Q}${c.startsWith("ko")?"년 ":" "}${ze(q,c)}`,P=r.useMemo(()=>{const w=[];for(let D=0;D<12;D++)w.push(L+D);return w},[L]),me=[H.container,H[l],H[d],ie?H.error:"",u?H.disabled:"",j??""].filter(Boolean).join(" "),Ne=[H.inputWrapper,h?H.focused:"",ie?H.error:"",u?H.disabled:""].filter(Boolean).join(" "),xe=[H.label,ie?H.labelError:"",u?H.labelDisabled:""].filter(Boolean).join(" ");return e.jsxs("div",{ref:g,className:me,style:v,children:[x&&e.jsx("label",{className:xe,children:x}),e.jsxs("div",{ref:O,className:Ne,onClick:()=>{u||(h?ee():de())},onKeyDown:he,tabIndex:u?-1:0,role:"combobox","aria-expanded":h,"aria-haspopup":"dialog","aria-disabled":u||void 0,children:[e.jsx("input",{ref:ae,className:H.input,type:"text",value:le,placeholder:ce,disabled:u,readOnly:!0,onChange:F,tabIndex:-1,"aria-invalid":ie||void 0}),e.jsx("span",{className:H.calendarIcon,children:e.jsx(Ti,{})})]}),C&&e.jsx("p",{className:H.errorMessage,role:"alert",children:C}),h&&Re.createPortal(e.jsxs("div",{ref:K,className:H.popup,style:V,role:"dialog","aria-label":"Date picker",onKeyDown:w=>{var D;w.key==="Escape"&&(w.preventDefault(),ee(),(D=O.current)==null||D.focus())},children:[e.jsxs("div",{className:H.navHeader,children:[e.jsx("button",{type:"button",className:H.navButton,onClick:w=>{w.stopPropagation(),k?G(D=>D-12):X()},"aria-label":"Previous",children:e.jsx(zi,{})}),e.jsx("button",{type:"button",className:H.monthYearLabel,onClick:w=>{w.stopPropagation(),$(!k),G(Math.floor(Q/12)*12)},children:k?`${L} - ${L+11}`:we}),e.jsx("button",{type:"button",className:H.navButton,onClick:w=>{w.stopPropagation(),k?G(D=>D+12):N()},"aria-label":"Next",children:e.jsx(Wi,{})})]}),k?e.jsx("div",{className:H.yearGrid,children:P.map(w=>{const D=w===Q,y=[H.yearCell,D?H.yearCellSelected:""].filter(Boolean).join(" ");return e.jsx("button",{type:"button",className:y,onClick:T=>{T.stopPropagation(),S(w)},children:w},w)})}):e.jsx(Se,{currentMonth:q,currentYear:Q,selectedDate:b,minDate:i,maxDate:_,onDateClick:W,locale:c})]}),document.body)]})});vt.displayName="DatePicker";const qi="_container_19ezg_2",Oi="_label_19ezg_12",Pi="_labelError_19ezg_20",Ai="_labelDisabled_19ezg_24",Yi="_inputWrapper_19ezg_29",Hi="_sm_19ezg_44",Fi="_md_19ezg_50",Vi="_lg_19ezg_56",Ki="_outlined_19ezg_63",Gi="_disabled_19ezg_68",Ui="_focused_19ezg_72",Xi="_error_19ezg_72",Qi="_filled_19ezg_78",Ji="_input_19ezg_29",Zi="_calendarIcon_19ezg_134",el="_popup_19ezg_144",tl="_presetsSidebar_19ezg_157",nl="_presetButton_19ezg_167",sl="_calendarsContainer_19ezg_196",rl="_calendarColumn_19ezg_202",ol="_navHeader_19ezg_208",al="_navButton_19ezg_215",il="_navButtonHidden_19ezg_241",ll="_monthYearLabel_19ezg_245",cl="_errorMessage_19ezg_252",M={container:qi,label:Oi,labelError:Pi,labelDisabled:Ai,inputWrapper:Yi,sm:Hi,md:Fi,lg:Vi,outlined:Ki,disabled:Gi,focused:Ui,error:Xi,filled:Qi,input:Ji,calendarIcon:Zi,popup:el,presetsSidebar:tl,presetButton:nl,calendarsContainer:sl,calendarColumn:rl,navHeader:ol,navButton:al,navButtonHidden:il,monthYearLabel:ll,errorMessage:cl};function dl(){return e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[e.jsx("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"}),e.jsx("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),e.jsx("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),e.jsx("line",{x1:"3",y1:"10",x2:"21",y2:"10"})]})}function ul(){return e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e.jsx("polyline",{points:"15 18 9 12 15 6"})})}function _l(){return e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e.jsx("polyline",{points:"9 18 15 12 9 6"})})}const jt=r.forwardRef(({value:t,defaultValue:s,onChange:n,placeholder:o,variant:l="outlined",size:d="md",locale:c="ko-KR",dateFormat:a="yyyy.MM.dd",minDate:i,maxDate:_,disabled:u=!1,error:f=!1,errorMessage:C,label:x,presets:j,className:v,style:g},I)=>{const p=t!==void 0,[R,b]=r.useState(s??{start:null,end:null}),h=p?t:R,[m,k]=r.useState(!1),[$,B]=r.useState(null),[q,A]=r.useState(!0),Q=r.useMemo(()=>new Date,[]),[z,L]=r.useState(h.start?h.start.getMonth():Q.getMonth()),[G,O]=r.useState(h.start?h.start.getFullYear():Q.getFullYear()),K=z===11?0:z+1,ae=z===11?G+1:G,V=r.useRef(null),U=r.useRef(null),[ie,le]=r.useState({}),ce=f||!!C,oe=r.useMemo(()=>{const{start:y,end:T}=h;if(!y&&!T)return"";const te=y?Te(y,a):"",De=T?Te(T,a):"";return te&&De?`${te} ~ ${De}`:te||""},[h,a]),de=o??`${a} ~ ${a}`,ee=r.useCallback(()=>{if(!V.current)return;const y=V.current.getBoundingClientRect(),T=window.innerHeight-y.bottom,te=380,De=T>te?y.bottom+4:y.top-te-4;le({position:"fixed",top:De,left:y.left,zIndex:"var(--tui-z-dropdown)"})},[]),he=r.useCallback(()=>{if(u)return;ee(),k(!0),A(!0),B(null);const y=h.start??new Date;L(y.getMonth()),O(y.getFullYear())},[u,ee,h.start]),X=r.useCallback(()=>{k(!1),B(null)},[]);r.useEffect(()=>{if(!m)return;const y=T=>{const te=T.target;V.current&&!V.current.contains(te)&&U.current&&!U.current.contains(te)&&X()};return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[m,X]),r.useEffect(()=>{if(!m)return;const y=()=>ee();return window.addEventListener("scroll",y,!0),window.addEventListener("resize",y),()=>{window.removeEventListener("scroll",y,!0),window.removeEventListener("resize",y)}},[m,ee]);const N=r.useCallback(()=>{L(y=>y===0?(O(T=>T-1),11):y-1)},[]),W=r.useCallback(()=>{L(y=>y===11?(O(T=>T+1),0):y+1)},[]),S=r.useCallback(y=>{if(q){const T={start:y,end:null};p||b(T),n==null||n(T),A(!1)}else{const T=h.start;let te;y.getTime()<T.getTime()?te={start:y,end:T}:te={start:T,end:y},p||b(te),n==null||n(te),A(!0),B(null),X()}},[q,h.start,p,n,X]),F=r.useCallback(y=>{q||B(y)},[q]),we=r.useCallback(y=>{p||b(y),n==null||n(y),A(!0),B(null),X()},[p,n,X]),P=`${G}${c.startsWith("ko")?"년 ":" "}${ze(z,c)}`,me=`${ae}${c.startsWith("ko")?"년 ":" "}${ze(K,c)}`,Ne=[M.container,M[l],M[d],ce?M.error:"",u?M.disabled:"",v??""].filter(Boolean).join(" "),xe=[M.inputWrapper,m?M.focused:"",ce?M.error:"",u?M.disabled:""].filter(Boolean).join(" "),w=[M.label,ce?M.labelError:"",u?M.labelDisabled:""].filter(Boolean).join(" "),D=r.useMemo(()=>({start:h.start,end:h.end}),[h.start,h.end]);return e.jsxs("div",{ref:I,className:Ne,style:g,children:[x&&e.jsx("label",{className:w,children:x}),e.jsxs("div",{ref:V,className:xe,onClick:()=>{u||(m?X():he())},onKeyDown:y=>{y.key==="Escape"&&m&&(y.preventDefault(),X()),y.key==="Enter"&&!m&&(y.preventDefault(),he())},tabIndex:u?-1:0,role:"combobox","aria-expanded":m,"aria-haspopup":"dialog","aria-disabled":u||void 0,children:[e.jsx("input",{className:M.input,type:"text",value:oe,placeholder:de,disabled:u,readOnly:!0,tabIndex:-1,"aria-invalid":ce||void 0}),e.jsx("span",{className:M.calendarIcon,children:e.jsx(dl,{})})]}),C&&e.jsx("p",{className:M.errorMessage,role:"alert",children:C}),m&&Re.createPortal(e.jsxs("div",{ref:U,className:M.popup,style:ie,role:"dialog","aria-label":"Date range picker",onKeyDown:y=>{var T;y.key==="Escape"&&(y.preventDefault(),X(),(T=V.current)==null||T.focus())},children:[j&&j.length>0&&e.jsx("div",{className:M.presetsSidebar,children:j.map(y=>e.jsx("button",{type:"button",className:M.presetButton,onClick:T=>{T.stopPropagation(),we(y.range)},children:y.label},y.label))}),e.jsxs("div",{className:M.calendarsContainer,children:[e.jsxs("div",{className:M.calendarColumn,children:[e.jsxs("div",{className:M.navHeader,children:[e.jsx("button",{type:"button",className:M.navButton,onClick:y=>{y.stopPropagation(),N()},"aria-label":"Previous month",children:e.jsx(ul,{})}),e.jsx("span",{className:M.monthYearLabel,children:P}),e.jsx("span",{className:`${M.navButton} ${M.navButtonHidden}`})]}),e.jsx(Se,{currentMonth:z,currentYear:G,selectedRange:D,hoverDate:$,minDate:i,maxDate:_,onDateClick:S,onDateHover:F,locale:c})]}),e.jsxs("div",{className:M.calendarColumn,children:[e.jsxs("div",{className:M.navHeader,children:[e.jsx("span",{className:`${M.navButton} ${M.navButtonHidden}`}),e.jsx("span",{className:M.monthYearLabel,children:me}),e.jsx("button",{type:"button",className:M.navButton,onClick:y=>{y.stopPropagation(),W()},"aria-label":"Next month",children:e.jsx(_l,{})})]}),e.jsx(Se,{currentMonth:K,currentYear:ae,selectedRange:D,hoverDate:$,minDate:i,maxDate:_,onDateClick:S,onDateHover:F,locale:c})]})]})]}),document.body)]})});jt.displayName="DateRangePicker";const pl="_expander_1y91s_2",fl="_variantDefault_1y91s_8",hl="_item_1y91s_8",ml="_variantBordered_1y91s_17",gl="_variantSeparated_1y91s_32",bl="_itemDisabled_1y91s_49",yl="_trigger_1y91s_55",xl="_triggerContent_1y91s_84",vl="_chevron_1y91s_90",jl="_chevronOpen_1y91s_100",kl="_contentWrapper_1y91s_105",wl="_contentWrapperOpen_1y91s_111",Nl="_contentInner_1y91s_115",$l="_content_1y91s_105",re={expander:pl,variantDefault:fl,item:hl,variantBordered:ml,variantSeparated:gl,itemDisabled:bl,trigger:yl,triggerContent:xl,chevron:vl,chevronOpen:jl,contentWrapper:kl,contentWrapperOpen:wl,contentInner:Nl,content:$l},kt=r.createContext(null);function Pe(){const t=r.useContext(kt);if(!t)throw new Error("Expander compound components must be used within <Expander>");return t}const wt=r.createContext(null);function Nt(){const t=r.useContext(wt);if(!t)throw new Error("Expander.Trigger/Content must be used within <Expander.Item>");return t}function Fe(t){return t===void 0?[]:Array.isArray(t)?t:[t]}function $t({type:t="single",defaultValue:s,value:n,onChange:o,variant:l="default",children:d,className:c,style:a}){const[i,_]=r.useState(Fe(s)),u=r.useId(),f=n!==void 0,C=f?Fe(n):i,x=r.useCallback(g=>{let I;const p=C.includes(g);t==="single"?I=p?[]:[g]:I=p?C.filter(R=>R!==g):[...C,g],f||_(I),t==="single"?o==null||o(I.length>0?I[0]:""):o==null||o(I)},[t,C,f,o]),j=l==="bordered"?re.variantBordered:l==="separated"?re.variantSeparated:re.variantDefault,v=[re.expander,j,c].filter(Boolean).join(" ");return e.jsx(kt.Provider,{value:{openItems:C,toggle:x,variant:l,baseId:u},children:e.jsx("div",{className:v,style:a,children:d})})}$t.displayName="Expander";function Ct({value:t,disabled:s=!1,className:n,children:o}){const{openItems:l}=Pe(),d=l.includes(t),c=[re.item,s?re.itemDisabled:"",n??""].filter(Boolean).join(" ");return e.jsx(wt.Provider,{value:{value:t,isOpen:d,disabled:s},children:e.jsx("div",{className:c,"data-state":d?"open":"closed",children:o})})}Ct.displayName="Expander.Item";function Cl(){return e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e.jsx("polyline",{points:"6 9 12 15 18 9"})})}function Rt({children:t,className:s}){const{toggle:n,baseId:o}=Pe(),{value:l,isOpen:d,disabled:c}=Nt(),a=`${o}-trigger-${l}`,i=`${o}-content-${l}`,_=[re.trigger,s].filter(Boolean).join(" "),u=[re.chevron,d?re.chevronOpen:""].filter(Boolean).join(" ");return e.jsxs("button",{type:"button",id:a,className:_,onClick:()=>{c||n(l)},"aria-expanded":d,"aria-controls":i,disabled:c,children:[e.jsx("span",{className:re.triggerContent,children:t}),e.jsx("span",{className:u,children:e.jsx(Cl,{})})]})}Rt.displayName="Expander.Trigger";function It({children:t,className:s}){const{baseId:n}=Pe(),{value:o,isOpen:l}=Nt(),d=`${n}-trigger-${o}`,c=`${n}-content-${o}`,a=[re.contentWrapper,l?re.contentWrapperOpen:""].filter(Boolean).join(" "),i=[re.content,s].filter(Boolean).join(" ");return e.jsx("div",{id:c,className:a,role:"region","aria-labelledby":d,hidden:l?void 0:!0,children:e.jsx("div",{className:re.contentInner,children:e.jsx("div",{className:i,children:t})})})}It.displayName="Expander.Content";const Rl=Object.assign($t,{Item:Ct,Trigger:Rt,Content:It});exports.Avatar=Vn;exports.Badge=En;exports.Button=Ge;exports.Calendar=Se;exports.Checkbox=Xe;exports.Chip=is;exports.DatePicker=vt;exports.DateRangePicker=jt;exports.Dialog=Uo;exports.Expander=Rl;exports.Menu=ra;exports.Pagination=ht;exports.Progress=ys;exports.Radio=Je;exports.RadioGroup=Ze;exports.Select=tt;exports.Slider=nt;exports.Switch=et;exports.Table=ft;exports.Tabs=Ha;exports.TextField=Ue;exports.ThemeProvider=Bt;exports.Toast=We;exports.ToastProvider=nn;exports.Tooltip=st;exports.useTheme=sn;exports.useToast=rn;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export { ThemeProvider } from './providers/ThemeProvider';
|
|
2
|
+
export type { Theme, ThemeContextValue } from './providers/ThemeProvider';
|
|
3
|
+
export { ToastProvider } from './providers/ToastProvider';
|
|
4
|
+
export type { ToastPosition, ToastData, ToastContextValue } from './providers/ToastProvider';
|
|
5
|
+
export { useTheme } from './hooks/useTheme';
|
|
6
|
+
export { useToast } from './hooks/useToast';
|
|
7
|
+
export { Button } from './components/Button';
|
|
8
|
+
export type { ButtonProps } from './components/Button/Button';
|
|
9
|
+
export { Badge } from './components/Badge';
|
|
10
|
+
export type { BadgeProps } from './components/Badge/Badge';
|
|
11
|
+
export { Avatar } from './components/Avatar';
|
|
12
|
+
export type { AvatarProps } from './components/Avatar/Avatar';
|
|
13
|
+
export { Chip } from './components/Chip';
|
|
14
|
+
export type { ChipProps } from './components/Chip/Chip';
|
|
15
|
+
export { Progress } from './components/Progress';
|
|
16
|
+
export type { ProgressProps } from './components/Progress/Progress';
|
|
17
|
+
export { TextField } from './components/TextField';
|
|
18
|
+
export type { TextFieldProps } from './components/TextField/TextField';
|
|
19
|
+
export { Checkbox } from './components/Checkbox';
|
|
20
|
+
export type { CheckboxProps } from './components/Checkbox/Checkbox';
|
|
21
|
+
export { Radio, RadioGroup } from './components/Radio';
|
|
22
|
+
export type { RadioProps } from './components/Radio/Radio';
|
|
23
|
+
export type { RadioGroupProps } from './components/Radio/RadioGroup';
|
|
24
|
+
export { Switch } from './components/Switch';
|
|
25
|
+
export type { SwitchProps } from './components/Switch/Switch';
|
|
26
|
+
export { Select } from './components/Select';
|
|
27
|
+
export type { SelectProps } from './components/Select/Select';
|
|
28
|
+
export { Slider } from './components/Slider';
|
|
29
|
+
export type { SliderProps } from './components/Slider/Slider';
|
|
30
|
+
export { Toast } from './components/Toast';
|
|
31
|
+
export type { ToastProps, ToastVariant } from './components/Toast/Toast';
|
|
32
|
+
export { Tooltip } from './components/Tooltip';
|
|
33
|
+
export type { TooltipProps } from './components/Tooltip/Tooltip';
|
|
34
|
+
export { Dialog } from './components/Dialog';
|
|
35
|
+
export type { DialogProps } from './components/Dialog/Dialog';
|
|
36
|
+
export { Menu } from './components/Menu';
|
|
37
|
+
export type { MenuProps, MenuItemProps } from './components/Menu/Menu';
|
|
38
|
+
export { Table } from './components/Table';
|
|
39
|
+
export type { TableProps, Column } from './components/Table/Table';
|
|
40
|
+
export { Pagination } from './components/Pagination';
|
|
41
|
+
export type { PaginationProps } from './components/Pagination/Pagination';
|
|
42
|
+
export { Tabs } from './components/Tabs';
|
|
43
|
+
export type { TabsProps } from './components/Tabs/Tabs';
|
|
44
|
+
export { DatePicker } from './components/DatePicker';
|
|
45
|
+
export type { DatePickerProps } from './components/DatePicker/DatePicker';
|
|
46
|
+
export { Calendar } from './components/DatePicker';
|
|
47
|
+
export type { CalendarProps } from './components/DatePicker/Calendar';
|
|
48
|
+
export { DateRangePicker } from './components/DateRangePicker';
|
|
49
|
+
export type { DateRangePickerProps, DateRange } from './components/DateRangePicker/DateRangePicker';
|
|
50
|
+
export { Expander } from './components/Expander';
|
|
51
|
+
export type { ExpanderProps } from './components/Expander/Expander';
|