@codefast/ui 0.3.10 → 0.3.11-canary.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/CHANGELOG.md +19 -0
- package/README.md +277 -167
- package/dist/components/accordion.cjs +5 -5
- package/dist/components/accordion.d.ts +4 -4
- package/dist/components/accordion.js +5 -5
- package/dist/components/alert-dialog.cjs +9 -9
- package/dist/components/alert-dialog.d.ts +11 -11
- package/dist/components/alert-dialog.js +9 -9
- package/dist/components/alert.cjs +5 -5
- package/dist/components/alert.d.ts +5 -5
- package/dist/components/alert.js +5 -5
- package/dist/components/aspect-ratio.d.ts +2 -2
- package/dist/components/avatar.cjs +3 -3
- package/dist/components/avatar.d.ts +2 -2
- package/dist/components/avatar.js +3 -3
- package/dist/components/badge.cjs +7 -7
- package/dist/components/badge.d.ts +3 -3
- package/dist/components/badge.js +7 -7
- package/dist/components/breadcrumb.cjs +6 -8
- package/dist/components/breadcrumb.d.ts +8 -8
- package/dist/components/breadcrumb.js +6 -8
- package/dist/components/button-group.cjs +8 -8
- package/dist/components/button-group.d.ts +5 -5
- package/dist/components/button-group.js +8 -8
- package/dist/components/button.cjs +17 -17
- package/dist/components/button.d.ts +6 -6
- package/dist/components/button.js +17 -17
- package/dist/components/calendar.cjs +35 -35
- package/dist/components/calendar.d.ts +5 -5
- package/dist/components/calendar.js +35 -35
- package/dist/components/card.cjs +7 -7
- package/dist/components/card.d.ts +8 -8
- package/dist/components/card.js +7 -7
- package/dist/components/carousel.cjs +20 -20
- package/dist/components/carousel.d.ts +10 -10
- package/dist/components/carousel.js +20 -20
- package/dist/components/chart.cjs +42 -42
- package/dist/components/chart.d.ts +12 -11
- package/dist/components/chart.js +42 -42
- package/dist/components/checkbox-cards.cjs +2 -2
- package/dist/components/checkbox-cards.d.ts +2 -2
- package/dist/components/checkbox-cards.js +2 -2
- package/dist/components/checkbox-group.cjs +2 -2
- package/dist/components/checkbox-group.d.ts +2 -2
- package/dist/components/checkbox-group.js +2 -2
- package/dist/components/checkbox.cjs +1 -1
- package/dist/components/checkbox.d.ts +2 -2
- package/dist/components/checkbox.js +1 -1
- package/dist/components/collapsible.d.ts +2 -2
- package/dist/components/command.cjs +10 -10
- package/dist/components/command.d.ts +4 -4
- package/dist/components/command.js +10 -10
- package/dist/components/context-menu.cjs +10 -10
- package/dist/components/context-menu.d.ts +4 -4
- package/dist/components/context-menu.js +10 -10
- package/dist/components/dialog.cjs +12 -12
- package/dist/components/dialog.d.ts +10 -10
- package/dist/components/dialog.js +12 -12
- package/dist/components/drawer.cjs +9 -9
- package/dist/components/drawer.d.ts +9 -9
- package/dist/components/drawer.js +9 -9
- package/dist/components/dropdown-menu.cjs +10 -10
- package/dist/components/dropdown-menu.d.ts +4 -4
- package/dist/components/dropdown-menu.js +10 -10
- package/dist/components/empty.cjs +10 -10
- package/dist/components/empty.d.ts +9 -9
- package/dist/components/empty.js +10 -10
- package/dist/components/field.cjs +17 -17
- package/dist/components/field.d.ts +14 -14
- package/dist/components/field.js +17 -17
- package/dist/components/form.cjs +8 -8
- package/dist/components/form.d.ts +10 -10
- package/dist/components/form.js +8 -8
- package/dist/components/hover-card.cjs +3 -3
- package/dist/components/hover-card.d.ts +2 -2
- package/dist/components/hover-card.js +3 -3
- package/dist/components/input-group.cjs +20 -20
- package/dist/components/input-group.d.ts +15 -15
- package/dist/components/input-group.js +20 -20
- package/dist/components/input-number.cjs +7 -7
- package/dist/components/input-number.d.ts +2 -2
- package/dist/components/input-number.js +7 -7
- package/dist/components/input-otp.cjs +4 -4
- package/dist/components/input-otp.d.ts +6 -6
- package/dist/components/input-otp.js +4 -4
- package/dist/components/input-password.cjs +6 -6
- package/dist/components/input-password.d.ts +3 -3
- package/dist/components/input-password.js +6 -6
- package/dist/components/input-search.cjs +4 -4
- package/dist/components/input-search.d.ts +3 -3
- package/dist/components/input-search.js +4 -4
- package/dist/components/input.cjs +1 -1
- package/dist/components/input.d.ts +2 -2
- package/dist/components/input.js +1 -1
- package/dist/components/item.cjs +23 -23
- package/dist/components/item.d.ts +12 -12
- package/dist/components/item.js +23 -23
- package/dist/components/kbd.cjs +2 -2
- package/dist/components/kbd.d.ts +3 -3
- package/dist/components/kbd.js +2 -2
- package/dist/components/label.cjs +1 -1
- package/dist/components/label.d.ts +2 -2
- package/dist/components/label.js +1 -1
- package/dist/components/menubar.cjs +13 -13
- package/dist/components/menubar.d.ts +4 -4
- package/dist/components/menubar.js +13 -13
- package/dist/components/native-select.cjs +2 -2
- package/dist/components/native-select.d.ts +4 -4
- package/dist/components/native-select.js +2 -2
- package/dist/components/navigation-menu.cjs +10 -10
- package/dist/components/navigation-menu.d.ts +2 -2
- package/dist/components/navigation-menu.js +10 -10
- package/dist/components/pagination.cjs +6 -6
- package/dist/components/pagination.d.ts +10 -10
- package/dist/components/pagination.js +6 -6
- package/dist/components/popover.cjs +3 -3
- package/dist/components/popover.d.ts +3 -3
- package/dist/components/popover.js +3 -3
- package/dist/components/progress-circle.cjs +22 -22
- package/dist/components/progress-circle.d.ts +5 -5
- package/dist/components/progress-circle.js +22 -22
- package/dist/components/progress.cjs +2 -2
- package/dist/components/progress.d.ts +2 -2
- package/dist/components/progress.js +2 -2
- package/dist/components/radio-cards.cjs +3 -3
- package/dist/components/radio-cards.d.ts +2 -2
- package/dist/components/radio-cards.js +3 -3
- package/dist/components/radio-group.cjs +3 -3
- package/dist/components/radio-group.d.ts +2 -2
- package/dist/components/radio-group.js +3 -3
- package/dist/components/radio.cjs +1 -1
- package/dist/components/radio.d.ts +2 -2
- package/dist/components/radio.js +1 -1
- package/dist/components/resizable.cjs +3 -3
- package/dist/components/resizable.d.ts +2 -2
- package/dist/components/resizable.js +3 -3
- package/dist/components/scroll-area.cjs +31 -31
- package/dist/components/scroll-area.d.ts +5 -5
- package/dist/components/scroll-area.js +31 -31
- package/dist/components/select.cjs +9 -9
- package/dist/components/select.d.ts +5 -5
- package/dist/components/select.js +9 -9
- package/dist/components/separator.cjs +9 -9
- package/dist/components/separator.d.ts +5 -5
- package/dist/components/separator.js +9 -9
- package/dist/components/sheet.cjs +17 -17
- package/dist/components/sheet.d.ts +9 -9
- package/dist/components/sheet.js +17 -17
- package/dist/components/sidebar.cjs +65 -65
- package/dist/components/sidebar.d.ts +31 -31
- package/dist/components/sidebar.js +65 -65
- package/dist/components/skeleton.cjs +1 -1
- package/dist/components/skeleton.d.ts +2 -2
- package/dist/components/skeleton.js +1 -1
- package/dist/components/slider.cjs +4 -4
- package/dist/components/slider.d.ts +2 -2
- package/dist/components/slider.js +4 -4
- package/dist/components/sonner.cjs +4 -4
- package/dist/components/sonner.d.ts +3 -3
- package/dist/components/sonner.js +4 -4
- package/dist/components/spinner.cjs +5 -5
- package/dist/components/spinner.d.ts +2 -2
- package/dist/components/spinner.js +5 -5
- package/dist/components/switch.cjs +2 -2
- package/dist/components/switch.d.ts +2 -2
- package/dist/components/switch.js +2 -2
- package/dist/components/table.cjs +8 -8
- package/dist/components/table.d.ts +9 -9
- package/dist/components/table.js +8 -8
- package/dist/components/tabs.cjs +4 -4
- package/dist/components/tabs.d.ts +2 -2
- package/dist/components/tabs.js +4 -4
- package/dist/components/textarea.cjs +1 -1
- package/dist/components/textarea.d.ts +2 -2
- package/dist/components/textarea.js +1 -1
- package/dist/components/toggle-group.cjs +5 -5
- package/dist/components/toggle-group.d.ts +4 -4
- package/dist/components/toggle-group.js +5 -5
- package/dist/components/toggle.cjs +8 -8
- package/dist/components/toggle.d.ts +3 -3
- package/dist/components/toggle.js +8 -8
- package/dist/components/tooltip.cjs +2 -2
- package/dist/components/tooltip.d.ts +3 -3
- package/dist/components/tooltip.js +2 -2
- package/dist/css/preset.css +4 -4
- package/dist/css/style.css +3 -3
- package/dist/hooks/use-copy-to-clipboard.cjs +1 -1
- package/dist/hooks/use-copy-to-clipboard.d.ts +1 -1
- package/dist/hooks/use-copy-to-clipboard.js +1 -1
- package/dist/hooks/use-media-query.cjs +3 -3
- package/dist/hooks/use-media-query.js +3 -3
- package/dist/hooks/use-mutation-observer.d.ts +1 -1
- package/dist/hooks/use-pagination.cjs +1 -1
- package/dist/hooks/use-pagination.js +1 -1
- package/dist/index.d.ts +130 -130
- package/dist/primitives/checkbox-group.cjs +3 -3
- package/dist/primitives/checkbox-group.d.ts +11 -11
- package/dist/primitives/checkbox-group.js +3 -3
- package/dist/primitives/input-number.cjs +46 -46
- package/dist/primitives/input-number.d.ts +8 -8
- package/dist/primitives/input-number.js +46 -46
- package/dist/primitives/input.cjs +7 -7
- package/dist/primitives/input.d.ts +4 -4
- package/dist/primitives/input.js +7 -7
- package/dist/primitives/progress-circle.cjs +8 -8
- package/dist/primitives/progress-circle.d.ts +7 -7
- package/dist/primitives/progress-circle.js +8 -8
- package/package.json +38 -42
|
@@ -32,11 +32,11 @@ const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants")
|
|
|
32
32
|
const react_switch_namespaceObject = require("@radix-ui/react-switch");
|
|
33
33
|
function Switch({ className, ...props }) {
|
|
34
34
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_switch_namespaceObject.Root, {
|
|
35
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
35
|
+
className: (0, tailwind_variants_namespaceObject.cn)("peer inline-flex h-5 w-9 shrink-0 items-center rounded-full border border-transparent p-0.75 shadow-xs outline-hidden transition-all focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:not-data-[state=checked]:border-ring/60 disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:focus-visible:ring-primary/20 data-[state=unchecked]:bg-input dark:data-[state=checked]:focus-visible:ring-primary/40 dark:data-[state=unchecked]:bg-input/80", className),
|
|
36
36
|
"data-slot": "switch",
|
|
37
37
|
...props,
|
|
38
38
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_switch_namespaceObject.Thumb, {
|
|
39
|
-
className: "
|
|
39
|
+
className: "pointer-events-none block size-3.5 rounded-full bg-background shadow-sm transition-transform data-[state=checked]:translate-x-3.5 data-[state=unchecked]:translate-x-0 dark:not-data-[state=checked]:bg-foreground",
|
|
40
40
|
"data-slot": "switch-thumb"
|
|
41
41
|
})
|
|
42
42
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ComponentProps, JSX } from
|
|
2
|
-
import * as SwitchPrimitives from
|
|
1
|
+
import type { ComponentProps, JSX } from "react";
|
|
2
|
+
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
3
3
|
type SwitchProps = ComponentProps<typeof SwitchPrimitives.Root>;
|
|
4
4
|
declare function Switch({ className, ...props }: SwitchProps): JSX.Element;
|
|
5
5
|
export { Switch };
|
|
@@ -4,11 +4,11 @@ import { cn } from "@codefast/tailwind-variants";
|
|
|
4
4
|
import { Root, Thumb } from "@radix-ui/react-switch";
|
|
5
5
|
function Switch({ className, ...props }) {
|
|
6
6
|
return /*#__PURE__*/ jsx(Root, {
|
|
7
|
-
className: cn(
|
|
7
|
+
className: cn("peer inline-flex h-5 w-9 shrink-0 items-center rounded-full border border-transparent p-0.75 shadow-xs outline-hidden transition-all focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:not-data-[state=checked]:border-ring/60 disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:focus-visible:ring-primary/20 data-[state=unchecked]:bg-input dark:data-[state=checked]:focus-visible:ring-primary/40 dark:data-[state=unchecked]:bg-input/80", className),
|
|
8
8
|
"data-slot": "switch",
|
|
9
9
|
...props,
|
|
10
10
|
children: /*#__PURE__*/ jsx(Thumb, {
|
|
11
|
-
className: "
|
|
11
|
+
className: "pointer-events-none block size-3.5 rounded-full bg-background shadow-sm transition-transform data-[state=checked]:translate-x-3.5 data-[state=unchecked]:translate-x-0 dark:not-data-[state=checked]:bg-foreground",
|
|
12
12
|
"data-slot": "switch-thumb"
|
|
13
13
|
})
|
|
14
14
|
});
|
|
@@ -40,7 +40,7 @@ function Table({ className, ...props }) {
|
|
|
40
40
|
className: "relative w-full overflow-auto",
|
|
41
41
|
"data-slot": "table-cotainer",
|
|
42
42
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("table", {
|
|
43
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
43
|
+
className: (0, tailwind_variants_namespaceObject.cn)("w-full caption-bottom text-sm", className),
|
|
44
44
|
"data-slot": "table",
|
|
45
45
|
...props
|
|
46
46
|
})
|
|
@@ -48,49 +48,49 @@ function Table({ className, ...props }) {
|
|
|
48
48
|
}
|
|
49
49
|
function TableHeader({ className, ...props }) {
|
|
50
50
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("thead", {
|
|
51
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
51
|
+
className: (0, tailwind_variants_namespaceObject.cn)("*:border-b *:has-aria-expanded:bg-transparent", className),
|
|
52
52
|
"data-slot": "table-header",
|
|
53
53
|
...props
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
56
|
function TableBody({ className, ...props }) {
|
|
57
57
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("tbody", {
|
|
58
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
58
|
+
className: (0, tailwind_variants_namespaceObject.cn)("*:last-child:border-0", className),
|
|
59
59
|
"data-slot": "table-body",
|
|
60
60
|
...props
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
63
|
function TableFooter({ className, ...props }) {
|
|
64
64
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("tfoot", {
|
|
65
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
65
|
+
className: (0, tailwind_variants_namespaceObject.cn)("bg-muted/50 font-medium *:border-t *:border-b-0 *:has-aria-expanded:bg-transparent", className),
|
|
66
66
|
"data-slot": "table-footer",
|
|
67
67
|
...props
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
70
|
function TableRow({ className, ...props }) {
|
|
71
71
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("tr", {
|
|
72
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
72
|
+
className: (0, tailwind_variants_namespaceObject.cn)("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted", className),
|
|
73
73
|
"data-slot": "table-row",
|
|
74
74
|
...props
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
77
|
function TableHead({ className, ...props }) {
|
|
78
78
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("th", {
|
|
79
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
79
|
+
className: (0, tailwind_variants_namespaceObject.cn)("p-2 text-left align-middle font-medium", className),
|
|
80
80
|
"data-slot": "table-head",
|
|
81
81
|
...props
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
84
|
function TableCell({ className, ...props }) {
|
|
85
85
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("td", {
|
|
86
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
86
|
+
className: (0, tailwind_variants_namespaceObject.cn)("p-2 align-middle", className),
|
|
87
87
|
"data-slot": "table-cell",
|
|
88
88
|
...props
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
91
|
function TableCaption({ className, ...props }) {
|
|
92
92
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("caption", {
|
|
93
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
93
|
+
className: (0, tailwind_variants_namespaceObject.cn)("mt-4 text-sm text-muted-foreground", className),
|
|
94
94
|
"data-slot": "table-caption",
|
|
95
95
|
...props
|
|
96
96
|
});
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import type { ComponentProps, JSX } from
|
|
2
|
-
type TableProps = ComponentProps<
|
|
1
|
+
import type { ComponentProps, JSX } from "react";
|
|
2
|
+
type TableProps = ComponentProps<"table">;
|
|
3
3
|
declare function Table({ className, ...props }: TableProps): JSX.Element;
|
|
4
|
-
type TableHeaderProps = ComponentProps<
|
|
4
|
+
type TableHeaderProps = ComponentProps<"thead">;
|
|
5
5
|
declare function TableHeader({ className, ...props }: TableHeaderProps): JSX.Element;
|
|
6
|
-
type TableBodyProps = ComponentProps<
|
|
6
|
+
type TableBodyProps = ComponentProps<"tbody">;
|
|
7
7
|
declare function TableBody({ className, ...props }: TableBodyProps): JSX.Element;
|
|
8
|
-
type TableFooterProps = ComponentProps<
|
|
8
|
+
type TableFooterProps = ComponentProps<"tfoot">;
|
|
9
9
|
declare function TableFooter({ className, ...props }: TableFooterProps): JSX.Element;
|
|
10
|
-
type TableRowProps = ComponentProps<
|
|
10
|
+
type TableRowProps = ComponentProps<"tr">;
|
|
11
11
|
declare function TableRow({ className, ...props }: TableRowProps): JSX.Element;
|
|
12
|
-
type TableHeadProps = ComponentProps<
|
|
12
|
+
type TableHeadProps = ComponentProps<"th">;
|
|
13
13
|
declare function TableHead({ className, ...props }: TableHeadProps): JSX.Element;
|
|
14
|
-
type TableCellProps = ComponentProps<
|
|
14
|
+
type TableCellProps = ComponentProps<"td">;
|
|
15
15
|
declare function TableCell({ className, ...props }: TableCellProps): JSX.Element;
|
|
16
|
-
type TableCaptionProps = ComponentProps<
|
|
16
|
+
type TableCaptionProps = ComponentProps<"caption">;
|
|
17
17
|
declare function TableCaption({ className, ...props }: TableCaptionProps): JSX.Element;
|
|
18
18
|
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
|
|
19
19
|
export type { TableBodyProps, TableCaptionProps, TableCellProps, TableFooterProps, TableHeaderProps, TableHeadProps, TableProps, TableRowProps, };
|
package/dist/components/table.js
CHANGED
|
@@ -5,7 +5,7 @@ function Table({ className, ...props }) {
|
|
|
5
5
|
className: "relative w-full overflow-auto",
|
|
6
6
|
"data-slot": "table-cotainer",
|
|
7
7
|
children: /*#__PURE__*/ jsx("table", {
|
|
8
|
-
className: cn(
|
|
8
|
+
className: cn("w-full caption-bottom text-sm", className),
|
|
9
9
|
"data-slot": "table",
|
|
10
10
|
...props
|
|
11
11
|
})
|
|
@@ -13,49 +13,49 @@ function Table({ className, ...props }) {
|
|
|
13
13
|
}
|
|
14
14
|
function TableHeader({ className, ...props }) {
|
|
15
15
|
return /*#__PURE__*/ jsx("thead", {
|
|
16
|
-
className: cn(
|
|
16
|
+
className: cn("*:border-b *:has-aria-expanded:bg-transparent", className),
|
|
17
17
|
"data-slot": "table-header",
|
|
18
18
|
...props
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
function TableBody({ className, ...props }) {
|
|
22
22
|
return /*#__PURE__*/ jsx("tbody", {
|
|
23
|
-
className: cn(
|
|
23
|
+
className: cn("*:last-child:border-0", className),
|
|
24
24
|
"data-slot": "table-body",
|
|
25
25
|
...props
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
function TableFooter({ className, ...props }) {
|
|
29
29
|
return /*#__PURE__*/ jsx("tfoot", {
|
|
30
|
-
className: cn(
|
|
30
|
+
className: cn("bg-muted/50 font-medium *:border-t *:border-b-0 *:has-aria-expanded:bg-transparent", className),
|
|
31
31
|
"data-slot": "table-footer",
|
|
32
32
|
...props
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
function TableRow({ className, ...props }) {
|
|
36
36
|
return /*#__PURE__*/ jsx("tr", {
|
|
37
|
-
className: cn(
|
|
37
|
+
className: cn("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted", className),
|
|
38
38
|
"data-slot": "table-row",
|
|
39
39
|
...props
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
function TableHead({ className, ...props }) {
|
|
43
43
|
return /*#__PURE__*/ jsx("th", {
|
|
44
|
-
className: cn(
|
|
44
|
+
className: cn("p-2 text-left align-middle font-medium", className),
|
|
45
45
|
"data-slot": "table-head",
|
|
46
46
|
...props
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
function TableCell({ className, ...props }) {
|
|
50
50
|
return /*#__PURE__*/ jsx("td", {
|
|
51
|
-
className: cn(
|
|
51
|
+
className: cn("p-2 align-middle", className),
|
|
52
52
|
"data-slot": "table-cell",
|
|
53
53
|
...props
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
56
|
function TableCaption({ className, ...props }) {
|
|
57
57
|
return /*#__PURE__*/ jsx("caption", {
|
|
58
|
-
className: cn(
|
|
58
|
+
className: cn("mt-4 text-sm text-muted-foreground", className),
|
|
59
59
|
"data-slot": "table-caption",
|
|
60
60
|
...props
|
|
61
61
|
});
|
package/dist/components/tabs.cjs
CHANGED
|
@@ -35,28 +35,28 @@ const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants")
|
|
|
35
35
|
const react_tabs_namespaceObject = require("@radix-ui/react-tabs");
|
|
36
36
|
function Tabs({ className, ...props }) {
|
|
37
37
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_tabs_namespaceObject.Root, {
|
|
38
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
38
|
+
className: (0, tailwind_variants_namespaceObject.cn)("flex flex-col gap-2", className),
|
|
39
39
|
"data-slot": "tabs",
|
|
40
40
|
...props
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
43
|
function TabsList({ className, ...props }) {
|
|
44
44
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_tabs_namespaceObject.List, {
|
|
45
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
45
|
+
className: (0, tailwind_variants_namespaceObject.cn)("inline-flex w-fit items-center justify-center gap-1 rounded-xl bg-muted px-1 py-1 text-muted-foreground", className),
|
|
46
46
|
"data-slot": "tabs-list",
|
|
47
47
|
...props
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
function TabsTrigger({ className, ...props }) {
|
|
51
51
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_tabs_namespaceObject.Trigger, {
|
|
52
|
-
className: (0, tailwind_variants_namespaceObject.cn)("
|
|
52
|
+
className: (0, tailwind_variants_namespaceObject.cn)("inline-flex items-center justify-center gap-1.5 rounded-lg px-2 py-1.5 text-sm font-medium whitespace-nowrap text-muted-foreground transition not-dark:outline-hidden hover:not-disabled:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm dark:-outline-offset-1 dark:outline-ring dark:data-[state=active]:bg-input/50 dark:data-[state=active]:outline-1 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
53
53
|
"data-slot": "tabs-trigger",
|
|
54
54
|
...props
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
57
|
function TabsContent({ className, ...props }) {
|
|
58
58
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_tabs_namespaceObject.Content, {
|
|
59
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
59
|
+
className: (0, tailwind_variants_namespaceObject.cn)("mt-2 rounded-xl ring-ring/50 outline-ring focus-visible:ring-4 focus-visible:outline-1", className),
|
|
60
60
|
"data-slot": "tabs-content",
|
|
61
61
|
...props
|
|
62
62
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ComponentProps, JSX } from
|
|
2
|
-
import * as TabsPrimitive from
|
|
1
|
+
import type { ComponentProps, JSX } from "react";
|
|
2
|
+
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
3
3
|
type TabsProps = ComponentProps<typeof TabsPrimitive.Root>;
|
|
4
4
|
declare function Tabs({ className, ...props }: TabsProps): JSX.Element;
|
|
5
5
|
type TabsListProps = ComponentProps<typeof TabsPrimitive.List>;
|
package/dist/components/tabs.js
CHANGED
|
@@ -4,28 +4,28 @@ import { cn } from "@codefast/tailwind-variants";
|
|
|
4
4
|
import { Content, List, Root, Trigger } from "@radix-ui/react-tabs";
|
|
5
5
|
function Tabs({ className, ...props }) {
|
|
6
6
|
return /*#__PURE__*/ jsx(Root, {
|
|
7
|
-
className: cn(
|
|
7
|
+
className: cn("flex flex-col gap-2", className),
|
|
8
8
|
"data-slot": "tabs",
|
|
9
9
|
...props
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
function TabsList({ className, ...props }) {
|
|
13
13
|
return /*#__PURE__*/ jsx(List, {
|
|
14
|
-
className: cn(
|
|
14
|
+
className: cn("inline-flex w-fit items-center justify-center gap-1 rounded-xl bg-muted px-1 py-1 text-muted-foreground", className),
|
|
15
15
|
"data-slot": "tabs-list",
|
|
16
16
|
...props
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
function TabsTrigger({ className, ...props }) {
|
|
20
20
|
return /*#__PURE__*/ jsx(Trigger, {
|
|
21
|
-
className: cn("
|
|
21
|
+
className: cn("inline-flex items-center justify-center gap-1.5 rounded-lg px-2 py-1.5 text-sm font-medium whitespace-nowrap text-muted-foreground transition not-dark:outline-hidden hover:not-disabled:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm dark:-outline-offset-1 dark:outline-ring dark:data-[state=active]:bg-input/50 dark:data-[state=active]:outline-1 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
22
22
|
"data-slot": "tabs-trigger",
|
|
23
23
|
...props
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
function TabsContent({ className, ...props }) {
|
|
27
27
|
return /*#__PURE__*/ jsx(Content, {
|
|
28
|
-
className: cn(
|
|
28
|
+
className: cn("mt-2 rounded-xl ring-ring/50 outline-ring focus-visible:ring-4 focus-visible:outline-1", className),
|
|
29
29
|
"data-slot": "tabs-content",
|
|
30
30
|
...props
|
|
31
31
|
});
|
|
@@ -30,7 +30,7 @@ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
|
30
30
|
const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants");
|
|
31
31
|
function Textarea({ className, ...props }) {
|
|
32
32
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("textarea", {
|
|
33
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
33
|
+
className: (0, tailwind_variants_namespaceObject.cn)("flex min-h-16 w-full grow rounded-lg border border-input px-3 py-2 text-base shadow-xs outline-hidden transition placeholder:text-muted-foreground hover:not-disabled:not-focus-visible:border-ring/60 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50 aria-invalid:border-destructive focus-within:aria-invalid:ring-destructive/20 hover:not-disabled:not-focus-within:aria-invalid:border-destructive/60 md:text-sm dark:bg-input/30 dark:focus-within:aria-invalid:ring-destructive/40", className),
|
|
34
34
|
"data-slot": "textarea",
|
|
35
35
|
...props
|
|
36
36
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ComponentProps, JSX } from
|
|
2
|
-
type TextareaProps = ComponentProps<
|
|
1
|
+
import type { ComponentProps, JSX } from "react";
|
|
2
|
+
type TextareaProps = ComponentProps<"textarea">;
|
|
3
3
|
declare function Textarea({ className, ...props }: TextareaProps): JSX.Element;
|
|
4
4
|
export { Textarea };
|
|
5
5
|
export type { TextareaProps };
|
|
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { cn } from "@codefast/tailwind-variants";
|
|
3
3
|
function Textarea({ className, ...props }) {
|
|
4
4
|
return /*#__PURE__*/ jsx("textarea", {
|
|
5
|
-
className: cn(
|
|
5
|
+
className: cn("flex min-h-16 w-full grow rounded-lg border border-input px-3 py-2 text-base shadow-xs outline-hidden transition placeholder:text-muted-foreground hover:not-disabled:not-focus-visible:border-ring/60 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50 aria-invalid:border-destructive focus-within:aria-invalid:ring-destructive/20 hover:not-disabled:not-focus-within:aria-invalid:border-destructive/60 md:text-sm dark:bg-input/30 dark:focus-within:aria-invalid:ring-destructive/40", className),
|
|
6
6
|
"data-slot": "textarea",
|
|
7
7
|
...props
|
|
8
8
|
});
|
|
@@ -33,7 +33,7 @@ const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants")
|
|
|
33
33
|
const react_context_namespaceObject = require("@radix-ui/react-context");
|
|
34
34
|
const react_toggle_group_namespaceObject = require("@radix-ui/react-toggle-group");
|
|
35
35
|
const external_toggle_cjs_namespaceObject = require("./toggle.cjs");
|
|
36
|
-
const TOGGLE_GROUP_NAME =
|
|
36
|
+
const TOGGLE_GROUP_NAME = "ToggleGroup";
|
|
37
37
|
const [createToggleGroupContext] = (0, react_context_namespaceObject.createContextScope)(TOGGLE_GROUP_NAME, [
|
|
38
38
|
react_toggle_group_namespaceObject.createToggleGroupScope
|
|
39
39
|
]);
|
|
@@ -47,13 +47,13 @@ function ToggleGroup({ __scopeToggleGroup, children, className, size, spacing =
|
|
|
47
47
|
spacing: spacing,
|
|
48
48
|
variant: variant,
|
|
49
49
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_toggle_group_namespaceObject.Root, {
|
|
50
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
50
|
+
className: (0, tailwind_variants_namespaceObject.cn)("group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))] rounded-lg data-[spacing=default]:data-[variant=outline]:shadow-xs", className),
|
|
51
51
|
"data-size": size,
|
|
52
52
|
"data-slot": "toggle-group",
|
|
53
53
|
"data-spacing": spacing,
|
|
54
54
|
"data-variant": variant,
|
|
55
55
|
style: {
|
|
56
|
-
|
|
56
|
+
"--gap": spacing
|
|
57
57
|
},
|
|
58
58
|
...toggleGroupScope,
|
|
59
59
|
...props,
|
|
@@ -61,7 +61,7 @@ function ToggleGroup({ __scopeToggleGroup, children, className, size, spacing =
|
|
|
61
61
|
})
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
|
-
const TOGGLE_GROUP_ITEM_NAME =
|
|
64
|
+
const TOGGLE_GROUP_ITEM_NAME = "ToggleGroupItem";
|
|
65
65
|
function ToggleGroupItem({ __scopeToggleGroup, children, className, ...props }) {
|
|
66
66
|
const { size, spacing, variant } = useToggleGroupContext(TOGGLE_GROUP_ITEM_NAME, __scopeToggleGroup);
|
|
67
67
|
const toggleGroupScope = useToggleGroupScope(__scopeToggleGroup);
|
|
@@ -70,7 +70,7 @@ function ToggleGroupItem({ __scopeToggleGroup, children, className, ...props })
|
|
|
70
70
|
className,
|
|
71
71
|
size,
|
|
72
72
|
variant
|
|
73
|
-
}),
|
|
73
|
+
}), "w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10", "data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-lg data-[spacing=0]:last:rounded-r-lg data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l"),
|
|
74
74
|
"data-size": size,
|
|
75
75
|
"data-slot": "toggle-group-item",
|
|
76
76
|
"data-spacing": spacing,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Scope } from
|
|
2
|
-
import type { ComponentProps, JSX } from
|
|
3
|
-
import * as ToggleGroupPrimitive from
|
|
4
|
-
import type { ToggleVariants } from
|
|
1
|
+
import type { Scope } from "@radix-ui/react-context";
|
|
2
|
+
import type { ComponentProps, JSX } from "react";
|
|
3
|
+
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
4
|
+
import type { ToggleVariants } from "./toggle";
|
|
5
5
|
type ScopedProps<P> = P & {
|
|
6
6
|
__scopeToggleGroup?: Scope;
|
|
7
7
|
};
|
|
@@ -4,7 +4,7 @@ import { cn } from "@codefast/tailwind-variants";
|
|
|
4
4
|
import { createContextScope } from "@radix-ui/react-context";
|
|
5
5
|
import { Item, Root, createToggleGroupScope } from "@radix-ui/react-toggle-group";
|
|
6
6
|
import { toggleVariants } from "./toggle.js";
|
|
7
|
-
const TOGGLE_GROUP_NAME =
|
|
7
|
+
const TOGGLE_GROUP_NAME = "ToggleGroup";
|
|
8
8
|
const [createToggleGroupContext] = createContextScope(TOGGLE_GROUP_NAME, [
|
|
9
9
|
createToggleGroupScope
|
|
10
10
|
]);
|
|
@@ -18,13 +18,13 @@ function ToggleGroup({ __scopeToggleGroup, children, className, size, spacing =
|
|
|
18
18
|
spacing: spacing,
|
|
19
19
|
variant: variant,
|
|
20
20
|
children: /*#__PURE__*/ jsx(Root, {
|
|
21
|
-
className: cn(
|
|
21
|
+
className: cn("group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))] rounded-lg data-[spacing=default]:data-[variant=outline]:shadow-xs", className),
|
|
22
22
|
"data-size": size,
|
|
23
23
|
"data-slot": "toggle-group",
|
|
24
24
|
"data-spacing": spacing,
|
|
25
25
|
"data-variant": variant,
|
|
26
26
|
style: {
|
|
27
|
-
|
|
27
|
+
"--gap": spacing
|
|
28
28
|
},
|
|
29
29
|
...toggleGroupScope,
|
|
30
30
|
...props,
|
|
@@ -32,7 +32,7 @@ function ToggleGroup({ __scopeToggleGroup, children, className, size, spacing =
|
|
|
32
32
|
})
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
|
-
const TOGGLE_GROUP_ITEM_NAME =
|
|
35
|
+
const TOGGLE_GROUP_ITEM_NAME = "ToggleGroupItem";
|
|
36
36
|
function ToggleGroupItem({ __scopeToggleGroup, children, className, ...props }) {
|
|
37
37
|
const { size, spacing, variant } = useToggleGroupContext(TOGGLE_GROUP_ITEM_NAME, __scopeToggleGroup);
|
|
38
38
|
const toggleGroupScope = useToggleGroupScope(__scopeToggleGroup);
|
|
@@ -41,7 +41,7 @@ function ToggleGroupItem({ __scopeToggleGroup, children, className, ...props })
|
|
|
41
41
|
className,
|
|
42
42
|
size,
|
|
43
43
|
variant
|
|
44
|
-
}),
|
|
44
|
+
}), "w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10", "data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-lg data-[spacing=0]:last:rounded-r-lg data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l"),
|
|
45
45
|
"data-size": size,
|
|
46
46
|
"data-slot": "toggle-group-item",
|
|
47
47
|
"data-spacing": spacing,
|
|
@@ -32,21 +32,21 @@ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
|
32
32
|
const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants");
|
|
33
33
|
const react_toggle_namespaceObject = require("@radix-ui/react-toggle");
|
|
34
34
|
const toggleVariants = (0, tailwind_variants_namespaceObject.tv)({
|
|
35
|
-
base: "inline-flex items-center justify-center gap-2 rounded-lg 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
|
|
35
|
+
base: "inline-flex items-center justify-center gap-2 rounded-lg text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none hover:bg-muted hover:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
36
36
|
variants: {
|
|
37
37
|
size: {
|
|
38
|
-
default:
|
|
39
|
-
lg:
|
|
40
|
-
sm:
|
|
38
|
+
default: "h-9 min-w-9 px-2",
|
|
39
|
+
lg: "h-10 min-w-10 px-2.5",
|
|
40
|
+
sm: "h-8 min-w-8 px-1.5"
|
|
41
41
|
},
|
|
42
42
|
variant: {
|
|
43
|
-
default:
|
|
44
|
-
outline:
|
|
43
|
+
default: "bg-transparent",
|
|
44
|
+
outline: "border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
defaultVariants: {
|
|
48
|
-
size:
|
|
49
|
-
variant:
|
|
48
|
+
size: "default",
|
|
49
|
+
variant: "default"
|
|
50
50
|
}
|
|
51
51
|
});
|
|
52
52
|
function Toggle({ children, className, size, variant, ...props }) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { VariantProps } from
|
|
2
|
-
import type { ComponentProps, JSX } from
|
|
3
|
-
import * as TogglePrimitive from
|
|
1
|
+
import type { VariantProps } from "@codefast/tailwind-variants";
|
|
2
|
+
import type { ComponentProps, JSX } from "react";
|
|
3
|
+
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
4
4
|
declare const toggleVariants: import("@codefast/tailwind-variants").VariantFunctionType<{
|
|
5
5
|
size: {
|
|
6
6
|
default: string;
|
|
@@ -3,21 +3,21 @@ import { jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { tv } from "@codefast/tailwind-variants";
|
|
4
4
|
import { Root } from "@radix-ui/react-toggle";
|
|
5
5
|
const toggleVariants = tv({
|
|
6
|
-
base: "inline-flex items-center justify-center gap-2 rounded-lg 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
|
|
6
|
+
base: "inline-flex items-center justify-center gap-2 rounded-lg text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none hover:bg-muted hover:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
7
7
|
variants: {
|
|
8
8
|
size: {
|
|
9
|
-
default:
|
|
10
|
-
lg:
|
|
11
|
-
sm:
|
|
9
|
+
default: "h-9 min-w-9 px-2",
|
|
10
|
+
lg: "h-10 min-w-10 px-2.5",
|
|
11
|
+
sm: "h-8 min-w-8 px-1.5"
|
|
12
12
|
},
|
|
13
13
|
variant: {
|
|
14
|
-
default:
|
|
15
|
-
outline:
|
|
14
|
+
default: "bg-transparent",
|
|
15
|
+
outline: "border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
defaultVariants: {
|
|
19
|
-
size:
|
|
20
|
-
variant:
|
|
19
|
+
size: "default",
|
|
20
|
+
variant: "default"
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
23
|
function Toggle({ children, className, size, variant, ...props }) {
|
|
@@ -55,7 +55,7 @@ function TooltipTrigger({ ...props }) {
|
|
|
55
55
|
function TooltipContent({ children, className, sideOffset = 4, ...props }) {
|
|
56
56
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_tooltip_namespaceObject.Portal, {
|
|
57
57
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(react_tooltip_namespaceObject.Content, {
|
|
58
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
58
|
+
className: (0, tailwind_variants_namespaceObject.cn)("z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md bg-primary px-3 py-1.5 text-xs text-balance text-primary-foreground ease-ui data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-[state=delayed-open]:data-[side=bottom]:slide-in-from-top-2 data-[state=delayed-open]:data-[side=left]:slide-in-from-right-2 data-[state=delayed-open]:data-[side=right]:slide-in-from-left-2 data-[state=delayed-open]:data-[side=top]:slide-in-from-bottom-2", "max-w-(--radix-tooltip-content-available-width)", className),
|
|
59
59
|
collisionPadding: 8,
|
|
60
60
|
"data-slot": "tooltip-content",
|
|
61
61
|
sideOffset: sideOffset,
|
|
@@ -69,7 +69,7 @@ function TooltipContent({ children, className, sideOffset = 4, ...props }) {
|
|
|
69
69
|
}
|
|
70
70
|
function TooltipArrow({ className, ...props }) {
|
|
71
71
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_tooltip_namespaceObject.Arrow, {
|
|
72
|
-
className: (0, tailwind_variants_namespaceObject.cn)(
|
|
72
|
+
className: (0, tailwind_variants_namespaceObject.cn)("fill-primary", className),
|
|
73
73
|
"data-slot": "tooltip-arrow",
|
|
74
74
|
...props
|
|
75
75
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ComponentProps, JSX } from
|
|
2
|
-
import * as TooltipPrimitive from
|
|
1
|
+
import type { ComponentProps, JSX } from "react";
|
|
2
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
3
3
|
type TooltipProviderProps = ComponentProps<typeof TooltipPrimitive.Provider>;
|
|
4
4
|
declare function TooltipProvider({ ...props }: TooltipProviderProps): JSX.Element;
|
|
5
5
|
type TooltipProps = ComponentProps<typeof TooltipPrimitive.Root>;
|
|
@@ -11,4 +11,4 @@ declare function TooltipContent({ children, className, sideOffset, ...props }: T
|
|
|
11
11
|
type TooltipArrowProps = ComponentProps<typeof TooltipPrimitive.Arrow>;
|
|
12
12
|
declare function TooltipArrow({ className, ...props }: TooltipArrowProps): JSX.Element;
|
|
13
13
|
export { Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
14
|
-
export type { TooltipArrowProps, TooltipContentProps, TooltipProps, TooltipProviderProps, TooltipTriggerProps };
|
|
14
|
+
export type { TooltipArrowProps, TooltipContentProps, TooltipProps, TooltipProviderProps, TooltipTriggerProps, };
|
|
@@ -23,7 +23,7 @@ function TooltipTrigger({ ...props }) {
|
|
|
23
23
|
function TooltipContent({ children, className, sideOffset = 4, ...props }) {
|
|
24
24
|
return /*#__PURE__*/ jsx(Portal, {
|
|
25
25
|
children: /*#__PURE__*/ jsxs(Content, {
|
|
26
|
-
className: cn(
|
|
26
|
+
className: cn("z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md bg-primary px-3 py-1.5 text-xs text-balance text-primary-foreground ease-ui data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-[state=delayed-open]:data-[side=bottom]:slide-in-from-top-2 data-[state=delayed-open]:data-[side=left]:slide-in-from-right-2 data-[state=delayed-open]:data-[side=right]:slide-in-from-left-2 data-[state=delayed-open]:data-[side=top]:slide-in-from-bottom-2", "max-w-(--radix-tooltip-content-available-width)", className),
|
|
27
27
|
collisionPadding: 8,
|
|
28
28
|
"data-slot": "tooltip-content",
|
|
29
29
|
sideOffset: sideOffset,
|
|
@@ -37,7 +37,7 @@ function TooltipContent({ children, className, sideOffset = 4, ...props }) {
|
|
|
37
37
|
}
|
|
38
38
|
function TooltipArrow({ className, ...props }) {
|
|
39
39
|
return /*#__PURE__*/ jsx(Arrow, {
|
|
40
|
-
className: cn(
|
|
40
|
+
className: cn("fill-primary", className),
|
|
41
41
|
"data-slot": "tooltip-arrow",
|
|
42
42
|
...props
|
|
43
43
|
});
|
package/dist/css/preset.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
@import
|
|
1
|
+
@import "tw-animate-css";
|
|
2
2
|
|
|
3
|
-
@source
|
|
3
|
+
@source "../**/*.js";
|
|
4
4
|
|
|
5
5
|
@custom-variant dark (&:where(.dark, .dark *));
|
|
6
6
|
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
::-webkit-scrollbar-thumb {
|
|
88
|
-
@apply bg-border
|
|
88
|
+
@apply rounded-full bg-border;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
* {
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
margin: 0;
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
&[type=
|
|
114
|
+
&[type="number"] {
|
|
115
115
|
-moz-appearance: textfield;
|
|
116
116
|
}
|
|
117
117
|
}
|
package/dist/css/style.css
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
@import
|
|
2
|
-
@import
|
|
3
|
-
@import
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
@import "./neutral.css";
|
|
3
|
+
@import "./preset.css";
|
|
@@ -31,7 +31,7 @@ const external_react_namespaceObject = require("react");
|
|
|
31
31
|
function useCopyToClipboard({ onCopy, timeout = 2000 } = {}) {
|
|
32
32
|
const [isCopied, setIsCopied] = (0, external_react_namespaceObject.useState)(false);
|
|
33
33
|
const copyToClipboard = async (value)=>{
|
|
34
|
-
if ("u" < typeof window || !(
|
|
34
|
+
if ("u" < typeof window || !("clipboard" in navigator) || "function" != typeof navigator.clipboard.writeText) return;
|
|
35
35
|
if (!value) return;
|
|
36
36
|
try {
|
|
37
37
|
await navigator.clipboard.writeText(value);
|