@ukic/canary-web-components 2.0.0-canary.19 → 2.0.0-canary.20

Sign up to get free protection for your applications and to get access to all the features.
Files changed (186) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/ic-accordion-group.cjs.entry.js +1 -1
  3. package/dist/cjs/ic-accordion-group.cjs.entry.js.map +1 -1
  4. package/dist/cjs/ic-accordion.cjs.entry.js +2 -2
  5. package/dist/cjs/ic-accordion.cjs.entry.js.map +1 -1
  6. package/dist/cjs/ic-back-to-top.cjs.entry.js +7 -1
  7. package/dist/cjs/ic-back-to-top.cjs.entry.js.map +1 -1
  8. package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
  9. package/dist/cjs/ic-breadcrumb.cjs.entry.js.map +1 -1
  10. package/dist/cjs/ic-button_3.cjs.entry.js +23 -1
  11. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  12. package/dist/cjs/ic-card.cjs.entry.js +1 -1
  13. package/dist/cjs/ic-card.cjs.entry.js.map +1 -1
  14. package/dist/cjs/ic-footer-link-group.cjs.entry.js +2 -2
  15. package/dist/cjs/ic-footer-link-group.cjs.entry.js.map +1 -1
  16. package/dist/cjs/ic-footer-link.cjs.entry.js +2 -2
  17. package/dist/cjs/ic-footer-link.cjs.entry.js.map +1 -1
  18. package/dist/cjs/ic-footer.cjs.entry.js +1 -1
  19. package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
  20. package/dist/cjs/ic-link.cjs.entry.js +1 -1
  21. package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
  22. package/dist/cjs/ic-page-header.cjs.entry.js +3 -3
  23. package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
  24. package/dist/cjs/ic-pagination_4.cjs.entry.js +2 -3
  25. package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
  26. package/dist/cjs/ic-side-navigation.cjs.entry.js +1 -1
  27. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  28. package/dist/cjs/ic-status-tag.cjs.entry.js +2 -1
  29. package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
  30. package/dist/cjs/ic-stepper.cjs.entry.js.map +1 -1
  31. package/dist/cjs/ic-tab-context.cjs.entry.js +2 -2
  32. package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
  33. package/dist/cjs/ic-tab.cjs.entry.js +1 -1
  34. package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
  35. package/dist/cjs/ic-top-navigation.cjs.entry.js +2 -2
  36. package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
  37. package/dist/cjs/ic-typography.cjs.entry.js +1 -1
  38. package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
  39. package/dist/cjs/loader.cjs.js +1 -1
  40. package/dist/collection/components/ic-data-table/story-data.js +4 -4
  41. package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
  42. package/dist/collection/components/ic-date-input/test/basic/ic-date-input.spec.js +4 -4
  43. package/dist/collection/components/ic-date-input/test/basic/ic-date-input.spec.js.map +1 -1
  44. package/dist/collection/components/ic-menu-with-multi/test/basic/ic-menu.spec.js +3 -3
  45. package/dist/collection/components/ic-menu-with-multi/test/basic/ic-menu.spec.js.map +1 -1
  46. package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.e2e.js +1 -1
  47. package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.e2e.js.map +1 -1
  48. package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.spec.js +1 -1
  49. package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.spec.js.map +1 -1
  50. package/dist/components/ic-accordion-group.js +1 -1
  51. package/dist/components/ic-accordion-group.js.map +1 -1
  52. package/dist/components/ic-accordion.js +2 -2
  53. package/dist/components/ic-accordion.js.map +1 -1
  54. package/dist/components/ic-back-to-top.js +7 -1
  55. package/dist/components/ic-back-to-top.js.map +1 -1
  56. package/dist/components/ic-breadcrumb2.js +1 -1
  57. package/dist/components/ic-breadcrumb2.js.map +1 -1
  58. package/dist/components/ic-button2.js +14 -1
  59. package/dist/components/ic-button2.js.map +1 -1
  60. package/dist/components/ic-card.js +1 -1
  61. package/dist/components/ic-card.js.map +1 -1
  62. package/dist/components/ic-footer-link-group.js +2 -2
  63. package/dist/components/ic-footer-link-group.js.map +1 -1
  64. package/dist/components/ic-footer-link.js +2 -2
  65. package/dist/components/ic-footer-link.js.map +1 -1
  66. package/dist/components/ic-footer.js +1 -1
  67. package/dist/components/ic-footer.js.map +1 -1
  68. package/dist/components/ic-link2.js +1 -1
  69. package/dist/components/ic-link2.js.map +1 -1
  70. package/dist/components/ic-page-header.js +3 -3
  71. package/dist/components/ic-page-header.js.map +1 -1
  72. package/dist/components/ic-side-navigation.js +1 -1
  73. package/dist/components/ic-side-navigation.js.map +1 -1
  74. package/dist/components/ic-status-tag.js +2 -1
  75. package/dist/components/ic-status-tag.js.map +1 -1
  76. package/dist/components/ic-stepper.js.map +1 -1
  77. package/dist/components/ic-tab-context.js +2 -2
  78. package/dist/components/ic-tab-context.js.map +1 -1
  79. package/dist/components/ic-tab.js +1 -1
  80. package/dist/components/ic-tab.js.map +1 -1
  81. package/dist/components/ic-text-field2.js +2 -3
  82. package/dist/components/ic-text-field2.js.map +1 -1
  83. package/dist/components/ic-tooltip2.js +11 -1
  84. package/dist/components/ic-tooltip2.js.map +1 -1
  85. package/dist/components/ic-top-navigation.js +2 -2
  86. package/dist/components/ic-top-navigation.js.map +1 -1
  87. package/dist/components/ic-typography2.js +1 -1
  88. package/dist/components/ic-typography2.js.map +1 -1
  89. package/dist/core/core.esm.js +1 -1
  90. package/dist/core/core.esm.js.map +1 -1
  91. package/dist/core/p-0a99994a.entry.js.map +1 -1
  92. package/dist/core/{p-88e076fd.entry.js → p-0b14be10.entry.js} +2 -2
  93. package/dist/core/p-0b14be10.entry.js.map +1 -0
  94. package/dist/core/{p-64ae50d3.entry.js → p-0cdd4c93.entry.js} +2 -2
  95. package/dist/core/p-0cdd4c93.entry.js.map +1 -0
  96. package/dist/core/{p-1ba9cd3d.entry.js → p-14b363d0.entry.js} +2 -2
  97. package/dist/core/p-14b363d0.entry.js.map +1 -0
  98. package/dist/core/p-2b9b9f6e.entry.js +2 -0
  99. package/dist/core/p-2b9b9f6e.entry.js.map +1 -0
  100. package/dist/core/p-3ba4335c.entry.js +2 -0
  101. package/dist/core/p-3ba4335c.entry.js.map +1 -0
  102. package/dist/core/{p-5ed65e8f.entry.js → p-4883e147.entry.js} +2 -2
  103. package/dist/core/{p-5ed65e8f.entry.js.map → p-4883e147.entry.js.map} +1 -1
  104. package/dist/core/p-4c57eef0.entry.js +2 -0
  105. package/dist/core/p-4c57eef0.entry.js.map +1 -0
  106. package/dist/core/{p-57c5ff2c.entry.js → p-60ca1000.entry.js} +2 -2
  107. package/dist/core/p-60ca1000.entry.js.map +1 -0
  108. package/dist/core/p-6a7a5ed5.entry.js +2 -0
  109. package/dist/core/p-6a7a5ed5.entry.js.map +1 -0
  110. package/dist/core/p-6cf5343b.entry.js +2 -0
  111. package/dist/core/p-6cf5343b.entry.js.map +1 -0
  112. package/dist/core/p-7168b71a.entry.js +2 -0
  113. package/dist/core/p-7168b71a.entry.js.map +1 -0
  114. package/dist/core/{p-5c819adb.entry.js → p-781e8391.entry.js} +2 -2
  115. package/dist/core/p-781e8391.entry.js.map +1 -0
  116. package/dist/core/p-92a858f7.entry.js.map +1 -1
  117. package/dist/core/p-992b6161.entry.js.map +1 -1
  118. package/dist/core/{p-4670ebd3.entry.js → p-a1369740.entry.js} +2 -2
  119. package/dist/core/p-a1369740.entry.js.map +1 -0
  120. package/dist/core/{p-cd3c10f1.entry.js → p-a484c41c.entry.js} +2 -2
  121. package/dist/core/p-a484c41c.entry.js.map +1 -0
  122. package/dist/core/p-cb15d0b6.entry.js +2 -0
  123. package/dist/core/p-cb15d0b6.entry.js.map +1 -0
  124. package/dist/core/p-e1e04f34.entry.js.map +1 -1
  125. package/dist/esm/core.js +1 -1
  126. package/dist/esm/ic-accordion-group.entry.js +1 -1
  127. package/dist/esm/ic-accordion-group.entry.js.map +1 -1
  128. package/dist/esm/ic-accordion.entry.js +2 -2
  129. package/dist/esm/ic-accordion.entry.js.map +1 -1
  130. package/dist/esm/ic-back-to-top.entry.js +7 -1
  131. package/dist/esm/ic-back-to-top.entry.js.map +1 -1
  132. package/dist/esm/ic-breadcrumb.entry.js +1 -1
  133. package/dist/esm/ic-breadcrumb.entry.js.map +1 -1
  134. package/dist/esm/ic-button_3.entry.js +23 -1
  135. package/dist/esm/ic-button_3.entry.js.map +1 -1
  136. package/dist/esm/ic-card.entry.js +1 -1
  137. package/dist/esm/ic-card.entry.js.map +1 -1
  138. package/dist/esm/ic-footer-link-group.entry.js +2 -2
  139. package/dist/esm/ic-footer-link-group.entry.js.map +1 -1
  140. package/dist/esm/ic-footer-link.entry.js +2 -2
  141. package/dist/esm/ic-footer-link.entry.js.map +1 -1
  142. package/dist/esm/ic-footer.entry.js +1 -1
  143. package/dist/esm/ic-footer.entry.js.map +1 -1
  144. package/dist/esm/ic-link.entry.js +1 -1
  145. package/dist/esm/ic-link.entry.js.map +1 -1
  146. package/dist/esm/ic-page-header.entry.js +3 -3
  147. package/dist/esm/ic-page-header.entry.js.map +1 -1
  148. package/dist/esm/ic-pagination_4.entry.js +2 -3
  149. package/dist/esm/ic-pagination_4.entry.js.map +1 -1
  150. package/dist/esm/ic-side-navigation.entry.js +1 -1
  151. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  152. package/dist/esm/ic-status-tag.entry.js +2 -1
  153. package/dist/esm/ic-status-tag.entry.js.map +1 -1
  154. package/dist/esm/ic-stepper.entry.js.map +1 -1
  155. package/dist/esm/ic-tab-context.entry.js +2 -2
  156. package/dist/esm/ic-tab-context.entry.js.map +1 -1
  157. package/dist/esm/ic-tab.entry.js +1 -1
  158. package/dist/esm/ic-tab.entry.js.map +1 -1
  159. package/dist/esm/ic-top-navigation.entry.js +2 -2
  160. package/dist/esm/ic-top-navigation.entry.js.map +1 -1
  161. package/dist/esm/ic-typography.entry.js +1 -1
  162. package/dist/esm/ic-typography.entry.js.map +1 -1
  163. package/dist/esm/loader.js +1 -1
  164. package/hydrate/index.js +57 -28
  165. package/package.json +3 -3
  166. package/dist/core/p-1ba9cd3d.entry.js.map +0 -1
  167. package/dist/core/p-4670ebd3.entry.js.map +0 -1
  168. package/dist/core/p-57c5ff2c.entry.js.map +0 -1
  169. package/dist/core/p-5c819adb.entry.js.map +0 -1
  170. package/dist/core/p-64ae50d3.entry.js.map +0 -1
  171. package/dist/core/p-66bfe89d.entry.js +0 -2
  172. package/dist/core/p-66bfe89d.entry.js.map +0 -1
  173. package/dist/core/p-768fe0a9.entry.js +0 -2
  174. package/dist/core/p-768fe0a9.entry.js.map +0 -1
  175. package/dist/core/p-88e076fd.entry.js.map +0 -1
  176. package/dist/core/p-a0aa587b.entry.js +0 -2
  177. package/dist/core/p-a0aa587b.entry.js.map +0 -1
  178. package/dist/core/p-cd3c10f1.entry.js.map +0 -1
  179. package/dist/core/p-d6b27926.entry.js +0 -2
  180. package/dist/core/p-d6b27926.entry.js.map +0 -1
  181. package/dist/core/p-ebe9172b.entry.js +0 -2
  182. package/dist/core/p-ebe9172b.entry.js.map +0 -1
  183. package/dist/core/p-f04af6fd.entry.js +0 -2
  184. package/dist/core/p-f04af6fd.entry.js.map +0 -1
  185. package/dist/core/p-f847a970.entry.js +0 -2
  186. package/dist/core/p-f847a970.entry.js.map +0 -1
@@ -18,6 +18,9 @@ const BackToTop = class {
18
18
  constructor(hostRef) {
19
19
  index.registerInstance(this, hostRef);
20
20
  this.topObserver = null;
21
+ this.getObservedEl = () => {
22
+ return document.querySelector("#ic-back-to-top-target");
23
+ };
21
24
  this.setTargetElVisible = (visible) => {
22
25
  this.targetElVisible = visible;
23
26
  };
@@ -50,7 +53,7 @@ const BackToTop = class {
50
53
  let objParent;
51
54
  //remove old element & observer
52
55
  if (this.topObserver !== null) {
53
- const observedEl = document.querySelector("#ic-back-to-top-target");
56
+ const observedEl = this.getObservedEl();
54
57
  if (observedEl !== null) {
55
58
  this.topObserver.unobserve(observedEl);
56
59
  observedEl.remove();
@@ -68,6 +71,7 @@ const BackToTop = class {
68
71
  //insert a new 0px height element before specified target that can be used to determine when page is scrolled
69
72
  const objBackToTopTargetEl = document.createElement("div");
70
73
  objBackToTopTargetEl.setAttribute("id", "ic-back-to-top-target");
74
+ objBackToTopTargetEl.setAttribute("tabindex", "-1"); // Needed for virtual cursor behaviour to work
71
75
  objParent.insertBefore(objBackToTopTargetEl, this.targetEl);
72
76
  // resize observer needs to factor in any top margin on the target el
73
77
  const marginTop = getComputedStyle(this.targetEl).marginTop;
@@ -84,6 +88,8 @@ const BackToTop = class {
84
88
  else {
85
89
  this.targetEl.scrollIntoView();
86
90
  }
91
+ // Get virtual cursor to move
92
+ this.getObservedEl().focus();
87
93
  };
88
94
  this.checkForClassificationBanner = () => {
89
95
  //adjust position for classification banner at bottom
@@ -1 +1 @@
1
- {"file":"ic-back-to-top.entry.cjs.js","mappings":";;;;;;;;;;;;;AAAA,MAAM,cAAc,GAAG,m+IAAm+I;;ACG1/I,MAAM,cAAc,GAAG,aAAa,CAAC;MACxB,SAAS;IAClB;;QACI,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QACxB,IAAI,CAAC,kBAAkB,GAAG,CAAC,OAAO;YAC9B,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC;SAClC,CAAC;QACF,IAAI,CAAC,gBAAgB,GAAG,CAAC,OAAO;YAC5B,IAAI,CAAC,4BAA4B,EAAE,CAAC;YACpC,IAAI,CAAC,aAAa;gBACd,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,OAAO,KAAK,CAAC,GAAG,KAAK,GAAG,OAAO,CAAC;SAC/E,CAAC;QACF,IAAI,CAAC,wBAAwB,GAAG,CAAC,OAAO;YACpC,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC;SACtD,CAAC;QACF,IAAI,CAAC,sBAAsB,GAAG,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SACjD;QACD,IAAI,OAAO,CAAC,MAAM,EAAE;YAChB,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;YAC7C,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,GAAG,IAAI,GAAG,CAAC,CAAC;YAC/C,MAAM,cAAc,GAAG,IAAI,oBAAoB,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,SAAS,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;YACzG,cAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;SACpC;KACJ;IACD,gBAAgB;QACZC,wCAAgC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,EAAE,aAAa,CAAC,CAAC;KAChG;IACD,MAAM;QACF,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;QACtC,OAAO,OAAO,KAAK,MAAM,IAAIF,OAAC,CAAC,YAAY,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,EAAE,WAAW,EAAE,CAAC,KAAK,WAAW,EAAE,CAAC,CAAC;KACrJ;IAGD,WAAW,cAAc,KAAK,OAAO,IAAI,CAAC,EAAE;;;;;;;;;;","names":["h","onComponentPropUndefinedChange","onComponentRequiredPropUndefined"],"sources":["../web-components/dist/collection/components/ic-back-to-top/ic-back-to-top.css?tag=ic-back-to-top&encapsulation=shadow","../web-components/dist/collection/components/ic-back-to-top/ic-back-to-top.js"],"sourcesContent":["/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n ========================================================================== */\n\n/**\n * Remove the margin in all browsers.\n */\n\nbody {\n margin: 0;\n}\n\n/**\n * Render the `main` element consistently in IE.\n */\n\nmain {\n display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n box-sizing: content-box; /* 1 */\n height: 0; /* 1 */\n overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\npre {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * Remove the gray background on active links in IE 10.\n */\n\na {\n background-color: transparent;\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n border-bottom: none; /* 1 */\n text-decoration: underline; /* 2 */\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Remove the border on images inside links in IE 10.\n */\n\nimg {\n border-style: none;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput {\n /* 1 */\n overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect {\n /* 1 */\n text-transform: none;\n}\n\n/**\n * Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button;\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * `fieldset` elements in all browsers.\n */\n\nlegend {\n box-sizing: border-box; /* 1 */\n color: inherit; /* 2 */\n display: table; /* 1 */\n max-width: 100%; /* 1 */\n padding: 0; /* 3 */\n white-space: normal; /* 1 */\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\n * Remove the default vertical scrollbar in IE 10+.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type=\"search\"] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n\n[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\n ========================================================================== */\n\n/*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\n\ndetails {\n display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\nsummary {\n display: list-item;\n}\n\n/* Misc\n ========================================================================== */\n\n/**\n * Add the correct display in IE 10+.\n */\n\ntemplate {\n display: none;\n}\n\n/**\n * Add the correct display in IE 10.\n */\n\n[hidden] {\n display: none;\n}\n\nhtml,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font-style: inherit;\n vertical-align: baseline;\n}\n\n\n/**\n * @prop --ic-z-index-back-to-top: z-index of back to top\n */\n\n:host {\n display: block;\n position: absolute;\n right: 0;\n}\n\n.positioning {\n position: fixed;\n right: var(--ic-space-md);\n bottom: var(--ic-space-md);\n transition: visibility 0s linear var(--ic-transition-duration-slow),\n opacity var(--ic-transition-duration-slow);\n z-index: var(--ic-z-index-back-to-top);\n}\n\n.icon-only {\n width: 2.5rem;\n padding: var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs)\n var(--ic-space-xs);\n}\n\n.icon-only .ic-back-to-top-icon {\n padding-left: calc(var(--ic-space-xxxs) + var(--ic-space-1px));\n}\n\nbutton {\n height: 2.5rem;\n align-items: center;\n padding: var(--ic-space-xs) var(--ic-space-md) var(--ic-space-xs)\n var(--ic-space-sm);\n margin: 0;\n gap: var(--ic-space-xs);\n display: flex;\n background-color: var(--ic-architectural-white);\n border: var(--ic-border-width) solid var(--ic-action-default);\n outline-width: inherit;\n box-sizing: border-box;\n box-shadow: var(--ic-elevation-overlay);\n border-radius: 5rem;\n text-decoration: none;\n visibility: hidden;\n opacity: 0;\n cursor: pointer;\n}\n\nbutton:hover {\n text-decoration: none;\n background-color: var(--ic-action-default-bg-hover-no-alpha);\n border: var(--ic-border-width) solid var(--ic-action-default-hover);\n}\n\nbutton:active {\n text-decoration: none;\n background-color: var(--ic-action-default-bg-active-no-alpha);\n border: var(--ic-border-width) solid var(--ic-action-default-active);\n}\n\nbutton:focus {\n box-shadow: var(--ic-border-focus);\n}\n\n.ic-back-to-top-link.show {\n visibility: visible;\n opacity: 1;\n transition: visibility 0s linear 0s,\n opacity var(--ic-transition-duration-slow),\n box-shadow var(--ic-easing-transition-fast);\n}\n\n.ic-back-to-top-link.by-footer {\n position: relative;\n right: var(--ic-space-md);\n bottom: 3.5rem;\n}\n\n.ic-back-to-top-link.offset-banner {\n margin-bottom: var(--ic-space-lg);\n}\n\n.ic-back-to-top-icon {\n fill: var(--ic-action-default);\n padding-left: var(--ic-space-xxs);\n padding-top: var(--ic-space-xxxs);\n}\n\n.ic-back-to-top-icon > svg {\n height: var(--ic-space-md);\n width: var(--ic-space-md);\n display: inline-block;\n}\n\n.ic-back-to-top-link span {\n color: var(--ic-action-default);\n}\n\n.ic-back-to-top-link:hover .ic-back-to-top-icon {\n fill: var(--ic-action-default-hover);\n}\n\n.ic-back-to-top-link:hover span {\n color: var(--ic-action-default-hover);\n}\n\n@media (forced-colors: active) {\n .ic-back-to-top-icon {\n fill: currentcolor;\n }\n}\n","import { h } from \"@stencil/core\";\nimport ArrowUpward from \"./assets/ArrowUpward.svg\";\nimport { onComponentPropUndefinedChange, onComponentRequiredPropUndefined, } from \"../../utils/helpers\";\nconst backToTopLabel = \"Back to top\";\nexport class BackToTop {\n constructor() {\n this.topObserver = null;\n this.setTargetElVisible = (visible) => {\n this.targetElVisible = visible;\n };\n this.setFooterVisible = (visible) => {\n this.checkForClassificationBanner();\n this.footerVisible =\n typeof window !== \"undefined\" && window.scrollY === 0 ? false : visible;\n };\n this.targetElObserverCallback = (entries) => {\n this.setTargetElVisible(entries[0].isIntersecting);\n };\n this.footerObserverCallback = (entries) => {\n this.setFooterVisible(entries[0].isIntersecting);\n };\n this.findTargetEl = (target) => {\n let targetElement = null;\n if (target === null || target === undefined) {\n console.log(\"Error: No target ID specified for back to top component - defaulting to top of page\");\n }\n else {\n targetElement = document.querySelector(`${target.startsWith(\"#\") ? \"\" : \"#\"}${target}`);\n if (targetElement === null) {\n console.log(`Error: Back to top target element '${target}' not found - defaulting to top of page`);\n }\n }\n return targetElement;\n };\n this.createTopObserver = (target) => {\n this.targetEl = this.findTargetEl(target);\n let objParent;\n //remove old element & observer\n if (this.topObserver !== null) {\n const observedEl = document.querySelector(\"#ic-back-to-top-target\");\n if (observedEl !== null) {\n this.topObserver.unobserve(observedEl);\n observedEl.remove();\n }\n }\n if (this.targetEl === null) {\n objParent = document.body;\n this.targetEl = objParent.firstElementChild;\n this.isTargetElNull = true;\n }\n else {\n objParent = this.targetEl.parentNode;\n this.isTargetElNull = false;\n }\n //insert a new 0px height element before specified target that can be used to determine when page is scrolled\n const objBackToTopTargetEl = document.createElement(\"div\");\n objBackToTopTargetEl.setAttribute(\"id\", \"ic-back-to-top-target\");\n objParent.insertBefore(objBackToTopTargetEl, this.targetEl);\n // resize observer needs to factor in any top margin on the target el\n const marginTop = getComputedStyle(this.targetEl).marginTop;\n this.topObserver = new IntersectionObserver(this.targetElObserverCallback, {\n threshold: [0],\n rootMargin: `${marginTop} 0px 0px 0px`,\n });\n this.topObserver.observe(objBackToTopTargetEl);\n };\n this.handleClick = () => {\n if (this.isTargetElNull) {\n window.scrollTo(0, 0);\n }\n else {\n this.targetEl.scrollIntoView();\n }\n };\n this.checkForClassificationBanner = () => {\n //adjust position for classification banner at bottom\n const banners = document.querySelectorAll(\"ic-classification-banner:not([inline='true'])\");\n this.bannerOffset = banners.length > 0;\n };\n this.buildButton = () => {\n const { bannerOffset, targetElVisible, footerVisible, variant } = this;\n return (h(\"button\", { class: {\n [\"ic-back-to-top-link\"]: true,\n [\"offset-banner\"]: bannerOffset,\n [\"show\"]: !targetElVisible,\n [\"by-footer\"]: footerVisible,\n [\"positioning\"]: variant !== \"icon\",\n [\"icon-only\"]: variant === \"icon\",\n }, \"aria-label\": backToTopLabel, onClick: this.handleClick }, h(\"span\", { class: \"ic-back-to-top-icon\", innerHTML: ArrowUpward }), this.variant !== \"icon\" && (h(\"ic-typography\", { variant: \"subtitle-small\" }, h(\"span\", null, backToTopLabel)))));\n };\n this.bannerOffset = false;\n this.footerVisible = false;\n this.targetElVisible = true;\n this.target = undefined;\n this.variant = \"default\";\n }\n watchPropHandler(newValue, oldValue) {\n //added for gatsby rehydration issue where prop is initially undefined but then changes to actual value\n onComponentPropUndefinedChange(oldValue, newValue, () => {\n this.createTopObserver(newValue);\n });\n }\n componentWillLoad() {\n this.createTopObserver(this.target);\n this.checkForClassificationBanner();\n //observer for when footer scrolls into view\n let footers = document.querySelectorAll(\"ic-footer\");\n if (footers.length === 0) {\n footers = document.querySelectorAll(\"footer\");\n }\n if (footers.length) {\n const footerEl = footers[footers.length - 1];\n const threshold = this.bannerOffset ? 0.15 : 0;\n const footerObserver = new IntersectionObserver(this.footerObserverCallback, { threshold: [threshold] });\n footerObserver.observe(footerEl);\n }\n }\n componentDidLoad() {\n onComponentRequiredPropUndefined([{ prop: this.target, propName: \"target\" }], \"Back to Top\");\n }\n render() {\n const { variant, buildButton } = this;\n return variant === \"icon\" ? (h(\"ic-tooltip\", { label: backToTopLabel, placement: \"top\", class: \"positioning\" }, buildButton())) : (buildButton());\n }\n static get is() { return \"ic-back-to-top\"; }\n static get encapsulation() { return \"shadow\"; }\n static get delegatesFocus() { return true; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-back-to-top.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-back-to-top.css\"]\n };\n }\n static get properties() {\n return {\n \"target\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": true,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The ID of the element to jump back to when the link is clicked.\"\n },\n \"attribute\": \"target\",\n \"reflect\": false\n },\n \"variant\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcBackToTopVariants\",\n \"resolved\": \"\\\"default\\\" | \\\"icon\\\"\",\n \"references\": {\n \"IcBackToTopVariants\": {\n \"location\": \"import\",\n \"path\": \"./ic-back-to-top.types\",\n \"id\": \"src/components/ic-back-to-top/ic-back-to-top.types.ts::IcBackToTopVariants\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The variant of the button to render\"\n },\n \"attribute\": \"variant\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"default\\\"\"\n }\n };\n }\n static get states() {\n return {\n \"bannerOffset\": {},\n \"footerVisible\": {},\n \"targetElVisible\": {}\n };\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"target\",\n \"methodName\": \"watchPropHandler\"\n }];\n }\n}\n//# sourceMappingURL=ic-back-to-top.js.map\n"],"version":3}
1
+ {"file":"ic-back-to-top.entry.cjs.js","mappings":";;;;;;;;;;;;;AAAA,MAAM,cAAc,GAAG,m+IAAm+I;;ACG1/I,MAAM,cAAc,GAAG,aAAa,CAAC;MACxB,SAAS;IAClB;;QACI,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;QACxB,IAAI,CAAC,aAAa,GAAG;YACjB,OAAO,QAAQ,CAAC,aAAa,CAAC,wBAAwB,CAAC,CAAC;SAC3D,CAAC;QACF,IAAI,CAAC,kBAAkB,GAAG,CAAC,OAAO;YAC9B,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC;SAClC,CAAC;QACF,IAAI,CAAC,gBAAgB,GAAG,CAAC,OAAO;YAC5B,IAAI,CAAC,4BAA4B,EAAE,CAAC;YACpC,IAAI,CAAC,aAAa;gBACd,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,OAAO,KAAK,CAAC,GAAG,KAAK,GAAG,OAAO,CAAC;SAC/E,CAAC;QACF,IAAI,CAAC,wBAAwB,GAAG,CAAC,OAAO;YACpC,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC;SACtD,CAAC;QACF,IAAI,CAAC,sBAAsB,GAAG,CAAC,OA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AC,MAAM,KAAK,CAAC,EAAE;YACtB,OAAO,GAAG,QAAQ,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;SACjD;QACD,IAAI,OAAO,CAAC,MAAM,EAAE;YAChB,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;YAC7C,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,GAAG,IAAI,GAAG,CAAC,CAAC;YAC/C,MAAM,cAAc,GAAG,IAAI,oBAAoB,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,SAAS,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;YACzG,cAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;SACpC;KACJ;IACD,gBAAgB;QACZC,wCAAgC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,EAAE,aAAa,CAAC,CAAC;KAChG;IACD,MAAM;QACF,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;QACtC,OAAO,OAAO,KAAK,MAAM,IAAIF,OAAC,CAAC,YAAY,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,EAAE,WAAW,EAAE,CAAC,KAAK,WAAW,EAAE,CAAC,CAAC;KACrJ;IAGD,WAAW,cAAc,KAAK,OAAO,IAAI,CAAC,EAAE;;;;;;;;;;","names":["h","onComponentPropUndefinedChange","onComponentRequiredPropUndefined"],"sources":["../web-components/dist/collection/components/ic-back-to-top/ic-back-to-top.css?tag=ic-back-to-top&encapsulation=shadow","../web-components/dist/collection/components/ic-back-to-top/ic-back-to-top.js"],"sourcesContent":["/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n ========================================================================== */\n\n/**\n * Remove the margin in all browsers.\n */\n\nbody {\n margin: 0;\n}\n\n/**\n * Render the `main` element consistently in IE.\n */\n\nmain {\n display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n box-sizing: content-box; /* 1 */\n height: 0; /* 1 */\n overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\npre {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * Remove the gray background on active links in IE 10.\n */\n\na {\n background-color: transparent;\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n border-bottom: none; /* 1 */\n text-decoration: underline; /* 2 */\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Remove the border on images inside links in IE 10.\n */\n\nimg {\n border-style: none;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput {\n /* 1 */\n overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect {\n /* 1 */\n text-transform: none;\n}\n\n/**\n * Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button;\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * `fieldset` elements in all browsers.\n */\n\nlegend {\n box-sizing: border-box; /* 1 */\n color: inherit; /* 2 */\n display: table; /* 1 */\n max-width: 100%; /* 1 */\n padding: 0; /* 3 */\n white-space: normal; /* 1 */\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\n * Remove the default vertical scrollbar in IE 10+.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type=\"search\"] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n\n[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\n ========================================================================== */\n\n/*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\n\ndetails {\n display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\nsummary {\n display: list-item;\n}\n\n/* Misc\n ========================================================================== */\n\n/**\n * Add the correct display in IE 10+.\n */\n\ntemplate {\n display: none;\n}\n\n/**\n * Add the correct display in IE 10.\n */\n\n[hidden] {\n display: none;\n}\n\nhtml,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font-style: inherit;\n vertical-align: baseline;\n}\n\n\n/**\n * @prop --ic-z-index-back-to-top: z-index of back to top\n */\n\n:host {\n display: block;\n position: absolute;\n right: 0;\n}\n\n.positioning {\n position: fixed;\n right: var(--ic-space-md);\n bottom: var(--ic-space-md);\n transition: visibility 0s linear var(--ic-transition-duration-slow),\n opacity var(--ic-transition-duration-slow);\n z-index: var(--ic-z-index-back-to-top);\n}\n\n.icon-only {\n width: 2.5rem;\n padding: var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs)\n var(--ic-space-xs);\n}\n\n.icon-only .ic-back-to-top-icon {\n padding-left: calc(var(--ic-space-xxxs) + var(--ic-space-1px));\n}\n\nbutton {\n height: 2.5rem;\n align-items: center;\n padding: var(--ic-space-xs) var(--ic-space-md) var(--ic-space-xs)\n var(--ic-space-sm);\n margin: 0;\n gap: var(--ic-space-xs);\n display: flex;\n background-color: var(--ic-architectural-white);\n border: var(--ic-border-width) solid var(--ic-action-default);\n outline-width: inherit;\n box-sizing: border-box;\n box-shadow: var(--ic-elevation-overlay);\n border-radius: 5rem;\n text-decoration: none;\n visibility: hidden;\n opacity: 0;\n cursor: pointer;\n}\n\nbutton:hover {\n text-decoration: none;\n background-color: var(--ic-action-default-bg-hover-no-alpha);\n border: var(--ic-border-width) solid var(--ic-action-default-hover);\n}\n\nbutton:active {\n text-decoration: none;\n background-color: var(--ic-action-default-bg-active-no-alpha);\n border: var(--ic-border-width) solid var(--ic-action-default-active);\n}\n\nbutton:focus {\n box-shadow: var(--ic-border-focus);\n}\n\n.ic-back-to-top-link.show {\n visibility: visible;\n opacity: 1;\n transition: visibility 0s linear 0s,\n opacity var(--ic-transition-duration-slow),\n box-shadow var(--ic-easing-transition-fast);\n}\n\n.ic-back-to-top-link.by-footer {\n position: relative;\n right: var(--ic-space-md);\n bottom: 3.5rem;\n}\n\n.ic-back-to-top-link.offset-banner {\n margin-bottom: var(--ic-space-lg);\n}\n\n.ic-back-to-top-icon {\n fill: var(--ic-action-default);\n padding-left: var(--ic-space-xxs);\n padding-top: var(--ic-space-xxxs);\n}\n\n.ic-back-to-top-icon > svg {\n height: var(--ic-space-md);\n width: var(--ic-space-md);\n display: inline-block;\n}\n\n.ic-back-to-top-link span {\n color: var(--ic-action-default);\n}\n\n.ic-back-to-top-link:hover .ic-back-to-top-icon {\n fill: var(--ic-action-default-hover);\n}\n\n.ic-back-to-top-link:hover span {\n color: var(--ic-action-default-hover);\n}\n\n@media (forced-colors: active) {\n .ic-back-to-top-icon {\n fill: currentcolor;\n }\n}\n","import { h } from \"@stencil/core\";\nimport ArrowUpward from \"./assets/ArrowUpward.svg\";\nimport { onComponentPropUndefinedChange, onComponentRequiredPropUndefined, } from \"../../utils/helpers\";\nconst backToTopLabel = \"Back to top\";\nexport class BackToTop {\n constructor() {\n this.topObserver = null;\n this.getObservedEl = () => {\n return document.querySelector(\"#ic-back-to-top-target\");\n };\n this.setTargetElVisible = (visible) => {\n this.targetElVisible = visible;\n };\n this.setFooterVisible = (visible) => {\n this.checkForClassificationBanner();\n this.footerVisible =\n typeof window !== \"undefined\" && window.scrollY === 0 ? false : visible;\n };\n this.targetElObserverCallback = (entries) => {\n this.setTargetElVisible(entries[0].isIntersecting);\n };\n this.footerObserverCallback = (entries) => {\n this.setFooterVisible(entries[0].isIntersecting);\n };\n this.findTargetEl = (target) => {\n let targetElement = null;\n if (target === null || target === undefined) {\n console.log(\"Error: No target ID specified for back to top component - defaulting to top of page\");\n }\n else {\n targetElement = document.querySelector(`${target.startsWith(\"#\") ? \"\" : \"#\"}${target}`);\n if (targetElement === null) {\n console.log(`Error: Back to top target element '${target}' not found - defaulting to top of page`);\n }\n }\n return targetElement;\n };\n this.createTopObserver = (target) => {\n this.targetEl = this.findTargetEl(target);\n let objParent;\n //remove old element & observer\n if (this.topObserver !== null) {\n const observedEl = this.getObservedEl();\n if (observedEl !== null) {\n this.topObserver.unobserve(observedEl);\n observedEl.remove();\n }\n }\n if (this.targetEl === null) {\n objParent = document.body;\n this.targetEl = objParent.firstElementChild;\n this.isTargetElNull = true;\n }\n else {\n objParent = this.targetEl.parentNode;\n this.isTargetElNull = false;\n }\n //insert a new 0px height element before specified target that can be used to determine when page is scrolled\n const objBackToTopTargetEl = document.createElement(\"div\");\n objBackToTopTargetEl.setAttribute(\"id\", \"ic-back-to-top-target\");\n objBackToTopTargetEl.setAttribute(\"tabindex\", \"-1\"); // Needed for virtual cursor behaviour to work\n objParent.insertBefore(objBackToTopTargetEl, this.targetEl);\n // resize observer needs to factor in any top margin on the target el\n const marginTop = getComputedStyle(this.targetEl).marginTop;\n this.topObserver = new IntersectionObserver(this.targetElObserverCallback, {\n threshold: [0],\n rootMargin: `${marginTop} 0px 0px 0px`,\n });\n this.topObserver.observe(objBackToTopTargetEl);\n };\n this.handleClick = () => {\n if (this.isTargetElNull) {\n window.scrollTo(0, 0);\n }\n else {\n this.targetEl.scrollIntoView();\n }\n // Get virtual cursor to move\n this.getObservedEl().focus();\n };\n this.checkForClassificationBanner = () => {\n //adjust position for classification banner at bottom\n const banners = document.querySelectorAll(\"ic-classification-banner:not([inline='true'])\");\n this.bannerOffset = banners.length > 0;\n };\n this.buildButton = () => {\n const { bannerOffset, targetElVisible, footerVisible, variant } = this;\n return (h(\"button\", { class: {\n [\"ic-back-to-top-link\"]: true,\n [\"offset-banner\"]: bannerOffset,\n [\"show\"]: !targetElVisible,\n [\"by-footer\"]: footerVisible,\n [\"positioning\"]: variant !== \"icon\",\n [\"icon-only\"]: variant === \"icon\",\n }, \"aria-label\": backToTopLabel, onClick: this.handleClick }, h(\"span\", { class: \"ic-back-to-top-icon\", innerHTML: ArrowUpward }), this.variant !== \"icon\" && (h(\"ic-typography\", { variant: \"subtitle-small\" }, h(\"span\", null, backToTopLabel)))));\n };\n this.bannerOffset = false;\n this.footerVisible = false;\n this.targetElVisible = true;\n this.target = undefined;\n this.variant = \"default\";\n }\n watchPropHandler(newValue, oldValue) {\n //added for gatsby rehydration issue where prop is initially undefined but then changes to actual value\n onComponentPropUndefinedChange(oldValue, newValue, () => {\n this.createTopObserver(newValue);\n });\n }\n componentWillLoad() {\n this.createTopObserver(this.target);\n this.checkForClassificationBanner();\n //observer for when footer scrolls into view\n let footers = document.querySelectorAll(\"ic-footer\");\n if (footers.length === 0) {\n footers = document.querySelectorAll(\"footer\");\n }\n if (footers.length) {\n const footerEl = footers[footers.length - 1];\n const threshold = this.bannerOffset ? 0.15 : 0;\n const footerObserver = new IntersectionObserver(this.footerObserverCallback, { threshold: [threshold] });\n footerObserver.observe(footerEl);\n }\n }\n componentDidLoad() {\n onComponentRequiredPropUndefined([{ prop: this.target, propName: \"target\" }], \"Back to Top\");\n }\n render() {\n const { variant, buildButton } = this;\n return variant === \"icon\" ? (h(\"ic-tooltip\", { label: backToTopLabel, placement: \"top\", class: \"positioning\" }, buildButton())) : (buildButton());\n }\n static get is() { return \"ic-back-to-top\"; }\n static get encapsulation() { return \"shadow\"; }\n static get delegatesFocus() { return true; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-back-to-top.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-back-to-top.css\"]\n };\n }\n static get properties() {\n return {\n \"target\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": true,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The ID of the element to jump back to when the link is clicked.\"\n },\n \"attribute\": \"target\",\n \"reflect\": false\n },\n \"variant\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcBackToTopVariants\",\n \"resolved\": \"\\\"default\\\" | \\\"icon\\\"\",\n \"references\": {\n \"IcBackToTopVariants\": {\n \"location\": \"import\",\n \"path\": \"./ic-back-to-top.types\",\n \"id\": \"src/components/ic-back-to-top/ic-back-to-top.types.ts::IcBackToTopVariants\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The variant of the button to render\"\n },\n \"attribute\": \"variant\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"default\\\"\"\n }\n };\n }\n static get states() {\n return {\n \"bannerOffset\": {},\n \"footerVisible\": {},\n \"targetElVisible\": {}\n };\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"target\",\n \"methodName\": \"watchPropHandler\"\n }];\n }\n}\n//# sourceMappingURL=ic-back-to-top.js.map\n"],"version":3}
@@ -12,7 +12,7 @@ const backIcon = `<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/
12
12
  </svg>
13
13
  `;
14
14
 
15
- const icBreadcrumbCss = ":host{display:block;margin:var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0}:host .breadcrumb{display:flex;align-items:center;white-space:nowrap;gap:var(--ic-space-xs);min-height:var(--ic-space-lg)}:host .chevron{width:var(--ic-space-lg);height:var(--ic-space-lg)}:host .chevron svg{color:var(--ic-architectural-400)}:host(:first-child) .chevron{display:none}.back-icon svg{color:currentcolor}:host(.back){display:flex;align-items:center}:host(.back) .chevron{display:none}ic-link{--breadcrumb-link-display:inline-flex;--breadcrumb-link-align-items:center;--breadcrumb-link-gap:var(--ic-space-xs)}:host([aria-current=\"page\"]) .current-page-container{display:flex;align-items:center;gap:var(--ic-space-xs)}:host([aria-current=\"page\"]) .current-page-container.dark{color:var(--ic-color-primary-text)}:host([aria-current=\"page\"]) .current-page-container.light{color:var(--ic-color-white-text)}:host(.collapsed-breadcrumb-wrapper){margin-right:var(--ic-space-xs) !important;display:flex;align-items:center;gap:var(--ic-space-xs)}:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb){border:none;background-color:transparent;color:var(--ic-hyperlink);text-decoration:underline;font-weight:var(--ic-font-weight-bold);cursor:pointer}:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:hover),:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:focus){outline:var(--ic-hc-focus-outline);border-bottom:0.25rem solid !important;margin-bottom:-0.25rem !important;text-decoration:none}.hide,:host(.collapsed-breadcrumb-wrapper) ::slotted(.hide){display:none}@media (forced-colors: active){.back-icon svg{color:currentcolor}}@supports (text-decoration-thickness: 25%){ic-link{--breadcrumb-link-display:flex}:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:hover),:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:focus){text-decoration-line:underline;text-decoration-thickness:25%;text-underline-offset:25%;border-bottom:0 !important;margin-bottom:0 !important}}";
15
+ const icBreadcrumbCss = ":host{display:block;margin:var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0}:host .breadcrumb{display:flex;align-items:center;white-space:nowrap;gap:var(--ic-space-xs);min-height:var(--ic-space-lg)}:host .chevron{width:var(--ic-space-lg);height:var(--ic-space-lg)}:host .chevron svg{color:var(--ic-architectural-400)}:host(:first-child) .chevron{display:none}.back-icon svg{color:currentcolor}:host(.back){display:flex;align-items:center}:host(.back) .chevron{display:none}ic-link{--breadcrumb-link-display:inline-flex;--breadcrumb-link-align-items:center;--breadcrumb-link-gap:var(--ic-space-xs)}:host([aria-current=\"page\"]) .current-page-container{display:flex;align-items:center;gap:var(--ic-space-xs)}:host([aria-current=\"page\"]) .current-page-container.dark{color:var(--ic-color-primary-text)}:host([aria-current=\"page\"]) .current-page-container.light{color:var(--ic-color-white-text)}:host(.collapsed-breadcrumb-wrapper){margin-right:var(--ic-space-xs) !important;display:flex;align-items:center;gap:var(--ic-space-xs)}:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb){border:none;background-color:transparent;color:var(--ic-hyperlink);text-decoration:underline;font-weight:var(--ic-font-weight-bold);cursor:pointer}:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:hover),:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:focus){outline:var(--ic-hc-focus-outline);border-bottom:0.25rem solid !important;margin-bottom:-0.25rem !important;text-decoration:none}.hide,:host(.collapsed-breadcrumb-wrapper) ::slotted(.hide){display:none}@media (forced-colors: active){.back-icon svg{color:currentcolor}}@supports (text-underline-offset: 25%){ic-link{--breadcrumb-link-display:flex}:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:hover),:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:focus){text-decoration-line:underline;text-decoration-thickness:25%;text-underline-offset:25%;border-bottom:0 !important;margin-bottom:0 !important}}";
16
16
 
17
17
  const Breadcrumb = class {
18
18
  constructor(hostRef) {
@@ -1 +1 @@
1
- {"file":"ic-breadcrumb.entry.cjs.js","mappings":";;;;;;;;;;;;;;AAAA,MAAM,eAAe,GAAG,wgEAAwgE;;MCOnhE,UAAU;IACnB;;QACI,IAAI,CAAC,uBAAuB,GAAG,CAAC,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,IAAI;YACnE,MAAM,YAAY,GAAG,SAAS,KAAK,IAAI,IAAIA,qBAAa,CAAC,SAAS,CAAC,IAAI,SAAS,KAAK,EAAE,CAAC;YACxF,IAAI,OAAO,IAAI,YAAY,EAAE;gBACzB,QAAQC,OAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE;wBACnB,wBAAwB,EAAE,OAAO;wBACjC,CAAC,IAAI,CAAC,UAAU,GAAG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Aa,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,WAAW,SAAS,EAAE,CAAC,CAAC,EAAE,YAAY,IAAI,OAAO,IAAI,IAAI,CAAC,uBAAuB,CAAC,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,IAAI,CAAC,KAAKA,OAAC,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE;KAC7Z;IAGD,WAAW,cAAc,KAAK,OAAO,IAAI,CAAC,EAAE;;;;;;;","names":["isPropDefined","h","isSlotUsed","Host","chevronIcon"],"sources":["../web-components/dist/collection/components/ic-breadcrumb/ic-breadcrumb.css?tag=ic-breadcrumb&encapsulation=shadow","../web-components/dist/collection/components/ic-breadcrumb/ic-breadcrumb.js"],"sourcesContent":[":host {\n display: block;\n margin: var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0;\n}\n\n:host .breadcrumb {\n display: flex;\n align-items: center;\n white-space: nowrap;\n gap: var(--ic-space-xs);\n min-height: var(--ic-space-lg);\n}\n\n:host .chevron {\n width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n}\n\n:host .chevron svg {\n color: var(--ic-architectural-400);\n}\n\n:host(:first-child) .chevron {\n display: none;\n}\n\n.back-icon svg {\n color: currentcolor;\n}\n\n:host(.back) {\n display: flex;\n align-items: center;\n}\n\n:host(.back) .chevron {\n display: none;\n}\n\nic-link {\n --breadcrumb-link-display: inline-flex;\n --breadcrumb-link-align-items: center;\n --breadcrumb-link-gap: var(--ic-space-xs);\n}\n\n:host([aria-current=\"page\"]) .current-page-container {\n display: flex;\n align-items: center;\n gap: var(--ic-space-xs);\n}\n\n:host([aria-current=\"page\"]) .current-page-container.dark {\n color: var(--ic-color-primary-text);\n}\n\n:host([aria-current=\"page\"]) .current-page-container.light {\n color: var(--ic-color-white-text);\n}\n\n:host(.collapsed-breadcrumb-wrapper) {\n margin-right: var(--ic-space-xs) !important;\n display: flex;\n align-items: center;\n gap: var(--ic-space-xs);\n}\n\n:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb) {\n border: none;\n background-color: transparent;\n color: var(--ic-hyperlink);\n text-decoration: underline;\n font-weight: var(--ic-font-weight-bold);\n cursor: pointer;\n}\n\n:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:hover),\n:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:focus) {\n outline: var(--ic-hc-focus-outline);\n border-bottom: 0.25rem solid !important;\n margin-bottom: -0.25rem !important;\n text-decoration: none;\n}\n\n.hide,\n:host(.collapsed-breadcrumb-wrapper) ::slotted(.hide) {\n display: none;\n}\n\n@media (forced-colors: active) {\n .back-icon svg {\n color: currentcolor;\n }\n}\n\n@supports (text-decoration-thickness: 25%) {\n ic-link {\n --breadcrumb-link-display: flex;\n }\n\n :host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:hover),\n :host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:focus) {\n text-decoration-line: underline;\n text-decoration-thickness: 25%;\n text-underline-offset: 25%;\n border-bottom: 0 !important;\n margin-bottom: 0 !important;\n }\n}\n","import { Host, h } from \"@stencil/core\";\nimport chevronIcon from \"../../assets/chevron-icon.svg\";\nimport backIcon from \"../../assets/back-icon.svg\";\nimport { isPropDefined, isSlotUsed } from \"../../utils/helpers\";\n/**\n * @slot icon - Content will be rendered to the left of the breadcrumb page title.\n */\nexport class Breadcrumb {\n constructor() {\n this.renderDefaultBreadcrumb = (current, pageTitle, describedById, href) => {\n const hasPageTitle = pageTitle !== null && isPropDefined(pageTitle) && pageTitle !== \"\";\n if (current && hasPageTitle) {\n return (h(\"span\", { class: {\n \"current-page-container\": current,\n [this.appearance]: true,\n } }, isSlotUsed(this.el, \"icon\") && h(\"slot\", { name: \"icon\" }), pageTitle));\n }\n return (h(\"ic-link\", { appearance: this.appearance, href: href, class: \"breadcrumb-link\", \"aria-describedby\": this.showBackIcon && describedById && describedById }, this.showBackIcon && (h(\"div\", { class: \"back-icon\", innerHTML: backIcon })), isSlotUsed(this.el, \"icon\") && h(\"slot\", { name: \"icon\" }), pageTitle));\n };\n this.setSlottedCurrentPageClass = () => {\n const icLink = this.el.querySelector(\"ic-link\");\n const currentPage = \"current-page\";\n if (icLink) {\n icLink.classList.remove(currentPage);\n if (this.current) {\n const hasCurrentPageClass = icLink.classList.contains(currentPage);\n if (!hasCurrentPageClass) {\n icLink.classList.add(\"breadcrumb-link\", currentPage);\n }\n }\n }\n };\n this.appearance = \"default\";\n this.current = false;\n this.href = undefined;\n this.pageTitle = undefined;\n this.showBackIcon = false;\n }\n componentWillRender() {\n this.setSlottedCurrentPageClass();\n }\n /**\n * Sets focus on the breadcrumb.\n */\n async setFocus() {\n if (this.el.shadowRoot.querySelector(\"ic-link\")) {\n this.el.shadowRoot.querySelector(\"ic-link\").focus();\n }\n }\n render() {\n const { current, href, pageTitle } = this;\n const describedById = `${pageTitle && pageTitle.toLowerCase().replace(\" \", \"-\")}-describedby`;\n const hasPageTitle = pageTitle !== null && isPropDefined(pageTitle) && pageTitle !== \"\";\n const hasHref = href !== null && isPropDefined(href) && href !== \"\";\n return (h(Host, { class: {\n back: this.showBackIcon,\n }, \"aria-current\": current && \"page\", role: \"listitem\" }, h(\"div\", { class: \"breadcrumb\" }, h(\"span\", { innerHTML: chevronIcon, class: \"chevron\", \"aria-hidden\": \"true\" }), this.showBackIcon && describedById && (h(\"span\", { id: describedById, class: \"hide\" }, `Back to ${pageTitle}`)), hasPageTitle && hasHref ? (this.renderDefaultBreadcrumb(current, pageTitle, describedById, href)) : (h(\"slot\", null)))));\n }\n static get is() { return \"ic-breadcrumb\"; }\n static get encapsulation() { return \"shadow\"; }\n static get delegatesFocus() { return true; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-breadcrumb.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-breadcrumb.css\"]\n };\n }\n static get properties() {\n return {\n \"appearance\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcThemeForeground\",\n \"resolved\": \"\\\"dark\\\" | \\\"default\\\" | \\\"light\\\"\",\n \"references\": {\n \"IcThemeForeground\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcThemeForeground\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"The appearance of the breadcrumb.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"appearance\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"default\\\"\"\n },\n \"current\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, aria-current will be set on the breadcrumb.\"\n },\n \"attribute\": \"current\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"href\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The URL that the breadcrumb link points to.\"\n },\n \"attribute\": \"href\",\n \"reflect\": false\n },\n \"pageTitle\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": true,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The title of the breadcrumb.\"\n },\n \"attribute\": \"page-title\",\n \"reflect\": false\n },\n \"showBackIcon\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"If `true`, back icon will be displayed.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"show-back-icon\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n }\n };\n }\n static get methods() {\n return {\n \"setFocus\": {\n \"complexType\": {\n \"signature\": \"() => Promise<void>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"Sets focus on the breadcrumb.\",\n \"tags\": []\n }\n }\n };\n }\n static get elementRef() { return \"el\"; }\n}\n//# sourceMappingURL=ic-breadcrumb.js.map\n"],"version":3}
1
+ {"file":"ic-breadcrumb.entry.cjs.js","mappings":";;;;;;;;;;;;;;AAAA,MAAM,eAAe,GAAG,ogEAAogE;;MCO/gE,UAAU;IACnB;;QACI,IAAI,CAAC,uBAAuB,GAAG,CAAC,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,IAAI;YACnE,MAAM,YAAY,GAAG,SAAS,KAAK,IAAI,IAAIA,qBAAa,CAAC,SAAS,CAAC,IAAI,SAAS,KAAK,EAAE,CAAC;YACxF,IAAI,OAAO,IAAI,YAAY,EAAE;gBACzB,QAAQC,OAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE;wBACnB,wBAAwB,EAAE,OAAO;wBACjC,CAAC,IAAI,CAAC,UAAU,GAAG,IAAI;qBAC1B,EAAE,EAAEC,kBAAU,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,IAAID,OAAC,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,SAAS,CAAC,EAAE;aACpF;YACD,QAAQA,OAAC,CAAC,SAAS,EAAE,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,IAAI,CAAC,YAAY,IAAI,aAAa,IAAI,aAAa,EAAE,EAAE,IAAI,CAAC,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crumb.css?tag=ic-breadcrumb&encapsulation=shadow","../web-components/dist/collection/components/ic-breadcrumb/ic-breadcrumb.js"],"sourcesContent":[":host {\n display: block;\n margin: var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0;\n}\n\n:host .breadcrumb {\n display: flex;\n align-items: center;\n white-space: nowrap;\n gap: var(--ic-space-xs);\n min-height: var(--ic-space-lg);\n}\n\n:host .chevron {\n width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n}\n\n:host .chevron svg {\n color: var(--ic-architectural-400);\n}\n\n:host(:first-child) .chevron {\n display: none;\n}\n\n.back-icon svg {\n color: currentcolor;\n}\n\n:host(.back) {\n display: flex;\n align-items: center;\n}\n\n:host(.back) .chevron {\n display: none;\n}\n\nic-link {\n --breadcrumb-link-display: inline-flex;\n --breadcrumb-link-align-items: center;\n --breadcrumb-link-gap: var(--ic-space-xs);\n}\n\n:host([aria-current=\"page\"]) .current-page-container {\n display: flex;\n align-items: center;\n gap: var(--ic-space-xs);\n}\n\n:host([aria-current=\"page\"]) .current-page-container.dark {\n color: var(--ic-color-primary-text);\n}\n\n:host([aria-current=\"page\"]) .current-page-container.light {\n color: var(--ic-color-white-text);\n}\n\n:host(.collapsed-breadcrumb-wrapper) {\n margin-right: var(--ic-space-xs) !important;\n display: flex;\n align-items: center;\n gap: var(--ic-space-xs);\n}\n\n:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb) {\n border: none;\n background-color: transparent;\n color: var(--ic-hyperlink);\n text-decoration: underline;\n font-weight: var(--ic-font-weight-bold);\n cursor: pointer;\n}\n\n:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:hover),\n:host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:focus) {\n outline: var(--ic-hc-focus-outline);\n border-bottom: 0.25rem solid !important;\n margin-bottom: -0.25rem !important;\n text-decoration: none;\n}\n\n.hide,\n:host(.collapsed-breadcrumb-wrapper) ::slotted(.hide) {\n display: none;\n}\n\n@media (forced-colors: active) {\n .back-icon svg {\n color: currentcolor;\n }\n}\n\n@supports (text-underline-offset: 25%) {\n ic-link {\n --breadcrumb-link-display: flex;\n }\n\n :host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:hover),\n :host(.collapsed-breadcrumb-wrapper) ::slotted(.collapsed-breadcrumb:focus) {\n text-decoration-line: underline;\n text-decoration-thickness: 25%;\n text-underline-offset: 25%;\n border-bottom: 0 !important;\n margin-bottom: 0 !important;\n }\n}\n","import { Host, h } from \"@stencil/core\";\nimport chevronIcon from \"../../assets/chevron-icon.svg\";\nimport backIcon from \"../../assets/back-icon.svg\";\nimport { isPropDefined, isSlotUsed } from \"../../utils/helpers\";\n/**\n * @slot icon - Content will be rendered to the left of the breadcrumb page title.\n */\nexport class Breadcrumb {\n constructor() {\n this.renderDefaultBreadcrumb = (current, pageTitle, describedById, href) => {\n const hasPageTitle = pageTitle !== null && isPropDefined(pageTitle) && pageTitle !== \"\";\n if (current && hasPageTitle) {\n return (h(\"span\", { class: {\n \"current-page-container\": current,\n [this.appearance]: true,\n } }, isSlotUsed(this.el, \"icon\") && h(\"slot\", { name: \"icon\" }), pageTitle));\n }\n return (h(\"ic-link\", { appearance: this.appearance, href: href, class: \"breadcrumb-link\", \"aria-describedby\": this.showBackIcon && describedById && describedById }, this.showBackIcon && (h(\"div\", { class: \"back-icon\", innerHTML: backIcon })), isSlotUsed(this.el, \"icon\") && h(\"slot\", { name: \"icon\" }), pageTitle));\n };\n this.setSlottedCurrentPageClass = () => {\n const icLink = this.el.querySelector(\"ic-link\");\n const currentPage = \"current-page\";\n if (icLink) {\n icLink.classList.remove(currentPage);\n if (this.current) {\n const hasCurrentPageClass = icLink.classList.contains(currentPage);\n if (!hasCurrentPageClass) {\n icLink.classList.add(\"breadcrumb-link\", currentPage);\n }\n }\n }\n };\n this.appearance = \"default\";\n this.current = false;\n this.href = undefined;\n this.pageTitle = undefined;\n this.showBackIcon = false;\n }\n componentWillRender() {\n this.setSlottedCurrentPageClass();\n }\n /**\n * Sets focus on the breadcrumb.\n */\n async setFocus() {\n if (this.el.shadowRoot.querySelector(\"ic-link\")) {\n this.el.shadowRoot.querySelector(\"ic-link\").focus();\n }\n }\n render() {\n const { current, href, pageTitle } = this;\n const describedById = `${pageTitle && pageTitle.toLowerCase().replace(\" \", \"-\")}-describedby`;\n const hasPageTitle = pageTitle !== null && isPropDefined(pageTitle) && pageTitle !== \"\";\n const hasHref = href !== null && isPropDefined(href) && href !== \"\";\n return (h(Host, { class: {\n back: this.showBackIcon,\n }, \"aria-current\": current && \"page\", role: \"listitem\" }, h(\"div\", { class: \"breadcrumb\" }, h(\"span\", { innerHTML: chevronIcon, class: \"chevron\", \"aria-hidden\": \"true\" }), this.showBackIcon && describedById && (h(\"span\", { id: describedById, class: \"hide\" }, `Back to ${pageTitle}`)), hasPageTitle && hasHref ? (this.renderDefaultBreadcrumb(current, pageTitle, describedById, href)) : (h(\"slot\", null)))));\n }\n static get is() { return \"ic-breadcrumb\"; }\n static get encapsulation() { return \"shadow\"; }\n static get delegatesFocus() { return true; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-breadcrumb.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-breadcrumb.css\"]\n };\n }\n static get properties() {\n return {\n \"appearance\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcThemeForeground\",\n \"resolved\": \"\\\"dark\\\" | \\\"default\\\" | \\\"light\\\"\",\n \"references\": {\n \"IcThemeForeground\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcThemeForeground\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"The appearance of the breadcrumb.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"appearance\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"default\\\"\"\n },\n \"current\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, aria-current will be set on the breadcrumb.\"\n },\n \"attribute\": \"current\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"href\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The URL that the breadcrumb link points to.\"\n },\n \"attribute\": \"href\",\n \"reflect\": false\n },\n \"pageTitle\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": true,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The title of the breadcrumb.\"\n },\n \"attribute\": \"page-title\",\n \"reflect\": false\n },\n \"showBackIcon\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"If `true`, back icon will be displayed.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"show-back-icon\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n }\n };\n }\n static get methods() {\n return {\n \"setFocus\": {\n \"complexType\": {\n \"signature\": \"() => Promise<void>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"Sets focus on the breadcrumb.\",\n \"tags\": []\n }\n }\n };\n }\n static get elementRef() { return \"el\"; }\n}\n//# sourceMappingURL=ic-breadcrumb.js.map\n"],"version":3}
@@ -51,6 +51,11 @@ const Button = class {
51
51
  hiddenFormButton.remove();
52
52
  }
53
53
  };
54
+ this.handleKeyDown = (ev) => {
55
+ if (ev.key === "Escape" && this.hasTooltip) {
56
+ this.closeButtonTooltip(ev);
57
+ }
58
+ };
54
59
  this.onFocus = () => {
55
60
  this.icFocus.emit();
56
61
  };
@@ -205,6 +210,14 @@ const Button = class {
205
210
  var _a;
206
211
  (_a = this.buttonEl) === null || _a === void 0 ? void 0 : _a.focus();
207
212
  }
213
+ async closeButtonTooltip(ev) {
214
+ const tooltip = this.el.shadowRoot.querySelector("ic-tooltip");
215
+ if (await tooltip.isTooltipVisible()) {
216
+ tooltip.displayTooltip(false);
217
+ ev.preventDefault();
218
+ ev.stopImmediatePropagation();
219
+ }
220
+ }
208
221
  hasIconSlot(position) {
209
222
  const selectorPrefix = position ? `${position}-` : "";
210
223
  return this.el.querySelector(`[slot="${selectorPrefix}icon"]`) !== null;
@@ -292,7 +305,7 @@ const Button = class {
292
305
  ["white-background"]: this.variant === "secondary" &&
293
306
  !this.transparentBackground &&
294
307
  this.appearance !== "light",
295
- }, onClick: this.handleClick, "aria-owns": this.ariaOwnsId, "aria-controls": this.ariaControlsId, "aria-expanded": this.dropdown && `${this.dropdownExpanded}` }, this.hasTooltip && (index.h("ic-tooltip", { id: describedby, label: title || ariaLabel, target: buttonId, placement: this.tooltipPlacement, silent: this.variant === "icon" && !!ariaLabel }, this.hasRouterSlot() ? (index.h("slot", { name: "router-item" })) : (index.h(ButtonContent, null)))), helpers.isSlotUsed(this.el, "badge") && index.h("slot", { name: "badge" }), !this.hasTooltip &&
308
+ }, onClick: this.handleClick, onKeyDown: this.handleKeyDown, "aria-owns": this.ariaOwnsId, "aria-controls": this.ariaControlsId, "aria-expanded": this.dropdown && `${this.dropdownExpanded}` }, this.hasTooltip && (index.h("ic-tooltip", { id: describedby, label: title || ariaLabel, target: buttonId, placement: this.tooltipPlacement, silent: this.variant === "icon" && !!ariaLabel }, this.hasRouterSlot() ? (index.h("slot", { name: "router-item" })) : (index.h(ButtonContent, null)))), helpers.isSlotUsed(this.el, "badge") && index.h("slot", { name: "badge" }), !this.hasTooltip &&
296
309
  (this.hasRouterSlot() ? (index.h("slot", { name: "router-item" })) : (index.h(ButtonContent, null))), this.describedByContent && (index.h("span", { id: describedby, class: "ic-button-describedby" }, this.describedByContent))));
297
310
  }
298
311
  static get delegatesFocus() { return true; }
@@ -602,6 +615,9 @@ const Tooltip = class {
602
615
  this.hide = () => {
603
616
  this.toolTip.removeAttribute("data-show");
604
617
  this.persistTooltip = false;
618
+ if (this.popperInstance !== undefined) {
619
+ this.popperInstance.destroy();
620
+ }
605
621
  };
606
622
  this.checkCloseTooltip = () => {
607
623
  setTimeout(() => {
@@ -680,6 +696,12 @@ const Tooltip = class {
680
696
  this.persistTooltip = persistTooltip;
681
697
  show ? this.show() : this.hide();
682
698
  }
699
+ /**
700
+ * @internal Method to return if tooltip is currently visible.
701
+ */
702
+ async isTooltipVisible() {
703
+ return Promise.resolve(this.toolTip.hasAttribute("data-show"));
704
+ }
683
705
  render() {
684
706
  const { label, maxLines, silent } = this;
685
707
  return (index.h(index.Host, { class: { "ic-tooltip": true } }, index.h("div", { ref: (el) => (this.toolTip = el), role: "tooltip", class: "ic-tooltip-container", "aria-hidden": `${silent}` }, index.h("ic-typography", { maxLines: maxLines, variant: "caption" }, label), index.h("div", { ref: (el) => (this.arrow = el), class: "ic-tooltip-arrow" })), index.h("slot", null)));