@nuskin/foundation-ui-components 1.19.0 → 1.19.2
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,12 +1,29 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import React, {
|
|
2
|
+
PropsWithChildren,
|
|
3
|
+
useEffect,
|
|
4
|
+
useRef,
|
|
5
|
+
useState,
|
|
6
|
+
} from 'react';
|
|
7
|
+
|
|
8
|
+
import {
|
|
9
|
+
Autocomplete,
|
|
10
|
+
AutocompleteRenderInputParams,
|
|
11
|
+
} from '@mui/material';
|
|
3
12
|
|
|
4
13
|
import { LineLoader } from './helper/LineLoader';
|
|
5
14
|
import { RecentClearAll } from './helper/RecentClearAll';
|
|
6
|
-
import {
|
|
15
|
+
import {
|
|
16
|
+
renderGroupBy,
|
|
17
|
+
renderGroupName,
|
|
18
|
+
renderOptionLabel,
|
|
19
|
+
} from './helper/renderGroupName';
|
|
7
20
|
import { SeeMoreButton } from './helper/SeeMoreButton';
|
|
8
21
|
import { StyledTextField } from './NsAutocomplete.styled';
|
|
9
|
-
import {
|
|
22
|
+
import {
|
|
23
|
+
ComponentBoxProps,
|
|
24
|
+
NsAutocompleteProps,
|
|
25
|
+
OptionsProps,
|
|
26
|
+
} from './types.d';
|
|
10
27
|
|
|
11
28
|
const noop = () => {};
|
|
12
29
|
const NsAutocomplete = ({
|
|
@@ -38,7 +55,7 @@ const NsAutocomplete = ({
|
|
|
38
55
|
|
|
39
56
|
const renderInput = (params: AutocompleteRenderInputParams) => (
|
|
40
57
|
<StyledTextField
|
|
41
|
-
{...params}
|
|
58
|
+
{...(params as any)}
|
|
42
59
|
placeholder={placeholder}
|
|
43
60
|
InputProps={{
|
|
44
61
|
...params.InputProps,
|
|
@@ -53,7 +70,7 @@ const NsAutocomplete = ({
|
|
|
53
70
|
OptionsUI ? (
|
|
54
71
|
<OptionsUI {...props} option={option} key={props.id} />
|
|
55
72
|
) : (
|
|
56
|
-
<li {...props} key={props.id}>
|
|
73
|
+
<li {...(props as any)} key={props.id}>
|
|
57
74
|
{option.value}
|
|
58
75
|
</li>
|
|
59
76
|
);
|
|
@@ -56,7 +56,6 @@ const CardContainer = styled(Box)<{ fluid: boolean; variant: string }>(({ fluid,
|
|
|
56
56
|
'.subtitle': {
|
|
57
57
|
fontSize: '16px',
|
|
58
58
|
fontWeight: '400',
|
|
59
|
-
marginTop: '10px 0 20px',
|
|
60
59
|
},
|
|
61
60
|
'.title': {
|
|
62
61
|
fontSize: '20px',
|
|
@@ -94,7 +93,7 @@ export default function NsMediumCard({
|
|
|
94
93
|
<NsTypography variant="h5" color="primary" className="title" weight={titleFontWeight}>
|
|
95
94
|
{title}
|
|
96
95
|
</NsTypography>
|
|
97
|
-
<article className="subtitle">{subtitle}</article>
|
|
96
|
+
<article className="subtitle mt-3 mb-5">{subtitle}</article>
|
|
98
97
|
{button ? <CardButton {...button} showArrowWithText={showArrowWithButtonText} /> : null}
|
|
99
98
|
</div>
|
|
100
99
|
</CardContainer>
|