@janovix/blocks 1.0.0-rc.2

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.
@@ -0,0 +1,111 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as class_variance_authority_types from 'class-variance-authority/types';
3
+ import * as React from 'react';
4
+ import { VariantProps } from 'class-variance-authority';
5
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
6
+ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
7
+ import { ClassValue } from 'clsx';
8
+
9
+ type ThemeSwitcherLabels = {
10
+ /** Tooltip label for the theme switcher */
11
+ theme?: string;
12
+ /** Label for "System" option */
13
+ system?: string;
14
+ /** Label for "Light" option */
15
+ light?: string;
16
+ /** Label for "Dark" option */
17
+ dark?: string;
18
+ };
19
+ type ThemeSwitcherProps = {
20
+ className?: string;
21
+ /** Size of the switcher */
22
+ size?: "sm" | "md" | "lg";
23
+ /** Shape of the button */
24
+ shape?: "rounded" | "pill";
25
+ /** Mini variant shows only current theme icon as dropdown */
26
+ variant?: "default" | "mini";
27
+ /** Dropdown alignment (for mini variant) */
28
+ align?: "start" | "center" | "end";
29
+ /** Dropdown side (for mini variant) */
30
+ side?: "top" | "bottom" | "left" | "right";
31
+ /** Translation labels - consumers can pass their own t() values */
32
+ labels?: ThemeSwitcherLabels;
33
+ };
34
+ declare function ThemeSwitcher({ className, size, shape, variant, align, side, labels: userLabels, }: ThemeSwitcherProps): react_jsx_runtime.JSX.Element;
35
+
36
+ type Language = {
37
+ /** Language key/code (e.g., "en", "es") */
38
+ key: string;
39
+ /** Short label for segmented control (e.g., "EN", "ES") */
40
+ label: string;
41
+ /** Full native name for dropdown (e.g., "English", "Español") */
42
+ nativeName: string;
43
+ };
44
+ type LanguageSwitcherLabels = {
45
+ /** Tooltip label for the language switcher */
46
+ language?: string;
47
+ };
48
+ type LanguageSwitcherProps = {
49
+ /** Available languages */
50
+ languages: Language[];
51
+ /** Current selected language key */
52
+ currentLanguage: string;
53
+ /** Callback when language changes */
54
+ onLanguageChange: (languageKey: string) => void;
55
+ /** Labels for accessibility/tooltips */
56
+ labels?: LanguageSwitcherLabels;
57
+ className?: string;
58
+ /** Size of the switcher */
59
+ size?: "sm" | "md" | "lg";
60
+ /** Shape of the button */
61
+ shape?: "rounded" | "squared" | "pill";
62
+ /** Mini variant shows only an icon */
63
+ variant?: "default" | "mini";
64
+ /** Show language icon in default variant */
65
+ showIcon?: boolean;
66
+ /** Dropdown alignment */
67
+ align?: "start" | "center" | "end";
68
+ /** Dropdown side */
69
+ side?: "top" | "bottom" | "left" | "right";
70
+ };
71
+ declare function LanguageSwitcher({ languages, currentLanguage, onLanguageChange, labels, className, size, shape, variant, showIcon, align, side, }: LanguageSwitcherProps): react_jsx_runtime.JSX.Element;
72
+
73
+ declare const buttonVariants: (props?: ({
74
+ variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
75
+ size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
76
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
77
+ declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
78
+ asChild?: boolean;
79
+ }): react_jsx_runtime.JSX.Element;
80
+
81
+ declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): react_jsx_runtime.JSX.Element;
82
+ declare function DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>): react_jsx_runtime.JSX.Element;
83
+ declare function DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
84
+ declare function DropdownMenuContent({ className, sideOffset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>): react_jsx_runtime.JSX.Element;
85
+ declare function DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>): react_jsx_runtime.JSX.Element;
86
+ declare function DropdownMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
87
+ inset?: boolean;
88
+ variant?: "default" | "destructive";
89
+ }): react_jsx_runtime.JSX.Element;
90
+ declare function DropdownMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>): react_jsx_runtime.JSX.Element;
91
+ declare function DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): react_jsx_runtime.JSX.Element;
92
+ declare function DropdownMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>): react_jsx_runtime.JSX.Element;
93
+ declare function DropdownMenuLabel({ className, inset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
94
+ inset?: boolean;
95
+ }): react_jsx_runtime.JSX.Element;
96
+ declare function DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>): react_jsx_runtime.JSX.Element;
97
+ declare function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
98
+ declare function DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>): react_jsx_runtime.JSX.Element;
99
+ declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
100
+ inset?: boolean;
101
+ }): react_jsx_runtime.JSX.Element;
102
+ declare function DropdownMenuSubContent({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>): react_jsx_runtime.JSX.Element;
103
+
104
+ declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): react_jsx_runtime.JSX.Element;
105
+ declare function Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>): react_jsx_runtime.JSX.Element;
106
+ declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
107
+ declare function TooltipContent({ className, sideOffset, children, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content>): react_jsx_runtime.JSX.Element;
108
+
109
+ declare function cn(...inputs: ClassValue[]): string;
110
+
111
+ export { Button, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type Language, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, buttonVariants, cn };
@@ -0,0 +1,111 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as class_variance_authority_types from 'class-variance-authority/types';
3
+ import * as React from 'react';
4
+ import { VariantProps } from 'class-variance-authority';
5
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
6
+ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
7
+ import { ClassValue } from 'clsx';
8
+
9
+ type ThemeSwitcherLabels = {
10
+ /** Tooltip label for the theme switcher */
11
+ theme?: string;
12
+ /** Label for "System" option */
13
+ system?: string;
14
+ /** Label for "Light" option */
15
+ light?: string;
16
+ /** Label for "Dark" option */
17
+ dark?: string;
18
+ };
19
+ type ThemeSwitcherProps = {
20
+ className?: string;
21
+ /** Size of the switcher */
22
+ size?: "sm" | "md" | "lg";
23
+ /** Shape of the button */
24
+ shape?: "rounded" | "pill";
25
+ /** Mini variant shows only current theme icon as dropdown */
26
+ variant?: "default" | "mini";
27
+ /** Dropdown alignment (for mini variant) */
28
+ align?: "start" | "center" | "end";
29
+ /** Dropdown side (for mini variant) */
30
+ side?: "top" | "bottom" | "left" | "right";
31
+ /** Translation labels - consumers can pass their own t() values */
32
+ labels?: ThemeSwitcherLabels;
33
+ };
34
+ declare function ThemeSwitcher({ className, size, shape, variant, align, side, labels: userLabels, }: ThemeSwitcherProps): react_jsx_runtime.JSX.Element;
35
+
36
+ type Language = {
37
+ /** Language key/code (e.g., "en", "es") */
38
+ key: string;
39
+ /** Short label for segmented control (e.g., "EN", "ES") */
40
+ label: string;
41
+ /** Full native name for dropdown (e.g., "English", "Español") */
42
+ nativeName: string;
43
+ };
44
+ type LanguageSwitcherLabels = {
45
+ /** Tooltip label for the language switcher */
46
+ language?: string;
47
+ };
48
+ type LanguageSwitcherProps = {
49
+ /** Available languages */
50
+ languages: Language[];
51
+ /** Current selected language key */
52
+ currentLanguage: string;
53
+ /** Callback when language changes */
54
+ onLanguageChange: (languageKey: string) => void;
55
+ /** Labels for accessibility/tooltips */
56
+ labels?: LanguageSwitcherLabels;
57
+ className?: string;
58
+ /** Size of the switcher */
59
+ size?: "sm" | "md" | "lg";
60
+ /** Shape of the button */
61
+ shape?: "rounded" | "squared" | "pill";
62
+ /** Mini variant shows only an icon */
63
+ variant?: "default" | "mini";
64
+ /** Show language icon in default variant */
65
+ showIcon?: boolean;
66
+ /** Dropdown alignment */
67
+ align?: "start" | "center" | "end";
68
+ /** Dropdown side */
69
+ side?: "top" | "bottom" | "left" | "right";
70
+ };
71
+ declare function LanguageSwitcher({ languages, currentLanguage, onLanguageChange, labels, className, size, shape, variant, showIcon, align, side, }: LanguageSwitcherProps): react_jsx_runtime.JSX.Element;
72
+
73
+ declare const buttonVariants: (props?: ({
74
+ variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
75
+ size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
76
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
77
+ declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
78
+ asChild?: boolean;
79
+ }): react_jsx_runtime.JSX.Element;
80
+
81
+ declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): react_jsx_runtime.JSX.Element;
82
+ declare function DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>): react_jsx_runtime.JSX.Element;
83
+ declare function DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
84
+ declare function DropdownMenuContent({ className, sideOffset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>): react_jsx_runtime.JSX.Element;
85
+ declare function DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>): react_jsx_runtime.JSX.Element;
86
+ declare function DropdownMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
87
+ inset?: boolean;
88
+ variant?: "default" | "destructive";
89
+ }): react_jsx_runtime.JSX.Element;
90
+ declare function DropdownMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>): react_jsx_runtime.JSX.Element;
91
+ declare function DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): react_jsx_runtime.JSX.Element;
92
+ declare function DropdownMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>): react_jsx_runtime.JSX.Element;
93
+ declare function DropdownMenuLabel({ className, inset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
94
+ inset?: boolean;
95
+ }): react_jsx_runtime.JSX.Element;
96
+ declare function DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>): react_jsx_runtime.JSX.Element;
97
+ declare function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
98
+ declare function DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>): react_jsx_runtime.JSX.Element;
99
+ declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
100
+ inset?: boolean;
101
+ }): react_jsx_runtime.JSX.Element;
102
+ declare function DropdownMenuSubContent({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>): react_jsx_runtime.JSX.Element;
103
+
104
+ declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): react_jsx_runtime.JSX.Element;
105
+ declare function Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>): react_jsx_runtime.JSX.Element;
106
+ declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
107
+ declare function TooltipContent({ className, sideOffset, children, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content>): react_jsx_runtime.JSX.Element;
108
+
109
+ declare function cn(...inputs: ClassValue[]): string;
110
+
111
+ export { Button, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type Language, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, buttonVariants, cn };