diff --git a/packages/material-ui-unstyled/src/AutocompleteUnstyled/index.d.ts b/packages/material-ui-unstyled/src/AutocompleteUnstyled/index.d.ts new file mode 100644 index 00000000000000..1814592b27b49d --- /dev/null +++ b/packages/material-ui-unstyled/src/AutocompleteUnstyled/index.d.ts @@ -0,0 +1,2 @@ +export { default as useAutocomplete } from './useAutocomplete'; +export * from './useAutocomplete'; diff --git a/packages/material-ui-unstyled/src/AutocompleteUnstyled/index.js b/packages/material-ui-unstyled/src/AutocompleteUnstyled/index.js new file mode 100644 index 00000000000000..16fbc428d75a3d --- /dev/null +++ b/packages/material-ui-unstyled/src/AutocompleteUnstyled/index.js @@ -0,0 +1 @@ +export { default as useAutocomplete, createFilterOptions } from './useAutocomplete'; diff --git a/packages/material-ui/src/useAutocomplete/useAutocomplete.d.ts b/packages/material-ui-unstyled/src/AutocompleteUnstyled/useAutocomplete.d.ts similarity index 100% rename from packages/material-ui/src/useAutocomplete/useAutocomplete.d.ts rename to packages/material-ui-unstyled/src/AutocompleteUnstyled/useAutocomplete.d.ts diff --git a/packages/material-ui/src/useAutocomplete/useAutocomplete.js b/packages/material-ui-unstyled/src/AutocompleteUnstyled/useAutocomplete.js similarity index 99% rename from packages/material-ui/src/useAutocomplete/useAutocomplete.js rename to packages/material-ui-unstyled/src/AutocompleteUnstyled/useAutocomplete.js index e007568ff8fc81..62bc7df557b79c 100644 --- a/packages/material-ui/src/useAutocomplete/useAutocomplete.js +++ b/packages/material-ui-unstyled/src/AutocompleteUnstyled/useAutocomplete.js @@ -1,6 +1,11 @@ /* eslint-disable no-constant-condition */ import * as React from 'react'; -import { setRef, useEventCallback, useControlled, unstable_useId as useId } from '../utils'; +import { + unstable_setRef as setRef, + unstable_useEventCallback as useEventCallback, + unstable_useControlled as useControlled, + unstable_useId as useId, +} from '@material-ui/utils'; // https://stackoverflow.com/questions/990904/remove-accents-diacritics-in-a-string-in-javascript // Give up on IE11 support for this feature diff --git a/packages/material-ui/src/useAutocomplete/useAutocomplete.spec.ts b/packages/material-ui-unstyled/src/AutocompleteUnstyled/useAutocomplete.spec.ts similarity index 97% rename from packages/material-ui/src/useAutocomplete/useAutocomplete.spec.ts rename to packages/material-ui-unstyled/src/AutocompleteUnstyled/useAutocomplete.spec.ts index f31398b6a6fa87..28e7ce57e533e1 100644 --- a/packages/material-ui/src/useAutocomplete/useAutocomplete.spec.ts +++ b/packages/material-ui-unstyled/src/AutocompleteUnstyled/useAutocomplete.spec.ts @@ -1,4 +1,4 @@ -import useAutocomplete, { FilterOptionsState } from '@material-ui/core/useAutocomplete'; +import { useAutocomplete, FilterOptionsState } from '@material-ui/unstyled/AutocompleteUnstyled'; import { expectType } from '@material-ui/types'; interface Person { diff --git a/packages/material-ui/src/useAutocomplete/useAutocomplete.test.js b/packages/material-ui-unstyled/src/AutocompleteUnstyled/useAutocomplete.test.js similarity index 98% rename from packages/material-ui/src/useAutocomplete/useAutocomplete.test.js rename to packages/material-ui-unstyled/src/AutocompleteUnstyled/useAutocomplete.test.js index 63453cbced05d3..fdde55847ecf50 100644 --- a/packages/material-ui/src/useAutocomplete/useAutocomplete.test.js +++ b/packages/material-ui-unstyled/src/AutocompleteUnstyled/useAutocomplete.test.js @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { createClientRender, screen, ErrorBoundary } from 'test/utils'; -import useAutocomplete, { createFilterOptions } from '@material-ui/core/useAutocomplete'; +import { useAutocomplete, createFilterOptions } from '@material-ui/unstyled/AutocompleteUnstyled'; describe('useAutocomplete', () => { const render = createClientRender(); diff --git a/packages/material-ui-unstyled/src/index.d.ts b/packages/material-ui-unstyled/src/index.d.ts index d3d37ca2e4b322..2ce08e1cad7f69 100644 --- a/packages/material-ui-unstyled/src/index.d.ts +++ b/packages/material-ui-unstyled/src/index.d.ts @@ -1,3 +1,5 @@ +export * from './AutocompleteUnstyled'; + export { default as BackdropUnstyled } from './BackdropUnstyled'; export * from './BackdropUnstyled'; diff --git a/packages/material-ui-unstyled/src/index.js b/packages/material-ui-unstyled/src/index.js index 86ece8bb42978c..5a8e9a07e6e8ef 100644 --- a/packages/material-ui-unstyled/src/index.js +++ b/packages/material-ui-unstyled/src/index.js @@ -1,3 +1,5 @@ +export * from './AutocompleteUnstyled'; + export { default as BackdropUnstyled } from './BackdropUnstyled'; export * from './BackdropUnstyled';