@gympass/yoga 7.60.0 → 7.60.1
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/Drawer/web/Content.js +1 -4
- package/esm/Drawer/web/Content.js +1 -4
- package/package.json +5 -5
- package/cjs/ActionRequirement/native/ActionRequirement.test.js +0 -1
- package/cjs/ActionRequirement/web/ActionRequirement.test.js +0 -40
- package/cjs/AutoComplete/web/AutoComplete.test.js +0 -156
- package/cjs/Avatar/native/Avatar.test.js +0 -1
- package/cjs/Avatar/web/Avatar.test.js +0 -72
- package/cjs/Banner/native/Banner.test.js +0 -1
- package/cjs/Banner/web/Banner.test.js +0 -121
- package/cjs/BottomSheet/web/BottomSheet.test.js +0 -61
- package/cjs/Box/native/Box.test.js +0 -1
- package/cjs/Box/web/Box.test.js +0 -23
- package/cjs/Button/native/Button.test.js +0 -1
- package/cjs/Button/web/Button.test.js +0 -778
- package/cjs/Card/native/Card/Card.test.js +0 -1
- package/cjs/Card/native/EventCard/EventCard.test.js +0 -1
- package/cjs/Card/native/GymCard/CheckIn/CheckIn.test.js +0 -1
- package/cjs/Card/native/PlanCard/PlanCard.test.js +0 -1
- package/cjs/Card/web/Card/Card.test.js +0 -22
- package/cjs/Card/web/EventCard/EventCard.test.js +0 -35
- package/cjs/Card/web/PlanCard/PlanCard.test.js +0 -104
- package/cjs/Checkbox/native/Checkbox.test.js +0 -1
- package/cjs/Checkbox/native/Switch.test.js +0 -1
- package/cjs/Checkbox/web/Checkbox.test.js +0 -161
- package/cjs/Checkbox/web/Switch.test.js +0 -65
- package/cjs/Chips/native/Chips.test.js +0 -1
- package/cjs/Chips/web/Chips.test.js +0 -138
- package/cjs/Datepicker/web/Datepicker.test.js +0 -286
- package/cjs/Dialog/web/Dialog.test.js +0 -78
- package/cjs/Divider/native/Divider.test.js +0 -1
- package/cjs/Divider/web/Divider.test.js +0 -36
- package/cjs/Drawer/web/Drawer.test.js +0 -46
- package/cjs/Dropdown/native/Backdrop.test.js +0 -1
- package/cjs/Dropdown/native/Dropdown.test.js +0 -1
- package/cjs/Dropdown/web/Dropdown.test.js +0 -102
- package/cjs/Feedback/web/Feedback.test.js +0 -89
- package/cjs/Grid/web/Col.test.js +0 -56
- package/cjs/Grid/web/Container.test.js +0 -22
- package/cjs/Grid/web/Hide.test.js +0 -39
- package/cjs/Grid/web/Row.test.js +0 -22
- package/cjs/Header/web/Header.test.js +0 -49
- package/cjs/Heading/web/Heading.test.js +0 -68
- package/cjs/Icon/native/Icon.test.js +0 -1
- package/cjs/Icon/web/Icon.test.js +0 -53
- package/cjs/Input/native/Email.test.js +0 -1
- package/cjs/Input/native/Input.test.js +0 -1
- package/cjs/Input/native/Number.test.js +0 -1
- package/cjs/Input/native/Password.test.js +0 -1
- package/cjs/Input/native/Tel.test.js +0 -1
- package/cjs/Input/web/Email.test.js +0 -20
- package/cjs/Input/web/Input.test.js +0 -161
- package/cjs/Input/web/Number.test.js +0 -20
- package/cjs/Input/web/Password.test.js +0 -103
- package/cjs/Input/web/Tel.test.js +0 -20
- package/cjs/List/native/List.test.js +0 -1
- package/cjs/List/web/List.test.js +0 -69
- package/cjs/Menu/web/Menu.test.js +0 -123
- package/cjs/Popover/web/Popover.test.js +0 -27
- package/cjs/Progress/native/Progress.test.js +0 -1
- package/cjs/Progress/web/Progress.test.js +0 -229
- package/cjs/RadioGroup/native/Button/RadioButton.test.js +0 -1
- package/cjs/RadioGroup/native/Radio/Radio.test.js +0 -1
- package/cjs/RadioGroup/native/RadioGroup.test.js +0 -1
- package/cjs/RadioGroup/web/Button/RadioButton.test.js +0 -132
- package/cjs/RadioGroup/web/Radio/Radio.test.js +0 -119
- package/cjs/RadioGroup/web/RadioGroup.test.js +0 -93
- package/cjs/Rating/native/Rating.test.js +0 -1
- package/cjs/Rating/web/Rating.test.js +0 -201
- package/cjs/Result/native/Result.test.js +0 -1
- package/cjs/Skeleton/native/Skeleton.test.js +0 -1
- package/cjs/Skeleton/web/Skeleton.test.js +0 -84
- package/cjs/Slider/native/Slider.test.js +0 -1
- package/cjs/Slider/web/Slider.test.js +0 -95
- package/cjs/Snackbar/native/Snackbar.test.js +0 -1
- package/cjs/Snackbar/web/Snackbar.test.js +0 -137
- package/cjs/Stepper/native/Stepper.test.js +0 -1
- package/cjs/Stepper/web/Stepper.test.js +0 -75
- package/cjs/Tag/native/Tag.test.js +0 -1
- package/cjs/Tag/web/Tag.test.js +0 -87
- package/cjs/Text/native/Text.test.js +0 -1
- package/cjs/Text/web/Text.test.js +0 -157
- package/cjs/TextArea/native/TextArea.test.js +0 -1
- package/cjs/TextArea/web/TextArea.test.js +0 -18
- package/cjs/Theme/Provider/web/FontLoader.test.js +0 -19
- package/cjs/Theme/Provider/web/GlobalStyle.test.js +0 -27
- package/cjs/Theme/helpers/themeReader/native/native.test.js +0 -1
- package/cjs/Theme/helpers/themeReader/web/web.test.js +0 -54
- package/esm/ActionRequirement/index.native.js +0 -2
- package/esm/ActionRequirement/native/ActionRequirement.js +0 -48
- package/esm/ActionRequirement/native/ActionRequirement.test.js +0 -45
- package/esm/ActionRequirement/native/ActionRequirementStyles.js +0 -25
- package/esm/ActionRequirement/native/index.js +0 -6
- package/esm/ActionRequirement/web/ActionRequirement.test.js +0 -31
- package/esm/AutoComplete/web/AutoComplete.test.js +0 -139
- package/esm/Avatar/index.native.js +0 -4
- package/esm/Avatar/native/Avatar.js +0 -96
- package/esm/Avatar/native/Avatar.test.js +0 -46
- package/esm/Avatar/native/AvatarCircle.js +0 -24
- package/esm/Avatar/web/Avatar.test.js +0 -63
- package/esm/Banner/index.native.js +0 -2
- package/esm/Banner/native/Banner.js +0 -128
- package/esm/Banner/native/Banner.test.js +0 -103
- package/esm/Banner/native/index.js +0 -2
- package/esm/Banner/web/Banner.test.js +0 -109
- package/esm/BottomSheet/web/BottomSheet.test.js +0 -48
- package/esm/Box/index.native.js +0 -2
- package/esm/Box/native/Box.js +0 -4
- package/esm/Box/native/Box.test.js +0 -16
- package/esm/Box/native/index.js +0 -2
- package/esm/Box/web/Box.test.js +0 -16
- package/esm/Button/index.native.js +0 -8
- package/esm/Button/native/Button.js +0 -110
- package/esm/Button/native/Button.test.js +0 -475
- package/esm/Button/native/Icon.js +0 -82
- package/esm/Button/native/Link.js +0 -35
- package/esm/Button/native/Text.js +0 -74
- package/esm/Button/native/withTouchable.js +0 -63
- package/esm/Button/web/Button.test.js +0 -764
- package/esm/Card/index.native.js +0 -2
- package/esm/Card/native/Card/Actions.js +0 -12
- package/esm/Card/native/Card/Card.js +0 -92
- package/esm/Card/native/Card/Card.test.js +0 -15
- package/esm/Card/native/Card/Content.js +0 -8
- package/esm/Card/native/Card/Header.js +0 -8
- package/esm/Card/native/Card/index.js +0 -8
- package/esm/Card/native/EventCard/EventCard.js +0 -169
- package/esm/Card/native/EventCard/EventCard.test.js +0 -65
- package/esm/Card/native/EventCard/index.js +0 -2
- package/esm/Card/native/GymCard/CheckIn/Avatar.js +0 -17
- package/esm/Card/native/GymCard/CheckIn/CheckIn.js +0 -66
- package/esm/Card/native/GymCard/CheckIn/CheckIn.test.js +0 -39
- package/esm/Card/native/GymCard/CheckIn/Content.js +0 -11
- package/esm/Card/native/GymCard/CheckIn/Header.js +0 -11
- package/esm/Card/native/GymCard/CheckIn/index.js +0 -2
- package/esm/Card/native/GymCard/index.js +0 -5
- package/esm/Card/native/PlanCard/Actions.js +0 -22
- package/esm/Card/native/PlanCard/Content.js +0 -75
- package/esm/Card/native/PlanCard/List.js +0 -73
- package/esm/Card/native/PlanCard/PlanCard.js +0 -51
- package/esm/Card/native/PlanCard/PlanCard.test.js +0 -84
- package/esm/Card/native/PlanCard/Subtitle.js +0 -15
- package/esm/Card/native/PlanCard/Tag.js +0 -34
- package/esm/Card/native/PlanCard/index.js +0 -15
- package/esm/Card/native/index.js +0 -5
- package/esm/Card/web/Card/Card.test.js +0 -14
- package/esm/Card/web/EventCard/EventCard.test.js +0 -27
- package/esm/Card/web/PlanCard/PlanCard.test.js +0 -94
- package/esm/Checkbox/index.native.js +0 -3
- package/esm/Checkbox/native/Checkbox.js +0 -179
- package/esm/Checkbox/native/Checkbox.test.js +0 -115
- package/esm/Checkbox/native/Switch.js +0 -115
- package/esm/Checkbox/native/Switch.test.js +0 -54
- package/esm/Checkbox/native/index.js +0 -3
- package/esm/Checkbox/web/Checkbox.test.js +0 -153
- package/esm/Checkbox/web/Switch.test.js +0 -56
- package/esm/Chips/index.native.js +0 -2
- package/esm/Chips/native/Chips.js +0 -104
- package/esm/Chips/native/Chips.test.js +0 -143
- package/esm/Chips/native/Counter.js +0 -20
- package/esm/Chips/native/index.js +0 -2
- package/esm/Chips/web/Chips.test.js +0 -128
- package/esm/Datepicker/web/Datepicker.test.js +0 -247
- package/esm/Dialog/web/Dialog.test.js +0 -62
- package/esm/Divider/index.native.js +0 -2
- package/esm/Divider/native/Divider.js +0 -29
- package/esm/Divider/native/Divider.test.js +0 -29
- package/esm/Divider/native/index.js +0 -2
- package/esm/Divider/web/Divider.test.js +0 -29
- package/esm/Drawer/web/Drawer.test.js +0 -33
- package/esm/Dropdown/index.native.js +0 -2
- package/esm/Dropdown/native/Backdrop.js +0 -93
- package/esm/Dropdown/native/Backdrop.test.js +0 -26
- package/esm/Dropdown/native/Dropdown.js +0 -142
- package/esm/Dropdown/native/Dropdown.test.js +0 -78
- package/esm/Dropdown/native/Options.android.js +0 -66
- package/esm/Dropdown/native/Options.ios.js +0 -71
- package/esm/Dropdown/native/index.js +0 -2
- package/esm/Dropdown/web/Dropdown.test.js +0 -93
- package/esm/Feedback/web/Feedback.test.js +0 -83
- package/esm/Grid/web/Col.test.js +0 -48
- package/esm/Grid/web/Container.test.js +0 -14
- package/esm/Grid/web/Hide.test.js +0 -31
- package/esm/Grid/web/Row.test.js +0 -14
- package/esm/Header/web/Header.test.js +0 -38
- package/esm/Heading/web/Heading.test.js +0 -58
- package/esm/Icon/index.native.js +0 -2
- package/esm/Icon/native/Icon.test.js +0 -47
- package/esm/Icon/native/index.js +0 -2
- package/esm/Icon/web/Icon.test.js +0 -47
- package/esm/Input/index.native.js +0 -6
- package/esm/Input/native/Email.js +0 -15
- package/esm/Input/native/Email.test.js +0 -13
- package/esm/Input/native/Helper.js +0 -62
- package/esm/Input/native/Input.js +0 -234
- package/esm/Input/native/Input.test.js +0 -181
- package/esm/Input/native/Number.js +0 -12
- package/esm/Input/native/Number.test.js +0 -13
- package/esm/Input/native/Password.js +0 -112
- package/esm/Input/native/Password.test.js +0 -125
- package/esm/Input/native/Tel.js +0 -14
- package/esm/Input/native/Tel.test.js +0 -13
- package/esm/Input/native/index.js +0 -6
- package/esm/Input/web/Email.test.js +0 -13
- package/esm/Input/web/Input.test.js +0 -145
- package/esm/Input/web/Number.test.js +0 -13
- package/esm/Input/web/Password.test.js +0 -90
- package/esm/Input/web/Tel.test.js +0 -13
- package/esm/List/index.native.js +0 -3
- package/esm/List/native/List.js +0 -22
- package/esm/List/native/List.test.js +0 -106
- package/esm/List/native/ListItem.js +0 -51
- package/esm/List/native/index.js +0 -3
- package/esm/List/web/List.test.js +0 -62
- package/esm/Menu/web/Menu.test.js +0 -115
- package/esm/Popover/web/Popover.test.js +0 -19
- package/esm/Progress/index.native.js +0 -2
- package/esm/Progress/native/Progress.js +0 -103
- package/esm/Progress/native/Progress.test.js +0 -222
- package/esm/Progress/native/index.js +0 -2
- package/esm/Progress/web/Progress.test.js +0 -222
- package/esm/RadioGroup/index.native.js +0 -4
- package/esm/RadioGroup/native/Button/RadioButton.js +0 -64
- package/esm/RadioGroup/native/Button/RadioButton.test.js +0 -96
- package/esm/RadioGroup/native/Radio/Radio.js +0 -88
- package/esm/RadioGroup/native/Radio/Radio.test.js +0 -112
- package/esm/RadioGroup/native/RadioGroup.js +0 -66
- package/esm/RadioGroup/native/RadioGroup.test.js +0 -50
- package/esm/RadioGroup/native/index.js +0 -4
- package/esm/RadioGroup/web/Button/RadioButton.test.js +0 -121
- package/esm/RadioGroup/web/Radio/Radio.test.js +0 -108
- package/esm/RadioGroup/web/RadioGroup.test.js +0 -83
- package/esm/Rating/index.native.js +0 -2
- package/esm/Rating/native/Rating.js +0 -186
- package/esm/Rating/native/Rating.test.js +0 -121
- package/esm/Rating/native/index.js +0 -2
- package/esm/Rating/web/Rating.test.js +0 -184
- package/esm/Result/index.native.js +0 -8
- package/esm/Result/native/Attendances.js +0 -55
- package/esm/Result/native/Details.js +0 -97
- package/esm/Result/native/Rate.js +0 -35
- package/esm/Result/native/Result.js +0 -86
- package/esm/Result/native/Result.test.js +0 -107
- package/esm/Result/native/ResultButton.js +0 -13
- package/esm/Result/native/Tags.js +0 -41
- package/esm/Result/native/TinyTextIcon.js +0 -18
- package/esm/Result/native/index.js +0 -2
- package/esm/Skeleton/index.native.js +0 -2
- package/esm/Skeleton/native/Skeleton.js +0 -94
- package/esm/Skeleton/native/Skeleton.test.js +0 -78
- package/esm/Skeleton/native/index.js +0 -2
- package/esm/Skeleton/web/Skeleton.test.js +0 -77
- package/esm/Slider/index.native.js +0 -2
- package/esm/Slider/native/Label.js +0 -19
- package/esm/Slider/native/Marker.js +0 -68
- package/esm/Slider/native/Slider.js +0 -156
- package/esm/Slider/native/Slider.test.js +0 -122
- package/esm/Slider/native/Step.js +0 -14
- package/esm/Slider/native/Tooltip.js +0 -90
- package/esm/Slider/web/Slider.test.js +0 -86
- package/esm/Snackbar/index.native.js +0 -2
- package/esm/Snackbar/native/Snackbar.js +0 -199
- package/esm/Snackbar/native/Snackbar.test.js +0 -100
- package/esm/Snackbar/native/SnackbarAnimationWrapper.js +0 -124
- package/esm/Snackbar/native/index.js +0 -2
- package/esm/Snackbar/web/Snackbar.test.js +0 -118
- package/esm/Stepper/index.native.js +0 -3
- package/esm/Stepper/native/Dots.js +0 -45
- package/esm/Stepper/native/Line.js +0 -35
- package/esm/Stepper/native/Step.js +0 -19
- package/esm/Stepper/native/Stepper.js +0 -52
- package/esm/Stepper/native/Stepper.test.js +0 -70
- package/esm/Stepper/native/index.js +0 -3
- package/esm/Stepper/web/Stepper.test.js +0 -67
- package/esm/Tag/index.native.js +0 -4
- package/esm/Tag/native/Informative.js +0 -72
- package/esm/Tag/native/Tag.js +0 -75
- package/esm/Tag/native/Tag.test.js +0 -94
- package/esm/Tag/native/index.js +0 -2
- package/esm/Tag/web/Tag.test.js +0 -79
- package/esm/Text/index.native.js +0 -16
- package/esm/Text/native/Text.js +0 -69
- package/esm/Text/native/Text.test.js +0 -149
- package/esm/Text/native/index.js +0 -2
- package/esm/Text/web/Text.test.js +0 -149
- package/esm/TextArea/index.native.js +0 -2
- package/esm/TextArea/native/TextArea.js +0 -59
- package/esm/TextArea/native/TextArea.test.js +0 -11
- package/esm/TextArea/native/index.js +0 -2
- package/esm/TextArea/web/TextArea.test.js +0 -11
- package/esm/Theme/Provider/index.native.js +0 -2
- package/esm/Theme/Provider/native/index.js +0 -2
- package/esm/Theme/Provider/web/FontLoader.test.js +0 -11
- package/esm/Theme/Provider/web/GlobalStyle.test.js +0 -17
- package/esm/Theme/helpers/themeReader/native/native.test.js +0 -53
- package/esm/Theme/helpers/themeReader/web/web.test.js +0 -41
- package/esm/Theme/index.native.js +0 -5
- package/esm/index.native.js +0 -26
- package/esm/shared/index.native.js +0 -2
package/esm/Card/index.native.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
var _templateObject;
|
|
2
|
-
|
|
3
|
-
function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
|
|
4
|
-
|
|
5
|
-
import styled from 'styled-components';
|
|
6
|
-
import { node } from 'prop-types';
|
|
7
|
-
var Actions = styled.View(_templateObject || (_templateObject = _taggedTemplateLiteralLoose([""])));
|
|
8
|
-
Actions.propTypes = {
|
|
9
|
-
children: node.isRequired
|
|
10
|
-
};
|
|
11
|
-
Actions.displayName = 'Card.Actions';
|
|
12
|
-
export default Actions;
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
var _excluded = ["ribbon", "children"];
|
|
2
|
-
|
|
3
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
4
|
-
|
|
5
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
6
|
-
|
|
7
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
8
|
-
|
|
9
|
-
function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
|
|
10
|
-
|
|
11
|
-
import React from 'react';
|
|
12
|
-
import styled from 'styled-components';
|
|
13
|
-
import { string, shape, oneOf, node } from 'prop-types';
|
|
14
|
-
import Text from '../../../Text';
|
|
15
|
-
import Box from '../../../Box';
|
|
16
|
-
var CardShadow = styled(Box).attrs(function (_ref) {
|
|
17
|
-
var elevation = _ref.theme.yoga.components.card.elevation;
|
|
18
|
-
return {
|
|
19
|
-
elevation: elevation
|
|
20
|
-
};
|
|
21
|
-
})(_templateObject || (_templateObject = _taggedTemplateLiteralLoose([""])));
|
|
22
|
-
var CardStyled = styled(Box).attrs(function (_ref2) {
|
|
23
|
-
var variant = _ref2.variant,
|
|
24
|
-
_ref2$theme$yoga = _ref2.theme.yoga,
|
|
25
|
-
color = _ref2$theme$yoga.colors[variant],
|
|
26
|
-
card = _ref2$theme$yoga.components.card;
|
|
27
|
-
return {
|
|
28
|
-
elevation: card.elevation,
|
|
29
|
-
pt: card.padding.top,
|
|
30
|
-
pr: card.padding.right,
|
|
31
|
-
pb: card.padding.bottom,
|
|
32
|
-
pl: card.padding.left,
|
|
33
|
-
bRadius: card.radii,
|
|
34
|
-
bgColor: variant ? color : card.backgroundColor,
|
|
35
|
-
overflow: 'hidden'
|
|
36
|
-
};
|
|
37
|
-
})(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose([""])));
|
|
38
|
-
var Ribbon = styled.View(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n ", "\n"])), function (_ref3) {
|
|
39
|
-
var variant = _ref3.variant,
|
|
40
|
-
_ref3$theme$yoga = _ref3.theme.yoga,
|
|
41
|
-
card = _ref3$theme$yoga.components.card,
|
|
42
|
-
spacing = _ref3$theme$yoga.spacing,
|
|
43
|
-
_ref3$theme$yoga$colo = _ref3$theme$yoga.colors,
|
|
44
|
-
elements = _ref3$theme$yoga$colo.elements,
|
|
45
|
-
color = _ref3$theme$yoga$colo[variant],
|
|
46
|
-
white = _ref3$theme$yoga$colo.white,
|
|
47
|
-
dark = _ref3$theme$yoga$colo.dark;
|
|
48
|
-
return "\n align-self: flex-start;\n\n margin-bottom: " + card.padding.bottom + "px;\n margin-left: -" + card.padding.left + "px;\n\n padding:\n " + spacing.xxxsmall + "px\n " + spacing.xsmall + "px\n " + spacing.xxxsmall + "px\n " + spacing.small + "px;\n\n border-top-right-radius: " + card.ribbon.radius + "px;\n border-bottom-right-radius: " + card.ribbon.radius + "px;\n background-color: " + (variant ? color : elements.backgroundAndDisabled) + ";\n\n color: " + (variant ? white : dark) + ";\n ";
|
|
49
|
-
});
|
|
50
|
-
var RibbonText = styled(Text.Tiny)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n ", "\n"])), function (_ref4) {
|
|
51
|
-
var variant = _ref4.variant,
|
|
52
|
-
_ref4$theme$yoga$colo = _ref4.theme.yoga.colors,
|
|
53
|
-
white = _ref4$theme$yoga$colo.white,
|
|
54
|
-
dark = _ref4$theme$yoga$colo.dark;
|
|
55
|
-
return "\n color: " + (variant ? white : dark) + ";\n ";
|
|
56
|
-
});
|
|
57
|
-
var Card = /*#__PURE__*/React.forwardRef(function (_ref5, ref) {
|
|
58
|
-
var ribbon = _ref5.ribbon,
|
|
59
|
-
children = _ref5.children,
|
|
60
|
-
rest = _objectWithoutPropertiesLoose(_ref5, _excluded);
|
|
61
|
-
|
|
62
|
-
return /*#__PURE__*/React.createElement(CardShadow, null, /*#__PURE__*/React.createElement(CardStyled, _extends({
|
|
63
|
-
ref: ref
|
|
64
|
-
}, rest), Object.keys(ribbon).length > 0 && /*#__PURE__*/React.createElement(Ribbon, {
|
|
65
|
-
variant: ribbon.variant
|
|
66
|
-
}, /*#__PURE__*/React.createElement(RibbonText, {
|
|
67
|
-
variant: ribbon.variant
|
|
68
|
-
}, ribbon.text)), children));
|
|
69
|
-
});
|
|
70
|
-
Card.propTypes = {
|
|
71
|
-
/** text: the content inside the Card Ribbon
|
|
72
|
-
* variant: style the card following the theme (primary, secondary, vibin,
|
|
73
|
-
* hope, energy, relax, peace, verve, uplift, deepPurple, deep, stamina, dark,
|
|
74
|
-
* medium, light, clear, white) */
|
|
75
|
-
ribbon: shape({
|
|
76
|
-
text: string,
|
|
77
|
-
variant: oneOf(['', 'primary', 'secondary', 'vibin', 'hope', 'energy', 'relax', 'peace', 'verve', 'uplift', 'deepPurple', 'stamina', 'dark', 'medium', 'deep', 'light', 'clear', 'white'])
|
|
78
|
-
}),
|
|
79
|
-
children: node,
|
|
80
|
-
|
|
81
|
-
/** style the card following the theme (primary, secondary, vibin, hope,
|
|
82
|
-
* energy, relax, peace, verve, uplift, deepPurple, deep, stamina, dark,
|
|
83
|
-
* medium, light, clear, white) */
|
|
84
|
-
variant: oneOf(['', 'primary', 'secondary', 'vibin', 'hope', 'energy', 'relax', 'peace', 'verve', 'uplift', 'deepPurple', 'stamina', 'dark', 'medium', 'deep', 'light', 'clear', 'white'])
|
|
85
|
-
};
|
|
86
|
-
Card.defaultProps = {
|
|
87
|
-
ribbon: {},
|
|
88
|
-
children: null,
|
|
89
|
-
variant: ''
|
|
90
|
-
};
|
|
91
|
-
Card.displayName = 'Card';
|
|
92
|
-
export default Card;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render } from '@testing-library/react-native';
|
|
3
|
-
import { Text } from 'react-native';
|
|
4
|
-
import { ThemeProvider, Button } from '../../..';
|
|
5
|
-
import Card from '.';
|
|
6
|
-
describe('<Card />', function () {
|
|
7
|
-
describe('Snapshots', function () {
|
|
8
|
-
it('should match snapshot with default Card', function () {
|
|
9
|
-
var _render = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(Card.Header, null, /*#__PURE__*/React.createElement(Text, null, "Hello World")), /*#__PURE__*/React.createElement(Card.Content, null, /*#__PURE__*/React.createElement(Text, null, "It's fine here")), /*#__PURE__*/React.createElement(Card.Actions, null, /*#__PURE__*/React.createElement(Button, null, "Action's children must be Button"))))),
|
|
10
|
-
toJSON = _render.toJSON;
|
|
11
|
-
|
|
12
|
-
expect(toJSON()).toMatchSnapshot();
|
|
13
|
-
});
|
|
14
|
-
});
|
|
15
|
-
});
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
var _templateObject;
|
|
2
|
-
|
|
3
|
-
function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
|
|
4
|
-
|
|
5
|
-
import styled from 'styled-components';
|
|
6
|
-
var Content = styled.View(_templateObject || (_templateObject = _taggedTemplateLiteralLoose([""])));
|
|
7
|
-
Content.displayName = 'Card.Content';
|
|
8
|
-
export default Content;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
var _templateObject;
|
|
2
|
-
|
|
3
|
-
function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
|
|
4
|
-
|
|
5
|
-
import styled from 'styled-components';
|
|
6
|
-
var Header = styled.View(_templateObject || (_templateObject = _taggedTemplateLiteralLoose([""])));
|
|
7
|
-
Header.displayName = 'Card.Header';
|
|
8
|
-
export default Header;
|
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
var _excluded = ["onPress", "small"];
|
|
2
|
-
|
|
3
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12;
|
|
4
|
-
|
|
5
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
6
|
-
|
|
7
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
8
|
-
|
|
9
|
-
function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
|
|
10
|
-
|
|
11
|
-
import React from 'react';
|
|
12
|
-
import styled, { withTheme, css } from 'styled-components';
|
|
13
|
-
import { shape, string, bool, oneOfType, func } from 'prop-types';
|
|
14
|
-
import { Time } from '@gympass/yoga-icons';
|
|
15
|
-
import { TouchableWithoutFeedback } from 'react-native';
|
|
16
|
-
import theme from '../../../Theme/helpers/themeReader';
|
|
17
|
-
import Card from '../Card';
|
|
18
|
-
import Text from '../../../Text';
|
|
19
|
-
import Box from '../../../Box';
|
|
20
|
-
import Button from '../../../Button';
|
|
21
|
-
var spacing = theme.spacing,
|
|
22
|
-
radii = theme.radii,
|
|
23
|
-
lineHeights = theme.lineHeights;
|
|
24
|
-
var Event = styled(Card)(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n flex-direction: row;\n height: 104px;\n border-radius: ", "px;\n padding: ", ";\n width: 280px;\n margin-right: ", ";\n ", "\n"])), radii.regular, spacing.zero, spacing.xxsmall, function (_ref) {
|
|
25
|
-
var small = _ref.small;
|
|
26
|
-
return small ? css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n width: ", "px;\n "])), spacing.xxxlarge) : '';
|
|
27
|
-
});
|
|
28
|
-
var DateInfo = styled(Box)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n justify-content: center;\n align-items: center;\n width: 56px;\n"])));
|
|
29
|
-
var EventInfo = styled(Box)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteralLoose(["\n flex: 1;\n"])));
|
|
30
|
-
var Top = styled(Box)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteralLoose(["\n justify-content: center;\n align-items: center;\n height: ", "px;\n"])), spacing.small);
|
|
31
|
-
var Name = styled(Text.Medium)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteralLoose(["\n margin-bottom: ", "px;\n line-height: ", "px;\n"])), spacing.xxxsmall, lineHeights.small);
|
|
32
|
-
var Place = styled(Text.Tiny)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteralLoose(["\n width: 180px;\n margin-bottom: ", "px;\n"])), spacing.xsmall);
|
|
33
|
-
var Day = styled(Text.H5)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteralLoose(["\n margin-top: ", "px;\n margin-bottom: ", "px;\n"])), spacing.xxxsmall, spacing.xxxsmall);
|
|
34
|
-
|
|
35
|
-
var getIndicatorColor = function getIndicatorColor(active, event) {
|
|
36
|
-
if (active) return 'white';
|
|
37
|
-
return event ? 'primary' : 'light';
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
var Indicator = styled(Box)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteralLoose(["\n width: ", "px;\n height: ", "px;\n"])), spacing.xxsmall, spacing.xxsmall);
|
|
41
|
-
var Row = styled(Box)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteralLoose(["\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n"])));
|
|
42
|
-
var EventTime = styled(Box)(_templateObject11 || (_templateObject11 = _taggedTemplateLiteralLoose(["\n flex-direction: row;\n align-items: center;\n"])));
|
|
43
|
-
var ButtonLink = styled(Button.Link)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteralLoose(["\n align-self: flex-end;\n"])));
|
|
44
|
-
|
|
45
|
-
var SmallCard = function SmallCard(_ref2) {
|
|
46
|
-
var _ref2$date = _ref2.date,
|
|
47
|
-
month = _ref2$date.month,
|
|
48
|
-
day = _ref2$date.day,
|
|
49
|
-
dayOfWeek = _ref2$date.dayOfWeek,
|
|
50
|
-
active = _ref2.active,
|
|
51
|
-
event = _ref2.event,
|
|
52
|
-
onPress = _ref2.onPress;
|
|
53
|
-
return /*#__PURE__*/React.createElement(DateInfo, {
|
|
54
|
-
small: true,
|
|
55
|
-
pv: "medium",
|
|
56
|
-
bg: active ? 'primary' : 'white'
|
|
57
|
-
}, /*#__PURE__*/React.createElement(Top, null, onPress ? /*#__PURE__*/React.createElement(Indicator, {
|
|
58
|
-
borderRadius: "small",
|
|
59
|
-
bgColor: getIndicatorColor(active, Boolean(event))
|
|
60
|
-
}) : /*#__PURE__*/React.createElement(Text.Tiny, {
|
|
61
|
-
variant: active ? 'white' : 'deep'
|
|
62
|
-
}, month)), /*#__PURE__*/React.createElement(Day, {
|
|
63
|
-
variant: active ? 'white' : 'secondary'
|
|
64
|
-
}, day), /*#__PURE__*/React.createElement(Text.Tiny, {
|
|
65
|
-
variant: active ? 'white' : 'deep'
|
|
66
|
-
}, String(dayOfWeek).toUpperCase()));
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
var FullCard = withTheme(function (_ref3) {
|
|
70
|
-
var event = _ref3.event,
|
|
71
|
-
_ref3$date = _ref3.date,
|
|
72
|
-
month = _ref3$date.month,
|
|
73
|
-
day = _ref3$date.day,
|
|
74
|
-
dayOfWeek = _ref3$date.dayOfWeek,
|
|
75
|
-
link = _ref3.link,
|
|
76
|
-
onLinkPress = _ref3.onLinkPress,
|
|
77
|
-
icon = _ref3.theme.yoga.components.card.event.icon;
|
|
78
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DateInfo, {
|
|
79
|
-
bg: "primary"
|
|
80
|
-
}, /*#__PURE__*/React.createElement(Top, null, /*#__PURE__*/React.createElement(Text.Tiny, {
|
|
81
|
-
inverted: true
|
|
82
|
-
}, month)), /*#__PURE__*/React.createElement(Day, {
|
|
83
|
-
inverted: true
|
|
84
|
-
}, day), /*#__PURE__*/React.createElement(Text.Tiny, {
|
|
85
|
-
inverted: true
|
|
86
|
-
}, String(dayOfWeek).toUpperCase())), /*#__PURE__*/React.createElement(EventInfo, {
|
|
87
|
-
p: "small",
|
|
88
|
-
pl: "xsmall"
|
|
89
|
-
}, /*#__PURE__*/React.createElement(Name, {
|
|
90
|
-
numberOfLines: 1,
|
|
91
|
-
size: "small"
|
|
92
|
-
}, event.name), /*#__PURE__*/React.createElement(Place, {
|
|
93
|
-
variant: "deep",
|
|
94
|
-
numberOfLines: 1
|
|
95
|
-
}, event.place), /*#__PURE__*/React.createElement(Row, null, /*#__PURE__*/React.createElement(EventTime, null, /*#__PURE__*/React.createElement(Time, {
|
|
96
|
-
fill: icon.fill,
|
|
97
|
-
style: {
|
|
98
|
-
marginRight: 5
|
|
99
|
-
}
|
|
100
|
-
}), /*#__PURE__*/React.createElement(Text.Tiny, null, event.time)), !!link && /*#__PURE__*/React.createElement(ButtonLink, {
|
|
101
|
-
onPress: onLinkPress,
|
|
102
|
-
small: true
|
|
103
|
-
}, link))));
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
var EventCard = function EventCard(_ref4) {
|
|
107
|
-
var onPress = _ref4.onPress,
|
|
108
|
-
small = _ref4.small,
|
|
109
|
-
rest = _objectWithoutPropertiesLoose(_ref4, _excluded);
|
|
110
|
-
|
|
111
|
-
return /*#__PURE__*/React.createElement(TouchableWithoutFeedback, {
|
|
112
|
-
onPress: onPress
|
|
113
|
-
}, /*#__PURE__*/React.createElement(Event, _extends({
|
|
114
|
-
small: small
|
|
115
|
-
}, rest), small ? /*#__PURE__*/React.createElement(SmallCard, _extends({
|
|
116
|
-
onPress: onPress
|
|
117
|
-
}, rest)) : /*#__PURE__*/React.createElement(FullCard, rest)));
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
EventCard.propTypes = {
|
|
121
|
-
/** event information: { name (string), place (string), time (string) } */
|
|
122
|
-
event: oneOfType([shape({
|
|
123
|
-
name: string,
|
|
124
|
-
place: string,
|
|
125
|
-
time: string
|
|
126
|
-
}), bool]),
|
|
127
|
-
|
|
128
|
-
/** date information: { day (string), dayOfWeek (string), month (string) } */
|
|
129
|
-
date: shape({
|
|
130
|
-
day: string,
|
|
131
|
-
dayOfWeek: string,
|
|
132
|
-
month: string
|
|
133
|
-
}).isRequired,
|
|
134
|
-
small: bool,
|
|
135
|
-
active: bool,
|
|
136
|
-
link: string,
|
|
137
|
-
onLinkPress: func,
|
|
138
|
-
onPress: func
|
|
139
|
-
};
|
|
140
|
-
EventCard.defaultProps = {
|
|
141
|
-
small: false,
|
|
142
|
-
active: false,
|
|
143
|
-
event: undefined,
|
|
144
|
-
link: '',
|
|
145
|
-
onLinkPress: undefined,
|
|
146
|
-
onPress: undefined
|
|
147
|
-
};
|
|
148
|
-
SmallCard.propTypes = {
|
|
149
|
-
date: shape({
|
|
150
|
-
day: string,
|
|
151
|
-
dayOfWeek: string,
|
|
152
|
-
month: string
|
|
153
|
-
}).isRequired,
|
|
154
|
-
active: bool,
|
|
155
|
-
event: oneOfType([shape({
|
|
156
|
-
name: string,
|
|
157
|
-
place: string,
|
|
158
|
-
time: string
|
|
159
|
-
}), bool]),
|
|
160
|
-
onPress: func
|
|
161
|
-
};
|
|
162
|
-
SmallCard.defaultProps = {
|
|
163
|
-
active: false,
|
|
164
|
-
event: undefined,
|
|
165
|
-
onPress: undefined
|
|
166
|
-
};
|
|
167
|
-
FullCard.propTypes = EventCard.propTypes;
|
|
168
|
-
EventCard.displayName = 'EventCard';
|
|
169
|
-
export default EventCard;
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { render } from '@testing-library/react-native';
|
|
5
|
-
import { ThemeProvider } from '../../..';
|
|
6
|
-
import EventCard from '.';
|
|
7
|
-
var defaultProps = {
|
|
8
|
-
event: {
|
|
9
|
-
name: 'Yoga Class',
|
|
10
|
-
place: 'Gympass',
|
|
11
|
-
time: '19 am'
|
|
12
|
-
},
|
|
13
|
-
date: {
|
|
14
|
-
day: '19',
|
|
15
|
-
dayOfWeek: 'thu',
|
|
16
|
-
month: 'dec'
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
describe('<EventCard />', function () {
|
|
20
|
-
describe('Snapshots', function () {
|
|
21
|
-
it('should match snapshot with full EventCard', function () {
|
|
22
|
-
var _render = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(EventCard, defaultProps))),
|
|
23
|
-
toJSON = _render.toJSON;
|
|
24
|
-
|
|
25
|
-
expect(toJSON()).toMatchSnapshot();
|
|
26
|
-
});
|
|
27
|
-
it('should match snapshot of small EventCard with event indicator disabled', function () {
|
|
28
|
-
var _render2 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(EventCard, _extends({}, defaultProps, {
|
|
29
|
-
event: false,
|
|
30
|
-
small: true,
|
|
31
|
-
onPress: function onPress() {}
|
|
32
|
-
})))),
|
|
33
|
-
toJSON = _render2.toJSON;
|
|
34
|
-
|
|
35
|
-
expect(toJSON()).toMatchSnapshot();
|
|
36
|
-
});
|
|
37
|
-
it('should match snapshot of small EventCard with event indicator enabled', function () {
|
|
38
|
-
var _render3 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(EventCard, _extends({}, defaultProps, {
|
|
39
|
-
small: true,
|
|
40
|
-
onPress: function onPress() {}
|
|
41
|
-
})))),
|
|
42
|
-
toJSON = _render3.toJSON;
|
|
43
|
-
|
|
44
|
-
expect(toJSON()).toMatchSnapshot();
|
|
45
|
-
});
|
|
46
|
-
it('should match snapshot of small EventCard active', function () {
|
|
47
|
-
var _render4 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(EventCard, _extends({}, defaultProps, {
|
|
48
|
-
small: true,
|
|
49
|
-
active: true,
|
|
50
|
-
onPress: function onPress() {}
|
|
51
|
-
})))),
|
|
52
|
-
toJSON = _render4.toJSON;
|
|
53
|
-
|
|
54
|
-
expect(toJSON()).toMatchSnapshot();
|
|
55
|
-
});
|
|
56
|
-
it('should match snapshot of small EventCard with day of week and without indicator', function () {
|
|
57
|
-
var _render5 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(EventCard, _extends({}, defaultProps, {
|
|
58
|
-
small: true
|
|
59
|
-
})))),
|
|
60
|
-
toJSON = _render5.toJSON;
|
|
61
|
-
|
|
62
|
-
expect(toJSON()).toMatchSnapshot();
|
|
63
|
-
});
|
|
64
|
-
});
|
|
65
|
-
});
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
var _templateObject, _templateObject2;
|
|
2
|
-
|
|
3
|
-
function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
|
|
4
|
-
|
|
5
|
-
import styled from 'styled-components';
|
|
6
|
-
var Avatar = styled.Image(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n width: 48px;\n height: 48px;\n\n ", "\n"])), function (_ref) {
|
|
7
|
-
var checkIn = _ref.theme.yoga.components.card.gym.checkIn;
|
|
8
|
-
return "\n border-radius: " + checkIn.avatar.border.radius + "px;\n ";
|
|
9
|
-
});
|
|
10
|
-
Avatar.displayName = 'Avatar';
|
|
11
|
-
var Placeholder = styled.View(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n ", "\n"])), function (_ref2) {
|
|
12
|
-
var _ref2$theme$yoga = _ref2.theme.yoga,
|
|
13
|
-
elements = _ref2$theme$yoga.colors.elements,
|
|
14
|
-
checkIn = _ref2$theme$yoga.components.card.gym.checkIn;
|
|
15
|
-
return "\n width: 48px;\n height: 48px;\n\n align-items: center;\n justify-content: center;\n\n border: " + checkIn.avatar.border.width + "px solid " + elements.lineAndBorders + ";\n border-radius: " + checkIn.avatar.border.radius + "px;\n ";
|
|
16
|
-
});
|
|
17
|
-
export { Avatar, Placeholder };
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
var _excluded = ["name", "address", "avatar", "distance", "rating", "theme"];
|
|
2
|
-
|
|
3
|
-
var _templateObject, _templateObject2;
|
|
4
|
-
|
|
5
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
|
-
|
|
7
|
-
function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
|
|
8
|
-
|
|
9
|
-
import React from 'react';
|
|
10
|
-
import styled, { withTheme } from 'styled-components';
|
|
11
|
-
import { ImagePropTypes } from 'deprecated-react-native-prop-types';
|
|
12
|
-
import { string, number } from 'prop-types';
|
|
13
|
-
import { Building } from '@gympass/yoga-icons';
|
|
14
|
-
import Card from '../../Card';
|
|
15
|
-
import Rating from '../../../../Rating';
|
|
16
|
-
import Text from '../../../../Text';
|
|
17
|
-
import Header from './Header';
|
|
18
|
-
import { Avatar, Placeholder } from './Avatar';
|
|
19
|
-
import Content from './Content';
|
|
20
|
-
var Wrapper = styled(Card)(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n width: 160px;\n min-height: 204px;\n"])));
|
|
21
|
-
var Title = styled(Text)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n min-height: 40px;\n\n ", "\n"])), function (_ref) {
|
|
22
|
-
var checkIn = _ref.theme.yoga.components.card.gym.checkIn;
|
|
23
|
-
return "\n margin-bottom: " + checkIn.title.margin.bottom + "px;\n font-weight: " + checkIn.title.font.weight + ";\n ";
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
var CheckIn = function CheckIn(_ref2) {
|
|
27
|
-
var name = _ref2.name,
|
|
28
|
-
address = _ref2.address,
|
|
29
|
-
avatar = _ref2.avatar,
|
|
30
|
-
distance = _ref2.distance,
|
|
31
|
-
rating = _ref2.rating,
|
|
32
|
-
elements = _ref2.theme.yoga.colors.elements,
|
|
33
|
-
rest = _objectWithoutPropertiesLoose(_ref2, _excluded);
|
|
34
|
-
|
|
35
|
-
return /*#__PURE__*/React.createElement(Wrapper, rest, /*#__PURE__*/React.createElement(Header, null, avatar ? /*#__PURE__*/React.createElement(Avatar, {
|
|
36
|
-
source: avatar
|
|
37
|
-
}) : /*#__PURE__*/React.createElement(Placeholder, null, /*#__PURE__*/React.createElement(Building, {
|
|
38
|
-
width: 24,
|
|
39
|
-
height: 26,
|
|
40
|
-
fill: elements.selectionAndIcons
|
|
41
|
-
})), /*#__PURE__*/React.createElement(Text.Tiny, null, distance)), /*#__PURE__*/React.createElement(Rating, {
|
|
42
|
-
value: rating,
|
|
43
|
-
icon: {
|
|
44
|
-
size: 18
|
|
45
|
-
}
|
|
46
|
-
}), /*#__PURE__*/React.createElement(Content, null, /*#__PURE__*/React.createElement(Title, {
|
|
47
|
-
numberOfLines: 2
|
|
48
|
-
}, name), /*#__PURE__*/React.createElement(Text.Tiny, {
|
|
49
|
-
numberOfLines: 2
|
|
50
|
-
}, address)));
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
CheckIn.propTypes = {
|
|
54
|
-
name: string.isRequired,
|
|
55
|
-
address: string.isRequired,
|
|
56
|
-
|
|
57
|
-
/** The same as in source prop of Image react-native component */
|
|
58
|
-
avatar: ImagePropTypes.source,
|
|
59
|
-
distance: string.isRequired,
|
|
60
|
-
rating: number.isRequired
|
|
61
|
-
};
|
|
62
|
-
CheckIn.defaultProps = {
|
|
63
|
-
avatar: undefined
|
|
64
|
-
};
|
|
65
|
-
CheckIn.displayName = 'GymCard.CheckIn';
|
|
66
|
-
export default withTheme(CheckIn);
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render } from '@testing-library/react-native';
|
|
3
|
-
import ThemeProvider from '../../../../Theme';
|
|
4
|
-
import GymCard from '..';
|
|
5
|
-
describe('<GymCard.CheckIn />', function () {
|
|
6
|
-
describe('Snapshots', function () {
|
|
7
|
-
var data = {
|
|
8
|
-
name: 'Foo',
|
|
9
|
-
distance: '100 m',
|
|
10
|
-
rating: 5,
|
|
11
|
-
address: 'Bar'
|
|
12
|
-
};
|
|
13
|
-
it('should match snapshot without avatar', function () {
|
|
14
|
-
var _render = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(GymCard.CheckIn, {
|
|
15
|
-
name: data.name,
|
|
16
|
-
distance: data.distance,
|
|
17
|
-
rating: data.rating,
|
|
18
|
-
address: data.address
|
|
19
|
-
}))),
|
|
20
|
-
toJSON = _render.toJSON;
|
|
21
|
-
|
|
22
|
-
expect(toJSON()).toMatchSnapshot();
|
|
23
|
-
});
|
|
24
|
-
it('should match snapshot with avatar', function () {
|
|
25
|
-
var _render2 = render( /*#__PURE__*/React.createElement(ThemeProvider, null, /*#__PURE__*/React.createElement(GymCard.CheckIn, {
|
|
26
|
-
avatar: {
|
|
27
|
-
uri: 'data:image/png;base64,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'
|
|
28
|
-
},
|
|
29
|
-
name: data.name,
|
|
30
|
-
distance: data.distance,
|
|
31
|
-
rating: data.rating,
|
|
32
|
-
address: data.address
|
|
33
|
-
}))),
|
|
34
|
-
toJSON = _render2.toJSON;
|
|
35
|
-
|
|
36
|
-
expect(toJSON()).toMatchSnapshot();
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
});
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
var _templateObject;
|
|
2
|
-
|
|
3
|
-
function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
|
|
4
|
-
|
|
5
|
-
import styled from 'styled-components';
|
|
6
|
-
import Card from '../../Card';
|
|
7
|
-
var Content = styled(Card.Content)(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n ", "\n"])), function (_ref) {
|
|
8
|
-
var checkIn = _ref.theme.yoga.components.card.gym.checkIn;
|
|
9
|
-
return "\n margin-top: " + checkIn.content.margin.top + "px;\n ";
|
|
10
|
-
});
|
|
11
|
-
export default Content;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
var _templateObject;
|
|
2
|
-
|
|
3
|
-
function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
|
|
4
|
-
|
|
5
|
-
import styled from 'styled-components';
|
|
6
|
-
import Card from '../../Card';
|
|
7
|
-
var Header = styled(Card.Header)(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n flex-direction: row;\n justify-content: space-between;\n\n ", "\n"])), function (_ref) {
|
|
8
|
-
var checkIn = _ref.theme.yoga.components.card.gym.checkIn;
|
|
9
|
-
return "\n margin-bottom: " + checkIn.header.margin.bottom + "px;\n ";
|
|
10
|
-
});
|
|
11
|
-
export default Header;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
var _templateObject, _templateObject2, _templateObject3;
|
|
2
|
-
|
|
3
|
-
function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
|
|
4
|
-
|
|
5
|
-
import styled from 'styled-components';
|
|
6
|
-
import Actions from '../Card/Actions';
|
|
7
|
-
import Button from '../../../Button';
|
|
8
|
-
import theme from '../../../Theme/helpers/themeReader';
|
|
9
|
-
var _theme$components = theme.components,
|
|
10
|
-
cardnative = _theme$components.cardnative,
|
|
11
|
-
card = _theme$components.card;
|
|
12
|
-
var PlanCardButton = styled(Button).attrs({
|
|
13
|
-
full: true
|
|
14
|
-
})(_templateObject || (_templateObject = _taggedTemplateLiteralLoose([""])));
|
|
15
|
-
var PlanCardButtonText = styled(Button.Text).attrs({
|
|
16
|
-
full: true
|
|
17
|
-
})(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n margin-top: ", "px;\n margin-bottom: ", "px;\n"])), cardnative.plan.actions.buttonText.margin.top, card.plan.actions.buttonText.margin.bottom);
|
|
18
|
-
var PlanCardActions = styled(Actions)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n margin-top: ", "px;\n"])), cardnative.plan.actions.margin.top);
|
|
19
|
-
PlanCardActions.displayName = 'PlanCard.Actions';
|
|
20
|
-
PlanCardButton.displayName = 'PlanCard.Button';
|
|
21
|
-
PlanCardButtonText.displayName = 'PlanCard.ButtonText';
|
|
22
|
-
export { PlanCardActions as Actions, PlanCardButton as Button, PlanCardButtonText as ButtonText };
|