@gympass/yoga 7.127.3 → 7.128.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/Accordion/web/Accordion.js +4 -12
- package/cjs/Accordion/web/Small.js +0 -1
- package/cjs/ActionRequirement/web/ActionRequirement.js +1 -8
- package/cjs/AutoComplete/web/AutoComplete.js +11 -25
- package/cjs/Avatar/web/Avatar.js +15 -14
- package/cjs/Avatar/web/AvatarCircle.js +0 -1
- package/cjs/Banner/web/Banner.js +13 -7
- package/cjs/Button/web/Button.js +10 -22
- package/cjs/Button/web/Icon.js +9 -11
- package/cjs/Button/web/Link.js +10 -8
- package/cjs/Button/web/Text.js +1 -5
- package/cjs/Card/web/Card/Card.js +15 -17
- package/cjs/Card/web/PlanCard/Content.js +9 -20
- package/cjs/Card/web/PlanCard/List.js +3 -9
- package/cjs/Card/web/PlanCard/PlanCard.js +1 -6
- package/cjs/Checkbox/web/Checkbox.js +4 -17
- package/cjs/Checkbox/web/Switch.js +13 -9
- package/cjs/Chips/web/Chips.js +6 -14
- package/cjs/Datepicker/web/Calendar.js +4 -14
- package/cjs/Datepicker/web/Datepicker.js +5 -22
- package/cjs/Dialog/web/Dialog.js +3 -12
- package/cjs/Divider/web/Divider.js +6 -8
- package/cjs/Drawer/web/Drawer.js +16 -4
- package/cjs/Dropdown/web/Dropdown.js +20 -11
- package/cjs/Feedback/web/Feedback.js +13 -6
- package/cjs/Grid/web/Col.js +0 -19
- package/cjs/Grid/web/Hide.js +19 -1
- package/cjs/Header/web/Header.js +1 -6
- package/cjs/Header/web/Logo.js +1 -4
- package/cjs/Heading/web/Heading.js +1 -6
- package/cjs/Icon/Icon.js +1 -11
- package/cjs/Input/web/Helper.js +0 -9
- package/cjs/Input/web/Input.js +12 -36
- package/cjs/Input/web/Password.js +2 -10
- package/cjs/Input/web/Phone.js +24 -27
- package/cjs/Input/web/Phone.test.js +15 -0
- package/cjs/List/web/List.js +6 -8
- package/cjs/Menu/web/Menu.js +1 -4
- package/cjs/Menu/web/MenuItem.js +2 -10
- package/cjs/Menu/web/MenuList.js +8 -8
- package/cjs/Popover/web/Popover.js +5 -14
- package/cjs/Progress/web/Progress.js +6 -15
- package/cjs/RadioGroup/web/Button/RadioButton.js +4 -7
- package/cjs/RadioGroup/web/Radio/Radio.js +12 -17
- package/cjs/RadioGroup/web/RadioGroup.js +10 -17
- package/cjs/Rating/web/Rating.js +16 -25
- package/cjs/Skeleton/web/Skeleton.js +18 -7
- package/cjs/Slider/web/Marker.js +14 -9
- package/cjs/Slider/web/Slider.js +7 -14
- package/cjs/Slider/web/Tooltip.js +5 -10
- package/cjs/Snackbar/web/Snackbar.js +11 -22
- package/cjs/Spinner/web/Spinner.js +24 -26
- package/cjs/Stepper/web/Dots.js +2 -6
- package/cjs/Stepper/web/Line.js +0 -4
- package/cjs/Stepper/web/Stepper.js +1 -6
- package/cjs/Tag/web/Informative.js +3 -9
- package/cjs/Tag/web/Tag.js +11 -6
- package/cjs/Text/web/Text.js +37 -10
- package/cjs/TextArea/web/TextArea.js +11 -21
- package/cjs/Theme/Provider/Provider.js +1 -4
- package/esm/Accordion/web/Accordion.js +4 -12
- package/esm/Accordion/web/Small.js +0 -1
- package/esm/ActionRequirement/web/ActionRequirement.js +1 -8
- package/esm/AutoComplete/web/AutoComplete.js +11 -25
- package/esm/Avatar/web/Avatar.js +15 -14
- package/esm/Avatar/web/AvatarCircle.js +0 -1
- package/esm/Banner/web/Banner.js +13 -7
- package/esm/Button/web/Button.js +10 -22
- package/esm/Button/web/Icon.js +9 -11
- package/esm/Button/web/Link.js +10 -8
- package/esm/Button/web/Text.js +1 -5
- package/esm/Card/web/Card/Card.js +15 -17
- package/esm/Card/web/PlanCard/Content.js +9 -20
- package/esm/Card/web/PlanCard/List.js +3 -9
- package/esm/Card/web/PlanCard/PlanCard.js +1 -6
- package/esm/Checkbox/web/Checkbox.js +4 -17
- package/esm/Checkbox/web/Switch.js +13 -9
- package/esm/Chips/web/Chips.js +6 -14
- package/esm/Datepicker/web/Calendar.js +4 -14
- package/esm/Datepicker/web/Datepicker.js +5 -22
- package/esm/Dialog/web/Dialog.js +3 -12
- package/esm/Divider/web/Divider.js +6 -8
- package/esm/Drawer/web/Drawer.js +16 -4
- package/esm/Dropdown/web/Dropdown.js +20 -11
- package/esm/Feedback/web/Feedback.js +13 -6
- package/esm/Grid/web/Col.js +0 -19
- package/esm/Grid/web/Hide.js +19 -1
- package/esm/Header/web/Header.js +1 -6
- package/esm/Header/web/Logo.js +1 -4
- package/esm/Heading/web/Heading.js +1 -6
- package/esm/Icon/Icon.js +1 -11
- package/esm/Input/web/Helper.js +0 -9
- package/esm/Input/web/Input.js +12 -36
- package/esm/Input/web/Password.js +2 -10
- package/esm/Input/web/Phone.js +24 -27
- package/esm/Input/web/Phone.test.js +15 -0
- package/esm/List/web/List.js +6 -8
- package/esm/Menu/web/Menu.js +1 -4
- package/esm/Menu/web/MenuItem.js +2 -10
- package/esm/Menu/web/MenuList.js +8 -8
- package/esm/Popover/web/Popover.js +5 -14
- package/esm/Progress/web/Progress.js +6 -15
- package/esm/RadioGroup/web/Button/RadioButton.js +4 -7
- package/esm/RadioGroup/web/Radio/Radio.js +12 -17
- package/esm/RadioGroup/web/RadioGroup.js +10 -17
- package/esm/Rating/web/Rating.js +16 -25
- package/esm/Skeleton/web/Skeleton.js +18 -7
- package/esm/Slider/web/Marker.js +14 -9
- package/esm/Slider/web/Slider.js +7 -14
- package/esm/Slider/web/Tooltip.js +5 -10
- package/esm/Snackbar/web/Snackbar.js +11 -22
- package/esm/Spinner/web/Spinner.js +24 -26
- package/esm/Stepper/web/Dots.js +2 -6
- package/esm/Stepper/web/Line.js +0 -4
- package/esm/Stepper/web/Stepper.js +1 -6
- package/esm/Tag/web/Informative.js +3 -9
- package/esm/Tag/web/Tag.js +11 -6
- package/esm/Text/web/Text.js +37 -10
- package/esm/TextArea/web/TextArea.js +11 -21
- package/esm/Theme/Provider/Provider.js +1 -4
- package/package.json +2 -2
- package/typings/NavigationMenu/web/Item/styles.d.ts +3 -8
- package/typings/index.d.ts +40 -138
|
@@ -215,22 +215,22 @@ const toUTC = (date) => {
|
|
|
215
215
|
};
|
|
216
216
|
function Datepicker(_c) {
|
|
217
217
|
var _d = _c, {
|
|
218
|
-
fullWidth,
|
|
218
|
+
fullWidth = false,
|
|
219
219
|
type,
|
|
220
220
|
placeholder,
|
|
221
221
|
startDate,
|
|
222
222
|
endDate,
|
|
223
223
|
onSelectSingle,
|
|
224
|
-
disabled,
|
|
224
|
+
disabled = false,
|
|
225
225
|
onSelectRange,
|
|
226
226
|
customOnSelectRange,
|
|
227
|
-
disablePastDates,
|
|
228
|
-
disableFutureDates,
|
|
227
|
+
disablePastDates = false,
|
|
228
|
+
disableFutureDates = false,
|
|
229
229
|
disablePastFrom,
|
|
230
230
|
disableFutureFrom,
|
|
231
231
|
error,
|
|
232
232
|
onOpen,
|
|
233
|
-
displayEndDateOnly
|
|
233
|
+
displayEndDateOnly = false
|
|
234
234
|
} = _d, props = __objRest(_d, [
|
|
235
235
|
"fullWidth",
|
|
236
236
|
"type",
|
|
@@ -389,23 +389,6 @@ Datepicker.propTypes = {
|
|
|
389
389
|
onOpen: import_prop_types.func,
|
|
390
390
|
displayEndDateOnly: import_prop_types.bool
|
|
391
391
|
};
|
|
392
|
-
Datepicker.defaultProps = {
|
|
393
|
-
fullWidth: false,
|
|
394
|
-
placeholder: void 0,
|
|
395
|
-
startDate: void 0,
|
|
396
|
-
endDate: void 0,
|
|
397
|
-
disabled: false,
|
|
398
|
-
onSelectSingle: void 0,
|
|
399
|
-
onSelectRange: void 0,
|
|
400
|
-
customOnSelectRange: void 0,
|
|
401
|
-
disablePastDates: false,
|
|
402
|
-
disableFutureDates: false,
|
|
403
|
-
disablePastFrom: void 0,
|
|
404
|
-
disableFutureFrom: void 0,
|
|
405
|
-
error: void 0,
|
|
406
|
-
onOpen: void 0,
|
|
407
|
-
displayEndDateOnly: false
|
|
408
|
-
};
|
|
409
392
|
var Datepicker_default = Datepicker;
|
|
410
393
|
// Annotate the CommonJS export names for ESM import in node:
|
|
411
394
|
0 && (module.exports = {
|
package/cjs/Dialog/web/Dialog.js
CHANGED
|
@@ -136,12 +136,12 @@ const CloseButton = (0, import_styled_components.default)(import__.Button.Icon)`
|
|
|
136
136
|
const Dialog = import_react.default.forwardRef(
|
|
137
137
|
(_a, forwardedRef) => {
|
|
138
138
|
var _b = _a, {
|
|
139
|
-
isOpen,
|
|
140
|
-
hideCloseButton,
|
|
139
|
+
isOpen = false,
|
|
140
|
+
hideCloseButton = false,
|
|
141
141
|
children,
|
|
142
142
|
dialogId,
|
|
143
143
|
onClose,
|
|
144
|
-
zIndex,
|
|
144
|
+
zIndex = 3,
|
|
145
145
|
closeLabel,
|
|
146
146
|
className
|
|
147
147
|
} = _b, props = __objRest(_b, [
|
|
@@ -236,15 +236,6 @@ Dialog.propTypes = {
|
|
|
236
236
|
zIndex: import_prop_types.number,
|
|
237
237
|
children: import_prop_types.node.isRequired
|
|
238
238
|
};
|
|
239
|
-
Dialog.defaultProps = {
|
|
240
|
-
isOpen: false,
|
|
241
|
-
hideCloseButton: false,
|
|
242
|
-
onClose: void 0,
|
|
243
|
-
closeLabel: void 0,
|
|
244
|
-
className: void 0,
|
|
245
|
-
zIndex: 3,
|
|
246
|
-
dialogId: void 0
|
|
247
|
-
};
|
|
248
239
|
Dialog.displayName = "Dialog";
|
|
249
240
|
var Dialog_default = Dialog;
|
|
250
241
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -78,17 +78,15 @@ const StyledDivider = import_styled_components.default.hr`
|
|
|
78
78
|
`;
|
|
79
79
|
}}
|
|
80
80
|
`;
|
|
81
|
-
const Divider = import_react.default.forwardRef(
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
});
|
|
81
|
+
const Divider = import_react.default.forwardRef(
|
|
82
|
+
(_a, ref) => {
|
|
83
|
+
var _b = _a, { vertical = false, style } = _b, props = __objRest(_b, ["vertical", "style"]);
|
|
84
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledDivider, __spreadValues({ vertical, ref, style }, props));
|
|
85
|
+
}
|
|
86
|
+
);
|
|
85
87
|
Divider.propTypes = {
|
|
86
88
|
/** If this value is defined, the divider will be in vertical if the flexDirection is row type */
|
|
87
89
|
vertical: import_prop_types.bool,
|
|
88
90
|
style: (0, import_prop_types.shape)({})
|
|
89
91
|
};
|
|
90
|
-
Divider.defaultProps = {
|
|
91
|
-
vertical: false,
|
|
92
|
-
style: void 0
|
|
93
|
-
};
|
|
94
92
|
var Divider_default = (0, import_styled_components.withTheme)(Divider);
|
package/cjs/Drawer/web/Drawer.js
CHANGED
|
@@ -22,6 +22,18 @@ var __spreadValues = (a, b) => {
|
|
|
22
22
|
return a;
|
|
23
23
|
};
|
|
24
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
|
+
};
|
|
25
37
|
var __export = (target, all) => {
|
|
26
38
|
for (var name in all)
|
|
27
39
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -79,12 +91,12 @@ const StyledDrawer = (0, import_styled_components.default)(import_Dialog.default
|
|
|
79
91
|
}
|
|
80
92
|
}
|
|
81
93
|
`;
|
|
82
|
-
const Drawer = import_react.default.forwardRef((
|
|
94
|
+
const Drawer = import_react.default.forwardRef((_a, forwardedRef) => {
|
|
95
|
+
var _b = _a, { zIndex = 3 } = _b, rest = __objRest(_b, ["zIndex"]);
|
|
96
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledDrawer, __spreadProps(__spreadValues({}, rest), { zIndex, ref: forwardedRef }));
|
|
97
|
+
});
|
|
83
98
|
Drawer.propTypes = {
|
|
84
99
|
children: import_prop_types.node.isRequired,
|
|
85
100
|
zIndex: import_prop_types.number
|
|
86
101
|
};
|
|
87
|
-
Drawer.defaultProps = {
|
|
88
|
-
zIndex: 3
|
|
89
|
-
};
|
|
90
102
|
var Drawer_default = Drawer;
|
|
@@ -80,7 +80,7 @@ const Wrapper = import_styled_components.default.div`
|
|
|
80
80
|
position: relative;
|
|
81
81
|
display: inline-block;
|
|
82
82
|
vertical-align: top;
|
|
83
|
-
|
|
83
|
+
|
|
84
84
|
width: ${full ? "100%" : `${dropdown.width}px`};
|
|
85
85
|
`}
|
|
86
86
|
`;
|
|
@@ -278,9 +278,27 @@ const ArrowIcon = (0, import_styled_components.default)((_a) => {
|
|
|
278
278
|
transform: rotate(${isOpen ? "180deg" : "0"});
|
|
279
279
|
`}
|
|
280
280
|
`;
|
|
281
|
+
const noop = () => {
|
|
282
|
+
};
|
|
281
283
|
const Dropdown = import_react.default.forwardRef(
|
|
282
284
|
(_c, ref) => {
|
|
283
|
-
var _d = _c, {
|
|
285
|
+
var _d = _c, {
|
|
286
|
+
error,
|
|
287
|
+
label = "",
|
|
288
|
+
disabled = false,
|
|
289
|
+
full = false,
|
|
290
|
+
options,
|
|
291
|
+
onChange = noop,
|
|
292
|
+
isMaxHeight = true
|
|
293
|
+
} = _d, rest = __objRest(_d, [
|
|
294
|
+
"error",
|
|
295
|
+
"label",
|
|
296
|
+
"disabled",
|
|
297
|
+
"full",
|
|
298
|
+
"options",
|
|
299
|
+
"onChange",
|
|
300
|
+
"isMaxHeight"
|
|
301
|
+
]);
|
|
284
302
|
const inputRef = ref || import_react.default.useRef(null);
|
|
285
303
|
const selectedOption = options.find((item) => item.selected === true);
|
|
286
304
|
const [localSelectedItem, setLocalSelectedItem] = (0, import_react.useState)(selectedOption);
|
|
@@ -393,13 +411,4 @@ Dropdown.propTypes = {
|
|
|
393
411
|
onChange: import_prop_types.func,
|
|
394
412
|
isMaxHeight: import_prop_types.bool
|
|
395
413
|
};
|
|
396
|
-
Dropdown.defaultProps = {
|
|
397
|
-
label: "",
|
|
398
|
-
error: void 0,
|
|
399
|
-
full: false,
|
|
400
|
-
disabled: false,
|
|
401
|
-
onChange: () => {
|
|
402
|
-
},
|
|
403
|
-
isMaxHeight: true
|
|
404
|
-
};
|
|
405
414
|
var Dropdown_default = Dropdown;
|
|
@@ -87,7 +87,19 @@ function isChildFromComponent(child, component) {
|
|
|
87
87
|
return child.type.displayName === component.displayName;
|
|
88
88
|
}
|
|
89
89
|
function Feedback(_a) {
|
|
90
|
-
var _b = _a, {
|
|
90
|
+
var _b = _a, {
|
|
91
|
+
variant,
|
|
92
|
+
title,
|
|
93
|
+
description,
|
|
94
|
+
children,
|
|
95
|
+
center = true
|
|
96
|
+
} = _b, props = __objRest(_b, [
|
|
97
|
+
"variant",
|
|
98
|
+
"title",
|
|
99
|
+
"description",
|
|
100
|
+
"children",
|
|
101
|
+
"center"
|
|
102
|
+
]);
|
|
91
103
|
const iconProps = VARIANT_ICONS[variant];
|
|
92
104
|
let primaryButton;
|
|
93
105
|
let secondaryButton;
|
|
@@ -148,9 +160,4 @@ Feedback.propTypes = {
|
|
|
148
160
|
/** Center the component vertically */
|
|
149
161
|
center: import_prop_types.bool
|
|
150
162
|
};
|
|
151
|
-
Feedback.defaultProps = {
|
|
152
|
-
title: void 0,
|
|
153
|
-
children: void 0,
|
|
154
|
-
center: true
|
|
155
|
-
};
|
|
156
163
|
var Feedback_default = Feedback;
|
package/cjs/Grid/web/Col.js
CHANGED
|
@@ -80,23 +80,4 @@ Col.propTypes = {
|
|
|
80
80
|
"xxl-start": import_prop_types.number,
|
|
81
81
|
"xxxl-start": import_prop_types.number
|
|
82
82
|
};
|
|
83
|
-
Col.defaultProps = {
|
|
84
|
-
hide: void 0,
|
|
85
|
-
xxs: void 0,
|
|
86
|
-
xs: void 0,
|
|
87
|
-
sm: void 0,
|
|
88
|
-
md: void 0,
|
|
89
|
-
lg: void 0,
|
|
90
|
-
xl: void 0,
|
|
91
|
-
xxl: void 0,
|
|
92
|
-
xxxl: void 0,
|
|
93
|
-
"xxs-start": void 0,
|
|
94
|
-
"xs-start": void 0,
|
|
95
|
-
"sm-start": void 0,
|
|
96
|
-
"md-start": void 0,
|
|
97
|
-
"lg-start": void 0,
|
|
98
|
-
"xl-start": void 0,
|
|
99
|
-
"xxl-start": void 0,
|
|
100
|
-
"xxxl-start": void 0
|
|
101
|
-
};
|
|
102
83
|
var Col_default = Col;
|
package/cjs/Grid/web/Hide.js
CHANGED
|
@@ -36,8 +36,26 @@ var import_styled_components = __toESM(require("styled-components"));
|
|
|
36
36
|
var import_yoga_tokens = __toESM(require("@gympass/yoga-tokens"));
|
|
37
37
|
var import_yoga_helpers = require("@gympass/yoga-helpers");
|
|
38
38
|
const { breakpoints } = import_yoga_tokens.default;
|
|
39
|
+
const defaultProps = {
|
|
40
|
+
xxs: void 0,
|
|
41
|
+
xs: void 0,
|
|
42
|
+
sm: void 0,
|
|
43
|
+
md: void 0,
|
|
44
|
+
lg: void 0,
|
|
45
|
+
xl: void 0,
|
|
46
|
+
xxl: void 0,
|
|
47
|
+
xxxl: void 0,
|
|
48
|
+
"xxs-start": void 0,
|
|
49
|
+
"xs-start": void 0,
|
|
50
|
+
"sm-start": void 0,
|
|
51
|
+
"md-start": void 0,
|
|
52
|
+
"lg-start": void 0,
|
|
53
|
+
"xl-start": void 0,
|
|
54
|
+
"xxl-start": void 0,
|
|
55
|
+
"xxxl-start": void 0
|
|
56
|
+
};
|
|
39
57
|
const Hide = import_styled_components.default.div`
|
|
40
|
-
${(props) => Object.keys(props).filter((prop) => props[prop] && Object.keys(breakpoints).includes(prop)).map((breakpoint) => import_yoga_helpers.media.hide[breakpoint])}
|
|
58
|
+
${(props = defaultProps) => Object.keys(props).filter((prop) => props[prop] && Object.keys(breakpoints).includes(prop)).map((breakpoint) => import_yoga_helpers.media.hide[breakpoint])}
|
|
41
59
|
|
|
42
60
|
${(props) => Object.keys(props).filter((prop) => props[`${prop}-start`]).map((breakpoint) => import_yoga_helpers.media.hide[`${breakpoint}-start`])}
|
|
43
61
|
`;
|
package/cjs/Header/web/Header.js
CHANGED
|
@@ -85,7 +85,7 @@ const StyledHeader = (0, import_styled_components.default)(import_Box.default)`
|
|
|
85
85
|
`}
|
|
86
86
|
`;
|
|
87
87
|
const Header = (_a) => {
|
|
88
|
-
var _b = _a, { link, logo, children } = _b, props = __objRest(_b, ["link", "logo", "children"]);
|
|
88
|
+
var _b = _a, { link = null, logo = null, children = null } = _b, props = __objRest(_b, ["link", "logo", "children"]);
|
|
89
89
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
90
90
|
StyledHeader,
|
|
91
91
|
__spreadProps(__spreadValues({
|
|
@@ -111,9 +111,4 @@ Header.propTypes = {
|
|
|
111
111
|
/** Use logo to change headers image */
|
|
112
112
|
logo: import_prop_types.elementType
|
|
113
113
|
};
|
|
114
|
-
Header.defaultProps = {
|
|
115
|
-
link: null,
|
|
116
|
-
children: null,
|
|
117
|
-
logo: null
|
|
118
|
-
};
|
|
119
114
|
var Header_default = Header;
|
package/cjs/Header/web/Logo.js
CHANGED
|
@@ -35,11 +35,8 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_prop_types = require("prop-types");
|
|
37
37
|
var import_GympassLogo = __toESM(require("./GympassLogo"));
|
|
38
|
-
const Logo = ({ customLogo: CustomLogo }) => CustomLogo ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CustomLogo, {}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_GympassLogo.default, {});
|
|
38
|
+
const Logo = ({ customLogo: CustomLogo = null }) => CustomLogo ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CustomLogo, {}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_GympassLogo.default, {});
|
|
39
39
|
Logo.propTypes = {
|
|
40
40
|
customLogo: import_prop_types.elementType
|
|
41
41
|
};
|
|
42
|
-
Logo.defaultProps = {
|
|
43
|
-
customLogo: null
|
|
44
|
-
};
|
|
45
42
|
var Logo_default = Logo;
|
|
@@ -69,7 +69,7 @@ var import_Title = __toESM(require("./Title"));
|
|
|
69
69
|
var import_BackButton = __toESM(require("./BackButton"));
|
|
70
70
|
var import_RightButton = __toESM(require("./RightButton"));
|
|
71
71
|
const Heading = (_a) => {
|
|
72
|
-
var _b = _a, { children, noPadding } = _b, props = __objRest(_b, ["children", "noPadding"]);
|
|
72
|
+
var _b = _a, { children, noPadding = false } = _b, props = __objRest(_b, ["children", "noPadding"]);
|
|
73
73
|
let backButton = null;
|
|
74
74
|
let title = null;
|
|
75
75
|
const rightButtons = [];
|
|
@@ -102,9 +102,4 @@ Heading.propTypes = {
|
|
|
102
102
|
noPadding: import_prop_types.bool,
|
|
103
103
|
bg: import_prop_types.default.string
|
|
104
104
|
};
|
|
105
|
-
Heading.defaultProps = {
|
|
106
|
-
children: void 0,
|
|
107
|
-
noPadding: false,
|
|
108
|
-
bg: void 0
|
|
109
|
-
};
|
|
110
105
|
var Heading_default = Heading;
|
package/cjs/Icon/Icon.js
CHANGED
|
@@ -69,7 +69,7 @@ var import_Box = __toESM(require("../Box"));
|
|
|
69
69
|
const Icon = (_a) => {
|
|
70
70
|
var _b = _a, {
|
|
71
71
|
as: Component,
|
|
72
|
-
size,
|
|
72
|
+
size = 12,
|
|
73
73
|
width = size,
|
|
74
74
|
height = size,
|
|
75
75
|
fill,
|
|
@@ -180,14 +180,4 @@ Icon.propTypes = {
|
|
|
180
180
|
* Use it as one of theme.spacing tokens (xxsmall, small, medium...) */
|
|
181
181
|
size: (0, import_prop_types.oneOfType)([(0, import_prop_types.oneOf)(commonSizes), import_prop_types.string, import_prop_types.number])
|
|
182
182
|
};
|
|
183
|
-
Icon.defaultProps = {
|
|
184
|
-
fill: void 0,
|
|
185
|
-
stroke: void 0,
|
|
186
|
-
title: void 0,
|
|
187
|
-
description: void 0,
|
|
188
|
-
ariaLabel: void 0,
|
|
189
|
-
width: void 0,
|
|
190
|
-
height: void 0,
|
|
191
|
-
size: 12
|
|
192
|
-
};
|
|
193
183
|
var Icon_default = (0, import_styled_components.withTheme)(Icon);
|
package/cjs/Input/web/Helper.js
CHANGED
|
@@ -111,15 +111,6 @@ Helper.propTypes = {
|
|
|
111
111
|
hideMaxLength: import_prop_types.bool,
|
|
112
112
|
a11yId: import_prop_types.string
|
|
113
113
|
};
|
|
114
|
-
Helper.defaultProps = {
|
|
115
|
-
disabled: void 0,
|
|
116
|
-
error: void 0,
|
|
117
|
-
helper: void 0,
|
|
118
|
-
maxLength: void 0,
|
|
119
|
-
length: void 0,
|
|
120
|
-
hideMaxLength: void 0,
|
|
121
|
-
a11yId: void 0
|
|
122
|
-
};
|
|
123
114
|
var Helper_default = Helper;
|
|
124
115
|
// Annotate the CommonJS export names for ESM import in node:
|
|
125
116
|
0 && (module.exports = {
|
package/cjs/Input/web/Input.js
CHANGED
|
@@ -133,28 +133,30 @@ const LeftElementWrapper = import_styled_components.default.div`
|
|
|
133
133
|
transform: translateY(-50%);
|
|
134
134
|
`}
|
|
135
135
|
`;
|
|
136
|
+
const noop = () => {
|
|
137
|
+
};
|
|
136
138
|
const Input = import_react.default.forwardRef(
|
|
137
139
|
(_a, ref) => {
|
|
138
140
|
var _b = _a, {
|
|
139
|
-
cleanable,
|
|
141
|
+
cleanable = true,
|
|
140
142
|
children,
|
|
141
|
-
disabled,
|
|
143
|
+
disabled = false,
|
|
142
144
|
error,
|
|
143
|
-
full,
|
|
145
|
+
full = false,
|
|
144
146
|
helper,
|
|
145
147
|
label,
|
|
146
148
|
ariaLabel,
|
|
147
149
|
maxLength,
|
|
148
|
-
readOnly,
|
|
150
|
+
readOnly = false,
|
|
149
151
|
style,
|
|
150
|
-
value,
|
|
151
|
-
onChange,
|
|
152
|
-
onClean,
|
|
153
|
-
hideMaxLength,
|
|
152
|
+
value = "",
|
|
153
|
+
onChange = noop,
|
|
154
|
+
onClean = noop,
|
|
155
|
+
hideMaxLength = false,
|
|
154
156
|
rightIcon,
|
|
155
157
|
a11yId,
|
|
156
|
-
closeAriaLabel,
|
|
157
|
-
includeAriaAttributes,
|
|
158
|
+
closeAriaLabel = "Clear",
|
|
159
|
+
includeAriaAttributes = true,
|
|
158
160
|
leftElement
|
|
159
161
|
} = _b, props = __objRest(_b, [
|
|
160
162
|
"cleanable",
|
|
@@ -321,30 +323,4 @@ Input.propTypes = {
|
|
|
321
323
|
/** element on the left */
|
|
322
324
|
leftElement: import_prop_types.node
|
|
323
325
|
};
|
|
324
|
-
Input.defaultProps = {
|
|
325
|
-
className: void 0,
|
|
326
|
-
children: void 0,
|
|
327
|
-
cleanable: true,
|
|
328
|
-
disabled: false,
|
|
329
|
-
error: void 0,
|
|
330
|
-
full: false,
|
|
331
|
-
helper: void 0,
|
|
332
|
-
label: void 0,
|
|
333
|
-
ariaLabel: void 0,
|
|
334
|
-
maxLength: void 0,
|
|
335
|
-
readOnly: false,
|
|
336
|
-
style: void 0,
|
|
337
|
-
value: "",
|
|
338
|
-
onChange: () => {
|
|
339
|
-
},
|
|
340
|
-
onClean: () => {
|
|
341
|
-
},
|
|
342
|
-
hideMaxLength: false,
|
|
343
|
-
placeholder: void 0,
|
|
344
|
-
rightIcon: void 0,
|
|
345
|
-
a11yId: void 0,
|
|
346
|
-
closeAriaLabel: "Clear",
|
|
347
|
-
includeAriaAttributes: true,
|
|
348
|
-
leftElement: void 0
|
|
349
|
-
};
|
|
350
326
|
var Input_default = Input;
|
|
@@ -131,10 +131,10 @@ const IconWrapper = import_styled_components.default.div`
|
|
|
131
131
|
`;
|
|
132
132
|
const Password = (_a) => {
|
|
133
133
|
var _b = _a, {
|
|
134
|
-
disabled,
|
|
134
|
+
disabled = false,
|
|
135
135
|
style,
|
|
136
136
|
className,
|
|
137
|
-
full,
|
|
137
|
+
full = false,
|
|
138
138
|
showPasswordAriaLabel,
|
|
139
139
|
hidePasswordAriaLabel
|
|
140
140
|
} = _b, props = __objRest(_b, [
|
|
@@ -195,12 +195,4 @@ Password.propTypes = {
|
|
|
195
195
|
hidePasswordAriaLabel: import_prop_types.string,
|
|
196
196
|
style: (0, import_prop_types.shape)({})
|
|
197
197
|
};
|
|
198
|
-
Password.defaultProps = {
|
|
199
|
-
className: void 0,
|
|
200
|
-
disabled: false,
|
|
201
|
-
full: false,
|
|
202
|
-
style: void 0,
|
|
203
|
-
showPasswordAriaLabel: void 0,
|
|
204
|
-
hidePasswordAriaLabel: void 0
|
|
205
|
-
};
|
|
206
198
|
var Password_default = Password;
|
package/cjs/Input/web/Phone.js
CHANGED
|
@@ -83,19 +83,23 @@ const phoneBaseSettings = {
|
|
|
83
83
|
"ca"
|
|
84
84
|
]
|
|
85
85
|
};
|
|
86
|
+
const noop = () => {
|
|
87
|
+
};
|
|
86
88
|
const Phone = import_react.default.forwardRef(
|
|
87
89
|
(_a, forwardedRef) => {
|
|
88
90
|
var _b = _a, {
|
|
89
|
-
defaultCountry,
|
|
90
|
-
disabled,
|
|
91
|
-
readOnly,
|
|
91
|
+
defaultCountry = "br",
|
|
92
|
+
disabled = false,
|
|
93
|
+
readOnly = false,
|
|
92
94
|
error,
|
|
93
|
-
full,
|
|
95
|
+
full = false,
|
|
94
96
|
helper,
|
|
95
|
-
label,
|
|
96
|
-
placeholder,
|
|
97
|
-
value,
|
|
98
|
-
|
|
97
|
+
label = "",
|
|
98
|
+
placeholder = "+55 (11) 999999999",
|
|
99
|
+
value = "",
|
|
100
|
+
countries = phoneBaseSettings.onlyCountries,
|
|
101
|
+
onChange = noop,
|
|
102
|
+
cleanable = true
|
|
99
103
|
} = _b, rest = __objRest(_b, [
|
|
100
104
|
"defaultCountry",
|
|
101
105
|
"disabled",
|
|
@@ -106,7 +110,9 @@ const Phone = import_react.default.forwardRef(
|
|
|
106
110
|
"label",
|
|
107
111
|
"placeholder",
|
|
108
112
|
"value",
|
|
109
|
-
"
|
|
113
|
+
"countries",
|
|
114
|
+
"onChange",
|
|
115
|
+
"cleanable"
|
|
110
116
|
]);
|
|
111
117
|
const inputRef = (0, import_hooks.useCombinedRefs)(forwardedRef);
|
|
112
118
|
const currentCountry = (0, import_react.useRef)(defaultCountry);
|
|
@@ -116,6 +122,9 @@ const Phone = import_react.default.forwardRef(
|
|
|
116
122
|
currentCountry.current = countryCode;
|
|
117
123
|
}
|
|
118
124
|
}, []);
|
|
125
|
+
const availableCountries = {
|
|
126
|
+
onlyCountries: (countries == null ? void 0 : countries.length) > 0 ? countries : phoneBaseSettings.onlyCountries
|
|
127
|
+
};
|
|
119
128
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
120
129
|
import_Input.default,
|
|
121
130
|
__spreadProps(__spreadValues({}, __spreadValues({
|
|
@@ -124,14 +133,15 @@ const Phone = import_react.default.forwardRef(
|
|
|
124
133
|
error,
|
|
125
134
|
full,
|
|
126
135
|
helper,
|
|
127
|
-
value
|
|
136
|
+
value,
|
|
137
|
+
cleanable
|
|
128
138
|
}, rest)), {
|
|
129
139
|
ref: inputRef,
|
|
130
140
|
label: "",
|
|
131
141
|
onClean: (phoneNumber) => onChange(phoneNumber),
|
|
132
142
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(S.Container, { error, disabled, full, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
133
143
|
import_react_phone_input_2.default,
|
|
134
|
-
__spreadProps(__spreadValues({},
|
|
144
|
+
__spreadProps(__spreadValues({}, availableCountries), {
|
|
135
145
|
ref: (phoneRef) => {
|
|
136
146
|
inputRef.current = phoneRef == null ? void 0 : phoneRef.numberInputRef;
|
|
137
147
|
},
|
|
@@ -175,21 +185,8 @@ Phone.propTypes = {
|
|
|
175
185
|
/** callback invoked when value changes, either by typing of selecting a country */
|
|
176
186
|
onChange: import_prop_types.func,
|
|
177
187
|
/** placeholder to show when the input is cleared */
|
|
178
|
-
placeholder: import_prop_types.string
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
className: void 0,
|
|
182
|
-
cleanable: true,
|
|
183
|
-
defaultCountry: "br",
|
|
184
|
-
disabled: false,
|
|
185
|
-
error: void 0,
|
|
186
|
-
full: false,
|
|
187
|
-
helper: void 0,
|
|
188
|
-
label: "",
|
|
189
|
-
readOnly: false,
|
|
190
|
-
value: "",
|
|
191
|
-
onChange: () => {
|
|
192
|
-
},
|
|
193
|
-
placeholder: "+55 (11) 999999999"
|
|
188
|
+
placeholder: import_prop_types.string,
|
|
189
|
+
/** countries for mask field and dropdown, make sure to use ISO 3166-1 alpha-2 lowercase */
|
|
190
|
+
countries: import_prop_types.default.arrayOf(import_prop_types.string)
|
|
194
191
|
};
|
|
195
192
|
var Phone_default = Phone;
|
|
@@ -98,6 +98,21 @@ describe("<Input.Phone />", () => {
|
|
|
98
98
|
expect(getByDisplayValue(spec.expected)).toBeInTheDocument();
|
|
99
99
|
});
|
|
100
100
|
});
|
|
101
|
+
it(`Should only format and show countries numbers when props is given`, () => {
|
|
102
|
+
const USPhone = numbersFormats[1];
|
|
103
|
+
const { queryByDisplayValue } = (0, import_react2.render)(
|
|
104
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Input.Phone, { countries: ["br", "pt"], value: USPhone.base }) })
|
|
105
|
+
);
|
|
106
|
+
expect(queryByDisplayValue(USPhone.expected)).not.toBeInTheDocument();
|
|
107
|
+
});
|
|
108
|
+
it(`Should return all countries validation if countries equals to empty array`, () => {
|
|
109
|
+
const USPhone = numbersFormats[1];
|
|
110
|
+
const { getAllByRole } = (0, import_react2.render)(
|
|
111
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Input.Phone, { countries: [], value: USPhone.base }) })
|
|
112
|
+
);
|
|
113
|
+
import_react2.fireEvent.click(getAllByRole("button")[0]);
|
|
114
|
+
expect(getAllByRole("option").length).toBe(12);
|
|
115
|
+
});
|
|
101
116
|
it("should prefix the phone number with newly selected country dial code", () => __async(exports, null, function* () {
|
|
102
117
|
const { getByRole, getByText, getByDisplayValue } = (0, import_react2.render)(
|
|
103
118
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Input.Phone, { defaultCountry: "us" }) })
|
package/cjs/List/web/List.js
CHANGED
|
@@ -91,17 +91,15 @@ const StyledList = import_styled_components.default.ul`
|
|
|
91
91
|
}
|
|
92
92
|
`}
|
|
93
93
|
`;
|
|
94
|
-
const List = import_react.default.forwardRef(
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
});
|
|
94
|
+
const List = import_react.default.forwardRef(
|
|
95
|
+
(_a, ref) => {
|
|
96
|
+
var _b = _a, { horizontal = false, divided = true } = _b, rest = __objRest(_b, ["horizontal", "divided"]);
|
|
97
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledList, __spreadValues({ horizontal, divided, ref }, rest));
|
|
98
|
+
}
|
|
99
|
+
);
|
|
98
100
|
List.propTypes = {
|
|
99
101
|
horizontal: import_prop_types.default.bool,
|
|
100
102
|
divided: import_prop_types.default.bool
|
|
101
103
|
};
|
|
102
|
-
List.defaultProps = {
|
|
103
|
-
horizontal: false,
|
|
104
|
-
divided: true
|
|
105
|
-
};
|
|
106
104
|
List.displayName = "List";
|
|
107
105
|
var List_default = List;
|
package/cjs/Menu/web/Menu.js
CHANGED
|
@@ -35,7 +35,7 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
|
|
37
37
|
var import_prop_types = require("prop-types");
|
|
38
|
-
const Menu = ({ children, onMouseHover }) => {
|
|
38
|
+
const Menu = ({ children, onMouseHover = true }) => {
|
|
39
39
|
const [isOpen, setIsOpen] = import_react.default.useState(false);
|
|
40
40
|
function handleOpenMenu() {
|
|
41
41
|
setIsOpen(!isOpen);
|
|
@@ -50,8 +50,5 @@ Menu.propTypes = {
|
|
|
50
50
|
/** when mouse hover menu open as default is true */
|
|
51
51
|
onMouseHover: import_prop_types.bool
|
|
52
52
|
};
|
|
53
|
-
Menu.defaultProps = {
|
|
54
|
-
onMouseHover: true
|
|
55
|
-
};
|
|
56
53
|
Menu.displayName = "Menu";
|
|
57
54
|
var Menu_default = Menu;
|
package/cjs/Menu/web/MenuItem.js
CHANGED
|
@@ -129,8 +129,8 @@ const MenuItem = (0, import_react.forwardRef)(
|
|
|
129
129
|
var _b = _a, {
|
|
130
130
|
icon: Icon,
|
|
131
131
|
href,
|
|
132
|
-
active,
|
|
133
|
-
disabled,
|
|
132
|
+
active = false,
|
|
133
|
+
disabled = false,
|
|
134
134
|
iconColor,
|
|
135
135
|
iconSize,
|
|
136
136
|
children,
|
|
@@ -177,13 +177,5 @@ MenuItem.propTypes = {
|
|
|
177
177
|
iconColor: import_prop_types.string,
|
|
178
178
|
iconSize: import_prop_types.string
|
|
179
179
|
};
|
|
180
|
-
MenuItem.defaultProps = {
|
|
181
|
-
icon: void 0,
|
|
182
|
-
href: void 0,
|
|
183
|
-
disabled: false,
|
|
184
|
-
active: false,
|
|
185
|
-
iconColor: void 0,
|
|
186
|
-
iconSize: void 0
|
|
187
|
-
};
|
|
188
180
|
MenuItem.displayName = "Menu.Item";
|
|
189
181
|
var MenuItem_default = (0, import_styled_components.withTheme)(MenuItem);
|