carbon-components-angular 5.59.1 → 5.59.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/documentation/components/TooltipDefinition.html +176 -38
- package/docs/documentation/coverage.html +3 -3
- package/docs/documentation/js/search/search_index.js +2 -2
- package/docs/documentation/modules/TilesModule/dependencies.svg +93 -93
- package/docs/documentation/modules/TilesModule.html +93 -93
- package/docs/documentation/modules/TimePickerModule/dependencies.svg +18 -18
- package/docs/documentation/modules/TimePickerModule.html +18 -18
- package/docs/documentation/modules/TimePickerSelectModule/dependencies.svg +41 -45
- package/docs/documentation/modules/TimePickerSelectModule.html +41 -45
- package/docs/documentation/modules/ToggleModule/dependencies.svg +19 -19
- package/docs/documentation/modules/ToggleModule.html +19 -19
- package/docs/documentation/modules/ToggletipModule/dependencies.svg +37 -37
- package/docs/documentation/modules/ToggletipModule.html +37 -37
- package/docs/documentation/modules/TooltipModule/dependencies.svg +4 -4
- package/docs/documentation/modules/TooltipModule.html +4 -4
- package/docs/documentation/modules/TreeviewModule/dependencies.svg +36 -36
- package/docs/documentation/modules/TreeviewModule.html +36 -36
- package/docs/documentation.json +150 -130
- package/docs/storybook/{6702.8fcd135f.iframe.bundle.js → 6702.a0e549d4.iframe.bundle.js} +1 -1
- package/docs/storybook/iframe.html +2 -2
- package/docs/storybook/{main.f6ef3c2c.iframe.bundle.js → main.762d7fb4.iframe.bundle.js} +1 -1
- package/docs/storybook/main.css +2137 -697
- package/docs/storybook/project.json +1 -1
- package/docs/storybook/{runtime~main.5de03212.iframe.bundle.js → runtime~main.771b0b54.iframe.bundle.js} +1 -1
- package/docs/storybook/{tooltip-definition-tooptip-stories.16c9af6d.iframe.bundle.js → tooltip-definition-tooptip-stories.9a2a5436.iframe.bundle.js} +1 -1
- package/esm2020/tooltip/definition-tooptip.component.mjs +26 -7
- package/fesm2015/carbon-components-angular-tooltip.mjs +25 -6
- package/fesm2015/carbon-components-angular-tooltip.mjs.map +1 -1
- package/fesm2020/carbon-components-angular-tooltip.mjs +25 -6
- package/fesm2020/carbon-components-angular-tooltip.mjs.map +1 -1
- package/package.json +1 -1
- package/tooltip/definition-tooptip.component.d.ts +7 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"generatedAt":
|
|
1
|
+
{"generatedAt":1756395206836,"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":true,"hasStorybookEslint":false,"refCount":0,"packageManager":{"type":"npm","version":"8.19.4"},"preview":{"usesGlobals":false},"framework":{"name":"@storybook/angular","options":{}},"builder":"@storybook/builder-webpack5","renderer":"@storybook/angular","storybookVersion":"7.6.7","storybookVersionSpecifier":"7.6.7","language":"typescript","storybookPackages":{"@storybook/addon-actions":{"version":"7.6.7"},"@storybook/angular":{"version":"7.6.7"},"@storybook/theming":{"version":"7.6.7"},"storybook":{"version":"7.6.7"}},"addons":{"@storybook/addon-links":{"version":"7.6.7"},"@storybook/addon-essentials":{"options":{"backgrounds":false},"version":"7.6.7"},"@storybook/addon-a11y":{"version":"7.6.7"},"@storybook/addon-storysource":{"version":"7.6.7"}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var deferred,leafPrototypes,getProto,inProgress,__webpack_modules__={},__webpack_module_cache__={};function __webpack_require__(moduleId){var cachedModule=__webpack_module_cache__[moduleId];if(void 0!==cachedModule)return cachedModule.exports;var module=__webpack_module_cache__[moduleId]={id:moduleId,loaded:!1,exports:{}};return __webpack_modules__[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.loaded=!0,module.exports}__webpack_require__.m=__webpack_modules__,__webpack_require__.amdO={},deferred=[],__webpack_require__.O=(result,chunkIds,fn,priority)=>{if(!chunkIds){var notFulfilled=1/0;for(i=0;i<deferred.length;i++){for(var[chunkIds,fn,priority]=deferred[i],fulfilled=!0,j=0;j<chunkIds.length;j++)(!1&priority||notFulfilled>=priority)&&Object.keys(__webpack_require__.O).every((key=>__webpack_require__.O[key](chunkIds[j])))?chunkIds.splice(j--,1):(fulfilled=!1,priority<notFulfilled&&(notFulfilled=priority));if(fulfilled){deferred.splice(i--,1);var r=fn();void 0!==r&&(result=r)}}return result}priority=priority||0;for(var i=deferred.length;i>0&&deferred[i-1][2]>priority;i--)deferred[i]=deferred[i-1];deferred[i]=[chunkIds,fn,priority]},__webpack_require__.n=module=>{var getter=module&&module.__esModule?()=>module.default:()=>module;return __webpack_require__.d(getter,{a:getter}),getter},getProto=Object.getPrototypeOf?obj=>Object.getPrototypeOf(obj):obj=>obj.__proto__,__webpack_require__.t=function(value,mode){if(1&mode&&(value=this(value)),8&mode)return value;if("object"==typeof value&&value){if(4&mode&&value.__esModule)return value;if(16&mode&&"function"==typeof value.then)return value}var ns=Object.create(null);__webpack_require__.r(ns);var def={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var current=2&mode&&value;"object"==typeof current&&!~leafPrototypes.indexOf(current);current=getProto(current))Object.getOwnPropertyNames(current).forEach((key=>def[key]=()=>value[key]));return def.default=()=>value,__webpack_require__.d(ns,def),ns},__webpack_require__.d=(exports,definition)=>{for(var key in definition)__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports,key)&&Object.defineProperty(exports,key,{enumerable:!0,get:definition[key]})},__webpack_require__.f={},__webpack_require__.e=chunkId=>Promise.all(Object.keys(__webpack_require__.f).reduce(((promises,key)=>(__webpack_require__.f[key](chunkId,promises),promises)),[])),__webpack_require__.u=chunkId=>(({140:"dialog-overflow-menu-overflow-menu-stories",210:"list-list-stories",384:"grid-css-grid-stories",459:"tabs-tabs-stories",653:"combo-button-combo-button-stories",703:"toggletip-toggletip-stories",799:"pagination-pagination-stories",911:"button-button-stories",933:"table-table-stories",972:"patterns-loading-large-loading-stories",1127:"search-search-stories",1928:"accordion-accordion-stories",2218:"inline-loading-inline-loading-stories",2342:"radio-radio-stories",2371:"timepicker-timepicker-stories",2388:"modal-modal-stories",2399:"input-textarea-stories",2489:"toggle-toggle-stories",2494:"loading-loading-stories",2573:"grid-grid-stories",2722:"context-menu-context-menu-stories",2969:"pagination-pagination-nav-stories",3046:"input-password-stories",3280:"tiles-tiles-stories",3314:"patterns-filtering-multiple-categories-stories",3329:"checkbox-checkbox-stories",3402:"tiles-expandable-tile-stories",3523:"contained-list-contained-list-stories",3610:"patterns-filtering-single-selection-stories",3719:"tiles-clickable-tile-stories",3858:"code-snippet-code-snippet-stories",3867:"tag-tag-stories",4232:"patterns-forms-multi-step-form-stories",4253:"tooltip-tooltip-stories",4277:"patterns-dialogs-modal-with-table-stories",4391:"content-switcher-content-switcher-stories",4731:"icon-icon-stories",4762:"patterns-filtering-multi-selection-stories",5167:"button-icon-button-stories",5368:"number-input-number-stories",5455:"layer-layer-stories",5808:"progress-bar-progress-bar-stories",5980:"select-select-stories",6026:"slider-slider-stories",6115:"theme-theme-stories",6274:"tooltip-definition-tooptip-stories",6310:"file-uploader-file-uploader-stories",6322:"popover-popover-stories",6456:"treeview-treeview-stories",6634:"link-link-stories",6663:"datepicker-datepicker-stories",6842:"breadcrumb-breadcrumb-stories",6943:"input-input-stories",7081:"layout-stack-stories",7235:"index-stories",7291:"structured-list-structured-list-stories",7840:"patterns-loading-progressive-loading-stories",7869:"skeleton-skeleton-stories",7931:"notification-notification-stories",7991:"menu-button-menu-button-stories",8552:"button-button-set-stories",9211:"dropdown-dropdown-stories",9325:"tiles-tile-group-stories",9552:"timepicker-select-timepicker-select-stories",9619:"progress-indicator-progress-indicator-stories",9660:"ui-shell-ui-shell-stories",9736:"combobox-combobox-stories"}[chunkId]||chunkId)+"."+{140:"cd56a223",210:"b81c613e",384:"c703f9de",459:"40535f65",503:"7113f5a6",653:"17bfb9ad",703:"44da6843",799:"796bfce4",901:"9e4e376b",911:"59023679",933:"6669e4b6",972:"eddc07f6",1119:"29184bd5",1125:"37c137fa",1127:"bb8f4fa0",1250:"47c381c1",1277:"4be2b1a4",1345:"d1a47622",1470:"39923f01",1895:"4ffc48da",1919:"72ba5983",1928:"f5bf1512",2218:"ab8e5124",2342:"6a5c7514",2371:"7bbf1029",2388:"8f435f37",2399:"7fb8fce5",2489:"7832edbb",2494:"261bc118",2573:"f7a88c02",2722:"eb5edb41",2969:"7b305bf2",3046:"f679d74a",3080:"d3996d61",3224:"ee9adbba",3280:"841048dc",3314:"c7cc76c2",3329:"3aeae19d",3360:"e0c015fc",3402:"8658f693",3415:"bd5d140d",3523:"78647fe4",3610:"e4243e65",3719:"03399cd8",3774:"c37f3d92",3858:"efb95808",3867:"26f051fe",3931:"36351824",4232:"2693c87c",4253:"eb2e347f",4277:"f9bddeed",4292:"c9a7a05a",4391:"8f3aa078",4731:"d69b9d0e",4762:"cae9c326",5069:"eabf32ea",5103:"20115e64",5167:"5d89667b",5368:"03977301",5455:"9fc41371",5808:"ed5b1329",5868:"b4e430ef",5980:"5ddb23ab",6026:"5884b16a",6115:"66e1727e",6274:"16c9af6d",6310:"7cbeda49",6322:"ea5149e0",6365:"6fb12554",6456:"fefea97f",6634:"93918572",6663:"de27eb4c",6702:"8fcd135f",6765:"2c6ceeb0",6842:"17ad5997",6915:"6a7434ad",6943:"150d2506",7019:"b8944046",7081:"799a681c",7141:"cd523cae",7235:"18fc437f",7291:"79fad143",7399:"f37bb110",7773:"e984a82c",7840:"717ad729",7869:"77f9485f",7931:"624c3d04",7991:"869bfd47",8341:"8e19136f",8552:"6549e188",9115:"fef09076",9211:"9e5187d3",9325:"c925923c",9552:"5b57af49",9619:"fcb4b1a5",9660:"545bbc64",9672:"095adafd",9736:"e1951a15"}[chunkId]+".iframe.bundle.js"),__webpack_require__.miniCssF=chunkId=>{},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.hmd=module=>((module=Object.create(module)).children||(module.children=[]),Object.defineProperty(module,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+module.id)}}),module),__webpack_require__.o=(obj,prop)=>Object.prototype.hasOwnProperty.call(obj,prop),inProgress={},__webpack_require__.l=(url,done,key,chunkId)=>{if(inProgress[url])inProgress[url].push(done);else{var script,needAttach;if(void 0!==key)for(var scripts=document.getElementsByTagName("script"),i=0;i<scripts.length;i++){var s=scripts[i];if(s.getAttribute("src")==url||s.getAttribute("data-webpack")=="carbon-components-angular:"+key){script=s;break}}script||(needAttach=!0,(script=document.createElement("script")).charset="utf-8",script.timeout=120,__webpack_require__.nc&&script.setAttribute("nonce",__webpack_require__.nc),script.setAttribute("data-webpack","carbon-components-angular:"+key),script.src=url),inProgress[url]=[done];var onScriptComplete=(prev,event)=>{script.onerror=script.onload=null,clearTimeout(timeout);var doneFns=inProgress[url];if(delete inProgress[url],script.parentNode&&script.parentNode.removeChild(script),doneFns&&doneFns.forEach((fn=>fn(event))),prev)return prev(event)},timeout=setTimeout(onScriptComplete.bind(null,void 0,{type:"timeout",target:script}),12e4);script.onerror=onScriptComplete.bind(null,script.onerror),script.onload=onScriptComplete.bind(null,script.onload),needAttach&&document.head.appendChild(script)}},__webpack_require__.r=exports=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(exports,"__esModule",{value:!0})},__webpack_require__.nmd=module=>(module.paths=[],module.children||(module.children=[]),module),__webpack_require__.p="",(()=>{var installedChunks={1303:0};__webpack_require__.f.j=(chunkId,promises)=>{var installedChunkData=__webpack_require__.o(installedChunks,chunkId)?installedChunks[chunkId]:void 0;if(0!==installedChunkData)if(installedChunkData)promises.push(installedChunkData[2]);else if(1303!=chunkId){var promise=new Promise(((resolve,reject)=>installedChunkData=installedChunks[chunkId]=[resolve,reject]));promises.push(installedChunkData[2]=promise);var url=__webpack_require__.p+__webpack_require__.u(chunkId),error=new Error;__webpack_require__.l(url,(event=>{if(__webpack_require__.o(installedChunks,chunkId)&&(0!==(installedChunkData=installedChunks[chunkId])&&(installedChunks[chunkId]=void 0),installedChunkData)){var errorType=event&&("load"===event.type?"missing":event.type),realSrc=event&&event.target&&event.target.src;error.message="Loading chunk "+chunkId+" failed.\n("+errorType+": "+realSrc+")",error.name="ChunkLoadError",error.type=errorType,error.request=realSrc,installedChunkData[1](error)}}),"chunk-"+chunkId,chunkId)}else installedChunks[chunkId]=0},__webpack_require__.O.j=chunkId=>0===installedChunks[chunkId];var webpackJsonpCallback=(parentChunkLoadingFunction,data)=>{var moduleId,chunkId,[chunkIds,moreModules,runtime]=data,i=0;if(chunkIds.some((id=>0!==installedChunks[id]))){for(moduleId in moreModules)__webpack_require__.o(moreModules,moduleId)&&(__webpack_require__.m[moduleId]=moreModules[moduleId]);if(runtime)var result=runtime(__webpack_require__)}for(parentChunkLoadingFunction&&parentChunkLoadingFunction(data);i<chunkIds.length;i++)chunkId=chunkIds[i],__webpack_require__.o(installedChunks,chunkId)&&installedChunks[chunkId]&&installedChunks[chunkId][0](),installedChunks[chunkId]=0;return __webpack_require__.O(result)},chunkLoadingGlobal=self.webpackChunkcarbon_components_angular=self.webpackChunkcarbon_components_angular||[];chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null,0)),chunkLoadingGlobal.push=webpackJsonpCallback.bind(null,chunkLoadingGlobal.push.bind(chunkLoadingGlobal))})(),__webpack_require__.nc=void 0})();
|
|
1
|
+
(()=>{"use strict";var deferred,leafPrototypes,getProto,inProgress,__webpack_modules__={},__webpack_module_cache__={};function __webpack_require__(moduleId){var cachedModule=__webpack_module_cache__[moduleId];if(void 0!==cachedModule)return cachedModule.exports;var module=__webpack_module_cache__[moduleId]={id:moduleId,loaded:!1,exports:{}};return __webpack_modules__[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.loaded=!0,module.exports}__webpack_require__.m=__webpack_modules__,__webpack_require__.amdO={},deferred=[],__webpack_require__.O=(result,chunkIds,fn,priority)=>{if(!chunkIds){var notFulfilled=1/0;for(i=0;i<deferred.length;i++){for(var[chunkIds,fn,priority]=deferred[i],fulfilled=!0,j=0;j<chunkIds.length;j++)(!1&priority||notFulfilled>=priority)&&Object.keys(__webpack_require__.O).every((key=>__webpack_require__.O[key](chunkIds[j])))?chunkIds.splice(j--,1):(fulfilled=!1,priority<notFulfilled&&(notFulfilled=priority));if(fulfilled){deferred.splice(i--,1);var r=fn();void 0!==r&&(result=r)}}return result}priority=priority||0;for(var i=deferred.length;i>0&&deferred[i-1][2]>priority;i--)deferred[i]=deferred[i-1];deferred[i]=[chunkIds,fn,priority]},__webpack_require__.n=module=>{var getter=module&&module.__esModule?()=>module.default:()=>module;return __webpack_require__.d(getter,{a:getter}),getter},getProto=Object.getPrototypeOf?obj=>Object.getPrototypeOf(obj):obj=>obj.__proto__,__webpack_require__.t=function(value,mode){if(1&mode&&(value=this(value)),8&mode)return value;if("object"==typeof value&&value){if(4&mode&&value.__esModule)return value;if(16&mode&&"function"==typeof value.then)return value}var ns=Object.create(null);__webpack_require__.r(ns);var def={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var current=2&mode&&value;"object"==typeof current&&!~leafPrototypes.indexOf(current);current=getProto(current))Object.getOwnPropertyNames(current).forEach((key=>def[key]=()=>value[key]));return def.default=()=>value,__webpack_require__.d(ns,def),ns},__webpack_require__.d=(exports,definition)=>{for(var key in definition)__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports,key)&&Object.defineProperty(exports,key,{enumerable:!0,get:definition[key]})},__webpack_require__.f={},__webpack_require__.e=chunkId=>Promise.all(Object.keys(__webpack_require__.f).reduce(((promises,key)=>(__webpack_require__.f[key](chunkId,promises),promises)),[])),__webpack_require__.u=chunkId=>(({140:"dialog-overflow-menu-overflow-menu-stories",210:"list-list-stories",384:"grid-css-grid-stories",459:"tabs-tabs-stories",653:"combo-button-combo-button-stories",703:"toggletip-toggletip-stories",799:"pagination-pagination-stories",911:"button-button-stories",933:"table-table-stories",972:"patterns-loading-large-loading-stories",1127:"search-search-stories",1928:"accordion-accordion-stories",2218:"inline-loading-inline-loading-stories",2342:"radio-radio-stories",2371:"timepicker-timepicker-stories",2388:"modal-modal-stories",2399:"input-textarea-stories",2489:"toggle-toggle-stories",2494:"loading-loading-stories",2573:"grid-grid-stories",2722:"context-menu-context-menu-stories",2969:"pagination-pagination-nav-stories",3046:"input-password-stories",3280:"tiles-tiles-stories",3314:"patterns-filtering-multiple-categories-stories",3329:"checkbox-checkbox-stories",3402:"tiles-expandable-tile-stories",3523:"contained-list-contained-list-stories",3610:"patterns-filtering-single-selection-stories",3719:"tiles-clickable-tile-stories",3858:"code-snippet-code-snippet-stories",3867:"tag-tag-stories",4232:"patterns-forms-multi-step-form-stories",4253:"tooltip-tooltip-stories",4277:"patterns-dialogs-modal-with-table-stories",4391:"content-switcher-content-switcher-stories",4731:"icon-icon-stories",4762:"patterns-filtering-multi-selection-stories",5167:"button-icon-button-stories",5368:"number-input-number-stories",5455:"layer-layer-stories",5808:"progress-bar-progress-bar-stories",5980:"select-select-stories",6026:"slider-slider-stories",6115:"theme-theme-stories",6274:"tooltip-definition-tooptip-stories",6310:"file-uploader-file-uploader-stories",6322:"popover-popover-stories",6456:"treeview-treeview-stories",6634:"link-link-stories",6663:"datepicker-datepicker-stories",6842:"breadcrumb-breadcrumb-stories",6943:"input-input-stories",7081:"layout-stack-stories",7235:"index-stories",7291:"structured-list-structured-list-stories",7840:"patterns-loading-progressive-loading-stories",7869:"skeleton-skeleton-stories",7931:"notification-notification-stories",7991:"menu-button-menu-button-stories",8552:"button-button-set-stories",9211:"dropdown-dropdown-stories",9325:"tiles-tile-group-stories",9552:"timepicker-select-timepicker-select-stories",9619:"progress-indicator-progress-indicator-stories",9660:"ui-shell-ui-shell-stories",9736:"combobox-combobox-stories"}[chunkId]||chunkId)+"."+{140:"cd56a223",210:"b81c613e",384:"c703f9de",459:"40535f65",503:"7113f5a6",653:"17bfb9ad",703:"44da6843",799:"796bfce4",901:"9e4e376b",911:"59023679",933:"6669e4b6",972:"eddc07f6",1119:"29184bd5",1125:"37c137fa",1127:"bb8f4fa0",1250:"47c381c1",1277:"4be2b1a4",1345:"d1a47622",1470:"39923f01",1895:"4ffc48da",1919:"72ba5983",1928:"f5bf1512",2218:"ab8e5124",2342:"6a5c7514",2371:"7bbf1029",2388:"8f435f37",2399:"7fb8fce5",2489:"7832edbb",2494:"261bc118",2573:"f7a88c02",2722:"eb5edb41",2969:"7b305bf2",3046:"f679d74a",3080:"d3996d61",3224:"ee9adbba",3280:"841048dc",3314:"c7cc76c2",3329:"3aeae19d",3360:"e0c015fc",3402:"8658f693",3415:"bd5d140d",3523:"78647fe4",3610:"e4243e65",3719:"03399cd8",3774:"c37f3d92",3858:"efb95808",3867:"26f051fe",3931:"36351824",4232:"2693c87c",4253:"eb2e347f",4277:"f9bddeed",4292:"c9a7a05a",4391:"8f3aa078",4731:"d69b9d0e",4762:"cae9c326",5069:"eabf32ea",5103:"20115e64",5167:"5d89667b",5368:"03977301",5455:"9fc41371",5808:"ed5b1329",5868:"b4e430ef",5980:"5ddb23ab",6026:"5884b16a",6115:"66e1727e",6274:"9a2a5436",6310:"7cbeda49",6322:"ea5149e0",6365:"6fb12554",6456:"fefea97f",6634:"93918572",6663:"de27eb4c",6702:"a0e549d4",6765:"2c6ceeb0",6842:"17ad5997",6915:"6a7434ad",6943:"150d2506",7019:"b8944046",7081:"799a681c",7141:"cd523cae",7235:"18fc437f",7291:"79fad143",7399:"f37bb110",7773:"e984a82c",7840:"717ad729",7869:"77f9485f",7931:"624c3d04",7991:"869bfd47",8341:"8e19136f",8552:"6549e188",9115:"fef09076",9211:"9e5187d3",9325:"c925923c",9552:"5b57af49",9619:"fcb4b1a5",9660:"545bbc64",9672:"095adafd",9736:"e1951a15"}[chunkId]+".iframe.bundle.js"),__webpack_require__.miniCssF=chunkId=>{},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.hmd=module=>((module=Object.create(module)).children||(module.children=[]),Object.defineProperty(module,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+module.id)}}),module),__webpack_require__.o=(obj,prop)=>Object.prototype.hasOwnProperty.call(obj,prop),inProgress={},__webpack_require__.l=(url,done,key,chunkId)=>{if(inProgress[url])inProgress[url].push(done);else{var script,needAttach;if(void 0!==key)for(var scripts=document.getElementsByTagName("script"),i=0;i<scripts.length;i++){var s=scripts[i];if(s.getAttribute("src")==url||s.getAttribute("data-webpack")=="carbon-components-angular:"+key){script=s;break}}script||(needAttach=!0,(script=document.createElement("script")).charset="utf-8",script.timeout=120,__webpack_require__.nc&&script.setAttribute("nonce",__webpack_require__.nc),script.setAttribute("data-webpack","carbon-components-angular:"+key),script.src=url),inProgress[url]=[done];var onScriptComplete=(prev,event)=>{script.onerror=script.onload=null,clearTimeout(timeout);var doneFns=inProgress[url];if(delete inProgress[url],script.parentNode&&script.parentNode.removeChild(script),doneFns&&doneFns.forEach((fn=>fn(event))),prev)return prev(event)},timeout=setTimeout(onScriptComplete.bind(null,void 0,{type:"timeout",target:script}),12e4);script.onerror=onScriptComplete.bind(null,script.onerror),script.onload=onScriptComplete.bind(null,script.onload),needAttach&&document.head.appendChild(script)}},__webpack_require__.r=exports=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(exports,"__esModule",{value:!0})},__webpack_require__.nmd=module=>(module.paths=[],module.children||(module.children=[]),module),__webpack_require__.p="",(()=>{var installedChunks={1303:0};__webpack_require__.f.j=(chunkId,promises)=>{var installedChunkData=__webpack_require__.o(installedChunks,chunkId)?installedChunks[chunkId]:void 0;if(0!==installedChunkData)if(installedChunkData)promises.push(installedChunkData[2]);else if(1303!=chunkId){var promise=new Promise(((resolve,reject)=>installedChunkData=installedChunks[chunkId]=[resolve,reject]));promises.push(installedChunkData[2]=promise);var url=__webpack_require__.p+__webpack_require__.u(chunkId),error=new Error;__webpack_require__.l(url,(event=>{if(__webpack_require__.o(installedChunks,chunkId)&&(0!==(installedChunkData=installedChunks[chunkId])&&(installedChunks[chunkId]=void 0),installedChunkData)){var errorType=event&&("load"===event.type?"missing":event.type),realSrc=event&&event.target&&event.target.src;error.message="Loading chunk "+chunkId+" failed.\n("+errorType+": "+realSrc+")",error.name="ChunkLoadError",error.type=errorType,error.request=realSrc,installedChunkData[1](error)}}),"chunk-"+chunkId,chunkId)}else installedChunks[chunkId]=0},__webpack_require__.O.j=chunkId=>0===installedChunks[chunkId];var webpackJsonpCallback=(parentChunkLoadingFunction,data)=>{var moduleId,chunkId,[chunkIds,moreModules,runtime]=data,i=0;if(chunkIds.some((id=>0!==installedChunks[id]))){for(moduleId in moreModules)__webpack_require__.o(moreModules,moduleId)&&(__webpack_require__.m[moduleId]=moreModules[moduleId]);if(runtime)var result=runtime(__webpack_require__)}for(parentChunkLoadingFunction&&parentChunkLoadingFunction(data);i<chunkIds.length;i++)chunkId=chunkIds[i],__webpack_require__.o(installedChunks,chunkId)&&installedChunks[chunkId]&&installedChunks[chunkId][0](),installedChunks[chunkId]=0;return __webpack_require__.O(result)},chunkLoadingGlobal=self.webpackChunkcarbon_components_angular=self.webpackChunkcarbon_components_angular||[];chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null,0)),chunkLoadingGlobal.push=webpackJsonpCallback.bind(null,chunkLoadingGlobal.push.bind(chunkLoadingGlobal))})(),__webpack_require__.nc=void 0})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkcarbon_components_angular=self.webpackChunkcarbon_components_angular||[]).push([[6274],{"./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/tooltip/definition-tooptip.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:()=>__WEBPACK_DEFAULT_EXPORT__});var _storybook_angular__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@storybook/angular/dist/index.mjs"),___WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/tooltip/index.ts");const __WEBPACK_DEFAULT_EXPORT__={title:"Components/Definition Tooltip",decorators:[(0,_storybook_angular__WEBPACK_IMPORTED_MODULE_0__.moduleMetadata)({imports:[___WEBPACK_IMPORTED_MODULE_1__.z8]})],parameters:{docs:{story:{inline:!1,iframeHeight:"18rem"}}},args:{isOpen:!0,caret:!0,description:"Uniform Resource Locator; the address of a resource (such as a document or website) on the Internet.",align:"bottom",autoAlign:!1},argTypes:{autoAlign:{control:!1},onOpen:{control:"Opened!"},onClose:{control:"Closed!"},isOpenChange:{control:"Is Open Change!"},align:{options:["top","top-left","top-right","bottom","bottom-left","bottom-right"],control:"select"}},component:___WEBPACK_IMPORTED_MODULE_1__.vD},Basic=(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 <p>Custom domains direct requests for your apps in this Cloud Foundry organization to a\n <cds-tooltip-definition\n [isOpen]="isOpen"\n [openOnHover]="openOnHover"\n [caret]="caret"\n [align]="align"\n (onOpen)="onOpen($event)"\n (onClose)="onClose($event)"\n (isOpenChange)="isOpenChange($event)"\n [description]="description">\n URL\n </cds-tooltip-definition>\n that you own. A custom domain can be a shared domain, a shared subdomain, or a shared domain and host.</p>\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=>({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 <p>Custom domains direct requests for your apps in this Cloud Foundry organization to a\n <cds-tooltip-definition\n [isOpen]="isOpen"\n [openOnHover]="openOnHover"\n [caret]="caret"\n [align]="align"\n [autoAlign]="true"\n (onOpen)="onOpen($event)"\n (onClose)="onClose($event)"\n (isOpenChange)="isOpenChange($event)"\n [description]="description">\n URL\n </cds-tooltip-definition>\n that you own. A custom domain can be a shared domain, a shared subdomain, or a shared domain and host.</p>\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 <div style="height:3000px">\n Scrolling will update the position of the popover:\n <div style="position: absolute; top: 500px; left: 500px;">\n <p>Custom domains direct requests for your apps in this Cloud Foundry organization to a\n <cds-tooltip-definition\n [isOpen]="isOpen"\n [openOnHover]="openOnHover"\n [caret]="caret"\n [align]="align"\n (onOpen)="onOpen($event)"\n (onClose)="onClose($event)"\n (isOpenChange)="isOpenChange($event)"\n [description]="description">\n URL\n </cds-tooltip-definition>\n that you own. A custom domain can be a shared domain, a shared subdomain, or a shared domain and host.</p>\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})',...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 <p>Custom domains direct requests for your apps in this Cloud Foundry organization to a\n <cds-tooltip-definition\n [isOpen]="isOpen"\n [openOnHover]="openOnHover"\n [caret]="caret"\n [align]="align"\n [autoAlign]="true"\n (onOpen)="onOpen($event)"\n (onClose)="onClose($event)"\n (isOpenChange)="isOpenChange($event)"\n [description]="description">\n URL\n </cds-tooltip-definition>\n that you own. A custom domain can be a shared domain, a shared subdomain, or a shared domain and host.</p>\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"]}}]);
|
|
1
|
+
"use strict";(self.webpackChunkcarbon_components_angular=self.webpackChunkcarbon_components_angular||[]).push([[6274],{"./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/tooltip/definition-tooptip.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:()=>__WEBPACK_DEFAULT_EXPORT__});var _storybook_angular__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@storybook/angular/dist/index.mjs"),___WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/tooltip/index.ts");const __WEBPACK_DEFAULT_EXPORT__={title:"Components/Definition Tooltip",decorators:[(0,_storybook_angular__WEBPACK_IMPORTED_MODULE_0__.moduleMetadata)({imports:[___WEBPACK_IMPORTED_MODULE_1__.z8]})],parameters:{docs:{story:{inline:!1,iframeHeight:"18rem"}}},args:{isOpen:!0,caret:!0,description:"Uniform Resource Locator; the address of a resource (such as a document or website) on the Internet.",align:"bottom",autoAlign:!1,openOnHover:!0},argTypes:{autoAlign:{control:!1},onOpen:{control:"Opened!"},onClose:{control:"Closed!"},isOpenChange:{control:"Is Open Change!"},align:{options:["top","top-left","top-right","bottom","bottom-left","bottom-right"],control:"select"}},component:___WEBPACK_IMPORTED_MODULE_1__.vD},Basic=(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 <p>Custom domains direct requests for your apps in this Cloud Foundry organization to a\n <cds-tooltip-definition\n [isOpen]="isOpen"\n [openOnHover]="openOnHover"\n [caret]="caret"\n [align]="align"\n (onOpen)="onOpen($event)"\n (onClose)="onClose($event)"\n (isOpenChange)="isOpenChange($event)"\n [description]="description">\n URL\n </cds-tooltip-definition>\n that you own. A custom domain can be a shared domain, a shared subdomain, or a shared domain and host.</p>\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=>({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 <p>Custom domains direct requests for your apps in this Cloud Foundry organization to a\n <cds-tooltip-definition\n [isOpen]="isOpen"\n [openOnHover]="openOnHover"\n [caret]="caret"\n [align]="align"\n [autoAlign]="true"\n (onOpen)="onOpen($event)"\n (onClose)="onClose($event)"\n (isOpenChange)="isOpenChange($event)"\n [description]="description">\n URL\n </cds-tooltip-definition>\n that you own. A custom domain can be a shared domain, a shared subdomain, or a shared domain and host.</p>\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 <div style="height:3000px">\n Scrolling will update the position of the popover:\n <div style="position: absolute; top: 500px; left: 500px;">\n <p>Custom domains direct requests for your apps in this Cloud Foundry organization to a\n <cds-tooltip-definition\n [isOpen]="isOpen"\n [openOnHover]="openOnHover"\n [caret]="caret"\n [align]="align"\n (onOpen)="onOpen($event)"\n (onClose)="onClose($event)"\n (isOpenChange)="isOpenChange($event)"\n [description]="description">\n URL\n </cds-tooltip-definition>\n that you own. A custom domain can be a shared domain, a shared subdomain, or a shared domain and host.</p>\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})',...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 <p>Custom domains direct requests for your apps in this Cloud Foundry organization to a\n <cds-tooltip-definition\n [isOpen]="isOpen"\n [openOnHover]="openOnHover"\n [caret]="caret"\n [align]="align"\n [autoAlign]="true"\n (onOpen)="onOpen($event)"\n (onClose)="onClose($event)"\n (isOpenChange)="isOpenChange($event)"\n [description]="description">\n URL\n </cds-tooltip-definition>\n that you own. A custom domain can be a shared domain, a shared subdomain, or a shared domain and host.</p>\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"]}}]);
|
|
@@ -20,14 +20,29 @@ export class TooltipDefinition extends PopoverContainer {
|
|
|
20
20
|
this.changeDetectorRef = changeDetectorRef;
|
|
21
21
|
this.id = `tooltip-definition-${TooltipDefinition.tooltipCount++}`;
|
|
22
22
|
this.openOnHover = false;
|
|
23
|
+
/**
|
|
24
|
+
* Helper variable to ensure button blur doesn't fire on `click` of popover content
|
|
25
|
+
*/
|
|
26
|
+
this.isInteractingWithPopover = false;
|
|
23
27
|
this.highContrast = true;
|
|
24
28
|
this.dropShadow = false;
|
|
25
29
|
}
|
|
26
30
|
onBlur(event) {
|
|
27
|
-
|
|
31
|
+
// Only close if user is not interacting with popover content
|
|
32
|
+
if (!this.isInteractingWithPopover) {
|
|
33
|
+
this.handleChange(false, event);
|
|
34
|
+
}
|
|
28
35
|
}
|
|
29
36
|
onClick(event) {
|
|
30
|
-
|
|
37
|
+
if (event.button === 0) {
|
|
38
|
+
this.handleChange(!this.isOpen, event);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
onPopoverMouseDown() {
|
|
42
|
+
this.isInteractingWithPopover = true;
|
|
43
|
+
}
|
|
44
|
+
onPopoverMouseUp() {
|
|
45
|
+
this.isInteractingWithPopover = false;
|
|
31
46
|
}
|
|
32
47
|
hostkeys(event) {
|
|
33
48
|
if (this.isOpen && event.key === "Escape") {
|
|
@@ -59,7 +74,7 @@ TooltipDefinition.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
|
|
|
59
74
|
[attr.aria-expanded]="isOpen"
|
|
60
75
|
[attr.aria-describedby]="isOpen ? id : null"
|
|
61
76
|
(blur)="onBlur($event)"
|
|
62
|
-
(
|
|
77
|
+
(mousedown)="onClick($event)"
|
|
63
78
|
type="button">
|
|
64
79
|
<ng-content></ng-content>
|
|
65
80
|
</button>
|
|
@@ -68,7 +83,9 @@ TooltipDefinition.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
|
|
|
68
83
|
class="cds--popover"
|
|
69
84
|
[id]="id"
|
|
70
85
|
[attr.aria-hidden]="!isOpen"
|
|
71
|
-
role="tooltip"
|
|
86
|
+
role="tooltip"
|
|
87
|
+
(mousedown)="onPopoverMouseDown()"
|
|
88
|
+
(mouseup)="onPopoverMouseUp()">
|
|
72
89
|
<span class="cds--popover-content cds--definition-tooltip" aria-live="polite">
|
|
73
90
|
<ng-container *ngIf="!isTemplate(description)">{{description}}</ng-container>
|
|
74
91
|
<ng-template *ngIf="isTemplate(description)" [ngTemplateOutlet]="description" [ngTemplateOutletContext]="{ $implicit: templateContext }"></ng-template>
|
|
@@ -89,7 +106,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
89
106
|
[attr.aria-expanded]="isOpen"
|
|
90
107
|
[attr.aria-describedby]="isOpen ? id : null"
|
|
91
108
|
(blur)="onBlur($event)"
|
|
92
|
-
(
|
|
109
|
+
(mousedown)="onClick($event)"
|
|
93
110
|
type="button">
|
|
94
111
|
<ng-content></ng-content>
|
|
95
112
|
</button>
|
|
@@ -98,7 +115,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
98
115
|
class="cds--popover"
|
|
99
116
|
[id]="id"
|
|
100
117
|
[attr.aria-hidden]="!isOpen"
|
|
101
|
-
role="tooltip"
|
|
118
|
+
role="tooltip"
|
|
119
|
+
(mousedown)="onPopoverMouseDown()"
|
|
120
|
+
(mouseup)="onPopoverMouseUp()">
|
|
102
121
|
<span class="cds--popover-content cds--definition-tooltip" aria-live="polite">
|
|
103
122
|
<ng-container *ngIf="!isTemplate(description)">{{description}}</ng-container>
|
|
104
123
|
<ng-template *ngIf="isTemplate(description)" [ngTemplateOutlet]="description" [ngTemplateOutletContext]="{ $implicit: templateContext }"></ng-template>
|
|
@@ -129,4 +148,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
129
148
|
type: HostListener,
|
|
130
149
|
args: ["focusin", ["$event"]]
|
|
131
150
|
}] } });
|
|
132
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
151
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVmaW5pdGlvbi10b29wdGlwLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy90b29sdGlwL2RlZmluaXRpb24tdG9vcHRpcC5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUNOLHVCQUF1QixFQUV2QixTQUFTLEVBRVQsWUFBWSxFQUNaLEtBQUssRUFHTCxXQUFXLEVBQ1gsTUFBTSxlQUFlLENBQUM7QUFDdkIsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sbUNBQW1DLENBQUM7OztBQUVyRTs7Ozs7Ozs7R0FRRztBQWdDSCxNQUFNLE9BQU8saUJBQWtCLFNBQVEsZ0JBQWdCO0lBcUJ0RCxZQUNXLFVBQXNCLEVBQ3RCLE1BQWMsRUFDZCxRQUFtQixFQUNuQixpQkFBb0M7UUFFOUMsS0FBSyxDQUFDLFVBQVUsRUFBRSxNQUFNLEVBQUUsUUFBUSxFQUFFLGlCQUFpQixDQUFDLENBQUM7UUFMN0MsZUFBVSxHQUFWLFVBQVUsQ0FBWTtRQUN0QixXQUFNLEdBQU4sTUFBTSxDQUFRO1FBQ2QsYUFBUSxHQUFSLFFBQVEsQ0FBVztRQUNuQixzQkFBaUIsR0FBakIsaUJBQWlCLENBQW1CO1FBdEJ0QyxPQUFFLEdBQUcsc0JBQXNCLGlCQUFpQixDQUFDLFlBQVksRUFBRSxFQ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tleXVwXCIsIFtcIiRldmVudFwiXSlcblx0aG9zdGtleXMoZXZlbnQ6IEtleWJvYXJkRXZlbnQpIHtcblx0XHRpZiAodGhpcy5pc09wZW4gJiYgZXZlbnQua2V5ID09PSBcIkVzY2FwZVwiKSB7XG5cdFx0XHRldmVudC5zdG9wUHJvcGFnYXRpb24oKTtcblx0XHRcdHRoaXMuaGFuZGxlQ2hhbmdlKGZhbHNlLCBldmVudCk7XG5cdFx0fVxuXHR9XG5cblx0QEhvc3RMaXN0ZW5lcihcIm1vdXNlbGVhdmVcIiwgW1wiJGV2ZW50XCJdKVxuXHRtb3VzZWxlYXZlKGV2ZW50KSB7XG5cdFx0dGhpcy5oYW5kbGVDaGFuZ2UoZmFsc2UsIGV2ZW50KTtcblx0fVxuXG5cdEBIb3N0TGlzdGVuZXIoXCJtb3VzZWVudGVyXCIsIFtcIiRldmVudFwiXSlcblx0bW91c2VlbnRlcihldmVudCkge1xuXHRcdGlmICh0aGlzLm9wZW5PbkhvdmVyKSB7XG5cdFx0XHR0aGlzLmhhbmRsZUNoYW5nZSh0cnVlLCBldmVudCk7XG5cdFx0fVxuXHR9XG5cblx0QEhvc3RMaXN0ZW5lcihcImZvY3VzaW5cIiwgW1wiJGV2ZW50XCJdKVxuXHRvbkZvY3VzKGV2ZW50KSB7XG5cdFx0dGhpcy5oYW5kbGVDaGFuZ2UodHJ1ZSwgZXZlbnQpO1xuXHR9XG5cblx0cHVibGljIGlzVGVtcGxhdGUodmFsdWUpIHtcblx0XHRyZXR1cm4gdmFsdWUgaW5zdGFuY2VvZiBUZW1wbGF0ZVJlZjtcblx0fVxufVxuIl19
|
|
@@ -223,14 +223,29 @@ class TooltipDefinition extends PopoverContainer {
|
|
|
223
223
|
this.changeDetectorRef = changeDetectorRef;
|
|
224
224
|
this.id = `tooltip-definition-${TooltipDefinition.tooltipCount++}`;
|
|
225
225
|
this.openOnHover = false;
|
|
226
|
+
/**
|
|
227
|
+
* Helper variable to ensure button blur doesn't fire on `click` of popover content
|
|
228
|
+
*/
|
|
229
|
+
this.isInteractingWithPopover = false;
|
|
226
230
|
this.highContrast = true;
|
|
227
231
|
this.dropShadow = false;
|
|
228
232
|
}
|
|
229
233
|
onBlur(event) {
|
|
230
|
-
|
|
234
|
+
// Only close if user is not interacting with popover content
|
|
235
|
+
if (!this.isInteractingWithPopover) {
|
|
236
|
+
this.handleChange(false, event);
|
|
237
|
+
}
|
|
231
238
|
}
|
|
232
239
|
onClick(event) {
|
|
233
|
-
|
|
240
|
+
if (event.button === 0) {
|
|
241
|
+
this.handleChange(!this.isOpen, event);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
onPopoverMouseDown() {
|
|
245
|
+
this.isInteractingWithPopover = true;
|
|
246
|
+
}
|
|
247
|
+
onPopoverMouseUp() {
|
|
248
|
+
this.isInteractingWithPopover = false;
|
|
234
249
|
}
|
|
235
250
|
hostkeys(event) {
|
|
236
251
|
if (this.isOpen && event.key === "Escape") {
|
|
@@ -262,7 +277,7 @@ TooltipDefinition.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
|
|
|
262
277
|
[attr.aria-expanded]="isOpen"
|
|
263
278
|
[attr.aria-describedby]="isOpen ? id : null"
|
|
264
279
|
(blur)="onBlur($event)"
|
|
265
|
-
(
|
|
280
|
+
(mousedown)="onClick($event)"
|
|
266
281
|
type="button">
|
|
267
282
|
<ng-content></ng-content>
|
|
268
283
|
</button>
|
|
@@ -271,7 +286,9 @@ TooltipDefinition.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
|
|
|
271
286
|
class="cds--popover"
|
|
272
287
|
[id]="id"
|
|
273
288
|
[attr.aria-hidden]="!isOpen"
|
|
274
|
-
role="tooltip"
|
|
289
|
+
role="tooltip"
|
|
290
|
+
(mousedown)="onPopoverMouseDown()"
|
|
291
|
+
(mouseup)="onPopoverMouseUp()">
|
|
275
292
|
<span class="cds--popover-content cds--definition-tooltip" aria-live="polite">
|
|
276
293
|
<ng-container *ngIf="!isTemplate(description)">{{description}}</ng-container>
|
|
277
294
|
<ng-template *ngIf="isTemplate(description)" [ngTemplateOutlet]="description" [ngTemplateOutletContext]="{ $implicit: templateContext }"></ng-template>
|
|
@@ -292,7 +309,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
292
309
|
[attr.aria-expanded]="isOpen"
|
|
293
310
|
[attr.aria-describedby]="isOpen ? id : null"
|
|
294
311
|
(blur)="onBlur($event)"
|
|
295
|
-
(
|
|
312
|
+
(mousedown)="onClick($event)"
|
|
296
313
|
type="button">
|
|
297
314
|
<ng-content></ng-content>
|
|
298
315
|
</button>
|
|
@@ -301,7 +318,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
301
318
|
class="cds--popover"
|
|
302
319
|
[id]="id"
|
|
303
320
|
[attr.aria-hidden]="!isOpen"
|
|
304
|
-
role="tooltip"
|
|
321
|
+
role="tooltip"
|
|
322
|
+
(mousedown)="onPopoverMouseDown()"
|
|
323
|
+
(mouseup)="onPopoverMouseUp()">
|
|
305
324
|
<span class="cds--popover-content cds--definition-tooltip" aria-live="polite">
|
|
306
325
|
<ng-container *ngIf="!isTemplate(description)">{{description}}</ng-container>
|
|
307
326
|
<ng-template *ngIf="isTemplate(description)" [ngTemplateOutlet]="description" [ngTemplateOutletContext]="{ $implicit: templateContext }"></ng-template>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carbon-components-angular-tooltip.mjs","sources":["../../src/tooltip/tooltip.interface.ts","../../src/tooltip/tooltip.component.ts","../../src/tooltip/definition-tooptip.component.ts","../../src/tooltip/tooltip.module.ts","../../src/tooltip/carbon-components-angular-tooltip.ts"],"sourcesContent":["import { TemplateRef } from \"@angular/core\";\n\nexport type TooltipAlignments = \"top\" | \"top-left\" | \"top-right\" |\n\t\"bottom\" | \"bottom-left\" | \"bottom-right\" |\n\t\"left\" | \"left-bottom\" | \"left-top\" |\n\t\"right\" | \"right-bottom\" | \"right-top\";\n\n/**\n * Tooltip attributes\n */\nexport interface TooltipConfig {\n\t/**\n\t * The string or template content to be exposed by the tooltip.\n\t */\n\tdescription: string | TemplateRef<any>;\n\t/**\n\t * Specify the tooltip alignement\n\t */\n\talign?: TooltipAlignments;\n\t/**\n\t * Set to `false` to hide caret\n\t */\n\tcaret?: boolean;\n\t/**\n\t * Set to `false` to hide shadow\n\t */\n\tdropShadow?: boolean;\n\t/**\n\t * Set to `true` to enable high contrast\n\t */\n\thighContrast?: boolean;\n\t/**\n\t * Set to `true` to have the popover open by default\n\t * Tooltip will not remain open if user interacts with it (mouseenter & leave) or clicks anywhere in window\n\t */\n\tisOpen?: boolean;\n\t/**\n\t * Set delay before tooltip is shown\n\t */\n\tenterDelayMs?: number;\n\t/**\n\t * Set delay when tooltip disappears\n\t */\n\tleaveDelayMs?: number;\n}\n\n/**\n * Default tooltip configuration for components to populate missing interface attributes\n */\nexport const DEFAULT_TOOLTIP_CONFIG = {\n\talign: \"bottom\" as TooltipAlignments,\n\tcaret: true,\n\tdropShadow: true,\n\thighContrast: true,\n\tisOpen: false,\n\tenterDelayMs: 100,\n\tleaveDelayMs: 300\n};\n","import {\n\tAfterContentChecked,\n\tChangeDetectionStrategy,\n\tChangeDetectorRef,\n\tComponent,\n\tElementRef,\n\tHostBinding,\n\tHostListener,\n\tInput,\n\tNgZone,\n\tOnChanges,\n\tRenderer2,\n\tSimpleChanges,\n\tTemplateRef,\n\tViewChild\n} from \"@angular/core\";\nimport { PopoverContainer } from \"carbon-components-angular/popover\";\n\n/**\n * Get started with importing the module:\n *\n * ```typescript\n * import { TooltipModule } from 'carbon-components-angular';\n * ```\n *\n * [See demo](../../?path=/story/components-tooltip--basic)\n */\n@Component({\n\tselector: \"cds-tooltip, ibm-tooltip\",\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\ttemplate: `\n\t\t<span #contentWrapper>\n\t\t\t<ng-content></ng-content>\n\t\t</span>\n\t\t<span\n\t\t\t*ngIf=\"description\"\n\t\t\tclass=\"cds--popover\"\n\t\t\t[id]=\"id\"\n\t\t\t[attr.aria-hidden]=\"!isOpen\"\n\t\t\trole=\"tooltip\">\n\t\t\t<ng-container *ngIf=\"!disabled\">\n\t\t\t\t<span class=\"cds--popover-content cds--tooltip-content\">\n\t\t\t\t\t<ng-container *ngIf=\"!isTemplate(description)\">{{description}}</ng-container>\n\t\t\t\t\t<ng-template *ngIf=\"isTemplate(description)\" [ngTemplateOutlet]=\"description\" [ngTemplateOutletContext]=\"{ $implicit: templateContext }\"></ng-template>\n\t\t\t\t\t<span *ngIf=\"autoAlign\" class=\"cds--popover-caret cds--popover--auto-align\"></span>\n\t\t\t\t</span>\n\t\t\t\t<span *ngIf=\"!autoAlign\" class=\"cds--popover-caret\"></span>\n\t\t\t</ng-container>\n\t\t</span>\n\t`\n})\nexport class Tooltip extends PopoverContainer implements OnChanges, AfterContentChecked {\n\tstatic tooltipCount = 0;\n\n\t@HostBinding(\"class.cds--tooltip\") tooltipClass = true;\n\n\t@Input() id = `tooltip-${Tooltip.tooltipCount++}`;\n\t/**\n\t * Set delay before tooltip is shown\n\t */\n\t@Input() enterDelayMs = 100;\n\t/**\n\t * Set delay when tooltip disappears\n\t */\n\t@Input() leaveDelayMs = 300;\n\t/**\n\t * Prevent tooltip from showing, used by icon button\n\t */\n\t@Input() disabled = false;\n\t/**\n\t * The string or template content to be exposed by the tooltip.\n\t */\n\t@Input() description: string | TemplateRef<any>;\n\t/**\n\t * Optional data for templates passed as implicit context\n\t */\n\t@Input() templateContext: any;\n\n\t@ViewChild(\"contentWrapper\") wrapper: ElementRef<HTMLSpanElement>;\n\n\tprivate timeoutId: any; // it should be number, but setTimeout below is matching the NodeJs type instead of the JS type\n\n\tconstructor(\n\t\tprotected elementRef: ElementRef,\n\t\tprotected ngZone: NgZone,\n\t\tprotected renderer: Renderer2,\n\t\tprotected changeDetectorRef: ChangeDetectorRef\n\t) {\n\t\tsuper(elementRef, ngZone, renderer, changeDetectorRef);\n\t\tthis.highContrast = true;\n\t\tthis.dropShadow = false;\n\t}\n\n\t@HostListener(\"mouseenter\", [\"$event\"])\n\tmouseenter(event) {\n\t\t// If a mouseleave is triggered before the tooltip is displayed (before setTimeout of mouseenter completes)\n\t\t// we trigger the mouseleave only avoiding having to unecessary show the tooltip\n\t\tclearTimeout(this.timeoutId);\n\t\tthis.timeoutId = setTimeout(() => {\n\t\t\tthis.handleChange(true, event);\n\t\t}, this.enterDelayMs);\n\t}\n\n\t@HostListener(\"mouseleave\", [\"$event\"])\n\tmouseleave(event) {\n\t\t// If a mouseleave is triggered before the tooltip is displayed (before setTimeout of mouseenter completes)\n\t\t// we trigger the mouseleave only avoiding having to unecessary show the tooltip\n\t\tclearTimeout(this.timeoutId);\n\t\tthis.timeoutId = setTimeout(() => {\n\t\t\tthis.handleChange(false, event);\n\t\t}, this.leaveDelayMs);\n\t}\n\n\t@HostListener(\"keyup\", [\"$event\"])\n\thostkeys(event: KeyboardEvent) {\n\t\tif (open && event.key === \"Escape\") {\n\t\t\tevent.stopPropagation();\n\t\t\tthis.handleChange(false, event);\n\t\t}\n\t}\n\n\t// We are not focusing on entire popover, only the trigger\n\t@HostListener(\"focusin\", [\"$event\"])\n\thandleFocus(event: Event) {\n\t\tthis.handleChange(true, event);\n\t}\n\n\t@HostListener(\"focusout\", [\"$event\"])\n\thandleFocusOut(event: Event) {\n\t\tthis.handleChange(false, event);\n\t}\n\n\tisTemplate(value) {\n\t\treturn value instanceof TemplateRef;\n\t}\n\n\t/**\n\t * Close the popover and reopen it with updated values without emitting an event\n\t * @param changes\n\t */\n\tngOnChanges(changes: SimpleChanges): void {\n\t\t// Close and reopen the popover, handle alignment/programmatic open/close\n\t\tconst originalState = this.isOpen;\n\t\tthis.handleChange(false);\n\n\t\t// Ignore first change since content is not initialized\n\t\tif (\n\t\t\t(changes.autoAlign && !changes.autoAlign.firstChange)\n\t\t\t|| (changes.disabled && !changes.disabled.firstChange && !changes.disabled.currentValue)\n\t\t\t// If description is set to empty string when open & autoAlign is true then set to a new value\n\t\t\t// positioning of popover is broken because popover content ref/caret no longer exists\n\t\t\t|| changes.description\n\t\t) {\n\t\t\t/**\n\t\t\t * When `disabled` is `true`, popover content node is removed. So when re-enabling `disabled`,\n\t\t\t * we manually update view so querySelector can detect the popover content node.\n\t\t\t * Otherwise, the position of the popover will be incorrect when autoAlign is enabled.\n\t\t\t */\n\t\t\tthis.changeDetectorRef.detectChanges();\n\n\t\t\t// Reset the inline styles\n\t\t\tthis.popoverContentRef = this.elementRef.nativeElement.querySelector(\".cds--popover-content\");\n\t\t\tthis.popoverContentRef?.setAttribute(\"style\", \"\");\n\t\t\tthis.caretRef = this.elementRef.nativeElement.querySelector(\"span.cds--popover-caret\");\n\t\t}\n\n\t\tthis.handleChange(originalState);\n\t}\n\n\t/**\n\t * Check for any changes in the projected content & apply accessibility attribute if needed\n\t */\n\tngAfterContentChecked() {\n\t\tif (this.wrapper) {\n\t\t\tconst buttonElement = this.wrapper.nativeElement.querySelector(\"button\");\n\t\t\tif (buttonElement && !buttonElement.getAttribute(\"aria-labelledby\")) {\n\t\t\t\tbuttonElement.setAttribute(\"aria-labelledby\", this.id);\n\t\t\t}\n\t\t}\n\t}\n}\n","import {\n\tChangeDetectionStrategy,\n\tChangeDetectorRef,\n\tComponent,\n\tElementRef,\n\tHostListener,\n\tInput,\n\tNgZone,\n\tRenderer2,\n\tTemplateRef\n} from \"@angular/core\";\nimport { PopoverContainer } from \"carbon-components-angular/popover\";\n\n/**\n * Get started with importing the module:\n *\n * ```typescript\n * import { TooltipModule } from 'carbon-components-angular';\n * ```\n *\n * [See demo](../../?path=/story/components-tooltip-definition--basic)\n */\n@Component({\n\tselector: \"cds-tooltip-definition, ibm-tooltip-definition\",\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\ttemplate: `\n\t\t<button\n\t\t\tclass=\"cds--definition-term\"\n\t\t\t[attr.aria-controls]=\"id\"\n\t\t\t[attr.aria-expanded]=\"isOpen\"\n\t\t\t[attr.aria-describedby]=\"isOpen ? id : null\"\n\t\t\t(blur)=\"onBlur($event)\"\n\t\t\t(click)=\"onClick($event)\"\n\t\t\ttype=\"button\">\n\t\t\t<ng-content></ng-content>\n\t\t</button>\n\t\t<span\n\t\t\t*ngIf=\"description\"\n\t\t\tclass=\"cds--popover\"\n\t\t\t[id]=\"id\"\n\t\t\t[attr.aria-hidden]=\"!isOpen\"\n\t\t\trole=\"tooltip\">\n\t\t\t<span class=\"cds--popover-content cds--definition-tooltip\" aria-live=\"polite\">\n\t\t\t\t<ng-container *ngIf=\"!isTemplate(description)\">{{description}}</ng-container>\n\t\t\t\t<ng-template *ngIf=\"isTemplate(description)\" [ngTemplateOutlet]=\"description\" [ngTemplateOutletContext]=\"{ $implicit: templateContext }\"></ng-template>\n\t\t\t\t<span *ngIf=\"autoAlign\" class=\"cds--popover-caret cds--popover--auto-align\"></span>\n\t\t\t</span>\n\t\t\t<span *ngIf=\"!autoAlign\" class=\"cds--popover-caret\"></span>\n\t\t</span>\n\t`\n})\nexport class TooltipDefinition extends PopoverContainer {\n\tstatic tooltipCount = 0;\n\n\t@Input() id = `tooltip-definition-${TooltipDefinition.tooltipCount++}`;\n\n\t/**\n\t * The string or template content to be exposed by the tooltip.\n\t */\n\t@Input() description: string | TemplateRef<any>;\n\t/**\n\t * Optional data for templates passed as implicit context\n\t */\n\t@Input() templateContext: any;\n\n\t@Input() openOnHover = false;\n\n\tconstructor(\n\t\tprotected elementRef: ElementRef,\n\t\tprotected ngZone: NgZone,\n\t\tprotected renderer: Renderer2,\n\t\tprotected changeDetectorRef: ChangeDetectorRef\n\t) {\n\t\tsuper(elementRef, ngZone, renderer, changeDetectorRef);\n\t\tthis.highContrast = true;\n\t\tthis.dropShadow = false;\n\t}\n\n\tonBlur(event: Event) {\n\t\tthis.handleChange(false, event);\n\t}\n\n\tonClick(event: Event) {\n\t\tthis.handleChange(!this.isOpen, event);\n\t}\n\n\t@HostListener(\"keyup\", [\"$event\"])\n\thostkeys(event: KeyboardEvent) {\n\t\tif (this.isOpen && event.key === \"Escape\") {\n\t\t\tevent.stopPropagation();\n\t\t\tthis.handleChange(false, event);\n\t\t}\n\t}\n\n\t@HostListener(\"mouseleave\", [\"$event\"])\n\tmouseleave(event) {\n\t\tthis.handleChange(false, event);\n\t}\n\n\t@HostListener(\"mouseenter\", [\"$event\"])\n\tmouseenter(event) {\n\t\tif (this.openOnHover) {\n\t\t\tthis.handleChange(true, event);\n\t\t}\n\t}\n\n\t@HostListener(\"focusin\", [\"$event\"])\n\tonFocus(event) {\n\t\tthis.handleChange(true, event);\n\t}\n\n\tpublic isTemplate(value) {\n\t\treturn value instanceof TemplateRef;\n\t}\n}\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\n\nimport { PopoverModule } from \"carbon-components-angular/popover\";\nimport { Tooltip } from \"./tooltip.component\";\nimport { TooltipDefinition } from \"./definition-tooptip.component\";\n\n@NgModule({\n\tdeclarations: [\n\t\tTooltip,\n\t\tTooltipDefinition\n\t],\n\texports: [\n\t\tTooltip,\n\t\tTooltipDefinition\n\t],\n\timports: [CommonModule, PopoverModule]\n})\nexport class TooltipModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AA8CA;;AAEG;AACU,MAAA,sBAAsB,GAAG;AACrC,IAAA,KAAK,EAAE,QAA6B;AACpC,IAAA,KAAK,EAAE,IAAI;AACX,IAAA,UAAU,EAAE,IAAI;AAChB,IAAA,YAAY,EAAE,IAAI;AAClB,IAAA,MAAM,EAAE,KAAK;AACb,IAAA,YAAY,EAAE,GAAG;AACjB,IAAA,YAAY,EAAE,GAAG;;;ACtClB;;;;;;;;AAQG;AAyBG,MAAO,OAAQ,SAAQ,gBAAgB,CAAA;AA+B5C,IAAA,WAAA,CACW,UAAsB,EACtB,MAAc,EACd,QAAmB,EACnB,iBAAoC,EAAA;QAE9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AAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,YAAY,EAAE;wBACb,OAAO;wBACP,iBAAiB;AACjB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACR,OAAO;wBACP,iBAAiB;AACjB,qBAAA;AACD,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC;iBACtC,CAAA;;;ACjBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"carbon-components-angular-tooltip.mjs","sources":["../../src/tooltip/tooltip.interface.ts","../../src/tooltip/tooltip.component.ts","../../src/tooltip/definition-tooptip.component.ts","../../src/tooltip/tooltip.module.ts","../../src/tooltip/carbon-components-angular-tooltip.ts"],"sourcesContent":["import { TemplateRef } from \"@angular/core\";\n\nexport type TooltipAlignments = \"top\" | \"top-left\" | \"top-right\" |\n\t\"bottom\" | \"bottom-left\" | \"bottom-right\" |\n\t\"left\" | \"left-bottom\" | \"left-top\" |\n\t\"right\" | \"right-bottom\" | \"right-top\";\n\n/**\n * Tooltip attributes\n */\nexport interface TooltipConfig {\n\t/**\n\t * The string or template content to be exposed by the tooltip.\n\t */\n\tdescription: string | TemplateRef<any>;\n\t/**\n\t * Specify the tooltip alignement\n\t */\n\talign?: TooltipAlignments;\n\t/**\n\t * Set to `false` to hide caret\n\t */\n\tcaret?: boolean;\n\t/**\n\t * Set to `false` to hide shadow\n\t */\n\tdropShadow?: boolean;\n\t/**\n\t * Set to `true` to enable high contrast\n\t */\n\thighContrast?: boolean;\n\t/**\n\t * Set to `true` to have the popover open by default\n\t * Tooltip will not remain open if user interacts with it (mouseenter & leave) or clicks anywhere in window\n\t */\n\tisOpen?: boolean;\n\t/**\n\t * Set delay before tooltip is shown\n\t */\n\tenterDelayMs?: number;\n\t/**\n\t * Set delay when tooltip disappears\n\t */\n\tleaveDelayMs?: number;\n}\n\n/**\n * Default tooltip configuration for components to populate missing interface attributes\n */\nexport const DEFAULT_TOOLTIP_CONFIG = {\n\talign: \"bottom\" as TooltipAlignments,\n\tcaret: true,\n\tdropShadow: true,\n\thighContrast: true,\n\tisOpen: false,\n\tenterDelayMs: 100,\n\tleaveDelayMs: 300\n};\n","import {\n\tAfterContentChecked,\n\tChangeDetectionStrategy,\n\tChangeDetectorRef,\n\tComponent,\n\tElementRef,\n\tHostBinding,\n\tHostListener,\n\tInput,\n\tNgZone,\n\tOnChanges,\n\tRenderer2,\n\tSimpleChanges,\n\tTemplateRef,\n\tViewChild\n} from \"@angular/core\";\nimport { PopoverContainer } from \"carbon-components-angular/popover\";\n\n/**\n * Get started with importing the module:\n *\n * ```typescript\n * import { TooltipModule } from 'carbon-components-angular';\n * ```\n *\n * [See demo](../../?path=/story/components-tooltip--basic)\n */\n@Component({\n\tselector: \"cds-tooltip, ibm-tooltip\",\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\ttemplate: `\n\t\t<span #contentWrapper>\n\t\t\t<ng-content></ng-content>\n\t\t</span>\n\t\t<span\n\t\t\t*ngIf=\"description\"\n\t\t\tclass=\"cds--popover\"\n\t\t\t[id]=\"id\"\n\t\t\t[attr.aria-hidden]=\"!isOpen\"\n\t\t\trole=\"tooltip\">\n\t\t\t<ng-container *ngIf=\"!disabled\">\n\t\t\t\t<span class=\"cds--popover-content cds--tooltip-content\">\n\t\t\t\t\t<ng-container *ngIf=\"!isTemplate(description)\">{{description}}</ng-container>\n\t\t\t\t\t<ng-template *ngIf=\"isTemplate(description)\" [ngTemplateOutlet]=\"description\" [ngTemplateOutletContext]=\"{ $implicit: templateContext }\"></ng-template>\n\t\t\t\t\t<span *ngIf=\"autoAlign\" class=\"cds--popover-caret cds--popover--auto-align\"></span>\n\t\t\t\t</span>\n\t\t\t\t<span *ngIf=\"!autoAlign\" class=\"cds--popover-caret\"></span>\n\t\t\t</ng-container>\n\t\t</span>\n\t`\n})\nexport class Tooltip extends PopoverContainer implements OnChanges, AfterContentChecked {\n\tstatic tooltipCount = 0;\n\n\t@HostBinding(\"class.cds--tooltip\") tooltipClass = true;\n\n\t@Input() id = `tooltip-${Tooltip.tooltipCount++}`;\n\t/**\n\t * Set delay before tooltip is shown\n\t */\n\t@Input() enterDelayMs = 100;\n\t/**\n\t * Set delay when tooltip disappears\n\t */\n\t@Input() leaveDelayMs = 300;\n\t/**\n\t * Prevent tooltip from showing, used by icon button\n\t */\n\t@Input() disabled = false;\n\t/**\n\t * The string or template content to be exposed by the tooltip.\n\t */\n\t@Input() description: string | TemplateRef<any>;\n\t/**\n\t * Optional data for templates passed as implicit context\n\t */\n\t@Input() templateContext: any;\n\n\t@ViewChild(\"contentWrapper\") wrapper: ElementRef<HTMLSpanElement>;\n\n\tprivate timeoutId: any; // it should be number, but setTimeout below is matching the NodeJs type instead of the JS type\n\n\tconstructor(\n\t\tprotected elementRef: ElementRef,\n\t\tprotected ngZone: NgZone,\n\t\tprotected renderer: Renderer2,\n\t\tprotected changeDetectorRef: ChangeDetectorRef\n\t) {\n\t\tsuper(elementRef, ngZone, renderer, changeDetectorRef);\n\t\tthis.highContrast = true;\n\t\tthis.dropShadow = false;\n\t}\n\n\t@HostListener(\"mouseenter\", [\"$event\"])\n\tmouseenter(event) {\n\t\t// If a mouseleave is triggered before the tooltip is displayed (before setTimeout of mouseenter completes)\n\t\t// we trigger the mouseleave only avoiding having to unecessary show the tooltip\n\t\tclearTimeout(this.timeoutId);\n\t\tthis.timeoutId = setTimeout(() => {\n\t\t\tthis.handleChange(true, event);\n\t\t}, this.enterDelayMs);\n\t}\n\n\t@HostListener(\"mouseleave\", [\"$event\"])\n\tmouseleave(event) {\n\t\t// If a mouseleave is triggered before the tooltip is displayed (before setTimeout of mouseenter completes)\n\t\t// we trigger the mouseleave only avoiding having to unecessary show the tooltip\n\t\tclearTimeout(this.timeoutId);\n\t\tthis.timeoutId = setTimeout(() => {\n\t\t\tthis.handleChange(false, event);\n\t\t}, this.leaveDelayMs);\n\t}\n\n\t@HostListener(\"keyup\", [\"$event\"])\n\thostkeys(event: KeyboardEvent) {\n\t\tif (open && event.key === \"Escape\") {\n\t\t\tevent.stopPropagation();\n\t\t\tthis.handleChange(false, event);\n\t\t}\n\t}\n\n\t// We are not focusing on entire popover, only the trigger\n\t@HostListener(\"focusin\", [\"$event\"])\n\thandleFocus(event: Event) {\n\t\tthis.handleChange(true, event);\n\t}\n\n\t@HostListener(\"focusout\", [\"$event\"])\n\thandleFocusOut(event: Event) {\n\t\tthis.handleChange(false, event);\n\t}\n\n\tisTemplate(value) {\n\t\treturn value instanceof TemplateRef;\n\t}\n\n\t/**\n\t * Close the popover and reopen it with updated values without emitting an event\n\t * @param changes\n\t */\n\tngOnChanges(changes: SimpleChanges): void {\n\t\t// Close and reopen the popover, handle alignment/programmatic open/close\n\t\tconst originalState = this.isOpen;\n\t\tthis.handleChange(false);\n\n\t\t// Ignore first change since content is not initialized\n\t\tif (\n\t\t\t(changes.autoAlign && !changes.autoAlign.firstChange)\n\t\t\t|| (changes.disabled && !changes.disabled.firstChange && !changes.disabled.currentValue)\n\t\t\t// If description is set to empty string when open & autoAlign is true then set to a new value\n\t\t\t// positioning of popover is broken because popover content ref/caret no longer exists\n\t\t\t|| changes.description\n\t\t) {\n\t\t\t/**\n\t\t\t * When `disabled` is `true`, popover content node is removed. So when re-enabling `disabled`,\n\t\t\t * we manually update view so querySelector can detect the popover content node.\n\t\t\t * Otherwise, the position of the popover will be incorrect when autoAlign is enabled.\n\t\t\t */\n\t\t\tthis.changeDetectorRef.detectChanges();\n\n\t\t\t// Reset the inline styles\n\t\t\tthis.popoverContentRef = this.elementRef.nativeElement.querySelector(\".cds--popover-content\");\n\t\t\tthis.popoverContentRef?.setAttribute(\"style\", \"\");\n\t\t\tthis.caretRef = this.elementRef.nativeElement.querySelector(\"span.cds--popover-caret\");\n\t\t}\n\n\t\tthis.handleChange(originalState);\n\t}\n\n\t/**\n\t * Check for any changes in the projected content & apply accessibility attribute if needed\n\t */\n\tngAfterContentChecked() {\n\t\tif (this.wrapper) {\n\t\t\tconst buttonElement = this.wrapper.nativeElement.querySelector(\"button\");\n\t\t\tif (buttonElement && !buttonElement.getAttribute(\"aria-labelledby\")) {\n\t\t\t\tbuttonElement.setAttribute(\"aria-labelledby\", this.id);\n\t\t\t}\n\t\t}\n\t}\n}\n","import {\n\tChangeDetectionStrategy,\n\tChangeDetectorRef,\n\tComponent,\n\tElementRef,\n\tHostListener,\n\tInput,\n\tNgZone,\n\tRenderer2,\n\tTemplateRef\n} from \"@angular/core\";\nimport { PopoverContainer } from \"carbon-components-angular/popover\";\n\n/**\n * Get started with importing the module:\n *\n * ```typescript\n * import { TooltipModule } from 'carbon-components-angular';\n * ```\n *\n * [See demo](../../?path=/story/components-tooltip-definition--basic)\n */\n@Component({\n\tselector: \"cds-tooltip-definition, ibm-tooltip-definition\",\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\ttemplate: `\n\t\t<button\n\t\t\tclass=\"cds--definition-term\"\n\t\t\t[attr.aria-controls]=\"id\"\n\t\t\t[attr.aria-expanded]=\"isOpen\"\n\t\t\t[attr.aria-describedby]=\"isOpen ? id : null\"\n\t\t\t(blur)=\"onBlur($event)\"\n\t\t\t(mousedown)=\"onClick($event)\"\n\t\t\ttype=\"button\">\n\t\t\t<ng-content></ng-content>\n\t\t</button>\n\t\t<span\n\t\t\t*ngIf=\"description\"\n\t\t\tclass=\"cds--popover\"\n\t\t\t[id]=\"id\"\n\t\t\t[attr.aria-hidden]=\"!isOpen\"\n\t\t\trole=\"tooltip\"\n\t\t\t(mousedown)=\"onPopoverMouseDown()\"\n\t\t\t(mouseup)=\"onPopoverMouseUp()\">\n\t\t\t<span class=\"cds--popover-content cds--definition-tooltip\" aria-live=\"polite\">\n\t\t\t\t<ng-container *ngIf=\"!isTemplate(description)\">{{description}}</ng-container>\n\t\t\t\t<ng-template *ngIf=\"isTemplate(description)\" [ngTemplateOutlet]=\"description\" [ngTemplateOutletContext]=\"{ $implicit: templateContext }\"></ng-template>\n\t\t\t\t<span *ngIf=\"autoAlign\" class=\"cds--popover-caret cds--popover--auto-align\"></span>\n\t\t\t</span>\n\t\t\t<span *ngIf=\"!autoAlign\" class=\"cds--popover-caret\"></span>\n\t\t</span>\n\t`\n})\nexport class TooltipDefinition extends PopoverContainer {\n\tstatic tooltipCount = 0;\n\n\t@Input() id = `tooltip-definition-${TooltipDefinition.tooltipCount++}`;\n\n\t/**\n\t * The string or template content to be exposed by the tooltip.\n\t */\n\t@Input() description: string | TemplateRef<any>;\n\t/**\n\t * Optional data for templates passed as implicit context\n\t */\n\t@Input() templateContext: any;\n\n\t@Input() openOnHover = false;\n\n\t/**\n\t * Helper variable to ensure button blur doesn't fire on `click` of popover content\n\t */\n\tprivate isInteractingWithPopover = false;\n\n\tconstructor(\n\t\tprotected elementRef: ElementRef,\n\t\tprotected ngZone: NgZone,\n\t\tprotected renderer: Renderer2,\n\t\tprotected changeDetectorRef: ChangeDetectorRef\n\t) {\n\t\tsuper(elementRef, ngZone, renderer, changeDetectorRef);\n\t\tthis.highContrast = true;\n\t\tthis.dropShadow = false;\n\t}\n\n\tonBlur(event: Event) {\n\t\t// Only close if user is not interacting with popover content\n\t\tif (!this.isInteractingWithPopover) {\n\t\t\tthis.handleChange(false, event);\n\t\t}\n\t}\n\n\tonClick(event: MouseEvent) {\n\t\tif (event.button === 0) {\n\t\t\tthis.handleChange(!this.isOpen, event);\n\t\t}\n\t}\n\n\tonPopoverMouseDown() {\n\t\tthis.isInteractingWithPopover = true;\n\t}\n\n\tonPopoverMouseUp() {\n\t\tthis.isInteractingWithPopover = false;\n\t}\n\n\t@HostListener(\"keyup\", [\"$event\"])\n\thostkeys(event: KeyboardEvent) {\n\t\tif (this.isOpen && event.key === \"Escape\") {\n\t\t\tevent.stopPropagation();\n\t\t\tthis.handleChange(false, event);\n\t\t}\n\t}\n\n\t@HostListener(\"mouseleave\", [\"$event\"])\n\tmouseleave(event) {\n\t\tthis.handleChange(false, event);\n\t}\n\n\t@HostListener(\"mouseenter\", [\"$event\"])\n\tmouseenter(event) {\n\t\tif (this.openOnHover) {\n\t\t\tthis.handleChange(true, event);\n\t\t}\n\t}\n\n\t@HostListener(\"focusin\", [\"$event\"])\n\tonFocus(event) {\n\t\tthis.handleChange(true, event);\n\t}\n\n\tpublic isTemplate(value) {\n\t\treturn value instanceof TemplateRef;\n\t}\n}\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\n\nimport { PopoverModule } from \"carbon-components-angular/popover\";\nimport { Tooltip } from \"./tooltip.component\";\nimport { TooltipDefinition } from \"./definition-tooptip.component\";\n\n@NgModule({\n\tdeclarations: [\n\t\tTooltip,\n\t\tTooltipDefinition\n\t],\n\texports: [\n\t\tTooltip,\n\t\tTooltipDefinition\n\t],\n\timports: [CommonModule, PopoverModule]\n})\nexport class TooltipModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AA8CA;;AAEG;AACU,MAAA,sBAAsB,GAAG;AACrC,IAAA,KAAK,EAAE,QAA6B;AACpC,IAAA,KAAK,EAAE,IAAI;AACX,IAAA,UAAU,EAAE,IAAI;AAChB,IAAA,YAAY,EAAE,IAAI;AAClB,IAAA,MAAM,EAAE,KAAK;AACb,IAAA,YAAY,EAAE,GAAG;AACjB,IAAA,YAAY,EAAE,GAAG;;;ACtClB;;;;;;;;AAQG;AAyBG,MAAO,OAAQ,SAAQ,gBAAgB,CAAA;AA+B5C,IAAA,WAAA,CACW,UAAsB,EACtB,MAAc,EACd,QAAmB,EACnB,iBAAoC,EAAA;QAE9C,KAAK,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,iBAAiB,CAAC,CAAC;AAL7C,QAAA,IAAU,CAAA,UAAA,GAAV,UAAU,CAAY;AACtB,QAAA,IAAM,CAAA,MAAA,GAAN,MAAM,CAAQ;AACd,QAAA,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAW;AACnB,QAAA,IAAiB,CAAA,iBAAA,GAAjB,iBAAiB,CAAmB;AAhCZ,QAAA,IAAY,CAAA,YAAA,GAAG,IAA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EAAA,CAAA;kBAXzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,YAAY,EAAE;wBACb,OAAO;wBACP,iBAAiB;AACjB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACR,OAAO;wBACP,iBAAiB;AACjB,qBAAA;AACD,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC;iBACtC,CAAA;;;ACjBD;;AAEG;;;;"}
|
|
@@ -222,14 +222,29 @@ class TooltipDefinition extends PopoverContainer {
|
|
|
222
222
|
this.changeDetectorRef = changeDetectorRef;
|
|
223
223
|
this.id = `tooltip-definition-${TooltipDefinition.tooltipCount++}`;
|
|
224
224
|
this.openOnHover = false;
|
|
225
|
+
/**
|
|
226
|
+
* Helper variable to ensure button blur doesn't fire on `click` of popover content
|
|
227
|
+
*/
|
|
228
|
+
this.isInteractingWithPopover = false;
|
|
225
229
|
this.highContrast = true;
|
|
226
230
|
this.dropShadow = false;
|
|
227
231
|
}
|
|
228
232
|
onBlur(event) {
|
|
229
|
-
|
|
233
|
+
// Only close if user is not interacting with popover content
|
|
234
|
+
if (!this.isInteractingWithPopover) {
|
|
235
|
+
this.handleChange(false, event);
|
|
236
|
+
}
|
|
230
237
|
}
|
|
231
238
|
onClick(event) {
|
|
232
|
-
|
|
239
|
+
if (event.button === 0) {
|
|
240
|
+
this.handleChange(!this.isOpen, event);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
onPopoverMouseDown() {
|
|
244
|
+
this.isInteractingWithPopover = true;
|
|
245
|
+
}
|
|
246
|
+
onPopoverMouseUp() {
|
|
247
|
+
this.isInteractingWithPopover = false;
|
|
233
248
|
}
|
|
234
249
|
hostkeys(event) {
|
|
235
250
|
if (this.isOpen && event.key === "Escape") {
|
|
@@ -261,7 +276,7 @@ TooltipDefinition.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
|
|
|
261
276
|
[attr.aria-expanded]="isOpen"
|
|
262
277
|
[attr.aria-describedby]="isOpen ? id : null"
|
|
263
278
|
(blur)="onBlur($event)"
|
|
264
|
-
(
|
|
279
|
+
(mousedown)="onClick($event)"
|
|
265
280
|
type="button">
|
|
266
281
|
<ng-content></ng-content>
|
|
267
282
|
</button>
|
|
@@ -270,7 +285,9 @@ TooltipDefinition.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
|
|
|
270
285
|
class="cds--popover"
|
|
271
286
|
[id]="id"
|
|
272
287
|
[attr.aria-hidden]="!isOpen"
|
|
273
|
-
role="tooltip"
|
|
288
|
+
role="tooltip"
|
|
289
|
+
(mousedown)="onPopoverMouseDown()"
|
|
290
|
+
(mouseup)="onPopoverMouseUp()">
|
|
274
291
|
<span class="cds--popover-content cds--definition-tooltip" aria-live="polite">
|
|
275
292
|
<ng-container *ngIf="!isTemplate(description)">{{description}}</ng-container>
|
|
276
293
|
<ng-template *ngIf="isTemplate(description)" [ngTemplateOutlet]="description" [ngTemplateOutletContext]="{ $implicit: templateContext }"></ng-template>
|
|
@@ -291,7 +308,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
291
308
|
[attr.aria-expanded]="isOpen"
|
|
292
309
|
[attr.aria-describedby]="isOpen ? id : null"
|
|
293
310
|
(blur)="onBlur($event)"
|
|
294
|
-
(
|
|
311
|
+
(mousedown)="onClick($event)"
|
|
295
312
|
type="button">
|
|
296
313
|
<ng-content></ng-content>
|
|
297
314
|
</button>
|
|
@@ -300,7 +317,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
300
317
|
class="cds--popover"
|
|
301
318
|
[id]="id"
|
|
302
319
|
[attr.aria-hidden]="!isOpen"
|
|
303
|
-
role="tooltip"
|
|
320
|
+
role="tooltip"
|
|
321
|
+
(mousedown)="onPopoverMouseDown()"
|
|
322
|
+
(mouseup)="onPopoverMouseUp()">
|
|
304
323
|
<span class="cds--popover-content cds--definition-tooltip" aria-live="polite">
|
|
305
324
|
<ng-container *ngIf="!isTemplate(description)">{{description}}</ng-container>
|
|
306
325
|
<ng-template *ngIf="isTemplate(description)" [ngTemplateOutlet]="description" [ngTemplateOutletContext]="{ $implicit: templateContext }"></ng-template>
|