@gympass/yoga 7.101.0 → 7.102.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.
@@ -58,10 +58,18 @@ var import_ActionRequirementStyles = require("./ActionRequirementStyles");
58
58
  var import_Text = __toESM(require("../../Text"));
59
59
  const StyledActionRequirement = import_native.default.View``;
60
60
  function ActionRequirement(props) {
61
- const { title, description, children, checkable, illustration, list } = props;
61
+ const {
62
+ title,
63
+ description,
64
+ children,
65
+ checkable,
66
+ illustration,
67
+ list,
68
+ titleAsTextDisplay
69
+ } = props;
62
70
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(StyledActionRequirement, __spreadProps(__spreadValues({}, props), { children: [
63
71
  illustration && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Box.default, { children: illustration }),
64
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ActionRequirementStyles.Title, { children: title }),
72
+ titleAsTextDisplay ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Text.default.Display2, { children: title }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ActionRequirementStyles.Title, { children: title }),
65
73
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Text.default, { mt: "small", color: "deep", children: description }),
66
74
  list && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Text.default, { mt: "small", color: "deep", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Box.default, { mt: "xxxlarge", children: list }) }),
67
75
  checkable && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Box.default, { mt: "xxxlarge", children: checkable }),
@@ -69,17 +77,19 @@ function ActionRequirement(props) {
69
77
  ] }));
70
78
  }
71
79
  ActionRequirement.propTypes = {
72
- title: import_prop_types.string.isRequired,
80
+ title: (0, import_prop_types.oneOfType)([(0, import_prop_types.arrayOf)(import_prop_types.node), import_prop_types.node]).isRequired,
73
81
  children: (0, import_prop_types.oneOfType)([(0, import_prop_types.arrayOf)(import_prop_types.node), import_prop_types.node]),
74
82
  description: import_prop_types.string.isRequired,
75
83
  checkable: (0, import_prop_types.oneOfType)([(0, import_prop_types.arrayOf)(import_prop_types.node), import_prop_types.node]),
76
84
  illustration: (0, import_prop_types.oneOfType)([(0, import_prop_types.arrayOf)(import_prop_types.node), import_prop_types.node]),
77
- list: (0, import_prop_types.oneOfType)([(0, import_prop_types.arrayOf)(import_prop_types.node), import_prop_types.node])
85
+ list: (0, import_prop_types.oneOfType)([(0, import_prop_types.arrayOf)(import_prop_types.node), import_prop_types.node]),
86
+ titleAsTextDisplay: import_prop_types.bool
78
87
  };
79
88
  ActionRequirement.defaultProps = {
80
89
  children: void 0,
81
90
  checkable: void 0,
82
91
  illustration: void 0,
83
- list: void 0
92
+ list: void 0,
93
+ titleAsTextDisplay: false
84
94
  };
85
95
  var ActionRequirement_default = ActionRequirement;
@@ -69,4 +69,17 @@ describe("<ActionRequirement />", () => {
69
69
  );
70
70
  expect(toJSON()).toMatchSnapshot();
71
71
  });
72
+ it("should match snapshot with text display", () => {
73
+ const { toJSON } = (0, import_react_native.render)(
74
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
75
+ import_ActionRequirement.default,
76
+ {
77
+ title: "Welcome to the world of feeling good!",
78
+ description: "Lets make it a good day!",
79
+ titleAsTextDisplay: true
80
+ }
81
+ ) })
82
+ );
83
+ expect(toJSON()).toMatchSnapshot();
84
+ });
72
85
  });
@@ -91,7 +91,15 @@ function isChildFromComponent(child, component) {
91
91
  return child.type.displayName === component.displayName;
92
92
  }
93
93
  function ActionRequirement(props) {
94
- const { title, description, children, checkable, illustration, list } = props;
94
+ const {
95
+ title,
96
+ description,
97
+ children,
98
+ checkable,
99
+ illustration,
100
+ list,
101
+ titleAsTextDisplay
102
+ } = props;
95
103
  let primaryButton;
96
104
  let secondaryButton;
97
105
  function defineCompoundComponents() {
@@ -106,7 +114,7 @@ function ActionRequirement(props) {
106
114
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(StyledActionRequirement, __spreadProps(__spreadValues({}, props), { children: [
107
115
  illustration && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BoxIllustration, { children: illustration }),
108
116
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Content, { children: [
109
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ActionRequirementStyles.Title, { children: title }),
117
+ titleAsTextDisplay ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Text.default.Display2, { children: title }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ActionRequirementStyles.Title, { children: title }),
110
118
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Text.default, { mt: "small", color: "deep", children: description }),
111
119
  list && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Text.default, { mt: "large", color: "deep", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Box.default, { children: list }) }),
112
120
  checkable && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Box.default, { mt: "xxlarge", children: checkable }),
@@ -118,17 +126,19 @@ function ActionRequirement(props) {
118
126
  ] }));
119
127
  }
120
128
  ActionRequirement.propTypes = {
121
- title: import_prop_types.string.isRequired,
129
+ title: (0, import_prop_types.oneOfType)([(0, import_prop_types.arrayOf)(import_prop_types.node), import_prop_types.node]).isRequired,
122
130
  children: (0, import_prop_types.oneOfType)([(0, import_prop_types.arrayOf)(import_prop_types.node), import_prop_types.node]),
123
131
  description: import_prop_types.string.isRequired,
124
132
  checkable: (0, import_prop_types.oneOfType)([(0, import_prop_types.arrayOf)(import_prop_types.node), import_prop_types.node]),
125
133
  illustration: (0, import_prop_types.oneOfType)([(0, import_prop_types.arrayOf)(import_prop_types.node), import_prop_types.node]),
126
- list: (0, import_prop_types.oneOfType)([(0, import_prop_types.arrayOf)(import_prop_types.node), import_prop_types.node])
134
+ list: (0, import_prop_types.oneOfType)([(0, import_prop_types.arrayOf)(import_prop_types.node), import_prop_types.node]),
135
+ titleAsTextDisplay: import_prop_types.bool
127
136
  };
128
137
  ActionRequirement.defaultProps = {
129
138
  children: void 0,
130
139
  checkable: void 0,
131
140
  illustration: void 0,
132
- list: void 0
141
+ list: void 0,
142
+ titleAsTextDisplay: false
133
143
  };
134
144
  var ActionRequirement_default = ActionRequirement;
@@ -63,4 +63,17 @@ describe("<ActionRequirement />", () => {
63
63
  );
64
64
  expect(container).toMatchSnapshot();
65
65
  });
66
+ it("should match snapshot with text display", () => {
67
+ const { container } = (0, import_react2.render)(
68
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
69
+ import_ActionRequirement.default,
70
+ {
71
+ title: "title",
72
+ description: "description",
73
+ titleAsTextDisplay: true
74
+ }
75
+ ) })
76
+ );
77
+ expect(container).toMatchSnapshot();
78
+ });
66
79
  });
@@ -77,7 +77,7 @@ const v3theme = (0, import_themeGenerator.default)((tokens) => ({
77
77
  },
78
78
  elements: {
79
79
  selectionAndIcons: tokens.colors.mediumNew,
80
- lineAndBorders: tokens.colors.lightest,
80
+ lineAndBorders: tokens.colors.lightNew,
81
81
  backgroundAndDisabled: tokens.colors.clearNew
82
82
  }
83
83
  },
@@ -19,7 +19,7 @@ var __spreadValues = (a, b) => {
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  import { jsx, jsxs } from "react/jsx-runtime";
21
21
  import React from "react";
22
- import { arrayOf, node, oneOfType, string } from "prop-types";
22
+ import { arrayOf, bool, node, oneOfType, string } from "prop-types";
23
23
  import styled from "styled-components/native";
24
24
  import { View } from "react-native";
25
25
  import Box from "../../Box";
@@ -27,10 +27,18 @@ import { Title } from "./ActionRequirementStyles";
27
27
  import Text from "../../Text";
28
28
  const StyledActionRequirement = styled.View``;
29
29
  function ActionRequirement(props) {
30
- const { title, description, children, checkable, illustration, list } = props;
30
+ const {
31
+ title,
32
+ description,
33
+ children,
34
+ checkable,
35
+ illustration,
36
+ list,
37
+ titleAsTextDisplay
38
+ } = props;
31
39
  return /* @__PURE__ */ jsxs(StyledActionRequirement, __spreadProps(__spreadValues({}, props), { children: [
32
40
  illustration && /* @__PURE__ */ jsx(Box, { children: illustration }),
33
- /* @__PURE__ */ jsx(Title, { children: title }),
41
+ titleAsTextDisplay ? /* @__PURE__ */ jsx(Text.Display2, { children: title }) : /* @__PURE__ */ jsx(Title, { children: title }),
34
42
  /* @__PURE__ */ jsx(Text, { mt: "small", color: "deep", children: description }),
35
43
  list && /* @__PURE__ */ jsx(Text, { mt: "small", color: "deep", children: /* @__PURE__ */ jsx(Box, { mt: "xxxlarge", children: list }) }),
36
44
  checkable && /* @__PURE__ */ jsx(Box, { mt: "xxxlarge", children: checkable }),
@@ -38,18 +46,20 @@ function ActionRequirement(props) {
38
46
  ] }));
39
47
  }
40
48
  ActionRequirement.propTypes = {
41
- title: string.isRequired,
49
+ title: oneOfType([arrayOf(node), node]).isRequired,
42
50
  children: oneOfType([arrayOf(node), node]),
43
51
  description: string.isRequired,
44
52
  checkable: oneOfType([arrayOf(node), node]),
45
53
  illustration: oneOfType([arrayOf(node), node]),
46
- list: oneOfType([arrayOf(node), node])
54
+ list: oneOfType([arrayOf(node), node]),
55
+ titleAsTextDisplay: bool
47
56
  };
48
57
  ActionRequirement.defaultProps = {
49
58
  children: void 0,
50
59
  checkable: void 0,
51
60
  illustration: void 0,
52
- list: void 0
61
+ list: void 0,
62
+ titleAsTextDisplay: false
53
63
  };
54
64
  var ActionRequirement_default = ActionRequirement;
55
65
  export {
@@ -46,4 +46,17 @@ describe("<ActionRequirement />", () => {
46
46
  );
47
47
  expect(toJSON()).toMatchSnapshot();
48
48
  });
49
+ it("should match snapshot with text display", () => {
50
+ const { toJSON } = render(
51
+ /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(
52
+ ActionRequirement,
53
+ {
54
+ title: "Welcome to the world of feeling good!",
55
+ description: "Lets make it a good day!",
56
+ titleAsTextDisplay: true
57
+ }
58
+ ) })
59
+ );
60
+ expect(toJSON()).toMatchSnapshot();
61
+ });
49
62
  });
@@ -19,7 +19,7 @@ var __spreadValues = (a, b) => {
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  import { jsx, jsxs } from "react/jsx-runtime";
21
21
  import React from "react";
22
- import { arrayOf, node, oneOfType, string } from "prop-types";
22
+ import { arrayOf, bool, node, oneOfType, string } from "prop-types";
23
23
  import styled from "styled-components";
24
24
  import { media } from "@gympass/yoga-helpers";
25
25
  import {
@@ -65,7 +65,15 @@ function isChildFromComponent(child, component) {
65
65
  return child.type.displayName === component.displayName;
66
66
  }
67
67
  function ActionRequirement(props) {
68
- const { title, description, children, checkable, illustration, list } = props;
68
+ const {
69
+ title,
70
+ description,
71
+ children,
72
+ checkable,
73
+ illustration,
74
+ list,
75
+ titleAsTextDisplay
76
+ } = props;
69
77
  let primaryButton;
70
78
  let secondaryButton;
71
79
  function defineCompoundComponents() {
@@ -80,7 +88,7 @@ function ActionRequirement(props) {
80
88
  return /* @__PURE__ */ jsxs(StyledActionRequirement, __spreadProps(__spreadValues({}, props), { children: [
81
89
  illustration && /* @__PURE__ */ jsx(BoxIllustration, { children: illustration }),
82
90
  /* @__PURE__ */ jsxs(Content, { children: [
83
- /* @__PURE__ */ jsx(Title, { children: title }),
91
+ titleAsTextDisplay ? /* @__PURE__ */ jsx(Text.Display2, { children: title }) : /* @__PURE__ */ jsx(Title, { children: title }),
84
92
  /* @__PURE__ */ jsx(Text, { mt: "small", color: "deep", children: description }),
85
93
  list && /* @__PURE__ */ jsx(Text, { mt: "large", color: "deep", children: /* @__PURE__ */ jsx(Box, { children: list }) }),
86
94
  checkable && /* @__PURE__ */ jsx(Box, { mt: "xxlarge", children: checkable }),
@@ -92,18 +100,20 @@ function ActionRequirement(props) {
92
100
  ] }));
93
101
  }
94
102
  ActionRequirement.propTypes = {
95
- title: string.isRequired,
103
+ title: oneOfType([arrayOf(node), node]).isRequired,
96
104
  children: oneOfType([arrayOf(node), node]),
97
105
  description: string.isRequired,
98
106
  checkable: oneOfType([arrayOf(node), node]),
99
107
  illustration: oneOfType([arrayOf(node), node]),
100
- list: oneOfType([arrayOf(node), node])
108
+ list: oneOfType([arrayOf(node), node]),
109
+ titleAsTextDisplay: bool
101
110
  };
102
111
  ActionRequirement.defaultProps = {
103
112
  children: void 0,
104
113
  checkable: void 0,
105
114
  illustration: void 0,
106
- list: void 0
115
+ list: void 0,
116
+ titleAsTextDisplay: false
107
117
  };
108
118
  var ActionRequirement_default = ActionRequirement;
109
119
  export {
@@ -40,4 +40,17 @@ describe("<ActionRequirement />", () => {
40
40
  );
41
41
  expect(container).toMatchSnapshot();
42
42
  });
43
+ it("should match snapshot with text display", () => {
44
+ const { container } = render(
45
+ /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(
46
+ ActionRequirement,
47
+ {
48
+ title: "title",
49
+ description: "description",
50
+ titleAsTextDisplay: true
51
+ }
52
+ ) })
53
+ );
54
+ expect(container).toMatchSnapshot();
55
+ });
43
56
  });
@@ -44,7 +44,7 @@ const v3theme = createTheme((tokens) => ({
44
44
  },
45
45
  elements: {
46
46
  selectionAndIcons: tokens.colors.mediumNew,
47
- lineAndBorders: tokens.colors.lightest,
47
+ lineAndBorders: tokens.colors.lightNew,
48
48
  backgroundAndDisabled: tokens.colors.clearNew
49
49
  }
50
50
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gympass/yoga",
3
- "version": "7.101.0",
3
+ "version": "7.102.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": "8ccabf1298bbd512d0b1b50ce59c4ff5aea32a20",
60
+ "gitHead": "c5ffda69b1d10b4ea5bb125679b13dfa247e66cc",
61
61
  "module": "./esm",
62
62
  "private": false,
63
63
  "react-native": "./cjs/index.native.js"
@@ -491,12 +491,13 @@ declare namespace Skeleton {
491
491
  declare function ActionRequirement(props: any): JSX.Element;
492
492
  declare namespace ActionRequirement {
493
493
  namespace propTypes {
494
- const title: prop_types.Validator<string>;
495
- const children: prop_types.Requireable<string | number | boolean | prop_types.ReactElementLike | prop_types.ReactNodeArray>;
496
- const description: prop_types.Validator<string>;
497
- const checkable: prop_types.Requireable<string | number | boolean | prop_types.ReactElementLike | prop_types.ReactNodeArray>;
498
- const illustration: prop_types.Requireable<string | number | boolean | prop_types.ReactElementLike | prop_types.ReactNodeArray>;
499
- const list: prop_types.Requireable<string | number | boolean | prop_types.ReactElementLike | prop_types.ReactNodeArray>;
494
+ export const title: prop_types.Validator<string | number | boolean | prop_types.ReactElementLike | prop_types.ReactNodeArray>;
495
+ export const children: prop_types.Requireable<string | number | boolean | prop_types.ReactElementLike | prop_types.ReactNodeArray>;
496
+ export const description: prop_types.Validator<string>;
497
+ export const checkable: prop_types.Requireable<string | number | boolean | prop_types.ReactElementLike | prop_types.ReactNodeArray>;
498
+ export const illustration: prop_types.Requireable<string | number | boolean | prop_types.ReactElementLike | prop_types.ReactNodeArray>;
499
+ export const list: prop_types.Requireable<string | number | boolean | prop_types.ReactElementLike | prop_types.ReactNodeArray>;
500
+ export { bool as titleAsTextDisplay };
500
501
  }
501
502
  namespace defaultProps {
502
503
  const children_1: undefined;
@@ -507,6 +508,7 @@ declare namespace ActionRequirement {
507
508
  export { illustration_1 as illustration };
508
509
  const list_1: undefined;
509
510
  export { list_1 as list };
511
+ export const titleAsTextDisplay: boolean;
510
512
  }
511
513
  }
512
514