@majoo-ui/react 1.59.10-rc.1 → 1.59.10-rc.3
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.
|
@@ -102,14 +102,14 @@ export declare const SelectBox: import("@stitches/react/types/styled-component")
|
|
|
102
102
|
align?: "stretch" | "center" | "end" | "start" | "baseline" | undefined;
|
|
103
103
|
justify?: "center" | "end" | "start" | "between" | "evenly" | "around" | undefined;
|
|
104
104
|
wrap?: "wrap" | "noWrap" | "wrapReverse" | undefined;
|
|
105
|
-
gap?: 1 |
|
|
106
|
-
m?: 1 |
|
|
107
|
-
mt?: 1 |
|
|
108
|
-
mb?: 1 |
|
|
109
|
-
mr?: 1 |
|
|
110
|
-
ml?: 1 |
|
|
111
|
-
mx?: 1 |
|
|
112
|
-
my?: 1 |
|
|
105
|
+
gap?: 1 | "1" | "2" | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | undefined;
|
|
106
|
+
m?: 1 | "1" | "2" | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | undefined;
|
|
107
|
+
mt?: 1 | "1" | "2" | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | undefined;
|
|
108
|
+
mb?: 1 | "1" | "2" | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | undefined;
|
|
109
|
+
mr?: 1 | "1" | "2" | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | undefined;
|
|
110
|
+
ml?: 1 | "1" | "2" | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | undefined;
|
|
111
|
+
mx?: 1 | "1" | "2" | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | undefined;
|
|
112
|
+
my?: 1 | "1" | "2" | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | undefined;
|
|
113
113
|
mobileOnly?: boolean | "true" | undefined;
|
|
114
114
|
desktopOnly?: boolean | "true" | undefined;
|
|
115
115
|
}, {
|
package/index.esm.js
CHANGED
|
@@ -12986,6 +12986,9 @@ const SelectInputSearch$1 = /*#__PURE__*/React.forwardRef((_a, forwardedRef) =>
|
|
|
12986
12986
|
}, void 0)]
|
|
12987
12987
|
}), void 0);
|
|
12988
12988
|
});
|
|
12989
|
+
function isHTMLElement(element) {
|
|
12990
|
+
return 'offsetTop' in element;
|
|
12991
|
+
}
|
|
12989
12992
|
const InputSelect = /*#__PURE__*/React.forwardRef((_a, ref) => {
|
|
12990
12993
|
var {
|
|
12991
12994
|
option,
|
|
@@ -13047,8 +13050,8 @@ const InputSelect = /*#__PURE__*/React.forwardRef((_a, ref) => {
|
|
|
13047
13050
|
}
|
|
13048
13051
|
const scrollToSelectedElement = () => {
|
|
13049
13052
|
const element = document.querySelector(`[data-index="${selectedIndex}"]`);
|
|
13050
|
-
|
|
13051
|
-
|
|
13053
|
+
const scrollContainer = scrollerRef.current;
|
|
13054
|
+
if (element && isHTMLElement(element) && scrollContainer) {
|
|
13052
13055
|
const elementPosition = element.offsetTop - scrollContainer.offsetTop;
|
|
13053
13056
|
scrollContainer.scrollTop = elementPosition;
|
|
13054
13057
|
}
|
package/index.umd.js
CHANGED
|
@@ -13074,6 +13074,9 @@
|
|
|
13074
13074
|
}, void 0)]
|
|
13075
13075
|
}), void 0);
|
|
13076
13076
|
});
|
|
13077
|
+
function isHTMLElement(element) {
|
|
13078
|
+
return 'offsetTop' in element;
|
|
13079
|
+
}
|
|
13077
13080
|
var InputSelect = /*#__PURE__*/React__namespace.forwardRef(function (_a, ref) {
|
|
13078
13081
|
var option = _a.option,
|
|
13079
13082
|
onChange = _a.onChange,
|
|
@@ -13164,8 +13167,8 @@
|
|
|
13164
13167
|
}
|
|
13165
13168
|
var scrollToSelectedElement = function scrollToSelectedElement() {
|
|
13166
13169
|
var element = document.querySelector("[data-index=\"".concat(selectedIndex, "\"]"));
|
|
13167
|
-
|
|
13168
|
-
|
|
13170
|
+
var scrollContainer = scrollerRef.current;
|
|
13171
|
+
if (element && isHTMLElement(element) && scrollContainer) {
|
|
13169
13172
|
var elementPosition = element.offsetTop - scrollContainer.offsetTop;
|
|
13170
13173
|
scrollContainer.scrollTop = elementPosition;
|
|
13171
13174
|
}
|