@atlaskit/form 8.11.7 → 8.11.9
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 +13 -0
- package/dist/cjs/entry-points/label.js +8 -3
- package/dist/cjs/field.js +2 -2
- package/dist/cjs/fieldset.js +5 -50
- package/dist/cjs/form-header.js +2 -2
- package/dist/cjs/form-section.js +2 -2
- package/dist/cjs/index.js +8 -2
- package/dist/cjs/label.js +21 -10
- package/dist/cjs/messages.js +3 -3
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/entry-points/label.js +1 -1
- package/dist/es2019/field.js +1 -1
- package/dist/es2019/fieldset.js +2 -47
- package/dist/es2019/form-header.js +2 -2
- package/dist/es2019/form-section.js +2 -2
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/label.js +21 -10
- package/dist/es2019/messages.js +3 -3
- package/dist/es2019/version.json +1 -1
- package/dist/esm/entry-points/label.js +1 -1
- package/dist/esm/field.js +1 -1
- package/dist/esm/fieldset.js +5 -50
- package/dist/esm/form-header.js +2 -2
- package/dist/esm/form-section.js +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/label.js +19 -10
- package/dist/esm/messages.js +3 -3
- package/dist/esm/version.json +1 -1
- package/dist/types/entry-points/label.d.ts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/types/label.d.ts +10 -1
- package/dist/types-ts4.5/entry-points/label.d.ts +2 -2
- package/dist/types-ts4.5/index.d.ts +2 -2
- package/dist/types-ts4.5/label.d.ts +10 -1
- package/package.json +29 -37
- package/report.api.md +9 -0
- package/tmp/api-report-tmp.d.ts +9 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/form
|
|
2
2
|
|
|
3
|
+
## 8.11.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`85935c8cde4`](https://bitbucket.org/atlassian/atlassian-frontend/commits/85935c8cde4) - [ux] Denoting live region of form messages using aria-live attribute instead of alert role.
|
|
8
|
+
|
|
9
|
+
## 8.11.8
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`421b74bf0f9`](https://bitbucket.org/atlassian/atlassian-frontend/commits/421b74bf0f9) - Combines stylings of label and legend for simpler maintenance.
|
|
14
|
+
- [`215b4b5df50`](https://bitbucket.org/atlassian/atlassian-frontend/commits/215b4b5df50) - Removes redundant label from legend in fieldset.
|
|
15
|
+
|
|
3
16
|
## 8.11.7
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
Object.defineProperty(exports, "Label", {
|
|
8
7
|
enumerable: true,
|
|
9
8
|
get: function get() {
|
|
10
|
-
return _label.
|
|
9
|
+
return _label.Label;
|
|
11
10
|
}
|
|
12
11
|
});
|
|
13
|
-
|
|
12
|
+
Object.defineProperty(exports, "Legend", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _label.Legend;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
var _label = require("../label");
|
package/dist/cjs/field.js
CHANGED
|
@@ -14,7 +14,7 @@ var _react2 = require("@emotion/react");
|
|
|
14
14
|
var _reactUid = require("react-uid");
|
|
15
15
|
var _tinyInvariant = _interopRequireDefault(require("tiny-invariant"));
|
|
16
16
|
var _form = require("./form");
|
|
17
|
-
var _label =
|
|
17
|
+
var _label = require("./label");
|
|
18
18
|
var _requiredAsterisk = _interopRequireDefault(require("./required-asterisk"));
|
|
19
19
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
20
20
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } /** @jsx jsx */
|
|
@@ -254,7 +254,7 @@ function Field(props) {
|
|
|
254
254
|
return (0, _react2.jsx)("div", {
|
|
255
255
|
css: fieldWrapperStyles,
|
|
256
256
|
"data-testid": props.testId
|
|
257
|
-
}, props.label && (0, _react2.jsx)(_label.
|
|
257
|
+
}, props.label && (0, _react2.jsx)(_label.Label, {
|
|
258
258
|
htmlFor: fieldId,
|
|
259
259
|
id: "".concat(fieldId, "-label"),
|
|
260
260
|
testId: props.testId && "".concat(props.testId, "--label")
|
package/dist/cjs/fieldset.js
CHANGED
|
@@ -5,58 +5,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
|
-
var
|
|
9
|
-
var _components = require("@atlaskit/theme/components");
|
|
10
|
-
var _constants = require("@atlaskit/theme/constants");
|
|
11
|
-
var _typography = require("@atlaskit/theme/typography");
|
|
8
|
+
var _label = require("./label");
|
|
12
9
|
/** @jsx jsx */
|
|
13
10
|
|
|
14
|
-
var fontFamily = (0, _constants.fontFamily)();
|
|
15
|
-
var fieldsetLabelStyles = (0, _react.css)({
|
|
16
|
-
display: 'inline-block',
|
|
17
|
-
marginTop: 0,
|
|
18
|
-
marginBottom: 0,
|
|
19
|
-
fontFamily: "".concat(fontFamily)
|
|
20
|
-
});
|
|
21
11
|
var fieldSetStyles = (0, _react.css)({
|
|
22
12
|
marginTop: "var(--ds-space-100, 8px)"
|
|
23
13
|
});
|
|
24
14
|
|
|
25
|
-
/**
|
|
26
|
-
* TODO: Address duplication with packages/design-system/form/src/label.tsx
|
|
27
|
-
* in https://product-fabric.atlassian.net/browse/DSP-7731
|
|
28
|
-
*/
|
|
29
|
-
var getFieldsetLabelDynamicStyles = function getFieldsetLabelDynamicStyles(mode) {
|
|
30
|
-
return (0, _react.css)([(0, _typography.h200)({
|
|
31
|
-
theme: {
|
|
32
|
-
mode: mode
|
|
33
|
-
}
|
|
34
|
-
}), {
|
|
35
|
-
color: (0, _components.themed)({
|
|
36
|
-
dark: "var(--ds-text-subtle, ".concat(_colors.DN300, ")"),
|
|
37
|
-
light: "var(--ds-text-subtle, ".concat(_colors.N200, ")")
|
|
38
|
-
})({
|
|
39
|
-
theme: {
|
|
40
|
-
mode: mode
|
|
41
|
-
}
|
|
42
|
-
})
|
|
43
|
-
}]);
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
// eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
|
|
47
|
-
var lightH200Styles = getFieldsetLabelDynamicStyles('light');
|
|
48
|
-
|
|
49
|
-
// eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
|
|
50
|
-
var darkH200Styles = getFieldsetLabelDynamicStyles('dark');
|
|
51
|
-
var FieldsetLabel = function FieldsetLabel(_ref) {
|
|
52
|
-
var children = _ref.children;
|
|
53
|
-
var _useGlobalTheme = (0, _components.useGlobalTheme)(),
|
|
54
|
-
mode = _useGlobalTheme.mode;
|
|
55
|
-
return (0, _react.jsx)("label", {
|
|
56
|
-
css: [mode === 'light' ? lightH200Styles : darkH200Styles, fieldsetLabelStyles]
|
|
57
|
-
}, children);
|
|
58
|
-
};
|
|
59
|
-
|
|
60
15
|
/**
|
|
61
16
|
* __Fieldset__
|
|
62
17
|
*
|
|
@@ -67,12 +22,12 @@ var FieldsetLabel = function FieldsetLabel(_ref) {
|
|
|
67
22
|
* - [Code](https://atlaskit.atlassian.com/packages/design-system/form/docs/fields)
|
|
68
23
|
* - [Usage](https://atlaskit.atlassian.com/packages/design-system/form/docs/fields)
|
|
69
24
|
*/
|
|
70
|
-
var Fieldset = function Fieldset(
|
|
71
|
-
var children =
|
|
72
|
-
legend =
|
|
25
|
+
var Fieldset = function Fieldset(_ref) {
|
|
26
|
+
var children = _ref.children,
|
|
27
|
+
legend = _ref.legend;
|
|
73
28
|
return (0, _react.jsx)("fieldset", {
|
|
74
29
|
css: fieldSetStyles
|
|
75
|
-
}, legend && (0, _react.jsx)(
|
|
30
|
+
}, legend && (0, _react.jsx)(_label.Legend, null, legend), children);
|
|
76
31
|
};
|
|
77
32
|
var _default = Fieldset;
|
|
78
33
|
exports.default = _default;
|
package/dist/cjs/form-header.js
CHANGED
|
@@ -30,13 +30,13 @@ var formHeaderWrapperStyles = (0, _react.css)({
|
|
|
30
30
|
fontFamily: "".concat(fontFamily)
|
|
31
31
|
});
|
|
32
32
|
|
|
33
|
-
// eslint-disable-next-line @
|
|
33
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
34
34
|
var darkH700Styles = (0, _react.css)((0, _typography.h700)({
|
|
35
35
|
theme: {
|
|
36
36
|
mode: 'dark'
|
|
37
37
|
}
|
|
38
38
|
}));
|
|
39
|
-
// eslint-disable-next-line @
|
|
39
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
40
40
|
var lightH700Styles = (0, _react.css)((0, _typography.h700)({
|
|
41
41
|
theme: {
|
|
42
42
|
mode: 'light'
|
package/dist/cjs/form-section.js
CHANGED
|
@@ -24,13 +24,13 @@ var formSectionWrapperStyles = (0, _react.css)({
|
|
|
24
24
|
marginTop: "var(--ds-space-300, 24px)"
|
|
25
25
|
});
|
|
26
26
|
|
|
27
|
-
// eslint-disable-next-line @
|
|
27
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
28
28
|
var lightH600Styles = (0, _react.css)((0, _typography.h600)({
|
|
29
29
|
theme: {
|
|
30
30
|
mode: 'light'
|
|
31
31
|
}
|
|
32
32
|
}));
|
|
33
|
-
// eslint-disable-next-line @
|
|
33
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
34
34
|
var darkH600Styles = (0, _react.css)((0, _typography.h600)({
|
|
35
35
|
theme: {
|
|
36
36
|
mode: 'dark'
|
package/dist/cjs/index.js
CHANGED
|
@@ -55,7 +55,13 @@ Object.defineProperty(exports, "HelperMessage", {
|
|
|
55
55
|
Object.defineProperty(exports, "Label", {
|
|
56
56
|
enumerable: true,
|
|
57
57
|
get: function get() {
|
|
58
|
-
return _label.
|
|
58
|
+
return _label.Label;
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
Object.defineProperty(exports, "Legend", {
|
|
62
|
+
enumerable: true,
|
|
63
|
+
get: function get() {
|
|
64
|
+
return _label.Legend;
|
|
59
65
|
}
|
|
60
66
|
});
|
|
61
67
|
Object.defineProperty(exports, "RangeField", {
|
|
@@ -89,7 +95,7 @@ var _formSection = _interopRequireDefault(require("./form-section"));
|
|
|
89
95
|
var _field = _interopRequireDefault(require("./field"));
|
|
90
96
|
var _checkboxField = _interopRequireDefault(require("./checkbox-field"));
|
|
91
97
|
var _rangeField = _interopRequireDefault(require("./range-field"));
|
|
92
|
-
var _label =
|
|
98
|
+
var _label = require("./label");
|
|
93
99
|
var _messages = require("./messages");
|
|
94
100
|
var _fieldset = _interopRequireDefault(require("./fieldset"));
|
|
95
101
|
var _requiredAsterisk = _interopRequireDefault(require("./required-asterisk"));
|
package/dist/cjs/label.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = void 0;
|
|
6
|
+
exports.default = exports.Legend = exports.Label = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _colors = require("@atlaskit/theme/colors");
|
|
9
9
|
var _components = require("@atlaskit/theme/components");
|
|
@@ -12,17 +12,12 @@ var _typography = require("@atlaskit/theme/typography");
|
|
|
12
12
|
/** @jsx jsx */
|
|
13
13
|
|
|
14
14
|
var fontFamily = (0, _constants.fontFamily)();
|
|
15
|
-
var
|
|
15
|
+
var fieldsetLabelStyles = (0, _react.css)({
|
|
16
16
|
display: 'inline-block',
|
|
17
17
|
marginTop: 0,
|
|
18
18
|
marginBottom: "var(--ds-space-050, 4px)",
|
|
19
19
|
fontFamily: fontFamily
|
|
20
20
|
});
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* TODO: Address duplication with packages/design-system/form/src/fieldset.tsx
|
|
24
|
-
* in https://product-fabric.atlassian.net/browse/DSP-7731
|
|
25
|
-
*/
|
|
26
21
|
var getFieldsetLabelDynamicStyles = function getFieldsetLabelDynamicStyles(mode) {
|
|
27
22
|
return (0, _react.css)([(0, _typography.h200)({
|
|
28
23
|
theme: {
|
|
@@ -40,10 +35,10 @@ var getFieldsetLabelDynamicStyles = function getFieldsetLabelDynamicStyles(mode)
|
|
|
40
35
|
}]);
|
|
41
36
|
};
|
|
42
37
|
|
|
43
|
-
// eslint-disable-next-line @
|
|
38
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
44
39
|
var lightH200Styles = getFieldsetLabelDynamicStyles('light');
|
|
45
40
|
|
|
46
|
-
// eslint-disable-next-line @
|
|
41
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
47
42
|
var darkH200Styles = getFieldsetLabelDynamicStyles('dark');
|
|
48
43
|
|
|
49
44
|
/**
|
|
@@ -62,11 +57,27 @@ var Label = function Label(_ref) {
|
|
|
62
57
|
var _useGlobalTheme = (0, _components.useGlobalTheme)(),
|
|
63
58
|
mode = _useGlobalTheme.mode;
|
|
64
59
|
return (0, _react.jsx)("label", {
|
|
65
|
-
css: [mode === 'light' ? lightH200Styles : darkH200Styles,
|
|
60
|
+
css: [mode === 'light' ? lightH200Styles : darkH200Styles, fieldsetLabelStyles],
|
|
66
61
|
id: id,
|
|
67
62
|
htmlFor: htmlFor,
|
|
68
63
|
"data-testid": testId
|
|
69
64
|
}, children);
|
|
70
65
|
};
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* __Legend__
|
|
69
|
+
*
|
|
70
|
+
* A Legend represents a caption for a fieldset in a user interface.
|
|
71
|
+
*/
|
|
72
|
+
exports.Label = Label;
|
|
73
|
+
var Legend = function Legend(_ref2) {
|
|
74
|
+
var children = _ref2.children;
|
|
75
|
+
var _useGlobalTheme2 = (0, _components.useGlobalTheme)(),
|
|
76
|
+
mode = _useGlobalTheme2.mode;
|
|
77
|
+
return (0, _react.jsx)("legend", {
|
|
78
|
+
css: [mode === 'light' ? lightH200Styles : darkH200Styles, fieldsetLabelStyles]
|
|
79
|
+
}, children);
|
|
80
|
+
};
|
|
81
|
+
exports.Legend = Legend;
|
|
71
82
|
var _default = Label;
|
|
72
83
|
exports.default = _default;
|
package/dist/cjs/messages.js
CHANGED
|
@@ -25,13 +25,13 @@ var _field = require("./field");
|
|
|
25
25
|
|
|
26
26
|
var fontFamily = (0, _constants.fontFamily)();
|
|
27
27
|
|
|
28
|
-
// eslint-disable-next-line @
|
|
28
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
29
29
|
var lightH200Styles = (0, _react.css)((0, _typography.h200)({
|
|
30
30
|
theme: {
|
|
31
31
|
mode: 'light'
|
|
32
32
|
}
|
|
33
33
|
}));
|
|
34
|
-
// eslint-disable-next-line @
|
|
34
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
35
35
|
var darkH200Styles = (0, _react.css)((0, _typography.h200)({
|
|
36
36
|
theme: {
|
|
37
37
|
mode: 'dark'
|
|
@@ -97,7 +97,7 @@ var Message = function Message(_ref2) {
|
|
|
97
97
|
css: [mode === 'light' ? lightH200Styles : darkH200Styles, messageStyles, messageAppearanceStyles[appearance]],
|
|
98
98
|
"data-testid": testId,
|
|
99
99
|
id: fieldId,
|
|
100
|
-
|
|
100
|
+
"aria-live": "polite"
|
|
101
101
|
}, icon && (0, _react.jsx)(IconWrapper, null, icon), content);
|
|
102
102
|
};
|
|
103
103
|
|
package/dist/cjs/version.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Label, Legend } from '../label';
|
package/dist/es2019/field.js
CHANGED
|
@@ -4,7 +4,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
4
4
|
import { uid } from 'react-uid';
|
|
5
5
|
import invariant from 'tiny-invariant';
|
|
6
6
|
import { FormContext, IsDisabledContext } from './form';
|
|
7
|
-
import Label from './label';
|
|
7
|
+
import { Label } from './label';
|
|
8
8
|
import RequiredAsterisk from './required-asterisk';
|
|
9
9
|
const fieldWrapperStyles = css({
|
|
10
10
|
marginTop: "var(--ds-space-100, 8px)"
|
package/dist/es2019/fieldset.js
CHANGED
|
@@ -1,56 +1,11 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
|
-
import {
|
|
5
|
-
import { themed, useGlobalTheme } from '@atlaskit/theme/components';
|
|
6
|
-
import { fontFamily as getFontFamily } from '@atlaskit/theme/constants';
|
|
7
|
-
import { h200 } from '@atlaskit/theme/typography';
|
|
8
|
-
const fontFamily = getFontFamily();
|
|
9
|
-
const fieldsetLabelStyles = css({
|
|
10
|
-
display: 'inline-block',
|
|
11
|
-
marginTop: 0,
|
|
12
|
-
marginBottom: 0,
|
|
13
|
-
fontFamily: `${fontFamily}`
|
|
14
|
-
});
|
|
4
|
+
import { Legend } from './label';
|
|
15
5
|
const fieldSetStyles = css({
|
|
16
6
|
marginTop: "var(--ds-space-100, 8px)"
|
|
17
7
|
});
|
|
18
8
|
|
|
19
|
-
/**
|
|
20
|
-
* TODO: Address duplication with packages/design-system/form/src/label.tsx
|
|
21
|
-
* in https://product-fabric.atlassian.net/browse/DSP-7731
|
|
22
|
-
*/
|
|
23
|
-
const getFieldsetLabelDynamicStyles = mode => css([h200({
|
|
24
|
-
theme: {
|
|
25
|
-
mode
|
|
26
|
-
}
|
|
27
|
-
}), {
|
|
28
|
-
color: themed({
|
|
29
|
-
dark: `var(--ds-text-subtle, ${DN300})`,
|
|
30
|
-
light: `var(--ds-text-subtle, ${N200})`
|
|
31
|
-
})({
|
|
32
|
-
theme: {
|
|
33
|
-
mode
|
|
34
|
-
}
|
|
35
|
-
})
|
|
36
|
-
}]);
|
|
37
|
-
|
|
38
|
-
// eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
|
|
39
|
-
const lightH200Styles = getFieldsetLabelDynamicStyles('light');
|
|
40
|
-
|
|
41
|
-
// eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
|
|
42
|
-
const darkH200Styles = getFieldsetLabelDynamicStyles('dark');
|
|
43
|
-
const FieldsetLabel = ({
|
|
44
|
-
children
|
|
45
|
-
}) => {
|
|
46
|
-
const {
|
|
47
|
-
mode
|
|
48
|
-
} = useGlobalTheme();
|
|
49
|
-
return jsx("label", {
|
|
50
|
-
css: [mode === 'light' ? lightH200Styles : darkH200Styles, fieldsetLabelStyles]
|
|
51
|
-
}, children);
|
|
52
|
-
};
|
|
53
|
-
|
|
54
9
|
/**
|
|
55
10
|
* __Fieldset__
|
|
56
11
|
*
|
|
@@ -67,6 +22,6 @@ const Fieldset = ({
|
|
|
67
22
|
}) => {
|
|
68
23
|
return jsx("fieldset", {
|
|
69
24
|
css: fieldSetStyles
|
|
70
|
-
}, legend && jsx(
|
|
25
|
+
}, legend && jsx(Legend, null, legend), children);
|
|
71
26
|
};
|
|
72
27
|
export default Fieldset;
|
|
@@ -24,13 +24,13 @@ const formHeaderWrapperStyles = css({
|
|
|
24
24
|
fontFamily: `${fontFamily}`
|
|
25
25
|
});
|
|
26
26
|
|
|
27
|
-
// eslint-disable-next-line @
|
|
27
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
28
28
|
const darkH700Styles = css(h700({
|
|
29
29
|
theme: {
|
|
30
30
|
mode: 'dark'
|
|
31
31
|
}
|
|
32
32
|
}));
|
|
33
|
-
// eslint-disable-next-line @
|
|
33
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
34
34
|
const lightH700Styles = css(h700({
|
|
35
35
|
theme: {
|
|
36
36
|
mode: 'light'
|
|
@@ -18,13 +18,13 @@ const formSectionWrapperStyles = css({
|
|
|
18
18
|
marginTop: "var(--ds-space-300, 24px)"
|
|
19
19
|
});
|
|
20
20
|
|
|
21
|
-
// eslint-disable-next-line @
|
|
21
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
22
22
|
const lightH600Styles = css(h600({
|
|
23
23
|
theme: {
|
|
24
24
|
mode: 'light'
|
|
25
25
|
}
|
|
26
26
|
}));
|
|
27
|
-
// eslint-disable-next-line @
|
|
27
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
28
28
|
const darkH600Styles = css(h600({
|
|
29
29
|
theme: {
|
|
30
30
|
mode: 'dark'
|
package/dist/es2019/index.js
CHANGED
|
@@ -5,7 +5,7 @@ export { default as FormSection } from './form-section';
|
|
|
5
5
|
export { default as Field } from './field';
|
|
6
6
|
export { default as CheckboxField } from './checkbox-field';
|
|
7
7
|
export { default as RangeField } from './range-field';
|
|
8
|
-
export {
|
|
8
|
+
export { Label, Legend } from './label';
|
|
9
9
|
export { HelperMessage, ErrorMessage, ValidMessage } from './messages';
|
|
10
10
|
export { default as Fieldset } from './fieldset';
|
|
11
11
|
export { default as RequiredAsterisk } from './required-asterisk';
|
package/dist/es2019/label.js
CHANGED
|
@@ -6,17 +6,12 @@ import { themed, useGlobalTheme } from '@atlaskit/theme/components';
|
|
|
6
6
|
import { fontFamily as getFontFamily } from '@atlaskit/theme/constants';
|
|
7
7
|
import { h200 } from '@atlaskit/theme/typography';
|
|
8
8
|
const fontFamily = getFontFamily();
|
|
9
|
-
const
|
|
9
|
+
const fieldsetLabelStyles = css({
|
|
10
10
|
display: 'inline-block',
|
|
11
11
|
marginTop: 0,
|
|
12
12
|
marginBottom: "var(--ds-space-050, 4px)",
|
|
13
13
|
fontFamily: fontFamily
|
|
14
14
|
});
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* TODO: Address duplication with packages/design-system/form/src/fieldset.tsx
|
|
18
|
-
* in https://product-fabric.atlassian.net/browse/DSP-7731
|
|
19
|
-
*/
|
|
20
15
|
const getFieldsetLabelDynamicStyles = mode => css([h200({
|
|
21
16
|
theme: {
|
|
22
17
|
mode
|
|
@@ -32,10 +27,10 @@ const getFieldsetLabelDynamicStyles = mode => css([h200({
|
|
|
32
27
|
})
|
|
33
28
|
}]);
|
|
34
29
|
|
|
35
|
-
// eslint-disable-next-line @
|
|
30
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
36
31
|
const lightH200Styles = getFieldsetLabelDynamicStyles('light');
|
|
37
32
|
|
|
38
|
-
// eslint-disable-next-line @
|
|
33
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
39
34
|
const darkH200Styles = getFieldsetLabelDynamicStyles('dark');
|
|
40
35
|
|
|
41
36
|
/**
|
|
@@ -46,7 +41,7 @@ const darkH200Styles = getFieldsetLabelDynamicStyles('dark');
|
|
|
46
41
|
* It's recommended that a label has a `4px` spacing above its associated
|
|
47
42
|
* control element.
|
|
48
43
|
*/
|
|
49
|
-
const Label = ({
|
|
44
|
+
export const Label = ({
|
|
50
45
|
children,
|
|
51
46
|
htmlFor,
|
|
52
47
|
id,
|
|
@@ -56,10 +51,26 @@ const Label = ({
|
|
|
56
51
|
mode
|
|
57
52
|
} = useGlobalTheme();
|
|
58
53
|
return jsx("label", {
|
|
59
|
-
css: [mode === 'light' ? lightH200Styles : darkH200Styles,
|
|
54
|
+
css: [mode === 'light' ? lightH200Styles : darkH200Styles, fieldsetLabelStyles],
|
|
60
55
|
id: id,
|
|
61
56
|
htmlFor: htmlFor,
|
|
62
57
|
"data-testid": testId
|
|
63
58
|
}, children);
|
|
64
59
|
};
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* __Legend__
|
|
63
|
+
*
|
|
64
|
+
* A Legend represents a caption for a fieldset in a user interface.
|
|
65
|
+
*/
|
|
66
|
+
export const Legend = ({
|
|
67
|
+
children
|
|
68
|
+
}) => {
|
|
69
|
+
const {
|
|
70
|
+
mode
|
|
71
|
+
} = useGlobalTheme();
|
|
72
|
+
return jsx("legend", {
|
|
73
|
+
css: [mode === 'light' ? lightH200Styles : darkH200Styles, fieldsetLabelStyles]
|
|
74
|
+
}, children);
|
|
75
|
+
};
|
|
65
76
|
export default Label;
|
package/dist/es2019/messages.js
CHANGED
|
@@ -19,13 +19,13 @@ import { FieldId } from './field';
|
|
|
19
19
|
|
|
20
20
|
const fontFamily = getFontFamily();
|
|
21
21
|
|
|
22
|
-
// eslint-disable-next-line @
|
|
22
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
23
23
|
const lightH200Styles = css(h200({
|
|
24
24
|
theme: {
|
|
25
25
|
mode: 'light'
|
|
26
26
|
}
|
|
27
27
|
}));
|
|
28
|
-
// eslint-disable-next-line @
|
|
28
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
29
29
|
const darkH200Styles = css(h200({
|
|
30
30
|
theme: {
|
|
31
31
|
mode: 'dark'
|
|
@@ -93,7 +93,7 @@ const Message = ({
|
|
|
93
93
|
css: [mode === 'light' ? lightH200Styles : darkH200Styles, messageStyles, messageAppearanceStyles[appearance]],
|
|
94
94
|
"data-testid": testId,
|
|
95
95
|
id: fieldId,
|
|
96
|
-
|
|
96
|
+
"aria-live": "polite"
|
|
97
97
|
}, icon && jsx(IconWrapper, null, icon), content);
|
|
98
98
|
};
|
|
99
99
|
|
package/dist/es2019/version.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Label, Legend } from '../label';
|
package/dist/esm/field.js
CHANGED
|
@@ -9,7 +9,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
9
9
|
import { uid } from 'react-uid';
|
|
10
10
|
import invariant from 'tiny-invariant';
|
|
11
11
|
import { FormContext, IsDisabledContext } from './form';
|
|
12
|
-
import Label from './label';
|
|
12
|
+
import { Label } from './label';
|
|
13
13
|
import RequiredAsterisk from './required-asterisk';
|
|
14
14
|
var fieldWrapperStyles = css({
|
|
15
15
|
marginTop: "var(--ds-space-100, 8px)"
|
package/dist/esm/fieldset.js
CHANGED
|
@@ -1,56 +1,11 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
|
-
import {
|
|
5
|
-
import { themed, useGlobalTheme } from '@atlaskit/theme/components';
|
|
6
|
-
import { fontFamily as getFontFamily } from '@atlaskit/theme/constants';
|
|
7
|
-
import { h200 } from '@atlaskit/theme/typography';
|
|
8
|
-
var fontFamily = getFontFamily();
|
|
9
|
-
var fieldsetLabelStyles = css({
|
|
10
|
-
display: 'inline-block',
|
|
11
|
-
marginTop: 0,
|
|
12
|
-
marginBottom: 0,
|
|
13
|
-
fontFamily: "".concat(fontFamily)
|
|
14
|
-
});
|
|
4
|
+
import { Legend } from './label';
|
|
15
5
|
var fieldSetStyles = css({
|
|
16
6
|
marginTop: "var(--ds-space-100, 8px)"
|
|
17
7
|
});
|
|
18
8
|
|
|
19
|
-
/**
|
|
20
|
-
* TODO: Address duplication with packages/design-system/form/src/label.tsx
|
|
21
|
-
* in https://product-fabric.atlassian.net/browse/DSP-7731
|
|
22
|
-
*/
|
|
23
|
-
var getFieldsetLabelDynamicStyles = function getFieldsetLabelDynamicStyles(mode) {
|
|
24
|
-
return css([h200({
|
|
25
|
-
theme: {
|
|
26
|
-
mode: mode
|
|
27
|
-
}
|
|
28
|
-
}), {
|
|
29
|
-
color: themed({
|
|
30
|
-
dark: "var(--ds-text-subtle, ".concat(DN300, ")"),
|
|
31
|
-
light: "var(--ds-text-subtle, ".concat(N200, ")")
|
|
32
|
-
})({
|
|
33
|
-
theme: {
|
|
34
|
-
mode: mode
|
|
35
|
-
}
|
|
36
|
-
})
|
|
37
|
-
}]);
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
// eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
|
|
41
|
-
var lightH200Styles = getFieldsetLabelDynamicStyles('light');
|
|
42
|
-
|
|
43
|
-
// eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
|
|
44
|
-
var darkH200Styles = getFieldsetLabelDynamicStyles('dark');
|
|
45
|
-
var FieldsetLabel = function FieldsetLabel(_ref) {
|
|
46
|
-
var children = _ref.children;
|
|
47
|
-
var _useGlobalTheme = useGlobalTheme(),
|
|
48
|
-
mode = _useGlobalTheme.mode;
|
|
49
|
-
return jsx("label", {
|
|
50
|
-
css: [mode === 'light' ? lightH200Styles : darkH200Styles, fieldsetLabelStyles]
|
|
51
|
-
}, children);
|
|
52
|
-
};
|
|
53
|
-
|
|
54
9
|
/**
|
|
55
10
|
* __Fieldset__
|
|
56
11
|
*
|
|
@@ -61,11 +16,11 @@ var FieldsetLabel = function FieldsetLabel(_ref) {
|
|
|
61
16
|
* - [Code](https://atlaskit.atlassian.com/packages/design-system/form/docs/fields)
|
|
62
17
|
* - [Usage](https://atlaskit.atlassian.com/packages/design-system/form/docs/fields)
|
|
63
18
|
*/
|
|
64
|
-
var Fieldset = function Fieldset(
|
|
65
|
-
var children =
|
|
66
|
-
legend =
|
|
19
|
+
var Fieldset = function Fieldset(_ref) {
|
|
20
|
+
var children = _ref.children,
|
|
21
|
+
legend = _ref.legend;
|
|
67
22
|
return jsx("fieldset", {
|
|
68
23
|
css: fieldSetStyles
|
|
69
|
-
}, legend && jsx(
|
|
24
|
+
}, legend && jsx(Legend, null, legend), children);
|
|
70
25
|
};
|
|
71
26
|
export default Fieldset;
|
package/dist/esm/form-header.js
CHANGED
|
@@ -24,13 +24,13 @@ var formHeaderWrapperStyles = css({
|
|
|
24
24
|
fontFamily: "".concat(fontFamily)
|
|
25
25
|
});
|
|
26
26
|
|
|
27
|
-
// eslint-disable-next-line @
|
|
27
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
28
28
|
var darkH700Styles = css(h700({
|
|
29
29
|
theme: {
|
|
30
30
|
mode: 'dark'
|
|
31
31
|
}
|
|
32
32
|
}));
|
|
33
|
-
// eslint-disable-next-line @
|
|
33
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
34
34
|
var lightH700Styles = css(h700({
|
|
35
35
|
theme: {
|
|
36
36
|
mode: 'light'
|
package/dist/esm/form-section.js
CHANGED
|
@@ -18,13 +18,13 @@ var formSectionWrapperStyles = css({
|
|
|
18
18
|
marginTop: "var(--ds-space-300, 24px)"
|
|
19
19
|
});
|
|
20
20
|
|
|
21
|
-
// eslint-disable-next-line @
|
|
21
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
22
22
|
var lightH600Styles = css(h600({
|
|
23
23
|
theme: {
|
|
24
24
|
mode: 'light'
|
|
25
25
|
}
|
|
26
26
|
}));
|
|
27
|
-
// eslint-disable-next-line @
|
|
27
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
28
28
|
var darkH600Styles = css(h600({
|
|
29
29
|
theme: {
|
|
30
30
|
mode: 'dark'
|
package/dist/esm/index.js
CHANGED
|
@@ -5,7 +5,7 @@ export { default as FormSection } from './form-section';
|
|
|
5
5
|
export { default as Field } from './field';
|
|
6
6
|
export { default as CheckboxField } from './checkbox-field';
|
|
7
7
|
export { default as RangeField } from './range-field';
|
|
8
|
-
export {
|
|
8
|
+
export { Label, Legend } from './label';
|
|
9
9
|
export { HelperMessage, ErrorMessage, ValidMessage } from './messages';
|
|
10
10
|
export { default as Fieldset } from './fieldset';
|
|
11
11
|
export { default as RequiredAsterisk } from './required-asterisk';
|
package/dist/esm/label.js
CHANGED
|
@@ -6,17 +6,12 @@ import { themed, useGlobalTheme } from '@atlaskit/theme/components';
|
|
|
6
6
|
import { fontFamily as getFontFamily } from '@atlaskit/theme/constants';
|
|
7
7
|
import { h200 } from '@atlaskit/theme/typography';
|
|
8
8
|
var fontFamily = getFontFamily();
|
|
9
|
-
var
|
|
9
|
+
var fieldsetLabelStyles = css({
|
|
10
10
|
display: 'inline-block',
|
|
11
11
|
marginTop: 0,
|
|
12
12
|
marginBottom: "var(--ds-space-050, 4px)",
|
|
13
13
|
fontFamily: fontFamily
|
|
14
14
|
});
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* TODO: Address duplication with packages/design-system/form/src/fieldset.tsx
|
|
18
|
-
* in https://product-fabric.atlassian.net/browse/DSP-7731
|
|
19
|
-
*/
|
|
20
15
|
var getFieldsetLabelDynamicStyles = function getFieldsetLabelDynamicStyles(mode) {
|
|
21
16
|
return css([h200({
|
|
22
17
|
theme: {
|
|
@@ -34,10 +29,10 @@ var getFieldsetLabelDynamicStyles = function getFieldsetLabelDynamicStyles(mode)
|
|
|
34
29
|
}]);
|
|
35
30
|
};
|
|
36
31
|
|
|
37
|
-
// eslint-disable-next-line @
|
|
32
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
38
33
|
var lightH200Styles = getFieldsetLabelDynamicStyles('light');
|
|
39
34
|
|
|
40
|
-
// eslint-disable-next-line @
|
|
35
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
41
36
|
var darkH200Styles = getFieldsetLabelDynamicStyles('dark');
|
|
42
37
|
|
|
43
38
|
/**
|
|
@@ -48,7 +43,7 @@ var darkH200Styles = getFieldsetLabelDynamicStyles('dark');
|
|
|
48
43
|
* It's recommended that a label has a `4px` spacing above its associated
|
|
49
44
|
* control element.
|
|
50
45
|
*/
|
|
51
|
-
var Label = function Label(_ref) {
|
|
46
|
+
export var Label = function Label(_ref) {
|
|
52
47
|
var children = _ref.children,
|
|
53
48
|
htmlFor = _ref.htmlFor,
|
|
54
49
|
id = _ref.id,
|
|
@@ -56,10 +51,24 @@ var Label = function Label(_ref) {
|
|
|
56
51
|
var _useGlobalTheme = useGlobalTheme(),
|
|
57
52
|
mode = _useGlobalTheme.mode;
|
|
58
53
|
return jsx("label", {
|
|
59
|
-
css: [mode === 'light' ? lightH200Styles : darkH200Styles,
|
|
54
|
+
css: [mode === 'light' ? lightH200Styles : darkH200Styles, fieldsetLabelStyles],
|
|
60
55
|
id: id,
|
|
61
56
|
htmlFor: htmlFor,
|
|
62
57
|
"data-testid": testId
|
|
63
58
|
}, children);
|
|
64
59
|
};
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* __Legend__
|
|
63
|
+
*
|
|
64
|
+
* A Legend represents a caption for a fieldset in a user interface.
|
|
65
|
+
*/
|
|
66
|
+
export var Legend = function Legend(_ref2) {
|
|
67
|
+
var children = _ref2.children;
|
|
68
|
+
var _useGlobalTheme2 = useGlobalTheme(),
|
|
69
|
+
mode = _useGlobalTheme2.mode;
|
|
70
|
+
return jsx("legend", {
|
|
71
|
+
css: [mode === 'light' ? lightH200Styles : darkH200Styles, fieldsetLabelStyles]
|
|
72
|
+
}, children);
|
|
73
|
+
};
|
|
65
74
|
export default Label;
|
package/dist/esm/messages.js
CHANGED
|
@@ -19,13 +19,13 @@ import { FieldId } from './field';
|
|
|
19
19
|
|
|
20
20
|
var fontFamily = getFontFamily();
|
|
21
21
|
|
|
22
|
-
// eslint-disable-next-line @
|
|
22
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
23
23
|
var lightH200Styles = css(h200({
|
|
24
24
|
theme: {
|
|
25
25
|
mode: 'light'
|
|
26
26
|
}
|
|
27
27
|
}));
|
|
28
|
-
// eslint-disable-next-line @
|
|
28
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
29
29
|
var darkH200Styles = css(h200({
|
|
30
30
|
theme: {
|
|
31
31
|
mode: 'dark'
|
|
@@ -91,7 +91,7 @@ var Message = function Message(_ref2) {
|
|
|
91
91
|
css: [mode === 'light' ? lightH200Styles : darkH200Styles, messageStyles, messageAppearanceStyles[appearance]],
|
|
92
92
|
"data-testid": testId,
|
|
93
93
|
id: fieldId,
|
|
94
|
-
|
|
94
|
+
"aria-live": "polite"
|
|
95
95
|
}, icon && jsx(IconWrapper, null, icon), content);
|
|
96
96
|
};
|
|
97
97
|
|
package/dist/esm/version.json
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export type { LabelProps } from '../label';
|
|
1
|
+
export { Label, Legend } from '../label';
|
|
2
|
+
export type { LabelProps, LegendProps } from '../label';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -9,8 +9,8 @@ export { default as CheckboxField } from './checkbox-field';
|
|
|
9
9
|
export type { CheckboxFieldProps } from './checkbox-field';
|
|
10
10
|
export { default as RangeField } from './range-field';
|
|
11
11
|
export type { RangeFieldProps } from './range-field';
|
|
12
|
-
export {
|
|
13
|
-
export type { LabelProps } from './label';
|
|
12
|
+
export { Label, Legend } from './label';
|
|
13
|
+
export type { LabelProps, LegendProps } from './label';
|
|
14
14
|
export { HelperMessage, ErrorMessage, ValidMessage } from './messages';
|
|
15
15
|
export { default as Fieldset } from './fieldset';
|
|
16
16
|
export { default as RequiredAsterisk } from './required-asterisk';
|
package/dist/types/label.d.ts
CHANGED
|
@@ -6,6 +6,9 @@ export interface LabelProps {
|
|
|
6
6
|
children: ReactNode;
|
|
7
7
|
testId?: string;
|
|
8
8
|
}
|
|
9
|
+
export interface LegendProps {
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
}
|
|
9
12
|
/**
|
|
10
13
|
* __Label__
|
|
11
14
|
*
|
|
@@ -14,5 +17,11 @@ export interface LabelProps {
|
|
|
14
17
|
* It's recommended that a label has a `4px` spacing above its associated
|
|
15
18
|
* control element.
|
|
16
19
|
*/
|
|
17
|
-
declare const Label: FC<LabelProps>;
|
|
20
|
+
export declare const Label: FC<LabelProps>;
|
|
21
|
+
/**
|
|
22
|
+
* __Legend__
|
|
23
|
+
*
|
|
24
|
+
* A Legend represents a caption for a fieldset in a user interface.
|
|
25
|
+
*/
|
|
26
|
+
export declare const Legend: FC<LegendProps>;
|
|
18
27
|
export default Label;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export type { LabelProps } from '../label';
|
|
1
|
+
export { Label, Legend } from '../label';
|
|
2
|
+
export type { LabelProps, LegendProps } from '../label';
|
|
@@ -9,8 +9,8 @@ export { default as CheckboxField } from './checkbox-field';
|
|
|
9
9
|
export type { CheckboxFieldProps } from './checkbox-field';
|
|
10
10
|
export { default as RangeField } from './range-field';
|
|
11
11
|
export type { RangeFieldProps } from './range-field';
|
|
12
|
-
export {
|
|
13
|
-
export type { LabelProps } from './label';
|
|
12
|
+
export { Label, Legend } from './label';
|
|
13
|
+
export type { LabelProps, LegendProps } from './label';
|
|
14
14
|
export { HelperMessage, ErrorMessage, ValidMessage } from './messages';
|
|
15
15
|
export { default as Fieldset } from './fieldset';
|
|
16
16
|
export { default as RequiredAsterisk } from './required-asterisk';
|
|
@@ -6,6 +6,9 @@ export interface LabelProps {
|
|
|
6
6
|
children: ReactNode;
|
|
7
7
|
testId?: string;
|
|
8
8
|
}
|
|
9
|
+
export interface LegendProps {
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
}
|
|
9
12
|
/**
|
|
10
13
|
* __Label__
|
|
11
14
|
*
|
|
@@ -14,5 +17,11 @@ export interface LabelProps {
|
|
|
14
17
|
* It's recommended that a label has a `4px` spacing above its associated
|
|
15
18
|
* control element.
|
|
16
19
|
*/
|
|
17
|
-
declare const Label: FC<LabelProps>;
|
|
20
|
+
export declare const Label: FC<LabelProps>;
|
|
21
|
+
/**
|
|
22
|
+
* __Legend__
|
|
23
|
+
*
|
|
24
|
+
* A Legend represents a caption for a fieldset in a user interface.
|
|
25
|
+
*/
|
|
26
|
+
export declare const Legend: FC<LegendProps>;
|
|
18
27
|
export default Label;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/form",
|
|
3
|
-
"version": "8.11.
|
|
3
|
+
"version": "8.11.9",
|
|
4
4
|
"description": "A form allows users to input information.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -12,30 +12,9 @@
|
|
|
12
12
|
"module": "dist/esm/index.js",
|
|
13
13
|
"module:es2019": "dist/es2019/index.js",
|
|
14
14
|
"types": "dist/types/index.d.ts",
|
|
15
|
-
"typesVersions": {
|
|
16
|
-
">=4.5 <4.9": {
|
|
17
|
-
"*": [
|
|
18
|
-
"dist/types-ts4.5/*",
|
|
19
|
-
"dist/types-ts4.5/index.d.ts"
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
15
|
"sideEffects": false,
|
|
24
16
|
"atlaskit:src": "src/index.tsx",
|
|
25
17
|
"atlaskit:designLink": "https://atlassian.design/guidelines/product/patterns/forms",
|
|
26
|
-
"af:exports": {
|
|
27
|
-
"./CheckboxField": "./src/entry-points/checkbox-field.tsx",
|
|
28
|
-
"./Field": "./src/entry-points/field.tsx",
|
|
29
|
-
"./Fieldset": "./src/entry-points/fieldset.tsx",
|
|
30
|
-
"./FormFooter": "./src/entry-points/form-footer.tsx",
|
|
31
|
-
"./FormHeader": "./src/entry-points/form-header.tsx",
|
|
32
|
-
"./FormSection": "./src/entry-points/form-section.tsx",
|
|
33
|
-
"./Form": "./src/entry-points/form.tsx",
|
|
34
|
-
"./Messages": "./src/entry-points/messages.tsx",
|
|
35
|
-
"./RangeField": "./src/entry-points/range-field.tsx",
|
|
36
|
-
"./Label": "./src/entry-points/label.tsx",
|
|
37
|
-
".": "./src/index.tsx"
|
|
38
|
-
},
|
|
39
18
|
"atlassian": {
|
|
40
19
|
"team": "Design System Team",
|
|
41
20
|
"releaseModel": "continuous",
|
|
@@ -44,11 +23,10 @@
|
|
|
44
23
|
"category": "Components"
|
|
45
24
|
}
|
|
46
25
|
},
|
|
47
|
-
"homepage": "https://atlassian.design/components/form/",
|
|
48
26
|
"dependencies": {
|
|
49
27
|
"@atlaskit/icon": "^21.12.0",
|
|
50
28
|
"@atlaskit/theme": "^12.5.0",
|
|
51
|
-
"@atlaskit/tokens": "^1.
|
|
29
|
+
"@atlaskit/tokens": "^1.13.0",
|
|
52
30
|
"@babel/runtime": "^7.0.0",
|
|
53
31
|
"@emotion/react": "^11.7.1",
|
|
54
32
|
"final-form": "^4.20.1",
|
|
@@ -61,30 +39,22 @@
|
|
|
61
39
|
"react": "^16.8.0"
|
|
62
40
|
},
|
|
63
41
|
"devDependencies": {
|
|
64
|
-
"@
|
|
65
|
-
"@
|
|
42
|
+
"@af/accessibility-testing": "*",
|
|
43
|
+
"@af/visual-regression": "*",
|
|
44
|
+
"@atlaskit/button": "^16.8.0",
|
|
66
45
|
"@atlaskit/checkbox": "^12.6.0",
|
|
67
|
-
"@atlaskit/datetime-picker": "^12.7.0",
|
|
68
|
-
"@atlaskit/docs": "^9.1.0",
|
|
69
|
-
"@atlaskit/dropdown-menu": "^11.9.0",
|
|
70
46
|
"@atlaskit/ds-lib": "^2.2.0",
|
|
71
|
-
"@atlaskit/lozenge": "^11.4.0",
|
|
72
|
-
"@atlaskit/modal-dialog": "^12.6.0",
|
|
73
|
-
"@atlaskit/radio": "^5.6.0",
|
|
74
47
|
"@atlaskit/range": "^7.1.0",
|
|
75
|
-
"@atlaskit/section-message": "^6.4.0",
|
|
76
48
|
"@atlaskit/select": "^16.5.0",
|
|
77
49
|
"@atlaskit/ssr": "*",
|
|
78
|
-
"@atlaskit/
|
|
79
|
-
"@atlaskit/textfield": "^5.5.0",
|
|
80
|
-
"@atlaskit/toggle": "^12.6.0",
|
|
81
|
-
"@atlaskit/tooltip": "^17.8.0",
|
|
50
|
+
"@atlaskit/textfield": "^5.6.0",
|
|
82
51
|
"@atlaskit/visual-regression": "*",
|
|
83
52
|
"@atlaskit/webdriver-runner": "*",
|
|
84
53
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
85
54
|
"@testing-library/react": "^12.1.5",
|
|
86
55
|
"@testing-library/user-event": "^14.4.3",
|
|
87
56
|
"@types/final-form-focus": "^1.1.1",
|
|
57
|
+
"jest-in-case": "^1.0.2",
|
|
88
58
|
"react-dom": "^16.8.0",
|
|
89
59
|
"react-router": "^4.2.0",
|
|
90
60
|
"react-router-dom": "^4.2.2",
|
|
@@ -120,5 +90,27 @@
|
|
|
120
90
|
"deprecation": "no-deprecated-imports"
|
|
121
91
|
}
|
|
122
92
|
},
|
|
93
|
+
"typesVersions": {
|
|
94
|
+
">=4.5 <4.9": {
|
|
95
|
+
"*": [
|
|
96
|
+
"dist/types-ts4.5/*",
|
|
97
|
+
"dist/types-ts4.5/index.d.ts"
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"af:exports": {
|
|
102
|
+
"./CheckboxField": "./src/entry-points/checkbox-field.tsx",
|
|
103
|
+
"./Field": "./src/entry-points/field.tsx",
|
|
104
|
+
"./Fieldset": "./src/entry-points/fieldset.tsx",
|
|
105
|
+
"./FormFooter": "./src/entry-points/form-footer.tsx",
|
|
106
|
+
"./FormHeader": "./src/entry-points/form-header.tsx",
|
|
107
|
+
"./FormSection": "./src/entry-points/form-section.tsx",
|
|
108
|
+
"./Form": "./src/entry-points/form.tsx",
|
|
109
|
+
"./Messages": "./src/entry-points/messages.tsx",
|
|
110
|
+
"./RangeField": "./src/entry-points/range-field.tsx",
|
|
111
|
+
"./Label": "./src/entry-points/label.tsx",
|
|
112
|
+
".": "./src/index.tsx"
|
|
113
|
+
},
|
|
114
|
+
"homepage": "https://atlassian.design/components/form/",
|
|
123
115
|
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
|
124
116
|
}
|
package/report.api.md
CHANGED
|
@@ -239,6 +239,15 @@ export interface LabelProps {
|
|
|
239
239
|
testId?: string;
|
|
240
240
|
}
|
|
241
241
|
|
|
242
|
+
// @public
|
|
243
|
+
export const Legend: FC<LegendProps>;
|
|
244
|
+
|
|
245
|
+
// @public (undocumented)
|
|
246
|
+
export interface LegendProps {
|
|
247
|
+
// (undocumented)
|
|
248
|
+
children: ReactNode;
|
|
249
|
+
}
|
|
250
|
+
|
|
242
251
|
// @public (undocumented)
|
|
243
252
|
type MessageAppearance = 'default' | 'error' | 'valid';
|
|
244
253
|
|
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -190,6 +190,15 @@ export interface LabelProps {
|
|
|
190
190
|
testId?: string;
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
+
// @public
|
|
194
|
+
export const Legend: FC<LegendProps>;
|
|
195
|
+
|
|
196
|
+
// @public (undocumented)
|
|
197
|
+
export interface LegendProps {
|
|
198
|
+
// (undocumented)
|
|
199
|
+
children: ReactNode;
|
|
200
|
+
}
|
|
201
|
+
|
|
193
202
|
// @public (undocumented)
|
|
194
203
|
type MessageAppearance = 'default' | 'error' | 'valid';
|
|
195
204
|
|