@infotech/uikit-accordeon
Advanced tools
Comparing version 0.2.0-beta.1 to 0.2.0-beta.2
@@ -23,10 +23,10 @@ "use strict"; | ||
var styles = { | ||
"Accordeon": "uikit_7dc6b197_components_accordeon__Accordeon_62262baf", | ||
"Header": "uikit_7dc6b197_components_accordeon__Header_62262baf", | ||
"Sign": "uikit_7dc6b197_components_accordeon__Sign_62262baf", | ||
"Label": "uikit_7dc6b197_components_accordeon__Label_62262baf", | ||
"Badge": "uikit_7dc6b197_components_accordeon__Badge_62262baf", | ||
"Body": "uikit_7dc6b197_components_accordeon__Body_62262baf", | ||
"Light": "uikit_7dc6b197_components_accordeon__Light_62262baf", | ||
"AccordeonGroup": "uikit_7dc6b197_components_accordeon__AccordeonGroup_62262baf" | ||
"Accordeon": "uikit_4416ce74_components_accordeon__Accordeon_62262baf", | ||
"Header": "uikit_4416ce74_components_accordeon__Header_62262baf", | ||
"Sign": "uikit_4416ce74_components_accordeon__Sign_62262baf", | ||
"Label": "uikit_4416ce74_components_accordeon__Label_62262baf", | ||
"Badge": "uikit_4416ce74_components_accordeon__Badge_62262baf", | ||
"Body": "uikit_4416ce74_components_accordeon__Body_62262baf", | ||
"Light": "uikit_4416ce74_components_accordeon__Light_62262baf", | ||
"AccordeonGroup": "uikit_4416ce74_components_accordeon__AccordeonGroup_62262baf" | ||
}; // @related-file ./styles.css | ||
@@ -37,17 +37,17 @@ | ||
return _react.default.createElement("div", { | ||
return /*#__PURE__*/_react.default.createElement("div", { | ||
className: (0, _classnames.default)(styles.Accordeon, (_cn = {}, _defineProperty(_cn, styles.Light, !!props.light), _defineProperty(_cn, styles.WithoutMargins, !!props.withoutMargins), _cn)) | ||
}, _react.default.createElement("div", { | ||
}, /*#__PURE__*/_react.default.createElement("div", { | ||
className: styles.Header, | ||
onClick: props.onClick | ||
}, _react.default.createElement("div", { | ||
}, /*#__PURE__*/_react.default.createElement("div", { | ||
className: styles.Label | ||
}, props.label, typeof props.badgeValue !== "undefined" && _react.default.createElement("div", { | ||
}, props.label, typeof props.badgeValue !== "undefined" && /*#__PURE__*/_react.default.createElement("div", { | ||
className: styles.Badge | ||
}, _react.default.createElement(_uikitBadges.default, { | ||
}, /*#__PURE__*/_react.default.createElement(_uikitBadges.default, { | ||
value: props.badgeValue, | ||
type: props.badgeType || "default" | ||
}))), _react.default.createElement("div", { | ||
}))), /*#__PURE__*/_react.default.createElement("div", { | ||
className: styles.Sign | ||
}, props.isOpen ? _react.default.createElement(_uikitIcons.DropdownUpIcon, null) : _react.default.createElement(_uikitIcons.DropdownDownIcon, null))), props.isOpen && _react.default.createElement("div", { | ||
}, props.isOpen ? /*#__PURE__*/_react.default.createElement(_uikitIcons.DropdownUpIcon, null) : /*#__PURE__*/_react.default.createElement(_uikitIcons.DropdownDownIcon, null))), props.isOpen && /*#__PURE__*/_react.default.createElement("div", { | ||
className: styles.Body | ||
@@ -54,0 +54,0 @@ }, props.children)); |
@@ -38,18 +38,16 @@ "use strict"; | ||
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } | ||
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } | ||
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } | ||
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } | ||
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } | ||
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } | ||
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } | ||
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } | ||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } | ||
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } | ||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } | ||
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); } } | ||
@@ -63,13 +61,23 @@ | ||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } | ||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } | ||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } | ||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
var styles = { | ||
"Accordeon": "uikit_7dc6b197_components_accordeon__Accordeon_62262baf", | ||
"Header": "uikit_7dc6b197_components_accordeon__Header_62262baf", | ||
"Sign": "uikit_7dc6b197_components_accordeon__Sign_62262baf", | ||
"Label": "uikit_7dc6b197_components_accordeon__Label_62262baf", | ||
"Badge": "uikit_7dc6b197_components_accordeon__Badge_62262baf", | ||
"Body": "uikit_7dc6b197_components_accordeon__Body_62262baf", | ||
"Light": "uikit_7dc6b197_components_accordeon__Light_62262baf", | ||
"AccordeonGroup": "uikit_7dc6b197_components_accordeon__AccordeonGroup_62262baf" | ||
"Accordeon": "uikit_4416ce74_components_accordeon__Accordeon_62262baf", | ||
"Header": "uikit_4416ce74_components_accordeon__Header_62262baf", | ||
"Sign": "uikit_4416ce74_components_accordeon__Sign_62262baf", | ||
"Label": "uikit_4416ce74_components_accordeon__Label_62262baf", | ||
"Badge": "uikit_4416ce74_components_accordeon__Badge_62262baf", | ||
"Body": "uikit_4416ce74_components_accordeon__Body_62262baf", | ||
"Light": "uikit_4416ce74_components_accordeon__Light_62262baf", | ||
"AccordeonGroup": "uikit_4416ce74_components_accordeon__AccordeonGroup_62262baf" | ||
}; // @related-file ./styles.css | ||
@@ -80,2 +88,4 @@ | ||
var _super = _createSuper(AccordeonGroup); | ||
_createClass(AccordeonGroup, null, [{ | ||
@@ -97,3 +107,3 @@ key: "getDerivedStateFromProps", | ||
_this = _possibleConstructorReturn(this, _getPrototypeOf(AccordeonGroup).call(this, props)); | ||
_this = _super.call(this, props); | ||
@@ -148,3 +158,3 @@ _defineProperty(_assertThisInitialized(_this), "handleClick", function (index) { | ||
var children = _react.default.Children.map(this.props.children, function (child, index) { | ||
return _react.default.createElement(_Accordeon.default, _extends({ | ||
return /*#__PURE__*/_react.default.createElement(_Accordeon.default, _extends({ | ||
key: index | ||
@@ -166,3 +176,3 @@ }, child.props, { | ||
return _react.default.createElement("div", _extends({}, restProps, { | ||
return /*#__PURE__*/_react.default.createElement("div", _extends({}, restProps, { | ||
className: (0, _classnames.default)(this.props.className, styles.AccordeonGroup) | ||
@@ -169,0 +179,0 @@ }), children); |
@@ -42,11 +42,15 @@ "use strict"; | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } | ||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } | ||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } | ||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | ||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } | ||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } | ||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } | ||
@@ -58,2 +62,4 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
var _super = _createSuper(AccordeonStatefull); | ||
function AccordeonStatefull(props) { | ||
@@ -64,3 +70,3 @@ var _this; | ||
_this = _possibleConstructorReturn(this, _getPrototypeOf(AccordeonStatefull).call(this, props)); | ||
_this = _super.call(this, props); | ||
@@ -85,3 +91,3 @@ _defineProperty(_assertThisInitialized(_this), "handleClick", function (e) { | ||
value: function render() { | ||
return _react.default.createElement(_Accordeon.default, _extends({}, this.props, { | ||
return /*#__PURE__*/_react.default.createElement(_Accordeon.default, _extends({}, this.props, { | ||
isOpen: this.state.isOpen, | ||
@@ -88,0 +94,0 @@ onClick: this.handleClick |
{ | ||
"name": "@infotech/uikit-accordeon", | ||
"version": "0.2.0-beta.1", | ||
"version": "0.2.0-beta.2", | ||
"main": "lib/index.js", | ||
@@ -14,4 +14,4 @@ "scripts": { | ||
"dependencies": { | ||
"@infotech/uikit-badges": "^0.2.0-beta.0", | ||
"@infotech/uikit-palette": "^1.2.0-beta.0", | ||
"@infotech/uikit-badges": "^0.2.0-beta.1", | ||
"@infotech/uikit-palette": "^1.2.0-beta.1", | ||
"classnames": "^2.2.6", | ||
@@ -18,0 +18,0 @@ "lodash": "^4.17.15" |
Sorry, the diff of this file is not supported yet
24342
356