-
Notifications
You must be signed in to change notification settings - Fork 326
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
github-actions-bot
committed
Aug 7, 2023
1 parent
df4e7b8
commit 689f3d8
Showing
3 changed files
with
219 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,167 @@ | ||
/** | ||
* Base | ||
*/ | ||
html { | ||
width: 100%; | ||
height: 100%; | ||
overflow: hidden-x; | ||
text-align: center; | ||
} | ||
|
||
body { | ||
display: -webkit-box; | ||
display: -webkit-flex; | ||
display: -ms-flexbox; | ||
display: flex; | ||
-webkit-box-align: center; | ||
-webkit-align-items: center; | ||
-ms-flex-align: center; | ||
align-items: center; | ||
-webkit-box-pack: center; | ||
-webkit-justify-content: center; | ||
-ms-flex-pack: center; | ||
justify-content: center; | ||
width: 100%; | ||
height: 100%; | ||
} | ||
|
||
.container { | ||
-webkit-box-flex: 0; | ||
-webkit-flex: 0 0 auto; | ||
-ms-flex: 0 0 auto; | ||
flex: 0 0 auto; | ||
max-width: 576px; | ||
max-width: 36rem; | ||
} | ||
|
||
h1 { | ||
font-size: 64px; | ||
font-size: 4rem; | ||
margin-bottom: 0.5em; | ||
color: var(--ubilabs-green); | ||
} | ||
|
||
.subheader { | ||
margin-bottom: 1.5em; | ||
font-weight: 400; | ||
} | ||
|
||
input[type='text'] { | ||
/** Reset Ubilabs input styles */ | ||
background-color: initial; | ||
border-radius: initial; | ||
color: initial; | ||
font-family: initial; | ||
font-size: initial; | ||
height: initial; | ||
line-height: initial; | ||
max-width: initial; | ||
outline: initial; | ||
font: inherit; | ||
/** Set Geosuggest styles */ | ||
width: 100%; | ||
border: 2px solid transparent; | ||
box-shadow: 0 0 1px #3d464d; | ||
padding: 0.5em 1em; | ||
-webkit-transition: | ||
border 0.2s, | ||
box-shadow 0.2s; | ||
transition: | ||
border 0.2s, | ||
box-shadow 0.2s; | ||
} | ||
input[type='text']:focus-visible { | ||
/** Set Geosuggest styles */ | ||
border-color: #267dc0; | ||
box-shadow: 0 0 0 transparent; | ||
} | ||
|
||
.hint { | ||
color: var(--ubilabs-gray-dark-1); | ||
margin: 2em 0; | ||
} | ||
|
||
.footer { | ||
font-weight: 300; | ||
padding-top: 2em; | ||
margin-top: 2em; | ||
border-top: 1px solid var(--ubilabs-gray); | ||
} | ||
|
||
.ubilabs { | ||
height: 1em; | ||
margin: 0.05em 0.25em; | ||
vertical-align: text-top; | ||
} | ||
/** | ||
* The geosuggest module | ||
* NOTE: duplicated font-sizes' are for browsers which don't support rem (only IE 8) | ||
*/ | ||
.geosuggest { | ||
font-size: 18px; | ||
font-size: 1rem; | ||
position: relative; | ||
width: 50%; | ||
margin: 1em auto; | ||
text-align: left; | ||
} | ||
.geosuggest__input { | ||
width: 100%; | ||
border: 2px solid transparent; | ||
box-shadow: 0 0 1px #3d464d; | ||
padding: .5em 1em; | ||
-webkit-transition: border 0.2s, box-shadow 0.2s; | ||
transition: border 0.2s, box-shadow 0.2s; | ||
} | ||
.geosuggest__input:focus { | ||
border-color: #267dc0; | ||
box-shadow: 0 0 0 transparent; | ||
} | ||
.geosuggest__suggests { | ||
position: absolute; | ||
top: 100%; | ||
left: 0; | ||
right: 0; | ||
max-height: 25em; | ||
padding: 0; | ||
margin-top: -1px; | ||
background: #fff; | ||
border: 2px solid #267dc0; | ||
border-top-width: 0; | ||
overflow-x: hidden; | ||
overflow-y: auto; | ||
list-style: none; | ||
z-index: 5; | ||
-webkit-transition: max-height 0.2s, border 0.2s; | ||
transition: max-height 0.2s, border 0.2s; | ||
} | ||
.geosuggest__suggests--hidden { | ||
max-height: 0; | ||
overflow: hidden; | ||
border-width: 0; | ||
} | ||
|
||
/** | ||
* A geosuggest item | ||
*/ | ||
.geosuggest__item { | ||
font-size: 18px; | ||
font-size: 1rem; | ||
padding: .5em .65em; | ||
cursor: pointer; | ||
} | ||
.geosuggest__item:hover, | ||
.geosuggest__item:focus { | ||
background: #f5f5f5; | ||
} | ||
.geosuggest__item--active { | ||
background: #267dc0; | ||
color: #fff; | ||
} | ||
.geosuggest__item--active:hover, | ||
.geosuggest__item--active:focus { | ||
background: #ccc; | ||
} | ||
.geosuggest__item__matched-text { | ||
font-weight: bold; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<!doctype html> | ||
<head> | ||
<title>React Geosuggest</title> | ||
<link | ||
href="https://fonts.googleapis.com/css?family=Roboto:300,100,700" | ||
rel="stylesheet" | ||
type="text/css" /> | ||
<link | ||
rel="stylesheet" | ||
href="https://ui-components.ubilabs.com/css/v1/ubilabs-styles.css" /> | ||
<link rel="stylesheet" href="app.css" /> | ||
<script src="https://maps.googleapis.com/maps/api/js?libraries=places&key=AIzaSyBG0SybP0EKWH3Jvwki7IR5AMyO_cUeeQc"></script> | ||
<script | ||
crossorigin | ||
src="https://unpkg.com/react@18/umd/react.production.min.js"></script> | ||
<script | ||
crossorigin | ||
src="https://unpkg.com/react-dom@18/umd/react-dom.production.min.js"></script> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<h1>React Geosuggest</h1> | ||
<h2 class="subheader"> | ||
Google Places Suggest for | ||
<a href="https://reactjs.org/" title="React.js" target="_blank"> | ||
React.js</a | ||
>,<br /> | ||
supporting default places. | ||
</h2> | ||
<div id="app"></div> | ||
<div class="hint">Check the console when selecting a suggest!</div> | ||
<div class="footer"> | ||
<a href="https://github.com/ubilabs/react-geosuggest" target="_blank"> | ||
View project on GitHub</a | ||
>. Made by | ||
<a href="https://ubilabs.com" title="Ubilabs" target="_blank"> | ||
<img src="ubilabs.svg" alt="Ubilabs" class="ubilabs" /> | ||
</a> | ||
</div> | ||
</div> | ||
|
||
<script src="app.js"></script> | ||
</body> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.