@7shifts/sous-chef 3.40.3 → 3.41.1

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.
@@ -8857,6 +8857,7 @@ var DataTable$1 = function DataTable(_ref) {
8857
8857
  };
8858
8858
  var state = getDataTableState(isLoading, content.length);
8859
8859
  var skeletonRows = Array.from(Array(AMOUNT_OF_SKELETON_ROWS).keys());
8860
+ var isShowingContent = state === DATA_TABLE_STATES.CONTENT || state === DATA_TABLE_STATES.BACKGROUND_LOADING;
8860
8861
  return React__default.createElement(Context.Provider, {
8861
8862
  value: {
8862
8863
  columns: columns,
@@ -8884,11 +8885,11 @@ var DataTable$1 = function DataTable(_ref) {
8884
8885
  }, dataProps), columns && isShowingColumns && React__default.createElement(DataTableHeader, {
8885
8886
  columns: columns,
8886
8887
  onSort: onSort,
8887
- showActionMenu: showActionMenu
8888
+ showActionMenu: isShowingContent && showActionMenu
8888
8889
  }), React__default.createElement("tbody", {
8889
- className: classnames(styles$b['data-table__body'], (_classNames3 = {}, _classNames3[styles$b['data-table__body--no-bottom-radius']] = isShowingFooter, _classNames3)),
8890
+ className: classnames(styles$b['data-table__body'], (_classNames3 = {}, _classNames3[styles$b['data-table__body--no-bottom-radius']] = isShowingFooter && isShowingContent, _classNames3)),
8890
8891
  "data-testid": testId
8891
- }, (state === DATA_TABLE_STATES.CONTENT || state === DATA_TABLE_STATES.BACKGROUND_LOADING) && content.map(function (item, index) {
8892
+ }, isShowingContent && content.map(function (item, index) {
8892
8893
  return React__default.createElement(RowItem, {
8893
8894
  item: item,
8894
8895
  columns: columns,
@@ -8903,7 +8904,7 @@ var DataTable$1 = function DataTable(_ref) {
8903
8904
  return React__default.createElement(SkeletonRow, {
8904
8905
  key: index
8905
8906
  });
8906
- }))), isShowingFooter && (state === DATA_TABLE_STATES.CONTENT || state === DATA_TABLE_STATES.BACKGROUND_LOADING) && React__default.createElement("tfoot", {
8907
+ }))), isShowingFooter && isShowingContent && React__default.createElement("tfoot", {
8907
8908
  className: styles$b['data-table__footer'],
8908
8909
  "data-testid": testId && testId + "-footer"
8909
8910
  }, footerComponent)))), !isShowingFooter && isScrollableTable && React__default.createElement(DataTableScrollFakeBorder, {
@@ -9637,17 +9638,21 @@ var FormSection = function FormSection(_ref) {
9637
9638
  subtitle = _ref.subtitle,
9638
9639
  _ref$noMargin = _ref.noMargin,
9639
9640
  noMargin = _ref$noMargin === void 0 ? false : _ref$noMargin,
9640
- testId = _ref.testId;
9641
- return React__default.createElement("div", {
9642
- className: classnames(styles$W['form-section'], (_classnames = {}, _classnames[styles$W['form-section--no-margin']] = noMargin, _classnames)),
9643
- "data-testid": testId
9644
- }, React__default.createElement(Stack, null, React__default.createElement(Stack, {
9641
+ testId = _ref.testId,
9642
+ as = _ref.as;
9643
+ var content = React__default.createElement(Stack, null, React__default.createElement(Stack, {
9645
9644
  space: 8
9646
9645
  }, title && React__default.createElement("h2", {
9647
9646
  className: classnames(styles$W['form-section__title'])
9648
9647
  }, title), subtitle && React__default.createElement("h3", {
9649
9648
  className: classnames(styles$W['form-section__subtitle'])
9650
- }, subtitle)), children));
9649
+ }, subtitle)), children);
9650
+ return React__default.createElement("div", {
9651
+ className: classnames(styles$W['form-section'], (_classnames = {}, _classnames[styles$W['form-section--no-margin']] = noMargin || as === 'card', _classnames)),
9652
+ "data-testid": testId
9653
+ }, as === 'card' ? React__default.createElement(Card$1, {
9654
+ testId: testId && testId + "-card"
9655
+ }, content) : content);
9651
9656
  };
9652
9657
 
9653
9658
  var updateButtonProps$1 = function updateButtonProps(child, newProps) {