diff --git a/documentation-site/components/api-table.js b/documentation-site/components/api-table.js deleted file mode 100644 index e170907b8f..0000000000 --- a/documentation-site/components/api-table.js +++ /dev/null @@ -1,98 +0,0 @@ -/* -Copyright (c) Uber Technologies, Inc. - -This source code is licensed under the MIT license found in the -LICENSE file in the root directory of this source tree. -*/ -/* eslint-disable flowtype/require-valid-file-annotation */ - -import * as React from 'react'; -import { Table } from 'baseui/table-semantic'; -import { useStyletron } from 'baseui'; -import { StatefulPopover, PLACEMENT, TRIGGER_TYPE } from 'baseui/popover'; -import { H3 } from './markdown-elements'; -import { convert } from './yard/type-definition'; - -const ApiTable = (props) => { - const { title, config, types } = props; - const [css, theme] = useStyletron(); - const flowTypes = {}; - try { - types.component.value.members.forEach((member) => { - flowTypes[member.key.name] = convert(member, true); - }); - // eslint-disable-next-line no-empty - } catch (e) {} - const data = Object.keys(config.props) - .sort() - .map((prop) => { - return [ -
- {prop} -
, - flowTypes[prop] ? ( - - {flowTypes[prop]} - - } - > -
- {config.props[prop].type} -
-
- ) : ( -
- {config.props[prop].type} -
- ), - config.props[prop].description, - ]; - }); - return ( - -

{title}

- - - ); -}; - -export default ApiTable; diff --git a/documentation-site/components/api.js b/documentation-site/components/api.js deleted file mode 100644 index 5e7bef0506..0000000000 --- a/documentation-site/components/api.js +++ /dev/null @@ -1,95 +0,0 @@ -/* -Copyright (c) Uber Technologies, Inc. - -This source code is licensed under the MIT license found in the -LICENSE file in the root directory of this source tree. -*/ -/* eslint-disable flowtype/require-valid-file-annotation */ - -import * as React from 'react'; -import Props from 'pretty-proptypes'; - -import { Block } from 'baseui/block'; -import { Button, SIZE as ButtonSize, KIND as ButtonKind } from 'baseui/button'; -import { ParagraphSmall } from 'baseui/typography'; -import { H3 } from './markdown-elements'; - -const API = (props) => { - const { heading, api } = props; - return ( - -

{heading}

- - { - return {props.children}; - }, - Button: (props) => { - return ( - - ); - }, - Indent: (props) => { - return ( - ({ - paddingLeft: $theme.sizing.scale600, - }), - }, - }} - > - {props.children} - - ); - }, - Required: (props) => { - return ( - - {props.children} - - ); - }, - Type: (props) => { - return ( - - {props.children} - - ); - }, - TypeMeta: (props) => { - return ( - - {props.children} - - ); - }, - FunctionType: (props) => { - return ( - - {props.children} - - ); - }, - StringType: (props) => { - return ( - - {props.children} - - ); - }, - }} - /> - -
- ); -}; - -export default API; diff --git a/documentation-site/components/yard/config/accordion.ts b/documentation-site/components/yard/config/accordion.ts index 97034cb46c..ce70b43a95 100644 --- a/documentation-site/components/yard/config/accordion.ts +++ b/documentation-site/components/yard/config/accordion.ts @@ -8,9 +8,6 @@ import { Accordion, Panel } from 'baseui/accordion'; import { PropTypes } from 'react-view'; import { TConfig } from '../types'; -const accordionProps = require('!!extract-react-types-loader!../../../../src/accordion/accordion'); -const panelProps = require('!!extract-react-types-loader!../../../../src/accordion/panel'); - const AccordionConfig: TConfig = { componentName: 'Accordion', imports: { @@ -73,10 +70,6 @@ const AccordionConfig: TConfig = { }, }, }, - mapTokensToProps: { - Accordion: accordionProps, - Panel: panelProps, - }, }; export default AccordionConfig; diff --git a/documentation-site/components/yard/config/app-nav-bar.ts b/documentation-site/components/yard/config/app-nav-bar.ts index 6f7c9130cf..63ed59f31a 100644 --- a/documentation-site/components/yard/config/app-nav-bar.ts +++ b/documentation-site/components/yard/config/app-nav-bar.ts @@ -3,8 +3,6 @@ import { ChevronDown, Delete, Overflow, Upload } from 'baseui/icon'; import { PropTypes } from 'react-view'; import { TConfig } from '../types'; -const navBarProps = require('!!extract-react-types-loader!../../../../src/app-nav-bar/app-nav-bar'); - const NavigationBarConfig: TConfig = { componentName: 'AppNavBar', imports: { @@ -120,9 +118,6 @@ const NavigationBarConfig: TConfig = { }, }, }, - mapTokensToProps: { - AppNavBar: navBarProps, - }, }; export default NavigationBarConfig; diff --git a/documentation-site/components/yard/config/avatar.ts b/documentation-site/components/yard/config/avatar.ts index 388fbd58f1..f53d947918 100644 --- a/documentation-site/components/yard/config/avatar.ts +++ b/documentation-site/components/yard/config/avatar.ts @@ -2,8 +2,6 @@ import { Avatar } from 'baseui/avatar'; import { PropTypes } from 'react-view'; import { TConfig } from '../types'; -const avatarProps = require('!!extract-react-types-loader!../../../../src/avatar/avatar'); - const AvatarConfig: TConfig = { componentName: 'Avatar', imports: { @@ -46,9 +44,6 @@ const AvatarConfig: TConfig = { }, }, }, - mapTokensToProps: { - Avatar: avatarProps, - }, }; export default AvatarConfig; diff --git a/documentation-site/components/yard/config/badge.ts b/documentation-site/components/yard/config/badge.ts index 36dab12bb8..2fa0c53a32 100644 --- a/documentation-site/components/yard/config/badge.ts +++ b/documentation-site/components/yard/config/badge.ts @@ -9,8 +9,6 @@ import { Skeleton } from 'baseui/skeleton'; import { PropTypes } from 'react-view'; import { TConfig } from '../types'; -const badgeProps = require('!!extract-react-types-loader!../../../../src/badge/badge'); - const BadgeConfig: TConfig = { componentName: 'Badge', imports: { @@ -121,9 +119,6 @@ const BadgeConfig: TConfig = { }, }, }, - mapTokensToProps: { - Badge: badgeProps, - }, }; export default BadgeConfig; diff --git a/documentation-site/components/yard/config/banner.ts b/documentation-site/components/yard/config/banner.ts index b30c12af32..f6f18ff4d1 100644 --- a/documentation-site/components/yard/config/banner.ts +++ b/documentation-site/components/yard/config/banner.ts @@ -8,8 +8,6 @@ import { Banner, ACTION_POSITION, ARTWORK_TYPE, HIERARCHY, KIND } from 'baseui/b import { PropTypes } from 'react-view'; import { TConfig } from '../types'; -const bannerProps = require('!!extract-react-types-loader!../../../../src/banner/banner'); - const BannerConfig: TConfig = { componentName: 'Banner', imports: { @@ -104,9 +102,6 @@ const BannerConfig: TConfig = { }, }, }, - mapTokensToProps: { - Banner: bannerProps, - }, }; export default BannerConfig; diff --git a/documentation-site/components/yard/config/breadcrumbs.ts b/documentation-site/components/yard/config/breadcrumbs.ts index a3a8df0f79..c1c3c598eb 100644 --- a/documentation-site/components/yard/config/breadcrumbs.ts +++ b/documentation-site/components/yard/config/breadcrumbs.ts @@ -4,8 +4,6 @@ import { PropTypes } from 'react-view'; import { TConfig } from '../types'; import iconConfig from './icon'; -const breadcrumbsProps = require('!!extract-react-types-loader!../../../../src/breadcrumbs/breadcrumbs'); - const BreadcrumbsConfig: TConfig = { componentName: 'Breadcrumbs', imports: { @@ -51,9 +49,6 @@ const BreadcrumbsConfig: TConfig = { }, }, }, - mapTokensToProps: { - Breadcrumbs: breadcrumbsProps, - }, }; export default BreadcrumbsConfig; diff --git a/documentation-site/components/yard/config/button-group.ts b/documentation-site/components/yard/config/button-group.ts index f1a64c0c91..6d6055543b 100644 --- a/documentation-site/components/yard/config/button-group.ts +++ b/documentation-site/components/yard/config/button-group.ts @@ -9,9 +9,6 @@ import { Button } from 'baseui/button'; import { PropTypes } from 'react-view'; import { TConfig } from '../types'; -const buttonGroupProps = require('!!extract-react-types-loader!../../../../src/button-group/button-group'); -const buttonProps = require('!!extract-react-types-loader!../../../../src/button/button'); - const ButtonGroupConfig: TConfig = { componentName: 'ButtonGroup', imports: { @@ -134,10 +131,6 @@ const ButtonGroupConfig: TConfig = { }, }, }, - mapTokensToProps: { - ButtonGroup: buttonGroupProps, - Button: buttonProps, - }, }; export default ButtonGroupConfig; diff --git a/documentation-site/components/yard/config/button.ts b/documentation-site/components/yard/config/button.ts index 5a0ce89ec6..9867da4a64 100644 --- a/documentation-site/components/yard/config/button.ts +++ b/documentation-site/components/yard/config/button.ts @@ -8,8 +8,6 @@ import { Button, KIND, SIZE, SHAPE } from 'baseui/button'; import { PropTypes } from 'react-view'; import { TConfig } from '../types'; -const buttonProps = require('!!extract-react-types-loader!../../../../src/button/button'); - const ButtonConfig: TConfig = { componentName: 'Button', imports: { @@ -148,9 +146,6 @@ const ButtonConfig: TConfig = { }, }, }, - mapTokensToProps: { - Button: buttonProps, - }, }; export default ButtonConfig; diff --git a/documentation-site/components/yard/config/card.ts b/documentation-site/components/yard/config/card.ts index 5f398faec3..38afa09b76 100644 --- a/documentation-site/components/yard/config/card.ts +++ b/documentation-site/components/yard/config/card.ts @@ -3,9 +3,6 @@ import { Button } from 'baseui/button'; import { PropTypes } from 'react-view'; import { TConfig } from '../types'; -const cardProps = require('!!extract-react-types-loader!../../../../src/card/card'); -const buttonProps = require('!!extract-react-types-loader!../../../../src/button/button'); - const CardConfig: TConfig = { componentName: 'Card', imports: { @@ -69,10 +66,6 @@ const CardConfig: TConfig = { }, }, }, - mapTokensToProps: { - Button: buttonProps, - Card: cardProps, - }, }; export default CardConfig; diff --git a/documentation-site/components/yard/config/checkbox.ts b/documentation-site/components/yard/config/checkbox.ts index b8894f4208..9eb63a92f5 100644 --- a/documentation-site/components/yard/config/checkbox.ts +++ b/documentation-site/components/yard/config/checkbox.ts @@ -10,8 +10,6 @@ import { PropTypes } from 'react-view'; import { TConfig } from '../types'; import { changeHandlers } from './common/common'; -const checkboxProps = require('!!extract-react-types-loader!../../../../src/checkbox/checkbox'); - const CheckboxConfig: TConfig = { componentName: 'Checkbox', imports: { @@ -179,9 +177,6 @@ const CheckboxConfig: TConfig = { }, }, }, - mapTokensToProps: { - Checkbox: checkboxProps, - }, }; export default CheckboxConfig; diff --git a/documentation-site/components/yard/config/combobox.ts b/documentation-site/components/yard/config/combobox.ts index 5e773fe66c..502c7b33c9 100644 --- a/documentation-site/components/yard/config/combobox.ts +++ b/documentation-site/components/yard/config/combobox.ts @@ -4,8 +4,6 @@ import { TConfig } from '../types'; import inputConfig from './input'; import popoverConfig from './popover'; -const comboboxProps = require('!!extract-react-types-loader!../../../../src/combobox/combobox'); - const ComboboxConfig: TConfig = { componentName: 'Combobox', imports: { @@ -131,9 +129,6 @@ const ComboboxConfig: TConfig = { }, }, }, - mapTokensToProps: { - Combobox: comboboxProps, - }, }; export default ComboboxConfig; diff --git a/documentation-site/components/yard/config/datepicker.ts b/documentation-site/components/yard/config/datepicker.ts index 1093002a25..d93dc7c014 100644 --- a/documentation-site/components/yard/config/datepicker.ts +++ b/documentation-site/components/yard/config/datepicker.ts @@ -16,8 +16,6 @@ import formControlConfig from './form-control'; import timepickerConfig from './timepicker'; import selectConfig from './select'; -const datepickerProps = require('!!extract-react-types-loader!../../../../src/datepicker/datepicker'); - const DatepickerConfig: TConfig = { componentName: 'DatePicker', imports: { @@ -400,9 +398,6 @@ const DatepickerConfig: TConfig = { }, }, }, - mapTokensToProps: { - Datepicker: datepickerProps, - }, }; export default DatepickerConfig; diff --git a/documentation-site/components/yard/config/dnd-list.ts b/documentation-site/components/yard/config/dnd-list.ts index fd2facf6a3..c41289644b 100644 --- a/documentation-site/components/yard/config/dnd-list.ts +++ b/documentation-site/components/yard/config/dnd-list.ts @@ -2,8 +2,6 @@ import { List, arrayMove, arrayRemove } from 'baseui/dnd-list'; import { PropTypes } from 'react-view'; import { TConfig } from '../types'; -const listProps = require('!!extract-react-types-loader!../../../../src/dnd-list/list'); - const dndListConfig: TConfig = { componentName: 'List', imports: { @@ -79,9 +77,6 @@ const dndListConfig: TConfig = { }, }, }, - mapTokensToProps: { - List: listProps, - }, }; export default dndListConfig; diff --git a/documentation-site/components/yard/config/drawer.ts b/documentation-site/components/yard/config/drawer.ts index bf5ac2a09a..072daa0c8d 100644 --- a/documentation-site/components/yard/config/drawer.ts +++ b/documentation-site/components/yard/config/drawer.ts @@ -2,8 +2,6 @@ import { Drawer, ANCHOR, SIZE } from 'baseui/drawer'; import { PropTypes } from 'react-view'; import { TConfig } from '../types'; -const drawerProps = require('!!extract-react-types-loader!../../../../src/drawer/drawer'); - const DrawerConfig: TConfig = { componentName: 'Drawer', imports: { @@ -130,9 +128,6 @@ const DrawerConfig: TConfig = { }, }, }, - mapTokensToProps: { - Drawer: drawerProps, - }, }; export default DrawerConfig; diff --git a/documentation-site/components/yard/config/file-uploader.ts b/documentation-site/components/yard/config/file-uploader.ts index 190807e105..9c52246ff8 100644 --- a/documentation-site/components/yard/config/file-uploader.ts +++ b/documentation-site/components/yard/config/file-uploader.ts @@ -3,8 +3,6 @@ import { PropTypes } from 'react-view'; import { TConfig } from '../types'; import buttonConfig from './button'; -const fileUploaderProps = require('!!extract-react-types-loader!../../../../src/file-uploader/file-uploader'); - const changeHandlers = [ 'onClick', 'onFocus', @@ -111,9 +109,6 @@ const FileUploaderConfig: TConfig = { }, }, }, - mapTokensToProps: { - FileUploader: fileUploaderProps, - }, }; export default FileUploaderConfig; diff --git a/documentation-site/components/yard/config/fixed-marker.ts b/documentation-site/components/yard/config/fixed-marker.ts index 0f360f074a..270f800b74 100644 --- a/documentation-site/components/yard/config/fixed-marker.ts +++ b/documentation-site/components/yard/config/fixed-marker.ts @@ -10,8 +10,6 @@ import { PropTypes } from 'react-view'; import { TConfig } from '../types'; import { Check, Upload, Search } from 'baseui/icon'; -const fixedMarkerPropsType = require('!!extract-react-types-loader!../../../../src/map-marker/fixed-marker'); - export const theme = []; export const fixedMarkerProps = { @@ -177,9 +175,6 @@ const FixedMarkerConfig: TConfig = { }, }, }, - mapTokensToProps: { - FixedMarker: fixedMarkerPropsType, - }, }; export default FixedMarkerConfig; diff --git a/documentation-site/components/yard/config/floating-marker.ts b/documentation-site/components/yard/config/floating-marker.ts index 5a8e68b4ef..8ab24f4779 100644 --- a/documentation-site/components/yard/config/floating-marker.ts +++ b/documentation-site/components/yard/config/floating-marker.ts @@ -7,8 +7,6 @@ import { import { PropTypes } from 'react-view'; import { TConfig } from '../types'; -const floatingMarkerPropsType = require('!!extract-react-types-loader!../../../../src/map-marker/floating-marker'); - export const theme = []; export const floatingMarkerProps = { @@ -104,9 +102,6 @@ const FloatingMarkerConfig: TConfig = { }, }, }, - mapTokensToProps: { - FloatingMarker: floatingMarkerPropsType, - }, }; export default FloatingMarkerConfig; diff --git a/documentation-site/components/yard/config/form-control.ts b/documentation-site/components/yard/config/form-control.ts index e552f7a92e..258f974e5e 100644 --- a/documentation-site/components/yard/config/form-control.ts +++ b/documentation-site/components/yard/config/form-control.ts @@ -9,9 +9,6 @@ import { Input } from 'baseui/input'; import { PropTypes } from 'react-view'; import { TConfig } from '../types'; -const formControlProps = require('!!extract-react-types-loader!../../../../src/form-control/form-control'); -const inputProps = require('!!extract-react-types-loader!../../../../src/input/input'); - const TextareaConfig: TConfig = { componentName: 'FormControl', imports: { @@ -82,10 +79,6 @@ const TextareaConfig: TConfig = { }, }, }, - mapTokensToProps: { - FormControl: formControlProps, - Input: inputProps, - }, }; export default TextareaConfig; diff --git a/documentation-site/components/yard/config/header-navigation.ts b/documentation-site/components/yard/config/header-navigation.ts index 67a86268b1..5eceab6730 100644 --- a/documentation-site/components/yard/config/header-navigation.ts +++ b/documentation-site/components/yard/config/header-navigation.ts @@ -9,9 +9,6 @@ import { Button } from 'baseui/button'; import { PropTypes } from 'react-view'; import { TConfig } from '../types'; -const headerNavigationProps = require('!!extract-react-types-loader!../../../../src/header-navigation/header-navigation'); -const buttonProps = require('!!extract-react-types-loader!../../../../src/button/button'); - const HeaderNavigationConfig: TConfig = { componentName: 'HeaderNavigation', imports: { @@ -67,10 +64,6 @@ const HeaderNavigationConfig: TConfig = { }, }, }, - mapTokensToProps: { - HeaderNavigation: headerNavigationProps, - Button: buttonProps, - }, }; export default HeaderNavigationConfig; diff --git a/documentation-site/components/yard/config/hint-dot.ts b/documentation-site/components/yard/config/hint-dot.ts index fec788944a..14ca2ce9a5 100644 --- a/documentation-site/components/yard/config/hint-dot.ts +++ b/documentation-site/components/yard/config/hint-dot.ts @@ -8,8 +8,6 @@ import { HintDot, COLOR } from 'baseui/badge'; import { PropTypes } from 'react-view'; import { TConfig } from '../types'; -const hintDotProps = require('!!extract-react-types-loader!../../../../src/badge/badge'); - const HintDotConfig: TConfig = { componentName: 'HintDot', imports: { @@ -73,9 +71,6 @@ const HintDotConfig: TConfig = { }, }, }, - mapTokensToProps: { - Badge: hintDotProps, - }, }; export default HintDotConfig; diff --git a/documentation-site/components/yard/config/icon.ts b/documentation-site/components/yard/config/icon.ts index cd025aaac5..ef8e8fb774 100644 --- a/documentation-site/components/yard/config/icon.ts +++ b/documentation-site/components/yard/config/icon.ts @@ -2,8 +2,6 @@ import { ArrowUp } from 'baseui/icon'; import { PropTypes } from 'react-view'; import { TConfig } from '../types'; -const iconProps = require('!!extract-react-types-loader!../../../../src/icon/icon'); - const IconConfig: TConfig = { componentName: 'ArrowUp', imports: { @@ -43,9 +41,6 @@ const IconConfig: TConfig = { }, }, }, - mapTokensToProps: { - ArrowUp: iconProps, - }, }; export default IconConfig; diff --git a/documentation-site/components/yard/config/input.ts b/documentation-site/components/yard/config/input.ts index 0e48caad12..bec2aabfa3 100644 --- a/documentation-site/components/yard/config/input.ts +++ b/documentation-site/components/yard/config/input.ts @@ -6,8 +6,6 @@ import { TConfig } from '../types'; import { changeHandlers } from './common/common'; -const inputPropsType = require('!!extract-react-types-loader!../../../../src/input/input'); - export const theme = [ 'inputBorder', 'inputFill', @@ -269,9 +267,6 @@ const InputConfig: TConfig = { }, }, }, - mapTokensToProps: { - Input: inputPropsType, - }, }; export default InputConfig; diff --git a/documentation-site/components/yard/config/list-heading.ts b/documentation-site/components/yard/config/list-heading.ts index 029bcda13a..3c2b1611b9 100644 --- a/documentation-site/components/yard/config/list-heading.ts +++ b/documentation-site/components/yard/config/list-heading.ts @@ -3,8 +3,6 @@ import { Button, SIZE, SHAPE } from 'baseui/button'; import { PropTypes } from 'react-view'; import { TConfig } from '../types'; -const listHeadingProps = require('!!extract-react-types-loader!../../../../src/list/list-heading'); - const ListHeadingConfig: TConfig = { componentName: 'ListHeading', imports: { @@ -73,9 +71,6 @@ const ListHeadingConfig: TConfig = { }, }, }, - mapTokensToProps: { - ListHeading: listHeadingProps, - }, }; export default ListHeadingConfig; diff --git a/documentation-site/components/yard/config/list-item-label.ts b/documentation-site/components/yard/config/list-item-label.ts index 308a3295c6..3fddf79870 100644 --- a/documentation-site/components/yard/config/list-item-label.ts +++ b/documentation-site/components/yard/config/list-item-label.ts @@ -2,8 +2,6 @@ import { ListItemLabel } from 'baseui/list'; import { PropTypes } from 'react-view'; import { TConfig } from '../types'; -const listItemLabelProps = require('!!extract-react-types-loader!../../../../src/list/list-item-label'); - const ListItemLabelConfig: TConfig = { componentName: 'ListItemLabel', imports: { @@ -45,9 +43,6 @@ const ListItemLabelConfig: TConfig = { }, }, }, - mapTokensToProps: { - ListItemLabel: listItemLabelProps, - }, }; export default ListItemLabelConfig; diff --git a/documentation-site/components/yard/config/list-item.ts b/documentation-site/components/yard/config/list-item.ts index 72642e7738..b6c5462614 100644 --- a/documentation-site/components/yard/config/list-item.ts +++ b/documentation-site/components/yard/config/list-item.ts @@ -3,9 +3,6 @@ import { Check } from 'baseui/icon'; import { PropTypes } from 'react-view'; import { TConfig } from '../types'; -const listItemProps = require('!!extract-react-types-loader!../../../../src/list/list-item'); -const listItemLabelProps = require('!!extract-react-types-loader!../../../../src/list/list-item-label'); - const ListItemConfig: TConfig = { componentName: 'ListItem', imports: { @@ -88,10 +85,6 @@ const ListItemConfig: TConfig = { }, }, }, - mapTokensToProps: { - ListItem: listItemProps, - ListItemLabel: listItemLabelProps, - }, }; export default ListItemConfig; diff --git a/documentation-site/components/yard/config/menu.ts b/documentation-site/components/yard/config/menu.ts index 3b0b77eb53..ad7e70b70d 100644 --- a/documentation-site/components/yard/config/menu.ts +++ b/documentation-site/components/yard/config/menu.ts @@ -2,8 +2,6 @@ import { StatefulMenu } from 'baseui/menu'; import { PropTypes } from 'react-view'; import { TConfig } from '../types'; -const menuProps = require('!!extract-react-types-loader!../../../../src/menu/stateful-menu'); - const items = `[ {label: 'Item One'}, {label: 'Item Two'}, @@ -87,9 +85,6 @@ const MenuConfig: TConfig = { }, }, }, - mapTokensToProps: { - StatefulMenu: menuProps, - }, }; export default MenuConfig; diff --git a/documentation-site/components/yard/config/modal.ts b/documentation-site/components/yard/config/modal.ts index fc3acd3fbe..83f61a2e2d 100644 --- a/documentation-site/components/yard/config/modal.ts +++ b/documentation-site/components/yard/config/modal.ts @@ -3,8 +3,6 @@ import { KIND as ButtonKind } from 'baseui/button'; import { PropTypes } from 'react-view'; import { TConfig } from '../types'; -const modalProps = require('!!extract-react-types-loader!../../../../src/modal/modal'); - const ModalConfig: TConfig = { componentName: 'Modal', imports: { @@ -134,9 +132,6 @@ const ModalConfig: TConfig = { }, }, }, - mapTokensToProps: { - Modal: modalProps, - }, }; export default ModalConfig; diff --git a/documentation-site/components/yard/config/notification-circle.ts b/documentation-site/components/yard/config/notification-circle.ts index 400f5ec565..5f8b698a21 100644 --- a/documentation-site/components/yard/config/notification-circle.ts +++ b/documentation-site/components/yard/config/notification-circle.ts @@ -10,8 +10,6 @@ import { Check } from 'baseui/icon'; import { PropTypes } from 'react-view'; import { TConfig } from '../types'; -const notificationCircleProps = require('!!extract-react-types-loader!../../../../src/badge/badge'); - const NotificationCircleConfig: TConfig = { componentName: 'NotificationCircle', imports: { @@ -98,9 +96,6 @@ const NotificationCircleConfig: TConfig = { }, }, }, - mapTokensToProps: { - Badge: notificationCircleProps, - }, }; export default NotificationCircleConfig; diff --git a/documentation-site/components/yard/config/notification.ts b/documentation-site/components/yard/config/notification.ts index 6ca8d98a11..c294c55c1e 100644 --- a/documentation-site/components/yard/config/notification.ts +++ b/documentation-site/components/yard/config/notification.ts @@ -4,8 +4,6 @@ import { PropTypes } from 'react-view'; import { TConfig } from '../types'; import { changeHandlers } from './common/common'; -const notificationProps = require('!!extract-react-types-loader!../../../../src/notification/notification'); - const NotificationConfig: TConfig = { componentName: 'Notification', imports: { @@ -84,9 +82,6 @@ const NotificationConfig: TConfig = { }, }, }, - mapTokensToProps: { - Notification: notificationProps, - }, }; export default NotificationConfig; diff --git a/documentation-site/components/yard/config/pagination.ts b/documentation-site/components/yard/config/pagination.ts index 850850f826..26c715a194 100644 --- a/documentation-site/components/yard/config/pagination.ts +++ b/documentation-site/components/yard/config/pagination.ts @@ -3,8 +3,6 @@ import { PropTypes } from 'react-view'; import { TConfig } from '../types'; import selectConfig from './select'; -const paginationProps = require('!!extract-react-types-loader!../../../../src/pagination/pagination'); - const PaginationConfig: TConfig = { componentName: 'Pagination', imports: { @@ -64,9 +62,6 @@ const PaginationConfig: TConfig = { }, }, }, - mapTokensToProps: { - Pagination: paginationProps, - }, }; export default PaginationConfig; diff --git a/documentation-site/components/yard/config/payment-card.ts b/documentation-site/components/yard/config/payment-card.ts index ea1f17c26a..359810ec97 100644 --- a/documentation-site/components/yard/config/payment-card.ts +++ b/documentation-site/components/yard/config/payment-card.ts @@ -5,8 +5,6 @@ import { PropTypes } from 'react-view'; import { TConfig } from '../types'; import { theme, inputProps } from './input'; -const paymentCardProps = require('!!extract-react-types-loader!../../../../src/payment-card/payment-card'); - const PaymentCardConfig: TConfig = { componentName: 'PaymentCard', imports: { @@ -49,9 +47,6 @@ const PaymentCardConfig: TConfig = { }, }, }, - mapTokensToProps: { - PaymentCard: paymentCardProps, - }, }; export default PaymentCardConfig; diff --git a/documentation-site/components/yard/config/phone-input.ts b/documentation-site/components/yard/config/phone-input.ts index cd2f48273f..af61d554e4 100644 --- a/documentation-site/components/yard/config/phone-input.ts +++ b/documentation-site/components/yard/config/phone-input.ts @@ -4,8 +4,6 @@ import { TConfig } from '../types'; import selectConfig from './select'; import inputConfig, { theme } from './input'; -const phoneInputProps = require('!!extract-react-types-loader!../../../../src/phone-input/phone-input'); - const countriesEnum: { [key: string]: string } = {}; Object.values(COUNTRIES).forEach((country) => { countriesEnum[country.id] = country.label; @@ -145,9 +143,6 @@ const PhoneInputConfig: TConfig = { }, }, }, - mapTokensToProps: { - PhoneInput: phoneInputProps, - }, }; export default PhoneInputConfig; diff --git a/documentation-site/components/yard/config/pin-code.ts b/documentation-site/components/yard/config/pin-code.ts index 8199fca022..a064024994 100644 --- a/documentation-site/components/yard/config/pin-code.ts +++ b/documentation-site/components/yard/config/pin-code.ts @@ -4,8 +4,6 @@ import { PropTypes } from 'react-view'; import { TConfig } from '../types'; import inputConfig, { theme, inputProps } from './input'; -const pinCodeProps = require('!!extract-react-types-loader!../../../../src/pin-code/pin-code'); - const PincodeConfig: TConfig = { componentName: 'PinCode', imports: { @@ -68,9 +66,6 @@ const PincodeConfig: TConfig = { }, }, }, - mapTokensToProps: { - PinCode: pinCodeProps, - }, }; export default PincodeConfig; diff --git a/documentation-site/components/yard/config/popover.ts b/documentation-site/components/yard/config/popover.ts index 80ef024017..1dab72ef29 100644 --- a/documentation-site/components/yard/config/popover.ts +++ b/documentation-site/components/yard/config/popover.ts @@ -8,8 +8,6 @@ import { TConfig } from '../types'; import { changeHandlers } from './common/common'; -const popoverProps = require('!!extract-react-types-loader!../../../../src/popover/stateful-popover'); - const PopoverConfig: TConfig = { componentName: 'StatefulPopover', imports: { @@ -198,9 +196,6 @@ const PopoverConfig: TConfig = { }, }, }, - mapTokensToProps: { - StatefulPopover: popoverProps, - }, }; export default PopoverConfig; diff --git a/documentation-site/components/yard/config/progress-bar.ts b/documentation-site/components/yard/config/progress-bar.ts index 8f9fcb7ff5..4716c12285 100644 --- a/documentation-site/components/yard/config/progress-bar.ts +++ b/documentation-site/components/yard/config/progress-bar.ts @@ -8,8 +8,6 @@ import { ProgressBar, SIZE } from 'baseui/progress-bar'; import { PropTypes } from 'react-view'; import { TConfig } from '../types'; -const progressBarProps = require('!!extract-react-types-loader!../../../../src/progress-bar/progressbar'); - const ProgressBarConfig: TConfig = { componentName: 'ProgressBar', imports: { @@ -98,9 +96,6 @@ const ProgressBarConfig: TConfig = { }, }, }, - mapTokensToProps: { - ProgressBar: progressBarProps, - }, }; export default ProgressBarConfig; diff --git a/documentation-site/components/yard/config/progress-steps-numbered.ts b/documentation-site/components/yard/config/progress-steps-numbered.ts index 2a4c27cc64..df7cb921aa 100644 --- a/documentation-site/components/yard/config/progress-steps-numbered.ts +++ b/documentation-site/components/yard/config/progress-steps-numbered.ts @@ -5,10 +5,6 @@ import { TConfig } from '../types'; import ProgressStepsConfig from './progress-steps'; -const progressStepsProps = require('!!extract-react-types-loader!../../../../src/progress-steps/progress-steps'); -const numberedStepProps = require('!!extract-react-types-loader!../../../../src/progress-steps/numbered-step'); -const buttonProps = require('!!extract-react-types-loader!../../../../src/button/button'); - const ProgressStepsNumberedConfig: TConfig = { ...ProgressStepsConfig, scope: { @@ -37,11 +33,6 @@ const ProgressStepsNumberedConfig: TConfig = { propHook: ProgressStepsConfig.props.children.propHook, }, }, - mapTokensToProps: { - ProgressSteps: progressStepsProps, - NumberedStep: numberedStepProps, - Button: buttonProps, - }, }; export default ProgressStepsNumberedConfig; diff --git a/documentation-site/components/yard/config/progress-steps.ts b/documentation-site/components/yard/config/progress-steps.ts index 5ce272cfb7..d9a848462d 100644 --- a/documentation-site/components/yard/config/progress-steps.ts +++ b/documentation-site/components/yard/config/progress-steps.ts @@ -3,10 +3,6 @@ import { Button } from 'baseui/button'; import { PropTypes } from 'react-view'; import { TConfig } from '../types'; -const progressStepsProps = require('!!extract-react-types-loader!../../../../src/progress-steps/progress-steps'); -const stepProps = require('!!extract-react-types-loader!../../../../src/progress-steps/step'); -const buttonProps = require('!!extract-react-types-loader!../../../../src/button/button'); - const ProgressStepsConfig: TConfig = { componentName: 'ProgressSteps', imports: { @@ -82,11 +78,6 @@ const ProgressStepsConfig: TConfig = { }, }, }, - mapTokensToProps: { - ProgressSteps: progressStepsProps, - Step: stepProps, - Button: buttonProps, - }, }; export default ProgressStepsConfig; diff --git a/documentation-site/components/yard/config/radio.ts b/documentation-site/components/yard/config/radio.ts index a07bce186c..af9096cd3f 100644 --- a/documentation-site/components/yard/config/radio.ts +++ b/documentation-site/components/yard/config/radio.ts @@ -12,9 +12,6 @@ import { TConfig } from '../types'; import { changeHandlers } from './common/common'; -const radioProps = require('!!extract-react-types-loader!../../../../src/radio/radio'); -const radioGroupProps = require('!!extract-react-types-loader!../../../../src/radio/radiogroup'); - const RadioGroupConfig: TConfig = { componentName: 'RadioGroup', imports: { @@ -169,10 +166,6 @@ const RadioGroupConfig: TConfig = { }, }, }, - mapTokensToProps: { - Radio: radioProps, - RadioGroup: radioGroupProps, - }, }; export default RadioGroupConfig; diff --git a/documentation-site/components/yard/config/rating.ts b/documentation-site/components/yard/config/rating.ts index bbe16253d3..51831e9459 100644 --- a/documentation-site/components/yard/config/rating.ts +++ b/documentation-site/components/yard/config/rating.ts @@ -8,8 +8,6 @@ import { StarRating } from 'baseui/rating'; import { PropTypes } from 'react-view'; import { TConfig } from '../types'; -const starRatingProps = require('!!extract-react-types-loader!../../../../src/rating/star-rating'); - const ratingConfig: TConfig = { componentName: 'StarRating', imports: { @@ -73,9 +71,6 @@ const ratingConfig: TConfig = { }, }, }, - mapTokensToProps: { - StarRating: starRatingProps, - }, }; export default ratingConfig; diff --git a/documentation-site/components/yard/config/select.ts b/documentation-site/components/yard/config/select.ts index 73059b7f69..f07e0e63e6 100644 --- a/documentation-site/components/yard/config/select.ts +++ b/documentation-site/components/yard/config/select.ts @@ -8,8 +8,6 @@ import popoverConfig from './popover'; import spinnerConfig from './spinner'; import iconConfig from './icon'; -const selectProps = require('!!extract-react-types-loader!../../../../src/select/select'); - const SelectConfig: TConfig = { componentName: 'Select', imports: { @@ -413,9 +411,6 @@ const SelectConfig: TConfig = { }, }, }, - mapTokensToProps: { - Select: selectProps, - }, }; export default SelectConfig; diff --git a/documentation-site/components/yard/config/side-nav.ts b/documentation-site/components/yard/config/side-nav.ts index d8227db1de..3a8596cd19 100644 --- a/documentation-site/components/yard/config/side-nav.ts +++ b/documentation-site/components/yard/config/side-nav.ts @@ -2,8 +2,6 @@ import { Navigation } from 'baseui/side-navigation'; import { PropTypes } from 'react-view'; import { TConfig } from '../types'; -const sideNavProps = require('!!extract-react-types-loader!../../../../src/side-navigation/nav'); - const items = `[ { title: 'Colors', @@ -96,9 +94,6 @@ const SideNavigationConfig: TConfig = { }, }, }, - mapTokensToProps: { - Navigation: sideNavProps, - }, }; export default SideNavigationConfig; diff --git a/documentation-site/components/yard/config/skeleton.ts b/documentation-site/components/yard/config/skeleton.ts index e2f25182be..0aca0ef10a 100644 --- a/documentation-site/components/yard/config/skeleton.ts +++ b/documentation-site/components/yard/config/skeleton.ts @@ -2,8 +2,6 @@ import { Skeleton } from 'baseui/skeleton'; import { PropTypes } from 'react-view'; import { TConfig } from '../types'; -const skeletonProps = require('!!extract-react-types-loader!../../../../src/pin-code/pin-code'); - const SkeletonConfig: TConfig = { componentName: 'Skeleton', imports: { @@ -48,9 +46,6 @@ const SkeletonConfig: TConfig = { }, }, }, - mapTokensToProps: { - Skeleton: skeletonProps, - }, }; export default SkeletonConfig; diff --git a/documentation-site/components/yard/config/slider.ts b/documentation-site/components/yard/config/slider.ts index f4b57ebdfb..49b48a99b8 100644 --- a/documentation-site/components/yard/config/slider.ts +++ b/documentation-site/components/yard/config/slider.ts @@ -8,8 +8,6 @@ import { Slider } from 'baseui/slider'; import { PropTypes } from 'react-view'; import { TConfig } from '../types'; -const sliderProps = require('!!extract-react-types-loader!../../../../src/slider/slider'); - const SliderConfig: TConfig = { componentName: 'Slider', imports: { @@ -117,9 +115,6 @@ const SliderConfig: TConfig = { }, }, }, - mapTokensToProps: { - Slider: sliderProps, - }, }; export default SliderConfig; diff --git a/documentation-site/components/yard/config/tab-motion.ts b/documentation-site/components/yard/config/tab-motion.ts index b8d9cc3e6a..3f8cc47a4d 100644 --- a/documentation-site/components/yard/config/tab-motion.ts +++ b/documentation-site/components/yard/config/tab-motion.ts @@ -2,10 +2,6 @@ import { Tabs, Tab, ORIENTATION, FILL } from 'baseui/tabs-motion'; import { PropTypes } from 'react-view'; import { TConfig } from '../types'; -// This is only used for the props table atm. - -const tabProps = require('!!extract-react-types-loader!../../../../src/tabs-motion/tab'); - const TabConfig: TConfig = { componentName: 'Tab', imports: { @@ -59,9 +55,6 @@ const TabConfig: TConfig = { description: `The content of the TabPanel.`, }, }, - mapTokensToProps: { - Tab: tabProps, - }, }; export default TabConfig; diff --git a/documentation-site/components/yard/config/table.ts b/documentation-site/components/yard/config/table.ts index 19496773ae..a6a13ad362 100644 --- a/documentation-site/components/yard/config/table.ts +++ b/documentation-site/components/yard/config/table.ts @@ -2,8 +2,6 @@ import { Table } from 'baseui/table'; import { PropTypes } from 'react-view'; import { TConfig } from '../types'; -const tableProps = require('!!extract-react-types-loader!../../../../src/table/table'); - const TableConfig: TConfig = { componentName: 'Table', imports: { @@ -61,9 +59,6 @@ const TableConfig: TConfig = { }, }, }, - mapTokensToProps: { - Table: tableProps, - }, }; export default TableConfig; diff --git a/documentation-site/components/yard/config/tabs-motion.ts b/documentation-site/components/yard/config/tabs-motion.ts index 47cf68fae4..173f4a8081 100644 --- a/documentation-site/components/yard/config/tabs-motion.ts +++ b/documentation-site/components/yard/config/tabs-motion.ts @@ -8,9 +8,6 @@ import { Tabs, Tab, ORIENTATION, FILL } from 'baseui/tabs-motion'; import { PropTypes } from 'react-view'; import { TConfig } from '../types'; -const tabsProps = require('!!extract-react-types-loader!../../../../src/tabs-motion/tabs'); -const tabProps = require('!!extract-react-types-loader!../../../../src/tabs-motion/tab'); - const TabsConfig: TConfig = { componentName: 'Tabs', imports: { @@ -117,10 +114,6 @@ const TabsConfig: TConfig = { 'Unique id supplied to the Tabs component, and a prefix for the individual Tab components, to ensure both accessibility and SSR safety.', }, }, - mapTokensToProps: { - Tabs: tabsProps, - Tab: tabProps, - }, }; export default TabsConfig; diff --git a/documentation-site/components/yard/config/tabs.ts b/documentation-site/components/yard/config/tabs.ts index 9dc5885464..060b8067a7 100644 --- a/documentation-site/components/yard/config/tabs.ts +++ b/documentation-site/components/yard/config/tabs.ts @@ -2,9 +2,6 @@ import { Tabs, Tab, ORIENTATION } from 'baseui/tabs'; import { PropTypes } from 'react-view'; import { TConfig } from '../types'; -const tabsProps = require('!!extract-react-types-loader!../../../../src/tabs/tabs'); -const tabProps = require('!!extract-react-types-loader!../../../../src/tabs/tab'); - const TabsConfig: TConfig = { componentName: 'Tabs', imports: { @@ -85,10 +82,6 @@ const TabsConfig: TConfig = { }, }, }, - mapTokensToProps: { - Tabs: tabsProps, - Tab: tabProps, - }, }; export default TabsConfig; diff --git a/documentation-site/components/yard/config/tag.ts b/documentation-site/components/yard/config/tag.ts index a03b2d3778..b04c8fb405 100644 --- a/documentation-site/components/yard/config/tag.ts +++ b/documentation-site/components/yard/config/tag.ts @@ -8,8 +8,6 @@ import { Tag, KIND, VARIANT, SIZE } from 'baseui/tag'; import { PropTypes } from 'react-view'; import { TConfig } from '../types'; -const tagProps = require('!!extract-react-types-loader!../../../../src/tag/tag'); - const TagConfig: TConfig = { componentName: 'Tag', imports: { @@ -198,9 +196,6 @@ const TagConfig: TConfig = { }, }, }, - mapTokensToProps: { - Tag: tagProps, - }, }; export default TagConfig; diff --git a/documentation-site/components/yard/config/textarea.ts b/documentation-site/components/yard/config/textarea.ts index d0a262427c..18421fe6ac 100644 --- a/documentation-site/components/yard/config/textarea.ts +++ b/documentation-site/components/yard/config/textarea.ts @@ -4,8 +4,6 @@ import { PropTypes } from 'react-view'; import { TConfig } from '../types'; import { theme, inputProps } from './input'; -const textareaProps = require('!!extract-react-types-loader!../../../../src/textarea/textarea'); - const TextareaConfig: TConfig = { componentName: 'Textarea', imports: { @@ -49,9 +47,6 @@ const TextareaConfig: TConfig = { }, }, }, - mapTokensToProps: { - Textarea: textareaProps, - }, }; export default TextareaConfig; diff --git a/documentation-site/components/yard/config/timepicker.ts b/documentation-site/components/yard/config/timepicker.ts index c05d416ba3..5744d484c0 100644 --- a/documentation-site/components/yard/config/timepicker.ts +++ b/documentation-site/components/yard/config/timepicker.ts @@ -12,8 +12,6 @@ import inputConfig from './input'; import selectConfig from './select'; import { startOfDay } from 'date-fns'; -const timepickerProps = require('!!extract-react-types-loader!../../../../src/timepicker/timepicker'); - const TimepickerConfig: TConfig = { componentName: 'TimePicker', imports: { @@ -103,9 +101,6 @@ options will clamp to the date start and date end. }, }, }, - mapTokensToProps: { - TimePicker: timepickerProps, - }, }; export default TimepickerConfig; diff --git a/documentation-site/components/yard/config/timezonepicker.ts b/documentation-site/components/yard/config/timezonepicker.ts index aff88a1163..7a2daccd30 100644 --- a/documentation-site/components/yard/config/timezonepicker.ts +++ b/documentation-site/components/yard/config/timezonepicker.ts @@ -5,8 +5,6 @@ import { TConfig } from '../types'; import inputConfig from './input'; import selectConfig from './select'; -const timezonePickerProps = require('!!extract-react-types-loader!../../../../src/timezonepicker/timezone-picker'); - const TimezonepickerConfig: TConfig = { componentName: 'TimezonePicker', imports: { @@ -60,9 +58,6 @@ const TimezonepickerConfig: TConfig = { }, }, }, - mapTokensToProps: { - TimezonePicker: timezonePickerProps, - }, }; export default TimezonepickerConfig; diff --git a/documentation-site/components/yard/config/toast.ts b/documentation-site/components/yard/config/toast.ts index 86d2248f53..df406417f6 100644 --- a/documentation-site/components/yard/config/toast.ts +++ b/documentation-site/components/yard/config/toast.ts @@ -10,10 +10,6 @@ import { Block } from 'baseui/block'; import { PropTypes } from 'react-view'; import { TConfig } from '../types'; -const toasterContainerProps = require('!!extract-react-types-loader!../../../../src/toast/toaster'); -const buttonProps = require('!!extract-react-types-loader!../../../../src/button/button'); -const blockProps = require('!!extract-react-types-loader!../../../../src/block/block'); - const toastConfig: TConfig = { componentName: 'ToasterContainer', imports: { @@ -124,11 +120,6 @@ const toastConfig: TConfig = { }, }, }, - mapTokensToProps: { - ToasterContainer: toasterContainerProps, - Button: buttonProps, - Block: blockProps, - }, }; export default toastConfig; diff --git a/documentation-site/components/yard/config/tooltip.ts b/documentation-site/components/yard/config/tooltip.ts index 62b09daec5..d0c8c29f38 100644 --- a/documentation-site/components/yard/config/tooltip.ts +++ b/documentation-site/components/yard/config/tooltip.ts @@ -7,8 +7,6 @@ import { Block } from 'baseui/block'; import PopoverConfig from './popover'; -const tooltipProps = require('!!extract-react-types-loader!../../../../src/popover/stateful-popover'); - const TooltipConfig: TConfig = { ...PopoverConfig, componentName: 'StatefulTooltip', @@ -59,9 +57,6 @@ const TooltipConfig: TConfig = { description: `The content that will trigger the popover.`, }, }, - mapTokensToProps: { - StatefulTooltip: tooltipProps, - }, }; export default TooltipConfig; diff --git a/documentation-site/components/yard/config/tree-view.ts b/documentation-site/components/yard/config/tree-view.ts index 6514b30136..6bbc522432 100644 --- a/documentation-site/components/yard/config/tree-view.ts +++ b/documentation-site/components/yard/config/tree-view.ts @@ -2,8 +2,6 @@ import { TreeView, toggleIsExpanded } from 'baseui/tree-view'; import { PropTypes } from 'react-view'; import { TConfig } from '../types'; -const treeViewProps = require('!!extract-react-types-loader!../../../../src/tree-view/tree-view'); - const TreeViewConfig: TConfig = { componentName: 'TreeView', imports: { @@ -137,9 +135,6 @@ const TreeViewConfig: TConfig = { }, }, }, - mapTokensToProps: { - TreeView: treeViewProps, - }, }; export default TreeViewConfig; diff --git a/documentation-site/components/yard/index.tsx b/documentation-site/components/yard/index.tsx index 1b7fbaf38d..15fd59ff01 100644 --- a/documentation-site/components/yard/index.tsx +++ b/documentation-site/components/yard/index.tsx @@ -31,7 +31,6 @@ import ActionButtons from './action-buttons'; import Knobs from './knobs'; import { YardTabs, YardTab } from './styled-components'; import { countProps, countOverrides, countThemeValues } from './utils'; -import PropsTooltip from './props-tooltip'; import { TYardProps } from './types'; const Yard: React.FC = ({ @@ -42,7 +41,6 @@ const Yard: React.FC = ({ props, theme, imports, - mapTokensToProps, initialTab, }) => { const [css, baseTheme] = useStyletron(); @@ -144,16 +142,7 @@ const Yard: React.FC = ({ ) : ( )} - { - const token = tokenProps.children.trim(); - if (mapTokensToProps && mapTokensToProps[token]) { - return ; - } - return ; - }} - /> + - - - } - > - - - ); -} - -export default PropsTooltip; diff --git a/documentation-site/components/yard/type-definition.js b/documentation-site/components/yard/type-definition.js deleted file mode 100644 index 4fdeb4037e..0000000000 --- a/documentation-site/components/yard/type-definition.js +++ /dev/null @@ -1,411 +0,0 @@ -/* -Copyright (c) Uber Technologies, Inc. - -This source code is licensed under the MIT license found in the -LICENSE file in the root directory of this source tree. -*/ -/* eslint-disable flowtype/require-valid-file-annotation */ - -import * as React from 'react'; -import { useStyletron } from 'baseui'; - -export function resolveToLast(type) { - switch (type.kind) { - case 'id': - case 'object': - case 'import': - return type; - case 'memberExpression': - return resolveToLast(type.object); - default: - break; - } -} - -export function resolveFromGeneric(type) { - if (type.kind !== 'generic') return type; - if (type.typeParams) { - // If a generic type is an Array, we don't want to just return the value, - // But also the entire type object, so we can parse the typeParams later on. - return type; - } - if (type.value.kind === 'generic') { - return resolveFromGeneric(type.value); - } - return type.value; -} - -export function reduceToObj(type) { - const reducibleKinds = ['generic', 'object', 'intersection']; - if (type.kind === 'generic') { - // Only attempt to reduce generic if it has a reducible value - // Unreducible generics that have an identifier value, e.g. ElementConfig, are still valid - // so we return early to avoid the console warn below - return reducibleKinds.includes(type.value.kind) ? reduceToObj(type.value) : []; - } else if (type.kind === 'object') { - return type.members; - } else if (type.kind === 'intersection') { - return type.types.reduce((acc, i) => [...acc, ...reduceToObj(i)], []); - } - /* eslint-disable-next-line no-console */ - console.warn('was expecting to reduce to an object and could not', type); - return []; -} - -const unaryWhiteList = ['-', '+', '!']; - -function mapConvertAndJoin(array, joiner = ', ') { - if (!Array.isArray(array)) return ''; - return array.map((a) => convert(a)).join(joiner); -} - -const converters = { - /* - If the value here is undefined, we can safely assume that we're dealing with - a BooleanTypeAnnotation and not a BooleanLiteralTypeAnnotation. - */ - boolean: (type) => (type.value != null ? type.value.toString() : type.kind), - exists: (type) => '*', - /* - If the value here is undefined, we can safely assume that we're dealing with - a NumberTypeAnnotation and not a NumberLiteralTypeAnnotation. - */ - number: (type) => (type.value != null ? type.value.toString() : type.kind), - /* - If the value here is undefined, we can safely assume that we're dealing with - a StringTypeAnnotation and not a StringLiteralTypeAnnotation. -*/ - string: (type) => (type.value != null ? `"${type.value.toString()}"` : type.kind), - custom: (type) => type.value.toString(), - any: (type) => type.kind, - void: (type) => 'undefined', - literal: (type) => `${type.kind}`, - mixed: (type) => type.kind, - null: (type) => 'null', - logicalExpression: (type) => { - return `${convert(type.left)} ${type.operator} ${convert(type.right)}`; - }, - unary: (type) => { - let space = unaryWhiteList.includes(type.operator) ? '' : ' '; - return `${type.operator}${space}${convert(type.argument)}`; - }, - - id: (type) => { - return type.name; - }, - // this is not right and needs to be improved - opaqueType: (type) => { - return convert(type.id); - }, - interfaceDeclaration: (type) => { - return convert(type.id); - }, - typeCastExpression: (type) => { - return convert(type.expression); - }, - JSXMemberExpression: (type) => { - return `${convert(type.object)}.${convert(type.property)}`; - }, - JSXExpressionContainer: (type) => { - return `{${convert(type.expression)}}`; - }, - JSXOpeningElement: (type) => { - return `${convert(type.name)} ${mapConvertAndJoin(type.attributes, ' ')}`; - }, - JSXElement: (type) => { - return `<${convert(type.value)} />`; - }, - - JSXIdentifier: (type) => { - return `${type.value}`; - }, - - JSXAttribute: (type) => { - return `${convert(type.name)}=${convert(type.value)}`; - }, - - binary: (type) => { - const left = convert(type.left); - const right = convert(type.right); - return `${left} ${type.operator} ${right}`; - }, - - function: (type) => { - return `(${mapConvertAndJoin(type.parameters)}) => ${ - type.returnType === null ? 'undefined' : convert(type.returnType) - }`; - }, - /* - Make this resolve members in a unique way that will allow us to - handle property keys with no assigned value - */ - objectPattern: (type) => { - // ({ a, b }) => undefined ({a: a, b: b}) => undefined - // ({ a = 2, b }) => undefined ({a: a = 2, b: b })=> undefined - return `{ ${mapConvertAndJoin(type.members)} }`; - }, - - rest: (type) => { - return `...${convert(type.argument)}`; - }, - - assignmentPattern: (type) => { - return `${convert(type.left)} = ${convert(type.right)}`; - }, - - param: (type) => { - // this will not hold once we have types - return convert(type.value); - }, - - array: (type) => { - return `[${mapConvertAndJoin(type.elements)}]`; - }, - - arrayType: (type) => { - // return `Array of ${convert(type.type)}`; - return `Array<${convert(type.type)}>`; - }, - - spread: (type) => { - return `...${convert(type.value)}`; - }, - - property: (type) => { - // const sameId = - // type.key.kind === 'id' && - // type.value.kind === 'id' && - // type.key.name === type.value.name; - - // const assignmentSameId = - // type.value.kind === 'assignmentPattern' && - // type.key.kind === 'id' && - // type.value.left.kind === 'id' && - // type.key.name === type.value.left.name; - - // if (sameId) { - // // If both keys are IDs we're applying syntactic sugar - // return `${convert(type.key)}`; - // } else if (assignmentSameId) { - // // If the value is an assignment pattern with a left hand ID that is the same as our type.key, just return the resolved value. - // return `${convert(type.value)}`; - // } else { - return `${convert(type.key)}${type.optional ? '?' : ''}: ${convert(type.value)}`; - // } - }, - - object: (type) => { - if (type.members.length === 0) return `{}`; - return `{ ${mapConvertAndJoin(type.members)} }`; - }, - - memberExpression: (type) => { - const object = resolveToLast(type.object); - const property = convert(type.property); - - switch (object.kind) { - case 'id': - return `${convert(type.object)}.${property}`; - case 'object': { - const mem = object.members.find((m) => { - if (typeof m.key !== 'string') { - // Issue here is that convert(key) can result in either a String type or an Id type, - // one returns the value wrapped in quotations, the other does not. - // We're stripping the quotations so we can do an accurate match against the property which is always an Id - return convert(m.key).replace(/"/g, '') === property; - } - return m.key === property; - }); - if (mem && mem.value) { - return convert(mem.value); - } else { - console.error(`${property} not found in ${convert(object)}`); - return 'undefined'; - } - } - case 'import': - return `${convert(type.object)}.${property}`; - default: - console.error('failed to resolve member expression'); - return ''; - } - }, - - call: (type) => { - let callSignature = ''; - if (type.callee.referenceIdName) { - callSignature = type.callee.referenceIdName; - } else if (type.callee.id) { - callSignature = convert(type.callee.id); - } else { - callSignature = convert(type.callee); - } - // $FlowFixMe - this is incorrectly reading type.callee.referenceIdName as possibly not a string. - return `${callSignature}(${mapConvertAndJoin(type.args)})`; - }, - - new: (type) => { - const callee = convert(type.callee); - const args = mapConvertAndJoin(type.args); - return `new ${callee}(${args})`; - }, - - variable: (type) => { - const val = type.declarations[type.declarations.length - 1]; - if (val.value) { - return convert(val.value); - } - return convert(val.id); - }, - - templateExpression: (type) => { - return `${convert(type.tag)}`; - }, - - templateLiteral: (type) => { - let str = type.quasis.reduce((newStr, v, i) => { - let quasi = convert(v); - let newStrClone = newStr; - newStrClone = `${newStrClone}${quasi}`; - if (type.expressions[i]) { - let exp = convert(type.expressions[i]); - newStrClone = `${newStrClone}\${${exp}}`; - } - return newStrClone; - }, ''); - return `\`${str}\``; - }, - - templateElement: (type) => { - return type.value.cooked.toString(); - }, - class: (type) => { - return convert(type.name); - }, - // We should write these - generic: (type) => { - const typeParams = type.typeParams ? convert(type.typeParams) : ''; - const value = convert(type.value); - return `${value}${typeParams}`; - }, - intersection: (type) => `${mapConvertAndJoin(type.types, ' & ')}`, - - nullable: (type) => `?${convert(type.arguments)}`, - typeParam: (type) => `${type.name}`, - typeParams: (type) => `<${mapConvertAndJoin(type.params, ', ')}>`, - typeParamsDeclaration: (type) => `<${mapConvertAndJoin(type.params, ', ')}>`, - typeof: (type) => { - return type.name ? `typeof ${type.name}` : `${type.type.kind}`; - }, - union: (type) => `${mapConvertAndJoin(type.types, ' | ')}`, - import: (type) => { - if (type.name === 'default') { - return `${type.moduleSpecifier}`; - } else { - return `${type.moduleSpecifier}.${type.name}`; - } - }, - export: (type) => { - if (type.exports.length === 1) { - return convert(type.exports[0]); - } - return ''; - }, - exportSpecifier: (type, mode) => convert(type.exported), - - // TS - tuple: (type) => `[${mapConvertAndJoin(type.types)}]`, -}; - -export function convert(type, expandType) { - if (!type) { - console.error('No type argument has been passed in'); - return ''; - } - - if (type.referenceIdName && !expandType) { - return type.referenceIdName; - } - - const converter = converters[type.kind]; - if (!converter) { - if (!type.kind) { - console.error('convert was passed an object without a kind', type); - } else { - console.error('could not find converter for', type.kind); - } - } else { - return converter(type); - } - return ''; -} - -const getPropTypes = (propTypesObj) => { - let resolvedTypes = resolveFromGeneric(propTypesObj); - let propTypes; - if (resolvedTypes.kind === 'object') { - propTypes = resolvedTypes.members; - } else if (resolvedTypes.kind === 'intersection') { - propTypes = resolvedTypes.types.reduce((acc, type) => [...acc, ...reduceToObj(type)], []); - } - return propTypes; -}; - -function TypeDefinition(props) { - const [css, theme] = useStyletron(); - - let name = ''; - let value = null; - let definition = ''; - let errored = false; - - try { - if (props.type.component.value.name === '$Shape') { - value = props.type.component.typeParams.params[0]; - name = value.value.referenceIdName; - } else { - value = props.type.component.value; - name = value.referenceIdName; - } - - const proptypes = getPropTypes(value).map((property) => { - return convert(property, true); - }); - - definition = `type ${name} = {\n ` + proptypes.join(',\n ') + '\n}'; - } catch (e) { - errored = true; - } - - if (errored) { - return ( -
-

- extract-react-types is not being run in dev mode for speed reasons. If you need to see - prop types, run: -

-

- FORCE_EXTRACT_REACT_TYPES=true yarn documentation:dev -

-
- ); - } - - return ( -
- {definition} -
- ); -} - -export default TypeDefinition; diff --git a/documentation-site/components/yard/types.ts b/documentation-site/components/yard/types.ts index 4fca3ba904..e4714ad2f7 100644 --- a/documentation-site/components/yard/types.ts +++ b/documentation-site/components/yard/types.ts @@ -6,14 +6,12 @@ export type TConfig = { props: { [key: string]: TProp }; theme: string[]; imports: TImportsConfig; - mapTokensToProps?: { [key: string]: any }; }; export type TYardProps = TConfig & { componentName: string; placeholderHeight: number; queryStringName?: string; - mapTokensToProps?: { [key: string]: any }; compilerStyles: { [key: string]: any }; initialTab?: string; }; diff --git a/documentation-site/pages/components/accordion.mdx b/documentation-site/pages/components/accordion.mdx index 1a0ce7e42d..3e7e6d1ff4 100644 --- a/documentation-site/pages/components/accordion.mdx +++ b/documentation-site/pages/components/accordion.mdx @@ -22,7 +22,6 @@ import { Accordion, Panel } from 'baseui/accordion'; import Yard from '../../components/yard/index'; import accordionYardConfig from '../../components/yard/config/accordion'; -import ApiTable from '../../components/api-table'; - **Note:** the `Panel` has the same overrides as `Accordion`, with the exception of the `Root` subcomponent. diff --git a/documentation-site/pages/components/app-nav-bar.mdx b/documentation-site/pages/components/app-nav-bar.mdx index 079b4a6fb2..28e117b0e9 100644 --- a/documentation-site/pages/components/app-nav-bar.mdx +++ b/documentation-site/pages/components/app-nav-bar.mdx @@ -9,7 +9,6 @@ import Example from '../../components/example'; import Exports from '../../components/exports'; import Layout from '../../components/layout'; import SEO from '../../components/meta-seo'; -import ApiTable from '../../components/api-table'; import Yard from '../../components/yard/index'; import appNavBarYardConfig from '../../components/yard/config/app-nav-bar.ts'; @@ -53,12 +52,4 @@ This utility relies on unique label values to operate but can be customized foll -## API - - - diff --git a/documentation-site/pages/components/aspect-ratio-box.mdx b/documentation-site/pages/components/aspect-ratio-box.mdx index 6dbf14d293..df395a25f3 100644 --- a/documentation-site/pages/components/aspect-ratio-box.mdx +++ b/documentation-site/pages/components/aspect-ratio-box.mdx @@ -6,7 +6,6 @@ LICENSE file in the root directory of this source tree. --> import Example from '../../components/example'; -import API from '../../components/api'; import Layout from '../../components/layout'; import Exports from '../../components/exports'; @@ -42,18 +41,6 @@ You could even build a calendar of square buttons with it, that resizes with the -## API - - - - - -## API - - - diff --git a/documentation-site/pages/components/badge.mdx b/documentation-site/pages/components/badge.mdx index 0519bde13b..8c8a3b8b81 100644 --- a/documentation-site/pages/components/badge.mdx +++ b/documentation-site/pages/components/badge.mdx @@ -14,7 +14,6 @@ import * as BadgeExports from 'baseui/badge'; import Yard from '../../components/yard/index'; import badgeYardConfig from '../../components/yard/config/badge'; -import ApiTable from '../../components/api-table'; import PrimaryInline from 'examples/badge/primary-inline.js'; import SecondaryInline from 'examples/badge/secondary-inline.js'; @@ -61,12 +60,4 @@ There may be situations where it makes sense to deviate from the standard badge - `horizontalOffset` sets the `right` CSS attribute when `placement` is `topRight` or `bottomRight`. Otherwise it sets the `left` attribute. - `verticalOffset` sets the `top` CSS attribute when `placement` is `topLeft`, `top`, or `topRight`. Otherwise it sets the `bottom` attribute. -## API - - - diff --git a/documentation-site/pages/components/banner.mdx b/documentation-site/pages/components/banner.mdx index d7beee55c1..f81cfc0a71 100644 --- a/documentation-site/pages/components/banner.mdx +++ b/documentation-site/pages/components/banner.mdx @@ -8,7 +8,6 @@ LICENSE file in the root directory of this source tree. import Example from '../../components/example'; import Layout from '../../components/layout'; import Exports from '../../components/exports'; -import API from '../../components/api.js'; import Yard from '../../components/yard/index'; import bannerYardConfig from '../../components/yard/config/banner'; @@ -46,11 +45,4 @@ Use lower contrast for messages with lower severity. Use higher contrast for mes -## API - - - diff --git a/documentation-site/pages/components/base-provider.mdx b/documentation-site/pages/components/base-provider.mdx index 0038f6cddb..8112c1e875 100644 --- a/documentation-site/pages/components/base-provider.mdx +++ b/documentation-site/pages/components/base-provider.mdx @@ -6,7 +6,6 @@ LICENSE file in the root directory of this source tree. --> import Example from '../../components/example'; -import API from '../../components/api'; import Layout from '../../components/layout'; import { Notification } from 'baseui/notification'; @@ -45,10 +44,3 @@ export default function App() { instead to support correct layering. Please note that this component adds an additional div{' '} that could impact your layout. - -## API - - diff --git a/documentation-site/pages/components/block.mdx b/documentation-site/pages/components/block.mdx index e0ae906917..feb209ae39 100644 --- a/documentation-site/pages/components/block.mdx +++ b/documentation-site/pages/components/block.mdx @@ -8,7 +8,6 @@ LICENSE file in the root directory of this source tree. import { Notification, KIND } from 'baseui/notification'; import Example from '../../components/example'; -import API from '../../components/api'; import Layout from '../../components/layout'; import Exports from '../../components/exports'; @@ -82,8 +81,4 @@ margin-top: 10px; -## API - - - diff --git a/documentation-site/pages/components/breadcrumbs.mdx b/documentation-site/pages/components/breadcrumbs.mdx index 6982f9a6e7..7338fa2a67 100644 --- a/documentation-site/pages/components/breadcrumbs.mdx +++ b/documentation-site/pages/components/breadcrumbs.mdx @@ -19,7 +19,6 @@ import { StyledLink as Link } from 'baseui/link'; import Yard from '../../components/yard/index'; import breadcrumbsYardConfig from '../../components/yard/config/breadcrumbs'; -import ApiTable from '../../components/api-table'; - diff --git a/documentation-site/pages/components/button-group.mdx b/documentation-site/pages/components/button-group.mdx index 41f66d6543..d2dd72d02b 100644 --- a/documentation-site/pages/components/button-group.mdx +++ b/documentation-site/pages/components/button-group.mdx @@ -28,7 +28,6 @@ import * as ButtonGroupExports from 'baseui/button-group'; import Yard from '../../components/yard/index'; import buttonGroupYardConfig from '../../components/yard/config/button-group'; -import ApiTable from '../../components/api-table'; -## API - - - diff --git a/documentation-site/pages/components/button.mdx b/documentation-site/pages/components/button.mdx index c3b4742a74..0f2127381c 100644 --- a/documentation-site/pages/components/button.mdx +++ b/documentation-site/pages/components/button.mdx @@ -26,7 +26,6 @@ import ArrowRight from 'baseui/icon/arrow-right'; import Yard from '../../components/yard/index'; import buttonYardConfig from '../../components/yard/config/button'; -import ApiTable from '../../components/api-table'; -## API - - - diff --git a/documentation-site/pages/components/card.mdx b/documentation-site/pages/components/card.mdx index faf343b564..1b2911be5e 100644 --- a/documentation-site/pages/components/card.mdx +++ b/documentation-site/pages/components/card.mdx @@ -19,7 +19,6 @@ import * as CardExports from 'baseui/card'; import Yard from '../../components/yard/index'; import cardYardConfig from '../../components/yard/config/card'; -import ApiTable from '../../components/api-table'; export default Layout; @@ -46,12 +45,4 @@ The entire card can become an active click-target. -## API - - - diff --git a/documentation-site/pages/components/checkbox.mdx b/documentation-site/pages/components/checkbox.mdx index e523f47469..badc631000 100644 --- a/documentation-site/pages/components/checkbox.mdx +++ b/documentation-site/pages/components/checkbox.mdx @@ -27,7 +27,6 @@ import * as CheckboxExports from 'baseui/checkbox'; import Yard from '../../components/yard/index'; import checkboxYardConfig from '../../components/yard/config/checkbox'; -import ApiTable from '../../components/api-table'; export default Layout; @@ -95,12 +94,4 @@ options. When engaged (on), Base Web toggles are colored and when disengaged (of As with many of our components, there is also an [uncontrolled](https://reactjs.org/docs/uncontrolled-components.html) version, `StatefulCheckbox`, which manages its own state. -## API - - - diff --git a/documentation-site/pages/components/combobox.mdx b/documentation-site/pages/components/combobox.mdx index 855eb58fd6..e0cf67e3e0 100644 --- a/documentation-site/pages/components/combobox.mdx +++ b/documentation-site/pages/components/combobox.mdx @@ -5,7 +5,6 @@ This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree. --> -import ApiTable from '../../components/api-table'; import Example from '../../components/example'; import Exports from '../../components/exports'; import Layout from '../../components/layout'; @@ -65,12 +64,4 @@ to provide a placeholder, but can be applied to any Input props. -## API - - - diff --git a/documentation-site/pages/components/datepicker.mdx b/documentation-site/pages/components/datepicker.mdx index f634b881bb..250a53208a 100644 --- a/documentation-site/pages/components/datepicker.mdx +++ b/documentation-site/pages/components/datepicker.mdx @@ -32,7 +32,6 @@ import * as DatepickerExports from 'baseui/datepicker'; import Yard from '../../components/yard/index'; import datepickerConfig from '../../components/yard/config/datepicker'; -import ApiTable from '../../components/api-table'; export default Layout; @@ -144,12 +143,4 @@ In this example we use a [nested override](/guides/understanding-overrides/#over Here we use the most flexible and complex [override by component replacement](/guides/understanding-overrides/#override-the-entire-subcomponent) where we wrap a components onChange handler to subscribe to the datepicker event when a quick selection is picked. -## API - - - diff --git a/documentation-site/pages/components/dnd-list.mdx b/documentation-site/pages/components/dnd-list.mdx index 02a41be16c..5d9eddc803 100644 --- a/documentation-site/pages/components/dnd-list.mdx +++ b/documentation-site/pages/components/dnd-list.mdx @@ -20,7 +20,6 @@ import { StatefulList } from 'baseui/dnd-list'; import * as ListExports from 'baseui/dnd-list'; import Yard from '../../components/yard/index'; import dndListYardConfig from '../../components/yard/config/dnd-list'; -import ApiTable from '../../components/api-table'; export default Layout; @@ -70,12 +69,4 @@ This component also supports iOS and Android browsers and screen readers. -## API - - - diff --git a/documentation-site/pages/components/drawer.mdx b/documentation-site/pages/components/drawer.mdx index 8a33a83a34..28b1955520 100644 --- a/documentation-site/pages/components/drawer.mdx +++ b/documentation-site/pages/components/drawer.mdx @@ -16,7 +16,6 @@ import SSRRenderAll from 'examples/drawer/ssr-render-all.js'; import Yard from '../../components/yard/index'; import drawerYardConfig from '../../components/yard/config/drawer'; -import ApiTable from '../../components/api-table'; export default Layout; @@ -47,12 +46,4 @@ We have built in functionality based on the recommendations for dialogs and draw - Background is not be scrollable while drawer is open (position: fixed). - Upon closing, focus should return to element that triggered drawer. -## API - - - diff --git a/documentation-site/pages/components/file-uploader.mdx b/documentation-site/pages/components/file-uploader.mdx index c408676c4e..7866a6e9e1 100644 --- a/documentation-site/pages/components/file-uploader.mdx +++ b/documentation-site/pages/components/file-uploader.mdx @@ -20,7 +20,6 @@ import * as FileUploaderExports from 'baseui/file-uploader'; import Yard from '../../components/yard/index'; import fileUploaderYardConfig from '../../components/yard/config/file-uploader'; -import ApiTable from '../../components/api-table'; export default Layout; @@ -66,14 +65,6 @@ To learn more, read the corresponding [OWASP article on file uploads](https://ww -## API - - - - diff --git a/documentation-site/pages/components/flex-grid.mdx b/documentation-site/pages/components/flex-grid.mdx index 5b0af0f3f8..f35bc9c0a9 100644 --- a/documentation-site/pages/components/flex-grid.mdx +++ b/documentation-site/pages/components/flex-grid.mdx @@ -6,7 +6,6 @@ LICENSE file in the root directory of this source tree. --> import Example from '../../components/example'; -import API from '../../components/api'; import Layout from '../../components/layout'; import Exports from '../../components/exports'; @@ -60,16 +59,4 @@ Also, keep in mind that the margins won’t be set properly unless you have the -## API - - - - - diff --git a/documentation-site/pages/components/floating-marker.mdx b/documentation-site/pages/components/floating-marker.mdx index 352b0e8798..952435c379 100644 --- a/documentation-site/pages/components/floating-marker.mdx +++ b/documentation-site/pages/components/floating-marker.mdx @@ -20,7 +20,6 @@ import { FloatingMarkerSizingTable } from '../../components/map-marker-sizing-ta import Yard from '../../components/yard/index'; import floatingMarkerYardConfig from '../../components/yard/config/floating-marker'; -import ApiTable from '../../components/api-table'; import * as FloatingMarkerExports from 'baseui/map-marker'; @@ -117,14 +116,6 @@ A large floating marker with a square anchor and start enhancer. Because the flo A floating map marker rendered inside of a [react-map-gl](https://visgl.github.io/react-map-gl/) view. In order to use a floating map marker in react-map-gl, wrap the floating marker with a [``](https://visgl.github.io/react-map-gl/docs/api-reference/marker) component. In order to properly center the marker on the intended position, translate the marker using an override on the `Root`. -## API - - - - diff --git a/documentation-site/pages/components/header-navigation.mdx b/documentation-site/pages/components/header-navigation.mdx index 989e32da53..81e86cdb07 100644 --- a/documentation-site/pages/components/header-navigation.mdx +++ b/documentation-site/pages/components/header-navigation.mdx @@ -22,7 +22,6 @@ import * as HeaderNavigationExports from 'baseui/header-navigation'; import Yard from '../../components/yard/index'; import headerNavigationYardConfig from '../../components/yard/config/header-navigation'; -import ApiTable from '../../components/api-table'; export default Layout; @@ -40,14 +39,6 @@ export default Layout; -## API - - - -## API - - - - - diff --git a/documentation-site/pages/components/hint-dot.mdx b/documentation-site/pages/components/hint-dot.mdx index 2ce6cef7d2..59af094d4e 100644 --- a/documentation-site/pages/components/hint-dot.mdx +++ b/documentation-site/pages/components/hint-dot.mdx @@ -14,7 +14,6 @@ import * as HintDotExports from 'baseui/badge'; import Yard from '../../components/yard/index'; import hintDotYardConfig from '../../components/yard/config/hint-dot'; -import ApiTable from '../../components/api-table'; import Offset from 'examples/hint-dot/offset.js'; @@ -34,12 +33,4 @@ HintDot is a subtle nudging badge pointing out something new. It is usually anch There may be situations where it makes sense to deviate from the standard placement options. Use the offset props to manually position HintDot. -## API - - - diff --git a/documentation-site/pages/components/icon.mdx b/documentation-site/pages/components/icon.mdx index 02fc638c40..ae2001dbd9 100644 --- a/documentation-site/pages/components/icon.mdx +++ b/documentation-site/pages/components/icon.mdx @@ -18,7 +18,6 @@ import * as IconExports from 'baseui/icon'; import Yard from '../../components/yard/index'; import iconConfig from '../../components/yard/config/icon'; -import ApiTable from '../../components/api-table'; export default Layout; @@ -49,12 +48,4 @@ _If you are an Uber employee, you can access the full list of icons [here](http: