@majoo-ui/react 1.57.4 → 1.57.5
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 | HTMLButtonElement>>;
|
|
591
591
|
export declare type Option = {
|
|
592
592
|
value: string;
|
|
593
593
|
name: string;
|
|
@@ -709,5 +709,5 @@ interface InputSelectProps extends Omit<DownshiftProps<Option>, 'initialSelected
|
|
|
709
709
|
*/
|
|
710
710
|
renderFooter?: () => React.ReactNode;
|
|
711
711
|
}
|
|
712
|
-
|
|
712
|
+
declare const InputSelect: React.ForwardRefExoticComponent<InputSelectProps & React.RefAttributes<HTMLInputElement | HTMLButtonElement>>;
|
|
713
713
|
export default InputSelect;
|
package/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import React__default, { useState, createContext, useContext, useEffect, useRef, useCallback, cloneElement, createElement as createElement$2,
|
|
2
|
+
import React__default, { useState, createContext, useContext, useEffect, useRef, useCallback, cloneElement, forwardRef, createElement as createElement$2, 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';
|
|
@@ -9125,7 +9125,7 @@ const SelectInputSearch = /*#__PURE__*/React.forwardRef((_a, forwardedRef) => {
|
|
|
9125
9125
|
}, void 0)]
|
|
9126
9126
|
}), void 0);
|
|
9127
9127
|
});
|
|
9128
|
-
|
|
9128
|
+
const InputSelect = /*#__PURE__*/forwardRef((_a, ref) => {
|
|
9129
9129
|
var {
|
|
9130
9130
|
option,
|
|
9131
9131
|
onChange,
|
|
@@ -9206,7 +9206,7 @@ function InputSelect(_a) {
|
|
|
9206
9206
|
setItem(generatedOption);
|
|
9207
9207
|
setOptions(generatedOption);
|
|
9208
9208
|
}, [option, disabledOptions, valueSelector, textSelector]);
|
|
9209
|
-
const debouncedSearch = React.useRef(debounce(query => __awaiter(
|
|
9209
|
+
const debouncedSearch = React.useRef(debounce(query => __awaiter(void 0, void 0, void 0, function* () {
|
|
9210
9210
|
setQuery(query);
|
|
9211
9211
|
if (onSearch) onSearch(query);
|
|
9212
9212
|
}), 1000)).current;
|
|
@@ -9292,6 +9292,7 @@ function InputSelect(_a) {
|
|
|
9292
9292
|
}
|
|
9293
9293
|
}, {
|
|
9294
9294
|
children: jsx(SelectInputSearch, {
|
|
9295
|
+
ref: ref,
|
|
9295
9296
|
showLeadingIcon: showLeadingIcon,
|
|
9296
9297
|
showClearIcon: hideArrowicon,
|
|
9297
9298
|
disabled: disabled,
|
|
@@ -9316,6 +9317,7 @@ function InputSelect(_a) {
|
|
|
9316
9317
|
}), void 0) : jsx(Button$3, Object.assign({}, getToggleButtonProps({
|
|
9317
9318
|
disabled: disabled || readOnly
|
|
9318
9319
|
}), {
|
|
9320
|
+
ref: ref,
|
|
9319
9321
|
disabled: disabled,
|
|
9320
9322
|
size: size,
|
|
9321
9323
|
readOnly: readOnly,
|
|
@@ -9474,7 +9476,7 @@ function InputSelect(_a) {
|
|
|
9474
9476
|
}), void 0);
|
|
9475
9477
|
}
|
|
9476
9478
|
}), void 0);
|
|
9477
|
-
}
|
|
9479
|
+
});
|
|
9478
9480
|
|
|
9479
9481
|
var tryToString$3 = tryToString$5;
|
|
9480
9482
|
|
|
@@ -16857,7 +16859,7 @@ function InputTimePicker({
|
|
|
16857
16859
|
defaultValue: defaultValue,
|
|
16858
16860
|
onChange: () => {},
|
|
16859
16861
|
isPicker: true,
|
|
16860
|
-
|
|
16862
|
+
autoComplete: "false"
|
|
16861
16863
|
// tabIndex="-1"
|
|
16862
16864
|
,
|
|
16863
16865
|
__self: this,
|
|
@@ -17569,7 +17571,7 @@ function InputDateRangePicker(props) {
|
|
|
17569
17571
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
17570
17572
|
onChange: () => {},
|
|
17571
17573
|
isPicker: true,
|
|
17572
|
-
|
|
17574
|
+
autoComplete: "false"
|
|
17573
17575
|
}, void 0)]
|
|
17574
17576
|
}), void 0);
|
|
17575
17577
|
}
|
|
@@ -17674,7 +17676,7 @@ function InputDatePicker({
|
|
|
17674
17676
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
17675
17677
|
onChange: () => {},
|
|
17676
17678
|
isPicker: true,
|
|
17677
|
-
|
|
17679
|
+
autoComplete: "false"
|
|
17678
17680
|
}, void 0)]
|
|
17679
17681
|
}), void 0);
|
|
17680
17682
|
} else {
|
package/index.umd.js
CHANGED
|
@@ -9197,8 +9197,7 @@
|
|
|
9197
9197
|
}, void 0)]
|
|
9198
9198
|
}), void 0);
|
|
9199
9199
|
});
|
|
9200
|
-
|
|
9201
|
-
var _this = this;
|
|
9200
|
+
var InputSelect = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
9202
9201
|
var option = _a.option,
|
|
9203
9202
|
onChange = _a.onChange,
|
|
9204
9203
|
value = _a.value,
|
|
@@ -9311,7 +9310,7 @@
|
|
|
9311
9310
|
setOptions(generatedOption);
|
|
9312
9311
|
}, [option, disabledOptions, valueSelector, textSelector]);
|
|
9313
9312
|
var debouncedSearch = React__namespace.useRef(debounce__default["default"](function (query) {
|
|
9314
|
-
return __awaiter(
|
|
9313
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
9315
9314
|
return __generator(this, function (_a) {
|
|
9316
9315
|
setQuery(query);
|
|
9317
9316
|
if (onSearch) onSearch(query);
|
|
@@ -9406,6 +9405,7 @@
|
|
|
9406
9405
|
}
|
|
9407
9406
|
}, {
|
|
9408
9407
|
children: jsxRuntime.jsx(SelectInputSearch, {
|
|
9408
|
+
ref: ref,
|
|
9409
9409
|
showLeadingIcon: showLeadingIcon,
|
|
9410
9410
|
showClearIcon: hideArrowicon,
|
|
9411
9411
|
disabled: disabled,
|
|
@@ -9430,6 +9430,7 @@
|
|
|
9430
9430
|
}), void 0) : jsxRuntime.jsx(Button$3, __assign({}, getToggleButtonProps({
|
|
9431
9431
|
disabled: disabled || readOnly
|
|
9432
9432
|
}), {
|
|
9433
|
+
ref: ref,
|
|
9433
9434
|
disabled: disabled,
|
|
9434
9435
|
size: size,
|
|
9435
9436
|
readOnly: readOnly,
|
|
@@ -9592,7 +9593,7 @@
|
|
|
9592
9593
|
}), void 0);
|
|
9593
9594
|
}
|
|
9594
9595
|
}), void 0);
|
|
9595
|
-
}
|
|
9596
|
+
});
|
|
9596
9597
|
|
|
9597
9598
|
var tryToString$3 = tryToString$5;
|
|
9598
9599
|
|
|
@@ -17106,7 +17107,7 @@
|
|
|
17106
17107
|
defaultValue: defaultValue,
|
|
17107
17108
|
onChange: () => {},
|
|
17108
17109
|
isPicker: true,
|
|
17109
|
-
|
|
17110
|
+
autoComplete: "false"
|
|
17110
17111
|
// tabIndex="-1"
|
|
17111
17112
|
,
|
|
17112
17113
|
__self: this,
|
|
@@ -17826,7 +17827,7 @@
|
|
|
17826
17827
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
17827
17828
|
onChange: function () {},
|
|
17828
17829
|
isPicker: true,
|
|
17829
|
-
|
|
17830
|
+
autoComplete: "false"
|
|
17830
17831
|
}, void 0)]
|
|
17831
17832
|
}), void 0);
|
|
17832
17833
|
}
|
|
@@ -17939,7 +17940,7 @@
|
|
|
17939
17940
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
17940
17941
|
onChange: function () {},
|
|
17941
17942
|
isPicker: true,
|
|
17942
|
-
|
|
17943
|
+
autoComplete: "false"
|
|
17943
17944
|
}, void 0)]
|
|
17944
17945
|
}), void 0);
|
|
17945
17946
|
} else {
|