@gympass/yoga 7.108.3 → 7.108.5

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.
@@ -140,13 +140,16 @@ const RibbonText = (0, import_styled_components.default)(import_Text.default.Tin
140
140
  color: ${variant ? white : dark};
141
141
  `}
142
142
  `;
143
- const Card = import_react.default.forwardRef((_a, ref) => {
144
- var _b = _a, { ribbon, children } = _b, rest = __objRest(_b, ["ribbon", "children"]);
145
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardShadow, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CardStyled, __spreadProps(__spreadValues({ ref }, rest), { children: [
146
- 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 }) }),
147
- children
148
- ] })) });
149
- });
143
+ const Card = import_react.default.forwardRef(
144
+ (_a, ref) => {
145
+ var _b = _a, { ribbon, children, hasShadow } = _b, rest = __objRest(_b, ["ribbon", "children", "hasShadow"]);
146
+ 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: [
148
+ 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
+ children
150
+ ] })) });
151
+ }
152
+ );
150
153
  Card.propTypes = {
151
154
  /** text: the content inside the Card Ribbon
152
155
  * variant: style the card following the theme (primary, secondary, vibin,
@@ -198,12 +201,15 @@ Card.propTypes = {
198
201
  "light",
199
202
  "clear",
200
203
  "white"
201
- ])
204
+ ]),
205
+ /** applies a shadow to the card (enabled by default) */
206
+ hasShadow: import_prop_types.bool
202
207
  };
203
208
  Card.defaultProps = {
204
209
  ribbon: {},
205
210
  children: null,
206
- variant: ""
211
+ variant: "",
212
+ hasShadow: true
207
213
  };
208
214
  Card.displayName = "Card";
209
215
  var Card_default = Card;
@@ -71,14 +71,15 @@ var import_Card = __toESM(require("../Card"));
71
71
  var import_Text = __toESM(require("../../../Text"));
72
72
  var import_Box = __toESM(require("../../../Box"));
73
73
  var import_Button = __toESM(require("../../../Button"));
74
- const { spacing, radii, lineHeights } = import_themeReader.default;
75
- const Event = (0, import_styled_components.default)(import_Card.default)`
74
+ const { spacing, radii, lineHeights, colors, borders } = import_themeReader.default;
75
+ const Event = (0, import_styled_components.default)(import_Card.default).attrs({ hasShadow: false })`
76
76
  flex-direction: row;
77
77
  height: 104px;
78
78
  border-radius: ${radii.regular}px;
79
79
  padding: ${spacing.zero};
80
80
  width: 280px;
81
81
  margin-right: ${spacing.xxsmall};
82
+
82
83
  ${({ small }) => small ? import_styled_components.css`
83
84
  width: ${spacing.xxxlarge}px;
84
85
  ` : ""}
@@ -87,9 +88,22 @@ const DateInfo = (0, import_styled_components.default)(import_Box.default)`
87
88
  justify-content: center;
88
89
  align-items: center;
89
90
  width: 56px;
91
+
92
+ ${({ small, active }) => small ? import_styled_components.css`
93
+ border: ${borders.small}px solid
94
+ ${active ? colors.primary : colors.elements.lineAndBorders};
95
+ border-radius: ${radii.regular}px;
96
+ ` : import_styled_components.css`
97
+ border: ${borders.small}px solid ${colors.primary};
98
+ border-top-left-radius: ${radii.regular}px;
99
+ border-bottom-left-radius: ${radii.regular}px;
100
+ `}
90
101
  `;
91
102
  const EventInfo = (0, import_styled_components.default)(import_Box.default)`
92
103
  flex: 1;
104
+ border-top-right-radius: ${radii.regular}px;
105
+ border-bottom-right-radius: ${radii.regular}px;
106
+ border: ${borders.small}px solid ${colors.elements.lineAndBorders};
93
107
  `;
94
108
  const Top = (0, import_styled_components.default)(import_Box.default)`
95
109
  justify-content: center;
@@ -134,7 +148,7 @@ const SmallCard = ({
134
148
  active,
135
149
  event,
136
150
  onPress
137
- }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DateInfo, { small: true, pv: "medium", bg: active ? "primary" : "white", children: [
151
+ }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DateInfo, { small: true, active, pv: "medium", bg: active ? "primary" : "white", children: [
138
152
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Top, { children: onPress ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
139
153
  Indicator,
140
154
  {
@@ -174,7 +188,7 @@ const FullCard = (0, import_styled_components.withTheme)(
174
188
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_yoga_icons.Time, { fill: icon.fill, style: { marginRight: 5 } }),
175
189
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Text.default.Tiny, { children: event.time })
176
190
  ] }),
177
- !!link && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ButtonLink, { onPress: onLinkPress, small: true, children: link })
191
+ !!link && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ButtonLink, { onPress: onLinkPress, small: true, secondary: true, children: link })
178
192
  ] })
179
193
  ] })
180
194
  ] })
@@ -61,29 +61,35 @@ __export(Card_exports, {
61
61
  });
62
62
  module.exports = __toCommonJS(Card_exports);
63
63
  var import_jsx_runtime = require("react/jsx-runtime");
64
+ var import_prop_types = require("prop-types");
64
65
  var import_react = __toESM(require("react"));
65
66
  var import_styled_components = __toESM(require("styled-components"));
66
- var import_prop_types = require("prop-types");
67
67
  var import_Text = __toESM(require("../../../Text"));
68
68
  const CardStyled = import_styled_components.default.section`
69
69
  ${({
70
+ hasShadow,
70
71
  variant,
71
72
  theme: {
72
73
  yoga: {
74
+ spacing,
73
75
  colors: { [variant]: color },
74
76
  components: { card }
75
77
  }
76
78
  }
77
79
  }) => `
78
- padding:
79
- ${card.padding.top}px
80
- ${card.padding.right}px
81
- ${card.padding.bottom}px
82
- ${card.padding.left}px;
83
-
80
+ ${hasShadow ? `
81
+ padding:
82
+ ${card.padding.top}px
83
+ ${card.padding.right}px
84
+ ${card.padding.bottom}px
85
+ ${card.padding.left}px;
86
+ box-shadow: ${card.elevation};
87
+ ` : `
88
+ padding: ${spacing.zero}px;
89
+ box-shadow: none;
90
+ `}
84
91
  border-radius: ${card.radii}px;
85
92
  background-color: ${variant ? color : card.backgroundColor};
86
- box-shadow: ${card.elevation};
87
93
  `}
88
94
  `;
89
95
  const Ribbon = (0, import_styled_components.default)(import_Text.default.Tiny)`
@@ -153,11 +159,14 @@ Card.propTypes = {
153
159
  "white"
154
160
  ])
155
161
  }),
156
- children: import_prop_types.node
162
+ children: import_prop_types.node,
163
+ /** applies a shadow to the card (enabled by default) */
164
+ hasShadow: import_prop_types.bool
157
165
  };
158
166
  Card.defaultProps = {
159
167
  ribbon: {},
160
- children: null
168
+ children: null,
169
+ hasShadow: true
161
170
  };
162
171
  Card.displayName = "Card";
163
172
  var Card_default = Card;
@@ -67,7 +67,7 @@ var import_prop_types = require("prop-types");
67
67
  var import_yoga_icons = require("@gympass/yoga-icons");
68
68
  var import_Card = __toESM(require("../Card"));
69
69
  var import_Text = require("../../../Text/web/Text");
70
- const Event = (0, import_styled_components.default)(import_Card.default)`
70
+ const Event = (0, import_styled_components.default)(import_Card.default).attrs({ hasShadow: false })`
71
71
  display: flex;
72
72
  flex-direction: row;
73
73
 
@@ -79,8 +79,10 @@ const EventInfo = import_styled_components.default.div`
79
79
  ${({
80
80
  theme: {
81
81
  yoga: {
82
+ borders,
83
+ colors,
82
84
  components: {
83
- card: { event }
85
+ card: { event, radii }
84
86
  }
85
87
  }
86
88
  }
@@ -88,6 +90,10 @@ const EventInfo = import_styled_components.default.div`
88
90
  padding: ${event.info.padding.top}px ${event.info.padding.right}px
89
91
  ${event.info.padding.bottom}px ${event.info.padding.left}px;
90
92
 
93
+ border: ${borders.small}px solid ${colors.elements.lineAndBorders};
94
+ border-top-right-radius: ${radii}px;
95
+ border-bottom-right-radius: ${radii}px;
96
+
91
97
  ${import_Text.TextRenderer}, ${import_Text.Text.Small} {
92
98
  display: -webkit-inline-box;
93
99
  overflow: hidden;
@@ -123,8 +129,9 @@ const DateInfo = import_styled_components.default.div`
123
129
  ${({
124
130
  theme: {
125
131
  yoga: {
132
+ borders,
126
133
  components: {
127
- card: { event }
134
+ card: { event, radii }
128
135
  }
129
136
  }
130
137
  }
@@ -137,6 +144,9 @@ const DateInfo = import_styled_components.default.div`
137
144
 
138
145
  width: 56px;
139
146
  background-color: ${event.date.backgroundColor};
147
+ border: ${borders.small}px solid ${event.date.backgroundColor};
148
+ border-top-left-radius: ${radii}px;
149
+ border-bottom-left-radius: ${radii}px;
140
150
  `}
141
151
  `;
142
152
  const DayOfWeek = (0, import_styled_components.default)(import_Text.Text.Small)`
@@ -72,7 +72,7 @@ var import_Divider = __toESM(require("../../../Divider"));
72
72
  const Wrapper = (0, import_styled_components.default)(import_Content.default)`
73
73
  flex: 1;
74
74
  `;
75
- const Title = (0, import_styled_components.default)(import_Text.default.Medium)`
75
+ const Title = (0, import_styled_components.default)(import_Text.default.Body1)`
76
76
  ${(props) => {
77
77
  const {
78
78
  components: { card, cardweb },
@@ -153,7 +153,7 @@ const PlanCardContent = (_a) => {
153
153
  ]);
154
154
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Wrapper, __spreadProps(__spreadValues({}, rest), { children: [
155
155
  subtitle && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Subtitle.default, { children: subtitle }),
156
- title && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Title, { badgeColor, children: title }),
156
+ title && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Title, { bold: true, badgeColor, children: title }),
157
157
  description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Description, { children: description }),
158
158
  !!price && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Price, { children: [
159
159
  currency && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Text.default.H4, { as: "sup", children: currency }),
@@ -32,7 +32,7 @@ var __objRest = (source, exclude) => {
32
32
  import { jsx, jsxs } from "react/jsx-runtime";
33
33
  import React from "react";
34
34
  import styled from "styled-components";
35
- import { string, shape, oneOf, node } from "prop-types";
35
+ import { string, shape, oneOf, node, bool } from "prop-types";
36
36
  import Text from "../../../Text";
37
37
  import Box from "../../../Box";
38
38
  const CardShadow = styled(Box).attrs(
@@ -109,13 +109,16 @@ const RibbonText = styled(Text.Tiny)`
109
109
  color: ${variant ? white : dark};
110
110
  `}
111
111
  `;
112
- const Card = React.forwardRef((_a, ref) => {
113
- var _b = _a, { ribbon, children } = _b, rest = __objRest(_b, ["ribbon", "children"]);
114
- return /* @__PURE__ */ jsx(CardShadow, { children: /* @__PURE__ */ jsxs(CardStyled, __spreadProps(__spreadValues({ ref }, rest), { children: [
115
- Object.keys(ribbon).length > 0 && /* @__PURE__ */ jsx(Ribbon, { variant: ribbon.variant, children: /* @__PURE__ */ jsx(RibbonText, { variant: ribbon.variant, children: ribbon.text }) }),
116
- children
117
- ] })) });
118
- });
112
+ const Card = React.forwardRef(
113
+ (_a, ref) => {
114
+ var _b = _a, { ribbon, children, hasShadow } = _b, rest = __objRest(_b, ["ribbon", "children", "hasShadow"]);
115
+ const CardWrapper = hasShadow ? CardShadow : Box;
116
+ return /* @__PURE__ */ jsx(CardWrapper, { children: /* @__PURE__ */ jsxs(CardStyled, __spreadProps(__spreadValues({ ref }, rest), { children: [
117
+ Object.keys(ribbon).length > 0 && /* @__PURE__ */ jsx(Ribbon, { variant: ribbon.variant, children: /* @__PURE__ */ jsx(RibbonText, { variant: ribbon.variant, children: ribbon.text }) }),
118
+ children
119
+ ] })) });
120
+ }
121
+ );
119
122
  Card.propTypes = {
120
123
  /** text: the content inside the Card Ribbon
121
124
  * variant: style the card following the theme (primary, secondary, vibin,
@@ -167,12 +170,15 @@ Card.propTypes = {
167
170
  "light",
168
171
  "clear",
169
172
  "white"
170
- ])
173
+ ]),
174
+ /** applies a shadow to the card (enabled by default) */
175
+ hasShadow: bool
171
176
  };
172
177
  Card.defaultProps = {
173
178
  ribbon: {},
174
179
  children: null,
175
- variant: ""
180
+ variant: "",
181
+ hasShadow: true
176
182
  };
177
183
  Card.displayName = "Card";
178
184
  var Card_default = Card;
@@ -40,14 +40,15 @@ import Card from "../Card";
40
40
  import Text from "../../../Text";
41
41
  import Box from "../../../Box";
42
42
  import Button from "../../../Button";
43
- const { spacing, radii, lineHeights } = theme;
44
- const Event = styled(Card)`
43
+ const { spacing, radii, lineHeights, colors, borders } = theme;
44
+ const Event = styled(Card).attrs({ hasShadow: false })`
45
45
  flex-direction: row;
46
46
  height: 104px;
47
47
  border-radius: ${radii.regular}px;
48
48
  padding: ${spacing.zero};
49
49
  width: 280px;
50
50
  margin-right: ${spacing.xxsmall};
51
+
51
52
  ${({ small }) => small ? css`
52
53
  width: ${spacing.xxxlarge}px;
53
54
  ` : ""}
@@ -56,9 +57,22 @@ const DateInfo = styled(Box)`
56
57
  justify-content: center;
57
58
  align-items: center;
58
59
  width: 56px;
60
+
61
+ ${({ small, active }) => small ? css`
62
+ border: ${borders.small}px solid
63
+ ${active ? colors.primary : colors.elements.lineAndBorders};
64
+ border-radius: ${radii.regular}px;
65
+ ` : css`
66
+ border: ${borders.small}px solid ${colors.primary};
67
+ border-top-left-radius: ${radii.regular}px;
68
+ border-bottom-left-radius: ${radii.regular}px;
69
+ `}
59
70
  `;
60
71
  const EventInfo = styled(Box)`
61
72
  flex: 1;
73
+ border-top-right-radius: ${radii.regular}px;
74
+ border-bottom-right-radius: ${radii.regular}px;
75
+ border: ${borders.small}px solid ${colors.elements.lineAndBorders};
62
76
  `;
63
77
  const Top = styled(Box)`
64
78
  justify-content: center;
@@ -103,7 +117,7 @@ const SmallCard = ({
103
117
  active,
104
118
  event,
105
119
  onPress
106
- }) => /* @__PURE__ */ jsxs(DateInfo, { small: true, pv: "medium", bg: active ? "primary" : "white", children: [
120
+ }) => /* @__PURE__ */ jsxs(DateInfo, { small: true, active, pv: "medium", bg: active ? "primary" : "white", children: [
107
121
  /* @__PURE__ */ jsx(Top, { children: onPress ? /* @__PURE__ */ jsx(
108
122
  Indicator,
109
123
  {
@@ -143,7 +157,7 @@ const FullCard = withTheme(
143
157
  /* @__PURE__ */ jsx(Time, { fill: icon.fill, style: { marginRight: 5 } }),
144
158
  /* @__PURE__ */ jsx(Text.Tiny, { children: event.time })
145
159
  ] }),
146
- !!link && /* @__PURE__ */ jsx(ButtonLink, { onPress: onLinkPress, small: true, children: link })
160
+ !!link && /* @__PURE__ */ jsx(ButtonLink, { onPress: onLinkPress, small: true, secondary: true, children: link })
147
161
  ] })
148
162
  ] })
149
163
  ] })
@@ -30,29 +30,35 @@ var __objRest = (source, exclude) => {
30
30
  return target;
31
31
  };
32
32
  import { jsx, jsxs } from "react/jsx-runtime";
33
+ import { node, oneOf, shape, string, bool } from "prop-types";
33
34
  import React from "react";
34
35
  import styled from "styled-components";
35
- import { string, shape, oneOf, node } from "prop-types";
36
36
  import Text from "../../../Text";
37
37
  const CardStyled = styled.section`
38
38
  ${({
39
+ hasShadow,
39
40
  variant,
40
41
  theme: {
41
42
  yoga: {
43
+ spacing,
42
44
  colors: { [variant]: color },
43
45
  components: { card }
44
46
  }
45
47
  }
46
48
  }) => `
47
- padding:
48
- ${card.padding.top}px
49
- ${card.padding.right}px
50
- ${card.padding.bottom}px
51
- ${card.padding.left}px;
52
-
49
+ ${hasShadow ? `
50
+ padding:
51
+ ${card.padding.top}px
52
+ ${card.padding.right}px
53
+ ${card.padding.bottom}px
54
+ ${card.padding.left}px;
55
+ box-shadow: ${card.elevation};
56
+ ` : `
57
+ padding: ${spacing.zero}px;
58
+ box-shadow: none;
59
+ `}
53
60
  border-radius: ${card.radii}px;
54
61
  background-color: ${variant ? color : card.backgroundColor};
55
- box-shadow: ${card.elevation};
56
62
  `}
57
63
  `;
58
64
  const Ribbon = styled(Text.Tiny)`
@@ -122,11 +128,14 @@ Card.propTypes = {
122
128
  "white"
123
129
  ])
124
130
  }),
125
- children: node
131
+ children: node,
132
+ /** applies a shadow to the card (enabled by default) */
133
+ hasShadow: bool
126
134
  };
127
135
  Card.defaultProps = {
128
136
  ribbon: {},
129
- children: null
137
+ children: null,
138
+ hasShadow: true
130
139
  };
131
140
  Card.displayName = "Card";
132
141
  var Card_default = Card;
@@ -36,7 +36,7 @@ import { shape, string } from "prop-types";
36
36
  import { Time } from "@gympass/yoga-icons";
37
37
  import Card from "../Card";
38
38
  import { TextRenderer, Text } from "../../../Text/web/Text";
39
- const Event = styled(Card)`
39
+ const Event = styled(Card).attrs({ hasShadow: false })`
40
40
  display: flex;
41
41
  flex-direction: row;
42
42
 
@@ -48,8 +48,10 @@ const EventInfo = styled.div`
48
48
  ${({
49
49
  theme: {
50
50
  yoga: {
51
+ borders,
52
+ colors,
51
53
  components: {
52
- card: { event }
54
+ card: { event, radii }
53
55
  }
54
56
  }
55
57
  }
@@ -57,6 +59,10 @@ const EventInfo = styled.div`
57
59
  padding: ${event.info.padding.top}px ${event.info.padding.right}px
58
60
  ${event.info.padding.bottom}px ${event.info.padding.left}px;
59
61
 
62
+ border: ${borders.small}px solid ${colors.elements.lineAndBorders};
63
+ border-top-right-radius: ${radii}px;
64
+ border-bottom-right-radius: ${radii}px;
65
+
60
66
  ${TextRenderer}, ${Text.Small} {
61
67
  display: -webkit-inline-box;
62
68
  overflow: hidden;
@@ -92,8 +98,9 @@ const DateInfo = styled.div`
92
98
  ${({
93
99
  theme: {
94
100
  yoga: {
101
+ borders,
95
102
  components: {
96
- card: { event }
103
+ card: { event, radii }
97
104
  }
98
105
  }
99
106
  }
@@ -106,6 +113,9 @@ const DateInfo = styled.div`
106
113
 
107
114
  width: 56px;
108
115
  background-color: ${event.date.backgroundColor};
116
+ border: ${borders.small}px solid ${event.date.backgroundColor};
117
+ border-top-left-radius: ${radii}px;
118
+ border-bottom-left-radius: ${radii}px;
109
119
  `}
110
120
  `;
111
121
  const DayOfWeek = styled(Text.Small)`
@@ -41,7 +41,7 @@ import Divider from "../../../Divider";
41
41
  const Wrapper = styled(Content)`
42
42
  flex: 1;
43
43
  `;
44
- const Title = styled(Text.Medium)`
44
+ const Title = styled(Text.Body1)`
45
45
  ${(props) => {
46
46
  const {
47
47
  components: { card, cardweb },
@@ -122,7 +122,7 @@ const PlanCardContent = (_a) => {
122
122
  ]);
123
123
  return /* @__PURE__ */ jsxs(Wrapper, __spreadProps(__spreadValues({}, rest), { children: [
124
124
  subtitle && /* @__PURE__ */ jsx(Subtitle, { children: subtitle }),
125
- title && /* @__PURE__ */ jsx(Title, { badgeColor, children: title }),
125
+ title && /* @__PURE__ */ jsx(Title, { bold: true, badgeColor, children: title }),
126
126
  description && /* @__PURE__ */ jsx(Description, { children: description }),
127
127
  !!price && /* @__PURE__ */ jsxs(Price, { children: [
128
128
  currency && /* @__PURE__ */ jsx(Text.H4, { as: "sup", children: currency }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gympass/yoga",
3
- "version": "7.108.3",
3
+ "version": "7.108.5",
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": "87f494a36913a74665bc2cc73da684ed399d23bd",
60
+ "gitHead": "28f54c98eae07e1b15f6cd6b670fe2dee2fe7cc1",
61
61
  "module": "./esm",
62
62
  "private": false,
63
63
  "react-native": "./cjs/index.native.js"