carbon-components-angular
Version:
Next generation components
1 lines • 47.1 kB
JavaScript
"use strict";(self.webpackChunkcarbon_components_angular=self.webpackChunkcarbon_components_angular||[]).push([[459],{"./node_modules/@carbon/utils-position/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{var _a,PLACEMENTS;__webpack_require__.d(__webpack_exports__,{FK:()=>position,ZP:()=>__WEBPACK_DEFAULT_EXPORT__}),function(PLACEMENTS){PLACEMENTS.LEFT="left",PLACEMENTS.RIGHT="right",PLACEMENTS.TOP="top",PLACEMENTS.BOTTOM="bottom"}(PLACEMENTS||(PLACEMENTS={}));var defaultPositions=((_a={})[PLACEMENTS.LEFT]=function(referenceOffset,target,referenceRect){return{top:referenceOffset.top-Math.round(target.offsetHeight/2)+Math.round(referenceRect.height/2),left:Math.round(referenceOffset.left-target.offsetWidth)}},_a[PLACEMENTS.RIGHT]=function(referenceOffset,target,referenceRect){return{top:referenceOffset.top-Math.round(target.offsetHeight/2)+Math.round(referenceRect.height/2),left:Math.round(referenceOffset.left+referenceRect.width)}},_a[PLACEMENTS.TOP]=function(referenceOffset,target,referenceRect){return{top:Math.round(referenceOffset.top-target.offsetHeight),left:referenceOffset.left-Math.round(target.offsetWidth/2)+Math.round(referenceRect.width/2)}},_a[PLACEMENTS.BOTTOM]=function(referenceOffset,target,referenceRect){return{top:Math.round(referenceOffset.top+referenceRect.height),left:referenceOffset.left-Math.round(target.offsetWidth/2)+Math.round(referenceRect.width/2)}},_a),windowRef="undefined"!=typeof window?window:{innerHeight:0,scrollY:0,innerWidth:0,scrollX:0},Position=function(){function Position(positions){void 0===positions&&(positions={}),this.positions=defaultPositions,this.positions=Object.assign({},defaultPositions,positions)}return Position.prototype.getRelativeOffset=function(target){for(var offsets={left:target.offsetLeft,top:target.offsetTop};target.offsetParent&&"static"===getComputedStyle(target.offsetParent).position;)offsets.left+=target.offsetLeft,offsets.top+=target.offsetTop,target=target.offsetParent;return offsets},Position.prototype.getAbsoluteOffset=function(target){for(var currentNode=target,margins={top:0,left:0};currentNode.offsetParent;){var computed=getComputedStyle(currentNode.offsetParent);"static"===computed.position&&computed.marginLeft&&computed.marginTop&&(parseInt(computed.marginTop,10)&&(margins.top+=parseInt(computed.marginTop,10)),parseInt(computed.marginLeft,10)&&(margins.left+=parseInt(computed.marginLeft,10))),currentNode=currentNode.offsetParent}var targetRect=target.getBoundingClientRect(),relativeRect=document.body.getBoundingClientRect();return{top:targetRect.top-relativeRect.top+margins.top,left:targetRect.left-relativeRect.left+margins.left}},Position.prototype.findRelative=function(reference,target,placement){var referenceOffset=this.getRelativeOffset(reference),referenceRect=reference.getBoundingClientRect();return this.calculatePosition(referenceOffset,referenceRect,target,placement)},Position.prototype.findAbsolute=function(reference,target,placement){var referenceOffset=this.getAbsoluteOffset(reference),referenceRect=reference.getBoundingClientRect();return this.calculatePosition(referenceOffset,referenceRect,target,placement)},Position.prototype.findPosition=function(reference,target,placement,offsetFunction){void 0===offsetFunction&&(offsetFunction=this.getAbsoluteOffset.bind(this));var referenceOffset=offsetFunction(reference),referenceRect=reference.getBoundingClientRect();return this.calculatePosition(referenceOffset,referenceRect,target,placement)},Position.prototype.findPositionAt=function(offset,target,placement){return this.calculatePosition(offset,{top:0,left:0,height:0,width:0},target,placement)},Position.prototype.getPlacementBox=function(target,position){var targetBottom=target.offsetHeight+position.top,targetRight=target.offsetWidth+position.left;return{top:position.top,bottom:targetBottom,left:position.left,right:targetRight}},Position.prototype.addOffset=function(position,top,left){return void 0===top&&(top=0),void 0===left&&(left=0),Object.assign({},position,{top:position.top+top,left:position.left+left})},Position.prototype.setElement=function(element,position){element.style.top=position.top+"px",element.style.left=position.left+"px"},Position.prototype.findBestPlacement=function(reference,target,placements,containerFunction,positionFunction){var _this=this;void 0===containerFunction&&(containerFunction=this.defaultContainerFunction.bind(this)),void 0===positionFunction&&(positionFunction=this.findPosition.bind(this));var weightedPlacements=placements.map((function(placement){var pos=positionFunction(reference,target,placement),box=_this.getPlacementBox(target,pos),hiddenHeight=0,hiddenWidth=0,container=containerFunction();box.top<container.top?hiddenHeight=container.top-box.top:box.bottom>container.height&&(hiddenHeight=box.bottom-container.height),box.left<container.left?hiddenWidth=container.left-box.left:box.right>container.width&&(hiddenWidth=box.right-container.width),hiddenHeight&&!hiddenWidth?hiddenWidth=1:hiddenWidth&&!hiddenHeight&&(hiddenHeight=1);var area=target.offsetHeight*target.offsetWidth;return{placement,weight:(area-hiddenHeight*hiddenWidth)/area}}));return weightedPlacements.sort((function(a,b){return b.weight-a.weight})),weightedPlacements[0].placement},Position.prototype.findBestPlacementAt=function(offset,target,placements,containerFunction){var _this=this;void 0===containerFunction&&(containerFunction=this.defaultContainerFunction.bind(this));return this.findBestPlacement(null,target,placements,containerFunction,(function(_,target,placement){return _this.findPositionAt(offset,target,placement)}))},Position.prototype.defaultContainerFunction=function(){return{top:0,left:0,height:windowRef.innerHeight,width:windowRef.innerWidth}},Position.prototype.calculatePosition=function(referenceOffset,referenceRect,target,placement){return this.positions[placement]?this.positions[placement](referenceOffset,target,referenceRect):(console.error("No function found for placement, defaulting to 0,0"),{left:0,top:0})},Position}(),position=new Position;const __WEBPACK_DEFAULT_EXPORT__=Position},"./node_modules/@storybook/angular/dist/client/argsToTemplate.js":(__unused_webpack_module,exports)=>{Object.defineProperty(exports,"__esModule",{value:!0}),exports.argsToTemplate=void 0,exports.argsToTemplate=function argsToTemplate(args,options={}){const includeSet=options.include?new Set(options.include):null,excludeSet=options.exclude?new Set(options.exclude):null;return Object.entries(args).filter((([key])=>void 0!==args[key])).filter((([key])=>includeSet?includeSet.has(key):!excludeSet||!excludeSet.has(key))).map((([key,value])=>"function"==typeof value?`(${key})="${key}($event)"`:`[${key}]="${key}"`)).join(" ")}},"./node_modules/@storybook/angular/dist/client/decorators.js":(__unused_webpack_module,exports,__webpack_require__)=>{Object.defineProperty(exports,"__esModule",{value:!0}),exports.componentWrapperDecorator=exports.applicationConfig=exports.moduleMetadata=void 0;const ComputesTemplateFromComponent_1=__webpack_require__("./node_modules/@storybook/angular/dist/client/angular-beta/ComputesTemplateFromComponent.js"),NgComponentAnalyzer_1=__webpack_require__("./node_modules/@storybook/angular/dist/client/angular-beta/utils/NgComponentAnalyzer.js");exports.moduleMetadata=metadata=>storyFn=>{const story=storyFn(),storyMetadata=story.moduleMetadata||{};return metadata=metadata||{},{...story,moduleMetadata:{declarations:[...metadata.declarations||[],...storyMetadata.declarations||[]],entryComponents:[...metadata.entryComponents||[],...storyMetadata.entryComponents||[]],imports:[...metadata.imports||[],...storyMetadata.imports||[]],schemas:[...metadata.schemas||[],...storyMetadata.schemas||[]],providers:[...metadata.providers||[],...storyMetadata.providers||[]]}}},exports.applicationConfig=function applicationConfig(config){return storyFn=>{const story=storyFn(),storyConfig=story.applicationConfig;return{...story,applicationConfig:storyConfig||config?{...config,...storyConfig,providers:[...config?.providers||[],...storyConfig?.providers||[]]}:void 0}}};exports.componentWrapperDecorator=(element,props)=>(storyFn,storyContext)=>{const story=storyFn(),currentProps="function"==typeof props?props(storyContext):props,template=(0,NgComponentAnalyzer_1.isComponent)(element)?(0,ComputesTemplateFromComponent_1.computesTemplateFromComponent)(element,currentProps??{},story.template):element(story.template);return{...story,template,...currentProps||story.props?{props:{...currentProps,...story.props}}:{}}}},"./node_modules/@storybook/angular/dist/client/index.js":function(__unused_webpack_module,exports,__webpack_require__){var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){void 0===k2&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);desc&&!("get"in desc?!m.__esModule:desc.writable||desc.configurable)||(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){void 0===k2&&(k2=k),o[k2]=m[k]}),__exportStar=this&&this.__exportStar||function(m,exports){for(var p in m)"default"===p||Object.prototype.hasOwnProperty.call(exports,p)||__createBinding(exports,m,p)};Object.defineProperty(exports,"__esModule",{value:!0}),exports.argsToTemplate=exports.applicationConfig=exports.componentWrapperDecorator=exports.moduleMetadata=void 0,__webpack_require__("./node_modules/@storybook/angular/dist/client/globals.js"),__exportStar(__webpack_require__("./node_modules/@storybook/angular/dist/client/public-api.js"),exports),__exportStar(__webpack_require__("./node_modules/@storybook/angular/dist/client/public-types.js"),exports);var decorators_1=__webpack_require__("./node_modules/@storybook/angular/dist/client/decorators.js");Object.defineProperty(exports,"moduleMetadata",{enumerable:!0,get:function(){return decorators_1.moduleMetadata}}),Object.defineProperty(exports,"componentWrapperDecorator",{enumerable:!0,get:function(){return decorators_1.componentWrapperDecorator}}),Object.defineProperty(exports,"applicationConfig",{enumerable:!0,get:function(){return decorators_1.applicationConfig}});var argsToTemplate_1=__webpack_require__("./node_modules/@storybook/angular/dist/client/argsToTemplate.js");Object.defineProperty(exports,"argsToTemplate",{enumerable:!0,get:function(){return argsToTemplate_1.argsToTemplate}})},"./node_modules/@storybook/angular/dist/client/public-api.js":function(__unused_webpack_module,exports,__webpack_require__){var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){void 0===k2&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);desc&&!("get"in desc?!m.__esModule:desc.writable||desc.configurable)||(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){void 0===k2&&(k2=k),o[k2]=m[k]}),__exportStar=this&&this.__exportStar||function(m,exports){for(var p in m)"default"===p||Object.prototype.hasOwnProperty.call(exports,p)||__createBinding(exports,m,p)},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.raw=exports.forceReRender=exports.configure=exports.storiesOf=void 0;const preview_api_1=__webpack_require__("@storybook/preview-api"),render_1=__webpack_require__("./node_modules/@storybook/angular/dist/client/render.js"),decorateStory_1=__importDefault(__webpack_require__("./node_modules/@storybook/angular/dist/client/decorateStory.js"));__exportStar(__webpack_require__("./node_modules/@storybook/angular/dist/client/public-types.js"),exports);const api=(0,preview_api_1.start)(render_1.renderToCanvas,{decorateStory:decorateStory_1.default,render:render_1.render});exports.storiesOf=(kind,m)=>api.clientApi.storiesOf(kind,m).addParameters({renderer:"angular"});exports.configure=(...args)=>api.configure("angular",...args),exports.forceReRender=api.forceReRender,exports.raw=api.clientApi.raw},"./node_modules/@storybook/angular/dist/client/public-types.js":(__unused_webpack_module,exports)=>{Object.defineProperty(exports,"__esModule",{value:!0})},"./node_modules/@storybook/angular/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{var _client_index__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@storybook/angular/dist/client/index.js");__webpack_require__.o(_client_index__WEBPACK_IMPORTED_MODULE_0__,"applicationConfig")&&__webpack_require__.d(__webpack_exports__,{applicationConfig:function(){return _client_index__WEBPACK_IMPORTED_MODULE_0__.applicationConfig}}),__webpack_require__.o(_client_index__WEBPACK_IMPORTED_MODULE_0__,"componentWrapperDecorator")&&__webpack_require__.d(__webpack_exports__,{componentWrapperDecorator:function(){return _client_index__WEBPACK_IMPORTED_MODULE_0__.componentWrapperDecorator}}),__webpack_require__.o(_client_index__WEBPACK_IMPORTED_MODULE_0__,"moduleMetadata")&&__webpack_require__.d(__webpack_exports__,{moduleMetadata:function(){return _client_index__WEBPACK_IMPORTED_MODULE_0__.moduleMetadata}})},"./src/tabs/tabs.stories.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Basic:()=>Basic,BeforeAndAfter:()=>BeforeAndAfter,Skeleton:()=>Skeleton,TabheaderGroup:()=>TabheaderGroup,With:()=>With,__namedExportsOrder:()=>__namedExportsOrder,default:()=>tabs_stories});var dist=__webpack_require__("./node_modules/@storybook/angular/dist/index.mjs"),tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.js"),core=__webpack_require__("./node_modules/@angular/core/fesm2020/core.mjs"),utils=__webpack_require__("./src/utils/index.ts");let BaseTabHeader=class BaseTabHeader{constructor(elementRef,changeDetectorRef,eventService,renderer){this.elementRef=elementRef,this.changeDetectorRef=changeDetectorRef,this.eventService=eventService,this.renderer=renderer,this.cacheActive=!1,this.type="line",this.theme="dark",this.tabsClass=!0,this.OVERFLOW_BUTTON_OFFSET=44,this.longPressMultiplier=3,this.clickMultiplier=1.5,this.longPressInterval=null,this.tickInterval=null}get containedClass(){return"contained"===this.type}get themeClass(){return"light"===this.theme}get hasHorizontalOverflow(){const tabList=this.headerContainer.nativeElement;return tabList.scrollWidth>tabList.clientWidth}get leftOverflowNavButtonHidden(){const tabList=this.headerContainer.nativeElement;return!this.hasHorizontalOverflow||!tabList.scrollLeft}get rightOverflowNavButtonHidden(){const tabList=this.headerContainer.nativeElement;return!this.hasHorizontalOverflow||tabList.scrollLeft+tabList.clientWidth===tabList.scrollWidth}handleScroll(){this.changeDetectorRef.markForCheck()}handleOverflowNavClick(direction,numOftabs=0){const tabList=this.headerContainer.nativeElement,{clientWidth,scrollLeft,scrollWidth}=tabList;direction>0?tabList.scrollLeft=Math.min(scrollLeft+scrollWidth/numOftabs*this.clickMultiplier,scrollWidth-clientWidth):direction<0&&(tabList.scrollLeft=Math.max(scrollLeft-scrollWidth/numOftabs*this.clickMultiplier,0))}handleOverflowNavMouseDown(direction){const tabList=this.headerContainer.nativeElement;this.longPressInterval=setTimeout((()=>(this.renderer.setStyle(tabList,"scroll-behavior","auto"),this.tickInterval=setInterval((()=>{if(tabList.scrollLeft+=direction*this.longPressMultiplier,this.leftOverflowNavButtonHidden||this.rightOverflowNavButtonHidden)return()=>{clearInterval(this.tickInterval),this.handleOverflowNavMouseUp()}})),()=>clearInterval(this.longPressInterval))),500)}handleOverflowNavMouseUp(){clearInterval(this.tickInterval),clearTimeout(this.longPressInterval),this.renderer.setStyle(this.headerContainer.nativeElement,"scroll-behavior","smooth")}};BaseTabHeader.ctorParameters=()=>[{type:core.ElementRef},{type:core.ChangeDetectorRef},{type:utils.PO},{type:core.Renderer2}],BaseTabHeader.propDecorators={cacheActive:[{type:core.Input}],followFocus:[{type:core.Input}],ariaLabel:[{type:core.Input}],ariaLabelledby:[{type:core.Input}],contentBefore:[{type:core.Input}],contentAfter:[{type:core.Input}],type:[{type:core.Input}],theme:[{type:core.Input}],tabsClass:[{type:core.HostBinding,args:["class.cds--tabs"]}],containedClass:[{type:core.HostBinding,args:["class.cds--tabs--contained"]}],themeClass:[{type:core.HostBinding,args:["class.cds--tabs--light"]}],headerContainer:[{type:core.ViewChild,args:["tabList",{static:!0}]}]},BaseTabHeader=(0,tslib_es6.gn)([(0,core.Component)({template:""})],BaseTabHeader);var Subscription=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/Subscription.js");let TabHeader=class TabHeader{constructor(host){this.host=host,this.active=!1,this.disabled=!1,this.type="button",this.ariaSelected=this.active,this.ariaDisabled=this.disabled,this.navItem=!0,this.navLink=!0,this.selected=new core.EventEmitter,this._cacheActive=!1}get tabIndex(){return this.active?0:-1}get isSelected(){return this.active}get isDisabled(){return this.disabled}set cacheActive(shouldCache){this._cacheActive=shouldCache,this.paneReference&&(this.paneReference.cacheActive=this.cacheActive)}set paneTabIndex(tabIndex){this.paneReference&&(this.paneReference.tabIndex=tabIndex)}get cacheActive(){return this._cacheActive}onClick(){this.selectTab()}ngAfterViewInit(){setTimeout((()=>{this.title=this.title?this.title:this.host.nativeElement.textContent}))}selectTab(){this.focus(),this.disabled||(this.selected.emit(),this.active=!0,this.paneReference&&(this.paneReference.active=!0))}focus(){this.host.nativeElement.focus()}};TabHeader.ctorParameters=()=>[{type:core.ElementRef}],TabHeader.propDecorators={tabIndex:[{type:core.HostBinding,args:["attr.tabIndex"]}],isSelected:[{type:core.HostBinding,args:["class.cds--tabs__nav-item--selected"]}],isDisabled:[{type:core.HostBinding,args:["class.cds--tabs__nav-item--disabled"]}],cacheActive:[{type:core.Input}],paneTabIndex:[{type:core.Input}],active:[{type:core.Input}],disabled:[{type:core.Input}],type:[{type:core.HostBinding,args:["attr.type"]}],ariaSelected:[{type:core.HostBinding,args:["attr.aria-selected"]}],ariaDisabled:[{type:core.HostBinding,args:["attr.aria-disabled"]}],navItem:[{type:core.HostBinding,args:["class.cds--tabs__nav-item"]}],navLink:[{type:core.HostBinding,args:["class.cds--tabs__nav-link"]}],paneReference:[{type:core.Input}],title:[{type:core.HostBinding,args:["attr.title"]},{type:core.Input}],selected:[{type:core.Output}],onClick:[{type:core.HostListener,args:["click"]}]},TabHeader=(0,tslib_es6.gn)([(0,core.Directive)({selector:"[cdsTabHeader], [ibmTabHeader]"})],TabHeader);let TabHeaderGroup=class TabHeaderGroup extends BaseTabHeader{constructor(elementRef,changeDetectorRef,eventService,renderer){super(elementRef,changeDetectorRef,eventService,renderer),this.elementRef=elementRef,this.changeDetectorRef=changeDetectorRef,this.eventService=eventService,this.renderer=renderer,this.isNavigation=!1,this.selectedSubscriptionTracker=new Subscription.w0,this.currentSelectedTab=0}keyboardInput(event){let tabHeadersArray=this.tabHeaderQuery.toArray();"ArrowRight"===event.key&&(this.currentSelectedTab<tabHeadersArray.length-1?(event.preventDefault(),this.followFocus&&!tabHeadersArray[this.currentSelectedTab+1].disabled?tabHeadersArray[this.currentSelectedTab+1].selectTab():(tabHeadersArray[this.currentSelectedTab+1].focus(),this.currentSelectedTab++)):(event.preventDefault(),this.followFocus&&!tabHeadersArray[0].disabled?tabHeadersArray[0].selectTab():(tabHeadersArray[0].focus(),this.currentSelectedTab=0))),"ArrowLeft"===event.key&&(this.currentSelectedTab>0?(event.preventDefault(),this.followFocus&&!tabHeadersArray[this.currentSelectedTab-1].disabled?tabHeadersArray[this.currentSelectedTab-1].selectTab():(tabHeadersArray[this.currentSelectedTab-1].focus(),this.currentSelectedTab--)):(event.preventDefault(),this.followFocus&&!tabHeadersArray[tabHeadersArray.length-1].disabled?tabHeadersArray[tabHeadersArray.length-1].selectTab():(tabHeadersArray[tabHeadersArray.length-1].focus(),this.currentSelectedTab=tabHeadersArray.length-1))),"Home"===event.key&&(event.preventDefault(),this.followFocus&&!tabHeadersArray[0].disabled?tabHeadersArray[0].selectTab():(tabHeadersArray[0].focus(),this.currentSelectedTab=0)),"End"===event.key&&(event.preventDefault(),this.followFocus&&!tabHeadersArray[tabHeadersArray.length-1].disabled?tabHeadersArray[tabHeadersArray.length-1].selectTab():(tabHeadersArray[tabHeadersArray.length-1].focus(),this.currentSelectedTab=tabHeadersArray.length-1))," "!==event.key||this.followFocus||tabHeadersArray[this.currentSelectedTab].selectTab()}ngOnInit(){this.eventService.on(window,"resize",(()=>this.handleScroll()))}ngAfterContentInit(){this.selectedSubscriptionTracker.unsubscribe(),this.tabHeaderQuery&&this.tabHeaderQuery.toArray().forEach((tabHeader=>{tabHeader.cacheActive=this.cacheActive,tabHeader.paneTabIndex=this.isNavigation?null:0}));const selectedSubscriptions=this.tabHeaderQuery.toArray().forEach((tabHeader=>{tabHeader.selected.subscribe((()=>{this.currentSelectedTab=this.tabHeaderQuery.toArray().indexOf(tabHeader),this.tabHeaderQuery.toArray().filter((header=>header!==tabHeader)).forEach((filteredHeader=>{filteredHeader.active=!1,filteredHeader.paneReference&&(filteredHeader.paneReference.active=!1)}))}))}));this.selectedSubscriptionTracker.add(selectedSubscriptions),setTimeout((()=>this.tabHeaderQuery.toArray()[this.currentSelectedTab].selectTab()))}ngOnChanges(changes){this.tabHeaderQuery&&(changes.cacheActive&&this.tabHeaderQuery.toArray().forEach((tabHeader=>tabHeader.cacheActive=this.cacheActive)),changes.isNavigation&&this.tabHeaderQuery.toArray().forEach((tabHeader=>tabHeader.paneTabIndex=this.isNavigation?null:0)))}getSelectedTab(){const selected=this.tabHeaderQuery.toArray()[this.currentSelectedTab];return selected||{headingIsTemplate:!1,heading:""}}};TabHeaderGroup.ctorParameters=()=>[{type:core.ElementRef},{type:core.ChangeDetectorRef},{type:utils.PO},{type:core.Renderer2}],TabHeaderGroup.propDecorators={isNavigation:[{type:core.Input}],tabHeaderQuery:[{type:core.ContentChildren,args:[TabHeader]}],headerContainer:[{type:core.ViewChild,args:["tabList",{static:!0}]}],keyboardInput:[{type:core.HostListener,args:["keydown",["$event"]]}]},TabHeaderGroup=(0,tslib_es6.gn)([(0,core.Component)({selector:"cds-tab-header-group, ibm-tab-header-group",template:'\n\t\t<button\n\t\t\ttype="button"\n\t\t\tclass="cds--tab--overflow-nav-button cds--tab--overflow-nav-button--previous"\n\t\t\t[ngClass]="{\n\t\t\t\t\'cds--tab--overflow-nav-button--hidden\': leftOverflowNavButtonHidden\n\t\t\t}"\n\t\t\t(click)="handleOverflowNavClick(-1, tabHeaderQuery.length)"\n\t\t\t(pointerdown)="handleOverflowNavMouseDown(-1)"\n\t\t\t(pointerup)="handleOverflowNavMouseUp()"\n\t\t\t(pointerleave)="handleOverflowNavMouseUp()"\n\t\t\t(pointerout)="handleOverflowNavMouseUp()"\n\t\t\t(pointercancel)="handleOverflowNavMouseUp()">\n\t\t\t<svg\n\t\t\t\tfocusable="false"\n\t\t\t\tpreserveAspectRatio="xMidYMid meet"\n\t\t\t\txmlns="http://www.w3.org/2000/svg"\n\t\t\t\tfill="currentColor"\n\t\t\t\twidth="16"\n\t\t\t\theight="16"\n\t\t\t\tviewBox="0 0 16 16"\n\t\t\t\taria-hidden="true">\n\t\t\t\t<path d="M5 8L10 3 10.7 3.7 6.4 8 10.7 12.3 10 13z"></path>\n\t\t\t</svg>\n\t\t</button>\n\t\t<div\n\t\t\tclass="cds--tab--list"\n\t\t\trole="tablist"\n\t\t\t[attr.aria-label]="ariaLabel"\n\t\t\t(scroll)="handleScroll()"\n\t\t\t#tabList>\n\t\t\t<ng-container [ngTemplateOutlet]="contentBefore"></ng-container>\n\t\t\t<ng-content></ng-content>\n\t\t\t<ng-container [ngTemplateOutlet]="contentAfter"></ng-container>\n\t\t</div>\n\t\t<button\n\t\t\ttype="button"\n\t\t\tclass="cds--tab--overflow-nav-button cds--tab--overflow-nav-button--next"\n\t\t\t[ngClass]="{\n\t\t\t\t\'cds--tab--overflow-nav-button--hidden\': rightOverflowNavButtonHidden\n\t\t\t}"\n\t\t\t(click)="handleOverflowNavClick(1, tabHeaderQuery.length)"\n\t\t\t(pointerdown)="handleOverflowNavMouseDown(1)"\n\t\t\t(pointerup)="handleOverflowNavMouseUp()"\n\t\t\t(pointerleave)="handleOverflowNavMouseUp()"\n\t\t\t(pointerout)="handleOverflowNavMouseUp()"\n\t\t\t(pointercancel)="handleOverflowNavMouseUp()">\n\t\t\t<svg\n\t\t\t\tfocusable="false"\n\t\t\t\tpreserveAspectRatio="xMidYMid meet"\n\t\t\t\txmlns="http://www.w3.org/2000/svg"\n\t\t\t\tfill="currentColor"\n\t\t\t\twidth="16"\n\t\t\t\theight="16"\n\t\t\t\tviewBox="0 0 16 16"\n\t\t\t\taria-hidden="true">\n\t\t\t\t<path d="M11 8L6 13 5.3 12.3 9.6 8 5.3 3.7 6 3z"></path>\n\t\t\t</svg>\n\t\t</button>\n\t'})],TabHeaderGroup);var i18n=__webpack_require__("./src/i18n/index.ts");let Tab=class Tab{constructor(){this.headingIsTemplate=!1,this.active=!1,this.disabled=!1,this.tabIndex=0,this.id="n-tab-"+Tab.counter++,this.selected=new core.EventEmitter,this.attrClass=this.id,this._cacheActive=!1}set cacheActive(shouldCache){this._cacheActive=shouldCache}get cacheActive(){return this._cacheActive}ngOnInit(){this.heading instanceof core.TemplateRef&&(this.headingIsTemplate=!0)}doSelect(){this.selected.emit()}shouldRender(){return this.active||this.cacheActive}isTemplate(value){return value instanceof core.TemplateRef}};Tab.counter=0,Tab.propDecorators={heading:[{type:core.Input}],title:[{type:core.Input}],context:[{type:core.Input}],active:[{type:core.Input}],disabled:[{type:core.Input}],tabIndex:[{type:core.Input}],id:[{type:core.Input}],cacheActive:[{type:core.Input}],tabContent:[{type:core.Input}],templateContext:[{type:core.Input}],selected:[{type:core.Output}],attrClass:[{type:core.HostBinding,args:["attr.id"]}]},Tab=(0,tslib_es6.gn)([(0,core.Component)({selector:"cds-tab, ibm-tab",template:'\n\t\t<div\n\t\t\t[attr.tabindex]="tabIndex"\n\t\t\trole="tabpanel"\n\t\t\t*ngIf="shouldRender()"\n\t\t\tclass="cds--tab-content"\n\t\t\t[ngStyle]="{\'display\': active ? null : \'none\'}"\n\t\t\t[attr.aria-labelledby]="id + \'-header\'"\n\t\t\taria-live="polite">\n\t\t\t<ng-template\n\t\t\t\t*ngIf="isTemplate(tabContent)"\n\t\t\t\t[ngTemplateOutlet]="tabContent"\n\t\t\t\t[ngTemplateOutletContext]="{ $implicit: templateContext }">\n\t\t\t</ng-template>\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t'})],Tab);let TabHeaders=class TabHeaders extends BaseTabHeader{constructor(elementRef,changeDetectorRef,eventService,renderer,i18n){super(elementRef,changeDetectorRef,eventService,renderer),this.elementRef=elementRef,this.changeDetectorRef=changeDetectorRef,this.eventService=eventService,this.renderer=renderer,this.i18n=i18n,this.translations=this.i18n.get().TABS,this.firstVisibleTab=0}keyboardInput(event){let tabsArray=this.tabs.toArray();"ArrowRight"===event.key&&(this.currentSelectedTab<this.allTabHeaders.length-1?(event.preventDefault(),this.followFocus&&this.selectTab(event.target,tabsArray[this.currentSelectedTab+1],this.currentSelectedTab),this.allTabHeaders.toArray()[this.currentSelectedTab+1].nativeElement.focus()):(event.preventDefault(),this.followFocus&&this.selectTab(event.target,tabsArray[0],0),this.allTabHeaders.first.nativeElement.focus())),"ArrowLeft"===event.key&&(this.currentSelectedTab>0?(event.preventDefault(),this.followFocus&&this.selectTab(event.target,tabsArray[this.currentSelectedTab-1],this.currentSelectedTab),this.allTabHeaders.toArray()[this.currentSelectedTab-1].nativeElement.focus()):(event.preventDefault(),this.followFocus&&this.selectTab(event.target,tabsArray[this.allTabHeaders.length-1],this.allTabHeaders.length),this.allTabHeaders.toArray()[this.allTabHeaders.length-1].nativeElement.focus())),"Home"===event.key&&(event.preventDefault(),this.followFocus&&this.selectTab(event.target,tabsArray[0],0),this.allTabHeaders.toArray()[0].nativeElement.focus()),"End"===event.key&&(event.preventDefault(),this.followFocus&&this.selectTab(event.target,tabsArray[this.allTabHeaders.length-1],this.allTabHeaders.length),this.allTabHeaders.toArray()[this.allTabHeaders.length-1].nativeElement.focus())," "!==event.key&&"Spacebar"!==event.key||this.followFocus||this.selectTab(event.target,tabsArray[this.currentSelectedTab],this.currentSelectedTab)}ngOnInit(){this.resizeObserver=new ResizeObserver((()=>{this.changeDetectorRef.detectChanges()})),this.resizeObserver.observe(this.headerContainer.nativeElement)}ngOnDestroy(){this.resizeObserver.unobserve(this.headerContainer.nativeElement)}ngAfterContentInit(){this.tabInput?this.tabs=this.tabInput:this.tabs=this.tabQuery,this.tabs.forEach((tab=>tab.cacheActive=this.cacheActive)),this.tabs.changes.subscribe((()=>{this.setFirstTab()})),this.setFirstTab()}ngOnChanges(changes){this.tabs&&changes.cacheActive&&this.tabs.forEach((tab=>tab.cacheActive=this.cacheActive))}onTabFocus(ref,index){this.currentSelectedTab=index,this.headerContainer.nativeElement.parentElement.scrollLeft=0}getSelectedTab(){const selected=this.tabs.find((tab=>tab.active));return selected||{headingIsTemplate:!1,heading:""}}selectTab(ref,tab,tabIndex){tab.disabled||(this.currentSelectedTab=tabIndex,this.tabs.forEach((_tab=>_tab.active=!1)),tab.active=!0,tab.doSelect())}setFirstTab(){setTimeout((()=>{let firstTab=this.tabs.find((tab=>tab.active));!firstTab&&this.tabs.first&&(firstTab=this.tabs.first,firstTab.active=!0),firstTab&&firstTab.doSelect()}))}};TabHeaders.ctorParameters=()=>[{type:core.ElementRef},{type:core.ChangeDetectorRef},{type:utils.PO},{type:core.Renderer2},{type:i18n.oc}],TabHeaders.propDecorators={tabInput:[{type:core.Input,args:["tabs"]}],translations:[{type:core.Input}],headerContainer:[{type:core.ViewChild,args:["tabList",{static:!0}]}],tabQuery:[{type:core.ContentChildren,args:[Tab]}],allTabHeaders:[{type:core.ViewChildren,args:["tabItem"]}],keyboardInput:[{type:core.HostListener,args:["keydown",["$event"]]}]},TabHeaders=(0,tslib_es6.gn)([(0,core.Component)({selector:"cds-tab-headers, ibm-tab-headers",template:'\n\t\t<button\n\t\t\ttype="button"\n\t\t\t(click)="handleOverflowNavClick(-1, tabs.length)"\n\t\t\t(pointerdown)="handleOverflowNavMouseDown(-1)"\n\t\t\t(pointerup)="handleOverflowNavMouseUp()"\n\t\t\t(pointerleave)="handleOverflowNavMouseUp()"\n\t\t\t(pointerout)="handleOverflowNavMouseUp()"\n\t\t\tclass="cds--tab--overflow-nav-button cds--tab--overflow-nav-button--previous"\n\t\t\t[ngClass]="{\n\t\t\t\t\'cds--tab--overflow-nav-button--hidden\': leftOverflowNavButtonHidden\n\t\t\t}"\n\t\t\t[title]="translations.BUTTON_ARIA_LEFT">\n\t\t\t<svg\n\t\t\t\tfocusable="false"\n\t\t\t\tpreserveAspectRatio="xMidYMid meet"\n\t\t\t\txmlns="http://www.w3.org/2000/svg"\n\t\t\t\tfill="currentColor"\n\t\t\t\twidth="16"\n\t\t\t\theight="16"\n\t\t\t\tviewBox="0 0 16 16"\n\t\t\t\taria-hidden="true">\n\t\t\t\t<path d="M5 8L10 3 10.7 3.7 6.4 8 10.7 12.3 10 13z"></path>\n\t\t\t</svg>\n\t\t</button>\n\t\t<div\n\t\t\t#tabList\n\t\t\tclass="cds--tab--list"\n\t\t\trole="tablist"\n\t\t\t[attr.aria-label]="ariaLabel || translations.HEADER_ARIA_LABEL"\n\t\t\t(scroll)="handleScroll()">\n\t\t\t<ng-container [ngTemplateOutlet]="contentBefore"></ng-container>\n\t\t\t<button\n\t\t\t\t*ngFor="let tab of tabs; let i = index;"\n\t\t\t\t#tabItem\n\t\t\t\trole="tab"\n\t\t\t\t[attr.aria-selected]="tab.active"\n\t\t\t\t[attr.tabindex]="(tab.active?0:-1)"\n\t\t\t\t[attr.aria-controls]="tab.id"\n\t\t\t\t[attr.aria-disabled]="tab.disabled"\n\t\t\t\t[ngClass]="{\n\t\t\t\t\t\'cds--tabs__nav-item--selected\': tab.active,\n\t\t\t\t\t\'cds--tabs__nav-item--disabled\': tab.disabled\n\t\t\t\t}"\n\t\t\t\tclass="cds--tabs__nav-item cds--tabs__nav-link"\n\t\t\t\ttype="button"\n\t\t\t\tdraggable="false"\n\t\t\t\tid="{{tab.id}}-header"\n\t\t\t\t(focus)="onTabFocus(tabItem, i)"\n\t\t\t\t(click)="selectTab(tabItem, tab, i)">\n\t\t\t\t<ng-container *ngIf="!tab.headingIsTemplate">\n\t\t\t\t\t{{ tab.heading }}\n\t\t\t\t</ng-container>\n\t\t\t\t<ng-template\n\t\t\t\t\t*ngIf="tab.headingIsTemplate"\n\t\t\t\t\t[ngTemplateOutlet]="tab.heading"\n\t\t\t\t\t[ngTemplateOutletContext]="{$implicit: tab.context}">\n\t\t\t\t</ng-template>\n\t\t\t</button>\n\t\t\t<ng-container [ngTemplateOutlet]="contentAfter"></ng-container>\n\t\t</div>\n\t\t<button\n\t\t\ttype="button"\n\t\t\t(click)="handleOverflowNavClick(1, tabs.length)"\n\t\t\t(pointerdown)="handleOverflowNavMouseDown(1)"\n\t\t\t(pointerup)="handleOverflowNavMouseUp()"\n\t\t\t(pointerleave)="handleOverflowNavMouseUp()"\n\t\t\t(pointerout)="handleOverflowNavMouseUp()"\n\t\t\tclass="cds--tab--overflow-nav-button cds--tab--overflow-nav-button--next"\n\t\t\t[ngClass]="{\n\t\t\t\t\'cds--tab--overflow-nav-button--hidden\': rightOverflowNavButtonHidden\n\t\t\t}"\n\t\t\t[title]="translations.BUTTON_ARIA_RIGHT">\n\t\t\t<svg\n\t\t\t\tfocusable="false"\n\t\t\t\tpreserveAspectRatio="xMidYMid meet"\n\t\t\t\txmlns="http://www.w3.org/2000/svg"\n\t\t\t\tfill="currentColor"\n\t\t\t\twidth="16"\n\t\t\t\theight="16"\n\t\t\t\tviewBox="0 0 16 16"\n\t\t\t\taria-hidden="true">\n\t\t\t\t<path d="M11 8L6 13 5.3 12.3 9.6 8 5.3 3.7 6 3z"></path>\n\t\t\t</svg>\n\t\t</button>\n\t'})],TabHeaders);let Tabs=class Tabs{constructor(){this.position="top",this.cacheActive=!1,this.followFocus=!0,this.isNavigation=!1,this.type="line",this.theme="dark",this.skeleton=!1}ngAfterContentInit(){this.tabHeaders&&(this.tabHeaders.cacheActive=this.cacheActive),this.tabs.forEach((tab=>{tab.tabIndex=this.isNavigation?null:0}))}ngOnChanges(changes){this.tabHeaders&&changes.cacheActive&&(this.tabHeaders.cacheActive=this.cacheActive),this.tabs&&changes.isNavigation&&this.tabs.forEach((tab=>{tab.tabIndex=this.isNavigation?null:0}))}hasTabHeaders(){return this.tabs.length>0}};Tabs.propDecorators={position:[{type:core.Input}],cacheActive:[{type:core.Input}],followFocus:[{type:core.Input}],isNavigation:[{type:core.Input}],ariaLabel:[{type:core.Input}],ariaLabelledby:[{type:core.Input}],type:[{type:core.Input}],theme:[{type:core.Input}],skeleton:[{type:core.Input}],tabs:[{type:core.ContentChildren,args:[Tab,{descendants:!1}]}],tabHeaders:[{type:core.ContentChild,args:[TabHeaders]}]},Tabs=(0,tslib_es6.gn)([(0,core.Component)({selector:"cds-tabs, ibm-tabs",template:'\n\t\t<ng-container *ngIf="skeleton">\n\t\t\t<cds-tabs-skeleton></cds-tabs-skeleton>\n\t\t</ng-container>\n\t\t<ng-container *ngIf="!skeleton">\n\t\t\t<cds-tab-headers\n\t\t\t\t*ngIf="hasTabHeaders() && position === \'top\'"\n\t\t\t\t[theme]="theme"\n\t\t\t\t[tabs]="tabs"\n\t\t\t\t[followFocus]="followFocus"\n\t\t\t\t[cacheActive]="cacheActive"\n\t\t\t\t[contentBefore]="before"\n\t\t\t\t[contentAfter]="after"\n\t\t\t\t[ariaLabel]="ariaLabel"\n\t\t\t\t[ariaLabelledby]="ariaLabelledby"\n\t\t\t\t[type]="type">\n\t\t\t</cds-tab-headers>\n\t\t\t<ng-content></ng-content>\n\t\t\t<ng-template #before>\n\t\t\t\t<ng-content select="[before]"></ng-content>\n\t\t\t</ng-template>\n\t\t\t<ng-template #after>\n\t\t\t\t<ng-content select="[after]"></ng-content>\n\t\t\t</ng-template>\n\t\t\t<cds-tab-headers\n\t\t\t\t*ngIf="hasTabHeaders() && position === \'bottom\'"\n\t\t\t\t[tabs]="tabs"\n\t\t\t\t[cacheActive]="cacheActive"\n\t\t\t\t[type]="type">\n\t\t\t</cds-tab-headers>\n\t\t</ng-container>\n\t'})],Tabs);let TabSkeleton=class TabSkeleton{constructor(){this.skeleton=!0,this.tabs=!0,this.numOfSkeletonTabs=new Array(5)}set numOftabs(num){this.numOfSkeletonTabs=new Array(num)}};TabSkeleton.propDecorators={numOftabs:[{type:core.Input}],skeleton:[{type:core.HostBinding,args:["class.cds--skeleton"]}],tabs:[{type:core.HostBinding,args:["class.cds--tabs"]}]},TabSkeleton=(0,tslib_es6.gn)([(0,core.Component)({selector:"cds-tabs-skeleton, ibm-tabs-skeleton",template:'\n\t\t<ul class="cds--tabs__nav">\n\t\t\t<li\n\t\t\t\t*ngFor="let i of numOfSkeletonTabs"\n\t\t\t\tclass="cds--tabs__nav-item">\n\t\t\t\t<div class="cds--tabs__nav-link">\n\t\t\t\t\t<span></span>\n\t\t\t\t</div>\n\t\t\t</li>\n\t\t</ul>\n\t'})],TabSkeleton);var common=__webpack_require__("./node_modules/@angular/common/fesm2020/common.mjs");let TabsModule=class TabsModule{};TabsModule=(0,tslib_es6.gn)([(0,core.NgModule)({declarations:[BaseTabHeader,Tabs,Tab,TabHeader,TabHeaders,TabHeaderGroup,TabSkeleton],exports:[Tabs,Tab,TabHeader,TabHeaders,TabHeaderGroup,TabSkeleton],imports:[common.CommonModule,utils.As,i18n.LU]})],TabsModule);let TabStory=class TabStory{constructor(){this.skeleton=!1,this.followFocus=!0,this.cacheActive=!1,this.isNavigation=!0,this.type="line"}};TabStory.propDecorators={skeleton:[{type:core.Input}],followFocus:[{type:core.Input}],cacheActive:[{type:core.Input}],isNavigation:[{type:core.Input}],type:[{type:core.Input}]},TabStory=(0,tslib_es6.gn)([(0,core.Component)({selector:"app-header-group",template:'\n\t\t<cds-tab-header-group\n\t\t\t[type]="type"\n\t\t\t[followFocus]="followFocus"\n\t\t\t[cacheActive]="cacheActive"\n\t\t\t[isNavigation]="isNavigation">\n\t\t\t<button cdsTabHeader [paneReference]="content1">\n\t\t\t\tContent 1\n\t\t\t</button>\n\t\t\t<button cdsTabHeader [paneReference]="content2">\n\t\t\t\tContent 2\n\t\t\t</button>\n\t\t\t<button cdsTabHeader [paneReference]="content3" disabled="true">\n\t\t\t\tContent 3\n\t\t\t</button>\n\t\t\t<button cdsTabHeader [paneReference]="content4">\n\t\t\t\tContent 4\n\t\t\t</button>\n\t\t\t<button cdsTabHeader [paneReference]="content5">\n\t\t\t\tContent 5\n\t\t\t</button>\n\t\t</cds-tab-header-group>\n\n\t\t<cds-tab #content1>\n\t\t\tTab Content 1\n\t\t</cds-tab>\n\t\t<cds-tab #content2>\n\t\t\tTab Content 2\n\t\t</cds-tab>\n\t\t<cds-tab #content3>\n\t\t\tTab Content 3\n\t\t</cds-tab>\n\t\t<cds-tab #content4>\n\t\t\tTab Content 4\n\t\t</cds-tab>\n\t\t<cds-tab #content5>\n\t\t\tTab Content 5\n\t\t</cds-tab>\n\t'})],TabStory);const tabs_stories={title:"Components/Tabs",decorators:[(0,dist.moduleMetadata)({imports:[TabsModule],declarations:[TabStory]})]},Basic=(args=>({props:args,template:'\n <cds-tabs\n [type]="type"\n [followFocus]="followFocus"\n [isNavigation]="isNavigation"\n [cacheActive]="cacheActive">\n <cds-tab heading="one">Tab Content 1</cds-tab>\n <cds-tab heading="two">Tab Content 2</cds-tab>\n <cds-tab heading="three" [tabContent]="three"></cds-tab>\n <cds-tab heading="four" [tabContent]="four"></cds-tab>\n </cds-tabs>\n\n \x3c!-- Use templates if you would like to have lifecycle hooks called when cacheActive is false --\x3e\n <ng-template #three>\n Tab Content 3\n </ng-template>\n\n <ng-template #four>\n Tab Content 4\n </ng-template>\n '})).bind({});Basic.args={followFocus:!0,cacheActive:!0,isNavigation:!1,type:"inline"},Basic.argTypes={type:{options:["inline","contained"],control:"radio"}};const With=(args=>({props:args,template:'\n <ng-template #customTabs let-item>\n {{item ? item.name : "wait for it"}}\n </ng-template>\n <ng-template #iconTab>\n <div style="height: 14px;">\n Something custom\n <svg width="16" height="16" viewBox="0 0 16 16"\n style="height: 14px; width: 14px; fill: #3d70b2;">\n <path d="M8 14.5a6.5 6.5 0 1 0 0-13 6.5 6.5 0 0 0 0 13zM8 16A8 8 0 1 1 8 0a8 8 0 0 1 0 16z"></path>\n <path d="M9 13H7V7h2z"></path>\n <path d="M7 4a1 1 0 1 1 2 0 1 1 0 1 1-2 0"></path>\n </svg>\n </div>\n </ng-template>\n <cds-tabs [type]="type" [followFocus]="followFocus" [isNavigation]="isNavigation">\n <cds-tab\n *ngFor="let item of data; let i = index;"\n [heading]="customTabs"\n title="Tab Content"\n [context]="item">\n Tab Content {{i + 1}}\n </cds-tab>\n <cds-tab [heading]="iconTab" title="Custom tab content">Tab Content Custom</cds-tab>\n </cds-tabs>\n '})).bind({});With.storyName="With template",With.args={followFocus:!0,isNavigation:!1,data:[{name:"one"},{name:"two"},{name:"three"}]},With.argTypes={...Basic.argTypes};const BeforeAndAfter=(args=>({props:args,template:'\n <div style="font-weight: 600; padding-bottom: 10px; padding-top: 20px;">before</div>\n <cds-tabs [type]="type" [followFocus]="followFocus" [isNavigation]="isNavigation">\n <cds-tab heading="one">foo</cds-tab>\n <cds-tab heading="two">bar</cds-tab>\n <span before>content before</span>\n </cds-tabs>\n <div style="font-weight: 600; padding-bottom: 10px; padding-top: 20px;">after</div>\n <cds-tabs [type]="type" [followFocus]="followFocus" [isNavigation]="isNavigation">\n <cds-tab heading="one">foo</cds-tab>\n <cds-tab heading="two">bar</cds-tab>\n <span after>content after</span>\n </cds-tabs>\n <div style="font-weight: 600; padding-bottom: 10px; padding-top: 20px;">both</div>\n <cds-tabs [type]="type" [followFocus]="followFocus" [isNavigation]="isNavigation">\n <cds-tab heading="one">foo</cds-tab>\n <cds-tab heading="two">bar</cds-tab>\n <span before>content before</span>\n <span after>content after</span>\n </cds-tabs>\n '})).bind({});BeforeAndAfter.storyName="Width before and after content",BeforeAndAfter.args={followFocus:!0,isNavigation:!1},BeforeAndAfter.argTypes={...Basic.argTypes};const TabheaderGroup=(args=>({props:args,template:'\n \x3c!--\n app-* components are for demo purposes only.\n You can create your own implementation by using the component source found at:\n https://github.com/IBM/carbon-components-angular/tree/master/src/pagination/stories/pagination.component.ts\n --\x3e\n <app-header-group\n [type]="type"\n [followFocus]="followFocus"\n [cacheActive]="cacheActive"\n [isNavigation]="isNavigation">\n </app-header-group>\n '})).bind({});TabheaderGroup.args={...Basic.args},TabheaderGroup.argTypes={...Basic.argTypes};const Skeleton=(args=>({props:args,template:'\n <cds-tabs skeleton="true">\n <cds-tab></cds-tab>\n <cds-tab></cds-tab>\n </cds-tabs>\n\n <div style="margin-top: 5rem">\n <p>Tab skeleton component for cds-tab-header-group:</p>\n <cds-tabs-skeleton></cds-tabs-skeleton>\n </div>\n '})).bind({});Basic.parameters={...Basic.parameters,docs:{...Basic.parameters?.docs,source:{originalSource:'args => ({\n props: args,\n template: `\n <cds-tabs\n [type]="type"\n [followFocus]="followFocus"\n [isNavigation]="isNavigation"\n [cacheActive]="cacheActive">\n <cds-tab heading="one">Tab Content 1</cds-tab>\n <cds-tab heading="two">Tab Content 2</cds-tab>\n <cds-tab heading="three" [tabContent]="three"></cds-tab>\n <cds-tab heading="four" [tabContent]="four"></cds-tab>\n </cds-tabs>\n\n \x3c!-- Use templates if you would like to have lifecycle hooks called when cacheActive is false --\x3e\n <ng-template #three>\n Tab Content 3\n </ng-template>\n\n <ng-template #four>\n Tab Content 4\n </ng-template>\n `\n})',...Basic.parameters?.docs?.source}}},With.parameters={...With.parameters,docs:{...With.parameters?.docs,source:{originalSource:'args => ({\n props: args,\n template: `\n <ng-template #customTabs let-item>\n {{item ? item.name : "wait for it"}}\n </ng-template>\n <ng-template #iconTab>\n <div style="height: 14px;">\n Something custom\n <svg width="16" height="16" viewBox="0 0 16 16"\n style="height: 14px; width: 14px; fill: #3d70b2;">\n <path d="M8 14.5a6.5 6.5 0 1 0 0-13 6.5 6.5 0 0 0 0 13zM8 16A8 8 0 1 1 8 0a8 8 0 0 1 0 16z"></path>\n <path d="M9 13H7V7h2z"></path>\n <path d="M7 4a1 1 0 1 1 2 0 1 1 0 1 1-2 0"></path>\n </svg>\n </div>\n </ng-template>\n <cds-tabs [type]="type" [followFocus]="followFocus" [isNavigation]="isNavigation">\n <cds-tab\n *ngFor="let item of data; let i = index;"\n [heading]="customTabs"\n title="Tab Content"\n [context]="item">\n Tab Content {{i + 1}}\n </cds-tab>\n <cds-tab [heading]="iconTab" title="Custom tab content">Tab Content Custom</cds-tab>\n </cds-tabs>\n `\n})',...With.parameters?.docs?.source}}},BeforeAndAfter.parameters={...BeforeAndAfter.parameters,docs:{...BeforeAndAfter.parameters?.docs,source:{originalSource:'args => ({\n props: args,\n template: `\n <div style="font-weight: 600; padding-bottom: 10px; padding-top: 20px;">before</div>\n <cds-tabs [type]="type" [followFocus]="followFocus" [isNavigation]="isNavigation">\n <cds-tab heading="one">foo</cds-tab>\n <cds-tab heading="two">bar</cds-tab>\n <span before>content before</span>\n </cds-tabs>\n <div style="font-weight: 600; padding-bottom: 10px; padding-top: 20px;">after</div>\n <cds-tabs [type]="type" [followFocus]="followFocus" [isNavigation]="isNavigation">\n <cds-tab heading="one">foo</cds-tab>\n <cds-tab heading="two">bar</cds-tab>\n <span after>content after</span>\n </cds-tabs>\n <div style="font-weight: 600; padding-bottom: 10px; padding-top: 20px;">both</div>\n <cds-tabs [type]="type" [followFocus]="followFocus" [isNavigation]="isNavigation">\n <cds-tab heading="one">foo</cds-tab>\n <cds-tab heading="two">bar</cds-tab>\n <span before>content before</span>\n <span after>content after</span>\n </cds-tabs>\n `\n})',...BeforeAndAfter.parameters?.docs?.source}}},TabheaderGroup.parameters={...TabheaderGroup.parameters,docs:{...TabheaderGroup.parameters?.docs,source:{originalSource:'args => ({\n props: args,\n template: `\n \x3c!--\n app-* components are for demo purposes only.\n You can create your own implementation by using the component source found at:\n https://github.com/IBM/carbon-components-angular/tree/master/src/pagination/stories/pagination.component.ts\n --\x3e\n <app-header-group\n [type]="type"\n [followFocus]="followFocus"\n [cacheActive]="cacheActive"\n [isNavigation]="isNavigation">\n </app-header-group>\n `\n})',...TabheaderGroup.parameters?.docs?.source}}},Skeleton.parameters={...Skeleton.parameters,docs:{...Skeleton.parameters?.docs,source:{originalSource:'args => ({\n props: args,\n template: `\n <cds-tabs skeleton="true">\n <cds-tab></cds-tab>\n <cds-tab></cds-tab>\n </cds-tabs>\n\n <div style="margin-top: 5rem">\n <p>Tab skeleton component for cds-tab-header-group:</p>\n <cds-tabs-skeleton></cds-tabs-skeleton>\n </div>\n `\n})',...Skeleton.parameters?.docs?.source}}};const __namedExportsOrder=["Basic","With","BeforeAndAfter","TabheaderGroup","Skeleton"]}}]);