@drodil/backstage-plugin-qeta-react 3.17.2 → 3.17.3
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.
|
@@ -30,41 +30,51 @@ const SearchBar = (props) => {
|
|
|
30
30
|
const { label, onSearch } = props;
|
|
31
31
|
const [searchQuery, setSearchQuery] = React.useState("");
|
|
32
32
|
const classes = useStyles();
|
|
33
|
-
return /* @__PURE__ */ React.createElement(
|
|
34
|
-
|
|
33
|
+
return /* @__PURE__ */ React.createElement(
|
|
34
|
+
Paper,
|
|
35
35
|
{
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
component: "form",
|
|
37
|
+
className: classes.root,
|
|
38
|
+
onSubmit: (e) => e.preventDefault()
|
|
39
39
|
},
|
|
40
|
-
/* @__PURE__ */ React.createElement(
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
40
|
+
/* @__PURE__ */ React.createElement(
|
|
41
|
+
IconButton,
|
|
42
|
+
{
|
|
43
|
+
type: "button",
|
|
44
|
+
"aria-label": "search",
|
|
45
|
+
className: classes.iconButton
|
|
46
|
+
},
|
|
47
|
+
/* @__PURE__ */ React.createElement(SearchIcon, { color: "disabled" })
|
|
48
|
+
),
|
|
49
|
+
/* @__PURE__ */ React.createElement(
|
|
50
|
+
InputBase,
|
|
51
|
+
{
|
|
52
|
+
className: classes.input,
|
|
53
|
+
placeholder: label,
|
|
54
|
+
value: searchQuery,
|
|
55
|
+
inputProps: {
|
|
56
|
+
"aria-label": label,
|
|
57
|
+
onChange: (event) => {
|
|
58
|
+
onSearch(event.target.value);
|
|
59
|
+
setSearchQuery(event.target.value);
|
|
60
|
+
}
|
|
52
61
|
}
|
|
53
62
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
63
|
+
),
|
|
64
|
+
searchQuery && /* @__PURE__ */ React.createElement(
|
|
65
|
+
IconButton,
|
|
66
|
+
{
|
|
67
|
+
type: "button",
|
|
68
|
+
"aria-label": "clear",
|
|
69
|
+
className: classes.iconButton,
|
|
70
|
+
onClick: () => {
|
|
71
|
+
onSearch("");
|
|
72
|
+
setSearchQuery("");
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
/* @__PURE__ */ React.createElement(CloseIcon, null)
|
|
76
|
+
)
|
|
77
|
+
);
|
|
68
78
|
};
|
|
69
79
|
|
|
70
80
|
export { SearchBar };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchBar.esm.js","sources":["../../../src/components/SearchBar/SearchBar.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n IconButton,\n InputBase,\n makeStyles,\n Paper,\n Theme,\n} from '@material-ui/core';\nimport SearchIcon from '@material-ui/icons/Search';\nimport CloseIcon from '@material-ui/icons/Close';\n\nexport type QetaSearchBarClassKeys =\n | 'root'\n | 'input'\n | 'iconButton'\n | 'divider';\n\nconst useStyles = makeStyles(\n (theme: Theme) => ({\n root: {\n padding: '2px 4px',\n display: 'flex',\n alignItems: 'center',\n minWidth: 300,\n boxShadow: 'none',\n },\n input: {\n marginLeft: theme.spacing(1),\n flex: 1,\n },\n iconButton: {\n padding: 5,\n },\n divider: {\n height: 28,\n margin: 4,\n },\n }),\n { name: 'QetaSearchBar' },\n);\n\nexport const SearchBar = (props: {\n label: string;\n onSearch: (query: string) => void;\n}) => {\n const { label, onSearch } = props;\n const [searchQuery, setSearchQuery] = React.useState('');\n const classes = useStyles();\n\n return (\n <Paper
|
|
1
|
+
{"version":3,"file":"SearchBar.esm.js","sources":["../../../src/components/SearchBar/SearchBar.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n IconButton,\n InputBase,\n makeStyles,\n Paper,\n Theme,\n} from '@material-ui/core';\nimport SearchIcon from '@material-ui/icons/Search';\nimport CloseIcon from '@material-ui/icons/Close';\n\nexport type QetaSearchBarClassKeys =\n | 'root'\n | 'input'\n | 'iconButton'\n | 'divider';\n\nconst useStyles = makeStyles(\n (theme: Theme) => ({\n root: {\n padding: '2px 4px',\n display: 'flex',\n alignItems: 'center',\n minWidth: 300,\n boxShadow: 'none',\n },\n input: {\n marginLeft: theme.spacing(1),\n flex: 1,\n },\n iconButton: {\n padding: 5,\n },\n divider: {\n height: 28,\n margin: 4,\n },\n }),\n { name: 'QetaSearchBar' },\n);\n\nexport const SearchBar = (props: {\n label: string;\n onSearch: (query: string) => void;\n}) => {\n const { label, onSearch } = props;\n const [searchQuery, setSearchQuery] = React.useState('');\n const classes = useStyles();\n\n return (\n <Paper\n component=\"form\"\n className={classes.root}\n onSubmit={e => e.preventDefault()}\n >\n <IconButton\n type=\"button\"\n aria-label=\"search\"\n className={classes.iconButton}\n >\n <SearchIcon color=\"disabled\" />\n </IconButton>\n <InputBase\n className={classes.input}\n placeholder={label}\n value={searchQuery}\n inputProps={{\n 'aria-label': label,\n onChange: (\n event: React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>,\n ) => {\n onSearch(event.target.value);\n setSearchQuery(event.target.value);\n },\n }}\n />\n {searchQuery && (\n <IconButton\n type=\"button\"\n aria-label=\"clear\"\n className={classes.iconButton}\n onClick={() => {\n onSearch('');\n setSearchQuery('');\n }}\n >\n <CloseIcon />\n </IconButton>\n )}\n </Paper>\n );\n};\n"],"names":[],"mappings":";;;;;AAiBA,MAAM,SAAY,GAAA,UAAA;AAAA,EAChB,CAAC,KAAkB,MAAA;AAAA,IACjB,IAAM,EAAA;AAAA,MACJ,OAAS,EAAA,SAAA;AAAA,MACT,OAAS,EAAA,MAAA;AAAA,MACT,UAAY,EAAA,QAAA;AAAA,MACZ,QAAU,EAAA,GAAA;AA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AA,KAAA;AAAA,UACd,QAAA,EAAU,CACR,KACG,KAAA;AACH,YAAS,QAAA,CAAA,KAAA,CAAM,OAAO,KAAK,CAAA;AAC3B,YAAe,cAAA,CAAA,KAAA,CAAM,OAAO,KAAK,CAAA;AAAA;AACnC;AACF;AAAA,KACF;AAAA,IACC,WACC,oBAAA,KAAA,CAAA,aAAA;AAAA,MAAC,UAAA;AAAA,MAAA;AAAA,QACC,IAAK,EAAA,QAAA;AAAA,QACL,YAAW,EAAA,OAAA;AAAA,QACX,WAAW,OAAQ,CAAA,UAAA;AAAA,QACnB,SAAS,MAAM;AACb,UAAA,QAAA,CAAS,EAAE,CAAA;AACX,UAAA,cAAA,CAAe,EAAE,CAAA;AAAA;AACnB,OAAA;AAAA,0CAEC,SAAU,EAAA,IAAA;AAAA;AACb,GAEJ;AAEJ;;;;"}
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"frontend",
|
|
8
8
|
"backstage.io"
|
|
9
9
|
],
|
|
10
|
-
"version": "3.17.
|
|
10
|
+
"version": "3.17.3",
|
|
11
11
|
"main": "dist/index.esm.js",
|
|
12
12
|
"types": "dist/index.d.ts",
|
|
13
13
|
"prepublishOnly": "yarn tsc && yarn build",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@backstage/plugin-catalog-react": "^1.15.1",
|
|
57
57
|
"@backstage/plugin-permission-react": "^0.4.30",
|
|
58
58
|
"@backstage/plugin-signals-react": "^0.0.9",
|
|
59
|
-
"@drodil/backstage-plugin-qeta-common": "^3.17.
|
|
59
|
+
"@drodil/backstage-plugin-qeta-common": "^3.17.3",
|
|
60
60
|
"@jsdevtools/rehype-toc": "^3.0.2",
|
|
61
61
|
"@material-ui/core": "^4.12.2",
|
|
62
62
|
"@material-ui/icons": "^4.11.3",
|