@mbao01/common 0.0.20 → 0.0.22
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/types/components/Command/Command.d.ts +5 -5
- package/dist/types/components/Menu/ContextMenu/ContextMenu.d.ts +36 -0
- package/dist/types/components/Menu/ContextMenu/constants.d.ts +0 -0
- package/dist/types/components/Menu/ContextMenu/index.d.ts +1 -0
- package/dist/types/components/Menu/ContextMenu/types.d.ts +14 -0
- package/dist/types/components/Menu/DropdownMenu/DropdownMenu.d.ts +36 -0
- package/dist/types/components/Menu/DropdownMenu/index.d.ts +1 -0
- package/dist/types/components/Menu/DropdownMenu/types.d.ts +14 -0
- package/dist/types/components/Menu/Menubar/Menubar.d.ts +43 -0
- package/dist/types/components/Menu/Menubar/constants.d.ts +25 -0
- package/dist/types/components/Menu/Menubar/index.d.ts +1 -0
- package/dist/types/components/Menu/Menubar/types.d.ts +15 -0
- package/dist/types/components/Menu/NavigationMenu/NavigationMenu.d.ts +17 -0
- package/dist/types/components/Menu/NavigationMenu/constants.d.ts +8 -0
- package/dist/types/components/Menu/NavigationMenu/index.d.ts +1 -0
- package/dist/types/components/Menu/NavigationMenu/types.d.ts +10 -0
- package/dist/types/components/Menu/index.d.ts +4 -0
- package/dist/types/components/Skeleton/constants.d.ts +2 -2
- package/dist/types/components/Table/Table.d.ts +14 -0
- package/dist/types/components/Table/constants.d.ts +8 -0
- package/dist/types/components/Table/index.d.ts +1 -0
- package/dist/types/components/Table/types.d.ts +11 -0
- package/dist/types/components/ThemeSwitch/ThemeSwitch.d.ts +2 -0
- package/dist/types/components/ThemeSwitch/constants.d.ts +1 -0
- package/dist/types/components/ThemeSwitch/index.d.ts +1 -0
- package/dist/types/components/ThemeSwitch/types.d.ts +10 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/utilities/theme.d.ts +1 -2
- package/package.json +6 -2
- package/src/components/Menu/ContextMenu/ContextMenu.tsx +180 -0
- package/src/components/Menu/ContextMenu/constants.ts +0 -0
- package/src/components/Menu/ContextMenu/index.ts +1 -0
- package/src/components/Menu/ContextMenu/types.ts +60 -0
- package/src/components/Menu/DropdownMenu/DropdownMenu.tsx +183 -0
- package/src/components/Menu/DropdownMenu/index.ts +1 -0
- package/src/components/Menu/DropdownMenu/types.ts +60 -0
- package/src/components/Menu/Menubar/Menubar.tsx +204 -0
- package/src/components/Menu/Menubar/constants.ts +107 -0
- package/src/components/Menu/Menubar/index.ts +1 -0
- package/src/components/Menu/Menubar/types.ts +66 -0
- package/src/components/Menu/NavigationMenu/NavigationMenu.tsx +117 -0
- package/src/components/Menu/NavigationMenu/constants.ts +47 -0
- package/src/components/Menu/NavigationMenu/index.ts +1 -0
- package/src/components/Menu/NavigationMenu/types.ts +40 -0
- package/src/components/Menu/index.ts +4 -0
- package/src/components/Table/Table.tsx +85 -0
- package/src/components/Table/constants.ts +27 -0
- package/src/components/Table/index.ts +1 -0
- package/src/components/Table/types.ts +19 -0
- package/src/components/ThemeSwitch/ThemeSwitch.tsx +68 -0
- package/src/components/ThemeSwitch/constants.ts +5 -0
- package/src/components/ThemeSwitch/index.ts +1 -0
- package/src/components/ThemeSwitch/types.ts +10 -0
- package/src/index.ts +3 -0
- package/src/utilities/theme.ts +3 -5
|
@@ -18,7 +18,7 @@ declare const Command: {
|
|
|
18
18
|
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
19
19
|
} & {
|
|
20
20
|
asChild?: boolean | undefined;
|
|
21
|
-
}, "key" |
|
|
21
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
|
|
22
22
|
label?: string | undefined;
|
|
23
23
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
24
24
|
Empty: React.ForwardRefExoticComponent<Omit<{
|
|
@@ -27,14 +27,14 @@ declare const Command: {
|
|
|
27
27
|
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
28
28
|
} & {
|
|
29
29
|
asChild?: boolean | undefined;
|
|
30
|
-
}, "key" |
|
|
30
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
31
31
|
Group: React.ForwardRefExoticComponent<Omit<{
|
|
32
32
|
children?: React.ReactNode;
|
|
33
33
|
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
34
34
|
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
35
35
|
} & {
|
|
36
36
|
asChild?: boolean | undefined;
|
|
37
|
-
}, "key" |
|
|
37
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "heading" | "value"> & {
|
|
38
38
|
heading?: React.ReactNode;
|
|
39
39
|
value?: string | undefined;
|
|
40
40
|
forceMount?: boolean | undefined;
|
|
@@ -45,7 +45,7 @@ declare const Command: {
|
|
|
45
45
|
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
46
46
|
} & {
|
|
47
47
|
asChild?: boolean | undefined;
|
|
48
|
-
}, "key" |
|
|
48
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "onSelect" | "disabled" | "value"> & {
|
|
49
49
|
disabled?: boolean | undefined;
|
|
50
50
|
onSelect?: ((value: string) => void) | undefined;
|
|
51
51
|
value?: string | undefined;
|
|
@@ -60,7 +60,7 @@ declare const Command: {
|
|
|
60
60
|
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
61
61
|
} & {
|
|
62
62
|
asChild?: boolean | undefined;
|
|
63
|
-
}, "key" |
|
|
63
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
|
|
64
64
|
alwaysRender?: boolean | undefined;
|
|
65
65
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
66
66
|
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
3
|
+
import type { ContextMenuProps, ContextMenuShortcutProps } from "./types";
|
|
4
|
+
declare const ContextMenu: {
|
|
5
|
+
(props: ContextMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
Trigger: import("react").ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuTriggerProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
7
|
+
Group: import("react").ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
|
+
Portal: import("react").FC<ContextMenuPrimitive.ContextMenuPortalProps>;
|
|
9
|
+
Sub: import("react").FC<ContextMenuPrimitive.ContextMenuSubProps>;
|
|
10
|
+
RadioGroup: import("react").ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuRadioGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
11
|
+
Content: import("react").ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {} & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
|
+
Item: import("react").ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuItemProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
|
|
13
|
+
variant?: "accent" | "error" | "info" | "neutral" | "primary" | "secondary" | "success" | "warning" | "base" | undefined;
|
|
14
|
+
inset?: boolean | undefined;
|
|
15
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
16
|
+
CheckboxItem: import("react").ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuCheckboxItemProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
|
|
17
|
+
variant?: "accent" | "error" | "info" | "neutral" | "primary" | "secondary" | "success" | "warning" | "base" | undefined;
|
|
18
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
19
|
+
RadioItem: import("react").ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuRadioItemProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
|
|
20
|
+
variant?: "accent" | "error" | "info" | "neutral" | "primary" | "secondary" | "success" | "warning" | "base" | undefined;
|
|
21
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
22
|
+
Label: import("react").ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuLabelProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
|
|
23
|
+
inset?: boolean | undefined;
|
|
24
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
25
|
+
Separator: import("react").ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSeparatorProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {} & import("react").RefAttributes<HTMLDivElement>>;
|
|
26
|
+
Shortcut: {
|
|
27
|
+
({ className, ...props }: ContextMenuShortcutProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
displayName: string;
|
|
29
|
+
};
|
|
30
|
+
SubContent: import("react").ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSubContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {} & import("react").RefAttributes<HTMLDivElement>>;
|
|
31
|
+
SubTrigger: import("react").ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSubTriggerProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
|
|
32
|
+
variant?: "accent" | "error" | "info" | "neutral" | "primary" | "secondary" | "success" | "warning" | "base" | undefined;
|
|
33
|
+
inset?: boolean | undefined;
|
|
34
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
35
|
+
};
|
|
36
|
+
export { ContextMenu };
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ContextMenu } from "./ContextMenu";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
3
|
+
import { type VariantProps } from "../../../libs";
|
|
4
|
+
import { getMenubarCheckboxItemClasses, getMenubarContentClasses, getMenubarItemClasses, getMenubarLabelClasses, getMenubarRadioItemClasses, getMenubarSeparatorClasses, getMenubarShortcutClasses, getMenubarSubContentClasses, getMenubarSubTriggerClasses } from "../Menubar/constants";
|
|
5
|
+
export type ContextMenuProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Root>;
|
|
6
|
+
export type ContextMenuSubTriggerProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger> & VariantProps<typeof getMenubarSubTriggerClasses>;
|
|
7
|
+
export type ContextMenuContentProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content> & VariantProps<typeof getMenubarContentClasses>;
|
|
8
|
+
export type ContextMenuSubContentProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent> & VariantProps<typeof getMenubarSubContentClasses>;
|
|
9
|
+
export type ContextMenuItemProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item> & VariantProps<typeof getMenubarItemClasses>;
|
|
10
|
+
export type ContextMenuCheckboxItemProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.CheckboxItem> & VariantProps<typeof getMenubarCheckboxItemClasses>;
|
|
11
|
+
export type ContextMenuRadioItemProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.RadioItem> & VariantProps<typeof getMenubarRadioItemClasses>;
|
|
12
|
+
export type ContextMenuLabelProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Label> & VariantProps<typeof getMenubarLabelClasses>;
|
|
13
|
+
export type ContextMenuSeparatorProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Separator> & VariantProps<typeof getMenubarSeparatorClasses>;
|
|
14
|
+
export type ContextMenuShortcutProps = React.HTMLAttributes<HTMLSpanElement> & VariantProps<typeof getMenubarShortcutClasses>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
3
|
+
import type { DropdownMenuProps, DropdownMenuShortcutProps } from "./types";
|
|
4
|
+
declare const DropdownMenu: {
|
|
5
|
+
(props: DropdownMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
Trigger: import("react").ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
Content: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {} & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
|
+
Item: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
|
|
9
|
+
variant?: "accent" | "error" | "info" | "neutral" | "primary" | "secondary" | "success" | "warning" | "base" | undefined;
|
|
10
|
+
inset?: boolean | undefined;
|
|
11
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
|
+
CheckboxItem: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
|
|
13
|
+
variant?: "accent" | "error" | "info" | "neutral" | "primary" | "secondary" | "success" | "warning" | "base" | undefined;
|
|
14
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
15
|
+
RadioItem: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
|
|
16
|
+
variant?: "accent" | "error" | "info" | "neutral" | "primary" | "secondary" | "success" | "warning" | "base" | undefined;
|
|
17
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
18
|
+
Label: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
|
|
19
|
+
inset?: boolean | undefined;
|
|
20
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
21
|
+
Separator: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {} & import("react").RefAttributes<HTMLDivElement>>;
|
|
22
|
+
Shortcut: {
|
|
23
|
+
({ className, ...props }: DropdownMenuShortcutProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
displayName: string;
|
|
25
|
+
};
|
|
26
|
+
Group: import("react").ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
27
|
+
Portal: import("react").FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
|
|
28
|
+
Sub: import("react").FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
|
|
29
|
+
SubContent: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {} & import("react").RefAttributes<HTMLDivElement>>;
|
|
30
|
+
SubTrigger: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
|
|
31
|
+
variant?: "accent" | "error" | "info" | "neutral" | "primary" | "secondary" | "success" | "warning" | "base" | undefined;
|
|
32
|
+
inset?: boolean | undefined;
|
|
33
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
34
|
+
RadioGroup: import("react").ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
35
|
+
};
|
|
36
|
+
export { DropdownMenu };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DropdownMenu } from "./DropdownMenu";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
3
|
+
import { type VariantProps } from "../../../libs";
|
|
4
|
+
import { getMenubarCheckboxItemClasses, getMenubarContentClasses, getMenubarItemClasses, getMenubarLabelClasses, getMenubarRadioItemClasses, getMenubarSeparatorClasses, getMenubarShortcutClasses, getMenubarSubContentClasses, getMenubarSubTriggerClasses } from "../Menubar/constants";
|
|
5
|
+
export type DropdownMenuProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Root>;
|
|
6
|
+
export type DropdownMenuSubTriggerProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & VariantProps<typeof getMenubarSubTriggerClasses>;
|
|
7
|
+
export type DropdownMenuContentProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content> & VariantProps<typeof getMenubarContentClasses>;
|
|
8
|
+
export type DropdownMenuSubContentProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent> & VariantProps<typeof getMenubarSubContentClasses>;
|
|
9
|
+
export type DropdownMenuItemProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & VariantProps<typeof getMenubarItemClasses>;
|
|
10
|
+
export type DropdownMenuCheckboxItemProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem> & VariantProps<typeof getMenubarCheckboxItemClasses>;
|
|
11
|
+
export type DropdownMenuRadioItemProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem> & VariantProps<typeof getMenubarRadioItemClasses>;
|
|
12
|
+
export type DropdownMenuLabelProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & VariantProps<typeof getMenubarLabelClasses>;
|
|
13
|
+
export type DropdownMenuSeparatorProps = React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator> & VariantProps<typeof getMenubarSeparatorClasses>;
|
|
14
|
+
export type DropdownMenuShortcutProps = React.HTMLAttributes<HTMLSpanElement> & VariantProps<typeof getMenubarShortcutClasses>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import * as MenubarPrimitive from "@radix-ui/react-menubar";
|
|
3
|
+
import type { MenubarProps, MenubarShortcutProps } from "./types";
|
|
4
|
+
declare const Menubar: {
|
|
5
|
+
({ className, ...props }: MenubarProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
displayName: string | undefined;
|
|
7
|
+
Menu: {
|
|
8
|
+
(props: MenubarPrimitive.ScopedProps<MenubarPrimitive.MenubarMenuProps>): JSX.Element;
|
|
9
|
+
displayName: string;
|
|
10
|
+
};
|
|
11
|
+
Group: import("react").ForwardRefExoticComponent<MenubarPrimitive.MenubarGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
|
+
Portal: import("react").FC<MenubarPrimitive.MenubarPortalProps>;
|
|
13
|
+
Sub: import("react").FC<MenubarPrimitive.MenubarSubProps>;
|
|
14
|
+
RadioGroup: import("react").ForwardRefExoticComponent<MenubarPrimitive.MenubarRadioGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
15
|
+
Trigger: import("react").ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarTriggerProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
16
|
+
variant?: "accent" | "error" | "info" | "neutral" | "primary" | "secondary" | "success" | "warning" | "base" | undefined;
|
|
17
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
18
|
+
Content: import("react").ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {} & import("react").RefAttributes<HTMLDivElement>>;
|
|
19
|
+
Item: import("react").ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarItemProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
|
|
20
|
+
variant?: "accent" | "error" | "info" | "neutral" | "primary" | "secondary" | "success" | "warning" | "base" | undefined;
|
|
21
|
+
inset?: boolean | undefined;
|
|
22
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
23
|
+
Separator: import("react").ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSeparatorProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {} & import("react").RefAttributes<HTMLDivElement>>;
|
|
24
|
+
Label: import("react").ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarLabelProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
|
|
25
|
+
inset?: boolean | undefined;
|
|
26
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
27
|
+
CheckboxItem: import("react").ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarCheckboxItemProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
|
|
28
|
+
variant?: "accent" | "error" | "info" | "neutral" | "primary" | "secondary" | "success" | "warning" | "base" | undefined;
|
|
29
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
30
|
+
RadioItem: import("react").ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarRadioItemProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
|
|
31
|
+
variant?: "accent" | "error" | "info" | "neutral" | "primary" | "secondary" | "success" | "warning" | "base" | undefined;
|
|
32
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
33
|
+
SubContent: import("react").ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSubContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {} & import("react").RefAttributes<HTMLDivElement>>;
|
|
34
|
+
SubTrigger: import("react").ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSubTriggerProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
|
|
35
|
+
variant?: "accent" | "error" | "info" | "neutral" | "primary" | "secondary" | "success" | "warning" | "base" | undefined;
|
|
36
|
+
inset?: boolean | undefined;
|
|
37
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
38
|
+
Shortcut: {
|
|
39
|
+
({ className, ...props }: MenubarShortcutProps): import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
displayname: string;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
export { Menubar };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const getMenubarClasses: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
2
|
+
export declare const getMenubarTriggerClasses: (props?: ({
|
|
3
|
+
variant?: "accent" | "error" | "info" | "neutral" | "primary" | "secondary" | "success" | "warning" | "base" | null | undefined;
|
|
4
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
5
|
+
export declare const getMenubarSubTriggerClasses: (props?: ({
|
|
6
|
+
variant?: "accent" | "error" | "info" | "neutral" | "primary" | "secondary" | "success" | "warning" | "base" | null | undefined;
|
|
7
|
+
inset?: boolean | null | undefined;
|
|
8
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
|
+
export declare const getMenubarContentClasses: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
10
|
+
export declare const getMenubarSubContentClasses: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
11
|
+
export declare const getMenubarItemClasses: (props?: ({
|
|
12
|
+
variant?: "accent" | "error" | "info" | "neutral" | "primary" | "secondary" | "success" | "warning" | "base" | null | undefined;
|
|
13
|
+
inset?: boolean | null | undefined;
|
|
14
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
15
|
+
export declare const getMenubarCheckboxItemClasses: (props?: ({
|
|
16
|
+
variant?: "accent" | "error" | "info" | "neutral" | "primary" | "secondary" | "success" | "warning" | "base" | null | undefined;
|
|
17
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
18
|
+
export declare const getMenubarRadioItemClasses: (props?: ({
|
|
19
|
+
variant?: "accent" | "error" | "info" | "neutral" | "primary" | "secondary" | "success" | "warning" | "base" | null | undefined;
|
|
20
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
21
|
+
export declare const getMenubarLabelClasses: (props?: ({
|
|
22
|
+
inset?: boolean | null | undefined;
|
|
23
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
24
|
+
export declare const getMenubarSeparatorClasses: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
25
|
+
export declare const getMenubarShortcutClasses: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Menubar } from "./Menubar";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import * as MenubarPrimitive from "@radix-ui/react-menubar";
|
|
3
|
+
import { type VariantProps } from "../../../libs";
|
|
4
|
+
import { getMenubarCheckboxItemClasses, getMenubarContentClasses, getMenubarItemClasses, getMenubarLabelClasses, getMenubarRadioItemClasses, getMenubarSeparatorClasses, getMenubarShortcutClasses, getMenubarSubContentClasses, getMenubarSubTriggerClasses, getMenubarTriggerClasses } from "./constants";
|
|
5
|
+
export type MenubarProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>;
|
|
6
|
+
export type MenubarTriggerProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger> & VariantProps<typeof getMenubarTriggerClasses>;
|
|
7
|
+
export type MenubarSubTriggerProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> & VariantProps<typeof getMenubarSubTriggerClasses>;
|
|
8
|
+
export type MenubarContentProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content> & VariantProps<typeof getMenubarContentClasses>;
|
|
9
|
+
export type MenubarSubContentProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubContent> & VariantProps<typeof getMenubarSubContentClasses>;
|
|
10
|
+
export type MenubarItemProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> & VariantProps<typeof getMenubarItemClasses>;
|
|
11
|
+
export type MenubarCheckboxItemProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.CheckboxItem> & VariantProps<typeof getMenubarCheckboxItemClasses>;
|
|
12
|
+
export type MenubarRadioItemProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioItem> & VariantProps<typeof getMenubarRadioItemClasses>;
|
|
13
|
+
export type MenubarLabelProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> & VariantProps<typeof getMenubarLabelClasses>;
|
|
14
|
+
export type MenubarSeparatorProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator> & VariantProps<typeof getMenubarSeparatorClasses>;
|
|
15
|
+
export type MenubarShortcutProps = React.HTMLAttributes<HTMLSpanElement> & VariantProps<typeof getMenubarShortcutClasses>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
|
3
|
+
import type { NavigationMenuProps } from "./types";
|
|
4
|
+
declare const NavigationMenu: {
|
|
5
|
+
({ className, children, ...props }: NavigationMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
displayName: string | undefined;
|
|
7
|
+
List: import("react").ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuListProps & import("react").RefAttributes<HTMLUListElement>, "ref"> & {} & import("react").RefAttributes<HTMLUListElement>>;
|
|
8
|
+
Item: import("react").ForwardRefExoticComponent<NavigationMenuPrimitive.NavigationMenuItemProps & import("react").RefAttributes<HTMLLIElement>>;
|
|
9
|
+
Content: import("react").ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {} & import("react").RefAttributes<HTMLDivElement>>;
|
|
10
|
+
Trigger: import("react").ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuTriggerProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
11
|
+
variant?: "accent" | "error" | "info" | "neutral" | "primary" | "secondary" | "success" | "warning" | "base" | undefined;
|
|
12
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
13
|
+
Link: import("react").ForwardRefExoticComponent<NavigationMenuPrimitive.NavigationMenuLinkProps & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
14
|
+
Indicator: import("react").ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuIndicatorProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {} & import("react").RefAttributes<HTMLDivElement>>;
|
|
15
|
+
Viewport: import("react").ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuViewportProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {} & import("react").RefAttributes<HTMLDivElement>>;
|
|
16
|
+
};
|
|
17
|
+
export { NavigationMenu };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const getNavigationMenuClasses: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
2
|
+
export declare const getNavigationMenuListClasses: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
3
|
+
export declare const getNavigationMenuTriggerClasses: (props?: ({
|
|
4
|
+
variant?: "accent" | "error" | "info" | "neutral" | "primary" | "secondary" | "success" | "warning" | "base" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
export declare const getNavigationMenuContentClasses: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
7
|
+
export declare const getNavigationMenuViewportClasses: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
8
|
+
export declare const getNavigationMenuIndicatorClasses: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NavigationMenu } from "./NavigationMenu";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
|
3
|
+
import { type VariantProps } from "../../../libs";
|
|
4
|
+
import { getNavigationMenuClasses, getNavigationMenuContentClasses, getNavigationMenuIndicatorClasses, getNavigationMenuListClasses, getNavigationMenuTriggerClasses, getNavigationMenuViewportClasses } from "./constants";
|
|
5
|
+
export type NavigationMenuProps = React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root> & VariantProps<typeof getNavigationMenuClasses>;
|
|
6
|
+
export type NavigationMenuListProps = React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.List> & VariantProps<typeof getNavigationMenuListClasses>;
|
|
7
|
+
export type NavigationMenuTriggerProps = React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Trigger> & VariantProps<typeof getNavigationMenuTriggerClasses>;
|
|
8
|
+
export type NavigationMenuContentProps = React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Content> & VariantProps<typeof getNavigationMenuContentClasses>;
|
|
9
|
+
export type NavigationMenuViewportProps = React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Viewport> & VariantProps<typeof getNavigationMenuViewportClasses>;
|
|
10
|
+
export type NavigationMenuIndicatorProps = React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Indicator> & VariantProps<typeof getNavigationMenuIndicatorClasses>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const getSkeletonClasses: (props?: ({
|
|
2
2
|
variant?: "pulse" | null | undefined;
|
|
3
|
-
width?: 16 |
|
|
4
|
-
height?: 16 |
|
|
3
|
+
width?: 16 | 4 | 8 | 2 | 12 | 24 | 32 | 48 | 64 | "full" | null | undefined;
|
|
4
|
+
height?: 16 | 4 | 8 | 2 | 12 | 24 | 32 | 48 | 64 | "full" | null | undefined;
|
|
5
5
|
round?: boolean | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { TableBodyProps, TableCaptionProps, TableCellProps, TableFooterProps, TableHeadProps, TableHeaderProps, TableProps, TableRowProps } from "./types";
|
|
3
|
+
declare const Table: {
|
|
4
|
+
({ className, caption, zebra, size, pinRow, pinColumn, ...props }: TableProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
Header: import("react").ForwardRefExoticComponent<TableHeaderProps & import("react").RefAttributes<HTMLTableSectionElement>>;
|
|
7
|
+
Body: import("react").ForwardRefExoticComponent<TableBodyProps & import("react").RefAttributes<HTMLTableSectionElement>>;
|
|
8
|
+
Footer: import("react").ForwardRefExoticComponent<TableFooterProps & import("react").RefAttributes<HTMLTableSectionElement>>;
|
|
9
|
+
Head: import("react").ForwardRefExoticComponent<TableHeadProps & import("react").RefAttributes<HTMLTableCellElement>>;
|
|
10
|
+
Row: import("react").ForwardRefExoticComponent<TableRowProps & import("react").RefAttributes<HTMLTableRowElement>>;
|
|
11
|
+
Cell: import("react").ForwardRefExoticComponent<TableCellProps & import("react").RefAttributes<HTMLTableCellElement>>;
|
|
12
|
+
Caption: import("react").ForwardRefExoticComponent<TableCaptionProps & import("react").RefAttributes<HTMLTableCaptionElement>>;
|
|
13
|
+
};
|
|
14
|
+
export { Table };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const getTableClasses: (props?: ({
|
|
2
|
+
caption?: "top" | "bottom" | null | undefined;
|
|
3
|
+
zebra?: boolean | null | undefined;
|
|
4
|
+
pinRow?: boolean | null | undefined;
|
|
5
|
+
pinColumn?: boolean | null | undefined;
|
|
6
|
+
size?: "xs" | "sm" | "md" | "lg" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
export declare const getTableHeaderClasses: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Table } from "./Table";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { VariantProps } from "../../libs";
|
|
3
|
+
import { getTableClasses } from "./constants";
|
|
4
|
+
export type TableProps = React.HTMLAttributes<HTMLTableElement> & VariantProps<typeof getTableClasses>;
|
|
5
|
+
export type TableHeaderProps = React.HTMLAttributes<HTMLTableSectionElement>;
|
|
6
|
+
export type TableBodyProps = React.HTMLAttributes<HTMLTableSectionElement>;
|
|
7
|
+
export type TableFooterProps = React.HTMLAttributes<HTMLTableSectionElement>;
|
|
8
|
+
export type TableRowProps = React.HTMLAttributes<HTMLTableRowElement>;
|
|
9
|
+
export type TableHeadProps = React.ThHTMLAttributes<HTMLTableCellElement>;
|
|
10
|
+
export type TableCellProps = React.TdHTMLAttributes<HTMLTableCellElement>;
|
|
11
|
+
export type TableCaptionProps = React.HTMLAttributes<HTMLTableCaptionElement>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getThemeSwitchClasses: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ThemeSwitch } from "./ThemeSwitch";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type Theme } from "../../utilities";
|
|
3
|
+
export type ThemeSwitchProps = React.ComponentPropsWithoutRef<"label"> & {
|
|
4
|
+
name?: string;
|
|
5
|
+
theme?: Theme;
|
|
6
|
+
render?: (params: {
|
|
7
|
+
theme: Theme | null;
|
|
8
|
+
setTheme: React.Dispatch<React.SetStateAction<Theme | null>>;
|
|
9
|
+
}) => JSX.Element;
|
|
10
|
+
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/** actions */
|
|
2
2
|
export * from "./components/Button";
|
|
3
3
|
export * from "./components/Breadcrumbs";
|
|
4
|
+
export * from "./components/Menu";
|
|
4
5
|
export * from "./components/Pagination";
|
|
6
|
+
export * from "./components/ThemeSwitch";
|
|
5
7
|
export * from "./components/Toggle";
|
|
6
8
|
export * from "./components/ToggleGroup";
|
|
7
9
|
/** data display */
|
|
@@ -17,6 +19,7 @@ export * from "./components/Progress";
|
|
|
17
19
|
export * from "./components/ScrollArea";
|
|
18
20
|
export * from "./components/Separator";
|
|
19
21
|
export * from "./components/Sonner";
|
|
22
|
+
export * from "./components/Table";
|
|
20
23
|
export * from "./components/Tabs";
|
|
21
24
|
export * from "./components/Text";
|
|
22
25
|
/** data input */
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mbao01/common",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.22",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Ayomide Bakare",
|
|
7
7
|
"license": "MIT",
|
|
@@ -65,10 +65,14 @@
|
|
|
65
65
|
"@radix-ui/react-avatar": "^1.0.4",
|
|
66
66
|
"@radix-ui/react-checkbox": "^1.0.4",
|
|
67
67
|
"@radix-ui/react-collapsible": "^1.0.3",
|
|
68
|
+
"@radix-ui/react-context-menu": "^2.1.5",
|
|
68
69
|
"@radix-ui/react-dialog": "^1.0.5",
|
|
70
|
+
"@radix-ui/react-dropdown-menu": "^2.0.6",
|
|
69
71
|
"@radix-ui/react-hover-card": "^1.0.7",
|
|
70
72
|
"@radix-ui/react-icons": "^1.3.0",
|
|
71
73
|
"@radix-ui/react-label": "^2.0.2",
|
|
74
|
+
"@radix-ui/react-menubar": "^1.0.4",
|
|
75
|
+
"@radix-ui/react-navigation-menu": "^1.1.4",
|
|
72
76
|
"@radix-ui/react-popover": "^1.0.7",
|
|
73
77
|
"@radix-ui/react-progress": "^1.0.3",
|
|
74
78
|
"@radix-ui/react-scroll-area": "^1.0.5",
|
|
@@ -138,5 +142,5 @@
|
|
|
138
142
|
"react-dom": "^18.2.0",
|
|
139
143
|
"typescript": "^5.2.2"
|
|
140
144
|
},
|
|
141
|
-
"gitHead": "
|
|
145
|
+
"gitHead": "a37cc681238d753608c43c5b47a829826f059c74"
|
|
142
146
|
}
|