@gympass/yoga 7.97.0 → 7.98.0

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.
@@ -87,7 +87,7 @@ const Title = (0, import_styled_components.default)(import_Text.default.Medium)`
87
87
  content: '';
88
88
  height: 24px;
89
89
  width: 4px;
90
- background-color: ${colors[props.badgeColor]};
90
+ background-color: ${colors[badgeColor] || badgeColor};
91
91
  border-top-right-radius: ${radii.xsmall}px;
92
92
  border-bottom-right-radius: ${radii.xsmall}px;
93
93
  }
@@ -94,7 +94,7 @@ const Plan = import_styled_components.default.article`
94
94
  const Border = import_styled_components.default.span`
95
95
  ${({ variant, hasRightMask, theme }) => {
96
96
  const { spacing, colors } = theme.yoga;
97
- const color = colors[variant];
97
+ const color = colors[variant] || variant;
98
98
  const MASK_SIZE = 112;
99
99
  const baseMaskStyle = import_styled_components.css`
100
100
  position: absolute;
@@ -161,7 +161,7 @@ const DiscountWrapper = (0, import_styled_components.default)(import_Box.default
161
161
  top: ${PLAN_LINE_HEIGHT}px;
162
162
  background: transparent;
163
163
  border-top-right-radius: ${spacing.small}px;
164
- box-shadow: ${colors[bg]} ${spacing.xsmall}px -1px;
164
+ box-shadow: ${colors[bg] || bg} ${spacing.xsmall}px -1px;
165
165
  }
166
166
  `;
167
167
  }}
@@ -178,28 +178,7 @@ function PlanCard(_a) {
178
178
  PlanCard.propTypes = {
179
179
  children: import_prop_types.node,
180
180
  discount: import_prop_types.string,
181
- /** style the card border top color following the theme (primary, secondary,
182
- * vibin, hope, energy, relax, peace, verve, uplift, deepPurple, deep,
183
- * stamina, dark, medium, light, clear, white) */
184
- variant: (0, import_prop_types.oneOf)([
185
- "primary",
186
- "secondary",
187
- "vibin",
188
- "hope",
189
- "energy",
190
- "relax",
191
- "peace",
192
- "verve",
193
- "uplift",
194
- "deepPurple",
195
- "stamina",
196
- "dark",
197
- "medium",
198
- "deep",
199
- "light",
200
- "clear",
201
- "white"
202
- ])
181
+ variant: import_prop_types.string
203
182
  };
204
183
  PlanCard.defaultProps = {
205
184
  children: void 0,
@@ -56,7 +56,7 @@ const Title = styled(Text.Medium)`
56
56
  content: '';
57
57
  height: 24px;
58
58
  width: 4px;
59
- background-color: ${colors[props.badgeColor]};
59
+ background-color: ${colors[badgeColor] || badgeColor};
60
60
  border-top-right-radius: ${radii.xsmall}px;
61
61
  border-bottom-right-radius: ${radii.xsmall}px;
62
62
  }
@@ -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, { css } from "styled-components";
35
- import { node, oneOf, string } from "prop-types";
35
+ import { node, string } from "prop-types";
36
36
  import Box from "../../../Box";
37
37
  import Text from "../../../Text";
38
38
  const PLAN_LINE_HEIGHT = 4;
@@ -62,7 +62,7 @@ const Plan = styled.article`
62
62
  const Border = styled.span`
63
63
  ${({ variant, hasRightMask, theme }) => {
64
64
  const { spacing, colors } = theme.yoga;
65
- const color = colors[variant];
65
+ const color = colors[variant] || variant;
66
66
  const MASK_SIZE = 112;
67
67
  const baseMaskStyle = css`
68
68
  position: absolute;
@@ -129,7 +129,7 @@ const DiscountWrapper = styled(Box).attrs({
129
129
  top: ${PLAN_LINE_HEIGHT}px;
130
130
  background: transparent;
131
131
  border-top-right-radius: ${spacing.small}px;
132
- box-shadow: ${colors[bg]} ${spacing.xsmall}px -1px;
132
+ box-shadow: ${colors[bg] || bg} ${spacing.xsmall}px -1px;
133
133
  }
134
134
  `;
135
135
  }}
@@ -146,28 +146,7 @@ function PlanCard(_a) {
146
146
  PlanCard.propTypes = {
147
147
  children: node,
148
148
  discount: string,
149
- /** style the card border top color following the theme (primary, secondary,
150
- * vibin, hope, energy, relax, peace, verve, uplift, deepPurple, deep,
151
- * stamina, dark, medium, light, clear, white) */
152
- variant: oneOf([
153
- "primary",
154
- "secondary",
155
- "vibin",
156
- "hope",
157
- "energy",
158
- "relax",
159
- "peace",
160
- "verve",
161
- "uplift",
162
- "deepPurple",
163
- "stamina",
164
- "dark",
165
- "medium",
166
- "deep",
167
- "light",
168
- "clear",
169
- "white"
170
- ])
149
+ variant: string
171
150
  };
172
151
  PlanCard.defaultProps = {
173
152
  children: void 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gympass/yoga",
3
- "version": "7.97.0",
3
+ "version": "7.98.0",
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": "d408eb43f0ce85e44b67092d103df0f6ef343d8a",
60
+ "gitHead": "511b2e36788eae68b789a32c4743bf786b1702ae",
61
61
  "module": "./esm",
62
62
  "private": false,
63
63
  "react-native": "./cjs/index.native.js"
@@ -133,13 +133,12 @@ declare namespace PlanCard {
133
133
  namespace propTypes {
134
134
  export { node as children };
135
135
  export { string as discount };
136
- export const variant: prop_types.Requireable<string>;
136
+ export { string as variant };
137
137
  }
138
138
  namespace defaultProps {
139
- export const children: undefined;
140
- export const discount: undefined;
141
- const variant_1: string;
142
- export { variant_1 as variant };
139
+ const children: undefined;
140
+ const discount: undefined;
141
+ const variant: string;
143
142
  }
144
143
  const displayName: string;
145
144
  }