@lglab/compose-ui 0.20.0 → 0.22.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.
- package/dist/accordion.d.ts +40 -0
- package/dist/accordion.js +46 -0
- package/dist/alert-dialog.d.ts +87 -0
- package/dist/alert-dialog.js +112 -0
- package/dist/arrow-svg-C6zQTvgS.js +40 -0
- package/dist/avatar.d.ts +47 -0
- package/dist/avatar.js +81 -0
- package/dist/button-variants-CbFMPwc8.js +33 -0
- package/dist/button.d.ts +21 -0
- package/dist/button.js +25 -0
- package/dist/card.d.ts +99 -0
- package/dist/card.js +67 -0
- package/dist/collapsible.d.ts +26 -0
- package/dist/collapsible.js +33 -0
- package/dist/context-menu.d.ts +138 -0
- package/dist/context-menu.js +174 -0
- package/dist/control-variants-Bwep4n0y.js +37 -0
- package/dist/dialog.d.ts +92 -0
- package/dist/dialog.js +106 -0
- package/dist/drawer.d.ts +99 -0
- package/dist/drawer.js +112 -0
- package/dist/index.d.ts +1334 -47
- package/dist/index.js +194 -0
- package/dist/menu.d.ts +138 -0
- package/dist/menu.js +147 -0
- package/dist/menubar.d.ts +155 -0
- package/dist/menubar.js +170 -0
- package/dist/meter.d.ts +43 -0
- package/dist/meter.js +66 -0
- package/dist/popover.d.ts +82 -0
- package/dist/popover.js +95 -0
- package/dist/preview-card.d.ts +54 -0
- package/dist/preview-card.js +82 -0
- package/dist/progress.d.ts +40 -0
- package/dist/progress.js +51 -0
- package/dist/scroll-area.d.ts +47 -0
- package/dist/scroll-area.js +57 -0
- package/dist/separator.d.ts +12 -0
- package/dist/separator.js +24 -0
- package/dist/slider.d.ts +47 -0
- package/dist/slider.js +63 -0
- package/dist/switch.d.ts +19 -0
- package/dist/switch.js +40 -0
- package/dist/tabs.d.ts +49 -0
- package/dist/tabs.js +85 -0
- package/dist/toggle-group.d.ts +29 -0
- package/dist/toggle-group.js +35 -0
- package/dist/toggle.d.ts +21 -0
- package/dist/toggle.js +16 -0
- package/dist/tooltip.d.ts +62 -0
- package/dist/tooltip.js +93 -0
- package/dist/utils-B6yFEsav.js +8 -0
- package/package.json +96 -4
- package/dist/components/accordion.d.ts +0 -30
- package/dist/components/accordion.d.ts.map +0 -1
- package/dist/components/alert-dialog.d.ts +0 -64
- package/dist/components/alert-dialog.d.ts.map +0 -1
- package/dist/components/avatar.d.ts +0 -38
- package/dist/components/avatar.d.ts.map +0 -1
- package/dist/components/button.d.ts +0 -16
- package/dist/components/button.d.ts.map +0 -1
- package/dist/components/card.d.ts +0 -79
- package/dist/components/card.d.ts.map +0 -1
- package/dist/components/collapsible.d.ts +0 -20
- package/dist/components/collapsible.d.ts.map +0 -1
- package/dist/components/context-menu.d.ts +0 -100
- package/dist/components/context-menu.d.ts.map +0 -1
- package/dist/components/dialog.d.ts +0 -69
- package/dist/components/dialog.d.ts.map +0 -1
- package/dist/components/drawer.d.ts +0 -74
- package/dist/components/drawer.d.ts.map +0 -1
- package/dist/components/menu.d.ts +0 -100
- package/dist/components/menu.d.ts.map +0 -1
- package/dist/components/menubar.d.ts +0 -112
- package/dist/components/menubar.d.ts.map +0 -1
- package/dist/components/meter.d.ts +0 -33
- package/dist/components/meter.d.ts.map +0 -1
- package/dist/components/popover.d.ts +0 -60
- package/dist/components/popover.d.ts.map +0 -1
- package/dist/components/progress.d.ts +0 -30
- package/dist/components/progress.d.ts.map +0 -1
- package/dist/components/scroll-area.d.ts +0 -35
- package/dist/components/scroll-area.d.ts.map +0 -1
- package/dist/components/separator.d.ts +0 -10
- package/dist/components/separator.d.ts.map +0 -1
- package/dist/components/slider.d.ts +0 -35
- package/dist/components/slider.d.ts.map +0 -1
- package/dist/components/switch.d.ts +0 -15
- package/dist/components/switch.d.ts.map +0 -1
- package/dist/components/tabs.d.ts +0 -39
- package/dist/components/tabs.d.ts.map +0 -1
- package/dist/components/toggle-group.d.ts +0 -22
- package/dist/components/toggle-group.d.ts.map +0 -1
- package/dist/components/toggle.d.ts +0 -16
- package/dist/components/toggle.d.ts.map +0 -1
- package/dist/components/tooltip.d.ts +0 -47
- package/dist/components/tooltip.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.es.js +0 -1666
- package/dist/lib/arrow-svg.d.ts +0 -9
- package/dist/lib/arrow-svg.d.ts.map +0 -1
- package/dist/lib/button-variants.d.ts +0 -7
- package/dist/lib/button-variants.d.ts.map +0 -1
- package/dist/lib/control-variants.d.ts +0 -7
- package/dist/lib/control-variants.d.ts.map +0 -1
- package/dist/lib/tooltip-variants.d.ts +0 -9
- package/dist/lib/tooltip-variants.d.ts.map +0 -1
- package/dist/lib/utils.d.ts +0 -3
- package/dist/lib/utils.d.ts.map +0 -1
package/dist/drawer.d.ts
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { Dialog } from '@base-ui/react/dialog';
|
|
2
|
+
import { JSX } from 'react/jsx-runtime';
|
|
3
|
+
import * as React_2 from 'react';
|
|
4
|
+
|
|
5
|
+
declare type ButtonSize = 'sm' | 'default' | 'lg' | 'icon' | 'icon-sm' | 'icon-lg';
|
|
6
|
+
|
|
7
|
+
declare type ButtonVariant = 'default' | 'secondary' | 'outline' | 'ghost' | 'destructive' | 'link';
|
|
8
|
+
|
|
9
|
+
export declare const DrawerBackdrop: {
|
|
10
|
+
({ className, ...props }: DrawerBackdropProps): JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export declare type DrawerBackdropProps = React_2.ComponentProps<typeof Dialog.Backdrop>;
|
|
15
|
+
|
|
16
|
+
export declare const DrawerClose: {
|
|
17
|
+
({ className, variant, size, ...props }: DrawerCloseProps): JSX.Element;
|
|
18
|
+
displayName: string;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export declare type DrawerCloseProps = React_2.ComponentProps<typeof Dialog.Close> & {
|
|
22
|
+
/** Visual style variant */
|
|
23
|
+
variant?: ButtonVariant;
|
|
24
|
+
/** Size of the close button */
|
|
25
|
+
size?: ButtonSize;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export declare const DrawerContent: {
|
|
29
|
+
({ className, ...props }: DrawerContentProps): JSX.Element;
|
|
30
|
+
displayName: string;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export declare type DrawerContentProps = React_2.HTMLAttributes<HTMLDivElement>;
|
|
34
|
+
|
|
35
|
+
export declare const DrawerDescription: {
|
|
36
|
+
({ className, ...props }: DrawerDescriptionProps): JSX.Element;
|
|
37
|
+
displayName: string;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export declare type DrawerDescriptionProps = React_2.ComponentProps<typeof Dialog.Description>;
|
|
41
|
+
|
|
42
|
+
export declare const DrawerFooter: {
|
|
43
|
+
({ className, ...props }: DrawerFooterProps): JSX.Element;
|
|
44
|
+
displayName: string;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export declare type DrawerFooterProps = React_2.HTMLAttributes<HTMLDivElement>;
|
|
48
|
+
|
|
49
|
+
export declare const DrawerHeader: {
|
|
50
|
+
({ className, ...props }: DrawerHeaderProps): JSX.Element;
|
|
51
|
+
displayName: string;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export declare type DrawerHeaderProps = React_2.HTMLAttributes<HTMLDivElement>;
|
|
55
|
+
|
|
56
|
+
export declare const DrawerPopup: {
|
|
57
|
+
({ className, side, ...props }: DrawerPopupProps): JSX.Element;
|
|
58
|
+
displayName: string;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export declare type DrawerPopupProps = React_2.ComponentProps<typeof Dialog.Popup> & {
|
|
62
|
+
/** Side from which the drawer slides in */
|
|
63
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export declare const DrawerPortal: {
|
|
67
|
+
(props: DrawerPortalProps): JSX.Element;
|
|
68
|
+
displayName: string;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export declare type DrawerPortalProps = React_2.ComponentProps<typeof Dialog.Portal>;
|
|
72
|
+
|
|
73
|
+
export declare const DrawerRoot: {
|
|
74
|
+
(props: DrawerRootProps): JSX.Element;
|
|
75
|
+
displayName: string;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export declare type DrawerRootProps = React_2.ComponentProps<typeof Dialog.Root>;
|
|
79
|
+
|
|
80
|
+
export declare const DrawerTitle: {
|
|
81
|
+
({ className, ...props }: DrawerTitleProps): JSX.Element;
|
|
82
|
+
displayName: string;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export declare type DrawerTitleProps = React_2.ComponentProps<typeof Dialog.Title>;
|
|
86
|
+
|
|
87
|
+
export declare const DrawerTrigger: {
|
|
88
|
+
({ className, variant, size, ...props }: DrawerTriggerProps): JSX.Element;
|
|
89
|
+
displayName: string;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export declare type DrawerTriggerProps = React_2.ComponentProps<typeof Dialog.Trigger> & {
|
|
93
|
+
/** Visual style variant */
|
|
94
|
+
variant?: ButtonVariant;
|
|
95
|
+
/** Size of the trigger button */
|
|
96
|
+
size?: ButtonSize;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export { }
|
package/dist/drawer.js
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { Dialog as s } from "@base-ui/react/dialog";
|
|
4
|
+
import { cva as i } from "class-variance-authority";
|
|
5
|
+
import { b as n } from "./button-variants-CbFMPwc8.js";
|
|
6
|
+
import { c as t } from "./utils-B6yFEsav.js";
|
|
7
|
+
const d = (a) => /* @__PURE__ */ e(s.Root, { ...a });
|
|
8
|
+
d.displayName = "DrawerRoot";
|
|
9
|
+
const c = ({ className: a, variant: r, size: o, ...l }) => /* @__PURE__ */ e(
|
|
10
|
+
s.Trigger,
|
|
11
|
+
{
|
|
12
|
+
className: t(n({ variant: r, size: o }), a),
|
|
13
|
+
...l
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
c.displayName = "DrawerTrigger";
|
|
17
|
+
const p = (a) => /* @__PURE__ */ e(s.Portal, { ...a });
|
|
18
|
+
p.displayName = "DrawerPortal";
|
|
19
|
+
const m = ({ className: a, ...r }) => /* @__PURE__ */ e(
|
|
20
|
+
s.Backdrop,
|
|
21
|
+
{
|
|
22
|
+
className: t(
|
|
23
|
+
"fixed inset-0 z-50 bg-black/50 backdrop-blur-sm",
|
|
24
|
+
"transition-opacity duration-300",
|
|
25
|
+
"data-starting-style:opacity-0 data-ending-style:opacity-0",
|
|
26
|
+
a
|
|
27
|
+
),
|
|
28
|
+
...r
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
m.displayName = "DrawerBackdrop";
|
|
32
|
+
const u = i(
|
|
33
|
+
[
|
|
34
|
+
"fixed z-50 flex flex-col bg-background p-6 shadow-lg",
|
|
35
|
+
"transition-transform duration-300 ease-out",
|
|
36
|
+
"scale-[calc(1-0.1*var(--nested-dialogs))]",
|
|
37
|
+
"data-[nested-dialog-open]:after:absolute data-[nested-dialog-open]:after:inset-0 data-[nested-dialog-open]:after:rounded-[inherit] data-[nested-dialog-open]:after:bg-black/5"
|
|
38
|
+
],
|
|
39
|
+
{
|
|
40
|
+
variants: {
|
|
41
|
+
side: {
|
|
42
|
+
top: [
|
|
43
|
+
"inset-x-0 top-0 border-b border-border",
|
|
44
|
+
"data-starting-style:-translate-y-full",
|
|
45
|
+
"data-ending-style:-translate-y-full"
|
|
46
|
+
],
|
|
47
|
+
right: [
|
|
48
|
+
"inset-y-0 right-0 h-full w-sm max-w-full border-l border-border",
|
|
49
|
+
"data-starting-style:translate-x-full",
|
|
50
|
+
"data-ending-style:translate-x-full"
|
|
51
|
+
],
|
|
52
|
+
bottom: [
|
|
53
|
+
"inset-x-0 bottom-0 border-t border-border",
|
|
54
|
+
"data-starting-style:translate-y-full",
|
|
55
|
+
"data-ending-style:translate-y-full"
|
|
56
|
+
],
|
|
57
|
+
left: [
|
|
58
|
+
"inset-y-0 left-0 h-full w-sm max-w-full border-r border-border",
|
|
59
|
+
"data-starting-style:-translate-x-full",
|
|
60
|
+
"data-ending-style:-translate-x-full"
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
defaultVariants: {
|
|
65
|
+
side: "right"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
), g = ({ className: a, side: r, ...o }) => /* @__PURE__ */ e(
|
|
69
|
+
s.Popup,
|
|
70
|
+
{
|
|
71
|
+
className: t(u({ side: r }), a),
|
|
72
|
+
...o
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
g.displayName = "DrawerPopup";
|
|
76
|
+
const f = ({ className: a, ...r }) => /* @__PURE__ */ e(
|
|
77
|
+
s.Title,
|
|
78
|
+
{
|
|
79
|
+
className: t("text-lg font-semibold leading-none tracking-tight", a),
|
|
80
|
+
...r
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
f.displayName = "DrawerTitle";
|
|
84
|
+
const y = ({ className: a, ...r }) => /* @__PURE__ */ e(s.Description, { className: t("", a), ...r });
|
|
85
|
+
y.displayName = "DrawerDescription";
|
|
86
|
+
const w = ({ className: a, variant: r, size: o, ...l }) => /* @__PURE__ */ e(
|
|
87
|
+
s.Close,
|
|
88
|
+
{
|
|
89
|
+
className: t(n({ variant: r ?? "outline", size: o }), a),
|
|
90
|
+
...l
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
w.displayName = "DrawerClose";
|
|
94
|
+
const b = ({ className: a, ...r }) => /* @__PURE__ */ e("div", { className: t("flex flex-col space-y-1.5", a), ...r });
|
|
95
|
+
b.displayName = "DrawerHeader";
|
|
96
|
+
const D = ({ className: a, ...r }) => /* @__PURE__ */ e("div", { className: t("py-5", a), ...r });
|
|
97
|
+
D.displayName = "DrawerContent";
|
|
98
|
+
const N = ({ className: a, ...r }) => /* @__PURE__ */ e("div", { className: t("", a), ...r });
|
|
99
|
+
N.displayName = "DrawerFooter";
|
|
100
|
+
export {
|
|
101
|
+
m as DrawerBackdrop,
|
|
102
|
+
w as DrawerClose,
|
|
103
|
+
D as DrawerContent,
|
|
104
|
+
y as DrawerDescription,
|
|
105
|
+
N as DrawerFooter,
|
|
106
|
+
b as DrawerHeader,
|
|
107
|
+
g as DrawerPopup,
|
|
108
|
+
p as DrawerPortal,
|
|
109
|
+
d as DrawerRoot,
|
|
110
|
+
f as DrawerTitle,
|
|
111
|
+
c as DrawerTrigger
|
|
112
|
+
};
|