pcm-shared-components 2.0.28 → 2.0.30

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.
@@ -1,3 +1,4 @@
1
+ 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); }
1
2
  import React from 'react';
2
3
  import PropTypes from 'prop-types';
3
4
 
@@ -6,16 +7,18 @@ const TabPanel = props => {
6
7
  const {
7
8
  children,
8
9
  value,
9
- index
10
+ index,
11
+ ...other
10
12
  } = props;
11
- return /*#__PURE__*/React.createElement("div", {
13
+ return /*#__PURE__*/React.createElement("div", _extends({
12
14
  role: "tabpanel",
13
15
  hidden: value !== index,
14
16
  id: `scrollable-auto-tabpanel-${index}`,
15
- "aria-labelledby": `scrollable-auto-tab-${index}`,
17
+ "aria-labelledby": `scrollable-auto-tab-${index}`
18
+ }, other, {
16
19
  className: "w-full h-full overflow-hidden",
17
20
  style: {}
18
- }, value === index && /*#__PURE__*/React.createElement("div", {
21
+ }), value === index && /*#__PURE__*/React.createElement("div", {
19
22
  className: "w-full h-full"
20
23
  }, children));
21
24
  };
@@ -1,7 +1,7 @@
1
1
  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); }
2
- import React from 'react';
2
+ import React, { useState } from 'react';
3
3
  import PropTypes from 'prop-types';
4
- import AppBar from '@mui/material/AppBar';
4
+ // import AppBar from '@mui/material/AppBar';
5
5
  import Tabs from '@mui/material/Tabs';
6
6
  import Tab from '@mui/material/Tab';
7
7
  import { ThemeProvider } from '@mui/system';
@@ -61,10 +61,6 @@ export const SimpleTab = props => {
61
61
  theme: defaultTheme
62
62
  }, /*#__PURE__*/React.createElement("div", {
63
63
  className: "flex flex-col w-full h-full overflow-hidden "
64
- }, /*#__PURE__*/React.createElement(AppBar, {
65
- position: "static",
66
- color: "default",
67
- elevation: 0
68
64
  }, /*#__PURE__*/React.createElement("div", {
69
65
  className: tabsWrapperClassName
70
66
  }, /*#__PURE__*/React.createElement(Tabs, {
@@ -79,14 +75,17 @@ export const SimpleTab = props => {
79
75
  }, childrenTabs.map((ct, idx) => /*#__PURE__*/React.createElement(Tab, _extends({
80
76
  classes: classes,
81
77
  style: tabStyles,
82
- label: ct.tabTitle,
78
+ label: ct.tabTitle
79
+ }, a11yProps(idx), {
83
80
  key: `simple_tabs_${idx}`
84
- }, a11yProps(idx))))))), childrenTabs.map((ct, idx) => /*#__PURE__*/React.createElement(TabPanel, {
85
- value: selectedTabIndex,
86
- index: idx,
87
- key: `simple_tabs_panels_${idx}`
88
- }, ct.tabPanel))));
81
+ }))))), childrenTabs.map((ct, idx) =>
82
+ /*#__PURE__*/
83
+ // <TabPanel value={selectedTabIndex} index={idx} key={`simple_tabs_panels_${idx}`} >
84
+ React.createElement(React.Fragment, null, ct.tabPanel)
85
+ // </TabPanel>
86
+ )));
89
87
  };
88
+
90
89
  export default SimpleTab;
91
90
  SimpleTab.defaultProps = {
92
91
  childrenTabs: [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pcm-shared-components",
3
- "version": "2.0.28",
3
+ "version": "2.0.30",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "babel": {