@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
|
@@ -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;
|
package/cjs/Text/Text.theme.js
CHANGED
|
@@ -77,6 +77,39 @@ const Text = ({ fontSizes, lineHeights, fontWeights }) => ({
|
|
|
77
77
|
lineHeight: lineHeights.large,
|
|
78
78
|
fontWeight: fontWeights.medium
|
|
79
79
|
},
|
|
80
|
+
body1: {
|
|
81
|
+
fontsize: fontSizes.medium,
|
|
82
|
+
lineHeight: lineHeights.medium,
|
|
83
|
+
fontWeight: fontWeights.medium
|
|
84
|
+
},
|
|
85
|
+
body2: {
|
|
86
|
+
fontsize: fontSizes.small,
|
|
87
|
+
lineHeight: lineHeights.small,
|
|
88
|
+
fontWeight: fontWeights.medium
|
|
89
|
+
},
|
|
90
|
+
caption: {
|
|
91
|
+
fontsize: fontSizes.xsmall,
|
|
92
|
+
lineHeight: lineHeights.xsmall,
|
|
93
|
+
fontWeight: fontWeights.regular
|
|
94
|
+
},
|
|
95
|
+
overline: {
|
|
96
|
+
fontsize: fontSizes.xsmall,
|
|
97
|
+
lineHeight: lineHeights.xsmall,
|
|
98
|
+
fontWeight: fontWeights.bold
|
|
99
|
+
},
|
|
100
|
+
sectionTitle: {
|
|
101
|
+
fontsize: fontSizes.xsmall,
|
|
102
|
+
lineHeight: lineHeights.xsmall,
|
|
103
|
+
fontWeight: fontWeights.medium,
|
|
104
|
+
letterSpacing: 1,
|
|
105
|
+
textTransform: "uppercase"
|
|
106
|
+
},
|
|
107
|
+
smallestException: {
|
|
108
|
+
fontsize: fontSizes.xxsmall,
|
|
109
|
+
lineHeight: lineHeights.xxsmall,
|
|
110
|
+
fontWeight: fontWeights.regular
|
|
111
|
+
},
|
|
112
|
+
// deprecated, please don't use
|
|
80
113
|
p: {
|
|
81
114
|
fontsize: fontSizes.medium,
|
|
82
115
|
lineHeight: lineHeights.medium,
|
|
@@ -106,18 +139,6 @@ const Text = ({ fontSizes, lineHeights, fontWeights }) => ({
|
|
|
106
139
|
},
|
|
107
140
|
black: {
|
|
108
141
|
fontWeight: fontWeights.black
|
|
109
|
-
},
|
|
110
|
-
sectionTitle: {
|
|
111
|
-
fontsize: fontSizes.xsmall,
|
|
112
|
-
lineHeight: lineHeights.xsmall,
|
|
113
|
-
fontWeight: fontWeights.medium,
|
|
114
|
-
letterSpacing: 1,
|
|
115
|
-
textTransform: "uppercase"
|
|
116
|
-
},
|
|
117
|
-
smallestException: {
|
|
118
|
-
fontsize: fontSizes.xxsmall,
|
|
119
|
-
lineHeight: lineHeights.xxsmall,
|
|
120
|
-
fontWeight: fontWeights.regular
|
|
121
142
|
}
|
|
122
143
|
});
|
|
123
144
|
var Text_theme_default = Text;
|
package/cjs/Text/native/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,
|
|
@@ -75,6 +79,16 @@ const styledText = (type) => import_styled_components.default.Text`
|
|
|
75
79
|
${(0, import_textStyle.default)(type)}
|
|
76
80
|
${import_yoga_system.system}
|
|
77
81
|
`;
|
|
82
|
+
const Display1 = styledText("display1");
|
|
83
|
+
Display1.displayName = "Text.Display1";
|
|
84
|
+
const Display2 = styledText("display2");
|
|
85
|
+
Display2.displayName = "Text.Display2";
|
|
86
|
+
const Display3 = styledText("display3");
|
|
87
|
+
Display3.displayName = "Text.Display3";
|
|
88
|
+
const Display4 = styledText("display4");
|
|
89
|
+
Display4.displayName = "Text.Display4";
|
|
90
|
+
const DisplayNumber = styledText("displayNumber");
|
|
91
|
+
DisplayNumber.displayName = "Text.DisplayNumber";
|
|
78
92
|
const H1 = styledText("h1");
|
|
79
93
|
H1.displayName = "Text.H1";
|
|
80
94
|
const H2 = styledText("h2");
|
|
@@ -85,6 +99,18 @@ const H4 = styledText("h4");
|
|
|
85
99
|
H4.displayName = "Text.H4";
|
|
86
100
|
const H5 = styledText("h5");
|
|
87
101
|
H5.displayName = "Text.H5";
|
|
102
|
+
const Body1 = styledText("body1");
|
|
103
|
+
Body1.displayName = "Text.Body1";
|
|
104
|
+
const Body2 = styledText("body2");
|
|
105
|
+
Body2.displayName = "Text.Body2";
|
|
106
|
+
const Caption = styledText("caption");
|
|
107
|
+
Caption.displayName = "Text.caption";
|
|
108
|
+
const Overline = styledText("overline");
|
|
109
|
+
Overline.overline = "Text.DisplayNumber";
|
|
110
|
+
const SectionTitle = styledText("sectionTitle");
|
|
111
|
+
SectionTitle.displayName = "Text.SectionTitle";
|
|
112
|
+
const SmallestException = styledText("smallestException");
|
|
113
|
+
SmallestException.displayName = "Text.SmallestException";
|
|
88
114
|
const Small = styledText("small");
|
|
89
115
|
Small.displayName = "Text.Small";
|
|
90
116
|
const Tiny = styledText("tiny");
|
|
@@ -99,28 +125,25 @@ const Bold = styledText("bold");
|
|
|
99
125
|
Bold.displayName = "Text.Bold";
|
|
100
126
|
const Black = styledText("black");
|
|
101
127
|
Black.displayName = "Text.Black";
|
|
102
|
-
const SectionTitle = styledText("sectionTitle");
|
|
103
|
-
SectionTitle.displayName = "Text.SectionTitle";
|
|
104
|
-
const SmallestException = styledText("smallestException");
|
|
105
|
-
SmallestException.displayName = "Text.SmallestException";
|
|
106
|
-
const Display1 = styledText("display1");
|
|
107
|
-
Display1.displayName = "Text.Display1";
|
|
108
|
-
const Display2 = styledText("display2");
|
|
109
|
-
Display2.displayName = "Text.Display2";
|
|
110
|
-
const Display3 = styledText("display3");
|
|
111
|
-
Display3.displayName = "Text.Display3";
|
|
112
|
-
const Display4 = styledText("display4");
|
|
113
|
-
Display4.displayName = "Text.Display4";
|
|
114
|
-
const DisplayNumber = styledText("displayNumber");
|
|
115
|
-
DisplayNumber.displayName = "Text.DisplayNumber";
|
|
116
128
|
const TextRenderer = styledText("p");
|
|
117
129
|
const Text = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TextRenderer, __spreadValues({}, props));
|
|
118
130
|
Text.displayName = "Text";
|
|
131
|
+
Text.Display1 = Display1;
|
|
132
|
+
Text.Display2 = Display2;
|
|
133
|
+
Text.Display3 = Display3;
|
|
134
|
+
Text.Display4 = Display4;
|
|
135
|
+
Text.DisplayNumber = DisplayNumber;
|
|
119
136
|
Text.H1 = H1;
|
|
120
137
|
Text.H2 = H2;
|
|
121
138
|
Text.H3 = H3;
|
|
122
139
|
Text.H4 = H4;
|
|
123
140
|
Text.H5 = H5;
|
|
141
|
+
Text.Body1 = Body1;
|
|
142
|
+
Text.Body2 = Body2;
|
|
143
|
+
Text.Caption = Caption;
|
|
144
|
+
Text.Overline = Overline;
|
|
145
|
+
Text.SectionTitle = SectionTitle;
|
|
146
|
+
Text.SmallestException = SmallestException;
|
|
124
147
|
Text.Small = Small;
|
|
125
148
|
Text.Tiny = Tiny;
|
|
126
149
|
Text.Light = Light;
|
|
@@ -128,13 +151,6 @@ Text.Regular = Regular;
|
|
|
128
151
|
Text.Medium = Medium;
|
|
129
152
|
Text.Bold = Bold;
|
|
130
153
|
Text.Black = Black;
|
|
131
|
-
Text.SectionTitle = SectionTitle;
|
|
132
|
-
Text.SmallestException = SmallestException;
|
|
133
|
-
Text.Display1 = Display1;
|
|
134
|
-
Text.Display2 = Display2;
|
|
135
|
-
Text.Display3 = Display3;
|
|
136
|
-
Text.Display4 = Display4;
|
|
137
|
-
Text.DisplayNumber = DisplayNumber;
|
|
138
154
|
const fontSizes = (0, import_prop_types.oneOf)([
|
|
139
155
|
"xxsmall",
|
|
140
156
|
"xsmall",
|
|
@@ -174,6 +190,7 @@ Text.propTypes = {
|
|
|
174
190
|
size: (0, import_shared.deprecated)(fontSizes, "Use `fontSize` system prop instead"),
|
|
175
191
|
/** set the font-weight to regular */
|
|
176
192
|
light: import_prop_types.bool,
|
|
193
|
+
bold: import_prop_types.bool,
|
|
177
194
|
fontSize: fontSizes
|
|
178
195
|
};
|
|
179
196
|
Text.defaultProps = {
|
|
@@ -181,12 +198,16 @@ Text.defaultProps = {
|
|
|
181
198
|
variant: void 0,
|
|
182
199
|
size: void 0,
|
|
183
200
|
fontSize: "medium",
|
|
184
|
-
light: false
|
|
201
|
+
light: false,
|
|
202
|
+
bold: false
|
|
185
203
|
};
|
|
186
204
|
// Annotate the CommonJS export names for ESM import in node:
|
|
187
205
|
0 && (module.exports = {
|
|
188
206
|
Black,
|
|
207
|
+
Body1,
|
|
208
|
+
Body2,
|
|
189
209
|
Bold,
|
|
210
|
+
Caption,
|
|
190
211
|
Display1,
|
|
191
212
|
Display2,
|
|
192
213
|
Display3,
|
|
@@ -199,6 +220,7 @@ Text.defaultProps = {
|
|
|
199
220
|
H5,
|
|
200
221
|
Light,
|
|
201
222
|
Medium,
|
|
223
|
+
Overline,
|
|
202
224
|
Regular,
|
|
203
225
|
SectionTitle,
|
|
204
226
|
Small,
|
|
@@ -40,15 +40,19 @@ describe("<Text />", () => {
|
|
|
40
40
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.H2, { children: "Live the mission" }),
|
|
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
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Body1, { children: "Live the mission" }),
|
|
44
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Body2, { children: "Live the mission" }),
|
|
45
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Caption, { children: "Live the mission" }),
|
|
46
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Overline, { children: "Live the mission" }),
|
|
47
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.SectionTitle, { children: "Live the mission" }),
|
|
48
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.SmallestException, { children: "Live the mission" }),
|
|
43
49
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text, { children: "Live the mission" }),
|
|
44
50
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Small, { children: "Live the mission" }),
|
|
45
51
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Tiny, { children: "Live the mission" }),
|
|
46
52
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Regular, { children: "Live the mission" }),
|
|
47
53
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Medium, { children: "Live the mission" }),
|
|
48
54
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Bold, { children: "Live the mission" }),
|
|
49
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Black, { children: "Live the mission" })
|
|
50
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.SectionTitle, { children: "Live the mission" }),
|
|
51
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.SmallestException, { children: "Live the mission" })
|
|
55
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Black, { children: "Live the mission" })
|
|
52
56
|
] })
|
|
53
57
|
);
|
|
54
58
|
expect(toJSON()).toMatchSnapshot();
|
|
@@ -174,5 +178,15 @@ describe("<Text />", () => {
|
|
|
174
178
|
);
|
|
175
179
|
expect(toJSON()).toMatchSnapshot();
|
|
176
180
|
});
|
|
181
|
+
it("should match snapshot with Text bold", () => {
|
|
182
|
+
const { toJSON } = (0, import_react_native.render)(
|
|
183
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import__.ThemeProvider, { children: [
|
|
184
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.H1, { bold: true, children: "Live the mission" }),
|
|
185
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.H2, { bold: true, children: "Live the mission" }),
|
|
186
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.H3, { bold: true, children: "Live the mission" })
|
|
187
|
+
] })
|
|
188
|
+
);
|
|
189
|
+
expect(toJSON()).toMatchSnapshot();
|
|
190
|
+
});
|
|
177
191
|
});
|
|
178
192
|
});
|
package/cjs/Text/native/index.js
CHANGED
|
@@ -19,7 +19,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
19
19
|
var native_exports = {};
|
|
20
20
|
__export(native_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(native_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,
|
|
@@ -37,6 +37,7 @@ const textStyle = (type) => () => import_styled_components.css`
|
|
|
37
37
|
${(0, import_sharedTextStyle.default)(type)};
|
|
38
38
|
${({
|
|
39
39
|
light,
|
|
40
|
+
bold,
|
|
40
41
|
theme: {
|
|
41
42
|
yoga: {
|
|
42
43
|
baseFont,
|
|
@@ -59,6 +60,7 @@ const textStyle = (type) => () => import_styled_components.css`
|
|
|
59
60
|
font-family: '${finalFontFamily}';
|
|
60
61
|
|
|
61
62
|
${light ? `font-family: ${baseFont.family}-${fontWeights.light};` : ""}
|
|
63
|
+
${bold ? `font-family: ${baseFont.family}-${fontWeights.bold};` : ""}
|
|
62
64
|
`;
|
|
63
65
|
}}
|
|
64
66
|
`;
|
|
@@ -37,6 +37,7 @@ const textStyle = (type) => () => import_styled_components.css`
|
|
|
37
37
|
${(0, import_sharedTextStyle.default)(type)};
|
|
38
38
|
${({
|
|
39
39
|
light,
|
|
40
|
+
bold,
|
|
40
41
|
theme: {
|
|
41
42
|
yoga: {
|
|
42
43
|
baseFont,
|
|
@@ -54,6 +55,7 @@ const textStyle = (type) => () => import_styled_components.css`
|
|
|
54
55
|
font-family: ${finalFontFamily};
|
|
55
56
|
${fontWeight ? `font-weight: ${fontWeight};` : ""}
|
|
56
57
|
${light ? `font-weight: ${fontWeights.light};` : ""}
|
|
58
|
+
${bold ? `font-weight: ${fontWeights.bold};` : ""}
|
|
57
59
|
`;
|
|
58
60
|
}}
|
|
59
61
|
`;
|
|
@@ -38,6 +38,7 @@ const textStyle = (type) => () => import_styled_components.css`
|
|
|
38
38
|
|
|
39
39
|
${({
|
|
40
40
|
light,
|
|
41
|
+
bold,
|
|
41
42
|
numberOfLines,
|
|
42
43
|
theme: {
|
|
43
44
|
yoga: {
|
|
@@ -62,6 +63,7 @@ const textStyle = (type) => () => import_styled_components.css`
|
|
|
62
63
|
font-family: ${fontFamily ? `${fontFamily}, ` : ""}${baseFont.family};
|
|
63
64
|
${fontWeight ? `font-weight: ${fontWeight};` : ""}
|
|
64
65
|
${light ? `font-weight: ${fontWeights.light};` : ""}
|
|
66
|
+
${bold ? `font-weight: ${fontWeights.bold};` : ""}
|
|
65
67
|
`;
|
|
66
68
|
}}
|
|
67
69
|
`;
|