@atlaskit/form 9.0.2 → 9.0.4

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/form
2
2
 
3
+ ## 9.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#60029](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/60029) [`b9826ea49c47`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b9826ea49c47) - Update dependencies that were impacted by HOT-106483 to latest.
8
+
9
+ ## 9.0.3
10
+
11
+ ### Patch Changes
12
+
13
+ - [#59147](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/59147) [`f12e489f23b0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f12e489f23b0) - Re-build and deploy packages to NPM to resolve React/Compiled not found error (HOT-106483).
14
+
3
15
  ## 9.0.2
4
16
 
5
17
  ### Patch Changes
package/dist/cjs/field.js CHANGED
@@ -17,7 +17,7 @@ var _form = require("./form");
17
17
  var _label = require("./label");
18
18
  var _requiredAsterisk = _interopRequireDefault(require("./required-asterisk"));
19
19
  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; }
20
- 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) { (0, _defineProperty2.default)(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; }
20
+ 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) { (0, _defineProperty2.default)(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; } /** @jsx jsx */
21
21
  var fieldWrapperStyles = (0, _react2.css)({
22
22
  marginTop: "var(--ds-space-100, 8px)"
23
23
  });
@@ -244,14 +244,14 @@ function Field(props) {
244
244
  'aria-labelledby': "".concat(fieldId, "-label"),
245
245
  id: fieldId
246
246
  });
247
- return /*#__PURE__*/React.createElement("div", {
247
+ return (0, _react2.jsx)("div", {
248
248
  css: fieldWrapperStyles,
249
249
  "data-testid": props.testId
250
- }, props.label && /*#__PURE__*/React.createElement(_label.Label, {
250
+ }, props.label && (0, _react2.jsx)(_label.Label, {
251
251
  htmlFor: fieldId,
252
252
  id: "".concat(fieldId, "-label"),
253
253
  testId: props.testId && "".concat(props.testId, "--label")
254
- }, props.label, props.isRequired && /*#__PURE__*/React.createElement(_requiredAsterisk.default, null), props.elementAfterLabel), /*#__PURE__*/React.createElement(_fieldIdContext.FieldId.Provider, {
254
+ }, props.label, props.isRequired && (0, _react2.jsx)(_requiredAsterisk.default, null), props.elementAfterLabel), (0, _react2.jsx)(_fieldIdContext.FieldId.Provider, {
255
255
  value: fieldId
256
256
  }, props.children({
257
257
  fieldProps: extendedFieldProps,
@@ -6,6 +6,8 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _react = require("@emotion/react");
8
8
  var _label = require("./label");
9
+ /** @jsx jsx */
10
+
9
11
  var fieldSetStyles = (0, _react.css)({
10
12
  marginTop: "var(--ds-space-100, 8px)"
11
13
  });
@@ -23,8 +25,8 @@ var fieldSetStyles = (0, _react.css)({
23
25
  var Fieldset = function Fieldset(_ref) {
24
26
  var children = _ref.children,
25
27
  legend = _ref.legend;
26
- return /*#__PURE__*/React.createElement("fieldset", {
28
+ return (0, _react.jsx)("fieldset", {
27
29
  css: fieldSetStyles
28
- }, legend && /*#__PURE__*/React.createElement(_label.Legend, null, legend), children);
30
+ }, legend && (0, _react.jsx)(_label.Legend, null, legend), children);
29
31
  };
30
32
  var _default = exports.default = Fieldset;
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = FormFooter;
7
7
  var _react = require("@emotion/react");
8
+ /** @jsx jsx */
9
+
8
10
  var formFooterWrapperStyles = (0, _react.css)({
9
11
  display: 'flex',
10
12
  marginTop: "var(--ds-space-300, 24px)",
@@ -27,7 +29,7 @@ function FormFooter(_ref) {
27
29
  var _ref$align = _ref.align,
28
30
  align = _ref$align === void 0 ? 'end' : _ref$align,
29
31
  children = _ref.children;
30
- return /*#__PURE__*/React.createElement("footer", {
32
+ return (0, _react.jsx)("footer", {
31
33
  css: [formFooterWrapperStyles, align === 'start' && justifyContentStyles]
32
34
  }, children);
33
35
  }
@@ -7,6 +7,8 @@ exports.default = exports.FormHeaderTitle = exports.FormHeaderDescription = expo
7
7
  var _react = require("@emotion/react");
8
8
  var _constants = require("@atlaskit/theme/constants");
9
9
  var _typography = require("@atlaskit/theme/typography");
10
+ /** @jsx jsx */
11
+
10
12
  var fontFamily = (0, _constants.fontFamily)();
11
13
  var formHeaderContentStyles = (0, _react.css)({
12
14
  minWidth: '100%',
@@ -35,25 +37,25 @@ var lightH700Styles = (0, _react.css)((0, _typography.h700)({
35
37
  }));
36
38
  var FormHeaderContent = exports.FormHeaderContent = function FormHeaderContent(_ref) {
37
39
  var children = _ref.children;
38
- return /*#__PURE__*/React.createElement("div", {
40
+ return (0, _react.jsx)("div", {
39
41
  css: formHeaderContentStyles
40
42
  }, children);
41
43
  };
42
44
  var FormHeaderDescription = exports.FormHeaderDescription = function FormHeaderDescription(_ref2) {
43
45
  var children = _ref2.children;
44
- return /*#__PURE__*/React.createElement("div", {
46
+ return (0, _react.jsx)("div", {
45
47
  css: formHeaderDescriptionStyles
46
48
  }, children);
47
49
  };
48
50
  var FormHeaderTitle = exports.FormHeaderTitle = function FormHeaderTitle(_ref3) {
49
51
  var children = _ref3.children;
50
- return /*#__PURE__*/React.createElement("h2", {
52
+ return (0, _react.jsx)("h2", {
51
53
  css: [lightH700Styles, formHeaderTitleStyles]
52
54
  }, children);
53
55
  };
54
56
  var FormHeaderWrapper = function FormHeaderWrapper(_ref4) {
55
57
  var children = _ref4.children;
56
- return /*#__PURE__*/React.createElement("div", {
58
+ return (0, _react.jsx)("div", {
57
59
  css: formHeaderWrapperStyles
58
60
  }, children);
59
61
  };
@@ -72,6 +74,6 @@ var FormHeader = function FormHeader(_ref5) {
72
74
  var children = _ref5.children,
73
75
  description = _ref5.description,
74
76
  title = _ref5.title;
75
- return /*#__PURE__*/React.createElement(FormHeaderWrapper, null, title && /*#__PURE__*/React.createElement(FormHeaderTitle, null, title), description && /*#__PURE__*/React.createElement(FormHeaderDescription, null, description), children && /*#__PURE__*/React.createElement(FormHeaderContent, null, children));
77
+ return (0, _react.jsx)(FormHeaderWrapper, null, title && (0, _react.jsx)(FormHeaderTitle, null, title), description && (0, _react.jsx)(FormHeaderDescription, null, description), children && (0, _react.jsx)(FormHeaderContent, null, children));
76
78
  };
77
79
  var _default = exports.default = FormHeader;
@@ -6,6 +6,8 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _react = require("@emotion/react");
8
8
  var _typography = require("@atlaskit/theme/typography");
9
+ /** @jsx jsx */
10
+
9
11
  var formSectionDescriptionStyles = (0, _react.css)({
10
12
  marginBlockStart: "var(--ds-space-100, 8px)"
11
13
  });
@@ -29,19 +31,19 @@ var lightH600Styles = (0, _react.css)((0, _typography.h600)({
29
31
  }));
30
32
  var FormSectionWrapper = function FormSectionWrapper(_ref) {
31
33
  var children = _ref.children;
32
- return /*#__PURE__*/React.createElement("div", {
34
+ return (0, _react.jsx)("div", {
33
35
  css: formSectionWrapperStyles
34
36
  }, children);
35
37
  };
36
38
  var FormSectionTitle = function FormSectionTitle(_ref2) {
37
39
  var children = _ref2.children;
38
- return /*#__PURE__*/React.createElement("h3", {
40
+ return (0, _react.jsx)("h3", {
39
41
  css: [formSectionTitleStyles, lightH600Styles]
40
42
  }, children);
41
43
  };
42
44
  var FormSectionDescription = function FormSectionDescription(_ref3) {
43
45
  var children = _ref3.children;
44
- return /*#__PURE__*/React.createElement("div", {
46
+ return (0, _react.jsx)("div", {
45
47
  css: formSectionDescriptionStyles
46
48
  }, children);
47
49
  };
@@ -60,6 +62,6 @@ var FormSection = function FormSection(_ref4) {
60
62
  var children = _ref4.children,
61
63
  description = _ref4.description,
62
64
  title = _ref4.title;
63
- return /*#__PURE__*/React.createElement(FormSectionWrapper, null, title && /*#__PURE__*/React.createElement(FormSectionTitle, null, title), description && /*#__PURE__*/React.createElement(FormSectionDescription, null, description), children);
65
+ return (0, _react.jsx)(FormSectionWrapper, null, title && (0, _react.jsx)(FormSectionTitle, null, title), description && (0, _react.jsx)(FormSectionDescription, null, description), children);
64
66
  };
65
67
  var _default = exports.default = FormSection;
package/dist/cjs/label.js CHANGED
@@ -9,6 +9,8 @@ var _react2 = require("@emotion/react");
9
9
  var _colors = require("@atlaskit/theme/colors");
10
10
  var _constants = require("@atlaskit/theme/constants");
11
11
  var _typography = require("@atlaskit/theme/typography");
12
+ /** @jsx jsx */
13
+
12
14
  var fontFamily = (0, _constants.fontFamily)();
13
15
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
14
16
  var fieldsetLabelStyles = (0, _react2.css)([(0, _typography.h200)({
@@ -36,10 +38,10 @@ var Label = exports.Label = function Label(_ref) {
36
38
  htmlFor = _ref.htmlFor,
37
39
  id = _ref.id,
38
40
  testId = _ref.testId;
39
- return /*#__PURE__*/React.createElement(_react.Fragment, null, /*#__PURE__*/React.createElement("span", {
41
+ return (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)("span", {
40
42
  hidden: true,
41
43
  id: "label--".concat(id || htmlFor)
42
- }, children), /*#__PURE__*/React.createElement("label", {
44
+ }, children), (0, _react2.jsx)("label", {
43
45
  css: fieldsetLabelStyles,
44
46
  id: id,
45
47
  htmlFor: htmlFor,
@@ -54,7 +56,7 @@ var Label = exports.Label = function Label(_ref) {
54
56
  */
55
57
  var Legend = exports.Legend = function Legend(_ref2) {
56
58
  var children = _ref2.children;
57
- return /*#__PURE__*/React.createElement("legend", {
59
+ return (0, _react2.jsx)("legend", {
58
60
  css: fieldsetLabelStyles
59
61
  }, children);
60
62
  };
@@ -12,6 +12,8 @@ var _colors = require("@atlaskit/theme/colors");
12
12
  var _constants = require("@atlaskit/theme/constants");
13
13
  var _typography = require("@atlaskit/theme/typography");
14
14
  var _fieldIdContext = require("./field-id-context");
15
+ /** @jsx jsx */
16
+
15
17
  /**
16
18
  * API for the internal `<Message />` component. This is not public API.
17
19
  */
@@ -52,16 +54,16 @@ var iconWrapperStyles = (0, _react.css)({
52
54
  });
53
55
  var IconWrapper = function IconWrapper(_ref) {
54
56
  var children = _ref.children;
55
- return /*#__PURE__*/React.createElement("span", {
57
+ return (0, _react.jsx)("span", {
56
58
  css: iconWrapperStyles
57
59
  }, children);
58
60
  };
59
61
  var messageIcons = {
60
- error: /*#__PURE__*/React.createElement(_error.default, {
62
+ error: (0, _react.jsx)(_error.default, {
61
63
  size: "small",
62
64
  label: "error"
63
65
  }),
64
- valid: /*#__PURE__*/React.createElement(_success.default, {
66
+ valid: (0, _react.jsx)(_success.default, {
65
67
  size: "small",
66
68
  label: "success"
67
69
  })
@@ -82,13 +84,13 @@ var Message = function Message(_ref2) {
82
84
  * If the child is just a string, this is not required and we can use one
83
85
  * less DOM element.
84
86
  */
85
- var content = typeof children === 'string' ? children : /*#__PURE__*/React.createElement("span", null, children);
86
- return /*#__PURE__*/React.createElement("div", {
87
+ var content = typeof children === 'string' ? children : (0, _react.jsx)("span", null, children);
88
+ return (0, _react.jsx)("div", {
87
89
  css: [lightH200Styles, messageStyles, messageAppearanceStyles[appearance]],
88
90
  "data-testid": testId,
89
91
  id: fieldId,
90
92
  "aria-live": "polite"
91
- }, icon && /*#__PURE__*/React.createElement(IconWrapper, null, icon), content);
93
+ }, icon && (0, _react.jsx)(IconWrapper, null, icon), content);
92
94
  };
93
95
 
94
96
  /**
@@ -101,8 +103,8 @@ var Message = function Message(_ref2) {
101
103
  var HelperMessage = exports.HelperMessage = function HelperMessage(_ref3) {
102
104
  var children = _ref3.children,
103
105
  testId = _ref3.testId;
104
- return /*#__PURE__*/React.createElement(_fieldIdContext.FieldId.Consumer, null, function (fieldId) {
105
- return /*#__PURE__*/React.createElement(Message, {
106
+ return (0, _react.jsx)(_fieldIdContext.FieldId.Consumer, null, function (fieldId) {
107
+ return (0, _react.jsx)(Message, {
106
108
  fieldId: fieldId ? "".concat(fieldId, "-helper") : undefined,
107
109
  testId: testId
108
110
  }, children);
@@ -119,8 +121,8 @@ var HelperMessage = exports.HelperMessage = function HelperMessage(_ref3) {
119
121
  var ErrorMessage = exports.ErrorMessage = function ErrorMessage(_ref4) {
120
122
  var children = _ref4.children,
121
123
  testId = _ref4.testId;
122
- return /*#__PURE__*/React.createElement(_fieldIdContext.FieldId.Consumer, null, function (fieldId) {
123
- return /*#__PURE__*/React.createElement(Message, {
124
+ return (0, _react.jsx)(_fieldIdContext.FieldId.Consumer, null, function (fieldId) {
125
+ return (0, _react.jsx)(Message, {
124
126
  appearance: "error",
125
127
  fieldId: fieldId ? "".concat(fieldId, "-error") : undefined,
126
128
  testId: testId
@@ -138,8 +140,8 @@ var ErrorMessage = exports.ErrorMessage = function ErrorMessage(_ref4) {
138
140
  var ValidMessage = exports.ValidMessage = function ValidMessage(_ref5) {
139
141
  var children = _ref5.children,
140
142
  testId = _ref5.testId;
141
- return /*#__PURE__*/React.createElement(_fieldIdContext.FieldId.Consumer, null, function (fieldId) {
142
- return /*#__PURE__*/React.createElement(Message, {
143
+ return (0, _react.jsx)(_fieldIdContext.FieldId.Consumer, null, function (fieldId) {
144
+ return (0, _react.jsx)(Message, {
143
145
  appearance: "valid",
144
146
  fieldId: fieldId ? "".concat(fieldId, "-valid") : undefined,
145
147
  testId: testId
@@ -7,6 +7,8 @@ exports.default = RequiredAsterisk;
7
7
  var _react = require("@emotion/react");
8
8
  var _colors = require("@atlaskit/theme/colors");
9
9
  var _constants = require("@atlaskit/theme/constants");
10
+ /** @jsx jsx */
11
+
10
12
  var fontFamily = (0, _constants.fontFamily)();
11
13
  var requiredIndicatorStyles = (0, _react.css)({
12
14
  paddingLeft: "var(--ds-space-025, 2px)",
@@ -14,7 +16,7 @@ var requiredIndicatorStyles = (0, _react.css)({
14
16
  fontFamily: fontFamily
15
17
  });
16
18
  function RequiredAsterisk() {
17
- return /*#__PURE__*/React.createElement("span", {
19
+ return (0, _react.jsx)("span", {
18
20
  css: requiredIndicatorStyles,
19
21
  "aria-hidden": "true",
20
22
  title: "required"
@@ -1,5 +1,6 @@
1
+ /** @jsx jsx */
1
2
  import { useContext, useEffect, useMemo, useRef, useState } from 'react';
2
- import { css } from '@emotion/react';
3
+ import { css, jsx } from '@emotion/react';
3
4
  import { uid } from 'react-uid';
4
5
  import invariant from 'tiny-invariant';
5
6
  import { FieldId } from './field-id-context';
@@ -228,14 +229,14 @@ export default function Field(props) {
228
229
  'aria-labelledby': `${fieldId}-label`,
229
230
  id: fieldId
230
231
  };
231
- return /*#__PURE__*/React.createElement("div", {
232
+ return jsx("div", {
232
233
  css: fieldWrapperStyles,
233
234
  "data-testid": props.testId
234
- }, props.label && /*#__PURE__*/React.createElement(Label, {
235
+ }, props.label && jsx(Label, {
235
236
  htmlFor: fieldId,
236
237
  id: `${fieldId}-label`,
237
238
  testId: props.testId && `${props.testId}--label`
238
- }, props.label, props.isRequired && /*#__PURE__*/React.createElement(RequiredAsterisk, null), props.elementAfterLabel), /*#__PURE__*/React.createElement(FieldId.Provider, {
239
+ }, props.label, props.isRequired && jsx(RequiredAsterisk, null), props.elementAfterLabel), jsx(FieldId.Provider, {
239
240
  value: fieldId
240
241
  }, props.children({
241
242
  fieldProps: extendedFieldProps,
@@ -1,4 +1,6 @@
1
- import { css } from '@emotion/react';
1
+ /** @jsx jsx */
2
+
3
+ import { css, jsx } from '@emotion/react';
2
4
  import { Legend } from './label';
3
5
  const fieldSetStyles = css({
4
6
  marginTop: "var(--ds-space-100, 8px)"
@@ -18,8 +20,8 @@ const Fieldset = ({
18
20
  children,
19
21
  legend
20
22
  }) => {
21
- return /*#__PURE__*/React.createElement("fieldset", {
23
+ return jsx("fieldset", {
22
24
  css: fieldSetStyles
23
- }, legend && /*#__PURE__*/React.createElement(Legend, null, legend), children);
25
+ }, legend && jsx(Legend, null, legend), children);
24
26
  };
25
27
  export default Fieldset;
@@ -1,4 +1,6 @@
1
- import { css } from '@emotion/react';
1
+ /** @jsx jsx */
2
+
3
+ import { css, jsx } from '@emotion/react';
2
4
  const formFooterWrapperStyles = css({
3
5
  display: 'flex',
4
6
  marginTop: "var(--ds-space-300, 24px)",
@@ -21,7 +23,7 @@ export default function FormFooter({
21
23
  align = 'end',
22
24
  children
23
25
  }) {
24
- return /*#__PURE__*/React.createElement("footer", {
26
+ return jsx("footer", {
25
27
  css: [formFooterWrapperStyles, align === 'start' && justifyContentStyles]
26
28
  }, children);
27
29
  }
@@ -1,4 +1,6 @@
1
- import { css } from '@emotion/react';
1
+ /** @jsx jsx */
2
+
3
+ import { css, jsx } from '@emotion/react';
2
4
  import { fontFamily as getFontFamily } from '@atlaskit/theme/constants';
3
5
  import { h700 } from '@atlaskit/theme/typography';
4
6
  const fontFamily = getFontFamily();
@@ -30,28 +32,28 @@ const lightH700Styles = css(h700({
30
32
  const FormHeaderContent = ({
31
33
  children
32
34
  }) => {
33
- return /*#__PURE__*/React.createElement("div", {
35
+ return jsx("div", {
34
36
  css: formHeaderContentStyles
35
37
  }, children);
36
38
  };
37
39
  const FormHeaderDescription = ({
38
40
  children
39
41
  }) => {
40
- return /*#__PURE__*/React.createElement("div", {
42
+ return jsx("div", {
41
43
  css: formHeaderDescriptionStyles
42
44
  }, children);
43
45
  };
44
46
  const FormHeaderTitle = ({
45
47
  children
46
48
  }) => {
47
- return /*#__PURE__*/React.createElement("h2", {
49
+ return jsx("h2", {
48
50
  css: [lightH700Styles, formHeaderTitleStyles]
49
51
  }, children);
50
52
  };
51
53
  const FormHeaderWrapper = ({
52
54
  children
53
55
  }) => {
54
- return /*#__PURE__*/React.createElement("div", {
56
+ return jsx("div", {
55
57
  css: formHeaderWrapperStyles
56
58
  }, children);
57
59
  };
@@ -71,7 +73,7 @@ const FormHeader = ({
71
73
  description,
72
74
  title
73
75
  }) => {
74
- return /*#__PURE__*/React.createElement(FormHeaderWrapper, null, title && /*#__PURE__*/React.createElement(FormHeaderTitle, null, title), description && /*#__PURE__*/React.createElement(FormHeaderDescription, null, description), children && /*#__PURE__*/React.createElement(FormHeaderContent, null, children));
76
+ return jsx(FormHeaderWrapper, null, title && jsx(FormHeaderTitle, null, title), description && jsx(FormHeaderDescription, null, description), children && jsx(FormHeaderContent, null, children));
75
77
  };
76
78
  export default FormHeader;
77
79
  export { FormHeaderContent, FormHeaderDescription, FormHeaderTitle };
@@ -1,4 +1,6 @@
1
- import { css } from '@emotion/react';
1
+ /** @jsx jsx */
2
+
3
+ import { css, jsx } from '@emotion/react';
2
4
  import { h600 } from '@atlaskit/theme/typography';
3
5
  const formSectionDescriptionStyles = css({
4
6
  marginBlockStart: "var(--ds-space-100, 8px)"
@@ -24,21 +26,21 @@ const lightH600Styles = css(h600({
24
26
  const FormSectionWrapper = ({
25
27
  children
26
28
  }) => {
27
- return /*#__PURE__*/React.createElement("div", {
29
+ return jsx("div", {
28
30
  css: formSectionWrapperStyles
29
31
  }, children);
30
32
  };
31
33
  const FormSectionTitle = ({
32
34
  children
33
35
  }) => {
34
- return /*#__PURE__*/React.createElement("h3", {
36
+ return jsx("h3", {
35
37
  css: [formSectionTitleStyles, lightH600Styles]
36
38
  }, children);
37
39
  };
38
40
  const FormSectionDescription = ({
39
41
  children
40
42
  }) => {
41
- return /*#__PURE__*/React.createElement("div", {
43
+ return jsx("div", {
42
44
  css: formSectionDescriptionStyles
43
45
  }, children);
44
46
  };
@@ -58,6 +60,6 @@ const FormSection = ({
58
60
  description,
59
61
  title
60
62
  }) => {
61
- return /*#__PURE__*/React.createElement(FormSectionWrapper, null, title && /*#__PURE__*/React.createElement(FormSectionTitle, null, title), description && /*#__PURE__*/React.createElement(FormSectionDescription, null, description), children);
63
+ return jsx(FormSectionWrapper, null, title && jsx(FormSectionTitle, null, title), description && jsx(FormSectionDescription, null, description), children);
62
64
  };
63
65
  export default FormSection;
@@ -1,5 +1,6 @@
1
+ /** @jsx jsx */
1
2
  import { Fragment } from 'react';
2
- import { css } from '@emotion/react';
3
+ import { css, jsx } from '@emotion/react';
3
4
  import { N200 } from '@atlaskit/theme/colors';
4
5
  import { fontFamily as getFontFamily } from '@atlaskit/theme/constants';
5
6
  import { h200 } from '@atlaskit/theme/typography';
@@ -31,10 +32,10 @@ export const Label = ({
31
32
  id,
32
33
  testId
33
34
  }) => {
34
- return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("span", {
35
+ return jsx(Fragment, null, jsx("span", {
35
36
  hidden: true,
36
37
  id: `label--${id || htmlFor}`
37
- }, children), /*#__PURE__*/React.createElement("label", {
38
+ }, children), jsx("label", {
38
39
  css: fieldsetLabelStyles,
39
40
  id: id,
40
41
  htmlFor: htmlFor,
@@ -50,7 +51,7 @@ export const Label = ({
50
51
  export const Legend = ({
51
52
  children
52
53
  }) => {
53
- return /*#__PURE__*/React.createElement("legend", {
54
+ return jsx("legend", {
54
55
  css: fieldsetLabelStyles
55
56
  }, children);
56
57
  };
@@ -1,4 +1,6 @@
1
- import { css } from '@emotion/react';
1
+ /** @jsx jsx */
2
+
3
+ import { css, jsx } from '@emotion/react';
2
4
  import SuccessIcon from '@atlaskit/icon/glyph/editor/success';
3
5
  import ErrorIcon from '@atlaskit/icon/glyph/error';
4
6
  import { N200 } from '@atlaskit/theme/colors';
@@ -47,16 +49,16 @@ const iconWrapperStyles = css({
47
49
  const IconWrapper = ({
48
50
  children
49
51
  }) => {
50
- return /*#__PURE__*/React.createElement("span", {
52
+ return jsx("span", {
51
53
  css: iconWrapperStyles
52
54
  }, children);
53
55
  };
54
56
  const messageIcons = {
55
- error: /*#__PURE__*/React.createElement(ErrorIcon, {
57
+ error: jsx(ErrorIcon, {
56
58
  size: "small",
57
59
  label: "error"
58
60
  }),
59
- valid: /*#__PURE__*/React.createElement(SuccessIcon, {
61
+ valid: jsx(SuccessIcon, {
60
62
  size: "small",
61
63
  label: "success"
62
64
  })
@@ -77,13 +79,13 @@ const Message = ({
77
79
  * If the child is just a string, this is not required and we can use one
78
80
  * less DOM element.
79
81
  */
80
- const content = typeof children === 'string' ? children : /*#__PURE__*/React.createElement("span", null, children);
81
- return /*#__PURE__*/React.createElement("div", {
82
+ const content = typeof children === 'string' ? children : jsx("span", null, children);
83
+ return jsx("div", {
82
84
  css: [lightH200Styles, messageStyles, messageAppearanceStyles[appearance]],
83
85
  "data-testid": testId,
84
86
  id: fieldId,
85
87
  "aria-live": "polite"
86
- }, icon && /*#__PURE__*/React.createElement(IconWrapper, null, icon), content);
88
+ }, icon && jsx(IconWrapper, null, icon), content);
87
89
  };
88
90
 
89
91
  /**
@@ -96,7 +98,7 @@ const Message = ({
96
98
  export const HelperMessage = ({
97
99
  children,
98
100
  testId
99
- }) => /*#__PURE__*/React.createElement(FieldId.Consumer, null, fieldId => /*#__PURE__*/React.createElement(Message, {
101
+ }) => jsx(FieldId.Consumer, null, fieldId => jsx(Message, {
100
102
  fieldId: fieldId ? `${fieldId}-helper` : undefined,
101
103
  testId: testId
102
104
  }, children));
@@ -111,7 +113,7 @@ export const HelperMessage = ({
111
113
  export const ErrorMessage = ({
112
114
  children,
113
115
  testId
114
- }) => /*#__PURE__*/React.createElement(FieldId.Consumer, null, fieldId => /*#__PURE__*/React.createElement(Message, {
116
+ }) => jsx(FieldId.Consumer, null, fieldId => jsx(Message, {
115
117
  appearance: "error",
116
118
  fieldId: fieldId ? `${fieldId}-error` : undefined,
117
119
  testId: testId
@@ -127,7 +129,7 @@ export const ErrorMessage = ({
127
129
  export const ValidMessage = ({
128
130
  children,
129
131
  testId
130
- }) => /*#__PURE__*/React.createElement(FieldId.Consumer, null, fieldId => /*#__PURE__*/React.createElement(Message, {
132
+ }) => jsx(FieldId.Consumer, null, fieldId => jsx(Message, {
131
133
  appearance: "valid",
132
134
  fieldId: fieldId ? `${fieldId}-valid` : undefined,
133
135
  testId: testId
@@ -1,4 +1,5 @@
1
- import { css } from '@emotion/react';
1
+ /** @jsx jsx */
2
+ import { css, jsx } from '@emotion/react';
2
3
  import { R400 } from '@atlaskit/theme/colors';
3
4
  import { fontFamily as getFontFamily } from '@atlaskit/theme/constants';
4
5
  const fontFamily = getFontFamily();
@@ -8,7 +9,7 @@ const requiredIndicatorStyles = css({
8
9
  fontFamily
9
10
  });
10
11
  export default function RequiredAsterisk() {
11
- return /*#__PURE__*/React.createElement("span", {
12
+ return jsx("span", {
12
13
  css: requiredIndicatorStyles,
13
14
  "aria-hidden": "true",
14
15
  title: "required"
package/dist/esm/field.js CHANGED
@@ -3,8 +3,9 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import _typeof from "@babel/runtime/helpers/typeof";
4
4
  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; }
5
5
  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; }
6
+ /** @jsx jsx */
6
7
  import { useContext, useEffect, useMemo, useRef, useState } from 'react';
7
- import { css } from '@emotion/react';
8
+ import { css, jsx } from '@emotion/react';
8
9
  import { uid } from 'react-uid';
9
10
  import invariant from 'tiny-invariant';
10
11
  import { FieldId } from './field-id-context';
@@ -237,14 +238,14 @@ export default function Field(props) {
237
238
  'aria-labelledby': "".concat(fieldId, "-label"),
238
239
  id: fieldId
239
240
  });
240
- return /*#__PURE__*/React.createElement("div", {
241
+ return jsx("div", {
241
242
  css: fieldWrapperStyles,
242
243
  "data-testid": props.testId
243
- }, props.label && /*#__PURE__*/React.createElement(Label, {
244
+ }, props.label && jsx(Label, {
244
245
  htmlFor: fieldId,
245
246
  id: "".concat(fieldId, "-label"),
246
247
  testId: props.testId && "".concat(props.testId, "--label")
247
- }, props.label, props.isRequired && /*#__PURE__*/React.createElement(RequiredAsterisk, null), props.elementAfterLabel), /*#__PURE__*/React.createElement(FieldId.Provider, {
248
+ }, props.label, props.isRequired && jsx(RequiredAsterisk, null), props.elementAfterLabel), jsx(FieldId.Provider, {
248
249
  value: fieldId
249
250
  }, props.children({
250
251
  fieldProps: extendedFieldProps,
@@ -1,4 +1,6 @@
1
- import { css } from '@emotion/react';
1
+ /** @jsx jsx */
2
+
3
+ import { css, jsx } from '@emotion/react';
2
4
  import { Legend } from './label';
3
5
  var fieldSetStyles = css({
4
6
  marginTop: "var(--ds-space-100, 8px)"
@@ -17,8 +19,8 @@ var fieldSetStyles = css({
17
19
  var Fieldset = function Fieldset(_ref) {
18
20
  var children = _ref.children,
19
21
  legend = _ref.legend;
20
- return /*#__PURE__*/React.createElement("fieldset", {
22
+ return jsx("fieldset", {
21
23
  css: fieldSetStyles
22
- }, legend && /*#__PURE__*/React.createElement(Legend, null, legend), children);
24
+ }, legend && jsx(Legend, null, legend), children);
23
25
  };
24
26
  export default Fieldset;
@@ -1,4 +1,6 @@
1
- import { css } from '@emotion/react';
1
+ /** @jsx jsx */
2
+
3
+ import { css, jsx } from '@emotion/react';
2
4
  var formFooterWrapperStyles = css({
3
5
  display: 'flex',
4
6
  marginTop: "var(--ds-space-300, 24px)",
@@ -21,7 +23,7 @@ export default function FormFooter(_ref) {
21
23
  var _ref$align = _ref.align,
22
24
  align = _ref$align === void 0 ? 'end' : _ref$align,
23
25
  children = _ref.children;
24
- return /*#__PURE__*/React.createElement("footer", {
26
+ return jsx("footer", {
25
27
  css: [formFooterWrapperStyles, align === 'start' && justifyContentStyles]
26
28
  }, children);
27
29
  }
@@ -1,4 +1,6 @@
1
- import { css } from '@emotion/react';
1
+ /** @jsx jsx */
2
+
3
+ import { css, jsx } from '@emotion/react';
2
4
  import { fontFamily as getFontFamily } from '@atlaskit/theme/constants';
3
5
  import { h700 } from '@atlaskit/theme/typography';
4
6
  var fontFamily = getFontFamily();
@@ -29,25 +31,25 @@ var lightH700Styles = css(h700({
29
31
  }));
30
32
  var FormHeaderContent = function FormHeaderContent(_ref) {
31
33
  var children = _ref.children;
32
- return /*#__PURE__*/React.createElement("div", {
34
+ return jsx("div", {
33
35
  css: formHeaderContentStyles
34
36
  }, children);
35
37
  };
36
38
  var FormHeaderDescription = function FormHeaderDescription(_ref2) {
37
39
  var children = _ref2.children;
38
- return /*#__PURE__*/React.createElement("div", {
40
+ return jsx("div", {
39
41
  css: formHeaderDescriptionStyles
40
42
  }, children);
41
43
  };
42
44
  var FormHeaderTitle = function FormHeaderTitle(_ref3) {
43
45
  var children = _ref3.children;
44
- return /*#__PURE__*/React.createElement("h2", {
46
+ return jsx("h2", {
45
47
  css: [lightH700Styles, formHeaderTitleStyles]
46
48
  }, children);
47
49
  };
48
50
  var FormHeaderWrapper = function FormHeaderWrapper(_ref4) {
49
51
  var children = _ref4.children;
50
- return /*#__PURE__*/React.createElement("div", {
52
+ return jsx("div", {
51
53
  css: formHeaderWrapperStyles
52
54
  }, children);
53
55
  };
@@ -66,7 +68,7 @@ var FormHeader = function FormHeader(_ref5) {
66
68
  var children = _ref5.children,
67
69
  description = _ref5.description,
68
70
  title = _ref5.title;
69
- return /*#__PURE__*/React.createElement(FormHeaderWrapper, null, title && /*#__PURE__*/React.createElement(FormHeaderTitle, null, title), description && /*#__PURE__*/React.createElement(FormHeaderDescription, null, description), children && /*#__PURE__*/React.createElement(FormHeaderContent, null, children));
71
+ return jsx(FormHeaderWrapper, null, title && jsx(FormHeaderTitle, null, title), description && jsx(FormHeaderDescription, null, description), children && jsx(FormHeaderContent, null, children));
70
72
  };
71
73
  export default FormHeader;
72
74
  export { FormHeaderContent, FormHeaderDescription, FormHeaderTitle };
@@ -1,4 +1,6 @@
1
- import { css } from '@emotion/react';
1
+ /** @jsx jsx */
2
+
3
+ import { css, jsx } from '@emotion/react';
2
4
  import { h600 } from '@atlaskit/theme/typography';
3
5
  var formSectionDescriptionStyles = css({
4
6
  marginBlockStart: "var(--ds-space-100, 8px)"
@@ -23,19 +25,19 @@ var lightH600Styles = css(h600({
23
25
  }));
24
26
  var FormSectionWrapper = function FormSectionWrapper(_ref) {
25
27
  var children = _ref.children;
26
- return /*#__PURE__*/React.createElement("div", {
28
+ return jsx("div", {
27
29
  css: formSectionWrapperStyles
28
30
  }, children);
29
31
  };
30
32
  var FormSectionTitle = function FormSectionTitle(_ref2) {
31
33
  var children = _ref2.children;
32
- return /*#__PURE__*/React.createElement("h3", {
34
+ return jsx("h3", {
33
35
  css: [formSectionTitleStyles, lightH600Styles]
34
36
  }, children);
35
37
  };
36
38
  var FormSectionDescription = function FormSectionDescription(_ref3) {
37
39
  var children = _ref3.children;
38
- return /*#__PURE__*/React.createElement("div", {
40
+ return jsx("div", {
39
41
  css: formSectionDescriptionStyles
40
42
  }, children);
41
43
  };
@@ -54,6 +56,6 @@ var FormSection = function FormSection(_ref4) {
54
56
  var children = _ref4.children,
55
57
  description = _ref4.description,
56
58
  title = _ref4.title;
57
- return /*#__PURE__*/React.createElement(FormSectionWrapper, null, title && /*#__PURE__*/React.createElement(FormSectionTitle, null, title), description && /*#__PURE__*/React.createElement(FormSectionDescription, null, description), children);
59
+ return jsx(FormSectionWrapper, null, title && jsx(FormSectionTitle, null, title), description && jsx(FormSectionDescription, null, description), children);
58
60
  };
59
61
  export default FormSection;
package/dist/esm/label.js CHANGED
@@ -1,5 +1,6 @@
1
+ /** @jsx jsx */
1
2
  import { Fragment } from 'react';
2
- import { css } from '@emotion/react';
3
+ import { css, jsx } from '@emotion/react';
3
4
  import { N200 } from '@atlaskit/theme/colors';
4
5
  import { fontFamily as getFontFamily } from '@atlaskit/theme/constants';
5
6
  import { h200 } from '@atlaskit/theme/typography';
@@ -30,10 +31,10 @@ export var Label = function Label(_ref) {
30
31
  htmlFor = _ref.htmlFor,
31
32
  id = _ref.id,
32
33
  testId = _ref.testId;
33
- return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("span", {
34
+ return jsx(Fragment, null, jsx("span", {
34
35
  hidden: true,
35
36
  id: "label--".concat(id || htmlFor)
36
- }, children), /*#__PURE__*/React.createElement("label", {
37
+ }, children), jsx("label", {
37
38
  css: fieldsetLabelStyles,
38
39
  id: id,
39
40
  htmlFor: htmlFor,
@@ -48,7 +49,7 @@ export var Label = function Label(_ref) {
48
49
  */
49
50
  export var Legend = function Legend(_ref2) {
50
51
  var children = _ref2.children;
51
- return /*#__PURE__*/React.createElement("legend", {
52
+ return jsx("legend", {
52
53
  css: fieldsetLabelStyles
53
54
  }, children);
54
55
  };
@@ -1,4 +1,6 @@
1
- import { css } from '@emotion/react';
1
+ /** @jsx jsx */
2
+
3
+ import { css, jsx } from '@emotion/react';
2
4
  import SuccessIcon from '@atlaskit/icon/glyph/editor/success';
3
5
  import ErrorIcon from '@atlaskit/icon/glyph/error';
4
6
  import { N200 } from '@atlaskit/theme/colors';
@@ -46,16 +48,16 @@ var iconWrapperStyles = css({
46
48
  });
47
49
  var IconWrapper = function IconWrapper(_ref) {
48
50
  var children = _ref.children;
49
- return /*#__PURE__*/React.createElement("span", {
51
+ return jsx("span", {
50
52
  css: iconWrapperStyles
51
53
  }, children);
52
54
  };
53
55
  var messageIcons = {
54
- error: /*#__PURE__*/React.createElement(ErrorIcon, {
56
+ error: jsx(ErrorIcon, {
55
57
  size: "small",
56
58
  label: "error"
57
59
  }),
58
- valid: /*#__PURE__*/React.createElement(SuccessIcon, {
60
+ valid: jsx(SuccessIcon, {
59
61
  size: "small",
60
62
  label: "success"
61
63
  })
@@ -76,13 +78,13 @@ var Message = function Message(_ref2) {
76
78
  * If the child is just a string, this is not required and we can use one
77
79
  * less DOM element.
78
80
  */
79
- var content = typeof children === 'string' ? children : /*#__PURE__*/React.createElement("span", null, children);
80
- return /*#__PURE__*/React.createElement("div", {
81
+ var content = typeof children === 'string' ? children : jsx("span", null, children);
82
+ return jsx("div", {
81
83
  css: [lightH200Styles, messageStyles, messageAppearanceStyles[appearance]],
82
84
  "data-testid": testId,
83
85
  id: fieldId,
84
86
  "aria-live": "polite"
85
- }, icon && /*#__PURE__*/React.createElement(IconWrapper, null, icon), content);
87
+ }, icon && jsx(IconWrapper, null, icon), content);
86
88
  };
87
89
 
88
90
  /**
@@ -95,8 +97,8 @@ var Message = function Message(_ref2) {
95
97
  export var HelperMessage = function HelperMessage(_ref3) {
96
98
  var children = _ref3.children,
97
99
  testId = _ref3.testId;
98
- return /*#__PURE__*/React.createElement(FieldId.Consumer, null, function (fieldId) {
99
- return /*#__PURE__*/React.createElement(Message, {
100
+ return jsx(FieldId.Consumer, null, function (fieldId) {
101
+ return jsx(Message, {
100
102
  fieldId: fieldId ? "".concat(fieldId, "-helper") : undefined,
101
103
  testId: testId
102
104
  }, children);
@@ -113,8 +115,8 @@ export var HelperMessage = function HelperMessage(_ref3) {
113
115
  export var ErrorMessage = function ErrorMessage(_ref4) {
114
116
  var children = _ref4.children,
115
117
  testId = _ref4.testId;
116
- return /*#__PURE__*/React.createElement(FieldId.Consumer, null, function (fieldId) {
117
- return /*#__PURE__*/React.createElement(Message, {
118
+ return jsx(FieldId.Consumer, null, function (fieldId) {
119
+ return jsx(Message, {
118
120
  appearance: "error",
119
121
  fieldId: fieldId ? "".concat(fieldId, "-error") : undefined,
120
122
  testId: testId
@@ -132,8 +134,8 @@ export var ErrorMessage = function ErrorMessage(_ref4) {
132
134
  export var ValidMessage = function ValidMessage(_ref5) {
133
135
  var children = _ref5.children,
134
136
  testId = _ref5.testId;
135
- return /*#__PURE__*/React.createElement(FieldId.Consumer, null, function (fieldId) {
136
- return /*#__PURE__*/React.createElement(Message, {
137
+ return jsx(FieldId.Consumer, null, function (fieldId) {
138
+ return jsx(Message, {
137
139
  appearance: "valid",
138
140
  fieldId: fieldId ? "".concat(fieldId, "-valid") : undefined,
139
141
  testId: testId
@@ -1,4 +1,5 @@
1
- import { css } from '@emotion/react';
1
+ /** @jsx jsx */
2
+ import { css, jsx } from '@emotion/react';
2
3
  import { R400 } from '@atlaskit/theme/colors';
3
4
  import { fontFamily as getFontFamily } from '@atlaskit/theme/constants';
4
5
  var fontFamily = getFontFamily();
@@ -8,7 +9,7 @@ var requiredIndicatorStyles = css({
8
9
  fontFamily: fontFamily
9
10
  });
10
11
  export default function RequiredAsterisk() {
11
- return /*#__PURE__*/React.createElement("span", {
12
+ return jsx("span", {
12
13
  css: requiredIndicatorStyles,
13
14
  "aria-hidden": "true",
14
15
  title: "required"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/form",
3
- "version": "9.0.2",
3
+ "version": "9.0.4",
4
4
  "description": "A form allows users to input information.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -45,11 +45,11 @@
45
45
  "@af/accessibility-testing": "*",
46
46
  "@af/integration-testing": "*",
47
47
  "@af/visual-regression": "*",
48
- "@atlaskit/button": "^16.17.0",
48
+ "@atlaskit/button": "^16.18.0",
49
49
  "@atlaskit/checkbox": "^13.0.0",
50
50
  "@atlaskit/ds-lib": "^2.2.0",
51
51
  "@atlaskit/range": "^7.1.0",
52
- "@atlaskit/select": "^17.0.0",
52
+ "@atlaskit/select": "^17.0.3",
53
53
  "@atlaskit/ssr": "*",
54
54
  "@atlaskit/textfield": "^6.0.0",
55
55
  "@atlaskit/visual-regression": "*",