@7shifts/sous-chef 3.77.0 → 3.78.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.
- package/dist/index.css +10 -4
- package/dist/index.css.map +1 -1
- package/dist/index.js +18 -15
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +22 -16
- package/dist/index.modern.js.map +1 -1
- package/dist/overlay/HintModal/HintModal.d.ts +2 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8813,7 +8813,7 @@ var useLocalStorage = function useLocalStorage(key, initialValue) {
|
|
|
8813
8813
|
|
|
8814
8814
|
var styles$L = {"hint-modal":"_NwD6V","hint-modal--after-open":"_4ofZb","hint-modal--before-close":"_hGoMD","hint-modal__overlay":"_iK5zl","hint-modal__image":"_V9hLa","hint-modal__body":"_oOqUg","hint-modal__close-button":"_5zcBK"};
|
|
8815
8815
|
|
|
8816
|
-
var _excluded$h = ["header", "children", "mediaUrl", "onClose", "modalId", "primaryButton", "secondaryButton", "testId"];
|
|
8816
|
+
var _excluded$h = ["header", "children", "mediaUrl", "onClose", "modalId", "primaryButton", "secondaryButton", "testId", "onSetDoNotShowAgainStatus"];
|
|
8817
8817
|
var HintModal = function HintModal(_ref) {
|
|
8818
8818
|
var header = _ref.header,
|
|
8819
8819
|
children = _ref.children,
|
|
@@ -8823,6 +8823,7 @@ var HintModal = function HintModal(_ref) {
|
|
|
8823
8823
|
primaryButton = _ref.primaryButton,
|
|
8824
8824
|
secondaryButton = _ref.secondaryButton,
|
|
8825
8825
|
testId = _ref.testId,
|
|
8826
|
+
onSetDoNotShowAgainStatus = _ref.onSetDoNotShowAgainStatus,
|
|
8826
8827
|
positionProps = _objectWithoutPropertiesLoose(_ref, _excluded$h);
|
|
8827
8828
|
var __ = useTranslation('HintModal');
|
|
8828
8829
|
var _useState = React.useState(false),
|
|
@@ -8831,20 +8832,26 @@ var HintModal = function HintModal(_ref) {
|
|
|
8831
8832
|
var _useLocalStorage = useLocalStorage(modalId, false),
|
|
8832
8833
|
persistedDoNotShow = _useLocalStorage[0],
|
|
8833
8834
|
setPersistedDoNotShow = _useLocalStorage[1];
|
|
8835
|
+
var persistDoNotShowAgain = function persistDoNotShowAgain(value) {
|
|
8836
|
+
setPersistedDoNotShow(value);
|
|
8837
|
+
if (onSetDoNotShowAgainStatus) {
|
|
8838
|
+
onSetDoNotShowAgainStatus(value);
|
|
8839
|
+
}
|
|
8840
|
+
};
|
|
8834
8841
|
var primaryButtonUpdated = updateButtonProps$1(primaryButton, {
|
|
8835
8842
|
theme: primaryButton.props.theme || 'primary',
|
|
8836
8843
|
size: BUTTON_SIZES.MIN_WIDTH_100,
|
|
8837
8844
|
onClick: function onClick() {
|
|
8838
|
-
|
|
8839
|
-
primaryButton.props.onClick();
|
|
8845
|
+
persistDoNotShowAgain(doNotShowAgain);
|
|
8846
|
+
primaryButton.props.onClick(doNotShowAgain);
|
|
8840
8847
|
}
|
|
8841
8848
|
});
|
|
8842
8849
|
var secondaryButtonUpdated = secondaryButton ? updateButtonProps$1(secondaryButton, {
|
|
8843
8850
|
theme: secondaryButton.props.theme || 'default',
|
|
8844
8851
|
size: BUTTON_SIZES.MIN_WIDTH_100,
|
|
8845
8852
|
onClick: function onClick() {
|
|
8846
|
-
|
|
8847
|
-
secondaryButton.props.onClick();
|
|
8853
|
+
persistDoNotShowAgain(doNotShowAgain);
|
|
8854
|
+
secondaryButton.props.onClick(doNotShowAgain);
|
|
8848
8855
|
}
|
|
8849
8856
|
}) : undefined;
|
|
8850
8857
|
var positionStyles = usePositionStyles(positionProps);
|
|
@@ -8854,7 +8861,7 @@ var HintModal = function HintModal(_ref) {
|
|
|
8854
8861
|
})
|
|
8855
8862
|
};
|
|
8856
8863
|
var handleOnClose = function handleOnClose() {
|
|
8857
|
-
|
|
8864
|
+
persistDoNotShowAgain(doNotShowAgain);
|
|
8858
8865
|
onClose();
|
|
8859
8866
|
};
|
|
8860
8867
|
return React__default["default"].createElement(ReactModal__default["default"], {
|
|
@@ -14470,10 +14477,10 @@ var EMPTY_STATE_SIZE = {
|
|
|
14470
14477
|
LARGE: 'large'
|
|
14471
14478
|
};
|
|
14472
14479
|
|
|
14473
|
-
var styles$2 = {"empty-state-container-inline":"_mhyqH","empty-state-container-inline--inside-modal":"_Kiu3T","empty-state-container-inline__content":"_Px6C0","empty-state-container-inline__content--
|
|
14480
|
+
var styles$2 = {"empty-state-container-inline":"_mhyqH","empty-state-container-inline--inside-modal":"_Kiu3T","empty-state-container-inline__content":"_Px6C0","empty-state-container-inline__content--large":"_voA-r","empty-state-container-inline__content--medium":"_Q9cut","empty-state-container-inline__body":"_xMUQ6","empty-state-container-inline__image":"_79QnQ","empty-state-container-inline__image--large":"_HxPhH","empty-state-container-inline__image--medium":"_TeUmg"};
|
|
14474
14481
|
|
|
14475
14482
|
var EmptyStateContainerInline = function EmptyStateContainerInline(_ref) {
|
|
14476
|
-
var _classNames, _classnames;
|
|
14483
|
+
var _classNames, _classnames, _classnames2;
|
|
14477
14484
|
var header = _ref.header,
|
|
14478
14485
|
title = _ref.title,
|
|
14479
14486
|
children = _ref.children,
|
|
@@ -14491,7 +14498,7 @@ var EmptyStateContainerInline = function EmptyStateContainerInline(_ref) {
|
|
|
14491
14498
|
className: classnames__default["default"](styles$2['empty-state-container-inline'], (_classNames = {}, _classNames[styles$2['empty-state-container-inline--inside-modal']] = isInsideModal, _classNames)),
|
|
14492
14499
|
"data-testid": testId
|
|
14493
14500
|
}, React__default["default"].createElement("div", {
|
|
14494
|
-
className: classnames__default["default"](styles$2['empty-state-container-inline__content'], (_classnames = {}, _classnames[styles$2['empty-state-
|
|
14501
|
+
className: classnames__default["default"](styles$2['empty-state-container-inline__content'], (_classnames = {}, _classnames[styles$2['empty-state-container-inline__content--large']] = size === EMPTY_STATE_SIZE.LARGE, _classnames[styles$2['empty-state-container-inline__content--medium']] = size === EMPTY_STATE_SIZE.MEDIUM, _classnames))
|
|
14495
14502
|
}, React__default["default"].createElement(Stack, {
|
|
14496
14503
|
space: 8
|
|
14497
14504
|
}, header && React__default["default"].createElement(Text, {
|
|
@@ -14511,14 +14518,10 @@ var EmptyStateContainerInline = function EmptyStateContainerInline(_ref) {
|
|
|
14511
14518
|
}), caption && React__default["default"].createElement(Text, {
|
|
14512
14519
|
as: "caption"
|
|
14513
14520
|
}, caption))), mediaUrl && React__default["default"].createElement("div", {
|
|
14514
|
-
className: styles$2['empty-state-container-inline__image']
|
|
14521
|
+
className: classnames__default["default"](styles$2['empty-state-container-inline__image'], (_classnames2 = {}, _classnames2[styles$2['empty-state-container-inline__image--large']] = size === EMPTY_STATE_SIZE.LARGE, _classnames2[styles$2['empty-state-container-inline__image--medium']] = size === EMPTY_STATE_SIZE.MEDIUM, _classnames2))
|
|
14515
14522
|
}, React__default["default"].createElement("img", {
|
|
14516
14523
|
src: mediaUrl,
|
|
14517
|
-
alt: String(title)
|
|
14518
|
-
style: {
|
|
14519
|
-
maxWidth: size === EMPTY_STATE_SIZE.LARGE ? '500px' : '333px',
|
|
14520
|
-
minWidth: '320px'
|
|
14521
|
-
}
|
|
14524
|
+
alt: String(title)
|
|
14522
14525
|
})));
|
|
14523
14526
|
};
|
|
14524
14527
|
|