@nuvia/components 0.2.0 → 0.3.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/dist/hooks/use-mobile.d.cts +3 -0
- package/dist/hooks/use-mobile.d.ts +3 -0
- package/dist/hooks/use-toast.d.cts +49 -0
- package/dist/hooks/use-toast.d.ts +49 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +101 -0
- package/dist/index.d.ts +101 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/fonts.d.cts +3 -0
- package/dist/lib/fonts.d.ts +3 -0
- package/dist/lib/utils.d.cts +9 -0
- package/dist/lib/utils.d.ts +9 -0
- package/dist/providers/theme.d.cts +6 -0
- package/dist/providers/theme.d.ts +6 -0
- package/dist/ui/accordion.d.cts +9 -0
- package/dist/ui/accordion.d.ts +9 -0
- package/dist/ui/alert-dialog.d.cts +23 -0
- package/dist/ui/alert-dialog.d.ts +23 -0
- package/dist/ui/alert.d.cts +11 -0
- package/dist/ui/alert.d.ts +11 -0
- package/dist/ui/aspect-ratio.d.cts +6 -0
- package/dist/ui/aspect-ratio.d.ts +6 -0
- package/dist/ui/auto-complete.d.cts +40 -0
- package/dist/ui/auto-complete.d.ts +40 -0
- package/dist/ui/avatar.d.cts +8 -0
- package/dist/ui/avatar.d.ts +8 -0
- package/dist/ui/badge.d.cts +13 -0
- package/dist/ui/badge.d.ts +13 -0
- package/dist/ui/breadcrumb.d.cts +22 -0
- package/dist/ui/breadcrumb.d.ts +22 -0
- package/dist/ui/button.d.cts +14 -0
- package/dist/ui/button.d.ts +14 -0
- package/dist/ui/calendar.d.cts +11 -0
- package/dist/ui/calendar.d.ts +11 -0
- package/dist/ui/card.d.cts +10 -0
- package/dist/ui/card.d.ts +10 -0
- package/dist/ui/carousel.d.cts +23 -0
- package/dist/ui/carousel.d.ts +23 -0
- package/dist/ui/chart.d.cts +69 -0
- package/dist/ui/chart.d.ts +69 -0
- package/dist/ui/checkbox.d.cts +6 -0
- package/dist/ui/checkbox.d.ts +6 -0
- package/dist/ui/chip.d.cts +23 -0
- package/dist/ui/chip.d.ts +23 -0
- package/dist/ui/collapsible.d.cts +8 -0
- package/dist/ui/collapsible.d.ts +8 -0
- package/dist/ui/combobox.d.cts +21 -0
- package/dist/ui/combobox.d.ts +21 -0
- package/dist/ui/command.d.cts +83 -0
- package/dist/ui/command.d.ts +83 -0
- package/dist/ui/context-menu.d.cts +30 -0
- package/dist/ui/context-menu.d.ts +30 -0
- package/dist/ui/dialog.d.cts +24 -0
- package/dist/ui/dialog.d.ts +24 -0
- package/dist/ui/drawer.d.cts +27 -0
- package/dist/ui/drawer.d.ts +27 -0
- package/dist/ui/dropdown-menu.d.cts +31 -0
- package/dist/ui/dropdown-menu.d.ts +31 -0
- package/dist/ui/form.d.cts +31 -0
- package/dist/ui/form.d.ts +31 -0
- package/dist/ui/hover-card.d.cts +8 -0
- package/dist/ui/hover-card.d.ts +8 -0
- package/dist/ui/input-otp.d.cts +37 -0
- package/dist/ui/input-otp.d.ts +37 -0
- package/dist/ui/input.d.cts +5 -0
- package/dist/ui/input.d.ts +5 -0
- package/dist/ui/label.d.cts +10 -0
- package/dist/ui/label.d.ts +10 -0
- package/dist/ui/logo/index.d.cts +73 -0
- package/dist/ui/logo/index.d.ts +73 -0
- package/dist/ui/lottie-animation.d.cts +43 -0
- package/dist/ui/lottie-animation.d.ts +43 -0
- package/dist/ui/menubar.cjs.map +1 -1
- package/dist/ui/menubar.d.cts +31 -0
- package/dist/ui/menubar.d.ts +31 -0
- package/dist/ui/menubar.js.map +1 -1
- package/dist/ui/multi-combobox.d.cts +24 -0
- package/dist/ui/multi-combobox.d.ts +24 -0
- package/dist/ui/navigation-menu.d.cts +15 -0
- package/dist/ui/navigation-menu.d.ts +15 -0
- package/dist/ui/pagination.d.cts +33 -0
- package/dist/ui/pagination.d.ts +33 -0
- package/dist/ui/popover.d.cts +9 -0
- package/dist/ui/popover.d.ts +9 -0
- package/dist/ui/progress.d.cts +6 -0
- package/dist/ui/progress.d.ts +6 -0
- package/dist/ui/radio-group.d.cts +7 -0
- package/dist/ui/radio-group.d.ts +7 -0
- package/dist/ui/resizable.d.cts +27 -0
- package/dist/ui/resizable.d.ts +27 -0
- package/dist/ui/scroll-area.d.cts +7 -0
- package/dist/ui/scroll-area.d.ts +7 -0
- package/dist/ui/select.d.cts +15 -0
- package/dist/ui/select.d.ts +15 -0
- package/dist/ui/separator.d.cts +6 -0
- package/dist/ui/separator.d.ts +6 -0
- package/dist/ui/sheet.d.cts +29 -0
- package/dist/ui/sheet.d.ts +29 -0
- package/dist/ui/sidebar.d.cts +72 -0
- package/dist/ui/sidebar.d.ts +72 -0
- package/dist/ui/skeleton.d.cts +5 -0
- package/dist/ui/skeleton.d.ts +5 -0
- package/dist/ui/slider.d.cts +6 -0
- package/dist/ui/slider.d.ts +6 -0
- package/dist/ui/sonner.d.cts +8 -0
- package/dist/ui/sonner.d.ts +8 -0
- package/dist/ui/spinner.d.cts +12 -0
- package/dist/ui/spinner.d.ts +12 -0
- package/dist/ui/switch.d.cts +8 -0
- package/dist/ui/switch.d.ts +8 -0
- package/dist/ui/table.d.cts +15 -0
- package/dist/ui/table.d.ts +15 -0
- package/dist/ui/tabs.d.cts +14 -0
- package/dist/ui/tabs.d.ts +14 -0
- package/dist/ui/textarea.d.cts +5 -0
- package/dist/ui/textarea.d.ts +5 -0
- package/dist/ui/toast.d.cts +18 -0
- package/dist/ui/toast.d.ts +18 -0
- package/dist/ui/toaster.d.cts +5 -0
- package/dist/ui/toaster.d.ts +5 -0
- package/dist/ui/toggle-group.d.cts +15 -0
- package/dist/ui/toggle-group.d.ts +15 -0
- package/dist/ui/toggle.d.cts +15 -0
- package/dist/ui/toggle.d.ts +15 -0
- package/dist/ui/tooltip.d.cts +9 -0
- package/dist/ui/tooltip.d.ts +9 -0
- package/package.json +15 -13
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as input_otp from 'input-otp';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
|
|
5
|
+
value?: string;
|
|
6
|
+
onChange?: (newValue: string) => unknown;
|
|
7
|
+
maxLength: number;
|
|
8
|
+
textAlign?: "left" | "center" | "right";
|
|
9
|
+
onComplete?: (...args: any[]) => unknown;
|
|
10
|
+
pushPasswordManagerStrategy?: "increase-width" | "none";
|
|
11
|
+
pasteTransformer?: (pasted: string) => string;
|
|
12
|
+
containerClassName?: string;
|
|
13
|
+
noScriptCSSFallback?: string | null;
|
|
14
|
+
} & {
|
|
15
|
+
render: (props: input_otp.RenderProps) => React.ReactNode;
|
|
16
|
+
children?: never;
|
|
17
|
+
} & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
|
|
18
|
+
value?: string;
|
|
19
|
+
onChange?: (newValue: string) => unknown;
|
|
20
|
+
maxLength: number;
|
|
21
|
+
textAlign?: "left" | "center" | "right";
|
|
22
|
+
onComplete?: (...args: any[]) => unknown;
|
|
23
|
+
pushPasswordManagerStrategy?: "increase-width" | "none";
|
|
24
|
+
pasteTransformer?: (pasted: string) => string;
|
|
25
|
+
containerClassName?: string;
|
|
26
|
+
noScriptCSSFallback?: string | null;
|
|
27
|
+
} & {
|
|
28
|
+
render?: never;
|
|
29
|
+
children: React.ReactNode;
|
|
30
|
+
} & React.RefAttributes<HTMLInputElement>, "ref">) & React.RefAttributes<HTMLInputElement>>;
|
|
31
|
+
declare const InputOTPGroup: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
32
|
+
declare const InputOTPSlot: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
33
|
+
index: number;
|
|
34
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
35
|
+
declare const InputOTPSeparator: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
36
|
+
|
|
37
|
+
export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as input_otp from 'input-otp';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
|
|
5
|
+
value?: string;
|
|
6
|
+
onChange?: (newValue: string) => unknown;
|
|
7
|
+
maxLength: number;
|
|
8
|
+
textAlign?: "left" | "center" | "right";
|
|
9
|
+
onComplete?: (...args: any[]) => unknown;
|
|
10
|
+
pushPasswordManagerStrategy?: "increase-width" | "none";
|
|
11
|
+
pasteTransformer?: (pasted: string) => string;
|
|
12
|
+
containerClassName?: string;
|
|
13
|
+
noScriptCSSFallback?: string | null;
|
|
14
|
+
} & {
|
|
15
|
+
render: (props: input_otp.RenderProps) => React.ReactNode;
|
|
16
|
+
children?: never;
|
|
17
|
+
} & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
|
|
18
|
+
value?: string;
|
|
19
|
+
onChange?: (newValue: string) => unknown;
|
|
20
|
+
maxLength: number;
|
|
21
|
+
textAlign?: "left" | "center" | "right";
|
|
22
|
+
onComplete?: (...args: any[]) => unknown;
|
|
23
|
+
pushPasswordManagerStrategy?: "increase-width" | "none";
|
|
24
|
+
pasteTransformer?: (pasted: string) => string;
|
|
25
|
+
containerClassName?: string;
|
|
26
|
+
noScriptCSSFallback?: string | null;
|
|
27
|
+
} & {
|
|
28
|
+
render?: never;
|
|
29
|
+
children: React.ReactNode;
|
|
30
|
+
} & React.RefAttributes<HTMLInputElement>, "ref">) & React.RefAttributes<HTMLInputElement>>;
|
|
31
|
+
declare const InputOTPGroup: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
32
|
+
declare const InputOTPSlot: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
33
|
+
index: number;
|
|
34
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
35
|
+
declare const InputOTPSeparator: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
36
|
+
|
|
37
|
+
export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
|
|
6
|
+
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: ({
|
|
7
|
+
required?: boolean | null | undefined;
|
|
8
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
|
|
9
|
+
|
|
10
|
+
export { Label };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
|
|
6
|
+
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: ({
|
|
7
|
+
required?: boolean | null | undefined;
|
|
8
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
|
|
9
|
+
|
|
10
|
+
export { Label };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Color configuration for logo variants
|
|
5
|
+
*/
|
|
6
|
+
declare const colorConfig: {
|
|
7
|
+
readonly primary: {
|
|
8
|
+
readonly main: "#7F95E9";
|
|
9
|
+
readonly accent: "#A5AAE7";
|
|
10
|
+
};
|
|
11
|
+
readonly madrugada: {
|
|
12
|
+
readonly main: "#FFFFFF";
|
|
13
|
+
readonly accent: "#A5AAE7";
|
|
14
|
+
};
|
|
15
|
+
readonly zafiro: {
|
|
16
|
+
readonly main: "#4169E1";
|
|
17
|
+
readonly accent: "#7B9BF0";
|
|
18
|
+
};
|
|
19
|
+
readonly black: {
|
|
20
|
+
readonly main: "#09090B";
|
|
21
|
+
readonly accent: "#09090B";
|
|
22
|
+
};
|
|
23
|
+
readonly white: {
|
|
24
|
+
readonly main: "#FFFFFF";
|
|
25
|
+
readonly accent: "#FFFFFF";
|
|
26
|
+
};
|
|
27
|
+
readonly dark: {
|
|
28
|
+
readonly main: "#1E1E2E";
|
|
29
|
+
readonly accent: "#3D3D5C";
|
|
30
|
+
};
|
|
31
|
+
readonly medium: {
|
|
32
|
+
readonly main: "#6B7280";
|
|
33
|
+
readonly accent: "#9CA3AF";
|
|
34
|
+
};
|
|
35
|
+
readonly nimbus: {
|
|
36
|
+
readonly main: "#E5E7EB";
|
|
37
|
+
readonly accent: "#F3F4F6";
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Default sizes for each position
|
|
42
|
+
*/
|
|
43
|
+
declare const defaultSizes: {
|
|
44
|
+
horizontal: {
|
|
45
|
+
width: number;
|
|
46
|
+
height: number;
|
|
47
|
+
};
|
|
48
|
+
vertical: {
|
|
49
|
+
width: number;
|
|
50
|
+
height: number;
|
|
51
|
+
};
|
|
52
|
+
symbol: {
|
|
53
|
+
width: number;
|
|
54
|
+
height: number;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
type LogoColor = keyof typeof colorConfig;
|
|
58
|
+
type LogoPosition = "horizontal" | "vertical" | "symbol";
|
|
59
|
+
type LogoType = "solid" | "default" | "transparent";
|
|
60
|
+
type LogoProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
61
|
+
position?: LogoPosition;
|
|
62
|
+
type?: LogoType;
|
|
63
|
+
color?: LogoColor;
|
|
64
|
+
width?: number;
|
|
65
|
+
height?: number;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Nuvia Logo component with inline SVGs.
|
|
69
|
+
* Bundled with the package - no external assets required.
|
|
70
|
+
*/
|
|
71
|
+
declare function Logo({ className, position, type, color, width, height, ...props }: LogoProps): react_jsx_runtime.JSX.Element;
|
|
72
|
+
|
|
73
|
+
export { Logo, type LogoColor, type LogoPosition, type LogoProps, type LogoType, colorConfig, defaultSizes };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Color configuration for logo variants
|
|
5
|
+
*/
|
|
6
|
+
declare const colorConfig: {
|
|
7
|
+
readonly primary: {
|
|
8
|
+
readonly main: "#7F95E9";
|
|
9
|
+
readonly accent: "#A5AAE7";
|
|
10
|
+
};
|
|
11
|
+
readonly madrugada: {
|
|
12
|
+
readonly main: "#FFFFFF";
|
|
13
|
+
readonly accent: "#A5AAE7";
|
|
14
|
+
};
|
|
15
|
+
readonly zafiro: {
|
|
16
|
+
readonly main: "#4169E1";
|
|
17
|
+
readonly accent: "#7B9BF0";
|
|
18
|
+
};
|
|
19
|
+
readonly black: {
|
|
20
|
+
readonly main: "#09090B";
|
|
21
|
+
readonly accent: "#09090B";
|
|
22
|
+
};
|
|
23
|
+
readonly white: {
|
|
24
|
+
readonly main: "#FFFFFF";
|
|
25
|
+
readonly accent: "#FFFFFF";
|
|
26
|
+
};
|
|
27
|
+
readonly dark: {
|
|
28
|
+
readonly main: "#1E1E2E";
|
|
29
|
+
readonly accent: "#3D3D5C";
|
|
30
|
+
};
|
|
31
|
+
readonly medium: {
|
|
32
|
+
readonly main: "#6B7280";
|
|
33
|
+
readonly accent: "#9CA3AF";
|
|
34
|
+
};
|
|
35
|
+
readonly nimbus: {
|
|
36
|
+
readonly main: "#E5E7EB";
|
|
37
|
+
readonly accent: "#F3F4F6";
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Default sizes for each position
|
|
42
|
+
*/
|
|
43
|
+
declare const defaultSizes: {
|
|
44
|
+
horizontal: {
|
|
45
|
+
width: number;
|
|
46
|
+
height: number;
|
|
47
|
+
};
|
|
48
|
+
vertical: {
|
|
49
|
+
width: number;
|
|
50
|
+
height: number;
|
|
51
|
+
};
|
|
52
|
+
symbol: {
|
|
53
|
+
width: number;
|
|
54
|
+
height: number;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
type LogoColor = keyof typeof colorConfig;
|
|
58
|
+
type LogoPosition = "horizontal" | "vertical" | "symbol";
|
|
59
|
+
type LogoType = "solid" | "default" | "transparent";
|
|
60
|
+
type LogoProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
61
|
+
position?: LogoPosition;
|
|
62
|
+
type?: LogoType;
|
|
63
|
+
color?: LogoColor;
|
|
64
|
+
width?: number;
|
|
65
|
+
height?: number;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Nuvia Logo component with inline SVGs.
|
|
69
|
+
* Bundled with the package - no external assets required.
|
|
70
|
+
*/
|
|
71
|
+
declare function Logo({ className, position, type, color, width, height, ...props }: LogoProps): react_jsx_runtime.JSX.Element;
|
|
72
|
+
|
|
73
|
+
export { Logo, type LogoColor, type LogoPosition, type LogoProps, type LogoType, colorConfig, defaultSizes };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { LottieComponentProps } from 'lottie-react';
|
|
3
|
+
|
|
4
|
+
interface LottieAnimationProps extends Omit<LottieComponentProps, 'animationData'> {
|
|
5
|
+
/**
|
|
6
|
+
* Path to the Lottie animation JSON file
|
|
7
|
+
*/
|
|
8
|
+
animationPath: string;
|
|
9
|
+
/**
|
|
10
|
+
* Size of the animation (width and height)
|
|
11
|
+
*/
|
|
12
|
+
size?: number;
|
|
13
|
+
/**
|
|
14
|
+
* Additional CSS classes
|
|
15
|
+
*/
|
|
16
|
+
className?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Whether the animation should loop
|
|
19
|
+
*/
|
|
20
|
+
loop?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Whether the animation should autoplay
|
|
23
|
+
*/
|
|
24
|
+
autoplay?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Animation speed
|
|
27
|
+
*/
|
|
28
|
+
speed?: number;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* LottieAnimation component for displaying Lottie animations
|
|
32
|
+
*
|
|
33
|
+
* @param animationPath - Path to the Lottie animation JSON file
|
|
34
|
+
* @param size - Size of the animation container (default: 24)
|
|
35
|
+
* @param className - Additional CSS classes
|
|
36
|
+
* @param loop - Whether the animation should loop (default: true)
|
|
37
|
+
* @param autoplay - Whether the animation should autoplay (default: true)
|
|
38
|
+
* @param speed - Animation speed (default: 1)
|
|
39
|
+
* @param props - Additional Lottie component props
|
|
40
|
+
*/
|
|
41
|
+
declare const LottieAnimation: React.ForwardRefExoticComponent<Omit<LottieAnimationProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
42
|
+
|
|
43
|
+
export { LottieAnimation, type LottieAnimationProps };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { LottieComponentProps } from 'lottie-react';
|
|
3
|
+
|
|
4
|
+
interface LottieAnimationProps extends Omit<LottieComponentProps, 'animationData'> {
|
|
5
|
+
/**
|
|
6
|
+
* Path to the Lottie animation JSON file
|
|
7
|
+
*/
|
|
8
|
+
animationPath: string;
|
|
9
|
+
/**
|
|
10
|
+
* Size of the animation (width and height)
|
|
11
|
+
*/
|
|
12
|
+
size?: number;
|
|
13
|
+
/**
|
|
14
|
+
* Additional CSS classes
|
|
15
|
+
*/
|
|
16
|
+
className?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Whether the animation should loop
|
|
19
|
+
*/
|
|
20
|
+
loop?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Whether the animation should autoplay
|
|
23
|
+
*/
|
|
24
|
+
autoplay?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Animation speed
|
|
27
|
+
*/
|
|
28
|
+
speed?: number;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* LottieAnimation component for displaying Lottie animations
|
|
32
|
+
*
|
|
33
|
+
* @param animationPath - Path to the Lottie animation JSON file
|
|
34
|
+
* @param size - Size of the animation container (default: 24)
|
|
35
|
+
* @param className - Additional CSS classes
|
|
36
|
+
* @param loop - Whether the animation should loop (default: true)
|
|
37
|
+
* @param autoplay - Whether the animation should autoplay (default: true)
|
|
38
|
+
* @param speed - Animation speed (default: 1)
|
|
39
|
+
* @param props - Additional Lottie component props
|
|
40
|
+
*/
|
|
41
|
+
declare const LottieAnimation: React.ForwardRefExoticComponent<Omit<LottieAnimationProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
42
|
+
|
|
43
|
+
export { LottieAnimation, type LottieAnimationProps };
|
package/dist/ui/menubar.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/utils.ts","../../src/ui/menubar.tsx"],"names":["twMerge","clsx","MenubarPrimitive","React","jsx","jsxs","ChevronRightIcon","CheckIcon","DotFilledIcon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKO,IAAM,KAAK,CAAA,GAAI,MAAA,KAAiCA,qBAAA,CAAQC,SAAA,CAAK,MAAM,CAAC,CAAA;ACG3E,IAAM,WAAA,GAA+BC,2BAAA,CAAA;AAErC,IAAM,YAAA,GAAgCA,2BAAA,CAAA;AAEtC,IAAM,aAAA,GAAiCA,2BAAA,CAAA;AAEvC,IAAM,UAAA,GAA8BA,2BAAA,CAAA;AAEpC,IAAM,iBAAA,GAAqCA,2BAAA,CAAA;AAE3C,IAAM,OAAA,GAAgBC,4BAGpB,CAAC,EAAE,WAAW,GAAG,KAAA,IAAS,GAAA,qBAC1BC,cAAA;AAAA,EAAkBF,2BAAA,CAAA,IAAA;AAAA,EAAjB;AAAA,IACC,GAAA;AAAA,IACA,SAAA,EAAW,EAAA;AAAA,MACT,+EAAA;AAAA,MACA;AAAA,KACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,OAAA,CAAQ,cAA+BA,2BAAA,CAAA,IAAA,CAAK,WAAA;AAE5C,IAAM,cAAA,GAAuBC,4BAG3B,CAAC,EAAE,WAAW,GAAG,KAAA,IAAS,GAAA,qBAC1BC,cAAA;AAAA,EAAkBF,2BAAA,CAAA,OAAA;AAAA,EAAjB;AAAA,IACC,GAAA;AAAA,IACA,SAAA,EAAW,EAAA;AAAA,MACT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AAA;AAAA,IAClD,GAAG;AAAA;AACN,CACD;AACD,gBAAA,CAAiB,cAA+BA,2BAAA,CAAA,SAAA,CAAU,WAAA;AAE1D,IAAM,kBAAkB,CAAC;AAAA,EACvB,SAAA;AAAA,EACA,GAAG;AACL,CAAA,KAA6C;AAC3C,EAAA,uBACEE,cAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,EAAA;AAAA,QACT,uDAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ;AACA,eAAA,CAAgB,WAAA,GAAc,iBAAA","file":"menubar.cjs","sourcesContent":["import { clsx } from \"clsx\";\nimport type { ClassValue } from \"clsx\";\nimport { toast } from \"sonner\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport const cn = (...inputs: ClassValue[]): string => twMerge(clsx(inputs));\n\nexport const capitalize = (str: string) =>\n str?.charAt(0)?.toUpperCase() + str?.slice(1);\n\nexport const handleError = (error: { message: string }): void => {\n toast.error(error.message);\n};\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as MenubarPrimitive from \"@radix-ui/react-menubar\"\nimport * as ReactContext from \"@radix-ui/react-context\";\nimport { cn } from \"../lib/utils\"\nimport { CheckIcon, ChevronRightIcon, DotFilledIcon } from \"@radix-ui/react-icons\"\n\nconst MenubarMenu = MenubarPrimitive.Menu\n\nconst MenubarGroup = MenubarPrimitive.Group\n\nconst MenubarPortal = MenubarPrimitive.Portal\n\nconst MenubarSub = MenubarPrimitive.Sub\n\nconst MenubarRadioGroup = MenubarPrimitive.RadioGroup\n\nconst Menubar = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Root\n ref={ref}\n className={cn(\n \"flex h-9 items-center space-x-1 rounded-xl border bg-background p-1 shadow-sm\",\n className\n )}\n {...props}\n />\n))\nMenubar.displayName = MenubarPrimitive.Root.displayName\n\nconst MenubarTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Trigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-lg px-3 py-1 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\",\n className\n )}\n {...props}\n />\n))\nMenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName\n\nconst MenubarSubTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => (\n <MenubarPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-lg px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto h-4 w-4\" />\n </MenubarPrimitive.SubTrigger>\n))\nMenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName\n\nconst MenubarSubContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.SubContent\n ref={ref}\n className={cn(\n \"z-50 min-w-[8rem] overflow-hidden rounded-xl border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n))\nMenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName\n\nconst MenubarContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>\n>(\n (\n { className, align = \"start\", alignOffset = -4, sideOffset = 8, ...props },\n ref\n ) => (\n <MenubarPrimitive.Portal>\n <MenubarPrimitive.Content\n ref={ref}\n align={align}\n alignOffset={alignOffset}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 min-w-[12rem] overflow-hidden rounded-xl border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n </MenubarPrimitive.Portal>\n )\n)\nMenubarContent.displayName = MenubarPrimitive.Content.displayName\n\nconst MenubarItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-lg px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n))\nMenubarItem.displayName = MenubarPrimitive.Item.displayName\n\nconst MenubarCheckboxItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <MenubarPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-lg py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <CheckIcon className=\"h-4 w-4\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.CheckboxItem>\n))\nMenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName\n\nconst MenubarRadioItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <MenubarPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-lg py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <DotFilledIcon className=\"h-4 w-4 fill-current\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.RadioItem>\n))\nMenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName\n\nconst MenubarLabel = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Label\n ref={ref}\n className={cn(\n \"px-2 py-1.5 text-sm font-semibold\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n))\nMenubarLabel.displayName = MenubarPrimitive.Label.displayName\n\nconst MenubarSeparator = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n))\nMenubarSeparator.displayName = MenubarPrimitive.Separator.displayName\n\nconst MenubarShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\n \"ml-auto text-xs tracking-widest text-muted-foreground\",\n className\n )}\n {...props}\n />\n )\n}\nMenubarShortcut.displayname = \"MenubarShortcut\"\n\nexport {\n Menubar,\n MenubarMenu,\n MenubarTrigger,\n MenubarContent,\n MenubarItem,\n MenubarSeparator,\n MenubarLabel,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarPortal,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarGroup,\n MenubarSub,\n MenubarShortcut,\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../../src/lib/utils.ts","../../src/ui/menubar.tsx"],"names":["twMerge","clsx","MenubarPrimitive","React","jsx","jsxs","ChevronRightIcon","CheckIcon","DotFilledIcon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKO,IAAM,KAAK,CAAA,GAAI,MAAA,KAAiCA,qBAAA,CAAQC,SAAA,CAAK,MAAM,CAAC,CAAA;ACE3E,IAAM,WAAA,GAA6DC,2BAAA,CAAA;AAEnE,IAAM,YAAA,GAA+DA,2BAAA,CAAA;AAErE,IAAM,aAAA,GAAiEA,2BAAA,CAAA;AAEvE,IAAM,UAAA,GAA2DA,2BAAA,CAAA;AAEjE,IAAM,iBAAA,GAAyEA,2BAAA,CAAA;AAE/E,IAAM,OAAA,GAAgBC,4BAGpB,CAAC,EAAE,WAAW,GAAG,KAAA,IAAS,GAAA,qBAC1BC,cAAA;AAAA,EAAkBF,2BAAA,CAAA,IAAA;AAAA,EAAjB;AAAA,IACC,GAAA;AAAA,IACA,SAAA,EAAW,EAAA;AAAA,MACT,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;AAAA,KACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,YAAA,CAAa,cAA+BA,2BAAA,CAAA,KAAA,CAAM,WAAA;AAElD,IAAM,gBAAA,GAAyBC,4BAG7B,CAAC,EAAE,WAAW,GAAG,KAAA,IAAS,GAAA,qBAC1BC,cAAA;AAAA,EAAkBF,2BAAA,CAAA,SAAA;AAAA,EAAjB;AAAA,IACC,GAAA;AAAA,IACA,SAAA,EAAW,EAAA,CAAG,0BAAA,EAA4B,SAAS,CAAA;AAAA,IAClD,GAAG;AAAA;AACN,CACD;AACD,gBAAA,CAAiB,cAA+BA,2BAAA,CAAA,SAAA,CAAU,WAAA;AAE1D,IAAM,kBAAkB,CAAC;AAAA,EACvB,SAAA;AAAA,EACA,GAAG;AACL,CAAA,KAA6C;AAC3C,EAAA,uBACEE,cAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,EAAA;AAAA,QACT,uDAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ;AACA,eAAA,CAAgB,WAAA,GAAc,iBAAA","file":"menubar.cjs","sourcesContent":["import { clsx } from \"clsx\";\nimport type { ClassValue } from \"clsx\";\nimport { toast } from \"sonner\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport const cn = (...inputs: ClassValue[]): string => twMerge(clsx(inputs));\n\nexport const capitalize = (str: string) =>\n str?.charAt(0)?.toUpperCase() + str?.slice(1);\n\nexport const handleError = (error: { message: string }): void => {\n toast.error(error.message);\n};\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as MenubarPrimitive from \"@radix-ui/react-menubar\"\nimport { cn } from \"../lib/utils\"\nimport { CheckIcon, ChevronRightIcon, DotFilledIcon } from \"@radix-ui/react-icons\"\n\nconst MenubarMenu: typeof MenubarPrimitive.Menu = MenubarPrimitive.Menu\n\nconst MenubarGroup: typeof MenubarPrimitive.Group = MenubarPrimitive.Group\n\nconst MenubarPortal: typeof MenubarPrimitive.Portal = MenubarPrimitive.Portal\n\nconst MenubarSub: typeof MenubarPrimitive.Sub = MenubarPrimitive.Sub\n\nconst MenubarRadioGroup: typeof MenubarPrimitive.RadioGroup = MenubarPrimitive.RadioGroup\n\nconst Menubar = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Root\n ref={ref}\n className={cn(\n \"flex h-9 items-center space-x-1 rounded-xl border bg-background p-1 shadow-sm\",\n className\n )}\n {...props}\n />\n))\nMenubar.displayName = MenubarPrimitive.Root.displayName\n\nconst MenubarTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Trigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-lg px-3 py-1 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\",\n className\n )}\n {...props}\n />\n))\nMenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName\n\nconst MenubarSubTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => (\n <MenubarPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-lg px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto h-4 w-4\" />\n </MenubarPrimitive.SubTrigger>\n))\nMenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName\n\nconst MenubarSubContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.SubContent\n ref={ref}\n className={cn(\n \"z-50 min-w-[8rem] overflow-hidden rounded-xl border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n))\nMenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName\n\nconst MenubarContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>\n>(\n (\n { className, align = \"start\", alignOffset = -4, sideOffset = 8, ...props },\n ref\n ) => (\n <MenubarPrimitive.Portal>\n <MenubarPrimitive.Content\n ref={ref}\n align={align}\n alignOffset={alignOffset}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 min-w-[12rem] overflow-hidden rounded-xl border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n </MenubarPrimitive.Portal>\n )\n)\nMenubarContent.displayName = MenubarPrimitive.Content.displayName\n\nconst MenubarItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-lg px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n))\nMenubarItem.displayName = MenubarPrimitive.Item.displayName\n\nconst MenubarCheckboxItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <MenubarPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-lg py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <CheckIcon className=\"h-4 w-4\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.CheckboxItem>\n))\nMenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName\n\nconst MenubarRadioItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <MenubarPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-lg py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <DotFilledIcon className=\"h-4 w-4 fill-current\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.RadioItem>\n))\nMenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName\n\nconst MenubarLabel = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Label\n ref={ref}\n className={cn(\n \"px-2 py-1.5 text-sm font-semibold\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n))\nMenubarLabel.displayName = MenubarPrimitive.Label.displayName\n\nconst MenubarSeparator = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n))\nMenubarSeparator.displayName = MenubarPrimitive.Separator.displayName\n\nconst MenubarShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\n \"ml-auto text-xs tracking-widest text-muted-foreground\",\n className\n )}\n {...props}\n />\n )\n}\nMenubarShortcut.displayname = \"MenubarShortcut\"\n\nexport {\n Menubar,\n MenubarMenu,\n MenubarTrigger,\n MenubarContent,\n MenubarItem,\n MenubarSeparator,\n MenubarLabel,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarPortal,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarGroup,\n MenubarSub,\n MenubarShortcut,\n}\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import * as MenubarPrimitive from '@radix-ui/react-menubar';
|
|
4
|
+
|
|
5
|
+
declare const MenubarMenu: typeof MenubarPrimitive.Menu;
|
|
6
|
+
declare const MenubarGroup: typeof MenubarPrimitive.Group;
|
|
7
|
+
declare const MenubarPortal: typeof MenubarPrimitive.Portal;
|
|
8
|
+
declare const MenubarSub: typeof MenubarPrimitive.Sub;
|
|
9
|
+
declare const MenubarRadioGroup: typeof MenubarPrimitive.RadioGroup;
|
|
10
|
+
declare const Menubar: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
declare const MenubarTrigger: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
12
|
+
declare const MenubarSubTrigger: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
13
|
+
inset?: boolean;
|
|
14
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
declare const MenubarSubContent: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
declare const MenubarContent: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
declare const MenubarItem: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
18
|
+
inset?: boolean;
|
|
19
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
+
declare const MenubarCheckboxItem: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
21
|
+
declare const MenubarRadioItem: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
declare const MenubarLabel: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
23
|
+
inset?: boolean;
|
|
24
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
25
|
+
declare const MenubarSeparator: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
26
|
+
declare const MenubarShortcut: {
|
|
27
|
+
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): react_jsx_runtime.JSX.Element;
|
|
28
|
+
displayname: string;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export { Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import * as MenubarPrimitive from '@radix-ui/react-menubar';
|
|
4
|
+
|
|
5
|
+
declare const MenubarMenu: typeof MenubarPrimitive.Menu;
|
|
6
|
+
declare const MenubarGroup: typeof MenubarPrimitive.Group;
|
|
7
|
+
declare const MenubarPortal: typeof MenubarPrimitive.Portal;
|
|
8
|
+
declare const MenubarSub: typeof MenubarPrimitive.Sub;
|
|
9
|
+
declare const MenubarRadioGroup: typeof MenubarPrimitive.RadioGroup;
|
|
10
|
+
declare const Menubar: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
declare const MenubarTrigger: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
12
|
+
declare const MenubarSubTrigger: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
13
|
+
inset?: boolean;
|
|
14
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
declare const MenubarSubContent: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
declare const MenubarContent: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
declare const MenubarItem: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
18
|
+
inset?: boolean;
|
|
19
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
+
declare const MenubarCheckboxItem: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
21
|
+
declare const MenubarRadioItem: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
declare const MenubarLabel: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
23
|
+
inset?: boolean;
|
|
24
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
25
|
+
declare const MenubarSeparator: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
26
|
+
declare const MenubarShortcut: {
|
|
27
|
+
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): react_jsx_runtime.JSX.Element;
|
|
28
|
+
displayname: string;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export { Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger };
|
package/dist/ui/menubar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/utils.ts","../../src/ui/menubar.tsx"],"names":[],"mappings":";;;;;;;;AAKO,IAAM,KAAK,CAAA,GAAI,MAAA,KAAiC,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;ACG3E,IAAM,WAAA,GAA+B,gBAAA,CAAA;AAErC,IAAM,YAAA,GAAgC,gBAAA,CAAA;AAEtC,IAAM,aAAA,GAAiC,gBAAA,CAAA;AAEvC,IAAM,UAAA,GAA8B,gBAAA,CAAA;AAEpC,IAAM,iBAAA,GAAqC,gBAAA,CAAA;AAE3C,IAAM,OAAA,GAAgB,iBAGpB,CAAC,EAAE,WAAW,GAAG,KAAA,IAAS,GAAA,qBAC1B,GAAA;AAAA,EAAkB,gBAAA,CAAA,IAAA;AAAA,EAAjB;AAAA,IACC,GAAA;AAAA,IACA,SAAA,EAAW,EAAA;AAAA,MACT,+EAAA;AAAA,MACA;AAAA,KACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,OAAA,CAAQ,cAA+B,gBAAA,CAAA,IAAA,CAAK,WAAA;AAE5C,IAAM,cAAA,GAAuB,iBAG3B,CAAC,EAAE,WAAW,GAAG,KAAA,IAAS,GAAA,qBAC1B,GAAA;AAAA,EAAkB,gBAAA,CAAA,OAAA;AAAA,EAAjB;AAAA,IACC,GAAA;AAAA,IACA,SAAA,EAAW,EAAA;AAAA,MACT,sNAAA;AAAA,MACA;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SAAA,CAAU,WAAA;AAE1D,IAAM,kBAAkB,CAAC;AAAA,EACvB,SAAA;AAAA,EACA,GAAG;AACL,CAAA,KAA6C;AAC3C,EAAA,uBACE,GAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,EAAA;AAAA,QACT,uDAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ;AACA,eAAA,CAAgB,WAAA,GAAc,iBAAA","file":"menubar.js","sourcesContent":["import { clsx } from \"clsx\";\nimport type { ClassValue } from \"clsx\";\nimport { toast } from \"sonner\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport const cn = (...inputs: ClassValue[]): string => twMerge(clsx(inputs));\n\nexport const capitalize = (str: string) =>\n str?.charAt(0)?.toUpperCase() + str?.slice(1);\n\nexport const handleError = (error: { message: string }): void => {\n toast.error(error.message);\n};\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as MenubarPrimitive from \"@radix-ui/react-menubar\"\nimport * as ReactContext from \"@radix-ui/react-context\";\nimport { cn } from \"../lib/utils\"\nimport { CheckIcon, ChevronRightIcon, DotFilledIcon } from \"@radix-ui/react-icons\"\n\nconst MenubarMenu = MenubarPrimitive.Menu\n\nconst MenubarGroup = MenubarPrimitive.Group\n\nconst MenubarPortal = MenubarPrimitive.Portal\n\nconst MenubarSub = MenubarPrimitive.Sub\n\nconst MenubarRadioGroup = MenubarPrimitive.RadioGroup\n\nconst Menubar = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Root\n ref={ref}\n className={cn(\n \"flex h-9 items-center space-x-1 rounded-xl border bg-background p-1 shadow-sm\",\n className\n )}\n {...props}\n />\n))\nMenubar.displayName = MenubarPrimitive.Root.displayName\n\nconst MenubarTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Trigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-lg px-3 py-1 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\",\n className\n )}\n {...props}\n />\n))\nMenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName\n\nconst MenubarSubTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => (\n <MenubarPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-lg px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto h-4 w-4\" />\n </MenubarPrimitive.SubTrigger>\n))\nMenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName\n\nconst MenubarSubContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.SubContent\n ref={ref}\n className={cn(\n \"z-50 min-w-[8rem] overflow-hidden rounded-xl border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n))\nMenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName\n\nconst MenubarContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>\n>(\n (\n { className, align = \"start\", alignOffset = -4, sideOffset = 8, ...props },\n ref\n ) => (\n <MenubarPrimitive.Portal>\n <MenubarPrimitive.Content\n ref={ref}\n align={align}\n alignOffset={alignOffset}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 min-w-[12rem] overflow-hidden rounded-xl border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n </MenubarPrimitive.Portal>\n )\n)\nMenubarContent.displayName = MenubarPrimitive.Content.displayName\n\nconst MenubarItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-lg px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n))\nMenubarItem.displayName = MenubarPrimitive.Item.displayName\n\nconst MenubarCheckboxItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <MenubarPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-lg py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <CheckIcon className=\"h-4 w-4\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.CheckboxItem>\n))\nMenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName\n\nconst MenubarRadioItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <MenubarPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-lg py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <DotFilledIcon className=\"h-4 w-4 fill-current\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.RadioItem>\n))\nMenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName\n\nconst MenubarLabel = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Label\n ref={ref}\n className={cn(\n \"px-2 py-1.5 text-sm font-semibold\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n))\nMenubarLabel.displayName = MenubarPrimitive.Label.displayName\n\nconst MenubarSeparator = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n))\nMenubarSeparator.displayName = MenubarPrimitive.Separator.displayName\n\nconst MenubarShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\n \"ml-auto text-xs tracking-widest text-muted-foreground\",\n className\n )}\n {...props}\n />\n )\n}\nMenubarShortcut.displayname = \"MenubarShortcut\"\n\nexport {\n Menubar,\n MenubarMenu,\n MenubarTrigger,\n MenubarContent,\n MenubarItem,\n MenubarSeparator,\n MenubarLabel,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarPortal,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarGroup,\n MenubarSub,\n MenubarShortcut,\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../../src/lib/utils.ts","../../src/ui/menubar.tsx"],"names":[],"mappings":";;;;;;;;AAKO,IAAM,KAAK,CAAA,GAAI,MAAA,KAAiC,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;ACE3E,IAAM,WAAA,GAA6D,gBAAA,CAAA;AAEnE,IAAM,YAAA,GAA+D,gBAAA,CAAA;AAErE,IAAM,aAAA,GAAiE,gBAAA,CAAA;AAEvE,IAAM,UAAA,GAA2D,gBAAA,CAAA;AAEjE,IAAM,iBAAA,GAAyE,gBAAA,CAAA;AAE/E,IAAM,OAAA,GAAgB,iBAGpB,CAAC,EAAE,WAAW,GAAG,KAAA,IAAS,GAAA,qBAC1B,GAAA;AAAA,EAAkB,gBAAA,CAAA,IAAA;AAAA,EAAjB;AAAA,IACC,GAAA;AAAA,IACA,SAAA,EAAW,EAAA;AAAA,MACT,+EAAA;AAAA,MACA;AAAA,KACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,OAAA,CAAQ,cAA+B,gBAAA,CAAA,IAAA,CAAK,WAAA;AAE5C,IAAM,cAAA,GAAuB,iBAG3B,CAAC,EAAE,WAAW,GAAG,KAAA,IAAS,G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AAA;AAAA,IACA,SAAA,EAAW,EAAA,CAAG,0BAAA,EAA4B,SAAS,CAAA;AAAA,IAClD,GAAG;AAAA;AACN,CACD;AACD,gBAAA,CAAiB,cAA+B,gBAAA,CAAA,SAAA,CAAU,WAAA;AAE1D,IAAM,kBAAkB,CAAC;AAAA,EACvB,SAAA;AAAA,EACA,GAAG;AACL,CAAA,KAA6C;AAC3C,EAAA,uBACE,GAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,EAAA;AAAA,QACT,uDAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ;AACA,eAAA,CAAgB,WAAA,GAAc,iBAAA","file":"menubar.js","sourcesContent":["import { clsx } from \"clsx\";\nimport type { ClassValue } from \"clsx\";\nimport { toast } from \"sonner\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport const cn = (...inputs: ClassValue[]): string => twMerge(clsx(inputs));\n\nexport const capitalize = (str: string) =>\n str?.charAt(0)?.toUpperCase() + str?.slice(1);\n\nexport const handleError = (error: { message: string }): void => {\n toast.error(error.message);\n};\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as MenubarPrimitive from \"@radix-ui/react-menubar\"\nimport { cn } from \"../lib/utils\"\nimport { CheckIcon, ChevronRightIcon, DotFilledIcon } from \"@radix-ui/react-icons\"\n\nconst MenubarMenu: typeof MenubarPrimitive.Menu = MenubarPrimitive.Menu\n\nconst MenubarGroup: typeof MenubarPrimitive.Group = MenubarPrimitive.Group\n\nconst MenubarPortal: typeof MenubarPrimitive.Portal = MenubarPrimitive.Portal\n\nconst MenubarSub: typeof MenubarPrimitive.Sub = MenubarPrimitive.Sub\n\nconst MenubarRadioGroup: typeof MenubarPrimitive.RadioGroup = MenubarPrimitive.RadioGroup\n\nconst Menubar = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Root\n ref={ref}\n className={cn(\n \"flex h-9 items-center space-x-1 rounded-xl border bg-background p-1 shadow-sm\",\n className\n )}\n {...props}\n />\n))\nMenubar.displayName = MenubarPrimitive.Root.displayName\n\nconst MenubarTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Trigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-lg px-3 py-1 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\",\n className\n )}\n {...props}\n />\n))\nMenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName\n\nconst MenubarSubTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => (\n <MenubarPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-lg px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto h-4 w-4\" />\n </MenubarPrimitive.SubTrigger>\n))\nMenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName\n\nconst MenubarSubContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.SubContent\n ref={ref}\n className={cn(\n \"z-50 min-w-[8rem] overflow-hidden rounded-xl border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n))\nMenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName\n\nconst MenubarContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>\n>(\n (\n { className, align = \"start\", alignOffset = -4, sideOffset = 8, ...props },\n ref\n ) => (\n <MenubarPrimitive.Portal>\n <MenubarPrimitive.Content\n ref={ref}\n align={align}\n alignOffset={alignOffset}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 min-w-[12rem] overflow-hidden rounded-xl border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n </MenubarPrimitive.Portal>\n )\n)\nMenubarContent.displayName = MenubarPrimitive.Content.displayName\n\nconst MenubarItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-lg px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n))\nMenubarItem.displayName = MenubarPrimitive.Item.displayName\n\nconst MenubarCheckboxItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <MenubarPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-lg py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <CheckIcon className=\"h-4 w-4\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.CheckboxItem>\n))\nMenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName\n\nconst MenubarRadioItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <MenubarPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-lg py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <DotFilledIcon className=\"h-4 w-4 fill-current\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.RadioItem>\n))\nMenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName\n\nconst MenubarLabel = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Label\n ref={ref}\n className={cn(\n \"px-2 py-1.5 text-sm font-semibold\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n))\nMenubarLabel.displayName = MenubarPrimitive.Label.displayName\n\nconst MenubarSeparator = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n))\nMenubarSeparator.displayName = MenubarPrimitive.Separator.displayName\n\nconst MenubarShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\n \"ml-auto text-xs tracking-widest text-muted-foreground\",\n className\n )}\n {...props}\n />\n )\n}\nMenubarShortcut.displayname = \"MenubarShortcut\"\n\nexport {\n Menubar,\n MenubarMenu,\n MenubarTrigger,\n MenubarContent,\n MenubarItem,\n MenubarSeparator,\n MenubarLabel,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarPortal,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarGroup,\n MenubarSub,\n MenubarShortcut,\n}\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface MultiComboboxOption {
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
7
|
+
interface MultiComboboxProps {
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
options: MultiComboboxOption[];
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
searchPlaceholder?: string;
|
|
12
|
+
emptyMessage?: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
value?: string[];
|
|
15
|
+
onValueChange?: (value: string[]) => void;
|
|
16
|
+
onCreate?: (value: string) => void;
|
|
17
|
+
onSelect?: (value: string[]) => void;
|
|
18
|
+
maxDisplayedItems?: number;
|
|
19
|
+
contentClassName?: string;
|
|
20
|
+
asChild?: boolean;
|
|
21
|
+
}
|
|
22
|
+
declare const MultiCombobox: React.ForwardRefExoticComponent<MultiComboboxProps & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
|
|
24
|
+
export { MultiCombobox };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface MultiComboboxOption {
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
7
|
+
interface MultiComboboxProps {
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
options: MultiComboboxOption[];
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
searchPlaceholder?: string;
|
|
12
|
+
emptyMessage?: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
value?: string[];
|
|
15
|
+
onValueChange?: (value: string[]) => void;
|
|
16
|
+
onCreate?: (value: string) => void;
|
|
17
|
+
onSelect?: (value: string[]) => void;
|
|
18
|
+
maxDisplayedItems?: number;
|
|
19
|
+
contentClassName?: string;
|
|
20
|
+
asChild?: boolean;
|
|
21
|
+
}
|
|
22
|
+
declare const MultiCombobox: React.ForwardRefExoticComponent<MultiComboboxProps & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
|
|
24
|
+
export { MultiCombobox };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
|
|
4
|
+
|
|
5
|
+
declare const NavigationMenu: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuProps & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
6
|
+
declare const NavigationMenuList: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuListProps & React.RefAttributes<HTMLUListElement>, "ref"> & React.RefAttributes<HTMLUListElement>>;
|
|
7
|
+
declare const NavigationMenuItem: React.ForwardRefExoticComponent<NavigationMenuPrimitive.NavigationMenuItemProps & React.RefAttributes<HTMLLIElement>>;
|
|
8
|
+
declare const navigationMenuTriggerStyle: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
9
|
+
declare const NavigationMenuTrigger: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
declare const NavigationMenuContent: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
declare const NavigationMenuLink: React.ForwardRefExoticComponent<NavigationMenuPrimitive.NavigationMenuLinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
12
|
+
declare const NavigationMenuViewport: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuViewportProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
declare const NavigationMenuIndicator: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuIndicatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
|
|
15
|
+
export { NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, navigationMenuTriggerStyle };
|