@codefast/ui 0.3.11 → 0.3.12-canary.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +66 -0
- package/README.md +4 -0
- package/dist/components/accordion.d.ts +11 -29
- package/dist/components/accordion.d.ts.map +1 -0
- package/dist/components/accordion.js +11 -38
- package/dist/components/alert-dialog.d.ts +25 -60
- package/dist/components/alert-dialog.d.ts.map +1 -0
- package/dist/components/alert-dialog.js +17 -70
- package/dist/components/alert.d.ts +16 -27
- package/dist/components/alert.d.ts.map +1 -0
- package/dist/components/alert.js +33 -31
- package/dist/components/aspect-ratio.d.ts +5 -8
- package/dist/components/aspect-ratio.d.ts.map +1 -0
- package/dist/components/aspect-ratio.js +5 -7
- package/dist/components/avatar.d.ts +7 -17
- package/dist/components/avatar.d.ts.map +1 -0
- package/dist/components/avatar.js +8 -19
- package/dist/components/badge.d.ts +15 -21
- package/dist/components/badge.d.ts.map +1 -0
- package/dist/components/badge.js +53 -21
- package/dist/components/breadcrumb.d.ts +13 -35
- package/dist/components/breadcrumb.d.ts.map +1 -0
- package/dist/components/breadcrumb.js +14 -50
- package/dist/components/button-group.d.ts +15 -29
- package/dist/components/button-group.d.ts.map +1 -0
- package/dist/components/button-group.js +37 -28
- package/dist/components/button.d.ts +26 -35
- package/dist/components/button.d.ts.map +1 -0
- package/dist/components/button.js +87 -52
- package/dist/components/calendar.d.ts +10 -24
- package/dist/components/calendar.d.ts.map +1 -0
- package/dist/components/calendar.js +88 -93
- package/dist/components/card.d.ts +11 -34
- package/dist/components/card.d.ts.map +1 -0
- package/dist/components/card.js +12 -40
- package/dist/components/carousel.d.ts +25 -55
- package/dist/components/carousel.d.ts.map +1 -0
- package/dist/components/carousel.js +83 -115
- package/dist/components/chart.d.ts +37 -72
- package/dist/components/chart.d.ts.map +1 -0
- package/dist/components/chart.js +162 -151
- package/dist/components/checkbox-cards.d.ts +9 -15
- package/dist/components/checkbox-cards.d.ts.map +1 -0
- package/dist/components/checkbox-cards.js +9 -23
- package/dist/components/checkbox-group.d.ts +9 -16
- package/dist/components/checkbox-group.d.ts.map +1 -0
- package/dist/components/checkbox-group.js +8 -20
- package/dist/components/checkbox.d.ts +5 -9
- package/dist/components/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox.js +7 -15
- package/dist/components/collapsible.d.ts +7 -14
- package/dist/components/collapsible.d.ts.map +1 -0
- package/dist/components/collapsible.js +7 -15
- package/dist/components/command.d.ts +24 -55
- package/dist/components/command.d.ts.map +1 -0
- package/dist/components/command.js +19 -70
- package/dist/components/context-menu.d.ts +23 -72
- package/dist/components/context-menu.d.ts.map +1 -0
- package/dist/components/context-menu.js +22 -90
- package/dist/components/dialog.d.ts +23 -53
- package/dist/components/dialog.d.ts.map +1 -0
- package/dist/components/dialog.js +21 -73
- package/dist/components/drawer.d.ts +29 -60
- package/dist/components/drawer.d.ts.map +1 -0
- package/dist/components/drawer.js +17 -59
- package/dist/components/dropdown-menu.d.ts +23 -73
- package/dist/components/dropdown-menu.d.ts.map +1 -0
- package/dist/components/dropdown-menu.js +22 -97
- package/dist/components/empty.d.ts +16 -37
- package/dist/components/empty.d.ts.map +1 -0
- package/dist/components/empty.js +33 -45
- package/dist/components/field.d.ts +26 -63
- package/dist/components/field.d.ts.map +1 -0
- package/dist/components/field.js +61 -90
- package/dist/components/form.d.ts +16 -37
- package/dist/components/form.d.ts.map +1 -0
- package/dist/components/form.js +51 -67
- package/dist/components/hover-card.d.ts +8 -21
- package/dist/components/hover-card.d.ts.map +1 -0
- package/dist/components/hover-card.js +9 -24
- package/dist/components/input-group.d.ts +29 -53
- package/dist/components/input-group.d.ts.map +1 -0
- package/dist/components/input-group.js +110 -67
- package/dist/components/input-number.d.ts +8 -28
- package/dist/components/input-number.d.ts.map +1 -0
- package/dist/components/input-number.js +15 -56
- package/dist/components/input-otp.d.ts +11 -24
- package/dist/components/input-otp.d.ts.map +1 -0
- package/dist/components/input-otp.js +14 -35
- package/dist/components/input-password.d.ts +6 -12
- package/dist/components/input-password.d.ts.map +1 -0
- package/dist/components/input-password.js +11 -31
- package/dist/components/input-search.d.ts +9 -18
- package/dist/components/input-search.d.ts.map +1 -0
- package/dist/components/input-search.js +17 -44
- package/dist/components/input.d.ts +5 -10
- package/dist/components/input.d.ts.map +1 -0
- package/dist/components/input.js +6 -10
- package/dist/components/item.d.ts +33 -69
- package/dist/components/item.d.ts.map +1 -0
- package/dist/components/item.js +69 -91
- package/dist/components/kbd.d.ts +6 -13
- package/dist/components/kbd.d.ts.map +1 -0
- package/dist/components/kbd.js +7 -14
- package/dist/components/label.d.ts +5 -9
- package/dist/components/label.d.ts.map +1 -0
- package/dist/components/label.js +6 -9
- package/dist/components/menubar.d.ts +24 -80
- package/dist/components/menubar.d.ts.map +1 -0
- package/dist/components/menubar.js +24 -100
- package/dist/components/native-select.d.ts +7 -16
- package/dist/components/native-select.d.ts.map +1 -0
- package/dist/components/native-select.js +8 -26
- package/dist/components/navigation-menu.d.ts +13 -36
- package/dist/components/navigation-menu.d.ts.map +1 -0
- package/dist/components/navigation-menu.js +26 -62
- package/dist/components/pagination.d.ts +15 -35
- package/dist/components/pagination.d.ts.map +1 -0
- package/dist/components/pagination.js +14 -56
- package/dist/components/popover.d.ts +9 -24
- package/dist/components/popover.d.ts.map +1 -0
- package/dist/components/popover.js +10 -28
- package/dist/components/progress-circle.d.ts +89 -106
- package/dist/components/progress-circle.d.ts.map +1 -0
- package/dist/components/progress-circle.js +71 -104
- package/dist/components/progress.d.ts +5 -10
- package/dist/components/progress.d.ts.map +1 -0
- package/dist/components/progress.js +8 -14
- package/dist/components/radio-cards.d.ts +5 -10
- package/dist/components/radio-cards.d.ts.map +1 -0
- package/dist/components/radio-cards.js +8 -22
- package/dist/components/radio-group.d.ts +6 -13
- package/dist/components/radio-group.d.ts.map +1 -0
- package/dist/components/radio-group.js +7 -18
- package/dist/components/radio.d.ts +6 -12
- package/dist/components/radio.d.ts.map +1 -0
- package/dist/components/radio.js +6 -11
- package/dist/components/resizable.d.ts +8 -18
- package/dist/components/resizable.d.ts.map +1 -0
- package/dist/components/resizable.js +8 -22
- package/dist/components/scroll-area.d.ts +21 -33
- package/dist/components/scroll-area.d.ts.map +1 -0
- package/dist/components/scroll-area.js +65 -85
- package/dist/components/select.d.ts +17 -50
- package/dist/components/select.d.ts.map +1 -0
- package/dist/components/select.js +27 -79
- package/dist/components/separator.d.ts +20 -29
- package/dist/components/separator.d.ts.map +1 -0
- package/dist/components/separator.js +28 -37
- package/dist/components/sheet.d.ts +30 -62
- package/dist/components/sheet.d.ts.map +1 -0
- package/dist/components/sheet.js +68 -81
- package/dist/components/sidebar.d.ts +67 -160
- package/dist/components/sidebar.d.ts.map +1 -0
- package/dist/components/sidebar.js +184 -302
- package/dist/components/skeleton.d.ts +5 -9
- package/dist/components/skeleton.d.ts.map +1 -0
- package/dist/components/skeleton.js +6 -9
- package/dist/components/slider.d.ts +5 -13
- package/dist/components/slider.d.ts.map +1 -0
- package/dist/components/slider.js +13 -35
- package/dist/components/sonner.d.ts +8 -10
- package/dist/components/sonner.d.ts.map +1 -0
- package/dist/components/sonner.js +14 -16
- package/dist/components/spinner.d.ts +6 -12
- package/dist/components/spinner.d.ts.map +1 -0
- package/dist/components/spinner.js +21 -34
- package/dist/components/switch.d.ts +5 -9
- package/dist/components/switch.d.ts.map +1 -0
- package/dist/components/switch.js +6 -13
- package/dist/components/table.d.ts +12 -37
- package/dist/components/table.d.ts.map +1 -0
- package/dist/components/table.js +13 -48
- package/dist/components/tabs.d.ts +8 -21
- package/dist/components/tabs.d.ts.map +1 -0
- package/dist/components/tabs.js +9 -24
- package/dist/components/textarea.d.ts +5 -9
- package/dist/components/textarea.d.ts.map +1 -0
- package/dist/components/textarea.js +6 -9
- package/dist/components/toggle-group.d.ts +10 -24
- package/dist/components/toggle-group.d.ts.map +1 -0
- package/dist/components/toggle-group.js +21 -39
- package/dist/components/toggle.d.ts +18 -25
- package/dist/components/toggle.d.ts.map +1 -0
- package/dist/components/toggle.js +42 -30
- package/dist/components/tooltip.d.ts +9 -24
- package/dist/components/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip.js +10 -29
- package/dist/hooks/use-animated-value.d.ts +2 -4
- package/dist/hooks/use-animated-value.d.ts.map +1 -0
- package/dist/hooks/use-animated-value.js +67 -58
- package/dist/hooks/use-copy-to-clipboard.d.ts +6 -11
- package/dist/hooks/use-copy-to-clipboard.d.ts.map +1 -0
- package/dist/hooks/use-copy-to-clipboard.js +42 -39
- package/dist/hooks/use-is-mobile.d.ts +2 -4
- package/dist/hooks/use-is-mobile.d.ts.map +1 -0
- package/dist/hooks/use-is-mobile.js +20 -23
- package/dist/hooks/use-media-query.d.ts +2 -4
- package/dist/hooks/use-media-query.d.ts.map +1 -0
- package/dist/hooks/use-media-query.js +49 -46
- package/dist/hooks/use-mutation-observer.d.ts +3 -6
- package/dist/hooks/use-mutation-observer.d.ts.map +1 -0
- package/dist/hooks/use-mutation-observer.js +33 -34
- package/dist/hooks/use-pagination.d.ts +15 -22
- package/dist/hooks/use-pagination.d.ts.map +1 -0
- package/dist/hooks/use-pagination.js +99 -99
- package/dist/index.d.ts +131 -69
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +68 -69
- package/dist/lib/utils.d.ts +10 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +10 -0
- package/dist/primitives/checkbox-group.d.ts +84 -105
- package/dist/primitives/checkbox-group.d.ts.map +1 -0
- package/dist/primitives/checkbox-group.js +91 -105
- package/dist/primitives/input-number.d.ts +41 -51
- package/dist/primitives/input-number.d.ts.map +1 -0
- package/dist/primitives/input-number.js +417 -473
- package/dist/primitives/input.d.ts +43 -48
- package/dist/primitives/input.d.ts.map +1 -0
- package/dist/primitives/input.js +67 -66
- package/dist/primitives/progress-circle.d.ts +49 -79
- package/dist/primitives/progress-circle.d.ts.map +1 -0
- package/dist/primitives/progress-circle.js +134 -149
- package/package.json +33 -16
- package/{dist → src}/css/preset.css +86 -9
- /package/{dist → src}/css/amber.css +0 -0
- /package/{dist → src}/css/blue.css +0 -0
- /package/{dist → src}/css/cyan.css +0 -0
- /package/{dist → src}/css/emerald.css +0 -0
- /package/{dist → src}/css/fuchsia.css +0 -0
- /package/{dist → src}/css/gray.css +0 -0
- /package/{dist → src}/css/green.css +0 -0
- /package/{dist → src}/css/indigo.css +0 -0
- /package/{dist → src}/css/lime.css +0 -0
- /package/{dist → src}/css/neutral.css +0 -0
- /package/{dist → src}/css/orange.css +0 -0
- /package/{dist → src}/css/pink.css +0 -0
- /package/{dist → src}/css/purple.css +0 -0
- /package/{dist → src}/css/red.css +0 -0
- /package/{dist → src}/css/rose.css +0 -0
- /package/{dist → src}/css/sky.css +0 -0
- /package/{dist → src}/css/slate.css +0 -0
- /package/{dist → src}/css/stone.css +0 -0
- /package/{dist → src}/css/style.css +0 -0
- /package/{dist → src}/css/teal.css +0 -0
- /package/{dist → src}/css/violet.css +0 -0
- /package/{dist → src}/css/yellow.css +0 -0
- /package/{dist → src}/css/zinc.css +0 -0
|
@@ -1,23 +1,13 @@
|
|
|
1
|
-
import { ComponentProps, JSX } from "react";
|
|
1
|
+
import type { ComponentProps, JSX } from "react";
|
|
2
2
|
import * as ResizablePrimitive from "react-resizable-panels";
|
|
3
|
-
|
|
4
|
-
//#region src/components/resizable.d.ts
|
|
5
3
|
type ResizableGroupProps = ComponentProps<typeof ResizablePrimitive.Group>;
|
|
6
|
-
declare function ResizableGroup({
|
|
7
|
-
className,
|
|
8
|
-
...props
|
|
9
|
-
}: ResizableGroupProps): JSX.Element;
|
|
4
|
+
declare function ResizableGroup({ className, ...props }: ResizableGroupProps): JSX.Element;
|
|
10
5
|
type ResizablePanelProps = ComponentProps<typeof ResizablePrimitive.Panel>;
|
|
11
|
-
declare function ResizablePanel({
|
|
12
|
-
...props
|
|
13
|
-
}: ResizablePanelProps): JSX.Element;
|
|
6
|
+
declare function ResizablePanel({ ...props }: ResizablePanelProps): JSX.Element;
|
|
14
7
|
interface ResizableSeparatorProps extends ComponentProps<typeof ResizablePrimitive.Separator> {
|
|
15
|
-
|
|
8
|
+
withHandle?: boolean;
|
|
16
9
|
}
|
|
17
|
-
declare function ResizableSeparator({
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}: ResizableSeparatorProps): JSX.Element;
|
|
22
|
-
//#endregion
|
|
23
|
-
export { ResizableGroup, type ResizableGroupProps, ResizablePanel, type ResizablePanelProps, ResizableSeparator, type ResizableSeparatorProps };
|
|
10
|
+
declare function ResizableSeparator({ className, withHandle, ...props }: ResizableSeparatorProps): JSX.Element;
|
|
11
|
+
export { ResizableGroup, ResizablePanel, ResizableSeparator };
|
|
12
|
+
export type { ResizableGroupProps, ResizablePanelProps, ResizableSeparatorProps };
|
|
13
|
+
//# sourceMappingURL=resizable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resizable.d.ts","sourceRoot":"","sources":["../../src/components/resizable.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAIjD,OAAO,KAAK,kBAAkB,MAAM,wBAAwB,CAAC;AAM7D,KAAK,mBAAmB,GAAG,cAAc,CAAC,OAAO,kBAAkB,CAAC,KAAK,CAAC,CAAC;AAE3E,iBAAS,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,mBAAmB,GAAG,GAAG,CAAC,OAAO,CAQjF;AAMD,KAAK,mBAAmB,GAAG,cAAc,CAAC,OAAO,kBAAkB,CAAC,KAAK,CAAC,CAAC;AAE3E,iBAAS,cAAc,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,mBAAmB,GAAG,GAAG,CAAC,OAAO,CAEtE;AAMD,UAAU,uBAAwB,SAAQ,cAAc,CAAC,OAAO,kBAAkB,CAAC,SAAS,CAAC;IAC3F,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,UAAU,EACV,GAAG,KAAK,EACT,EAAE,uBAAuB,GAAG,GAAG,CAAC,OAAO,CA2BvC;AAMD,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,kBAAkB,EAAE,CAAC;AAC9D,YAAY,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,CAAC"}
|
|
@@ -1,32 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "#lib/utils";
|
|
3
4
|
import { GripVerticalIcon } from "lucide-react";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import * as ResizablePrimitive from "react-resizable-panels";
|
|
6
|
-
//#region src/components/resizable.tsx
|
|
7
6
|
function ResizableGroup({ className, ...props }) {
|
|
8
|
-
|
|
9
|
-
className: cn("flex size-full", className),
|
|
10
|
-
"data-slot": "resizable-group",
|
|
11
|
-
...props
|
|
12
|
-
});
|
|
7
|
+
return (_jsx(ResizablePrimitive.Group, { className: cn("flex size-full", className), "data-slot": "resizable-group", ...props }));
|
|
13
8
|
}
|
|
14
9
|
function ResizablePanel({ ...props }) {
|
|
15
|
-
|
|
16
|
-
"data-slot": "resizable-panel",
|
|
17
|
-
...props
|
|
18
|
-
});
|
|
10
|
+
return _jsx(ResizablePrimitive.Panel, { "data-slot": "resizable-panel", ...props });
|
|
19
11
|
}
|
|
20
12
|
function ResizableSeparator({ className, withHandle, ...props }) {
|
|
21
|
-
|
|
22
|
-
className: cn("flex items-center justify-center bg-border outline-hidden focus-visible:bg-ring focus-visible:ring-3 focus-visible:ring-ring/50", "aria-[orientation=vertical]:w-px", "aria-[orientation=horizontal]:h-px", className),
|
|
23
|
-
"data-slot": "resizable-separator",
|
|
24
|
-
...props,
|
|
25
|
-
children: withHandle ? /* @__PURE__ */ jsx("div", {
|
|
26
|
-
className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border",
|
|
27
|
-
children: /* @__PURE__ */ jsx(GripVerticalIcon, { className: "size-2.5" })
|
|
28
|
-
}) : null
|
|
29
|
-
});
|
|
13
|
+
return (_jsx(ResizablePrimitive.Separator, { className: cn("flex items-center justify-center", "bg-border outline-hidden", "focus-visible:bg-ring focus-visible:ring-3 focus-visible:ring-ring/50", "aria-[orientation=horizontal]:h-px", "aria-[orientation=vertical]:w-px", className), "data-slot": "resizable-separator", ...props, children: withHandle ? (_jsx("div", { className: cn("z-10 flex h-4 w-3 items-center justify-center", "rounded-sm border", "bg-border"), children: _jsx(GripVerticalIcon, { className: "size-2.5" }) })) : null }));
|
|
30
14
|
}
|
|
31
|
-
|
|
15
|
+
/* -----------------------------------------------------------------------------
|
|
16
|
+
* Exports
|
|
17
|
+
* -------------------------------------------------------------------------- */
|
|
32
18
|
export { ResizableGroup, ResizablePanel, ResizableSeparator };
|
|
@@ -1,40 +1,28 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { ComponentProps, JSX } from "react";
|
|
4
|
-
import { Scope } from "@radix-ui/react-context";
|
|
1
|
+
import type { VariantProps } from "#lib/utils";
|
|
2
|
+
import type { Scope } from "@radix-ui/react-context";
|
|
3
|
+
import type { ComponentProps, JSX } from "react";
|
|
5
4
|
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
lg: string;
|
|
18
|
-
};
|
|
5
|
+
declare const scrollAreaScrollbarVariants: import("@codefast/tailwind-variants").VariantFunctionType<{
|
|
6
|
+
orientation: {
|
|
7
|
+
horizontal: string[];
|
|
8
|
+
vertical: string[];
|
|
9
|
+
};
|
|
10
|
+
size: {
|
|
11
|
+
none: string;
|
|
12
|
+
sm: string;
|
|
13
|
+
md: string;
|
|
14
|
+
lg: string;
|
|
15
|
+
};
|
|
19
16
|
}, Record<string, never>>;
|
|
20
17
|
type ScopedProps<P> = P & {
|
|
21
|
-
|
|
18
|
+
__scopeScrollArea?: Scope;
|
|
22
19
|
};
|
|
23
20
|
type ScrollAreaContextValue = Pick<VariantProps<typeof scrollAreaScrollbarVariants>, "size">;
|
|
24
21
|
type ScrollAreaProps = ScopedProps<ComponentProps<typeof ScrollAreaPrimitive.Root> & ScrollAreaContextValue>;
|
|
25
|
-
declare function ScrollArea({
|
|
26
|
-
__scopeScrollArea,
|
|
27
|
-
children,
|
|
28
|
-
className,
|
|
29
|
-
size,
|
|
30
|
-
...props
|
|
31
|
-
}: ScrollAreaProps): JSX.Element;
|
|
22
|
+
declare function ScrollArea({ __scopeScrollArea, children, className, size, ...props }: ScrollAreaProps): JSX.Element;
|
|
32
23
|
type ScrollAreaScrollbarProps = ScopedProps<ComponentProps<typeof ScrollAreaPrimitive.Scrollbar>>;
|
|
33
|
-
declare function ScrollAreaScrollbar({
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}: ScrollAreaScrollbarProps): JSX.Element;
|
|
39
|
-
//#endregion
|
|
40
|
-
export { ScrollArea, type ScrollAreaProps, ScrollAreaScrollbar, type ScrollAreaScrollbarProps, scrollAreaScrollbarVariants };
|
|
24
|
+
declare function ScrollAreaScrollbar({ __scopeScrollArea, className, orientation, ...props }: ScrollAreaScrollbarProps): JSX.Element;
|
|
25
|
+
export { scrollAreaScrollbarVariants };
|
|
26
|
+
export { ScrollArea, ScrollAreaScrollbar };
|
|
27
|
+
export type { ScrollAreaProps, ScrollAreaScrollbarProps };
|
|
28
|
+
//# sourceMappingURL=scroll-area.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scroll-area.d.ts","sourceRoot":"","sources":["../../src/components/scroll-area.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAIjD,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAC;AAMnE,QAAA,MAAM,2BAA2B;;QAwC3B,UAAU;QACV,QAAQ;;;QAGR,IAAI;QAEJ,EAAE;QAEF,EAAE;QAEF,EAAE;;yBAGN,CAAC;AAQH,KAAK,WAAW,CAAC,CAAC,IAAI,CAAC,GAAG;IAAE,iBAAiB,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC;AAIxD,KAAK,sBAAsB,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,2BAA2B,CAAC,EAAE,MAAM,CAAC,CAAC;AAS7F,KAAK,eAAe,GAAG,WAAW,CAChC,cAAc,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC,GAAG,sBAAsB,CACzE,CAAC;AAEF,iBAAS,UAAU,CAAC,EAClB,iBAAiB,EACjB,QAAQ,EACR,SAAS,EACT,IAAI,EACJ,GAAG,KAAK,EACT,EAAE,eAAe,GAAG,GAAG,CAAC,OAAO,CAyB/B;AAMD,KAAK,wBAAwB,GAAG,WAAW,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,SAAS,CAAC,CAAC,CAAC;AAElG,iBAAS,mBAAmB,CAAC,EAC3B,iBAAiB,EACjB,SAAS,EACT,WAAW,EACX,GAAG,KAAK,EACT,EAAE,wBAAwB,GAAG,GAAG,CAAC,OAAO,CAexC;AAMD,OAAO,EAAE,2BAA2B,EAAE,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,CAAC;AAC3C,YAAY,EAAE,eAAe,EAAE,wBAAwB,EAAE,CAAC"}
|
|
@@ -1,97 +1,77 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn, tv } from "#lib/utils";
|
|
4
4
|
import { createContextScope } from "@radix-ui/react-context";
|
|
5
5
|
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
6
|
-
|
|
6
|
+
/* -----------------------------------------------------------------------------
|
|
7
|
+
* Variant: ScrollAreaScrollbar
|
|
8
|
+
* -------------------------------------------------------------------------- */
|
|
7
9
|
const scrollAreaScrollbarVariants = tv({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
10
|
+
base: ["flex", "p-px", "touch-none transition-colors select-none"],
|
|
11
|
+
compoundVariants: [
|
|
12
|
+
{
|
|
13
|
+
className: "w-1.5",
|
|
14
|
+
orientation: "vertical",
|
|
15
|
+
size: "sm",
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
className: "w-2",
|
|
19
|
+
orientation: "vertical",
|
|
20
|
+
size: "md",
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
className: "w-2.5",
|
|
24
|
+
orientation: "vertical",
|
|
25
|
+
size: "lg",
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
className: "h-1.5",
|
|
29
|
+
orientation: "horizontal",
|
|
30
|
+
size: "sm",
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
className: "h-2",
|
|
34
|
+
orientation: "horizontal",
|
|
35
|
+
size: "md",
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
className: "h-2.5",
|
|
39
|
+
orientation: "horizontal",
|
|
40
|
+
size: "lg",
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
defaultVariants: {
|
|
44
|
+
orientation: "vertical",
|
|
45
|
+
size: "md",
|
|
46
|
+
},
|
|
47
|
+
variants: {
|
|
48
|
+
orientation: {
|
|
49
|
+
horizontal: ["w-full flex-col", "border-t border-t-transparent"],
|
|
50
|
+
vertical: ["h-full flex-row", "border-l border-l-transparent"],
|
|
51
|
+
},
|
|
52
|
+
size: {
|
|
53
|
+
none: "",
|
|
54
|
+
sm: "",
|
|
55
|
+
md: "",
|
|
56
|
+
lg: "",
|
|
57
|
+
},
|
|
58
|
+
},
|
|
57
59
|
});
|
|
60
|
+
/* -----------------------------------------------------------------------------
|
|
61
|
+
* Context: ScrollArea
|
|
62
|
+
* -------------------------------------------------------------------------- */
|
|
58
63
|
const SCROLL_AREA_NAME = "ScrollArea";
|
|
59
64
|
const [createScrollAreaContext] = createContextScope(SCROLL_AREA_NAME);
|
|
60
65
|
const [ScrollAreaContextProvider, useScrollAreaContext] = createScrollAreaContext(SCROLL_AREA_NAME);
|
|
61
66
|
function ScrollArea({ __scopeScrollArea, children, className, size, ...props }) {
|
|
62
|
-
|
|
63
|
-
scope: __scopeScrollArea,
|
|
64
|
-
size,
|
|
65
|
-
children: /* @__PURE__ */ jsxs(ScrollAreaPrimitive.Root, {
|
|
66
|
-
className: cn("relative", className),
|
|
67
|
-
"data-slot": "scroll-area",
|
|
68
|
-
...props,
|
|
69
|
-
children: [
|
|
70
|
-
/* @__PURE__ */ jsx(ScrollAreaPrimitive.Viewport, {
|
|
71
|
-
className: "size-full rounded-[inherit] ring-ring/50 outline-ring transition focus-visible:ring-4 focus-visible:outline-1",
|
|
72
|
-
"data-slot": "scroll-area-viewport",
|
|
73
|
-
children
|
|
74
|
-
}),
|
|
75
|
-
/* @__PURE__ */ jsx(ScrollAreaScrollbar, { orientation: "vertical" }),
|
|
76
|
-
/* @__PURE__ */ jsx(ScrollAreaScrollbar, { orientation: "horizontal" }),
|
|
77
|
-
/* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, {})
|
|
78
|
-
]
|
|
79
|
-
})
|
|
80
|
-
});
|
|
67
|
+
return (_jsx(ScrollAreaContextProvider, { scope: __scopeScrollArea, size: size, children: _jsxs(ScrollAreaPrimitive.Root, { className: cn("relative", className), "data-slot": "scroll-area", ...props, children: [_jsx(ScrollAreaPrimitive.Viewport, { className: cn("size-full", "rounded-[inherit] ring-ring/50 outline-ring", "transition", "focus-visible:ring-4 focus-visible:outline-1"), "data-slot": "scroll-area-viewport", children: children }), _jsx(ScrollAreaScrollbar, { orientation: "vertical" }), _jsx(ScrollAreaScrollbar, { orientation: "horizontal" }), _jsx(ScrollAreaPrimitive.Corner, {})] }) }));
|
|
81
68
|
}
|
|
82
69
|
function ScrollAreaScrollbar({ __scopeScrollArea, className, orientation, ...props }) {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
className: scrollAreaScrollbarVariants({
|
|
86
|
-
className,
|
|
87
|
-
orientation,
|
|
88
|
-
size
|
|
89
|
-
}),
|
|
90
|
-
"data-slot": "scroll-area-scrollbar",
|
|
91
|
-
orientation,
|
|
92
|
-
...props,
|
|
93
|
-
children: /* @__PURE__ */ jsx(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
94
|
-
});
|
|
70
|
+
const { size } = useScrollAreaContext(SCROLL_AREA_NAME, __scopeScrollArea);
|
|
71
|
+
return (_jsx(ScrollAreaPrimitive.Scrollbar, { className: scrollAreaScrollbarVariants({ className, orientation, size }), "data-slot": "scroll-area-scrollbar", orientation: orientation, ...props, children: _jsx(ScrollAreaPrimitive.ScrollAreaThumb, { className: cn("relative flex-1", "rounded-full", "bg-border") }) }));
|
|
95
72
|
}
|
|
96
|
-
|
|
97
|
-
|
|
73
|
+
/* -----------------------------------------------------------------------------
|
|
74
|
+
* Exports
|
|
75
|
+
* -------------------------------------------------------------------------- */
|
|
76
|
+
export { scrollAreaScrollbarVariants };
|
|
77
|
+
export { ScrollArea, ScrollAreaScrollbar };
|
|
@@ -1,62 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { ComponentProps, JSX } from "react";
|
|
1
|
+
import type { VariantProps } from "#lib/utils";
|
|
2
|
+
import type { ComponentProps, JSX } from "react";
|
|
4
3
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
5
|
-
|
|
6
|
-
//#region src/components/select.d.ts
|
|
4
|
+
import { buttonVariants } from "#components/button";
|
|
7
5
|
type SelectProps = ComponentProps<typeof SelectPrimitive.Root>;
|
|
8
|
-
declare function Select({
|
|
9
|
-
...props
|
|
10
|
-
}: SelectProps): JSX.Element;
|
|
6
|
+
declare function Select({ ...props }: SelectProps): JSX.Element;
|
|
11
7
|
type SelectGroupProps = ComponentProps<typeof SelectPrimitive.Group>;
|
|
12
|
-
declare function SelectGroup({
|
|
13
|
-
...props
|
|
14
|
-
}: SelectGroupProps): JSX.Element;
|
|
8
|
+
declare function SelectGroup({ ...props }: SelectGroupProps): JSX.Element;
|
|
15
9
|
type SelectValueProps = ComponentProps<typeof SelectPrimitive.Value>;
|
|
16
|
-
declare function SelectValue({
|
|
17
|
-
...props
|
|
18
|
-
}: SelectValueProps): JSX.Element;
|
|
10
|
+
declare function SelectValue({ ...props }: SelectValueProps): JSX.Element;
|
|
19
11
|
interface SelectTriggerProps extends ComponentProps<typeof SelectPrimitive.Trigger> {
|
|
20
|
-
|
|
12
|
+
size?: VariantProps<typeof buttonVariants>["size"];
|
|
21
13
|
}
|
|
22
|
-
declare function SelectTrigger({
|
|
23
|
-
children,
|
|
24
|
-
className,
|
|
25
|
-
size,
|
|
26
|
-
...props
|
|
27
|
-
}: SelectTriggerProps): JSX.Element;
|
|
14
|
+
declare function SelectTrigger({ children, className, size, ...props }: SelectTriggerProps): JSX.Element;
|
|
28
15
|
type SelectScrollUpButtonProps = ComponentProps<typeof SelectPrimitive.ScrollUpButton>;
|
|
29
|
-
declare function SelectScrollUpButton({
|
|
30
|
-
className,
|
|
31
|
-
...props
|
|
32
|
-
}: SelectScrollUpButtonProps): JSX.Element;
|
|
16
|
+
declare function SelectScrollUpButton({ className, ...props }: SelectScrollUpButtonProps): JSX.Element;
|
|
33
17
|
type SelectScrollDownButtonProps = ComponentProps<typeof SelectPrimitive.ScrollDownButton>;
|
|
34
|
-
declare function SelectScrollDownButton({
|
|
35
|
-
className,
|
|
36
|
-
...props
|
|
37
|
-
}: SelectScrollDownButtonProps): JSX.Element;
|
|
18
|
+
declare function SelectScrollDownButton({ className, ...props }: SelectScrollDownButtonProps): JSX.Element;
|
|
38
19
|
type SelectContentProps = ComponentProps<typeof SelectPrimitive.Content>;
|
|
39
|
-
declare function SelectContent({
|
|
40
|
-
children,
|
|
41
|
-
className,
|
|
42
|
-
position,
|
|
43
|
-
...props
|
|
44
|
-
}: SelectContentProps): JSX.Element;
|
|
20
|
+
declare function SelectContent({ children, className, position, ...props }: SelectContentProps): JSX.Element;
|
|
45
21
|
type SelectLabelProps = ComponentProps<typeof SelectPrimitive.Label>;
|
|
46
|
-
declare function SelectLabel({
|
|
47
|
-
className,
|
|
48
|
-
...props
|
|
49
|
-
}: SelectLabelProps): JSX.Element;
|
|
22
|
+
declare function SelectLabel({ className, ...props }: SelectLabelProps): JSX.Element;
|
|
50
23
|
type SelectItemProps = ComponentProps<typeof SelectPrimitive.Item>;
|
|
51
|
-
declare function SelectItem({
|
|
52
|
-
children,
|
|
53
|
-
className,
|
|
54
|
-
...props
|
|
55
|
-
}: SelectItemProps): JSX.Element;
|
|
24
|
+
declare function SelectItem({ children, className, ...props }: SelectItemProps): JSX.Element;
|
|
56
25
|
type SelectSeparatorProps = ComponentProps<typeof SelectPrimitive.Separator>;
|
|
57
|
-
declare function SelectSeparator({
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
//#endregion
|
|
62
|
-
export { Select, SelectContent, type SelectContentProps, SelectGroup, type SelectGroupProps, SelectItem, type SelectItemProps, SelectLabel, type SelectLabelProps, type SelectProps, SelectScrollDownButton, type SelectScrollDownButtonProps, SelectScrollUpButton, type SelectScrollUpButtonProps, SelectSeparator, type SelectSeparatorProps, SelectTrigger, type SelectTriggerProps, SelectValue, type SelectValueProps };
|
|
26
|
+
declare function SelectSeparator({ className, ...props }: SelectSeparatorProps): JSX.Element;
|
|
27
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };
|
|
28
|
+
export type { SelectContentProps, SelectGroupProps, SelectItemProps, SelectLabelProps, SelectProps, SelectScrollDownButtonProps, SelectScrollUpButtonProps, SelectSeparatorProps, SelectTriggerProps, SelectValueProps, };
|
|
29
|
+
//# sourceMappingURL=select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../src/components/select.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1,101 +1,49 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { cn } from "
|
|
4
|
-
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
5
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "#lib/utils";
|
|
6
4
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
7
|
-
|
|
5
|
+
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
6
|
+
import { buttonVariants } from "#components/button";
|
|
8
7
|
function Select({ ...props }) {
|
|
9
|
-
|
|
10
|
-
"data-slot": "select",
|
|
11
|
-
...props
|
|
12
|
-
});
|
|
8
|
+
return _jsx(SelectPrimitive.Root, { "data-slot": "select", ...props });
|
|
13
9
|
}
|
|
14
10
|
function SelectGroup({ ...props }) {
|
|
15
|
-
|
|
16
|
-
"data-slot": "select-group",
|
|
17
|
-
...props
|
|
18
|
-
});
|
|
11
|
+
return _jsx(SelectPrimitive.Group, { "data-slot": "select-group", ...props });
|
|
19
12
|
}
|
|
20
13
|
function SelectValue({ ...props }) {
|
|
21
|
-
|
|
22
|
-
"data-slot": "select-value",
|
|
23
|
-
...props
|
|
24
|
-
});
|
|
14
|
+
return _jsx(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
|
|
25
15
|
}
|
|
26
16
|
function SelectTrigger({ children, className, size, ...props }) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
...props,
|
|
36
|
-
children: [children, /* @__PURE__ */ jsx(SelectPrimitive.Icon, {
|
|
37
|
-
asChild: true,
|
|
38
|
-
className: "size-4 shrink-0 opacity-50",
|
|
39
|
-
children: /* @__PURE__ */ jsx(ChevronDownIcon, {})
|
|
40
|
-
})]
|
|
41
|
-
});
|
|
17
|
+
return (_jsxs(SelectPrimitive.Trigger, { className: buttonVariants({
|
|
18
|
+
className: [
|
|
19
|
+
"[&_svg:not([class*='text-'])]:text-muted-foreground focus:ring-ring/50 focus:border-ring w-fit justify-between px-3 font-normal focus:ring-3 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 *:data-[slot=select-value]:truncate",
|
|
20
|
+
className,
|
|
21
|
+
],
|
|
22
|
+
size,
|
|
23
|
+
variant: "outline",
|
|
24
|
+
}), "data-size": size, "data-slot": "select-trigger", ...props, children: [children, _jsx(SelectPrimitive.Icon, { asChild: true, className: cn("size-4 shrink-0", "opacity-50"), children: _jsx(ChevronDownIcon, {}) })] }));
|
|
42
25
|
}
|
|
43
26
|
function SelectScrollUpButton({ className, ...props }) {
|
|
44
|
-
|
|
45
|
-
className: cn("flex items-center justify-center py-1 text-muted-foreground", className),
|
|
46
|
-
"data-slot": "select-scroll-up-button",
|
|
47
|
-
...props,
|
|
48
|
-
children: /* @__PURE__ */ jsx(ChevronUpIcon, { size: 16 })
|
|
49
|
-
});
|
|
27
|
+
return (_jsx(SelectPrimitive.ScrollUpButton, { className: cn("flex items-center justify-center", "py-1", "text-muted-foreground", className), "data-slot": "select-scroll-up-button", ...props, children: _jsx(ChevronUpIcon, { size: 16 }) }));
|
|
50
28
|
}
|
|
51
29
|
function SelectScrollDownButton({ className, ...props }) {
|
|
52
|
-
|
|
53
|
-
className: cn("flex items-center justify-center py-1 text-muted-foreground", className),
|
|
54
|
-
"data-slot": "select-scroll-down-button",
|
|
55
|
-
...props,
|
|
56
|
-
children: /* @__PURE__ */ jsx(ChevronDownIcon, { size: 16 })
|
|
57
|
-
});
|
|
30
|
+
return (_jsx(SelectPrimitive.ScrollDownButton, { className: cn("flex items-center justify-center", "py-1", "text-muted-foreground", className), "data-slot": "select-scroll-down-button", ...props, children: _jsx(ChevronDownIcon, { size: 16 }) }));
|
|
58
31
|
}
|
|
59
32
|
function SelectContent({ children, className, position = "popper", ...props }) {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
position,
|
|
64
|
-
...props,
|
|
65
|
-
children: [
|
|
66
|
-
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
67
|
-
/* @__PURE__ */ jsx(SelectPrimitive.Viewport, {
|
|
68
|
-
className: cn("p-1", position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),
|
|
69
|
-
children
|
|
70
|
-
}),
|
|
71
|
-
/* @__PURE__ */ jsx(SelectScrollDownButton, {})
|
|
72
|
-
]
|
|
73
|
-
}) });
|
|
33
|
+
return (_jsx(SelectPrimitive.Portal, { children: _jsxs(SelectPrimitive.Content, { className: cn("relative z-50", "max-h-(--radix-select-content-available-height) min-w-32 overflow-hidden", "rounded-lg border", "bg-popover text-popover-foreground shadow-lg", "ease-ui data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95", "data-open:data-side-top:slide-in-from-bottom-2", "data-open:data-side-right:slide-in-from-left-2", "data-open:data-side-bottom:slide-in-from-top-2", "data-open:data-side-left:slide-in-from-right-2", "data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", "data-closed:data-side-top:slide-out-to-bottom-2", "data-closed:data-side-right:slide-out-to-left-2", "data-closed:data-side-bottom:slide-out-to-top-2", "data-closed:data-side-left:slide-out-to-right-2", "origin-(--radix-select-content-transform-origin)", position === "popper" &&
|
|
34
|
+
"data-side-top:-translate-y-1 data-side-right:translate-x-1 data-side-bottom:translate-y-1 data-side-left:-translate-x-1", className), "data-slot": "select-content", position: position, ...props, children: [_jsx(SelectScrollUpButton, {}), _jsx(SelectPrimitive.Viewport, { className: cn("p-1", position === "popper" &&
|
|
35
|
+
"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width) scroll-my-1"), children: children }), _jsx(SelectScrollDownButton, {})] }) }));
|
|
74
36
|
}
|
|
75
37
|
function SelectLabel({ className, ...props }) {
|
|
76
|
-
|
|
77
|
-
className: cn("flex items-center gap-x-2 px-2 py-1.5 text-sm font-semibold", className),
|
|
78
|
-
"data-slot": "select-label",
|
|
79
|
-
...props
|
|
80
|
-
});
|
|
38
|
+
return (_jsx(SelectPrimitive.Label, { className: cn("flex items-center gap-x-2", "px-2 py-1.5", "text-sm font-semibold", className), "data-slot": "select-label", ...props }));
|
|
81
39
|
}
|
|
82
40
|
function SelectItem({ children, className, ...props }) {
|
|
83
|
-
|
|
84
|
-
className: cn("relative flex w-full cursor-default items-center rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground aria-disabled:opacity-50 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:[&_svg:not([class*='text-'])]:text-destructive/80 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className),
|
|
85
|
-
"data-slot": "select-item",
|
|
86
|
-
...props,
|
|
87
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
88
|
-
className: "absolute right-2 flex items-center justify-center",
|
|
89
|
-
children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) })
|
|
90
|
-
}), /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })]
|
|
91
|
-
});
|
|
41
|
+
return (_jsxs(SelectPrimitive.Item, { className: cn("relative flex w-full items-center py-1.5 pr-8 pl-2", "rounded-sm outline-hidden", "text-sm", "cursor-default select-none", "focus:bg-accent focus:text-accent-foreground", "aria-disabled:opacity-50", "*:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", "[&_svg]:shrink-0", "[&_svg:not([class*='size-'])]:size-4", "[&_svg:not([class*='text-'])]:text-muted-foreground", "data-[variant=destructive]:[&_svg:not([class*='text-'])]:text-destructive/80", className), "data-slot": "select-item", ...props, children: [_jsx("span", { className: cn("absolute flex items-center justify-center", "right-2"), children: _jsx(SelectPrimitive.ItemIndicator, { children: _jsx(CheckIcon, { className: "size-4" }) }) }), _jsx(SelectPrimitive.ItemText, { children: children })] }));
|
|
92
42
|
}
|
|
93
43
|
function SelectSeparator({ className, ...props }) {
|
|
94
|
-
|
|
95
|
-
className: cn("mx-2 my-1 h-px bg-border", className),
|
|
96
|
-
"data-slot": "select-separator",
|
|
97
|
-
...props
|
|
98
|
-
});
|
|
44
|
+
return (_jsx(SelectPrimitive.Separator, { className: cn("mx-2 my-1 h-px", "bg-border", className), "data-slot": "select-separator", ...props }));
|
|
99
45
|
}
|
|
100
|
-
|
|
101
|
-
|
|
46
|
+
/* -----------------------------------------------------------------------------
|
|
47
|
+
* Exports
|
|
48
|
+
* -------------------------------------------------------------------------- */
|
|
49
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };
|
|
@@ -1,32 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import type { VariantProps } from "#lib/utils";
|
|
2
|
+
import type { ComponentProps, JSX } from "react";
|
|
3
3
|
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
horizontal: string;
|
|
15
|
-
vertical: string;
|
|
16
|
-
};
|
|
4
|
+
declare const separatorVariants: import("@codefast/tailwind-variants").VariantFunctionType<{
|
|
5
|
+
align: {
|
|
6
|
+
center: string;
|
|
7
|
+
end: string;
|
|
8
|
+
start: string;
|
|
9
|
+
};
|
|
10
|
+
orientation: {
|
|
11
|
+
horizontal: string;
|
|
12
|
+
vertical: string;
|
|
13
|
+
};
|
|
17
14
|
}, Record<string, never>>;
|
|
18
|
-
interface SeparatorProps extends ComponentProps<typeof SeparatorPrimitive.Root>, Omit<VariantProps<typeof separatorVariants>, "orientation"> {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
className,
|
|
22
|
-
decorative,
|
|
23
|
-
orientation,
|
|
24
|
-
...props
|
|
25
|
-
}: SeparatorProps): JSX.Element;
|
|
15
|
+
interface SeparatorProps extends ComponentProps<typeof SeparatorPrimitive.Root>, Omit<VariantProps<typeof separatorVariants>, "orientation"> {
|
|
16
|
+
}
|
|
17
|
+
declare function Separator({ align, className, decorative, orientation, ...props }: SeparatorProps): JSX.Element;
|
|
26
18
|
type SeparatorItemProps = ComponentProps<"div">;
|
|
27
|
-
declare function SeparatorItem({
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
//#
|
|
32
|
-
export { Separator, SeparatorItem, type SeparatorItemProps, type SeparatorProps, separatorVariants };
|
|
19
|
+
declare function SeparatorItem({ className, ...props }: SeparatorItemProps): JSX.Element;
|
|
20
|
+
export { separatorVariants };
|
|
21
|
+
export { Separator, SeparatorItem };
|
|
22
|
+
export type { SeparatorItemProps, SeparatorProps };
|
|
23
|
+
//# sourceMappingURL=separator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"separator.d.ts","sourceRoot":"","sources":["../../src/components/separator.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAGjD,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAC;AAMhE,QAAA,MAAM,iBAAiB;;QAQjB,MAAM;QACN,GAAG;QACH,KAAK;;;QAGL,UAAU;QACV,QAAQ;;yBAGZ,CAAC;AAMH,UAAU,cACR,SACE,cAAc,CAAC,OAAO,kBAAkB,CAAC,IAAI,CAAC,EAC9C,IAAI,CAAC,YAAY,CAAC,OAAO,iBAAiB,CAAC,EAAE,aAAa,CAAC;CAAG;AAElE,iBAAS,SAAS,CAAC,EACjB,KAAK,EACL,SAAS,EACT,UAAiB,EACjB,WAAW,EACX,GAAG,KAAK,EACT,EAAE,cAAc,GAAG,GAAG,CAAC,OAAO,CAU9B;AAMD,KAAK,kBAAkB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAEhD,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,GAAG,GAAG,CAAC,OAAO,CAa/E;AAMD,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;AACpC,YAAY,EAAE,kBAAkB,EAAE,cAAc,EAAE,CAAC"}
|