@majoo-ui/react 1.57.9-rc.2 → 1.57.9-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.
|
@@ -587,7 +587,7 @@ export declare const SelectItem: import("@stitches/react/types/styled-component"
|
|
|
587
587
|
backgroundColor: string;
|
|
588
588
|
};
|
|
589
589
|
}>>;
|
|
590
|
-
export declare const SelectInputSearch: React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<HTMLInputElement
|
|
590
|
+
export declare const SelectInputSearch: React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<HTMLInputElement>>;
|
|
591
591
|
export declare type Option = {
|
|
592
592
|
value: string;
|
|
593
593
|
name: string;
|
|
@@ -713,5 +713,5 @@ interface InputSelectProps extends Omit<DownshiftProps<Option>, 'initialSelected
|
|
|
713
713
|
*/
|
|
714
714
|
renderFooter?: () => React.ReactNode;
|
|
715
715
|
}
|
|
716
|
-
declare
|
|
716
|
+
export declare function InputSelect({ option, onChange, value, placeholder, searchPlaceholder, embedSearch, size, disabled, search, iconColor, hideArrowicon, showLeadingIcon, placement, disabledOptions, textSelector, valueSelector, readOnly, isInvalid, noOptionIcon, fetchData, onSearch, isLoading, showTooltip, css, renderFooter, optionCss, ...props }: InputSelectProps): JSX.Element;
|
|
717
717
|
export default InputSelect;
|
package/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import React__default, { useState, useEffect, createContext, useContext, useRef, useCallback, cloneElement,
|
|
2
|
+
import React__default, { useState, useEffect, createContext, useContext, useRef, useCallback, cloneElement, createElement as createElement$2, forwardRef, useLayoutEffect, useReducer, useMemo, memo } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { createStitches, styled as styled$1 } from '@stitches/react';
|
|
5
5
|
import { foundations } from '@majoo-ui/core';
|
|
@@ -9097,7 +9097,7 @@ const SelectInputSearch = /*#__PURE__*/React.forwardRef((_a, forwardedRef) => {
|
|
|
9097
9097
|
}, void 0)]
|
|
9098
9098
|
}), void 0);
|
|
9099
9099
|
});
|
|
9100
|
-
|
|
9100
|
+
function InputSelect(_a) {
|
|
9101
9101
|
var {
|
|
9102
9102
|
option,
|
|
9103
9103
|
onChange,
|
|
@@ -9179,7 +9179,7 @@ const InputSelect = /*#__PURE__*/forwardRef((_a, ref) => {
|
|
|
9179
9179
|
setItem(generatedOption);
|
|
9180
9180
|
setOptions(generatedOption);
|
|
9181
9181
|
}, [option, disabledOptions, valueSelector, textSelector]);
|
|
9182
|
-
const debouncedSearch = React.useRef(debounce(query => __awaiter(
|
|
9182
|
+
const debouncedSearch = React.useRef(debounce(query => __awaiter(this, void 0, void 0, function* () {
|
|
9183
9183
|
setQuery(query);
|
|
9184
9184
|
if (onSearch) onSearch(query);
|
|
9185
9185
|
}), 1000)).current;
|
|
@@ -9265,7 +9265,6 @@ const InputSelect = /*#__PURE__*/forwardRef((_a, ref) => {
|
|
|
9265
9265
|
}
|
|
9266
9266
|
}, {
|
|
9267
9267
|
children: jsx(SelectInputSearch, {
|
|
9268
|
-
ref: ref,
|
|
9269
9268
|
showLeadingIcon: showLeadingIcon,
|
|
9270
9269
|
showClearIcon: hideArrowicon,
|
|
9271
9270
|
disabled: disabled,
|
|
@@ -9290,7 +9289,6 @@ const InputSelect = /*#__PURE__*/forwardRef((_a, ref) => {
|
|
|
9290
9289
|
}), void 0) : jsx(Button$3, Object.assign({}, getToggleButtonProps({
|
|
9291
9290
|
disabled: disabled || readOnly
|
|
9292
9291
|
}), {
|
|
9293
|
-
ref: ref,
|
|
9294
9292
|
disabled: disabled,
|
|
9295
9293
|
size: size,
|
|
9296
9294
|
readOnly: readOnly,
|
|
@@ -9449,7 +9447,7 @@ const InputSelect = /*#__PURE__*/forwardRef((_a, ref) => {
|
|
|
9449
9447
|
}), void 0);
|
|
9450
9448
|
}
|
|
9451
9449
|
}), void 0);
|
|
9452
|
-
}
|
|
9450
|
+
}
|
|
9453
9451
|
|
|
9454
9452
|
var tryToString$3 = tryToString$5;
|
|
9455
9453
|
|
package/index.umd.js
CHANGED
|
@@ -9179,7 +9179,8 @@
|
|
|
9179
9179
|
}, void 0)]
|
|
9180
9180
|
}), void 0);
|
|
9181
9181
|
});
|
|
9182
|
-
|
|
9182
|
+
function InputSelect(_a) {
|
|
9183
|
+
var _this = this;
|
|
9183
9184
|
var option = _a.option,
|
|
9184
9185
|
onChange = _a.onChange,
|
|
9185
9186
|
value = _a.value,
|
|
@@ -9293,7 +9294,7 @@
|
|
|
9293
9294
|
setOptions(generatedOption);
|
|
9294
9295
|
}, [option, disabledOptions, valueSelector, textSelector]);
|
|
9295
9296
|
var debouncedSearch = React__namespace.useRef(debounce__default["default"](function (query) {
|
|
9296
|
-
return __awaiter(
|
|
9297
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
9297
9298
|
return __generator(this, function (_a) {
|
|
9298
9299
|
setQuery(query);
|
|
9299
9300
|
if (onSearch) onSearch(query);
|
|
@@ -9388,7 +9389,6 @@
|
|
|
9388
9389
|
}
|
|
9389
9390
|
}, {
|
|
9390
9391
|
children: jsxRuntime.jsx(SelectInputSearch, {
|
|
9391
|
-
ref: ref,
|
|
9392
9392
|
showLeadingIcon: showLeadingIcon,
|
|
9393
9393
|
showClearIcon: hideArrowicon,
|
|
9394
9394
|
disabled: disabled,
|
|
@@ -9413,7 +9413,6 @@
|
|
|
9413
9413
|
}), void 0) : jsxRuntime.jsx(Button$3, __assign({}, getToggleButtonProps({
|
|
9414
9414
|
disabled: disabled || readOnly
|
|
9415
9415
|
}), {
|
|
9416
|
-
ref: ref,
|
|
9417
9416
|
disabled: disabled,
|
|
9418
9417
|
size: size,
|
|
9419
9418
|
readOnly: readOnly,
|
|
@@ -9576,7 +9575,7 @@
|
|
|
9576
9575
|
}), void 0);
|
|
9577
9576
|
}
|
|
9578
9577
|
}), void 0);
|
|
9579
|
-
}
|
|
9578
|
+
}
|
|
9580
9579
|
|
|
9581
9580
|
var tryToString$3 = tryToString$5;
|
|
9582
9581
|
|