@nuskin/foundation-ui-components 1.5.0 → 1.6.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/foundation-ui-components",
3
- "version": "1.5.0",
3
+ "version": "1.6.1",
4
4
  "description": "It is a foundation library written in react, that provides common components to all UI pages",
5
5
  "main": "src/common/index.ts",
6
6
  "repository": {
@@ -1,7 +1,7 @@
1
1
  import { styled } from '@nuskin/foundation-theme';
2
-
3
2
  import { NsInputField } from '../input';
4
3
 
4
+ // TODO: why is .muiautocomplete-popupindicator added?
5
5
  export const StyledTextField = styled(NsInputField)`
6
6
  .MuiAutocomplete-inputRoot {
7
7
  padding-right: 10px !important;
@@ -9,4 +9,8 @@ export const StyledTextField = styled(NsInputField)`
9
9
  .muiautocomplete-popupindicator {
10
10
  display: none;
11
11
  }
12
+ .styled-text-field.MuiOutlinedInput-root input#custom_autocomplete_dropdown::placeholder {
13
+ opacity: 1;
14
+ color: #252525;
15
+ }
12
16
  `;
@@ -1,12 +1,11 @@
1
+ import { Autocomplete, AutocompleteRenderInputParams, List } from '@mui/material';
1
2
  import React, { HTMLAttributes, PropsWithChildren, useCallback, useEffect, useRef, useState } from 'react';
2
- import { Autocomplete, AutocompleteRenderGroupParams, List, AutocompleteRenderInputParams } from '@mui/material';
3
- import { NsTypography, NsButton } from '../';
4
- import { NsAutocompleteProps, OptionsProps, ComponentBoxProps } from './types.d';
5
- import { StyledTextField } from './NsAutocomplete.styled';
6
-
7
- const renderOptionLabel = (option: OptionsProps) => option.value;
8
3
 
9
- const renderGroupBy = (option: OptionsProps) => option.group as string;
4
+ import { ClearButton } from './helper/ClearButton';
5
+ import { renderGroupBy, renderGroupName, renderOptionLabel } from './helper/renderGroupName';
6
+ import { SeeMoreButton } from './helper/SeeMoreButton';
7
+ import { StyledTextField } from './NsAutocomplete.styled';
8
+ import { ComponentBoxProps, NsAutocompleteProps, OptionsProps } from './types.d';
10
9
 
11
10
  const NsAutocomplete = ({
12
11
  id = 'custom_autocomplete_dropdown',
@@ -30,7 +29,7 @@ const NsAutocomplete = ({
30
29
  const listboxRef = useRef<HTMLUListElement | null>(null);
31
30
 
32
31
  useEffect(() => {
33
- if (listboxRef?.current && options.length > 0) {
32
+ if (listboxRef.current && options.length > 0) {
34
33
  listboxRef.current.scrollTop = scrollTopPosition;
35
34
  }
36
35
  }, [options, scrollTopPosition]);
@@ -44,7 +43,7 @@ const NsAutocomplete = ({
44
43
  [onSelect]
45
44
  );
46
45
 
47
- const handleInputChange = useCallback(
46
+ const onInputChange = useCallback(
48
47
  (event: React.SyntheticEvent, newInputValue: string) => {
49
48
  if (typeof onChange === 'function') {
50
49
  onChange(newInputValue);
@@ -59,82 +58,31 @@ const NsAutocomplete = ({
59
58
  placeholder={placeholder}
60
59
  InputProps={{
61
60
  ...params.InputProps,
61
+ className: 'styled-text-field',
62
62
  startAdornment: iconStart,
63
63
  endAdornment: iconEnd,
64
64
  }}
65
65
  />
66
66
  );
67
67
 
68
- // TODO: @vijayprathap need to check if we can remove object spread of ...props and ...params in renderInput
69
68
  const renderOption = (props: ComponentBoxProps, option: OptionsProps) => (
70
69
  <li {...props} key={props.id}>
71
70
  {OptionsUI ? <OptionsUI {...props} option={option} /> : null}
72
71
  </li>
73
72
  );
74
73
 
75
- const renderGroupName = ({ key, group, children }: AutocompleteRenderGroupParams) => (
76
- <li key={key}>
77
- {group ? (
78
- <NsTypography variant="p-m" weight="bold" className="p-3">
79
- {group}
80
- </NsTypography>
81
- ) : null}
82
- <ul className="p-0">{children}</ul>
83
- </li>
84
- );
85
-
86
- const renderClearButton = useCallback(() => {
87
- const { show, onClear, text = 'Clear Search' } = clear || {};
88
- if (!show) {
89
- return null;
90
- }
91
- return (
92
- <li className="text-right p-3">
93
- <NsButton onClick={onClear} data-testid="autocomplete-clear-id">
94
- <NsTypography variant="p-xs" weight="bold">
95
- {text}
96
- </NsTypography>
97
- </NsButton>
98
- </li>
99
- );
100
- }, [clear]);
101
-
102
- const handleSeeMore = useCallback(() => {
103
- const { onSeeMore } = seeMore || {};
104
- // Remember the current scroll position
105
- if (options?.length > 0 && listboxRef?.current) {
106
- const lastScrollPosition = listboxRef.current?.scrollTop;
107
- if (lastScrollPosition) {
108
- setScrollTopPosition(lastScrollPosition);
109
- }
110
- }
111
- if (onSeeMore && typeof onSeeMore === 'function') {
112
- onSeeMore();
113
- }
114
- }, [seeMore, options]);
115
-
116
- const renderSeeMoreButton = useCallback(() => {
117
- const { show, text = 'See More Results' } = seeMore || {};
118
- if (!show) {
119
- return null;
120
- }
121
-
122
- return (
123
- <li className="text-center p-3">
124
- <NsButton onClick={handleSeeMore} data-testid="autocomplete-loadmore-id">
125
- <NsTypography variant="p-xs" weight="bold">
126
- {text}
127
- </NsTypography>
128
- </NsButton>
129
- </li>
130
- );
131
- }, [seeMore, handleSeeMore]);
132
-
133
74
  const renderListBoxComponent = ({ children, ...otherProps }: ComponentBoxProps) => (
134
75
  <List {...otherProps} ref={listboxRef}>
135
- {renderClearButton()}
76
+ <ClearButton show={clear?.show} text={clear?.text} onClear={clear?.onClear} />
136
77
  {children}
137
- {renderSeeMoreButton()}
78
+ <SeeMoreButton
79
+ onSeeMore={seeMore?.onSeeMore}
80
+ show={seeMore?.show}
81
+ text={seeMore?.text}
82
+ options={options}
83
+ setScrollTopPosition={setScrollTopPosition}
84
+ listboxRef={listboxRef}
85
+ />
138
86
  </List>
139
87
  );
140
88
 
@@ -154,7 +102,7 @@ const NsAutocomplete = ({
154
102
  ListboxProps={{ scrollTopPosition } as HTMLAttributes<HTMLUListElement>} // Pass the current scroll position
155
103
  renderGroup={renderGroupName}
156
104
  onChange={handleSelect}
157
- onInputChange={handleInputChange}
105
+ onInputChange={onInputChange}
158
106
  value={value}
159
107
  inputValue={inputValue}
160
108
  filterOptions={
@@ -0,0 +1,22 @@
1
+ import { NsButton, NsTypography } from '../..';
2
+
3
+ type ClearButtonProps = {
4
+ text?: string;
5
+ show?: boolean;
6
+ onClear?(): void;
7
+ };
8
+ export const ClearButton = (props: ClearButtonProps) => {
9
+ const { show, onClear, text = 'Clear All' } = props ?? {};
10
+ if (!show) {
11
+ return null;
12
+ }
13
+ return (
14
+ <li className="text-right p-3">
15
+ <NsButton onClick={onClear} data-testid="autocomplete-clear-id">
16
+ <NsTypography variant="p-xs" weight="bold">
17
+ {text}
18
+ </NsTypography>
19
+ </NsButton>
20
+ </li>
21
+ );
22
+ };
@@ -0,0 +1,47 @@
1
+ import { Dispatch, MutableRefObject, SetStateAction, useCallback } from 'react';
2
+ import { NsButton, NsTypography } from '../..';
3
+
4
+ type SeeMoreButtonProps = {
5
+ text?: string;
6
+ show?: boolean;
7
+ onSeeMore?(): void;
8
+ options: any[];
9
+ setScrollTopPosition: Dispatch<SetStateAction<number>>;
10
+ listboxRef: MutableRefObject<HTMLUListElement | null>;
11
+ };
12
+
13
+ export const SeeMoreButton = (props: SeeMoreButtonProps) => {
14
+ const {
15
+ show = false,
16
+ text = 'See More Results',
17
+ onSeeMore,
18
+ options,
19
+ listboxRef,
20
+ setScrollTopPosition,
21
+ } = props || {};
22
+
23
+ const handleSeeMore = useCallback(() => {
24
+ /* Remember the current scroll position */
25
+ if (options?.length > 0 && listboxRef?.current) {
26
+ const lastScrollPosition = listboxRef.current?.scrollTop;
27
+ if (lastScrollPosition) {
28
+ setScrollTopPosition(lastScrollPosition);
29
+ }
30
+ }
31
+ if (onSeeMore && typeof onSeeMore === 'function') {
32
+ onSeeMore();
33
+ }
34
+ }, [listboxRef, onSeeMore, options?.length, setScrollTopPosition]);
35
+ if (!show) {
36
+ return null;
37
+ }
38
+ return (
39
+ <li className="text-center p-3">
40
+ <NsButton onClick={handleSeeMore} data-testid="autocomplete-loadmore-id">
41
+ <NsTypography variant="p-xs" weight="bold">
42
+ {text}
43
+ </NsTypography>
44
+ </NsButton>
45
+ </li>
46
+ );
47
+ };
@@ -0,0 +1,17 @@
1
+ import { AutocompleteRenderGroupParams } from '@mui/material';
2
+ import { NsTypography, OptionsProps } from '../..';
3
+
4
+ export const renderGroupName = ({ key, group, children }: AutocompleteRenderGroupParams) => (
5
+ <li key={key}>
6
+ {group ? (
7
+ <NsTypography variant="p-m" weight="bold" className="p-3">
8
+ {group}
9
+ </NsTypography>
10
+ ) : null}
11
+ <ul className="p-0">{children}</ul>
12
+ </li>
13
+ );
14
+
15
+ export const renderOptionLabel = (option: OptionsProps) => option.value;
16
+
17
+ export const renderGroupBy = (option: OptionsProps) => option.group as string;
@@ -0,0 +1,49 @@
1
+ import { NsAutocompleteProps, OptionsProps } from '../types';
2
+ import React, { useState } from 'react';
3
+
4
+ import { NsAutocomplete } from '..';
5
+ import { OptionUiComponent } from '../mock/MockUI';
6
+
7
+ const PAGE_SIZE = 6;
8
+
9
+ export const ACWithoutClose = (args: NsAutocompleteProps) => {
10
+ const [selectedOption, setSelectedOption] = useState<string | OptionsProps | null>(null);
11
+ const [searchTerms, setSearchTerms] = useState<string>('');
12
+ const [pageNo, setPageNo] = useState(PAGE_SIZE);
13
+
14
+ const onSeeMoreHandler = () => {
15
+ setPageNo(PAGE_SIZE + PAGE_SIZE);
16
+ };
17
+
18
+ const AutoCompleteProps = {
19
+ ...args,
20
+ seeMore: {
21
+ ...args.seeMore,
22
+ onSeeMore: onSeeMoreHandler,
23
+ },
24
+ } as NsAutocompleteProps;
25
+
26
+ const onSelect = (value: string | OptionsProps | null) => {
27
+ setSelectedOption(value);
28
+ setSearchTerms((value = ''));
29
+ };
30
+
31
+ const handleInputChange = (newValue: string) => {
32
+ setSearchTerms(newValue);
33
+ };
34
+
35
+ return (
36
+ <div>
37
+ <NsAutocomplete
38
+ {...AutoCompleteProps}
39
+ options={args.options.slice(0, pageNo)}
40
+ onChange={handleInputChange}
41
+ onSelect={onSelect}
42
+ OptionsUI={OptionUiComponent}
43
+ value={selectedOption}
44
+ inputValue={searchTerms}
45
+ iconEnd={undefined}
46
+ />
47
+ </div>
48
+ );
49
+ };
@@ -0,0 +1,76 @@
1
+ import React from 'react';
2
+
3
+ import type { StoryObj, Meta } from '@storybook/react';
4
+
5
+ import { withCenterDecorator } from '@/stories/decorators/withCenterDecorator';
6
+ import { NsAutocomplete } from '..';
7
+ import { AutocompleteMockList } from '../mock/MockData';
8
+ import { NsIcon } from '../../icon';
9
+ import { RenderAutoComplete } from './RenderAutoComplete';
10
+ import { ACWithoutClose } from './ACWithoutClose';
11
+
12
+ type ComponentType = typeof NsAutocomplete;
13
+ type Story = StoryObj<ComponentType>;
14
+ type MetaStory = Meta<ComponentType>;
15
+
16
+ export default {
17
+ title: 'Components/Inputs/NsAutocomplete',
18
+ component: NsAutocomplete,
19
+ decorators: [withCenterDecorator],
20
+ argTypes: {
21
+ children: {
22
+ control: 'text',
23
+ },
24
+ options: {
25
+ description: 'An array of objects representing the available options for the autocomplete.',
26
+ },
27
+ OptionsUI: {
28
+ description: '(optional): A custom component to render each option in the dropdown.',
29
+ },
30
+ loading: {
31
+ description: '(optional): A boolean indicating whether the autocomplete is in a loading state.',
32
+ },
33
+ noOptionsText: { description: '(optional): The text to display when there are no options available.' },
34
+ onSelect: { description: '(optional): A callback function to be called when an option is selected.' },
35
+ onChange: { description: '(optional): A callback function to be called when the input value changes.' },
36
+ clear: { description: '(optional): An object containing properties for the clear button.' },
37
+ seeMore: { description: '(optional): An object containing properties for the "see more" button.' },
38
+ placeholder: { description: '(optional): The placeholder text for the input field.' },
39
+ className: { description: '(optional): Additional CSS class name(s) for the autocomplete component.' },
40
+ iconStart: {
41
+ description: '(optional): An icon or React node to be displayed at the start of the input field.',
42
+ },
43
+ iconEnd: { description: '(optional): An icon or React node to be displayed at the end of the input field.' },
44
+ inputValue: { description: ' The current value of the input field.' },
45
+ value: { description: ': The currently selected option.' },
46
+ isFilterEnabled: { description: ' (optional): A boolean indicating whether filtering of options is enabled.' },
47
+ },
48
+ args: {
49
+ options: AutocompleteMockList,
50
+ seeMore: {
51
+ text: 'See More Results',
52
+ show: true,
53
+ onSeeMore: () => {
54
+ throw new Error('Function not implemented.');
55
+ },
56
+ },
57
+ clear: {
58
+ text: 'Clear Recent Searches',
59
+ show: true,
60
+ onClear: () => {
61
+ throw new Error('Function not implemented.');
62
+ },
63
+ },
64
+ iconStart: <NsIcon name="search" />,
65
+ iconEnd: <NsIcon name="roundedClose" size="small" colorOverride="#F5F5F5" />,
66
+ placeholder: 'search',
67
+ },
68
+ } as MetaStory;
69
+
70
+ export const Autocomplete: Story = {
71
+ render: RenderAutoComplete,
72
+ };
73
+
74
+ export const WithoutClose: Story = {
75
+ render: ACWithoutClose,
76
+ };
@@ -0,0 +1,60 @@
1
+ import { NsAutocompleteProps, OptionsProps } from '../types';
2
+ import { IconButton } from '@mui/material';
3
+ import React, { useState } from 'react';
4
+
5
+ import { NsAutocomplete } from '..';
6
+ import { NsIcon } from '../../icon';
7
+ import { OptionUiComponent } from '../mock/MockUI';
8
+
9
+ const PAGE_SIZE = 6;
10
+
11
+ export const RenderAutoComplete = (args: NsAutocompleteProps) => {
12
+ const [selectedOption, setSelectedOption] = useState<string | OptionsProps | null>(null);
13
+ const [searchTerms, setSearchTerms] = useState<string>('');
14
+ const [pageNo, setPageNo] = useState(PAGE_SIZE);
15
+
16
+ const onSeeMoreHandler = () => {
17
+ setPageNo(PAGE_SIZE + PAGE_SIZE);
18
+ };
19
+
20
+ const AutoCompleteProps = {
21
+ ...args,
22
+ seeMore: {
23
+ ...args.seeMore,
24
+ onSeeMore: onSeeMoreHandler,
25
+ },
26
+ } as NsAutocompleteProps;
27
+
28
+ const onSelect = (value: string | OptionsProps | null) => {
29
+ setSelectedOption(value);
30
+ setSearchTerms((value = ''));
31
+ };
32
+
33
+ const handleInputChange = (newValue: string) => {
34
+ setSearchTerms(newValue);
35
+ };
36
+
37
+ const onInputClear = () => {
38
+ setSelectedOption(null);
39
+ setSearchTerms('');
40
+ };
41
+
42
+ return (
43
+ <div>
44
+ <NsAutocomplete
45
+ {...AutoCompleteProps}
46
+ options={args.options.slice(0, pageNo)}
47
+ onChange={handleInputChange}
48
+ onSelect={onSelect}
49
+ OptionsUI={OptionUiComponent}
50
+ iconEnd={
51
+ <IconButton onClick={onInputClear}>
52
+ <NsIcon name="roundedClose" size="xLarge" colorOverride="#F5F5F5" />
53
+ </IconButton>
54
+ }
55
+ value={selectedOption}
56
+ inputValue={searchTerms}
57
+ />
58
+ </div>
59
+ );
60
+ };
@@ -31,7 +31,7 @@ export type NsAutocompleteProps = {
31
31
  iconEnd?: string | React.ReactNode;
32
32
  inputValue: string;
33
33
  value: string | OptionsProps | null;
34
- isFilterEnabled?:boolean
34
+ isFilterEnabled?: boolean;
35
35
  } & AdditionalProps;
36
36
 
37
37
  export type ListUiProps = {
@@ -21,6 +21,7 @@ import UserIcon from './icons/UserIcon';
21
21
  import HamburgerIcon from './icons/HamburgerIcon';
22
22
  import UserOutline from './icons/UserOutline';
23
23
  import Check from './icons/Check';
24
+ import RoundedClose from './icons/RoundedClose';
24
25
  import ChevronRight from './icons/ChevronRight';
25
26
 
26
27
  const IconVariants = {
@@ -47,6 +48,7 @@ const IconVariants = {
47
48
  userIcon: UserIcon,
48
49
  userOutline: UserOutline,
49
50
  warning: WarningIcon,
51
+ roundedClose: RoundedClose,
50
52
  chevronRight: ChevronRight,
51
53
  };
52
54
 
@@ -0,0 +1,28 @@
1
+ /* eslint-disable max-len */
2
+
3
+ import { SvgIconProps, SvgIcon } from '@mui/material';
4
+
5
+ const RoundedClose = (props: SvgIconProps) => {
6
+ return (
7
+ <SvgIcon
8
+ viewBox="0 0 20 20"
9
+ fill="none"
10
+ xmlns="http://www.w3.org/2000/svg"
11
+ {...props}
12
+ data-testid="roundedClose"
13
+ >
14
+ <path
15
+ d="M4.4443 18.3147C6.08879 19.4135 8.02219 20 10 20C12.6505 19.9946 15.1909 18.9393 17.0651 17.0651C18.9393 15.1909 19.9946 12.6505 20 10C20 8.02219 19.4135 6.08879 18.3147 4.4443C17.2159 2.79981 15.6541 1.51809 13.8268 0.761209C11.9996 0.00433284 9.98891 -0.1937 8.0491 0.192152C6.10929 0.578004 4.32746 1.53041 2.92893 2.92894C1.53041 4.32746 0.578004 6.10929 0.192152 8.0491C-0.1937 9.98891 0.00433242 11.9996 0.761209 13.8268C1.51809 15.6541 2.79981 17.2159 4.4443 18.3147Z"
16
+ fill={props.color}
17
+ />
18
+ <path
19
+ fillRule="evenodd"
20
+ clipRule="evenodd"
21
+ d="M6.18907 6.11091C6.5796 5.72039 7.21276 5.72039 7.60329 6.11091L10.0782 8.58579L12.553 6.11091C12.9436 5.72039 13.5767 5.72039 13.9672 6.11091C14.3578 6.50144 14.3578 7.1346 13.9672 7.52513L11.4924 10L13.9672 12.4749C14.3578 12.8654 14.3578 13.4986 13.9672 13.8891C13.5767 14.2796 12.9436 14.2796 12.553 13.8891L10.0782 11.4142L7.60329 13.8891C7.21276 14.2796 6.5796 14.2796 6.18908 13.8891C5.79855 13.4986 5.79855 12.8654 6.18907 12.4749L8.66395 10L6.18907 7.52513C5.79855 7.1346 5.79855 6.50144 6.18907 6.11091Z"
22
+ fill="#252525"
23
+ />
24
+ </SvgIcon>
25
+ );
26
+ };
27
+
28
+ export default RoundedClose;
@@ -1,6 +1,6 @@
1
1
  import { Box } from '@mui/material';
2
2
  import { styled, nuskinTheme, ColorUtils, FoundationTheme } from '@nuskin/foundation-theme';
3
- import {fieldStateType} from './types.d';
3
+ import { fieldStateType } from './types.d';
4
4
 
5
5
  const { isDarkMode } = ColorUtils;
6
6
  const { colors } = nuskinTheme;
@@ -1,108 +0,0 @@
1
- /**
2
- * @author [Vijayaprathap Kumar] (vpkumar@nuskin.com)
3
- * NsAutocomplete.stories.tsx
4
- * @description NsAutocomplete component.
5
- */
6
-
7
- import React, { useState } from 'react';
8
- import type { StoryObj, Meta } from '@storybook/react';
9
-
10
- import { withCenterDecorator } from '@/stories/decorators/withCenterDecorator';
11
- import { NsAutocomplete } from './';
12
- import { AutocompleteMockList } from './mock/MockData';
13
- import { OptionUiComponent } from './mock/MockUI';
14
- import { NsAutocompleteProps, OptionsProps } from './types.d';
15
- import { NsIcon } from '../icon';
16
- import { IconButton } from '@mui/material';
17
-
18
- type ComponentType = typeof NsAutocomplete;
19
- type Story = StoryObj<ComponentType>;
20
- type MetaStory = Meta<ComponentType>;
21
-
22
- const PAGE_SIZE = 6;
23
-
24
- export default {
25
- title: 'Components/Inputs/NsAutocomplete',
26
- component: NsAutocomplete,
27
- decorators: [withCenterDecorator],
28
- argTypes: {
29
- children: {
30
- control: 'text',
31
- },
32
- },
33
- args: {
34
- options: AutocompleteMockList,
35
- seeMore: {
36
- text: 'See More Results',
37
- show: true,
38
- onSeeMore: () => {
39
- throw new Error('Function not implemented.');
40
- },
41
- },
42
- clear: {
43
- text: 'Clear Recent Searches',
44
- show: true,
45
- onClear: () => {
46
- throw new Error('Function not implemented.');
47
- },
48
- },
49
- iconStart: <NsIcon name="search" />,
50
- iconEnd: <NsIcon name="close" size="small" />,
51
- placeholder: 'search',
52
- },
53
- } as MetaStory;
54
-
55
- const RenderAutocomplete = (args: NsAutocompleteProps) => {
56
- const [selectedOption, setSelectedOption] = useState<string | OptionsProps | null>(null);
57
- const [searchTerms, setSearchTerms] = useState<string>('');
58
- const [pageNo, setPageNo] = useState(PAGE_SIZE);
59
-
60
- const onSeeMoreHandler = () => {
61
- setPageNo(PAGE_SIZE + PAGE_SIZE);
62
- };
63
-
64
- const AutoCompleteProps = {
65
- ...args,
66
- seeMore: {
67
- ...args.seeMore,
68
- onSeeMore: onSeeMoreHandler,
69
- },
70
- } as NsAutocompleteProps;
71
-
72
- const onSelect = (value: string | OptionsProps | null) => {
73
- setSelectedOption(value);
74
- setSearchTerms((value = ''));
75
- };
76
-
77
- const handleInputChange = (newValue: string) => {
78
- setSearchTerms(newValue);
79
- };
80
-
81
- const onInputClear = () => {
82
- setSelectedOption(null);
83
- setSearchTerms('');
84
- };
85
-
86
- return (
87
- <div>
88
- <NsAutocomplete
89
- {...AutoCompleteProps}
90
- options={args.options.slice(0, pageNo)}
91
- onChange={handleInputChange}
92
- onSelect={onSelect}
93
- OptionsUI={OptionUiComponent}
94
- iconEnd={
95
- <IconButton onClick={onInputClear}>
96
- <NsIcon name="close" size="small" />
97
- </IconButton>
98
- }
99
- value={selectedOption}
100
- inputValue={searchTerms}
101
- />
102
- </div>
103
- );
104
- };
105
-
106
- export const Autocomplete: Story = {
107
- render: RenderAutocomplete,
108
- };