@ichaingo/ui 1.1.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/.babelrc +12 -0
- package/README.md +103 -0
- package/components.json +21 -0
- package/dist/accordion.d.ts +13 -0
- package/dist/accordion.mjs +64 -0
- package/dist/alert-dialog.d.ts +27 -0
- package/dist/alert-dialog.mjs +146 -0
- package/dist/alert.d.ts +16 -0
- package/dist/alert.mjs +66 -0
- package/dist/aspect-ratio.d.ts +6 -0
- package/dist/aspect-ratio.mjs +10 -0
- package/dist/avatar.d.ts +11 -0
- package/dist/avatar.mjs +53 -0
- package/dist/badge.d.ts +14 -0
- package/dist/badge.mjs +39 -0
- package/dist/breadcrumb.d.ts +20 -0
- package/dist/breadcrumb.mjs +102 -0
- package/dist/button.d.ts +15 -0
- package/dist/button.mjs +49 -0
- package/dist/calendar.d.ts +23 -0
- package/dist/calendar.mjs +173 -0
- package/dist/card.d.ts +18 -0
- package/dist/card.mjs +90 -0
- package/dist/carousel.d.ts +42 -0
- package/dist/carousel.mjs +177 -0
- package/dist/checkbox.d.ts +7 -0
- package/dist/checkbox.mjs +31 -0
- package/dist/collapsible.d.ts +10 -0
- package/dist/collapsible.mjs +34 -0
- package/dist/command.d.ts +31 -0
- package/dist/command.mjs +170 -0
- package/dist/context-menu.d.ts +42 -0
- package/dist/context-menu.mjs +223 -0
- package/dist/dialog.d.ts +27 -0
- package/dist/dialog.mjs +136 -0
- package/dist/dropdown-menu.d.ts +42 -0
- package/dist/dropdown-menu.mjs +231 -0
- package/dist/form.d.ts +38 -0
- package/dist/form.mjs +101 -0
- package/dist/hover-card.d.ts +11 -0
- package/dist/hover-card.mjs +38 -0
- package/dist/input.d.ts +6 -0
- package/dist/input.mjs +21 -0
- package/dist/label.d.ts +7 -0
- package/dist/label.mjs +23 -0
- package/dist/menubar.d.ts +44 -0
- package/dist/menubar.mjs +251 -0
- package/dist/navigation-menu.d.ts +26 -0
- package/dist/navigation-menu.mjs +170 -0
- package/dist/pagination.d.ts +33 -0
- package/dist/pagination.mjs +116 -0
- package/dist/popover.d.ts +13 -0
- package/dist/popover.mjs +44 -0
- package/dist/progress.d.ts +7 -0
- package/dist/progress.mjs +31 -0
- package/dist/radio-group.d.ts +9 -0
- package/dist/radio-group.mjs +45 -0
- package/dist/resizable.d.ts +13 -0
- package/dist/resizable.mjs +48 -0
- package/dist/scroll-area.d.ts +9 -0
- package/dist/scroll-area.mjs +60 -0
- package/dist/select.d.ts +27 -0
- package/dist/select.mjs +169 -0
- package/dist/separator.d.ts +7 -0
- package/dist/separator.mjs +26 -0
- package/dist/sheet.d.ts +23 -0
- package/dist/sheet.mjs +126 -0
- package/dist/skeleton.d.ts +5 -0
- package/dist/skeleton.mjs +15 -0
- package/dist/slider.d.ts +7 -0
- package/dist/slider.mjs +63 -0
- package/dist/sonner.d.ts +6 -0
- package/dist/sonner.mjs +22 -0
- package/dist/switch.d.ts +7 -0
- package/dist/switch.mjs +31 -0
- package/dist/table.d.ts +20 -0
- package/dist/table.mjs +114 -0
- package/dist/tabs.d.ts +13 -0
- package/dist/tabs.mjs +67 -0
- package/dist/textarea.d.ts +6 -0
- package/dist/textarea.mjs +18 -0
- package/dist/toggle-group.d.ts +16 -0
- package/dist/toggle-group.mjs +62 -0
- package/dist/toggle.d.ts +14 -0
- package/dist/toggle.mjs +43 -0
- package/dist/tooltip.d.ts +13 -0
- package/dist/tooltip.mjs +55 -0
- package/dist/utils-B7J70Nno.js +8 -0
- package/eslint.config.mjs +12 -0
- package/package.json +273 -0
- package/postcss.config.js +6 -0
- package/src/components/ui/accordion.tsx +64 -0
- package/src/components/ui/alert-dialog.tsx +155 -0
- package/src/components/ui/alert.tsx +66 -0
- package/src/components/ui/aspect-ratio.tsx +9 -0
- package/src/components/ui/avatar.tsx +51 -0
- package/src/components/ui/badge.tsx +46 -0
- package/src/components/ui/breadcrumb.tsx +109 -0
- package/src/components/ui/button.tsx +59 -0
- package/src/components/ui/calendar.tsx +211 -0
- package/src/components/ui/card.tsx +92 -0
- package/src/components/ui/carousel.tsx +239 -0
- package/src/components/ui/checkbox.tsx +30 -0
- package/src/components/ui/collapsible.tsx +31 -0
- package/src/components/ui/command.tsx +182 -0
- package/src/components/ui/context-menu.tsx +250 -0
- package/src/components/ui/dialog.tsx +141 -0
- package/src/components/ui/dropdown-menu.tsx +255 -0
- package/src/components/ui/form.tsx +165 -0
- package/src/components/ui/hover-card.tsx +42 -0
- package/src/components/ui/input.tsx +21 -0
- package/src/components/ui/label.tsx +24 -0
- package/src/components/ui/menubar.tsx +274 -0
- package/src/components/ui/navigation-menu.tsx +168 -0
- package/src/components/ui/pagination.tsx +125 -0
- package/src/components/ui/popover.tsx +46 -0
- package/src/components/ui/progress.tsx +29 -0
- package/src/components/ui/radio-group.tsx +43 -0
- package/src/components/ui/resizable.tsx +54 -0
- package/src/components/ui/scroll-area.tsx +56 -0
- package/src/components/ui/select.tsx +183 -0
- package/src/components/ui/separator.tsx +26 -0
- package/src/components/ui/sheet.tsx +137 -0
- package/src/components/ui/skeleton.tsx +13 -0
- package/src/components/ui/slider.tsx +61 -0
- package/src/components/ui/sonner.tsx +23 -0
- package/src/components/ui/switch.tsx +29 -0
- package/src/components/ui/table.tsx +114 -0
- package/src/components/ui/tabs.tsx +64 -0
- package/src/components/ui/textarea.tsx +18 -0
- package/src/components/ui/toggle-group.tsx +71 -0
- package/src/components/ui/toggle.tsx +45 -0
- package/src/components/ui/tooltip.tsx +59 -0
- package/src/index.ts +46 -0
- package/src/lib/utils.ts +6 -0
- package/src/style.css +0 -0
- package/tailwind.config.js +52 -0
- package/tsconfig.json +19 -0
- package/tsconfig.lib.json +54 -0
- package/tsconfig.spec.json +32 -0
- package/vite.config.ts +136 -0
package/dist/slider.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
import * as React_2 from 'react';
|
|
3
|
+
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
4
|
+
|
|
5
|
+
export declare function Slider({ className, defaultValue, value, min, max, ...props }: React_2.ComponentProps<typeof SliderPrimitive.Root>): JSX.Element;
|
|
6
|
+
|
|
7
|
+
export { }
|
package/dist/slider.mjs
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { jsxs as h, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import * as m from "react";
|
|
3
|
+
import * as a from "@radix-ui/react-slider";
|
|
4
|
+
import { c as n } from "./utils-B7J70Nno.js";
|
|
5
|
+
function g({
|
|
6
|
+
className: l,
|
|
7
|
+
defaultValue: r,
|
|
8
|
+
value: t,
|
|
9
|
+
min: o = 0,
|
|
10
|
+
max: i = 100,
|
|
11
|
+
...s
|
|
12
|
+
}) {
|
|
13
|
+
const d = m.useMemo(
|
|
14
|
+
() => Array.isArray(t) ? t : Array.isArray(r) ? r : [o, i],
|
|
15
|
+
[t, r, o, i]
|
|
16
|
+
);
|
|
17
|
+
return /* @__PURE__ */ h(
|
|
18
|
+
a.Root,
|
|
19
|
+
{
|
|
20
|
+
"data-slot": "slider",
|
|
21
|
+
defaultValue: r,
|
|
22
|
+
value: t,
|
|
23
|
+
min: o,
|
|
24
|
+
max: i,
|
|
25
|
+
className: n(
|
|
26
|
+
"relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",
|
|
27
|
+
l
|
|
28
|
+
),
|
|
29
|
+
...s,
|
|
30
|
+
children: [
|
|
31
|
+
/* @__PURE__ */ e(
|
|
32
|
+
a.Track,
|
|
33
|
+
{
|
|
34
|
+
"data-slot": "slider-track",
|
|
35
|
+
className: n(
|
|
36
|
+
"bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"
|
|
37
|
+
),
|
|
38
|
+
children: /* @__PURE__ */ e(
|
|
39
|
+
a.Range,
|
|
40
|
+
{
|
|
41
|
+
"data-slot": "slider-range",
|
|
42
|
+
className: n(
|
|
43
|
+
"bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full"
|
|
44
|
+
)
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
),
|
|
49
|
+
Array.from({ length: d.length }, (b, c) => /* @__PURE__ */ e(
|
|
50
|
+
a.Thumb,
|
|
51
|
+
{
|
|
52
|
+
"data-slot": "slider-thumb",
|
|
53
|
+
className: "border-primary bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"
|
|
54
|
+
},
|
|
55
|
+
c
|
|
56
|
+
))
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
export {
|
|
62
|
+
g as Slider
|
|
63
|
+
};
|
package/dist/sonner.d.ts
ADDED
package/dist/sonner.mjs
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useTheme as t } from "next-themes";
|
|
3
|
+
import { Toaster as s } from "sonner";
|
|
4
|
+
const n = ({ ...r }) => {
|
|
5
|
+
const { theme: o = "system" } = t();
|
|
6
|
+
return /* @__PURE__ */ e(
|
|
7
|
+
s,
|
|
8
|
+
{
|
|
9
|
+
theme: o,
|
|
10
|
+
className: "toaster group",
|
|
11
|
+
style: {
|
|
12
|
+
"--normal-bg": "var(--popover)",
|
|
13
|
+
"--normal-text": "var(--popover-foreground)",
|
|
14
|
+
"--normal-border": "var(--border)"
|
|
15
|
+
},
|
|
16
|
+
...r
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
n as Toaster
|
|
22
|
+
};
|
package/dist/switch.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
import * as React_2 from 'react';
|
|
3
|
+
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
4
|
+
|
|
5
|
+
export declare function Switch({ className, ...props }: React_2.ComponentProps<typeof SwitchPrimitive.Root>): JSX.Element;
|
|
6
|
+
|
|
7
|
+
export { }
|
package/dist/switch.mjs
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import * as t from "@radix-ui/react-switch";
|
|
3
|
+
import { c as a } from "./utils-B7J70Nno.js";
|
|
4
|
+
function o({
|
|
5
|
+
className: r,
|
|
6
|
+
...n
|
|
7
|
+
}) {
|
|
8
|
+
return /* @__PURE__ */ e(
|
|
9
|
+
t.Root,
|
|
10
|
+
{
|
|
11
|
+
"data-slot": "switch",
|
|
12
|
+
className: a(
|
|
13
|
+
"peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
14
|
+
r
|
|
15
|
+
),
|
|
16
|
+
...n,
|
|
17
|
+
children: /* @__PURE__ */ e(
|
|
18
|
+
t.Thumb,
|
|
19
|
+
{
|
|
20
|
+
"data-slot": "switch-thumb",
|
|
21
|
+
className: a(
|
|
22
|
+
"bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"
|
|
23
|
+
)
|
|
24
|
+
}
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
o as Switch
|
|
31
|
+
};
|
package/dist/table.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
import * as React_2 from 'react';
|
|
3
|
+
|
|
4
|
+
export declare function Table({ className, ...props }: React_2.ComponentProps<"table">): JSX.Element;
|
|
5
|
+
|
|
6
|
+
export declare function TableBody({ className, ...props }: React_2.ComponentProps<"tbody">): JSX.Element;
|
|
7
|
+
|
|
8
|
+
export declare function TableCaption({ className, ...props }: React_2.ComponentProps<"caption">): JSX.Element;
|
|
9
|
+
|
|
10
|
+
export declare function TableCell({ className, ...props }: React_2.ComponentProps<"td">): JSX.Element;
|
|
11
|
+
|
|
12
|
+
export declare function TableFooter({ className, ...props }: React_2.ComponentProps<"tfoot">): JSX.Element;
|
|
13
|
+
|
|
14
|
+
export declare function TableHead({ className, ...props }: React_2.ComponentProps<"th">): JSX.Element;
|
|
15
|
+
|
|
16
|
+
export declare function TableHeader({ className, ...props }: React_2.ComponentProps<"thead">): JSX.Element;
|
|
17
|
+
|
|
18
|
+
export declare function TableRow({ className, ...props }: React_2.ComponentProps<"tr">): JSX.Element;
|
|
19
|
+
|
|
20
|
+
export { }
|
package/dist/table.mjs
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { c as o } from "./utils-B7J70Nno.js";
|
|
3
|
+
function n({ className: t, ...e }) {
|
|
4
|
+
return /* @__PURE__ */ a(
|
|
5
|
+
"div",
|
|
6
|
+
{
|
|
7
|
+
"data-slot": "table-container",
|
|
8
|
+
className: "relative w-full overflow-x-auto",
|
|
9
|
+
children: /* @__PURE__ */ a(
|
|
10
|
+
"table",
|
|
11
|
+
{
|
|
12
|
+
"data-slot": "table",
|
|
13
|
+
className: o("w-full caption-bottom text-sm", t),
|
|
14
|
+
...e
|
|
15
|
+
}
|
|
16
|
+
)
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
function s({ className: t, ...e }) {
|
|
21
|
+
return /* @__PURE__ */ a(
|
|
22
|
+
"thead",
|
|
23
|
+
{
|
|
24
|
+
"data-slot": "table-header",
|
|
25
|
+
className: o("[&_tr]:border-b", t),
|
|
26
|
+
...e
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
function d({ className: t, ...e }) {
|
|
31
|
+
return /* @__PURE__ */ a(
|
|
32
|
+
"tbody",
|
|
33
|
+
{
|
|
34
|
+
"data-slot": "table-body",
|
|
35
|
+
className: o("[&_tr:last-child]:border-0", t),
|
|
36
|
+
...e
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
function c({ className: t, ...e }) {
|
|
41
|
+
return /* @__PURE__ */ a(
|
|
42
|
+
"tfoot",
|
|
43
|
+
{
|
|
44
|
+
"data-slot": "table-footer",
|
|
45
|
+
className: o(
|
|
46
|
+
"bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",
|
|
47
|
+
t
|
|
48
|
+
),
|
|
49
|
+
...e
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
function b({ className: t, ...e }) {
|
|
54
|
+
return /* @__PURE__ */ a(
|
|
55
|
+
"tr",
|
|
56
|
+
{
|
|
57
|
+
"data-slot": "table-row",
|
|
58
|
+
className: o(
|
|
59
|
+
"hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",
|
|
60
|
+
t
|
|
61
|
+
),
|
|
62
|
+
...e
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
function i({ className: t, ...e }) {
|
|
67
|
+
return /* @__PURE__ */ a(
|
|
68
|
+
"th",
|
|
69
|
+
{
|
|
70
|
+
"data-slot": "table-head",
|
|
71
|
+
className: o(
|
|
72
|
+
"text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
73
|
+
t
|
|
74
|
+
),
|
|
75
|
+
...e
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
function m({ className: t, ...e }) {
|
|
80
|
+
return /* @__PURE__ */ a(
|
|
81
|
+
"td",
|
|
82
|
+
{
|
|
83
|
+
"data-slot": "table-cell",
|
|
84
|
+
className: o(
|
|
85
|
+
"p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
86
|
+
t
|
|
87
|
+
),
|
|
88
|
+
...e
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
function u({
|
|
93
|
+
className: t,
|
|
94
|
+
...e
|
|
95
|
+
}) {
|
|
96
|
+
return /* @__PURE__ */ a(
|
|
97
|
+
"caption",
|
|
98
|
+
{
|
|
99
|
+
"data-slot": "table-caption",
|
|
100
|
+
className: o("text-muted-foreground mt-4 text-sm", t),
|
|
101
|
+
...e
|
|
102
|
+
}
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
export {
|
|
106
|
+
n as Table,
|
|
107
|
+
d as TableBody,
|
|
108
|
+
u as TableCaption,
|
|
109
|
+
m as TableCell,
|
|
110
|
+
c as TableFooter,
|
|
111
|
+
i as TableHead,
|
|
112
|
+
s as TableHeader,
|
|
113
|
+
b as TableRow
|
|
114
|
+
};
|
package/dist/tabs.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
import * as React_2 from 'react';
|
|
3
|
+
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
4
|
+
|
|
5
|
+
export declare function Tabs({ className, ...props }: React_2.ComponentProps<typeof TabsPrimitive.Root>): JSX.Element;
|
|
6
|
+
|
|
7
|
+
export declare function TabsContent({ className, ...props }: React_2.ComponentProps<typeof TabsPrimitive.Content>): JSX.Element;
|
|
8
|
+
|
|
9
|
+
export declare function TabsList({ className, ...props }: React_2.ComponentProps<typeof TabsPrimitive.List>): JSX.Element;
|
|
10
|
+
|
|
11
|
+
export declare function TabsTrigger({ className, ...props }: React_2.ComponentProps<typeof TabsPrimitive.Trigger>): JSX.Element;
|
|
12
|
+
|
|
13
|
+
export { }
|
package/dist/tabs.mjs
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import * as s from "@radix-ui/react-tabs";
|
|
3
|
+
import { c as i } from "./utils-B7J70Nno.js";
|
|
4
|
+
function o({
|
|
5
|
+
className: t,
|
|
6
|
+
...e
|
|
7
|
+
}) {
|
|
8
|
+
return /* @__PURE__ */ a(
|
|
9
|
+
s.Root,
|
|
10
|
+
{
|
|
11
|
+
"data-slot": "tabs",
|
|
12
|
+
className: i("flex flex-col gap-2", t),
|
|
13
|
+
...e
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
function d({
|
|
18
|
+
className: t,
|
|
19
|
+
...e
|
|
20
|
+
}) {
|
|
21
|
+
return /* @__PURE__ */ a(
|
|
22
|
+
s.List,
|
|
23
|
+
{
|
|
24
|
+
"data-slot": "tabs-list",
|
|
25
|
+
className: i(
|
|
26
|
+
"bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",
|
|
27
|
+
t
|
|
28
|
+
),
|
|
29
|
+
...e
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
function c({
|
|
34
|
+
className: t,
|
|
35
|
+
...e
|
|
36
|
+
}) {
|
|
37
|
+
return /* @__PURE__ */ a(
|
|
38
|
+
s.Trigger,
|
|
39
|
+
{
|
|
40
|
+
"data-slot": "tabs-trigger",
|
|
41
|
+
className: i(
|
|
42
|
+
"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",
|
|
43
|
+
t
|
|
44
|
+
),
|
|
45
|
+
...e
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
function l({
|
|
50
|
+
className: t,
|
|
51
|
+
...e
|
|
52
|
+
}) {
|
|
53
|
+
return /* @__PURE__ */ a(
|
|
54
|
+
s.Content,
|
|
55
|
+
{
|
|
56
|
+
"data-slot": "tabs-content",
|
|
57
|
+
className: i("flex-1 outline-none", t),
|
|
58
|
+
...e
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
export {
|
|
63
|
+
o as Tabs,
|
|
64
|
+
l as TabsContent,
|
|
65
|
+
d as TabsList,
|
|
66
|
+
c as TabsTrigger
|
|
67
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { c as t } from "./utils-B7J70Nno.js";
|
|
3
|
+
function n({ className: r, ...e }) {
|
|
4
|
+
return /* @__PURE__ */ i(
|
|
5
|
+
"textarea",
|
|
6
|
+
{
|
|
7
|
+
"data-slot": "textarea",
|
|
8
|
+
className: t(
|
|
9
|
+
"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",
|
|
10
|
+
r
|
|
11
|
+
),
|
|
12
|
+
...e
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
n as Textarea
|
|
18
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ClassProp } from 'class-variance-authority/types';
|
|
2
|
+
import { JSX } from 'react/jsx-runtime';
|
|
3
|
+
import * as React_2 from 'react';
|
|
4
|
+
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
5
|
+
import { VariantProps } from 'class-variance-authority';
|
|
6
|
+
|
|
7
|
+
export declare function ToggleGroup({ className, variant, size, children, ...props }: React_2.ComponentProps<typeof ToggleGroupPrimitive.Root> & VariantProps<typeof toggleVariants>): JSX.Element;
|
|
8
|
+
|
|
9
|
+
export declare function ToggleGroupItem({ className, children, variant, size, ...props }: React_2.ComponentProps<typeof ToggleGroupPrimitive.Item> & VariantProps<typeof toggleVariants>): JSX.Element;
|
|
10
|
+
|
|
11
|
+
declare const toggleVariants: (props?: ({
|
|
12
|
+
variant?: "default" | "outline" | null | undefined;
|
|
13
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
14
|
+
} & ClassProp) | undefined) => string;
|
|
15
|
+
|
|
16
|
+
export { }
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import * as s from "react";
|
|
3
|
+
import * as d from "@radix-ui/react-toggle-group";
|
|
4
|
+
import { c as l } from "./utils-B7J70Nno.js";
|
|
5
|
+
import { toggleVariants as m } from "./toggle.mjs";
|
|
6
|
+
const u = s.createContext({
|
|
7
|
+
size: "default",
|
|
8
|
+
variant: "default"
|
|
9
|
+
});
|
|
10
|
+
function p({
|
|
11
|
+
className: r,
|
|
12
|
+
variant: o,
|
|
13
|
+
size: t,
|
|
14
|
+
children: e,
|
|
15
|
+
...i
|
|
16
|
+
}) {
|
|
17
|
+
return /* @__PURE__ */ n(
|
|
18
|
+
d.Root,
|
|
19
|
+
{
|
|
20
|
+
"data-slot": "toggle-group",
|
|
21
|
+
"data-variant": o,
|
|
22
|
+
"data-size": t,
|
|
23
|
+
className: l(
|
|
24
|
+
"group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",
|
|
25
|
+
r
|
|
26
|
+
),
|
|
27
|
+
...i,
|
|
28
|
+
children: /* @__PURE__ */ n(u.Provider, { value: { variant: o, size: t }, children: e })
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
function v({
|
|
33
|
+
className: r,
|
|
34
|
+
children: o,
|
|
35
|
+
variant: t,
|
|
36
|
+
size: e,
|
|
37
|
+
...i
|
|
38
|
+
}) {
|
|
39
|
+
const a = s.useContext(u);
|
|
40
|
+
return /* @__PURE__ */ n(
|
|
41
|
+
d.Item,
|
|
42
|
+
{
|
|
43
|
+
"data-slot": "toggle-group-item",
|
|
44
|
+
"data-variant": a.variant || t,
|
|
45
|
+
"data-size": a.size || e,
|
|
46
|
+
className: l(
|
|
47
|
+
m({
|
|
48
|
+
variant: a.variant || t,
|
|
49
|
+
size: a.size || e
|
|
50
|
+
}),
|
|
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",
|
|
52
|
+
r
|
|
53
|
+
),
|
|
54
|
+
...i,
|
|
55
|
+
children: o
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
export {
|
|
60
|
+
p as ToggleGroup,
|
|
61
|
+
v as ToggleGroupItem
|
|
62
|
+
};
|
package/dist/toggle.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ClassProp } from 'class-variance-authority/types';
|
|
2
|
+
import { JSX } from 'react/jsx-runtime';
|
|
3
|
+
import * as React_2 from 'react';
|
|
4
|
+
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
5
|
+
import { VariantProps } from 'class-variance-authority';
|
|
6
|
+
|
|
7
|
+
export declare function Toggle({ className, variant, size, ...props }: React_2.ComponentProps<typeof TogglePrimitive.Root> & VariantProps<typeof toggleVariants>): JSX.Element;
|
|
8
|
+
|
|
9
|
+
export declare const toggleVariants: (props?: ({
|
|
10
|
+
variant?: "default" | "outline" | null | undefined;
|
|
11
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
12
|
+
} & ClassProp) | undefined) => string;
|
|
13
|
+
|
|
14
|
+
export { }
|
package/dist/toggle.mjs
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import * as a from "@radix-ui/react-toggle";
|
|
3
|
+
import { cva as o } from "class-variance-authority";
|
|
4
|
+
import { c as s } from "./utils-B7J70Nno.js";
|
|
5
|
+
const d = o(
|
|
6
|
+
"inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",
|
|
7
|
+
{
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
default: "bg-transparent",
|
|
11
|
+
outline: "border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"
|
|
12
|
+
},
|
|
13
|
+
size: {
|
|
14
|
+
default: "h-9 px-2 min-w-9",
|
|
15
|
+
sm: "h-8 px-1.5 min-w-8",
|
|
16
|
+
lg: "h-10 px-2.5 min-w-10"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
defaultVariants: {
|
|
20
|
+
variant: "default",
|
|
21
|
+
size: "default"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
function u({
|
|
26
|
+
className: e,
|
|
27
|
+
variant: t,
|
|
28
|
+
size: i,
|
|
29
|
+
...r
|
|
30
|
+
}) {
|
|
31
|
+
return /* @__PURE__ */ n(
|
|
32
|
+
a.Root,
|
|
33
|
+
{
|
|
34
|
+
"data-slot": "toggle",
|
|
35
|
+
className: s(d({ variant: t, size: i, className: e })),
|
|
36
|
+
...r
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
export {
|
|
41
|
+
u as Toggle,
|
|
42
|
+
d as toggleVariants
|
|
43
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
import * as React_2 from 'react';
|
|
3
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
4
|
+
|
|
5
|
+
export declare function Tooltip({ ...props }: React_2.ComponentProps<typeof TooltipPrimitive.Root>): JSX.Element;
|
|
6
|
+
|
|
7
|
+
export declare function TooltipContent({ className, sideOffset, children, ...props }: React_2.ComponentProps<typeof TooltipPrimitive.Content>): JSX.Element;
|
|
8
|
+
|
|
9
|
+
export declare function TooltipProvider({ delayDuration, ...props }: React_2.ComponentProps<typeof TooltipPrimitive.Provider>): JSX.Element;
|
|
10
|
+
|
|
11
|
+
export declare function TooltipTrigger({ ...props }: React_2.ComponentProps<typeof TooltipPrimitive.Trigger>): JSX.Element;
|
|
12
|
+
|
|
13
|
+
export { }
|
package/dist/tooltip.mjs
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsx as i, jsxs as n } from "react/jsx-runtime";
|
|
2
|
+
import * as o from "@radix-ui/react-tooltip";
|
|
3
|
+
import { c as d } from "./utils-B7J70Nno.js";
|
|
4
|
+
function l({
|
|
5
|
+
delayDuration: t = 0,
|
|
6
|
+
...r
|
|
7
|
+
}) {
|
|
8
|
+
return /* @__PURE__ */ i(
|
|
9
|
+
o.Provider,
|
|
10
|
+
{
|
|
11
|
+
"data-slot": "tooltip-provider",
|
|
12
|
+
delayDuration: t,
|
|
13
|
+
...r
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
function p({
|
|
18
|
+
...t
|
|
19
|
+
}) {
|
|
20
|
+
return /* @__PURE__ */ i(l, { children: /* @__PURE__ */ i(o.Root, { "data-slot": "tooltip", ...t }) });
|
|
21
|
+
}
|
|
22
|
+
function c({
|
|
23
|
+
...t
|
|
24
|
+
}) {
|
|
25
|
+
return /* @__PURE__ */ i(o.Trigger, { "data-slot": "tooltip-trigger", ...t });
|
|
26
|
+
}
|
|
27
|
+
function f({
|
|
28
|
+
className: t,
|
|
29
|
+
sideOffset: r = 0,
|
|
30
|
+
children: e,
|
|
31
|
+
...a
|
|
32
|
+
}) {
|
|
33
|
+
return /* @__PURE__ */ i(o.Portal, { children: /* @__PURE__ */ n(
|
|
34
|
+
o.Content,
|
|
35
|
+
{
|
|
36
|
+
"data-slot": "tooltip-content",
|
|
37
|
+
sideOffset: r,
|
|
38
|
+
className: d(
|
|
39
|
+
"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",
|
|
40
|
+
t
|
|
41
|
+
),
|
|
42
|
+
...a,
|
|
43
|
+
children: [
|
|
44
|
+
e,
|
|
45
|
+
/* @__PURE__ */ i(o.Arrow, { className: "bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
) });
|
|
49
|
+
}
|
|
50
|
+
export {
|
|
51
|
+
p as Tooltip,
|
|
52
|
+
f as TooltipContent,
|
|
53
|
+
l as TooltipProvider,
|
|
54
|
+
c as TooltipTrigger
|
|
55
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import nx from '@nx/eslint-plugin';
|
|
2
|
+
import baseConfig from '../../eslint.config.mjs';
|
|
3
|
+
|
|
4
|
+
export default [
|
|
5
|
+
...baseConfig,
|
|
6
|
+
...nx.configs['flat/react'],
|
|
7
|
+
{
|
|
8
|
+
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
|
|
9
|
+
// Override or add rules here
|
|
10
|
+
rules: {},
|
|
11
|
+
},
|
|
12
|
+
];
|