@sb1/ffe-cards-react 13.0.19 → 13.0.21
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/es/CardBase.js +2 -4
- package/es/IconCard/IconCard.js +2 -4
- package/es/ImageCard/ImageCard.js +2 -4
- package/es/StippledCard/StippledCard.js +2 -4
- package/es/TextCard/TextCard.js +2 -1
- package/es/components/ComponentBase.js +2 -4
- package/es/components/Title.js +2 -4
- package/lib/CardBase.js +2 -4
- package/lib/IconCard/IconCard.js +2 -4
- package/lib/ImageCard/ImageCard.js +2 -4
- package/lib/StippledCard/StippledCard.js +2 -4
- package/lib/TextCard/TextCard.js +2 -1
- package/lib/components/ComponentBase.js +2 -4
- package/lib/components/Title.js +2 -4
- package/package.json +4 -4
package/es/CardBase.js
CHANGED
|
@@ -7,7 +7,8 @@ import classNames from 'classnames';
|
|
|
7
7
|
import { oneOfType, node, func, string, elementType } from 'prop-types';
|
|
8
8
|
var CardBase = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
9
9
|
var className = props.className,
|
|
10
|
-
|
|
10
|
+
_props$element = props.element,
|
|
11
|
+
Element = _props$element === void 0 ? 'a' : _props$element,
|
|
11
12
|
children = props.children,
|
|
12
13
|
rest = _objectWithoutProperties(props, _excluded);
|
|
13
14
|
return /*#__PURE__*/React.createElement(Element, _extends({
|
|
@@ -15,9 +16,6 @@ var CardBase = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
15
16
|
ref: ref
|
|
16
17
|
}, rest), children);
|
|
17
18
|
});
|
|
18
|
-
CardBase.defaultProps = {
|
|
19
|
-
element: 'a'
|
|
20
|
-
};
|
|
21
19
|
CardBase.propTypes = {
|
|
22
20
|
className: string,
|
|
23
21
|
children: node,
|
package/es/IconCard/IconCard.js
CHANGED
|
@@ -16,7 +16,8 @@ var IconCard = function IconCard(props) {
|
|
|
16
16
|
var className = props.className,
|
|
17
17
|
icon = props.icon,
|
|
18
18
|
condensed = props.condensed,
|
|
19
|
-
|
|
19
|
+
_props$element = props.element,
|
|
20
|
+
Element = _props$element === void 0 ? 'a' : _props$element,
|
|
20
21
|
children = props.children,
|
|
21
22
|
rest = _objectWithoutProperties(props, _excluded);
|
|
22
23
|
return /*#__PURE__*/React.createElement(Element, _extends({
|
|
@@ -29,9 +30,6 @@ var IconCard = function IconCard(props) {
|
|
|
29
30
|
className: "ffe-icon-card__body"
|
|
30
31
|
}, typeof children === 'function' ? children(components) : children));
|
|
31
32
|
};
|
|
32
|
-
IconCard.defaultProps = {
|
|
33
|
-
element: 'a'
|
|
34
|
-
};
|
|
35
33
|
IconCard.propTypes = {
|
|
36
34
|
className: string,
|
|
37
35
|
/** Element of icon */
|
|
@@ -10,7 +10,8 @@ var ImageCard = function ImageCard(props) {
|
|
|
10
10
|
var className = props.className,
|
|
11
11
|
imageSrc = props.imageSrc,
|
|
12
12
|
imageAltText = props.imageAltText,
|
|
13
|
-
|
|
13
|
+
_props$element = props.element,
|
|
14
|
+
Element = _props$element === void 0 ? 'a' : _props$element,
|
|
14
15
|
children = props.children,
|
|
15
16
|
rest = _objectWithoutProperties(props, _excluded);
|
|
16
17
|
return /*#__PURE__*/React.createElement(Element, _extends({
|
|
@@ -27,9 +28,6 @@ var ImageCard = function ImageCard(props) {
|
|
|
27
28
|
className: "ffe-image-card__body"
|
|
28
29
|
}, typeof children === 'function' ? children(components) : children));
|
|
29
30
|
};
|
|
30
|
-
ImageCard.defaultProps = {
|
|
31
|
-
element: 'a'
|
|
32
|
-
};
|
|
33
31
|
ImageCard.propTypes = {
|
|
34
32
|
className: string,
|
|
35
33
|
/** The src for the image */
|
|
@@ -8,7 +8,8 @@ import { bool, elementType, element, func, node, oneOfType, string, shape, oneOf
|
|
|
8
8
|
import { Text, Title, Subtext, CardName } from '../components';
|
|
9
9
|
var StippledCard = function StippledCard(_ref) {
|
|
10
10
|
var className = _ref.className,
|
|
11
|
-
|
|
11
|
+
_ref$element = _ref.element,
|
|
12
|
+
Element = _ref$element === void 0 ? 'a' : _ref$element,
|
|
12
13
|
children = _ref.children,
|
|
13
14
|
img = _ref.img,
|
|
14
15
|
condensed = _ref.condensed,
|
|
@@ -29,9 +30,6 @@ var StippledCard = function StippledCard(_ref) {
|
|
|
29
30
|
Subtext: Subtext
|
|
30
31
|
}) : children));
|
|
31
32
|
};
|
|
32
|
-
StippledCard.defaultProps = {
|
|
33
|
-
element: 'a'
|
|
34
|
-
};
|
|
35
33
|
StippledCard.propTypes = {
|
|
36
34
|
className: string,
|
|
37
35
|
/** The element to render the card as */
|
package/es/TextCard/TextCard.js
CHANGED
|
@@ -9,7 +9,8 @@ import * as components from '../components';
|
|
|
9
9
|
var TextCard = function TextCard(props) {
|
|
10
10
|
var className = props.className,
|
|
11
11
|
leftAlign = props.leftAlign,
|
|
12
|
-
|
|
12
|
+
_props$element = props.element,
|
|
13
|
+
Element = _props$element === void 0 ? 'a' : _props$element,
|
|
13
14
|
children = props.children,
|
|
14
15
|
rest = _objectWithoutProperties(props, _excluded);
|
|
15
16
|
return /*#__PURE__*/React.createElement(Element, _extends({
|
|
@@ -7,15 +7,13 @@ import classNames from 'classnames';
|
|
|
7
7
|
import { string, node, oneOfType, func, elementType } from 'prop-types';
|
|
8
8
|
var ComponentBase = function ComponentBase(_ref) {
|
|
9
9
|
var className = _ref.className,
|
|
10
|
-
|
|
10
|
+
_ref$element = _ref.element,
|
|
11
|
+
Element = _ref$element === void 0 ? 'p' : _ref$element,
|
|
11
12
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
12
13
|
return /*#__PURE__*/React.createElement(Element, _extends({
|
|
13
14
|
className: classNames(className)
|
|
14
15
|
}, rest));
|
|
15
16
|
};
|
|
16
|
-
ComponentBase.defaultProps = {
|
|
17
|
-
element: 'p'
|
|
18
|
-
};
|
|
19
17
|
ComponentBase.propTypes = {
|
|
20
18
|
className: string,
|
|
21
19
|
element: oneOfType([func, string, elementType]),
|
package/es/components/Title.js
CHANGED
|
@@ -8,7 +8,8 @@ import { string, bool } from 'prop-types';
|
|
|
8
8
|
import ComponentBase from './ComponentBase';
|
|
9
9
|
var Title = function Title(_ref) {
|
|
10
10
|
var className = _ref.className,
|
|
11
|
-
overflowEllipsis = _ref.overflowEllipsis,
|
|
11
|
+
_ref$overflowEllipsis = _ref.overflowEllipsis,
|
|
12
|
+
overflowEllipsis = _ref$overflowEllipsis === void 0 ? false : _ref$overflowEllipsis,
|
|
12
13
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
13
14
|
return /*#__PURE__*/React.createElement(ComponentBase, _extends({
|
|
14
15
|
className: classNames('ffe-card-body__title', {
|
|
@@ -16,9 +17,6 @@ var Title = function Title(_ref) {
|
|
|
16
17
|
}, className)
|
|
17
18
|
}, rest));
|
|
18
19
|
};
|
|
19
|
-
Title.defaultProps = {
|
|
20
|
-
overflowEllipsis: false
|
|
21
|
-
};
|
|
22
20
|
Title.propTypes = {
|
|
23
21
|
className: string,
|
|
24
22
|
/** Disable wrapping and hide overflow with ellipsis */
|
package/lib/CardBase.js
CHANGED
|
@@ -14,7 +14,8 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
14
14
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
15
15
|
var CardBase = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
16
16
|
var className = props.className,
|
|
17
|
-
|
|
17
|
+
_props$element = props.element,
|
|
18
|
+
Element = _props$element === void 0 ? 'a' : _props$element,
|
|
18
19
|
children = props.children,
|
|
19
20
|
rest = _objectWithoutProperties(props, _excluded);
|
|
20
21
|
return /*#__PURE__*/_react.default.createElement(Element, _extends({
|
|
@@ -22,9 +23,6 @@ var CardBase = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
22
23
|
ref: ref
|
|
23
24
|
}, rest), children);
|
|
24
25
|
});
|
|
25
|
-
CardBase.defaultProps = {
|
|
26
|
-
element: 'a'
|
|
27
|
-
};
|
|
28
26
|
CardBase.propTypes = {
|
|
29
27
|
className: _propTypes.string,
|
|
30
28
|
children: _propTypes.node,
|
package/lib/IconCard/IconCard.js
CHANGED
|
@@ -25,7 +25,8 @@ var IconCard = function IconCard(props) {
|
|
|
25
25
|
var className = props.className,
|
|
26
26
|
icon = props.icon,
|
|
27
27
|
condensed = props.condensed,
|
|
28
|
-
|
|
28
|
+
_props$element = props.element,
|
|
29
|
+
Element = _props$element === void 0 ? 'a' : _props$element,
|
|
29
30
|
children = props.children,
|
|
30
31
|
rest = _objectWithoutProperties(props, _excluded);
|
|
31
32
|
return /*#__PURE__*/_react.default.createElement(Element, _extends({
|
|
@@ -38,9 +39,6 @@ var IconCard = function IconCard(props) {
|
|
|
38
39
|
className: "ffe-icon-card__body"
|
|
39
40
|
}, typeof children === 'function' ? children(components) : children));
|
|
40
41
|
};
|
|
41
|
-
IconCard.defaultProps = {
|
|
42
|
-
element: 'a'
|
|
43
|
-
};
|
|
44
42
|
IconCard.propTypes = {
|
|
45
43
|
className: _propTypes.string,
|
|
46
44
|
/** Element of icon */
|
|
@@ -20,7 +20,8 @@ var ImageCard = function ImageCard(props) {
|
|
|
20
20
|
var className = props.className,
|
|
21
21
|
imageSrc = props.imageSrc,
|
|
22
22
|
imageAltText = props.imageAltText,
|
|
23
|
-
|
|
23
|
+
_props$element = props.element,
|
|
24
|
+
Element = _props$element === void 0 ? 'a' : _props$element,
|
|
24
25
|
children = props.children,
|
|
25
26
|
rest = _objectWithoutProperties(props, _excluded);
|
|
26
27
|
return /*#__PURE__*/_react.default.createElement(Element, _extends({
|
|
@@ -37,9 +38,6 @@ var ImageCard = function ImageCard(props) {
|
|
|
37
38
|
className: "ffe-image-card__body"
|
|
38
39
|
}, typeof children === 'function' ? children(components) : children));
|
|
39
40
|
};
|
|
40
|
-
ImageCard.defaultProps = {
|
|
41
|
-
element: 'a'
|
|
42
|
-
};
|
|
43
41
|
ImageCard.propTypes = {
|
|
44
42
|
className: _propTypes.string,
|
|
45
43
|
/** The src for the image */
|
|
@@ -15,7 +15,8 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
15
15
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
16
16
|
var StippledCard = function StippledCard(_ref) {
|
|
17
17
|
var className = _ref.className,
|
|
18
|
-
|
|
18
|
+
_ref$element = _ref.element,
|
|
19
|
+
Element = _ref$element === void 0 ? 'a' : _ref$element,
|
|
19
20
|
children = _ref.children,
|
|
20
21
|
img = _ref.img,
|
|
21
22
|
condensed = _ref.condensed,
|
|
@@ -36,9 +37,6 @@ var StippledCard = function StippledCard(_ref) {
|
|
|
36
37
|
Subtext: _components.Subtext
|
|
37
38
|
}) : children));
|
|
38
39
|
};
|
|
39
|
-
StippledCard.defaultProps = {
|
|
40
|
-
element: 'a'
|
|
41
|
-
};
|
|
42
40
|
StippledCard.propTypes = {
|
|
43
41
|
className: _propTypes.string,
|
|
44
42
|
/** The element to render the card as */
|
package/lib/TextCard/TextCard.js
CHANGED
|
@@ -19,7 +19,8 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
19
19
|
var TextCard = function TextCard(props) {
|
|
20
20
|
var className = props.className,
|
|
21
21
|
leftAlign = props.leftAlign,
|
|
22
|
-
|
|
22
|
+
_props$element = props.element,
|
|
23
|
+
Element = _props$element === void 0 ? 'a' : _props$element,
|
|
23
24
|
children = props.children,
|
|
24
25
|
rest = _objectWithoutProperties(props, _excluded);
|
|
25
26
|
return /*#__PURE__*/_react.default.createElement(Element, _extends({
|
|
@@ -14,15 +14,13 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
14
14
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
15
15
|
var ComponentBase = function ComponentBase(_ref) {
|
|
16
16
|
var className = _ref.className,
|
|
17
|
-
|
|
17
|
+
_ref$element = _ref.element,
|
|
18
|
+
Element = _ref$element === void 0 ? 'p' : _ref$element,
|
|
18
19
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
19
20
|
return /*#__PURE__*/_react.default.createElement(Element, _extends({
|
|
20
21
|
className: (0, _classnames.default)(className)
|
|
21
22
|
}, rest));
|
|
22
23
|
};
|
|
23
|
-
ComponentBase.defaultProps = {
|
|
24
|
-
element: 'p'
|
|
25
|
-
};
|
|
26
24
|
ComponentBase.propTypes = {
|
|
27
25
|
className: _propTypes.string,
|
|
28
26
|
element: (0, _propTypes.oneOfType)([_propTypes.func, _propTypes.string, _propTypes.elementType]),
|
package/lib/components/Title.js
CHANGED
|
@@ -15,7 +15,8 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
15
15
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
16
16
|
var Title = function Title(_ref) {
|
|
17
17
|
var className = _ref.className,
|
|
18
|
-
overflowEllipsis = _ref.overflowEllipsis,
|
|
18
|
+
_ref$overflowEllipsis = _ref.overflowEllipsis,
|
|
19
|
+
overflowEllipsis = _ref$overflowEllipsis === void 0 ? false : _ref$overflowEllipsis,
|
|
19
20
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
20
21
|
return /*#__PURE__*/_react.default.createElement(_ComponentBase.default, _extends({
|
|
21
22
|
className: (0, _classnames.default)('ffe-card-body__title', {
|
|
@@ -23,9 +24,6 @@ var Title = function Title(_ref) {
|
|
|
23
24
|
}, className)
|
|
24
25
|
}, rest));
|
|
25
26
|
};
|
|
26
|
-
Title.defaultProps = {
|
|
27
|
-
overflowEllipsis: false
|
|
28
|
-
};
|
|
29
27
|
Title.propTypes = {
|
|
30
28
|
className: _propTypes.string,
|
|
31
29
|
/** Disable wrapping and hide overflow with ellipsis */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sb1/ffe-cards-react",
|
|
3
|
-
"version": "13.0.
|
|
3
|
+
"version": "13.0.21",
|
|
4
4
|
"description": "React implementation of ffe-react",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "SpareBank 1",
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
"test:watch": "ffe-buildtool jest --watch"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@sb1/ffe-cards": "^17.0.
|
|
28
|
+
"@sb1/ffe-cards": "^17.0.12",
|
|
29
29
|
"prop-types": "^15.7.2"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@sb1/ffe-buildtool": "^0.5.1",
|
|
33
|
-
"@sb1/ffe-icons-react": "^9.0.
|
|
33
|
+
"@sb1/ffe-icons-react": "^9.0.8",
|
|
34
34
|
"react": "^16.9.0",
|
|
35
35
|
"react-dom": "^16.9.0"
|
|
36
36
|
},
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "c291894cefef43c0607f844862e87031452a0d94"
|
|
44
44
|
}
|