@modul/mbui 0.0.0

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/README.md ADDED
@@ -0,0 +1 @@
1
+ # ui
package/package.json ADDED
@@ -0,0 +1,62 @@
1
+ {
2
+ "name": "@modul/mbui",
3
+ "version": "0.0.0",
4
+ "packageManager": "yarn@3.5.1",
5
+ "main": "src/index.ts",
6
+ "scripts": {
7
+ "build:demo": "webpack --config ./demo/webpack.config.js",
8
+ "demo": "yarn dlx http-server demo/dist -so -c-1"
9
+ },
10
+ "lintConfig": "./.eslintrc.json",
11
+ "files": [
12
+ "src"
13
+ ],
14
+ "dependencies": {
15
+ "react-datepicker": "4.16.0"
16
+ },
17
+ "devDependencies": {
18
+ "@babel/core": "^7.9.0",
19
+ "@babel/preset-env": "^7.9.5",
20
+ "@babel/preset-react": "^7.9.4",
21
+ "@babel/preset-typescript": "^7.21.5",
22
+ "@types/node": "^20.1.4",
23
+ "@types/react": "^18.2.6",
24
+ "@types/react-datepicker": "4.15.0",
25
+ "@types/react-dom": "^18.2.4",
26
+ "@typescript-eslint/eslint-plugin": "5.39.0",
27
+ "@typescript-eslint/parser": "5.39.0",
28
+ "@vitejs/plugin-react": "^4.0.0",
29
+ "babel": "^6.23.0",
30
+ "babel-loader": "^9.1.2",
31
+ "classnames": "^2.3.2",
32
+ "clean-webpack-plugin": "^4.0.0",
33
+ "config": "3.3.9",
34
+ "copy-webpack-plugin": "^11.0.0",
35
+ "css-loader": "^6.8.1",
36
+ "eslint": "8.25.0",
37
+ "eslint-config-prettier": "8.5.0",
38
+ "eslint-plugin-angular": "4.1.0",
39
+ "eslint-plugin-jest": "27.1.2",
40
+ "eslint-plugin-prettier": "4.2.1",
41
+ "eslint-plugin-react": "7.31.10",
42
+ "eslint-plugin-react-hooks": "4.6.0",
43
+ "glob": "^10.2.4",
44
+ "html-webpack-plugin": "5.5.1",
45
+ "prettier": "2.7.1",
46
+ "react": "18.2.0",
47
+ "react-dom": "^18.2.0",
48
+ "style-loader": "^3.3.3",
49
+ "stylus": "^0.59.0",
50
+ "stylus-loader": "^7.1.3",
51
+ "ts-loader": "^9.4.2",
52
+ "tslib": "^2.5.0",
53
+ "typescript": "4.4.4",
54
+ "webpack": "^5.82.1",
55
+ "webpack-cli": "^5.1.1"
56
+ },
57
+ "peerDependencies": {
58
+ "classnames": "^2.3.2",
59
+ "react": "^18.2.0",
60
+ "react-dom": "^18.2.0"
61
+ }
62
+ }
@@ -0,0 +1,47 @@
1
+ import React from 'react'
2
+ import classNames from 'classnames'
3
+
4
+ interface IProps {
5
+ children?: React.ReactNode
6
+ loading?: boolean
7
+ sizeType?: 'normal' | 'big' | 'small' | 'xsmall' | 'xxsmall'
8
+ variant?: 'primary' | 'green' | 'light' | 'lightPrimary' | 'grey' | 'clean'
9
+ icon?: string
10
+ wide?: boolean
11
+ }
12
+
13
+ type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & IProps
14
+
15
+ export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
16
+ (
17
+ {
18
+ children,
19
+ loading = false,
20
+ sizeType = 'normal',
21
+ variant = 'primary',
22
+ className,
23
+ icon,
24
+ wide = false,
25
+ ...props
26
+ },
27
+ ref
28
+ ) => {
29
+ const styles = classNames('button', sizeType, variant, className, {
30
+ loader: loading,
31
+ [`icon-${icon}`]: !!icon,
32
+ wide,
33
+ })
34
+
35
+ return (
36
+ <button
37
+ ref={ref}
38
+ className={styles}
39
+ {...props}
40
+ >
41
+ {children}
42
+ </button>
43
+ )
44
+ }
45
+ )
46
+
47
+ export default Button
@@ -0,0 +1,3 @@
1
+ import Button from './Button'
2
+
3
+ export { Button }
File without changes
@@ -0,0 +1,16 @@
1
+ import React from 'react'
2
+
3
+ type TextLinkProps = React.HTMLProps<HTMLAnchorElement>
4
+
5
+ const TextLink = React.forwardRef<HTMLAnchorElement, TextLinkProps>(({ children, ...props }, ref) => {
6
+ return (
7
+ <a
8
+ ref={ref}
9
+ {...props}
10
+ >
11
+ {children}
12
+ </a>
13
+ )
14
+ })
15
+
16
+ export default TextLink
@@ -0,0 +1,3 @@
1
+ import TextLink from './TextLink'
2
+
3
+ export { TextLink }
@@ -0,0 +1,4 @@
1
+ import DatePicker from 'react-datepicker'
2
+ import 'react-datepicker/dist/react-datepicker.css'
3
+
4
+ export { DatePicker }
File without changes
package/src/index.ts ADDED
@@ -0,0 +1,5 @@
1
+ import { Button } from './Base/Buttons'
2
+ import { TextLink } from './Base/Links'
3
+ import { DatePicker } from './DatePicker'
4
+
5
+ export { Button, TextLink, DatePicker }