@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
@@ -1 +1 @@
1
- {"file":"ic-stepper.entry.js","mappings":";;;;AAAA,MAAM,YAAY,GAAG,4UAA4U;;MCEpV,OAAO;IAChB;;QACI,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;QAC3B,IAAI,CAAC,cAAc,GAAG,iBAAiB,CAAC;;QAExC,IAAI,CAAC,WAAW,GAAG;YACf,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC;YAC7D,IAAI,CAAC,mBAAmB,G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web-components/dist/collection/components/ic-stepper/ic-stepper.css?tag=ic-stepper&encapsulation=shadow","../web-components/dist/collection/components/ic-stepper/ic-stepper.js"],"sourcesContent":[":host {\n display: flex;\n width: 100%;\n}\n\n.step-item-list {\n display: flex;\n margin: 0;\n padding: 0;\n}\n\n:host(.default:not(.aligned-left)) .step-item-list {\n flex: auto;\n}\n\n:host(.compact) ul ::slotted(ic-step) {\n display: none;\n}\n\n:host(.compact) ul ::slotted(ic-step.show) {\n display: flex;\n}\n\n:host(.compact) ul ::slotted(ic-step.hide) {\n display: none;\n opacity: 0;\n visibility: hidden;\n}\n","import { Host, h } from \"@stencil/core\";\nimport { checkResizeObserver, pxToRem } from \"../../utils/helpers\";\nexport class Stepper {\n constructor() {\n this.resizeObserver = null;\n this.visuallyHidden = \"visually-hidden\";\n // Get all steps currently within this stepper\n this.getChildren = () => {\n this.steps = Array.from(this.el.querySelectorAll(\"ic-step\"));\n this.stepsWithStepTitles = Array.from(this.el.querySelectorAll(\"ic-step[step-title]\"));\n };\n // Inform the user that stepTitles are required on all steps in a compact stepper\n this.checkStepTitles = () => {\n if (this.stepsWithStepTitles.length < this.steps.length &&\n this.variantOverride &&\n this.variant === \"compact\") {\n this.noOfResizes = this.noOfResizes + 1;\n if (this.noOfResizes === 1) {\n console.error(`The prop 'step-title' (web components) / 'stepTitle' (react) is required for all steps of the Stepper component (compact variant)`);\n }\n }\n };\n this.setStepTypes = () => {\n this.getChildren();\n this.stepTypes = [];\n for (let i = 0; i < this.steps.length; i++) {\n this.stepTypes.push(\"active\");\n }\n };\n this.setStepperWidth = () => {\n this.alignedFullWidth =\n this.variant === \"default\" && this.aligned === \"full-width\";\n const lastStep = this.steps[this.steps.length - 1];\n lastStep.style.maxWidth = \"none\";\n if (this.alignedFullWidth) {\n this.stepperWidth = this.el.offsetWidth;\n lastStep.style.maxWidth = pxToRem(`${this.stepperWidth / this.steps.length}px`);\n this.lastStepWidth = lastStep.offsetWidth;\n }\n };\n this.initialiseStepStates = () => {\n this.steps.forEach((step, index) => {\n // Set variant\n step.variant = this.variant;\n // Assign stepNum to each step\n step.stepNum = index + 1;\n // Assign lastStep to final step\n step.lastStep = index === this.steps.length - 1;\n step.lastStepNum = this.steps.length;\n if (step.stepType !== \"current\") {\n step.current = false;\n this.stepTypes[index] = step.stepType;\n }\n else {\n step.current = true;\n }\n const stepTitleArea = step.shadowRoot &&\n step.shadowRoot.querySelector(\".step > .step-title-area\");\n if (this.stepsWithStepTitles.length == 0 && this.variantOverride) {\n if (this.variant === \"compact\") {\n this.autoSetStepTitles = true;\n if (this.autoSetStepTitles) {\n step.stepTitle = \"Step \" + step.stepNum;\n stepTitleArea &&\n stepTitleArea\n .querySelector(\".step-title\")\n .setAttribute(\"aria-hidden\", \"true\");\n }\n }\n if (this.variant === \"default\") {\n this.autoSetStepTitles = false;\n if (!this.autoSetStepTitles) {\n step.stepTitle = undefined;\n stepTitleArea &&\n stepTitleArea\n .querySelector(\".step-title\")\n .removeAttribute(\"aria-hidden\");\n }\n }\n }\n if (this.variant === \"compact\") {\n if (step.current === true || step.stepType === \"current\") {\n step.classList.remove(\"hide\");\n step.classList.add(\"show\");\n }\n else if (step.classList.contains(\"show\")) {\n step.classList.remove(\"show\");\n step.classList.add(\"hide\");\n }\n if (!step.lastStep) {\n step.nextStepTitle = this.steps[index + 1].stepTitle;\n step.progress = (step.stepNum / this.steps.length) * 100;\n }\n else if (step.lastStep && this.stepTypes[index] !== \"completed\") {\n step.progress = 95;\n }\n else {\n step.progress = 100;\n }\n if (this.hideStepInfo && stepTitleArea !== null) {\n stepTitleArea.classList.remove(this.visuallyHidden);\n }\n step.compactStepStyling = this.stepTypes[index];\n }\n if (this.variant === \"default\") {\n if (!step.lastStep) {\n if (this.alignedFullWidth) {\n step.style.width = pxToRem(`${(this.stepperWidth - this.lastStepWidth) /\n (this.steps.length - 1)}px`);\n step.style.minWidth = pxToRem(\"148px\");\n }\n }\n else if (step.lastStep) {\n step.classList.add(\"last-step\");\n if (this.alignedFullWidth) {\n step.style.maxWidth = `${this.lastStepWidth}px`;\n }\n else {\n step.style.maxWidth =\n this.connectorWidth > 100\n ? pxToRem(`${this.connectorWidth + 48}px`)\n : pxToRem(\"148px\");\n }\n }\n if (this.aligned === \"left\") {\n step.style.width =\n this.connectorWidth > 100\n ? pxToRem(`${this.connectorWidth + 48}px`)\n : pxToRem(\"148px\");\n const stepConnect = step.shadowRoot.querySelector(\".step > .step-top > .step-connect\");\n if (stepConnect) {\n stepConnect.style.width =\n this.connectorWidth > 100\n ? pxToRem(`${this.connectorWidth}px`)\n : pxToRem(\"100px\");\n }\n }\n if (this.hideStepInfo && stepTitleArea !== null) {\n stepTitleArea.classList.add(this.visuallyHidden);\n }\n }\n });\n };\n this.setHideStepInfo = () => {\n this.steps.forEach((step) => {\n var _a, _b;\n const stepTitleArea = step.shadowRoot.querySelector(\".step > .step-title-area\");\n if (stepTitleArea !== null) {\n if (this.hideStepInfo) {\n (_a = stepTitleArea.classList) === null || _a === void 0 ? void 0 : _a.add(this.visuallyHidden);\n }\n else {\n (_b = stepTitleArea.classList) === null || _b === void 0 ? void 0 : _b.remove(this.visuallyHidden);\n }\n }\n });\n };\n this.overrideVariant = () => {\n if (this.variantOverride) {\n let minDefaultStepperWidth = 148 * this.steps.length;\n if (this.aligned === \"left\" && this.connectorWidth > 100) {\n minDefaultStepperWidth = (this.connectorWidth + 48) * this.steps.length;\n }\n if (this.el.clientWidth < minDefaultStepperWidth) {\n this.variant = \"compact\";\n }\n else {\n this.variant = \"default\";\n }\n }\n };\n this.resizeObserverCallback = () => {\n this.getChildren();\n this.checkStepTitles();\n this.overrideVariant();\n this.setStepperWidth();\n this.initialiseStepStates();\n };\n this.runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n this.resizeObserverCallback();\n });\n this.resizeObserver.observe(this.el);\n };\n this.alignedFullWidth = true;\n this.autoSetStepTitles = true;\n this.lastStepWidth = 0;\n this.noOfResizes = 0;\n this.stepperWidth = document\n .querySelector(\"ic-stepper\")\n .getBoundingClientRect().width;\n this.stepTypes = [];\n this.variantOverride = this.variant !== \"compact\";\n this.aligned = \"full-width\";\n this.appearance = \"default\";\n this.connectorWidth = 100;\n this.hideStepInfo = false;\n this.variant = \"default\";\n }\n handlePropChange() {\n this.setHideStepInfo();\n this.getChildren();\n }\n disconnectedCallback() {\n if (this.resizeObserver !== null) {\n this.resizeObserver.disconnect();\n }\n }\n componentWillLoad() {\n this.setStepTypes();\n if (this.variant === \"compact\") {\n this.variantOverride = false;\n }\n }\n componentWillRender() {\n this.initialiseStepStates();\n }\n componentDidLoad() {\n checkResizeObserver(this.runResizeObserver);\n }\n render() {\n return (h(Host, { class: {\n [`${this.variant}`]: true,\n [\"aligned-left\"]: this.variant === \"default\" && this.aligned === \"left\",\n } }, h(\"ul\", { class: \"step-item-list\" }, h(\"slot\", null))));\n }\n static get is() { return \"ic-stepper\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-stepper.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-stepper.css\"]\n };\n }\n static get properties() {\n return {\n \"aligned\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcStepperAlignment\",\n \"resolved\": \"\\\"full-width\\\" | \\\"left\\\"\",\n \"references\": {\n \"IcStepperAlignment\": {\n \"location\": \"import\",\n \"path\": \"./ic-stepper.types\",\n \"id\": \"src/components/ic-stepper/ic-stepper.types.ts::IcStepperAlignment\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The alignment of the default stepper within its container.\"\n },\n \"attribute\": \"aligned\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"full-width\\\"\"\n },\n \"appearance\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"\\\"light\\\" | \\\"default\\\"\",\n \"resolved\": \"\\\"default\\\" | \\\"light\\\"\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The appearance of the stepper.\"\n },\n \"attribute\": \"appearance\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"default\\\"\"\n },\n \"connectorWidth\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The length of the connnector between each step in pixels. Minimum length is 100px.\"\n },\n \"attribute\": \"connector-width\",\n \"reflect\": false,\n \"defaultValue\": \"100\"\n },\n \"hideStepInfo\": {\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`, the information about each step, i.e. step title, step subtitle and step status, will be hidden on all default steps. The information about each step will still be visible in the compact variant of the stepper.\"\n },\n \"attribute\": \"hide-step-info\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"variant\": {\n \"type\": \"string\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"IcStepVariants\",\n \"resolved\": \"\\\"compact\\\" | \\\"default\\\"\",\n \"references\": {\n \"IcStepVariants\": {\n \"location\": \"import\",\n \"path\": \"../ic-step/ic-step.types\",\n \"id\": \"src/components/ic-step/ic-step.types.ts::IcStepVariants\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The variant of the stepper.\"\n },\n \"attribute\": \"variant\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"default\\\"\"\n }\n };\n }\n static get states() {\n return {\n \"alignedFullWidth\": {},\n \"autoSetStepTitles\": {},\n \"lastStepWidth\": {},\n \"noOfResizes\": {},\n \"stepperWidth\": {},\n \"stepTypes\": {},\n \"variantOverride\": {}\n };\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"hideStepInfo\",\n \"methodName\": \"handlePropChange\"\n }, {\n \"propName\": \"variant\",\n \"methodName\": \"handlePropChange\"\n }];\n }\n}\n//# sourceMappingURL=ic-stepper.js.map\n"],"version":3}
1
+ {"file":"ic-stepper.entry.js","mappings":";;;;AAAA,MAAM,YAAY,GAAG,4UAA4U;;MCEpV,OAAO;IAChB;;QACI,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;QAC3B,IAAI,CAAC,cAAc,GAAG,iBAAiB,CAAC;;QAExC,IAAI,CAAC,WAAW,GAAG;YACf,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC;YAC7D,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,CAAC,CAAC;SAC1F,CAAC;;QAEF,IAAI,CAAC,eAAe,GAAG;YACnB,IAAI,IAAI,CAAC,mBAAmB,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM;gBACnD,IAAI,CAAC,eAAe;gBACpB,IAAI,CAAC,OAAO,KAAK,SAAS,EAAE;gBAC5B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC;gBACxC,IAAI,IAAI,CAAC,WAAW,KAAK,CAAC,EAAE;oBACxB,OAAO,CAAC,KAAK,CAAC,mIAAmI,CAAC,CAAC;iBACtJ;aACJ;SACJ,CAAC;QACF,IAAI,CAAC,YAAY,GAAG;YAChB,IAAI,CAAC,WAAW,EAAE,CAAC;YACnB,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;YACpB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACxC,IAAI,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ChC;KACJ;IACD,mBAAmB;QACf,IAAI,CAAC,oBAAoB,EAAE,CAAC;KAC/B;IACD,gBAAgB;QACZ,mBAAmB,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;KAC/C;IACD,MAAM;QACF,QAAQ,CAAC,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE;gBACjB,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI;gBACzB,CAAC,cAAc,GAAG,IAAI,CAAC,OAAO,KAAK,SAAS,IAAI,IAAI,CAAC,OAAO,KAAK,MAAM;aAC1E,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE;KACpE;;;;;;;;;;;","names":[],"sources":["../web-components/dist/collection/components/ic-stepper/ic-stepper.css?tag=ic-stepper&encapsulation=shadow","../web-components/dist/collection/components/ic-stepper/ic-stepper.js"],"sourcesContent":[":host {\n display: flex;\n width: 100%;\n}\n\n.step-item-list {\n display: flex;\n margin: 0;\n padding: 0;\n}\n\n:host(.default:not(.aligned-left)) .step-item-list {\n flex: auto;\n}\n\n:host(.compact) ul ::slotted(ic-step) {\n display: none;\n}\n\n:host(.compact) ul ::slotted(ic-step.show) {\n display: flex;\n}\n\n:host(.compact) ul ::slotted(ic-step.hide) {\n display: none;\n opacity: 0;\n visibility: hidden;\n}\n","import { Host, h } from \"@stencil/core\";\nimport { checkResizeObserver, pxToRem } from \"../../utils/helpers\";\nexport class Stepper {\n constructor() {\n this.resizeObserver = null;\n this.visuallyHidden = \"visually-hidden\";\n // Get all steps currently within this stepper\n this.getChildren = () => {\n this.steps = Array.from(this.el.querySelectorAll(\"ic-step\"));\n this.stepsWithStepTitles = Array.from(this.el.querySelectorAll(\"ic-step[step-title]\"));\n };\n // Inform the user that stepTitles are required on all steps in a compact stepper\n this.checkStepTitles = () => {\n if (this.stepsWithStepTitles.length < this.steps.length &&\n this.variantOverride &&\n this.variant === \"compact\") {\n this.noOfResizes = this.noOfResizes + 1;\n if (this.noOfResizes === 1) {\n console.error(`The prop 'step-title' (web components) / 'stepTitle' (react) is required for all steps of the Stepper component (compact variant)`);\n }\n }\n };\n this.setStepTypes = () => {\n this.getChildren();\n this.stepTypes = [];\n for (let i = 0; i < this.steps.length; i++) {\n this.stepTypes.push(\"active\");\n }\n };\n this.setStepperWidth = () => {\n this.alignedFullWidth =\n this.variant === \"default\" && this.aligned === \"full-width\";\n const lastStep = this.steps[this.steps.length - 1];\n lastStep.style.maxWidth = \"none\";\n if (this.alignedFullWidth) {\n this.stepperWidth = this.el.offsetWidth;\n lastStep.style.maxWidth = pxToRem(`${this.stepperWidth / this.steps.length}px`);\n this.lastStepWidth = lastStep.offsetWidth;\n }\n };\n this.initialiseStepStates = () => {\n this.steps.forEach((step, index) => {\n // Set variant\n step.variant = this.variant;\n // Assign stepNum to each step\n step.stepNum = index + 1;\n // Assign lastStep to final step\n step.lastStep = index === this.steps.length - 1;\n step.lastStepNum = this.steps.length;\n if (step.stepType !== \"current\") {\n step.current = false;\n this.stepTypes[index] = step.stepType;\n }\n else {\n step.current = true;\n }\n const stepTitleArea = step.shadowRoot &&\n step.shadowRoot.querySelector(\".step > .step-title-area\");\n if (this.stepsWithStepTitles.length == 0 && this.variantOverride) {\n if (this.variant === \"compact\") {\n this.autoSetStepTitles = true;\n if (this.autoSetStepTitles) {\n step.stepTitle = \"Step \" + step.stepNum;\n stepTitleArea &&\n stepTitleArea\n .querySelector(\".step-title\")\n .setAttribute(\"aria-hidden\", \"true\");\n }\n }\n if (this.variant === \"default\") {\n this.autoSetStepTitles = false;\n if (!this.autoSetStepTitles) {\n step.stepTitle = undefined;\n stepTitleArea &&\n stepTitleArea\n .querySelector(\".step-title\")\n .removeAttribute(\"aria-hidden\");\n }\n }\n }\n if (this.variant === \"compact\") {\n if (step.current === true || step.stepType === \"current\") {\n step.classList.remove(\"hide\");\n step.classList.add(\"show\");\n }\n else if (step.classList.contains(\"show\")) {\n step.classList.remove(\"show\");\n step.classList.add(\"hide\");\n }\n if (!step.lastStep) {\n step.nextStepTitle = this.steps[index + 1].stepTitle;\n step.progress = (step.stepNum / this.steps.length) * 100;\n }\n else if (step.lastStep && this.stepTypes[index] !== \"completed\") {\n step.progress = 95;\n }\n else {\n step.progress = 100;\n }\n if (this.hideStepInfo && stepTitleArea !== null) {\n stepTitleArea.classList.remove(this.visuallyHidden);\n }\n step.compactStepStyling = this.stepTypes[index];\n }\n if (this.variant === \"default\") {\n if (!step.lastStep) {\n if (this.alignedFullWidth) {\n step.style.width = pxToRem(`${(this.stepperWidth - this.lastStepWidth) /\n (this.steps.length - 1)}px`);\n step.style.minWidth = pxToRem(\"148px\");\n }\n }\n else if (step.lastStep) {\n step.classList.add(\"last-step\");\n if (this.alignedFullWidth) {\n step.style.maxWidth = `${this.lastStepWidth}px`;\n }\n else {\n step.style.maxWidth =\n this.connectorWidth > 100\n ? pxToRem(`${this.connectorWidth + 48}px`)\n : pxToRem(\"148px\");\n }\n }\n if (this.aligned === \"left\") {\n step.style.width =\n this.connectorWidth > 100\n ? pxToRem(`${this.connectorWidth + 48}px`)\n : pxToRem(\"148px\");\n const stepConnect = step.shadowRoot.querySelector(\".step > .step-top > .step-connect\");\n if (stepConnect) {\n stepConnect.style.width =\n this.connectorWidth > 100\n ? pxToRem(`${this.connectorWidth}px`)\n : pxToRem(\"100px\");\n }\n }\n if (this.hideStepInfo && stepTitleArea !== null) {\n stepTitleArea.classList.add(this.visuallyHidden);\n }\n }\n });\n };\n this.setHideStepInfo = () => {\n this.steps.forEach((step) => {\n var _a, _b;\n const stepTitleArea = step.shadowRoot.querySelector(\".step > .step-title-area\");\n if (stepTitleArea !== null) {\n if (this.hideStepInfo) {\n (_a = stepTitleArea.classList) === null || _a === void 0 ? void 0 : _a.add(this.visuallyHidden);\n }\n else {\n (_b = stepTitleArea.classList) === null || _b === void 0 ? void 0 : _b.remove(this.visuallyHidden);\n }\n }\n });\n };\n this.overrideVariant = () => {\n if (this.variantOverride) {\n let minDefaultStepperWidth = 148 * this.steps.length;\n if (this.aligned === \"left\" && this.connectorWidth > 100) {\n minDefaultStepperWidth = (this.connectorWidth + 48) * this.steps.length;\n }\n if (this.el.clientWidth < minDefaultStepperWidth) {\n this.variant = \"compact\";\n }\n else {\n this.variant = \"default\";\n }\n }\n };\n this.resizeObserverCallback = () => {\n this.getChildren();\n this.checkStepTitles();\n this.overrideVariant();\n this.setStepperWidth();\n this.initialiseStepStates();\n };\n this.runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n this.resizeObserverCallback();\n });\n this.resizeObserver.observe(this.el);\n };\n this.alignedFullWidth = true;\n this.autoSetStepTitles = true;\n this.lastStepWidth = 0;\n this.noOfResizes = 0;\n this.stepperWidth = document\n .querySelector(\"ic-stepper\")\n .getBoundingClientRect().width;\n this.stepTypes = [];\n this.variantOverride = this.variant !== \"compact\";\n this.aligned = \"full-width\";\n this.appearance = \"default\";\n this.connectorWidth = 100;\n this.hideStepInfo = false;\n this.variant = \"default\";\n }\n handlePropChange() {\n this.setHideStepInfo();\n this.getChildren();\n }\n disconnectedCallback() {\n if (this.resizeObserver !== null) {\n this.resizeObserver.disconnect();\n }\n }\n componentWillLoad() {\n this.setStepTypes();\n if (this.variant === \"compact\") {\n this.variantOverride = false;\n }\n }\n componentWillRender() {\n this.initialiseStepStates();\n }\n componentDidLoad() {\n checkResizeObserver(this.runResizeObserver);\n }\n render() {\n return (h(Host, { class: {\n [`${this.variant}`]: true,\n [\"aligned-left\"]: this.variant === \"default\" && this.aligned === \"left\",\n } }, h(\"ul\", { class: \"step-item-list\" }, h(\"slot\", null))));\n }\n static get is() { return \"ic-stepper\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-stepper.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-stepper.css\"]\n };\n }\n static get properties() {\n return {\n \"aligned\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcStepperAlignment\",\n \"resolved\": \"\\\"full-width\\\" | \\\"left\\\"\",\n \"references\": {\n \"IcStepperAlignment\": {\n \"location\": \"import\",\n \"path\": \"./ic-stepper.types\",\n \"id\": \"src/components/ic-stepper/ic-stepper.types.ts::IcStepperAlignment\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The alignment of the default stepper within its container.\"\n },\n \"attribute\": \"aligned\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"full-width\\\"\"\n },\n \"appearance\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"\\\"light\\\" | \\\"default\\\"\",\n \"resolved\": \"\\\"default\\\" | \\\"light\\\"\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The appearance of the stepper.\"\n },\n \"attribute\": \"appearance\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"default\\\"\"\n },\n \"connectorWidth\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The length of the connector between each step in pixels. Minimum length is 100px.\"\n },\n \"attribute\": \"connector-width\",\n \"reflect\": false,\n \"defaultValue\": \"100\"\n },\n \"hideStepInfo\": {\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`, the information about each step, i.e. step title, step subtitle and step status, will be hidden on all default steps. The information about each step will still be visible in the compact variant of the stepper.\"\n },\n \"attribute\": \"hide-step-info\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"variant\": {\n \"type\": \"string\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"IcStepVariants\",\n \"resolved\": \"\\\"compact\\\" | \\\"default\\\"\",\n \"references\": {\n \"IcStepVariants\": {\n \"location\": \"import\",\n \"path\": \"../ic-step/ic-step.types\",\n \"id\": \"src/components/ic-step/ic-step.types.ts::IcStepVariants\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The variant of the stepper.\"\n },\n \"attribute\": \"variant\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"default\\\"\"\n }\n };\n }\n static get states() {\n return {\n \"alignedFullWidth\": {},\n \"autoSetStepTitles\": {},\n \"lastStepWidth\": {},\n \"noOfResizes\": {},\n \"stepperWidth\": {},\n \"stepTypes\": {},\n \"variantOverride\": {}\n };\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"hideStepInfo\",\n \"methodName\": \"handlePropChange\"\n }, {\n \"propName\": \"variant\",\n \"methodName\": \"handlePropChange\"\n }];\n }\n}\n//# sourceMappingURL=ic-stepper.js.map\n"],"version":3}
@@ -52,7 +52,7 @@ const TabContext = class {
52
52
  }
53
53
  };
54
54
  // Determines how keyboard navigation is to be handled based on the activation type
55
- this.attatchEventListeners = () => {
55
+ this.attachEventListeners = () => {
56
56
  this.tabGroup.addEventListener("keydown", this.keydownHandler);
57
57
  };
58
58
  // Determines whether the selected tab is being controlled within the component
@@ -210,7 +210,7 @@ const TabContext = class {
210
210
  this.setControlledMode();
211
211
  this.getChildren();
212
212
  this.linkTabs();
213
- this.attatchEventListeners();
213
+ this.attachEventListeners();
214
214
  this.setInitialTab();
215
215
  this.configureTabs();
216
216
  }
@@ -1 +1 @@
1
- {"file":"ic-tab-context.entry.js","mappings":";;;MAEa,UAAU;IACnB;;;;QACI,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;;QAElB,IAAI,CAAC,QAAQ,GA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QAAQ,EAAE,CAAC;QAChB,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;YACjE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,QAAQ,GAAG,IAAI,CAAC;YAC5C,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,WAAW;gBACxC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC;SACzC;aACI;YACD,IAAI,CAAC,aAAa,EAAE,CAAC;SACxB;QACD,IAAI,QAAQ,EAAE;YACV,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,QAAQ,EAAE,CAAC;SAC1C;KACJ;IACD,MAAM;QACF,OAAO,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;KAC1B;;;;;;;;;;","names":[],"sources":["../web-components/dist/collection/components/ic-tab-context/ic-tab-context.js"],"sourcesContent":["import { h, } from \"@stencil/core\";\nimport { IcThemeForegroundEnum, } from \"../../utils/types\";\nexport class TabContext {\n constructor() {\n this.newTabPanels = [];\n this.newTabs = [];\n // Sets attributes to link tab-group, tabs and tab-panels\n this.linkTabs = () => {\n this.tabs.forEach((tab, index) => {\n const tabId = `ic-tab-${index}-context-${this.contextId}`;\n const tabPanelId = `ic-tab-panel-${index}-context-${this.contextId}`;\n const shared = `ic-tab--${index}-context-${this.contextId}`;\n const contextIdAttr = \"context-id\";\n tab.setAttribute(\"id\", tabId);\n tab.tabId = shared;\n tab.tabPosition = index;\n tab.setAttribute(\"aria-controls\", tabPanelId);\n tab.setAttribute(contextIdAttr, this.contextId);\n this.tabGroup.setAttribute(contextIdAttr, this.contextId);\n this.tabPanels[index].setAttribute(\"id\", tabPanelId);\n this.tabPanels[index].panelId = shared;\n this.tabPanels[index].tabPosition = index;\n this.tabPanels[index].setAttribute(\"aria-labelledby\", tabId);\n this.tabPanels[index].setAttribute(contextIdAttr, this.contextId);\n if (this.appearance === IcThemeForegroundEnum.Light) {\n tab.appearance = this.appearance;\n this.tabPanels[index].appearance = this.appearance;\n }\n });\n if (this.appearance === IcThemeForegroundEnum.Light) {\n this.tabGroup.appearance = this.appearance;\n }\n };\n // Gets tabs and tabpanels with the same context ID\n // Using querySelector to selector the children in relation to the host\n this.getChildren = () => {\n this.tabGroup = this.el.querySelector(\"ic-tab-group\");\n this.tabs = Array.from(this.tabGroup.querySelectorAll(\"ic-tab\"));\n this.tabPanels = Array.from(this.el.children).filter((child) => child.tagName === \"IC-TAB-PANEL\");\n this.enabledTabs = this.getEnabledTabs();\n };\n this.keydownHandler = (event) => {\n if (this.activationType === \"automatic\") {\n this.handleKeyBoardNavAutomatic(event);\n }\n else {\n this.handleKeyBoardNavManual(event);\n }\n };\n // Determines how keyboard navigation is to be handled based on the activation type\n this.attatchEventListeners = () => {\n this.tabGroup.addEventListener(\"keydown\", this.keydownHandler);\n };\n // Determines whether the selected tab is being controlled within the component\n // or by the user (via selectedTabIndex and onIcTabSelect)\n this.setControlledMode = () => {\n if (this.selectedTabIndex !== undefined) {\n this.controlledMode = true;\n this.selectedTab = this.selectedTabIndex;\n }\n };\n // Sets the tab that is selected on initial render\n this.setInitialTab = () => {\n if (this.controlledMode) {\n this.selectedTab = this.selectedTabIndex;\n this.focusedTabIndex = this.selectedTabIndex;\n }\n else {\n const firstEnabledTabIndex = this.tabs.findIndex((tab) => tab.tabId === this.enabledTabs[0].tabId);\n this.selectedTab = firstEnabledTabIndex;\n this.focusedTabIndex = firstEnabledTabIndex;\n }\n };\n // Passes the selected tab to the tab and tab panel components\n this.configureTabs = () => {\n this.enabledTabs.forEach((tab) => {\n tab.selected = tab.tabPosition === this.selectedTab;\n });\n this.tabPanels.forEach((tabPanel) => {\n tabPanel.selectedTab = this.tabs[this.selectedTab].tabId;\n });\n };\n this.getEnabledTabs = () => {\n return Array.from(this.tabs).filter((child) => !child.disabled);\n };\n this.getIndexOfEnabledTab = (allTabsIndex) => {\n return this.enabledTabs.findIndex((tab) => tab.tabId === this.tabs[allTabsIndex].tabId);\n };\n // Sets focus on tab and selects it\n this.keyboardSelectTab = (enabledTabIndex) => {\n const newIndex = this.tabs.findIndex((tab) => tab.tabId === this.enabledTabs[enabledTabIndex].tabId);\n this.enabledTabs[enabledTabIndex].focus();\n if (!this.controlledMode) {\n this.selectedTab = newIndex;\n }\n else {\n /* eslint-disable no-unexpected-multiline */\n this.icTabSelect.emit({\n tabIndex: newIndex,\n tabLabel: this.el\n .querySelectorAll(\"ic-tab\")[newIndex].textContent.trim(),\n });\n this.tabSelect.emit({\n tabIndex: newIndex,\n tabLabel: this.el\n .querySelectorAll(\"ic-tab\")[newIndex].textContent.trim(),\n });\n }\n /* eslint-enable no-unexpected-multiline */\n };\n // Sets focus on tab without selecting it (for manual activation)\n this.keyboardFocusTab = (enabledTabIndex) => {\n const newIndex = this.tabs.findIndex((tab) => tab.tabId === this.enabledTabs[enabledTabIndex].tabId);\n this.enabledTabs[enabledTabIndex].focus();\n this.focusedTabIndex = newIndex;\n };\n this.handleKeyBoardNavAutomatic = (event) => {\n const key = event.key;\n const enabledTabIndex = this.getIndexOfEnabledTab(this.selectedTab);\n let preventDefault = true;\n switch (key) {\n case \"Home\":\n this.keyboardSelectTab(0);\n break;\n case \"End\":\n this.keyboardSelectTab(this.enabledTabs.length - 1);\n break;\n case \"ArrowRight\":\n if (enabledTabIndex < this.enabledTabs.length - 1) {\n this.keyboardSelectTab(enabledTabIndex + 1);\n }\n else {\n this.keyboardSelectTab(0);\n }\n break;\n case \"ArrowLeft\":\n if (enabledTabIndex > 0) {\n this.keyboardSelectTab(enabledTabIndex - 1);\n }\n else {\n this.keyboardSelectTab(this.enabledTabs.length - 1);\n }\n break;\n default:\n preventDefault = false;\n }\n if (preventDefault)\n event.preventDefault();\n };\n this.handleKeyBoardNavManual = (event) => {\n const key = event.key;\n const enabledTabIndex = this.getIndexOfEnabledTab(this.focusedTabIndex);\n let preventDefault = true;\n switch (key) {\n case \"Home\":\n this.keyboardFocusTab(0);\n break;\n case \"End\":\n this.keyboardFocusTab(this.enabledTabs.length - 1);\n break;\n case \"ArrowRight\":\n if (enabledTabIndex < this.enabledTabs.length - 1) {\n this.keyboardFocusTab(enabledTabIndex + 1);\n }\n else {\n this.keyboardFocusTab(0);\n }\n break;\n case \"ArrowLeft\":\n if (enabledTabIndex > 0) {\n this.keyboardFocusTab(enabledTabIndex - 1);\n }\n else {\n this.keyboardFocusTab(this.enabledTabs.length - 1);\n }\n break;\n case \"Enter\":\n this.keyboardSelectTab(this.focusedTabIndex);\n break;\n case \" \":\n this.keyboardSelectTab(this.focusedTabIndex);\n break;\n default:\n preventDefault = false;\n }\n if (preventDefault)\n event.preventDefault();\n };\n this.selectedTab = undefined;\n this.activationType = \"automatic\";\n this.appearance = \"dark\";\n this.contextId = \"default\";\n this.selectedTabIndex = undefined;\n }\n watchAppearanceHandler() {\n this.tabs.forEach((tab, index) => {\n tab.appearance = this.appearance;\n this.tabPanels[index].appearance = this.appearance;\n });\n this.tabGroup.appearance = this.appearance;\n }\n updateSelectedTab(newValue) {\n this.selectedTab = newValue;\n }\n componentDidLoad() {\n this.setControlledMode();\n this.getChildren();\n this.linkTabs();\n this.attatchEventListeners();\n this.setInitialTab();\n this.configureTabs();\n }\n componentWillUpdate() {\n this.configureTabs();\n }\n disconnectedCallback() {\n this.tabGroup.removeEventListener(\"keydown\", this.keydownHandler);\n }\n tabClickHandler(event) {\n if (this.selectedTabIndex === undefined &&\n event.detail.contextId === this.contextId) {\n this.selectedTab = event.detail.position;\n }\n /* eslint-disable no-unexpected-multiline */\n this.icTabSelect.emit({\n tabIndex: event.detail.position,\n tabLabel: this.el\n .querySelectorAll(\"ic-tab\")[event.detail.position].textContent.trim(),\n });\n this.tabSelect.emit({\n tabIndex: event.detail.position,\n tabLabel: this.el\n .querySelectorAll(\"ic-tab\")[event.detail.position].textContent.trim(),\n });\n /* eslint-enable no-unexpected-multiline */\n event.stopImmediatePropagation();\n }\n tabCreatedHandler(ev) {\n if (this.tabs && this.tabPanels) {\n (ev.detail.setFocus ? this.newTabs : this.newTabPanels).push(ev.detail);\n if (this.newTabs.length === this.newTabPanels.length) {\n this.tabs.push(...this.newTabs);\n this.tabPanels.push(...this.newTabPanels);\n this.enabledTabs = this.getEnabledTabs();\n this.linkTabs();\n this.newTabs = [];\n this.newTabPanels = [];\n }\n }\n }\n tabEnabledHandler() {\n this.enabledTabs = this.getEnabledTabs();\n }\n /**\n * @internal Used to set tab/tab panel IDs when a tab/tab panel has been removed\n */\n async tabRemovedHandler(hadFocus) {\n this.getChildren();\n this.enabledTabs = this.getEnabledTabs();\n this.linkTabs();\n if (this.tabs[this.selectedTab] && this.tabPanels[this.selectedTab]) {\n this.tabs[this.selectedTab].selected = true;\n this.tabPanels[this.selectedTab].selectedTab =\n this.tabs[this.selectedTab].tabId;\n }\n else {\n this.setInitialTab();\n }\n if (hadFocus) {\n this.tabs[this.selectedTab].setFocus();\n }\n }\n render() {\n return h(\"slot\", null);\n }\n static get is() { return \"ic-tab-context\"; }\n static get properties() {\n return {\n \"activationType\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcActivationTypes\",\n \"resolved\": \"\\\"automatic\\\" | \\\"manual\\\"\",\n \"references\": {\n \"IcActivationTypes\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcActivationTypes\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Determines whether tabs have to be manually activated (by pressing 'Enter' or 'Space') when they receive focus using keyboard navigation.\"\n },\n \"attribute\": \"activation-type\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"automatic\\\"\"\n },\n \"appearance\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcThemeForegroundNoDefault\",\n \"resolved\": \"\\\"dark\\\" | \\\"light\\\"\",\n \"references\": {\n \"IcThemeForegroundNoDefault\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcThemeForegroundNoDefault\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The appearance of the tab context, e.g dark, or light.\"\n },\n \"attribute\": \"appearance\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"dark\\\"\"\n },\n \"contextId\": {\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 unique context needed if using multiple tabs inside one another i.e. rendering another set of tabs inside a tab panel.\"\n },\n \"attribute\": \"context-id\",\n \"reflect\": true,\n \"defaultValue\": \"\\\"default\\\"\"\n },\n \"selectedTabIndex\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The selected tab to be controlled by the user. Must be used alongside the icTabSelect event to manage tab selection.\"\n },\n \"attribute\": \"selected-tab-index\",\n \"reflect\": false\n }\n };\n }\n static get states() {\n return {\n \"selectedTab\": {}\n };\n }\n static get events() {\n return [{\n \"method\": \"icTabSelect\",\n \"name\": \"icTabSelect\",\n \"bubbles\": false,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when a user selects a tab.\"\n },\n \"complexType\": {\n \"original\": \"IcTabSelectEventDetail\",\n \"resolved\": \"IcTabSelectEventDetail\",\n \"references\": {\n \"IcTabSelectEventDetail\": {\n \"location\": \"import\",\n \"path\": \"../ic-tab/ic-tab.types\",\n \"id\": \"src/components/ic-tab/ic-tab.types.ts::IcTabSelectEventDetail\"\n }\n }\n }\n }, {\n \"method\": \"tabSelect\",\n \"name\": \"tabSelect\",\n \"bubbles\": false,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"deprecated\",\n \"text\": \"This event should not be used anymore. Use icTabSelect instead.\"\n }],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"IcTabSelectEventDetail\",\n \"resolved\": \"IcTabSelectEventDetail\",\n \"references\": {\n \"IcTabSelectEventDetail\": {\n \"location\": \"import\",\n \"path\": \"../ic-tab/ic-tab.types\",\n \"id\": \"src/components/ic-tab/ic-tab.types.ts::IcTabSelectEventDetail\"\n }\n }\n }\n }];\n }\n static get methods() {\n return {\n \"tabRemovedHandler\": {\n \"complexType\": {\n \"signature\": \"(hadFocus?: boolean) => Promise<void>\",\n \"parameters\": [{\n \"name\": \"hadFocus\",\n \"type\": \"boolean\",\n \"docs\": \"\"\n }],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"\",\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Used to set tab/tab panel IDs when a tab/tab panel has been removed\"\n }]\n }\n }\n };\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"appearance\",\n \"methodName\": \"watchAppearanceHandler\"\n }, {\n \"propName\": \"selectedTabIndex\",\n \"methodName\": \"updateSelectedTab\"\n }];\n }\n static get listeners() {\n return [{\n \"name\": \"tabClick\",\n \"method\": \"tabClickHandler\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }, {\n \"name\": \"tabCreated\",\n \"method\": \"tabCreatedHandler\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }, {\n \"name\": \"tabPanelCreated\",\n \"method\": \"tabCreatedHandler\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }, {\n \"name\": \"tabEnabled\",\n \"method\": \"tabEnabledHandler\",\n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AAC;aAC1B;SACJ;KACJ;IACD,iBAAiB;QACb,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;KAC5C;;;;IAID,MAAM,iBAAiB,CAAC,QAAQ;QAC5B,IAAI,CAAC,WAAW,EAAE,CAAC;QACnB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;QACzC,IAAI,CAAC,QAAQ,EAAE,CAAC;QAChB,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;YACjE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,QAAQ,GAAG,IAAI,CAAC;YAC5C,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,WAAW;gBACxC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC;SACzC;aACI;YACD,IAAI,CAAC,aAAa,EAAE,CAAC;SACxB;QACD,IAAI,QAAQ,EAAE;YACV,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,QAAQ,EAAE,CAAC;SAC1C;KACJ;IACD,MAAM;QACF,OAAO,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;KAC1B;;;;;;;;;;","names":[],"sources":["../web-components/dist/collection/components/ic-tab-context/ic-tab-context.js"],"sourcesContent":["import { h, } from \"@stencil/core\";\nimport { IcThemeForegroundEnum, } from \"../../utils/types\";\nexport class TabContext {\n constructor() {\n this.newTabPanels = [];\n this.newTabs = [];\n // Sets attributes to link tab-group, tabs and tab-panels\n this.linkTabs = () => {\n this.tabs.forEach((tab, index) => {\n const tabId = `ic-tab-${index}-context-${this.contextId}`;\n const tabPanelId = `ic-tab-panel-${index}-context-${this.contextId}`;\n const shared = `ic-tab--${index}-context-${this.contextId}`;\n const contextIdAttr = \"context-id\";\n tab.setAttribute(\"id\", tabId);\n tab.tabId = shared;\n tab.tabPosition = index;\n tab.setAttribute(\"aria-controls\", tabPanelId);\n tab.setAttribute(contextIdAttr, this.contextId);\n this.tabGroup.setAttribute(contextIdAttr, this.contextId);\n this.tabPanels[index].setAttribute(\"id\", tabPanelId);\n this.tabPanels[index].panelId = shared;\n this.tabPanels[index].tabPosition = index;\n this.tabPanels[index].setAttribute(\"aria-labelledby\", tabId);\n this.tabPanels[index].setAttribute(contextIdAttr, this.contextId);\n if (this.appearance === IcThemeForegroundEnum.Light) {\n tab.appearance = this.appearance;\n this.tabPanels[index].appearance = this.appearance;\n }\n });\n if (this.appearance === IcThemeForegroundEnum.Light) {\n this.tabGroup.appearance = this.appearance;\n }\n };\n // Gets tabs and tabpanels with the same context ID\n // Using querySelector to selector the children in relation to the host\n this.getChildren = () => {\n this.tabGroup = this.el.querySelector(\"ic-tab-group\");\n this.tabs = Array.from(this.tabGroup.querySelectorAll(\"ic-tab\"));\n this.tabPanels = Array.from(this.el.children).filter((child) => child.tagName === \"IC-TAB-PANEL\");\n this.enabledTabs = this.getEnabledTabs();\n };\n this.keydownHandler = (event) => {\n if (this.activationType === \"automatic\") {\n this.handleKeyBoardNavAutomatic(event);\n }\n else {\n this.handleKeyBoardNavManual(event);\n }\n };\n // Determines how keyboard navigation is to be handled based on the activation type\n this.attachEventListeners = () => {\n this.tabGroup.addEventListener(\"keydown\", this.keydownHandler);\n };\n // Determines whether the selected tab is being controlled within the component\n // or by the user (via selectedTabIndex and onIcTabSelect)\n this.setControlledMode = () => {\n if (this.selectedTabIndex !== undefined) {\n this.controlledMode = true;\n this.selectedTab = this.selectedTabIndex;\n }\n };\n // Sets the tab that is selected on initial render\n this.setInitialTab = () => {\n if (this.controlledMode) {\n this.selectedTab = this.selectedTabIndex;\n this.focusedTabIndex = this.selectedTabIndex;\n }\n else {\n const firstEnabledTabIndex = this.tabs.findIndex((tab) => tab.tabId === this.enabledTabs[0].tabId);\n this.selectedTab = firstEnabledTabIndex;\n this.focusedTabIndex = firstEnabledTabIndex;\n }\n };\n // Passes the selected tab to the tab and tab panel components\n this.configureTabs = () => {\n this.enabledTabs.forEach((tab) => {\n tab.selected = tab.tabPosition === this.selectedTab;\n });\n this.tabPanels.forEach((tabPanel) => {\n tabPanel.selectedTab = this.tabs[this.selectedTab].tabId;\n });\n };\n this.getEnabledTabs = () => {\n return Array.from(this.tabs).filter((child) => !child.disabled);\n };\n this.getIndexOfEnabledTab = (allTabsIndex) => {\n return this.enabledTabs.findIndex((tab) => tab.tabId === this.tabs[allTabsIndex].tabId);\n };\n // Sets focus on tab and selects it\n this.keyboardSelectTab = (enabledTabIndex) => {\n const newIndex = this.tabs.findIndex((tab) => tab.tabId === this.enabledTabs[enabledTabIndex].tabId);\n this.enabledTabs[enabledTabIndex].focus();\n if (!this.controlledMode) {\n this.selectedTab = newIndex;\n }\n else {\n /* eslint-disable no-unexpected-multiline */\n this.icTabSelect.emit({\n tabIndex: newIndex,\n tabLabel: this.el\n .querySelectorAll(\"ic-tab\")[newIndex].textContent.trim(),\n });\n this.tabSelect.emit({\n tabIndex: newIndex,\n tabLabel: this.el\n .querySelectorAll(\"ic-tab\")[newIndex].textContent.trim(),\n });\n }\n /* eslint-enable no-unexpected-multiline */\n };\n // Sets focus on tab without selecting it (for manual activation)\n this.keyboardFocusTab = (enabledTabIndex) => {\n const newIndex = this.tabs.findIndex((tab) => tab.tabId === this.enabledTabs[enabledTabIndex].tabId);\n this.enabledTabs[enabledTabIndex].focus();\n this.focusedTabIndex = newIndex;\n };\n this.handleKeyBoardNavAutomatic = (event) => {\n const key = event.key;\n const enabledTabIndex = this.getIndexOfEnabledTab(this.selectedTab);\n let preventDefault = true;\n switch (key) {\n case \"Home\":\n this.keyboardSelectTab(0);\n break;\n case \"End\":\n this.keyboardSelectTab(this.enabledTabs.length - 1);\n break;\n case \"ArrowRight\":\n if (enabledTabIndex < this.enabledTabs.length - 1) {\n this.keyboardSelectTab(enabledTabIndex + 1);\n }\n else {\n this.keyboardSelectTab(0);\n }\n break;\n case \"ArrowLeft\":\n if (enabledTabIndex > 0) {\n this.keyboardSelectTab(enabledTabIndex - 1);\n }\n else {\n this.keyboardSelectTab(this.enabledTabs.length - 1);\n }\n break;\n default:\n preventDefault = false;\n }\n if (preventDefault)\n event.preventDefault();\n };\n this.handleKeyBoardNavManual = (event) => {\n const key = event.key;\n const enabledTabIndex = this.getIndexOfEnabledTab(this.focusedTabIndex);\n let preventDefault = true;\n switch (key) {\n case \"Home\":\n this.keyboardFocusTab(0);\n break;\n case \"End\":\n this.keyboardFocusTab(this.enabledTabs.length - 1);\n break;\n case \"ArrowRight\":\n if (enabledTabIndex < this.enabledTabs.length - 1) {\n this.keyboardFocusTab(enabledTabIndex + 1);\n }\n else {\n this.keyboardFocusTab(0);\n }\n break;\n case \"ArrowLeft\":\n if (enabledTabIndex > 0) {\n this.keyboardFocusTab(enabledTabIndex - 1);\n }\n else {\n this.keyboardFocusTab(this.enabledTabs.length - 1);\n }\n break;\n case \"Enter\":\n this.keyboardSelectTab(this.focusedTabIndex);\n break;\n case \" \":\n this.keyboardSelectTab(this.focusedTabIndex);\n break;\n default:\n preventDefault = false;\n }\n if (preventDefault)\n event.preventDefault();\n };\n this.selectedTab = undefined;\n this.activationType = \"automatic\";\n this.appearance = \"dark\";\n this.contextId = \"default\";\n this.selectedTabIndex = undefined;\n }\n watchAppearanceHandler() {\n this.tabs.forEach((tab, index) => {\n tab.appearance = this.appearance;\n this.tabPanels[index].appearance = this.appearance;\n });\n this.tabGroup.appearance = this.appearance;\n }\n updateSelectedTab(newValue) {\n this.selectedTab = newValue;\n }\n componentDidLoad() {\n this.setControlledMode();\n this.getChildren();\n this.linkTabs();\n this.attachEventListeners();\n this.setInitialTab();\n this.configureTabs();\n }\n componentWillUpdate() {\n this.configureTabs();\n }\n disconnectedCallback() {\n this.tabGroup.removeEventListener(\"keydown\", this.keydownHandler);\n }\n tabClickHandler(event) {\n if (this.selectedTabIndex === undefined &&\n event.detail.contextId === this.contextId) {\n this.selectedTab = event.detail.position;\n }\n /* eslint-disable no-unexpected-multiline */\n this.icTabSelect.emit({\n tabIndex: event.detail.position,\n tabLabel: this.el\n .querySelectorAll(\"ic-tab\")[event.detail.position].textContent.trim(),\n });\n this.tabSelect.emit({\n tabIndex: event.detail.position,\n tabLabel: this.el\n .querySelectorAll(\"ic-tab\")[event.detail.position].textContent.trim(),\n });\n /* eslint-enable no-unexpected-multiline */\n event.stopImmediatePropagation();\n }\n tabCreatedHandler(ev) {\n if (this.tabs && this.tabPanels) {\n (ev.detail.setFocus ? this.newTabs : this.newTabPanels).push(ev.detail);\n if (this.newTabs.length === this.newTabPanels.length) {\n this.tabs.push(...this.newTabs);\n this.tabPanels.push(...this.newTabPanels);\n this.enabledTabs = this.getEnabledTabs();\n this.linkTabs();\n this.newTabs = [];\n this.newTabPanels = [];\n }\n }\n }\n tabEnabledHandler() {\n this.enabledTabs = this.getEnabledTabs();\n }\n /**\n * @internal Used to set tab/tab panel IDs when a tab/tab panel has been removed\n */\n async tabRemovedHandler(hadFocus) {\n this.getChildren();\n this.enabledTabs = this.getEnabledTabs();\n this.linkTabs();\n if (this.tabs[this.selectedTab] && this.tabPanels[this.selectedTab]) {\n this.tabs[this.selectedTab].selected = true;\n this.tabPanels[this.selectedTab].selectedTab =\n this.tabs[this.selectedTab].tabId;\n }\n else {\n this.setInitialTab();\n }\n if (hadFocus) {\n this.tabs[this.selectedTab].setFocus();\n }\n }\n render() {\n return h(\"slot\", null);\n }\n static get is() { return \"ic-tab-context\"; }\n static get properties() {\n return {\n \"activationType\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcActivationTypes\",\n \"resolved\": \"\\\"automatic\\\" | \\\"manual\\\"\",\n \"references\": {\n \"IcActivationTypes\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcActivationTypes\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Determines whether tabs have to be manually activated (by pressing 'Enter' or 'Space') when they receive focus using keyboard navigation.\"\n },\n \"attribute\": \"activation-type\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"automatic\\\"\"\n },\n \"appearance\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcThemeForegroundNoDefault\",\n \"resolved\": \"\\\"dark\\\" | \\\"light\\\"\",\n \"references\": {\n \"IcThemeForegroundNoDefault\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcThemeForegroundNoDefault\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The appearance of the tab context, e.g dark, or light.\"\n },\n \"attribute\": \"appearance\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"dark\\\"\"\n },\n \"contextId\": {\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 unique context needed if using multiple tabs inside one another i.e. rendering another set of tabs inside a tab panel.\"\n },\n \"attribute\": \"context-id\",\n \"reflect\": true,\n \"defaultValue\": \"\\\"default\\\"\"\n },\n \"selectedTabIndex\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The selected tab to be controlled by the user. Must be used alongside the icTabSelect event to manage tab selection.\"\n },\n \"attribute\": \"selected-tab-index\",\n \"reflect\": false\n }\n };\n }\n static get states() {\n return {\n \"selectedTab\": {}\n };\n }\n static get events() {\n return [{\n \"method\": \"icTabSelect\",\n \"name\": \"icTabSelect\",\n \"bubbles\": false,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when a user selects a tab.\"\n },\n \"complexType\": {\n \"original\": \"IcTabSelectEventDetail\",\n \"resolved\": \"IcTabSelectEventDetail\",\n \"references\": {\n \"IcTabSelectEventDetail\": {\n \"location\": \"import\",\n \"path\": \"../ic-tab/ic-tab.types\",\n \"id\": \"src/components/ic-tab/ic-tab.types.ts::IcTabSelectEventDetail\"\n }\n }\n }\n }, {\n \"method\": \"tabSelect\",\n \"name\": \"tabSelect\",\n \"bubbles\": false,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"deprecated\",\n \"text\": \"This event should not be used anymore. Use icTabSelect instead.\"\n }],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"IcTabSelectEventDetail\",\n \"resolved\": \"IcTabSelectEventDetail\",\n \"references\": {\n \"IcTabSelectEventDetail\": {\n \"location\": \"import\",\n \"path\": \"../ic-tab/ic-tab.types\",\n \"id\": \"src/components/ic-tab/ic-tab.types.ts::IcTabSelectEventDetail\"\n }\n }\n }\n }];\n }\n static get methods() {\n return {\n \"tabRemovedHandler\": {\n \"complexType\": {\n \"signature\": \"(hadFocus?: boolean) => Promise<void>\",\n \"parameters\": [{\n \"name\": \"hadFocus\",\n \"type\": \"boolean\",\n \"docs\": \"\"\n }],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"\",\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Used to set tab/tab panel IDs when a tab/tab panel has been removed\"\n }]\n }\n }\n };\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"appearance\",\n \"methodName\": \"watchAppearanceHandler\"\n }, {\n \"propName\": \"selectedTabIndex\",\n \"methodName\": \"updateSelectedTab\"\n }];\n }\n static get listeners() {\n return [{\n \"name\": \"tabClick\",\n \"method\": \"tabClickHandler\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }, {\n \"name\": \"tabCreated\",\n \"method\": \"tabCreatedHandler\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }, {\n \"name\": \"tabPanelCreated\",\n \"method\": \"tabCreatedHandler\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }, {\n \"name\": \"tabEnabled\",\n \"method\": \"tabEnabledHandler\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }];\n }\n}\n//# sourceMappingURL=ic-tab-context.js.map\n"],"version":3}
@@ -42,7 +42,7 @@ const Tab = class {
42
42
  this.handleMouseDown = () => {
43
43
  //set flag so that focus gets handled after click
44
44
  //there is a timing issue where a long click only causes focus to happen & not the click
45
- //the focus does need to be a seperate event though to handle focus from keyboard
45
+ //the focus does need to be a separate event though to handle focus from keyboard
46
46
  this.focusFromClick = true;
47
47
  };
48
48
  this.appearance = "dark";
@@ -1 +1 @@
1
- {"file":"ic-tab.entry.js","mappings":";;;;AAAA,MAAM,QAAQ,GAAG,khIAAkhI;;MCOthI,GAAG;IACZ;;;;;;;QACI,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;QAC5B,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;QAC5B,IAAI,CAAC,WAAW,GAAG;YACf,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;gBACf,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,SAAS,EAAE,IAAI,CAAC,SAAS;gBACzB,QAAQ,EAAE,IAAI,CAAC,WAAW;aAC7B,CAAC,CAAC;YACH,IAAI,IAAI,CAAC,cAAc,EAAE;gBACrB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;oBACf,KAAK,EAAE,IAAI,CAAC,KAAK;oBACjB,SAAS,EAAE,IAAI,CAAC,SAAS;oBACzB,QAAQ,EAAE,IAAI,CAAC,WAAW;iBAC7B,CAAC,CAAC;gBACH,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;aAC/B;SACJ,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web-components/dist/collection/components/ic-tab/ic-tab.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:host {\n --indicator-initial-color: rgba(23 89 188 / 0%);\n --indicator-color: var(--ic-action-default);\n --focus-indicator: var(--ic-border-focus);\n --label-color: var(--ic-color-primary-text);\n --background-color-hover: var(--ic-action-default-bg-hover);\n --background-color-active: var(--ic-action-default-bg-active);\n\n display: flex;\n align-items: center;\n border-radius: 0;\n color: var(--label-color);\n height: 2.5rem;\n padding: 0 var(--ic-space-md);\n cursor: pointer;\n position: relative;\n border-bottom: var(--ic-space-xxs) solid var(--indicator-initial-color);\n gap: var(--ic-space-xs);\n transition: all var(--ic-easing-transition-fast);\n}\n\n:host(:focus) {\n box-shadow: var(--focus-indicator);\n border-radius: var(--ic-border-radius);\n}\n\n:host(:focus-visible) {\n outline: var(--ic-hc-focus-outline);\n}\n\n:host(:hover) {\n background-color: var(--background-color-hover);\n}\n\n:host(:active) {\n background-color: var(--background-color-active);\n}\n\n:host(.ic-tab-light) {\n --indicator-initial-color: rgb(255 255 255 / 0%);\n --indicator-color: rgb(255 255 255 / 100%);\n --focus-indicator: var(--ic-border-focus);\n --label-color: white;\n --background-color-hover: var(--ic-action-dark-bg-hover);\n --background-color-active: var(--ic-action-dark-bg-active);\n}\n\n:host(.selected) {\n border-bottom: var(--ic-space-xxs) solid var(--indicator-color);\n}\n\n:host(.disabled) {\n pointer-events: none;\n color: var(--ic-architectural-300);\n}\n\n@media (prefers-reduced-motion: no-preference) {\n :host(.selected.with-transition) {\n transition: all var(--ic-easing-transition-slow),\n border-color var(--ic-transition-duration-slow);\n }\n}\n\n.ic-tab-label {\n pointer-events: none;\n text-wrap: nowrap;\n}\n\n::slotted(svg) {\n fill: currentcolor;\n}\n\n@media (forced-colors: active) {\n :host {\n border-bottom: var(--ic-space-xxs) solid canvas;\n }\n\n :host(.disabled) {\n color: GrayText;\n }\n}\n\n/* Add back in after storybook has the `color-scheme: light dark` code */\n\n/* @media (prefers-color-scheme: dark) and (not (forced-colors: active)) {\n :host(ic-tab) .ic-tab-label {\n color: var(--ic-architectural-white);\n }\n :host(ic-tab.disabled) .ic-tab-label {\n color: inherit;\n }\n} */\n","import { Host, h, } from \"@stencil/core\";\nimport { IcThemeForegroundEnum, } from \"../../utils/types\";\nimport { isSlotUsed, removeDisabledFalse } from \"../../utils/helpers\";\n/**\n * @slot icon - Content will be rendered next to the tab label.\n * @slot badge - Badge component displayed inline with the tab.\n */\nexport class Tab {\n constructor() {\n this.focusFromClick = false;\n this.isInitialRender = true;\n this.handleClick = () => {\n this.tabClick.emit({\n tabId: this.tabId,\n contextId: this.contextId,\n position: this.tabPosition,\n });\n if (this.focusFromClick) {\n this.tabFocus.emit({\n tabId: this.tabId,\n contextId: this.contextId,\n position: this.tabPosition,\n });\n this.focusFromClick = false;\n }\n };\n this.handleFocus = () => {\n if (!this.focusFromClick) {\n this.focusTabId = this.tabId;\n this.tabFocus.emit({\n tabId: this.tabId,\n contextId: this.contextId,\n position: this.tabPosition,\n });\n }\n };\n this.handleMouseDown = () => {\n //set flag so that focus gets handled after click\n //there is a timing issue where a long click only causes focus to happen & not the click\n //the focus does need to be a seperate event though to handle focus from keyboard\n this.focusFromClick = true;\n };\n this.appearance = \"dark\";\n this.contextId = \"default\";\n this.disabled = false;\n this.selected = false;\n this.tabId = undefined;\n this.tabPosition = undefined;\n }\n disabledWatchHandler() {\n this.tabEnabled.emit();\n }\n connectedCallback() {\n this.tabCreated.emit(this.el);\n }\n disconnectedCallback() {\n const tabContext = document.querySelector(`ic-tab-context[context-id=${this.contextId}]`);\n if (tabContext) {\n tabContext.tabRemovedHandler(!!this.focusTabId);\n }\n }\n componentWillLoad() {\n removeDisabledFalse(this.disabled, this.el);\n }\n componentDidUpdate() {\n this.isInitialRender = false;\n }\n /**\n * Sets focus on the tab.\n */\n async setFocus() {\n if (this.el) {\n this.el.focus();\n }\n }\n render() {\n const { disabled, selected, appearance } = this;\n return (h(Host, { class: {\n [\"with-transition\"]: !this.isInitialRender,\n [\"ic-tab-light\"]: appearance === IcThemeForegroundEnum.Light,\n [\"selected\"]: selected,\n [\"disabled\"]: disabled,\n }, role: \"tab\", \"aria-selected\": selected ? \"true\" : \"false\", onClick: this.handleClick, onFocus: this.handleFocus, onMouseDown: this.handleMouseDown, \"aria-disabled\": disabled ? \"true\" : \"false\", tabindex: this.selected ? 0 : -1 }, this.el.querySelector('[slot=\"icon\"]') && h(\"slot\", { name: \"icon\" }), h(\"ic-typography\", { class: \"ic-tab-label\", variant: \"label\" }, h(\"span\", null, h(\"slot\", null))), isSlotUsed(this.el, \"badge\") && h(\"slot\", { name: \"badge\" })));\n }\n static get is() { return \"ic-tab\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-tab.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-tab.css\"]\n };\n }\n static get properties() {\n return {\n \"appearance\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcThemeForegroundNoDefault\",\n \"resolved\": \"\\\"dark\\\" | \\\"light\\\"\",\n \"references\": {\n \"IcThemeForegroundNoDefault\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcThemeForegroundNoDefault\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Determines whether the light or dark variant of the tabs should be displayed.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"appearance\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"dark\\\"\"\n },\n \"contextId\": {\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 \"name\": \"internal\",\n \"text\": \"The unique context needed if using multiple tabs inside one another i.e. rendering another tabs inside a tab panel.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"context-id\",\n \"reflect\": true,\n \"defaultValue\": \"\\\"default\\\"\"\n },\n \"disabled\": {\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`, the disabled state will be set.\"\n },\n \"attribute\": \"disabled\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"selected\": {\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 \"name\": \"internal\",\n \"text\": \"If `true`, the tab will display with a selected indicator and tabIndex will be set.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"selected\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"tabId\": {\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 \"name\": \"internal\",\n \"text\": \"The shared ID between panel and tab.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"tab-id\",\n \"reflect\": true\n },\n \"tabPosition\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"The position of the tab inside the tabs array in context.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"tab-position\",\n \"reflect\": false\n }\n };\n }\n static get events() {\n return [{\n \"method\": \"tabClick\",\n \"name\": \"tabClick\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Emitted when a tab is selected.\"\n }],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"IcTabClickEventDetail\",\n \"resolved\": \"IcTabClickEventDetail\",\n \"references\": {\n \"IcTabClickEventDetail\": {\n \"location\": \"import\",\n \"path\": \"./ic-tab.types\",\n \"id\": \"src/components/ic-tab/ic-tab.types.ts::IcTabClickEventDetail\"\n }\n }\n }\n }, {\n \"method\": \"tabCreated\",\n \"name\": \"tabCreated\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Emitted when a tab is dynamically created.\"\n }],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"HTMLIcTabElement\",\n \"resolved\": \"HTMLIcTabElement\",\n \"references\": {\n \"HTMLIcTabElement\": {\n \"location\": \"global\",\n \"id\": \"global::HTMLIcTabElement\"\n }\n }\n }\n }, {\n \"method\": \"tabEnabled\",\n \"name\": \"tabEnabled\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Emitted when a tab's disabled prop changes\"\n }],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"void\",\n \"resolved\": \"void\",\n \"references\": {}\n }\n }, {\n \"method\": \"tabFocus\",\n \"name\": \"tabFocus\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Emitted when a tab is focussed.\"\n }],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"IcTabClickEventDetail\",\n \"resolved\": \"IcTabClickEventDetail\",\n \"references\": {\n \"IcTabClickEventDetail\": {\n \"location\": \"import\",\n \"path\": \"./ic-tab.types\",\n \"id\": \"src/components/ic-tab/ic-tab.types.ts::IcTabClickEventDetail\"\n }\n }\n }\n }, {\n \"method\": \"tabRemoved\",\n \"name\": \"tabRemoved\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Emitted when a tab is unmounted.\"\n }],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"void\",\n \"resolved\": \"void\",\n \"references\": {}\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 tab.\",\n \"tags\": []\n }\n }\n };\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"disabled\",\n \"methodName\": \"disabledWatchHandler\"\n }];\n }\n}\n//# sourceMappingURL=ic-tab.js.map\n"],"version":3}
1
+ {"file":"ic-tab.entry.js","mappings":";;;;AAAA,MAAM,QAAQ,GAAG,khIAAkhI;;MCOthI,GAAG;IACZ;;;;;;;QACI,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;QAC5B,IAAI,CAAC,eAAe,GAAG,IAAI,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,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC,eAAe,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE;KACzd;;;;;;;;;;","names":[],"sources":["../web-components/dist/collection/components/ic-tab/ic-tab.css?tag=ic-tab&encapsulation=shadow","../web-components/dist/collection/components/ic-tab/ic-tab.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:host {\n --indicator-initial-color: rgba(23 89 188 / 0%);\n --indicator-color: var(--ic-action-default);\n --focus-indicator: var(--ic-border-focus);\n --label-color: var(--ic-color-primary-text);\n --background-color-hover: var(--ic-action-default-bg-hover);\n --background-color-active: var(--ic-action-default-bg-active);\n\n display: flex;\n align-items: center;\n border-radius: 0;\n color: var(--label-color);\n height: 2.5rem;\n padding: 0 var(--ic-space-md);\n cursor: pointer;\n position: relative;\n border-bottom: var(--ic-space-xxs) solid var(--indicator-initial-color);\n gap: var(--ic-space-xs);\n transition: all var(--ic-easing-transition-fast);\n}\n\n:host(:focus) {\n box-shadow: var(--focus-indicator);\n border-radius: var(--ic-border-radius);\n}\n\n:host(:focus-visible) {\n outline: var(--ic-hc-focus-outline);\n}\n\n:host(:hover) {\n background-color: var(--background-color-hover);\n}\n\n:host(:active) {\n background-color: var(--background-color-active);\n}\n\n:host(.ic-tab-light) {\n --indicator-initial-color: rgb(255 255 255 / 0%);\n --indicator-color: rgb(255 255 255 / 100%);\n --focus-indicator: var(--ic-border-focus);\n --label-color: white;\n --background-color-hover: var(--ic-action-dark-bg-hover);\n --background-color-active: var(--ic-action-dark-bg-active);\n}\n\n:host(.selected) {\n border-bottom: var(--ic-space-xxs) solid var(--indicator-color);\n}\n\n:host(.disabled) {\n pointer-events: none;\n color: var(--ic-architectural-300);\n}\n\n@media (prefers-reduced-motion: no-preference) {\n :host(.selected.with-transition) {\n transition: all var(--ic-easing-transition-slow),\n border-color var(--ic-transition-duration-slow);\n }\n}\n\n.ic-tab-label {\n pointer-events: none;\n text-wrap: nowrap;\n}\n\n::slotted(svg) {\n fill: currentcolor;\n}\n\n@media (forced-colors: active) {\n :host {\n border-bottom: var(--ic-space-xxs) solid canvas;\n }\n\n :host(.disabled) {\n color: GrayText;\n }\n}\n\n/* Add back in after storybook has the `color-scheme: light dark` code */\n\n/* @media (prefers-color-scheme: dark) and (not (forced-colors: active)) {\n :host(ic-tab) .ic-tab-label {\n color: var(--ic-architectural-white);\n }\n :host(ic-tab.disabled) .ic-tab-label {\n color: inherit;\n }\n} */\n","import { Host, h, } from \"@stencil/core\";\nimport { IcThemeForegroundEnum, } from \"../../utils/types\";\nimport { isSlotUsed, removeDisabledFalse } from \"../../utils/helpers\";\n/**\n * @slot icon - Content will be rendered next to the tab label.\n * @slot badge - Badge component displayed inline with the tab.\n */\nexport class Tab {\n constructor() {\n this.focusFromClick = false;\n this.isInitialRender = true;\n this.handleClick = () => {\n this.tabClick.emit({\n tabId: this.tabId,\n contextId: this.contextId,\n position: this.tabPosition,\n });\n if (this.focusFromClick) {\n this.tabFocus.emit({\n tabId: this.tabId,\n contextId: this.contextId,\n position: this.tabPosition,\n });\n this.focusFromClick = false;\n }\n };\n this.handleFocus = () => {\n if (!this.focusFromClick) {\n this.focusTabId = this.tabId;\n this.tabFocus.emit({\n tabId: this.tabId,\n contextId: this.contextId,\n position: this.tabPosition,\n });\n }\n };\n this.handleMouseDown = () => {\n //set flag so that focus gets handled after click\n //there is a timing issue where a long click only causes focus to happen & not the click\n //the focus does need to be a separate event though to handle focus from keyboard\n this.focusFromClick = true;\n };\n this.appearance = \"dark\";\n this.contextId = \"default\";\n this.disabled = false;\n this.selected = false;\n this.tabId = undefined;\n this.tabPosition = undefined;\n }\n disabledWatchHandler() {\n this.tabEnabled.emit();\n }\n connectedCallback() {\n this.tabCreated.emit(this.el);\n }\n disconnectedCallback() {\n const tabContext = document.querySelector(`ic-tab-context[context-id=${this.contextId}]`);\n if (tabContext) {\n tabContext.tabRemovedHandler(!!this.focusTabId);\n }\n }\n componentWillLoad() {\n removeDisabledFalse(this.disabled, this.el);\n }\n componentDidUpdate() {\n this.isInitialRender = false;\n }\n /**\n * Sets focus on the tab.\n */\n async setFocus() {\n if (this.el) {\n this.el.focus();\n }\n }\n render() {\n const { disabled, selected, appearance } = this;\n return (h(Host, { class: {\n [\"with-transition\"]: !this.isInitialRender,\n [\"ic-tab-light\"]: appearance === IcThemeForegroundEnum.Light,\n [\"selected\"]: selected,\n [\"disabled\"]: disabled,\n }, role: \"tab\", \"aria-selected\": selected ? \"true\" : \"false\", onClick: this.handleClick, onFocus: this.handleFocus, onMouseDown: this.handleMouseDown, \"aria-disabled\": disabled ? \"true\" : \"false\", tabindex: this.selected ? 0 : -1 }, this.el.querySelector('[slot=\"icon\"]') && h(\"slot\", { name: \"icon\" }), h(\"ic-typography\", { class: \"ic-tab-label\", variant: \"label\" }, h(\"span\", null, h(\"slot\", null))), isSlotUsed(this.el, \"badge\") && h(\"slot\", { name: \"badge\" })));\n }\n static get is() { return \"ic-tab\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-tab.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-tab.css\"]\n };\n }\n static get properties() {\n return {\n \"appearance\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcThemeForegroundNoDefault\",\n \"resolved\": \"\\\"dark\\\" | \\\"light\\\"\",\n \"references\": {\n \"IcThemeForegroundNoDefault\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcThemeForegroundNoDefault\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Determines whether the light or dark variant of the tabs should be displayed.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"appearance\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"dark\\\"\"\n },\n \"contextId\": {\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 \"name\": \"internal\",\n \"text\": \"The unique context needed if using multiple tabs inside one another i.e. rendering another tabs inside a tab panel.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"context-id\",\n \"reflect\": true,\n \"defaultValue\": \"\\\"default\\\"\"\n },\n \"disabled\": {\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`, the disabled state will be set.\"\n },\n \"attribute\": \"disabled\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"selected\": {\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 \"name\": \"internal\",\n \"text\": \"If `true`, the tab will display with a selected indicator and tabIndex will be set.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"selected\",\n \"reflect\": true,\n \"defaultValue\": \"false\"\n },\n \"tabId\": {\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 \"name\": \"internal\",\n \"text\": \"The shared ID between panel and tab.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"tab-id\",\n \"reflect\": true\n },\n \"tabPosition\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"The position of the tab inside the tabs array in context.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"tab-position\",\n \"reflect\": false\n }\n };\n }\n static get events() {\n return [{\n \"method\": \"tabClick\",\n \"name\": \"tabClick\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Emitted when a tab is selected.\"\n }],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"IcTabClickEventDetail\",\n \"resolved\": \"IcTabClickEventDetail\",\n \"references\": {\n \"IcTabClickEventDetail\": {\n \"location\": \"import\",\n \"path\": \"./ic-tab.types\",\n \"id\": \"src/components/ic-tab/ic-tab.types.ts::IcTabClickEventDetail\"\n }\n }\n }\n }, {\n \"method\": \"tabCreated\",\n \"name\": \"tabCreated\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Emitted when a tab is dynamically created.\"\n }],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"HTMLIcTabElement\",\n \"resolved\": \"HTMLIcTabElement\",\n \"references\": {\n \"HTMLIcTabElement\": {\n \"location\": \"global\",\n \"id\": \"global::HTMLIcTabElement\"\n }\n }\n }\n }, {\n \"method\": \"tabEnabled\",\n \"name\": \"tabEnabled\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Emitted when a tab's disabled prop changes\"\n }],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"void\",\n \"resolved\": \"void\",\n \"references\": {}\n }\n }, {\n \"method\": \"tabFocus\",\n \"name\": \"tabFocus\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Emitted when a tab is focussed.\"\n }],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"IcTabClickEventDetail\",\n \"resolved\": \"IcTabClickEventDetail\",\n \"references\": {\n \"IcTabClickEventDetail\": {\n \"location\": \"import\",\n \"path\": \"./ic-tab.types\",\n \"id\": \"src/components/ic-tab/ic-tab.types.ts::IcTabClickEventDetail\"\n }\n }\n }\n }, {\n \"method\": \"tabRemoved\",\n \"name\": \"tabRemoved\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Emitted when a tab is unmounted.\"\n }],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"void\",\n \"resolved\": \"void\",\n \"references\": {}\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 tab.\",\n \"tags\": []\n }\n }\n };\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"disabled\",\n \"methodName\": \"disabledWatchHandler\"\n }];\n }\n}\n//# sourceMappingURL=ic-tab.js.map\n"],"version":3}
@@ -92,8 +92,8 @@ const TopNavigation = class {
92
92
  this.appTitle = undefined;
93
93
  }
94
94
  watchPropHandler(newValue, oldValue) {
95
- //added for gatsby rehydration issue where prop is initially undefined but then changes to actual value
96
- //this watch can be removed once gatbsy hydration issue is resolved
95
+ //added for Gatsby rehydration issue where prop is initially undefined but then changes to actual value
96
+ //this watch can be removed once Gatsby hydration issue is resolved
97
97
  onComponentPropUndefinedChange(oldValue, newValue, this.initialiseSearchBar);
98
98
  }
99
99
  disconnectedCallback() {