@micromag/element-text-input 0.3.307 → 0.3.318
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/css/styles.css +1 -1
- package/es/index.js +15 -25
- package/lib/index.js +15 -25
- package/package.json +3 -3
package/assets/css/styles.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.micromag-element-text-input-container{font-family:Helvetica,Arial,sans-serif;font-size:16px;font-weight:400;line-height:1.1}.micromag-element-text-input-container em,.micromag-element-text-input-container i{font-style:italic}.micromag-element-text-input-container b,.micromag-element-text-input-container strong{font-weight:700}.micromag-element-text-input-container p{margin-
|
|
1
|
+
.micromag-element-text-input-container{font-family:Helvetica,Arial,sans-serif;font-size:16px;font-weight:400;line-height:1.1}.micromag-element-text-input-container em,.micromag-element-text-input-container i{font-style:italic}.micromag-element-text-input-container b,.micromag-element-text-input-container strong{font-weight:700}.micromag-element-text-input-container p{margin-bottom:.5em;margin-top:.5em}.micromag-element-text-input-container mark{-webkit-box-decoration-break:clone;box-decoration-break:clone;padding:0}.micromag-element-text-input-container{line-height:1.3}.micromag-element-text-input-container h2{font-size:2em}.micromag-element-text-input-container h3{font-size:1.75em}.micromag-element-text-input-container h4{font-size:1.5em}.micromag-element-text-input-container blockquote{padding:0 0 0 1em}.micromag-element-text-input-container{margin:0;padding:0}.micromag-element-text-input-element{background-color:hsla(0,0%,100%,.1);border:0;outline:0}
|
package/es/index.js
CHANGED
|
@@ -44,51 +44,43 @@ var defaultProps = {
|
|
|
44
44
|
focusable: true,
|
|
45
45
|
className: null
|
|
46
46
|
};
|
|
47
|
-
|
|
48
47
|
var TextInput = function TextInput(_ref) {
|
|
49
48
|
var _ref2;
|
|
50
|
-
|
|
51
49
|
var label = _ref.label,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
50
|
+
labelOutside = _ref.labelOutside,
|
|
51
|
+
labelClassName = _ref.labelClassName,
|
|
52
|
+
textStyle = _ref.textStyle,
|
|
53
|
+
buttonStyle = _ref.buttonStyle,
|
|
54
|
+
labelOutsideStyle = _ref.labelOutsideStyle,
|
|
55
|
+
margin = _ref.margin,
|
|
56
|
+
multiline = _ref.multiline,
|
|
57
|
+
value = _ref.value,
|
|
58
|
+
onChange = _ref.onChange,
|
|
59
|
+
onFocus = _ref.onFocus,
|
|
60
|
+
onBlur = _ref.onBlur,
|
|
61
|
+
required = _ref.required,
|
|
62
|
+
disabled = _ref.disabled,
|
|
63
|
+
focusable = _ref.focusable,
|
|
64
|
+
className = _ref.className;
|
|
67
65
|
var containerStyle = {};
|
|
68
66
|
var labelStyle = {};
|
|
69
67
|
var elementStyle = {};
|
|
70
|
-
|
|
71
68
|
if (margin !== null) {
|
|
72
69
|
containerStyle = _objectSpread(_objectSpread({}, containerStyle), getStyleFromMargin(margin));
|
|
73
70
|
}
|
|
74
|
-
|
|
75
71
|
if (labelOutsideStyle !== null) {
|
|
76
72
|
labelStyle = _objectSpread(_objectSpread({}, labelStyle), getStyleFromText(labelOutsideStyle));
|
|
77
73
|
}
|
|
78
|
-
|
|
79
74
|
if (textStyle !== null) {
|
|
80
75
|
elementStyle = _objectSpread(_objectSpread({}, elementStyle), getStyleFromText(textStyle));
|
|
81
76
|
}
|
|
82
|
-
|
|
83
77
|
if (buttonStyle !== null) {
|
|
84
78
|
elementStyle = _objectSpread(_objectSpread({}, elementStyle), getStyleFromBox(buttonStyle));
|
|
85
79
|
}
|
|
86
|
-
|
|
87
80
|
var containerProps = {
|
|
88
81
|
className: classNames([styles.container, (_ref2 = {}, _defineProperty(_ref2, className, className !== null), _defineProperty(_ref2, styles.element, !labelOutside), _ref2)]),
|
|
89
82
|
style: containerStyle
|
|
90
83
|
};
|
|
91
|
-
|
|
92
84
|
var elementProps = _objectSpread(_objectSpread({
|
|
93
85
|
className: styles.element
|
|
94
86
|
}, !labelOutside ? containerProps : null), {}, {
|
|
@@ -101,7 +93,6 @@ var TextInput = function TextInput(_ref) {
|
|
|
101
93
|
required: required,
|
|
102
94
|
disabled: disabled
|
|
103
95
|
});
|
|
104
|
-
|
|
105
96
|
var element = multiline ? /*#__PURE__*/React.createElement("textarea", Object.assign({}, elementProps, {
|
|
106
97
|
tabIndex: focusable ? '0' : '-1'
|
|
107
98
|
})) : /*#__PURE__*/React.createElement("input", Object.assign({}, elementProps, {
|
|
@@ -113,7 +104,6 @@ var TextInput = function TextInput(_ref) {
|
|
|
113
104
|
style: labelStyle
|
|
114
105
|
}, label), element);
|
|
115
106
|
};
|
|
116
|
-
|
|
117
107
|
TextInput.propTypes = propTypes;
|
|
118
108
|
TextInput.defaultProps = defaultProps;
|
|
119
109
|
|
package/lib/index.js
CHANGED
|
@@ -54,51 +54,43 @@ var defaultProps = {
|
|
|
54
54
|
focusable: true,
|
|
55
55
|
className: null
|
|
56
56
|
};
|
|
57
|
-
|
|
58
57
|
var TextInput = function TextInput(_ref) {
|
|
59
58
|
var _ref2;
|
|
60
|
-
|
|
61
59
|
var label = _ref.label,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
60
|
+
labelOutside = _ref.labelOutside,
|
|
61
|
+
labelClassName = _ref.labelClassName,
|
|
62
|
+
textStyle = _ref.textStyle,
|
|
63
|
+
buttonStyle = _ref.buttonStyle,
|
|
64
|
+
labelOutsideStyle = _ref.labelOutsideStyle,
|
|
65
|
+
margin = _ref.margin,
|
|
66
|
+
multiline = _ref.multiline,
|
|
67
|
+
value = _ref.value,
|
|
68
|
+
onChange = _ref.onChange,
|
|
69
|
+
onFocus = _ref.onFocus,
|
|
70
|
+
onBlur = _ref.onBlur,
|
|
71
|
+
required = _ref.required,
|
|
72
|
+
disabled = _ref.disabled,
|
|
73
|
+
focusable = _ref.focusable,
|
|
74
|
+
className = _ref.className;
|
|
77
75
|
var containerStyle = {};
|
|
78
76
|
var labelStyle = {};
|
|
79
77
|
var elementStyle = {};
|
|
80
|
-
|
|
81
78
|
if (margin !== null) {
|
|
82
79
|
containerStyle = _objectSpread__default["default"](_objectSpread__default["default"]({}, containerStyle), utils.getStyleFromMargin(margin));
|
|
83
80
|
}
|
|
84
|
-
|
|
85
81
|
if (labelOutsideStyle !== null) {
|
|
86
82
|
labelStyle = _objectSpread__default["default"](_objectSpread__default["default"]({}, labelStyle), utils.getStyleFromText(labelOutsideStyle));
|
|
87
83
|
}
|
|
88
|
-
|
|
89
84
|
if (textStyle !== null) {
|
|
90
85
|
elementStyle = _objectSpread__default["default"](_objectSpread__default["default"]({}, elementStyle), utils.getStyleFromText(textStyle));
|
|
91
86
|
}
|
|
92
|
-
|
|
93
87
|
if (buttonStyle !== null) {
|
|
94
88
|
elementStyle = _objectSpread__default["default"](_objectSpread__default["default"]({}, elementStyle), utils.getStyleFromBox(buttonStyle));
|
|
95
89
|
}
|
|
96
|
-
|
|
97
90
|
var containerProps = {
|
|
98
91
|
className: classNames__default["default"]([styles.container, (_ref2 = {}, _defineProperty__default["default"](_ref2, className, className !== null), _defineProperty__default["default"](_ref2, styles.element, !labelOutside), _ref2)]),
|
|
99
92
|
style: containerStyle
|
|
100
93
|
};
|
|
101
|
-
|
|
102
94
|
var elementProps = _objectSpread__default["default"](_objectSpread__default["default"]({
|
|
103
95
|
className: styles.element
|
|
104
96
|
}, !labelOutside ? containerProps : null), {}, {
|
|
@@ -111,7 +103,6 @@ var TextInput = function TextInput(_ref) {
|
|
|
111
103
|
required: required,
|
|
112
104
|
disabled: disabled
|
|
113
105
|
});
|
|
114
|
-
|
|
115
106
|
var element = multiline ? /*#__PURE__*/React__default["default"].createElement("textarea", Object.assign({}, elementProps, {
|
|
116
107
|
tabIndex: focusable ? '0' : '-1'
|
|
117
108
|
})) : /*#__PURE__*/React__default["default"].createElement("input", Object.assign({}, elementProps, {
|
|
@@ -123,7 +114,6 @@ var TextInput = function TextInput(_ref) {
|
|
|
123
114
|
style: labelStyle
|
|
124
115
|
}, label), element);
|
|
125
116
|
};
|
|
126
|
-
|
|
127
117
|
TextInput.propTypes = propTypes;
|
|
128
118
|
TextInput.defaultProps = defaultProps;
|
|
129
119
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/element-text-input",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.318",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -49,12 +49,12 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@babel/runtime": "^7.13.10",
|
|
52
|
-
"@micromag/core": "^0.3.
|
|
52
|
+
"@micromag/core": "^0.3.318",
|
|
53
53
|
"classnames": "^2.2.6",
|
|
54
54
|
"prop-types": "^15.7.2"
|
|
55
55
|
},
|
|
56
56
|
"publishConfig": {
|
|
57
57
|
"access": "public"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "7d1a296e0c0d410e1225279e1f19e3a7715bfa96"
|
|
60
60
|
}
|