@dhis2-ui/legend 8.1.10 → 8.2.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.
@@ -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
- className,
22
- children,
23
- required,
24
- dataTest
25
- }) => /*#__PURE__*/_react.default.createElement("legend", {
26
- "data-test": dataTest,
27
- className: _style.default.dynamic([["945530629", [_uiConstants.colors.grey900]]]) + " " + (className || "")
28
- }, children, required && /*#__PURE__*/_react.default.createElement(_required.Required, {
29
- dataTest: `${dataTest}-required`
30
- }), /*#__PURE__*/_react.default.createElement(_style.default, {
31
- id: "945530629",
32
- dynamic: [_uiConstants.colors.grey900]
33
- }, [`legend.__jsx-style-dynamic-selector{font-size:14px;line-height:16px;color:${_uiConstants.colors.grey900};}`]));
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.Required = exports.Default = exports.default = void 0;
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: 'Forms/Field Set/Legend',
16
+ title: 'Legend',
25
17
  component: _legend.Legend,
26
18
  parameters: {
27
19
  docs: {
@@ -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
- className,
9
- children,
10
- required,
11
- dataTest
12
- }) => /*#__PURE__*/React.createElement("legend", {
13
- "data-test": dataTest,
14
- className: _JSXStyle.dynamic([["945530629", [colors.grey900]]]) + " " + (className || "")
15
- }, children, required && /*#__PURE__*/React.createElement(Required, {
16
- dataTest: `${dataTest}-required`
17
- }), /*#__PURE__*/React.createElement(_JSXStyle, {
18
- id: "945530629",
19
- dynamic: [colors.grey900]
20
- }, [`legend.__jsx-style-dynamic-selector{font-size:14px;line-height:16px;color:${colors.grey900};}`]));
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: 'Forms/Field Set/Legend',
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.1.10",
3
+ "version": "8.2.1",
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.1.10",
36
- "@dhis2/ui-constants": "8.1.10",
35
+ "@dhis2-ui/required": "8.2.1",
36
+ "@dhis2/ui-constants": "8.2.1",
37
37
  "classnames": "^2.3.1",
38
38
  "prop-types": "^15.7.2"
39
39
  },