glints-aries 4.0.238 → 4.0.239
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/Select.d.ts +2 -1
- package/es/@next/Select/Select.js +2 -0
- package/es/@next/Select/Select.stories.d.ts +1 -0
- package/es/@next/Select/components/Activator/ActivatorTextInput.d.ts +1 -1
- package/es/@next/Select/components/Activator/ActivatorTextInput.js +6 -4
- package/lib/@next/Select/Select.d.ts +2 -1
- package/lib/@next/Select/Select.js +2 -0
- package/lib/@next/Select/Select.stories.d.ts +1 -0
- package/lib/@next/Select/components/Activator/ActivatorTextInput.d.ts +1 -1
- package/lib/@next/Select/components/Activator/ActivatorTextInput.js +6 -4
- package/package.json +1 -1
|
@@ -23,6 +23,7 @@ export interface SelectProps {
|
|
|
23
23
|
}): void;
|
|
24
24
|
options?: Option[];
|
|
25
25
|
placeholder?: string;
|
|
26
|
+
prefix?: React.ReactNode;
|
|
26
27
|
/** sets whether to be able to type in to search from the options*/
|
|
27
28
|
searchableProps?: SearchableProps;
|
|
28
29
|
/** true = Allow vertical scroll, default by 6 options. */
|
|
@@ -32,5 +33,5 @@ export interface SelectProps {
|
|
|
32
33
|
/** sets a width for the Select component*/
|
|
33
34
|
width: string;
|
|
34
35
|
}
|
|
35
|
-
export declare const Select: ({ allowMultiple, disabled, hasError, helpText, label, onClose, onRemoveTag, onSelect, options, placeholder, listHeight, searchableProps, scrollable, sections, selectedValues, width, }: SelectProps) => JSX.Element;
|
|
36
|
+
export declare const Select: ({ allowMultiple, disabled, hasError, helpText, label, onClose, onRemoveTag, onSelect, options, placeholder, listHeight, prefix, searchableProps, scrollable, sections, selectedValues, width, }: SelectProps) => JSX.Element;
|
|
36
37
|
export {};
|
|
@@ -20,6 +20,7 @@ export var Select = function Select(_ref) {
|
|
|
20
20
|
options = _ref.options,
|
|
21
21
|
placeholder = _ref.placeholder,
|
|
22
22
|
listHeight = _ref.listHeight,
|
|
23
|
+
prefix = _ref.prefix,
|
|
23
24
|
searchableProps = _ref.searchableProps,
|
|
24
25
|
scrollable = _ref.scrollable,
|
|
25
26
|
sections = _ref.sections,
|
|
@@ -79,6 +80,7 @@ export var Select = function Select(_ref) {
|
|
|
79
80
|
value: inputValue,
|
|
80
81
|
onChange: _onInputChange,
|
|
81
82
|
placeholder: placeholder != null ? placeholder : 'Search',
|
|
83
|
+
prefix: prefix,
|
|
82
84
|
width: width
|
|
83
85
|
}));
|
|
84
86
|
}
|
|
@@ -5,4 +5,4 @@ export interface ActivatorTextInputProps extends Omit<TextInputProps, 'onChange'
|
|
|
5
5
|
onChange?(value: string): void;
|
|
6
6
|
width?: string;
|
|
7
7
|
}
|
|
8
|
-
export declare const ActivatorTextInput: ({ onChange, value, width, ...props }: ActivatorTextInputProps) => JSX.Element;
|
|
8
|
+
export declare const ActivatorTextInput: ({ onChange, prefix, value, width, ...props }: ActivatorTextInputProps) => JSX.Element;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
|
-
var _excluded = ["onChange", "value", "width"];
|
|
3
|
+
var _excluded = ["onChange", "prefix", "value", "width"];
|
|
4
4
|
import React, { useRef } from 'react';
|
|
5
5
|
import { Icon } from '../../../Icon';
|
|
6
6
|
import { useActivatorTextInput } from './ActivatorContext';
|
|
7
7
|
import { StyledTextInput } from './ActivatorStyle';
|
|
8
8
|
export var ActivatorTextInput = function ActivatorTextInput(_ref) {
|
|
9
9
|
var onChange = _ref.onChange,
|
|
10
|
+
_ref$prefix = _ref.prefix,
|
|
11
|
+
prefix = _ref$prefix === void 0 ? /*#__PURE__*/React.createElement(Icon, {
|
|
12
|
+
name: "ri-search"
|
|
13
|
+
}) : _ref$prefix,
|
|
10
14
|
value = _ref.value,
|
|
11
15
|
width = _ref.width,
|
|
12
16
|
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
@@ -21,9 +25,7 @@ export var ActivatorTextInput = function ActivatorTextInput(_ref) {
|
|
|
21
25
|
};
|
|
22
26
|
return /*#__PURE__*/React.createElement(StyledTextInput, _extends({}, props, {
|
|
23
27
|
ref: activatorRef,
|
|
24
|
-
prefix:
|
|
25
|
-
name: "ri-search"
|
|
26
|
-
}),
|
|
28
|
+
prefix: prefix,
|
|
27
29
|
value: value,
|
|
28
30
|
onChange: function onChange(value) {
|
|
29
31
|
return handleChange({
|
|
@@ -23,6 +23,7 @@ export interface SelectProps {
|
|
|
23
23
|
}): void;
|
|
24
24
|
options?: Option[];
|
|
25
25
|
placeholder?: string;
|
|
26
|
+
prefix?: React.ReactNode;
|
|
26
27
|
/** sets whether to be able to type in to search from the options*/
|
|
27
28
|
searchableProps?: SearchableProps;
|
|
28
29
|
/** true = Allow vertical scroll, default by 6 options. */
|
|
@@ -32,5 +33,5 @@ export interface SelectProps {
|
|
|
32
33
|
/** sets a width for the Select component*/
|
|
33
34
|
width: string;
|
|
34
35
|
}
|
|
35
|
-
export declare const Select: ({ allowMultiple, disabled, hasError, helpText, label, onClose, onRemoveTag, onSelect, options, placeholder, listHeight, searchableProps, scrollable, sections, selectedValues, width, }: SelectProps) => JSX.Element;
|
|
36
|
+
export declare const Select: ({ allowMultiple, disabled, hasError, helpText, label, onClose, onRemoveTag, onSelect, options, placeholder, listHeight, prefix, searchableProps, scrollable, sections, selectedValues, width, }: SelectProps) => JSX.Element;
|
|
36
37
|
export {};
|
|
@@ -26,6 +26,7 @@ var Select = function Select(_ref) {
|
|
|
26
26
|
options = _ref.options,
|
|
27
27
|
placeholder = _ref.placeholder,
|
|
28
28
|
listHeight = _ref.listHeight,
|
|
29
|
+
prefix = _ref.prefix,
|
|
29
30
|
searchableProps = _ref.searchableProps,
|
|
30
31
|
scrollable = _ref.scrollable,
|
|
31
32
|
sections = _ref.sections,
|
|
@@ -85,6 +86,7 @@ var Select = function Select(_ref) {
|
|
|
85
86
|
value: inputValue,
|
|
86
87
|
onChange: _onInputChange,
|
|
87
88
|
placeholder: placeholder != null ? placeholder : 'Search',
|
|
89
|
+
prefix: prefix,
|
|
88
90
|
width: width
|
|
89
91
|
}));
|
|
90
92
|
}
|
|
@@ -5,4 +5,4 @@ export interface ActivatorTextInputProps extends Omit<TextInputProps, 'onChange'
|
|
|
5
5
|
onChange?(value: string): void;
|
|
6
6
|
width?: string;
|
|
7
7
|
}
|
|
8
|
-
export declare const ActivatorTextInput: ({ onChange, value, width, ...props }: ActivatorTextInputProps) => JSX.Element;
|
|
8
|
+
export declare const ActivatorTextInput: ({ onChange, prefix, value, width, ...props }: ActivatorTextInputProps) => JSX.Element;
|
|
@@ -9,11 +9,15 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
var _Icon = require("../../../Icon");
|
|
10
10
|
var _ActivatorContext = require("./ActivatorContext");
|
|
11
11
|
var _ActivatorStyle = require("./ActivatorStyle");
|
|
12
|
-
var _excluded = ["onChange", "value", "width"];
|
|
12
|
+
var _excluded = ["onChange", "prefix", "value", "width"];
|
|
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) {
|
|
16
16
|
var onChange = _ref.onChange,
|
|
17
|
+
_ref$prefix = _ref.prefix,
|
|
18
|
+
prefix = _ref$prefix === void 0 ? /*#__PURE__*/_react["default"].createElement(_Icon.Icon, {
|
|
19
|
+
name: "ri-search"
|
|
20
|
+
}) : _ref$prefix,
|
|
17
21
|
value = _ref.value,
|
|
18
22
|
width = _ref.width,
|
|
19
23
|
props = (0, _objectWithoutPropertiesLoose2["default"])(_ref, _excluded);
|
|
@@ -28,9 +32,7 @@ var ActivatorTextInput = function ActivatorTextInput(_ref) {
|
|
|
28
32
|
};
|
|
29
33
|
return /*#__PURE__*/_react["default"].createElement(_ActivatorStyle.StyledTextInput, (0, _extends2["default"])({}, props, {
|
|
30
34
|
ref: activatorRef,
|
|
31
|
-
prefix:
|
|
32
|
-
name: "ri-search"
|
|
33
|
-
}),
|
|
35
|
+
prefix: prefix,
|
|
34
36
|
value: value,
|
|
35
37
|
onChange: function onChange(value) {
|
|
36
38
|
return handleChange({
|