@manamerge/mana-atomic-ui 1.0.160 → 1.0.161

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 CHANGED
@@ -13,11 +13,10 @@ interface ButtonTypes {
13
13
  declare const Button: React.FC<ButtonTypes>;
14
14
 
15
15
  interface TextTypes {
16
- variant?: string;
16
+ variant?: "primary-light" | "primary-regular" | "primary-medium" | "primary-bold" | "primary-heavy" | "secondary-regular" | "secondary-italic";
17
17
  children?: string;
18
18
  htmlFor?: string;
19
19
  margin?: string;
20
- color?: string;
21
20
  lineHeight?: string;
22
21
  fontWeight?: string | number;
23
22
  tag?: keyof JSX.IntrinsicElements;
@@ -30,6 +29,7 @@ declare const Text: React.FC<TextTypes>;
30
29
  interface HeadingTypes {
31
30
  variant?: string;
32
31
  children: ReactNode;
32
+ vColor?: string;
33
33
  as?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
34
34
  }
35
35
  declare const Heading: React.FC<HeadingTypes>;
package/dist/index.js CHANGED
@@ -153,7 +153,7 @@ const TextContainer = styled.p `
153
153
  "regular"};
154
154
  font-family: ${textStyles === null || textStyles === void 0 ? void 0 : textStyles.fontFamily};
155
155
  font-style: ${(textStyles === null || textStyles === void 0 ? void 0 : textStyles.fontStyle) || "normal"};
156
- color: ${(props === null || props === void 0 ? void 0 : props.vColor) || (textStyles === null || textStyles === void 0 ? void 0 : textStyles.vColor) || "inherit"};
156
+ color: ${(props === null || props === void 0 ? void 0 : props.vColor) || (textStyles === null || textStyles === void 0 ? void 0 : textStyles.color) || "inherit"};
157
157
  `;
158
158
  }};
159
159
  `;
@@ -164,14 +164,14 @@ const TextContainerLabel = styled.label `
164
164
  const textStyles = ((_b = theme === null || theme === void 0 ? void 0 : theme.text) === null || _b === void 0 ? void 0 : _b[variant]) || {};
165
165
  return css `
166
166
  margin: ${(props === null || props === void 0 ? void 0 : props.margin) || (textStyles === null || textStyles === void 0 ? void 0 : textStyles.margin)};
167
- font-size: ${(props === null || props === void 0 ? void 0 : props.vFontSize) || (textStyles === null || textStyles === void 0 ? void 0 : textStyles.vFontSize)};
167
+ font-size: ${(props === null || props === void 0 ? void 0 : props.vFontSize) || (textStyles === null || textStyles === void 0 ? void 0 : textStyles.fontSize)};
168
168
  line-height: ${(props === null || props === void 0 ? void 0 : props.lineHeight) || (textStyles === null || textStyles === void 0 ? void 0 : textStyles.lineHeight)};
169
169
  font-weight: ${(props === null || props === void 0 ? void 0 : props.fontWeight) ||
170
170
  (textStyles === null || textStyles === void 0 ? void 0 : textStyles.fontWeight) ||
171
171
  "regular"};
172
172
  font-family: ${(textStyles === null || textStyles === void 0 ? void 0 : textStyles.fontFamily) || "inherit"};
173
173
  font-style: ${(textStyles === null || textStyles === void 0 ? void 0 : textStyles.fontStyle) || "normal"};
174
- color: ${(props === null || props === void 0 ? void 0 : props.vColor) || (textStyles === null || textStyles === void 0 ? void 0 : textStyles.vColor) || "inherit"};
174
+ color: ${(props === null || props === void 0 ? void 0 : props.vColor) || (textStyles === null || textStyles === void 0 ? void 0 : textStyles.color) || "inherit"};
175
175
  `;
176
176
  }};
177
177
  `;
@@ -188,7 +188,8 @@ const Text = (_a) => {
188
188
  };
189
189
 
190
190
  const HeadingContainer = styled.h1 `
191
- ${({ variant, theme }) => {
191
+ ${(_a) => {
192
+ var { variant, theme } = _a, props = __rest(_a, ["variant", "theme"]);
192
193
  const { media, heading } = theme;
193
194
  const { tinyMobileUp, largeMobileUp, superLargeDesktopUp } = media;
194
195
  const headingStyles = (heading === null || heading === void 0 ? void 0 : heading[variant]) || {};
@@ -198,31 +199,34 @@ const HeadingContainer = styled.h1 `
198
199
  font-size: ${mobile === null || mobile === void 0 ? void 0 : mobile.fontSize};
199
200
  font-weight: ${mobile === null || mobile === void 0 ? void 0 : mobile.fontWeight};
200
201
  line-height: ${mobile === null || mobile === void 0 ? void 0 : mobile.lineHeight};
201
- color: ${mobile === null || mobile === void 0 ? void 0 : mobile.color};
202
+ color: ${(props === null || props === void 0 ? void 0 : props.vColor) || (mobile === null || mobile === void 0 ? void 0 : mobile.color)};
202
203
  margin: ${mobile === null || mobile === void 0 ? void 0 : mobile.margin};
204
+ font-family: ${mobile === null || mobile === void 0 ? void 0 : mobile.fontFamily};
203
205
  }
204
206
  ${largeMobileUp} {
205
207
  font-size: ${tablet === null || tablet === void 0 ? void 0 : tablet.fontSize};
206
208
  font-weight: ${tablet === null || tablet === void 0 ? void 0 : tablet.fontWeight};
207
209
  line-height: ${tablet === null || tablet === void 0 ? void 0 : tablet.lineHeight};
208
- color: ${tablet === null || tablet === void 0 ? void 0 : tablet.color};
210
+ color: ${(props === null || props === void 0 ? void 0 : props.vColor) || (tablet === null || tablet === void 0 ? void 0 : tablet.color)};
209
211
  margin: ${tablet === null || tablet === void 0 ? void 0 : tablet.margin};
212
+ font-family: ${tablet === null || tablet === void 0 ? void 0 : tablet.fontFamily};
210
213
  }
211
214
  ${superLargeDesktopUp} {
212
215
  font-size: ${desktop === null || desktop === void 0 ? void 0 : desktop.fontSize};
213
216
  font-weight: ${desktop === null || desktop === void 0 ? void 0 : desktop.fontWeight};
214
217
  line-height: ${desktop === null || desktop === void 0 ? void 0 : desktop.lineHeight};
215
- color: ${desktop === null || desktop === void 0 ? void 0 : desktop.color};
218
+ color: ${(props === null || props === void 0 ? void 0 : props.vColor) || (desktop === null || desktop === void 0 ? void 0 : desktop.color)};
216
219
  margin: ${desktop === null || desktop === void 0 ? void 0 : desktop.margin};
220
+ font-family: ${desktop === null || desktop === void 0 ? void 0 : desktop.fontFamily};
217
221
  }
218
222
  `;
219
223
  }}
220
224
  `;
221
225
 
222
226
  const Heading = (_a) => {
223
- var { variant = "primary", as = "h1", children } = _a, props = __rest(_a, ["variant", "as", "children"]);
227
+ var { variant = "primary", as = "h1", vColor, children } = _a, props = __rest(_a, ["variant", "as", "vColor", "children"]);
224
228
  const headingVariant = `Heading-${variant}-${as}`;
225
- return (jsx(HeadingContainer, Object.assign({ className: classNames("Heading-", variant), variant: headingVariant, as: as }, props, { children: children })));
229
+ return (jsx(HeadingContainer, Object.assign({ className: classNames("Heading-", variant), variant: headingVariant, vColor: vColor, as: as }, props, { children: children })));
226
230
  };
227
231
 
228
232
  const StyledSvg = styled.svg `
@@ -499,24 +503,6 @@ const WrapperBackground = styled.div `
499
503
  justify-content: ${(thisTheme === null || thisTheme === void 0 ? void 0 : thisTheme.justifyContent) || "center"};
500
504
  height: ${(thisTheme === null || thisTheme === void 0 ? void 0 : thisTheme.height) || "unset"};
501
505
  background-color: ${(thisTheme === null || thisTheme === void 0 ? void 0 : thisTheme.backgroundColor) || "unset"};
502
- /* background: ${thisTheme === null || thisTheme === void 0 ? void 0 : thisTheme.background}; */
503
- /* background: radial-gradient(
504
- circle at center,
505
- #ff7e5f 0%,
506
- #ff7e5f 30%,
507
- #feb47b 60%,
508
- transparent 100%
509
- ); */
510
- /* background: radial-gradient(
511
- circle at center,
512
- rgba(255, 126, 95, 0.8) 0%,
513
- rgba(255, 126, 95, 0.3) 40%,
514
- rgba(255, 126, 95, 0) 70%,
515
- transparent 100%
516
- );
517
- backdrop-filter: blur(20px);
518
- aspect-ratio: 1 / 1; */
519
- /* border-radius: 50%; */
520
506
 
521
507
  /* Overlay */
522
508
  ${withOverlay &&
@@ -618,25 +604,16 @@ const AtomIconDot = styled(Icon).attrs(({ theme, moleculeVariant }) => {
618
604
  `;
619
605
  }}
620
606
  `;
621
- const AtomTextBanner = styled(Text).attrs(({ theme, moleculeVariant }) => {
622
- var _a, _b, _c, _d, _e, _f;
623
- return ({
624
- variant: (_c = (_b = (_a = theme === null || theme === void 0 ? void 0 : theme.header) === null || _a === void 0 ? void 0 : _a[moleculeVariant]) === null || _b === void 0 ? void 0 : _b.atomTextBanner) === null || _c === void 0 ? void 0 : _c.variant,
625
- vColor: (_f = (_e = (_d = theme === null || theme === void 0 ? void 0 : theme.header) === null || _d === void 0 ? void 0 : _d[moleculeVariant]) === null || _e === void 0 ? void 0 : _e.atomTextBanner) === null || _f === void 0 ? void 0 : _f.color
626
- });
627
- }) ``;
628
607
  const AtomHeading$3 = styled(Heading).attrs(({ theme, moleculeVariant }) => {
629
- var _a, _b, _c, _d, _e, _f;
608
+ var _a, _b, _c;
630
609
  return ({
631
- variant: (_c = (_b = (_a = theme === null || theme === void 0 ? void 0 : theme.header) === null || _a === void 0 ? void 0 : _a[moleculeVariant]) === null || _b === void 0 ? void 0 : _b.atomHeading) === null || _c === void 0 ? void 0 : _c.variant,
632
- as: (_f = (_e = (_d = theme === null || theme === void 0 ? void 0 : theme.header) === null || _d === void 0 ? void 0 : _d[moleculeVariant]) === null || _e === void 0 ? void 0 : _e.atomHeading) === null || _f === void 0 ? void 0 : _f.as
610
+ variant: (_c = (_b = (_a = theme === null || theme === void 0 ? void 0 : theme.header) === null || _a === void 0 ? void 0 : _a[moleculeVariant]) === null || _b === void 0 ? void 0 : _b.atomHeading) === null || _c === void 0 ? void 0 : _c.variant
633
611
  });
634
612
  }) ``;
635
613
  const AtomTextTitle = styled(Text).attrs(({ theme, moleculeVariant }) => {
636
- var _a, _b, _c, _d, _e, _f;
614
+ var _a, _b, _c;
637
615
  return ({
638
- variant: (_c = (_b = (_a = theme === null || theme === void 0 ? void 0 : theme.header) === null || _a === void 0 ? void 0 : _a[moleculeVariant]) === null || _b === void 0 ? void 0 : _b.atomTextTitle) === null || _c === void 0 ? void 0 : _c.variant,
639
- vColor: (_f = (_e = (_d = theme === null || theme === void 0 ? void 0 : theme.header) === null || _d === void 0 ? void 0 : _d[moleculeVariant]) === null || _e === void 0 ? void 0 : _e.atomTextTitle) === null || _f === void 0 ? void 0 : _f.color
616
+ variant: (_c = (_b = (_a = theme === null || theme === void 0 ? void 0 : theme.header) === null || _a === void 0 ? void 0 : _a[moleculeVariant]) === null || _b === void 0 ? void 0 : _b.atomTextTitle) === null || _c === void 0 ? void 0 : _c.variant
640
617
  });
641
618
  }) ``;
642
619
  const WrapperLineBottom = styled.div `
@@ -705,7 +682,7 @@ const WrapperTextTitle = styled.div `
705
682
 
706
683
  const Header = ({ moleculeVariant = "primary", iconTop, iconDot, buttonLeftIcon, buttonRightIcon, textBanner, headingTitle, textTitle, buttonLeftText, buttonLeftClick, buttonRightText, buttonRightClick, imageURLBackground, withOverlay }) => {
707
684
  const compVariant = `Header-${moleculeVariant}`;
708
- return (jsx(WrapperBackground, Object.assign({ className: classNames(compVariant), moleculeVariant: compVariant, imageURLBackground: imageURLBackground, withOverlay: withOverlay }, { children: jsxs(WrapperHeader, Object.assign({ moleculeVariant: compVariant }, { children: [jsxs("div", { children: [iconTop && (jsx(AtomIconTop, { moleculeVariant: compVariant, svg: iconTop })), textBanner && (jsxs(WrapperLineTop, Object.assign({ moleculeVariant: compVariant }, { children: [iconDot && (jsx(AtomIconDot, { moleculeVariant: compVariant, svg: iconDot })), jsx(AtomTextBanner, Object.assign({ moleculeVariant: compVariant }, { children: textBanner }))] })))] }), headingTitle && (jsx(AtomHeading$3, Object.assign({ moleculeVariant: compVariant }, { children: headingTitle }))), jsx(WrapperTextTitle, Object.assign({ moleculeVariant: compVariant }, { children: textTitle &&
685
+ return (jsx(WrapperBackground, Object.assign({ className: classNames(compVariant), moleculeVariant: compVariant, imageURLBackground: imageURLBackground, withOverlay: withOverlay }, { children: jsxs(WrapperHeader, Object.assign({ moleculeVariant: compVariant }, { children: [jsxs("div", { children: [iconTop && (jsx(AtomIconTop, { moleculeVariant: compVariant, svg: iconTop })), textBanner && (jsxs(WrapperLineTop, Object.assign({ moleculeVariant: compVariant }, { children: [iconDot && (jsx(AtomIconDot, { moleculeVariant: compVariant, svg: iconDot })), jsx(AtomTextTitle, Object.assign({ moleculeVariant: compVariant }, { children: textBanner }))] })))] }), headingTitle && (jsx(AtomHeading$3, Object.assign({ moleculeVariant: compVariant }, { children: headingTitle }))), jsx(WrapperTextTitle, Object.assign({ moleculeVariant: compVariant }, { children: textTitle &&
709
686
  (textTitle === null || textTitle === void 0 ? void 0 : textTitle.map((text, i) => (jsx(AtomTextTitle, Object.assign({ moleculeVariant: compVariant }, { children: text }), i)))) })), jsxs(WrapperLineBottom, { children: [(buttonLeftIcon || buttonLeftText) && (jsxs(AtomButtonLeft, Object.assign({ moleculeVariant: compVariant, onClick: buttonLeftClick }, { children: [buttonLeftIcon && (jsx(AtomIconLeft, { moleculeVariant: compVariant, svg: buttonLeftIcon })), buttonLeftText] }))), (buttonRightIcon || buttonRightText) && (jsxs(AtomButtonRight, Object.assign({ moleculeVariant: compVariant, onClick: buttonRightClick }, { children: [buttonRightText, buttonRightIcon && (jsx(AtomIconRight, { moleculeVariant: compVariant, svg: buttonRightIcon }))] })))] })] })) })));
710
687
  };
711
688
 
@@ -1235,6 +1212,7 @@ const TextBreakerTape = styled(Text).attrs(({ theme, moleculeVariant }) => {
1235
1212
  const textTheme = ((_b = (_a = theme === null || theme === void 0 ? void 0 : theme.breakerTape) === null || _a === void 0 ? void 0 : _a[moleculeVariant]) === null || _b === void 0 ? void 0 : _b.text) || {};
1236
1213
  return css `
1237
1214
  color: ${textTheme === null || textTheme === void 0 ? void 0 : textTheme.color};
1215
+ font-size: ${textTheme === null || textTheme === void 0 ? void 0 : textTheme.fontSize};
1238
1216
  `;
1239
1217
  }}
1240
1218
  `;