@lglab/compose-ui 0.20.0 → 0.21.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 +1284 -47
- package/dist/index.js +186 -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/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 +92 -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/slider.d.ts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
import * as React_2 from 'react';
|
|
3
|
+
import { Slider } from '@base-ui/react/slider';
|
|
4
|
+
|
|
5
|
+
export declare const SliderControl: {
|
|
6
|
+
({ className, ...props }: SliderControlProps): JSX.Element;
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export declare type SliderControlProps = React_2.ComponentProps<typeof Slider.Control>;
|
|
11
|
+
|
|
12
|
+
export declare const SliderIndicator: {
|
|
13
|
+
({ className, ...props }: SliderIndicatorProps): JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export declare type SliderIndicatorProps = React_2.ComponentProps<typeof Slider.Indicator>;
|
|
18
|
+
|
|
19
|
+
export declare const SliderRoot: {
|
|
20
|
+
({ className, ...props }: SliderRootProps): JSX.Element;
|
|
21
|
+
displayName: string;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export declare type SliderRootProps = React_2.ComponentProps<typeof Slider.Root>;
|
|
25
|
+
|
|
26
|
+
export declare const SliderThumb: {
|
|
27
|
+
({ className, ...props }: SliderThumbProps): JSX.Element;
|
|
28
|
+
displayName: string;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export declare type SliderThumbProps = React_2.ComponentProps<typeof Slider.Thumb>;
|
|
32
|
+
|
|
33
|
+
export declare const SliderTrack: {
|
|
34
|
+
({ className, ...props }: SliderTrackProps): JSX.Element;
|
|
35
|
+
displayName: string;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export declare type SliderTrackProps = React_2.ComponentProps<typeof Slider.Track>;
|
|
39
|
+
|
|
40
|
+
export declare const SliderValue: {
|
|
41
|
+
({ className, ...props }: SliderValueProps): JSX.Element;
|
|
42
|
+
displayName: string;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export declare type SliderValueProps = React_2.ComponentProps<typeof Slider.Value>;
|
|
46
|
+
|
|
47
|
+
export { }
|
package/dist/slider.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
3
|
+
import { Slider as o } from "@base-ui/react/slider";
|
|
4
|
+
import { c as a } from "./utils-B6yFEsav.js";
|
|
5
|
+
const i = ({ className: e, ...r }) => /* @__PURE__ */ l(o.Root, { className: a("w-full", e), ...r });
|
|
6
|
+
i.displayName = "SliderRoot";
|
|
7
|
+
const t = ({ className: e, ...r }) => /* @__PURE__ */ l(
|
|
8
|
+
o.Value,
|
|
9
|
+
{
|
|
10
|
+
className: a("text-sm font-medium text-foreground", e),
|
|
11
|
+
...r
|
|
12
|
+
}
|
|
13
|
+
);
|
|
14
|
+
t.displayName = "SliderValue";
|
|
15
|
+
const n = ({ className: e, ...r }) => /* @__PURE__ */ l(
|
|
16
|
+
o.Control,
|
|
17
|
+
{
|
|
18
|
+
className: a("flex w-full touch-none items-center py-2 select-none", e),
|
|
19
|
+
...r
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
n.displayName = "SliderControl";
|
|
23
|
+
const s = ({ className: e, ...r }) => /* @__PURE__ */ l(
|
|
24
|
+
o.Track,
|
|
25
|
+
{
|
|
26
|
+
className: a("relative h-1.5 w-full rounded-full bg-primary/20", e),
|
|
27
|
+
...r
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
s.displayName = "SliderTrack";
|
|
31
|
+
const d = ({ className: e, ...r }) => /* @__PURE__ */ l(
|
|
32
|
+
o.Indicator,
|
|
33
|
+
{
|
|
34
|
+
className: a("rounded-full bg-primary", e),
|
|
35
|
+
...r
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
d.displayName = "SliderIndicator";
|
|
39
|
+
const u = ({ className: e, ...r }) => /* @__PURE__ */ l(
|
|
40
|
+
o.Thumb,
|
|
41
|
+
{
|
|
42
|
+
className: a(
|
|
43
|
+
"size-4 rounded-full bg-background",
|
|
44
|
+
"outline",
|
|
45
|
+
"shadow-sm",
|
|
46
|
+
"transition-[box-shadow,outline-color] duration-150",
|
|
47
|
+
"hover:outline-primary/50",
|
|
48
|
+
"focus-visible:outline-2 focus-visible:outline-primary",
|
|
49
|
+
"data-dragging:outline-2 data-dragging:outline-primary",
|
|
50
|
+
e
|
|
51
|
+
),
|
|
52
|
+
...r
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
u.displayName = "SliderThumb";
|
|
56
|
+
export {
|
|
57
|
+
n as SliderControl,
|
|
58
|
+
d as SliderIndicator,
|
|
59
|
+
i as SliderRoot,
|
|
60
|
+
u as SliderThumb,
|
|
61
|
+
s as SliderTrack,
|
|
62
|
+
t as SliderValue
|
|
63
|
+
};
|
package/dist/switch.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
import * as React_2 from 'react';
|
|
3
|
+
import { Switch } from '@base-ui/react/switch';
|
|
4
|
+
|
|
5
|
+
export declare const SwitchRoot: {
|
|
6
|
+
({ className, ...props }: SwitchRootProps): JSX.Element;
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export declare type SwitchRootProps = React_2.ComponentProps<typeof Switch.Root>;
|
|
11
|
+
|
|
12
|
+
export declare const SwitchThumb: {
|
|
13
|
+
({ className, ...props }: SwitchThumbProps): JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export declare type SwitchThumbProps = React_2.ComponentProps<typeof Switch.Thumb>;
|
|
18
|
+
|
|
19
|
+
export { }
|
package/dist/switch.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { Switch as t } from "@base-ui/react/switch";
|
|
3
|
+
import { c as e } from "./utils-B6yFEsav.js";
|
|
4
|
+
const d = ({ className: o, ...a }) => /* @__PURE__ */ r(
|
|
5
|
+
t.Root,
|
|
6
|
+
{
|
|
7
|
+
className: e(
|
|
8
|
+
"relative flex h-6 w-10 rounded-full",
|
|
9
|
+
"bg-linear-to-r from-primary from-35% to-muted to-65% bg-size-[6.5rem_100%] bg-position-[100%_0%] bg-no-repeat",
|
|
10
|
+
"p-px",
|
|
11
|
+
"shadow-[inset_0_1.5px_2px] shadow-muted-foreground/20",
|
|
12
|
+
"transition-[background-position,box-shadow] duration-125 ease-[cubic-bezier(0.26,0.75,0.38,0.45)]",
|
|
13
|
+
"data-checked:bg-position-[0%_0%]",
|
|
14
|
+
"dark:from-primary/50 dark:shadow-none",
|
|
15
|
+
o
|
|
16
|
+
),
|
|
17
|
+
...a
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
d.displayName = "SwitchRoot";
|
|
21
|
+
const i = ({ className: o, ...a }) => /* @__PURE__ */ r(
|
|
22
|
+
t.Thumb,
|
|
23
|
+
{
|
|
24
|
+
className: e(
|
|
25
|
+
"aspect-square h-full rounded-full bg-background",
|
|
26
|
+
"shadow-[0_0_1px_1px,0_1px_1px,1px_2px_4px_-1px] shadow-muted-foreground/20",
|
|
27
|
+
"transition-all duration-200",
|
|
28
|
+
"data-checked:translate-x-4",
|
|
29
|
+
"dark:shadow-black/25 dark:bg-foreground dark:data-checked:bg-background",
|
|
30
|
+
"data-disabled:opacity-100",
|
|
31
|
+
o
|
|
32
|
+
),
|
|
33
|
+
...a
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
i.displayName = "SwitchThumb";
|
|
37
|
+
export {
|
|
38
|
+
d as SwitchRoot,
|
|
39
|
+
i as SwitchThumb
|
|
40
|
+
};
|
package/dist/tabs.d.ts
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
import * as React_2 from 'react';
|
|
3
|
+
import { Tabs } from '@base-ui/react/tabs';
|
|
4
|
+
|
|
5
|
+
export declare const TabsIndicator: {
|
|
6
|
+
({ className, orientation, ...props }: TabsIndicatorProps): JSX.Element;
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export declare type TabsIndicatorProps = React_2.ComponentProps<typeof Tabs.Indicator> & {
|
|
11
|
+
/** Orientation of the indicator (should match the tabs list orientation) */
|
|
12
|
+
orientation?: 'horizontal' | 'vertical';
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export declare const TabsList: {
|
|
16
|
+
({ className, orientation, ...props }: TabsListProps): JSX.Element;
|
|
17
|
+
displayName: string;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export declare type TabsListProps = React_2.ComponentProps<typeof Tabs.List> & {
|
|
21
|
+
/** Orientation of the tabs list */
|
|
22
|
+
orientation?: 'horizontal' | 'vertical';
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export declare const TabsPanel: {
|
|
26
|
+
({ className, ...props }: TabsPanelProps): JSX.Element;
|
|
27
|
+
displayName: string;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export declare type TabsPanelProps = React_2.ComponentProps<typeof Tabs.Panel>;
|
|
31
|
+
|
|
32
|
+
export declare const TabsRoot: {
|
|
33
|
+
({ className, ...props }: TabsRootProps): JSX.Element;
|
|
34
|
+
displayName: string;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export declare type TabsRootProps = React_2.ComponentProps<typeof Tabs.Root>;
|
|
38
|
+
|
|
39
|
+
export declare const TabsTab: {
|
|
40
|
+
({ className, size, ...props }: TabsTabProps): JSX.Element;
|
|
41
|
+
displayName: string;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export declare type TabsTabProps = React_2.ComponentProps<typeof Tabs.Tab> & {
|
|
45
|
+
/** Size of the tab */
|
|
46
|
+
size?: 'sm' | 'default' | 'lg';
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export { }
|
package/dist/tabs.js
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import { Tabs as r } from "@base-ui/react/tabs";
|
|
4
|
+
import { cva as s } from "class-variance-authority";
|
|
5
|
+
import { c as i } from "./utils-B6yFEsav.js";
|
|
6
|
+
const n = ({ className: t, ...a }) => /* @__PURE__ */ o(r.Root, { className: i("flex flex-col", t), ...a });
|
|
7
|
+
n.displayName = "TabsRoot";
|
|
8
|
+
const l = s(
|
|
9
|
+
["relative inline-flex w-fit items-center gap-1", "rounded-lg bg-muted p-1"],
|
|
10
|
+
{
|
|
11
|
+
variants: {
|
|
12
|
+
orientation: {
|
|
13
|
+
horizontal: "flex-row",
|
|
14
|
+
vertical: "flex-col"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
defaultVariants: {
|
|
18
|
+
orientation: "horizontal"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
), c = ({ className: t, orientation: a = "horizontal", ...e }) => /* @__PURE__ */ o(
|
|
22
|
+
r.List,
|
|
23
|
+
{
|
|
24
|
+
className: i(l({ orientation: a }), t),
|
|
25
|
+
...e
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
c.displayName = "TabsList";
|
|
29
|
+
const d = s(
|
|
30
|
+
[
|
|
31
|
+
"relative z-10 inline-flex items-center justify-center whitespace-nowrap",
|
|
32
|
+
"rounded-md px-3 py-1.5 text-sm font-medium",
|
|
33
|
+
"transition-all duration-200",
|
|
34
|
+
"text-foreground/80",
|
|
35
|
+
"data-[active]:text-foreground",
|
|
36
|
+
"hover:text-foreground"
|
|
37
|
+
],
|
|
38
|
+
{
|
|
39
|
+
variants: {
|
|
40
|
+
size: {
|
|
41
|
+
sm: "px-2 py-1 text-xs",
|
|
42
|
+
default: "px-3 py-1.5 text-sm",
|
|
43
|
+
lg: "px-4 py-2 text-base"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
defaultVariants: {
|
|
47
|
+
size: "default"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
), m = ({ className: t, size: a, ...e }) => /* @__PURE__ */ o(r.Tab, { className: i(d({ size: a }), t), ...e });
|
|
51
|
+
m.displayName = "TabsTab";
|
|
52
|
+
const b = s(
|
|
53
|
+
["absolute rounded-md bg-background shadow-sm", "transition-all duration-200 ease-out"],
|
|
54
|
+
{
|
|
55
|
+
variants: {
|
|
56
|
+
orientation: {
|
|
57
|
+
horizontal: "bottom-1 top-1 left-[var(--active-tab-left)] w-[var(--active-tab-width)]",
|
|
58
|
+
vertical: "left-1 right-1 top-[var(--active-tab-top)] h-[var(--active-tab-height)]"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
defaultVariants: {
|
|
62
|
+
orientation: "horizontal"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
), f = ({
|
|
66
|
+
className: t,
|
|
67
|
+
orientation: a = "horizontal",
|
|
68
|
+
...e
|
|
69
|
+
}) => /* @__PURE__ */ o(
|
|
70
|
+
r.Indicator,
|
|
71
|
+
{
|
|
72
|
+
className: i(b({ orientation: a }), t),
|
|
73
|
+
...e
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
f.displayName = "TabsIndicator";
|
|
77
|
+
const u = ({ className: t, ...a }) => /* @__PURE__ */ o(r.Panel, { className: i("mt-2 ring-offset-background", t), ...a });
|
|
78
|
+
u.displayName = "TabsPanel";
|
|
79
|
+
export {
|
|
80
|
+
f as TabsIndicator,
|
|
81
|
+
c as TabsList,
|
|
82
|
+
u as TabsPanel,
|
|
83
|
+
n as TabsRoot,
|
|
84
|
+
m as TabsTab
|
|
85
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
import * as React_2 from 'react';
|
|
3
|
+
import { Toggle } from '@base-ui/react/toggle';
|
|
4
|
+
import { ToggleGroup } from '@base-ui/react/toggle-group';
|
|
5
|
+
|
|
6
|
+
declare type ControlSize = 'sm' | 'default' | 'lg' | 'icon' | 'icon-sm' | 'icon-lg';
|
|
7
|
+
|
|
8
|
+
declare type ControlVariant = 'default' | 'ghost';
|
|
9
|
+
|
|
10
|
+
export declare const ToggleGroupItem: {
|
|
11
|
+
({ className, variant, size, ...props }: ToggleGroupItemProps): JSX.Element;
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export declare type ToggleGroupItemProps = React_2.ComponentProps<typeof Toggle> & {
|
|
16
|
+
/** Visual style of the toggle item */
|
|
17
|
+
variant?: ControlVariant;
|
|
18
|
+
/** Size of the toggle item */
|
|
19
|
+
size?: ControlSize;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export declare const ToggleGroupRoot: {
|
|
23
|
+
({ className, orientation, ...props }: ToggleGroupRootProps): JSX.Element;
|
|
24
|
+
displayName: string;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export declare type ToggleGroupRootProps = React_2.ComponentProps<typeof ToggleGroup>;
|
|
28
|
+
|
|
29
|
+
export { }
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import { Toggle as u } from "@base-ui/react/toggle";
|
|
4
|
+
import { ToggleGroup as p } from "@base-ui/react/toggle-group";
|
|
5
|
+
import { c as m } from "./control-variants-Bwep4n0y.js";
|
|
6
|
+
import { c as n } from "./utils-B6yFEsav.js";
|
|
7
|
+
const f = ({ className: t, orientation: o, ...e }) => /* @__PURE__ */ r(
|
|
8
|
+
p,
|
|
9
|
+
{
|
|
10
|
+
orientation: o,
|
|
11
|
+
className: n(
|
|
12
|
+
"inline-flex",
|
|
13
|
+
o === "vertical" && "flex-col",
|
|
14
|
+
// Connected items: collapse borders, round only outer corners
|
|
15
|
+
"[&>button]:rounded-none [&>button:not(:first-of-type)]:-ml-px",
|
|
16
|
+
"[&>button:first-of-type]:rounded-l-md [&>button:last-of-type]:rounded-r-md",
|
|
17
|
+
// Vertical orientation adjustments
|
|
18
|
+
o === "vertical" && "[&>button:not(:first-of-type)]:ml-0 [&>button:not(:first-of-type)]:-mt-px [&>button:first-of-type]:rounded-bl-none [&>button:last-of-type]:rounded-r-none [&>button:first-of-type]:rounded-t-md [&>button:last-of-type]:rounded-b-md",
|
|
19
|
+
t
|
|
20
|
+
),
|
|
21
|
+
...e
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
f.displayName = "ToggleGroupRoot";
|
|
25
|
+
const s = ({
|
|
26
|
+
className: t,
|
|
27
|
+
variant: o,
|
|
28
|
+
size: e,
|
|
29
|
+
...l
|
|
30
|
+
}) => /* @__PURE__ */ r(u, { className: n(m({ variant: o, size: e }), t), ...l });
|
|
31
|
+
s.displayName = "ToggleGroupItem";
|
|
32
|
+
export {
|
|
33
|
+
s as ToggleGroupItem,
|
|
34
|
+
f as ToggleGroupRoot
|
|
35
|
+
};
|
package/dist/toggle.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
import * as React_2 from 'react';
|
|
3
|
+
import { Toggle as Toggle_2 } from '@base-ui/react/toggle';
|
|
4
|
+
|
|
5
|
+
declare type ControlSize = 'sm' | 'default' | 'lg' | 'icon' | 'icon-sm' | 'icon-lg';
|
|
6
|
+
|
|
7
|
+
declare type ControlVariant = 'default' | 'ghost';
|
|
8
|
+
|
|
9
|
+
export declare const Toggle: {
|
|
10
|
+
({ className, variant, size, ...props }: ToggleProps): JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export declare type ToggleProps = React_2.ComponentProps<typeof Toggle_2> & {
|
|
15
|
+
/** Visual style of the toggle */
|
|
16
|
+
variant?: ControlVariant;
|
|
17
|
+
/** Size of the toggle */
|
|
18
|
+
size?: ControlSize;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { }
|
package/dist/toggle.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
3
|
+
import { Toggle as t } from "@base-ui/react/toggle";
|
|
4
|
+
import { c as a } from "./control-variants-Bwep4n0y.js";
|
|
5
|
+
import { c as g } from "./utils-B6yFEsav.js";
|
|
6
|
+
const l = ({ className: o, variant: r, size: e, ...m }) => /* @__PURE__ */ s(
|
|
7
|
+
t,
|
|
8
|
+
{
|
|
9
|
+
className: g(a({ variant: r, size: e }), o),
|
|
10
|
+
...m
|
|
11
|
+
}
|
|
12
|
+
);
|
|
13
|
+
l.displayName = "Toggle";
|
|
14
|
+
export {
|
|
15
|
+
l as Toggle
|
|
16
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
import * as React_2 from 'react';
|
|
3
|
+
import { Tooltip } from '@base-ui/react/tooltip';
|
|
4
|
+
|
|
5
|
+
export declare const TooltipArrow: {
|
|
6
|
+
({ className, variant, ...props }: TooltipArrowProps): JSX.Element;
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export declare type TooltipArrowProps = React_2.ComponentProps<typeof Tooltip.Arrow> & {
|
|
11
|
+
variant?: TooltipVariant;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export declare const TooltipPopup: {
|
|
15
|
+
({ className, variant, ...props }: TooltipPopupProps): JSX.Element;
|
|
16
|
+
displayName: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export declare type TooltipPopupProps = React_2.ComponentProps<typeof Tooltip.Popup> & {
|
|
20
|
+
variant?: TooltipVariant;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export declare const TooltipPortal: {
|
|
24
|
+
(props: TooltipPortalProps): JSX.Element;
|
|
25
|
+
displayName: string;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export declare type TooltipPortalProps = React_2.ComponentProps<typeof Tooltip.Portal>;
|
|
29
|
+
|
|
30
|
+
export declare const TooltipPositioner: {
|
|
31
|
+
({ className, ...props }: TooltipPositionerProps): JSX.Element;
|
|
32
|
+
displayName: string;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export declare type TooltipPositionerProps = React_2.ComponentProps<typeof Tooltip.Positioner>;
|
|
36
|
+
|
|
37
|
+
export declare const TooltipProvider: {
|
|
38
|
+
(props: TooltipProviderProps): JSX.Element;
|
|
39
|
+
displayName: string;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export declare type TooltipProviderProps = React_2.ComponentProps<typeof Tooltip.Provider>;
|
|
43
|
+
|
|
44
|
+
export declare const TooltipRoot: {
|
|
45
|
+
({ variant, ...props }: TooltipRootProps): JSX.Element;
|
|
46
|
+
displayName: string;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export declare type TooltipRootProps = React_2.ComponentProps<typeof Tooltip.Root> & {
|
|
50
|
+
variant?: TooltipVariant;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export declare const TooltipTrigger: {
|
|
54
|
+
({ className, ...props }: TooltipTriggerProps): JSX.Element;
|
|
55
|
+
displayName: string;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export declare type TooltipTriggerProps = React_2.ComponentProps<typeof Tooltip.Trigger>;
|
|
59
|
+
|
|
60
|
+
declare type TooltipVariant = 'default' | 'secondary' | 'outline';
|
|
61
|
+
|
|
62
|
+
export { }
|
package/dist/tooltip.js
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import { Tooltip as a } from "@base-ui/react/tooltip";
|
|
4
|
+
import * as l from "react";
|
|
5
|
+
import { A as c } from "./arrow-svg-C6zQTvgS.js";
|
|
6
|
+
import { cva as f } from "class-variance-authority";
|
|
7
|
+
import { c as e } from "./utils-B6yFEsav.js";
|
|
8
|
+
const u = f(
|
|
9
|
+
[
|
|
10
|
+
"rounded-md px-2 py-1 text-sm",
|
|
11
|
+
"origin-(--transform-origin)",
|
|
12
|
+
"transition-[transform,scale,opacity]",
|
|
13
|
+
"data-starting-style:scale-90 data-starting-style:opacity-0",
|
|
14
|
+
"data-ending-style:scale-90 data-ending-style:opacity-0",
|
|
15
|
+
"data-instant:duration-0"
|
|
16
|
+
],
|
|
17
|
+
{
|
|
18
|
+
variants: {
|
|
19
|
+
variant: {
|
|
20
|
+
default: "bg-foreground text-background",
|
|
21
|
+
secondary: "bg-secondary text-secondary-foreground",
|
|
22
|
+
outline: "bg-background text-foreground border border-border shadow-xs"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
defaultVariants: {
|
|
26
|
+
variant: "default"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
), m = {
|
|
30
|
+
default: {
|
|
31
|
+
fill: "fill-foreground",
|
|
32
|
+
stroke: "fill-foreground"
|
|
33
|
+
},
|
|
34
|
+
secondary: {
|
|
35
|
+
fill: "fill-secondary",
|
|
36
|
+
stroke: "fill-secondary"
|
|
37
|
+
},
|
|
38
|
+
outline: {
|
|
39
|
+
fill: "fill-background",
|
|
40
|
+
stroke: "fill-border"
|
|
41
|
+
}
|
|
42
|
+
}, n = l.createContext("default"), g = (t) => /* @__PURE__ */ r(a.Provider, { ...t });
|
|
43
|
+
g.displayName = "TooltipProvider";
|
|
44
|
+
const y = ({ variant: t = "default", ...o }) => /* @__PURE__ */ r(n.Provider, { value: t, children: /* @__PURE__ */ r(a.Root, { ...o }) });
|
|
45
|
+
y.displayName = "TooltipRoot";
|
|
46
|
+
const x = ({ className: t, ...o }) => /* @__PURE__ */ r(a.Trigger, { className: e(t), delay: 200, ...o });
|
|
47
|
+
x.displayName = "TooltipTrigger";
|
|
48
|
+
const T = (t) => /* @__PURE__ */ r(a.Portal, { ...t });
|
|
49
|
+
T.displayName = "TooltipPortal";
|
|
50
|
+
const v = ({ className: t, ...o }) => /* @__PURE__ */ r(
|
|
51
|
+
a.Positioner,
|
|
52
|
+
{
|
|
53
|
+
className: e("z-50 outline-none", t),
|
|
54
|
+
sideOffset: 8,
|
|
55
|
+
...o
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
v.displayName = "TooltipPositioner";
|
|
59
|
+
const P = ({ className: t, variant: o, ...i }) => {
|
|
60
|
+
const s = l.useContext(n), d = o ?? s;
|
|
61
|
+
return /* @__PURE__ */ r(
|
|
62
|
+
a.Popup,
|
|
63
|
+
{
|
|
64
|
+
className: e(u({ variant: d }), t),
|
|
65
|
+
...i
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
};
|
|
69
|
+
P.displayName = "TooltipPopup";
|
|
70
|
+
const N = ({ className: t, variant: o, ...i }) => {
|
|
71
|
+
const s = l.useContext(n), p = m[o ?? s];
|
|
72
|
+
return /* @__PURE__ */ r(
|
|
73
|
+
a.Arrow,
|
|
74
|
+
{
|
|
75
|
+
className: e(
|
|
76
|
+
"flex data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180",
|
|
77
|
+
t
|
|
78
|
+
),
|
|
79
|
+
...i,
|
|
80
|
+
children: /* @__PURE__ */ r(c, { fillClassName: p.fill, strokeClassName: p.stroke })
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
};
|
|
84
|
+
N.displayName = "TooltipArrow";
|
|
85
|
+
export {
|
|
86
|
+
N as TooltipArrow,
|
|
87
|
+
P as TooltipPopup,
|
|
88
|
+
T as TooltipPortal,
|
|
89
|
+
v as TooltipPositioner,
|
|
90
|
+
g as TooltipProvider,
|
|
91
|
+
y as TooltipRoot,
|
|
92
|
+
x as TooltipTrigger
|
|
93
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lglab/compose-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.0",
|
|
4
4
|
"description": "A collection of components built with Base UI & Tailwind CSS",
|
|
5
5
|
"author": "LGLab",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,13 +19,101 @@
|
|
|
19
19
|
],
|
|
20
20
|
"type": "module",
|
|
21
21
|
"types": "./dist/index.d.ts",
|
|
22
|
-
"main": "./dist/index.
|
|
23
|
-
"module": "./dist/index.
|
|
22
|
+
"main": "./dist/index.js",
|
|
23
|
+
"module": "./dist/index.js",
|
|
24
24
|
"exports": {
|
|
25
25
|
".": {
|
|
26
|
-
"import": "./dist/index.
|
|
26
|
+
"import": "./dist/index.js",
|
|
27
27
|
"types": "./dist/index.d.ts"
|
|
28
28
|
},
|
|
29
|
+
"./accordion": {
|
|
30
|
+
"import": "./dist/accordion.js",
|
|
31
|
+
"types": "./dist/accordion.d.ts"
|
|
32
|
+
},
|
|
33
|
+
"./alert-dialog": {
|
|
34
|
+
"import": "./dist/alert-dialog.js",
|
|
35
|
+
"types": "./dist/alert-dialog.d.ts"
|
|
36
|
+
},
|
|
37
|
+
"./avatar": {
|
|
38
|
+
"import": "./dist/avatar.js",
|
|
39
|
+
"types": "./dist/avatar.d.ts"
|
|
40
|
+
},
|
|
41
|
+
"./button": {
|
|
42
|
+
"import": "./dist/button.js",
|
|
43
|
+
"types": "./dist/button.d.ts"
|
|
44
|
+
},
|
|
45
|
+
"./card": {
|
|
46
|
+
"import": "./dist/card.js",
|
|
47
|
+
"types": "./dist/card.d.ts"
|
|
48
|
+
},
|
|
49
|
+
"./collapsible": {
|
|
50
|
+
"import": "./dist/collapsible.js",
|
|
51
|
+
"types": "./dist/collapsible.d.ts"
|
|
52
|
+
},
|
|
53
|
+
"./context-menu": {
|
|
54
|
+
"import": "./dist/context-menu.js",
|
|
55
|
+
"types": "./dist/context-menu.d.ts"
|
|
56
|
+
},
|
|
57
|
+
"./dialog": {
|
|
58
|
+
"import": "./dist/dialog.js",
|
|
59
|
+
"types": "./dist/dialog.d.ts"
|
|
60
|
+
},
|
|
61
|
+
"./drawer": {
|
|
62
|
+
"import": "./dist/drawer.js",
|
|
63
|
+
"types": "./dist/drawer.d.ts"
|
|
64
|
+
},
|
|
65
|
+
"./menu": {
|
|
66
|
+
"import": "./dist/menu.js",
|
|
67
|
+
"types": "./dist/menu.d.ts"
|
|
68
|
+
},
|
|
69
|
+
"./menubar": {
|
|
70
|
+
"import": "./dist/menubar.js",
|
|
71
|
+
"types": "./dist/menubar.d.ts"
|
|
72
|
+
},
|
|
73
|
+
"./meter": {
|
|
74
|
+
"import": "./dist/meter.js",
|
|
75
|
+
"types": "./dist/meter.d.ts"
|
|
76
|
+
},
|
|
77
|
+
"./popover": {
|
|
78
|
+
"import": "./dist/popover.js",
|
|
79
|
+
"types": "./dist/popover.d.ts"
|
|
80
|
+
},
|
|
81
|
+
"./progress": {
|
|
82
|
+
"import": "./dist/progress.js",
|
|
83
|
+
"types": "./dist/progress.d.ts"
|
|
84
|
+
},
|
|
85
|
+
"./scroll-area": {
|
|
86
|
+
"import": "./dist/scroll-area.js",
|
|
87
|
+
"types": "./dist/scroll-area.d.ts"
|
|
88
|
+
},
|
|
89
|
+
"./separator": {
|
|
90
|
+
"import": "./dist/separator.js",
|
|
91
|
+
"types": "./dist/separator.d.ts"
|
|
92
|
+
},
|
|
93
|
+
"./slider": {
|
|
94
|
+
"import": "./dist/slider.js",
|
|
95
|
+
"types": "./dist/slider.d.ts"
|
|
96
|
+
},
|
|
97
|
+
"./switch": {
|
|
98
|
+
"import": "./dist/switch.js",
|
|
99
|
+
"types": "./dist/switch.d.ts"
|
|
100
|
+
},
|
|
101
|
+
"./tabs": {
|
|
102
|
+
"import": "./dist/tabs.js",
|
|
103
|
+
"types": "./dist/tabs.d.ts"
|
|
104
|
+
},
|
|
105
|
+
"./toggle": {
|
|
106
|
+
"import": "./dist/toggle.js",
|
|
107
|
+
"types": "./dist/toggle.d.ts"
|
|
108
|
+
},
|
|
109
|
+
"./toggle-group": {
|
|
110
|
+
"import": "./dist/toggle-group.js",
|
|
111
|
+
"types": "./dist/toggle-group.d.ts"
|
|
112
|
+
},
|
|
113
|
+
"./tooltip": {
|
|
114
|
+
"import": "./dist/tooltip.js",
|
|
115
|
+
"types": "./dist/tooltip.d.ts"
|
|
116
|
+
},
|
|
29
117
|
"./styles/*": "./dist/styles/*"
|
|
30
118
|
},
|
|
31
119
|
"files": [
|