@yomologic/react-ui 0.2.7 → 0.4.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 +48 -41
- package/dist/base.css +294 -0
- package/dist/index.d.mts +732 -338
- package/dist/index.d.ts +732 -338
- package/dist/index.js +3856 -1225
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3842 -1220
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1535 -400
- package/dist/styles.css.map +1 -1
- package/package.json +25 -5
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
3
3
|
import { ClassValue } from 'clsx';
|
|
4
4
|
|
|
5
5
|
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
6
|
-
variant?: "primary" | "secondary" | "outline" | "ghost" | "
|
|
6
|
+
variant?: "primary" | "secondary" | "outline" | "ghost" | "info" | "success" | "warning" | "error";
|
|
7
7
|
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
8
8
|
isLoading?: boolean;
|
|
9
9
|
leftIcon?: React.ReactNode;
|
|
@@ -11,13 +11,59 @@ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
11
11
|
}
|
|
12
12
|
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
13
13
|
|
|
14
|
-
interface
|
|
14
|
+
interface FormState {
|
|
15
|
+
values: Record<string, any>;
|
|
16
|
+
errors: Record<string, string>;
|
|
17
|
+
touched: Record<string, boolean>;
|
|
18
|
+
isSubmitting: boolean;
|
|
19
|
+
isSubmitted: boolean;
|
|
20
|
+
}
|
|
21
|
+
interface FormContextValue extends FormState {
|
|
22
|
+
registerField: (name: string, validate?: ValidationFunction) => void;
|
|
23
|
+
unregisterField: (name: string) => void;
|
|
24
|
+
setFieldValue: (name: string, value: any) => void;
|
|
25
|
+
setFieldTouched: (name: string, touched: boolean) => void;
|
|
26
|
+
validateField: (name: string, value?: any) => Promise<void>;
|
|
27
|
+
getFieldError: (name: string) => string | undefined;
|
|
28
|
+
shouldShowError: (name: string) => boolean;
|
|
29
|
+
}
|
|
30
|
+
type ValidationFunction = (value: any) => string | undefined | Promise<string | undefined>;
|
|
31
|
+
interface FormProps {
|
|
32
|
+
children: ReactNode;
|
|
33
|
+
onSubmit: (values: Record<string, any>) => void | Promise<void>;
|
|
34
|
+
className?: string;
|
|
35
|
+
spacing?: "none" | "dense" | "normal";
|
|
36
|
+
}
|
|
37
|
+
declare function useFormContext(): FormContextValue;
|
|
38
|
+
declare function useForm(): FormContextValue | null;
|
|
39
|
+
declare function Form({ children, onSubmit, className, spacing, }: FormProps): react_jsx_runtime.JSX.Element;
|
|
40
|
+
|
|
41
|
+
interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "pattern"> {
|
|
42
|
+
/** Field name - required when used inside Form */
|
|
43
|
+
name?: string;
|
|
15
44
|
label?: string;
|
|
16
45
|
error?: string;
|
|
17
46
|
helperText?: string;
|
|
18
47
|
leftIcon?: React.ReactNode;
|
|
19
48
|
rightIcon?: React.ReactNode;
|
|
20
49
|
fullWidth?: boolean;
|
|
50
|
+
/** Custom validation function that returns error message or undefined if valid */
|
|
51
|
+
validate?: ValidationFunction;
|
|
52
|
+
/** Callback when validation error changes */
|
|
53
|
+
onValidationError?: (error: string | undefined) => void;
|
|
54
|
+
/** Regex pattern for validation (string or RegExp) */
|
|
55
|
+
pattern?: RegExp | string;
|
|
56
|
+
/** Custom error messages for built-in validations */
|
|
57
|
+
errorMessages?: {
|
|
58
|
+
required?: string;
|
|
59
|
+
minLength?: string;
|
|
60
|
+
maxLength?: string;
|
|
61
|
+
min?: string;
|
|
62
|
+
max?: string;
|
|
63
|
+
pattern?: string;
|
|
64
|
+
email?: string;
|
|
65
|
+
url?: string;
|
|
66
|
+
};
|
|
21
67
|
}
|
|
22
68
|
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
23
69
|
|
|
@@ -32,24 +78,49 @@ declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HT
|
|
|
32
78
|
declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
33
79
|
declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
34
80
|
declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
81
|
+
interface CardMediaProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
82
|
+
image?: string;
|
|
83
|
+
video?: string;
|
|
84
|
+
component?: "img" | "video" | "div";
|
|
85
|
+
aspectRatio?: "16/9" | "4/3" | "1/1" | "21/9" | string;
|
|
86
|
+
alt?: string;
|
|
87
|
+
}
|
|
88
|
+
declare const CardMedia: React.ForwardRefExoticComponent<CardMediaProps & React.RefAttributes<HTMLDivElement>>;
|
|
89
|
+
interface CardActionsProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
90
|
+
disableSpacing?: boolean;
|
|
91
|
+
}
|
|
92
|
+
declare const CardActions: React.ForwardRefExoticComponent<CardActionsProps & React.RefAttributes<HTMLDivElement>>;
|
|
93
|
+
interface CardActionAreaProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
94
|
+
disabled?: boolean;
|
|
95
|
+
}
|
|
96
|
+
declare const CardActionArea: React.ForwardRefExoticComponent<CardActionAreaProps & React.RefAttributes<HTMLDivElement>>;
|
|
35
97
|
|
|
36
98
|
interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
37
|
-
variant?: "default" | "
|
|
99
|
+
variant?: "default" | "info" | "success" | "warning" | "error";
|
|
38
100
|
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
39
|
-
|
|
101
|
+
leftIcon?: React.ReactNode;
|
|
102
|
+
rightIcon?: React.ReactNode;
|
|
40
103
|
}
|
|
41
104
|
declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLSpanElement>>;
|
|
42
105
|
|
|
43
106
|
interface CheckboxProps {
|
|
44
107
|
label?: string;
|
|
108
|
+
name?: string;
|
|
45
109
|
checked?: boolean;
|
|
46
110
|
onChange?: (checked: boolean) => void;
|
|
47
111
|
disabled?: boolean;
|
|
48
112
|
className?: string;
|
|
49
113
|
id?: string;
|
|
50
114
|
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
51
|
-
|
|
52
|
-
|
|
115
|
+
required?: boolean;
|
|
116
|
+
/** Custom validation function that returns error message or undefined if valid */
|
|
117
|
+
validate?: ValidationFunction;
|
|
118
|
+
/** Callback when validation error changes */
|
|
119
|
+
onValidationError?: (error: string | undefined) => void;
|
|
120
|
+
/** Custom error message for required validation */
|
|
121
|
+
errorMessage?: string;
|
|
122
|
+
}
|
|
123
|
+
declare function Checkbox({ label, name, checked: externalChecked, onChange, disabled, className, id, size, required, validate, onValidationError, errorMessage, }: CheckboxProps): react_jsx_runtime.JSX.Element;
|
|
53
124
|
interface CheckboxOption {
|
|
54
125
|
value: string;
|
|
55
126
|
label: string;
|
|
@@ -66,8 +137,11 @@ interface CheckboxGroupProps {
|
|
|
66
137
|
required?: boolean;
|
|
67
138
|
disabled?: boolean;
|
|
68
139
|
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
140
|
+
error?: string;
|
|
141
|
+
helperText?: string;
|
|
142
|
+
validate?: ValidationFunction;
|
|
69
143
|
}
|
|
70
|
-
declare function CheckboxGroup({ label, name, options, value, onChange, className, orientation, required, disabled, size, }: CheckboxGroupProps): react_jsx_runtime.JSX.Element;
|
|
144
|
+
declare function CheckboxGroup({ label, name, options, value: externalValue, onChange: externalOnChange, className, orientation, required, disabled, size, error: externalError, helperText, validate, }: CheckboxGroupProps): react_jsx_runtime.JSX.Element;
|
|
71
145
|
|
|
72
146
|
interface RadioOption {
|
|
73
147
|
value: string;
|
|
@@ -85,17 +159,25 @@ interface RadioGroupProps {
|
|
|
85
159
|
required?: boolean;
|
|
86
160
|
disabled?: boolean;
|
|
87
161
|
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
162
|
+
error?: string;
|
|
163
|
+
helperText?: string;
|
|
164
|
+
errorMessage?: string;
|
|
165
|
+
validate?: ValidationFunction;
|
|
88
166
|
}
|
|
89
|
-
declare function RadioGroup({ label, name, options, value, onChange, className, orientation, required, disabled, size, }: RadioGroupProps): react_jsx_runtime.JSX.Element;
|
|
167
|
+
declare function RadioGroup({ label, name, options, value: externalValue, onChange, className, orientation, required, disabled, size, error, helperText, errorMessage, validate, }: RadioGroupProps): react_jsx_runtime.JSX.Element;
|
|
90
168
|
|
|
91
|
-
interface
|
|
169
|
+
interface SelectOption {
|
|
92
170
|
value: string | number;
|
|
93
171
|
label: string;
|
|
94
172
|
disabled?: boolean;
|
|
95
173
|
}
|
|
96
|
-
interface
|
|
174
|
+
interface SelectProps {
|
|
175
|
+
/**
|
|
176
|
+
* Field name - required when used inside Form
|
|
177
|
+
*/
|
|
178
|
+
name?: string;
|
|
97
179
|
/**
|
|
98
|
-
* Label text displayed above the
|
|
180
|
+
* Label text displayed above the select
|
|
99
181
|
*/
|
|
100
182
|
label?: string;
|
|
101
183
|
/**
|
|
@@ -103,9 +185,9 @@ interface DropdownProps {
|
|
|
103
185
|
*/
|
|
104
186
|
placeholder?: string;
|
|
105
187
|
/**
|
|
106
|
-
* Array of options for the
|
|
188
|
+
* Array of options for the select
|
|
107
189
|
*/
|
|
108
|
-
options?:
|
|
190
|
+
options?: SelectOption[];
|
|
109
191
|
/**
|
|
110
192
|
* Current selected value
|
|
111
193
|
*/
|
|
@@ -115,11 +197,11 @@ interface DropdownProps {
|
|
|
115
197
|
*/
|
|
116
198
|
onChange?: (value: string | number) => void;
|
|
117
199
|
/**
|
|
118
|
-
* Custom content to render in the
|
|
200
|
+
* Custom content to render in the select menu (overrides options)
|
|
119
201
|
*/
|
|
120
202
|
children?: ReactNode;
|
|
121
203
|
/**
|
|
122
|
-
* Disable the
|
|
204
|
+
* Disable the select
|
|
123
205
|
*/
|
|
124
206
|
disabled?: boolean;
|
|
125
207
|
/**
|
|
@@ -127,7 +209,7 @@ interface DropdownProps {
|
|
|
127
209
|
*/
|
|
128
210
|
error?: string;
|
|
129
211
|
/**
|
|
130
|
-
* Helper text to display below the
|
|
212
|
+
* Helper text to display below the select
|
|
131
213
|
*/
|
|
132
214
|
helperText?: string;
|
|
133
215
|
/**
|
|
@@ -135,15 +217,177 @@ interface DropdownProps {
|
|
|
135
217
|
*/
|
|
136
218
|
required?: boolean;
|
|
137
219
|
/**
|
|
138
|
-
* Size of the
|
|
220
|
+
* Size of the select
|
|
139
221
|
*/
|
|
140
222
|
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
141
223
|
/**
|
|
142
224
|
* Additional CSS classes
|
|
143
225
|
*/
|
|
144
226
|
className?: string;
|
|
227
|
+
/**
|
|
228
|
+
* Custom validation function that returns error message or undefined if valid
|
|
229
|
+
*/
|
|
230
|
+
validate?: ValidationFunction;
|
|
231
|
+
/**
|
|
232
|
+
* Callback when validation error changes
|
|
233
|
+
*/
|
|
234
|
+
onValidationError?: (error: string | undefined) => void;
|
|
235
|
+
/**
|
|
236
|
+
* Custom error message for required validation
|
|
237
|
+
*/
|
|
238
|
+
errorMessage?: string;
|
|
145
239
|
}
|
|
146
|
-
declare function
|
|
240
|
+
declare function Select({ name, label, placeholder, options, value: externalValue, onChange, children, disabled, error, helperText, required, size, className, validate, onValidationError: _onValidationError, errorMessage, }: SelectProps): react_jsx_runtime.JSX.Element;
|
|
241
|
+
|
|
242
|
+
interface FormControlState {
|
|
243
|
+
/** Whether the field has been modified from its initial value */
|
|
244
|
+
isDirty: boolean;
|
|
245
|
+
/** Whether the field has been interacted with (focused) */
|
|
246
|
+
isTouched: boolean;
|
|
247
|
+
/** Whether the field value passes validation */
|
|
248
|
+
isValid: boolean;
|
|
249
|
+
/** Whether the field is required */
|
|
250
|
+
isRequired: boolean;
|
|
251
|
+
/** Whether the field is disabled */
|
|
252
|
+
isDisabled: boolean;
|
|
253
|
+
/** Whether the field is currently being validated */
|
|
254
|
+
isValidating: boolean;
|
|
255
|
+
/** Error message if validation fails */
|
|
256
|
+
error?: string;
|
|
257
|
+
/** Current field value */
|
|
258
|
+
value: any;
|
|
259
|
+
}
|
|
260
|
+
interface FormControlContextValue extends FormControlState {
|
|
261
|
+
/** Unique ID for the field */
|
|
262
|
+
fieldId: string;
|
|
263
|
+
/** Name attribute for the field */
|
|
264
|
+
name?: string;
|
|
265
|
+
/** Register a control (input, select, etc.) with the form control */
|
|
266
|
+
registerControl: (control: HTMLElement) => void;
|
|
267
|
+
/** Unregister a control */
|
|
268
|
+
unregisterControl: (control: HTMLElement) => void;
|
|
269
|
+
/** Update the field value */
|
|
270
|
+
setValue: (value: any) => void;
|
|
271
|
+
/** Mark the field as touched */
|
|
272
|
+
setTouched: (touched: boolean) => void;
|
|
273
|
+
/** Set validation error */
|
|
274
|
+
setError: (error?: string) => void;
|
|
275
|
+
/** Trigger validation */
|
|
276
|
+
validate: () => Promise<boolean>;
|
|
277
|
+
}
|
|
278
|
+
/** Props to inject into child component when using asChild or render props */
|
|
279
|
+
interface FormFieldProps {
|
|
280
|
+
id: string;
|
|
281
|
+
name?: string;
|
|
282
|
+
value: any;
|
|
283
|
+
onChange: (e: any) => void;
|
|
284
|
+
onBlur: () => void;
|
|
285
|
+
disabled?: boolean;
|
|
286
|
+
required?: boolean;
|
|
287
|
+
"aria-invalid"?: boolean;
|
|
288
|
+
"aria-describedby"?: string;
|
|
289
|
+
}
|
|
290
|
+
interface ValidationRule {
|
|
291
|
+
/** Validation function that returns true if valid, false or error message if invalid */
|
|
292
|
+
validate: (value: any, formData?: any) => boolean | string | Promise<boolean | string>;
|
|
293
|
+
/** Error message to display when validation fails */
|
|
294
|
+
message?: string;
|
|
295
|
+
}
|
|
296
|
+
interface FormControlProps {
|
|
297
|
+
/** The name attribute for the form field */
|
|
298
|
+
name?: string;
|
|
299
|
+
/** The default value for the field */
|
|
300
|
+
defaultValue?: any;
|
|
301
|
+
/** Controlled value */
|
|
302
|
+
value?: any;
|
|
303
|
+
/** Callback when value changes */
|
|
304
|
+
onChange?: (value: any) => void;
|
|
305
|
+
/** Callback when field is blurred */
|
|
306
|
+
onBlur?: () => void;
|
|
307
|
+
/** Whether the field is required (shows asterisk in label) */
|
|
308
|
+
required?: boolean;
|
|
309
|
+
/** Whether the field is disabled */
|
|
310
|
+
disabled?: boolean;
|
|
311
|
+
/** Error message to display */
|
|
312
|
+
error?: string;
|
|
313
|
+
/** Helper text to display below the field */
|
|
314
|
+
helperText?: string;
|
|
315
|
+
/** Validation rules */
|
|
316
|
+
validate?: ValidationRule | ValidationRule[] | ((value: any) => boolean | string | Promise<boolean | string>);
|
|
317
|
+
/** Whether to validate on change */
|
|
318
|
+
validateOnChange?: boolean;
|
|
319
|
+
/** Whether to validate on blur */
|
|
320
|
+
validateOnBlur?: boolean;
|
|
321
|
+
/** Label for the field */
|
|
322
|
+
label?: string;
|
|
323
|
+
/** Additional CSS classes */
|
|
324
|
+
className?: string;
|
|
325
|
+
/**
|
|
326
|
+
* Child components - can be:
|
|
327
|
+
* 1. Component that uses useFormControl() hook
|
|
328
|
+
* 2. Render function: (fieldProps) => ReactNode
|
|
329
|
+
* 3. Single child element when using asChild
|
|
330
|
+
*/
|
|
331
|
+
children: ReactNode | ((props: FormFieldProps & FormControlState) => ReactNode);
|
|
332
|
+
/**
|
|
333
|
+
* When true, merges props into the child element instead of wrapping
|
|
334
|
+
* Similar to Radix UI's asChild pattern
|
|
335
|
+
*/
|
|
336
|
+
asChild?: boolean;
|
|
337
|
+
}
|
|
338
|
+
declare function useFormControlContext(): FormControlContextValue;
|
|
339
|
+
declare function useFormControl(): FormControlContextValue | null;
|
|
340
|
+
/**
|
|
341
|
+
* Hook for creating custom form fields with full FormControl integration
|
|
342
|
+
* Returns field props and state for easy integration
|
|
343
|
+
*
|
|
344
|
+
* @example
|
|
345
|
+
* function CustomInput() {
|
|
346
|
+
* const { fieldProps, state } = useFormField();
|
|
347
|
+
* return (
|
|
348
|
+
* <input
|
|
349
|
+
* {...fieldProps}
|
|
350
|
+
* className={state.error ? 'border-red-500' : 'border-(--color-border)'}
|
|
351
|
+
* />
|
|
352
|
+
* );
|
|
353
|
+
* }
|
|
354
|
+
*/
|
|
355
|
+
declare function useFormField(): {
|
|
356
|
+
fieldProps: FormFieldProps;
|
|
357
|
+
state: FormControlState;
|
|
358
|
+
/**
|
|
359
|
+
* Helper to spread all field props at once
|
|
360
|
+
* @example <input {...register()} />
|
|
361
|
+
*/
|
|
362
|
+
register: () => FormFieldProps;
|
|
363
|
+
/**
|
|
364
|
+
* Direct access to form control methods
|
|
365
|
+
*/
|
|
366
|
+
setValue: (value: any) => void;
|
|
367
|
+
setTouched: (touched: boolean) => void;
|
|
368
|
+
setError: (error?: string) => void;
|
|
369
|
+
validate: () => Promise<boolean>;
|
|
370
|
+
};
|
|
371
|
+
declare function FormControl({ name, defaultValue, value: controlledValue, onChange, onBlur, required, disabled, error: externalError, helperText, validate: validationRules, validateOnChange, validateOnBlur, label, className, children, asChild, }: FormControlProps): react_jsx_runtime.JSX.Element;
|
|
372
|
+
interface FormControlLabelProps {
|
|
373
|
+
/** The control element (checkbox, radio, switch) */
|
|
374
|
+
control: ReactNode;
|
|
375
|
+
/** Label text */
|
|
376
|
+
label: ReactNode;
|
|
377
|
+
/** Whether the control is disabled */
|
|
378
|
+
disabled?: boolean;
|
|
379
|
+
/** Additional CSS classes */
|
|
380
|
+
className?: string;
|
|
381
|
+
/** Label placement */
|
|
382
|
+
labelPlacement?: "start" | "end" | "top" | "bottom";
|
|
383
|
+
}
|
|
384
|
+
declare function FormControlLabel({ control, label, disabled, className, labelPlacement, }: FormControlLabelProps): react_jsx_runtime.JSX.Element;
|
|
385
|
+
interface FormHelperTextProps {
|
|
386
|
+
children: ReactNode;
|
|
387
|
+
error?: boolean;
|
|
388
|
+
className?: string;
|
|
389
|
+
}
|
|
390
|
+
declare function FormHelperText({ children, error, className, }: FormHelperTextProps): react_jsx_runtime.JSX.Element;
|
|
147
391
|
|
|
148
392
|
interface SpinnerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
149
393
|
size?: "sm" | "md" | "lg" | "xl";
|
|
@@ -155,8 +399,237 @@ declare const Spinner: React.ForwardRefExoticComponent<SpinnerProps & React.RefA
|
|
|
155
399
|
interface CodeSnippetProps {
|
|
156
400
|
code: string;
|
|
157
401
|
language?: string;
|
|
402
|
+
fontSize?: "small" | "body" | "h6";
|
|
403
|
+
wrap?: boolean;
|
|
404
|
+
}
|
|
405
|
+
declare function CodeSnippet({ code, language, fontSize, wrap, }: CodeSnippetProps): react_jsx_runtime.JSX.Element;
|
|
406
|
+
|
|
407
|
+
interface RatingProps {
|
|
408
|
+
value: number;
|
|
409
|
+
max?: number;
|
|
410
|
+
size?: number;
|
|
411
|
+
color?: string;
|
|
412
|
+
className?: string;
|
|
413
|
+
responsive?: boolean;
|
|
414
|
+
mobileSize?: number;
|
|
415
|
+
interactive?: boolean;
|
|
416
|
+
onChange?: (value: number) => void;
|
|
417
|
+
showValue?: boolean;
|
|
418
|
+
valuePosition?: "inline" | "bottom";
|
|
419
|
+
valueFormat?: "decimal" | "fraction";
|
|
420
|
+
}
|
|
421
|
+
declare const Rating: React.FC<RatingProps>;
|
|
422
|
+
|
|
423
|
+
interface DividerProps {
|
|
424
|
+
/**
|
|
425
|
+
* The variant to use
|
|
426
|
+
* @default "fullWidth"
|
|
427
|
+
*/
|
|
428
|
+
variant?: "fullWidth" | "inset" | "middle";
|
|
429
|
+
/**
|
|
430
|
+
* The orientation of the divider
|
|
431
|
+
* @default "horizontal"
|
|
432
|
+
*/
|
|
433
|
+
orientation?: "horizontal" | "vertical";
|
|
434
|
+
/**
|
|
435
|
+
* The alignment of the content when children are provided
|
|
436
|
+
* @default "center"
|
|
437
|
+
*/
|
|
438
|
+
textAlign?: "left" | "center" | "right";
|
|
439
|
+
/**
|
|
440
|
+
* If true, the divider will have flex item properties when in a flex container
|
|
441
|
+
* @default false
|
|
442
|
+
*/
|
|
443
|
+
flexItem?: boolean;
|
|
444
|
+
/**
|
|
445
|
+
* Thickness of the divider line in pixels
|
|
446
|
+
* @default 1
|
|
447
|
+
*/
|
|
448
|
+
thickness?: number;
|
|
449
|
+
/**
|
|
450
|
+
* Content to be rendered inside the divider
|
|
451
|
+
*/
|
|
452
|
+
children?: React.ReactNode;
|
|
453
|
+
/**
|
|
454
|
+
* Additional CSS classes
|
|
455
|
+
*/
|
|
456
|
+
className?: string;
|
|
457
|
+
}
|
|
458
|
+
declare const Divider: React.FC<DividerProps>;
|
|
459
|
+
|
|
460
|
+
interface SliderMark {
|
|
461
|
+
value: number;
|
|
462
|
+
label?: string;
|
|
463
|
+
}
|
|
464
|
+
interface SliderProps {
|
|
465
|
+
/**
|
|
466
|
+
* The value of the slider. For range sliders, provide an array.
|
|
467
|
+
*/
|
|
468
|
+
value?: number | number[];
|
|
469
|
+
/**
|
|
470
|
+
* The default value. Use when the component is not controlled.
|
|
471
|
+
*/
|
|
472
|
+
defaultValue?: number | number[];
|
|
473
|
+
/**
|
|
474
|
+
* Callback function that is fired when the slider's value changed.
|
|
475
|
+
*/
|
|
476
|
+
onChange?: (value: number | number[]) => void;
|
|
477
|
+
/**
|
|
478
|
+
* The minimum allowed value of the slider.
|
|
479
|
+
* @default 0
|
|
480
|
+
*/
|
|
481
|
+
min?: number;
|
|
482
|
+
/**
|
|
483
|
+
* The maximum allowed value of the slider.
|
|
484
|
+
* @default 100
|
|
485
|
+
*/
|
|
486
|
+
max?: number;
|
|
487
|
+
/**
|
|
488
|
+
* The granularity with which the slider can step through values.
|
|
489
|
+
* Set to null to restrict values to marks only.
|
|
490
|
+
* @default 1
|
|
491
|
+
*/
|
|
492
|
+
step?: number | null;
|
|
493
|
+
/**
|
|
494
|
+
* Marks indicate predetermined values to which the user can move the slider.
|
|
495
|
+
* If `true`, marks are generated automatically. If `false`, no marks are shown.
|
|
496
|
+
* You can also provide an array of marks with custom labels.
|
|
497
|
+
* @default false
|
|
498
|
+
*/
|
|
499
|
+
marks?: boolean | SliderMark[];
|
|
500
|
+
/**
|
|
501
|
+
* If `true`, the slider will be disabled.
|
|
502
|
+
* @default false
|
|
503
|
+
*/
|
|
504
|
+
disabled?: boolean;
|
|
505
|
+
/**
|
|
506
|
+
* The orientation of the slider.
|
|
507
|
+
* @default "horizontal"
|
|
508
|
+
*/
|
|
509
|
+
orientation?: "horizontal" | "vertical";
|
|
510
|
+
/**
|
|
511
|
+
* The size of the slider.
|
|
512
|
+
* @default "medium"
|
|
513
|
+
*/
|
|
514
|
+
size?: "small" | "medium";
|
|
515
|
+
/**
|
|
516
|
+
* Controls when the value label is displayed.
|
|
517
|
+
* @default "auto"
|
|
518
|
+
*/
|
|
519
|
+
valueLabelDisplay?: "on" | "auto" | "off";
|
|
520
|
+
/**
|
|
521
|
+
* Show value labels on hover over marks.
|
|
522
|
+
* @default false
|
|
523
|
+
*/
|
|
524
|
+
showMarkLabelsOnHover?: boolean;
|
|
525
|
+
/**
|
|
526
|
+
* The color of the slider.
|
|
527
|
+
* @default "primary"
|
|
528
|
+
*/
|
|
529
|
+
color?: "primary" | "secondary";
|
|
530
|
+
/**
|
|
531
|
+
* The track display mode.
|
|
532
|
+
* @default "normal"
|
|
533
|
+
*/
|
|
534
|
+
track?: "normal" | "inverted" | false;
|
|
535
|
+
/**
|
|
536
|
+
* A function to format the value label.
|
|
537
|
+
*/
|
|
538
|
+
valueLabelFormat?: (value: number) => string;
|
|
539
|
+
/**
|
|
540
|
+
* Additional CSS classes
|
|
541
|
+
*/
|
|
542
|
+
className?: string;
|
|
543
|
+
/**
|
|
544
|
+
* The id of the input element.
|
|
545
|
+
*/
|
|
546
|
+
id?: string;
|
|
547
|
+
/**
|
|
548
|
+
* The name of the input element.
|
|
549
|
+
*/
|
|
550
|
+
name?: string;
|
|
551
|
+
/**
|
|
552
|
+
* Accessible label for the slider.
|
|
553
|
+
*/
|
|
554
|
+
"aria-label"?: string;
|
|
555
|
+
/**
|
|
556
|
+
* The id of the element containing a label for the slider.
|
|
557
|
+
*/
|
|
558
|
+
"aria-labelledby"?: string;
|
|
158
559
|
}
|
|
159
|
-
declare
|
|
560
|
+
declare const Slider: React.FC<SliderProps>;
|
|
561
|
+
|
|
562
|
+
interface SwitchProps {
|
|
563
|
+
/**
|
|
564
|
+
* Whether the switch is checked
|
|
565
|
+
*/
|
|
566
|
+
checked?: boolean;
|
|
567
|
+
/**
|
|
568
|
+
* Callback when the switch state changes
|
|
569
|
+
*/
|
|
570
|
+
onChange?: (checked: boolean) => void;
|
|
571
|
+
/**
|
|
572
|
+
* Whether the switch is disabled
|
|
573
|
+
*/
|
|
574
|
+
disabled?: boolean;
|
|
575
|
+
/**
|
|
576
|
+
* Label text for the switch
|
|
577
|
+
*/
|
|
578
|
+
label?: string;
|
|
579
|
+
/**
|
|
580
|
+
* Position of the label relative to the switch
|
|
581
|
+
*/
|
|
582
|
+
labelPlacement?: "start" | "end" | "top" | "bottom";
|
|
583
|
+
/**
|
|
584
|
+
* Size of the switch
|
|
585
|
+
*/
|
|
586
|
+
size?: "sm" | "md" | "lg";
|
|
587
|
+
/**
|
|
588
|
+
* Color variant of the switch when checked
|
|
589
|
+
*/
|
|
590
|
+
color?: "primary" | "success" | "info" | "warning" | "error";
|
|
591
|
+
/**
|
|
592
|
+
* Additional CSS classes
|
|
593
|
+
*/
|
|
594
|
+
className?: string;
|
|
595
|
+
/**
|
|
596
|
+
* Name attribute for the input
|
|
597
|
+
*/
|
|
598
|
+
name?: string;
|
|
599
|
+
/**
|
|
600
|
+
* Required field indicator
|
|
601
|
+
*/
|
|
602
|
+
required?: boolean;
|
|
603
|
+
/**
|
|
604
|
+
* Custom validation function
|
|
605
|
+
*/
|
|
606
|
+
validate?: ValidationFunction;
|
|
607
|
+
/**
|
|
608
|
+
* Custom error message for required validation
|
|
609
|
+
*/
|
|
610
|
+
errorMessage?: string;
|
|
611
|
+
}
|
|
612
|
+
declare function Switch({ checked: controlledChecked, onChange, disabled, label, labelPlacement, size, color, className, name, required, validate, errorMessage, }: SwitchProps): react_jsx_runtime.JSX.Element;
|
|
613
|
+
|
|
614
|
+
interface DialogProps {
|
|
615
|
+
open: boolean;
|
|
616
|
+
onClose: () => void;
|
|
617
|
+
size?: "sm" | "md" | "lg" | "xl" | "full";
|
|
618
|
+
variant?: "default" | "info" | "success" | "warning" | "error";
|
|
619
|
+
showCloseButton?: boolean;
|
|
620
|
+
closeOnBackdropClick?: boolean;
|
|
621
|
+
closeOnEscape?: boolean;
|
|
622
|
+
children: React.ReactNode;
|
|
623
|
+
}
|
|
624
|
+
declare const Dialog: {
|
|
625
|
+
({ open, onClose, size, variant, showCloseButton, closeOnBackdropClick, closeOnEscape, children, }: DialogProps): react_jsx_runtime.JSX.Element | null;
|
|
626
|
+
displayName: string;
|
|
627
|
+
};
|
|
628
|
+
declare const DialogHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
629
|
+
declare const DialogTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLHeadingElement>>;
|
|
630
|
+
declare const DialogDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
631
|
+
declare const DialogContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
632
|
+
declare const DialogFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
160
633
|
|
|
161
634
|
interface AlertProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
162
635
|
variant?: "info" | "success" | "warning" | "error";
|
|
@@ -201,7 +674,7 @@ interface NavItem$2 {
|
|
|
201
674
|
}
|
|
202
675
|
interface NavProps extends React.HTMLAttributes<HTMLElement> {
|
|
203
676
|
items: NavItem$2[];
|
|
204
|
-
variant?: "primary" | "secondary" | "
|
|
677
|
+
variant?: "primary" | "secondary" | "ghost";
|
|
205
678
|
orientation?: "horizontal" | "vertical";
|
|
206
679
|
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
207
680
|
mobileBreakpoint?: "sm" | "md" | "lg";
|
|
@@ -232,8 +705,19 @@ interface DrawerProps {
|
|
|
232
705
|
onItemClick: (itemId: string) => void;
|
|
233
706
|
footer?: React.ReactNode;
|
|
234
707
|
position?: "left" | "right";
|
|
708
|
+
homeUrl?: string;
|
|
709
|
+
autoHideOnScroll?: boolean;
|
|
710
|
+
headerActions?: React.ReactNode;
|
|
711
|
+
}
|
|
712
|
+
declare function Drawer({ title, subtitle, items, sections, activeItem, onItemClick, footer, position, homeUrl, autoHideOnScroll, headerActions, }: DrawerProps): react_jsx_runtime.JSX.Element;
|
|
713
|
+
|
|
714
|
+
interface HeaderProps {
|
|
715
|
+
children: React.ReactNode;
|
|
716
|
+
autoHideOnScroll?: boolean;
|
|
717
|
+
className?: string;
|
|
718
|
+
position?: "fixed" | "sticky" | "static";
|
|
235
719
|
}
|
|
236
|
-
declare function
|
|
720
|
+
declare function Header({ children, autoHideOnScroll, className, position, }: HeaderProps): react_jsx_runtime.JSX.Element;
|
|
237
721
|
|
|
238
722
|
interface NavItem {
|
|
239
723
|
id: string;
|
|
@@ -264,337 +748,247 @@ interface EmptyStateProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
264
748
|
}
|
|
265
749
|
declare const EmptyState: React.ForwardRefExoticComponent<EmptyStateProps & React.RefAttributes<HTMLDivElement>>;
|
|
266
750
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
100?: string;
|
|
276
|
-
200?: string;
|
|
277
|
-
300?: string;
|
|
278
|
-
400?: string;
|
|
279
|
-
500: string;
|
|
280
|
-
600?: string;
|
|
281
|
-
700?: string;
|
|
282
|
-
800?: string;
|
|
283
|
-
900?: string;
|
|
284
|
-
}
|
|
285
|
-
interface ThemeColors {
|
|
286
|
-
primary: ColorShades;
|
|
287
|
-
secondary: ColorShades;
|
|
288
|
-
success: string;
|
|
289
|
-
error: string;
|
|
290
|
-
warning: string;
|
|
291
|
-
info: string;
|
|
292
|
-
gray: ColorShades;
|
|
293
|
-
background: string;
|
|
294
|
-
foreground: string;
|
|
295
|
-
muted: string;
|
|
296
|
-
mutedForeground: string;
|
|
297
|
-
}
|
|
298
|
-
interface ThemeSpacing {
|
|
299
|
-
xs: string;
|
|
300
|
-
sm: string;
|
|
301
|
-
md: string;
|
|
302
|
-
lg: string;
|
|
303
|
-
xl: string;
|
|
304
|
-
'2xl': string;
|
|
305
|
-
}
|
|
306
|
-
interface ThemeBorderRadius {
|
|
307
|
-
none: string;
|
|
308
|
-
sm: string;
|
|
309
|
-
md: string;
|
|
310
|
-
lg: string;
|
|
311
|
-
xl: string;
|
|
312
|
-
full: string;
|
|
313
|
-
}
|
|
314
|
-
interface ThemeTypography {
|
|
315
|
-
fontFamily: {
|
|
316
|
-
sans: string[];
|
|
317
|
-
mono: string[];
|
|
318
|
-
};
|
|
319
|
-
fontSize: {
|
|
320
|
-
xs: string;
|
|
321
|
-
sm: string;
|
|
322
|
-
base: string;
|
|
323
|
-
lg: string;
|
|
324
|
-
xl: string;
|
|
325
|
-
'2xl': string;
|
|
326
|
-
'3xl': string;
|
|
327
|
-
};
|
|
328
|
-
fontWeight: {
|
|
329
|
-
normal: string;
|
|
330
|
-
medium: string;
|
|
331
|
-
semibold: string;
|
|
332
|
-
bold: string;
|
|
333
|
-
};
|
|
334
|
-
}
|
|
335
|
-
interface ButtonTheme {
|
|
336
|
-
padding: {
|
|
337
|
-
xs: {
|
|
338
|
-
x: string;
|
|
339
|
-
y: string;
|
|
340
|
-
};
|
|
341
|
-
sm: {
|
|
342
|
-
x: string;
|
|
343
|
-
y: string;
|
|
344
|
-
};
|
|
345
|
-
md: {
|
|
346
|
-
x: string;
|
|
347
|
-
y: string;
|
|
348
|
-
};
|
|
349
|
-
lg: {
|
|
350
|
-
x: string;
|
|
351
|
-
y: string;
|
|
352
|
-
};
|
|
353
|
-
xl: {
|
|
354
|
-
x: string;
|
|
355
|
-
y: string;
|
|
356
|
-
};
|
|
357
|
-
};
|
|
358
|
-
fontSize: {
|
|
359
|
-
xs: string;
|
|
360
|
-
sm: string;
|
|
361
|
-
md: string;
|
|
362
|
-
lg: string;
|
|
363
|
-
xl: string;
|
|
364
|
-
};
|
|
365
|
-
borderRadius: string;
|
|
366
|
-
fontWeight: string;
|
|
367
|
-
}
|
|
368
|
-
interface CardTheme {
|
|
369
|
-
padding: {
|
|
370
|
-
none: string;
|
|
371
|
-
sm: string;
|
|
372
|
-
md: string;
|
|
373
|
-
lg: string;
|
|
374
|
-
};
|
|
375
|
-
borderRadius: string;
|
|
376
|
-
borderWidth: string;
|
|
377
|
-
shadow: {
|
|
378
|
-
flat: string;
|
|
379
|
-
elevated: string;
|
|
380
|
-
};
|
|
751
|
+
interface Theme {
|
|
752
|
+
name: string;
|
|
753
|
+
id: string;
|
|
754
|
+
colors: Record<string, string>;
|
|
755
|
+
components: Record<string, Record<string, string>>;
|
|
756
|
+
typography?: Record<string, string>;
|
|
757
|
+
showcase?: Record<string, string>;
|
|
758
|
+
semanticColors?: Record<string, string>;
|
|
381
759
|
}
|
|
382
|
-
interface
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
borderWidth: string;
|
|
399
|
-
}
|
|
400
|
-
interface CheckboxTheme {
|
|
401
|
-
size: {
|
|
402
|
-
xs: string;
|
|
403
|
-
sm: string;
|
|
404
|
-
md: string;
|
|
405
|
-
lg: string;
|
|
406
|
-
xl: string;
|
|
407
|
-
};
|
|
408
|
-
labelSpacing: {
|
|
409
|
-
xs: string;
|
|
410
|
-
sm: string;
|
|
411
|
-
md: string;
|
|
412
|
-
lg: string;
|
|
413
|
-
xl: string;
|
|
414
|
-
};
|
|
415
|
-
labelFontSize: {
|
|
416
|
-
xs: string;
|
|
417
|
-
sm: string;
|
|
418
|
-
md: string;
|
|
419
|
-
lg: string;
|
|
420
|
-
xl: string;
|
|
421
|
-
};
|
|
422
|
-
borderRadius: string;
|
|
423
|
-
}
|
|
424
|
-
interface RadioTheme {
|
|
425
|
-
size: {
|
|
426
|
-
xs: string;
|
|
427
|
-
sm: string;
|
|
428
|
-
md: string;
|
|
429
|
-
lg: string;
|
|
430
|
-
xl: string;
|
|
431
|
-
};
|
|
432
|
-
labelSpacing: {
|
|
433
|
-
xs: string;
|
|
434
|
-
sm: string;
|
|
435
|
-
md: string;
|
|
436
|
-
lg: string;
|
|
437
|
-
xl: string;
|
|
438
|
-
};
|
|
439
|
-
labelFontSize: {
|
|
440
|
-
xs: string;
|
|
441
|
-
sm: string;
|
|
442
|
-
md: string;
|
|
443
|
-
lg: string;
|
|
444
|
-
xl: string;
|
|
445
|
-
};
|
|
760
|
+
interface ThemeContextType {
|
|
761
|
+
currentTheme: string;
|
|
762
|
+
availableThemes: {
|
|
763
|
+
id: string;
|
|
764
|
+
name: string;
|
|
765
|
+
}[];
|
|
766
|
+
setTheme: (themeId: string) => void;
|
|
767
|
+
setCSSVariable: (name: string, value: string) => void;
|
|
768
|
+
getCSSVariable: (name: string) => string;
|
|
769
|
+
exportThemeCSS: () => string;
|
|
770
|
+
}
|
|
771
|
+
interface ThemeProviderProps {
|
|
772
|
+
children: ReactNode;
|
|
773
|
+
defaultTheme?: string;
|
|
774
|
+
customTheme?: Theme;
|
|
775
|
+
storageKey?: string;
|
|
446
776
|
}
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
x: string;
|
|
467
|
-
y: string;
|
|
468
|
-
};
|
|
469
|
-
};
|
|
470
|
-
fontSize: {
|
|
471
|
-
xs: string;
|
|
472
|
-
sm: string;
|
|
473
|
-
md: string;
|
|
474
|
-
lg: string;
|
|
475
|
-
xl: string;
|
|
476
|
-
};
|
|
477
|
-
iconSize: {
|
|
478
|
-
xs: string;
|
|
479
|
-
sm: string;
|
|
480
|
-
md: string;
|
|
481
|
-
lg: string;
|
|
482
|
-
xl: string;
|
|
483
|
-
};
|
|
484
|
-
optionPadding: {
|
|
485
|
-
xs: {
|
|
486
|
-
x: string;
|
|
487
|
-
y: string;
|
|
777
|
+
declare function ThemeProvider({ children, defaultTheme, customTheme, storageKey, }: ThemeProviderProps): react_jsx_runtime.JSX.Element;
|
|
778
|
+
declare function useTheme(): ThemeContextType;
|
|
779
|
+
|
|
780
|
+
declare const themes: {
|
|
781
|
+
light: {
|
|
782
|
+
name: string;
|
|
783
|
+
id: string;
|
|
784
|
+
colors: {
|
|
785
|
+
primary: string;
|
|
786
|
+
"primary-hover": string;
|
|
787
|
+
"primary-active": string;
|
|
788
|
+
secondary: string;
|
|
789
|
+
"secondary-hover": string;
|
|
790
|
+
background: string;
|
|
791
|
+
foreground: string;
|
|
792
|
+
muted: string;
|
|
793
|
+
"muted-foreground": string;
|
|
794
|
+
placeholder: string;
|
|
795
|
+
border: string;
|
|
488
796
|
};
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
797
|
+
showcase: {
|
|
798
|
+
bg: string;
|
|
799
|
+
surface: string;
|
|
800
|
+
"surface-elevated": string;
|
|
801
|
+
"text-primary": string;
|
|
802
|
+
"text-secondary": string;
|
|
803
|
+
border: string;
|
|
492
804
|
};
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
805
|
+
typography: {
|
|
806
|
+
h1: string;
|
|
807
|
+
"h1-desktop": string;
|
|
808
|
+
h2: string;
|
|
809
|
+
"h2-desktop": string;
|
|
810
|
+
h3: string;
|
|
811
|
+
"h3-desktop": string;
|
|
812
|
+
h4: string;
|
|
813
|
+
"h4-desktop": string;
|
|
814
|
+
h5: string;
|
|
815
|
+
"h5-desktop": string;
|
|
816
|
+
h6: string;
|
|
817
|
+
"h6-desktop": string;
|
|
818
|
+
body: string;
|
|
819
|
+
"body-desktop": string;
|
|
820
|
+
small: string;
|
|
821
|
+
"small-desktop": string;
|
|
822
|
+
caption: string;
|
|
496
823
|
};
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
824
|
+
semanticColors: {
|
|
825
|
+
info: string;
|
|
826
|
+
"info-foreground": string;
|
|
827
|
+
"info-muted": string;
|
|
828
|
+
"info-muted-foreground": string;
|
|
829
|
+
"info-border": string;
|
|
830
|
+
success: string;
|
|
831
|
+
"success-foreground": string;
|
|
832
|
+
"success-muted": string;
|
|
833
|
+
"success-muted-foreground": string;
|
|
834
|
+
"success-border": string;
|
|
835
|
+
warning: string;
|
|
836
|
+
"warning-foreground": string;
|
|
837
|
+
"warning-muted": string;
|
|
838
|
+
"warning-muted-foreground": string;
|
|
839
|
+
"warning-border": string;
|
|
840
|
+
error: string;
|
|
841
|
+
"error-foreground": string;
|
|
842
|
+
"error-muted": string;
|
|
843
|
+
"error-muted-foreground": string;
|
|
844
|
+
"error-border": string;
|
|
500
845
|
};
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
846
|
+
components: {
|
|
847
|
+
checkbox: {
|
|
848
|
+
"border-color": string;
|
|
849
|
+
"checked-color": string;
|
|
850
|
+
"label-color": string;
|
|
851
|
+
"hover-bg": string;
|
|
852
|
+
};
|
|
853
|
+
radio: {
|
|
854
|
+
"border-color": string;
|
|
855
|
+
"checked-color": string;
|
|
856
|
+
"label-color": string;
|
|
857
|
+
"hover-bg": string;
|
|
858
|
+
};
|
|
859
|
+
button: {
|
|
860
|
+
"primary-text": string;
|
|
861
|
+
"secondary-text": string;
|
|
862
|
+
};
|
|
863
|
+
"card-icons": {
|
|
864
|
+
"blue-bg": string;
|
|
865
|
+
"blue-bg-hover": string;
|
|
866
|
+
"blue-text": string;
|
|
867
|
+
"purple-bg": string;
|
|
868
|
+
"purple-bg-hover": string;
|
|
869
|
+
"purple-text": string;
|
|
870
|
+
"green-bg": string;
|
|
871
|
+
"green-bg-hover": string;
|
|
872
|
+
"green-text": string;
|
|
873
|
+
"orange-bg": string;
|
|
874
|
+
"orange-bg-hover": string;
|
|
875
|
+
"orange-text": string;
|
|
876
|
+
"pink-bg": string;
|
|
877
|
+
"pink-bg-hover": string;
|
|
878
|
+
"pink-text": string;
|
|
879
|
+
"indigo-bg": string;
|
|
880
|
+
"indigo-bg-hover": string;
|
|
881
|
+
"indigo-text": string;
|
|
882
|
+
};
|
|
504
883
|
};
|
|
505
884
|
};
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
y: string;
|
|
885
|
+
dark: {
|
|
886
|
+
name: string;
|
|
887
|
+
id: string;
|
|
888
|
+
colors: {
|
|
889
|
+
primary: string;
|
|
890
|
+
"primary-hover": string;
|
|
891
|
+
"primary-active": string;
|
|
892
|
+
secondary: string;
|
|
893
|
+
"secondary-hover": string;
|
|
894
|
+
background: string;
|
|
895
|
+
foreground: string;
|
|
896
|
+
muted: string;
|
|
897
|
+
"muted-foreground": string;
|
|
898
|
+
placeholder: string;
|
|
899
|
+
border: string;
|
|
522
900
|
};
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
901
|
+
showcase: {
|
|
902
|
+
bg: string;
|
|
903
|
+
surface: string;
|
|
904
|
+
"surface-elevated": string;
|
|
905
|
+
"text-primary": string;
|
|
906
|
+
"text-secondary": string;
|
|
907
|
+
border: string;
|
|
526
908
|
};
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
909
|
+
typography: {
|
|
910
|
+
h1: string;
|
|
911
|
+
"h1-desktop": string;
|
|
912
|
+
h2: string;
|
|
913
|
+
"h2-desktop": string;
|
|
914
|
+
h3: string;
|
|
915
|
+
"h3-desktop": string;
|
|
916
|
+
h4: string;
|
|
917
|
+
"h4-desktop": string;
|
|
918
|
+
h5: string;
|
|
919
|
+
"h5-desktop": string;
|
|
920
|
+
h6: string;
|
|
921
|
+
"h6-desktop": string;
|
|
922
|
+
body: string;
|
|
923
|
+
"body-desktop": string;
|
|
924
|
+
small: string;
|
|
925
|
+
"small-desktop": string;
|
|
926
|
+
caption: string;
|
|
530
927
|
};
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
928
|
+
semanticColors: {
|
|
929
|
+
info: string;
|
|
930
|
+
"info-foreground": string;
|
|
931
|
+
"info-muted": string;
|
|
932
|
+
"info-muted-foreground": string;
|
|
933
|
+
"info-border": string;
|
|
934
|
+
success: string;
|
|
935
|
+
"success-foreground": string;
|
|
936
|
+
"success-muted": string;
|
|
937
|
+
"success-muted-foreground": string;
|
|
938
|
+
"success-border": string;
|
|
939
|
+
warning: string;
|
|
940
|
+
"warning-foreground": string;
|
|
941
|
+
"warning-muted": string;
|
|
942
|
+
"warning-muted-foreground": string;
|
|
943
|
+
"warning-border": string;
|
|
944
|
+
error: string;
|
|
945
|
+
"error-foreground": string;
|
|
946
|
+
"error-muted": string;
|
|
947
|
+
"error-muted-foreground": string;
|
|
948
|
+
"error-border": string;
|
|
534
949
|
};
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
950
|
+
components: {
|
|
951
|
+
checkbox: {
|
|
952
|
+
"border-color": string;
|
|
953
|
+
"checked-color": string;
|
|
954
|
+
"label-color": string;
|
|
955
|
+
"hover-bg": string;
|
|
956
|
+
};
|
|
957
|
+
radio: {
|
|
958
|
+
"border-color": string;
|
|
959
|
+
"checked-color": string;
|
|
960
|
+
"label-color": string;
|
|
961
|
+
"hover-bg": string;
|
|
962
|
+
};
|
|
963
|
+
button: {
|
|
964
|
+
"primary-text": string;
|
|
965
|
+
"secondary-text": string;
|
|
966
|
+
};
|
|
967
|
+
"card-icons": {
|
|
968
|
+
"blue-bg": string;
|
|
969
|
+
"blue-bg-hover": string;
|
|
970
|
+
"blue-text": string;
|
|
971
|
+
"purple-bg": string;
|
|
972
|
+
"purple-bg-hover": string;
|
|
973
|
+
"purple-text": string;
|
|
974
|
+
"green-bg": string;
|
|
975
|
+
"green-bg-hover": string;
|
|
976
|
+
"green-text": string;
|
|
977
|
+
"orange-bg": string;
|
|
978
|
+
"orange-bg-hover": string;
|
|
979
|
+
"orange-text": string;
|
|
980
|
+
"pink-bg": string;
|
|
981
|
+
"pink-bg-hover": string;
|
|
982
|
+
"pink-text": string;
|
|
983
|
+
"indigo-bg": string;
|
|
984
|
+
"indigo-bg-hover": string;
|
|
985
|
+
"indigo-text": string;
|
|
986
|
+
};
|
|
538
987
|
};
|
|
539
988
|
};
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
sm: string;
|
|
543
|
-
md: string;
|
|
544
|
-
lg: string;
|
|
545
|
-
xl: string;
|
|
546
|
-
};
|
|
547
|
-
borderRadius: string;
|
|
548
|
-
gap: string;
|
|
549
|
-
}
|
|
550
|
-
interface ZIndexScale {
|
|
551
|
-
dropdown: number;
|
|
552
|
-
popover: number;
|
|
553
|
-
tooltip: number;
|
|
554
|
-
overlay: number;
|
|
555
|
-
nav: number;
|
|
556
|
-
navMobileOverlay: number;
|
|
557
|
-
navMobileMenu: number;
|
|
558
|
-
drawerHeader: number;
|
|
559
|
-
drawerButton: number;
|
|
560
|
-
drawerOverlay: number;
|
|
561
|
-
drawerPanel: number;
|
|
562
|
-
modalBackdrop: number;
|
|
563
|
-
modal: number;
|
|
564
|
-
snackbar: number;
|
|
565
|
-
toast: number;
|
|
566
|
-
}
|
|
567
|
-
interface ComponentThemes {
|
|
568
|
-
button: ButtonTheme;
|
|
569
|
-
card: CardTheme;
|
|
570
|
-
input: InputTheme;
|
|
571
|
-
checkbox: CheckboxTheme;
|
|
572
|
-
radio: RadioTheme;
|
|
573
|
-
dropdown: DropdownTheme;
|
|
574
|
-
nav: NavTheme;
|
|
575
|
-
}
|
|
576
|
-
interface Theme {
|
|
577
|
-
name: string;
|
|
578
|
-
version: string;
|
|
579
|
-
colors: ThemeColors;
|
|
580
|
-
spacing: ThemeSpacing;
|
|
581
|
-
borderRadius: ThemeBorderRadius;
|
|
582
|
-
typography: ThemeTypography;
|
|
583
|
-
zIndex: ZIndexScale;
|
|
584
|
-
components: ComponentThemes;
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
interface ThemeContextType {
|
|
588
|
-
theme: Theme;
|
|
589
|
-
setTheme: (theme: Theme) => void;
|
|
590
|
-
applyTheme: (theme: Theme) => void;
|
|
591
|
-
resetTheme: () => void;
|
|
592
|
-
}
|
|
593
|
-
declare function ThemeProvider({ children }: {
|
|
594
|
-
children: ReactNode;
|
|
595
|
-
}): react_jsx_runtime.JSX.Element;
|
|
596
|
-
declare function useTheme(): ThemeContextType;
|
|
989
|
+
};
|
|
990
|
+
type ThemeId = keyof typeof themes;
|
|
597
991
|
|
|
598
992
|
declare function cn(...inputs: ClassValue[]): string;
|
|
599
993
|
|
|
600
|
-
export { Alert, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CheckboxGroup, CodeSnippet, Container, Drawer, type NavItem$1 as DrawerNavItem, type NavSection$1 as DrawerNavSection, type DrawerProps,
|
|
994
|
+
export { Alert, Badge, Button, Card, CardActionArea, CardActions, CardContent, CardDescription, CardFooter, CardHeader, CardMedia, CardTitle, Checkbox, CheckboxGroup, CodeSnippet, Container, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, Divider, Drawer, type NavItem$1 as DrawerNavItem, type NavSection$1 as DrawerNavSection, type DrawerProps, EmptyState, Form, type FormContextValue, FormControl, type FormControlContextValue, FormControlLabel, type FormControlProps, type FormControlState, type FormFieldProps, FormHelperText, type FormState, Header, type HeaderProps, Input, Nav, type NavItem$2 as NavItem, type NavProps, type NavSection, RadioGroup, Rating, SectionLayout, Select, type SelectOption, type SelectProps, SidebarNav, type NavItem as SidebarNavItem, Slider, type SliderMark, type SliderProps, Spinner, Switch, type SwitchProps, type ThemeId, ThemeProvider, type ValidationFunction, type ValidationRule, cn, themes, useForm, useFormContext, useFormControl, useFormControlContext, useFormField, useTheme };
|