@mbao01/ui 0.1.41 → 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.
@@ -1,2 +1,2 @@
1
- import { type LinkProps } from "./types";
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("class-variance-authority/types").ClassProp) | undefined) => string;
5
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -1,6 +1,6 @@
1
- import type { To, LinkProps as RouterLinkProps } from "react-router-dom";
2
- import { type VariantProps } from "@mbao01/common/libs";
3
- import { getLinkClasses } from "./constant";
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
  } & ({
@@ -1,2 +1,2 @@
1
- export * from "@mbao01/common";
2
- export * from "./components/Link";
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.41",
4
+ "version": "0.1.43",
5
5
  "type": "module",
6
6
  "author": "Ayomide Bakare",
7
7
  "license": "MIT",
@@ -28,64 +28,78 @@
28
28
  "*.css"
29
29
  ],
30
30
  "scripts": {
31
- "dev": "storybook dev -p 6006",
31
+ "clean": "pnpx rimraf node_modules",
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",
40
+ "prod": "pnpx http-server ../../docs/storybook --port 6008",
37
41
  "test": "vitest run",
42
+ "test:coverage": "vitest run --coverage",
38
43
  "test:ui": "vitest --ui",
39
- "test:watch": "vitest",
40
- "test:coverage": "vitest run --coverage"
44
+ "test:visual": "test-storybook --url http://127.0.0.1:6008",
45
+ "test:visual:ci": "test-storybook --ci --verbose --url http://127.0.0.1:6008",
46
+ "test:visual:watch": "test-storybook --watch",
47
+ "test:watch": "vitest"
41
48
  },
42
49
  "dependencies": {
43
- "@mbao01/common": "^0.0.40",
50
+ "@mbao01/common": "^0.0.42",
44
51
  "@radix-ui/react-icons": "^1.3.0",
45
- "clsx": "^2.1.0"
52
+ "clsx": "^2.1.1"
46
53
  },
47
54
  "devDependencies": {
48
- "@storybook/addon-essentials": "^8.0.6",
49
- "@storybook/addon-interactions": "^8.0.6",
50
- "@storybook/addon-links": "^8.0.6",
51
- "@storybook/addon-onboarding": "^8.0.6",
52
- "@storybook/addon-themes": "^8.0.6",
53
- "@storybook/blocks": "^8.0.6",
54
- "@storybook/react": "^8.0.6",
55
- "@storybook/react-vite": "^8.0.6",
56
- "@storybook/test": "^8.0.6",
57
- "@testing-library/jest-dom": "^6.4.2",
58
- "@testing-library/react": "^14.2.1",
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",
67
+ "@storybook/test-runner": "^0.19.1",
68
+ "@testing-library/jest-dom": "^6.5.0",
69
+ "@testing-library/react": "^16.0.1",
59
70
  "@testing-library/user-event": "^14.5.2",
60
- "@types/node": "^20.11.17",
61
- "@types/react": "^18.2.55",
62
- "@types/react-dom": "^18.2.19",
63
- "@typescript-eslint/eslint-plugin": "^6.21.0",
64
- "@typescript-eslint/parser": "^6.21.0",
65
- "@vitejs/plugin-react": "^4.2.1",
66
- "@vitest/coverage-v8": "^1.2.2",
67
- "@vitest/ui": "^1.2.2",
68
- "eslint": "^8.56.0",
69
- "eslint-plugin-react": "^7.33.2",
70
- "eslint-plugin-react-hooks": "^4.6.0",
71
- "eslint-plugin-react-refresh": "^0.4.5",
72
- "eslint-plugin-storybook": "^0.8.0",
73
- "jsdom": "^23.2.0",
71
+ "@types/jest-image-snapshot": "^6.4.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",
85
+ "jest-image-snapshot": "^6.4.0",
86
+ "jsdom": "^25.0.1",
74
87
  "path": "^0.12.7",
75
- "postcss": "^8.4.35",
76
- "react": "^18.2.0",
77
- "react-dom": "^18.2.0",
78
- "react-router-dom": "^6.22.0",
79
- "storybook": "^8.0.6",
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",
80
94
  "storybook-addon-react-router-v6": "^2.0.15",
81
- "tailwindcss": "^3.4.1",
82
- "typescript": "^5.3.3",
83
- "vite": "^5.1.1",
84
- "vite-plugin-dts": "^3.7.2",
85
- "vitest": "^1.2.2"
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"
86
100
  },
87
101
  "peerDependencies": {
88
102
  "react-router-dom": "^6.22.0"
89
103
  },
90
- "gitHead": "30ae293d3e5c2ece6709f280ecf5f75ec5712ab2"
104
+ "gitHead": "eeaf76c4b41380b44e7eaed95b0391727e78010f"
91
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 './Link';
1
+ export { Link } from "./Link";
@@ -1,4 +1,4 @@
1
- import type { To, LinkProps as RouterLinkProps } from "react-router-dom";
1
+ import type { LinkProps as RouterLinkProps, To } from "react-router-dom";
2
2
  import { type VariantProps } from "@mbao01/common/libs";
3
3
  import { getLinkClasses } from "./constant";
4
4