Skip to content
Merged
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
6 changes: 4 additions & 2 deletions .codesandbox/ci.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"installCommand": "install:codesandbox",
"buildCommand": "build:prod",
"sandboxes": ["react95-template-xkfj0"]
"node": "16",
"sandboxes": [
"react95-template-xkfj0"
]
}
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ module.exports = {
'react/jsx-props-no-spreading': 'off',
'react/no-array-index-key': 'off',
'react/prop-types': 'off',
'react/react-in-jsx-scope': 'off',
'react/require-default-props': 'off',
'react/static-property-placement': ['error', 'static public field']
},
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
"lint": "eslint --ext .js,.ts,.tsx src",
"lint:fix": "yarn run lint --fix",
"semantic-release": "semantic-release",
"install:codesandbox": "yarn --ignore-engines",
"cz": "git-cz"
},
"peerDependencies": {
Expand Down
2 changes: 2 additions & 0 deletions src/Anchor/Anchor.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import { render } from '@testing-library/react';

import { Anchor } from './Anchor';
Expand Down
1 change: 1 addition & 0 deletions src/Anchor/Anchor.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ComponentMeta } from '@storybook/react';
import React from 'react';
import styled from 'styled-components';

import { Anchor } from './Anchor';
Expand Down
1 change: 1 addition & 0 deletions src/AppBar/AppBar.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { render } from '@testing-library/react';
import React from 'react';

import { AppBar } from './AppBar';

Expand Down
14 changes: 7 additions & 7 deletions src/AppBar/AppBar.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import React from 'react';
import styled from 'styled-components';
import { ComponentMeta } from '@storybook/react';
import React, { useState } from 'react';
import {
AppBar,
Toolbar,
TextField,
Button,
Divider,
List,
ListItem,
Divider
TextField,
Toolbar
} from 'react95';
import { ComponentMeta } from '@storybook/react';
import styled from 'styled-components';
import logoIMG from '../assets/images/logo.png';

const Wrapper = styled.div`
Expand All @@ -24,7 +24,7 @@ export default {
} as ComponentMeta<typeof AppBar>;

export function Default() {
const [open, setOpen] = React.useState(false);
const [open, setOpen] = useState(false);

return (
<AppBar>
Expand Down
1 change: 1 addition & 0 deletions src/Avatar/Avatar.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { render } from '@testing-library/react';
import React from 'react';

import { renderWithTheme, theme } from '../../test/utils';

Expand Down
1 change: 1 addition & 0 deletions src/Avatar/Avatar.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ComponentMeta } from '@storybook/react';
import React from 'react';
import { Avatar } from 'react95';
import styled from 'styled-components';

Expand Down
2 changes: 2 additions & 0 deletions src/Bar/Bar.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import { renderWithTheme } from '../../test/utils';

import { Bar } from './Bar';
Expand Down
1 change: 1 addition & 0 deletions src/Bar/Bar.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ComponentMeta } from '@storybook/react';
import React from 'react';
import { AppBar, Bar, Button, Toolbar } from 'react95';
import styled from 'styled-components';

Expand Down
3 changes: 2 additions & 1 deletion src/Button/Button.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { render, fireEvent } from '@testing-library/react';
import { fireEvent, render } from '@testing-library/react';
import React from 'react';

import { renderWithTheme, theme } from '../../test/utils';
import { blockSizes } from '../common/system';
Expand Down
2 changes: 1 addition & 1 deletion src/Button/Button.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ComponentMeta } from '@storybook/react';
import { useState } from 'react';
import React, { useState } from 'react';
import {
Button,
Cutout,
Expand Down
2 changes: 2 additions & 0 deletions src/Checkbox/Checkbox.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import { renderWithTheme } from '../../test/utils';
import { Checkbox } from './Checkbox';

Expand Down
1 change: 1 addition & 0 deletions src/ColorInput/ColorInput.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { fireEvent } from '@testing-library/react';
import React from 'react';
import { renderWithTheme } from '../../test/utils';
import { ColorInput } from './ColorInput';

Expand Down
1 change: 1 addition & 0 deletions src/ColorInput/ColorInput.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ComponentMeta } from '@storybook/react';
import React from 'react';
import styled from 'styled-components';

import { ColorInput, Cutout } from 'react95';
Expand Down
1 change: 1 addition & 0 deletions src/Counter/Counter.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';

import { renderWithTheme } from '../../test/utils';

import { Counter } from './Counter';
Expand Down
2 changes: 1 addition & 1 deletion src/Counter/Counter.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ComponentMeta } from '@storybook/react';
import { useState } from 'react';
import React, { useState } from 'react';
import { Button, Counter, Panel } from 'react95';
import styled from 'styled-components';

Expand Down
1 change: 1 addition & 0 deletions src/Cutout/Cutout.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { render } from '@testing-library/react';
import React from 'react';

import { Cutout } from './Cutout';

Expand Down
1 change: 1 addition & 0 deletions src/Cutout/Cutout.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ComponentMeta } from '@storybook/react';
import React from 'react';
import { Cutout, Window, WindowContent } from 'react95';
import styled from 'styled-components';

Expand Down
1 change: 1 addition & 0 deletions src/DatePicker/DatePicker.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable camelcase, react/jsx-pascal-case */
import { ComponentMeta } from '@storybook/react';
import React from 'react';
import { DatePicker__UNSTABLE } from 'react95';
import styled from 'styled-components';

Expand Down
2 changes: 1 addition & 1 deletion src/DatePicker/DatePicker.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { forwardRef, useCallback, useMemo, useState } from 'react';
import React, { forwardRef, useCallback, useMemo, useState } from 'react';
import styled from 'styled-components';

import { Button } from '../Button/Button';
Expand Down
1 change: 1 addition & 0 deletions src/Desktop/Desktop.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';

import { renderWithTheme } from '../../test/utils';

import { Desktop } from './Desktop';
Expand Down
6 changes: 3 additions & 3 deletions src/Desktop/Desktop.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import styled from 'styled-components';

import { Desktop } from 'react95';
import { ComponentMeta } from '@storybook/react';
import React from 'react';
import { Desktop } from 'react95';
import styled from 'styled-components';

const Wrapper = styled.div`
padding: 5rem;
Expand Down
2 changes: 2 additions & 0 deletions src/Divider/Divider.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import { renderWithTheme } from '../../test/utils';

import { Divider } from './Divider';
Expand Down
1 change: 1 addition & 0 deletions src/Divider/Divider.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ComponentMeta } from '@storybook/react';
import React from 'react';
import styled from 'styled-components';

import { Divider, List, ListItem } from 'react95';
Expand Down
2 changes: 2 additions & 0 deletions src/Fieldset/Fieldset.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import { renderWithTheme, theme } from '../../test/utils';

import { Fieldset } from './Fieldset';
Expand Down
2 changes: 1 addition & 1 deletion src/Fieldset/Fieldset.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ComponentMeta } from '@storybook/react';
import { useState } from 'react';
import React, { useState } from 'react';
import { Checkbox, Cutout, Fieldset, Window, WindowContent } from 'react95';
import styled from 'styled-components';

Expand Down
6 changes: 3 additions & 3 deletions src/Hourglass/Hourglass.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import styled from 'styled-components';

import { Hourglass } from 'react95';
import { ComponentMeta } from '@storybook/react';
import React from 'react';
import { Hourglass } from 'react95';
import styled from 'styled-components';

const Wrapper = styled.div`
padding: 5rem;
Expand Down
2 changes: 1 addition & 1 deletion src/Hourglass/Hourglass.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { forwardRef } from 'react';
import React, { forwardRef } from 'react';
import styled from 'styled-components';
import { getSize } from '../common/utils';
import base64hourglass from './base64hourglass';
Expand Down
2 changes: 2 additions & 0 deletions src/List/List.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import { renderWithTheme } from '../../test/utils';

import { List } from './List';
Expand Down
3 changes: 2 additions & 1 deletion src/List/List.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { ComponentMeta } from '@storybook/react';
import React from 'react';
import styled from 'styled-components';

import { List, ListItem, Bar, Divider } from 'react95';
import { Bar, Divider, List, ListItem } from 'react95';

const Wrapper = styled.div`
padding: 5rem;
Expand Down
2 changes: 2 additions & 0 deletions src/ListItem/ListItem.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import { renderWithTheme, theme } from '../../test/utils';
import { blockSizes } from '../common/system';
import { ListItem } from './ListItem';
Expand Down
2 changes: 2 additions & 0 deletions src/LoadingIndicator/LoadingIndicator.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import { renderWithTheme } from '../../test/utils';
import { LoadingIndicator } from './LoadingIndicator';

Expand Down
1 change: 1 addition & 0 deletions src/LoadingIndicator/LoadingIndicator.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ComponentMeta } from '@storybook/react';
import React from 'react';
import styled from 'styled-components';

import { LoadingIndicator } from 'react95';
Expand Down
1 change: 1 addition & 0 deletions src/NumberField/NumberField.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { fireEvent } from '@testing-library/react';
import React from 'react';

import { renderWithTheme } from '../../test/utils';
import { NumberField } from './NumberField';
Expand Down
1 change: 1 addition & 0 deletions src/NumberField/NumberField.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ComponentMeta } from '@storybook/react';
import React from 'react';
import { Cutout, NumberField } from 'react95';
import styled from 'styled-components';

Expand Down
1 change: 1 addition & 0 deletions src/Panel/Panel.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { render } from '@testing-library/react';
import React from 'react';

import { Panel } from './Panel';

Expand Down
1 change: 1 addition & 0 deletions src/Panel/Panel.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ComponentMeta } from '@storybook/react';
import React from 'react';
import { Panel } from 'react95';
import styled from 'styled-components';

Expand Down
2 changes: 2 additions & 0 deletions src/Progress/Progress.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import { renderWithTheme } from '../../test/utils';
import { Progress } from './Progress';

Expand Down
2 changes: 1 addition & 1 deletion src/Progress/Progress.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ComponentMeta } from '@storybook/react';
import { useEffect, useState } from 'react';
import React, { useEffect, useState } from 'react';
import { Progress } from 'react95';
import styled from 'styled-components';

Expand Down
2 changes: 2 additions & 0 deletions src/Radio/Radio.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import { renderWithTheme } from '../../test/utils';
import { Radio } from './Radio';

Expand Down
1 change: 1 addition & 0 deletions src/Select/Select.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* eslint-disable no-console */

import { ComponentMeta } from '@storybook/react';
import React from 'react';
import { Cutout, Fieldset, Select, Window, WindowContent } from 'react95';
import styled from 'styled-components';
import { SelectChangeEvent, SelectOption } from './Select.types';
Expand Down
2 changes: 1 addition & 1 deletion src/Slider/Slider.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Pretty much straight out copied from https://github.com/mui-org/material-ui 😂

import { fireEvent } from '@testing-library/react';
import React from 'react';

import { renderWithTheme, Touch } from '../../test/utils';
import { Slider } from './Slider';
Expand Down
1 change: 1 addition & 0 deletions src/Slider/Slider.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ComponentMeta } from '@storybook/react';
import React from 'react';
import { Cutout, Slider } from 'react95';
import styled from 'styled-components';

Expand Down
4 changes: 2 additions & 2 deletions src/Slider/Slider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,10 @@ const sharedGrooveStyles = () => css<StyledSliderProps>`
width: 100%;
`}
`;
const StyledGroove = styled(StyledCutout)`
const StyledGroove = styled(StyledCutout)<StyledSliderProps>`
${sharedGrooveStyles()}
`;
const StyledFlatGroove = styled(StyledCutout)`
const StyledFlatGroove = styled(StyledCutout)<StyledSliderProps>`
${sharedGrooveStyles()}

border-left-color: ${({ theme }) => theme.flatLight};
Expand Down
2 changes: 2 additions & 0 deletions src/Tab/Tab.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import { renderWithTheme } from '../../test/utils';
import { Tab } from './Tab';

Expand Down
2 changes: 2 additions & 0 deletions src/TabBody/TabBody.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import { renderWithTheme } from '../../test/utils';
import { TabBody } from './TabBody';

Expand Down
2 changes: 2 additions & 0 deletions src/Table/Table.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import React from 'react';

import { renderWithTheme } from '../../test/utils';

import { Table } from './Table';
Expand Down
1 change: 1 addition & 0 deletions src/Table/Table.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ComponentMeta } from '@storybook/react';
import React from 'react';
import {
Table,
TableBody,
Expand Down
3 changes: 2 additions & 1 deletion src/Tabs/Tabs.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { fireEvent } from '@testing-library/react';
import React from 'react';

import { renderWithTheme } from '../../test/utils';
import { Tab } from '..';
import { renderWithTheme } from '../../test/utils';
import { Tabs } from './Tabs';

describe('<Tabs />', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/Tabs/Tabs.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ComponentMeta } from '@storybook/react';
import { useState } from 'react';
import React, { useState } from 'react';
import {
Anchor,
Checkbox,
Expand Down
2 changes: 1 addition & 1 deletion src/TextField/TextField.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ComponentMeta } from '@storybook/react';
import { useState } from 'react';
import React, { useState } from 'react';
import { Button, Cutout, TextField } from 'react95';
import styled from 'styled-components';

Expand Down
1 change: 1 addition & 0 deletions src/Toolbar/Toolbar.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { render } from '@testing-library/react';
import React from 'react';

import { Toolbar } from './Toolbar';

Expand Down
1 change: 1 addition & 0 deletions src/Tooltip/Tooltip.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { fireEvent, render, waitFor } from '@testing-library/react';
import React from 'react';

import { Tooltip, TooltipProps } from './Tooltip';

Expand Down
Loading