glints-aries 4.1.7 → 4.1.8
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/Input/Input.d.ts +6 -0
- package/es/@next/Input/Input.js +22 -5
- package/es/@next/Input/InputStyle.d.ts +14 -2
- package/es/@next/Input/InputStyle.js +33 -3
- package/es/@next/NumberInput/NumberInput.d.ts +12 -2
- package/es/@next/NumberInput/NumberInput.js +14 -2
- package/es/@next/Pagination/PaginationStyle.d.ts +6 -1
- package/es/@next/PasswordInput/PasswordInput.d.ts +10 -0
- package/es/@next/PasswordInput/PasswordInput.js +12 -2
- package/es/@next/Select/Select.d.ts +6 -1
- package/es/@next/Select/Select.js +21 -7
- package/es/@next/Select/Select.stories.d.ts +2 -0
- package/es/@next/Select/components/Activator/ActivatorSelect.d.ts +7 -1
- package/es/@next/Select/components/Activator/ActivatorSelect.js +22 -7
- package/es/@next/Select/components/Activator/ActivatorStyle.d.ts +13 -0
- package/es/@next/Select/components/Activator/ActivatorStyle.js +16 -2
- package/es/@next/Select/components/Activator/ActivatorTextInput.d.ts +6 -1
- package/es/@next/Select/components/Activator/ActivatorTextInput.js +17 -3
- package/es/@next/Select/components/SearchableSelectInput/ClearSelected.d.ts +2 -1
- package/es/@next/Select/components/SearchableSelectInput/ClearSelected.js +5 -2
- package/es/@next/Select/components/SearchableSelectInput/SearchableSelectInput.d.ts +12 -0
- package/es/@next/Select/components/SearchableSelectInput/SearchableSelectInput.js +26 -8
- package/es/@next/Select/components/SearchableSelectInput/SearchableSelectInputStyle.d.ts +7 -1
- package/es/@next/Select/components/SearchableSelectInput/SearchableSelectInputStyle.js +4 -1
- package/es/@next/TextArea/TextArea.d.ts +10 -0
- package/es/@next/TextArea/TextArea.js +20 -4
- package/es/@next/TextArea/TextArea.stories.d.ts +1 -0
- package/es/@next/TextArea/TextAreaStyle.d.ts +3 -0
- package/es/@next/TextArea/TextAreaStyle.js +13 -3
- package/es/@next/TextInput/TextInput.d.ts +12 -0
- package/es/@next/TextInput/TextInput.js +14 -2
- package/es/@next/TextInput/TextInput.stories.d.ts +1 -0
- package/es/Input/PhoneNumberInput/PhoneNumberInput.d.ts +4 -1
- package/es/Input/PhoneNumberInput/PhoneNumberInput.js +12 -6
- package/es/Input/PhoneNumberInput/PhoneNumberInput.stories.d.ts +1 -0
- package/es/Input/PhoneNumberInput/PhoneNumberInputStyles.d.ts +3 -1
- package/es/Input/PhoneNumberInput/PhoneNumberInputStyles.js +9 -6
- package/lib/@next/Input/Input.d.ts +6 -0
- package/lib/@next/Input/Input.js +21 -4
- package/lib/@next/Input/InputStyle.d.ts +14 -2
- package/lib/@next/Input/InputStyle.js +37 -5
- package/lib/@next/NumberInput/NumberInput.d.ts +12 -2
- package/lib/@next/NumberInput/NumberInput.js +14 -2
- package/lib/@next/Pagination/PaginationStyle.d.ts +6 -1
- package/lib/@next/PasswordInput/PasswordInput.d.ts +10 -0
- package/lib/@next/PasswordInput/PasswordInput.js +12 -2
- package/lib/@next/Select/Select.d.ts +6 -1
- package/lib/@next/Select/Select.js +21 -7
- package/lib/@next/Select/Select.stories.d.ts +2 -0
- package/lib/@next/Select/components/Activator/ActivatorSelect.d.ts +7 -1
- package/lib/@next/Select/components/Activator/ActivatorSelect.js +21 -6
- package/lib/@next/Select/components/Activator/ActivatorStyle.d.ts +13 -0
- package/lib/@next/Select/components/Activator/ActivatorStyle.js +18 -3
- package/lib/@next/Select/components/Activator/ActivatorTextInput.d.ts +6 -1
- package/lib/@next/Select/components/Activator/ActivatorTextInput.js +17 -3
- package/lib/@next/Select/components/SearchableSelectInput/ClearSelected.d.ts +2 -1
- package/lib/@next/Select/components/SearchableSelectInput/ClearSelected.js +5 -2
- package/lib/@next/Select/components/SearchableSelectInput/SearchableSelectInput.d.ts +12 -0
- package/lib/@next/Select/components/SearchableSelectInput/SearchableSelectInput.js +25 -7
- package/lib/@next/Select/components/SearchableSelectInput/SearchableSelectInputStyle.d.ts +7 -1
- package/lib/@next/Select/components/SearchableSelectInput/SearchableSelectInputStyle.js +4 -1
- package/lib/@next/TextArea/TextArea.d.ts +10 -0
- package/lib/@next/TextArea/TextArea.js +20 -4
- package/lib/@next/TextArea/TextArea.stories.d.ts +1 -0
- package/lib/@next/TextArea/TextAreaStyle.d.ts +3 -0
- package/lib/@next/TextArea/TextAreaStyle.js +13 -3
- package/lib/@next/TextInput/TextInput.d.ts +12 -0
- package/lib/@next/TextInput/TextInput.js +14 -2
- package/lib/@next/TextInput/TextInput.stories.d.ts +1 -0
- package/lib/Input/PhoneNumberInput/PhoneNumberInput.d.ts +4 -1
- package/lib/Input/PhoneNumberInput/PhoneNumberInput.js +12 -6
- package/lib/Input/PhoneNumberInput/PhoneNumberInput.stories.d.ts +1 -0
- package/lib/Input/PhoneNumberInput/PhoneNumberInputStyles.d.ts +3 -1
- package/lib/Input/PhoneNumberInput/PhoneNumberInputStyles.js +9 -6
- package/package.json +1 -1
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'prefix'> {
|
|
3
3
|
error?: boolean;
|
|
4
|
+
height?: string;
|
|
5
|
+
border?: string;
|
|
6
|
+
borderRadius?: string;
|
|
7
|
+
floatingFontSize?: string;
|
|
8
|
+
isPlaceholderFloating?: boolean;
|
|
9
|
+
required?: boolean;
|
|
4
10
|
prefix?: React.ReactNode;
|
|
5
11
|
suffix?: React.ReactNode;
|
|
6
12
|
inputRef?: React.Ref<HTMLInputElement>;
|
package/es/@next/Input/Input.js
CHANGED
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
|
-
var _excluded = ["error", "disabled", "prefix", "suffix", "inputRef"];
|
|
3
|
+
var _excluded = ["error", "disabled", "prefix", "suffix", "inputRef", "height", "border", "borderRadius", "floatingFontSize", "isPlaceholderFloating", "placeholder", "required"];
|
|
4
4
|
import React, { useEffect, useRef } from 'react';
|
|
5
|
-
import { StyledContainer, StyledInput, StyledPrefixContainer, StyledSuffixContainer } from './InputStyle';
|
|
5
|
+
import { AsteriskIcon, FloatingLabel, StyledContainer, StyledInput, StyledPrefixContainer, StyledSuffixContainer } from './InputStyle';
|
|
6
6
|
export var Input = /*#__PURE__*/React.forwardRef(function Input(_ref, ref) {
|
|
7
7
|
var error = _ref.error,
|
|
8
8
|
disabled = _ref.disabled,
|
|
9
9
|
prefix = _ref.prefix,
|
|
10
10
|
suffix = _ref.suffix,
|
|
11
11
|
inputRef = _ref.inputRef,
|
|
12
|
+
height = _ref.height,
|
|
13
|
+
border = _ref.border,
|
|
14
|
+
borderRadius = _ref.borderRadius,
|
|
15
|
+
floatingFontSize = _ref.floatingFontSize,
|
|
16
|
+
isPlaceholderFloating = _ref.isPlaceholderFloating,
|
|
17
|
+
placeholder = _ref.placeholder,
|
|
18
|
+
required = _ref.required,
|
|
12
19
|
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
13
20
|
var hasPrefix = !!prefix;
|
|
14
21
|
var hasSuffix = !!suffix;
|
|
@@ -16,12 +23,14 @@ export var Input = /*#__PURE__*/React.forwardRef(function Input(_ref, ref) {
|
|
|
16
23
|
var suffixRef = useRef(null);
|
|
17
24
|
var Prefix = function Prefix() {
|
|
18
25
|
return hasPrefix ? /*#__PURE__*/React.createElement(StyledPrefixContainer, {
|
|
19
|
-
ref: prefixRef
|
|
26
|
+
ref: prefixRef,
|
|
27
|
+
height: height
|
|
20
28
|
}, prefix) : null;
|
|
21
29
|
};
|
|
22
30
|
var Suffix = function Suffix() {
|
|
23
31
|
return hasSuffix ? /*#__PURE__*/React.createElement(StyledSuffixContainer, {
|
|
24
|
-
ref: suffixRef
|
|
32
|
+
ref: suffixRef,
|
|
33
|
+
height: height
|
|
25
34
|
}, suffix) : null;
|
|
26
35
|
};
|
|
27
36
|
var _React$useState = React.useState(0),
|
|
@@ -42,6 +51,7 @@ export var Input = /*#__PURE__*/React.forwardRef(function Input(_ref, ref) {
|
|
|
42
51
|
setSuffixWidth(_suffixWidth);
|
|
43
52
|
}
|
|
44
53
|
}, [hasSuffix, suffix]);
|
|
54
|
+
var selectedPlaceholder = required ? placeholder + "*" : placeholder;
|
|
45
55
|
return /*#__PURE__*/React.createElement(StyledContainer, {
|
|
46
56
|
ref: ref,
|
|
47
57
|
"data-prefix": hasPrefix,
|
|
@@ -52,6 +62,13 @@ export var Input = /*#__PURE__*/React.forwardRef(function Input(_ref, ref) {
|
|
|
52
62
|
suffixWidth: suffixWidth
|
|
53
63
|
}, /*#__PURE__*/React.createElement(Prefix, null), /*#__PURE__*/React.createElement(StyledInput, _extends({
|
|
54
64
|
ref: inputRef,
|
|
65
|
+
placeholder: isPlaceholderFloating ? undefined : selectedPlaceholder,
|
|
66
|
+
borderRadius: borderRadius,
|
|
67
|
+
border: border,
|
|
68
|
+
height: height,
|
|
55
69
|
disabled: disabled
|
|
56
|
-
}, props)), /*#__PURE__*/React.createElement(
|
|
70
|
+
}, props)), isPlaceholderFloating && /*#__PURE__*/React.createElement(FloatingLabel, {
|
|
71
|
+
"data-testid": "textarea-label",
|
|
72
|
+
fontSize: floatingFontSize
|
|
73
|
+
}, placeholder, required && /*#__PURE__*/React.createElement(AsteriskIcon, null, "*")), /*#__PURE__*/React.createElement(Suffix, null));
|
|
57
74
|
});
|
|
@@ -4,6 +4,18 @@ export interface PreffixSuffixWidthProps {
|
|
|
4
4
|
suffixWidth: number;
|
|
5
5
|
}
|
|
6
6
|
export declare const StyledContainer: import("styled-components").StyledComponent<"div", any, InputProps & PreffixSuffixWidthProps, never>;
|
|
7
|
-
export declare const StyledPrefixContainer: import("styled-components").StyledComponent<"div", any, {
|
|
8
|
-
|
|
7
|
+
export declare const StyledPrefixContainer: import("styled-components").StyledComponent<"div", any, {
|
|
8
|
+
height?: string;
|
|
9
|
+
}, never>;
|
|
10
|
+
export declare const StyledSuffixContainer: import("styled-components").StyledComponent<"div", any, {
|
|
11
|
+
height?: string;
|
|
12
|
+
} & {
|
|
13
|
+
height?: string;
|
|
14
|
+
}, never>;
|
|
15
|
+
export declare const FloatingLabel: import("styled-components").StyledComponent<"label", any, {
|
|
16
|
+
top?: number;
|
|
17
|
+
left?: number;
|
|
18
|
+
fontSize?: string;
|
|
19
|
+
}, never>;
|
|
9
20
|
export declare const StyledInput: import("styled-components").StyledComponent<"input", any, InputProps, never>;
|
|
21
|
+
export declare const AsteriskIcon: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
@@ -4,6 +4,7 @@ import { Neutral, Red } from '../utilities/colors';
|
|
|
4
4
|
import { space12, space4, space8 } from '../utilities/spacing';
|
|
5
5
|
import { NotoSans } from '../utilities/fonts';
|
|
6
6
|
import { borderRadius4 } from '../utilities/borderRadius';
|
|
7
|
+
import { Greyscale } from '../../Utils/Colors';
|
|
7
8
|
export var StyledContainer = styled.div.withConfig({
|
|
8
9
|
displayName: "InputStyle__StyledContainer",
|
|
9
10
|
componentId: "sc-15z2mnd-0"
|
|
@@ -15,12 +16,41 @@ export var StyledContainer = styled.div.withConfig({
|
|
|
15
16
|
export var StyledPrefixContainer = styled.div.withConfig({
|
|
16
17
|
displayName: "InputStyle__StyledPrefixContainer",
|
|
17
18
|
componentId: "sc-15z2mnd-1"
|
|
18
|
-
})(["position:absolute;left:0;color:", ";display:flex;align-items:center;height:
|
|
19
|
+
})(["position:absolute;left:0;color:", ";display:flex;align-items:center;height:", ";padding:0px ", " 0 ", ";svg{height:17px;width:17px;fill:", ";}"], Neutral.B40, function (_ref) {
|
|
20
|
+
var height = _ref.height;
|
|
21
|
+
return height != null ? height : '36px';
|
|
22
|
+
}, space8, space12, Neutral.B40);
|
|
19
23
|
export var StyledSuffixContainer = styled(StyledPrefixContainer).withConfig({
|
|
20
24
|
displayName: "InputStyle__StyledSuffixContainer",
|
|
21
25
|
componentId: "sc-15z2mnd-2"
|
|
22
26
|
})(["left:auto;right:0;padding:0px ", " 0 ", ";"], space12, space4);
|
|
27
|
+
export var FloatingLabel = styled.label.withConfig({
|
|
28
|
+
displayName: "InputStyle__FloatingLabel",
|
|
29
|
+
componentId: "sc-15z2mnd-3"
|
|
30
|
+
})(["position:absolute;left:", "em;top:", "em;visibility:visible;padding:0 0.3em;background:white;font-size:", ";color:", ";"], function (_ref2) {
|
|
31
|
+
var left = _ref2.left;
|
|
32
|
+
return left != null ? left : '0.5';
|
|
33
|
+
}, function (_ref3) {
|
|
34
|
+
var top = _ref3.top;
|
|
35
|
+
return top != null ? top : '-1.25';
|
|
36
|
+
}, function (_ref4) {
|
|
37
|
+
var fontSize = _ref4.fontSize;
|
|
38
|
+
return fontSize != null ? fontSize : '12px';
|
|
39
|
+
}, Greyscale.devilsgrey);
|
|
23
40
|
export var StyledInput = styled.input.withConfig({
|
|
24
41
|
displayName: "InputStyle__StyledInput",
|
|
25
|
-
componentId: "sc-15z2mnd-
|
|
26
|
-
})(["background:", ";box-sizing:border-box;border:
|
|
42
|
+
componentId: "sc-15z2mnd-4"
|
|
43
|
+
})(["background:", ";box-sizing:border-box;border:", ";border-radius:", ";padding:0 12px;font-family:", ",sans-serif;font-style:normal;font-weight:400;font-size:16px;line-height:150%;color:", ";flex:none;order:1;align-self:stretch;flex-grow:0;height:", ";&::placeholder{color:", ";}&:focus{outline:none;box-shadow:0px 0px 0px 1px ", ",0px 0px 0px 3px #6ac9ec;}@media (max-width:", "){font-size:14px;}"], Neutral.B100, function (_ref5) {
|
|
44
|
+
var border = _ref5.border;
|
|
45
|
+
return border != null ? border : "1px solid " + Neutral.B68;
|
|
46
|
+
}, function (_ref6) {
|
|
47
|
+
var borderRadius = _ref6.borderRadius;
|
|
48
|
+
return borderRadius != null ? borderRadius : borderRadius4;
|
|
49
|
+
}, NotoSans, Neutral.B18, function (_ref7) {
|
|
50
|
+
var height = _ref7.height;
|
|
51
|
+
return height != null ? height : "36px";
|
|
52
|
+
}, Neutral.B68, Neutral.B100, Breakpoints.large);
|
|
53
|
+
export var AsteriskIcon = styled.span.withConfig({
|
|
54
|
+
displayName: "InputStyle__AsteriskIcon",
|
|
55
|
+
componentId: "sc-15z2mnd-5"
|
|
56
|
+
})(["color:", ";font-size:20px;vertical-align:middle;"], Red.B93);
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { InputProps } from '../Input/Input';
|
|
3
|
-
export declare type NumberInputProps = Omit<InputProps, 'type' | 'prefix'
|
|
4
|
-
|
|
3
|
+
export declare type NumberInputProps = Omit<InputProps, 'type' | 'prefix'> & {
|
|
4
|
+
border?: string;
|
|
5
|
+
borderRadius?: string;
|
|
6
|
+
required?: boolean;
|
|
7
|
+
isPlaceholderFloating?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare const NumberInput: React.ForwardRefExoticComponent<Omit<InputProps, "type" | "prefix"> & {
|
|
10
|
+
border?: string;
|
|
11
|
+
borderRadius?: string;
|
|
12
|
+
required?: boolean;
|
|
13
|
+
isPlaceholderFloating?: boolean;
|
|
14
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
|
+
var _excluded = ["border", "borderRadius", "isPlaceholderFloating", "required"];
|
|
2
4
|
import React from 'react';
|
|
3
5
|
import styled from 'styled-components';
|
|
4
6
|
import { Input } from '../Input/Input';
|
|
@@ -6,9 +8,19 @@ var StyledInput = styled(Input).withConfig({
|
|
|
6
8
|
displayName: "NumberInput__StyledInput",
|
|
7
9
|
componentId: "sc-1f5ws9y-0"
|
|
8
10
|
})(["&[type='number']{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;}&[type='number']::-webkit-inner-spin-button,&[type='number']::-webkit-outer-spin-button{-webkit-appearance:none;}"]);
|
|
9
|
-
export var NumberInput = /*#__PURE__*/React.forwardRef(function NumberInput(
|
|
11
|
+
export var NumberInput = /*#__PURE__*/React.forwardRef(function NumberInput(_ref, ref) {
|
|
12
|
+
var border = _ref.border,
|
|
13
|
+
borderRadius = _ref.borderRadius,
|
|
14
|
+
isPlaceholderFloating = _ref.isPlaceholderFloating,
|
|
15
|
+
required = _ref.required,
|
|
16
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
10
17
|
return /*#__PURE__*/React.createElement(StyledInput, _extends({
|
|
11
18
|
ref: ref,
|
|
12
19
|
type: "number"
|
|
13
|
-
}, props
|
|
20
|
+
}, props, {
|
|
21
|
+
border: border,
|
|
22
|
+
borderRadius: borderRadius,
|
|
23
|
+
required: required,
|
|
24
|
+
isPlaceholderFloating: isPlaceholderFloating
|
|
25
|
+
}));
|
|
14
26
|
});
|
|
@@ -8,4 +8,9 @@ export declare const StyledSimplePaginationButton: import("styled-components").S
|
|
|
8
8
|
export declare const StyledBorderPaginationButton: import("styled-components").StyledComponent<"button", any, PageButtonProps, never>;
|
|
9
9
|
export declare const StyledLabel: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
10
10
|
export declare const StyledActiveSimplePaginationButton: import("styled-components").StyledComponent<(props: PageButtonProps) => JSX.Element, any, {}, never>;
|
|
11
|
-
export declare const StyledSimplePaginationInput: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<import("../
|
|
11
|
+
export declare const StyledSimplePaginationInput: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<Omit<import("../Input/Input").InputProps, "type" | "prefix"> & {
|
|
12
|
+
border?: string;
|
|
13
|
+
borderRadius?: string;
|
|
14
|
+
required?: boolean;
|
|
15
|
+
isPlaceholderFloating?: boolean;
|
|
16
|
+
} & React.RefAttributes<HTMLInputElement>>, any, {}, never>;
|
|
@@ -2,8 +2,18 @@ import React from 'react';
|
|
|
2
2
|
export declare type PasswordInputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'onChange'> & {
|
|
3
3
|
onChange?: (value: string) => void;
|
|
4
4
|
error?: boolean;
|
|
5
|
+
height?: string;
|
|
6
|
+
border?: string;
|
|
7
|
+
borderRadius?: string;
|
|
8
|
+
required?: boolean;
|
|
9
|
+
isPlaceholderFloating?: boolean;
|
|
5
10
|
};
|
|
6
11
|
export declare const PasswordInput: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "onChange"> & {
|
|
7
12
|
onChange?: (value: string) => void;
|
|
8
13
|
error?: boolean;
|
|
14
|
+
height?: string;
|
|
15
|
+
border?: string;
|
|
16
|
+
borderRadius?: string;
|
|
17
|
+
required?: boolean;
|
|
18
|
+
isPlaceholderFloating?: boolean;
|
|
9
19
|
} & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -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 = ["value", "onChange", "error"];
|
|
3
|
+
var _excluded = ["value", "onChange", "error", "height", "border", "borderRadius", "required", "isPlaceholderFloating"];
|
|
4
4
|
import React, { useState } from 'react';
|
|
5
5
|
import { Icon } from '../Icon';
|
|
6
6
|
import { Input } from '../Input/Input';
|
|
@@ -9,6 +9,11 @@ export var PasswordInput = /*#__PURE__*/React.forwardRef(function PasswordInput(
|
|
|
9
9
|
var value = _ref.value,
|
|
10
10
|
_onChange = _ref.onChange,
|
|
11
11
|
error = _ref.error,
|
|
12
|
+
height = _ref.height,
|
|
13
|
+
border = _ref.border,
|
|
14
|
+
borderRadius = _ref.borderRadius,
|
|
15
|
+
required = _ref.required,
|
|
16
|
+
isPlaceholderFloating = _ref.isPlaceholderFloating,
|
|
12
17
|
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
13
18
|
var _useState = useState(false),
|
|
14
19
|
showPassword = _useState[0],
|
|
@@ -31,6 +36,11 @@ export var PasswordInput = /*#__PURE__*/React.forwardRef(function PasswordInput(
|
|
|
31
36
|
return _onChange == null ? void 0 : _onChange(e.currentTarget.value);
|
|
32
37
|
},
|
|
33
38
|
error: error,
|
|
34
|
-
suffix: !props.disabled && suffixComponent
|
|
39
|
+
suffix: !props.disabled && suffixComponent,
|
|
40
|
+
height: height,
|
|
41
|
+
border: border,
|
|
42
|
+
borderRadius: borderRadius,
|
|
43
|
+
required: required,
|
|
44
|
+
isPlaceholderFloating: isPlaceholderFloating
|
|
35
45
|
}, props)));
|
|
36
46
|
});
|
|
@@ -50,8 +50,13 @@ export interface SelectProps {
|
|
|
50
50
|
selectedValues?: string[];
|
|
51
51
|
/** sets a width for the Select component*/
|
|
52
52
|
width: string;
|
|
53
|
+
height?: string;
|
|
53
54
|
/** sets z-index override for option list dropdown. z-index default to 400 */
|
|
54
55
|
zIndexOverride?: number;
|
|
56
|
+
border?: string;
|
|
57
|
+
borderRadius?: string;
|
|
58
|
+
required?: boolean;
|
|
59
|
+
isPlaceholderFloating?: boolean;
|
|
55
60
|
}
|
|
56
|
-
export declare const Select: ({ allowMultiple, customActivatorIcon, disabled, hasError, helpText, label, listHeight, loadingOptions, name, onBlur, onClose, onFocus, onRemoveTag, onSelect, onSelectClick, optionListFitContent, options, placeholder, prefix, searchable, searchableProps, optionsPlaceholderProps, showPopoverOnFocus, scrollable, sections, selectedValues, width, zIndexOverride, }: SelectProps) => JSX.Element;
|
|
61
|
+
export declare const Select: ({ allowMultiple, customActivatorIcon, disabled, hasError, helpText, label, listHeight, loadingOptions, name, onBlur, onClose, onFocus, onRemoveTag, onSelect, onSelectClick, optionListFitContent, options, placeholder, prefix, searchable, searchableProps, optionsPlaceholderProps, showPopoverOnFocus, scrollable, sections, selectedValues, width, height, zIndexOverride, border, borderRadius, required, isPlaceholderFloating, }: SelectProps) => JSX.Element;
|
|
57
62
|
export {};
|
|
@@ -33,8 +33,7 @@ export var Select = function Select(_ref) {
|
|
|
33
33
|
options = _ref$options === void 0 ? [] : _ref$options,
|
|
34
34
|
placeholder = _ref.placeholder,
|
|
35
35
|
prefix = _ref.prefix,
|
|
36
|
-
|
|
37
|
-
searchable = _ref$searchable === void 0 ? false : _ref$searchable,
|
|
36
|
+
searchable = _ref.searchable,
|
|
38
37
|
searchableProps = _ref.searchableProps,
|
|
39
38
|
optionsPlaceholderProps = _ref.optionsPlaceholderProps,
|
|
40
39
|
_ref$showPopoverOnFoc = _ref.showPopoverOnFocus,
|
|
@@ -44,14 +43,19 @@ export var Select = function Select(_ref) {
|
|
|
44
43
|
sections = _ref.sections,
|
|
45
44
|
selectedValues = _ref.selectedValues,
|
|
46
45
|
width = _ref.width,
|
|
47
|
-
|
|
46
|
+
height = _ref.height,
|
|
47
|
+
zIndexOverride = _ref.zIndexOverride,
|
|
48
|
+
border = _ref.border,
|
|
49
|
+
borderRadius = _ref.borderRadius,
|
|
50
|
+
required = _ref.required,
|
|
51
|
+
isPlaceholderFloating = _ref.isPlaceholderFloating;
|
|
48
52
|
var _useState = useState(false),
|
|
49
53
|
popoverActive = _useState[0],
|
|
50
54
|
setPopoverActive = _useState[1];
|
|
51
55
|
var _useState2 = useState(''),
|
|
52
56
|
optionListHeight = _useState2[0],
|
|
53
57
|
setOptionListHeight = _useState2[1];
|
|
54
|
-
var _useState3 = useState(
|
|
58
|
+
var _useState3 = useState([]),
|
|
55
59
|
menuOptions = _useState3[0],
|
|
56
60
|
setMenuOptions = _useState3[1];
|
|
57
61
|
var optionsLength = options.length;
|
|
@@ -127,6 +131,7 @@ export var Select = function Select(_ref) {
|
|
|
127
131
|
onChange: searchableProps == null ? void 0 : searchableProps.onInputChange,
|
|
128
132
|
placeholder: placeholder != null ? placeholder : 'Search',
|
|
129
133
|
width: width,
|
|
134
|
+
height: height,
|
|
130
135
|
selectedValues: selectedValues,
|
|
131
136
|
onBlur: onBlur,
|
|
132
137
|
onSelect: onSelect,
|
|
@@ -140,7 +145,11 @@ export var Select = function Select(_ref) {
|
|
|
140
145
|
options: options,
|
|
141
146
|
updateMenuOptions: updateMenuOptions,
|
|
142
147
|
prefix: prefix,
|
|
143
|
-
name: name
|
|
148
|
+
name: name,
|
|
149
|
+
isPlaceholderFloating: isPlaceholderFloating,
|
|
150
|
+
required: required,
|
|
151
|
+
border: border,
|
|
152
|
+
borderRadius: borderRadius
|
|
144
153
|
});
|
|
145
154
|
}
|
|
146
155
|
return /*#__PURE__*/React.createElement(ActivatorSelect, {
|
|
@@ -153,18 +162,23 @@ export var Select = function Select(_ref) {
|
|
|
153
162
|
onRemoveTag: onRemoveTag,
|
|
154
163
|
onSelectClick: handleSelectClick,
|
|
155
164
|
width: width,
|
|
165
|
+
height: height,
|
|
156
166
|
selectedValues: selectedValues,
|
|
157
167
|
options: options,
|
|
158
168
|
name: name,
|
|
159
169
|
prefix: prefix,
|
|
160
|
-
onClick: onSelectClick
|
|
170
|
+
onClick: onSelectClick,
|
|
171
|
+
required: required,
|
|
172
|
+
border: border,
|
|
173
|
+
borderRadius: borderRadius,
|
|
174
|
+
isPlaceholderFloating: isPlaceholderFloating
|
|
161
175
|
});
|
|
162
176
|
};
|
|
163
177
|
return /*#__PURE__*/React.createElement(Popover, {
|
|
164
178
|
active: popoverActive,
|
|
165
179
|
activator: /*#__PURE__*/React.createElement(ActivatorWrapper, {
|
|
166
180
|
width: width
|
|
167
|
-
}, label && /*#__PURE__*/React.createElement(Label, null, label), activator(), helpText && /*#__PURE__*/React.createElement(HelpTextContainer, null, /*#__PURE__*/React.createElement(Typography, {
|
|
181
|
+
}, label && !isPlaceholderFloating && /*#__PURE__*/React.createElement(Label, null, label), activator(), helpText && /*#__PURE__*/React.createElement(HelpTextContainer, null, /*#__PURE__*/React.createElement(Typography, {
|
|
168
182
|
as: "span",
|
|
169
183
|
variant: "subtitle2",
|
|
170
184
|
color: disabled ? Neutral.B85 : Neutral.B40
|
|
@@ -2,7 +2,9 @@ import { Meta } from '@storybook/react';
|
|
|
2
2
|
declare const _default: Meta<import("@storybook/react").Args>;
|
|
3
3
|
export default _default;
|
|
4
4
|
export declare const NonSearchableSingleSelect: any;
|
|
5
|
+
export declare const NonSearchableSingleSelectWithFloatingPlaceholder: any;
|
|
5
6
|
export declare const NonSearchableMultipleSelect: any;
|
|
7
|
+
export declare const NonSearchableMultipleSelectWithFloatingPlaceholder: any;
|
|
6
8
|
export declare const WithErrorNonSearchable: any;
|
|
7
9
|
export declare const NonSearchableDisabled: any;
|
|
8
10
|
export declare const NonSearchablePrefixed: any;
|
|
@@ -14,5 +14,11 @@ export interface ActivatorSelectProps extends Omit<React.ButtonHTMLAttributes<HT
|
|
|
14
14
|
onSelectClick?(): void;
|
|
15
15
|
options?: Option[];
|
|
16
16
|
width?: string;
|
|
17
|
+
height?: string;
|
|
18
|
+
required?: boolean;
|
|
19
|
+
floatingFontSize?: string;
|
|
20
|
+
isPlaceholderFloating?: boolean;
|
|
21
|
+
border?: string;
|
|
22
|
+
borderRadius?: string;
|
|
17
23
|
}
|
|
18
|
-
export declare const ActivatorSelect: ({ customActivatorIcon, placeholder, selectedValues, onClick, onRemoveTag, width, allowMultiple, disabled, onSelectClick, hasError, options, prefix, ...props }: ActivatorSelectProps) => JSX.Element;
|
|
24
|
+
export declare const ActivatorSelect: ({ customActivatorIcon, placeholder, selectedValues, onClick, onRemoveTag, width, allowMultiple, disabled, onSelectClick, hasError, options, prefix, required, border, borderRadius, height, floatingFontSize, isPlaceholderFloating, ...props }: ActivatorSelectProps) => JSX.Element;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
|
-
var _excluded = ["customActivatorIcon", "placeholder", "selectedValues", "onClick", "onRemoveTag", "width", "allowMultiple", "disabled", "onSelectClick", "hasError", "options", "prefix"];
|
|
3
|
+
var _excluded = ["customActivatorIcon", "placeholder", "selectedValues", "onClick", "onRemoveTag", "width", "allowMultiple", "disabled", "onSelectClick", "hasError", "options", "prefix", "required", "border", "borderRadius", "height", "floatingFontSize", "isPlaceholderFloating"];
|
|
4
4
|
import React, { useEffect, useRef, useState } from 'react';
|
|
5
5
|
import { Typography } from '../../../Typography';
|
|
6
6
|
import { Blue, Neutral } from '../../../utilities/colors';
|
|
7
|
-
import { StyledIcon, StyledPrefixContainer, StyledSelect, StyledSelectTypography, StyledTag, TagsContainer, WithPrefixContainer } from './ActivatorStyle';
|
|
7
|
+
import { StyledIcon, StyledPrefixContainer, StyledSelect, StyledSelectTypography, StyledTag, SuffixContainer, TagsContainer, WithPrefixContainer } from './ActivatorStyle';
|
|
8
|
+
import { AsteriskIcon, FloatingLabel } from '../../../Input/InputStyle';
|
|
8
9
|
export var ActivatorSelect = function ActivatorSelect(_ref) {
|
|
9
10
|
var customActivatorIcon = _ref.customActivatorIcon,
|
|
10
11
|
placeholder = _ref.placeholder,
|
|
@@ -21,6 +22,12 @@ export var ActivatorSelect = function ActivatorSelect(_ref) {
|
|
|
21
22
|
hasError = _ref$hasError === void 0 ? false : _ref$hasError,
|
|
22
23
|
options = _ref.options,
|
|
23
24
|
prefix = _ref.prefix,
|
|
25
|
+
required = _ref.required,
|
|
26
|
+
border = _ref.border,
|
|
27
|
+
borderRadius = _ref.borderRadius,
|
|
28
|
+
height = _ref.height,
|
|
29
|
+
floatingFontSize = _ref.floatingFontSize,
|
|
30
|
+
isPlaceholderFloating = _ref.isPlaceholderFloating,
|
|
24
31
|
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
25
32
|
var _useState = useState([]),
|
|
26
33
|
filteredValues = _useState[0],
|
|
@@ -49,11 +56,12 @@ export var ActivatorSelect = function ActivatorSelect(_ref) {
|
|
|
49
56
|
onSelectClick();
|
|
50
57
|
onClick == null ? void 0 : onClick(e);
|
|
51
58
|
};
|
|
52
|
-
var
|
|
59
|
+
var selectedPlaceholder = required ? placeholder + "*" : placeholder;
|
|
60
|
+
var placeholderMarkup = isPlaceholderFloating ? undefined : /*#__PURE__*/React.createElement(Typography, {
|
|
53
61
|
variant: "body1",
|
|
54
62
|
as: "span",
|
|
55
63
|
color: disabled ? Neutral.B85 : Neutral.B68
|
|
56
|
-
},
|
|
64
|
+
}, selectedPlaceholder);
|
|
57
65
|
var tagsMarkup = function tagsMarkup() {
|
|
58
66
|
if (!hasSelectedValues) {
|
|
59
67
|
return placeholderMarkup;
|
|
@@ -76,14 +84,21 @@ export var ActivatorSelect = function ActivatorSelect(_ref) {
|
|
|
76
84
|
"data-error": hasError,
|
|
77
85
|
onClick: handleClick,
|
|
78
86
|
disabled: disabled,
|
|
79
|
-
width: width
|
|
87
|
+
width: width,
|
|
88
|
+
height: height,
|
|
89
|
+
border: border,
|
|
90
|
+
borderRadius: borderRadius,
|
|
91
|
+
isPlaceholderFloating: isPlaceholderFloating
|
|
80
92
|
}), /*#__PURE__*/React.createElement(WithPrefixContainer, null, prefix && /*#__PURE__*/React.createElement(StyledPrefixContainer, null, prefix), allowMultiple ? tagsMarkup() : /*#__PURE__*/React.createElement(StyledSelectTypography, {
|
|
81
93
|
variant: "body1",
|
|
82
94
|
"data-disabled": disabled,
|
|
83
95
|
color: hasSelectedValues ? Neutral.B18 : Neutral.B40
|
|
84
|
-
}, hasSelectedValues ? selectedLabels[0] : placeholderMarkup)), /*#__PURE__*/React.createElement(StyledIcon, {
|
|
96
|
+
}, hasSelectedValues ? selectedLabels[0] : placeholderMarkup)), /*#__PURE__*/React.createElement(SuffixContainer, null, /*#__PURE__*/React.createElement(StyledIcon, {
|
|
85
97
|
height: 24,
|
|
86
98
|
name: customActivatorIcon || 'ri-arrow-m-down-line',
|
|
87
99
|
fill: disabled ? Neutral.B85 : Neutral.B40
|
|
88
|
-
}))
|
|
100
|
+
})), isPlaceholderFloating && /*#__PURE__*/React.createElement(FloatingLabel, {
|
|
101
|
+
"data-testid": "textarea-label",
|
|
102
|
+
fontSize: floatingFontSize
|
|
103
|
+
}, placeholder, required && /*#__PURE__*/React.createElement(AsteriskIcon, null, "*")));
|
|
89
104
|
};
|
|
@@ -6,8 +6,21 @@ export declare const StyledTag: import("styled-components").StyledComponent<impo
|
|
|
6
6
|
export declare const StyledTextInput: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Omit<import("../../../Input/Input").InputProps, "type" | "onChange"> & {
|
|
7
7
|
canClear?: boolean;
|
|
8
8
|
onChange?: (value: string) => void;
|
|
9
|
+
height?: string;
|
|
10
|
+
border?: string;
|
|
11
|
+
borderRadius?: string;
|
|
12
|
+
required?: boolean;
|
|
13
|
+
isPlaceholderFloating?: boolean;
|
|
14
|
+
floatingFontSize?: string;
|
|
9
15
|
} & import("react").RefAttributes<HTMLInputElement>>, any, {}, never>;
|
|
10
16
|
export declare const StyledSelectTypography: import("styled-components").StyledComponent<({ as, children, variant, style, ...props }: import("../../../Typography").TypographyProps) => JSX.Element, any, {}, never>;
|
|
11
17
|
export declare const WithPrefixContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
12
18
|
export declare const StyledPrefixContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
13
19
|
export declare const StyledIcon: import("styled-components").StyledComponent<({ name, ...props }: import("../../../Icon").IconProps) => JSX.Element, any, {}, never>;
|
|
20
|
+
export declare const SuffixContainer: import("styled-components").StyledComponent<"div", any, {
|
|
21
|
+
height?: string;
|
|
22
|
+
} & {
|
|
23
|
+
height?: string;
|
|
24
|
+
} & {
|
|
25
|
+
height?: string;
|
|
26
|
+
}, never>;
|
|
@@ -8,10 +8,20 @@ import { TextInput } from '../../../TextInput';
|
|
|
8
8
|
import { Tag } from '../../../Tag';
|
|
9
9
|
import { Typography } from '../../../Typography';
|
|
10
10
|
import { Icon } from '../../../Icon';
|
|
11
|
+
import { StyledSuffixContainer } from '../../../Input/InputStyle';
|
|
11
12
|
export var StyledSelect = styled.button.withConfig({
|
|
12
13
|
displayName: "ActivatorStyle__StyledSelect",
|
|
13
14
|
componentId: "sc-rui73p-0"
|
|
14
|
-
})(["display:flex;align-items:center;justify-content:space-between;height:
|
|
15
|
+
})(["position:relative;display:flex;align-items:center;justify-content:space-between;height:", ";cursor:pointer;padding:0px 8px 0px 12px;border:", ";box-shadow:0px 1px 0px rgba(0,0,0,0.05);border-radius:", ";background:", ";width:", ";color:", ";font-family:", ",sans-serif;font-weight:400;font-size:16px;line-height:150%;letter-spacing:0px;@media (max-width:", "){font-size:14px;}&:focus{outline:none;box-shadow:0px 0px 0px 1px #ffffff,0px 0px 0px 3px #6cc9ec;}&:disabled{background:", ";pointer-events:none;cursor:default;border:1px solid ", ";}&[data-error='true']{border:1px solid ", ";border-radius:", ";}"], function (props) {
|
|
16
|
+
var _props$height;
|
|
17
|
+
return (_props$height = props.height) != null ? _props$height : '36px';
|
|
18
|
+
}, function (_ref) {
|
|
19
|
+
var border = _ref.border;
|
|
20
|
+
return border != null ? border : "1px solid " + Neutral.B68;
|
|
21
|
+
}, function (_ref2) {
|
|
22
|
+
var borderRadius = _ref2.borderRadius;
|
|
23
|
+
return borderRadius != null ? borderRadius : borderRadius4;
|
|
24
|
+
}, Neutral.B100, function (props) {
|
|
15
25
|
return props.width;
|
|
16
26
|
}, Neutral.B18, NotoSans, Breakpoints.large, Neutral.B95, Neutral.B85, Red.B93, borderRadius4);
|
|
17
27
|
export var TagsContainer = styled.div.withConfig({
|
|
@@ -43,4 +53,8 @@ export var StyledPrefixContainer = styled.div.withConfig({
|
|
|
43
53
|
export var StyledIcon = styled(Icon).withConfig({
|
|
44
54
|
displayName: "ActivatorStyle__StyledIcon",
|
|
45
55
|
componentId: "sc-rui73p-7"
|
|
46
|
-
})(["margin-left:auto;"]);
|
|
56
|
+
})(["margin-left:auto;"]);
|
|
57
|
+
export var SuffixContainer = styled(StyledSuffixContainer).withConfig({
|
|
58
|
+
displayName: "ActivatorStyle__SuffixContainer",
|
|
59
|
+
componentId: "sc-rui73p-8"
|
|
60
|
+
})(["z-index:2;"]);
|
|
@@ -12,11 +12,16 @@ export interface ActivatorTextInputProps extends Omit<TextInputProps, 'onChange'
|
|
|
12
12
|
}): void;
|
|
13
13
|
selectedValues?: string[];
|
|
14
14
|
width?: string;
|
|
15
|
+
height?: string;
|
|
15
16
|
inputValue?: string;
|
|
16
17
|
updateInputValue?: (newValue: string) => void;
|
|
17
18
|
searchableSelectState?: SearchableSelectState;
|
|
18
19
|
updateSearchableSelectState?: (newState: SearchableSelectState) => void;
|
|
19
20
|
options?: Option[];
|
|
20
21
|
updateMenuOptions?: (newState: Option[]) => void;
|
|
22
|
+
border?: string;
|
|
23
|
+
borderRadius?: string;
|
|
24
|
+
isPlaceholderFloating?: boolean;
|
|
25
|
+
required?: boolean;
|
|
21
26
|
}
|
|
22
|
-
export declare const ActivatorTextInput: ({ allowMultiple, disabled, hasError, onChange, onBlur, onFocus, onSelect, prefix, selectedValues, width, inputValue, updateInputValue, options, updateMenuOptions, ...props }: ActivatorTextInputProps) => JSX.Element;
|
|
27
|
+
export declare const ActivatorTextInput: ({ allowMultiple, disabled, hasError, onChange, onBlur, onFocus, onSelect, prefix, selectedValues, width, inputValue, updateInputValue, options, updateMenuOptions, border, borderRadius, isPlaceholderFloating, required, height, ...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", "onBlur", "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", "border", "borderRadius", "isPlaceholderFloating", "required", "height"];
|
|
4
4
|
import React, { useEffect, useRef, useState } from 'react';
|
|
5
5
|
import { Icon } from '../../../Icon';
|
|
6
6
|
import { SearchableSelectInput } from '../SearchableSelectInput/SearchableSelectInput';
|
|
@@ -25,6 +25,11 @@ export var ActivatorTextInput = function ActivatorTextInput(_ref) {
|
|
|
25
25
|
updateInputValue = _ref.updateInputValue,
|
|
26
26
|
options = _ref.options,
|
|
27
27
|
updateMenuOptions = _ref.updateMenuOptions,
|
|
28
|
+
border = _ref.border,
|
|
29
|
+
borderRadius = _ref.borderRadius,
|
|
30
|
+
isPlaceholderFloating = _ref.isPlaceholderFloating,
|
|
31
|
+
required = _ref.required,
|
|
32
|
+
height = _ref.height,
|
|
28
33
|
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
29
34
|
var activatorRef = useRef(null);
|
|
30
35
|
var _useState = useState(false),
|
|
@@ -68,7 +73,11 @@ export var ActivatorTextInput = function ActivatorTextInput(_ref) {
|
|
|
68
73
|
onFocus: onFocus,
|
|
69
74
|
error: hasError,
|
|
70
75
|
disabled: disabled,
|
|
71
|
-
width: width
|
|
76
|
+
width: width,
|
|
77
|
+
border: border,
|
|
78
|
+
borderRadius: borderRadius,
|
|
79
|
+
isPlaceholderFloating: isPlaceholderFloating,
|
|
80
|
+
required: required
|
|
72
81
|
})) : /*#__PURE__*/React.createElement(SearchableSelectInput, _extends({}, props, {
|
|
73
82
|
ref: activatorRef,
|
|
74
83
|
prefix: prefix,
|
|
@@ -84,6 +93,11 @@ export var ActivatorTextInput = function ActivatorTextInput(_ref) {
|
|
|
84
93
|
inputValue: inputValue,
|
|
85
94
|
updateInputValue: updateInputValue,
|
|
86
95
|
options: options,
|
|
87
|
-
updateMenuOptions: updateMenuOptions
|
|
96
|
+
updateMenuOptions: updateMenuOptions,
|
|
97
|
+
border: border,
|
|
98
|
+
borderRadius: borderRadius,
|
|
99
|
+
isPlaceholderFloating: isPlaceholderFloating,
|
|
100
|
+
required: required,
|
|
101
|
+
height: height
|
|
88
102
|
})));
|
|
89
103
|
};
|
|
@@ -5,5 +5,6 @@ export interface ClearSelectedProps {
|
|
|
5
5
|
}): void;
|
|
6
6
|
handleClearIconClick?: () => void;
|
|
7
7
|
updateInputValue?(newValue: string): void;
|
|
8
|
+
height?: string;
|
|
8
9
|
}
|
|
9
|
-
export declare const ClearSelected: ({ onSelect, handleClearIconClick, updateInputValue, }: ClearSelectedProps) => JSX.Element;
|
|
10
|
+
export declare const ClearSelected: ({ onSelect, handleClearIconClick, updateInputValue, height, }: ClearSelectedProps) => JSX.Element;
|
|
@@ -4,7 +4,8 @@ import { ClearSelectedContainer } from './SearchableSelectInputStyle';
|
|
|
4
4
|
export var ClearSelected = function ClearSelected(_ref) {
|
|
5
5
|
var onSelect = _ref.onSelect,
|
|
6
6
|
handleClearIconClick = _ref.handleClearIconClick,
|
|
7
|
-
updateInputValue = _ref.updateInputValue
|
|
7
|
+
updateInputValue = _ref.updateInputValue,
|
|
8
|
+
height = _ref.height;
|
|
8
9
|
var onClearIconClick = function onClearIconClick() {
|
|
9
10
|
updateInputValue('');
|
|
10
11
|
onSelect({
|
|
@@ -12,7 +13,9 @@ export var ClearSelected = function ClearSelected(_ref) {
|
|
|
12
13
|
});
|
|
13
14
|
handleClearIconClick();
|
|
14
15
|
};
|
|
15
|
-
return /*#__PURE__*/React.createElement(ClearSelectedContainer,
|
|
16
|
+
return /*#__PURE__*/React.createElement(ClearSelectedContainer, {
|
|
17
|
+
height: height
|
|
18
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
16
19
|
name: "ri-close-circle-fill",
|
|
17
20
|
style: {
|
|
18
21
|
cursor: 'pointer'
|
|
@@ -20,6 +20,12 @@ export declare type SearchableSelectInputProps = Omit<InputProps, 'type' | 'onCh
|
|
|
20
20
|
updateSearchableSelectState?: (newState: SearchableSelectState) => void;
|
|
21
21
|
options?: Option[];
|
|
22
22
|
updateMenuOptions?: (newState: Option[]) => void;
|
|
23
|
+
border?: string;
|
|
24
|
+
borderRadius?: string;
|
|
25
|
+
floatingFontSize?: string;
|
|
26
|
+
isPlaceholderFloating?: boolean;
|
|
27
|
+
required?: boolean;
|
|
28
|
+
height?: string;
|
|
23
29
|
};
|
|
24
30
|
export declare const SearchableSelectInput: React.ForwardRefExoticComponent<Omit<InputProps, "type" | "onChange" | "onSelect"> & {
|
|
25
31
|
canClear?: boolean;
|
|
@@ -35,4 +41,10 @@ export declare const SearchableSelectInput: React.ForwardRefExoticComponent<Omit
|
|
|
35
41
|
updateSearchableSelectState?: (newState: SearchableSelectState) => void;
|
|
36
42
|
options?: Option[];
|
|
37
43
|
updateMenuOptions?: (newState: Option[]) => void;
|
|
44
|
+
border?: string;
|
|
45
|
+
borderRadius?: string;
|
|
46
|
+
floatingFontSize?: string;
|
|
47
|
+
isPlaceholderFloating?: boolean;
|
|
48
|
+
required?: boolean;
|
|
49
|
+
height?: string;
|
|
38
50
|
} & React.RefAttributes<HTMLInputElement>>;
|