Skip to content

Commit

Permalink
feat(Grid)!: remove top-level sub-component(s) (#1703)
Browse files Browse the repository at this point in the history
- also mark as deprecated, linking to TW documentation
  • Loading branch information
booc0mtaco authored Jul 19, 2023
1 parent e6cc9e5 commit c8925c9
Show file tree
Hide file tree
Showing 25 changed files with 257 additions and 267 deletions.
14 changes: 7 additions & 7 deletions .storybook/components/DesignTokens/Tier1/Animation.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Component } from 'react';
import { Grid, GridItem, Section } from '../../../../src';
import { Grid, Section } from '../../../../src';
import filterTokens from '../../../util/filterTokens';
import { TokenSpecimen } from '../../TokenSpecimen/TokenSpecimen';

Expand All @@ -11,7 +11,7 @@ export class Tier1Animation extends Component {
<Grid>
{filterTokens(`eds-anim-fade`).map(function (listItem) {
return (
<GridItem key={listItem.name}>
<Grid.Item key={listItem.name}>
<TokenSpecimen
inlineStyles={{
transitionDuration: `var(${listItem.name})`,
Expand All @@ -20,7 +20,7 @@ export class Tier1Animation extends Component {
value={listItem.value}
variant="animation-fade"
/>
</GridItem>
</Grid.Item>
);
})}
</Grid>
Expand All @@ -30,7 +30,7 @@ export class Tier1Animation extends Component {
<Grid>
{filterTokens(`eds-anim-move`).map(function (listItem) {
return (
<GridItem key={listItem.name}>
<Grid.Item key={listItem.name}>
<TokenSpecimen
inlineStyles={{
transitionDuration: `var(${listItem.name})`,
Expand All @@ -39,7 +39,7 @@ export class Tier1Animation extends Component {
value={listItem.value}
variant="animation-move"
/>
</GridItem>
</Grid.Item>
);
})}
</Grid>
Expand All @@ -49,7 +49,7 @@ export class Tier1Animation extends Component {
<Grid>
{filterTokens(`eds-anim-ease`).map(function (listItem) {
return (
<GridItem key={listItem.name}>
<Grid.Item key={listItem.name}>
<TokenSpecimen
inlineStyles={{
transitionTimingFunction: `var(${listItem.name})`,
Expand All @@ -58,7 +58,7 @@ export class Tier1Animation extends Component {
value={listItem.value}
variant="animation-fade"
/>
</GridItem>
</Grid.Item>
);
})}
</Grid>
Expand Down
10 changes: 5 additions & 5 deletions .storybook/components/DesignTokens/Tier1/Borders.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Component } from 'react';
import { Grid, GridItem, Section } from '../../../../src';
import { Grid, Section } from '../../../../src';
import filterTokens from '../../../util/filterTokens';
import { TokenSpecimen } from '../../TokenSpecimen/TokenSpecimen';

Expand All @@ -11,7 +11,7 @@ export class Tier1Borders extends Component {
<Grid>
{filterTokens(`eds-border-width`).map(function (listItem) {
return (
<GridItem key={listItem.name}>
<Grid.Item key={listItem.name}>
<TokenSpecimen
inlineStyles={{
backgroundColor: 'transparent',
Expand All @@ -22,7 +22,7 @@ export class Tier1Borders extends Component {
name={listItem.name}
value={listItem.value}
/>
</GridItem>
</Grid.Item>
);
})}
</Grid>
Expand All @@ -32,7 +32,7 @@ export class Tier1Borders extends Component {
<Grid>
{filterTokens(`eds-border-radius`).map(function (listItem) {
return (
<GridItem key={listItem.name}>
<Grid.Item key={listItem.name}>
<TokenSpecimen
inlineStyles={{
backgroundColor: 'transparent',
Expand All @@ -44,7 +44,7 @@ export class Tier1Borders extends Component {
name={listItem.name}
value={listItem.value}
/>
</GridItem>
</Grid.Item>
);
})}
</Grid>
Expand Down
6 changes: 3 additions & 3 deletions .storybook/components/DesignTokens/Tier1/FontFamilies.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Grid, GridItem, Section } from '../../../../src';
import { Grid, Section } from '../../../../src';
import filterTokens from '../../../util/filterTokens';
import { TokenSpecimen } from '../../TokenSpecimen/TokenSpecimen';

Expand All @@ -8,7 +8,7 @@ export const FontFamilies = () => (
<Grid>
{filterTokens(`eds-font-family`).map(function (listItem) {
return (
<GridItem key={listItem.name}>
<Grid.Item key={listItem.name}>
<TokenSpecimen
inlineStyles={{
fontFamily: `var(${listItem.name})`,
Expand All @@ -17,7 +17,7 @@ export const FontFamilies = () => (
value={listItem.value}
variant="typography-title"
/>
</GridItem>
</Grid.Item>
);
})}
</Grid>
Expand Down
6 changes: 3 additions & 3 deletions .storybook/components/DesignTokens/Tier1/FontSizes.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Grid, GridItem, Section } from '../../../../src';
import { Grid, Section } from '../../../../src';
import filterTokens from '../../../util/filterTokens';
import { TokenSpecimen } from '../../TokenSpecimen/TokenSpecimen';

Expand All @@ -8,7 +8,7 @@ export const FontSizes = () => (
<Grid>
{filterTokens(`eds-font-size`).map(function (listItem) {
return (
<GridItem key={listItem.name}>
<Grid.Item key={listItem.name}>
<TokenSpecimen
inlineStyles={{
fontSize: `var(${listItem.name})`,
Expand All @@ -17,7 +17,7 @@ export const FontSizes = () => (
value={listItem.value}
variant="typography-title"
/>
</GridItem>
</Grid.Item>
);
})}
</Grid>
Expand Down
6 changes: 3 additions & 3 deletions .storybook/components/DesignTokens/Tier1/FontWeights.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Grid, GridItem, Section } from '../../../../src';
import { Grid, Section } from '../../../../src';
import filterTokens from '../../../util/filterTokens';
import { TokenSpecimen } from '../../TokenSpecimen/TokenSpecimen';

Expand All @@ -8,7 +8,7 @@ export const FontWeights = () => (
<Grid>
{filterTokens(`eds-font-weight`).map(function (listItem) {
return (
<GridItem key={listItem.name}>
<Grid.Item key={listItem.name}>
<TokenSpecimen
inlineStyles={{
fontWeight: `var(${listItem.name})`,
Expand All @@ -17,7 +17,7 @@ export const FontWeights = () => (
value={listItem.value}
variant="typography-title"
/>
</GridItem>
</Grid.Item>
);
})}
</Grid>
Expand Down
6 changes: 3 additions & 3 deletions .storybook/components/DesignTokens/Tier1/Layout.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Component } from 'react';
import { Grid, GridItem, Section } from '../../../../src';
import { Grid, Section } from '../../../../src';
import filterTokens from '../../../util/filterTokens';
import { TokenSpecimen } from '../../TokenSpecimen/TokenSpecimen';

Expand All @@ -11,15 +11,15 @@ export class Tier1Layout extends Component {
<Grid>
{filterTokens(`eds-l-`).map(function (listItem) {
return (
<GridItem key={listItem.name}>
<Grid.Item key={listItem.name}>
<TokenSpecimen
inlineStyles={{
maxWidth: `var(${listItem.name})`,
}}
name={listItem.name}
value={listItem.value}
/>
</GridItem>
</Grid.Item>
);
})}
</Grid>
Expand Down
6 changes: 3 additions & 3 deletions .storybook/components/DesignTokens/Tier1/Shadows.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Component } from 'react';
import { Grid, GridItem, Section } from '../../../../src';
import { Grid, Section } from '../../../../src';
import filterTokens from '../../../util/filterTokens';
import { TokenSpecimen } from '../../TokenSpecimen/TokenSpecimen';

Expand All @@ -11,7 +11,7 @@ export class Tier1Shadows extends Component {
<Grid>
{filterTokens(`eds-box-shadow-`).map(function (listItem) {
return (
<GridItem key={listItem.name}>
<Grid.Item key={listItem.name}>
<TokenSpecimen
inlineStyles={{
backgroundColor: '#fbfbfb',
Expand All @@ -20,7 +20,7 @@ export class Tier1Shadows extends Component {
name={listItem.name}
value={listItem.value}
/>
</GridItem>
</Grid.Item>
);
})}
</Grid>
Expand Down
10 changes: 5 additions & 5 deletions .storybook/components/DesignTokens/Tier1/Sizes.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Component } from 'react';
import { Grid, GridItem, Section } from '../../../../src';
import { Grid, Section } from '../../../../src';
import filterTokens from '../../../util/filterTokens';
import { TokenSpecimen } from '../../TokenSpecimen/TokenSpecimen';

Expand All @@ -10,7 +10,7 @@ export class Tier1Sizes extends Component {
<Section title="Base Grid Size">
<Grid>
{filterTokens('eds-size-base').map((listItem) => (
<GridItem key={listItem.name}>
<Grid.Item key={listItem.name}>
<TokenSpecimen
comment="Calculated from a multiple of the base font size --eds-font-size-base"
inlineStyles={{
Expand All @@ -21,7 +21,7 @@ export class Tier1Sizes extends Component {
name={listItem.name}
value={listItem.value}
/>
</GridItem>
</Grid.Item>
))}
</Grid>
</Section>
Expand All @@ -31,7 +31,7 @@ export class Tier1Sizes extends Component {
.filter((listItem) => !listItem.name.endsWith('base-unit'))
.map(function (listItem) {
return (
<GridItem key={listItem.name}>
<Grid.Item key={listItem.name}>
<TokenSpecimen
inlineStyles={{
width: `var(${listItem.name})`,
Expand All @@ -41,7 +41,7 @@ export class Tier1Sizes extends Component {
name={listItem.name}
value={listItem.value}
/>
</GridItem>
</Grid.Item>
);
})}
</Grid>
Expand Down
14 changes: 7 additions & 7 deletions .storybook/components/DesignTokens/Tier1/TypographyTokens.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Component } from 'react';
import { Grid, GridItem, Section } from '../../../../src';
import { Grid, Section } from '../../../../src';
import filterTokens from '../../../util/filterTokens';
import { TokenSpecimen } from '../../TokenSpecimen/TokenSpecimen';

Expand All @@ -11,7 +11,7 @@ export class Tier1TypographyTokens extends Component {
<Grid>
{filterTokens(`eds-font-family`).map(function (listItem) {
return (
<GridItem key={listItem.name}>
<Grid.Item key={listItem.name}>
<TokenSpecimen
inlineStyles={{
fontFamily: `var(${listItem.name})`,
Expand All @@ -20,7 +20,7 @@ export class Tier1TypographyTokens extends Component {
value={listItem.value}
variant="typography-title"
/>
</GridItem>
</Grid.Item>
);
})}
</Grid>
Expand All @@ -30,7 +30,7 @@ export class Tier1TypographyTokens extends Component {
<Grid>
{filterTokens(`eds-font-size`).map(function (listItem) {
return (
<GridItem key={listItem.name}>
<Grid.Item key={listItem.name}>
<TokenSpecimen
inlineStyles={{
fontSize: `var(${listItem.name})`,
Expand All @@ -39,7 +39,7 @@ export class Tier1TypographyTokens extends Component {
value={listItem.value}
variant="typography-title"
/>
</GridItem>
</Grid.Item>
);
})}
</Grid>
Expand All @@ -49,7 +49,7 @@ export class Tier1TypographyTokens extends Component {
<Grid>
{filterTokens(`eds-font-weight`).map(function (listItem) {
return (
<GridItem key={listItem.name}>
<Grid.Item key={listItem.name}>
<TokenSpecimen
inlineStyles={{
fontWeight: `var(${listItem.name})`,
Expand All @@ -58,7 +58,7 @@ export class Tier1TypographyTokens extends Component {
value={listItem.value}
variant="typography-title"
/>
</GridItem>
</Grid.Item>
);
})}
</Grid>
Expand Down
6 changes: 3 additions & 3 deletions .storybook/components/DesignTokens/Tier2/Borders.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Component } from 'react';
import { Grid, GridItem, Section } from '../../../../src';
import { Grid, Section } from '../../../../src';
import filterTokens from '../../../util/filterTokens';
import { TokenSpecimen } from '../../TokenSpecimen/TokenSpecimen';

Expand All @@ -11,7 +11,7 @@ export class Tier2Borders extends Component {
<Grid>
{filterTokens(`eds-theme-border-width`).map(function (listItem) {
return (
<GridItem key={listItem.name}>
<Grid.Item key={listItem.name}>
<TokenSpecimen
inlineStyles={{
backgroundColor: 'transparent',
Expand All @@ -22,7 +22,7 @@ export class Tier2Borders extends Component {
name={listItem.name}
value={listItem.value}
/>
</GridItem>
</Grid.Item>
);
})}
</Grid>
Expand Down
Loading

0 comments on commit c8925c9

Please sign in to comment.