Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@brightleaf/elements

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@brightleaf/elements - npm Package Compare versions

Comparing version 0.23.0 to 0.24.0

lib/collapse/collapse.js

10

lib/base/base.js

@@ -8,3 +8,3 @@ "use strict";

var _react = _interopRequireDefault(require("react"));
var _react = _interopRequireWildcard(require("react"));

@@ -21,2 +21,4 @@ var _classnames = _interopRequireDefault(require("classnames"));

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

@@ -28,3 +30,3 @@

var Base = function Base(_ref) {
var Base = (0, _react.forwardRef)(function (_ref, ref) {
var Element = _ref.as,

@@ -47,7 +49,7 @@ className = _ref.className,

return _react.default.createElement(Element, _extends({
ref: ref,
className: (0, _classnames.default)(className, classes),
onClick: onClick
}, clean), children);
};
});
exports.Base = Base;

@@ -54,0 +56,0 @@ Base.propTypes = {

@@ -18,2 +18,8 @@ "use strict";

});
Object.defineProperty(exports, "Element", {
enumerable: true,
get: function get() {
return _base.Base;
}
});
Object.defineProperty(exports, "Box", {

@@ -91,2 +97,8 @@ enumerable: true,

});
Object.defineProperty(exports, "Collapse", {
enumerable: true,
get: function get() {
return _collapse.Collapse;
}
});
Object.defineProperty(exports, "Column", {

@@ -573,2 +585,4 @@ enumerable: true,

var _collapse = require("./collapse");
var _columns = require("./columns");

@@ -575,0 +589,0 @@

43

lib/message/message.js

@@ -14,2 +14,4 @@ "use strict";

var _collapse = require("../collapse");
var _modifiers = require("../modifiers");

@@ -21,2 +23,10 @@

function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }

@@ -42,3 +52,9 @@

"aria-label": "delete",
onClick: onDeleteClick
onClick: function onClick(e) {
onDeleteClick(e);
if (!e.isDefaultPrevented()) {
value.closeMessage();
}
}
}));

@@ -87,3 +103,5 @@ };

isText = _ref3.isText,
className = _ref3.className;
isShown = _ref3.isShown,
className = _ref3.className,
onClose = _ref3.onClose;

@@ -108,2 +126,7 @@ var classes = _objectSpread({}, (0, _modifiers.Colors)({

var _useState = (0, _react.useState)(isShown),
_useState2 = _slicedToArray(_useState, 2),
show = _useState2[0],
setShow = _useState2[1];
return _react.default.createElement(MessageContext.Provider, {

@@ -113,9 +136,19 @@ value: {

isMedium: isMedium,
isLarge: isLarge
isLarge: isLarge,
closeMessage: function closeMessage() {
onClose();
setShow(false);
}
}
}, _react.default.createElement(_collapse.Collapse, {
isShown: show
}, _react.default.createElement("article", {
className: (0, _classnames.default)('message', className, classes)
}, children));
}, children)));
};
exports.Message = Message;
exports.Message = Message;
Message.defaultProps = {
isShown: true,
onClose: function onClose() {}
};

@@ -62,6 +62,5 @@ "use strict";

NavigationView.propTypes = {
className: _propTypes.default.string,
children: _propTypes.default.children
className: _propTypes.default.string
};
var _default = NavigationView;
exports.default = _default;
{
"name": "@brightleaf/elements",
"version": "0.23.0",
"version": "0.24.0",
"description": "React UI elements styled with Bulma CSS",

@@ -12,2 +12,3 @@ "main": "lib/index.js",

"test": "isom test",
"dev": "isom dev",
"preversion": "npx isom transpile",

@@ -14,0 +15,0 @@ "postversion": "npm publish --access=public",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc