@galyan/ui 0.0.1
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/.turbo/turbo-build.log +20 -0
- package/dist/index.cjs +2291 -0
- package/dist/index.css +2558 -0
- package/dist/index.d.cts +498 -0
- package/dist/index.d.ts +498 -0
- package/dist/index.js +2235 -0
- package/eslint.config.mjs +4 -0
- package/package.json +43 -0
- package/src/accordion/Accordion.tsx +88 -0
- package/src/accordion/accordion.css +78 -0
- package/src/accordion/index.ts +2 -0
- package/src/animatednumber/AnimatedNumber.tsx +71 -0
- package/src/animatednumber/index.ts +2 -0
- package/src/banner/Banner.tsx +84 -0
- package/src/banner/banner.css +56 -0
- package/src/banner/index.ts +2 -0
- package/src/breadcrumb/Breadcrumb.tsx +94 -0
- package/src/breadcrumb/breadcrumb.css +58 -0
- package/src/breadcrumb/index.ts +2 -0
- package/src/button/Button.tsx +98 -0
- package/src/button/button.css +190 -0
- package/src/button/index.ts +2 -0
- package/src/button.tsx +20 -0
- package/src/calendar/Calendar.tsx +190 -0
- package/src/calendar/calendar.css +142 -0
- package/src/calendar/index.ts +2 -0
- package/src/card/Card.tsx +88 -0
- package/src/card/card.css +115 -0
- package/src/card/index.ts +2 -0
- package/src/card.tsx +27 -0
- package/src/chart/Chart.tsx +186 -0
- package/src/chart/index.ts +2 -0
- package/src/checkbox/Checkbox.tsx +101 -0
- package/src/checkbox/checkbox.css +76 -0
- package/src/checkbox/index.ts +2 -0
- package/src/chips/Chips.tsx +146 -0
- package/src/chips/chips.css +90 -0
- package/src/chips/index.ts +2 -0
- package/src/code.tsx +11 -0
- package/src/datepicker/DatePicker.tsx +104 -0
- package/src/datepicker/datepicker.css +22 -0
- package/src/datepicker/index.ts +2 -0
- package/src/dragdrop/DragDrop.tsx +168 -0
- package/src/dragdrop/dragdrop.css +122 -0
- package/src/dragdrop/index.ts +2 -0
- package/src/dropdown/Dropdown.tsx +176 -0
- package/src/dropdown/dropdown.css +118 -0
- package/src/dropdown/index.ts +2 -0
- package/src/fileupload/FileUpload.tsx +144 -0
- package/src/fileupload/fileupload.css +118 -0
- package/src/fileupload/index.ts +2 -0
- package/src/index.ts +28 -0
- package/src/input/Input.tsx +121 -0
- package/src/input/index.ts +2 -0
- package/src/input/input.css +120 -0
- package/src/menu/Menu.tsx +118 -0
- package/src/menu/index.ts +2 -0
- package/src/menu/menu.css +117 -0
- package/src/modal/Modal.tsx +103 -0
- package/src/modal/index.ts +2 -0
- package/src/modal/modal.css +79 -0
- package/src/progressbar/ProgressBar.tsx +68 -0
- package/src/progressbar/index.ts +2 -0
- package/src/progressbar/progressbar.css +73 -0
- package/src/radiogroup/RadioGroup.tsx +73 -0
- package/src/radiogroup/index.ts +2 -0
- package/src/radiogroup/radiogroup.css +80 -0
- package/src/skeleton/Skeleton.tsx +61 -0
- package/src/skeleton/index.ts +2 -0
- package/src/skeleton/skeleton.css +46 -0
- package/src/spinner/Spinner.tsx +29 -0
- package/src/spinner/index.ts +2 -0
- package/src/spinner/spinner.css +39 -0
- package/src/stepper/Stepper.tsx +127 -0
- package/src/stepper/index.ts +2 -0
- package/src/stepper/stepper.css +141 -0
- package/src/tab/Tabs.tsx +71 -0
- package/src/tab/index.ts +2 -0
- package/src/tab/tab.css +92 -0
- package/src/table/Table.tsx +205 -0
- package/src/table/index.ts +2 -0
- package/src/table/table.css +119 -0
- package/src/textarea/Textarea.tsx +102 -0
- package/src/textarea/index.ts +2 -0
- package/src/textarea/textarea.css +85 -0
- package/src/toaster/Toaster.tsx +108 -0
- package/src/toaster/index.ts +2 -0
- package/src/toaster/toaster.css +113 -0
- package/src/toggle/Toggle.tsx +88 -0
- package/src/toggle/index.ts +2 -0
- package/src/toggle/toggle.css +63 -0
- package/src/typography/Typography.tsx +58 -0
- package/src/typography/index.ts +2 -0
- package/src/typography/typography.css +102 -0
- package/tsconfig.json +13 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,498 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
type ButtonVariant = 'solid' | 'outline' | 'ghost' | 'soft' | 'link' | 'danger';
|
|
5
|
+
type ButtonSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
6
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
7
|
+
variant?: ButtonVariant;
|
|
8
|
+
size?: ButtonSize;
|
|
9
|
+
loading?: boolean;
|
|
10
|
+
fullWidth?: boolean;
|
|
11
|
+
leftIcon?: React.ReactNode;
|
|
12
|
+
rightIcon?: React.ReactNode;
|
|
13
|
+
/** Render as a different element (e.g. 'a' for links) */
|
|
14
|
+
as?: React.ElementType;
|
|
15
|
+
href?: string;
|
|
16
|
+
}
|
|
17
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
18
|
+
|
|
19
|
+
type TypographyVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'body-xl' | 'body-lg' | 'body-md' | 'body-sm' | 'body-xs' | 'caption-lg' | 'caption-md' | 'label' | 'code';
|
|
20
|
+
type TypographyColor = 'default' | 'muted' | 'subtle' | 'disabled' | 'inverse' | 'primary' | 'success' | 'warning' | 'danger' | 'info';
|
|
21
|
+
interface TypographyProps {
|
|
22
|
+
variant?: TypographyVariant;
|
|
23
|
+
color?: TypographyColor;
|
|
24
|
+
as?: React.ElementType;
|
|
25
|
+
truncate?: boolean;
|
|
26
|
+
className?: string;
|
|
27
|
+
children?: React.ReactNode;
|
|
28
|
+
id?: string;
|
|
29
|
+
htmlFor?: string;
|
|
30
|
+
style?: React.CSSProperties;
|
|
31
|
+
}
|
|
32
|
+
declare function Typography({ variant, color, as, truncate, className, children, ...rest }: TypographyProps): react_jsx_runtime.JSX.Element;
|
|
33
|
+
|
|
34
|
+
type InputSize = 'sm' | 'md' | 'lg';
|
|
35
|
+
interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
36
|
+
label?: string;
|
|
37
|
+
size?: InputSize;
|
|
38
|
+
error?: string;
|
|
39
|
+
helperText?: string;
|
|
40
|
+
leftIcon?: React.ReactNode;
|
|
41
|
+
rightIcon?: React.ReactNode;
|
|
42
|
+
clearable?: boolean;
|
|
43
|
+
onClear?: () => void;
|
|
44
|
+
required?: boolean;
|
|
45
|
+
fullWidth?: boolean;
|
|
46
|
+
}
|
|
47
|
+
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
48
|
+
|
|
49
|
+
interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
50
|
+
label?: string;
|
|
51
|
+
error?: string;
|
|
52
|
+
helperText?: string;
|
|
53
|
+
maxCharCount?: number;
|
|
54
|
+
autoResize?: boolean;
|
|
55
|
+
required?: boolean;
|
|
56
|
+
}
|
|
57
|
+
declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
58
|
+
|
|
59
|
+
type CheckboxSize = 'sm' | 'md' | 'lg';
|
|
60
|
+
interface CheckboxProps {
|
|
61
|
+
checked?: boolean;
|
|
62
|
+
defaultChecked?: boolean;
|
|
63
|
+
indeterminate?: boolean;
|
|
64
|
+
onChange?: (checked: boolean) => void;
|
|
65
|
+
disabled?: boolean;
|
|
66
|
+
label?: React.ReactNode;
|
|
67
|
+
description?: string;
|
|
68
|
+
size?: CheckboxSize;
|
|
69
|
+
id?: string;
|
|
70
|
+
name?: string;
|
|
71
|
+
value?: string;
|
|
72
|
+
className?: string;
|
|
73
|
+
}
|
|
74
|
+
declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
|
|
75
|
+
|
|
76
|
+
interface RadioOption {
|
|
77
|
+
value: string;
|
|
78
|
+
label: React.ReactNode;
|
|
79
|
+
disabled?: boolean;
|
|
80
|
+
}
|
|
81
|
+
interface RadioGroupProps {
|
|
82
|
+
options: RadioOption[];
|
|
83
|
+
value?: string;
|
|
84
|
+
defaultValue?: string;
|
|
85
|
+
onChange?: (value: string) => void;
|
|
86
|
+
orientation?: 'horizontal' | 'vertical';
|
|
87
|
+
groupLabel?: string;
|
|
88
|
+
name?: string;
|
|
89
|
+
disabled?: boolean;
|
|
90
|
+
className?: string;
|
|
91
|
+
}
|
|
92
|
+
declare function RadioGroup({ options, value, defaultValue, onChange, orientation, groupLabel, name, disabled, className, }: RadioGroupProps): react_jsx_runtime.JSX.Element;
|
|
93
|
+
|
|
94
|
+
type ToggleSize = 'sm' | 'md' | 'lg';
|
|
95
|
+
interface ToggleProps {
|
|
96
|
+
checked?: boolean;
|
|
97
|
+
defaultChecked?: boolean;
|
|
98
|
+
onChange?: (checked: boolean) => void;
|
|
99
|
+
disabled?: boolean;
|
|
100
|
+
label?: React.ReactNode;
|
|
101
|
+
labelPosition?: 'left' | 'right';
|
|
102
|
+
size?: ToggleSize;
|
|
103
|
+
id?: string;
|
|
104
|
+
name?: string;
|
|
105
|
+
className?: string;
|
|
106
|
+
}
|
|
107
|
+
declare const Toggle: React.ForwardRefExoticComponent<ToggleProps & React.RefAttributes<HTMLInputElement>>;
|
|
108
|
+
|
|
109
|
+
type ChipVariant = 'solid' | 'soft' | 'outline' | 'success' | 'warning' | 'danger' | 'neutral';
|
|
110
|
+
type ChipSize = 'sm' | 'md' | 'lg';
|
|
111
|
+
interface ChipProps {
|
|
112
|
+
children: React.ReactNode;
|
|
113
|
+
variant?: ChipVariant;
|
|
114
|
+
size?: ChipSize;
|
|
115
|
+
removable?: boolean;
|
|
116
|
+
onRemove?: () => void;
|
|
117
|
+
clickable?: boolean;
|
|
118
|
+
selected?: boolean;
|
|
119
|
+
onClick?: () => void;
|
|
120
|
+
icon?: React.ReactNode;
|
|
121
|
+
className?: string;
|
|
122
|
+
}
|
|
123
|
+
declare function Chip({ children, variant, size, removable, onRemove, clickable, selected, onClick, icon, className, }: ChipProps): react_jsx_runtime.JSX.Element;
|
|
124
|
+
interface ChipsInputProps {
|
|
125
|
+
values: string[];
|
|
126
|
+
onChange: (values: string[]) => void;
|
|
127
|
+
placeholder?: string;
|
|
128
|
+
disabled?: boolean;
|
|
129
|
+
maxItems?: number;
|
|
130
|
+
chipVariant?: ChipVariant;
|
|
131
|
+
className?: string;
|
|
132
|
+
}
|
|
133
|
+
declare function ChipsInput({ values, onChange, placeholder, disabled, maxItems, chipVariant, className, }: ChipsInputProps): react_jsx_runtime.JSX.Element;
|
|
134
|
+
|
|
135
|
+
type CardVariant = 'default' | 'elevated' | 'outlined' | 'filled';
|
|
136
|
+
type CardSize = 'sm' | 'md' | 'lg';
|
|
137
|
+
interface CardProps {
|
|
138
|
+
variant?: CardVariant;
|
|
139
|
+
size?: CardSize;
|
|
140
|
+
hoverable?: boolean;
|
|
141
|
+
className?: string;
|
|
142
|
+
children?: React.ReactNode;
|
|
143
|
+
onClick?: () => void;
|
|
144
|
+
style?: React.CSSProperties;
|
|
145
|
+
}
|
|
146
|
+
declare function Card({ variant, size, hoverable, className, children, onClick, style }: CardProps): react_jsx_runtime.JSX.Element;
|
|
147
|
+
declare function CardHeader({ children, className }: {
|
|
148
|
+
children?: React.ReactNode;
|
|
149
|
+
className?: string;
|
|
150
|
+
}): react_jsx_runtime.JSX.Element;
|
|
151
|
+
declare function CardBody({ children, size, className }: {
|
|
152
|
+
children?: React.ReactNode;
|
|
153
|
+
size?: CardSize;
|
|
154
|
+
className?: string;
|
|
155
|
+
}): react_jsx_runtime.JSX.Element;
|
|
156
|
+
declare function CardFooter({ children, className }: {
|
|
157
|
+
children?: React.ReactNode;
|
|
158
|
+
className?: string;
|
|
159
|
+
}): react_jsx_runtime.JSX.Element;
|
|
160
|
+
interface CardInfoProps {
|
|
161
|
+
title: string;
|
|
162
|
+
value: string | number;
|
|
163
|
+
icon?: React.ReactNode;
|
|
164
|
+
trend?: {
|
|
165
|
+
value: number;
|
|
166
|
+
label?: string;
|
|
167
|
+
};
|
|
168
|
+
footer?: string;
|
|
169
|
+
className?: string;
|
|
170
|
+
}
|
|
171
|
+
declare function CardInfo({ title, value, icon, trend, footer, className }: CardInfoProps): react_jsx_runtime.JSX.Element;
|
|
172
|
+
|
|
173
|
+
type SpinnerSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
174
|
+
type SpinnerColor = 'primary' | 'white' | 'neutral';
|
|
175
|
+
interface SpinnerProps {
|
|
176
|
+
size?: SpinnerSize;
|
|
177
|
+
color?: SpinnerColor;
|
|
178
|
+
label?: string;
|
|
179
|
+
className?: string;
|
|
180
|
+
}
|
|
181
|
+
declare function Spinner({ size, color, label, className }: SpinnerProps): react_jsx_runtime.JSX.Element;
|
|
182
|
+
|
|
183
|
+
type ProgressSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
184
|
+
type ProgressColor = 'primary' | 'success' | 'warning' | 'danger' | 'gradient';
|
|
185
|
+
interface ProgressBarProps {
|
|
186
|
+
value?: number;
|
|
187
|
+
max?: number;
|
|
188
|
+
size?: ProgressSize;
|
|
189
|
+
color?: ProgressColor;
|
|
190
|
+
label?: string;
|
|
191
|
+
showValue?: boolean;
|
|
192
|
+
striped?: boolean;
|
|
193
|
+
indeterminate?: boolean;
|
|
194
|
+
className?: string;
|
|
195
|
+
}
|
|
196
|
+
declare function ProgressBar({ value, max, size, color, label, showValue, striped, indeterminate, className, }: ProgressBarProps): react_jsx_runtime.JSX.Element;
|
|
197
|
+
|
|
198
|
+
type SkeletonShape = 'text' | 'circle' | 'rect' | 'card';
|
|
199
|
+
type SkeletonAnimation = 'wave' | 'pulse' | 'none';
|
|
200
|
+
interface SkeletonProps {
|
|
201
|
+
shape?: SkeletonShape;
|
|
202
|
+
animation?: SkeletonAnimation;
|
|
203
|
+
width?: string | number;
|
|
204
|
+
height?: string | number;
|
|
205
|
+
className?: string;
|
|
206
|
+
lines?: number;
|
|
207
|
+
gap?: string;
|
|
208
|
+
}
|
|
209
|
+
declare function Skeleton({ shape, animation, width, height, className, lines, gap, }: SkeletonProps): react_jsx_runtime.JSX.Element;
|
|
210
|
+
|
|
211
|
+
type BannerVariant = 'info' | 'success' | 'warning' | 'danger' | 'neutral';
|
|
212
|
+
type BannerLayout = 'inline' | 'full';
|
|
213
|
+
interface BannerProps {
|
|
214
|
+
variant?: BannerVariant;
|
|
215
|
+
layout?: BannerLayout;
|
|
216
|
+
title?: string;
|
|
217
|
+
description?: React.ReactNode;
|
|
218
|
+
icon?: React.ReactNode;
|
|
219
|
+
dismissible?: boolean;
|
|
220
|
+
onDismiss?: () => void;
|
|
221
|
+
className?: string;
|
|
222
|
+
}
|
|
223
|
+
declare function Banner({ variant, layout, title, description, icon, dismissible, onDismiss, className, }: BannerProps): react_jsx_runtime.JSX.Element | null;
|
|
224
|
+
|
|
225
|
+
interface BreadcrumbItem {
|
|
226
|
+
label: string;
|
|
227
|
+
href?: string;
|
|
228
|
+
onClick?: () => void;
|
|
229
|
+
}
|
|
230
|
+
interface BreadcrumbProps {
|
|
231
|
+
items: BreadcrumbItem[];
|
|
232
|
+
separator?: React.ReactNode;
|
|
233
|
+
maxItems?: number;
|
|
234
|
+
className?: string;
|
|
235
|
+
}
|
|
236
|
+
declare function Breadcrumb({ items, separator, maxItems, className, }: BreadcrumbProps): react_jsx_runtime.JSX.Element;
|
|
237
|
+
|
|
238
|
+
interface AnimatedNumberProps {
|
|
239
|
+
value: number;
|
|
240
|
+
duration?: number;
|
|
241
|
+
format?: (n: number) => string;
|
|
242
|
+
className?: string;
|
|
243
|
+
prefix?: string;
|
|
244
|
+
suffix?: string;
|
|
245
|
+
decimals?: number;
|
|
246
|
+
easing?: 'linear' | 'easeOut' | 'easeInOut';
|
|
247
|
+
}
|
|
248
|
+
declare function AnimatedNumber({ value, duration, format, className, prefix, suffix, decimals, easing, }: AnimatedNumberProps): react_jsx_runtime.JSX.Element;
|
|
249
|
+
|
|
250
|
+
interface AccordionItemDef {
|
|
251
|
+
id: string;
|
|
252
|
+
title: React.ReactNode;
|
|
253
|
+
content: React.ReactNode;
|
|
254
|
+
disabled?: boolean;
|
|
255
|
+
}
|
|
256
|
+
interface AccordionProps {
|
|
257
|
+
items: AccordionItemDef[];
|
|
258
|
+
/** 'single' = only one open at a time, 'multiple' = multiple can be open */
|
|
259
|
+
type?: 'single' | 'multiple';
|
|
260
|
+
defaultOpen?: string | string[];
|
|
261
|
+
flush?: boolean;
|
|
262
|
+
className?: string;
|
|
263
|
+
}
|
|
264
|
+
declare function Accordion({ items, type, defaultOpen, flush, className }: AccordionProps): react_jsx_runtime.JSX.Element;
|
|
265
|
+
|
|
266
|
+
interface TabItem {
|
|
267
|
+
id: string;
|
|
268
|
+
label: React.ReactNode;
|
|
269
|
+
content: React.ReactNode;
|
|
270
|
+
disabled?: boolean;
|
|
271
|
+
badge?: string | number;
|
|
272
|
+
icon?: React.ReactNode;
|
|
273
|
+
}
|
|
274
|
+
interface TabsProps {
|
|
275
|
+
items: TabItem[];
|
|
276
|
+
defaultTab?: string;
|
|
277
|
+
activeTab?: string;
|
|
278
|
+
onChange?: (id: string) => void;
|
|
279
|
+
orientation?: 'horizontal' | 'vertical';
|
|
280
|
+
className?: string;
|
|
281
|
+
}
|
|
282
|
+
declare function Tabs({ items, defaultTab, activeTab, onChange, orientation, className }: TabsProps): react_jsx_runtime.JSX.Element;
|
|
283
|
+
|
|
284
|
+
type ModalSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
285
|
+
interface ModalProps {
|
|
286
|
+
open: boolean;
|
|
287
|
+
onClose: () => void;
|
|
288
|
+
title?: React.ReactNode;
|
|
289
|
+
size?: ModalSize;
|
|
290
|
+
children?: React.ReactNode;
|
|
291
|
+
footer?: React.ReactNode;
|
|
292
|
+
closeOnBackdrop?: boolean;
|
|
293
|
+
closeOnEscape?: boolean;
|
|
294
|
+
className?: string;
|
|
295
|
+
}
|
|
296
|
+
declare function Modal({ open, onClose, title, size, children, footer, closeOnBackdrop, closeOnEscape, className, }: ModalProps): React.ReactPortal | null;
|
|
297
|
+
|
|
298
|
+
interface DropdownOption {
|
|
299
|
+
value: string;
|
|
300
|
+
label: React.ReactNode;
|
|
301
|
+
disabled?: boolean;
|
|
302
|
+
group?: string;
|
|
303
|
+
icon?: React.ReactNode;
|
|
304
|
+
}
|
|
305
|
+
interface DropdownProps {
|
|
306
|
+
options: DropdownOption[];
|
|
307
|
+
value?: string;
|
|
308
|
+
onChange?: (value: string) => void;
|
|
309
|
+
placeholder?: string;
|
|
310
|
+
searchable?: boolean;
|
|
311
|
+
disabled?: boolean;
|
|
312
|
+
label?: string;
|
|
313
|
+
error?: string;
|
|
314
|
+
className?: string;
|
|
315
|
+
id?: string;
|
|
316
|
+
}
|
|
317
|
+
declare function Dropdown({ options, value, onChange, placeholder, searchable, disabled, label, error, className, id, }: DropdownProps): react_jsx_runtime.JSX.Element;
|
|
318
|
+
|
|
319
|
+
type TooltipPosition = 'top' | 'bottom' | 'left' | 'right';
|
|
320
|
+
interface TooltipProps {
|
|
321
|
+
content: React.ReactNode;
|
|
322
|
+
children: React.ReactElement;
|
|
323
|
+
position?: TooltipPosition;
|
|
324
|
+
delay?: number;
|
|
325
|
+
disabled?: boolean;
|
|
326
|
+
}
|
|
327
|
+
declare function Tooltip({ content, children, position, delay, disabled }: TooltipProps): react_jsx_runtime.JSX.Element;
|
|
328
|
+
interface MenuItemDef {
|
|
329
|
+
id: string;
|
|
330
|
+
label: React.ReactNode;
|
|
331
|
+
icon?: React.ReactNode;
|
|
332
|
+
onClick?: () => void;
|
|
333
|
+
disabled?: boolean;
|
|
334
|
+
danger?: boolean;
|
|
335
|
+
badge?: string;
|
|
336
|
+
separator?: never;
|
|
337
|
+
groupLabel?: never;
|
|
338
|
+
}
|
|
339
|
+
interface MenuSeparator {
|
|
340
|
+
separator: true;
|
|
341
|
+
id: string;
|
|
342
|
+
}
|
|
343
|
+
interface MenuGroupLabel {
|
|
344
|
+
groupLabel: string;
|
|
345
|
+
id: string;
|
|
346
|
+
}
|
|
347
|
+
type MenuEntry = MenuItemDef | MenuSeparator | MenuGroupLabel;
|
|
348
|
+
interface MenuProps {
|
|
349
|
+
items: MenuEntry[];
|
|
350
|
+
trigger: React.ReactElement;
|
|
351
|
+
position?: 'bottom-left' | 'bottom-right' | 'top-left' | 'top-right';
|
|
352
|
+
className?: string;
|
|
353
|
+
}
|
|
354
|
+
declare function Menu({ items, trigger, position, className }: MenuProps): react_jsx_runtime.JSX.Element;
|
|
355
|
+
|
|
356
|
+
type ToastVariant = 'success' | 'error' | 'warning' | 'info' | 'loading';
|
|
357
|
+
type ToastPosition = 'top-right' | 'top-left' | 'top-center' | 'bottom-right' | 'bottom-left' | 'bottom-center';
|
|
358
|
+
interface Toast {
|
|
359
|
+
id: string;
|
|
360
|
+
title: string;
|
|
361
|
+
description?: string;
|
|
362
|
+
variant?: ToastVariant;
|
|
363
|
+
duration?: number;
|
|
364
|
+
dismissible?: boolean;
|
|
365
|
+
}
|
|
366
|
+
interface ToastContextValue {
|
|
367
|
+
toasts: Toast[];
|
|
368
|
+
toast: (toast: Omit<Toast, 'id'>) => string;
|
|
369
|
+
dismiss: (id: string) => void;
|
|
370
|
+
dismissAll: () => void;
|
|
371
|
+
}
|
|
372
|
+
declare function ToasterProvider({ children, position }: {
|
|
373
|
+
children: React.ReactNode;
|
|
374
|
+
position?: ToastPosition;
|
|
375
|
+
}): react_jsx_runtime.JSX.Element;
|
|
376
|
+
declare function useToast(): ToastContextValue;
|
|
377
|
+
|
|
378
|
+
type StepStatus = 'upcoming' | 'active' | 'completed' | 'error';
|
|
379
|
+
interface Step {
|
|
380
|
+
id: string;
|
|
381
|
+
label: string;
|
|
382
|
+
description?: string;
|
|
383
|
+
content?: React.ReactNode;
|
|
384
|
+
optional?: boolean;
|
|
385
|
+
}
|
|
386
|
+
interface StepperProps {
|
|
387
|
+
steps: Step[];
|
|
388
|
+
activeStep?: number;
|
|
389
|
+
defaultStep?: number;
|
|
390
|
+
/** 'linear' = must complete in order; 'free' = can jump to any step */
|
|
391
|
+
variant?: 'linear' | 'free';
|
|
392
|
+
orientation?: 'horizontal' | 'vertical';
|
|
393
|
+
onStepChange?: (index: number) => void;
|
|
394
|
+
onComplete?: () => void;
|
|
395
|
+
className?: string;
|
|
396
|
+
}
|
|
397
|
+
declare function Stepper({ steps, activeStep: controlledStep, defaultStep, variant, orientation, onStepChange, onComplete, className, }: StepperProps): react_jsx_runtime.JSX.Element;
|
|
398
|
+
|
|
399
|
+
type SortDirection = 'asc' | 'desc';
|
|
400
|
+
interface Column<T> {
|
|
401
|
+
key: string;
|
|
402
|
+
header: React.ReactNode;
|
|
403
|
+
accessor: (row: T) => React.ReactNode;
|
|
404
|
+
sortable?: boolean;
|
|
405
|
+
width?: string;
|
|
406
|
+
align?: 'left' | 'center' | 'right';
|
|
407
|
+
}
|
|
408
|
+
interface TableProps<T> {
|
|
409
|
+
columns: Column<T>[];
|
|
410
|
+
data: T[];
|
|
411
|
+
rowKey: (row: T) => string;
|
|
412
|
+
selectable?: boolean;
|
|
413
|
+
selectedRows?: string[];
|
|
414
|
+
onSelectionChange?: (keys: string[]) => void;
|
|
415
|
+
pageSize?: number;
|
|
416
|
+
emptyMessage?: React.ReactNode;
|
|
417
|
+
className?: string;
|
|
418
|
+
stickyHeader?: boolean;
|
|
419
|
+
}
|
|
420
|
+
declare function Table<T>({ columns, data, rowKey, selectable, selectedRows, onSelectionChange, pageSize, emptyMessage, className, stickyHeader, }: TableProps<T>): react_jsx_runtime.JSX.Element;
|
|
421
|
+
|
|
422
|
+
interface ReorderListProps<T> {
|
|
423
|
+
items: T[];
|
|
424
|
+
onReorder: (newItems: T[]) => void;
|
|
425
|
+
keyExtractor: (item: T) => string;
|
|
426
|
+
renderItem: (item: T, isDragging: boolean) => React.ReactNode;
|
|
427
|
+
className?: string;
|
|
428
|
+
}
|
|
429
|
+
declare function ReorderList<T>({ items, onReorder, keyExtractor, renderItem, className }: ReorderListProps<T>): react_jsx_runtime.JSX.Element;
|
|
430
|
+
interface KanbanColumnDef<T> {
|
|
431
|
+
id: string;
|
|
432
|
+
title: string;
|
|
433
|
+
items: T[];
|
|
434
|
+
}
|
|
435
|
+
interface KanbanBoardProps<T> {
|
|
436
|
+
columns: KanbanColumnDef<T>[];
|
|
437
|
+
onMove: (itemKey: string, fromCol: string, toCol: string, toIndex: number) => void;
|
|
438
|
+
keyExtractor: (item: T) => string;
|
|
439
|
+
renderCard: (item: T, isDragging: boolean) => React.ReactNode;
|
|
440
|
+
className?: string;
|
|
441
|
+
}
|
|
442
|
+
declare function KanbanBoard<T>({ columns, onMove, keyExtractor, renderCard, className }: KanbanBoardProps<T>): react_jsx_runtime.JSX.Element;
|
|
443
|
+
|
|
444
|
+
interface FileUploadProps {
|
|
445
|
+
onFilesSelected?: (files: File[]) => void;
|
|
446
|
+
multiple?: boolean;
|
|
447
|
+
accept?: string;
|
|
448
|
+
maxSize?: number;
|
|
449
|
+
maxFiles?: number;
|
|
450
|
+
disabled?: boolean;
|
|
451
|
+
label?: string;
|
|
452
|
+
helperText?: string;
|
|
453
|
+
className?: string;
|
|
454
|
+
}
|
|
455
|
+
declare function FileUpload({ onFilesSelected, multiple, accept, maxSize, maxFiles, disabled, label, helperText, className, }: FileUploadProps): react_jsx_runtime.JSX.Element;
|
|
456
|
+
|
|
457
|
+
interface CalendarProps {
|
|
458
|
+
mode?: 'single' | 'range';
|
|
459
|
+
value?: Date | [Date, Date];
|
|
460
|
+
onChange?: (date: Date | [Date, Date]) => void;
|
|
461
|
+
minDate?: Date;
|
|
462
|
+
maxDate?: Date;
|
|
463
|
+
className?: string;
|
|
464
|
+
style?: React.CSSProperties;
|
|
465
|
+
}
|
|
466
|
+
declare function Calendar({ mode, value, onChange, minDate, maxDate, className, style }: CalendarProps): react_jsx_runtime.JSX.Element;
|
|
467
|
+
|
|
468
|
+
interface DatePickerProps extends Omit<CalendarProps, 'className'> {
|
|
469
|
+
label?: string;
|
|
470
|
+
placeholder?: string;
|
|
471
|
+
disabled?: boolean;
|
|
472
|
+
error?: string;
|
|
473
|
+
helperText?: string;
|
|
474
|
+
className?: string;
|
|
475
|
+
}
|
|
476
|
+
declare function DatePicker({ mode, value, onChange, minDate, maxDate, label, placeholder, disabled, error, helperText, className, }: DatePickerProps): react_jsx_runtime.JSX.Element;
|
|
477
|
+
|
|
478
|
+
type ChartType = 'line' | 'bar' | 'area' | 'pie' | 'donut';
|
|
479
|
+
interface ChartSeries {
|
|
480
|
+
key: string;
|
|
481
|
+
name?: string;
|
|
482
|
+
color?: string;
|
|
483
|
+
}
|
|
484
|
+
interface ChartProps {
|
|
485
|
+
type: ChartType;
|
|
486
|
+
data: any[];
|
|
487
|
+
xAxisKey?: string;
|
|
488
|
+
series?: ChartSeries[];
|
|
489
|
+
nameKey?: string;
|
|
490
|
+
valueKey?: string;
|
|
491
|
+
height?: number | string;
|
|
492
|
+
showGrid?: boolean;
|
|
493
|
+
showLegend?: boolean;
|
|
494
|
+
className?: string;
|
|
495
|
+
}
|
|
496
|
+
declare function Chart({ type, data, xAxisKey, series, nameKey, valueKey, height, showGrid, showLegend, className, }: ChartProps): react_jsx_runtime.JSX.Element;
|
|
497
|
+
|
|
498
|
+
export { Accordion, type AccordionItemDef, type AccordionProps, AnimatedNumber, type AnimatedNumberProps, Banner, type BannerLayout, type BannerProps, type BannerVariant, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Calendar, type CalendarProps, Card, CardBody, CardFooter, CardHeader, CardInfo, type CardInfoProps, type CardProps, type CardSize, type CardVariant, Chart, type ChartProps, type ChartSeries, type ChartType, Checkbox, type CheckboxProps, type CheckboxSize, Chip, type ChipProps, type ChipSize, type ChipVariant, ChipsInput, type ChipsInputProps, type Column, DatePicker, type DatePickerProps, Dropdown, type DropdownOption, type DropdownProps, FileUpload, type FileUploadProps, Input, type InputProps, type InputSize, KanbanBoard, type KanbanBoardProps, type KanbanColumnDef, Menu, type MenuEntry, type MenuItemDef, type MenuProps, Modal, type ModalProps, type ModalSize, ProgressBar, type ProgressBarProps, type ProgressColor, type ProgressSize, RadioGroup, type RadioGroupProps, type RadioOption, ReorderList, type ReorderListProps, Skeleton, type SkeletonAnimation, type SkeletonProps, type SkeletonShape, type SortDirection, Spinner, type SpinnerColor, type SpinnerProps, type SpinnerSize, type Step, type StepStatus, Stepper, type StepperProps, type TabItem, Table, type TableProps, Tabs, type TabsProps, Textarea, type TextareaProps, type Toast, type ToastPosition, type ToastVariant, ToasterProvider, Toggle, type ToggleProps, type ToggleSize, Tooltip, type TooltipPosition, type TooltipProps, Typography, type TypographyColor, type TypographyProps, type TypographyVariant, useToast };
|