carbon-components-angular 5.24.2 → 5.24.3
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/Tooltip.html +67 -28
- package/docs/documentation/coverage.html +3 -3
- package/docs/documentation/js/search/search_index.js +2 -2
- package/docs/documentation/modules/ComboBoxModule/dependencies.svg +4 -4
- package/docs/documentation/modules/ComboBoxModule.html +4 -4
- package/docs/documentation/modules/ContentSwitcherModule/dependencies.svg +4 -4
- package/docs/documentation/modules/ContentSwitcherModule.html +4 -4
- package/docs/documentation/modules/DatePickerInputModule/dependencies.svg +7 -7
- package/docs/documentation/modules/DatePickerInputModule.html +7 -7
- package/docs/documentation/modules/DatePickerModule/dependencies.svg +53 -57
- package/docs/documentation/modules/DatePickerModule.html +53 -57
- package/docs/documentation/modules/DialogModule/dependencies.svg +34 -34
- package/docs/documentation/modules/DialogModule.html +34 -34
- package/docs/documentation/modules/GridModule/dependencies.svg +60 -60
- package/docs/documentation/modules/GridModule.html +60 -60
- package/docs/documentation/modules/LoadingModule/dependencies.svg +4 -4
- package/docs/documentation/modules/LoadingModule.html +4 -4
- package/docs/documentation/modules/NFormsModule/dependencies.svg +4 -4
- package/docs/documentation/modules/NFormsModule.html +4 -4
- package/docs/documentation/modules/NumberModule/dependencies.svg +4 -4
- package/docs/documentation/modules/NumberModule.html +4 -4
- package/docs/documentation/modules/ProgressIndicatorModule/dependencies.svg +4 -4
- package/docs/documentation/modules/ProgressIndicatorModule.html +4 -4
- package/docs/documentation/modules/RadioModule/dependencies.svg +4 -4
- package/docs/documentation/modules/RadioModule.html +4 -4
- package/docs/documentation/modules/SearchModule/dependencies.svg +4 -4
- package/docs/documentation/modules/SearchModule.html +4 -4
- package/docs/documentation/modules/SelectModule/dependencies.svg +58 -58
- package/docs/documentation/modules/SelectModule.html +58 -58
- package/docs/documentation/modules/SliderModule/dependencies.svg +4 -4
- package/docs/documentation/modules/SliderModule.html +4 -4
- package/docs/documentation/modules/StructuredListModule/dependencies.svg +66 -66
- package/docs/documentation/modules/StructuredListModule.html +66 -66
- package/docs/documentation/modules/TabsModule/dependencies.svg +69 -69
- package/docs/documentation/modules/TabsModule.html +69 -69
- package/docs/documentation/modules/TagModule/dependencies.svg +4 -4
- package/docs/documentation/modules/TagModule.html +4 -4
- package/docs/documentation/modules/ThemeModule/dependencies.svg +13 -13
- package/docs/documentation/modules/ThemeModule.html +13 -13
- package/docs/documentation/modules/TilesModule/dependencies.svg +101 -101
- package/docs/documentation/modules/TilesModule.html +101 -101
- package/docs/documentation/modules/TimePickerModule/dependencies.svg +41 -45
- package/docs/documentation/modules/TimePickerModule.html +41 -45
- package/docs/documentation/modules/TimePickerSelectModule/dependencies.svg +41 -45
- package/docs/documentation/modules/TimePickerSelectModule.html +41 -45
- package/docs/documentation/modules/ToggletipModule/dependencies.svg +37 -37
- package/docs/documentation/modules/ToggletipModule.html +37 -37
- package/docs/documentation/modules/TooltipModule/dependencies.svg +28 -28
- package/docs/documentation/modules/TooltipModule.html +28 -28
- package/docs/documentation/modules/TreeviewModule/dependencies.svg +4 -4
- package/docs/documentation/modules/TreeviewModule.html +4 -4
- package/docs/documentation/modules/UIShellModule/dependencies.svg +4 -4
- package/docs/documentation/modules/UIShellModule.html +4 -4
- package/docs/documentation.json +14 -14
- package/docs/storybook/{4578.17249a24.iframe.bundle.js → 4578.65805869.iframe.bundle.js} +1 -1
- package/docs/storybook/iframe.html +2 -2
- package/docs/storybook/{main.882077ad.iframe.bundle.js → main.ff512697.iframe.bundle.js} +1 -1
- package/docs/storybook/project.json +1 -1
- package/docs/storybook/{runtime~main.57b056bd.iframe.bundle.js → runtime~main.4af5c4ee.iframe.bundle.js} +1 -1
- package/docs/storybook/tooltip-definition-tooptip-stories.d6e8ec29.iframe.bundle.js +1 -0
- package/docs/storybook/tooltip-tooltip-stories.79853bfa.iframe.bundle.js +1 -0
- package/esm2020/tooltip/tooltip.component.mjs +9 -3
- package/fesm2015/carbon-components-angular-tooltip.mjs +8 -2
- package/fesm2015/carbon-components-angular-tooltip.mjs.map +1 -1
- package/fesm2020/carbon-components-angular-tooltip.mjs +8 -2
- package/fesm2020/carbon-components-angular-tooltip.mjs.map +1 -1
- package/package.json +1 -1
- package/tooltip/tooltip.component.d.ts +1 -0
- package/docs/storybook/tooltip-definition-tooptip-stories.d4d53243.iframe.bundle.js +0 -1
- package/docs/storybook/tooltip-tooltip-stories.fafd3535.iframe.bundle.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"generatedAt":
|
|
1
|
+
{"generatedAt":1713558448092,"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",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",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",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:"e8963bf8",210:"e906cf67",384:"c703f9de",454:"3f3499ab",459:"183f4129",503:"7113f5a6",703:"7265233d",799:"05ab4dd7",901:"fedd2c3b",911:"1b5d80b7",933:"c19aca64",972:"699b1e1b",1119:"f42b55a6",1127:"fac60ec0",1325:"3c39c950",1470:"39923f01",1562:"1e6a79b6",1895:"0331c090",1928:"48faee56",2218:"7513a48b",2342:"ba1fb969",2371:"7bbf1029",2388:"66aa5c7c",2399:"51dab44c",2489:"def6c644",2494:"261bc118",2573:"f7a88c02",2722:"00b09460",2969:"ad4e83e9",3080:"d3996d61",3224:"aa2b4664",3280:"841048dc",3314:"487f9487",3329:"3aeae19d",3348:"9d9f3238",3360:"e0c015fc",3402:"209d7ef2",3415:"bd5d140d",3523:"2887855a",3610:"e4243e65",3719:"09f1a279",3774:"c37f3d92",3858:"d9a3162d",3867:"7b3a9288",3931:"0e7c514c",4232:"89086fc2",4253:"fafd3535",4277:"a011175b",4391:"8f3aa078",4578:"17249a24",4731:"5b558b26",4762:"cae9c326",5069:"eabf32ea",5103:"20115e64",5167:"59d7496a",5368:"b2525c3c",5455:"9fc41371",5808:"0002dc55",5868:"9e6e15e4",5980:"f28348e5",6026:"0a70e102",6115:"66e1727e",6274:"d4d53243",6310:"7cbeda49",6322:"a91784a3",6456:"e544ed9d",6634:"9e3dd976",6663:"1d3d1000",6842:"43daa149",6943:"eeb079d9",7019:"b8944046",7081:"799a681c",7153:"fff25cdf",7235:"70809ec7",7291:"c50bdf73",7399:"f37bb110",7529:"5272f30b",7773:"6c3cf943",7840:"717ad729",7869:"77f9485f",7931:"624c3d04",8341:"a544f9e9",8552:"d561d04b",9115:"b37cce0a",9211:"97161318",9325:"c925923c",9552:"5b57af49",9558:"f6e6487f",9619:"bf194b73",9660:"a1fb87a2",9672:"00e58d20",9736:"6039adf9"}[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",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",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",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:"e8963bf8",210:"e906cf67",384:"c703f9de",454:"3f3499ab",459:"183f4129",503:"7113f5a6",703:"7265233d",799:"05ab4dd7",901:"fedd2c3b",911:"1b5d80b7",933:"c19aca64",972:"699b1e1b",1119:"f42b55a6",1127:"fac60ec0",1325:"3c39c950",1470:"39923f01",1562:"1e6a79b6",1895:"0331c090",1928:"48faee56",2218:"7513a48b",2342:"ba1fb969",2371:"7bbf1029",2388:"66aa5c7c",2399:"51dab44c",2489:"def6c644",2494:"261bc118",2573:"f7a88c02",2722:"00b09460",2969:"ad4e83e9",3080:"d3996d61",3224:"aa2b4664",3280:"841048dc",3314:"487f9487",3329:"3aeae19d",3348:"9d9f3238",3360:"e0c015fc",3402:"209d7ef2",3415:"bd5d140d",3523:"2887855a",3610:"e4243e65",3719:"09f1a279",3774:"c37f3d92",3858:"d9a3162d",3867:"7b3a9288",3931:"0e7c514c",4232:"89086fc2",4253:"79853bfa",4277:"a011175b",4391:"8f3aa078",4578:"65805869",4731:"5b558b26",4762:"cae9c326",5069:"eabf32ea",5103:"20115e64",5167:"59d7496a",5368:"b2525c3c",5455:"9fc41371",5808:"0002dc55",5868:"9e6e15e4",5980:"f28348e5",6026:"0a70e102",6115:"66e1727e",6274:"d6e8ec29",6310:"7cbeda49",6322:"a91784a3",6456:"e544ed9d",6634:"9e3dd976",6663:"1d3d1000",6842:"43daa149",6943:"eeb079d9",7019:"b8944046",7081:"799a681c",7153:"fff25cdf",7235:"70809ec7",7291:"c50bdf73",7399:"f37bb110",7529:"5272f30b",7773:"6c3cf943",7840:"717ad729",7869:"77f9485f",7931:"624c3d04",8341:"a544f9e9",8552:"d561d04b",9115:"b37cce0a",9211:"97161318",9325:"c925923c",9552:"5b57af49",9558:"f6e6487f",9619:"bf194b73",9660:"a1fb87a2",9672:"00e58d20",9736:"6039adf9"}[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})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkcarbon_components_angular=self.webpackChunkcarbon_components_angular||[]).push([[6274],{"./src/popover/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{OI:()=>PopoverContainer,yk:()=>PopoverContent,UU:()=>PopoverModule});var asyncToGenerator=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.js"),core=__webpack_require__("./node_modules/@angular/core/fesm2020/core.mjs"),floating_ui_dom=__webpack_require__("./node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs"),floating_ui_core=__webpack_require__("./node_modules/@floating-ui/core/dist/floating-ui.core.mjs");let PopoverContainer=class PopoverContainer{constructor(elementRef,ngZone,renderer,changeDetectorRef){this.elementRef=elementRef,this.ngZone=ngZone,this.renderer=renderer,this.changeDetectorRef=changeDetectorRef,this._align="bottom",this.alignmentClassPrefix="cds--popover--",this.onClose=new core.EventEmitter,this.onOpen=new core.EventEmitter,this.isOpenChange=new core.EventEmitter,this.caret=!0,this.dropShadow=!0,this.highContrast=!1,this.autoAlign=!1,this.containerClass=!0,this.isOpen=!1}set align(alignment){if(!alignment)return;const previousAlignment=this._align;switch(alignment){case"top-left":this._align="top-start";break;case"top-right":this._align="top-end";break;case"bottom-left":this._align="bottom-start";break;case"bottom-right":this._align="bottom-end";break;case"left-top":this._align="left-start";break;case"left-bottom":this._align="left-end";break;case"right-top":this._align="right-start";break;case"right-bottom":this._align="right-end";break;default:this._align=alignment}this.updateAlignmentClass(this._align,previousAlignment)}handleChange(open,event){if(this.isOpen!==open&&event&&this.isOpenChange.emit(open),open){if(event&&this.onOpen.emit(event),this.autoAlign){if(this.caretRef){const computedStyle=getComputedStyle(this.caretRef),offset=computedStyle.getPropertyValue("--cds-popover-offset"),height=computedStyle.getPropertyValue("--cds-popover-caret-height");this.caretOffset=(offset?.includes("px")?Number(offset.split("px",1)[0]):16*Number(offset.split("rem",1)[0]))||10,this.caretHeight=(height?.includes("px")?Number(height.split("px",1)[0]):16*Number(height.split("rem",1)[0]))||6}this.elementRef.nativeElement&&this.popoverContentRef&&(this.unmountFloatingElement=(0,floating_ui_dom.Me)(this.elementRef.nativeElement,this.popoverContentRef,this.recomputePosition.bind(this)))}}else this.cleanUp(),event&&this.onClose.emit(event);this.isOpen=open,this.changeDetectorRef.markForCheck()}roundByDPR(value){const dpr=window.devicePixelRatio||1;return Math.round(value*dpr)/dpr}recomputePosition(){var _this=this;this.ngZone.runOutsideAngular((0,asyncToGenerator.Z)((function*(){const{x,y,placement,middlewareData}=yield(0,floating_ui_dom.oo)(_this.elementRef.nativeElement,_this.popoverContentRef,{placement:_this._align,strategy:"fixed",middleware:[(0,floating_ui_core.cv)(_this.caretOffset),(0,floating_ui_dom.RR)({fallbackAxisSideDirection:"start"}),(0,floating_ui_dom.x7)({element:_this.caretRef})]}),previousAlignment=_this._align;if(_this._align=placement,_this.updateAlignmentClass(_this._align,previousAlignment),Object.assign(_this.popoverContentRef.style,{position:"fixed",top:"0",left:"0",transform:`translate(${_this.roundByDPR(x)}px,${_this.roundByDPR(y)}px)`}),middlewareData.arrow){const{x:arrowX,y:arrowY}=middlewareData.arrow,staticSide={top:"bottom",right:"left",bottom:"top",left:"right"}[placement.split("-")[0]];_this.caretRef.style.left=null!=arrowX?`${arrowX}px`:"",_this.caretRef.style.top=null!=arrowY?`${arrowY}px`:"",_this.caretRef.style.right="",_this.caretRef.style.bottom="",staticSide&&(_this.caretRef.style[staticSide]=-_this.caretHeight+"px")}})))}ngOnChanges(changes){const originalState=this.isOpen;this.handleChange(!1),changes.autoAlign&&!changes.autoAlign.firstChange&&(this.popoverContentRef=this.elementRef.nativeElement.querySelector(".cds--popover-content"),this.popoverContentRef.setAttribute("style",""),this.caretRef=this.elementRef.nativeElement.querySelector("span.cds--popover-caret")),this.handleChange(originalState)}ngAfterViewInit(){this.initializeReferences()}initializeReferences(){this.updateAlignmentClass(this._align),this.popoverContentRef=this.elementRef.nativeElement.querySelector(".cds--popover-content"),this.caretRef=this.elementRef.nativeElement.querySelector("span.cds--popover-caret"),this.handleChange(this.isOpen)}ngOnDestroy(){this.cleanUp()}cleanUp(){this.unmountFloatingElement&&this.unmountFloatingElement(),this.unmountFloatingElement=void 0}updateAlignmentClass(newAlignment,previousAlignment){if(this.elementRef.nativeElement&&previousAlignment!==newAlignment){const regexp=new RegExp("right|top|left|bottom");this.elementRef.nativeElement.classList.forEach((className=>{regexp.test(className)&&this.renderer.removeClass(this.elementRef.nativeElement,`${className}`)})),this.renderer.addClass(this.elementRef.nativeElement,`${this.alignmentClassPrefix}${newAlignment}`)}}};PopoverContainer.ctorParameters=()=>[{type:core.ElementRef},{type:core.NgZone},{type:core.Renderer2},{type:core.ChangeDetectorRef}],PopoverContainer.propDecorators={align:[{type:core.Input}],onClose:[{type:core.Output}],onOpen:[{type:core.Output}],isOpenChange:[{type:core.Output}],caret:[{type:core.HostBinding,args:["class.cds--popover--caret"]},{type:core.Input}],dropShadow:[{type:core.HostBinding,args:["class.cds--popover--drop-shadow"]},{type:core.Input}],highContrast:[{type:core.HostBinding,args:["class.cds--popover--high-contrast"]},{type:core.Input}],autoAlign:[{type:core.HostBinding,args:["class.cds--popover--auto-align"]},{type:core.Input}],containerClass:[{type:core.HostBinding,args:["class.cds--popover-container"]}],isOpen:[{type:core.Input},{type:core.HostBinding,args:["class.cds--popover--open"]}]},PopoverContainer=(0,tslib_es6.gn)([(0,core.Directive)({selector:"[cdsPopover], [ibmPopover]"})],PopoverContainer);let PopoverContent=class PopoverContent{constructor(changeDetectorRef){this.changeDetectorRef=changeDetectorRef,this.popoverClass=!0,this.autoAlign=!1}ngAfterViewInit(){this.popoverContent&&(this.autoAlign=!!this.popoverContent.nativeElement.closest(".cds--popover--auto-align"),this.changeDetectorRef.detectChanges())}};PopoverContent.ctorParameters=()=>[{type:core.ChangeDetectorRef}],PopoverContent.propDecorators={popoverClass:[{type:core.HostBinding,args:["class.cds--popover"]}],popoverContent:[{type:core.ViewChild,args:["content"]}]},PopoverContent=(0,tslib_es6.gn)([(0,core.Component)({selector:"cds-popover-content, ibm-popover-content",template:'\n\t\t<span class="cds--popover-content" #content>\n\t\t\t<div>\n\t\t\t\t<ng-content></ng-content>\n\t\t\t</div>\n\t\t\t<span *ngIf="autoAlign" class="cds--popover-caret cds--popover--auto-align"></span>\n\t\t</span>\n\t\t<span *ngIf="!autoAlign" class="cds--popover-caret"></span>\n\t'})],PopoverContent);var common=__webpack_require__("./node_modules/@angular/common/fesm2020/common.mjs");let PopoverModule=class PopoverModule{};PopoverModule=(0,tslib_es6.gn)([(0,core.NgModule)({declarations:[PopoverContainer,PopoverContent],exports:[PopoverContainer,PopoverContent],imports:[common.CommonModule]})],PopoverModule)},"./src/tooltip/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{u:()=>Tooltip,vD:()=>TooltipDefinition,z8:()=>TooltipModule});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.js"),core=__webpack_require__("./node_modules/@angular/core/fesm2020/core.mjs"),popover=__webpack_require__("./src/popover/index.ts");let Tooltip=class Tooltip extends popover.OI{constructor(elementRef,ngZone,renderer,changeDetectorRef){super(elementRef,ngZone,renderer,changeDetectorRef),this.elementRef=elementRef,this.ngZone=ngZone,this.renderer=renderer,this.changeDetectorRef=changeDetectorRef,this.tooltipClass=!0,this.id="tooltip-"+Tooltip.tooltipCount++,this.enterDelayMs=100,this.leaveDelayMs=300,this.disabled=!1,this.highContrast=!0,this.dropShadow=!1}mouseenter(event){clearTimeout(this.timeoutId),this.timeoutId=setTimeout((()=>{this.handleChange(!0,event)}),this.enterDelayMs)}mouseleave(event){clearTimeout(this.timeoutId),this.timeoutId=setTimeout((()=>{this.handleChange(!1,event)}),this.leaveDelayMs)}hostkeys(event){open&&"Escape"===event.key&&(event.stopPropagation(),this.handleChange(!1,event))}handleFocus(event){this.handleChange(!0,event)}handleFocusOut(event){this.handleChange(!1,event)}isTemplate(value){return value instanceof core.TemplateRef}ngAfterContentChecked(){if(this.wrapper){const buttonElement=this.wrapper.nativeElement.querySelector("button");buttonElement&&!buttonElement.getAttribute("aria-labelledby")&&buttonElement.setAttribute("aria-labelledby",this.id)}}};Tooltip.tooltipCount=0,Tooltip.ctorParameters=()=>[{type:core.ElementRef},{type:core.NgZone},{type:core.Renderer2},{type:core.ChangeDetectorRef}],Tooltip.propDecorators={tooltipClass:[{type:core.HostBinding,args:["class.cds--tooltip"]}],id:[{type:core.Input}],enterDelayMs:[{type:core.Input}],leaveDelayMs:[{type:core.Input}],disabled:[{type:core.Input}],description:[{type:core.Input}],templateContext:[{type:core.Input}],wrapper:[{type:core.ViewChild,args:["contentWrapper"]}],mouseenter:[{type:core.HostListener,args:["mouseenter",["$event"]]}],mouseleave:[{type:core.HostListener,args:["mouseleave",["$event"]]}],hostkeys:[{type:core.HostListener,args:["keyup",["$event"]]}],handleFocus:[{type:core.HostListener,args:["focusin",["$event"]]}],handleFocusOut:[{type:core.HostListener,args:["focusout",["$event"]]}]},Tooltip=(0,tslib_es6.gn)([(0,core.Component)({selector:"cds-tooltip, ibm-tooltip",changeDetection:core.ChangeDetectionStrategy.OnPush,template:'\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'})],Tooltip);let TooltipDefinition=class TooltipDefinition extends popover.OI{constructor(elementRef,ngZone,renderer,changeDetectorRef){super(elementRef,ngZone,renderer,changeDetectorRef),this.elementRef=elementRef,this.ngZone=ngZone,this.renderer=renderer,this.changeDetectorRef=changeDetectorRef,this.id="tooltip-definition-"+TooltipDefinition.tooltipCount++,this.highContrast=!0,this.dropShadow=!1}onBlur(event){this.handleChange(!1,event)}onClick(event){this.handleChange(!this.isOpen,event)}hostkeys(event){this.isOpen&&"Escape"===event.key&&(event.stopPropagation(),this.handleChange(!1,event))}mouseleave(event){this.handleChange(!1,event)}isTemplate(value){return value instanceof core.TemplateRef}};TooltipDefinition.tooltipCount=0,TooltipDefinition.ctorParameters=()=>[{type:core.ElementRef},{type:core.NgZone},{type:core.Renderer2},{type:core.ChangeDetectorRef}],TooltipDefinition.propDecorators={id:[{type:core.Input}],description:[{type:core.Input}],templateContext:[{type:core.Input}],hostkeys:[{type:core.HostListener,args:["keyup",["$event"]]}],mouseleave:[{type:core.HostListener,args:["mouseleave",["$event"]]}]},TooltipDefinition=(0,tslib_es6.gn)([(0,core.Component)({selector:"cds-tooltip-definition, ibm-tooltip-definition",changeDetection:core.ChangeDetectionStrategy.OnPush,template:'\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(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">\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'})],TooltipDefinition);var common=__webpack_require__("./node_modules/@angular/common/fesm2020/common.mjs");let TooltipModule=class TooltipModule{};TooltipModule=(0,tslib_es6.gn)([(0,core.NgModule)({declarations:[Tooltip,TooltipDefinition],exports:[Tooltip,TooltipDefinition],imports:[common.CommonModule,popover.UU]})],TooltipModule)},"./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 [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 [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 [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 [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"]}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkcarbon_components_angular=self.webpackChunkcarbon_components_angular||[]).push([[4253],{"./src/popover/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{OI:()=>PopoverContainer,yk:()=>PopoverContent,UU:()=>PopoverModule});var asyncToGenerator=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.js"),core=__webpack_require__("./node_modules/@angular/core/fesm2020/core.mjs"),floating_ui_dom=__webpack_require__("./node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs"),floating_ui_core=__webpack_require__("./node_modules/@floating-ui/core/dist/floating-ui.core.mjs");let PopoverContainer=class PopoverContainer{constructor(elementRef,ngZone,renderer,changeDetectorRef){this.elementRef=elementRef,this.ngZone=ngZone,this.renderer=renderer,this.changeDetectorRef=changeDetectorRef,this._align="bottom",this.alignmentClassPrefix="cds--popover--",this.onClose=new core.EventEmitter,this.onOpen=new core.EventEmitter,this.isOpenChange=new core.EventEmitter,this.caret=!0,this.dropShadow=!0,this.highContrast=!1,this.autoAlign=!1,this.containerClass=!0,this.isOpen=!1}set align(alignment){if(!alignment)return;const previousAlignment=this._align;switch(alignment){case"top-left":this._align="top-start";break;case"top-right":this._align="top-end";break;case"bottom-left":this._align="bottom-start";break;case"bottom-right":this._align="bottom-end";break;case"left-top":this._align="left-start";break;case"left-bottom":this._align="left-end";break;case"right-top":this._align="right-start";break;case"right-bottom":this._align="right-end";break;default:this._align=alignment}this.updateAlignmentClass(this._align,previousAlignment)}handleChange(open,event){if(this.isOpen!==open&&event&&this.isOpenChange.emit(open),open){if(event&&this.onOpen.emit(event),this.autoAlign){if(this.caretRef){const computedStyle=getComputedStyle(this.caretRef),offset=computedStyle.getPropertyValue("--cds-popover-offset"),height=computedStyle.getPropertyValue("--cds-popover-caret-height");this.caretOffset=(offset?.includes("px")?Number(offset.split("px",1)[0]):16*Number(offset.split("rem",1)[0]))||10,this.caretHeight=(height?.includes("px")?Number(height.split("px",1)[0]):16*Number(height.split("rem",1)[0]))||6}this.elementRef.nativeElement&&this.popoverContentRef&&(this.unmountFloatingElement=(0,floating_ui_dom.Me)(this.elementRef.nativeElement,this.popoverContentRef,this.recomputePosition.bind(this)))}}else this.cleanUp(),event&&this.onClose.emit(event);this.isOpen=open,this.changeDetectorRef.markForCheck()}roundByDPR(value){const dpr=window.devicePixelRatio||1;return Math.round(value*dpr)/dpr}recomputePosition(){var _this=this;this.ngZone.runOutsideAngular((0,asyncToGenerator.Z)((function*(){const{x,y,placement,middlewareData}=yield(0,floating_ui_dom.oo)(_this.elementRef.nativeElement,_this.popoverContentRef,{placement:_this._align,strategy:"fixed",middleware:[(0,floating_ui_core.cv)(_this.caretOffset),(0,floating_ui_dom.RR)({fallbackAxisSideDirection:"start"}),(0,floating_ui_dom.x7)({element:_this.caretRef})]}),previousAlignment=_this._align;if(_this._align=placement,_this.updateAlignmentClass(_this._align,previousAlignment),Object.assign(_this.popoverContentRef.style,{position:"fixed",top:"0",left:"0",transform:`translate(${_this.roundByDPR(x)}px,${_this.roundByDPR(y)}px)`}),middlewareData.arrow){const{x:arrowX,y:arrowY}=middlewareData.arrow,staticSide={top:"bottom",right:"left",bottom:"top",left:"right"}[placement.split("-")[0]];_this.caretRef.style.left=null!=arrowX?`${arrowX}px`:"",_this.caretRef.style.top=null!=arrowY?`${arrowY}px`:"",_this.caretRef.style.right="",_this.caretRef.style.bottom="",staticSide&&(_this.caretRef.style[staticSide]=-_this.caretHeight+"px")}})))}ngOnChanges(changes){const originalState=this.isOpen;this.handleChange(!1),changes.autoAlign&&!changes.autoAlign.firstChange&&(this.popoverContentRef=this.elementRef.nativeElement.querySelector(".cds--popover-content"),this.popoverContentRef.setAttribute("style",""),this.caretRef=this.elementRef.nativeElement.querySelector("span.cds--popover-caret")),this.handleChange(originalState)}ngAfterViewInit(){this.initializeReferences()}initializeReferences(){this.updateAlignmentClass(this._align),this.popoverContentRef=this.elementRef.nativeElement.querySelector(".cds--popover-content"),this.caretRef=this.elementRef.nativeElement.querySelector("span.cds--popover-caret"),this.handleChange(this.isOpen)}ngOnDestroy(){this.cleanUp()}cleanUp(){this.unmountFloatingElement&&this.unmountFloatingElement(),this.unmountFloatingElement=void 0}updateAlignmentClass(newAlignment,previousAlignment){if(this.elementRef.nativeElement&&previousAlignment!==newAlignment){const regexp=new RegExp("right|top|left|bottom");this.elementRef.nativeElement.classList.forEach((className=>{regexp.test(className)&&this.renderer.removeClass(this.elementRef.nativeElement,`${className}`)})),this.renderer.addClass(this.elementRef.nativeElement,`${this.alignmentClassPrefix}${newAlignment}`)}}};PopoverContainer.ctorParameters=()=>[{type:core.ElementRef},{type:core.NgZone},{type:core.Renderer2},{type:core.ChangeDetectorRef}],PopoverContainer.propDecorators={align:[{type:core.Input}],onClose:[{type:core.Output}],onOpen:[{type:core.Output}],isOpenChange:[{type:core.Output}],caret:[{type:core.HostBinding,args:["class.cds--popover--caret"]},{type:core.Input}],dropShadow:[{type:core.HostBinding,args:["class.cds--popover--drop-shadow"]},{type:core.Input}],highContrast:[{type:core.HostBinding,args:["class.cds--popover--high-contrast"]},{type:core.Input}],autoAlign:[{type:core.HostBinding,args:["class.cds--popover--auto-align"]},{type:core.Input}],containerClass:[{type:core.HostBinding,args:["class.cds--popover-container"]}],isOpen:[{type:core.Input},{type:core.HostBinding,args:["class.cds--popover--open"]}]},PopoverContainer=(0,tslib_es6.gn)([(0,core.Directive)({selector:"[cdsPopover], [ibmPopover]"})],PopoverContainer);let PopoverContent=class PopoverContent{constructor(changeDetectorRef){this.changeDetectorRef=changeDetectorRef,this.popoverClass=!0,this.autoAlign=!1}ngAfterViewInit(){this.popoverContent&&(this.autoAlign=!!this.popoverContent.nativeElement.closest(".cds--popover--auto-align"),this.changeDetectorRef.detectChanges())}};PopoverContent.ctorParameters=()=>[{type:core.ChangeDetectorRef}],PopoverContent.propDecorators={popoverClass:[{type:core.HostBinding,args:["class.cds--popover"]}],popoverContent:[{type:core.ViewChild,args:["content"]}]},PopoverContent=(0,tslib_es6.gn)([(0,core.Component)({selector:"cds-popover-content, ibm-popover-content",template:'\n\t\t<span class="cds--popover-content" #content>\n\t\t\t<div>\n\t\t\t\t<ng-content></ng-content>\n\t\t\t</div>\n\t\t\t<span *ngIf="autoAlign" class="cds--popover-caret cds--popover--auto-align"></span>\n\t\t</span>\n\t\t<span *ngIf="!autoAlign" class="cds--popover-caret"></span>\n\t'})],PopoverContent);var common=__webpack_require__("./node_modules/@angular/common/fesm2020/common.mjs");let PopoverModule=class PopoverModule{};PopoverModule=(0,tslib_es6.gn)([(0,core.NgModule)({declarations:[PopoverContainer,PopoverContent],exports:[PopoverContainer,PopoverContent],imports:[common.CommonModule]})],PopoverModule)},"./src/tooltip/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{u:()=>Tooltip,vD:()=>TooltipDefinition,z8:()=>TooltipModule});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.js"),core=__webpack_require__("./node_modules/@angular/core/fesm2020/core.mjs"),popover=__webpack_require__("./src/popover/index.ts");let Tooltip=class Tooltip extends popover.OI{constructor(elementRef,ngZone,renderer,changeDetectorRef){super(elementRef,ngZone,renderer,changeDetectorRef),this.elementRef=elementRef,this.ngZone=ngZone,this.renderer=renderer,this.changeDetectorRef=changeDetectorRef,this.tooltipClass=!0,this.id="tooltip-"+Tooltip.tooltipCount++,this.enterDelayMs=100,this.leaveDelayMs=300,this.disabled=!1,this.highContrast=!0,this.dropShadow=!1}mouseenter(event){clearTimeout(this.timeoutId),this.timeoutId=setTimeout((()=>{this.handleChange(!0,event)}),this.enterDelayMs)}mouseleave(event){clearTimeout(this.timeoutId),this.timeoutId=setTimeout((()=>{this.handleChange(!1,event)}),this.leaveDelayMs)}hostkeys(event){open&&"Escape"===event.key&&(event.stopPropagation(),this.handleChange(!1,event))}handleFocus(event){this.handleChange(!0,event)}handleFocusOut(event){this.handleChange(!1,event)}isTemplate(value){return value instanceof core.TemplateRef}ngAfterContentChecked(){if(this.wrapper){const buttonElement=this.wrapper.nativeElement.querySelector("button");buttonElement&&!buttonElement.getAttribute("aria-labelledby")&&buttonElement.setAttribute("aria-labelledby",this.id)}}};Tooltip.tooltipCount=0,Tooltip.ctorParameters=()=>[{type:core.ElementRef},{type:core.NgZone},{type:core.Renderer2},{type:core.ChangeDetectorRef}],Tooltip.propDecorators={tooltipClass:[{type:core.HostBinding,args:["class.cds--tooltip"]}],id:[{type:core.Input}],enterDelayMs:[{type:core.Input}],leaveDelayMs:[{type:core.Input}],disabled:[{type:core.Input}],description:[{type:core.Input}],templateContext:[{type:core.Input}],wrapper:[{type:core.ViewChild,args:["contentWrapper"]}],mouseenter:[{type:core.HostListener,args:["mouseenter",["$event"]]}],mouseleave:[{type:core.HostListener,args:["mouseleave",["$event"]]}],hostkeys:[{type:core.HostListener,args:["keyup",["$event"]]}],handleFocus:[{type:core.HostListener,args:["focusin",["$event"]]}],handleFocusOut:[{type:core.HostListener,args:["focusout",["$event"]]}]},Tooltip=(0,tslib_es6.gn)([(0,core.Component)({selector:"cds-tooltip, ibm-tooltip",changeDetection:core.ChangeDetectionStrategy.OnPush,template:'\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'})],Tooltip);let TooltipDefinition=class TooltipDefinition extends popover.OI{constructor(elementRef,ngZone,renderer,changeDetectorRef){super(elementRef,ngZone,renderer,changeDetectorRef),this.elementRef=elementRef,this.ngZone=ngZone,this.renderer=renderer,this.changeDetectorRef=changeDetectorRef,this.id="tooltip-definition-"+TooltipDefinition.tooltipCount++,this.highContrast=!0,this.dropShadow=!1}onBlur(event){this.handleChange(!1,event)}onClick(event){this.handleChange(!this.isOpen,event)}hostkeys(event){this.isOpen&&"Escape"===event.key&&(event.stopPropagation(),this.handleChange(!1,event))}mouseleave(event){this.handleChange(!1,event)}isTemplate(value){return value instanceof core.TemplateRef}};TooltipDefinition.tooltipCount=0,TooltipDefinition.ctorParameters=()=>[{type:core.ElementRef},{type:core.NgZone},{type:core.Renderer2},{type:core.ChangeDetectorRef}],TooltipDefinition.propDecorators={id:[{type:core.Input}],description:[{type:core.Input}],templateContext:[{type:core.Input}],hostkeys:[{type:core.HostListener,args:["keyup",["$event"]]}],mouseleave:[{type:core.HostListener,args:["mouseleave",["$event"]]}]},TooltipDefinition=(0,tslib_es6.gn)([(0,core.Component)({selector:"cds-tooltip-definition, ibm-tooltip-definition",changeDetection:core.ChangeDetectionStrategy.OnPush,template:'\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(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">\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'})],TooltipDefinition);var common=__webpack_require__("./node_modules/@angular/common/fesm2020/common.mjs");let TooltipModule=class TooltipModule{};TooltipModule=(0,tslib_es6.gn)([(0,core.NgModule)({declarations:[Tooltip,TooltipDefinition],exports:[Tooltip,TooltipDefinition],imports:[common.CommonModule,popover.UU]})],TooltipModule)},"./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/tooltip.stories.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Basic:()=>Basic,Ellipses:()=>Ellipses,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/Tooltip",decorators:[(0,_storybook_angular__WEBPACK_IMPORTED_MODULE_0__.moduleMetadata)({imports:[___WEBPACK_IMPORTED_MODULE_1__.z8]})],args:{isOpen:!0,caret:!0,description:"Occassionally, services are updated in a specified time window to ensure no down time for customers.",align:"bottom",autoAlign:!1},argTypes:{autoAlign:{control:!1},onOpen:{control:"Opened!"},onClose:{control:"Closed!"},isOpenChange:{control:"Is Open Change!"},align:{options:["top","top-start","top-end","right","right-start","right-end","bottom","bottom-start","bottom-end","left","left-start","left-end"],control:"select"}},component:___WEBPACK_IMPORTED_MODULE_1__.u},Basic=(args=>({props:args,template:'\n <cds-tooltip\n [isOpen]="isOpen"\n [caret]="caret"\n [align]="align"\n (onOpen)="onOpen($event)"\n (onClose)="onClose($event)"\n (isOpenChange)="isOpenChange($event)"\n [description]="description">\n <button type="button" class="tooltip-trigger">\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 </cds-tooltip>\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,iframeHeight:"18rem"}},layout:"centered"};const Ellipses=(args=>({props:args,template:'\n <cds-tooltip\n [isOpen]="isOpen"\n [caret]="caret"\n [align]="align"\n description="Tooltip for ellipsis because I can and I am really really long">\n <span class="overflowText">\n Tooltip for ellipsis because I can and I am really really long\n </span>\n </cds-tooltip>\n ',styles:["\n .overflowText {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n width: 100px;\n display: inline-block;\n }\n "]})).bind({});Ellipses.argTypes={description:{control:!1}},Ellipses.parameters={docs:{story:{inline:!1,iframeHeight:"18rem"}},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 <cds-tooltip\n [isOpen]="isOpen"\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 <button type="button" class="tooltip-trigger">\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 </cds-tooltip>\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 <cds-tooltip\n [isOpen]="isOpen"\n [caret]="caret"\n [align]="align"\n (onOpen)="onOpen($event)"\n (onClose)="onClose($event)"\n (isOpenChange)="isOpenChange($event)"\n [description]="description">\n <button type="button" class="tooltip-trigger">\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 </cds-tooltip>\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}}},Ellipses.parameters={...Ellipses.parameters,docs:{...Ellipses.parameters?.docs,source:{originalSource:'args => ({\n props: args,\n template: `\n <cds-tooltip\n [isOpen]="isOpen"\n [caret]="caret"\n [align]="align"\n description="Tooltip for ellipsis because I can and I am really really long">\n <span class="overflowText">\n Tooltip for ellipsis because I can and I am really really long\n </span>\n </cds-tooltip>\n `,\n styles: [`\n .overflowText {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n width: 100px;\n display: inline-block;\n }\n `]\n})',...Ellipses.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 <cds-tooltip\n [isOpen]="isOpen"\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 <button type="button" class="tooltip-trigger">\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 </cds-tooltip>\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","Ellipses","WithAutoAlign"]}}]);
|
|
@@ -36,12 +36,18 @@ export class Tooltip extends PopoverContainer {
|
|
|
36
36
|
this.dropShadow = false;
|
|
37
37
|
}
|
|
38
38
|
mouseenter(event) {
|
|
39
|
-
|
|
39
|
+
// If a mouseleave is triggered before the tooltip is displayed (before setTimeout of mouseenter completes)
|
|
40
|
+
// we trigger the mouseleave only avoiding having to unecessary show the tooltip
|
|
41
|
+
clearTimeout(this.timeoutId);
|
|
42
|
+
this.timeoutId = setTimeout(() => {
|
|
40
43
|
this.handleChange(true, event);
|
|
41
44
|
}, this.enterDelayMs);
|
|
42
45
|
}
|
|
43
46
|
mouseleave(event) {
|
|
44
|
-
|
|
47
|
+
// If a mouseleave is triggered before the tooltip is displayed (before setTimeout of mouseenter completes)
|
|
48
|
+
// we trigger the mouseleave only avoiding having to unecessary show the tooltip
|
|
49
|
+
clearTimeout(this.timeoutId);
|
|
50
|
+
this.timeoutId = setTimeout(() => {
|
|
45
51
|
this.handleChange(false, event);
|
|
46
52
|
}, this.leaveDelayMs);
|
|
47
53
|
}
|
|
@@ -155,4 +161,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
155
161
|
type: HostListener,
|
|
156
162
|
args: ["focusout", ["$event"]]
|
|
157
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2ZUVsZW1lbnQucXVlcnlTZWxlY3RvcihcImJ1dHRvblwiKTtcblx0XHRcdGlmIChidXR0b25FbGVtZW50ICYmICFidXR0b25FbGVtZW50LmdldEF0dHJpYnV0ZShcImFyaWEtbGFiZWxsZWRieVwiKSkge1xuXHRcdFx0XHRidXR0b25FbGVtZW50LnNldEF0dHJpYnV0ZShcImFyaWEtbGFiZWxsZWRieVwiLCB0aGlzLmlkKTtcblx0XHRcdH1cblx0XHR9XG5cdH1cbn1cbiJdfQ==
|
|
@@ -51,12 +51,18 @@ class Tooltip extends PopoverContainer {
|
|
|
51
51
|
this.dropShadow = false;
|
|
52
52
|
}
|
|
53
53
|
mouseenter(event) {
|
|
54
|
-
|
|
54
|
+
// If a mouseleave is triggered before the tooltip is displayed (before setTimeout of mouseenter completes)
|
|
55
|
+
// we trigger the mouseleave only avoiding having to unecessary show the tooltip
|
|
56
|
+
clearTimeout(this.timeoutId);
|
|
57
|
+
this.timeoutId = setTimeout(() => {
|
|
55
58
|
this.handleChange(true, event);
|
|
56
59
|
}, this.enterDelayMs);
|
|
57
60
|
}
|
|
58
61
|
mouseleave(event) {
|
|
59
|
-
|
|
62
|
+
// If a mouseleave is triggered before the tooltip is displayed (before setTimeout of mouseenter completes)
|
|
63
|
+
// we trigger the mouseleave only avoiding having to unecessary show the tooltip
|
|
64
|
+
clearTimeout(this.timeoutId);
|
|
65
|
+
this.timeoutId = setTimeout(() => {
|
|
60
66
|
this.handleChange(false, event);
|
|
61
67
|
}, this.leaveDelayMs);
|
|
62
68
|
}
|
|
@@ -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\tRenderer2,\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 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\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\tsetTimeout(() => {\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\tsetTimeout(() => {\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 * 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(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\">\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\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\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;;;ACxClB;;;;;;;;AAQG;AAyBG,MAAO,OAAQ,SAAQ,gBAAgB,CAAA;AA6B5C,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;AAC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AAA,CAAA;sBADT,YAAY;uBAAC,YAAY,EAAE,CAAC,QAAQ,CAAC,CAAA;;;MCzE1B,aAAa,CAAA;;0GAAb,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAb,aAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,iBATxB,OAAO;AACP,QAAA,iBAAiB,CAMR,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,aAAa,aAHpC,OAAO;QACP,iBAAiB,CAAA,EAAA,CAAA,CAAA;2GAIN,aAAa,EAAA,OAAA,EAAA,CAFf,YAAY,EAAE,aAAa,CAAA,EAAA,CAAA,CAAA;2FAEzB,aAAa,EAAA,UAAA,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;;;;"}
|
|
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\tRenderer2,\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 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 * 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(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\">\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\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\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;;;ACxClB;;;;;;;;AAQG;AAyBG,MAAO,OAAQ,SAAQ,gBAAgB,CAAA;AA+B5C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;;;"}
|
|
@@ -51,12 +51,18 @@ class Tooltip extends PopoverContainer {
|
|
|
51
51
|
this.dropShadow = false;
|
|
52
52
|
}
|
|
53
53
|
mouseenter(event) {
|
|
54
|
-
|
|
54
|
+
// If a mouseleave is triggered before the tooltip is displayed (before setTimeout of mouseenter completes)
|
|
55
|
+
// we trigger the mouseleave only avoiding having to unecessary show the tooltip
|
|
56
|
+
clearTimeout(this.timeoutId);
|
|
57
|
+
this.timeoutId = setTimeout(() => {
|
|
55
58
|
this.handleChange(true, event);
|
|
56
59
|
}, this.enterDelayMs);
|
|
57
60
|
}
|
|
58
61
|
mouseleave(event) {
|
|
59
|
-
|
|
62
|
+
// If a mouseleave is triggered before the tooltip is displayed (before setTimeout of mouseenter completes)
|
|
63
|
+
// we trigger the mouseleave only avoiding having to unecessary show the tooltip
|
|
64
|
+
clearTimeout(this.timeoutId);
|
|
65
|
+
this.timeoutId = setTimeout(() => {
|
|
60
66
|
this.handleChange(false, event);
|
|
61
67
|
}, this.leaveDelayMs);
|
|
62
68
|
}
|
|
@@ -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\tRenderer2,\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 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\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\tsetTimeout(() => {\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\tsetTimeout(() => {\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 * 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(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\">\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\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\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;;;ACxClB;;;;;;;;AAQG;AAyBG,MAAO,OAAQ,SAAQ,gBAAgB,CAAA;AA6B5C,IAAA,WAAA,CACW,UAAsB,EACtB,MAAc,EACd,QAAmB,EACnB,iBAAoC,EAAA;QAE9C,KAAK,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,iBAAiB,CAAC,CAAC;QAL7C,IAAU,CAAA,UAAA,GAAV,UAAU,CAAY;QACtB,IAAM,CAAA,MAAA,GAAN,MAAM,CAAQ;QACd,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAW;QACnB,IAAiB,CAAA,iBAAA,GAAjB,iBAAiB,CAAmB;QA9BZ,IAAY,CAAA,YAAA,GAAG,IAAI,CAAC;AAE9C,QAAA,IAAA,CAAA,EAAE,GAAG,CAAW,QAAA,EAAA,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC;AAClD;;AAEG;QACM,IAAY,CAAA,YAAA,GAAG,GAA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,iBAAiB,CAMR,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,aAAa,aAHpC,OAAO;QACP,iBAAiB,CAAA,EAAA,CAAA,CAAA;2GAIN,aAAa,EAAA,OAAA,EAAA,CAFf,YAAY,EAAE,aAAa,CAAA,EAAA,CAAA,CAAA;2FAEzB,aAAa,EAAA,UAAA,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;AACtC,iBAAA,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\tRenderer2,\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 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 * 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(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\">\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\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\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;;;ACxClB;;;;;;;;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;QAL7C,IAAU,CAAA,UAAA,GAAV,UAAU,CAAY;QACtB,IAAM,CAAA,MAAA,GAAN,MAAM,CAAQ;QACd,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAW;QACnB,IAAiB,CAAA,iBAAA,GAAjB,iBAAiB,CAAmB;QAhCZ,IAAY,CAAA,YAAA,GAAG,IAAI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AC,QAAQ,CAAC,CAAA;;;MCzE1B,aAAa,CAAA;;0GAAb,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAb,aAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,iBATxB,OAAO;AACP,QAAA,iBAAiB,CAMR,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,aAAa,aAHpC,OAAO;QACP,iBAAiB,CAAA,EAAA,CAAA,CAAA;2GAIN,aAAa,EAAA,OAAA,EAAA,CAFf,YAAY,EAAE,aAAa,CAAA,EAAA,CAAA,CAAA;2FAEzB,aAAa,EAAA,UAAA,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;AACtC,iBAAA,CAAA;;;ACjBD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -59,6 +59,7 @@ export declare class Tooltip extends PopoverContainer implements AfterContentChe
|
|
|
59
59
|
*/
|
|
60
60
|
templateContext: any;
|
|
61
61
|
wrapper: ElementRef<HTMLSpanElement>;
|
|
62
|
+
private timeoutId;
|
|
62
63
|
constructor(elementRef: ElementRef, ngZone: NgZone, renderer: Renderer2, changeDetectorRef: ChangeDetectorRef);
|
|
63
64
|
mouseenter(event: any): void;
|
|
64
65
|
mouseleave(event: any): void;
|