@commercetools-uikit/date-input 13.0.1 → 14.0.0
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/README.md
CHANGED
|
@@ -53,6 +53,8 @@ export default Example;
|
|
|
53
53
|
| `onFocus` | `FocusEventHandler` | | | Called when the date input gains focus. |
|
|
54
54
|
| `onBlur` | `Function`<br/>[See signature.](#signature-onBlur) | | | Called when the date input loses focus. |
|
|
55
55
|
| `id` | `string` | | | Used as the HTML `id` attribute. |
|
|
56
|
+
| `aria-invalid` | `boolean` | | | Indicate if the value entered in the input is invalid. |
|
|
57
|
+
| `aria-errormessage` | `string` | | | HTML ID of an element containing an error message related to the input. |
|
|
56
58
|
| `name` | `string` | | | Used as the HTML `name` attribute. |
|
|
57
59
|
| `placeholder` | `string` | | | Placeholder value to show in the input field |
|
|
58
60
|
| `isDisabled` | `boolean` | | | Disables the date picker |
|
|
@@ -184,6 +184,9 @@ var DateInput = function DateInput(props) {
|
|
|
184
184
|
children: [jsxRuntime.jsx(calendarUtils.CalendarBody, {
|
|
185
185
|
inputRef: inputRef,
|
|
186
186
|
inputProps: getInputProps(_objectSpread({
|
|
187
|
+
/* ARIA */
|
|
188
|
+
'aria-invalid': props['aria-invalid'],
|
|
189
|
+
'aria-errormessage': props['aria-errormessage'],
|
|
187
190
|
// Unset the aria-labelledby as it interfers with the link
|
|
188
191
|
// between the <label for> and the <input id>.
|
|
189
192
|
'aria-labelledby': undefined,
|
|
@@ -318,6 +321,8 @@ DateInput.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
318
321
|
onFocus: _pt__default["default"].func,
|
|
319
322
|
onBlur: _pt__default["default"].func,
|
|
320
323
|
id: _pt__default["default"].string,
|
|
324
|
+
'aria-invalid': _pt__default["default"].bool,
|
|
325
|
+
'aria-errormessage': _pt__default["default"].string,
|
|
321
326
|
name: _pt__default["default"].string,
|
|
322
327
|
placeholder: _pt__default["default"].string,
|
|
323
328
|
isDisabled: _pt__default["default"].bool,
|
|
@@ -336,7 +341,7 @@ DateInput.isEmpty = function (value) {
|
|
|
336
341
|
var DateInput$1 = DateInput;
|
|
337
342
|
|
|
338
343
|
// NOTE: This string will be replaced on build time with the package version.
|
|
339
|
-
var version = "
|
|
344
|
+
var version = "14.0.0";
|
|
340
345
|
|
|
341
346
|
exports["default"] = DateInput$1;
|
|
342
347
|
exports.version = version;
|
|
@@ -183,6 +183,9 @@ var DateInput = function DateInput(props) {
|
|
|
183
183
|
children: [jsxRuntime.jsx(calendarUtils.CalendarBody, {
|
|
184
184
|
inputRef: inputRef,
|
|
185
185
|
inputProps: getInputProps(_objectSpread({
|
|
186
|
+
/* ARIA */
|
|
187
|
+
'aria-invalid': props['aria-invalid'],
|
|
188
|
+
'aria-errormessage': props['aria-errormessage'],
|
|
186
189
|
// Unset the aria-labelledby as it interfers with the link
|
|
187
190
|
// between the <label for> and the <input id>.
|
|
188
191
|
'aria-labelledby': undefined,
|
|
@@ -320,7 +323,7 @@ DateInput.isEmpty = function (value) {
|
|
|
320
323
|
var DateInput$1 = DateInput;
|
|
321
324
|
|
|
322
325
|
// NOTE: This string will be replaced on build time with the package version.
|
|
323
|
-
var version = "
|
|
326
|
+
var version = "14.0.0";
|
|
324
327
|
|
|
325
328
|
exports["default"] = DateInput$1;
|
|
326
329
|
exports.version = version;
|
|
@@ -163,6 +163,9 @@ var DateInput = function DateInput(props) {
|
|
|
163
163
|
children: [jsx(CalendarBody, {
|
|
164
164
|
inputRef: inputRef,
|
|
165
165
|
inputProps: getInputProps(_objectSpread({
|
|
166
|
+
/* ARIA */
|
|
167
|
+
'aria-invalid': props['aria-invalid'],
|
|
168
|
+
'aria-errormessage': props['aria-errormessage'],
|
|
166
169
|
// Unset the aria-labelledby as it interfers with the link
|
|
167
170
|
// between the <label for> and the <input id>.
|
|
168
171
|
'aria-labelledby': undefined,
|
|
@@ -297,6 +300,8 @@ DateInput.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
297
300
|
onFocus: _pt.func,
|
|
298
301
|
onBlur: _pt.func,
|
|
299
302
|
id: _pt.string,
|
|
303
|
+
'aria-invalid': _pt.bool,
|
|
304
|
+
'aria-errormessage': _pt.string,
|
|
300
305
|
name: _pt.string,
|
|
301
306
|
placeholder: _pt.string,
|
|
302
307
|
isDisabled: _pt.bool,
|
|
@@ -315,6 +320,6 @@ DateInput.isEmpty = function (value) {
|
|
|
315
320
|
var DateInput$1 = DateInput;
|
|
316
321
|
|
|
317
322
|
// NOTE: This string will be replaced on build time with the package version.
|
|
318
|
-
var version = "
|
|
323
|
+
var version = "14.0.0";
|
|
319
324
|
|
|
320
325
|
export { DateInput$1 as default, version };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-uikit/date-input",
|
|
3
3
|
"description": "The `DateInput` component allows the user to select a date. It formats the selected date depending on the users' locale.",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "14.0.0",
|
|
5
5
|
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"directory": "packages/components/inputs/date-input"
|
|
10
10
|
},
|
|
11
11
|
"homepage": "https://uikit.commercetools.com",
|
|
12
|
-
"keywords": ["javascript", "design
|
|
12
|
+
"keywords": ["javascript", "typescript", "design-system", "react", "uikit"],
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"publishConfig": {
|
|
15
15
|
"access": "public"
|
|
@@ -19,33 +19,31 @@
|
|
|
19
19
|
"module": "dist/commercetools-uikit-date-input.esm.js",
|
|
20
20
|
"files": ["dist"],
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@babel/runtime": "7.17.2",
|
|
23
|
-
"@babel/runtime-corejs3": "7.17.2",
|
|
24
|
-
"@commercetools-uikit/accessible-button": "
|
|
25
|
-
"@commercetools-uikit/calendar-utils": "
|
|
26
|
-
"@commercetools-uikit/constraints": "
|
|
27
|
-
"@commercetools-uikit/design-system": "
|
|
28
|
-
"@commercetools-uikit/hooks": "
|
|
29
|
-
"@commercetools-uikit/icons": "
|
|
30
|
-
"@commercetools-uikit/secondary-icon-button": "
|
|
31
|
-
"@commercetools-uikit/select-utils": "
|
|
32
|
-
"@commercetools-uikit/spacings-inline": "
|
|
33
|
-
"@commercetools-uikit/text": "
|
|
34
|
-
"@commercetools-uikit/tooltip": "
|
|
35
|
-
"@commercetools-uikit/utils": "
|
|
22
|
+
"@babel/runtime": "^7.17.2",
|
|
23
|
+
"@babel/runtime-corejs3": "^7.17.2",
|
|
24
|
+
"@commercetools-uikit/accessible-button": "14.0.0",
|
|
25
|
+
"@commercetools-uikit/calendar-utils": "14.0.0",
|
|
26
|
+
"@commercetools-uikit/constraints": "14.0.0",
|
|
27
|
+
"@commercetools-uikit/design-system": "14.0.0",
|
|
28
|
+
"@commercetools-uikit/hooks": "14.0.0",
|
|
29
|
+
"@commercetools-uikit/icons": "14.0.0",
|
|
30
|
+
"@commercetools-uikit/secondary-icon-button": "14.0.0",
|
|
31
|
+
"@commercetools-uikit/select-utils": "14.0.0",
|
|
32
|
+
"@commercetools-uikit/spacings-inline": "14.0.0",
|
|
33
|
+
"@commercetools-uikit/text": "14.0.0",
|
|
34
|
+
"@commercetools-uikit/tooltip": "14.0.0",
|
|
35
|
+
"@commercetools-uikit/utils": "14.0.0",
|
|
36
36
|
"@emotion/react": "^11.4.0",
|
|
37
37
|
"@emotion/styled": "^11.3.0",
|
|
38
|
-
"common-tags": "1.8.2",
|
|
39
38
|
"downshift": "6.1.7",
|
|
40
39
|
"prop-types": "15.8.1",
|
|
41
40
|
"react-is": "17.0.2",
|
|
42
|
-
"react-required-if": "1.0.3",
|
|
43
41
|
"warning": "4.0.3"
|
|
44
42
|
},
|
|
45
43
|
"devDependencies": {
|
|
46
44
|
"moment": "2.29.1",
|
|
47
45
|
"react": "17.0.2",
|
|
48
|
-
"react-intl": "5.24.6"
|
|
46
|
+
"react-intl": "^5.24.6"
|
|
49
47
|
},
|
|
50
48
|
"peerDependencies": {
|
|
51
49
|
"moment": "2.x",
|