@gympass/yoga 7.114.2 → 7.114.3

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.
@@ -85,11 +85,13 @@ const CardStyled = (0, import_styled_components.default)(import_Box.default).att
85
85
  theme: {
86
86
  yoga: {
87
87
  colors: { [variant]: color },
88
- components: { card }
88
+ components: { card },
89
+ elevations
89
90
  }
90
- }
91
+ },
92
+ hasShadow
91
93
  }) => ({
92
- elevation: card.elevation,
94
+ elevation: hasShadow ? card.elevation : elevations.zero,
93
95
  pt: card.padding.top,
94
96
  pr: card.padding.right,
95
97
  pb: card.padding.bottom,
@@ -144,7 +146,7 @@ const Card = import_react.default.forwardRef(
144
146
  (_a, ref) => {
145
147
  var _b = _a, { ribbon, children, hasShadow } = _b, rest = __objRest(_b, ["ribbon", "children", "hasShadow"]);
146
148
  const CardWrapper = hasShadow ? CardShadow : import_Box.default;
147
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CardStyled, __spreadProps(__spreadValues({ ref }, rest), { children: [
149
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CardStyled, __spreadProps(__spreadValues({ ref }, rest), { hasShadow, children: [
148
150
  Object.keys(ribbon).length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Ribbon, { variant: ribbon.variant, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RibbonText, { variant: ribbon.variant, children: ribbon.text }) }),
149
151
  children
150
152
  ] })) });
@@ -54,11 +54,13 @@ const CardStyled = styled(Box).attrs(
54
54
  theme: {
55
55
  yoga: {
56
56
  colors: { [variant]: color },
57
- components: { card }
57
+ components: { card },
58
+ elevations
58
59
  }
59
- }
60
+ },
61
+ hasShadow
60
62
  }) => ({
61
- elevation: card.elevation,
63
+ elevation: hasShadow ? card.elevation : elevations.zero,
62
64
  pt: card.padding.top,
63
65
  pr: card.padding.right,
64
66
  pb: card.padding.bottom,
@@ -113,7 +115,7 @@ const Card = React.forwardRef(
113
115
  (_a, ref) => {
114
116
  var _b = _a, { ribbon, children, hasShadow } = _b, rest = __objRest(_b, ["ribbon", "children", "hasShadow"]);
115
117
  const CardWrapper = hasShadow ? CardShadow : Box;
116
- return /* @__PURE__ */ jsx(CardWrapper, { children: /* @__PURE__ */ jsxs(CardStyled, __spreadProps(__spreadValues({ ref }, rest), { children: [
118
+ return /* @__PURE__ */ jsx(CardWrapper, { children: /* @__PURE__ */ jsxs(CardStyled, __spreadProps(__spreadValues({ ref }, rest), { hasShadow, children: [
117
119
  Object.keys(ribbon).length > 0 && /* @__PURE__ */ jsx(Ribbon, { variant: ribbon.variant, children: /* @__PURE__ */ jsx(RibbonText, { variant: ribbon.variant, children: ribbon.text }) }),
118
120
  children
119
121
  ] })) });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gympass/yoga",
3
- "version": "7.114.2",
3
+ "version": "7.114.3",
4
4
  "description": "Gympass component library",
5
5
  "main": "./cjs",
6
6
  "types": "./typings/index.d.ts",
@@ -57,7 +57,7 @@
57
57
  "react-native": "0.72.3",
58
58
  "styled-components": "^4.4.0"
59
59
  },
60
- "gitHead": "1efcaf7d819d65420ab67dfa5832c2304ac3d81b",
60
+ "gitHead": "569de08a4a6518d4a1c8dc44c5a88a348edae4ed",
61
61
  "module": "./esm",
62
62
  "private": false,
63
63
  "react-native": "./cjs/index.native.js"