@devadeboye/react-material-components 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +103 -0
- package/dist/index.d.ts +103 -0
- package/dist/index.js +3215 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +3174 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +59 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import React$1 from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
declare const buttonVariants: (props?: ({
|
|
7
|
+
variant?: "filled" | "tonal" | "outlined" | "text" | "elevated" | null | undefined;
|
|
8
|
+
size?: "xs" | "s" | "m" | "l" | "xl" | null | undefined;
|
|
9
|
+
shape?: "round" | "square" | null | undefined;
|
|
10
|
+
fullWidth?: boolean | null | undefined;
|
|
11
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
12
|
+
interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
13
|
+
asChild?: boolean;
|
|
14
|
+
leadingIcon?: React$1.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
declare const Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
17
|
+
|
|
18
|
+
declare const cardVariants: (props?: ({
|
|
19
|
+
variant?: "filled" | "outlined" | "elevated" | null | undefined;
|
|
20
|
+
padding?: "none" | "sm" | "md" | "lg" | null | undefined;
|
|
21
|
+
radius?: "none" | "xl" | "sm" | "md" | "lg" | "2xl" | null | undefined;
|
|
22
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
23
|
+
interface CardProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof cardVariants> {
|
|
24
|
+
interactive?: boolean;
|
|
25
|
+
}
|
|
26
|
+
declare const Card: React$1.ForwardRefExoticComponent<CardProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
27
|
+
|
|
28
|
+
declare const fabVariants: (props?: ({
|
|
29
|
+
color?: "surface" | "primary" | "secondary" | "tertiary" | null | undefined;
|
|
30
|
+
size?: "small" | "regular" | "medium" | "large" | null | undefined;
|
|
31
|
+
variant?: "standard" | "lowered" | null | undefined;
|
|
32
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
33
|
+
interface FABProps extends Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>, "color">, VariantProps<typeof fabVariants> {
|
|
34
|
+
children?: React$1.ReactNode;
|
|
35
|
+
}
|
|
36
|
+
declare const FAB: React$1.ForwardRefExoticComponent<FABProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
37
|
+
|
|
38
|
+
interface NavRailVariants {
|
|
39
|
+
expanded?: boolean | null;
|
|
40
|
+
}
|
|
41
|
+
interface NavRailDestinationConfig {
|
|
42
|
+
id: string;
|
|
43
|
+
icon: React.ReactNode;
|
|
44
|
+
label: string;
|
|
45
|
+
badge?: string | number;
|
|
46
|
+
hidden?: boolean;
|
|
47
|
+
onClick?: () => void;
|
|
48
|
+
href?: string;
|
|
49
|
+
}
|
|
50
|
+
interface FabConfig {
|
|
51
|
+
icon: React.ReactNode;
|
|
52
|
+
label: string;
|
|
53
|
+
onClick?: () => void;
|
|
54
|
+
color?: FABProps["color"];
|
|
55
|
+
variant?: FABProps["variant"];
|
|
56
|
+
className?: string;
|
|
57
|
+
}
|
|
58
|
+
interface NavRailProps extends React.HTMLAttributes<HTMLDivElement>, NavRailVariants {
|
|
59
|
+
destinations: NavRailDestinationConfig[];
|
|
60
|
+
activeId?: string;
|
|
61
|
+
showMenuButton?: boolean;
|
|
62
|
+
onExpandedChange?: (expanded: boolean) => void;
|
|
63
|
+
/** Whether to show a FAB at the top of the rail */
|
|
64
|
+
showFab?: boolean;
|
|
65
|
+
/** Configuration for the FAB/ExtendedFAB */
|
|
66
|
+
fabConfig?: FabConfig;
|
|
67
|
+
alignment?: "center" | "top";
|
|
68
|
+
backgroundColor?: string;
|
|
69
|
+
textColor?: string;
|
|
70
|
+
activeBgColor?: string;
|
|
71
|
+
activeTextColor?: string;
|
|
72
|
+
}
|
|
73
|
+
interface NavRailDestinationProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
74
|
+
icon: React.ReactNode;
|
|
75
|
+
label: string;
|
|
76
|
+
active?: boolean;
|
|
77
|
+
expanded?: boolean;
|
|
78
|
+
badge?: string | number;
|
|
79
|
+
activeBgColor?: string;
|
|
80
|
+
activeTextColor?: string;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
declare const NavigationRail: ({ expanded: expandedProp, destinations, activeId, showFab, fabConfig, showMenuButton, onExpandedChange, className, alignment, backgroundColor, textColor, activeBgColor, activeTextColor, ...props }: NavRailProps) => react_jsx_runtime.JSX.Element;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* A material design ripple effect component.
|
|
87
|
+
* To use this, the parent container must have `relative` and `overflow-hidden`.
|
|
88
|
+
*/
|
|
89
|
+
declare const Ripple: () => react_jsx_runtime.JSX.Element;
|
|
90
|
+
|
|
91
|
+
declare const extendedFabVariants: (props?: ({
|
|
92
|
+
color?: "surface" | "primary" | "secondary" | "tertiary" | null | undefined;
|
|
93
|
+
size?: "small" | "medium" | "large" | null | undefined;
|
|
94
|
+
variant?: "standard" | "lowered" | null | undefined;
|
|
95
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
96
|
+
interface ExtendedFABProps extends Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>, "color">, VariantProps<typeof extendedFabVariants> {
|
|
97
|
+
icon?: React$1.ReactNode;
|
|
98
|
+
label: string;
|
|
99
|
+
size?: "small" | "medium" | "large";
|
|
100
|
+
}
|
|
101
|
+
declare const ExtendedFAB: React$1.ForwardRefExoticComponent<ExtendedFABProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
102
|
+
|
|
103
|
+
export { Button, type ButtonProps, Card, type CardProps, ExtendedFAB, type ExtendedFABProps, FAB, type FABProps, type FabConfig, type NavRailDestinationConfig, type NavRailDestinationProps, type NavRailProps, type NavRailVariants, NavigationRail, Ripple };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import React$1 from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
declare const buttonVariants: (props?: ({
|
|
7
|
+
variant?: "filled" | "tonal" | "outlined" | "text" | "elevated" | null | undefined;
|
|
8
|
+
size?: "xs" | "s" | "m" | "l" | "xl" | null | undefined;
|
|
9
|
+
shape?: "round" | "square" | null | undefined;
|
|
10
|
+
fullWidth?: boolean | null | undefined;
|
|
11
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
12
|
+
interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
13
|
+
asChild?: boolean;
|
|
14
|
+
leadingIcon?: React$1.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
declare const Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
17
|
+
|
|
18
|
+
declare const cardVariants: (props?: ({
|
|
19
|
+
variant?: "filled" | "outlined" | "elevated" | null | undefined;
|
|
20
|
+
padding?: "none" | "sm" | "md" | "lg" | null | undefined;
|
|
21
|
+
radius?: "none" | "xl" | "sm" | "md" | "lg" | "2xl" | null | undefined;
|
|
22
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
23
|
+
interface CardProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof cardVariants> {
|
|
24
|
+
interactive?: boolean;
|
|
25
|
+
}
|
|
26
|
+
declare const Card: React$1.ForwardRefExoticComponent<CardProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
27
|
+
|
|
28
|
+
declare const fabVariants: (props?: ({
|
|
29
|
+
color?: "surface" | "primary" | "secondary" | "tertiary" | null | undefined;
|
|
30
|
+
size?: "small" | "regular" | "medium" | "large" | null | undefined;
|
|
31
|
+
variant?: "standard" | "lowered" | null | undefined;
|
|
32
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
33
|
+
interface FABProps extends Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>, "color">, VariantProps<typeof fabVariants> {
|
|
34
|
+
children?: React$1.ReactNode;
|
|
35
|
+
}
|
|
36
|
+
declare const FAB: React$1.ForwardRefExoticComponent<FABProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
37
|
+
|
|
38
|
+
interface NavRailVariants {
|
|
39
|
+
expanded?: boolean | null;
|
|
40
|
+
}
|
|
41
|
+
interface NavRailDestinationConfig {
|
|
42
|
+
id: string;
|
|
43
|
+
icon: React.ReactNode;
|
|
44
|
+
label: string;
|
|
45
|
+
badge?: string | number;
|
|
46
|
+
hidden?: boolean;
|
|
47
|
+
onClick?: () => void;
|
|
48
|
+
href?: string;
|
|
49
|
+
}
|
|
50
|
+
interface FabConfig {
|
|
51
|
+
icon: React.ReactNode;
|
|
52
|
+
label: string;
|
|
53
|
+
onClick?: () => void;
|
|
54
|
+
color?: FABProps["color"];
|
|
55
|
+
variant?: FABProps["variant"];
|
|
56
|
+
className?: string;
|
|
57
|
+
}
|
|
58
|
+
interface NavRailProps extends React.HTMLAttributes<HTMLDivElement>, NavRailVariants {
|
|
59
|
+
destinations: NavRailDestinationConfig[];
|
|
60
|
+
activeId?: string;
|
|
61
|
+
showMenuButton?: boolean;
|
|
62
|
+
onExpandedChange?: (expanded: boolean) => void;
|
|
63
|
+
/** Whether to show a FAB at the top of the rail */
|
|
64
|
+
showFab?: boolean;
|
|
65
|
+
/** Configuration for the FAB/ExtendedFAB */
|
|
66
|
+
fabConfig?: FabConfig;
|
|
67
|
+
alignment?: "center" | "top";
|
|
68
|
+
backgroundColor?: string;
|
|
69
|
+
textColor?: string;
|
|
70
|
+
activeBgColor?: string;
|
|
71
|
+
activeTextColor?: string;
|
|
72
|
+
}
|
|
73
|
+
interface NavRailDestinationProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
74
|
+
icon: React.ReactNode;
|
|
75
|
+
label: string;
|
|
76
|
+
active?: boolean;
|
|
77
|
+
expanded?: boolean;
|
|
78
|
+
badge?: string | number;
|
|
79
|
+
activeBgColor?: string;
|
|
80
|
+
activeTextColor?: string;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
declare const NavigationRail: ({ expanded: expandedProp, destinations, activeId, showFab, fabConfig, showMenuButton, onExpandedChange, className, alignment, backgroundColor, textColor, activeBgColor, activeTextColor, ...props }: NavRailProps) => react_jsx_runtime.JSX.Element;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* A material design ripple effect component.
|
|
87
|
+
* To use this, the parent container must have `relative` and `overflow-hidden`.
|
|
88
|
+
*/
|
|
89
|
+
declare const Ripple: () => react_jsx_runtime.JSX.Element;
|
|
90
|
+
|
|
91
|
+
declare const extendedFabVariants: (props?: ({
|
|
92
|
+
color?: "surface" | "primary" | "secondary" | "tertiary" | null | undefined;
|
|
93
|
+
size?: "small" | "medium" | "large" | null | undefined;
|
|
94
|
+
variant?: "standard" | "lowered" | null | undefined;
|
|
95
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
96
|
+
interface ExtendedFABProps extends Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>, "color">, VariantProps<typeof extendedFabVariants> {
|
|
97
|
+
icon?: React$1.ReactNode;
|
|
98
|
+
label: string;
|
|
99
|
+
size?: "small" | "medium" | "large";
|
|
100
|
+
}
|
|
101
|
+
declare const ExtendedFAB: React$1.ForwardRefExoticComponent<ExtendedFABProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
102
|
+
|
|
103
|
+
export { Button, type ButtonProps, Card, type CardProps, ExtendedFAB, type ExtendedFABProps, FAB, type FABProps, type FabConfig, type NavRailDestinationConfig, type NavRailDestinationProps, type NavRailProps, type NavRailVariants, NavigationRail, Ripple };
|