@gympass/yoga 7.58.0 → 7.59.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.
@@ -167,11 +167,20 @@ function Datepicker(_ref8) {
167
167
  triggerOnOpen();
168
168
  };
169
169
 
170
+ var checkInputFilled = function checkInputFilled() {
171
+ if (type === 'range') {
172
+ if (!customOnSelectRange) setInputFilled(!!(startDateLocal && endDateLocal));else {
173
+ setInputFilled(startDateLocal && endDateLocal);
174
+ }
175
+ } else {
176
+ setInputFilled(startDate);
177
+ }
178
+ };
179
+
170
180
  (0, _react.useEffect)(function () {
171
- setInputFilled(startDate || endDate);
172
- }, [startDate, endDate]);
181
+ checkInputFilled();
182
+ }, [startDate, startDateLocal, endDateLocal]);
173
183
  (0, _react.useEffect)(function () {
174
- setInputFilled(startDate || endDate);
175
184
  setStartDateLocal(startDate);
176
185
  setEndDateLocal(endDate);
177
186
 
@@ -28,19 +28,23 @@ var StyledDivider = _styledComponents["default"].hr(_templateObject || (_templat
28
28
  });
29
29
 
30
30
  var Divider = /*#__PURE__*/_react["default"].forwardRef(function (_ref2, ref) {
31
- var vertical = _ref2.vertical;
31
+ var vertical = _ref2.vertical,
32
+ style = _ref2.style;
32
33
  return /*#__PURE__*/_react["default"].createElement(StyledDivider, {
33
34
  vertical: vertical,
34
- ref: ref
35
+ ref: ref,
36
+ style: style
35
37
  });
36
38
  });
37
39
 
38
40
  Divider.propTypes = {
39
41
  /** If this value is defined, the divider will be in vertical if the flexDirection is row type */
40
- vertical: _propTypes.bool
42
+ vertical: _propTypes.bool,
43
+ style: (0, _propTypes.shape)({})
41
44
  };
42
45
  Divider.defaultProps = {
43
- vertical: false
46
+ vertical: false,
47
+ style: undefined
44
48
  };
45
49
 
46
50
  var _default = (0, _styledComponents.withTheme)(Divider);
@@ -142,11 +142,20 @@ function Datepicker(_ref8) {
142
142
  triggerOnOpen();
143
143
  };
144
144
 
145
+ var checkInputFilled = function checkInputFilled() {
146
+ if (type === 'range') {
147
+ if (!customOnSelectRange) setInputFilled(!!(startDateLocal && endDateLocal));else {
148
+ setInputFilled(startDateLocal && endDateLocal);
149
+ }
150
+ } else {
151
+ setInputFilled(startDate);
152
+ }
153
+ };
154
+
145
155
  useEffect(function () {
146
- setInputFilled(startDate || endDate);
147
- }, [startDate, endDate]);
156
+ checkInputFilled();
157
+ }, [startDate, startDateLocal, endDateLocal]);
148
158
  useEffect(function () {
149
- setInputFilled(startDate || endDate);
150
159
  setStartDateLocal(startDate);
151
160
  setEndDateLocal(endDate);
152
161
 
@@ -2,7 +2,7 @@ var _templateObject, _templateObject2;
2
2
 
3
3
  function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
4
4
 
5
- import { bool } from 'prop-types';
5
+ import { bool, shape } from 'prop-types';
6
6
  import React from 'react';
7
7
  import styled, { css, withTheme } from 'styled-components';
8
8
  var StyledDivider = styled.hr(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n ", "\n"])), function (_ref) {
@@ -13,17 +13,21 @@ var StyledDivider = styled.hr(_templateObject || (_templateObject = _taggedTempl
13
13
  return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n ", ";\n border-width: 0px;\n border-left-width: ", "px;\n border-bottom-width: ", "px;\n border-color: ", ";\n "])), vertical ? 'height: auto' : 'width: 100%', vertical ? borders.small : 0, vertical ? 0 : borders.small, colors.text.disabled);
14
14
  });
15
15
  var Divider = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
16
- var vertical = _ref2.vertical;
16
+ var vertical = _ref2.vertical,
17
+ style = _ref2.style;
17
18
  return /*#__PURE__*/React.createElement(StyledDivider, {
18
19
  vertical: vertical,
19
- ref: ref
20
+ ref: ref,
21
+ style: style
20
22
  });
21
23
  });
22
24
  Divider.propTypes = {
23
25
  /** If this value is defined, the divider will be in vertical if the flexDirection is row type */
24
- vertical: bool
26
+ vertical: bool,
27
+ style: shape({})
25
28
  };
26
29
  Divider.defaultProps = {
27
- vertical: false
30
+ vertical: false,
31
+ style: undefined
28
32
  };
29
33
  export default withTheme(Divider);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gympass/yoga",
3
- "version": "7.58.0",
3
+ "version": "7.59.0",
4
4
  "description": "Gympass component library",
5
5
  "main": "./cjs",
6
6
  "sideEffects": false,
@@ -52,7 +52,7 @@
52
52
  "react": ">=16",
53
53
  "styled-components": "^4.4.0"
54
54
  },
55
- "gitHead": "c95fc2a84c56128169a139dfb9adb0d72380990b",
55
+ "gitHead": "cd343325b87264d19f91c3bb3663ec9b00220b6e",
56
56
  "module": "./esm",
57
57
  "private": false,
58
58
  "react-native": "./cjs/index.native.js"