@nuskin/foundation-ui-components 1.29.1 → 1.30.0

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.
Files changed (163) hide show
  1. package/package.json +1 -7
  2. package/src/common/accordion/NsAccordion.tsx +2 -2
  3. package/src/common/accordion/NsAccordionHeader.tsx +2 -9
  4. package/src/common/accordion/NsAccordionItem.tsx +4 -3
  5. package/src/common/accordion/NsCollapse.tsx +1 -1
  6. package/src/common/accordion/NsToggleSection.tsx +10 -3
  7. package/src/common/accordion/stories/NsAccordionItem.stories.tsx +5 -3
  8. package/src/common/accordion/stories/NsCollapse.stories.tsx +5 -3
  9. package/src/common/alert/NsAlert.stories.tsx +6 -4
  10. package/src/common/alert/NsAlert.tsx +27 -13
  11. package/src/common/auth-dropdown/NsAuthDropdown.tsx +7 -7
  12. package/src/common/autocomplete/NsAutocomplete.spec.tsx +3 -3
  13. package/src/common/autocomplete/NsAutocomplete.tsx +2 -1
  14. package/src/common/autocomplete/helper/SeeMoreButton.tsx +2 -2
  15. package/src/common/autocomplete/helper/renderGroupName.tsx +4 -3
  16. package/src/common/autocomplete/stories/NsAutocomplete.stories.tsx +9 -9
  17. package/src/common/banner/NsBanner.spec.tsx +5 -5
  18. package/src/common/banner/NsBanner.stories.tsx +8 -5
  19. package/src/common/banner/NsBanner.tsx +10 -20
  20. package/src/common/banner/types.d.ts +2 -2
  21. package/src/common/brand-components/NsBrandComponent.tsx +6 -3
  22. package/src/common/brand-components/icons/NSLogoHorizontal.tsx +7 -2
  23. package/src/common/brand-components/icons/NSLogoMark.tsx +3 -1
  24. package/src/common/brand-components/icons/NSLogoPoweredBy.tsx +4 -2
  25. package/src/common/brand-components/icons/NSLogoStacked.tsx +4 -2
  26. package/src/common/brand-components/icons/NSWordMark.tsx +4 -2
  27. package/src/common/breadcrumb/NsBreadcrumb.tsx +20 -5
  28. package/src/common/button/NsButton.stories.tsx +14 -8
  29. package/src/common/button/NsButton.tsx +7 -4
  30. package/src/common/card/CardButton.tsx +4 -3
  31. package/src/common/card/NsAwardCard.tsx +9 -8
  32. package/src/common/card/NsBgCard.tsx +1 -0
  33. package/src/common/card/NsBrandCard.tsx +8 -5
  34. package/src/common/card/NsBrandWrapper.tsx +3 -2
  35. package/src/common/card/NsCheckoutCard.tsx +4 -2
  36. package/src/common/card/NsHeroCardLevel1.tsx +9 -9
  37. package/src/common/card/NsHeroCardLevel2.tsx +9 -9
  38. package/src/common/card/NsIconText.tsx +3 -2
  39. package/src/common/card/NsLargeCard.tsx +9 -9
  40. package/src/common/card/NsMediumCard.tsx +10 -9
  41. package/src/common/card/NsPost.tsx +7 -8
  42. package/src/common/card/NsSmallFullCard.tsx +9 -9
  43. package/src/common/card/NsXLargeCard.tsx +9 -9
  44. package/src/common/card/fixtures/ImageData1.ts +38 -0
  45. package/src/common/card/fixtures/ImageData2.ts +38 -0
  46. package/src/common/card/specs/NsAwardCard.spec.tsx +2 -2
  47. package/src/common/card/specs/NsHeroCardLevel1.spec.tsx +2 -3
  48. package/src/common/card/specs/NsHeroCardLevel2.spec.tsx +2 -2
  49. package/src/common/card/specs/NsLargeCard.spec.tsx +2 -3
  50. package/src/common/card/specs/NsMediumCard.spec.tsx +3 -3
  51. package/src/common/card/specs/NsPost.spec.tsx +3 -3
  52. package/src/common/card/specs/NsSmallFullCard.spec.tsx +3 -3
  53. package/src/common/card/specs/NsXLargeCard.spec.tsx +3 -3
  54. package/src/common/card/stories/NsAwardCard.stories.tsx +2 -4
  55. package/src/common/card/stories/NsHeroCardLevel1.stories.tsx +2 -4
  56. package/src/common/card/stories/NsHeroCardLevel2.stories.tsx +2 -4
  57. package/src/common/card/stories/NsLargeCard.stories.tsx +2 -4
  58. package/src/common/card/stories/NsMediumCard.stories.tsx +2 -4
  59. package/src/common/card/stories/NsPost.stories.tsx +2 -4
  60. package/src/common/card/stories/NsSmallFullCard.stories.tsx +2 -4
  61. package/src/common/card/stories/NsXLargeCard.stories.tsx +4 -5
  62. package/src/common/carousal/CarousalControl.tsx +5 -2
  63. package/src/common/carousal/IconWrapper.tsx +4 -3
  64. package/src/common/carousal/NsCarousal.tsx +8 -6
  65. package/src/common/carousal/NsScrollingCarousal.tsx +2 -2
  66. package/src/common/carousal/RenderBrand.tsx +3 -1
  67. package/src/common/carousal/specs/NsScrollingCarousal.spec.tsx +4 -2
  68. package/src/common/carousal/stories/{NSCarousal.stories.tsx → NsCarousal1.stories.tsx} +5 -2
  69. package/src/common/carousal/stories/NsScrollingCarousal.stories.tsx +4 -2
  70. package/src/common/cart-icon/NsCartIcon.tsx +9 -1
  71. package/src/common/checkbox/NsCheckbox.stories.tsx +5 -4
  72. package/src/common/checkbox/NsCheckbox.tsx +6 -6
  73. package/src/common/column-control/NsColumnControl.tsx +5 -3
  74. package/src/common/column-control/NsFlexColumns.tsx +10 -3
  75. package/src/common/column-control/NsGridColumns.tsx +10 -3
  76. package/src/common/column-control/stories/NsColumnControl.stories.tsx +8 -5
  77. package/src/common/column-control/stories/NsFlexColumns.stories.tsx +9 -6
  78. package/src/common/column-control/stories/NsGridColumns.stories.tsx +19 -7
  79. package/src/common/column-control/styled/common.ts +1 -1
  80. package/src/common/dropdown/NsDropdown.tsx +6 -6
  81. package/src/common/dropdown/NsDropdownOption.tsx +4 -3
  82. package/src/common/dropdown/stories/NsDropdown.stories.tsx +5 -3
  83. package/src/common/email-simple/NsEmailSimple.tsx +4 -3
  84. package/src/common/flag/NsFlag.tsx +3 -2
  85. package/src/common/hooks/useAccordionMap.tsx +1 -1
  86. package/src/common/icon/NsIcon.tsx +2 -5
  87. package/src/common/icon/icons/AlertErrorIcon.tsx +3 -1
  88. package/src/common/icon/icons/ArrowDown.tsx +7 -2
  89. package/src/common/icon/icons/ArrowLeft.tsx +7 -2
  90. package/src/common/icon/icons/ArrowRight.tsx +7 -2
  91. package/src/common/icon/icons/ArrowUp.tsx +4 -2
  92. package/src/common/icon/icons/Cart.tsx +7 -2
  93. package/src/common/icon/icons/CartBadge.tsx +7 -2
  94. package/src/common/icon/icons/Check.tsx +7 -2
  95. package/src/common/icon/icons/CheckShield.tsx +4 -2
  96. package/src/common/icon/icons/CheckVerified.tsx +7 -2
  97. package/src/common/icon/icons/ChevronRight.tsx +9 -4
  98. package/src/common/icon/icons/CloseIcon.tsx +7 -2
  99. package/src/common/icon/icons/ErrorIcon.tsx +3 -1
  100. package/src/common/icon/icons/HamburgerIcon.tsx +4 -1
  101. package/src/common/icon/icons/InfoFilled.tsx +7 -2
  102. package/src/common/icon/icons/InfoOutlined.tsx +7 -2
  103. package/src/common/icon/icons/RoundedClose.tsx +7 -2
  104. package/src/common/icon/icons/SearchIcon.tsx +3 -1
  105. package/src/common/icon/icons/SlashIcon.tsx +7 -2
  106. package/src/common/icon/icons/SuccessIcon.tsx +3 -1
  107. package/src/common/icon/icons/TrashIcon.tsx +3 -1
  108. package/src/common/icon/icons/UserIcon.tsx +4 -1
  109. package/src/common/icon/icons/UserOutline.tsx +3 -1
  110. package/src/common/icon/icons/WarningIcon.tsx +3 -1
  111. package/src/common/icon/icons/home.tsx +4 -2
  112. package/src/common/image/BynderMedia.spec.tsx +42 -0
  113. package/src/common/image/BynderMedia.tsx +48 -0
  114. package/src/common/image/NsImage.tsx +3 -3
  115. package/src/common/image/NsNextImage.tsx +5 -2
  116. package/src/common/image/bynder-util.spec.ts +187 -0
  117. package/src/common/image/bynder-util.ts +98 -0
  118. package/src/common/image/index.ts +1 -1
  119. package/src/common/image/types.ts +78 -0
  120. package/src/common/input/InputWrapper.tsx +2 -1
  121. package/src/common/input/NsInputField.tsx +11 -3
  122. package/src/common/label/NsLabel.tsx +9 -4
  123. package/src/common/link/NsLink.stories.tsx +9 -5
  124. package/src/common/link/NsLink.tsx +9 -3
  125. package/src/common/modal/NsModal.tsx +2 -2
  126. package/src/common/modal/helper-component/NsModalContentBox.tsx +8 -3
  127. package/src/common/modal/helper-component/NsModalDefault.tsx +9 -2
  128. package/src/common/modal/helper-component/NsModalStatus.tsx +3 -1
  129. package/src/common/modal/helper-component/NsModalStatusIcon.tsx +2 -2
  130. package/src/common/modal/helper-component/NsModalTitle.tsx +6 -3
  131. package/src/common/modal/stories/NsModal.stories.tsx +9 -7
  132. package/src/common/nav-product-card/NsNavProductCard.spec.tsx +3 -5
  133. package/src/common/nav-product-card/NsNavProductCard.stories.tsx +4 -4
  134. package/src/common/nav-product-card/NsNavProductCard.tsx +6 -6
  135. package/src/common/nav-product-card/types.d.ts +2 -1
  136. package/src/common/nav-tab/NavDrawer.tsx +10 -3
  137. package/src/common/nav-tab/NavTitles.tsx +2 -2
  138. package/src/common/nav-tab/NsNavTab.tsx +10 -4
  139. package/src/common/progress/NsProgress.stories.tsx +6 -3
  140. package/src/common/progress/NsProgress.tsx +3 -3
  141. package/src/common/radiogroup/NsRadioGroup.tsx +4 -2
  142. package/src/common/search-bar/NsSearchBar.tsx +3 -2
  143. package/src/common/select/DefaultRenderOption.tsx +3 -1
  144. package/src/common/select/NsSelect.tsx +19 -6
  145. package/src/common/select/NsSelectOption.tsx +2 -2
  146. package/src/common/select/stories/NsSelect.stories.tsx +5 -4
  147. package/src/common/spinner/NsSpinner.stories.tsx +5 -2
  148. package/src/common/spinner/NsSpinner.tsx +3 -2
  149. package/src/common/spinner/icons/Spinner.tsx +3 -1
  150. package/src/common/table/NsExpandableRow.tsx +35 -41
  151. package/src/common/table/NsTable.stories.tsx +17 -23
  152. package/src/common/table/NsTable.tsx +27 -10
  153. package/src/common/table/NsTableHeader.tsx +18 -5
  154. package/src/common/table/NsTablePagination.tsx +7 -11
  155. package/src/common/text-strip/NsTextStrip.tsx +6 -3
  156. package/src/common/toast/Fade.tsx +5 -8
  157. package/src/common/toast/ToastProvider.tsx +18 -17
  158. package/src/common/toast/specs/Toast.spec.tsx +56 -64
  159. package/src/common/toast/stories/Toast.stories.tsx +12 -11
  160. package/src/common/typography/GlobalFontInter.tsx +7 -2
  161. package/src/common/typography/NsTypography.tsx +11 -4
  162. package/src/common/videos/NsVideo.tsx +5 -2
  163. package/src/common/image/types.d.ts +0 -30
@@ -1,8 +1,11 @@
1
- import type { StoryObj, Meta } from '@storybook/react';
2
- import { withCenterDecorator } from '@/stories/decorators/withCenterDecorator';
1
+ import { ReactElement } from 'react';
2
+
3
3
  import { NsColumnControl } from '@/common/index';
4
- import { DivArray } from './DivArray';
4
+ import { withCenterDecorator } from '@/stories/decorators/withCenterDecorator';
5
+ import type { Meta, StoryObj } from '@storybook/react';
6
+
5
7
  import { childrenMapping, selectDivOptions } from './common';
8
+ import { DivArray } from './DivArray';
6
9
 
7
10
  type ComponentType = typeof NsColumnControl;
8
11
  type Story = StoryObj<ComponentType>;
@@ -22,13 +25,13 @@ export default {
22
25
  type: 'select',
23
26
  options: selectDivOptions,
24
27
  },
25
- defaultValue: <DivArray elementsCount={8} />,
28
+ defaultValue: (<DivArray elementsCount={8} />) as ReactElement,
26
29
  mapping: childrenMapping,
27
30
  },
28
31
  },
29
32
  args: {
30
33
  columnClass: 'ns-col-lg-1-1-1 ns-col-md-1-1 ns-col-sm-1',
31
- children: <DivArray elementsCount={12} />,
34
+ children: (<DivArray elementsCount={12} />) as ReactElement,
32
35
  },
33
36
  } as MetaStory;
34
37
 
@@ -1,8 +1,11 @@
1
- import type { StoryObj, Meta } from '@storybook/react';
1
+ import { ReactElement } from 'react';
2
+
2
3
  import { withCenterDecorator } from '@/stories/decorators/withCenterDecorator';
3
- import { NsFlexColumns } from '..';
4
- import { DivArray, DivArrayRandom } from './DivArray';
4
+ import type { Meta, StoryObj } from '@storybook/react';
5
+
6
+ import { NsFlexColumns } from '../';
5
7
  import { childrenMapping, selectDivOptions } from './common';
8
+ import { DivArray, DivArrayRandom } from './DivArray';
6
9
 
7
10
  type ComponentType = typeof NsFlexColumns;
8
11
  type Story = StoryObj<ComponentType>;
@@ -26,19 +29,19 @@ export default {
26
29
  type: 'select',
27
30
  options: selectDivOptions,
28
31
  },
29
- defaultValue: <DivArrayRandom elementsCount={8} />,
32
+ defaultValue: (<DivArrayRandom elementsCount={8} />) as ReactElement,
30
33
  mapping: childrenMapping,
31
34
  },
32
35
  },
33
36
  args: {
34
37
  columnClass: '',
35
- children: <DivArrayRandom elementsCount={12} />,
38
+ children: (<DivArrayRandom elementsCount={12} />) as ReactElement,
36
39
  },
37
40
  } as MetaStory;
38
41
 
39
42
  export const DefaultColumnControl: Story = {
40
43
  args: {
41
- children: <DivArray elementsCount={8} />,
44
+ children: (<DivArray elementsCount={8} />) as ReactElement,
42
45
  },
43
46
  };
44
47
  export const TwoColumn11: Story = {
@@ -1,8 +1,20 @@
1
- import type { StoryObj, Meta } from '@storybook/react';
1
+ import { ReactElement } from 'react';
2
+
2
3
  import { withCenterDecorator } from '@/stories/decorators/withCenterDecorator';
3
- import { NsGridColumns } from '..';
4
- import { DivArray, DivArrayRandom } from './DivArray';
5
- import { childrenMapping, selectDivOptions } from './common';
4
+ import type {
5
+ Meta,
6
+ StoryObj,
7
+ } from '@storybook/react';
8
+
9
+ import { NsGridColumns } from '../';
10
+ import {
11
+ childrenMapping,
12
+ selectDivOptions,
13
+ } from './common';
14
+ import {
15
+ DivArray,
16
+ DivArrayRandom,
17
+ } from './DivArray';
6
18
 
7
19
  type ComponentType = typeof NsGridColumns;
8
20
  type Story = StoryObj<ComponentType>;
@@ -26,19 +38,19 @@ export default {
26
38
  type: 'select',
27
39
  options: selectDivOptions,
28
40
  },
29
- defaultValue: <DivArrayRandom elementsCount={8} />,
41
+ defaultValue: (<DivArrayRandom elementsCount={8} />) as ReactElement,
30
42
  mapping: childrenMapping,
31
43
  },
32
44
  },
33
45
  args: {
34
46
  columnClass: '',
35
- children: <DivArrayRandom elementsCount={12} />,
47
+ children: (<DivArrayRandom elementsCount={12} />) as ReactElement,
36
48
  },
37
49
  } as MetaStory;
38
50
 
39
51
  export const DefaultColumnControl: Story = {
40
52
  args: {
41
- children: <DivArray elementsCount={8} />,
53
+ children: (<DivArray elementsCount={8} />) as ReactElement,
42
54
  },
43
55
  };
44
56
  export const TwoColumn11: Story = {
@@ -20,7 +20,7 @@ export const commonStyles = {
20
20
  ['1','1'] => ['40%','40%']
21
21
  ['1','2'] => ['27%','53%']
22
22
  */
23
- export function getPercentArray(fractionArray?: string[] | number[]) {
23
+ export function getPercentArray(fractionArray?: string[] | number[]): string[] {
24
24
  const numbers = fractionArray?.map((numberString) => +numberString)?.filter((num) => 0 < num && num < 10) ?? [];
25
25
  const sum = numbers.reduce((currentSum, currentNumber) => currentSum + currentNumber, 0);
26
26
  return numbers.map((currentNumber) => ((currentNumber / sum) * 80).toFixed(2) + '%');
@@ -1,15 +1,15 @@
1
- import React, { useCallback, useRef, useState } from 'react';
1
+ import React, { ReactElement, useCallback, useRef, useState } from 'react';
2
2
 
3
+ import { useOnClickOutside } from '../hooks/useOnClickOutside';
4
+ import { NsIcon } from '../icon';
3
5
  import {
4
- DropdownContainer,
5
6
  DropdownButton,
6
- DropdownList,
7
+ DropdownContainer,
7
8
  DropdownHead,
9
+ DropdownList,
8
10
  DropdownOptionContainer,
9
11
  } from './NsDropdown.styled';
10
- import { NsIcon } from '../icon';
11
12
  import { DropdownProps } from './types.d';
12
- import { useOnClickOutside } from '../hooks/useOnClickOutside';
13
13
 
14
14
  const NsDropdown: React.FC<DropdownProps> = ({
15
15
  selectedLabel,
@@ -21,7 +21,7 @@ const NsDropdown: React.FC<DropdownProps> = ({
21
21
  closeOnMouseLeave = false,
22
22
  className,
23
23
  placeholder,
24
- }) => {
24
+ }): ReactElement => {
25
25
  const [isOpen, setIsOpen] = useState(false);
26
26
  const dropdownRef = useRef<HTMLDivElement | null>(null);
27
27
 
@@ -1,8 +1,9 @@
1
- import React from 'react';
2
- import { DropdownOptionProps } from './types.d';
1
+ import React, { ReactElement } from 'react';
2
+
3
3
  import { ListItem } from './NsDropdown.styled';
4
+ import { DropdownOptionProps } from './types.d';
4
5
 
5
- export const NsDropdownOption: React.FC<DropdownOptionProps> = ({ value, children }) => {
6
+ export const NsDropdownOption: React.FC<DropdownOptionProps> = ({ value, children }): ReactElement => {
6
7
  return (
7
8
  <ListItem data-testid={`option-${value}`} id="dropdown-item">
8
9
  {children}
@@ -1,7 +1,9 @@
1
- import React, { useState } from 'react';
1
+ import React, { ReactElement, useState } from 'react';
2
+
3
+ import { withCenterDecorator } from '@/stories/decorators/withCenterDecorator';
2
4
  import type { Meta, StoryObj } from '@storybook/react';
5
+
3
6
  import { NsDropdown, NsDropdownOption } from '../';
4
- import { withCenterDecorator } from '@/stories/decorators/withCenterDecorator';
5
7
 
6
8
  type ComponentType = typeof NsDropdown;
7
9
  type Story = StoryObj<ComponentType>;
@@ -38,7 +40,7 @@ export default {
38
40
  },
39
41
  } as MetaStory;
40
42
 
41
- const RenderStory = (args: any, context: any) => {
43
+ const RenderStory = (args: any, context: any): ReactElement => {
42
44
  const [selectedLabel, setSelectedLabel] = useState(args.selectedLabel);
43
45
 
44
46
  const options = context.parameters.options;
@@ -1,10 +1,11 @@
1
- import React, { useState } from 'react';
2
- import { NsEmailSimpleProps } from './types';
1
+ import React, { ReactElement, useState } from 'react';
2
+
3
3
  import { NsInputField } from '../input';
4
4
  import { fieldStateType } from '../input/types';
5
5
  import { emailPattern } from '../validations/regex';
6
+ import { NsEmailSimpleProps } from './types';
6
7
 
7
- const NsEmailSimple = (props: NsEmailSimpleProps) => {
8
+ const NsEmailSimple = (props: NsEmailSimpleProps): ReactElement => {
8
9
  const {
9
10
  disabled,
10
11
  label,
@@ -4,11 +4,12 @@
4
4
  * @description NsFlag component with a themed background
5
5
  */
6
6
 
7
- import React, { PropsWithChildren } from 'react';
7
+ import React, { PropsWithChildren, ReactElement } from 'react';
8
+
8
9
  import { StyledFlag } from './NsFlag.styled';
9
10
  import { NsFlagProps } from './types.d';
10
11
 
11
- const NsFlag = (props: PropsWithChildren<NsFlagProps>) => {
12
+ const NsFlag = (props: PropsWithChildren<NsFlagProps>): ReactElement | null => {
12
13
  const { className = '', size = 'small', color = 'accentColorA', message, testId = 'ns-flag-component' } = props;
13
14
  if (!message) {
14
15
  return null;
@@ -1,4 +1,4 @@
1
- import { useState, useEffect, useCallback } from 'react';
1
+ import { useCallback, useEffect, useState } from 'react';
2
2
 
3
3
  type ItemMap = Record<string, boolean>;
4
4
  type UseAccordionProp = {
@@ -5,10 +5,7 @@ import { ColorUtils } from '@nuskin/foundation-theme';
5
5
 
6
6
  import { IconWrapper } from './NsIcon.styled';
7
7
  import IconVariants from './NsIconVariants';
8
- import {
9
- NsIconNameType,
10
- NsIconProps,
11
- } from './types.d';
8
+ import { NsIconNameType, NsIconProps } from './types.d';
12
9
 
13
10
  const { paletteColor } = ColorUtils;
14
11
 
@@ -22,7 +19,7 @@ const NsIcon = ({
22
19
  onClick = () => {},
23
20
  cursor = 'pointer',
24
21
  ...rest
25
- }: NsIconProps): ReactElement|null => {
22
+ }: NsIconProps): ReactElement | null => {
26
23
  const Icon = IconVariants[name as NsIconNameType];
27
24
  const theme = useTheme();
28
25
  const iconColor = paletteColor(color)({ theme });
@@ -1,3 +1,5 @@
1
+ import { ReactElement } from 'react';
2
+
1
3
  /* eslint-disable max-len */
2
4
  import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon';
3
5
 
@@ -6,7 +8,7 @@ import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon';
6
8
  * @param props { fill: color to be filled for icon, color: color of the tick icon}
7
9
  * @returns ErrorIcon, can be used in Input field, when input field is in error state
8
10
  */
9
- const AlertErrorIcon = (props: SvgIconProps) => {
11
+ const AlertErrorIcon = (props: SvgIconProps):ReactElement => {
10
12
  return (
11
13
  <SvgIcon
12
14
  width="20"
@@ -1,8 +1,13 @@
1
1
  /* eslint-disable max-len */
2
2
 
3
- import { SvgIconProps, SvgIcon } from '@mui/material';
3
+ import { ReactElement } from 'react';
4
4
 
5
- const ArrowDown = (props: SvgIconProps) => {
5
+ import {
6
+ SvgIcon,
7
+ SvgIconProps,
8
+ } from '@mui/material';
9
+
10
+ const ArrowDown = (props: SvgIconProps):ReactElement => {
6
11
  return (
7
12
  <SvgIcon viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" data-testid="arrowDown" {...props}>
8
13
  <path
@@ -1,6 +1,11 @@
1
- import { SvgIcon, SvgIconProps } from '@mui/material';
1
+ import { ReactElement } from 'react';
2
2
 
3
- const ArrowLeft = (props: SvgIconProps) => {
3
+ import {
4
+ SvgIcon,
5
+ SvgIconProps,
6
+ } from '@mui/material';
7
+
8
+ const ArrowLeft = (props: SvgIconProps):ReactElement => {
4
9
  return (
5
10
  <SvgIcon
6
11
  data-testid="arrowLeft"
@@ -1,6 +1,11 @@
1
- import { SvgIcon, SvgIconProps } from '@mui/material';
1
+ import { ReactElement } from 'react';
2
2
 
3
- export const ArrowRight = (props: SvgIconProps) => {
3
+ import {
4
+ SvgIcon,
5
+ SvgIconProps,
6
+ } from '@mui/material';
7
+
8
+ export const ArrowRight = (props: SvgIconProps):ReactElement => {
4
9
  return (
5
10
  <SvgIcon
6
11
  {...props}
@@ -1,8 +1,10 @@
1
1
  /* eslint-disable max-len */
2
2
 
3
- import { SvgIconProps, SvgIcon } from '@mui/material';
3
+ import { ReactElement } from 'react';
4
4
 
5
- const ArrowUp = (props: SvgIconProps) => {
5
+ import { SvgIcon, SvgIconProps } from '@mui/material';
6
+
7
+ const ArrowUp = (props: SvgIconProps): ReactElement => {
6
8
  return (
7
9
  <SvgIcon viewBox="0 0 24 24" data-testid="arrowUp" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
8
10
  <path
@@ -1,8 +1,13 @@
1
1
  /* eslint-disable max-len */
2
2
 
3
- import { SvgIconProps, SvgIcon } from '@mui/material';
3
+ import { ReactElement } from 'react';
4
4
 
5
- const Cart = (props: SvgIconProps) => {
5
+ import {
6
+ SvgIcon,
7
+ SvgIconProps,
8
+ } from '@mui/material';
9
+
10
+ const Cart = (props: SvgIconProps):ReactElement => {
6
11
  return (
7
12
  <SvgIcon viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" data-testid="cart" {...props}>
8
13
  <path
@@ -1,8 +1,13 @@
1
1
  /* eslint-disable max-len */
2
2
 
3
- import { SvgIcon, SvgIconProps } from '@mui/material';
3
+ import { ReactElement } from 'react';
4
4
 
5
- const CartBadge = (props: SvgIconProps) => {
5
+ import {
6
+ SvgIcon,
7
+ SvgIconProps,
8
+ } from '@mui/material';
9
+
10
+ const CartBadge = (props: SvgIconProps) :ReactElement=> {
6
11
  return (
7
12
  <SvgIcon
8
13
  viewBox="0 0 30 30"
@@ -1,8 +1,13 @@
1
1
  /* eslint-disable max-len */
2
2
 
3
- import { SvgIcon, SvgIconProps } from '@mui/material';
3
+ import { ReactElement } from 'react';
4
4
 
5
- const Check = (props: SvgIconProps) => {
5
+ import {
6
+ SvgIcon,
7
+ SvgIconProps,
8
+ } from '@mui/material';
9
+
10
+ const Check = (props: SvgIconProps):ReactElement => {
6
11
  return (
7
12
  <SvgIcon
8
13
  viewBox="0 0 21 20"
@@ -1,8 +1,10 @@
1
1
  /* eslint-disable max-len */
2
2
 
3
- import { SvgIconProps, SvgIcon } from '@mui/material';
3
+ import { ReactElement } from 'react';
4
4
 
5
- const CheckShield = (props: SvgIconProps) => {
5
+ import { SvgIcon, SvgIconProps } from '@mui/material';
6
+
7
+ const CheckShield = (props: SvgIconProps): ReactElement => {
6
8
  return (
7
9
  <SvgIcon
8
10
  viewBox="0 0 24 24"
@@ -1,8 +1,13 @@
1
1
  /* eslint-disable max-len */
2
2
 
3
- import { SvgIconProps, SvgIcon } from '@mui/material';
3
+ import { ReactElement } from 'react';
4
4
 
5
- const CheckVerified = (props: SvgIconProps) => {
5
+ import {
6
+ SvgIcon,
7
+ SvgIconProps,
8
+ } from '@mui/material';
9
+
10
+ const CheckVerified = (props: SvgIconProps):ReactElement => {
6
11
  return (
7
12
  <SvgIcon
8
13
  viewBox="0 0 24 24"
@@ -1,12 +1,17 @@
1
- import { SvgIcon, SvgIconProps } from '@mui/material';
1
+ import { ReactElement } from 'react';
2
2
 
3
- export const ChevronRight = (props: SvgIconProps) => {
3
+ import {
4
+ SvgIcon,
5
+ SvgIconProps,
6
+ } from '@mui/material';
7
+
8
+ export const ChevronRight = (props: SvgIconProps):ReactElement => {
4
9
  return (
5
10
  <SvgIcon
6
11
  {...props}
7
12
  data-testid="chevronRight"
8
- viewBox="0 0 18 18"
9
- fill="none"
13
+ viewBox="0 0 18 18"
14
+ fill="none"
10
15
  xmlns="http://www.w3.org/2000/svg"
11
16
  >
12
17
  <g id="arrow-right">
@@ -1,8 +1,13 @@
1
1
  /* eslint-disable max-len */
2
2
 
3
- import { SvgIconProps, SvgIcon } from '@mui/material';
3
+ import { ReactElement } from 'react';
4
4
 
5
- const CloseIcon = (props: SvgIconProps) => {
5
+ import {
6
+ SvgIcon,
7
+ SvgIconProps,
8
+ } from '@mui/material';
9
+
10
+ const CloseIcon = (props: SvgIconProps):ReactElement => {
6
11
  return (
7
12
  <SvgIcon
8
13
  viewBox="0 0 12 12"
@@ -1,3 +1,5 @@
1
+ import { ReactElement } from 'react';
2
+
1
3
  /* eslint-disable max-len */
2
4
  import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon';
3
5
 
@@ -6,7 +8,7 @@ import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon';
6
8
  * @param props { color: color to be filled for icon}
7
9
  * @returns ErrorIcon, can be used in Input field, when input field is in error state
8
10
  */
9
- const ErrorIcon = (props: SvgIconProps) => {
11
+ const ErrorIcon = (props: SvgIconProps):ReactElement => {
10
12
  return (
11
13
  <SvgIcon
12
14
  width="20"
@@ -1,10 +1,13 @@
1
+ import { ReactElement } from 'react';
2
+
1
3
  /* eslint-disable max-len */
2
4
  import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon';
5
+
3
6
  /**
4
7
  *
5
8
  * @param props {stroke}
6
9
  */
7
- const HamburgerIcon = (props: SvgIconProps) => {
10
+ const HamburgerIcon = (props: SvgIconProps): ReactElement => {
8
11
  return (
9
12
  <SvgIcon viewBox="0 0 24 18" {...props} data-testid="hamburgerIcon" xmlns="http://www.w3.org/2000/svg">
10
13
  <path
@@ -1,8 +1,13 @@
1
1
  /* eslint-disable max-len */
2
2
 
3
- import { SvgIconProps, SvgIcon } from '@mui/material';
3
+ import { ReactElement } from 'react';
4
4
 
5
- const InfoFilled = (props: SvgIconProps) => {
5
+ import {
6
+ SvgIcon,
7
+ SvgIconProps,
8
+ } from '@mui/material';
9
+
10
+ const InfoFilled = (props: SvgIconProps): ReactElement => {
6
11
  return (
7
12
  <SvgIcon viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" {...props} data-testid="infoFilled">
8
13
  <path
@@ -1,8 +1,13 @@
1
1
  /* eslint-disable max-len */
2
2
 
3
- import { SvgIconProps, SvgIcon } from '@mui/material';
3
+ import { ReactElement } from 'react';
4
4
 
5
- const InfoOutlined = (props: SvgIconProps) => {
5
+ import {
6
+ SvgIcon,
7
+ SvgIconProps,
8
+ } from '@mui/material';
9
+
10
+ const InfoOutlined = (props: SvgIconProps): ReactElement => {
6
11
  return (
7
12
  <SvgIcon
8
13
  viewBox="0 0 24 24"
@@ -1,9 +1,14 @@
1
+ import { ReactElement } from 'react';
2
+
1
3
  /* figma link:
2
4
  https://www.figma.com/file/PYBXZQL5mleej9AlspDSuI/Equinox-Designs?type=design&node-id=82-1276&mode=design&t=k8Kqtpp3QmkKcOlT-4
3
5
  */
4
- import { SvgIcon, SvgIconProps } from '@mui/material';
6
+ import {
7
+ SvgIcon,
8
+ SvgIconProps,
9
+ } from '@mui/material';
5
10
 
6
- const RoundedClose = (props: SvgIconProps) => {
11
+ const RoundedClose = (props: SvgIconProps): ReactElement => {
7
12
  return (
8
13
  <SvgIcon
9
14
  width="25"
@@ -1,3 +1,5 @@
1
+ import { ReactElement } from 'react';
2
+
1
3
  /* eslint-disable max-len */
2
4
  import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon';
3
5
 
@@ -6,7 +8,7 @@ import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon';
6
8
  * @param props {fill: color to be filled for icon, color: color of the tick icon}
7
9
  * @returns SearchIcon, can be used in Input field, when input field is in success state
8
10
  */
9
- const SearchIcon = (props: SvgIconProps) => {
11
+ const SearchIcon = (props: SvgIconProps): ReactElement=> {
10
12
  return (
11
13
  <SvgIcon
12
14
  width="24"
@@ -1,6 +1,11 @@
1
- import { SvgIconProps, SvgIcon } from '@mui/material';
1
+ import { ReactElement } from 'react';
2
2
 
3
- const SlashIcon = (props: SvgIconProps) => {
3
+ import {
4
+ SvgIcon,
5
+ SvgIconProps,
6
+ } from '@mui/material';
7
+
8
+ const SlashIcon = (props: SvgIconProps): ReactElement => {
4
9
  return (
5
10
  <SvgIcon viewBox="0 0 2 22" fill="none" xmlns="http://www.w3.org/2000/svg" {...props} data-testid="slash">
6
11
  <path
@@ -1,3 +1,5 @@
1
+ import { ReactElement } from 'react';
2
+
1
3
  /* eslint-disable max-len */
2
4
  import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon';
3
5
 
@@ -6,7 +8,7 @@ import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon';
6
8
  * @param props
7
9
  * @returns
8
10
  */
9
- const SuccessIcon = (props: SvgIconProps) => {
11
+ const SuccessIcon = (props: SvgIconProps): ReactElement => {
10
12
  return (
11
13
  <SvgIcon
12
14
  width="20"
@@ -1,3 +1,5 @@
1
+ import { ReactElement } from 'react';
2
+
1
3
  /* eslint-disable max-len */
2
4
  import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon';
3
5
 
@@ -6,7 +8,7 @@ import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon';
6
8
  * @param props {fill: color of the trash icon}
7
9
  * @returns returns TrashIcon, used for marking delete symbol
8
10
  */
9
- const TrashIcon = (props: SvgIconProps) => {
11
+ const TrashIcon = (props: SvgIconProps): ReactElement => {
10
12
  return (
11
13
  <SvgIcon
12
14
  width="20"
@@ -1,10 +1,13 @@
1
+ import { ReactElement } from 'react';
2
+
1
3
  /* eslint-disable max-len */
2
4
  import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon';
5
+
3
6
  /**
4
7
  *
5
8
  * @param props {fill: color to be filled for icon, color: color of the tick icon}
6
9
  */
7
- const UserIcon = (props: SvgIconProps) => {
10
+ const UserIcon = (props: SvgIconProps): ReactElement => {
8
11
  return (
9
12
  <SvgIcon
10
13
  viewBox="0 0 24 24"
@@ -1,10 +1,12 @@
1
+ import { ReactElement } from 'react';
2
+
1
3
  /* eslint-disable max-len */
2
4
  import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon';
3
5
 
4
6
  /**
5
7
  * * pass colorOverride = '#272525'
6
8
  */
7
- function UserOutline(props: SvgIconProps) {
9
+ function UserOutline(props: SvgIconProps): ReactElement {
8
10
  return (
9
11
  <SvgIcon
10
12
  data-testid="userOutline"
@@ -1,3 +1,5 @@
1
+ import { ReactElement } from 'react';
2
+
1
3
  /* eslint-disable max-len */
2
4
  import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon';
3
5
 
@@ -6,7 +8,7 @@ import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon';
6
8
  * @param props { fill: color to be filled for icon, color: color of the tick icon}
7
9
  * @returns ErrorIcon, can be used in Input field, when input field is in error state
8
10
  */
9
- const WarningIcon = (props: SvgIconProps) => {
11
+ const WarningIcon = (props: SvgIconProps): ReactElement => {
10
12
  return (
11
13
  <SvgIcon
12
14
  width="20"