@gympass/yoga 7.102.4 → 7.104.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/NavigationMenu/web/BottomItems/BottomItems.js +34 -4
- package/cjs/NavigationMenu/web/NavigationMenu.js +44 -10
- package/cjs/NavigationMenu/web/Switcher/Actions.js +17 -7
- package/cjs/NavigationMenu/web/Switcher/Switcher.js +43 -10
- package/cjs/Text/Text.theme.js +33 -12
- package/cjs/Text/native/Text.js +44 -22
- package/cjs/Text/native/Text.test.js +17 -3
- package/cjs/Text/native/index.js +8 -0
- package/cjs/Text/textStyle.android.js +2 -0
- package/cjs/Text/textStyle.ios.js +2 -0
- package/cjs/Text/textStyle.web.js +2 -0
- package/cjs/Text/web/Text.js +44 -22
- package/cjs/Text/web/Text.test.js +13 -3
- package/cjs/Text/web/index.js +8 -0
- package/cjs/Theme/theme/theme.js +3 -2
- package/cjs/Theme/theme/v3theme.js +1 -0
- package/esm/NavigationMenu/web/BottomItems/BottomItems.js +36 -4
- package/esm/NavigationMenu/web/NavigationMenu.js +46 -10
- package/esm/NavigationMenu/web/Switcher/Actions.js +17 -7
- package/esm/NavigationMenu/web/Switcher/Switcher.js +45 -10
- package/esm/Text/Text.theme.js +33 -12
- package/esm/Text/native/Text.js +40 -22
- package/esm/Text/native/Text.test.js +17 -3
- package/esm/Text/native/index.js +17 -9
- package/esm/Text/textStyle.android.js +2 -0
- package/esm/Text/textStyle.ios.js +2 -0
- package/esm/Text/textStyle.web.js +2 -0
- package/esm/Text/web/Text.js +40 -22
- package/esm/Text/web/Text.test.js +13 -3
- package/esm/Text/web/index.js +17 -9
- package/esm/Theme/theme/theme.js +3 -2
- package/esm/Theme/theme/v3theme.js +1 -0
- package/package.json +2 -2
- package/typings/Actions-cd7fac99.d.ts +13 -0
- package/typings/NavigationMenu/index.d.ts +3 -3
- package/typings/NavigationMenu/web/BottomItems/index.d.ts +5 -2
- package/typings/NavigationMenu/web/Item/styles.d.ts +13 -7
- package/typings/NavigationMenu/web/Switcher/index.d.ts +10 -3
- package/typings/NavigationMenu/web/index.d.ts +3 -3
- package/typings/{NavigationMenu-4912428a.d.ts → NavigationMenu-57b14b2b.d.ts} +15 -8
- package/typings/index.d.ts +31 -21
- package/typings/Switcher-a8dff781.d.ts +0 -19
package/cjs/Text/web/Text.js
CHANGED
|
@@ -43,7 +43,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
43
43
|
var Text_exports = {};
|
|
44
44
|
__export(Text_exports, {
|
|
45
45
|
Black: () => Black,
|
|
46
|
+
Body1: () => Body1,
|
|
47
|
+
Body2: () => Body2,
|
|
46
48
|
Bold: () => Bold,
|
|
49
|
+
Caption: () => Caption,
|
|
47
50
|
Display1: () => Display1,
|
|
48
51
|
Display2: () => Display2,
|
|
49
52
|
Display3: () => Display3,
|
|
@@ -56,6 +59,7 @@ __export(Text_exports, {
|
|
|
56
59
|
H5: () => H5,
|
|
57
60
|
Light: () => Light,
|
|
58
61
|
Medium: () => Medium,
|
|
62
|
+
Overline: () => Overline,
|
|
59
63
|
Regular: () => Regular,
|
|
60
64
|
SectionTitle: () => SectionTitle,
|
|
61
65
|
Small: () => Small,
|
|
@@ -78,6 +82,16 @@ const styledText = (type, element = false) => (element ? import_styled_component
|
|
|
78
82
|
${(0, import_textStyle.default)(type)}
|
|
79
83
|
${import_yoga_system.system}
|
|
80
84
|
`;
|
|
85
|
+
const Display1 = styledText("display1");
|
|
86
|
+
Display1.displayName = "Text.Display1";
|
|
87
|
+
const Display2 = styledText("display2");
|
|
88
|
+
Display2.displayName = "Text.Display2";
|
|
89
|
+
const Display3 = styledText("display3");
|
|
90
|
+
Display3.displayName = "Text.Display3";
|
|
91
|
+
const Display4 = styledText("display4");
|
|
92
|
+
Display4.displayName = "Text.Display4";
|
|
93
|
+
const DisplayNumber = styledText("displayNumber");
|
|
94
|
+
DisplayNumber.displayName = "Text.DisplayNumber";
|
|
81
95
|
const H1 = styledText("h1", true);
|
|
82
96
|
H1.displayName = "Text.H1";
|
|
83
97
|
const H2 = styledText("h2", true);
|
|
@@ -88,6 +102,18 @@ const H4 = styledText("h4", true);
|
|
|
88
102
|
H4.displayName = "Text.H4";
|
|
89
103
|
const H5 = styledText("h5", true);
|
|
90
104
|
H5.displayName = "Text.H5";
|
|
105
|
+
const Body1 = styledText("body1");
|
|
106
|
+
Body1.displayName = "Text.Body1";
|
|
107
|
+
const Body2 = styledText("body2");
|
|
108
|
+
Body2.displayName = "Text.Body2";
|
|
109
|
+
const Caption = styledText("caption");
|
|
110
|
+
Caption.displayName = "Text.caption";
|
|
111
|
+
const Overline = styledText("overline");
|
|
112
|
+
Overline.overline = "Text.DisplayNumber";
|
|
113
|
+
const SectionTitle = styledText("sectionTitle");
|
|
114
|
+
SectionTitle.displayName = "Text.SectionTitle";
|
|
115
|
+
const SmallestException = styledText("smallestException");
|
|
116
|
+
SmallestException.displayName = "Text.SmallestException";
|
|
91
117
|
const Small = styledText("small");
|
|
92
118
|
Small.displayName = "Text.Small";
|
|
93
119
|
const Tiny = styledText("tiny");
|
|
@@ -102,28 +128,25 @@ const Bold = styledText("bold");
|
|
|
102
128
|
Bold.displayName = "Text.Bold";
|
|
103
129
|
const Black = styledText("black");
|
|
104
130
|
Black.displayName = "Text.Black";
|
|
105
|
-
const SectionTitle = styledText("sectionTitle");
|
|
106
|
-
SectionTitle.displayName = "Text.SectionTitle";
|
|
107
|
-
const SmallestException = styledText("smallestException");
|
|
108
|
-
SmallestException.displayName = "Text.SmallestException";
|
|
109
|
-
const Display1 = styledText("display1");
|
|
110
|
-
Display1.displayName = "Text.Display1";
|
|
111
|
-
const Display2 = styledText("display2");
|
|
112
|
-
Display2.displayName = "Text.Display2";
|
|
113
|
-
const Display3 = styledText("display3");
|
|
114
|
-
Display3.displayName = "Text.Display3";
|
|
115
|
-
const Display4 = styledText("display4");
|
|
116
|
-
Display4.displayName = "Text.Display4";
|
|
117
|
-
const DisplayNumber = styledText("displayNumber");
|
|
118
|
-
DisplayNumber.displayName = "Text.DisplayNumber";
|
|
119
131
|
const TextRenderer = styledText("p");
|
|
120
132
|
const Text = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TextRenderer, __spreadValues({}, props));
|
|
121
133
|
Text.displayName = "Text";
|
|
134
|
+
Text.Display1 = Display1;
|
|
135
|
+
Text.Display2 = Display2;
|
|
136
|
+
Text.Display3 = Display3;
|
|
137
|
+
Text.Display4 = Display4;
|
|
138
|
+
Text.DisplayNumber = DisplayNumber;
|
|
122
139
|
Text.H1 = H1;
|
|
123
140
|
Text.H2 = H2;
|
|
124
141
|
Text.H3 = H3;
|
|
125
142
|
Text.H4 = H4;
|
|
126
143
|
Text.H5 = H5;
|
|
144
|
+
Text.Body1 = Body1;
|
|
145
|
+
Text.Body2 = Body2;
|
|
146
|
+
Text.Caption = Caption;
|
|
147
|
+
Text.Overline = Overline;
|
|
148
|
+
Text.SectionTitle = SectionTitle;
|
|
149
|
+
Text.SmallestException = SmallestException;
|
|
127
150
|
Text.Small = Small;
|
|
128
151
|
Text.Tiny = Tiny;
|
|
129
152
|
Text.Light = Light;
|
|
@@ -131,13 +154,6 @@ Text.Regular = Regular;
|
|
|
131
154
|
Text.Medium = Medium;
|
|
132
155
|
Text.Bold = Bold;
|
|
133
156
|
Text.Black = Black;
|
|
134
|
-
Text.SectionTitle = SectionTitle;
|
|
135
|
-
Text.SmallestException = SmallestException;
|
|
136
|
-
Text.Display1 = Display1;
|
|
137
|
-
Text.Display2 = Display2;
|
|
138
|
-
Text.Display3 = Display3;
|
|
139
|
-
Text.Display4 = Display4;
|
|
140
|
-
Text.DisplayNumber = DisplayNumber;
|
|
141
157
|
const fontSizes = (0, import_prop_types.oneOf)([
|
|
142
158
|
"xxsmall",
|
|
143
159
|
"xsmall",
|
|
@@ -178,6 +194,7 @@ Text.propTypes = {
|
|
|
178
194
|
size: (0, import_shared.deprecated)(fontSizes, "Use `fontSize` system prop instead"),
|
|
179
195
|
/** set the font-weight to regular */
|
|
180
196
|
light: import_prop_types.bool,
|
|
197
|
+
bold: import_prop_types.bool,
|
|
181
198
|
fontSize: fontSizes
|
|
182
199
|
};
|
|
183
200
|
Text.defaultProps = {
|
|
@@ -186,12 +203,16 @@ Text.defaultProps = {
|
|
|
186
203
|
size: void 0,
|
|
187
204
|
fontSize: "medium",
|
|
188
205
|
numberOfLines: void 0,
|
|
189
|
-
light: false
|
|
206
|
+
light: false,
|
|
207
|
+
bold: false
|
|
190
208
|
};
|
|
191
209
|
// Annotate the CommonJS export names for ESM import in node:
|
|
192
210
|
0 && (module.exports = {
|
|
193
211
|
Black,
|
|
212
|
+
Body1,
|
|
213
|
+
Body2,
|
|
194
214
|
Bold,
|
|
215
|
+
Caption,
|
|
195
216
|
Display1,
|
|
196
217
|
Display2,
|
|
197
218
|
Display3,
|
|
@@ -204,6 +225,7 @@ Text.defaultProps = {
|
|
|
204
225
|
H5,
|
|
205
226
|
Light,
|
|
206
227
|
Medium,
|
|
228
|
+
Overline,
|
|
207
229
|
Regular,
|
|
208
230
|
SectionTitle,
|
|
209
231
|
Small,
|
|
@@ -41,15 +41,19 @@ describe("<Text />", () => {
|
|
|
41
41
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.H3, { children: "Live the mission" }),
|
|
42
42
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.H4, { children: "Live the mission" }),
|
|
43
43
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.H5, { children: "Live the mission" }),
|
|
44
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Body1, { children: "Live the mission" }),
|
|
45
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Body2, { children: "Live the mission" }),
|
|
46
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Caption, { children: "Live the mission" }),
|
|
47
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Overline, { children: "Live the mission" }),
|
|
48
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.SectionTitle, { children: "Live the mission" }),
|
|
49
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.SmallestException, { children: "Live the mission" }),
|
|
44
50
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text, { children: "Live the mission" }),
|
|
45
51
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Small, { children: "Live the mission" }),
|
|
46
52
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Tiny, { children: "Live the mission" }),
|
|
47
53
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Regular, { children: "Live the mission" }),
|
|
48
54
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Medium, { children: "Live the mission" }),
|
|
49
55
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Bold, { children: "Live the mission" }),
|
|
50
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Black, { children: "Live the mission" })
|
|
51
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.SectionTitle, { children: "Live the mission" }),
|
|
52
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.SmallestException, { children: "Live the mission" })
|
|
56
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Black, { children: "Live the mission" })
|
|
53
57
|
] })
|
|
54
58
|
);
|
|
55
59
|
expect(container).toMatchSnapshot();
|
|
@@ -175,5 +179,11 @@ describe("<Text />", () => {
|
|
|
175
179
|
);
|
|
176
180
|
expect(container).toMatchSnapshot();
|
|
177
181
|
});
|
|
182
|
+
it("should match snapshot with Text bold", () => {
|
|
183
|
+
const { container } = (0, import_react2.render)(
|
|
184
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.H1, { bold: true, children: "Live the mission" }) })
|
|
185
|
+
);
|
|
186
|
+
expect(container).toMatchSnapshot();
|
|
187
|
+
});
|
|
178
188
|
});
|
|
179
189
|
});
|
package/cjs/Text/web/index.js
CHANGED
|
@@ -19,7 +19,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
19
19
|
var web_exports = {};
|
|
20
20
|
__export(web_exports, {
|
|
21
21
|
Black: () => import_Text.Black,
|
|
22
|
+
Body1: () => import_Text.Body1,
|
|
23
|
+
Body2: () => import_Text.Body2,
|
|
22
24
|
Bold: () => import_Text.Bold,
|
|
25
|
+
Caption: () => import_Text.Caption,
|
|
23
26
|
Display1: () => import_Text.Display1,
|
|
24
27
|
Display2: () => import_Text.Display2,
|
|
25
28
|
Display3: () => import_Text.Display3,
|
|
@@ -32,6 +35,7 @@ __export(web_exports, {
|
|
|
32
35
|
H5: () => import_Text.H5,
|
|
33
36
|
Light: () => import_Text.Light,
|
|
34
37
|
Medium: () => import_Text.Medium,
|
|
38
|
+
Overline: () => import_Text.Overline,
|
|
35
39
|
Regular: () => import_Text.Regular,
|
|
36
40
|
SectionTitle: () => import_Text.SectionTitle,
|
|
37
41
|
Small: () => import_Text.Small,
|
|
@@ -44,7 +48,10 @@ var import_Text = require("./Text");
|
|
|
44
48
|
// Annotate the CommonJS export names for ESM import in node:
|
|
45
49
|
0 && (module.exports = {
|
|
46
50
|
Black,
|
|
51
|
+
Body1,
|
|
52
|
+
Body2,
|
|
47
53
|
Bold,
|
|
54
|
+
Caption,
|
|
48
55
|
Display1,
|
|
49
56
|
Display2,
|
|
50
57
|
Display3,
|
|
@@ -57,6 +64,7 @@ var import_Text = require("./Text");
|
|
|
57
64
|
H5,
|
|
58
65
|
Light,
|
|
59
66
|
Medium,
|
|
67
|
+
Overline,
|
|
60
68
|
Regular,
|
|
61
69
|
SectionTitle,
|
|
62
70
|
Small,
|
package/cjs/Theme/theme/theme.js
CHANGED
|
@@ -97,13 +97,14 @@ const theme = (tokens) => {
|
|
|
97
97
|
return __spreadProps(__spreadValues({}, tokens), {
|
|
98
98
|
colors,
|
|
99
99
|
baseFont,
|
|
100
|
-
baseFontSize
|
|
100
|
+
baseFontSize,
|
|
101
|
+
v3theme: false
|
|
101
102
|
});
|
|
102
103
|
};
|
|
103
104
|
const composeTheme = (tokens, customTheming = {}) => {
|
|
104
105
|
const baseTheme = theme(tokens);
|
|
105
106
|
const customTheme = (0, import_yoga_common.merge)(baseTheme, customTheming);
|
|
106
107
|
const componentTheming = getComponentThemes(customTheme);
|
|
107
|
-
return (0, import_yoga_common.merge)(
|
|
108
|
+
return (0, import_yoga_common.merge)(componentTheming, customTheme);
|
|
108
109
|
};
|
|
109
110
|
var theme_default = composeTheme;
|
|
@@ -33,6 +33,7 @@ __export(v3theme_exports, {
|
|
|
33
33
|
module.exports = __toCommonJS(v3theme_exports);
|
|
34
34
|
var import_themeGenerator = __toESM(require("../helpers/themeGenerator"));
|
|
35
35
|
const v3theme = (0, import_themeGenerator.default)((tokens) => ({
|
|
36
|
+
v3theme: true,
|
|
36
37
|
colors: {
|
|
37
38
|
secondary: tokens.colors.staminaNew,
|
|
38
39
|
deep: tokens.colors.deepNew,
|
|
@@ -1,3 +1,34 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __objRest = (source, exclude) => {
|
|
21
|
+
var target = {};
|
|
22
|
+
for (var prop in source)
|
|
23
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
+
target[prop] = source[prop];
|
|
25
|
+
if (source != null && __getOwnPropSymbols)
|
|
26
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
};
|
|
1
32
|
import { jsx } from "react/jsx-runtime";
|
|
2
33
|
import styled, { css } from "styled-components";
|
|
3
34
|
import { media } from "@gympass/yoga-helpers";
|
|
@@ -23,16 +54,17 @@ const StyledItems = styled.ul`
|
|
|
23
54
|
align-items: center;
|
|
24
55
|
width: 100%;
|
|
25
56
|
height: 56px;
|
|
26
|
-
background-color: ${backgroundColor.white}
|
|
57
|
+
background-color: ${backgroundColor.white};
|
|
27
58
|
margin: 0;
|
|
28
59
|
padding: 0;
|
|
29
60
|
border: 1px solid ${border.color.default};
|
|
30
61
|
gap: ${gap.xxxsmall}px;
|
|
31
|
-
z-index:
|
|
62
|
+
z-index: ${({ $zIndex }) => $zIndex != null ? $zIndex : 2};
|
|
32
63
|
`}
|
|
33
64
|
`;
|
|
34
|
-
const BottomItems = (
|
|
35
|
-
|
|
65
|
+
const BottomItems = (_a) => {
|
|
66
|
+
var _b = _a, { children } = _b, containerProps = __objRest(_b, ["children"]);
|
|
67
|
+
return /* @__PURE__ */ jsx(StyledItemsContainer, __spreadProps(__spreadValues({}, containerProps), { children: /* @__PURE__ */ jsx(StyledItems, { children }) }));
|
|
36
68
|
};
|
|
37
69
|
var BottomItems_default = BottomItems;
|
|
38
70
|
export {
|
|
@@ -1,3 +1,34 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __objRest = (source, exclude) => {
|
|
21
|
+
var target = {};
|
|
22
|
+
for (var prop in source)
|
|
23
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
+
target[prop] = source[prop];
|
|
25
|
+
if (source != null && __getOwnPropSymbols)
|
|
26
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
};
|
|
1
32
|
import { jsx } from "react/jsx-runtime";
|
|
2
33
|
import styled, { css } from "styled-components";
|
|
3
34
|
import { media } from "@gympass/yoga-helpers";
|
|
@@ -31,15 +62,15 @@ const DeskTopContainer = css`
|
|
|
31
62
|
transition: width 300ms ease-in-out;
|
|
32
63
|
`}
|
|
33
64
|
`;
|
|
34
|
-
const StyledNavigationMenu = styled
|
|
35
|
-
${({ isOpenOnMobile, isResponsive }) => css`
|
|
65
|
+
const StyledNavigationMenu = styled.div`
|
|
66
|
+
${({ isOpenOnMobile, isResponsive, $zIndex }) => css`
|
|
36
67
|
${DeskTopContainer};
|
|
37
68
|
|
|
38
69
|
${isResponsive && css`
|
|
39
70
|
position: fixed;
|
|
40
71
|
width: 100%;
|
|
41
72
|
height: calc(100% - 56px);
|
|
42
|
-
z-index:
|
|
73
|
+
z-index: ${$zIndex != null ? $zIndex : 1};
|
|
43
74
|
top: 0;
|
|
44
75
|
right: ${isOpenOnMobile ? "0" : "-100%"};
|
|
45
76
|
|
|
@@ -102,18 +133,23 @@ const StyledFooter = styled(Box)`
|
|
|
102
133
|
gap: ${gap.xxxsmall}px;
|
|
103
134
|
`}
|
|
104
135
|
`;
|
|
105
|
-
const NavigationMenu = ({
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
136
|
+
const NavigationMenu = (_a) => {
|
|
137
|
+
var _b = _a, {
|
|
138
|
+
children,
|
|
139
|
+
openOnMobile = false,
|
|
140
|
+
responsive = true
|
|
141
|
+
} = _b, htmlAttributes = __objRest(_b, [
|
|
142
|
+
"children",
|
|
143
|
+
"openOnMobile",
|
|
144
|
+
"responsive"
|
|
145
|
+
]);
|
|
110
146
|
return /* @__PURE__ */ jsx(
|
|
111
147
|
StyledNavigationMenu,
|
|
112
|
-
{
|
|
148
|
+
__spreadProps(__spreadValues({}, htmlAttributes), {
|
|
113
149
|
isOpenOnMobile: openOnMobile,
|
|
114
150
|
isResponsive: responsive,
|
|
115
151
|
children
|
|
116
|
-
}
|
|
152
|
+
})
|
|
117
153
|
);
|
|
118
154
|
};
|
|
119
155
|
NavigationMenu.Header = StyledHeader;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import styled, { css } from "styled-components";
|
|
3
|
-
import { MenuMore } from "@gympass/yoga-icons";
|
|
4
2
|
import { Menu as YogaMenu } from "@gympass/yoga";
|
|
3
|
+
import { MenuMore } from "@gympass/yoga-icons";
|
|
4
|
+
import styled, { css } from "styled-components";
|
|
5
5
|
import Icon from "../../../Icon";
|
|
6
|
-
|
|
7
|
-
const StyledAction = styled(Box)`
|
|
6
|
+
const StyledAction = styled.div`
|
|
8
7
|
${({
|
|
9
8
|
theme: {
|
|
10
9
|
yoga: {
|
|
@@ -30,12 +29,23 @@ const StyledAction = styled(Box)`
|
|
|
30
29
|
}
|
|
31
30
|
`}
|
|
32
31
|
`;
|
|
33
|
-
|
|
32
|
+
function Actions({ actions, sideOffset, $zIndex }) {
|
|
33
|
+
if (!(actions == null ? void 0 : actions.length)) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
34
36
|
return /* @__PURE__ */ jsxs(YogaMenu, { onMouseHover: false, children: [
|
|
35
37
|
/* @__PURE__ */ jsx(YogaMenu.Action, { children: /* @__PURE__ */ jsx(StyledAction, { children: /* @__PURE__ */ jsx(Icon, { as: MenuMore, size: "medium", fill: "vibin" }) }) }),
|
|
36
|
-
/* @__PURE__ */ jsx(
|
|
38
|
+
/* @__PURE__ */ jsx(
|
|
39
|
+
YogaMenu.List,
|
|
40
|
+
{
|
|
41
|
+
side: "right",
|
|
42
|
+
sideOffset,
|
|
43
|
+
zIndex: `${$zIndex != null ? $zIndex : 2}`,
|
|
44
|
+
children: actions.map(({ id, label, onClick }) => /* @__PURE__ */ jsx(YogaMenu.Item, { onClick, children: label }, id))
|
|
45
|
+
}
|
|
46
|
+
)
|
|
37
47
|
] });
|
|
38
|
-
}
|
|
48
|
+
}
|
|
39
49
|
var Actions_default = Actions;
|
|
40
50
|
export {
|
|
41
51
|
Actions_default as default
|
|
@@ -1,3 +1,31 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
17
|
+
var __objRest = (source, exclude) => {
|
|
18
|
+
var target = {};
|
|
19
|
+
for (var prop in source)
|
|
20
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
21
|
+
target[prop] = source[prop];
|
|
22
|
+
if (source != null && __getOwnPropSymbols)
|
|
23
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
24
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
25
|
+
target[prop] = source[prop];
|
|
26
|
+
}
|
|
27
|
+
return target;
|
|
28
|
+
};
|
|
1
29
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
30
|
import styled, { css } from "styled-components";
|
|
3
31
|
import { Text, Skeleton } from "@gympass/yoga";
|
|
@@ -51,15 +79,22 @@ const StyledTitle = styled(Text.Small)`
|
|
|
51
79
|
overflow: hidden;
|
|
52
80
|
`}
|
|
53
81
|
`;
|
|
54
|
-
const Switcher = ({
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
82
|
+
const Switcher = (_a) => {
|
|
83
|
+
var _b = _a, {
|
|
84
|
+
actions,
|
|
85
|
+
avatar: Avatar,
|
|
86
|
+
fill = "transparent",
|
|
87
|
+
isLoading = false,
|
|
88
|
+
subtitle,
|
|
89
|
+
title
|
|
90
|
+
} = _b, actionsProps = __objRest(_b, [
|
|
91
|
+
"actions",
|
|
92
|
+
"avatar",
|
|
93
|
+
"fill",
|
|
94
|
+
"isLoading",
|
|
95
|
+
"subtitle",
|
|
96
|
+
"title"
|
|
97
|
+
]);
|
|
63
98
|
const hasActions = actions == null ? void 0 : actions.length;
|
|
64
99
|
return /* @__PURE__ */ jsxs(StyledSwitcher, { fill, children: [
|
|
65
100
|
Avatar,
|
|
@@ -78,7 +113,7 @@ const Switcher = ({
|
|
|
78
113
|
title && /* @__PURE__ */ jsx(StyledTitle, { children: title }),
|
|
79
114
|
subtitle && /* @__PURE__ */ jsx(Text.Tiny, { color: "deep", children: subtitle })
|
|
80
115
|
] }) }),
|
|
81
|
-
hasActions && /* @__PURE__ */ jsx(Actions, { actions,
|
|
116
|
+
hasActions && /* @__PURE__ */ jsx(Actions, __spreadValues({ actions }, actionsProps))
|
|
82
117
|
] });
|
|
83
118
|
};
|
|
84
119
|
var Switcher_default = Switcher;
|
package/esm/Text/Text.theme.js
CHANGED
|
@@ -54,6 +54,39 @@ const Text = ({ fontSizes, lineHeights, fontWeights }) => ({
|
|
|
54
54
|
lineHeight: lineHeights.large,
|
|
55
55
|
fontWeight: fontWeights.medium
|
|
56
56
|
},
|
|
57
|
+
body1: {
|
|
58
|
+
fontsize: fontSizes.medium,
|
|
59
|
+
lineHeight: lineHeights.medium,
|
|
60
|
+
fontWeight: fontWeights.medium
|
|
61
|
+
},
|
|
62
|
+
body2: {
|
|
63
|
+
fontsize: fontSizes.small,
|
|
64
|
+
lineHeight: lineHeights.small,
|
|
65
|
+
fontWeight: fontWeights.medium
|
|
66
|
+
},
|
|
67
|
+
caption: {
|
|
68
|
+
fontsize: fontSizes.xsmall,
|
|
69
|
+
lineHeight: lineHeights.xsmall,
|
|
70
|
+
fontWeight: fontWeights.regular
|
|
71
|
+
},
|
|
72
|
+
overline: {
|
|
73
|
+
fontsize: fontSizes.xsmall,
|
|
74
|
+
lineHeight: lineHeights.xsmall,
|
|
75
|
+
fontWeight: fontWeights.bold
|
|
76
|
+
},
|
|
77
|
+
sectionTitle: {
|
|
78
|
+
fontsize: fontSizes.xsmall,
|
|
79
|
+
lineHeight: lineHeights.xsmall,
|
|
80
|
+
fontWeight: fontWeights.medium,
|
|
81
|
+
letterSpacing: 1,
|
|
82
|
+
textTransform: "uppercase"
|
|
83
|
+
},
|
|
84
|
+
smallestException: {
|
|
85
|
+
fontsize: fontSizes.xxsmall,
|
|
86
|
+
lineHeight: lineHeights.xxsmall,
|
|
87
|
+
fontWeight: fontWeights.regular
|
|
88
|
+
},
|
|
89
|
+
// deprecated, please don't use
|
|
57
90
|
p: {
|
|
58
91
|
fontsize: fontSizes.medium,
|
|
59
92
|
lineHeight: lineHeights.medium,
|
|
@@ -83,18 +116,6 @@ const Text = ({ fontSizes, lineHeights, fontWeights }) => ({
|
|
|
83
116
|
},
|
|
84
117
|
black: {
|
|
85
118
|
fontWeight: fontWeights.black
|
|
86
|
-
},
|
|
87
|
-
sectionTitle: {
|
|
88
|
-
fontsize: fontSizes.xsmall,
|
|
89
|
-
lineHeight: lineHeights.xsmall,
|
|
90
|
-
fontWeight: fontWeights.medium,
|
|
91
|
-
letterSpacing: 1,
|
|
92
|
-
textTransform: "uppercase"
|
|
93
|
-
},
|
|
94
|
-
smallestException: {
|
|
95
|
-
fontsize: fontSizes.xxsmall,
|
|
96
|
-
lineHeight: lineHeights.xxsmall,
|
|
97
|
-
fontWeight: fontWeights.regular
|
|
98
119
|
}
|
|
99
120
|
});
|
|
100
121
|
var Text_theme_default = Text;
|
package/esm/Text/native/Text.js
CHANGED
|
@@ -25,6 +25,16 @@ const styledText = (type) => styled.Text`
|
|
|
25
25
|
${textStyle(type)}
|
|
26
26
|
${system}
|
|
27
27
|
`;
|
|
28
|
+
const Display1 = styledText("display1");
|
|
29
|
+
Display1.displayName = "Text.Display1";
|
|
30
|
+
const Display2 = styledText("display2");
|
|
31
|
+
Display2.displayName = "Text.Display2";
|
|
32
|
+
const Display3 = styledText("display3");
|
|
33
|
+
Display3.displayName = "Text.Display3";
|
|
34
|
+
const Display4 = styledText("display4");
|
|
35
|
+
Display4.displayName = "Text.Display4";
|
|
36
|
+
const DisplayNumber = styledText("displayNumber");
|
|
37
|
+
DisplayNumber.displayName = "Text.DisplayNumber";
|
|
28
38
|
const H1 = styledText("h1");
|
|
29
39
|
H1.displayName = "Text.H1";
|
|
30
40
|
const H2 = styledText("h2");
|
|
@@ -35,6 +45,18 @@ const H4 = styledText("h4");
|
|
|
35
45
|
H4.displayName = "Text.H4";
|
|
36
46
|
const H5 = styledText("h5");
|
|
37
47
|
H5.displayName = "Text.H5";
|
|
48
|
+
const Body1 = styledText("body1");
|
|
49
|
+
Body1.displayName = "Text.Body1";
|
|
50
|
+
const Body2 = styledText("body2");
|
|
51
|
+
Body2.displayName = "Text.Body2";
|
|
52
|
+
const Caption = styledText("caption");
|
|
53
|
+
Caption.displayName = "Text.caption";
|
|
54
|
+
const Overline = styledText("overline");
|
|
55
|
+
Overline.overline = "Text.DisplayNumber";
|
|
56
|
+
const SectionTitle = styledText("sectionTitle");
|
|
57
|
+
SectionTitle.displayName = "Text.SectionTitle";
|
|
58
|
+
const SmallestException = styledText("smallestException");
|
|
59
|
+
SmallestException.displayName = "Text.SmallestException";
|
|
38
60
|
const Small = styledText("small");
|
|
39
61
|
Small.displayName = "Text.Small";
|
|
40
62
|
const Tiny = styledText("tiny");
|
|
@@ -49,28 +71,25 @@ const Bold = styledText("bold");
|
|
|
49
71
|
Bold.displayName = "Text.Bold";
|
|
50
72
|
const Black = styledText("black");
|
|
51
73
|
Black.displayName = "Text.Black";
|
|
52
|
-
const SectionTitle = styledText("sectionTitle");
|
|
53
|
-
SectionTitle.displayName = "Text.SectionTitle";
|
|
54
|
-
const SmallestException = styledText("smallestException");
|
|
55
|
-
SmallestException.displayName = "Text.SmallestException";
|
|
56
|
-
const Display1 = styledText("display1");
|
|
57
|
-
Display1.displayName = "Text.Display1";
|
|
58
|
-
const Display2 = styledText("display2");
|
|
59
|
-
Display2.displayName = "Text.Display2";
|
|
60
|
-
const Display3 = styledText("display3");
|
|
61
|
-
Display3.displayName = "Text.Display3";
|
|
62
|
-
const Display4 = styledText("display4");
|
|
63
|
-
Display4.displayName = "Text.Display4";
|
|
64
|
-
const DisplayNumber = styledText("displayNumber");
|
|
65
|
-
DisplayNumber.displayName = "Text.DisplayNumber";
|
|
66
74
|
const TextRenderer = styledText("p");
|
|
67
75
|
const Text = (props) => /* @__PURE__ */ jsx(TextRenderer, __spreadValues({}, props));
|
|
68
76
|
Text.displayName = "Text";
|
|
77
|
+
Text.Display1 = Display1;
|
|
78
|
+
Text.Display2 = Display2;
|
|
79
|
+
Text.Display3 = Display3;
|
|
80
|
+
Text.Display4 = Display4;
|
|
81
|
+
Text.DisplayNumber = DisplayNumber;
|
|
69
82
|
Text.H1 = H1;
|
|
70
83
|
Text.H2 = H2;
|
|
71
84
|
Text.H3 = H3;
|
|
72
85
|
Text.H4 = H4;
|
|
73
86
|
Text.H5 = H5;
|
|
87
|
+
Text.Body1 = Body1;
|
|
88
|
+
Text.Body2 = Body2;
|
|
89
|
+
Text.Caption = Caption;
|
|
90
|
+
Text.Overline = Overline;
|
|
91
|
+
Text.SectionTitle = SectionTitle;
|
|
92
|
+
Text.SmallestException = SmallestException;
|
|
74
93
|
Text.Small = Small;
|
|
75
94
|
Text.Tiny = Tiny;
|
|
76
95
|
Text.Light = Light;
|
|
@@ -78,13 +97,6 @@ Text.Regular = Regular;
|
|
|
78
97
|
Text.Medium = Medium;
|
|
79
98
|
Text.Bold = Bold;
|
|
80
99
|
Text.Black = Black;
|
|
81
|
-
Text.SectionTitle = SectionTitle;
|
|
82
|
-
Text.SmallestException = SmallestException;
|
|
83
|
-
Text.Display1 = Display1;
|
|
84
|
-
Text.Display2 = Display2;
|
|
85
|
-
Text.Display3 = Display3;
|
|
86
|
-
Text.Display4 = Display4;
|
|
87
|
-
Text.DisplayNumber = DisplayNumber;
|
|
88
100
|
const fontSizes = oneOf([
|
|
89
101
|
"xxsmall",
|
|
90
102
|
"xsmall",
|
|
@@ -124,6 +136,7 @@ Text.propTypes = {
|
|
|
124
136
|
size: deprecated(fontSizes, "Use `fontSize` system prop instead"),
|
|
125
137
|
/** set the font-weight to regular */
|
|
126
138
|
light: bool,
|
|
139
|
+
bold: bool,
|
|
127
140
|
fontSize: fontSizes
|
|
128
141
|
};
|
|
129
142
|
Text.defaultProps = {
|
|
@@ -131,11 +144,15 @@ Text.defaultProps = {
|
|
|
131
144
|
variant: void 0,
|
|
132
145
|
size: void 0,
|
|
133
146
|
fontSize: "medium",
|
|
134
|
-
light: false
|
|
147
|
+
light: false,
|
|
148
|
+
bold: false
|
|
135
149
|
};
|
|
136
150
|
export {
|
|
137
151
|
Black,
|
|
152
|
+
Body1,
|
|
153
|
+
Body2,
|
|
138
154
|
Bold,
|
|
155
|
+
Caption,
|
|
139
156
|
Display1,
|
|
140
157
|
Display2,
|
|
141
158
|
Display3,
|
|
@@ -148,6 +165,7 @@ export {
|
|
|
148
165
|
H5,
|
|
149
166
|
Light,
|
|
150
167
|
Medium,
|
|
168
|
+
Overline,
|
|
151
169
|
Regular,
|
|
152
170
|
SectionTitle,
|
|
153
171
|
Small,
|