@banyan_cloud/roots 1.0.154 → 1.0.156

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/dist/esm/index.js CHANGED
@@ -10592,6 +10592,7 @@ Link.defaultProps = _objectSpread2(_objectSpread2({}, Text.defaultProps), {}, {
10592
10592
  });
10593
10593
 
10594
10594
  var BreadCrumbs = function BreadCrumbs(props) {
10595
+ var _crumbs$;
10595
10596
  var crumbs = props.crumbs,
10596
10597
  maxItems = props.maxItems,
10597
10598
  itemsBeforeCollapse = props.itemsBeforeCollapse,
@@ -10604,15 +10605,16 @@ var BreadCrumbs = function BreadCrumbs(props) {
10604
10605
  _useState2 = _slicedToArray(_useState, 2),
10605
10606
  expand = _useState2[0],
10606
10607
  setExpand = _useState2[1];
10607
- var href = '';
10608
- var CrumbsDOM = crumbs !== null && crumbs.map(function (crumb, index) {
10608
+ var href = "/".concat(crumbs === null || crumbs === void 0 || (_crumbs$ = crumbs[0]) === null || _crumbs$ === void 0 ? void 0 : _crumbs$.path);
10609
+ var crumbsList = crumbs === null || crumbs === void 0 ? void 0 : crumbs.slice(1);
10610
+ var CrumbsDOM = crumbsList !== null && crumbsList.map(function (crumb, index) {
10609
10611
  var title = crumb.title,
10610
10612
  value = crumb.value,
10611
10613
  path = crumb.path,
10612
10614
  search = crumb.search,
10613
10615
  icon = crumb.icon;
10614
- var active = index === crumbs.length - 1;
10615
- var showSeperator = index < crumbs.length - 1;
10616
+ var active = index === crumbsList.length - 1;
10617
+ var showSeperator = index < crumbsList.length - 1;
10616
10618
  href += "/".concat(path);
10617
10619
  return /*#__PURE__*/jsxs(React__default.Fragment, {
10618
10620
  children: [/*#__PURE__*/jsxs(Link, {
@@ -10639,7 +10641,7 @@ var BreadCrumbs = function BreadCrumbs(props) {
10639
10641
  })]
10640
10642
  }, path);
10641
10643
  });
10642
- if (crumbs !== null && CrumbsDOM.length > maxItems && !expand) {
10644
+ if (crumbsList !== null && CrumbsDOM.length > maxItems && !expand) {
10643
10645
  CrumbsDOM.splice(itemsBeforeCollapse, CrumbsDOM.length - (itemsAfterCollapse + itemsBeforeCollapse), /*#__PURE__*/jsxs(React__default.Fragment, {
10644
10646
  children: [/*#__PURE__*/jsx(Button, {
10645
10647
  className: modules_651f50a9.expand,
@@ -10654,7 +10656,7 @@ var BreadCrumbs = function BreadCrumbs(props) {
10654
10656
  })]
10655
10657
  }, 'expand'));
10656
10658
  }
10657
- return (crumbs === null || crumbs === void 0 ? void 0 : crumbs.length) > 1 && /*#__PURE__*/jsxs("div", {
10659
+ return (crumbsList === null || crumbsList === void 0 ? void 0 : crumbsList.length) > 1 && /*#__PURE__*/jsxs("div", {
10658
10660
  className: classes(modules_651f50a9.root, modules_651f50a9["theme-".concat(theme)]),
10659
10661
  children: [/*#__PURE__*/jsx(Button, {
10660
10662
  size: "auto",