glints-aries 4.0.334 → 4.0.335
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/es/@next/Select/components/Activator/ActivatorTextInput.d.ts +1 -1
- package/es/@next/Select/components/Activator/ActivatorTextInput.js +4 -1
- package/es/@next/Select/components/SearchableSelectInput/SearchableSelectInput.js +4 -2
- package/lib/@next/Select/components/Activator/ActivatorTextInput.d.ts +1 -1
- package/lib/@next/Select/components/Activator/ActivatorTextInput.js +4 -1
- package/lib/@next/Select/components/SearchableSelectInput/SearchableSelectInput.js +4 -2
- package/package.json +1 -1
|
@@ -19,4 +19,4 @@ export interface ActivatorTextInputProps extends Omit<TextInputProps, 'onChange'
|
|
|
19
19
|
options?: Option[];
|
|
20
20
|
updateMenuOptions?: (newState: Option[]) => void;
|
|
21
21
|
}
|
|
22
|
-
export declare const ActivatorTextInput: ({ allowMultiple, disabled, hasError, onChange, onFocus, onSelect, prefix, selectedValues, width, inputValue, updateInputValue, options, updateMenuOptions, ...props }: ActivatorTextInputProps) => JSX.Element;
|
|
22
|
+
export declare const ActivatorTextInput: ({ allowMultiple, disabled, hasError, onChange, onBlur, onFocus, onSelect, prefix, selectedValues, width, inputValue, updateInputValue, options, updateMenuOptions, ...props }: ActivatorTextInputProps) => JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
|
-
var _excluded = ["allowMultiple", "disabled", "hasError", "onChange", "onFocus", "onSelect", "prefix", "selectedValues", "width", "inputValue", "updateInputValue", "options", "updateMenuOptions"];
|
|
3
|
+
var _excluded = ["allowMultiple", "disabled", "hasError", "onChange", "onBlur", "onFocus", "onSelect", "prefix", "selectedValues", "width", "inputValue", "updateInputValue", "options", "updateMenuOptions"];
|
|
4
4
|
import React, { useEffect, useRef, useState } from 'react';
|
|
5
5
|
import { Icon } from '../../../Icon';
|
|
6
6
|
import { SearchableSelectInput } from '../SearchableSelectInput/SearchableSelectInput';
|
|
@@ -12,6 +12,7 @@ export var ActivatorTextInput = function ActivatorTextInput(_ref) {
|
|
|
12
12
|
_ref$hasError = _ref.hasError,
|
|
13
13
|
hasError = _ref$hasError === void 0 ? false : _ref$hasError,
|
|
14
14
|
onChange = _ref.onChange,
|
|
15
|
+
onBlur = _ref.onBlur,
|
|
15
16
|
onFocus = _ref.onFocus,
|
|
16
17
|
onSelect = _ref.onSelect,
|
|
17
18
|
_ref$prefix = _ref.prefix,
|
|
@@ -63,6 +64,7 @@ export var ActivatorTextInput = function ActivatorTextInput(_ref) {
|
|
|
63
64
|
value: value
|
|
64
65
|
});
|
|
65
66
|
},
|
|
67
|
+
onBlur: onBlur,
|
|
66
68
|
onFocus: onFocus,
|
|
67
69
|
error: hasError,
|
|
68
70
|
disabled: disabled,
|
|
@@ -71,6 +73,7 @@ export var ActivatorTextInput = function ActivatorTextInput(_ref) {
|
|
|
71
73
|
ref: activatorRef,
|
|
72
74
|
prefix: prefix,
|
|
73
75
|
filterOptions: filterOptions,
|
|
76
|
+
onBlur: onBlur,
|
|
74
77
|
onFocus: onFocus,
|
|
75
78
|
onInputChange: onChange,
|
|
76
79
|
onSelect: onSelect,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
|
-
var _excluded = ["disabled", "error", "filterOptions", "onSelect", "placeholder", "prefix", "selectedValue", "width", "inputValue", "updateInputValue", "onInputChange", "onFocus", "searchableSelectState", "updateSearchableSelectState", "options", "updateMenuOptions"];
|
|
3
|
+
var _excluded = ["disabled", "error", "filterOptions", "onSelect", "placeholder", "prefix", "selectedValue", "width", "inputValue", "updateInputValue", "onInputChange", "onBlur", "onFocus", "searchableSelectState", "updateSearchableSelectState", "options", "updateMenuOptions"];
|
|
4
4
|
import React, { forwardRef, useEffect, useRef, useState } from 'react';
|
|
5
5
|
import { StyledInput, StyledPrefixContainer } from '../../../Input/InputStyle';
|
|
6
6
|
import { ClearSelected } from './ClearSelected';
|
|
@@ -19,6 +19,7 @@ export var SearchableSelectInput = /*#__PURE__*/forwardRef(function SearchableSe
|
|
|
19
19
|
inputValue = _ref.inputValue,
|
|
20
20
|
updateInputValue = _ref.updateInputValue,
|
|
21
21
|
onInputChange = _ref.onInputChange,
|
|
22
|
+
onBlur = _ref.onBlur,
|
|
22
23
|
onFocus = _ref.onFocus,
|
|
23
24
|
_ref$searchableSelect = _ref.searchableSelectState,
|
|
24
25
|
showInput = _ref$searchableSelect.showInput,
|
|
@@ -78,7 +79,7 @@ export var SearchableSelectInput = /*#__PURE__*/forwardRef(function SearchableSe
|
|
|
78
79
|
updateInputValue('');
|
|
79
80
|
updateMenuOptions(options);
|
|
80
81
|
};
|
|
81
|
-
var handleInputBlur = function handleInputBlur() {
|
|
82
|
+
var handleInputBlur = function handleInputBlur(e) {
|
|
82
83
|
if (disabled) return;
|
|
83
84
|
setIsSelectedClicked(false);
|
|
84
85
|
if (selectedValue) {
|
|
@@ -92,6 +93,7 @@ export var SearchableSelectInput = /*#__PURE__*/forwardRef(function SearchableSe
|
|
|
92
93
|
});
|
|
93
94
|
}, 100);
|
|
94
95
|
}
|
|
96
|
+
onBlur == null ? void 0 : onBlur(e);
|
|
95
97
|
};
|
|
96
98
|
useEffect(function () {
|
|
97
99
|
if (isSelectedClicked && showInput) {
|
|
@@ -19,4 +19,4 @@ export interface ActivatorTextInputProps extends Omit<TextInputProps, 'onChange'
|
|
|
19
19
|
options?: Option[];
|
|
20
20
|
updateMenuOptions?: (newState: Option[]) => void;
|
|
21
21
|
}
|
|
22
|
-
export declare const ActivatorTextInput: ({ allowMultiple, disabled, hasError, onChange, onFocus, onSelect, prefix, selectedValues, width, inputValue, updateInputValue, options, updateMenuOptions, ...props }: ActivatorTextInputProps) => JSX.Element;
|
|
22
|
+
export declare const ActivatorTextInput: ({ allowMultiple, disabled, hasError, onChange, onBlur, onFocus, onSelect, prefix, selectedValues, width, inputValue, updateInputValue, options, updateMenuOptions, ...props }: ActivatorTextInputProps) => JSX.Element;
|
|
@@ -9,7 +9,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
var _Icon = require("../../../Icon");
|
|
10
10
|
var _SearchableSelectInput = require("../SearchableSelectInput/SearchableSelectInput");
|
|
11
11
|
var _ActivatorStyle = require("./ActivatorStyle");
|
|
12
|
-
var _excluded = ["allowMultiple", "disabled", "hasError", "onChange", "onFocus", "onSelect", "prefix", "selectedValues", "width", "inputValue", "updateInputValue", "options", "updateMenuOptions"];
|
|
12
|
+
var _excluded = ["allowMultiple", "disabled", "hasError", "onChange", "onBlur", "onFocus", "onSelect", "prefix", "selectedValues", "width", "inputValue", "updateInputValue", "options", "updateMenuOptions"];
|
|
13
13
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
14
14
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
15
|
var ActivatorTextInput = function ActivatorTextInput(_ref) {
|
|
@@ -19,6 +19,7 @@ var ActivatorTextInput = function ActivatorTextInput(_ref) {
|
|
|
19
19
|
_ref$hasError = _ref.hasError,
|
|
20
20
|
hasError = _ref$hasError === void 0 ? false : _ref$hasError,
|
|
21
21
|
onChange = _ref.onChange,
|
|
22
|
+
onBlur = _ref.onBlur,
|
|
22
23
|
onFocus = _ref.onFocus,
|
|
23
24
|
onSelect = _ref.onSelect,
|
|
24
25
|
_ref$prefix = _ref.prefix,
|
|
@@ -70,6 +71,7 @@ var ActivatorTextInput = function ActivatorTextInput(_ref) {
|
|
|
70
71
|
value: value
|
|
71
72
|
});
|
|
72
73
|
},
|
|
74
|
+
onBlur: onBlur,
|
|
73
75
|
onFocus: onFocus,
|
|
74
76
|
error: hasError,
|
|
75
77
|
disabled: disabled,
|
|
@@ -78,6 +80,7 @@ var ActivatorTextInput = function ActivatorTextInput(_ref) {
|
|
|
78
80
|
ref: activatorRef,
|
|
79
81
|
prefix: prefix,
|
|
80
82
|
filterOptions: filterOptions,
|
|
83
|
+
onBlur: onBlur,
|
|
81
84
|
onFocus: onFocus,
|
|
82
85
|
onInputChange: onChange,
|
|
83
86
|
onSelect: onSelect,
|
|
@@ -9,7 +9,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
var _InputStyle = require("../../../Input/InputStyle");
|
|
10
10
|
var _ClearSelected = require("./ClearSelected");
|
|
11
11
|
var _SearchableSelectInputStyle = require("./SearchableSelectInputStyle");
|
|
12
|
-
var _excluded = ["disabled", "error", "filterOptions", "onSelect", "placeholder", "prefix", "selectedValue", "width", "inputValue", "updateInputValue", "onInputChange", "onFocus", "searchableSelectState", "updateSearchableSelectState", "options", "updateMenuOptions"];
|
|
12
|
+
var _excluded = ["disabled", "error", "filterOptions", "onSelect", "placeholder", "prefix", "selectedValue", "width", "inputValue", "updateInputValue", "onInputChange", "onBlur", "onFocus", "searchableSelectState", "updateSearchableSelectState", "options", "updateMenuOptions"];
|
|
13
13
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
14
14
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
15
|
var SearchableSelectInput = /*#__PURE__*/(0, _react.forwardRef)(function SearchableSelectInput(_ref, ref) {
|
|
@@ -26,6 +26,7 @@ var SearchableSelectInput = /*#__PURE__*/(0, _react.forwardRef)(function Searcha
|
|
|
26
26
|
inputValue = _ref.inputValue,
|
|
27
27
|
updateInputValue = _ref.updateInputValue,
|
|
28
28
|
onInputChange = _ref.onInputChange,
|
|
29
|
+
onBlur = _ref.onBlur,
|
|
29
30
|
onFocus = _ref.onFocus,
|
|
30
31
|
_ref$searchableSelect = _ref.searchableSelectState,
|
|
31
32
|
showInput = _ref$searchableSelect.showInput,
|
|
@@ -85,7 +86,7 @@ var SearchableSelectInput = /*#__PURE__*/(0, _react.forwardRef)(function Searcha
|
|
|
85
86
|
updateInputValue('');
|
|
86
87
|
updateMenuOptions(options);
|
|
87
88
|
};
|
|
88
|
-
var handleInputBlur = function handleInputBlur() {
|
|
89
|
+
var handleInputBlur = function handleInputBlur(e) {
|
|
89
90
|
if (disabled) return;
|
|
90
91
|
setIsSelectedClicked(false);
|
|
91
92
|
if (selectedValue) {
|
|
@@ -99,6 +100,7 @@ var SearchableSelectInput = /*#__PURE__*/(0, _react.forwardRef)(function Searcha
|
|
|
99
100
|
});
|
|
100
101
|
}, 100);
|
|
101
102
|
}
|
|
103
|
+
onBlur == null ? void 0 : onBlur(e);
|
|
102
104
|
};
|
|
103
105
|
(0, _react.useEffect)(function () {
|
|
104
106
|
if (isSelectedClicked && showInput) {
|