@dhis2-ui/legend 8.2.0 → 8.2.3
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/build/cjs/legend.js +17 -14
- package/build/cjs/legend.stories.js +3 -11
- package/build/es/legend.js +17 -14
- package/build/es/legend.stories.js +2 -10
- package/package.json +3 -3
package/build/cjs/legend.js
CHANGED
|
@@ -17,20 +17,23 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
17
17
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
19
|
|
|
20
|
-
const Legend =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
20
|
+
const Legend = _ref => {
|
|
21
|
+
let {
|
|
22
|
+
className,
|
|
23
|
+
children,
|
|
24
|
+
required,
|
|
25
|
+
dataTest
|
|
26
|
+
} = _ref;
|
|
27
|
+
return /*#__PURE__*/_react.default.createElement("legend", {
|
|
28
|
+
"data-test": dataTest,
|
|
29
|
+
className: _style.default.dynamic([["945530629", [_uiConstants.colors.grey900]]]) + " " + (className || "")
|
|
30
|
+
}, children, required && /*#__PURE__*/_react.default.createElement(_required.Required, {
|
|
31
|
+
dataTest: "".concat(dataTest, "-required")
|
|
32
|
+
}), /*#__PURE__*/_react.default.createElement(_style.default, {
|
|
33
|
+
id: "945530629",
|
|
34
|
+
dynamic: [_uiConstants.colors.grey900]
|
|
35
|
+
}, ["legend.__jsx-style-dynamic-selector{font-size:14px;line-height:16px;color:".concat(_uiConstants.colors.grey900, ";}")]));
|
|
36
|
+
};
|
|
34
37
|
|
|
35
38
|
exports.Legend = Legend;
|
|
36
39
|
Legend.defaultProps = {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.default = exports.Required = exports.Default = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
@@ -11,17 +11,9 @@ var _legend = require("./legend.js");
|
|
|
11
11
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
|
|
14
|
-
const description =
|
|
15
|
-
Legends are to be used in a Field Set to describe the form fields. They may indicate that the fields are required.
|
|
16
|
-
|
|
17
|
-
See the [Field Set](../?path=/docs/forms-field-set-field-set--usage-example-a-radio-button-group-with-error-status) for a usage example.
|
|
18
|
-
|
|
19
|
-
\`\`\`js
|
|
20
|
-
import { Legend } from '@dhis2/ui'
|
|
21
|
-
\`\`\`
|
|
22
|
-
`;
|
|
14
|
+
const description = "\nLegends are to be used in a Field Set to describe the form fields. They may indicate that the fields are required.\n\nSee the [Field Set](../?path=/docs/forms-field-set-field-set--usage-example-a-radio-button-group-with-error-status) for a usage example.\n\n```js\nimport { Legend } from '@dhis2/ui'\n```\n";
|
|
23
15
|
var _default = {
|
|
24
|
-
title: '
|
|
16
|
+
title: 'Legend',
|
|
25
17
|
component: _legend.Legend,
|
|
26
18
|
parameters: {
|
|
27
19
|
docs: {
|
package/build/es/legend.js
CHANGED
|
@@ -4,20 +4,23 @@ import { colors } from '@dhis2/ui-constants';
|
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
|
-
const Legend =
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
7
|
+
const Legend = _ref => {
|
|
8
|
+
let {
|
|
9
|
+
className,
|
|
10
|
+
children,
|
|
11
|
+
required,
|
|
12
|
+
dataTest
|
|
13
|
+
} = _ref;
|
|
14
|
+
return /*#__PURE__*/React.createElement("legend", {
|
|
15
|
+
"data-test": dataTest,
|
|
16
|
+
className: _JSXStyle.dynamic([["945530629", [colors.grey900]]]) + " " + (className || "")
|
|
17
|
+
}, children, required && /*#__PURE__*/React.createElement(Required, {
|
|
18
|
+
dataTest: "".concat(dataTest, "-required")
|
|
19
|
+
}), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
20
|
+
id: "945530629",
|
|
21
|
+
dynamic: [colors.grey900]
|
|
22
|
+
}, ["legend.__jsx-style-dynamic-selector{font-size:14px;line-height:16px;color:".concat(colors.grey900, ";}")]));
|
|
23
|
+
};
|
|
21
24
|
|
|
22
25
|
Legend.defaultProps = {
|
|
23
26
|
dataTest: 'dhis2-uicore-legend'
|
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Legend } from './legend.js';
|
|
3
|
-
const description =
|
|
4
|
-
Legends are to be used in a Field Set to describe the form fields. They may indicate that the fields are required.
|
|
5
|
-
|
|
6
|
-
See the [Field Set](../?path=/docs/forms-field-set-field-set--usage-example-a-radio-button-group-with-error-status) for a usage example.
|
|
7
|
-
|
|
8
|
-
\`\`\`js
|
|
9
|
-
import { Legend } from '@dhis2/ui'
|
|
10
|
-
\`\`\`
|
|
11
|
-
`;
|
|
3
|
+
const description = "\nLegends are to be used in a Field Set to describe the form fields. They may indicate that the fields are required.\n\nSee the [Field Set](../?path=/docs/forms-field-set-field-set--usage-example-a-radio-button-group-with-error-status) for a usage example.\n\n```js\nimport { Legend } from '@dhis2/ui'\n```\n";
|
|
12
4
|
export default {
|
|
13
|
-
title: '
|
|
5
|
+
title: 'Legend',
|
|
14
6
|
component: Legend,
|
|
15
7
|
parameters: {
|
|
16
8
|
docs: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dhis2-ui/legend",
|
|
3
|
-
"version": "8.2.
|
|
3
|
+
"version": "8.2.3",
|
|
4
4
|
"description": "UI Legend",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@dhis2/prop-types": "^3.0.0-beta.1",
|
|
35
|
-
"@dhis2-ui/required": "8.2.
|
|
36
|
-
"@dhis2/ui-constants": "8.2.
|
|
35
|
+
"@dhis2-ui/required": "8.2.3",
|
|
36
|
+
"@dhis2/ui-constants": "8.2.3",
|
|
37
37
|
"classnames": "^2.3.1",
|
|
38
38
|
"prop-types": "^15.7.2"
|
|
39
39
|
},
|