@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,24 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
outline: string;
|
|
11
|
-
secondary: string;
|
|
12
|
-
};
|
|
1
|
+
import type { VariantProps } from "@codefast/tailwind-variants";
|
|
2
|
+
import type { ComponentProps, JSX } from "react";
|
|
3
|
+
declare const badgeVariants: import("@codefast/tailwind-variants").VariantFunctionType<{
|
|
4
|
+
variant: {
|
|
5
|
+
default: string;
|
|
6
|
+
destructive: string;
|
|
7
|
+
outline: string;
|
|
8
|
+
secondary: string;
|
|
9
|
+
};
|
|
13
10
|
}, Record<string, never>>;
|
|
14
11
|
interface BadgeProps extends ComponentProps<"span">, VariantProps<typeof badgeVariants> {
|
|
15
|
-
|
|
12
|
+
asChild?: boolean;
|
|
16
13
|
}
|
|
17
|
-
declare function Badge({
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}: BadgeProps): JSX.Element;
|
|
23
|
-
//#endregion
|
|
24
|
-
export { Badge, type BadgeProps, badgeVariants };
|
|
14
|
+
declare function Badge({ asChild, className, variant, ...props }: BadgeProps): JSX.Element;
|
|
15
|
+
export { badgeVariants };
|
|
16
|
+
export { Badge };
|
|
17
|
+
export type { BadgeProps };
|
|
18
|
+
//# sourceMappingURL=badge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../src/components/badge.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AASjD,QAAA,MAAM,aAAa;;;;;;;yBAiBjB,CAAC;AAMH,UAAU,UAAW,SAAQ,cAAc,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC,OAAO,aAAa,CAAC;IACrF,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,iBAAS,KAAK,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,GAAG,GAAG,CAAC,OAAO,CAMjF;AAMD,OAAO,EAAE,aAAa,EAAE,CAAC;AACzB,OAAO,EAAE,KAAK,EAAE,CAAC;AAEjB,YAAY,EAAE,UAAU,EAAE,CAAC"}
|
package/dist/components/badge.js
CHANGED
|
@@ -1,27 +1,30 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
3
|
import { tv } from "@codefast/tailwind-variants";
|
|
3
4
|
import { Slot } from "@radix-ui/react-slot";
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
/* -----------------------------------------------------------------------------
|
|
6
|
+
* Variant: Badge
|
|
7
|
+
* -------------------------------------------------------------------------- */
|
|
6
8
|
const badgeVariants = tv({
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
base: "inline-flex w-fit shrink-0 items-center justify-center gap-2 rounded-md border px-1.5 py-0.5 text-xs font-medium whitespace-nowrap outline-hidden transition focus-visible:ring-3 focus-visible:ring-ring/50 [&>svg]:size-3 [&>svg]:shrink-0",
|
|
10
|
+
defaultVariants: {
|
|
11
|
+
variant: "default",
|
|
12
|
+
},
|
|
13
|
+
variants: {
|
|
14
|
+
variant: {
|
|
15
|
+
default: "border-transparent bg-primary text-primary-foreground focus-visible:ring-primary/20 dark:focus-visible:ring-primary/40 [a&]:hover:bg-primary/80",
|
|
16
|
+
destructive: "border-transparent bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",
|
|
17
|
+
outline: "border-input bg-background focus-visible:border-ring [a&]:hover:border-ring/60 [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
18
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/80",
|
|
19
|
+
},
|
|
20
|
+
},
|
|
15
21
|
});
|
|
16
22
|
function Badge({ asChild, className, variant, ...props }) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
className,
|
|
20
|
-
variant
|
|
21
|
-
}),
|
|
22
|
-
"data-slot": "badge",
|
|
23
|
-
...props
|
|
24
|
-
});
|
|
23
|
+
const Component = asChild ? Slot : "span";
|
|
24
|
+
return (_jsx(Component, { className: badgeVariants({ className, variant }), "data-slot": "badge", ...props }));
|
|
25
25
|
}
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
/* -----------------------------------------------------------------------------
|
|
27
|
+
* Exports
|
|
28
|
+
* -------------------------------------------------------------------------- */
|
|
29
|
+
export { badgeVariants };
|
|
30
|
+
export { Badge };
|
|
@@ -1,44 +1,22 @@
|
|
|
1
|
-
import { ComponentProps, JSX, ReactNode } from "react";
|
|
2
|
-
|
|
3
|
-
//#region src/components/breadcrumb.d.ts
|
|
1
|
+
import type { ComponentProps, JSX, ReactNode } from "react";
|
|
4
2
|
interface BreadcrumbProps extends ComponentProps<"nav"> {
|
|
5
|
-
|
|
3
|
+
separator?: ReactNode;
|
|
6
4
|
}
|
|
7
|
-
declare function Breadcrumb({
|
|
8
|
-
...props
|
|
9
|
-
}: BreadcrumbProps): JSX.Element;
|
|
5
|
+
declare function Breadcrumb({ ...props }: BreadcrumbProps): JSX.Element;
|
|
10
6
|
type BreadcrumbListProps = ComponentProps<"ol">;
|
|
11
|
-
declare function BreadcrumbList({
|
|
12
|
-
className,
|
|
13
|
-
...props
|
|
14
|
-
}: BreadcrumbListProps): JSX.Element;
|
|
7
|
+
declare function BreadcrumbList({ className, ...props }: BreadcrumbListProps): JSX.Element;
|
|
15
8
|
type BreadcrumbItemProps = ComponentProps<"li">;
|
|
16
|
-
declare function BreadcrumbItem({
|
|
17
|
-
className,
|
|
18
|
-
...props
|
|
19
|
-
}: BreadcrumbItemProps): JSX.Element;
|
|
9
|
+
declare function BreadcrumbItem({ className, ...props }: BreadcrumbItemProps): JSX.Element;
|
|
20
10
|
interface BreadcrumbLinkProps extends ComponentProps<"a"> {
|
|
21
|
-
|
|
11
|
+
asChild?: boolean;
|
|
22
12
|
}
|
|
23
|
-
declare function BreadcrumbLink({
|
|
24
|
-
asChild,
|
|
25
|
-
className,
|
|
26
|
-
...props
|
|
27
|
-
}: BreadcrumbLinkProps): JSX.Element;
|
|
13
|
+
declare function BreadcrumbLink({ asChild, className, ...props }: BreadcrumbLinkProps): JSX.Element;
|
|
28
14
|
type BreadcrumbPageProps = ComponentProps<"span">;
|
|
29
|
-
declare function BreadcrumbPage({
|
|
30
|
-
className,
|
|
31
|
-
...props
|
|
32
|
-
}: BreadcrumbPageProps): JSX.Element;
|
|
15
|
+
declare function BreadcrumbPage({ className, ...props }: BreadcrumbPageProps): JSX.Element;
|
|
33
16
|
type BreadcrumbSeparatorProps = ComponentProps<"li">;
|
|
34
|
-
declare function BreadcrumbSeparator({
|
|
35
|
-
children,
|
|
36
|
-
...props
|
|
37
|
-
}: BreadcrumbSeparatorProps): JSX.Element;
|
|
17
|
+
declare function BreadcrumbSeparator({ children, ...props }: BreadcrumbSeparatorProps): JSX.Element;
|
|
38
18
|
type BreadcrumbEllipsisProps = ComponentProps<"span">;
|
|
39
|
-
declare function BreadcrumbEllipsis({
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
//#endregion
|
|
44
|
-
export { Breadcrumb, BreadcrumbEllipsis, type BreadcrumbEllipsisProps, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbList, type BreadcrumbListProps, BreadcrumbPage, type BreadcrumbPageProps, type BreadcrumbProps, BreadcrumbSeparator, type BreadcrumbSeparatorProps };
|
|
19
|
+
declare function BreadcrumbEllipsis({ className, ...props }: BreadcrumbEllipsisProps): JSX.Element;
|
|
20
|
+
export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, };
|
|
21
|
+
export type { BreadcrumbEllipsisProps, BreadcrumbItemProps, BreadcrumbLinkProps, BreadcrumbListProps, BreadcrumbPageProps, BreadcrumbProps, BreadcrumbSeparatorProps, };
|
|
22
|
+
//# sourceMappingURL=breadcrumb.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breadcrumb.d.ts","sourceRoot":"","sources":["../../src/components/breadcrumb.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAU5D,UAAU,eAAgB,SAAQ,cAAc,CAAC,KAAK,CAAC;IACrD,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAED,iBAAS,UAAU,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,GAAG,GAAG,CAAC,OAAO,CAE9D;AAMD,KAAK,mBAAmB,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;AAEhD,iBAAS,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,mBAAmB,GAAG,GAAG,CAAC,OAAO,CAWjF;AAMD,KAAK,mBAAmB,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;AAEhD,iBAAS,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,mBAAmB,GAAG,GAAG,CAAC,OAAO,CAQjF;AAMD,UAAU,mBAAoB,SAAQ,cAAc,CAAC,GAAG,CAAC;IACvD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,iBAAS,cAAc,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,mBAAmB,GAAG,GAAG,CAAC,OAAO,CAU1F;AAMD,KAAK,mBAAmB,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;AAElD,iBAAS,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,mBAAmB,GAAG,GAAG,CAAC,OAAO,CAUjF;AAMD,KAAK,wBAAwB,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;AAErD,iBAAS,mBAAmB,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,wBAAwB,GAAG,GAAG,CAAC,OAAO,CAM1F;AAMD,KAAK,uBAAuB,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;AAEtD,iBAAS,kBAAkB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,uBAAuB,GAAG,GAAG,CAAC,OAAO,CAazF;AAMD,OAAO,EACL,UAAU,EACV,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,cAAc,EACd,cAAc,EACd,mBAAmB,GACpB,CAAC;AACF,YAAY,EACV,uBAAuB,EACvB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,EACf,wBAAwB,GACzB,CAAC"}
|
|
@@ -1,67 +1,31 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { cn } from "@codefast/tailwind-variants";
|
|
3
4
|
import { Slot } from "@radix-ui/react-slot";
|
|
4
5
|
import { ChevronRightIcon, EllipsisIcon } from "lucide-react";
|
|
5
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
//#region src/components/breadcrumb.tsx
|
|
7
6
|
function Breadcrumb({ ...props }) {
|
|
8
|
-
|
|
9
|
-
"aria-label": "breadcrumb",
|
|
10
|
-
"data-slot": "breadcrumb",
|
|
11
|
-
...props
|
|
12
|
-
});
|
|
7
|
+
return _jsx("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...props });
|
|
13
8
|
}
|
|
14
9
|
function BreadcrumbList({ className, ...props }) {
|
|
15
|
-
|
|
16
|
-
className: cn("flex flex-wrap items-center gap-1.5 text-sm break-words text-muted-foreground sm:gap-2", className),
|
|
17
|
-
"data-slot": "breadcrumb-list",
|
|
18
|
-
...props
|
|
19
|
-
});
|
|
10
|
+
return (_jsx("ol", { className: cn("flex flex-wrap items-center gap-1.5 text-sm break-words text-muted-foreground sm:gap-2", className), "data-slot": "breadcrumb-list", ...props }));
|
|
20
11
|
}
|
|
21
12
|
function BreadcrumbItem({ className, ...props }) {
|
|
22
|
-
|
|
23
|
-
className: cn("inline-flex items-center gap-1.5", className),
|
|
24
|
-
"data-slot": "breadcrumb-item",
|
|
25
|
-
...props
|
|
26
|
-
});
|
|
13
|
+
return (_jsx("li", { className: cn("inline-flex items-center gap-1.5", className), "data-slot": "breadcrumb-item", ...props }));
|
|
27
14
|
}
|
|
28
15
|
function BreadcrumbLink({ asChild, className, ...props }) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"data-slot": "breadcrumb-link",
|
|
32
|
-
...props
|
|
33
|
-
});
|
|
16
|
+
const Component = asChild ? Slot : "a";
|
|
17
|
+
return (_jsx(Component, { className: cn("transition-colors hover:text-foreground", className), "data-slot": "breadcrumb-link", ...props }));
|
|
34
18
|
}
|
|
35
19
|
function BreadcrumbPage({ className, ...props }) {
|
|
36
|
-
|
|
37
|
-
"aria-current": "page",
|
|
38
|
-
"aria-disabled": "true",
|
|
39
|
-
className: cn("font-normal text-foreground", className),
|
|
40
|
-
"data-slot": "breadcrumb-page",
|
|
41
|
-
...props
|
|
42
|
-
});
|
|
20
|
+
return (_jsx("span", { "aria-current": "page", "aria-disabled": "true", className: cn("font-normal text-foreground", className), "data-slot": "breadcrumb-page", ...props }));
|
|
43
21
|
}
|
|
44
22
|
function BreadcrumbSeparator({ children, ...props }) {
|
|
45
|
-
|
|
46
|
-
"aria-hidden": "true",
|
|
47
|
-
"data-slot": "breadcrumb-separator",
|
|
48
|
-
role: "presentation",
|
|
49
|
-
...props,
|
|
50
|
-
children: children ?? /* @__PURE__ */ jsx(ChevronRightIcon, { className: "size-3.5" })
|
|
51
|
-
});
|
|
23
|
+
return (_jsx("li", { "aria-hidden": "true", "data-slot": "breadcrumb-separator", role: "presentation", ...props, children: children ?? _jsx(ChevronRightIcon, { className: "size-3.5" }) }));
|
|
52
24
|
}
|
|
53
25
|
function BreadcrumbEllipsis({ className, ...props }) {
|
|
54
|
-
|
|
55
|
-
"aria-hidden": "true",
|
|
56
|
-
className: cn("flex size-4 items-center justify-center", className),
|
|
57
|
-
"data-slot": "breadcrumb-ellipsis",
|
|
58
|
-
role: "presentation",
|
|
59
|
-
...props,
|
|
60
|
-
children: [/* @__PURE__ */ jsx(EllipsisIcon, { className: "size-4" }), /* @__PURE__ */ jsx("span", {
|
|
61
|
-
className: "sr-only",
|
|
62
|
-
children: "More"
|
|
63
|
-
})]
|
|
64
|
-
});
|
|
26
|
+
return (_jsxs("span", { "aria-hidden": "true", className: cn("flex size-4 items-center justify-center", className), "data-slot": "breadcrumb-ellipsis", role: "presentation", ...props, children: [_jsx(EllipsisIcon, { className: "size-4" }), _jsx("span", { className: "sr-only", children: "More" })] }));
|
|
65
27
|
}
|
|
66
|
-
|
|
67
|
-
|
|
28
|
+
/* -----------------------------------------------------------------------------
|
|
29
|
+
* Exports
|
|
30
|
+
* -------------------------------------------------------------------------- */
|
|
31
|
+
export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, };
|
|
@@ -1,34 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
horizontal: string;
|
|
10
|
-
vertical: string;
|
|
11
|
-
};
|
|
1
|
+
import type { VariantProps } from "@codefast/tailwind-variants";
|
|
2
|
+
import type { ComponentProps, JSX } from "react";
|
|
3
|
+
import { Separator } from "#components/separator";
|
|
4
|
+
declare const buttonGroupVariants: import("@codefast/tailwind-variants").VariantFunctionType<{
|
|
5
|
+
orientation: {
|
|
6
|
+
horizontal: string;
|
|
7
|
+
vertical: string;
|
|
8
|
+
};
|
|
12
9
|
}, Record<string, never>>;
|
|
13
10
|
type ButtonGroupProps = ComponentProps<"div"> & VariantProps<typeof buttonGroupVariants>;
|
|
14
|
-
declare function ButtonGroup({
|
|
15
|
-
className,
|
|
16
|
-
orientation,
|
|
17
|
-
...props
|
|
18
|
-
}: ButtonGroupProps): JSX.Element;
|
|
11
|
+
declare function ButtonGroup({ className, orientation, ...props }: ButtonGroupProps): JSX.Element;
|
|
19
12
|
interface ButtonGroupTextProps extends ComponentProps<"div"> {
|
|
20
|
-
|
|
13
|
+
asChild?: boolean;
|
|
21
14
|
}
|
|
22
|
-
declare function ButtonGroupText({
|
|
23
|
-
asChild,
|
|
24
|
-
className,
|
|
25
|
-
...props
|
|
26
|
-
}: ButtonGroupTextProps): JSX.Element;
|
|
15
|
+
declare function ButtonGroupText({ asChild, className, ...props }: ButtonGroupTextProps): JSX.Element;
|
|
27
16
|
type ButtonGroupSeparatorProps = ComponentProps<typeof Separator>;
|
|
28
|
-
declare function ButtonGroupSeparator({
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}: ButtonGroupSeparatorProps): JSX.Element;
|
|
33
|
-
//#endregion
|
|
34
|
-
export { ButtonGroup, type ButtonGroupProps, ButtonGroupSeparator, type ButtonGroupSeparatorProps, ButtonGroupText, type ButtonGroupTextProps, buttonGroupVariants };
|
|
17
|
+
declare function ButtonGroupSeparator({ className, orientation, ...props }: ButtonGroupSeparatorProps): JSX.Element;
|
|
18
|
+
export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants };
|
|
19
|
+
export type { ButtonGroupProps, ButtonGroupSeparatorProps, ButtonGroupTextProps };
|
|
20
|
+
//# sourceMappingURL=button-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-group.d.ts","sourceRoot":"","sources":["../../src/components/button-group.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAKjD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAMlD,QAAA,MAAM,mBAAmB;;;;;yBAkBvB,CAAC;AAMH,KAAK,gBAAgB,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEzF,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,GAAG,GAAG,CAAC,OAAO,CAUxF;AAMD,UAAU,oBAAqB,SAAQ,cAAc,CAAC,KAAK,CAAC;IAC1D,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,iBAAS,eAAe,CAAC,EACvB,OAAe,EACf,SAAS,EACT,GAAG,KAAK,EACT,EAAE,oBAAoB,GAAG,GAAG,CAAC,OAAO,CAYpC;AAMD,KAAK,yBAAyB,GAAG,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC;AAElE,iBAAS,oBAAoB,CAAC,EAC5B,SAAS,EACT,WAAwB,EACxB,GAAG,KAAK,EACT,EAAE,yBAAyB,GAAG,GAAG,CAAC,OAAO,CAYzC;AAMD,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,eAAe,EAAE,mBAAmB,EAAE,CAAC;AAEnF,YAAY,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -1,39 +1,34 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { cn, tv } from "@codefast/tailwind-variants";
|
|
4
4
|
import { Slot } from "@radix-ui/react-slot";
|
|
5
|
-
import {
|
|
6
|
-
|
|
5
|
+
import { Separator } from "#components/separator";
|
|
6
|
+
/* -----------------------------------------------------------------------------
|
|
7
|
+
* Variants: ButtonGroup
|
|
8
|
+
* -------------------------------------------------------------------------- */
|
|
7
9
|
const buttonGroupVariants = tv({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
base: cn("flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2", "[&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit", "[&>*]:focus-visible:relative [&>*]:focus-visible:z-10 [&>input]:flex-1", "has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg"),
|
|
11
|
+
defaultVariants: {
|
|
12
|
+
orientation: "horizontal",
|
|
13
|
+
},
|
|
14
|
+
variants: {
|
|
15
|
+
orientation: {
|
|
16
|
+
horizontal: "[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",
|
|
17
|
+
vertical: "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none",
|
|
18
|
+
},
|
|
19
|
+
},
|
|
14
20
|
});
|
|
15
21
|
function ButtonGroup({ className, orientation, ...props }) {
|
|
16
|
-
|
|
17
|
-
className: cn(buttonGroupVariants({ orientation }), className),
|
|
18
|
-
"data-orientation": orientation,
|
|
19
|
-
"data-slot": "button-group",
|
|
20
|
-
role: "group",
|
|
21
|
-
...props
|
|
22
|
-
});
|
|
22
|
+
return (_jsx("div", { className: cn(buttonGroupVariants({ orientation }), className), "data-orientation": orientation, "data-slot": "button-group", role: "group", ...props }));
|
|
23
23
|
}
|
|
24
24
|
function ButtonGroupText({ asChild = false, className, ...props }) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
...props
|
|
28
|
-
});
|
|
25
|
+
const Component = asChild ? Slot : "div";
|
|
26
|
+
return (_jsx(Component, { className: cn("flex items-center gap-2 rounded-lg border bg-muted px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className), ...props }));
|
|
29
27
|
}
|
|
30
28
|
function ButtonGroupSeparator({ className, orientation = "vertical", ...props }) {
|
|
31
|
-
|
|
32
|
-
className: cn("relative !m-0 self-stretch bg-input data-[orientation=vertical]:h-auto", className),
|
|
33
|
-
"data-slot": "button-group-separator",
|
|
34
|
-
orientation,
|
|
35
|
-
...props
|
|
36
|
-
});
|
|
29
|
+
return (_jsx(Separator, { className: cn("relative !m-0 self-stretch bg-input data-[orientation=vertical]:h-auto", className), "data-slot": "button-group-separator", orientation: orientation, ...props }));
|
|
37
30
|
}
|
|
38
|
-
|
|
31
|
+
/* -----------------------------------------------------------------------------
|
|
32
|
+
* Exports
|
|
33
|
+
* -------------------------------------------------------------------------- */
|
|
39
34
|
export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants };
|
|
@@ -1,38 +1,29 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
outline: string;
|
|
21
|
-
secondary: string;
|
|
22
|
-
};
|
|
1
|
+
import type { VariantProps } from "@codefast/tailwind-variants";
|
|
2
|
+
import type { ComponentProps, JSX } from "react";
|
|
3
|
+
declare const buttonVariants: import("@codefast/tailwind-variants").VariantFunctionType<{
|
|
4
|
+
size: {
|
|
5
|
+
"icon-sm": string;
|
|
6
|
+
icon: string;
|
|
7
|
+
"icon-lg": string;
|
|
8
|
+
sm: string;
|
|
9
|
+
md: string;
|
|
10
|
+
lg: string;
|
|
11
|
+
};
|
|
12
|
+
variant: {
|
|
13
|
+
default: string;
|
|
14
|
+
destructive: string;
|
|
15
|
+
ghost: string;
|
|
16
|
+
link: string;
|
|
17
|
+
outline: string;
|
|
18
|
+
secondary: string;
|
|
19
|
+
};
|
|
23
20
|
}, Record<string, never>>;
|
|
24
21
|
type ButtonProps = ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
asChild?: boolean;
|
|
23
|
+
type?: ComponentProps<"button">["type"];
|
|
27
24
|
};
|
|
28
|
-
declare function Button({
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
type,
|
|
34
|
-
variant,
|
|
35
|
-
...props
|
|
36
|
-
}: ButtonProps): JSX.Element;
|
|
37
|
-
//#endregion
|
|
38
|
-
export { Button, type ButtonProps, buttonVariants };
|
|
25
|
+
declare function Button({ asChild, children, className, size, type, variant, ...props }: ButtonProps): JSX.Element;
|
|
26
|
+
export { buttonVariants };
|
|
27
|
+
export { Button };
|
|
28
|
+
export type { ButtonProps };
|
|
29
|
+
//# sourceMappingURL=button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/components/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AASjD,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;yBAwClB,CAAC;AAMH,KAAK,WAAW,GAAG,cAAc,CAAC,QAAQ,CAAC,GACzC,YAAY,CAAC,OAAO,cAAc,CAAC,GAAG;IACpC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC;CACzC,CAAC;AAEJ,iBAAS,MAAM,CAAC,EACd,OAAe,EACf,QAAQ,EACR,SAAS,EACT,IAAI,EACJ,IAAe,EACf,OAAO,EACP,GAAG,KAAK,EACT,EAAE,WAAW,GAAG,GAAG,CAAC,OAAO,CA2B3B;AAMD,OAAO,EAAE,cAAc,EAAE,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB,YAAY,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -1,57 +1,49 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { tv } from "@codefast/tailwind-variants";
|
|
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: "inline-flex shrink-0 items-center justify-center gap-2 rounded-lg text-sm font-medium whitespace-nowrap outline-hidden transition select-none focus-visible:ring-3 disabled:opacity-50 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
9
|
+
defaultVariants: {
|
|
10
|
+
size: "md",
|
|
11
|
+
variant: "default",
|
|
12
|
+
},
|
|
13
|
+
variants: {
|
|
14
|
+
size: {
|
|
15
|
+
// 32px
|
|
16
|
+
"icon-sm": "size-8",
|
|
17
|
+
// 36px
|
|
18
|
+
icon: "size-9",
|
|
19
|
+
// 40px
|
|
20
|
+
"icon-lg": "size-10",
|
|
21
|
+
// 32px
|
|
22
|
+
sm: "h-8 px-3 has-[>svg]:px-2.5",
|
|
23
|
+
// 36px
|
|
24
|
+
md: "h-9 px-4 has-[>svg]:px-3",
|
|
25
|
+
// 40px
|
|
26
|
+
lg: "h-10 px-6 has-[>svg]:px-4",
|
|
27
|
+
},
|
|
28
|
+
variant: {
|
|
29
|
+
default: "bg-primary text-primary-foreground hover:not-disabled:bg-primary/80 focus-visible:ring-primary/20 dark:focus-visible:ring-primary/40",
|
|
30
|
+
destructive: "bg-destructive text-white hover:not-disabled:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",
|
|
31
|
+
ghost: "hover:not-disabled:bg-secondary hover:not-disabled:text-secondary-foreground focus-visible:ring-ring/50 dark:hover:not-disabled:bg-secondary/50",
|
|
32
|
+
link: "text-primary underline-offset-4 hover:not-disabled:underline focus-visible:ring-ring/50",
|
|
33
|
+
outline: "border border-input shadow-xs hover:not-disabled:border-ring/60 hover:not-disabled:bg-secondary hover:not-disabled:text-secondary-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive focus-within:aria-invalid:ring-destructive/20 hover:not-disabled:aria-invalid:border-destructive/60 dark:bg-input/30 dark:hover:not-disabled:bg-input/50 dark:aria-invalid:border-destructive/70 dark:focus-within:aria-invalid:ring-destructive/40",
|
|
34
|
+
secondary: "bg-secondary text-secondary-foreground hover:not-disabled:bg-secondary/80 focus-visible:ring-ring/50",
|
|
35
|
+
},
|
|
36
|
+
},
|
|
29
37
|
});
|
|
30
38
|
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
|
-
});
|
|
39
|
+
const Comp = asChild ? Slot : "button";
|
|
40
|
+
if (asChild) {
|
|
41
|
+
return (_jsx(Comp, { className: buttonVariants({ className, size, variant }), "data-slot": "button", "data-variant": variant, ...props, children: children }));
|
|
42
|
+
}
|
|
43
|
+
return (_jsx("button", { className: buttonVariants({ className, size, variant }), "data-slot": "button", "data-variant": variant, type: type, ...props, children: children }));
|
|
55
44
|
}
|
|
56
|
-
|
|
57
|
-
|
|
45
|
+
/* -----------------------------------------------------------------------------
|
|
46
|
+
* Exports
|
|
47
|
+
* -------------------------------------------------------------------------- */
|
|
48
|
+
export { buttonVariants };
|
|
49
|
+
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,CAmG7B;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,CAgCtC;AAMD,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,CAAC;AACvC,YAAY,EAAE,sBAAsB,EAAE,aAAa,EAAE,CAAC"}
|