@nuskin/foundation-ui-components 1.16.0 → 1.17.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/foundation-ui-components",
3
- "version": "1.16.0",
3
+ "version": "1.17.0",
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,6 +1,6 @@
1
1
  import Box from '@mui/material/Box';
2
2
  import { styled } from '@nuskin/foundation-theme';
3
- import { NsImage } from '../';
3
+ import { NsImage, NsTypography } from '../';
4
4
 
5
5
  type NsAwardCardProps = {
6
6
  title: string;
@@ -29,25 +29,13 @@ const CardContainer = styled(Box)(() => {
29
29
  flexDirection: 'column',
30
30
  textAlign: 'center',
31
31
  alignItems: 'center',
32
+ marginTop: '25px',
32
33
  },
33
- '.title': {
34
- fontSize: '16px',
35
- fontWeight: 'bold',
36
- marginTop: '30px',
37
- },
38
- '.awardName': {
39
- fontSize: '16px',
40
- fontWeight: '400',
41
- marginTop: '20px',
42
- },
43
- '.mediaOutlet': {
44
- fontSize: '11px',
45
- fontWeight: '400',
34
+ '.content-text': {
46
35
  marginTop: '20px',
47
36
  },
48
37
  '.action-link': {
49
38
  marginTop: '10px',
50
- fontSize: '14px',
51
39
  alignSelf: 'start',
52
40
  },
53
41
  };
@@ -65,9 +53,15 @@ export default function NsAwardCard({
65
53
  <CardContainer className={className} role="award-card" component="div" data-testid="award-card">
66
54
  <NsImage alt={backgroundImageAlt} src={backgroundImageUrl} className="image" />
67
55
  <div className="content">
68
- <article className="title">{title}</article>
69
- <article className="awardName">{awardName}</article>
70
- <article className="mediaOutlet">{mediaOutlet}</article>
56
+ <NsTypography weight='normal' className="title" variant="h5">
57
+ {title}
58
+ </NsTypography>
59
+ <NsTypography className="content-text" variant="body-l">
60
+ {awardName}
61
+ </NsTypography>
62
+ <NsTypography className="content-text" variant="body-l">
63
+ {mediaOutlet}
64
+ </NsTypography>
71
65
  </div>
72
66
  </CardContainer>
73
67
  );
@@ -38,7 +38,6 @@ const CardContainer = styled((props: any) => <Box {...props} />)(({ size }) => {
38
38
  flexDirection: 'column',
39
39
  '.brand-title': {
40
40
  marginTop: '15px',
41
- fontSize: '20px',
42
41
  display: 'inline-block',
43
42
  wordBreak: 'break-word',
44
43
  },
@@ -75,7 +74,7 @@ export default function NsBrandCard({
75
74
  </NsBrandWrapper>
76
75
  </NsBgCard>
77
76
  {title ? (
78
- <NsTypography variant="h3" className="brand-title">
77
+ <NsTypography weight='normal' variant="h5" className="brand-title">
79
78
  {title}
80
79
  </NsTypography>
81
80
  ) : null}
@@ -1,5 +1,5 @@
1
1
  import Box from '@mui/material/Box';
2
- import { NsImage } from '../';
2
+ import { NsImage, NsTypography } from '../';
3
3
  import { styled } from '@nuskin/foundation-theme';
4
4
 
5
5
  type NsPostProps = {
@@ -22,16 +22,14 @@ const CardContainer = styled(Box)(() => {
22
22
  width: '210px',
23
23
  backgroundColor: '#fff',
24
24
  '.content': {
25
- padding: '10px',
25
+ paddingTop: '10px',
26
26
  display: 'flex',
27
27
  flexDirection: 'column',
28
28
  minHeight: '80px',
29
29
  justifyContent: 'space-between',
30
30
  },
31
31
  '.body-title': {
32
- fontSize: '18px',
33
32
  marginBottom: '5px',
34
- fontWeight: 600,
35
33
  display: '-webkit-box',
36
34
  '-webkit-box-orient': 'vertical',
37
35
  '-webkit-line-clamp': '3',
@@ -39,7 +37,6 @@ const CardContainer = styled(Box)(() => {
39
37
  textOverflow: 'ellipsis',
40
38
  },
41
39
  '.body-text': {
42
- fontSize: '12px',
43
40
  color: '#8C8C8C',
44
41
  marginBottom: '5px',
45
42
  },
@@ -53,8 +50,8 @@ const NsPost = ({ text, body, backgroundImageUrl, backgroundImageAlt, className
53
50
  <NsImage height="auto" width="100%" alt={backgroundImageAlt} src={backgroundImageUrl} />
54
51
  </div>
55
52
  <div className="content">
56
- <article className="body-title">{text}</article>
57
- <article className="body-text">{body}</article>
53
+ <NsTypography weight='normal' className="body-title" variant='h5'>{text}</NsTypography>
54
+ <NsTypography className="body-text" variant='body-l'>{body}</NsTypography>
58
55
  </div>
59
56
  </CardContainer>
60
57
  );
@@ -14,8 +14,6 @@ This component is visible over the carousal and it has prev and next buttons and
14
14
  const Wrapper = styled.div`
15
15
  display: flex;
16
16
  justify-content: flex-end;
17
- padding: 0 30px;
18
- margin: 30px 20px;
19
17
  `;
20
18
  const InnerWrapper = styled.div`
21
19
  display: flex;
@@ -28,7 +26,7 @@ const CarousalControl = ({ next, prev, viewAllUrl, viewAllLabel }: CarousalContr
28
26
  <InnerWrapper>
29
27
  {viewAllUrl ? (
30
28
  <NsLink href={viewAllUrl} underlineOnHover={false}>
31
- <NsTypography decoration="underline" variant={'h5'}>
29
+ <NsTypography decoration="underline" variant="body-l">
32
30
  {viewAllLabel}
33
31
  </NsTypography>
34
32
  </NsLink>
@@ -18,7 +18,7 @@ const Wrapper = styled(
18
18
  border: `2px solid ${strokeColor}`,
19
19
  borderRadius: '3px',
20
20
  cursor: 'pointer',
21
- padding: '6px 10px',
21
+ padding: '9px',
22
22
  boxSizing: 'content-box',
23
23
  };
24
24
  });
@@ -11,7 +11,7 @@ import 'slick-carousel/slick/slick.css';
11
11
 
12
12
  const SlickContainer = styled(Box)(() => {
13
13
  return {
14
- padding: '20px 0 50px',
14
+ padding: '30px 0 60px',
15
15
  '.slick-slide': {
16
16
  display: 'flex',
17
17
  justifyContent: 'center',
@@ -55,7 +55,6 @@ export default function NsCarousal({
55
55
  ) : null}
56
56
  <Slider {...{ ...defaultCarousalSettings, ...settings }} ref={sliderRef as any}>
57
57
  {entries.map((entry, index) => {
58
-
59
58
  return renderEntry(entry, index);
60
59
  })}
61
60
  </Slider>