@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.modern.js
CHANGED
|
@@ -8983,7 +8983,7 @@ const useLocalStorage = (key, initialValue) => {
|
|
|
8983
8983
|
|
|
8984
8984
|
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"};
|
|
8985
8985
|
|
|
8986
|
-
const _excluded$h = ["header", "children", "mediaUrl", "onClose", "modalId", "primaryButton", "secondaryButton", "testId"];
|
|
8986
|
+
const _excluded$h = ["header", "children", "mediaUrl", "onClose", "modalId", "primaryButton", "secondaryButton", "testId", "onSetDoNotShowAgainStatus"];
|
|
8987
8987
|
const HintModal = _ref => {
|
|
8988
8988
|
let {
|
|
8989
8989
|
header,
|
|
@@ -8993,26 +8993,33 @@ const HintModal = _ref => {
|
|
|
8993
8993
|
modalId,
|
|
8994
8994
|
primaryButton,
|
|
8995
8995
|
secondaryButton,
|
|
8996
|
-
testId
|
|
8996
|
+
testId,
|
|
8997
|
+
onSetDoNotShowAgainStatus
|
|
8997
8998
|
} = _ref,
|
|
8998
8999
|
positionProps = _objectWithoutPropertiesLoose(_ref, _excluded$h);
|
|
8999
9000
|
const __ = useTranslation('HintModal');
|
|
9000
9001
|
const [doNotShowAgain, setDoNotShowAgain] = useState(false);
|
|
9001
9002
|
const [persistedDoNotShow, setPersistedDoNotShow] = useLocalStorage(modalId, false);
|
|
9003
|
+
const persistDoNotShowAgain = value => {
|
|
9004
|
+
setPersistedDoNotShow(value);
|
|
9005
|
+
if (onSetDoNotShowAgainStatus) {
|
|
9006
|
+
onSetDoNotShowAgainStatus(value);
|
|
9007
|
+
}
|
|
9008
|
+
};
|
|
9002
9009
|
const primaryButtonUpdated = updateButtonProps$1(primaryButton, {
|
|
9003
9010
|
theme: primaryButton.props.theme || 'primary',
|
|
9004
9011
|
size: BUTTON_SIZES.MIN_WIDTH_100,
|
|
9005
9012
|
onClick: () => {
|
|
9006
|
-
|
|
9007
|
-
primaryButton.props.onClick();
|
|
9013
|
+
persistDoNotShowAgain(doNotShowAgain);
|
|
9014
|
+
primaryButton.props.onClick(doNotShowAgain);
|
|
9008
9015
|
}
|
|
9009
9016
|
});
|
|
9010
9017
|
const secondaryButtonUpdated = secondaryButton ? updateButtonProps$1(secondaryButton, {
|
|
9011
9018
|
theme: secondaryButton.props.theme || 'default',
|
|
9012
9019
|
size: BUTTON_SIZES.MIN_WIDTH_100,
|
|
9013
9020
|
onClick: () => {
|
|
9014
|
-
|
|
9015
|
-
secondaryButton.props.onClick();
|
|
9021
|
+
persistDoNotShowAgain(doNotShowAgain);
|
|
9022
|
+
secondaryButton.props.onClick(doNotShowAgain);
|
|
9016
9023
|
}
|
|
9017
9024
|
}) : undefined;
|
|
9018
9025
|
const positionStyles = usePositionStyles(positionProps);
|
|
@@ -9022,7 +9029,7 @@ const HintModal = _ref => {
|
|
|
9022
9029
|
})
|
|
9023
9030
|
};
|
|
9024
9031
|
const handleOnClose = () => {
|
|
9025
|
-
|
|
9032
|
+
persistDoNotShowAgain(doNotShowAgain);
|
|
9026
9033
|
onClose();
|
|
9027
9034
|
};
|
|
9028
9035
|
return React__default.createElement(ReactModal, {
|
|
@@ -14566,7 +14573,7 @@ const EMPTY_STATE_SIZE = {
|
|
|
14566
14573
|
LARGE: 'large'
|
|
14567
14574
|
};
|
|
14568
14575
|
|
|
14569
|
-
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--
|
|
14576
|
+
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"};
|
|
14570
14577
|
|
|
14571
14578
|
const EmptyStateContainerInline = ({
|
|
14572
14579
|
header,
|
|
@@ -14589,8 +14596,8 @@ const EmptyStateContainerInline = ({
|
|
|
14589
14596
|
"data-testid": testId
|
|
14590
14597
|
}, React__default.createElement("div", {
|
|
14591
14598
|
className: classnames(styles$2['empty-state-container-inline__content'], {
|
|
14592
|
-
[styles$2['empty-state-
|
|
14593
|
-
[styles$2['empty-state-
|
|
14599
|
+
[styles$2['empty-state-container-inline__content--large']]: _size === EMPTY_STATE_SIZE.LARGE,
|
|
14600
|
+
[styles$2['empty-state-container-inline__content--medium']]: _size === EMPTY_STATE_SIZE.MEDIUM
|
|
14594
14601
|
})
|
|
14595
14602
|
}, React__default.createElement(Stack, {
|
|
14596
14603
|
space: 8
|
|
@@ -14611,14 +14618,13 @@ const EmptyStateContainerInline = ({
|
|
|
14611
14618
|
}), caption && React__default.createElement(Text, {
|
|
14612
14619
|
as: "caption"
|
|
14613
14620
|
}, caption))), mediaUrl && React__default.createElement("div", {
|
|
14614
|
-
className: styles$2['empty-state-container-inline__image']
|
|
14621
|
+
className: classnames(styles$2['empty-state-container-inline__image'], {
|
|
14622
|
+
[styles$2['empty-state-container-inline__image--large']]: _size === EMPTY_STATE_SIZE.LARGE,
|
|
14623
|
+
[styles$2['empty-state-container-inline__image--medium']]: _size === EMPTY_STATE_SIZE.MEDIUM
|
|
14624
|
+
})
|
|
14615
14625
|
}, React__default.createElement("img", {
|
|
14616
14626
|
src: mediaUrl,
|
|
14617
|
-
alt: String(title)
|
|
14618
|
-
style: {
|
|
14619
|
-
maxWidth: _size === EMPTY_STATE_SIZE.LARGE ? '500px' : '333px',
|
|
14620
|
-
minWidth: '320px'
|
|
14621
|
-
}
|
|
14627
|
+
alt: String(title)
|
|
14622
14628
|
})));
|
|
14623
14629
|
};
|
|
14624
14630
|
|