@mbao01/common 0.0.24 → 0.0.26

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.
@@ -1,2 +1,2 @@
1
1
  import { type BadgeProps } from "./types";
2
- export declare const Badge: ({ size, outline, variant, className, ...props }: BadgeProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const Badge: ({ size, outline, rounded, variant, className, ...props }: BadgeProps) => import("react/jsx-runtime").JSX.Element;
@@ -2,4 +2,5 @@ export declare const getBadgeClasses: (props?: ({
2
2
  variant?: "accent" | "error" | "ghost" | "info" | "neutral" | "primary" | "secondary" | "success" | "warning" | null | undefined;
3
3
  outline?: boolean | null | undefined;
4
4
  size?: "xs" | "sm" | "md" | "lg" | null | undefined;
5
+ rounded?: "xs" | "sm" | "md" | "lg" | null | undefined;
5
6
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  export declare const Input: React.ForwardRefExoticComponent<Omit<React.HTMLProps<HTMLInputElement>, "size" | "ref"> & {
3
- variant?: "accent" | "error" | "ghost" | "info" | "primary" | "secondary" | "success" | "warning" | undefined;
3
+ variant?: "accent" | "default" | "error" | "ghost" | "info" | "primary" | "secondary" | "success" | "warning" | undefined;
4
4
  outline?: boolean | undefined;
5
5
  wide?: boolean | undefined;
6
6
  size?: "xs" | "sm" | "md" | "lg" | undefined;
@@ -1,5 +1,5 @@
1
1
  export declare const getInputClasses: (props?: ({
2
- variant?: "accent" | "error" | "ghost" | "info" | "primary" | "secondary" | "success" | "warning" | null | undefined;
2
+ variant?: "accent" | "default" | "error" | "ghost" | "info" | "primary" | "secondary" | "success" | "warning" | null | undefined;
3
3
  outline?: boolean | null | undefined;
4
4
  wide?: boolean | null | undefined;
5
5
  size?: "xs" | "sm" | "md" | "lg" | null | undefined;
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  export declare const TextField: React.ForwardRefExoticComponent<Omit<React.HTMLProps<HTMLInputElement>, "size" | "ref"> & {
3
- variant?: "accent" | "error" | "ghost" | "info" | "primary" | "secondary" | "success" | "warning" | undefined;
3
+ variant?: "accent" | "default" | "error" | "ghost" | "info" | "primary" | "secondary" | "success" | "warning" | undefined;
4
4
  outline?: boolean | undefined;
5
5
  wide?: boolean | undefined;
6
6
  size?: "xs" | "sm" | "md" | "lg" | undefined;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mbao01/common",
3
3
  "private": false,
4
- "version": "0.0.24",
4
+ "version": "0.0.26",
5
5
  "type": "module",
6
6
  "author": "Ayomide Bakare",
7
7
  "license": "MIT",
@@ -142,5 +142,5 @@
142
142
  "react-dom": "^18.2.0",
143
143
  "typescript": "^5.2.2"
144
144
  },
145
- "gitHead": "b95f089ac1b19964127f550809c9943b2766749f"
145
+ "gitHead": "ae57ca0c314f2fb4aeb6b3c87d11f96cc7b8d5f0"
146
146
  }
@@ -5,13 +5,17 @@ import { type BadgeProps } from "./types";
5
5
  export const Badge = ({
6
6
  size,
7
7
  outline,
8
+ rounded,
8
9
  variant,
9
10
  className,
10
11
  ...props
11
12
  }: BadgeProps) => {
12
13
  return (
13
14
  <span
14
- className={cn(getBadgeClasses({ size, variant, outline }), className)}
15
+ className={cn(
16
+ getBadgeClasses({ size, variant, outline, rounded }),
17
+ className
18
+ )}
15
19
  {...props}
16
20
  />
17
21
  );
@@ -22,7 +22,28 @@ export const getBadgeClasses = cva("badge", {
22
22
  md: "badge-md",
23
23
  lg: "badge-lg",
24
24
  },
25
+ rounded: {
26
+ xs: "rounded-xs",
27
+ sm: "rounded-sm",
28
+ md: "rounded-md",
29
+ lg: "rounded-lg",
30
+ },
25
31
  },
32
+ compoundVariants: [
33
+ {
34
+ size: undefined,
35
+ className: "text-xs",
36
+ },
37
+ {
38
+ rounded: undefined,
39
+ className: "rounded-md",
40
+ },
41
+ {
42
+ variant: "ghost",
43
+ outline: true,
44
+ className: "border-base-300",
45
+ },
46
+ ],
26
47
  defaultVariants: {
27
48
  variant: "ghost",
28
49
  },
@@ -36,5 +36,10 @@ export const getButtonClasses = cva("btn", {
36
36
  size: undefined,
37
37
  className: "min-h-fit h-10",
38
38
  },
39
+ {
40
+ variant: undefined,
41
+ outline: true,
42
+ className: "border-neutral-content",
43
+ },
39
44
  ],
40
45
  });
@@ -5,6 +5,7 @@ export const getInputClasses = cva(
5
5
  {
6
6
  variants: {
7
7
  variant: {
8
+ default: "bg-transparent",
8
9
  accent: "input-accent",
9
10
  error: "input-error",
10
11
  ghost: "input-ghost",
@@ -32,6 +33,16 @@ export const getInputClasses = cva(
32
33
  size: undefined,
33
34
  className: "min-h-fit h-10",
34
35
  },
36
+ {
37
+ variant: undefined,
38
+ outline: true,
39
+ className: "border-neutral-content",
40
+ },
41
+ {
42
+ variant: "default",
43
+ outline: true,
44
+ className: "border-base-content",
45
+ },
35
46
  ],
36
47
  }
37
48
  );
@@ -1,6 +1,6 @@
1
1
  import { cva } from "../../libs";
2
2
 
3
- export const getPaginationClasses = cva("mx-auto flex w-full justify-center");
3
+ export const getPaginationClasses = cva("flex justify-center");
4
4
 
5
5
  export const getPaginationContentClasses = cva(
6
6
  "flex flex-row items-center gap-1"