glints-aries 4.0.333 → 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.
@@ -18,6 +18,7 @@ export interface SelectProps {
18
18
  listHeight?: number;
19
19
  loadingOptions?: boolean;
20
20
  name?: string;
21
+ onBlur?: () => void;
21
22
  onClose?: () => void;
22
23
  onRemoveTag?({ option }: {
23
24
  option: string;
@@ -45,5 +46,5 @@ export interface SelectProps {
45
46
  /** sets z-index override for option list dropdown. z-index default to 400 */
46
47
  zIndexOverride?: number;
47
48
  }
48
- export declare const Select: ({ allowMultiple, customActivatorIcon, disabled, hasError, helpText, label, listHeight, loadingOptions, name, onClose, onRemoveTag, onSelect, onSelectClick, optionListFitContent, options, placeholder, prefix, searchable, searchableProps, scrollable, sections, selectedValues, width, zIndexOverride, }: SelectProps) => JSX.Element;
49
+ export declare const Select: ({ allowMultiple, customActivatorIcon, disabled, hasError, helpText, label, listHeight, loadingOptions, name, onBlur, onClose, onRemoveTag, onSelect, onSelectClick, optionListFitContent, options, placeholder, prefix, searchable, searchableProps, scrollable, sections, selectedValues, width, zIndexOverride, }: SelectProps) => JSX.Element;
49
50
  export {};
@@ -20,6 +20,7 @@ export var Select = function Select(_ref) {
20
20
  _ref$loadingOptions = _ref.loadingOptions,
21
21
  loadingOptions = _ref$loadingOptions === void 0 ? false : _ref$loadingOptions,
22
22
  name = _ref.name,
23
+ onBlur = _ref.onBlur,
23
24
  onClose = _ref.onClose,
24
25
  onRemoveTag = _ref.onRemoveTag,
25
26
  onSelect = _ref.onSelect,
@@ -113,6 +114,7 @@ export var Select = function Select(_ref) {
113
114
  placeholder: placeholder != null ? placeholder : 'Search',
114
115
  width: width,
115
116
  selectedValues: selectedValues,
117
+ onBlur: onBlur,
116
118
  onSelect: onSelect,
117
119
  onFocus: handleFocus,
118
120
  inputValue: inputValue,
@@ -133,6 +135,7 @@ export var Select = function Select(_ref) {
133
135
  disabled: disabled,
134
136
  hasError: hasError,
135
137
  placeholder: placeholder != null ? placeholder : 'Placeholder',
138
+ onBlur: onBlur,
136
139
  onRemoveTag: onRemoveTag,
137
140
  onSelectClick: handleSelectClick,
138
141
  width: width,
@@ -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) {
@@ -18,6 +18,7 @@ export interface SelectProps {
18
18
  listHeight?: number;
19
19
  loadingOptions?: boolean;
20
20
  name?: string;
21
+ onBlur?: () => void;
21
22
  onClose?: () => void;
22
23
  onRemoveTag?({ option }: {
23
24
  option: string;
@@ -45,5 +46,5 @@ export interface SelectProps {
45
46
  /** sets z-index override for option list dropdown. z-index default to 400 */
46
47
  zIndexOverride?: number;
47
48
  }
48
- export declare const Select: ({ allowMultiple, customActivatorIcon, disabled, hasError, helpText, label, listHeight, loadingOptions, name, onClose, onRemoveTag, onSelect, onSelectClick, optionListFitContent, options, placeholder, prefix, searchable, searchableProps, scrollable, sections, selectedValues, width, zIndexOverride, }: SelectProps) => JSX.Element;
49
+ export declare const Select: ({ allowMultiple, customActivatorIcon, disabled, hasError, helpText, label, listHeight, loadingOptions, name, onBlur, onClose, onRemoveTag, onSelect, onSelectClick, optionListFitContent, options, placeholder, prefix, searchable, searchableProps, scrollable, sections, selectedValues, width, zIndexOverride, }: SelectProps) => JSX.Element;
49
50
  export {};
@@ -26,6 +26,7 @@ var Select = function Select(_ref) {
26
26
  _ref$loadingOptions = _ref.loadingOptions,
27
27
  loadingOptions = _ref$loadingOptions === void 0 ? false : _ref$loadingOptions,
28
28
  name = _ref.name,
29
+ onBlur = _ref.onBlur,
29
30
  onClose = _ref.onClose,
30
31
  onRemoveTag = _ref.onRemoveTag,
31
32
  onSelect = _ref.onSelect,
@@ -119,6 +120,7 @@ var Select = function Select(_ref) {
119
120
  placeholder: placeholder != null ? placeholder : 'Search',
120
121
  width: width,
121
122
  selectedValues: selectedValues,
123
+ onBlur: onBlur,
122
124
  onSelect: onSelect,
123
125
  onFocus: handleFocus,
124
126
  inputValue: inputValue,
@@ -139,6 +141,7 @@ var Select = function Select(_ref) {
139
141
  disabled: disabled,
140
142
  hasError: hasError,
141
143
  placeholder: placeholder != null ? placeholder : 'Placeholder',
144
+ onBlur: onBlur,
142
145
  onRemoveTag: onRemoveTag,
143
146
  onSelectClick: handleSelectClick,
144
147
  width: width,
@@ -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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glints-aries",
3
- "version": "4.0.333",
3
+ "version": "4.0.335",
4
4
  "description": "Glints ui-kit for frontend",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./es/index.js",