@ukic/web-components 2.31.0 → 2.32.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. package/dist/cjs/ic-button_3.cjs.entry.js +5 -1
  2. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  3. package/dist/cjs/ic-footer-link-group.cjs.entry.js +2 -2
  4. package/dist/cjs/ic-footer-link-group.cjs.entry.js.map +1 -1
  5. package/dist/cjs/ic-menu-item.cjs.entry.js +1 -4
  6. package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
  7. package/dist/cjs/ic-navigation-item.cjs.entry.js +25 -2
  8. package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
  9. package/dist/cjs/ic-popover-menu.cjs.entry.js +5 -5
  10. package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
  11. package/dist/cjs/ic-side-navigation.cjs.entry.js +18 -12
  12. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  13. package/dist/cjs/ic-text-field.cjs.entry.js +13 -9
  14. package/dist/cjs/ic-text-field.cjs.entry.js.map +1 -1
  15. package/dist/cjs/ic-toggle-button.cjs.entry.js +16 -0
  16. package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
  17. package/dist/collection/components/ic-button/ic-button.js +5 -1
  18. package/dist/collection/components/ic-button/ic-button.js.map +1 -1
  19. package/dist/collection/components/ic-footer-link-group/ic-footer-link-group.css +4 -0
  20. package/dist/collection/components/ic-footer-link-group/ic-footer-link-group.js +1 -1
  21. package/dist/collection/components/ic-footer-link-group/ic-footer-link-group.js.map +1 -1
  22. package/dist/collection/components/ic-menu-item/ic-menu-item.js +9 -7
  23. package/dist/collection/components/ic-menu-item/ic-menu-item.js.map +1 -1
  24. package/dist/collection/components/ic-navigation-item/ic-navigation-item.js +26 -3
  25. package/dist/collection/components/ic-navigation-item/ic-navigation-item.js.map +1 -1
  26. package/dist/collection/components/ic-popover-menu/ic-popover-menu.js +22 -9
  27. package/dist/collection/components/ic-popover-menu/ic-popover-menu.js.map +1 -1
  28. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +18 -12
  29. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js.map +1 -1
  30. package/dist/collection/components/ic-side-navigation/test/basic/ic-side-navigation.spec.js +110 -3
  31. package/dist/collection/components/ic-side-navigation/test/basic/ic-side-navigation.spec.js.map +1 -1
  32. package/dist/collection/components/ic-text-field/ic-text-field.js +13 -9
  33. package/dist/collection/components/ic-text-field/ic-text-field.js.map +1 -1
  34. package/dist/collection/components/ic-toggle-button/ic-toggle-button.js +17 -1
  35. package/dist/collection/components/ic-toggle-button/ic-toggle-button.js.map +1 -1
  36. package/dist/components/helpers.js +1 -1
  37. package/dist/components/ic-button2.js +5 -1
  38. package/dist/components/ic-button2.js.map +1 -1
  39. package/dist/components/ic-footer-link-group.js +2 -2
  40. package/dist/components/ic-footer-link-group.js.map +1 -1
  41. package/dist/components/ic-menu-item2.js +1 -4
  42. package/dist/components/ic-menu-item2.js.map +1 -1
  43. package/dist/components/ic-navigation-item.js +26 -3
  44. package/dist/components/ic-navigation-item.js.map +1 -1
  45. package/dist/components/ic-popover-menu.js +5 -5
  46. package/dist/components/ic-popover-menu.js.map +1 -1
  47. package/dist/components/ic-side-navigation.js +19 -13
  48. package/dist/components/ic-side-navigation.js.map +1 -1
  49. package/dist/components/ic-text-field2.js +14 -10
  50. package/dist/components/ic-text-field2.js.map +1 -1
  51. package/dist/components/ic-toggle-button.js +17 -1
  52. package/dist/components/ic-toggle-button.js.map +1 -1
  53. package/dist/components/ic-top-navigation.js +1 -1
  54. package/dist/core/core.esm.js +1 -1
  55. package/dist/core/{p-f1b210ed.entry.js → p-0677ee1e.entry.js} +2 -2
  56. package/dist/core/p-0677ee1e.entry.js.map +1 -0
  57. package/dist/core/p-0a20131b.entry.js +2 -0
  58. package/dist/core/p-0a20131b.entry.js.map +1 -0
  59. package/dist/core/{p-7e739287.entry.js → p-4ef14601.entry.js} +2 -2
  60. package/dist/core/p-4ef14601.entry.js.map +1 -0
  61. package/dist/core/p-5fad22f1.entry.js +2 -0
  62. package/dist/core/p-5fad22f1.entry.js.map +1 -0
  63. package/dist/core/{p-32fa7c28.entry.js → p-9feec47e.entry.js} +2 -2
  64. package/dist/core/p-9feec47e.entry.js.map +1 -0
  65. package/dist/core/{p-1d648b98.entry.js → p-c1a74ee4.entry.js} +2 -2
  66. package/dist/core/p-c1a74ee4.entry.js.map +1 -0
  67. package/dist/core/p-cd61c238.entry.js +2 -0
  68. package/dist/core/p-cd61c238.entry.js.map +1 -0
  69. package/dist/core/{p-e7fa6804.entry.js → p-e1def80b.entry.js} +2 -2
  70. package/dist/core/p-e1def80b.entry.js.map +1 -0
  71. package/dist/esm/ic-button_3.entry.js +5 -1
  72. package/dist/esm/ic-button_3.entry.js.map +1 -1
  73. package/dist/esm/ic-footer-link-group.entry.js +2 -2
  74. package/dist/esm/ic-footer-link-group.entry.js.map +1 -1
  75. package/dist/esm/ic-menu-item.entry.js +1 -4
  76. package/dist/esm/ic-menu-item.entry.js.map +1 -1
  77. package/dist/esm/ic-navigation-item.entry.js +26 -3
  78. package/dist/esm/ic-navigation-item.entry.js.map +1 -1
  79. package/dist/esm/ic-popover-menu.entry.js +5 -5
  80. package/dist/esm/ic-popover-menu.entry.js.map +1 -1
  81. package/dist/esm/ic-side-navigation.entry.js +19 -13
  82. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  83. package/dist/esm/ic-text-field.entry.js +14 -10
  84. package/dist/esm/ic-text-field.entry.js.map +1 -1
  85. package/dist/esm/ic-toggle-button.entry.js +17 -1
  86. package/dist/esm/ic-toggle-button.entry.js.map +1 -1
  87. package/dist/types/components/ic-menu-item/ic-menu-item.d.ts +1 -4
  88. package/dist/types/components/ic-navigation-item/ic-navigation-item.d.ts +2 -0
  89. package/dist/types/components/ic-popover-menu/ic-popover-menu.d.ts +3 -6
  90. package/dist/types/components/ic-text-field/ic-text-field.d.ts +1 -0
  91. package/dist/types/components/ic-toggle-button/ic-toggle-button.d.ts +3 -0
  92. package/dist/types/components.d.ts +4 -7
  93. package/hydrate/index.js +81 -35
  94. package/package.json +2 -2
  95. package/dist/core/p-1d648b98.entry.js.map +0 -1
  96. package/dist/core/p-32fa7c28.entry.js.map +0 -1
  97. package/dist/core/p-7e739287.entry.js.map +0 -1
  98. package/dist/core/p-94d5aa77.entry.js +0 -2
  99. package/dist/core/p-94d5aa77.entry.js.map +0 -1
  100. package/dist/core/p-9930557b.entry.js +0 -2
  101. package/dist/core/p-9930557b.entry.js.map +0 -1
  102. package/dist/core/p-e6bad80b.entry.js +0 -2
  103. package/dist/core/p-e6bad80b.entry.js.map +0 -1
  104. package/dist/core/p-e7fa6804.entry.js.map +0 -1
  105. package/dist/core/p-f1b210ed.entry.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"names":["icButtonCss","buttonIds","Button","this","buttonIdNum","hasTooltip","inheritedAttributes","describedbyEl","describedById","mutationObserver","hostMutationObserver","handleClick","el","type","hasRouterSlot","closest","hiddenFormButton","document","createElement","setAttribute","style","display","appendChild","click","remove","handleKeyDown","ev","key","closeButtonTooltip","onFocus","icFocus","emit","onBlur","icBlur","mutationCallback","describedByContent","innerText","hostMutationCallback","mutationList","forceComponentUpdate","forEach","attributeName","attribute","getAttribute","title","ariaLabel","IC_INHERITED_ARIA","includes","forceUpdate","setHasTooltip","disableTooltip","isIconVariant","variant","startsWith","watchDisabledHandler","removeDisabledFalse","disabled","disconnectedCallback","undefined","disconnect","componentWillUpdate","loading","setProperty","getBoundingClientRect","width","componentWillLoad","_a","inheritAttributes","restInheritedAttributes","__rest","id","parentElement","querySelector","componentDidLoad","updateTheme","MutationObserver","observe","characterData","childList","subtree","attributes","componentWillRender","iconEl","hasIconSlot","handleHostClick","event","fileUpload","renderFileHiddenInput","icFileSelection","multiple","fileInputName","selectedFiles","accept","stopImmediatePropagation","dropdown","dropdownExpanded","themeChangeHandler","detail","mode","setFocus","buttonEl","focus","tooltip","shadowRoot","isTooltipVisible","displayTooltip","preventDefault","position","selectorPrefix","routerSlot","textContent","newTheme","foregroundColor","getThemeFromContext","IcThemeForegroundEnum","Default","appearance","render","TagType","href","buttonAttrs","form","formaction","formenctype","formmethod","formnovalidate","formtarget","download","rel","target","referrerpolicy","hreflang","describedby","buttonId","ButtonContent","h","Object","assign","class","ref","part","name","Dark","Light","innerHTML","arrowDropdown","Host","size","fullWidth","isSlotUsed","transparentBackground","onClick","onKeyDown","ariaOwnsId","ariaControlsId","label","placement","tooltipPlacement","silent","icLoadingIndicatorCss","LoadingIndicator","updateCircularProgressMeter","indeterminate","circularMeter","String","progress","getLabel","labelIndex","setLabel","Promise","interval","setInterval","labelList","length","labelDuration","getLabelVariant","outerElement","offsetWidth","setCircleLineWidth","compactStepCircularLineWidth","classList","contains","toastDismissTimerCircularLineWidth","circularLineWidth","circularDiameter","setLinearDeterminateWidth","innerElement","Math","min","max","proportion","showSecond","add","calcOuterClass","cls","updateLabel","isPropDefined","split","indicatorLabel","setCircleXY","r","x","y","nextRadius","setDashSteps","radius","dashArray","PI","watchPropHandler","watchProgressHandler","clearInterval","Number","componentDidUpdate","description","innerLabel","role","viewBox","cx","cy","icTooltipCss","Tooltip","delayedHideEvents","dialogOverflow","instantHideEvents","mouseOverTool","persistTooltip","onDialog","showEvents","disableHover","disableClick","getTooltipTranslate","dialogEl","child","children","tooltipX","tooltipY","left","bottom","top","right","height","toolTip","show","icDialogEl","popperInstance","createPopper","modifiers","options","offset","element","arrow","scroll","resize","popperProps","console","warn","hide","removeAttribute","destroy","checkCloseTooltip","setTimeout","mouseEnterTooltip","mouseLeaveTooltip","manageEventListeners","action","method","setExternalPopperProps","props","onComponentRequiredPropUndefined","prop","propName","componentDidRender","typographyEl","maxLines","resolve","hasAttribute"],"sources":["src/components/ic-button/ic-button.css?tag=ic-button&encapsulation=shadow","src/components/ic-button/ic-button.tsx","src/components/ic-loading-indicator/ic-loading-indicator.css?tag=ic-loading-indicator&encapsulation=shadow","src/components/ic-loading-indicator/ic-loading-indicator.tsx","src/components/ic-tooltip/ic-tooltip.css?tag=ic-tooltip&encapsulation=shadow","src/components/ic-tooltip/ic-tooltip.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n/**\n* @prop --min-width: Minimum width of the button.\n* @prop --height: The height of the button.\n*/\n\n:host {\n display: inline-block;\n position: relative;\n\n --button-default: var(--ic-action-default);\n --button-default-hover: var(--ic-action-default-hover);\n --button-default-active: var(--ic-action-default-active);\n --button-default-background-hover: var(--ic-action-default-bg-hover);\n --button-default-background-active: var(--ic-action-default-bg-active);\n --icon-width: 100%;\n --icon-height: 100%;\n}\n\n.button,\n::slotted(a) {\n font-family: var(--ic-font-body-family);\n text-decoration: none;\n font-weight: 600;\n font-size: 0.875rem;\n transition: var(--ic-easing-transition-fast);\n border-radius: var(--ic-border-radius);\n min-width: var(--min-width, 6.25rem);\n display: inline-flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n background: none;\n border: none;\n box-sizing: border-box;\n white-space: nowrap;\n vertical-align: middle;\n}\n\n:host(.with-badge) .button {\n border-radius: 0.2188rem;\n}\n\n.button:hover,\n::slotted(a:hover) {\n cursor: pointer;\n}\n\n.button:focus,\n::slotted(a:focus) {\n box-shadow: var(--ic-border-focus);\n}\n\n.button:focus-visible,\n::slotted(a:focus-visible) {\n outline: var(--ic-hc-focus-outline);\n}\n\n:host(.dark) .button,\n:host(.dark) ::slotted(a) {\n --button-default: var(--ic-action-dark);\n --button-default-hover: var(--ic-action-dark);\n --button-default-active: var(--ic-action-dark);\n --button-default-background-hover: var(--ic-action-dark-bg-hover);\n --button-default-background-active: var(--ic-action-dark-bg-active);\n}\n\n:host(.light) .button,\n:host(.light) ::slotted(a) {\n --button-default: var(--ic-action-light);\n --button-default-hover: var(--ic-action-light);\n --button-default-active: var(--ic-action-light);\n --button-default-background-hover: var(--ic-action-light-bg-hover);\n --button-default-background-active: var(--ic-action-light-bg-active);\n}\n\n:host(.white-background) .button,\n:host(.white-background) ::slotted(a) {\n --button-default-background-hover: var(--ic-action-default-bg-hover-no-alpha);\n --button-default-background-active: var(\n --ic-action-default-bg-active-no-alpha\n );\n\n background-color: var(--ic-architectural-white);\n}\n\n:host(.white-background.dark) .button,\n:host(.white-background.dark) ::slotted(a) {\n --button-default-background-hover: var(--ic-action-dark-bg-hover-no-alpha);\n --button-default-background-active: var(--ic-action-dark-bg-active-no-alpha);\n}\n\n:host(.button-variant-primary.light) .button,\n:host(.button-variant-primary.light) ::slotted(a) {\n color: var(--ic-color-primary-text);\n\n --button-default-hover: var(--ic-action-light-hover);\n --button-default-active: var(--ic-action-light-active);\n}\n\n:host(.button-variant-primary.dark) .button,\n:host(.button-variant-primary.dark) ::slotted(a) {\n --button-default-hover: var(--ic-action-dark-hover);\n --button-default-active: var(--ic-action-dark-active);\n}\n\n:host(.disabled),\n:host(.disabled) .button,\n:host(.disabled) ::slotted(a),\n:host(.loading),\n:host(.loading) .button {\n pointer-events: none;\n}\n\n:host(.top-icon) .button {\n flex-direction: column;\n\n --height: fit-content;\n}\n\n:host(.top-icon) .button .icon-container {\n margin-right: 0;\n}\n\n/* Variants */\n\n/* Primary */\n\n:host(.button-variant-primary) .button,\n:host(.button-variant-primary) ::slotted(a) {\n color: var(--ic-color-white-text);\n background-color: var(--button-default);\n}\n\n:host(.button-variant-primary) .button:hover {\n background-color: var(--button-default-hover);\n}\n\n:host(.button-variant-primary.loading) .button,\n:host(.button-variant-primary) .button:active {\n background-color: var(--button-default-active);\n}\n\n:host(.button-variant-primary.disabled) .button,\n:host(.button-variant-primary.disabled) ::slotted(a) {\n background: var(--ic-architectural-200);\n color: var(--ic-architectural-300);\n}\n\n:host(.button-variant-primary.light.disabled) .button,\n:host(.button-variant-primary.light.disabled) ::slotted(a) {\n background: var(--ic-architectural-600);\n color: var(--ic-architectural-500);\n}\n\n/* Secondary */\n\n:host(.button-variant-secondary) .button,\n:host(.button-variant-secondary) ::slotted(a) {\n border: var(--ic-border-width) solid var(--button-default);\n color: var(--button-default);\n}\n\n:host(.button-variant-secondary) .button:hover,\n:host(.button-variant-secondary) ::slotted(a:hover) {\n background-color: var(--button-default-background-hover);\n border-color: var(--button-default-hover);\n color: var(--button-default-hover);\n}\n\n:host(.button-variant-secondary) .button:active,\n:host(.button-variant-secondary) ::slotted(a:active),\n:host(.button-variant-secondary.loading) .button {\n border-color: var(--button-default-active);\n background-color: var(--button-default-background-active);\n color: var(--button-default-active);\n}\n\n:host(.button-variant-secondary.disabled) .button,\n:host(.button-variant-secondary.disabled) ::slotted(a) {\n border-color: var(--ic-architectural-300);\n color: var(--ic-architectural-300);\n background: none;\n}\n\n:host(.button-variant-secondary.light.disabled) .button,\n:host(.button-variant-secondary.light.disabled) ::slotted(a) {\n border-color: var(--ic-architectural-500);\n color: var(--ic-architectural-500);\n}\n\n/* Tertiary */\n\n:host(.button-variant-tertiary) .button,\n:host(.button-variant-tertiary) ::slotted(a) {\n color: var(--button-default);\n}\n\n:host(.button-variant-tertiary) .button:hover,\n:host(.button-variant-tertiary) ::slotted(a:hover) {\n background-color: var(--button-default-background-hover);\n color: var(--button-default-hover);\n}\n\n:host(.button-variant-tertiary) .button:active,\n:host(.button-variant-tertiary) ::slotted(a:active),\n:host(.button-variant-tertiary.loading) .button {\n background-color: var(--button-default-background-active);\n color: var(--button-default-active);\n}\n\n:host(.button-variant-tertiary.disabled) .button,\n:host(.button-variant-tertiary.disabled) ::slotted(a) {\n color: var(--ic-architectural-300);\n background: none;\n}\n\n:host(.button-variant-tertiary.light.disabled) .button,\n:host(.button-variant-tertiary.light.disabled) ::slotted(a) {\n color: var(--ic-architectural-500);\n}\n\n/* Destructive */\n\n:host(.button-variant-destructive) .button,\n:host(.button-variant-destructive) ::slotted(a) {\n color: var(--ic-color-white-text);\n background-color: var(--ic-action-destructive);\n text-transform: uppercase;\n}\n\n:host(.button-variant-destructive) .button:hover {\n background-color: var(--ic-action-destructive-hover);\n}\n\n:host(.button-variant-destructive) .button:active,\n:host(.button-variant-destructive.loading) .button {\n background-color: var(--ic-action-destructive-active);\n}\n\n:host(.button-variant-destructive.disabled) .button,\n:host(.button-variant-destructive.disabled) ::slotted(a) {\n background: var(--ic-architectural-200);\n color: var(--ic-architectural-300);\n}\n\n/* Icon */\n\n:host(.button-variant-icon) .button,\n:host(.button-variant-icon) ::slotted(a) {\n color: var(--button-default);\n min-width: 0;\n gap: var(--ic-space-xs);\n margin: var(--ic-space-1px) 0;\n}\n\n:host(.button-variant-icon) .icon-container {\n width: var(--ic-space-lg) !important;\n height: var(--ic-space-lg) !important;\n}\n\n:host(.button-variant-icon) .button:hover,\n:host(.button-variant-icon) ::slotted(a:hover) {\n background-color: var(--button-default-background-hover);\n color: var(--button-default-hover);\n}\n\n:host(.button-variant-icon) .button:active:not(:focus),\n:host(.button-variant-icon) ::slotted(a:active:not(:focus)),\n:host(.button-variant-icon.loading) .button {\n background-color: var(--button-default-background-active);\n color: var(--button-default-active);\n}\n\n:host(.button-variant-icon.disabled) .button,\n:host(.button-variant-icon.disabled) ::slotted(a) {\n color: var(--ic-architectural-300);\n background: none;\n}\n\n/***********************\n * Icon Variants\n ***********************/\n\n/* Icon-primary */\n\n:host(.button-variant-icon-primary) .button,\n:host(.button-variant-icon-primary) ::slotted(a) {\n color: var(--ic-color-white-text);\n background-color: var(--button-default);\n min-width: 0;\n gap: var(--ic-space-xs);\n margin: var(--ic-space-1px) 0;\n}\n\n:host(.button-variant-icon-primary) .icon-container {\n width: var(--ic-space-lg) !important;\n height: var(--ic-space-lg) !important;\n}\n\n:host(.button-variant-icon-primary) .button:hover,\n:host(.button-variant-icon-primary) ::slotted(a:hover) {\n background-color: var(--button-default-hover);\n}\n\n:host(.button-variant-icon-primary) .button:active,\n:host(.button-variant-icon-primary) ::slotted(a:active),\n:host(.button-variant-icon-primary.loading) .button {\n background: var(--button-default-active);\n}\n\n:host(.button-variant-icon-primary.loading) .button ic-loading-indicator {\n --inner-color: var(--ic-architectural-white);\n}\n\n:host(.button-variant-icon-primary.disabled) .button,\n:host(.button-variant-icon-primary.disabled) ::slotted(a) {\n color: var(--ic-architectural-300);\n background: var(--ic-architectural-200);\n}\n\n:host(.button-variant-icon-primary.light) .button,\n:host(.button-variant-icon-primary.light) ::slotted(a) {\n color: var(--ic-color-primary-text);\n}\n\n:host(.button-variant-icon-primary.light) .button:hover,\n:host(.button-variant-icon-primary.light) ::slotted(a:hover) {\n background: var(--ic-action-light-hover);\n}\n\n:host(.button-variant-icon-primary.light) .button:active,\n:host(.button-variant-icon-primary.light) ::slotted(a:active),\n:host(.button-variant-icon-primary.light.loading) .button,\n:host(.button-variant-icon-primary.light.loading) ::slotted(a) {\n background: var(--ic-action-light-active);\n}\n\n:host(.button-variant-icon-primary.dark) .button:hover,\n:host(.button-variant-icon-primary.dark) ::slotted(a:hover) {\n background: var(--ic-action-dark-hover);\n}\n\n:host(.button-variant-icon-primary.dark) .button:active,\n:host(.button-variant-icon-primary.dark) ::slotted(a:active),\n:host(.button-variant-icon-primary.dark.loading) .button,\n:host(.button-variant-icon-primary.dark.loading) ::slotted(a) {\n background: var(--ic-action-dark-active);\n}\n\n/* Icon-secondary */\n\n:host(.button-variant-icon-secondary) .button,\n:host(.button-variant-icon-secondary) ::slotted(a) {\n border: var(--ic-border-width) solid var(--button-default);\n color: var(--button-default);\n min-width: 0;\n gap: var(--ic-space-xs);\n margin: var(--ic-space-1px) 0;\n}\n\n:host(.button-variant-icon-secondary) .icon-container {\n width: var(--ic-space-lg) !important;\n height: var(--ic-space-lg) !important;\n}\n\n:host(.button-variant-icon-secondary) .button:hover,\n:host(.button-variant-icon-secondary) ::slotted(a:hover) {\n background-color: var(--button-default-background-hover);\n border-color: var(--button-default-hover);\n color: var(--button-default-hover);\n}\n\n:host(.button-variant-icon-secondary) .button:active,\n:host(.button-variant-icon-secondary) ::slotted(a:active),\n:host(.button-variant-icon-secondary.loading) .button {\n border-color: var(--button-default-active);\n background-color: var(--button-default-background-active);\n color: var(--button-default-active);\n}\n\n:host(.button-variant-icon-secondary.disabled) .button,\n:host(.button-variant-icon-secondary.disabled) .button:hover,\n:host(.button-variant-icon-secondary.disabled) .button:active,\n:host(.button-variant-icon-secondary.disabled) ::slotted(a),\n:host(.button-variant-icon-secondary.disabled) ::slotted(a:hover),\n:host(.button-variant-icon-secondary.disabled) ::slotted(a:active) {\n border-color: var(--ic-architectural-300);\n color: var(--ic-architectural-300);\n background: none;\n}\n\n:host(.button-variant-icon-secondary.light.disabled) .button,\n:host(.button-variant-icon-secondary.light.disabled) .button:hover,\n:host(.button-variant-icon-secondary.light.disabled) .button:active,\n:host(.button-variant-icon-secondary.light.disabled) ::slotted(a),\n:host(.button-variant-icon-secondary.light.disabled) ::slotted(a:hover),\n:host(.button-variant-icon-secondary.light.disabled) ::slotted(a:active) {\n border-color: var(--ic-architectural-500);\n color: var(--ic-architectural-500);\n}\n\n/* Icon-tertiary */\n\n:host(.button-variant-icon-tertiary) .button,\n:host(.button-variant-icon-tertiary) ::slotted(a) {\n color: var(--button-default);\n min-width: 0;\n gap: var(--ic-space-xs);\n margin: var(--ic-space-1px) 0;\n}\n\n:host(.button-variant-icon-tertiary) .icon-container {\n width: var(--ic-space-lg) !important;\n height: var(--ic-space-lg) !important;\n}\n\n:host(.button-variant-icon-tertiary) .button:hover,\n:host(.button-variant-icon-tertiary) ::slotted(a:hover) {\n background-color: var(--button-default-background-hover);\n color: var(--button-default-hover);\n}\n\n:host(.button-variant-icon-tertiary) .button:active,\n:host(.button-variant-icon-tertiary) ::slotted(a:active),\n:host(.button-variant-icon-tertiary.loading) .button {\n background-color: var(--button-default-background-active);\n color: var(--button-default-active);\n}\n\n:host(.button-variant-icon-tertiary.disabled) .button,\n:host(.button-variant-icon-tertiary.disabled) .button:hover,\n:host(.button-variant-icon-tertiary.disabled) .button:active,\n:host(.button-variant-icon-tertiary.disabled) ::slotted(a),\n:host(.button-variant-icon-tertiary.disabled) ::slotted(a:hover),\n:host(.button-variant-icon-tertiary.disabled) ::slotted(a:active) {\n color: var(--ic-architectural-300);\n background: none;\n}\n\n/* Icon-destructive */\n\n:host(.button-variant-icon-destructive) .button,\n:host(.button-variant-icon-destructive) ::slotted(a) {\n color: var(--ic-color-white-text);\n background-color: var(--ic-action-destructive);\n min-width: 0;\n gap: var(--ic-space-xs);\n margin: var(--ic-space-1px) 0;\n}\n\n:host(.button-variant-icon-destructive) .icon-container {\n width: var(--ic-space-lg) !important;\n height: var(--ic-space-lg) !important;\n}\n\n:host(.button-variant-icon-destructive) .button:hover,\n:host(.button-variant-icon-destructive) ::slotted(a:hover) {\n background-color: var(--ic-action-destructive-hover);\n}\n\n:host(.button-variant-icon-destructive) .button:active,\n:host(.button-variant-icon-destructive) ::slotted(a:active),\n:host(.button-variant-icon-destructive.loading) .button {\n background-color: var(--ic-action-destructive-active);\n}\n\n:host(.button-variant-icon-destructive.loading) .button ic-loading-indicator {\n --inner-color: var(--ic-architectural-white);\n}\n\n:host(.button-variant-icon-destructive.disabled) .button,\n:host(.button-variant-icon-destructive.disabled) .button:hover,\n:host(.button-variant-icon-destructive.disabled) .button:active,\n:host(.button-variant-icon-destructive.disabled) ::slotted(a),\n:host(.button-variant-icon-destructive.disabled) ::slotted(a:hover),\n:host(.button-variant-icon-destructive.disabled) ::slotted(a:active) {\n background: var(--ic-architectural-200);\n color: var(--ic-architectural-300);\n}\n\n/* Sizing */\n\n:host(.button-size-default) .button {\n height: var(--height, 2.5rem);\n padding: var(--ic-space-xs) var(--ic-space-md);\n}\n\n:host(.button-size-small) .button {\n height: var(--height, var(--ic-space-xl));\n padding: var(--ic-space-xxs) var(--ic-space-md);\n}\n\n:host(.button-size-large) .button {\n height: var(--height, var(--ic-space-xxl));\n padding: var(--ic-space-sm) var(--ic-space-md);\n}\n\n:host(.button-size-default.button-variant-icon) .button,\n:host(.button-size-default.button-variant-icon-primary) .button,\n:host(.button-size-default.button-variant-icon-secondary) .button,\n:host(.button-size-default.button-variant-icon-tertiary) .button,\n:host(.button-size-default.button-variant-icon-destructive) .button,\n:host(.button-size-default.button-variant-icon-primary) ::slotted(a),\n:host(.button-size-default.button-variant-icon-secondary) ::slotted(a),\n:host(.button-size-default.button-variant-icon-tertiary) ::slotted(a),\n:host(.button-size-default.button-variant-icon-destructive) ::slotted(a),\n:host(.button-size-default.button-variant-icon) ::slotted(a) {\n height: var(--height, var(--ic-space-xl));\n width: var(--ic-space-xl);\n padding: 0.375rem;\n}\n\n:host(.button-size-small.button-variant-icon) .button,\n:host(.button-size-small.button-variant-icon-primary) .button,\n:host(.button-size-small.button-variant-icon-secondary) .button,\n:host(.button-size-small.button-variant-icon-tertiary) .button,\n:host(.button-size-small.button-variant-icon-destructive) .button,\n:host(.button-size-small.button-variant-icon-primary) ::slotted(a),\n:host(.button-size-small.button-variant-icon-secondary) ::slotted(a),\n:host(.button-size-small.button-variant-icon-tertiary) ::slotted(a),\n:host(.button-size-small.button-variant-icon-destructive) ::slotted(a),\n:host(.button-size-small.button-variant-icon) ::slotted(a) {\n height: var(--height, var(--ic-space-lg));\n width: var(--ic-space-lg);\n padding: var(--ic-space-xxs);\n}\n\n:host(.button-size-large.button-variant-icon) .button,\n:host(.button-size-large.button-variant-icon-primary) .button,\n:host(.button-size-large.button-variant-icon-secondary) .button,\n:host(.button-size-large.button-variant-icon-tertiary) .button,\n:host(.button-size-large.button-variant-icon-destructive) .button,\n:host(.button-size-large.button-variant-icon-primary) ::slotted(a),\n:host(.button-size-large.button-variant-icon-secondary) ::slotted(a),\n:host(.button-size-large.button-variant-icon-tertiary) ::slotted(a),\n:host(.button-size-large.button-variant-icon-destructive) ::slotted(a),\n:host(.button-size-large.button-variant-icon) ::slotted(a) {\n height: var(--height, 2.5rem);\n width: 2.5rem;\n padding: var(--ic-space-xs);\n}\n\n/* Width */\n:host(.full-width),\n:host(.full-width) .button,\n:host(.full-width) ::slotted(a) {\n width: 100%;\n}\n\n/* Loading */\n\ndiv.loading-container {\n position: relative;\n align-items: center;\n width: 100%;\n}\n\nic-loading-indicator {\n --outer-color: transparent;\n}\n\n@keyframes loading-animation {\n 0% {\n width: 0%;\n left: 0%;\n }\n\n 25% {\n width: 0%;\n left: 0%;\n opacity: 0;\n }\n\n 50% {\n width: 100%;\n left: 0%;\n opacity: 1;\n }\n\n 75% {\n width: 0%;\n left: 100%;\n }\n\n 100% {\n width: 0%;\n left: 100%;\n opacity: 0;\n }\n}\n\n/* Icons */\n\ndiv.icon-container {\n box-sizing: border-box;\n width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n display: flex;\n justify-content: center;\n align-items: center;\n margin-right: var(--ic-space-xs);\n}\n\ndiv.right-icon {\n margin-right: auto;\n margin-left: var(--ic-space-xs);\n}\n\n:host(.full-width) .right-icon {\n margin-right: var(--ic-space-xs);\n}\n\n::slotted(:not(ic-badge)) {\n width: var(--icon-width) !important;\n height: var(--icon-height) !important;\n fill: currentcolor !important;\n pointer-events: none;\n}\n\n:host(.button-variant-icon) .button .icon-container {\n margin: 0;\n pointer-events: none;\n}\n\n/** SEARCH **/\n\n:host(.search-submit-button) ::slotted(svg) {\n --icon-height: 1.25rem;\n --icon-width: 1.25rem;\n}\n\n:host(.search-submit-button-small) ::slotted(svg) {\n --icon-height: 1rem;\n --icon-width: 1rem;\n}\n\n:host(.clear-button) {\n margin: 0 var(--ic-space-xxs);\n}\n\n:host(.clear-button) .button:focus,\n:host(.calendar-button) .button:focus {\n box-shadow: none;\n}\n\n:host(.search-submit-button) .button:focus {\n box-shadow: none;\n}\n\n:host(.search-submit-button) .button:not(:active):focus {\n box-shadow: none;\n background-color: var(--ic-action-default-bg-hover);\n}\n\n:host(.search-submit-button) {\n display: flex;\n align-items: center;\n margin: 0 var(--ic-space-xxs);\n}\n\n:host(.menu-close-button) ::slotted(svg) {\n --icon-height: 0.875rem;\n --icon-width: 0.875rem;\n}\n\n:host(.popout-menu-button) .button {\n height: var(--height);\n justify-content: left;\n border-radius: 0;\n white-space: pre-line;\n text-align: start;\n}\n\n:host(.popout-menu-button) div.icon-container {\n flex: none;\n}\n\n:host(.popout-menu-button) .button:focus {\n box-shadow: var(--ic-border-focus-inset);\n border-radius: var(--ic-border-radius-inset);\n}\n\n.ic-button-describedby {\n display: none;\n}\n\n:host .ic-tooltip {\n display: block;\n}\n\n/** Dropdown **/\n:host .arrow-dropdown {\n margin-top: auto;\n}\n\n:host .dropdown-expanded {\n transform: rotate(180deg);\n margin-bottom: var(--ic-space-xxxs);\n}\n\n:host(.dropdown-no-icon) .button {\n padding-right: var(--ic-space-xs);\n}\n\n/** Slotted router item **/\nslot[name=\"router-item\"]::slotted(a) {\n pointer-events: all;\n}\n\n::slotted(a) {\n font-size: 0.875rem !important;\n border: none !important;\n vertical-align: middle !important;\n}\n\n:host(.white-background) ::slotted(a) {\n background-color: var(--ic-architectural-white) !important;\n}\n\n:host(.button-variant-primary) ::slotted(a) {\n background-color: var(--button-default) !important;\n}\n\n:host(.button-variant-primary) ::slotted(a:hover) {\n background-color: var(--button-default-hover) !important;\n}\n\n:host(.button-variant-primary) ::slotted(a:active) {\n background-color: var(--button-default-active) !important;\n}\n\n:host(.button-variant-primary.disabled) ::slotted(a),\n:host(.button-variant-destructive.disabled) ::slotted(a) {\n background: var(--ic-architectural-200) !important;\n}\n\n:host(.button-variant-primary.light.disabled) ::slotted(a) {\n background: var(--ic-architectural-600) !important;\n}\n\n:host(.button-variant-secondary) ::slotted(a) {\n border: var(--ic-border-width) solid var(--button-default) !important;\n}\n\n:host(.button-variant-secondary) ::slotted(a:hover) {\n background-color: var(--button-default-background-hover) !important;\n border-color: var(--button-default-hover) !important;\n}\n\n:host(.button-variant-secondary) ::slotted(a:active) {\n border-color: var(--button-default-active) !important;\n background-color: var(--button-default-background-active) !important;\n}\n\n:host(.button-variant-secondary.disabled) ::slotted(a),\n:host(.button-variant-secondary.disabled) ::slotted(a:hover),\n:host(.button-variant-secondary.disabled) ::slotted(a:active),\n:host(.button-variant-tertiary.disabled) ::slotted(a),\n:host(.button-variant-tertiary.disabled) ::slotted(a:hover),\n:host(.button-variant-tertiary.disabled) ::slotted(a:active) {\n border-color: var(--ic-architectural-300) !important;\n background: none !important;\n}\n\n:host(.button-variant-secondary.light.disabled) ::slotted(a),\n:host(.button-variant-secondary.light.disabled) ::slotted(a:hover),\n:host(.button-variant-secondary.light.disabled) ::slotted(a:active),\n:host(.button-variant-tertiary.light.disabled) ::slotted(a),\n:host(.button-variant-tertiary.light.disabled) ::slotted(a:hover),\n:host(.button-variant-tertiary.light.disabled) ::slotted(a:active) {\n border-color: var(--ic-architectural-500) !important;\n}\n\n:host(.button-variant-tertiary) ::slotted(a:hover),\n:host(.button-variant-icon) ::slotted(a:hover) {\n background-color: var(--button-default-background-hover) !important;\n}\n\n:host(.button-variant-tertiary) ::slotted(a:active:not(:focus)),\n:host(.button-variant-tertiary) ::slotted(a:active:focus),\n:host(.button-variant-tertiary) ::slotted(a:active),\n:host(.button-variant-icon) ::slotted(a:active:not(:focus)) {\n background-color: var(--button-default-background-active) !important;\n}\n\n:host(.button-variant-icon.disabled) ::slotted(a),\n:host(.button-variant-icon.disabled) ::slotted(a:hover),\n:host(.button-variant-icon.disabled) ::slotted(a:active) {\n background: none !important;\n}\n\n:host(.button-variant-destructive) ::slotted(a) {\n background-color: var(--ic-action-destructive) !important;\n}\n\n:host(.button-variant-destructive) ::slotted(a:hover) {\n background-color: var(--ic-action-destructive-hover) !important;\n}\n\n:host(.button-variant-destructive) ::slotted(a:active) {\n background-color: var(--ic-action-destructive-active) !important;\n}\n\n:host(.button-size-default) ::slotted(a) {\n height: var(--height, 2.5rem) !important;\n padding: var(--ic-space-xs) var(--ic-space-md) !important;\n}\n\n:host(.button-size-small) ::slotted(a) {\n height: var(--height, var(--ic-space-xl)) !important;\n padding: var(--ic-space-xxs) var(--ic-space-md) !important;\n}\n\n:host(.button-size-large) ::slotted(a) {\n height: var(--height, var(--ic-space-xxl)) !important;\n padding: var(--ic-space-sm) var(--ic-space-md) !important;\n}\n\n:host(.button-size-default.button-variant-icon) ::slotted(a) {\n height: var(--height, var(--ic-space-xl)) !important;\n padding: 0.375rem !important;\n}\n\n:host(.button-size-small.button-variant-icon) ::slotted(a) {\n padding: var(--ic-space-xxs) !important;\n}\n\n:host(.button-size-large.button-variant-icon) ::slotted(a) {\n padding: var(--ic-space-xs) !important;\n}\n\n/** High Contrast **/\n@media (forced-colors: active) {\n .button,\n ::slotted(a) {\n border: 0.125rem solid transparent !important;\n }\n}\n\n/** Pagination **/\n\n:host(.flip) ::slotted(svg) {\n transform: scaleX(-1);\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Listen,\n Method,\n Prop,\n State,\n forceUpdate,\n h,\n Watch,\n} from \"@stencil/core\";\n\nimport {\n getThemeFromContext,\n inheritAttributes,\n isSlotUsed,\n removeDisabledFalse,\n renderFileHiddenInput,\n} from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport {\n IcButtonTypes,\n IcButtonVariants,\n IcButtonTooltipPlacement,\n} from \"./ic-button.types\";\nimport {\n IcSizes,\n IcTheme,\n IcThemeForeground,\n IcThemeForegroundEnum,\n} from \"../../utils/types\";\nimport arrowDropdown from \"../../assets/arrow-dropdown.svg\";\n\nlet buttonIds = 0;\n\n/**\n * @slot icon - Deprecated. This slot should not be used anymore. Use left-icon or right-icon slot instead.\n * @slot left-icon - Content will be placed to the left of the button label.\n * @slot right-icon - Content will be placed to the right of the button label.\n * @slot top-icon - Content will be placed above the button label.\n * @slot badge - Badge component overlaying the top right of the button.\n * @slot router-item - Handle routing by nesting your routes in this slot. Setting loading to true will have no impact on this slot.\n */\n@Component({\n tag: \"ic-button\",\n styleUrl: \"ic-button.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class Button {\n private buttonEl: HTMLElement;\n private buttonIdNum = buttonIds++;\n private hasTooltip: boolean = false;\n private id: string;\n private inheritedAttributes: { [k: string]: string } = {};\n private describedbyEl: HTMLElement = null;\n private describedById: string = null;\n private mutationObserver: MutationObserver = null;\n private hostMutationObserver: MutationObserver = null;\n private routerSlot: HTMLElement;\n\n @Element() el: HTMLIcButtonElement;\n\n @State() ariaLabel: string = null;\n @State() describedByContent: string = null;\n @State() title: string = null;\n\n /**\n * If `fileUpload` is set to `true`, this is the accepted list of file types.\n */\n @Prop() accept?: string = \"*\";\n\n /**\n * The appearance of the button, e.g. dark, light, or the default.\n */\n @Prop({ mutable: true }) appearance?: IcThemeForeground = \"default\";\n\n /**\n * @internal Used to identify any related child component\n */\n @Prop() ariaControlsId: string | boolean;\n\n /**\n * @internal Used to identify any related child component\n */\n @Prop() ariaOwnsId: string | boolean;\n\n /**\n * If `true`, the button will be in disabled state.\n */\n @Prop() disabled?: boolean = false;\n @Watch(\"disabled\")\n watchDisabledHandler(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n /**\n * If `true`, the ic-tooltip which is shown for icon variant will be disabled. Title or aria-label must be set if this prop is not applied.\n */\n @Prop() disableTooltip?: boolean = false;\n\n /**\n * If `true`, the user can save the linked URL instead of navigating to it.\n */\n @Prop() download?: string | boolean = false;\n\n /**\n * If `true`, the button will show a dropdown icon.\n */\n @Prop() dropdown?: boolean = false;\n\n /**\n * If `true`, the aria-expanded value will be set to true. This is only applied if the dropdown prop is also true.\n */\n @Prop({ mutable: true, reflect: true }) dropdownExpanded?: boolean = false;\n\n /**\n * If `true`, when the button is clicked the native file explorer will be launched.\n */\n @Prop() fileUpload?: boolean = false;\n\n /**\n * The name of the control for the file input, which is submitted with the form data.\n */\n @Prop() fileInputName: string = `ic-button-file-upload-input-${buttonIds++}`;\n\n /**\n * The <form> element to associate the button with.\n */\n @Prop() form?: string;\n\n /**\n * The URL that processes the information submitted by the button. It overrides the action attribute of the button's form owner. Does nothing if there is no form owner.\n */\n @Prop() formaction?: string;\n\n /**\n * The way the submitted form data is encoded.\n */\n @Prop() formenctype?: string;\n\n /**\n * The HTTP method used to submit the form.\n */\n @Prop() formmethod?: string;\n\n /**\n * If `true`, the form will not be validated when submitted.\n */\n @Prop() formnovalidate?: boolean;\n\n /**\n * The place to display the response from submitting the form. It overrides the target attribute of the button's form owner.\n */\n @Prop() formtarget?: string;\n\n /**\n * If `true`, the button will fill the width of the container.\n */\n @Prop() fullWidth?: boolean = false;\n\n /**\n * The URL that the link points to. This will render the button as an \"a\" tag.\n */\n @Prop() href?: string;\n\n /**\n * The human language of the linked URL.\n */\n @Prop() hreflang?: string;\n\n /**\n * If `true`, the button will be in loading state.\n */\n @Prop() loading?: boolean = false;\n\n /**\n * If `fileUpload` is set to `true`, this boolean determines whether multiple files are accepted.\n */\n @Prop() multiple?: boolean = false;\n\n /**\n * How much of the referrer to send when following the link.\n */\n @Prop() referrerpolicy?: ReferrerPolicy;\n\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n @Prop() rel?: string;\n\n /**\n * The list of the files that have been selected by a user.\n */\n @Prop() selectedFiles: FileList;\n\n /**\n * The size of the button to be displayed.\n */\n @Prop() size?: IcSizes = \"default\";\n\n /**\n * The place to display the linked URL, as the name for a browsing context (a tab, window, or iframe).\n */\n @Prop() target?: string;\n\n /**\n * The position of the tooltip in relation to the button.\n */\n @Prop() tooltipPlacement?: IcButtonTooltipPlacement = \"bottom\";\n\n /**\n * If `true`, the secondary variant of button will have a transparent background rather than white.\n */\n @Prop() transparentBackground?: boolean = true;\n\n /**\n * The type of the button.\n */\n @Prop() type?: IcButtonTypes = \"button\";\n\n /**\n * The variant of the button to be displayed.\n */\n @Prop() variant?: IcButtonVariants = \"primary\";\n\n /**\n * Emitted when button has blur\n */\n @Event() icBlur!: EventEmitter<void>;\n\n /**\n * If `fileUpload` is set to `true`, this will be emitted when a file is selected in the native explorer.\n */\n @Event() icFileSelection!: EventEmitter<FileList>;\n\n /**\n * Emitted when button has focus\n */\n @Event() icFocus!: EventEmitter<void>;\n\n disconnectedCallback(): void {\n if (this.mutationObserver !== null && this.mutationObserver !== undefined) {\n this.mutationObserver.disconnect();\n }\n if (\n this.hostMutationObserver !== null &&\n this.hostMutationObserver !== undefined\n ) {\n this.hostMutationObserver.disconnect();\n }\n }\n\n componentWillUpdate(): void {\n if (this.loading) {\n this.el.style.setProperty(\n \"--min-width\",\n `${this.el.getBoundingClientRect().width}px`\n );\n }\n this.setHasTooltip();\n }\n\n componentWillLoad(): void {\n const {\n title,\n \"aria-label\": ariaLabel,\n ...restInheritedAttributes\n } = inheritAttributes(this.el, [...IC_INHERITED_ARIA, \"title\"]);\n\n this.title = title;\n this.ariaLabel = ariaLabel;\n this.inheritedAttributes = restInheritedAttributes;\n\n removeDisabledFalse(this.disabled, this.el);\n\n this.el.setAttribute(\"exportparts\", \"button\");\n\n this.id = this.el.id || null;\n this.setHasTooltip();\n\n if (!this.hasTooltip) {\n const describedById = this.inheritedAttributes[\"aria-describedby\"];\n if (describedById !== undefined) {\n this.describedById = describedById;\n const el = this.el.parentElement.querySelector<HTMLElement>(\n `#${describedById}`\n );\n if (el) {\n this.describedByContent = el.innerText;\n this.describedbyEl = el;\n }\n }\n }\n }\n\n componentDidLoad(): void {\n this.updateTheme();\n\n if (typeof MutationObserver !== \"undefined\") {\n if (this.describedById) {\n this.mutationObserver = new MutationObserver(this.mutationCallback);\n this.mutationObserver.observe(this.describedbyEl, {\n characterData: true,\n childList: true,\n subtree: true,\n });\n }\n\n this.hostMutationObserver = new MutationObserver(\n this.hostMutationCallback\n );\n this.hostMutationObserver.observe(this.el, {\n attributes: true,\n });\n }\n }\n\n componentWillRender(): void {\n const iconEl = this.hasIconSlot(\"left\")\n ? this.el.querySelector(`[slot=\"left-icon\"]`)\n : this.hasIconSlot(\"right\")\n ? this.el.querySelector(`[slot=\"right-icon\"]`)\n : null;\n iconEl?.setAttribute(\"viewBox\", \"0 0 24 24\");\n }\n\n @Listen(\"click\", { capture: true })\n handleHostClick(event: Event): void {\n if (!this.hasRouterSlot()) {\n if (this.fileUpload) {\n renderFileHiddenInput(\n this.icFileSelection,\n this.el,\n this.multiple,\n this.fileInputName,\n this.selectedFiles,\n this.disabled,\n this.accept\n );\n }\n if (this.disabled || this.loading) {\n event.stopImmediatePropagation();\n }\n if (this.dropdown) {\n this.dropdownExpanded = !this.dropdownExpanded;\n }\n }\n }\n\n @Listen(\"themeChange\", { target: \"document\" })\n themeChangeHandler({ detail }: CustomEvent<IcTheme>): void {\n this.updateTheme(detail.mode);\n }\n\n /**\n * Sets focus on the native `button`.\n */\n @Method()\n async setFocus(): Promise<void> {\n this.buttonEl?.focus();\n }\n\n private async closeButtonTooltip(ev: KeyboardEvent): Promise<void> {\n const tooltip = this.el.shadowRoot.querySelector(\"ic-tooltip\");\n if (await tooltip.isTooltipVisible()) {\n tooltip.displayTooltip(false);\n ev.preventDefault();\n ev.stopImmediatePropagation();\n }\n }\n\n private hasIconSlot(position?: \"left\" | \"right\" | \"top\"): boolean {\n const selectorPrefix = position ? `${position}-` : \"\";\n return this.el.querySelector(`[slot=\"${selectorPrefix}icon\"]`) !== null;\n }\n\n private hasRouterSlot(): boolean {\n this.routerSlot = this.el.querySelector('[slot=\"router-item\"]');\n if (this.routerSlot) {\n this.routerSlot.ariaLabel = this.routerSlot.textContent;\n }\n return !!this.routerSlot;\n }\n\n private handleClick = (): void => {\n if (\n (this.el.type === \"submit\" || this.el.type === \"reset\") &&\n !this.hasRouterSlot() &&\n !!this.el.closest(\"FORM\")\n ) {\n const hiddenFormButton = document.createElement(\"button\");\n\n hiddenFormButton.setAttribute(\"type\", this.el.type);\n hiddenFormButton.style.display = \"none\";\n\n this.el.closest(\"FORM\").appendChild(hiddenFormButton);\n\n hiddenFormButton.click();\n hiddenFormButton.remove();\n }\n };\n\n private handleKeyDown = (ev: KeyboardEvent): void => {\n if (ev.key === \"Escape\" && this.hasTooltip) {\n this.closeButtonTooltip(ev);\n }\n };\n\n private onFocus = () => {\n this.icFocus.emit();\n };\n\n private onBlur = () => {\n this.icBlur.emit();\n };\n\n private updateTheme(newTheme: IcThemeForeground = null): void {\n const foregroundColor = getThemeFromContext(this.el, newTheme);\n\n if (foregroundColor !== IcThemeForegroundEnum.Default) {\n this.appearance = foregroundColor;\n }\n }\n\n // triggered when text content of sibling element in light DOM changes\n private mutationCallback = (): void => {\n this.describedByContent = this.describedbyEl.innerText;\n };\n\n // triggered when attributes of host element change\n private hostMutationCallback = (mutationList: MutationRecord[]): void => {\n let forceComponentUpdate = false;\n mutationList.forEach(({ attributeName }) => {\n const attribute = this.el.getAttribute(attributeName);\n if (attributeName === \"title\") this.title = attribute;\n else if (attributeName === \"aria-label\") this.ariaLabel = attribute;\n\n if (IC_INHERITED_ARIA.includes(attributeName)) {\n this.inheritedAttributes[attributeName] = attribute;\n forceComponentUpdate = true;\n }\n });\n if (forceComponentUpdate) {\n forceUpdate(this);\n }\n };\n\n private setHasTooltip = (): void => {\n this.hasTooltip =\n !this.disableTooltip && (!!this.title || this.isIconVariant());\n };\n\n private isIconVariant = (): boolean => {\n return this.variant.startsWith(\"icon\");\n };\n\n render() {\n const TagType = (this.href && \"a\") || \"button\";\n const { title, ariaLabel, inheritedAttributes } = this;\n const buttonAttrs =\n TagType === \"button\"\n ? {\n type: this.type,\n disabled: this.disabled,\n form: this.form,\n formaction: this.formaction,\n formenctype: this.formenctype,\n formmethod: this.formmethod,\n formnovalidate: this.formnovalidate,\n formtarget: this.formtarget,\n }\n : {\n download: this.download !== false ? this.download : null,\n href: this.href,\n rel: this.rel,\n target: this.target,\n referrerpolicy: this.referrerpolicy,\n hreflang: this.hreflang,\n };\n\n let describedby: string = null;\n let buttonId: string = null;\n if (this.hasTooltip) {\n buttonId =\n this.id !== null\n ? `ic-button-with-tooltip-${this.id}`\n : `ic-button-with-tooltip-${this.buttonIdNum}`;\n describedby =\n this.variant === \"icon\" && !!ariaLabel\n ? null\n : `ic-tooltip-${buttonId}`;\n } else {\n describedby = this.describedById;\n }\n\n const ButtonContent = () => {\n return (\n <TagType\n class=\"button\"\n aria-disabled={this.loading || this.disabled ? \"true\" : null}\n aria-label={this.loading ? \"Loading\" : ariaLabel}\n aria-expanded={this.dropdown && `${this.dropdownExpanded}`}\n {...buttonAttrs}\n {...inheritedAttributes}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n ref={(el) => (this.buttonEl = el)}\n aria-describedby={describedby}\n part=\"button\"\n >\n {this.hasIconSlot() && !this.loading && (\n <div class=\"icon-container\">\n <slot name=\"icon\" />\n </div>\n )}\n {this.hasIconSlot(\"left\") && !this.loading && (\n <div class=\"icon-container\">\n <slot name=\"left-icon\" />\n </div>\n )}\n {this.hasIconSlot(\"top\") &&\n !this.hasIconSlot(\"left\") &&\n !this.hasIconSlot(\"right\") &&\n !this.loading && (\n <div class=\"icon-container\">\n <slot name=\"top-icon\" />\n </div>\n )}\n {this.loading ? (\n <div class=\"loading-container\">\n <ic-loading-indicator\n type=\"linear\"\n appearance={\n this.variant === \"primary\" ||\n this.variant === \"destructive\" ||\n this.appearance === IcThemeForegroundEnum.Dark ||\n this.appearance === IcThemeForegroundEnum.Light\n ? \"light\"\n : \"dark\"\n }\n ></ic-loading-indicator>\n </div>\n ) : (\n <slot />\n )}\n {this.hasIconSlot(\"right\") && !this.loading && !this.dropdown && (\n <div class={{ \"icon-container\": true, \"right-icon\": true }}>\n <slot name=\"right-icon\" />\n </div>\n )}\n {this.dropdown &&\n !this.loading &&\n this.variant !== \"icon\" &&\n this.variant !== \"destructive\" && (\n <span\n class={{\n [\"arrow-dropdown\"]: !this.dropdownExpanded,\n [\"dropdown-expanded\"]: this.dropdownExpanded,\n }}\n innerHTML={arrowDropdown}\n />\n )}\n </TagType>\n );\n };\n\n return (\n <Host\n class={{\n [\"disabled\"]: this.disabled && !this.loading,\n [`button-variant-${this.variant}`]: true,\n [`button-size-${this.size}`]: true,\n [\"loading\"]: this.loading,\n [\"dark\"]: this.appearance === IcThemeForegroundEnum.Dark,\n [\"light\"]: this.appearance === IcThemeForegroundEnum.Light,\n [\"full-width\"]: this.fullWidth,\n [\"with-badge\"]: isSlotUsed(this.el, \"badge\"),\n [\"dropdown-no-icon\"]:\n this.dropdown &&\n !isSlotUsed(this.el, \"icon\") &&\n !isSlotUsed(this.el, \"left-icon\"),\n [\"top-icon\"]: isSlotUsed(this.el, \"top-icon\"),\n [\"white-background\"]:\n this.variant === \"secondary\" &&\n !this.transparentBackground &&\n this.appearance !== \"light\",\n }}\n onClick={this.handleClick}\n onKeyDown={this.handleKeyDown}\n aria-owns={this.ariaOwnsId}\n aria-controls={this.ariaControlsId}\n aria-expanded={this.dropdown && `${this.dropdownExpanded}`}\n >\n {this.hasTooltip && (\n <ic-tooltip\n id={describedby}\n label={title || ariaLabel}\n target={buttonId}\n placement={this.tooltipPlacement}\n silent={this.isIconVariant() && !!ariaLabel}\n >\n {this.hasRouterSlot() ? (\n <slot name=\"router-item\"></slot>\n ) : (\n <ButtonContent />\n )}\n </ic-tooltip>\n )}\n {isSlotUsed(this.el, \"badge\") && <slot name=\"badge\"></slot>}\n {!this.hasTooltip &&\n (this.hasRouterSlot() ? (\n <slot name=\"router-item\"></slot>\n ) : (\n <ButtonContent />\n ))}\n {this.describedByContent && (\n <span id={describedby} class=\"ic-button-describedby\">\n {this.describedByContent}\n </span>\n )}\n </Host>\n );\n }\n}\n","@import \"../../global/normalize.css\";\n\n:host {\n /**\n * @prop --circular-diameter: Diameter of the circular-indicator\n */\n\n display: block;\n\n --linear-border-radius: 0.25rem;\n --inner-color: var(--ic-action-default);\n --outer-color: var(--ic-architectural-100);\n --label-color: var(--ic-color-primary-text);\n --margin: none;\n --linear-line-height: var(--ic-space-xs);\n}\n\n:host(.light) {\n --inner-color: var(--ic-architectural-white);\n --outer-color: var(--ic-architectural-800);\n --label-color: var(--ic-architectural-white);\n}\n\n.ic-loading-container {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n}\n\n:host([size=\"small\"]) {\n --circular-diameter: 2.5rem;\n --linear-line-height: var(--ic-space-xxs);\n}\n\n:host([size=\"default\"]) {\n --circular-diameter: 5rem;\n}\n\n:host([size=\"large\"]) {\n --circular-diameter: 7.5rem;\n}\n\n:host([size=\"icon\"]) {\n display: inline-block;\n\n --margin: var(--ic-space-xxxs);\n --circular-diameter: 1.25rem;\n}\n\n:host(.label) {\n --margin: 0 0 var(--ic-space-xs) 0;\n}\n\n.ic-loading-label {\n color: var(--label-color);\n margin-left: var(--label-margin-left);\n}\n\n.ic-loading-circular-outer {\n height: var(--circular-diameter);\n width: var(--circular-diameter);\n}\n\n.ic-loading-circular-outer.indeterminate {\n animation: circular-animation 1s linear;\n animation-iteration-count: infinite;\n}\n\n@keyframes circular-animation {\n 100% {\n transform: rotate(360deg);\n }\n}\n\n.ic-loading-circular-outer,\n.ic-loading-linear-outer {\n margin: var(--margin);\n}\n\n.ic-loading-linear-outer {\n background-color: var(--outer-color);\n height: var(--linear-line-height);\n width: 100%;\n border-radius: var(--linear-border-radius);\n overflow: hidden;\n}\n\n.ic-loading-linear-inner {\n position: relative;\n height: 100%;\n background-color: var(--inner-color);\n border-radius: var(--linear-border-radius);\n}\n\n.indeterminate > .ic-loading-linear-inner {\n animation: linear-animation 2s infinite;\n}\n\n.determinate > .ic-loading-linear-inner {\n transition: width 0.5s;\n width: var(--linear-width);\n}\n\n:host(.full-width) {\n --linear-border-radius: none;\n}\n\n@keyframes linear-animation {\n 0% {\n width: 0%;\n left: -1%;\n }\n\n 25% {\n width: 0%;\n left: -1%;\n }\n\n 50% {\n width: 101%;\n left: -1%;\n }\n\n 75% {\n width: 0%;\n left: 101%;\n }\n\n 100% {\n width: 0%;\n left: 101%;\n }\n}\n\n.ic-loading-circular-svg {\n position: relative;\n width: 100%;\n height: 100%;\n transform: rotate(-90deg);\n}\n\n.ic-loading-circular-svg circle {\n width: 100%;\n height: 100%;\n fill: none;\n stroke: var(--compact-step-outer-color, var(--outer-color));\n stroke-width: var(--circular-line-width);\n stroke-linecap: round;\n}\n\n/* --stroke-dash-array calculated via dashArray method */\n.ic-loading-circular-svg circle:nth-child(2) {\n --circular-indeterminate: calc(\n (0.25 * var(--stroke-dasharray)) - var(--stroke-dasharray)\n );\n\n stroke-dasharray: var(--stroke-dasharray), var(--stroke-dasharray);\n stroke-dashoffset: var(--stroke-dashoffset, var(--circular-indeterminate));\n stroke: var(--compact-step-inner-color, var(--inner-color));\n}\n\n:host(.inner-label) .ic-loading-circular-inner {\n display: grid;\n}\n\n:host(.inner-label) .ic-loading-circular-svg,\n.inner-text {\n grid-column: 1;\n grid-row: 1;\n}\n\n:host(.not-required.compact-step-progress-indicator)\n .ic-loading-circular-svg\n circle:nth-child(2) {\n stroke: var(--ic-architectural-300);\n}\n\n.inner-text {\n display: flex;\n align-items: center;\n justify-content: center;\n width: var(--ic-space-lg);\n height: inherit;\n overflow: hidden;\n margin: auto;\n color: var(--compact-step-inner-color, var(--ic-status-info));\n}\n\n:host(.not-required.compact-step-progress-indicator) .inner-text {\n color: var(--ic-color-tertiary-text);\n}\n\n:host(.light.not-required.compact-step-progress-indicator) .inner-text {\n color: var(--ic-architectural-400);\n}\n\n/** High Contrast **/\n@media (forced-colors: active) {\n .indeterminate > .ic-loading-circular-inner {\n forced-color-adjust: none;\n }\n\n .ic-loading-linear-outer {\n border: var(--ic-hc-border);\n }\n\n .ic-loading-linear-inner {\n background-color: canvastext;\n }\n\n .ic-loading-circular-svg circle {\n stroke: Background;\n }\n\n .ic-loading-circular-svg circle:nth-child(2) {\n stroke: canvastext;\n }\n\n :host(.not-required.compact-step-progress-indicator)\n .ic-loading-circular-svg\n circle:nth-child(2) {\n stroke: GrayText;\n }\n}\n","import { Component, Element, h, Host, Prop, State, Watch } from \"@stencil/core\";\nimport {\n IcLoadingCircleXYR,\n IcLoadingSizes,\n IcLoadingTypes,\n} from \"./ic-loading-indicator.types\";\nimport {\n IcThemeForegroundEnum,\n IcThemeForegroundNoDefault,\n} from \"../../utils/types\";\nimport { isPropDefined } from \"../../utils/helpers\";\n\n@Component({\n tag: \"ic-loading-indicator\",\n styleUrl: \"ic-loading-indicator.css\",\n shadow: true,\n})\nexport class LoadingIndicator {\n private circularMeter: SVGCircleElement;\n private innerElement?: HTMLDivElement;\n private interval: ReturnType<typeof setInterval>;\n private labelList: string[];\n private outerElement?: HTMLDivElement;\n\n @Element() el: HTMLIcLoadingIndicatorElement;\n\n @State() circularDiameter: number;\n @State() circularLineWidth: number;\n @State() indeterminate: boolean;\n @State() indicatorLabel: string;\n @State() showSecond: boolean = false;\n\n /**\n * The appearance of the loading indicator, e.g. dark or light.\n */\n @Prop() appearance?: IcThemeForegroundNoDefault = \"dark\";\n\n /**\n * The description that will be set as the aria-label of the loading indicator when not using a visible label.\n */\n @Prop() description?: string = \"Loading\";\n\n /**\n * If `true`, when linear, the full-width variant (i.e. without a border radius) will be displayed.\n */\n @Prop({ reflect: true }) fullWidth?: boolean = false;\n\n /**\n * @internal The step number of a compact step, managed by ic-step.\n */\n @Prop() innerLabel?: number;\n\n /**\n * The time in milliseconds before the label changes.\n */\n @Prop() labelDuration?: number = 8000;\n\n /**\n * The maximum value that the progress value can take.\n * Used to calculate the proportional width of the progress bar.\n */\n @Prop() max?: number = 100;\n\n /**\n * The minimum value that the progress value can take.\n * Used to calculate the proportional width of the progress bar.\n */\n @Prop() min?: number = 0;\n\n /**\n * The size of the loading indicator.\n */\n @Prop({ reflect: true }) size?: IcLoadingSizes = \"default\";\n\n /**\n * The type of indicator, either linear or circular.\n */\n @Prop({ reflect: true }) type?: IcLoadingTypes = \"circular\";\n\n /**\n * The label to be displayed beneath the loading indicator.\n * Display a changing label by separating multiple messages with forward slashes.\n */\n @Prop() label?: string;\n\n @Watch(\"label\")\n watchPropHandler(): void {\n this.updateLabel();\n }\n\n /**\n * The current amount of progress made.\n * If not provided, component acts as an indeterminate loading indicator.\n */\n @Prop() progress?: number;\n\n @Watch(\"progress\")\n watchProgressHandler(): void {\n if (this.type === \"circular\") {\n this.updateCircularProgressMeter();\n }\n }\n\n disconnectedCallback(): void {\n clearInterval(this.interval);\n }\n\n componentWillLoad(): void {\n this.indeterminate = this.progress === undefined;\n this.updateLabel();\n this.el.setAttribute(\"exportparts\", \"ic-loading-container\");\n }\n\n componentDidLoad(): void {\n if (this.type === \"circular\") {\n this.setCircleLineWidth();\n this.circularMeter = this.el.shadowRoot.querySelector(\n \".ic-loading-circular-svg circle:nth-child(2)\"\n );\n this.updateCircularProgressMeter();\n }\n\n if (Number(this.progress) >= 0 && this.type === \"linear\") {\n this.setLinearDeterminateWidth();\n }\n }\n\n componentWillUpdate(): void {\n this.indeterminate = this.progress === undefined;\n }\n\n componentDidUpdate(): void {\n if (Number(this.progress) >= 0 && this.type === \"linear\") {\n this.setLinearDeterminateWidth();\n }\n }\n\n private updateCircularProgressMeter = () => {\n if (!this.indeterminate) {\n this.circularMeter.style.setProperty(\n \"--progress-value\",\n String(this.progress)\n );\n }\n };\n\n private getLabel = (\n labelIndex: number,\n setLabel: (label: string) => void\n ) => {\n return new Promise(() => {\n this.interval = setInterval(() => {\n if (labelIndex < this.labelList.length - 1) {\n labelIndex++;\n } else {\n labelIndex = 0;\n }\n setLabel(this.labelList[labelIndex]);\n }, this.labelDuration);\n });\n };\n\n private getLabelVariant = () => {\n let variant: \"label\" | \"h4\" | \"h2\" = \"h4\";\n const width = this.outerElement?.offsetWidth;\n if (this.size === \"small\" || (this.type === \"circular\" && width < 60)) {\n variant = \"label\";\n } else if (\n this.size === \"large\" ||\n (this.type === \"circular\" && width >= 120)\n ) {\n variant = \"h2\";\n }\n return variant;\n };\n\n // Sets the circular indicator line width - accounting for the circle size being altered using the CSS custom property\n private setCircleLineWidth = () => {\n const { offsetWidth: width } = this.outerElement;\n\n const compactStepCircularLineWidth = this.el.classList.contains(\n \"compact-step-progress-indicator\"\n )\n ? 40\n : 0;\n const toastDismissTimerCircularLineWidth = this.el.classList.contains(\n \"toast-dismiss-timer\"\n )\n ? 20\n : 0;\n\n if (\n width ||\n compactStepCircularLineWidth ||\n toastDismissTimerCircularLineWidth\n ) {\n this.circularLineWidth =\n (compactStepCircularLineWidth ||\n toastDismissTimerCircularLineWidth ||\n width) * 0.1;\n this.circularDiameter =\n compactStepCircularLineWidth ||\n toastDismissTimerCircularLineWidth ||\n width;\n this.outerElement.style.setProperty(\n \"--circular-line-width\",\n `${this.circularLineWidth}px`\n );\n }\n };\n\n private setLinearDeterminateWidth = () => {\n if (!this.innerElement) return;\n // Ensure progress cannot be out of bounds\n\n const progress = Math.min(this.max, Math.max(this.min, this.progress));\n const proportion = (progress - this.min) / (this.max - this.min);\n this.showSecond = proportion > 0.5;\n if (this.showSecond) {\n this.innerElement.classList.remove(\"clip\");\n } else {\n this.innerElement.classList.add(\"clip\");\n }\n this.innerElement.style.setProperty(\n \"--linear-width\",\n `${proportion * 100}%`\n );\n };\n\n private calcOuterClass = (): string => {\n let cls = `ic-loading-${this.type}-outer`;\n cls += this.indeterminate ? \" indeterminate\" : \" determinate\";\n return cls;\n };\n\n private updateLabel = (): void => {\n if (isPropDefined(this.label)) {\n this.labelList = this.label.split(\"/\");\n const labelIndex = 0;\n this.indicatorLabel = this.labelList[labelIndex];\n if (this.labelList.length > 1) {\n this.getLabel(labelIndex, (label) => {\n this.indicatorLabel = label;\n });\n }\n }\n };\n\n private setCircleXY = (): IcLoadingCircleXYR => {\n if (this.circularDiameter > 0) {\n const r = this.circularDiameter / 2;\n const x = r;\n const y = r;\n const nextRadius = r - this.circularLineWidth / 2;\n this.setDashSteps(nextRadius);\n\n return { x, y, r: nextRadius };\n }\n return { x: 0, y: 0, r: 0 };\n };\n\n private setDashSteps = (radius: number) => {\n const dashArray = 2 * Math.PI * radius;\n const progress = Math.min(Math.max(this.progress, this.min), this.max);\n const proportion = -1 - (progress - this.min) / (this.max - this.min);\n\n this.circularMeter.style.setProperty(\n \"--stroke-dasharray\",\n `${dashArray}px`\n );\n\n if (!this.indeterminate) {\n this.circularMeter.style.setProperty(\n \"--circular-steps-max\",\n String(this.max)\n );\n this.circularMeter.style.setProperty(\n \"--stroke-dashoffset\",\n `${proportion * dashArray}px`\n );\n }\n };\n\n render() {\n const { appearance, label, description, size, fullWidth, innerLabel } =\n this;\n const { x, y, r } = this.setCircleXY();\n\n return (\n <Host\n class={{\n [\"light\"]: appearance === IcThemeForegroundEnum.Light,\n [\"label\"]: !!label,\n [\"full-width\"]: fullWidth,\n [\"inner-label\"]: !!innerLabel,\n }}\n >\n <div class=\"ic-loading-container\" part=\"ic-loading-container\">\n <div\n ref={(el) => (this.outerElement = el as HTMLDivElement)}\n class={this.calcOuterClass()}\n role=\"progressbar\"\n aria-labelledby={\n this.label && this.size !== \"icon\" && \"ic-loading-label\"\n }\n aria-label={description}\n aria-valuenow={this.progress}\n aria-valuemin={this.min}\n aria-valuemax={this.max}\n >\n <div\n ref={(el) => (this.innerElement = el as HTMLDivElement)}\n class={`ic-loading-${this.type}-inner`}\n >\n {this.innerLabel &&\n this.innerLabel !== undefined &&\n this.size === \"small\" && (\n <ic-typography variant=\"subtitle-small\" class=\"inner-text\">\n {this.innerLabel}\n </ic-typography>\n )}\n {this.type === \"circular\" && (\n <svg\n class=\"ic-loading-circular-svg\"\n viewBox={`0 0 ${this.circularDiameter || 0} ${\n this.circularDiameter || 0\n }`}\n >\n <circle cx={`${x}`} cy={`${y}`} r={`${r}`}></circle>\n <circle cx={`${x}`} cy={`${y}`} r={`${r}`}></circle>\n </svg>\n )}\n </div>\n </div>\n {label && size !== \"icon\" && (\n <ic-typography\n id=\"ic-loading-label\"\n class=\"ic-loading-label\"\n role=\"status\"\n variant={this.getLabelVariant()}\n >\n <p>{this.indicatorLabel}</p>\n </ic-typography>\n )}\n </div>\n </Host>\n );\n }\n}\n","@import \"../../global/normalize.css\";\n\n/**\n * @prop --ic-z-index-tooltip: z-index of tooltip\n */\n\n:host(.ic-tooltip) {\n width: max-content;\n height: max-content;\n}\n\n:host(.ic-tooltip) .ic-tooltip-container {\n background-color: var(--ic-architectural-800);\n color: #ffff;\n text-align: center;\n padding: var(--ic-space-xxxs) var(--ic-space-xs);\n border-radius: var(--ic-border-radius);\n border: var(--ic-border-width) solid var(--ic-architectural-40);\n position: absolute;\n max-width: 20rem;\n display: none;\n z-index: var(--ic-z-index-tooltip);\n box-shadow: var(--ic-elevation-overlay);\n}\n\n:host(.tooltip-navigation-item:not(.tooltip-navigation-item-side-nav-collapsed))\n .ic-tooltip-container,\n:host(.tooltip-disabled) .ic-tooltip-container {\n display: none !important;\n}\n\n:host(.tooltip-long-label-navigation-item-side-nav-expanded)\n .ic-tooltip-container[data-show] {\n display: block !important;\n}\n\n:host(.ic-tooltip) .ic-tooltip-arrow,\n:host(.ic-tooltip) .ic-tooltip-arrow::before {\n position: absolute;\n background: inherit;\n}\n\n:host(.ic-tooltip) .ic-tooltip-arrow {\n visibility: hidden;\n width: var(--ic-space-md);\n height: var(--ic-space-md);\n}\n\n:host(.ic-tooltip) .ic-tooltip-arrow::before {\n visibility: visible;\n content: \"\";\n border: var(--ic-border-width) solid var(--ic-architectural-40);\n width: 100%;\n height: 100%;\n}\n\n:host(.ic-tooltip) .ic-tooltip-container[data-show] {\n display: block;\n}\n\n:host(.ic-tooltip)\n .ic-tooltip-container[data-popper-placement^=\"top\"]\n > .ic-tooltip-arrow {\n height: var(--ic-space-xxxs);\n}\n\n:host(.ic-tooltip)\n .ic-tooltip-container[data-popper-placement^=\"top\"]\n > .ic-tooltip-arrow::before {\n border-radius: 0 0 var(--ic-border-radius) var(--ic-border-radius);\n left: 0;\n top: var(--ic-space-xxxs);\n border-top: 0;\n transform: translateX(var(--tooltip-arrow-translate));\n}\n\n:host(.ic-tooltip)\n .ic-tooltip-container[data-popper-placement^=\"bottom\"]\n > .ic-tooltip-arrow {\n top: calc(-1 * var(--ic-space-xxs));\n height: var(--ic-space-xxxs);\n}\n\n:host(.ic-tooltip)\n .ic-tooltip-container[data-popper-placement^=\"bottom\"]\n > .ic-tooltip-arrow::before {\n border-radius: var(--ic-border-radius) var(--ic-border-radius) 0 0;\n left: 0;\n top: var(--ic-space-1px);\n border-bottom: 0;\n transform: translateX(var(--tooltip-arrow-translate));\n}\n\n:host(.ic-tooltip)\n .ic-tooltip-container[data-popper-placement^=\"left\"]\n > .ic-tooltip-arrow {\n width: var(--ic-space-xxxs);\n right: calc(-1 * var(--ic-space-1px));\n}\n\n:host(.ic-tooltip)\n .ic-tooltip-container[data-popper-placement^=\"left\"]\n > .ic-tooltip-arrow::before {\n border-radius: 0 var(--ic-border-radius) var(--ic-border-radius) 0;\n border-left: 0;\n top: calc(-1 * var(--ic-space-1px));\n}\n\n:host(.ic-tooltip)\n .ic-tooltip-container[data-popper-placement^=\"right\"]\n > .ic-tooltip-arrow {\n width: var(--ic-space-xxxs);\n left: calc(-1 * var(--ic-space-xxs));\n}\n\n:host(.ic-tooltip)\n .ic-tooltip-container[data-popper-placement^=\"right\"]\n > .ic-tooltip-arrow::before {\n border-radius: var(--ic-border-radius) 0 0 var(--ic-border-radius);\n border-right: 0;\n top: calc(-1 * var(--ic-space-1px));\n}\n\n:host(.on-dialog) .ic-tooltip-container {\n transform: translate(\n var(--tooltip-translate-x),\n var(--tooltip-translate-y)\n ) !important;\n}\n\n@media screen and (max-width: 576px) {\n :host(.ic-tooltip) .ic-tooltip-container {\n max-width: 18.875rem;\n }\n}\n\n@media (forced-colors: active) {\n :host(.ic-tooltip) .ic-tooltip-container,\n :host(.ic-tooltip) .ic-tooltip-arrow::before {\n border: var(--ic-hc-border);\n }\n}\n","import {\n Component,\n Element,\n Host,\n Prop,\n h,\n Method,\n State,\n} from \"@stencil/core\";\nimport { Instance, Options, createPopper } from \"@popperjs/core\";\nimport { IcTooltipPlacements } from \"./ic-tooltip.types\";\nimport { onComponentRequiredPropUndefined } from \"../../utils/helpers\";\n\n@Component({\n tag: \"ic-tooltip\",\n styleUrl: \"ic-tooltip.css\",\n shadow: true,\n})\nexport class Tooltip {\n private arrow: HTMLDivElement;\n private delayedHideEvents = [\"mouseleave\"];\n private dialogOverflow = false;\n private icDialogEl: HTMLIcDialogElement;\n private instantHideEvents = [\"focusout\"];\n private mouseOverTool: boolean = false;\n private persistTooltip = false;\n private popperInstance: Instance;\n private onDialog: boolean = false;\n private showEvents = [\n !this.disableHover && \"mouseenter\",\n !this.disableHover && \"focusin\",\n !this.disableClick && \"click\",\n ];\n private toolTip: HTMLDivElement;\n\n @Element() el: HTMLIcTooltipElement;\n\n /**\n * @internal If `true`, the tooltip will not be displayed on click, it will require hover or using the display method.\n */\n @Prop() disableClick?: boolean = false;\n\n /**\n * If `true`, the tooltip will not be displayed on hover, it will require a click.\n */\n @Prop() disableHover?: boolean = false;\n\n /**\n * The number of lines to display before truncating the text.\n */\n @Prop() maxLines?: number;\n\n /**\n * The position of the tooltip in relation to the parent element.\n */\n @Prop({ mutable: true }) placement?: IcTooltipPlacements = \"bottom\";\n\n /**\n * @internal Sets the tooltip to aria-hidden, when used as part of components that are already announced.\n */\n @Prop() silent?: boolean = false;\n\n /**\n * The ID of the element the tooltip is describing - for when aria-labelledby or aria-describedby is used.\n */\n @Prop({ reflect: true }) target?: string;\n\n /**\n * The text to display on the tooltip.\n */\n @Prop() label!: string;\n\n @State() popperProps: Partial<Options> = {};\n\n /**\n * @internal This method allows props to be added to the PopperJS createPopper instance outside of tooltip\n * @param props object - createPopper props set externally\n */\n @Method()\n async setExternalPopperProps<T extends Partial<Options>>(props: T) {\n this.popperProps = props;\n }\n\n disconnectedCallback(): void {\n this.manageEventListeners(\"remove\");\n if (this.popperInstance !== undefined) {\n this.popperInstance.destroy();\n }\n }\n\n componentDidLoad(): void {\n this.manageEventListeners(\"add\");\n\n this.icDialogEl = this.el.closest(\"ic-dialog\");\n this.dialogOverflow =\n this.icDialogEl?.getAttribute(\"data-overflow\") === \"true\";\n\n this.onDialog = this.icDialogEl !== null;\n\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Tooltip\"\n );\n }\n\n componentDidRender(): void {\n const typographyEl = this.el.shadowRoot.querySelector(\n \".ic-tooltip-container > ic-typography\"\n );\n this.maxLines > 0 &&\n typographyEl.setAttribute(\n \"style\",\n `--truncation-max-lines: ${this.maxLines}`\n );\n }\n /**\n * Method to programmatically show/hide the tooltip without needing to interact with an anchor element\n * @param show Whether to show or hide the tooltip\n * @param persistTooltip Whether the tooltip should stay on the screen when actions are performed that would previously dismiss the tooltip, such as on hover\n */\n @Method()\n async displayTooltip(show: boolean, persistTooltip?: boolean): Promise<void> {\n this.persistTooltip = persistTooltip;\n show ? this.show() : this.hide();\n }\n\n /**\n * @internal Method to return if tooltip is currently visible.\n */\n @Method()\n async isTooltipVisible(): Promise<boolean> {\n return Promise.resolve(this.toolTip.hasAttribute(\"data-show\"));\n }\n\n private getTooltipTranslate = (dialogEl: DOMRect) => {\n const child = this.el.children[0].getBoundingClientRect();\n let tooltipX;\n let tooltipY;\n switch (this.placement) {\n case \"bottom\":\n tooltipX = child.left - dialogEl.left - 0.5 * child.width;\n tooltipY = child.bottom - dialogEl.top;\n break;\n case \"bottom-start\":\n tooltipX = child.left - dialogEl.left;\n tooltipY = child.bottom - dialogEl.top;\n break;\n case \"bottom-end\":\n tooltipX = child.right - dialogEl.right;\n tooltipY = child.bottom - dialogEl.top;\n break;\n case \"top\":\n tooltipX = child.left - dialogEl.left - 0.5 * child.width;\n tooltipY = child.top - dialogEl.bottom;\n break;\n case \"top-start\":\n tooltipX = child.left - dialogEl.left;\n tooltipY = child.top - dialogEl.bottom;\n break;\n case \"top-end\":\n tooltipX = child.right - dialogEl.right;\n tooltipY = child.top - dialogEl.bottom;\n break;\n case \"left\":\n case \"left-start\":\n tooltipX = child.right - dialogEl.right - child.width;\n tooltipY = child.bottom - dialogEl.top - child.height;\n break;\n case \"left-end\":\n tooltipX = child.right - dialogEl.right - child.width;\n tooltipY = child.top - dialogEl.bottom + child.height;\n break;\n case \"right\":\n case \"right-start\":\n tooltipX = child.left - dialogEl.left + child.width;\n tooltipY = child.bottom - dialogEl.top - child.height;\n break;\n case \"right-end\":\n tooltipX = child.left - dialogEl.left + child.width;\n tooltipY = child.top - dialogEl.bottom + child.height;\n break;\n }\n if (this.dialogOverflow && tooltipX < 0) {\n if (this.placement.includes(\"top\") || this.placement.includes(\"bottom\")) {\n this.toolTip.style.setProperty(\n \"--tooltip-arrow-translate\",\n `${tooltipX}px`\n );\n tooltipX = child.left - dialogEl.left;\n }\n if (this.placement.includes(\"left\")) {\n this.placement = \"right\";\n tooltipX = child.left - dialogEl.left + child.width;\n }\n }\n\n this.toolTip.style.setProperty(\"--tooltip-translate-x\", `${tooltipX}px`);\n this.toolTip.style.setProperty(\"--tooltip-translate-y\", `${tooltipY}px`);\n };\n\n private show = () => {\n if (this.label) {\n this.toolTip.setAttribute(\"data-show\", \"\");\n\n if (this.onDialog) {\n this.el.classList.add(\"on-dialog\");\n const dialogEl = this.icDialogEl.shadowRoot\n .querySelector(\"dialog\")\n .getBoundingClientRect();\n\n this.getTooltipTranslate(dialogEl);\n }\n\n this.popperInstance = createPopper(this.el, this.toolTip, {\n placement: this.placement,\n modifiers: [\n {\n name: \"offset\",\n options: {\n offset: [0, 10],\n },\n },\n {\n name: \"arrow\",\n options: {\n element: this.arrow,\n },\n },\n {\n name: \"eventListeners\",\n options: { scroll: false, resize: false },\n },\n ],\n ...this.popperProps,\n });\n } else {\n console.warn(`Tooltip can't display without prop 'label' set`);\n }\n };\n\n private hide = () => {\n this.toolTip.removeAttribute(\"data-show\");\n this.persistTooltip = false;\n if (this.popperInstance !== undefined) {\n this.popperInstance.destroy();\n }\n };\n\n private checkCloseTooltip = () => {\n setTimeout(() => {\n if (!this.mouseOverTool && !this.persistTooltip) {\n this.hide();\n }\n }, 100);\n };\n\n private mouseEnterTooltip = () => {\n this.mouseOverTool = true;\n };\n\n private mouseLeaveTooltip = () => {\n this.mouseOverTool = false;\n this.checkCloseTooltip();\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === \"Escape\" && !this.persistTooltip) {\n this.hide();\n }\n };\n\n private manageEventListeners = (action: \"add\" | \"remove\") => {\n const method =\n action === \"add\" ? \"addEventListener\" : \"removeEventListener\";\n\n this.showEvents.forEach((event) => {\n this.el[method](event, this.show);\n if (this.toolTip !== undefined) {\n this.toolTip[method](event, this.mouseEnterTooltip);\n }\n });\n\n if (!this.persistTooltip) {\n this.instantHideEvents.forEach((event) => {\n this.el[method](event, this.hide);\n });\n }\n\n this.delayedHideEvents.forEach((event) => {\n this.el[method](event, this.checkCloseTooltip);\n if (this.toolTip !== undefined) {\n this.toolTip[method](event, this.mouseLeaveTooltip);\n }\n });\n\n document[method](\"keydown\", this.handleKeyDown);\n };\n\n render() {\n const { label, maxLines, silent } = this;\n return (\n <Host class={{ \"ic-tooltip\": true }}>\n <div\n ref={(el) => (this.toolTip = el as HTMLDivElement)}\n role=\"tooltip\"\n class=\"ic-tooltip-container\"\n aria-hidden={`${silent}`}\n >\n <ic-typography maxLines={maxLines} variant=\"caption\">\n {label}\n </ic-typography>\n <div\n ref={(el) => (this.arrow = el as HTMLDivElement)}\n class=\"ic-tooltip-arrow\"\n ></div>\n </div>\n <slot></slot>\n </Host>\n );\n }\n}\n"],"mappings":"oZAAA,MAAMA,EAAc,ogwB,8WCoCpB,IAAIC,EAAY,E,MAiBHC,EAAM,M,0IAETC,KAAAC,YAAcH,IACdE,KAAAE,WAAsB,MAEtBF,KAAAG,oBAA+C,GAC/CH,KAAAI,cAA6B,KAC7BJ,KAAAK,cAAwB,KACxBL,KAAAM,iBAAqC,KACrCN,KAAAO,qBAAyC,KAuUzCP,KAAAQ,YAAc,KACpB,IACGR,KAAKS,GAAGC,OAAS,UAAYV,KAAKS,GAAGC,OAAS,WAC9CV,KAAKW,mBACJX,KAAKS,GAAGG,QAAQ,QAClB,CACA,MAAMC,EAAmBC,SAASC,cAAc,UAEhDF,EAAiBG,aAAa,OAAQhB,KAAKS,GAAGC,MAC9CG,EAAiBI,MAAMC,QAAU,OAEjClB,KAAKS,GAAGG,QAAQ,QAAQO,YAAYN,GAEpCA,EAAiBO,QACjBP,EAAiBQ,Q,GAIbrB,KAAAsB,cAAiBC,IACvB,GAAIA,EAAGC,MAAQ,UAAYxB,KAAKE,WAAY,CAC1CF,KAAKyB,mBAAmBF,E,GAIpBvB,KAAA0B,QAAU,KAChB1B,KAAK2B,QAAQC,MAAM,EAGb5B,KAAA6B,OAAS,KACf7B,KAAK8B,OAAOF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AAQ9O,EAC3B8H,MAAM,sBAGVH,EAAA,a"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["icPopoverMenuCss","PopoverMenu","this","ARIA_LABEL","popoverMenuEls","setButtonFocus","_a","currentFocus","focus","findAnchorEl","anchor","anchorElement","submenuId","undefined","console","error","document","querySelector","indexOf","isNotPopoverMenuEl","ev","id","tagName","target","getNextItemToSelect","currentItem","movingDown","numButtons","length","nextItem","addMenuItems","elements","i","el","push","groupSlotWrapper","shadowRoot","menuGroupElements","getSlotElements","getMenuAriaLabel","ariaLabel","getAttribute","isPropDefined","submenuLevel","parentLabel","handleBackButtonClick","parentPopover","openFromChild","open","initPopperJS","popperInstance","createPopper","anchorEl","placement","modifiers","name","options","offset","fallbackPlacements","rootBoundary","watchOpenHandler","some","menuItem","unshift","backButton","setTimeout","destroy","disconnectedCallback","componentDidLoad","slotWrapper","popoverMenuElements","componentWillRender","componentDidRender","handleMenuItemClick","detail","hasSubMenu","label","closeMenu","handleSubmenuChange","childEl","submenuTriggerFor","openFromParent","handleClick","handleKeyDown","key","preventDefault","blur","openingFromChild","openingFromParent","setFocusToAnchor","icPopoverClosed","emit","render","h","Host","class","menu","tabindex","role","ref","onClick","slot","viewBox","fill","xmlns","d","variant"],"sources":["src/components/ic-popover-menu/ic-popover-menu.css?tag=ic-popover-menu&encapsulation=shadow","src/components/ic-popover-menu/ic-popover-menu.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n/**\n* @prop --ic-z-index-popover: z-index of popover menu. \n* @prop --max-height: Maximum height of the popover menu.\n* @prop --popover-width: Default width of the popover menu.\n*/\n\n@media (prefers-reduced-motion: no-preference) {\n :host .opening-from-parent {\n animation: slide-in var(--ic-transition-duration-slow) ease-in-out;\n }\n\n :host .opening-from-child {\n animation: slide-out var(--ic-transition-duration-slow) ease-in-out;\n }\n}\n\n:host {\n border-radius: var(--ic-border-radius);\n color: var(--ic-color-primary-text);\n background-color: var(--ic-architectural-white);\n position: relative;\n z-index: var(--ic-z-index-popover);\n box-sizing: border-box;\n box-shadow: var(--ic-elevation-overlay);\n display: none;\n}\n\n:host(.on-dialog) {\n inset: auto !important;\n}\n\n:host(.on-dialog-fix-translate) {\n transform: translate(0, var(--ic-space-xs)) !important;\n}\n\n:host(.on-dialog-translate-y) {\n transform: translate(0, calc(-1 * var(--translate-y))) !important;\n}\n\n.menu {\n border: var(--ic-border-default);\n border-radius: var(--ic-border-radius);\n background-color: var(--ic-architectural-white);\n visibility: hidden;\n height: 0;\n}\n\n.button {\n text-decoration: none;\n list-style-type: none;\n}\n\n:host(:focus-within) {\n box-shadow: var(--ic-border-focus);\n}\n\n.menu:focus-visible {\n outline: none;\n}\n\n:host(.open) {\n display: block;\n min-width: calc(20rem - var(--ic-space-xl));\n width: var(--popover-width, 20rem);\n max-width: calc(100vw - var(--ic-space-xl));\n}\n\n:host(.open) .menu {\n visibility: visible;\n height: fit-content;\n max-height: var(--max-height, fit-content);\n overflow-y: auto;\n overflow-x: hidden;\n}\n\n.parent-label {\n color: var(--ic-color-tertiary-text);\n margin: var(--ic-space-xs) var(--ic-space-xs) 0;\n}\n\n@keyframes slide-in {\n from {\n opacity: 0;\n transform: translateX(10rem);\n }\n\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n@keyframes slide-out {\n from {\n opacity: 0;\n transform: translateX(-10rem);\n }\n\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n","import {\n Component,\n Element,\n Host,\n h,\n Prop,\n Listen,\n Watch,\n State,\n Method,\n Event,\n EventEmitter,\n} from \"@stencil/core\";\nimport { getSlotElements, isPropDefined } from \"../../utils/helpers\";\nimport { createPopper, Instance as PopperInstance } from \"@popperjs/core\";\n\n@Component({\n tag: \"ic-popover-menu\",\n styleUrl: \"ic-popover-menu.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class PopoverMenu {\n private anchorEl: HTMLElement;\n private ARIA_LABEL: string = \"aria-label\";\n private backButton: HTMLIcMenuItemElement;\n private currentFocus: number;\n private popoverMenuEls: HTMLIcMenuItemElement[] = [];\n private popperInstance: PopperInstance;\n\n @Element() el: HTMLIcPopoverMenuElement;\n\n @State() openingFromChild: boolean = false;\n @State() openingFromParent: boolean = false;\n\n /**\n * The ID of the element the popover menu will anchor itself to. This is required unless the popover is a submenu.\n */\n @Prop() anchor: string;\n\n /**\n * @internal The parent popover menu of a child popover menu.\n */\n @Prop() parentLabel?: string;\n\n /**\n * @internal The parent popover menu of a child popover menu.\n */\n @Prop() parentPopover?: HTMLIcPopoverMenuElement;\n\n /**\n * The unique identifier for a popover submenu.\n */\n @Prop() submenuId?: string;\n\n /**\n * @internal The level of menu being displayed.\n */\n @Prop() submenuLevel: number = 1;\n\n /**\n * If `true`, the popover menu will be displayed.\n */\n @Prop({ reflect: true, mutable: true }) open: boolean = undefined;\n\n @Watch(\"open\")\n watchOpenHandler(): void {\n if (this.open) {\n if (\n this.parentPopover !== undefined &&\n !this.popoverMenuEls.some((menuItem) => menuItem.id)\n ) {\n this.popoverMenuEls.unshift(this.backButton);\n }\n\n this.currentFocus = 0;\n // Needed so that anchorEl isn't always focused\n setTimeout(this.setButtonFocus, 50);\n } else if (this.popperInstance) {\n this.popperInstance.destroy();\n this.popperInstance = null;\n }\n }\n\n /**\n * Emitted when the popover menu is closed.\n */\n @Event() icPopoverClosed: EventEmitter<void>;\n\n disconnectedCallback(): void {\n if (this.popperInstance) {\n this.popperInstance.destroy();\n this.popperInstance = null;\n }\n }\n\n componentDidLoad(): void {\n const slotWrapper = this.el.shadowRoot.querySelector(\"ul.button\");\n const popoverMenuElements = getSlotElements(slotWrapper);\n\n if (popoverMenuElements !== null) {\n this.addMenuItems(popoverMenuElements);\n }\n\n if (\n this.submenuId === undefined &&\n this.el.getAttribute(this.ARIA_LABEL) === null\n ) {\n console.error(\n `No aria-label specified for popover menu component - aria-label required`\n );\n }\n }\n\n componentWillRender(): void {\n this.anchorEl = this.findAnchorEl(this.anchor);\n }\n\n componentDidRender(): void {\n if (this.open && !this.popperInstance) {\n this.initPopperJS();\n }\n }\n\n @Listen(\"handleMenuItemClick\")\n handleMenuItemClick(\n ev: CustomEvent<{\n label: string;\n hasSubMenu: boolean;\n }>\n ): void {\n if (!ev.detail.hasSubMenu && ev.detail.label !== \"Back\") {\n this.closeMenu();\n }\n }\n\n // This is listening for the event emitted when a menu item is acting as a trigger button\n @Listen(\"triggerPopoverMenuInstance\", { capture: true })\n handleSubmenuChange(ev: Event): void {\n // Finds the trigger menu item that has emitted the event\n const target = ev.target as HTMLIcMenuItemElement;\n this.open = false;\n\n // Find the popover menu that the menu item triggers (i.e. submenu-trigger-for === submenu-id).\n const childEl = document.querySelector(\n `ic-popover-menu[submenu-id=${target.submenuTriggerFor}]`\n ) as HTMLIcPopoverMenuElement;\n // Set the parent popover menu of the submenu and open the submenu\n childEl.parentPopover = this.el;\n childEl.anchor = this.anchor;\n childEl.ariaLabel = this.el.getAttribute(this.ARIA_LABEL);\n childEl.openFromParent();\n childEl.submenuLevel = this.submenuLevel + 1;\n // Set the label in the submenu using the label of the menu item that has emitted the event\n childEl.parentLabel = target.label;\n }\n\n @Listen(\"click\", { target: \"document\" })\n handleClick(ev: Event): void {\n if (this.open && this.isNotPopoverMenuEl(ev)) {\n // If menu is open and the next click on the document is not a popover El, close the popover\n this.closeMenu();\n }\n }\n\n // Manages the keyboard navigation in the popover menu\n @Listen(\"keydown\", {})\n handleKeyDown(ev: KeyboardEvent): void {\n switch (ev.key) {\n case \"ArrowDown\":\n case \"ArrowUp\":\n ev.preventDefault();\n this.currentFocus = this.getNextItemToSelect(\n this.currentFocus,\n ev.key === \"ArrowDown\"\n );\n this.setButtonFocus();\n break;\n case \"Home\":\n //Sets home focus as first element, or back button\n this.currentFocus = 0;\n this.setButtonFocus();\n break;\n case \"End\":\n //Sets end focus as last element\n this.currentFocus = this.popoverMenuEls.length - 1;\n this.setButtonFocus();\n break;\n case \"Escape\":\n case \"Tab\":\n ev.preventDefault();\n if (this.open) {\n this.closeMenu(true);\n this.el.blur();\n }\n break;\n }\n }\n\n /**\n * @internal Opens the menu from the child menu.\n */\n @Method()\n async openFromChild(): Promise<void> {\n this.open = true;\n this.openingFromChild = true;\n\n setTimeout(() => (this.openingFromChild = false), 1000);\n }\n\n /**\n * @internal Opens the menu from the parent menu.\n */\n @Method()\n async openFromParent(): Promise<void> {\n this.open = true;\n this.openingFromParent = true;\n\n setTimeout(() => (this.openingFromParent = false), 1000);\n }\n\n private setButtonFocus = () => {\n this.popoverMenuEls[this.currentFocus]?.focus();\n };\n\n // Checks that the popover menu has an anchor\n private findAnchorEl = (anchor: string): HTMLElement => {\n let anchorElement: HTMLElement = null;\n if (!anchor) {\n this.submenuId === undefined &&\n console.error(\"No anchor specified for popover component\");\n } else {\n anchorElement = document.querySelector(\n anchor.indexOf(\"#\") === 0 ? anchor : \"#\" + anchor\n );\n if (anchorElement === null) {\n console.error(`Popover anchor element '${anchor}' not found`);\n }\n }\n return anchorElement;\n };\n\n private isNotPopoverMenuEl = (ev: Event) => {\n const { id, tagName } = ev.target as HTMLElement;\n return (\n id !== this.anchor &&\n tagName !== \"IC-MENU-ITEM\" &&\n tagName !== \"IC-MENU-GROUP\" &&\n tagName !== \"IC-POPOVER-MENU\"\n );\n };\n\n /**\n * @internal Close the menu, emit icPopoverClosed of the root popover\n * @param setFocusToAnchor when true return focus to anchor element when menu is closed\n */\n @Method()\n async closeMenu(setFocusToAnchor = false): Promise<void> {\n this.open = false;\n if (this.parentPopover) {\n this.parentPopover.closeMenu(setFocusToAnchor);\n } else {\n if (setFocusToAnchor) {\n this.anchorEl?.focus();\n }\n this.icPopoverClosed.emit();\n }\n }\n\n private getNextItemToSelect = (\n currentItem: number,\n movingDown: boolean\n ): number => {\n const numButtons = this.popoverMenuEls.length - 1;\n\n if (currentItem < 1) {\n currentItem = 0;\n }\n\n let nextItem = movingDown ? currentItem + 1 : currentItem - 1;\n\n // Check if wrap around necessary\n if (nextItem < 0) {\n nextItem = numButtons;\n } else if (nextItem > numButtons) {\n nextItem = 0;\n }\n\n return nextItem;\n };\n\n private addMenuItems = (elements: Element[] | NodeListOf<ChildNode>) => {\n for (let i = 0; i < elements.length; i++) {\n const el = elements[i] as HTMLIcMenuItemElement;\n if (el.tagName === \"IC-MENU-ITEM\") {\n this.popoverMenuEls.push(el);\n } else if (el.tagName === \"IC-MENU-GROUP\") {\n const groupSlotWrapper = el.shadowRoot.querySelector(\n \".menu-items-wrapper\"\n );\n const menuGroupElements = getSlotElements(groupSlotWrapper);\n\n this.addMenuItems(menuGroupElements);\n }\n }\n };\n\n private getMenuAriaLabel = (): string => {\n const ariaLabel = this.el.getAttribute(this.ARIA_LABEL);\n\n if (isPropDefined(this.submenuId)) {\n return `${ariaLabel}, within nested level ${this.submenuLevel} ${this.parentLabel} submenu,`;\n } else {\n return ariaLabel;\n }\n };\n\n private handleBackButtonClick = (): void => {\n this.parentPopover.openFromChild();\n this.open = false;\n };\n\n private initPopperJS = () => {\n this.popperInstance = createPopper(this.anchorEl, this.el, {\n placement: \"bottom-start\",\n modifiers: [\n {\n name: \"offset\",\n options: {\n offset: [0, 4],\n },\n },\n {\n name: \"flip\",\n options: {\n fallbackPlacements: [\"top-start\", \"top-end\", \"bottom-end\"],\n rootBoundary: \"viewport\",\n },\n },\n ],\n });\n };\n\n render() {\n return (\n <Host class={{ open: this.open }}>\n <div\n id={\n this.parentPopover === undefined\n ? `ic-popover-submenu-${this.submenuId}`\n : \"\"\n }\n class={{\n menu: true,\n }}\n tabindex={open ? \"0\" : \"-1\"}\n >\n <span\n class={{\n \"opening-from-parent\": this.openingFromParent,\n \"opening-from-child\": this.openingFromChild,\n }}\n >\n {isPropDefined(this.submenuId) && (\n <span>\n <span role=\"menu\">\n <ic-menu-item\n class=\"ic-popover-submenu-back-button\"\n ref={(el) => (this.backButton = el)}\n label=\"Back\"\n onClick={this.handleBackButtonClick}\n id={`ic-popover-submenu-back-button-${this.submenuLevel}`}\n >\n <svg\n slot=\"icon\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"submenu-back-icon\"\n >\n <path\n d=\"M20 11H7.83L13.42 5.41L12 4L4 12L12 20L13.41 18.59L7.83 13H20V11Z\"\n fill=\"currentColor\"\n />\n </svg>\n </ic-menu-item>\n </span>\n <ic-typography variant=\"subtitle-small\" class=\"parent-label\">\n {this.parentLabel}\n </ic-typography>\n </span>\n )}\n <ul class=\"button\" aria-label={this.getMenuAriaLabel()} role=\"menu\">\n <slot></slot>\n </ul>\n </span>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"uKAAA,MAAMA,EAAmB,m9H,MCuBZC,EAAW,M,0EAEdC,KAAAC,WAAqB,aAGrBD,KAAAE,eAA0C,GAkM1CF,KAAAG,eAAiB,K,OACvBC,EAAAJ,KAAKE,eAAeF,KAAKK,iBAAa,MAAAD,SAAA,SAAAA,EAAEE,OAAO,EAIzCN,KAAAO,aAAgBC,IACtB,IAAIC,EAA6B,KACjC,IAAKD,EAAQ,CACXR,KAAKU,YAAcC,WACjBC,QAAQC,MAAM,4C,KACX,CACLJ,EAAgBK,SAASC,cACvBP,EAAOQ,QAAQ,OAAS,EAAIR,EAAS,IAAMA,GAE7C,GAAIC,IAAkB,KAAM,CAC1BG,QAAQC,MAAM,2BAA2BL,e,EAG7C,OAAOC,CAAa,EAGdT,KAAAiB,mBAAsBC,IAC5B,MAAMC,GAAEA,EAAEC,QAAEA,GAAYF,EAAGG,OAC3B,OACEF,IAAOnB,KAAKQ,QACZY,IAAY,gBACZA,IAAY,iBACZA,IAAY,iBAAiB,EAqBzBpB,KAAAsB,oBAAsB,CAC5BC,EACAC,KAEA,MAAMC,EAAazB,KAAKE,eAAewB,OAAS,EAEhD,GAAIH,EAAc,EAAG,CACnBA,EAAc,C,CAGhB,IAAII,EAAWH,EAAaD,EAAc,EAAIA,EAAc,EAG5D,GAAII,EAAW,EAAG,CAChBA,EAAWF,C,MACN,GAAIE,EAAWF,EAAY,CAChCE,EAAW,C,CAGb,OAAO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M,6BACNT,MAAM,qBAENF,EAAA,QACEY,EAAE,oEACFF,KAAK,oBAKbV,EAAA,iBAAea,QAAQ,iBAAiBX,MAAM,gBAC3C7F,KAAK0C,cAIZiD,EAAA,MAAIE,MAAM,SAAQ,aAAa7F,KAAKqC,mBAAoB2D,KAAK,QAC3DL,EAAA,gB"}
@@ -1 +0,0 @@
1
- {"version":3,"names":["icSideNavigationCss","SideNavigation","this","ANIMATION_DURATION","parseInt","getCssProperty","IC_NAVIGATION_ITEM","resizeObserver","COLLAPSED_ICON_LABELS_END","COLLAPSED_ICON_LABELS_START","menuButton","emitSideNavigationExpanded","objDetails","sideNavExpanded","emit","sideNavMobile","toggleMenu","menuOpen","setMobileMenuAriaAttributes","arrangeSlottedNavigationItem","setToggleMenuFlyoutMenuVisibility","sideNav","el","shadowRoot","querySelector","sideNavInner","bottomWrapper","menuVisibilityVisible","classList","add","setTimeout","remove","setAttribute","setAndRemoveNoWrapAfterMenuExpanded","appTitle","toggleMenuExpanded","menuExpanded","style","setProperty","addEventListener","e","propertyName","displayTooltipWithExpandedLongLabel","collapsedIconLabels","animateCollapsedIconLabels","setExpandedButtonHeight","navItems","querySelectorAll","forEach","navItem","isNamedSlot","isSlotUsed","isUnnamedSlot","children","getAttribute","navItemSlot","iconWrapper","document","createElement","icon","label","textContent","trim","icTypography","height","append","styleSlottedCollapsedIconLabels","styleSlottedIconLabels","marginTop","whiteSpace","overflow","textOverflow","appStatusWrapper","offsetHeight","opacity","visibility","transition","transitionHandler","type","primaryNavigationWrapper","secondaryNavigationWrapper","classToRemove","classToAdd","transitionEndHandler","paddingIconWidth","navItemLink","navItemSVG","navStyles","gap","window","getComputedStyle","iconWidth","width","paddingLeft","Object","values","reduce","prev","curr","timer","sideNavWidth","clientWidth","navigationItems","Array","from","paddingIconDelta","length","navigationItem","icTypographyScrollWidth","_a","scrollWidth","_b","clearTimeout","setMenuExpanded","expanded","setParentPaddingTop","value","parentElement","setParentPaddingLeft","renderAppTitle","isAppNameSubtitleVariant","displayShortAppTitle","deviceSize","DEVICE_SIZES","S","isEmptyString","shortAppTitle","h","variant","undefined","resizeObserverCallback","currSize","isSmallAndDisableTopBar","disableTopBarBehaviour","disableAutoParentStyling","topBarHeight","scrollHeight","inline","L","M","static","runResizeObserver","ResizeObserver","getCurrentDeviceSize","deviceSizeAppTitle","observe","body","box","setCollapsedIconLabels","styleSlottedCollapsedIconLabel","dynamicSlottedIcTypographyComps","contains","renderTopBar","isSDevice","foregroundColor","href","hasTitle","isPropDefined","Component","attrs","class","id","size","appearance","onClick","ariaOwnsId","ref","slot","innerHTML","closeIcon","menuIcon","assign","name","getThemeForegroundColor","watchExpandedHandler","componentWillLoad","hasSecondaryNavigation","componentDidLoad","checkResizeObserver","onComponentRequiredPropUndefined","prop","propName","disconnectedCallback","disconnect","removeEventListener","themeChangeHandler","detail","mode","render","status","version","isMdDevice","isLgDevice","displayExpandBtn","topBarProps","Host","IcThemeForegroundEnum","Dark","hasClassificationBanner","chevronIcon"],"sources":["src/components/ic-side-navigation/ic-side-navigation.css?tag=ic-side-navigation&encapsulation=shadow","src/components/ic-side-navigation/ic-side-navigation.tsx"],"sourcesContent":["/**\n * @prop --ic-z-index-side-navigation: z-index of side navigation panel\n */\n\n:host {\n display: block;\n\n --side-navigation-position: fixed;\n --side-navigation-position-left: 0;\n --side-navigation-position-top: var(--ic-space-xxl);\n --side-navigation-height: var(--ic-space-xxl);\n --sm-side-navigation-top-bar-height: 3.5rem;\n --sm-side-navigation-collapsed-labels-width: 6rem;\n --sm-side-navigation-expand-transition-duration: var(\n --ic-transition-duration-slow\n );\n --side-navigation-width: 20rem;\n --sm-side-navigation-bottom-bar-height: 3.5rem;\n\n z-index: var(--ic-z-index-side-navigation);\n}\n\n:host > * {\n box-sizing: border-box;\n}\n\n.side-navigation {\n display: flex;\n flex-direction: column;\n width: var(--side-navigation-width);\n color: var(--ic-theme-text);\n position: var(--side-navigation-position);\n top: var(--side-navigation-position-top);\n left: calc(var(--side-navigation-width) * -1);\n bottom: 0;\n background-color: var(--ic-theme-primary);\n z-index: var(--ic-z-index-side-navigation);\n}\n\n:host(.inline) .side-navigation {\n position: absolute;\n height: 100%;\n}\n\n:host(.anchor-right) .side-navigation {\n right: calc(var(--side-navigation-width) * -1);\n}\n\n.classification-spacing {\n margin-bottom: var(--ic-space-lg);\n}\n\n.navigation-list {\n padding: 0;\n margin: 0;\n list-style: none;\n}\n\n.side-navigation-inner {\n background-color: var(--ic-theme-primary);\n display: flex;\n flex-direction: column;\n flex: 1 1 0;\n overflow: auto;\n}\n\n:host(.inline) .side-navigation-inner {\n flex: 1;\n}\n\n:host(.xs-menu-open) .side-navigation {\n transition: left var(--ic-easing-transition-slow);\n left: 0;\n}\n\n:host(:has(.xs-menu-open, .xs-menu-close)) ::slotted(ic-navigation-item) {\n --navigation-item-side-nav-right: var(--ic-space-xl);\n}\n\n:host(.xs-menu-close) .side-navigation {\n left: calc(var(--side-navigation-width) * -1);\n transition: left var(--ic-easing-transition-slow);\n}\n\n:host(.xs-menu-close) .side-navigation > * {\n visibility: hidden;\n}\n\n:host(.anchor-right.xs-menu-open) .side-navigation {\n right: 0;\n left: auto;\n}\n\n:host(.anchor-right.xs-menu-close) .side-navigation {\n right: calc(var(--side-navigation-width) * -1);\n left: auto;\n transition: right var(--ic-easing-transition-slow);\n}\n\n.bottom-wrapper {\n border-top: var(--ic-keyline-lighten);\n bottom: 0;\n left: 0;\n z-index: 2;\n box-shadow: -0.188rem -0.188rem 0.5rem rgb(0 0 0 / 20%);\n background-color: var(--ic-theme-primary);\n display: flex;\n flex-direction: column;\n}\n\n:host(.inline) .bottom-wrapper {\n position: sticky;\n}\n\n:host(.dark) .bottom-wrapper {\n border-top: var(--ic-keyline-darken);\n}\n\n/* Mobile Top Bar */\n\n.top-bar {\n display: flex;\n flex-direction: row;\n align-items: center;\n min-height: var(--side-navigation-height);\n padding: var(--ic-space-xs);\n box-sizing: border-box;\n background-color: var(--ic-theme-primary);\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n border-bottom: var(--ic-keyline-darken);\n box-shadow: var(--ic-elevation-overlay);\n z-index: 2;\n overflow: hidden;\n visibility: visible;\n}\n\n:host(.inline) .top-bar {\n position: absolute;\n}\n\n.top-bar.dark a:focus {\n box-shadow: var(--ic-border-focus);\n}\n\n.top-bar.light {\n border-bottom: var(--ic-keyline-lighten);\n}\n\n.app-title-wrapper {\n display: flex;\n margin-left: var(--ic-space-xs);\n border-left: var(--ic-keyline-darken);\n padding-left: var(--ic-space-xxs);\n color: var(--ic-theme-text);\n align-items: center;\n}\n\n.app-title-wrapper ic-typography h1 {\n margin: 0;\n}\n\n@media screen and (min-width: 340px) {\n .app-title-wrapper ic-typography {\n margin-left: var(--ic-space-xs);\n }\n}\n\n:host .title-link {\n display: flex;\n align-items: center;\n transition: box-shadow var(--ic-easing-transition-fast),\n background-color var(--ic-easing-transition-fast);\n text-decoration: none;\n padding: var(--ic-space-xxs);\n color: var(--ic-theme-text);\n}\n\n:host .title-link:visited,\n:host .title-link:active {\n color: var(--ic-theme-text);\n}\n\nslot[name=\"app-title\"]::slotted(a),\nslot[name=\"app-icon\"]::slotted(a) {\n color: var(--ic-theme-text);\n outline: none;\n text-decoration: none;\n display: flex;\n}\n\nslot[name=\"app-title\"]::slotted(ic-typography),\nslot[name=\"app-title\"]::slotted(a) {\n margin-left: var(--ic-space-xs) !important;\n}\n\nslot[name=\"app-title\"]::slotted(a) {\n font: var(--ic-font-subtitle-small);\n}\n\n@media screen and (min-width: 577px) {\n :host(.sm-collapsed) slot[name=\"app-title\"]::slotted(ic-typography),\n :host(.sm-collapsed) slot[name=\"app-title\"]::slotted(a) {\n position: absolute;\n left: -9999px;\n opacity: 0;\n transition: opacity var(--ic-easing-transition-slow);\n }\n\n :host(.sm-expanded) slot[name=\"app-title\"]::slotted(a) {\n font: var(--ic-font-h3) !important;\n font-weight: var(--ic-font-weight-semibold) !important;\n margin-left: var(--ic-space-xs) !important;\n }\n}\n\n:host .title-link:hover {\n border-radius: var(--ic-border-radius);\n background-color: var(--ic-theme-hover);\n}\n\n:host .title-link:active {\n background-color: var(--ic-theme-active);\n}\n\n:host .title-link:focus,\n:host .title-link:focus-within {\n border-radius: var(--ic-border-radius);\n box-shadow: var(--ic-border-focus);\n outline: var(--ic-hc-focus-outline);\n background-color: transparent;\n}\n\n:host .title-link ic-typography {\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n\n.app-title-wrapper ::slotted(svg) {\n fill: var(--ic-theme-text);\n}\n\n.app-icon-container {\n display: none;\n}\n\n.button-label {\n display: flex;\n align-items: center;\n}\n\n.mobile-top-bar-menu-icon {\n display: flex;\n}\n\n.menu-button {\n width: 6.5rem;\n}\n\n.app-status-wrapper {\n inset: 0 var(--ic-space-sm) 0 3.5rem;\n width: auto;\n display: flex;\n gap: var(--ic-space-xs);\n padding: var(--ic-space-sm) 0;\n justify-content: flex-end;\n align-items: flex-end;\n pointer-events: none;\n height: fit-content;\n margin: 0 var(--ic-space-xs);\n}\n\n.app-status-wrapper .app-version {\n display: flex;\n overflow-wrap: break-word;\n padding-bottom: var(--ic-space-xxs);\n}\n\n.app-status-wrapper .app-status {\n display: flex;\n border-radius: 1rem;\n background-color: var(--ic-theme-text);\n color: var(--ic-color-primary-text);\n padding: var(--ic-space-xxs) var(--ic-space-lg);\n min-width: 1rem;\n}\n\n.app-status-wrapper .app-status-text {\n overflow-wrap: break-word;\n}\n\n:host(.dark) .app-status-wrapper .app-status {\n color: var(--ic-color-white-text);\n}\n\n.navigation-landmark-title {\n position: absolute;\n width: var(--ic-space-1px);\n height: var(--ic-space-1px);\n padding: 0;\n margin: calc(-1 * var(--ic-space-1px));\n overflow: hidden;\n}\n\n/* Navigation Group */\n\n::slotted(ic-navigation-group) {\n --navigation-group-height: 2.75rem;\n --navigation-group-width: 100%;\n --navigation-group-justify-content: space-between;\n --navigation-group-hover: var(--ic-theme-hover);\n --navigation-group-text-hover: var(--ic-theme-text);\n --navigation-item-child-height: 3.5rem;\n --navigation-item-child-active: var(--ic-action-dark-bg-active);\n --navigation-item-child-color: var(--ic-theme-text);\n --navigation-group-expand-toggle-padding: 0.25rem;\n}\n\n/* Navigation Items */\n\n::slotted(ic-navigation-item),\n::slotted(ic-navigation-group) {\n --navigation-item-justify-content: flex-start;\n --navigation-item-min-height: 56px;\n --navigation-item-height: auto;\n}\n\n/* Toggle Chevron */\n\n.bottom-side-nav {\n position: relative;\n align-content: flex-end;\n min-height: var(--sm-side-navigation-top-bar-height);\n}\n\n.bottom-side-nav ic-divider {\n position: absolute;\n top: 0;\n width: 100%;\n}\n\n.primary-navigation {\n flex: 1;\n display: flex;\n flex-direction: column;\n overflow-y: auto;\n\n /* Hide scrollbar when required but keep functionality */\n scrollbar-width: none;\n}\n\n.primary-navigation::-webkit-scrollbar {\n display: none;\n}\n\n.primary-navigation,\n.secondary-navigation {\n overflow-x: hidden;\n}\n\n.bottom-side-nav .menu-expand-button {\n position: absolute;\n display: none;\n}\n\n.menu-visibility-visible {\n visibility: visible;\n width: 100%;\n}\n\n.app-title-show {\n min-width: 15.5rem;\n}\n\n:host(.side-display) {\n display: flex;\n flex-direction: column;\n height: 100vh;\n position: var(--side-navigation-position);\n left: 0;\n top: 0;\n bottom: 0;\n}\n\n:host(.side-display) .app-icon-container {\n height: 40px;\n display: flex;\n align-items: center;\n}\n\n:host(.side-display) .top-bar {\n --side-navigation-height: var(--sm-side-navigation-top-bar-height);\n\n position: relative;\n padding: 0;\n box-shadow: -0.188rem 0.188rem 0.5rem rgb(0 0 0 / 20%);\n}\n\n:host(.inline.side-display) .top-bar {\n position: sticky;\n}\n\n:host(.anchor-right.side-display) .top-bar {\n box-shadow: 0.188rem 0.188rem 0.5rem rgb(0 0 0 / 20%);\n}\n\n:host(.anchor-right.side-display) .bottom-wrapper {\n box-shadow: 0.188rem -0.188rem 0.5rem rgb(0 0 0 / 20%);\n}\n\n:host(.side-display) .side-navigation,\n:host(.side-display) .top-bar {\n width: var(--sm-side-navigation-top-bar-height);\n}\n\n:host(.sm-collapsed.side-display) {\n width: var(--sm-side-navigation-top-bar-height);\n transition: width var(--ic-easing-transition-slow);\n}\n\n:host(.sm-collapsed.collapsed-labels.side-display) {\n width: var(--sm-side-navigation-collapsed-labels-width);\n}\n\n:host(.sm-expanded.side-display) {\n width: var(--side-navigation-width);\n transition: width var(--ic-easing-transition-slow);\n box-shadow: var(--ic-elevation-overlay);\n}\n\n:host(.side-display) .side-navigation {\n --side-navigation-position-top: 0;\n\n flex: 1;\n position: relative;\n top: auto;\n left: auto;\n bottom: auto;\n}\n\n:host(.inline.side-display) .side-navigation {\n position: relative;\n}\n\n:host(.anchor-right.side-display) .side-navigation {\n left: auto;\n right: 0;\n}\n\n:host(.side-display) .app-title-wrapper {\n margin-left: 0;\n border-left: none;\n padding: var(--ic-space-xs) var(--ic-space-sm);\n}\n\n:host(.side-display) .app-title-wrapper ::slotted(svg) {\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n}\n\n:host(.side-display) .app-title-wrapper ic-typography {\n font-weight: var(--ic-font-weight-semibold);\n}\n\n:host(.sm-collapsed.side-display) .app-title-wrapper ic-typography {\n position: absolute;\n left: -9999px;\n opacity: 0;\n transition: opacity var(--ic-easing-transition-slow);\n}\n\n:host(.sm-expanded.side-display) ic-typography {\n position: relative;\n left: 0;\n}\n\n:host(.sm-expanded.side-display) :is(.side-navigation, .top-bar) {\n width: var(--side-navigation-width);\n transition: width var(--ic-easing-transition-slow);\n}\n\n:host(.sm-collapsed.side-display) :is(.side-navigation, .top-bar) {\n width: var(--sm-side-navigation-top-bar-height);\n transition: width var(--ic-easing-transition-slow);\n}\n\n:host(.anchor-right.sm-expanded.side-display) :is(.side-navigation, .top-bar) {\n left: auto;\n right: 0;\n}\n\n:host(.side-display) .app-status-wrapper,\n:host(.sm-collapsed.side-display) .app-status-wrapper {\n display: none;\n margin-left: 0;\n}\n\n:host(.sm-expanded.side-display) .app-status-wrapper {\n display: flex;\n max-width: 16rem;\n margin-right: calc(var(--ic-space-xxxs) + var(--ic-space-xs));\n}\n\n:host(.side-display) .bottom-side-nav {\n justify-items: flex-end;\n align-items: flex-end;\n justify-content: flex-end;\n display: flex;\n outline: none;\n}\n\n:host(.side-display) .bottom-side-nav .menu-expand-button {\n padding-left: var(--ic-space-md);\n height: var(--sm-side-navigation-top-bar-height);\n width: 100%;\n color: var(--ic-theme-text);\n background-color: transparent;\n outline: var(--ic-hc-focus-outline);\n border: none;\n cursor: pointer;\n display: flex;\n transition: var(--ic-easing-transition-fast);\n}\n\n:host(.sm-expanded.side-display) .bottom-side-nav .menu-expand-button {\n height: 100%;\n}\n\n:host(.side-display) .bottom-side-nav .menu-expand-button svg {\n justify-items: flex-start;\n align-self: center;\n display: inline-block;\n width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n}\n\n:host(.side-display) .bottom-side-nav .menu-expand-button:hover {\n background-color: var(--ic-theme-hover);\n}\n\n:host(.side-display) .bottom-side-nav .menu-expand-button:focus {\n box-shadow: var(--ic-border-focus-inset);\n border-radius: var(--ic-border-radius-inset);\n background-color: transparent;\n}\n\n:host(.sm-collapsed.side-display) .bottom-side-nav .menu-expand-button svg {\n transform: scaleX(1);\n transition: transform var(--ic-easing-transition-slow);\n}\n\n:host(.sm-expanded.side-display) .bottom-side-nav .menu-expand-button svg {\n transform: scaleX(-1);\n transition: transform var(--ic-easing-transition-slow);\n align-self: flex-end;\n margin-bottom: 0.875rem;\n}\n\n:host(.anchor-right.sm-collapsed.side-display)\n .bottom-side-nav\n .menu-expand-button\n svg {\n transform: scaleX(-1);\n}\n\n:host(.anchor-right.sm-expanded.side-display)\n .bottom-side-nav\n .menu-expand-button\n svg {\n transform: scaleX(1);\n}\n\n:host(.sm-collapsed.side-display) ::slotted(ic-navigation-item) {\n --navigation-item-label-opacity: 1;\n}\n\n:host(.sm-collapsed.side-display) ::slotted(ic-navigation-item),\n:host(.sm-collapsed.side-display) ::slotted(ic-navigation-group) {\n --navigation-item-label-opacity: 0;\n --navigation-item-min-height: 56px;\n --navigation-item-height: 56px;\n}\n\n:host(.sm-expanded.side-display) ::slotted(ic-navigation-item),\n:host(.sm-expanded.side-display) ::slotted(ic-navigation-group) {\n --navigation-item-label-opacity: 1;\n --navigation-item-height: auto;\n --navigation-item-min-height: 56px;\n --navigation-item-width: 320px;\n --navigation-item-side-nav-right: var(--ic-space-xl);\n}\n\n:host(.sm-collapsed.side-display) ::slotted(ic-navigation-group) {\n --navigation-group-title-position: absolute;\n --navigation-group-title-position-left: -9999px;\n --navigation-group-title-opacity: none;\n}\n\n:host(.sm-expanded.side-display) ::slotted(ic-navigation-group) {\n --navigation-group-title-position: relative;\n --navigation-group-title-position-left: 0;\n --navigation-group-expand-toggle-padding: 0.25rem;\n --navigation-group-title-opacity: flex;\n}\n\n:host(.sm-collapsed.collapsed-labels.side-display) .side-navigation,\n:host(.sm-collapsed.collapsed-labels.side-display) .top-bar {\n width: var(--sm-side-navigation-collapsed-labels-width);\n}\n\n:host(.sm-collapsed.collapsed-labels.side-display) .menu-expand-button {\n padding: 0;\n}\n\n:host(.sm-collapsed.collapsed-labels.side-display) .app-title-wrapper {\n width: 100%;\n justify-content: center;\n}\n\n:host(.sm-collapsed.collapsed-labels.side-display)\n ::slotted(ic-navigation-group) {\n --navigation-group-justify-content: center;\n --navigation-item-label-opacity: 1;\n --navigation-group-item-min-width: 100%;\n --navigation-group-expand-toggle-padding: 1rem;\n}\n\n:host(.collapsed-labels.side-display) .bottom-side-nav .menu-expand-button {\n justify-content: center;\n}\n\n:host(.side-display) .collapsed-icon-labels-start {\n visibility: hidden;\n opacity: 0;\n}\n\n:host(.side-display) .collapsed-icon-labels-end {\n visibility: visible;\n opacity: 1;\n transition: visibility 0s, opacity var(--ic-easing-transition-slow);\n}\n\n/* Media Queries */\n\n@media screen and (min-width: 340px) {\n .app-icon-container {\n display: flex;\n }\n}\n\n@media screen and (min-width: 993px) {\n :host(.side-display) {\n position: sticky;\n left: auto;\n top: 0;\n bottom: 0;\n }\n\n :host(.sm-expanded.side-display) {\n box-shadow: none;\n }\n}\n\n@media (forced-colors: active) {\n .side-navigation,\n .top-bar {\n border-right: var(--ic-hc-border);\n }\n\n .menu-expand-button {\n color: Highlight !important;\n }\n\n slot[name=\"app-icon\"]::slotted(svg) {\n fill: currentcolor;\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n State,\n Element,\n Listen,\n Event,\n EventEmitter,\n Watch,\n} from \"@stencil/core\";\n\nimport menuIcon from \"../../assets/hamburger-menu-icon.svg\";\nimport closeIcon from \"../../assets/close-icon.svg\";\nimport chevronIcon from \"../../assets/chevron-icon.svg\";\nimport {\n getCurrentDeviceSize,\n DEVICE_SIZES,\n checkResizeObserver,\n isSlotUsed,\n getThemeForegroundColor,\n getCssProperty,\n hasClassificationBanner,\n onComponentRequiredPropUndefined,\n isEmptyString,\n isPropDefined,\n} from \"../../utils/helpers\";\nimport {\n IcTheme,\n IcThemeForeground,\n IcThemeForegroundEnum,\n} from \"../../utils/types\";\nimport { IcTopBar, IcExpandedDetail } from \"./ic-side-navigation.types\";\n\n/**\n * @slot app-icon - Content will be rendered adjacent to the app title at the very top of the side navigation.\n * @slot app-title - Handle routing by nesting a route in the app title.\n * @slot primary-navigation - Content will be rendered at the top of the side navigation.\n * @slot secondary-navigation - Content will be rendered at the bottom of the side navigation.\n */\n\n@Component({\n tag: \"ic-side-navigation\",\n styleUrl: \"ic-side-navigation.css\",\n shadow: true,\n})\nexport class SideNavigation {\n private ANIMATION_DURATION =\n parseInt(getCssProperty(\"--ic-transition-duration-slow\")) || 0;\n private IC_NAVIGATION_ITEM: string = \"ic-navigation-item\";\n private resizeObserver: ResizeObserver = null;\n private COLLAPSED_ICON_LABELS_END = \"collapsed-icon-labels-end\";\n private COLLAPSED_ICON_LABELS_START = \"collapsed-icon-labels-start\";\n private menuButton: HTMLIcButtonElement = null;\n\n @Element() el: HTMLIcSideNavigationElement;\n\n @State() deviceSize: number = getCurrentDeviceSize();\n @State() deviceSizeAppTitle: number = DEVICE_SIZES.S;\n @State() foregroundColor: IcThemeForeground = getThemeForegroundColor();\n @State() hasSecondaryNavigation: boolean = false;\n @State() menuExpanded: boolean = false;\n @State() menuOpen: boolean = false;\n\n /**\n * The app title to be displayed. This is required, unless a slotted app title link is used.\n */\n @Prop() appTitle: string;\n\n /**\n * If `true`, the icon and label will appear when side navigation is collapsed.\n */\n @Prop() collapsedIconLabels: boolean = false;\n\n /**\n * If `true`, automatic parent wrapper styling will be disabled.\n */\n @Prop() disableAutoParentStyling: boolean = false;\n\n /**\n * If `true`, the side navigation will not display as a top bar on small devices.\n */\n @Prop() disableTopBarBehaviour: boolean = false;\n\n /**\n * If `true`, the side navigation will display in an expanded state.\n */\n @Prop() expanded: boolean = false;\n\n @Watch(\"expanded\")\n watchExpandedHandler(): void {\n this.setMenuExpanded(this.expanded);\n }\n\n /**\n * The URL that the app title link points to.\n */\n @Prop() href: string = \"/\";\n\n /**\n * @internal If `true`, side navigation will be contained by its parent element.\n */\n @Prop() inline: boolean = false;\n\n /**\n * The short title of the app to be displayed at small screen sizes in place of the app title.\n */\n @Prop() shortAppTitle: string = \"\";\n\n /**\n * If `true`, the menu expand button will be removed (PLEASE NOTE: This takes effect on screen sizes 992px and above).\n */\n @Prop() static: boolean = false;\n\n /**\n * The status of the app to be displayed.\n */\n @Prop() status: string;\n\n /**\n * The version of the app to be displayed.\n */\n @Prop() version: string;\n\n /**\n * Emitted when the side navigation is collapsed and expanded.\n */\n @Event() sideNavExpanded: EventEmitter<IcExpandedDetail>;\n\n componentWillLoad(): void {\n this.setMenuExpanded(this.expanded);\n\n if (this.collapsedIconLabels) {\n this.setCollapsedIconLabels();\n }\n\n this.hasSecondaryNavigation = isSlotUsed(this.el, \"secondary-navigation\");\n }\n\n componentDidLoad(): void {\n this.emitSideNavigationExpanded({\n sideNavExpanded: this.menuExpanded,\n sideNavMobile:\n this.deviceSize === DEVICE_SIZES.S && !this.disableTopBarBehaviour,\n });\n\n checkResizeObserver(this.runResizeObserver);\n this.styleSlottedCollapsedIconLabel();\n this.arrangeSlottedNavigationItem(this.menuExpanded);\n this.displayTooltipWithExpandedLongLabel(this.menuExpanded);\n\n this.setExpandedButtonHeight();\n\n !isSlotUsed(this.el, \"app-title\") &&\n onComponentRequiredPropUndefined(\n [{ prop: this.appTitle, propName: \"app-title\" }],\n \"Side Navigation\"\n );\n }\n\n disconnectedCallback(): void {\n if (this.resizeObserver !== null) {\n this.resizeObserver.disconnect();\n }\n\n this.el?.removeEventListener(\"transitionend\", this.transitionEndHandler);\n }\n\n @Listen(\"themeChange\", { target: \"document\" })\n themeChangeHandler({ detail }: CustomEvent): void {\n this.foregroundColor = (detail as IcTheme).mode;\n }\n\n private emitSideNavigationExpanded = (objDetails: {\n sideNavExpanded: boolean;\n sideNavMobile?: boolean;\n }): void => {\n this.sideNavExpanded.emit({\n sideNavExpanded: objDetails.sideNavExpanded,\n sideNavMobile: objDetails.sideNavMobile,\n });\n };\n\n private toggleMenu = (): void => {\n this.menuOpen = !this.menuOpen;\n this.setMobileMenuAriaAttributes(this.menuOpen);\n\n this.arrangeSlottedNavigationItem(this.menuOpen);\n\n this.setToggleMenuFlyoutMenuVisibility(this.menuOpen);\n\n this.emitSideNavigationExpanded({\n sideNavExpanded: this.menuOpen,\n sideNavMobile: true,\n });\n };\n\n private setToggleMenuFlyoutMenuVisibility = (menuOpen: boolean) => {\n const sideNav = this.el.shadowRoot.querySelector(\n \"#side-navigation\"\n ) as HTMLDivElement;\n const sideNavInner = sideNav.querySelector(\n \".side-navigation-inner\"\n ) as HTMLElement;\n const bottomWrapper = sideNav.querySelector(\n \".bottom-wrapper\"\n ) as HTMLElement;\n\n const menuVisibilityVisible = \"menu-visibility-visible\";\n\n if (menuOpen) {\n bottomWrapper.classList.add(menuVisibilityVisible);\n sideNavInner.classList.add(menuVisibilityVisible);\n } else {\n setTimeout(() => {\n sideNavInner.classList.remove(menuVisibilityVisible);\n bottomWrapper.classList.remove(menuVisibilityVisible);\n }, this.ANIMATION_DURATION);\n }\n };\n\n private setMobileMenuAriaAttributes = (menuOpen: boolean) => {\n if (this.menuButton !== null) {\n this.menuButton.setAttribute(\"aria-expanded\", `${menuOpen}`);\n this.menuButton.setAttribute(\n \"aria-label\",\n `${menuOpen ? \"Close\" : \"Open\"} navigation menu`\n );\n }\n };\n\n private setAndRemoveNoWrapAfterMenuExpanded = () => {\n const appTitle =\n this.el.shadowRoot.querySelector(\".title-link ic-typography\") ||\n this.el.querySelector(\"[slot='app-title']\");\n\n appTitle.classList.add(\"ic-typography-no-wrap\");\n\n setTimeout(() => {\n appTitle.classList.remove(\"ic-typography-no-wrap\");\n }, this.ANIMATION_DURATION);\n };\n\n private toggleMenuExpanded = (): void => {\n this.menuExpanded = !this.menuExpanded;\n\n if (this.menuExpanded) {\n this.setAndRemoveNoWrapAfterMenuExpanded();\n this.el.shadowRoot\n .querySelector(\".app-title-inner-wrapper\")\n .classList.add(\"app-title-show\");\n } else {\n this.el.style.setProperty(\"--navigation-item-width\", \"320px\");\n this.el.shadowRoot\n .querySelector(\".app-title-inner-wrapper\")\n .classList.remove(\"app-title-show\");\n\n this.el.addEventListener(\"transitionend\", (e) => {\n if (e.propertyName === \"width\") {\n this.el.style.setProperty(\"--navigation-item-width\", null);\n }\n });\n }\n\n this.arrangeSlottedNavigationItem(this.menuExpanded);\n\n this.displayTooltipWithExpandedLongLabel(this.menuExpanded);\n\n if (this.collapsedIconLabels) {\n this.animateCollapsedIconLabels();\n }\n\n this.setExpandedButtonHeight();\n this.emitSideNavigationExpanded({ sideNavExpanded: this.menuExpanded });\n };\n\n /**\n * In order to style nested slotted elements (e.g. using React Router components), this method\n * rearranges the a tag and labels and adds inline styling expand/collapsed animations as external CSS classes are not\n * do not take affect.\n * @param menuExpanded boolean - true or false depending on side navigation state\n */\n private arrangeSlottedNavigationItem = (menuExpanded?: boolean) => {\n const navItems = this.el.querySelectorAll(\"ic-navigation-item\");\n navItems.forEach((navItem) => {\n const isNamedSlot = isSlotUsed(navItem, \"navigation-item\");\n const isUnnamedSlot =\n navItem.children[0] && !navItem.children[0].getAttribute(\"slot\");\n if (isNamedSlot || isUnnamedSlot) {\n let navItemSlot;\n if (isNamedSlot) {\n navItemSlot = navItem.querySelector(\"[slot='navigation-item']\");\n } else {\n navItemSlot = navItem.children[0];\n }\n const iconWrapper = document.createElement(\"div\");\n const icon = navItemSlot.querySelector(\"svg\");\n const label = navItem.textContent.trim();\n const icTypography = document.createElement(\"ic-typography\");\n icTypography.classList.add(\n \"ic-typography-label\",\n \"hydrated\",\n \"navigation-item-side-nav-slotted-text\"\n );\n\n iconWrapper.style.height = \"var(--ic-space-lg)\";\n iconWrapper.append(icon);\n\n navItemSlot.textContent = \"\";\n\n icTypography.textContent = label;\n\n navItemSlot.append(iconWrapper);\n navItemSlot.append(icTypography);\n\n if (this.collapsedIconLabels) {\n this.styleSlottedCollapsedIconLabels(menuExpanded, icTypography);\n } else {\n this.styleSlottedIconLabels(menuExpanded, icTypography);\n }\n }\n });\n };\n\n private styleSlottedCollapsedIconLabels = (\n menuExpanded: boolean,\n icTypography: HTMLIcTypographyElement\n ) => {\n if (menuExpanded) {\n icTypography.style.marginTop = \"0\";\n icTypography.style.whiteSpace = \"nowrap\";\n icTypography.style.overflow = \"hidden\";\n icTypography.style.textOverflow = \"ellipsis\";\n } else {\n icTypography.style.marginTop = \"10px\";\n icTypography.style.whiteSpace = \"nowrap\";\n icTypography.style.overflow = \"hidden\";\n icTypography.style.textOverflow = \"ellipsis\";\n }\n };\n\n private setExpandedButtonHeight = () => {\n const appStatusWrapper = this.el.shadowRoot.querySelector(\n \"#side-navigation > .bottom-wrapper > .bottom-side-nav > .app-status-wrapper\"\n ) as HTMLDivElement;\n\n if (appStatusWrapper.offsetHeight !== 0) {\n this.el.style.setProperty(\n \"--sm-side-navigation-bottom-bar-height\",\n `${appStatusWrapper.offsetHeight}px`\n );\n }\n };\n\n private styleSlottedIconLabels = (\n menuExpanded: boolean,\n icTypography: HTMLSpanElement\n ) => {\n if (menuExpanded) {\n icTypography.style.opacity = \"1\";\n icTypography.style.visibility = \"visible\";\n icTypography.style.transition =\n \"visibility 0s, opacity var(--ic-easing-transition-slow)\";\n } else {\n icTypography.style.opacity = \"0\";\n icTypography.style.visibility = \"hidden\";\n icTypography.style.transition =\n \"visibility 0s, opacity var(--ic-easing-transition-slow)\";\n }\n };\n\n private transitionHandler = (type: string) => {\n const primaryNavigationWrapper = this.el.shadowRoot.querySelector(\n \".primary-navigation\"\n );\n\n const secondaryNavigationWrapper = this.el.shadowRoot.querySelector(\n \".bottom-wrapper > .secondary-navigation\"\n );\n\n const classToRemove =\n type === \"start\"\n ? this.COLLAPSED_ICON_LABELS_END\n : this.COLLAPSED_ICON_LABELS_START;\n\n const classToAdd =\n type === \"start\"\n ? this.COLLAPSED_ICON_LABELS_START\n : this.COLLAPSED_ICON_LABELS_END;\n\n if (primaryNavigationWrapper) {\n primaryNavigationWrapper.classList.remove(classToRemove);\n primaryNavigationWrapper.classList.add(classToAdd);\n }\n\n if (secondaryNavigationWrapper) {\n secondaryNavigationWrapper.classList.remove(classToRemove);\n secondaryNavigationWrapper.classList.add(classToAdd);\n }\n };\n\n private transitionEndHandler = () => {\n this.transitionHandler(\"end\");\n };\n\n private animateCollapsedIconLabels = () => {\n this.transitionHandler(\"start\");\n this.transitionEndHandler();\n\n this.el.addEventListener(\"transitionend\", this.transitionEndHandler);\n };\n\n private paddingIconWidth = (\n navItems: HTMLIcNavigationItemElement[]\n ): number => {\n const navItemLink =\n (navItems[0].shadowRoot &&\n (navItems[0].shadowRoot.querySelector(\"ic-tooltip a\") ||\n navItems[0].shadowRoot.querySelector(\"ic-tooltip div\"))) ||\n navItems[0].querySelector(\"a\") ||\n navItems[0].querySelector(\"div\");\n const navItemSVG = navItems[0].querySelector(\"svg\");\n\n const navStyles = {\n gap: window.getComputedStyle(navItemLink).gap,\n iconWidth: window.getComputedStyle(navItemSVG).width,\n paddingLeft: window.getComputedStyle(navItemLink).paddingLeft,\n };\n\n return Object.values(navStyles).reduce((prev, curr) => {\n return (prev += parseInt(curr));\n }, 0);\n };\n\n private displayTooltipWithExpandedLongLabel = (menuExpanded: boolean) => {\n let timer;\n\n if (menuExpanded) {\n timer = setTimeout(() => {\n const sideNavWidth = this.el.clientWidth;\n\n const navigationItems: HTMLIcNavigationItemElement[] = Array.from(\n this.el.querySelectorAll(this.IC_NAVIGATION_ITEM)\n );\n\n const paddingIconDelta = navigationItems.length\n ? this.paddingIconWidth(navigationItems)\n : 0;\n\n navigationItems.forEach(\n (navigationItem: HTMLIcNavigationItemElement) => {\n const icTypographyScrollWidth =\n (\n navigationItem.shadowRoot &&\n navigationItem.shadowRoot.querySelector(\n \"ic-tooltip .link ic-typography.ic-typography-label\"\n )\n )?.scrollWidth ||\n navigationItem.querySelector(\"ic-typography.ic-typography-label\")\n ?.scrollWidth;\n\n if (icTypographyScrollWidth > sideNavWidth - paddingIconDelta) {\n navigationItem.setAttribute(\"display-navigation-tooltip\", \"true\");\n }\n }\n );\n }, this.ANIMATION_DURATION);\n } else {\n clearTimeout(timer);\n\n const navigationItems: HTMLIcNavigationItemElement[] = Array.from(\n this.el.querySelectorAll(this.IC_NAVIGATION_ITEM)\n );\n navigationItems.forEach((navigationItem: HTMLIcNavigationItemElement) => {\n navigationItem.setAttribute(\"display-navigation-tooltip\", \"false\");\n });\n }\n };\n\n private setMenuExpanded = (expanded: boolean): void => {\n this.menuExpanded = expanded;\n };\n\n /**\n * As the mobile top bar is fixed, a padding top is required\n * to push main content down the height of the mobile top bar\n * @param value - padding-top css value\n */\n private setParentPaddingTop = (value: string) => {\n this.el.parentElement.style.setProperty(\"padding-top\", value);\n };\n\n private setParentPaddingLeft = (value: string) => {\n this.el.parentElement.style.setProperty(\"padding-left\", value);\n };\n\n private renderAppTitle = (isAppNameSubtitleVariant: boolean) => {\n const displayShortAppTitle =\n this.deviceSize <= DEVICE_SIZES.S && !isEmptyString(this.shortAppTitle);\n return (\n <ic-typography\n variant={\n displayShortAppTitle || isAppNameSubtitleVariant\n ? \"subtitle-small\"\n : \"h3\"\n }\n aria-label={\n displayShortAppTitle\n ? `${this.appTitle} (${this.shortAppTitle})`\n : undefined\n }\n >\n <h1>{displayShortAppTitle ? this.shortAppTitle : this.appTitle}</h1>\n </ic-typography>\n );\n };\n\n private resizeObserverCallback = (currSize: number) => {\n this.deviceSize = currSize;\n\n const isSmallAndDisableTopBar =\n currSize === DEVICE_SIZES.S && !this.disableTopBarBehaviour;\n\n if (!this.disableAutoParentStyling) {\n const topBarHeight =\n this.el.shadowRoot.querySelector(\".top-bar\")?.scrollHeight;\n this.setParentPaddingTop(\n isSmallAndDisableTopBar ? `${topBarHeight}px` : \"0\"\n );\n if (isSmallAndDisableTopBar) this.setParentPaddingLeft(\"0\");\n if (isSmallAndDisableTopBar && this.inline) {\n this.el.parentElement.style.setProperty(\n \"height\",\n `calc(100% - ${topBarHeight}px)`\n );\n } else if (!isSmallAndDisableTopBar) {\n this.el.parentElement.style.setProperty(\"height\", \"100%\");\n }\n }\n\n if (!this.disableAutoParentStyling) {\n const paddingLeft = `calc(var(--ic-space-xxl) ${\n this.collapsedIconLabels ? \"* 2\" : \"+ var(--ic-space-xs)\"\n })`;\n\n if (currSize > DEVICE_SIZES.L) {\n this.setParentPaddingTop(\"0\");\n this.setParentPaddingLeft(\"0\");\n } else if (\n (currSize > DEVICE_SIZES.S || this.disableTopBarBehaviour) &&\n currSize <= DEVICE_SIZES.M &&\n this.static\n ) {\n this.setParentPaddingLeft(paddingLeft);\n } else if (\n (currSize > DEVICE_SIZES.S || this.disableTopBarBehaviour) &&\n currSize <= DEVICE_SIZES.L\n ) {\n this.setParentPaddingLeft(\n this.static && this.menuExpanded\n ? \"calc(var(--ic-space-xl) * 10)\"\n : paddingLeft\n );\n }\n }\n };\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n const currSize = getCurrentDeviceSize();\n this.deviceSizeAppTitle = currSize;\n this.resizeObserverCallback(currSize);\n });\n\n this.resizeObserver.observe(document.body, { box: \"content-box\" });\n };\n\n private setCollapsedIconLabels = () => {\n const navigationItems: HTMLIcNavigationItemElement[] = Array.from(\n this.el.querySelectorAll(this.IC_NAVIGATION_ITEM)\n );\n navigationItems.forEach((navigationItem: HTMLIcNavigationItemElement) => {\n navigationItem.setAttribute(\"collapsed-icon-label\", \"true\");\n });\n };\n\n private styleSlottedCollapsedIconLabel = () => {\n const dynamicSlottedIcTypographyComps: HTMLIcTypographyElement[] =\n Array.from(\n this.el.querySelectorAll(\".navigation-item-side-nav-slotted-text\")\n );\n\n dynamicSlottedIcTypographyComps.forEach((icTypography) => {\n if (\n icTypography?.parentElement?.parentElement?.classList.contains(\n \"navigation-item-side-nav-collapsed-with-label\"\n )\n ) {\n icTypography.style.whiteSpace = \"nowrap\";\n icTypography.style.overflow = \"hidden\";\n icTypography.style.textOverflow = \"ellipsis\";\n icTypography.style.marginTop = \"10px\";\n }\n });\n };\n\n private renderTopBar = ({\n isSDevice,\n foregroundColor,\n menuOpen,\n href,\n isAppNameSubtitleVariant,\n }: IcTopBar) => {\n const hasTitle = this.appTitle !== \"\" && isPropDefined(this.appTitle);\n\n const Component = isSlotUsed(this.el, \"app-title\") ? \"div\" : \"a\";\n\n const attrs = Component == \"a\" && {\n href: href,\n };\n\n return (\n <div\n class={{\n \"top-bar\": true,\n [this.foregroundColor]: true,\n }}\n >\n {isSDevice && (\n <nav\n aria-labelledby=\"menu-navigation-toggle-button-landmark\"\n aria-hidden=\"false\"\n >\n <ic-button\n aria-label=\"Open navigation menu\"\n class=\"menu-button\"\n id=\"menu-button\"\n variant=\"secondary\"\n size=\"small\"\n full-width=\"true\"\n appearance={foregroundColor}\n onClick={this.toggleMenu}\n ariaOwnsId=\"side-navigation\"\n aria-haspopup=\"true\"\n aria-expanded=\"false\"\n ref={(el) => (this.menuButton = el)}\n >\n <span\n class=\"mobile-top-bar-menu-icon\"\n slot=\"icon\"\n innerHTML={menuOpen ? closeIcon : menuIcon}\n ></span>\n {menuOpen ? \"Close\" : \"Menu\"}\n </ic-button>\n <span\n id=\"menu-navigation-toggle-button-landmark\"\n class=\"navigation-landmark-title\"\n aria-hidden=\"true\"\n >\n Navigation menu toggle button\n </span>\n </nav>\n )}\n <div class=\"app-title-wrapper\">\n {(hasTitle || isSlotUsed(this.el, \"app-title\")) && (\n <Component {...attrs} class=\"title-link\">\n <div class=\"app-icon-container\" aria-hidden=\"true\">\n <slot name=\"app-icon\"></slot>\n </div>\n <div class=\"app-title-inner-wrapper\">\n {isSlotUsed(this.el, \"app-title\") ? (\n <slot name=\"app-title\"></slot>\n ) : (\n this.renderAppTitle(isAppNameSubtitleVariant)\n )}\n </div>\n </Component>\n )}\n </div>\n </div>\n );\n };\n\n render() {\n const {\n appTitle,\n menuOpen,\n foregroundColor,\n menuExpanded,\n href,\n status,\n version,\n collapsedIconLabels,\n inline,\n } = this;\n\n const isSDevice =\n !this.disableTopBarBehaviour && this.deviceSize === DEVICE_SIZES.S;\n const isMdDevice = this.deviceSize === DEVICE_SIZES.M;\n const isLgDevice = this.deviceSize >= DEVICE_SIZES.L;\n const isAppNameSubtitleVariant = this.deviceSizeAppTitle === DEVICE_SIZES.S;\n const displayExpandBtn =\n isMdDevice || this.disableTopBarBehaviour || (isLgDevice && !this.static);\n\n const topBarProps: IcTopBar = {\n isSDevice,\n foregroundColor,\n menuOpen,\n href,\n isAppNameSubtitleVariant,\n appTitle,\n };\n\n return (\n <Host\n class={{\n \"xs-menu-open\": menuOpen && isSDevice,\n \"xs-menu-close\": !menuOpen && isSDevice,\n \"sm-collapsed\": !isSDevice && !menuExpanded,\n \"sm-expanded\": !isSDevice && menuExpanded,\n \"side-display\":\n this.deviceSize > DEVICE_SIZES.S || this.disableTopBarBehaviour,\n [IcThemeForegroundEnum.Dark]:\n foregroundColor === IcThemeForegroundEnum.Dark,\n [\"collapsed-labels\"]:\n !isSDevice && !menuExpanded && collapsedIconLabels,\n [\"inline\"]: inline,\n }}\n >\n {isSDevice && this.renderTopBar({ ...topBarProps })}\n <div class=\"side-navigation\" id=\"side-navigation\">\n {!isSDevice && this.renderTopBar({ ...topBarProps })}\n <div class=\"side-navigation-inner\">\n {isSlotUsed(this.el, \"primary-navigation\") && (\n <nav\n class=\"primary-navigation\"\n aria-labelledby=\"primary-navigation-landmark\"\n >\n <span\n aria-hidden=\"true\"\n class=\"navigation-landmark-title\"\n id=\"primary-navigation-landmark\"\n >\n Primary\n </span>\n <ul class=\"navigation-list\">\n <slot name=\"primary-navigation\"></slot>\n </ul>\n </nav>\n )}\n </div>\n <div\n class={{\n [\"bottom-wrapper\"]: true,\n [\"classification-spacing\"]: hasClassificationBanner(),\n }}\n >\n {isSlotUsed(this.el, \"secondary-navigation\") && (\n <nav\n class=\"secondary-navigation\"\n aria-labelledby=\"secondary-navigation-landmark\"\n >\n <span\n aria-hidden=\"true\"\n class=\"navigation-landmark-title\"\n id=\"secondary-navigation-landmark\"\n >\n Secondary\n </span>\n <ul class=\"navigation-list\">\n <slot name=\"secondary-navigation\"></slot>\n </ul>\n </nav>\n )}\n <div class=\"bottom-side-nav\">\n {this.hasSecondaryNavigation && <ic-divider></ic-divider>}\n {displayExpandBtn && (\n <button\n class=\"menu-expand-button\"\n innerHTML={chevronIcon}\n onClick={this.toggleMenuExpanded}\n aria-label={`${\n menuExpanded ? \"Collapse\" : \"Expand\"\n } side navigation`}\n ></button>\n )}\n <div class=\"app-status-wrapper\">\n {status !== \"\" && (\n <div\n class={{\n [\"app-status\"]: true,\n }}\n >\n <ic-typography\n aria-label=\"app tag\"\n variant=\"label-uppercase\"\n class=\"app-status-text\"\n >\n {status}\n </ic-typography>\n </div>\n )}\n {version !== \"\" && (\n <ic-typography\n variant=\"label\"\n class=\"app-version\"\n aria-label=\"app version\"\n >\n {version}\n </ic-typography>\n )}\n </div>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"0fAAA,MAAMA,EAAsB,kpa,MC+CfC,EAAc,M,0EACjBC,KAA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C,MAAO,CACL,CAAC,cAAe,OAGlBjC,EAAA,8BACa,UACXC,QAAQ,kBACRgC,MAAM,mBAEL6B,IAINC,IAAY,IACX/D,EAAA,iBACEC,QAAQ,QACRgC,MAAM,cAAa,aACR,eAEV8B,O"}
@@ -1,2 +0,0 @@
1
- import{r as t,c as e,f as i,h as s,H as a,g as n}from"./p-6b5e91e2.js";import{a as o}from"./p-26b7b18f.js";import{j as r,O as l,n as h,x as c,m as d,k as u,a as p,s as m,p as b,i as f,G as x,y as v}from"./p-fef9e8c9.js";const g='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block;--ic-input-label-helpertext-padding:var(--ic-space-xxs)}:host(.fullwidth){width:100%}::-moz-placeholder{color:var(--ic-color-tertiary-text);opacity:1}::placeholder{color:var(--ic-color-tertiary-text);opacity:1}input,textarea{border:0;border-radius:var(--ic-border-radius);background-color:var(--ic-architectural-white);line-height:1.5rem;letter-spacing:0.005rem;width:100%;padding-right:var(--ic-space-xs);padding-left:var(--ic-space-xs)}textarea{min-height:var(--ic-space-lg);resize:vertical;padding-top:0.375rem}input:focus,textarea:focus{border:0;outline:0}input:disabled,textarea:disabled{color:var(--ic-architectural-200)}input.readonly,textarea.readonly{color:var(--ic-color-primary-text)}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type="number"]{-moz-appearance:textfield}textarea.no-resize{resize:none}.maxlengthtext{color:var(--ic-color-secondary-text);padding-right:var(--ic-space-xxxs)}.no-left-pad{padding-left:0}::slotted([slot="icon"]){fill:var(--ic-color-tertiary-text)}.has-value ::slotted([slot="icon"]){fill:var(--ic-color-primary-text)}.charcount{margin-right:calc(-1 * var(--ic-space-xxxs))}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-results-button,input[type="search"]::-webkit-search-results-decoration{display:none}input[type="search"].truncate-value{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}@media (forced-colors: active){input.readonly,textarea.readonly{color:canvastext}.has-value ::slotted([slot="icon"]){fill:currentcolor}}';let y=0;const w=[...v,"title"];const k=class{constructor(s){t(this,s);this.getValidationText=e(this,"getValidationText",7);this.icBlur=e(this,"icBlur",7);this.icChange=e(this,"icChange",7);this.icFocus=e(this,"icFocus",7);this.icInput=e(this,"icInput",7);this.icKeydown=e(this,"icKeydown",7);this.inheritedAttributes={};this.hostMutationObserver=null;this.getMaxLengthExceeded=t=>{this.numChars=t.length;if(this.type==="number"){this.minValueUnattained=t&&Number(t)<Number(this.min);this.maxValueExceeded=Number(t)>Number(this.max)}if(this.maxLength>0){this.maxLengthExceeded=this.numChars>this.maxLength}};this.getMaxCharactersReached=t=>{this.numChars=t.length;this.maxCharactersReached=this.maxCharacters>0?this.numChars>=this.maxCharacters:false;if(this.maxCharactersError&&!this.maxCharactersReached){this.maxCharactersError=false}};this.onInput=t=>{this.value=t.target.value;this.icInput.emit({value:this.value})};this.onBlur=t=>{const e=t.target.value;this.numChars=e.length;this.minCharactersUnattained=this.minCharacters>0?this.numChars<this.minCharacters:false;this.icBlur.emit({value:e})};this.onFocus=t=>{this.icFocus.emit({value:t.target.value})};this.hasStatus=t=>t!==""&&!this.disabled;this.handleFormReset=()=>{this.value=this.initialValue};this.hostMutationCallback=t=>{let e=false;t.forEach((({attributeName:t,type:i,addedNodes:s,removedNodes:a})=>{if(w.includes(t)){this.inheritedAttributes[t]=this.el.getAttribute(t);e=true}else if(i==="childList"){e=r(s,a,"icon")}}));if(e){i(this)}};this.numChars=0;this.maxCharactersReached=false;this.maxCharactersError=false;this.minCharactersUnattained=false;this.maxLengthExceeded=false;this.maxValueExceeded=false;this.minValueUnattained=false;this.ariaActiveDescendant=undefined;this.ariaAutocomplete=undefined;this.ariaExpanded=undefined;this.ariaOwns=undefined;this.autocapitalize="off";this.autocomplete="off";this.autocorrect="off";this.autoFocus=false;this.disabled=false;this.fullWidth=false;this.helperText="";this.hideLabel=false;this.hiddenInput=true;this.inputId=`ic-text-field-input-${y++}`;this.inputmode="text";this.label=undefined;this.max=undefined;this.maxCharacters=0;this.maxLength=0;this.maxLengthMessage="Maximum length exceeded";this.min=undefined;this.minCharacters=0;this.name=this.inputId;this.placeholder="";this.readonly=false;this.required=false;this.resize=false;this.role=undefined;this.rows=1;this.size="default";this.small=false;this.spellcheck=false;this.truncateValue=undefined;this.type="text";this.validationInline=false;this.validationInlineInternal=false;this.validationStatus="";this.validationText="";this.debounce=0;this.value="";this.initialValue=this.value}debounceChanged(){this.icChange=l(this.icChange,this.debounce)}watchValueHandler(t){if(this.inputEl&&this.inputEl.value!==t){this.inputEl.value=t}this.getMaxLengthExceeded(t);this.getMaxCharactersReached(t);this.icChange.emit({value:t})}connectedCallback(){this.debounceChanged()}disconnectedCallback(){var t;h(this.el,this.handleFormReset);(t=this.hostMutationObserver)===null||t===void 0?void 0:t.disconnect()}componentWillLoad(){if(this.value!==this.initialValue){this.watchValueHandler(this.value)}this.getMaxLengthExceeded(this.value);this.getMaxCharactersReached(this.value);this.inheritedAttributes=c(this.el,w);if(this.readonly){this.maxLengthExceeded=false;this.maxValueExceeded=false;this.minValueUnattained=false}d(this.el,this.handleFormReset);u(this.disabled,this.el)}componentDidLoad(){p([{prop:this.label,propName:"label"}],"Text Field");if(this.validationInlineInternal){this.getValidationText.emit({value:this.validationText})}this.hostMutationObserver=new MutationObserver(this.hostMutationCallback);this.hostMutationObserver.observe(this.el,{attributes:true,childList:true})}handleKeyDown(t){this.icKeydown.emit({event:t});this.maxCharactersError=this.maxCharactersReached}async setFocus(){var t;(t=this.inputEl)===null||t===void 0?void 0:t.focus()}render(){const{inputId:t,name:e,label:i,required:n,size:r,small:l,placeholder:h,helperText:c,rows:d,resize:u,disabled:p,value:v,min:g,max:y,maxLength:w,numChars:k,readonly:z,maxLengthExceeded:C,maxCharacters:I,maxCharactersError:$,maxCharactersReached:L,minCharacters:j,minCharactersUnattained:F,minValueUnattained:M,maxValueExceeded:N,validationStatus:T,validationText:q,validationInline:V,validationInlineInternal:B,spellcheck:O,inputmode:W,fullWidth:E,truncateValue:H,hiddenInput:D}=this;const K=z||p;const S=C||N||M||F||$?$?o.Warning:o.Error:T;const U=C?this.maxLengthMessage:$?`Maximum input is ${I} characters`:N?`Maximum value of ${y} exceeded`:M?`Minimum value of ${g} not met`:F?`Minimum input is ${j} characters`:q;const _=z?0:w;const G=C||$||N||M||w===0&&S===o.Error?"assertive":"polite";const R=this.hasStatus(S)&&!(S==o.Success&&V)&&!B;const A=d>1;const J=w>0?`${t}-charcount-desc`:"";const P=`${J} ${m(t,c!=="",R)}`.trim();const Q=K&&!z;const X=!!this.el.querySelector(`[slot="icon"]`)&&!Q;const Y=`${S===o.Error}`;if(D){b(true,this.el,e,v,K)}return s(a,{class:{["fullwidth"]:E}},s("ic-input-container",{readonly:z,disabled:K},!this.hideLabel&&s("ic-input-label",{for:t,label:i,helperText:c,required:n,disabled:Q,readonly:z}),s("ic-input-component-container",{size:l?"small":r,validationStatus:S,multiLine:A,disabled:K,readonly:z,validationInline:V,fullWidth:E},X&&s("span",{class:{["readonly"]:z,["has-value"]:v.length>0},slot:"left-icon"},s("slot",{name:"icon"})),!A?s("input",Object.assign({id:t,name:e,ref:t=>this.inputEl=t,type:this.type,min:g,max:y,value:v,class:{["no-left-pad"]:!X&&z,["readonly"]:z,["truncate-value"]:H},placeholder:h?h:"",required:n,disabled:K,readonly:z,onInput:this.onInput,onBlur:this.onBlur,onFocus:this.onFocus,"aria-label":i,"aria-describedby":P,"aria-invalid":Y,"aria-activedescendant":this.ariaActiveDescendant,"aria-expanded":this.ariaExpanded,"aria-owns":this.ariaOwns,autocomplete:this.autocomplete,autocapitalize:this.autocapitalize,autoFocus:this.autoFocus,spellcheck:O,inputmode:W,role:this.role,maxlength:L?I:null,minlength:F?j:null},this.inheritedAttributes)):s("textarea",Object.assign({id:t,class:{["no-resize"]:u===false||z,["no-left-pad"]:!X&&z,["readonly"]:z},name:e,ref:t=>this.inputEl=t,value:v,rows:d,required:n,disabled:K,placeholder:h?h:"",readonly:z,onInput:this.onInput,onBlur:this.onBlur,onFocus:this.onFocus,"aria-label":i,"aria-describedby":P,"aria-invalid":Y,autocapitalize:this.autocapitalize,autoFocus:this.autoFocus,spellcheck:O,inputmode:W,maxlength:L?I:null,minlength:F?j:null},this.inheritedAttributes)),f(this.el,"clear-button")&&s("slot",{name:"clear-button"}),f(this.el,"search-submit-button")&&s("slot",{name:"search-submit-button"})),f(this.el,"menu")&&s("slot",{name:"menu"}),(!x(T)||!x(q)||_>0||N||$||F||M)&&!B&&s("ic-input-validation",{status:this.hasStatus(S)===false||S===o.Success&&V||B?"":S,message:R?U:"",ariaLiveMode:G,for:t,fullWidth:E},!z&&_>0&&s("div",{slot:"validation-message-adornment"},s("ic-typography",{variant:"caption",class:{["maxlengthtext"]:true,["error"]:C,["disabled"]:Q}},s("span",{"aria-live":"polite",id:`${t}-charcount`,class:"charcount"},k,"/",_),s("span",{hidden:true,id:J},"Field can contain a maximum of ",_," characters."))))))}get el(){return n(this)}static get watchers(){return{debounce:["debounceChanged"],value:["watchValueHandler"]}}};k.style=g;export{k as ic_text_field};
2
- //# sourceMappingURL=p-94d5aa77.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["icTextFieldCss","inputIds","MUTABLE_ATTRIBUTES","IC_INHERITED_ARIA","TextField","this","inheritedAttributes","hostMutationObserver","getMaxLengthExceeded","value","numChars","length","type","minValueUnattained","Number","min","maxValueExceeded","max","maxLength","maxLengthExceeded","getMaxCharactersReached","maxCharactersReached","maxCharacters","maxCharactersError","onInput","ev","target","icInput","emit","onBlur","minCharactersUnattained","minCharacters","icBlur","onFocus","icFocus","hasStatus","status","disabled","handleFormReset","initialValue","hostMutationCallback","mutationList","forceComponentUpdate","forEach","attributeName","addedNodes","removedNodes","includes","el","getAttribute","checkSlotInChildMutations","forceUpdate","undefined","inputId","debounceChanged","icChange","debounceEvent","debounce","watchValueHandler","newValue","inputEl","connectedCallback","disconnectedCallback","removeFormResetListener","_a","disconnect","componentWillLoad","inheritAttributes","readonly","addFormResetListener","removeDisabledFalse","componentDidLoad","onComponentRequiredPropUndefined","prop","label","propName","validationInlineInternal","getValidationText","validationText","MutationObserver","observe","attributes","childList","handleKeyDown","icKeydown","event","setFocus","focus","render","name","required","size","small","placeholder","helperText","rows","resize","validationStatus","validationInline","spellcheck","inputmode","fullWidth","truncateValue","hiddenInput","disabledMode","currentStatus","IcInformationStatus","Warning","Error","currentValidationText","maxLengthMessage","maxNumChars","messageAriaLive","showStatusText","Success","multiline","hiddenCharCountDescId","describedBy","getInputDescribedByText","trim","disabledText","showLeftIcon","querySelector","invalid","renderHiddenInput","h","Host","class","hideLabel","for","multiLine","slot","Object","assign","id","ref","ariaActiveDescendant","ariaExpanded","ariaOwns","autocomplete","autocapitalize","autoFocus","role","maxlength","minlength","isSlotUsed","isEmptyString","message","ariaLiveMode","variant","hidden"],"sources":["src/components/ic-text-field/ic-text-field.css?tag=ic-text-field&encapsulation=shadow","src/components/ic-text-field/ic-text-field.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n /**\n * @prop --input-width: Width of the input field\n */\n display: block;\n\n --ic-input-label-helpertext-padding: var(--ic-space-xxs);\n}\n\n:host(.fullwidth) {\n width: 100%;\n}\n\n::placeholder {\n color: var(--ic-color-tertiary-text);\n opacity: 1;\n}\n\ninput,\ntextarea {\n border: 0;\n border-radius: var(--ic-border-radius);\n background-color: var(--ic-architectural-white);\n line-height: 1.5rem;\n letter-spacing: 0.005rem;\n width: 100%;\n padding-right: var(--ic-space-xs);\n padding-left: var(--ic-space-xs);\n}\n\ntextarea {\n min-height: var(--ic-space-lg);\n resize: vertical;\n padding-top: 0.375rem;\n}\n\ninput:focus,\ntextarea:focus {\n border: 0;\n outline: 0;\n}\n\ninput:disabled,\ntextarea:disabled {\n color: var(--ic-architectural-200);\n}\n\ninput.readonly,\ntextarea.readonly {\n color: var(--ic-color-primary-text);\n}\n\n/* Chrome, Safari, Edge */\ninput::-webkit-outer-spin-button,\ninput::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n/* Firefox */\ninput[type=\"number\"] {\n -moz-appearance: textfield;\n}\n\ntextarea.no-resize {\n resize: none;\n}\n\n.maxlengthtext {\n color: var(--ic-color-secondary-text);\n padding-right: var(--ic-space-xxxs);\n}\n\n.no-left-pad {\n padding-left: 0;\n}\n\n::slotted([slot=\"icon\"]) {\n fill: var(--ic-color-tertiary-text);\n}\n\n.has-value ::slotted([slot=\"icon\"]) {\n fill: var(--ic-color-primary-text);\n}\n\n.charcount {\n margin-right: calc(-1 * var(--ic-space-xxxs));\n}\n\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration,\ninput[type=\"search\"]::-webkit-search-results-button,\ninput[type=\"search\"]::-webkit-search-results-decoration {\n display: none;\n}\n\ninput[type=\"search\"].truncate-value {\n width: 100%;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n@media (forced-colors: active) {\n input.readonly,\n textarea.readonly {\n color: canvastext;\n }\n\n .has-value ::slotted([slot=\"icon\"]) {\n fill: currentcolor;\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Listen,\n Prop,\n State,\n Watch,\n Method,\n h,\n forceUpdate,\n} from \"@stencil/core\";\nimport {\n IcInformationStatus,\n IcAutocompleteTypes,\n IcAutocorrectStates,\n IcInformationStatusOrEmpty,\n IcValueEventDetail,\n IcSizesNoLarge,\n} from \"../../utils/types\";\nimport {\n inheritAttributes,\n debounceEvent,\n getInputDescribedByText,\n renderHiddenInput,\n isEmptyString,\n onComponentRequiredPropUndefined,\n addFormResetListener,\n removeFormResetListener,\n isSlotUsed,\n removeDisabledFalse,\n checkSlotInChildMutations,\n} from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport {\n IcAriaAutocompleteTypes,\n IcTextFieldInputModes,\n IcTextFieldTypes,\n} from \"./ic-text-field.types\";\n\nlet inputIds = 0;\nconst MUTABLE_ATTRIBUTES = [...IC_INHERITED_ARIA, \"title\"];\n\n/**\n * @slot icon - Content will be placed to the left of the text input.\n */\n@Component({\n tag: \"ic-text-field\",\n styleUrl: \"ic-text-field.css\",\n shadow: true,\n})\nexport class TextField {\n private inheritedAttributes: { [k: string]: string } = {};\n private inputEl: HTMLInputElement | HTMLTextAreaElement;\n private hostMutationObserver: MutationObserver = null;\n\n @Element() el: HTMLIcTextFieldElement;\n\n @State() numChars: number = 0;\n @State() maxCharactersReached: boolean = false;\n @State() maxCharactersError: boolean = false;\n @State() minCharactersUnattained: boolean = false;\n @State() maxLengthExceeded: boolean = false;\n @State() maxValueExceeded: boolean = false;\n @State() minValueUnattained: boolean = false;\n\n /**\n * @slot clear-button - an ic-button clear component will render as an end adornment to the input.\n * @slot search-submit-button - an ic-button search submit component will render as an end adornment to the input.\n * @slot menu - an ic-menu component will appear below the input.\n */\n\n /**\n * @internal The active element when focus is on the ic-menu items.\n */\n @Prop() ariaActiveDescendant?: string;\n\n /**\n * @internal Used to identify whether inputting any text triggers more predictions\n */\n @Prop() ariaAutocomplete: IcAriaAutocompleteTypes = undefined;\n\n /**\n * @internal Used to identify if the slotted menu is rendered\n */\n @Prop() ariaExpanded: string;\n\n /**\n * @internal Used to identify any related child component\n */\n @Prop() ariaOwns: string;\n\n /**\n * The automatic capitalisation of the text value as it is entered/edited by the user.\n * Available options: \"off\", \"none\", \"on\", \"sentences\", \"words\", \"characters\".\n */\n @Prop() autocapitalize = \"off\";\n\n /**\n * The state of autocompletion the browser can apply on the text value.\n */\n @Prop() autocomplete: IcAutocompleteTypes = \"off\";\n\n /**\n * The state of autocorrection the browser can apply when the user is entering/editing the text value.\n */\n @Prop() autocorrect: IcAutocorrectStates = \"off\";\n\n /**\n * If `true`, the form control will have input focus when the page loads.\n */\n @Prop() autoFocus = false;\n\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop() disabled: boolean = false;\n\n /**\n * Specify whether the text field fills the full width of the container.\n * If `true`, this overrides the --input-width CSS variable.\n */\n @Prop() fullWidth: boolean = false;\n\n /**\n * The helper text that will be displayed for additional field guidance.\n */\n @Prop() helperText: string = \"\";\n\n /**\n * If `true`, the label will be hidden and the required label value will be applied as an aria-label.\n */\n @Prop() hideLabel: boolean = false;\n\n /**\n * @internal If `true`, the hidden form input will stop rendering for form submission.\n */\n @Prop() hiddenInput: boolean = true;\n\n /**\n * The ID for the input.\n */\n @Prop() inputId?: string = `ic-text-field-input-${inputIds++}`;\n\n /**\n * A hint to the browser for which keyboard to display.\n * Possible values: `\"none\"`, `\"text\"`, `\"tel\"`, `\"url\"`,\n * `\"email\"`, `\"numeric\"`, `\"decimal\"`, and `\"search\"`.\n */\n @Prop() inputmode: IcTextFieldInputModes = \"text\";\n\n /**\n * The label for the input.\n */\n @Prop() label!: string;\n\n /**\n * The maximum number that can be accepted as a value, when `type` is `number` and `rows` is `1`. (NOTE: Ensure to include visual indication of max value in `helperText` or `label`)\n */\n @Prop() max: string | number = undefined;\n\n /**\n * The maximum number of characters that can be entered in the field. Will display an error if too many characters are entered.\n */\n @Prop() maxCharacters: number = 0;\n\n /**\n * The count of characters in the field. Will display a warning if the bound is reached.\n */\n @Prop() maxLength: number = 0;\n\n /**\n * The text to display as the validation message when the maximum length is exceeded.\n */\n @Prop() maxLengthMessage: string = \"Maximum length exceeded\";\n\n /**\n * The minimum number that can be accepted as a value, when `type` is `number` and `rows` is `1`. (NOTE: Ensure to include visual indication of min value in `helperText` or `label`)\n */\n @Prop() min: string | number = undefined;\n\n /**\n * The minimum number of characters that can be entered in the field.\n */\n @Prop() minCharacters: number = 0;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name: string = this.inputId;\n\n /**\n * The placeholder value to be displayed.\n */\n @Prop() placeholder: string = \"\";\n\n /**\n * If `true`, the read only state will be set.\n */\n @Prop({ reflect: true }) readonly: boolean = false;\n\n /**\n * If `true`, the input will require a value.\n */\n @Prop() required: boolean = false;\n\n /**\n * If `true`, the multiline text area will be resizeable.\n */\n @Prop() resize: boolean = false;\n\n /**\n * @internal Used to set the role if not default textbox;\n */\n @Prop() role: string;\n\n /**\n * The number of rows to transform the text field into a text area with a specific height.\n */\n @Prop() rows: number = 1;\n\n /**\n * The size of the text field component.\n */\n @Prop() size?: IcSizesNoLarge = \"default\";\n\n /**\n * @deprecated This prop should not be used anymore. Set prop `size` to \"small\" instead.\n */\n @Prop() small?: boolean = false;\n\n /**\n * If `true`, the value of the text field will have its spelling and grammar checked.\n */\n @Prop() spellcheck: boolean = false;\n /**\n * @internal If `true`, an ellipsis will be displayed at the end of the value if the value is longer than the container.\n */\n @Prop() truncateValue?: boolean;\n\n /**\n * The type of control to display. The default type is text.\n */\n @Prop() type: IcTextFieldTypes = \"text\";\n\n /**\n * If `true`, the icon in input control will be displayed - only applies when validationStatus ='success'.\n */\n @Prop() validationInline: boolean = false;\n\n /**\n * @internal If `true`, the validation will display inline.\n */\n @Prop() validationInlineInternal: boolean = false;\n\n /**\n * The validation state - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationStatus: IcInformationStatusOrEmpty = \"\";\n\n /**\n * The validation state - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationText: string = \"\";\n\n /**\n * The amount of time, in milliseconds, to wait to trigger the `icChange` event after each keystroke.\n */\n @Prop() debounce: number = 0;\n\n @Watch(\"debounce\")\n private debounceChanged() {\n this.icChange = debounceEvent(this.icChange, this.debounce);\n }\n\n /**\n * The value of the text field.\n */\n @Prop({ reflect: true, mutable: true }) value: string = \"\";\n @State() initialValue = this.value;\n\n @Watch(\"value\")\n private watchValueHandler(newValue: string): void {\n if (this.inputEl && this.inputEl.value !== newValue) {\n this.inputEl.value = newValue;\n }\n\n this.getMaxLengthExceeded(newValue);\n\n this.getMaxCharactersReached(newValue);\n\n this.icChange.emit({ value: newValue });\n }\n\n /**\n * @internal Emitted when the validationInlineInternal is `true`\n */\n @Event() getValidationText: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when input loses focus.\n */\n @Event() icBlur: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when the value has changed.\n */\n @Event() icChange: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when input gains focus.\n */\n @Event() icFocus: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when a keyboard input occurred.\n */\n @Event() icInput: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when a keydown event occurred.\n */\n @Event() icKeydown: EventEmitter<{ event: KeyboardEvent }>;\n\n connectedCallback(): void {\n this.debounceChanged();\n }\n\n disconnectedCallback(): void {\n removeFormResetListener(this.el, this.handleFormReset);\n this.hostMutationObserver?.disconnect();\n }\n\n componentWillLoad(): void {\n if (this.value !== this.initialValue) {\n this.watchValueHandler(this.value);\n }\n\n this.getMaxLengthExceeded(this.value);\n\n this.getMaxCharactersReached(this.value);\n\n this.inheritedAttributes = inheritAttributes(this.el, MUTABLE_ATTRIBUTES);\n\n if (this.readonly) {\n this.maxLengthExceeded = false;\n this.maxValueExceeded = false;\n this.minValueUnattained = false;\n }\n\n addFormResetListener(this.el, this.handleFormReset);\n\n removeDisabledFalse(this.disabled, this.el);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Text Field\"\n );\n if (this.validationInlineInternal) {\n this.getValidationText.emit({ value: this.validationText });\n }\n\n this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);\n this.hostMutationObserver.observe(this.el, {\n attributes: true,\n childList: true,\n });\n }\n\n @Listen(\"keydown\", {})\n handleKeyDown(ev: KeyboardEvent): void {\n this.icKeydown.emit({ event: ev });\n this.maxCharactersError = this.maxCharactersReached;\n }\n\n /**\n * Sets focus on the native `input`.\n */\n\n @Method()\n async setFocus(): Promise<void> {\n this.inputEl?.focus();\n }\n\n private getMaxLengthExceeded = (value: string) => {\n this.numChars = value.length;\n\n if (this.type === \"number\") {\n this.minValueUnattained = value && Number(value) < Number(this.min);\n this.maxValueExceeded = Number(value) > Number(this.max);\n }\n\n if (this.maxLength > 0) {\n this.maxLengthExceeded = this.numChars > this.maxLength;\n }\n };\n\n private getMaxCharactersReached = (value: string) => {\n this.numChars = value.length;\n this.maxCharactersReached =\n this.maxCharacters > 0 ? this.numChars >= this.maxCharacters : false;\n\n if (this.maxCharactersError && !this.maxCharactersReached) {\n this.maxCharactersError = false;\n }\n };\n\n private onInput = (ev: Event) => {\n this.value = (ev.target as HTMLInputElement).value;\n this.icInput.emit({ value: this.value });\n };\n\n private onBlur = (ev: Event) => {\n const value = (ev.target as HTMLInputElement).value;\n this.numChars = value.length;\n this.minCharactersUnattained =\n this.minCharacters > 0 ? this.numChars < this.minCharacters : false;\n this.icBlur.emit({ value: value });\n };\n\n private onFocus = (ev: Event) => {\n this.icFocus.emit({ value: (ev.target as HTMLInputElement).value });\n };\n\n private hasStatus = (status: IcInformationStatusOrEmpty) =>\n status !== \"\" && !this.disabled;\n\n private handleFormReset = (): void => {\n this.value = this.initialValue;\n };\n\n // triggered when attributes of host element change\n private hostMutationCallback = (mutationList: MutationRecord[]): void => {\n let forceComponentUpdate = false;\n mutationList.forEach(\n ({ attributeName, type, addedNodes, removedNodes }) => {\n if (MUTABLE_ATTRIBUTES.includes(attributeName)) {\n this.inheritedAttributes[attributeName] =\n this.el.getAttribute(attributeName);\n forceComponentUpdate = true;\n } else if (type === \"childList\") {\n forceComponentUpdate = checkSlotInChildMutations(\n addedNodes,\n removedNodes,\n \"icon\"\n );\n }\n }\n );\n if (forceComponentUpdate) {\n forceUpdate(this);\n }\n };\n\n render() {\n const {\n inputId,\n name,\n label,\n required,\n size,\n small,\n placeholder,\n helperText,\n rows,\n resize,\n disabled,\n value,\n min,\n max,\n maxLength,\n numChars,\n readonly,\n maxLengthExceeded,\n maxCharacters,\n maxCharactersError,\n maxCharactersReached,\n minCharacters,\n minCharactersUnattained,\n minValueUnattained,\n maxValueExceeded,\n validationStatus,\n validationText,\n validationInline,\n validationInlineInternal,\n spellcheck,\n inputmode,\n fullWidth,\n truncateValue,\n hiddenInput,\n } = this;\n\n const disabledMode = readonly || disabled;\n\n const currentStatus =\n maxLengthExceeded ||\n maxValueExceeded ||\n minValueUnattained ||\n minCharactersUnattained ||\n maxCharactersError\n ? maxCharactersError\n ? IcInformationStatus.Warning\n : IcInformationStatus.Error\n : validationStatus;\n\n const currentValidationText = maxLengthExceeded\n ? this.maxLengthMessage\n : maxCharactersError\n ? `Maximum input is ${maxCharacters} characters`\n : maxValueExceeded\n ? `Maximum value of ${max} exceeded`\n : minValueUnattained\n ? `Minimum value of ${min} not met`\n : minCharactersUnattained\n ? `Minimum input is ${minCharacters} characters`\n : validationText;\n\n const maxNumChars = readonly ? 0 : maxLength;\n const messageAriaLive =\n maxLengthExceeded ||\n maxCharactersError ||\n maxValueExceeded ||\n minValueUnattained ||\n (maxLength === 0 && currentStatus === IcInformationStatus.Error)\n ? \"assertive\"\n : \"polite\";\n\n const showStatusText =\n this.hasStatus(currentStatus) &&\n !(currentStatus == IcInformationStatus.Success && validationInline) &&\n !validationInlineInternal;\n\n const multiline = rows > 1;\n const hiddenCharCountDescId =\n maxLength > 0 ? `${inputId}-charcount-desc` : \"\";\n\n const describedBy = `${hiddenCharCountDescId} ${getInputDescribedByText(\n inputId,\n helperText !== \"\",\n showStatusText\n )}`.trim();\n\n const disabledText = disabledMode && !readonly;\n const showLeftIcon =\n !!this.el.querySelector(`[slot=\"icon\"]`) && !disabledText;\n\n const invalid = `${currentStatus === IcInformationStatus.Error}`;\n\n if (hiddenInput) {\n renderHiddenInput(true, this.el, name, value, disabledMode);\n }\n return (\n <Host class={{ [\"fullwidth\"]: fullWidth }}>\n <ic-input-container readonly={readonly} disabled={disabledMode}>\n {!this.hideLabel && (\n <ic-input-label\n for={inputId}\n label={label}\n helperText={helperText}\n required={required}\n disabled={disabledText}\n readonly={readonly}\n ></ic-input-label>\n )}\n\n <ic-input-component-container\n size={small ? \"small\" : size}\n validationStatus={currentStatus}\n multiLine={multiline}\n disabled={disabledMode}\n readonly={readonly}\n validationInline={validationInline}\n fullWidth={fullWidth}\n >\n {showLeftIcon && (\n <span\n class={{\n [\"readonly\"]: readonly,\n [\"has-value\"]: value.length > 0,\n }}\n slot=\"left-icon\"\n >\n <slot name=\"icon\" />\n </span>\n )}\n\n {!multiline ? (\n <input\n id={inputId}\n name={name}\n ref={(el) => (this.inputEl = el as HTMLInputElement)}\n type={this.type}\n min={min}\n max={max}\n value={value}\n class={{\n [\"no-left-pad\"]: !showLeftIcon && readonly,\n [\"readonly\"]: readonly,\n [\"truncate-value\"]: truncateValue,\n }}\n placeholder={placeholder ? placeholder : \"\"}\n required={required}\n disabled={disabledMode}\n readonly={readonly}\n onInput={this.onInput}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n aria-label={label}\n aria-describedby={describedBy}\n aria-invalid={invalid}\n aria-activedescendant={this.ariaActiveDescendant}\n aria-expanded={this.ariaExpanded}\n aria-owns={this.ariaOwns}\n autocomplete={this.autocomplete}\n autocapitalize={this.autocapitalize}\n autoFocus={this.autoFocus}\n spellcheck={spellcheck}\n inputmode={inputmode}\n role={this.role}\n maxlength={maxCharactersReached ? maxCharacters : null}\n minlength={minCharactersUnattained ? minCharacters : null}\n {...this.inheritedAttributes}\n ></input>\n ) : (\n <textarea\n id={inputId}\n class={{\n [\"no-resize\"]: resize === false || readonly,\n [\"no-left-pad\"]: !showLeftIcon && readonly,\n [\"readonly\"]: readonly,\n }}\n name={name}\n ref={(el) => (this.inputEl = el as HTMLTextAreaElement)}\n value={value}\n rows={rows}\n required={required}\n disabled={disabledMode}\n placeholder={placeholder ? placeholder : \"\"}\n readonly={readonly}\n onInput={this.onInput}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n aria-label={label}\n aria-describedby={describedBy}\n aria-invalid={invalid}\n autocapitalize={this.autocapitalize}\n autoFocus={this.autoFocus}\n spellcheck={spellcheck}\n inputmode={inputmode}\n maxlength={maxCharactersReached ? maxCharacters : null}\n minlength={minCharactersUnattained ? minCharacters : null}\n {...this.inheritedAttributes}\n ></textarea>\n )}\n {isSlotUsed(this.el, \"clear-button\") && (\n <slot name=\"clear-button\"></slot>\n )}\n {isSlotUsed(this.el, \"search-submit-button\") && (\n <slot name=\"search-submit-button\"></slot>\n )}\n </ic-input-component-container>\n {isSlotUsed(this.el, \"menu\") && <slot name=\"menu\"></slot>}\n {(!isEmptyString(validationStatus) ||\n !isEmptyString(validationText) ||\n maxNumChars > 0 ||\n maxValueExceeded ||\n maxCharactersError ||\n minCharactersUnattained ||\n minValueUnattained) &&\n !validationInlineInternal && (\n <ic-input-validation\n status={\n this.hasStatus(currentStatus) === false ||\n (currentStatus === IcInformationStatus.Success &&\n validationInline) ||\n validationInlineInternal\n ? \"\"\n : currentStatus\n }\n message={showStatusText ? currentValidationText : \"\"}\n ariaLiveMode={messageAriaLive}\n for={inputId}\n fullWidth={fullWidth}\n >\n {!readonly && maxNumChars > 0 && (\n <div slot=\"validation-message-adornment\">\n <ic-typography\n variant=\"caption\"\n class={{\n [\"maxlengthtext\"]: true,\n [\"error\"]: maxLengthExceeded,\n [\"disabled\"]: disabledText,\n }}\n >\n <span\n aria-live=\"polite\"\n id={`${inputId}-charcount`}\n class=\"charcount\"\n >\n {numChars}/{maxNumChars}\n </span>\n <span hidden={true} id={hiddenCharCountDescId}>\n Field can contain a maximum of {maxNumChars} characters.\n </span>\n </ic-typography>\n </div>\n )}\n </ic-input-validation>\n )}\n </ic-input-container>\n </Host>\n );\n }\n}\n"],"mappings":"4NAAA,MAAMA,EAAiB,09HC0CvB,IAAIC,EAAW,EACf,MAAMC,EAAqB,IAAIC,EAAmB,S,MAUrCC,EAAS,M,uPACZC,KAAAC,oBAA+C,GAE/CD,KAAAE,qBAAyC,KA4UzCF,KAAAG,qBAAwBC,IAC9BJ,KAAKK,SAAWD,EA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