Skip to content

Commit

Permalink
fix lint and rebase issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mnajdova authored and brijeshb42 committed Jun 7, 2023
1 parent 46f0c83 commit 2a0ac5c
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 73 deletions.
4 changes: 2 additions & 2 deletions docs/data/base/components/autocomplete/autocomplete.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ To learn more about implementing a custom Autocomplete, you can explore the [`us

## Usage

After [installation](/base/getting-started/quickstart/#installation), you can start building with this hook as follows:
After [installation](/base-ui/getting-started/quickstart/#installation), you can start building with this hook as follows:

```jsx
import useAutocomplete from '@mui/base/useAutocomplete';
Expand Down Expand Up @@ -128,7 +128,7 @@ These two states are isolated, and should be controlled independently.

React Portals can be used to render the listbox outside of the DOM hierarchy, making it easier to allow it to "float" above adjacent elements.

Base UI provides a [`<Popper />`](/base/react-popper/) component built around React's `createPortal()` for exactly this purpose, and additionally helps you manage keyboard focus as it moves in and out of the portal.
Base UI provides a [`<Popper />`](/base-ui/react-popper/) component built around React's `createPortal()` for exactly this purpose, and additionally helps you manage keyboard focus as it moves in and out of the portal.

To render the listbox in Base UI's Popper, the `ref`s must be merged as follows:

Expand Down
2 changes: 1 addition & 1 deletion docs/data/base/components/tabs/tabs.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ The same applies for props specific to custom primitive elements:

A common use case for tabs is to implement client-side navigation that doesn't require an HTTP round-trip to the server.

The Tab component provides the [slots](/base/react-tabs/#custom-structure) prop to handle this use case—see [the Material UI documentation on routing](/material-ui/guides/routing/#tabs) for more details.
The Tab component provides the [slots](/base-ui/react-tabs/#custom-structure) prop to handle this use case—see [the Material UI documentation on routing](/material-ui/guides/routing/#tabs) for more details.

## Accessibility

Expand Down
71 changes: 4 additions & 67 deletions docs/data/base/pagesApi.js
Original file line number Diff line number Diff line change
@@ -1,70 +1,4 @@
module.exports = [
<<<<<<< HEAD
{ pathname: '/base/react-badge/components-api/#badge', title: 'Badge' },
{ pathname: '/base/react-button/components-api/#button', title: 'Button' },
{
pathname: '/base/react-click-away-listener/components-api/#click-away-listener',
title: 'ClickAwayListener',
},
{
pathname: '/base/react-focus-trap/components-api/#focus-trap',
title: 'FocusTrap',
},
{
pathname: '/base/react-form-control/components-api/#form-control',
title: 'FormControl',
},
{ pathname: '/base/react-input/components-api/#input', title: 'Input' },
{ pathname: '/base/react-menu/components-api/#menu', title: 'Menu' },
{ pathname: '/base/react-menu/components-api/#menu-item', title: 'MenuItem' },
{ pathname: '/base/react-modal/components-api/#modal', title: 'Modal' },
{ pathname: '/base/react-no-ssr/components-api/#no-ssr', title: 'NoSsr' },
{ pathname: '/base/react-select/components-api/#option', title: 'Option' },
{
pathname: '/base/react-select/components-api/#option-group',
title: 'OptionGroup',
},
{ pathname: '/base/react-popper/components-api/#popper', title: 'Popper' },
{ pathname: '/base/react-portal/components-api/#portal', title: 'Portal' },
{ pathname: '/base/react-select/components-api/#select', title: 'Select' },
{ pathname: '/base/react-slider/components-api/#slider', title: 'Slider' },
{ pathname: '/base/react-snackbar/components-api/#snackbar', title: 'Snackbar' },
{ pathname: '/base/react-switch/components-api/#switch', title: 'Switch' },
{ pathname: '/base/react-tabs/components-api/#tab', title: 'Tab' },
{ pathname: '/base/react-tabs/components-api/#tab-panel', title: 'TabPanel' },
{
pathname: '/base/react-table-pagination/components-api/#table-pagination',
title: 'TablePagination',
},
{ pathname: '/base/react-tabs/components-api/#tabs', title: 'Tabs' },
{ pathname: '/base/react-tabs/components-api/#tabs-list', title: 'TabsList' },
{
pathname: '/base/react-textarea-autosize/components-api/#textarea-autosize',
title: 'TextareaAutosize',
},
{
pathname: '/base/react-autocomplete/hooks-api/#use-autocomplete',
title: 'useAutocomplete',
},
{ pathname: '/base/react-badge/hooks-api/#use-badge', title: 'useBadge' },
{ pathname: '/base/react-button/hooks-api/#use-button', title: 'useButton' },
{
pathname: '/base/react-form-control/hooks-api/#use-form-control-context',
title: 'useFormControlContext',
},
{ pathname: '/base/react-input/hooks-api/#use-input', title: 'useInput' },
{ pathname: '/base/react-menu/hooks-api/#use-menu', title: 'useMenu' },
{ pathname: '/base/react-menu/hooks-api/#use-menu-item', title: 'useMenuItem' },
{ pathname: '/base/react-select/hooks-api/#use-option', title: 'useOption' },
{ pathname: '/base/react-select/hooks-api/#use-select', title: 'useSelect' },
{ pathname: '/base/react-slider/hooks-api/#use-slider', title: 'useSlider' },
{ pathname: '/base/react-snackbar/hooks-api/#use-snackbar', title: 'useSnackbar' },
{ pathname: '/base/react-switch/hooks-api/#use-switch', title: 'useSwitch' },
{ pathname: '/base/react-tabs/hooks-api/#use-tab', title: 'useTab' },
{ pathname: '/base/react-tabs/hooks-api/#use-tab-panel', title: 'useTabPanel' },
{ pathname: '/base/react-tabs/hooks-api/#use-tabs', title: 'useTabs' },
{ pathname: '/base/react-tabs/hooks-api/#use-tabs-list', title: 'useTabsList' },
=======
{ pathname: '/base-ui/react-badge/components-api/#badge', title: 'Badge' },
{ pathname: '/base-ui/react-button/components-api/#button', title: 'Button' },
{
Expand Down Expand Up @@ -111,6 +45,10 @@ module.exports = [
pathname: '/base-ui/react-textarea-autosize/components-api/#textarea-autosize',
title: 'TextareaAutosize',
},
{
pathname: '/base-ui/react-autocomplete/hooks-api/#use-autocomplete',
title: 'useAutocomplete',
},
{ pathname: '/base-ui/react-badge/hooks-api/#use-badge', title: 'useBadge' },
{ pathname: '/base-ui/react-button/hooks-api/#use-button', title: 'useButton' },
{
Expand All @@ -132,5 +70,4 @@ module.exports = [
{ pathname: '/base-ui/react-tabs/hooks-api/#use-tab-panel', title: 'useTabPanel' },
{ pathname: '/base-ui/react-tabs/hooks-api/#use-tabs', title: 'useTabs' },
{ pathname: '/base-ui/react-tabs/hooks-api/#use-tabs-list', title: 'useTabsList' },
>>>>>>> 36ed3faeea (don't rename docs/data/base)
];
2 changes: 1 addition & 1 deletion docs/pages/base-ui/api/use-autocomplete.json
Original file line number Diff line number Diff line change
Expand Up @@ -232,5 +232,5 @@
},
"name": "useAutocomplete",
"filename": "/packages/mui-base/src/useAutocomplete/useAutocomplete.js",
"demos": "<ul><li><a href=\"/base/react-autocomplete/#hook\">Autocomplete</a></li></ul>"
"demos": "<ul><li><a href=\"/base-ui/react-autocomplete/#hook\">Autocomplete</a></li></ul>"
}
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/src/modules/utils/getUrlProduct.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('getUrlProduct', () => {
expect(getUrlProduct('/zh/base/react-button/')).to.equal('base');
});

it('get base', () => {
it('get base from base-ui url', () => {
expect(getUrlProduct('/base-ui/react-button/')).to.equal('base');
expect(getUrlProduct('/zh/base-ui/react-button/')).to.equal('base');
});
Expand Down
4 changes: 3 additions & 1 deletion packages/api-docs-builder/buildApiUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ function fixPathname(pathname: string): string {
'material-ui',
'joy-ui',
);
} else {
} else if (pathname.startsWith('/base')) {
fixedPathname = `${pathname
.replace('/base/', '/base-ui/')
.replace('/components/', '/react-')}/`;
} else {
fixedPathname = `${pathname.replace('/components/', '/react-')}/`;
}

return fixedPathname;
Expand Down

0 comments on commit 2a0ac5c

Please sign in to comment.