@onesaz/ui 0.3.24 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +28 -16
- package/dist/index.js +247 -233
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -428,34 +428,45 @@ declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttribu
|
|
|
428
428
|
declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
429
429
|
declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
430
430
|
|
|
431
|
+
type BadgeColor = 'default' | 'success' | 'warning' | 'error' | 'destructive';
|
|
432
|
+
type BadgeVariant = 'contained' | 'outlined' | 'text';
|
|
431
433
|
interface BadgeProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
432
|
-
|
|
434
|
+
color?: BadgeColor;
|
|
435
|
+
variant?: BadgeVariant;
|
|
433
436
|
}
|
|
434
437
|
declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLDivElement>>;
|
|
435
438
|
|
|
436
|
-
|
|
439
|
+
type ChipColor = 'default' | 'success' | 'warning' | 'error' | 'destructive';
|
|
440
|
+
type ChipVariant = 'filled' | 'outlined';
|
|
441
|
+
type ChipSize = 'small' | 'medium';
|
|
442
|
+
interface ChipProps extends React.HTMLAttributes<HTMLElement> {
|
|
437
443
|
/** The text content of the chip */
|
|
438
444
|
label?: string;
|
|
439
445
|
/** Visual style variant */
|
|
440
|
-
variant?:
|
|
446
|
+
variant?: ChipVariant;
|
|
441
447
|
/** Color scheme */
|
|
442
|
-
color?:
|
|
448
|
+
color?: ChipColor;
|
|
443
449
|
/** Size of the chip */
|
|
444
|
-
size?:
|
|
450
|
+
size?: ChipSize;
|
|
445
451
|
/** Icon element displayed before the label */
|
|
446
452
|
icon?: React.ReactNode;
|
|
447
453
|
/** Avatar element displayed before the label */
|
|
448
454
|
avatar?: React.ReactNode;
|
|
449
|
-
/** If provided, renders a delete icon and calls this on click
|
|
450
|
-
|
|
455
|
+
/** If provided, renders a delete icon and calls this on click.
|
|
456
|
+
* Also triggered by pressing Delete or Backspace when the chip is focused. */
|
|
457
|
+
onDelete?: (event: React.SyntheticEvent) => void;
|
|
451
458
|
/** Custom delete icon */
|
|
452
459
|
deleteIcon?: React.ReactNode;
|
|
453
|
-
/**
|
|
460
|
+
/** Makes the chip act as a button (adds role, cursor, keyboard support) */
|
|
454
461
|
clickable?: boolean;
|
|
455
462
|
/** Whether the chip is disabled */
|
|
456
463
|
disabled?: boolean;
|
|
464
|
+
/** Render as a link chip — sets the underlying element to <a> */
|
|
465
|
+
href?: string;
|
|
466
|
+
/** HTML element or React component to render as. Overrides href-based inference. */
|
|
467
|
+
component?: React.ElementType;
|
|
457
468
|
}
|
|
458
|
-
declare const Chip: React.ForwardRefExoticComponent<ChipProps & React.RefAttributes<
|
|
469
|
+
declare const Chip: React.ForwardRefExoticComponent<ChipProps & React.RefAttributes<HTMLElement>>;
|
|
459
470
|
|
|
460
471
|
interface SeparatorProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
461
472
|
orientation?: 'horizontal' | 'vertical';
|
|
@@ -560,20 +571,21 @@ interface SpinnerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
560
571
|
}
|
|
561
572
|
declare const Spinner: React.ForwardRefExoticComponent<SpinnerProps & React.RefAttributes<HTMLDivElement>>;
|
|
562
573
|
|
|
574
|
+
type AlertVariant = 'default' | 'success' | 'warning' | 'error';
|
|
563
575
|
interface AlertProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
564
|
-
variant?:
|
|
565
|
-
|
|
576
|
+
variant?: AlertVariant;
|
|
577
|
+
/** Renders a close button; called when clicked. */
|
|
566
578
|
onClose?: () => void;
|
|
579
|
+
/** Override the default icon. Pass `null` to hide it. */
|
|
580
|
+
icon?: React.ReactNode | null;
|
|
567
581
|
}
|
|
568
|
-
declare const Alert: React.FC<AlertProps>;
|
|
569
582
|
interface AlertTitleProps extends React.HTMLAttributes<HTMLHeadingElement> {
|
|
570
|
-
hasDescription?: boolean;
|
|
571
|
-
variant?: string;
|
|
572
583
|
}
|
|
573
|
-
declare const AlertTitle: React.FC<AlertTitleProps>;
|
|
574
584
|
interface AlertDescriptionProps extends React.HTMLAttributes<HTMLParagraphElement> {
|
|
575
585
|
}
|
|
576
|
-
declare const
|
|
586
|
+
declare const Alert: React.ForwardRefExoticComponent<AlertProps & React.RefAttributes<HTMLDivElement>>;
|
|
587
|
+
declare const AlertTitle: React.ForwardRefExoticComponent<AlertTitleProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
588
|
+
declare const AlertDescription: React.ForwardRefExoticComponent<AlertDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
|
|
577
589
|
|
|
578
590
|
declare const Tabs: React.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>>;
|
|
579
591
|
declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|