@hig/skeleton-item
Advanced tools
Comparing version 1.2.1 to 1.2.2
import { css, cx } from 'emotion'; | ||
import PropTypes from 'prop-types'; | ||
import React from 'react'; | ||
import React, { Component } from 'react'; | ||
import { ThemeContext } from '@hig/theme-context'; | ||
@@ -48,32 +48,54 @@ | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | ||
var SkeletonItem = function SkeletonItem(props) { | ||
var height = props.height, | ||
marginBottom = props.marginBottom, | ||
maxWidth = props.maxWidth, | ||
customStylesheet = props.stylesheet, | ||
otherProps = _objectWithoutProperties(props, ["height", "marginBottom", "maxWidth", "stylesheet"]); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
var className = otherProps.className; | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
return React.createElement( | ||
ThemeContext.Consumer, | ||
null, | ||
function (_ref) { | ||
var resolvedRoles = _ref.resolvedRoles; | ||
var SkeletonItem = function (_Component) { | ||
_inherits(SkeletonItem, _Component); | ||
var styles = stylesheet({ | ||
maxWidth: maxWidth, | ||
marginBottom: marginBottom, | ||
height: height, | ||
stylesheet: customStylesheet | ||
}, resolvedRoles); | ||
return React.createElement("div", { className: cx(css(styles.skeletonItem), className) }); | ||
function SkeletonItem() { | ||
_classCallCheck(this, SkeletonItem); | ||
return _possibleConstructorReturn(this, (SkeletonItem.__proto__ || Object.getPrototypeOf(SkeletonItem)).apply(this, arguments)); | ||
} | ||
_createClass(SkeletonItem, [{ | ||
key: "render", | ||
value: function render() { | ||
var _props = this.props, | ||
height = _props.height, | ||
marginBottom = _props.marginBottom, | ||
maxWidth = _props.maxWidth, | ||
customStylesheet = _props.stylesheet, | ||
otherProps = _objectWithoutProperties(_props, ["height", "marginBottom", "maxWidth", "stylesheet"]); | ||
var className = otherProps.className; | ||
return React.createElement( | ||
ThemeContext.Consumer, | ||
null, | ||
function (_ref) { | ||
var resolvedRoles = _ref.resolvedRoles; | ||
var styles = stylesheet({ | ||
maxWidth: maxWidth, | ||
marginBottom: marginBottom, | ||
height: height, | ||
stylesheet: customStylesheet | ||
}, resolvedRoles); | ||
return React.createElement("div", { className: cx(css(styles.skeletonItem), className) }); | ||
} | ||
); | ||
} | ||
); | ||
}; | ||
}]); | ||
SkeletonItem.displayName = "SkeletonItem"; | ||
return SkeletonItem; | ||
}(Component); | ||
@@ -80,0 +102,0 @@ SkeletonItem.propTypes = { |
@@ -9,3 +9,4 @@ 'use strict'; | ||
var PropTypes = _interopDefault(require('prop-types')); | ||
var React = _interopDefault(require('react')); | ||
var React = require('react'); | ||
var React__default = _interopDefault(React); | ||
var themeContext = require('@hig/theme-context'); | ||
@@ -55,32 +56,54 @@ | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | ||
var SkeletonItem = function SkeletonItem(props) { | ||
var height = props.height, | ||
marginBottom = props.marginBottom, | ||
maxWidth = props.maxWidth, | ||
customStylesheet = props.stylesheet, | ||
otherProps = _objectWithoutProperties(props, ["height", "marginBottom", "maxWidth", "stylesheet"]); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
var className = otherProps.className; | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
return React.createElement( | ||
themeContext.ThemeContext.Consumer, | ||
null, | ||
function (_ref) { | ||
var resolvedRoles = _ref.resolvedRoles; | ||
var SkeletonItem = function (_Component) { | ||
_inherits(SkeletonItem, _Component); | ||
var styles = stylesheet({ | ||
maxWidth: maxWidth, | ||
marginBottom: marginBottom, | ||
height: height, | ||
stylesheet: customStylesheet | ||
}, resolvedRoles); | ||
return React.createElement("div", { className: emotion.cx(emotion.css(styles.skeletonItem), className) }); | ||
function SkeletonItem() { | ||
_classCallCheck(this, SkeletonItem); | ||
return _possibleConstructorReturn(this, (SkeletonItem.__proto__ || Object.getPrototypeOf(SkeletonItem)).apply(this, arguments)); | ||
} | ||
_createClass(SkeletonItem, [{ | ||
key: "render", | ||
value: function render() { | ||
var _props = this.props, | ||
height = _props.height, | ||
marginBottom = _props.marginBottom, | ||
maxWidth = _props.maxWidth, | ||
customStylesheet = _props.stylesheet, | ||
otherProps = _objectWithoutProperties(_props, ["height", "marginBottom", "maxWidth", "stylesheet"]); | ||
var className = otherProps.className; | ||
return React__default.createElement( | ||
themeContext.ThemeContext.Consumer, | ||
null, | ||
function (_ref) { | ||
var resolvedRoles = _ref.resolvedRoles; | ||
var styles = stylesheet({ | ||
maxWidth: maxWidth, | ||
marginBottom: marginBottom, | ||
height: height, | ||
stylesheet: customStylesheet | ||
}, resolvedRoles); | ||
return React__default.createElement("div", { className: emotion.cx(emotion.css(styles.skeletonItem), className) }); | ||
} | ||
); | ||
} | ||
); | ||
}; | ||
}]); | ||
SkeletonItem.displayName = "SkeletonItem"; | ||
return SkeletonItem; | ||
}(React.Component); | ||
@@ -87,0 +110,0 @@ SkeletonItem.propTypes = { |
@@ -0,1 +1,13 @@ | ||
# [@hig/skeleton-item-v1.2.2](https://github.com/Autodesk/hig/compare/@hig/skeleton-item@1.2.1...@hig/skeleton-item@1.2.2) (2022-01-12) | ||
### Bug Fixes | ||
* Forcing semantic release by editing readmes ([d39b61f](https://github.com/Autodesk/hig/commit/d39b61f)) | ||
### Reverts | ||
* "Revert "Revert "feat : Migrate all repository to React v17.0 """ ([bf78986](https://github.com/Autodesk/hig/commit/bf78986)) | ||
# [@hig/skeleton-item-v1.2.1](https://github.com/Autodesk/hig/compare/@hig/skeleton-item@1.2.0...@hig/skeleton-item@1.2.1) (2022-01-12) | ||
@@ -2,0 +14,0 @@ |
{ | ||
"name": "@hig/skeleton-item", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "HIG SkeletonItem component", | ||
@@ -34,3 +34,3 @@ "author": "Autodesk Inc.", | ||
"@hig/theme-data": "^2.22.0", | ||
"react": "^17.0.0" | ||
"react": "^15.4.1 || ^16.3.2" | ||
}, | ||
@@ -37,0 +37,0 @@ "scripts": { |
@@ -5,2 +5,3 @@ # Skeleton Item | ||
## Getting started | ||
@@ -7,0 +8,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17758
262
47