@banyan_cloud/roots 1.0.110 → 1.0.112

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
@@ -46799,8 +46799,8 @@ HierarchyBrowser.defaultProps = {
46799
46799
  title: 'Browser'
46800
46800
  };
46801
46801
 
46802
- var css$F = ".BaseModal_module_root__7a4ddeae {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: stretch;\n top: 50%;\n left: 50%;\n right: auto;\n bottom: auto;\n transform: translate(-50%, -50%);\n max-height: 100%;\n height: 43.75rem;\n width: 62.5rem;\n position: fixed;\n background: #ffffff;\n box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.13);\n border-radius: 8px;\n outline: none;\n}\n.BaseModal_module_root__7a4ddeae .BaseModal_module_body__7a4ddeae {\n overflow-y: scroll;\n padding: 0 15px;\n}\n.BaseModal_module_root__7a4ddeae .BaseModal_module_header__7a4ddeae,\n.BaseModal_module_root__7a4ddeae .BaseModal_module_footer__7a4ddeae {\n padding: 1rem;\n}\n.BaseModal_module_root__7a4ddeae .BaseModal_module_header__7a4ddeae {\n font-weight: 500;\n font-size: 1.375rem;\n border-bottom: 1px solid var(--grey5);\n}\n.BaseModal_module_root__7a4ddeae .BaseModal_module_footer__7a4ddeae {\n margin-top: auto;\n background: var(--grey5);\n border-radius: 0 0 8px 8px;\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n align-items: center;\n gap: 0.625rem;\n}\n.BaseModal_module_root__7a4ddeae button.BaseModal_module_close__7a4ddeae {\n position: absolute;\n right: 1rem;\n top: 1rem;\n padding: 0.25rem;\n height: auto;\n background: var(--grey6);\n}\n.BaseModal_module_root__7a4ddeae button.BaseModal_module_close__7a4ddeae .BaseModal_module_icon__7a4ddeae {\n width: 1.5rem;\n height: 1.5rem;\n fill: var(--black);\n}";
46803
- var modules_f23ae002 = {"root":"BaseModal_module_root__7a4ddeae","body":"BaseModal_module_body__7a4ddeae","header":"BaseModal_module_header__7a4ddeae","footer":"BaseModal_module_footer__7a4ddeae","close":"BaseModal_module_close__7a4ddeae","icon":"BaseModal_module_icon__7a4ddeae"};
46802
+ var css$F = ".BaseModal_module_root__22dbeb47 {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: stretch;\n top: 50%;\n left: 50%;\n right: auto;\n bottom: auto;\n transform: translate(-50%, -50%);\n max-height: 100%;\n height: 43.75rem;\n width: 62.5rem;\n position: fixed;\n background: #ffffff;\n box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.13);\n border-radius: 8px;\n outline: none;\n}\n.BaseModal_module_root__22dbeb47 .BaseModal_module_body__22dbeb47 {\n overflow-y: scroll;\n padding: 1rem 2rem 1rem 2rem;\n}\n.BaseModal_module_root__22dbeb47 .BaseModal_module_header__22dbeb47,\n.BaseModal_module_root__22dbeb47 .BaseModal_module_footer__22dbeb47 {\n padding: 1rem;\n}\n.BaseModal_module_root__22dbeb47 .BaseModal_module_header__22dbeb47 {\n font-weight: 500;\n font-size: 1.375rem;\n border-bottom: 1px solid var(--grey4);\n}\n.BaseModal_module_root__22dbeb47 .BaseModal_module_footer__22dbeb47 {\n margin-top: auto;\n background: var(--grey6);\n border-radius: 0 0 8px 8px;\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n align-items: center;\n gap: 0.625rem;\n}\n.BaseModal_module_root__22dbeb47 button.BaseModal_module_close__22dbeb47 {\n position: absolute;\n right: 1rem;\n top: 1rem;\n padding: 0.25rem;\n height: auto;\n background: var(--grey6);\n}\n.BaseModal_module_root__22dbeb47 button.BaseModal_module_close__22dbeb47 .BaseModal_module_icon__22dbeb47 {\n width: 1.5rem;\n height: 1.5rem;\n fill: var(--black);\n}";
46803
+ var modules_f23ae002 = {"root":"BaseModal_module_root__22dbeb47","body":"BaseModal_module_body__22dbeb47","header":"BaseModal_module_header__22dbeb47","footer":"BaseModal_module_footer__22dbeb47","close":"BaseModal_module_close__22dbeb47","icon":"BaseModal_module_icon__22dbeb47"};
46804
46804
  n(css$F,{});
46805
46805
 
46806
46806
  var BaseModal = function BaseModal(props) {
@@ -47612,8 +47612,8 @@ TableCell.defaultProps = _objectSpread2(_objectSpread2({}, BaseCell.defaultProps
47612
47612
  onSort: function onSort() {}
47613
47613
  });
47614
47614
 
47615
- var css$x = ".TableRow_module_root__f4710f2d {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n}\n.TableRow_module_root__f4710f2d.TableRow_module_headerRow__f4710f2d {\n background: var(--grey6);\n}\n.TableRow_module_root__f4710f2d.TableRow_module_headerRow__f4710f2d > [data-elem=base-cell].TableRow_module_expandableCell__f4710f2d {\n background: transparent;\n}\n.TableRow_module_root__f4710f2d.TableRow_module_headerRow__f4710f2d > [data-elem=base-cell].TableRow_module_expandableCell__f4710f2d > [data-elem=component2] {\n width: 3rem;\n visibility: hidden;\n}\n.TableRow_module_root__f4710f2d.TableRow_module_bodyRow__f4710f2d {\n background: var(--white);\n}\n.TableRow_module_root__f4710f2d.TableRow_module_bodyRow__f4710f2d:hover > [data-elem=base-cell] {\n background: var(--info-bg);\n}\n.TableRow_module_root__f4710f2d.TableRow_module_bodyRow__f4710f2d[data-active=true] > [data-elem=base-cell] {\n background: var(--background);\n}\n.TableRow_module_root__f4710f2d > [data-elem=base-cell]:first-child {\n padding-left: 1rem;\n}\n.TableRow_module_root__f4710f2d > [data-elem=base-cell]:last-child {\n padding-right: 1rem;\n}\n.TableRow_module_root__f4710f2d.TableRow_module_rowHeightMd__f4710f2d > td[data-elem=base-cell] {\n height: 3rem;\n}\n.TableRow_module_root__f4710f2d.TableRow_module_rowHeightLg__f4710f2d > td[data-elem=base-cell] {\n height: 4rem;\n}\n.TableRow_module_root__f4710f2d > [data-elem=base-cell].TableRow_module_expandableCell__f4710f2d {\n padding-left: 0.9rem;\n padding-right: 0.1rem;\n overflow: visible;\n}\n.TableRow_module_root__f4710f2d > [data-elem=base-cell].TableRow_module_expandableCell__f4710f2d > [data-elem=component2] {\n overflow: visible;\n}\n.TableRow_module_root__f4710f2d > [data-elem=base-cell].TableRow_module_expandableCell__f4710f2d > [data-elem=component2] > [data-elem=text] {\n overflow: visible;\n}\n.TableRow_module_root__f4710f2d button.TableRow_module_button__f4710f2d[data-elem=base-cell] .TableRow_module_icon__f4710f2d {\n width: 1.5rem;\n height: 1.5rem;\n}\n.TableRow_module_root__f4710f2d button.TableRow_module_button__f4710f2d[data-elem=base-cell]:disabled {\n cursor: default;\n}\n.TableRow_module_root__f4710f2d button.TableRow_module_button__f4710f2d[data-elem=base-cell]:disabled .TableRow_module_icon__f4710f2d {\n visibility: hidden;\n}\n.TableRow_module_root__f4710f2d .TableRow_module_expanded__f4710f2d .TableRow_module_button__f4710f2d .TableRow_module_icon__f4710f2d {\n transform: rotate(180deg);\n}";
47616
- var modules_f6618a87 = {"root":"TableRow_module_root__f4710f2d","header-row":"TableRow_module_headerRow__f4710f2d","expandable-cell":"TableRow_module_expandableCell__f4710f2d","body-row":"TableRow_module_bodyRow__f4710f2d","row-height-md":"TableRow_module_rowHeightMd__f4710f2d","row-height-lg":"TableRow_module_rowHeightLg__f4710f2d","button":"TableRow_module_button__f4710f2d","icon":"TableRow_module_icon__f4710f2d","expanded":"TableRow_module_expanded__f4710f2d"};
47615
+ var css$x = ".TableRow_module_root__56f50f2c {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n}\n.TableRow_module_root__56f50f2c.TableRow_module_headerRow__56f50f2c {\n background: var(--grey6);\n}\n.TableRow_module_root__56f50f2c.TableRow_module_headerRow__56f50f2c > [data-elem=base-cell].TableRow_module_expandableCell__56f50f2c {\n background: transparent;\n}\n.TableRow_module_root__56f50f2c.TableRow_module_headerRow__56f50f2c > [data-elem=base-cell].TableRow_module_expandableCell__56f50f2c > [data-elem=component2] {\n width: 3rem;\n visibility: hidden;\n}\n.TableRow_module_root__56f50f2c.TableRow_module_bodyRow__56f50f2c {\n background: var(--white);\n}\n.TableRow_module_root__56f50f2c.TableRow_module_bodyRow__56f50f2c > [data-elem=base-cell] {\n background: var(--white);\n}\n.TableRow_module_root__56f50f2c.TableRow_module_bodyRow__56f50f2c:hover > [data-elem=base-cell] {\n background: var(--info-bg);\n}\n.TableRow_module_root__56f50f2c.TableRow_module_bodyRow__56f50f2c[data-active=true] > [data-elem=base-cell] {\n background: var(--background);\n}\n.TableRow_module_root__56f50f2c > [data-elem=base-cell]:first-child {\n padding-left: 1rem;\n}\n.TableRow_module_root__56f50f2c > [data-elem=base-cell]:last-child {\n padding-right: 1rem;\n}\n.TableRow_module_root__56f50f2c.TableRow_module_rowHeightMd__56f50f2c > td[data-elem=base-cell] {\n height: 3rem;\n}\n.TableRow_module_root__56f50f2c.TableRow_module_rowHeightLg__56f50f2c > td[data-elem=base-cell] {\n height: 4rem;\n}\n.TableRow_module_root__56f50f2c > [data-elem=base-cell].TableRow_module_expandableCell__56f50f2c {\n padding-left: 0.9rem;\n padding-right: 0.1rem;\n overflow: visible;\n}\n.TableRow_module_root__56f50f2c > [data-elem=base-cell].TableRow_module_expandableCell__56f50f2c > [data-elem=component2] {\n overflow: visible;\n}\n.TableRow_module_root__56f50f2c > [data-elem=base-cell].TableRow_module_expandableCell__56f50f2c > [data-elem=component2] > [data-elem=text] {\n overflow: visible;\n}\n.TableRow_module_root__56f50f2c button.TableRow_module_button__56f50f2c[data-elem=base-cell] .TableRow_module_icon__56f50f2c {\n width: 1.5rem;\n height: 1.5rem;\n}\n.TableRow_module_root__56f50f2c button.TableRow_module_button__56f50f2c[data-elem=base-cell]:disabled {\n cursor: default;\n}\n.TableRow_module_root__56f50f2c button.TableRow_module_button__56f50f2c[data-elem=base-cell]:disabled .TableRow_module_icon__56f50f2c {\n visibility: hidden;\n}\n.TableRow_module_root__56f50f2c .TableRow_module_expanded__56f50f2c .TableRow_module_button__56f50f2c .TableRow_module_icon__56f50f2c {\n transform: rotate(180deg);\n}";
47616
+ var modules_f6618a87 = {"root":"TableRow_module_root__56f50f2c","header-row":"TableRow_module_headerRow__56f50f2c","expandable-cell":"TableRow_module_expandableCell__56f50f2c","body-row":"TableRow_module_bodyRow__56f50f2c","row-height-md":"TableRow_module_rowHeightMd__56f50f2c","row-height-lg":"TableRow_module_rowHeightLg__56f50f2c","button":"TableRow_module_button__56f50f2c","icon":"TableRow_module_icon__56f50f2c","expanded":"TableRow_module_expanded__56f50f2c"};
47617
47617
  n(css$x,{});
47618
47618
 
47619
47619
  var TableRow = /*#__PURE__*/forwardRef(function BaseTable(props, ref) {
@@ -47632,6 +47632,19 @@ var TableRow = /*#__PURE__*/forwardRef(function BaseTable(props, ref) {
47632
47632
  _useState2 = _slicedToArray(_useState, 2),
47633
47633
  expanded = _useState2[0],
47634
47634
  setExpanded = _useState2[1];
47635
+ var expandableProps = Expandable ? {
47636
+ _expanded: expanded,
47637
+ _setExpanded: setExpanded,
47638
+ disabled: !Expandable({
47639
+ datum: datum,
47640
+ index: _index
47641
+ }),
47642
+ onClick: function onClick() {
47643
+ setExpanded(function (prev) {
47644
+ return !prev;
47645
+ });
47646
+ }
47647
+ } : {};
47635
47648
  var tableCells = headerData === null || headerData === void 0 ? void 0 : (_headerData$map = headerData.map) === null || _headerData$map === void 0 ? void 0 : _headerData$map.call(headerData, function (item) {
47636
47649
  var _getCustomCell;
47637
47650
  var cellContent = null;
@@ -47642,6 +47655,7 @@ var TableRow = /*#__PURE__*/forwardRef(function BaseTable(props, ref) {
47642
47655
  }
47643
47656
  var cellProps = _objectSpread2(_objectSpread2(_objectSpread2({}, props), item), {}, {
47644
47657
  _index: _index,
47658
+ expandableProps: expandableProps,
47645
47659
  setActiveId: setActiveId,
47646
47660
  key: item.id,
47647
47661
  datum: datum,
@@ -47664,38 +47678,12 @@ var TableRow = /*#__PURE__*/forwardRef(function BaseTable(props, ref) {
47664
47678
  );
47665
47679
  });
47666
47680
  return /*#__PURE__*/jsxs(Fragment, {
47667
- children: [/*#__PURE__*/jsxs("tr", {
47681
+ children: [/*#__PURE__*/jsx("tr", {
47668
47682
  ref: ref,
47669
47683
  tabIndex: -1,
47670
47684
  "data-elem": "table-row",
47671
- className: classes(className, modules_f6618a87.root, modules_f6618a87["".concat(type, "-row")], modules_f6618a87["row-height-".concat(rowHeight)], Expandable ? modules_f6618a87.expandable : ''),
47672
- children: [Expandable && type === 'header' && /*#__PURE__*/jsx(TableCell, {
47673
- className: classes(modules_f6618a87['expandable-cell'], expanded ? modules_f6618a87.expanded : ''),
47674
- size: "auto",
47675
- cellContent: null
47676
- }), Expandable && type === 'body' && /*#__PURE__*/jsx(TableCell, {
47677
- className: classes(modules_f6618a87['expandable-cell'], expanded ? modules_f6618a87.expanded : ''),
47678
- size: "auto",
47679
- cellContent: /*#__PURE__*/jsx(Button, {
47680
- className: modules_f6618a87.button,
47681
- size: "auto",
47682
- variant: "text",
47683
- disabled: !Expandable({
47684
- datum: datum,
47685
- index: _index
47686
- }),
47687
- onClick: function onClick() {
47688
- setExpanded(function (prev) {
47689
- return !prev;
47690
- });
47691
- },
47692
- leftComponent: function leftComponent() {
47693
- return /*#__PURE__*/jsx(Caret, {
47694
- className: modules_f6618a87.icon
47695
- });
47696
- }
47697
- })
47698
- }), tableCells]
47685
+ className: classes(className, modules_f6618a87.root, modules_f6618a87["".concat(type, "-row")], modules_f6618a87["row-height-".concat(rowHeight)]),
47686
+ children: tableCells
47699
47687
  }), Expandable && expanded && /*#__PURE__*/jsx("tr", {
47700
47688
  children: /*#__PURE__*/jsx(Expandable, {
47701
47689
  datum: datum,
@@ -47761,13 +47749,16 @@ var TableBody = function TableBody(props) {
47761
47749
  var key = datum === null || datum === void 0 ? void 0 : datum.uuid;
47762
47750
  var setActiveId = function setActiveId() {
47763
47751
  var reset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
47752
+ var multiSelect = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
47764
47753
  if (reset) {
47765
47754
  listRef.current[_index].removeAttribute('data-active');
47766
47755
  } else {
47767
- var _listRef$current;
47768
- (_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.forEach(function (elem) {
47769
- elem.removeAttribute('data-active');
47770
- });
47756
+ if (!multiSelect) {
47757
+ var _listRef$current;
47758
+ (_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.forEach(function (elem) {
47759
+ elem.removeAttribute('data-active');
47760
+ });
47761
+ }
47771
47762
  listRef.current[_index].setAttribute('data-active', true);
47772
47763
  }
47773
47764
  };