-
-
Notifications
You must be signed in to change notification settings - Fork 490
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #206 from webpack-contrib/search
Version 3
- Loading branch information
Showing
72 changed files
with
12,852 additions
and
7,389 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
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 |
---|---|---|
@@ -1,7 +1,4 @@ | ||
{ | ||
"root": true, | ||
"extends": "th0r", | ||
"rules": { | ||
"object-curly-spacing": ["error", "always"] | ||
} | ||
"extends": "th0r" | ||
} |
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
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
lib | ||
public | ||
samples | ||
/lib | ||
/public | ||
/samples | ||
node_modules | ||
npm-debug.log |
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
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,26 @@ | ||
.button { | ||
background: #fff; | ||
border: 1px solid #aaa; | ||
border-radius: 4px; | ||
cursor: pointer; | ||
display: inline-block; | ||
font: var(--main-font); | ||
outline: none; | ||
padding: 5px 7px; | ||
transition: background .3s ease; | ||
white-space: nowrap; | ||
} | ||
|
||
.button:focus, | ||
.button:hover { | ||
background: #ffefd7; | ||
} | ||
|
||
.button.active { | ||
background: #ffa500; | ||
color: #000; | ||
} | ||
|
||
.button[disabled] { | ||
cursor: default; | ||
} |
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,41 @@ | ||
/** @jsx h */ | ||
import {h} from 'preact'; | ||
import cls from 'classnames'; | ||
import s from './Button.css'; | ||
import PureComponent from '../lib/PureComponent'; | ||
|
||
export default class Button extends PureComponent { | ||
render({active, toggle, className, children, ...props}) { | ||
const classes = cls(className, { | ||
[s.button]: true, | ||
[s.active]: active, | ||
[s.toggle]: toggle | ||
}); | ||
|
||
return ( | ||
<button {...props} | ||
ref={this.saveRef} | ||
type="button" | ||
className={classes} | ||
disabled={this.disabled} | ||
onClick={this.handleClick}> | ||
{children} | ||
</button> | ||
); | ||
} | ||
|
||
get disabled() { | ||
const {props} = this; | ||
return ( | ||
props.disabled || | ||
(props.active && !props.toggle) | ||
); | ||
} | ||
|
||
handleClick = (event) => { | ||
this.elem.blur(); | ||
this.props.onClick(event); | ||
} | ||
|
||
saveRef = elem => this.elem = elem; | ||
} |
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,15 @@ | ||
.label { | ||
cursor: pointer; | ||
display: inline-block; | ||
} | ||
|
||
.checkbox { | ||
cursor: pointer; | ||
} | ||
|
||
.itemText { | ||
margin-left: 3px; | ||
position: relative; | ||
top: -2px; | ||
vertical-align: middle; | ||
} |
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,29 @@ | ||
/** @jsx h */ | ||
import {h, Component} from 'preact'; | ||
import cls from 'classnames'; | ||
|
||
import s from './Checkbox.css'; | ||
|
||
export default class Checkbox extends Component { | ||
|
||
render() { | ||
const {checked, className, children} = this.props; | ||
|
||
return ( | ||
<label className={cls(s.label, className)}> | ||
<input className={s.checkbox} | ||
type="checkbox" | ||
checked={checked} | ||
onChange={this.handleChange}/> | ||
<span className={s.itemText}> | ||
{children} | ||
</span> | ||
</label> | ||
); | ||
} | ||
|
||
handleChange = () => { | ||
this.props.onChange(!this.props.checked); | ||
} | ||
|
||
} |
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
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
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
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,4 @@ | ||
.icon { | ||
background: no-repeat center/contain; | ||
display: inline-block; | ||
} |
Oops, something went wrong.