@7shifts/sous-chef 3.54.0 → 3.55.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.
@@ -8,7 +8,7 @@ export type EmptyStateProps = {
8
8
  /** Sets the body text */
9
9
  children?: ReactNode;
10
10
  /** Path to the image/gif to display */
11
- mediaUrl: string;
11
+ mediaUrl?: string;
12
12
  /** Caption that appears below the CTAs */
13
13
  actions?: {
14
14
  primary?: React.ReactElement;
package/dist/index.js CHANGED
@@ -8922,7 +8922,7 @@ var EmptyStateContainerStack = function EmptyStateContainerStack(_ref) {
8922
8922
  return React__default.createElement("div", {
8923
8923
  className: styles$N['empty-state-container-stack'],
8924
8924
  "data-testid": testId
8925
- }, mediaComponent ? mediaComponent : React__default.createElement("img", {
8925
+ }, mediaComponent ? mediaComponent : mediaUrl && React__default.createElement("img", {
8926
8926
  src: mediaUrl,
8927
8927
  alt: String(title),
8928
8928
  width: "200px"
@@ -13360,17 +13360,21 @@ var PILL_THEME = {
13360
13360
  UPSELL: 'upsell'
13361
13361
  };
13362
13362
 
13363
- var Pill = function Pill(_ref) {
13363
+ var _excluded$2P = ["children", "theme", "testId"];
13364
+ var PillElement = function PillElement(_ref, forwardedRef) {
13364
13365
  var _classnames;
13365
13366
  var children = _ref.children,
13366
13367
  _ref$theme = _ref.theme,
13367
13368
  theme = _ref$theme === void 0 ? PILL_THEME.DEFAULT : _ref$theme,
13368
- testId = _ref.testId;
13369
- return React__default.createElement("div", {
13369
+ testId = _ref.testId,
13370
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded$2P);
13371
+ return React__default.createElement("div", _extends({
13370
13372
  "data-testid": testId,
13373
+ ref: forwardedRef,
13371
13374
  className: classnames(styles$1i['pill'], (_classnames = {}, _classnames[styles$1i['pill--default']] = theme === PILL_THEME.DEFAULT, _classnames[styles$1i['pill--warning']] = theme === PILL_THEME.WARNING, _classnames[styles$1i['pill--success']] = theme === PILL_THEME.SUCCESS, _classnames[styles$1i['pill--danger']] = theme === PILL_THEME.DANGER, _classnames[styles$1i['pill--info']] = theme === PILL_THEME.INFO, _classnames[styles$1i['pill--upsell']] = theme === PILL_THEME.UPSELL, _classnames))
13372
- }, children);
13375
+ }, rest), children);
13373
13376
  };
13377
+ var Pill = React.forwardRef(PillElement);
13374
13378
 
13375
13379
  var EMPTY_STATE_SIZE = {
13376
13380
  SMALL: 'small',
@@ -13418,7 +13422,7 @@ var EmptyStateContainerInline = function EmptyStateContainerInline(_ref) {
13418
13422
  isInsideModal: isInsideModal
13419
13423
  }), caption && React__default.createElement(Text, {
13420
13424
  as: "caption"
13421
- }, caption))), React__default.createElement("div", {
13425
+ }, caption))), mediaUrl && React__default.createElement("div", {
13422
13426
  className: styles$1j['empty-state-container-inline__image']
13423
13427
  }, React__default.createElement("img", {
13424
13428
  src: mediaUrl,