@atlaskit/form 8.5.9 → 8.6.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 CHANGED
@@ -1,5 +1,15 @@
1
1
  # @atlaskit/form
2
2
 
3
+ ## 8.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`ae87a1a6d39`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ae87a1a6d39) - Updates `@emotion/core` to `@emotion/react`; v10 to v11. There is no expected behavior change.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+
3
13
  ## 8.5.9
4
14
 
5
15
  ### Patch Changes
package/dist/cjs/field.js CHANGED
@@ -16,7 +16,7 @@ var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
16
16
 
17
17
  var _react = require("react");
18
18
 
19
- var _core = require("@emotion/core");
19
+ var _react2 = require("@emotion/react");
20
20
 
21
21
  var _reactUid = require("react-uid");
22
22
 
@@ -36,10 +36,10 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
36
36
 
37
37
  var gridSize = (0, _constants.gridSize)();
38
38
  var fontFamily = (0, _constants.fontFamily)();
39
- var fieldWrapperStyles = (0, _core.css)({
39
+ var fieldWrapperStyles = (0, _react2.css)({
40
40
  marginTop: gridSize
41
41
  });
42
- var requiredIndicatorStyles = (0, _core.css)({
42
+ var requiredIndicatorStyles = (0, _react2.css)({
43
43
  paddingLeft: "".concat(gridSize / 4, "px"),
44
44
  color: "var(--ds-text-danger, ".concat(_colors.R400, ")"),
45
45
  fontFamily: fontFamily
@@ -266,15 +266,15 @@ function Field(props) {
266
266
  id: fieldId
267
267
  });
268
268
 
269
- return (0, _core.jsx)("div", {
269
+ return (0, _react2.jsx)("div", {
270
270
  css: fieldWrapperStyles
271
- }, props.label && (0, _core.jsx)(_label.default, {
271
+ }, props.label && (0, _react2.jsx)(_label.default, {
272
272
  htmlFor: fieldId,
273
273
  id: "".concat(fieldId, "-label")
274
- }, props.label, props.isRequired && (0, _core.jsx)("span", {
274
+ }, props.label, props.isRequired && (0, _react2.jsx)("span", {
275
275
  css: requiredIndicatorStyles,
276
276
  "aria-hidden": "true"
277
- }, "*")), (0, _core.jsx)(FieldId.Provider, {
277
+ }, "*")), (0, _react2.jsx)(FieldId.Provider, {
278
278
  value: fieldId
279
279
  }, props.children({
280
280
  fieldProps: extendedFieldProps,
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
 
8
- var _core = require("@emotion/core");
8
+ var _react = require("@emotion/react");
9
9
 
10
10
  var _components = require("@atlaskit/theme/components");
11
11
 
@@ -16,23 +16,23 @@ var _typography = require("@atlaskit/theme/typography");
16
16
  /** @jsx jsx */
17
17
  var fontFamily = (0, _constants.fontFamily)();
18
18
  var gridSize = (0, _constants.gridSize)();
19
- var fieldsetLabelStyles = (0, _core.css)({
19
+ var fieldsetLabelStyles = (0, _react.css)({
20
20
  display: 'inline-block',
21
21
  marginTop: 0,
22
22
  marginBottom: 0,
23
23
  fontFamily: "".concat(fontFamily)
24
24
  });
25
- var fieldSetStyles = (0, _core.css)({
25
+ var fieldSetStyles = (0, _react.css)({
26
26
  marginTop: "".concat(gridSize, "px")
27
27
  }); // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
28
28
 
29
- var lightH200Styles = (0, _core.css)((0, _typography.h200)({
29
+ var lightH200Styles = (0, _react.css)((0, _typography.h200)({
30
30
  theme: {
31
31
  mode: 'light'
32
32
  }
33
33
  })); // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
34
34
 
35
- var darkH200Styles = (0, _core.css)((0, _typography.h200)({
35
+ var darkH200Styles = (0, _react.css)((0, _typography.h200)({
36
36
  theme: {
37
37
  mode: 'dark'
38
38
  }
@@ -44,7 +44,7 @@ var FieldsetLabel = function FieldsetLabel(_ref) {
44
44
  var _useGlobalTheme = (0, _components.useGlobalTheme)(),
45
45
  mode = _useGlobalTheme.mode;
46
46
 
47
- return (0, _core.jsx)("label", {
47
+ return (0, _react.jsx)("label", {
48
48
  css: [mode === 'light' ? lightH200Styles : darkH200Styles, fieldsetLabelStyles]
49
49
  }, children);
50
50
  };
@@ -63,9 +63,9 @@ var FieldsetLabel = function FieldsetLabel(_ref) {
63
63
  var Fieldset = function Fieldset(_ref2) {
64
64
  var children = _ref2.children,
65
65
  legend = _ref2.legend;
66
- return (0, _core.jsx)("fieldset", {
66
+ return (0, _react.jsx)("fieldset", {
67
67
  css: fieldSetStyles
68
- }, legend && (0, _core.jsx)("legend", null, (0, _core.jsx)(FieldsetLabel, null, legend)), children);
68
+ }, legend && (0, _react.jsx)("legend", null, (0, _react.jsx)(FieldsetLabel, null, legend)), children);
69
69
  };
70
70
 
71
71
  var _default = Fieldset;
@@ -5,18 +5,18 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = FormFooter;
7
7
 
8
- var _core = require("@emotion/core");
8
+ var _react = require("@emotion/react");
9
9
 
10
10
  var _constants = require("@atlaskit/theme/constants");
11
11
 
12
12
  /** @jsx jsx */
13
13
  var gridSize = (0, _constants.gridSize)();
14
- var formFooterWrapperStyles = (0, _core.css)({
14
+ var formFooterWrapperStyles = (0, _react.css)({
15
15
  display: 'flex',
16
16
  marginTop: "".concat(gridSize * 3, "px"),
17
17
  justifyContent: 'flex-end'
18
18
  });
19
- var justifyContentStyles = (0, _core.css)({
19
+ var justifyContentStyles = (0, _react.css)({
20
20
  justifyContent: 'flex-start'
21
21
  });
22
22
  /**
@@ -33,7 +33,7 @@ function FormFooter(_ref) {
33
33
  var _ref$align = _ref.align,
34
34
  align = _ref$align === void 0 ? 'end' : _ref$align,
35
35
  children = _ref.children;
36
- return (0, _core.jsx)("footer", {
36
+ return (0, _react.jsx)("footer", {
37
37
  css: [formFooterWrapperStyles, align === 'start' && justifyContentStyles]
38
38
  }, children);
39
39
  }
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = exports.FormHeaderTitle = exports.FormHeaderDescription = exports.FormHeaderContent = void 0;
7
7
 
8
- var _core = require("@emotion/core");
8
+ var _react = require("@emotion/react");
9
9
 
10
10
  var _components = require("@atlaskit/theme/components");
11
11
 
@@ -16,14 +16,14 @@ var _typography = require("@atlaskit/theme/typography");
16
16
  /** @jsx jsx */
17
17
  var gridSize = (0, _constants.gridSize)();
18
18
  var fontFamily = (0, _constants.fontFamily)();
19
- var formHeaderContentStyles = (0, _core.css)({
19
+ var formHeaderContentStyles = (0, _react.css)({
20
20
  minWidth: '100%',
21
21
  marginTop: "".concat(gridSize, "px")
22
22
  });
23
- var formHeaderDescriptionStyles = (0, _core.css)({
23
+ var formHeaderDescriptionStyles = (0, _react.css)({
24
24
  marginTop: "".concat(gridSize, "px")
25
25
  });
26
- var formHeaderTitleStyles = (0, _core.css)({
26
+ var formHeaderTitleStyles = (0, _react.css)({
27
27
  marginTop: 0,
28
28
  marginRight: "".concat(gridSize * 4, "px"),
29
29
  lineHeight: "".concat(gridSize * 4, "px"),
@@ -31,17 +31,17 @@ var formHeaderTitleStyles = (0, _core.css)({
31
31
  textOverflow: 'ellipsis',
32
32
  whiteSpace: 'nowrap'
33
33
  });
34
- var formHeaderWrapperStyles = (0, _core.css)({
34
+ var formHeaderWrapperStyles = (0, _react.css)({
35
35
  fontFamily: "".concat(fontFamily)
36
36
  }); // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
37
37
 
38
- var darkH700Styles = (0, _core.css)((0, _typography.h700)({
38
+ var darkH700Styles = (0, _react.css)((0, _typography.h700)({
39
39
  theme: {
40
40
  mode: 'dark'
41
41
  }
42
42
  })); // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
43
43
 
44
- var lightH700Styles = (0, _core.css)((0, _typography.h700)({
44
+ var lightH700Styles = (0, _react.css)((0, _typography.h700)({
45
45
  theme: {
46
46
  mode: 'light'
47
47
  }
@@ -49,7 +49,7 @@ var lightH700Styles = (0, _core.css)((0, _typography.h700)({
49
49
 
50
50
  var FormHeaderContent = function FormHeaderContent(_ref) {
51
51
  var children = _ref.children;
52
- return (0, _core.jsx)("div", {
52
+ return (0, _react.jsx)("div", {
53
53
  css: formHeaderContentStyles
54
54
  }, children);
55
55
  };
@@ -58,7 +58,7 @@ exports.FormHeaderContent = FormHeaderContent;
58
58
 
59
59
  var FormHeaderDescription = function FormHeaderDescription(_ref2) {
60
60
  var children = _ref2.children;
61
- return (0, _core.jsx)("div", {
61
+ return (0, _react.jsx)("div", {
62
62
  css: formHeaderDescriptionStyles
63
63
  }, children);
64
64
  };
@@ -71,7 +71,7 @@ var FormHeaderTitle = function FormHeaderTitle(_ref3) {
71
71
  var _useGlobalTheme = (0, _components.useGlobalTheme)(),
72
72
  mode = _useGlobalTheme.mode;
73
73
 
74
- return (0, _core.jsx)("h2", {
74
+ return (0, _react.jsx)("h2", {
75
75
  css: [mode === 'light' ? lightH700Styles : darkH700Styles, formHeaderTitleStyles]
76
76
  }, children);
77
77
  };
@@ -80,7 +80,7 @@ exports.FormHeaderTitle = FormHeaderTitle;
80
80
 
81
81
  var FormHeaderWrapper = function FormHeaderWrapper(_ref4) {
82
82
  var children = _ref4.children;
83
- return (0, _core.jsx)("div", {
83
+ return (0, _react.jsx)("div", {
84
84
  css: formHeaderWrapperStyles
85
85
  }, children);
86
86
  };
@@ -100,7 +100,7 @@ var FormHeader = function FormHeader(_ref5) {
100
100
  var children = _ref5.children,
101
101
  description = _ref5.description,
102
102
  title = _ref5.title;
103
- return (0, _core.jsx)(FormHeaderWrapper, null, title && (0, _core.jsx)(FormHeaderTitle, null, title), description && (0, _core.jsx)(FormHeaderDescription, null, description), children && (0, _core.jsx)(FormHeaderContent, null, children));
103
+ 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));
104
104
  };
105
105
 
106
106
  var _default = FormHeader;
@@ -9,7 +9,7 @@ exports.default = void 0;
9
9
 
10
10
  var _react = _interopRequireDefault(require("react"));
11
11
 
12
- var _core = require("@emotion/core");
12
+ var _react2 = require("@emotion/react");
13
13
 
14
14
  var _components = require("@atlaskit/theme/components");
15
15
 
@@ -19,10 +19,10 @@ var _typography = require("@atlaskit/theme/typography");
19
19
 
20
20
  /** @jsx jsx */
21
21
  var gridSize = (0, _constants.gridSize)();
22
- var formSectionDescriptionStyles = (0, _core.css)({
22
+ var formSectionDescriptionStyles = (0, _react2.css)({
23
23
  marginTop: "".concat(gridSize, "px")
24
24
  });
25
- var formSectionTitleStyles = (0, _core.css)({
25
+ var formSectionTitleStyles = (0, _react2.css)({
26
26
  marginTop: 0,
27
27
  marginRight: "".concat(gridSize * 4, "px"),
28
28
  lineHeight: "".concat(gridSize * 4, "px"),
@@ -30,17 +30,17 @@ var formSectionTitleStyles = (0, _core.css)({
30
30
  textOverflow: 'ellipsis',
31
31
  whiteSpace: 'nowrap'
32
32
  });
33
- var formSectionWrapperStyles = (0, _core.css)({
33
+ var formSectionWrapperStyles = (0, _react2.css)({
34
34
  marginTop: "".concat(gridSize * 3, "px")
35
35
  }); // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
36
36
 
37
- var lightH600Styles = (0, _core.css)((0, _typography.h600)({
37
+ var lightH600Styles = (0, _react2.css)((0, _typography.h600)({
38
38
  theme: {
39
39
  mode: 'light'
40
40
  }
41
41
  })); // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
42
42
 
43
- var darkH600Styles = (0, _core.css)((0, _typography.h600)({
43
+ var darkH600Styles = (0, _react2.css)((0, _typography.h600)({
44
44
  theme: {
45
45
  mode: 'dark'
46
46
  }
@@ -48,7 +48,7 @@ var darkH600Styles = (0, _core.css)((0, _typography.h600)({
48
48
 
49
49
  var FormSectionWrapper = function FormSectionWrapper(_ref) {
50
50
  var children = _ref.children;
51
- return (0, _core.jsx)("div", {
51
+ return (0, _react2.jsx)("div", {
52
52
  css: formSectionWrapperStyles
53
53
  }, children);
54
54
  };
@@ -59,14 +59,14 @@ var FormSectionTitle = function FormSectionTitle(_ref2) {
59
59
  var _useGlobalTheme = (0, _components.useGlobalTheme)(),
60
60
  mode = _useGlobalTheme.mode;
61
61
 
62
- return (0, _core.jsx)("h3", {
62
+ return (0, _react2.jsx)("h3", {
63
63
  css: [formSectionTitleStyles, mode === 'light' ? lightH600Styles : darkH600Styles]
64
64
  }, children);
65
65
  };
66
66
 
67
67
  var FormSectionDescription = function FormSectionDescription(_ref3) {
68
68
  var children = _ref3.children;
69
- return (0, _core.jsx)("div", {
69
+ return (0, _react2.jsx)("div", {
70
70
  css: formSectionDescriptionStyles
71
71
  }, children);
72
72
  };
@@ -86,7 +86,7 @@ var FormSection = function FormSection(_ref4) {
86
86
  var children = _ref4.children,
87
87
  description = _ref4.description,
88
88
  title = _ref4.title;
89
- return (0, _core.jsx)(FormSectionWrapper, null, title && (0, _core.jsx)(FormSectionTitle, null, title), description && (0, _core.jsx)(FormSectionDescription, null, description), children);
89
+ return (0, _react2.jsx)(FormSectionWrapper, null, title && (0, _react2.jsx)(FormSectionTitle, null, title), description && (0, _react2.jsx)(FormSectionDescription, null, description), children);
90
90
  };
91
91
 
92
92
  var _default = FormSection;
package/dist/cjs/label.js CHANGED
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
 
8
- var _core = require("@emotion/core");
8
+ var _react = require("@emotion/react");
9
9
 
10
10
  var _components = require("@atlaskit/theme/components");
11
11
 
@@ -16,20 +16,20 @@ var _typography = require("@atlaskit/theme/typography");
16
16
  /** @jsx jsx */
17
17
  var fontFamily = (0, _constants.fontFamily)();
18
18
  var gridSize = (0, _constants.gridSize)();
19
- var labelStyles = (0, _core.css)({
19
+ var labelStyles = (0, _react.css)({
20
20
  display: 'inline-block',
21
21
  marginTop: 0,
22
22
  marginBottom: gridSize / 2,
23
23
  fontFamily: fontFamily
24
24
  }); // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
25
25
 
26
- var lightH200Styles = (0, _core.css)((0, _typography.h200)({
26
+ var lightH200Styles = (0, _react.css)((0, _typography.h200)({
27
27
  theme: {
28
28
  mode: 'light'
29
29
  }
30
30
  })); // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
31
31
 
32
- var darkH200Styles = (0, _core.css)((0, _typography.h200)({
32
+ var darkH200Styles = (0, _react.css)((0, _typography.h200)({
33
33
  theme: {
34
34
  mode: 'dark'
35
35
  }
@@ -51,7 +51,7 @@ var Label = function Label(_ref) {
51
51
  var _useGlobalTheme = (0, _components.useGlobalTheme)(),
52
52
  mode = _useGlobalTheme.mode;
53
53
 
54
- return (0, _core.jsx)("label", {
54
+ return (0, _react.jsx)("label", {
55
55
  css: [mode === 'light' ? lightH200Styles : darkH200Styles, labelStyles],
56
56
  id: id,
57
57
  htmlFor: htmlFor
@@ -9,7 +9,7 @@ exports.ValidMessage = exports.HelperMessage = exports.ErrorMessage = void 0;
9
9
 
10
10
  var _react = _interopRequireDefault(require("react"));
11
11
 
12
- var _core = require("@emotion/core");
12
+ var _react2 = require("@emotion/react");
13
13
 
14
14
  var _success = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/success"));
15
15
 
@@ -29,40 +29,40 @@ var _field = require("./field");
29
29
  var gridSize = (0, _constants.gridSize)();
30
30
  var fontFamily = (0, _constants.fontFamily)(); // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
31
31
 
32
- var lightH200Styles = (0, _core.css)((0, _typography.h200)({
32
+ var lightH200Styles = (0, _react2.css)((0, _typography.h200)({
33
33
  theme: {
34
34
  mode: 'light'
35
35
  }
36
36
  })); // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
37
37
 
38
- var darkH200Styles = (0, _core.css)((0, _typography.h200)({
38
+ var darkH200Styles = (0, _react2.css)((0, _typography.h200)({
39
39
  theme: {
40
40
  mode: 'dark'
41
41
  }
42
42
  }));
43
- var messageErrorColorStyles = (0, _core.css)({
43
+ var messageErrorColorStyles = (0, _react2.css)({
44
44
  color: "var(--ds-text-danger, #AE2A19)"
45
45
  });
46
- var messageNeutralColorStyles = (0, _core.css)({
46
+ var messageNeutralColorStyles = (0, _react2.css)({
47
47
  color: "var(--ds-text-subtlest, ".concat(_colors.N200, ")")
48
48
  });
49
- var messageValidColorStyles = (0, _core.css)({
49
+ var messageValidColorStyles = (0, _react2.css)({
50
50
  color: "var(--ds-text-success, #216E4E)"
51
51
  });
52
- var messageStyles = (0, _core.css)({
52
+ var messageStyles = (0, _react2.css)({
53
53
  display: 'flex',
54
54
  marginTop: "".concat(gridSize * 0.5, "px"),
55
55
  justifyContent: 'baseline',
56
56
  fontFamily: "".concat(fontFamily),
57
57
  fontWeight: 'normal'
58
58
  });
59
- var iconWrapperStyles = (0, _core.css)({
59
+ var iconWrapperStyles = (0, _react2.css)({
60
60
  display: 'flex'
61
61
  });
62
62
 
63
63
  var IconWrapper = function IconWrapper(_ref) {
64
64
  var children = _ref.children;
65
- return (0, _core.jsx)("span", {
65
+ return (0, _react2.jsx)("span", {
66
66
  css: iconWrapperStyles
67
67
  }, children);
68
68
  };
@@ -77,7 +77,7 @@ var Message = function Message(_ref2) {
77
77
  var _useGlobalTheme = (0, _components.useGlobalTheme)(),
78
78
  mode = _useGlobalTheme.mode;
79
79
 
80
- return (0, _core.jsx)("div", {
80
+ return (0, _react2.jsx)("div", {
81
81
  css: [mode === 'light' ? lightH200Styles : darkH200Styles, messageStyles, error ? messageErrorColorStyles : valid ? messageValidColorStyles : messageNeutralColorStyles],
82
82
  "data-testid": testId,
83
83
  id: fieldId
@@ -94,8 +94,8 @@ var Message = function Message(_ref2) {
94
94
  var HelperMessage = function HelperMessage(_ref3) {
95
95
  var children = _ref3.children,
96
96
  testId = _ref3.testId;
97
- return (0, _core.jsx)(_field.FieldId.Consumer, null, function (fieldId) {
98
- return (0, _core.jsx)(Message, {
97
+ return (0, _react2.jsx)(_field.FieldId.Consumer, null, function (fieldId) {
98
+ return (0, _react2.jsx)(Message, {
99
99
  fieldId: fieldId ? "".concat(fieldId, "-helper") : undefined,
100
100
  testId: testId
101
101
  }, children);
@@ -115,12 +115,12 @@ exports.HelperMessage = HelperMessage;
115
115
  var ErrorMessage = function ErrorMessage(_ref4) {
116
116
  var children = _ref4.children,
117
117
  testId = _ref4.testId;
118
- return (0, _core.jsx)(_field.FieldId.Consumer, null, function (fieldId) {
119
- return (0, _core.jsx)(Message, {
118
+ return (0, _react2.jsx)(_field.FieldId.Consumer, null, function (fieldId) {
119
+ return (0, _react2.jsx)(Message, {
120
120
  error: true,
121
121
  fieldId: fieldId ? "".concat(fieldId, "-error") : undefined,
122
122
  testId: testId
123
- }, (0, _core.jsx)(IconWrapper, null, (0, _core.jsx)(_error.default, {
123
+ }, (0, _react2.jsx)(IconWrapper, null, (0, _react2.jsx)(_error.default, {
124
124
  size: "small",
125
125
  label: "error"
126
126
  })), children);
@@ -140,12 +140,12 @@ exports.ErrorMessage = ErrorMessage;
140
140
  var ValidMessage = function ValidMessage(_ref5) {
141
141
  var children = _ref5.children,
142
142
  testId = _ref5.testId;
143
- return (0, _core.jsx)(_field.FieldId.Consumer, null, function (fieldId) {
144
- return (0, _core.jsx)(Message, {
143
+ return (0, _react2.jsx)(_field.FieldId.Consumer, null, function (fieldId) {
144
+ return (0, _react2.jsx)(Message, {
145
145
  fieldId: fieldId ? "".concat(fieldId, "-valid") : undefined,
146
146
  testId: testId,
147
147
  valid: true
148
- }, (0, _core.jsx)(IconWrapper, null, (0, _core.jsx)(_success.default, {
148
+ }, (0, _react2.jsx)(IconWrapper, null, (0, _react2.jsx)(_success.default, {
149
149
  size: "small",
150
150
  label: "success"
151
151
  })), children);
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/form",
3
- "version": "8.5.9",
3
+ "version": "8.6.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import { createContext, useContext, useEffect, useMemo, useRef, useState } from 'react';
3
- import { css, jsx } from '@emotion/core';
3
+ import { css, jsx } from '@emotion/react';
4
4
  import { uid } from 'react-uid';
5
5
  import invariant from 'tiny-invariant';
6
6
  import { R400 } from '@atlaskit/theme/colors';
@@ -1,5 +1,5 @@
1
1
  /** @jsx jsx */
2
- import { css, jsx } from '@emotion/core';
2
+ import { css, jsx } from '@emotion/react';
3
3
  import { useGlobalTheme } from '@atlaskit/theme/components';
4
4
  import { fontFamily as getFontFamily, gridSize as getGridSize } from '@atlaskit/theme/constants';
5
5
  import { h200 } from '@atlaskit/theme/typography';
@@ -1,5 +1,5 @@
1
1
  /** @jsx jsx */
2
- import { css, jsx } from '@emotion/core';
2
+ import { css, jsx } from '@emotion/react';
3
3
  import { gridSize as getGridSize } from '@atlaskit/theme/constants';
4
4
  const gridSize = getGridSize();
5
5
  const formFooterWrapperStyles = css({
@@ -1,5 +1,5 @@
1
1
  /** @jsx jsx */
2
- import { css, jsx } from '@emotion/core';
2
+ import { css, jsx } from '@emotion/react';
3
3
  import { useGlobalTheme } from '@atlaskit/theme/components';
4
4
  import { fontFamily as getFontFamily, gridSize as getGridSize } from '@atlaskit/theme/constants';
5
5
  import { h700 } from '@atlaskit/theme/typography';
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import React from 'react';
3
- import { css, jsx } from '@emotion/core';
3
+ import { css, jsx } from '@emotion/react';
4
4
  import { useGlobalTheme } from '@atlaskit/theme/components';
5
5
  import { gridSize as getGridSize } from '@atlaskit/theme/constants';
6
6
  import { h600 } from '@atlaskit/theme/typography';
@@ -1,5 +1,5 @@
1
1
  /** @jsx jsx */
2
- import { css, jsx } from '@emotion/core';
2
+ import { css, jsx } from '@emotion/react';
3
3
  import { useGlobalTheme } from '@atlaskit/theme/components';
4
4
  import { fontFamily as getFontFamily, gridSize as getGridSize } from '@atlaskit/theme/constants';
5
5
  import { h200 } from '@atlaskit/theme/typography';
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import React from 'react';
3
- import { css, jsx } from '@emotion/core';
3
+ import { css, jsx } from '@emotion/react';
4
4
  import SuccessIcon from '@atlaskit/icon/glyph/editor/success';
5
5
  import ErrorIcon from '@atlaskit/icon/glyph/error';
6
6
  import { N200 } from '@atlaskit/theme/colors';
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/form",
3
- "version": "8.5.9",
3
+ "version": "8.6.0",
4
4
  "sideEffects": false
5
5
  }
package/dist/esm/field.js CHANGED
@@ -8,7 +8,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
8
8
 
9
9
  /** @jsx jsx */
10
10
  import { createContext, useContext, useEffect, useMemo, useRef, useState } from 'react';
11
- import { css, jsx } from '@emotion/core';
11
+ import { css, jsx } from '@emotion/react';
12
12
  import { uid } from 'react-uid';
13
13
  import invariant from 'tiny-invariant';
14
14
  import { R400 } from '@atlaskit/theme/colors';
@@ -1,5 +1,5 @@
1
1
  /** @jsx jsx */
2
- import { css, jsx } from '@emotion/core';
2
+ import { css, jsx } from '@emotion/react';
3
3
  import { useGlobalTheme } from '@atlaskit/theme/components';
4
4
  import { fontFamily as getFontFamily, gridSize as getGridSize } from '@atlaskit/theme/constants';
5
5
  import { h200 } from '@atlaskit/theme/typography';
@@ -1,5 +1,5 @@
1
1
  /** @jsx jsx */
2
- import { css, jsx } from '@emotion/core';
2
+ import { css, jsx } from '@emotion/react';
3
3
  import { gridSize as getGridSize } from '@atlaskit/theme/constants';
4
4
  var gridSize = getGridSize();
5
5
  var formFooterWrapperStyles = css({
@@ -1,5 +1,5 @@
1
1
  /** @jsx jsx */
2
- import { css, jsx } from '@emotion/core';
2
+ import { css, jsx } from '@emotion/react';
3
3
  import { useGlobalTheme } from '@atlaskit/theme/components';
4
4
  import { fontFamily as getFontFamily, gridSize as getGridSize } from '@atlaskit/theme/constants';
5
5
  import { h700 } from '@atlaskit/theme/typography';
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import React from 'react';
3
- import { css, jsx } from '@emotion/core';
3
+ import { css, jsx } from '@emotion/react';
4
4
  import { useGlobalTheme } from '@atlaskit/theme/components';
5
5
  import { gridSize as getGridSize } from '@atlaskit/theme/constants';
6
6
  import { h600 } from '@atlaskit/theme/typography';
package/dist/esm/label.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /** @jsx jsx */
2
- import { css, jsx } from '@emotion/core';
2
+ import { css, jsx } from '@emotion/react';
3
3
  import { useGlobalTheme } from '@atlaskit/theme/components';
4
4
  import { fontFamily as getFontFamily, gridSize as getGridSize } from '@atlaskit/theme/constants';
5
5
  import { h200 } from '@atlaskit/theme/typography';
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import React from 'react';
3
- import { css, jsx } from '@emotion/core';
3
+ import { css, jsx } from '@emotion/react';
4
4
  import SuccessIcon from '@atlaskit/icon/glyph/editor/success';
5
5
  import ErrorIcon from '@atlaskit/icon/glyph/error';
6
6
  import { N200 } from '@atlaskit/theme/colors';
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/form",
3
- "version": "8.5.9",
3
+ "version": "8.6.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import { FormEvent, ReactNode } from 'react';
3
+ import { jsx } from '@emotion/react';
3
4
  declare type SupportedElements = HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement;
4
5
  export interface FieldProps<FieldValue, Element extends SupportedElements = HTMLInputElement> {
5
6
  id: string;
@@ -74,5 +75,5 @@ export interface FieldComponentProps<FieldValue, Element extends SupportedElemen
74
75
  * A field id uses the context API. It provides the id of the field to message components. This links the message with the field of screenreaders.
75
76
  */
76
77
  export declare const FieldId: import("react").Context<string | undefined>;
77
- export default function Field<FieldValue = string, Element extends SupportedElements = HTMLInputElement>(props: FieldComponentProps<FieldValue, Element>): JSX.Element;
78
+ export default function Field<FieldValue = string, Element extends SupportedElements = HTMLInputElement>(props: FieldComponentProps<FieldValue, Element>): jsx.JSX.Element;
78
79
  export {};
@@ -1,5 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import { ReactNode } from 'react';
3
+ import { jsx } from '@emotion/react';
3
4
  export interface FieldsetProps {
4
5
  /**
5
6
  * Content to render in the fieldset.
@@ -20,5 +21,5 @@ export interface FieldsetProps {
20
21
  * - [Code](https://atlaskit.atlassian.com/packages/design-system/form/docs/fields)
21
22
  * - [Usage](https://atlaskit.atlassian.com/packages/design-system/form/docs/fields)
22
23
  */
23
- declare const Fieldset: ({ children, legend }: FieldsetProps) => JSX.Element;
24
+ declare const Fieldset: ({ children, legend }: FieldsetProps) => jsx.JSX.Element;
24
25
  export default Fieldset;
@@ -1,5 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import { ReactNode } from 'react';
3
+ import { jsx } from '@emotion/react';
3
4
  import { Align } from './types';
4
5
  export interface FormFooterProps {
5
6
  /**
@@ -20,4 +21,4 @@ export interface FormFooterProps {
20
21
  * - [Code](https://atlaskit.atlassian.com/packages/design-system/form/docs/layout)
21
22
  * - [Usage](https://atlaskit.atlassian.com/packages/design-system/form/docs/layout)
22
23
  */
23
- export default function FormFooter({ align, children, }: FormFooterProps): JSX.Element;
24
+ export default function FormFooter({ align, children, }: FormFooterProps): jsx.JSX.Element;
@@ -1,5 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import { FormEvent, ReactNode } from 'react';
3
+ import { jsx } from '@emotion/react';
3
4
  declare type SupportedElements = HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement;
4
5
  export interface FieldProps<FieldValue, Element extends SupportedElements = HTMLInputElement> {
5
6
  id: string;
@@ -74,5 +75,5 @@ export interface FieldComponentProps<FieldValue, Element extends SupportedElemen
74
75
  * A field id uses the context API. It provides the id of the field to message components. This links the message with the field of screenreaders.
75
76
  */
76
77
  export declare const FieldId: import("react").Context<string | undefined>;
77
- export default function Field<FieldValue = string, Element extends SupportedElements = HTMLInputElement>(props: FieldComponentProps<FieldValue, Element>): JSX.Element;
78
+ export default function Field<FieldValue = string, Element extends SupportedElements = HTMLInputElement>(props: FieldComponentProps<FieldValue, Element>): jsx.JSX.Element;
78
79
  export {};
@@ -1,5 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import { ReactNode } from 'react';
3
+ import { jsx } from '@emotion/react';
3
4
  export interface FieldsetProps {
4
5
  /**
5
6
  * Content to render in the fieldset.
@@ -20,5 +21,5 @@ export interface FieldsetProps {
20
21
  * - [Code](https://atlaskit.atlassian.com/packages/design-system/form/docs/fields)
21
22
  * - [Usage](https://atlaskit.atlassian.com/packages/design-system/form/docs/fields)
22
23
  */
23
- declare const Fieldset: ({ children, legend }: FieldsetProps) => JSX.Element;
24
+ declare const Fieldset: ({ children, legend }: FieldsetProps) => jsx.JSX.Element;
24
25
  export default Fieldset;
@@ -1,5 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import { ReactNode } from 'react';
3
+ import { jsx } from '@emotion/react';
3
4
  import { Align } from './types';
4
5
  export interface FormFooterProps {
5
6
  /**
@@ -20,4 +21,4 @@ export interface FormFooterProps {
20
21
  * - [Code](https://atlaskit.atlassian.com/packages/design-system/form/docs/layout)
21
22
  * - [Usage](https://atlaskit.atlassian.com/packages/design-system/form/docs/layout)
22
23
  */
23
- export default function FormFooter({ align, children, }: FormFooterProps): JSX.Element;
24
+ export default function FormFooter({ align, children, }: FormFooterProps): jsx.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/form",
3
- "version": "8.5.9",
3
+ "version": "8.6.0",
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
  },
46
46
  "homepage": "https://atlassian.design/components/form/",
47
47
  "dependencies": {
48
- "@atlaskit/icon": "^21.10.0",
48
+ "@atlaskit/icon": "^21.11.0",
49
49
  "@atlaskit/theme": "^12.2.0",
50
50
  "@atlaskit/tokens": "^0.10.0",
51
51
  "@babel/runtime": "^7.0.0",
52
- "@emotion/core": "^10.0.9",
52
+ "@emotion/react": "^11.7.1",
53
53
  "final-form": "^4.20.1",
54
54
  "final-form-focus": "^1.1.2",
55
55
  "lodash": "^4.17.21",
@@ -62,22 +62,22 @@
62
62
  "devDependencies": {
63
63
  "@atlaskit/button": "^16.3.0",
64
64
  "@atlaskit/calendar": "^12.4.0",
65
- "@atlaskit/checkbox": "^12.3.0",
66
- "@atlaskit/datetime-picker": "^12.2.0",
65
+ "@atlaskit/checkbox": "^12.4.0",
66
+ "@atlaskit/datetime-picker": "^12.3.0",
67
67
  "@atlaskit/docs": "^9.0.0",
68
68
  "@atlaskit/dropdown-menu": "^11.5.0",
69
69
  "@atlaskit/droplist": "^11.0.0",
70
70
  "@atlaskit/ds-lib": "^2.1.1",
71
- "@atlaskit/modal-dialog": "^12.3.0",
71
+ "@atlaskit/modal-dialog": "^12.4.0",
72
72
  "@atlaskit/radio": "^5.4.0",
73
- "@atlaskit/range": "^6.0.0",
74
- "@atlaskit/section-message": "^6.2.0",
73
+ "@atlaskit/range": "^6.1.0",
74
+ "@atlaskit/section-message": "^6.3.0",
75
75
  "@atlaskit/select": "^15.7.0",
76
76
  "@atlaskit/ssr": "*",
77
- "@atlaskit/textarea": "^4.3.0",
78
- "@atlaskit/textfield": "^5.2.0",
77
+ "@atlaskit/textarea": "^4.5.0",
78
+ "@atlaskit/textfield": "^5.3.0",
79
79
  "@atlaskit/toggle": "^12.5.0",
80
- "@atlaskit/tooltip": "^17.5.0",
80
+ "@atlaskit/tooltip": "^17.6.0",
81
81
  "@atlaskit/visual-regression": "*",
82
82
  "@atlaskit/webdriver-runner": "*",
83
83
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
package/report.api.md CHANGED
@@ -1,12 +1,15 @@
1
- ## API Report File for "@atlaskit/form"
1
+ ## API Report File for "@atlaskit/form".
2
2
 
3
- > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
3
+ > Do not edit this file. This report is auto-generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
4
6
 
5
7
  ```ts
6
8
  import { FC } from 'react';
7
9
  import { FormApi as FormApi_2 } from 'final-form';
8
10
  import { FormEvent } from 'react';
9
11
  import { FormState } from 'final-form';
12
+ import { jsx } from '@emotion/react';
10
13
  import { default as React_2 } from 'react';
11
14
  import { ReactNode } from 'react';
12
15
 
@@ -76,7 +79,7 @@ export declare const ErrorMessage: React_2.FC<MessageProps>;
76
79
  export declare function Field<
77
80
  FieldValue = string,
78
81
  Element extends SupportedElements = HTMLInputElement
79
- >(props: FieldComponentProps<FieldValue, Element>): JSX.Element;
82
+ >(props: FieldComponentProps<FieldValue, Element>): jsx.JSX.Element;
80
83
 
81
84
  declare interface FieldComponentProps<
82
85
  FieldValue,
@@ -164,7 +167,7 @@ export declare interface FieldProps<
164
167
  export declare const Fieldset: ({
165
168
  children,
166
169
  legend,
167
- }: FieldsetProps) => JSX.Element;
170
+ }: FieldsetProps) => jsx.JSX.Element;
168
171
 
169
172
  declare interface FieldsetProps {
170
173
  /**
@@ -206,7 +209,7 @@ declare interface FormChildrenProps {
206
209
  export declare function FormFooter({
207
210
  align,
208
211
  children,
209
- }: FormFooterProps): JSX.Element;
212
+ }: FormFooterProps): jsx.JSX.Element;
210
213
 
211
214
  declare interface FormFooterProps {
212
215
  /**