@gympass/yoga 7.104.1 → 7.106.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/Checkbox/web/Checkbox.js +2 -2
- package/cjs/NavigationMenu/NavigationMenu.theme.js +124 -41
- package/cjs/NavigationMenu/web/BottomItems/BottomItem.js +7 -2
- package/cjs/NavigationMenu/web/BottomItems/BottomItems.js +5 -4
- package/cjs/NavigationMenu/web/Item/styles.js +6 -16
- package/cjs/NavigationMenu/web/Menu/Menu.js +91 -26
- package/cjs/NavigationMenu/web/NavigationMenu.js +7 -5
- package/cjs/NavigationMenu/web/Switcher/Actions.js +9 -5
- package/cjs/NavigationMenu/web/Switcher/Switcher.js +3 -3
- package/cjs/Text/Text.theme.js +74 -35
- package/cjs/Text/native/Text.test.js +88 -59
- package/cjs/Text/textStyle.android.js +12 -15
- package/cjs/Text/textStyle.ios.js +11 -11
- package/cjs/Text/textStyle.web.js +11 -10
- package/cjs/Text/web/Text.test.js +87 -57
- package/cjs/Theme/theme/v3theme.js +158 -1
- package/esm/Checkbox/web/Checkbox.js +2 -2
- package/esm/NavigationMenu/NavigationMenu.theme.js +124 -41
- package/esm/NavigationMenu/web/BottomItems/BottomItem.js +7 -2
- package/esm/NavigationMenu/web/BottomItems/BottomItems.js +5 -4
- package/esm/NavigationMenu/web/Item/styles.js +6 -16
- package/esm/NavigationMenu/web/Menu/Menu.js +92 -27
- package/esm/NavigationMenu/web/NavigationMenu.js +7 -5
- package/esm/NavigationMenu/web/Switcher/Actions.js +9 -5
- package/esm/NavigationMenu/web/Switcher/Switcher.js +3 -3
- package/esm/Text/Text.theme.js +74 -35
- package/esm/Text/native/Text.test.js +30 -1
- package/esm/Text/textStyle.android.js +12 -15
- package/esm/Text/textStyle.ios.js +11 -11
- package/esm/Text/textStyle.web.js +11 -10
- package/esm/Text/web/Text.test.js +31 -1
- package/esm/Theme/theme/v3theme.js +158 -1
- package/package.json +2 -2
- package/typings/{Actions-cd7fac99.d.ts → Actions-752d7514.d.ts} +2 -2
- package/typings/NavigationMenu/NavigationMenu.theme.d.ts +1 -71
- package/typings/NavigationMenu/index.d.ts +2 -2
- package/typings/NavigationMenu/web/BottomItems/index.d.ts +2 -1
- package/typings/NavigationMenu/web/Menu/index.d.ts +3 -1
- package/typings/NavigationMenu/web/Switcher/index.d.ts +1 -1
- package/typings/NavigationMenu/web/index.d.ts +2 -2
- package/typings/{NavigationMenu-57b14b2b.d.ts → NavigationMenu-8c022497.d.ts} +9 -11
- package/typings/Theme/theme/v3theme.d.ts +37 -37
- package/typings/index.d.ts +2 -2
|
@@ -24,91 +24,121 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
24
24
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
25
|
var import_react = __toESM(require("react"));
|
|
26
26
|
var import_react2 = require("@testing-library/react");
|
|
27
|
-
var import__ = require("
|
|
28
|
-
var import__2 = require("
|
|
27
|
+
var import__ = require(".");
|
|
28
|
+
var import__2 = require("../..");
|
|
29
29
|
describe("<Text />", () => {
|
|
30
30
|
describe("Snapshots", () => {
|
|
31
31
|
it("should match snapshot with Text", () => {
|
|
32
32
|
const { container } = (0, import_react2.render)(
|
|
33
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
34
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
35
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
36
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
37
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
38
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
39
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
40
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
41
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
42
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
43
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
44
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
45
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
46
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
47
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
48
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
49
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
50
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
51
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
52
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
53
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
54
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
55
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
56
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
33
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import__2.ThemeProvider, { children: [
|
|
34
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Display1, { children: "Live the mission" }),
|
|
35
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Display2, { children: "Live the mission" }),
|
|
36
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Display3, { children: "Live the mission" }),
|
|
37
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Display4, { children: "Live the mission" }),
|
|
38
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.DisplayNumber, { children: "Live the mission" }),
|
|
39
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.H1, { children: "Live the mission" }),
|
|
40
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.H2, { children: "Live the mission" }),
|
|
41
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.H3, { children: "Live the mission" }),
|
|
42
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.H4, { children: "Live the mission" }),
|
|
43
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.H5, { children: "Live the mission" }),
|
|
44
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Body1, { children: "Live the mission" }),
|
|
45
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Body2, { children: "Live the mission" }),
|
|
46
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Caption, { children: "Live the mission" }),
|
|
47
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Overline, { children: "Live the mission" }),
|
|
48
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.SectionTitle, { children: "Live the mission" }),
|
|
49
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.SmallestException, { children: "Live the mission" }),
|
|
50
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text, { children: "Live the mission" }),
|
|
51
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Small, { children: "Live the mission" }),
|
|
52
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Tiny, { children: "Live the mission" }),
|
|
53
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Regular, { children: "Live the mission" }),
|
|
54
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Medium, { children: "Live the mission" }),
|
|
55
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Bold, { children: "Live the mission" }),
|
|
56
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Black, { children: "Live the mission" })
|
|
57
|
+
] })
|
|
58
|
+
);
|
|
59
|
+
expect(container).toMatchSnapshot();
|
|
60
|
+
});
|
|
61
|
+
it("should match snapshot with Text when v3theme is settled", () => {
|
|
62
|
+
const { container } = (0, import_react2.render)(
|
|
63
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import__2.ThemeProvider, { theme: import__2.v3theme, children: [
|
|
64
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Display1, { children: "Text Display1" }),
|
|
65
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Display2, { children: "Text Display2" }),
|
|
66
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Display3, { children: "Text Display3" }),
|
|
67
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Display4, { children: "Text Display4" }),
|
|
68
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.DisplayNumber, { children: "Text DisplayNumber" }),
|
|
69
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.H1, { children: "Text H1" }),
|
|
70
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.H2, { children: "Text H2" }),
|
|
71
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.H3, { children: "Text H3" }),
|
|
72
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.H4, { children: "Text H4" }),
|
|
73
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.H5, { children: "Text H5" }),
|
|
74
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Body1, { children: "Text Body1" }),
|
|
75
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Body2, { children: "Text Body2" }),
|
|
76
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Caption, { children: "Text Caption" }),
|
|
77
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Overline, { children: "Text Overline" }),
|
|
78
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.SectionTitle, { children: "Text SectionTitle" }),
|
|
79
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.SmallestException, { children: "Text SmallestException" }),
|
|
80
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text, { children: "Text" }),
|
|
81
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Small, { children: "Text Small" }),
|
|
82
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Tiny, { children: "Text Tiny" }),
|
|
83
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Regular, { children: "Text Regular" }),
|
|
84
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Medium, { children: "Text Medium" }),
|
|
85
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Bold, { children: "Text Bold" }),
|
|
86
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Black, { children: "Text Black" })
|
|
57
87
|
] })
|
|
58
88
|
);
|
|
59
89
|
expect(container).toMatchSnapshot();
|
|
60
90
|
});
|
|
61
91
|
it("should match snapshot with Text variant", () => {
|
|
62
92
|
const { container } = (0, import_react2.render)(
|
|
63
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
64
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
65
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
66
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
93
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import__2.ThemeProvider, { children: [
|
|
94
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.H1, { variant: "primary", children: "Live the mission" }),
|
|
95
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.H2, { variant: "secondary", children: "Live the mission" }),
|
|
96
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.H3, { variant: "tertiary", children: "Live the mission" })
|
|
67
97
|
] })
|
|
68
98
|
);
|
|
69
99
|
expect(container).toMatchSnapshot();
|
|
70
100
|
});
|
|
71
101
|
it("should match snapshot with Text light", () => {
|
|
72
102
|
const { container } = (0, import_react2.render)(
|
|
73
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
74
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
75
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
76
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
103
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import__2.ThemeProvider, { children: [
|
|
104
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.H1, { light: true, children: "Live the mission" }),
|
|
105
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.H2, { light: true, children: "Live the mission" }),
|
|
106
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.H3, { light: true, children: "Live the mission" })
|
|
77
107
|
] })
|
|
78
108
|
);
|
|
79
109
|
expect(container).toMatchSnapshot();
|
|
80
110
|
});
|
|
81
111
|
it("should match snapshot with Text fontSize", () => {
|
|
82
112
|
const { container } = (0, import_react2.render)(
|
|
83
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
84
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
85
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
86
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
87
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
113
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import__2.ThemeProvider, { children: [
|
|
114
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Small, { fontSize: "xsmall", children: "Live the small mission" }),
|
|
115
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Tiny, { fontSize: "medium", children: "Live the medium mission" }),
|
|
116
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Regular, { fontSize: "xlarge", children: "Live the xlarge mission" }),
|
|
117
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Medium, { fontSize: "xxxlarge", children: "Live the xxxlarge mission" })
|
|
88
118
|
] })
|
|
89
119
|
);
|
|
90
120
|
expect(container).toMatchSnapshot();
|
|
91
121
|
});
|
|
92
122
|
it("should match snapshot with Text size", () => {
|
|
93
123
|
const { container } = (0, import_react2.render)(
|
|
94
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
95
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
96
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
97
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
98
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
124
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import__2.ThemeProvider, { children: [
|
|
125
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Small, { size: "xsmall", children: "Live the small mission" }),
|
|
126
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Tiny, { size: "medium", children: "Live the medium mission" }),
|
|
127
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Regular, { size: "xlarge", children: "Live the xlarge mission" }),
|
|
128
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Medium, { size: "xxxlarge", children: "Live the xxxlarge mission" })
|
|
99
129
|
] })
|
|
100
130
|
);
|
|
101
131
|
expect(container).toMatchSnapshot();
|
|
102
132
|
});
|
|
103
133
|
it("should match snapshot with inverted Text", () => {
|
|
104
134
|
const { container } = (0, import_react2.render)(
|
|
105
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
135
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text, { inverted: true, children: "Live the mission" }) })
|
|
106
136
|
);
|
|
107
137
|
expect(container).toMatchSnapshot();
|
|
108
138
|
});
|
|
109
139
|
it("should match snapshot with truncated lines Text", () => {
|
|
110
140
|
const { container } = (0, import_react2.render)(
|
|
111
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
141
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import__.Text, { numberOfLines: 1, children: [
|
|
112
142
|
"Live the mission",
|
|
113
143
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {}),
|
|
114
144
|
"even in one line"
|
|
@@ -118,32 +148,32 @@ describe("<Text />", () => {
|
|
|
118
148
|
});
|
|
119
149
|
it("should match snapshot with border prop system", () => {
|
|
120
150
|
const { container } = (0, import_react2.render)(
|
|
121
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
151
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text, { border: "small", bRadius: "small", children: "Live the mission" }) })
|
|
122
152
|
);
|
|
123
153
|
expect(container).toMatchSnapshot();
|
|
124
154
|
});
|
|
125
155
|
it("should match snapshot with background color prop system", () => {
|
|
126
156
|
const { container } = (0, import_react2.render)(
|
|
127
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
157
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text, { backgroundColor: "vibin", children: "Live the mission" }) })
|
|
128
158
|
);
|
|
129
159
|
expect(container).toMatchSnapshot();
|
|
130
160
|
});
|
|
131
161
|
it("should match snapshot with elevation prop system", () => {
|
|
132
162
|
const { container } = (0, import_react2.render)(
|
|
133
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
163
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text, { elevation: "medium", children: "Live the mission" }) })
|
|
134
164
|
);
|
|
135
165
|
expect(container).toMatchSnapshot();
|
|
136
166
|
});
|
|
137
167
|
it("should match snapshot with spacing prop system", () => {
|
|
138
168
|
const { container } = (0, import_react2.render)(
|
|
139
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
169
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text, { m: "medium", paddingVertical: "large", paddingHorizontal: "small", children: "Live the mission" }) })
|
|
140
170
|
);
|
|
141
171
|
expect(container).toMatchSnapshot();
|
|
142
172
|
});
|
|
143
173
|
it("should match snapshot with typography prop system", () => {
|
|
144
174
|
const { container } = (0, import_react2.render)(
|
|
145
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
146
|
-
|
|
175
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
176
|
+
import__.Text,
|
|
147
177
|
{
|
|
148
178
|
color: "text.primary",
|
|
149
179
|
fontSize: "small",
|
|
@@ -157,31 +187,31 @@ describe("<Text />", () => {
|
|
|
157
187
|
});
|
|
158
188
|
it("should match snapshot with display prop system", () => {
|
|
159
189
|
const { container } = (0, import_react2.render)(
|
|
160
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
190
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text, { display: "inline-flex", children: "Live the mission" }) })
|
|
161
191
|
);
|
|
162
192
|
expect(container).toMatchSnapshot();
|
|
163
193
|
});
|
|
164
194
|
it("should match snapshot with position prop system", () => {
|
|
165
195
|
const { container } = (0, import_react2.render)(
|
|
166
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
196
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text, { position: "fixed", top: "small", left: "small", children: "Live the mission" }) })
|
|
167
197
|
);
|
|
168
198
|
expect(container).toMatchSnapshot();
|
|
169
199
|
});
|
|
170
200
|
it("should match snapshot with flexes prop system", () => {
|
|
171
201
|
const { container } = (0, import_react2.render)(
|
|
172
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
202
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text, { display: "flex", flexGrow: 1, children: "Live the mission" }) })
|
|
173
203
|
);
|
|
174
204
|
expect(container).toMatchSnapshot();
|
|
175
205
|
});
|
|
176
206
|
it("should match snapshot with overflows prop system", () => {
|
|
177
207
|
const { container } = (0, import_react2.render)(
|
|
178
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
208
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text, { overflow: "scroll", children: "Live the mission" }) })
|
|
179
209
|
);
|
|
180
210
|
expect(container).toMatchSnapshot();
|
|
181
211
|
});
|
|
182
212
|
it("should match snapshot with Text bold", () => {
|
|
183
213
|
const { container } = (0, import_react2.render)(
|
|
184
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
214
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.H1, { bold: true, children: "Live the mission" }) })
|
|
185
215
|
);
|
|
186
216
|
expect(container).toMatchSnapshot();
|
|
187
217
|
});
|
|
@@ -82,7 +82,164 @@ const v3theme = (0, import_themeGenerator.default)((tokens) => ({
|
|
|
82
82
|
backgroundAndDisabled: tokens.colors.clearNew
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
|
-
baseFont: tokens.fonts.inter
|
|
85
|
+
baseFont: tokens.fonts.inter,
|
|
86
|
+
components: {
|
|
87
|
+
text: {
|
|
88
|
+
display1: {
|
|
89
|
+
fontFamily: "NaN Holo Condensed",
|
|
90
|
+
fontsize: tokens.fontSizes.xhuge,
|
|
91
|
+
fontWeight: tokens.fontWeights.bold,
|
|
92
|
+
lineHeight: tokens.lineHeights.xhuge
|
|
93
|
+
},
|
|
94
|
+
display2: {
|
|
95
|
+
fontFamily: "NaN Holo Condensed",
|
|
96
|
+
fontsize: tokens.fontSizes.xxxlarge,
|
|
97
|
+
fontWeight: tokens.fontWeights.bold,
|
|
98
|
+
lineHeight: tokens.lineHeights.xxlarge
|
|
99
|
+
},
|
|
100
|
+
display3: {
|
|
101
|
+
fontFamily: "NaN Holo Condensed",
|
|
102
|
+
fontsize: tokens.fontSizes.xxlarge,
|
|
103
|
+
fontWeight: tokens.fontWeights.bold,
|
|
104
|
+
lineHeight: tokens.lineHeights.xlarge
|
|
105
|
+
},
|
|
106
|
+
display4: {
|
|
107
|
+
fontFamily: "NaN Holo Condensed",
|
|
108
|
+
fontsize: tokens.fontSizes.xlarge,
|
|
109
|
+
fontWeight: tokens.fontWeights.bold,
|
|
110
|
+
lineHeight: tokens.lineHeights.medium
|
|
111
|
+
},
|
|
112
|
+
displayNumber: {
|
|
113
|
+
fontFamily: "NaN Holo Condensed",
|
|
114
|
+
fontsize: tokens.fontSizes.xxxlarge,
|
|
115
|
+
fontWeight: tokens.fontWeights.bold,
|
|
116
|
+
lineHeight: tokens.lineHeights.xxlarge
|
|
117
|
+
},
|
|
118
|
+
h1: {
|
|
119
|
+
fontsize: tokens.fontSizes.huge,
|
|
120
|
+
fontWeight: tokens.fontWeights.medium,
|
|
121
|
+
lineHeight: tokens.lineHeights.huge
|
|
122
|
+
},
|
|
123
|
+
"h1-light": null,
|
|
124
|
+
"h1-bold": {
|
|
125
|
+
fontWeight: tokens.fontWeights.bold
|
|
126
|
+
},
|
|
127
|
+
h2: {
|
|
128
|
+
fontsize: tokens.fontSizes.xxxlarge,
|
|
129
|
+
fontWeight: tokens.fontWeights.medium,
|
|
130
|
+
lineHeight: tokens.lineHeights.xxxlarge
|
|
131
|
+
},
|
|
132
|
+
"h2-light": null,
|
|
133
|
+
"h2-bold": {
|
|
134
|
+
fontWeight: tokens.fontWeights.bold
|
|
135
|
+
},
|
|
136
|
+
h3: {
|
|
137
|
+
fontsize: tokens.fontSizes.xxlarge,
|
|
138
|
+
lineHeight: tokens.lineHeights.xxlarge,
|
|
139
|
+
fontWeight: tokens.fontWeights.medium
|
|
140
|
+
},
|
|
141
|
+
"h3-light": null,
|
|
142
|
+
"h3-bold": {
|
|
143
|
+
fontWeight: tokens.fontWeights.bold
|
|
144
|
+
},
|
|
145
|
+
h4: {
|
|
146
|
+
fontsize: tokens.fontSizes.xlarge,
|
|
147
|
+
fontWeight: tokens.fontWeights.medium,
|
|
148
|
+
lineHeight: tokens.lineHeights.xlarge
|
|
149
|
+
},
|
|
150
|
+
"h4-light": null,
|
|
151
|
+
"h4-bold": {
|
|
152
|
+
fontWeight: tokens.fontWeights.bold
|
|
153
|
+
},
|
|
154
|
+
h5: {
|
|
155
|
+
fontsize: tokens.fontSizes.large,
|
|
156
|
+
fontWeight: tokens.fontWeights.medium,
|
|
157
|
+
lineHeight: tokens.lineHeights.large
|
|
158
|
+
},
|
|
159
|
+
"h5-light": null,
|
|
160
|
+
"h5-bold": {
|
|
161
|
+
fontWeight: tokens.fontWeights.bold
|
|
162
|
+
},
|
|
163
|
+
body1: {
|
|
164
|
+
fontsize: tokens.fontSizes.medium,
|
|
165
|
+
fontWeight: tokens.fontWeights.medium,
|
|
166
|
+
lineHeight: tokens.lineHeights.medium
|
|
167
|
+
},
|
|
168
|
+
"body1-bold": {
|
|
169
|
+
fontWeight: tokens.fontWeights.bold
|
|
170
|
+
},
|
|
171
|
+
body2: {
|
|
172
|
+
fontsize: tokens.fontSizes.small,
|
|
173
|
+
fontWeight: tokens.fontWeights.medium,
|
|
174
|
+
lineHeight: tokens.lineHeights.small
|
|
175
|
+
},
|
|
176
|
+
"body2-bold": {
|
|
177
|
+
fontWeight: tokens.fontWeights.bold
|
|
178
|
+
},
|
|
179
|
+
caption: {
|
|
180
|
+
fontsize: tokens.fontSizes.xsmall,
|
|
181
|
+
fontWeight: tokens.fontWeights.regular,
|
|
182
|
+
lineHeight: tokens.lineHeights.xsmall
|
|
183
|
+
},
|
|
184
|
+
overline: {
|
|
185
|
+
fontsize: tokens.fontSizes.xsmall,
|
|
186
|
+
fontWeight: tokens.fontWeights.bold,
|
|
187
|
+
lineHeight: tokens.lineHeights.xsmall
|
|
188
|
+
},
|
|
189
|
+
sectionTitle: {
|
|
190
|
+
fontsize: tokens.fontSizes.xsmall,
|
|
191
|
+
fontWeight: tokens.fontWeights.medium,
|
|
192
|
+
lineHeight: tokens.lineHeights.xsmall,
|
|
193
|
+
letterSpacing: 1,
|
|
194
|
+
textTransform: "uppercase"
|
|
195
|
+
},
|
|
196
|
+
smallestException: {
|
|
197
|
+
fontsize: tokens.fontSizes.xxsmall,
|
|
198
|
+
fontWeight: tokens.fontWeights.regular,
|
|
199
|
+
lineHeight: tokens.lineHeights.xxsmall
|
|
200
|
+
},
|
|
201
|
+
// deprecated, please don't use
|
|
202
|
+
p: {
|
|
203
|
+
fontsize: tokens.fontSizes.medium,
|
|
204
|
+
fontWeight: tokens.fontWeights.medium,
|
|
205
|
+
lineHeight: tokens.lineHeights.medium
|
|
206
|
+
},
|
|
207
|
+
"p-light": null,
|
|
208
|
+
"p-bold": {
|
|
209
|
+
fontWeight: tokens.fontWeights.bold
|
|
210
|
+
},
|
|
211
|
+
small: {
|
|
212
|
+
fontsize: tokens.fontSizes.small,
|
|
213
|
+
fontWeight: tokens.fontWeights.medium,
|
|
214
|
+
lineHeight: tokens.lineHeights.small
|
|
215
|
+
},
|
|
216
|
+
"small-light": null,
|
|
217
|
+
"small-bold": {
|
|
218
|
+
fontWeight: tokens.fontWeights.bold
|
|
219
|
+
},
|
|
220
|
+
tiny: {
|
|
221
|
+
fontsize: tokens.fontSizes.xsmall,
|
|
222
|
+
fontWeight: tokens.fontWeights.regular,
|
|
223
|
+
lineHeight: tokens.lineHeights.xsmall
|
|
224
|
+
},
|
|
225
|
+
"tiny-light": null,
|
|
226
|
+
light: {
|
|
227
|
+
fontWeight: tokens.fontWeights.light
|
|
228
|
+
},
|
|
229
|
+
regular: {
|
|
230
|
+
fontWeight: tokens.fontWeights.regular
|
|
231
|
+
},
|
|
232
|
+
medium: {
|
|
233
|
+
fontWeight: tokens.fontWeights.medium
|
|
234
|
+
},
|
|
235
|
+
bold: {
|
|
236
|
+
fontWeight: tokens.fontWeights.bold
|
|
237
|
+
},
|
|
238
|
+
black: {
|
|
239
|
+
fontWeight: tokens.fontWeights.black
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
86
243
|
}));
|
|
87
244
|
// Annotate the CommonJS export names for ESM import in node:
|
|
88
245
|
0 && (module.exports = {
|
|
@@ -312,12 +312,12 @@ const Checkbox = (_a) => {
|
|
|
312
312
|
),
|
|
313
313
|
/* @__PURE__ */ jsx(
|
|
314
314
|
HiddenInput,
|
|
315
|
-
__spreadProps(__spreadValues({
|
|
315
|
+
__spreadProps(__spreadValues(__spreadValues({
|
|
316
316
|
type: "checkbox",
|
|
317
317
|
ref: inputRef,
|
|
318
318
|
checked,
|
|
319
319
|
disabled
|
|
320
|
-
}, value ? { value } : {}), {
|
|
320
|
+
}, value ? { value } : {}), restWithoutEvents), {
|
|
321
321
|
onChange,
|
|
322
322
|
onClick
|
|
323
323
|
})
|
|
@@ -1,59 +1,142 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
},
|
|
1
|
+
import { css } from "styled-components";
|
|
2
|
+
import { merge } from "@gympass/yoga-common";
|
|
3
|
+
const sandy = "#F6EDDF";
|
|
4
|
+
const navigationMenuV3 = ({ colors, fontWeights, fontSizes, radii }) => ({
|
|
6
5
|
backgroundColor: {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
white: colors.white
|
|
6
|
+
contextMenu: colors.sand,
|
|
7
|
+
default: colors.sand,
|
|
8
|
+
hover: sandy,
|
|
9
|
+
active: sandy
|
|
12
10
|
},
|
|
13
11
|
border: {
|
|
14
|
-
color: {
|
|
15
|
-
default: colors.light,
|
|
16
|
-
white: colors.white
|
|
17
|
-
},
|
|
18
12
|
radius: {
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
tag: radii.small,
|
|
14
|
+
contextMenu: radii.small
|
|
21
15
|
}
|
|
22
16
|
},
|
|
23
17
|
font: {
|
|
24
18
|
color: {
|
|
25
|
-
default: colors.
|
|
26
|
-
active: colors.
|
|
27
|
-
hover: colors.
|
|
19
|
+
default: colors.text.secondary,
|
|
20
|
+
active: colors.text.primary,
|
|
21
|
+
hover: colors.text.secondary
|
|
28
22
|
},
|
|
29
|
-
weight: {
|
|
23
|
+
weight: {
|
|
24
|
+
bold: fontWeights.bold,
|
|
25
|
+
medium: fontWeights.regular
|
|
26
|
+
},
|
|
27
|
+
size: {
|
|
28
|
+
contextMenu: {
|
|
29
|
+
title: fontSizes.xlarge
|
|
30
|
+
}
|
|
31
|
+
}
|
|
30
32
|
},
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
hover: {
|
|
34
|
+
contextMenu: css`
|
|
35
|
+
background-color: ${sandy};
|
|
36
|
+
`
|
|
35
37
|
},
|
|
36
|
-
height: { xxlarge: spacing.xxlarge, xlarge: spacing.xlarge },
|
|
37
38
|
icon: {
|
|
38
|
-
height: spacing.medium,
|
|
39
|
-
width: spacing.medium,
|
|
40
39
|
fill: {
|
|
41
|
-
default: colors.
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
default: colors.text.secondary,
|
|
41
|
+
actions: colors.text.secondary,
|
|
42
|
+
active: colors.text.primary,
|
|
43
|
+
hover: colors.text.secondary
|
|
44
44
|
}
|
|
45
|
-
}
|
|
46
|
-
padding: {
|
|
47
|
-
xxxsmall: spacing.xxxsmall,
|
|
48
|
-
xxsmall: spacing.xxsmall,
|
|
49
|
-
xsmall: spacing.xsmall,
|
|
50
|
-
small: spacing.small
|
|
51
|
-
},
|
|
52
|
-
tag: {
|
|
53
|
-
color: { default: colors.white }
|
|
54
|
-
},
|
|
55
|
-
width: { xxlarge: spacing.xxlarge, xlarge: spacing.xlarge }
|
|
45
|
+
}
|
|
56
46
|
});
|
|
47
|
+
const NavigationMenu = (theme) => {
|
|
48
|
+
const {
|
|
49
|
+
colors,
|
|
50
|
+
elevations,
|
|
51
|
+
fontWeights,
|
|
52
|
+
fontSizes,
|
|
53
|
+
radii,
|
|
54
|
+
spacing,
|
|
55
|
+
v3theme
|
|
56
|
+
} = theme;
|
|
57
|
+
const baseTheme = {
|
|
58
|
+
avatar: {
|
|
59
|
+
height: spacing.xlarge,
|
|
60
|
+
width: spacing.xlarge
|
|
61
|
+
},
|
|
62
|
+
backgroundColor: {
|
|
63
|
+
contextMenu: colors.white,
|
|
64
|
+
default: colors.clear,
|
|
65
|
+
hover: colors.light,
|
|
66
|
+
active: colors.yoga,
|
|
67
|
+
tag: colors.stamina,
|
|
68
|
+
bottomMenu: colors.white
|
|
69
|
+
},
|
|
70
|
+
border: {
|
|
71
|
+
color: {
|
|
72
|
+
default: colors.light
|
|
73
|
+
},
|
|
74
|
+
radius: {
|
|
75
|
+
default: radii.small,
|
|
76
|
+
circle: radii.circle,
|
|
77
|
+
tag: v3theme ? radii.small : radii.circle,
|
|
78
|
+
action: radii.circle,
|
|
79
|
+
contextMenu: v3theme ? radii.small : radii.circle
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
font: {
|
|
83
|
+
color: {
|
|
84
|
+
default: colors.deep,
|
|
85
|
+
active: colors.vibin,
|
|
86
|
+
hover: colors.stamina
|
|
87
|
+
},
|
|
88
|
+
weight: {
|
|
89
|
+
bold: fontWeights.medium,
|
|
90
|
+
medium: fontWeights.regular
|
|
91
|
+
},
|
|
92
|
+
size: {
|
|
93
|
+
contextMenu: {
|
|
94
|
+
title: fontSizes.small
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
gap: {
|
|
99
|
+
xxxsmall: spacing.xxxsmall,
|
|
100
|
+
xxsmall: spacing.xxsmall,
|
|
101
|
+
medium: spacing.medium
|
|
102
|
+
},
|
|
103
|
+
height: {
|
|
104
|
+
xxlarge: spacing.xxlarge,
|
|
105
|
+
xlarge: spacing.xlarge,
|
|
106
|
+
contextMenu: spacing.xlarge * 2,
|
|
107
|
+
bottomMenu: spacing.xxxlarge
|
|
108
|
+
},
|
|
109
|
+
hover: {
|
|
110
|
+
contextMenu: css`
|
|
111
|
+
box-shadow: ${elevations.small};
|
|
112
|
+
`
|
|
113
|
+
},
|
|
114
|
+
icon: {
|
|
115
|
+
height: spacing.medium,
|
|
116
|
+
width: spacing.medium,
|
|
117
|
+
fill: {
|
|
118
|
+
default: colors.deep,
|
|
119
|
+
actions: colors.primary,
|
|
120
|
+
active: colors.vibin,
|
|
121
|
+
hover: colors.stamina
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
padding: {
|
|
125
|
+
xxxsmall: spacing.xxxsmall,
|
|
126
|
+
xxsmall: spacing.xxsmall,
|
|
127
|
+
xsmall: spacing.xsmall,
|
|
128
|
+
small: spacing.small
|
|
129
|
+
},
|
|
130
|
+
tag: {
|
|
131
|
+
color: { default: colors.white }
|
|
132
|
+
},
|
|
133
|
+
width: { xxlarge: spacing.xxlarge, xlarge: spacing.xlarge }
|
|
134
|
+
};
|
|
135
|
+
if (!v3theme) {
|
|
136
|
+
return baseTheme;
|
|
137
|
+
}
|
|
138
|
+
return merge(baseTheme, navigationMenuV3(theme));
|
|
139
|
+
};
|
|
57
140
|
var NavigationMenu_theme_default = NavigationMenu;
|
|
58
141
|
export {
|
|
59
142
|
NavigationMenu_theme_default as default
|
|
@@ -25,11 +25,13 @@ const Active = css`
|
|
|
25
25
|
theme: {
|
|
26
26
|
yoga: {
|
|
27
27
|
components: {
|
|
28
|
-
navigationmenu: { icon, font }
|
|
28
|
+
navigationmenu: { backgroundColor, icon, font }
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
}) => css`
|
|
33
|
+
background-color: ${backgroundColor.active};
|
|
34
|
+
|
|
33
35
|
:not(:last-child) {
|
|
34
36
|
pointer-events: none;
|
|
35
37
|
}
|
|
@@ -37,6 +39,7 @@ const Active = css`
|
|
|
37
39
|
div {
|
|
38
40
|
${StyledText} {
|
|
39
41
|
color: ${font.color.active};
|
|
42
|
+
font-weight: ${font.weight.bold};
|
|
40
43
|
}
|
|
41
44
|
|
|
42
45
|
svg {
|
|
@@ -51,7 +54,7 @@ const StyledItem = styled.li`
|
|
|
51
54
|
theme: {
|
|
52
55
|
yoga: {
|
|
53
56
|
components: {
|
|
54
|
-
navigationmenu: { border, icon, font }
|
|
57
|
+
navigationmenu: { backgroundColor, border, icon, font }
|
|
55
58
|
}
|
|
56
59
|
}
|
|
57
60
|
}
|
|
@@ -71,6 +74,8 @@ const StyledItem = styled.li`
|
|
|
71
74
|
&:hover,
|
|
72
75
|
&:focus {
|
|
73
76
|
${!isActive && css`
|
|
77
|
+
background-color: ${backgroundColor.hover};
|
|
78
|
+
|
|
74
79
|
${StyledText} {
|
|
75
80
|
color: ${font.color.hover};
|
|
76
81
|
}
|