Skip to content

Commit

Permalink
docs: generate docs from all components
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelovicentegc committed Dec 12, 2023
1 parent 4b310ee commit 0260814
Show file tree
Hide file tree
Showing 87 changed files with 2,226 additions and 12 deletions.
73 changes: 73 additions & 0 deletions packages/next-docs/pages/components/_meta.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,88 @@
{
"accessible-icon": "AccessibleIcon",
"alert": "Alert",
"bleed": "Bleed",
"button": "Button",
"center": "Center",
"checkbox": "Checkbox",
"checkbox-field": "CheckboxField",
"checkbox-group": "CheckboxGroup",
"clickable": "Clickable",
"clickable-bubble": "ClickableBubble",
"combobox": "Combobox",
"combobox-item": "ComboboxItem",
"combobox-list": "ComboboxList",
"combobox-popover": "ComboboxPopover",
"composable": "Composable",
"compose": "Compose",
"container": "Container",
"content": "Content",
"contextual-help": "ContextualHelp",
"field": "Field",
"field-label": "FieldLabel",
"field-message": "FieldMessage",
"filter": "Filter",
"filter-apply": "FilterApply",
"filter-clear": "FilterClear",
"filter-list": "FilterList",
"filter-option": "FilterOption",
"filter-popover": "FilterPopover",
"filter-provider": "FilterProvider",
"filter-trigger": "FilterTrigger",
"filter-value": "FilterValue",
"flex": "Flex",
"grid": "Grid",
"grid-cell": "GridCell",
"header": "Header",
"icon-button": "IconButton",
"link": "Link",
"link-box": "LinkBox",
"locale-provider": "LocaleProvider",
"menu": "Menu",
"menu-item": "MenuItem",
"menu-provider": "MenuProvider",
"menu-separator": "MenuSeparator",
"menu-trigger": "MenuTrigger",
"modal": "Modal",
"modal-header": "ModalHeader",
"page": "Page",
"pagination": "Pagination",
"popover": "Popover",
"popover-dismiss": "PopoverDismiss",
"popover-trigger": "PopoverTrigger",
"radio": "Radio",
"radio-group": "RadioGroup",
"search": "Search",
"select": "Select",
"select-field": "SelectField",
"select-list": "SelectList",
"select-option": "SelectOption",
"select-option-check": "SelectOptionCheck",
"select-popover": "SelectPopover",
"simple-table": "SimpleTable",
"skeleton": "Skeleton",
"spinner": "Spinner",
"stack": "Stack",
"tab": "Tab",
"tab-list": "TabList",
"tab-panel": "TabPanel",
"table": "Table",
"table-body": "TableBody",
"table-cell": "TableCell",
"table-header": "TableHeader",
"table-header-cell": "TableHeaderCell",
"table-row": "TableRow",
"tag": "Tag",
"text": "Text",
"text-input": "TextInput",
"textarea": "Textarea",
"toast-stack": "ToastStack",
"tooltip": "Tooltip",
"tooltip-anchor": "TooltipAnchor",
"tooltip-arrow": "TooltipArrow",
"tooltip-popover": "TooltipPopover",
"virtual": "Virtual",
"virtual-container": "VirtualContainer",
"virtual-item": "VirtualItem",
"visually-hidden": "VisuallyHidden"
}
31 changes: 31 additions & 0 deletions packages/next-docs/pages/components/accessible-icon/code.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# AccessibleIcon

Makes icons accessible by adding a label

```jsx

<AccessibleIcon>
<svg {...} />
</AccessibleIcon>

```

## Parameters

### `props`

- Type: `@vtex/shoreline-components.AccessibleIconProps & @types/react.React.RefAttributes<typescript.HTMLDivElement>`

## Props

### `children` (optional)

- Type: `@types/react.React.ReactNode`

### `label`

Describe the icon

- Type: `@types/react.React.ReactNode`

[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/accessible-icon/accessible-icon.tsx#L13)
28 changes: 28 additions & 0 deletions packages/next-docs/pages/components/alert/code.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Alert

Alert indicators allow users to view semantic messages that are prominent and can be dismissable.

```jsx
<Alert onDismiss={() => {}}>
<Text>Message</Text>
<Button variant="tertiary">Action</Button>
</Alert>
```

## Parameters

### `props`

- Type: `@vtex/shoreline-components.AlertProps & @types/react.React.RefAttributes<typescript.HTMLDivElement>`

## Props

### `onDismiss` (optional)

- Type: `@types/react.React.MouseEventHandler<typescript.HTMLButtonElement>`

### `variant` (optional)

- Type: `@vtex/shoreline-components.AlertVariant`

[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/alert/alert.tsx#L22)
61 changes: 61 additions & 0 deletions packages/next-docs/pages/components/bleed/code.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Bleed

**NOTE**: Exotic components are not callable.

## Parameters

### `props`

- Type: `@vtex/shoreline-components.BleedProps & @types/react.React.RefAttributes<typescript.HTMLDivElement>`

## Props

### `bottom` (optional)

Bottom bleed

- Type: `string | boolean`

- Default: `'$space-0'`

### `horizontal` (optional)

Horizontal bleed

- Type: `string | boolean`

- Default: `'$space-0'`

### `left` (optional)

Left bleed

- Type: `string | boolean`

- Default: `'$space-0'`

### `right` (optional)

Right bleed

- Type: `string | boolean`

- Default: `'$space-0'`

### `top` (optional)

Top bleed

- Type: `string | boolean`

- Default: `'$space-0'`

### `vertical` (optional)

Vertical bleed

- Type: `string | boolean`

- Default: `'$space-0'`

[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/bleed/bleed.tsx#L8)
2 changes: 1 addition & 1 deletion packages/next-docs/pages/components/button/code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ Change between color combinations.

- Default: `'secondary'`

[View source](https://github.com/vtex/shoreline/blob/471a221f9/packages/components/src/button/button.tsx#L19)
[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/button/button.tsx#L19)
2 changes: 1 addition & 1 deletion packages/next-docs/pages/components/center/code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@

- Type: `@types/react.React.ComponentPropsWithoutRef<div>`

[View source](https://github.com/vtex/shoreline/blob/471a221f9/packages/components/src/center/center.tsx#L5)
[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/center/center.tsx#L5)
45 changes: 45 additions & 0 deletions packages/next-docs/pages/components/checkbox-field/code.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# CheckboxField

Checkbox field with label and help message

```jsx
<CheckboxField>Label</CheckboxField>
```

## Parameters

### `props`

- Type: `@vtex/shoreline-components.CheckboxFieldProps & @types/react.React.RefAttributes<typescript.HTMLDivElement>`

## Props

### `error` (optional)

Whether the field contains an error or not

- Type: `boolean`

- Default: `false`

### `errorText` (optional)

Error message

- Type: `@types/react.React.ReactNode`

### `helpText` (optional)

Help message

- Type: `@types/react.React.ReactNode`

### `indeterminate` (optional)

- Type: `boolean`

### `value` (optional)

- Type: `string`

[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/checkbox/checkbox-field.tsx#L14)
33 changes: 33 additions & 0 deletions packages/next-docs/pages/components/checkbox-group/code.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# CheckboxGroup

**NOTE**: Exotic components are not callable.

## Parameters

### `props`

- Type: `@vtex/shoreline-components.CheckboxGroupProps & @types/react.React.RefAttributes<typescript.HTMLInputElement>`

## Props

### `direction` (optional)

- Type: `row | column`

### `error` (optional)

- Type: `boolean`

### `errorText` (optional)

- Type: `@types/react.React.ReactNode`

### `helpText` (optional)

- Type: `@types/react.React.ReactNode`

### `label`

- Type: `@types/react.React.ReactNode`

[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/checkbox/checkbox-group.tsx#L8)
2 changes: 1 addition & 1 deletion packages/next-docs/pages/components/checkbox/code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ Checkbox controls allow users to make multiple independent choices in a form whe

- Type: `@vtex/shoreline-components.AriaCheckboxProps`

[View source](https://github.com/vtex/shoreline/blob/471a221f9/packages/components/src/checkbox/checkbox.tsx#L16)
[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/checkbox/checkbox.tsx#L16)
29 changes: 29 additions & 0 deletions packages/next-docs/pages/components/clickable-bubble/code.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# ClickableBubble

Bubbles events to Clickable

```jsx

<Clickable>
<ClickableBubble>
<p>Clicking the text will bubble the Click event to Clickable</p>
<ClickableBubble>
</Clickable>

```

## Parameters

### `props`

- Type: `@vtex/shoreline-components.ClickableBubbleProps & @types/react.React.RefAttributes<typescript.HTMLDivElement>`

## Props

### `children`

Children to bubble event

- Type: `@types/react.React.ReactNode`

[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/clickable/clickable-bubble.tsx#L15)
27 changes: 27 additions & 0 deletions packages/next-docs/pages/components/clickable/code.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Clickable

Represents clickable surfaces

```jsx
<Clickable>
Text <button>Click Me</button>
</Clickable>
```

## Parameters

### `props`

- Type: `@vtex/shoreline-components.ClickableProps & @types/react.React.RefAttributes<typescript.HTMLDivElement>`

## Props

### `asChild` (optional)

Enable children composition

- Type: `boolean`

- Default: `false`

[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/clickable/clickable.tsx#L14)
21 changes: 21 additions & 0 deletions packages/next-docs/pages/components/combobox-item/code.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# ComboboxItem

**NOTE**: Exotic components are not callable.

## Parameters

### `props`

- Type: `@vtex/shoreline-components.ComboboxItemProps & @types/react.React.RefAttributes<typescript.HTMLDivElement>`

## Props

### `asChild` (optional)

Enable children composition

- Type: `boolean`

- Default: `false`

[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/combobox/combobox-item.tsx#L6)
Loading

0 comments on commit 0260814

Please sign in to comment.