@codefast/ui 0.3.11 → 0.3.12-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 +15 -0
- package/README.md +4 -0
- package/dist/components/accordion.d.ts +11 -29
- package/dist/components/accordion.d.ts.map +1 -0
- package/dist/components/accordion.js +10 -37
- package/dist/components/alert-dialog.d.ts +25 -60
- package/dist/components/alert-dialog.d.ts.map +1 -0
- package/dist/components/alert-dialog.js +16 -69
- package/dist/components/alert.d.ts +16 -27
- package/dist/components/alert.d.ts.map +1 -0
- package/dist/components/alert.js +22 -30
- package/dist/components/aspect-ratio.d.ts +5 -8
- package/dist/components/aspect-ratio.d.ts.map +1 -0
- package/dist/components/aspect-ratio.js +5 -7
- package/dist/components/avatar.d.ts +7 -17
- package/dist/components/avatar.d.ts.map +1 -0
- package/dist/components/avatar.js +7 -18
- package/dist/components/badge.d.ts +15 -21
- package/dist/components/badge.d.ts.map +1 -0
- package/dist/components/badge.js +23 -20
- package/dist/components/breadcrumb.d.ts +13 -35
- package/dist/components/breadcrumb.d.ts.map +1 -0
- package/dist/components/breadcrumb.js +13 -49
- package/dist/components/button-group.d.ts +15 -29
- package/dist/components/button-group.d.ts.map +1 -0
- package/dist/components/button-group.js +22 -27
- package/dist/components/button.d.ts +26 -35
- package/dist/components/button.d.ts.map +1 -0
- package/dist/components/button.js +43 -51
- package/dist/components/calendar.d.ts +10 -24
- package/dist/components/calendar.d.ts.map +1 -0
- package/dist/components/calendar.js +75 -92
- package/dist/components/card.d.ts +11 -34
- package/dist/components/card.d.ts.map +1 -0
- package/dist/components/card.js +11 -39
- package/dist/components/carousel.d.ts +25 -55
- package/dist/components/carousel.d.ts.map +1 -0
- package/dist/components/carousel.js +82 -114
- package/dist/components/chart.d.ts +37 -72
- package/dist/components/chart.d.ts.map +1 -0
- package/dist/components/chart.js +161 -150
- package/dist/components/checkbox-cards.d.ts +9 -15
- package/dist/components/checkbox-cards.d.ts.map +1 -0
- package/dist/components/checkbox-cards.js +8 -22
- package/dist/components/checkbox-group.d.ts +9 -16
- package/dist/components/checkbox-group.d.ts.map +1 -0
- package/dist/components/checkbox-group.js +7 -19
- package/dist/components/checkbox.d.ts +5 -9
- package/dist/components/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox.js +6 -14
- package/dist/components/collapsible.d.ts +7 -14
- package/dist/components/collapsible.d.ts.map +1 -0
- package/dist/components/collapsible.js +7 -15
- package/dist/components/command.d.ts +24 -55
- package/dist/components/command.d.ts.map +1 -0
- package/dist/components/command.js +18 -69
- package/dist/components/context-menu.d.ts +23 -72
- package/dist/components/context-menu.d.ts.map +1 -0
- package/dist/components/context-menu.js +21 -89
- package/dist/components/dialog.d.ts +23 -53
- package/dist/components/dialog.d.ts.map +1 -0
- package/dist/components/dialog.js +20 -72
- package/dist/components/drawer.d.ts +29 -60
- package/dist/components/drawer.d.ts.map +1 -0
- package/dist/components/drawer.js +16 -58
- package/dist/components/dropdown-menu.d.ts +23 -73
- package/dist/components/dropdown-menu.d.ts.map +1 -0
- package/dist/components/dropdown-menu.js +21 -96
- package/dist/components/empty.d.ts +16 -37
- package/dist/components/empty.d.ts.map +1 -0
- package/dist/components/empty.js +24 -44
- package/dist/components/field.d.ts +26 -63
- package/dist/components/field.d.ts.map +1 -0
- package/dist/components/field.js +46 -89
- package/dist/components/form.d.ts +16 -37
- package/dist/components/form.d.ts.map +1 -0
- package/dist/components/form.js +50 -66
- package/dist/components/hover-card.d.ts +8 -21
- package/dist/components/hover-card.d.ts.map +1 -0
- package/dist/components/hover-card.js +8 -23
- package/dist/components/input-group.d.ts +29 -53
- package/dist/components/input-group.d.ts.map +1 -0
- package/dist/components/input-group.js +59 -66
- package/dist/components/input-number.d.ts +8 -28
- package/dist/components/input-number.d.ts.map +1 -0
- package/dist/components/input-number.js +14 -55
- package/dist/components/input-otp.d.ts +11 -24
- package/dist/components/input-otp.d.ts.map +1 -0
- package/dist/components/input-otp.js +13 -34
- package/dist/components/input-password.d.ts +6 -12
- package/dist/components/input-password.d.ts.map +1 -0
- package/dist/components/input-password.js +10 -31
- package/dist/components/input-search.d.ts +9 -18
- package/dist/components/input-search.d.ts.map +1 -0
- package/dist/components/input-search.js +16 -44
- package/dist/components/input.d.ts +5 -10
- package/dist/components/input.d.ts.map +1 -0
- package/dist/components/input.js +5 -9
- package/dist/components/item.d.ts +33 -69
- package/dist/components/item.d.ts.map +1 -0
- package/dist/components/item.js +47 -90
- package/dist/components/kbd.d.ts +6 -13
- package/dist/components/kbd.d.ts.map +1 -0
- package/dist/components/kbd.js +6 -13
- package/dist/components/label.d.ts +5 -9
- package/dist/components/label.d.ts.map +1 -0
- package/dist/components/label.js +5 -8
- package/dist/components/menubar.d.ts +24 -80
- package/dist/components/menubar.d.ts.map +1 -0
- package/dist/components/menubar.js +23 -99
- package/dist/components/native-select.d.ts +7 -16
- package/dist/components/native-select.d.ts.map +1 -0
- package/dist/components/native-select.js +7 -25
- package/dist/components/navigation-menu.d.ts +13 -36
- package/dist/components/navigation-menu.d.ts.map +1 -0
- package/dist/components/navigation-menu.js +25 -61
- package/dist/components/pagination.d.ts +15 -35
- package/dist/components/pagination.d.ts.map +1 -0
- package/dist/components/pagination.js +13 -55
- package/dist/components/popover.d.ts +9 -24
- package/dist/components/popover.d.ts.map +1 -0
- package/dist/components/popover.js +9 -27
- package/dist/components/progress-circle.d.ts +89 -106
- package/dist/components/progress-circle.d.ts.map +1 -0
- package/dist/components/progress-circle.js +70 -103
- package/dist/components/progress.d.ts +5 -10
- package/dist/components/progress.d.ts.map +1 -0
- package/dist/components/progress.js +7 -13
- package/dist/components/radio-cards.d.ts +5 -10
- package/dist/components/radio-cards.d.ts.map +1 -0
- package/dist/components/radio-cards.js +7 -21
- package/dist/components/radio-group.d.ts +6 -13
- package/dist/components/radio-group.d.ts.map +1 -0
- package/dist/components/radio-group.js +6 -17
- package/dist/components/radio.d.ts +6 -12
- package/dist/components/radio.d.ts.map +1 -0
- package/dist/components/radio.js +5 -10
- package/dist/components/resizable.d.ts +8 -18
- package/dist/components/resizable.d.ts.map +1 -0
- package/dist/components/resizable.js +7 -21
- package/dist/components/scroll-area.d.ts +21 -33
- package/dist/components/scroll-area.d.ts.map +1 -0
- package/dist/components/scroll-area.js +64 -84
- package/dist/components/select.d.ts +17 -50
- package/dist/components/select.d.ts.map +1 -0
- package/dist/components/select.js +26 -78
- package/dist/components/separator.d.ts +20 -29
- package/dist/components/separator.d.ts.map +1 -0
- package/dist/components/separator.js +27 -36
- package/dist/components/sheet.d.ts +30 -62
- package/dist/components/sheet.d.ts.map +1 -0
- package/dist/components/sheet.js +36 -80
- package/dist/components/sidebar.d.ts +67 -160
- package/dist/components/sidebar.d.ts.map +1 -0
- package/dist/components/sidebar.js +166 -301
- package/dist/components/skeleton.d.ts +5 -9
- package/dist/components/skeleton.d.ts.map +1 -0
- package/dist/components/skeleton.js +5 -8
- package/dist/components/slider.d.ts +5 -13
- package/dist/components/slider.d.ts.map +1 -0
- package/dist/components/slider.js +12 -34
- package/dist/components/sonner.d.ts +8 -10
- package/dist/components/sonner.d.ts.map +1 -0
- package/dist/components/sonner.js +13 -16
- package/dist/components/spinner.d.ts +6 -12
- package/dist/components/spinner.d.ts.map +1 -0
- package/dist/components/spinner.js +20 -33
- package/dist/components/switch.d.ts +5 -9
- package/dist/components/switch.d.ts.map +1 -0
- package/dist/components/switch.js +5 -12
- package/dist/components/table.d.ts +12 -37
- package/dist/components/table.d.ts.map +1 -0
- package/dist/components/table.js +12 -47
- package/dist/components/tabs.d.ts +8 -21
- package/dist/components/tabs.d.ts.map +1 -0
- package/dist/components/tabs.js +8 -23
- package/dist/components/textarea.d.ts +5 -9
- package/dist/components/textarea.d.ts.map +1 -0
- package/dist/components/textarea.js +5 -8
- package/dist/components/toggle-group.d.ts +10 -24
- package/dist/components/toggle-group.d.ts.map +1 -0
- package/dist/components/toggle-group.js +20 -38
- package/dist/components/toggle.d.ts +18 -25
- package/dist/components/toggle.d.ts.map +1 -0
- package/dist/components/toggle.js +24 -29
- package/dist/components/tooltip.d.ts +9 -24
- package/dist/components/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip.js +9 -28
- package/dist/hooks/use-animated-value.d.ts +2 -4
- package/dist/hooks/use-animated-value.d.ts.map +1 -0
- package/dist/hooks/use-animated-value.js +67 -58
- package/dist/hooks/use-copy-to-clipboard.d.ts +6 -11
- package/dist/hooks/use-copy-to-clipboard.d.ts.map +1 -0
- package/dist/hooks/use-copy-to-clipboard.js +42 -39
- package/dist/hooks/use-is-mobile.d.ts +2 -4
- package/dist/hooks/use-is-mobile.d.ts.map +1 -0
- package/dist/hooks/use-is-mobile.js +20 -23
- package/dist/hooks/use-media-query.d.ts +2 -4
- package/dist/hooks/use-media-query.d.ts.map +1 -0
- package/dist/hooks/use-media-query.js +49 -46
- package/dist/hooks/use-mutation-observer.d.ts +3 -6
- package/dist/hooks/use-mutation-observer.d.ts.map +1 -0
- package/dist/hooks/use-mutation-observer.js +33 -34
- package/dist/hooks/use-pagination.d.ts +15 -22
- package/dist/hooks/use-pagination.d.ts.map +1 -0
- package/dist/hooks/use-pagination.js +99 -99
- package/dist/index.d.ts +131 -69
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +68 -69
- package/dist/primitives/checkbox-group.d.ts +84 -105
- package/dist/primitives/checkbox-group.d.ts.map +1 -0
- package/dist/primitives/checkbox-group.js +91 -105
- package/dist/primitives/input-number.d.ts +41 -51
- package/dist/primitives/input-number.d.ts.map +1 -0
- package/dist/primitives/input-number.js +417 -473
- package/dist/primitives/input.d.ts +43 -48
- package/dist/primitives/input.d.ts.map +1 -0
- package/dist/primitives/input.js +67 -66
- package/dist/primitives/progress-circle.d.ts +49 -79
- package/dist/primitives/progress-circle.d.ts.map +1 -0
- package/dist/primitives/progress-circle.js +134 -149
- package/package.json +17 -10
- package/{dist → src}/css/preset.css +1 -1
- /package/{dist → src}/css/amber.css +0 -0
- /package/{dist → src}/css/blue.css +0 -0
- /package/{dist → src}/css/cyan.css +0 -0
- /package/{dist → src}/css/emerald.css +0 -0
- /package/{dist → src}/css/fuchsia.css +0 -0
- /package/{dist → src}/css/gray.css +0 -0
- /package/{dist → src}/css/green.css +0 -0
- /package/{dist → src}/css/indigo.css +0 -0
- /package/{dist → src}/css/lime.css +0 -0
- /package/{dist → src}/css/neutral.css +0 -0
- /package/{dist → src}/css/orange.css +0 -0
- /package/{dist → src}/css/pink.css +0 -0
- /package/{dist → src}/css/purple.css +0 -0
- /package/{dist → src}/css/red.css +0 -0
- /package/{dist → src}/css/rose.css +0 -0
- /package/{dist → src}/css/sky.css +0 -0
- /package/{dist → src}/css/slate.css +0 -0
- /package/{dist → src}/css/stone.css +0 -0
- /package/{dist → src}/css/style.css +0 -0
- /package/{dist → src}/css/teal.css +0 -0
- /package/{dist → src}/css/violet.css +0 -0
- /package/{dist → src}/css/yellow.css +0 -0
- /package/{dist → src}/css/zinc.css +0 -0
|
@@ -1,97 +1,77 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { cn, tv } from "@codefast/tailwind-variants";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { createContextScope } from "@radix-ui/react-context";
|
|
5
5
|
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
6
|
-
|
|
6
|
+
/* -----------------------------------------------------------------------------
|
|
7
|
+
* Variant: ScrollAreaScrollbar
|
|
8
|
+
* -------------------------------------------------------------------------- */
|
|
7
9
|
const scrollAreaScrollbarVariants = tv({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
10
|
+
base: "flex touch-none p-px transition-colors select-none",
|
|
11
|
+
compoundVariants: [
|
|
12
|
+
{
|
|
13
|
+
className: "w-1.5",
|
|
14
|
+
orientation: "vertical",
|
|
15
|
+
size: "sm",
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
className: "w-2",
|
|
19
|
+
orientation: "vertical",
|
|
20
|
+
size: "md",
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
className: "w-2.5",
|
|
24
|
+
orientation: "vertical",
|
|
25
|
+
size: "lg",
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
className: "h-1.5",
|
|
29
|
+
orientation: "horizontal",
|
|
30
|
+
size: "sm",
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
className: "h-2",
|
|
34
|
+
orientation: "horizontal",
|
|
35
|
+
size: "md",
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
className: "h-2.5",
|
|
39
|
+
orientation: "horizontal",
|
|
40
|
+
size: "lg",
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
defaultVariants: {
|
|
44
|
+
orientation: "vertical",
|
|
45
|
+
size: "md",
|
|
46
|
+
},
|
|
47
|
+
variants: {
|
|
48
|
+
orientation: {
|
|
49
|
+
horizontal: "w-full flex-col border-t border-t-transparent",
|
|
50
|
+
vertical: "h-full flex-row border-l border-l-transparent",
|
|
51
|
+
},
|
|
52
|
+
size: {
|
|
53
|
+
none: "",
|
|
54
|
+
sm: "",
|
|
55
|
+
md: "",
|
|
56
|
+
lg: "",
|
|
57
|
+
},
|
|
58
|
+
},
|
|
57
59
|
});
|
|
60
|
+
/* -----------------------------------------------------------------------------
|
|
61
|
+
* Context: ScrollArea
|
|
62
|
+
* -------------------------------------------------------------------------- */
|
|
58
63
|
const SCROLL_AREA_NAME = "ScrollArea";
|
|
59
64
|
const [createScrollAreaContext] = createContextScope(SCROLL_AREA_NAME);
|
|
60
65
|
const [ScrollAreaContextProvider, useScrollAreaContext] = createScrollAreaContext(SCROLL_AREA_NAME);
|
|
61
66
|
function ScrollArea({ __scopeScrollArea, children, className, size, ...props }) {
|
|
62
|
-
|
|
63
|
-
scope: __scopeScrollArea,
|
|
64
|
-
size,
|
|
65
|
-
children: /* @__PURE__ */ jsxs(ScrollAreaPrimitive.Root, {
|
|
66
|
-
className: cn("relative", className),
|
|
67
|
-
"data-slot": "scroll-area",
|
|
68
|
-
...props,
|
|
69
|
-
children: [
|
|
70
|
-
/* @__PURE__ */ jsx(ScrollAreaPrimitive.Viewport, {
|
|
71
|
-
className: "size-full rounded-[inherit] ring-ring/50 outline-ring transition focus-visible:ring-4 focus-visible:outline-1",
|
|
72
|
-
"data-slot": "scroll-area-viewport",
|
|
73
|
-
children
|
|
74
|
-
}),
|
|
75
|
-
/* @__PURE__ */ jsx(ScrollAreaScrollbar, { orientation: "vertical" }),
|
|
76
|
-
/* @__PURE__ */ jsx(ScrollAreaScrollbar, { orientation: "horizontal" }),
|
|
77
|
-
/* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, {})
|
|
78
|
-
]
|
|
79
|
-
})
|
|
80
|
-
});
|
|
67
|
+
return (_jsx(ScrollAreaContextProvider, { scope: __scopeScrollArea, size: size, children: _jsxs(ScrollAreaPrimitive.Root, { className: cn("relative", className), "data-slot": "scroll-area", ...props, children: [_jsx(ScrollAreaPrimitive.Viewport, { className: "size-full rounded-[inherit] ring-ring/50 outline-ring transition focus-visible:ring-4 focus-visible:outline-1", "data-slot": "scroll-area-viewport", children: children }), _jsx(ScrollAreaScrollbar, { orientation: "vertical" }), _jsx(ScrollAreaScrollbar, { orientation: "horizontal" }), _jsx(ScrollAreaPrimitive.Corner, {})] }) }));
|
|
81
68
|
}
|
|
82
69
|
function ScrollAreaScrollbar({ __scopeScrollArea, className, orientation, ...props }) {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
className: scrollAreaScrollbarVariants({
|
|
86
|
-
className,
|
|
87
|
-
orientation,
|
|
88
|
-
size
|
|
89
|
-
}),
|
|
90
|
-
"data-slot": "scroll-area-scrollbar",
|
|
91
|
-
orientation,
|
|
92
|
-
...props,
|
|
93
|
-
children: /* @__PURE__ */ jsx(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
94
|
-
});
|
|
70
|
+
const { size } = useScrollAreaContext(SCROLL_AREA_NAME, __scopeScrollArea);
|
|
71
|
+
return (_jsx(ScrollAreaPrimitive.Scrollbar, { className: scrollAreaScrollbarVariants({ className, orientation, size }), "data-slot": "scroll-area-scrollbar", orientation: orientation, ...props, children: _jsx(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" }) }));
|
|
95
72
|
}
|
|
96
|
-
|
|
97
|
-
|
|
73
|
+
/* -----------------------------------------------------------------------------
|
|
74
|
+
* Exports
|
|
75
|
+
* -------------------------------------------------------------------------- */
|
|
76
|
+
export { scrollAreaScrollbarVariants };
|
|
77
|
+
export { ScrollArea, ScrollAreaScrollbar };
|
|
@@ -1,62 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { ComponentProps, JSX } from "react";
|
|
1
|
+
import type { VariantProps } from "@codefast/tailwind-variants";
|
|
2
|
+
import type { ComponentProps, JSX } from "react";
|
|
4
3
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
5
|
-
|
|
6
|
-
//#region src/components/select.d.ts
|
|
4
|
+
import { buttonVariants } from "#components/button";
|
|
7
5
|
type SelectProps = ComponentProps<typeof SelectPrimitive.Root>;
|
|
8
|
-
declare function Select({
|
|
9
|
-
...props
|
|
10
|
-
}: SelectProps): JSX.Element;
|
|
6
|
+
declare function Select({ ...props }: SelectProps): JSX.Element;
|
|
11
7
|
type SelectGroupProps = ComponentProps<typeof SelectPrimitive.Group>;
|
|
12
|
-
declare function SelectGroup({
|
|
13
|
-
...props
|
|
14
|
-
}: SelectGroupProps): JSX.Element;
|
|
8
|
+
declare function SelectGroup({ ...props }: SelectGroupProps): JSX.Element;
|
|
15
9
|
type SelectValueProps = ComponentProps<typeof SelectPrimitive.Value>;
|
|
16
|
-
declare function SelectValue({
|
|
17
|
-
...props
|
|
18
|
-
}: SelectValueProps): JSX.Element;
|
|
10
|
+
declare function SelectValue({ ...props }: SelectValueProps): JSX.Element;
|
|
19
11
|
interface SelectTriggerProps extends ComponentProps<typeof SelectPrimitive.Trigger> {
|
|
20
|
-
|
|
12
|
+
size?: VariantProps<typeof buttonVariants>["size"];
|
|
21
13
|
}
|
|
22
|
-
declare function SelectTrigger({
|
|
23
|
-
children,
|
|
24
|
-
className,
|
|
25
|
-
size,
|
|
26
|
-
...props
|
|
27
|
-
}: SelectTriggerProps): JSX.Element;
|
|
14
|
+
declare function SelectTrigger({ children, className, size, ...props }: SelectTriggerProps): JSX.Element;
|
|
28
15
|
type SelectScrollUpButtonProps = ComponentProps<typeof SelectPrimitive.ScrollUpButton>;
|
|
29
|
-
declare function SelectScrollUpButton({
|
|
30
|
-
className,
|
|
31
|
-
...props
|
|
32
|
-
}: SelectScrollUpButtonProps): JSX.Element;
|
|
16
|
+
declare function SelectScrollUpButton({ className, ...props }: SelectScrollUpButtonProps): JSX.Element;
|
|
33
17
|
type SelectScrollDownButtonProps = ComponentProps<typeof SelectPrimitive.ScrollDownButton>;
|
|
34
|
-
declare function SelectScrollDownButton({
|
|
35
|
-
className,
|
|
36
|
-
...props
|
|
37
|
-
}: SelectScrollDownButtonProps): JSX.Element;
|
|
18
|
+
declare function SelectScrollDownButton({ className, ...props }: SelectScrollDownButtonProps): JSX.Element;
|
|
38
19
|
type SelectContentProps = ComponentProps<typeof SelectPrimitive.Content>;
|
|
39
|
-
declare function SelectContent({
|
|
40
|
-
children,
|
|
41
|
-
className,
|
|
42
|
-
position,
|
|
43
|
-
...props
|
|
44
|
-
}: SelectContentProps): JSX.Element;
|
|
20
|
+
declare function SelectContent({ children, className, position, ...props }: SelectContentProps): JSX.Element;
|
|
45
21
|
type SelectLabelProps = ComponentProps<typeof SelectPrimitive.Label>;
|
|
46
|
-
declare function SelectLabel({
|
|
47
|
-
className,
|
|
48
|
-
...props
|
|
49
|
-
}: SelectLabelProps): JSX.Element;
|
|
22
|
+
declare function SelectLabel({ className, ...props }: SelectLabelProps): JSX.Element;
|
|
50
23
|
type SelectItemProps = ComponentProps<typeof SelectPrimitive.Item>;
|
|
51
|
-
declare function SelectItem({
|
|
52
|
-
children,
|
|
53
|
-
className,
|
|
54
|
-
...props
|
|
55
|
-
}: SelectItemProps): JSX.Element;
|
|
24
|
+
declare function SelectItem({ children, className, ...props }: SelectItemProps): JSX.Element;
|
|
56
25
|
type SelectSeparatorProps = ComponentProps<typeof SelectPrimitive.Separator>;
|
|
57
|
-
declare function SelectSeparator({
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
//#endregion
|
|
62
|
-
export { Select, SelectContent, type SelectContentProps, SelectGroup, type SelectGroupProps, SelectItem, type SelectItemProps, SelectLabel, type SelectLabelProps, type SelectProps, SelectScrollDownButton, type SelectScrollDownButtonProps, SelectScrollUpButton, type SelectScrollUpButtonProps, SelectSeparator, type SelectSeparatorProps, SelectTrigger, type SelectTriggerProps, SelectValue, type SelectValueProps };
|
|
26
|
+
declare function SelectSeparator({ className, ...props }: SelectSeparatorProps): JSX.Element;
|
|
27
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };
|
|
28
|
+
export type { SelectContentProps, SelectGroupProps, SelectItemProps, SelectLabelProps, SelectProps, SelectScrollDownButtonProps, SelectScrollUpButtonProps, SelectSeparatorProps, SelectTriggerProps, SelectValueProps, };
|
|
29
|
+
//# sourceMappingURL=select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../src/components/select.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAGjD,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAG1D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAMpD,KAAK,WAAW,GAAG,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC;AAE/D,iBAAS,MAAM,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,GAAG,GAAG,CAAC,OAAO,CAEtD;AAMD,KAAK,gBAAgB,GAAG,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,CAAC;AAErE,iBAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,GAAG,GAAG,CAAC,OAAO,CAEhE;AAMD,KAAK,gBAAgB,GAAG,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,CAAC;AAErE,iBAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,GAAG,GAAG,CAAC,OAAO,CAEhE;AAMD,UAAU,kBAAmB,SAAQ,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC;IACjF,IAAI,CAAC,EAAE,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;CACpD;AAED,iBAAS,aAAa,CAAC,EAAE,QAAQ,EAAE,SAAS,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,EACL,MAAM,EACN,aAAa,EACb,WAAW,EACX,UAAU,EACV,WAAW,EACX,sBAAsB,EACtB,oBAAoB,EACpB,eAAe,EACf,aAAa,EACb,WAAW,GACZ,CAAC;AAEF,YAAY,EACV,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,2BAA2B,EAC3B,yBAAyB,EACzB,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,GACjB,CAAC"}
|
|
@@ -1,101 +1,49 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { cn } from "@codefast/tailwind-variants";
|
|
4
|
-
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
5
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
4
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
7
|
-
|
|
5
|
+
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
6
|
+
import { buttonVariants } from "#components/button";
|
|
8
7
|
function Select({ ...props }) {
|
|
9
|
-
|
|
10
|
-
"data-slot": "select",
|
|
11
|
-
...props
|
|
12
|
-
});
|
|
8
|
+
return _jsx(SelectPrimitive.Root, { "data-slot": "select", ...props });
|
|
13
9
|
}
|
|
14
10
|
function SelectGroup({ ...props }) {
|
|
15
|
-
|
|
16
|
-
"data-slot": "select-group",
|
|
17
|
-
...props
|
|
18
|
-
});
|
|
11
|
+
return _jsx(SelectPrimitive.Group, { "data-slot": "select-group", ...props });
|
|
19
12
|
}
|
|
20
13
|
function SelectValue({ ...props }) {
|
|
21
|
-
|
|
22
|
-
"data-slot": "select-value",
|
|
23
|
-
...props
|
|
24
|
-
});
|
|
14
|
+
return _jsx(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
|
|
25
15
|
}
|
|
26
16
|
function SelectTrigger({ children, className, size, ...props }) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
...props,
|
|
36
|
-
children: [children, /* @__PURE__ */ jsx(SelectPrimitive.Icon, {
|
|
37
|
-
asChild: true,
|
|
38
|
-
className: "size-4 shrink-0 opacity-50",
|
|
39
|
-
children: /* @__PURE__ */ jsx(ChevronDownIcon, {})
|
|
40
|
-
})]
|
|
41
|
-
});
|
|
17
|
+
return (_jsxs(SelectPrimitive.Trigger, { className: buttonVariants({
|
|
18
|
+
className: [
|
|
19
|
+
"[&_svg:not([class*='text-'])]:text-muted-foreground focus:ring-ring/50 focus:border-ring w-fit justify-between px-3 font-normal focus:ring-3 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 *:data-[slot=select-value]:truncate",
|
|
20
|
+
className,
|
|
21
|
+
],
|
|
22
|
+
size,
|
|
23
|
+
variant: "outline",
|
|
24
|
+
}), "data-size": size, "data-slot": "select-trigger", ...props, children: [children, _jsx(SelectPrimitive.Icon, { asChild: true, className: "size-4 shrink-0 opacity-50", children: _jsx(ChevronDownIcon, {}) })] }));
|
|
42
25
|
}
|
|
43
26
|
function SelectScrollUpButton({ className, ...props }) {
|
|
44
|
-
|
|
45
|
-
className: cn("flex items-center justify-center py-1 text-muted-foreground", className),
|
|
46
|
-
"data-slot": "select-scroll-up-button",
|
|
47
|
-
...props,
|
|
48
|
-
children: /* @__PURE__ */ jsx(ChevronUpIcon, { size: 16 })
|
|
49
|
-
});
|
|
27
|
+
return (_jsx(SelectPrimitive.ScrollUpButton, { className: cn("flex items-center justify-center py-1 text-muted-foreground", className), "data-slot": "select-scroll-up-button", ...props, children: _jsx(ChevronUpIcon, { size: 16 }) }));
|
|
50
28
|
}
|
|
51
29
|
function SelectScrollDownButton({ className, ...props }) {
|
|
52
|
-
|
|
53
|
-
className: cn("flex items-center justify-center py-1 text-muted-foreground", className),
|
|
54
|
-
"data-slot": "select-scroll-down-button",
|
|
55
|
-
...props,
|
|
56
|
-
children: /* @__PURE__ */ jsx(ChevronDownIcon, { size: 16 })
|
|
57
|
-
});
|
|
30
|
+
return (_jsx(SelectPrimitive.ScrollDownButton, { className: cn("flex items-center justify-center py-1 text-muted-foreground", className), "data-slot": "select-scroll-down-button", ...props, children: _jsx(ChevronDownIcon, { size: 16 }) }));
|
|
58
31
|
}
|
|
59
32
|
function SelectContent({ children, className, position = "popper", ...props }) {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
position,
|
|
64
|
-
...props,
|
|
65
|
-
children: [
|
|
66
|
-
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
67
|
-
/* @__PURE__ */ jsx(SelectPrimitive.Viewport, {
|
|
68
|
-
className: cn("p-1", position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),
|
|
69
|
-
children
|
|
70
|
-
}),
|
|
71
|
-
/* @__PURE__ */ jsx(SelectScrollDownButton, {})
|
|
72
|
-
]
|
|
73
|
-
}) });
|
|
33
|
+
return (_jsx(SelectPrimitive.Portal, { children: _jsxs(SelectPrimitive.Content, { className: cn("relative z-50 max-h-(--radix-select-content-available-height) min-w-32 origin-(--radix-select-content-transform-origin) overflow-hidden rounded-lg border bg-popover text-popover-foreground shadow-lg 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=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=top]:slide-in-from-bottom-2", position === "popper" &&
|
|
34
|
+
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className), "data-slot": "select-content", position: position, ...props, children: [_jsx(SelectScrollUpButton, {}), _jsx(SelectPrimitive.Viewport, { className: cn("p-1", position === "popper" &&
|
|
35
|
+
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"), children: children }), _jsx(SelectScrollDownButton, {})] }) }));
|
|
74
36
|
}
|
|
75
37
|
function SelectLabel({ className, ...props }) {
|
|
76
|
-
|
|
77
|
-
className: cn("flex items-center gap-x-2 px-2 py-1.5 text-sm font-semibold", className),
|
|
78
|
-
"data-slot": "select-label",
|
|
79
|
-
...props
|
|
80
|
-
});
|
|
38
|
+
return (_jsx(SelectPrimitive.Label, { className: cn("flex items-center gap-x-2 px-2 py-1.5 text-sm font-semibold", className), "data-slot": "select-label", ...props }));
|
|
81
39
|
}
|
|
82
40
|
function SelectItem({ children, className, ...props }) {
|
|
83
|
-
|
|
84
|
-
className: cn("relative flex w-full cursor-default items-center rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground aria-disabled:opacity-50 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:[&_svg:not([class*='text-'])]:text-destructive/80 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className),
|
|
85
|
-
"data-slot": "select-item",
|
|
86
|
-
...props,
|
|
87
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
88
|
-
className: "absolute right-2 flex items-center justify-center",
|
|
89
|
-
children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) })
|
|
90
|
-
}), /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })]
|
|
91
|
-
});
|
|
41
|
+
return (_jsxs(SelectPrimitive.Item, { className: cn("relative flex w-full cursor-default items-center rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground aria-disabled:opacity-50 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:[&_svg:not([class*='text-'])]:text-destructive/80 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className), "data-slot": "select-item", ...props, children: [_jsx("span", { className: "absolute right-2 flex items-center justify-center", children: _jsx(SelectPrimitive.ItemIndicator, { children: _jsx(CheckIcon, { className: "size-4" }) }) }), _jsx(SelectPrimitive.ItemText, { children: children })] }));
|
|
92
42
|
}
|
|
93
43
|
function SelectSeparator({ className, ...props }) {
|
|
94
|
-
|
|
95
|
-
className: cn("mx-2 my-1 h-px bg-border", className),
|
|
96
|
-
"data-slot": "select-separator",
|
|
97
|
-
...props
|
|
98
|
-
});
|
|
44
|
+
return (_jsx(SelectPrimitive.Separator, { className: cn("mx-2 my-1 h-px bg-border", className), "data-slot": "select-separator", ...props }));
|
|
99
45
|
}
|
|
100
|
-
|
|
101
|
-
|
|
46
|
+
/* -----------------------------------------------------------------------------
|
|
47
|
+
* Exports
|
|
48
|
+
* -------------------------------------------------------------------------- */
|
|
49
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };
|
|
@@ -1,32 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import type { VariantProps } from "@codefast/tailwind-variants";
|
|
2
|
+
import type { ComponentProps, JSX } from "react";
|
|
3
3
|
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
horizontal: string;
|
|
15
|
-
vertical: string;
|
|
16
|
-
};
|
|
4
|
+
declare const separatorVariants: import("@codefast/tailwind-variants").VariantFunctionType<{
|
|
5
|
+
align: {
|
|
6
|
+
center: string;
|
|
7
|
+
end: string;
|
|
8
|
+
start: string;
|
|
9
|
+
};
|
|
10
|
+
orientation: {
|
|
11
|
+
horizontal: string;
|
|
12
|
+
vertical: string;
|
|
13
|
+
};
|
|
17
14
|
}, Record<string, never>>;
|
|
18
|
-
interface SeparatorProps extends ComponentProps<typeof SeparatorPrimitive.Root>, Omit<VariantProps<typeof separatorVariants>, "orientation"> {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
className,
|
|
22
|
-
decorative,
|
|
23
|
-
orientation,
|
|
24
|
-
...props
|
|
25
|
-
}: SeparatorProps): JSX.Element;
|
|
15
|
+
interface SeparatorProps extends ComponentProps<typeof SeparatorPrimitive.Root>, Omit<VariantProps<typeof separatorVariants>, "orientation"> {
|
|
16
|
+
}
|
|
17
|
+
declare function Separator({ align, className, decorative, orientation, ...props }: SeparatorProps): JSX.Element;
|
|
26
18
|
type SeparatorItemProps = ComponentProps<"div">;
|
|
27
|
-
declare function SeparatorItem({
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
//#
|
|
32
|
-
export { Separator, SeparatorItem, type SeparatorItemProps, type SeparatorProps, separatorVariants };
|
|
19
|
+
declare function SeparatorItem({ className, ...props }: SeparatorItemProps): JSX.Element;
|
|
20
|
+
export { separatorVariants };
|
|
21
|
+
export { Separator, SeparatorItem };
|
|
22
|
+
export type { SeparatorItemProps, SeparatorProps };
|
|
23
|
+
//# sourceMappingURL=separator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"separator.d.ts","sourceRoot":"","sources":["../../src/components/separator.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAGjD,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAC;AAMhE,QAAA,MAAM,iBAAiB;;;;;;;;;;yBAiBrB,CAAC;AAMH,UAAU,cACR,SACE,cAAc,CAAC,OAAO,kBAAkB,CAAC,IAAI,CAAC,EAC9C,IAAI,CAAC,YAAY,CAAC,OAAO,iBAAiB,CAAC,EAAE,aAAa,CAAC;CAAG;AAElE,iBAAS,SAAS,CAAC,EACjB,KAAK,EACL,SAAS,EACT,UAAiB,EACjB,WAAW,EACX,GAAG,KAAK,EACT,EAAE,cAAc,GAAG,GAAG,CAAC,OAAO,CAU9B;AAMD,KAAK,kBAAkB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAEhD,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,GAAG,GAAG,CAAC,OAAO,CAQ/E;AAMD,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;AACpC,YAAY,EAAE,kBAAkB,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -1,45 +1,36 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
3
|
import { cn, tv } from "@codefast/tailwind-variants";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
5
|
-
|
|
5
|
+
/* -----------------------------------------------------------------------------
|
|
6
|
+
* Variant: Separator
|
|
7
|
+
* -------------------------------------------------------------------------- */
|
|
6
8
|
const separatorVariants = tv({
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
9
|
+
base: "relative flex shrink-0 items-center bg-border",
|
|
10
|
+
defaultVariants: {
|
|
11
|
+
align: "center",
|
|
12
|
+
orientation: "horizontal",
|
|
13
|
+
},
|
|
14
|
+
variants: {
|
|
15
|
+
align: {
|
|
16
|
+
center: "justify-center",
|
|
17
|
+
end: "justify-end",
|
|
18
|
+
start: "justify-start",
|
|
19
|
+
},
|
|
20
|
+
orientation: {
|
|
21
|
+
horizontal: "h-px w-full",
|
|
22
|
+
vertical: "h-full w-px flex-col",
|
|
23
|
+
},
|
|
24
|
+
},
|
|
23
25
|
});
|
|
24
26
|
function Separator({ align, className, decorative = true, orientation, ...props }) {
|
|
25
|
-
|
|
26
|
-
className: separatorVariants({
|
|
27
|
-
align,
|
|
28
|
-
className,
|
|
29
|
-
orientation
|
|
30
|
-
}),
|
|
31
|
-
"data-slot": "separator",
|
|
32
|
-
decorative,
|
|
33
|
-
orientation,
|
|
34
|
-
...props
|
|
35
|
-
});
|
|
27
|
+
return (_jsx(SeparatorPrimitive.Root, { className: separatorVariants({ align, className, orientation }), "data-slot": "separator", decorative: decorative, orientation: orientation, ...props }));
|
|
36
28
|
}
|
|
37
29
|
function SeparatorItem({ className, ...props }) {
|
|
38
|
-
|
|
39
|
-
className: cn("absolute mx-2 bg-background px-2 text-sm text-muted-foreground", className),
|
|
40
|
-
"data-slot": "separator-item",
|
|
41
|
-
...props
|
|
42
|
-
});
|
|
30
|
+
return (_jsx("div", { className: cn("absolute mx-2 bg-background px-2 text-sm text-muted-foreground", className), "data-slot": "separator-item", ...props }));
|
|
43
31
|
}
|
|
44
|
-
|
|
45
|
-
|
|
32
|
+
/* -----------------------------------------------------------------------------
|
|
33
|
+
* Exports
|
|
34
|
+
* -------------------------------------------------------------------------- */
|
|
35
|
+
export { separatorVariants };
|
|
36
|
+
export { Separator, SeparatorItem };
|
|
@@ -1,75 +1,43 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import { VariantProps } from "@codefast/tailwind-variants";
|
|
4
|
-
import { ComponentProps, JSX } from "react";
|
|
1
|
+
import type { VariantProps } from "@codefast/tailwind-variants";
|
|
2
|
+
import type { ComponentProps, JSX } from "react";
|
|
5
3
|
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
};
|
|
4
|
+
import { buttonVariants } from "#components/button";
|
|
5
|
+
declare const sheetContentVariants: import("@codefast/tailwind-variants").VariantFunctionType<{
|
|
6
|
+
side: {
|
|
7
|
+
bottom: string;
|
|
8
|
+
left: string;
|
|
9
|
+
right: string;
|
|
10
|
+
top: string;
|
|
11
|
+
};
|
|
15
12
|
}, Record<string, never>>;
|
|
16
13
|
type SheetProps = ComponentProps<typeof SheetPrimitive.Root>;
|
|
17
|
-
declare function Sheet({
|
|
18
|
-
children,
|
|
19
|
-
...props
|
|
20
|
-
}: SheetProps): JSX.Element;
|
|
14
|
+
declare function Sheet({ children, ...props }: SheetProps): JSX.Element;
|
|
21
15
|
type SheetTriggerProps = ComponentProps<typeof SheetPrimitive.Trigger>;
|
|
22
|
-
declare function SheetTrigger({
|
|
23
|
-
...props
|
|
24
|
-
}: SheetTriggerProps): JSX.Element;
|
|
16
|
+
declare function SheetTrigger({ ...props }: SheetTriggerProps): JSX.Element;
|
|
25
17
|
interface SheetContentProps extends ComponentProps<typeof SheetPrimitive.Content>, VariantProps<typeof sheetContentVariants> {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
18
|
+
classNames?: {
|
|
19
|
+
close?: string;
|
|
20
|
+
content?: string;
|
|
21
|
+
overlay?: string;
|
|
22
|
+
};
|
|
31
23
|
}
|
|
32
|
-
declare function SheetContent({
|
|
33
|
-
children,
|
|
34
|
-
className,
|
|
35
|
-
classNames,
|
|
36
|
-
side,
|
|
37
|
-
...props
|
|
38
|
-
}: SheetContentProps): JSX.Element;
|
|
24
|
+
declare function SheetContent({ children, className, classNames, side, ...props }: SheetContentProps): JSX.Element;
|
|
39
25
|
type SheetHeaderProps = ComponentProps<"div">;
|
|
40
|
-
declare function SheetHeader({
|
|
41
|
-
className,
|
|
42
|
-
...props
|
|
43
|
-
}: SheetHeaderProps): JSX.Element;
|
|
26
|
+
declare function SheetHeader({ className, ...props }: SheetHeaderProps): JSX.Element;
|
|
44
27
|
type SheetBodyProps = ComponentProps<"div">;
|
|
45
|
-
declare function SheetBody({
|
|
46
|
-
className,
|
|
47
|
-
...props
|
|
48
|
-
}: SheetBodyProps): JSX.Element;
|
|
28
|
+
declare function SheetBody({ className, ...props }: SheetBodyProps): JSX.Element;
|
|
49
29
|
type SheetFooterProps = ComponentProps<"div">;
|
|
50
|
-
declare function SheetFooter({
|
|
51
|
-
className,
|
|
52
|
-
...props
|
|
53
|
-
}: SheetFooterProps): JSX.Element;
|
|
30
|
+
declare function SheetFooter({ className, ...props }: SheetFooterProps): JSX.Element;
|
|
54
31
|
type SheetTitleProps = ComponentProps<typeof SheetPrimitive.Title>;
|
|
55
|
-
declare function SheetTitle({
|
|
56
|
-
className,
|
|
57
|
-
...props
|
|
58
|
-
}: SheetTitleProps): JSX.Element;
|
|
32
|
+
declare function SheetTitle({ className, ...props }: SheetTitleProps): JSX.Element;
|
|
59
33
|
type SheetDescriptionProps = ComponentProps<typeof SheetPrimitive.Description>;
|
|
60
|
-
declare function SheetDescription({
|
|
61
|
-
className,
|
|
62
|
-
...props
|
|
63
|
-
}: SheetDescriptionProps): JSX.Element;
|
|
34
|
+
declare function SheetDescription({ className, ...props }: SheetDescriptionProps): JSX.Element;
|
|
64
35
|
interface SheetCloseProps extends ComponentProps<typeof SheetPrimitive.Close> {
|
|
65
|
-
|
|
66
|
-
|
|
36
|
+
size?: VariantProps<typeof buttonVariants>["size"];
|
|
37
|
+
variant?: VariantProps<typeof buttonVariants>["variant"];
|
|
67
38
|
}
|
|
68
|
-
declare function SheetClose({
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}: SheetCloseProps): JSX.Element;
|
|
74
|
-
//#endregion
|
|
75
|
-
export { Sheet, SheetBody, type SheetBodyProps, SheetClose, type SheetCloseProps, SheetContent, type SheetContentProps, SheetDescription, type SheetDescriptionProps, SheetFooter, type SheetFooterProps, SheetHeader, type SheetHeaderProps, type SheetProps, SheetTitle, type SheetTitleProps, SheetTrigger, type SheetTriggerProps, sheetContentVariants };
|
|
39
|
+
declare function SheetClose({ className, size, variant, ...props }: SheetCloseProps): JSX.Element;
|
|
40
|
+
export { sheetContentVariants };
|
|
41
|
+
export { Sheet, SheetBody, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, };
|
|
42
|
+
export type { SheetBodyProps, SheetCloseProps, SheetContentProps, SheetDescriptionProps, SheetFooterProps, SheetHeaderProps, SheetProps, SheetTitleProps, SheetTriggerProps, };
|
|
43
|
+
//# sourceMappingURL=sheet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sheet.d.ts","sourceRoot":"","sources":["../../src/components/sheet.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAGjD,OAAO,KAAK,cAAc,MAAM,wBAAwB,CAAC;AAGzD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAMpD,QAAA,MAAM,oBAAoB;;;;;;;yBAexB,CAAC;AAMH,KAAK,UAAU,GAAG,cAAc,CAAC,OAAO,cAAc,CAAC,IAAI,CAAC,CAAC;AAE7D,iBAAS,KAAK,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,GAAG,GAAG,CAAC,OAAO,CAM9D;AAMD,KAAK,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