@codefast/ui 0.3.11 → 0.3.12-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/README.md +4 -0
- package/dist/components/accordion.d.ts +11 -29
- package/dist/components/accordion.d.ts.map +1 -0
- package/dist/components/accordion.js +10 -37
- package/dist/components/alert-dialog.d.ts +25 -60
- package/dist/components/alert-dialog.d.ts.map +1 -0
- package/dist/components/alert-dialog.js +16 -69
- package/dist/components/alert.d.ts +16 -27
- package/dist/components/alert.d.ts.map +1 -0
- package/dist/components/alert.js +22 -30
- package/dist/components/aspect-ratio.d.ts +5 -8
- package/dist/components/aspect-ratio.d.ts.map +1 -0
- package/dist/components/aspect-ratio.js +5 -7
- package/dist/components/avatar.d.ts +7 -17
- package/dist/components/avatar.d.ts.map +1 -0
- package/dist/components/avatar.js +7 -18
- package/dist/components/badge.d.ts +15 -21
- package/dist/components/badge.d.ts.map +1 -0
- package/dist/components/badge.js +23 -20
- package/dist/components/breadcrumb.d.ts +13 -35
- package/dist/components/breadcrumb.d.ts.map +1 -0
- package/dist/components/breadcrumb.js +13 -49
- package/dist/components/button-group.d.ts +15 -29
- package/dist/components/button-group.d.ts.map +1 -0
- package/dist/components/button-group.js +22 -27
- package/dist/components/button.d.ts +26 -35
- package/dist/components/button.d.ts.map +1 -0
- package/dist/components/button.js +43 -51
- package/dist/components/calendar.d.ts +10 -24
- package/dist/components/calendar.d.ts.map +1 -0
- package/dist/components/calendar.js +75 -92
- package/dist/components/card.d.ts +11 -34
- package/dist/components/card.d.ts.map +1 -0
- package/dist/components/card.js +11 -39
- package/dist/components/carousel.d.ts +25 -55
- package/dist/components/carousel.d.ts.map +1 -0
- package/dist/components/carousel.js +82 -114
- package/dist/components/chart.d.ts +37 -72
- package/dist/components/chart.d.ts.map +1 -0
- package/dist/components/chart.js +161 -150
- package/dist/components/checkbox-cards.d.ts +9 -15
- package/dist/components/checkbox-cards.d.ts.map +1 -0
- package/dist/components/checkbox-cards.js +8 -22
- package/dist/components/checkbox-group.d.ts +9 -16
- package/dist/components/checkbox-group.d.ts.map +1 -0
- package/dist/components/checkbox-group.js +7 -19
- package/dist/components/checkbox.d.ts +5 -9
- package/dist/components/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox.js +6 -14
- package/dist/components/collapsible.d.ts +7 -14
- package/dist/components/collapsible.d.ts.map +1 -0
- package/dist/components/collapsible.js +7 -15
- package/dist/components/command.d.ts +24 -55
- package/dist/components/command.d.ts.map +1 -0
- package/dist/components/command.js +18 -69
- package/dist/components/context-menu.d.ts +23 -72
- package/dist/components/context-menu.d.ts.map +1 -0
- package/dist/components/context-menu.js +21 -89
- package/dist/components/dialog.d.ts +23 -53
- package/dist/components/dialog.d.ts.map +1 -0
- package/dist/components/dialog.js +20 -72
- package/dist/components/drawer.d.ts +29 -60
- package/dist/components/drawer.d.ts.map +1 -0
- package/dist/components/drawer.js +16 -58
- package/dist/components/dropdown-menu.d.ts +23 -73
- package/dist/components/dropdown-menu.d.ts.map +1 -0
- package/dist/components/dropdown-menu.js +21 -96
- package/dist/components/empty.d.ts +16 -37
- package/dist/components/empty.d.ts.map +1 -0
- package/dist/components/empty.js +24 -44
- package/dist/components/field.d.ts +26 -63
- package/dist/components/field.d.ts.map +1 -0
- package/dist/components/field.js +46 -89
- package/dist/components/form.d.ts +16 -37
- package/dist/components/form.d.ts.map +1 -0
- package/dist/components/form.js +50 -66
- package/dist/components/hover-card.d.ts +8 -21
- package/dist/components/hover-card.d.ts.map +1 -0
- package/dist/components/hover-card.js +8 -23
- package/dist/components/input-group.d.ts +29 -53
- package/dist/components/input-group.d.ts.map +1 -0
- package/dist/components/input-group.js +59 -66
- package/dist/components/input-number.d.ts +8 -28
- package/dist/components/input-number.d.ts.map +1 -0
- package/dist/components/input-number.js +14 -55
- package/dist/components/input-otp.d.ts +11 -24
- package/dist/components/input-otp.d.ts.map +1 -0
- package/dist/components/input-otp.js +13 -34
- package/dist/components/input-password.d.ts +6 -12
- package/dist/components/input-password.d.ts.map +1 -0
- package/dist/components/input-password.js +10 -31
- package/dist/components/input-search.d.ts +9 -18
- package/dist/components/input-search.d.ts.map +1 -0
- package/dist/components/input-search.js +16 -44
- package/dist/components/input.d.ts +5 -10
- package/dist/components/input.d.ts.map +1 -0
- package/dist/components/input.js +5 -9
- package/dist/components/item.d.ts +33 -69
- package/dist/components/item.d.ts.map +1 -0
- package/dist/components/item.js +47 -90
- package/dist/components/kbd.d.ts +6 -13
- package/dist/components/kbd.d.ts.map +1 -0
- package/dist/components/kbd.js +6 -13
- package/dist/components/label.d.ts +5 -9
- package/dist/components/label.d.ts.map +1 -0
- package/dist/components/label.js +5 -8
- package/dist/components/menubar.d.ts +24 -80
- package/dist/components/menubar.d.ts.map +1 -0
- package/dist/components/menubar.js +23 -99
- package/dist/components/native-select.d.ts +7 -16
- package/dist/components/native-select.d.ts.map +1 -0
- package/dist/components/native-select.js +7 -25
- package/dist/components/navigation-menu.d.ts +13 -36
- package/dist/components/navigation-menu.d.ts.map +1 -0
- package/dist/components/navigation-menu.js +25 -61
- package/dist/components/pagination.d.ts +15 -35
- package/dist/components/pagination.d.ts.map +1 -0
- package/dist/components/pagination.js +13 -55
- package/dist/components/popover.d.ts +9 -24
- package/dist/components/popover.d.ts.map +1 -0
- package/dist/components/popover.js +9 -27
- package/dist/components/progress-circle.d.ts +89 -106
- package/dist/components/progress-circle.d.ts.map +1 -0
- package/dist/components/progress-circle.js +70 -103
- package/dist/components/progress.d.ts +5 -10
- package/dist/components/progress.d.ts.map +1 -0
- package/dist/components/progress.js +7 -13
- package/dist/components/radio-cards.d.ts +5 -10
- package/dist/components/radio-cards.d.ts.map +1 -0
- package/dist/components/radio-cards.js +7 -21
- package/dist/components/radio-group.d.ts +6 -13
- package/dist/components/radio-group.d.ts.map +1 -0
- package/dist/components/radio-group.js +6 -17
- package/dist/components/radio.d.ts +6 -12
- package/dist/components/radio.d.ts.map +1 -0
- package/dist/components/radio.js +5 -10
- package/dist/components/resizable.d.ts +8 -18
- package/dist/components/resizable.d.ts.map +1 -0
- package/dist/components/resizable.js +7 -21
- package/dist/components/scroll-area.d.ts +21 -33
- package/dist/components/scroll-area.d.ts.map +1 -0
- package/dist/components/scroll-area.js +64 -84
- package/dist/components/select.d.ts +17 -50
- package/dist/components/select.d.ts.map +1 -0
- package/dist/components/select.js +26 -78
- package/dist/components/separator.d.ts +20 -29
- package/dist/components/separator.d.ts.map +1 -0
- package/dist/components/separator.js +27 -36
- package/dist/components/sheet.d.ts +30 -62
- package/dist/components/sheet.d.ts.map +1 -0
- package/dist/components/sheet.js +36 -80
- package/dist/components/sidebar.d.ts +67 -160
- package/dist/components/sidebar.d.ts.map +1 -0
- package/dist/components/sidebar.js +166 -301
- package/dist/components/skeleton.d.ts +5 -9
- package/dist/components/skeleton.d.ts.map +1 -0
- package/dist/components/skeleton.js +5 -8
- package/dist/components/slider.d.ts +5 -13
- package/dist/components/slider.d.ts.map +1 -0
- package/dist/components/slider.js +12 -34
- package/dist/components/sonner.d.ts +8 -10
- package/dist/components/sonner.d.ts.map +1 -0
- package/dist/components/sonner.js +13 -16
- package/dist/components/spinner.d.ts +6 -12
- package/dist/components/spinner.d.ts.map +1 -0
- package/dist/components/spinner.js +20 -33
- package/dist/components/switch.d.ts +5 -9
- package/dist/components/switch.d.ts.map +1 -0
- package/dist/components/switch.js +5 -12
- package/dist/components/table.d.ts +12 -37
- package/dist/components/table.d.ts.map +1 -0
- package/dist/components/table.js +12 -47
- package/dist/components/tabs.d.ts +8 -21
- package/dist/components/tabs.d.ts.map +1 -0
- package/dist/components/tabs.js +8 -23
- package/dist/components/textarea.d.ts +5 -9
- package/dist/components/textarea.d.ts.map +1 -0
- package/dist/components/textarea.js +5 -8
- package/dist/components/toggle-group.d.ts +10 -24
- package/dist/components/toggle-group.d.ts.map +1 -0
- package/dist/components/toggle-group.js +20 -38
- package/dist/components/toggle.d.ts +18 -25
- package/dist/components/toggle.d.ts.map +1 -0
- package/dist/components/toggle.js +24 -29
- package/dist/components/tooltip.d.ts +9 -24
- package/dist/components/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip.js +9 -28
- package/dist/hooks/use-animated-value.d.ts +2 -4
- package/dist/hooks/use-animated-value.d.ts.map +1 -0
- package/dist/hooks/use-animated-value.js +67 -58
- package/dist/hooks/use-copy-to-clipboard.d.ts +6 -11
- package/dist/hooks/use-copy-to-clipboard.d.ts.map +1 -0
- package/dist/hooks/use-copy-to-clipboard.js +42 -39
- package/dist/hooks/use-is-mobile.d.ts +2 -4
- package/dist/hooks/use-is-mobile.d.ts.map +1 -0
- package/dist/hooks/use-is-mobile.js +20 -23
- package/dist/hooks/use-media-query.d.ts +2 -4
- package/dist/hooks/use-media-query.d.ts.map +1 -0
- package/dist/hooks/use-media-query.js +49 -46
- package/dist/hooks/use-mutation-observer.d.ts +3 -6
- package/dist/hooks/use-mutation-observer.d.ts.map +1 -0
- package/dist/hooks/use-mutation-observer.js +33 -34
- package/dist/hooks/use-pagination.d.ts +15 -22
- package/dist/hooks/use-pagination.d.ts.map +1 -0
- package/dist/hooks/use-pagination.js +99 -99
- package/dist/index.d.ts +131 -69
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +68 -69
- package/dist/primitives/checkbox-group.d.ts +84 -105
- package/dist/primitives/checkbox-group.d.ts.map +1 -0
- package/dist/primitives/checkbox-group.js +91 -105
- package/dist/primitives/input-number.d.ts +41 -51
- package/dist/primitives/input-number.d.ts.map +1 -0
- package/dist/primitives/input-number.js +417 -473
- package/dist/primitives/input.d.ts +43 -48
- package/dist/primitives/input.d.ts.map +1 -0
- package/dist/primitives/input.js +67 -66
- package/dist/primitives/progress-circle.d.ts +49 -79
- package/dist/primitives/progress-circle.d.ts.map +1 -0
- package/dist/primitives/progress-circle.js +134 -149
- package/package.json +17 -10
- package/{dist → src}/css/preset.css +1 -1
- /package/{dist → src}/css/amber.css +0 -0
- /package/{dist → src}/css/blue.css +0 -0
- /package/{dist → src}/css/cyan.css +0 -0
- /package/{dist → src}/css/emerald.css +0 -0
- /package/{dist → src}/css/fuchsia.css +0 -0
- /package/{dist → src}/css/gray.css +0 -0
- /package/{dist → src}/css/green.css +0 -0
- /package/{dist → src}/css/indigo.css +0 -0
- /package/{dist → src}/css/lime.css +0 -0
- /package/{dist → src}/css/neutral.css +0 -0
- /package/{dist → src}/css/orange.css +0 -0
- /package/{dist → src}/css/pink.css +0 -0
- /package/{dist → src}/css/purple.css +0 -0
- /package/{dist → src}/css/red.css +0 -0
- /package/{dist → src}/css/rose.css +0 -0
- /package/{dist → src}/css/sky.css +0 -0
- /package/{dist → src}/css/slate.css +0 -0
- /package/{dist → src}/css/stone.css +0 -0
- /package/{dist → src}/css/style.css +0 -0
- /package/{dist → src}/css/teal.css +0 -0
- /package/{dist → src}/css/violet.css +0 -0
- /package/{dist → src}/css/yellow.css +0 -0
- /package/{dist → src}/css/zinc.css +0 -0
package/dist/components/kbd.d.ts
CHANGED
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
import { ComponentProps, JSX } from "react";
|
|
2
|
-
|
|
3
|
-
//#region src/components/kbd.d.ts
|
|
1
|
+
import type { ComponentProps, JSX } from "react";
|
|
4
2
|
type KbdProps = ComponentProps<"kbd">;
|
|
5
|
-
declare function Kbd({
|
|
6
|
-
className,
|
|
7
|
-
...props
|
|
8
|
-
}: KbdProps): JSX.Element;
|
|
3
|
+
declare function Kbd({ className, ...props }: KbdProps): JSX.Element;
|
|
9
4
|
type KbdGroupProps = ComponentProps<"kbd">;
|
|
10
|
-
declare function KbdGroup({
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
//#endregion
|
|
15
|
-
export { Kbd, KbdGroup, type KbdGroupProps, type KbdProps };
|
|
5
|
+
declare function KbdGroup({ className, ...props }: KbdGroupProps): JSX.Element;
|
|
6
|
+
export { Kbd, KbdGroup };
|
|
7
|
+
export type { KbdGroupProps, KbdProps };
|
|
8
|
+
//# sourceMappingURL=kbd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kbd.d.ts","sourceRoot":"","sources":["../../src/components/kbd.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAQjD,KAAK,QAAQ,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAEtC,iBAAS,GAAG,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,QAAQ,GAAG,GAAG,CAAC,OAAO,CAa3D;AAED,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,GAAG,EAAE,QAAQ,EAAE,CAAC;AACzB,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,CAAC"}
|
package/dist/components/kbd.js
CHANGED
|
@@ -1,19 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { cn } from "@codefast/tailwind-variants";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
//#region src/components/kbd.tsx
|
|
4
3
|
function Kbd({ className, ...props }) {
|
|
5
|
-
|
|
6
|
-
className: cn("pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-md bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none", "[&_svg:not([class*='size-'])]:size-3", "[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10", className),
|
|
7
|
-
"data-slot": "kbd",
|
|
8
|
-
...props
|
|
9
|
-
});
|
|
4
|
+
return (_jsx("kbd", { className: cn("pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-md bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none", "[&_svg:not([class*='size-'])]:size-3", "[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10", className), "data-slot": "kbd", ...props }));
|
|
10
5
|
}
|
|
11
6
|
function KbdGroup({ className, ...props }) {
|
|
12
|
-
|
|
13
|
-
className: cn("inline-flex items-center gap-1", className),
|
|
14
|
-
"data-slot": "kbd-group",
|
|
15
|
-
...props
|
|
16
|
-
});
|
|
7
|
+
return (_jsx("kbd", { className: cn("inline-flex items-center gap-1", className), "data-slot": "kbd-group", ...props }));
|
|
17
8
|
}
|
|
18
|
-
|
|
9
|
+
/* -----------------------------------------------------------------------------
|
|
10
|
+
* Exports
|
|
11
|
+
* -------------------------------------------------------------------------- */
|
|
19
12
|
export { Kbd, KbdGroup };
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import { ComponentProps, JSX } from "react";
|
|
1
|
+
import type { ComponentProps, JSX } from "react";
|
|
2
2
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
3
|
-
|
|
4
|
-
//#region src/components/label.d.ts
|
|
5
3
|
type LabelProps = ComponentProps<typeof LabelPrimitive.Root>;
|
|
6
|
-
declare function Label({
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
//#endregion
|
|
11
|
-
export { Label, type LabelProps };
|
|
4
|
+
declare function Label({ className, ...props }: LabelProps): JSX.Element;
|
|
5
|
+
export { Label };
|
|
6
|
+
export type { LabelProps };
|
|
7
|
+
//# sourceMappingURL=label.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../src/components/label.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAGjD,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAC;AAMxD,KAAK,UAAU,GAAG,cAAc,CAAC,OAAO,cAAc,CAAC,IAAI,CAAC,CAAC;AAE7D,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,GAAG,GAAG,CAAC,OAAO,CAW/D;AAMD,OAAO,EAAE,KAAK,EAAE,CAAC;AACjB,YAAY,EAAE,UAAU,EAAE,CAAC"}
|
package/dist/components/label.js
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
3
|
import { cn } from "@codefast/tailwind-variants";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
5
|
-
//#region src/components/label.tsx
|
|
6
5
|
function Label({ className, ...props }) {
|
|
7
|
-
|
|
8
|
-
className: cn("inline-block text-sm leading-none font-medium group-data-disabled:opacity-50 peer-disabled:opacity-50 peer-aria-invalid:text-destructive peer-data-disabled:opacity-50 data-invalid:text-destructive", className),
|
|
9
|
-
"data-slot": "label",
|
|
10
|
-
...props
|
|
11
|
-
});
|
|
6
|
+
return (_jsx(LabelPrimitive.Root, { className: cn("inline-block text-sm leading-none font-medium group-data-disabled:opacity-50 peer-disabled:opacity-50 peer-aria-invalid:text-destructive peer-data-disabled:opacity-50 data-invalid:text-destructive", className), "data-slot": "label", ...props }));
|
|
12
7
|
}
|
|
13
|
-
|
|
8
|
+
/* -----------------------------------------------------------------------------
|
|
9
|
+
* Exports
|
|
10
|
+
* -------------------------------------------------------------------------- */
|
|
14
11
|
export { Label };
|
|
@@ -1,100 +1,44 @@
|
|
|
1
|
-
import { ComponentProps, JSX } from "react";
|
|
1
|
+
import type { ComponentProps, JSX } from "react";
|
|
2
2
|
import * as MenubarPrimitive from "@radix-ui/react-menubar";
|
|
3
|
-
|
|
4
|
-
//#region src/components/menubar.d.ts
|
|
5
3
|
type MenubarProps = ComponentProps<typeof MenubarPrimitive.Root>;
|
|
6
|
-
declare function Menubar({
|
|
7
|
-
className,
|
|
8
|
-
...props
|
|
9
|
-
}: MenubarProps): JSX.Element;
|
|
4
|
+
declare function Menubar({ className, ...props }: MenubarProps): JSX.Element;
|
|
10
5
|
type MenubarMenuProps = ComponentProps<typeof MenubarPrimitive.Menu>;
|
|
11
|
-
declare function MenubarMenu({
|
|
12
|
-
...props
|
|
13
|
-
}: MenubarMenuProps): JSX.Element;
|
|
6
|
+
declare function MenubarMenu({ ...props }: MenubarMenuProps): JSX.Element;
|
|
14
7
|
type MenubarGroupProps = ComponentProps<typeof MenubarPrimitive.Group>;
|
|
15
|
-
declare function MenubarGroup({
|
|
16
|
-
...props
|
|
17
|
-
}: MenubarGroupProps): JSX.Element;
|
|
8
|
+
declare function MenubarGroup({ ...props }: MenubarGroupProps): JSX.Element;
|
|
18
9
|
type MenubarSubProps = ComponentProps<typeof MenubarPrimitive.Sub>;
|
|
19
|
-
declare function MenubarSub({
|
|
20
|
-
...props
|
|
21
|
-
}: MenubarSubProps): JSX.Element;
|
|
10
|
+
declare function MenubarSub({ ...props }: MenubarSubProps): JSX.Element;
|
|
22
11
|
type MenubarRadioGroupProps = ComponentProps<typeof MenubarPrimitive.RadioGroup>;
|
|
23
|
-
declare function MenubarRadioGroup({
|
|
24
|
-
...props
|
|
25
|
-
}: MenubarRadioGroupProps): JSX.Element;
|
|
12
|
+
declare function MenubarRadioGroup({ ...props }: MenubarRadioGroupProps): JSX.Element;
|
|
26
13
|
type MenubarTriggerProps = ComponentProps<typeof MenubarPrimitive.Trigger>;
|
|
27
|
-
declare function MenubarTrigger({
|
|
28
|
-
className,
|
|
29
|
-
...props
|
|
30
|
-
}: MenubarTriggerProps): JSX.Element;
|
|
14
|
+
declare function MenubarTrigger({ className, ...props }: MenubarTriggerProps): JSX.Element;
|
|
31
15
|
interface MenubarSubTriggerProps extends ComponentProps<typeof MenubarPrimitive.SubTrigger> {
|
|
32
|
-
|
|
16
|
+
inset?: boolean;
|
|
33
17
|
}
|
|
34
|
-
declare function MenubarSubTrigger({
|
|
35
|
-
children,
|
|
36
|
-
className,
|
|
37
|
-
inset,
|
|
38
|
-
...props
|
|
39
|
-
}: MenubarSubTriggerProps): JSX.Element;
|
|
18
|
+
declare function MenubarSubTrigger({ children, className, inset, ...props }: MenubarSubTriggerProps): JSX.Element;
|
|
40
19
|
type MenubarSubContentProps = ComponentProps<typeof MenubarPrimitive.SubContent>;
|
|
41
|
-
declare function MenubarSubContent({
|
|
42
|
-
className,
|
|
43
|
-
...props
|
|
44
|
-
}: MenubarSubContentProps): JSX.Element;
|
|
20
|
+
declare function MenubarSubContent({ className, ...props }: MenubarSubContentProps): JSX.Element;
|
|
45
21
|
type MenubarContentProps = ComponentProps<typeof MenubarPrimitive.Content>;
|
|
46
|
-
declare function MenubarContent({
|
|
47
|
-
align,
|
|
48
|
-
alignOffset,
|
|
49
|
-
className,
|
|
50
|
-
sideOffset,
|
|
51
|
-
...props
|
|
52
|
-
}: MenubarContentProps): JSX.Element;
|
|
22
|
+
declare function MenubarContent({ align, alignOffset, className, sideOffset, ...props }: MenubarContentProps): JSX.Element;
|
|
53
23
|
interface MenubarItemProps extends ComponentProps<typeof MenubarPrimitive.Item> {
|
|
54
|
-
|
|
55
|
-
|
|
24
|
+
inset?: boolean;
|
|
25
|
+
variant?: "default" | "destructive";
|
|
56
26
|
}
|
|
57
|
-
declare function MenubarItem({
|
|
58
|
-
className,
|
|
59
|
-
inset,
|
|
60
|
-
variant,
|
|
61
|
-
...props
|
|
62
|
-
}: MenubarItemProps): JSX.Element;
|
|
27
|
+
declare function MenubarItem({ className, inset, variant, ...props }: MenubarItemProps): JSX.Element;
|
|
63
28
|
type MenubarCheckboxItemProps = ComponentProps<typeof MenubarPrimitive.CheckboxItem>;
|
|
64
|
-
declare function MenubarCheckboxItem({
|
|
65
|
-
checked,
|
|
66
|
-
children,
|
|
67
|
-
className,
|
|
68
|
-
...props
|
|
69
|
-
}: MenubarCheckboxItemProps): JSX.Element;
|
|
29
|
+
declare function MenubarCheckboxItem({ checked, children, className, ...props }: MenubarCheckboxItemProps): JSX.Element;
|
|
70
30
|
type MenubarRadioItemProps = ComponentProps<typeof MenubarPrimitive.RadioItem>;
|
|
71
|
-
declare function MenubarRadioItem({
|
|
72
|
-
children,
|
|
73
|
-
className,
|
|
74
|
-
...props
|
|
75
|
-
}: MenubarRadioItemProps): JSX.Element;
|
|
31
|
+
declare function MenubarRadioItem({ children, className, ...props }: MenubarRadioItemProps): JSX.Element;
|
|
76
32
|
interface MenubarLabelProps extends ComponentProps<typeof MenubarPrimitive.Label> {
|
|
77
|
-
|
|
33
|
+
inset?: boolean;
|
|
78
34
|
}
|
|
79
|
-
declare function MenubarLabel({
|
|
80
|
-
className,
|
|
81
|
-
inset,
|
|
82
|
-
...props
|
|
83
|
-
}: MenubarLabelProps): JSX.Element;
|
|
35
|
+
declare function MenubarLabel({ className, inset, ...props }: MenubarLabelProps): JSX.Element;
|
|
84
36
|
type MenubarSeparatorProps = ComponentProps<typeof MenubarPrimitive.Separator>;
|
|
85
|
-
declare function MenubarSeparator({
|
|
86
|
-
className,
|
|
87
|
-
...props
|
|
88
|
-
}: MenubarSeparatorProps): JSX.Element;
|
|
37
|
+
declare function MenubarSeparator({ className, ...props }: MenubarSeparatorProps): JSX.Element;
|
|
89
38
|
type MenubarShortcutProps = ComponentProps<"span">;
|
|
90
|
-
declare function MenubarShortcut({
|
|
91
|
-
className,
|
|
92
|
-
...props
|
|
93
|
-
}: MenubarShortcutProps): JSX.Element;
|
|
39
|
+
declare function MenubarShortcut({ className, ...props }: MenubarShortcutProps): JSX.Element;
|
|
94
40
|
type MenubarArrowProps = ComponentProps<typeof MenubarPrimitive.Arrow>;
|
|
95
|
-
declare function MenubarArrow({
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
//#endregion
|
|
100
|
-
export { Menubar, MenubarArrow, type MenubarArrowProps, MenubarCheckboxItem, type MenubarCheckboxItemProps, MenubarContent, type MenubarContentProps, MenubarGroup, type MenubarGroupProps, MenubarItem, type MenubarItemProps, MenubarLabel, type MenubarLabelProps, MenubarMenu, type MenubarMenuProps, type MenubarProps, MenubarRadioGroup, type MenubarRadioGroupProps, MenubarRadioItem, type MenubarRadioItemProps, MenubarSeparator, type MenubarSeparatorProps, MenubarShortcut, type MenubarShortcutProps, MenubarSub, MenubarSubContent, type MenubarSubContentProps, type MenubarSubProps, MenubarSubTrigger, type MenubarSubTriggerProps, MenubarTrigger, type MenubarTriggerProps };
|
|
41
|
+
declare function MenubarArrow({ className, ...props }: MenubarArrowProps): JSX.Element;
|
|
42
|
+
export { Menubar, MenubarArrow, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, };
|
|
43
|
+
export type { MenubarArrowProps, MenubarCheckboxItemProps, MenubarContentProps, MenubarGroupProps, MenubarItemProps, MenubarLabelProps, MenubarMenuProps, MenubarProps, MenubarRadioGroupProps, MenubarRadioItemProps, MenubarSeparatorProps, MenubarShortcutProps, MenubarSubContentProps, MenubarSubProps, MenubarSubTriggerProps, MenubarTriggerProps, };
|
|
44
|
+
//# sourceMappingURL=menubar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menubar.d.ts","sourceRoot":"","sources":["../../src/components/menubar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAGjD,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAO5D,KAAK,YAAY,GAAG,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,CAAC;AAEjE,iBAAS,OAAO,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO,CAQnE;AAMD,KAAK,gBAAgB,GAAG,cA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AAC,OAAO,gBAAgB,CAAC,SAAS,CAAC,CAAC;AAE/E,iBAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,qBAAqB,GAAG,GAAG,CAAC,OAAO,CAQrF;AAMD,KAAK,oBAAoB,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;AAEnD,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,GAAG,GAAG,CAAC,OAAO,CAWnF;AAMD,KAAK,iBAAiB,GAAG,cAAc,CAAC,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC;AAEvE,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAQ7E;AAMD,OAAO,EACL,OAAO,EACP,YAAY,EACZ,mBAAmB,EACnB,cAAc,EACd,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,UAAU,EACV,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,GACf,CAAC;AACF,YAAY,EACV,iBAAiB,EACjB,wBAAwB,EACxB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACtB,eAAe,EACf,sBAAsB,EACtB,mBAAmB,GACpB,CAAC"}
|
|
@@ -1,133 +1,57 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { cn } from "@codefast/tailwind-variants";
|
|
3
|
-
import { CheckIcon, ChevronRightIcon, DotIcon } from "lucide-react";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
4
|
import * as MenubarPrimitive from "@radix-ui/react-menubar";
|
|
6
|
-
|
|
5
|
+
import { CheckIcon, ChevronRightIcon, DotIcon } from "lucide-react";
|
|
7
6
|
function Menubar({ className, ...props }) {
|
|
8
|
-
|
|
9
|
-
className: cn("flex items-center space-x-1 rounded-lg border bg-background p-1", className),
|
|
10
|
-
"data-slot": "menubar",
|
|
11
|
-
...props
|
|
12
|
-
});
|
|
7
|
+
return (_jsx(MenubarPrimitive.Root, { className: cn("flex items-center space-x-1 rounded-lg border bg-background p-1", className), "data-slot": "menubar", ...props }));
|
|
13
8
|
}
|
|
14
9
|
function MenubarMenu({ ...props }) {
|
|
15
|
-
|
|
16
|
-
"data-slot": "menubar-menu",
|
|
17
|
-
...props
|
|
18
|
-
});
|
|
10
|
+
return _jsx(MenubarPrimitive.Menu, { "data-slot": "menubar-menu", ...props });
|
|
19
11
|
}
|
|
20
12
|
function MenubarGroup({ ...props }) {
|
|
21
|
-
|
|
22
|
-
"data-slot": "menubar-group",
|
|
23
|
-
...props
|
|
24
|
-
});
|
|
13
|
+
return _jsx(MenubarPrimitive.Group, { "data-slot": "menubar-group", ...props });
|
|
25
14
|
}
|
|
26
15
|
function MenubarSub({ ...props }) {
|
|
27
|
-
|
|
28
|
-
"data-slot": "menubar-sub",
|
|
29
|
-
...props
|
|
30
|
-
});
|
|
16
|
+
return _jsx(MenubarPrimitive.Sub, { "data-slot": "menubar-sub", ...props });
|
|
31
17
|
}
|
|
32
18
|
function MenubarRadioGroup({ ...props }) {
|
|
33
|
-
|
|
34
|
-
"data-slot": "menubar-radio-group",
|
|
35
|
-
...props
|
|
36
|
-
});
|
|
19
|
+
return _jsx(MenubarPrimitive.RadioGroup, { "data-slot": "menubar-radio-group", ...props });
|
|
37
20
|
}
|
|
38
21
|
function MenubarTrigger({ className, ...props }) {
|
|
39
|
-
|
|
40
|
-
className: cn("flex items-center gap-x-2 rounded-sm px-2 py-1.5 text-sm font-medium outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", className),
|
|
41
|
-
"data-slot": "menubar-trigger",
|
|
42
|
-
...props
|
|
43
|
-
});
|
|
22
|
+
return (_jsx(MenubarPrimitive.Trigger, { className: cn("flex items-center gap-x-2 rounded-sm px-2 py-1.5 text-sm font-medium outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", className), "data-slot": "menubar-trigger", ...props }));
|
|
44
23
|
}
|
|
45
24
|
function MenubarSubTrigger({ children, className, inset, ...props }) {
|
|
46
|
-
|
|
47
|
-
className: cn("flex cursor-default items-center gap-x-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", className),
|
|
48
|
-
"data-inset": inset,
|
|
49
|
-
"data-slot": "menubar-sub-trigger",
|
|
50
|
-
...props,
|
|
51
|
-
children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto size-4" })]
|
|
52
|
-
});
|
|
25
|
+
return (_jsxs(MenubarPrimitive.SubTrigger, { className: cn("flex cursor-default items-center gap-x-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", className), "data-inset": inset, "data-slot": "menubar-sub-trigger", ...props, children: [children, _jsx(ChevronRightIcon, { className: "ml-auto size-4" })] }));
|
|
53
26
|
}
|
|
54
27
|
function MenubarSubContent({ className, ...props }) {
|
|
55
|
-
|
|
56
|
-
className: cn("z-50 min-w-32 origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-lg border bg-popover p-1 text-popover-foreground shadow-lg ease-ui data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=top]:slide-in-from-bottom-2", className),
|
|
57
|
-
"data-slot": "menubar-sub-content",
|
|
58
|
-
...props
|
|
59
|
-
}) });
|
|
28
|
+
return (_jsx(MenubarPrimitive.Portal, { children: _jsx(MenubarPrimitive.SubContent, { className: cn("z-50 min-w-32 origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-lg border bg-popover p-1 text-popover-foreground shadow-lg ease-ui data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=top]:slide-in-from-bottom-2", className), "data-slot": "menubar-sub-content", ...props }) }));
|
|
60
29
|
}
|
|
61
30
|
function MenubarContent({ align = "start", alignOffset = -4, className, sideOffset = 4, ...props }) {
|
|
62
|
-
|
|
63
|
-
align,
|
|
64
|
-
alignOffset,
|
|
65
|
-
className: cn("z-50 min-w-32 origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-lg border bg-popover p-1 text-popover-foreground shadow-lg ease-ui data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=top]:slide-in-from-bottom-2", className),
|
|
66
|
-
"data-slot": "menubar-content",
|
|
67
|
-
sideOffset,
|
|
68
|
-
...props
|
|
69
|
-
}) });
|
|
31
|
+
return (_jsx(MenubarPrimitive.Portal, { children: _jsx(MenubarPrimitive.Content, { align: align, alignOffset: alignOffset, className: cn("z-50 min-w-32 origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-lg border bg-popover p-1 text-popover-foreground shadow-lg ease-ui data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=top]:slide-in-from-bottom-2", className), "data-slot": "menubar-content", sideOffset: sideOffset, ...props }) }));
|
|
70
32
|
}
|
|
71
33
|
function MenubarItem({ className, inset, variant, ...props }) {
|
|
72
|
-
|
|
73
|
-
className: cn("group/menubar-item relative flex cursor-default items-center gap-x-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground aria-disabled:opacity-50 data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 [&_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),
|
|
74
|
-
"data-inset": inset,
|
|
75
|
-
"data-slot": "menubar-item",
|
|
76
|
-
"data-variant": variant,
|
|
77
|
-
...props
|
|
78
|
-
});
|
|
34
|
+
return (_jsx(MenubarPrimitive.Item, { className: cn("group/menubar-item relative flex cursor-default items-center gap-x-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground aria-disabled:opacity-50 data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 [&_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-inset": inset, "data-slot": "menubar-item", "data-variant": variant, ...props }));
|
|
79
35
|
}
|
|
80
36
|
function MenubarCheckboxItem({ checked, children, className, ...props }) {
|
|
81
|
-
|
|
82
|
-
checked,
|
|
83
|
-
className: cn("group/menubar-item relative flex cursor-default items-center gap-x-2 rounded-sm py-1.5 pr-2 pl-8 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", className),
|
|
84
|
-
"data-slot": "menubar-checkbox-item",
|
|
85
|
-
...props,
|
|
86
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
87
|
-
className: "absolute left-2 flex items-center justify-center",
|
|
88
|
-
children: /* @__PURE__ */ jsx(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) })
|
|
89
|
-
}), children]
|
|
90
|
-
});
|
|
37
|
+
return (_jsxs(MenubarPrimitive.CheckboxItem, { checked: checked, className: cn("group/menubar-item relative flex cursor-default items-center gap-x-2 rounded-sm py-1.5 pr-2 pl-8 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", className), "data-slot": "menubar-checkbox-item", ...props, children: [_jsx("span", { className: "absolute left-2 flex items-center justify-center", children: _jsx(MenubarPrimitive.ItemIndicator, { children: _jsx(CheckIcon, { className: "size-4" }) }) }), children] }));
|
|
91
38
|
}
|
|
92
39
|
function MenubarRadioItem({ children, className, ...props }) {
|
|
93
|
-
|
|
94
|
-
className: cn("group/menubar-item relative flex cursor-default items-center gap-x-2 rounded-sm py-1.5 pr-2 pl-8 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", className),
|
|
95
|
-
"data-slot": "menubar-radio-item",
|
|
96
|
-
...props,
|
|
97
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
98
|
-
className: "absolute left-2 flex items-center justify-center",
|
|
99
|
-
children: /* @__PURE__ */ jsx(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(DotIcon, { className: "size-4 fill-current" }) })
|
|
100
|
-
}), children]
|
|
101
|
-
});
|
|
40
|
+
return (_jsxs(MenubarPrimitive.RadioItem, { className: cn("group/menubar-item relative flex cursor-default items-center gap-x-2 rounded-sm py-1.5 pr-2 pl-8 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", className), "data-slot": "menubar-radio-item", ...props, children: [_jsx("span", { className: "absolute left-2 flex items-center justify-center", children: _jsx(MenubarPrimitive.ItemIndicator, { children: _jsx(DotIcon, { className: "size-4 fill-current" }) }) }), children] }));
|
|
102
41
|
}
|
|
103
42
|
function MenubarLabel({ className, inset, ...props }) {
|
|
104
|
-
|
|
105
|
-
className: cn("flex items-center gap-x-2 px-2 py-1.5 text-sm font-semibold data-inset:pl-8", className),
|
|
106
|
-
"data-inset": inset,
|
|
107
|
-
"data-slot": "menubar-label",
|
|
108
|
-
...props
|
|
109
|
-
});
|
|
43
|
+
return (_jsx(MenubarPrimitive.Label, { className: cn("flex items-center gap-x-2 px-2 py-1.5 text-sm font-semibold data-inset:pl-8", className), "data-inset": inset, "data-slot": "menubar-label", ...props }));
|
|
110
44
|
}
|
|
111
45
|
function MenubarSeparator({ className, ...props }) {
|
|
112
|
-
|
|
113
|
-
className: cn("mx-2 my-1 h-px bg-border", className),
|
|
114
|
-
"data-slot": "menubar-separator",
|
|
115
|
-
...props
|
|
116
|
-
});
|
|
46
|
+
return (_jsx(MenubarPrimitive.Separator, { className: cn("mx-2 my-1 h-px bg-border", className), "data-slot": "menubar-separator", ...props }));
|
|
117
47
|
}
|
|
118
48
|
function MenubarShortcut({ className, ...props }) {
|
|
119
|
-
|
|
120
|
-
className: cn("ml-auto text-xs tracking-widest text-muted-foreground group-data-[variant=destructive]/menubar-item:text-destructive/80", className),
|
|
121
|
-
"data-slot": "menubar-shortcut",
|
|
122
|
-
...props
|
|
123
|
-
});
|
|
49
|
+
return (_jsx("span", { className: cn("ml-auto text-xs tracking-widest text-muted-foreground group-data-[variant=destructive]/menubar-item:text-destructive/80", className), "data-slot": "menubar-shortcut", ...props }));
|
|
124
50
|
}
|
|
125
51
|
function MenubarArrow({ className, ...props }) {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
132
|
-
//#endregion
|
|
133
|
-
export { Menubar, MenubarArrow, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger };
|
|
52
|
+
return (_jsx(MenubarPrimitive.Arrow, { className: cn("fill-popover", className), "data-slot": "menubar-arrow", ...props }));
|
|
53
|
+
}
|
|
54
|
+
/* -----------------------------------------------------------------------------
|
|
55
|
+
* Exports
|
|
56
|
+
* -------------------------------------------------------------------------- */
|
|
57
|
+
export { Menubar, MenubarArrow, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, };
|
|
@@ -1,19 +1,10 @@
|
|
|
1
|
-
import { ComponentProps, JSX } from "react";
|
|
2
|
-
|
|
3
|
-
//#region src/components/native-select.d.ts
|
|
1
|
+
import type { ComponentProps, JSX } from "react";
|
|
4
2
|
type NativeSelectProps = ComponentProps<"select">;
|
|
5
|
-
declare function NativeSelect({
|
|
6
|
-
className,
|
|
7
|
-
...props
|
|
8
|
-
}: NativeSelectProps): JSX.Element;
|
|
3
|
+
declare function NativeSelect({ className, ...props }: NativeSelectProps): JSX.Element;
|
|
9
4
|
type NativeSelectOptionProps = ComponentProps<"option">;
|
|
10
|
-
declare function NativeSelectOption({
|
|
11
|
-
...props
|
|
12
|
-
}: NativeSelectOptionProps): JSX.Element;
|
|
5
|
+
declare function NativeSelectOption({ ...props }: NativeSelectOptionProps): JSX.Element;
|
|
13
6
|
type NativeSelectOptGroupProps = ComponentProps<"optgroup">;
|
|
14
|
-
declare function NativeSelectOptGroup({
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
//#endregion
|
|
19
|
-
export { NativeSelect, NativeSelectOptGroup, type NativeSelectOptGroupProps, NativeSelectOption, type NativeSelectOptionProps, type NativeSelectProps };
|
|
7
|
+
declare function NativeSelectOptGroup({ className, ...props }: NativeSelectOptGroupProps): JSX.Element;
|
|
8
|
+
export { NativeSelect, NativeSelectOptGroup, NativeSelectOption };
|
|
9
|
+
export type { NativeSelectOptGroupProps, NativeSelectOptionProps, NativeSelectProps };
|
|
10
|
+
//# sourceMappingURL=native-select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native-select.d.ts","sourceRoot":"","sources":["../../src/components/native-select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AASjD,KAAK,iBAAiB,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC;AAElD,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAuB7E;AAMD,KAAK,uBAAuB,GAAG,cAAc,CAAC,QAAQ,CAAC,CAAC;AAExD,iBAAS,kBAAkB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,uBAAuB,GAAG,GAAG,CAAC,OAAO,CAE9E;AAMD,KAAK,yBAAyB,GAAG,cAAc,CAAC,UAAU,CAAC,CAAC;AAE5D,iBAAS,oBAAoB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,yBAAyB,GAAG,GAAG,CAAC,OAAO,CAE7F;AAMD,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,CAAC;AAClE,YAAY,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -1,34 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import { cn } from "@codefast/tailwind-variants";
|
|
2
3
|
import { ChevronDownIcon } from "lucide-react";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
//#region src/components/native-select.tsx
|
|
5
4
|
function NativeSelect({ className, ...props }) {
|
|
6
|
-
|
|
7
|
-
className: "group/native-select relative w-fit has-[select:disabled]:opacity-50",
|
|
8
|
-
"data-slot": "native-select-wrapper",
|
|
9
|
-
children: [/* @__PURE__ */ jsx("select", {
|
|
10
|
-
className: cn("h-9 w-full min-w-0 appearance-none rounded-lg border border-input bg-transparent px-3 py-2 pr-9 text-sm shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed dark:bg-input/30 dark:hover:bg-input/50", "focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50", "aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40", className),
|
|
11
|
-
"data-slot": "native-select",
|
|
12
|
-
...props
|
|
13
|
-
}), /* @__PURE__ */ jsx(ChevronDownIcon, {
|
|
14
|
-
"aria-hidden": "true",
|
|
15
|
-
className: "pointer-events-none absolute top-1/2 right-3.5 size-4 -translate-y-1/2 text-muted-foreground opacity-50 select-none",
|
|
16
|
-
"data-slot": "native-select-icon"
|
|
17
|
-
})]
|
|
18
|
-
});
|
|
5
|
+
return (_jsxs("div", { className: "group/native-select relative w-fit has-[select:disabled]:opacity-50", "data-slot": "native-select-wrapper", children: [_jsx("select", { className: cn("h-9 w-full min-w-0 appearance-none rounded-lg border border-input bg-transparent px-3 py-2 pr-9 text-sm shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed dark:bg-input/30 dark:hover:bg-input/50", "focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50", "aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40", className), "data-slot": "native-select", ...props }), _jsx(ChevronDownIcon, { "aria-hidden": "true", className: "pointer-events-none absolute top-1/2 right-3.5 size-4 -translate-y-1/2 text-muted-foreground opacity-50 select-none", "data-slot": "native-select-icon" })] }));
|
|
19
6
|
}
|
|
20
7
|
function NativeSelectOption({ ...props }) {
|
|
21
|
-
|
|
22
|
-
"data-slot": "native-select-option",
|
|
23
|
-
...props
|
|
24
|
-
});
|
|
8
|
+
return _jsx("option", { "data-slot": "native-select-option", ...props });
|
|
25
9
|
}
|
|
26
10
|
function NativeSelectOptGroup({ className, ...props }) {
|
|
27
|
-
|
|
28
|
-
className: cn(className),
|
|
29
|
-
"data-slot": "native-select-optgroup",
|
|
30
|
-
...props
|
|
31
|
-
});
|
|
11
|
+
return _jsx("optgroup", { className: cn(className), "data-slot": "native-select-optgroup", ...props });
|
|
32
12
|
}
|
|
33
|
-
|
|
13
|
+
/* -----------------------------------------------------------------------------
|
|
14
|
+
* Exports
|
|
15
|
+
* -------------------------------------------------------------------------- */
|
|
34
16
|
export { NativeSelect, NativeSelectOptGroup, NativeSelectOption };
|
|
@@ -1,44 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ComponentProps, JSX } from "react";
|
|
1
|
+
import type { ComponentProps, JSX } from "react";
|
|
3
2
|
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
|
4
|
-
|
|
5
|
-
//#region src/components/navigation-menu.d.ts
|
|
6
|
-
declare const navigationMenuTriggerVariants: _$_codefast_tailwind_variants0.VariantFunctionType<_$_codefast_tailwind_variants0.ConfigurationSchema, Record<string, never>>;
|
|
3
|
+
declare const navigationMenuTriggerVariants: import("@codefast/tailwind-variants").VariantFunctionType<import("@codefast/tailwind-variants").ConfigurationSchema, Record<string, never>>;
|
|
7
4
|
interface NavigationMenuProps extends ComponentProps<typeof NavigationMenuPrimitive.Root> {
|
|
8
|
-
|
|
5
|
+
viewport?: boolean;
|
|
9
6
|
}
|
|
10
|
-
declare function NavigationMenu({
|
|
11
|
-
children,
|
|
12
|
-
className,
|
|
13
|
-
viewport,
|
|
14
|
-
...props
|
|
15
|
-
}: NavigationMenuProps): JSX.Element;
|
|
7
|
+
declare function NavigationMenu({ children, className, viewport, ...props }: NavigationMenuProps): JSX.Element;
|
|
16
8
|
type NavigationMenuListProps = ComponentProps<typeof NavigationMenuPrimitive.List>;
|
|
17
|
-
declare function NavigationMenuList({
|
|
18
|
-
children,
|
|
19
|
-
className,
|
|
20
|
-
...props
|
|
21
|
-
}: NavigationMenuListProps): JSX.Element;
|
|
9
|
+
declare function NavigationMenuList({ children, className, ...props }: NavigationMenuListProps): JSX.Element;
|
|
22
10
|
type NavigationMenuItemProps = ComponentProps<typeof NavigationMenuPrimitive.Item>;
|
|
23
|
-
declare function NavigationMenuItem({
|
|
24
|
-
className,
|
|
25
|
-
...props
|
|
26
|
-
}: NavigationMenuItemProps): JSX.Element;
|
|
11
|
+
declare function NavigationMenuItem({ className, ...props }: NavigationMenuItemProps): JSX.Element;
|
|
27
12
|
type NavigationMenuTriggerProps = ComponentProps<typeof NavigationMenuPrimitive.Trigger>;
|
|
28
|
-
declare function NavigationMenuTrigger({
|
|
29
|
-
children,
|
|
30
|
-
className,
|
|
31
|
-
...props
|
|
32
|
-
}: NavigationMenuTriggerProps): JSX.Element;
|
|
13
|
+
declare function NavigationMenuTrigger({ children, className, ...props }: NavigationMenuTriggerProps): JSX.Element;
|
|
33
14
|
type NavigationMenuContentProps = ComponentProps<typeof NavigationMenuPrimitive.Content>;
|
|
34
|
-
declare function NavigationMenuContent({
|
|
35
|
-
className,
|
|
36
|
-
...props
|
|
37
|
-
}: NavigationMenuContentProps): JSX.Element;
|
|
15
|
+
declare function NavigationMenuContent({ className, ...props }: NavigationMenuContentProps): JSX.Element;
|
|
38
16
|
type NavigationMenuLinkProps = ComponentProps<typeof NavigationMenuPrimitive.Link>;
|
|
39
|
-
declare function NavigationMenuLink({
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
//#
|
|
44
|
-
export { NavigationMenu, NavigationMenuContent, type NavigationMenuContentProps, NavigationMenuItem, type NavigationMenuItemProps, NavigationMenuLink, type NavigationMenuLinkProps, NavigationMenuList, type NavigationMenuListProps, type NavigationMenuProps, NavigationMenuTrigger, type NavigationMenuTriggerProps, navigationMenuTriggerVariants };
|
|
17
|
+
declare function NavigationMenuLink({ className, ...props }: NavigationMenuLinkProps): JSX.Element;
|
|
18
|
+
export { navigationMenuTriggerVariants };
|
|
19
|
+
export { NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, };
|
|
20
|
+
export type { NavigationMenuContentProps, NavigationMenuItemProps, NavigationMenuLinkProps, NavigationMenuListProps, NavigationMenuProps, NavigationMenuTriggerProps, };
|
|
21
|
+
//# sourceMappingURL=navigation-menu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation-menu.d.ts","sourceRoot":"","sources":["../../src/components/navigation-menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAGjD,OAAO,KAAK,uBAAuB,MAAM,iCAAiC,CAAC;AAS3E,Q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