@atlaskit/form 11.0.0 → 11.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/field.js +14 -15
  3. package/dist/cjs/fieldset.js +14 -11
  4. package/dist/cjs/form-footer.js +18 -15
  5. package/dist/cjs/form-header.js +21 -16
  6. package/dist/cjs/form-section.js +21 -17
  7. package/dist/cjs/label.js +21 -15
  8. package/dist/cjs/messages.js +48 -34
  9. package/dist/cjs/range-field.js +13 -15
  10. package/dist/cjs/required-asterisk.js +21 -15
  11. package/dist/es2019/field.js +15 -10
  12. package/dist/es2019/fieldset.js +13 -8
  13. package/dist/es2019/form-footer.js +17 -12
  14. package/dist/es2019/form-header.js +20 -16
  15. package/dist/es2019/form-section.js +20 -17
  16. package/dist/es2019/label.js +20 -12
  17. package/dist/es2019/messages.js +47 -28
  18. package/dist/es2019/range-field.js +24 -21
  19. package/dist/es2019/required-asterisk.js +20 -12
  20. package/dist/esm/field.js +15 -10
  21. package/dist/esm/fieldset.js +13 -8
  22. package/dist/esm/form-footer.js +17 -12
  23. package/dist/esm/form-header.js +20 -16
  24. package/dist/esm/form-section.js +20 -17
  25. package/dist/esm/label.js +20 -12
  26. package/dist/esm/messages.js +47 -30
  27. package/dist/esm/range-field.js +13 -15
  28. package/dist/esm/required-asterisk.js +20 -12
  29. package/dist/types/field.d.ts +2 -1
  30. package/dist/types/fieldset.d.ts +2 -1
  31. package/dist/types/form-footer.d.ts +2 -1
  32. package/dist/types/form-header.d.ts +6 -1
  33. package/dist/types/form-section.d.ts +6 -1
  34. package/dist/types/messages.d.ts +5 -4
  35. package/dist/types/required-asterisk.d.ts +2 -2
  36. package/dist/types-ts4.5/field.d.ts +2 -1
  37. package/dist/types-ts4.5/fieldset.d.ts +2 -1
  38. package/dist/types-ts4.5/form-footer.d.ts +2 -1
  39. package/dist/types-ts4.5/form-header.d.ts +6 -1
  40. package/dist/types-ts4.5/form-section.d.ts +6 -1
  41. package/dist/types-ts4.5/messages.d.ts +5 -4
  42. package/dist/types-ts4.5/required-asterisk.d.ts +2 -2
  43. package/package.json +5 -6
  44. package/dist/cjs/field.compiled.css +0 -1
  45. package/dist/cjs/fieldset.compiled.css +0 -1
  46. package/dist/cjs/form-footer.compiled.css +0 -4
  47. package/dist/cjs/form-header.compiled.css +0 -2
  48. package/dist/cjs/form-section.compiled.css +0 -2
  49. package/dist/cjs/label.compiled.css +0 -6
  50. package/dist/cjs/messages.compiled.css +0 -10
  51. package/dist/cjs/required-asterisk.compiled.css +0 -3
  52. package/dist/es2019/field.compiled.css +0 -1
  53. package/dist/es2019/fieldset.compiled.css +0 -1
  54. package/dist/es2019/form-footer.compiled.css +0 -4
  55. package/dist/es2019/form-header.compiled.css +0 -2
  56. package/dist/es2019/form-section.compiled.css +0 -2
  57. package/dist/es2019/label.compiled.css +0 -6
  58. package/dist/es2019/messages.compiled.css +0 -10
  59. package/dist/es2019/required-asterisk.compiled.css +0 -3
  60. package/dist/esm/field.compiled.css +0 -1
  61. package/dist/esm/fieldset.compiled.css +0 -1
  62. package/dist/esm/form-footer.compiled.css +0 -4
  63. package/dist/esm/form-header.compiled.css +0 -2
  64. package/dist/esm/form-section.compiled.css +0 -2
  65. package/dist/esm/label.compiled.css +0 -6
  66. package/dist/esm/messages.compiled.css +0 -10
  67. package/dist/esm/required-asterisk.compiled.css +0 -3
@@ -1,25 +1,28 @@
1
- /* form-section.tsx generated by @compiled/babel-plugin v0.33.0 */
2
- import "./form-section.compiled.css";
3
- import { ax, ix } from "@compiled/react/runtime";
4
- import React from 'react';
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+
6
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
+ import { jsx } from '@emotion/react';
5
8
  import Heading from '@atlaskit/heading';
6
- import { Box } from '@atlaskit/primitives/compiled';
7
- var formSectionDescriptionStyles = {
8
- root: "_1pfhu2gc"
9
- };
10
- var formSectionWrapperStyles = {
11
- root: "_1pfh1ejb"
12
- };
9
+ import { Box, xcss } from '@atlaskit/primitives';
10
+ var formSectionDescriptionStyles = xcss({
11
+ marginBlockStart: 'space.100'
12
+ });
13
+ var formSectionWrapperStyles = xcss({
14
+ marginBlockStart: 'space.300'
15
+ });
13
16
  var FormSectionWrapper = function FormSectionWrapper(_ref) {
14
17
  var children = _ref.children;
15
- return /*#__PURE__*/React.createElement(Box, {
16
- xcss: formSectionWrapperStyles.root
18
+ return jsx(Box, {
19
+ xcss: formSectionWrapperStyles
17
20
  }, children);
18
21
  };
19
22
  var FormSectionDescription = function FormSectionDescription(_ref2) {
20
23
  var children = _ref2.children;
21
- return /*#__PURE__*/React.createElement(Box, {
22
- xcss: formSectionDescriptionStyles.root
24
+ return jsx(Box, {
25
+ xcss: formSectionDescriptionStyles
23
26
  }, children);
24
27
  };
25
28
 
@@ -37,8 +40,8 @@ var FormSection = function FormSection(_ref3) {
37
40
  var children = _ref3.children,
38
41
  description = _ref3.description,
39
42
  title = _ref3.title;
40
- return /*#__PURE__*/React.createElement(FormSectionWrapper, null, title && /*#__PURE__*/React.createElement(Heading, {
43
+ return jsx(FormSectionWrapper, null, title && jsx(Heading, {
41
44
  size: "medium"
42
- }, title), description && /*#__PURE__*/React.createElement(FormSectionDescription, null, description), children);
45
+ }, title), description && jsx(FormSectionDescription, null, description), children);
43
46
  };
44
47
  export default FormSection;
package/dist/esm/label.js CHANGED
@@ -1,10 +1,18 @@
1
- /* label.tsx generated by @compiled/babel-plugin v0.33.0 */
2
- import "./label.compiled.css";
3
- import * as React from 'react';
4
- import { ax, ix } from "@compiled/react/runtime";
5
- var fieldsetLabelStyles = {
6
- root: "_11c8qk37 _1e0c1o8l _syaz1gjq _k48pmoej _6rth1b66 _1pfhze3t"
7
- };
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+
6
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
+ import { css, jsx } from '@emotion/react';
8
+ var fieldsetLabelStyles = css({
9
+ display: 'inline-block',
10
+ color: "var(--ds-text-subtle, #44546F)",
11
+ font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
12
+ fontWeight: "var(--ds-font-weight-bold, 700)",
13
+ marginBlockEnd: "var(--ds-space-050, 4px)",
14
+ marginBlockStart: "var(--ds-space-0, 0px)"
15
+ });
8
16
 
9
17
  /**
10
18
  * __Label__
@@ -19,11 +27,11 @@ export var Label = function Label(_ref) {
19
27
  htmlFor = _ref.htmlFor,
20
28
  id = _ref.id,
21
29
  testId = _ref.testId;
22
- return /*#__PURE__*/React.createElement("label", {
30
+ return jsx("label", {
31
+ css: fieldsetLabelStyles,
23
32
  id: id,
24
33
  htmlFor: htmlFor,
25
- "data-testid": testId,
26
- className: ax([fieldsetLabelStyles.root])
34
+ "data-testid": testId
27
35
  }, children);
28
36
  };
29
37
 
@@ -34,8 +42,8 @@ export var Label = function Label(_ref) {
34
42
  */
35
43
  export var Legend = function Legend(_ref2) {
36
44
  var children = _ref2.children;
37
- return /*#__PURE__*/React.createElement("legend", {
38
- className: ax([fieldsetLabelStyles.root])
45
+ return jsx("legend", {
46
+ css: fieldsetLabelStyles
39
47
  }, children);
40
48
  };
41
49
  export default Label;
@@ -1,11 +1,16 @@
1
- /* messages.tsx generated by @compiled/babel-plugin v0.33.0 */
2
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
- import "./messages.compiled.css";
4
- import * as React from 'react';
5
- import { ax, ix } from "@compiled/react/runtime";
2
+ /**
3
+ * @jsxRuntime classic
4
+ * @jsx jsx
5
+ */
6
+
6
7
  import { createContext, useContext, useEffect, useRef, useState } from 'react';
8
+
9
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
10
+ import { css, jsx } from '@emotion/react';
7
11
  import ErrorIcon from '@atlaskit/icon/utility/migration/error';
8
12
  import SuccessIcon from '@atlaskit/icon/utility/migration/success--editor-success';
13
+ import { N200 } from '@atlaskit/theme/colors';
9
14
  import { FieldId } from './field-id-context';
10
15
 
11
16
  /**
@@ -16,31 +21,43 @@ import { FieldId } from './field-id-context';
16
21
  * Public API of the various message components.
17
22
  */
18
23
 
19
- var messageStyles = {
20
- root: "_zulp12x7 _11c8qk37 _1e0c1txw _1bah1q9y _1pfh1b66"
21
- };
24
+ var messageStyles = css({
25
+ display: 'flex',
26
+ justifyContent: 'baseline',
27
+ gap: "var(--ds-space-075, 6px)",
28
+ font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
29
+ marginBlockStart: "var(--ds-space-050, 4px)"
30
+ });
22
31
  var messageAppearanceStyles = {
23
- default: "_syaz1wmz",
24
- error: "_syaze6sf",
25
- valid: "_syazy73q"
26
- };
27
- var iconWrapperStyles = {
28
- root: "_1e0c1txw _4t3i7vkz _4cvr1h6o"
32
+ default: css({
33
+ color: "var(--ds-text-subtlest, ".concat(N200, ")")
34
+ }),
35
+ error: css({
36
+ color: "var(--ds-text-danger, #AE2A19)"
37
+ }),
38
+ valid: css({
39
+ color: "var(--ds-text-success, #216E4E)"
40
+ })
29
41
  };
42
+ var iconWrapperStyles = css({
43
+ display: 'flex',
44
+ height: '16px',
45
+ alignItems: 'center'
46
+ });
30
47
  var IconWrapper = function IconWrapper(_ref) {
31
48
  var children = _ref.children;
32
- return /*#__PURE__*/React.createElement("span", {
33
- className: ax([iconWrapperStyles.root])
49
+ return jsx("span", {
50
+ css: iconWrapperStyles
34
51
  }, children);
35
52
  };
36
53
  var messageIcons = {
37
- error: /*#__PURE__*/React.createElement(ErrorIcon, {
54
+ error: jsx(ErrorIcon, {
38
55
  LEGACY_margin: "0 -2px 0 0",
39
56
  color: "currentColor",
40
57
  LEGACY_size: "small",
41
58
  label: "error"
42
59
  }),
43
- valid: /*#__PURE__*/React.createElement(SuccessIcon, {
60
+ valid: jsx(SuccessIcon, {
44
61
  LEGACY_margin: "0 -2px 0 0",
45
62
  color: "currentColor",
46
63
  LEGACY_size: "small",
@@ -75,16 +92,16 @@ var Message = function Message(_ref2) {
75
92
  * If the child is just a string, this is not required and we can use one
76
93
  * less DOM element.
77
94
  */
78
- var content = typeof children === 'string' ? children : /*#__PURE__*/React.createElement("span", null, children);
79
- return /*#__PURE__*/React.createElement("div", {
95
+ var content = typeof children === 'string' ? children : jsx("span", null, children);
96
+ return jsx("div", {
97
+ css: [messageStyles, messageAppearanceStyles[appearance]],
80
98
  "data-testid": testId,
81
99
  id: fieldId,
82
100
  ref: messageRef
83
101
  // For backwards compatability, if there is a wrapper, aria-live is not needed
84
102
  ,
85
- "aria-live": !hasMessageWrapper ? 'polite' : undefined,
86
- className: ax([messageStyles.root, messageAppearanceStyles[appearance]])
87
- }, icon && /*#__PURE__*/React.createElement(IconWrapper, null, icon), content);
103
+ "aria-live": !hasMessageWrapper ? 'polite' : undefined
104
+ }, icon && jsx(IconWrapper, null, icon), content);
88
105
  };
89
106
 
90
107
  /**
@@ -97,8 +114,8 @@ var Message = function Message(_ref2) {
97
114
  export var HelperMessage = function HelperMessage(_ref3) {
98
115
  var children = _ref3.children,
99
116
  testId = _ref3.testId;
100
- return /*#__PURE__*/React.createElement(FieldId.Consumer, null, function (fieldId) {
101
- return /*#__PURE__*/React.createElement(Message, {
117
+ return jsx(FieldId.Consumer, null, function (fieldId) {
118
+ return jsx(Message, {
102
119
  fieldId: fieldId ? "".concat(fieldId, "-helper") : undefined,
103
120
  testId: testId
104
121
  }, children);
@@ -115,8 +132,8 @@ export var HelperMessage = function HelperMessage(_ref3) {
115
132
  export var ErrorMessage = function ErrorMessage(_ref4) {
116
133
  var children = _ref4.children,
117
134
  testId = _ref4.testId;
118
- return /*#__PURE__*/React.createElement(FieldId.Consumer, null, function (fieldId) {
119
- return /*#__PURE__*/React.createElement(Message, {
135
+ return jsx(FieldId.Consumer, null, function (fieldId) {
136
+ return jsx(Message, {
120
137
  appearance: "error",
121
138
  fieldId: fieldId ? "".concat(fieldId, "-error") : undefined,
122
139
  testId: testId
@@ -134,8 +151,8 @@ export var ErrorMessage = function ErrorMessage(_ref4) {
134
151
  export var ValidMessage = function ValidMessage(_ref5) {
135
152
  var children = _ref5.children,
136
153
  testId = _ref5.testId;
137
- return /*#__PURE__*/React.createElement(FieldId.Consumer, null, function (fieldId) {
138
- return /*#__PURE__*/React.createElement(Message, {
154
+ return jsx(FieldId.Consumer, null, function (fieldId) {
155
+ return jsx(Message, {
139
156
  appearance: "valid",
140
157
  fieldId: fieldId ? "".concat(fieldId, "-valid") : undefined,
141
158
  testId: testId
@@ -167,9 +184,9 @@ export var MessageWrapper = function MessageWrapper(_ref6) {
167
184
  var contextValue = {
168
185
  isWrapper: true
169
186
  };
170
- return /*#__PURE__*/React.createElement(MessageWrapperContext.Provider, {
187
+ return jsx(MessageWrapperContext.Provider, {
171
188
  value: contextValue
172
- }, /*#__PURE__*/React.createElement("div", {
189
+ }, jsx("div", {
173
190
  "aria-live": "polite",
174
191
  "data-testid": "message-wrapper"
175
192
  }, children));
@@ -17,26 +17,24 @@ import Field from './field';
17
17
  * - [Code](https://atlaskit.atlassian.com/packages/design-system/form/docs/fields#rangefield-reference)
18
18
  * - [Usage](https://atlaskit.atlassian.com/packages/design-system/form/docs/fields#rangefield-reference)
19
19
  */
20
- var RangeField = function RangeField(_ref) {
21
- var children = _ref.children,
22
- strippedProps = _objectWithoutProperties(_ref, _excluded);
20
+ var RangeField = function RangeField(props) {
21
+ var children = props.children,
22
+ strippedProps = _objectWithoutProperties(props, _excluded);
23
+ // isInvalid and isRequired are specifically invalid for range inputs
23
24
  return (
24
25
  /*#__PURE__*/
25
26
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
26
27
  React.createElement(Field, _extends({}, strippedProps, {
27
28
  transform: Number
28
- }), function (_ref2) {
29
- var _ref2$fieldProps = _ref2.fieldProps,
30
- isInvalid = _ref2$fieldProps.isInvalid,
31
- isRequired = _ref2$fieldProps.isRequired,
32
- fieldProps = _objectWithoutProperties(_ref2$fieldProps, _excluded2),
33
- rest = _objectWithoutProperties(_ref2, _excluded3);
34
- return (
35
- // isInvalid and isRequired are specifically invalid for range inputs
36
- children(_objectSpread({
37
- fieldProps: fieldProps
38
- }, rest))
39
- );
29
+ }), function (_ref) {
30
+ var _ref$fieldProps = _ref.fieldProps,
31
+ isInvalid = _ref$fieldProps.isInvalid,
32
+ isRequired = _ref$fieldProps.isRequired,
33
+ fieldProps = _objectWithoutProperties(_ref$fieldProps, _excluded2),
34
+ rest = _objectWithoutProperties(_ref, _excluded3);
35
+ return children(_objectSpread({
36
+ fieldProps: fieldProps
37
+ }, rest));
40
38
  })
41
39
  );
42
40
  };
@@ -1,14 +1,22 @@
1
- /* required-asterisk.tsx generated by @compiled/babel-plugin v0.33.0 */
2
- import "./required-asterisk.compiled.css";
3
- import * as React from 'react';
4
- import { ax, ix } from "@compiled/react/runtime";
5
- var requiredIndicatorStyles = {
6
- root: "_syaz1ick _ect41sbm _bozgv77o"
7
- };
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
+ import { css, jsx } from '@emotion/react';
7
+ import { R400 } from '@atlaskit/theme/colors';
8
+ var requiredIndicatorStyles = css({
9
+ color: "var(--ds-text-danger, ".concat(R400, ")"),
10
+ fontFamily: "var(--ds-font-family-body, ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
11
+ paddingInlineStart: "var(--ds-space-025, 2px)"
12
+ });
8
13
  export default function RequiredAsterisk() {
9
- return /*#__PURE__*/React.createElement("span", {
10
- "aria-hidden": "true",
11
- title: "required",
12
- className: ax([requiredIndicatorStyles.root])
13
- }, "*");
14
+ return (
15
+ // eslint-disable-next-line @atlaskit/design-system/use-primitives-text
16
+ jsx("span", {
17
+ css: requiredIndicatorStyles,
18
+ "aria-hidden": "true",
19
+ title: "required"
20
+ }, "*")
21
+ );
14
22
  }
@@ -3,6 +3,7 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import { type FormEvent, type ReactNode } from 'react';
6
+ import { jsx } from '@emotion/react';
6
7
  type SupportedElements = HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement;
7
8
  export interface FieldProps<FieldValue, Element extends SupportedElements = HTMLInputElement> {
8
9
  id: string;
@@ -80,5 +81,5 @@ export interface FieldComponentProps<FieldValue, Element extends SupportedElemen
80
81
  */
81
82
  testId?: string;
82
83
  }
83
- export default function Field<FieldValue = string, Element extends SupportedElements = HTMLInputElement>(props: FieldComponentProps<FieldValue, Element>): JSX.Element;
84
+ export default function Field<FieldValue = string, Element extends SupportedElements = HTMLInputElement>(props: FieldComponentProps<FieldValue, Element>): jsx.JSX.Element;
84
85
  export {};
@@ -3,6 +3,7 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import { type ReactNode } from 'react';
6
+ import { jsx } from '@emotion/react';
6
7
  export interface FieldsetProps {
7
8
  /**
8
9
  * Content to render in the fieldset.
@@ -23,5 +24,5 @@ export interface FieldsetProps {
23
24
  * - [Code](https://atlaskit.atlassian.com/packages/design-system/form/docs/fields)
24
25
  * - [Usage](https://atlaskit.atlassian.com/packages/design-system/form/docs/fields)
25
26
  */
26
- declare const Fieldset: ({ children, legend }: FieldsetProps) => JSX.Element;
27
+ declare const Fieldset: ({ children, legend }: FieldsetProps) => jsx.JSX.Element;
27
28
  export default Fieldset;
@@ -3,6 +3,7 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import { type ReactNode } from 'react';
6
+ import { jsx } from '@emotion/react';
6
7
  import { type Align } from './types';
7
8
  export interface FormFooterProps {
8
9
  /**
@@ -23,4 +24,4 @@ export interface FormFooterProps {
23
24
  * - [Code](https://atlaskit.atlassian.com/packages/design-system/form/docs/layout)
24
25
  * - [Usage](https://atlaskit.atlassian.com/packages/design-system/form/docs/layout)
25
26
  */
26
- export default function FormFooter({ align, children }: FormFooterProps): JSX.Element;
27
+ export default function FormFooter({ align, children }: FormFooterProps): jsx.JSX.Element;
@@ -1,4 +1,9 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
1
5
  import { type ReactNode } from 'react';
6
+ import { jsx } from '@emotion/react';
2
7
  export interface FormHeaderProps {
3
8
  /**
4
9
  * Title of the form. This is a header.
@@ -23,5 +28,5 @@ export interface FormHeaderProps {
23
28
  * - [Code](https://atlaskit.atlassian.com/packages/design-system/form/docs/layout)
24
29
  * - [Usage](https://atlaskit.atlassian.com/packages/design-system/form/docs/layout).
25
30
  */
26
- declare const FormHeader: ({ children, description, title }: FormHeaderProps) => JSX.Element;
31
+ declare const FormHeader: ({ children, description, title }: FormHeaderProps) => jsx.JSX.Element;
27
32
  export default FormHeader;
@@ -1,4 +1,9 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
1
5
  import { type ReactNode } from 'react';
6
+ import { jsx } from '@emotion/react';
2
7
  export interface FormSectionProps {
3
8
  /**
4
9
  * Title of the form section.
@@ -23,5 +28,5 @@ export interface FormSectionProps {
23
28
  * - [Code](https://atlaskit.atlassian.com/packages/design-system/form/docs/layout)
24
29
  * - [Usage](https://atlaskit.atlassian.com/packages/design-system/form/docs/layout).
25
30
  */
26
- declare const FormSection: ({ children, description, title }: FormSectionProps) => JSX.Element;
31
+ declare const FormSection: ({ children, description, title }: FormSectionProps) => jsx.JSX.Element;
27
32
  export default FormSection;
@@ -3,6 +3,7 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import { type ReactNode } from 'react';
6
+ import { jsx } from '@emotion/react';
6
7
  type MessageAppearance = 'default' | 'error' | 'valid';
7
8
  /**
8
9
  * API for the internal `<Message />` component. This is not public API.
@@ -35,7 +36,7 @@ type MessageProps = Pick<InternalMessageProps, 'children' | 'testId'>;
35
36
  * 'Password should be more than 4 characters'
36
37
  *
37
38
  */
38
- export declare const HelperMessage: ({ children, testId }: MessageProps) => JSX.Element;
39
+ export declare const HelperMessage: ({ children, testId }: MessageProps) => jsx.JSX.Element;
39
40
  /**
40
41
  * __Error message__
41
42
  *
@@ -43,7 +44,7 @@ export declare const HelperMessage: ({ children, testId }: MessageProps) => JSX.
43
44
  * 'Invalid username, needs to be more than 4 characters'.
44
45
  *
45
46
  */
46
- export declare const ErrorMessage: ({ children, testId }: MessageProps) => JSX.Element;
47
+ export declare const ErrorMessage: ({ children, testId }: MessageProps) => jsx.JSX.Element;
47
48
  /**
48
49
  * __Valid message__
49
50
  *
@@ -51,7 +52,7 @@ export declare const ErrorMessage: ({ children, testId }: MessageProps) => JSX.E
51
52
  * a helper message could be 'Nice one, this username is available'.
52
53
  *
53
54
  */
54
- export declare const ValidMessage: ({ children, testId }: MessageProps) => JSX.Element;
55
+ export declare const ValidMessage: ({ children, testId }: MessageProps) => jsx.JSX.Element;
55
56
  /**
56
57
  * __Message wrapper context__
57
58
  *
@@ -70,5 +71,5 @@ export declare const MessageWrapperContext: import("react").Context<{
70
71
  * may not render the message.
71
72
  *
72
73
  */
73
- export declare const MessageWrapper: ({ children }: MessageProps) => JSX.Element;
74
+ export declare const MessageWrapper: ({ children }: MessageProps) => jsx.JSX.Element;
74
75
  export {};
@@ -2,5 +2,5 @@
2
2
  * @jsxRuntime classic
3
3
  * @jsx jsx
4
4
  */
5
- /// <reference types="react" />
6
- export default function RequiredAsterisk(): JSX.Element;
5
+ import { jsx } from '@emotion/react';
6
+ export default function RequiredAsterisk(): jsx.JSX.Element;
@@ -3,6 +3,7 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import { type FormEvent, type ReactNode } from 'react';
6
+ import { jsx } from '@emotion/react';
6
7
  type SupportedElements = HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement;
7
8
  export interface FieldProps<FieldValue, Element extends SupportedElements = HTMLInputElement> {
8
9
  id: string;
@@ -80,5 +81,5 @@ export interface FieldComponentProps<FieldValue, Element extends SupportedElemen
80
81
  */
81
82
  testId?: string;
82
83
  }
83
- export default function Field<FieldValue = string, Element extends SupportedElements = HTMLInputElement>(props: FieldComponentProps<FieldValue, Element>): JSX.Element;
84
+ export default function Field<FieldValue = string, Element extends SupportedElements = HTMLInputElement>(props: FieldComponentProps<FieldValue, Element>): jsx.JSX.Element;
84
85
  export {};
@@ -3,6 +3,7 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import { type ReactNode } from 'react';
6
+ import { jsx } from '@emotion/react';
6
7
  export interface FieldsetProps {
7
8
  /**
8
9
  * Content to render in the fieldset.
@@ -23,5 +24,5 @@ export interface FieldsetProps {
23
24
  * - [Code](https://atlaskit.atlassian.com/packages/design-system/form/docs/fields)
24
25
  * - [Usage](https://atlaskit.atlassian.com/packages/design-system/form/docs/fields)
25
26
  */
26
- declare const Fieldset: ({ children, legend }: FieldsetProps) => JSX.Element;
27
+ declare const Fieldset: ({ children, legend }: FieldsetProps) => jsx.JSX.Element;
27
28
  export default Fieldset;
@@ -3,6 +3,7 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import { type ReactNode } from 'react';
6
+ import { jsx } from '@emotion/react';
6
7
  import { type Align } from './types';
7
8
  export interface FormFooterProps {
8
9
  /**
@@ -23,4 +24,4 @@ export interface FormFooterProps {
23
24
  * - [Code](https://atlaskit.atlassian.com/packages/design-system/form/docs/layout)
24
25
  * - [Usage](https://atlaskit.atlassian.com/packages/design-system/form/docs/layout)
25
26
  */
26
- export default function FormFooter({ align, children }: FormFooterProps): JSX.Element;
27
+ export default function FormFooter({ align, children }: FormFooterProps): jsx.JSX.Element;
@@ -1,4 +1,9 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
1
5
  import { type ReactNode } from 'react';
6
+ import { jsx } from '@emotion/react';
2
7
  export interface FormHeaderProps {
3
8
  /**
4
9
  * Title of the form. This is a header.
@@ -23,5 +28,5 @@ export interface FormHeaderProps {
23
28
  * - [Code](https://atlaskit.atlassian.com/packages/design-system/form/docs/layout)
24
29
  * - [Usage](https://atlaskit.atlassian.com/packages/design-system/form/docs/layout).
25
30
  */
26
- declare const FormHeader: ({ children, description, title }: FormHeaderProps) => JSX.Element;
31
+ declare const FormHeader: ({ children, description, title }: FormHeaderProps) => jsx.JSX.Element;
27
32
  export default FormHeader;
@@ -1,4 +1,9 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
1
5
  import { type ReactNode } from 'react';
6
+ import { jsx } from '@emotion/react';
2
7
  export interface FormSectionProps {
3
8
  /**
4
9
  * Title of the form section.
@@ -23,5 +28,5 @@ export interface FormSectionProps {
23
28
  * - [Code](https://atlaskit.atlassian.com/packages/design-system/form/docs/layout)
24
29
  * - [Usage](https://atlaskit.atlassian.com/packages/design-system/form/docs/layout).
25
30
  */
26
- declare const FormSection: ({ children, description, title }: FormSectionProps) => JSX.Element;
31
+ declare const FormSection: ({ children, description, title }: FormSectionProps) => jsx.JSX.Element;
27
32
  export default FormSection;
@@ -3,6 +3,7 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import { type ReactNode } from 'react';
6
+ import { jsx } from '@emotion/react';
6
7
  type MessageAppearance = 'default' | 'error' | 'valid';
7
8
  /**
8
9
  * API for the internal `<Message />` component. This is not public API.
@@ -35,7 +36,7 @@ type MessageProps = Pick<InternalMessageProps, 'children' | 'testId'>;
35
36
  * 'Password should be more than 4 characters'
36
37
  *
37
38
  */
38
- export declare const HelperMessage: ({ children, testId }: MessageProps) => JSX.Element;
39
+ export declare const HelperMessage: ({ children, testId }: MessageProps) => jsx.JSX.Element;
39
40
  /**
40
41
  * __Error message__
41
42
  *
@@ -43,7 +44,7 @@ export declare const HelperMessage: ({ children, testId }: MessageProps) => JSX.
43
44
  * 'Invalid username, needs to be more than 4 characters'.
44
45
  *
45
46
  */
46
- export declare const ErrorMessage: ({ children, testId }: MessageProps) => JSX.Element;
47
+ export declare const ErrorMessage: ({ children, testId }: MessageProps) => jsx.JSX.Element;
47
48
  /**
48
49
  * __Valid message__
49
50
  *
@@ -51,7 +52,7 @@ export declare const ErrorMessage: ({ children, testId }: MessageProps) => JSX.E
51
52
  * a helper message could be 'Nice one, this username is available'.
52
53
  *
53
54
  */
54
- export declare const ValidMessage: ({ children, testId }: MessageProps) => JSX.Element;
55
+ export declare const ValidMessage: ({ children, testId }: MessageProps) => jsx.JSX.Element;
55
56
  /**
56
57
  * __Message wrapper context__
57
58
  *
@@ -70,5 +71,5 @@ export declare const MessageWrapperContext: import("react").Context<{
70
71
  * may not render the message.
71
72
  *
72
73
  */
73
- export declare const MessageWrapper: ({ children }: MessageProps) => JSX.Element;
74
+ export declare const MessageWrapper: ({ children }: MessageProps) => jsx.JSX.Element;
74
75
  export {};
@@ -1,6 +1,6 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * @jsxRuntime classic
4
3
  * @jsx jsx
5
4
  */
6
- export default function RequiredAsterisk(): JSX.Element;
5
+ import { jsx } from '@emotion/react';
6
+ export default function RequiredAsterisk(): jsx.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/form",
3
- "version": "11.0.0",
3
+ "version": "11.0.1",
4
4
  "description": "A form allows users to input information.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -26,15 +26,14 @@
26
26
  "runReact18": true
27
27
  },
28
28
  "dependencies": {
29
- "@atlaskit/css": "^0.7.0",
30
29
  "@atlaskit/ds-lib": "^3.3.0",
31
30
  "@atlaskit/heading": "^4.0.0",
32
- "@atlaskit/icon": "^23.1.0",
31
+ "@atlaskit/icon": "^23.3.0",
33
32
  "@atlaskit/primitives": "^13.3.0",
34
33
  "@atlaskit/theme": "^14.0.0",
35
- "@atlaskit/tokens": "^2.5.0",
34
+ "@atlaskit/tokens": "^3.0.0",
36
35
  "@babel/runtime": "^7.0.0",
37
- "@compiled/react": "^0.18.1",
36
+ "@emotion/react": "^11.7.1",
38
37
  "final-form": "^4.20.3",
39
38
  "final-form-focus": "^1.1.2",
40
39
  "lodash": "^4.17.21",
@@ -50,7 +49,7 @@
50
49
  "@atlaskit/banner": "^12.6.0",
51
50
  "@atlaskit/button": "^20.3.0",
52
51
  "@atlaskit/checkbox": "^15.2.0",
53
- "@atlaskit/modal-dialog": "^12.18.0",
52
+ "@atlaskit/modal-dialog": "^12.19.0",
54
53
  "@atlaskit/radio": "^7.0.0",
55
54
  "@atlaskit/range": "^8.0.0",
56
55
  "@atlaskit/select": "^18.9.0",
@@ -1 +0,0 @@
1
- ._1pfhu2gc{margin-block-start:var(--ds-space-100,8px)}
@@ -1 +0,0 @@
1
- ._1pfhu2gc{margin-block-start:var(--ds-space-100,8px)}
@@ -1,4 +0,0 @@
1
- ._1bah1y6m{justify-content:flex-start}
2
- ._1bahesu3{justify-content:flex-end}
3
- ._1e0c1txw{display:flex}
4
- ._1pfh1ejb{margin-block-start:var(--ds-space-300,24px)}
@@ -1,2 +0,0 @@
1
- ._1pfhu2gc{margin-block-start:var(--ds-space-100,8px)}
2
- ._1ul91osq{min-width:100%}
@@ -1,2 +0,0 @@
1
- ._1pfh1ejb{margin-block-start:var(--ds-space-300,24px)}
2
- ._1pfhu2gc{margin-block-start:var(--ds-space-100,8px)}