@atlaskit/form 15.0.1 → 15.1.1
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 +18 -0
- package/dist/cjs/character-counter.js +2 -2
- package/dist/cjs/form.js +1 -1
- package/dist/cjs/messages.js +4 -4
- package/dist/es2019/character-counter.js +1 -1
- package/dist/es2019/form.js +1 -1
- package/dist/es2019/messages.js +2 -2
- package/dist/esm/character-counter.js +1 -1
- package/dist/esm/form.js +1 -1
- package/dist/esm/messages.js +2 -2
- package/package.json +2 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/form
|
|
2
2
|
|
|
3
|
+
## 15.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`d14ea5f60b689`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d14ea5f60b689) -
|
|
8
|
+
chore: migrate platform UI & component libraries icon imports from migration paths to core
|
|
9
|
+
|
|
10
|
+
## 15.1.0
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- [`8b640226a78b9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8b640226a78b9) -
|
|
15
|
+
[ux] Improved focusing behavior on submit for fields with errors
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 15.0.1
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -12,7 +12,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
12
12
|
var React = _react;
|
|
13
13
|
var _runtime = require("@compiled/react/runtime");
|
|
14
14
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
15
|
-
var
|
|
15
|
+
var _statusError = _interopRequireDefault(require("@atlaskit/icon/core/status-error"));
|
|
16
16
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
17
17
|
var _visuallyHidden = _interopRequireDefault(require("@atlaskit/visually-hidden"));
|
|
18
18
|
var _fieldIdContext = require("./field-id-context");
|
|
@@ -27,7 +27,7 @@ var errorIconWrapperStyles = null;
|
|
|
27
27
|
var ErrorIconWithWrapper = function ErrorIconWithWrapper() {
|
|
28
28
|
return /*#__PURE__*/React.createElement("span", {
|
|
29
29
|
className: (0, _runtime.ax)(["_1e0c1txw _4t3i7vkz _4cvr1h6o"])
|
|
30
|
-
}, /*#__PURE__*/React.createElement(
|
|
30
|
+
}, /*#__PURE__*/React.createElement(_statusError.default, {
|
|
31
31
|
LEGACY_margin: "0 -2px 0 0",
|
|
32
32
|
LEGACY_size: "small",
|
|
33
33
|
label: "error",
|
package/dist/cjs/form.js
CHANGED
|
@@ -82,7 +82,7 @@ var FormBase = function FormBase(props, ref) {
|
|
|
82
82
|
});
|
|
83
83
|
(0, _finalFormFocus.default)(function () {
|
|
84
84
|
return formRef.current ? Array.from(formRef.current.querySelectorAll('input')) : [];
|
|
85
|
-
},
|
|
85
|
+
}, _utils.getFirstErrorField)(finalForm);
|
|
86
86
|
return finalForm;
|
|
87
87
|
}),
|
|
88
88
|
_useState2 = (0, _slicedToArray2.default)(_useState, 1),
|
package/dist/cjs/messages.js
CHANGED
|
@@ -12,8 +12,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
12
12
|
var React = _react;
|
|
13
13
|
var _runtime = require("@compiled/react/runtime");
|
|
14
14
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
15
|
-
var
|
|
16
|
-
var
|
|
15
|
+
var _statusError = _interopRequireDefault(require("@atlaskit/icon/core/status-error"));
|
|
16
|
+
var _statusSuccess = _interopRequireDefault(require("@atlaskit/icon/core/status-success"));
|
|
17
17
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
18
18
|
var _fieldIdContext = require("./field-id-context");
|
|
19
19
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
@@ -41,14 +41,14 @@ var IconWrapper = function IconWrapper(_ref) {
|
|
|
41
41
|
}, children);
|
|
42
42
|
};
|
|
43
43
|
var messageIcons = {
|
|
44
|
-
error: /*#__PURE__*/React.createElement(
|
|
44
|
+
error: /*#__PURE__*/React.createElement(_statusError.default, {
|
|
45
45
|
LEGACY_margin: "0 -2px 0 0",
|
|
46
46
|
color: "currentColor",
|
|
47
47
|
LEGACY_size: "small",
|
|
48
48
|
label: "error",
|
|
49
49
|
size: "small"
|
|
50
50
|
}),
|
|
51
|
-
valid: /*#__PURE__*/React.createElement(
|
|
51
|
+
valid: /*#__PURE__*/React.createElement(_statusSuccess.default, {
|
|
52
52
|
LEGACY_margin: "0 -2px 0 0",
|
|
53
53
|
color: "currentColor",
|
|
54
54
|
LEGACY_size: "small",
|
|
@@ -3,7 +3,7 @@ import "./character-counter.compiled.css";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { useContext, useEffect, useRef, useState } from 'react';
|
|
6
|
-
import ErrorIcon from '@atlaskit/icon/core/
|
|
6
|
+
import ErrorIcon from '@atlaskit/icon/core/status-error';
|
|
7
7
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
8
8
|
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
9
9
|
import { FieldId } from './field-id-context';
|
package/dist/es2019/form.js
CHANGED
|
@@ -62,7 +62,7 @@ const FormBase = (props, ref) => {
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
});
|
|
65
|
-
createDecorator(() => formRef.current ? Array.from(formRef.current.querySelectorAll('input')) : [],
|
|
65
|
+
createDecorator(() => formRef.current ? Array.from(formRef.current.querySelectorAll('input')) : [], getFirstErrorField)(finalForm);
|
|
66
66
|
return finalForm;
|
|
67
67
|
});
|
|
68
68
|
const [state, setState] = useState({
|
package/dist/es2019/messages.js
CHANGED
|
@@ -3,8 +3,8 @@ import "./messages.compiled.css";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { createContext, Fragment, useContext, useEffect, useState } from 'react';
|
|
6
|
-
import ErrorIcon from '@atlaskit/icon/core/
|
|
7
|
-
import SuccessIcon from '@atlaskit/icon/core/
|
|
6
|
+
import ErrorIcon from '@atlaskit/icon/core/status-error';
|
|
7
|
+
import SuccessIcon from '@atlaskit/icon/core/status-success';
|
|
8
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
9
|
import { FieldId } from './field-id-context';
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@ import "./character-counter.compiled.css";
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import { useContext, useEffect, useRef, useState } from 'react';
|
|
7
|
-
import ErrorIcon from '@atlaskit/icon/core/
|
|
7
|
+
import ErrorIcon from '@atlaskit/icon/core/status-error';
|
|
8
8
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
9
9
|
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
10
10
|
import { FieldId } from './field-id-context';
|
package/dist/esm/form.js
CHANGED
|
@@ -73,7 +73,7 @@ var FormBase = function FormBase(props, ref) {
|
|
|
73
73
|
});
|
|
74
74
|
createDecorator(function () {
|
|
75
75
|
return formRef.current ? Array.from(formRef.current.querySelectorAll('input')) : [];
|
|
76
|
-
},
|
|
76
|
+
}, getFirstErrorField)(finalForm);
|
|
77
77
|
return finalForm;
|
|
78
78
|
}),
|
|
79
79
|
_useState2 = _slicedToArray(_useState, 1),
|
package/dist/esm/messages.js
CHANGED
|
@@ -4,8 +4,8 @@ import "./messages.compiled.css";
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import { createContext, Fragment, useContext, useEffect, useState } from 'react';
|
|
7
|
-
import ErrorIcon from '@atlaskit/icon/core/
|
|
8
|
-
import SuccessIcon from '@atlaskit/icon/core/
|
|
7
|
+
import ErrorIcon from '@atlaskit/icon/core/status-error';
|
|
8
|
+
import SuccessIcon from '@atlaskit/icon/core/status-success';
|
|
9
9
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
10
|
import { FieldId } from './field-id-context';
|
|
11
11
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/form",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.1.1",
|
|
4
4
|
"description": "A form allows people to input information.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@atlaskit/css": "^0.18.0",
|
|
29
29
|
"@atlaskit/ds-lib": "^5.3.0",
|
|
30
30
|
"@atlaskit/heading": "^5.2.0",
|
|
31
|
-
"@atlaskit/icon": "^29.
|
|
31
|
+
"@atlaskit/icon": "^29.3.0",
|
|
32
32
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
33
33
|
"@atlaskit/primitives": "^16.4.0",
|
|
34
34
|
"@atlaskit/tokens": "^8.6.0",
|
|
@@ -113,9 +113,6 @@
|
|
|
113
113
|
"platform_dst_form_screenreader_message_fix": {
|
|
114
114
|
"type": "boolean"
|
|
115
115
|
},
|
|
116
|
-
"platform-form-field-error-focus": {
|
|
117
|
-
"type": "boolean"
|
|
118
|
-
},
|
|
119
116
|
"platform-form-reset-field-state": {
|
|
120
117
|
"type": "boolean"
|
|
121
118
|
},
|