@mbao01/ui 0.1.42 → 0.1.43
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/Link/Link.d.ts +1 -1
- package/dist/types/components/Link/constant.d.ts +1 -1
- package/dist/types/components/Link/types.d.ts +3 -3
- package/dist/types/index.d.ts +2 -2
- package/package.json +46 -40
- package/src/components/Link/Link.tsx +2 -4
- package/src/components/Link/index.ts +1 -1
- package/src/components/Link/types.ts +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LinkProps } from './types';
|
|
2
2
|
export declare const Link: ({ href, hover, target, variant, children, className, underline, isExternal, isInternal, ...props }: LinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,4 +2,4 @@ export declare const getLinkClasses: (props?: ({
|
|
|
2
2
|
variant?: "accent" | "default" | "error" | "info" | "link" | "neutral" | "primary" | "secondary" | "success" | "warning" | null | undefined;
|
|
3
3
|
hover?: boolean | null | undefined;
|
|
4
4
|
underline?: boolean | null | undefined;
|
|
5
|
-
} & import(
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { getLinkClasses } from
|
|
1
|
+
import { LinkProps as RouterLinkProps, To } from 'react-router-dom';
|
|
2
|
+
import { VariantProps } from '@mbao01/common/libs';
|
|
3
|
+
import { getLinkClasses } from './constant';
|
|
4
4
|
export type LinkProps = Omit<RouterLinkProps, "to"> & {
|
|
5
5
|
isExternal?: boolean;
|
|
6
6
|
} & ({
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
1
|
+
export * from '@mbao01/common';
|
|
2
|
+
export * from './components/Link';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mbao01/ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.43",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Ayomide Bakare",
|
|
7
7
|
"license": "MIT",
|
|
@@ -28,11 +28,14 @@
|
|
|
28
28
|
"*.css"
|
|
29
29
|
],
|
|
30
30
|
"scripts": {
|
|
31
|
+
"clean": "pnpx rimraf node_modules",
|
|
31
32
|
"dev": "storybook dev -p 6008",
|
|
32
33
|
"build": "tsc && vite build",
|
|
33
34
|
"build-storybook": "storybook build -o ../../docs/storybook/ui",
|
|
34
35
|
"postbuild-storybook": "cp -R ../../docs/storybook/ui/* ../../docs/storybook/ && rm -rf ../../docs/storybook/ui",
|
|
35
36
|
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
37
|
+
"prettier": "prettier --check \"**/*.{ts,tsx}\"",
|
|
38
|
+
"prettier:write": "prettier --write \"**/*.{ts,tsx}\"",
|
|
36
39
|
"preview": "vite preview",
|
|
37
40
|
"prod": "pnpx http-server ../../docs/storybook --port 6008",
|
|
38
41
|
"test": "vitest run",
|
|
@@ -44,56 +47,59 @@
|
|
|
44
47
|
"test:watch": "vitest"
|
|
45
48
|
},
|
|
46
49
|
"dependencies": {
|
|
47
|
-
"@mbao01/common": "^0.0.
|
|
50
|
+
"@mbao01/common": "^0.0.42",
|
|
48
51
|
"@radix-ui/react-icons": "^1.3.0",
|
|
49
|
-
"clsx": "^2.1.
|
|
52
|
+
"clsx": "^2.1.1"
|
|
50
53
|
},
|
|
51
54
|
"devDependencies": {
|
|
52
|
-
"@
|
|
53
|
-
"@storybook/addon-
|
|
54
|
-
"@storybook/addon-
|
|
55
|
-
"@storybook/addon-
|
|
56
|
-
"@storybook/addon-
|
|
57
|
-
"@storybook/addon-
|
|
58
|
-
"@storybook/
|
|
59
|
-
"@storybook/
|
|
60
|
-
"@storybook/
|
|
61
|
-
"@storybook/
|
|
55
|
+
"@ianvs/prettier-plugin-sort-imports": "^4.3.1",
|
|
56
|
+
"@storybook/addon-a11y": "^8.3.4",
|
|
57
|
+
"@storybook/addon-essentials": "^8.3.4",
|
|
58
|
+
"@storybook/addon-interactions": "^8.3.4",
|
|
59
|
+
"@storybook/addon-links": "^8.3.4",
|
|
60
|
+
"@storybook/addon-onboarding": "^8.3.4",
|
|
61
|
+
"@storybook/addon-themes": "^8.3.4",
|
|
62
|
+
"@storybook/addon-viewport": "^8.3.4",
|
|
63
|
+
"@storybook/blocks": "^8.3.4",
|
|
64
|
+
"@storybook/react": "^8.3.4",
|
|
65
|
+
"@storybook/react-vite": "^8.3.4",
|
|
66
|
+
"@storybook/test": "^8.3.4",
|
|
62
67
|
"@storybook/test-runner": "^0.19.1",
|
|
63
|
-
"@testing-library/jest-dom": "^6.
|
|
64
|
-
"@testing-library/react": "^
|
|
68
|
+
"@testing-library/jest-dom": "^6.5.0",
|
|
69
|
+
"@testing-library/react": "^16.0.1",
|
|
65
70
|
"@testing-library/user-event": "^14.5.2",
|
|
66
71
|
"@types/jest-image-snapshot": "^6.4.0",
|
|
67
|
-
"@types/node": "^
|
|
68
|
-
"@types/react": "^18.
|
|
69
|
-
"@types/react-dom": "^18.
|
|
70
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
71
|
-
"@typescript-eslint/parser": "^
|
|
72
|
-
"@vitejs/plugin-react": "^4.
|
|
73
|
-
"@vitest/coverage-v8": "^1.
|
|
74
|
-
"@vitest/ui": "^1.
|
|
75
|
-
"eslint": "^8.
|
|
76
|
-
"eslint-plugin-react": "^7.
|
|
77
|
-
"eslint-plugin-react-hooks": "^4.6.
|
|
78
|
-
"eslint-plugin-react-refresh": "^0.4.
|
|
79
|
-
"eslint-plugin-storybook": "^0.
|
|
72
|
+
"@types/node": "^22.7.4",
|
|
73
|
+
"@types/react": "^18.3.10",
|
|
74
|
+
"@types/react-dom": "^18.3.0",
|
|
75
|
+
"@typescript-eslint/eslint-plugin": "^8.7.0",
|
|
76
|
+
"@typescript-eslint/parser": "^8.7.0",
|
|
77
|
+
"@vitejs/plugin-react": "^4.3.1",
|
|
78
|
+
"@vitest/coverage-v8": "^2.1.1",
|
|
79
|
+
"@vitest/ui": "^2.1.1",
|
|
80
|
+
"eslint": "^8.57.1",
|
|
81
|
+
"eslint-plugin-react": "^7.37.0",
|
|
82
|
+
"eslint-plugin-react-hooks": "^4.6.2",
|
|
83
|
+
"eslint-plugin-react-refresh": "^0.4.12",
|
|
84
|
+
"eslint-plugin-storybook": "^0.9.0",
|
|
80
85
|
"jest-image-snapshot": "^6.4.0",
|
|
81
|
-
"jsdom": "^
|
|
86
|
+
"jsdom": "^25.0.1",
|
|
82
87
|
"path": "^0.12.7",
|
|
83
|
-
"postcss": "^8.4.
|
|
84
|
-
"
|
|
85
|
-
"react
|
|
86
|
-
"react-
|
|
87
|
-
"
|
|
88
|
+
"postcss": "^8.4.47",
|
|
89
|
+
"prettier": "^3.3.3",
|
|
90
|
+
"react": "^18.3.1",
|
|
91
|
+
"react-dom": "^18.3.1",
|
|
92
|
+
"react-router-dom": "^6.26.2",
|
|
93
|
+
"storybook": "^8.3.4",
|
|
88
94
|
"storybook-addon-react-router-v6": "^2.0.15",
|
|
89
|
-
"tailwindcss": "^3.4.
|
|
90
|
-
"typescript": "^5.
|
|
91
|
-
"vite": "^5.
|
|
92
|
-
"vite-plugin-dts": "^
|
|
93
|
-
"vitest": "^1.
|
|
95
|
+
"tailwindcss": "^3.4.13",
|
|
96
|
+
"typescript": "^5.6.2",
|
|
97
|
+
"vite": "^5.4.8",
|
|
98
|
+
"vite-plugin-dts": "^4.2.2",
|
|
99
|
+
"vitest": "^2.1.1"
|
|
94
100
|
},
|
|
95
101
|
"peerDependencies": {
|
|
96
102
|
"react-router-dom": "^6.22.0"
|
|
97
103
|
},
|
|
98
|
-
"gitHead": "
|
|
104
|
+
"gitHead": "eeaf76c4b41380b44e7eaed95b0391727e78010f"
|
|
99
105
|
}
|
|
@@ -2,8 +2,8 @@ import { Link as RouterLink } from "react-router-dom";
|
|
|
2
2
|
import { ExternalLinkIcon } from "@radix-ui/react-icons";
|
|
3
3
|
import { Anchor } from "@mbao01/common";
|
|
4
4
|
import { cn } from "@mbao01/common/utilities";
|
|
5
|
-
import { type LinkProps } from "./types";
|
|
6
5
|
import { getLinkClasses } from "./constant";
|
|
6
|
+
import { type LinkProps } from "./types";
|
|
7
7
|
|
|
8
8
|
export const Link = ({
|
|
9
9
|
href,
|
|
@@ -42,9 +42,7 @@ export const Link = ({
|
|
|
42
42
|
{...(isExternal && { rel: "noopener noreferrer" })}
|
|
43
43
|
>
|
|
44
44
|
{children}
|
|
45
|
-
{isExternal ?
|
|
46
|
-
<ExternalLinkIcon name="external" className="ml-[2px] inline" />
|
|
47
|
-
) : null}
|
|
45
|
+
{isExternal ? <ExternalLinkIcon name="external" className="ml-[2px] inline" /> : null}
|
|
48
46
|
</RouterLink>
|
|
49
47
|
);
|
|
50
48
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Link } from
|
|
1
|
+
export { Link } from "./Link";
|