Explorar el Código

moved ui/components to shared/components and remove ui component

Abhinav hace 1 año
padre
commit
e239a4c28d

+ 0 - 0
packages/ui/components/Container.ts → packages/shared/components/Container.ts


+ 0 - 0
packages/ui/components/EnteSpinner.tsx → packages/shared/components/EnteSpinner.tsx


+ 0 - 0
packages/ui/components/Form/FormPaper/Footer.tsx → packages/shared/components/Form/FormPaper/Footer.tsx


+ 0 - 0
packages/ui/components/Form/FormPaper/Title.tsx → packages/shared/components/Form/FormPaper/Title.tsx


+ 0 - 0
packages/ui/components/Form/FormPaper/index.tsx → packages/shared/components/Form/FormPaper/index.tsx


+ 31 - 0
packages/shared/components/Form/ShowHidePassword.tsx

@@ -0,0 +1,31 @@
+import React from 'react';
+import { IconButton, InputAdornment } from '@mui/material';
+import VisibilityIcon from '@mui/icons-material/Visibility';
+import VisibilityOffIcon from '@mui/icons-material/VisibilityOff';
+
+interface Iprops {
+    showPassword: boolean;
+    handleClickShowPassword: () => void;
+    handleMouseDownPassword: (
+        event: React.MouseEvent<HTMLButtonElement>
+    ) => void;
+}
+const ShowHidePassword = ({
+    showPassword,
+    handleClickShowPassword,
+    handleMouseDownPassword,
+}: Iprops) => (
+    <InputAdornment position="end">
+        <IconButton
+            tabIndex={-1}
+            color="secondary"
+            aria-label="toggle password visibility"
+            onClick={handleClickShowPassword}
+            onMouseDown={handleMouseDownPassword}
+            edge="end">
+            {showPassword ? <VisibilityOffIcon /> : <VisibilityIcon />}
+        </IconButton>
+    </InputAdornment>
+);
+
+export default ShowHidePassword;

+ 7 - 1
packages/shared/package.json

@@ -5,7 +5,13 @@
         "lint": "eslint .",
         "lint": "eslint .",
         "build": "yarn lint && tsc"
         "build": "yarn lint && tsc"
     },
     },
-    "dependencies": {},
+    "dependencies": {
+        "@emotion/react": "11.10.6",
+        "@emotion/styled": "11.11.0",
+        "@mui/material": "5.11.16",
+        "react": "18.2.0",
+        "react-dom": "18.2.0"
+    },
     "devDependencies": {
     "devDependencies": {
         "@ente/eslint-config": "*",
         "@ente/eslint-config": "*",
         "@typescript-eslint/parser": "^5.59.2",
         "@typescript-eslint/parser": "^5.59.2",

+ 7 - 1
packages/shared/tsconfig.json

@@ -2,5 +2,11 @@
     "extends": "../../tsconfig.base.json",
     "extends": "../../tsconfig.base.json",
     "compilerOptions": {
     "compilerOptions": {
         "baseUrl": "."
         "baseUrl": "."
-    }
+    },
+    "include": [
+        "**/*.ts",
+        "**/*.tsx",
+        "**/*.js",
+        "../mui-config/mui-theme.d.ts"
+    ]
 }
 }

+ 0 - 13
packages/ui/.eslintrc.js

@@ -1,13 +0,0 @@
-module.exports = {
-    // When root is set to true, ESLint will stop looking for configuration files in parent directories.
-    // This is required here to ensure desktop picks the right eslint config, where this app is
-    // packaged as a submodule.
-    root: true,
-    extends: ['@ente/eslint-config'],
-    parser: '@typescript-eslint/parser',
-    parserOptions: {
-        tsconfigRootDir: __dirname,
-        project: './tsconfig.json',
-    },
-    ignorePatterns: ['.eslintrc.js'],
-};

+ 0 - 21
packages/ui/package.json

@@ -1,21 +0,0 @@
-{
-    "name": "@ente/ui",
-    "version": "0.0.0",
-    "scripts": {
-        "lint": "eslint .",
-        "build": "yarn lint && tsc"
-    },
-    "dependencies": {
-        "@emotion/react": "11.10.6",
-        "@emotion/styled": "11.11.0",
-        "@mui/material": "5.11.16",
-        "react": "18.2.0",
-        "react-dom": "18.2.0"
-    },
-    "devDependencies": {
-        "@ente/eslint-config": "*",
-        "@typescript-eslint/parser": "^5.59.2",
-        "eslint": "^8.28.0",
-        "typescript": "^5.1.3"
-    }
-}

+ 0 - 10
packages/ui/tsconfig.json

@@ -1,10 +0,0 @@
-{
-    "extends": "../../tsconfig.base.json",
-    "compilerOptions": { "baseUrl": "." },
-    "include": [
-        "**/*.ts",
-        "**/*.tsx",
-        "**/*.js",
-        "../mui-config/mui-theme.d.ts"
-    ]
-}