@ndlib/component-library 0.0.115 → 0.0.118
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.
|
@@ -28,5 +28,8 @@ export const DEFAULT_MESSAGE = 'No results found.';
|
|
|
28
28
|
export const EmptyState = (_a) => {
|
|
29
29
|
var { omitIcon, icon, children, size: sizeProp, sx } = _a, rest = __rest(_a, ["omitIcon", "icon", "children", "size", "sx"]);
|
|
30
30
|
const size = sizeProp || EMPTY_STATE_SIZE.LG;
|
|
31
|
-
return (_jsxs(Column, Object.assign({ sx: Object.assign({ width: '100%', alignItems: 'center', justifyContent: 'center', mt: size === EMPTY_STATE_SIZE.SM ? 3 : 5 }, sx) }, rest, { children: [_jsx(Row, { children: omitIcon ? null : (_jsx(Icon, { icon: icon || SearchOffIcon, size: size === EMPTY_STATE_SIZE.SM ? FONT_SIZE.ML : FONT_SIZE.XL, color: COLOR.GRAY })) }), _jsx(Row, Object.assign({ sx: { mt: size === EMPTY_STATE_SIZE.SM ? 0 : 1 } }, { children: _jsx(Paragraph, Object.assign({ sx: {
|
|
31
|
+
return (_jsxs(Column, Object.assign({ sx: Object.assign({ width: '100%', alignItems: 'center', justifyContent: 'center', mt: size === EMPTY_STATE_SIZE.SM ? 3 : 5 }, sx) }, rest, { children: [_jsx(Row, { children: omitIcon ? null : (_jsx(Icon, { icon: icon || SearchOffIcon, size: size === EMPTY_STATE_SIZE.SM ? FONT_SIZE.ML : FONT_SIZE.XL, color: COLOR.GRAY })) }), _jsx(Row, Object.assign({ sx: { mt: size === EMPTY_STATE_SIZE.SM ? 0 : 1 } }, { children: _jsx(Paragraph, Object.assign({ sx: {
|
|
32
|
+
color: COLOR.GRAY,
|
|
33
|
+
mt: 0,
|
|
34
|
+
}, size: size === EMPTY_STATE_SIZE.SM ? PARAGRAPH_SIZE.MD : PARAGRAPH_SIZE.LG }, { children: children || DEFAULT_MESSAGE })) }))] })));
|
|
32
35
|
};
|
|
@@ -59,7 +59,17 @@ export const Heading = (_a) => {
|
|
|
59
59
|
LEVEL_TYPOGRAPHY_MAP[level];
|
|
60
60
|
}
|
|
61
61
|
const typographyStyles = getTypographyStyles(typography);
|
|
62
|
-
const
|
|
62
|
+
const getMarginHeightMultiple = (level) => {
|
|
63
|
+
if (level > 4) {
|
|
64
|
+
return 0.75;
|
|
65
|
+
}
|
|
66
|
+
if (level === 1 || level === 2) {
|
|
67
|
+
return 0.375;
|
|
68
|
+
}
|
|
69
|
+
return 0.55;
|
|
70
|
+
};
|
|
71
|
+
const marginHeightMultiple = theme.lineHeights[typographyStyles.lineHeight] *
|
|
72
|
+
getMarginHeightMultiple(level);
|
|
63
73
|
const fontSize = theme.fontSizes[typographyStyles.fontSize];
|
|
64
74
|
const topMargin = multiplyRemSize({
|
|
65
75
|
size: fontSize,
|
|
@@ -29,7 +29,7 @@ export const Paragraph = (_a) => {
|
|
|
29
29
|
const theme = useTheme();
|
|
30
30
|
const typography = typographyParam || SIZE_TYPOGRAPHY_MAP[size || PARAGRAPH_SIZE.MD];
|
|
31
31
|
const typographyStyles = getTypographyStyles(typography);
|
|
32
|
-
const marginHeightMultiple = theme.lineHeights[typographyStyles.lineHeight] * 0.
|
|
32
|
+
const marginHeightMultiple = theme.lineHeights[typographyStyles.lineHeight] * 0.7;
|
|
33
33
|
const fontSize = theme.fontSizes[typographyStyles.fontSize];
|
|
34
34
|
const topMargin = multiplyRemSize({
|
|
35
35
|
size: fontSize,
|