New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@n3/kit

Package Overview
Dependencies
Maintainers
4
Versions
171
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@n3/kit - npm Package Compare versions

Comparing version 0.4.3 to 0.5.0

lib/button-with-menu/index.js

37

CHANGELOG.md

@@ -0,1 +1,38 @@

## 0.5.0 (21 мая 2018)
### Новые возможности
* Добавлен компонент "группа кнопок" (`ButtonsGroup`)
* Добавлена возможность отображения кнопок-иконок при помощи свойства `onlyIcon` (`Button`)
* Добавлен компонент "кнопка с меню" (`ButtonWithMenu`)
* Добавлен аналог браузерного `alert` для всплывающих уведомлений (`showAlert`)
* Добавлен аналог браузерного `confirm` для всплывающих подтвержений (`showConfirm`)
### Несовместимые изменения и миграция
* Изменён формат (`ButtonsToolbar`). Вложенные кнопки теперь передаются через `children`.
Старый формат:
```
<ButtonsToolbar
buttons={[
<Button />,
<Button />,
<Button />,
]}
/>
```
Новый формат:
```
<ButtonsToolbar>
<Button />
<Button />
<Button />
</ButtonsToolbar>
```
## 0.4.3 (17 мая 2018)

@@ -2,0 +39,0 @@

2

lib/button-dropdown/index.js

@@ -35,5 +35,5 @@ 'use strict';

menu: _propTypes.menuPropTypes.isRequired
menu: _propTypes.menuArrayOf.isRequired
});
exports.default = ButtonDropdown;

@@ -44,2 +44,5 @@ 'use strict';

setDisabledProp: _propTypes2.default.bool,
flatLeft: _propTypes2.default.bool,
flatRight: _propTypes2.default.bool,
onlyIcon: _propTypes2.default.bool,
className: _propTypes2.default.string,

@@ -61,2 +64,5 @@

setDisabledProp: true,
flatLeft: false,
flatRight: false,
onlyIcon: false,
className: '',

@@ -118,2 +124,5 @@

setDisabledProp = _props.setDisabledProp,
onlyIcon = _props.onlyIcon,
flatLeft = _props.flatLeft,
flatRight = _props.flatRight,
className = _props.className,

@@ -125,3 +134,6 @@ children = _props.children;

n3__button_disabled: disabled,
n3__button_pressed: pressed
n3__button_pressed: pressed,
'n3__button_flat-left': flatLeft,
'n3__button_flat-right': flatRight,
n3__button_icon: onlyIcon
});

@@ -128,0 +140,0 @@

@@ -18,7 +18,10 @@ 'use strict';

var ButtonsToolbar = function ButtonsToolbar(_ref) {
var buttons = _ref.buttons;
var children = _ref.children;
var childrenArray = _react2.default.Children.toArray(children);
return _react2.default.createElement(
'div',
{ className: 'n3__buttons-toolbar' },
buttons.map(function (button, index) {
childrenArray.map(function (button, index) {
return _react2.default.createElement(

@@ -37,5 +40,9 @@ 'div',

ButtonsToolbar.propTypes = {
buttons: _propTypes2.default.arrayOf(_propTypes2.default.node).isRequired
children: _propTypes2.default.node
};
ButtonsToolbar.defaultProps = {
children: null
};
exports.default = ButtonsToolbar;

@@ -141,3 +141,3 @@ 'use strict';

placement: _propTypes2.default.string,
menu: _propTypes3.menuPropTypes.isRequired,
menu: _propTypes3.menuArrayOf.isRequired,
// eslint-disable-next-line react/forbid-prop-types

@@ -144,0 +144,0 @@ popperStyle: _propTypes2.default.object

@@ -87,3 +87,3 @@ 'use strict';

_Menu.propTypes = {
menu: _propTypes3.menuPropTypes.isRequired,
menu: _propTypes3.menuArrayOf.isRequired,

@@ -90,0 +90,0 @@ handleClickOutside: _propTypes2.default.func

@@ -6,3 +6,3 @@ 'use strict';

});
exports.menuPropTypes = exports.menuItemPropTypes = undefined;
exports.menuArrayOf = exports.menuItemPropTypes = undefined;

@@ -25,2 +25,2 @@ var _propTypes = require('prop-types');

var menuPropTypes = exports.menuPropTypes = _propTypes2.default.arrayOf(_propTypes2.default.shape(menuItemPropTypes));
var menuArrayOf = exports.menuArrayOf = _propTypes2.default.arrayOf(_propTypes2.default.shape(menuItemPropTypes));

@@ -35,5 +35,5 @@ 'use strict';

EllipsisDropdown.propTypes = {
menu: _propTypes.menuPropTypes.isRequired
menu: _propTypes.menuArrayOf.isRequired
};
exports.default = EllipsisDropdown;

@@ -43,2 +43,20 @@ 'use strict';

var _buttonWithMenu = require('./button-with-menu');
Object.defineProperty(exports, 'ButtonWithMenu', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_buttonWithMenu).default;
}
});
var _buttonsGroup = require('./buttons-group');
Object.defineProperty(exports, 'ButtonsGroup', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_buttonsGroup).default;
}
});
var _buttonsToolbar = require('./buttons-toolbar');

@@ -260,2 +278,20 @@

var _showAlert = require('./utils/show-alert');
Object.defineProperty(exports, 'showAlert', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_showAlert).default;
}
});
var _showConfirm = require('./utils/show-confirm');
Object.defineProperty(exports, 'showConfirm', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_showConfirm).default;
}
});
var _sidebar = require('./sidebar');

@@ -262,0 +298,0 @@

@@ -31,2 +31,6 @@ 'use strict';

var _title = require('./title');
var _title2 = _interopRequireDefault(_title);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -123,2 +127,3 @@

Modal.Footer = _footer2.default;
Modal.Title = _title2.default;
exports.default = Modal;
{
"name": "@n3/kit",
"version": "0.4.3",
"version": "0.5.0",
"description": "React components for n3 interfaces",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

Sorry, the diff of this file is not supported yet

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