@7shifts/sous-chef 3.66.0 → 3.67.1-beta.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/i18n/locales/en.json +1 -1
- package/dist/index.js +27 -12
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +27 -12
- 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
|
@@ -5988,7 +5988,7 @@ var SelectField$1 = {
|
|
|
5988
5988
|
createButton: "Create"
|
|
5989
5989
|
};
|
|
5990
5990
|
var HintModal$1 = {
|
|
5991
|
-
dontShowAgainLabel: "Don
|
|
5991
|
+
dontShowAgainLabel: "Don't remind me again"
|
|
5992
5992
|
};
|
|
5993
5993
|
var Calendar$1 = {
|
|
5994
5994
|
sunday: "Sunday",
|
|
@@ -8783,7 +8783,7 @@ var useLocalStorage = function useLocalStorage(key, initialValue) {
|
|
|
8783
8783
|
|
|
8784
8784
|
var styles$F = {"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"};
|
|
8785
8785
|
|
|
8786
|
-
var _excluded$g = ["header", "children", "mediaUrl", "onClose", "modalId", "primaryButton", "testId"];
|
|
8786
|
+
var _excluded$g = ["header", "children", "mediaUrl", "onClose", "modalId", "primaryButton", "secondaryButton", "testId"];
|
|
8787
8787
|
var HintModal = function HintModal(_ref) {
|
|
8788
8788
|
var header = _ref.header,
|
|
8789
8789
|
children = _ref.children,
|
|
@@ -8791,6 +8791,7 @@ var HintModal = function HintModal(_ref) {
|
|
|
8791
8791
|
onClose = _ref.onClose,
|
|
8792
8792
|
modalId = _ref.modalId,
|
|
8793
8793
|
primaryButton = _ref.primaryButton,
|
|
8794
|
+
secondaryButton = _ref.secondaryButton,
|
|
8794
8795
|
testId = _ref.testId,
|
|
8795
8796
|
positionProps = _objectWithoutPropertiesLoose(_ref, _excluded$g);
|
|
8796
8797
|
var __ = useTranslation('HintModal');
|
|
@@ -8800,7 +8801,7 @@ var HintModal = function HintModal(_ref) {
|
|
|
8800
8801
|
var _useLocalStorage = useLocalStorage(modalId, false),
|
|
8801
8802
|
persistedDoNotShow = _useLocalStorage[0],
|
|
8802
8803
|
setPersistedDoNotShow = _useLocalStorage[1];
|
|
8803
|
-
var
|
|
8804
|
+
var primaryButtonUpdated = updateButtonProps$1(primaryButton, {
|
|
8804
8805
|
theme: primaryButton.props.theme || 'primary',
|
|
8805
8806
|
size: BUTTON_SIZES.MIN_WIDTH_100,
|
|
8806
8807
|
onClick: function onClick() {
|
|
@@ -8808,6 +8809,14 @@ var HintModal = function HintModal(_ref) {
|
|
|
8808
8809
|
primaryButton.props.onClick();
|
|
8809
8810
|
}
|
|
8810
8811
|
});
|
|
8812
|
+
var secondaryButtonUpdated = secondaryButton ? updateButtonProps$1(secondaryButton, {
|
|
8813
|
+
theme: secondaryButton.props.theme || 'default',
|
|
8814
|
+
size: BUTTON_SIZES.MIN_WIDTH_100,
|
|
8815
|
+
onClick: function onClick() {
|
|
8816
|
+
setPersistedDoNotShow(doNotShowAgain);
|
|
8817
|
+
secondaryButton.props.onClick();
|
|
8818
|
+
}
|
|
8819
|
+
}) : undefined;
|
|
8811
8820
|
var positionStyles = usePositionStyles(positionProps);
|
|
8812
8821
|
var style = {
|
|
8813
8822
|
overlay: _extends({}, positionStyles, {
|
|
@@ -8852,9 +8861,8 @@ var HintModal = function HintModal(_ref) {
|
|
|
8852
8861
|
space: 8
|
|
8853
8862
|
}, React__default["default"].createElement(Text, {
|
|
8854
8863
|
as: "h3"
|
|
8855
|
-
}, header), React__default["default"].createElement(Text, null, children)), React__default["default"].createElement(
|
|
8856
|
-
|
|
8857
|
-
justifyContent: "space-between"
|
|
8864
|
+
}, header), React__default["default"].createElement(Text, null, children)), React__default["default"].createElement(Stack, {
|
|
8865
|
+
space: 32
|
|
8858
8866
|
}, React__default["default"].createElement(CheckboxField, {
|
|
8859
8867
|
name: "hint-modal-do-not-show-checkbox",
|
|
8860
8868
|
checked: doNotShowAgain,
|
|
@@ -8862,7 +8870,11 @@ var HintModal = function HintModal(_ref) {
|
|
|
8862
8870
|
onChange: function onChange() {
|
|
8863
8871
|
return setDoNotShowAgain(!doNotShowAgain);
|
|
8864
8872
|
}
|
|
8865
|
-
}),
|
|
8873
|
+
}), React__default["default"].createElement(Inline, {
|
|
8874
|
+
alignItems: "center",
|
|
8875
|
+
justifyContent: "end",
|
|
8876
|
+
space: 8
|
|
8877
|
+
}, secondaryButtonUpdated, primaryButtonUpdated)))));
|
|
8866
8878
|
};
|
|
8867
8879
|
|
|
8868
8880
|
var DataTableCellElement = function DataTableCellElement(_ref, ref) {
|
|
@@ -11627,11 +11639,14 @@ var DateField = function DateField(_ref) {
|
|
|
11627
11639
|
setInputValue(event.target.value);
|
|
11628
11640
|
},
|
|
11629
11641
|
onBlur: function onBlur(event) {
|
|
11630
|
-
|
|
11631
|
-
|
|
11632
|
-
|
|
11633
|
-
|
|
11634
|
-
|
|
11642
|
+
// This is to give some time for calendar click to set the date value. Otherwise, this `undefined` will override the selected date in mobile devices.
|
|
11643
|
+
setTimeout(function () {
|
|
11644
|
+
controllers.onBlur();
|
|
11645
|
+
if (event.target.value === '') {
|
|
11646
|
+
// @ts-expect-error the types will be changed on the next major release https://github.com/7shifts/sous-chef/pull/356
|
|
11647
|
+
controllers.onChange(undefined);
|
|
11648
|
+
}
|
|
11649
|
+
}, 10);
|
|
11635
11650
|
},
|
|
11636
11651
|
maxLength: format.length,
|
|
11637
11652
|
value: inputValue
|