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 _jsxRuntime = require("react/jsx-runtime");
|
11 | 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); }
|
12 | 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; }
|
13 | const Table = React.forwardRef(({
|
14 | bsPrefix,
|
15 | className,
|
16 | striped,
|
17 | bordered,
|
18 | borderless,
|
19 | hover,
|
20 | size,
|
21 | variant,
|
22 | responsive,
|
23 | ...props
|
24 | }, ref) => {
|
25 | const decoratedBsPrefix = (0, _ThemeProvider.useBootstrapPrefix)(bsPrefix, 'table');
|
26 | const classes = (0, _classnames.default)(className, decoratedBsPrefix, variant && `${decoratedBsPrefix}-${variant}`, size && `${decoratedBsPrefix}-${size}`, striped && `${decoratedBsPrefix}-${typeof striped === 'string' ? `striped-${striped}` : 'striped'}`, bordered && `${decoratedBsPrefix}-bordered`, borderless && `${decoratedBsPrefix}-borderless`, hover && `${decoratedBsPrefix}-hover`);
|
27 | const table = (0, _jsxRuntime.jsx)("table", {
|
28 | ...props,
|
29 | className: classes,
|
30 | ref: ref
|
31 | });
|
32 | if (responsive) {
|
33 | let responsiveClass = `${decoratedBsPrefix}-responsive`;
|
34 | if (typeof responsive === 'string') {
|
35 | responsiveClass = `${responsiveClass}-${responsive}`;
|
36 | }
|
37 | return (0, _jsxRuntime.jsx)("div", {
|
38 | className: responsiveClass,
|
39 | children: table
|
40 | });
|
41 | }
|
42 | return table;
|
43 | });
|
44 | var _default = Table;
|
45 | exports.default = _default;
|
46 | module.exports = exports.default; |
\ | No newline at end of file |