@mbao01/common 0.6.4 → 0.6.5
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/Badge/Badge.d.ts +1 -1
- package/dist/types/components/Badge/constants.d.ts +1 -0
- package/dist/types/components/Chart/helpers.d.ts +1 -1
- package/dist/types/components/Form/DatetimeInput/DatetimeInput.d.ts +1 -0
- package/package.json +29 -29
- package/src/components/Badge/Badge.tsx +10 -2
- package/src/components/Badge/constants.ts +3 -15
- package/src/components/Chart/helpers.ts +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { BadgeProps } from './types';
|
|
2
|
-
export declare const Badge: ({ size, outline, rounded, variant, className, ...props }: BadgeProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const Badge: ({ size, outline, rounded, variant, soft, className, ...props }: BadgeProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const getBadgeClasses: (props?: ({
|
|
2
2
|
variant?: "accent" | "error" | "ghost" | "info" | "neutral" | "primary" | "secondary" | "success" | "warning" | null | undefined;
|
|
3
|
+
soft?: boolean | null | undefined;
|
|
3
4
|
outline?: boolean | null | undefined;
|
|
4
5
|
size?: "xs" | "sm" | "md" | "lg" | null | undefined;
|
|
5
6
|
rounded?: "xs" | "sm" | "md" | "lg" | null | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { NameType, Payload as TooltipPayload, ValueType } from 'recharts/types/component/DefaultTooltipContent';
|
|
2
2
|
import { LegendPayload } from 'recharts';
|
|
3
3
|
import { ChartConfig } from './types';
|
|
4
|
-
export declare const getPayloadConfigFromPayload: (config: ChartConfig, payload: LegendPayload | TooltipPayload<ValueType, NameType>, key: string) => ({
|
|
4
|
+
export declare const getPayloadConfigFromPayload: (config: ChartConfig, payload: LegendPayload | Omit<TooltipPayload<ValueType, NameType>, "graphicalItemId">, key: string) => ({
|
|
5
5
|
label?: import('react').ReactNode;
|
|
6
6
|
icon?: import('react').ComponentType;
|
|
7
7
|
} & ({
|
|
@@ -56,6 +56,7 @@ export declare const DatetimeInput: import('react').ForwardRefExoticComponent<{
|
|
|
56
56
|
broadcastCalendar?: boolean | undefined;
|
|
57
57
|
ISOWeek?: boolean | undefined;
|
|
58
58
|
timeZone?: string | undefined | undefined;
|
|
59
|
+
noonSafe?: boolean | undefined | undefined;
|
|
59
60
|
components?: Partial<import('react-day-picker').CustomComponents> | undefined;
|
|
60
61
|
initialFocus?: boolean | undefined;
|
|
61
62
|
today?: Date | undefined;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mbao01/common",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.5",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Ayomide Bakare",
|
|
7
7
|
"license": "MIT",
|
|
@@ -99,8 +99,8 @@
|
|
|
99
99
|
"cmdk": "^1.1.1",
|
|
100
100
|
"date-fns": "^4.1.0",
|
|
101
101
|
"embla-carousel-react": "^8.6.0",
|
|
102
|
-
"lucide-react": "^0.
|
|
103
|
-
"react-day-picker": "^9.
|
|
102
|
+
"lucide-react": "^0.562.0",
|
|
103
|
+
"react-day-picker": "^9.13.0",
|
|
104
104
|
"react-dropzone": "^14.3.8",
|
|
105
105
|
"react-international-phone": "^4.6.1",
|
|
106
106
|
"react-otp-input": "^3.1.1",
|
|
@@ -112,51 +112,51 @@
|
|
|
112
112
|
"vaul": "^1.1.2"
|
|
113
113
|
},
|
|
114
114
|
"devDependencies": {
|
|
115
|
-
"@eslint/js": "^9.39.
|
|
115
|
+
"@eslint/js": "^9.39.2",
|
|
116
116
|
"@ianvs/prettier-plugin-sort-imports": "^4.7.0",
|
|
117
|
-
"@storybook/addon-a11y": "^10.1.
|
|
117
|
+
"@storybook/addon-a11y": "^10.1.11",
|
|
118
118
|
"@storybook/addon-coverage": "^3.0.0",
|
|
119
|
-
"@storybook/addon-docs": "^10.1.
|
|
120
|
-
"@storybook/addon-links": "^10.1.
|
|
121
|
-
"@storybook/addon-onboarding": "^10.1.
|
|
122
|
-
"@storybook/addon-themes": "^10.1.
|
|
123
|
-
"@storybook/react-vite": "^10.1.
|
|
119
|
+
"@storybook/addon-docs": "^10.1.11",
|
|
120
|
+
"@storybook/addon-links": "^10.1.11",
|
|
121
|
+
"@storybook/addon-onboarding": "^10.1.11",
|
|
122
|
+
"@storybook/addon-themes": "^10.1.11",
|
|
123
|
+
"@storybook/react-vite": "^10.1.11",
|
|
124
124
|
"@storybook/test-runner": "^0.24.2",
|
|
125
|
-
"@tailwindcss/postcss": "^4.1.
|
|
126
|
-
"@tailwindcss/vite": "^4.1.
|
|
125
|
+
"@tailwindcss/postcss": "^4.1.18",
|
|
126
|
+
"@tailwindcss/vite": "^4.1.18",
|
|
127
127
|
"@testing-library/jest-dom": "^6.9.1",
|
|
128
|
-
"@testing-library/react": "^16.3.
|
|
128
|
+
"@testing-library/react": "^16.3.1",
|
|
129
129
|
"@testing-library/user-event": "^14.6.1",
|
|
130
130
|
"@types/jest-image-snapshot": "^6.4.0",
|
|
131
|
-
"@types/node": "^25.0.
|
|
131
|
+
"@types/node": "^25.0.3",
|
|
132
132
|
"@types/react": "^19.2.7",
|
|
133
133
|
"@types/react-dom": "^19.2.3",
|
|
134
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
135
|
-
"@typescript-eslint/parser": "^8.
|
|
134
|
+
"@typescript-eslint/eslint-plugin": "^8.51.0",
|
|
135
|
+
"@typescript-eslint/parser": "^8.51.0",
|
|
136
136
|
"@vitejs/plugin-react": "^5.1.2",
|
|
137
137
|
"@vitest/coverage-v8": "^3.2.4",
|
|
138
138
|
"@vitest/ui": "^3.2.4",
|
|
139
139
|
"axe-playwright": "^2.2.2",
|
|
140
|
-
"daisyui": "^5.5.
|
|
141
|
-
"eslint": "^9.39.
|
|
140
|
+
"daisyui": "^5.5.14",
|
|
141
|
+
"eslint": "^9.39.2",
|
|
142
142
|
"eslint-plugin-react": "^7.37.5",
|
|
143
143
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
144
|
-
"eslint-plugin-react-refresh": "^0.4.
|
|
145
|
-
"eslint-plugin-storybook": "^10.1.
|
|
144
|
+
"eslint-plugin-react-refresh": "^0.4.26",
|
|
145
|
+
"eslint-plugin-storybook": "^10.1.11",
|
|
146
146
|
"globals": "^16.5.0",
|
|
147
147
|
"jest-image-snapshot": "^6.5.1",
|
|
148
|
-
"jsdom": "^27.
|
|
148
|
+
"jsdom": "^27.4.0",
|
|
149
149
|
"path": "^0.12.7",
|
|
150
150
|
"postcss": "^8.5.6",
|
|
151
151
|
"prettier": "^3.7.4",
|
|
152
|
-
"react": "^19.2.
|
|
153
|
-
"react-dom": "^19.2.
|
|
154
|
-
"react-router-dom": "^7.
|
|
155
|
-
"recharts": "^3.
|
|
156
|
-
"storybook": "^10.1.
|
|
157
|
-
"tailwindcss": "^4.1.
|
|
152
|
+
"react": "^19.2.3",
|
|
153
|
+
"react-dom": "^19.2.3",
|
|
154
|
+
"react-router-dom": "^7.11.0",
|
|
155
|
+
"recharts": "^3.6.0",
|
|
156
|
+
"storybook": "^10.1.11",
|
|
157
|
+
"tailwindcss": "^4.1.18",
|
|
158
158
|
"typescript": "^5.9.3",
|
|
159
|
-
"typescript-eslint": "^8.
|
|
159
|
+
"typescript-eslint": "^8.51.0",
|
|
160
160
|
"vite": "^6.4.1",
|
|
161
161
|
"vite-plugin-dts": "^4.5.4",
|
|
162
162
|
"vitest": "^3.2.4"
|
|
@@ -168,5 +168,5 @@
|
|
|
168
168
|
"recharts": "2",
|
|
169
169
|
"typescript": "5"
|
|
170
170
|
},
|
|
171
|
-
"gitHead": "
|
|
171
|
+
"gitHead": "f3359c587061980729e83322e4f6330e04e0815e"
|
|
172
172
|
}
|
|
@@ -2,10 +2,18 @@ import { cn } from "../../utilities";
|
|
|
2
2
|
import { getBadgeClasses } from "./constants";
|
|
3
3
|
import { type BadgeProps } from "./types";
|
|
4
4
|
|
|
5
|
-
export const Badge = ({
|
|
5
|
+
export const Badge = ({
|
|
6
|
+
size,
|
|
7
|
+
outline,
|
|
8
|
+
rounded,
|
|
9
|
+
variant,
|
|
10
|
+
soft,
|
|
11
|
+
className,
|
|
12
|
+
...props
|
|
13
|
+
}: BadgeProps) => {
|
|
6
14
|
return (
|
|
7
15
|
<span
|
|
8
|
-
className={cn(getBadgeClasses({ size, variant, outline, rounded }), className)}
|
|
16
|
+
className={cn(getBadgeClasses({ size, variant, outline, rounded, soft }), className)}
|
|
9
17
|
{...props}
|
|
10
18
|
/>
|
|
11
19
|
);
|
|
@@ -14,6 +14,9 @@ export const getBadgeClasses = cva("badge", {
|
|
|
14
14
|
success: "badge-success",
|
|
15
15
|
warning: "badge-warning",
|
|
16
16
|
},
|
|
17
|
+
soft: {
|
|
18
|
+
true: "badge-soft",
|
|
19
|
+
},
|
|
17
20
|
outline: {
|
|
18
21
|
true: "badge-outline",
|
|
19
22
|
},
|
|
@@ -30,21 +33,6 @@ export const getBadgeClasses = cva("badge", {
|
|
|
30
33
|
lg: "rounded-lg",
|
|
31
34
|
},
|
|
32
35
|
}),
|
|
33
|
-
compoundVariants: [
|
|
34
|
-
{
|
|
35
|
-
size: undefined,
|
|
36
|
-
className: "text-xs",
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
rounded: undefined,
|
|
40
|
-
className: "rounded-md",
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
variant: "ghost",
|
|
44
|
-
outline: true,
|
|
45
|
-
className: "border-base-300",
|
|
46
|
-
},
|
|
47
|
-
],
|
|
48
36
|
defaultVariants: {
|
|
49
37
|
variant: "ghost",
|
|
50
38
|
},
|
|
@@ -9,7 +9,7 @@ import { type ChartConfig } from "./types";
|
|
|
9
9
|
// Helper to extract item config from a payload.
|
|
10
10
|
export const getPayloadConfigFromPayload = (
|
|
11
11
|
config: ChartConfig,
|
|
12
|
-
payload: LegendPayload | TooltipPayload<ValueType, NameType>,
|
|
12
|
+
payload: LegendPayload | Omit<TooltipPayload<ValueType, NameType>, "graphicalItemId">,
|
|
13
13
|
key: string
|
|
14
14
|
) => {
|
|
15
15
|
if (typeof payload !== "object" || payload === null) {
|