c.clientWidth||"scroll"===[a.overflow,a.overflowX]||this.target!==document.body,r=0,n&&(r=15),i=t.height-parseFloat(a.borderTopWidth)-parseFloat(a.borderBottomWidth)-r,o={width:15,height:.975*i*(i/c.scrollHeight),left:t.left+t.width-parseFloat(a.borderLeftWidth)-15},e=0,408>i&&this.target===document.body&&(e=-11e-5*Math.pow(i,2)-.00727*i+22.58),this.target!==document.body&&(o.height=Math.max(o.height,24)),s=this.target.scrollTop/(c.scrollHeight-i),o.top=s*(i-o.height-e)+t.top+parseFloat(a.borderTopWidth),this.target===document.body&&(o.height=Math.max(o.height,24)),o}},t.prototype.clearCache=function(){return this._cache={}},t.prototype.cache=function(t,e){return null==this._cache&&(this._cache={}),null==this._cache[t]&&(this._cache[t]=e.call(this)),this._cache[t]},t.prototype.enable=function(t){return null==t&&(t=!0),o(this.target,this.getClass("enabled")),o(this.element,this.getClass("enabled")),this.enabled=!0,this.scrollParent!==document&&this.scrollParent.addEventListener("scroll",this.position),t?this.position():void 0},t.prototype.disable=function(){return O(this.target,this.getClass("enabled")),O(this.element,this.getClass("enabled")),this.enabled=!1,null!=this.scrollParent?this.scrollParent.removeEventListener("scroll",this.position):void 0},t.prototype.destroy=function(){var t,e,n,i,o;for(this.disable(),o=[],t=n=0,i=C.length;i>n;t=++n){if(e=C[t],e===this){C.splice(t,1);break}o.push(void 0)}return o},t.prototype.updateAttachClasses=function(t,e){var n,i,o,r,s,a,l,u,p,h=this;for(null==t&&(t=this.attachment),null==e&&(e=this.targetAttachment),r=["left","top","bottom","right","middle","center"],(null!=(p=this._addAttachClasses)?p.length:void 0)&&this._addAttachClasses.splice(0,this._addAttachClasses.length),n=null!=this._addAttachClasses?this._addAttachClasses:this._addAttachClasses=[],t.top&&n.push(""+this.getClass("element-attached")+"-"+t.top),t.left&&n.push(""+this.getClass("element-attached")+"-"+t.left),e.top&&n.push(""+this.getClass("target-attached")+"-"+e.top),e.left&&n.push(""+this.getClass("target-attached")+"-"+e.left),i=[],s=0,l=r.length;l>s;s++)o=r[s],i.push(""+this.getClass("element-attached")+"-"+o);for(a=0,u=r.length;u>a;a++)o=r[a],i.push(""+this.getClass("target-attached")+"-"+o);return c(function(){return null!=h._addAttachClasses?(S(h.element,h._addAttachClasses,i),S(h.target,h._addAttachClasses,i),h._addAttachClasses=void 0):void 0})},t.prototype.position=function(t){var e,n,o,c,l,f,g,m,v,y,w,E,O,C,x,S,A,N,T,M,D,P,I,_,j,L,k,U,W,F,B,z,q,H,R,V=this;if(null==t&&(t=!0),this.enabled){for(this.clearCache(),M=a(this.targetAttachment,this.attachment),this.updateAttachClasses(this.attachment,M),e=this.cache("element-bounds",function(){return p(V.element)}),j=e.width,o=e.height,0===j&&0===o&&null!=this.lastSize?(F=this.lastSize,j=F.width,o=F.height):this.lastSize={width:j,height:o},I=P=this.cache("target-bounds",function(){return V.getTargetBounds()}),v=b(s(this.attachment),{width:j,height:o}),D=b(s(M),I),l=b(this.offset,{width:j,height:o}),f=b(this.targetOffset,I),v=r(v,l),D=r(D,f),c=P.left+D.left-v.left,_=P.top+D.top-v.top,B=i.modules,L=0,U=B.length;U>L;L++)if(g=B[L],x=g.position.call(this,{left:c,top:_,targetAttachment:M,targetPos:P,attachment:this.attachment,elementPos:e,offset:v,targetOffset:D,manualOffset:l,manualTargetOffset:f,scrollbarSize:N}),null!=x&&"object"==typeof x){if(x===!1)return!1;_=x.top,c=x.left}if(m={page:{top:_,left:c},viewport:{top:_-pageYOffset,bottom:pageYOffset-_-o+innerHeight,left:c-pageXOffset,right:pageXOffset-c-j+innerWidth}},document.body.scrollWidth>window.innerWidth&&(N=this.cache("scrollbar-size",d),m.viewport.bottom-=N.height),document.body.scrollHeight>window.innerHeight&&(N=this.cache("scrollbar-size",d),m.viewport.right-=N.width),(""!==(z=document.body.style.position)&&"static"!==z||""!==(q=document.body.parentElement.style.position)&&"static"!==q)&&(m.page.bottom=document.body.scrollHeight-_-o,m.page.right=document.body.scrollWidth-c-j),(null!=(H=this.options.optimizations)?H.moveElement:void 0)!==!1&&null==this.targetModifier){for(w=this.cache("target-offsetparent",function(){return h(V.target)}),C=this.cache("target-offsetparent-bounds",function(){return p(w)}),O=getComputedStyle(w),n=getComputedStyle(this.element),E=C,y={},R=["Top","Left","Bottom","Right"],k=0,W=R.length;W>k;k++)T=R[k],y[T.toLowerCase()]=parseFloat(O["border"+T+"Width"]);C.right=document.body.scrollWidth-C.left-E.width+y.right,C.bottom=document.body.scrollHeight-C.top-E.height+y.bottom,m.page.top>=C.top+y.top&&m.page.bottom>=C.bottom&&m.page.left>=C.left+y.left&&m.page.right>=C.right&&(A=w.scrollTop,S=w.scrollLeft,m.offset={top:m.page.top-C.top+A-y.top,left:m.page.left-C.left+S-y.left})}return this.move(m),this.history.unshift(m),this.history.length>3&&this.history.pop(),t&&u(),!0}},t.prototype.move=function(t){var e,n,i,o,r,s,a,u,p,f,d,g,m,v,b,y,w,E=this;if(null!=this.element.parentNode){u={};for(f in t){u[f]={};for(o in t[f]){for(i=!1,y=this.history,v=0,b=y.length;b>v;v++)if(a=y[v],!A(null!=(w=a[f])?w[o]:void 0,t[f][o])){i=!0;break}i||(u[f][o]=!0)}}e={top:"",left:"",right:"",bottom:""},p=function(t,n){var i,o,r;return(null!=(r=E.options.optimizations)?r.gpu:void 0)===!1?(t.top?e.top=""+n.top+"px":e.bottom=""+n.bottom+"px",t.left?e.left=""+n.left+"px":e.right=""+n.right+"px"):(t.top?(e.top=0,o=n.top):(e.bottom=0,o=-n.bottom),t.left?(e.left=0,i=n.left):(e.right=0,i=-n.right),e[x]="translateX("+Math.round(i)+"px) translateY("+Math.round(o)+"px)","msTransform"!==x?e[x]+=" translateZ(0)":void 0)},r=!1,(u.page.top||u.page.bottom)&&(u.page.left||u.page.right)?(e.position="absolute",p(u.page,t.page)):(u.viewport.top||u.viewport.bottom)&&(u.viewport.left||u.viewport.right)?(e.position="fixed",p(u.viewport,t.viewport)):null!=u.offset&&u.offset.top&&u.offset.left?(e.position="absolute",s=this.cache("target-offsetparent",function(){return h(E.target)}),h(this.element)!==s&&c(function(){return E.element.parentNode.removeChild(E.element),s.appendChild(E.element)}),p(u.offset,t.offset),r=!0):(e.position="absolute",p({top:!0,left:!0},t.page)),r||"BODY"===this.element.parentNode.tagName||(this.element.parentNode.removeChild(this.element),document.body.appendChild(this.element)),m={},g=!1;for(o in e)d=e[o],n=this.element.style[o],""===n||""===d||"top"!==o&&"left"!==o&&"bottom"!==o&&"right"!==o||(n=parseFloat(n),d=parseFloat(d)),n!==d&&(g=!0,m[o]=e[o]);return g?c(function(){return l(E.element.style,m)}):void 0}},t}(),i.position=E,this.Tether=l(N,i)}.call(this),function(){var t,e,n,i,o,r,s,a,c,l,u=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};l=this.Tether.Utils,s=l.getOuterSize,r=l.getBounds,a=l.getSize,i=l.extend,c=l.updateClasses,n=l.defer,e={left:"right",right:"left",top:"bottom",bottom:"top",middle:"middle"},t=["left","top","right","bottom"],o=function(e,n){var i,o,s,a,c,l,u;if("scrollParent"===n?n=e.scrollParent:"window"===n&&(n=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),n===document&&(n=n.documentElement),null!=n.nodeType)for(o=a=r(n),c=getComputedStyle(n),n=[o.left,o.top,a.width+o.left,a.height+o.top],i=l=0,u=t.length;u>l;i=++l)s=t[i],s=s[0].toUpperCase()+s.substr(1),"Top"===s||"Left"===s?n[i]+=parseFloat(c["border"+s+"Width"]):n[i]-=parseFloat(c["border"+s+"Width"]);return n},this.Tether.modules.push({position:function(e){var s,a,l,p,h,f,d,g,m,v,b,y,w,E,O,C,x,S,A,N,T,M,D,P,I,_,j,L,k,U,W,F,B,z,q,H,R,V,X,G,Y,$,Z,J,K,Q,tt,et=this;if(_=e.top,b=e.left,T=e.targetAttachment,!this.options.constraints)return!0;for(S=function(e){var n,i,o,r;for(et.removeClass(e),r=[],i=0,o=t.length;o>i;i++)n=t[i],r.push(et.removeClass(""+e+"-"+n));return r},G=this.cache("element-bounds",function(){return r(et.element)}),v=G.height,j=G.width,0===j&&0===v&&null!=this.lastSize&&(Y=this.lastSize,j=Y.width,v=Y.height),D=this.cache("target-bounds",function(){return et.getTargetBounds()}),M=D.height,P=D.width,N={},m={},a=[this.getClass("pinned"),this.getClass("out-of-bounds")],$=this.options.constraints,L=0,F=$.length;F>L;L++)g=$[L],g.outOfBoundsClass&&a.push(g.outOfBoundsClass),g.pinnedClass&&a.push(g.pinnedClass);for(k=0,B=a.length;B>k;k++)for(d=a[k],Z=["left","top","right","bottom"],U=0,z=Z.length;z>U;U++)A=Z[U],a.push(""+d+"-"+A);for(s=[],N=i({},T),m=i({},this.attachment),J=this.options.constraints,W=0,q=J.length;q>W;W++){if(g=J[W],I=g.to,l=g.attachment,O=g.pin,null==l&&(l=""),u.call(l," ")>=0?(K=l.split(" "),f=K[0],h=K[1]):h=f=l,p=o(this,I),("target"===f||"both"===f)&&(_p[3]&&"bottom"===N.top&&(_-=M,N.top="top")),"together"===f&&(_
p[3]&&"bottom"===N.top&&("top"===m.top?(_-=M,N.top="top",_-=v,m.top="bottom"):"bottom"===m.top&&(_-=M,N.top="top",_+=v,m.top="top")),"middle"===N.top&&(_+v>p[3]&&"top"===m.top?(_-=v,m.top="bottom"):_
p[2]&&"right"===N.left&&(b-=P,N.left="left")),"together"===h&&(b
p[2]&&"right"===N.left?"left"===m.left?(b-=P,N.left="left",b-=j,m.left="right"):"right"===m.left&&(b-=P,N.left="left",b+=j,m.left="left"):"center"===N.left&&(b+j>p[2]&&"left"===m.left?(b-=j,m.left="right"):b
p[3]&&"top"===m.top&&(_-=v,m.top="bottom")),("element"===h||"both"===h)&&(b
p[2]&&"left"===m.left&&(b-=j,m.left="right")),"string"==typeof O?O=function(){var t,e,n,i;for(n=O.split(","),i=[],e=0,t=n.length;t>e;e++)E=n[e],i.push(E.trim());return i}():O===!0&&(O=["top","left","right","bottom"]),O||(O=[]),C=[],y=[],_
=0?(_=p[1],C.push("top")):y.push("top")),_+v>p[3]&&(u.call(O,"bottom")>=0?(_=p[3]-v,C.push("bottom")):y.push("bottom")),b
=0?(b=p[0],C.push("left")):y.push("left")),b+j>p[2]&&(u.call(O,"right")>=0?(b=p[2]-j,C.push("right")):y.push("right")),C.length)for(x=null!=(Q=this.options.pinnedClass)?Q:this.getClass("pinned"),s.push(x),V=0,H=C.length;H>V;V++)A=C[V],s.push(""+x+"-"+A);if(y.length)for(w=null!=(tt=this.options.outOfBoundsClass)?tt:this.getClass("out-of-bounds"),s.push(w),X=0,R=y.length;R>X;X++)A=y[X],s.push(""+w+"-"+A);(u.call(C,"left")>=0||u.call(C,"right")>=0)&&(m.left=N.left=!1),(u.call(C,"top")>=0||u.call(C,"bottom")>=0)&&(m.top=N.top=!1),(N.top!==T.top||N.left!==T.left||m.top!==this.attachment.top||m.left!==this.attachment.left)&&this.updateAttachClasses(m,N)}return n(function(){return c(et.target,s,a),c(et.element,s,a)}),{top:_,left:b}}})}.call(this),function(){var t,e,n,i;i=this.Tether.Utils,e=i.getBounds,n=i.updateClasses,t=i.defer,this.Tether.modules.push({position:function(i){var o,r,s,a,c,l,u,p,h,f,d,g,m,v,b,y,w,E,O,C,x,S,A,N,T,M=this;if(d=i.top,l=i.left,x=this.cache("element-bounds",function(){return e(M.element)}),c=x.height,g=x.width,f=this.getTargetBounds(),a=d+c,u=l+g,o=[],d<=f.bottom&&a>=f.top)for(S=["left","right"],m=0,w=S.length;w>m;m++)p=S[m],((A=f[p])===l||A===u)&&o.push(p);if(l<=f.right&&u>=f.left)for(N=["top","bottom"],v=0,E=N.length;E>v;v++)p=N[v],((T=f[p])===d||T===a)&&o.push(p);for(s=[],r=[],h=["left","top","right","bottom"],s.push(this.getClass("abutted")),b=0,O=h.length;O>b;b++)p=h[b],s.push(""+this.getClass("abutted")+"-"+p);for(o.length&&r.push(this.getClass("abutted")),y=0,C=o.length;C>y;y++)p=o[y],r.push(""+this.getClass("abutted")+"-"+p);return t(function(){return n(M.target,r,s),n(M.element,r,s)}),!0}})}.call(this),function(){this.Tether.modules.push({position:function(t){var e,n,i,o,r,s,a;return s=t.top,e=t.left,this.options.shift?(n=function(t){return"function"==typeof t?t.call(this,{top:s,left:e}):t},i=n(this.options.shift),"string"==typeof i?(i=i.split(" "),i[1]||(i[1]=i[0]),r=i[0],o=i[1],r=parseFloat(r,10),o=parseFloat(o,10)):(a=[i.top,i.left],r=a[0],o=a[1]),s+=r,e+=o,{top:s,left:e}):void 0}})}.call(this),this.Tether})},function(t,e,n){"use strict";var i=n(2),o=n(3),r=i.createClass({displayName:"Tabs",getInitialState:function(){return{selectedTab:0,content:null}},selectTab:function(t){this.setState(t)},render:function(){var t=i.Children.map(this.props.children,function(t,e){return o(t,{active:e===this.state.selectedTab,index:e,selectTab:this.selectTab})}.bind(this));return i.createElement("div",null,i.createElement("div",{className:"tabs"},t),i.createElement("div",null,this.state.content))}});t.exports=r,r.Tab=n(42)},function(t,e,n){"use strict";var i=n(2),o=n(!function(){var t=new Error('Cannot find module "react/lib/cx"');throw t.code="MODULE_NOT_FOUND",t}()),r=i.createClass({displayName:"Tab",componentDidMount:function(){this.props.active&&this.select()},select:function(){var t={selectedTab:this.props.index,content:this.props.children};this.props.selectTab(t)},render:function(){var t={"tab-item":!0,"is-active":this.props.active};return i.createElement("div",{className:o(t),onClick:this.select},this.props.title)}});t.exports=r},function(t,e,n){"use strict";var i=n(2),o=n(3),r=n(16),s=n(44),a=i.createClass({displayName:"Trigger",getDefaultProps:function(){return{open:null,close:null,toggle:null,hardToggle:null,popupToggle:null,notify:null}},getCloseId:function(){if(this.props.close)return this.props.close;for(var t=!1,e=this.getDOMNode().parentNode;t===!1;)"BODY"==e.nodeName&&(t=""),"undefined"!=typeof e.getAttribute("data-closable")&&e.getAttribute("data-closable")!==!1&&(t=e),e=e.parentNode;return t.getAttribute("id")},clickHandler:function(t){t.preventDefault(),this.props.open?r.publish(this.props.open,"open"):null!==this.props.close?r.publish(this.getCloseId(),"close"):this.props.toggle?r.publish(this.props.toggle,"toggle"):this.props.hardToggle?(r.closeActiveElements({exclude:this.props.hardToggle}),r.publish(this.props.hardToggle,"toggle")):this.props.notify&&r.publish(this.props.notify,{title:this.props.title,content:this.props.content,position:this.props.position,color:this.props.color,image:this.props.image})},render:function(){if(this.props.popupToggle)return i.createElement(s,this.props);var t=i.Children.only(this.props.children);return o(t,{onClick:this.clickHandler})}});t.exports=a},function(t,e,n){"use strict";var i=n(2),o=n(16),r=n(3),s=i.createClass({displayName:"PopupToggle",clickHandler:function(t,e){e.preventDefault(),o.publish(this.props.popupToggle,["toggle",t])},render:function(){var t=i.Children.only(this.props.children),e=this.props.id||o.generateUuid();return r(t,{id:e,onClick:this.clickHandler.bind(this,e)})}});t.exports=s}])});
\ No newline at end of file
diff --git a/docs/docs.jsx b/docs/docs.jsx
index 34a60dd..145a08b 100644
--- a/docs/docs.jsx
+++ b/docs/docs.jsx
@@ -1,9 +1,8 @@
var React = require('react');
-var Router = require('react-router');
-var Link = Router.Link;
-var Route = Router.Route;
-var DefaultRoute = Router.DefaultRoute;
-var RouteHandler = Router.RouteHandler;
+var ReactRouter = require('react-router');
+var Router = ReactRouter.Router;
+var Route = ReactRouter.Route;
+var Link = ReactRouter.Link;
var Offcanvas = require('../src/offcanvas');
var Trigger = require('../src/trigger');
var Panel = require('../src/panel');
@@ -52,18 +51,18 @@ var Docs = React.createClass({
- - Installation & Usage
- - Trigger
- - Modal
- - Panel
- - Off-canvas Menu
- - Notification
- - Action Sheet
- - Tabs
- - Iconic
- - Accordion
- - Interchange
- - Popup
+ - Installation & Usage
+ - Trigger
+ - Modal
+ - Panel
+ - Off-canvas Menu
+ - Notification
+ - Action Sheet
+ - Tabs
+ - Iconic
+ - Accordion
+ - Interchange
+ - Popup
@@ -73,7 +72,7 @@ var Docs = React.createClass({
Show Components
-
+ {this.props.children}
@@ -83,8 +82,4 @@ var Docs = React.createClass({
}
});
-
-
-
-
-module.exports = Docs;
\ No newline at end of file
+module.exports = Docs;
diff --git a/docs/iconic/basic.jsx b/docs/iconic/basic.jsx
index ac131e2..f09aaa6 100644
--- a/docs/iconic/basic.jsx
+++ b/docs/iconic/basic.jsx
@@ -15,4 +15,4 @@ var BasicIconic = React.createClass({
}
});
-module.exports = BasicIconic;
\ No newline at end of file
+module.exports = BasicIconic;
diff --git a/docs/index.html b/docs/index.html
index 5918736..918355d 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -4,6 +4,5 @@
-
-