@lanaco/lnc-react-ui 3.11.29 → 3.11.31

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.
package/lib/index.esm.js CHANGED
@@ -49004,7 +49004,7 @@ var Table = /*#__PURE__*/forwardRef(function (props, ref) {
49004
49004
  _props$PreRenderedTab2 = props.PreRenderedTableHead,
49005
49005
  PreRenderedTableHead = _props$PreRenderedTab2 === void 0 ? false : _props$PreRenderedTab2,
49006
49006
  _props$noBorder = props.noBorder,
49007
- noBorder = _props$noBorder === void 0 ? true : _props$noBorder,
49007
+ noBorder = _props$noBorder === void 0 ? false : _props$noBorder,
49008
49008
  _props$EnableRowStatu = props.EnableRowStatusIndicator,
49009
49009
  EnableRowStatusIndicator = _props$EnableRowStatu === void 0 ? false : _props$EnableRowStatu,
49010
49010
  _props$EnableRowHighl = props.EnableRowHighlight,
@@ -49555,7 +49555,7 @@ Table.propTypes = {
49555
49555
  */
49556
49556
  color: PropTypes.oneOf(["primary", "secondary", "success", "warning", "danger", "information", "neutral", "gray"])
49557
49557
  };
49558
- Table.displayName = 'TABLE';
49558
+ Table.displayName = "TABLE";
49559
49559
 
49560
49560
  var inputType = {
49561
49561
  BOOLEAN: "BOOLEAN",
@@ -61169,7 +61169,8 @@ var useTheme = function useTheme() {
61169
61169
  return useContext(ThemeContext);
61170
61170
  };
61171
61171
  var ThemeProvider = function ThemeProvider(_ref) {
61172
- var theme = _ref.theme,
61172
+ var _ref$theme = _ref.theme,
61173
+ theme = _ref$theme === void 0 ? "Lanaco Light" : _ref$theme,
61173
61174
  children = _ref.children;
61174
61175
  var _useState = useState(function () {
61175
61176
  return typeof theme == "string" ? themes === null || themes === void 0 ? void 0 : themes.find(function (item) {
@@ -61200,9 +61201,6 @@ var ThemeProvider = function ThemeProvider(_ref) {
61200
61201
  theme: currentTheme
61201
61202
  }), children));
61202
61203
  };
61203
- ThemeProvider.defaultProps = {
61204
- theme: "Lanaco Light"
61205
- };
61206
61204
  ThemeProvider.propTypes = {
61207
61205
  theme: PropTypes.oneOfType([PropTypes.string, PropTypes.object])
61208
61206
  };
@@ -81482,21 +81480,22 @@ var PageLayout = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
81482
81480
  var rest = _objectWithoutProperties$1(props, _excluded$f);
81483
81481
  var theme = useTheme$1();
81484
81482
  var hasSidebar = React__default.Children.toArray(children).some(function (component) {
81485
- return component.props.__TYPE__ == "Sidebar";
81483
+ var _component$type;
81484
+ return component.props.__TYPE__ || (component === null || component === void 0 ? void 0 : (_component$type = component.type) === null || _component$type === void 0 ? void 0 : _component$type.displayName) == "Sidebar";
81486
81485
  });
81487
81486
  var getSidebarPlacement = function getSidebarPlacement(children) {
81488
81487
  var layoutIndex, sidebarIndex, contentIndex;
81489
81488
 
81490
81489
  // We shift indexes by 1 just to avoid having 0 index, so its easier when making comparison for return statement.
81491
81490
  React__default.Children.forEach(children, function (component, index) {
81492
- var _component$type, _component$type2, _component$type3;
81493
- if (component.props.__TYPE__ == "Sidebar" || (component === null || component === void 0 ? void 0 : (_component$type = component.type) === null || _component$type === void 0 ? void 0 : _component$type.displayName) === "Sidebar") {
81491
+ var _component$type2, _component$type3, _component$type4;
81492
+ if (component.props.__TYPE__ == "Sidebar" || (component === null || component === void 0 ? void 0 : (_component$type2 = component.type) === null || _component$type2 === void 0 ? void 0 : _component$type2.displayName) === "Sidebar") {
81494
81493
  if (sidebarIndex) throw "Found multiple ocurrences of Sidebar component on the same level in the component tree.";
81495
81494
  sidebarIndex = index + 1;
81496
- } else if (component.props.__TYPE__ == "PageLayout" || (component === null || component === void 0 ? void 0 : (_component$type2 = component.type) === null || _component$type2 === void 0 ? void 0 : _component$type2.displayName) === "PageLayout") {
81495
+ } else if (component.props.__TYPE__ == "PageLayout" || (component === null || component === void 0 ? void 0 : (_component$type3 = component.type) === null || _component$type3 === void 0 ? void 0 : _component$type3.displayName) === "PageLayout") {
81497
81496
  if (layoutIndex) throw "Found multiple ocurrences of PageLayout component on the same level in the component tree.";
81498
81497
  layoutIndex = index + 1;
81499
- } else if (component.props.__TYPE__ == "Content" || (component === null || component === void 0 ? void 0 : (_component$type3 = component.type) === null || _component$type3 === void 0 ? void 0 : _component$type3.displayName) === "Content") {
81498
+ } else if (component.props.__TYPE__ == "Content" || (component === null || component === void 0 ? void 0 : (_component$type4 = component.type) === null || _component$type4 === void 0 ? void 0 : _component$type4.displayName) === "Content") {
81500
81499
  if (contentIndex) throw "Found multiple ocurrences of Content component on the same level in the component tree.";
81501
81500
  contentIndex = index + 1;
81502
81501
  }
package/lib/index.js CHANGED
@@ -49053,7 +49053,7 @@ var Table = /*#__PURE__*/React.forwardRef(function (props, ref) {
49053
49053
  _props$PreRenderedTab2 = props.PreRenderedTableHead,
49054
49054
  PreRenderedTableHead = _props$PreRenderedTab2 === void 0 ? false : _props$PreRenderedTab2,
49055
49055
  _props$noBorder = props.noBorder,
49056
- noBorder = _props$noBorder === void 0 ? true : _props$noBorder,
49056
+ noBorder = _props$noBorder === void 0 ? false : _props$noBorder,
49057
49057
  _props$EnableRowStatu = props.EnableRowStatusIndicator,
49058
49058
  EnableRowStatusIndicator = _props$EnableRowStatu === void 0 ? false : _props$EnableRowStatu,
49059
49059
  _props$EnableRowHighl = props.EnableRowHighlight,
@@ -49604,7 +49604,7 @@ Table.propTypes = {
49604
49604
  */
49605
49605
  color: PropTypes__default["default"].oneOf(["primary", "secondary", "success", "warning", "danger", "information", "neutral", "gray"])
49606
49606
  };
49607
- Table.displayName = 'TABLE';
49607
+ Table.displayName = "TABLE";
49608
49608
 
49609
49609
  var inputType = {
49610
49610
  BOOLEAN: "BOOLEAN",
@@ -61218,7 +61218,8 @@ var useTheme = function useTheme() {
61218
61218
  return React.useContext(ThemeContext);
61219
61219
  };
61220
61220
  var ThemeProvider = function ThemeProvider(_ref) {
61221
- var theme = _ref.theme,
61221
+ var _ref$theme = _ref.theme,
61222
+ theme = _ref$theme === void 0 ? "Lanaco Light" : _ref$theme,
61222
61223
  children = _ref.children;
61223
61224
  var _useState = React.useState(function () {
61224
61225
  return typeof theme == "string" ? themes === null || themes === void 0 ? void 0 : themes.find(function (item) {
@@ -61249,9 +61250,6 @@ var ThemeProvider = function ThemeProvider(_ref) {
61249
61250
  theme: currentTheme
61250
61251
  }), children));
61251
61252
  };
61252
- ThemeProvider.defaultProps = {
61253
- theme: "Lanaco Light"
61254
- };
61255
61253
  ThemeProvider.propTypes = {
61256
61254
  theme: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string, PropTypes__default["default"].object])
61257
61255
  };
@@ -81531,21 +81529,22 @@ var PageLayout = /*#__PURE__*/React__default["default"].forwardRef(function (pro
81531
81529
  var rest = _objectWithoutProperties__default["default"](props, _excluded$f);
81532
81530
  var theme = useTheme$1();
81533
81531
  var hasSidebar = React__default["default"].Children.toArray(children).some(function (component) {
81534
- return component.props.__TYPE__ == "Sidebar";
81532
+ var _component$type;
81533
+ return component.props.__TYPE__ || (component === null || component === void 0 ? void 0 : (_component$type = component.type) === null || _component$type === void 0 ? void 0 : _component$type.displayName) == "Sidebar";
81535
81534
  });
81536
81535
  var getSidebarPlacement = function getSidebarPlacement(children) {
81537
81536
  var layoutIndex, sidebarIndex, contentIndex;
81538
81537
 
81539
81538
  // We shift indexes by 1 just to avoid having 0 index, so its easier when making comparison for return statement.
81540
81539
  React__default["default"].Children.forEach(children, function (component, index) {
81541
- var _component$type, _component$type2, _component$type3;
81542
- if (component.props.__TYPE__ == "Sidebar" || (component === null || component === void 0 ? void 0 : (_component$type = component.type) === null || _component$type === void 0 ? void 0 : _component$type.displayName) === "Sidebar") {
81540
+ var _component$type2, _component$type3, _component$type4;
81541
+ if (component.props.__TYPE__ == "Sidebar" || (component === null || component === void 0 ? void 0 : (_component$type2 = component.type) === null || _component$type2 === void 0 ? void 0 : _component$type2.displayName) === "Sidebar") {
81543
81542
  if (sidebarIndex) throw "Found multiple ocurrences of Sidebar component on the same level in the component tree.";
81544
81543
  sidebarIndex = index + 1;
81545
- } else if (component.props.__TYPE__ == "PageLayout" || (component === null || component === void 0 ? void 0 : (_component$type2 = component.type) === null || _component$type2 === void 0 ? void 0 : _component$type2.displayName) === "PageLayout") {
81544
+ } else if (component.props.__TYPE__ == "PageLayout" || (component === null || component === void 0 ? void 0 : (_component$type3 = component.type) === null || _component$type3 === void 0 ? void 0 : _component$type3.displayName) === "PageLayout") {
81546
81545
  if (layoutIndex) throw "Found multiple ocurrences of PageLayout component on the same level in the component tree.";
81547
81546
  layoutIndex = index + 1;
81548
- } else if (component.props.__TYPE__ == "Content" || (component === null || component === void 0 ? void 0 : (_component$type3 = component.type) === null || _component$type3 === void 0 ? void 0 : _component$type3.displayName) === "Content") {
81547
+ } else if (component.props.__TYPE__ == "Content" || (component === null || component === void 0 ? void 0 : (_component$type4 = component.type) === null || _component$type4 === void 0 ? void 0 : _component$type4.displayName) === "Content") {
81549
81548
  if (contentIndex) throw "Found multiple ocurrences of Content component on the same level in the component tree.";
81550
81549
  contentIndex = index + 1;
81551
81550
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lanaco/lnc-react-ui",
3
3
  "type": "module",
4
- "version": "3.11.29",
4
+ "version": "3.11.31",
5
5
  "description": "component library",
6
6
  "main": "lib/index.js",
7
7
  "module": "lib/index.esm.js",