@zuzjs/ui 1.0.58 → 1.0.59
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/dist/bin.cjs +4 -4
- package/dist/bin.js +1 -1
- package/dist/css/styles.css +1 -1
- package/dist/index.cjs +7 -7
- package/dist/index.d.cts +1293 -53
- package/dist/index.d.ts +1293 -53
- package/dist/index.js +6 -6
- package/package.json +3 -3
- /package/dist/{chunk-CXDAX74I.cjs → chunk-T2RBNOBB.cjs} +0 -0
- /package/dist/{chunk-PACYGJ55.js → chunk-T2SBRGMT.js} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import react__default, { ElementType, ComponentPropsWithoutRef, Ref, ReactNode, MouseEvent as MouseEvent$1, RefObject, FC, CSSProperties, FormEventHandler, JSX, ComponentPropsWithRef } from 'react';
|
|
2
|
+
import react__default, { ElementType, ComponentPropsWithoutRef, Ref, ReactNode, MouseEvent as MouseEvent$1, RefObject, FC, CSSProperties, FormEventHandler, ReactElement, JSX, ComponentPropsWithRef } from 'react';
|
|
3
3
|
import { DragOptions, LineChartProps, MediaItem, useMediaPlayer, ScrollBreakpoint, Command } from '@zuzjs/hooks';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import { PubSub } from '@zuzjs/core';
|
|
@@ -333,6 +333,25 @@ interface AccordionHandler {
|
|
|
333
333
|
close: () => void;
|
|
334
334
|
}
|
|
335
335
|
|
|
336
|
+
/**
|
|
337
|
+
* Accordion component.
|
|
338
|
+
*
|
|
339
|
+
* @example
|
|
340
|
+
* // Basic usage
|
|
341
|
+
* ```tsx
|
|
342
|
+
* <Accordion title="Account" message="Manage your profile and security" />
|
|
343
|
+
* ```
|
|
344
|
+
*
|
|
345
|
+
* @example
|
|
346
|
+
* // Advanced usage with additional props
|
|
347
|
+
* ```tsx
|
|
348
|
+
* <Accordion title="Settings" message="Configure preferences" variant="sm" disabled={false} />
|
|
349
|
+
* ```
|
|
350
|
+
* @param title - Title text or element
|
|
351
|
+
* @param message - Message text or element
|
|
352
|
+
* @param variant - Visual variant or style
|
|
353
|
+
* @param disabled - Whether component is disabled
|
|
354
|
+
*/
|
|
336
355
|
declare const Accordion: react.ForwardRefExoticComponent<Omit<AccordionProps, "ref"> & react.RefAttributes<AccordionHandler>>;
|
|
337
356
|
|
|
338
357
|
interface ActionBarHandler {
|
|
@@ -366,17 +385,20 @@ type ActionBarProps = BoxProps & {
|
|
|
366
385
|
};
|
|
367
386
|
|
|
368
387
|
/**
|
|
369
|
-
*
|
|
388
|
+
* Actionbar component.
|
|
370
389
|
*
|
|
371
390
|
* @example
|
|
391
|
+
* // Basic usage
|
|
372
392
|
* ```tsx
|
|
373
|
-
*
|
|
374
|
-
*
|
|
375
|
-
* { label: 'Delete', icon: <DeleteIcon />, onClick: () => console.log('Delete clicked') }
|
|
376
|
-
* ];
|
|
393
|
+
* <Actionbar />
|
|
394
|
+
* ```
|
|
377
395
|
*
|
|
378
|
-
*
|
|
396
|
+
* @example
|
|
397
|
+
* // Advanced usage with additional props
|
|
398
|
+
* ```tsx
|
|
399
|
+
* <Actionbar sticky={true} />
|
|
379
400
|
* ```
|
|
401
|
+
* @param sticky - sticky prop
|
|
380
402
|
*/
|
|
381
403
|
declare const ActionBar: react.ForwardRefExoticComponent<Omit<ActionBarProps, "ref"> & react.RefAttributes<ActionBarHandler>>;
|
|
382
404
|
|
|
@@ -392,6 +414,25 @@ interface AlertHandler {
|
|
|
392
414
|
close: () => void;
|
|
393
415
|
}
|
|
394
416
|
|
|
417
|
+
/**
|
|
418
|
+
* Alert component.
|
|
419
|
+
*
|
|
420
|
+
* @example
|
|
421
|
+
* // Basic usage
|
|
422
|
+
* ```tsx
|
|
423
|
+
* <Alert type="info">This is an informational alert</Alert>
|
|
424
|
+
* ```
|
|
425
|
+
*
|
|
426
|
+
* @example
|
|
427
|
+
* // Advanced usage with additional props
|
|
428
|
+
* ```tsx
|
|
429
|
+
* <Alert type="warning" dismissible onDismiss={() => console.log('dismissed')} icon="alert_circle">Warning: Please review the details</Alert>
|
|
430
|
+
* ```
|
|
431
|
+
* @param type - Component or input type
|
|
432
|
+
* @param dismissible - dismissible prop
|
|
433
|
+
* @param onDismiss - Callback function triggered on dismissal
|
|
434
|
+
* @param icon - Icon identifier
|
|
435
|
+
*/
|
|
395
436
|
declare const Alert: react.ForwardRefExoticComponent<Omit<AlertProps, "ref"> & react.RefAttributes<AlertHandler>>;
|
|
396
437
|
|
|
397
438
|
type InputProps = Props<`input`> & {
|
|
@@ -411,6 +452,25 @@ type AutoCompleteProps = InputProps & {
|
|
|
411
452
|
withStyle?: string;
|
|
412
453
|
};
|
|
413
454
|
|
|
455
|
+
/**
|
|
456
|
+
* AutoComplete component.
|
|
457
|
+
*
|
|
458
|
+
* @example
|
|
459
|
+
* // Basic usage
|
|
460
|
+
* ```tsx
|
|
461
|
+
* <AutoComplete options={["Apple", "Banana", "Cherry"]} placeholder="Search fruits..." />
|
|
462
|
+
* ```
|
|
463
|
+
*
|
|
464
|
+
* @example
|
|
465
|
+
* // Advanced usage with additional props
|
|
466
|
+
* ```tsx
|
|
467
|
+
* <AutoComplete options={["Apple", "Banana", "Cherry"]} onSelect={(item) => console.log(item)} renderOption={(opt) => <span>{opt}</span>} />
|
|
468
|
+
* ```
|
|
469
|
+
* @param options - Array of available options
|
|
470
|
+
* @param placeholder - Placeholder text
|
|
471
|
+
* @param onSelect - Callback function triggered on selection
|
|
472
|
+
* @param renderOption - renderOption prop
|
|
473
|
+
*/
|
|
414
474
|
declare const AutoComplete: react.ForwardRefExoticComponent<Omit<AutoCompleteProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
415
475
|
|
|
416
476
|
type AvatarProps = Props<"img"> & {
|
|
@@ -425,6 +485,25 @@ type AvatarProps = Props<"img"> & {
|
|
|
425
485
|
interface AvatarHandler {
|
|
426
486
|
}
|
|
427
487
|
|
|
488
|
+
/**
|
|
489
|
+
* Avatar component.
|
|
490
|
+
*
|
|
491
|
+
* @example
|
|
492
|
+
* // Basic usage
|
|
493
|
+
* ```tsx
|
|
494
|
+
* <Avatar src="https://example.com/avatar.jpg" alt="User" />
|
|
495
|
+
* ```
|
|
496
|
+
*
|
|
497
|
+
* @example
|
|
498
|
+
* // Advanced usage with additional props
|
|
499
|
+
* ```tsx
|
|
500
|
+
* <Avatar src="https://example.com/avatar.jpg" alt="User" size="lg" variant="rounded" />
|
|
501
|
+
* ```
|
|
502
|
+
* @param src - Source URL
|
|
503
|
+
* @param alt - Alt text
|
|
504
|
+
* @param size - Component size
|
|
505
|
+
* @param variant - Visual variant or style
|
|
506
|
+
*/
|
|
428
507
|
declare const Avatar: react.ForwardRefExoticComponent<ZuzProps & Omit<Omit<react.DetailedHTMLProps<react.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref">, keyof ZuzProps> & {
|
|
429
508
|
type?: ValueOf<typeof AVATAR>;
|
|
430
509
|
size?: number;
|
|
@@ -453,8 +532,45 @@ type BadgeProps = BoxProps & {
|
|
|
453
532
|
loading?: boolean;
|
|
454
533
|
spinner?: ValueOf<typeof SPINNER>;
|
|
455
534
|
};
|
|
535
|
+
/**
|
|
536
|
+
* Badge component.
|
|
537
|
+
*
|
|
538
|
+
* @example
|
|
539
|
+
* // Basic usage
|
|
540
|
+
* ```tsx
|
|
541
|
+
* <Badge>New</Badge>
|
|
542
|
+
* ```
|
|
543
|
+
*
|
|
544
|
+
* @example
|
|
545
|
+
* // Advanced usage with additional props
|
|
546
|
+
* ```tsx
|
|
547
|
+
* <Badge variant="error" size="lg" icon="star">Premium</Badge>
|
|
548
|
+
* ```
|
|
549
|
+
* @param variant - Visual variant or style
|
|
550
|
+
* @param size - Component size
|
|
551
|
+
* @param icon - Icon identifier
|
|
552
|
+
*/
|
|
456
553
|
declare const Badge: react__default.FC<BadgeProps>;
|
|
457
554
|
|
|
555
|
+
/**
|
|
556
|
+
* Box component.
|
|
557
|
+
*
|
|
558
|
+
* @example
|
|
559
|
+
* // Basic usage
|
|
560
|
+
* ```tsx
|
|
561
|
+
* <Box>Content goes here</Box>
|
|
562
|
+
* ```
|
|
563
|
+
*
|
|
564
|
+
* @example
|
|
565
|
+
* // Advanced usage with additional props
|
|
566
|
+
* ```tsx
|
|
567
|
+
* <Box padding="lg" variant="subtle" borderRadius="md" shadow="sm">Styled container with spacing and effects</Box>
|
|
568
|
+
* ```
|
|
569
|
+
* @param padding - padding prop
|
|
570
|
+
* @param variant - Visual variant or style
|
|
571
|
+
* @param borderRadius - borderRadius prop
|
|
572
|
+
* @param shadow - shadow prop
|
|
573
|
+
*/
|
|
458
574
|
declare const Box: {
|
|
459
575
|
({ ref, style, ...props }: BoxProps): react_jsx_runtime.JSX.Element;
|
|
460
576
|
displayName: string;
|
|
@@ -481,6 +597,27 @@ declare const ButtonState: {
|
|
|
481
597
|
};
|
|
482
598
|
type ButtonState = typeof ButtonState[keyof typeof ButtonState];
|
|
483
599
|
|
|
600
|
+
/**
|
|
601
|
+
* Button component.
|
|
602
|
+
*
|
|
603
|
+
* @example
|
|
604
|
+
* // Basic usage
|
|
605
|
+
* ```tsx
|
|
606
|
+
* <Button onClick={() => console.log("clicked")}>Click me</Button>
|
|
607
|
+
* ```
|
|
608
|
+
*
|
|
609
|
+
* @example
|
|
610
|
+
* // Advanced usage with additional props
|
|
611
|
+
* ```tsx
|
|
612
|
+
* <Button kind="solid" variant="primary" icon="check" state="loading" spinner="simple">Save Changes</Button>
|
|
613
|
+
* ```
|
|
614
|
+
* @param onClick - Callback function triggered on click
|
|
615
|
+
* @param kind - kind prop
|
|
616
|
+
* @param variant - Visual variant or style
|
|
617
|
+
* @param icon - Icon identifier
|
|
618
|
+
* @param state - state prop
|
|
619
|
+
* @param spinner - spinner prop
|
|
620
|
+
*/
|
|
484
621
|
declare const Button: {
|
|
485
622
|
({ ref, ...props }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
486
623
|
displayName: string;
|
|
@@ -492,6 +629,25 @@ type CalendarProps = {
|
|
|
492
629
|
onChange: (date: Date | null) => void;
|
|
493
630
|
};
|
|
494
631
|
|
|
632
|
+
/**
|
|
633
|
+
* Calendar component.
|
|
634
|
+
*
|
|
635
|
+
* @example
|
|
636
|
+
* // Basic usage
|
|
637
|
+
* ```tsx
|
|
638
|
+
* <Calendar onChange={(date) => console.log(date)} />
|
|
639
|
+
* ```
|
|
640
|
+
*
|
|
641
|
+
* @example
|
|
642
|
+
* // Advanced usage with additional props
|
|
643
|
+
* ```tsx
|
|
644
|
+
* <Calendar onChange={(date) => console.log(date)} selected={new Date()} minDate={new Date(2024, 0, 1)} maxDate={new Date()} />
|
|
645
|
+
* ```
|
|
646
|
+
* @param onChange - Callback function triggered when value changes
|
|
647
|
+
* @param selected - Currently selected item/date
|
|
648
|
+
* @param minDate - minDate prop
|
|
649
|
+
* @param maxDate - maxDate prop
|
|
650
|
+
*/
|
|
495
651
|
declare const Calendar: react.ForwardRefExoticComponent<CalendarProps & react.RefAttributes<HTMLInputElement>>;
|
|
496
652
|
|
|
497
653
|
type CarouselEffect = 'slide' | 'coverflow' | 'fade' | 'stack';
|
|
@@ -517,6 +673,25 @@ type CarouselProps<T> = BoxProps & {
|
|
|
517
673
|
};
|
|
518
674
|
|
|
519
675
|
declare function CarouselInner<T>(props: CarouselProps<T>, ref: React.ForwardedRef<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
676
|
+
/**
|
|
677
|
+
* Carousel component.
|
|
678
|
+
*
|
|
679
|
+
* @example
|
|
680
|
+
* // Basic usage
|
|
681
|
+
* ```tsx
|
|
682
|
+
* <Carousel><div>Slide 1</div><div>Slide 2</div><div>Slide 3</div></Carousel>
|
|
683
|
+
* ```
|
|
684
|
+
*
|
|
685
|
+
* @example
|
|
686
|
+
* // Advanced usage with additional props
|
|
687
|
+
* ```tsx
|
|
688
|
+
* <Carousel autoplay interval={5000} onSlideChange={(index) => console.log(index)} controls="dots"><div>Slide 1</div><div>Slide 2</div></Carousel>
|
|
689
|
+
* ```
|
|
690
|
+
* @param autoplay - Whether carousel autoplays
|
|
691
|
+
* @param interval - Autoplay interval in milliseconds
|
|
692
|
+
* @param onSlideChange - Callback function triggered on slide change
|
|
693
|
+
* @param controls - controls prop
|
|
694
|
+
*/
|
|
520
695
|
declare const Carousel: <T>(props: CarouselProps<T> & {
|
|
521
696
|
ref?: React.ForwardedRef<HTMLDivElement>;
|
|
522
697
|
}) => ReturnType<typeof CarouselInner>;
|
|
@@ -530,6 +705,26 @@ type ChartProps = BoxProps & LineChartProps & {
|
|
|
530
705
|
animDelay?: number;
|
|
531
706
|
};
|
|
532
707
|
|
|
708
|
+
/**
|
|
709
|
+
* Chart component.
|
|
710
|
+
*
|
|
711
|
+
* @example
|
|
712
|
+
* // Basic usage
|
|
713
|
+
* ```tsx
|
|
714
|
+
* <Chart type="line" data={[{ x: "Jan", y: 10 }, { x: "Feb", y: 20 }]} />
|
|
715
|
+
* ```
|
|
716
|
+
*
|
|
717
|
+
* @example
|
|
718
|
+
* // Advanced usage with additional props
|
|
719
|
+
* ```tsx
|
|
720
|
+
* <Chart type="bar" data={[{ x: "Q1", y: 100 }, { x: "Q2", y: 150 }]} xKey="x" yKey="y" title="Quarterly Revenue" />
|
|
721
|
+
* ```
|
|
722
|
+
* @param type - Component or input type
|
|
723
|
+
* @param data - Data for visualization
|
|
724
|
+
* @param xKey - xKey prop
|
|
725
|
+
* @param yKey - yKey prop
|
|
726
|
+
* @param title - Title text or element
|
|
727
|
+
*/
|
|
533
728
|
declare const Chart: react.ForwardRefExoticComponent<Omit<ChartProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
534
729
|
|
|
535
730
|
declare enum BubbleStatus {
|
|
@@ -562,6 +757,25 @@ type BubbleProps = BoxProps & {
|
|
|
562
757
|
arrow?: boolean;
|
|
563
758
|
};
|
|
564
759
|
|
|
760
|
+
/**
|
|
761
|
+
* ChatBubble component.
|
|
762
|
+
*
|
|
763
|
+
* @example
|
|
764
|
+
* // Basic usage
|
|
765
|
+
* ```tsx
|
|
766
|
+
* <ChatBubble message="Hello! How can I help?" sender="assistant" />
|
|
767
|
+
* ```
|
|
768
|
+
*
|
|
769
|
+
* @example
|
|
770
|
+
* // Advanced usage with additional props
|
|
771
|
+
* ```tsx
|
|
772
|
+
* <ChatBubble message="I need help with my order" sender="user" timestamp={new Date()} avatar="user-icon" />
|
|
773
|
+
* ```
|
|
774
|
+
* @param message - Message text or element
|
|
775
|
+
* @param sender - sender prop
|
|
776
|
+
* @param timestamp - timestamp prop
|
|
777
|
+
* @param avatar - avatar prop
|
|
778
|
+
*/
|
|
565
779
|
declare const Bubble: react.ForwardRefExoticComponent<Omit<BubbleProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
566
780
|
|
|
567
781
|
/**
|
|
@@ -590,6 +804,25 @@ interface CheckboxHandler {
|
|
|
590
804
|
toggle: (triggerChange?: boolean) => void;
|
|
591
805
|
}
|
|
592
806
|
|
|
807
|
+
/**
|
|
808
|
+
* CheckBox component.
|
|
809
|
+
*
|
|
810
|
+
* @example
|
|
811
|
+
* // Basic usage
|
|
812
|
+
* ```tsx
|
|
813
|
+
* <CheckBox label="I agree" onChange={(checked) => console.log(checked)} />
|
|
814
|
+
* ```
|
|
815
|
+
*
|
|
816
|
+
* @example
|
|
817
|
+
* // Advanced usage with additional props
|
|
818
|
+
* ```tsx
|
|
819
|
+
* <CheckBox label="Remember me" defaultChecked={true} disabled={false} variant="primary" />
|
|
820
|
+
* ```
|
|
821
|
+
* @param label - Label text for the component
|
|
822
|
+
* @param onChange - Callback function triggered when value changes
|
|
823
|
+
* @param defaultChecked - Whether component is checked by default
|
|
824
|
+
* @param variant - Visual variant or style
|
|
825
|
+
*/
|
|
593
826
|
declare const CheckBox: {
|
|
594
827
|
({ ref, ...props }: CheckBoxProps & {
|
|
595
828
|
ref?: Ref<CheckboxHandler>;
|
|
@@ -609,6 +842,25 @@ interface CodeBlockProps extends ZuzProps {
|
|
|
609
842
|
};
|
|
610
843
|
}
|
|
611
844
|
|
|
845
|
+
/**
|
|
846
|
+
* CodeBlock component.
|
|
847
|
+
*
|
|
848
|
+
* @example
|
|
849
|
+
* // Basic usage
|
|
850
|
+
* ```tsx
|
|
851
|
+
* <CodeBlock language="tsx">const greeting = "Hello World";</CodeBlock>
|
|
852
|
+
* ```
|
|
853
|
+
*
|
|
854
|
+
* @example
|
|
855
|
+
* // Advanced usage with additional props
|
|
856
|
+
* ```tsx
|
|
857
|
+
* <CodeBlock language="tsx" showLineNumbers copyable highlight={[2, 5]}>const greet = () => console.log("Hi");<br/>greet();</CodeBlock>
|
|
858
|
+
* ```
|
|
859
|
+
* @param language - language prop
|
|
860
|
+
* @param showLineNumbers - showLineNumbers prop
|
|
861
|
+
* @param copyable - copyable prop
|
|
862
|
+
* @param highlight - highlight prop
|
|
863
|
+
*/
|
|
612
864
|
declare const CodeBlock: ({ ref, ...props }: CodeBlockProps) => react_jsx_runtime.JSX.Element;
|
|
613
865
|
|
|
614
866
|
/**
|
|
@@ -652,6 +904,24 @@ type ColorSchemeProps = Omit<SegmentProps, `items`> & {
|
|
|
652
904
|
type?: "switch" | "toggle" | "system";
|
|
653
905
|
};
|
|
654
906
|
|
|
907
|
+
/**
|
|
908
|
+
* ColorScheme component.
|
|
909
|
+
*
|
|
910
|
+
* @example
|
|
911
|
+
* // Basic usage
|
|
912
|
+
* ```tsx
|
|
913
|
+
* <ColorScheme type="system" />
|
|
914
|
+
* ```
|
|
915
|
+
*
|
|
916
|
+
* @example
|
|
917
|
+
* // Advanced usage with additional props
|
|
918
|
+
* ```tsx
|
|
919
|
+
* <ColorScheme type="light" variant="sm" onChange={(scheme) => console.log(scheme)} />
|
|
920
|
+
* ```
|
|
921
|
+
* @param type - Component or input type
|
|
922
|
+
* @param variant - Visual variant or style
|
|
923
|
+
* @param onChange - Callback function triggered when value changes
|
|
924
|
+
*/
|
|
655
925
|
declare const ColorScheme$1: react.ForwardRefExoticComponent<Omit<ColorSchemeProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
656
926
|
|
|
657
927
|
/**
|
|
@@ -731,6 +1001,23 @@ interface ContextMenuHandler {
|
|
|
731
1001
|
hide: (e: MouseEvent$1 | TouchEvent) => void;
|
|
732
1002
|
}
|
|
733
1003
|
|
|
1004
|
+
/**
|
|
1005
|
+
* ContextMenu component.
|
|
1006
|
+
*
|
|
1007
|
+
* @example
|
|
1008
|
+
* // Basic usage
|
|
1009
|
+
* ```tsx
|
|
1010
|
+
* <ContextMenu items={[{ label: "Edit" }, { label: "Delete" }]}>Right-click here</ContextMenu>
|
|
1011
|
+
* ```
|
|
1012
|
+
*
|
|
1013
|
+
* @example
|
|
1014
|
+
* // Advanced usage with additional props
|
|
1015
|
+
* ```tsx
|
|
1016
|
+
* <ContextMenu items={[{ label: "Copy", icon: "copy" }, { label: "Paste", icon: "paste" }]} onSelect={(item) => console.log(item)}>Content</ContextMenu>
|
|
1017
|
+
* ```
|
|
1018
|
+
* @param items - Array of items
|
|
1019
|
+
* @param onSelect - Callback function triggered on selection
|
|
1020
|
+
*/
|
|
734
1021
|
declare const ContextMenu: {
|
|
735
1022
|
({ ref, ...props }: ContextMenuProps & {}): react_jsx_runtime.JSX.Element;
|
|
736
1023
|
displayName: string;
|
|
@@ -744,6 +1031,26 @@ type CookieConsentProps = {
|
|
|
744
1031
|
position?: ValueOf<typeof Position>;
|
|
745
1032
|
};
|
|
746
1033
|
|
|
1034
|
+
/**
|
|
1035
|
+
* CookiesConsent component.
|
|
1036
|
+
*
|
|
1037
|
+
* @example
|
|
1038
|
+
* // Basic usage
|
|
1039
|
+
* ```tsx
|
|
1040
|
+
* <CookiesConsent message="We use cookies to enhance your experience" onAccept={() => console.log("accepted")} />
|
|
1041
|
+
* ```
|
|
1042
|
+
*
|
|
1043
|
+
* @example
|
|
1044
|
+
* // Advanced usage with additional props
|
|
1045
|
+
* ```tsx
|
|
1046
|
+
* <CookiesConsent title="Cookie Policy" message="Help us improve..." acceptLabel="I agree" rejectLabel="Decline" onAccept={() => {}} onReject={() => {}} />
|
|
1047
|
+
* ```
|
|
1048
|
+
* @param message - Message text or element
|
|
1049
|
+
* @param onAccept - onAccept prop
|
|
1050
|
+
* @param title - Title text or element
|
|
1051
|
+
* @param acceptLabel - acceptLabel prop
|
|
1052
|
+
* @param rejectLabel - rejectLabel prop
|
|
1053
|
+
*/
|
|
747
1054
|
declare const CookiesConsent: react.ForwardRefExoticComponent<CookieConsentProps & react.RefAttributes<HTMLDivElement>>;
|
|
748
1055
|
|
|
749
1056
|
type CoverProps = BoxProps & {
|
|
@@ -754,6 +1061,25 @@ type CoverProps = BoxProps & {
|
|
|
754
1061
|
when?: boolean;
|
|
755
1062
|
hideMessage?: boolean;
|
|
756
1063
|
};
|
|
1064
|
+
/**
|
|
1065
|
+
* Cover component.
|
|
1066
|
+
*
|
|
1067
|
+
* @example
|
|
1068
|
+
* // Basic usage
|
|
1069
|
+
* ```tsx
|
|
1070
|
+
* <Cover src="https://example.com/image.jpg" alt="Cover image" />
|
|
1071
|
+
* ```
|
|
1072
|
+
*
|
|
1073
|
+
* @example
|
|
1074
|
+
* // Advanced usage with additional props
|
|
1075
|
+
* ```tsx
|
|
1076
|
+
* <Cover src="https://example.com/image.jpg" alt="Cover" objectFit="cover" height="400px" />
|
|
1077
|
+
* ```
|
|
1078
|
+
* @param src - Source URL
|
|
1079
|
+
* @param alt - Alt text
|
|
1080
|
+
* @param objectFit - objectFit prop
|
|
1081
|
+
* @param height - height prop
|
|
1082
|
+
*/
|
|
757
1083
|
declare const Cover: react.ForwardRefExoticComponent<Omit<CoverProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
758
1084
|
|
|
759
1085
|
declare enum CropShape {
|
|
@@ -770,6 +1096,25 @@ interface CropHandler {
|
|
|
770
1096
|
setScale: (scale: number) => void;
|
|
771
1097
|
}
|
|
772
1098
|
|
|
1099
|
+
/**
|
|
1100
|
+
* Cropper component.
|
|
1101
|
+
*
|
|
1102
|
+
* @example
|
|
1103
|
+
* // Basic usage
|
|
1104
|
+
* ```tsx
|
|
1105
|
+
* <Cropper src="https://example.com/image.jpg" onCrop={(data) => console.log(data)} />
|
|
1106
|
+
* ```
|
|
1107
|
+
*
|
|
1108
|
+
* @example
|
|
1109
|
+
* // Advanced usage with additional props
|
|
1110
|
+
* ```tsx
|
|
1111
|
+
* <Cropper src="https://example.com/image.jpg" aspectRatio={16/9} onCrop={(data) => console.log(data)} guides />
|
|
1112
|
+
* ```
|
|
1113
|
+
* @param src - Source URL
|
|
1114
|
+
* @param aspectRatio - aspectRatio prop
|
|
1115
|
+
* @param onCrop - Callback function triggered on crop action
|
|
1116
|
+
* @param guides - guides prop
|
|
1117
|
+
*/
|
|
773
1118
|
declare const Cropper: react.ForwardRefExoticComponent<Omit<CropperProps, "ref"> & react.RefAttributes<CropHandler>>;
|
|
774
1119
|
|
|
775
1120
|
type CrumbItem = {
|
|
@@ -785,6 +1130,23 @@ type CrumbProps = BoxProps & {
|
|
|
785
1130
|
basePath?: string;
|
|
786
1131
|
};
|
|
787
1132
|
|
|
1133
|
+
/**
|
|
1134
|
+
* Crumb component.
|
|
1135
|
+
*
|
|
1136
|
+
* @example
|
|
1137
|
+
* // Basic usage
|
|
1138
|
+
* ```tsx
|
|
1139
|
+
* <Crumb items={[{ label: "Home" }, { label: "Products" }]} />
|
|
1140
|
+
* ```
|
|
1141
|
+
*
|
|
1142
|
+
* @example
|
|
1143
|
+
* // Advanced usage with additional props
|
|
1144
|
+
* ```tsx
|
|
1145
|
+
* <Crumb items={[{ label: "Home", href: "/" }, { label: "Shop", href: "/shop" }, { label: "Shoes" }]} separator="/" />
|
|
1146
|
+
* ```
|
|
1147
|
+
* @param items - Array of items
|
|
1148
|
+
* @param separator - separator prop
|
|
1149
|
+
*/
|
|
788
1150
|
declare const Crumb: react.ForwardRefExoticComponent<Omit<CrumbProps, "ref"> & react.RefAttributes<HTMLOListElement | HTMLUListElement>>;
|
|
789
1151
|
|
|
790
1152
|
type DatePickerProps = InputProps & {
|
|
@@ -792,6 +1154,25 @@ type DatePickerProps = InputProps & {
|
|
|
792
1154
|
defaultValue?: Date | null;
|
|
793
1155
|
};
|
|
794
1156
|
|
|
1157
|
+
/**
|
|
1158
|
+
* DatePicker component.
|
|
1159
|
+
*
|
|
1160
|
+
* @example
|
|
1161
|
+
* // Basic usage
|
|
1162
|
+
* ```tsx
|
|
1163
|
+
* <DatePicker onChange={(date) => console.log(date)} />
|
|
1164
|
+
* ```
|
|
1165
|
+
*
|
|
1166
|
+
* @example
|
|
1167
|
+
* // Advanced usage with additional props
|
|
1168
|
+
* ```tsx
|
|
1169
|
+
* <DatePicker onChange={(date) => console.log(date)} selected={new Date()} format="MM/dd/yyyy" disabled={false} />
|
|
1170
|
+
* ```
|
|
1171
|
+
* @param onChange - Callback function triggered when value changes
|
|
1172
|
+
* @param selected - Currently selected item/date
|
|
1173
|
+
* @param format - format prop
|
|
1174
|
+
* @param disabled - Whether component is disabled
|
|
1175
|
+
*/
|
|
795
1176
|
declare const DatePicker: react.ForwardRefExoticComponent<Omit<DatePickerProps, "ref"> & react.RefAttributes<HTMLInputElement>>;
|
|
796
1177
|
|
|
797
1178
|
type DialogProps = ZuzProps & {
|
|
@@ -827,6 +1208,26 @@ interface DialogHandler {
|
|
|
827
1208
|
hide: () => void;
|
|
828
1209
|
}
|
|
829
1210
|
|
|
1211
|
+
/**
|
|
1212
|
+
* Dialog component.
|
|
1213
|
+
*
|
|
1214
|
+
* @example
|
|
1215
|
+
* // Basic usage
|
|
1216
|
+
* ```tsx
|
|
1217
|
+
* <Dialog title="Confirm" message="Are you sure?" action={[{ label: "OK" }, { label: "Cancel" }]} />
|
|
1218
|
+
* ```
|
|
1219
|
+
*
|
|
1220
|
+
* @example
|
|
1221
|
+
* // Advanced usage with additional props
|
|
1222
|
+
* ```tsx
|
|
1223
|
+
* <Dialog title="Save Changes?" message="Your edits will be lost" type="warning" action={[{ label: "Save", handler: () => {} }, { label: "Discard" }]} onShow={() => console.log("shown")} />
|
|
1224
|
+
* ```
|
|
1225
|
+
* @param title - Title text or element
|
|
1226
|
+
* @param message - Message text or element
|
|
1227
|
+
* @param type - Component or input type
|
|
1228
|
+
* @param action - action prop
|
|
1229
|
+
* @param onShow - Callback function triggered when showing
|
|
1230
|
+
*/
|
|
830
1231
|
declare const Dialog: {
|
|
831
1232
|
({ ref, ...props }: DialogProps & {
|
|
832
1233
|
index: number;
|
|
@@ -853,6 +1254,26 @@ interface DrawerHandler {
|
|
|
853
1254
|
close: () => void;
|
|
854
1255
|
}
|
|
855
1256
|
|
|
1257
|
+
/**
|
|
1258
|
+
* Drawer component.
|
|
1259
|
+
*
|
|
1260
|
+
* @example
|
|
1261
|
+
* // Basic usage
|
|
1262
|
+
* ```tsx
|
|
1263
|
+
* <Drawer open={true} onClose={() => setOpen(false)}>Drawer content here</Drawer>
|
|
1264
|
+
* ```
|
|
1265
|
+
*
|
|
1266
|
+
* @example
|
|
1267
|
+
* // Advanced usage with additional props
|
|
1268
|
+
* ```tsx
|
|
1269
|
+
* <Drawer open={true} onClose={() => setOpen(false)} position="right" size="lg" variant="overlay">Navigation menu</Drawer>
|
|
1270
|
+
* ```
|
|
1271
|
+
* @param open - Whether drawer/sheet is open
|
|
1272
|
+
* @param onClose - Callback function triggered when closing
|
|
1273
|
+
* @param position - position prop
|
|
1274
|
+
* @param size - Component size
|
|
1275
|
+
* @param variant - Visual variant or style
|
|
1276
|
+
*/
|
|
856
1277
|
declare const Drawer: {
|
|
857
1278
|
({ ref, ...props }: DrawerProps & {
|
|
858
1279
|
ref?: Ref<HTMLDivElement>;
|
|
@@ -906,12 +1327,48 @@ type FabProps = Omit<ButtonProps, `icon`> & {
|
|
|
906
1327
|
position?: ValueOf<typeof Position>;
|
|
907
1328
|
};
|
|
908
1329
|
|
|
1330
|
+
/**
|
|
1331
|
+
* Fab component.
|
|
1332
|
+
*
|
|
1333
|
+
* @example
|
|
1334
|
+
* // Basic usage
|
|
1335
|
+
* ```tsx
|
|
1336
|
+
* <Fab icon="plus" onClick={() => console.log("clicked")} />
|
|
1337
|
+
* ```
|
|
1338
|
+
*
|
|
1339
|
+
* @example
|
|
1340
|
+
* // Advanced usage with additional props
|
|
1341
|
+
* ```tsx
|
|
1342
|
+
* <Fab icon="plus" onClick={() => console.log("clicked")} variant="primary" size="lg" />
|
|
1343
|
+
* ```
|
|
1344
|
+
* @param icon - Icon identifier
|
|
1345
|
+
* @param onClick - Callback function triggered on click
|
|
1346
|
+
* @param variant - Visual variant or style
|
|
1347
|
+
* @param size - Component size
|
|
1348
|
+
*/
|
|
909
1349
|
declare const Fab: react.ForwardRefExoticComponent<Omit<FabProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
|
|
910
1350
|
|
|
911
1351
|
type FilterProps = {
|
|
912
1352
|
names?: ValueOf<typeof FILTER>[];
|
|
913
1353
|
strength?: number;
|
|
914
1354
|
};
|
|
1355
|
+
/**
|
|
1356
|
+
* Filters component.
|
|
1357
|
+
*
|
|
1358
|
+
* @example
|
|
1359
|
+
* // Basic usage
|
|
1360
|
+
* ```tsx
|
|
1361
|
+
* <Filters filters={[{ label: "Category", values: ["All", "New", "Sale"] }]} onApply={(selected) => console.log(selected)} />
|
|
1362
|
+
* ```
|
|
1363
|
+
*
|
|
1364
|
+
* @example
|
|
1365
|
+
* // Advanced usage with additional props
|
|
1366
|
+
* ```tsx
|
|
1367
|
+
* <Filters filters={[{ label: "Price", type: "range", min: 0, max: 1000 }, { label: "Brand", values: ["Nike", "Adidas"] }]} onApply={(selected) => {}} />
|
|
1368
|
+
* ```
|
|
1369
|
+
* @param filters - filters prop
|
|
1370
|
+
* @param onApply - Callback function triggered on filter apply
|
|
1371
|
+
*/
|
|
915
1372
|
declare const Filters: {
|
|
916
1373
|
(props: FilterProps): react_jsx_runtime.JSX.Element;
|
|
917
1374
|
displayName: string;
|
|
@@ -936,6 +1393,26 @@ type FlexProps = BoxProps & {
|
|
|
936
1393
|
jcs?: boolean;
|
|
937
1394
|
};
|
|
938
1395
|
|
|
1396
|
+
/**
|
|
1397
|
+
* Flex component.
|
|
1398
|
+
*
|
|
1399
|
+
* @example
|
|
1400
|
+
* // Basic usage
|
|
1401
|
+
* ```tsx
|
|
1402
|
+
* <Flex gap="md" align="center">Item 1 | Item 2 | Item 3</Flex>
|
|
1403
|
+
* ```
|
|
1404
|
+
*
|
|
1405
|
+
* @example
|
|
1406
|
+
* // Advanced usage with additional props
|
|
1407
|
+
* ```tsx
|
|
1408
|
+
* <Flex gap="lg" align="center" justify="space-between" direction="row" wrap={true}>Flexible layout</Flex>
|
|
1409
|
+
* ```
|
|
1410
|
+
* @param gap - Spacing between items
|
|
1411
|
+
* @param align - Alignment direction
|
|
1412
|
+
* @param justify - Justification direction
|
|
1413
|
+
* @param direction - direction prop
|
|
1414
|
+
* @param wrap - wrap prop
|
|
1415
|
+
*/
|
|
939
1416
|
declare const Flex: FC<FlexProps>;
|
|
940
1417
|
|
|
941
1418
|
type SheetProps = ZuzProps & {
|
|
@@ -967,6 +1444,26 @@ interface SheetHandler {
|
|
|
967
1444
|
warn: (message: string | ReactNode, duration?: number) => void;
|
|
968
1445
|
hide: () => void;
|
|
969
1446
|
}
|
|
1447
|
+
/**
|
|
1448
|
+
* Sheet component.
|
|
1449
|
+
*
|
|
1450
|
+
* @example
|
|
1451
|
+
* // Basic usage
|
|
1452
|
+
* ```tsx
|
|
1453
|
+
* <Sheet isOpen={true} onClose={() => setOpen(false)}>Content here</Sheet>
|
|
1454
|
+
* ```
|
|
1455
|
+
*
|
|
1456
|
+
* @example
|
|
1457
|
+
* // Advanced usage with additional props
|
|
1458
|
+
* ```tsx
|
|
1459
|
+
* <Sheet isOpen={true} onClose={() => setOpen(false)} position="bottom" size="md" backdrop>Bottom sheet</Sheet>
|
|
1460
|
+
* ```
|
|
1461
|
+
* @param isOpen - Whether sheet is open
|
|
1462
|
+
* @param onClose - Callback function triggered when closing
|
|
1463
|
+
* @param position - position prop
|
|
1464
|
+
* @param size - Component size
|
|
1465
|
+
* @param backdrop - backdrop prop
|
|
1466
|
+
*/
|
|
970
1467
|
declare const Sheet: react.ForwardRefExoticComponent<ZuzProps & {
|
|
971
1468
|
title?: string;
|
|
972
1469
|
message?: string | ReactNode;
|
|
@@ -1032,6 +1529,24 @@ interface FormHandler {
|
|
|
1032
1529
|
submit: (more?: dynamic) => void;
|
|
1033
1530
|
}
|
|
1034
1531
|
|
|
1532
|
+
/**
|
|
1533
|
+
* Form component.
|
|
1534
|
+
*
|
|
1535
|
+
* @example
|
|
1536
|
+
* // Basic usage
|
|
1537
|
+
* ```tsx
|
|
1538
|
+
* <Form onSubmit={(data) => console.log(data)}><input /></Form>
|
|
1539
|
+
* ```
|
|
1540
|
+
*
|
|
1541
|
+
* @example
|
|
1542
|
+
* // Advanced usage with additional props
|
|
1543
|
+
* ```tsx
|
|
1544
|
+
* <Form onSubmit={(data) => console.log(data)} validation={{ email: "required" }} onError={() => {}}><input placeholder="Email" /></Form>
|
|
1545
|
+
* ```
|
|
1546
|
+
* @param onSubmit - Callback function triggered on form submission
|
|
1547
|
+
* @param validation - validation prop
|
|
1548
|
+
* @param onError - Callback function triggered on error
|
|
1549
|
+
*/
|
|
1035
1550
|
declare const Form: {
|
|
1036
1551
|
(props: FormProps & {
|
|
1037
1552
|
ref?: Ref<FormHandler>;
|
|
@@ -1054,6 +1569,24 @@ interface GridProps extends Omit<BoxProps, 'cols'> {
|
|
|
1054
1569
|
template?: string;
|
|
1055
1570
|
}
|
|
1056
1571
|
|
|
1572
|
+
/**
|
|
1573
|
+
* Grid component.
|
|
1574
|
+
*
|
|
1575
|
+
* @example
|
|
1576
|
+
* // Basic usage
|
|
1577
|
+
* ```tsx
|
|
1578
|
+
* <Grid columns={3}><div>1</div><div>2</div><div>3</div></Grid>
|
|
1579
|
+
* ```
|
|
1580
|
+
*
|
|
1581
|
+
* @example
|
|
1582
|
+
* // Advanced usage with additional props
|
|
1583
|
+
* ```tsx
|
|
1584
|
+
* <Grid columns={4} gap="lg" minColWidth="200px"><div>Cell 1</div><div>Cell 2</div></Grid>
|
|
1585
|
+
* ```
|
|
1586
|
+
* @param columns - Number of columns
|
|
1587
|
+
* @param gap - Spacing between items
|
|
1588
|
+
* @param minColWidth - minColWidth prop
|
|
1589
|
+
*/
|
|
1057
1590
|
declare const Grid: {
|
|
1058
1591
|
(props: GridProps): react_jsx_runtime.JSX.Element;
|
|
1059
1592
|
displayName: string;
|
|
@@ -1065,6 +1598,24 @@ type GroupProps = BoxProps & {
|
|
|
1065
1598
|
fxStep?: number;
|
|
1066
1599
|
classToIgnore?: string;
|
|
1067
1600
|
};
|
|
1601
|
+
/**
|
|
1602
|
+
* Group component.
|
|
1603
|
+
*
|
|
1604
|
+
* @example
|
|
1605
|
+
* // Basic usage
|
|
1606
|
+
* ```tsx
|
|
1607
|
+
* <Group>Group content</Group>
|
|
1608
|
+
* ```
|
|
1609
|
+
*
|
|
1610
|
+
* @example
|
|
1611
|
+
* // Advanced usage with additional props
|
|
1612
|
+
* ```tsx
|
|
1613
|
+
* <Group spacing="md" variant="card" direction="vertical">Grouped elements</Group>
|
|
1614
|
+
* ```
|
|
1615
|
+
* @param spacing - spacing prop
|
|
1616
|
+
* @param variant - Visual variant or style
|
|
1617
|
+
* @param direction - direction prop
|
|
1618
|
+
*/
|
|
1068
1619
|
declare const Group: react.ForwardRefExoticComponent<Omit<GroupProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
1069
1620
|
|
|
1070
1621
|
type IconProps = Omit<BoxProps, `name`> & {
|
|
@@ -1076,11 +1627,69 @@ type IconProps = Omit<BoxProps, `name`> & {
|
|
|
1076
1627
|
size?: number;
|
|
1077
1628
|
};
|
|
1078
1629
|
|
|
1630
|
+
/**
|
|
1631
|
+
* Icon component.
|
|
1632
|
+
*
|
|
1633
|
+
* @example
|
|
1634
|
+
* // Basic usage
|
|
1635
|
+
* ```tsx
|
|
1636
|
+
* <Icon name="star" />
|
|
1637
|
+
* ```
|
|
1638
|
+
*
|
|
1639
|
+
* @example
|
|
1640
|
+
* // Advanced usage with additional props
|
|
1641
|
+
* ```tsx
|
|
1642
|
+
* <Icon name="star" variant="lg" color="gold" />
|
|
1643
|
+
* ```
|
|
1644
|
+
* @param name - name prop
|
|
1645
|
+
* @param variant - Visual variant or style
|
|
1646
|
+
* @param color - color prop
|
|
1647
|
+
*/
|
|
1079
1648
|
declare const Icon: react.ForwardRefExoticComponent<Omit<IconProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
1080
1649
|
|
|
1081
1650
|
type ImageProps = Props<`img`> & {};
|
|
1651
|
+
/**
|
|
1652
|
+
* Image component.
|
|
1653
|
+
*
|
|
1654
|
+
* @example
|
|
1655
|
+
* // Basic usage
|
|
1656
|
+
* ```tsx
|
|
1657
|
+
* <Image src="https://example.com/image.jpg" alt="Description" />
|
|
1658
|
+
* ```
|
|
1659
|
+
*
|
|
1660
|
+
* @example
|
|
1661
|
+
* // Advanced usage with additional props
|
|
1662
|
+
* ```tsx
|
|
1663
|
+
* <Image src="https://example.com/image.jpg" alt="Product" width="300px" height="auto" objectFit="cover" />
|
|
1664
|
+
* ```
|
|
1665
|
+
* @param src - Source URL
|
|
1666
|
+
* @param alt - Alt text
|
|
1667
|
+
* @param width - width prop
|
|
1668
|
+
* @param height - height prop
|
|
1669
|
+
* @param objectFit - objectFit prop
|
|
1670
|
+
*/
|
|
1082
1671
|
declare const Image: react.ForwardRefExoticComponent<ZuzProps & Omit<Omit<react.DetailedHTMLProps<react.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref">, keyof ZuzProps> & react.RefAttributes<HTMLImageElement>>;
|
|
1083
1672
|
|
|
1673
|
+
/**
|
|
1674
|
+
* Input component.
|
|
1675
|
+
*
|
|
1676
|
+
* @example
|
|
1677
|
+
* // Basic usage
|
|
1678
|
+
* ```tsx
|
|
1679
|
+
* <Input placeholder="Enter text..." onChange={(e) => console.log(e.target.value)} />
|
|
1680
|
+
* ```
|
|
1681
|
+
*
|
|
1682
|
+
* @example
|
|
1683
|
+
* // Advanced usage with additional props
|
|
1684
|
+
* ```tsx
|
|
1685
|
+
* <Input placeholder="Email" type="email" variant="primary" disabled={false} onConfirm={(value) => console.log(value)} />
|
|
1686
|
+
* ```
|
|
1687
|
+
* @param placeholder - Placeholder text
|
|
1688
|
+
* @param onChange - Callback function triggered when value changes
|
|
1689
|
+
* @param type - Component or input type
|
|
1690
|
+
* @param variant - Visual variant or style
|
|
1691
|
+
* @param onConfirm - Callback function triggered on confirmation
|
|
1692
|
+
*/
|
|
1084
1693
|
declare const Input: {
|
|
1085
1694
|
({ ref, ...props }: InputProps): react_jsx_runtime.JSX.Element;
|
|
1086
1695
|
displayName: string;
|
|
@@ -1097,9 +1706,44 @@ type KeyboardKeyProps = BoxProps & {
|
|
|
1097
1706
|
variant?: ValueOf<typeof Variant>;
|
|
1098
1707
|
};
|
|
1099
1708
|
|
|
1709
|
+
/**
|
|
1710
|
+
* KeyboardKeys component.
|
|
1711
|
+
*
|
|
1712
|
+
* @example
|
|
1713
|
+
* // Basic usage
|
|
1714
|
+
* ```tsx
|
|
1715
|
+
* <KeyboardKeys keys={["Ctrl", "K"]} />
|
|
1716
|
+
* ```
|
|
1717
|
+
*
|
|
1718
|
+
* @example
|
|
1719
|
+
* // Advanced usage with additional props
|
|
1720
|
+
* ```tsx
|
|
1721
|
+
* <KeyboardKeys keys={["Cmd", "Shift", "P"]} size="sm" variant="dark" />
|
|
1722
|
+
* ```
|
|
1723
|
+
* @param keys - keys prop
|
|
1724
|
+
* @param size - Component size
|
|
1725
|
+
* @param variant - Visual variant or style
|
|
1726
|
+
*/
|
|
1100
1727
|
declare const KeyBoardKeys: react.ForwardRefExoticComponent<Omit<KeyboardKeyProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
1101
1728
|
|
|
1102
1729
|
type LabelProps = Props<`label`> & {};
|
|
1730
|
+
/**
|
|
1731
|
+
* Label component.
|
|
1732
|
+
*
|
|
1733
|
+
* @example
|
|
1734
|
+
* // Basic usage
|
|
1735
|
+
* ```tsx
|
|
1736
|
+
* <Label>Username</Label>
|
|
1737
|
+
* ```
|
|
1738
|
+
*
|
|
1739
|
+
* @example
|
|
1740
|
+
* // Advanced usage with additional props
|
|
1741
|
+
* ```tsx
|
|
1742
|
+
* <Label required={true} error="Username is required">Username</Label>
|
|
1743
|
+
* ```
|
|
1744
|
+
* @param required - required prop
|
|
1745
|
+
* @param error - error prop
|
|
1746
|
+
*/
|
|
1103
1747
|
declare const Label: react.ForwardRefExoticComponent<ZuzProps & Omit<Omit<react.DetailedHTMLProps<react.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref">, keyof ZuzProps> & react.RefAttributes<HTMLLabelElement>>;
|
|
1104
1748
|
|
|
1105
1749
|
declare enum ToastType {
|
|
@@ -1150,6 +1794,23 @@ interface ToastProps {
|
|
|
1150
1794
|
|
|
1151
1795
|
type LayerType = "dialog" | "drawer" | "toast" | "menu";
|
|
1152
1796
|
|
|
1797
|
+
/**
|
|
1798
|
+
* Layers component.
|
|
1799
|
+
*
|
|
1800
|
+
* @example
|
|
1801
|
+
* // Basic usage
|
|
1802
|
+
* ```tsx
|
|
1803
|
+
* <Layers>Content with layering</Layers>
|
|
1804
|
+
* ```
|
|
1805
|
+
*
|
|
1806
|
+
* @example
|
|
1807
|
+
* // Advanced usage with additional props
|
|
1808
|
+
* ```tsx
|
|
1809
|
+
* <Layers zIndex={10} opacity={0.9}>Stacked content</Layers>
|
|
1810
|
+
* ```
|
|
1811
|
+
* @param zIndex - Z-index stacking order
|
|
1812
|
+
* @param opacity - Opacity level (0-1)
|
|
1813
|
+
*/
|
|
1153
1814
|
declare const LayersProvider: FC<{
|
|
1154
1815
|
children: ReactNode;
|
|
1155
1816
|
}>;
|
|
@@ -1171,6 +1832,24 @@ type ListProps = Props<`ul` | `ol`> & {
|
|
|
1171
1832
|
ol?: boolean;
|
|
1172
1833
|
};
|
|
1173
1834
|
|
|
1835
|
+
/**
|
|
1836
|
+
* List component.
|
|
1837
|
+
*
|
|
1838
|
+
* @example
|
|
1839
|
+
* // Basic usage
|
|
1840
|
+
* ```tsx
|
|
1841
|
+
* <List items={[{ label: "Item 1" }, { label: "Item 2" }]} />
|
|
1842
|
+
* ```
|
|
1843
|
+
*
|
|
1844
|
+
* @example
|
|
1845
|
+
* // Advanced usage with additional props
|
|
1846
|
+
* ```tsx
|
|
1847
|
+
* <List items={[{ label: "Tasks", count: 5 }, { label: "Done", count: 2 }]} onSelect={(item) => {}} divider />
|
|
1848
|
+
* ```
|
|
1849
|
+
* @param items - Array of items
|
|
1850
|
+
* @param onSelect - Callback function triggered on selection
|
|
1851
|
+
* @param divider - divider prop
|
|
1852
|
+
*/
|
|
1174
1853
|
declare const List: react.ForwardRefExoticComponent<ZuzProps & Omit<Omit<react.DetailedHTMLProps<react.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref"> | Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref">, keyof ZuzProps> & {
|
|
1175
1854
|
variant?: ValueOf<typeof Variant>;
|
|
1176
1855
|
items: ListItem[];
|
|
@@ -1210,7 +1889,27 @@ type MediaPlayerContextType = ReturnType<typeof useMediaPlayer> & {
|
|
|
1210
1889
|
defaultArtist?: string;
|
|
1211
1890
|
};
|
|
1212
1891
|
|
|
1213
|
-
|
|
1892
|
+
/**
|
|
1893
|
+
* MediaPlayer component.
|
|
1894
|
+
*
|
|
1895
|
+
* @example
|
|
1896
|
+
* // Basic usage
|
|
1897
|
+
* ```tsx
|
|
1898
|
+
* <MediaPlayer src="https://example.com/video.mp4" type="video" />
|
|
1899
|
+
* ```
|
|
1900
|
+
*
|
|
1901
|
+
* @example
|
|
1902
|
+
* // Advanced usage with additional props
|
|
1903
|
+
* ```tsx
|
|
1904
|
+
* <MediaPlayer src="https://example.com/video.mp4" type="video" controls autoplay={false} width="100%" />
|
|
1905
|
+
* ```
|
|
1906
|
+
* @param src - Source URL
|
|
1907
|
+
* @param type - Component or input type
|
|
1908
|
+
* @param controls - controls prop
|
|
1909
|
+
* @param autoplay - Whether carousel autoplays
|
|
1910
|
+
* @param width - width prop
|
|
1911
|
+
*/
|
|
1912
|
+
declare const MediaPlayer: (({ ref, icons: customIcons, children, ...props }: MediaPlayerProps) => react_jsx_runtime.JSX.Element) & {
|
|
1214
1913
|
Stage: () => react_jsx_runtime.JSX.Element;
|
|
1215
1914
|
TrackInfo: () => react_jsx_runtime.JSX.Element;
|
|
1216
1915
|
Controls: () => react_jsx_runtime.JSX.Element;
|
|
@@ -1224,11 +1923,47 @@ type NetworkManagerprops = BoxProps & {
|
|
|
1224
1923
|
onlineMessage?: string;
|
|
1225
1924
|
};
|
|
1226
1925
|
|
|
1926
|
+
/**
|
|
1927
|
+
* Network component.
|
|
1928
|
+
*
|
|
1929
|
+
* @example
|
|
1930
|
+
* // Basic usage
|
|
1931
|
+
* ```tsx
|
|
1932
|
+
* <Network nodes={[{ id: "1", label: "Node 1" }]} links={[]} />
|
|
1933
|
+
* ```
|
|
1934
|
+
*
|
|
1935
|
+
* @example
|
|
1936
|
+
* // Advanced usage with additional props
|
|
1937
|
+
* ```tsx
|
|
1938
|
+
* <Network nodes={[{ id: "1", label: "A" }, { id: "2", label: "B" }]} links={[{ source: "1", target: "2" }]} />
|
|
1939
|
+
* ```
|
|
1940
|
+
* @param nodes - Tree node definitions
|
|
1941
|
+
* @param links - Links between nodes
|
|
1942
|
+
*/
|
|
1227
1943
|
declare const NetworkManager: react.ForwardRefExoticComponent<Omit<NetworkManagerprops, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
1228
1944
|
|
|
1229
1945
|
type OverlayProps = BoxProps & {
|
|
1230
1946
|
when?: boolean;
|
|
1231
1947
|
};
|
|
1948
|
+
/**
|
|
1949
|
+
* Overlay component.
|
|
1950
|
+
*
|
|
1951
|
+
* @example
|
|
1952
|
+
* // Basic usage
|
|
1953
|
+
* ```tsx
|
|
1954
|
+
* <Overlay onClick={() => console.log("clicked")} />
|
|
1955
|
+
* ```
|
|
1956
|
+
*
|
|
1957
|
+
* @example
|
|
1958
|
+
* // Advanced usage with additional props
|
|
1959
|
+
* ```tsx
|
|
1960
|
+
* <Overlay visible={true} zIndex={100} opacity={0.5} onClick={() => {}} />
|
|
1961
|
+
* ```
|
|
1962
|
+
* @param visible - Whether element is visible
|
|
1963
|
+
* @param zIndex - Z-index stacking order
|
|
1964
|
+
* @param opacity - Opacity level (0-1)
|
|
1965
|
+
* @param onClick - Callback function triggered on click
|
|
1966
|
+
*/
|
|
1232
1967
|
declare const Overlay: react.ForwardRefExoticComponent<Omit<OverlayProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
1233
1968
|
|
|
1234
1969
|
declare enum PaginationStyle {
|
|
@@ -1265,6 +2000,25 @@ type PaginationProps = Omit<BoxProps, "ref"> & {
|
|
|
1265
2000
|
onPageChange?: PaginationCallback;
|
|
1266
2001
|
};
|
|
1267
2002
|
|
|
2003
|
+
/**
|
|
2004
|
+
* Pagination component.
|
|
2005
|
+
*
|
|
2006
|
+
* @example
|
|
2007
|
+
* // Basic usage
|
|
2008
|
+
* ```tsx
|
|
2009
|
+
* <Pagination total={100} pageSize={10} onChange={(page) => console.log(page)} />
|
|
2010
|
+
* ```
|
|
2011
|
+
*
|
|
2012
|
+
* @example
|
|
2013
|
+
* // Advanced usage with additional props
|
|
2014
|
+
* ```tsx
|
|
2015
|
+
* <Pagination total={250} pageSize={50} defaultPage={1} onChange={(page) => console.log(page)} />
|
|
2016
|
+
* ```
|
|
2017
|
+
* @param total - total prop
|
|
2018
|
+
* @param pageSize - pageSize prop
|
|
2019
|
+
* @param onChange - Callback function triggered when value changes
|
|
2020
|
+
* @param defaultPage - defaultPage prop
|
|
2021
|
+
*/
|
|
1268
2022
|
declare const Pagination: {
|
|
1269
2023
|
({ ref, ...props }: PaginationProps & {
|
|
1270
2024
|
ref?: Ref<PaginationController>;
|
|
@@ -1275,6 +2029,25 @@ declare const Pagination: {
|
|
|
1275
2029
|
type PasswordProps = Omit<InputProps, `type` | `numeric`> & {
|
|
1276
2030
|
strenthMeter?: boolean;
|
|
1277
2031
|
};
|
|
2032
|
+
/**
|
|
2033
|
+
* Password component.
|
|
2034
|
+
*
|
|
2035
|
+
* @example
|
|
2036
|
+
* // Basic usage
|
|
2037
|
+
* ```tsx
|
|
2038
|
+
* <Password onChange={(pass) => console.log(pass)} />
|
|
2039
|
+
* ```
|
|
2040
|
+
*
|
|
2041
|
+
* @example
|
|
2042
|
+
* // Advanced usage with additional props
|
|
2043
|
+
* ```tsx
|
|
2044
|
+
* <Password onChange={(pass) => console.log(pass)} strength={true} showStrength variant="primary" />
|
|
2045
|
+
* ```
|
|
2046
|
+
* @param onChange - Callback function triggered when value changes
|
|
2047
|
+
* @param strength - strength prop
|
|
2048
|
+
* @param showStrength - showStrength prop
|
|
2049
|
+
* @param variant - Visual variant or style
|
|
2050
|
+
*/
|
|
1278
2051
|
declare const Password: react.ForwardRefExoticComponent<Omit<PasswordProps, "ref"> & react.RefAttributes<HTMLInputElement>>;
|
|
1279
2052
|
|
|
1280
2053
|
type PinInputProps = InputProps & {
|
|
@@ -1282,6 +2055,25 @@ type PinInputProps = InputProps & {
|
|
|
1282
2055
|
size?: number;
|
|
1283
2056
|
length?: number;
|
|
1284
2057
|
};
|
|
2058
|
+
/**
|
|
2059
|
+
* PinInput component.
|
|
2060
|
+
*
|
|
2061
|
+
* @example
|
|
2062
|
+
* // Basic usage
|
|
2063
|
+
* ```tsx
|
|
2064
|
+
* <PinInput length={4} onChange={(pin) => console.log(pin)} />
|
|
2065
|
+
* ```
|
|
2066
|
+
*
|
|
2067
|
+
* @example
|
|
2068
|
+
* // Advanced usage with additional props
|
|
2069
|
+
* ```tsx
|
|
2070
|
+
* <PinInput length={6} onChange={(pin) => console.log(pin)} type="numeric" variant="primary" />
|
|
2071
|
+
* ```
|
|
2072
|
+
* @param length - Length of PIN/key sequence
|
|
2073
|
+
* @param onChange - Callback function triggered when value changes
|
|
2074
|
+
* @param type - Component or input type
|
|
2075
|
+
* @param variant - Visual variant or style
|
|
2076
|
+
*/
|
|
1285
2077
|
declare const PinInput: react.ForwardRefExoticComponent<Omit<PinInputProps, "ref"> & react.RefAttributes<HTMLInputElement>>;
|
|
1286
2078
|
|
|
1287
2079
|
type ProgressBarProps = BoxProps & {
|
|
@@ -1294,6 +2086,26 @@ interface ProgressHandler {
|
|
|
1294
2086
|
getProgress?: () => number;
|
|
1295
2087
|
}
|
|
1296
2088
|
|
|
2089
|
+
/**
|
|
2090
|
+
* ProgressBar component.
|
|
2091
|
+
*
|
|
2092
|
+
* @example
|
|
2093
|
+
* // Basic usage
|
|
2094
|
+
* ```tsx
|
|
2095
|
+
* <ProgressBar value={65} />
|
|
2096
|
+
* ```
|
|
2097
|
+
*
|
|
2098
|
+
* @example
|
|
2099
|
+
* // Advanced usage with additional props
|
|
2100
|
+
* ```tsx
|
|
2101
|
+
* <ProgressBar value={65} max={100} variant="success" animated label="65%" />
|
|
2102
|
+
* ```
|
|
2103
|
+
* @param value - Current value
|
|
2104
|
+
* @param max - max prop
|
|
2105
|
+
* @param variant - Visual variant or style
|
|
2106
|
+
* @param animated - animated prop
|
|
2107
|
+
* @param label - Label text for the component
|
|
2108
|
+
*/
|
|
1297
2109
|
declare const ProgressBar: react.ForwardRefExoticComponent<Omit<ProgressBarProps, "ref"> & react.RefAttributes<ProgressHandler>>;
|
|
1298
2110
|
|
|
1299
2111
|
type RadioProps = Props<"input"> & {
|
|
@@ -1306,6 +2118,26 @@ interface RadioHandler {
|
|
|
1306
2118
|
toggle: (triggerChange?: boolean) => void;
|
|
1307
2119
|
}
|
|
1308
2120
|
|
|
2121
|
+
/**
|
|
2122
|
+
* Radio component.
|
|
2123
|
+
*
|
|
2124
|
+
* @example
|
|
2125
|
+
* // Basic usage
|
|
2126
|
+
* ```tsx
|
|
2127
|
+
* <Radio label="Option 1" value="opt1" onChange={(val) => console.log(val)} />
|
|
2128
|
+
* ```
|
|
2129
|
+
*
|
|
2130
|
+
* @example
|
|
2131
|
+
* // Advanced usage with additional props
|
|
2132
|
+
* ```tsx
|
|
2133
|
+
* <Radio label="Option 1" value="opt1" defaultChecked={true} variant="primary" />
|
|
2134
|
+
* ```
|
|
2135
|
+
* @param label - Label text for the component
|
|
2136
|
+
* @param value - Current value
|
|
2137
|
+
* @param onChange - Callback function triggered when value changes
|
|
2138
|
+
* @param defaultChecked - Whether component is checked by default
|
|
2139
|
+
* @param variant - Visual variant or style
|
|
2140
|
+
*/
|
|
1309
2141
|
declare const Radio: react.ForwardRefExoticComponent<ZuzProps & Omit<Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, keyof ZuzProps> & {
|
|
1310
2142
|
type?: ValueOf<typeof RADIO>;
|
|
1311
2143
|
variant?: ValueOf<typeof Variant>;
|
|
@@ -1319,6 +2151,24 @@ type ScrollViewProps = BoxProps & {
|
|
|
1319
2151
|
breakpoints?: ScrollBreakpoint;
|
|
1320
2152
|
};
|
|
1321
2153
|
|
|
2154
|
+
/**
|
|
2155
|
+
* ScrollView component.
|
|
2156
|
+
*
|
|
2157
|
+
* @example
|
|
2158
|
+
* // Basic usage
|
|
2159
|
+
* ```tsx
|
|
2160
|
+
* <ScrollView><div>Scrollable content here</div></ScrollView>
|
|
2161
|
+
* ```
|
|
2162
|
+
*
|
|
2163
|
+
* @example
|
|
2164
|
+
* // Advanced usage with additional props
|
|
2165
|
+
* ```tsx
|
|
2166
|
+
* <ScrollView direction="vertical" scrollbar="auto" onScroll={(pos) => console.log(pos)}>Long content</ScrollView>
|
|
2167
|
+
* ```
|
|
2168
|
+
* @param direction - direction prop
|
|
2169
|
+
* @param scrollbar - scrollbar prop
|
|
2170
|
+
* @param onScroll - Callback function triggered on scroll
|
|
2171
|
+
*/
|
|
1322
2172
|
declare const ScrollView: react.ForwardRefExoticComponent<Omit<ScrollViewProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
1323
2173
|
|
|
1324
2174
|
type SearchProps = Omit<InputProps, `onChange`> & {
|
|
@@ -1337,52 +2187,91 @@ interface SearchHandler {
|
|
|
1337
2187
|
focus: () => void;
|
|
1338
2188
|
}
|
|
1339
2189
|
|
|
2190
|
+
/**
|
|
2191
|
+
* Search component.
|
|
2192
|
+
*
|
|
2193
|
+
* @example
|
|
2194
|
+
* // Basic usage
|
|
2195
|
+
* ```tsx
|
|
2196
|
+
* <Search onChange={(query) => console.log(query)} />
|
|
2197
|
+
* ```
|
|
2198
|
+
*
|
|
2199
|
+
* @example
|
|
2200
|
+
* // Advanced usage with additional props
|
|
2201
|
+
* ```tsx
|
|
2202
|
+
* <Search onChange={(query) => console.log(query)} placeholder="Search..." debounceMs={300} onSubmit={(q) => {}} />
|
|
2203
|
+
* ```
|
|
2204
|
+
* @param onChange - Callback function triggered when value changes
|
|
2205
|
+
* @param placeholder - Placeholder text
|
|
2206
|
+
* @param debounceMs - debounceMs prop
|
|
2207
|
+
* @param onSubmit - Callback function triggered on form submission
|
|
2208
|
+
*/
|
|
1340
2209
|
declare const Search: react.ForwardRefExoticComponent<Omit<SearchProps, "ref"> & react.RefAttributes<SearchHandler>>;
|
|
1341
2210
|
|
|
1342
2211
|
/**
|
|
1343
|
-
*
|
|
1344
|
-
*
|
|
1345
|
-
* @component
|
|
1346
|
-
* @param {SegmentProps} props - Props for the segmented control component.
|
|
1347
|
-
* @param {React.Ref<HTMLDivElement>} ref - Ref for the root div element.
|
|
1348
|
-
* @returns {JSX.Element} The rendered segmented control.
|
|
2212
|
+
* Segmented component.
|
|
1349
2213
|
*
|
|
1350
2214
|
* @example
|
|
1351
|
-
* //
|
|
1352
|
-
*
|
|
1353
|
-
*
|
|
1354
|
-
*
|
|
1355
|
-
* { index: 2, label: "Settings", icon: "settings_icon" }
|
|
1356
|
-
* ];
|
|
2215
|
+
* // Basic usage
|
|
2216
|
+
* ```tsx
|
|
2217
|
+
* <Segmented options={["Tab 1", "Tab 2"]} onChange={(val) => console.log(val)} />
|
|
2218
|
+
* ```
|
|
1357
2219
|
*
|
|
1358
|
-
*
|
|
2220
|
+
* @example
|
|
2221
|
+
* // Advanced usage with additional props
|
|
2222
|
+
* ```tsx
|
|
2223
|
+
* <Segmented options={[{ label: "All", value: "all" }, { label: "Active", value: "active" }]} defaultValue="all" />
|
|
2224
|
+
* ```
|
|
2225
|
+
* @param options - Array of available options
|
|
2226
|
+
* @param onChange - Callback function triggered when value changes
|
|
2227
|
+
* @param defaultValue - Default value
|
|
1359
2228
|
*/
|
|
1360
2229
|
declare const Segmented: react.ForwardRefExoticComponent<Omit<SegmentProps, "ref"> & react.RefAttributes<SegmentController>>;
|
|
1361
2230
|
|
|
2231
|
+
type SelectPrimitive = string | number;
|
|
2232
|
+
type SelectSingleValue = Option | SelectPrimitive;
|
|
2233
|
+
type SelectValue = SelectSingleValue | Option[] | SelectPrimitive[] | null;
|
|
2234
|
+
type SelectSingleChange = Option;
|
|
2235
|
+
type SelectEditableChange = Option | SelectPrimitive;
|
|
2236
|
+
type SelectMultipleChange = Option[];
|
|
1362
2237
|
/**
|
|
1363
|
-
*
|
|
2238
|
+
* Ref handle exposed by `Select`.
|
|
1364
2239
|
*
|
|
1365
2240
|
* @example
|
|
1366
2241
|
* ```tsx
|
|
1367
|
-
* const selectRef = useRef<SelectHandler>(null)
|
|
1368
|
-
*
|
|
1369
|
-
* selectRef
|
|
2242
|
+
* const selectRef = useRef<SelectHandler>(null)
|
|
2243
|
+
*
|
|
2244
|
+
* <Select ref={selectRef} options={options} label="Status" />
|
|
2245
|
+
*
|
|
2246
|
+
* selectRef.current?.setSelected("in-progress")
|
|
2247
|
+
* const selected = selectRef.current?.getValue()
|
|
1370
2248
|
* ```
|
|
1371
2249
|
*/
|
|
1372
2250
|
interface SelectHandler {
|
|
1373
2251
|
/**
|
|
1374
|
-
* Programmatically sets the selected
|
|
1375
|
-
*
|
|
2252
|
+
* Programmatically sets the selected value.
|
|
2253
|
+
*
|
|
2254
|
+
* Accepts option objects, primitive values, arrays, or `null`.
|
|
2255
|
+
* @param option - The next value to set.
|
|
1376
2256
|
*/
|
|
1377
|
-
setSelected: (option:
|
|
2257
|
+
setSelected: (option: SelectValue) => void;
|
|
1378
2258
|
/**
|
|
1379
|
-
*
|
|
1380
|
-
* @returns
|
|
2259
|
+
* Returns the current selected value.
|
|
2260
|
+
* @returns Current `Option`, array of `Option`, primitive value, or `null`.
|
|
1381
2261
|
*/
|
|
1382
|
-
getValue: () => Option | Option[] | null;
|
|
2262
|
+
getValue: () => Option | Option[] | SelectPrimitive | null;
|
|
1383
2263
|
}
|
|
1384
2264
|
/**
|
|
1385
|
-
* Represents
|
|
2265
|
+
* Represents a selectable option.
|
|
2266
|
+
*
|
|
2267
|
+
* @example
|
|
2268
|
+
* ```tsx
|
|
2269
|
+
* const options: Option[] = [
|
|
2270
|
+
* { label: "Todo", value: "todo" },
|
|
2271
|
+
* { label: "In Progress", value: "in-progress", icon: "clock" },
|
|
2272
|
+
* { label: "Done", value: "done", disabled: true }
|
|
2273
|
+
* ]
|
|
2274
|
+
* ```
|
|
1386
2275
|
*/
|
|
1387
2276
|
type Option = {
|
|
1388
2277
|
/** Optional icon to display next to the label. Can be a string (URL/Path) or a ReactNode. */
|
|
@@ -1408,10 +2297,7 @@ interface OptionItemProps {
|
|
|
1408
2297
|
selected?: boolean;
|
|
1409
2298
|
checkIcon?: string | ReactNode;
|
|
1410
2299
|
}
|
|
1411
|
-
|
|
1412
|
-
* Props for the Select component.
|
|
1413
|
-
*/
|
|
1414
|
-
type SelectProps = Omit<BoxProps, "onChange" | "ref"> & {
|
|
2300
|
+
type SelectCommonProps = Omit<BoxProps, "onChange" | "ref"> & {
|
|
1415
2301
|
ref?: Ref<SelectHandler>;
|
|
1416
2302
|
/**
|
|
1417
2303
|
* Size of the select field.
|
|
@@ -1424,7 +2310,8 @@ type SelectProps = Omit<BoxProps, "onChange" | "ref"> & {
|
|
|
1424
2310
|
required?: boolean;
|
|
1425
2311
|
/**
|
|
1426
2312
|
* Array of options to be displayed in the select dropdown.
|
|
1427
|
-
|
|
2313
|
+
*
|
|
2314
|
+
* @example
|
|
1428
2315
|
* ```tsx
|
|
1429
2316
|
* [
|
|
1430
2317
|
* {
|
|
@@ -1441,19 +2328,10 @@ type SelectProps = Omit<BoxProps, "onChange" | "ref"> & {
|
|
|
1441
2328
|
* Label for the select field.
|
|
1442
2329
|
*/
|
|
1443
2330
|
label?: string;
|
|
1444
|
-
/**
|
|
1445
|
-
* The currently selected option.
|
|
1446
|
-
*/
|
|
1447
|
-
selected?: string | Option;
|
|
1448
2331
|
/**
|
|
1449
2332
|
* Enables the search functionality within the select dropdown.
|
|
1450
2333
|
*/
|
|
1451
2334
|
search?: boolean;
|
|
1452
|
-
/**
|
|
1453
|
-
* Callback function triggered when the selected option changes.
|
|
1454
|
-
* @param v - The newly selected option.
|
|
1455
|
-
*/
|
|
1456
|
-
onChange?: (v: Option) => void;
|
|
1457
2335
|
/**
|
|
1458
2336
|
* Placeholder text for the search input field.
|
|
1459
2337
|
*/
|
|
@@ -1470,19 +2348,126 @@ type SelectProps = Omit<BoxProps, "onChange" | "ref"> & {
|
|
|
1470
2348
|
arrowDownIcon?: string | ReactNode;
|
|
1471
2349
|
arrowUpIcon?: string | ReactNode;
|
|
1472
2350
|
disabled?: boolean;
|
|
1473
|
-
multiple?: boolean;
|
|
1474
|
-
tokenizer?: boolean;
|
|
1475
2351
|
wrapTokens?: boolean;
|
|
1476
2352
|
checkIcon?: string | ReactNode;
|
|
1477
2353
|
closeIcon?: string | ReactNode;
|
|
1478
2354
|
};
|
|
2355
|
+
type SelectChangeValue<TMultiple extends boolean, TTokenizer extends boolean, TEditable extends boolean> = TMultiple extends true ? SelectMultipleChange : TTokenizer extends true ? SelectMultipleChange : TEditable extends true ? SelectEditableChange : SelectSingleChange;
|
|
2356
|
+
type SelectSelectedValue<TMultiple extends boolean, TTokenizer extends boolean, TEditable extends boolean> = TMultiple extends true ? Option[] | SelectPrimitive[] | null : TTokenizer extends true ? Option[] | SelectPrimitive[] | null : TEditable extends true ? SelectSingleValue | null : SelectSingleValue | null;
|
|
2357
|
+
type SelectModeProps<TMultiple extends boolean, TTokenizer extends boolean, TEditable extends boolean> = TEditable extends true ? {
|
|
2358
|
+
multiple?: false;
|
|
2359
|
+
tokenizer?: false;
|
|
2360
|
+
editable: true;
|
|
2361
|
+
editablePlaceholder?: string;
|
|
2362
|
+
} : TMultiple extends true ? {
|
|
2363
|
+
/**
|
|
2364
|
+
* Enables multi-select behavior.
|
|
2365
|
+
*
|
|
2366
|
+
* @example
|
|
2367
|
+
* ```tsx
|
|
2368
|
+
* <Select label="Roles" options={roleOptions} multiple />
|
|
2369
|
+
* ```
|
|
2370
|
+
*/
|
|
2371
|
+
multiple: true;
|
|
2372
|
+
tokenizer?: TTokenizer;
|
|
2373
|
+
editable?: false | undefined;
|
|
2374
|
+
editablePlaceholder?: never;
|
|
2375
|
+
} : TTokenizer extends true ? {
|
|
2376
|
+
/**
|
|
2377
|
+
* Renders selected items as removable tokens.
|
|
2378
|
+
*/
|
|
2379
|
+
tokenizer: true;
|
|
2380
|
+
multiple?: TMultiple;
|
|
2381
|
+
editable?: false | undefined;
|
|
2382
|
+
editablePlaceholder?: never;
|
|
2383
|
+
} : {
|
|
2384
|
+
multiple?: false;
|
|
2385
|
+
tokenizer?: false;
|
|
2386
|
+
editable?: false | undefined;
|
|
2387
|
+
editablePlaceholder?: never;
|
|
2388
|
+
};
|
|
2389
|
+
type SelectProps<TMultiple extends boolean = false, TTokenizer extends boolean = false, TEditable extends boolean = false> = SelectCommonProps & SelectModeProps<TMultiple, TTokenizer, TEditable> & {
|
|
2390
|
+
/**
|
|
2391
|
+
* The currently selected option.
|
|
2392
|
+
*/
|
|
2393
|
+
selected?: SelectSelectedValue<TMultiple, TTokenizer, TEditable>;
|
|
2394
|
+
/**
|
|
2395
|
+
* Callback function triggered when the selected option changes.
|
|
2396
|
+
*/
|
|
2397
|
+
onChange?: (v: SelectChangeValue<TMultiple, TTokenizer, TEditable>) => void;
|
|
2398
|
+
};
|
|
2399
|
+
type SelectSingleProps = SelectProps<false, false, false>;
|
|
2400
|
+
type SelectEditableProps = SelectProps<false, false, true>;
|
|
2401
|
+
type SelectMultipleProps = SelectProps<true, boolean, false>;
|
|
2402
|
+
type SelectTokenizerProps = SelectProps<boolean, true, false>;
|
|
2403
|
+
type SelectInternalProps = SelectCommonProps & {
|
|
2404
|
+
/**
|
|
2405
|
+
* The currently selected option.
|
|
2406
|
+
*/
|
|
2407
|
+
selected?: SelectSingleValue | Option[] | SelectPrimitive[] | null;
|
|
2408
|
+
/**
|
|
2409
|
+
* Callback function triggered when the selected option changes.
|
|
2410
|
+
* @param v - The newly selected option.
|
|
2411
|
+
*
|
|
2412
|
+
* @example
|
|
2413
|
+
* ```tsx
|
|
2414
|
+
* onChange={(v) => {
|
|
2415
|
+
* if (Array.isArray(v)) {
|
|
2416
|
+
* console.log("Multi value", v.map(item => item.value))
|
|
2417
|
+
* } else {
|
|
2418
|
+
* console.log("Single value", v)
|
|
2419
|
+
* }
|
|
2420
|
+
* }}
|
|
2421
|
+
* ```
|
|
2422
|
+
*/
|
|
2423
|
+
onChange?: (v: Option | Option[] | SelectPrimitive) => void;
|
|
2424
|
+
/**
|
|
2425
|
+
* Enables multi-select behavior.
|
|
2426
|
+
*
|
|
2427
|
+
* @example
|
|
2428
|
+
* ```tsx
|
|
2429
|
+
* <Select label="Roles" options={roleOptions} multiple />
|
|
2430
|
+
* ```
|
|
2431
|
+
*/
|
|
2432
|
+
multiple?: boolean;
|
|
2433
|
+
/**
|
|
2434
|
+
* Renders selected items as removable tokens.
|
|
2435
|
+
*/
|
|
2436
|
+
tokenizer?: boolean;
|
|
2437
|
+
/**
|
|
2438
|
+
* Allows entering custom values when not in `multiple` or `tokenizer` mode.
|
|
2439
|
+
*/
|
|
2440
|
+
editable?: boolean;
|
|
2441
|
+
editablePlaceholder?: string;
|
|
2442
|
+
};
|
|
1479
2443
|
|
|
1480
|
-
|
|
1481
|
-
|
|
2444
|
+
type SelectComponent = {
|
|
2445
|
+
<TMultiple extends boolean = false, TTokenizer extends boolean = false, TEditable extends boolean = false>(props: SelectProps<TMultiple, TTokenizer, TEditable> & {
|
|
1482
2446
|
ref?: Ref<SelectHandler>;
|
|
1483
|
-
}):
|
|
1484
|
-
displayName
|
|
2447
|
+
}): ReactElement;
|
|
2448
|
+
displayName?: string;
|
|
1485
2449
|
};
|
|
2450
|
+
/**
|
|
2451
|
+
* Select component.
|
|
2452
|
+
*
|
|
2453
|
+
* @example
|
|
2454
|
+
* // Basic usage
|
|
2455
|
+
* ```tsx
|
|
2456
|
+
* <Select options={[{ label: "Option 1", value: "1" }]} onChange={(val) => console.log(val)} />
|
|
2457
|
+
* ```
|
|
2458
|
+
*
|
|
2459
|
+
* @example
|
|
2460
|
+
* // Advanced usage with additional props
|
|
2461
|
+
* ```tsx
|
|
2462
|
+
* <Select options={[{ label: "Red", value: "red" }, { label: "Blue", value: "blue" }]} multiple searchable onSelect={(item) => {}} />
|
|
2463
|
+
* ```
|
|
2464
|
+
* @param options - Array of available options
|
|
2465
|
+
* @param onChange - Callback function triggered when value changes
|
|
2466
|
+
* @param multiple - multiple prop
|
|
2467
|
+
* @param searchable - searchable prop
|
|
2468
|
+
* @param onSelect - Callback function triggered on selection
|
|
2469
|
+
*/
|
|
2470
|
+
declare const Select: SelectComponent;
|
|
1486
2471
|
|
|
1487
2472
|
interface SliderController {
|
|
1488
2473
|
}
|
|
@@ -1501,6 +2486,26 @@ type SliderProps = Omit<BoxProps, `ref`> & {
|
|
|
1501
2486
|
onChange?: (value: number) => void;
|
|
1502
2487
|
};
|
|
1503
2488
|
|
|
2489
|
+
/**
|
|
2490
|
+
* Slider component.
|
|
2491
|
+
*
|
|
2492
|
+
* @example
|
|
2493
|
+
* // Basic usage
|
|
2494
|
+
* ```tsx
|
|
2495
|
+
* <Slider value={50} onChange={(val) => console.log(val)} />
|
|
2496
|
+
* ```
|
|
2497
|
+
*
|
|
2498
|
+
* @example
|
|
2499
|
+
* // Advanced usage with additional props
|
|
2500
|
+
* ```tsx
|
|
2501
|
+
* <Slider value={50} min={0} max={100} step={5} onChange={(val) => console.log(val)} />
|
|
2502
|
+
* ```
|
|
2503
|
+
* @param value - Current value
|
|
2504
|
+
* @param min - min prop
|
|
2505
|
+
* @param max - max prop
|
|
2506
|
+
* @param step - step prop
|
|
2507
|
+
* @param onChange - Callback function triggered when value changes
|
|
2508
|
+
*/
|
|
1504
2509
|
declare const Slider: {
|
|
1505
2510
|
({ ref, ...props }: SliderProps): react_jsx_runtime.JSX.Element;
|
|
1506
2511
|
displayName: string;
|
|
@@ -1510,16 +2515,70 @@ type SpanProps = Props<`span`> & {
|
|
|
1510
2515
|
ref?: Ref<HTMLSpanElement>;
|
|
1511
2516
|
};
|
|
1512
2517
|
|
|
2518
|
+
/**
|
|
2519
|
+
* Span component.
|
|
2520
|
+
*
|
|
2521
|
+
* @example
|
|
2522
|
+
* // Basic usage
|
|
2523
|
+
* ```tsx
|
|
2524
|
+
* <Span>Text span</Span>
|
|
2525
|
+
* ```
|
|
2526
|
+
*
|
|
2527
|
+
* @example
|
|
2528
|
+
* // Advanced usage with additional props
|
|
2529
|
+
* ```tsx
|
|
2530
|
+
* <Span variant="muted" size="sm">Secondary text</Span>
|
|
2531
|
+
* ```
|
|
2532
|
+
* @param variant - Visual variant or style
|
|
2533
|
+
* @param size - Component size
|
|
2534
|
+
*/
|
|
1513
2535
|
declare const Span: {
|
|
1514
2536
|
({ ref, ...props }: SpanProps): react_jsx_runtime.JSX.Element;
|
|
1515
2537
|
displayName: string;
|
|
1516
2538
|
};
|
|
1517
2539
|
|
|
2540
|
+
/**
|
|
2541
|
+
* Spinner component.
|
|
2542
|
+
*
|
|
2543
|
+
* @example
|
|
2544
|
+
* // Basic usage
|
|
2545
|
+
* ```tsx
|
|
2546
|
+
* <Spinner />
|
|
2547
|
+
* ```
|
|
2548
|
+
*
|
|
2549
|
+
* @example
|
|
2550
|
+
* // Advanced usage with additional props
|
|
2551
|
+
* ```tsx
|
|
2552
|
+
* <Spinner type="dots" variant="primary" size="lg" />
|
|
2553
|
+
* ```
|
|
2554
|
+
* @param type - Component or input type
|
|
2555
|
+
* @param variant - Visual variant or style
|
|
2556
|
+
* @param size - Component size
|
|
2557
|
+
*/
|
|
1518
2558
|
declare const Spinner: {
|
|
1519
2559
|
(props: SpinnerProps): react_jsx_runtime.JSX.Element;
|
|
1520
2560
|
displayName: string;
|
|
1521
2561
|
};
|
|
1522
2562
|
|
|
2563
|
+
/**
|
|
2564
|
+
* Switch component.
|
|
2565
|
+
*
|
|
2566
|
+
* @example
|
|
2567
|
+
* // Basic usage
|
|
2568
|
+
* ```tsx
|
|
2569
|
+
* <Switch onChange={(checked) => console.log(checked)} />
|
|
2570
|
+
* ```
|
|
2571
|
+
*
|
|
2572
|
+
* @example
|
|
2573
|
+
* // Advanced usage with additional props
|
|
2574
|
+
* ```tsx
|
|
2575
|
+
* <Switch defaultChecked={true} disabled={false} variant="primary" onChange={(checked) => console.log(checked)} />
|
|
2576
|
+
* ```
|
|
2577
|
+
* @param onChange - Callback function triggered when value changes
|
|
2578
|
+
* @param defaultChecked - Whether component is checked by default
|
|
2579
|
+
* @param disabled - Whether component is disabled
|
|
2580
|
+
* @param variant - Visual variant or style
|
|
2581
|
+
*/
|
|
1523
2582
|
declare const Switch: {
|
|
1524
2583
|
({ ref, ...props }: CheckBoxProps & {
|
|
1525
2584
|
ref?: Ref<CheckboxHandler>;
|
|
@@ -1676,6 +2735,21 @@ type TableProps<T> = BoxProps & {
|
|
|
1676
2735
|
onSort?: TableSortCallback;
|
|
1677
2736
|
};
|
|
1678
2737
|
|
|
2738
|
+
/**
|
|
2739
|
+
* Table component.
|
|
2740
|
+
*
|
|
2741
|
+
* @example
|
|
2742
|
+
* // Basic usage
|
|
2743
|
+
* ```tsx
|
|
2744
|
+
* <Table schema={[{ id: "name", value: "Name" }]} rows={[{ name: "Jane Doe" }]} rowsPerPage={10} />
|
|
2745
|
+
* ```
|
|
2746
|
+
*
|
|
2747
|
+
* @example
|
|
2748
|
+
* // Advanced usage with additional props
|
|
2749
|
+
* ```tsx
|
|
2750
|
+
* <Table schema={[{ id: "id", value: "ID" }, { id: "name", value: "Name" }]} rows={[{ id: 1, name: "Jane" }]} sortable filterable rowsPerPage={20} />
|
|
2751
|
+
* ```
|
|
2752
|
+
*/
|
|
1679
2753
|
declare const ForwardedTable: <T>(props: TableProps<T> & {
|
|
1680
2754
|
ref?: Ref<TableController>;
|
|
1681
2755
|
}) => JSX.Element;
|
|
@@ -1690,6 +2764,23 @@ type TableOfContentsProps = BoxProps & {
|
|
|
1690
2764
|
items: TableOfContentItem[];
|
|
1691
2765
|
};
|
|
1692
2766
|
|
|
2767
|
+
/**
|
|
2768
|
+
* TableOfContents component.
|
|
2769
|
+
*
|
|
2770
|
+
* @example
|
|
2771
|
+
* // Basic usage
|
|
2772
|
+
* ```tsx
|
|
2773
|
+
* <TableOfContents items={[{ id: "intro", label: "Introduction" }, { id: "guide", label: "Guide" }]} />
|
|
2774
|
+
* ```
|
|
2775
|
+
*
|
|
2776
|
+
* @example
|
|
2777
|
+
* // Advanced usage with additional props
|
|
2778
|
+
* ```tsx
|
|
2779
|
+
* <TableOfContents items={[{ id: "intro", label: "Intro" }, { id: "api", label: "API" }]} onSelect={(id) => console.log(id)} />
|
|
2780
|
+
* ```
|
|
2781
|
+
* @param items - Array of items
|
|
2782
|
+
* @param onSelect - Callback function triggered on selection
|
|
2783
|
+
*/
|
|
1693
2784
|
declare const TableOfContents: ({ ref, ...props }: TableOfContentsProps) => react_jsx_runtime.JSX.Element;
|
|
1694
2785
|
|
|
1695
2786
|
interface TabBodyProps {
|
|
@@ -1800,6 +2891,24 @@ interface TabViewHandler {
|
|
|
1800
2891
|
setTab: (index: number) => void;
|
|
1801
2892
|
}
|
|
1802
2893
|
|
|
2894
|
+
/**
|
|
2895
|
+
* TabView component.
|
|
2896
|
+
*
|
|
2897
|
+
* @example
|
|
2898
|
+
* // Basic usage
|
|
2899
|
+
* ```tsx
|
|
2900
|
+
* <TabView tabs={[{ label: "Tab 1", content: "Content 1" }]} onChange={(active) => console.log(active)} />
|
|
2901
|
+
* ```
|
|
2902
|
+
*
|
|
2903
|
+
* @example
|
|
2904
|
+
* // Advanced usage with additional props
|
|
2905
|
+
* ```tsx
|
|
2906
|
+
* <TabView tabs={[{ label: "Tab 1", content: "Content 1" }, { label: "Tab 2", content: "Content 2" }]} defaultActive={0} />
|
|
2907
|
+
* ```
|
|
2908
|
+
* @param tabs - tabs prop
|
|
2909
|
+
* @param onChange - Callback function triggered when value changes
|
|
2910
|
+
* @param defaultActive - defaultActive prop
|
|
2911
|
+
*/
|
|
1803
2912
|
declare const TabView: {
|
|
1804
2913
|
({ ref, ...props }: TabViewProps & {
|
|
1805
2914
|
ref?: Ref<TabViewHandler>;
|
|
@@ -1826,6 +2935,25 @@ interface TerminalProps {
|
|
|
1826
2935
|
type TerminalCommandFn = (args: string[]) => string | Promise<string>;
|
|
1827
2936
|
type TerminalCommands = Record<string, TerminalCommandFn>;
|
|
1828
2937
|
|
|
2938
|
+
/**
|
|
2939
|
+
* Terminal component.
|
|
2940
|
+
*
|
|
2941
|
+
* @example
|
|
2942
|
+
* // Basic usage
|
|
2943
|
+
* ```tsx
|
|
2944
|
+
* <Terminal welcomeMessage="Welcome" commands={{ help: "Shows all commands" }} onCommand={(cmd) => console.log(cmd)} />
|
|
2945
|
+
* ```
|
|
2946
|
+
*
|
|
2947
|
+
* @example
|
|
2948
|
+
* // Advanced usage with additional props
|
|
2949
|
+
* ```tsx
|
|
2950
|
+
* <Terminal welcomeMessage="CLI v1.0" commands={{ list: "List items", run: "Execute task" }} onCommand={(cmd) => `Executed: ${cmd}`} prompt="$" />
|
|
2951
|
+
* ```
|
|
2952
|
+
* @param welcomeMessage - welcomeMessage prop
|
|
2953
|
+
* @param commands - commands prop
|
|
2954
|
+
* @param onCommand - Callback function triggered on command execution
|
|
2955
|
+
* @param prompt - prompt prop
|
|
2956
|
+
*/
|
|
1829
2957
|
declare const Terminal: ({ ref, commands, onCommand, welcomeMessage, prompt, variant, ...props }: TerminalProps & {
|
|
1830
2958
|
ref?: Ref<TerminalHandler>;
|
|
1831
2959
|
}) => react_jsx_runtime.JSX.Element;
|
|
@@ -1846,6 +2974,25 @@ type TextProps = Props<`h1` | `h2` | `h3` | `h4` | `h5` | `h6` | `p` | `span` |
|
|
|
1846
2974
|
hover?: boolean;
|
|
1847
2975
|
};
|
|
1848
2976
|
|
|
2977
|
+
/**
|
|
2978
|
+
* Text component.
|
|
2979
|
+
*
|
|
2980
|
+
* @example
|
|
2981
|
+
* // Basic usage
|
|
2982
|
+
* ```tsx
|
|
2983
|
+
* <Text>Paragraph text</Text>
|
|
2984
|
+
* ```
|
|
2985
|
+
*
|
|
2986
|
+
* @example
|
|
2987
|
+
* // Advanced usage with additional props
|
|
2988
|
+
* ```tsx
|
|
2989
|
+
* <Text size="lg" weight="bold" align="center" color="primary">Emphasized text</Text>
|
|
2990
|
+
* ```
|
|
2991
|
+
* @param size - Component size
|
|
2992
|
+
* @param weight - weight prop
|
|
2993
|
+
* @param align - Alignment direction
|
|
2994
|
+
* @param color - color prop
|
|
2995
|
+
*/
|
|
1849
2996
|
declare const Text: {
|
|
1850
2997
|
({ ref, ...props }: TextProps): react_jsx_runtime.JSX.Element;
|
|
1851
2998
|
displayName: string;
|
|
@@ -1871,6 +3018,25 @@ type TextAreaProps = Props<`textarea`> & {
|
|
|
1871
3018
|
}) => React.ReactNode;
|
|
1872
3019
|
};
|
|
1873
3020
|
|
|
3021
|
+
/**
|
|
3022
|
+
* TextArea component.
|
|
3023
|
+
*
|
|
3024
|
+
* @example
|
|
3025
|
+
* // Basic usage
|
|
3026
|
+
* ```tsx
|
|
3027
|
+
* <TextArea placeholder="Enter message..." onChange={(e) => console.log(e.target.value)} />
|
|
3028
|
+
* ```
|
|
3029
|
+
*
|
|
3030
|
+
* @example
|
|
3031
|
+
* // Advanced usage with additional props
|
|
3032
|
+
* ```tsx
|
|
3033
|
+
* <TextArea placeholder="Description..." rows={5} maxLength={500} onChange={(e) => console.log(e.target.value)} />
|
|
3034
|
+
* ```
|
|
3035
|
+
* @param placeholder - Placeholder text
|
|
3036
|
+
* @param onChange - Callback function triggered when value changes
|
|
3037
|
+
* @param rows - Array of row data
|
|
3038
|
+
* @param maxLength - maxLength prop
|
|
3039
|
+
*/
|
|
1874
3040
|
declare const TextArea: {
|
|
1875
3041
|
({ ref, ...props }: TextAreaProps & {
|
|
1876
3042
|
ref?: Ref<HTMLTextAreaElement>;
|
|
@@ -1890,8 +3056,44 @@ interface TextWheelHandler {
|
|
|
1890
3056
|
updateValue: (v: number | string) => void;
|
|
1891
3057
|
}
|
|
1892
3058
|
|
|
3059
|
+
/**
|
|
3060
|
+
* TextWheel component.
|
|
3061
|
+
*
|
|
3062
|
+
* @example
|
|
3063
|
+
* // Basic usage
|
|
3064
|
+
* ```tsx
|
|
3065
|
+
* <TextWheel items={["Option 1", "Option 2", "Option 3"]} onChange={(selected) => console.log(selected)} />
|
|
3066
|
+
* ```
|
|
3067
|
+
*
|
|
3068
|
+
* @example
|
|
3069
|
+
* // Advanced usage with additional props
|
|
3070
|
+
* ```tsx
|
|
3071
|
+
* <TextWheel items={[{ label: "Red", value: "red" }, { label: "Blue", value: "blue" }]} onChange={(val) => console.log(val)} />
|
|
3072
|
+
* ```
|
|
3073
|
+
* @param items - Array of items
|
|
3074
|
+
* @param onChange - Callback function triggered when value changes
|
|
3075
|
+
*/
|
|
1893
3076
|
declare const TextWheel: react__default.ForwardRefExoticComponent<Omit<TextWheelProps, "ref"> & react__default.RefAttributes<TextWheelHandler>>;
|
|
1894
3077
|
|
|
3078
|
+
/**
|
|
3079
|
+
* Toast component.
|
|
3080
|
+
*
|
|
3081
|
+
* @example
|
|
3082
|
+
* // Basic usage
|
|
3083
|
+
* ```tsx
|
|
3084
|
+
* <Toast message="Operation successful" type="success" />
|
|
3085
|
+
* ```
|
|
3086
|
+
*
|
|
3087
|
+
* @example
|
|
3088
|
+
* // Advanced usage with additional props
|
|
3089
|
+
* ```tsx
|
|
3090
|
+
* <Toast message="Error occurred" type="error" duration={5000} action={{ label: "Retry", onClick: () => {} }} />
|
|
3091
|
+
* ```
|
|
3092
|
+
* @param message - Message text or element
|
|
3093
|
+
* @param type - Component or input type
|
|
3094
|
+
* @param duration - duration prop
|
|
3095
|
+
* @param action - action prop
|
|
3096
|
+
*/
|
|
1895
3097
|
declare const Toast: FC<ToastProps & {
|
|
1896
3098
|
index: number;
|
|
1897
3099
|
total: number;
|
|
@@ -1917,6 +3119,25 @@ type ToolTipProps = Omit<BoxProps, `title` | `ref`> & {
|
|
|
1917
3119
|
anchorName?: string;
|
|
1918
3120
|
};
|
|
1919
3121
|
|
|
3122
|
+
/**
|
|
3123
|
+
* Tooltip component.
|
|
3124
|
+
*
|
|
3125
|
+
* @example
|
|
3126
|
+
* // Basic usage
|
|
3127
|
+
* ```tsx
|
|
3128
|
+
* <Tooltip content="Helpful text">Hover me</Tooltip>
|
|
3129
|
+
* ```
|
|
3130
|
+
*
|
|
3131
|
+
* @example
|
|
3132
|
+
* // Advanced usage with additional props
|
|
3133
|
+
* ```tsx
|
|
3134
|
+
* <Tooltip content="Full description here" position="top" delay={200} variant="dark">Information icon</Tooltip>
|
|
3135
|
+
* ```
|
|
3136
|
+
* @param content - Content text or element
|
|
3137
|
+
* @param position - position prop
|
|
3138
|
+
* @param delay - delay prop
|
|
3139
|
+
* @param variant - Visual variant or style
|
|
3140
|
+
*/
|
|
1920
3141
|
declare const ToolTip: {
|
|
1921
3142
|
({ ref, ...props }: ToolTipProps & {
|
|
1922
3143
|
ref?: Ref<ToolTipController>;
|
|
@@ -1967,6 +3188,25 @@ interface TreeItemHandler {
|
|
|
1967
3188
|
onSelect?: (v: TreeNode) => void;
|
|
1968
3189
|
}
|
|
1969
3190
|
|
|
3191
|
+
/**
|
|
3192
|
+
* TreeView component.
|
|
3193
|
+
*
|
|
3194
|
+
* @example
|
|
3195
|
+
* // Basic usage
|
|
3196
|
+
* ```tsx
|
|
3197
|
+
* <Treeview roots={["root"]} nodes={[{ tag: "root", label: "Root", isHead: true }]} onNodeSelect={(tag) => console.log(tag)} />
|
|
3198
|
+
* ```
|
|
3199
|
+
*
|
|
3200
|
+
* @example
|
|
3201
|
+
* // Advanced usage with additional props
|
|
3202
|
+
* ```tsx
|
|
3203
|
+
* <Treeview roots={["root"]} nodes={[{ tag: "root", label: "Root", isHead: true, expanded: true }, { tag: "child", label: "Child", under: "root" }]} selected="root" onNodeSelect={(tag) => console.log(tag)} />
|
|
3204
|
+
* ```
|
|
3205
|
+
* @param roots - Root node identifiers
|
|
3206
|
+
* @param nodes - Tree node definitions
|
|
3207
|
+
* @param onNodeSelect - Callback function triggered on node selection
|
|
3208
|
+
* @param selected - Currently selected item/date
|
|
3209
|
+
*/
|
|
1970
3210
|
declare const TreeView: react.ForwardRefExoticComponent<Omit<TreeViewProps, "ref"> & react.RefAttributes<TreeViewHandler>>;
|
|
1971
3211
|
|
|
1972
3212
|
type ColorScheme = ValueOf<typeof COLORTHEME>;
|
|
@@ -2166,4 +3406,4 @@ declare const animationTransition: (transition: ValueOf<typeof TRANSITIONS>, sta
|
|
|
2166
3406
|
};
|
|
2167
3407
|
declare const getAnimationTransition: (transition: ValueOf<typeof TRANSITIONS>, to?: boolean, from?: boolean) => dynamic;
|
|
2168
3408
|
|
|
2169
|
-
export { ALERT, AVATAR, Accordion, type AccordionHandler, type AccordionProps, ActionBar, type ActionBarHandler, type ActionBarItem, type ActionBarProps, Alert, type AlertHandler, type AlertProps, type AnimationTransition, AutoComplete, type AutoCompleteProps, Avatar, type AvatarHandler, type AvatarProps, Badge, type BadgeProps, Box, type BoxProps, Bubble, BubbleMediaType, type BubbleProps, BubbleStatus, Button, type ButtonHandler, type ButtonProps, ButtonState, CHART, CHECKBOX, COLORTHEME, Calendar, type CalendarProps, Carousel, type CarouselEffect, type CarouselProps, Chart, type ChartProps, CheckBox, type CheckBoxProps, type CheckboxHandler, CodeBlock, type CodeBlockProps, ColorScheme$1 as ColorScheme, type Column, type ContextItem, ContextMenu, type ContextMenuHandler, type ContextMenuProps, type CookieConsentProps, CookiesConsent, Cover, type CoverProps, type CropHandler, CropShape, Cropper, type CropperProps, Crumb, type CrumbItem, type CrumbProps, DATATYPE, DIALOG, DIALOG_ACTION_POSITION, DRAWER_SIDE, DatePicker, Dialog, type DialogActionHandler, type DialogController, type DialogHandler, type DialogProps, Drawer, type DrawerController, type DrawerHandler, type DrawerProps, FILTER, FORMVALIDATION, FORMVALIDATION_STYLE, Fab, type FabProps, type FilterProps, Filters, Flex, type FlexProps, Form, type FormHandler, type FormInputs, type FormProps, type FormValidation, Grid, type GridProps, Group, type GroupProps, Icon, type IconProps, Image, type ImageProps, Input, type InputProps, type KeyCombination, type KeyboardKey, type KeyboardKeyProps, KeyBoardKeys as KeyboardKeys, KeysLabelMap, KeysMap, Label, type LabelProps, type LayerHandler, LayersProvider, List, type ListItem, type ListItemObject, type ListProps, type LoopMode, MediaPlayer, type MediaPlayerContextType, type MediaPlayerController, type MediaPlayerIcons, type MediaPlayerProps, type MenuItemProps, type MorphOptions, type NetworkManagerprops, NetworkManager as NetworkStatus, ORIGIN, type Option, type OptionItemProps, OriginType, Overlay, type OverlayProps, PACKAGE_NAME, POSITION, PROGRESS, Pagination, type PaginationCallback, type PaginationController, type PaginationPage, type PaginationPageItem, type PaginationProps, PaginationStyle, Password, type PasswordProps, PinInput, type PinInputProps, Position, ProgressBar, type ProgressBarProps, type ProgressHandler, type Props, RADIO, Radio, type RadioHandler, type RadioProps, type Row, type RowSelectCallback, SHEET, SHEET_ACTION_POSITION, SKELETON, SLIDER, SORT, SPINNER, ScrollView, type ScrollViewProps, Search, type SearchHandler, type SearchProps, type Segment, type SegmentController, type SegmentItemProps, type SegmentProps, Select, type SelectHandler, type SelectProps, Segmented as SelectTabs, Sheet, type SheetHandler, type SheetProps, type Skeleton, Slider, type SliderController, type SliderProps, type ToastAction as SnackAction, type SnackController, ToastPosition as SnackPosition, ToastStyle as SnackStyle, ToastType as SnackType, Span, type SpanProps, Spinner, type SpinnerProps, Status, Switch, type CheckboxHandler as SwitchHandler, TRANSITIONS, TRANSITION_CURVES, type Tab, type TabBodyProps, type TabProps, TabView, type TabViewHandler, type TabViewProps, ForwardedTable as Table, type TableController, type TableOfContentItem, TableOfContents, type TableOfContentsProps, type TableProps, type TableSortCallback, Terminal, type TerminalCommandFn, type TerminalCommands, type TerminalHandler, type TerminalLine, type TerminalProps, Text, type TextAreaProps, TextWheel, type TextWheelHandler, type TextWheelProps, TextArea as Textarea, ThemeProvider, type ToastAction, ToastDefaultTitle, ToastPosition, type ToastProps, Toast as ToastProvider, ToastStyle, ToastType, ToolTip, type ToolTipController, type ToolTipProps, type TreeItemHandler, type TreeItemProps, type TreeNode, type TreeNodeIcons, TreeView, type TreeViewHandler, type TreeViewProps, type ValidationResult, type ValidationSchema, type Value, type ValueOf, Variant, type WithFormValidation, type ZuzCommonValues, type ZuzProps, type ZuzStyleString, type animationProps, animationTransition, buildClassString, buildWithStyles, cleanProps, css, type cssShortKey, type cssShortKeys, type dynamic, getAnimationCurve, getAnimationTransition, getZuzMap, isKeyCombination, type parallaxEffectProps, setZuzMap, splitAtoms, useBase, useContextMenu, useDialog, useDrawer, useFx, useMorph, usePosition, useSnack, useToast };
|
|
3409
|
+
export { ALERT, AVATAR, Accordion, type AccordionHandler, type AccordionProps, ActionBar, type ActionBarHandler, type ActionBarItem, type ActionBarProps, Alert, type AlertHandler, type AlertProps, type AnimationTransition, AutoComplete, type AutoCompleteProps, Avatar, type AvatarHandler, type AvatarProps, Badge, type BadgeProps, Box, type BoxProps, Bubble, BubbleMediaType, type BubbleProps, BubbleStatus, Button, type ButtonHandler, type ButtonProps, ButtonState, CHART, CHECKBOX, COLORTHEME, Calendar, type CalendarProps, Carousel, type CarouselEffect, type CarouselProps, Chart, type ChartProps, CheckBox, type CheckBoxProps, type CheckboxHandler, CodeBlock, type CodeBlockProps, ColorScheme$1 as ColorScheme, type Column, type ContextItem, ContextMenu, type ContextMenuHandler, type ContextMenuProps, type CookieConsentProps, CookiesConsent, Cover, type CoverProps, type CropHandler, CropShape, Cropper, type CropperProps, Crumb, type CrumbItem, type CrumbProps, DATATYPE, DIALOG, DIALOG_ACTION_POSITION, DRAWER_SIDE, DatePicker, Dialog, type DialogActionHandler, type DialogController, type DialogHandler, type DialogProps, Drawer, type DrawerController, type DrawerHandler, type DrawerProps, FILTER, FORMVALIDATION, FORMVALIDATION_STYLE, Fab, type FabProps, type FilterProps, Filters, Flex, type FlexProps, Form, type FormHandler, type FormInputs, type FormProps, type FormValidation, Grid, type GridProps, Group, type GroupProps, Icon, type IconProps, Image, type ImageProps, Input, type InputProps, type KeyCombination, type KeyboardKey, type KeyboardKeyProps, KeyBoardKeys as KeyboardKeys, KeysLabelMap, KeysMap, Label, type LabelProps, type LayerHandler, LayersProvider, List, type ListItem, type ListItemObject, type ListProps, type LoopMode, MediaPlayer, type MediaPlayerContextType, type MediaPlayerController, type MediaPlayerIcons, type MediaPlayerProps, type MenuItemProps, type MorphOptions, type NetworkManagerprops, NetworkManager as NetworkStatus, ORIGIN, type Option, type OptionItemProps, OriginType, Overlay, type OverlayProps, PACKAGE_NAME, POSITION, PROGRESS, Pagination, type PaginationCallback, type PaginationController, type PaginationPage, type PaginationPageItem, type PaginationProps, PaginationStyle, Password, type PasswordProps, PinInput, type PinInputProps, Position, ProgressBar, type ProgressBarProps, type ProgressHandler, type Props, RADIO, Radio, type RadioHandler, type RadioProps, type Row, type RowSelectCallback, SHEET, SHEET_ACTION_POSITION, SKELETON, SLIDER, SORT, SPINNER, ScrollView, type ScrollViewProps, Search, type SearchHandler, type SearchProps, type Segment, type SegmentController, type SegmentItemProps, type SegmentProps, Select, type SelectEditableChange, type SelectEditableProps, type SelectHandler, type SelectInternalProps, type SelectMultipleChange, type SelectMultipleProps, type SelectPrimitive, type SelectProps, type SelectSingleChange, type SelectSingleProps, type SelectSingleValue, Segmented as SelectTabs, type SelectTokenizerProps, type SelectValue, Sheet, type SheetHandler, type SheetProps, type Skeleton, Slider, type SliderController, type SliderProps, type ToastAction as SnackAction, type SnackController, ToastPosition as SnackPosition, ToastStyle as SnackStyle, ToastType as SnackType, Span, type SpanProps, Spinner, type SpinnerProps, Status, Switch, type CheckboxHandler as SwitchHandler, TRANSITIONS, TRANSITION_CURVES, type Tab, type TabBodyProps, type TabProps, TabView, type TabViewHandler, type TabViewProps, ForwardedTable as Table, type TableController, type TableOfContentItem, TableOfContents, type TableOfContentsProps, type TableProps, type TableSortCallback, Terminal, type TerminalCommandFn, type TerminalCommands, type TerminalHandler, type TerminalLine, type TerminalProps, Text, type TextAreaProps, TextWheel, type TextWheelHandler, type TextWheelProps, TextArea as Textarea, ThemeProvider, type ToastAction, ToastDefaultTitle, ToastPosition, type ToastProps, Toast as ToastProvider, ToastStyle, ToastType, ToolTip, type ToolTipController, type ToolTipProps, type TreeItemHandler, type TreeItemProps, type TreeNode, type TreeNodeIcons, TreeView, type TreeViewHandler, type TreeViewProps, type ValidationResult, type ValidationSchema, type Value, type ValueOf, Variant, type WithFormValidation, type ZuzCommonValues, type ZuzProps, type ZuzStyleString, type animationProps, animationTransition, buildClassString, buildWithStyles, cleanProps, css, type cssShortKey, type cssShortKeys, type dynamic, getAnimationCurve, getAnimationTransition, getZuzMap, isKeyCombination, type parallaxEffectProps, setZuzMap, splitAtoms, useBase, useContextMenu, useDialog, useDrawer, useFx, useMorph, usePosition, useSnack, useToast };
|