@douglasneuroinformatics/libui 3.5.0 → 3.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components.d.ts +5 -2
- package/dist/components.js +40 -33
- package/dist/components.js.map +1 -1
- package/dist/douglasneuroinformatics-libui-3.5.2.tgz +0 -0
- package/package.json +1 -1
- package/src/components/Sheet/Sheet.tsx +0 -2
- package/src/components/Sheet/SheetContent.tsx +4 -2
- package/src/components/Tooltip/TooltipRoot.tsx +14 -2
- package/dist/douglasneuroinformatics-libui-3.5.0.tgz +0 -0
package/dist/components.d.ts
CHANGED
|
@@ -1403,7 +1403,6 @@ declare const Sheet: React$1.FC<_radix_ui_react_dialog.DialogProps> & {
|
|
|
1403
1403
|
Description: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_dialog.DialogDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>, "ref"> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
1404
1404
|
Footer: ({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>) => react_jsx_runtime.JSX.Element;
|
|
1405
1405
|
Header: ({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>) => react_jsx_runtime.JSX.Element;
|
|
1406
|
-
Overlay: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_dialog.DialogOverlayProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1407
1406
|
Portal: React$1.FC<_radix_ui_react_dialog.DialogPortalProps>;
|
|
1408
1407
|
Title: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_dialog.DialogTitleProps & React$1.RefAttributes<HTMLHeadingElement>, "ref"> & React$1.RefAttributes<HTMLHeadingElement>>;
|
|
1409
1408
|
Trigger: React$1.ForwardRefExoticComponent<_radix_ui_react_dialog.DialogTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1470,11 +1469,15 @@ type TooltipRootProps = {
|
|
|
1470
1469
|
children: React$1.ReactNode;
|
|
1471
1470
|
/** The duration from when the mouse enters a tooltip trigger until the tooltip opens. */
|
|
1472
1471
|
delayDuration?: number;
|
|
1472
|
+
/** Event handler called when the open state of the tooltip changes. */
|
|
1473
|
+
onOpenChange?: (open: boolean) => void;
|
|
1474
|
+
/** The controlled open state of the tooltip. Must be used in conjunction with onOpenChange. */
|
|
1475
|
+
open?: boolean;
|
|
1473
1476
|
/** How much time a user has to enter another trigger without incurring a delay again. */
|
|
1474
1477
|
skipDelayDuration?: number;
|
|
1475
1478
|
};
|
|
1476
1479
|
|
|
1477
|
-
declare const Tooltip: (({ children, delayDuration, skipDelayDuration }: TooltipRootProps) => react_jsx_runtime.JSX.Element) & {
|
|
1480
|
+
declare const Tooltip: (({ children, delayDuration, onOpenChange, open, skipDelayDuration }: TooltipRootProps) => react_jsx_runtime.JSX.Element) & {
|
|
1478
1481
|
Content: React$1.ForwardRefExoticComponent<TooltipContentProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1479
1482
|
Trigger: React$1.ForwardRefExoticComponent<TooltipTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1480
1483
|
};
|
package/dist/components.js
CHANGED
|
@@ -3981,10 +3981,30 @@ var SheetBody = ({
|
|
|
3981
3981
|
|
|
3982
3982
|
// src/components/Sheet/SheetContent.tsx
|
|
3983
3983
|
import * as React50 from "react";
|
|
3984
|
-
import { Close as Close2, Content as Content11,
|
|
3984
|
+
import { Close as Close2, Content as Content11, Portal as Portal11 } from "@radix-ui/react-dialog";
|
|
3985
3985
|
import { cva as cva5 } from "class-variance-authority";
|
|
3986
3986
|
import { XIcon as XIcon3 } from "lucide-react";
|
|
3987
|
-
|
|
3987
|
+
|
|
3988
|
+
// src/components/Sheet/SheetOverlay.tsx
|
|
3989
|
+
import { forwardRef as forwardRef94 } from "react";
|
|
3990
|
+
import { Overlay as Overlay3 } from "@radix-ui/react-dialog";
|
|
3991
|
+
import { jsx as jsx164 } from "react/jsx-runtime";
|
|
3992
|
+
var SheetOverlay = forwardRef94(function SheetOverlay2({ className, ...props }, ref) {
|
|
3993
|
+
return /* @__PURE__ */ jsx164(
|
|
3994
|
+
Overlay3,
|
|
3995
|
+
{
|
|
3996
|
+
className: cn(
|
|
3997
|
+
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
3998
|
+
className
|
|
3999
|
+
),
|
|
4000
|
+
...props,
|
|
4001
|
+
ref
|
|
4002
|
+
}
|
|
4003
|
+
);
|
|
4004
|
+
});
|
|
4005
|
+
|
|
4006
|
+
// src/components/Sheet/SheetContent.tsx
|
|
4007
|
+
import { jsx as jsx165, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
3988
4008
|
var sheetVariants = cva5(
|
|
3989
4009
|
"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
3990
4010
|
{
|
|
@@ -4003,52 +4023,34 @@ var sheetVariants = cva5(
|
|
|
4003
4023
|
);
|
|
4004
4024
|
var SheetContent = React50.forwardRef(function SheetContent2({ children, className, side = "right", ...props }, ref) {
|
|
4005
4025
|
return /* @__PURE__ */ jsxs56(Portal11, { children: [
|
|
4006
|
-
/* @__PURE__ */
|
|
4026
|
+
/* @__PURE__ */ jsx165(SheetOverlay, {}),
|
|
4007
4027
|
/* @__PURE__ */ jsxs56(Content11, { className: cn(sheetVariants({ side }), className), ref, ...props, children: [
|
|
4008
4028
|
children,
|
|
4009
4029
|
/* @__PURE__ */ jsxs56(Close2, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
4010
|
-
/* @__PURE__ */
|
|
4011
|
-
/* @__PURE__ */
|
|
4030
|
+
/* @__PURE__ */ jsx165(XIcon3, { className: "h-4 w-4" }),
|
|
4031
|
+
/* @__PURE__ */ jsx165("span", { className: "sr-only", children: "Close" })
|
|
4012
4032
|
] })
|
|
4013
4033
|
] })
|
|
4014
4034
|
] });
|
|
4015
4035
|
});
|
|
4016
4036
|
|
|
4017
4037
|
// src/components/Sheet/SheetDescription.tsx
|
|
4018
|
-
import { forwardRef as
|
|
4038
|
+
import { forwardRef as forwardRef96 } from "react";
|
|
4019
4039
|
import { Description as Description3 } from "@radix-ui/react-dialog";
|
|
4020
|
-
import { jsx as
|
|
4021
|
-
var SheetDescription =
|
|
4022
|
-
return /* @__PURE__ */
|
|
4040
|
+
import { jsx as jsx166 } from "react/jsx-runtime";
|
|
4041
|
+
var SheetDescription = forwardRef96(function SheetDescription2({ className, ...props }, ref) {
|
|
4042
|
+
return /* @__PURE__ */ jsx166(Description3, { className: cn("text-sm text-muted-foreground", className), ref, ...props });
|
|
4023
4043
|
});
|
|
4024
4044
|
|
|
4025
4045
|
// src/components/Sheet/SheetFooter.tsx
|
|
4026
4046
|
import "react";
|
|
4027
|
-
import { jsx as
|
|
4028
|
-
var SheetFooter = ({ className, ...props }) => /* @__PURE__ */
|
|
4047
|
+
import { jsx as jsx167 } from "react/jsx-runtime";
|
|
4048
|
+
var SheetFooter = ({ className, ...props }) => /* @__PURE__ */ jsx167("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props });
|
|
4029
4049
|
|
|
4030
4050
|
// src/components/Sheet/SheetHeader.tsx
|
|
4031
4051
|
import "react";
|
|
4032
|
-
import { jsx as jsx167 } from "react/jsx-runtime";
|
|
4033
|
-
var SheetHeader = ({ className, ...props }) => /* @__PURE__ */ jsx167("div", { className: cn("flex flex-col space-y-2 text-center sm:text-left", className), ...props });
|
|
4034
|
-
|
|
4035
|
-
// src/components/Sheet/SheetOverlay.tsx
|
|
4036
|
-
import { forwardRef as forwardRef96 } from "react";
|
|
4037
|
-
import { Overlay as Overlay4 } from "@radix-ui/react-dialog";
|
|
4038
4052
|
import { jsx as jsx168 } from "react/jsx-runtime";
|
|
4039
|
-
var
|
|
4040
|
-
return /* @__PURE__ */ jsx168(
|
|
4041
|
-
Overlay4,
|
|
4042
|
-
{
|
|
4043
|
-
className: cn(
|
|
4044
|
-
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
4045
|
-
className
|
|
4046
|
-
),
|
|
4047
|
-
...props,
|
|
4048
|
-
ref
|
|
4049
|
-
}
|
|
4050
|
-
);
|
|
4051
|
-
});
|
|
4053
|
+
var SheetHeader = ({ className, ...props }) => /* @__PURE__ */ jsx168("div", { className: cn("flex flex-col space-y-2 text-center sm:text-left", className), ...props });
|
|
4052
4054
|
|
|
4053
4055
|
// src/components/Sheet/SheetTitle.tsx
|
|
4054
4056
|
import { forwardRef as forwardRef97 } from "react";
|
|
@@ -4068,7 +4070,6 @@ var Sheet = Object.assign(Root18.bind(null), {
|
|
|
4068
4070
|
Description: SheetDescription,
|
|
4069
4071
|
Footer: SheetFooter,
|
|
4070
4072
|
Header: SheetHeader,
|
|
4071
|
-
Overlay: SheetOverlay,
|
|
4072
4073
|
Portal: Portal12,
|
|
4073
4074
|
Title: SheetTitle,
|
|
4074
4075
|
Trigger: Trigger10
|
|
@@ -4282,8 +4283,14 @@ var TooltipContent = React54.forwardRef(
|
|
|
4282
4283
|
import "react";
|
|
4283
4284
|
import { Provider, Root as Root21 } from "@radix-ui/react-tooltip";
|
|
4284
4285
|
import { jsx as jsx180 } from "react/jsx-runtime";
|
|
4285
|
-
var TooltipRoot = ({
|
|
4286
|
-
|
|
4286
|
+
var TooltipRoot = ({
|
|
4287
|
+
children,
|
|
4288
|
+
delayDuration = 0,
|
|
4289
|
+
onOpenChange,
|
|
4290
|
+
open,
|
|
4291
|
+
skipDelayDuration = 300
|
|
4292
|
+
}) => {
|
|
4293
|
+
return /* @__PURE__ */ jsx180(Provider, { delayDuration, skipDelayDuration, children: /* @__PURE__ */ jsx180(Root21, { open, onOpenChange, children }) });
|
|
4287
4294
|
};
|
|
4288
4295
|
|
|
4289
4296
|
// src/components/Tooltip/TooltipTrigger.tsx
|