diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 294fd04c9351c..b7ee59b61aa2e 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -239,7 +239,7 @@ packages/react-components/react-storybook-addon-codesandbox @microsoft/fluentui- packages/react-components/babel-preset-storybook-full-source @microsoft/fluentui-react-build packages/react-components/react-jsx-runtime @microsoft/teams-prg packages/react-components/react-toast @microsoft/teams-prg -packages/react-components/react-search @microsoft/cxe-coastal +packages/react-components/react-search-preview @microsoft/cxe-coastal packages/react-components/react-colorpicker-compat @microsoft/cxe-red @sopranopillow # <%= NX-CODEOWNER-PLACEHOLDER %> diff --git a/apps/public-docsite-v9/.storybook/main.js b/apps/public-docsite-v9/.storybook/main.js index a57e9a915e54d..c4a985fec83ec 100644 --- a/apps/public-docsite-v9/.storybook/main.js +++ b/apps/public-docsite-v9/.storybook/main.js @@ -15,6 +15,7 @@ module.exports = /** @type {Omit Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +/// + +import type { ComponentProps } from '@fluentui/react-utilities'; +import type { ComponentState } from '@fluentui/react-utilities'; +import type { ForwardRefComponent } from '@fluentui/react-utilities'; +import { Input } from '@fluentui/react-input'; +import { InputState } from '@fluentui/react-input'; +import * as React_2 from 'react'; +import type { Slot } from '@fluentui/react-utilities'; +import type { SlotClassNames } from '@fluentui/react-utilities'; + +// @public +export const renderSearchBox_unstable: (state: SearchBoxState) => JSX.Element; + +// @public +export const SearchBox: ForwardRefComponent; + +// @public (undocumented) +export const searchBoxClassNames: SlotClassNames; + +// @public +export type SearchBoxProps = ComponentProps; + +// @public (undocumented) +export type SearchBoxSlots = { + root: NonNullable>; + dismiss?: Slot<'span'>; + contentAfter?: Slot<'span'>; +}; + +// @public +export type SearchBoxState = ComponentState & Required> & Required> & { + focused: boolean; +}; + +// @public +export const useSearchBox_unstable: (props: SearchBoxProps, ref: React_2.Ref) => SearchBoxState; + +// @public +export const useSearchBoxStyles_unstable: (state: SearchBoxState) => SearchBoxState; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/packages/react-components/react-search/etc/react-search.api.md b/packages/react-components/react-search-preview/etc/react-search.api.md similarity index 96% rename from packages/react-components/react-search/etc/react-search.api.md rename to packages/react-components/react-search-preview/etc/react-search.api.md index 10d58a3c439ee..112317a3c7998 100644 --- a/packages/react-components/react-search/etc/react-search.api.md +++ b/packages/react-components/react-search-preview/etc/react-search.api.md @@ -1,4 +1,4 @@ -## API Report File for "@fluentui/react-search" +## API Report File for "@fluentui/react-search-preview" > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). diff --git a/packages/react-components/react-search/jest.config.js b/packages/react-components/react-search-preview/jest.config.js similarity index 91% rename from packages/react-components/react-search/jest.config.js rename to packages/react-components/react-search-preview/jest.config.js index f7a3033d11048..fe8c99de1e279 100644 --- a/packages/react-components/react-search/jest.config.js +++ b/packages/react-components/react-search-preview/jest.config.js @@ -4,7 +4,7 @@ * @type {import('@jest/types').Config.InitialOptions} */ module.exports = { - displayName: 'react-search', + displayName: 'react-search-preview', preset: '../../../jest.preset.js', transform: { '^.+\\.tsx?$': [ diff --git a/packages/react-components/react-search/just.config.ts b/packages/react-components/react-search-preview/just.config.ts similarity index 100% rename from packages/react-components/react-search/just.config.ts rename to packages/react-components/react-search-preview/just.config.ts diff --git a/packages/react-components/react-search/package.json b/packages/react-components/react-search-preview/package.json similarity index 93% rename from packages/react-components/react-search/package.json rename to packages/react-components/react-search-preview/package.json index ba4e33f202962..15caf963a6b31 100644 --- a/packages/react-components/react-search/package.json +++ b/packages/react-components/react-search-preview/package.json @@ -1,7 +1,6 @@ { - "name": "@fluentui/react-search", - "version": "9.0.0-alpha.0", - "private": true, + "name": "@fluentui/react-search-preview", + "version": "0.0.0", "description": "Search input for Fluent UI v9", "main": "lib-commonjs/index.js", "module": "lib/index.js", @@ -50,8 +49,7 @@ "beachball": { "disallowedChangeTypes": [ "major", - "minor", - "patch" + "prerelease" ] }, "exports": { diff --git a/packages/react-components/react-search/project.json b/packages/react-components/react-search-preview/project.json similarity index 59% rename from packages/react-components/react-search/project.json rename to packages/react-components/react-search-preview/project.json index b9b4542817dd5..0298d645a39e8 100644 --- a/packages/react-components/react-search/project.json +++ b/packages/react-components/react-search-preview/project.json @@ -1,8 +1,8 @@ { - "name": "@fluentui/react-search", + "name": "@fluentui/react-search-preview", "$schema": "../../../node_modules/nx/schemas/project-schema.json", "projectType": "library", "implicitDependencies": [], - "sourceRoot": "packages/react-components/react-search/src", + "sourceRoot": "packages/react-components/react-search-preview/src", "tags": ["vNext", "platform:web"] } diff --git a/packages/react-components/react-search/src/SearchBox.ts b/packages/react-components/react-search-preview/src/SearchBox.ts similarity index 100% rename from packages/react-components/react-search/src/SearchBox.ts rename to packages/react-components/react-search-preview/src/SearchBox.ts diff --git a/packages/react-components/react-search/src/components/SearchBox/SearchBox.test.tsx b/packages/react-components/react-search-preview/src/components/SearchBox/SearchBox.test.tsx similarity index 100% rename from packages/react-components/react-search/src/components/SearchBox/SearchBox.test.tsx rename to packages/react-components/react-search-preview/src/components/SearchBox/SearchBox.test.tsx diff --git a/packages/react-components/react-search/src/components/SearchBox/SearchBox.tsx b/packages/react-components/react-search-preview/src/components/SearchBox/SearchBox.tsx similarity index 100% rename from packages/react-components/react-search/src/components/SearchBox/SearchBox.tsx rename to packages/react-components/react-search-preview/src/components/SearchBox/SearchBox.tsx diff --git a/packages/react-components/react-search/src/components/SearchBox/SearchBox.types.ts b/packages/react-components/react-search-preview/src/components/SearchBox/SearchBox.types.ts similarity index 100% rename from packages/react-components/react-search/src/components/SearchBox/SearchBox.types.ts rename to packages/react-components/react-search-preview/src/components/SearchBox/SearchBox.types.ts diff --git a/packages/react-components/react-search/src/components/SearchBox/__snapshots__/SearchBox.test.tsx.snap b/packages/react-components/react-search-preview/src/components/SearchBox/__snapshots__/SearchBox.test.tsx.snap similarity index 100% rename from packages/react-components/react-search/src/components/SearchBox/__snapshots__/SearchBox.test.tsx.snap rename to packages/react-components/react-search-preview/src/components/SearchBox/__snapshots__/SearchBox.test.tsx.snap diff --git a/packages/react-components/react-search/src/components/SearchBox/index.ts b/packages/react-components/react-search-preview/src/components/SearchBox/index.ts similarity index 100% rename from packages/react-components/react-search/src/components/SearchBox/index.ts rename to packages/react-components/react-search-preview/src/components/SearchBox/index.ts diff --git a/packages/react-components/react-search/src/components/SearchBox/renderSearchBox.tsx b/packages/react-components/react-search-preview/src/components/SearchBox/renderSearchBox.tsx similarity index 100% rename from packages/react-components/react-search/src/components/SearchBox/renderSearchBox.tsx rename to packages/react-components/react-search-preview/src/components/SearchBox/renderSearchBox.tsx diff --git a/packages/react-components/react-search/src/components/SearchBox/useSearchBox.tsx b/packages/react-components/react-search-preview/src/components/SearchBox/useSearchBox.tsx similarity index 100% rename from packages/react-components/react-search/src/components/SearchBox/useSearchBox.tsx rename to packages/react-components/react-search-preview/src/components/SearchBox/useSearchBox.tsx diff --git a/packages/react-components/react-search/src/components/SearchBox/useSearchBoxStyles.styles.ts b/packages/react-components/react-search-preview/src/components/SearchBox/useSearchBoxStyles.styles.ts similarity index 100% rename from packages/react-components/react-search/src/components/SearchBox/useSearchBoxStyles.styles.ts rename to packages/react-components/react-search-preview/src/components/SearchBox/useSearchBoxStyles.styles.ts diff --git a/packages/react-components/react-search/src/index.ts b/packages/react-components/react-search-preview/src/index.ts similarity index 100% rename from packages/react-components/react-search/src/index.ts rename to packages/react-components/react-search-preview/src/index.ts diff --git a/packages/react-components/react-search/src/testing/isConformant.ts b/packages/react-components/react-search-preview/src/testing/isConformant.ts similarity index 100% rename from packages/react-components/react-search/src/testing/isConformant.ts rename to packages/react-components/react-search-preview/src/testing/isConformant.ts diff --git a/packages/react-components/react-search/stories/SearchBox/SearchBoxAppearance.stories.tsx b/packages/react-components/react-search-preview/stories/SearchBox/SearchBoxAppearance.stories.tsx similarity index 97% rename from packages/react-components/react-search/stories/SearchBox/SearchBoxAppearance.stories.tsx rename to packages/react-components/react-search-preview/stories/SearchBox/SearchBoxAppearance.stories.tsx index 17a341380641f..8004f2a097222 100644 --- a/packages/react-components/react-search/stories/SearchBox/SearchBoxAppearance.stories.tsx +++ b/packages/react-components/react-search-preview/stories/SearchBox/SearchBoxAppearance.stories.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { SearchBox } from '@fluentui/react-search'; +import { SearchBox } from '@fluentui/react-search-preview'; import { Field, makeStyles, mergeClasses, shorthands, tokens } from '@fluentui/react-components'; const useStyles = makeStyles({ diff --git a/packages/react-components/react-search/stories/SearchBox/SearchBoxBestPractices.md b/packages/react-components/react-search-preview/stories/SearchBox/SearchBoxBestPractices.md similarity index 100% rename from packages/react-components/react-search/stories/SearchBox/SearchBoxBestPractices.md rename to packages/react-components/react-search-preview/stories/SearchBox/SearchBoxBestPractices.md diff --git a/packages/react-components/react-search/stories/SearchBox/SearchBoxContentBeforeAfter.stories.tsx b/packages/react-components/react-search-preview/stories/SearchBox/SearchBoxContentBeforeAfter.stories.tsx similarity index 97% rename from packages/react-components/react-search/stories/SearchBox/SearchBoxContentBeforeAfter.stories.tsx rename to packages/react-components/react-search-preview/stories/SearchBox/SearchBoxContentBeforeAfter.stories.tsx index 7a14084b7c982..f59786f527279 100644 --- a/packages/react-components/react-search/stories/SearchBox/SearchBoxContentBeforeAfter.stories.tsx +++ b/packages/react-components/react-search-preview/stories/SearchBox/SearchBoxContentBeforeAfter.stories.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { SearchBox } from '@fluentui/react-search'; +import { SearchBox } from '@fluentui/react-search-preview'; import { Button, ButtonProps, Field, makeStyles, shorthands, Text, tokens } from '@fluentui/react-components'; import { PersonRegular, MicRegular } from '@fluentui/react-icons'; diff --git a/packages/react-components/react-search/stories/SearchBox/SearchBoxControlled.stories.tsx b/packages/react-components/react-search-preview/stories/SearchBox/SearchBoxControlled.stories.tsx similarity index 88% rename from packages/react-components/react-search/stories/SearchBox/SearchBoxControlled.stories.tsx rename to packages/react-components/react-search-preview/stories/SearchBox/SearchBoxControlled.stories.tsx index 2de225fe65091..b8a2a9c625aa1 100644 --- a/packages/react-components/react-search/stories/SearchBox/SearchBoxControlled.stories.tsx +++ b/packages/react-components/react-search-preview/stories/SearchBox/SearchBoxControlled.stories.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; -import { SearchBox } from '@fluentui/react-search'; +import { SearchBox } from '@fluentui/react-search-preview'; import { Field } from '@fluentui/react-components'; -import type { SearchBoxProps } from '@fluentui/react-search'; +import type { SearchBoxProps } from '@fluentui/react-search-preview'; export const Controlled = () => { const [value, setValue] = React.useState('initial value'); diff --git a/packages/react-components/react-search/stories/SearchBox/SearchBoxDefault.stories.tsx b/packages/react-components/react-search-preview/stories/SearchBox/SearchBoxDefault.stories.tsx similarity index 89% rename from packages/react-components/react-search/stories/SearchBox/SearchBoxDefault.stories.tsx rename to packages/react-components/react-search-preview/stories/SearchBox/SearchBoxDefault.stories.tsx index 709c633f42cfc..96091ad625ad7 100644 --- a/packages/react-components/react-search/stories/SearchBox/SearchBoxDefault.stories.tsx +++ b/packages/react-components/react-search-preview/stories/SearchBox/SearchBoxDefault.stories.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import { ArgTypes } from '@storybook/api'; -import { SearchBox } from '@fluentui/react-search'; +import { SearchBox } from '@fluentui/react-search-preview'; import { Field } from '@fluentui/react-components'; -import type { SearchBoxProps } from '@fluentui/react-search'; +import type { SearchBoxProps } from '@fluentui/react-search-preview'; export const Default = (props: SearchBoxProps) => { return ( diff --git a/packages/react-components/react-search/stories/SearchBox/SearchBoxDescription.md b/packages/react-components/react-search-preview/stories/SearchBox/SearchBoxDescription.md similarity index 100% rename from packages/react-components/react-search/stories/SearchBox/SearchBoxDescription.md rename to packages/react-components/react-search-preview/stories/SearchBox/SearchBoxDescription.md diff --git a/packages/react-components/react-search/stories/SearchBox/SearchBoxDisabled.stories.tsx b/packages/react-components/react-search-preview/stories/SearchBox/SearchBoxDisabled.stories.tsx similarity index 85% rename from packages/react-components/react-search/stories/SearchBox/SearchBoxDisabled.stories.tsx rename to packages/react-components/react-search-preview/stories/SearchBox/SearchBoxDisabled.stories.tsx index 4ded663d515d2..9280f036ccc13 100644 --- a/packages/react-components/react-search/stories/SearchBox/SearchBoxDisabled.stories.tsx +++ b/packages/react-components/react-search-preview/stories/SearchBox/SearchBoxDisabled.stories.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { SearchBox } from '@fluentui/react-search'; +import { SearchBox } from '@fluentui/react-search-preview'; import { Field } from '@fluentui/react-components'; export const Disabled = () => { diff --git a/packages/react-components/react-search/stories/SearchBox/SearchBoxPlaceholder.stories.tsx b/packages/react-components/react-search-preview/stories/SearchBox/SearchBoxPlaceholder.stories.tsx similarity index 90% rename from packages/react-components/react-search/stories/SearchBox/SearchBoxPlaceholder.stories.tsx rename to packages/react-components/react-search-preview/stories/SearchBox/SearchBoxPlaceholder.stories.tsx index 486c2b73449ed..2e2775af3225b 100644 --- a/packages/react-components/react-search/stories/SearchBox/SearchBoxPlaceholder.stories.tsx +++ b/packages/react-components/react-search-preview/stories/SearchBox/SearchBoxPlaceholder.stories.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { SearchBox } from '@fluentui/react-search'; +import { SearchBox } from '@fluentui/react-search-preview'; import { Field } from '@fluentui/react-components'; export const Placeholder = () => { diff --git a/packages/react-components/react-search/stories/SearchBox/SearchBoxSize.stories.tsx b/packages/react-components/react-search-preview/stories/SearchBox/SearchBoxSize.stories.tsx similarity index 94% rename from packages/react-components/react-search/stories/SearchBox/SearchBoxSize.stories.tsx rename to packages/react-components/react-search-preview/stories/SearchBox/SearchBoxSize.stories.tsx index 04d6cdfa2e38a..ee8c755689e37 100644 --- a/packages/react-components/react-search/stories/SearchBox/SearchBoxSize.stories.tsx +++ b/packages/react-components/react-search-preview/stories/SearchBox/SearchBoxSize.stories.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { SearchBox } from '@fluentui/react-search'; +import { SearchBox } from '@fluentui/react-search-preview'; import { Field, makeStyles, shorthands, tokens } from '@fluentui/react-components'; const useStyles = makeStyles({ diff --git a/packages/react-components/react-search/stories/SearchBox/index.stories.tsx b/packages/react-components/react-search-preview/stories/SearchBox/index.stories.tsx similarity index 92% rename from packages/react-components/react-search/stories/SearchBox/index.stories.tsx rename to packages/react-components/react-search-preview/stories/SearchBox/index.stories.tsx index 8fb4b3d57a14c..aab81eec1f075 100644 --- a/packages/react-components/react-search/stories/SearchBox/index.stories.tsx +++ b/packages/react-components/react-search-preview/stories/SearchBox/index.stories.tsx @@ -1,4 +1,4 @@ -import { SearchBox } from '@fluentui/react-search'; +import { SearchBox } from '@fluentui/react-search-preview'; import descriptionMd from './SearchBoxDescription.md'; import bestPracticesMd from './SearchBoxBestPractices.md'; diff --git a/packages/react-components/react-search/tsconfig.json b/packages/react-components/react-search-preview/tsconfig.json similarity index 100% rename from packages/react-components/react-search/tsconfig.json rename to packages/react-components/react-search-preview/tsconfig.json diff --git a/packages/react-components/react-search/tsconfig.lib.json b/packages/react-components/react-search-preview/tsconfig.lib.json similarity index 100% rename from packages/react-components/react-search/tsconfig.lib.json rename to packages/react-components/react-search-preview/tsconfig.lib.json diff --git a/packages/react-components/react-search/tsconfig.spec.json b/packages/react-components/react-search-preview/tsconfig.spec.json similarity index 100% rename from packages/react-components/react-search/tsconfig.spec.json rename to packages/react-components/react-search-preview/tsconfig.spec.json diff --git a/scripts/storybook/src/utils.js b/scripts/storybook/src/utils.js index faa485cc86bb4..46ac977b341b5 100644 --- a/scripts/storybook/src/utils.js +++ b/scripts/storybook/src/utils.js @@ -168,6 +168,7 @@ function _createCodesandboxRule(allPackageInfo = getAllPackageInfo()) { '@fluentui/react-datepicker-compat', '@fluentui/react-migration-v8-v9', '@fluentui/react-migration-v0-v9', + '@fluentui/react-search-preview', ]; const importMappings = Object.values(allPackageInfo).reduce((acc, cur) => { diff --git a/tsconfig.base.all.json b/tsconfig.base.all.json index 0f9f41fbbc2e7..ace37f0d9d45c 100644 --- a/tsconfig.base.all.json +++ b/tsconfig.base.all.json @@ -128,7 +128,7 @@ "@fluentui/react-progress": ["packages/react-components/react-progress/src/index.ts"], "@fluentui/react-provider": ["packages/react-components/react-provider/src/index.ts"], "@fluentui/react-radio": ["packages/react-components/react-radio/src/index.ts"], - "@fluentui/react-search": ["packages/react-components/react-search/src/index.ts"], + "@fluentui/react-search-preview": ["packages/react-components/react-search-preview/src/index.ts"], "@fluentui/react-select": ["packages/react-components/react-select/src/index.ts"], "@fluentui/react-shared-contexts": ["packages/react-components/react-shared-contexts/src/index.ts"], "@fluentui/react-skeleton": ["packages/react-components/react-skeleton/src/index.ts"], diff --git a/tsconfig.base.json b/tsconfig.base.json index 3a9acc59b7879..6cbee35e73c51 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -63,7 +63,7 @@ "@fluentui/react-progress": ["packages/react-components/react-progress/src/index.ts"], "@fluentui/react-provider": ["packages/react-components/react-provider/src/index.ts"], "@fluentui/react-radio": ["packages/react-components/react-radio/src/index.ts"], - "@fluentui/react-search": ["packages/react-components/react-search/src/index.ts"], + "@fluentui/react-search-preview": ["packages/react-components/react-search-preview/src/index.ts"], "@fluentui/react-select": ["packages/react-components/react-select/src/index.ts"], "@fluentui/react-shared-contexts": ["packages/react-components/react-shared-contexts/src/index.ts"], "@fluentui/react-skeleton": ["packages/react-components/react-skeleton/src/index.ts"],