@crimson_/altarev 1.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/LICENSE +21 -0
- package/README.md +155 -0
- package/dist/index.cjs +3011 -0
- package/dist/index.d.cts +527 -0
- package/dist/index.d.ts +527 -0
- package/dist/index.js +2951 -0
- package/dist/styles.css +2 -0
- package/llms.txt +132 -0
- package/package.json +87 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,527 @@
|
|
|
1
|
+
import { ClassValue } from 'clsx';
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import { HTMLAttributes, ReactNode, ReactElement } from 'react';
|
|
4
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
5
|
+
import { VariantProps } from 'class-variance-authority';
|
|
6
|
+
import { DayPickerProps, DateRange } from 'react-day-picker';
|
|
7
|
+
|
|
8
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
9
|
+
|
|
10
|
+
type ContainerProps = HTMLAttributes<HTMLDivElement>;
|
|
11
|
+
declare function Container({ className, ...props }: ContainerProps): react.JSX.Element;
|
|
12
|
+
|
|
13
|
+
declare const accordion: (props?: ({
|
|
14
|
+
size?: "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
15
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
16
|
+
interface AccordionProps extends VariantProps<typeof accordion>, Omit<React.DetailsHTMLAttributes<HTMLDetailsElement>, "title"> {
|
|
17
|
+
title: ReactNode;
|
|
18
|
+
leading?: ReactNode;
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
}
|
|
21
|
+
declare function Accordion({ size, title, leading, children, className, ...props }: AccordionProps): react.JSX.Element;
|
|
22
|
+
|
|
23
|
+
declare const alert: (props?: ({
|
|
24
|
+
status?: "success" | "error" | "warning" | "info" | null | undefined;
|
|
25
|
+
styleVariant?: "colourful" | "outline" | "generic" | null | undefined;
|
|
26
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
27
|
+
interface AlertProps extends Omit<VariantProps<typeof alert>, "styleVariant">, React.HTMLAttributes<HTMLDivElement> {
|
|
28
|
+
variant?: NonNullable<VariantProps<typeof alert>["styleVariant"]>;
|
|
29
|
+
icon?: ReactNode;
|
|
30
|
+
trailing?: ReactNode;
|
|
31
|
+
children: ReactNode;
|
|
32
|
+
}
|
|
33
|
+
declare function Alert({ status, variant, icon, trailing, children, className, ...props }: AlertProps): react.JSX.Element;
|
|
34
|
+
|
|
35
|
+
interface EmptyStateProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
|
|
36
|
+
icon?: ReactNode;
|
|
37
|
+
title: ReactNode;
|
|
38
|
+
description?: ReactNode;
|
|
39
|
+
children?: ReactNode;
|
|
40
|
+
}
|
|
41
|
+
declare function EmptyState({ icon, title, description, children, className, ...props }: EmptyStateProps): react.JSX.Element;
|
|
42
|
+
|
|
43
|
+
declare const avatar: (props?: ({
|
|
44
|
+
size?: "sm" | "md" | "lg" | "xl" | "xs" | "2xl" | null | undefined;
|
|
45
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
46
|
+
declare const badgeCorner: {
|
|
47
|
+
readonly tr: "top-0 right-0";
|
|
48
|
+
readonly tl: "top-0 left-0";
|
|
49
|
+
readonly br: "bottom-0 right-0";
|
|
50
|
+
readonly bl: "bottom-0 left-0";
|
|
51
|
+
};
|
|
52
|
+
interface AvatarProps extends VariantProps<typeof avatar>, Omit<React.HTMLAttributes<HTMLSpanElement>, "children"> {
|
|
53
|
+
src?: string;
|
|
54
|
+
alt?: string;
|
|
55
|
+
children?: ReactNode;
|
|
56
|
+
badge?: keyof typeof badgeCorner;
|
|
57
|
+
badgeColor?: string;
|
|
58
|
+
}
|
|
59
|
+
declare function Avatar({ size, src, alt, children, badge, badgeColor, className, ...props }: AvatarProps): react.JSX.Element;
|
|
60
|
+
|
|
61
|
+
interface AuthCodeProps {
|
|
62
|
+
value: string;
|
|
63
|
+
onChange: (code: string) => void;
|
|
64
|
+
length?: number;
|
|
65
|
+
error?: boolean | string;
|
|
66
|
+
disabled?: boolean;
|
|
67
|
+
className?: string;
|
|
68
|
+
}
|
|
69
|
+
declare function AuthCode({ value, onChange, length, error, disabled, className, }: AuthCodeProps): react.JSX.Element;
|
|
70
|
+
|
|
71
|
+
interface BreadcrumbItem {
|
|
72
|
+
label: ReactNode;
|
|
73
|
+
href?: string;
|
|
74
|
+
}
|
|
75
|
+
interface BreadcrumbsProps extends Omit<React.HTMLAttributes<HTMLElement>, "children"> {
|
|
76
|
+
items: BreadcrumbItem[];
|
|
77
|
+
separator?: ReactNode;
|
|
78
|
+
maxItems?: number;
|
|
79
|
+
}
|
|
80
|
+
declare function Breadcrumbs({ items, separator, maxItems, className, ...props }: BreadcrumbsProps): react.JSX.Element;
|
|
81
|
+
|
|
82
|
+
declare const buttonVariants: (props?: ({
|
|
83
|
+
variant?: "fill" | "text" | "outline" | "ghost" | null | undefined;
|
|
84
|
+
color?: "success" | "error" | "warning" | "info" | "primary" | null | undefined;
|
|
85
|
+
size?: "sm" | "md" | "lg" | "xl" | "xs" | null | undefined;
|
|
86
|
+
iconOnly?: boolean | null | undefined;
|
|
87
|
+
fullWidth?: boolean | null | undefined;
|
|
88
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
89
|
+
interface ButtonProps extends Omit<VariantProps<typeof buttonVariants>, "iconOnly">, Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "color"> {
|
|
90
|
+
leftIcon?: ReactNode;
|
|
91
|
+
rightIcon?: ReactNode;
|
|
92
|
+
}
|
|
93
|
+
declare function Button({ variant, color, size, fullWidth, leftIcon, rightIcon, className, children, ...props }: ButtonProps): react.JSX.Element;
|
|
94
|
+
|
|
95
|
+
interface CarouselProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
|
|
96
|
+
children: ReactNode;
|
|
97
|
+
title?: ReactNode;
|
|
98
|
+
description?: ReactNode;
|
|
99
|
+
seeAllHref?: string;
|
|
100
|
+
arrows?: boolean;
|
|
101
|
+
indicators?: boolean;
|
|
102
|
+
autoSlide?: boolean;
|
|
103
|
+
interval?: number;
|
|
104
|
+
loop?: boolean;
|
|
105
|
+
gap?: number;
|
|
106
|
+
}
|
|
107
|
+
declare function Carousel({ children, title, description, seeAllHref, arrows, indicators, autoSlide, interval, loop, gap, className, ...props }: CarouselProps): react.JSX.Element;
|
|
108
|
+
|
|
109
|
+
interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type"> {
|
|
110
|
+
label?: ReactNode;
|
|
111
|
+
indeterminate?: boolean;
|
|
112
|
+
}
|
|
113
|
+
declare function Checkbox({ label, indeterminate, className, disabled, ...props }: CheckboxProps): react.JSX.Element;
|
|
114
|
+
|
|
115
|
+
declare const chip: (props?: ({
|
|
116
|
+
size?: "sm" | "md" | null | undefined;
|
|
117
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
118
|
+
interface ChipProps extends VariantProps<typeof chip>, React.HTMLAttributes<HTMLSpanElement> {
|
|
119
|
+
leading?: ReactNode;
|
|
120
|
+
trailing?: ReactNode;
|
|
121
|
+
onDismiss?: () => void;
|
|
122
|
+
}
|
|
123
|
+
declare function Chip({ size, leading, trailing, onDismiss, className, children, ...props }: ChipProps): react.JSX.Element;
|
|
124
|
+
|
|
125
|
+
declare const tag: (props?: ({
|
|
126
|
+
size?: "xs" | "2xs" | null | undefined;
|
|
127
|
+
uppercase?: boolean | null | undefined;
|
|
128
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
129
|
+
interface TagProps extends VariantProps<typeof tag>, React.HTMLAttributes<HTMLSpanElement> {
|
|
130
|
+
leading?: ReactNode;
|
|
131
|
+
trailing?: ReactNode;
|
|
132
|
+
}
|
|
133
|
+
declare function Tag({ size, uppercase, leading, trailing, className, children, ...props }: TagProps): react.JSX.Element;
|
|
134
|
+
|
|
135
|
+
interface RadioProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type"> {
|
|
136
|
+
label?: ReactNode;
|
|
137
|
+
}
|
|
138
|
+
declare function Radio({ label, className, disabled, ...props }: RadioProps): react.JSX.Element;
|
|
139
|
+
|
|
140
|
+
interface SearchProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "results"> {
|
|
141
|
+
value: string;
|
|
142
|
+
onValueChange: (value: string) => void;
|
|
143
|
+
results?: ReactNode;
|
|
144
|
+
loading?: boolean;
|
|
145
|
+
emptyState?: ReactNode;
|
|
146
|
+
resultsTitle?: ReactNode;
|
|
147
|
+
shortcut?: string;
|
|
148
|
+
mobile?: boolean;
|
|
149
|
+
open?: boolean;
|
|
150
|
+
onOpenChange?: (open: boolean) => void;
|
|
151
|
+
}
|
|
152
|
+
declare function Search({ value, onValueChange, results, loading, emptyState, resultsTitle, shortcut, mobile, open: controlledOpen, onOpenChange, placeholder, className, ...props }: SearchProps): react.JSX.Element;
|
|
153
|
+
|
|
154
|
+
declare const container: (props?: ({
|
|
155
|
+
size?: "sm" | "md" | null | undefined;
|
|
156
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
157
|
+
interface SegmentedItem {
|
|
158
|
+
value: string;
|
|
159
|
+
label?: ReactNode;
|
|
160
|
+
icon?: ReactNode;
|
|
161
|
+
}
|
|
162
|
+
interface SegmentedControlProps extends VariantProps<typeof container>, Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
163
|
+
items: SegmentedItem[];
|
|
164
|
+
value: string;
|
|
165
|
+
onChange: (value: string) => void;
|
|
166
|
+
}
|
|
167
|
+
declare function SegmentedControl({ items, value, onChange, size, className, ...props }: SegmentedControlProps): react.JSX.Element;
|
|
168
|
+
|
|
169
|
+
type TabsType = "default" | "pill" | "underline";
|
|
170
|
+
interface TabsProps {
|
|
171
|
+
value: string;
|
|
172
|
+
onValueChange: (value: string) => void;
|
|
173
|
+
type?: TabsType;
|
|
174
|
+
size?: "sm" | "md";
|
|
175
|
+
children: ReactNode;
|
|
176
|
+
className?: string;
|
|
177
|
+
}
|
|
178
|
+
declare function Tabs({ value, onValueChange, type, size, children, className, }: TabsProps): react.JSX.Element;
|
|
179
|
+
declare function TabList({ children, className, }: {
|
|
180
|
+
children: ReactNode;
|
|
181
|
+
className?: string;
|
|
182
|
+
}): react.JSX.Element;
|
|
183
|
+
interface TabProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "value"> {
|
|
184
|
+
value: string;
|
|
185
|
+
leading?: ReactNode;
|
|
186
|
+
trailing?: ReactNode;
|
|
187
|
+
}
|
|
188
|
+
declare function Tab({ value, leading, trailing, children, className, ...props }: TabProps): react.JSX.Element;
|
|
189
|
+
declare function TabPanel({ value, children, className, }: {
|
|
190
|
+
value: string;
|
|
191
|
+
children: ReactNode;
|
|
192
|
+
className?: string;
|
|
193
|
+
}): react.JSX.Element | null;
|
|
194
|
+
|
|
195
|
+
declare const field$2: (props?: ({
|
|
196
|
+
size?: "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
197
|
+
invalid?: boolean | null | undefined;
|
|
198
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
199
|
+
interface SelectProps extends VariantProps<typeof field$2>, Omit<React.SelectHTMLAttributes<HTMLSelectElement>, "size"> {
|
|
200
|
+
label?: ReactNode;
|
|
201
|
+
leadingIcon?: ReactNode;
|
|
202
|
+
error?: ReactNode;
|
|
203
|
+
helperText?: ReactNode;
|
|
204
|
+
}
|
|
205
|
+
declare function Select({ size, invalid, label, leadingIcon, error, helperText, className, id, disabled, children, ...props }: SelectProps): react.JSX.Element;
|
|
206
|
+
|
|
207
|
+
declare const field$1: (props?: ({
|
|
208
|
+
size?: "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
209
|
+
invalid?: boolean | null | undefined;
|
|
210
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
211
|
+
interface TextInputProps extends VariantProps<typeof field$1>, Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
212
|
+
label?: ReactNode;
|
|
213
|
+
leadingIcon?: ReactNode;
|
|
214
|
+
trailingIcon?: ReactNode;
|
|
215
|
+
error?: ReactNode;
|
|
216
|
+
helperText?: ReactNode;
|
|
217
|
+
floatingLabel?: boolean;
|
|
218
|
+
}
|
|
219
|
+
declare function TextInput({ size, invalid, label, leadingIcon, trailingIcon, error, helperText, floatingLabel, className, id, disabled, placeholder, ...props }: TextInputProps): react.JSX.Element;
|
|
220
|
+
|
|
221
|
+
type Direction = "vertical" | "horizontal";
|
|
222
|
+
interface GroupFieldProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
223
|
+
select?: boolean;
|
|
224
|
+
invalid?: boolean;
|
|
225
|
+
children?: ReactNode;
|
|
226
|
+
}
|
|
227
|
+
declare function GroupField({ select, invalid, className, children, ...props }: GroupFieldProps): react.JSX.Element;
|
|
228
|
+
interface TextInputGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
229
|
+
direction?: Direction;
|
|
230
|
+
errors?: ReactNode[];
|
|
231
|
+
children: ReactNode;
|
|
232
|
+
}
|
|
233
|
+
declare function TextInputGroup({ direction, errors, className, children, ...props }: TextInputGroupProps): react.JSX.Element;
|
|
234
|
+
|
|
235
|
+
declare const field: (props?: ({
|
|
236
|
+
invalid?: boolean | null | undefined;
|
|
237
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
238
|
+
interface TextareaProps extends VariantProps<typeof field>, React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
239
|
+
label?: ReactNode;
|
|
240
|
+
error?: ReactNode;
|
|
241
|
+
helperText?: ReactNode;
|
|
242
|
+
autoResize?: boolean;
|
|
243
|
+
}
|
|
244
|
+
declare function Textarea({ invalid, label, error, helperText, autoResize, className, id, disabled, value, onChange, rows, ...props }: TextareaProps): react.JSX.Element;
|
|
245
|
+
|
|
246
|
+
declare const track: (props?: ({
|
|
247
|
+
size?: "sm" | "xs" | "2xs" | null | undefined;
|
|
248
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
249
|
+
interface SwitchProps extends VariantProps<typeof track>, Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "size"> {
|
|
250
|
+
label?: ReactNode;
|
|
251
|
+
}
|
|
252
|
+
declare function Switch({ size, label, className, disabled, ...props }: SwitchProps): react.JSX.Element;
|
|
253
|
+
|
|
254
|
+
declare const cell: (props?: ({
|
|
255
|
+
size?: "sm" | "md" | "lg" | "xl" | "xs" | "2xl" | null | undefined;
|
|
256
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
257
|
+
declare function Table({ className, ...props }: React.TableHTMLAttributes<HTMLTableElement>): react.JSX.Element;
|
|
258
|
+
declare function TableHead({ className, ...props }: React.HTMLAttributes<HTMLTableSectionElement>): react.JSX.Element;
|
|
259
|
+
declare function TableBody(props: React.HTMLAttributes<HTMLTableSectionElement>): react.JSX.Element;
|
|
260
|
+
interface TableRowProps extends React.HTMLAttributes<HTMLTableRowElement> {
|
|
261
|
+
zebra?: boolean;
|
|
262
|
+
hover?: boolean;
|
|
263
|
+
selected?: boolean;
|
|
264
|
+
}
|
|
265
|
+
declare function TableRow({ zebra, hover, selected, className, ...props }: TableRowProps): react.JSX.Element;
|
|
266
|
+
interface TableCellProps extends VariantProps<typeof cell>, React.TdHTMLAttributes<HTMLTableCellElement> {
|
|
267
|
+
header?: boolean;
|
|
268
|
+
}
|
|
269
|
+
declare function TableCell({ size, header, className, ...props }: TableCellProps): react.JSX.Element;
|
|
270
|
+
interface TableColumn<T> {
|
|
271
|
+
key: string;
|
|
272
|
+
header: ReactNode;
|
|
273
|
+
cell: (row: T) => ReactNode;
|
|
274
|
+
}
|
|
275
|
+
declare function selectionState(selectedCount: number, total: number): {
|
|
276
|
+
checked: boolean;
|
|
277
|
+
indeterminate: boolean;
|
|
278
|
+
};
|
|
279
|
+
interface DataTableProps<T> extends VariantProps<typeof cell> {
|
|
280
|
+
columns: TableColumn<T>[];
|
|
281
|
+
data: T[];
|
|
282
|
+
rowKey: (row: T) => string;
|
|
283
|
+
zebra?: boolean;
|
|
284
|
+
selectable?: boolean;
|
|
285
|
+
selected?: string[];
|
|
286
|
+
onSelectedChange?: (keys: string[]) => void;
|
|
287
|
+
className?: string;
|
|
288
|
+
}
|
|
289
|
+
declare function DataTable<T>({ columns, data, rowKey, size, zebra, selectable, selected, onSelectedChange, className, }: DataTableProps<T>): react.JSX.Element;
|
|
290
|
+
|
|
291
|
+
type ToastPosition = "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right";
|
|
292
|
+
interface ToastOptions {
|
|
293
|
+
message: ReactNode;
|
|
294
|
+
icon?: ReactNode;
|
|
295
|
+
duration?: number;
|
|
296
|
+
closable?: boolean;
|
|
297
|
+
}
|
|
298
|
+
interface ToastContextValue {
|
|
299
|
+
toast: (options: ToastOptions) => number;
|
|
300
|
+
dismiss: (id: number) => void;
|
|
301
|
+
}
|
|
302
|
+
declare function useToast(): ToastContextValue;
|
|
303
|
+
interface ToastProviderProps {
|
|
304
|
+
children: ReactNode;
|
|
305
|
+
position?: ToastPosition;
|
|
306
|
+
defaultDuration?: number;
|
|
307
|
+
}
|
|
308
|
+
declare function ToastProvider({ children, position, defaultDuration, }: ToastProviderProps): react.JSX.Element;
|
|
309
|
+
interface SnackbarProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
|
|
310
|
+
icon?: ReactNode;
|
|
311
|
+
onClose?: () => void;
|
|
312
|
+
children: ReactNode;
|
|
313
|
+
}
|
|
314
|
+
declare function Snackbar({ icon, onClose, children, className, ...props }: SnackbarProps): react.JSX.Element;
|
|
315
|
+
|
|
316
|
+
interface PopoverProps {
|
|
317
|
+
trigger: ReactElement<{
|
|
318
|
+
ref?: React.Ref<HTMLElement>;
|
|
319
|
+
onClick?: (e: React.MouseEvent) => void;
|
|
320
|
+
"aria-expanded"?: boolean;
|
|
321
|
+
"aria-haspopup"?: boolean;
|
|
322
|
+
}>;
|
|
323
|
+
children: ReactNode;
|
|
324
|
+
open?: boolean;
|
|
325
|
+
onOpenChange?: (open: boolean) => void;
|
|
326
|
+
align?: "start" | "end";
|
|
327
|
+
className?: string;
|
|
328
|
+
}
|
|
329
|
+
declare function Popover({ trigger, children, open: controlledOpen, onOpenChange, align, className, }: PopoverProps): react.JSX.Element;
|
|
330
|
+
|
|
331
|
+
declare const bubble: (props?: ({
|
|
332
|
+
placement?: "bottom" | "left" | "right" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | null | undefined;
|
|
333
|
+
shadow?: boolean | null | undefined;
|
|
334
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
335
|
+
interface TooltipProps extends VariantProps<typeof bubble> {
|
|
336
|
+
content: ReactNode;
|
|
337
|
+
pointer?: boolean;
|
|
338
|
+
children: ReactNode;
|
|
339
|
+
className?: string;
|
|
340
|
+
}
|
|
341
|
+
declare function Tooltip({ content, placement, shadow, pointer, children, className, }: TooltipProps): react.JSX.Element;
|
|
342
|
+
|
|
343
|
+
interface SidebarProps extends React.HTMLAttributes<HTMLElement> {
|
|
344
|
+
collapsed?: boolean;
|
|
345
|
+
children: ReactNode;
|
|
346
|
+
}
|
|
347
|
+
declare function Sidebar({ collapsed, className, children, ...props }: SidebarProps): react.JSX.Element;
|
|
348
|
+
interface SidebarSectionProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
|
|
349
|
+
title?: ReactNode;
|
|
350
|
+
divider?: boolean;
|
|
351
|
+
children: ReactNode;
|
|
352
|
+
}
|
|
353
|
+
declare function SidebarSection({ title, divider, className, children, ...props }: SidebarSectionProps): react.JSX.Element;
|
|
354
|
+
interface SidebarItemProps extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "title"> {
|
|
355
|
+
icon?: ReactNode;
|
|
356
|
+
active?: boolean;
|
|
357
|
+
label: ReactNode;
|
|
358
|
+
}
|
|
359
|
+
declare function SidebarItem({ icon, active, label, href, className, ...props }: SidebarItemProps): react.JSX.Element;
|
|
360
|
+
|
|
361
|
+
type CalendarProps = DayPickerProps & {
|
|
362
|
+
className?: string;
|
|
363
|
+
};
|
|
364
|
+
declare function Calendar({ className, classNames, ...props }: CalendarProps): react.JSX.Element;
|
|
365
|
+
|
|
366
|
+
interface TimePickerProps {
|
|
367
|
+
value?: {
|
|
368
|
+
hours: number;
|
|
369
|
+
minutes: number;
|
|
370
|
+
};
|
|
371
|
+
onChange?: (value: {
|
|
372
|
+
hours: number;
|
|
373
|
+
minutes: number;
|
|
374
|
+
}) => void;
|
|
375
|
+
minuteStep?: number;
|
|
376
|
+
className?: string;
|
|
377
|
+
}
|
|
378
|
+
declare function TimePicker({ value, onChange, minuteStep, className, }: TimePickerProps): react.JSX.Element;
|
|
379
|
+
|
|
380
|
+
interface DateRangePreset {
|
|
381
|
+
label: ReactNode;
|
|
382
|
+
range: () => DateRange;
|
|
383
|
+
}
|
|
384
|
+
interface DateRangePickerProps {
|
|
385
|
+
value?: DateRange;
|
|
386
|
+
onApply?: (range: DateRange | undefined) => void;
|
|
387
|
+
presets?: DateRangePreset[];
|
|
388
|
+
numberOfMonths?: number;
|
|
389
|
+
className?: string;
|
|
390
|
+
}
|
|
391
|
+
interface PresetRanges {
|
|
392
|
+
today: DateRange;
|
|
393
|
+
yesterday: DateRange;
|
|
394
|
+
thisWeek: DateRange;
|
|
395
|
+
lastWeek: DateRange;
|
|
396
|
+
thisMonth: DateRange;
|
|
397
|
+
lastMonth: DateRange;
|
|
398
|
+
}
|
|
399
|
+
declare function presetRanges(now: Date): PresetRanges;
|
|
400
|
+
declare const defaultPresets: DateRangePreset[];
|
|
401
|
+
declare function DateRangePicker({ value, onApply, presets, numberOfMonths, className, }: DateRangePickerProps): react.JSX.Element;
|
|
402
|
+
|
|
403
|
+
interface QuarterValue {
|
|
404
|
+
year: number;
|
|
405
|
+
quarter: 1 | 2 | 3 | 4;
|
|
406
|
+
}
|
|
407
|
+
interface QuarterPickerProps {
|
|
408
|
+
value?: QuarterValue;
|
|
409
|
+
onChange?: (value: QuarterValue) => void;
|
|
410
|
+
year?: number;
|
|
411
|
+
onYearChange?: (year: number) => void;
|
|
412
|
+
className?: string;
|
|
413
|
+
}
|
|
414
|
+
declare function QuarterPicker({ value, onChange, year, onYearChange, className, }: QuarterPickerProps): react.JSX.Element;
|
|
415
|
+
|
|
416
|
+
declare const drawer: (props?: ({
|
|
417
|
+
side?: "bottom" | "left" | "right" | "top" | null | undefined;
|
|
418
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
419
|
+
interface DrawerProps extends VariantProps<typeof drawer>, Omit<React.DialogHTMLAttributes<HTMLDialogElement>, "open"> {
|
|
420
|
+
open: boolean;
|
|
421
|
+
onClose?: () => void;
|
|
422
|
+
children: ReactNode;
|
|
423
|
+
}
|
|
424
|
+
declare function Drawer({ open, onClose, side, className, children, ...props }: DrawerProps): react.JSX.Element;
|
|
425
|
+
|
|
426
|
+
declare const loader: (props?: ({
|
|
427
|
+
size?: "sm" | "md" | "lg" | "xs" | "2xs" | null | undefined;
|
|
428
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
429
|
+
interface LoaderProps extends VariantProps<typeof loader>, Omit<React.HTMLAttributes<HTMLSpanElement>, "children"> {
|
|
430
|
+
label?: string;
|
|
431
|
+
}
|
|
432
|
+
declare function Loader({ size, label, className, ...props }: LoaderProps): react.JSX.Element;
|
|
433
|
+
|
|
434
|
+
declare const modal: (props?: ({
|
|
435
|
+
size?: "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
436
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
437
|
+
interface ModalProps extends VariantProps<typeof modal>, Omit<React.DialogHTMLAttributes<HTMLDialogElement>, "open" | "title"> {
|
|
438
|
+
open: boolean;
|
|
439
|
+
onClose?: () => void;
|
|
440
|
+
title?: ReactNode;
|
|
441
|
+
children: ReactNode;
|
|
442
|
+
}
|
|
443
|
+
declare function Modal({ open, onClose, size, title, className, children, ...props }: ModalProps): react.JSX.Element;
|
|
444
|
+
|
|
445
|
+
declare const DOTS = "\u2026";
|
|
446
|
+
declare function paginationRange(current: number, total: number, siblings?: number): (number | typeof DOTS)[];
|
|
447
|
+
interface PaginationProps extends Omit<React.HTMLAttributes<HTMLElement>, "onChange"> {
|
|
448
|
+
page: number;
|
|
449
|
+
total: number;
|
|
450
|
+
siblings?: number;
|
|
451
|
+
onPageChange: (page: number) => void;
|
|
452
|
+
}
|
|
453
|
+
declare function Pagination({ page, total, siblings, onPageChange, className, ...props }: PaginationProps): react.JSX.Element;
|
|
454
|
+
|
|
455
|
+
declare function clampPercent(value: number): number;
|
|
456
|
+
declare const LINEAR_THICKNESS: {
|
|
457
|
+
readonly "6xs": "h-0.5";
|
|
458
|
+
readonly "5xs": "h-1";
|
|
459
|
+
readonly "4xs": "h-2";
|
|
460
|
+
readonly "3xs": "h-3";
|
|
461
|
+
readonly "2xs": "h-4";
|
|
462
|
+
};
|
|
463
|
+
declare const CIRCULAR_SIZE: {
|
|
464
|
+
readonly "2xs": 16;
|
|
465
|
+
readonly xs: 24;
|
|
466
|
+
readonly sm: 32;
|
|
467
|
+
readonly md: 40;
|
|
468
|
+
readonly lg: 48;
|
|
469
|
+
};
|
|
470
|
+
interface CommonProps {
|
|
471
|
+
value: number;
|
|
472
|
+
className?: string;
|
|
473
|
+
label?: string;
|
|
474
|
+
}
|
|
475
|
+
type ProgressProps = CommonProps & ({
|
|
476
|
+
variant?: "linear";
|
|
477
|
+
size?: keyof typeof LINEAR_THICKNESS;
|
|
478
|
+
} | {
|
|
479
|
+
variant: "circular";
|
|
480
|
+
size?: keyof typeof CIRCULAR_SIZE;
|
|
481
|
+
});
|
|
482
|
+
declare function Progress({ value, className, label, ...rest }: ProgressProps): react.JSX.Element;
|
|
483
|
+
|
|
484
|
+
interface DropdownProps {
|
|
485
|
+
trigger: ReactElement<{
|
|
486
|
+
ref?: React.Ref<HTMLElement>;
|
|
487
|
+
onClick?: (e: React.MouseEvent) => void;
|
|
488
|
+
"aria-expanded"?: boolean;
|
|
489
|
+
"aria-haspopup"?: boolean;
|
|
490
|
+
}>;
|
|
491
|
+
children: ReactNode;
|
|
492
|
+
align?: "start" | "end";
|
|
493
|
+
className?: string;
|
|
494
|
+
}
|
|
495
|
+
declare function Dropdown({ trigger, children, align, className, }: DropdownProps): react.JSX.Element;
|
|
496
|
+
interface DropdownItemProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
497
|
+
leading?: ReactNode;
|
|
498
|
+
trailing?: ReactNode;
|
|
499
|
+
description?: ReactNode;
|
|
500
|
+
selected?: boolean;
|
|
501
|
+
}
|
|
502
|
+
declare function DropdownItem({ leading, trailing, description, selected, children, className, onClick, disabled, ...props }: DropdownItemProps): react.JSX.Element;
|
|
503
|
+
|
|
504
|
+
interface ComboboxOption {
|
|
505
|
+
value: string;
|
|
506
|
+
label: string;
|
|
507
|
+
}
|
|
508
|
+
declare function filterOptions(options: ComboboxOption[], query: string): ComboboxOption[];
|
|
509
|
+
interface BaseProps {
|
|
510
|
+
options: ComboboxOption[];
|
|
511
|
+
placeholder?: string;
|
|
512
|
+
disabled?: boolean;
|
|
513
|
+
className?: string;
|
|
514
|
+
emptyMessage?: ReactNode;
|
|
515
|
+
}
|
|
516
|
+
type ComboboxProps = (BaseProps & {
|
|
517
|
+
multiple?: false;
|
|
518
|
+
value: string | null;
|
|
519
|
+
onChange: (value: string | null) => void;
|
|
520
|
+
}) | (BaseProps & {
|
|
521
|
+
multiple: true;
|
|
522
|
+
value: string[];
|
|
523
|
+
onChange: (value: string[]) => void;
|
|
524
|
+
});
|
|
525
|
+
declare function Combobox(props: ComboboxProps): react.JSX.Element;
|
|
526
|
+
|
|
527
|
+
export { Accordion, type AccordionProps, Alert, type AlertProps, AuthCode, type AuthCodeProps, Avatar, type AvatarProps, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, Calendar, type CalendarProps, Carousel, type CarouselProps, Checkbox, type CheckboxProps, Chip, type ChipProps, Combobox, type ComboboxOption, type ComboboxProps, Container, type ContainerProps, DataTable, type DataTableProps, DateRangePicker, type DateRangePickerProps, type DateRangePreset, Drawer, type DrawerProps, Dropdown, DropdownItem, type DropdownItemProps, type DropdownProps, EmptyState, type EmptyStateProps, GroupField, type GroupFieldProps, Loader, type LoaderProps, Modal, type ModalProps, Pagination, type PaginationProps, Popover, type PopoverProps, type PresetRanges, Progress, type ProgressProps, QuarterPicker, type QuarterPickerProps, type QuarterValue, Radio, type RadioProps, Search, type SearchProps, SegmentedControl, type SegmentedControlProps, type SegmentedItem, Select, type SelectProps, Sidebar, SidebarItem, type SidebarItemProps, type SidebarProps, SidebarSection, type SidebarSectionProps, Snackbar, type SnackbarProps, Switch, type SwitchProps, Tab, TabList, TabPanel, type TabProps, Table, TableBody, TableCell, type TableCellProps, type TableColumn, TableHead, TableRow, type TableRowProps, Tabs, type TabsProps, Tag, type TagProps, TextInput, TextInputGroup, type TextInputGroupProps, type TextInputProps, Textarea, type TextareaProps, TimePicker, type TimePickerProps, type ToastOptions, type ToastPosition, ToastProvider, type ToastProviderProps, Tooltip, type TooltipProps, buttonVariants, clampPercent, cn, defaultPresets, filterOptions, paginationRange, presetRanges, selectionState, useToast };
|