@commercetools-uikit/collapsible-motion 19.25.1 → 20.0.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.
@@ -15,7 +15,6 @@ var _extends = require('@babel/runtime-corejs3/helpers/extends');
15
15
  var _objectWithoutProperties = require('@babel/runtime-corejs3/helpers/objectWithoutProperties');
16
16
  var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
17
17
  var _slicedToArray = require('@babel/runtime-corejs3/helpers/slicedToArray');
18
- var _pt = require('prop-types');
19
18
  var react$1 = require('react');
20
19
  var utils = require('@commercetools-uikit/utils');
21
20
  var react = require('@emotion/react');
@@ -33,7 +32,6 @@ var _forEachInstanceProperty__default = /*#__PURE__*/_interopDefault(_forEachIns
33
32
  var _Object$getOwnPropertyDescriptors__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertyDescriptors);
34
33
  var _Object$defineProperties__default = /*#__PURE__*/_interopDefault(_Object$defineProperties);
35
34
  var _Object$defineProperty__default = /*#__PURE__*/_interopDefault(_Object$defineProperty);
36
- var _pt__default = /*#__PURE__*/_interopDefault(_pt);
37
35
  var isNil__default = /*#__PURE__*/_interopDefault(isNil);
38
36
 
39
37
  const _excluded = ["minHeight"];
@@ -58,7 +56,7 @@ const createClosingAnimation = function (height) {
58
56
  };
59
57
  const useToggleAnimation = function (isOpen, toggle) {
60
58
  let minHeight = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
61
- const nodeRef = react$1.useRef();
59
+ const nodeRef = react$1.useRef(null);
62
60
  const animationRef = react$1.useRef(null);
63
61
  const prevIsOpen = hooks.usePrevious(isOpen);
64
62
  react$1.useEffect(() => {
@@ -118,13 +116,6 @@ const ControlledCollapsibleMotion = props => {
118
116
  }
119
117
  });
120
118
  };
121
- ControlledCollapsibleMotion.propTypes = process.env.NODE_ENV !== "production" ? {
122
- children: _pt__default["default"].func.isRequired,
123
- isClosed: _pt__default["default"].bool,
124
- onToggle: _pt__default["default"].func,
125
- minHeight: _pt__default["default"].number,
126
- isDefaultClosed: _pt__default["default"].bool
127
- } : {};
128
119
  ControlledCollapsibleMotion.displayName = 'ControlledCollapsibleMotion';
129
120
  const UncontrolledCollapsibleMotion = _ref2 => {
130
121
  let _ref2$minHeight = _ref2.minHeight,
@@ -164,13 +155,6 @@ const UncontrolledCollapsibleMotion = _ref2 => {
164
155
  }
165
156
  });
166
157
  };
167
- UncontrolledCollapsibleMotion.propTypes = process.env.NODE_ENV !== "production" ? {
168
- children: _pt__default["default"].func.isRequired,
169
- isClosed: _pt__default["default"].bool,
170
- onToggle: _pt__default["default"].func,
171
- minHeight: _pt__default["default"].number,
172
- isDefaultClosed: _pt__default["default"].bool
173
- } : {};
174
158
  UncontrolledCollapsibleMotion.displayName = 'UncontrolledCollapsibleMotion';
175
159
  const CollapsibleMotion = _ref4 => {
176
160
  let props = _extends({}, (_objectDestructuringEmpty(_ref4), _ref4));
@@ -180,18 +164,11 @@ const CollapsibleMotion = _ref4 => {
180
164
  }
181
165
  return jsxRuntime.jsx(UncontrolledCollapsibleMotion, _objectSpread({}, props));
182
166
  };
183
- CollapsibleMotion.propTypes = process.env.NODE_ENV !== "production" ? {
184
- children: _pt__default["default"].func.isRequired,
185
- isClosed: _pt__default["default"].bool,
186
- onToggle: _pt__default["default"].func,
187
- minHeight: _pt__default["default"].number,
188
- isDefaultClosed: _pt__default["default"].bool
189
- } : {};
190
167
  CollapsibleMotion.displayName = 'CollapsibleMotion';
191
168
  var CollapsibleMotion$1 = CollapsibleMotion;
192
169
 
193
170
  // NOTE: This string will be replaced on build time with the package version.
194
- var version = "19.25.1";
171
+ var version = "20.0.0";
195
172
 
196
173
  exports["default"] = CollapsibleMotion$1;
197
174
  exports.version = version;
@@ -15,7 +15,6 @@ var _extends = require('@babel/runtime-corejs3/helpers/extends');
15
15
  var _objectWithoutProperties = require('@babel/runtime-corejs3/helpers/objectWithoutProperties');
16
16
  var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
17
17
  var _slicedToArray = require('@babel/runtime-corejs3/helpers/slicedToArray');
18
- require('prop-types');
19
18
  var react$1 = require('react');
20
19
  require('@commercetools-uikit/utils');
21
20
  var react = require('@emotion/react');
@@ -57,7 +56,7 @@ const createClosingAnimation = function (height) {
57
56
  };
58
57
  const useToggleAnimation = function (isOpen, toggle) {
59
58
  let minHeight = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
60
- const nodeRef = react$1.useRef();
59
+ const nodeRef = react$1.useRef(null);
61
60
  const animationRef = react$1.useRef(null);
62
61
  const prevIsOpen = hooks.usePrevious(isOpen);
63
62
  react$1.useEffect(() => {
@@ -115,7 +114,6 @@ const ControlledCollapsibleMotion = props => {
115
114
  }
116
115
  });
117
116
  };
118
- ControlledCollapsibleMotion.propTypes = {};
119
117
  ControlledCollapsibleMotion.displayName = 'ControlledCollapsibleMotion';
120
118
  const UncontrolledCollapsibleMotion = _ref2 => {
121
119
  let _ref2$minHeight = _ref2.minHeight,
@@ -155,7 +153,6 @@ const UncontrolledCollapsibleMotion = _ref2 => {
155
153
  }
156
154
  });
157
155
  };
158
- UncontrolledCollapsibleMotion.propTypes = {};
159
156
  UncontrolledCollapsibleMotion.displayName = 'UncontrolledCollapsibleMotion';
160
157
  const CollapsibleMotion = _ref4 => {
161
158
  let props = _extends({}, (_objectDestructuringEmpty(_ref4), _ref4));
@@ -165,12 +162,11 @@ const CollapsibleMotion = _ref4 => {
165
162
  }
166
163
  return jsxRuntime.jsx(UncontrolledCollapsibleMotion, _objectSpread({}, props));
167
164
  };
168
- CollapsibleMotion.propTypes = {};
169
165
  CollapsibleMotion.displayName = 'CollapsibleMotion';
170
166
  var CollapsibleMotion$1 = CollapsibleMotion;
171
167
 
172
168
  // NOTE: This string will be replaced on build time with the package version.
173
- var version = "19.25.1";
169
+ var version = "20.0.0";
174
170
 
175
171
  exports["default"] = CollapsibleMotion$1;
176
172
  exports.version = version;
@@ -11,7 +11,6 @@ import _extends from '@babel/runtime-corejs3/helpers/esm/extends';
11
11
  import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/esm/objectWithoutProperties';
12
12
  import _defineProperty from '@babel/runtime-corejs3/helpers/esm/defineProperty';
13
13
  import _slicedToArray from '@babel/runtime-corejs3/helpers/esm/slicedToArray';
14
- import _pt from 'prop-types';
15
14
  import { useRef, useEffect, useCallback } from 'react';
16
15
  import { warning } from '@commercetools-uikit/utils';
17
16
  import { ClassNames, keyframes } from '@emotion/react';
@@ -41,7 +40,7 @@ const createClosingAnimation = function (height) {
41
40
  };
42
41
  const useToggleAnimation = function (isOpen, toggle) {
43
42
  let minHeight = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
44
- const nodeRef = useRef();
43
+ const nodeRef = useRef(null);
45
44
  const animationRef = useRef(null);
46
45
  const prevIsOpen = usePrevious(isOpen);
47
46
  useEffect(() => {
@@ -101,13 +100,6 @@ const ControlledCollapsibleMotion = props => {
101
100
  }
102
101
  });
103
102
  };
104
- ControlledCollapsibleMotion.propTypes = process.env.NODE_ENV !== "production" ? {
105
- children: _pt.func.isRequired,
106
- isClosed: _pt.bool,
107
- onToggle: _pt.func,
108
- minHeight: _pt.number,
109
- isDefaultClosed: _pt.bool
110
- } : {};
111
103
  ControlledCollapsibleMotion.displayName = 'ControlledCollapsibleMotion';
112
104
  const UncontrolledCollapsibleMotion = _ref2 => {
113
105
  let _ref2$minHeight = _ref2.minHeight,
@@ -147,13 +139,6 @@ const UncontrolledCollapsibleMotion = _ref2 => {
147
139
  }
148
140
  });
149
141
  };
150
- UncontrolledCollapsibleMotion.propTypes = process.env.NODE_ENV !== "production" ? {
151
- children: _pt.func.isRequired,
152
- isClosed: _pt.bool,
153
- onToggle: _pt.func,
154
- minHeight: _pt.number,
155
- isDefaultClosed: _pt.bool
156
- } : {};
157
142
  UncontrolledCollapsibleMotion.displayName = 'UncontrolledCollapsibleMotion';
158
143
  const CollapsibleMotion = _ref4 => {
159
144
  let props = _extends({}, (_objectDestructuringEmpty(_ref4), _ref4));
@@ -163,17 +148,10 @@ const CollapsibleMotion = _ref4 => {
163
148
  }
164
149
  return jsx(UncontrolledCollapsibleMotion, _objectSpread({}, props));
165
150
  };
166
- CollapsibleMotion.propTypes = process.env.NODE_ENV !== "production" ? {
167
- children: _pt.func.isRequired,
168
- isClosed: _pt.bool,
169
- onToggle: _pt.func,
170
- minHeight: _pt.number,
171
- isDefaultClosed: _pt.bool
172
- } : {};
173
151
  CollapsibleMotion.displayName = 'CollapsibleMotion';
174
152
  var CollapsibleMotion$1 = CollapsibleMotion;
175
153
 
176
154
  // NOTE: This string will be replaced on build time with the package version.
177
- var version = "19.25.1";
155
+ var version = "20.0.0";
178
156
 
179
157
  export { CollapsibleMotion$1 as default, version };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@commercetools-uikit/collapsible-motion",
3
3
  "description": "A component which allows building collapsible elements with an arbitrary height.",
4
- "version": "19.25.1",
4
+ "version": "20.0.0",
5
5
  "bugs": "https://github.com/commercetools/ui-kit/issues",
6
6
  "repository": {
7
7
  "type": "git",
@@ -21,17 +21,16 @@
21
21
  "dependencies": {
22
22
  "@babel/runtime": "^7.20.13",
23
23
  "@babel/runtime-corejs3": "^7.20.13",
24
- "@commercetools-uikit/hooks": "19.25.1",
25
- "@commercetools-uikit/utils": "19.25.1",
24
+ "@commercetools-uikit/hooks": "20.0.0",
25
+ "@commercetools-uikit/utils": "20.0.0",
26
26
  "@emotion/react": "^11.10.5",
27
27
  "@emotion/styled": "^11.10.5",
28
- "lodash": "4.17.21",
29
- "prop-types": "15.8.1"
28
+ "lodash": "4.17.21"
30
29
  },
31
30
  "devDependencies": {
32
- "react": "17.0.2"
31
+ "react": "19.0.0"
33
32
  },
34
33
  "peerDependencies": {
35
- "react": "17.x"
34
+ "react": "19.x"
36
35
  }
37
36
  }