@dhis2-ui/card 8.2.0 → 8.2.3
Sign up to get free protection for your applications and to get access to all the features.
- package/build/cjs/card.js +14 -11
- package/build/cjs/card.stories.js +4 -18
- package/build/es/card.js +14 -11
- package/build/es/card.stories.js +3 -17
- package/package.json +2 -2
package/build/cjs/card.js
CHANGED
@@ -17,17 +17,20 @@ var _react = _interopRequireDefault(require("react"));
|
|
17
17
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
19
19
|
|
20
|
-
const Card =
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
20
|
+
const Card = _ref => {
|
21
|
+
let {
|
22
|
+
className,
|
23
|
+
children,
|
24
|
+
dataTest
|
25
|
+
} = _ref;
|
26
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
27
|
+
"data-test": dataTest,
|
28
|
+
className: _style.default.dynamic([["3454125090", [_uiConstants.colors.white, _uiConstants.elevations.e100]]]) + " " + ((0, _classnames.default)(className) || "")
|
29
|
+
}, children, /*#__PURE__*/_react.default.createElement(_style.default, {
|
30
|
+
id: "3454125090",
|
31
|
+
dynamic: [_uiConstants.colors.white, _uiConstants.elevations.e100]
|
32
|
+
}, ["div.__jsx-style-dynamic-selector{display:inline-block;position:relative;width:100%;height:100%;border-radius:3px;background:".concat(_uiConstants.colors.white, ";box-shadow:").concat(_uiConstants.elevations.e100, ";}")]));
|
33
|
+
};
|
31
34
|
|
32
35
|
exports.Card = Card;
|
33
36
|
Card.defaultProps = {
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.default = exports.Default = void 0;
|
7
7
|
|
8
8
|
var _box = require("@dhis2-ui/box");
|
9
9
|
|
@@ -13,24 +13,10 @@ var _card = require("./card.js");
|
|
13
13
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
15
15
|
|
16
|
-
const subtitle =
|
17
|
-
|
18
|
-
and separating blocks of content.
|
19
|
-
`;
|
20
|
-
const description = `
|
21
|
-
Use a card where there is content that can be grouped together.
|
22
|
-
Cards are most often useful when this grouped content may be repeated,
|
23
|
-
for example with items on a dashboard, or different sections of patient
|
24
|
-
information displayed in a profile.
|
25
|
-
|
26
|
-
Note that it requires a parent, like [Box](../?path=/docs/layout-box--default), to define its size.
|
27
|
-
|
28
|
-
\`\`\`js
|
29
|
-
import { Card } from '@dhis2/ui'
|
30
|
-
\`\`\`
|
31
|
-
`;
|
16
|
+
const subtitle = "\nA card is a container element for grouping together\nand separating blocks of content.\n";
|
17
|
+
const description = "\nUse a card where there is content that can be grouped together.\nCards are most often useful when this grouped content may be repeated,\nfor example with items on a dashboard, or different sections of patient\ninformation displayed in a profile.\n\nNote that it requires a parent, like [Box](../?path=/docs/layout-box--default), to define its size.\n\n```js\nimport { Card } from '@dhis2/ui'\n```\n";
|
32
18
|
var _default = {
|
33
|
-
title: '
|
19
|
+
title: 'Card',
|
34
20
|
component: _card.Card,
|
35
21
|
parameters: {
|
36
22
|
componentSubtitle: subtitle,
|
package/build/es/card.js
CHANGED
@@ -4,17 +4,20 @@ import cx from 'classnames';
|
|
4
4
|
import PropTypes from 'prop-types';
|
5
5
|
import React from 'react';
|
6
6
|
|
7
|
-
const Card =
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
7
|
+
const Card = _ref => {
|
8
|
+
let {
|
9
|
+
className,
|
10
|
+
children,
|
11
|
+
dataTest
|
12
|
+
} = _ref;
|
13
|
+
return /*#__PURE__*/React.createElement("div", {
|
14
|
+
"data-test": dataTest,
|
15
|
+
className: _JSXStyle.dynamic([["3454125090", [colors.white, elevations.e100]]]) + " " + (cx(className) || "")
|
16
|
+
}, children, /*#__PURE__*/React.createElement(_JSXStyle, {
|
17
|
+
id: "3454125090",
|
18
|
+
dynamic: [colors.white, elevations.e100]
|
19
|
+
}, ["div.__jsx-style-dynamic-selector{display:inline-block;position:relative;width:100%;height:100%;border-radius:3px;background:".concat(colors.white, ";box-shadow:").concat(elevations.e100, ";}")]));
|
20
|
+
};
|
18
21
|
|
19
22
|
Card.defaultProps = {
|
20
23
|
dataTest: 'dhis2-uicore-card'
|
package/build/es/card.stories.js
CHANGED
@@ -1,24 +1,10 @@
|
|
1
1
|
import { Box } from '@dhis2-ui/box';
|
2
2
|
import React from 'react';
|
3
3
|
import { Card } from './card.js';
|
4
|
-
const subtitle =
|
5
|
-
|
6
|
-
and separating blocks of content.
|
7
|
-
`;
|
8
|
-
const description = `
|
9
|
-
Use a card where there is content that can be grouped together.
|
10
|
-
Cards are most often useful when this grouped content may be repeated,
|
11
|
-
for example with items on a dashboard, or different sections of patient
|
12
|
-
information displayed in a profile.
|
13
|
-
|
14
|
-
Note that it requires a parent, like [Box](../?path=/docs/layout-box--default), to define its size.
|
15
|
-
|
16
|
-
\`\`\`js
|
17
|
-
import { Card } from '@dhis2/ui'
|
18
|
-
\`\`\`
|
19
|
-
`;
|
4
|
+
const subtitle = "\nA card is a container element for grouping together\nand separating blocks of content.\n";
|
5
|
+
const description = "\nUse a card where there is content that can be grouped together.\nCards are most often useful when this grouped content may be repeated,\nfor example with items on a dashboard, or different sections of patient\ninformation displayed in a profile.\n\nNote that it requires a parent, like [Box](../?path=/docs/layout-box--default), to define its size.\n\n```js\nimport { Card } from '@dhis2/ui'\n```\n";
|
20
6
|
export default {
|
21
|
-
title: '
|
7
|
+
title: 'Card',
|
22
8
|
component: Card,
|
23
9
|
parameters: {
|
24
10
|
componentSubtitle: subtitle,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@dhis2-ui/card",
|
3
|
-
"version": "8.2.
|
3
|
+
"version": "8.2.3",
|
4
4
|
"description": "UI Card",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -32,7 +32,7 @@
|
|
32
32
|
},
|
33
33
|
"dependencies": {
|
34
34
|
"@dhis2/prop-types": "^3.0.0-beta.1",
|
35
|
-
"@dhis2/ui-constants": "8.2.
|
35
|
+
"@dhis2/ui-constants": "8.2.3",
|
36
36
|
"classnames": "^2.3.1",
|
37
37
|
"prop-types": "^15.7.2"
|
38
38
|
},
|