From cafd273f90d3f275f7dd4b15e52ccabe9a5c9ba9 Mon Sep 17 00:00:00 2001 From: benzbarquilla Date: Tue, 3 Mar 2026 16:52:13 +0800 Subject: [PATCH] added components --- .../components/permissions/Permissions.jsx | 134 +++++++++++++ .../components/permissions/styles.module.css | 185 ++++++++++++++++++ .../app/components/searchbar/SearchBar.jsx | 35 ++++ .../components/searchbar/styles.module.css | 46 +++++ 4 files changed, 400 insertions(+) create mode 100644 frontend/src/app/components/permissions/Permissions.jsx create mode 100644 frontend/src/app/components/permissions/styles.module.css create mode 100644 frontend/src/app/components/searchbar/SearchBar.jsx create mode 100644 frontend/src/app/components/searchbar/styles.module.css diff --git a/frontend/src/app/components/permissions/Permissions.jsx b/frontend/src/app/components/permissions/Permissions.jsx new file mode 100644 index 0000000..620b368 --- /dev/null +++ b/frontend/src/app/components/permissions/Permissions.jsx @@ -0,0 +1,134 @@ +import editUserStyle from "./styles.module.css"; +import React from "react"; + +const Permissions = ({ sampleData = [] }) => { + return ( + <> + {/* Permissions */} +
+ {/* Add permissions */} +
+
+ {/* Header */} +
+

Permissions

+
+
+ + + + +
+
+
+ + {sampleData.length === 0 ? ( + // Default Message +
+

No permission added yet

+
+ ) : ( + // Sampple Data(static) + sampleData.map((perm, index) => { + return ( +
+
+ + + + + +

{perm.permission}

+
+
+
+ + + + + + + +
+
+
+ ); + }) + )} +
+
+ + ); +}; + +export default Permissions; diff --git a/frontend/src/app/components/permissions/styles.module.css b/frontend/src/app/components/permissions/styles.module.css new file mode 100644 index 0000000..891783d --- /dev/null +++ b/frontend/src/app/components/permissions/styles.module.css @@ -0,0 +1,185 @@ +.imanginaryDiv { + padding: 18px; +} +.userPermissions { + display: flex; + flex-direction: column; + align-items: flex-start; + flex: 1 0 0; + align-self: stretch; + border-radius: 6px; + height: calc(100vh - 175px); + position: relative; + overflow: auto; + scrollbar-width: none; +} + +.permissionsContainer { + display: flex; + padding: 24px; + flex-direction: column; + align-items: flex-start; + align-self: stretch; + border-radius: 6px; + background: #1d1e2a; + background: color(display-p3 0.1138 0.1191 0.1616); +} +.permissionsHeader { + display: flex; + padding-bottom: 24px; + align-items: flex-start; + gap: 17px; + align-self: stretch; +} + +.permissionsHeader > p { + display: flex; + flex-direction: column; + justify-content: center; + align-items: flex-start; + gap: 5px; + flex: 1 0 0; + + color: #d2d3e1; + color: color(display-p3 0.8235 0.8275 0.8784); + font-family: Inter; + font-size: 20px; + font-style: normal; + font-weight: 500; + line-height: normal; + width: 163px; +} +.svgContainer { + display: flex; + width: 40px; + height: 40px; + flex-direction: column; + align-items: flex-end; + gap: 5px; + border-radius: 6px; + background: #27293b; + background: color(display-p3 0.1529 0.1608 0.2275); +} + +.svgContainer > div { + display: flex; + padding: 8px; + justify-content: center; + align-items: center; + gap: 12px; + border-radius: 6px; + background: #27293b; + background: color(display-p3 0.1529 0.1608 0.2275); +} + +.permissionDefaultState { + display: flex; + height: 43.813px; + padding: 8px 16px; + justify-content: center; + align-items: center; + align-self: stretch; +} +.permissionDefaultState p { + display: flex; + justify-content: center; + align-items: center; + gap: 12px; + flex: 1 0 0; + align-self: stretch; + color: #85869b; + color: color(display-p3 0.5216 0.5255 0.6); + font-family: Inter; + font-size: 16px; + font-style: normal; + font-weight: 400; + line-height: normal; +} + +.permissions { + display: flex; + height: 43.813px; + padding: 8px 16px; + justify-content: space-between; + align-items: center; + align-self: stretch; + border-bottom: 0.5px solid #2e3042; + border-bottom: 0.5px solid color(display-p3 0.1831 0.189 0.2535); +} +.permissions:hover { + border-bottom: 1px solid rgba(129, 135, 255, 0.25); + border-bottom: 1px solid color(display-p3 0.5098 0.5294 1 / 0.25); + background: rgba(129, 135, 255, 0.05); + background: color(display-p3 0.5098 0.5294 1 / 0.05); +} +.permissionsItem { + display: flex; + align-items: center; + gap: 12px; + flex: 1 0 0; + align-self: stretch; +} +.permissionsItem > p { + color: #d2d3e1; + color: color(display-p3 0.8235 0.8275 0.8784); + font-family: Inter; + font-size: 16px; + font-style: normal; + font-weight: 400; + line-height: normal; +} +.deleteBtn { + display: flex; + align-items: center; + align-self: stretch; +} +.deleteSvg { + display: flex; + padding: 6px; + flex-direction: column; + justify-content: center; + align-items: center; + border: 1px solid #959aff00; + color: #969af9; + aspect-ratio: 1/1; + border-radius: 100px; +} + +.deleteSvg:hover { + color: #fff; + stroke-width: 1px; + stroke: color(display-p3 1 1 1); + border-radius: 100px; + border: 1px solid #959aff; + border: 1px solid color(display-p3 0.5892 0.6031 0.9766); + background: linear-gradient(180deg, #696b95 0%, #20202d 100%); + background: linear-gradient( + 180deg, + color(display-p3 0.4118 0.4196 0.5725) 0%, + color(display-p3 0.1241 0.1265 0.1725) 100% + ); +} + +.permissionDefaultState { + display: flex; + height: 43.813px; + padding: 8px 16px; + justify-content: center; + align-items: center; + align-self: stretch; +} +.permissionDefaultState p { + display: flex; + justify-content: center; + align-items: center; + gap: 12px; + flex: 1 0 0; + align-self: stretch; + color: #85869b; + color: color(display-p3 0.5216 0.5255 0.6); + font-family: Inter; + font-size: 16px; + font-style: normal; + font-weight: 400; + line-height: normal; +} diff --git a/frontend/src/app/components/searchbar/SearchBar.jsx b/frontend/src/app/components/searchbar/SearchBar.jsx new file mode 100644 index 0000000..40a317a --- /dev/null +++ b/frontend/src/app/components/searchbar/SearchBar.jsx @@ -0,0 +1,35 @@ +import React from "react"; +import searchBarStyle from "./styles.module.css"; + +const SearchBar = () => { + return ( +
+ +
+ + + +
+
+ ); +}; + +export default SearchBar; diff --git a/frontend/src/app/components/searchbar/styles.module.css b/frontend/src/app/components/searchbar/styles.module.css new file mode 100644 index 0000000..6f5c566 --- /dev/null +++ b/frontend/src/app/components/searchbar/styles.module.css @@ -0,0 +1,46 @@ +.searchBarContainer { + display: flex; + width: 260px; + justify-content: space-between; + padding: 6px 6px 6px 12px; + + align-items: center; + border-radius: 6px; + border: 1px solid #31324a; + + border: 1px solid color(display-p3 0.1922 0.1961 0.2824); +} +.searchBarContainer > .input { + background-color: red; + outline: none; + border: none; + width: 100%; + + color: #85869b; + color: color(display-p3 0.5216 0.5255 0.6); + font-family: Inter; + font-size: 18px; + font-style: normal; + font-weight: 400; + line-height: normal; + letter-spacing: -0.09px; + caret-color: #575bc7; +} + +.input::placeholder { + color: #85869b; + color: color(display-p3 0.5216 0.5255 0.6); + text-align: start; + font-family: Inter; + font-size: 18px; + font-style: normal; + font-weight: 400; + line-height: normal; + letter-spacing: -0.09px; +} + +.icon { + display: flex; + align-items: center; + justify-content: center; +}