@manamerge/mana-atomic-ui 1.0.46 → 1.0.48
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/dist/index.d.ts +1 -2
- package/dist/index.js +12 -7
- package/dist/index.js.map +1 -1
- package/dist/themes/themes/ManamergeTheme.ts +5 -3
- package/dist/themes/themes/manamerge/fonts/Gilmer-Bold.woff2 +0 -0
- package/dist/themes/themes/manamerge/fonts/Gilmer-Heavy.woff2 +0 -0
- package/dist/themes/themes/manamerge/fonts/Gilmer-Light.woff2 +0 -0
- package/dist/themes/themes/manamerge/fonts/Gilmer-Medium.woff2 +0 -0
- package/dist/themes/themes/manamerge/fonts/Gilmer-Regular.woff2 +0 -0
- package/dist/themes/themes/manamerge/miscellaneous/colorpalette.ts +1 -0
- package/dist/themes/themes/manamerge/miscellaneous/fontsizes.ts +2 -1
- package/dist/themes/themes/manamerge/molecules/cardSimpleRender.ts +3 -2
- package/dist/themes/themes/manamerge/molecules/navigation.ts +1 -2
- package/dist/types/components/Atoms/Heading/Heading.d.ts +1 -1
- package/dist/types/components/Atoms/Text/Text.d.ts +0 -1
- package/dist/types/components/Molecules/CardSimpleRender/CardSimpleRender.stories copy.d.ts +11 -0
- package/dist/types/themes/ManamergeTheme.d.ts +13 -13
- package/dist/types/themes/manamerge/molecules/cardSimpleRender.d.ts +1 -0
- package/dist/types/themes/manamerge/molecules/navigation.d.ts +0 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -18,7 +18,6 @@ interface TextTypes {
|
|
|
18
18
|
htmlFor?: string;
|
|
19
19
|
margin?: string;
|
|
20
20
|
color?: string;
|
|
21
|
-
fontSize?: string;
|
|
22
21
|
lineHeight?: string;
|
|
23
22
|
fontWeight?: string | number;
|
|
24
23
|
tag?: keyof JSX.IntrinsicElements;
|
|
@@ -31,7 +30,7 @@ declare const Text: React.FC<TextTypes>;
|
|
|
31
30
|
interface HeadingTypes {
|
|
32
31
|
variant?: string;
|
|
33
32
|
children: ReactNode;
|
|
34
|
-
as
|
|
33
|
+
as?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
35
34
|
}
|
|
36
35
|
declare const Heading: React.FC<HeadingTypes>;
|
|
37
36
|
|
package/dist/index.js
CHANGED
|
@@ -145,7 +145,8 @@ const TextContainer = styled.p `
|
|
|
145
145
|
const textStyles = ((_b = theme === null || theme === void 0 ? void 0 : theme.text) === null || _b === void 0 ? void 0 : _b[variant]) || {};
|
|
146
146
|
return css `
|
|
147
147
|
margin: ${(props === null || props === void 0 ? void 0 : props.margin) || (textStyles === null || textStyles === void 0 ? void 0 : textStyles.margin)};
|
|
148
|
-
font-size: ${((_c = theme.fontsizes) === null || _c === void 0 ? void 0 : _c[props === null || props === void 0 ? void 0 : props.vFontSize]) ||
|
|
148
|
+
font-size: ${((_c = theme.fontsizes) === null || _c === void 0 ? void 0 : _c[props === null || props === void 0 ? void 0 : props.vFontSize]) ||
|
|
149
|
+
(textStyles === null || textStyles === void 0 ? void 0 : textStyles.vFontSize)};
|
|
149
150
|
line-height: ${(props === null || props === void 0 ? void 0 : props.lineHeight) || (textStyles === null || textStyles === void 0 ? void 0 : textStyles.lineHeight)};
|
|
150
151
|
font-weight: ${(props === null || props === void 0 ? void 0 : props.fontWeight) ||
|
|
151
152
|
(textStyles === null || textStyles === void 0 ? void 0 : textStyles.fontWeight) ||
|
|
@@ -176,16 +177,18 @@ const TextContainerLabel = styled.label `
|
|
|
176
177
|
`;
|
|
177
178
|
|
|
178
179
|
const Text = (_a) => {
|
|
179
|
-
var { variant, children, htmlFor, margin, vColor, vFontSize,
|
|
180
|
+
var { variant, children, htmlFor, margin, vColor, vFontSize, lineHeight, fontWeight, tag, onClick } = _a, props = __rest(_a, ["variant", "children", "htmlFor", "margin", "vColor", "vFontSize", "lineHeight", "fontWeight", "tag", "onClick"]);
|
|
180
181
|
// Determine which component to use
|
|
181
182
|
const Wrapper = htmlFor
|
|
182
183
|
? TextContainerLabel
|
|
183
184
|
: TextContainer;
|
|
184
|
-
return (jsx(Wrapper, Object.assign({ as: tag, className: classNames("Text-", variant), variant: "Text-" + variant, htmlFor: htmlFor, vColor: vColor, vFontSize: vFontSize,
|
|
185
|
+
return (jsx(Wrapper, Object.assign({ as: tag, className: classNames("Text-", variant), variant: "Text-" + variant, htmlFor: htmlFor, vColor: vColor, vFontSize: vFontSize,
|
|
186
|
+
// ? WIP - erase in line styles card nº 159
|
|
187
|
+
style: { margin, lineHeight, fontWeight }, onClick: onClick }, props, { children: children })));
|
|
185
188
|
};
|
|
186
189
|
|
|
187
190
|
const HeadingContainer = styled.h1 `
|
|
188
|
-
${({ variant
|
|
191
|
+
${({ variant, theme }) => {
|
|
189
192
|
const { media, heading } = theme;
|
|
190
193
|
const { tinyMobileUp, largeMobileUp, superLargeDesktopUp } = media;
|
|
191
194
|
const headingStyles = (heading === null || heading === void 0 ? void 0 : heading[variant]) || {};
|
|
@@ -1271,9 +1274,10 @@ const AtomIcon$2 = styled(Icon).attrs(({ theme, moleculeVariant }) => {
|
|
|
1271
1274
|
});
|
|
1272
1275
|
}) ``;
|
|
1273
1276
|
const AtomHeading$2 = styled(Heading).attrs(({ theme, moleculeVariant }) => {
|
|
1274
|
-
var _a, _b, _c;
|
|
1277
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1275
1278
|
return ({
|
|
1276
|
-
variant: (_c = (_b = (_a = theme === null || theme === void 0 ? void 0 : theme.cardSimpleRender) === null || _a === void 0 ? void 0 : _a[moleculeVariant]) === null || _b === void 0 ? void 0 : _b.atomHeading) === null || _c === void 0 ? void 0 : _c.variant
|
|
1279
|
+
variant: (_c = (_b = (_a = theme === null || theme === void 0 ? void 0 : theme.cardSimpleRender) === null || _a === void 0 ? void 0 : _a[moleculeVariant]) === null || _b === void 0 ? void 0 : _b.atomHeading) === null || _c === void 0 ? void 0 : _c.variant,
|
|
1280
|
+
as: (_f = (_e = (_d = theme === null || theme === void 0 ? void 0 : theme.cardSimpleRender) === null || _d === void 0 ? void 0 : _d[moleculeVariant]) === null || _e === void 0 ? void 0 : _e.atomHeading) === null || _f === void 0 ? void 0 : _f.as
|
|
1277
1281
|
});
|
|
1278
1282
|
}) ``;
|
|
1279
1283
|
const AtomText$2 = styled(Text).attrs(({ theme, moleculeVariant }) => {
|
|
@@ -1284,7 +1288,8 @@ const AtomText$2 = styled(Text).attrs(({ theme, moleculeVariant }) => {
|
|
|
1284
1288
|
}) ``;
|
|
1285
1289
|
|
|
1286
1290
|
const CardSimpleRender = ({ moleculeVariant = "primary", icon, title, description, children, onClick }) => {
|
|
1287
|
-
|
|
1291
|
+
const compVariant = `CardSimpleRender-${moleculeVariant}`;
|
|
1292
|
+
return (jsxs(Card$1, Object.assign({ className: classNames(compVariant), moleculeVariant: compVariant, as: onClick ? "button" : "div", onClick: onClick, cardHover: !!onClick }, { children: [jsxs("div", { children: [(icon || title) && (jsxs(WrapperLine, { children: [icon && (jsx(AtomIcon$2, { moleculeVariant: compVariant, svg: icon })), title && (jsx(AtomHeading$2, Object.assign({ moleculeVariant: compVariant }, { children: title })))] })), description && (jsx(AtomText$2, Object.assign({ moleculeVariant: compVariant }, { children: description })))] }), children] })));
|
|
1288
1293
|
};
|
|
1289
1294
|
|
|
1290
1295
|
const Card = styled.div `
|