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
5
Versions
172
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.8.7 to 0.8.8

lib/loading-area/index.js

16

CHANGELOG.md

@@ -0,1 +1,17 @@

## 0.8.8 (14 сентября 2018)
* Добавлен компонент "Область загрузки" (`LoadingArea`)
* Добавлена возможность отображения кнопки у инпута (`Input`)
* Добавлен компонент "Поле поиска" (`SearchInput`)
### Багфикс
* Добавлен импорт переменных отступов из стилей чекбокса
* Добавлен импорт стилей `Clay` из стилей таблицы
### Улучшения
* Переписаны переменные отступов на css-переменные
* Компонент `ModalSelect` сделан на основе компонента `Input`
## 0.8.7 (11 сентября 2018)

@@ -2,0 +18,0 @@

@@ -241,2 +241,11 @@ 'use strict';

var _loadingArea = require('./loading-area');
Object.defineProperty(exports, 'LoadingArea', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_loadingArea).default;
}
});
var _log = require('./log');

@@ -323,2 +332,11 @@

var _searchInput = require('./search-input');
Object.defineProperty(exports, 'SearchInput', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_searchInput).default;
}
});
var _section = require('./section');

@@ -325,0 +343,0 @@

102

lib/input/index.js

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

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; }; }();
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
var _propTypes = require('prop-types');

@@ -26,9 +26,43 @@

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var Input = function Input(_ref) {
var component = _ref.component,
disabled = _ref.disabled,
hasError = _ref.hasError,
hasWarning = _ref.hasWarning,
className = _ref.className,
small = _ref.small,
buttonComponent = _ref.buttonComponent,
buttonProps = _ref.buttonProps,
buttonDisabled = _ref.buttonDisabled,
props = _objectWithoutProperties(_ref, ['component', 'disabled', 'hasError', 'hasWarning', 'className', 'small', 'buttonComponent', 'buttonProps', 'buttonDisabled']);
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; }
var inputClassName = (0, _classnames2.default)(className, 'n3__input', {
n3__input_disabled: disabled,
'n3__input_has-error': hasError,
'n3__input_has-warning': hasWarning,
'n3__input_has-button': buttonComponent,
n3__input_small: small
});
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; }
var inputProps = _extends({}, props, {
disabled: disabled,
className: inputClassName
});
var inputPropTypes = {
var renderedInput = (0, _react.createElement)(component, inputProps);
return _react2.default.createElement(
'div',
{ className: 'n3__input-wrapper' },
renderedInput,
buttonComponent && (0, _react.createElement)(buttonComponent, _extends({}, buttonProps, {
className: (0, _classnames2.default)('n3__input-wrapper__button', buttonProps.className, {
'n3__input-wrapper__button_disabled': buttonDisabled,
'n3__input-wrapper__button_small': small
})
}))
);
};
Input.propTypes = {
component: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.func]),

@@ -39,6 +73,10 @@ disabled: _propTypes2.default.bool,

small: _propTypes2.default.bool,
className: _propTypes2.default.string
className: _propTypes2.default.string,
buttonComponent: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.func]),
buttonProps: _propTypes2.default.objectOf(_propTypes2.default.any),
buttonDisabled: _propTypes2.default.bool
};
var inputDefaultProps = {
Input.defaultProps = {
component: 'input',

@@ -49,47 +87,9 @@ disabled: false,

small: false,
className: ''
className: '',
buttonComponent: null,
buttonProps: {},
buttonDisabled: false
};
var Input = function (_Component) {
_inherits(Input, _Component);
function Input() {
_classCallCheck(this, Input);
return _possibleConstructorReturn(this, (Input.__proto__ || Object.getPrototypeOf(Input)).apply(this, arguments));
}
_createClass(Input, [{
key: 'render',
value: function render() {
var _props = this.props,
component = _props.component,
disabled = _props.disabled,
hasError = _props.hasError,
hasWarning = _props.hasWarning,
className = _props.className,
small = _props.small,
props = _objectWithoutProperties(_props, ['component', 'disabled', 'hasError', 'hasWarning', 'className', 'small']);
var inputClassName = (0, _classnames2.default)(className, 'n3__input', {
n3__input_disabled: disabled,
'n3__input_has-error': hasError,
'n3__input_has-warning': hasWarning,
n3__input_small: small
});
var inputProps = _extends({}, props, {
disabled: disabled,
className: inputClassName
});
return (0, _react.createElement)(component, inputProps);
}
}]);
return Input;
}(_react.Component);
Input.propTypes = inputPropTypes;
Input.defaultProps = inputDefaultProps;
exports.default = Input;

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

var _classnames = require('classnames');
var _input = require('../input');
var _classnames2 = _interopRequireDefault(_classnames);
var _input2 = _interopRequireDefault(_input);

@@ -35,17 +35,11 @@ var _modalSelectButton = require('../modal-select-button');

onChange = _ref.onChange;
return _react2.default.createElement(
'div',
{ className: 'n3__modal-select' },
_react2.default.createElement('input', {
className: (0, _classnames2.default)('n3__modal-select__input', {
'n3__modal-select__input_disabled': disabled,
'n3__modal-select__input_has-error': hasError,
'n3__modal-select__input_has-warning': hasWarning
}),
readOnly: true,
value: text,
placeholder: placeholder
}),
_react2.default.createElement(_modalSelectButton2.default, {
className: 'n3__modal-select__button',
return _react2.default.createElement(_input2.default, {
disabled: disabled,
hasError: hasError,
hasWarning: hasWarning,
readOnly: true,
value: text,
placeholder: placeholder,
buttonComponent: _modalSelectButton2.default,
buttonProps: {
modalComponent: modalComponent,

@@ -55,4 +49,4 @@ modalProps: modalProps,

onSelect: onChange
})
);
}
});
};

@@ -59,0 +53,0 @@

{
"name": "@n3/kit",
"version": "0.8.7",
"version": "0.8.8",
"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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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