@gympass/yoga 7.66.0 → 7.67.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/Dialog/web/Dialog.js +12 -7
- package/cjs/Drawer/web/Drawer.js +5 -1
- package/cjs/Feedback/web/Feedback.js +16 -10
- package/esm/Accordion/web/Accordion.test.js +19 -0
- package/esm/ActionRequirement/index.native.js +2 -0
- package/esm/ActionRequirement/native/ActionRequirement.js +48 -0
- package/esm/ActionRequirement/native/ActionRequirement.test.js +45 -0
- package/esm/ActionRequirement/native/ActionRequirementStyles.js +25 -0
- package/esm/ActionRequirement/native/index.js +6 -0
- package/esm/ActionRequirement/web/ActionRequirement.test.js +36 -0
- package/esm/AutoComplete/web/AutoComplete.test.js +139 -0
- package/esm/Avatar/index.native.js +4 -0
- package/esm/Avatar/native/Avatar.js +96 -0
- package/esm/Avatar/native/Avatar.test.js +46 -0
- package/esm/Avatar/native/AvatarCircle.js +24 -0
- package/esm/Avatar/web/Avatar.test.js +63 -0
- package/esm/Banner/index.native.js +2 -0
- package/esm/Banner/native/Banner.js +128 -0
- package/esm/Banner/native/Banner.test.js +103 -0
- package/esm/Banner/native/index.js +2 -0
- package/esm/Banner/web/Banner.test.js +109 -0
- package/esm/BottomSheet/web/BottomSheet.test.js +48 -0
- package/esm/Box/index.native.js +2 -0
- package/esm/Box/native/Box.js +4 -0
- package/esm/Box/native/Box.test.js +16 -0
- package/esm/Box/native/index.js +2 -0
- package/esm/Box/web/Box.test.js +16 -0
- package/esm/Button/index.native.js +8 -0
- package/esm/Button/native/Button.js +110 -0
- package/esm/Button/native/Button.test.js +475 -0
- package/esm/Button/native/Icon.js +82 -0
- package/esm/Button/native/Link.js +35 -0
- package/esm/Button/native/Text.js +74 -0
- package/esm/Button/native/withTouchable.js +63 -0
- package/esm/Button/web/Button.test.js +772 -0
- package/esm/Card/index.native.js +2 -0
- package/esm/Card/native/Card/Actions.js +12 -0
- package/esm/Card/native/Card/Card.js +92 -0
- package/esm/Card/native/Card/Card.test.js +15 -0
- package/esm/Card/native/Card/Content.js +8 -0
- package/esm/Card/native/Card/Header.js +8 -0
- package/esm/Card/native/Card/index.js +8 -0
- package/esm/Card/native/EventCard/EventCard.js +169 -0
- package/esm/Card/native/EventCard/EventCard.test.js +65 -0
- package/esm/Card/native/EventCard/index.js +2 -0
- package/esm/Card/native/GymCard/CheckIn/Avatar.js +17 -0
- package/esm/Card/native/GymCard/CheckIn/CheckIn.js +66 -0
- package/esm/Card/native/GymCard/CheckIn/CheckIn.test.js +39 -0
- package/esm/Card/native/GymCard/CheckIn/Content.js +11 -0
- package/esm/Card/native/GymCard/CheckIn/Header.js +11 -0
- package/esm/Card/native/GymCard/CheckIn/index.js +2 -0
- package/esm/Card/native/GymCard/index.js +5 -0
- package/esm/Card/native/PlanCard/Actions.js +22 -0
- package/esm/Card/native/PlanCard/Content.js +75 -0
- package/esm/Card/native/PlanCard/List.js +73 -0
- package/esm/Card/native/PlanCard/PlanCard.js +51 -0
- package/esm/Card/native/PlanCard/PlanCard.test.js +84 -0
- package/esm/Card/native/PlanCard/Subtitle.js +15 -0
- package/esm/Card/native/PlanCard/Tag.js +34 -0
- package/esm/Card/native/PlanCard/index.js +15 -0
- package/esm/Card/native/index.js +5 -0
- package/esm/Card/web/Card/Card.test.js +14 -0
- package/esm/Card/web/EventCard/EventCard.test.js +27 -0
- package/esm/Card/web/PlanCard/PlanCard.test.js +94 -0
- package/esm/Checkbox/index.native.js +3 -0
- package/esm/Checkbox/native/Checkbox.js +179 -0
- package/esm/Checkbox/native/Checkbox.test.js +115 -0
- package/esm/Checkbox/native/Switch.js +115 -0
- package/esm/Checkbox/native/Switch.test.js +54 -0
- package/esm/Checkbox/native/index.js +3 -0
- package/esm/Checkbox/web/Checkbox.test.js +153 -0
- package/esm/Checkbox/web/Switch.test.js +56 -0
- package/esm/Chips/index.native.js +2 -0
- package/esm/Chips/native/Chips.js +104 -0
- package/esm/Chips/native/Chips.test.js +143 -0
- package/esm/Chips/native/Counter.js +20 -0
- package/esm/Chips/native/index.js +2 -0
- package/esm/Chips/web/Chips.test.js +128 -0
- package/esm/Datepicker/web/Datepicker.test.js +247 -0
- package/esm/Dialog/web/Dialog.js +13 -8
- package/esm/Dialog/web/Dialog.test.js +62 -0
- package/esm/Divider/index.native.js +2 -0
- package/esm/Divider/native/Divider.js +29 -0
- package/esm/Divider/native/Divider.test.js +29 -0
- package/esm/Divider/native/index.js +2 -0
- package/esm/Divider/web/Divider.test.js +29 -0
- package/esm/Drawer/web/Drawer.js +6 -2
- package/esm/Drawer/web/Drawer.test.js +33 -0
- package/esm/Dropdown/index.native.js +2 -0
- package/esm/Dropdown/native/Backdrop.js +93 -0
- package/esm/Dropdown/native/Backdrop.test.js +26 -0
- package/esm/Dropdown/native/Dropdown.js +142 -0
- package/esm/Dropdown/native/Dropdown.test.js +78 -0
- package/esm/Dropdown/native/Options.android.js +66 -0
- package/esm/Dropdown/native/Options.ios.js +71 -0
- package/esm/Dropdown/native/index.js +2 -0
- package/esm/Dropdown/web/Dropdown.test.js +93 -0
- package/esm/Feedback/web/Feedback.js +17 -11
- package/esm/Feedback/web/Feedback.test.js +94 -0
- package/esm/Grid/web/Col.test.js +48 -0
- package/esm/Grid/web/Container.test.js +14 -0
- package/esm/Grid/web/Hide.test.js +31 -0
- package/esm/Grid/web/Row.test.js +14 -0
- package/esm/Header/web/Header.test.js +38 -0
- package/esm/Heading/web/Heading.test.js +58 -0
- package/esm/Icon/index.native.js +2 -0
- package/esm/Icon/native/Icon.test.js +47 -0
- package/esm/Icon/native/index.js +2 -0
- package/esm/Icon/web/Icon.test.js +47 -0
- package/esm/Input/index.native.js +6 -0
- package/esm/Input/native/Email.js +15 -0
- package/esm/Input/native/Email.test.js +13 -0
- package/esm/Input/native/Helper.js +62 -0
- package/esm/Input/native/Input.js +234 -0
- package/esm/Input/native/Input.test.js +181 -0
- package/esm/Input/native/Number.js +12 -0
- package/esm/Input/native/Number.test.js +13 -0
- package/esm/Input/native/Password.js +112 -0
- package/esm/Input/native/Password.test.js +125 -0
- package/esm/Input/native/Tel.js +14 -0
- package/esm/Input/native/Tel.test.js +13 -0
- package/esm/Input/native/index.js +6 -0
- package/esm/Input/web/Email.test.js +13 -0
- package/esm/Input/web/Input.test.js +145 -0
- package/esm/Input/web/Number.test.js +13 -0
- package/esm/Input/web/Password.test.js +90 -0
- package/esm/Input/web/Phone.test.js +95 -0
- package/esm/Input/web/Tel.test.js +13 -0
- package/esm/List/index.native.js +3 -0
- package/esm/List/native/List.js +22 -0
- package/esm/List/native/List.test.js +106 -0
- package/esm/List/native/ListItem.js +51 -0
- package/esm/List/native/index.js +3 -0
- package/esm/List/web/List.test.js +62 -0
- package/esm/Menu/web/Menu.test.js +115 -0
- package/esm/Popover/web/Popover.test.js +19 -0
- package/esm/Progress/index.native.js +2 -0
- package/esm/Progress/native/Progress.js +103 -0
- package/esm/Progress/native/Progress.test.js +222 -0
- package/esm/Progress/native/index.js +2 -0
- package/esm/Progress/web/Progress.test.js +222 -0
- package/esm/RadioGroup/index.native.js +4 -0
- package/esm/RadioGroup/native/Button/RadioButton.js +64 -0
- package/esm/RadioGroup/native/Button/RadioButton.test.js +96 -0
- package/esm/RadioGroup/native/Radio/Radio.js +88 -0
- package/esm/RadioGroup/native/Radio/Radio.test.js +112 -0
- package/esm/RadioGroup/native/RadioGroup.js +66 -0
- package/esm/RadioGroup/native/RadioGroup.test.js +50 -0
- package/esm/RadioGroup/native/index.js +4 -0
- package/esm/RadioGroup/web/Button/RadioButton.test.js +121 -0
- package/esm/RadioGroup/web/Radio/Radio.test.js +108 -0
- package/esm/RadioGroup/web/RadioGroup.test.js +83 -0
- package/esm/Rating/index.native.js +2 -0
- package/esm/Rating/native/Rating.js +186 -0
- package/esm/Rating/native/Rating.test.js +121 -0
- package/esm/Rating/native/index.js +2 -0
- package/esm/Rating/web/Rating.test.js +184 -0
- package/esm/Result/index.native.js +8 -0
- package/esm/Result/native/Attendances.js +55 -0
- package/esm/Result/native/Details.js +97 -0
- package/esm/Result/native/Rate.js +35 -0
- package/esm/Result/native/Result.js +86 -0
- package/esm/Result/native/Result.test.js +107 -0
- package/esm/Result/native/ResultButton.js +13 -0
- package/esm/Result/native/Tags.js +41 -0
- package/esm/Result/native/TinyTextIcon.js +18 -0
- package/esm/Result/native/index.js +2 -0
- package/esm/Skeleton/index.native.js +2 -0
- package/esm/Skeleton/native/Skeleton.js +94 -0
- package/esm/Skeleton/native/Skeleton.test.js +78 -0
- package/esm/Skeleton/native/index.js +2 -0
- package/esm/Skeleton/web/Skeleton.test.js +77 -0
- package/esm/Slider/index.native.js +2 -0
- package/esm/Slider/native/Label.js +19 -0
- package/esm/Slider/native/Marker.js +68 -0
- package/esm/Slider/native/Slider.js +156 -0
- package/esm/Slider/native/Slider.test.js +122 -0
- package/esm/Slider/native/Step.js +14 -0
- package/esm/Slider/native/Tooltip.js +90 -0
- package/esm/Slider/web/Slider.test.js +86 -0
- package/esm/Snackbar/index.native.js +2 -0
- package/esm/Snackbar/native/Snackbar.js +199 -0
- package/esm/Snackbar/native/Snackbar.test.js +100 -0
- package/esm/Snackbar/native/SnackbarAnimationWrapper.js +124 -0
- package/esm/Snackbar/native/index.js +2 -0
- package/esm/Snackbar/web/Snackbar.test.js +118 -0
- package/esm/Stepper/index.native.js +3 -0
- package/esm/Stepper/native/Dots.js +45 -0
- package/esm/Stepper/native/Line.js +35 -0
- package/esm/Stepper/native/Step.js +19 -0
- package/esm/Stepper/native/Stepper.js +52 -0
- package/esm/Stepper/native/Stepper.test.js +70 -0
- package/esm/Stepper/native/index.js +3 -0
- package/esm/Stepper/web/Stepper.test.js +67 -0
- package/esm/Tag/index.native.js +4 -0
- package/esm/Tag/native/Informative.js +72 -0
- package/esm/Tag/native/Tag.js +75 -0
- package/esm/Tag/native/Tag.test.js +94 -0
- package/esm/Tag/native/index.js +2 -0
- package/esm/Tag/web/Tag.test.js +79 -0
- package/esm/Text/index.native.js +16 -0
- package/esm/Text/native/Text.js +69 -0
- package/esm/Text/native/Text.test.js +149 -0
- package/esm/Text/native/index.js +2 -0
- package/esm/Text/web/Text.test.js +149 -0
- package/esm/TextArea/index.native.js +2 -0
- package/esm/TextArea/native/TextArea.js +59 -0
- package/esm/TextArea/native/TextArea.test.js +11 -0
- package/esm/TextArea/native/index.js +2 -0
- package/esm/TextArea/web/TextArea.test.js +11 -0
- package/esm/Theme/Provider/index.native.js +2 -0
- package/esm/Theme/Provider/native/index.js +2 -0
- package/esm/Theme/Provider/web/FontLoader.test.js +11 -0
- package/esm/Theme/Provider/web/GlobalStyle.test.js +17 -0
- package/esm/Theme/helpers/themeReader/native/native.test.js +53 -0
- package/esm/Theme/helpers/themeReader/web/web.test.js +41 -0
- package/esm/Theme/index.native.js +5 -0
- package/esm/index.native.js +26 -0
- package/esm/shared/index.native.js +2 -0
- package/package.json +2 -2
|
@@ -0,0 +1,12 @@
|
|
|
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;
|
|
@@ -0,0 +1,92 @@
|
|
|
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;
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
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;
|
|
@@ -0,0 +1,8 @@
|
|
|
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;
|
|
@@ -0,0 +1,169 @@
|
|
|
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;
|
|
@@ -0,0 +1,65 @@
|
|
|
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
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
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 };
|
|
@@ -0,0 +1,66 @@
|
|
|
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);
|
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
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;
|
|
@@ -0,0 +1,11 @@
|
|
|
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;
|
|
@@ -0,0 +1,22 @@
|
|
|
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 };
|