Skip to content

Commit

Permalink
Rename React Components to Components
Browse files Browse the repository at this point in the history
  • Loading branch information
alimpens committed Feb 23, 2024
1 parent f0a5aee commit 433d49a
Show file tree
Hide file tree
Showing 97 changed files with 70 additions and 70 deletions.
6 changes: 3 additions & 3 deletions packages/css/src/components/card/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ The link is mandatory.
## Guidelines

- The title of a card is a link within a heading.
The same guidelines as for regular [links](/docs/react-components-navigation-link--docs) and [headings](/docs/react-components-text-heading--docs) apply here.
The same guidelines as for regular [links](/docs/components-navigation-link--docs) and [headings](/docs/components-text-heading--docs) apply here.
The link is active across the entire area of the card.
- A card needs more content than just a title.
Supplement this with textual and/or visual content.
- Place the text in a regular paragraph.
Only use the smallest text size for a tagline or date.
- This component may not be the best option if the content does not represent a detailed page.
For referencing a thematic page, use a [top task link](/docs/react-components-navigation-top-task-link--docs).
You can also use a [regular link](/docs/react-components-navigation-link--docs).
For referencing a thematic page, use a [top task link](/docs/components-navigation-top-task-link--docs).
You can also use a [regular link](/docs/components-navigation-link--docs).

## Screen Readers

Expand Down
4 changes: 2 additions & 2 deletions packages/css/src/components/grid/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ Divides the screen into columns to align the elements of a page.
## Usage

Every page should use the grid as the foundation for its layout.
It is placed directly within the [Screen](/docs/react-components-layout-screen--docs).
It is placed directly within the [Screen](/docs/components-layout-screen--docs).

A [Footer](/docs/react-components-containers-footer--docs) and a [Spotlight](/docs/react-components-containers-spotlight--docs) are slightly wider than the grid.
A [Footer](/docs/components-containers-footer--docs) and a [Spotlight](/docs/components-containers-spotlight--docs) are slightly wider than the grid.
You close one instance of the grid before these components.
Inside and optionally after them, you start a new one.
Multiple instances of the grid component are possible on a page, but the columns of all grids must align precisely.
Expand Down
2 changes: 1 addition & 1 deletion packages/css/src/components/icon-button/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ A button containing only an icon.

## Relevant WCAG Requirements

The Icon Button follows [the same requirements and guidelines as a regular button](/docs/react-components-buttons-button--docs).
The Icon Button follows [the same requirements and guidelines as a regular button](/docs/components-buttons-button--docs).
2 changes: 1 addition & 1 deletion packages/css/src/components/image/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Displays an image.
For example, provide small, medium, and large variants for various screen sizes.
This prevents unnecessary downloading of large files.
Do this especially for the main image of a page, where the difference between sizes on a narrow and wide screen is most significant.
- Ensure that the aspect ratio of the image is supported by the [Aspect Ratio](/docs/react-components-layout-aspect-ratio--docs) component.
- Ensure that the aspect ratio of the image is supported by the [Aspect Ratio](/docs/components-layout-aspect-ratio--docs) component.

## Relevant WCAG Requirements

Expand Down
2 changes: 1 addition & 1 deletion packages/css/src/components/link-list/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ Therefore, it is blue and clickable.

Use a Link List to present multiple links within a theme.

For additional guidelines, refer to the [Link](/docs/react-components-navigation-link--docs) component.
For additional guidelines, refer to the [Link](/docs/components-navigation-link--docs) component.
2 changes: 1 addition & 1 deletion packages/css/src/components/page-heading/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ Use this component for a name, title, or motto.
The page heading component is a variant of a heading level 1 with a distinct style.
When using this component, ensure that the heading hierarchy of the page remains logical.

For this component, the same WCAG requirements apply as for [the heading component](/docs/react-components-text-heading--docs).
For this component, the same WCAG requirements apply as for [the heading component](/docs/components-text-heading--docs).
8 changes: 4 additions & 4 deletions packages/css/src/components/screen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Manages the maximum width and alignment of the entire website or application.

This should be the outermost component of your website or application.
Within it, combine components such as
[Grid](/docs/react-components-layout-grid--docs),
[Header](/docs/react-components-containers-header--docs),
[Footer](/docs/react-components-containers-footer--docs),
[Spotlight](/docs/react-components-containers-spotlight--docs),
[Grid](/docs/components-layout-grid--docs),
[Header](/docs/components-containers-header--docs),
[Footer](/docs/components-containers-footer--docs),
[Spotlight](/docs/components-containers-spotlight--docs),
and Figure.

## Design
Expand Down
2 changes: 1 addition & 1 deletion packages/css/src/components/table/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ Table is used to display simple information that does not need to be filtered or
- Use `<Table.Caption>` to describe a table in the same way you would use a heading.
A caption helps users find, navigate and understand tables.
- Never use the table component to layout content on a page.
Instead, use [Grid](/docs/react-components-layout-grid--docs).
Instead, use [Grid](/docs/components-layout-grid--docs).
6 changes: 3 additions & 3 deletions packages/css/src/components/top-task-link/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ A prominent navigation element to quickly start a task.
- Keep both texts concise.
A title consists of a few words, and the description consists of 1 or 2 short sentences.
The description should end with a period or another appropriate punctuation mark.
- For wide windows, place 3 or 4 Top Task Links side by side on the [Grid](/docs/react-components-layout-grid--docs).
- For wide windows, place 3 or 4 Top Task Links side by side on the [Grid](/docs/components-layout-grid--docs).
If you have more Top Task Links, place them in the next row.
Try to distribute the amount of links on wide windows over rows of 3 or 4 links.
If this is not possible, leave the last cells of the grid empty.
- If you have a group of links for which a description is unnecessary or illogical, use a [Link List](/docs/react-components-navigation-link--docs).
- If you have a group of links for which a description is unnecessary or illogical, use a [Link List](/docs/components-navigation-link--docs).

## Relevant WCAG requirements

The Top Task Link is subject to the same requirements as [regular links](/docs/react-components-navigation-link--docs).
The Top Task Link is subject to the same requirements as [regular links](/docs/components-navigation-link--docs).
4 changes: 2 additions & 2 deletions plopfile.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ export default function (plop) {
{
type: 'add',
data: { curlyBefore: '{' },
path: 'storybook/src/react-components/{{pascalCase name}}/{{pascalCase name}}.docs.mdx',
path: 'storybook/src/components/{{pascalCase name}}/{{pascalCase name}}.docs.mdx',
templateFile: 'plop-templates/storybook.docs.mdx.hbs',
},
{
type: 'add',
path: 'storybook/src/react-components/{{pascalCase name}}/{{pascalCase name}}.stories.tsx',
path: 'storybook/src/components/{{pascalCase name}}/{{pascalCase name}}.stories.tsx',
templateFile: 'plop-templates/storybook.stories.tsx.hbs',
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const paragraph2 = exampleParagraph()
const paragraph3 = exampleParagraph()

const meta = {
title: 'React Components/Containers/Accordion',
title: 'Components/Containers/Accordion',
component: Accordion,
args: {
headingLevel: 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Alert, Link, Paragraph, UnorderedList } from '@amsterdam/design-system-
import { Meta, StoryObj } from '@storybook/react'

const meta = {
title: 'React Components/Feedback/Alert',
title: 'Components/Feedback/Alert',
component: Alert,
args: {
title: 'Let op',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { AspectRatio, Image } from '@amsterdam/design-system-react'
import { Meta, StoryObj } from '@storybook/react'

const meta = {
title: 'React Components/Layout/Aspect Ratio',
title: 'Components/Layout/Aspect Ratio',
component: AspectRatio,
args: {
ratio: 'square',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Badge } from '@amsterdam/design-system-react'
import { Meta, StoryObj } from '@storybook/react'

const meta = {
title: 'React Components/Feedback/Badge',
title: 'Components/Feedback/Badge',
component: Badge,
args: {
label: 'Tip',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { exampleQuote } from '../shared/exampleContent'
const quote = exampleQuote()

const meta = {
title: 'React Components/Text/Blockquote',
title: 'Components/Text/Blockquote',
component: Blockquote,
args: {
children: quote,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Breadcrumb } from '@amsterdam/design-system-react'
import { Meta, StoryObj } from '@storybook/react'

const meta = {
title: 'React Components/Navigation/Breadcrumb',
title: 'Components/Navigation/Breadcrumb',
component: Breadcrumb,
} satisfies Meta<typeof Breadcrumb>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { ShareIcon } from '@amsterdam/design-system-react-icons'
import { Meta, StoryObj } from '@storybook/react'

const meta = {
title: 'React Components/Buttons/Button',
title: 'Components/Buttons/Button',
component: Button,
args: {
children: 'Button label',
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const dateFormat = new Intl.DateTimeFormat('nl', {
const today = dateFormat.format(Date.now())

const meta = {
title: 'React Components/Navigation/Card',
title: 'Components/Navigation/Card',
component: Card,
decorators: [
(Story) => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Checkbox } from '@amsterdam/design-system-react'
import { Meta, StoryObj } from '@storybook/react'

const meta = {
title: 'React Components/Forms/Checkbox',
title: 'Components/Forms/Checkbox',
component: Checkbox,
args: {
children: 'Checkbox label',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const ThreeBoxes = Array.from(Array(3).keys()).map((i) => (
))

const meta = {
title: 'React Components/Layout/Column',
title: 'Components/Layout/Column',
component: Column,
args: {
children: ThreeBoxes,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Button, Dialog, Heading, Paragraph } from '@amsterdam/design-system-rea
import { Meta, StoryObj } from '@storybook/react'

const meta = {
title: 'React Components/Containers/Dialog',
title: 'Components/Containers/Dialog',
component: Dialog,
args: {
title: 'Weet u het zeker?',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Checkbox, Fieldset } from '@amsterdam/design-system-react'
import { Meta, StoryObj } from '@storybook/react'

const meta = {
title: 'React Components/Forms/Fieldset',
title: 'Components/Forms/Fieldset',
component: Fieldset,
args: {
children: 'Body van de fieldset',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { EmailIcon, PhoneIcon } from '@amsterdam/design-system-react-icons'
import { Meta, StoryObj } from '@storybook/react'

const meta = {
title: 'React Components/Containers/Footer',
title: 'Components/Containers/Footer',
component: Footer,
} satisfies Meta<typeof Footer>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { FormLabel } from '@amsterdam/design-system-react'
import { Meta, StoryObj } from '@storybook/react'

const meta = {
title: 'React Components/Forms/Form Label',
title: 'Components/Forms/Form Label',
component: FormLabel,
args: {
children: 'Form label',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ On narrow screens, you will see three rows of four columns; on medium-wide scree

Unlike the horizontal margins between columns, the vertical ones above and below are adjustable.
The options `paddingVertical`, `paddingTop`, and `paddingBottom` add white space.
This is useful in a coloured area like [Footer](/docs/react-components-containers-footer--docs) or [Spotlight](/docs/react-components-containers-spotlight--docs) or between two consecutive grids.
This is useful in a coloured area like [Footer](/docs/components-containers-footer--docs) or [Spotlight](/docs/components-containers-spotlight--docs) or between two consecutive grids.

Specify a value of `medium` for vertical white space as wide as the horizontal.
Use `small` for half of that width and `large` for double.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { Meta, StoryObj } from '@storybook/react'
import { paddingArgType } from '../shared/argTypes'

const meta = {
title: 'React Components/Layout/Grid',
title: 'Components/Layout/Grid',
component: Grid,
argTypes: {
gapVertical: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { SearchIcon } from '@amsterdam/design-system-react-icons'
import { Meta, StoryObj } from '@storybook/react'

const meta = {
title: 'React Components/Containers/Header',
title: 'Components/Containers/Header',
component: Header,
argTypes: {
logoBrand: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { exampleHeading } from '../shared/exampleContent'
const heading = exampleHeading()

const meta = {
title: 'React Components/Text/Heading',
title: 'Components/Text/Heading',
component: Heading,
args: {
children: heading,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Using the same text levels for both the icon and text aligns them perfectly.

### Square

Sometimes it’s useful for the icon to take up square space, for example, with the [Icon Button](/docs/react-components-buttons-icon-button--docs).
Sometimes it’s useful for the icon to take up square space, for example, with the [Icon Button](/docs/components-buttons-icon-button--docs).

<Canvas of={IconStories.Square} />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import * as Icons from '@amsterdam/design-system-react-icons'
import { Meta, StoryObj } from '@storybook/react'

const meta = {
title: 'React Components/Media/Icon',
title: 'Components/Media/Icon',
component: Icon,
argTypes: {
size: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import * as Icons from '@amsterdam/design-system-react-icons'
import { Meta, StoryObj } from '@storybook/react'

const meta = {
title: 'React Components/Buttons/Icon Button',
title: 'Components/Buttons/Icon Button',
component: IconButton,
args: {
label: 'Sluiten',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Image } from '@amsterdam/design-system-react'
import { Meta, StoryObj } from '@storybook/react'

const meta = {
title: 'React Components/Media/Image',
title: 'Components/Media/Image',
component: Image,
} satisfies Meta<typeof Image>

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type { Meta, StoryObj } from '@storybook/react'
type Story = StoryObj<typeof Link>

const meta = {
title: 'React Components/Navigation/Link',
title: 'Components/Navigation/Link',
component: Link,
args: {
children: 'Link label',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Avoid using both semantic and list icons in the same list.

### Small Text

In the [Footer](/docs/react-components-containers-footer--docs), we use small text, also for lists.
In the [Footer](/docs/components-containers-footer--docs), we use small text, also for lists.
Specify this for each item in the list.

<Canvas of={LinkListStories.SmallText} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { exampleLinkList } from '../shared/exampleContent'
const links = exampleLinkList()

const meta = {
title: 'React Components/Navigation/Link List',
title: 'Components/Navigation/Link List',
component: LinkList,
args: {
children: links.map((text, index) => (
Expand All @@ -25,7 +25,7 @@ const meta = {
export default meta

const linkMeta = {
title: 'React Components/Navigation/Link List Link',
title: 'Components/Navigation/Link List Link',
component: LinkList.Link,
argTypes: {
icon: {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Logo } from '@amsterdam/design-system-react'
import { Meta, StoryObj } from '@storybook/react'

const meta = {
title: 'React Components/Media/Logo',
title: 'Components/Media/Logo',
component: Logo,
argTypes: {
brand: {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Mark, Paragraph } from '@amsterdam/design-system-react'
import { Meta, StoryObj } from '@storybook/react'

const meta = {
title: 'React Components/Text/Mark',
title: 'Components/Text/Mark',
component: Mark,
args: {
children: 'Nieuw component',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Grid, Heading, LinkList, MegaMenu, Screen } from '@amsterdam/design-sys
import { Meta, StoryObj } from '@storybook/react'

const meta = {
title: 'React Components/Navigation/Mega Menu',
title: 'Components/Navigation/Mega Menu',
component: MegaMenu,
parameters: {
layout: 'fullscreen',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const orderedListItems = exampleOrderedList().map((text, index) => (
))

const meta = {
title: 'React Components/Text/Ordered List',
title: 'Components/Text/Ordered List',
component: OrderedList,
args: {
children: orderedListItems,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ import README from "../../../../packages/css/src/components/overlap/README.md?ra
### Hero Image with Search Field

This allows for the use of a mood-setting image as a background.
A [Grid](/docs/react-components-layout-grid--docs) provides horizontal spacing on both sides and columns for layout.
A [Grid](/docs/components-layout-grid--docs) provides horizontal spacing on both sides and columns for layout.
Note: the library does not yet offer an option to vertically center the form.

<Primary />

#### Guidelines

- First, implement the underlying component.
- Follow [the general guidelines for images](/docs/react-components-media-image--docs#guidelines).
- Follow [the general guidelines for images](/docs/components-media-image--docs#guidelines).
- Use a sufficiently large image.
The aspect ratio of 32:9 is most suitable.
Loading

0 comments on commit 433d49a

Please sign in to comment.