@yomologic/react-ui 0.5.0 → 0.5.2

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