1 | "use strict";
|
2 | "use client";
|
3 |
|
4 | var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
5 | exports.__esModule = true;
|
6 | exports.default = void 0;
|
7 | var _classnames = _interopRequireDefault(require("classnames"));
|
8 | var React = _interopRequireWildcard(require("react"));
|
9 | var _ThemeProvider = require("./ThemeProvider");
|
10 | var _CardBody = _interopRequireDefault(require("./CardBody"));
|
11 | var _CardFooter = _interopRequireDefault(require("./CardFooter"));
|
12 | var _CardHeader = _interopRequireDefault(require("./CardHeader"));
|
13 | var _CardImg = _interopRequireDefault(require("./CardImg"));
|
14 | var _CardImgOverlay = _interopRequireDefault(require("./CardImgOverlay"));
|
15 | var _CardLink = _interopRequireDefault(require("./CardLink"));
|
16 | var _CardSubtitle = _interopRequireDefault(require("./CardSubtitle"));
|
17 | var _CardText = _interopRequireDefault(require("./CardText"));
|
18 | var _CardTitle = _interopRequireDefault(require("./CardTitle"));
|
19 | var _jsxRuntime = require("react/jsx-runtime");
|
20 | function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
21 | function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
22 | const Card = React.forwardRef(({
|
23 | bsPrefix,
|
24 | className,
|
25 | bg,
|
26 | text,
|
27 | border,
|
28 | body = false,
|
29 | children,
|
30 |
|
31 | as: Component = 'div',
|
32 | ...props
|
33 | }, ref) => {
|
34 | const prefix = (0, _ThemeProvider.useBootstrapPrefix)(bsPrefix, 'card');
|
35 | return (0, _jsxRuntime.jsx)(Component, {
|
36 | ref: ref,
|
37 | ...props,
|
38 | className: (0, _classnames.default)(className, prefix, bg && `bg-${bg}`, text && `text-${text}`, border && `border-${border}`),
|
39 | children: body ? (0, _jsxRuntime.jsx)(_CardBody.default, {
|
40 | children: children
|
41 | }) : children
|
42 | });
|
43 | });
|
44 | Card.displayName = 'Card';
|
45 | var _default = Object.assign(Card, {
|
46 | Img: _CardImg.default,
|
47 | Title: _CardTitle.default,
|
48 | Subtitle: _CardSubtitle.default,
|
49 | Body: _CardBody.default,
|
50 | Link: _CardLink.default,
|
51 | Text: _CardText.default,
|
52 | Header: _CardHeader.default,
|
53 | Footer: _CardFooter.default,
|
54 | ImgOverlay: _CardImgOverlay.default
|
55 | });
|
56 | exports.default = _default;
|
57 | module.exports = exports.default; |
\ | No newline at end of file |