lecom-ui 4.5.8 → 4.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -33,7 +33,13 @@ const NotificationCallout = ({ ...props }) => {
|
|
|
33
33
|
refCollapse.current?.style.setProperty("transform", "rotate(0deg)");
|
|
34
34
|
}
|
|
35
35
|
}, [isCollapsed]);
|
|
36
|
-
const handleCollapse = () =>
|
|
36
|
+
const handleCollapse = () => {
|
|
37
|
+
if (props.onCollapseChange) {
|
|
38
|
+
props.onCollapseChange(!getIsCollapsed());
|
|
39
|
+
} else {
|
|
40
|
+
setIsCollapsed(!getIsCollapsed());
|
|
41
|
+
}
|
|
42
|
+
};
|
|
37
43
|
const defaultVariant = props.variant ?? "information";
|
|
38
44
|
const getGridColumns = () => {
|
|
39
45
|
if (props.fullWidth) {
|
package/dist/index.d.ts
CHANGED
|
@@ -540,9 +540,9 @@ interface HeaderProps extends React$1.HTMLAttributes<HTMLElement>, VariantProps<
|
|
|
540
540
|
}
|
|
541
541
|
|
|
542
542
|
declare const inputVariants: (props?: ({
|
|
543
|
-
variant?: "
|
|
544
|
-
size?: "
|
|
545
|
-
radius?: "
|
|
543
|
+
variant?: "filled" | "default" | "borderless" | null | undefined;
|
|
544
|
+
size?: "small" | "large" | "default" | null | undefined;
|
|
545
|
+
radius?: "small" | "large" | "default" | null | undefined;
|
|
546
546
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
547
547
|
interface InputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, 'size' | 'sufix' | 'prefix'>, VariantProps<typeof inputVariants> {
|
|
548
548
|
sufix?: React$1.ReactNode;
|
|
@@ -606,6 +606,7 @@ interface CalloutNotificationProps extends BaseNotificationProps {
|
|
|
606
606
|
isCollapsed?: boolean;
|
|
607
607
|
action?: React$1.ReactNode;
|
|
608
608
|
defaultCollapsed?: boolean;
|
|
609
|
+
onCollapseChange?: (collapse: boolean) => void;
|
|
609
610
|
}
|
|
610
611
|
interface InlineNotificationProps extends BaseNotificationProps {
|
|
611
612
|
type: 'inline';
|
|
@@ -702,7 +703,7 @@ declare const TooltipTrigger: React$1.ForwardRefExoticComponent<TooltipPrimitive
|
|
|
702
703
|
declare const TooltipArrow: React$1.ForwardRefExoticComponent<TooltipPrimitive.TooltipArrowProps & React$1.RefAttributes<SVGSVGElement>>;
|
|
703
704
|
declare const TooltipPortal: React$1.FC<TooltipPrimitive.TooltipPortalProps>;
|
|
704
705
|
declare const tooltipContentVariants: (props?: ({
|
|
705
|
-
color?: "
|
|
706
|
+
color?: "white" | "black" | null | undefined;
|
|
706
707
|
arrow?: boolean | null | undefined;
|
|
707
708
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
708
709
|
interface TooltipContentProps extends React$1.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>, VariantProps<typeof tooltipContentVariants> {
|