@nuskin/foundation-ui-components 1.20.1 → 1.21.0-cx130-1031.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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuskin/foundation-ui-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.21.0-cx130-1031.2",
|
|
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 React, { useMemo } from 'react';
|
|
2
2
|
|
|
3
|
-
import { AccordionItem, NsAccordionItem, NsAccordionProps, useAccordionMap } from '..';
|
|
3
|
+
import { AccordionItem, NsAccordionItem, NsAccordionProps, NsTypography, useAccordionMap } from '..';
|
|
4
4
|
import { StyledAccordionWrapper } from './ToggleSection.styled';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -58,7 +58,11 @@ const NsAccordion = ({
|
|
|
58
58
|
openedIconName={openedIconName}
|
|
59
59
|
startIcon={item.icon}
|
|
60
60
|
toggleOpen={() => toggleOpen(createKey(item, index))}
|
|
61
|
-
title={
|
|
61
|
+
title={
|
|
62
|
+
<NsTypography weight="bold" variant="h6" className="nsa-item-title">
|
|
63
|
+
{item.title}
|
|
64
|
+
</NsTypography>
|
|
65
|
+
}
|
|
62
66
|
variant={variant}
|
|
63
67
|
/>
|
|
64
68
|
);
|
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
import { styled } from '@nuskin/foundation-theme';
|
|
2
2
|
import { isValidElement, ReactElement, useMemo } from 'react';
|
|
3
3
|
|
|
4
|
-
import {
|
|
5
|
-
AccordionContentTypeObject,
|
|
6
|
-
AccordionItem,
|
|
7
|
-
AccordionVariant,
|
|
8
|
-
AccordionVariantType,
|
|
9
|
-
NsAccordion,
|
|
10
|
-
NsCollapseProps,
|
|
11
|
-
} from '../';
|
|
4
|
+
import { AccordionContentTypeObject, AccordionItem, AccordionVariant, AccordionVariantType, NsAccordion, NsCollapseProps, NsTypography } from '../';
|
|
12
5
|
import { getAccordionColor } from './colorMap';
|
|
13
6
|
|
|
14
7
|
const getLevelOffset = (level: number) => {
|
|
@@ -70,17 +63,19 @@ const NsCollapse = ({
|
|
|
70
63
|
}
|
|
71
64
|
if (type === AccordionContentTypeObject.html) {
|
|
72
65
|
return (
|
|
73
|
-
<
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
66
|
+
<NsTypography variant="body-m">
|
|
67
|
+
<div
|
|
68
|
+
className="nsa-content-padded"
|
|
69
|
+
dangerouslySetInnerHTML={{ __html: content as string }}
|
|
70
|
+
{...(cslp?.content ?? {})}
|
|
71
|
+
/>
|
|
72
|
+
</NsTypography>
|
|
78
73
|
);
|
|
79
74
|
} else if (type === AccordionContentTypeObject.text) {
|
|
80
75
|
return (
|
|
81
|
-
<
|
|
76
|
+
<NsTypography variant="body-m" className="p-4" {...(cslp?.content ?? {})}>
|
|
82
77
|
{content as string}
|
|
83
|
-
</
|
|
78
|
+
</NsTypography>
|
|
84
79
|
);
|
|
85
80
|
} else if (type === AccordionContentTypeObject.accordion) {
|
|
86
81
|
return (
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { NsCardButton } from './types';
|
|
1
2
|
import Box from '@mui/material/Box';
|
|
2
3
|
import { styled } from '@nuskin/foundation-theme';
|
|
3
4
|
|
|
4
5
|
import { NsImage, NsTypography } from '../';
|
|
5
6
|
import CardButton from './CardButton';
|
|
6
|
-
import { NsCardButton } from './types';
|
|
7
7
|
|
|
8
8
|
type NsMediumCardProps = {
|
|
9
9
|
title: string;
|
|
@@ -22,9 +22,8 @@ const textVariantButton = {
|
|
|
22
22
|
span: {
|
|
23
23
|
margin: 0,
|
|
24
24
|
},
|
|
25
|
-
'>div': {
|
|
25
|
+
'> div': {
|
|
26
26
|
margin: 0,
|
|
27
|
-
borderBottom: '1px solid #252525',
|
|
28
27
|
},
|
|
29
28
|
'.MuiButton-endIcon': {
|
|
30
29
|
svg: {
|