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

update gatsby #10

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
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
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -802,8 +802,8 @@ The following subcomponents have been added / reworked:

* fix: update image sizing according to figma design

Co-authored-by: vlasovmichael <[email protected]>
Co-authored-by: vzadorozhnii <[email protected]>
Co-authored-by: vlasovmichael \<[email protected]>
Co-authored-by: vzadorozhnii \<[email protected]>



Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ Describe your component here and give usage examples.

### Basic Usage

```jsx live
```jsx live=true
<MyComponent>
Hello!
</MyComponent>
Expand Down
2 changes: 1 addition & 1 deletion component-generator/templates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Describe your component here and give usage examples.

### Basic Usage

```jsx live
```jsx live=true
<componentName>
Hello!
</componentName>
Expand Down
2 changes: 1 addition & 1 deletion docs/decisions/0016-component-generator-script.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ where ``MyComponent`` is the name of the new component. The script will perform

MyComponent
├── index.jsx # contains component definition and its export
├── README.md # contains basic frontmatter with jsx live block that renders the component
├── README.md # contains basic frontmatter with jsx live=true block that renders the component
├── MyComponent.scss # contains empty CSS class for new component
├── _variables.scss # empty file for SASS variables definitions
└── MyComponent.test.jsx # contains single snapshot test
Expand Down
15,669 changes: 1,278 additions & 14,391 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/ActionRow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ in a row in a control bar or nav.
ActionRow assumes that its last child is the primary action and lays out actions so that the last item is in a primary location. If horizontal, the primary action sits on the right. If stacked, the primary action sits at the top of the stack (this is done via `flex-direction: column-reverse;`).
## Basic Usage

```jsx live
```jsx live=true
<ActionRow>
<Button variant="tertiary">
Cancel
Expand All @@ -34,7 +34,7 @@ ActionRow assumes that its last child is the primary action and lays out actions

ActionRow can also be used with a helper component ``ActionRow.Spacer`` to insert empty space between children

```jsx live
```jsx live=true
<ActionRow>
<Form.Checkbox className="flex-column flex-sm-row">Don't ask me again.</Form.Checkbox>
<ActionRow.Spacer />
Expand All @@ -50,7 +50,7 @@ ActionRow can also be used with a helper component ``ActionRow.Spacer`` to inser
## Stacked Usage


```jsx live
```jsx live=true
<ActionRow isStacked>
<p className="x-small">
Bespoke leggings yuccie, portland umami readymade craft beer vaporware sriracha.
Expand Down
8 changes: 4 additions & 4 deletions src/Alert/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ This component utilizes and extends the `Alert` component from react-bootstrap.<

## Basic Usage

```jsx live
```jsx live=true
<>
<Alert variant="success">
This is a "success" alert with{' '}
Expand Down Expand Up @@ -58,7 +58,7 @@ The stacked variant should be used for:
- Extra-small breakpoint and below
---

```jsx live
```jsx live=true
<>
<Alert
variant="info"
Expand Down Expand Up @@ -115,7 +115,7 @@ The stacked variant should be used for:

### Variants

```jsx live
```jsx live=true
<>
<Alert variant="success" dismissible icon={CheckCircle}>
<Alert.Heading>Hey, nice to see you</Alert.Heading>
Expand Down Expand Up @@ -146,7 +146,7 @@ The stacked variant should be used for:

### Kitchen Sink

```jsx live
```jsx live=true
<Alert
variant="success"
actions={[
Expand Down
4 changes: 2 additions & 2 deletions src/Annotation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Display informative text related to an object on screen. Unlike the tooltip an a

## Basic Usage

```jsx live
```jsx live=true
<>
<Annotation>
Success variant
Expand Down Expand Up @@ -56,7 +56,7 @@ Display informative text related to an object on screen. Unlike the tooltip an a

## Referring to other elements

```jsx live
```jsx live=true
() => {
const [arrowPlacement, setArrowPlacement] = useState('left')
const wrapperClass = arrowPlacement === 'top' || arrowPlacement === 'bottom' ? 'flex-column' : '';
Expand Down
4 changes: 2 additions & 2 deletions src/Avatar/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ It is used in the global navigation’s user menu and may also be used to indica

## Basic Usage

```jsx live
```jsx live=true
<div className="bg-light p-2">
<Avatar size="xxl" />{' '}
<Avatar size="xl" />{' '}
Expand All @@ -34,7 +34,7 @@ It is used in the global navigation’s user menu and may also be used to indica

## Huge

```jsx live
```jsx live=true
<>
<Avatar size="huge" />
</>
Expand Down
8 changes: 4 additions & 4 deletions src/AvatarButton/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ A button that contains the user’s Avatar.

## Basic Usage

```jsx live
```jsx live=true
<>
<div>
<AvatarButton size="lg" src="https://picsum.photos/128/128/">Casey</AvatarButton>
Expand All @@ -34,7 +34,7 @@ A button that contains the user’s Avatar.

## With Dropdown

```jsx live
```jsx live=true
<Dropdown>
<Dropdown.Toggle as={AvatarButton} src="https://picsum.photos/128/128">
Casey
Expand All @@ -53,7 +53,7 @@ A button that contains the user’s Avatar.

Props set on Dropdown.Toggle get passed through to the "as" component

```jsx live
```jsx live=true
<Dropdown>
<Dropdown.Toggle as={AvatarButton} size="sm" src="https://picsum.photos/128/128/">
Casey
Expand All @@ -74,7 +74,7 @@ Props set on Dropdown.Toggle get passed through to the "as" component

For use in mobile viewports or constrained views.

```jsx live
```jsx live=true
<>
<div>
<AvatarButton showLabel={false} size="lg" src="https://picsum.photos/128/128/">Casey</AvatarButton>
Expand Down
2 changes: 1 addition & 1 deletion src/Badge/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Badges are composed of text and an accompanying indicator color, and are typical

## Basic Usage

```jsx live
```jsx live=true
<>
<Badge variant="primary">Primary</Badge>{' '}
<Badge variant="secondary">Secondary</Badge>{' '}
Expand Down
12 changes: 6 additions & 6 deletions src/Breadcrumb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Use as a secondary navigation pattern to help convey hierarchy and enable naviga

## Basic Usage

```jsx live
```jsx live=true
() => {
const isExtraSmall = useMediaQuery({ maxWidth: breakpoints.extraSmall.maxWidth });

Expand All @@ -35,7 +35,7 @@ Use as a secondary navigation pattern to help convey hierarchy and enable naviga

### Basic Usage (Mobile View)

```jsx live
```jsx live=true
<Breadcrumb ariaLabel="Breadcrumb mobile view"
links={[
{ label: 'Link 1', href: '/link-1' },
Expand All @@ -48,7 +48,7 @@ Use as a secondary navigation pattern to help convey hierarchy and enable naviga

### Basic Usage (Inverse Palette)

```jsx live
```jsx live=true
() => {
const isExtraSmall = useMediaQuery({ maxWidth: breakpoints.extraSmall.maxWidth });

Expand All @@ -75,7 +75,7 @@ This behaviour can be customized with `linkAs` prop, the example below uses Gats

Note that `links` list contains objects with different keys compared to the example above, specifically `href` key is replaced with `to`, that's because Gatsby's `Link` expects its destination to be set through `to` prop (same as react-router's `Link`), internally `Breadcrumb` passes down these objects (except `label` attribute) as props to the `linkAs` element.

```jsx live
```jsx live=true
() => {
const isExtraSmall = useMediaQuery({ maxWidth: breakpoints.extraSmall.maxWidth });

Expand All @@ -94,7 +94,7 @@ Note that `links` list contains objects with different keys compared to the exam

## With active label

```jsx live
```jsx live=true
() => {
const isExtraSmall = useMediaQuery({ maxWidth: breakpoints.extraSmall.maxWidth });

Expand All @@ -114,7 +114,7 @@ Note that `links` list contains objects with different keys compared to the exam

## With custom spacer

```jsx live
```jsx live=true
() => {
const isExtraSmall = useMediaQuery({ maxWidth: breakpoints.extraSmall.maxWidth });

Expand Down
6 changes: 3 additions & 3 deletions src/Bubble/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Represents the filled circle with a number of an icon, supporting the usual colo

## Basic Usage

```jsx live
```jsx live=true
() => {
return (
<>
Expand Down Expand Up @@ -54,7 +54,7 @@ Represents the filled circle with a number of an icon, supporting the usual colo

### Disabled variant

```jsx live
```jsx live=true
() => {
return (
<Stack direction="horizontal" gap={4} className="mb-2">
Expand All @@ -73,7 +73,7 @@ Represents the filled circle with a number of an icon, supporting the usual colo

In the case of long content use `expandable` prop. It adds padding to `Bubble`. Padding value is configurable through `scss` variables.

```jsx live
```jsx live=true
() => {
{/* start example state */}
const [isExpandable, setIsExpandable] = useState(true);
Expand Down
30 changes: 15 additions & 15 deletions src/Button/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ notes: |
This component utilizes `Button` from React-Bootstrap and extends it with an ability to add icons before and after button label, see [below](#with-icons-before-or-after) for usage example.<br/> <a href="https://react-bootstrap.github.io/components/buttons/" target="_blank" rel="noopener noreferrer"> See React-Bootstrap for additional documentation. </a>

## Core Buttons
```jsx live
```jsx live=true
<>
<Button variant="brand" className="mb-2 mb-sm-0">Brand</Button>{' '}
<Button variant="outline-brand" className="mb-2 mb-sm-0">Outline Brand</Button>{' '}
Expand All @@ -25,7 +25,7 @@ This component utilizes `Button` from React-Bootstrap and extends it with an abi
</>
```
## Core Buttons (Inverse Pallete)
```jsx live
```jsx live=true
<div className="bg-dark-700 p-4">
<Button variant="inverse-brand" className="mb-2 mb-sm-0">Brand</Button>{' '}
<Button variant="inverse-outline-brand" className="mb-2 mb-sm-0">Outline Brand</Button>{' '}
Expand All @@ -36,7 +36,7 @@ This component utilizes `Button` from React-Bootstrap and extends it with an abi
```

## Utility Buttons
```jsx live
```jsx live=true
<>
<div className="mb-2">
<Button variant="success" className="mb-2 mb-sm-0">Success</Button>{' '}
Expand All @@ -56,7 +56,7 @@ This component utilizes `Button` from React-Bootstrap and extends it with an abi

## Size

```jsx live
```jsx live=true
<>
<div className="mb-2">
<Button variant="primary" size="lg" className="mb-2 mb-sm-0">
Expand Down Expand Up @@ -85,7 +85,7 @@ This component utilizes `Button` from React-Bootstrap and extends it with an abi

Use inline size buttons for when a button sits with a line of text.

```jsx live
```jsx live=true
<>
<p>
<span className="mr-1">2 items selected.</span>
Expand All @@ -97,7 +97,7 @@ Use inline size buttons for when a button sits with a line of text.

## Block Buttons

```jsx live
```jsx live=true
<>
<Button variant="primary" size="lg" block>
Block level button
Expand All @@ -110,7 +110,7 @@ Use inline size buttons for when a button sits with a line of text.

### Disabled

```jsx live
```jsx live=true
<>
<Button variant="primary" disabled>Primary disabled</Button>
<Button variant="secondary" disabled>Secondary disabled</Button>
Expand All @@ -120,15 +120,15 @@ Use inline size buttons for when a button sits with a line of text.

For link to be `disabled`, it must have href defined with some value.

```jsx live
```jsx live=true
<>
<Button as='a' disabled>No href</Button>
<Button as='a' href='' disabled>Empty string href</Button>
</>
```

### With Icons before or after
```jsx live
```jsx live=true
<>
<Button variant="brand" iconBefore={ArrowBack} className="mb-2 mb-sm-0">
Brand
Expand All @@ -149,7 +149,7 @@ For link to be `disabled`, it must have href defined with some value.
```

### With a Spinner
```jsx live
```jsx live=true
<>
<Button variant="primary" className="mb-2 mr-2 mb-sm-0" aria-label="Loading some stuff">
<Spinner animation="border" />
Expand Down Expand Up @@ -178,13 +178,13 @@ For link to be `disabled`, it must have href defined with some value.

### Basic Usage

```jsx live
```jsx live=true
<Button.Deprecated className="btn-primary">Hello World!</Button.Deprecated>
```

### Color Variants

```jsx live
```jsx live=true
<div>
<Button.Deprecated className="btn-primary">Primary</Button.Deprecated>
<Button.Deprecated className="btn-success">Success</Button.Deprecated>
Expand All @@ -196,7 +196,7 @@ For link to be `disabled`, it must have href defined with some value.

### Outline Variants

```jsx live
```jsx live=true
<div>
<Button.Deprecated className="btn-outline-primary">Primary</Button.Deprecated>
<Button.Deprecated className="btn-outline-success">Success</Button.Deprecated>
Expand All @@ -206,7 +206,7 @@ For link to be `disabled`, it must have href defined with some value.

### Inverse Variants

```jsx live
```jsx live=true
<div className="bg-gray-700 p-3">
<Button.Deprecated className="btn-inverse-primary">Primary</Button.Deprecated>
<Button.Deprecated className="btn-inverse-success">Success</Button.Deprecated>
Expand All @@ -216,7 +216,7 @@ For link to be `disabled`, it must have href defined with some value.

### Link Variant

```jsx live
```jsx live=true
<div className="bg-gray-200 p-3">
<Button.Deprecated className="btn-link">Link with button container</Button.Deprecated>
<br />
Expand Down
Loading