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

Upgrade react-styleguidist and jest #321

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
1 change: 1 addition & 0 deletions docs/components/CodeRenderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const CodeBox = styled.code`
color: inherit;
background: transparent;
white-space: pre-wrap;
border: none;
`;

const CodeRenderer: React.SFC<CodeRendererProps> = ({ children }) => {
Expand Down
2 changes: 1 addition & 1 deletion docs/components/ComponentsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react';
import { ActionLink, Expander, styled, distance, Icon, ActionLinkProps } from '../../src';

// @ts-ignore
import getUrl from 'react-styleguidist/lib/utils/getUrl';
import getUrl from 'react-styleguidist/lib/client/utils/getUrl';
import { themed } from '../../src';

interface ComponentDefinition {
Expand Down
2 changes: 1 addition & 1 deletion docs/components/HomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react';
import { styled, Headline, Icon, IconName, Button, BodyText, StackPanel, StackItem, colors } from '../../src';

// @ts-ignore
import Markdown from 'react-styleguidist/lib/rsg-components/Markdown';
import Markdown from 'rsg-components/Markdown';

const HeadIcon = styled(Icon)`
vertical-align: text-bottom;
Expand Down
8 changes: 4 additions & 4 deletions docs/components/PlaygroundRenderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ const PreviewPanel = styled.div`
const CodePanel = styled.div`
padding: ${distance.medium};
background: rgba(75, 78, 82, 0.05);

div.CodeMirror {
background: transparent;
padding: ${distance.large} ${distance.xsmall} 0 ${distance.xsmall};
textarea,
textarea:focus {
border: none !important;
}
`;

Expand Down
2 changes: 1 addition & 1 deletion docs/components/ReactComponentRenderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react';
import { Tabs, TabPage, styled, Headline, distance, TabChangeEvent } from '../../src';

// @ts-ignore
import Pathline from 'react-styleguidist/lib/rsg-components/Pathline';
import Pathline from 'rsg-components/Pathline';

interface ReactComponentRendererProps {
name: string;
Expand Down
4 changes: 2 additions & 2 deletions docs/components/SectionRenderer.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as React from 'react';

// @ts-ignore
import SectionHeading from 'react-styleguidist/lib/rsg-components/SectionHeading';
import SectionHeading from 'rsg-components/SectionHeading';
// @ts-ignore
import Markdown from 'react-styleguidist/lib/rsg-components/Markdown';
import Markdown from 'rsg-components/Markdown';

interface SectionRendererProps {
name: string;
Expand Down
6 changes: 3 additions & 3 deletions docs/components/StyleGuideRenderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import { HomePage } from './HomePage';
import { AppState } from './context';

// @ts-ignore
import Ribbon from 'react-styleguidist/lib/rsg-components/Ribbon';
import Ribbon from 'rsg-components/Ribbon';
// @ts-ignore
import Logo from 'react-styleguidist/lib/rsg-components/Logo';
import Logo from 'rsg-components/Logo';
import { createGlobalStyle } from '../../src';

interface StyleGuideRendererProps {
Expand Down Expand Up @@ -39,7 +39,7 @@ function useTheme() {
}

/*
CSS animations should be disabled to ensure that animations don't
CSS animations should be disabled to ensure that animations don't
affect `react-styleguidist-visual` screenshots
*/
const GlobalStyle = createGlobalStyle`
Expand Down
6 changes: 3 additions & 3 deletions docs/introduction/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ Precise UI can be easily integrated in your frontend project by using npm or Yar

1. Firstly, you have to install it:

```sh
```bash
npm i precise-ui
```

or alternatively, using Yarn

```sh
```bash
yarn add precise-ui
```

2. Then, make sure that you have also all peer dependencies installed:

```sh
```bash
npm i react@16 styled-components@2
```

Expand Down
2 changes: 2 additions & 0 deletions docs/theme/colors.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ The following colors are available. Feel free to change them.

```jsx
const {
ColorPicker,
MetroInfoTile,
colors,
clipboardCopy,
notify,
Expand Down
Binary file modified integration/__image_snapshots__/AccordionTable_13-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified integration/__image_snapshots__/Anchor_3-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified integration/__image_snapshots__/Breadcrumbs_3-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified integration/__image_snapshots__/Flyout_11-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified integration/__image_snapshots__/Form_5-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified integration/__image_snapshots__/Highlight_3-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified integration/__image_snapshots__/Highlight_6-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified integration/__image_snapshots__/RadioButtonGroup_1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified integration/__image_snapshots__/RadioButtonGroup_11-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified integration/__image_snapshots__/RadioButtonGroup_5-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified integration/__image_snapshots__/RadioButtonGroup_7-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified integration/__image_snapshots__/RadioButtonGroup_9-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified integration/__image_snapshots__/RadioButton_1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified integration/__image_snapshots__/RadioButton_11-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified integration/__image_snapshots__/RadioButton_13-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified integration/__image_snapshots__/RadioButton_3-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified integration/__image_snapshots__/RadioButton_7-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified integration/__image_snapshots__/RadioButton_9-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified integration/__image_snapshots__/Tag_3-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions integration/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ const buildDemo = () =>
});

module.exports = async jestConfig => {
await buildDemo();
await setupPuppeteer(jestConfig);
await Promise.all([
buildDemo(),
setupPuppeteer(jestConfig)
])
};
Loading