@planningcenter/tapestry-react 2.6.1 → 2.6.2
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/dist/cjs/Input/Input.js +4 -2
- package/dist/esm/Input/Input.js +4 -2
- package/package.json +1 -1
- package/src/Input/Input.js +7 -0
package/dist/cjs/Input/Input.js
CHANGED
|
@@ -78,7 +78,8 @@ var Input = /*#__PURE__*/function (_Component) {
|
|
|
78
78
|
highlightOnInteraction = _this$props.highlightOnInteraction,
|
|
79
79
|
type = _this$props.type,
|
|
80
80
|
value = _this$props.value,
|
|
81
|
-
|
|
81
|
+
required = _this$props.required,
|
|
82
|
+
restProps = (0, _objectWithoutPropertiesLoose2["default"])(_this$props, ["backgroundColor", "color", "autoComplete", "autoFocus", "autoWidth", "defaultValue", "disabled", "focus", "hover", "id", "min", "minLength", "max", "maxLength", "name", "onBlur", "onChange", "onFocus", "onKeyDown", "onKeyUp", "placeholder", "placeholderColor", "readOnly", "highlightOnInteraction", "type", "value", "required"]);
|
|
82
83
|
var ariaLabel = restProps['aria-label'];
|
|
83
84
|
|
|
84
85
|
if (ariaLabel) {
|
|
@@ -119,7 +120,8 @@ var Input = /*#__PURE__*/function (_Component) {
|
|
|
119
120
|
onFocus: onFocus,
|
|
120
121
|
onBlur: onBlur,
|
|
121
122
|
onKeyDown: onKeyDown,
|
|
122
|
-
onKeyUp: onKeyUp
|
|
123
|
+
onKeyUp: onKeyUp,
|
|
124
|
+
required: required
|
|
123
125
|
}));
|
|
124
126
|
};
|
|
125
127
|
|
package/dist/esm/Input/Input.js
CHANGED
|
@@ -64,7 +64,8 @@ var Input = /*#__PURE__*/function (_Component) {
|
|
|
64
64
|
highlightOnInteraction = _this$props.highlightOnInteraction,
|
|
65
65
|
type = _this$props.type,
|
|
66
66
|
value = _this$props.value,
|
|
67
|
-
|
|
67
|
+
required = _this$props.required,
|
|
68
|
+
restProps = _objectWithoutPropertiesLoose(_this$props, ["backgroundColor", "color", "autoComplete", "autoFocus", "autoWidth", "defaultValue", "disabled", "focus", "hover", "id", "min", "minLength", "max", "maxLength", "name", "onBlur", "onChange", "onFocus", "onKeyDown", "onKeyUp", "placeholder", "placeholderColor", "readOnly", "highlightOnInteraction", "type", "value", "required"]);
|
|
68
69
|
|
|
69
70
|
var ariaLabel = restProps['aria-label'];
|
|
70
71
|
|
|
@@ -106,7 +107,8 @@ var Input = /*#__PURE__*/function (_Component) {
|
|
|
106
107
|
onFocus: onFocus,
|
|
107
108
|
onBlur: onBlur,
|
|
108
109
|
onKeyDown: onKeyDown,
|
|
109
|
-
onKeyUp: onKeyUp
|
|
110
|
+
onKeyUp: onKeyUp,
|
|
111
|
+
required: required
|
|
110
112
|
}));
|
|
111
113
|
};
|
|
112
114
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@planningcenter/tapestry-react",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.2",
|
|
4
4
|
"description": "A collection of flexible React components to help you build resilient, accessible user interfaces quickly and effectively.",
|
|
5
5
|
"author": "Front End Systems Engineering <frontend@pco.bz>",
|
|
6
6
|
"main": "dist/cjs/index.js",
|
package/src/Input/Input.js
CHANGED
|
@@ -119,6 +119,11 @@ type InputProps = {
|
|
|
119
119
|
* Changes color of the input's placeholder text. Both [theme colors](/colors) and html values are supported.
|
|
120
120
|
*/
|
|
121
121
|
placeholderColor?: string,
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Sets the input's required attribute.
|
|
125
|
+
*/
|
|
126
|
+
required?: boolean,
|
|
122
127
|
}
|
|
123
128
|
|
|
124
129
|
class Input extends Component<InputProps> {
|
|
@@ -162,6 +167,7 @@ class Input extends Component<InputProps> {
|
|
|
162
167
|
highlightOnInteraction,
|
|
163
168
|
type,
|
|
164
169
|
value,
|
|
170
|
+
required,
|
|
165
171
|
...restProps
|
|
166
172
|
} = this.props
|
|
167
173
|
const ariaLabel = restProps['aria-label']
|
|
@@ -206,6 +212,7 @@ class Input extends Component<InputProps> {
|
|
|
206
212
|
onBlur={onBlur}
|
|
207
213
|
onKeyDown={onKeyDown}
|
|
208
214
|
onKeyUp={onKeyUp}
|
|
215
|
+
required={required}
|
|
209
216
|
/>
|
|
210
217
|
</InputBox>
|
|
211
218
|
)
|