@gympass/yoga 7.102.3 → 7.103.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/Result/native/Result.js +6 -7
- 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/Result/native/Result.js +6 -7
- 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/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 +2 -2
- package/typings/Switcher-a8dff781.d.ts +0 -19
|
@@ -1,10 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
|
+
var __defProps = Object.defineProperties;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
7
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
9
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
10
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
+
var __spreadValues = (a, b) => {
|
|
14
|
+
for (var prop in b || (b = {}))
|
|
15
|
+
if (__hasOwnProp.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
if (__getOwnPropSymbols)
|
|
18
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
+
if (__propIsEnum.call(b, prop))
|
|
20
|
+
__defNormalProp(a, prop, b[prop]);
|
|
21
|
+
}
|
|
22
|
+
return a;
|
|
23
|
+
};
|
|
24
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
|
+
var __objRest = (source, exclude) => {
|
|
26
|
+
var target = {};
|
|
27
|
+
for (var prop in source)
|
|
28
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
29
|
+
target[prop] = source[prop];
|
|
30
|
+
if (source != null && __getOwnPropSymbols)
|
|
31
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
32
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
33
|
+
target[prop] = source[prop];
|
|
34
|
+
}
|
|
35
|
+
return target;
|
|
36
|
+
};
|
|
8
37
|
var __export = (target, all) => {
|
|
9
38
|
for (var name in all)
|
|
10
39
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -56,15 +85,16 @@ const StyledItems = import_styled_components.default.ul`
|
|
|
56
85
|
align-items: center;
|
|
57
86
|
width: 100%;
|
|
58
87
|
height: 56px;
|
|
59
|
-
background-color: ${backgroundColor.white}
|
|
88
|
+
background-color: ${backgroundColor.white};
|
|
60
89
|
margin: 0;
|
|
61
90
|
padding: 0;
|
|
62
91
|
border: 1px solid ${border.color.default};
|
|
63
92
|
gap: ${gap.xxxsmall}px;
|
|
64
|
-
z-index:
|
|
93
|
+
z-index: ${({ $zIndex }) => $zIndex != null ? $zIndex : 2};
|
|
65
94
|
`}
|
|
66
95
|
`;
|
|
67
|
-
const BottomItems = (
|
|
68
|
-
|
|
96
|
+
const BottomItems = (_a) => {
|
|
97
|
+
var _b = _a, { children } = _b, containerProps = __objRest(_b, ["children"]);
|
|
98
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledItemsContainer, __spreadProps(__spreadValues({}, containerProps), { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledItems, { children }) }));
|
|
69
99
|
};
|
|
70
100
|
var BottomItems_default = BottomItems;
|
|
@@ -1,10 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
|
+
var __defProps = Object.defineProperties;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
7
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
9
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
10
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
+
var __spreadValues = (a, b) => {
|
|
14
|
+
for (var prop in b || (b = {}))
|
|
15
|
+
if (__hasOwnProp.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
if (__getOwnPropSymbols)
|
|
18
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
+
if (__propIsEnum.call(b, prop))
|
|
20
|
+
__defNormalProp(a, prop, b[prop]);
|
|
21
|
+
}
|
|
22
|
+
return a;
|
|
23
|
+
};
|
|
24
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
|
+
var __objRest = (source, exclude) => {
|
|
26
|
+
var target = {};
|
|
27
|
+
for (var prop in source)
|
|
28
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
29
|
+
target[prop] = source[prop];
|
|
30
|
+
if (source != null && __getOwnPropSymbols)
|
|
31
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
32
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
33
|
+
target[prop] = source[prop];
|
|
34
|
+
}
|
|
35
|
+
return target;
|
|
36
|
+
};
|
|
8
37
|
var __export = (target, all) => {
|
|
9
38
|
for (var name in all)
|
|
10
39
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -64,15 +93,15 @@ const DeskTopContainer = import_styled_components.css`
|
|
|
64
93
|
transition: width 300ms ease-in-out;
|
|
65
94
|
`}
|
|
66
95
|
`;
|
|
67
|
-
const StyledNavigationMenu =
|
|
68
|
-
${({ isOpenOnMobile, isResponsive }) => import_styled_components.css`
|
|
96
|
+
const StyledNavigationMenu = import_styled_components.default.div`
|
|
97
|
+
${({ isOpenOnMobile, isResponsive, $zIndex }) => import_styled_components.css`
|
|
69
98
|
${DeskTopContainer};
|
|
70
99
|
|
|
71
100
|
${isResponsive && import_styled_components.css`
|
|
72
101
|
position: fixed;
|
|
73
102
|
width: 100%;
|
|
74
103
|
height: calc(100% - 56px);
|
|
75
|
-
z-index:
|
|
104
|
+
z-index: ${$zIndex != null ? $zIndex : 1};
|
|
76
105
|
top: 0;
|
|
77
106
|
right: ${isOpenOnMobile ? "0" : "-100%"};
|
|
78
107
|
|
|
@@ -135,18 +164,23 @@ const StyledFooter = (0, import_styled_components.default)(import_Box.default)`
|
|
|
135
164
|
gap: ${gap.xxxsmall}px;
|
|
136
165
|
`}
|
|
137
166
|
`;
|
|
138
|
-
const NavigationMenu = ({
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
167
|
+
const NavigationMenu = (_a) => {
|
|
168
|
+
var _b = _a, {
|
|
169
|
+
children,
|
|
170
|
+
openOnMobile = false,
|
|
171
|
+
responsive = true
|
|
172
|
+
} = _b, htmlAttributes = __objRest(_b, [
|
|
173
|
+
"children",
|
|
174
|
+
"openOnMobile",
|
|
175
|
+
"responsive"
|
|
176
|
+
]);
|
|
143
177
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
144
178
|
StyledNavigationMenu,
|
|
145
|
-
{
|
|
179
|
+
__spreadProps(__spreadValues({}, htmlAttributes), {
|
|
146
180
|
isOpenOnMobile: openOnMobile,
|
|
147
181
|
isResponsive: responsive,
|
|
148
182
|
children
|
|
149
|
-
}
|
|
183
|
+
})
|
|
150
184
|
);
|
|
151
185
|
};
|
|
152
186
|
NavigationMenu.Header = StyledHeader;
|
|
@@ -32,12 +32,11 @@ __export(Actions_exports, {
|
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(Actions_exports);
|
|
34
34
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
35
|
-
var import_styled_components = __toESM(require("styled-components"));
|
|
36
|
-
var import_yoga_icons = require("@gympass/yoga-icons");
|
|
37
35
|
var import_yoga = require("@gympass/yoga");
|
|
36
|
+
var import_yoga_icons = require("@gympass/yoga-icons");
|
|
37
|
+
var import_styled_components = __toESM(require("styled-components"));
|
|
38
38
|
var import_Icon = __toESM(require("../../../Icon"));
|
|
39
|
-
|
|
40
|
-
const StyledAction = (0, import_styled_components.default)(import_Box.default)`
|
|
39
|
+
const StyledAction = import_styled_components.default.div`
|
|
41
40
|
${({
|
|
42
41
|
theme: {
|
|
43
42
|
yoga: {
|
|
@@ -63,10 +62,21 @@ const StyledAction = (0, import_styled_components.default)(import_Box.default)`
|
|
|
63
62
|
}
|
|
64
63
|
`}
|
|
65
64
|
`;
|
|
66
|
-
|
|
65
|
+
function Actions({ actions, sideOffset, $zIndex }) {
|
|
66
|
+
if (!(actions == null ? void 0 : actions.length)) {
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
67
69
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_yoga.Menu, { onMouseHover: false, children: [
|
|
68
70
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_yoga.Menu.Action, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledAction, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Icon.default, { as: import_yoga_icons.MenuMore, size: "medium", fill: "vibin" }) }) }),
|
|
69
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
71
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
72
|
+
import_yoga.Menu.List,
|
|
73
|
+
{
|
|
74
|
+
side: "right",
|
|
75
|
+
sideOffset,
|
|
76
|
+
zIndex: `${$zIndex != null ? $zIndex : 2}`,
|
|
77
|
+
children: actions.map(({ id, label, onClick }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_yoga.Menu.Item, { onClick, children: label }, id))
|
|
78
|
+
}
|
|
79
|
+
)
|
|
70
80
|
] });
|
|
71
|
-
}
|
|
81
|
+
}
|
|
72
82
|
var Actions_default = Actions;
|
|
@@ -3,8 +3,34 @@ var __create = Object.create;
|
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
7
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
10
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
+
var __spreadValues = (a, b) => {
|
|
12
|
+
for (var prop in b || (b = {}))
|
|
13
|
+
if (__hasOwnProp.call(b, prop))
|
|
14
|
+
__defNormalProp(a, prop, b[prop]);
|
|
15
|
+
if (__getOwnPropSymbols)
|
|
16
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
17
|
+
if (__propIsEnum.call(b, prop))
|
|
18
|
+
__defNormalProp(a, prop, b[prop]);
|
|
19
|
+
}
|
|
20
|
+
return a;
|
|
21
|
+
};
|
|
22
|
+
var __objRest = (source, exclude) => {
|
|
23
|
+
var target = {};
|
|
24
|
+
for (var prop in source)
|
|
25
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
26
|
+
target[prop] = source[prop];
|
|
27
|
+
if (source != null && __getOwnPropSymbols)
|
|
28
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
29
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
30
|
+
target[prop] = source[prop];
|
|
31
|
+
}
|
|
32
|
+
return target;
|
|
33
|
+
};
|
|
8
34
|
var __export = (target, all) => {
|
|
9
35
|
for (var name in all)
|
|
10
36
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -84,15 +110,22 @@ const StyledTitle = (0, import_styled_components.default)(import_yoga.Text.Small
|
|
|
84
110
|
overflow: hidden;
|
|
85
111
|
`}
|
|
86
112
|
`;
|
|
87
|
-
const Switcher = ({
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
113
|
+
const Switcher = (_a) => {
|
|
114
|
+
var _b = _a, {
|
|
115
|
+
actions,
|
|
116
|
+
avatar: Avatar,
|
|
117
|
+
fill = "transparent",
|
|
118
|
+
isLoading = false,
|
|
119
|
+
subtitle,
|
|
120
|
+
title
|
|
121
|
+
} = _b, actionsProps = __objRest(_b, [
|
|
122
|
+
"actions",
|
|
123
|
+
"avatar",
|
|
124
|
+
"fill",
|
|
125
|
+
"isLoading",
|
|
126
|
+
"subtitle",
|
|
127
|
+
"title"
|
|
128
|
+
]);
|
|
96
129
|
const hasActions = actions == null ? void 0 : actions.length;
|
|
97
130
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(StyledSwitcher, { fill, children: [
|
|
98
131
|
Avatar,
|
|
@@ -111,7 +144,7 @@ const Switcher = ({
|
|
|
111
144
|
title && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledTitle, { children: title }),
|
|
112
145
|
subtitle && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_yoga.Text.Tiny, { color: "deep", children: subtitle })
|
|
113
146
|
] }) }),
|
|
114
|
-
hasActions && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Actions.default, { actions,
|
|
147
|
+
hasActions && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Actions.default, __spreadValues({ actions }, actionsProps))
|
|
115
148
|
] });
|
|
116
149
|
};
|
|
117
150
|
var Switcher_default = Switcher;
|
|
@@ -40,17 +40,16 @@ var import_Attendances = __toESM(require("./Attendances"));
|
|
|
40
40
|
var import_Box = __toESM(require("../../Box"));
|
|
41
41
|
const StyledBox = (0, import_styled_components.default)(import_Box.default)`
|
|
42
42
|
width: 100%;
|
|
43
|
-
${({
|
|
44
|
-
|
|
43
|
+
border-bottom-width: ${({ divided }) => divided ? 1 : 0}px;
|
|
44
|
+
border-bottom-color: ${({
|
|
45
45
|
theme: {
|
|
46
46
|
yoga: {
|
|
47
|
-
colors: {
|
|
47
|
+
colors: {
|
|
48
|
+
elements: { lineAndBorders }
|
|
49
|
+
}
|
|
48
50
|
}
|
|
49
51
|
}
|
|
50
|
-
}) =>
|
|
51
|
-
border-bottom-width: 1px;
|
|
52
|
-
border-bottom-color: ${light};
|
|
53
|
-
` : ""}
|
|
52
|
+
}) => lineAndBorders};
|
|
54
53
|
`;
|
|
55
54
|
const Content = import_styled_components.default.View`
|
|
56
55
|
flex: 1;
|
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;
|
|
@@ -7,17 +7,16 @@ import Attendances from "./Attendances";
|
|
|
7
7
|
import Box from "../../Box";
|
|
8
8
|
const StyledBox = styled(Box)`
|
|
9
9
|
width: 100%;
|
|
10
|
-
${({
|
|
11
|
-
|
|
10
|
+
border-bottom-width: ${({ divided }) => divided ? 1 : 0}px;
|
|
11
|
+
border-bottom-color: ${({
|
|
12
12
|
theme: {
|
|
13
13
|
yoga: {
|
|
14
|
-
colors: {
|
|
14
|
+
colors: {
|
|
15
|
+
elements: { lineAndBorders }
|
|
16
|
+
}
|
|
15
17
|
}
|
|
16
18
|
}
|
|
17
|
-
}) =>
|
|
18
|
-
border-bottom-width: 1px;
|
|
19
|
-
border-bottom-color: ${light};
|
|
20
|
-
` : ""}
|
|
19
|
+
}) => lineAndBorders};
|
|
21
20
|
`;
|
|
22
21
|
const Content = styled.View`
|
|
23
22
|
flex: 1;
|
package/esm/Theme/theme/theme.js
CHANGED
|
@@ -66,14 +66,15 @@ const theme = (tokens) => {
|
|
|
66
66
|
return __spreadProps(__spreadValues({}, tokens), {
|
|
67
67
|
colors,
|
|
68
68
|
baseFont,
|
|
69
|
-
baseFontSize
|
|
69
|
+
baseFontSize,
|
|
70
|
+
v3theme: false
|
|
70
71
|
});
|
|
71
72
|
};
|
|
72
73
|
const composeTheme = (tokens, customTheming = {}) => {
|
|
73
74
|
const baseTheme = theme(tokens);
|
|
74
75
|
const customTheme = merge(baseTheme, customTheming);
|
|
75
76
|
const componentTheming = getComponentThemes(customTheme);
|
|
76
|
-
return merge(
|
|
77
|
+
return merge(componentTheming, customTheme);
|
|
77
78
|
};
|
|
78
79
|
var theme_default = composeTheme;
|
|
79
80
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gympass/yoga",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.103.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": "49a6cbc61257989ed79c72b8c60015432b2adc94",
|
|
61
61
|
"module": "./esm",
|
|
62
62
|
"private": false,
|
|
63
63
|
"react-native": "./cjs/index.native.js"
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare type SwitcherActionsProps = {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
onClick: () => void;
|
|
5
|
+
};
|
|
6
|
+
declare type ActionsProps = {
|
|
7
|
+
actions?: SwitcherActionsProps[];
|
|
8
|
+
sideOffset?: number;
|
|
9
|
+
$zIndex?: number;
|
|
10
|
+
};
|
|
11
|
+
declare function Actions({ actions, sideOffset, $zIndex }: ActionsProps): JSX.Element | null;
|
|
12
|
+
|
|
13
|
+
export { ActionsProps as A, Actions as a };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { N as NavigationMenu } from '../NavigationMenu-
|
|
2
|
-
import '../
|
|
3
|
-
import 'react';
|
|
1
|
+
import { N as NavigationMenu } from '../NavigationMenu-57b14b2b.js';
|
|
2
|
+
import '../Actions-cd7fac99.js';
|
|
4
3
|
import 'styled-components';
|
|
4
|
+
import 'react';
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
declare type
|
|
3
|
+
declare type BottomItemsStyledProps = React.HTMLAttributes<HTMLUListElement> & {
|
|
4
|
+
$zIndex?: number;
|
|
5
|
+
};
|
|
6
|
+
declare type BottomItemsProps = BottomItemsStyledProps & {
|
|
4
7
|
children: React.ReactNode;
|
|
5
8
|
};
|
|
6
|
-
declare const BottomItems: ({ children }: BottomItemsProps) => JSX.Element;
|
|
9
|
+
declare const BottomItems: ({ children, ...containerProps }: BottomItemsProps) => JSX.Element;
|
|
7
10
|
|
|
8
11
|
declare type BottomItemProps = {
|
|
9
12
|
active?: boolean;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import '
|
|
3
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { a as Actions } from '../../../Actions-cd7fac99.js';
|
|
4
3
|
|
|
4
|
+
declare type SwitcherProps = React.ComponentProps<typeof Actions> & {
|
|
5
|
+
avatar: React.ReactElement;
|
|
6
|
+
fill?: string;
|
|
7
|
+
isLoading?: boolean;
|
|
8
|
+
subtitle?: string;
|
|
9
|
+
title?: string;
|
|
10
|
+
};
|
|
11
|
+
declare const Switcher: ({ actions, avatar: Avatar, fill, isLoading, subtitle, title, ...actionsProps }: SwitcherProps) => JSX.Element;
|
|
5
12
|
|
|
6
13
|
export { Switcher as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { N as NavigationMenu } from '../../NavigationMenu-
|
|
2
|
-
import '../../
|
|
3
|
-
import 'react';
|
|
1
|
+
import { N as NavigationMenu } from '../../NavigationMenu-57b14b2b.js';
|
|
2
|
+
import '../../Actions-cd7fac99.js';
|
|
4
3
|
import 'styled-components';
|
|
4
|
+
import 'react';
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { A as ActionsProps } from './Actions-cd7fac99.js';
|
|
2
2
|
import * as styled_components from 'styled-components';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
|
|
5
|
-
declare type
|
|
5
|
+
declare type NavigationMenuStyledProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
6
|
+
isOpenOnMobile: boolean;
|
|
7
|
+
isResponsive: boolean;
|
|
8
|
+
$zIndex?: number;
|
|
9
|
+
};
|
|
10
|
+
declare type NavigationMenuProps = Pick<NavigationMenuStyledProps, '$zIndex'> & {
|
|
6
11
|
children: React.ReactNode;
|
|
7
12
|
openOnMobile?: boolean;
|
|
8
13
|
responsive?: boolean;
|
|
9
14
|
};
|
|
10
15
|
declare const NavigationMenu: {
|
|
11
|
-
({ children, openOnMobile, responsive, }: NavigationMenuProps): JSX.Element;
|
|
16
|
+
({ children, openOnMobile, responsive, ...htmlAttributes }: NavigationMenuProps): JSX.Element;
|
|
12
17
|
Header: styled_components.StyledComponent<string, any, {}, never>;
|
|
13
18
|
Menu: ({ avatar: Avatar, subtitle, title, onClick }: {
|
|
14
19
|
avatar: React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
@@ -16,17 +21,17 @@ declare const NavigationMenu: {
|
|
|
16
21
|
title?: string | undefined;
|
|
17
22
|
onClick?: (() => void) | undefined;
|
|
18
23
|
}) => JSX.Element;
|
|
19
|
-
Switcher: ({ actions, avatar: Avatar, fill, isLoading,
|
|
20
|
-
actions?: SwitcherActionsProps[] | undefined;
|
|
24
|
+
Switcher: ({ actions, avatar: Avatar, fill, isLoading, subtitle, title, ...actionsProps }: ActionsProps & {
|
|
21
25
|
avatar: React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
22
26
|
fill?: string | undefined;
|
|
23
27
|
isLoading?: boolean | undefined;
|
|
24
|
-
sideOffset?: number | undefined;
|
|
25
28
|
subtitle?: string | undefined;
|
|
26
29
|
title?: string | undefined;
|
|
27
30
|
}) => JSX.Element;
|
|
28
31
|
Items: styled_components.StyledComponent<string, any, {}, never>;
|
|
29
|
-
ItemsGroup: styled_components.StyledComponent<string, any, {
|
|
32
|
+
ItemsGroup: styled_components.StyledComponent<string, any, {
|
|
33
|
+
children?: React.ReactNode;
|
|
34
|
+
}, never>;
|
|
30
35
|
Item: ({ active, children, expanded, icon: Icon, label, responsive, tag, wrapper: Wrapper, }: {
|
|
31
36
|
active?: boolean | undefined;
|
|
32
37
|
children?: React.ReactNode;
|
|
@@ -48,7 +53,9 @@ declare const NavigationMenu: {
|
|
|
48
53
|
label: string;
|
|
49
54
|
wrapper: React.FunctionComponent<any>;
|
|
50
55
|
}) => JSX.Element;
|
|
51
|
-
BottomItems: ({ children }: {
|
|
56
|
+
BottomItems: ({ children, ...containerProps }: React.HTMLAttributes<HTMLUListElement> & {
|
|
57
|
+
$zIndex?: number | undefined;
|
|
58
|
+
} & {
|
|
52
59
|
children: React.ReactNode;
|
|
53
60
|
}) => JSX.Element;
|
|
54
61
|
BottomItem: ({ active, icon, label, wrapper: Wrapper, }: {
|
package/typings/index.d.ts
CHANGED
|
@@ -5,11 +5,11 @@ export { v3theme } from './Theme/theme/v3theme.js';
|
|
|
5
5
|
export { default as createTheme } from './Theme/helpers/themeGenerator/themeGenerator.js';
|
|
6
6
|
import * as styled_components from 'styled-components';
|
|
7
7
|
export { _ as Icon } from './Icon-19f6da82.js';
|
|
8
|
-
export { N as NavigationMenu } from './NavigationMenu-
|
|
8
|
+
export { N as NavigationMenu } from './NavigationMenu-57b14b2b.js';
|
|
9
9
|
import '@gympass/yoga-tokens/global/transition';
|
|
10
10
|
import '@gympass/yoga-tokens/global/breakpoints';
|
|
11
11
|
import '@gympass/yoga-tokens';
|
|
12
|
-
import './
|
|
12
|
+
import './Actions-cd7fac99.js';
|
|
13
13
|
|
|
14
14
|
/** This component provides a theme to all React components underneath itself via the context API. */
|
|
15
15
|
declare function ThemeProvider({ children, ...rest }: {
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
declare type SwitcherActionsProps = {
|
|
4
|
-
id: string;
|
|
5
|
-
label: string;
|
|
6
|
-
onClick: () => void;
|
|
7
|
-
};
|
|
8
|
-
declare type SwitcherProps = {
|
|
9
|
-
actions?: SwitcherActionsProps[];
|
|
10
|
-
avatar: React.ReactElement;
|
|
11
|
-
fill?: string;
|
|
12
|
-
isLoading?: boolean;
|
|
13
|
-
sideOffset?: number;
|
|
14
|
-
subtitle?: string;
|
|
15
|
-
title?: string;
|
|
16
|
-
};
|
|
17
|
-
declare const Switcher: ({ actions, avatar: Avatar, fill, isLoading, sideOffset, subtitle, title, }: SwitcherProps) => JSX.Element;
|
|
18
|
-
|
|
19
|
-
export { SwitcherActionsProps as S, Switcher as a };
|