Skip to content

Commit

Permalink
Merge branch 'main' into dev/generic-card-component
Browse files Browse the repository at this point in the history
  • Loading branch information
nmanu1 committed Jul 20, 2022
2 parents 9d12fcd + 22960c4 commit 2ea0961
Show file tree
Hide file tree
Showing 698 changed files with 5,038 additions and 5,069 deletions.
2 changes: 1 addition & 1 deletion .storybook/main.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = {
framework: '@storybook/react',
staticDirs: ['./public'],
webpackFinal: async (config) => {
config.resolve.alias['./AnswersCore'] = require.resolve('../tests/__fixtures__/core/AnswersCore.ts');
config.resolve.alias['./SearchCore'] = require.resolve('../tests/__fixtures__/core/SearchCore.ts');
config.resolve.alias['../utils/location-operations'] = require.resolve('../tests/__fixtures__/utils/location-operations.ts');
return config;
}
Expand Down
4 changes: 2 additions & 2 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import './index.css';
import { AnswersCoreDecorator } from '../tests/__fixtures__/core/AnswersCore';
import { SearchCoreDecorator } from '../tests/__fixtures__/core/SearchCore';

export const parameters = {
actions: { argTypesRegex: '^on[A-Z].*' },
Expand All @@ -21,4 +21,4 @@ export const parameters = {
};

// Add the decorator to all stories
export const decorators = [AnswersCoreDecorator];
export const decorators = [SearchCoreDecorator];
2 changes: 1 addition & 1 deletion .storybook/yextTheme.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ module.exports = create({

// Brand logo
brandTitle: 'Yext Component Library',
brandUrl: 'https://github.com/yext/answers-react-components',
brandUrl: 'https://github.com/yext/search-ui-react',
brandImage: './logo.png'
});
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
The Answers React Components files listed in this repository are licensed under the below license.  All other features and products are subject to separate agreements
The Search UI React files listed in this repository are licensed under the below license.  All other features and products are subject to separate agreements
and certain functionality requires paid subscriptions to Yext products.

Contains information from the language-subtag-registry JSON Database (https://github.com/mattcg/language-subtag-registry/tree/master/data/json)
Expand Down
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
# answers-react-components
# search-ui-react

<div>
<a href="https://npmjs.org/package/@yext/answers-react-components">
<img src="https://img.shields.io/npm/v/@yext/answers-react-components" alt="NPM version"/>
<a href="https://npmjs.org/package/@yext/search-ui-react">
<img src="https://img.shields.io/npm/v/@yext/search-ui-react" alt="NPM version"/>
</a>
<a href="./LICENSE">
<img src="https://img.shields.io/badge/License-BSD%203--Clause-blue.svg" alt="License"/>
</a>
<a href='https://coveralls.io/github/yext/answers-react-components?branch=main'>
<img src='https://coveralls.io/repos/github/yext/answers-react-components/badge.svg?branch=main' alt='Coverage Status' />
<a href='https://coveralls.io/github/yext/search-ui-react?branch=main'>
<img src='https://coveralls.io/repos/github/yext/search-ui-react/badge.svg?branch=main' alt='Coverage Status' />
</a>
</div>
<br>

A library of React Components for powering Yext Search integrations.

See the [full documentation](./docs/answers-react-components.md) here.
See the [full documentation](./docs/search-ui-react.md) here.

## Getting Started

If you are using NPM 7+, you can install the components with the following command:

```bash
npm install @yext/answers-react-components
npm install @yext/search-ui-react
```
The @yext/answers-headless-react peer dependency will be automatically installed.
The @yext/search-headless-react peer dependency will be automatically installed.

If you are using NPM 6 or Yarn, you can install the library and its peer dependencies with this command:
```bash
npx install-peerdeps @yext/answers-react-components
npx install-peerdeps @yext/search-ui-react
```
The command will work with Yarn so long as NPM 6+ is installed on the machine.

Once the library and its peer dependencies are installed, the components can be rendered using React by placing them inside the `AnswersHeadlessProvider` with the appropriate credentials:
Once the library and its peer dependencies are installed, the components can be rendered using React by placing them inside the `SearchHeadlessProvider` with the appropriate credentials:

```tsx
import { AnswersHeadlessProvider } from '@yext/answers-headless-react';
import { SearchBar, UniversalResults } from '@yext/answers-react-components';
import { SearchHeadlessProvider } from '@yext/search-headless-react';
import { SearchBar, UniversalResults } from '@yext/search-ui-react';

const config = {
apiKey: '<apiKey>',
Expand All @@ -47,10 +47,10 @@ const config = {

function App() {
return (
<AnswersHeadlessProvider {...config}>
<SearchHeadlessProvider {...config}>
<SearchBar />
<UniversalResults />
</AnswersHeadlessProvider>
</SearchHeadlessProvider>
);
}

Expand All @@ -60,5 +60,5 @@ export default App;
To use the Component Library's Styling without adding Tailwind to your project, add the following import:

```tsx
import '@yext/answers-react-components/bundle.css'
import '@yext/search-ui-react/bundle.css'
```
23 changes: 13 additions & 10 deletions THIRD-PARTY-NOTICES
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ Apache License

The following NPM package may be included in this product:

- @reduxjs/toolkit@1.8.2
- @reduxjs/toolkit@1.8.3

This package contains the following license and notice below:

Expand Down Expand Up @@ -758,11 +758,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

The following NPM package may be included in this product:

- @yext/answers-core@1.7.0
- @yext/search-core@1.8.1

This package contains the following license and notice below:

The Answers Core files listed in this repository are licensed under the below license.  All other features and products are subject to separate agreements
The Search Core files listed in this repository are licensed under the below license.  All other features and products are subject to separate agreements
and certain functionality requires paid subscriptions to Yext products.

Contains information from the language-subtag-registry JSON Database (https://github.com/mattcg/language-subtag-registry/tree/master/data/json)
Expand Down Expand Up @@ -802,16 +802,19 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

The following NPM package may be included in this product:

- @yext/answers-headless-react@1.2.0
- @yext/search-headless-react@1.3.0

This package contains the following license and notice below:

The Answers Headless React files listed in this repository are licensed under the below license. All other features and products are subject to
Contains information from the language-subtag-registry JSON Database (https://github.com/mattcg/language-subtag-registry/tree/master/data/json)
which is made available under the ODC Attribution License (https://github.com/mattcg/language-subtag-registry/blob/master/LICENSE.md).

The Search Headless React files listed in this repository are licensed under the below license. All other features and products are subject to
separate agreements and certain functionality requires paid subscriptions to Yext products.

BSD 3-Clause License

Copyright (c) 2021, Yext
Copyright (c) 2022, Yext
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -843,19 +846,19 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

The following NPM package may be included in this product:

- @yext/answers-headless@1.2.0
- @yext/search-headless@1.3.0

This package contains the following license and notice below:

The Answers Headless files listed in this repository are licensed under the below license.  All other features and products are subject to separate agreements
The Search Headless files listed in this repository are licensed under the below license.  All other features and products are subject to separate agreements
and certain functionality requires paid subscriptions to Yext products.

Contains information from the language-subtag-registry JSON Database (https://github.com/mattcg/language-subtag-registry/tree/master/data/json)
which is made available under the ODC Attribution License (https://github.com/mattcg/language-subtag-registry/blob/master/LICENSE.md).

BSD 3-Clause License

Copyright (c) 2021, Yext
Copyright (c) 2022, Yext
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -4007,7 +4010,7 @@ The following NPM packages may be included in this product:
- react-is@16.13.1
- react@17.0.2
- scheduler@0.20.2
- use-sync-external-store@1.1.0
- use-sync-external-store@1.2.0

These packages each contain the following license and notice below:

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

25 changes: 0 additions & 25 deletions docs/answers-react-components.alternativeverticalscssclasses.md

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

24 changes: 0 additions & 24 deletions docs/answers-react-components.alternativeverticalsprops.md

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 2ea0961

Please sign in to comment.