UNPKG

@kubit-ui-web/react-components

Version:

Kubit React Components is a customizable, accessible library of React web components, designed to enhance your application's user experience

15 lines 1.78 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.TableStandAlone = void 0; const jsx_runtime_1 = require("react/jsx-runtime"); const react_1 = __importDefault(require("react")); const role_1 = require("../../types/role/role"); const table_styled_1 = require("./table.styled"); const TableStandAloneComponent = ({ dataTestId = 'table', children, styles, hasScrollDisabled, hasScroll, sticky, component, ...props }, ref) => { return ((0, jsx_runtime_1.jsxs)(table_styled_1.TableWrapperStyled, { ref: ref, "$styles": styles, "data-sticky": sticky, "data-testid": `${dataTestId}-wrapper`, children: [(0, jsx_runtime_1.jsx)(table_styled_1.TableScrollableContainerStyled, { "data-table-scrollable-container": true, "$hasScrollDisabled": hasScrollDisabled, "$styles": styles, "aria-hidden": props['aria-hidden'], "aria-label": hasScroll ? props['aria-label'] : undefined, "aria-labelledby": hasScroll ? props['aria-labelledby'] : undefined, "data-testid": `${dataTestId}-scrollable-container`, role: hasScroll ? role_1.ROLES.REGION : undefined, tabIndex: hasScroll ? 0 : undefined, children: (0, jsx_runtime_1.jsx)(table_styled_1.TableStyled, { "$styles": styles, as: component, "data-testid": dataTestId, children: children }) }), (0, jsx_runtime_1.jsx)(table_styled_1.LeftBoxShadowContainerStyled, { "data-table-left-shadow": true, "$styles": styles }), (0, jsx_runtime_1.jsx)(table_styled_1.RightBoxShadowContainerStyled, { "data-table-right-shadow": true, "$styles": styles })] })); }; exports.TableStandAlone = react_1.default.forwardRef(TableStandAloneComponent); //# sourceMappingURL=tableStandAlone.js.map