@7shifts/sous-chef 3.36.1 → 3.36.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/index.js +2 -12
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +2 -12
- package/dist/index.modern.js.map +1 -1
- package/dist/overlay/DropdownList/domain.d.ts +0 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -5771,13 +5771,6 @@ var getItemType = function getItemType(child) {
|
|
|
5771
5771
|
}
|
|
5772
5772
|
throw new Error('DropdownList - dropdown items should be using DropdownListDivider or DropdownListItem components');
|
|
5773
5773
|
};
|
|
5774
|
-
var calculateScrollYPosition = function calculateScrollYPosition(newFocusItem, lastFocusItem, paneScrollTop, maxPaneHeight, elementYPosition) {
|
|
5775
|
-
var directionCoeff = !lastFocusItem || newFocusItem > lastFocusItem ? -1 * maxPaneHeight : 0;
|
|
5776
|
-
if (elementYPosition > paneScrollTop + maxPaneHeight || elementYPosition < paneScrollTop) {
|
|
5777
|
-
return elementYPosition + directionCoeff;
|
|
5778
|
-
}
|
|
5779
|
-
return null;
|
|
5780
|
-
};
|
|
5781
5774
|
|
|
5782
5775
|
var DropdownList = function DropdownList(_ref) {
|
|
5783
5776
|
var testId = _ref.testId,
|
|
@@ -5800,10 +5793,7 @@ var DropdownList = function DropdownList(_ref) {
|
|
|
5800
5793
|
if (listRef.current && newFocusItem !== null && listRef.current.parentNode) {
|
|
5801
5794
|
var element = listRef.current.querySelector(":nth-child(" + (newFocusItem + 1) + ")");
|
|
5802
5795
|
var parentList = listRef.current.parentNode;
|
|
5803
|
-
|
|
5804
|
-
if (scrollYPosition !== null) {
|
|
5805
|
-
parentList.scrollTo(0, scrollYPosition);
|
|
5806
|
-
}
|
|
5796
|
+
parentList.scrollTo(0, element.offsetTop);
|
|
5807
5797
|
}
|
|
5808
5798
|
};
|
|
5809
5799
|
var _useListKeyboardNavig = useListKeyboardNavigation(items, listRef, {
|
|
@@ -9782,7 +9772,7 @@ var TimeFieldElement = function TimeFieldElement(_ref, forwardedRef) {
|
|
|
9782
9772
|
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$2H);
|
|
9783
9773
|
var internalRef = useRef(null);
|
|
9784
9774
|
var ref = forwardedRef || internalRef;
|
|
9785
|
-
var _useState = useState(allOtherProps.defaultValue),
|
|
9775
|
+
var _useState = useState(allOtherProps.value || allOtherProps.defaultValue),
|
|
9786
9776
|
selectedDropdownValue = _useState[0],
|
|
9787
9777
|
setSelectedDropdownValue = _useState[1];
|
|
9788
9778
|
var onOptionClick = function onOptionClick(option) {
|