@lideralia/alife-uikit 1.1.378 → 1.1.381

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.
@@ -41,25 +41,21 @@ var Switch = function Switch(props) {
41
41
  type: "checkbox",
42
42
  sizeInput: sizeInput,
43
43
  placeholder: placeholderMessage,
44
- id: id
44
+ id: id,
45
+ onClick: function onClick() {
46
+ setIsChecked(!isChecked);
47
+ if (action) action(!isChecked);
48
+ }
45
49
  }, props)), _react.default.createElement(_styles.SwitchLabelStyled, {
46
50
  htmlFor: id,
47
51
  as: "label",
48
52
  isChecked: isChecked,
49
53
  sizeInput: sizeInput,
50
54
  disabled: disabled,
51
- themeColor: themeColor,
52
- onClick: function onClick() {
53
- setIsChecked(!isChecked);
54
- if (action) action(!isChecked);
55
- }
55
+ themeColor: themeColor
56
56
  }, _react.default.createElement(_styles.SwitchLabelBallStyled, {
57
57
  isChecked: isChecked,
58
- sizeInput: sizeInput,
59
- onClick: function onClick() {
60
- setIsChecked(!isChecked);
61
- if (action) action(!isChecked);
62
- }
58
+ sizeInput: sizeInput
63
59
  })));
64
60
  };
65
61
 
@@ -13,6 +13,8 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
13
13
 
14
14
  var _react = _interopRequireDefault(require("react"));
15
15
 
16
+ var _Icon = require("../../atoms/Icon");
17
+
16
18
  var _Card = require("../../atoms/Card");
17
19
 
18
20
  var _Layout = require("../../atoms/Layout");
@@ -23,23 +25,27 @@ var _Typography = require("../../atoms/Typography");
23
25
 
24
26
  var _Button = require("../../atoms/Button");
25
27
 
26
- var _excluded = ["titleLabel", "descriptionLabel", "customColor", "customTextColor", "actionLabel", "actionButton", "eventFlowerAction"];
27
-
28
- var CardFlower = function CardFlower(_ref) {
29
- var titleLabel = _ref.titleLabel,
30
- descriptionLabel = _ref.descriptionLabel,
31
- customColor = _ref.customColor,
32
- customTextColor = _ref.customTextColor,
33
- actionLabel = _ref.actionLabel,
34
- actionButton = _ref.actionButton,
35
- eventFlowerAction = _ref.eventFlowerAction,
36
- props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
28
+ var _Icons = require("../../atoms/Icons");
29
+
30
+ var _excluded = ["titleLabel", "descriptionLabel", "customColor", "customTextColor", "actionLabel", "actionButton", "eventFlowerAction", "hasNotFinished", "timeLeft"];
31
+
32
+ var CardFlower = function CardFlower(props) {
33
+ var titleLabel = props.titleLabel,
34
+ descriptionLabel = props.descriptionLabel,
35
+ customColor = props.customColor,
36
+ customTextColor = props.customTextColor,
37
+ actionLabel = props.actionLabel,
38
+ actionButton = props.actionButton,
39
+ eventFlowerAction = props.eventFlowerAction,
40
+ hasNotFinished = props.hasNotFinished,
41
+ timeLeft = props.timeLeft,
42
+ rest = (0, _objectWithoutProperties2.default)(props, _excluded);
37
43
  return _react.default.createElement(_Card.Card, (0, _extends2.default)({
38
44
  maxWidth: "339px",
39
45
  minWidth: "290px",
40
46
  position: "relative",
41
47
  width: "100%"
42
- }, props), _react.default.createElement(_Layout.Flex, {
48
+ }, rest), _react.default.createElement(_Layout.Flex, {
43
49
  padding: 3,
44
50
  width: "100%"
45
51
  }, _react.default.createElement(_Layout.Grid, {
@@ -87,11 +93,38 @@ var CardFlower = function CardFlower(_ref) {
87
93
  backgroundColor: customColor,
88
94
  colorType: customColor || 'orange',
89
95
  color: customTextColor
90
- }, actionLabel)))));
96
+ }, actionLabel)))), hasNotFinished && timeLeft && _react.default.createElement(CardFlower.HasTimeBeforeClose, props));
91
97
  };
92
98
 
93
99
  exports.CardFlower = CardFlower;
100
+
101
+ CardFlower.HasTimeBeforeClose = function (_ref) {
102
+ var timeLeft = _ref.timeLeft;
103
+ return _react.default.createElement(_react.default.Fragment, null, _react.default.createElement(_Layout.Flex, {
104
+ flexDirection: "column",
105
+ style: {
106
+ borderRadius: '0px 0px 18px 18px',
107
+ backgroundColor: 'rgba(242, 180, 64, 0.12)'
108
+ }
109
+ }, _react.default.createElement(_Layout.Flex, {
110
+ width: "100%",
111
+ padding: 3,
112
+ borderTopColor: "black12",
113
+ borderTopStyle: "solid",
114
+ borderTopWidth: "0px"
115
+ }, _react.default.createElement(_Icon.Icon, {
116
+ color: "grey",
117
+ sizeIcon: "display20"
118
+ }, _react.default.createElement(_Icons.IconClock, null)), _react.default.createElement(_Typography.Text, {
119
+ color: "black84",
120
+ fontWeight: "bold",
121
+ sizeText: "display17",
122
+ paddingLeft: 2
123
+ }, timeLeft))));
124
+ };
125
+
94
126
  CardFlower.defaultProps = {
95
127
  customTextColor: '',
96
- customColor: ''
128
+ customColor: '',
129
+ hasNotFinished: true
97
130
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lideralia/alife-uikit",
3
- "version": "1.1.378",
3
+ "version": "1.1.381",
4
4
  "description": "Librería y documentación de componentes, basada en el Design System de Alife.",
5
5
  "homepage": "https://github.com/lideralia/alife-frontend-components#readme",
6
6
  "bugs": {