Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

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

Abhinave239a4c28d51
diff --git a/packages/ui/components/Container.ts b/packages/shared/components/Container.ts
similarity index 100%
rename from packages/ui/components/Container.ts
rename to packages/shared/components/Container.ts
diff --git a/packages/ui/components/EnteSpinner.tsx b/packages/shared/components/EnteSpinner.tsx
similarity index 100%
rename from packages/ui/components/EnteSpinner.tsx
rename to packages/shared/components/EnteSpinner.tsx
diff --git a/packages/ui/components/Form/FormPaper/Footer.tsx b/packages/shared/components/Form/FormPaper/Footer.tsx
similarity index 100%
rename from packages/ui/components/Form/FormPaper/Footer.tsx
rename to packages/shared/components/Form/FormPaper/Footer.tsx
diff --git a/packages/ui/components/Form/FormPaper/Title.tsx b/packages/shared/components/Form/FormPaper/Title.tsx
similarity index 100%
rename from packages/ui/components/Form/FormPaper/Title.tsx
rename to packages/shared/components/Form/FormPaper/Title.tsx
diff --git a/packages/ui/components/Form/FormPaper/index.tsx b/packages/shared/components/Form/FormPaper/index.tsx
similarity index 100%
rename from packages/ui/components/Form/FormPaper/index.tsx
rename to packages/shared/components/Form/FormPaper/index.tsx
diff --git a/packages/shared/components/Form/ShowHidePassword.tsx b/packages/shared/components/Form/ShowHidePassword.tsx
new file mode 100644
index 0000000000..0aa5ed6489
--- /dev/null
+++ b/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;
diff --git a/packages/shared/package.json b/packages/shared/package.json
index 756df1aa82..de22139499 100644
--- a/packages/shared/package.json
+++ b/packages/shared/package.json
@@ -5,7 +5,13 @@
"lint": "eslint .",
"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": {
"@ente/eslint-config": "*",
"@typescript-eslint/parser": "^5.59.2",
diff --git a/packages/shared/tsconfig.json b/packages/shared/tsconfig.json
index 6f8f12337f..ab3caa1c04 100644
--- a/packages/shared/tsconfig.json
+++ b/packages/shared/tsconfig.json
@@ -2,5 +2,11 @@
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "."
- }
+ },
+ "include": [
+ "**/*.ts",
+ "**/*.tsx",
+ "**/*.js",
+ "../mui-config/mui-theme.d.ts"
+ ]
}
diff --git a/packages/ui/.eslintrc.js b/packages/ui/.eslintrc.js
deleted file mode 100644
index 60466d6e16..0000000000
--- a/packages/ui/.eslintrc.js
+++ /dev/null
@@ -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'],
-};
diff --git a/packages/ui/package.json b/packages/ui/package.json
deleted file mode 100644
index 28f4a7389e..0000000000
--- a/packages/ui/package.json
+++ /dev/null
@@ -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"
- }
-}
diff --git a/packages/ui/tsconfig.json b/packages/ui/tsconfig.json
deleted file mode 100644
index 576936375d..0000000000
--- a/packages/ui/tsconfig.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "extends": "../../tsconfig.base.json",
- "compilerOptions": { "baseUrl": "." },
- "include": [
- "**/*.ts",
- "**/*.tsx",
- "**/*.js",
- "../mui-config/mui-theme.d.ts"
- ]
-}