@atlaskit/form 12.6.1 → 12.7.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/CHANGELOG.md +16 -2
- package/dist/cjs/field.js +15 -7
- package/dist/cjs/fieldset.js +1 -1
- package/dist/cjs/form-footer.js +1 -1
- package/dist/cjs/form-header.js +1 -1
- package/dist/cjs/form-section.js +1 -1
- package/dist/cjs/label.js +1 -1
- package/dist/cjs/messages.js +1 -1
- package/dist/cjs/required-asterisk.js +1 -1
- package/dist/es2019/field.js +11 -4
- package/dist/es2019/fieldset.js +1 -1
- package/dist/es2019/form-footer.js +1 -1
- package/dist/es2019/form-header.js +1 -1
- package/dist/es2019/form-section.js +1 -1
- package/dist/es2019/label.js +1 -1
- package/dist/es2019/messages.js +1 -1
- package/dist/es2019/required-asterisk.js +1 -1
- package/dist/esm/field.js +12 -4
- package/dist/esm/fieldset.js +1 -1
- package/dist/esm/form-footer.js +1 -1
- package/dist/esm/form-header.js +1 -1
- package/dist/esm/form-section.js +1 -1
- package/dist/esm/label.js +1 -1
- package/dist/esm/messages.js +1 -1
- package/dist/esm/required-asterisk.js +1 -1
- package/dist/types/field.d.ts +22 -4
- package/dist/types-ts4.5/field.d.ts +22 -4
- package/offerings.json +40 -0
- package/package.json +6 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/form
|
|
2
2
|
|
|
3
|
+
## 12.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`edef4ab21e5c5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/edef4ab21e5c5) -
|
|
8
|
+
We are testing a new streamlined implementation of the field component behind a feature flag. If
|
|
9
|
+
this fix is successful it will be available in a later release.
|
|
10
|
+
|
|
11
|
+
## 12.6.2
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`2f220beaedb7a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2f220beaedb7a) -
|
|
16
|
+
Remove unused dependency.
|
|
17
|
+
|
|
3
18
|
## 12.6.1
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -307,8 +322,7 @@
|
|
|
307
322
|
handle `.css` imports correctly.Most bundlers come with built-in support for `.css` imports, so
|
|
308
323
|
you may not need to do anything. If you are using a different bundler, please refer to the
|
|
309
324
|
documentation for that bundler to understand how to handle `.css` imports.For more information on
|
|
310
|
-
the migration, please refer to [RFC-73 Migrating our components to
|
|
311
|
-
Compiled
|
|
325
|
+
the migration, please refer to [RFC-73 Migrating our components to Compiled
|
|
312
326
|
CSS-in-JS](https://community.developer.atlassian.com/t/rfc-73-migrating-our-components-to-compiled-css-in-js/859
|
|
313
327
|
|
|
314
328
|
## 10.6.3
|
package/dist/cjs/field.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* field.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* field.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
@@ -8,16 +8,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
});
|
|
9
9
|
exports.default = Field;
|
|
10
10
|
require("./field.compiled.css");
|
|
11
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
-
var React = _react;
|
|
13
11
|
var _runtime = require("@compiled/react/runtime");
|
|
14
12
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
13
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
16
14
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
15
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
17
16
|
var _useId = require("@atlaskit/ds-lib/use-id");
|
|
17
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
18
18
|
var _fieldIdContext = require("./field-id-context");
|
|
19
19
|
var _form = require("./form");
|
|
20
20
|
var _label = require("./label");
|
|
21
|
+
var _messages = require("./messages");
|
|
21
22
|
var _requiredAsterisk = _interopRequireDefault(require("./required-asterisk"));
|
|
22
23
|
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" != _typeof3(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); }
|
|
23
24
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -67,6 +68,11 @@ function isShallowEqual(previousValue, currentValue) {
|
|
|
67
68
|
}
|
|
68
69
|
function Field(props) {
|
|
69
70
|
var _getCurrentValue;
|
|
71
|
+
var _props$children = props.children,
|
|
72
|
+
children = _props$children === void 0 ? function () {
|
|
73
|
+
return null;
|
|
74
|
+
} : _props$children,
|
|
75
|
+
component = props.component;
|
|
70
76
|
var _useContext = (0, _react.useContext)(_form.FormContext),
|
|
71
77
|
registerField = _useContext.registerField,
|
|
72
78
|
getCurrentValue = _useContext.getCurrentValue;
|
|
@@ -248,16 +254,18 @@ function Field(props) {
|
|
|
248
254
|
'aria-labelledby': "".concat(fieldId, "-label"),
|
|
249
255
|
id: fieldId
|
|
250
256
|
});
|
|
251
|
-
return /*#__PURE__*/
|
|
257
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
252
258
|
"data-testid": props.testId,
|
|
253
259
|
className: (0, _runtime.ax)(["_1pfhu2gc"])
|
|
254
|
-
}, props.label && /*#__PURE__*/
|
|
260
|
+
}, props.label && /*#__PURE__*/_react.default.createElement(_label.Label, {
|
|
255
261
|
htmlFor: fieldId,
|
|
256
262
|
id: "".concat(fieldId, "-label"),
|
|
257
263
|
testId: props.testId && "".concat(props.testId, "--label")
|
|
258
|
-
}, props.label, props.isRequired && /*#__PURE__*/
|
|
264
|
+
}, props.label, props.isRequired && /*#__PURE__*/_react.default.createElement(_requiredAsterisk.default, null), props.elementAfterLabel), /*#__PURE__*/_react.default.createElement(_fieldIdContext.FieldId.Provider, {
|
|
259
265
|
value: fieldId
|
|
260
|
-
},
|
|
266
|
+
}, component && (0, _platformFeatureFlags.fg)('platform_design-system-team_field-upgrade') ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, component && component({
|
|
267
|
+
fieldProps: extendedFieldProps
|
|
268
|
+
}), /*#__PURE__*/_react.default.createElement(_messages.MessageWrapper, null, props.helperMessage && /*#__PURE__*/_react.default.createElement(_messages.HelperMessage, null, props.helperMessage), state.error && /*#__PURE__*/_react.default.createElement(_messages.ErrorMessage, null, props.errorMessage || state.error), state.meta.touched && state.valid && props.validMessage && /*#__PURE__*/_react.default.createElement(_messages.ValidMessage, null, props.validMessage))) : children({
|
|
261
269
|
fieldProps: extendedFieldProps,
|
|
262
270
|
error: state.error,
|
|
263
271
|
valid: state.valid,
|
package/dist/cjs/fieldset.js
CHANGED
package/dist/cjs/form-footer.js
CHANGED
package/dist/cjs/form-header.js
CHANGED
package/dist/cjs/form-section.js
CHANGED
package/dist/cjs/label.js
CHANGED
package/dist/cjs/messages.js
CHANGED
package/dist/es2019/field.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
/* field.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* field.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
2
|
import "./field.compiled.css";
|
|
3
|
-
import * as React from 'react';
|
|
4
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import { useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
4
|
+
import React, { useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
6
5
|
import { useId } from '@atlaskit/ds-lib/use-id';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
7
|
import { FieldId } from './field-id-context';
|
|
8
8
|
import { FormContext, IsDisabledContext } from './form';
|
|
9
9
|
import { Label } from './label';
|
|
10
|
+
import { ErrorMessage, HelperMessage, MessageWrapper, ValidMessage } from './messages';
|
|
10
11
|
import RequiredAsterisk from './required-asterisk';
|
|
11
12
|
const fieldWrapperStyles = null;
|
|
12
13
|
function isEvent(event) {
|
|
@@ -53,6 +54,10 @@ function isShallowEqual(previousValue, currentValue) {
|
|
|
53
54
|
}
|
|
54
55
|
export default function Field(props) {
|
|
55
56
|
var _getCurrentValue;
|
|
57
|
+
const {
|
|
58
|
+
children = () => null,
|
|
59
|
+
component
|
|
60
|
+
} = props;
|
|
56
61
|
const {
|
|
57
62
|
registerField,
|
|
58
63
|
getCurrentValue
|
|
@@ -241,7 +246,9 @@ export default function Field(props) {
|
|
|
241
246
|
testId: props.testId && `${props.testId}--label`
|
|
242
247
|
}, props.label, props.isRequired && /*#__PURE__*/React.createElement(RequiredAsterisk, null), props.elementAfterLabel), /*#__PURE__*/React.createElement(FieldId.Provider, {
|
|
243
248
|
value: fieldId
|
|
244
|
-
},
|
|
249
|
+
}, component && fg('platform_design-system-team_field-upgrade') ? /*#__PURE__*/React.createElement(React.Fragment, null, component && component({
|
|
250
|
+
fieldProps: extendedFieldProps
|
|
251
|
+
}), /*#__PURE__*/React.createElement(MessageWrapper, null, props.helperMessage && /*#__PURE__*/React.createElement(HelperMessage, null, props.helperMessage), state.error && /*#__PURE__*/React.createElement(ErrorMessage, null, props.errorMessage || state.error), state.meta.touched && state.valid && props.validMessage && /*#__PURE__*/React.createElement(ValidMessage, null, props.validMessage))) : children({
|
|
245
252
|
fieldProps: extendedFieldProps,
|
|
246
253
|
error: state.error,
|
|
247
254
|
valid: state.valid,
|
package/dist/es2019/fieldset.js
CHANGED
package/dist/es2019/label.js
CHANGED
package/dist/es2019/messages.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* required-asterisk.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* required-asterisk.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
2
|
import "./required-asterisk.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
package/dist/esm/field.js
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
/* field.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* field.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
4
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
5
5
|
import "./field.compiled.css";
|
|
6
|
-
import * as React from 'react';
|
|
7
6
|
import { ax, ix } from "@compiled/react/runtime";
|
|
8
7
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9
8
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10
|
-
import { useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
9
|
+
import React, { useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
11
10
|
import { useId } from '@atlaskit/ds-lib/use-id';
|
|
11
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
12
|
import { FieldId } from './field-id-context';
|
|
13
13
|
import { FormContext, IsDisabledContext } from './form';
|
|
14
14
|
import { Label } from './label';
|
|
15
|
+
import { ErrorMessage, HelperMessage, MessageWrapper, ValidMessage } from './messages';
|
|
15
16
|
import RequiredAsterisk from './required-asterisk';
|
|
16
17
|
var fieldWrapperStyles = null;
|
|
17
18
|
function isEvent(event) {
|
|
@@ -58,6 +59,11 @@ function isShallowEqual(previousValue, currentValue) {
|
|
|
58
59
|
}
|
|
59
60
|
export default function Field(props) {
|
|
60
61
|
var _getCurrentValue;
|
|
62
|
+
var _props$children = props.children,
|
|
63
|
+
children = _props$children === void 0 ? function () {
|
|
64
|
+
return null;
|
|
65
|
+
} : _props$children,
|
|
66
|
+
component = props.component;
|
|
61
67
|
var _useContext = useContext(FormContext),
|
|
62
68
|
registerField = _useContext.registerField,
|
|
63
69
|
getCurrentValue = _useContext.getCurrentValue;
|
|
@@ -248,7 +254,9 @@ export default function Field(props) {
|
|
|
248
254
|
testId: props.testId && "".concat(props.testId, "--label")
|
|
249
255
|
}, props.label, props.isRequired && /*#__PURE__*/React.createElement(RequiredAsterisk, null), props.elementAfterLabel), /*#__PURE__*/React.createElement(FieldId.Provider, {
|
|
250
256
|
value: fieldId
|
|
251
|
-
},
|
|
257
|
+
}, component && fg('platform_design-system-team_field-upgrade') ? /*#__PURE__*/React.createElement(React.Fragment, null, component && component({
|
|
258
|
+
fieldProps: extendedFieldProps
|
|
259
|
+
}), /*#__PURE__*/React.createElement(MessageWrapper, null, props.helperMessage && /*#__PURE__*/React.createElement(HelperMessage, null, props.helperMessage), state.error && /*#__PURE__*/React.createElement(ErrorMessage, null, props.errorMessage || state.error), state.meta.touched && state.valid && props.validMessage && /*#__PURE__*/React.createElement(ValidMessage, null, props.validMessage))) : children({
|
|
252
260
|
fieldProps: extendedFieldProps,
|
|
253
261
|
error: state.error,
|
|
254
262
|
valid: state.valid,
|
package/dist/esm/fieldset.js
CHANGED
package/dist/esm/form-footer.js
CHANGED
package/dist/esm/form-header.js
CHANGED
package/dist/esm/form-section.js
CHANGED
package/dist/esm/label.js
CHANGED
package/dist/esm/messages.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* required-asterisk.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* required-asterisk.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
2
|
import "./required-asterisk.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
package/dist/types/field.d.ts
CHANGED
|
@@ -29,16 +29,34 @@ export interface Meta {
|
|
|
29
29
|
submitError?: boolean;
|
|
30
30
|
validating?: boolean;
|
|
31
31
|
}
|
|
32
|
-
export
|
|
32
|
+
export type FieldComponentProps<FieldValue, Element extends SupportedElements> = {
|
|
33
33
|
/**
|
|
34
|
-
* Content to render in the field. This is a function that is called with props for the field component and other information about the field.
|
|
34
|
+
* Content to render in the field. This is a function that is called with props for the field component and other information about the field. This cannot be used at the same time as the `component` prop.
|
|
35
35
|
*/
|
|
36
|
-
children
|
|
36
|
+
children?: (args: {
|
|
37
37
|
fieldProps: FieldProps<FieldValue, Element>;
|
|
38
38
|
error?: string;
|
|
39
39
|
valid: boolean;
|
|
40
40
|
meta: Meta;
|
|
41
41
|
}) => ReactNode;
|
|
42
|
+
/**
|
|
43
|
+
* Content to render in the field. This will be rendered with the `*Message` props. This cannot be used at the same time as the `children` prop.
|
|
44
|
+
*/
|
|
45
|
+
component?: (args: {
|
|
46
|
+
fieldProps: FieldProps<FieldValue, Element>;
|
|
47
|
+
}) => ReactNode;
|
|
48
|
+
/**
|
|
49
|
+
* Renders a `HelperMessage` with the provided content when using the `component` prop.
|
|
50
|
+
*/
|
|
51
|
+
helperMessage?: ReactNode;
|
|
52
|
+
/**
|
|
53
|
+
* Renders an `ErrorMessage` with the provided content when using the `component` prop.
|
|
54
|
+
*/
|
|
55
|
+
errorMessage?: ReactNode;
|
|
56
|
+
/**
|
|
57
|
+
* Renders a `ValidMessage` with the provided content when using the `component` prop.
|
|
58
|
+
*/
|
|
59
|
+
validMessage?: ReactNode;
|
|
42
60
|
/**
|
|
43
61
|
* Sets the default value of the field. If a function is provided, it is called with the current default value of the field.
|
|
44
62
|
*/
|
|
@@ -79,6 +97,6 @@ export interface FieldComponentProps<FieldValue, Element extends SupportedElemen
|
|
|
79
97
|
* A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests
|
|
80
98
|
*/
|
|
81
99
|
testId?: string;
|
|
82
|
-
}
|
|
100
|
+
};
|
|
83
101
|
export default function Field<FieldValue = string, Element extends SupportedElements = HTMLInputElement>(props: FieldComponentProps<FieldValue, Element>): JSX.Element;
|
|
84
102
|
export {};
|
|
@@ -29,16 +29,34 @@ export interface Meta {
|
|
|
29
29
|
submitError?: boolean;
|
|
30
30
|
validating?: boolean;
|
|
31
31
|
}
|
|
32
|
-
export
|
|
32
|
+
export type FieldComponentProps<FieldValue, Element extends SupportedElements> = {
|
|
33
33
|
/**
|
|
34
|
-
* Content to render in the field. This is a function that is called with props for the field component and other information about the field.
|
|
34
|
+
* Content to render in the field. This is a function that is called with props for the field component and other information about the field. This cannot be used at the same time as the `component` prop.
|
|
35
35
|
*/
|
|
36
|
-
children
|
|
36
|
+
children?: (args: {
|
|
37
37
|
fieldProps: FieldProps<FieldValue, Element>;
|
|
38
38
|
error?: string;
|
|
39
39
|
valid: boolean;
|
|
40
40
|
meta: Meta;
|
|
41
41
|
}) => ReactNode;
|
|
42
|
+
/**
|
|
43
|
+
* Content to render in the field. This will be rendered with the `*Message` props. This cannot be used at the same time as the `children` prop.
|
|
44
|
+
*/
|
|
45
|
+
component?: (args: {
|
|
46
|
+
fieldProps: FieldProps<FieldValue, Element>;
|
|
47
|
+
}) => ReactNode;
|
|
48
|
+
/**
|
|
49
|
+
* Renders a `HelperMessage` with the provided content when using the `component` prop.
|
|
50
|
+
*/
|
|
51
|
+
helperMessage?: ReactNode;
|
|
52
|
+
/**
|
|
53
|
+
* Renders an `ErrorMessage` with the provided content when using the `component` prop.
|
|
54
|
+
*/
|
|
55
|
+
errorMessage?: ReactNode;
|
|
56
|
+
/**
|
|
57
|
+
* Renders a `ValidMessage` with the provided content when using the `component` prop.
|
|
58
|
+
*/
|
|
59
|
+
validMessage?: ReactNode;
|
|
42
60
|
/**
|
|
43
61
|
* Sets the default value of the field. If a function is provided, it is called with the current default value of the field.
|
|
44
62
|
*/
|
|
@@ -79,6 +97,6 @@ export interface FieldComponentProps<FieldValue, Element extends SupportedElemen
|
|
|
79
97
|
* A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests
|
|
80
98
|
*/
|
|
81
99
|
testId?: string;
|
|
82
|
-
}
|
|
100
|
+
};
|
|
83
101
|
export default function Field<FieldValue = string, Element extends SupportedElements = HTMLInputElement>(props: FieldComponentProps<FieldValue, Element>): JSX.Element;
|
|
84
102
|
export {};
|
package/offerings.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"name": "Form",
|
|
4
|
+
"package": "@atlaskit/form",
|
|
5
|
+
"import": {
|
|
6
|
+
"name": "Form",
|
|
7
|
+
"package": "@atlaskit/form",
|
|
8
|
+
"type": "default"
|
|
9
|
+
},
|
|
10
|
+
"keywords": ["form", "validation", "field", "input", "submit", "state"],
|
|
11
|
+
"categories": ["form"],
|
|
12
|
+
"shortDescription": "A component for building forms with validation and state management.",
|
|
13
|
+
"status": "general-availability",
|
|
14
|
+
"accessibilityGuidelines": [
|
|
15
|
+
"Provide clear labels for all form fields",
|
|
16
|
+
"Use appropriate error messaging",
|
|
17
|
+
"Ensure keyboard navigation between fields",
|
|
18
|
+
"Mark required fields clearly",
|
|
19
|
+
"Provide helpful validation feedback"
|
|
20
|
+
],
|
|
21
|
+
"usageGuidelines": [
|
|
22
|
+
"Use for complex forms with validation",
|
|
23
|
+
"Provide clear field labels and instructions",
|
|
24
|
+
"Use single column layout for better comprehension",
|
|
25
|
+
"Mark required fields with asterisk (*)",
|
|
26
|
+
"Provide specific error messages"
|
|
27
|
+
],
|
|
28
|
+
"contentGuidelines": [
|
|
29
|
+
"Use clear, concise labels",
|
|
30
|
+
"Write helpful placeholder text",
|
|
31
|
+
"Provide specific error messages",
|
|
32
|
+
"Use consistent terminology",
|
|
33
|
+
"Always include a visible label (exception: search fields)",
|
|
34
|
+
"Match field length to intended content length"
|
|
35
|
+
],
|
|
36
|
+
"examples": {
|
|
37
|
+
"basic": "./examples/ai/form.tsx"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/form",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.7.0",
|
|
4
4
|
"description": "A form allows users to input information.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -28,10 +28,9 @@
|
|
|
28
28
|
"@atlaskit/css": "^0.14.0",
|
|
29
29
|
"@atlaskit/ds-lib": "^5.0.0",
|
|
30
30
|
"@atlaskit/heading": "^5.2.0",
|
|
31
|
-
"@atlaskit/icon": "^28.
|
|
31
|
+
"@atlaskit/icon": "^28.2.0",
|
|
32
32
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
33
33
|
"@atlaskit/primitives": "^14.14.0",
|
|
34
|
-
"@atlaskit/theme": "^21.0.0",
|
|
35
34
|
"@atlaskit/tokens": "^6.3.0",
|
|
36
35
|
"@babel/runtime": "^7.0.0",
|
|
37
36
|
"final-form": "^4.20.3",
|
|
@@ -57,7 +56,7 @@
|
|
|
57
56
|
"@atlaskit/radio": "^8.3.0",
|
|
58
57
|
"@atlaskit/range": "^9.2.0",
|
|
59
58
|
"@atlaskit/section-message": "^8.7.0",
|
|
60
|
-
"@atlaskit/select": "^21.
|
|
59
|
+
"@atlaskit/select": "^21.3.0",
|
|
61
60
|
"@atlaskit/textarea": "^8.0.0",
|
|
62
61
|
"@atlaskit/textfield": "^8.0.0",
|
|
63
62
|
"@atlaskit/toggle": "^15.1.0",
|
|
@@ -117,6 +116,9 @@
|
|
|
117
116
|
"platform_design-system-team_form-upgrade": {
|
|
118
117
|
"type": "boolean"
|
|
119
118
|
},
|
|
119
|
+
"platform_design-system-team_field-upgrade": {
|
|
120
|
+
"type": "boolean"
|
|
121
|
+
},
|
|
120
122
|
"platform_design-system-team_checkbox-field-spread": {
|
|
121
123
|
"type": "boolean"
|
|
122
124
|
},
|