@nulogy/components 8.7.0 → 8.7.2
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/main.js
CHANGED
|
@@ -25772,6 +25772,8 @@
|
|
|
25772
25772
|
focusedIndex = _useState[0],
|
|
25773
25773
|
setFocusedIndex = _useState[1];
|
|
25774
25774
|
|
|
25775
|
+
var prevFocusedIndex = React.useRef(focusedIndex);
|
|
25776
|
+
|
|
25775
25777
|
var focusPrevious = function focusPrevious() {
|
|
25776
25778
|
setFocusedIndex(function (prevFocusedIndex) {
|
|
25777
25779
|
return (prevFocusedIndex - 1 + refs.length) % refs.length;
|
|
@@ -25803,7 +25805,10 @@
|
|
|
25803
25805
|
refs[focusedIndex].focus();
|
|
25804
25806
|
};
|
|
25805
25807
|
|
|
25806
|
-
|
|
25808
|
+
if (prevFocusedIndex.current !== focusedIndex) {
|
|
25809
|
+
updateFocused();
|
|
25810
|
+
prevFocusedIndex.current = focusedIndex;
|
|
25811
|
+
}
|
|
25807
25812
|
}, [focusedIndex, refs]);
|
|
25808
25813
|
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, children({
|
|
25809
25814
|
focusedIndex: focusedIndex,
|
|
@@ -41040,8 +41045,8 @@
|
|
|
41040
41045
|
};
|
|
41041
41046
|
});
|
|
41042
41047
|
|
|
41043
|
-
var DEFAULT_DATE_FORMAT = "dd
|
|
41044
|
-
var DEFAULT_PLACEHOLDER$1 = "DD
|
|
41048
|
+
var DEFAULT_DATE_FORMAT = "yyyy-MMM-dd";
|
|
41049
|
+
var DEFAULT_PLACEHOLDER$1 = "YYYY-Mon-DD";
|
|
41045
41050
|
var DatePicker = /*#__PURE__*/React.forwardRef(function (_a, datePickerRef) {
|
|
41046
41051
|
var _a$dateFormat = _a.dateFormat,
|
|
41047
41052
|
dateFormat = _a$dateFormat === void 0 ? DEFAULT_DATE_FORMAT : _a$dateFormat,
|
package/dist/main.module.js
CHANGED
|
@@ -25746,6 +25746,8 @@ var FocusManager = function FocusManager(_ref) {
|
|
|
25746
25746
|
focusedIndex = _useState[0],
|
|
25747
25747
|
setFocusedIndex = _useState[1];
|
|
25748
25748
|
|
|
25749
|
+
var prevFocusedIndex = useRef(focusedIndex);
|
|
25750
|
+
|
|
25749
25751
|
var focusPrevious = function focusPrevious() {
|
|
25750
25752
|
setFocusedIndex(function (prevFocusedIndex) {
|
|
25751
25753
|
return (prevFocusedIndex - 1 + refs.length) % refs.length;
|
|
@@ -25777,7 +25779,10 @@ var FocusManager = function FocusManager(_ref) {
|
|
|
25777
25779
|
refs[focusedIndex].focus();
|
|
25778
25780
|
};
|
|
25779
25781
|
|
|
25780
|
-
|
|
25782
|
+
if (prevFocusedIndex.current !== focusedIndex) {
|
|
25783
|
+
updateFocused();
|
|
25784
|
+
prevFocusedIndex.current = focusedIndex;
|
|
25785
|
+
}
|
|
25781
25786
|
}, [focusedIndex, refs]);
|
|
25782
25787
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, children({
|
|
25783
25788
|
focusedIndex: focusedIndex,
|
|
@@ -41014,8 +41019,8 @@ var DatePickerStyles = createGlobalStyle(function (_ref) {
|
|
|
41014
41019
|
};
|
|
41015
41020
|
});
|
|
41016
41021
|
|
|
41017
|
-
var DEFAULT_DATE_FORMAT = "dd
|
|
41018
|
-
var DEFAULT_PLACEHOLDER$1 = "DD
|
|
41022
|
+
var DEFAULT_DATE_FORMAT = "yyyy-MMM-dd";
|
|
41023
|
+
var DEFAULT_PLACEHOLDER$1 = "YYYY-Mon-DD";
|
|
41019
41024
|
var DatePicker = /*#__PURE__*/forwardRef(function (_a, datePickerRef) {
|
|
41020
41025
|
var _a$dateFormat = _a.dateFormat,
|
|
41021
41026
|
dateFormat = _a$dateFormat === void 0 ? DEFAULT_DATE_FORMAT : _a$dateFormat,
|