@decisiv/ui-components 2.0.1-alpha.150 → 2.0.1-alpha.152

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.
@@ -20,9 +20,9 @@ schema.makePropTypes = function () {
20
20
  icon: _reactDesc.PropTypes.element.description('An icon to be rendered on the left side of the input.'),
21
21
  id: _reactDesc.PropTypes.string.description('A unique ID for the input.'),
22
22
  inputContainerRef: _reactDesc.PropTypes.oneOfType([// Either a function
23
- _reactDesc.PropTypes.func, // Or the instance of a DOM native element (see the note about SSR)
23
+ _reactDesc.PropTypes.func, // Or the instance of a DOM native element (current will be an instance of HTMLDivElement)
24
24
  _reactDesc.PropTypes.shape({
25
- current: _reactDesc.PropTypes.instanceOf(HTMLDivElement)
25
+ current: _reactDesc.PropTypes.any
26
26
  })]).description('A reference to the container component for the input field.'),
27
27
  label: _reactDesc.PropTypes.string.description('A label for the input field.').isRequired,
28
28
  labelId: _reactDesc.PropTypes.string.description("A unique ID for the input's label. This will be used in some ARIA attributes as well."),
@@ -37,7 +37,7 @@ schema.propTypes = _objectSpread({}, (0, _omit.default)(_schema.default.makeProp
37
37
  value: _reactDesc.PropTypes.oneOfType([_reactDesc.PropTypes.number, _reactDesc.PropTypes.string]).description('The value for an option in the dropdown list.')
38
38
  })).description('The array of item data that will be rendered').isRequired,
39
39
  listRef: _reactDesc.PropTypes.oneOfType([_reactDesc.PropTypes.func, _reactDesc.PropTypes.shape({
40
- current: _reactDesc.PropTypes.instanceOf(Element)
40
+ current: _reactDesc.PropTypes.any
41
41
  })]).description('A ref for the list container.'),
42
42
  name: _reactDesc.PropTypes.string.description("The input's name, to identify the input in the data in a form.").isRequired,
43
43
  onChange: _reactDesc.PropTypes.func.description('Change event handler, called with an array of the selected item IDs.'),
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/JumpTo/utils.ts"],"names":[],"mappings":"AAUA,wBAAgB,cAAc,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAExD;AAqBD,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,MAAM,EAChB,YAAY,CAAC,EAAE,MAAM,EACrB,UAAU,CAAC,EAAE,MAAM,GAClB,IAAI,CAaN"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/JumpTo/utils.ts"],"names":[],"mappings":"AAUA,wBAAgB,cAAc,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAExD;AAmBD,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,MAAM,EAChB,YAAY,CAAC,EAAE,MAAM,EACrB,UAAU,CAAC,EAAE,MAAM,GAClB,IAAI,CAaN"}
@@ -22,16 +22,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
22
22
  function getFirstNumber(values) {
23
23
  return values.find(_isNumber.default) || 0;
24
24
  }
25
- /**
26
- * Determine whether the current browser supports smooth scrolling.
27
- */
28
-
29
-
30
- var supportsNativeSmoothScroll = ('scrollBehavior' in document.documentElement.style);
31
25
 
32
26
  function scrollToElement(element, offset) {
33
27
  var targetOffset = element.getBoundingClientRect().top + window.pageYOffset;
34
- var scrollTargetY = targetOffset - offset; // in our testing supportsNativeSmoothScroll will always be true
28
+ var scrollTargetY = targetOffset - offset; // does the current browser support smooth scrolling?
29
+
30
+ var supportsNativeSmoothScroll = ('scrollBehavior' in document.documentElement.style); // in our testing supportsNativeSmoothScroll will always be true
35
31
 
36
32
  /* istanbul ignore else */
37
33
 
@@ -254,7 +254,7 @@ Table.propTypes = _objectSpread({}, _schema.default.propTypes, {
254
254
  footer: _propTypes2.default.elementType,
255
255
  getRowKey: (0, _propTypes.requireIf)(_propTypes2.default.func, function (_ref3) {
256
256
  var data = _ref3.data;
257
- return !((0, _get.default)(data, '0.key') || (0, _get.default)(data, '0.id'));
257
+ return !!data && data.length > 0 && !((0, _get.default)(data, '0.key') || (0, _get.default)(data, '0.id'));
258
258
  }),
259
259
  height: (0, _propTypes.requireIf)(_propTypes2.default.string, function (_ref4) {
260
260
  var scroll = _ref4.scroll,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decisiv/ui-components",
3
- "version": "2.0.1-alpha.150+c4256d9",
3
+ "version": "2.0.1-alpha.152+c1ba3e1",
4
4
  "description": "Decisiv's design system React components",
5
5
  "author": "Decisiv UI Development Team",
6
6
  "license": "MIT",
@@ -41,7 +41,7 @@
41
41
  "devDependencies": {
42
42
  "@babel/plugin-transform-runtime": "^7.5.5",
43
43
  "@decisiv/babel-plugin-styled-components-references": "^1.3.7",
44
- "@decisiv/styled-components-static-styles": "^1.4.2",
44
+ "@decisiv/styled-components-static-styles": "^1.4.3-alpha.160+c1ba3e1",
45
45
  "@testing-library/jest-dom": "^4.2.0",
46
46
  "@testing-library/react": "^8.0.1",
47
47
  "@testing-library/react-hooks": "^3.2.1",
@@ -71,5 +71,5 @@
71
71
  "access": "public"
72
72
  },
73
73
  "private": false,
74
- "gitHead": "c4256d982a897c2f5877b05d6ed5c9863a64ef05"
74
+ "gitHead": "c1ba3e1bf8b1a654f74738d95e87afa39d282e46"
75
75
  }