Skip to content
155 changes: 155 additions & 0 deletions src/collections/sistent/components/table/code.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
---
title: Table Code
component: table
description: Tables are used to organize and display structured data in rows and columns.
---

Tables help display structured data in an organized and readable format.

<a id="Basic Table">
<h2>Basic Table</h2>
</a>

Basic tables are used to display simple structured data.

<div className="showcase">
<div className="items">
<ThemeWrapper>
<Table>
<thead>
<tr>
<th>Name</th>
<th>Role</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<tr>
<td>User 1</td>
<td>Contributor</td>
<td>Active</td>
</tr>
</tbody>
</Table>
</ThemeWrapper>
</div>

<CodeBlock
name="basic-table"
collapsible
code={`<SistentThemeProvider>
<Table>
<thead>
<tr>
<th>Name</th>
<th>Role</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<tr>
<td>User 1</td>
<td>Contributor</td>
<td>Active</td>
</tr>
</tbody>
</Table>
</SistentThemeProvider>`}
/>
</div>

<a id="Striped Table">
<h2>Striped Table</h2>
</a>

Striped tables improve readability by alternating row colors.

<div className="showcase">
<div className="items">
<ThemeWrapper>
<Table striped>
<thead>
<tr>
<th>Name</th>
<th>Role</th>
</tr>
</thead>
<tbody>
<tr>
<td>User 1</td>
<td>Contributor</td>
</tr>
</tbody>
</Table>
</ThemeWrapper>
</div>

<CodeBlock
name="striped-table"
collapsible
code={`<SistentThemeProvider>
<Table striped>
<thead>
<tr>
<th>Name</th>
<th>Role</th>
</tr>
</thead>
<tbody>
<tr>
<td>User 1</td>
<td>Contributor</td>
</tr>
</tbody>
</Table>
</SistentThemeProvider>`}
/>
</div>

<a id="Compact Table">
<h2>Compact Table</h2>
</a>

Compact tables are useful when displaying dense data.

<div className="showcase">
<div className="items">
<ThemeWrapper>
<Table size="small">
<thead>
<tr>
<th>Name</th>
<th>Role</th>
</tr>
</thead>
<tbody>
<tr>
<td>User 1</td>
<td>Contributor</td>
</tr>
</tbody>
</Table>
</ThemeWrapper>
</div>

<CodeBlock
name="compact-table"
collapsible
code={`<SistentThemeProvider>
<Table size="small">
<thead>
<tr>
<th>Name</th>
<th>Role</th>
</tr>
</thead>
<tbody>
<tr>
<td>User 1</td>
<td>Contributor</td>
</tr>
</tbody>
</Table>
</SistentThemeProvider>`}
/>
</div>
99 changes: 99 additions & 0 deletions src/collections/sistent/components/table/guidance.mdx
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

where is the code ?

Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
---
title: Table Guidance
component: table
description: Tables are used to organize and present structured data clearly and efficiently.
---

import Table from "../../../../components/ConformanceTest-Table"

Tables help users scan, compare, and understand structured data. Proper usage ensures readability, accessibility, and efficient information delivery.

<a id="Function">
<h2>Function</h2>
</a>

Tables are used when structured data needs to be displayed clearly. They help users compare values, understand relationships, and analyze information efficiently.

<h3>Data Table</h3>

Data tables are used to display structured information in rows and columns.

<Row className="image-container">
<ThemeWrapper>
<Table>
<thead>
<tr>
<th>Name</th>
<th>Role</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<tr>
<td>User 1</td>
<td>Contributor</td>
<td>Active</td>
</tr>
</tbody>
</Table>
</ThemeWrapper>
</Row>

<h3>Compact Table</h3>

Compact tables are used when space is limited or when displaying large datasets.

<Row className="image-container">
<ThemeWrapper>
<Table size="small">
<thead>
<tr>
<th>Name</th>
<th>Role</th>
</tr>
</thead>
<tbody>
<tr>
<td>User 1</td>
<td>Contributor</td>
</tr>
</tbody>
</Table>
</ThemeWrapper>
</Row>

<a id="Layout">
<h2>Layout</h2>
</a>

Tables should maintain consistent spacing and alignment to improve readability.

### Column Alignment

- Left align text content
- Right align numeric values
- Center align status indicators

### Row Spacing

Maintain consistent row spacing to ensure clarity and readability.

<a id="Best Practices">
<h2>Best Practices</h2>
</a>

- Use headers for clarity
- Avoid overcrowding columns
- Keep rows readable
- Use pagination for large datasets
- Use sorting where applicable
- Maintain consistent spacing

<a id="Accessibility">
<h2>Accessibility</h2>
</a>

- Use semantic table elements
- Provide clear headers
- Maintain contrast for readability
- Ensure keyboard navigation support
78 changes: 78 additions & 0 deletions src/collections/sistent/components/table/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---
name: "Table"
title: Table
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This isn’t right; we have more fields here.

published: true
component: table
description: A table is used to organize and display structured data in rows and columns.
---

Tables are used to present structured data in a clear and organized way. They help users scan information quickly, compare values, and understand relationships between data.

<a id="Types"></a>

## Types

Different types of tables help present information based on use cases and data complexity.

### Basic Table

Basic tables are used to display structured data in rows and columns.

<table>
<thead>
<tr>
<th>Name</th>
<th>Role</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<tr>
<td>User 1</td>
<td>Contributor</td>
<td>Active</td>
</tr>
</tbody>
</table>

### Striped Table

Striped tables improve readability by alternating row colors.

<table>
<thead>
<tr>
<th>Name</th>
<th>Role</th>
</tr>
</thead>
<tbody>
<tr>
<td>User 1</td>
<td>Contributor</td>
</tr>
</tbody>
</table>

<a id="Usage"></a>

## Usage

Tables should be used when:

- Displaying structured data
- Comparing values
- Showing logs or metrics
- Listing users or resources

<a id="Best Practices"></a>

## Best Practices

Best practices for using tables:

- Use headers for clarity
- Avoid too many columns
- Keep rows readable
- Use pagination for large datasets
- Maintain consistent spacing
40 changes: 22 additions & 18 deletions src/components/SistentNavigation/content.js
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This navigation is also incorrect.

Original file line number Diff line number Diff line change
Expand Up @@ -137,27 +137,31 @@ export const content = [
{ id: 101, link: "/projects/sistent/components/switch/guidance", text: "Switch" },
{ id: 102, link: "/projects/sistent/components/switch/code", text: "Switch" },

{ id: 103, link: "/projects/sistent/components/tabs", text: "Tabs" },
{ id: 104, link: "/projects/sistent/components/tabs/guidance", text: "Tabs" },
{ id: 105, link: "/projects/sistent/components/tabs/code", text: "Tabs" },
{ id: 103, link: "/projects/sistent/components/table", text: "Table" },
{ id: 104, link: "/projects/sistent/components/table/guidance", text: "Table" },
{ id: 105, link: "/projects/sistent/components/table/code", text: "Table" },

{ id: 106, link: "/projects/sistent/components/text-field", text: "Text Field" },
{ id: 107, link: "/projects/sistent/components/text-field/guidance", text: "Text Field" },
{ id: 108, link: "/projects/sistent/components/text-field/code", text: "Text Field" },
{ id: 106, link: "/projects/sistent/components/tabs", text: "Tabs" },
{ id: 107, link: "/projects/sistent/components/tabs/guidance", text: "Tabs" },
{ id: 108, link: "/projects/sistent/components/tabs/code", text: "Tabs" },

{ id: 109, link: "/projects/sistent/components/text-input", text: "Text Input" },
{ id: 110, link: "/projects/sistent/components/text-input/guidance", text: "Text Input" },
{ id: 111, link: "/projects/sistent/components/text-input/code", text: "Text Input" },
{ id: 109, link: "/projects/sistent/components/text-field", text: "Text Field" },
{ id: 110, link: "/projects/sistent/components/text-field/guidance", text: "Text Field" },
{ id: 111, link: "/projects/sistent/components/text-field/code", text: "Text Field" },

{ id: 112, link: "/projects/sistent/components/toggle-button", text: "Toggle Button" },
{ id: 113, link: "/projects/sistent/components/toggle-button/guidance", text: "Toggle Button" },
{ id: 114, link: "/projects/sistent/components/toggle-button/code", text: "Toggle Button" },
{ id: 112, link: "/projects/sistent/components/text-input", text: "Text Input" },
{ id: 113, link: "/projects/sistent/components/text-input/guidance", text: "Text Input" },
{ id: 114, link: "/projects/sistent/components/text-input/code", text: "Text Input" },

{ id: 115, link: "/projects/sistent/components/toolbar", text: "Toolbar" },
{ id: 116, link: "/projects/sistent/components/toolbar/guidance", text: "Toolbar" },
{ id: 117, link: "/projects/sistent/components/toolbar/code", text: "Toolbar" },
{ id: 115, link: "/projects/sistent/components/toggle-button", text: "Toggle Button" },
{ id: 116, link: "/projects/sistent/components/toggle-button/guidance", text: "Toggle Button" },
{ id: 117, link: "/projects/sistent/components/toggle-button/code", text: "Toggle Button" },

{ id: 118, link: "/projects/sistent/components/tooltip", text: "Tooltip" },
{ id: 119, link: "/projects/sistent/components/tooltip/guidance", text: "Tooltip" },
{ id: 120, link: "/projects/sistent/components/tooltip/code", text: "Tooltip" },
{ id: 118, link: "/projects/sistent/components/toolbar", text: "Toolbar" },
{ id: 119, link: "/projects/sistent/components/toolbar/guidance", text: "Toolbar" },
{ id: 120, link: "/projects/sistent/components/toolbar/code", text: "Toolbar" },

{ id: 121, link: "/projects/sistent/components/tooltip", text: "Tooltip" },
{ id: 122, link: "/projects/sistent/components/tooltip/guidance", text: "Tooltip" },
{ id: 123, link: "/projects/sistent/components/tooltip/code", text: "Tooltip" },
];
Loading