@sb1/ffe-cards-react 14.0.0 → 15.0.0
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 +35 -40
- package/es/IconCard/IconCard.js +33 -42
- package/es/ImageCard/ImageCard.js +35 -40
- package/es/StippledCard/StippledCard.js +35 -45
- package/es/TextCard/TextCard.js +31 -32
- package/es/components/CardName.js +27 -17
- package/es/components/ComponentBase.js +25 -20
- package/es/components/Subtext.js +27 -17
- package/es/components/Text.js +27 -17
- package/es/components/Title.js +29 -23
- package/es/components/index.js +4 -4
- package/es/fixedForwardRef.js +2 -0
- package/es/index.js +5 -5
- package/es/types.js +1 -0
- package/lib/CardBase.js +41 -47
- package/lib/IconCard/IconCard.js +38 -50
- package/lib/ImageCard/ImageCard.js +40 -49
- package/lib/StippledCard/StippledCard.js +40 -51
- package/lib/TextCard/TextCard.js +35 -40
- package/lib/components/CardName.js +33 -23
- package/lib/components/ComponentBase.js +31 -26
- package/lib/components/Subtext.js +33 -23
- package/lib/components/Text.js +33 -23
- package/lib/components/Title.js +35 -29
- package/lib/components/index.js +10 -33
- package/lib/fixedForwardRef.js +5 -0
- package/lib/index.js +12 -40
- package/lib/types.js +2 -0
- package/package.json +7 -8
- package/types/CardBase.d.ts +23 -0
- package/types/IconCard/IconCard.d.ts +16 -0
- package/types/ImageCard/ImageCard.d.ts +16 -0
- package/types/StippledCard/StippledCard.d.ts +22 -0
- package/types/TextCard/TextCard.d.ts +14 -0
- package/types/components/CardName.d.ts +4 -0
- package/types/components/ComponentBase.d.ts +6 -0
- package/types/components/Subtext.d.ts +4 -0
- package/types/components/Text.d.ts +4 -0
- package/types/components/Title.d.ts +7 -0
- package/types/components/index.d.ts +4 -0
- package/types/fixedForwardRef.d.ts +4 -0
- package/types/index.d.ts +5 -87
- package/types/types.d.ts +15 -0
|
@@ -1,29 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
13
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
14
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
15
|
-
var ComponentBase = function ComponentBase(_ref) {
|
|
16
|
-
var className = _ref.className,
|
|
17
|
-
_ref$element = _ref.element,
|
|
18
|
-
Element = _ref$element === void 0 ? 'p' : _ref$element,
|
|
19
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
20
|
-
return /*#__PURE__*/_react.default.createElement(Element, _extends({
|
|
21
|
-
className: (0, _classnames.default)(className)
|
|
22
|
-
}, rest));
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
23
12
|
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
28
23
|
};
|
|
29
|
-
var
|
|
24
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.ComponentBase = void 0;
|
|
29
|
+
var react_1 = __importDefault(require("react"));
|
|
30
|
+
function ComponentBase(props) {
|
|
31
|
+
var _a = props.as, Comp = _a === void 0 ? 'p' : _a, rest = __rest(props, ["as"]);
|
|
32
|
+
return react_1.default.createElement(Comp, __assign({}, rest));
|
|
33
|
+
}
|
|
34
|
+
exports.ComponentBase = ComponentBase;
|
|
@@ -1,26 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
14
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
15
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
16
|
-
var Subtext = function Subtext(_ref) {
|
|
17
|
-
var className = _ref.className,
|
|
18
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
19
|
-
return /*#__PURE__*/_react.default.createElement(_ComponentBase.default, _extends({
|
|
20
|
-
className: (0, _classnames.default)('ffe-card-body__subtext', className)
|
|
21
|
-
}, rest));
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
22
12
|
};
|
|
23
|
-
|
|
24
|
-
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
25
23
|
};
|
|
26
|
-
var
|
|
24
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.Subtext = void 0;
|
|
29
|
+
var react_1 = __importDefault(require("react"));
|
|
30
|
+
var classnames_1 = __importDefault(require("classnames"));
|
|
31
|
+
var ComponentBase_1 = require("./ComponentBase");
|
|
32
|
+
function Subtext(props) {
|
|
33
|
+
var className = props.className, rest = __rest(props, ["className"]);
|
|
34
|
+
return (react_1.default.createElement(ComponentBase_1.ComponentBase, __assign({ className: (0, classnames_1.default)('ffe-card-body__subtext', className) }, rest)));
|
|
35
|
+
}
|
|
36
|
+
exports.Subtext = Subtext;
|
package/lib/components/Text.js
CHANGED
|
@@ -1,26 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
14
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
15
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
16
|
-
var Text = function Text(_ref) {
|
|
17
|
-
var className = _ref.className,
|
|
18
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
19
|
-
return /*#__PURE__*/_react.default.createElement(_ComponentBase.default, _extends({
|
|
20
|
-
className: (0, _classnames.default)('ffe-card-body__text', className)
|
|
21
|
-
}, rest));
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
22
12
|
};
|
|
23
|
-
|
|
24
|
-
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
25
23
|
};
|
|
26
|
-
var
|
|
24
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.Text = void 0;
|
|
29
|
+
var react_1 = __importDefault(require("react"));
|
|
30
|
+
var classnames_1 = __importDefault(require("classnames"));
|
|
31
|
+
var ComponentBase_1 = require("./ComponentBase");
|
|
32
|
+
function Text(props) {
|
|
33
|
+
var className = props.className, rest = __rest(props, ["className"]);
|
|
34
|
+
return (react_1.default.createElement(ComponentBase_1.ComponentBase, __assign({ className: (0, classnames_1.default)('ffe-card-body__text', className) }, rest)));
|
|
35
|
+
}
|
|
36
|
+
exports.Text = Text;
|
package/lib/components/Title.js
CHANGED
|
@@ -1,32 +1,38 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
14
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
15
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
16
|
-
var Title = function Title(_ref) {
|
|
17
|
-
var className = _ref.className,
|
|
18
|
-
_ref$overflowEllipsis = _ref.overflowEllipsis,
|
|
19
|
-
overflowEllipsis = _ref$overflowEllipsis === void 0 ? false : _ref$overflowEllipsis,
|
|
20
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
21
|
-
return /*#__PURE__*/_react.default.createElement(_ComponentBase.default, _extends({
|
|
22
|
-
className: (0, _classnames.default)('ffe-card-body__title', {
|
|
23
|
-
'ffe-card-body__title--overflow-ellipsis': overflowEllipsis
|
|
24
|
-
}, className)
|
|
25
|
-
}, rest));
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
26
12
|
};
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
31
23
|
};
|
|
32
|
-
var
|
|
24
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.Title = void 0;
|
|
29
|
+
var react_1 = __importDefault(require("react"));
|
|
30
|
+
var classnames_1 = __importDefault(require("classnames"));
|
|
31
|
+
var ComponentBase_1 = require("./ComponentBase");
|
|
32
|
+
function Title(props) {
|
|
33
|
+
var className = props.className, overflowEllipsis = props.overflowEllipsis, rest = __rest(props, ["className", "overflowEllipsis"]);
|
|
34
|
+
return (react_1.default.createElement(ComponentBase_1.ComponentBase, __assign({ className: (0, classnames_1.default)('ffe-card-body__title', {
|
|
35
|
+
'ffe-card-body__title--overflow-ellipsis': overflowEllipsis,
|
|
36
|
+
}, className) }, rest)));
|
|
37
|
+
}
|
|
38
|
+
exports.Title = Title;
|
package/lib/components/index.js
CHANGED
|
@@ -1,34 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "Subtext", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function get() {
|
|
15
|
-
return _Subtext.default;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "Text", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function get() {
|
|
21
|
-
return _Text.default;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(exports, "Title", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function get() {
|
|
27
|
-
return _Title.default;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
var _CardName = _interopRequireDefault(require("./CardName"));
|
|
31
|
-
var _Subtext = _interopRequireDefault(require("./Subtext"));
|
|
32
|
-
var _Text = _interopRequireDefault(require("./Text"));
|
|
33
|
-
var _Title = _interopRequireDefault(require("./Title"));
|
|
34
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Title = exports.Text = exports.Subtext = exports.CardName = void 0;
|
|
4
|
+
var CardName_1 = require("./CardName");
|
|
5
|
+
Object.defineProperty(exports, "CardName", { enumerable: true, get: function () { return CardName_1.CardName; } });
|
|
6
|
+
var Subtext_1 = require("./Subtext");
|
|
7
|
+
Object.defineProperty(exports, "Subtext", { enumerable: true, get: function () { return Subtext_1.Subtext; } });
|
|
8
|
+
var Text_1 = require("./Text");
|
|
9
|
+
Object.defineProperty(exports, "Text", { enumerable: true, get: function () { return Text_1.Text; } });
|
|
10
|
+
var Title_1 = require("./Title");
|
|
11
|
+
Object.defineProperty(exports, "Title", { enumerable: true, get: function () { return Title_1.Title; } });
|
package/lib/index.js
CHANGED
|
@@ -1,41 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
get: function get() {
|
|
15
|
-
return _IconCard.default;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "ImageCard", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function get() {
|
|
21
|
-
return _ImageCard.default;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(exports, "StippledCard", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function get() {
|
|
27
|
-
return _StippledCard.default;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
Object.defineProperty(exports, "TextCard", {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function get() {
|
|
33
|
-
return _TextCard.default;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
var _CardBase = _interopRequireDefault(require("./CardBase"));
|
|
37
|
-
var _TextCard = _interopRequireDefault(require("./TextCard/TextCard"));
|
|
38
|
-
var _IconCard = _interopRequireDefault(require("./IconCard/IconCard"));
|
|
39
|
-
var _ImageCard = _interopRequireDefault(require("./ImageCard/ImageCard"));
|
|
40
|
-
var _StippledCard = _interopRequireDefault(require("./StippledCard/StippledCard"));
|
|
41
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StippledCard = exports.ImageCard = exports.IconCard = exports.TextCard = exports.CardBase = void 0;
|
|
4
|
+
var CardBase_1 = require("./CardBase");
|
|
5
|
+
Object.defineProperty(exports, "CardBase", { enumerable: true, get: function () { return CardBase_1.CardBase; } });
|
|
6
|
+
var TextCard_1 = require("./TextCard/TextCard");
|
|
7
|
+
Object.defineProperty(exports, "TextCard", { enumerable: true, get: function () { return TextCard_1.TextCard; } });
|
|
8
|
+
var IconCard_1 = require("./IconCard/IconCard");
|
|
9
|
+
Object.defineProperty(exports, "IconCard", { enumerable: true, get: function () { return IconCard_1.IconCard; } });
|
|
10
|
+
var ImageCard_1 = require("./ImageCard/ImageCard");
|
|
11
|
+
Object.defineProperty(exports, "ImageCard", { enumerable: true, get: function () { return ImageCard_1.ImageCard; } });
|
|
12
|
+
var StippledCard_1 = require("./StippledCard/StippledCard");
|
|
13
|
+
Object.defineProperty(exports, "StippledCard", { enumerable: true, get: function () { return StippledCard_1.StippledCard; } });
|
package/lib/types.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sb1/ffe-cards-react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "15.0.0",
|
|
4
4
|
"description": "React implementation of ffe-react",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "SpareBank 1",
|
|
@@ -18,20 +18,19 @@
|
|
|
18
18
|
"url": "ssh://git@github.com:SpareBank1/designsystem.git"
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|
|
21
|
-
"build": "ffe-buildtool
|
|
22
|
-
"watch": "ffe-buildtool
|
|
21
|
+
"build": "ffe-buildtool tsc",
|
|
22
|
+
"watch": "ffe-buildtool tsc-watch",
|
|
23
23
|
"lint": "eslint src",
|
|
24
24
|
"lint:fix": "eslint src --fix",
|
|
25
25
|
"test": "ffe-buildtool jest",
|
|
26
26
|
"test:watch": "ffe-buildtool jest --watch"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@sb1/ffe-cards": "^18.0.
|
|
30
|
-
"prop-types": "^15.7.2"
|
|
29
|
+
"@sb1/ffe-cards": "^18.0.1"
|
|
31
30
|
},
|
|
32
31
|
"devDependencies": {
|
|
33
|
-
"@sb1/ffe-buildtool": "^0.
|
|
34
|
-
"@sb1/ffe-icons-react": "^9.0.
|
|
32
|
+
"@sb1/ffe-buildtool": "^0.6.0",
|
|
33
|
+
"@sb1/ffe-icons-react": "^9.0.11",
|
|
35
34
|
"react": "^16.9.0",
|
|
36
35
|
"react-dom": "^16.9.0"
|
|
37
36
|
},
|
|
@@ -41,5 +40,5 @@
|
|
|
41
40
|
"publishConfig": {
|
|
42
41
|
"access": "public"
|
|
43
42
|
},
|
|
44
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "9ad9c4e14ec0db89189e0daaebace3028bf667d9"
|
|
45
44
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React, { ElementType } from 'react';
|
|
2
|
+
import { ComponentAsPropParams } from './types';
|
|
3
|
+
type BgColor = 'sand-30' | 'sand-70' | 'frost-30' | 'syrin-30' | 'syrin-70';
|
|
4
|
+
type BgColorDarkmode = 'natt' | 'svart' | 'koksgraa';
|
|
5
|
+
export type CardBaseProps<As extends ElementType = 'a'> = ComponentAsPropParams<As> & {
|
|
6
|
+
shadow?: boolean;
|
|
7
|
+
noMargin?: boolean;
|
|
8
|
+
textCenter?: boolean;
|
|
9
|
+
bgColor?: BgColor;
|
|
10
|
+
bgDarkmodeColor?: BgColorDarkmode;
|
|
11
|
+
};
|
|
12
|
+
export declare const CardBase: <As extends React.ElementType>(props: {
|
|
13
|
+
as?: As | undefined;
|
|
14
|
+
} & import("./types").DistributiveOmit<React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As>, "as" & {
|
|
15
|
+
ref: React.ForwardedRef<any>;
|
|
16
|
+
}> & {
|
|
17
|
+
shadow?: boolean | undefined;
|
|
18
|
+
noMargin?: boolean | undefined;
|
|
19
|
+
textCenter?: boolean | undefined;
|
|
20
|
+
bgColor?: BgColor | undefined;
|
|
21
|
+
bgDarkmodeColor?: BgColorDarkmode | undefined;
|
|
22
|
+
} & React.RefAttributes<any>) => React.JSX.Element;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React, { ElementType, ReactElement } from 'react';
|
|
2
|
+
import { ComponentAsPropParams, CardRenderProps } from '../types';
|
|
3
|
+
export type IconCardProps<As extends ElementType = 'a'> = Omit<ComponentAsPropParams<As>, 'children'> & {
|
|
4
|
+
/** Element of icon */
|
|
5
|
+
icon: ReactElement;
|
|
6
|
+
/** Smaller icon and less space */
|
|
7
|
+
condensed?: boolean;
|
|
8
|
+
children: React.ReactNode | ((cardRenderProps: CardRenderProps) => React.ReactNode);
|
|
9
|
+
};
|
|
10
|
+
export declare const IconCard: <As extends React.ElementType>(props: Omit<ComponentAsPropParams<As>, "children"> & {
|
|
11
|
+
/** Element of icon */
|
|
12
|
+
icon: ReactElement;
|
|
13
|
+
/** Smaller icon and less space */
|
|
14
|
+
condensed?: boolean | undefined;
|
|
15
|
+
children: React.ReactNode | ((cardRenderProps: CardRenderProps) => React.ReactNode);
|
|
16
|
+
} & React.RefAttributes<any>) => React.JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React, { ElementType } from 'react';
|
|
2
|
+
import { ComponentAsPropParams, CardRenderProps } from '../types';
|
|
3
|
+
export type ImageCardProps<As extends ElementType = 'a'> = Omit<ComponentAsPropParams<As>, 'children'> & {
|
|
4
|
+
/** The src for the image */
|
|
5
|
+
imageSrc: string;
|
|
6
|
+
/** The alt text for the image */
|
|
7
|
+
imageAltText: string;
|
|
8
|
+
children: React.ReactNode | ((cardRenderProps: CardRenderProps) => React.ReactNode);
|
|
9
|
+
};
|
|
10
|
+
export declare const ImageCard: <As extends React.ElementType>(props: Omit<ComponentAsPropParams<As>, "children"> & {
|
|
11
|
+
/** The src for the image */
|
|
12
|
+
imageSrc: string;
|
|
13
|
+
/** The alt text for the image */
|
|
14
|
+
imageAltText: string;
|
|
15
|
+
children: React.ReactNode | ((cardRenderProps: CardRenderProps) => React.ReactNode);
|
|
16
|
+
} & React.RefAttributes<any>) => React.JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React, { ElementType, ReactElement } from 'react';
|
|
2
|
+
import { ComponentAsPropParams, CardRenderProps } from '../types';
|
|
3
|
+
export type StippledCardProps<As extends ElementType = 'a'> = Omit<ComponentAsPropParams<As>, 'children'> & {
|
|
4
|
+
/** Smaller icon and less space */
|
|
5
|
+
condensed?: boolean;
|
|
6
|
+
/** Image to be rendered*/
|
|
7
|
+
img: {
|
|
8
|
+
element: ReactElement;
|
|
9
|
+
type: 'icon' | 'custom';
|
|
10
|
+
};
|
|
11
|
+
children: React.ReactNode | ((cardRenderProps: CardRenderProps) => React.ReactNode);
|
|
12
|
+
};
|
|
13
|
+
export declare const StippledCard: <As extends React.ElementType>(props: Omit<ComponentAsPropParams<As>, "children"> & {
|
|
14
|
+
/** Smaller icon and less space */
|
|
15
|
+
condensed?: boolean | undefined;
|
|
16
|
+
/** Image to be rendered*/
|
|
17
|
+
img: {
|
|
18
|
+
element: ReactElement;
|
|
19
|
+
type: 'icon' | 'custom';
|
|
20
|
+
};
|
|
21
|
+
children: React.ReactNode | ((cardRenderProps: CardRenderProps) => React.ReactNode);
|
|
22
|
+
} & React.RefAttributes<any>) => React.JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React, { ElementType } from 'react';
|
|
2
|
+
import { ComponentAsPropParams, CardRenderProps } from '../types';
|
|
3
|
+
export type TextCardProps<As extends ElementType = 'a'> = Omit<ComponentAsPropParams<As>, 'children'> & {
|
|
4
|
+
/** Left-aligned text on the card */
|
|
5
|
+
leftAlign?: boolean;
|
|
6
|
+
/** Function that's passed available sub-components as arguments, or regular children */
|
|
7
|
+
children: React.ReactNode | ((cardRenderProps: CardRenderProps) => React.ReactNode);
|
|
8
|
+
};
|
|
9
|
+
export declare const TextCard: <As extends React.ElementType>(props: Omit<ComponentAsPropParams<As>, "children"> & {
|
|
10
|
+
/** Left-aligned text on the card */
|
|
11
|
+
leftAlign?: boolean | undefined;
|
|
12
|
+
/** Function that's passed available sub-components as arguments, or regular children */
|
|
13
|
+
children: React.ReactNode | ((cardRenderProps: CardRenderProps) => React.ReactNode);
|
|
14
|
+
} & React.RefAttributes<any>) => React.JSX.Element;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React, { ElementType } from 'react';
|
|
2
|
+
import { ComponentBaseProps } from './ComponentBase';
|
|
3
|
+
export type CardNameProps<As extends ElementType = 'p'> = ComponentBaseProps<As>;
|
|
4
|
+
export declare function CardName<As extends ElementType>(props: CardNameProps<As>): React.JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React, { ComponentPropsWithRef, ElementType } from 'react';
|
|
2
|
+
import { DistributiveOmit } from '../types';
|
|
3
|
+
export type ComponentBaseProps<As extends ElementType = 'p'> = {
|
|
4
|
+
as?: As;
|
|
5
|
+
} & DistributiveOmit<ComponentPropsWithRef<ElementType extends As ? 'p' : As>, 'as'>;
|
|
6
|
+
export declare function ComponentBase<As extends ElementType = 'p'>(props: ComponentBaseProps<As>): React.JSX.Element;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React, { ElementType } from 'react';
|
|
2
|
+
import { ComponentBaseProps } from './ComponentBase';
|
|
3
|
+
export type SubtextProps<As extends ElementType = 'p'> = ComponentBaseProps<As>;
|
|
4
|
+
export declare function Subtext<As extends ElementType>(props: SubtextProps<As>): React.JSX.Element;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React, { ElementType } from 'react';
|
|
2
|
+
import { ComponentBaseProps } from './ComponentBase';
|
|
3
|
+
export type TextProps<As extends ElementType = 'p'> = ComponentBaseProps<As>;
|
|
4
|
+
export declare function Text<As extends ElementType>(props: TextProps<As>): React.JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React, { ElementType } from 'react';
|
|
2
|
+
import { ComponentBaseProps } from './ComponentBase';
|
|
3
|
+
export type TitleProps<As extends ElementType = 'p'> = ComponentBaseProps<As> & {
|
|
4
|
+
/** Disable wrapping and hide overflow with ellipsis */
|
|
5
|
+
overflowEllipsis: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare function Title<As extends ElementType>(props: TitleProps<As>): React.JSX.Element;
|