rc-trigger
Advanced tools
Comparing version 0.0.0 to 0.1.0
{ | ||
"name": "rc-trigger", | ||
"version": "0.0.0", | ||
"version": "0.1.0", | ||
"description": "base abstract trigger component for react", | ||
@@ -20,7 +20,9 @@ "keywords": [ | ||
}, | ||
"files":["lib", "assets/*.css"], | ||
"files": [ | ||
"lib", | ||
"assets/*.css" | ||
], | ||
"licenses": "MIT", | ||
"main":"./lib/index", | ||
"config":{ | ||
"main": "./lib/index", | ||
"config": { | ||
"port": 8200 | ||
@@ -40,4 +42,7 @@ }, | ||
"devDependencies": { | ||
"async": "~1.5.0", | ||
"expect.js": "0.3.x", | ||
"precommit-hook-eslint": "3.x", | ||
"jquery": "~1.11.3", | ||
"object-assign": "~4.0.1", | ||
"pre-commit": "1.x", | ||
"rc-server": "3.x", | ||
@@ -51,3 +56,8 @@ "rc-tools": "4.x", | ||
"lint" | ||
] | ||
], | ||
"dependencies": { | ||
"rc-align": "2.x", | ||
"rc-animate": "2.x", | ||
"rc-util": "2.x" | ||
} | ||
} |
113
README.md
@@ -13,6 +13,3 @@ # rc-trigger | ||
[![npm download][download-image]][download-url] | ||
[![Sauce Test Status](https://saucelabs.com/buildstatus/rc-trigger)](https://saucelabs.com/u/rc-trigger) | ||
[![Sauce Test Status](https://saucelabs.com/browser-matrix/rc-trigger.svg)](https://saucelabs.com/u/rc-trigger) | ||
[npm-image]: http://img.shields.io/npm/v/rc-trigger.svg?style=flat-square | ||
@@ -38,7 +35,3 @@ [npm-url]: http://npmjs.org/package/rc-trigger | ||
## Screenshots | ||
<img src="" width="288"/> | ||
## Development | ||
@@ -53,5 +46,4 @@ | ||
http://localhost:8000/examples/ | ||
http://localhost:8200/examples/ | ||
online example: http://react-component.github.io/trigger/examples/ | ||
@@ -64,8 +56,5 @@ | ||
### Keyboard | ||
## install | ||
[![rc-trigger](https://nodei.co/npm/rc-trigger.png)](https://npmjs.org/package/rc-trigger) | ||
@@ -79,3 +68,9 @@ | ||
var React = require('react'); | ||
React.render(<Trigger />, container); | ||
var ReactDOM = require('react-dom') | ||
ReactDOM.render(<Trigger align={{ | ||
points: ['tl', 'bl'], | ||
offset: [0, 3] | ||
}} trigger={['click']} popup={<span>popup</span>}> | ||
<a href='#'>hover</a> | ||
</Tooltip>, container); | ||
``` | ||
@@ -98,7 +93,91 @@ | ||
<tr> | ||
<td>className</td> | ||
<td>popupClassName</td> | ||
<td>string</td> | ||
<td></td> | ||
<td>additional className added to popup</td> | ||
</tr> | ||
<tr> | ||
<td>destroyPopupOnHide</td> | ||
<td>boolean</td> | ||
<td>false</td> | ||
<td>whether destroy popup when hide</td> | ||
</tr> | ||
<tr> | ||
<td>getPopupClassNameFromAlign</td> | ||
<td>getPopupClassNameFromAlign(align: Object):String</td> | ||
<td></td> | ||
<td>additional className added to popup according to align</td> | ||
</tr> | ||
<tr> | ||
<td>action</td> | ||
<td>string[]</td> | ||
<td>['hover']</td> | ||
<td>which actions cause popup shown. enum of 'hover','click','focus'</td> | ||
</tr> | ||
<tr> | ||
<td>mouseEnterDelay</td> | ||
<td>number</td> | ||
<td>0</td> | ||
<td>delay time to show when mouse enter. unit: s.</td> | ||
</tr> | ||
<tr> | ||
<td>mouseLeaveDelay</td> | ||
<td>number</td> | ||
<td>0.1</td> | ||
<td>delay time to hide when mouse leave. unit: s.</td> | ||
</tr> | ||
<tr> | ||
<td>popupStyle</td> | ||
<td>Object</td> | ||
<td></td> | ||
<td>additional style of popup</td> | ||
</tr> | ||
<tr> | ||
<td>prefixCls</td> | ||
<td>String</td> | ||
<td>rc-trigger-popup</td> | ||
<td>prefix class name</td> | ||
</tr> | ||
<tr> | ||
<td>popupTransitionName</td> | ||
<td>String</td> | ||
<td></td> | ||
<td>additional css class of root dom node</td> | ||
<td>same as https://github.com/react-component/animate</td> | ||
</tr> | ||
<tr> | ||
<td>onPopupVisibleChange</td> | ||
<td>Function</td> | ||
<td></td> | ||
<td>call when popup visible is changed</td> | ||
</tr> | ||
<tr> | ||
<td>popupVisible</td> | ||
<td>boolean</td> | ||
<td></td> | ||
<td>whether popup is visible</td> | ||
</tr> | ||
<tr> | ||
<td>defaultPopupVisible</td> | ||
<td>boolean</td> | ||
<td></td> | ||
<td>whether popup is visible initially</td> | ||
</tr> | ||
<tr> | ||
<td>popupAlign</td> | ||
<td>Object: alignConfig of [dom-align](https://github.com/yiminghe/dom-align)</td> | ||
<td></td> | ||
<td>popup 's align config</td> | ||
</tr> | ||
<tr> | ||
<td>popup</td> | ||
<td>React.Element</td> | ||
<td></td> | ||
<td>popup content</td> | ||
</tr> | ||
<tr> | ||
<td>getPopupContainer</td> | ||
<td>getPopupContainer(): HTMLElement</td> | ||
<td></td> | ||
<td>function returning html node which will act as popup container</td> | ||
</tr> | ||
</tbody> | ||
@@ -110,7 +189,7 @@ </table> | ||
http://localhost:8000/tests/runner.html?coverage | ||
http://localhost:8200/tests/runner.html?coverage | ||
## Coverage | ||
http://localhost:8000/node_modules/rc-server/node_modules/node-jscover/lib/front-end/jscoverage.html?w=http://localhost:8000/tests/runner.html?coverage | ||
http://localhost:8200/node_modules/rc-server/node_modules/node-jscover/lib/front-end/jscoverage.html?w=http://localhost:8200/tests/runner.html?coverage | ||
@@ -117,0 +196,0 @@ ## License |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
24018
7
500
192
3
10
+ Addedrc-align@2.x
+ Addedrc-animate@2.x
+ Addedrc-util@2.x
+ Addedadd-dom-event-listener@1.1.0(transitive)
+ Addedbabel-runtime@6.26.0(transitive)
+ Addedclassnames@2.5.1(transitive)
+ Addedcomponent-classes@1.2.6(transitive)
+ Addedcomponent-indexof@0.0.3(transitive)
+ Addedcore-js@2.6.12(transitive)
+ Addedcss-animation@1.6.1(transitive)
+ Addeddom-align@1.12.4(transitive)
+ Addedjs-tokens@4.0.0(transitive)
+ Addedloose-envify@1.4.0(transitive)
+ Addedobject-assign@4.1.1(transitive)
+ Addedperformance-now@2.1.0(transitive)
+ Addedprop-types@15.8.1(transitive)
+ Addedraf@3.4.1(transitive)
+ Addedrc-align@2.4.5(transitive)
+ Addedrc-animate@2.11.1(transitive)
+ Addedrc-util@2.1.14.21.1(transitive)
+ Addedreact-is@16.13.1(transitive)
+ Addedreact-lifecycles-compat@3.0.4(transitive)
+ Addedregenerator-runtime@0.11.1(transitive)
+ Addedshallowequal@1.1.0(transitive)