@codefast/ui 0.3.13-canary.2 → 0.3.13-canary.4
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 +26 -0
- package/dist/components/accordion.d.mts +37 -0
- package/dist/components/accordion.mjs +53 -0
- package/dist/components/alert-dialog.d.mts +74 -0
- package/dist/components/alert-dialog.mjs +92 -0
- package/dist/components/alert.d.mts +30 -0
- package/dist/components/alert.mjs +49 -0
- package/dist/components/aspect-ratio.d.mts +10 -0
- package/dist/components/aspect-ratio.mjs +12 -0
- package/dist/components/avatar.d.mts +21 -0
- package/dist/components/avatar.mjs +28 -0
- package/dist/components/badge.d.mts +24 -0
- package/dist/components/badge.mjs +56 -0
- package/dist/components/breadcrumb.d.mts +44 -0
- package/dist/components/breadcrumb.mjs +67 -0
- package/dist/components/button-group.d.mts +34 -0
- package/dist/components/button-group.mjs +53 -0
- package/dist/components/button.d.mts +38 -0
- package/dist/components/button.mjs +99 -0
- package/dist/components/calendar.d.mts +27 -0
- package/dist/components/calendar.mjs +114 -0
- package/dist/components/card.d.mts +41 -0
- package/dist/components/card.mjs +55 -0
- package/dist/components/carousel.d.mts +68 -0
- package/dist/components/carousel.mjs +135 -0
- package/dist/components/chart.d.mts +93 -0
- package/dist/components/chart.mjs +189 -0
- package/dist/components/checkbox-cards.d.mts +17 -0
- package/dist/components/checkbox-cards.mjs +30 -0
- package/dist/components/checkbox-group.d.mts +16 -0
- package/dist/components/checkbox-group.mjs +27 -0
- package/dist/components/checkbox.d.mts +11 -0
- package/dist/components/checkbox.mjs +20 -0
- package/dist/components/collapsible.d.mts +18 -0
- package/dist/components/collapsible.mjs +24 -0
- package/dist/components/command.d.mts +57 -0
- package/dist/components/command.mjs +92 -0
- package/dist/components/context-menu.d.mts +91 -0
- package/dist/components/context-menu.mjs +122 -0
- package/dist/components/dialog.d.mts +65 -0
- package/dist/components/dialog.mjs +93 -0
- package/dist/components/drawer.d.mts +65 -0
- package/dist/components/drawer.mjs +78 -0
- package/dist/components/dropdown-menu.d.mts +92 -0
- package/dist/components/dropdown-menu.mjs +129 -0
- package/dist/components/empty.d.mts +44 -0
- package/dist/components/empty.mjs +64 -0
- package/dist/components/field.d.mts +79 -0
- package/dist/components/field.mjs +132 -0
- package/dist/components/form.d.mts +48 -0
- package/dist/components/form.mjs +92 -0
- package/dist/components/hover-card.d.mts +26 -0
- package/dist/components/hover-card.mjs +35 -0
- package/dist/components/input-group.d.mts +61 -0
- package/dist/components/input-group.mjs +142 -0
- package/dist/components/input-number.d.mts +28 -0
- package/dist/components/input-number.mjs +61 -0
- package/dist/components/input-otp.d.mts +29 -0
- package/dist/components/input-otp.mjs +48 -0
- package/dist/components/input-password.d.mts +13 -0
- package/dist/components/input-password.mjs +38 -0
- package/dist/components/input-search.d.mts +20 -0
- package/dist/components/input-search.mjs +50 -0
- package/dist/components/input.d.mts +11 -0
- package/dist/components/input.mjs +14 -0
- package/dist/components/item.d.mts +82 -0
- package/dist/components/item.mjs +137 -0
- package/dist/components/kbd.d.mts +15 -0
- package/dist/components/kbd.mjs +19 -0
- package/dist/components/label.d.mts +11 -0
- package/dist/components/label.mjs +14 -0
- package/dist/components/menubar.d.mts +100 -0
- package/dist/components/menubar.mjs +133 -0
- package/dist/components/native-select.d.mts +19 -0
- package/dist/components/native-select.mjs +34 -0
- package/dist/components/navigation-menu.d.mts +44 -0
- package/dist/components/navigation-menu.mjs +79 -0
- package/dist/components/pagination.d.mts +46 -0
- package/dist/components/pagination.mjs +71 -0
- package/dist/components/popover.d.mts +30 -0
- package/dist/components/popover.mjs +41 -0
- package/dist/components/progress-circle.d.mts +124 -0
- package/dist/components/progress-circle.mjs +120 -0
- package/dist/components/progress.d.mts +12 -0
- package/dist/components/progress.mjs +19 -0
- package/dist/components/{radio-cards.d.ts → radio-cards.d.mts} +10 -5
- package/dist/components/radio-cards.mjs +29 -0
- package/dist/components/radio-group.d.mts +16 -0
- package/dist/components/radio-group.mjs +25 -0
- package/dist/components/radio.d.mts +14 -0
- package/dist/components/radio.mjs +16 -0
- package/dist/components/resizable.d.mts +23 -0
- package/dist/components/resizable.mjs +32 -0
- package/dist/components/scroll-area.d.mts +40 -0
- package/dist/components/scroll-area.mjs +101 -0
- package/dist/components/select.d.mts +62 -0
- package/dist/components/select.mjs +101 -0
- package/dist/components/separator.d.mts +32 -0
- package/dist/components/separator.mjs +45 -0
- package/dist/components/sheet.d.mts +75 -0
- package/dist/components/sheet.mjs +134 -0
- package/dist/components/sidebar.d.mts +195 -0
- package/dist/components/sidebar.mjs +375 -0
- package/dist/components/skeleton.d.mts +10 -0
- package/dist/components/skeleton.mjs +12 -0
- package/dist/components/slider.d.mts +15 -0
- package/dist/components/slider.mjs +40 -0
- package/dist/components/sonner.d.mts +10 -0
- package/dist/components/sonner.mjs +21 -0
- package/dist/components/spinner.d.mts +14 -0
- package/dist/components/spinner.mjs +40 -0
- package/dist/components/switch.d.mts +11 -0
- package/dist/components/switch.mjs +18 -0
- package/dist/components/table.d.mts +45 -0
- package/dist/components/table.mjs +65 -0
- package/dist/components/tabs.d.mts +26 -0
- package/dist/components/tabs.mjs +35 -0
- package/dist/components/textarea.d.mts +10 -0
- package/dist/components/textarea.mjs +12 -0
- package/dist/components/toggle-group.d.mts +30 -0
- package/dist/components/toggle-group.mjs +53 -0
- package/dist/components/toggle.d.mts +28 -0
- package/dist/components/toggle.mjs +53 -0
- package/dist/components/tooltip.d.mts +30 -0
- package/dist/components/tooltip.mjs +42 -0
- package/dist/hooks/{use-animated-value.d.ts → use-animated-value.d.mts} +4 -2
- package/dist/hooks/use-animated-value.mjs +62 -0
- package/dist/hooks/{use-copy-to-clipboard.d.ts → use-copy-to-clipboard.d.mts} +11 -6
- package/dist/hooks/use-copy-to-clipboard.mjs +43 -0
- package/dist/hooks/{use-is-mobile.d.ts → use-is-mobile.d.mts} +4 -2
- package/dist/hooks/use-is-mobile.mjs +26 -0
- package/dist/hooks/{use-media-query.d.ts → use-media-query.d.mts} +4 -2
- package/dist/hooks/use-media-query.mjs +50 -0
- package/dist/hooks/{use-mutation-observer.d.ts → use-mutation-observer.d.mts} +6 -3
- package/dist/hooks/use-mutation-observer.mjs +41 -0
- package/dist/hooks/use-pagination.d.mts +44 -0
- package/dist/hooks/use-pagination.mjs +107 -0
- package/dist/index.d.mts +69 -0
- package/dist/index.mjs +69 -0
- package/dist/lib/utils.d.mts +13 -0
- package/dist/lib/utils.mjs +10 -0
- package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/clsx.d.mts +6 -0
- package/dist/primitives/checkbox-group.d.mts +144 -0
- package/dist/primitives/checkbox-group.mjs +126 -0
- package/dist/primitives/input-number.d.mts +73 -0
- package/dist/primitives/input-number.mjs +514 -0
- package/dist/primitives/input.d.mts +72 -0
- package/dist/primitives/input.mjs +75 -0
- package/dist/primitives/progress-circle.d.mts +146 -0
- package/dist/primitives/progress-circle.mjs +178 -0
- package/package.json +164 -170
- package/dist/components/accordion.d.ts +0 -19
- package/dist/components/accordion.d.ts.map +0 -1
- package/dist/components/accordion.js +0 -26
- package/dist/components/alert-dialog.d.ts +0 -39
- package/dist/components/alert-dialog.d.ts.map +0 -1
- package/dist/components/alert-dialog.js +0 -39
- package/dist/components/alert.d.ts +0 -19
- package/dist/components/alert.d.ts.map +0 -1
- package/dist/components/alert.js +0 -41
- package/dist/components/aspect-ratio.d.ts +0 -7
- package/dist/components/aspect-ratio.d.ts.map +0 -1
- package/dist/components/aspect-ratio.js +0 -10
- package/dist/components/avatar.d.ts +0 -11
- package/dist/components/avatar.d.ts.map +0 -1
- package/dist/components/avatar.js +0 -17
- package/dist/components/badge.d.ts +0 -18
- package/dist/components/badge.d.ts.map +0 -1
- package/dist/components/badge.js +0 -59
- package/dist/components/breadcrumb.d.ts +0 -22
- package/dist/components/breadcrumb.d.ts.map +0 -1
- package/dist/components/breadcrumb.js +0 -31
- package/dist/components/button-group.d.ts +0 -20
- package/dist/components/button-group.d.ts.map +0 -1
- package/dist/components/button-group.js +0 -48
- package/dist/components/button.d.ts +0 -29
- package/dist/components/button.d.ts.map +0 -1
- package/dist/components/button.js +0 -92
- package/dist/components/calendar.d.ts +0 -13
- package/dist/components/calendar.d.ts.map +0 -1
- package/dist/components/calendar.js +0 -104
- package/dist/components/card.d.ts +0 -18
- package/dist/components/card.d.ts.map +0 -1
- package/dist/components/card.js +0 -27
- package/dist/components/carousel.d.ts +0 -38
- package/dist/components/carousel.d.ts.map +0 -1
- package/dist/components/carousel.js +0 -103
- package/dist/components/chart.d.ts +0 -58
- package/dist/components/chart.d.ts.map +0 -1
- package/dist/components/chart.js +0 -198
- package/dist/components/checkbox-cards.d.ts +0 -11
- package/dist/components/checkbox-cards.d.ts.map +0 -1
- package/dist/components/checkbox-cards.js +0 -16
- package/dist/components/checkbox-group.d.ts +0 -9
- package/dist/components/checkbox-group.d.ts.map +0 -1
- package/dist/components/checkbox-group.js +0 -15
- package/dist/components/checkbox.d.ts +0 -7
- package/dist/components/checkbox.d.ts.map +0 -1
- package/dist/components/checkbox.js +0 -12
- package/dist/components/collapsible.d.ts +0 -11
- package/dist/components/collapsible.d.ts.map +0 -1
- package/dist/components/collapsible.js +0 -16
- package/dist/components/command.d.ts +0 -26
- package/dist/components/command.d.ts.map +0 -1
- package/dist/components/command.js +0 -41
- package/dist/components/context-menu.d.ts +0 -42
- package/dist/components/context-menu.d.ts.map +0 -1
- package/dist/components/context-menu.js +0 -54
- package/dist/components/dialog.d.ts +0 -35
- package/dist/components/dialog.d.ts.map +0 -1
- package/dist/components/dialog.js +0 -41
- package/dist/components/drawer.d.ts +0 -34
- package/dist/components/drawer.d.ts.map +0 -1
- package/dist/components/drawer.js +0 -36
- package/dist/components/dropdown-menu.d.ts +0 -42
- package/dist/components/dropdown-menu.d.ts.map +0 -1
- package/dist/components/dropdown-menu.js +0 -54
- package/dist/components/empty.d.ts +0 -23
- package/dist/components/empty.d.ts.map +0 -1
- package/dist/components/empty.js +0 -47
- package/dist/components/field.d.ts +0 -42
- package/dist/components/field.d.ts.map +0 -1
- package/dist/components/field.js +0 -85
- package/dist/components/form.d.ts +0 -27
- package/dist/components/form.d.ts.map +0 -1
- package/dist/components/form.js +0 -76
- package/dist/components/hover-card.d.ts +0 -13
- package/dist/components/hover-card.d.ts.map +0 -1
- package/dist/components/hover-card.js +0 -20
- package/dist/components/input-group.d.ts +0 -37
- package/dist/components/input-group.d.ts.map +0 -1
- package/dist/components/input-group.js +0 -127
- package/dist/components/input-number.d.ts +0 -8
- package/dist/components/input-number.d.ts.map +0 -1
- package/dist/components/input-number.js +0 -20
- package/dist/components/input-otp.d.ts +0 -16
- package/dist/components/input-otp.d.ts.map +0 -1
- package/dist/components/input-otp.js +0 -25
- package/dist/components/input-password.d.ts +0 -7
- package/dist/components/input-password.d.ts.map +0 -1
- package/dist/components/input-password.js +0 -17
- package/dist/components/input-search.d.ts +0 -11
- package/dist/components/input-search.d.ts.map +0 -1
- package/dist/components/input-search.js +0 -22
- package/dist/components/input.d.ts +0 -6
- package/dist/components/input.d.ts.map +0 -1
- package/dist/components/input.js +0 -10
- package/dist/components/item.d.ts +0 -46
- package/dist/components/item.d.ts.map +0 -1
- package/dist/components/item.js +0 -94
- package/dist/components/kbd.d.ts +0 -8
- package/dist/components/kbd.d.ts.map +0 -1
- package/dist/components/kbd.js +0 -12
- package/dist/components/label.d.ts +0 -7
- package/dist/components/label.d.ts.map +0 -1
- package/dist/components/label.js +0 -11
- package/dist/components/menubar.d.ts +0 -44
- package/dist/components/menubar.d.ts.map +0 -1
- package/dist/components/menubar.js +0 -57
- package/dist/components/native-select.d.ts +0 -10
- package/dist/components/native-select.d.ts.map +0 -1
- package/dist/components/native-select.js +0 -16
- package/dist/components/navigation-menu.d.ts +0 -21
- package/dist/components/navigation-menu.d.ts.map +0 -1
- package/dist/components/navigation-menu.js +0 -43
- package/dist/components/pagination.d.ts +0 -26
- package/dist/components/pagination.d.ts.map +0 -1
- package/dist/components/pagination.js +0 -29
- package/dist/components/popover.d.ts +0 -15
- package/dist/components/popover.d.ts.map +0 -1
- package/dist/components/popover.js +0 -23
- package/dist/components/progress-circle.d.ts +0 -107
- package/dist/components/progress-circle.d.ts.map +0 -1
- package/dist/components/progress-circle.js +0 -83
- package/dist/components/progress.d.ts +0 -7
- package/dist/components/progress.d.ts.map +0 -1
- package/dist/components/progress.js +0 -13
- package/dist/components/radio-cards.d.ts.map +0 -1
- package/dist/components/radio-cards.js +0 -15
- package/dist/components/radio-group.d.ts +0 -9
- package/dist/components/radio-group.d.ts.map +0 -1
- package/dist/components/radio-group.js +0 -14
- package/dist/components/radio.d.ts +0 -8
- package/dist/components/radio.d.ts.map +0 -1
- package/dist/components/radio.js +0 -11
- package/dist/components/resizable.d.ts +0 -13
- package/dist/components/resizable.d.ts.map +0 -1
- package/dist/components/resizable.js +0 -18
- package/dist/components/scroll-area.d.ts +0 -28
- package/dist/components/scroll-area.d.ts.map +0 -1
- package/dist/components/scroll-area.js +0 -77
- package/dist/components/select.d.ts +0 -29
- package/dist/components/select.d.ts.map +0 -1
- package/dist/components/select.js +0 -49
- package/dist/components/separator.d.ts +0 -23
- package/dist/components/separator.d.ts.map +0 -1
- package/dist/components/separator.js +0 -36
- package/dist/components/sheet.d.ts +0 -43
- package/dist/components/sheet.d.ts.map +0 -1
- package/dist/components/sheet.js +0 -90
- package/dist/components/sidebar.d.ts +0 -102
- package/dist/components/sidebar.d.ts.map +0 -1
- package/dist/components/sidebar.js +0 -241
- package/dist/components/skeleton.d.ts +0 -6
- package/dist/components/skeleton.d.ts.map +0 -1
- package/dist/components/skeleton.js +0 -9
- package/dist/components/slider.d.ts +0 -7
- package/dist/components/slider.d.ts.map +0 -1
- package/dist/components/slider.js +0 -18
- package/dist/components/sonner.d.ts +0 -8
- package/dist/components/sonner.d.ts.map +0 -1
- package/dist/components/sonner.js +0 -18
- package/dist/components/spinner.d.ts +0 -8
- package/dist/components/spinner.d.ts.map +0 -1
- package/dist/components/spinner.js +0 -27
- package/dist/components/switch.d.ts +0 -7
- package/dist/components/switch.d.ts.map +0 -1
- package/dist/components/switch.js +0 -11
- package/dist/components/table.d.ts +0 -20
- package/dist/components/table.d.ts.map +0 -1
- package/dist/components/table.js +0 -30
- package/dist/components/tabs.d.ts +0 -13
- package/dist/components/tabs.d.ts.map +0 -1
- package/dist/components/tabs.js +0 -20
- package/dist/components/textarea.d.ts +0 -6
- package/dist/components/textarea.d.ts.map +0 -1
- package/dist/components/textarea.js +0 -9
- package/dist/components/toggle-group.d.ts +0 -16
- package/dist/components/toggle-group.d.ts.map +0 -1
- package/dist/components/toggle-group.js +0 -35
- package/dist/components/toggle.d.ts +0 -21
- package/dist/components/toggle.d.ts.map +0 -1
- package/dist/components/toggle.js +0 -49
- package/dist/components/tooltip.d.ts +0 -15
- package/dist/components/tooltip.d.ts.map +0 -1
- package/dist/components/tooltip.js +0 -23
- package/dist/hooks/use-animated-value.d.ts.map +0 -1
- package/dist/hooks/use-animated-value.js +0 -71
- package/dist/hooks/use-copy-to-clipboard.d.ts.map +0 -1
- package/dist/hooks/use-copy-to-clipboard.js +0 -46
- package/dist/hooks/use-is-mobile.d.ts.map +0 -1
- package/dist/hooks/use-is-mobile.js +0 -23
- package/dist/hooks/use-media-query.d.ts.map +0 -1
- package/dist/hooks/use-media-query.js +0 -53
- package/dist/hooks/use-mutation-observer.d.ts.map +0 -1
- package/dist/hooks/use-mutation-observer.js +0 -40
- package/dist/hooks/use-pagination.d.ts +0 -37
- package/dist/hooks/use-pagination.d.ts.map +0 -1
- package/dist/hooks/use-pagination.js +0 -107
- package/dist/index.d.ts +0 -131
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -68
- package/dist/lib/utils.d.ts +0 -10
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/lib/utils.js +0 -10
- package/dist/primitives/checkbox-group.d.ts +0 -123
- package/dist/primitives/checkbox-group.d.ts.map +0 -1
- package/dist/primitives/checkbox-group.js +0 -112
- package/dist/primitives/input-number.d.ts +0 -63
- package/dist/primitives/input-number.d.ts.map +0 -1
- package/dist/primitives/input-number.js +0 -458
- package/dist/primitives/input.d.ts +0 -67
- package/dist/primitives/input.d.ts.map +0 -1
- package/dist/primitives/input.js +0 -76
- package/dist/primitives/progress-circle.d.ts +0 -116
- package/dist/primitives/progress-circle.d.ts.map +0 -1
- package/dist/primitives/progress-circle.js +0 -163
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { cn, tv } from "#lib/utils";
|
|
4
|
-
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
5
|
-
/* -----------------------------------------------------------------------------
|
|
6
|
-
* Variant: Separator
|
|
7
|
-
* -------------------------------------------------------------------------- */
|
|
8
|
-
const separatorVariants = tv({
|
|
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
|
-
},
|
|
25
|
-
});
|
|
26
|
-
function Separator({ align, className, decorative = true, orientation, ...props }) {
|
|
27
|
-
return (_jsx(SeparatorPrimitive.Root, { className: separatorVariants({ align, className, orientation }), "data-slot": "separator", decorative: decorative, orientation: orientation, ...props }));
|
|
28
|
-
}
|
|
29
|
-
function SeparatorItem({ className, ...props }) {
|
|
30
|
-
return (_jsx("div", { className: cn("absolute", "mx-2 px-2", "bg-background text-sm text-muted-foreground", className), "data-slot": "separator-item", ...props }));
|
|
31
|
-
}
|
|
32
|
-
/* -----------------------------------------------------------------------------
|
|
33
|
-
* Exports
|
|
34
|
-
* -------------------------------------------------------------------------- */
|
|
35
|
-
export { separatorVariants };
|
|
36
|
-
export { Separator, SeparatorItem };
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import type { VariantProps } from "#lib/utils";
|
|
2
|
-
import type { ComponentProps, JSX } from "react";
|
|
3
|
-
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
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
|
-
};
|
|
12
|
-
}, Record<string, never>>;
|
|
13
|
-
type SheetProps = ComponentProps<typeof SheetPrimitive.Root>;
|
|
14
|
-
declare function Sheet({ children, ...props }: SheetProps): JSX.Element;
|
|
15
|
-
type SheetTriggerProps = ComponentProps<typeof SheetPrimitive.Trigger>;
|
|
16
|
-
declare function SheetTrigger({ ...props }: SheetTriggerProps): JSX.Element;
|
|
17
|
-
interface SheetContentProps extends ComponentProps<typeof SheetPrimitive.Content>, VariantProps<typeof sheetContentVariants> {
|
|
18
|
-
classNames?: {
|
|
19
|
-
close?: string;
|
|
20
|
-
content?: string;
|
|
21
|
-
overlay?: string;
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
declare function SheetContent({ children, className, classNames, side, ...props }: SheetContentProps): JSX.Element;
|
|
25
|
-
type SheetHeaderProps = ComponentProps<"div">;
|
|
26
|
-
declare function SheetHeader({ className, ...props }: SheetHeaderProps): JSX.Element;
|
|
27
|
-
type SheetBodyProps = ComponentProps<"div">;
|
|
28
|
-
declare function SheetBody({ className, ...props }: SheetBodyProps): JSX.Element;
|
|
29
|
-
type SheetFooterProps = ComponentProps<"div">;
|
|
30
|
-
declare function SheetFooter({ className, ...props }: SheetFooterProps): JSX.Element;
|
|
31
|
-
type SheetTitleProps = ComponentProps<typeof SheetPrimitive.Title>;
|
|
32
|
-
declare function SheetTitle({ className, ...props }: SheetTitleProps): JSX.Element;
|
|
33
|
-
type SheetDescriptionProps = ComponentProps<typeof SheetPrimitive.Description>;
|
|
34
|
-
declare function SheetDescription({ className, ...props }: SheetDescriptionProps): JSX.Element;
|
|
35
|
-
interface SheetCloseProps extends ComponentProps<typeof SheetPrimitive.Close> {
|
|
36
|
-
size?: VariantProps<typeof buttonVariants>["size"];
|
|
37
|
-
variant?: VariantProps<typeof buttonVariants>["variant"];
|
|
38
|
-
}
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sheet.d.ts","sourceRoot":"","sources":["../../src/components/sheet.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,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;;QAYpB,MAAM;QAON,IAAI;QAQJ,KAAK;QAQL,GAAG;;yBASP,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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AK,qBAAqB,GAAG,cAAc,CAAC,OAAO,cAAc,CAAC,WAAW,CAAC,CAAC;AAE/E,iBAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,qBAAqB,GAAG,GAAG,CAAC,OAAO,CAQrF;AAMD,UAAU,eAAgB,SAAQ,cAAc,CAAC,OAAO,cAAc,CAAC,KAAK,CAAC;IAC3E,IAAI,CAAC,EAAE,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;IACnD,OAAO,CAAC,EAAE,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC,SAAS,CAAC,CAAC;CAC1D;AAED,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,IAAI,EACJ,OAAmB,EACnB,GAAG,KAAK,EACT,EAAE,eAAe,GAAG,GAAG,CAAC,OAAO,CAQ/B;AAMD,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAChC,OAAO,EACL,KAAK,EACL,SAAS,EACT,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,UAAU,EACV,YAAY,GACb,CAAC;AACF,YAAY,EACV,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,EACV,eAAe,EACf,iBAAiB,GAClB,CAAC"}
|
package/dist/components/sheet.js
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { cn, tv } from "#lib/utils";
|
|
4
|
-
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
5
|
-
import { XIcon } from "lucide-react";
|
|
6
|
-
import { buttonVariants } from "#components/button";
|
|
7
|
-
/* -----------------------------------------------------------------------------
|
|
8
|
-
* Variant: SheetContent
|
|
9
|
-
* -------------------------------------------------------------------------- */
|
|
10
|
-
const sheetContentVariants = tv({
|
|
11
|
-
base: [
|
|
12
|
-
"fixed z-50 flex flex-col overflow-auto",
|
|
13
|
-
"bg-background shadow-lg",
|
|
14
|
-
"ease-ui data-open:animate-in data-open:animation-duration-500",
|
|
15
|
-
"data-closed:animate-out data-closed:animation-duration-500",
|
|
16
|
-
],
|
|
17
|
-
defaultVariants: {
|
|
18
|
-
side: "right",
|
|
19
|
-
},
|
|
20
|
-
variants: {
|
|
21
|
-
side: {
|
|
22
|
-
bottom: [
|
|
23
|
-
"max-h-[80vh]",
|
|
24
|
-
"inset-x-0 bottom-0",
|
|
25
|
-
"border-t",
|
|
26
|
-
"data-open:slide-in-from-bottom",
|
|
27
|
-
"data-closed:slide-out-to-bottom",
|
|
28
|
-
],
|
|
29
|
-
left: [
|
|
30
|
-
"h-full w-3/4",
|
|
31
|
-
"inset-y-0 left-0",
|
|
32
|
-
"border-r",
|
|
33
|
-
"sm:max-w-sm",
|
|
34
|
-
"data-open:slide-in-from-left",
|
|
35
|
-
"data-closed:slide-out-to-left",
|
|
36
|
-
],
|
|
37
|
-
right: [
|
|
38
|
-
"h-full w-3/4",
|
|
39
|
-
"inset-y-0 right-0",
|
|
40
|
-
"border-l",
|
|
41
|
-
"sm:max-w-sm",
|
|
42
|
-
"data-open:slide-in-from-right",
|
|
43
|
-
"data-closed:slide-out-to-right",
|
|
44
|
-
],
|
|
45
|
-
top: [
|
|
46
|
-
"max-h-[80vh]",
|
|
47
|
-
"inset-x-0 top-0",
|
|
48
|
-
"border-b",
|
|
49
|
-
"data-open:slide-in-from-top",
|
|
50
|
-
"data-closed:slide-out-to-top",
|
|
51
|
-
],
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
});
|
|
55
|
-
function Sheet({ children, ...props }) {
|
|
56
|
-
return (_jsx(SheetPrimitive.Root, { "data-slot": "sheet", ...props, children: children }));
|
|
57
|
-
}
|
|
58
|
-
function SheetTrigger({ ...props }) {
|
|
59
|
-
return _jsx(SheetPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
|
|
60
|
-
}
|
|
61
|
-
function SheetContent({ children, className, classNames, side = "right", ...props }) {
|
|
62
|
-
return (_jsxs(SheetPrimitive.Portal, { children: [_jsx(SheetPrimitive.Overlay, { className: cn("fixed inset-0 z-50", "bg-black/50", "ease-ui data-open:animate-in data-open:animation-duration-500 data-open:fade-in-0", "data-closed:animate-out data-closed:animation-duration-500 data-closed:fade-out-0", classNames?.overlay), "data-slot": "sheet-overlay" }), _jsxs(SheetPrimitive.Content, { className: sheetContentVariants({ className: [classNames?.content, className], side }), "data-slot": "sheet-content", ...props, children: [children, _jsxs(SheetPrimitive.Close, { className: buttonVariants({
|
|
63
|
-
className: ["absolute top-4 right-4 size-7", classNames?.close],
|
|
64
|
-
size: "icon",
|
|
65
|
-
variant: "ghost",
|
|
66
|
-
}), "data-slot": "sheet-close", children: [_jsx(XIcon, { className: "size-4" }), _jsx("span", { className: "sr-only", children: "Close" })] })] })] }));
|
|
67
|
-
}
|
|
68
|
-
function SheetHeader({ className, ...props }) {
|
|
69
|
-
return (_jsx("header", { className: cn("flex shrink-0 flex-col gap-1.5 px-6 pt-6 pb-4 text-center", "sm:text-left", className), "data-slot": "sheet-header", ...props }));
|
|
70
|
-
}
|
|
71
|
-
function SheetBody({ className, ...props }) {
|
|
72
|
-
return (_jsx("main", { className: cn("overflow-auto", "px-6 py-2", className), "data-slot": "sheet-body", ...props }));
|
|
73
|
-
}
|
|
74
|
-
function SheetFooter({ className, ...props }) {
|
|
75
|
-
return (_jsx("footer", { className: cn("flex shrink-0 flex-col-reverse gap-2 px-6 pt-4 pb-6", "sm:flex-row sm:justify-end", className), "data-slot": "sheet-footer", ...props }));
|
|
76
|
-
}
|
|
77
|
-
function SheetTitle({ className, ...props }) {
|
|
78
|
-
return (_jsx(SheetPrimitive.Title, { className: cn("text-lg font-semibold text-foreground", className), "data-slot": "sheet-title", ...props }));
|
|
79
|
-
}
|
|
80
|
-
function SheetDescription({ className, ...props }) {
|
|
81
|
-
return (_jsx(SheetPrimitive.Description, { className: cn("text-sm text-muted-foreground", className), "data-slot": "sheet-description", ...props }));
|
|
82
|
-
}
|
|
83
|
-
function SheetClose({ className, size, variant = "outline", ...props }) {
|
|
84
|
-
return (_jsx(SheetPrimitive.Close, { className: buttonVariants({ className, size, variant }), "data-slot": "sheet-close", ...props }));
|
|
85
|
-
}
|
|
86
|
-
/* -----------------------------------------------------------------------------
|
|
87
|
-
* Exports
|
|
88
|
-
* -------------------------------------------------------------------------- */
|
|
89
|
-
export { sheetContentVariants };
|
|
90
|
-
export { Sheet, SheetBody, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, };
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import type { VariantProps } from "#lib/utils";
|
|
2
|
-
import type { ComponentProps, Dispatch, JSX, SetStateAction } from "react";
|
|
3
|
-
import { Button } from "#components/button";
|
|
4
|
-
import { Input } from "#components/input";
|
|
5
|
-
import { Separator } from "#components/separator";
|
|
6
|
-
import { TooltipContent } from "#components/tooltip";
|
|
7
|
-
declare const sidebarMenuButtonVariants: import("@codefast/tailwind-variants").VariantFunctionType<{
|
|
8
|
-
size: {
|
|
9
|
-
sm: string[];
|
|
10
|
-
md: string[];
|
|
11
|
-
lg: string[];
|
|
12
|
-
};
|
|
13
|
-
variant: {
|
|
14
|
-
default: string;
|
|
15
|
-
outline: string[];
|
|
16
|
-
};
|
|
17
|
-
}, Record<string, never>>;
|
|
18
|
-
interface SidebarContextValue {
|
|
19
|
-
isMobile: boolean;
|
|
20
|
-
open: boolean;
|
|
21
|
-
openMobile: boolean;
|
|
22
|
-
setOpen: (open: boolean) => void;
|
|
23
|
-
setOpenMobile: Dispatch<SetStateAction<boolean>>;
|
|
24
|
-
state: "collapsed" | "expanded";
|
|
25
|
-
toggleSidebar: () => void;
|
|
26
|
-
}
|
|
27
|
-
declare const useSidebar: (consumerName: string) => SidebarContextValue;
|
|
28
|
-
interface SidebarProviderProps extends ComponentProps<"div"> {
|
|
29
|
-
defaultOpen?: boolean;
|
|
30
|
-
onOpenChange?: (open: boolean) => void;
|
|
31
|
-
open?: boolean;
|
|
32
|
-
}
|
|
33
|
-
declare function SidebarProvider({ children, className, defaultOpen, onOpenChange: setOpenProperty, open: openProperty, style, ...props }: SidebarProviderProps): JSX.Element;
|
|
34
|
-
interface SidebarProps extends ComponentProps<"div"> {
|
|
35
|
-
collapsible?: "icon" | "none" | "offcanvas";
|
|
36
|
-
side?: "left" | "right";
|
|
37
|
-
variant?: "floating" | "inset" | "sidebar";
|
|
38
|
-
}
|
|
39
|
-
declare function Sidebar({ children, className, collapsible, side, variant, ...props }: SidebarProps): JSX.Element;
|
|
40
|
-
type SidebarTriggerProps = ComponentProps<typeof Button>;
|
|
41
|
-
declare function SidebarTrigger({ className, onClick, ...props }: SidebarTriggerProps): JSX.Element;
|
|
42
|
-
type SidebarRailProps = ComponentProps<"button">;
|
|
43
|
-
declare function SidebarRail({ className, ...props }: SidebarRailProps): JSX.Element;
|
|
44
|
-
type SidebarInsetProps = ComponentProps<"main">;
|
|
45
|
-
declare function SidebarInset({ className, ...props }: SidebarInsetProps): JSX.Element;
|
|
46
|
-
type SidebarInputProps = ComponentProps<typeof Input>;
|
|
47
|
-
declare function SidebarInput({ className, ...props }: SidebarInputProps): JSX.Element;
|
|
48
|
-
type SidebarHeaderProps = ComponentProps<"div">;
|
|
49
|
-
declare function SidebarHeader({ className, ...props }: SidebarHeaderProps): JSX.Element;
|
|
50
|
-
type SidebarFooterProps = ComponentProps<"div">;
|
|
51
|
-
declare function SidebarFooter({ className, ...props }: SidebarFooterProps): JSX.Element;
|
|
52
|
-
type SidebarSeparatorProps = ComponentProps<typeof Separator>;
|
|
53
|
-
declare function SidebarSeparator({ className, ...props }: SidebarSeparatorProps): JSX.Element;
|
|
54
|
-
type SidebarContentProps = ComponentProps<"div">;
|
|
55
|
-
declare function SidebarContent({ className, ...props }: SidebarContentProps): JSX.Element;
|
|
56
|
-
type SidebarGroupProps = ComponentProps<"div">;
|
|
57
|
-
declare function SidebarGroup({ className, ...props }: SidebarGroupProps): JSX.Element;
|
|
58
|
-
interface SidebarGroupLabelProps extends ComponentProps<"div"> {
|
|
59
|
-
asChild?: boolean;
|
|
60
|
-
}
|
|
61
|
-
declare function SidebarGroupLabel({ asChild, className, ...props }: SidebarGroupLabelProps): JSX.Element;
|
|
62
|
-
interface SidebarGroupActionProps extends ComponentProps<"button"> {
|
|
63
|
-
asChild?: boolean;
|
|
64
|
-
}
|
|
65
|
-
declare function SidebarGroupAction({ asChild, className, ...props }: SidebarGroupActionProps): JSX.Element;
|
|
66
|
-
type SidebarGroupContentProps = ComponentProps<"div">;
|
|
67
|
-
declare function SidebarGroupContent({ className, ...props }: SidebarGroupContentProps): JSX.Element;
|
|
68
|
-
type SidebarMenuProps = ComponentProps<"ul">;
|
|
69
|
-
declare function SidebarMenu({ className, ...props }: SidebarMenuProps): JSX.Element;
|
|
70
|
-
type SidebarMenuItemProps = ComponentProps<"li">;
|
|
71
|
-
declare function SidebarMenuItem({ className, ...props }: SidebarMenuItemProps): JSX.Element;
|
|
72
|
-
interface SidebarMenuButtonProps extends ComponentProps<"button">, VariantProps<typeof sidebarMenuButtonVariants> {
|
|
73
|
-
asChild?: boolean;
|
|
74
|
-
isActive?: boolean;
|
|
75
|
-
tooltip?: ComponentProps<typeof TooltipContent> | string;
|
|
76
|
-
}
|
|
77
|
-
declare function SidebarMenuButton({ asChild, className, isActive, size, tooltip, variant, ...props }: SidebarMenuButtonProps): JSX.Element;
|
|
78
|
-
interface SidebarMenuActionProps extends ComponentProps<"button"> {
|
|
79
|
-
asChild?: boolean;
|
|
80
|
-
showOnHover?: boolean;
|
|
81
|
-
}
|
|
82
|
-
declare function SidebarMenuAction({ asChild, className, showOnHover, ...props }: SidebarMenuActionProps): JSX.Element;
|
|
83
|
-
type SidebarMenuBadgeProps = ComponentProps<"div">;
|
|
84
|
-
declare function SidebarMenuBadge({ className, ...props }: SidebarMenuBadgeProps): JSX.Element;
|
|
85
|
-
interface SidebarMenuSkeletonProps extends ComponentProps<"div"> {
|
|
86
|
-
showIcon?: boolean;
|
|
87
|
-
}
|
|
88
|
-
declare function SidebarMenuSkeleton({ className, showIcon, ...props }: SidebarMenuSkeletonProps): JSX.Element;
|
|
89
|
-
type SidebarMenuSubProps = ComponentProps<"ul">;
|
|
90
|
-
declare function SidebarMenuSub({ className, ...props }: SidebarMenuSubProps): JSX.Element;
|
|
91
|
-
type SidebarMenuSubItemProps = ComponentProps<"li">;
|
|
92
|
-
declare function SidebarMenuSubItem({ className, ...props }: SidebarMenuSubItemProps): JSX.Element;
|
|
93
|
-
interface SidebarMenuSubButtonProps extends ComponentProps<"a"> {
|
|
94
|
-
asChild?: boolean;
|
|
95
|
-
isActive?: boolean;
|
|
96
|
-
size?: "md" | "sm";
|
|
97
|
-
}
|
|
98
|
-
declare function SidebarMenuSubButton({ asChild, className, isActive, size, ...props }: SidebarMenuSubButtonProps): JSX.Element;
|
|
99
|
-
export { sidebarMenuButtonVariants };
|
|
100
|
-
export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar, };
|
|
101
|
-
export type { SidebarContentProps, SidebarFooterProps, SidebarGroupActionProps, SidebarGroupContentProps, SidebarGroupLabelProps, SidebarGroupProps, SidebarHeaderProps, SidebarInputProps, SidebarInsetProps, SidebarMenuActionProps, SidebarMenuBadgeProps, SidebarMenuButtonProps, SidebarMenuItemProps, SidebarMenuProps, SidebarMenuSkeletonProps, SidebarMenuSubButtonProps, SidebarMenuSubItemProps, SidebarMenuSubProps, SidebarProps, SidebarProviderProps, SidebarRailProps, SidebarSeparatorProps, SidebarTriggerProps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d,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,UAAU,GACX,CAAC;AACF,YAAY,EACV,mBAAmB,EACnB,kBAAkB,EAClB,uBAAuB,EACvB,wBAAwB,EACxB,sBAAsB,EACtB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,EACpB,gBAAgB,EAChB,wBAAwB,EACxB,yBAAyB,EACzB,uBAAuB,EACvB,mBAAmB,EACnB,YAAY,EACZ,oBAAoB,EACpB,gBAAgB,EAChB,qBAAqB,EACrB,mBAAmB,GACpB,CAAC"}
|
|
@@ -1,241 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { cn, tv } from "#lib/utils";
|
|
4
|
-
import { createContext } from "@radix-ui/react-context";
|
|
5
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
6
|
-
import { PanelLeftIcon } from "lucide-react";
|
|
7
|
-
import { useCallback, useEffect, useState } from "react";
|
|
8
|
-
import { Button } from "#components/button";
|
|
9
|
-
import { Input } from "#components/input";
|
|
10
|
-
import { Separator } from "#components/separator";
|
|
11
|
-
import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle } from "#components/sheet";
|
|
12
|
-
import { Skeleton } from "#components/skeleton";
|
|
13
|
-
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "#components/tooltip";
|
|
14
|
-
import { useIsMobile } from "#hooks/use-is-mobile";
|
|
15
|
-
/* -----------------------------------------------------------------------------
|
|
16
|
-
* Variant: SidebarMenuButton
|
|
17
|
-
* -------------------------------------------------------------------------- */
|
|
18
|
-
const sidebarMenuButtonVariants = tv({
|
|
19
|
-
base: [
|
|
20
|
-
"peer/menu-button flex w-full items-center gap-2 overflow-hidden p-2",
|
|
21
|
-
"rounded-md ring-sidebar-ring outline-hidden",
|
|
22
|
-
"text-left text-sm",
|
|
23
|
-
"transition-[width,height,padding]",
|
|
24
|
-
"group-has-data-[sidebar=menu-action]/menu-item:pr-8",
|
|
25
|
-
"group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2!",
|
|
26
|
-
"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
27
|
-
"focus-visible:ring-3",
|
|
28
|
-
"active:bg-sidebar-accent active:text-sidebar-accent-foreground",
|
|
29
|
-
"disabled:pointer-events-none disabled:opacity-50",
|
|
30
|
-
"aria-disabled:pointer-events-none aria-disabled:opacity-50",
|
|
31
|
-
"data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground",
|
|
32
|
-
"data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground",
|
|
33
|
-
"[&>span:last-child]:truncate",
|
|
34
|
-
"[&>svg]:size-4 [&>svg]:shrink-0",
|
|
35
|
-
],
|
|
36
|
-
defaultVariants: {
|
|
37
|
-
size: "md",
|
|
38
|
-
variant: "default",
|
|
39
|
-
},
|
|
40
|
-
variants: {
|
|
41
|
-
size: {
|
|
42
|
-
sm: ["h-7", "text-xs"],
|
|
43
|
-
md: ["h-8", "text-sm"],
|
|
44
|
-
lg: ["h-12 text-sm", "group-data-[collapsible=icon]:p-0!"],
|
|
45
|
-
},
|
|
46
|
-
variant: {
|
|
47
|
-
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
48
|
-
outline: [
|
|
49
|
-
"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))]",
|
|
50
|
-
"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]",
|
|
51
|
-
],
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
});
|
|
55
|
-
const SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
56
|
-
const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
57
|
-
const SIDEBAR_WIDTH = "16rem";
|
|
58
|
-
const SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
59
|
-
const SIDEBAR_WIDTH_ICON = "3.0625rem";
|
|
60
|
-
const SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
61
|
-
/* -----------------------------------------------------------------------------
|
|
62
|
-
* Context: SidebarProvider
|
|
63
|
-
* -------------------------------------------------------------------------- */
|
|
64
|
-
const SIDEBAR_PROVIDER_NAME = "SidebarProvider";
|
|
65
|
-
const [SidebarContextProvider, useSidebar] = createContext(SIDEBAR_PROVIDER_NAME);
|
|
66
|
-
function SidebarProvider({ children, className, defaultOpen = true, onOpenChange: setOpenProperty, open: openProperty, style, ...props }) {
|
|
67
|
-
const isMobile = useIsMobile();
|
|
68
|
-
const [openMobile, setOpenMobile] = useState(false);
|
|
69
|
-
// This is the internal state of the sidebar.
|
|
70
|
-
// We use openProp and setOpenProp for control from outside the component.
|
|
71
|
-
const [isOpen, setIsOpen] = useState(defaultOpen);
|
|
72
|
-
const open = openProperty ?? isOpen;
|
|
73
|
-
const setOpen = useCallback((value) => {
|
|
74
|
-
const openState = typeof value === "function" ? value(open) : value;
|
|
75
|
-
if (setOpenProperty) {
|
|
76
|
-
setOpenProperty(openState);
|
|
77
|
-
}
|
|
78
|
-
else {
|
|
79
|
-
setIsOpen(openState);
|
|
80
|
-
}
|
|
81
|
-
//
|
|
82
|
-
document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState.toString()}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE.toString()}`;
|
|
83
|
-
}, [setOpenProperty, open]);
|
|
84
|
-
// Helper to toggle the sidebar.
|
|
85
|
-
const toggleSidebar = useCallback(() => {
|
|
86
|
-
if (isMobile) {
|
|
87
|
-
setOpenMobile((currentValue) => !currentValue);
|
|
88
|
-
}
|
|
89
|
-
else {
|
|
90
|
-
setOpen((currentValue) => !currentValue);
|
|
91
|
-
}
|
|
92
|
-
}, [isMobile, setOpen]);
|
|
93
|
-
// Adds a keyboard shortcut to toggle the sidebar.
|
|
94
|
-
useEffect(() => {
|
|
95
|
-
const handleKeyDown = (event) => {
|
|
96
|
-
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
97
|
-
event.preventDefault();
|
|
98
|
-
toggleSidebar();
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
window.addEventListener("keydown", handleKeyDown);
|
|
102
|
-
return () => {
|
|
103
|
-
window.removeEventListener("keydown", handleKeyDown);
|
|
104
|
-
};
|
|
105
|
-
}, [toggleSidebar]);
|
|
106
|
-
// We add a state so that we can do data-state="expanded" or "collapsed".
|
|
107
|
-
// This makes it easier to style the sidebar with Tailwind classes.
|
|
108
|
-
const state = open ? "expanded" : "collapsed";
|
|
109
|
-
return (_jsx(SidebarContextProvider, { isMobile: isMobile, open: open, openMobile: openMobile, setOpen: setOpen, setOpenMobile: setOpenMobile, state: state, toggleSidebar: toggleSidebar, children: _jsx(TooltipProvider, { delayDuration: 0, children: _jsx("div", { className: cn("group/sidebar-wrapper flex min-h-svh w-full", "has-data-[variant=inset]:bg-sidebar", className), "data-slot": "sidebar-wrapper", style: {
|
|
110
|
-
"--sidebar-width": SIDEBAR_WIDTH,
|
|
111
|
-
"--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
|
|
112
|
-
...style,
|
|
113
|
-
}, ...props, children: children }) }) }));
|
|
114
|
-
}
|
|
115
|
-
/* -----------------------------------------------------------------------------
|
|
116
|
-
* Component: Sidebar
|
|
117
|
-
* -------------------------------------------------------------------------- */
|
|
118
|
-
const SIDEBAR_NAME = "Sidebar";
|
|
119
|
-
function Sidebar({ children, className, collapsible = "offcanvas", side = "left", variant = "sidebar", ...props }) {
|
|
120
|
-
const { isMobile, openMobile, setOpenMobile, state } = useSidebar(SIDEBAR_NAME);
|
|
121
|
-
if (collapsible === "none") {
|
|
122
|
-
return (_jsx("div", { className: cn("flex h-full w-(--sidebar-width) flex-col", "bg-sidebar text-sidebar-foreground", className), "data-slot": "sidebar", ...props, children: children }));
|
|
123
|
-
}
|
|
124
|
-
if (isMobile) {
|
|
125
|
-
return (_jsx(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: _jsxs(SheetContent, { className: cn("w-(--sidebar-width) p-0", "bg-sidebar text-sidebar-foreground", "[&>button]:hidden"), "data-mobile": "true", "data-sidebar": "sidebar", "data-slot": "sidebar", side: side, style: {
|
|
126
|
-
"--sidebar-width": SIDEBAR_WIDTH_MOBILE,
|
|
127
|
-
}, children: [_jsxs(SheetHeader, { className: "sr-only", children: [_jsx(SheetTitle, { children: "Sidebar" }), _jsx(SheetDescription, { children: "Displays the mobile sidebar." })] }), _jsx("div", { className: "flex h-full w-full flex-col", children: children })] }) }));
|
|
128
|
-
}
|
|
129
|
-
return (_jsxs("div", { className: cn("group peer hidden", "text-sidebar-foreground", "md:block", className), "data-collapsible": state === "collapsed" ? collapsible : "", "data-side": side, "data-slot": "sidebar", "data-state": state, "data-variant": variant, children: [_jsx("div", { className: cn("relative", "w-(--sidebar-width)", "bg-transparent", "transition-[width] duration-200 ease-linear", "group-data-[collapsible=offcanvas]:w-0", "group-data-side-right:rotate-180", variant === "floating" || variant === "inset"
|
|
130
|
-
? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]"
|
|
131
|
-
: "group-data-[collapsible=icon]:w-(--sidebar-width-icon)"), "data-slot": "sidebar-gap" }), _jsx("div", { className: cn("fixed inset-y-0 z-10 hidden", "h-svh w-(--sidebar-width)", "transition-[left,right,width] duration-200 ease-linear", "md:flex", side === "left"
|
|
132
|
-
? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]"
|
|
133
|
-
: "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]", variant === "floating" || variant === "inset"
|
|
134
|
-
? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]"
|
|
135
|
-
: "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-side-right:border-l group-data-side-left:border-r", className), "data-slot": "sidebar-container", ...props, children: _jsx("div", { className: cn("flex h-full w-full flex-col", "bg-sidebar", "group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow-sm"), "data-sidebar": "sidebar", "data-slot": "sidebar-inner", children: children }) })] }));
|
|
136
|
-
}
|
|
137
|
-
/* -----------------------------------------------------------------------------
|
|
138
|
-
* Component: SidebarTrigger
|
|
139
|
-
* -------------------------------------------------------------------------- */
|
|
140
|
-
const SIDEBAR_TRIGGER_NAME = "SidebarTrigger";
|
|
141
|
-
function SidebarTrigger({ className, onClick, ...props }) {
|
|
142
|
-
const { toggleSidebar } = useSidebar(SIDEBAR_TRIGGER_NAME);
|
|
143
|
-
return (_jsxs(Button, { className: cn("size-7", className), "data-sidebar": "trigger", "data-slot": "sidebar-trigger", size: "icon", variant: "ghost", onClick: (event) => {
|
|
144
|
-
onClick?.(event);
|
|
145
|
-
toggleSidebar();
|
|
146
|
-
}, ...props, children: [_jsx(PanelLeftIcon, {}), _jsx("span", { className: "sr-only", children: "Toggle Sidebar" })] }));
|
|
147
|
-
}
|
|
148
|
-
/* -----------------------------------------------------------------------------
|
|
149
|
-
* Component: SidebarRail
|
|
150
|
-
* -------------------------------------------------------------------------- */
|
|
151
|
-
const SIDEBAR_RAIL_NAME = "SidebarRail";
|
|
152
|
-
function SidebarRail({ className, ...props }) {
|
|
153
|
-
const { toggleSidebar } = useSidebar(SIDEBAR_RAIL_NAME);
|
|
154
|
-
return (_jsx("button", { className: cn("absolute inset-y-0 z-20 hidden", "w-4 -translate-x-1/2 transition-all ease-linear", "in-data-side-right:cursor-e-resize", "in-data-side-left:cursor-w-resize", "group-data-[collapsible=offcanvas]:translate-x-0", "group-data-side-right:left-0", "group-data-side-left:-right-4", "after:absolute after:inset-y-0 after:left-1/2 after:w-0.5", "group-data-[collapsible=offcanvas]:after:left-full", "hover:group-data-[collapsible=offcanvas]:bg-sidebar", "hover:after:bg-sidebar-border", "sm:flex", "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2", "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize", "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2", "[[data-side=right][data-state=collapsed]_&]:cursor-w-resize", className), "data-sidebar": "rail", "data-slot": "sidebar-rail", title: "Toggle Sidebar", type: "button", onClick: toggleSidebar, ...props }));
|
|
155
|
-
}
|
|
156
|
-
function SidebarInset({ className, ...props }) {
|
|
157
|
-
return (_jsx("main", { className: cn("relative flex w-full min-w-0 flex-1 flex-col", "bg-background", "md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm", "md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2", className), "data-slot": "sidebar-inset", ...props }));
|
|
158
|
-
}
|
|
159
|
-
function SidebarInput({ className, ...props }) {
|
|
160
|
-
return (_jsx(Input, { className: cn("h-8 w-full", "bg-background shadow-none", className), "data-sidebar": "input", "data-slot": "sidebar-input", ...props }));
|
|
161
|
-
}
|
|
162
|
-
function SidebarHeader({ className, ...props }) {
|
|
163
|
-
return (_jsx("div", { className: cn("flex flex-col gap-2", "p-2", className), "data-sidebar": "header", "data-slot": "sidebar-header", ...props }));
|
|
164
|
-
}
|
|
165
|
-
function SidebarFooter({ className, ...props }) {
|
|
166
|
-
return (_jsx("div", { className: cn("flex flex-col gap-2", "p-2", className), "data-sidebar": "footer", "data-slot": "sidebar-footer", ...props }));
|
|
167
|
-
}
|
|
168
|
-
function SidebarSeparator({ className, ...props }) {
|
|
169
|
-
return (_jsx(Separator, { className: cn("mx-2 w-auto", "bg-sidebar-border", className), "data-sidebar": "separator", "data-slot": "sidebar-separator", ...props }));
|
|
170
|
-
}
|
|
171
|
-
function SidebarContent({ className, ...props }) {
|
|
172
|
-
return (_jsx("div", { className: cn("flex min-h-0 flex-1 flex-col gap-2 overflow-auto", "group-data-[collapsible=icon]:overflow-hidden", className), "data-sidebar": "content", "data-slot": "sidebar-content", ...props }));
|
|
173
|
-
}
|
|
174
|
-
function SidebarGroup({ className, ...props }) {
|
|
175
|
-
return (_jsx("div", { className: cn("relative flex w-full min-w-0 flex-col", "p-2", className), "data-sidebar": "group", "data-slot": "sidebar-group", ...props }));
|
|
176
|
-
}
|
|
177
|
-
function SidebarGroupLabel({ asChild = false, className, ...props }) {
|
|
178
|
-
const Component = asChild ? Slot : "div";
|
|
179
|
-
return (_jsx(Component, { className: cn("flex h-8 shrink-0 items-center px-2", "rounded-md ring-sidebar-ring outline-hidden", "truncate text-xs font-medium text-sidebar-foreground/70", "transition-[margin,opacity] duration-200 ease-linear", "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0", "focus-visible:ring-3", "[&>svg]:size-4 [&>svg]:shrink-0", className), "data-sidebar": "group-label", "data-slot": "sidebar-group-label", ...props }));
|
|
180
|
-
}
|
|
181
|
-
function SidebarGroupAction({ asChild = false, className, ...props }) {
|
|
182
|
-
const Component = asChild ? Slot : "button";
|
|
183
|
-
return (_jsx(Component, { className: cn("absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center p-0", "rounded-md ring-sidebar-ring outline-hidden", "text-sidebar-foreground", "transition-transform", "group-data-[collapsible=icon]:hidden", "after:absolute after:-inset-2", "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground", "focus-visible:ring-3", "md:after:hidden", "[&>svg]:size-4 [&>svg]:shrink-0", className), "data-sidebar": "group-action", "data-slot": "sidebar-group-action", ...props }));
|
|
184
|
-
}
|
|
185
|
-
function SidebarGroupContent({ className, ...props }) {
|
|
186
|
-
return (_jsx("div", { className: cn("w-full", "text-sm", className), "data-sidebar": "group-content", "data-slot": "sidebar-group-content", ...props }));
|
|
187
|
-
}
|
|
188
|
-
function SidebarMenu({ className, ...props }) {
|
|
189
|
-
return (_jsx("ul", { className: cn("flex w-full min-w-0 flex-col gap-1", className), "data-sidebar": "menu", "data-slot": "sidebar-menu", ...props }));
|
|
190
|
-
}
|
|
191
|
-
function SidebarMenuItem({ className, ...props }) {
|
|
192
|
-
return (_jsx("li", { className: cn("group/menu-item relative", className), "data-sidebar": "menu-item", "data-slot": "sidebar-menu-item", ...props }));
|
|
193
|
-
}
|
|
194
|
-
/* -----------------------------------------------------------------------------
|
|
195
|
-
* Component: SidebarMenuButton
|
|
196
|
-
* -------------------------------------------------------------------------- */
|
|
197
|
-
const SIDEBAR_MENU_BUTTON_NAME = "SidebarMenuButton";
|
|
198
|
-
function SidebarMenuButton({ asChild = false, className, isActive = false, size = "md", tooltip, variant = "default", ...props }) {
|
|
199
|
-
const Component = asChild ? Slot : "button";
|
|
200
|
-
const { isMobile, state } = useSidebar(SIDEBAR_MENU_BUTTON_NAME);
|
|
201
|
-
const button = (_jsx(Component, { className: cn(sidebarMenuButtonVariants({ size, variant }), className), "data-active": isActive, "data-sidebar": "menu-button", "data-size": size, "data-slot": "sidebar-menu-button", ...props }));
|
|
202
|
-
if (!tooltip) {
|
|
203
|
-
return button;
|
|
204
|
-
}
|
|
205
|
-
if (typeof tooltip === "string") {
|
|
206
|
-
tooltip = {
|
|
207
|
-
children: tooltip,
|
|
208
|
-
};
|
|
209
|
-
}
|
|
210
|
-
return (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: button }), _jsx(TooltipContent, { align: "center", hidden: state !== "collapsed" || isMobile, side: "right", ...tooltip })] }));
|
|
211
|
-
}
|
|
212
|
-
function SidebarMenuAction({ asChild = false, className, showOnHover = false, ...props }) {
|
|
213
|
-
const Component = asChild ? Slot : "button";
|
|
214
|
-
return (_jsx(Component, { className: cn("absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center p-0", "rounded-md ring-sidebar-ring outline-hidden", "text-sidebar-foreground", "transition-transform", "group-data-[collapsible=icon]:hidden", "peer-hover/menu-button:text-sidebar-accent-foreground", "peer-data-[size=default]/menu-button:top-1.5", "peer-data-[size=lg]/menu-button:top-2.5", "peer-data-[size=sm]/menu-button:top-1", "after:absolute after:-inset-2", "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground", "focus-visible:ring-3", "md:after:hidden", "[&>svg]:size-4 [&>svg]:shrink-0", showOnHover &&
|
|
215
|
-
"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground md:opacity-0 data-open:opacity-100", className), "data-sidebar": "menu-action", "data-slot": "sidebar-menu-action", ...props }));
|
|
216
|
-
}
|
|
217
|
-
function SidebarMenuBadge({ className, ...props }) {
|
|
218
|
-
return (_jsx("div", { className: cn("absolute right-1 flex h-5 min-w-5 items-center justify-center px-1", "rounded-md", "text-xs font-medium text-sidebar-foreground tabular-nums", "pointer-events-none select-none", "group-data-[collapsible=icon]:hidden", "peer-hover/menu-button:text-sidebar-accent-foreground", "peer-data-[size=default]/menu-button:top-1.5", "peer-data-[size=lg]/menu-button:top-2.5", "peer-data-[size=sm]/menu-button:top-1", "peer-data-active/menu-button:text-sidebar-accent-foreground", className), "data-sidebar": "menu-badge", "data-slot": "sidebar-menu-badge", ...props }));
|
|
219
|
-
}
|
|
220
|
-
function SidebarMenuSkeleton({ className, showIcon = false, ...props }) {
|
|
221
|
-
// Random width between 50 to 90% - use useState with lazy initializer to avoid calling Math.random during render
|
|
222
|
-
const [width] = useState(() => `${String(Math.floor(Math.random() * 40) + 50)}%`);
|
|
223
|
-
return (_jsxs("div", { className: cn("flex h-8 items-center gap-2 px-2", "rounded-md", className), "data-sidebar": "menu-skeleton", "data-slot": "sidebar-menu-skeleton", ...props, children: [showIcon ? (_jsx(Skeleton, { className: cn("size-4", "rounded-md"), "data-sidebar": "menu-skeleton-icon" })) : null, _jsx(Skeleton, { className: "h-4 max-w-(--skeleton-width) flex-1", "data-sidebar": "menu-skeleton-text", style: {
|
|
224
|
-
"--skeleton-width": width,
|
|
225
|
-
} })] }));
|
|
226
|
-
}
|
|
227
|
-
function SidebarMenuSub({ className, ...props }) {
|
|
228
|
-
return (_jsx("ul", { className: cn("mx-3.5 flex min-w-0 flex-col gap-1 px-2.5 py-0.5", "border-l border-sidebar-border", "translate-x-px", "group-data-[collapsible=icon]:hidden", className), "data-sidebar": "menu-sub", "data-slot": "sidebar-menu-sub", ...props }));
|
|
229
|
-
}
|
|
230
|
-
function SidebarMenuSubItem({ className, ...props }) {
|
|
231
|
-
return (_jsx("li", { className: cn("group/menu-sub-item relative", className), "data-sidebar": "menu-sub-item", "data-slot": "sidebar-menu-sub-item", ...props }));
|
|
232
|
-
}
|
|
233
|
-
function SidebarMenuSubButton({ asChild = false, className, isActive = false, size = "md", ...props }) {
|
|
234
|
-
const Component = asChild ? Slot : "a";
|
|
235
|
-
return (_jsx(Component, { className: cn("flex h-7 min-w-0 items-center gap-2 overflow-hidden px-2", "rounded-md ring-sidebar-ring outline-hidden", "text-sidebar-foreground", "-translate-x-px", "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground", "focus-visible:ring-3", "active:bg-sidebar-accent active:text-sidebar-accent-foreground", "disabled:pointer-events-none disabled:opacity-50", "aria-disabled:pointer-events-none aria-disabled:opacity-50", "data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground", "group-data-[collapsible=icon]:hidden", "[&>span:last-child]:truncate", "[&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground", size === "sm" && "text-xs", size === "md" && "text-sm", className), "data-active": isActive, "data-sidebar": "menu-sub-button", "data-size": size, "data-slot": "sidebar-menu-sub-button", ...props }));
|
|
236
|
-
}
|
|
237
|
-
/* -----------------------------------------------------------------------------
|
|
238
|
-
* Exports
|
|
239
|
-
* -------------------------------------------------------------------------- */
|
|
240
|
-
export { sidebarMenuButtonVariants };
|
|
241
|
-
export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar, };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { ComponentProps, JSX } from "react";
|
|
2
|
-
type SkeletonProps = ComponentProps<"div">;
|
|
3
|
-
declare function Skeleton({ className, ...props }: SkeletonProps): JSX.Element;
|
|
4
|
-
export { Skeleton };
|
|
5
|
-
export type { SkeletonProps };
|
|
6
|
-
//# sourceMappingURL=skeleton.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skeleton.d.ts","sourceRoot":"","sources":["../../src/components/skeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAQjD,KAAK,aAAa,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAE3C,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,GAAG,GAAG,CAAC,OAAO,CAQrE;AAMD,OAAO,EAAE,QAAQ,EAAE,CAAC;AACpB,YAAY,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from "#lib/utils";
|
|
3
|
-
function Skeleton({ className, ...props }) {
|
|
4
|
-
return (_jsx("div", { className: cn("rounded-lg", "bg-muted", "animate-pulse", className), "data-slot": "skeleton", ...props }));
|
|
5
|
-
}
|
|
6
|
-
/* -----------------------------------------------------------------------------
|
|
7
|
-
* Exports
|
|
8
|
-
* -------------------------------------------------------------------------- */
|
|
9
|
-
export { Skeleton };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ComponentProps, JSX } from "react";
|
|
2
|
-
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
3
|
-
type SliderProps = ComponentProps<typeof SliderPrimitive.Root>;
|
|
4
|
-
declare function Slider({ className, defaultValue, max, min, value, ...props }: SliderProps): JSX.Element;
|
|
5
|
-
export { Slider };
|
|
6
|
-
export type { SliderProps };
|
|
7
|
-
//# sourceMappingURL=slider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"slider.d.ts","sourceRoot":"","sources":["../../src/components/slider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAGjD,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAO1D,KAAK,WAAW,GAAG,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC;AAE/D,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,YAAY,EACZ,GAAS,EACT,GAAO,EACP,KAAK,EACL,GAAG,KAAK,EACT,EAAE,WAAW,GAAG,GAAG,CAAC,OAAO,CA2D3B;AAMD,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB,YAAY,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { cn } from "#lib/utils";
|
|
4
|
-
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
5
|
-
import { useMemo } from "react";
|
|
6
|
-
function Slider({ className, defaultValue, max = 100, min = 0, value, ...props }) {
|
|
7
|
-
const _values = useMemo(() => {
|
|
8
|
-
if (Array.isArray(value)) {
|
|
9
|
-
return value;
|
|
10
|
-
}
|
|
11
|
-
return Array.isArray(defaultValue) ? defaultValue : [min, max];
|
|
12
|
-
}, [value, defaultValue, min, max]);
|
|
13
|
-
return (_jsxs(SliderPrimitive.Root, { className: cn("relative flex w-full items-center", "touch-none select-none", "data-vertical:h-full data-vertical:min-h-44 data-vertical:w-auto data-vertical:flex-col", "data-disabled:opacity-50", className), "data-slot": "slider", defaultValue: defaultValue, max: max, min: min, value: value, ...props, children: [_jsx(SliderPrimitive.Track, { className: cn("relative", "w-full grow overflow-hidden", "rounded-full", "bg-input", "data-horizontal:h-1 data-horizontal:w-full", "data-vertical:h-full data-vertical:w-1"), "data-slot": "slider-track", children: _jsx(SliderPrimitive.Range, { className: cn("absolute", "bg-primary", "data-horizontal:h-full", "data-vertical:w-full"), "data-slot": "slider-range" }) }), Array.from({ length: _values.length }, (_, index) => (_jsx(SliderPrimitive.Thumb, { "aria-label": "Volume", className: cn("flex size-4 items-center justify-center", "rounded-full border-2 border-primary", "bg-primary shadow-sm outline-hidden", "after:size-full after:rounded-full after:bg-background after:transition-[width,height]", "focus-visible:ring-4 focus-visible:ring-primary/20", "active:not-data-disabled:after:size-1", "dark:focus-visible:ring-primary/40"), "data-slot": "slider-thumb" }, index)))] }));
|
|
14
|
-
}
|
|
15
|
-
/* -----------------------------------------------------------------------------
|
|
16
|
-
* Exports
|
|
17
|
-
* -------------------------------------------------------------------------- */
|
|
18
|
-
export { Slider };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { JSX } from "react";
|
|
2
|
-
import type { ToasterProps as SonnerToasterProps } from "sonner";
|
|
3
|
-
type ToasterProps = SonnerToasterProps;
|
|
4
|
-
declare function Toaster({ ...props }: ToasterProps): JSX.Element;
|
|
5
|
-
export { toast, useSonner } from "sonner";
|
|
6
|
-
export { Toaster };
|
|
7
|
-
export type { ToasterProps };
|
|
8
|
-
//# sourceMappingURL=sonner.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sonner.d.ts","sourceRoot":"","sources":["../../src/components/sonner.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAiB,GAAG,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,KAAK,EAAE,YAAY,IAAI,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AASjE,KAAK,YAAY,GAAG,kBAAkB,CAAC;AAEvC,iBAAS,OAAO,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO,CAiBxD;AAMD,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,CAAC;AACnB,YAAY,EAAE,YAAY,EAAE,CAAC"}
|