@quid/react-tabs-provider
Advanced tools
Comparing version 4.0.0 to 4.11.6
@@ -6,2 +6,10 @@ # Change Log | ||
## 4.11.6 (2024-01-03) | ||
**Note:** Version bump only for package @quid/react-tabs-provider | ||
# [4.0.0](https://github.com/quid/refraction/tree/master/packages/react-tabs-provider/compare/v3.3.5...v4.0.0) (2019-10-01) | ||
@@ -8,0 +16,0 @@ |
@@ -1,2 +0,2 @@ | ||
import{createContext as t,createElement as e,Component as r}from"react";function n(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var o=function(){},i=t({active:"",select:o,register:o}),s=function(t){function r(){for(var e,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return(e=t.call.apply(t,[this].concat(n))||this).state={registeredTabs:[],active:e.props.defaultActive,register:e.register,select:e.select},e.register=function(t){return e.setState((function(e){return{registeredTabs:[].concat(e.registeredTabs,[t])}}))},e.select=function(t){return null!=e.props.onSelect?e.props.onSelect(t):e.setState({active:t})},e}return n(r,t),r.prototype.render=function(){var t=this.props,r=t.children,n=t.active,o=t.onSelect,s=this.state,c=s.active,a=s.registeredTabs;(null!=n&&null==o||null!=o&&null==n)&&console.error("Warning: TabsProvider.Tabs can be used either as a controlled or stateful component, when used as controlled component, make sure to define both `value` and `onSelect` properties to it.");var p=n||c||a[0];return e(i.Provider,{value:{active:p,register:this.register,select:this.select}},r({active:p}))},r}(r),c=function(t){function e(){return t.apply(this,arguments)||this}return n(e,t),e.prototype.render=function(){return this.props.children(this.context)},e}(r);c.contextType=i;var a=function(t){function e(){return t.apply(this,arguments)||this}n(e,t);var r=e.prototype;return r.componentDidMount=function(){this.context.register(this.props.name)},r.render=function(){return this.props.name===this.context.active?this.props.children({name:this.props.name}):null},e}(r);a.contextType=i;export default function(){return null}export{c as TabList,a as TabPanel,s as Tabs}; | ||
import{createContext as t,createElement as e,Component as r}from"react";function n(t,e){var r,n;t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r=t,n=e,(Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(r,n)}var o=function(){},i=t({active:"",select:o,register:o}),s=function(t){function r(){for(var e,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return(e=t.call.apply(t,[this].concat(n))||this).state={registeredTabs:[],active:e.props.defaultActive,register:e.register,select:e.select},e.register=function(t){return e.setState((function(e){return{registeredTabs:[].concat(e.registeredTabs,[t])}}))},e.select=function(t){return null!=e.props.onSelect?e.props.onSelect(t):e.setState({active:t})},e}return n(r,t),r.prototype.render=function(){var t=this.props,r=t.children,n=t.active,o=t.onSelect,s=this.state,c=s.active,a=s.registeredTabs;(null!=n&&null==o||null!=o&&null==n)&&console.error("Warning: TabsProvider.Tabs can be used either as a controlled or stateful component, when used as controlled component, make sure to define both `value` and `onSelect` properties to it.");var p=n||c||a[0];return e(i.Provider,{value:{active:p,register:this.register,select:this.select}},r({active:p}))},r}(r),c=function(t){function e(){return t.apply(this,arguments)||this}return n(e,t),e.prototype.render=function(){return this.props.children(this.context)},e}(r);c.contextType=i;var a=function(t){function e(){return t.apply(this,arguments)||this}n(e,t);var r=e.prototype;return r.componentDidMount=function(){this.context.register(this.props.name)},r.render=function(){return this.props.name===this.context.active?this.props.children({name:this.props.name}):null},e}(r);a.contextType=i;export default function(){return null}export{c as TabList,a as TabPanel,s as Tabs}; | ||
//# sourceMappingURL=index.es.js.map |
@@ -1,2 +0,2 @@ | ||
var e=require("react");function t(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var r=function(){},n=e.createContext({active:"",select:r,register:r}),o=function(r){function o(){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return(e=r.call.apply(r,[this].concat(n))||this).state={registeredTabs:[],active:e.props.defaultActive,register:e.register,select:e.select},e.register=function(t){return e.setState((function(e){return{registeredTabs:[].concat(e.registeredTabs,[t])}}))},e.select=function(t){return null!=e.props.onSelect?e.props.onSelect(t):e.setState({active:t})},e}return t(o,r),o.prototype.render=function(){var t=this.props,r=t.children,o=t.active,s=t.onSelect,i=this.state,c=i.active,a=i.registeredTabs;(null!=o&&null==s||null!=s&&null==o)&&console.error("Warning: TabsProvider.Tabs can be used either as a controlled or stateful component, when used as controlled component, make sure to define both `value` and `onSelect` properties to it.");var p=o||c||a[0];return e.createElement(n.Provider,{value:{active:p,register:this.register,select:this.select}},r({active:p}))},o}(e.Component),s=function(e){function r(){return e.apply(this,arguments)||this}return t(r,e),r.prototype.render=function(){return this.props.children(this.context)},r}(e.Component);s.contextType=n;var i=function(e){function r(){return e.apply(this,arguments)||this}t(r,e);var n=r.prototype;return n.componentDidMount=function(){this.context.register(this.props.name)},n.render=function(){return this.props.name===this.context.active?this.props.children({name:this.props.name}):null},r}(e.Component);i.contextType=n,exports.TabList=s,exports.TabPanel=i,exports.Tabs=o,exports.default=function(){return null}; | ||
var t=require("react");function e(t,e){var r,n;t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r=t,n=e,(Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(r,n)}var r=function(){},n=t.createContext({active:"",select:r,register:r}),o=function(r){function o(){for(var t,e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return(t=r.call.apply(r,[this].concat(n))||this).state={registeredTabs:[],active:t.props.defaultActive,register:t.register,select:t.select},t.register=function(e){return t.setState((function(t){return{registeredTabs:[].concat(t.registeredTabs,[e])}}))},t.select=function(e){return null!=t.props.onSelect?t.props.onSelect(e):t.setState({active:e})},t}return e(o,r),o.prototype.render=function(){var e=this.props,r=e.children,o=e.active,s=e.onSelect,i=this.state,c=i.active,a=i.registeredTabs;(null!=o&&null==s||null!=s&&null==o)&&console.error("Warning: TabsProvider.Tabs can be used either as a controlled or stateful component, when used as controlled component, make sure to define both `value` and `onSelect` properties to it.");var p=o||c||a[0];return t.createElement(n.Provider,{value:{active:p,register:this.register,select:this.select}},r({active:p}))},o}(t.Component),s=function(t){function r(){return t.apply(this,arguments)||this}return e(r,t),r.prototype.render=function(){return this.props.children(this.context)},r}(t.Component);s.contextType=n;var i=function(t){function r(){return t.apply(this,arguments)||this}e(r,t);var n=r.prototype;return n.componentDidMount=function(){this.context.register(this.props.name)},n.render=function(){return this.props.name===this.context.active?this.props.children({name:this.props.name}):null},r}(t.Component);i.contextType=n,exports.TabList=s,exports.TabPanel=i,exports.Tabs=o,exports.default=function(){return null}; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
import{createContext as t,createElement as e,Component as r}from"react";function n(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var o=function(){},i=t({active:"",select:o,register:o}),s=function(t){function r(){for(var e,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return(e=t.call.apply(t,[this].concat(n))||this).state={registeredTabs:[],active:e.props.defaultActive,register:e.register,select:e.select},e.register=function(t){return e.setState((function(e){return{registeredTabs:[].concat(e.registeredTabs,[t])}}))},e.select=function(t){return null!=e.props.onSelect?e.props.onSelect(t):e.setState({active:t})},e}return n(r,t),r.prototype.render=function(){var t=this.props,r=t.children,n=t.active,o=t.onSelect,s=this.state,c=s.active,a=s.registeredTabs;(null!=n&&null==o||null!=o&&null==n)&&console.error("Warning: TabsProvider.Tabs can be used either as a controlled or stateful component, when used as controlled component, make sure to define both `value` and `onSelect` properties to it.");var p=n||c||a[0];return e(i.Provider,{value:{active:p,register:this.register,select:this.select}},r({active:p}))},r}(r),c=function(t){function e(){return t.apply(this,arguments)||this}return n(e,t),e.prototype.render=function(){return this.props.children(this.context)},e}(r);c.contextType=i;var a=function(t){function e(){return t.apply(this,arguments)||this}n(e,t);var r=e.prototype;return r.componentDidMount=function(){this.context.register(this.props.name)},r.render=function(){return this.props.name===this.context.active?this.props.children({name:this.props.name}):null},e}(r);a.contextType=i;export default function(){return null}export{c as TabList,a as TabPanel,s as Tabs}; | ||
import{createContext as t,createElement as e,Component as r}from"react";function n(t,e){var r,n;t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r=t,n=e,(Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(r,n)}var o=function(){},i=t({active:"",select:o,register:o}),s=function(t){function r(){for(var e,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return(e=t.call.apply(t,[this].concat(n))||this).state={registeredTabs:[],active:e.props.defaultActive,register:e.register,select:e.select},e.register=function(t){return e.setState((function(e){return{registeredTabs:[].concat(e.registeredTabs,[t])}}))},e.select=function(t){return null!=e.props.onSelect?e.props.onSelect(t):e.setState({active:t})},e}return n(r,t),r.prototype.render=function(){var t=this.props,r=t.children,n=t.active,o=t.onSelect,s=this.state,c=s.active,a=s.registeredTabs;(null!=n&&null==o||null!=o&&null==n)&&console.error("Warning: TabsProvider.Tabs can be used either as a controlled or stateful component, when used as controlled component, make sure to define both `value` and `onSelect` properties to it.");var p=n||c||a[0];return e(i.Provider,{value:{active:p,register:this.register,select:this.select}},r({active:p}))},r}(r),c=function(t){function e(){return t.apply(this,arguments)||this}return n(e,t),e.prototype.render=function(){return this.props.children(this.context)},e}(r);c.contextType=i;var a=function(t){function e(){return t.apply(this,arguments)||this}n(e,t);var r=e.prototype;return r.componentDidMount=function(){this.context.register(this.props.name)},r.render=function(){return this.props.name===this.context.active?this.props.children({name:this.props.name}):null},e}(r);a.contextType=i;export default function(){return null}export{c as TabList,a as TabPanel,s as Tabs}; | ||
//# sourceMappingURL=index.modern.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t((e=e||self).reactTabsProvider={},e.react)}(this,(function(e,t){function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var n=function(){},o=t.createContext({active:"",select:n,register:n}),i=function(e){function n(){for(var t,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return(t=e.call.apply(e,[this].concat(n))||this).state={registeredTabs:[],active:t.props.defaultActive,register:t.register,select:t.select},t.register=function(e){return t.setState((function(t){return{registeredTabs:[].concat(t.registeredTabs,[e])}}))},t.select=function(e){return null!=t.props.onSelect?t.props.onSelect(e):t.setState({active:e})},t}return r(n,e),n.prototype.render=function(){var e=this.props,r=e.children,n=e.active,i=e.onSelect,s=this.state,c=s.active,a=s.registeredTabs;(null!=n&&null==i||null!=i&&null==n)&&console.error("Warning: TabsProvider.Tabs can be used either as a controlled or stateful component, when used as controlled component, make sure to define both `value` and `onSelect` properties to it.");var p=n||c||a[0];return t.createElement(o.Provider,{value:{active:p,register:this.register,select:this.select}},r({active:p}))},n}(t.Component),s=function(e){function t(){return e.apply(this,arguments)||this}return r(t,e),t.prototype.render=function(){return this.props.children(this.context)},t}(t.Component);s.contextType=o;var c=function(e){function t(){return e.apply(this,arguments)||this}r(t,e);var n=t.prototype;return n.componentDidMount=function(){this.context.register(this.props.name)},n.render=function(){return this.props.name===this.context.active?this.props.children({name:this.props.name}):null},t}(t.Component);c.contextType=o,e.TabList=s,e.TabPanel=c,e.Tabs=i,e.default=function(){return null}})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t((e=e||self).reactTabsProvider={},e.react)}(this,(function(e,t){function r(e,t){var r,n;e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r=e,n=t,(Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(r,n)}var n=function(){},o=t.createContext({active:"",select:n,register:n}),i=function(e){function n(){for(var t,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return(t=e.call.apply(e,[this].concat(n))||this).state={registeredTabs:[],active:t.props.defaultActive,register:t.register,select:t.select},t.register=function(e){return t.setState((function(t){return{registeredTabs:[].concat(t.registeredTabs,[e])}}))},t.select=function(e){return null!=t.props.onSelect?t.props.onSelect(e):t.setState({active:e})},t}return r(n,e),n.prototype.render=function(){var e=this.props,r=e.children,n=e.active,i=e.onSelect,s=this.state,c=s.active,a=s.registeredTabs;(null!=n&&null==i||null!=i&&null==n)&&console.error("Warning: TabsProvider.Tabs can be used either as a controlled or stateful component, when used as controlled component, make sure to define both `value` and `onSelect` properties to it.");var p=n||c||a[0];return t.createElement(o.Provider,{value:{active:p,register:this.register,select:this.select}},r({active:p}))},n}(t.Component),s=function(e){function t(){return e.apply(this,arguments)||this}return r(t,e),t.prototype.render=function(){return this.props.children(this.context)},t}(t.Component);s.contextType=o;var c=function(e){function t(){return e.apply(this,arguments)||this}r(t,e);var n=t.prototype;return n.componentDidMount=function(){this.context.register(this.props.name)},n.render=function(){return this.props.name===this.context.active?this.props.children({name:this.props.name}):null},t}(t.Component);c.contextType=o,e.TabList=s,e.TabPanel=c,e.Tabs=i,e.default=function(){return null}})); | ||
//# sourceMappingURL=index.umd.js.map |
{ | ||
"name": "@quid/react-tabs-provider", | ||
"version": "4.0.0", | ||
"version": "4.11.6", | ||
"description": "render-props based component to handle tab navigation", | ||
@@ -29,3 +29,3 @@ "main": "dist/index.js", | ||
}, | ||
"gitHead": "c65f8cc58c2c57ecc99b939dc9f560d6f9b342cd" | ||
"gitHead": "333cbff502d16a61cd50810bce002f4133bd54bf" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
46687
321