@semcore/card 2.2.0 → 2.4.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/CHANGELOG.md +25 -0
- package/lib/cjs/Card.js +55 -30
- package/lib/cjs/Card.js.map +1 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/style/card.shadow.css +16 -0
- package/lib/es6/Card.js +57 -31
- package/lib/es6/Card.js.map +1 -1
- package/lib/es6/index.js.map +1 -1
- package/lib/es6/style/card.shadow.css +16 -0
- package/lib/types/index.d.ts +20 -2
- package/package.json +5 -4
- package/src/Card.js +77 -0
- package/src/index.d.ts +20 -0
- package/src/{index.tsx → index.js} +0 -0
- package/src/style/card.shadow.css +16 -0
- package/lib/types/Card.d.ts +0 -16
- package/src/Card.tsx +0 -62
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
|
5
|
+
## [2.4.0] - 2022-02-03
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Changed styles
|
|
10
|
+
|
|
11
|
+
## [2.3.0] - 2022-01-18
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- Up version icons and use new icon.
|
|
16
|
+
- Rewrite code from TS to JS 🧑💻
|
|
17
|
+
|
|
18
|
+
## [2.2.2] - 2021-9-20
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- Fixed padding
|
|
23
|
+
|
|
24
|
+
## [2.2.1] - 2021-8-26
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
|
|
28
|
+
- Add 'sideEffect=false' for more optimal build via webpack
|
|
29
|
+
|
|
5
30
|
## [2.2.0] - 2021-04-26
|
|
6
31
|
|
|
7
32
|
### Changed
|
package/lib/cjs/Card.js
CHANGED
|
@@ -31,7 +31,9 @@ var _typography = require("@semcore/typography");
|
|
|
31
31
|
|
|
32
32
|
var _tooltip = _interopRequireDefault(require("@semcore/tooltip"));
|
|
33
33
|
|
|
34
|
-
var
|
|
34
|
+
var _m = _interopRequireDefault(require("@semcore/icon/Info/m"));
|
|
35
|
+
|
|
36
|
+
var _findComponent = require("@semcore/utils/lib/findComponent");
|
|
35
37
|
|
|
36
38
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
37
39
|
|
|
@@ -46,74 +48,97 @@ var style = (
|
|
|
46
48
|
/*__reshadow_css_start__*/
|
|
47
49
|
_core.sstyled.insert(
|
|
48
50
|
/*__inner_css_start__*/
|
|
49
|
-
".
|
|
51
|
+
".___SCard_81jzm_gg_{border:1px solid #ccc;border-radius:2px;box-sizing:border-box;background:#fff}.___STitle_81jzm_gg_{font-size:19px;font-weight:500}.___SIcon_81jzm_gg_{margin-left:4px;color:#a6b0b3;cursor:help}.___SDescription_81jzm_gg_{margin-bottom:12px;font-size:14px;color:#757575}.___SHeader_81jzm_gg_{padding-bottom:0}.___SBody_81jzm_gg_,.___SHeader_81jzm_gg_{padding-left:24px;padding-right:24px;padding-top:20px}.___SBody_81jzm_gg_{padding-bottom:24px}"
|
|
50
52
|
/*__inner_css_end__*/
|
|
51
|
-
, "
|
|
53
|
+
, "11udogg_gg_")
|
|
52
54
|
/*__reshadow_css_end__*/
|
|
53
55
|
, {
|
|
54
|
-
"__SCard": "
|
|
55
|
-
"__STitle": "
|
|
56
|
-
"__SIcon": "
|
|
57
|
-
"__SDescription": "
|
|
56
|
+
"__SCard": "___SCard_81jzm_gg_",
|
|
57
|
+
"__STitle": "___STitle_81jzm_gg_",
|
|
58
|
+
"__SIcon": "___SIcon_81jzm_gg_",
|
|
59
|
+
"__SDescription": "___SDescription_81jzm_gg_",
|
|
60
|
+
"__SHeader": "___SHeader_81jzm_gg_",
|
|
61
|
+
"__SBody": "___SBody_81jzm_gg_"
|
|
58
62
|
});
|
|
59
63
|
|
|
60
|
-
var
|
|
61
|
-
(0, _inherits2["default"])(
|
|
64
|
+
var CardRoot = /*#__PURE__*/function (_Component) {
|
|
65
|
+
(0, _inherits2["default"])(CardRoot, _Component);
|
|
62
66
|
|
|
63
|
-
var _super = _createSuper(
|
|
67
|
+
var _super = _createSuper(CardRoot);
|
|
64
68
|
|
|
65
|
-
function
|
|
66
|
-
(0, _classCallCheck2["default"])(this,
|
|
69
|
+
function CardRoot() {
|
|
70
|
+
(0, _classCallCheck2["default"])(this, CardRoot);
|
|
67
71
|
return _super.apply(this, arguments);
|
|
68
72
|
}
|
|
69
73
|
|
|
70
|
-
(0, _createClass2["default"])(
|
|
74
|
+
(0, _createClass2["default"])(CardRoot, [{
|
|
71
75
|
key: "render",
|
|
72
76
|
value: function render() {
|
|
73
77
|
var _ref = this ? this.asProps : arguments[0],
|
|
74
|
-
|
|
78
|
+
_ref6;
|
|
75
79
|
|
|
76
80
|
var SCard = _flexBox.Box;
|
|
77
|
-
var
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
+
var _this$asProps = this.asProps,
|
|
82
|
+
Children = _this$asProps.Children,
|
|
83
|
+
styles = _this$asProps.styles;
|
|
84
|
+
var advanceMode = (0, _findComponent.isAdvanceMode)(Children, [Card.Header.displayName, Card.Body.displayName]);
|
|
85
|
+
return _ref6 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SCard, _ref6.cn("SCard", _objectSpread({}, (0, _core.assignProps)({}, _ref))), advanceMode ? /*#__PURE__*/_react["default"].createElement(Children, _ref6.cn("Children", {})) : /*#__PURE__*/_react["default"].createElement(Card.Body, null, /*#__PURE__*/_react["default"].createElement(Children, _ref6.cn("Children", {}))));
|
|
81
86
|
}
|
|
82
87
|
}]);
|
|
83
|
-
return
|
|
88
|
+
return CardRoot;
|
|
84
89
|
}(_core.Component);
|
|
85
90
|
|
|
86
|
-
(0, _defineProperty2["default"])(
|
|
87
|
-
(0, _defineProperty2["default"])(
|
|
91
|
+
(0, _defineProperty2["default"])(CardRoot, "displayName", 'Card');
|
|
92
|
+
(0, _defineProperty2["default"])(CardRoot, "style", style);
|
|
88
93
|
|
|
89
94
|
function Title(props) {
|
|
90
95
|
var _ref2 = this ? this.asProps : arguments[0],
|
|
91
|
-
|
|
96
|
+
_ref7;
|
|
92
97
|
|
|
93
98
|
var styles = props.styles,
|
|
94
99
|
hint = props.hint;
|
|
95
100
|
var STitle = _typography.Text;
|
|
96
|
-
var SIcon =
|
|
97
|
-
return
|
|
101
|
+
var SIcon = _m["default"];
|
|
102
|
+
return _ref7 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(STitle, _ref7.cn("STitle", _objectSpread({}, (0, _core.assignProps)({}, _ref2)))), hint && /*#__PURE__*/_react["default"].createElement(_tooltip["default"], _ref7.cn("Tooltip", {
|
|
98
103
|
"title": hint
|
|
99
|
-
}), /*#__PURE__*/_react["default"].createElement(SIcon,
|
|
104
|
+
}), /*#__PURE__*/_react["default"].createElement(SIcon, _ref7.cn("SIcon", {}))));
|
|
100
105
|
}
|
|
101
106
|
|
|
102
107
|
function Description(props) {
|
|
103
108
|
var _ref3 = this ? this.asProps : arguments[0],
|
|
104
|
-
|
|
109
|
+
_ref8;
|
|
105
110
|
|
|
106
111
|
var styles = props.styles;
|
|
107
112
|
var SDescription = _typography.Text;
|
|
108
|
-
return
|
|
113
|
+
return _ref8 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SDescription, _ref8.cn("SDescription", _objectSpread({}, (0, _core.assignProps)({
|
|
109
114
|
"tag": "p"
|
|
110
115
|
}, _ref3))));
|
|
111
116
|
}
|
|
112
117
|
|
|
113
|
-
|
|
118
|
+
function Header(props) {
|
|
119
|
+
var _ref4 = this ? this.asProps : arguments[0],
|
|
120
|
+
_ref9;
|
|
121
|
+
|
|
122
|
+
var styles = props.styles;
|
|
123
|
+
var SHeader = _flexBox.Box;
|
|
124
|
+
return _ref9 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SHeader, _ref9.cn("SHeader", _objectSpread({}, (0, _core.assignProps)(_objectSpread({}, props), _ref4))));
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function Body(props) {
|
|
128
|
+
var _ref5 = this ? this.asProps : arguments[0],
|
|
129
|
+
_ref10;
|
|
130
|
+
|
|
131
|
+
var styles = props.styles;
|
|
132
|
+
var SBody = _flexBox.Box;
|
|
133
|
+
return _ref10 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SBody, _ref10.cn("SBody", _objectSpread({}, (0, _core.assignProps)(_objectSpread({}, props), _ref5))));
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
var Card = (0, _core["default"])(CardRoot, {
|
|
114
137
|
Title: Title,
|
|
115
|
-
Description: Description
|
|
138
|
+
Description: Description,
|
|
139
|
+
Header: Header,
|
|
140
|
+
Body: Body
|
|
116
141
|
});
|
|
117
|
-
|
|
142
|
+
var _default = Card;
|
|
118
143
|
exports["default"] = _default;
|
|
119
144
|
//# sourceMappingURL=Card.js.map
|
package/lib/cjs/Card.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Card.
|
|
1
|
+
{"version":3,"sources":["../../src/Card.js"],"names":["CardRoot","SCard","Box","asProps","Children","styles","advanceMode","Card","Header","displayName","Body","Component","style","Title","props","hint","STitle","Text","SIcon","Info","Description","SDescription","SHeader","SBody"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA;;AADA;;AAEA;;AACA;;AACA;;AACA;;AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEMA,Q;;;;;;;;;;;;WAKJ,kBAAS;AAAA;AAAA;;AACP,UAAMC,KAAK,GAMMC,YANjB;AADO,0BAEsB,KAAKC,OAF3B;AAAA,UAECC,QAFD,iBAECA,QAFD;AAAA,UAEWC,MAFX,iBAEWA,MAFX;AAIP,UAAMC,WAAW,GAAG,kCAAcF,QAAd,EAAwB,CAACG,IAAI,CAACC,MAAL,CAAYC,WAAb,EAA0BF,IAAI,CAACG,IAAL,CAAUD,WAApC,CAAxB,CAApB;AAEA,qBAAO,mBAAQJ,MAAR,CAAP,eACE,gCAAC,KAAD,0EACGC,WAAW,gBACV,gCAAC,QAAD,2BADU,gBAGV,gCAAC,IAAD,CAAM,IAAN,qBACE,gCAAC,QAAD,2BADF,CAJJ,CADF;AAWD;;;EAtBoBK,e;;iCAAjBX,Q,iBACiB,M;iCADjBA,Q,WAGWY,K;;AAsBjB,SAASC,KAAT,CAAeC,KAAf,EAAsB;AAAA;AAAA;;AAAA,MACZT,MADY,GACKS,KADL,CACZT,MADY;AAAA,MACJU,IADI,GACKD,KADL,CACJC,IADI;AAEpB,MAAMC,MAAM,GAIQC,gBAJpB;AACA,MAAMC,KAAK,GAAGC,aAAd;AACA,iBAAO,mBAAQd,MAAR,CAAP,eACE,+EACE,gCAAC,MAAD,2EADF,EAEGU,IAAI,iBACH,gCAAC,mBAAD;AAAA,aAAgBA;AAAhB,mBACE,gCAAC,KAAD,wBADF,CAHJ,CADF;AAUD;;AAED,SAASK,WAAT,CAAqBN,KAArB,EAA4B;AAAA;AAAA;;AAAA,MAClBT,MADkB,GACPS,KADO,CAClBT,MADkB;AAE1B,MAAMgB,YAAY,GAC2BJ,gBAD7C;AACA,iBAAO,mBAAQZ,MAAR,CAAP,eAAuB,gCAAC,YAAD;AAAA,WAAgC;AAAhC,cAAvB;AACD;;AAED,SAASG,MAAT,CAAgBM,KAAhB,EAAuB;AAAA;AAAA;;AAAA,MACbT,MADa,GACFS,KADE,CACbT,MADa;AAErB,MAAMiB,OAAO,GAC2BpB,YADxC;AACA,iBAAO,mBAAQG,MAAR,CAAP,eAAuB,gCAAC,OAAD,iFAA0BS,KAA1B,YAAvB;AACD;;AAED,SAASJ,IAAT,CAAcI,KAAd,EAAqB;AAAA;AAAA;;AAAA,MACXT,MADW,GACAS,KADA,CACXT,MADW;AAEnB,MAAMkB,KAAK,GAC2BrB,YADtC;AACA,kBAAO,mBAAQG,MAAR,CAAP,eAAuB,gCAAC,KAAD,gFAAwBS,KAAxB,YAAvB;AACD;;AAED,IAAMP,IAAI,GAAG,sBAAgBP,QAAhB,EAA0B;AACrCa,EAAAA,KAAK,EAALA,KADqC;AAErCO,EAAAA,WAAW,EAAXA,WAFqC;AAGrCZ,EAAAA,MAAM,EAANA,MAHqC;AAIrCE,EAAAA,IAAI,EAAJA;AAJqC,CAA1B,CAAb;eAOeH,I","sourcesContent":["import React from 'react';\nimport createComponent, { Component, sstyled, Root } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport { Text } from '@semcore/typography';\nimport Tooltip from '@semcore/tooltip';\nimport Info from '@semcore/icon/Info/m';\n\nimport style from './style/card.shadow.css';\nimport { isAdvanceMode } from '@semcore/utils/lib/findComponent';\n\nclass CardRoot extends Component {\n static displayName = 'Card';\n\n static style = style;\n\n render() {\n const SCard = Root;\n const { Children, styles } = this.asProps;\n\n const advanceMode = isAdvanceMode(Children, [Card.Header.displayName, Card.Body.displayName]);\n\n return sstyled(styles)(\n <SCard render={Box}>\n {advanceMode ? (\n <Children />\n ) : (\n <Card.Body>\n <Children />\n </Card.Body>\n )}\n </SCard>,\n );\n }\n}\n\nfunction Title(props) {\n const { styles, hint } = props;\n const STitle = Root;\n const SIcon = Info;\n return sstyled(styles)(\n <>\n <STitle render={Text} />\n {hint && (\n <Tooltip title={hint}>\n <SIcon />\n </Tooltip>\n )}\n </>,\n );\n}\n\nfunction Description(props) {\n const { styles } = props;\n const SDescription = Root;\n return sstyled(styles)(<SDescription render={Text} tag=\"p\" />);\n}\n\nfunction Header(props) {\n const { styles } = props;\n const SHeader = Root;\n return sstyled(styles)(<SHeader render={Box} {...props} />);\n}\n\nfunction Body(props) {\n const { styles } = props;\n const SBody = Root;\n return sstyled(styles)(<SBody render={Box} {...props} />);\n}\n\nconst Card = createComponent(CardRoot, {\n Title,\n Description,\n Header,\n Body,\n});\n\nexport default Card;\n"],"file":"Card.js"}
|
package/lib/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.
|
|
1
|
+
{"version":3,"sources":["../../src/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["export { default } from './Card';\nexport * from './Card';\n"],"file":"index.js"}
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
SCard {
|
|
4
4
|
border: 1px solid var(--gray80);
|
|
5
5
|
border-radius: 2px;
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
background: var(--white);
|
|
6
8
|
}
|
|
7
9
|
|
|
8
10
|
STitle {
|
|
@@ -21,3 +23,17 @@ SDescription {
|
|
|
21
23
|
font-size: var(--fs-200);
|
|
22
24
|
color: var(--gray60);
|
|
23
25
|
}
|
|
26
|
+
|
|
27
|
+
SHeader {
|
|
28
|
+
padding-bottom: 0;
|
|
29
|
+
padding-left: 24px;
|
|
30
|
+
padding-right: 24px;
|
|
31
|
+
padding-top: 20px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
SBody {
|
|
35
|
+
padding-bottom: 24px;
|
|
36
|
+
padding-left: 24px;
|
|
37
|
+
padding-right: 24px;
|
|
38
|
+
padding-top: 20px;
|
|
39
|
+
}
|
package/lib/es6/Card.js
CHANGED
|
@@ -5,6 +5,8 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
|
|
|
5
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
7
7
|
import { sstyled as _sstyled } from "@semcore/core";
|
|
8
|
+
import { assignProps as _assignProps5 } from "@semcore/core";
|
|
9
|
+
import { assignProps as _assignProps4 } from "@semcore/core";
|
|
8
10
|
import { assignProps as _assignProps3 } from "@semcore/core";
|
|
9
11
|
import { assignProps as _assignProps2 } from "@semcore/core";
|
|
10
12
|
import { assignProps as _assignProps } from "@semcore/core";
|
|
@@ -20,85 +22,109 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
20
22
|
import React from 'react';
|
|
21
23
|
import createComponent, { Component, sstyled, Root } from '@semcore/core';
|
|
22
24
|
import { Box } from '@semcore/flex-box';
|
|
23
|
-
import { Text } from '@semcore/typography';
|
|
24
|
-
|
|
25
|
+
import { Text } from '@semcore/typography';
|
|
25
26
|
import Tooltip from '@semcore/tooltip';
|
|
26
|
-
import
|
|
27
|
+
import Info from '@semcore/icon/Info/m';
|
|
27
28
|
|
|
28
29
|
/*__reshadow-styles__:"./style/card.shadow.css"*/
|
|
29
30
|
var style = (
|
|
30
31
|
/*__reshadow_css_start__*/
|
|
31
32
|
_sstyled.insert(
|
|
32
33
|
/*__inner_css_start__*/
|
|
33
|
-
".
|
|
34
|
+
".___SCard_81jzm_gg_{border:1px solid #ccc;border-radius:2px;box-sizing:border-box;background:#fff}.___STitle_81jzm_gg_{font-size:19px;font-weight:500}.___SIcon_81jzm_gg_{margin-left:4px;color:#a6b0b3;cursor:help}.___SDescription_81jzm_gg_{margin-bottom:12px;font-size:14px;color:#757575}.___SHeader_81jzm_gg_{padding-bottom:0}.___SBody_81jzm_gg_,.___SHeader_81jzm_gg_{padding-left:24px;padding-right:24px;padding-top:20px}.___SBody_81jzm_gg_{padding-bottom:24px}"
|
|
34
35
|
/*__inner_css_end__*/
|
|
35
|
-
, "
|
|
36
|
+
, "11udogg_gg_")
|
|
36
37
|
/*__reshadow_css_end__*/
|
|
37
38
|
, {
|
|
38
|
-
"__SCard": "
|
|
39
|
-
"__STitle": "
|
|
40
|
-
"__SIcon": "
|
|
41
|
-
"__SDescription": "
|
|
39
|
+
"__SCard": "___SCard_81jzm_gg_",
|
|
40
|
+
"__STitle": "___STitle_81jzm_gg_",
|
|
41
|
+
"__SIcon": "___SIcon_81jzm_gg_",
|
|
42
|
+
"__SDescription": "___SDescription_81jzm_gg_",
|
|
43
|
+
"__SHeader": "___SHeader_81jzm_gg_",
|
|
44
|
+
"__SBody": "___SBody_81jzm_gg_"
|
|
42
45
|
});
|
|
46
|
+
import { isAdvanceMode } from '@semcore/utils/lib/findComponent';
|
|
43
47
|
|
|
44
|
-
var
|
|
45
|
-
_inherits(
|
|
48
|
+
var CardRoot = /*#__PURE__*/function (_Component) {
|
|
49
|
+
_inherits(CardRoot, _Component);
|
|
46
50
|
|
|
47
|
-
var _super = _createSuper(
|
|
51
|
+
var _super = _createSuper(CardRoot);
|
|
48
52
|
|
|
49
|
-
function
|
|
50
|
-
_classCallCheck(this,
|
|
53
|
+
function CardRoot() {
|
|
54
|
+
_classCallCheck(this, CardRoot);
|
|
51
55
|
|
|
52
56
|
return _super.apply(this, arguments);
|
|
53
57
|
}
|
|
54
58
|
|
|
55
|
-
_createClass(
|
|
59
|
+
_createClass(CardRoot, [{
|
|
56
60
|
key: "render",
|
|
57
61
|
value: function render() {
|
|
58
62
|
var _ref = this ? this.asProps : arguments[0],
|
|
59
|
-
|
|
63
|
+
_ref6;
|
|
60
64
|
|
|
61
65
|
var SCard = Box;
|
|
62
|
-
var
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
+
var _this$asProps = this.asProps,
|
|
67
|
+
Children = _this$asProps.Children,
|
|
68
|
+
styles = _this$asProps.styles;
|
|
69
|
+
var advanceMode = isAdvanceMode(Children, [Card.Header.displayName, Card.Body.displayName]);
|
|
70
|
+
return _ref6 = sstyled(styles), /*#__PURE__*/React.createElement(SCard, _ref6.cn("SCard", _objectSpread({}, _assignProps({}, _ref))), advanceMode ? /*#__PURE__*/React.createElement(Children, _ref6.cn("Children", {})) : /*#__PURE__*/React.createElement(Card.Body, null, /*#__PURE__*/React.createElement(Children, _ref6.cn("Children", {}))));
|
|
66
71
|
}
|
|
67
72
|
}]);
|
|
68
73
|
|
|
69
|
-
return
|
|
74
|
+
return CardRoot;
|
|
70
75
|
}(Component);
|
|
71
76
|
|
|
72
|
-
_defineProperty(
|
|
77
|
+
_defineProperty(CardRoot, "displayName", 'Card');
|
|
73
78
|
|
|
74
|
-
_defineProperty(
|
|
79
|
+
_defineProperty(CardRoot, "style", style);
|
|
75
80
|
|
|
76
81
|
function Title(props) {
|
|
77
82
|
var _ref2 = this ? this.asProps : arguments[0],
|
|
78
|
-
|
|
83
|
+
_ref7;
|
|
79
84
|
|
|
80
85
|
var styles = props.styles,
|
|
81
86
|
hint = props.hint;
|
|
82
87
|
var STitle = Text;
|
|
83
|
-
var SIcon =
|
|
84
|
-
return
|
|
88
|
+
var SIcon = Info;
|
|
89
|
+
return _ref7 = sstyled(styles), /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(STitle, _ref7.cn("STitle", _objectSpread({}, _assignProps2({}, _ref2)))), hint && /*#__PURE__*/React.createElement(Tooltip, _ref7.cn("Tooltip", {
|
|
85
90
|
"title": hint
|
|
86
|
-
}), /*#__PURE__*/React.createElement(SIcon,
|
|
91
|
+
}), /*#__PURE__*/React.createElement(SIcon, _ref7.cn("SIcon", {}))));
|
|
87
92
|
}
|
|
88
93
|
|
|
89
94
|
function Description(props) {
|
|
90
95
|
var _ref3 = this ? this.asProps : arguments[0],
|
|
91
|
-
|
|
96
|
+
_ref8;
|
|
92
97
|
|
|
93
98
|
var styles = props.styles;
|
|
94
99
|
var SDescription = Text;
|
|
95
|
-
return
|
|
100
|
+
return _ref8 = sstyled(styles), /*#__PURE__*/React.createElement(SDescription, _ref8.cn("SDescription", _objectSpread({}, _assignProps3({
|
|
96
101
|
"tag": "p"
|
|
97
102
|
}, _ref3))));
|
|
98
103
|
}
|
|
99
104
|
|
|
100
|
-
|
|
105
|
+
function Header(props) {
|
|
106
|
+
var _ref4 = this ? this.asProps : arguments[0],
|
|
107
|
+
_ref9;
|
|
108
|
+
|
|
109
|
+
var styles = props.styles;
|
|
110
|
+
var SHeader = Box;
|
|
111
|
+
return _ref9 = sstyled(styles), /*#__PURE__*/React.createElement(SHeader, _ref9.cn("SHeader", _objectSpread({}, _assignProps4(_objectSpread({}, props), _ref4))));
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function Body(props) {
|
|
115
|
+
var _ref5 = this ? this.asProps : arguments[0],
|
|
116
|
+
_ref10;
|
|
117
|
+
|
|
118
|
+
var styles = props.styles;
|
|
119
|
+
var SBody = Box;
|
|
120
|
+
return _ref10 = sstyled(styles), /*#__PURE__*/React.createElement(SBody, _ref10.cn("SBody", _objectSpread({}, _assignProps5(_objectSpread({}, props), _ref5))));
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
var Card = createComponent(CardRoot, {
|
|
101
124
|
Title: Title,
|
|
102
|
-
Description: Description
|
|
125
|
+
Description: Description,
|
|
126
|
+
Header: Header,
|
|
127
|
+
Body: Body
|
|
103
128
|
});
|
|
129
|
+
export default Card;
|
|
104
130
|
//# sourceMappingURL=Card.js.map
|
package/lib/es6/Card.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Card.
|
|
1
|
+
{"version":3,"sources":["../../src/Card.js"],"names":["React","createComponent","Component","sstyled","Root","Box","Text","Tooltip","Info","isAdvanceMode","CardRoot","SCard","asProps","Children","styles","advanceMode","Card","Header","displayName","Body","style","Title","props","hint","STitle","SIcon","Description","SDescription","SHeader","SBody"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,eAAP,IAA0BC,SAA1B,EAAqCC,OAArC,EAA8CC,IAA9C,QAA0D,eAA1D;AACA,SAASC,GAAT,QAAoB,mBAApB;AACA,SAASC,IAAT,QAAqB,qBAArB;AACA,OAAOC,OAAP,MAAoB,kBAApB;AACA,OAAOC,IAAP,MAAiB,sBAAjB;;;;;;;;;;;;;;;;;;;AAGA,SAASC,aAAT,QAA8B,kCAA9B;;IAEMC,Q;;;;;;;;;;;;;WAKJ,kBAAS;AAAA;AAAA;;AACP,UAAMC,KAAK,GAMMN,GANjB;AADO,0BAEsB,KAAKO,OAF3B;AAAA,UAECC,QAFD,iBAECA,QAFD;AAAA,UAEWC,MAFX,iBAEWA,MAFX;AAIP,UAAMC,WAAW,GAAGN,aAAa,CAACI,QAAD,EAAW,CAACG,IAAI,CAACC,MAAL,CAAYC,WAAb,EAA0BF,IAAI,CAACG,IAAL,CAAUD,WAApC,CAAX,CAAjC;AAEA,qBAAOf,OAAO,CAACW,MAAD,CAAd,eACE,oBAAC,KAAD,gEACGC,WAAW,gBACV,oBAAC,QAAD,2BADU,gBAGV,oBAAC,IAAD,CAAM,IAAN,qBACE,oBAAC,QAAD,2BADF,CAJJ,CADF;AAWD;;;;EAtBoBb,S;;gBAAjBQ,Q,iBACiB,M;;gBADjBA,Q,WAGWU,K;;AAsBjB,SAASC,KAAT,CAAeC,KAAf,EAAsB;AAAA;AAAA;;AAAA,MACZR,MADY,GACKQ,KADL,CACZR,MADY;AAAA,MACJS,IADI,GACKD,KADL,CACJC,IADI;AAEpB,MAAMC,MAAM,GAIQlB,IAJpB;AACA,MAAMmB,KAAK,GAAGjB,IAAd;AACA,iBAAOL,OAAO,CAACW,MAAD,CAAd,eACE,uDACE,oBAAC,MAAD,kEADF,EAEGS,IAAI,iBACH,oBAAC,OAAD;AAAA,aAAgBA;AAAhB,mBACE,oBAAC,KAAD,wBADF,CAHJ,CADF;AAUD;;AAED,SAASG,WAAT,CAAqBJ,KAArB,EAA4B;AAAA;AAAA;;AAAA,MAClBR,MADkB,GACPQ,KADO,CAClBR,MADkB;AAE1B,MAAMa,YAAY,GAC2BrB,IAD7C;AACA,iBAAOH,OAAO,CAACW,MAAD,CAAd,eAAuB,oBAAC,YAAD;AAAA,WAAgC;AAAhC,cAAvB;AACD;;AAED,SAASG,MAAT,CAAgBK,KAAhB,EAAuB;AAAA;AAAA;;AAAA,MACbR,MADa,GACFQ,KADE,CACbR,MADa;AAErB,MAAMc,OAAO,GAC2BvB,GADxC;AACA,iBAAOF,OAAO,CAACW,MAAD,CAAd,eAAuB,oBAAC,OAAD,wEAA0BQ,KAA1B,YAAvB;AACD;;AAED,SAASH,IAAT,CAAcG,KAAd,EAAqB;AAAA;AAAA;;AAAA,MACXR,MADW,GACAQ,KADA,CACXR,MADW;AAEnB,MAAMe,KAAK,GAC2BxB,GADtC;AACA,kBAAOF,OAAO,CAACW,MAAD,CAAd,eAAuB,oBAAC,KAAD,uEAAwBQ,KAAxB,YAAvB;AACD;;AAED,IAAMN,IAAI,GAAGf,eAAe,CAACS,QAAD,EAAW;AACrCW,EAAAA,KAAK,EAALA,KADqC;AAErCK,EAAAA,WAAW,EAAXA,WAFqC;AAGrCT,EAAAA,MAAM,EAANA,MAHqC;AAIrCE,EAAAA,IAAI,EAAJA;AAJqC,CAAX,CAA5B;AAOA,eAAeH,IAAf","sourcesContent":["import React from 'react';\nimport createComponent, { Component, sstyled, Root } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport { Text } from '@semcore/typography';\nimport Tooltip from '@semcore/tooltip';\nimport Info from '@semcore/icon/Info/m';\n\nimport style from './style/card.shadow.css';\nimport { isAdvanceMode } from '@semcore/utils/lib/findComponent';\n\nclass CardRoot extends Component {\n static displayName = 'Card';\n\n static style = style;\n\n render() {\n const SCard = Root;\n const { Children, styles } = this.asProps;\n\n const advanceMode = isAdvanceMode(Children, [Card.Header.displayName, Card.Body.displayName]);\n\n return sstyled(styles)(\n <SCard render={Box}>\n {advanceMode ? (\n <Children />\n ) : (\n <Card.Body>\n <Children />\n </Card.Body>\n )}\n </SCard>,\n );\n }\n}\n\nfunction Title(props) {\n const { styles, hint } = props;\n const STitle = Root;\n const SIcon = Info;\n return sstyled(styles)(\n <>\n <STitle render={Text} />\n {hint && (\n <Tooltip title={hint}>\n <SIcon />\n </Tooltip>\n )}\n </>,\n );\n}\n\nfunction Description(props) {\n const { styles } = props;\n const SDescription = Root;\n return sstyled(styles)(<SDescription render={Text} tag=\"p\" />);\n}\n\nfunction Header(props) {\n const { styles } = props;\n const SHeader = Root;\n return sstyled(styles)(<SHeader render={Box} {...props} />);\n}\n\nfunction Body(props) {\n const { styles } = props;\n const SBody = Root;\n return sstyled(styles)(<SBody render={Box} {...props} />);\n}\n\nconst Card = createComponent(CardRoot, {\n Title,\n Description,\n Header,\n Body,\n});\n\nexport default Card;\n"],"file":"Card.js"}
|
package/lib/es6/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.
|
|
1
|
+
{"version":3,"sources":["../../src/index.js"],"names":["default"],"mappings":"AAAA,SAASA,OAAT,QAAwB,QAAxB;AACA,cAAc,QAAd","sourcesContent":["export { default } from './Card';\nexport * from './Card';\n"],"file":"index.js"}
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
SCard {
|
|
4
4
|
border: 1px solid var(--gray80);
|
|
5
5
|
border-radius: 2px;
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
background: var(--white);
|
|
6
8
|
}
|
|
7
9
|
|
|
8
10
|
STitle {
|
|
@@ -21,3 +23,17 @@ SDescription {
|
|
|
21
23
|
font-size: var(--fs-200);
|
|
22
24
|
color: var(--gray60);
|
|
23
25
|
}
|
|
26
|
+
|
|
27
|
+
SHeader {
|
|
28
|
+
padding-bottom: 0;
|
|
29
|
+
padding-left: 24px;
|
|
30
|
+
padding-right: 24px;
|
|
31
|
+
padding-top: 20px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
SBody {
|
|
35
|
+
padding-bottom: 24px;
|
|
36
|
+
padding-left: 24px;
|
|
37
|
+
padding-right: 24px;
|
|
38
|
+
padding-top: 20px;
|
|
39
|
+
}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,2 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CProps, ReturnEl } from '@semcore/core';
|
|
3
|
+
import { Box, IBoxProps } from '@semcore/flex-box';
|
|
4
|
+
import { Text, ITextProps } from '@semcore/typography';
|
|
5
|
+
|
|
6
|
+
export interface ITitleProps extends ITextProps {
|
|
7
|
+
/**
|
|
8
|
+
* Tooltip text
|
|
9
|
+
*/
|
|
10
|
+
hint?: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
declare const Card: (<T>(props: CProps<IBoxProps & T>) => ReturnEl) & {
|
|
14
|
+
Title: <T>(props: ITitleProps & T) => ReturnEl;
|
|
15
|
+
Description: typeof Text;
|
|
16
|
+
Header: typeof Box;
|
|
17
|
+
Body: typeof Box;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export default Card;
|
package/package.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/card",
|
|
3
3
|
"description": "SEMRush Card Component",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.4.0",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
8
|
+
"sideEffects": false,
|
|
8
9
|
"author": "Roman Lysov <r.lysov@semrush.com>",
|
|
9
10
|
"license": "MIT",
|
|
10
11
|
"scripts": {
|
|
11
|
-
"build": "build",
|
|
12
|
+
"build": "build --source=js",
|
|
12
13
|
"test": "jest"
|
|
13
14
|
},
|
|
14
15
|
"dependencies": {
|
|
@@ -16,13 +17,13 @@
|
|
|
16
17
|
"@semcore/flex-box": "^4",
|
|
17
18
|
"@semcore/typography": "^3",
|
|
18
19
|
"@semcore/tooltip": "^4",
|
|
19
|
-
"@semcore/icon": "^2"
|
|
20
|
+
"@semcore/icon": "^2.16"
|
|
20
21
|
},
|
|
21
22
|
"peerDependencies": {
|
|
22
23
|
"@semcore/core": "^1.11",
|
|
23
24
|
"react": "16.8 - 17"
|
|
24
25
|
},
|
|
25
26
|
"jest": {
|
|
26
|
-
"preset": "jest-preset-ui"
|
|
27
|
+
"preset": "@semcore/jest-preset-ui"
|
|
27
28
|
}
|
|
28
29
|
}
|
package/src/Card.js
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import createComponent, { Component, sstyled, Root } from '@semcore/core';
|
|
3
|
+
import { Box } from '@semcore/flex-box';
|
|
4
|
+
import { Text } from '@semcore/typography';
|
|
5
|
+
import Tooltip from '@semcore/tooltip';
|
|
6
|
+
import Info from '@semcore/icon/Info/m';
|
|
7
|
+
|
|
8
|
+
import style from './style/card.shadow.css';
|
|
9
|
+
import { isAdvanceMode } from '@semcore/utils/lib/findComponent';
|
|
10
|
+
|
|
11
|
+
class CardRoot extends Component {
|
|
12
|
+
static displayName = 'Card';
|
|
13
|
+
|
|
14
|
+
static style = style;
|
|
15
|
+
|
|
16
|
+
render() {
|
|
17
|
+
const SCard = Root;
|
|
18
|
+
const { Children, styles } = this.asProps;
|
|
19
|
+
|
|
20
|
+
const advanceMode = isAdvanceMode(Children, [Card.Header.displayName, Card.Body.displayName]);
|
|
21
|
+
|
|
22
|
+
return sstyled(styles)(
|
|
23
|
+
<SCard render={Box}>
|
|
24
|
+
{advanceMode ? (
|
|
25
|
+
<Children />
|
|
26
|
+
) : (
|
|
27
|
+
<Card.Body>
|
|
28
|
+
<Children />
|
|
29
|
+
</Card.Body>
|
|
30
|
+
)}
|
|
31
|
+
</SCard>,
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function Title(props) {
|
|
37
|
+
const { styles, hint } = props;
|
|
38
|
+
const STitle = Root;
|
|
39
|
+
const SIcon = Info;
|
|
40
|
+
return sstyled(styles)(
|
|
41
|
+
<>
|
|
42
|
+
<STitle render={Text} />
|
|
43
|
+
{hint && (
|
|
44
|
+
<Tooltip title={hint}>
|
|
45
|
+
<SIcon />
|
|
46
|
+
</Tooltip>
|
|
47
|
+
)}
|
|
48
|
+
</>,
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function Description(props) {
|
|
53
|
+
const { styles } = props;
|
|
54
|
+
const SDescription = Root;
|
|
55
|
+
return sstyled(styles)(<SDescription render={Text} tag="p" />);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function Header(props) {
|
|
59
|
+
const { styles } = props;
|
|
60
|
+
const SHeader = Root;
|
|
61
|
+
return sstyled(styles)(<SHeader render={Box} {...props} />);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function Body(props) {
|
|
65
|
+
const { styles } = props;
|
|
66
|
+
const SBody = Root;
|
|
67
|
+
return sstyled(styles)(<SBody render={Box} {...props} />);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const Card = createComponent(CardRoot, {
|
|
71
|
+
Title,
|
|
72
|
+
Description,
|
|
73
|
+
Header,
|
|
74
|
+
Body,
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
export default Card;
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CProps, ReturnEl } from '@semcore/core';
|
|
3
|
+
import { Box, IBoxProps } from '@semcore/flex-box';
|
|
4
|
+
import { Text, ITextProps } from '@semcore/typography';
|
|
5
|
+
|
|
6
|
+
export interface ITitleProps extends ITextProps {
|
|
7
|
+
/**
|
|
8
|
+
* Tooltip text
|
|
9
|
+
*/
|
|
10
|
+
hint?: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
declare const Card: (<T>(props: CProps<IBoxProps & T>) => ReturnEl) & {
|
|
14
|
+
Title: <T>(props: ITitleProps & T) => ReturnEl;
|
|
15
|
+
Description: typeof Text;
|
|
16
|
+
Header: typeof Box;
|
|
17
|
+
Body: typeof Box;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export default Card;
|
|
File without changes
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
SCard {
|
|
4
4
|
border: 1px solid var(--gray80);
|
|
5
5
|
border-radius: 2px;
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
background: var(--white);
|
|
6
8
|
}
|
|
7
9
|
|
|
8
10
|
STitle {
|
|
@@ -21,3 +23,17 @@ SDescription {
|
|
|
21
23
|
font-size: var(--fs-200);
|
|
22
24
|
color: var(--gray60);
|
|
23
25
|
}
|
|
26
|
+
|
|
27
|
+
SHeader {
|
|
28
|
+
padding-bottom: 0;
|
|
29
|
+
padding-left: 24px;
|
|
30
|
+
padding-right: 24px;
|
|
31
|
+
padding-top: 20px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
SBody {
|
|
35
|
+
padding-bottom: 24px;
|
|
36
|
+
padding-left: 24px;
|
|
37
|
+
padding-right: 24px;
|
|
38
|
+
padding-top: 20px;
|
|
39
|
+
}
|
package/lib/types/Card.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React, { ComponentProps, HTMLAttributes } from 'react';
|
|
2
|
-
import { Merge } from '@semcore/core';
|
|
3
|
-
import { ITextProps, Text } from '@semcore/typography';
|
|
4
|
-
export interface ITitleProps extends ITextProps {
|
|
5
|
-
/**
|
|
6
|
-
* Tooltip text
|
|
7
|
-
*/
|
|
8
|
-
hint?: React.ReactNode;
|
|
9
|
-
}
|
|
10
|
-
declare const _default: import("@semcore/core").ComponentType<import("@semcore/core").PropsAndRef<Merge<import("@semcore/flex-box").IBoxProps, React.HTMLAttributes<HTMLDivElement>>, {}, {}>, {
|
|
11
|
-
Title: Merge<ITitleProps, HTMLAttributes<HTMLSpanElement>>;
|
|
12
|
-
Description: ComponentProps<typeof Text>;
|
|
13
|
-
}, {}, {
|
|
14
|
-
[key: string]: (arg: unknown) => void;
|
|
15
|
-
}, null>;
|
|
16
|
-
export default _default;
|
package/src/Card.tsx
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import React, { ComponentProps, HTMLAttributes } from 'react';
|
|
2
|
-
import createComponent, { Component, Merge, sstyled, Root } from '@semcore/core';
|
|
3
|
-
import { Box } from '@semcore/flex-box';
|
|
4
|
-
import { ITextProps, Text } from '@semcore/typography';
|
|
5
|
-
// eslint-disable-next-line import/no-named-as-default
|
|
6
|
-
import Tooltip from '@semcore/tooltip';
|
|
7
|
-
import InfoXS from '@semcore/icon/lib/Info/xs';
|
|
8
|
-
|
|
9
|
-
import style from './style/card.shadow.css';
|
|
10
|
-
|
|
11
|
-
export interface ITitleProps extends ITextProps {
|
|
12
|
-
/**
|
|
13
|
-
* Tooltip text
|
|
14
|
-
*/
|
|
15
|
-
hint?: React.ReactNode;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
class Card extends Component {
|
|
19
|
-
static displayName = 'Card';
|
|
20
|
-
|
|
21
|
-
static style = style;
|
|
22
|
-
|
|
23
|
-
render() {
|
|
24
|
-
const SCard = Root;
|
|
25
|
-
const { styles } = this.asProps;
|
|
26
|
-
|
|
27
|
-
return sstyled(styles)(<SCard render={Box} p={6} />);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function Title(props) {
|
|
32
|
-
const { styles, hint } = props;
|
|
33
|
-
const STitle = Root;
|
|
34
|
-
const SIcon = InfoXS;
|
|
35
|
-
return sstyled(styles)(
|
|
36
|
-
<>
|
|
37
|
-
<STitle render={Text} />
|
|
38
|
-
{hint && (
|
|
39
|
-
<Tooltip title={hint}>
|
|
40
|
-
<SIcon />
|
|
41
|
-
</Tooltip>
|
|
42
|
-
)}
|
|
43
|
-
</>,
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
function Description(props) {
|
|
48
|
-
const { styles } = props;
|
|
49
|
-
const SDescription = Root;
|
|
50
|
-
return sstyled(styles)(<SDescription render={Text} tag="p" />);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export default createComponent<
|
|
54
|
-
ComponentProps<typeof Box>,
|
|
55
|
-
{
|
|
56
|
-
Title: Merge<ITitleProps, HTMLAttributes<HTMLSpanElement>>;
|
|
57
|
-
Description: ComponentProps<typeof Text>;
|
|
58
|
-
}
|
|
59
|
-
>(Card, {
|
|
60
|
-
Title,
|
|
61
|
-
Description,
|
|
62
|
-
});
|