elegant-lib 0.0.1 → 0.0.3
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.ts +9 -3
- package/dist/index.js +12 -13
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import "react";
|
|
2
|
-
import "class-variance-authority";
|
|
2
|
+
import { VariantProps } from "class-variance-authority";
|
|
3
3
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
import * as class_variance_authority_types0 from "class-variance-authority/types";
|
|
5
|
+
import { ButtonProps } from "@base-ui/react";
|
|
4
6
|
|
|
5
7
|
//#region src/components/ui/button.d.ts
|
|
6
|
-
|
|
7
|
-
declare
|
|
8
|
+
type Props = ButtonProps & VariantProps<typeof buttonVariants> & {};
|
|
9
|
+
declare const buttonVariants: (props?: ({
|
|
10
|
+
variant?: "default" | "contained" | "primary" | "error" | "info" | "warning" | "outline" | "secondary" | "text" | null | undefined;
|
|
11
|
+
size?: "default" | "medium" | "small" | "large" | "icon" | null | undefined;
|
|
12
|
+
} & class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
13
|
+
declare function Button(props: Props): react_jsx_runtime0.JSX.Element;
|
|
8
14
|
//#endregion
|
|
9
15
|
export { Button };
|
package/dist/index.js
CHANGED
|
@@ -11,19 +11,21 @@ const buttonVariants = cva("inline-flex items-center justify-center gap-2 whites
|
|
|
11
11
|
variants: {
|
|
12
12
|
variant: {
|
|
13
13
|
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
14
|
-
|
|
14
|
+
contained: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
15
|
+
primary: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
16
|
+
error: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
17
|
+
info: "bg-info text-white hover:bg-info/90 focus-visible:ring-info/20 dark:focus-visible:ring-info/40 dark:bg-info/60",
|
|
18
|
+
warning: "bg-warning text-white hover:bg-warning/90 focus-visible:ring-warning/20 dark:focus-visible:ring-warning/40 dark:bg-warning/60",
|
|
15
19
|
outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
16
20
|
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
17
|
-
|
|
18
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
21
|
+
text: "text-primary underline-offset-4 hover:underline"
|
|
19
22
|
},
|
|
20
23
|
size: {
|
|
21
24
|
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"icon-lg": "size-10"
|
|
25
|
+
medium: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
26
|
+
small: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
27
|
+
large: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
28
|
+
icon: "size-9"
|
|
27
29
|
}
|
|
28
30
|
},
|
|
29
31
|
defaultVariants: {
|
|
@@ -31,11 +33,8 @@ const buttonVariants = cva("inline-flex items-center justify-center gap-2 whites
|
|
|
31
33
|
size: "default"
|
|
32
34
|
}
|
|
33
35
|
});
|
|
34
|
-
function Button() {
|
|
35
|
-
return /* @__PURE__ */ jsx(MuiButton, {
|
|
36
|
-
variant: "contained",
|
|
37
|
-
children: "Hello world"
|
|
38
|
-
});
|
|
36
|
+
function Button(props) {
|
|
37
|
+
return /* @__PURE__ */ jsx(MuiButton, { ...props });
|
|
39
38
|
}
|
|
40
39
|
|
|
41
40
|
//#endregion
|