@7shifts/sous-chef 3.40.2 → 3.41.0

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.
@@ -8697,7 +8697,8 @@ var EmptyStateContainerStack = function EmptyStateContainerStack(_ref) {
8697
8697
  color: isPaywall ? 'eggplant-500' : 'tangerine-400'
8698
8698
  }, header), React__default.createElement(Text, {
8699
8699
  emphasis: "bold",
8700
- as: "body"
8700
+ as: "body",
8701
+ alignment: "center"
8701
8702
  }, title), React__default.createElement("div", {
8702
8703
  className: styles$N['empty-state-container-stack__body']
8703
8704
  }, children)), React__default.createElement(Stack, {
@@ -8856,6 +8857,7 @@ var DataTable$1 = function DataTable(_ref) {
8856
8857
  };
8857
8858
  var state = getDataTableState(isLoading, content.length);
8858
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;
8859
8861
  return React__default.createElement(Context.Provider, {
8860
8862
  value: {
8861
8863
  columns: columns,
@@ -8883,11 +8885,11 @@ var DataTable$1 = function DataTable(_ref) {
8883
8885
  }, dataProps), columns && isShowingColumns && React__default.createElement(DataTableHeader, {
8884
8886
  columns: columns,
8885
8887
  onSort: onSort,
8886
- showActionMenu: showActionMenu
8888
+ showActionMenu: isShowingContent && showActionMenu
8887
8889
  }), React__default.createElement("tbody", {
8888
- 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)),
8889
8891
  "data-testid": testId
8890
- }, (state === DATA_TABLE_STATES.CONTENT || state === DATA_TABLE_STATES.BACKGROUND_LOADING) && content.map(function (item, index) {
8892
+ }, isShowingContent && content.map(function (item, index) {
8891
8893
  return React__default.createElement(RowItem, {
8892
8894
  item: item,
8893
8895
  columns: columns,
@@ -8902,7 +8904,7 @@ var DataTable$1 = function DataTable(_ref) {
8902
8904
  return React__default.createElement(SkeletonRow, {
8903
8905
  key: index
8904
8906
  });
8905
- }))), isShowingFooter && React__default.createElement("tfoot", {
8907
+ }))), isShowingFooter && isShowingContent && React__default.createElement("tfoot", {
8906
8908
  className: styles$b['data-table__footer'],
8907
8909
  "data-testid": testId && testId + "-footer"
8908
8910
  }, footerComponent)))), !isShowingFooter && isScrollableTable && React__default.createElement(DataTableScrollFakeBorder, {
@@ -9636,17 +9638,21 @@ var FormSection = function FormSection(_ref) {
9636
9638
  subtitle = _ref.subtitle,
9637
9639
  _ref$noMargin = _ref.noMargin,
9638
9640
  noMargin = _ref$noMargin === void 0 ? false : _ref$noMargin,
9639
- testId = _ref.testId;
9640
- return React__default.createElement("div", {
9641
- className: classnames(styles$W['form-section'], (_classnames = {}, _classnames[styles$W['form-section--no-margin']] = noMargin, _classnames)),
9642
- "data-testid": testId
9643
- }, 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, {
9644
9644
  space: 8
9645
9645
  }, title && React__default.createElement("h2", {
9646
9646
  className: classnames(styles$W['form-section__title'])
9647
9647
  }, title), subtitle && React__default.createElement("h3", {
9648
9648
  className: classnames(styles$W['form-section__subtitle'])
9649
- }, 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);
9650
9656
  };
9651
9657
 
9652
9658
  var updateButtonProps$1 = function updateButtonProps(child, newProps) {