@zimyo/ui 1.0.1 → 1.0.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/index.d.ts +1 -0
- package/dist/components/ui/accordion.d.ts +5 -4
- package/dist/components/ui/accordion.js +21 -16
- package/dist/components/ui/alert-dialog.d.ts +12 -11
- package/dist/components/ui/alert-dialog.js +17 -16
- package/dist/components/ui/alert.d.ts +4 -3
- package/dist/components/ui/alert.js +4 -5
- package/dist/components/ui/aspect-ratio.d.ts +2 -2
- package/dist/components/ui/aspect-ratio.js +2 -2
- package/dist/components/ui/avatar.d.ts +4 -3
- package/dist/components/ui/avatar.js +4 -5
- package/dist/components/ui/badge.d.ts +3 -2
- package/dist/components/ui/badge.js +2 -3
- package/dist/components/ui/breadcrumb.d.ts +8 -7
- package/dist/components/ui/breadcrumb.js +19 -15
- package/dist/components/ui/button.d.ts +3 -2
- package/dist/components/ui/button.js +2 -3
- package/dist/components/ui/calendar.d.ts +3 -2
- package/dist/components/ui/calendar.js +13 -10
- package/dist/components/ui/card.d.ts +8 -7
- package/dist/components/ui/card.js +8 -9
- package/dist/components/ui/carousel.d.ts +6 -5
- package/dist/components/ui/carousel.js +34 -24
- package/dist/components/ui/chart.d.ts +5 -4
- package/dist/components/ui/chart.js +81 -65
- package/dist/components/ui/checkbox.d.ts +2 -1
- package/dist/components/ui/checkbox.js +11 -9
- package/dist/components/ui/collapsible.d.ts +4 -4
- package/dist/components/ui/collapsible.js +4 -4
- package/dist/components/ui/command.d.ts +10 -9
- package/dist/components/ui/command.js +34 -25
- package/dist/components/ui/context-menu.d.ts +16 -15
- package/dist/components/ui/context-menu.js +45 -32
- package/dist/components/ui/dialog.d.ts +11 -10
- package/dist/components/ui/dialog.js +26 -22
- package/dist/components/ui/drawer.d.ts +11 -10
- package/dist/components/ui/drawer.js +21 -19
- package/dist/components/ui/dropdown-menu.d.ts +16 -15
- package/dist/components/ui/dropdown-menu.js +46 -33
- package/dist/components/ui/form.d.ts +7 -6
- package/dist/components/ui/form.js +19 -15
- package/dist/components/ui/hover-card.d.ts +4 -3
- package/dist/components/ui/hover-card.js +12 -12
- package/dist/components/ui/input-otp.d.ts +5 -4
- package/dist/components/ui/input-otp.js +16 -11
- package/dist/components/ui/input.d.ts +2 -1
- package/dist/components/ui/input.js +2 -3
- package/dist/components/ui/label.d.ts +2 -1
- package/dist/components/ui/label.js +2 -3
- package/dist/components/ui/menubar.d.ts +17 -16
- package/dist/components/ui/menubar.js +49 -36
- package/dist/components/ui/navigation-menu.d.ts +9 -8
- package/dist/components/ui/navigation-menu.js +27 -21
- package/dist/components/ui/pagination.d.ts +8 -7
- package/dist/components/ui/pagination.js +28 -20
- package/dist/components/ui/popover.d.ts +5 -4
- package/dist/components/ui/popover.js +12 -11
- package/dist/components/ui/progress.d.ts +2 -1
- package/dist/components/ui/progress.js +11 -10
- package/dist/components/ui/radio-group.d.ts +3 -2
- package/dist/components/ui/radio-group.js +12 -10
- package/dist/components/ui/resizable.d.ts +4 -3
- package/dist/components/ui/resizable.js +12 -10
- package/dist/components/ui/scroll-area.d.ts +3 -2
- package/dist/components/ui/scroll-area.js +15 -11
- package/dist/components/ui/select.d.ts +11 -10
- package/dist/components/ui/select.js +50 -32
- package/dist/components/ui/separator.d.ts +2 -1
- package/dist/components/ui/separator.js +2 -3
- package/dist/components/ui/sheet.d.ts +9 -8
- package/dist/components/ui/sheet.js +26 -21
- package/dist/components/ui/sidebar.d.ts +24 -23
- package/dist/components/ui/sidebar.js +112 -85
- package/dist/components/ui/skeleton.d.ts +2 -2
- package/dist/components/ui/skeleton.js +2 -2
- package/dist/components/ui/slider.d.ts +2 -1
- package/dist/components/ui/slider.js +17 -15
- package/dist/components/ui/sonner.d.ts +2 -2
- package/dist/components/ui/sonner.js +2 -2
- package/dist/components/ui/switch.d.ts +2 -1
- package/dist/components/ui/switch.js +7 -6
- package/dist/components/ui/table.d.ts +9 -8
- package/dist/components/ui/table.js +15 -15
- package/dist/components/ui/tabs.d.ts +5 -4
- package/dist/components/ui/tabs.js +5 -6
- package/dist/components/ui/textarea.d.ts +2 -1
- package/dist/components/ui/textarea.js +2 -3
- package/dist/components/ui/toggle-group.d.ts +3 -2
- package/dist/components/ui/toggle-group.js +15 -10
- package/dist/components/ui/toggle.d.ts +2 -1
- package/dist/components/ui/toggle.js +2 -3
- package/dist/components/ui/tooltip.d.ts +5 -4
- package/dist/components/ui/tooltip.js +19 -14
- package/dist/index.d.ts +3 -1
- package/dist/index.js +1 -0
- package/dist/providers/ThemeProvider.d.ts +12 -0
- package/dist/providers/ThemeProvider.js +27 -0
- package/dist/providers/index.d.ts +3 -0
- package/dist/styles.css +1 -1
- package/package.json +5 -1
- package/dist/_virtual/_rollupPluginBabelHelpers.js +0 -11
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
|
|
3
|
-
declare function Table({ className, ...props }: React.ComponentProps<"table">):
|
|
4
|
-
declare function TableHeader({ className, ...props }: React.ComponentProps<"thead">):
|
|
5
|
-
declare function TableBody({ className, ...props }: React.ComponentProps<"tbody">):
|
|
6
|
-
declare function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">):
|
|
7
|
-
declare function TableRow({ className, ...props }: React.ComponentProps<"tr">):
|
|
8
|
-
declare function TableHead({ className, ...props }: React.ComponentProps<"th">):
|
|
9
|
-
declare function TableCell({ className, ...props }: React.ComponentProps<"td">):
|
|
10
|
-
declare function TableCaption({ className, ...props }: React.ComponentProps<"caption">):
|
|
4
|
+
declare function Table({ className, ...props }: React.ComponentProps<"table">): react_jsx_runtime.JSX.Element;
|
|
5
|
+
declare function TableHeader({ className, ...props }: React.ComponentProps<"thead">): react_jsx_runtime.JSX.Element;
|
|
6
|
+
declare function TableBody({ className, ...props }: React.ComponentProps<"tbody">): react_jsx_runtime.JSX.Element;
|
|
7
|
+
declare function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">): react_jsx_runtime.JSX.Element;
|
|
8
|
+
declare function TableRow({ className, ...props }: React.ComponentProps<"tr">): react_jsx_runtime.JSX.Element;
|
|
9
|
+
declare function TableHead({ className, ...props }: React.ComponentProps<"th">): react_jsx_runtime.JSX.Element;
|
|
10
|
+
declare function TableCell({ className, ...props }: React.ComponentProps<"td">): react_jsx_runtime.JSX.Element;
|
|
11
|
+
declare function TableCaption({ className, ...props }: React.ComponentProps<"caption">): react_jsx_runtime.JSX.Element;
|
|
11
12
|
|
|
12
13
|
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
1
|
import { __rest } from '../../node_modules/tslib/tslib.es6.js';
|
|
3
|
-
import
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
3
|
import { cn } from '../../lib/utils.js';
|
|
5
4
|
|
|
6
5
|
function Table(_a) {
|
|
@@ -8,20 +7,21 @@ function Table(_a) {
|
|
|
8
7
|
className
|
|
9
8
|
} = _a,
|
|
10
9
|
props = __rest(_a, ["className"]);
|
|
11
|
-
return
|
|
10
|
+
return jsx("div", {
|
|
12
11
|
"data-slot": "table-container",
|
|
13
|
-
className: "relative w-full overflow-x-auto"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
className: "relative w-full overflow-x-auto",
|
|
13
|
+
children: jsx("table", Object.assign({
|
|
14
|
+
"data-slot": "table",
|
|
15
|
+
className: cn("w-full caption-bottom text-sm", className)
|
|
16
|
+
}, props))
|
|
17
|
+
});
|
|
18
18
|
}
|
|
19
19
|
function TableHeader(_a) {
|
|
20
20
|
var {
|
|
21
21
|
className
|
|
22
22
|
} = _a,
|
|
23
23
|
props = __rest(_a, ["className"]);
|
|
24
|
-
return
|
|
24
|
+
return jsx("thead", Object.assign({
|
|
25
25
|
"data-slot": "table-header",
|
|
26
26
|
className: cn("[&_tr]:border-b", className)
|
|
27
27
|
}, props));
|
|
@@ -31,7 +31,7 @@ function TableBody(_a) {
|
|
|
31
31
|
className
|
|
32
32
|
} = _a,
|
|
33
33
|
props = __rest(_a, ["className"]);
|
|
34
|
-
return
|
|
34
|
+
return jsx("tbody", Object.assign({
|
|
35
35
|
"data-slot": "table-body",
|
|
36
36
|
className: cn("[&_tr:last-child]:border-0", className)
|
|
37
37
|
}, props));
|
|
@@ -41,7 +41,7 @@ function TableFooter(_a) {
|
|
|
41
41
|
className
|
|
42
42
|
} = _a,
|
|
43
43
|
props = __rest(_a, ["className"]);
|
|
44
|
-
return
|
|
44
|
+
return jsx("tfoot", Object.assign({
|
|
45
45
|
"data-slot": "table-footer",
|
|
46
46
|
className: cn("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0", className)
|
|
47
47
|
}, props));
|
|
@@ -51,7 +51,7 @@ function TableRow(_a) {
|
|
|
51
51
|
className
|
|
52
52
|
} = _a,
|
|
53
53
|
props = __rest(_a, ["className"]);
|
|
54
|
-
return
|
|
54
|
+
return jsx("tr", Object.assign({
|
|
55
55
|
"data-slot": "table-row",
|
|
56
56
|
className: cn("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors", className)
|
|
57
57
|
}, props));
|
|
@@ -61,7 +61,7 @@ function TableHead(_a) {
|
|
|
61
61
|
className
|
|
62
62
|
} = _a,
|
|
63
63
|
props = __rest(_a, ["className"]);
|
|
64
|
-
return
|
|
64
|
+
return jsx("th", Object.assign({
|
|
65
65
|
"data-slot": "table-head",
|
|
66
66
|
className: cn("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className)
|
|
67
67
|
}, props));
|
|
@@ -71,7 +71,7 @@ function TableCell(_a) {
|
|
|
71
71
|
className
|
|
72
72
|
} = _a,
|
|
73
73
|
props = __rest(_a, ["className"]);
|
|
74
|
-
return
|
|
74
|
+
return jsx("td", Object.assign({
|
|
75
75
|
"data-slot": "table-cell",
|
|
76
76
|
className: cn("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className)
|
|
77
77
|
}, props));
|
|
@@ -81,7 +81,7 @@ function TableCaption(_a) {
|
|
|
81
81
|
className
|
|
82
82
|
} = _a,
|
|
83
83
|
props = __rest(_a, ["className"]);
|
|
84
|
-
return
|
|
84
|
+
return jsx("caption", Object.assign({
|
|
85
85
|
"data-slot": "table-caption",
|
|
86
86
|
className: cn("text-muted-foreground mt-4 text-sm", className)
|
|
87
87
|
}, props));
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
1
2
|
import { Tabs as Tabs$1 } from 'radix-ui';
|
|
2
3
|
import * as React from 'react';
|
|
3
4
|
|
|
4
|
-
declare function Tabs({ className, ...props }: React.ComponentProps<typeof Tabs$1.Root>):
|
|
5
|
-
declare function TabsList({ className, ...props }: React.ComponentProps<typeof Tabs$1.List>):
|
|
6
|
-
declare function TabsTrigger({ className, ...props }: React.ComponentProps<typeof Tabs$1.Trigger>):
|
|
7
|
-
declare function TabsContent({ className, ...props }: React.ComponentProps<typeof Tabs$1.Content>):
|
|
5
|
+
declare function Tabs({ className, ...props }: React.ComponentProps<typeof Tabs$1.Root>): react_jsx_runtime.JSX.Element;
|
|
6
|
+
declare function TabsList({ className, ...props }: React.ComponentProps<typeof Tabs$1.List>): react_jsx_runtime.JSX.Element;
|
|
7
|
+
declare function TabsTrigger({ className, ...props }: React.ComponentProps<typeof Tabs$1.Trigger>): react_jsx_runtime.JSX.Element;
|
|
8
|
+
declare function TabsContent({ className, ...props }: React.ComponentProps<typeof Tabs$1.Content>): react_jsx_runtime.JSX.Element;
|
|
8
9
|
|
|
9
10
|
export { Tabs, TabsContent, TabsList, TabsTrigger };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
1
|
import { __rest } from '../../node_modules/tslib/tslib.es6.js';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { Tabs as Tabs$1 } from 'radix-ui';
|
|
4
|
-
import * as React from 'react';
|
|
5
4
|
import { cn } from '../../lib/utils.js';
|
|
6
5
|
|
|
7
6
|
function Tabs(_a) {
|
|
@@ -9,7 +8,7 @@ function Tabs(_a) {
|
|
|
9
8
|
className
|
|
10
9
|
} = _a,
|
|
11
10
|
props = __rest(_a, ["className"]);
|
|
12
|
-
return
|
|
11
|
+
return jsx(Tabs$1.Root, Object.assign({
|
|
13
12
|
"data-slot": "tabs",
|
|
14
13
|
className: cn("flex flex-col gap-2", className)
|
|
15
14
|
}, props));
|
|
@@ -19,7 +18,7 @@ function TabsList(_a) {
|
|
|
19
18
|
className
|
|
20
19
|
} = _a,
|
|
21
20
|
props = __rest(_a, ["className"]);
|
|
22
|
-
return
|
|
21
|
+
return jsx(Tabs$1.List, Object.assign({
|
|
23
22
|
"data-slot": "tabs-list",
|
|
24
23
|
className: cn("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]", className)
|
|
25
24
|
}, props));
|
|
@@ -29,7 +28,7 @@ function TabsTrigger(_a) {
|
|
|
29
28
|
className
|
|
30
29
|
} = _a,
|
|
31
30
|
props = __rest(_a, ["className"]);
|
|
32
|
-
return
|
|
31
|
+
return jsx(Tabs$1.Trigger, Object.assign({
|
|
33
32
|
"data-slot": "tabs-trigger",
|
|
34
33
|
className: cn("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className)
|
|
35
34
|
}, props));
|
|
@@ -39,7 +38,7 @@ function TabsContent(_a) {
|
|
|
39
38
|
className
|
|
40
39
|
} = _a,
|
|
41
40
|
props = __rest(_a, ["className"]);
|
|
42
|
-
return
|
|
41
|
+
return jsx(Tabs$1.Content, Object.assign({
|
|
43
42
|
"data-slot": "tabs-content",
|
|
44
43
|
className: cn("flex-1 outline-none", className)
|
|
45
44
|
}, props));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
|
|
3
|
-
declare function Textarea({ className, ...props }: React.ComponentProps<"textarea">):
|
|
4
|
+
declare function Textarea({ className, ...props }: React.ComponentProps<"textarea">): react_jsx_runtime.JSX.Element;
|
|
4
5
|
|
|
5
6
|
export { Textarea };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
1
|
import { __rest } from '../../node_modules/tslib/tslib.es6.js';
|
|
3
|
-
import
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
3
|
import { cn } from '../../lib/utils.js';
|
|
5
4
|
|
|
6
5
|
function Textarea(_a) {
|
|
@@ -8,7 +7,7 @@ function Textarea(_a) {
|
|
|
8
7
|
className
|
|
9
8
|
} = _a,
|
|
10
9
|
props = __rest(_a, ["className"]);
|
|
11
|
-
return
|
|
10
|
+
return jsx("textarea", Object.assign({
|
|
12
11
|
"data-slot": "textarea",
|
|
13
12
|
className: cn("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", className)
|
|
14
13
|
}, props));
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
1
2
|
import { VariantProps } from 'class-variance-authority';
|
|
2
3
|
import { ToggleGroup as ToggleGroup$1 } from 'radix-ui';
|
|
3
4
|
import * as React from 'react';
|
|
4
5
|
import { toggleVariants } from './toggle.js';
|
|
5
6
|
import 'class-variance-authority/dist/types';
|
|
6
7
|
|
|
7
|
-
declare function ToggleGroup({ className, variant, size, children, ...props }: React.ComponentProps<typeof ToggleGroup$1.Root> & VariantProps<typeof toggleVariants>):
|
|
8
|
-
declare function ToggleGroupItem({ className, children, variant, size, ...props }: React.ComponentProps<typeof ToggleGroup$1.Item> & VariantProps<typeof toggleVariants>):
|
|
8
|
+
declare function ToggleGroup({ className, variant, size, children, ...props }: React.ComponentProps<typeof ToggleGroup$1.Root> & VariantProps<typeof toggleVariants>): react_jsx_runtime.JSX.Element;
|
|
9
|
+
declare function ToggleGroupItem({ className, children, variant, size, ...props }: React.ComponentProps<typeof ToggleGroup$1.Item> & VariantProps<typeof toggleVariants>): react_jsx_runtime.JSX.Element;
|
|
9
10
|
|
|
10
11
|
export { ToggleGroup, ToggleGroupItem };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
1
|
import { __rest } from '../../node_modules/tslib/tslib.es6.js';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { ToggleGroup as ToggleGroup$1 } from 'radix-ui';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { toggleVariants } from './toggle.js';
|
|
@@ -17,17 +17,20 @@ function ToggleGroup(_a) {
|
|
|
17
17
|
children
|
|
18
18
|
} = _a,
|
|
19
19
|
props = __rest(_a, ["className", "variant", "size", "children"]);
|
|
20
|
-
return
|
|
20
|
+
return jsx(ToggleGroup$1.Root, Object.assign({
|
|
21
21
|
"data-slot": "toggle-group",
|
|
22
22
|
"data-variant": variant,
|
|
23
23
|
"data-size": size,
|
|
24
24
|
className: cn("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs", className)
|
|
25
|
-
}, props
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
}, props, {
|
|
26
|
+
children: jsx(ToggleGroupContext.Provider, {
|
|
27
|
+
value: {
|
|
28
|
+
variant,
|
|
29
|
+
size
|
|
30
|
+
},
|
|
31
|
+
children: children
|
|
32
|
+
})
|
|
33
|
+
}));
|
|
31
34
|
}
|
|
32
35
|
function ToggleGroupItem(_a) {
|
|
33
36
|
var {
|
|
@@ -38,7 +41,7 @@ function ToggleGroupItem(_a) {
|
|
|
38
41
|
} = _a,
|
|
39
42
|
props = __rest(_a, ["className", "children", "variant", "size"]);
|
|
40
43
|
const context = React.useContext(ToggleGroupContext);
|
|
41
|
-
return
|
|
44
|
+
return jsx(ToggleGroup$1.Item, Object.assign({
|
|
42
45
|
"data-slot": "toggle-group-item",
|
|
43
46
|
"data-variant": context.variant || variant,
|
|
44
47
|
"data-size": context.size || size,
|
|
@@ -46,7 +49,9 @@ function ToggleGroupItem(_a) {
|
|
|
46
49
|
variant: context.variant || variant,
|
|
47
50
|
size: context.size || size
|
|
48
51
|
}), "min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l", className)
|
|
49
|
-
}, props
|
|
52
|
+
}, props, {
|
|
53
|
+
children: children
|
|
54
|
+
}));
|
|
50
55
|
}
|
|
51
56
|
|
|
52
57
|
export { ToggleGroup, ToggleGroupItem };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
1
2
|
import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
|
|
2
3
|
import { VariantProps } from 'class-variance-authority';
|
|
3
4
|
import { Toggle as Toggle$1 } from 'radix-ui';
|
|
@@ -7,6 +8,6 @@ declare const toggleVariants: (props?: ({
|
|
|
7
8
|
variant?: "default" | "outline" | null | undefined;
|
|
8
9
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
9
10
|
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
10
|
-
declare function Toggle({ className, variant, size, ...props }: React.ComponentProps<typeof Toggle$1.Root> & VariantProps<typeof toggleVariants>):
|
|
11
|
+
declare function Toggle({ className, variant, size, ...props }: React.ComponentProps<typeof Toggle$1.Root> & VariantProps<typeof toggleVariants>): react_jsx_runtime.JSX.Element;
|
|
11
12
|
|
|
12
13
|
export { Toggle, toggleVariants };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
1
|
import { __rest } from '../../node_modules/tslib/tslib.es6.js';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { cva } from '../../node_modules/class-variance-authority/dist/index.js';
|
|
4
4
|
import { Toggle as Toggle$1 } from 'radix-ui';
|
|
5
|
-
import * as React from 'react';
|
|
6
5
|
import { cn } from '../../lib/utils.js';
|
|
7
6
|
|
|
8
7
|
const toggleVariants = cva("hover:bg-muted hover:text-muted-foreground data-[state=on]:bg-accent data-[state=on]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
@@ -29,7 +28,7 @@ function Toggle(_a) {
|
|
|
29
28
|
size
|
|
30
29
|
} = _a,
|
|
31
30
|
props = __rest(_a, ["className", "variant", "size"]);
|
|
32
|
-
return
|
|
31
|
+
return jsx(Toggle$1.Root, Object.assign({
|
|
33
32
|
"data-slot": "toggle",
|
|
34
33
|
className: cn(toggleVariants({
|
|
35
34
|
variant,
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
1
2
|
import { Tooltip as Tooltip$1 } from 'radix-ui';
|
|
2
3
|
import * as React from 'react';
|
|
3
4
|
|
|
4
|
-
declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof Tooltip$1.Provider>):
|
|
5
|
-
declare function Tooltip({ ...props }: React.ComponentProps<typeof Tooltip$1.Root>):
|
|
6
|
-
declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof Tooltip$1.Trigger>):
|
|
7
|
-
declare function TooltipContent({ className, sideOffset, children, ...props }: React.ComponentProps<typeof Tooltip$1.Content>):
|
|
5
|
+
declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof Tooltip$1.Provider>): react_jsx_runtime.JSX.Element;
|
|
6
|
+
declare function Tooltip({ ...props }: React.ComponentProps<typeof Tooltip$1.Root>): react_jsx_runtime.JSX.Element;
|
|
7
|
+
declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof Tooltip$1.Trigger>): react_jsx_runtime.JSX.Element;
|
|
8
|
+
declare function TooltipContent({ className, sideOffset, children, ...props }: React.ComponentProps<typeof Tooltip$1.Content>): react_jsx_runtime.JSX.Element;
|
|
8
9
|
|
|
9
10
|
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
1
|
import { __rest } from '../../node_modules/tslib/tslib.es6.js';
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { Tooltip as Tooltip$1 } from 'radix-ui';
|
|
4
|
-
import * as React from 'react';
|
|
5
4
|
import { cn } from '../../lib/utils.js';
|
|
6
5
|
|
|
7
6
|
function TooltipProvider(_a) {
|
|
@@ -9,20 +8,22 @@ function TooltipProvider(_a) {
|
|
|
9
8
|
delayDuration = 0
|
|
10
9
|
} = _a,
|
|
11
10
|
props = __rest(_a, ["delayDuration"]);
|
|
12
|
-
return
|
|
11
|
+
return jsx(Tooltip$1.Provider, Object.assign({
|
|
13
12
|
"data-slot": "tooltip-provider",
|
|
14
13
|
delayDuration: delayDuration
|
|
15
14
|
}, props));
|
|
16
15
|
}
|
|
17
16
|
function Tooltip(_a) {
|
|
18
17
|
var props = __rest(_a, []);
|
|
19
|
-
return
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
return jsx(TooltipProvider, {
|
|
19
|
+
children: jsx(Tooltip$1.Root, Object.assign({
|
|
20
|
+
"data-slot": "tooltip"
|
|
21
|
+
}, props))
|
|
22
|
+
});
|
|
22
23
|
}
|
|
23
24
|
function TooltipTrigger(_a) {
|
|
24
25
|
var props = __rest(_a, []);
|
|
25
|
-
return
|
|
26
|
+
return jsx(Tooltip$1.Trigger, Object.assign({
|
|
26
27
|
"data-slot": "tooltip-trigger"
|
|
27
28
|
}, props));
|
|
28
29
|
}
|
|
@@ -33,13 +34,17 @@ function TooltipContent(_a) {
|
|
|
33
34
|
children
|
|
34
35
|
} = _a,
|
|
35
36
|
props = __rest(_a, ["className", "sideOffset", "children"]);
|
|
36
|
-
return
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
return jsx(Tooltip$1.Portal, {
|
|
38
|
+
children: jsxs(Tooltip$1.Content, Object.assign({
|
|
39
|
+
"data-slot": "tooltip-content",
|
|
40
|
+
sideOffset: sideOffset,
|
|
41
|
+
className: cn("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance", className)
|
|
42
|
+
}, props, {
|
|
43
|
+
children: [children, jsx(Tooltip$1.Arrow, {
|
|
44
|
+
className: "bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"
|
|
45
|
+
})]
|
|
46
|
+
}))
|
|
47
|
+
});
|
|
43
48
|
}
|
|
44
49
|
|
|
45
50
|
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { SECONDARY_COLOR, ThemeProvider } from './providers/ThemeProvider.js';
|
|
1
2
|
export { Button, buttonVariants } from './components/ui/button.js';
|
|
2
3
|
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from './components/ui/accordion.js';
|
|
3
4
|
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger } from './components/ui/alert-dialog.js';
|
|
@@ -45,9 +46,10 @@ export { ToggleGroup, ToggleGroupItem } from './components/ui/toggle-group.js';
|
|
|
45
46
|
export { Toggle, toggleVariants } from './components/ui/toggle.js';
|
|
46
47
|
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from './components/ui/tooltip.js';
|
|
47
48
|
export { cn } from './lib/utils.js';
|
|
49
|
+
import 'react/jsx-runtime';
|
|
50
|
+
import 'react';
|
|
48
51
|
import 'class-variance-authority/dist/types';
|
|
49
52
|
import 'class-variance-authority';
|
|
50
|
-
import 'react';
|
|
51
53
|
import 'radix-ui';
|
|
52
54
|
import 'react-day-picker';
|
|
53
55
|
import 'embla-carousel-react';
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { SECONDARY_COLOR, ThemeProvider } from './providers/ThemeProvider.js';
|
|
1
2
|
export { Button, buttonVariants } from './components/ui/button.js';
|
|
2
3
|
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from './components/ui/accordion.js';
|
|
3
4
|
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger } from './components/ui/alert-dialog.js';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
|
|
4
|
+
declare const SECONDARY_COLOR: Record<string, string>;
|
|
5
|
+
type ThemeProviderProps = {
|
|
6
|
+
primaryColor?: string;
|
|
7
|
+
mode?: "light" | "dark";
|
|
8
|
+
children: React__default.ReactNode;
|
|
9
|
+
};
|
|
10
|
+
declare const ThemeProvider: ({ primaryColor, mode, children, }: ThemeProviderProps) => react_jsx_runtime.JSX.Element;
|
|
11
|
+
|
|
12
|
+
export { SECONDARY_COLOR, ThemeProvider };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { useEffect } from 'react';
|
|
3
|
+
|
|
4
|
+
const SECONDARY_COLOR = {
|
|
5
|
+
"#335aff": "#FFFFFF",
|
|
6
|
+
"#3B5352": "#FFFFFF",
|
|
7
|
+
"#34004B": "#FFFFFF",
|
|
8
|
+
"#FFFFFF": "#737373"
|
|
9
|
+
};
|
|
10
|
+
const ThemeProvider = ({
|
|
11
|
+
primaryColor = "#335aff",
|
|
12
|
+
mode = "light",
|
|
13
|
+
children
|
|
14
|
+
}) => {
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
const primary = primaryColor;
|
|
17
|
+
const primaryForeground = SECONDARY_COLOR[primaryColor] || "#ffffff";
|
|
18
|
+
document.documentElement.style.setProperty("--primary", primary);
|
|
19
|
+
document.documentElement.style.setProperty("--primary-foreground", primaryForeground);
|
|
20
|
+
document.documentElement.setAttribute("data-theme", mode);
|
|
21
|
+
}, [primaryColor, mode]);
|
|
22
|
+
return jsx(Fragment, {
|
|
23
|
+
children: children
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export { SECONDARY_COLOR, ThemeProvider };
|