@gympass/yoga 7.131.2 → 7.131.3

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.
@@ -136,91 +136,83 @@ const ButtonContainer = import_styled_components.default.View`
136
136
  `;
137
137
  }}
138
138
  `;
139
- const Button = (0, import_react.forwardRef)((props, ref) => {
140
- const defaultValues = {
141
- children: "Button",
142
- full: false,
143
- disabled: false,
144
- small: false,
145
- pressed: false,
146
- inverted: false,
147
- secondary: false,
148
- icon: void 0
149
- };
150
- const _a = __spreadValues(__spreadValues({}, defaultValues), props), {
151
- children,
152
- full,
153
- disabled,
154
- small,
155
- pressed,
156
- inverted,
157
- secondary,
158
- icon: Icon,
159
- theme: {
160
- yoga: {
161
- components: { button }
139
+ const Button = (0, import_react.forwardRef)(
140
+ (_a, ref) => {
141
+ var _b = _a, {
142
+ children = "Button",
143
+ full = false,
144
+ disabled = false,
145
+ small = false,
146
+ pressed = false,
147
+ inverted = false,
148
+ secondary = false,
149
+ icon: Icon,
150
+ theme: {
151
+ yoga: {
152
+ components: { button }
153
+ }
162
154
  }
155
+ } = _b, rest = __objRest(_b, [
156
+ "children",
157
+ "full",
158
+ "disabled",
159
+ "small",
160
+ "pressed",
161
+ "inverted",
162
+ "secondary",
163
+ "icon",
164
+ "theme"
165
+ ]);
166
+ const state = secondary ? "secondary" : "primary";
167
+ let textColor = button.types.contained.font.default.color;
168
+ if (disabled) {
169
+ textColor = button.types.contained.font.disabled.color;
170
+ } else if (inverted) {
171
+ textColor = button.types.contained.backgroundColor[state].default;
172
+ if (pressed) {
173
+ textColor = button.types.contained.backgroundColor[state].pressed;
174
+ }
175
+ } else if (pressed) {
176
+ textColor = button.types.contained.font.pressed.color;
163
177
  }
164
- } = _a, rest = __objRest(_a, [
165
- "children",
166
- "full",
167
- "disabled",
168
- "small",
169
- "pressed",
170
- "inverted",
171
- "secondary",
172
- "icon",
173
- "theme"
174
- ]);
175
- const state = secondary ? "secondary" : "primary";
176
- let textColor = button.types.contained.font.default.color;
177
- if (disabled) {
178
- textColor = button.types.contained.font.disabled.color;
179
- } else if (inverted) {
180
- textColor = button.types.contained.backgroundColor[state].default;
181
- if (pressed) {
182
- textColor = button.types.contained.backgroundColor[state].pressed;
183
- }
184
- } else if (pressed) {
185
- textColor = button.types.contained.font.pressed.color;
186
- }
187
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
188
- ButtonContainer,
189
- __spreadProps(__spreadValues({}, rest), {
190
- full,
191
- pressed,
192
- disabled,
193
- small,
194
- inverted,
195
- secondary,
196
- ref,
197
- children: [
198
- Icon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
199
- Icon,
200
- {
201
- width: small ? button.icon.size.small : button.icon.size.default,
202
- height: small ? button.icon.size.small : button.icon.size.default,
203
- fill: textColor,
204
- style: {
205
- marginRight: button.icon.margin.right
178
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
179
+ ButtonContainer,
180
+ __spreadProps(__spreadValues({}, rest), {
181
+ full,
182
+ pressed,
183
+ disabled,
184
+ small,
185
+ inverted,
186
+ secondary,
187
+ ref,
188
+ children: [
189
+ Icon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
190
+ Icon,
191
+ {
192
+ width: small ? button.icon.size.small : button.icon.size.default,
193
+ height: small ? button.icon.size.small : button.icon.size.default,
194
+ fill: textColor,
195
+ style: {
196
+ marginRight: button.icon.margin.right
197
+ }
206
198
  }
207
- }
208
- ),
209
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
210
- Label,
211
- {
212
- disabled,
213
- pressed,
214
- inverted,
215
- small,
216
- color: textColor,
217
- children
218
- }
219
- )
220
- ]
221
- })
222
- );
223
- });
199
+ ),
200
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
201
+ Label,
202
+ {
203
+ disabled,
204
+ pressed,
205
+ inverted,
206
+ small,
207
+ color: textColor,
208
+ children
209
+ }
210
+ )
211
+ ]
212
+ })
213
+ );
214
+ }
215
+ );
224
216
  Button.propTypes = {
225
217
  children: import_prop_types.node,
226
218
  full: import_prop_types.bool,
@@ -192,17 +192,51 @@ const FullCard = (0, import_styled_components.withTheme)(
192
192
  ] })
193
193
  ] })
194
194
  );
195
- const EventCard = (props) => {
196
- const defaultValues = {
197
- small: false,
198
- active: false,
199
- event: void 0,
200
- link: "",
201
- onLinkPress: void 0,
202
- onPress: void 0
203
- };
204
- const _a = __spreadValues(__spreadValues({}, defaultValues), props), { onPress, small } = _a, rest = __objRest(_a, ["onPress", "small"]);
205
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.TouchableWithoutFeedback, { onPress, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Event, __spreadProps(__spreadValues({ small }, rest), { children: small ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SmallCard, __spreadValues({ onPress }, rest)) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FullCard, __spreadValues({}, rest)) })) });
195
+ const EventCard = (_a) => {
196
+ var _b = _a, {
197
+ onPress,
198
+ small = false,
199
+ active = false,
200
+ event,
201
+ link = "",
202
+ onLinkPress
203
+ } = _b, rest = __objRest(_b, [
204
+ "onPress",
205
+ "small",
206
+ "active",
207
+ "event",
208
+ "link",
209
+ "onLinkPress"
210
+ ]);
211
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.TouchableWithoutFeedback, { onPress, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
212
+ Event,
213
+ __spreadProps(__spreadValues({
214
+ small,
215
+ active,
216
+ link,
217
+ event,
218
+ onLinkPress
219
+ }, rest), {
220
+ children: small ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
221
+ SmallCard,
222
+ __spreadValues({
223
+ onPress,
224
+ active,
225
+ link,
226
+ onLinkPress,
227
+ event
228
+ }, rest)
229
+ ) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
230
+ FullCard,
231
+ __spreadValues({
232
+ active,
233
+ link,
234
+ onLinkPress,
235
+ event
236
+ }, rest)
237
+ )
238
+ })
239
+ ) });
206
240
  };
207
241
  EventCard.propTypes = {
208
242
  /** event information: { name (string), place (string), time (string) } */
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
- var __defProps = Object.defineProperties;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
8
6
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
7
  var __getProtoOf = Object.getPrototypeOf;
@@ -21,7 +19,18 @@ var __spreadValues = (a, b) => {
21
19
  }
22
20
  return a;
23
21
  };
24
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
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
+ };
25
34
  var __export = (target, all) => {
26
35
  for (var name in all)
27
36
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -56,42 +65,53 @@ var import_Input = __toESM(require("../../Input"));
56
65
  const StyledInput = (0, import_styled_components.default)(import_Input.default)`
57
66
  height: 88px;
58
67
  `;
59
- const TextArea = ({
60
- disabled = false,
61
- error = void 0,
62
- full = false,
63
- helper = void 0,
64
- label = "",
65
- maxLength = void 0,
66
- readOnly = false,
67
- value = "",
68
- onBlur = () => {
69
- },
70
- onChangeText = () => {
71
- },
72
- onFocus = () => {
73
- }
74
- }) => {
75
- const props = {
76
- disabled,
77
- error,
78
- full,
79
- helper,
80
- label,
81
- maxLength,
82
- readOnly,
83
- value,
84
- onBlur,
85
- onChangeText,
86
- onFocus
87
- };
68
+ const TextArea = (_a) => {
69
+ var _b = _a, {
70
+ disabled = false,
71
+ error = void 0,
72
+ full = false,
73
+ helper = void 0,
74
+ label = "",
75
+ maxLength = void 0,
76
+ readOnly = false,
77
+ value = "",
78
+ onBlur = () => {
79
+ },
80
+ onChangeText = () => {
81
+ },
82
+ onFocus = () => {
83
+ }
84
+ } = _b, rest = __objRest(_b, [
85
+ "disabled",
86
+ "error",
87
+ "full",
88
+ "helper",
89
+ "label",
90
+ "maxLength",
91
+ "readOnly",
92
+ "value",
93
+ "onBlur",
94
+ "onChangeText",
95
+ "onFocus"
96
+ ]);
88
97
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
89
98
  StyledInput,
90
- __spreadProps(__spreadValues({}, props), {
99
+ __spreadValues({
100
+ disabled,
101
+ error,
102
+ full,
103
+ helper,
104
+ label,
105
+ maxLength,
106
+ readOnly,
107
+ value,
108
+ onBlur,
109
+ onChangeText,
110
+ onFocus,
91
111
  textAlignVertical: "top",
92
112
  multiline: true,
93
113
  cleanable: false
94
- })
114
+ }, rest)
95
115
  );
96
116
  };
97
117
  TextArea.propTypes = {
@@ -103,91 +103,83 @@ const ButtonContainer = styled.View`
103
103
  `;
104
104
  }}
105
105
  `;
106
- const Button = forwardRef((props, ref) => {
107
- const defaultValues = {
108
- children: "Button",
109
- full: false,
110
- disabled: false,
111
- small: false,
112
- pressed: false,
113
- inverted: false,
114
- secondary: false,
115
- icon: void 0
116
- };
117
- const _a = __spreadValues(__spreadValues({}, defaultValues), props), {
118
- children,
119
- full,
120
- disabled,
121
- small,
122
- pressed,
123
- inverted,
124
- secondary,
125
- icon: Icon,
126
- theme: {
127
- yoga: {
128
- components: { button }
106
+ const Button = forwardRef(
107
+ (_a, ref) => {
108
+ var _b = _a, {
109
+ children = "Button",
110
+ full = false,
111
+ disabled = false,
112
+ small = false,
113
+ pressed = false,
114
+ inverted = false,
115
+ secondary = false,
116
+ icon: Icon,
117
+ theme: {
118
+ yoga: {
119
+ components: { button }
120
+ }
129
121
  }
122
+ } = _b, rest = __objRest(_b, [
123
+ "children",
124
+ "full",
125
+ "disabled",
126
+ "small",
127
+ "pressed",
128
+ "inverted",
129
+ "secondary",
130
+ "icon",
131
+ "theme"
132
+ ]);
133
+ const state = secondary ? "secondary" : "primary";
134
+ let textColor = button.types.contained.font.default.color;
135
+ if (disabled) {
136
+ textColor = button.types.contained.font.disabled.color;
137
+ } else if (inverted) {
138
+ textColor = button.types.contained.backgroundColor[state].default;
139
+ if (pressed) {
140
+ textColor = button.types.contained.backgroundColor[state].pressed;
141
+ }
142
+ } else if (pressed) {
143
+ textColor = button.types.contained.font.pressed.color;
130
144
  }
131
- } = _a, rest = __objRest(_a, [
132
- "children",
133
- "full",
134
- "disabled",
135
- "small",
136
- "pressed",
137
- "inverted",
138
- "secondary",
139
- "icon",
140
- "theme"
141
- ]);
142
- const state = secondary ? "secondary" : "primary";
143
- let textColor = button.types.contained.font.default.color;
144
- if (disabled) {
145
- textColor = button.types.contained.font.disabled.color;
146
- } else if (inverted) {
147
- textColor = button.types.contained.backgroundColor[state].default;
148
- if (pressed) {
149
- textColor = button.types.contained.backgroundColor[state].pressed;
150
- }
151
- } else if (pressed) {
152
- textColor = button.types.contained.font.pressed.color;
153
- }
154
- return /* @__PURE__ */ jsxs(
155
- ButtonContainer,
156
- __spreadProps(__spreadValues({}, rest), {
157
- full,
158
- pressed,
159
- disabled,
160
- small,
161
- inverted,
162
- secondary,
163
- ref,
164
- children: [
165
- Icon && /* @__PURE__ */ jsx(
166
- Icon,
167
- {
168
- width: small ? button.icon.size.small : button.icon.size.default,
169
- height: small ? button.icon.size.small : button.icon.size.default,
170
- fill: textColor,
171
- style: {
172
- marginRight: button.icon.margin.right
145
+ return /* @__PURE__ */ jsxs(
146
+ ButtonContainer,
147
+ __spreadProps(__spreadValues({}, rest), {
148
+ full,
149
+ pressed,
150
+ disabled,
151
+ small,
152
+ inverted,
153
+ secondary,
154
+ ref,
155
+ children: [
156
+ Icon && /* @__PURE__ */ jsx(
157
+ Icon,
158
+ {
159
+ width: small ? button.icon.size.small : button.icon.size.default,
160
+ height: small ? button.icon.size.small : button.icon.size.default,
161
+ fill: textColor,
162
+ style: {
163
+ marginRight: button.icon.margin.right
164
+ }
173
165
  }
174
- }
175
- ),
176
- /* @__PURE__ */ jsx(
177
- Label,
178
- {
179
- disabled,
180
- pressed,
181
- inverted,
182
- small,
183
- color: textColor,
184
- children
185
- }
186
- )
187
- ]
188
- })
189
- );
190
- });
166
+ ),
167
+ /* @__PURE__ */ jsx(
168
+ Label,
169
+ {
170
+ disabled,
171
+ pressed,
172
+ inverted,
173
+ small,
174
+ color: textColor,
175
+ children
176
+ }
177
+ )
178
+ ]
179
+ })
180
+ );
181
+ }
182
+ );
191
183
  Button.propTypes = {
192
184
  children: node,
193
185
  full: bool,
@@ -161,17 +161,51 @@ const FullCard = withTheme(
161
161
  ] })
162
162
  ] })
163
163
  );
164
- const EventCard = (props) => {
165
- const defaultValues = {
166
- small: false,
167
- active: false,
168
- event: void 0,
169
- link: "",
170
- onLinkPress: void 0,
171
- onPress: void 0
172
- };
173
- const _a = __spreadValues(__spreadValues({}, defaultValues), props), { onPress, small } = _a, rest = __objRest(_a, ["onPress", "small"]);
174
- return /* @__PURE__ */ jsx(TouchableWithoutFeedback, { onPress, children: /* @__PURE__ */ jsx(Event, __spreadProps(__spreadValues({ small }, rest), { children: small ? /* @__PURE__ */ jsx(SmallCard, __spreadValues({ onPress }, rest)) : /* @__PURE__ */ jsx(FullCard, __spreadValues({}, rest)) })) });
164
+ const EventCard = (_a) => {
165
+ var _b = _a, {
166
+ onPress,
167
+ small = false,
168
+ active = false,
169
+ event,
170
+ link = "",
171
+ onLinkPress
172
+ } = _b, rest = __objRest(_b, [
173
+ "onPress",
174
+ "small",
175
+ "active",
176
+ "event",
177
+ "link",
178
+ "onLinkPress"
179
+ ]);
180
+ return /* @__PURE__ */ jsx(TouchableWithoutFeedback, { onPress, children: /* @__PURE__ */ jsx(
181
+ Event,
182
+ __spreadProps(__spreadValues({
183
+ small,
184
+ active,
185
+ link,
186
+ event,
187
+ onLinkPress
188
+ }, rest), {
189
+ children: small ? /* @__PURE__ */ jsx(
190
+ SmallCard,
191
+ __spreadValues({
192
+ onPress,
193
+ active,
194
+ link,
195
+ onLinkPress,
196
+ event
197
+ }, rest)
198
+ ) : /* @__PURE__ */ jsx(
199
+ FullCard,
200
+ __spreadValues({
201
+ active,
202
+ link,
203
+ onLinkPress,
204
+ event
205
+ }, rest)
206
+ )
207
+ })
208
+ ) });
175
209
  };
176
210
  EventCard.propTypes = {
177
211
  /** event information: { name (string), place (string), time (string) } */
@@ -1,6 +1,4 @@
1
1
  var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
2
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
3
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
4
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
@@ -16,7 +14,18 @@ var __spreadValues = (a, b) => {
16
14
  }
17
15
  return a;
18
16
  };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
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
+ };
20
29
  import { jsx } from "react/jsx-runtime";
21
30
  import React from "react";
22
31
  import styled from "styled-components";
@@ -25,42 +34,53 @@ import Input from "../../Input";
25
34
  const StyledInput = styled(Input)`
26
35
  height: 88px;
27
36
  `;
28
- const TextArea = ({
29
- disabled = false,
30
- error = void 0,
31
- full = false,
32
- helper = void 0,
33
- label = "",
34
- maxLength = void 0,
35
- readOnly = false,
36
- value = "",
37
- onBlur = () => {
38
- },
39
- onChangeText = () => {
40
- },
41
- onFocus = () => {
42
- }
43
- }) => {
44
- const props = {
45
- disabled,
46
- error,
47
- full,
48
- helper,
49
- label,
50
- maxLength,
51
- readOnly,
52
- value,
53
- onBlur,
54
- onChangeText,
55
- onFocus
56
- };
37
+ const TextArea = (_a) => {
38
+ var _b = _a, {
39
+ disabled = false,
40
+ error = void 0,
41
+ full = false,
42
+ helper = void 0,
43
+ label = "",
44
+ maxLength = void 0,
45
+ readOnly = false,
46
+ value = "",
47
+ onBlur = () => {
48
+ },
49
+ onChangeText = () => {
50
+ },
51
+ onFocus = () => {
52
+ }
53
+ } = _b, rest = __objRest(_b, [
54
+ "disabled",
55
+ "error",
56
+ "full",
57
+ "helper",
58
+ "label",
59
+ "maxLength",
60
+ "readOnly",
61
+ "value",
62
+ "onBlur",
63
+ "onChangeText",
64
+ "onFocus"
65
+ ]);
57
66
  return /* @__PURE__ */ jsx(
58
67
  StyledInput,
59
- __spreadProps(__spreadValues({}, props), {
68
+ __spreadValues({
69
+ disabled,
70
+ error,
71
+ full,
72
+ helper,
73
+ label,
74
+ maxLength,
75
+ readOnly,
76
+ value,
77
+ onBlur,
78
+ onChangeText,
79
+ onFocus,
60
80
  textAlignVertical: "top",
61
81
  multiline: true,
62
82
  cleanable: false
63
- })
83
+ }, rest)
64
84
  );
65
85
  };
66
86
  TextArea.propTypes = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gympass/yoga",
3
- "version": "7.131.2",
3
+ "version": "7.131.3",
4
4
  "description": "Gympass component library",
5
5
  "main": "./cjs",
6
6
  "types": "./typings/index.d.ts",
@@ -59,7 +59,7 @@
59
59
  "react-native": "0.72.3",
60
60
  "styled-components": "^4.4.0"
61
61
  },
62
- "gitHead": "818a0a624ed180aa9fa5244cd848c279f45b445e",
62
+ "gitHead": "cac3a7692decf6557792651831425244d769618a",
63
63
  "module": "./esm",
64
64
  "private": false,
65
65
  "react-native": "./cjs/index.native.js"