flipper-ui 0.30.0 → 0.30.1
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.
|
@@ -56,11 +56,11 @@ interface IEditProps extends Pick<TextFieldProps, 'showEdit' | 'style'> {
|
|
|
56
56
|
}
|
|
57
57
|
export declare const TextFieldWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
58
58
|
export declare const StaticTextFieldWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
59
|
-
export declare const useStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"input" | "iconOutlined" | "outlinedInput" | "outlinedLabel" | "outlinedMultiline">;
|
|
59
|
+
export declare const useStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"input" | "iconOutlined" | "listOptions" | "outlinedInput" | "outlinedLabel" | "outlinedMultiline">;
|
|
60
60
|
export declare const coerceComboOptions: (input: string) => IOption[];
|
|
61
61
|
export declare const toLispCase: (name: string) => string;
|
|
62
62
|
export declare const HelperBox: (props: IHelperProps) => JSX.Element;
|
|
63
|
-
export declare const renderOptions: (options: TextFieldProps['options']) => "" | JSX.Element[] | undefined;
|
|
63
|
+
export declare const renderOptions: (options: TextFieldProps['options'], classes: Record<string, string>) => "" | JSX.Element[] | undefined;
|
|
64
64
|
export declare const EditBox: (props: IEditProps) => JSX.Element;
|
|
65
65
|
export declare const TextField: ({ options, margin, padding, style, error, variant, InputLabelProps, InputProps, SelectProps, autoComplete, onHelperClick, helperIcon, fullWidth, hasClear, onClear, children, ...otherProps }: TextFieldProps) => JSX.Element;
|
|
66
66
|
export default TextField;
|
|
@@ -39,6 +39,14 @@ exports.TextFieldWrapper = TextFieldWrapper;
|
|
|
39
39
|
var StaticTextFieldWrapper = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: rows;\n width: 100%;\n align-items: center;\n"])));
|
|
40
40
|
exports.StaticTextFieldWrapper = StaticTextFieldWrapper;
|
|
41
41
|
var useStyles = (0, _styles.makeStyles)({
|
|
42
|
+
listOptions: {
|
|
43
|
+
outline: 'none',
|
|
44
|
+
cursor: 'pointer',
|
|
45
|
+
fontFamily: '"Roboto", "Helvetica", "Arial", sans- serif',
|
|
46
|
+
'&:hover': {
|
|
47
|
+
backgroundColor: 'rgba(0, 0, 0, 0.04)'
|
|
48
|
+
}
|
|
49
|
+
},
|
|
42
50
|
input: {
|
|
43
51
|
fontSize: '14px',
|
|
44
52
|
padding: '10px',
|
|
@@ -81,8 +89,7 @@ var HelperBox = function HelperBox(props) {
|
|
|
81
89
|
};
|
|
82
90
|
/* Jest-ignore-start ignore next */
|
|
83
91
|
exports.HelperBox = HelperBox;
|
|
84
|
-
var renderOptions = function renderOptions(options) {
|
|
85
|
-
console.log(options);
|
|
92
|
+
var renderOptions = function renderOptions(options, classes) {
|
|
86
93
|
var comboOptions = typeof options === 'string' ? coerceComboOptions(options) : options;
|
|
87
94
|
return options &&
|
|
88
95
|
// @ts-ignore
|
|
@@ -91,7 +98,10 @@ var renderOptions = function renderOptions(options) {
|
|
|
91
98
|
id: toLispCase("option-".concat(option.value)),
|
|
92
99
|
key: option.value,
|
|
93
100
|
disabled: option.disabled,
|
|
94
|
-
value: option.value
|
|
101
|
+
value: option.value,
|
|
102
|
+
classes: {
|
|
103
|
+
root: classes.listOptions
|
|
104
|
+
}
|
|
95
105
|
}, option.label);
|
|
96
106
|
});
|
|
97
107
|
};
|
|
@@ -193,18 +203,11 @@ var TextField = function TextField(_ref) {
|
|
|
193
203
|
}
|
|
194
204
|
}, InputProps),
|
|
195
205
|
SelectProps: _objectSpread(_objectSpread({
|
|
196
|
-
MenuProps: {
|
|
197
|
-
PaperProps: {
|
|
198
|
-
style: {
|
|
199
|
-
fontFamily: '"Roboto", "Helvetica", "Arial", sans- serif'
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
},
|
|
203
206
|
classes: {
|
|
204
207
|
iconOutlined: hasClear ? clearClass.iconOutlined : classes.iconOutlined
|
|
205
208
|
}
|
|
206
209
|
}, endAdornment), SelectProps)
|
|
207
|
-
}, otherProps), options ? renderOptions(options) : children), onHelperClick && /*#__PURE__*/_react["default"].createElement(HelperBox, {
|
|
210
|
+
}, otherProps), options ? renderOptions(options, classes) : children), onHelperClick && /*#__PURE__*/_react["default"].createElement(HelperBox, {
|
|
208
211
|
helperIcon: helperIcon,
|
|
209
212
|
onHelperClick: handleClick
|
|
210
213
|
}));
|