@codefast/ui 0.3.11 → 0.3.12-canary.1
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 +66 -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 +11 -38
- 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 +17 -70
- package/dist/components/alert.d.ts +16 -27
- package/dist/components/alert.d.ts.map +1 -0
- package/dist/components/alert.js +33 -31
- 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 +8 -19
- package/dist/components/badge.d.ts +15 -21
- package/dist/components/badge.d.ts.map +1 -0
- package/dist/components/badge.js +53 -21
- package/dist/components/breadcrumb.d.ts +13 -35
- package/dist/components/breadcrumb.d.ts.map +1 -0
- package/dist/components/breadcrumb.js +14 -50
- 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 +37 -28
- package/dist/components/button.d.ts +26 -35
- package/dist/components/button.d.ts.map +1 -0
- package/dist/components/button.js +87 -52
- package/dist/components/calendar.d.ts +10 -24
- package/dist/components/calendar.d.ts.map +1 -0
- package/dist/components/calendar.js +88 -93
- package/dist/components/card.d.ts +11 -34
- package/dist/components/card.d.ts.map +1 -0
- package/dist/components/card.js +12 -40
- package/dist/components/carousel.d.ts +25 -55
- package/dist/components/carousel.d.ts.map +1 -0
- package/dist/components/carousel.js +83 -115
- package/dist/components/chart.d.ts +37 -72
- package/dist/components/chart.d.ts.map +1 -0
- package/dist/components/chart.js +162 -151
- 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 +9 -23
- 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 +8 -20
- package/dist/components/checkbox.d.ts +5 -9
- package/dist/components/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox.js +7 -15
- 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 +19 -70
- 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 +22 -90
- package/dist/components/dialog.d.ts +23 -53
- package/dist/components/dialog.d.ts.map +1 -0
- package/dist/components/dialog.js +21 -73
- package/dist/components/drawer.d.ts +29 -60
- package/dist/components/drawer.d.ts.map +1 -0
- package/dist/components/drawer.js +17 -59
- 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 +22 -97
- package/dist/components/empty.d.ts +16 -37
- package/dist/components/empty.d.ts.map +1 -0
- package/dist/components/empty.js +33 -45
- package/dist/components/field.d.ts +26 -63
- package/dist/components/field.d.ts.map +1 -0
- package/dist/components/field.js +61 -90
- package/dist/components/form.d.ts +16 -37
- package/dist/components/form.d.ts.map +1 -0
- package/dist/components/form.js +51 -67
- 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 +9 -24
- 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 +110 -67
- 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 +15 -56
- 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 +14 -35
- 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 +11 -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 +17 -44
- package/dist/components/input.d.ts +5 -10
- package/dist/components/input.d.ts.map +1 -0
- package/dist/components/input.js +6 -10
- package/dist/components/item.d.ts +33 -69
- package/dist/components/item.d.ts.map +1 -0
- package/dist/components/item.js +69 -91
- package/dist/components/kbd.d.ts +6 -13
- package/dist/components/kbd.d.ts.map +1 -0
- package/dist/components/kbd.js +7 -14
- package/dist/components/label.d.ts +5 -9
- package/dist/components/label.d.ts.map +1 -0
- package/dist/components/label.js +6 -9
- package/dist/components/menubar.d.ts +24 -80
- package/dist/components/menubar.d.ts.map +1 -0
- package/dist/components/menubar.js +24 -100
- 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 +8 -26
- 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 +26 -62
- package/dist/components/pagination.d.ts +15 -35
- package/dist/components/pagination.d.ts.map +1 -0
- package/dist/components/pagination.js +14 -56
- package/dist/components/popover.d.ts +9 -24
- package/dist/components/popover.d.ts.map +1 -0
- package/dist/components/popover.js +10 -28
- 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 +71 -104
- package/dist/components/progress.d.ts +5 -10
- package/dist/components/progress.d.ts.map +1 -0
- package/dist/components/progress.js +8 -14
- 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 +8 -22
- 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 +7 -18
- package/dist/components/radio.d.ts +6 -12
- package/dist/components/radio.d.ts.map +1 -0
- package/dist/components/radio.js +6 -11
- package/dist/components/resizable.d.ts +8 -18
- package/dist/components/resizable.d.ts.map +1 -0
- package/dist/components/resizable.js +8 -22
- 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 +65 -85
- package/dist/components/select.d.ts +17 -50
- package/dist/components/select.d.ts.map +1 -0
- package/dist/components/select.js +27 -79
- package/dist/components/separator.d.ts +20 -29
- package/dist/components/separator.d.ts.map +1 -0
- package/dist/components/separator.js +28 -37
- package/dist/components/sheet.d.ts +30 -62
- package/dist/components/sheet.d.ts.map +1 -0
- package/dist/components/sheet.js +68 -81
- package/dist/components/sidebar.d.ts +67 -160
- package/dist/components/sidebar.d.ts.map +1 -0
- package/dist/components/sidebar.js +184 -302
- package/dist/components/skeleton.d.ts +5 -9
- package/dist/components/skeleton.d.ts.map +1 -0
- package/dist/components/skeleton.js +6 -9
- package/dist/components/slider.d.ts +5 -13
- package/dist/components/slider.d.ts.map +1 -0
- package/dist/components/slider.js +13 -35
- package/dist/components/sonner.d.ts +8 -10
- package/dist/components/sonner.d.ts.map +1 -0
- package/dist/components/sonner.js +14 -16
- package/dist/components/spinner.d.ts +6 -12
- package/dist/components/spinner.d.ts.map +1 -0
- package/dist/components/spinner.js +21 -34
- package/dist/components/switch.d.ts +5 -9
- package/dist/components/switch.d.ts.map +1 -0
- package/dist/components/switch.js +6 -13
- package/dist/components/table.d.ts +12 -37
- package/dist/components/table.d.ts.map +1 -0
- package/dist/components/table.js +13 -48
- package/dist/components/tabs.d.ts +8 -21
- package/dist/components/tabs.d.ts.map +1 -0
- package/dist/components/tabs.js +9 -24
- package/dist/components/textarea.d.ts +5 -9
- package/dist/components/textarea.d.ts.map +1 -0
- package/dist/components/textarea.js +6 -9
- 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 +21 -39
- package/dist/components/toggle.d.ts +18 -25
- package/dist/components/toggle.d.ts.map +1 -0
- package/dist/components/toggle.js +42 -30
- package/dist/components/tooltip.d.ts +9 -24
- package/dist/components/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip.js +10 -29
- 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/lib/utils.d.ts +10 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +10 -0
- 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 +33 -16
- package/{dist → src}/css/preset.css +86 -9
- /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,57 +1,92 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { tv } from "#lib/utils";
|
|
2
3
|
import { Slot } from "@radix-ui/react-slot";
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
/* -----------------------------------------------------------------------------
|
|
5
|
+
* Variant: Button
|
|
6
|
+
* -------------------------------------------------------------------------- */
|
|
5
7
|
const buttonVariants = tv({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
8
|
+
base: [
|
|
9
|
+
"inline-flex shrink-0 items-center justify-center gap-2",
|
|
10
|
+
"rounded-lg outline-hidden",
|
|
11
|
+
"text-sm font-medium whitespace-nowrap",
|
|
12
|
+
"transition select-none",
|
|
13
|
+
"focus-visible:ring-3",
|
|
14
|
+
"disabled:opacity-50",
|
|
15
|
+
"[&_svg]:shrink-0",
|
|
16
|
+
"[&_svg:not([class*='size-'])]:size-4",
|
|
17
|
+
],
|
|
18
|
+
defaultVariants: {
|
|
19
|
+
size: "md",
|
|
20
|
+
variant: "default",
|
|
21
|
+
},
|
|
22
|
+
variants: {
|
|
23
|
+
size: {
|
|
24
|
+
// 32px
|
|
25
|
+
"icon-sm": "size-8",
|
|
26
|
+
// 36px
|
|
27
|
+
icon: "size-9",
|
|
28
|
+
// 40px
|
|
29
|
+
"icon-lg": "size-10",
|
|
30
|
+
// 32px
|
|
31
|
+
sm: ["h-8 px-3", "has-[>svg]:px-2.5"],
|
|
32
|
+
// 36px
|
|
33
|
+
md: ["h-9 px-4", "has-[>svg]:px-3"],
|
|
34
|
+
// 40px
|
|
35
|
+
lg: ["h-10 px-6", "has-[>svg]:px-4"],
|
|
36
|
+
},
|
|
37
|
+
variant: {
|
|
38
|
+
default: [
|
|
39
|
+
"bg-primary text-primary-foreground",
|
|
40
|
+
"hover:not-disabled:bg-primary/80",
|
|
41
|
+
"focus-visible:ring-primary/20",
|
|
42
|
+
"dark:focus-visible:ring-primary/40",
|
|
43
|
+
],
|
|
44
|
+
destructive: [
|
|
45
|
+
"bg-destructive text-white",
|
|
46
|
+
"hover:not-disabled:bg-destructive/90",
|
|
47
|
+
"focus-visible:ring-destructive/20",
|
|
48
|
+
"dark:bg-destructive/60",
|
|
49
|
+
"dark:focus-visible:ring-destructive/40",
|
|
50
|
+
],
|
|
51
|
+
ghost: [
|
|
52
|
+
"hover:not-disabled:bg-secondary hover:not-disabled:text-secondary-foreground",
|
|
53
|
+
"focus-visible:ring-ring/50",
|
|
54
|
+
"dark:hover:not-disabled:bg-secondary/50",
|
|
55
|
+
],
|
|
56
|
+
link: [
|
|
57
|
+
"text-primary underline-offset-4",
|
|
58
|
+
"hover:not-disabled:underline",
|
|
59
|
+
"focus-visible:ring-ring/50",
|
|
60
|
+
],
|
|
61
|
+
outline: [
|
|
62
|
+
"border border-input shadow-xs",
|
|
63
|
+
"hover:not-disabled:border-ring/60 hover:not-disabled:bg-secondary hover:not-disabled:text-secondary-foreground",
|
|
64
|
+
"focus-visible:border-ring focus-visible:ring-ring/50",
|
|
65
|
+
"aria-invalid:border-destructive",
|
|
66
|
+
"focus-within:aria-invalid:ring-destructive/20",
|
|
67
|
+
"hover:not-disabled:aria-invalid:border-destructive/60",
|
|
68
|
+
"dark:bg-input/30",
|
|
69
|
+
"dark:hover:not-disabled:bg-input/50",
|
|
70
|
+
"dark:aria-invalid:border-destructive/70",
|
|
71
|
+
"dark:focus-within:aria-invalid:ring-destructive/40",
|
|
72
|
+
],
|
|
73
|
+
secondary: [
|
|
74
|
+
"bg-secondary text-secondary-foreground",
|
|
75
|
+
"hover:not-disabled:bg-secondary/80",
|
|
76
|
+
"focus-visible:ring-ring/50",
|
|
77
|
+
],
|
|
78
|
+
},
|
|
79
|
+
},
|
|
29
80
|
});
|
|
30
81
|
function Button({ asChild = false, children, className, size, type = "button", variant, ...props }) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
variant
|
|
37
|
-
}),
|
|
38
|
-
"data-slot": "button",
|
|
39
|
-
"data-variant": variant,
|
|
40
|
-
...props,
|
|
41
|
-
children
|
|
42
|
-
});
|
|
43
|
-
return /* @__PURE__ */ jsx("button", {
|
|
44
|
-
className: buttonVariants({
|
|
45
|
-
className,
|
|
46
|
-
size,
|
|
47
|
-
variant
|
|
48
|
-
}),
|
|
49
|
-
"data-slot": "button",
|
|
50
|
-
"data-variant": variant,
|
|
51
|
-
type,
|
|
52
|
-
...props,
|
|
53
|
-
children
|
|
54
|
-
});
|
|
82
|
+
const Comp = asChild ? Slot : "button";
|
|
83
|
+
if (asChild) {
|
|
84
|
+
return (_jsx(Comp, { className: buttonVariants({ className, size, variant }), "data-slot": "button", "data-variant": variant, ...props, children: children }));
|
|
85
|
+
}
|
|
86
|
+
return (_jsx("button", { className: buttonVariants({ className, size, variant }), "data-slot": "button", "data-variant": variant, type: type, ...props, children: children }));
|
|
55
87
|
}
|
|
56
|
-
|
|
57
|
-
|
|
88
|
+
/* -----------------------------------------------------------------------------
|
|
89
|
+
* Exports
|
|
90
|
+
* -------------------------------------------------------------------------- */
|
|
91
|
+
export { buttonVariants };
|
|
92
|
+
export { Button };
|
|
@@ -1,27 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
//#region src/components/calendar.d.ts
|
|
1
|
+
import type { ComponentProps, JSX } from "react";
|
|
2
|
+
import type { DayButton } from "react-day-picker";
|
|
3
|
+
import { DayPicker } from "react-day-picker";
|
|
4
|
+
import { Button } from "#components/button";
|
|
6
5
|
type CalendarProps = ComponentProps<typeof DayPicker> & {
|
|
7
|
-
|
|
6
|
+
buttonVariant?: ComponentProps<typeof Button>["variant"];
|
|
8
7
|
};
|
|
9
|
-
declare function Calendar({
|
|
10
|
-
buttonVariant,
|
|
11
|
-
captionLayout,
|
|
12
|
-
className,
|
|
13
|
-
classNames,
|
|
14
|
-
components,
|
|
15
|
-
formatters,
|
|
16
|
-
showOutsideDays,
|
|
17
|
-
...props
|
|
18
|
-
}: CalendarProps): JSX.Element;
|
|
8
|
+
declare function Calendar({ buttonVariant, captionLayout, className, classNames, components, formatters, showOutsideDays, ...props }: CalendarProps): JSX.Element;
|
|
19
9
|
type CalendarDayButtonProps = ComponentProps<typeof DayButton>;
|
|
20
|
-
declare function CalendarDayButton({
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
...props
|
|
25
|
-
}: CalendarDayButtonProps): JSX.Element;
|
|
26
|
-
//#endregion
|
|
27
|
-
export { Calendar, CalendarDayButton, type CalendarDayButtonProps, type CalendarProps };
|
|
10
|
+
declare function CalendarDayButton({ className, day, modifiers, ...props }: CalendarDayButtonProps): JSX.Element;
|
|
11
|
+
export { Calendar, CalendarDayButton };
|
|
12
|
+
export type { CalendarDayButtonProps, CalendarProps };
|
|
13
|
+
//# sourceMappingURL=calendar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../src/components/calendar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,KAAK,EAAW,SAAS,EAAoB,MAAM,kBAAkB,CAAC;AAK7E,OAAO,EAAE,SAAS,EAAwB,MAAM,kBAAkB,CAAC;AAEnE,OAAO,EAAE,MAAM,EAAkB,MAAM,oBAAoB,CAAC;AAM5D,KAAK,aAAa,GAAG,cAAc,CAAC,OAAO,SAAS,CAAC,GAAG;IACtD,aAAa,CAAC,EAAE,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC;CAC1D,CAAC;AAEF,iBAAS,QAAQ,CAAC,EAChB,aAAuB,EACvB,aAAuB,EACvB,SAAS,EACT,UAAU,EACV,UAAU,EACV,UAAU,EACV,eAAsB,EACtB,GAAG,KAAK,EACT,EAAE,aAAa,GAAG,GAAG,CAAC,OAAO,CAgI7B;AAmDD,KAAK,sBAAsB,GAAG,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC;AAE/D,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,EACH,SAAS,EACT,GAAG,KAAK,EACT,EAAE,sBAAsB,GAAG,GAAG,CAAC,OAAO,CAuCtC;AAMD,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,CAAC;AACvC,YAAY,EAAE,sBAAsB,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -1,108 +1,103 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { cn } from "
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "#lib/utils";
|
|
4
4
|
import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
|
|
5
|
-
import { jsx } from "react/jsx-runtime";
|
|
6
5
|
import { useEffect, useRef } from "react";
|
|
7
6
|
import { DayPicker, getDefaultClassNames } from "react-day-picker";
|
|
8
|
-
|
|
7
|
+
import { Button, buttonVariants } from "#components/button";
|
|
9
8
|
function Calendar({ buttonVariant = "ghost", captionLayout = "label", className, classNames, components, formatters, showOutsideDays = true, ...props }) {
|
|
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
|
-
|
|
9
|
+
const defaultClassNames = getDefaultClassNames();
|
|
10
|
+
return (_jsx(DayPicker, { captionLayout: captionLayout, className: cn("group/calendar", "p-3", "bg-background", "in-data-[slot=card-content]:bg-transparent", "in-data-[slot=popover-content]:bg-transparent", "rtl:**:[.rdp-button_next>svg]:rotate-180", "rtl:**:[.rdp-button_previous>svg]:rotate-180", "[--cell-size:--spacing(8)]", className), classNames: {
|
|
11
|
+
button_next: buttonVariants({
|
|
12
|
+
variant: buttonVariant,
|
|
13
|
+
className: [
|
|
14
|
+
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
15
|
+
defaultClassNames.button_next,
|
|
16
|
+
],
|
|
17
|
+
}),
|
|
18
|
+
button_previous: buttonVariants({
|
|
19
|
+
variant: buttonVariant,
|
|
20
|
+
className: [
|
|
21
|
+
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
22
|
+
defaultClassNames.button_previous,
|
|
23
|
+
],
|
|
24
|
+
}),
|
|
25
|
+
caption_label: cn("font-medium", "select-none", captionLayout === "label"
|
|
26
|
+
? "text-sm"
|
|
27
|
+
: "flex h-8 items-center gap-1 rounded-md pr-1 pl-2 text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground", defaultClassNames.caption_label),
|
|
28
|
+
day: cn("group/day relative", "aspect-square h-full w-full p-0 text-center", "select-none", "[&:last-child[data-selected=true]_button]:rounded-r-md", props.showWeekNumber
|
|
29
|
+
? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-md"
|
|
30
|
+
: "[&:first-child[data-selected=true]_button]:rounded-l-md", defaultClassNames.day),
|
|
31
|
+
disabled: cn("opacity-50", "text-muted-foreground", defaultClassNames.disabled),
|
|
32
|
+
dropdown: cn("absolute inset-0", "bg-popover", "opacity-0", defaultClassNames.dropdown),
|
|
33
|
+
dropdown_root: cn("relative", "rounded-md border border-input shadow-xs", "has-focus:border-ring has-focus:ring-3 has-focus:ring-ring/50", defaultClassNames.dropdown_root),
|
|
34
|
+
dropdowns: cn("flex h-(--cell-size) w-full items-center justify-center gap-1.5", "text-sm font-medium", defaultClassNames.dropdowns),
|
|
35
|
+
hidden: cn("invisible", defaultClassNames.hidden),
|
|
36
|
+
month: cn("flex w-full flex-col gap-4", defaultClassNames.month),
|
|
37
|
+
month_caption: cn("flex h-(--cell-size) w-full items-center justify-center", "px-(--cell-size)", defaultClassNames.month_caption),
|
|
38
|
+
months: cn("relative flex flex-col gap-4", "md:flex-row", defaultClassNames.months),
|
|
39
|
+
nav: cn("absolute flex w-full items-center justify-between gap-1", "inset-x-0 top-0", defaultClassNames.nav),
|
|
40
|
+
outside: cn("text-muted-foreground", "aria-selected:text-muted-foreground", defaultClassNames.outside),
|
|
41
|
+
range_end: cn("rounded-r-md", "bg-accent", defaultClassNames.range_end),
|
|
42
|
+
range_middle: cn("rounded-none", defaultClassNames.range_middle),
|
|
43
|
+
range_start: cn("rounded-l-md", "bg-accent", defaultClassNames.range_start),
|
|
44
|
+
root: cn("w-fit", defaultClassNames.root),
|
|
45
|
+
table: "w-full border-collapse",
|
|
46
|
+
today: cn("rounded-md", "bg-accent text-accent-foreground", "data-selected:rounded-none", defaultClassNames.today),
|
|
47
|
+
week: cn("flex w-full", "mt-2", defaultClassNames.week),
|
|
48
|
+
week_number: cn("text-[0.8rem] text-muted-foreground", "select-none", defaultClassNames.week_number),
|
|
49
|
+
week_number_header: cn("w-(--cell-size)", "select-none", defaultClassNames.week_number_header),
|
|
50
|
+
weekday: cn("flex-1", "rounded-md", "text-[0.8rem] font-normal text-muted-foreground", "select-none", defaultClassNames.weekday),
|
|
51
|
+
weekdays: cn("flex", defaultClassNames.weekdays),
|
|
52
|
+
...classNames,
|
|
53
|
+
}, components: {
|
|
54
|
+
Chevron: CalendarChevron,
|
|
55
|
+
DayButton: CalendarDayButton,
|
|
56
|
+
Root: CalendarRoot,
|
|
57
|
+
WeekNumber: CalendarWeekNumber,
|
|
58
|
+
...components,
|
|
59
|
+
}, formatters: {
|
|
60
|
+
formatMonthDropdown: (date) => date.toLocaleString("default", { month: "short" }),
|
|
61
|
+
...formatters,
|
|
62
|
+
}, showOutsideDays: showOutsideDays, ...props }));
|
|
56
63
|
}
|
|
64
|
+
/* -----------------------------------------------------------------------------
|
|
65
|
+
* Component: CalendarChevron (internal)
|
|
66
|
+
* -------------------------------------------------------------------------- */
|
|
57
67
|
function CalendarChevron({ className, orientation, ...props }) {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
});
|
|
66
|
-
return /* @__PURE__ */ jsx(ChevronDownIcon, {
|
|
67
|
-
className: cn("size-4", className),
|
|
68
|
-
...props
|
|
69
|
-
});
|
|
68
|
+
if (orientation === "left") {
|
|
69
|
+
return _jsx(ChevronLeftIcon, { className: cn("size-4", className), ...props });
|
|
70
|
+
}
|
|
71
|
+
if (orientation === "right") {
|
|
72
|
+
return _jsx(ChevronRightIcon, { className: cn("size-4", className), ...props });
|
|
73
|
+
}
|
|
74
|
+
return _jsx(ChevronDownIcon, { className: cn("size-4", className), ...props });
|
|
70
75
|
}
|
|
76
|
+
/* -----------------------------------------------------------------------------
|
|
77
|
+
* Component: CalendarRoot (internal)
|
|
78
|
+
* -------------------------------------------------------------------------- */
|
|
71
79
|
function CalendarRoot({ className, rootRef, ...props }) {
|
|
72
|
-
|
|
73
|
-
ref: rootRef,
|
|
74
|
-
className: cn(className),
|
|
75
|
-
"data-slot": "calendar",
|
|
76
|
-
...props
|
|
77
|
-
});
|
|
80
|
+
return _jsx("div", { ref: rootRef, className: cn(className), "data-slot": "calendar", ...props });
|
|
78
81
|
}
|
|
82
|
+
/* -----------------------------------------------------------------------------
|
|
83
|
+
* Component: CalendarWeekNumber (internal)
|
|
84
|
+
* -------------------------------------------------------------------------- */
|
|
79
85
|
function CalendarWeekNumber({ children, ...props }) {
|
|
80
|
-
|
|
81
|
-
...props,
|
|
82
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
83
|
-
className: "flex size-(--cell-size) items-center justify-center text-center",
|
|
84
|
-
children
|
|
85
|
-
})
|
|
86
|
-
});
|
|
86
|
+
return (_jsx("td", { ...props, children: _jsx("div", { className: cn("flex size-(--cell-size) items-center justify-center", "text-center"), children: children }) }));
|
|
87
87
|
}
|
|
88
88
|
function CalendarDayButton({ className, day, modifiers, ...props }) {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
"data-range-middle": modifiers.range_middle,
|
|
100
|
-
"data-range-start": modifiers.range_start,
|
|
101
|
-
"data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
|
|
102
|
-
size: "icon",
|
|
103
|
-
variant: "ghost",
|
|
104
|
-
...props
|
|
105
|
-
});
|
|
89
|
+
const defaultClassNames = getDefaultClassNames();
|
|
90
|
+
const ref = useRef(null);
|
|
91
|
+
useEffect(() => {
|
|
92
|
+
if (modifiers.focused)
|
|
93
|
+
ref.current?.focus();
|
|
94
|
+
}, [modifiers.focused]);
|
|
95
|
+
return (_jsx(Button, { ref: ref, className: cn("flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal", "group-data-focused/day:relative group-data-focused/day:z-10 group-data-focused/day:border-ring group-data-focused/day:ring-3 group-data-focused/day:ring-ring/50", "data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground", "data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground", "data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground", "data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground", "dark:hover:text-accent-foreground", "[&>span]:text-xs [&>span]:opacity-70", defaultClassNames.day, className), "data-day": day.date.toLocaleDateString(), "data-range-end": modifiers.range_end, "data-range-middle": modifiers.range_middle, "data-range-start": modifiers.range_start, "data-selected-single": modifiers.selected &&
|
|
96
|
+
!modifiers.range_start &&
|
|
97
|
+
!modifiers.range_end &&
|
|
98
|
+
!modifiers.range_middle, size: "icon", variant: "ghost", ...props }));
|
|
106
99
|
}
|
|
107
|
-
|
|
100
|
+
/* -----------------------------------------------------------------------------
|
|
101
|
+
* Exports
|
|
102
|
+
* -------------------------------------------------------------------------- */
|
|
108
103
|
export { Calendar, CalendarDayButton };
|
|
@@ -1,41 +1,18 @@
|
|
|
1
|
-
import { ComponentProps, JSX } from "react";
|
|
2
|
-
|
|
3
|
-
//#region src/components/card.d.ts
|
|
1
|
+
import type { ComponentProps, JSX } from "react";
|
|
4
2
|
type CardProps = ComponentProps<"div">;
|
|
5
|
-
declare function Card({
|
|
6
|
-
className,
|
|
7
|
-
...props
|
|
8
|
-
}: CardProps): JSX.Element;
|
|
3
|
+
declare function Card({ className, ...props }: CardProps): JSX.Element;
|
|
9
4
|
type CardHeaderProps = ComponentProps<"div">;
|
|
10
|
-
declare function CardHeader({
|
|
11
|
-
className,
|
|
12
|
-
...props
|
|
13
|
-
}: CardHeaderProps): JSX.Element;
|
|
5
|
+
declare function CardHeader({ className, ...props }: CardHeaderProps): JSX.Element;
|
|
14
6
|
type CardTitleProps = ComponentProps<"div">;
|
|
15
|
-
declare function CardTitle({
|
|
16
|
-
children,
|
|
17
|
-
className,
|
|
18
|
-
...props
|
|
19
|
-
}: CardTitleProps): JSX.Element;
|
|
7
|
+
declare function CardTitle({ children, className, ...props }: CardTitleProps): JSX.Element;
|
|
20
8
|
type CardDescriptionProps = ComponentProps<"div">;
|
|
21
|
-
declare function CardDescription({
|
|
22
|
-
className,
|
|
23
|
-
...props
|
|
24
|
-
}: CardDescriptionProps): JSX.Element;
|
|
9
|
+
declare function CardDescription({ className, ...props }: CardDescriptionProps): JSX.Element;
|
|
25
10
|
type CardContentProps = ComponentProps<"div">;
|
|
26
|
-
declare function CardContent({
|
|
27
|
-
className,
|
|
28
|
-
...props
|
|
29
|
-
}: CardContentProps): JSX.Element;
|
|
11
|
+
declare function CardContent({ className, ...props }: CardContentProps): JSX.Element;
|
|
30
12
|
type CardFooterProps = ComponentProps<"div">;
|
|
31
|
-
declare function CardFooter({
|
|
32
|
-
className,
|
|
33
|
-
...props
|
|
34
|
-
}: CardFooterProps): JSX.Element;
|
|
13
|
+
declare function CardFooter({ className, ...props }: CardFooterProps): JSX.Element;
|
|
35
14
|
type CardActionProps = ComponentProps<"div">;
|
|
36
|
-
declare function CardAction({
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
//#endregion
|
|
41
|
-
export { Card, CardAction, type CardActionProps, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps };
|
|
15
|
+
declare function CardAction({ className, ...props }: CardActionProps): JSX.Element;
|
|
16
|
+
export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
|
|
17
|
+
export type { CardActionProps, CardContentProps, CardDescriptionProps, CardFooterProps, CardHeaderProps, CardProps, CardTitleProps, };
|
|
18
|
+
//# sourceMappingURL=card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../src/components/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAQjD,KAAK,SAAS,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAEvC,iBAAS,IAAI,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,GAAG,GAAG,CAAC,OAAO,CAa7D;AAMD,KAAK,eAAe,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAE7C,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,GAAG,GAAG,CAAC,OAAO,CAczE;AAMD,KAAK,cAAc,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAE5C,iBAAS,SAAS,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,GAAG,GAAG,CAAC,OAAO,CAMjF;AAMD,KAAK,oBAAoB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAElD,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,GAAG,GAAG,CAAC,OAAO,CAQnF;AAMD,KAAK,gBAAgB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAE9C,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,GAAG,GAAG,CAAC,OAAO,CAE3E;AAMD,KAAK,eAAe,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAE7C,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,GAAG,GAAG,CAAC,OAAO,CAQzE;AAMD,KAAK,eAAe,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAE7C,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,GAAG,GAAG,CAAC,OAAO,CAQzE;AAMD,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,eAAe,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC;AAC7F,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,SAAS,EACT,cAAc,GACf,CAAC"}
|
package/dist/components/card.js
CHANGED
|
@@ -1,55 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
//#region src/components/card.tsx
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "#lib/utils";
|
|
4
3
|
function Card({ className, ...props }) {
|
|
5
|
-
|
|
6
|
-
className: cn("flex flex-col gap-6 overflow-auto rounded-xl border bg-card py-6 text-card-foreground shadow-sm", className),
|
|
7
|
-
"data-slot": "card",
|
|
8
|
-
...props
|
|
9
|
-
});
|
|
4
|
+
return (_jsx("div", { className: cn("flex flex-col gap-6 overflow-auto py-6", "rounded-xl border", "bg-card text-card-foreground shadow-sm", className), "data-slot": "card", ...props }));
|
|
10
5
|
}
|
|
11
6
|
function CardHeader({ className, ...props }) {
|
|
12
|
-
|
|
13
|
-
className: cn("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-[data-slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6", className),
|
|
14
|
-
"data-slot": "card-header",
|
|
15
|
-
...props
|
|
16
|
-
});
|
|
7
|
+
return (_jsx("div", { className: cn("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5", "px-6", "has-[data-slot=card-action]:grid-cols-[1fr_auto]", "[.border-b]:pb-6", className), "data-slot": "card-header", ...props }));
|
|
17
8
|
}
|
|
18
9
|
function CardTitle({ children, className, ...props }) {
|
|
19
|
-
|
|
20
|
-
className: cn("leading-none font-semibold", className),
|
|
21
|
-
"data-slot": "card-title",
|
|
22
|
-
...props,
|
|
23
|
-
children
|
|
24
|
-
});
|
|
10
|
+
return (_jsx("div", { className: cn("leading-none font-semibold", className), "data-slot": "card-title", ...props, children: children }));
|
|
25
11
|
}
|
|
26
12
|
function CardDescription({ className, ...props }) {
|
|
27
|
-
|
|
28
|
-
className: cn("text-sm text-muted-foreground", className),
|
|
29
|
-
"data-slot": "card-description",
|
|
30
|
-
...props
|
|
31
|
-
});
|
|
13
|
+
return (_jsx("div", { className: cn("text-sm text-muted-foreground", className), "data-slot": "card-description", ...props }));
|
|
32
14
|
}
|
|
33
15
|
function CardContent({ className, ...props }) {
|
|
34
|
-
|
|
35
|
-
className: cn("px-6", className),
|
|
36
|
-
"data-slot": "card-content",
|
|
37
|
-
...props
|
|
38
|
-
});
|
|
16
|
+
return _jsx("div", { className: cn("px-6", className), "data-slot": "card-content", ...props });
|
|
39
17
|
}
|
|
40
18
|
function CardFooter({ className, ...props }) {
|
|
41
|
-
|
|
42
|
-
className: cn("flex items-center px-6 [.border-t]:pt-6", className),
|
|
43
|
-
"data-slot": "card-footer",
|
|
44
|
-
...props
|
|
45
|
-
});
|
|
19
|
+
return (_jsx("div", { className: cn("flex items-center", "px-6", "[.border-t]:pt-6", className), "data-slot": "card-footer", ...props }));
|
|
46
20
|
}
|
|
47
21
|
function CardAction({ className, ...props }) {
|
|
48
|
-
|
|
49
|
-
className: cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className),
|
|
50
|
-
"data-slot": "card-action",
|
|
51
|
-
...props
|
|
52
|
-
});
|
|
22
|
+
return (_jsx("div", { className: cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className), "data-slot": "card-action", ...props }));
|
|
53
23
|
}
|
|
54
|
-
|
|
24
|
+
/* -----------------------------------------------------------------------------
|
|
25
|
+
* Exports
|
|
26
|
+
* -------------------------------------------------------------------------- */
|
|
55
27
|
export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
|
|
@@ -1,68 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
//#region src/components/carousel.d.ts
|
|
1
|
+
import type { Scope } from "@radix-ui/react-context";
|
|
2
|
+
import type { UseEmblaCarouselType } from "embla-carousel-react";
|
|
3
|
+
import type { ComponentProps, JSX } from "react";
|
|
4
|
+
import useEmblaCarousel from "embla-carousel-react";
|
|
5
|
+
import { Button } from "#components/button";
|
|
8
6
|
type ScopedProps<P> = P & {
|
|
9
|
-
|
|
7
|
+
__scopeCarousel?: Scope;
|
|
10
8
|
};
|
|
11
|
-
declare const createCarouselScope:
|
|
9
|
+
declare const createCarouselScope: import("@radix-ui/react-context").CreateScope;
|
|
12
10
|
type CarouselApi = UseEmblaCarouselType[1];
|
|
13
11
|
type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
|
|
14
12
|
type CarouselOptions = UseCarouselParameters[0];
|
|
15
13
|
type CarouselPlugin = UseCarouselParameters[1];
|
|
16
14
|
interface BaseCarouselProps {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
opts?: CarouselOptions;
|
|
16
|
+
orientation?: "horizontal" | "vertical";
|
|
17
|
+
plugins?: CarouselPlugin;
|
|
18
|
+
setApi?: (api: CarouselApi) => void;
|
|
21
19
|
}
|
|
22
|
-
interface CarouselProps extends BaseCarouselProps, ComponentProps<"div"> {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
children,
|
|
26
|
-
className,
|
|
27
|
-
opts,
|
|
28
|
-
orientation,
|
|
29
|
-
plugins,
|
|
30
|
-
setApi,
|
|
31
|
-
...props
|
|
32
|
-
}: ScopedProps<CarouselProps>): JSX.Element;
|
|
20
|
+
interface CarouselProps extends BaseCarouselProps, ComponentProps<"div"> {
|
|
21
|
+
}
|
|
22
|
+
declare function Carousel({ __scopeCarousel, children, className, opts, orientation, plugins, setApi, ...props }: ScopedProps<CarouselProps>): JSX.Element;
|
|
33
23
|
interface CarouselContentProps extends ComponentProps<"div"> {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
24
|
+
classNames?: {
|
|
25
|
+
content?: string;
|
|
26
|
+
wrapper?: string;
|
|
27
|
+
};
|
|
38
28
|
}
|
|
39
|
-
declare function CarouselContent({
|
|
40
|
-
__scopeCarousel,
|
|
41
|
-
className,
|
|
42
|
-
classNames,
|
|
43
|
-
...props
|
|
44
|
-
}: ScopedProps<CarouselContentProps>): JSX.Element;
|
|
29
|
+
declare function CarouselContent({ __scopeCarousel, className, classNames, ...props }: ScopedProps<CarouselContentProps>): JSX.Element;
|
|
45
30
|
type CarouselItemProps = ComponentProps<"div">;
|
|
46
|
-
declare function CarouselItem({
|
|
47
|
-
__scopeCarousel,
|
|
48
|
-
className,
|
|
49
|
-
...props
|
|
50
|
-
}: ScopedProps<CarouselItemProps>): JSX.Element;
|
|
31
|
+
declare function CarouselItem({ __scopeCarousel, className, ...props }: ScopedProps<CarouselItemProps>): JSX.Element;
|
|
51
32
|
type CarouselPreviousProps = ComponentProps<typeof Button>;
|
|
52
|
-
declare function CarouselPrevious({
|
|
53
|
-
__scopeCarousel,
|
|
54
|
-
className,
|
|
55
|
-
size,
|
|
56
|
-
variant,
|
|
57
|
-
...props
|
|
58
|
-
}: ScopedProps<CarouselPreviousProps>): JSX.Element;
|
|
33
|
+
declare function CarouselPrevious({ __scopeCarousel, className, size, variant, ...props }: ScopedProps<CarouselPreviousProps>): JSX.Element;
|
|
59
34
|
type CarouselNextProps = ComponentProps<typeof Button>;
|
|
60
|
-
declare function CarouselNext({
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
variant,
|
|
65
|
-
...props
|
|
66
|
-
}: ScopedProps<CarouselNextProps>): JSX.Element;
|
|
67
|
-
//#endregion
|
|
68
|
-
export { Carousel, type CarouselApi, CarouselContent, type CarouselContentProps, CarouselItem, type CarouselItemProps, CarouselNext, type CarouselNextProps, CarouselPrevious, type CarouselPreviousProps, type CarouselProps, createCarouselScope };
|
|
35
|
+
declare function CarouselNext({ __scopeCarousel, className, size, variant, ...props }: ScopedProps<CarouselNextProps>): JSX.Element;
|
|
36
|
+
export type { CarouselApi, CarouselContentProps, CarouselItemProps, CarouselNextProps, CarouselPreviousProps, CarouselProps, };
|
|
37
|
+
export { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, createCarouselScope, };
|
|
38
|
+
//# sourceMappingURL=carousel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"carousel.d.ts","sourceRoot":"","sources":["../../src/components/carousel.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAiB,MAAM,OAAO,CAAC;AAIhE,OAAO,gBAAgB,MAAM,sBAAsB,CAAC;AAIpD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAQ5C,KAAK,WAAW,CAAC,CAAC,IAAI,CAAC,GAAG;IAAE,eAAe,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC;AAEtD,QAAA,MAA8B,mBAAmB,+CAAqC,CAAC;AAEvF,KAAK,WAAW,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC;AAC3C,KAAK,qBAAqB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AACjE,KAAK,eAAe,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAAC;AAChD,KAAK,cAAc,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAAC;AAE/C,UAAU,iBAAiB;IACzB,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,WAAW,KAAK,IAAI,CAAC;CACrC;AAkBD,UAAU,aAAc,SAAQ,iBAAiB,EAAE,cAAc,CAAC,KAAK,CAAC;CAAG;AAE3E,iBAAS,QAAQ,CAAC,EAChB,eAAe,EACf,QAAQ,EACR,SAAS,EACT,IAAI,EACJ,WAAW,EACX,OAAO,EACP,MAAM,EACN,GAAG,KAAK,EACT,EAAE,WAAW,CAAC,aAAa,CAAC,GAAG,GAAG,CAAC,OAAO,CAyF1C;AAQD,UAAU,oBAAqB,SAAQ,cAAc,CAAC,KAAK,CAAC;IAC1D,UAAU,CAAC,EAAE;QACX,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;CACH;AAED,iBAAS,eAAe,CAAC,EACvB,eAAe,EACf,SAAS,EACT,UAAU,EACV,GAAG,KAAK,EACT,EAAE,WAAW,CAAC,oBAAoB,CAAC,GAAG,GAAG,CAAC,OAAO,CAoBjD;AAQD,KAAK,iBAAiB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAE/C,iBAAS,YAAY,CAAC,EACpB,eAAe,EACf,SAAS,EACT,GAAG,KAAK,EACT,EAAE,WAAW,CAAC,iBAAiB,CAAC,GAAG,GAAG,CAAC,OAAO,CAgB9C;AAQD,KAAK,qBAAqB,GAAG,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC;AAE3D,iBAAS,gBAAgB,CAAC,EACxB,eAAe,EACf,SAAS,EACT,IAAa,EACb,OAAmB,EACnB,GAAG,KAAK,EACT,EAAE,WAAW,CAAC,qBAAqB,CAAC,GAAG,GAAG,CAAC,OAAO,CA6BlD;AAQD,KAAK,iBAAiB,GAAG,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC;AAEvD,iBAAS,YAAY,CAAC,EACpB,eAAe,EACf,SAAS,EACT,IAAa,EACb,OAAmB,EACnB,GAAG,KAAK,EACT,EAAE,WAAW,CAAC,iBAAiB,CAAC,GAAG,GAAG,CAAC,OAAO,CA6B9C;AAMD,YAAY,EACV,WAAW,EACX,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,aAAa,GACd,CAAC;AACF,OAAO,EACL,QAAQ,EACR,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,mBAAmB,GACpB,CAAC"}
|