@nuskin/foundation-ui-components 1.33.0-1253-feature.3 → 2.0.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 (371) hide show
  1. package/dist/index.d.mts +1221 -0
  2. package/dist/index.d.ts +1221 -0
  3. package/dist/index.js +1 -0
  4. package/dist/index.js.map +1 -0
  5. package/dist/index.mjs +1 -0
  6. package/dist/index.mjs.map +1 -0
  7. package/package.json +33 -10
  8. package/src/common/accordion/NsAccordion.tsx +0 -82
  9. package/src/common/accordion/NsAccordionHeader.tsx +0 -85
  10. package/src/common/accordion/NsAccordionItem.tsx +0 -65
  11. package/src/common/accordion/NsCollapse.tsx +0 -121
  12. package/src/common/accordion/NsToggleSection.tsx +0 -50
  13. package/src/common/accordion/ToggleSection.styled.tsx +0 -32
  14. package/src/common/accordion/colorMap.ts +0 -60
  15. package/src/common/accordion/enums.ts +0 -18
  16. package/src/common/accordion/index.ts +0 -7
  17. package/src/common/accordion/specs/NsAccordion.spec.tsx +0 -183
  18. package/src/common/accordion/specs/NsAccordionHeader.spec.tsx +0 -172
  19. package/src/common/accordion/specs/NsAccordionItem.spec.tsx +0 -79
  20. package/src/common/accordion/specs/NsCollapse.spec.tsx +0 -130
  21. package/src/common/accordion/specs/NsToggleSection.spec.tsx +0 -74
  22. package/src/common/accordion/stories/NsAccordion.stories.tsx +0 -65
  23. package/src/common/accordion/stories/NsAccordionHeader.stories.tsx +0 -44
  24. package/src/common/accordion/stories/NsAccordionItem.stories.tsx +0 -48
  25. package/src/common/accordion/stories/NsCollapse.stories.tsx +0 -53
  26. package/src/common/accordion/stories/NsToggleSection.stories.tsx +0 -27
  27. package/src/common/accordion/stories/data.tsx +0 -145
  28. package/src/common/accordion/types.d.ts +0 -90
  29. package/src/common/alert/Header.tsx +0 -29
  30. package/src/common/alert/NsAlert.spec.tsx +0 -167
  31. package/src/common/alert/NsAlert.stories.tsx +0 -45
  32. package/src/common/alert/NsAlert.styled.tsx +0 -114
  33. package/src/common/alert/NsAlert.tsx +0 -93
  34. package/src/common/alert/index.ts +0 -2
  35. package/src/common/alert/types.d.ts +0 -45
  36. package/src/common/auth-dropdown/NsAuthDropdown.spec.tsx +0 -54
  37. package/src/common/auth-dropdown/NsAuthDropdown.stories.tsx +0 -25
  38. package/src/common/auth-dropdown/NsAuthDropdown.styled.ts +0 -120
  39. package/src/common/auth-dropdown/NsAuthDropdown.tsx +0 -72
  40. package/src/common/auth-dropdown/index.ts +0 -2
  41. package/src/common/auth-dropdown/types.d.ts +0 -11
  42. package/src/common/autocomplete/NsAutocomplete.spec.tsx +0 -91
  43. package/src/common/autocomplete/NsAutocomplete.styled.tsx +0 -24
  44. package/src/common/autocomplete/NsAutocomplete.tsx +0 -225
  45. package/src/common/autocomplete/helper/LineLoader.tsx +0 -38
  46. package/src/common/autocomplete/helper/RecentClearAll.tsx +0 -43
  47. package/src/common/autocomplete/helper/SeeMoreButton.tsx +0 -68
  48. package/src/common/autocomplete/helper/index.ts +0 -4
  49. package/src/common/autocomplete/helper/renderGroupName.tsx +0 -26
  50. package/src/common/autocomplete/index.ts +0 -2
  51. package/src/common/autocomplete/mock/Mock.styled.tsx +0 -23
  52. package/src/common/autocomplete/mock/MockData.ts +0 -89
  53. package/src/common/autocomplete/mock/MockUI.tsx +0 -26
  54. package/src/common/autocomplete/stories/NoCloseAutoComplete.tsx +0 -49
  55. package/src/common/autocomplete/stories/NsAutocomplete.stories.tsx +0 -78
  56. package/src/common/autocomplete/stories/RenderAutoComplete.tsx +0 -60
  57. package/src/common/autocomplete/types.d.ts +0 -67
  58. package/src/common/banner/NsBanner.spec.tsx +0 -28
  59. package/src/common/banner/NsBanner.stories.tsx +0 -47
  60. package/src/common/banner/NsBanner.styled.tsx +0 -24
  61. package/src/common/banner/NsBanner.tsx +0 -32
  62. package/src/common/banner/index.ts +0 -2
  63. package/src/common/banner/types.d.ts +0 -14
  64. package/src/common/brand-components/NsBrand.stories.tsx +0 -26
  65. package/src/common/brand-components/NsBrandComponent.spec.tsx +0 -47
  66. package/src/common/brand-components/NsBrandComponent.tsx +0 -33
  67. package/src/common/brand-components/NsBrandContainer.styled.tsx +0 -10
  68. package/src/common/brand-components/icons/Logo.spec.tsx +0 -84
  69. package/src/common/brand-components/icons/NSLogoHorizontal.tsx +0 -70
  70. package/src/common/brand-components/icons/NSLogoMark.tsx +0 -39
  71. package/src/common/brand-components/icons/NSLogoPoweredBy.tsx +0 -103
  72. package/src/common/brand-components/icons/NSLogoStacked.tsx +0 -57
  73. package/src/common/brand-components/icons/NSWordMark.tsx +0 -60
  74. package/src/common/brand-components/index.ts +0 -2
  75. package/src/common/brand-components/types.d.ts +0 -11
  76. package/src/common/breadcrumb/NsBreadcrumb.spec.tsx +0 -28
  77. package/src/common/breadcrumb/NsBreadcrumb.stories.tsx +0 -39
  78. package/src/common/breadcrumb/NsBreadcrumb.styled.tsx +0 -36
  79. package/src/common/breadcrumb/NsBreadcrumb.tsx +0 -85
  80. package/src/common/breadcrumb/data.ts +0 -10
  81. package/src/common/breadcrumb/index.ts +0 -2
  82. package/src/common/breadcrumb/types.d.ts +0 -14
  83. package/src/common/button/NsButton.spec.tsx +0 -94
  84. package/src/common/button/NsButton.stories.tsx +0 -118
  85. package/src/common/button/NsButton.styled.tsx +0 -57
  86. package/src/common/button/NsButton.tsx +0 -48
  87. package/src/common/button/__snapshots__/NsButton.spec.tsx.snap +0 -120
  88. package/src/common/button/helper.ts +0 -84
  89. package/src/common/button/index.ts +0 -2
  90. package/src/common/button/types.d.ts +0 -26
  91. package/src/common/card/CardButton.tsx +0 -58
  92. package/src/common/card/NsAwardCard.tsx +0 -71
  93. package/src/common/card/NsBgCard.tsx +0 -26
  94. package/src/common/card/NsBrandCard.tsx +0 -88
  95. package/src/common/card/NsBrandLogo.tsx +0 -16
  96. package/src/common/card/NsBrandWrapper.tsx +0 -25
  97. package/src/common/card/NsCheckoutCard.tsx +0 -107
  98. package/src/common/card/NsHeroCardLevel1.tsx +0 -105
  99. package/src/common/card/NsHeroCardLevel2.tsx +0 -95
  100. package/src/common/card/NsIconText.tsx +0 -165
  101. package/src/common/card/NsLargeCard.tsx +0 -108
  102. package/src/common/card/NsMediumCard.tsx +0 -110
  103. package/src/common/card/NsPost.tsx +0 -78
  104. package/src/common/card/NsSmallFullCard.tsx +0 -93
  105. package/src/common/card/NsXLargeCard.tsx +0 -89
  106. package/src/common/card/cardSizes.ts +0 -12
  107. package/src/common/card/fixtures/ImageData1.ts +0 -38
  108. package/src/common/card/fixtures/ImageData2.ts +0 -38
  109. package/src/common/card/index.ts +0 -15
  110. package/src/common/card/specs/BrandLogo.spec.tsx +0 -13
  111. package/src/common/card/specs/NsAwardCard.spec.tsx +0 -29
  112. package/src/common/card/specs/NsBgCard.spec.tsx +0 -23
  113. package/src/common/card/specs/NsBrandCard.spec.tsx +0 -84
  114. package/src/common/card/specs/NsCheckoutCard.spec.tsx +0 -39
  115. package/src/common/card/specs/NsHeroCardLevel1.spec.tsx +0 -39
  116. package/src/common/card/specs/NsHeroCardLevel2.spec.tsx +0 -49
  117. package/src/common/card/specs/NsIconText.spec.tsx +0 -25
  118. package/src/common/card/specs/NsLargeCard.spec.tsx +0 -47
  119. package/src/common/card/specs/NsMediumCard.spec.tsx +0 -51
  120. package/src/common/card/specs/NsPost.spec.tsx +0 -28
  121. package/src/common/card/specs/NsSmallFullCard.spec.tsx +0 -47
  122. package/src/common/card/specs/NsXLargeCard.spec.tsx +0 -47
  123. package/src/common/card/stories/NsAwardCard.stories.tsx +0 -21
  124. package/src/common/card/stories/NsBrandCard.stories.tsx +0 -32
  125. package/src/common/card/stories/NsCheckoutCard.stories.tsx +0 -23
  126. package/src/common/card/stories/NsHeroCardLevel1.stories.tsx +0 -30
  127. package/src/common/card/stories/NsHeroCardLevel2.stories.tsx +0 -29
  128. package/src/common/card/stories/NsIconText.stories.tsx +0 -18
  129. package/src/common/card/stories/NsLargeCard.stories.tsx +0 -32
  130. package/src/common/card/stories/NsMediumCard.stories.tsx +0 -34
  131. package/src/common/card/stories/NsPost.stories.tsx +0 -20
  132. package/src/common/card/stories/NsSmallFullCard.stories.tsx +0 -31
  133. package/src/common/card/stories/NsXLargeCard.stories.tsx +0 -32
  134. package/src/common/card/stories/data.ts +0 -43
  135. package/src/common/card/types.d.ts +0 -25
  136. package/src/common/carousal/CarousalControl.tsx +0 -47
  137. package/src/common/carousal/IconWrapper.tsx +0 -33
  138. package/src/common/carousal/NsCarousal.tsx +0 -65
  139. package/src/common/carousal/NsScrollingCarousal.tsx +0 -60
  140. package/src/common/carousal/RenderBrand.tsx +0 -20
  141. package/src/common/carousal/index.ts +0 -5
  142. package/src/common/carousal/slickSetting.ts +0 -61
  143. package/src/common/carousal/specs/Chevron.spec.tsx +0 -10
  144. package/src/common/carousal/specs/NsCarousal.spec.tsx +0 -112
  145. package/src/common/carousal/specs/NsScrollingCarousal.spec.tsx +0 -63
  146. package/src/common/carousal/specs/RenderBrand.spec.tsx +0 -22
  147. package/src/common/carousal/stories/NsCarousal1.stories.tsx +0 -34
  148. package/src/common/carousal/stories/NsScrollingCarousal.stories.tsx +0 -80
  149. package/src/common/carousal/types.d.ts +0 -23
  150. package/src/common/cart-icon/NsCartIcon.spec.tsx +0 -19
  151. package/src/common/cart-icon/NsCartIcon.stories.tsx +0 -28
  152. package/src/common/cart-icon/NsCartIcon.styled.tsx +0 -15
  153. package/src/common/cart-icon/NsCartIcon.tsx +0 -24
  154. package/src/common/cart-icon/index.ts +0 -2
  155. package/src/common/cart-icon/types.d.ts +0 -8
  156. package/src/common/checkbox/NsCheckbox.spec.tsx +0 -57
  157. package/src/common/checkbox/NsCheckbox.stories.tsx +0 -55
  158. package/src/common/checkbox/NsCheckbox.styled.tsx +0 -55
  159. package/src/common/checkbox/NsCheckbox.tsx +0 -68
  160. package/src/common/checkbox/index.ts +0 -2
  161. package/src/common/checkbox/types.d.ts +0 -20
  162. package/src/common/column-control/NsColumnControl.tsx +0 -64
  163. package/src/common/column-control/NsFlexColumns.tsx +0 -29
  164. package/src/common/column-control/NsGridColumns.tsx +0 -29
  165. package/src/common/column-control/index.ts +0 -4
  166. package/src/common/column-control/specs/NsColumnControl.spec.tsx +0 -24
  167. package/src/common/column-control/specs/NsFlexColumns.spec.tsx +0 -24
  168. package/src/common/column-control/specs/NsGridColumns.spec.tsx +0 -24
  169. package/src/common/column-control/stories/DivArray.stories.tsx +0 -18
  170. package/src/common/column-control/stories/DivArray.tsx +0 -63
  171. package/src/common/column-control/stories/NsColumnControl.stories.tsx +0 -65
  172. package/src/common/column-control/stories/NsFlexColumns.stories.tsx +0 -66
  173. package/src/common/column-control/stories/NsGridColumns.stories.tsx +0 -75
  174. package/src/common/column-control/stories/common.tsx +0 -14
  175. package/src/common/column-control/styled/StyledFlex.tsx +0 -46
  176. package/src/common/column-control/styled/StyledGrid.tsx +0 -41
  177. package/src/common/column-control/styled/common.ts +0 -27
  178. package/src/common/column-control/types.d.ts +0 -46
  179. package/src/common/column-control/utils.ts +0 -66
  180. package/src/common/common.types.d.ts +0 -21
  181. package/src/common/dropdown/NsDropdown.spec.tsx +0 -126
  182. package/src/common/dropdown/NsDropdown.styled.tsx +0 -66
  183. package/src/common/dropdown/NsDropdown.tsx +0 -94
  184. package/src/common/dropdown/NsDropdownOption.tsx +0 -13
  185. package/src/common/dropdown/index.ts +0 -3
  186. package/src/common/dropdown/stories/NsDropdown.stories.tsx +0 -67
  187. package/src/common/dropdown/stories/NsDropdownCountry.stories.tsx +0 -64
  188. package/src/common/dropdown/types.d.ts +0 -23
  189. package/src/common/email-simple/NsEmailSimple.spec.tsx +0 -115
  190. package/src/common/email-simple/NsEmailSimple.stories.tsx +0 -61
  191. package/src/common/email-simple/NsEmailSimple.tsx +0 -72
  192. package/src/common/email-simple/index.ts +0 -2
  193. package/src/common/email-simple/types.d.ts +0 -14
  194. package/src/common/flag/NsFlag.spec.tsx +0 -27
  195. package/src/common/flag/NsFlag.stories.tsx +0 -22
  196. package/src/common/flag/NsFlag.styled.tsx +0 -73
  197. package/src/common/flag/NsFlag.tsx +0 -24
  198. package/src/common/flag/index.ts +0 -2
  199. package/src/common/flag/types.d.ts +0 -16
  200. package/src/common/hooks/index.ts +0 -2
  201. package/src/common/hooks/specs/useWindowSize.spec.tsx +0 -19
  202. package/src/common/hooks/useAccordionMap.tsx +0 -39
  203. package/src/common/hooks/useOnClickOutside.tsx +0 -25
  204. package/src/common/hooks/useWindowSize.tsx +0 -30
  205. package/src/common/icon/NsIcon.spec.tsx +0 -51
  206. package/src/common/icon/NsIcon.stories.tsx +0 -77
  207. package/src/common/icon/NsIcon.styled.tsx +0 -27
  208. package/src/common/icon/NsIcon.tsx +0 -44
  209. package/src/common/icon/NsIconVariants.ts +0 -56
  210. package/src/common/icon/icons/AlertErrorIcon.tsx +0 -48
  211. package/src/common/icon/icons/ArrowDown.tsx +0 -23
  212. package/src/common/icon/icons/ArrowLeft.tsx +0 -38
  213. package/src/common/icon/icons/ArrowRight.tsx +0 -39
  214. package/src/common/icon/icons/ArrowUp.tsx +0 -20
  215. package/src/common/icon/icons/Cart.tsx +0 -23
  216. package/src/common/icon/icons/CartBadge.tsx +0 -47
  217. package/src/common/icon/icons/Check.tsx +0 -30
  218. package/src/common/icon/icons/CheckShield.tsx +0 -24
  219. package/src/common/icon/icons/CheckVerified.tsx +0 -27
  220. package/src/common/icon/icons/ChevronRight.tsx +0 -31
  221. package/src/common/icon/icons/CloseIcon.tsx +0 -27
  222. package/src/common/icon/icons/ErrorIcon.tsx +0 -30
  223. package/src/common/icon/icons/HamburgerIcon.tsx +0 -35
  224. package/src/common/icon/icons/InfoFilled.tsx +0 -21
  225. package/src/common/icon/icons/InfoOutlined.tsx +0 -42
  226. package/src/common/icon/icons/RoundedClose.tsx +0 -31
  227. package/src/common/icon/icons/SearchIcon.tsx +0 -32
  228. package/src/common/icon/icons/SlashIcon.tsx +0 -22
  229. package/src/common/icon/icons/SuccessIcon.tsx +0 -40
  230. package/src/common/icon/icons/TrashIcon.tsx +0 -32
  231. package/src/common/icon/icons/UserIcon.tsx +0 -37
  232. package/src/common/icon/icons/UserOutline.tsx +0 -29
  233. package/src/common/icon/icons/WarningIcon.tsx +0 -48
  234. package/src/common/icon/icons/error.svg +0 -3
  235. package/src/common/icon/icons/home.tsx +0 -19
  236. package/src/common/icon/icons/search.svg +0 -3
  237. package/src/common/icon/icons/success.svg +0 -10
  238. package/src/common/icon/icons/trash.svg +0 -3
  239. package/src/common/icon/index.ts +0 -3
  240. package/src/common/icon/types.d.ts +0 -53
  241. package/src/common/image/BynderMedia.spec.tsx +0 -42
  242. package/src/common/image/BynderMedia.tsx +0 -49
  243. package/src/common/image/NsImage.spec.tsx +0 -60
  244. package/src/common/image/NsImage.stories.tsx +0 -46
  245. package/src/common/image/NsImage.tsx +0 -33
  246. package/src/common/image/NsNextImage.spec.tsx +0 -10
  247. package/src/common/image/NsNextImage.stories.tsx +0 -51
  248. package/src/common/image/NsNextImage.tsx +0 -11
  249. package/src/common/image/bynder-util.spec.ts +0 -187
  250. package/src/common/image/bynder-util.ts +0 -98
  251. package/src/common/image/index.ts +0 -3
  252. package/src/common/image/types.ts +0 -78
  253. package/src/common/index.ts +0 -37
  254. package/src/common/input/InputFieldWrapper.tsx +0 -24
  255. package/src/common/input/InputWrapper.tsx +0 -82
  256. package/src/common/input/NsInputField.spec.tsx +0 -25
  257. package/src/common/input/NsInputField.stories.tsx +0 -61
  258. package/src/common/input/NsInputField.tsx +0 -125
  259. package/src/common/input/getAdornmentProps.tsx +0 -50
  260. package/src/common/input/index.ts +0 -2
  261. package/src/common/input/types.d.ts +0 -45
  262. package/src/common/label/NsLabel.spec.tsx +0 -11
  263. package/src/common/label/NsLabel.stories.tsx +0 -35
  264. package/src/common/label/NsLabel.tsx +0 -43
  265. package/src/common/label/index.ts +0 -2
  266. package/src/common/label/types.d.ts +0 -10
  267. package/src/common/link/NsLink.spec.tsx +0 -106
  268. package/src/common/link/NsLink.stories.tsx +0 -55
  269. package/src/common/link/NsLink.styled.tsx +0 -100
  270. package/src/common/link/NsLink.tsx +0 -122
  271. package/src/common/link/index.ts +0 -2
  272. package/src/common/link/types.d.ts +0 -22
  273. package/src/common/modal/NsModal.spec.tsx +0 -46
  274. package/src/common/modal/NsModal.styled.tsx +0 -28
  275. package/src/common/modal/NsModal.tsx +0 -43
  276. package/src/common/modal/helper-component/NsModalContentBox.tsx +0 -37
  277. package/src/common/modal/helper-component/NsModalDefault.tsx +0 -34
  278. package/src/common/modal/helper-component/NsModalStatus.tsx +0 -17
  279. package/src/common/modal/helper-component/NsModalStatusIcon.tsx +0 -16
  280. package/src/common/modal/helper-component/NsModalTitle.tsx +0 -29
  281. package/src/common/modal/index.ts +0 -2
  282. package/src/common/modal/model/NsModalVariantMap.tsx +0 -24
  283. package/src/common/modal/stories/NsModal.stories.tsx +0 -87
  284. package/src/common/modal/stories/mock.tsx +0 -46
  285. package/src/common/modal/types.ts +0 -57
  286. package/src/common/nav-product-card/NsNavProductCard.spec.tsx +0 -22
  287. package/src/common/nav-product-card/NsNavProductCard.stories.tsx +0 -25
  288. package/src/common/nav-product-card/NsNavProductCard.styled.tsx +0 -24
  289. package/src/common/nav-product-card/NsNavProductCard.tsx +0 -27
  290. package/src/common/nav-product-card/index.ts +0 -2
  291. package/src/common/nav-product-card/types.d.ts +0 -9
  292. package/src/common/nav-tab/NavDrawer.tsx +0 -41
  293. package/src/common/nav-tab/NavTitles.tsx +0 -64
  294. package/src/common/nav-tab/NsNavTab.spec.tsx +0 -64
  295. package/src/common/nav-tab/NsNavTab.stories.tsx +0 -36
  296. package/src/common/nav-tab/NsNavTab.styled.tsx +0 -74
  297. package/src/common/nav-tab/NsNavTab.tsx +0 -43
  298. package/src/common/nav-tab/index.ts +0 -2
  299. package/src/common/nav-tab/types.d.ts +0 -21
  300. package/src/common/progress/NsProgress.spec.tsx +0 -47
  301. package/src/common/progress/NsProgress.stories.tsx +0 -45
  302. package/src/common/progress/NsProgress.styled.tsx +0 -56
  303. package/src/common/progress/NsProgress.tsx +0 -29
  304. package/src/common/progress/index.ts +0 -2
  305. package/src/common/progress/types.d.ts +0 -21
  306. package/src/common/radiogroup/NsRadioGroup.spec.tsx +0 -63
  307. package/src/common/radiogroup/NsRadioGroup.stories.tsx +0 -84
  308. package/src/common/radiogroup/NsRadioGroup.styled.tsx +0 -51
  309. package/src/common/radiogroup/NsRadioGroup.tsx +0 -65
  310. package/src/common/radiogroup/index.ts +0 -2
  311. package/src/common/radiogroup/types.d.ts +0 -19
  312. package/src/common/search-bar/NsSeachBar.spec.tsx +0 -9
  313. package/src/common/search-bar/NsSearchBar.tsx +0 -46
  314. package/src/common/select/DefaultRenderOption.tsx +0 -8
  315. package/src/common/select/NsSelect.styled.tsx +0 -102
  316. package/src/common/select/NsSelect.tsx +0 -166
  317. package/src/common/select/NsSelectOption.tsx +0 -26
  318. package/src/common/select/constant.ts +0 -30
  319. package/src/common/select/index.ts +0 -3
  320. package/src/common/select/specs/NsSelect.spec.tsx +0 -183
  321. package/src/common/select/specs/NsSelectOption.spec.tsx +0 -32
  322. package/src/common/select/stories/NsSelect.stories.tsx +0 -89
  323. package/src/common/select/stories/countries.ts +0 -53
  324. package/src/common/select/types.d.ts +0 -49
  325. package/src/common/spinner/NsSpinner.spec.tsx +0 -21
  326. package/src/common/spinner/NsSpinner.stories.tsx +0 -29
  327. package/src/common/spinner/NsSpinner.styled.tsx +0 -344
  328. package/src/common/spinner/NsSpinner.tsx +0 -15
  329. package/src/common/spinner/icons/Spinner.tsx +0 -163
  330. package/src/common/spinner/index.ts +0 -2
  331. package/src/common/spinner/types.ts +0 -5
  332. package/src/common/table/NsExpandableRow.tsx +0 -62
  333. package/src/common/table/NsTable.spec.tsx +0 -174
  334. package/src/common/table/NsTable.stories.tsx +0 -156
  335. package/src/common/table/NsTable.styled.ts +0 -127
  336. package/src/common/table/NsTable.tsx +0 -150
  337. package/src/common/table/NsTableHeader.tsx +0 -54
  338. package/src/common/table/NsTablePagination.tsx +0 -24
  339. package/src/common/table/helper.ts +0 -33
  340. package/src/common/table/index.ts +0 -2
  341. package/src/common/table/types.d.ts +0 -57
  342. package/src/common/text-strip/NsTextStrip.spec.tsx +0 -27
  343. package/src/common/text-strip/NsTextStrip.stories.tsx +0 -61
  344. package/src/common/text-strip/NsTextStrip.tsx +0 -61
  345. package/src/common/text-strip/index.ts +0 -2
  346. package/src/common/text-strip/types.d.ts +0 -16
  347. package/src/common/toast/Fade.tsx +0 -98
  348. package/src/common/toast/ToastProvider.tsx +0 -88
  349. package/src/common/toast/index.ts +0 -3
  350. package/src/common/toast/shared.ts +0 -124
  351. package/src/common/toast/specs/Toast.spec.tsx +0 -122
  352. package/src/common/toast/stories/Toast.stories.tsx +0 -82
  353. package/src/common/toast/useToast.tsx +0 -65
  354. package/src/common/typography/GlobalFontInter.tsx +0 -15
  355. package/src/common/typography/HtmlTagVariantMap.tsx +0 -24
  356. package/src/common/typography/NsTypography.spec.tsx +0 -37
  357. package/src/common/typography/NsTypography.stories.tsx +0 -27
  358. package/src/common/typography/NsTypography.tsx +0 -44
  359. package/src/common/typography/Typography.styled.tsx +0 -195
  360. package/src/common/typography/__snapshots__/NsTypography.spec.tsx.snap +0 -22
  361. package/src/common/typography/index.ts +0 -3
  362. package/src/common/typography/types.d.ts +0 -37
  363. package/src/common/util.ts +0 -3
  364. package/src/common/utility/Show.tsx +0 -13
  365. package/src/common/utility/index.ts +0 -1
  366. package/src/common/validations/regex.ts +0 -2
  367. package/src/common/videos/NsVideo.spec.tsx +0 -26
  368. package/src/common/videos/NsVideo.stories.tsx +0 -32
  369. package/src/common/videos/NsVideo.tsx +0 -28
  370. package/src/common/videos/index.ts +0 -2
  371. package/src/common/videos/types.d.ts +0 -9
@@ -1,40 +0,0 @@
1
- import { ReactElement } from 'react';
2
-
3
- /* eslint-disable max-len */
4
- import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon';
5
-
6
- /**
7
- * pass fill = '#fff' and colorOverride ='#5BAC85'
8
- * @param props
9
- * @returns
10
- */
11
- const SuccessIcon = (props: SvgIconProps): ReactElement => {
12
- return (
13
- <SvgIcon
14
- width="20"
15
- height="20"
16
- viewBox="0 0 20 20"
17
- data-testid="success"
18
- fill="none"
19
- xmlns="http://www.w3.org/2000/svg"
20
- {...props}
21
- >
22
- <g id="Check Circle">
23
- <circle id="Ellipse 70" cx="10" cy="10" r="10" fill={props.color} />
24
- <g id="check 12px">
25
- <g id="checkmark">
26
- <path
27
- id="Shape (Stroke)"
28
- fillRule="evenodd"
29
- clipRule="evenodd"
30
- d="M15.8051 5.79289C16.1956 6.18342 16.1956 6.81658 15.8051 7.20711L8.80508 14.2071C8.61742 14.3948 8.36287 14.5001 8.09748 14.5C7.8321 14.4999 7.57765 14.3943 7.39018 14.2064L3.79218 10.6014C3.40203 10.2105 3.40265 9.57735 3.79355 9.18721C4.18445 8.79706 4.81762 8.79768 5.20776 9.18858L8.09866 12.0851L14.3909 5.79289C14.7814 5.40237 15.4146 5.40237 15.8051 5.79289Z"
31
- fill={props.fill || '#fff'}
32
- />
33
- </g>
34
- </g>
35
- </g>
36
- </SvgIcon>
37
- );
38
- };
39
-
40
- export default SuccessIcon;
@@ -1,32 +0,0 @@
1
- import { ReactElement } from 'react';
2
-
3
- /* eslint-disable max-len */
4
- import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon';
5
-
6
- /**
7
- *
8
- * @param props {fill: color of the trash icon}
9
- * @returns returns TrashIcon, used for marking delete symbol
10
- */
11
- const TrashIcon = (props: SvgIconProps): ReactElement => {
12
- return (
13
- <SvgIcon
14
- width="20"
15
- height="21"
16
- viewBox="0 0 20 21"
17
- data-testid="trash"
18
- fill="none"
19
- xmlns="http://www.w3.org/2000/svg"
20
- {...props}
21
- >
22
- <path
23
- fillRule="evenodd"
24
- clipRule="evenodd"
25
- d="M10 0C10.5523 0 11 0.447715 11 1V2.5H19C19.5523 2.5 20 2.94772 20 3.5C20 4.05228 19.5523 4.5 19 4.5H17.5V18C17.5 19.6569 16.1569 21 14.5 21H5.5C3.84315 21 2.5 19.6569 2.5 18V4.5H1C0.447715 4.5 0 4.05228 0 3.5C0 2.94772 0.447715 2.5 1 2.5H9V1C9 0.447715 9.44771 0 10 0ZM4.5 4.5V18C4.5 18.5523 4.94772 19 5.5 19H14.5C15.0523 19 15.5 18.5523 15.5 18V4.5H4.5ZM6.5 5.5C7.05228 5.5 7.5 5.94772 7.5 6.5V17C7.5 17.5523 7.05228 18 6.5 18C5.94772 18 5.5 17.5523 5.5 17V6.5C5.5 5.94772 5.94772 5.5 6.5 5.5ZM10 5.5C10.5523 5.5 11 5.94772 11 6.5V17C11 17.5523 10.5523 18 10 18C9.44771 18 9 17.5523 9 17V6.5C9 5.94772 9.44771 5.5 10 5.5ZM13.5 5.5C14.0523 5.5 14.5 5.94772 14.5 6.5V17C14.5 17.5523 14.0523 18 13.5 18C12.9477 18 12.5 17.5523 12.5 17V6.5C12.5 5.94772 12.9477 5.5 13.5 5.5Z"
26
- fill={props.color}
27
- />
28
- </SvgIcon>
29
- );
30
- };
31
-
32
- export default TrashIcon;
@@ -1,37 +0,0 @@
1
- import { ReactElement } from 'react';
2
-
3
- /* eslint-disable max-len */
4
- import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon';
5
-
6
- /**
7
- *
8
- * @param props {fill: color to be filled for icon, color: color of the tick icon}
9
- */
10
- const UserIcon = (props: SvgIconProps): ReactElement => {
11
- return (
12
- <SvgIcon
13
- viewBox="0 0 24 24"
14
- data-testid="userIcon"
15
- xmlns="http://www.w3.org/2000/svg"
16
- {...props}
17
- fill="transparent"
18
- >
19
- <path
20
- fillRule="evenodd"
21
- clipRule="evenodd"
22
- d="M12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23Z"
23
- stroke={props.color}
24
- strokeWidth="2"
25
- />
26
- <path
27
- d="M19 20C18.9425 19.3229 19 17.5669 17.3793 17.2226C14.7126 16.6144 13.931 16.4078 14.1034 14.2272C15.8046 13.0796 15.7816 11.0252 15.7471 8.74139C15.7471 6.67508 14.0695 5 12 5C9.93052 5 8.25287 6.67508 8.25287 8.74139C8.25287 11.0367 8.25287 13.137 9.89655 14.2272C10.0575 16.4078 9.28736 16.6144 6.62069 17.2226C5 17.5669 5.05747 19.3229 5 20"
28
- stroke={props.color}
29
- fill={props.color}
30
- strokeWidth="2"
31
- strokeLinecap="round"
32
- />
33
- </SvgIcon>
34
- );
35
- };
36
-
37
- export default UserIcon;
@@ -1,29 +0,0 @@
1
- import { ReactElement } from 'react';
2
-
3
- /* eslint-disable max-len */
4
- import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon';
5
-
6
- /**
7
- * * pass colorOverride = '#272525'
8
- */
9
- function UserOutline(props: SvgIconProps): ReactElement {
10
- return (
11
- <SvgIcon
12
- data-testid="userOutline"
13
- width="24"
14
- height="24"
15
- viewBox="0 0 24 24"
16
- fill="none"
17
- xmlns="http://www.w3.org/2000/svg"
18
- >
19
- <path
20
- fillRule="evenodd"
21
- clipRule="evenodd"
22
- d="M12 1.25C6.06294 1.25 1.25 6.06294 1.25 12C1.25 17.9371 6.06294 22.75 12 22.75C17.9371 22.75 22.75 17.9371 22.75 12C22.75 6.06294 17.9371 1.25 12 1.25ZM2.75 12C2.75 6.89137 6.89137 2.75 12 2.75C17.1086 2.75 21.25 6.89137 21.25 12C21.25 14.5514 20.217 16.8615 18.5465 18.535C18.5373 18.5053 18.5278 18.4757 18.5177 18.4462C18.2909 17.7811 17.7908 17.0816 16.7743 16.861C16.1976 16.7279 15.7597 16.6249 15.4126 16.5154C15.0619 16.4048 14.8722 16.3075 14.7621 16.2197C14.6519 16.1318 14.5229 15.9893 14.534 15.3824C15.2564 14.7722 15.6208 13.9828 15.7989 13.145C15.9917 12.2377 15.9765 11.218 15.9621 10.2575L15.9618 10.2367C15.9587 8.04108 14.1928 6.25 12 6.25C9.80523 6.25 8.03818 8.04427 8.03818 10.2425L8.03818 10.2902C8.03812 11.2492 8.03807 12.2685 8.23093 13.1685C8.40828 13.9961 8.76096 14.7856 9.46415 15.382C9.47219 15.9884 9.34391 16.1319 9.23338 16.2204C9.12398 16.3079 8.93522 16.4051 8.58559 16.5155C8.23946 16.6249 7.80232 16.728 7.22572 16.861C6.20921 17.0816 5.70909 17.7811 5.48226 18.4462C5.47222 18.4757 5.46266 18.5053 5.45354 18.535C3.78298 16.8615 2.75 14.5514 2.75 12ZM6.77658 19.6351C8.26295 20.6539 10.0619 21.25 12 21.25C13.9381 21.25 15.7371 20.6539 17.2234 19.6351C17.206 19.3999 17.1779 19.1646 17.098 18.9304C16.9903 18.6146 16.822 18.4054 16.4533 18.3262L16.4423 18.3239L16.4423 18.3238C15.8787 18.1938 15.3772 18.0771 14.9615 17.946C14.5483 17.8157 14.1512 17.6513 13.8266 17.3922C13.0849 16.8004 12.9768 15.9412 13.0552 14.9385L13.0833 14.58L13.3803 14.3774C13.9081 14.0173 14.1862 13.5172 14.3317 12.8331C14.4843 12.1148 14.477 11.265 14.4619 10.2537L14.4617 10.2425H14.4618C14.4618 8.8592 13.3529 7.75 12 7.75C10.6471 7.75 9.53818 8.8592 9.53818 10.2425C9.53818 11.259 9.54149 12.1256 9.69764 12.8542C9.84777 13.5548 10.1225 14.0439 10.6148 14.3741L10.9184 14.5777L10.9451 14.9423C11.0181 15.9429 10.9092 16.8005 10.1706 17.3915C9.84647 17.6509 9.45024 17.8154 9.03756 17.9458C8.62239 18.077 8.12144 18.1938 7.55771 18.3238L7.54669 18.3263L7.54667 18.3262C7.17801 18.4054 7.00968 18.6146 6.90197 18.9304C6.8221 19.1646 6.79403 19.3999 6.77658 19.6351Z"
23
- fill={props.color}
24
- />
25
- </SvgIcon>
26
- );
27
- }
28
-
29
- export default UserOutline;
@@ -1,48 +0,0 @@
1
- import { ReactElement } from 'react';
2
-
3
- /* eslint-disable max-len */
4
- import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon';
5
-
6
- /**
7
- * pass colorOverride = '#FEBD00'
8
- * @param props { fill: color to be filled for icon, color: color of the tick icon}
9
- * @returns ErrorIcon, can be used in Input field, when input field is in error state
10
- */
11
- const WarningIcon = (props: SvgIconProps): ReactElement => {
12
- return (
13
- <SvgIcon
14
- width="20"
15
- height="20"
16
- viewBox="0 0 20 20"
17
- data-testid="warning"
18
- fill="none"
19
- xmlns="http://www.w3.org/2000/svg"
20
- {...props}
21
- >
22
- <g id="💎-icon/alert/WarningFill-yellow" transform="translate(1.000000, 1.000000)">
23
- <g id="Warning2" transform="translate(0.000000, 1.200000)">
24
- <path
25
- d="M17.9465423,14.8670135 L9.44311247,0.246687943 C9.35049358,0.100809118 9.18936767,0.012383152 9.01617259,0.012383152 C8.84297751,0.012383152 8.68185161,
26
- 0.100809118 8.58923271,0.246687943 L0.0706452929,14.8670135 C-0.0142965839,15.0216954 -0.0118890438,15.2093943 0.0769925071,15.3618609 C0.165874058,
27
- 15.5143276 0.328282319,15.6093523 0.505163987,15.6123832 L17.5120236,15.6123832 C17.6889052,15.6093523 17.8513135,15.5143276 17.940195,15.3618609 C18.0290766,
28
- 15.2093943 18.0314841,15.0216954 17.9465423,14.8670135 Z"
29
- id="Shape"
30
- fill={props.color}
31
- fillRule="nonzero"
32
- ></path>
33
- <path
34
- d="M8.19,12.84 C8.16437588,12.6281014 8.2368299,12.4160897 8.38677958,12.2641927 C8.53672927,12.1122956 8.74778837,12.0371121 8.96,12.06 C9.16715704,
35
- 12.0467652 9.37034806,12.1211477 9.52,12.265 C9.65709398,12.4241339 9.72701115,12.6303 9.715,12.84 C9.72048715,13.0522748 9.64341383,13.2584012 9.5,
36
- 13.415 C9.35312473,13.5641498 9.1489517,13.6425377 8.94,13.63 C8.72997224,13.6424095 8.52401376,13.5683367 8.37,13.425 C8.23531653,13.2613056 8.17063593,
37
- 13.0510936 8.19,12.84 Z M9.415,11.195 L8.5,11.195 L8.25,5.96 L9.675,5.96 L9.415,11.195 Z"
38
- id="Shape"
39
- fill="#FFFFFF"
40
- fillRule="nonzero"
41
- ></path>
42
- </g>
43
- </g>
44
- </SvgIcon>
45
- );
46
- };
47
-
48
- export default WarningIcon;
@@ -1,3 +0,0 @@
1
- <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M17.07 2.92999C15.4338 1.29429 13.2811 0.276523 10.9786 0.0501185C8.67611 -0.176286 6.36637 0.402675 4.44291 1.68835C2.51945 2.97403 1.1013 4.88687 0.430089 7.10094C-0.241121 9.31502 -0.123857 11.6933 0.761901 13.8306C1.64766 15.9679 3.24711 17.732 5.28771 18.8222C7.32831 19.9125 9.68381 20.2614 11.9528 19.8096C14.2219 19.3578 16.2641 18.1332 17.7314 16.3445C19.1988 14.5557 20.0005 12.3136 20 9.99999C19.9994 7.34804 18.9455 4.80491 17.07 2.92999ZM9 5.37999C9 5.11477 9.10536 4.86041 9.29289 4.67288C9.48043 4.48534 9.73478 4.37999 10 4.37999C10.2652 4.37999 10.5196 4.48534 10.7071 4.67288C10.8946 4.86041 11 5.11477 11 5.37999V10.6C11 10.8652 10.8946 11.1196 10.7071 11.3071C10.5196 11.4946 10.2652 11.6 10 11.6C9.73478 11.6 9.48043 11.4946 9.29289 11.3071C9.10536 11.1196 9 10.8652 9 10.6V5.37999ZM10 15.51C9.74684 15.51 9.49936 15.4349 9.28887 15.2943C9.07837 15.1536 8.91431 14.9537 8.81743 14.7198C8.72055 14.4859 8.6952 14.2286 8.74459 13.9803C8.79398 13.732 8.91589 13.5039 9.0949 13.3249C9.27391 13.1459 9.50199 13.024 9.75028 12.9746C9.99858 12.9252 10.2559 12.9505 10.4898 13.0474C10.7237 13.1443 10.9236 13.3084 11.0643 13.5189C11.2049 13.7294 11.28 13.9768 11.28 14.23C11.28 14.5695 11.1451 14.895 10.9051 15.1351C10.665 15.3751 10.3395 15.51 10 15.51Z" fill="#C81D1D"/>
3
- </svg>
@@ -1,19 +0,0 @@
1
- import { ReactElement } from 'react';
2
-
3
- /* eslint-disable max-len */
4
- import { SvgIcon, SvgIconProps } from '@mui/material';
5
-
6
- const Home = (props: SvgIconProps): ReactElement => {
7
- return (
8
- <SvgIcon viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" data-testid="home" {...props}>
9
- <path
10
- fillRule="evenodd"
11
- clipRule="evenodd"
12
- d="M23.77 12.4971C23.8226 12.577 23.8694 12.6606 23.91 12.7471C23.9626 12.8911 23.9864 13.044 23.98 13.1971C23.9839 13.3413 23.9566 13.4845 23.9 13.6171C23.8531 13.7514 23.7781 13.8741 23.68 13.9771C23.5815 14.0833 23.4624 14.1683 23.33 14.2271C23.206 14.2775 23.0738 14.3046 22.94 14.3071C22.7944 14.3048 22.651 14.2706 22.52 14.2071C22.3902 14.1445 22.2745 14.056 22.18 13.9471L12.28 3.33713C12.2277 3.27493 12.1581 3.22968 12.08 3.20713C12.0087 3.18275 11.9313 3.18275 11.86 3.20713C11.803 3.22861 11.7517 3.26281 11.71 3.30713L1.8 13.9271C1.70627 14.0302 1.59203 14.1126 1.46459 14.169C1.33716 14.2254 1.19935 14.2545 1.06 14.2545C0.920651 14.2545 0.78284 14.2254 0.655406 14.169C0.527971 14.1126 0.413727 14.0302 0.32 13.9271C0.217842 13.8273 0.136296 13.7084 0.08 13.5771C0.0284697 13.4396 0.00139518 13.294 0 13.1471C0.0013101 13.0035 0.0284068 12.8612 0.08 12.7271C0.136065 12.5928 0.217559 12.4705 0.32 12.3671L10.26 1.77713C10.6011 1.40957 11.0475 1.15652 11.538 1.05268C12.0286 0.94884 12.5393 0.999295 13 1.19713C13.2985 1.33692 13.5643 1.53794 13.78 1.78713L15.33 3.48713V3.10713C15.3302 2.82197 15.4372 2.54724 15.63 2.33713C15.7244 2.23535 15.8389 2.15434 15.9663 2.09925C16.0937 2.04415 16.2312 2.01619 16.37 2.01713H20C20.1486 2.0007 20.2989 2.01779 20.44 2.06713C20.5669 2.12598 20.6821 2.20728 20.78 2.30713C20.8776 2.41428 20.9525 2.54016 21 2.67713C21.0449 2.80898 21.0652 2.94794 21.06 3.08713V9.56713L23.77 12.4971ZM19 7.33713V4.17713H17.42V5.67713L19 7.33713ZM19.28 13.94C19.4773 13.7598 19.7329 13.6569 20 13.65C20.2667 13.6586 20.5217 13.7613 20.72 13.94C20.8169 14.0298 20.8951 14.1378 20.95 14.258C21.0049 14.3781 21.0355 14.508 21.04 14.64V22.02C21.0355 22.152 21.0049 22.2819 20.95 22.402C20.8951 22.5222 20.8169 22.6302 20.72 22.72C20.5232 22.8997 20.2665 22.9996 20 23H14.22C13.9504 23.0001 13.6903 22.9004 13.49 22.72C13.3949 22.6294 13.3185 22.5209 13.2653 22.4008C13.2121 22.2807 13.1831 22.1513 13.18 22.02V16.66C13.18 16.6134 13.1691 16.5675 13.1483 16.5258C13.1275 16.4842 13.0972 16.4479 13.06 16.42C13.0207 16.3807 12.9739 16.3498 12.9223 16.3292C12.8707 16.3086 12.8155 16.2986 12.76 16.3H11.3C11.2443 16.2974 11.1887 16.3068 11.137 16.3275C11.0852 16.3482 11.0385 16.3797 11 16.42C10.9597 16.4426 10.9252 16.4743 10.8992 16.5124C10.8732 16.5506 10.8564 16.5943 10.85 16.64V22.04C10.851 22.173 10.8229 22.3046 10.7676 22.4255C10.7123 22.5464 10.6312 22.6538 10.53 22.74C10.4345 22.8321 10.3217 22.9043 10.1981 22.9523C10.0745 23.0004 9.94256 23.0234 9.80997 23.02H3.99997C3.85815 23.0235 3.71703 22.9988 3.58484 22.9473C3.45265 22.8958 3.33202 22.8186 3.22997 22.72C3.13304 22.6302 3.05485 22.5222 2.99993 22.402C2.945 22.2819 2.91443 22.152 2.90997 22.02V14.64C2.91311 14.5063 2.94305 14.3745 2.99802 14.2526C3.05298 14.1306 3.13186 14.0209 3.22997 13.93C3.43312 13.7554 3.69211 13.6594 3.95997 13.6594C4.22783 13.6594 4.48683 13.7554 4.68997 13.93C4.78627 14.0218 4.86329 14.1318 4.91652 14.2538C4.96975 14.3757 4.99812 14.507 4.99997 14.64V21.09H8.76997V16.68C8.7711 16.3671 8.83749 16.0578 8.9649 15.772C9.09232 15.4861 9.27797 15.23 9.50997 15.02C9.74648 14.8043 10.0212 14.6348 10.32 14.52C10.622 14.4001 10.9451 14.3423 11.27 14.35H12.73C13.3796 14.3465 14.0071 14.5854 14.49 15.02C14.7181 15.2289 14.9014 15.482 15.0286 15.7639C15.1558 16.0459 15.2243 16.3507 15.23 16.66V21.07H18.96V14.64C18.9609 14.5073 18.9899 14.3764 19.045 14.2557C19.1002 14.1351 19.1803 14.0275 19.28 13.94Z"
13
- fill={props?.color}
14
- />
15
- </SvgIcon>
16
- );
17
- };
18
-
19
- export default Home;
@@ -1,3 +0,0 @@
1
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path fill-rule="evenodd" clip-rule="evenodd" d="M0 9.98777C0 4.47167 4.46598 0 9.97505 0C15.4841 0 19.9501 4.47167 19.9501 9.98777C19.9501 11.7568 19.49 13.4205 18.6829 14.8629L23.2366 19.4844C24.2593 20.5223 24.2537 22.1921 23.2241 23.2231C22.1755 24.273 20.4704 24.2567 19.442 23.1869L15.0315 18.5988C13.5485 19.4736 11.8192 19.9755 9.97505 19.9755C4.46598 19.9755 0 15.5039 0 9.98777ZM16.6388 17.42L20.8646 21.8159C21.1265 22.0884 21.5608 22.0926 21.8279 21.8251C22.0902 21.5625 22.0916 21.1372 21.8311 20.8728L17.5309 16.5087C17.2531 16.8311 16.9551 17.1355 16.6388 17.42ZM9.97505 1.97696C5.55644 1.97696 1.97444 5.56352 1.97444 9.98777C1.97444 14.412 5.55644 17.9986 9.97505 17.9986C11.7025 17.9986 13.2995 17.4515 14.6063 16.5208C15.3948 15.9594 16.0773 15.2583 16.6179 14.454C17.4753 13.1784 17.9757 11.6431 17.9757 9.98777C17.9757 5.56352 14.3937 1.97696 9.97505 1.97696Z" fill="#5F5F5F"/>
3
- </svg>
@@ -1,10 +0,0 @@
1
- <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <g id="Check Circle">
3
- <circle id="Ellipse 70" cx="10" cy="10" r="10" fill="#5BAC85"/>
4
- <g id="check 12px">
5
- <g id="checkmark">
6
- <path id="Shape (Stroke)" fill-rule="evenodd" clip-rule="evenodd" d="M15.8051 5.79289C16.1956 6.18342 16.1956 6.81658 15.8051 7.20711L8.80508 14.2071C8.61742 14.3948 8.36287 14.5001 8.09748 14.5C7.8321 14.4999 7.57765 14.3943 7.39018 14.2064L3.79218 10.6014C3.40203 10.2105 3.40265 9.57735 3.79355 9.18721C4.18445 8.79706 4.81762 8.79768 5.20776 9.18858L8.09866 12.0851L14.3909 5.79289C14.7814 5.40237 15.4146 5.40237 15.8051 5.79289Z" fill="white"/>
7
- </g>
8
- </g>
9
- </g>
10
- </svg>
@@ -1,3 +0,0 @@
1
- <svg width="20" height="21" viewBox="0 0 20 21" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path fill-rule="evenodd" clip-rule="evenodd" d="M10 0C10.5523 0 11 0.447715 11 1V2.5H19C19.5523 2.5 20 2.94772 20 3.5C20 4.05228 19.5523 4.5 19 4.5H17.5V18C17.5 19.6569 16.1569 21 14.5 21H5.5C3.84315 21 2.5 19.6569 2.5 18V4.5H1C0.447715 4.5 0 4.05228 0 3.5C0 2.94772 0.447715 2.5 1 2.5H9V1C9 0.447715 9.44771 0 10 0ZM4.5 4.5V18C4.5 18.5523 4.94772 19 5.5 19H14.5C15.0523 19 15.5 18.5523 15.5 18V4.5H4.5ZM6.5 5.5C7.05228 5.5 7.5 5.94772 7.5 6.5V17C7.5 17.5523 7.05228 18 6.5 18C5.94772 18 5.5 17.5523 5.5 17V6.5C5.5 5.94772 5.94772 5.5 6.5 5.5ZM10 5.5C10.5523 5.5 11 5.94772 11 6.5V17C11 17.5523 10.5523 18 10 18C9.44771 18 9 17.5523 9 17V6.5C9 5.94772 9.44771 5.5 10 5.5ZM13.5 5.5C14.0523 5.5 14.5 5.94772 14.5 6.5V17C14.5 17.5523 14.0523 18 13.5 18C12.9477 18 12.5 17.5523 12.5 17V6.5C12.5 5.94772 12.9477 5.5 13.5 5.5Z" fill="#252525"/>
3
- </svg>
@@ -1,3 +0,0 @@
1
- export { default as NsIcon } from './NsIcon';
2
- export { default as NsIconVariants } from './NsIconVariants';
3
- export type { NsIconProps, NsIconNameType, NsIconSizeType } from './types.d';
@@ -1,53 +0,0 @@
1
- import { FoundationTheme } from '@nuskin/foundation-theme';
2
- import { HTMLProps } from 'react';
3
-
4
- import { NsIconVariants } from '.';
5
-
6
- export type NsIconSizeType = 'small' | 'medium' | 'large' | 'xLarge';
7
-
8
- export type NsIconNameType = keyof typeof NsIconVariants;
9
-
10
- export type NsIconProps = HTMLProps & {
11
- name: NsIconNameType;
12
- size?: NsIconSizeType;
13
- color?: FoundationTheme.PaletteColors;
14
- testId?: string;
15
- colorOverride?: string;
16
- cursor?:
17
- | 'auto'
18
- | 'default'
19
- | 'none'
20
- | 'context-menu'
21
- | 'help'
22
- | 'pointer'
23
- | 'progress'
24
- | 'wait'
25
- | 'cell'
26
- | 'crosshair'
27
- | 'text'
28
- | 'vertical-text'
29
- | 'alias'
30
- | 'copy'
31
- | 'move'
32
- | 'no-drop'
33
- | 'not-allowed'
34
- | 'grab'
35
- | 'grabbing'
36
- | 'e-resize'
37
- | 'n-resize'
38
- | 'ne-resize'
39
- | 'nw-resize'
40
- | 's-resize'
41
- | 'se-resize'
42
- | 'sw-resize'
43
- | 'w-resize'
44
- | 'ew-resize'
45
- | 'ns-resize'
46
- | 'nesw-resize'
47
- | 'nwse-resize'
48
- | 'col-resize'
49
- | 'row-resize'
50
- | 'all-scroll'
51
- | 'zoom-in'
52
- | 'zoom-out';
53
- };
@@ -1,42 +0,0 @@
1
- import React from 'react';
2
- import { render } from '@testing-library/react';
3
- import { BynderMedia } from './BynderMedia';
4
- import { ImageData1 } from '../card/fixtures/ImageData1';
5
-
6
- describe('BynderMedia', () => {
7
- const imageDetail = ImageData1;
8
- const suffix = 'mockSuffix';
9
- const className = 'mockClassName';
10
- const testId = 'mockTestId';
11
- const liveTag = { 'data-cslp': 'cslp' };
12
-
13
- it('1. renders video element for type VIDEO', () => {
14
- const selected = { url: 'mockVideoUrl', type: 'VIDEO' };
15
- const previewUrls = ['mockPreviewUrl1', 'mockPreviewUrl2'];
16
- const isPublic = true;
17
- const { container } = render(
18
- <BynderMedia
19
- imageDetail={{ ...imageDetail, files: {}, selected: selected as any, previewUrls, isPublic }}
20
- suffix={suffix}
21
- className={className}
22
- testId={testId}
23
- liveTag={liveTag}
24
- />
25
- );
26
- expect(container.querySelector('video')).toBeInTheDocument();
27
- });
28
-
29
- it('2. renders default element for non-VIDEO type', () => {
30
- const { container } = render(
31
- <BynderMedia
32
- imageDetail={imageDetail}
33
- suffix={suffix}
34
- className={className}
35
- testId={testId}
36
- liveTag={liveTag}
37
- />
38
- );
39
- expect(container.querySelector('video')).not.toBeInTheDocument();
40
- expect(container.querySelector('img')).toBeInTheDocument();
41
- });
42
- });
@@ -1,49 +0,0 @@
1
- import { ReactElement } from 'react';
2
-
3
- import { CslpTag } from '../common.types';
4
- /* eslint-disable @next/next/no-img-element */
5
- import { getImageType, getMediaUrl, getUrlBasedOnDerivative } from './bynder-util';
6
- import { BynderImageDataType } from './types';
7
-
8
- type BynderMediaProps = {
9
- imageDetail: BynderImageDataType;
10
- suffix?: string;
11
- className?: string;
12
- testId?: string;
13
- liveTag?: CslpTag;
14
- };
15
- export const BynderMedia = ({ imageDetail, suffix, className, testId, liveTag }: BynderMediaProps): ReactElement => {
16
- const { files, name, selected, previewUrls, isPublic } = imageDetail;
17
- const { url = '', fit, position, altText = '', bgColor, type } = selected ?? {};
18
- const imageDerivativeType = getImageType(url, name, files);
19
- const mediaUrl = getMediaUrl(selected, isPublic, previewUrls);
20
- let transformedMediaUrl = getUrlBasedOnDerivative(mediaUrl, imageDerivativeType, suffix ?? '');
21
- if (type === 'VIDEO') {
22
- return (
23
- <div {...liveTag}>
24
- <video
25
- loop
26
- autoPlay
27
- muted
28
- width="100%"
29
- style={{ backgroundColor: bgColor, objectFit: fit, objectPosition: position }}
30
- className={`${className || ''} bynder-image`}
31
- data-testid={testId || 'test-bynder-video'}
32
- >
33
- <source src={transformedMediaUrl} type="video/mp4" />
34
- <source src={transformedMediaUrl} type="video/ogg" />
35
- </video>
36
- </div>
37
- );
38
- }
39
- return (
40
- <img
41
- {...liveTag}
42
- data-testid={testId || 'test-bynder-image'}
43
- className={`${className || ''} bynder-image`}
44
- src={transformedMediaUrl}
45
- alt={altText}
46
- style={{ backgroundColor: bgColor, objectFit: fit, objectPosition: position }}
47
- />
48
- );
49
- };
@@ -1,60 +0,0 @@
1
- import { render, screen } from '@/test-utils/index';
2
- import { NsImage } from '../';
3
-
4
- describe('NsImage component', () => {
5
- it('1. renders', () => {
6
- const alt = 'test image';
7
- render(<NsImage src="image.jpg" width={300} height={300} alt={alt} />);
8
- const imgElement = screen.getByAltText(alt);
9
- expect(imgElement).toBeInTheDocument();
10
- });
11
-
12
- it('2. renders with correct src and alt attributes', () => {
13
- const src = 'image.jpg';
14
- const alt = 'test image';
15
- const { getByAltText } = render(<NsImage src={src} alt={alt} />);
16
- const image = getByAltText(alt);
17
- expect(image).toHaveAttribute('src', src);
18
- });
19
-
20
- it('3. renders with width and height if variant is not provided', () => {
21
- const { getByAltText } = render(<NsImage src="image.jpg" alt="test image" width={300} height={300} />);
22
- const image = getByAltText('test image');
23
- expect(image).toHaveAttribute('width', '300');
24
- expect(image).toHaveAttribute('height', '300');
25
- });
26
-
27
- it('4. renders with correct width and height based on variant', () => {
28
- const { getByAltText } = render(<NsImage src="image.jpg" alt="test image" variant="icon" />);
29
- const image = getByAltText('test image');
30
- expect(image).toHaveAttribute('width', '60');
31
- expect(image).toHaveAttribute('height', '60');
32
- });
33
-
34
- it('5. renders with correct width and height if variant is "fill"', () => {
35
- const { getByAltText } = render(<NsImage src="image.jpg" alt="test image" variant="fill" />);
36
- const image = getByAltText('test image');
37
- expect(image).toHaveAttribute('width', '100%');
38
- expect(image).toHaveAttribute('height', 'auto');
39
- });
40
-
41
- it('6. renders with correct width and height if variant is "award"', () => {
42
- const { getByAltText } = render(<NsImage src="image.jpg" alt="test image" variant="award" />);
43
- const image = getByAltText('test image');
44
- expect(image).toHaveAttribute('width', '130');
45
- expect(image).toHaveAttribute('height', '130');
46
- });
47
-
48
- it('7. renders with correct width and height if variant is "product"', () => {
49
- const { getByAltText } = render(<NsImage src="image.jpg" alt="test image" variant="product" />);
50
- const image = getByAltText('test image');
51
- expect(image).toHaveAttribute('width', '300');
52
- expect(image).toHaveAttribute('height', '300');
53
- });
54
-
55
- it('8. renders with additional props', () => {
56
- const { getByAltText } = render(<NsImage src="image.jpg" alt="test image" className="custom-image" />);
57
- const image = getByAltText('test image');
58
- expect(image).toHaveClass('custom-image');
59
- });
60
- });
@@ -1,46 +0,0 @@
1
- import type { StoryObj, Meta } from '@storybook/react';
2
- import { withCenterDecorator } from '@/stories/decorators/withCenterDecorator';
3
- import { NsImage } from './';
4
-
5
- type ComponentType = typeof NsImage;
6
- type Story = StoryObj<ComponentType>;
7
- type MetaStory = Meta<ComponentType>;
8
-
9
- export default {
10
- title: 'Components/Data Display/NsImage',
11
- component: NsImage,
12
- decorators: [withCenterDecorator],
13
- args: {
14
- src: 'https://media.nuskin.com/m/42911c8b05600476/webimage-brand-ageloc-optweb.png',
15
- width: 300,
16
- height: 300,
17
- alt: 'pharmanex-brand image',
18
- },
19
- } as MetaStory;
20
-
21
- export const NavigationImage: Story = {
22
- args: {
23
- src: 'https://www.nuskin.com/content/dam/global/library/aug2022/01130171-lumispa-io-norm-combo.jpg',
24
- width: 200,
25
- height: 200,
26
- alt: 'lumispa-combo',
27
- },
28
- };
29
-
30
- export const NavigationBannerImage: Story = {
31
- args: {
32
- src: 'https://www.nuskin.com/content/dam/global/library/feb2020/Navigation-images-Skin-Carev2.jpg',
33
- width: 340,
34
- height: 610,
35
- alt: 'lumispa-combo',
36
- },
37
- };
38
-
39
- export const AwardImage: Story = {
40
- args: {
41
- src: 'https://media.nuskin.com/m/5a9a99eccfde58c6/webimage-winner-global-makeup-awards-2022.png',
42
- width: 130,
43
- height: 130,
44
- alt: 'global-makeup-award',
45
- },
46
- };
@@ -1,33 +0,0 @@
1
- import { ReactElement } from 'react';
2
-
3
- import { NsImageProps } from './types';
4
-
5
- // eslint-disable-next-line no-unused-vars
6
- const NsImage = ({ src, width, height, alt, variant, ...rest }: NsImageProps): ReactElement => {
7
- let cHeight, cWidth;
8
- switch (variant) {
9
- case 'product':
10
- cHeight = 300;
11
- cWidth = 300;
12
- break;
13
- case 'icon':
14
- cHeight = 60;
15
- cWidth = 60;
16
- break;
17
- case 'award':
18
- cHeight = 130;
19
- cWidth = 130;
20
- break;
21
- case 'fill':
22
- cHeight = 'auto';
23
- cWidth = '100%';
24
- break;
25
- default:
26
- cHeight = height;
27
- cWidth = width;
28
- break;
29
- }
30
- // eslint-disable-next-line @next/next/no-img-element
31
- return <img src={src} alt={alt} height={cHeight} width={cWidth} {...rest} />;
32
- };
33
- export default NsImage;
@@ -1,10 +0,0 @@
1
- import { render, screen } from '@/test-utils/index';
2
- import NsNextImage from './NsNextImage';
3
- describe('NsNextImage', () => {
4
- it('test image element renders', () => {
5
- const altText = 'dummy image';
6
- render(<NsNextImage src="https://www.google.com" width="300" height="300" alt={altText} />);
7
- const imgElement = screen.getByAltText(altText);
8
- expect(imgElement).toBeInTheDocument();
9
- });
10
- });
@@ -1,51 +0,0 @@
1
- import { NsNextImage } from '.';
2
- import { withCenterDecorator } from '@/stories/decorators/withCenterDecorator';
3
- import type { StoryObj, Meta } from '@storybook/react';
4
-
5
- type ComponentType = typeof NsNextImage;
6
- type Story = StoryObj<ComponentType>;
7
- type MetaStory = Meta<ComponentType>;
8
-
9
- export default {
10
- title: 'Components/Data Display/NsNextImage',
11
- component: NsNextImage,
12
- decorators: [withCenterDecorator],
13
- } as MetaStory;
14
-
15
- export const BrandImage: Story = {
16
- args: {
17
- src: 'https://media.nuskin.com/m/42911c8b05600476/webimage-brand-ageloc-optweb.png',
18
- width: 300,
19
- height: 300,
20
- unoptimized: true,
21
- },
22
- };
23
- export const NavigationImage: Story = {
24
- args: {
25
- src: 'https://www.nuskin.com/content/dam/global/library/aug2022/01130171-lumispa-io-norm-combo.jpg',
26
- width: 200,
27
- height: 200,
28
- alt: 'lumispa-combo',
29
- unoptimized: true,
30
- },
31
- };
32
-
33
- export const NavigationBannerImage: Story = {
34
- args: {
35
- src: 'https://www.nuskin.com/content/dam/global/library/feb2020/Navigation-images-Skin-Carev2.jpg',
36
- width: 340,
37
- height: 610,
38
- alt: 'lumispa-combo',
39
- unoptimized: true,
40
- },
41
- };
42
-
43
- export const AwardImage: Story = {
44
- args: {
45
- src: 'https://media.nuskin.com/m/5a9a99eccfde58c6/webimage-winner-global-makeup-awards-2022.png',
46
- width: 130,
47
- height: 130,
48
- alt: 'global-makeup-award',
49
- unoptimized: true,
50
- },
51
- };
@@ -1,11 +0,0 @@
1
- import { ReactElement } from 'react';
2
-
3
- import Image from 'next/image';
4
-
5
- import { NsNextImageProps } from './types';
6
-
7
- const NsNextImage = ({ src, width, height, alt, fill, priority, ...props }: NsNextImageProps): ReactElement => {
8
- return <Image src={src} width={width} height={height} alt={alt} fill={fill} priority={priority} {...props} />;
9
- };
10
-
11
- export default NsNextImage;