pcm-shared-components 2.0.32 → 2.0.34

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.
@@ -213,7 +213,9 @@ export const ProductItemButton = props => {
213
213
  }
214
214
  return value;
215
215
  };
216
- return /*#__PURE__*/React.createElement("div", {
216
+ return /*#__PURE__*/React.createElement(ThemeProvider, {
217
+ theme: defaultTheme
218
+ }, /*#__PURE__*/React.createElement("div", {
217
219
  key: `product_list_items_${productData.product_id}`,
218
220
  className: clsx(classes.productButtonWrapper, 'flex flex-row')
219
221
  }, /*#__PURE__*/React.createElement(Button, {
@@ -295,7 +297,7 @@ export const ProductItemButton = props => {
295
297
  color: "primary",
296
298
  "aria-label": "upload picture",
297
299
  component: "span"
298
- }, /*#__PURE__*/React.createElement(EditIcon, null))));
300
+ }, /*#__PURE__*/React.createElement(EditIcon, null)))));
299
301
  };
300
302
  export default ProductItemButton;
301
303
  ProductItemButton.defaultProps = {
@@ -1,13 +1,13 @@
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, { useState } from 'react';
2
3
  import PropTypes from 'prop-types';
3
- // import AppBar from '@mui/material/AppBar';
4
+ import AppBar from '@mui/material/AppBar';
5
+ import Tabs from '@mui/material/Tabs';
6
+ import Tab from '@mui/material/Tab';
4
7
  import { ThemeProvider } from '@mui/system';
5
8
  import { createTheme, useTheme } from '@mui/material/styles';
9
+ import TabPanel from './components/TabPanel';
6
10
  import { makeStyles } from '@mui/styles';
7
- // import Tabs from '@mui/material/Tabs';
8
- // import Tab from '@mui/material/Tab';
9
- // import TabPanel from './components/TabPanel';
10
-
11
11
  const useStyles = makeStyles(() => ({
12
12
  root: {
13
13
  height: ({
@@ -61,16 +61,33 @@ 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
64
68
  }, /*#__PURE__*/React.createElement("div", {
65
69
  className: tabsWrapperClassName
66
- }), (childrenTabs || []).map((ct, idx) =>
67
- /*#__PURE__*/
68
- // <TabPanel value={selectedTabIndex} index={idx} key={`simple_tabs_panels_${idx}`} >
69
- React.createElement(React.Fragment, null, ct.tabPanel)
70
- // </TabPanel>
71
- )));
70
+ }, /*#__PURE__*/React.createElement(Tabs, {
71
+ classes: classes,
72
+ value: selectedTabIndex,
73
+ onChange: handleChange,
74
+ indicatorColor: "primary",
75
+ textColor: "primary",
76
+ variant: "scrollable",
77
+ scrollButtons: "auto",
78
+ "aria-label": ""
79
+ }, childrenTabs.map((ct, idx) => /*#__PURE__*/React.createElement(Tab, _extends({
80
+ classes: classes,
81
+ style: tabStyles,
82
+ label: ct.tabTitle
83
+ }, a11yProps(idx), {
84
+ key: `simple_tabs_${idx}`
85
+ })))))), childrenTabs.map((ct, idx) => /*#__PURE__*/React.createElement(TabPanel, {
86
+ value: selectedTabIndex,
87
+ index: idx,
88
+ key: `simple_tabs_panels_${idx}`
89
+ }, ct.tabPanel))));
72
90
  };
73
-
74
91
  export default SimpleTab;
75
92
  SimpleTab.defaultProps = {
76
93
  childrenTabs: [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pcm-shared-components",
3
- "version": "2.0.32",
3
+ "version": "2.0.34",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "babel": {