Skip to content

Commit 384fdb5

Browse files
committed
feat(react): mutli-index-autocomplete
1 parent 0a656aa commit 384fdb5

File tree

15 files changed

+7750
-0
lines changed

15 files changed

+7750
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
extends: 'algolia/react',
3+
};
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# See https://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
6+
# testing
7+
/coverage
8+
9+
# production
10+
/build
11+
12+
# misc
13+
.DS_Store
14+
.env.local
15+
.env.development.local
16+
.env.test.local
17+
.env.production.local
18+
19+
npm-debug.log*
20+
yarn-debug.log*
21+
yarn-error.log*
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"singleQuote": true,
3+
"proseWrap": "never",
4+
"trailingComma": "es5"
5+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# multi-index-autocomplete
2+
3+
_This project was generated with [create-instantsearch-app](https://github.com/algolia/create-instantsearch-app) by [Algolia](https://algolia.com)._
4+
5+
## Get started
6+
7+
To run this project locally, install the dependencies and run the local server:
8+
9+
```sh
10+
npm install
11+
npm start
12+
```
13+
14+
Alternatively, you may use [Yarn](https://http://yarnpkg.com/):
15+
16+
```sh
17+
yarn
18+
yarn start
19+
```
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "multi-index-autocomplete",
3+
"version": "1.0.0",
4+
"private": true,
5+
"scripts": {
6+
"start": "react-scripts start",
7+
"build": "react-scripts build",
8+
"lint": "eslint .",
9+
"lint:fix": "npm run lint -- --fix"
10+
},
11+
"dependencies": {
12+
"react": "16.4.1",
13+
"react-autosuggest": "9.3.4",
14+
"react-dom": "16.4.1",
15+
"react-instantsearch-dom": "5.2.2",
16+
"react-scripts": "1.1.4"
17+
},
18+
"devDependencies": {
19+
"eslint": "4.19.1",
20+
"eslint-config-algolia": "13.1.0",
21+
"eslint-config-prettier": "2.9.0",
22+
"eslint-plugin-import": "2.13.0",
23+
"eslint-plugin-prettier": "2.6.1",
24+
"eslint-plugin-react": "7.10.0",
25+
"prettier": "1.13.5",
26+
"prop-types": "15.6.2"
27+
}
28+
}
Loading
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="utf-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
7+
<meta name="theme-color" content="#000000">
8+
9+
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
10+
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.png">
11+
12+
<!--
13+
Do not use @7 in production, use a complete version like x.x.x, see website for latest version:
14+
https://community.algolia.com/react-instantsearch/Getting_started.html#load-the-algolia-theme
15+
-->
16+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/instantsearch.css@7/themes/algolia-min.css">
17+
18+
<title>multi-index-autocomplete</title>
19+
</head>
20+
21+
<body>
22+
<noscript>
23+
You need to enable JavaScript to run this app.
24+
</noscript>
25+
26+
<div id="root"></div>
27+
</body>
28+
29+
</html>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"short_name": "multi-index-autocomplete",
3+
"name": "multi-index-autocomplete Sample",
4+
"icons": [
5+
{
6+
"src": "favicon.png",
7+
"sizes": "64x64 32x32 24x24 16x16",
8+
"type": "image/x-icon"
9+
}
10+
],
11+
"start_url": "./index.html",
12+
"display": "standalone",
13+
"theme_color": "#000000",
14+
"background_color": "#ffffff"
15+
}
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
h1 {
2+
margin-bottom: 1rem;
3+
}
4+
5+
em {
6+
background: cyan;
7+
font-style: normal;
8+
}
9+
10+
.ais-InstantSearch__root {
11+
max-width: 1200px;
12+
margin: 0 auto;
13+
padding: 1rem;
14+
}
15+
16+
.react-autosuggest__container {
17+
position: relative;
18+
}
19+
20+
.react-autosuggest__input {
21+
width: 100%;
22+
box-sizing: border-box;
23+
padding: 20px 20px;
24+
font-family: Helvetica, sans-serif;
25+
font-weight: 300;
26+
font-size: 16px;
27+
border: 1px solid #aaa;
28+
border-radius: 4px;
29+
}
30+
31+
.react-autosuggest__input--focused {
32+
outline: none;
33+
}
34+
35+
.react-autosuggest__input--open {
36+
border-bottom-left-radius: 0;
37+
border-bottom-right-radius: 0;
38+
}
39+
40+
.react-autosuggest__suggestions-container {
41+
display: none;
42+
}
43+
44+
.react-autosuggest__suggestions-container--open {
45+
display: block;
46+
position: absolute;
47+
box-sizing: border-box;
48+
top: 51px;
49+
width: 100%;
50+
border: 1px solid #aaa;
51+
background-color: #fff;
52+
font-family: Helvetica, sans-serif;
53+
font-weight: 300;
54+
font-size: 16px;
55+
border-bottom-left-radius: 4px;
56+
border-bottom-right-radius: 4px;
57+
z-index: 2;
58+
}
59+
60+
.react-autosuggest__section-title {
61+
padding: 10px 20px;
62+
font-weight: 600;
63+
}
64+
65+
.react-autosuggest__suggestions-list {
66+
margin: 0;
67+
padding: 0;
68+
list-style-type: none;
69+
}
70+
71+
.react-autosuggest__suggestion {
72+
cursor: pointer;
73+
padding: 10px 20px;
74+
}
75+
76+
.react-autosuggest__suggestion--highlighted {
77+
background-color: #ddd;
78+
}

0 commit comments

Comments
 (0)