UNPKG

carbon-components-angular

Version:
1 lines 29.1 kB
"use strict";(self.webpackChunkcarbon_components_angular=self.webpackChunkcarbon_components_angular||[]).push([[703],{"./src/button/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{HL:()=>BaseIconButton,zx:()=>Button,hJ:()=>ButtonModule,uV:()=>ButtonSet,hU:()=>IconButton});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.js"),core=__webpack_require__("./node_modules/@angular/core/fesm2020/core.mjs");let Button=class Button{constructor(){this.cdsButton="primary",this.skeleton=!1,this.iconOnly=!1,this.isExpressive=!1,this.baseClass=!0}set ibmButton(type){this.cdsButton=type}get primaryButton(){return"primary"===this.cdsButton||!this.cdsButton}get secondaryButton(){return"secondary"===this.cdsButton}get tertiaryButton(){return"tertiary"===this.cdsButton}get ghostButton(){return"ghost"===this.cdsButton}get dangerButton(){return"danger"===this.cdsButton||"danger--primary"===this.cdsButton}get dangerTertiary(){return"danger--tertiary"===this.cdsButton}get dangerGhost(){return"danger--ghost"===this.cdsButton}get smallSize(){return"sm"===this.size&&!this.isExpressive}get mediumSize(){return"md"===this.size&&!this.isExpressive}get largeSize(){return"lg"===this.size}get extraLargeSize(){return"xl"===this.size}get twoExtraLargeSize(){return"2xl"===this.size}get smallLayoutSize(){return"sm"===this.size&&!this.isExpressive}get mediumLayoutSize(){return"md"===this.size&&!this.isExpressive}get largeLayoutSize(){return"lg"===this.size}get extraLargeLayoutSize(){return"xl"===this.size}get twoExtraLargeLayoutSize(){return"2xl"===this.size}};Button.propDecorators={ibmButton:[{type:core.Input}],cdsButton:[{type:core.Input}],size:[{type:core.Input}],skeleton:[{type:core.HostBinding,args:["class.cds--skeleton"]},{type:core.Input}],iconOnly:[{type:core.HostBinding,args:["class.cds--btn--icon-only"]},{type:core.Input}],isExpressive:[{type:core.HostBinding,args:["class.cds--btn--expressive"]},{type:core.Input}],baseClass:[{type:core.HostBinding,args:["class.cds--btn"]}],primaryButton:[{type:core.HostBinding,args:["class.cds--btn--primary"]}],secondaryButton:[{type:core.HostBinding,args:["class.cds--btn--secondary"]}],tertiaryButton:[{type:core.HostBinding,args:["class.cds--btn--tertiary"]}],ghostButton:[{type:core.HostBinding,args:["class.cds--btn--ghost"]}],dangerButton:[{type:core.HostBinding,args:["class.cds--btn--danger"]}],dangerTertiary:[{type:core.HostBinding,args:["class.cds--btn--danger--tertiary"]}],dangerGhost:[{type:core.HostBinding,args:["class.cds--btn--danger--ghost"]}],smallSize:[{type:core.HostBinding,args:["class.cds--btn--sm"]}],mediumSize:[{type:core.HostBinding,args:["class.cds--btn--md"]}],largeSize:[{type:core.HostBinding,args:["class.cds--btn--lg"]}],extraLargeSize:[{type:core.HostBinding,args:["class.cds--btn--xl"]}],twoExtraLargeSize:[{type:core.HostBinding,args:["class.cds--btn--2xl"]}],smallLayoutSize:[{type:core.HostBinding,args:["class.cds--layout--size-sm"]}],mediumLayoutSize:[{type:core.HostBinding,args:["class.cds--layout--size-md"]}],largeLayoutSize:[{type:core.HostBinding,args:["class.cds--layout--size-lg"]}],extraLargeLayoutSize:[{type:core.HostBinding,args:["class.cds--layout--size-xl"]}],twoExtraLargeLayoutSize:[{type:core.HostBinding,args:["class.cds--layout--size-2xl"]}]},Button=(0,tslib_es6.gn)([(0,core.Directive)({selector:"[cdsButton], [ibmButton]"})],Button);let ButtonSet=class ButtonSet{constructor(){this.buttonSetClass=!0}};ButtonSet.propDecorators={buttonSetClass:[{type:core.HostBinding,args:["class.cds--btn-set"]}]},ButtonSet=(0,tslib_es6.gn)([(0,core.Component)({selector:"cds-button-set, ibm-button-set",template:"<ng-content></ng-content>"})],ButtonSet);let BaseIconButton=class BaseIconButton{constructor(){this.caret=!0,this.dropShadow=!0,this.highContrast=!0,this.isOpen=!1,this.align="bottom",this.autoAlign=!1,this.enterDelayMs=100,this.leaveDelayMs=300}};BaseIconButton.propDecorators={caret:[{type:core.Input}],dropShadow:[{type:core.Input}],highContrast:[{type:core.Input}],isOpen:[{type:core.Input}],align:[{type:core.Input}],autoAlign:[{type:core.Input}],enterDelayMs:[{type:core.Input}],leaveDelayMs:[{type:core.Input}]},BaseIconButton=(0,tslib_es6.gn)([(0,core.Component)({template:""})],BaseIconButton);let IconButton=class IconButton extends BaseIconButton{constructor(renderer){super(),this.renderer=renderer,this.buttonId="icon-btn-"+IconButton.iconButtonCounter++,this.kind="primary",this.size="lg",this.type="button",this.isExpressive=!1,this.disabled=!1,this.showTooltipWhenDisabled=!1,this.click=new core.EventEmitter,this.focus=new core.EventEmitter,this.blur=new core.EventEmitter,this.tooltipClick=new core.EventEmitter,this.classList={},this.attributeList={}}set buttonNgClass(obj){this.classList=Object.assign({"cds--btn--disabled":this.disabled},obj)}get buttonNgClass(){return this.classList}set buttonAttributes(obj){this.button&&(Object.keys(this.attributeList).forEach((key=>{this.renderer.removeAttribute(this.button.nativeElement,key)})),Object.keys(obj).forEach((key=>{this.renderer.setAttribute(this.button.nativeElement,key,obj[key])}))),this.attributeList=obj}get buttonAttributes(){return this.buttonAttributes}ngAfterViewInit(){this.buttonAttributes=this.attributeList}emitClickEvent(event,element="button"){event.preventDefault(),event.stopPropagation(),"tooltip"!==element?this.click.emit(event):this.tooltipClick.emit(event)}};IconButton.iconButtonCounter=0,IconButton.ctorParameters=()=>[{type:core.Renderer2}],IconButton.propDecorators={buttonNgClass:[{type:core.Input}],buttonAttributes:[{type:core.Input}],button:[{type:core.ViewChild,args:["button"]}],buttonId:[{type:core.Input}],kind:[{type:core.Input}],size:[{type:core.Input}],type:[{type:core.Input}],isExpressive:[{type:core.Input}],disabled:[{type:core.Input}],description:[{type:core.Input}],showTooltipWhenDisabled:[{type:core.Input}],click:[{type:core.Output}],focus:[{type:core.Output}],blur:[{type:core.Output}],tooltipClick:[{type:core.Output}]},IconButton=(0,tslib_es6.gn)([(0,core.Component)({selector:"cds-icon-button, ibm-icon-button",template:'\n\t<cds-tooltip\n\t\tclass="cds--icon-tooltip"\n\t\t[description]="description"\n\t\t[disabled]="showTooltipWhenDisabled ? false : disabled"\n\t\t[caret]="caret"\n\t\t[dropShadow]="dropShadow"\n\t\t[highContrast]="highContrast"\n\t\t[isOpen]="isOpen"\n\t\t[align]="align"\n\t\t[autoAlign]="autoAlign"\n\t\t[enterDelayMs]="enterDelayMs"\n\t\t[leaveDelayMs]="leaveDelayMs"\n\t\t(click)="emitClickEvent($event, \'tooltip\')">\n\t\t<button\n\t\t\t#button\n\t\t\t[id]="buttonId"\n\t\t\t[disabled]="disabled"\n\t\t\t[attr.type]="type"\n\t\t\t[iconOnly]="true"\n\t\t\t[ngClass]="buttonNgClass"\n\t\t\t[cdsButton]="kind"\n\t\t\t[size]="size"\n\t\t\t[isExpressive]="isExpressive"\n\t\t\t(click)="emitClickEvent($event)"\n\t\t\t(focus)="focus.emit($event)"\n\t\t\t(blur)="blur.emit($event)">\n\t\t\t<ng-content></ng-content>\n\t\t</button>\n\t</cds-tooltip>\n\t'})],IconButton);var common=__webpack_require__("./node_modules/@angular/common/fesm2020/common.mjs"),tooltip=__webpack_require__("./src/tooltip/index.ts");let ButtonModule=class ButtonModule{};ButtonModule=(0,tslib_es6.gn)([(0,core.NgModule)({declarations:[Button,ButtonSet,BaseIconButton,IconButton],exports:[Button,ButtonSet,IconButton],imports:[common.CommonModule,tooltip.z8]})],ButtonModule)},"./src/link/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{rU:()=>Link,LO:()=>LinkModule});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.js"),core=__webpack_require__("./node_modules/@angular/core/fesm2020/core.mjs");let Link=class Link{constructor(){this.baseClass=!0,this.inline=!1}set disabled(disabled){this._disabled=disabled,this.tabindex=this.disabled?-1:null}get disabled(){return this._disabled}};Link.propDecorators={baseClass:[{type:core.HostBinding,args:["class.cds--link"]}],tabindex:[{type:core.HostBinding,args:["attr.tabindex"]}],inline:[{type:core.Input},{type:core.HostBinding,args:["class.cds--link--inline"]}],disabled:[{type:core.Input},{type:core.HostBinding,args:["attr.aria-disabled"]},{type:core.HostBinding,args:["class.cds--link--disabled"]}]},Link=(0,tslib_es6.gn)([(0,core.Directive)({selector:"[cdsLink], [ibmLink]"})],Link);let LinkIconDirective=class LinkIconDirective{constructor(){this.iconClass=!0}};LinkIconDirective.propDecorators={iconClass:[{type:core.HostBinding,args:["class.cds--link__icon"]}]},LinkIconDirective=(0,tslib_es6.gn)([(0,core.Directive)({selector:"[ibmLinkIcon], [cdsLinkIcon]"})],LinkIconDirective);var common=__webpack_require__("./node_modules/@angular/common/fesm2020/common.mjs");let LinkModule=class LinkModule{};LinkModule=(0,tslib_es6.gn)([(0,core.NgModule)({declarations:[Link,LinkIconDirective],exports:[Link,LinkIconDirective],imports:[common.CommonModule]})],LinkModule)},"./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/toggletip/toggletip.stories.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Basic:()=>Basic,WithAutoAlign:()=>WithAutoAlign,__namedExportsOrder:()=>__namedExportsOrder,default:()=>toggletip_stories});var dist=__webpack_require__("./node_modules/@storybook/angular/dist/index.mjs"),src_link=__webpack_require__("./src/link/index.ts"),src_button=__webpack_require__("./src/button/index.ts"),tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.js"),core=__webpack_require__("./node_modules/@angular/core/fesm2020/core.mjs");let ToggletipAction=class ToggletipAction{constructor(){this.toggleTipActions=!0}};ToggletipAction.propDecorators={toggleTipActions:[{type:core.HostBinding,args:["class.cds--toggletip-actions"]}]},ToggletipAction=(0,tslib_es6.gn)([(0,core.Directive)({selector:"[cdsToggletipAction], [ibmToggletipAction]"})],ToggletipAction);let ToggletipButton=class ToggletipButton{constructor(){this.toggletipButton=!0,this.toggletipButtonType="button",this.ariaLabel="Show information"}};ToggletipButton.propDecorators={toggletipButton:[{type:core.HostBinding,args:["class.cds--toggletip-button"]}],toggletipButtonType:[{type:core.HostBinding,args:["attr.type"]}],ariaLabel:[{type:core.HostBinding,args:["attr.aria-label"]},{type:core.Input}]},ToggletipButton=(0,tslib_es6.gn)([(0,core.Directive)({selector:"[cdsToggletipButton], [ibmToggletipButton]"})],ToggletipButton);let ToggletipContent=class ToggletipContent{constructor(){this.toggletipContent=!0}};ToggletipContent.propDecorators={toggletipContent:[{type:core.HostBinding,args:["class.cds--toggletip-content"]}]},ToggletipContent=(0,tslib_es6.gn)([(0,core.Directive)({selector:"[cdsToggletipContent], [ibmToggletipContent]"})],ToggletipContent);let ToggletipLabel=class ToggletipLabel{constructor(){this.toggleTipLabel=!0}};ToggletipLabel.propDecorators={toggleTipLabel:[{type:core.HostBinding,args:["class.cds--toggletip-label"]}]},ToggletipLabel=(0,tslib_es6.gn)([(0,core.Directive)({selector:"[cdsToggletipLabel], [ibmToggletipLabel]"})],ToggletipLabel);var fromEvent=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/fromEvent.js"),popover=__webpack_require__("./src/popover/index.ts");let Toggletip=class Toggletip extends popover.OI{constructor(hostElement,ngZone,renderer,changeDetectorRef){super(hostElement,ngZone,renderer,changeDetectorRef),this.hostElement=hostElement,this.ngZone=ngZone,this.renderer=renderer,this.changeDetectorRef=changeDetectorRef,this.id="tooltip-"+Toggletip.toggletipCounter++,this.toggletipClass=!0,this.isOpen=!1,this.documentClick=this.handleFocusOut.bind(this),this.highContrast=!0,this.dropShadow=!1}ngAfterViewInit(){this.initializeReferences(),this.subscription=(0,fromEvent.R)(this.btn.nativeElement,"click").subscribe((event=>{this.isOpen?document.removeEventListener("click",this.documentClick):document.addEventListener("click",this.documentClick),this.handleExpansion(!this.isOpen,event)})),this.isOpen&&document.addEventListener("click",this.documentClick),this.btn&&this.renderer.setAttribute(this.btn.nativeElement,"aria-controls",this.id)}hostkeys(event){open&&"Escape"===event.key&&(event.stopPropagation(),this.handleExpansion(!1,event))}handleFocusOut(event){this.hostElement.nativeElement.contains(event.target)||this.handleExpansion(!1,event)}ngOnDestroy(){this.subscription.unsubscribe()}handleExpansion(state=!1,event){this.handleChange(state,event),this.btn&&this.renderer.setAttribute(this.btn.nativeElement,"aria-expanded",this.isOpen.toString())}};Toggletip.toggletipCounter=0,Toggletip.ctorParameters=()=>[{type:core.ElementRef},{type:core.NgZone},{type:core.Renderer2},{type:core.ChangeDetectorRef}],Toggletip.propDecorators={id:[{type:core.Input}],toggletipClass:[{type:core.HostBinding,args:["class.cds--toggletip"]}],isOpen:[{type:core.HostBinding,args:["class.cds--toggletip--open"]},{type:core.Input}],btn:[{type:core.ContentChild,args:[ToggletipButton,{read:core.ElementRef}]}],hostkeys:[{type:core.HostListener,args:["keyup",["$event"]]}]},Toggletip=(0,tslib_es6.gn)([(0,core.Component)({selector:"cds-toggletip, ibm-toggletip",changeDetection:core.ChangeDetectionStrategy.OnPush,template:'\n\t\t<ng-content select="[cdsToggletipButton]"></ng-content>\n\t\t<cds-popover-content [attr.id]="id" aria-live="polite">\n\t\t\t<ng-content select="[cdsToggletipContent]"></ng-content>\n\t\t</cds-popover-content>\n\t'})],Toggletip);var common=__webpack_require__("./node_modules/@angular/common/fesm2020/common.mjs");let ToggletipModule=class ToggletipModule{};ToggletipModule=(0,tslib_es6.gn)([(0,core.NgModule)({declarations:[Toggletip,ToggletipLabel,ToggletipAction,ToggletipButton,ToggletipContent],exports:[Toggletip,ToggletipLabel,ToggletipAction,ToggletipButton,ToggletipContent],imports:[common.CommonModule,popover.UU]})],ToggletipModule);const toggletip_stories={title:"Components/Toggletip",decorators:[(0,dist.moduleMetadata)({imports:[ToggletipModule,src_link.LO,src_button.hJ]})],args:{isOpen:!0,align:"bottom",autoAlign:!1},argTypes:{autoAlign:{control:!1},onOpen:{control:"Opened!"},onClose:{control:"Closed!"},isOpenChange:{control:"Is Open Change!"},align:{options:["top","bottom","left","right"],control:"select"}},component:Toggletip,subcomponents:{ToggletipAction,ToggletipButton,ToggletipContent,ToggletipLabel}},Basic=(args=>({props:args,template:'\n <span cdsToggletipLabel>Toggletip label</span>\n <cds-toggletip\n [isOpen]="isOpen"\n [align]="align"\n (isOpenChange)="isOpenChange($event)"\n (onClose)="onClose($event)"\n (onOpen)="onOpen($event)">\n <button cdsToggletipButton>\n <svg preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 32 32">\n <path d="M26,4H6A2,2,0,0,0,4,6V26a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V6A2,2,0,0,0,26,4ZM6,26V6H26V26Z"></path>\n </svg>\n </button>\n <div cdsToggletipContent>\n <p>\n Lorem ipsum dolor sit amet, di os consectetur adipiscing elit, sed\n do eiusmod tempor incididunt ut fsil labore et dolore magna aliqua.\n </p>\n <div cdsToggletipAction>\n <a href="#" cdsLink>Link action</a>\n <button cdsButton size="sm">Some button</button>\n </div>\n </div>\n </cds-toggletip>\n ',styles:["\n .tooltip-trigger {\n box-sizing: border-box;\n margin: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n background: white;\n border: 1px solid var(--cds-border-subtle);\n cursor: pointer;\n }\n svg { fill: var(--cds-background-inverse); }\n "]})).bind({});Basic.parameters={docs:{story:{inline:!1,height:"30rem"}},layout:"centered"};const WithAutoAlign=(args=>({props:args,template:'\n <div style="height:3000px">\n Scrolling will update the position of the popover:\n <div style="position: absolute; top: 500px; left: 500px;">\n <span cdsToggletipLabel>Toggletip label</span>\n <cds-toggletip\n [isOpen]="isOpen"\n [align]="align"\n [autoAlign]="true"\n (isOpenChange)="isOpenChange($event)"\n (onClose)="onClose($event)"\n (onOpen)="onOpen($event)">\n <button cdsToggletipButton>\n <svg preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 32 32">\n <path d="M26,4H6A2,2,0,0,0,4,6V26a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V6A2,2,0,0,0,26,4ZM6,26V6H26V26Z"></path>\n </svg>\n </button>\n <div cdsToggletipContent>\n <p>\n Lorem ipsum dolor sit amet, di os consectetur adipiscing elit, sed\n do eiusmod tempor incididunt ut fsil labore et dolore magna aliqua.\n </p>\n <div cdsToggletipAction>\n <a href="#" cdsLink>Link action</a>\n <button cdsButton size="sm">Some button</button>\n </div>\n </div>\n </cds-toggletip>\n </div>\n </div>\n ',styles:["\n .tooltip-trigger {\n box-sizing: border-box;\n margin: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n background: white;\n border: 1px solid var(--cds-border-subtle);\n cursor: pointer;\n }\n svg { fill: var(--cds-background-inverse); }\n "]})).bind({});WithAutoAlign.args={autoAlign:!0,align:"top"},Basic.parameters={...Basic.parameters,docs:{...Basic.parameters?.docs,source:{originalSource:'args => ({\n props: args,\n template: `\n <span cdsToggletipLabel>Toggletip label</span>\n <cds-toggletip\n [isOpen]="isOpen"\n [align]="align"\n (isOpenChange)="isOpenChange($event)"\n (onClose)="onClose($event)"\n (onOpen)="onOpen($event)">\n <button cdsToggletipButton>\n <svg preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 32 32">\n <path d="M26,4H6A2,2,0,0,0,4,6V26a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V6A2,2,0,0,0,26,4ZM6,26V6H26V26Z"></path>\n </svg>\n </button>\n <div cdsToggletipContent>\n <p>\n Lorem ipsum dolor sit amet, di os consectetur adipiscing elit, sed\n do eiusmod tempor incididunt ut fsil labore et dolore magna aliqua.\n </p>\n <div cdsToggletipAction>\n <a href="#" cdsLink>Link action</a>\n <button cdsButton size="sm">Some button</button>\n </div>\n </div>\n </cds-toggletip>\n `,\n styles: [`\n .tooltip-trigger {\n box-sizing: border-box;\n margin: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n background: white;\n border: 1px solid var(--cds-border-subtle);\n cursor: pointer;\n }\n svg { fill: var(--cds-background-inverse); }\n `]\n})',...Basic.parameters?.docs?.source}}},WithAutoAlign.parameters={...WithAutoAlign.parameters,docs:{...WithAutoAlign.parameters?.docs,source:{originalSource:'args => ({\n props: args,\n template: `\n <div style="height:3000px">\n Scrolling will update the position of the popover:\n <div style="position: absolute; top: 500px; left: 500px;">\n <span cdsToggletipLabel>Toggletip label</span>\n <cds-toggletip\n [isOpen]="isOpen"\n [align]="align"\n [autoAlign]="true"\n (isOpenChange)="isOpenChange($event)"\n (onClose)="onClose($event)"\n (onOpen)="onOpen($event)">\n <button cdsToggletipButton>\n <svg preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 32 32">\n <path d="M26,4H6A2,2,0,0,0,4,6V26a2,2,0,0,0,2,2H26a2,2,0,0,0,2-2V6A2,2,0,0,0,26,4ZM6,26V6H26V26Z"></path>\n </svg>\n </button>\n <div cdsToggletipContent>\n <p>\n Lorem ipsum dolor sit amet, di os consectetur adipiscing elit, sed\n do eiusmod tempor incididunt ut fsil labore et dolore magna aliqua.\n </p>\n <div cdsToggletipAction>\n <a href="#" cdsLink>Link action</a>\n <button cdsButton size="sm">Some button</button>\n </div>\n </div>\n </cds-toggletip>\n </div>\n </div>\n `,\n styles: [`\n .tooltip-trigger {\n box-sizing: border-box;\n margin: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n background: white;\n border: 1px solid var(--cds-border-subtle);\n cursor: pointer;\n }\n svg { fill: var(--cds-background-inverse); }\n `]\n})',...WithAutoAlign.parameters?.docs?.source}}};const __namedExportsOrder=["Basic","WithAutoAlign"]}}]);