@crystaldesign/searchfield 23.7.5 → 23.8.1-beta.2
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/package.json +2 -2
- package/build/esm/index.js +0 -67
- package/build/types/index.d.ts +0 -28
- package/build/types/index.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crystaldesign/searchfield",
|
|
3
|
-
"version": "23.
|
|
3
|
+
"version": "23.8.1-beta.2",
|
|
4
4
|
"license": "COMMERCIAL",
|
|
5
5
|
"devDependencies": {
|
|
6
6
|
"@testing-library/jest-dom": "^5.15.0",
|
|
@@ -19,5 +19,5 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"lodash.debounce": "^4.0.8"
|
|
21
21
|
},
|
|
22
|
-
"gitHead": "
|
|
22
|
+
"gitHead": "65826c493604f710fbe986694a0950f107e7b9d6"
|
|
23
23
|
}
|
package/build/esm/index.js
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import 'react';
|
|
2
|
-
import { makeStyles, createStyles } from '@material-ui/core/styles';
|
|
3
|
-
import SearchIcon from '@material-ui/icons/Search';
|
|
4
|
-
import Input from '@material-ui/core/Input';
|
|
5
|
-
import InputLabel from '@material-ui/core/InputLabel';
|
|
6
|
-
import InputAdornment from '@material-ui/core/InputAdornment';
|
|
7
|
-
import FormControl from '@material-ui/core/FormControl';
|
|
8
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
9
|
-
|
|
10
|
-
(function() {
|
|
11
|
-
const env = {"STAGE":"production"};
|
|
12
|
-
try {
|
|
13
|
-
if (process) {
|
|
14
|
-
process.env = Object.assign({}, process.env);
|
|
15
|
-
Object.assign(process.env, env);
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
} catch (e) {} // avoid ReferenceError: process is not defined
|
|
19
|
-
globalThis.process = { env:env };
|
|
20
|
-
})();
|
|
21
|
-
|
|
22
|
-
function SearchField(_ref) {
|
|
23
|
-
var onChange = _ref.onChange,
|
|
24
|
-
value = _ref.value,
|
|
25
|
-
placeholder = _ref.placeholder,
|
|
26
|
-
label = _ref.label,
|
|
27
|
-
autoFocus = _ref.autoFocus;
|
|
28
|
-
var classes = useStyles();
|
|
29
|
-
return /*#__PURE__*/jsxs(FormControl, {
|
|
30
|
-
margin: "dense",
|
|
31
|
-
className: classes.textField,
|
|
32
|
-
children: [label && /*#__PURE__*/jsx(InputLabel, {
|
|
33
|
-
htmlFor: "search-field",
|
|
34
|
-
children: label
|
|
35
|
-
}), /*#__PURE__*/jsx(Input, {
|
|
36
|
-
className: classes.input,
|
|
37
|
-
value: value,
|
|
38
|
-
onChange: onChange,
|
|
39
|
-
placeholder: placeholder,
|
|
40
|
-
autoFocus: autoFocus,
|
|
41
|
-
autoComplete: "off",
|
|
42
|
-
endAdornment: /*#__PURE__*/jsx(InputAdornment, {
|
|
43
|
-
position: "end",
|
|
44
|
-
children: /*#__PURE__*/jsx(SearchIcon, {
|
|
45
|
-
className: classes.icon
|
|
46
|
-
})
|
|
47
|
-
})
|
|
48
|
-
})]
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
var useStyles = makeStyles(function (theme) {
|
|
52
|
-
return createStyles({
|
|
53
|
-
textField: {
|
|
54
|
-
marginLeft: theme.spacing(1),
|
|
55
|
-
marginRight: theme.spacing(1)
|
|
56
|
-
},
|
|
57
|
-
input: {
|
|
58
|
-
marginTop: theme.spacing(2)
|
|
59
|
-
},
|
|
60
|
-
icon: {
|
|
61
|
-
color: theme.palette.grey.A700
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
});
|
|
65
|
-
//changes
|
|
66
|
-
|
|
67
|
-
export { SearchField as default };
|
package/build/types/index.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
export interface SearchFieldProps {
|
|
5
|
-
/**
|
|
6
|
-
* An Event that is triggered every time the value changes
|
|
7
|
-
*/
|
|
8
|
-
onChange: (e: React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>) => void;
|
|
9
|
-
/**
|
|
10
|
-
* The value that should be displayed in the search field
|
|
11
|
-
*/
|
|
12
|
-
value: string;
|
|
13
|
-
/**
|
|
14
|
-
* A placeholder to be displyed if the value is empty
|
|
15
|
-
*/
|
|
16
|
-
placeholder?: string;
|
|
17
|
-
/**
|
|
18
|
-
* The label for this search field
|
|
19
|
-
*/
|
|
20
|
-
label?: string;
|
|
21
|
-
/**
|
|
22
|
-
* Auto focus the input field
|
|
23
|
-
*/
|
|
24
|
-
autoFocus?: boolean;
|
|
25
|
-
}
|
|
26
|
-
export default function SearchField({ onChange, value, placeholder, label, autoFocus }: SearchFieldProps): JSX.Element;
|
|
27
|
-
//# sourceMappingURL=index.d.ts.map
|
|
28
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,QAAQ,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,mBAAmB,GAAG,gBAAgB,CAAC,KAAK,IAAI,CAAC;IACjF;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,gBAAgB,eAoBvG"}
|