From 7753ff5a3d3ddd29c24c0f8300f71ad900539d7b Mon Sep 17 00:00:00 2001 From: marcelovicentegc Date: Tue, 12 Dec 2023 20:39:34 -0300 Subject: [PATCH] docs: generate docs from all components --- .../next-docs/pages/components/_meta.json | 73 +++++++++++++ .../pages/components/accessible-icon/code.mdx | 31 ++++++ .../next-docs/pages/components/alert/code.mdx | 28 +++++ .../next-docs/pages/components/bleed/code.mdx | 61 +++++++++++ .../pages/components/button/code.mdx | 2 +- .../pages/components/center/code.mdx | 2 +- .../pages/components/checkbox-field/code.mdx | 45 ++++++++ .../pages/components/checkbox-group/code.mdx | 33 ++++++ .../pages/components/checkbox/code.mdx | 2 +- .../components/clickable-bubble/code.mdx | 29 +++++ .../pages/components/clickable/code.mdx | 27 +++++ .../pages/components/combobox-item/code.mdx | 21 ++++ .../pages/components/combobox-list/code.mdx | 21 ++++ .../components/combobox-popover/code.mdx | 21 ++++ .../pages/components/combobox/code.mdx | 21 ++++ .../pages/components/composable/code.mdx | 32 ++++++ .../pages/components/compose/code.mdx | 25 +++++ .../pages/components/container/code.mdx | 27 +++++ .../pages/components/content/code.mdx | 35 ++++++ .../pages/components/contextual-help/code.mdx | 29 +++++ .../pages/components/field-label/code.mdx | 21 ++++ .../pages/components/field-message/code.mdx | 33 ++++++ .../next-docs/pages/components/field/code.mdx | 17 +++ .../pages/components/filter-apply/code.mdx | 21 ++++ .../pages/components/filter-clear/code.mdx | 21 ++++ .../pages/components/filter-list/code.mdx | 27 +++++ .../pages/components/filter-option/code.mdx | 23 ++++ .../pages/components/filter-popover/code.mdx | 31 ++++++ .../pages/components/filter-provider/code.mdx | 60 ++++++++++ .../pages/components/filter-trigger/code.mdx | 23 ++++ .../pages/components/filter-value/code.mdx | 17 +++ .../pages/components/filter/code.mdx | 59 ++++++++++ .../next-docs/pages/components/flex/code.mdx | 17 +++ .../pages/components/grid-cell/code.mdx | 17 +++ .../next-docs/pages/components/grid/code.mdx | 17 +++ .../pages/components/header/code.mdx | 17 +++ .../pages/components/icon-button/code.mdx | 59 ++++++++++ .../pages/components/link-box/code.mdx | 44 ++++++++ .../next-docs/pages/components/link/code.mdx | 25 +++++ .../pages/components/locale-provider/code.mdx | 27 +++++ .../pages/components/menu-item/code.mdx | 37 +++++++ .../pages/components/menu-provider/code.mdx | 9 ++ .../pages/components/menu-separator/code.mdx | 17 +++ .../pages/components/menu-trigger/code.mdx | 11 ++ .../next-docs/pages/components/menu/code.mdx | 2 +- .../pages/components/modal-header/code.mdx | 17 +++ .../next-docs/pages/components/modal/code.mdx | 25 +++++ .../next-docs/pages/components/page/code.mdx | 17 +++ .../pages/components/pagination/code.mdx | 2 +- .../pages/components/popover-dismiss/code.mdx | 29 +++++ .../pages/components/popover-trigger/code.mdx | 28 +++++ .../pages/components/popover/code.mdx | 29 +++++ .../pages/components/radio-group/code.mdx | 41 +++++++ .../next-docs/pages/components/radio/code.mdx | 2 +- .../pages/components/search/code.mdx | 25 +++++ .../pages/components/select-field/code.mdx | 46 ++++++++ .../pages/components/select-list/code.mdx | 25 +++++ .../components/select-option-check/code.mdx | 17 +++ .../pages/components/select-option/code.mdx | 35 ++++++ .../pages/components/select-popover/code.mdx | 21 ++++ .../pages/components/select/code.mdx | 2 +- .../pages/components/simple-table/code.mdx | 103 ++++++++++++++++++ .../pages/components/skeleton/code.mdx | 21 ++++ .../pages/components/spinner/code.mdx | 2 +- .../next-docs/pages/components/stack/code.mdx | 45 ++++++++ .../pages/components/tab-list/code.mdx | 30 +++++ .../pages/components/tab-panel/code.mdx | 36 ++++++ .../next-docs/pages/components/tab/code.mdx | 30 +++++ .../pages/components/table-body/code.mdx | 17 +++ .../pages/components/table-cell/code.mdx | 17 +++ .../components/table-header-cell/code.mdx | 21 ++++ .../pages/components/table-header/code.mdx | 17 +++ .../pages/components/table-row/code.mdx | 29 +++++ .../next-docs/pages/components/table/code.mdx | 59 ++++++++++ .../next-docs/pages/components/tag/code.mdx | 2 +- .../pages/components/text-input/code.mdx | 2 +- .../next-docs/pages/components/text/code.mdx | 17 +++ .../pages/components/textarea/code.mdx | 10 +- .../pages/components/toast-stack/code.mdx | 33 ++++++ .../pages/components/tooltip-anchor/code.mdx | 25 +++++ .../pages/components/tooltip-arrow/code.mdx | 25 +++++ .../pages/components/tooltip-popover/code.mdx | 27 +++++ .../pages/components/tooltip/code.mdx | 25 +++++ .../components/virtual-container/code.mdx | 25 +++++ .../pages/components/virtual-item/code.mdx | 11 ++ .../pages/components/virtual/code.mdx | 29 +++++ .../pages/components/visually-hidden/code.mdx | 2 +- 87 files changed, 2226 insertions(+), 12 deletions(-) create mode 100644 packages/next-docs/pages/components/accessible-icon/code.mdx create mode 100644 packages/next-docs/pages/components/alert/code.mdx create mode 100644 packages/next-docs/pages/components/bleed/code.mdx create mode 100644 packages/next-docs/pages/components/checkbox-field/code.mdx create mode 100644 packages/next-docs/pages/components/checkbox-group/code.mdx create mode 100644 packages/next-docs/pages/components/clickable-bubble/code.mdx create mode 100644 packages/next-docs/pages/components/clickable/code.mdx create mode 100644 packages/next-docs/pages/components/combobox-item/code.mdx create mode 100644 packages/next-docs/pages/components/combobox-list/code.mdx create mode 100644 packages/next-docs/pages/components/combobox-popover/code.mdx create mode 100644 packages/next-docs/pages/components/combobox/code.mdx create mode 100644 packages/next-docs/pages/components/composable/code.mdx create mode 100644 packages/next-docs/pages/components/compose/code.mdx create mode 100644 packages/next-docs/pages/components/container/code.mdx create mode 100644 packages/next-docs/pages/components/content/code.mdx create mode 100644 packages/next-docs/pages/components/contextual-help/code.mdx create mode 100644 packages/next-docs/pages/components/field-label/code.mdx create mode 100644 packages/next-docs/pages/components/field-message/code.mdx create mode 100644 packages/next-docs/pages/components/field/code.mdx create mode 100644 packages/next-docs/pages/components/filter-apply/code.mdx create mode 100644 packages/next-docs/pages/components/filter-clear/code.mdx create mode 100644 packages/next-docs/pages/components/filter-list/code.mdx create mode 100644 packages/next-docs/pages/components/filter-option/code.mdx create mode 100644 packages/next-docs/pages/components/filter-popover/code.mdx create mode 100644 packages/next-docs/pages/components/filter-provider/code.mdx create mode 100644 packages/next-docs/pages/components/filter-trigger/code.mdx create mode 100644 packages/next-docs/pages/components/filter-value/code.mdx create mode 100644 packages/next-docs/pages/components/filter/code.mdx create mode 100644 packages/next-docs/pages/components/flex/code.mdx create mode 100644 packages/next-docs/pages/components/grid-cell/code.mdx create mode 100644 packages/next-docs/pages/components/grid/code.mdx create mode 100644 packages/next-docs/pages/components/header/code.mdx create mode 100644 packages/next-docs/pages/components/icon-button/code.mdx create mode 100644 packages/next-docs/pages/components/link-box/code.mdx create mode 100644 packages/next-docs/pages/components/link/code.mdx create mode 100644 packages/next-docs/pages/components/locale-provider/code.mdx create mode 100644 packages/next-docs/pages/components/menu-item/code.mdx create mode 100644 packages/next-docs/pages/components/menu-provider/code.mdx create mode 100644 packages/next-docs/pages/components/menu-separator/code.mdx create mode 100644 packages/next-docs/pages/components/menu-trigger/code.mdx create mode 100644 packages/next-docs/pages/components/modal-header/code.mdx create mode 100644 packages/next-docs/pages/components/modal/code.mdx create mode 100644 packages/next-docs/pages/components/page/code.mdx create mode 100644 packages/next-docs/pages/components/popover-dismiss/code.mdx create mode 100644 packages/next-docs/pages/components/popover-trigger/code.mdx create mode 100644 packages/next-docs/pages/components/popover/code.mdx create mode 100644 packages/next-docs/pages/components/radio-group/code.mdx create mode 100644 packages/next-docs/pages/components/search/code.mdx create mode 100644 packages/next-docs/pages/components/select-field/code.mdx create mode 100644 packages/next-docs/pages/components/select-list/code.mdx create mode 100644 packages/next-docs/pages/components/select-option-check/code.mdx create mode 100644 packages/next-docs/pages/components/select-option/code.mdx create mode 100644 packages/next-docs/pages/components/select-popover/code.mdx create mode 100644 packages/next-docs/pages/components/simple-table/code.mdx create mode 100644 packages/next-docs/pages/components/skeleton/code.mdx create mode 100644 packages/next-docs/pages/components/stack/code.mdx create mode 100644 packages/next-docs/pages/components/tab-list/code.mdx create mode 100644 packages/next-docs/pages/components/tab-panel/code.mdx create mode 100644 packages/next-docs/pages/components/tab/code.mdx create mode 100644 packages/next-docs/pages/components/table-body/code.mdx create mode 100644 packages/next-docs/pages/components/table-cell/code.mdx create mode 100644 packages/next-docs/pages/components/table-header-cell/code.mdx create mode 100644 packages/next-docs/pages/components/table-header/code.mdx create mode 100644 packages/next-docs/pages/components/table-row/code.mdx create mode 100644 packages/next-docs/pages/components/table/code.mdx create mode 100644 packages/next-docs/pages/components/text/code.mdx create mode 100644 packages/next-docs/pages/components/toast-stack/code.mdx create mode 100644 packages/next-docs/pages/components/tooltip-anchor/code.mdx create mode 100644 packages/next-docs/pages/components/tooltip-arrow/code.mdx create mode 100644 packages/next-docs/pages/components/tooltip-popover/code.mdx create mode 100644 packages/next-docs/pages/components/tooltip/code.mdx create mode 100644 packages/next-docs/pages/components/virtual-container/code.mdx create mode 100644 packages/next-docs/pages/components/virtual-item/code.mdx create mode 100644 packages/next-docs/pages/components/virtual/code.mdx diff --git a/packages/next-docs/pages/components/_meta.json b/packages/next-docs/pages/components/_meta.json index 039a3c8609..6162e70c87 100644 --- a/packages/next-docs/pages/components/_meta.json +++ b/packages/next-docs/pages/components/_meta.json @@ -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" } diff --git a/packages/next-docs/pages/components/accessible-icon/code.mdx b/packages/next-docs/pages/components/accessible-icon/code.mdx new file mode 100644 index 0000000000..8fdf7ed8e2 --- /dev/null +++ b/packages/next-docs/pages/components/accessible-icon/code.mdx @@ -0,0 +1,31 @@ +# AccessibleIcon + +Makes icons accessible by adding a label + +```jsx + + + + + +``` + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.AccessibleIconProps & @types/react.React.RefAttributes` + +## 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) diff --git a/packages/next-docs/pages/components/alert/code.mdx b/packages/next-docs/pages/components/alert/code.mdx new file mode 100644 index 0000000000..6f24e3f82a --- /dev/null +++ b/packages/next-docs/pages/components/alert/code.mdx @@ -0,0 +1,28 @@ +# Alert + +Alert indicators allow users to view semantic messages that are prominent and can be dismissable. + +```jsx + {}}> + Message + + +``` + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.AlertProps & @types/react.React.RefAttributes` + +## Props + +### `onDismiss` (optional) + +- Type: `@types/react.React.MouseEventHandler` + +### `variant` (optional) + +- Type: `@vtex/shoreline-components.AlertVariant` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/alert/alert.tsx#L22) diff --git a/packages/next-docs/pages/components/bleed/code.mdx b/packages/next-docs/pages/components/bleed/code.mdx new file mode 100644 index 0000000000..bacb04683e --- /dev/null +++ b/packages/next-docs/pages/components/bleed/code.mdx @@ -0,0 +1,61 @@ +# Bleed + +**NOTE**: Exotic components are not callable. + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.BleedProps & @types/react.React.RefAttributes` + +## 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) diff --git a/packages/next-docs/pages/components/button/code.mdx b/packages/next-docs/pages/components/button/code.mdx index 18793dfd26..de4b54c883 100644 --- a/packages/next-docs/pages/components/button/code.mdx +++ b/packages/next-docs/pages/components/button/code.mdx @@ -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) diff --git a/packages/next-docs/pages/components/center/code.mdx b/packages/next-docs/pages/components/center/code.mdx index 674e0d7676..17dcc4df20 100644 --- a/packages/next-docs/pages/components/center/code.mdx +++ b/packages/next-docs/pages/components/center/code.mdx @@ -14,4 +14,4 @@ - Type: `@types/react.React.ComponentPropsWithoutRef
` -[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) diff --git a/packages/next-docs/pages/components/checkbox-field/code.mdx b/packages/next-docs/pages/components/checkbox-field/code.mdx new file mode 100644 index 0000000000..581d353488 --- /dev/null +++ b/packages/next-docs/pages/components/checkbox-field/code.mdx @@ -0,0 +1,45 @@ +# CheckboxField + +Checkbox field with label and help message + +```jsx +Label +``` + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.CheckboxFieldProps & @types/react.React.RefAttributes` + +## 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) diff --git a/packages/next-docs/pages/components/checkbox-group/code.mdx b/packages/next-docs/pages/components/checkbox-group/code.mdx new file mode 100644 index 0000000000..bb051316a1 --- /dev/null +++ b/packages/next-docs/pages/components/checkbox-group/code.mdx @@ -0,0 +1,33 @@ +# CheckboxGroup + +**NOTE**: Exotic components are not callable. + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.CheckboxGroupProps & @types/react.React.RefAttributes` + +## 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) diff --git a/packages/next-docs/pages/components/checkbox/code.mdx b/packages/next-docs/pages/components/checkbox/code.mdx index 0cedf205ef..79b7089e1d 100644 --- a/packages/next-docs/pages/components/checkbox/code.mdx +++ b/packages/next-docs/pages/components/checkbox/code.mdx @@ -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) diff --git a/packages/next-docs/pages/components/clickable-bubble/code.mdx b/packages/next-docs/pages/components/clickable-bubble/code.mdx new file mode 100644 index 0000000000..841a49bfaa --- /dev/null +++ b/packages/next-docs/pages/components/clickable-bubble/code.mdx @@ -0,0 +1,29 @@ +# ClickableBubble + +Bubbles events to Clickable + +```jsx + + + +

Clicking the text will bubble the Click event to Clickable

+ +
+ +``` + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.ClickableBubbleProps & @types/react.React.RefAttributes` + +## 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) diff --git a/packages/next-docs/pages/components/clickable/code.mdx b/packages/next-docs/pages/components/clickable/code.mdx new file mode 100644 index 0000000000..14f511e1c1 --- /dev/null +++ b/packages/next-docs/pages/components/clickable/code.mdx @@ -0,0 +1,27 @@ +# Clickable + +Represents clickable surfaces + +```jsx + + Text + +``` + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.ClickableProps & @types/react.React.RefAttributes` + +## 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) diff --git a/packages/next-docs/pages/components/combobox-item/code.mdx b/packages/next-docs/pages/components/combobox-item/code.mdx new file mode 100644 index 0000000000..6970ab085e --- /dev/null +++ b/packages/next-docs/pages/components/combobox-item/code.mdx @@ -0,0 +1,21 @@ +# ComboboxItem + +**NOTE**: Exotic components are not callable. + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.ComboboxItemProps & @types/react.React.RefAttributes` + +## 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) diff --git a/packages/next-docs/pages/components/combobox-list/code.mdx b/packages/next-docs/pages/components/combobox-list/code.mdx new file mode 100644 index 0000000000..258da6a1dc --- /dev/null +++ b/packages/next-docs/pages/components/combobox-list/code.mdx @@ -0,0 +1,21 @@ +# ComboboxList + +**NOTE**: Exotic components are not callable. + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.ComboboxListProps & @types/react.React.RefAttributes` + +## Props + +### `asChild` (optional) + +Enable children composition + +- Type: `boolean` + +- Default: `false` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/combobox/combobox-list.tsx#L5) diff --git a/packages/next-docs/pages/components/combobox-popover/code.mdx b/packages/next-docs/pages/components/combobox-popover/code.mdx new file mode 100644 index 0000000000..2ec0dbdd8d --- /dev/null +++ b/packages/next-docs/pages/components/combobox-popover/code.mdx @@ -0,0 +1,21 @@ +# ComboboxPopover + +**NOTE**: Exotic components are not callable. + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.ComboboxPopoverProps & @types/react.React.RefAttributes` + +## Props + +### `asChild` (optional) + +Enable children composition + +- Type: `boolean` + +- Default: `false` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/combobox/combobox-popover.tsx#L6) diff --git a/packages/next-docs/pages/components/combobox/code.mdx b/packages/next-docs/pages/components/combobox/code.mdx new file mode 100644 index 0000000000..b450e569d8 --- /dev/null +++ b/packages/next-docs/pages/components/combobox/code.mdx @@ -0,0 +1,21 @@ +# Combobox + +**NOTE**: Exotic components are not callable. + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.ComboboxProps & @types/react.React.RefAttributes` + +## Props + +### `asChild` (optional) + +Enable children composition + +- Type: `boolean` + +- Default: `false` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/combobox/combobox.tsx#L6) diff --git a/packages/next-docs/pages/components/composable/code.mdx b/packages/next-docs/pages/components/composable/code.mdx new file mode 100644 index 0000000000..da3a4da6a8 --- /dev/null +++ b/packages/next-docs/pages/components/composable/code.mdx @@ -0,0 +1,32 @@ +# Composable + +Defines a composable child inside of a Compose component + +```jsx +function Button({ asChild, children, ...props }) { + const Composition = asChild ? Compose : "button"; + return ( + + Prefix {children} + + ); +} +``` + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.ComposableProps` + +## Props + +### `children` + +- Type: `@types/react.React.ReactNode` + +### `render` (optional) + +- Type: `@vtex/shoreline-utils.RenderProps` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/compose/composable.tsx#L17) diff --git a/packages/next-docs/pages/components/compose/code.mdx b/packages/next-docs/pages/components/compose/code.mdx new file mode 100644 index 0000000000..1a519394f9 --- /dev/null +++ b/packages/next-docs/pages/components/compose/code.mdx @@ -0,0 +1,25 @@ +# Compose + +Composes immediate child with its props and child own props. +Used to implement Shoreline composition + +```jsx +function Button({ asChild, ...props }) { + const Composition = asChild ? Compose : "button"; + return ; +} +``` + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.ComposeProps & @types/react.React.RefAttributes` + +## Props + +### `children` (optional) + +- Type: `@types/react.React.ReactNode` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/compose/compose.tsx#L15) diff --git a/packages/next-docs/pages/components/container/code.mdx b/packages/next-docs/pages/components/container/code.mdx new file mode 100644 index 0000000000..d4e12c3215 --- /dev/null +++ b/packages/next-docs/pages/components/container/code.mdx @@ -0,0 +1,27 @@ +# Container + +Wraps Content component to support Container Queries + +```jsx + + ... + +``` + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.ContainerProps & @types/react.React.RefAttributes` + +## Props + +### `as` (optional) + +Select the rendered html tag + +- Type: `@vtex/shoreline-components.ContentContainerAs` + +- Default: `'div'` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/content/container.tsx#L14) diff --git a/packages/next-docs/pages/components/content/code.mdx b/packages/next-docs/pages/components/content/code.mdx new file mode 100644 index 0000000000..1e987083bc --- /dev/null +++ b/packages/next-docs/pages/components/content/code.mdx @@ -0,0 +1,35 @@ +# Content + +Content containers allow merchants to easily scan information to understand its hierarchy and rhythm. + +```jsx + + ... + +``` + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.ContentProps & @types/react.React.RefAttributes` + +## Props + +### `as` (optional) + +Select the rendered html tag + +- Type: `@vtex/shoreline-components.ContentContainerAs` + +- Default: `'div'` + +### `narrow` (optional) + +Decrease the space token in top and bottom padding. + +- Type: `boolean` + +- Default: `false` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/content/content.tsx#L14) diff --git a/packages/next-docs/pages/components/contextual-help/code.mdx b/packages/next-docs/pages/components/contextual-help/code.mdx new file mode 100644 index 0000000000..9c738ece48 --- /dev/null +++ b/packages/next-docs/pages/components/contextual-help/code.mdx @@ -0,0 +1,29 @@ +# ContextualHelp + +Shows the user information relative to a context + +```jsx +Help message +``` + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.ContextualHelpProps & @types/react.React.RefAttributes` + +## Props + +### `children` (optional) + +Children prop + +- Type: `@types/react.React.ReactNode` + +### `label` + +Label for the help + +- Type: `string` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/contextual-help/contextual-help.tsx#L17) diff --git a/packages/next-docs/pages/components/field-label/code.mdx b/packages/next-docs/pages/components/field-label/code.mdx new file mode 100644 index 0000000000..da0caf1123 --- /dev/null +++ b/packages/next-docs/pages/components/field-label/code.mdx @@ -0,0 +1,21 @@ +# FieldLabel + +**NOTE**: Exotic components are not callable. + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.FieldLabelProps & @types/react.React.RefAttributes` + +## Props + +### `disabled` (optional) + +- Type: `boolean` + +### `optional` (optional) + +- Type: `boolean` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/field/field-label.tsx#L10) diff --git a/packages/next-docs/pages/components/field-message/code.mdx b/packages/next-docs/pages/components/field-message/code.mdx new file mode 100644 index 0000000000..453325ef20 --- /dev/null +++ b/packages/next-docs/pages/components/field-message/code.mdx @@ -0,0 +1,33 @@ +# FieldMessage + +**NOTE**: Exotic components are not callable. + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.FieldMessageProps & @types/react.React.RefAttributes` + +## Props + +### `error` (optional) + +Whether the field contains an error or not + +- Type: `boolean` + +- Default: `false` + +### `errorText` (optional) + +Error text message + +- Type: `@types/react.React.ReactNode` + +### `helpText` (optional) + +Help text message + +- Type: `@types/react.React.ReactNode` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/field/field-message.tsx#L7) diff --git a/packages/next-docs/pages/components/field/code.mdx b/packages/next-docs/pages/components/field/code.mdx new file mode 100644 index 0000000000..3cf2386be6 --- /dev/null +++ b/packages/next-docs/pages/components/field/code.mdx @@ -0,0 +1,17 @@ +# Field + +**NOTE**: Exotic components are not callable. + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.FieldProps & @types/react.React.RefAttributes` + +## Props + +### `variant` (optional) + +- Type: `default | group | control` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/field/field.tsx#L6) diff --git a/packages/next-docs/pages/components/filter-apply/code.mdx b/packages/next-docs/pages/components/filter-apply/code.mdx new file mode 100644 index 0000000000..7d615c5cea --- /dev/null +++ b/packages/next-docs/pages/components/filter-apply/code.mdx @@ -0,0 +1,21 @@ +# FilterApply + +Action that applies the Filter value, and closes the popover + +```jsx +Apply +``` + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.PopoverDismissProps & @types/react.React.RefAttributes` + +## Props + +### `FilterApplyProps` + +- Type: `@vtex/shoreline-components.PopoverDismissProps` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/filter/filter-apply.tsx#L15) diff --git a/packages/next-docs/pages/components/filter-clear/code.mdx b/packages/next-docs/pages/components/filter-clear/code.mdx new file mode 100644 index 0000000000..ee8af4b7fd --- /dev/null +++ b/packages/next-docs/pages/components/filter-clear/code.mdx @@ -0,0 +1,21 @@ +# FilterClear + +Action that clears both Filter value and UI Select value + +```jsx +Clear +``` + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.PopoverDismissProps & @types/react.React.RefAttributes` + +## Props + +### `FilterClearProps` + +- Type: `@vtex/shoreline-components.PopoverDismissProps` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/filter/filter-clear.tsx#L13) diff --git a/packages/next-docs/pages/components/filter-list/code.mdx b/packages/next-docs/pages/components/filter-list/code.mdx new file mode 100644 index 0000000000..7c0d3cfec5 --- /dev/null +++ b/packages/next-docs/pages/components/filter-list/code.mdx @@ -0,0 +1,27 @@ +# FilterList + +Filter listbox + +```jsx + + + + Option + + + +``` + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.FilterListProps & @types/react.React.RefAttributes` + +## Props + +### `FilterListProps` + +- Type: `typescript.Omit<@vtex/shoreline-components.SelectListProps, alwaysVisible>` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/filter/filter-list.tsx#L20) diff --git a/packages/next-docs/pages/components/filter-option/code.mdx b/packages/next-docs/pages/components/filter-option/code.mdx new file mode 100644 index 0000000000..a951b9f515 --- /dev/null +++ b/packages/next-docs/pages/components/filter-option/code.mdx @@ -0,0 +1,23 @@ +# FilterOption + +Filter Option + +```jsx + + Option + +``` + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.FilterOptionProps & @types/react.React.RefAttributes` + +## Props + +### `FilterOptionProps` + +- Type: `typescript.Omit<@vtex/shoreline-components.SelectOptionProps, hideOnClick>` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/filter/filter-option.tsx#L16) diff --git a/packages/next-docs/pages/components/filter-popover/code.mdx b/packages/next-docs/pages/components/filter-popover/code.mdx new file mode 100644 index 0000000000..4e52e5c53a --- /dev/null +++ b/packages/next-docs/pages/components/filter-popover/code.mdx @@ -0,0 +1,31 @@ +# FilterPopover + +Filter popover box + +```jsx + + ... + +``` + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.FilterPopoverProps & @types/react.React.RefAttributes` + +## Props + +### `asChild` (optional) + +Children composition + +- Type: `boolean` + +- Default: `false` + +### `messages` (optional) + +- Type: `{ apply: string; clear: string; }` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/filter/filter-popover.tsx#L27) diff --git a/packages/next-docs/pages/components/filter-provider/code.mdx b/packages/next-docs/pages/components/filter-provider/code.mdx new file mode 100644 index 0000000000..e2053883f8 --- /dev/null +++ b/packages/next-docs/pages/components/filter-provider/code.mdx @@ -0,0 +1,60 @@ +# FilterProvider + +Provides context to Filter + +```jsx + + ... + ... + +``` + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.FilterProviderProps` + +## Props + +### `children` + +- Type: `@types/react.React.ReactNode` + +### `defaultOpen` (optional) + +- Type: `boolean` + +### `defaultSearchValue` (optional) + +- Type: `string` + +### `defaultValue` (optional) + +- Type: `string | string[]` + +### `open` (optional) + +- Type: `boolean` + +### `searchValue` (optional) + +- Type: `string` + +### `setOpen` (optional) + +- Type: `@types/react.React.Dispatch<@types/react.React.SetStateAction>` + +### `setSearchValue` (optional) + +- Type: `@types/react.React.Dispatch<@types/react.React.SetStateAction>` + +### `setValue` (optional) + +- Type: `@types/react.React.Dispatch<@types/react.React.SetStateAction> | @types/react.React.Dispatch<@types/react.React.SetStateAction>` + +### `value` (optional) + +- Type: `string | string[]` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/filter/filter-provider.tsx#L17) diff --git a/packages/next-docs/pages/components/filter-trigger/code.mdx b/packages/next-docs/pages/components/filter-trigger/code.mdx new file mode 100644 index 0000000000..e48eef2546 --- /dev/null +++ b/packages/next-docs/pages/components/filter-trigger/code.mdx @@ -0,0 +1,23 @@ +# FilterTrigger + +Triggers the Filter Popover box, also displays the Filter applied value + +```jsx + + Open + +``` + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.PopoverTriggerProps & @types/react.React.RefAttributes` + +## Props + +### `FilterTriggerProps` + +- Type: `@vtex/shoreline-components.PopoverTriggerProps` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/filter/filter-trigger.tsx#L14) diff --git a/packages/next-docs/pages/components/filter-value/code.mdx b/packages/next-docs/pages/components/filter-value/code.mdx new file mode 100644 index 0000000000..9219bfbd0d --- /dev/null +++ b/packages/next-docs/pages/components/filter-value/code.mdx @@ -0,0 +1,17 @@ +# FilterValue + +Renders the Filter applied value + +## Parameters + +### `props` + +- Type: `typescript.Omit<@types/react.React.DetailedHTMLProps<@types/react.React.HTMLAttributes, typescript.HTMLSpanElement>, ref> & @types/react.React.RefAttributes` + +## Props + +### `FilterValueProps` + +- Type: `@types/react.React.ComponentPropsWithoutRef` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/filter/filter-value.tsx#L11) diff --git a/packages/next-docs/pages/components/filter/code.mdx b/packages/next-docs/pages/components/filter/code.mdx new file mode 100644 index 0000000000..864f5d16c6 --- /dev/null +++ b/packages/next-docs/pages/components/filter/code.mdx @@ -0,0 +1,59 @@ +# Filter + +Filter component + +```jsx + + Option + +``` + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.FilterProps & @types/react.React.RefAttributes` + +## Props + +### `children` + +- Type: `@types/react.React.ReactNode` + +### `className` (optional) + +- Type: `string` + +### `defaultSearchValue` (optional) + +- Type: `string` + +### `defaultValue` (optional) + +- Type: `string | string[]` + +### `label` + +- Type: `string` + +### `messages` (optional) + +- Type: `{ apply: string; clear: string; }` + +### `searchValue` (optional) + +- Type: `string` + +### `setSearchValue` (optional) + +- Type: `@types/react.React.Dispatch<@types/react.React.SetStateAction>` + +### `setValue` (optional) + +- Type: `@types/react.React.Dispatch<@types/react.React.SetStateAction> | @types/react.React.Dispatch<@types/react.React.SetStateAction>` + +### `value` (optional) + +- Type: `string | string[]` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/filter/filter.tsx#L17) diff --git a/packages/next-docs/pages/components/flex/code.mdx b/packages/next-docs/pages/components/flex/code.mdx new file mode 100644 index 0000000000..939d8c9223 --- /dev/null +++ b/packages/next-docs/pages/components/flex/code.mdx @@ -0,0 +1,17 @@ +# Flex + +**NOTE**: Exotic components are not callable. + +## Parameters + +### `props` + +- Type: `typescript.Omit<@types/react.React.DetailedHTMLProps<@types/react.React.HTMLAttributes, typescript.HTMLDivElement>, ref> & @vtex/shoreline-components.FlexShorthandProps & @types/react.React.RefAttributes` + +## Props + +### `FlexProps` + +- Type: `@types/react.React.ComponentPropsWithoutRef
& @vtex/shoreline-components.FlexShorthandProps` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/flex/flex.tsx#L6) diff --git a/packages/next-docs/pages/components/grid-cell/code.mdx b/packages/next-docs/pages/components/grid-cell/code.mdx new file mode 100644 index 0000000000..c99fb44ebd --- /dev/null +++ b/packages/next-docs/pages/components/grid-cell/code.mdx @@ -0,0 +1,17 @@ +# GridCell + +**NOTE**: Exotic components are not callable. + +## Parameters + +### `props` + +- Type: `typescript.Omit<@types/react.React.DetailedHTMLProps<@types/react.React.HTMLAttributes, typescript.HTMLDivElement>, ref> & @vtex/shoreline-components.GridCellShorthandProps & @types/react.React.RefAttributes` + +## Props + +### `GridCellProps` + +- Type: `@types/react.React.ComponentPropsWithoutRef
& @vtex/shoreline-components.GridCellShorthandProps` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/grid/grid-cell.tsx#L6) diff --git a/packages/next-docs/pages/components/grid/code.mdx b/packages/next-docs/pages/components/grid/code.mdx new file mode 100644 index 0000000000..34fb86d25a --- /dev/null +++ b/packages/next-docs/pages/components/grid/code.mdx @@ -0,0 +1,17 @@ +# Grid + +**NOTE**: Exotic components are not callable. + +## Parameters + +### `props` + +- Type: `typescript.Omit<@types/react.React.DetailedHTMLProps<@types/react.React.HTMLAttributes, typescript.HTMLDivElement>, ref> & @vtex/shoreline-components.GridShorthandProps & @types/react.React.RefAttributes` + +## Props + +### `GridProps` + +- Type: `@types/react.React.ComponentPropsWithoutRef
& @vtex/shoreline-components.GridShorthandProps` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/grid/grid.tsx#L6) diff --git a/packages/next-docs/pages/components/header/code.mdx b/packages/next-docs/pages/components/header/code.mdx new file mode 100644 index 0000000000..7db9b72804 --- /dev/null +++ b/packages/next-docs/pages/components/header/code.mdx @@ -0,0 +1,17 @@ +# Header + +**NOTE**: Exotic components are not callable. + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.ContentProps & @types/react.React.RefAttributes` + +## Props + +### `HeaderProps` + +- Type: `@vtex/shoreline-components.ContentProps` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/header/header.tsx#L6) diff --git a/packages/next-docs/pages/components/icon-button/code.mdx b/packages/next-docs/pages/components/icon-button/code.mdx new file mode 100644 index 0000000000..ccdea04ce8 --- /dev/null +++ b/packages/next-docs/pages/components/icon-button/code.mdx @@ -0,0 +1,59 @@ +# IconButton + +A button designed specifically for usage with a single icon. + +```jsx + + + +``` + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.IconButtonProps & @types/react.React.RefAttributes` + +## Props + +### `asChild` (optional) + +Merge button props with immediate child. + +- Type: `boolean` + +- Default: `false` + +### `children` + +- Type: `@types/react.React.ReactNode` + +### `label` + +- Type: `@types/react.React.ReactNode` + +### `loading` (optional) + +Disable the button and show a spinner. + +- Type: `boolean` + +- Default: `false` + +### `size` (optional) + +Increase or decrease padding. + +- Type: `normal | large` + +- Default: `'normal'` + +### `variant` (optional) + +Change between color combinations. + +- Type: `primary | secondary | tertiary | critical | criticalTertiary` + +- Default: `'secondary'` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/icon-button/icon-button.tsx#L16) diff --git a/packages/next-docs/pages/components/link-box/code.mdx b/packages/next-docs/pages/components/link-box/code.mdx new file mode 100644 index 0000000000..e113578a1a --- /dev/null +++ b/packages/next-docs/pages/components/link-box/code.mdx @@ -0,0 +1,44 @@ +# LinkBox + +A container that acts as a link. It allows text selection and stop its children event propagation. + +```jsx + +
+ ... +
+ +
+``` + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.LinkBoxProps & @types/react.React.RefAttributes` + +## Props + +### `asChild` (optional) + +Enable children composition + +- Type: `boolean` + +- Default: `false` + +### `href` + +The URL that the hyperlink points to. + +- Type: `string` + +### `target` (optional) + +Where to display the linked URL + +- Type: `@vtex/shoreline-components.NavigationTarget` + +- Default: `'_parent'` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/link-box/link-box.tsx#L20) diff --git a/packages/next-docs/pages/components/link/code.mdx b/packages/next-docs/pages/components/link/code.mdx new file mode 100644 index 0000000000..59daabdc1f --- /dev/null +++ b/packages/next-docs/pages/components/link/code.mdx @@ -0,0 +1,25 @@ +# Link + +Anchor component + +```jsx +Go to VTEX +``` + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.LinkProps & @types/react.React.RefAttributes` + +## Props + +### `asChild` (optional) + +Enable children composition + +- Type: `boolean` + +- Default: `false` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/link/link.tsx#L12) diff --git a/packages/next-docs/pages/components/locale-provider/code.mdx b/packages/next-docs/pages/components/locale-provider/code.mdx new file mode 100644 index 0000000000..e38b196bd7 --- /dev/null +++ b/packages/next-docs/pages/components/locale-provider/code.mdx @@ -0,0 +1,27 @@ +# LocaleProvider + +Provides the locale + +```jsx +... +``` + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.LocaleProviderProps` + +## Props + +### `children` (optional) + +- Type: `@types/react.React.ReactNode` + +### `locale` (optional) + +The BCP47 language code for the locale. + +- Type: `string` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/locale/locale-provider.tsx#L13) diff --git a/packages/next-docs/pages/components/menu-item/code.mdx b/packages/next-docs/pages/components/menu-item/code.mdx new file mode 100644 index 0000000000..ec689b8c5e --- /dev/null +++ b/packages/next-docs/pages/components/menu-item/code.mdx @@ -0,0 +1,37 @@ +# MenuItem + +**NOTE**: Exotic components are not callable. + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.MenuItemProps & @types/react.React.RefAttributes` + +## Props + +### `asChild` (optional) + +Children composition + +- Type: `boolean` + +- Default: `false` + +### `critical` (optional) + +Wether is critical + +- Type: `boolean` + +- Default: `false` + +### `disabled` (optional) + +Wether is disabled + +- Type: `boolean` + +- Default: `false` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/menu/menu-item.tsx#L6) diff --git a/packages/next-docs/pages/components/menu-provider/code.mdx b/packages/next-docs/pages/components/menu-provider/code.mdx new file mode 100644 index 0000000000..de22cd6791 --- /dev/null +++ b/packages/next-docs/pages/components/menu-provider/code.mdx @@ -0,0 +1,9 @@ +# MenuProvider + +## Parameters + +### `props` + +- Type: `@ariakit/react-core.MenuProviderProps<@ariakit/core.MenuStoreValues>` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/menu/menu-provider.tsx#L5) diff --git a/packages/next-docs/pages/components/menu-separator/code.mdx b/packages/next-docs/pages/components/menu-separator/code.mdx new file mode 100644 index 0000000000..901060b94f --- /dev/null +++ b/packages/next-docs/pages/components/menu-separator/code.mdx @@ -0,0 +1,17 @@ +# MenuSeparator + +**NOTE**: Exotic components are not callable. + +## Parameters + +### `props` + +- Type: `typescript.Omit<@types/react.React.DetailedHTMLProps<@types/react.React.HTMLAttributes, typescript.HTMLHRElement>, ref> & @types/react.React.RefAttributes` + +## Props + +### `MenuSeparatorProps` + +- Type: `@types/react.React.ComponentPropsWithoutRef
` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/menu/menu-separator.tsx#L7) diff --git a/packages/next-docs/pages/components/menu-trigger/code.mdx b/packages/next-docs/pages/components/menu-trigger/code.mdx new file mode 100644 index 0000000000..e6d3aea975 --- /dev/null +++ b/packages/next-docs/pages/components/menu-trigger/code.mdx @@ -0,0 +1,11 @@ +# MenuTrigger + +**NOTE**: Exotic components are not callable. + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.MenuTriggerProps & @types/react.React.RefAttributes` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/menu/menu-trigger.tsx#L8) diff --git a/packages/next-docs/pages/components/menu/code.mdx b/packages/next-docs/pages/components/menu/code.mdx index c2d4422939..0bfe259568 100644 --- a/packages/next-docs/pages/components/menu/code.mdx +++ b/packages/next-docs/pages/components/menu/code.mdx @@ -18,4 +18,4 @@ Children composition - Default: `false` -[View source](https://github.com/vtex/shoreline/blob/471a221f9/packages/components/src/menu/menu.tsx#L6) +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/menu/menu.tsx#L6) diff --git a/packages/next-docs/pages/components/modal-header/code.mdx b/packages/next-docs/pages/components/modal-header/code.mdx new file mode 100644 index 0000000000..0c222a8daf --- /dev/null +++ b/packages/next-docs/pages/components/modal-header/code.mdx @@ -0,0 +1,17 @@ +# ModalHeader + +**NOTE**: Exotic components are not callable. + +## Parameters + +### `props` + +- Type: `typescript.Omit<@types/react.React.DetailedHTMLProps<@types/react.React.HTMLAttributes, typescript.HTMLDivElement>, ref> & @types/react.React.RefAttributes` + +## Props + +### `ModalHeaderProps` + +- Type: `@types/react.React.ComponentPropsWithoutRef
` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/modal/modal-header.tsx#L10) diff --git a/packages/next-docs/pages/components/modal/code.mdx b/packages/next-docs/pages/components/modal/code.mdx new file mode 100644 index 0000000000..3ab820c655 --- /dev/null +++ b/packages/next-docs/pages/components/modal/code.mdx @@ -0,0 +1,25 @@ +# Modal + +**NOTE**: Exotic components are not callable. + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.ModalProps & @types/react.React.RefAttributes` + +## Props + +### `onClose` (optional) + +- Type: `{ (event: typescript.Event): void; }` + +### `open` (optional) + +- Type: `boolean` + +### `portal` (optional) + +- Type: `boolean` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/modal/modal.tsx#L8) diff --git a/packages/next-docs/pages/components/page/code.mdx b/packages/next-docs/pages/components/page/code.mdx new file mode 100644 index 0000000000..57ae977449 --- /dev/null +++ b/packages/next-docs/pages/components/page/code.mdx @@ -0,0 +1,17 @@ +# Page + +**NOTE**: Exotic components are not callable. + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.PageProps & @types/react.React.RefAttributes` + +## Props + +### `className` (optional) + +- Type: `string` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/page/page.tsx#L6) diff --git a/packages/next-docs/pages/components/pagination/code.mdx b/packages/next-docs/pages/components/pagination/code.mdx index 183b90a0be..54f0157789 100644 --- a/packages/next-docs/pages/components/pagination/code.mdx +++ b/packages/next-docs/pages/components/pagination/code.mdx @@ -46,4 +46,4 @@ The total number of items - Type: `number` -[View source](https://github.com/vtex/shoreline/blob/471a221f9/packages/components/src/pagination/pagination.tsx#L25) +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/pagination/pagination.tsx#L25) diff --git a/packages/next-docs/pages/components/popover-dismiss/code.mdx b/packages/next-docs/pages/components/popover-dismiss/code.mdx new file mode 100644 index 0000000000..a81ba008b8 --- /dev/null +++ b/packages/next-docs/pages/components/popover-dismiss/code.mdx @@ -0,0 +1,29 @@ +# PopoverDismiss + +Dismiss the Popover + +```jsx + + + Dismiss + + +``` + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.PopoverDismissProps & @types/react.React.RefAttributes` + +## Props + +### `asChild` (optional) + +Children composition + +- Type: `boolean` + +- Default: `false` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/popover/popover-dismiss.tsx#L14) diff --git a/packages/next-docs/pages/components/popover-trigger/code.mdx b/packages/next-docs/pages/components/popover-trigger/code.mdx new file mode 100644 index 0000000000..7090595ba9 --- /dev/null +++ b/packages/next-docs/pages/components/popover-trigger/code.mdx @@ -0,0 +1,28 @@ +# PopoverTrigger + +Triggers popover containers + +```jsx + + Trigger + Content + +``` + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.PopoverTriggerProps & @types/react.React.RefAttributes` + +## Props + +### `asChild` (optional) + +Children composition + +- Type: `boolean` + +- Default: `false` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/popover/popover-trigger.tsx#L14) diff --git a/packages/next-docs/pages/components/popover/code.mdx b/packages/next-docs/pages/components/popover/code.mdx new file mode 100644 index 0000000000..c614ecb350 --- /dev/null +++ b/packages/next-docs/pages/components/popover/code.mdx @@ -0,0 +1,29 @@ +# Popover + +Popover containers allow merchants to access and interact with more +information of an item through an overlay. + +```jsx + + Trigger + Content + +``` + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.PopoverProps & @types/react.React.RefAttributes` + +## Props + +### `asChild` (optional) + +Children composition + +- Type: `boolean` + +- Default: `false` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/popover/popover.tsx#L17) diff --git a/packages/next-docs/pages/components/radio-group/code.mdx b/packages/next-docs/pages/components/radio-group/code.mdx new file mode 100644 index 0000000000..48177a8e9e --- /dev/null +++ b/packages/next-docs/pages/components/radio-group/code.mdx @@ -0,0 +1,41 @@ +# RadioGroup + +**NOTE**: Exotic components are not callable. + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.RadioGroupProps & @types/react.React.RefAttributes` + +## Props + +### `className` (optional) + +- Type: `string` + +### `direction` (optional) + +- Type: `row | column` + +### `error` (optional) + +- Type: `boolean` + +### `errorText` (optional) + +- Type: `string` + +### `helpText` (optional) + +- Type: `string` + +### `label` + +- Type: `@types/react.React.ReactNode` + +### `state` (optional) + +- Type: `@ariakit/react-core.RadioStore` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/radio/radio-group.tsx#L14) diff --git a/packages/next-docs/pages/components/radio/code.mdx b/packages/next-docs/pages/components/radio/code.mdx index 3e3003934b..e13f991f80 100644 --- a/packages/next-docs/pages/components/radio/code.mdx +++ b/packages/next-docs/pages/components/radio/code.mdx @@ -18,4 +18,4 @@ - Type: `string` -[View source](https://github.com/vtex/shoreline/blob/471a221f9/packages/components/src/radio/radio.tsx#L8) +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/radio/radio.tsx#L8) diff --git a/packages/next-docs/pages/components/search/code.mdx b/packages/next-docs/pages/components/search/code.mdx new file mode 100644 index 0000000000..e42ab043eb --- /dev/null +++ b/packages/next-docs/pages/components/search/code.mdx @@ -0,0 +1,25 @@ +# Search + +**NOTE**: Exotic components are not callable. + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.SearchProps & @types/react.React.RefAttributes` + +## Props + +### `loading` (optional) + +Whether component is loading or not + +- Type: `boolean` + +- Default: `false` + +### `onClear` (optional) + +- Type: `{ (): void; }` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/search/search.tsx#L10) diff --git a/packages/next-docs/pages/components/select-field/code.mdx b/packages/next-docs/pages/components/select-field/code.mdx new file mode 100644 index 0000000000..f15602d585 --- /dev/null +++ b/packages/next-docs/pages/components/select-field/code.mdx @@ -0,0 +1,46 @@ +# SelectField + +Select fields allow merchants to choose a single option from a list +that includes between five and seven values. + +```jsx + + + + + +``` + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.SelectFieldProps & @types/react.React.RefAttributes` + +## Props + +### `disabled` (optional) + +- Type: `boolean` + +### `error` (optional) + +- Type: `boolean` + +### `errorText` (optional) + +- Type: `@types/react.React.ReactNode` + +### `helpText` (optional) + +- Type: `@types/react.React.ReactNode` + +### `label` (optional) + +- Type: `@types/react.React.ReactNode` + +### `optional` (optional) + +- Type: `boolean` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/select-field/select-field.tsx#L24) diff --git a/packages/next-docs/pages/components/select-list/code.mdx b/packages/next-docs/pages/components/select-list/code.mdx new file mode 100644 index 0000000000..4062064b29 --- /dev/null +++ b/packages/next-docs/pages/components/select-list/code.mdx @@ -0,0 +1,25 @@ +# SelectList + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.SelectListProps & @types/react.React.RefAttributes` + +## Props + +### `alwaysVisible` (optional) + +- Type: `boolean` + +- Default: `false` + +### `asChild` (optional) + +Enable children composition + +- Type: `boolean` + +- Default: `false` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/select/select-list.tsx#L8) diff --git a/packages/next-docs/pages/components/select-option-check/code.mdx b/packages/next-docs/pages/components/select-option-check/code.mdx new file mode 100644 index 0000000000..b39fe05738 --- /dev/null +++ b/packages/next-docs/pages/components/select-option-check/code.mdx @@ -0,0 +1,17 @@ +# SelectOptionCheck + +**NOTE**: Exotic components are not callable. + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.SelectOptionCheckProps & @types/react.React.RefAttributes` + +## Props + +### `className` (optional) + +- Type: `string` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/select/select-option-check.tsx#L5) diff --git a/packages/next-docs/pages/components/select-option/code.mdx b/packages/next-docs/pages/components/select-option/code.mdx new file mode 100644 index 0000000000..19d4f320ca --- /dev/null +++ b/packages/next-docs/pages/components/select-option/code.mdx @@ -0,0 +1,35 @@ +# SelectOption + +**NOTE**: Exotic components are not callable. + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.SelectOptionProps & @types/react.React.RefAttributes` + +## Props + +### `asChild` (optional) + +Enable children composition + +- Type: `boolean` + +- Default: `false` + +### `hideOnClick` (optional) + +Whether to hide the select when this item is clicked. By default, it's true when the value prop is also provided. + +- Type: `boolean` + +- Default: `true` + +### `value` (optional) + +Option value + +- Type: `string` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/select/select-option.tsx#L8) diff --git a/packages/next-docs/pages/components/select-popover/code.mdx b/packages/next-docs/pages/components/select-popover/code.mdx new file mode 100644 index 0000000000..a80bafab22 --- /dev/null +++ b/packages/next-docs/pages/components/select-popover/code.mdx @@ -0,0 +1,21 @@ +# SelectPopover + +**NOTE**: Exotic components are not callable. + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.SelectPopoverProps & @types/react.React.RefAttributes` + +## Props + +### `asChild` (optional) + +Enable children composition + +- Type: `boolean` + +- Default: `false` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/select/select-popover.tsx#L7) diff --git a/packages/next-docs/pages/components/select/code.mdx b/packages/next-docs/pages/components/select/code.mdx index 9b74183543..46f210a171 100644 --- a/packages/next-docs/pages/components/select/code.mdx +++ b/packages/next-docs/pages/components/select/code.mdx @@ -18,4 +18,4 @@ Enable children composition - Default: `false` -[View source](https://github.com/vtex/shoreline/blob/471a221f9/packages/components/src/select/select.tsx#L5) +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/select/select.tsx#L5) diff --git a/packages/next-docs/pages/components/simple-table/code.mdx b/packages/next-docs/pages/components/simple-table/code.mdx new file mode 100644 index 0000000000..5148b031ed --- /dev/null +++ b/packages/next-docs/pages/components/simple-table/code.mdx @@ -0,0 +1,103 @@ +# SimpleTable + +Controlled table render built on top of TanStack/Table API + +```jsx + +``` + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.SimpleTableProps & @types/react.React.RefAttributes` + +## Props + +### `asChild` (optional) + +If true, the Table component will be rendered as a child of the Compose component + +- Type: `boolean` + +- Default: `false` + +### `columnWidths` (optional) + +Array of column widths + +When using the Table component + +- Type: `string[]` + +- Default: ` + [] + +When using the SimpleTable component +` + +### `density` (optional) + +The density of the table + +- Type: `default | compact | comfortable` + +- Default: `'default'` + +### `options` (optional) + +Other TanStack/Table options + +- Type: `@vtex/shoreline-components.Options` + +### `renderDetail` (optional) + +- Type: `{ (row: @tanstack/table-core.Row): @types/react.React.ReactNode; }` + +### `rowClick` (optional) + +- Type: `@vtex/shoreline-components.RowClick` + +### `setSort` (optional) + +Setter for SortingState for controlled sort usage + +- Type: `@tanstack/table-core.OnChangeFn<@tanstack/table-core.SortingState>` + +### `sort` (optional) + +SortingState for controlled sort usage + +- Type: `@tanstack/table-core.SortingState` + +### `sortable` (optional) + +Defines if columns will be sortable + +- Type: `boolean` + +- Default: `false` + +### `stickyColumn` (optional) + +If true, the first column will be sticky + +- Type: `boolean` + +- Default: `false` + +### `stickyHeader` (optional) + +If true, the header will be sticky + +- Type: `boolean` + +- Default: `false` + +### `virtualizer` (optional) + +Virtualizar table model + +- Type: `@vtex/shoreline-components.UseVirtualizerModelReturn` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/simple-table/simple-table.tsx#L29) diff --git a/packages/next-docs/pages/components/skeleton/code.mdx b/packages/next-docs/pages/components/skeleton/code.mdx new file mode 100644 index 0000000000..941100caa6 --- /dev/null +++ b/packages/next-docs/pages/components/skeleton/code.mdx @@ -0,0 +1,21 @@ +# Skeleton + +**NOTE**: Exotic components are not callable. + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.SkeletonProps & @types/react.React.RefAttributes` + +## Props + +### `shape` (optional) + +Skeleton shape + +- Type: `circle | rect` + +- Default: `rect` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/skeleton/skeleton.tsx#L5) diff --git a/packages/next-docs/pages/components/spinner/code.mdx b/packages/next-docs/pages/components/spinner/code.mdx index f4ac545530..ff99af6d77 100644 --- a/packages/next-docs/pages/components/spinner/code.mdx +++ b/packages/next-docs/pages/components/spinner/code.mdx @@ -30,4 +30,4 @@ Increase or decrease the size of the shape - Default: `16` -[View source](https://github.com/vtex/shoreline/blob/471a221f9/packages/components/src/spinner/spinner.tsx#L13) +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/spinner/spinner.tsx#L13) diff --git a/packages/next-docs/pages/components/stack/code.mdx b/packages/next-docs/pages/components/stack/code.mdx new file mode 100644 index 0000000000..5f0dff712f --- /dev/null +++ b/packages/next-docs/pages/components/stack/code.mdx @@ -0,0 +1,45 @@ +# Stack + +**NOTE**: Exotic components are not callable. + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.StackProps & @types/react.React.RefAttributes` + +## Props + +### `align` (optional) + +items alignment + +- Type: `end | start` + +- Default: `start` + +### `direction` (optional) + +direction of items + +- Type: `row | column` + +- Default: `column` + +### `fluid` (optional) + +if the items should grow in width to match the container + +- Type: `boolean` + +- Default: `false` + +### `space` (optional) + +space between items + +- Type: `string` + +- Default: `0` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/stack/stack.tsx#L6) diff --git a/packages/next-docs/pages/components/tab-list/code.mdx b/packages/next-docs/pages/components/tab-list/code.mdx new file mode 100644 index 0000000000..9104aaf55a --- /dev/null +++ b/packages/next-docs/pages/components/tab-list/code.mdx @@ -0,0 +1,30 @@ +# TabList + +```jsx + + + Tab 1 + Tab 2 + + Tab 1 + Tab 2 + +``` + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.TabListProps & @types/react.React.RefAttributes` + +## Props + +### `asChild` (optional) + +Enable children composition + +- Type: `boolean` + +- Default: `false` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/tab/tab-list.tsx#L22) diff --git a/packages/next-docs/pages/components/tab-panel/code.mdx b/packages/next-docs/pages/components/tab-panel/code.mdx new file mode 100644 index 0000000000..13f2af8db9 --- /dev/null +++ b/packages/next-docs/pages/components/tab-panel/code.mdx @@ -0,0 +1,36 @@ +# TabPanel + +```jsx + + + Tab 1 + Tab 2 + + Tab 1 + Tab 2 + +``` + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.TabPanelProps & @types/react.React.RefAttributes` + +## Props + +### `asChild` (optional) + +Enable children composition + +- Type: `boolean` + +- Default: `false` + +### `tabId` (optional) + +The id of the tab that controls this panel. By default, this value will be inferred based on the order of the tabs and the panels. + +- Type: `string` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/tab/tab-panel.tsx#L22) diff --git a/packages/next-docs/pages/components/tab/code.mdx b/packages/next-docs/pages/components/tab/code.mdx new file mode 100644 index 0000000000..026d87f96e --- /dev/null +++ b/packages/next-docs/pages/components/tab/code.mdx @@ -0,0 +1,30 @@ +# Tab + +```jsx + + + Tab 1 + Tab 2 + + Tab 1 + Tab 2 + +``` + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.TabProps & @types/react.React.RefAttributes` + +## Props + +### `asChild` (optional) + +Enable children composition + +- Type: `boolean` + +- Default: `false` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/tab/tab.tsx#L22) diff --git a/packages/next-docs/pages/components/table-body/code.mdx b/packages/next-docs/pages/components/table-body/code.mdx new file mode 100644 index 0000000000..6862225286 --- /dev/null +++ b/packages/next-docs/pages/components/table-body/code.mdx @@ -0,0 +1,17 @@ +# TableBody + +**NOTE**: Exotic components are not callable. + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.TableBodyProps & @types/react.React.RefAttributes` + +## Props + +### `asChild` (optional) + +- Type: `boolean` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/table/table-body.tsx#L7) diff --git a/packages/next-docs/pages/components/table-cell/code.mdx b/packages/next-docs/pages/components/table-cell/code.mdx new file mode 100644 index 0000000000..a53d74365a --- /dev/null +++ b/packages/next-docs/pages/components/table-cell/code.mdx @@ -0,0 +1,17 @@ +# TableCell + +**NOTE**: Exotic components are not callable. + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.TableCellProps & @types/react.React.RefAttributes` + +## Props + +### `asChild` (optional) + +- Type: `boolean` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/table/table-cell.tsx#L6) diff --git a/packages/next-docs/pages/components/table-header-cell/code.mdx b/packages/next-docs/pages/components/table-header-cell/code.mdx new file mode 100644 index 0000000000..be10a7abb9 --- /dev/null +++ b/packages/next-docs/pages/components/table-header-cell/code.mdx @@ -0,0 +1,21 @@ +# TableHeaderCell + +**NOTE**: Exotic components are not callable. + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.TableHeaderCellProps & @types/react.React.RefAttributes` + +## Props + +### `asChild` (optional) + +- Type: `boolean` + +### `sortable` (optional) + +- Type: `boolean` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/table/table-header-cell.tsx#L7) diff --git a/packages/next-docs/pages/components/table-header/code.mdx b/packages/next-docs/pages/components/table-header/code.mdx new file mode 100644 index 0000000000..4bd3889361 --- /dev/null +++ b/packages/next-docs/pages/components/table-header/code.mdx @@ -0,0 +1,17 @@ +# TableHeader + +**NOTE**: Exotic components are not callable. + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.TableHeaderProps & @types/react.React.RefAttributes` + +## Props + +### `asChild` (optional) + +- Type: `boolean` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/table/table-header.tsx#L7) diff --git a/packages/next-docs/pages/components/table-row/code.mdx b/packages/next-docs/pages/components/table-row/code.mdx new file mode 100644 index 0000000000..d020b63cae --- /dev/null +++ b/packages/next-docs/pages/components/table-row/code.mdx @@ -0,0 +1,29 @@ +# TableRow + +**NOTE**: Exotic components are not callable. + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.TableRowProps & @types/react.React.RefAttributes` + +## Props + +### `asChild` (optional) + +- Type: `boolean` + +### `dimOnHover` (optional) + +- Type: `boolean` + +### `expanded` (optional) + +- Type: `boolean` + +### `selected` (optional) + +- Type: `boolean` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/table/table-row.tsx#L7) diff --git a/packages/next-docs/pages/components/table/code.mdx b/packages/next-docs/pages/components/table/code.mdx new file mode 100644 index 0000000000..b8589daf00 --- /dev/null +++ b/packages/next-docs/pages/components/table/code.mdx @@ -0,0 +1,59 @@ +# Table + +**NOTE**: Exotic components are not callable. + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.TableProps & @types/react.React.RefAttributes` + +## Props + +### `asChild` (optional) + +If true, the Table component will be rendered as a child of the Compose component + +- Type: `boolean` + +- Default: `false` + +### `columnWidths` (optional) + +Array of column widths + +When using the Table component + +- Type: `string[]` + +- Default: ` + [] + +When using the SimpleTable component +` + +### `density` (optional) + +The density of the table + +- Type: `default | compact | comfortable` + +- Default: `'default'` + +### `stickyColumn` (optional) + +If true, the first column will be sticky + +- Type: `boolean` + +- Default: `false` + +### `stickyHeader` (optional) + +If true, the header will be sticky + +- Type: `boolean` + +- Default: `false` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/table/table.tsx#L8) diff --git a/packages/next-docs/pages/components/tag/code.mdx b/packages/next-docs/pages/components/tag/code.mdx index 6a72af657f..4948540ed4 100644 --- a/packages/next-docs/pages/components/tag/code.mdx +++ b/packages/next-docs/pages/components/tag/code.mdx @@ -22,4 +22,4 @@ - Type: `primary | secondary` -[View source](https://github.com/vtex/shoreline/blob/471a221f9/packages/components/src/tag/tag.tsx#L5) +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/tag/tag.tsx#L5) diff --git a/packages/next-docs/pages/components/text-input/code.mdx b/packages/next-docs/pages/components/text-input/code.mdx index 2e62b78506..b33939d575 100644 --- a/packages/next-docs/pages/components/text-input/code.mdx +++ b/packages/next-docs/pages/components/text-input/code.mdx @@ -54,4 +54,4 @@ Node added before input space - Type: `@types/react.React.ReactNode` -[View source](https://github.com/vtex/shoreline/blob/471a221f9/packages/components/src/text-input/text-input.tsx#L7) +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/text-input/text-input.tsx#L7) diff --git a/packages/next-docs/pages/components/text/code.mdx b/packages/next-docs/pages/components/text/code.mdx new file mode 100644 index 0000000000..1c4bf7fee6 --- /dev/null +++ b/packages/next-docs/pages/components/text/code.mdx @@ -0,0 +1,17 @@ +# Text + +**NOTE**: Exotic components are not callable. + +## Parameters + +### `props` + +- Type: `{ as: div | h1 | h2 | h3 | h4 | h5 | h6 | label | li | p | span; variant: body | action | emphasis | caption1 | caption2 | display1 | display2 | display3 | display4; }` + +## Props + +### `TextProps` + +- Type: `@vtex/shoreline-components.Span | @vtex/shoreline-components.Heading | @vtex/shoreline-components.Label | @vtex/shoreline-components.Paragraph | @vtex/shoreline-components.Div | @vtex/shoreline-components.Li` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/text/text.tsx#L6) diff --git a/packages/next-docs/pages/components/textarea/code.mdx b/packages/next-docs/pages/components/textarea/code.mdx index 096ef753d1..ee5f1e49dc 100644 --- a/packages/next-docs/pages/components/textarea/code.mdx +++ b/packages/next-docs/pages/components/textarea/code.mdx @@ -26,4 +26,12 @@ - Type: `@types/react.React.ReactNode` -[View source](https://github.com/vtex/shoreline/blob/471a221f9/packages/components/src/textarea/textarea.tsx#L10) +### `optional` (optional) + +- Type: `boolean` + +### `resizable` (optional) + +- Type: `boolean` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/textarea/textarea.tsx#L10) diff --git a/packages/next-docs/pages/components/toast-stack/code.mdx b/packages/next-docs/pages/components/toast-stack/code.mdx new file mode 100644 index 0000000000..19bf23fc1e --- /dev/null +++ b/packages/next-docs/pages/components/toast-stack/code.mdx @@ -0,0 +1,33 @@ +# ToastStack + +Stack of toasts + +```jsx + +``` + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.ToastStackProps` + +## Props + +### `gutter` (optional) + +- Type: `number` + +### `position` (optional) + +- Type: `@vtex/shoreline-components.ToastPosition` + +### `reverseOrder` (optional) + +- Type: `boolean` + +### `toastOptions` (optional) + +- Type: `react-hot-toast.DefaultToastOptions` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/toast/toast-stack.tsx#L16) diff --git a/packages/next-docs/pages/components/tooltip-anchor/code.mdx b/packages/next-docs/pages/components/tooltip-anchor/code.mdx new file mode 100644 index 0000000000..9c2f376507 --- /dev/null +++ b/packages/next-docs/pages/components/tooltip-anchor/code.mdx @@ -0,0 +1,25 @@ +# TooltipAnchor + +The anchor of the Tooltip + +```jsx + + + + + +``` + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.TooltipAnchorProps & @types/react.React.RefAttributes` + +## Props + +### `asChild` (optional) + +- Type: `boolean` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/tooltip/tooltip-anchor.tsx#L14) diff --git a/packages/next-docs/pages/components/tooltip-arrow/code.mdx b/packages/next-docs/pages/components/tooltip-arrow/code.mdx new file mode 100644 index 0000000000..01ef74f00e --- /dev/null +++ b/packages/next-docs/pages/components/tooltip-arrow/code.mdx @@ -0,0 +1,25 @@ +# TooltipArrow + +Arrow of the Tooltip + +```jsx + + + + + +``` + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.TooltipArrowProps & @types/react.React.RefAttributes` + +## Props + +### `asChild` (optional) + +- Type: `boolean` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/tooltip/tooltip-arrow.tsx#L14) diff --git a/packages/next-docs/pages/components/tooltip-popover/code.mdx b/packages/next-docs/pages/components/tooltip-popover/code.mdx new file mode 100644 index 0000000000..ebef7e92c8 --- /dev/null +++ b/packages/next-docs/pages/components/tooltip-popover/code.mdx @@ -0,0 +1,27 @@ +# TooltipPopover + +Popover of the Tooltip + +```jsx + + Text + +``` + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.TooltipPopoverProps & @types/react.React.RefAttributes` + +## Props + +### `asChild` (optional) + +- Type: `boolean` + +### `gutter` (optional) + +- Type: `number` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/tooltip/tooltip-popover.tsx#L16) diff --git a/packages/next-docs/pages/components/tooltip/code.mdx b/packages/next-docs/pages/components/tooltip/code.mdx new file mode 100644 index 0000000000..75715d237c --- /dev/null +++ b/packages/next-docs/pages/components/tooltip/code.mdx @@ -0,0 +1,25 @@ +# Tooltip + +Tooltip component + +```jsx + + + +``` + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.TooltipProps & @types/react.React.RefAttributes` + +## Props + +### `text` + +Text displayed on the popover + +- Type: `@types/react.React.ReactNode` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/tooltip/tooltip.tsx#L17) diff --git a/packages/next-docs/pages/components/virtual-container/code.mdx b/packages/next-docs/pages/components/virtual-container/code.mdx new file mode 100644 index 0000000000..708db19292 --- /dev/null +++ b/packages/next-docs/pages/components/virtual-container/code.mdx @@ -0,0 +1,25 @@ +# VirtualContainer + +Augmented forwardRef function to support generics + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.VirtualContainerProps & @types/react.React.RefAttributes` + +## Props + +### `asChild` (optional) + +- Type: `boolean` + +### `children` + +- Type: `@types/react.React.ReactNode` + +### `virtualizer` + +- Type: `@vtex/shoreline-components.UseVirtualizerModelReturn` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/virtual/virtual-container.tsx#L7) diff --git a/packages/next-docs/pages/components/virtual-item/code.mdx b/packages/next-docs/pages/components/virtual-item/code.mdx new file mode 100644 index 0000000000..5abb89a181 --- /dev/null +++ b/packages/next-docs/pages/components/virtual-item/code.mdx @@ -0,0 +1,11 @@ +# VirtualItem + +Augmented forwardRef function to support generics + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.VirtualItemsProps & @types/react.React.RefAttributes` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/virtual/virtual-item.tsx#L7) diff --git a/packages/next-docs/pages/components/virtual/code.mdx b/packages/next-docs/pages/components/virtual/code.mdx new file mode 100644 index 0000000000..d344795513 --- /dev/null +++ b/packages/next-docs/pages/components/virtual/code.mdx @@ -0,0 +1,29 @@ +# Virtual + +Augmented forwardRef function to support generics + +## Parameters + +### `props` + +- Type: `@vtex/shoreline-components.VirtualProps & @types/react.React.RefAttributes` + +## Props + +### `count` + +- Type: `number` + +### `dynamic` (optional) + +- Type: `boolean` + +### `estimateSize` (optional) + +- Type: `{ (index: number): number; }` + +### `overscan` (optional) + +- Type: `number` + +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/virtual/virtual.tsx#L13) diff --git a/packages/next-docs/pages/components/visually-hidden/code.mdx b/packages/next-docs/pages/components/visually-hidden/code.mdx index 0485c1595b..e5ac14c12e 100644 --- a/packages/next-docs/pages/components/visually-hidden/code.mdx +++ b/packages/next-docs/pages/components/visually-hidden/code.mdx @@ -20,4 +20,4 @@ Renders an element that is visually only to screen readers - Type: `@types/react.React.ReactNode` -[View source](https://github.com/vtex/shoreline/blob/471a221f9/packages/components/src/visually-hidden/visually-hidden.tsx#L12) +[View source](https://github.com/vtex/shoreline/blob/4b310ee4d/packages/components/src/visually-hidden/visually-hidden.tsx#L12)