Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 0 additions & 12 deletions src/community/docs/scale-layout/development.mdx

This file was deleted.

59 changes: 59 additions & 0 deletions src/tedi/components/layout/grid/col.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import { Meta, StoryFn, StoryObj } from '@storybook/react';

import { Heading } from '../../base/typography/heading/heading';
import { VerticalSpacing } from '../vertical-spacing';
import { Col } from './col';
import { Row } from './row';

/**
* <a href="https://www.tedi.ee/1ee8444b7/p/24da19-grid" target="_BLANK">Zeroheight ↗</a><br/>
* <a hreg="https://getbootstrap.com/docs/5.1/layout/grid" target="_BLANK">Boostrap docs ↗</a> <br/>

Choose a reason for hiding this comment

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

Typo in href attribute name.

* Row and Col components are inspired by Bootstrap V5 Grid System. <br/> You can use different Bootstrap grid classes
* through component props.
*/

const meta: Meta<typeof Col> = {
title: 'Tedi-Ready/Layout/Grid/Col',
component: Col,
subcomponents: { Row } as never,
parameters: {
status: { type: 'devComponent' },
},
};

export default meta;
type Story = StoryObj<typeof Col>;

export const Default: StoryFn = () => (
<VerticalSpacing size={2}>
<VerticalSpacing size={0.5}>
<Heading element="h4">Label/Value pairs</Heading>
<Row>
<Col>
<dl>
<Row>
<Col element="dt" width={2}>
<strong>Label</strong>
</Col>
<Col element="dd">Value</Col>
</Row>
<Row>
<Col element="dt" width={2}>
<strong>Label</strong>
</Col>
<Col element="dd">Value</Col>
</Row>
</dl>
</Col>
</Row>
</VerticalSpacing>

<VerticalSpacing size={0.5}>
<Heading element="h4">Lists</Heading>
<Row element="ul" direction="column">
<Col>Item 1</Col>
<Col>Item 2</Col>
</Row>
</VerticalSpacing>
</VerticalSpacing>
);
120 changes: 0 additions & 120 deletions src/tedi/components/layout/grid/grid.stories.tsx

This file was deleted.

59 changes: 59 additions & 0 deletions src/tedi/components/layout/grid/row.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import { Meta, StoryFn, StoryObj } from '@storybook/react';

import { Col } from './col';
import { Row, RowProps } from './row';

/**
* <a href="https://www.tedi.ee/1ee8444b7/p/24da19-grid" target="_BLANK">Zeroheight ↗</a><br/>
* <a hreg="https://getbootstrap.com/docs/5.1/layout/grid" target="_BLANK">Boostrap docs ↗</a> <br/>

Choose a reason for hiding this comment

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

Same typo here as well.

* Row and Col components are inspired by Bootstrap V5 Grid System. <br/> You can use different Bootstrap grid classes
* through component props.
*/

const meta: Meta<typeof Row> = {
title: 'Tedi-Ready/Layout/Grid/Row',
component: Row,
subcomponents: { Col } as never,
parameters: {
status: { type: 'devComponent' },
},
};

export default meta;
type Story = StoryObj<typeof Row>;

const Template: StoryFn<RowProps> = (args) => (
<div>
<Row className="example-row" {...args}>
<Col className="example-box">Col-1</Col>
<Col className="example-box">Col-2</Col>
<Col className="example-box">Col-3</Col>
</Row>

<Row className="example-row" justifyContent="between" {...args}>
<Col className="example-box" sm={2} lg={3}>
Col-1
</Col>
<Col className="example-box" sm={2} lg={3}>
Col-2
</Col>
<Col className="example-box" sm={2} lg={3}>
Col-3
</Col>
</Row>

<Row className="example-row" cols={1} md={2} lg={3} xl={{ justifyContent: 'around' }} {...args}>
<Col className="example-box" xl={{ width: 3, order: 'last' }}>
Col-1
</Col>
<Col className="example-box" xl={{ width: 3, order: 0 }}>
Col-2
</Col>
<Col className="example-box" xl={{ width: 3, order: 'first' }}>
Col-3
</Col>
</Row>
</div>
);

export const Default: Story = { render: Template };
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { VerticalSpacing, VerticalSpacingProps } from './vertical-spacing';

const meta: Meta<typeof VerticalSpacing> = {
component: VerticalSpacing,
title: 'Tedi-Ready/Components/Helpers/VerticalSpacing',
title: 'Tedi-Ready/Layout/VerticalSpacing',
subcomponents: {
'VerticalSpacing.Item': VerticalSpacing.Item,
} as never,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ColumnDef, createColumnHelper } from '@tanstack/react-table';

import { Text } from '../../../tedi/components/base/typography/text/text';
import { Breakpoint, CustomizeTableCell, getBackgroundColorClass, Table } from '../../index';
import { Breakpoint, CustomizeTableCell, getBackgroundColorClass, Table } from '../../../community/index';
import { Text } from '../../components/base/typography/text/text';

interface BreakpointRow {
type: 'mobile' | 'tablet' | 'desktop';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Meta, Title, Subtitle, Unstyled } from '@storybook/blocks';
import Grid from './grid.tsx';

<Meta name="Spacing system" title="Documentation/Scale and layout/Grid and breakpoints" />
<Meta name="Spacing system" title="TEDI-Ready/Layout/Grid/Grid and breakpoints" />

<Unstyled>
<Grid />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Title } from '@storybook/blocks';

import { Heading } from '../../../tedi/components/base/typography/heading/heading';
import { Col, Row } from '../../../tedi/components/layout/grid';
import { VerticalSpacing } from '../../../tedi/components/layout/vertical-spacing';
import { Separator } from '../../../tedi/components/misc/separator/separator';
import { Heading } from '../../components/base/typography/heading/heading';
import { Col, Row } from '../../components/layout/grid';
import { VerticalSpacing } from '../../components/layout/vertical-spacing';
import { Separator } from '../../components/misc/separator/separator';
import BreakingpointsTable from './breaking-points';

const Grid = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Meta, Unstyled } from '@storybook/blocks';

import Spacing from './spacing.tsx';

<Meta name="Spacing system" title="Documentation/Scale and layout/Spacing system" />
<Meta name="Spacing system" title="TEDI-Ready/Layout/Grid/Spacing system" />

<Unstyled>
<Spacing />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Title } from '@storybook/blocks';
import { ColumnDef, createColumnHelper } from '@tanstack/react-table';

import { Heading } from '../../../tedi/components/base/typography/heading/heading';
import { Col, Row } from '../../../tedi/components/layout/grid';
import { VerticalSpacing } from '../../../tedi/components/layout/vertical-spacing';
import { Separator } from '../../../tedi/components/misc/separator/separator';
import { Table } from '../../index';
import { Table } from '../../../community/index';
import { Heading } from '../../components/base/typography/heading/heading';
import { Col, Row } from '../../components/layout/grid';
import { VerticalSpacing } from '../../components/layout/vertical-spacing';
import { Separator } from '../../components/misc/separator/separator';

const Spacing = () => {
return (
Expand Down
Loading