Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added List component to the sistent components page #6086

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
96771e4
Added List component to the sistent components page
csengineer1990 Nov 20, 2024
9f5a6b7
Merge branch 'master' into master
csengineer1990 Nov 20, 2024
eb49d84
Updates in List component to the sistent components page
csengineer1990 Nov 22, 2024
3ab022b
Merge branch 'layer5io:master' into master
csengineer1990 Nov 22, 2024
458e7c1
Updated feature data from source repository
l5io Nov 26, 2024
ba2ea46
Updated feature data from source repository
l5io Nov 27, 2024
d28c247
Updated feature data from source repository
l5io Dec 5, 2024
041ab14
"Update id for 'List' component in componentsData array index file."
csengineer1990 Dec 5, 2024
fe0b59a
Merge branch 'master' of https://github.com/csengineer1990/layer5
csengineer1990 Dec 5, 2024
41ee8a9
Updated feature data from source repository
l5io Dec 6, 2024
458e964
Updated feature data from source repository
l5io Dec 7, 2024
b79062e
Added List component to the sistent components page
csengineer1990 Dec 15, 2024
2f84a3a
Updating Merge branch 'master' of https://github.com/csengineer1990/l…
csengineer1990 Dec 15, 2024
e38d79f
Resolved Merge Conflict
csengineer1990 Nov 20, 2024
e176d60
Updates in List component to the sistent components page
csengineer1990 Nov 22, 2024
a8df902
"Update id for 'List' component in componentsData array index file."
csengineer1990 Dec 5, 2024
f4ca16e
Solved Conflict and Updated feature data from source repository
l5io Dec 6, 2024
b05dbba
Updated feature data from source repository
l5io Dec 7, 2024
d2fe14d
To solve conflict removed Dirctory and files
csengineer1990 Dec 16, 2024
fddf86f
Merge branch 'layer5io:master' into master
csengineer1990 Dec 16, 2024
bc3c90d
Updated feature data from spreadsheet
l5io Dec 17, 2024
374d2cf
Merge branch 'layer5io:master' into master
csengineer1990 Dec 17, 2024
3d8042a
Merge branch 'layer5io:master' into master
csengineer1990 Dec 18, 2024
c351c30
To solve conflict update the index.js file.
csengineer1990 Dec 18, 2024
7bca8c5
Updated feature data from spreadsheet
l5io Dec 19, 2024
cc194c9
Added List component to the sistent components page with required cha…
csengineer1990 Dec 19, 2024
3722bc5
Update: Adjusted index and code files for the List component.
csengineer1990 Dec 25, 2024
eb021c2
Reverted feature_data.json files to previous states: root to b05dbbaf…
csengineer1990 Dec 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,458 changes: 1,458 additions & 0 deletions feature_data.json

Large diffs are not rendered by default.

22 changes: 19 additions & 3 deletions src/sections/Pricing/feature_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -949,11 +949,11 @@
"category": "Catalog",
"functionOrder": "708",
"function": "Approve Catalog Request",
"feature": "Change management for the curation of content published in the catalog.",
"feature": "Change management through a process of curation of content to be published in the catalog.",
"subscription_tier": "Enterprise",
"comparison_tiers": {
"free": "",
"teamDesigner": "",
"teamDesigner": "x",
"teamOperator": "",
"enterprise": "x"
},
Expand Down Expand Up @@ -1119,6 +1119,22 @@
},
"docs": "https://docs.layer5.io/cloud/getting-started/getting-started-with-layer5-account/#7-viewing-your-layer5-profile"
},
{
"theme": "",
"categoryOrder": "9",
"category": "Managed Service Provider",
"functionOrder": "905",
"function": "Multi-tenancy",
"feature": "Hierarchical permissioning. Enforcement of tenancy.",
"subscription_tier": "",
"comparison_tiers": {
"free": "",
"teamDesigner": "",
"teamOperator": "",
"enterprise": ""
},
"docs": ""
},
{
"theme": "",
"categoryOrder": "10",
Expand Down Expand Up @@ -1147,7 +1163,7 @@
"free": "",
"teamDesigner": "x",
"teamOperator": "x",
"enterprise": "x"
"enterprise": ""
},
"docs": ""
},
Expand Down
8 changes: 8 additions & 0 deletions src/sections/Projects/Sistent/components/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,14 @@ const componentsData = [
url: "/projects/sistent/components/backdrop",
src: "/backdrop",
},
{
id: 13,
name: "List",
description:
"Lists are essential UI elements that allow items to be organized sequentially in a structured and readable way. They help users view, select, and interact with multiple items conveniently.",
url: "/projects/sistent/components/list",
src: "/list",
},
];

module.exports = { componentsData };
1 change: 0 additions & 1 deletion src/sections/Projects/Sistent/components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { FaArrowRight } from "@react-icons/all-files/fa/FaArrowRight";
import { Link } from "gatsby";
import { componentsData } from "./content";


const SistentComponents = () => {
const [searchQuery, setSearchQuery] = useState("");
const { queryResults, searchData } = useDataList(
Expand Down
20 changes: 20 additions & 0 deletions src/sections/Projects/Sistent/components/list/code-block.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import React, { useState } from "react";
import Code from "../../../../../components/CodeBlock";

export const CodeBlock = ({ name, code }) => {
const [showCode, setShowCode] = useState(false);
const onChange = () => {
setShowCode((prev) => !prev);
};
return (
<div className="show-code">
<input type="checkbox" name={name} id={name} onChange={onChange} />
<label htmlFor={name} className="label">
Show Code
</label>
{showCode && (
<Code codeString={code} language="javascript" />
)}
</div>
);
};
185 changes: 185 additions & 0 deletions src/sections/Projects/Sistent/components/list/code.js
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

their is a a and unwanted indentation under the code section of the list It appears to be unpleasant.
image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, sir.

Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
import React from "react";
import { navigate } from "gatsby";
import { useLocation } from "@reach/router";
import { List, ListItemIcon, ListItemAvatar, ListItemText,ListItem,ListSubheader, ListItemButton, SistentThemeProvider, Divider } from "@layer5/sistent";
import { CodeBlock } from "./code-block";
import { SistentLayout } from "../../sistent-layout";
import TabButton from "../../../../../reusecore/Button";
import { useStyledDarkMode } from "../../../../../theme/app/useStyledDarkMode";

const codes = [
// Basic List with List Items
` <List>
<ListItem><ListItemText primary="Layer5 Sistent 1" /></ListItem>
<ListItem><ListItemText primary="Layer5 Sistent 2" /></ListItem>
<ListItem><ListItemText primary="Layer5 Sistent 3" /></ListItem>
</List> `,
// List with Icons in List Items
` <List>
<ListItem><ListItemIcon>🌟</ListItemIcon><ListItemText primary="Layer5 Sistent Starred" /></ListItem>
<ListItem><ListItemIcon>📅</ListItemIcon><ListItemText primary="Layer5 Sistent Calender" /></ListItem>
<ListItem><ListItemIcon>🔔</ListItemIcon><ListItemText primary="Layer5 Sistent Notification" /></ListItem>
</List> `,
// List with Avatars
` <List>
<ListItem><ListItemAvatar>👤</ListItemAvatar><ListItemText primary="Layer5 Sistent User 1" /></ListItem>
<ListItem><ListItemAvatar>👩‍💻</ListItemAvatar><ListItemText primary="Layer5 Sistent User 2" /></ListItem>
<ListItem><ListItemAvatar>👤</ListItemAvatar><ListItemText primary="Layer5 Sistent User 3" /></ListItem>
</List> `,
// List with Subheader
` <List>
<ListSubheader>Section 1</ListSubheader>
<ListItem><ListItemText primary="Layer5 Sistent A" /></ListItem>
<ListItem><ListItemText primary="Layer5 Sistent B" /></ListItem>
<ListSubheader>Section 2</ListSubheader>
<ListItem><ListItemText primary="Layer5 Sistent C" /></ListItem>
<ListItem><ListItemText primary="Layer5 Sistent D" /></ListItem>
</List> `,
// List with Action Buttons
` <List>
<ListItemButton onClick={() => alert("Clicked!")}> Layer5 Sistent Action 1</ListItemButton>
<ListItemButton onClick={() => alert("Clicked!")}>Layer5 Sistent Action 2</ListItemButton>
</List> `,
];

const ListCode = () => {
const location = useLocation();
const { isDark } = useStyledDarkMode();

return (
<SistentLayout title="List">
<div className="content">
<a id="Identity"><h2>List</h2></a>
<p>
The List component displays a list of items in a structured and
accessible manner. Variants include simple lists, lists with icons,
lists with avatars, and lists with action buttons.
</p>

<div className="filterBtns">
<TabButton
className={location.pathname === "/projects/sistent/components/list" ? "active" : ""}
onClick={() => navigate("/projects/sistent/components/list")}
title="Overview"
/>
<TabButton
className={location.pathname === "/projects/sistent/components/list/guidance" ? "active" : ""}
onClick={() => navigate("/projects/sistent/components/list/guidance")}
title="Guidance"
/>
<TabButton
className={location.pathname === "/projects/sistent/components/list/code" ? "active" : ""}
onClick={() => navigate("/projects/sistent/components/list/code")}
title="Code"
/>
</div>
<div className="main-content">
{/* Simple List */}
<a id="Simple List"><h3>Simple List</h3></a>
<p>This is a basic list with plain text items.</p>
<div className="showcase">
<div className="items">

<SistentThemeProvider initialMode={isDark ? "dark" : "light"}>
<List>
<ListItem><ListItemText primary="Layer5 Sistent Item 1" /></ListItem>
<ListItem><ListItemText primary="Layer5 Sistent Item 2" /></ListItem>
<ListItem><ListItemText primary="Layer5 Sistent Item 3" /></ListItem>
</List>
</SistentThemeProvider>

</div>
<CodeBlock name="simple-list" code={codes[0]} />
</div>

{/* List with Icons */}
<a id="List With Icons"><h3>List with Icons</h3></a>
<p>List items can be paired with icons to add visual cues.</p>
<div className="showcase">
<div className="items">
<SistentThemeProvider initialMode={isDark ? "dark" : "light"}>
<List>
<ListItem>
<ListItemIcon>🌟</ListItemIcon>
<ListItemText primary="Layer5 Sistent Starred" />
</ListItem>
<ListItem>
<ListItemIcon>📅</ListItemIcon>
<ListItemText primary="Layer5 Sistent Calendar" />
</ListItem>
<ListItem>
<ListItemIcon>🔔</ListItemIcon>
<ListItemText primary="Layer5 Sistent Notification" />
</ListItem>
</List>
</SistentThemeProvider>
</div>
<CodeBlock name="icon-list" code={codes[1]} />
</div>

{/* List with Avatars */}
<a id="List With Avatars"><h3>List with Avatars</h3></a>
<p>Use avatars for list items representing people or entities.</p>
<div className="showcase">
<div className="items">
<SistentThemeProvider initialMode={isDark ? "dark" : "light"}>
<List>
<ListItem><ListItemAvatar>👤</ListItemAvatar><ListItemText primary="Layer5 Sistent User 1" /></ListItem>
<ListItem><ListItemAvatar>👩‍💻</ListItemAvatar><ListItemText primary="Layer5 Sistent User 2" /></ListItem>
<ListItem><ListItemAvatar>👩‍💻</ListItemAvatar><ListItemText primary="Layer5 Sistent User 3" /></ListItem>
</List>
</SistentThemeProvider>
</div>
<CodeBlock name="avatar-list" code={codes[2]} />
</div>

{/* List with Subheader */}
<a id="List With Subheader"><h3>List with Subheader</h3></a>
<p>Organize list items under different subheaders for better grouping.</p>
<div className="showcase">
<div className="items">
<SistentThemeProvider initialMode={isDark ? "dark" : "light"}>
<List>
<ListSubheader>Section 1</ListSubheader>
<ListItem>
<ListItemText primary="Layer5 Sistent Item A" />
</ListItem>
<ListItem>
<ListItemText primary="Layer5 Sistent Item B" />
</ListItem>
<Divider />
<ListSubheader>Section 2</ListSubheader>
<ListItem>
<ListItemText primary="Layer5 Sistent Item C" />
</ListItem>
<ListItem>
<ListItemText primary="Layer5 Sistent Item D" />
</ListItem>
</List>
</SistentThemeProvider>
</div>
<CodeBlock name="subheader-list" code={codes[3]} />
</div>

{/* List with Action Buttons */}
<a id="List With ActionButtons"><h3>List with Action Buttons</h3></a>
<p>Lists can also have action buttons for added interactivity.</p>
<div className="showcase">
<div className="items">
<SistentThemeProvider initialMode={isDark ? "dark" : "light"}>
<List>
{/* <ListItem text="Action Item 1" secondaryAction={<button>Action</button>} />
<ListItem text="Action Item 2" secondaryAction={<button>More</button>} /> */}
<ListItemButton onClick={() => alert("Layer5 List Item 1 Button Clicked!")}> Layer5 Sistent Action Item 1</ListItemButton>
<ListItemButton onClick={() => alert("Layer5 List Item 2 Button Clicked!")}>Layer5 Sistent Action Item 2</ListItemButton>
</List>
</SistentThemeProvider>
</div>
<CodeBlock name="button-list" code={codes[4]} />
</div>
</div>
</div>
</SistentLayout>
);
};
export default ListCode;
Loading
Loading