anchor-ui
Advanced tools
Comparing version 3.5.3 to 3.5.4
@@ -78,3 +78,3 @@ 'use strict'; | ||
if (open) { | ||
style = (0, _combineStyles2.default)(style, { transform: 'rotate(180deg)' }); | ||
style = (0, _combineStyles2.default)(style, { transform: 'rotate(180deg) translateY(50%)' }); | ||
} | ||
@@ -81,0 +81,0 @@ |
@@ -69,2 +69,4 @@ 'use strict'; | ||
right: '8px', | ||
top: '50%', | ||
transform: 'translateY(-50%)', | ||
transition: 'transform .3s ease-in-out' | ||
@@ -100,3 +102,5 @@ }, | ||
position: 'absolute', | ||
left: '8px' | ||
left: '8px', | ||
top: '50%', | ||
transform: 'translateY(-50%)' | ||
}, | ||
@@ -103,0 +107,0 @@ badge: { |
@@ -17,7 +17,5 @@ 'use strict'; | ||
var root = function root(overrideStyle) { | ||
return (0, _combineStyles2.default)(_styles2.default.root, overrideStyle); | ||
}; | ||
var root = function root(disabled, overrideStyle) { | ||
var style = _styles2.default.root; | ||
var button = function button(style, disabled) { | ||
if (disabled) { | ||
@@ -27,11 +25,7 @@ return (0, _combineStyles2.default)(style, _styles2.default.disabled); | ||
return style; | ||
return (0, _combineStyles2.default)(style, overrideStyle); | ||
}; | ||
var input = function input(rightButton, overrideStyle) { | ||
if (rightButton) { | ||
return (0, _combineStyles2.default)((0, _combineStyles2.default)(_styles2.default.messageInput, _styles2.default.leftButton), overrideStyle); | ||
} | ||
return (0, _combineStyles2.default)(_styles2.default.messageInput, overrideStyle); | ||
var input = function input(overrideStyle) { | ||
return (0, _combineStyles2.default)(_styles2.default.input, overrideStyle); | ||
}; | ||
@@ -41,5 +35,4 @@ | ||
root: root, | ||
button: button, | ||
input: input | ||
}; | ||
module.exports = exports['default']; |
@@ -96,14 +96,15 @@ 'use strict'; | ||
color = _props.color, | ||
custom = _objectWithoutProperties(_props, ['onChange', 'sendMessage', 'placeholder', 'value', 'maxLength', 'leftButton', 'inputRef', 'disabled', 'style', 'inputStyle', 'color']); | ||
rightButton = _props.rightButton, | ||
custom = _objectWithoutProperties(_props, ['onChange', 'sendMessage', 'placeholder', 'value', 'maxLength', 'leftButton', 'inputRef', 'disabled', 'style', 'inputStyle', 'color', 'rightButton']); | ||
return _react2.default.createElement( | ||
'section', | ||
{ style: _getStyles2.default.root(style) }, | ||
{ style: _getStyles2.default.root(disabled, style) }, | ||
leftButton ? _react2.default.createElement( | ||
'div', | ||
{ style: _getStyles2.default.button(_styles2.default.button, disabled) }, | ||
{ style: _styles2.default.buttons }, | ||
leftButton | ||
) : null, | ||
_react2.default.createElement('input', _extends({ | ||
style: _getStyles2.default.input(leftButton, inputStyle), | ||
style: _getStyles2.default.input(inputStyle), | ||
placeholder: placeholder, | ||
@@ -120,9 +121,13 @@ onChange: onChange, | ||
_react2.default.createElement( | ||
_button2.default, | ||
{ | ||
style: _getStyles2.default.button(_styles2.default.rightButton, disabled), | ||
iconButton: true, | ||
onClick: sendMessage | ||
}, | ||
_react2.default.createElement(_iconSend2.default, { color: color }) | ||
'div', | ||
{ style: _styles2.default.buttons }, | ||
rightButton, | ||
_react2.default.createElement( | ||
_button2.default, | ||
{ | ||
iconButton: true, | ||
onClick: sendMessage | ||
}, | ||
_react2.default.createElement(_iconSend2.default, { color: color }) | ||
) | ||
) | ||
@@ -154,2 +159,4 @@ ); | ||
leftButton: _propTypes2.default.node, | ||
/** Right-hand side placed button */ | ||
rightButton: _propTypes2.default.node, | ||
/** Ref function to the element */ | ||
@@ -166,3 +173,4 @@ inputRef: _propTypes2.default.func, | ||
leftButton: null, | ||
disabled: false | ||
disabled: false, | ||
rightButton: null | ||
}; | ||
@@ -169,0 +177,0 @@ |
@@ -11,2 +11,6 @@ 'use strict'; | ||
var _styles = require('../settings/styles'); | ||
var _styles2 = _interopRequireDefault(_styles); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -16,23 +20,31 @@ | ||
root: { | ||
paddingBottom: '16px', | ||
paddingLeft: '16px', | ||
paddingRight: '16px', | ||
paddingTop: '0', | ||
position: 'relative' | ||
marginBottom: '16px', | ||
marginLeft: '16px', | ||
marginTop: '0', | ||
marginRight: '16px', | ||
position: 'relative', | ||
height: '48px', | ||
width: '100%', | ||
boxSizing: 'border-box', | ||
display: 'flex', | ||
alignItems: 'center', | ||
borderRadius: '3px', | ||
overflow: 'hidden', | ||
backgroundColor: _colors2.default.white, | ||
boxShadow: _styles2.default.depthShadows[0] | ||
}, | ||
messageInput: { | ||
input: { | ||
flex: '1', | ||
height: '100%', | ||
appearance: 'none', | ||
border: '0', | ||
borderRadius: '3px', | ||
boxSizing: 'border-box', | ||
color: _colors2.default.primaryText, | ||
fontSize: '16px', | ||
height: '48px', | ||
paddingLeft: '10px', | ||
paddingRight: '48px', | ||
width: '100%', | ||
outline: 'none', | ||
padding: '0 8px', | ||
border: 0, | ||
':focus': { | ||
outline: 'none' | ||
}, | ||
':disabled': { | ||
@@ -45,16 +57,6 @@ opacity: '0.38' | ||
}, | ||
leftButton: { | ||
paddingLeft: '48px' | ||
}, | ||
button: { | ||
left: '20px', | ||
position: 'absolute', | ||
top: '4px' | ||
}, | ||
rightButton: { | ||
position: 'absolute', | ||
right: '20px', | ||
top: '4px' | ||
buttons: { | ||
display: 'flex' | ||
} | ||
}; | ||
module.exports = exports['default']; |
{ | ||
"name": "anchor-ui", | ||
"version": "3.5.3", | ||
"version": "3.5.4", | ||
"description": "React Component UI Kit", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
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
910608
20063