@twreporter/react-components 8.18.0-rc.6 → 8.18.0-rc.7
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/CHANGELOG.md +11 -0
- package/lib/input/components/text-field.js +13 -10
- package/lib/material-icon.js +3 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [8.18.0-rc.7](https://github.com/twreporter/twreporter-npm-packages/compare/@twreporter/react-components@8.18.0-rc.6...@twreporter/react-components@8.18.0-rc.7) (2023-06-17)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* address defects ([5d0898c](https://github.com/twreporter/twreporter-npm-packages/commit/5d0898c18f5930538b15844432c748e40ab0b23b))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [8.18.0-rc.6](https://github.com/twreporter/twreporter-npm-packages/compare/@twreporter/react-components@8.18.0-rc.5...@twreporter/react-components@8.18.0-rc.6) (2023-06-15)
|
|
7
18
|
|
|
8
19
|
|
|
@@ -17,7 +17,7 @@ var _color = require("@twreporter/core/lib/constants/color");
|
|
|
17
17
|
|
|
18
18
|
var _paragraph = require("../../text/paragraph");
|
|
19
19
|
|
|
20
|
-
var _excluded = ["placeholder", "align", "state", "message", "onSubmit", "onChange"];
|
|
20
|
+
var _excluded = ["placeholder", "align", "state", "message", "onSubmit", "onChange", "className"];
|
|
21
21
|
|
|
22
22
|
var _textColor, _messageColor;
|
|
23
23
|
|
|
@@ -38,7 +38,7 @@ var borderColor = messageColor;
|
|
|
38
38
|
var Input = /*#__PURE__*/_styledComponents["default"].input.withConfig({
|
|
39
39
|
displayName: "text-field__Input",
|
|
40
40
|
componentId: "ld9aag-0"
|
|
41
|
-
})(["height:40px;font-size:16px;border-width:0 0 1px 0;background-color:inherit;color:", ";border-color:", ";&:focus,&:focus-visible{outline-width:0;}&::placeholder{color:", ";}"], function (props) {
|
|
41
|
+
})(["height:40px;font-size:16px;border-width:0 0 1px 0;background-color:inherit;padding:0;color:", ";border-color:", ";&:focus,&:focus-visible{outline-width:0;outline-style:none;}&::placeholder{color:", ";}"], function (props) {
|
|
42
42
|
return textColor[props.state];
|
|
43
43
|
}, function (props) {
|
|
44
44
|
return borderColor[props.state];
|
|
@@ -47,7 +47,7 @@ var Input = /*#__PURE__*/_styledComponents["default"].input.withConfig({
|
|
|
47
47
|
var Message = /*#__PURE__*/(0, _styledComponents["default"])(_paragraph.P3).withConfig({
|
|
48
48
|
displayName: "text-field__Message",
|
|
49
49
|
componentId: "ld9aag-1"
|
|
50
|
-
})(["color:", ";margin:8px
|
|
50
|
+
})(["color:", ";margin-top:8px;"], function (props) {
|
|
51
51
|
return messageColor[props.state];
|
|
52
52
|
});
|
|
53
53
|
|
|
@@ -75,6 +75,8 @@ var TextField = function TextField(_ref) {
|
|
|
75
75
|
onSubmit = _ref$onSubmit === void 0 ? defaultFunc : _ref$onSubmit,
|
|
76
76
|
_ref$onChange = _ref.onChange,
|
|
77
77
|
onChange = _ref$onChange === void 0 ? defaultFunc : _ref$onChange,
|
|
78
|
+
_ref$className = _ref.className,
|
|
79
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
78
80
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
79
81
|
|
|
80
82
|
var handleSubmit = function handleSubmit(e) {
|
|
@@ -84,20 +86,20 @@ var TextField = function TextField(_ref) {
|
|
|
84
86
|
};
|
|
85
87
|
|
|
86
88
|
var handleChange = function handleChange(e) {
|
|
87
|
-
onChange(e.target.value);
|
|
89
|
+
onChange(e.target.value, e.target.checkValidity());
|
|
88
90
|
};
|
|
89
91
|
|
|
90
|
-
return /*#__PURE__*/_react["default"].createElement(Container,
|
|
92
|
+
return /*#__PURE__*/_react["default"].createElement(Container, {
|
|
91
93
|
onSubmit: handleSubmit,
|
|
92
|
-
align: align
|
|
93
|
-
|
|
94
|
+
align: align,
|
|
95
|
+
className: className
|
|
96
|
+
}, /*#__PURE__*/_react["default"].createElement(Input, _extends({
|
|
94
97
|
name: "input",
|
|
95
|
-
type: "text",
|
|
96
98
|
placeholder: placeholder,
|
|
97
99
|
state: state,
|
|
98
100
|
disabled: state === _enums.TextState.DISABLED,
|
|
99
101
|
onChange: handleChange
|
|
100
|
-
}), message && /*#__PURE__*/_react["default"].createElement(Message, {
|
|
102
|
+
}, props)), message && /*#__PURE__*/_react["default"].createElement(Message, {
|
|
101
103
|
text: message,
|
|
102
104
|
state: state
|
|
103
105
|
}));
|
|
@@ -109,7 +111,8 @@ TextField.propTypes = {
|
|
|
109
111
|
state: _propTypes["default"].oneOf(Object.values(_enums.TextState)),
|
|
110
112
|
message: _propTypes["default"].string,
|
|
111
113
|
onSubmit: _propTypes["default"].func,
|
|
112
|
-
onChange: _propTypes["default"].func
|
|
114
|
+
onChange: _propTypes["default"].func,
|
|
115
|
+
className: _propTypes["default"].string
|
|
113
116
|
};
|
|
114
117
|
TextField.Align = _enums.TextAlign;
|
|
115
118
|
TextField.State = _enums.TextState;
|
package/lib/material-icon.js
CHANGED
|
@@ -16,8 +16,10 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
16
16
|
var StyledSymbol = /*#__PURE__*/_styledComponents["default"].span.withConfig({
|
|
17
17
|
displayName: "material-icon__StyledSymbol",
|
|
18
18
|
componentId: "sc-1mjrid5-0"
|
|
19
|
-
})(["font-variation-settings:", ";"], function (props) {
|
|
19
|
+
})(["font-variation-settings:", ";font-size:", "px;"], function (props) {
|
|
20
20
|
return "\n 'FILL': ".concat(props.fill, ",\n 'wght': ").concat(props.weight, ",\n 'GRAD': ").concat(props.grade, ",\n 'opsz': ").concat(props.size, "\n ");
|
|
21
|
+
}, function (props) {
|
|
22
|
+
return props.size;
|
|
21
23
|
});
|
|
22
24
|
|
|
23
25
|
var MeterialSymbol = function MeterialSymbol(_ref) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twreporter/react-components",
|
|
3
|
-
"version": "8.18.0-rc.
|
|
3
|
+
"version": "8.18.0-rc.7",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"repository": "https://github.com/twreporter/twreporter-npm-packages.git",
|
|
6
6
|
"author": "twreporter <developer@twreporter.org>",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"babel-loader": "^8.2.4",
|
|
45
45
|
"chromatic": "^6.5.4"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "186747107ad32429a3dcc0b0a663c1ccc7d744ea"
|
|
48
48
|
}
|