{:uriI"file:///Users/joel/src/revelry_core/app/assets/javascripts/revelry/ui/tabs/Tabs.js.cjsx?type=application/javascript&pipeline=self&id=327db7e4daffbf0364a17f0ae955fdafa57f5dc1f586ea4714f0879cc7966046:ET:load_pathI"8/Users/joel/src/revelry_core/app/assets/javascripts;F: filenameI"U/Users/joel/src/revelry_core/app/assets/javascripts/revelry/ui/tabs/Tabs.js.cjsx;T: nameI"revelry/ui/tabs/Tabs;T:logical_pathI"!revelry/ui/tabs/Tabs.self.js;T:content_typeI"application/javascript;T: sourceI"c (function() { Rev.registerComponent('StatelessTabs', { getDefaultProps: function() { return { activeKey: null, onChange: function() {} }; }, getActiveKey: function() { var ref; return this.props.activeKey || ((ref = this.getNormalizedChildren()[0]) != null ? ref.key : void 0); }, renderTab: function(child) { var className; className = this.classSet({ active: child.key === this.getActiveKey(), 'RevTabs-tab': true }); return React.createElement("dd", { "key": child.key, "className": className, "onClick": this.handleTabClick(child) }, child.props.tab); }, renderContent: function(child) { var newProps; newProps = { key: child.key }; if (child.key === this.getActiveKey()) { newProps.active = true; } return React.cloneElement(child, newProps); }, render: function() { var dlClassName; dlClassName = this.classSet({ 'RevTabs-tabs': true, tabs: true, vertical: this.props.vertical }); return React.createElement("div", { "className": 'RevTabs' }, React.createElement("dl", { "className": dlClassName }, this.getNormalizedChildren().map(this.renderTab)), React.createElement(Rev.Components.StatelessTabContent, React.__spread({}, this.props, { "activeKey": this.getActiveKey() }), this.props.children)); }, handleTabClick: function(activeTab) { return (function(_this) { return function(e) { e.preventDefault(); e.stopPropagation(); e.activeTab = activeTab; return _this.props.onChange(e); }; })(this); } }); Rev.registerComponent('Tabs', { getDefaultProps: function() { return { onChange: function() {} }; }, getInitialState: function() { return { activeKey: this.props.activeKey }; }, render: function() { return React.createElement(Rev.Components.StatelessTabs, React.__spread({}, this.props, { "activeKey": this.state.activeKey, "onChange": this.handleChange })); }, handleChange: function(e) { this.setState({ activeKey: e.activeTab.key }); return this.props.onChange(e); } }); }).call(this); ;T: metadata{ :dependencieso:Set: @hash{ I"environment-version;TTI"environment-paths;TTI"hprocessors:type=application/javascript&file_type=application/javascript&engines=.cjsx&pipeline=self;TTI"cfile-digest:///Users/joel/src/revelry_core/app/assets/javascripts/revelry/ui/tabs/Tabs.js.cjsx;TT: requiredo;;{: stubbedo;;{: linkso;;{: charsetI" utf-8;F: digest"%II'}g8nM"kF1: lengthic :integrityI"Xni:///sha-256;SUnoDugnvdjH4H1nOOrNbqYHTfHk4vb-IqUZawJGiDE?ct=application/javascript;T:dependencies_digest"%=wM`