@nuskin/react-search-components 1.0.0-widget-integration.1 → 1.0.0-widget-integration.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +78 -50
- package/dist/index.d.mts +79 -145
- package/dist/index.d.ts +79 -145
- package/dist/index.js +725 -13085
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +723 -13075
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -8
package/README.md
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
# `@nuskin/react-search-components`
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The Nu Skin header search panel, as a presentational React component.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
separate integration layer.
|
|
5
|
+
It renders what it is given and reports what the user does. Fetching suggestions,
|
|
6
|
+
holding search state, routing, and analytics belong to the host, which in practice
|
|
7
|
+
is `react-search-sdk`.
|
|
9
8
|
|
|
10
|
-
##
|
|
9
|
+
## What it provides
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
`
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
One component, `SearchPanel`: a search box, product and "did you mean" suggestions,
|
|
12
|
+
recent searches, and an `agentPanel` slot for an embedded agent such as the NUi
|
|
13
|
+
widget from `react-nui-chat-sdk`.
|
|
14
|
+
|
|
15
|
+
Everything else in the repository, including the search box, the layout, the rows,
|
|
16
|
+
and the `Button`, `Icon`, `TextInput`, and `SelectInput` atoms, is internal. Storybook
|
|
17
|
+
shows them for development.
|
|
16
18
|
|
|
17
19
|
## Requirements
|
|
18
20
|
|
|
19
|
-
- Node 22
|
|
20
|
-
- Yarn Classic
|
|
21
|
+
- Node `>=22 <25` and Yarn Classic, to develop in this repository
|
|
21
22
|
- React 18.2 or a compatible React 18 release
|
|
22
23
|
- The standard Nu Skin foundation theme provider and global stylesheet in the
|
|
23
24
|
consuming application
|
|
@@ -37,55 +38,82 @@ foundation UI peer dependencies.
|
|
|
37
38
|
import { SearchPanel } from '@nuskin/react-search-components';
|
|
38
39
|
|
|
39
40
|
<SearchPanel
|
|
40
|
-
|
|
41
|
-
closeLabel="Close"
|
|
42
|
-
initialPrompt="How can I prevent wrinkles?"
|
|
43
|
-
messageInputProps={{
|
|
44
|
-
inputLabel: 'Message',
|
|
45
|
-
onSubmit: handleSubmit,
|
|
46
|
-
placeholder: 'Ask anything',
|
|
47
|
-
submitLabel: 'Send message',
|
|
48
|
-
}}
|
|
41
|
+
isOpen={isOpen}
|
|
49
42
|
onClose={handleClose}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
43
|
+
copy={copy}
|
|
44
|
+
input={{ value: query, onChange: setQuery, onSubmit: handleSubmit }}
|
|
45
|
+
suggestions={{
|
|
46
|
+
items,
|
|
47
|
+
loading,
|
|
48
|
+
showNoResults,
|
|
49
|
+
showDidYouMean,
|
|
50
|
+
hasMore,
|
|
51
|
+
query,
|
|
52
|
+
onSelect: handleSelect,
|
|
53
|
+
onRunAction: handleRunAction,
|
|
54
|
+
onSeeMore: handleSeeMore,
|
|
55
|
+
}}
|
|
56
|
+
recentSearches={{ items: recentSearches, onSelect: handleRecent, onClear: handleClear }}
|
|
57
|
+
/>;
|
|
53
58
|
```
|
|
54
59
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
|
60
|
-
|
|
|
61
|
-
| `
|
|
62
|
-
| `
|
|
63
|
-
| `
|
|
64
|
-
| `
|
|
65
|
-
| `
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
60
|
+
| Prop | Purpose |
|
|
61
|
+
| ------------------ | ------------------------------------------------------------------------------------ |
|
|
62
|
+
| `isOpen` | Whether the panel is shown |
|
|
63
|
+
| `onClose` | Called on Cancel, on Escape, and on a press outside the panel |
|
|
64
|
+
| `input` | The search box: the host owns `value` and receives `onChange` and `onSubmit` |
|
|
65
|
+
| `suggestions` | The suggestions the host has already fetched and filtered, and the handlers for them |
|
|
66
|
+
| `recentSearches` | Recent searches, shown while the search box is empty |
|
|
67
|
+
| `agentPanel` | An embedded agent. When set, it replaces the search box and suggestions |
|
|
68
|
+
| `copy` | All of the panel's text, already translated. Required |
|
|
69
|
+
| `logo` | The logo shown in the panel header |
|
|
70
|
+
| `fallbackImageUrl` | The image shown for a suggestion that has none |
|
|
71
|
+
|
|
72
|
+
`SearchPanelCopy` lists every string. A few are functions that take a number or a
|
|
73
|
+
product name, so each locale controls its own wording. The exported types describe
|
|
74
|
+
each prop in full.
|
|
75
|
+
|
|
76
|
+
## Behavior
|
|
77
|
+
|
|
78
|
+
- **A panel, not a modal.** It is full screen on small screens and a band across the
|
|
79
|
+
top from the desktop breakpoint up. The page behind it keeps scrolling, and
|
|
80
|
+
keyboard focus is not trapped.
|
|
81
|
+
- **Closing.** It closes on Escape and on a press outside it, and returns focus to
|
|
82
|
+
where it was when it opened.
|
|
83
|
+
- **Keyboard.** ArrowDown moves from the search box into the suggestions, the arrow
|
|
84
|
+
keys move between rows, and ArrowUp from the first row returns to the search box.
|
|
85
|
+
- **Announcements.** Screen readers are told when suggestions are loading, how many
|
|
86
|
+
there are, and when there are none, using the `copy` the host supplies.
|
|
87
|
+
- **Server rendering.** The panel renders through a portal to `document.body`, so it
|
|
88
|
+
renders nothing on the server and appears after mount.
|
|
89
|
+
- **Styles.** The package owns no global CSS and exports no stylesheet.
|
|
90
|
+
|
|
91
|
+
## Development
|
|
92
|
+
|
|
93
|
+
| Command | Purpose |
|
|
94
|
+
| ---------------------- | -------------------------------------------------- |
|
|
95
|
+
| `yarn typecheck` | Run strict TypeScript checks |
|
|
96
|
+
| `yarn lint` | Run ESLint |
|
|
97
|
+
| `yarn format` | Format source and documentation |
|
|
98
|
+
| `yarn format:check` | Verify formatting |
|
|
99
|
+
| `yarn test` | Run Jest with coverage |
|
|
100
|
+
| `yarn storybook` | Start Storybook on port 6006 |
|
|
101
|
+
| `yarn build-storybook` | Build Storybook into `dist/storybook/` |
|
|
102
|
+
| `yarn build:package` | Type-check and build the package into `dist/` |
|
|
103
|
+
| `yarn check:package` | Validate ESM, CommonJS, types, and packed contents |
|
|
104
|
+
| `yarn validate` | Run the complete local quality workflow |
|
|
73
105
|
|
|
74
106
|
| Output | Location |
|
|
75
107
|
| -------------------------------------------- | ----------------- |
|
|
76
|
-
| CommonJS, ESM, declarations, and source maps | `
|
|
108
|
+
| CommonJS, ESM, declarations, and source maps | `dist/` |
|
|
77
109
|
| Static Storybook | `dist/storybook/` |
|
|
78
110
|
| Test coverage | `coverage/` |
|
|
79
111
|
|
|
80
|
-
The package owns no global CSS and exports no stylesheet.
|
|
81
|
-
|
|
82
112
|
## Documentation
|
|
83
113
|
|
|
84
|
-
- [
|
|
85
|
-
- [
|
|
86
|
-
- [
|
|
87
|
-
- [Initialization plan](docs/initialization-plan.md)
|
|
88
|
-
- [Architecture decisions](docs/decisions/)
|
|
114
|
+
- [Contributing](CONTRIBUTING.md): how to work in this repository
|
|
115
|
+
- [Constitution](.specify/memory/constitution.md): the rules every change must follow
|
|
116
|
+
- [Architecture decisions](docs/decisions/): why the repository is shaped this way
|
|
89
117
|
|
|
90
118
|
## License
|
|
91
119
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1,68 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import React__default, { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
3
|
-
|
|
4
|
-
declare const SEARCH_MESSAGE_SENDERS: {
|
|
5
|
-
readonly AGENT: "agent";
|
|
6
|
-
readonly USER: "user";
|
|
7
|
-
};
|
|
8
|
-
type SearchMessageSender = (typeof SEARCH_MESSAGE_SENDERS)[keyof typeof SEARCH_MESSAGE_SENDERS];
|
|
9
|
-
|
|
10
|
-
interface SearchMessageProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children'> {
|
|
11
|
-
sender: SearchMessageSender;
|
|
12
|
-
text: string;
|
|
13
|
-
}
|
|
14
|
-
declare function SearchMessage({ sender, text, ...props }: SearchMessageProps): React.JSX.Element;
|
|
15
|
-
|
|
16
|
-
interface SearchMessageInputBaseProps extends Omit<ComponentPropsWithoutRef<'form'>, 'children' | 'onSubmit' | 'onChange'> {
|
|
17
|
-
inputLabel: string;
|
|
18
|
-
/** Called on every keystroke — use for typeahead/debounced search */
|
|
19
|
-
onChange?: (value: string) => void;
|
|
20
|
-
onSubmit: (message: string) => void;
|
|
21
|
-
placeholder: string;
|
|
22
|
-
submitLabel: string;
|
|
23
|
-
/** When false, input value is preserved after submit (search mode). Defaults to true (chat mode). */
|
|
24
|
-
clearOnSubmit?: boolean;
|
|
25
|
-
value?: string;
|
|
26
|
-
}
|
|
27
|
-
type SearchMessageInputVoiceProps = {
|
|
28
|
-
onVoiceInput: () => void;
|
|
29
|
-
showVoiceInput: true;
|
|
30
|
-
voiceListening?: boolean;
|
|
31
|
-
voiceInputLabel: string;
|
|
32
|
-
voiceListeningLabel?: string;
|
|
33
|
-
} | {
|
|
34
|
-
onVoiceInput?: never;
|
|
35
|
-
showVoiceInput?: false;
|
|
36
|
-
voiceListening?: never;
|
|
37
|
-
voiceInputLabel?: never;
|
|
38
|
-
voiceListeningLabel?: never;
|
|
39
|
-
};
|
|
40
|
-
type SearchMessageInputProps = SearchMessageInputBaseProps & SearchMessageInputVoiceProps;
|
|
41
|
-
declare function SearchMessageInput({ clearOnSubmit, inputLabel, onChange, onSubmit, onVoiceInput, placeholder, showVoiceInput, submitLabel, value, voiceInputLabel, voiceListening, voiceListeningLabel, ...props }: SearchMessageInputProps): React.JSX.Element;
|
|
42
|
-
|
|
43
|
-
interface SearchPanelProps extends Omit<ComponentPropsWithoutRef<'section'>, 'aria-label' | 'children'> {
|
|
44
|
-
'aria-label': string;
|
|
45
|
-
children: ReactNode;
|
|
46
|
-
closeLabel: string;
|
|
47
|
-
onClose: () => void;
|
|
48
|
-
initialPrompt?: string;
|
|
49
|
-
messageInputProps?: SearchMessageInputProps;
|
|
50
|
-
inputSlot?: ReactNode;
|
|
51
|
-
logoSlot?: ReactNode;
|
|
52
|
-
/** When true: content scrolls, input fixed at bottom (AI chat layout) */
|
|
53
|
-
chatMode?: boolean;
|
|
54
|
-
/**
|
|
55
|
-
* When true: the panel hosts an embedded agent. Children fill the space below the header
|
|
56
|
-
* and bring their own scrolling and input, so no input, input slot or initial prompt renders.
|
|
57
|
-
*/
|
|
58
|
-
agentMode?: boolean;
|
|
59
|
-
}
|
|
60
|
-
declare function SearchPanel({ 'aria-label': ariaLabel, agentMode, children, chatMode, closeLabel, initialPrompt, inputSlot, logoSlot, messageInputProps, onClose, ...props }: Readonly<SearchPanelProps>): React.JSX.Element;
|
|
1
|
+
import React from 'react';
|
|
61
2
|
|
|
62
3
|
type ProductType = 'bundle' | 'single';
|
|
63
4
|
/**
|
|
64
|
-
* A product suggestion
|
|
65
|
-
*
|
|
5
|
+
* A product suggestion, as the search SDK maps it. The SDK decides stock and add-to-cart
|
|
6
|
+
* availability, so `outOfStock` and `cartActionDisabled` are read as given.
|
|
7
|
+
*
|
|
8
|
+
* It mirrors the SDK's shape in full, and defines it here so this library stays presentational and
|
|
9
|
+
* imports nothing from the SDK. A handler the host types with its own item type therefore accepts
|
|
10
|
+
* these items.
|
|
66
11
|
*/
|
|
67
12
|
interface CatalogSuggestionItem {
|
|
68
13
|
id: string;
|
|
@@ -86,62 +31,68 @@ interface CatalogSuggestionItem {
|
|
|
86
31
|
keywords: string;
|
|
87
32
|
ingredientTerms: string[];
|
|
88
33
|
}
|
|
89
|
-
/**
|
|
90
|
-
|
|
34
|
+
/**
|
|
35
|
+
* A "Did You Mean?" row: a corrected search term, not a product.
|
|
36
|
+
*
|
|
37
|
+
* A type alias rather than an interface, so a host's own item type with extra fields still accepts
|
|
38
|
+
* it where the host types a handler with that richer type.
|
|
39
|
+
*/
|
|
40
|
+
type DidYouMeanItem = {
|
|
91
41
|
id: string;
|
|
92
42
|
value: string;
|
|
93
43
|
suggestionType: 'did-you-mean';
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
imageSrc: string;
|
|
98
|
-
displayLabel: string;
|
|
99
|
-
isBundle: boolean;
|
|
100
|
-
isDidYouMean: boolean;
|
|
101
|
-
isOutOfStock: boolean;
|
|
102
|
-
isCartActionDisabled: boolean;
|
|
103
|
-
}
|
|
104
|
-
interface SuggestionOptionWithTracking extends Omit<CatalogSuggestionItem, 'slug' | 'productSlug' | 'url' | 'href'> {
|
|
105
|
-
slug: string | null | undefined;
|
|
106
|
-
productSlug: string | null | undefined;
|
|
107
|
-
url: string | null | undefined;
|
|
108
|
-
href: string | null | undefined;
|
|
109
|
-
trackingUrl?: string;
|
|
110
|
-
[key: string]: unknown;
|
|
111
|
-
}
|
|
112
|
-
interface SuggestionRowProps {
|
|
113
|
-
inputRef: React__default.RefObject<HTMLElement | null>;
|
|
114
|
-
isHighlighted: boolean;
|
|
115
|
-
isSelected: boolean;
|
|
116
|
-
onHighlightSuggestion: (index: number) => void;
|
|
117
|
-
onRunSuggestionAction: (option: SuggestionOptionWithTracking) => void;
|
|
118
|
-
onSelectSuggestion: (option: SuggestionOptionWithTracking) => void;
|
|
119
|
-
registerSuggestionNode: (node: HTMLElement | null) => void;
|
|
120
|
-
suggestionIndex: number;
|
|
121
|
-
suggestionOption: SuggestionOptionWithTracking;
|
|
122
|
-
suggestionOptionId: string;
|
|
123
|
-
fallbackImageUrl?: string;
|
|
124
|
-
}
|
|
44
|
+
};
|
|
45
|
+
/** One row of suggestions: a product, or a "did you mean" term. */
|
|
46
|
+
type SuggestionOption = CatalogSuggestionItem | DidYouMeanItem;
|
|
125
47
|
|
|
126
|
-
/**
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
48
|
+
/**
|
|
49
|
+
* Every piece of text the panel shows or announces. The panel has no text of its own, so the host
|
|
50
|
+
* supplies all of it, already translated. A function takes the number or name it needs to word the
|
|
51
|
+
* text for the locale.
|
|
52
|
+
*/
|
|
53
|
+
interface SearchPanelCopy {
|
|
54
|
+
/** The button that closes the panel. */
|
|
55
|
+
cancel: string;
|
|
56
|
+
/** Shown in the empty search box. */
|
|
57
|
+
searchPlaceholder: string;
|
|
58
|
+
/** The heading over the corrected search terms. */
|
|
59
|
+
didYouMean: string;
|
|
60
|
+
/** The row shown when nothing matches. Also announced. */
|
|
61
|
+
noSuggestions: string;
|
|
62
|
+
/** The button that shows the full results. */
|
|
63
|
+
seeMoreResults: string;
|
|
64
|
+
/** The heading over the recent searches. */
|
|
65
|
+
recentSearches: string;
|
|
66
|
+
/** The button that clears the recent searches. */
|
|
67
|
+
clearRecentSearches: string;
|
|
68
|
+
/** The chip that shows the rest of the recent searches, given how many are hidden. */
|
|
69
|
+
moreRecentSearches: (count: number) => string;
|
|
70
|
+
/** The accessible name of the dialog, the search landmark and the search box. */
|
|
71
|
+
searchLabel: string;
|
|
72
|
+
/** The accessible name of the magnifier button that submits the search. */
|
|
73
|
+
submitSearch: string;
|
|
74
|
+
/** The accessible name of the button that empties the search box. */
|
|
75
|
+
clearInput: string;
|
|
76
|
+
/** The accessible name of the list of suggestions, when it has no heading. */
|
|
77
|
+
suggestionsLabel: string;
|
|
78
|
+
/** The accessible name of a product's add-to-cart button, given the product's name. */
|
|
79
|
+
addToCart: (productName: string) => string;
|
|
80
|
+
/** The accessible name of a bundle's action button, given the bundle's name. */
|
|
81
|
+
openBundle: (productName: string) => string;
|
|
82
|
+
/** Announced while suggestions load. */
|
|
83
|
+
suggestionsLoading: string;
|
|
84
|
+
/** Announced when suggestions appear, given how many, for example "3 suggestions available". */
|
|
85
|
+
suggestionsCount: (count: number) => string;
|
|
135
86
|
}
|
|
136
87
|
/** The search box, controlled by the host. */
|
|
137
|
-
interface
|
|
88
|
+
interface SearchPanelInputProps {
|
|
138
89
|
value: string;
|
|
139
90
|
onChange: (value: string) => void;
|
|
140
91
|
onSubmit: (value: string) => void;
|
|
141
92
|
}
|
|
142
93
|
/** The suggestions the host has already fetched and filtered. */
|
|
143
|
-
interface
|
|
144
|
-
items: ReadonlyArray<
|
|
94
|
+
interface SearchPanelSuggestionsProps {
|
|
95
|
+
items: ReadonlyArray<SuggestionOption>;
|
|
145
96
|
loading: boolean;
|
|
146
97
|
/** Show the "no suggestions" row (the host decides when a fetch came back empty). */
|
|
147
98
|
showNoResults: boolean;
|
|
@@ -151,61 +102,44 @@ interface SearchModalSuggestionsProps {
|
|
|
151
102
|
hasMore: boolean;
|
|
152
103
|
/** The query the suggestions belong to (passed to the "see more" link). */
|
|
153
104
|
query: string;
|
|
154
|
-
onSelect: (option:
|
|
155
|
-
onRunAction: (option:
|
|
105
|
+
onSelect: (option: SuggestionOption) => void;
|
|
106
|
+
onRunAction: (option: SuggestionOption) => void;
|
|
156
107
|
onSeeMore: () => void;
|
|
157
108
|
}
|
|
158
109
|
/** Recent searches, shown while the search box is empty. */
|
|
159
|
-
interface
|
|
110
|
+
interface SearchPanelRecentSearches {
|
|
160
111
|
items: ReadonlyArray<string>;
|
|
161
112
|
onSelect: (query: string) => void;
|
|
162
113
|
onClear: () => void;
|
|
163
114
|
}
|
|
164
|
-
interface
|
|
115
|
+
interface SearchPanelProps {
|
|
165
116
|
isOpen: boolean;
|
|
166
117
|
onClose: () => void;
|
|
167
|
-
logo?:
|
|
168
|
-
cancelLabel?: string;
|
|
118
|
+
logo?: React.ReactNode;
|
|
169
119
|
fallbackImageUrl?: string;
|
|
170
|
-
copy
|
|
171
|
-
input:
|
|
172
|
-
suggestions:
|
|
173
|
-
recentSearches?:
|
|
120
|
+
copy: SearchPanelCopy;
|
|
121
|
+
input: SearchPanelInputProps;
|
|
122
|
+
suggestions: SearchPanelSuggestionsProps;
|
|
123
|
+
recentSearches?: SearchPanelRecentSearches;
|
|
174
124
|
/**
|
|
175
125
|
* An embedded agent (the NUi widget). When set, the panel switches to its agent layout: the
|
|
176
126
|
* search box, suggestions and recent searches are replaced by this content.
|
|
177
127
|
*/
|
|
178
|
-
agentPanel?:
|
|
128
|
+
agentPanel?: React.ReactNode;
|
|
179
129
|
}
|
|
180
130
|
|
|
181
131
|
/**
|
|
182
|
-
* The search panel: a
|
|
183
|
-
*
|
|
132
|
+
* The search panel: a search box, suggestions and recent searches or, when `agentPanel` is set, a
|
|
133
|
+
* header over an embedded agent. Full screen on small screens, a band across the top from the
|
|
134
|
+
* desktop breakpoint up.
|
|
135
|
+
*
|
|
136
|
+
* It is a panel, not a modal: the page behind it keeps scrolling, keyboard focus is not trapped,
|
|
137
|
+
* and the page is not hidden from assistive technology. It closes on Escape and on a press outside
|
|
138
|
+
* it, and puts focus back where it was when it closes.
|
|
184
139
|
*
|
|
185
|
-
* Presentational: it holds only UI state (highlighted row, expanded recent searches).
|
|
186
|
-
*
|
|
187
|
-
* hiding the page from assistive technology) comes from MUI's `Modal`. Fetching, routing and
|
|
188
|
-
* navigation belong to the host.
|
|
140
|
+
* Presentational: it holds only UI state (highlighted row, expanded recent searches). Fetching,
|
|
141
|
+
* routing, navigation and all of its text belong to the host.
|
|
189
142
|
*/
|
|
190
|
-
declare function
|
|
191
|
-
|
|
192
|
-
declare function SuggestionRow({ inputRef, isHighlighted, isSelected, onHighlightSuggestion, onRunSuggestionAction, onSelectSuggestion, registerSuggestionNode, suggestionIndex, suggestionOption, suggestionOptionId, fallbackImageUrl, }: Readonly<SuggestionRowProps>): React__default.ReactElement;
|
|
193
|
-
|
|
194
|
-
declare function getSuggestionDisplayData(option: SuggestionOptionWithTracking): SuggestionDisplayData;
|
|
195
|
-
|
|
196
|
-
interface SeeMoreLinkProps {
|
|
197
|
-
seeMoreLinkRef: React__default.RefObject<HTMLButtonElement | null>;
|
|
198
|
-
seeMoreLinkFocused: boolean;
|
|
199
|
-
inputRef: React__default.RefObject<HTMLElement | null>;
|
|
200
|
-
onBlurSeeMoreLink: () => void;
|
|
201
|
-
onFocusSeeMoreLink: () => void;
|
|
202
|
-
onSeeMoreResults: () => void;
|
|
203
|
-
resetSeeMoreLinkFocus: () => void;
|
|
204
|
-
restoreLastSuggestion: () => void;
|
|
205
|
-
seeMoreResultsText: string;
|
|
206
|
-
searchQuery?: string;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
declare function SeeMoreLink({ seeMoreLinkRef, seeMoreLinkFocused, inputRef, onBlurSeeMoreLink, onFocusSeeMoreLink, onSeeMoreResults, resetSeeMoreLinkFocus, restoreLastSuggestion, seeMoreResultsText, searchQuery, }: Readonly<SeeMoreLinkProps>): React__default.ReactElement;
|
|
143
|
+
declare function SearchPanel({ isOpen, onClose, logo, fallbackImageUrl, copy, input, suggestions, recentSearches, agentPanel, }: Readonly<SearchPanelProps>): React.ReactElement | null;
|
|
210
144
|
|
|
211
|
-
export { type CatalogSuggestionItem, type DidYouMeanItem,
|
|
145
|
+
export { type CatalogSuggestionItem, type DidYouMeanItem, SearchPanel, type SearchPanelCopy, type SearchPanelInputProps, type SearchPanelProps, type SearchPanelRecentSearches, type SearchPanelSuggestionsProps, type SuggestionOption };
|