@gympass/yoga 7.96.3 → 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.
- package/cjs/Card/web/PlanCard/Content.js +1 -1
- package/cjs/Card/web/PlanCard/PlanCard.js +3 -24
- package/cjs/Dialog/web/Dialog.js +30 -1
- package/esm/Card/web/PlanCard/Content.js +1 -1
- package/esm/Card/web/PlanCard/PlanCard.js +4 -25
- package/esm/Dialog/web/Dialog.js +31 -2
- package/package.json +2 -2
- package/typings/index.d.ts +4 -5
|
@@ -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[
|
|
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
|
-
|
|
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,
|
package/cjs/Dialog/web/Dialog.js
CHANGED
|
@@ -113,6 +113,27 @@ const Overlay = import_styled_components.default.div`
|
|
|
113
113
|
background-color: rgba(35, 27, 34, 0.48);
|
|
114
114
|
`}
|
|
115
115
|
`;
|
|
116
|
+
const CloseButton = (0, import_styled_components.default)(import__.Button.Icon)`
|
|
117
|
+
${({ theme }) => {
|
|
118
|
+
const background = theme.yoga.colors.elements.lineAndBorders;
|
|
119
|
+
const containerSize = theme.yoga.spacing.xxlarge;
|
|
120
|
+
const svgSize = theme.yoga.spacing.medium;
|
|
121
|
+
return import_styled_components.css`
|
|
122
|
+
width: ${containerSize}px;
|
|
123
|
+
height: ${containerSize}px;
|
|
124
|
+
background-color: ${background};
|
|
125
|
+
|
|
126
|
+
svg {
|
|
127
|
+
width: ${svgSize}px;
|
|
128
|
+
height: ${svgSize}px;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
&:active {
|
|
132
|
+
background-color: ${background};
|
|
133
|
+
}
|
|
134
|
+
`;
|
|
135
|
+
}}
|
|
136
|
+
`;
|
|
116
137
|
const Dialog = import_react.default.forwardRef(
|
|
117
138
|
(_a, forwardedRef) => {
|
|
118
139
|
var _b = _a, { isOpen, hideCloseButton, children, dialogId, onClose, zIndex } = _b, props = __objRest(_b, ["isOpen", "hideCloseButton", "children", "dialogId", "onClose", "zIndex"]);
|
|
@@ -150,7 +171,15 @@ const Dialog = import_react.default.forwardRef(
|
|
|
150
171
|
ref: dialogRef,
|
|
151
172
|
zIndex,
|
|
152
173
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(StyledDialog, __spreadProps(__spreadValues({ onClose }, props), { children: [
|
|
153
|
-
isCloseButtonVisible && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Box, { d: "flex", justifyContent: "flex-end", w: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
174
|
+
isCloseButtonVisible && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Box, { d: "flex", justifyContent: "flex-end", w: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
175
|
+
CloseButton,
|
|
176
|
+
{
|
|
177
|
+
icon: import_yoga_icons.Close,
|
|
178
|
+
inverted: true,
|
|
179
|
+
secondary: true,
|
|
180
|
+
onClick: onClose
|
|
181
|
+
}
|
|
182
|
+
) }),
|
|
154
183
|
children
|
|
155
184
|
] }))
|
|
156
185
|
}
|
|
@@ -56,7 +56,7 @@ const Title = styled(Text.Medium)`
|
|
|
56
56
|
content: '';
|
|
57
57
|
height: 24px;
|
|
58
58
|
width: 4px;
|
|
59
|
-
background-color: ${colors[
|
|
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,
|
|
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
|
-
|
|
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/esm/Dialog/web/Dialog.js
CHANGED
|
@@ -32,7 +32,7 @@ var __objRest = (source, exclude) => {
|
|
|
32
32
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
33
33
|
import React, { useEffect, useCallback } from "react";
|
|
34
34
|
import { createPortal } from "react-dom";
|
|
35
|
-
import styled from "styled-components";
|
|
35
|
+
import styled, { css } from "styled-components";
|
|
36
36
|
import { func, bool, node, number, string } from "prop-types";
|
|
37
37
|
import { Close } from "@gympass/yoga-icons";
|
|
38
38
|
import { usePortal, useCombinedRefs } from "../../hooks";
|
|
@@ -81,6 +81,27 @@ const Overlay = styled.div`
|
|
|
81
81
|
background-color: rgba(35, 27, 34, 0.48);
|
|
82
82
|
`}
|
|
83
83
|
`;
|
|
84
|
+
const CloseButton = styled(Button.Icon)`
|
|
85
|
+
${({ theme }) => {
|
|
86
|
+
const background = theme.yoga.colors.elements.lineAndBorders;
|
|
87
|
+
const containerSize = theme.yoga.spacing.xxlarge;
|
|
88
|
+
const svgSize = theme.yoga.spacing.medium;
|
|
89
|
+
return css`
|
|
90
|
+
width: ${containerSize}px;
|
|
91
|
+
height: ${containerSize}px;
|
|
92
|
+
background-color: ${background};
|
|
93
|
+
|
|
94
|
+
svg {
|
|
95
|
+
width: ${svgSize}px;
|
|
96
|
+
height: ${svgSize}px;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
&:active {
|
|
100
|
+
background-color: ${background};
|
|
101
|
+
}
|
|
102
|
+
`;
|
|
103
|
+
}}
|
|
104
|
+
`;
|
|
84
105
|
const Dialog = React.forwardRef(
|
|
85
106
|
(_a, forwardedRef) => {
|
|
86
107
|
var _b = _a, { isOpen, hideCloseButton, children, dialogId, onClose, zIndex } = _b, props = __objRest(_b, ["isOpen", "hideCloseButton", "children", "dialogId", "onClose", "zIndex"]);
|
|
@@ -118,7 +139,15 @@ const Dialog = React.forwardRef(
|
|
|
118
139
|
ref: dialogRef,
|
|
119
140
|
zIndex,
|
|
120
141
|
children: /* @__PURE__ */ jsxs(StyledDialog, __spreadProps(__spreadValues({ onClose }, props), { children: [
|
|
121
|
-
isCloseButtonVisible && /* @__PURE__ */ jsx(Box, { d: "flex", justifyContent: "flex-end", w: "100%", children: /* @__PURE__ */ jsx(
|
|
142
|
+
isCloseButtonVisible && /* @__PURE__ */ jsx(Box, { d: "flex", justifyContent: "flex-end", w: "100%", children: /* @__PURE__ */ jsx(
|
|
143
|
+
CloseButton,
|
|
144
|
+
{
|
|
145
|
+
icon: Close,
|
|
146
|
+
inverted: true,
|
|
147
|
+
secondary: true,
|
|
148
|
+
onClick: onClose
|
|
149
|
+
}
|
|
150
|
+
) }),
|
|
122
151
|
children
|
|
123
152
|
] }))
|
|
124
153
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gympass/yoga",
|
|
3
|
-
"version": "7.
|
|
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": "
|
|
60
|
+
"gitHead": "511b2e36788eae68b789a32c4743bf786b1702ae",
|
|
61
61
|
"module": "./esm",
|
|
62
62
|
"private": false,
|
|
63
63
|
"react-native": "./cjs/index.native.js"
|
package/typings/index.d.ts
CHANGED
|
@@ -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
|
|
136
|
+
export { string as variant };
|
|
137
137
|
}
|
|
138
138
|
namespace defaultProps {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
const
|
|
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
|
}
|