@atlaskit/form 10.5.1 → 10.5.2
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 +10 -0
- package/dist/cjs/form-header.js +11 -51
- package/dist/cjs/label.js +4 -16
- package/dist/es2019/form-header.js +8 -53
- package/dist/es2019/label.js +4 -16
- package/dist/esm/form-header.js +12 -53
- package/dist/esm/label.js +4 -16
- package/dist/types/form-header.d.ts +0 -10
- package/dist/types-ts4.5/form-header.d.ts +0 -10
- package/package.json +2 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/form
|
|
2
2
|
|
|
3
|
+
## 10.5.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#129726](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/129726)
|
|
8
|
+
[`778c15c1d279a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/778c15c1d279a) -
|
|
9
|
+
[ux] Removed feature flag `platform.design-system-team.form-header-typography-updates_4f1g6` and
|
|
10
|
+
`platform.design-system-team.form-label-typography-updates` feature flags resulting in minor
|
|
11
|
+
visual changes to typography.
|
|
12
|
+
|
|
3
13
|
## 10.5.1
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
package/dist/cjs/form-header.js
CHANGED
|
@@ -4,12 +4,10 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.default =
|
|
7
|
+
exports.default = void 0;
|
|
8
8
|
var _react = require("@emotion/react");
|
|
9
9
|
var _heading = _interopRequireDefault(require("@atlaskit/heading"));
|
|
10
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
10
|
var _primitives = require("@atlaskit/primitives");
|
|
12
|
-
var _typography = require("@atlaskit/theme/typography");
|
|
13
11
|
/**
|
|
14
12
|
* @jsxRuntime classic
|
|
15
13
|
* @jsx jsx
|
|
@@ -24,48 +22,6 @@ var formHeaderContentStyles = (0, _primitives.xcss)({
|
|
|
24
22
|
var formHeaderDescriptionStyles = (0, _primitives.xcss)({
|
|
25
23
|
marginBlockStart: 'space.100'
|
|
26
24
|
});
|
|
27
|
-
var formHeaderTitleStyles = (0, _react.css)({
|
|
28
|
-
lineHeight: "var(--ds-font-lineHeight-500, 32px)",
|
|
29
|
-
marginBlockStart: 0,
|
|
30
|
-
marginInlineEnd: "var(--ds-space-400, 32px)",
|
|
31
|
-
overflow: 'hidden',
|
|
32
|
-
textOverflow: 'ellipsis',
|
|
33
|
-
whiteSpace: 'nowrap'
|
|
34
|
-
});
|
|
35
|
-
var formHeaderWrapperStyles = (0, _react.css)({
|
|
36
|
-
fontFamily: "var(--ds-font-family-body, ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
40
|
-
var lightH700Styles = (0, _react.css)((0, _typography.h700)({
|
|
41
|
-
theme: {
|
|
42
|
-
mode: 'light'
|
|
43
|
-
}
|
|
44
|
-
}));
|
|
45
|
-
var FormHeaderContent = exports.FormHeaderContent = function FormHeaderContent(_ref) {
|
|
46
|
-
var children = _ref.children;
|
|
47
|
-
return (0, _react.jsx)(_primitives.Box, {
|
|
48
|
-
xcss: formHeaderContentStyles
|
|
49
|
-
}, children);
|
|
50
|
-
};
|
|
51
|
-
var FormHeaderDescription = exports.FormHeaderDescription = function FormHeaderDescription(_ref2) {
|
|
52
|
-
var children = _ref2.children;
|
|
53
|
-
return (0, _react.jsx)(_primitives.Box, {
|
|
54
|
-
xcss: formHeaderDescriptionStyles
|
|
55
|
-
}, children);
|
|
56
|
-
};
|
|
57
|
-
var FormHeaderTitle = exports.FormHeaderTitle = function FormHeaderTitle(_ref3) {
|
|
58
|
-
var children = _ref3.children;
|
|
59
|
-
return (0, _react.jsx)("h2", {
|
|
60
|
-
css: [lightH700Styles, formHeaderTitleStyles]
|
|
61
|
-
}, children);
|
|
62
|
-
};
|
|
63
|
-
var FormHeaderWrapper = function FormHeaderWrapper(_ref4) {
|
|
64
|
-
var children = _ref4.children;
|
|
65
|
-
return (0, _react.jsx)("div", {
|
|
66
|
-
css: formHeaderWrapperStyles
|
|
67
|
-
}, children);
|
|
68
|
-
};
|
|
69
25
|
|
|
70
26
|
/**
|
|
71
27
|
* __Form header__.
|
|
@@ -77,12 +33,16 @@ var FormHeaderWrapper = function FormHeaderWrapper(_ref4) {
|
|
|
77
33
|
* - [Code](https://atlaskit.atlassian.com/packages/design-system/form/docs/layout)
|
|
78
34
|
* - [Usage](https://atlaskit.atlassian.com/packages/design-system/form/docs/layout).
|
|
79
35
|
*/
|
|
80
|
-
var FormHeader = function FormHeader(
|
|
81
|
-
var children =
|
|
82
|
-
description =
|
|
83
|
-
title =
|
|
84
|
-
return (0,
|
|
36
|
+
var FormHeader = function FormHeader(_ref) {
|
|
37
|
+
var children = _ref.children,
|
|
38
|
+
description = _ref.description,
|
|
39
|
+
title = _ref.title;
|
|
40
|
+
return (0, _react.jsx)(_primitives.Box, null, title && (0, _react.jsx)(_heading.default, {
|
|
85
41
|
size: "large"
|
|
86
|
-
}, title), description && (0, _react.jsx)(
|
|
42
|
+
}, title), description && (0, _react.jsx)(_primitives.Box, {
|
|
43
|
+
xcss: formHeaderDescriptionStyles
|
|
44
|
+
}, description), children && (0, _react.jsx)(_primitives.Box, {
|
|
45
|
+
xcss: formHeaderContentStyles
|
|
46
|
+
}, children));
|
|
87
47
|
};
|
|
88
48
|
var _default = exports.default = FormHeader;
|
package/dist/cjs/label.js
CHANGED
|
@@ -5,8 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.Legend = exports.Label = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
9
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
10
8
|
/**
|
|
11
9
|
* @jsxRuntime classic
|
|
12
10
|
* @jsx jsx
|
|
@@ -16,18 +14,12 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
16
14
|
|
|
17
15
|
var fieldsetLabelStyles = (0, _react.css)({
|
|
18
16
|
display: 'inline-block',
|
|
17
|
+
color: "var(--ds-text-subtle, #44546F)",
|
|
19
18
|
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)",
|
|
19
|
+
fontWeight: "var(--ds-font-weight-bold, 700)",
|
|
20
20
|
marginBlockEnd: "var(--ds-space-050, 4px)",
|
|
21
21
|
marginBlockStart: "var(--ds-space-0, 0px)"
|
|
22
22
|
});
|
|
23
|
-
var oldFieldsetLabelStyles = (0, _react.css)({
|
|
24
|
-
color: "var(--ds-text-subtle, ".concat(_colors.N200, ")"),
|
|
25
|
-
fontWeight: "var(--ds-font-weight-semibold, 600)"
|
|
26
|
-
});
|
|
27
|
-
var newFieldsetLabelStyles = (0, _react.css)({
|
|
28
|
-
color: "var(--ds-text-subtle, #44546F)",
|
|
29
|
-
fontWeight: "var(--ds-font-weight-bold, 700)"
|
|
30
|
-
});
|
|
31
23
|
|
|
32
24
|
/**
|
|
33
25
|
* __Label__
|
|
@@ -43,9 +35,7 @@ var Label = exports.Label = function Label(_ref) {
|
|
|
43
35
|
id = _ref.id,
|
|
44
36
|
testId = _ref.testId;
|
|
45
37
|
return (0, _react.jsx)("label", {
|
|
46
|
-
css:
|
|
47
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
48
|
-
(0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.form-label-typography-updates') ? newFieldsetLabelStyles : oldFieldsetLabelStyles],
|
|
38
|
+
css: fieldsetLabelStyles,
|
|
49
39
|
id: id,
|
|
50
40
|
htmlFor: htmlFor,
|
|
51
41
|
"data-testid": testId
|
|
@@ -60,9 +50,7 @@ var Label = exports.Label = function Label(_ref) {
|
|
|
60
50
|
var Legend = exports.Legend = function Legend(_ref2) {
|
|
61
51
|
var children = _ref2.children;
|
|
62
52
|
return (0, _react.jsx)("legend", {
|
|
63
|
-
css:
|
|
64
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
65
|
-
(0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.form-label-typography-updates') ? newFieldsetLabelStyles : oldFieldsetLabelStyles]
|
|
53
|
+
css: fieldsetLabelStyles
|
|
66
54
|
}, children);
|
|
67
55
|
};
|
|
68
56
|
var _default = exports.default = Label;
|
|
@@ -4,11 +4,9 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
|
-
import {
|
|
7
|
+
import { jsx } from '@emotion/react';
|
|
8
8
|
import Heading from '@atlaskit/heading';
|
|
9
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
10
9
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
11
|
-
import { h700 } from '@atlaskit/theme/typography';
|
|
12
10
|
const formHeaderContentStyles = xcss({
|
|
13
11
|
minWidth: '100%',
|
|
14
12
|
marginBlockStart: 'space.100'
|
|
@@ -16,52 +14,6 @@ const formHeaderContentStyles = xcss({
|
|
|
16
14
|
const formHeaderDescriptionStyles = xcss({
|
|
17
15
|
marginBlockStart: 'space.100'
|
|
18
16
|
});
|
|
19
|
-
const formHeaderTitleStyles = css({
|
|
20
|
-
lineHeight: "var(--ds-font-lineHeight-500, 32px)",
|
|
21
|
-
marginBlockStart: 0,
|
|
22
|
-
marginInlineEnd: "var(--ds-space-400, 32px)",
|
|
23
|
-
overflow: 'hidden',
|
|
24
|
-
textOverflow: 'ellipsis',
|
|
25
|
-
whiteSpace: 'nowrap'
|
|
26
|
-
});
|
|
27
|
-
const formHeaderWrapperStyles = css({
|
|
28
|
-
fontFamily: "var(--ds-font-family-body, ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
32
|
-
const lightH700Styles = css(h700({
|
|
33
|
-
theme: {
|
|
34
|
-
mode: 'light'
|
|
35
|
-
}
|
|
36
|
-
}));
|
|
37
|
-
const FormHeaderContent = ({
|
|
38
|
-
children
|
|
39
|
-
}) => {
|
|
40
|
-
return jsx(Box, {
|
|
41
|
-
xcss: formHeaderContentStyles
|
|
42
|
-
}, children);
|
|
43
|
-
};
|
|
44
|
-
const FormHeaderDescription = ({
|
|
45
|
-
children
|
|
46
|
-
}) => {
|
|
47
|
-
return jsx(Box, {
|
|
48
|
-
xcss: formHeaderDescriptionStyles
|
|
49
|
-
}, children);
|
|
50
|
-
};
|
|
51
|
-
const FormHeaderTitle = ({
|
|
52
|
-
children
|
|
53
|
-
}) => {
|
|
54
|
-
return jsx("h2", {
|
|
55
|
-
css: [lightH700Styles, formHeaderTitleStyles]
|
|
56
|
-
}, children);
|
|
57
|
-
};
|
|
58
|
-
const FormHeaderWrapper = ({
|
|
59
|
-
children
|
|
60
|
-
}) => {
|
|
61
|
-
return jsx("div", {
|
|
62
|
-
css: formHeaderWrapperStyles
|
|
63
|
-
}, children);
|
|
64
|
-
};
|
|
65
17
|
|
|
66
18
|
/**
|
|
67
19
|
* __Form header__.
|
|
@@ -78,9 +30,12 @@ const FormHeader = ({
|
|
|
78
30
|
description,
|
|
79
31
|
title
|
|
80
32
|
}) => {
|
|
81
|
-
return
|
|
33
|
+
return jsx(Box, null, title && jsx(Heading, {
|
|
82
34
|
size: "large"
|
|
83
|
-
}, title), description && jsx(
|
|
35
|
+
}, title), description && jsx(Box, {
|
|
36
|
+
xcss: formHeaderDescriptionStyles
|
|
37
|
+
}, description), children && jsx(Box, {
|
|
38
|
+
xcss: formHeaderContentStyles
|
|
39
|
+
}, children));
|
|
84
40
|
};
|
|
85
|
-
export default FormHeader;
|
|
86
|
-
export { FormHeaderContent, FormHeaderDescription, FormHeaderTitle };
|
|
41
|
+
export default FormHeader;
|
package/dist/es2019/label.js
CHANGED
|
@@ -5,22 +5,14 @@
|
|
|
5
5
|
|
|
6
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
7
|
import { css, jsx } from '@emotion/react';
|
|
8
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
9
|
-
import { N200 } from '@atlaskit/theme/colors';
|
|
10
8
|
const fieldsetLabelStyles = css({
|
|
11
9
|
display: 'inline-block',
|
|
10
|
+
color: "var(--ds-text-subtle, #44546F)",
|
|
12
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
13
|
marginBlockEnd: "var(--ds-space-050, 4px)",
|
|
14
14
|
marginBlockStart: "var(--ds-space-0, 0px)"
|
|
15
15
|
});
|
|
16
|
-
const oldFieldsetLabelStyles = css({
|
|
17
|
-
color: `var(--ds-text-subtle, ${N200})`,
|
|
18
|
-
fontWeight: "var(--ds-font-weight-semibold, 600)"
|
|
19
|
-
});
|
|
20
|
-
const newFieldsetLabelStyles = css({
|
|
21
|
-
color: "var(--ds-text-subtle, #44546F)",
|
|
22
|
-
fontWeight: "var(--ds-font-weight-bold, 700)"
|
|
23
|
-
});
|
|
24
16
|
|
|
25
17
|
/**
|
|
26
18
|
* __Label__
|
|
@@ -36,9 +28,7 @@ export const Label = ({
|
|
|
36
28
|
id,
|
|
37
29
|
testId
|
|
38
30
|
}) => jsx("label", {
|
|
39
|
-
css:
|
|
40
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
41
|
-
getBooleanFF('platform.design-system-team.form-label-typography-updates') ? newFieldsetLabelStyles : oldFieldsetLabelStyles],
|
|
31
|
+
css: fieldsetLabelStyles,
|
|
42
32
|
id: id,
|
|
43
33
|
htmlFor: htmlFor,
|
|
44
34
|
"data-testid": testId
|
|
@@ -53,9 +43,7 @@ export const Legend = ({
|
|
|
53
43
|
children
|
|
54
44
|
}) => {
|
|
55
45
|
return jsx("legend", {
|
|
56
|
-
css:
|
|
57
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
58
|
-
getBooleanFF('platform.design-system-team.form-label-typography-updates') ? newFieldsetLabelStyles : oldFieldsetLabelStyles]
|
|
46
|
+
css: fieldsetLabelStyles
|
|
59
47
|
}, children);
|
|
60
48
|
};
|
|
61
49
|
export default Label;
|
package/dist/esm/form-header.js
CHANGED
|
@@ -4,11 +4,9 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
|
-
import {
|
|
7
|
+
import { jsx } from '@emotion/react';
|
|
8
8
|
import Heading from '@atlaskit/heading';
|
|
9
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
10
9
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
11
|
-
import { h700 } from '@atlaskit/theme/typography';
|
|
12
10
|
var formHeaderContentStyles = xcss({
|
|
13
11
|
minWidth: '100%',
|
|
14
12
|
marginBlockStart: 'space.100'
|
|
@@ -16,48 +14,6 @@ var formHeaderContentStyles = xcss({
|
|
|
16
14
|
var formHeaderDescriptionStyles = xcss({
|
|
17
15
|
marginBlockStart: 'space.100'
|
|
18
16
|
});
|
|
19
|
-
var formHeaderTitleStyles = css({
|
|
20
|
-
lineHeight: "var(--ds-font-lineHeight-500, 32px)",
|
|
21
|
-
marginBlockStart: 0,
|
|
22
|
-
marginInlineEnd: "var(--ds-space-400, 32px)",
|
|
23
|
-
overflow: 'hidden',
|
|
24
|
-
textOverflow: 'ellipsis',
|
|
25
|
-
whiteSpace: 'nowrap'
|
|
26
|
-
});
|
|
27
|
-
var formHeaderWrapperStyles = css({
|
|
28
|
-
fontFamily: "var(--ds-font-family-body, ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
32
|
-
var lightH700Styles = css(h700({
|
|
33
|
-
theme: {
|
|
34
|
-
mode: 'light'
|
|
35
|
-
}
|
|
36
|
-
}));
|
|
37
|
-
var FormHeaderContent = function FormHeaderContent(_ref) {
|
|
38
|
-
var children = _ref.children;
|
|
39
|
-
return jsx(Box, {
|
|
40
|
-
xcss: formHeaderContentStyles
|
|
41
|
-
}, children);
|
|
42
|
-
};
|
|
43
|
-
var FormHeaderDescription = function FormHeaderDescription(_ref2) {
|
|
44
|
-
var children = _ref2.children;
|
|
45
|
-
return jsx(Box, {
|
|
46
|
-
xcss: formHeaderDescriptionStyles
|
|
47
|
-
}, children);
|
|
48
|
-
};
|
|
49
|
-
var FormHeaderTitle = function FormHeaderTitle(_ref3) {
|
|
50
|
-
var children = _ref3.children;
|
|
51
|
-
return jsx("h2", {
|
|
52
|
-
css: [lightH700Styles, formHeaderTitleStyles]
|
|
53
|
-
}, children);
|
|
54
|
-
};
|
|
55
|
-
var FormHeaderWrapper = function FormHeaderWrapper(_ref4) {
|
|
56
|
-
var children = _ref4.children;
|
|
57
|
-
return jsx("div", {
|
|
58
|
-
css: formHeaderWrapperStyles
|
|
59
|
-
}, children);
|
|
60
|
-
};
|
|
61
17
|
|
|
62
18
|
/**
|
|
63
19
|
* __Form header__.
|
|
@@ -69,13 +25,16 @@ var FormHeaderWrapper = function FormHeaderWrapper(_ref4) {
|
|
|
69
25
|
* - [Code](https://atlaskit.atlassian.com/packages/design-system/form/docs/layout)
|
|
70
26
|
* - [Usage](https://atlaskit.atlassian.com/packages/design-system/form/docs/layout).
|
|
71
27
|
*/
|
|
72
|
-
var FormHeader = function FormHeader(
|
|
73
|
-
var children =
|
|
74
|
-
description =
|
|
75
|
-
title =
|
|
76
|
-
return
|
|
28
|
+
var FormHeader = function FormHeader(_ref) {
|
|
29
|
+
var children = _ref.children,
|
|
30
|
+
description = _ref.description,
|
|
31
|
+
title = _ref.title;
|
|
32
|
+
return jsx(Box, null, title && jsx(Heading, {
|
|
77
33
|
size: "large"
|
|
78
|
-
}, title), description && jsx(
|
|
34
|
+
}, title), description && jsx(Box, {
|
|
35
|
+
xcss: formHeaderDescriptionStyles
|
|
36
|
+
}, description), children && jsx(Box, {
|
|
37
|
+
xcss: formHeaderContentStyles
|
|
38
|
+
}, children));
|
|
79
39
|
};
|
|
80
|
-
export default FormHeader;
|
|
81
|
-
export { FormHeaderContent, FormHeaderDescription, FormHeaderTitle };
|
|
40
|
+
export default FormHeader;
|
package/dist/esm/label.js
CHANGED
|
@@ -5,22 +5,14 @@
|
|
|
5
5
|
|
|
6
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
7
|
import { css, jsx } from '@emotion/react';
|
|
8
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
9
|
-
import { N200 } from '@atlaskit/theme/colors';
|
|
10
8
|
var fieldsetLabelStyles = css({
|
|
11
9
|
display: 'inline-block',
|
|
10
|
+
color: "var(--ds-text-subtle, #44546F)",
|
|
12
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
13
|
marginBlockEnd: "var(--ds-space-050, 4px)",
|
|
14
14
|
marginBlockStart: "var(--ds-space-0, 0px)"
|
|
15
15
|
});
|
|
16
|
-
var oldFieldsetLabelStyles = css({
|
|
17
|
-
color: "var(--ds-text-subtle, ".concat(N200, ")"),
|
|
18
|
-
fontWeight: "var(--ds-font-weight-semibold, 600)"
|
|
19
|
-
});
|
|
20
|
-
var newFieldsetLabelStyles = css({
|
|
21
|
-
color: "var(--ds-text-subtle, #44546F)",
|
|
22
|
-
fontWeight: "var(--ds-font-weight-bold, 700)"
|
|
23
|
-
});
|
|
24
16
|
|
|
25
17
|
/**
|
|
26
18
|
* __Label__
|
|
@@ -36,9 +28,7 @@ export var Label = function Label(_ref) {
|
|
|
36
28
|
id = _ref.id,
|
|
37
29
|
testId = _ref.testId;
|
|
38
30
|
return jsx("label", {
|
|
39
|
-
css:
|
|
40
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
41
|
-
getBooleanFF('platform.design-system-team.form-label-typography-updates') ? newFieldsetLabelStyles : oldFieldsetLabelStyles],
|
|
31
|
+
css: fieldsetLabelStyles,
|
|
42
32
|
id: id,
|
|
43
33
|
htmlFor: htmlFor,
|
|
44
34
|
"data-testid": testId
|
|
@@ -53,9 +43,7 @@ export var Label = function Label(_ref) {
|
|
|
53
43
|
export var Legend = function Legend(_ref2) {
|
|
54
44
|
var children = _ref2.children;
|
|
55
45
|
return jsx("legend", {
|
|
56
|
-
css:
|
|
57
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
58
|
-
getBooleanFF('platform.design-system-team.form-label-typography-updates') ? newFieldsetLabelStyles : oldFieldsetLabelStyles]
|
|
46
|
+
css: fieldsetLabelStyles
|
|
59
47
|
}, children);
|
|
60
48
|
};
|
|
61
49
|
export default Label;
|
|
@@ -18,15 +18,6 @@ export interface FormHeaderProps {
|
|
|
18
18
|
*/
|
|
19
19
|
children?: ReactNode;
|
|
20
20
|
}
|
|
21
|
-
declare const FormHeaderContent: ({ children }: {
|
|
22
|
-
children: ReactNode;
|
|
23
|
-
}) => jsx.JSX.Element;
|
|
24
|
-
declare const FormHeaderDescription: ({ children }: {
|
|
25
|
-
children: ReactNode;
|
|
26
|
-
}) => jsx.JSX.Element;
|
|
27
|
-
declare const FormHeaderTitle: ({ children }: {
|
|
28
|
-
children: ReactNode;
|
|
29
|
-
}) => jsx.JSX.Element;
|
|
30
21
|
/**
|
|
31
22
|
* __Form header__.
|
|
32
23
|
*
|
|
@@ -39,4 +30,3 @@ declare const FormHeaderTitle: ({ children }: {
|
|
|
39
30
|
*/
|
|
40
31
|
declare const FormHeader: ({ children, description, title }: FormHeaderProps) => jsx.JSX.Element;
|
|
41
32
|
export default FormHeader;
|
|
42
|
-
export { FormHeaderContent, FormHeaderDescription, FormHeaderTitle };
|
|
@@ -18,15 +18,6 @@ export interface FormHeaderProps {
|
|
|
18
18
|
*/
|
|
19
19
|
children?: ReactNode;
|
|
20
20
|
}
|
|
21
|
-
declare const FormHeaderContent: ({ children }: {
|
|
22
|
-
children: ReactNode;
|
|
23
|
-
}) => jsx.JSX.Element;
|
|
24
|
-
declare const FormHeaderDescription: ({ children }: {
|
|
25
|
-
children: ReactNode;
|
|
26
|
-
}) => jsx.JSX.Element;
|
|
27
|
-
declare const FormHeaderTitle: ({ children }: {
|
|
28
|
-
children: ReactNode;
|
|
29
|
-
}) => jsx.JSX.Element;
|
|
30
21
|
/**
|
|
31
22
|
* __Form header__.
|
|
32
23
|
*
|
|
@@ -39,4 +30,3 @@ declare const FormHeaderTitle: ({ children }: {
|
|
|
39
30
|
*/
|
|
40
31
|
declare const FormHeader: ({ children, description, title }: FormHeaderProps) => jsx.JSX.Element;
|
|
41
32
|
export default FormHeader;
|
|
42
|
-
export { FormHeaderContent, FormHeaderDescription, FormHeaderTitle };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/form",
|
|
3
|
-
"version": "10.5.
|
|
3
|
+
"version": "10.5.2",
|
|
4
4
|
"description": "A form allows users to input information.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -30,7 +30,6 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@atlaskit/heading": "^2.4.0",
|
|
32
32
|
"@atlaskit/icon": "^22.12.0",
|
|
33
|
-
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
34
33
|
"@atlaskit/primitives": "^12.0.0",
|
|
35
34
|
"@atlaskit/theme": "^13.0.0",
|
|
36
35
|
"@atlaskit/tokens": "^1.58.0",
|
|
@@ -122,13 +121,5 @@
|
|
|
122
121
|
"./Label": "./src/entry-points/label.tsx",
|
|
123
122
|
".": "./src/index.tsx"
|
|
124
123
|
},
|
|
125
|
-
"homepage": "https://atlassian.design/components/form/"
|
|
126
|
-
"platform-feature-flags": {
|
|
127
|
-
"platform.design-system-team.form-header-typography-updates_4f1g6": {
|
|
128
|
-
"type": "boolean"
|
|
129
|
-
},
|
|
130
|
-
"platform.design-system-team.form-label-typography-updates": {
|
|
131
|
-
"type": "boolean"
|
|
132
|
-
}
|
|
133
|
-
}
|
|
124
|
+
"homepage": "https://atlassian.design/components/form/"
|
|
134
125
|
}
|