@ukic/canary-web-components 3.0.0-canary.21 → 3.0.0-canary.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/README.md +2 -1
  2. package/dist/cjs/core.cjs.js +1 -1
  3. package/dist/cjs/ic-button_3.cjs.entry.js +1 -1
  4. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  5. package/dist/cjs/ic-data-table.cjs.entry.js +29 -21
  6. package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
  7. package/dist/cjs/ic-date-picker.cjs.entry.js +17 -10
  8. package/dist/cjs/ic-date-picker.cjs.entry.js.map +1 -1
  9. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +39 -47
  10. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
  11. package/dist/cjs/ic-navigation-item.cjs.entry.js +3 -10
  12. package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
  13. package/dist/cjs/ic-pagination_4.cjs.entry.js +2 -2
  14. package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
  15. package/dist/cjs/ic-search-bar.cjs.entry.js +2 -2
  16. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  17. package/dist/cjs/ic-side-navigation.cjs.entry.js +2 -2
  18. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  19. package/dist/cjs/ic-toggle-button-group.cjs.entry.js +15 -4
  20. package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
  21. package/dist/cjs/ic-toggle-button.cjs.entry.js +13 -4
  22. package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
  23. package/dist/cjs/ic-tree-item.cjs.entry.js +14 -8
  24. package/dist/cjs/ic-tree-item.cjs.entry.js.map +1 -1
  25. package/dist/cjs/ic-tree-view.cjs.entry.js +23 -15
  26. package/dist/cjs/ic-tree-view.cjs.entry.js.map +1 -1
  27. package/dist/cjs/loader.cjs.js +1 -1
  28. package/dist/collection/components/ic-data-table/ic-data-table.css +3 -2
  29. package/dist/collection/components/ic-data-table/ic-data-table.js +28 -20
  30. package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
  31. package/dist/collection/components/ic-data-table/ic-data-table.stories.js +2 -2
  32. package/dist/collection/components/ic-data-table/ic-data-table.stories.js.map +1 -1
  33. package/dist/collection/components/ic-data-table/story-data.js +32 -73
  34. package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
  35. package/dist/collection/components/ic-date-picker/ic-date-picker.js +37 -10
  36. package/dist/collection/components/ic-date-picker/ic-date-picker.js.map +1 -1
  37. package/dist/collection/components/ic-tree-item/ic-tree-item.js +14 -8
  38. package/dist/collection/components/ic-tree-item/ic-tree-item.js.map +1 -1
  39. package/dist/collection/components/ic-tree-view/ic-tree-view.js +23 -15
  40. package/dist/collection/components/ic-tree-view/ic-tree-view.js.map +1 -1
  41. package/dist/components/ic-data-table.js +29 -21
  42. package/dist/components/ic-data-table.js.map +1 -1
  43. package/dist/components/ic-date-picker.js +18 -10
  44. package/dist/components/ic-date-picker.js.map +1 -1
  45. package/dist/components/ic-loading-indicator2.js +1 -1
  46. package/dist/components/ic-loading-indicator2.js.map +1 -1
  47. package/dist/components/ic-menu2.js +42 -47
  48. package/dist/components/ic-menu2.js.map +1 -1
  49. package/dist/components/ic-navigation-item.js +3 -10
  50. package/dist/components/ic-navigation-item.js.map +1 -1
  51. package/dist/components/ic-search-bar.js +2 -2
  52. package/dist/components/ic-search-bar.js.map +1 -1
  53. package/dist/components/ic-select2.js +2 -2
  54. package/dist/components/ic-select2.js.map +1 -1
  55. package/dist/components/ic-side-navigation.js +2 -2
  56. package/dist/components/ic-side-navigation.js.map +1 -1
  57. package/dist/components/ic-toggle-button-group.js +17 -4
  58. package/dist/components/ic-toggle-button-group.js.map +1 -1
  59. package/dist/components/ic-toggle-button.js +14 -4
  60. package/dist/components/ic-toggle-button.js.map +1 -1
  61. package/dist/components/ic-tree-item.js +15 -9
  62. package/dist/components/ic-tree-item.js.map +1 -1
  63. package/dist/components/ic-tree-view.js +24 -16
  64. package/dist/components/ic-tree-view.js.map +1 -1
  65. package/dist/core/core.esm.js +1 -1
  66. package/dist/core/core.esm.js.map +1 -1
  67. package/dist/core/p-156fc5f1.entry.js +2 -0
  68. package/dist/core/p-156fc5f1.entry.js.map +1 -0
  69. package/dist/core/{p-b6c3cc1c.entry.js → p-15ec796a.entry.js} +2 -2
  70. package/dist/core/p-15ec796a.entry.js.map +1 -0
  71. package/dist/core/{p-145238fe.entry.js → p-1ffac8ae.entry.js} +2 -2
  72. package/dist/core/{p-145238fe.entry.js.map → p-1ffac8ae.entry.js.map} +1 -1
  73. package/dist/core/{p-b6d1988d.entry.js → p-6e7aaca5.entry.js} +2 -2
  74. package/dist/core/{p-b6d1988d.entry.js.map → p-6e7aaca5.entry.js.map} +1 -1
  75. package/dist/core/p-755bdc43.entry.js +2 -0
  76. package/dist/core/p-755bdc43.entry.js.map +1 -0
  77. package/dist/core/p-78635447.entry.js +2 -0
  78. package/dist/core/p-78635447.entry.js.map +1 -0
  79. package/dist/core/{p-1bcf49fa.entry.js → p-a220535c.entry.js} +2 -2
  80. package/dist/core/p-a220535c.entry.js.map +1 -0
  81. package/dist/core/{p-9fafa5fa.entry.js → p-b88585bf.entry.js} +2 -2
  82. package/dist/core/p-b88585bf.entry.js.map +1 -0
  83. package/dist/core/{p-b6b7c15c.entry.js → p-bc974a3e.entry.js} +2 -2
  84. package/dist/core/p-bc974a3e.entry.js.map +1 -0
  85. package/dist/core/p-c67381b1.entry.js +2 -0
  86. package/dist/core/p-c67381b1.entry.js.map +1 -0
  87. package/dist/core/p-d04b75cb.entry.js +2 -0
  88. package/dist/core/p-d04b75cb.entry.js.map +1 -0
  89. package/dist/core/p-e2103bcc.entry.js +2 -0
  90. package/dist/core/p-e2103bcc.entry.js.map +1 -0
  91. package/dist/esm/core.js +1 -1
  92. package/dist/esm/ic-button_3.entry.js +1 -1
  93. package/dist/esm/ic-button_3.entry.js.map +1 -1
  94. package/dist/esm/ic-data-table.entry.js +29 -21
  95. package/dist/esm/ic-data-table.entry.js.map +1 -1
  96. package/dist/esm/ic-date-picker.entry.js +17 -10
  97. package/dist/esm/ic-date-picker.entry.js.map +1 -1
  98. package/dist/esm/ic-input-component-container_3.entry.js +39 -47
  99. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
  100. package/dist/esm/ic-navigation-item.entry.js +3 -10
  101. package/dist/esm/ic-navigation-item.entry.js.map +1 -1
  102. package/dist/esm/ic-pagination_4.entry.js +2 -2
  103. package/dist/esm/ic-pagination_4.entry.js.map +1 -1
  104. package/dist/esm/ic-search-bar.entry.js +2 -2
  105. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  106. package/dist/esm/ic-side-navigation.entry.js +2 -2
  107. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  108. package/dist/esm/ic-toggle-button-group.entry.js +15 -4
  109. package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
  110. package/dist/esm/ic-toggle-button.entry.js +13 -4
  111. package/dist/esm/ic-toggle-button.entry.js.map +1 -1
  112. package/dist/esm/ic-tree-item.entry.js +15 -9
  113. package/dist/esm/ic-tree-item.entry.js.map +1 -1
  114. package/dist/esm/ic-tree-view.entry.js +24 -16
  115. package/dist/esm/ic-tree-view.entry.js.map +1 -1
  116. package/dist/esm/loader.js +1 -1
  117. package/dist/types/components/ic-data-table/ic-data-table.d.ts +1 -1
  118. package/dist/types/components/ic-data-table/ic-data-table.stories.d.ts +1 -1
  119. package/dist/types/components/ic-data-table/story-data.d.ts +0 -64
  120. package/dist/types/components/ic-date-picker/ic-date-picker.d.ts +4 -0
  121. package/dist/types/components/ic-tree-item/ic-tree-item.d.ts +2 -0
  122. package/dist/types/components/ic-tree-view/ic-tree-view.d.ts +2 -1
  123. package/dist/types/components.d.ts +8 -0
  124. package/hydrate/index.js +166 -126
  125. package/hydrate/index.mjs +166 -126
  126. package/package.json +3 -3
  127. package/dist/core/p-1b20ab19.entry.js +0 -2
  128. package/dist/core/p-1b20ab19.entry.js.map +0 -1
  129. package/dist/core/p-1bcf49fa.entry.js.map +0 -1
  130. package/dist/core/p-5f8b09e4.entry.js +0 -2
  131. package/dist/core/p-5f8b09e4.entry.js.map +0 -1
  132. package/dist/core/p-7001f1c1.entry.js +0 -2
  133. package/dist/core/p-7001f1c1.entry.js.map +0 -1
  134. package/dist/core/p-9fafa5fa.entry.js.map +0 -1
  135. package/dist/core/p-b6b7c15c.entry.js.map +0 -1
  136. package/dist/core/p-b6c3cc1c.entry.js.map +0 -1
  137. package/dist/core/p-b9369ce5.entry.js +0 -2
  138. package/dist/core/p-b9369ce5.entry.js.map +0 -1
  139. package/dist/core/p-cbbba154.entry.js +0 -2
  140. package/dist/core/p-cbbba154.entry.js.map +0 -1
  141. package/dist/core/p-dc3aba7c.entry.js +0 -2
  142. package/dist/core/p-dc3aba7c.entry.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ukic/canary-web-components",
3
- "version": "3.0.0-canary.21",
3
+ "version": "3.0.0-canary.22",
4
4
  "description": "A web component UI library compiled with StencilJS",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "module": "./dist/index.js",
@@ -44,7 +44,7 @@
44
44
  "dependencies": {
45
45
  "@popperjs/core": "^2.11.2",
46
46
  "@stencil/core": "^4.26.0",
47
- "@ukic/web-components": "^3.6.0"
47
+ "@ukic/web-components": "^3.7.0"
48
48
  },
49
49
  "peerDependencies": {
50
50
  "@ukic/fonts": "^3.1.0"
@@ -90,5 +90,5 @@
90
90
  },
91
91
  "license": "MIT",
92
92
  "packageManager": "^npm@10.9.2",
93
- "gitHead": "f8f06110b168e3887dc77705152f18a33ad948f1"
93
+ "gitHead": "8dda3100111ba9731294bca0a22cdd04b128deaf"
94
94
  }
@@ -1,2 +0,0 @@
1
- import{r as t,c as e,h as o,H as i,g as n}from"./p-8e4e97b4.js";import{r}from"./p-0fe08a58.js";const s='/*! 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}:root{display:block}:host{display:flex;flex-direction:row;width:-moz-fit-content;width:fit-content;min-width:-moz-min-content;min-width:min-content;border:var(--ic-border-width) solid var(--ic-toggle-button-unselected-border);border-radius:var(--ic-border-radius)}:host(.ic-toggle-button-group-full-width){width:100%;max-width:100%}:host(.ic-toggle-button-group-loading){min-width:-moz-max-content;min-width:max-content}:host(:focus){box-shadow:var(--ic-border-focus);border-radius:var(--ic-border-radius);transition:var(--ic-transition-duration-fast);outline:none}::slotted(ic-toggle-button){flex-grow:1;width:-moz-min-content;width:min-content;--toggle-button-border:none !important;--toggle-button-border-hover:none !important;--toggle-button-border-active:none !important}::slotted(ic-toggle-button:not(:last-of-type)){border-right:var(--ic-border-width) solid\n var(--ic-toggle-button-unselected-border)}:host(.ic-toggle-button-group-disabled){border:var(--ic-space-1px) dashed\n var(--ic-toggle-button-unselected-border-disabled);pointer-events:none}:host(.ic-toggle-button-group-disabled) ::slotted(ic-toggle-button:not(:last-of-type)){border-right:var(--ic-space-1px) dashed\n var(--ic-toggle-button-unselected-border-disabled)}:host(.ic-toggle-button-group-monochrome){border:var(--ic-border-width) solid\n var(--ic-toggle-button-unselected-border-monochrome)}:host(.ic-toggle-button-group-monochrome) ::slotted(ic-toggle-button:not(:last-of-type)){border-right:var(--ic-border-width) solid\n var(--ic-toggle-button-unselected-border-monochrome)}:host(.ic-toggle-button-group-disabled.ic-toggle-button-group-monochrome){border:var(--ic-border-width) dashed\n var(--ic-toggle-button-unselected-border-disabled-monochrome)}:host(.ic-toggle-button-group-disabled.ic-toggle-button-group-monochrome) ::slotted(ic-toggle-button:not(:last-of-type)){border-right:var(--ic-border-width) solid\n var(--ic-toggle-button-unselected-border-disabled-monochrome)}';const a=s;const d="IC-TOGGLE-BUTTON-GROUP";const l=class{constructor(o){t(this,o);this.icChange=e(this,"icChange",7);this.lastKeyPressed={key:null,shift:false};this.accessibleLabel="Toggle button group";this.disabled=false;this.fullWidth=false;this.loading=false;this.monochrome=false;this.selectMethod="manual";this.selectType="single";this.size="medium";this.theme="inherit";this.tooltipPlacement="bottom";this.variant="default";this.keyListener=t=>{this.lastKeyPressed={key:t.key,shift:t.shiftKey}};this.handleHostFocus=({target:t,relatedTarget:e})=>{var o;if(this.loading||this.disabled)return;const i=t;const n=e;const r=Array.from((i===null||i===void 0?void 0:i.querySelectorAll("ic-toggle-button"))||[]);const s=r.every((t=>!t.checked));const{shift:a}=this.lastKeyPressed;if((s||this.selectType!=="single")&&!a||s&&a&&(n===null||n===void 0?void 0:n.tagName)==d){(o=r[0])===null||o===void 0?void 0:o.focus()}else if(!a||(n===null||n===void 0?void 0:n.tagName)==d){r.filter((t=>t.checked))[0].focus()}};this.handleKeyDown=({key:t})=>{if(t!=="ArrowDown"&&t!=="ArrowRight"&&t!=="ArrowLeft"&&t!=="ArrowUp")return;const e=this.getAllToggleButtons();const o=e[this.getNextItemToSelect(e.indexOf(e.filter((t=>t===document.activeElement))[0]),t==="ArrowDown"||t==="ArrowRight")];if(this.selectMethod==="auto"){o.checked=true;this.selectHandler(new CustomEvent("icToggleChecked",{detail:{checked:o.checked}}),o)}else{o.focus()}};this.getNextItemToSelect=(t,e)=>{const o=this.getAllToggleButtons();const i=o.length-1;if(t<1){t=0}let n=e?t+1:t-1;if(n<0){n=i}else if(n>i){n=0}if(o[n].disabled){n=this.getNextItemToSelect(n,e)}return n};this.getAllToggleButtons=()=>Array.from(this.el.querySelectorAll("ic-toggle-button"))}watchDisabledHandler(){this.getAllToggleButtons().forEach((t=>{t.disabled=this.disabled}));r(this.disabled,this.el)}watchFullWidthHandler(){this.getAllToggleButtons().forEach((t=>{t.fullWidth=this.fullWidth}))}watchLoadingHandler(){this.getAllToggleButtons().forEach((t=>{t.loading=this.loading}))}watchMonochromeHandler(){this.getAllToggleButtons().forEach((t=>{t.monochrome=this.monochrome}))}watchSizeHandler(){this.getAllToggleButtons().forEach((t=>{t.size=this.size}))}watchThemeHandler(){this.getAllToggleButtons().forEach((t=>{t.theme=this.theme}))}watchTooltipPlacementHandler(){this.getAllToggleButtons().forEach((t=>{t.tooltipPlacement=this.tooltipPlacement}))}watchVariantHandler(){this.getAllToggleButtons().forEach((t=>{t.variant=this.variant}))}selectHandler(t,e){const o=this.getAllToggleButtons();let i=t.target;if(e)e.focus();if(this.selectType==="single"){if(!i&&e){i=e}o.forEach((t=>{if(t.id!==i.id&&t.checked){t.checked=false}}));this.icChange.emit({checked:t.detail.checked,selectedOption:i})}else{const t=o.filter((t=>t.checked&&!t.disabled));this.icChange.emit({checked:t.map((t=>t.checked)),toggledOptions:t.map((t=>({toggleButton:t}))),selectedOption:i})}}componentWillLoad(){if(this.selectType==="multi")this.selectMethod="manual";document.addEventListener("keydown",this.keyListener);r(this.disabled,this.el)}componentDidLoad(){this.getAllToggleButtons().forEach(((t,e)=>{var o,i,n;const r=(n=(i=(o=t.shadowRoot)===null||o===void 0?void 0:o.querySelector("ic-button"))===null||i===void 0?void 0:i.shadowRoot)===null||n===void 0?void 0:n.querySelector("button");if(r){const t=r.getAttribute("aria-label");const e=t?`${t}, `:"";r.setAttribute("aria-label",`${e}${this.accessibleLabel}`)}t.id=e.toString();t.tabIndex=-1;t.addEventListener("keydown",(t=>{this.handleKeyDown(t)}));t.classList.add("expand-toggle-group-child")}))}disconnectedCallback(){document===null||document===void 0?void 0:document.removeEventListener("keydown",this.keyListener)}render(){const{accessibleLabel:t,disabled:e,fullWidth:n,loading:r,monochrome:s,theme:a}=this;return o(i,{key:"c82ba602f319c2074da44667618cc5d7b7c3499b",role:"group","aria-label":t,tabindex:0,class:{"ic-toggle-button-group-disabled":e,"ic-toggle-button-group-full-width":n,"ic-toggle-button-group-loading":r,"ic-toggle-button-group-monochrome":s,[`ic-theme-${a}`]:a!=="inherit"},onFocus:this.handleHostFocus},o("slot",{key:"98defd37fd3f5c87d4d0aceefd1b5ac0c5ad6123"}))}get el(){return n(this)}static get watchers(){return{disabled:["watchDisabledHandler"],fullWidth:["watchFullWidthHandler"],loading:["watchLoadingHandler"],monochrome:["watchMonochromeHandler"],size:["watchSizeHandler"],theme:["watchThemeHandler"],tooltipPlacement:["watchTooltipPlacementHandler"],variant:["watchVariantHandler"]}}};l.style=a;export{l as ic_toggle_button_group};
2
- //# sourceMappingURL=p-1b20ab19.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["icToggleButtonGroupCss","IcToggleButtonGroupStyle0","TOGGLE_GROUP","ToggleButtonGroup","constructor","hostRef","this","lastKeyPressed","key","shift","accessibleLabel","disabled","fullWidth","loading","monochrome","selectMethod","selectType","size","theme","tooltipPlacement","variant","keyListener","ev","shiftKey","handleHostFocus","target","relatedTarget","_a","el","relEl","toggleButtons","Array","from","querySelectorAll","noToggleButtonsChecked","every","checked","tagName","focus","filter","handleKeyDown","toggleButtonOptions","getAllToggleButtons","targetToggle","getNextItemToSelect","indexOf","document","activeElement","selectHandler","CustomEvent","detail","currentItem","movingDown","numToggles","length","nextItem","watchDisabledHandler","forEach","removeDisabledFalse","watchFullWidthHandler","watchLoadingHandler","watchMonochromeHandler","watchSizeHandler","watchThemeHandler","watchTooltipPlacementHandler","watchVariantHandler","tabTarget","allToggles","clickedToggle","id","icChange","emit","selectedOption","toggledOptions","map","opt","toggleButton","componentWillLoad","addEventListener","componentDidLoad","i","_b","_c","btn","shadowRoot","querySelector","btnAriaLabel","getAttribute","aria","setAttribute","toString","tabIndex","classList","add","disconnectedCallback","removeEventListener","render","h","Host","role","tabindex","class","onFocus"],"sources":["../web-components/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.css?tag=ic-toggle-button-group&encapsulation=shadow","../web-components/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js"],"sourcesContent":["/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n ========================================================================== */\n\n/**\n * Remove the margin in all browsers.\n */\n\nbody {\n margin: 0;\n}\n\n/**\n * Render the `main` element consistently in IE.\n */\n\nmain {\n display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n box-sizing: content-box; /* 1 */\n height: 0; /* 1 */\n overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\npre {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * Remove the gray background on active links in IE 10.\n */\n\na {\n background-color: transparent;\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n border-bottom: none; /* 1 */\n text-decoration: underline; /* 2 */\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Remove the border on images inside links in IE 10.\n */\n\nimg {\n border-style: none;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput {\n /* 1 */\n overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect {\n /* 1 */\n text-transform: none;\n}\n\n/**\n * Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button;\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * `fieldset` elements in all browsers.\n */\n\nlegend {\n box-sizing: border-box; /* 1 */\n color: inherit; /* 2 */\n display: table; /* 1 */\n max-width: 100%; /* 1 */\n padding: 0; /* 3 */\n white-space: normal; /* 1 */\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\n * Remove the default vertical scrollbar in IE 10+.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type=\"search\"] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n\n[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\n ========================================================================== */\n\n/*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\n\ndetails {\n display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\nsummary {\n display: list-item;\n}\n\n/* Misc\n ========================================================================== */\n\n/**\n * Add the correct display in IE 10+.\n */\n\ntemplate {\n display: none;\n}\n\n/**\n * Add the correct display in IE 10.\n */\n\n[hidden] {\n display: none;\n}\n\nhtml,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font-style: inherit;\n vertical-align: baseline;\n}\n\n\n/* PARENT HOST */\n\n:root {\n display: block;\n}\n\n:host {\n display: flex;\n flex-direction: row;\n width: -moz-fit-content;\n width: fit-content;\n min-width: -moz-min-content;\n min-width: min-content;\n border: var(--ic-border-width) solid var(--ic-toggle-button-unselected-border);\n border-radius: var(--ic-border-radius);\n}\n\n:host(.ic-toggle-button-group-full-width) {\n width: 100%;\n max-width: 100%;\n}\n\n:host(.ic-toggle-button-group-loading) {\n min-width: -moz-max-content;\n min-width: max-content;\n}\n\n:host(:focus) {\n box-shadow: var(--ic-border-focus);\n border-radius: var(--ic-border-radius);\n transition: var(--ic-transition-duration-fast);\n outline: none;\n}\n\n/* CHILDREN SLOTTED */\n\n::slotted(ic-toggle-button) {\n flex-grow: 1;\n width: -moz-min-content;\n width: min-content;\n\n --toggle-button-border: none !important;\n --toggle-button-border-hover: none !important;\n --toggle-button-border-active: none !important;\n}\n\n::slotted(ic-toggle-button:not(:last-of-type)) {\n border-right: var(--ic-border-width) solid\n var(--ic-toggle-button-unselected-border);\n}\n\n/* DISABLED */\n:host(.ic-toggle-button-group-disabled) {\n border: var(--ic-space-1px) dashed\n var(--ic-toggle-button-unselected-border-disabled);\n pointer-events: none;\n}\n\n:host(.ic-toggle-button-group-disabled)\n ::slotted(ic-toggle-button:not(:last-of-type)) {\n border-right: var(--ic-space-1px) dashed\n var(--ic-toggle-button-unselected-border-disabled);\n}\n\n:host(.ic-toggle-button-group-monochrome) {\n border: var(--ic-border-width) solid\n var(--ic-toggle-button-unselected-border-monochrome);\n}\n\n:host(.ic-toggle-button-group-monochrome)\n ::slotted(ic-toggle-button:not(:last-of-type)) {\n border-right: var(--ic-border-width) solid\n var(--ic-toggle-button-unselected-border-monochrome);\n}\n\n:host(.ic-toggle-button-group-disabled.ic-toggle-button-group-monochrome) {\n border: var(--ic-border-width) dashed\n var(--ic-toggle-button-unselected-border-disabled-monochrome);\n}\n\n:host(.ic-toggle-button-group-disabled.ic-toggle-button-group-monochrome)\n ::slotted(ic-toggle-button:not(:last-of-type)) {\n border-right: var(--ic-border-width) solid\n var(--ic-toggle-button-unselected-border-disabled-monochrome);\n}\n","import { Host, h, } from \"@stencil/core\";\nimport { removeDisabledFalse } from \"../../utils/helpers\";\nconst TOGGLE_GROUP = \"IC-TOGGLE-BUTTON-GROUP\";\nexport class ToggleButtonGroup {\n constructor() {\n this.lastKeyPressed = {\n key: null,\n shift: false,\n };\n /**\n * The accessible label of the toggle button group component to provide context for screen reader users.\n */\n this.accessibleLabel = \"Toggle button group\";\n /**\n * If `true`, the toggle button group will be set to the disabled state.\n */\n this.disabled = false;\n /**\n * If `true`, the toggle button group will fill the width of the container.\n */\n this.fullWidth = false;\n /**\n * If `true`, the toggle button group will be in loading state.\n */\n this.loading = false;\n /**\n * If `true`, the toggle button group will display as black in the light theme, and white in dark theme.\n */\n this.monochrome = false;\n /**\n * If `auto`, controls are toggled automatically when navigated to. If `manual`, the controls must be actioned to change their toggled state. The value of this prop is ignored if `selectType` is set to`multi`.\n */\n this.selectMethod = \"manual\";\n /**\n * Sets whether single or multiple options can be toggled. If `multi`, then the `selectMethod` is always `manual`.\n */\n this.selectType = \"single\";\n /**\n * The size of the toggle buttons to be displayed. This does not affect the font size of the accessible label.\n */\n this.size = \"medium\";\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n this.theme = \"inherit\";\n /**\n * The position of the tooltip in relation to the toggle buttons.\n */\n this.tooltipPlacement = \"bottom\";\n /**\n * The variant of the toggle button.\n */\n this.variant = \"default\";\n this.keyListener = (ev) => {\n this.lastKeyPressed = {\n key: ev.key,\n shift: ev.shiftKey,\n };\n };\n this.handleHostFocus = ({ target, relatedTarget }) => {\n var _a;\n if (this.loading || this.disabled)\n return;\n const el = target;\n const relEl = relatedTarget;\n const toggleButtons = Array.from((el === null || el === void 0 ? void 0 : el.querySelectorAll(\"ic-toggle-button\")) || []);\n const noToggleButtonsChecked = toggleButtons.every((el) => !el.checked);\n const { shift } = this.lastKeyPressed;\n if (((noToggleButtonsChecked || this.selectType !== \"single\") && !shift) ||\n (noToggleButtonsChecked && shift && (relEl === null || relEl === void 0 ? void 0 : relEl.tagName) == TOGGLE_GROUP)) {\n (_a = toggleButtons[0]) === null || _a === void 0 ? void 0 : _a.focus();\n }\n else if (!shift || (relEl === null || relEl === void 0 ? void 0 : relEl.tagName) == TOGGLE_GROUP) {\n // if checked is true and selectMethod is \"single\", focus that toggle\n toggleButtons.filter((el) => el.checked)[0].focus();\n }\n };\n this.handleKeyDown = ({ key }) => {\n if (key !== \"ArrowDown\" &&\n key !== \"ArrowRight\" &&\n key !== \"ArrowLeft\" &&\n key !== \"ArrowUp\")\n return;\n const toggleButtonOptions = this.getAllToggleButtons();\n const targetToggle = toggleButtonOptions[this.getNextItemToSelect(toggleButtonOptions.indexOf(toggleButtonOptions.filter((el) => el === document.activeElement)[0]), key === \"ArrowDown\" || key === \"ArrowRight\")];\n if (this.selectMethod === \"auto\") {\n // trigger selectHandler when unable to add 'target'\n targetToggle.checked = true;\n this.selectHandler(new CustomEvent(\"icToggleChecked\", {\n detail: {\n checked: targetToggle.checked,\n },\n }), targetToggle);\n }\n else {\n targetToggle.focus();\n }\n };\n this.getNextItemToSelect = (currentItem, movingDown) => {\n const toggleButtonOptions = this.getAllToggleButtons();\n const numToggles = toggleButtonOptions.length - 1;\n if (currentItem < 1) {\n currentItem = 0;\n }\n let nextItem = movingDown ? currentItem + 1 : currentItem - 1;\n if (nextItem < 0) {\n nextItem = numToggles;\n }\n else if (nextItem > numToggles) {\n nextItem = 0;\n }\n if (toggleButtonOptions[nextItem].disabled) {\n nextItem = this.getNextItemToSelect(nextItem, movingDown);\n }\n return nextItem;\n };\n this.getAllToggleButtons = () => Array.from(this.el.querySelectorAll(\"ic-toggle-button\"));\n }\n watchDisabledHandler() {\n this.getAllToggleButtons().forEach((el) => {\n el.disabled = this.disabled;\n });\n removeDisabledFalse(this.disabled, this.el);\n }\n watchFullWidthHandler() {\n this.getAllToggleButtons().forEach((el) => {\n el.fullWidth = this.fullWidth;\n });\n }\n watchLoadingHandler() {\n this.getAllToggleButtons().forEach((el) => {\n el.loading = this.loading;\n });\n }\n watchMonochromeHandler() {\n this.getAllToggleButtons().forEach((el) => {\n el.monochrome = this.monochrome;\n });\n }\n watchSizeHandler() {\n this.getAllToggleButtons().forEach((el) => {\n el.size = this.size;\n });\n }\n watchThemeHandler() {\n this.getAllToggleButtons().forEach((el) => {\n el.theme = this.theme;\n });\n }\n watchTooltipPlacementHandler() {\n this.getAllToggleButtons().forEach((el) => {\n el.tooltipPlacement = this.tooltipPlacement;\n });\n }\n watchVariantHandler() {\n this.getAllToggleButtons().forEach((el) => {\n el.variant = this.variant;\n });\n }\n selectHandler(ev, tabTarget) {\n const allToggles = this.getAllToggleButtons();\n let clickedToggle = ev.target;\n if (tabTarget)\n tabTarget.focus(); // tabTarget used in proxySelectHandler\n if (this.selectType === \"single\") {\n if (!clickedToggle && tabTarget) {\n clickedToggle = tabTarget;\n }\n allToggles.forEach((el) => {\n if (el.id !== clickedToggle.id && el.checked) {\n el.checked = false;\n }\n });\n this.icChange.emit({\n checked: ev.detail.checked,\n selectedOption: clickedToggle,\n });\n }\n else {\n const toggledOptions = allToggles.filter((el) => el.checked && !el.disabled);\n this.icChange.emit({\n checked: toggledOptions.map((opt) => opt.checked),\n toggledOptions: toggledOptions.map((opt) => ({\n toggleButton: opt,\n })),\n selectedOption: clickedToggle,\n });\n }\n }\n componentWillLoad() {\n if (this.selectType === \"multi\")\n this.selectMethod = \"manual\";\n if (this.selectMethod === \"auto\")\n this.selectType === \"single\";\n document.addEventListener(\"keydown\", this.keyListener);\n removeDisabledFalse(this.disabled, this.el);\n }\n componentDidLoad() {\n this.getAllToggleButtons().forEach((el, i) => {\n var _a, _b, _c;\n const btn = (_c = (_b = (_a = el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(\"ic-button\")) === null || _b === void 0 ? void 0 : _b.shadowRoot) === null || _c === void 0 ? void 0 : _c.querySelector(\"button\");\n if (btn) {\n const btnAriaLabel = btn.getAttribute(\"aria-label\");\n const aria = btnAriaLabel ? `${btnAriaLabel}, ` : \"\";\n btn.setAttribute(\"aria-label\", `${aria}${this.accessibleLabel}`);\n }\n el.id = i.toString();\n el.tabIndex = -1;\n el.addEventListener(\"keydown\", (ev) => {\n this.handleKeyDown(ev);\n });\n el.classList.add(\"expand-toggle-group-child\");\n });\n }\n disconnectedCallback() {\n document === null || document === void 0 ? void 0 : document.removeEventListener(\"keydown\", this.keyListener);\n }\n render() {\n const { accessibleLabel, disabled, fullWidth, loading, monochrome, theme } = this;\n return (h(Host, { key: 'c82ba602f319c2074da44667618cc5d7b7c3499b', role: \"group\", \"aria-label\": accessibleLabel, tabindex: 0, class: {\n \"ic-toggle-button-group-disabled\": disabled,\n \"ic-toggle-button-group-full-width\": fullWidth,\n \"ic-toggle-button-group-loading\": loading,\n \"ic-toggle-button-group-monochrome\": monochrome,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }, onFocus: this.handleHostFocus }, h(\"slot\", { key: '98defd37fd3f5c87d4d0aceefd1b5ac0c5ad6123' })));\n }\n static get is() { return \"ic-toggle-button-group\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-toggle-button-group.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-toggle-button-group.css\"]\n };\n }\n static get properties() {\n return {\n \"accessibleLabel\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The accessible label of the toggle button group component to provide context for screen reader users.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"accessible-label\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"Toggle button group\\\"\"\n },\n \"disabled\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the toggle button group will be set to the disabled state.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"disabled\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"fullWidth\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the toggle button group will fill the width of the container.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"full-width\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"iconPlacement\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcIconPlacementOptions\",\n \"resolved\": \"\\\"left\\\" | \\\"right\\\" | \\\"top\\\" | undefined\",\n \"references\": {\n \"IcIconPlacementOptions\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcIconPlacementOptions\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The placement of the icons in relation to the toggle button labels.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"icon-placement\",\n \"reflect\": false\n },\n \"loading\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the toggle button group will be in loading state.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"loading\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"monochrome\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the toggle button group will display as black in the light theme, and white in dark theme.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"monochrome\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"selectMethod\": {\n \"type\": \"string\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"IcSelectMethodTypes\",\n \"resolved\": \"\\\"auto\\\" | \\\"manual\\\"\",\n \"references\": {\n \"IcSelectMethodTypes\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcSelectMethodTypes\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `auto`, controls are toggled automatically when navigated to. If `manual`, the controls must be actioned to change their toggled state. The value of this prop is ignored if `selectType` is set to`multi`.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"select-method\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"manual\\\"\"\n },\n \"selectType\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcSelectTypes\",\n \"resolved\": \"\\\"multi\\\" | \\\"single\\\"\",\n \"references\": {\n \"IcSelectTypes\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcSelectTypes\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Sets whether single or multiple options can be toggled. If `multi`, then the `selectMethod` is always `manual`.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"select-type\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"single\\\"\"\n },\n \"size\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcSizes\",\n \"resolved\": \"\\\"large\\\" | \\\"medium\\\" | \\\"small\\\"\",\n \"references\": {\n \"IcSizes\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcSizes\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The size of the toggle buttons to be displayed. This does not affect the font size of the accessible label.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"size\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"medium\\\"\"\n },\n \"theme\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcThemeMode\",\n \"resolved\": \"\\\"dark\\\" | \\\"inherit\\\" | \\\"light\\\"\",\n \"references\": {\n \"IcThemeMode\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcThemeMode\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Sets the theme color to the dark or light theme color. \\\"inherit\\\" will set the color based on the system settings or ic-theme component.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"theme\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"inherit\\\"\"\n },\n \"tooltipPlacement\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcButtonTooltipPlacement\",\n \"resolved\": \"\\\"bottom\\\" | \\\"left\\\" | \\\"right\\\" | \\\"top\\\"\",\n \"references\": {\n \"IcButtonTooltipPlacement\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcButtonTooltipPlacement\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The position of the tooltip in relation to the toggle buttons.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"tooltip-placement\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"bottom\\\"\"\n },\n \"variant\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"\\\"default\\\" | \\\"icon\\\"\",\n \"resolved\": \"\\\"default\\\" | \\\"icon\\\"\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The variant of the toggle button.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"variant\",\n \"reflect\": true,\n \"defaultValue\": \"\\\"default\\\"\"\n }\n };\n }\n static get states() {\n return {\n \"lastKeyPressed\": {}\n };\n }\n static get events() {\n return [{\n \"method\": \"icChange\",\n \"name\": \"icChange\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when a toggle button is selected.\"\n },\n \"complexType\": {\n \"original\": \"IcChangeEventDetail\",\n \"resolved\": \"IcChangeEventDetail\",\n \"references\": {\n \"IcChangeEventDetail\": {\n \"location\": \"import\",\n \"path\": \"./ic-toggle-button-group.types\",\n \"id\": \"src/components/ic-toggle-button-group/ic-toggle-button-group.types.ts::IcChangeEventDetail\"\n }\n }\n }\n }];\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"disabled\",\n \"methodName\": \"watchDisabledHandler\"\n }, {\n \"propName\": \"fullWidth\",\n \"methodName\": \"watchFullWidthHandler\"\n }, {\n \"propName\": \"loading\",\n \"methodName\": \"watchLoadingHandler\"\n }, {\n \"propName\": \"monochrome\",\n \"methodName\": \"watchMonochromeHandler\"\n }, {\n \"propName\": \"size\",\n \"methodName\": \"watchSizeHandler\"\n }, {\n \"propName\": \"theme\",\n \"methodName\": \"watchThemeHandler\"\n }, {\n \"propName\": \"tooltipPlacement\",\n \"methodName\": \"watchTooltipPlacementHandler\"\n }, {\n \"propName\": \"variant\",\n \"methodName\": \"watchVariantHandler\"\n }];\n }\n static get listeners() {\n return [{\n \"name\": \"icToggleChecked\",\n \"method\": \"selectHandler\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }];\n }\n}\n//# sourceMappingURL=ic-toggle-button-group.js.map\n"],"mappings":"+FAAA,MAAMA,EAAyB,8xIAC/B,MAAAC,EAAeD,ECCf,MAAME,EAAe,yB,MACRC,EAAiB,MAC1B,WAAAC,CAAAC,G,6CACIC,KAAKC,eAAiB,CAClBC,IAAK,KACLC,MAAO,OAKXH,KAAKI,gBAAkB,sBAIvBJ,KAAKK,SAAW,MAIhBL,KAAKM,UAAY,MAIjBN,KAAKO,QAAU,MAIfP,KAAKQ,WAAa,MAIlBR,KAAKS,aAAe,SAIpBT,KAAKU,WAAa,SAIlBV,KAAKW,KAAO,SAIZX,KAAKY,MAAQ,UAIbZ,KAAKa,iBAAmB,SAIxBb,KAAKc,QAAU,UACfd,KAAKe,YAAeC,IAChBhB,KAAKC,eAAiB,CAClBC,IAAKc,EAAGd,IACRC,MAAOa,EAAGC,SACb,EAELjB,KAAKkB,gBAAkB,EAAGC,SAAQC,oBAC9B,IAAIC,EACJ,GAAIrB,KAAKO,SAAWP,KAAKK,SACrB,OACJ,MAAMiB,EAAKH,EACX,MAAMI,EAAQH,EACd,MAAMI,EAAgBC,MAAMC,MAAMJ,IAAO,MAAQA,SAAY,OAAS,EAAIA,EAAGK,iBAAiB,sBAAwB,IACtH,MAAMC,EAAyBJ,EAAcK,OAAOP,IAAQ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AAmC1F,EACnC,oCAAqCC,EACrC,iCAAkCC,EAClC,oCAAqCC,EACrC,CAAC,YAAYI,KAAUA,IAAU,WAClCoF,QAAShG,KAAKkB,iBAAmByE,EAAE,OAAQ,CAAEzF,IAAK,6C","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["icSearchBarCss","IcSearchBarStyle0","inputIds","SearchBar","constructor","hostRef","this","hasTimedOut","inputId","menuCloseFromMenuChangeEvent","menuId","preLoad","preventSubmit","prevNoOption","retryButtonClick","retryViaKeyPress","truncateValue","clearButtonFocused","open","searchSubmitFocused","showClearButton","autocapitalize","autocomplete","autocorrect","autofocus","charactersUntilSuggestion","disabled","disableAutoFiltering","debounce","emptyOptionListText","focusOnLoad","fullWidth","helperText","hideLabel","assistiveHintText","labelField","loading","loadingErrorLabel","loadingLabel","name","placeholder","preventFormSubmitOnSearch","readonly","required","searchMode","size","spellcheck","theme","valueField","filteredOptions","options","value","handleClear","ev","_a","keyboardEvent","mouseEvent","type","code","inputEl","setAttribute","clearTimeout","timeoutTimer","showMenuWithNoInput","setMenuChange","el","setFocus","icClear","emit","preventDefault","onInput","target","icInput","length","rawFilteredOptions","getFilteredMenuOptions","debounceAriaLiveUpdate","onInputBlur","relatedTarget","icSearchBarBlur","onInputFocus","icSearchBarFocus","handleClearBlur","icClearBlur","handleSubmitSearchBlur","icSubmitSearchBlur","setInputValue","newValue","label","getLabelFromValue","handleMouseDown","handleSubmitSearchFocus","handleSubmitSearch","highlightedValue","undefined","icSubmitSearch","form","closest","searchSubmitButton","handleHiddenFormButtonClick","handleSubmitSearchKeyDown","key","handleRetry","detail","keyPressed","icRetryLoad","triggerLoading","loadingOption","timeout","window","setTimeout","timedOut","handleOptionSelect","icOptionSelect","handleMenuOptionHighlight","optionId","replace","ariaActiveDescendant","handleMenuChange","icMenuChange","handleHostFocus","handleHostBlur","menu","focus","updateSearchResultAriaLive","handleFocusClearButton","renderAssistiveHintEl","_b","input","shadowRoot","querySelector","Object","keys","hasOptionsOrFilterDisabled","assistiveHintEl","document","createElement","innerText","id","style","display","after","call","searchResultsStatusEl","hadNoOptions","isSubmitDisabled","updateSearchButtonType","searchButtonType","watchCharactersUntilSuggestionHandler","watchDisabledHandler","removeDisabledFalse","debounceChanged","icChange","debounceEvent","loadingHandler","preventFormSubmitOnSearchHandler","filteredOptionsHandler","newOptions","some","opt","watchOptionsHandler","watchValueHandler","connectedCallback","disconnectedCallback","remove","componentWillLoad","componentDidLoad","onComponentRequiredPropUndefined","prop","propName","componentWillRender","handleSetFirstOption","find","filteredOption","handleKeyDown","event","icKeydown","handleKeyboardOpen","handleKeyUp","debounceAriaLive","render","disabledMode","describedBy","getInputDescribedByText","trim","describedById","hasSuggestedSearch","menuOpen","menuRendered","labelValue","renderHiddenInput","h","Host","class","onFocus","onBlur","for","slot","ref","anchorEl","role","autoFocus","inputmode","innerHTML","clearIcon","onClick","onMouseDown","onKeyDown","variant","searchIcon","fullwidth","activationType","autofocusOnSelected","inputLabel","onMenuOptionSelect","onMenuStateChange","onMenuOptionId","onRetryButtonClicked","parentEl","delegatesFocus"],"sources":["../web-components/dist/collection/components/ic-search-bar/ic-search-bar.css?tag=ic-search-bar&encapsulation=shadow","../web-components/dist/collection/components/ic-search-bar/ic-search-bar.js"],"sourcesContent":["/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n ========================================================================== */\n\n/**\n * Remove the margin in all browsers.\n */\n\nbody {\n margin: 0;\n}\n\n/**\n * Render the `main` element consistently in IE.\n */\n\nmain {\n display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n box-sizing: content-box; /* 1 */\n height: 0; /* 1 */\n overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\npre {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * Remove the gray background on active links in IE 10.\n */\n\na {\n background-color: transparent;\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n border-bottom: none; /* 1 */\n text-decoration: underline; /* 2 */\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Remove the border on images inside links in IE 10.\n */\n\nimg {\n border-style: none;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput {\n /* 1 */\n overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect {\n /* 1 */\n text-transform: none;\n}\n\n/**\n * Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button;\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * `fieldset` elements in all browsers.\n */\n\nlegend {\n box-sizing: border-box; /* 1 */\n color: inherit; /* 2 */\n display: table; /* 1 */\n max-width: 100%; /* 1 */\n padding: 0; /* 3 */\n white-space: normal; /* 1 */\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\n * Remove the default vertical scrollbar in IE 10+.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type=\"search\"] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n\n[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\n ========================================================================== */\n\n/*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\n\ndetails {\n display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\nsummary {\n display: list-item;\n}\n\n/* Misc\n ========================================================================== */\n\n/**\n * Add the correct display in IE 10+.\n */\n\ntemplate {\n display: none;\n}\n\n/**\n * Add the correct display in IE 10.\n */\n\n[hidden] {\n display: none;\n}\n\nhtml,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font-style: inherit;\n vertical-align: baseline;\n}\n\n\n/**\n * @prop --ic-z-index-menu: z-index of search bar menu\n */\n\n:host(.ic-search-bar-search) {\n display: block;\n\n --divider-height: 1.5rem;\n --ic-input-label-helpertext-padding: var(--ic-space-xs);\n --border-color: var(--ic-search-bar-outline);\n --input-bg-color: var(--ic-search-bar-background);\n --border-color-disabled: var(--ic-search-bar-outline-disabled);\n --menu-item-text-color: var(--ic-search-bar-dropdown-option-text);\n --menu-item-desc-text-color: var(--ic-search-bar-dropdown-option-description);\n --menu-bg-color: var(--ic-search-bar-dropdown-background);\n --menu-border-color: var(--ic-search-bar-dropdown-outline);\n}\n\n:host(.ic-search-bar-disabled) {\n --ic-input-label-text-color: var(--ic-search-bar-label-disabled);\n --ic-input-label-helper-text-color: var(--ic-search-bar-subtitle-disabled);\n}\n\n:host(.ic-search-bar-search:hover) {\n --border-color: var(--ic-search-bar-outline-hover);\n}\n\n:host(.ic-search-bar-search:active) {\n --border-color: var(--ic-search-bar-outline-pressed);\n}\n\n:host(.ic-search-bar-search.ic-search-bar-small) {\n --divider-height: 1rem;\n}\n\n:host(.ic-search-bar-full-width) {\n width: 100%;\n}\n\n/* Custom Input */\n\n::-moz-placeholder {\n color: var(--ic-search-bar-placeholder-text);\n opacity: 1;\n}\n\n::placeholder {\n color: var(--ic-search-bar-placeholder-text);\n opacity: 1;\n}\n\ninput {\n border: 0;\n border-radius: var(--ic-border-radius);\n color: var(--ic-search-bar-filled-text);\n background-color: var(--input-bg-color);\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 caret-color: var(--ic-search-bar-filled-text-cursor);\n}\n\ninput:focus {\n border: 0;\n outline: 0;\n}\n\ninput:disabled::-moz-placeholder {\n color: var(--ic-search-bar-disabled-text);\n}\n\ninput:disabled,\ninput:disabled::placeholder {\n color: var(--ic-search-bar-disabled-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.no-left-pad {\n padding-left: 0;\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/* CLEAR */\n\n.clear-button-container {\n align-items: center;\n margin-right: var(--ic-space-1px);\n display: none;\n visibility: hidden;\n}\n\n.clear-button {\n border-radius: var(--ic-border-radius);\n transition: box-shadow var(--ic-easing-transition),\n border-radius var(--ic-easing-transition);\n}\n\n.clear-button:focus,\n.clear-button:active {\n background-color: var(--ic-color-focus-inner);\n box-shadow: inset 0 0 0 0.125rem var(--ic-color-focus-outer);\n border-radius: 0.25rem;\n}\n\n.clear-button-unfocused * {\n fill: var(--ic-search-bar-clear-button);\n}\n\n.clear-button:focus,\n.clear-button:active * {\n fill: var(--ic-atoms-input-clear-button-focus);\n}\n\n.clear-button-visible {\n visibility: visible;\n display: flex;\n}\n\n.search-submit-button-container {\n display: flex;\n align-items: center;\n}\n\n.search-submit-button-unfocused * {\n fill: var(--ic-search-bar-filled-icon);\n}\n\n.search-submit-button-disabled * {\n fill: var(--ic-search-bar-icon-disabled);\n}\n\n.search-submit-button-disabled .ic-tooltip-container {\n display: none !important;\n}\n\n.search-submit-button:focus,\n.search-submit-button:active {\n background-color: var(--ic-color-focus-inner) !important;\n box-shadow: inset 0 0 0 0.125rem var(--ic-color-focus-outer) !important;\n border-radius: var(--ic-space-xxs);\n}\n\n.search-submit-button:focus,\n.search-submit-button:active * {\n fill: white;\n}\n\n.divider {\n width: var(--ic-border-width);\n background-color: var(--ic-search-bar-dropdown-divider);\n height: var(--divider-height);\n}\n\n.menu-container {\n width: var(--input-width, 20rem);\n position: relative;\n top: var(--ic-space-xxxs);\n}\n\n.menu-container.fullwidth {\n width: 100%;\n}\n\n.no-results {\n cursor: not-allowed;\n}\n\n.search-results-status {\n border: 0;\n clip: rect(0, 0, 0, 0, 0);\n height: var(--ic-space-1px);\n margin-bottom: calc(-1 * var(--ic-space-1px));\n margin-right: calc(-1 * var(--ic-space-1px));\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n width: var(--ic-space-1px);\n}\n\n@media (forced-colors: active) {\n .search-submit-button-unfocused * {\n fill: canvastext;\n }\n\n .search-submit-button-disabled * {\n fill: GrayText;\n }\n}\n","import { Host, h, } from \"@stencil/core\";\nimport { getInputDescribedByText, renderHiddenInput, handleHiddenFormButtonClick, getLabelFromValue, onComponentRequiredPropUndefined, getFilteredMenuOptions, removeDisabledFalse, debounceEvent, } from \"../../utils/helpers\";\nimport clearIcon from \"../../assets/clear-icon.svg\";\nimport searchIcon from \"../../assets/search-icon.svg\";\nlet inputIds = 0;\n/**\n * @slot helper-text - Content is set as the helper text for the search bar.\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport class SearchBar {\n constructor() {\n this.hasTimedOut = false;\n this.inputId = `ic-search-bar-input-${inputIds++}`;\n this.menuCloseFromMenuChangeEvent = false;\n this.menuId = `${this.inputId}-menu`;\n this.preLoad = true;\n this.preventSubmit = false;\n this.prevNoOption = false;\n this.retryButtonClick = false;\n this.retryViaKeyPress = false;\n this.truncateValue = false;\n this.clearButtonFocused = false;\n this.open = false;\n this.searchSubmitFocused = false;\n this.showClearButton = false;\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 this.autocapitalize = \"off\";\n /**\n * The state of autocompletion the browser can apply on the text value.\n */\n this.autocomplete = \"off\";\n /**\n * The state of autocorrection the browser can apply when the user is entering/editing the text value.\n */\n this.autocorrect = \"off\";\n /**\n * If `true`, the form control will have input focus when the page loads.\n */\n this.autofocus = false;\n /**\n * The number of characters until suggestions appear. The submit button will be disabled until the inputted value is equal to or greater than this number.\n */\n this.charactersUntilSuggestion = 2;\n /**\n * If `true`, the disabled state will be set.\n */\n this.disabled = false;\n /**\n * Specify whether to disable the built in filtering. For example, if options will already be filtered from external source.\n * If `true`, all options provided will be displayed.\n */\n this.disableAutoFiltering = false;\n /**\n * The amount of time, in milliseconds, to wait to trigger the `icChange` event after each keystroke.\n */\n this.debounce = 0;\n /**\n * The text displayed when there are no options in the option list.\n */\n this.emptyOptionListText = \"No results found\";\n /**\n * If `true`, the search bar will be focused when component loaded.\n */\n this.focusOnLoad = false;\n /**\n * Specify whether the search bar fills the full width of the container.\n * If `true`, this overrides the --input-width CSS variable.\n */\n this.fullWidth = false;\n /**\n * The helper text that will be displayed for additional field guidance.\n */\n this.helperText = \"\";\n /**\n * If `true`, the label will be hidden and the required label value will be applied as an aria-label.\n */\n this.hideLabel = false;\n /**\n * The hint text for the hidden assistive description element.\n */\n this.assistiveHintText = \"When autocomplete results are available use the up and down arrows to choose and press enter to select\";\n /**\n * The custom name for the label field to correspond with the IcMenuOption type.\n */\n this.labelField = \"label\";\n /**\n * Trigger loading state when fetching options asynchronously\n */\n this.loading = false;\n /**\n * Change the message displayed when external loading times out.\n */\n this.loadingErrorLabel = \"Loading Error\";\n /**\n * Change the message displayed whilst the options are being loaded externally.\n */\n this.loadingLabel = \"Loading...\";\n /**\n * The name of the control, which is submitted with the form data.\n */\n this.name = this.inputId;\n /**\n * The placeholder value to display.\n */\n this.placeholder = \"Search\";\n /**\n * If `true` the parent form will not submit when the icSubmitSearch event fires.\n */\n this.preventFormSubmitOnSearch = false;\n /**\n * If `true`, the readonly state will be set.\n */\n this.readonly = false;\n /**\n * If `true`, the search bar will require a value.\n */\n this.required = false;\n /**\n * Specify the mode search bar uses to search. `navigation` allows for quick lookups of a set of values, `query` allows for more general searches.\n */\n this.searchMode = \"navigation\";\n /**\n * The size of the search bar component.\n */\n this.size = \"medium\";\n /**\n * If `true`, the value of the search will have its spelling and grammar checked.\n */\n this.spellcheck = false;\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n this.theme = \"inherit\";\n /**\n * The custom name for the value field to correspond with the IcMenuOption type.\n */\n this.valueField = \"value\";\n this.filteredOptions = [];\n /**\n * The suggested search options.\n */\n this.options = [];\n /**\n * The value of the search input.\n */\n this.value = \"\";\n this.handleClear = (ev) => {\n var _a;\n const keyboardEvent = ev;\n const mouseEvent = ev;\n if (mouseEvent.type === \"click\" ||\n keyboardEvent.code === \"Enter\" ||\n keyboardEvent.code === \"Space\") {\n this.value = \"\";\n (_a = this.inputEl) === null || _a === void 0 ? void 0 : _a.setAttribute(\"value\", \"\");\n this.loading = false;\n clearTimeout(this.timeoutTimer);\n this.filteredOptions = this.options;\n this.showMenuWithNoInput() && this.setMenuChange(true);\n this.el.setFocus();\n this.icClear.emit();\n ev.preventDefault();\n this.preventSubmit = true;\n }\n };\n this.onInput = ({ target }) => {\n this.value = target.value;\n this.icInput.emit({ value: this.value });\n if (this.options.length > 0) {\n this.setMenuChange(true);\n this.preLoad = false;\n if (this.disableAutoFiltering === false) {\n const rawFilteredOptions = getFilteredMenuOptions(this.options, false, this.value, \"anywhere\", this.labelField);\n this.filteredOptions =\n rawFilteredOptions.length > 0\n ? rawFilteredOptions\n : [\n {\n [this.labelField]: this.emptyOptionListText,\n [this.valueField]: \"\",\n },\n ];\n }\n }\n if (!this.showClearButton)\n this.showClearButton = true;\n this.debounceAriaLiveUpdate();\n };\n this.onInputBlur = ({ target, relatedTarget }) => {\n this.icSearchBarBlur.emit({\n value: target.value,\n relatedTarget,\n });\n };\n this.onInputFocus = ({ target }) => {\n this.icSearchBarFocus.emit({ value: target.value });\n this.showClearButton = true;\n };\n this.handleClearBlur = ({ relatedTarget }) => {\n this.icClearBlur.emit({ relatedTarget });\n this.clearButtonFocused = false;\n };\n this.handleSubmitSearchBlur = ({ relatedTarget }) => {\n this.icSubmitSearchBlur.emit({ relatedTarget });\n this.searchSubmitFocused = false;\n };\n this.setInputValue = (newValue) => {\n if (this.inputEl) {\n const label = getLabelFromValue(newValue, this.options, this.valueField, this.labelField);\n if (label)\n this.inputEl.value = label;\n else if (this.inputEl.value !== newValue) {\n this.inputEl.value = newValue;\n }\n }\n };\n this.handleMouseDown = (ev) => {\n ev.preventDefault();\n };\n this.handleSubmitSearchFocus = () => {\n this.searchSubmitFocused = true;\n };\n this.handleSubmitSearch = () => {\n if (this.highlightedValue)\n this.value = this.highlightedValue;\n this.highlightedValue = undefined;\n this.icSubmitSearch.emit({ value: this.value });\n const form = this.el.closest(\"FORM\");\n if (this.searchSubmitButton && !!form && !this.preventSubmit) {\n handleHiddenFormButtonClick(form, this.searchSubmitButton);\n }\n };\n this.handleSubmitSearchKeyDown = (ev) => {\n if (ev.key === \" \") {\n ev.preventDefault();\n this.handleSubmitSearch();\n }\n };\n this.handleRetry = (ev) => {\n this.retryViaKeyPress = ev.detail.keyPressed === \"Enter\";\n this.icRetryLoad.emit({ value: ev.detail.value });\n this.triggerLoading();\n this.retryButtonClick = true;\n };\n this.triggerLoading = () => {\n const loadingOption = [\n {\n [this.labelField]: this.loadingLabel,\n [this.valueField]: \"\",\n loading: true,\n },\n ];\n if (this.filteredOptions !== loadingOption)\n this.filteredOptions = loadingOption;\n if (this.timeout) {\n this.timeoutTimer = window.setTimeout(() => {\n this.filteredOptions = [\n {\n [this.labelField]: this.loadingErrorLabel,\n [this.valueField]: \"\",\n timedOut: true,\n },\n ];\n }, this.timeout);\n }\n };\n this.handleOptionSelect = (ev) => {\n if (ev.detail.label === this.emptyOptionListText) {\n this.el.setFocus();\n return;\n }\n this.value = ev.detail.value;\n this.icOptionSelect.emit({ value: this.value });\n };\n this.handleMenuOptionHighlight = (ev) => {\n const { optionId } = ev.detail;\n if (optionId)\n this.highlightedValue = optionId.replace(`${this.menuId}-`, \"\");\n this.ariaActiveDescendant = optionId || \"\";\n };\n this.handleMenuChange = (ev) => {\n this.setMenuChange(ev.detail.open);\n if (!ev.detail.open) {\n this.menuCloseFromMenuChangeEvent = true;\n }\n };\n this.setMenuChange = (open) => {\n if (this.open !== open) {\n this.open = open;\n this.icMenuChange.emit({ open });\n }\n };\n this.handleHostFocus = () => {\n if (this.options &&\n (this.value || this.showMenuWithNoInput()) &&\n !this.menuCloseFromMenuChangeEvent) {\n this.setMenuChange(true);\n }\n this.truncateValue = false;\n this.showMenuWithNoInput() && this.debounceAriaLiveUpdate();\n this.icSearchBarFocus.emit();\n };\n this.handleHostBlur = ({ relatedTarget }) => {\n var _a;\n if (this.open &&\n this.options &&\n relatedTarget !== this.menu &&\n !this.retryViaKeyPress &&\n !this.retryButtonClick) {\n this.setMenuChange(false);\n }\n if (this.retryButtonClick || this.retryViaKeyPress) {\n (_a = this.inputEl) === null || _a === void 0 ? void 0 : _a.focus();\n }\n this.showClearButton = false;\n this.menuCloseFromMenuChangeEvent = false;\n this.truncateValue = true;\n this.icSearchBarBlur.emit({\n relatedTarget,\n value: this.value,\n });\n this.retryViaKeyPress = false;\n this.retryButtonClick = false;\n this.showMenuWithNoInput() && this.updateSearchResultAriaLive();\n };\n this.handleFocusClearButton = () => {\n this.clearButtonFocused = true;\n };\n this.renderAssistiveHintEl = () => {\n var _a, _b;\n const input = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(`#${this.inputId}`);\n if (input &&\n Object.keys(input).length > 0 &&\n this.hasOptionsOrFilterDisabled()) {\n this.assistiveHintEl = document.createElement(\"span\");\n this.assistiveHintEl.innerText = this.assistiveHintText;\n this.assistiveHintEl.id = `${this.inputId}-assistive-hint`;\n this.assistiveHintEl.style.display = \"none\";\n (_b = input.after) === null || _b === void 0 ? void 0 : _b.call(input, this.assistiveHintEl);\n }\n };\n this.updateSearchResultAriaLive = () => {\n var _a;\n const searchResultsStatusEl = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(\".search-results-status\");\n if (searchResultsStatusEl) {\n if (!this.open ||\n (this.value === \"\" && !this.showMenuWithNoInput()) ||\n this.value.length < this.charactersUntilSuggestion) {\n searchResultsStatusEl.innerText = \"\";\n }\n else if (this.hasOptionsOrFilterDisabled() &&\n this.filteredOptions.length > 0 &&\n this.open &&\n !this.filteredOptions[0].loading) {\n searchResultsStatusEl.innerText = this.hadNoOptions()\n ? this.emptyOptionListText\n : `${this.filteredOptions.length} result${this.filteredOptions.length > 1 ? \"s\" : \"\"} available`;\n }\n }\n };\n this.hasOptionsOrFilterDisabled = () => this.options.length > 0 || this.disableAutoFiltering;\n this.hadNoOptions = () => this.filteredOptions.length === 1 &&\n this.filteredOptions[0][this.labelField] === this.emptyOptionListText &&\n this.searchMode === \"navigation\";\n this.isSubmitDisabled = () => !this.value ||\n this.value.length < this.charactersUntilSuggestion ||\n this.disabled ||\n this.hadNoOptions() ||\n this.hasTimedOut ||\n this.loading;\n this.showMenuWithNoInput = () => this.charactersUntilSuggestion === 0;\n this.updateSearchButtonType = () => {\n this.searchButtonType =\n !!this.el.closest(\"FORM\") &&\n !this.preventFormSubmitOnSearch\n ? \"submit\"\n : \"button\";\n };\n }\n watchCharactersUntilSuggestionHandler() {\n if (this.showMenuWithNoInput()) {\n this.filteredOptions = this.options;\n }\n }\n watchDisabledHandler() {\n removeDisabledFalse(this.disabled, this.el);\n }\n debounceChanged() {\n this.icChange = debounceEvent(this.icChange, this.debounce);\n }\n loadingHandler(newValue) {\n if (newValue && !this.hasTimedOut) {\n this.preLoad = false;\n this.triggerLoading();\n }\n }\n preventFormSubmitOnSearchHandler() {\n this.updateSearchButtonType();\n }\n filteredOptionsHandler(newOptions) {\n this.hasTimedOut = newOptions.some((opt) => opt.timedOut);\n }\n watchOptionsHandler(newOptions) {\n if (this.disableAutoFiltering) {\n if (!this.hasTimedOut) {\n this.loading = false;\n clearTimeout(this.timeoutTimer);\n if (newOptions.length > 0) {\n this.filteredOptions = newOptions;\n }\n else {\n if (this.hadNoOptions()) {\n return;\n }\n this.setMenuChange(true);\n if (!this.preLoad) {\n this.filteredOptions = [\n {\n [this.labelField]: this.emptyOptionListText,\n [this.valueField]: \"\",\n },\n ];\n }\n this.preLoad = true;\n }\n }\n }\n else if (this.showMenuWithNoInput()) {\n this.filteredOptions = newOptions;\n }\n this.debounceAriaLiveUpdate();\n }\n watchValueHandler(newValue) {\n this.setInputValue(newValue);\n this.icChange.emit({ value: newValue });\n }\n connectedCallback() {\n this.debounceChanged();\n }\n disconnectedCallback() {\n var _a;\n (_a = this.assistiveHintEl) === null || _a === void 0 ? void 0 : _a.remove();\n }\n componentWillLoad() {\n this.setInputValue(this.value);\n removeDisabledFalse(this.disabled, this.el);\n this.updateSearchButtonType();\n }\n componentDidLoad() {\n if (this.focusOnLoad) {\n this.el.setFocus();\n }\n if (this.hasOptionsOrFilterDisabled()) {\n this.renderAssistiveHintEl();\n if (this.disableAutoFiltering || this.showMenuWithNoInput()) {\n this.filteredOptions = this.options;\n }\n }\n onComponentRequiredPropUndefined([{ prop: this.label, propName: \"label\" }], \"Search Bar\");\n }\n componentWillRender() {\n if (this.prevNoOption && this.menu && !this.hasTimedOut) {\n this.menu.handleSetFirstOption();\n this.prevNoOption = false;\n }\n if (this.filteredOptions.find((filteredOption) => filteredOption[this.labelField] === this.emptyOptionListText ||\n filteredOption[this.labelField] === this.loadingErrorLabel ||\n filteredOption[this.labelField] === this.loadingLabel)) {\n this.prevNoOption = true;\n }\n }\n handleKeyDown(event) {\n this.icKeydown.emit({ event });\n if (this.menu && this.open) {\n this.menu.handleKeyboardOpen(event);\n }\n }\n handleKeyUp(ev) {\n if (ev.key === \"Enter\") {\n if (this.preventSubmit || this.isSubmitDisabled()) {\n return;\n }\n this.handleSubmitSearch();\n this.setMenuChange(false);\n }\n if (ev.key === \"Escape\") {\n this.setMenuChange(false);\n }\n if (this.preventSubmit) {\n this.preventSubmit = false;\n }\n }\n /**\n * Sets focus on the native `input`.\n */\n async setFocus() {\n var _a;\n this.retryViaKeyPress = false;\n this.retryButtonClick = false;\n (_a = this.inputEl) === null || _a === void 0 ? void 0 : _a.focus();\n }\n debounceAriaLiveUpdate() {\n clearTimeout(this.debounceAriaLive);\n this.debounceAriaLive = window.setTimeout(() => {\n this.updateSearchResultAriaLive();\n }, 500);\n }\n render() {\n const { inputId, name, label, required, size, placeholder, helperText, disabled, value, readonly, spellcheck, fullWidth, options, open, hideLabel, menuId, ariaActiveDescendant, truncateValue, autofocus, autocapitalize, autocomplete, filteredOptions, theme, charactersUntilSuggestion, labelField, valueField, loadingLabel, loadingErrorLabel, searchMode, showClearButton, searchSubmitFocused, clearButtonFocused, searchButtonType, } = this;\n const disabledMode = readonly || disabled;\n const describedBy = getInputDescribedByText(this.el, inputId, helperText !== \"\", false).trim();\n let describedById = undefined;\n if (describedBy !== \"\" && this.hasOptionsOrFilterDisabled()) {\n describedById = `${describedBy} ${inputId}-assistive-hint`;\n }\n else if (this.hasOptionsOrFilterDisabled()) {\n describedById = `${inputId}-assistive-hint`;\n }\n else if (describedBy !== \"\") {\n describedById = describedBy;\n }\n const hasSuggestedSearch = (!!value || this.showMenuWithNoInput()) &&\n this.hasOptionsOrFilterDisabled();\n const menuOpen = hasSuggestedSearch && open && filteredOptions.length > 0;\n const menuRendered = menuOpen && value.length >= charactersUntilSuggestion;\n const labelValue = getLabelFromValue(value, options, valueField, labelField);\n renderHiddenInput(this.el, value, name, disabledMode);\n return (h(Host, { key: '52cd7f9c675ebb5a73d43d8aba5c564a09975983', class: {\n \"ic-search-bar-search\": true,\n \"ic-search-bar-full-width\": fullWidth,\n \"ic-search-bar-disabled\": disabled,\n \"ic-search-bar-small\": size === \"small\",\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }, onFocus: this.handleHostFocus, onBlur: this.handleHostBlur }, h(\"ic-input-container\", { key: '93f1f86abb836848f4a77e8bea800402a7c3d792', readonly: readonly, disabled: disabledMode }, !hideLabel && (h(\"ic-input-label\", { key: '3408fa52e67fbc9420cb7f763198ea950e356b7e', for: inputId, label: label, helperText: helperText, required: required, disabled: disabledMode && !readonly, readonly: readonly }, h(\"slot\", { key: '24fed7a49fc79140dabb28e1f77c8321bc51729b', name: \"helper-text\", slot: \"helper-text\" }))), h(\"ic-input-component-container\", { key: 'be1083aceb07c1235666cb3f1f9892f8e1b8538d', ref: (el) => (this.anchorEl = el), size: size, disabled: disabledMode, readonly: readonly, fullWidth: fullWidth }, h(\"input\", { key: '4ea2d718f3b6e4e524f534719630c618bb25a4d4', id: inputId, name: name, ref: (el) => (this.inputEl = el), value: options && !!labelValue ? labelValue : value, class: {\n \"no-left-pad\": readonly,\n readonly,\n \"truncate-value\": truncateValue,\n }, placeholder: placeholder, required: required, disabled: disabledMode, readonly: readonly, onInput: this.onInput, onBlur: this.onInputBlur, onFocus: this.onInputFocus, \"aria-label\": hideLabel ? label : undefined, \"aria-activedescendant\": ariaActiveDescendant, \"aria-expanded\": options.length > 0 && menuRendered ? `${menuOpen}` : undefined, \"aria-owns\": menuRendered ? menuId : undefined, \"aria-describedby\": describedById, \"aria-controls\": menuRendered ? menuId : undefined, \"aria-haspopup\": options.length > 0 ? \"listbox\" : undefined, \"aria-autocomplete\": hasSuggestedSearch ? \"list\" : undefined, role: options.length > 0 && menuRendered ? \"combobox\" : undefined, autocomplete: autocomplete, autocapitalize: autocapitalize, autoFocus: autofocus, spellcheck: spellcheck, inputmode: \"search\" }), h(\"div\", { key: '447b4da477637a70ac3f2b9c180df87aebee044b', class: {\n \"clear-button-container\": true,\n \"clear-button-visible\": !!value && !disabledMode && showClearButton,\n } }, h(\"ic-button\", { key: '3a740c60761c034298c1cabf4173a4168a2cbaee', id: \"clear-button\", class: {\n \"clear-button\": true,\n \"clear-button-unfocused\": !clearButtonFocused,\n }, \"aria-label\": \"Clear\", innerHTML: clearIcon, onClick: this.handleClear, onMouseDown: this.handleMouseDown, size: size, onFocus: this.handleFocusClearButton, onBlur: this.handleClearBlur, onKeyDown: this.handleClear, type: \"button\", variant: \"icon\", theme: clearButtonFocused ? \"light\" : \"dark\" }), h(\"div\", { key: '7fec0530f8a21476d808203bc79857a0c44538ab', class: \"divider\" })), h(\"div\", { key: '376a77d494db324f5e469932009692cab51c58fe', class: {\n \"search-submit-button-container\": true,\n \"search-submit-button-disabled\": this.isSubmitDisabled(),\n } }, h(\"ic-button\", { key: 'c94e42dc5907d0e7dc412b8a09792090d4359783', id: \"search-submit-button\", \"aria-label\": \"Search\", ref: (el) => (this.searchSubmitButton = el), class: {\n \"search-submit-button\": true,\n \"search-submit-button-small\": size === \"small\",\n \"search-submit-button-unfocused\": !searchSubmitFocused,\n \"search-submit-button-disabled\": this.isSubmitDisabled(),\n }, disabled: this.isSubmitDisabled(), innerHTML: searchIcon, size: size, onClick: this.handleSubmitSearch, onMouseDown: this.handleMouseDown, onBlur: this.handleSubmitSearchBlur, onFocus: this.handleSubmitSearchFocus, onKeyDown: this.handleSubmitSearchKeyDown, type: searchButtonType, variant: \"icon\", theme: searchSubmitFocused ? \"light\" : \"dark\" }))), h(\"div\", { key: 'd59837a4d8626cb434d74920c3d16ebad1aa38e8', class: {\n \"menu-container\": true,\n fullwidth: fullWidth,\n } }, menuRendered && this.anchorEl && this.inputEl && (h(\"ic-menu\", { key: '05921526c6a5d778689ffaaa00567c155e1d24f9', class: {\n \"no-results\": this.hadNoOptions() ||\n (filteredOptions.length === 1 &&\n (filteredOptions[0][labelField] === loadingLabel ||\n filteredOptions[0][labelField] === loadingErrorLabel)),\n }, activationType: \"manual\", anchorEl: this.anchorEl, autofocusOnSelected: false, searchMode: searchMode, inputEl: this.inputEl, inputLabel: label, ref: (el) => (this.menu = el), fullWidth: fullWidth, menuId: menuId, open: true, options: filteredOptions, onMenuOptionSelect: this.handleOptionSelect, onMenuStateChange: this.handleMenuChange, onMenuOptionId: this.handleMenuOptionHighlight, onRetryButtonClicked: this.handleRetry, parentEl: this.el, value: value, labelField: labelField, valueField: valueField })))), h(\"div\", { key: 'd7ae3fba62207c2df5ce4b02434e81777666d5c2', \"aria-live\": \"polite\", role: \"status\", class: \"search-results-status\" })));\n }\n static get is() { return \"ic-search-bar\"; }\n static get encapsulation() { return \"shadow\"; }\n static get delegatesFocus() { return true; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-search-bar.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-search-bar.css\"]\n };\n }\n static get properties() {\n return {\n \"autocapitalize\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The automatic capitalisation of the text value as it is entered/edited by the user.\\nAvailable options: \\\"off\\\", \\\"none\\\", \\\"on\\\", \\\"sentences\\\", \\\"words\\\", \\\"characters\\\".\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"autocapitalize\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"off\\\"\"\n },\n \"autocomplete\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcAutocompleteTypes\",\n \"resolved\": \"\\\"name\\\" | \\\"on\\\" | \\\"off\\\" | \\\"honorific-prefix\\\" | \\\"given-name\\\" | \\\"additional-name\\\" | \\\"family-name\\\" | \\\"honorific-suffix\\\" | \\\"nickname\\\" | \\\"email\\\" | \\\"username\\\" | \\\"new-password\\\" | \\\"current-password\\\" | \\\"one-time-code\\\" | \\\"organization-title\\\" | \\\"organization\\\" | \\\"street-address\\\" | \\\"address-line1\\\" | \\\"address-line2\\\" | \\\"address-line3\\\" | \\\"address-level4\\\" | \\\"address-level3\\\" | \\\"address-level2\\\" | \\\"address-level1\\\" | \\\"country\\\" | \\\"country-name\\\" | \\\"postal-code\\\" | \\\"cc-name\\\" | \\\"cc-given-name\\\" | \\\"cc-additional-name\\\" | \\\"cc-family-name\\\" | \\\"cc-number\\\" | \\\"cc-exp\\\" | \\\"cc-exp-month\\\" | \\\"cc-exp-year\\\" | \\\"cc-csc\\\" | \\\"cc-type\\\" | \\\"transaction-currency\\\" | \\\"transaction-amount\\\" | \\\"language\\\" | \\\"bday\\\" | \\\"bday-day\\\" | \\\"bday-month\\\" | \\\"bday-year\\\" | \\\"sex\\\" | \\\"tel\\\" | \\\"tel-country-code\\\" | \\\"tel-national\\\" | \\\"tel-area-code\\\" | \\\"tel-local\\\" | \\\"tel-extension\\\" | \\\"impp\\\" | \\\"url\\\" | \\\"photo\\\"\",\n \"references\": {\n \"IcAutocompleteTypes\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcAutocompleteTypes\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The state of autocompletion the browser can apply on the text value.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"autocomplete\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"off\\\"\"\n },\n \"autocorrect\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcAutocorrectStates\",\n \"resolved\": \"\\\"off\\\" | \\\"on\\\"\",\n \"references\": {\n \"IcAutocorrectStates\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcAutocorrectStates\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The state of autocorrection the browser can apply when the user is entering/editing the text value.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"autocorrect\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"off\\\"\"\n },\n \"autofocus\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the form control will have input focus when the page loads.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"autofocus\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"charactersUntilSuggestion\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The number of characters until suggestions appear. The submit button will be disabled until the inputted value is equal to or greater than this number.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"characters-until-suggestion\",\n \"reflect\": false,\n \"defaultValue\": \"2\"\n },\n \"disabled\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the disabled state will be set.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"disabled\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"disableAutoFiltering\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Specify whether to disable the built in filtering. For example, if options will already be filtered from external source.\\nIf `true`, all options provided will be displayed.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"disable-auto-filtering\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"debounce\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The amount of time, in milliseconds, to wait to trigger the `icChange` event after each keystroke.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"debounce\",\n \"reflect\": false,\n \"defaultValue\": \"0\"\n },\n \"emptyOptionListText\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The text displayed when there are no options in the option list.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"empty-option-list-text\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"No results found\\\"\"\n },\n \"focusOnLoad\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the search bar will be focused when component loaded.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"focus-on-load\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"fullWidth\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Specify whether the search bar fills the full width of the container.\\nIf `true`, this overrides the --input-width CSS variable.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"full-width\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"helperText\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The helper text that will be displayed for additional field guidance.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"helper-text\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"\\\"\"\n },\n \"hideLabel\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the label will be hidden and the required label value will be applied as an aria-label.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"hide-label\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"assistiveHintText\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The hint text for the hidden assistive description element.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"assistive-hint-text\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"When autocomplete results are available use the up and down arrows to choose and press enter to select\\\"\"\n },\n \"label\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": true,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The label for the search bar.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"label\",\n \"reflect\": false\n },\n \"labelField\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The custom name for the label field to correspond with the IcMenuOption type.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"label-field\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"label\\\"\"\n },\n \"loading\": {\n \"type\": \"boolean\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Trigger loading state when fetching options asynchronously\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"loading\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"loadingErrorLabel\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Change the message displayed when external loading times out.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"loading-error-label\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"Loading Error\\\"\"\n },\n \"loadingLabel\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Change the message displayed whilst the options are being loaded externally.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"loading-label\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"Loading...\\\"\"\n },\n \"name\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The name of the control, which is submitted with the form data.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"name\",\n \"reflect\": false,\n \"defaultValue\": \"this.inputId\"\n },\n \"placeholder\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The placeholder value to display.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"placeholder\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"Search\\\"\"\n },\n \"preventFormSubmitOnSearch\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true` the parent form will not submit when the icSubmitSearch event fires.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"prevent-form-submit-on-search\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"readonly\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the readonly state will be set.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"readonly\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"required\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the search bar will require a value.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"required\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"searchMode\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcSearchBarSearchModes\",\n \"resolved\": \"\\\"navigation\\\" | \\\"query\\\"\",\n \"references\": {\n \"IcSearchBarSearchModes\": {\n \"location\": \"import\",\n \"path\": \"./ic-search-bar.types\",\n \"id\": \"src/components/ic-search-bar/ic-search-bar.types.ts::IcSearchBarSearchModes\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Specify the mode search bar uses to search. `navigation` allows for quick lookups of a set of values, `query` allows for more general searches.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"search-mode\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"navigation\\\"\"\n },\n \"size\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcSizesNoLarge\",\n \"resolved\": \"\\\"medium\\\" | \\\"small\\\"\",\n \"references\": {\n \"IcSizesNoLarge\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcSizesNoLarge\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The size of the search bar component.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"size\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"medium\\\"\"\n },\n \"spellcheck\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the value of the search will have its spelling and grammar checked.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"spellcheck\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"theme\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcThemeMode\",\n \"resolved\": \"\\\"dark\\\" | \\\"inherit\\\" | \\\"light\\\"\",\n \"references\": {\n \"IcThemeMode\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcThemeMode\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Sets the theme color to the dark or light theme color. \\\"inherit\\\" will set the color based on the system settings or ic-theme component.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"theme\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"inherit\\\"\"\n },\n \"timeout\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number | undefined\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If using external filtering, set a timeout for when loading takes too long.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"timeout\",\n \"reflect\": false\n },\n \"valueField\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The custom name for the value field to correspond with the IcMenuOption type.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"value-field\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"value\\\"\"\n },\n \"options\": {\n \"type\": \"unknown\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcMenuOption[]\",\n \"resolved\": \"IcMenuOption[]\",\n \"references\": {\n \"IcMenuOption\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcMenuOption\"\n }\n }\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The suggested search options.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"defaultValue\": \"[]\"\n },\n \"value\": {\n \"type\": \"string\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The value of the search input.\"\n },\n \"getter\": false,\n \"setter\": false,\n \"attribute\": \"value\",\n \"reflect\": true,\n \"defaultValue\": \"\\\"\\\"\"\n }\n };\n }\n static get states() {\n return {\n \"ariaActiveDescendant\": {},\n \"clearButtonFocused\": {},\n \"highlightedValue\": {},\n \"open\": {},\n \"searchSubmitFocused\": {},\n \"showClearButton\": {},\n \"searchButtonType\": {},\n \"filteredOptions\": {}\n };\n }\n static get events() {\n return [{\n \"method\": \"icChange\",\n \"name\": \"icChange\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when the value has changed.\"\n },\n \"complexType\": {\n \"original\": \"IcValueEventDetail\",\n \"resolved\": \"IcValueEventDetail\",\n \"references\": {\n \"IcValueEventDetail\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcValueEventDetail\"\n }\n }\n }\n }, {\n \"method\": \"icClear\",\n \"name\": \"icClear\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when value is cleared with clear button\"\n },\n \"complexType\": {\n \"original\": \"void\",\n \"resolved\": \"void\",\n \"references\": {}\n }\n }, {\n \"method\": \"icInput\",\n \"name\": \"icInput\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when a keyboard input occurred.\"\n },\n \"complexType\": {\n \"original\": \"IcValueEventDetail\",\n \"resolved\": \"IcValueEventDetail\",\n \"references\": {\n \"IcValueEventDetail\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcValueEventDetail\"\n }\n }\n }\n }, {\n \"method\": \"icOptionSelect\",\n \"name\": \"icOptionSelect\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when option is highlighted within the menu\"\n },\n \"complexType\": {\n \"original\": \"IcOptionSelectEventDetail\",\n \"resolved\": \"IcOptionSelectEventDetail\",\n \"references\": {\n \"IcOptionSelectEventDetail\": {\n \"location\": \"import\",\n \"path\": \"../ic-menu/ic-menu.types\",\n \"id\": \"src/components/ic-menu/ic-menu.types.ts::IcOptionSelectEventDetail\"\n }\n }\n }\n }, {\n \"method\": \"icMenuChange\",\n \"name\": \"icMenuChange\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when the state of the menu changes (i.e. open or close)\"\n },\n \"complexType\": {\n \"original\": \"IcMenuChangeEventDetail\",\n \"resolved\": \"IcMenuChangeEventDetail\",\n \"references\": {\n \"IcMenuChangeEventDetail\": {\n \"location\": \"import\",\n \"path\": \"../ic-menu/ic-menu.types\",\n \"id\": \"src/components/ic-menu/ic-menu.types.ts::IcMenuChangeEventDetail\"\n }\n }\n }\n }, {\n \"method\": \"icClearBlur\",\n \"name\": \"icClearBlur\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"- Emitted when blur is invoked from clear button\"\n }],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"IcBlurEventDetail\",\n \"resolved\": \"IcBlurEventDetail\",\n \"references\": {\n \"IcBlurEventDetail\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcBlurEventDetail\"\n }\n }\n }\n }, {\n \"method\": \"icRetryLoad\",\n \"name\": \"icRetryLoad\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when the 'retry loading' button is clicked\"\n },\n \"complexType\": {\n \"original\": \"IcMultiValueEventDetail\",\n \"resolved\": \"IcMultiValueEventDetail\",\n \"references\": {\n \"IcMultiValueEventDetail\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcMultiValueEventDetail\"\n }\n }\n }\n }, {\n \"method\": \"icSubmitSearch\",\n \"name\": \"icSubmitSearch\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when the search value has been submitted\"\n },\n \"complexType\": {\n \"original\": \"IcValueEventDetail\",\n \"resolved\": \"IcValueEventDetail\",\n \"references\": {\n \"IcValueEventDetail\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcValueEventDetail\"\n }\n }\n }\n }, {\n \"method\": \"icSubmitSearchBlur\",\n \"name\": \"icSubmitSearchBlur\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"- Emitted when blur is invoked from search submit button\"\n }],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"IcBlurEventDetail\",\n \"resolved\": \"IcBlurEventDetail\",\n \"references\": {\n \"IcBlurEventDetail\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcBlurEventDetail\"\n }\n }\n }\n }, {\n \"method\": \"icSearchBarBlur\",\n \"name\": \"icSearchBarBlur\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when blur is invoked from ic-search-bar\"\n },\n \"complexType\": {\n \"original\": \"IcSearchBarBlurEventDetail\",\n \"resolved\": \"IcSearchBarBlurEventDetail\",\n \"references\": {\n \"IcSearchBarBlurEventDetail\": {\n \"location\": \"import\",\n \"path\": \"./ic-search-bar.types\",\n \"id\": \"src/components/ic-search-bar/ic-search-bar.types.ts::IcSearchBarBlurEventDetail\"\n }\n }\n }\n }, {\n \"method\": \"icSearchBarFocus\",\n \"name\": \"icSearchBarFocus\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when focus is invoked from ic-search-bar\"\n },\n \"complexType\": {\n \"original\": \"IcValueEventDetail\",\n \"resolved\": \"IcValueEventDetail\",\n \"references\": {\n \"IcValueEventDetail\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcValueEventDetail\"\n }\n }\n }\n }, {\n \"method\": \"icKeydown\",\n \"name\": \"icKeydown\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when a keydown event occurred.\"\n },\n \"complexType\": {\n \"original\": \"{ event: KeyboardEvent }\",\n \"resolved\": \"{ event: KeyboardEvent; }\",\n \"references\": {\n \"KeyboardEvent\": {\n \"location\": \"global\",\n \"id\": \"global::KeyboardEvent\"\n }\n }\n }\n }];\n }\n static get methods() {\n return {\n \"setFocus\": {\n \"complexType\": {\n \"signature\": \"() => Promise<void>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"Sets focus on the native `input`.\",\n \"tags\": []\n }\n }\n };\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"charactersUntilSuggestion\",\n \"methodName\": \"watchCharactersUntilSuggestionHandler\"\n }, {\n \"propName\": \"disabled\",\n \"methodName\": \"watchDisabledHandler\"\n }, {\n \"propName\": \"debounce\",\n \"methodName\": \"debounceChanged\"\n }, {\n \"propName\": \"loading\",\n \"methodName\": \"loadingHandler\"\n }, {\n \"propName\": \"preventFormSubmitOnSearch\",\n \"methodName\": \"preventFormSubmitOnSearchHandler\"\n }, {\n \"propName\": \"filteredOptions\",\n \"methodName\": \"filteredOptionsHandler\"\n }, {\n \"propName\": \"options\",\n \"methodName\": \"watchOptionsHandler\"\n }, {\n \"propName\": \"value\",\n \"methodName\": \"watchValueHandler\"\n }];\n }\n static get listeners() {\n return [{\n \"name\": \"keydown\",\n \"method\": \"handleKeyDown\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }, {\n \"name\": \"keyup\",\n \"method\": \"handleKeyUp\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }];\n }\n}\n//# sourceMappingURL=ic-search-bar.js.map\n"],"mappings":"6tCAAA,MAAMA,EAAiB,stMACvB,MAAAC,EAAeD,ECGf,IAAIE,EAAW,E,MAKFC,EAAS,MAClB,WAAAC,CAAAC,G,0gBACIC,KAAKC,YAAc,MACnBD,KAAKE,QAAU,uBAAuBN,MACtCI,KAAKG,6BAA+B,MACpCH,KAAKI,O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BAAsBnN,KAAKgG,YAAaoH,SAAUpN,KAAK2D,GAAId,MAAOA,EAAOhB,WAAYA,EAAYa,WAAYA,MAAkB+I,EAAE,MAAO,CAAE1F,IAAK,2CAA4C,YAAa,SAAUmG,KAAM,SAAUP,MAAO,0B,CAIvnB,yBAAW0B,GAAmB,OAAO,IAAK,C","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- import{r as i,h as e,H as t,g as s}from"./p-8e4e97b4.js";import{q as a,D as h,t as c,i as r,f as n,a as o}from"./p-e253a857.js";const l=':host{display:block;width:var(--tree-view-width, 100%);background-color:var(--ic-tree-view-background)}:host .heading-area-container{border-bottom:var(--ic-space-1px) solid var(--ic-tree-view-divider);display:flex;align-items:center;min-height:calc(\n var(--ic-space-xl) + var(--ic-space-xs) - var(--ic-space-1px)\n );padding:0 var(--ic-space-xs);--ic-typography-color:var(--ic-tree-view-text)}:host(.ic-tree-view-small) .heading-area-container{min-height:calc(var(--ic-space-xl) - var(--ic-space-1px))}:host(.ic-tree-view-large) .heading-area-container{min-height:calc(var(--ic-space-xxl) - var(--ic-space-1px))}:host(.ic-tree-view-truncate) .heading-area-container{height:calc(var(--ic-space-xl) + var(--ic-space-xs) - var(--ic-space-1px))}:host(.ic-tree-view-truncate.ic-tree-view-small) .heading-area-container{height:calc(var(--ic-space-xl) - var(--ic-space-1px))}:host(.ic-tree-view-truncate.ic-tree-view-large) .heading-area-container{height:calc(var(--ic-space-xxl) - var(--ic-space-1px))}.icon-container{width:var(--ic-space-lg);min-width:var(--ic-space-lg);height:var(--ic-space-lg);margin:0 var(--ic-space-xs) 0 0}:host(.ic-tree-view-small) .icon-container{margin:0 var(--ic-space-xxs) 0 0}.ic-text-overflow{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.ic-tooltip-overflow{overflow:hidden}.tree-view-header.with-padding{padding-right:var(--ic-space-xs)}.tree-items-container-hidden{visibility:hidden}::slotted([slot="icon"]){fill:var(--ic-tree-view-icon)}@media (forced-colors: active){::slotted([slot="icon"]){fill:currentcolor}}';const d=l;var v=undefined&&undefined.__rest||function(i,e){var t={};for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s)&&e.indexOf(s)<0)t[s]=i[s];if(i!=null&&typeof Object.getOwnPropertySymbols==="function")for(var a=0,s=Object.getOwnPropertySymbols(i);a<s.length;a++){if(e.indexOf(s[a])<0&&Object.prototype.propertyIsEnumerable.call(i,s[a]))t[s[a]]=i[s[a]]}return t};let f=0;const p=class{constructor(e){i(this,e);this.treeViewId=`ic-tree-view-${f++}`;this.treeItemTag="IC-TREE-ITEM";this.hostMutationObserver=null;this.isLoaded=false;this.resizeObserver=null;this.TOOLTIP="ic-tooltip";this.previousTruncateHeading=false;this.previousTruncateTreeItems=false;this.smallDevice=false;this.heading="";this.size="medium";this.theme="inherit";this.treeItemData=[];this.truncateHeading=false;this.truncateTreeItems=false;this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{const i=a()<=h.S;if(this.smallDevice!==i)this.smallDevice=i}));this.resizeObserver.observe(document.body)};this.removeTruncation=()=>{this.truncateHeading=false;this.truncateTreeItems=false};this.handleKeyDown=i=>{var e,t;const s=this.treeItems.indexOf(this.treeItems.filter((i=>i===document.activeElement))[0]);const a=(e=this.treeItems[s])===null||e===void 0?void 0:e.expanded;switch(i.key){case"ArrowDown":this.treeItems[this.getNextItemToSelect(s,true)].setFocus();if(s!==this.treeItems.length-1){i.preventDefault()}break;case"ArrowUp":this.treeItems[this.getNextItemToSelect(s,false)].setFocus();if(s!==0){i.preventDefault()}break;case"ArrowRight":if(this.treeItems[s].isParent&&!a){this.treeItems[s].expanded=true;this.treeItems[s].hasParentExpanded=true;this.treeItems[s].updateAriaLabel()}else if(this.treeItems[s].isParent&&a){this.treeItems[s].children[0].setFocus()}i.preventDefault();break;case"ArrowLeft":if(this.treeItems[s].isParent&&a){this.treeItems[s].expanded=false;this.treeItems[s].hasParentExpanded=false;this.treeItems[s].updateAriaLabel()}else if(((t=this.treeItems[s].parentElement)===null||t===void 0?void 0:t.tagName)===this.treeItemTag){this.treeItems[s].parentElement.setFocus()}i.preventDefault();break}};this.getNextItemToSelect=(i,e)=>{var t;const s=this.treeItems.length-1;if(i<1){i=0}let a=e?i+1:i-1;if(a<0){a=0}else if(a>s){a=s}const h=s+1;let c=0;while(c<h){if(a<0||a>s){return i}if(((t=this.treeItems[a].parentElement)===null||t===void 0?void 0:t.tagName)!==this.treeItemTag||this.treeItems[a].parentElement.expanded&&this.treeItems[a].offsetHeight>0){return a}if(a===s&&this.treeItems[a].disabled){return i}a=e?a+1:a-1;c++}return i};this.linkTreeItems=()=>{this.treeItems.forEach((i=>{i.setAttribute("context-id",this.treeViewId)}))};this.setTreeItems=()=>{this.treeItems=this.getAllTreeItems(this.el);this.linkTreeItems()};this.addSlotChangeListener=()=>{this.el.addEventListener("slotchange",this.setTreeItems)};this.truncateTreeViewHeading=()=>{var i,e;const t=(i=this.el.shadowRoot)===null||i===void 0?void 0:i.querySelector(".tree-view-header");const s=t===null||t===void 0?void 0:t.closest(this.TOOLTIP);const a=(e=this.el.shadowRoot)===null||e===void 0?void 0:e.querySelector(".heading-area-container");if(t&&a&&t.scrollHeight>a.clientHeight){t.classList.add("ic-text-overflow");if(!s){const i=document.createElement("ic-tooltip");i.setAttribute("target",this.el.id);i.setAttribute("label",t.textContent);i.classList.add("ic-tooltip-overflow");i.setAttribute("placement","right");a.appendChild(i);i.appendChild(t)}}};this.removeHeadingTruncation=()=>{var i,e,t;const s=(i=this.el.shadowRoot)===null||i===void 0?void 0:i.querySelector(".tree-view-header");const a=s===null||s===void 0?void 0:s.closest(this.TOOLTIP);if(a&&s){s.classList.remove("ic-text-overflow");(t=(e=this.el.shadowRoot)===null||e===void 0?void 0:e.querySelector(".heading-area-container"))===null||t===void 0?void 0:t.replaceChild(s,a)}};this.isHeadingDefined=()=>c(this.heading)&&this.heading!==null;this.hasHeadingAreaContent=()=>r(this.el,"heading")||this.isHeadingDefined()||r(this.el,"icon")}watchSmallDeviceHandler(){if(this.smallDevice){this.previousTruncateHeading=this.truncateHeading;this.previousTruncateTreeItems=this.truncateTreeItems;this.removeTruncation()}else{this.truncateHeading=this.previousTruncateHeading;this.truncateTreeItems=this.previousTruncateTreeItems}}watchSizeHandler(){this.treeItems.forEach((i=>{i.size=this.size}))}watchThemeHandler(){this.treeItems.forEach((i=>{i.theme=this.theme}))}watchTreeItemOptionsHandler(){this.setTreeItems()}watchTruncateTreeItemsHandler(){this.treeItems.forEach((i=>{if(this.smallDevice){i.previousTruncateTreeItem=i.truncateTreeItem;i.truncateTreeItem=this.truncateTreeItems}else{i.truncateTreeItem=i.previousTruncateTreeItem}}))}disconnectedCallback(){var i,e,t;(i=this.el)===null||i===void 0?void 0:i.removeEventListener("slotchange",this.setTreeItems);(e=this.hostMutationObserver)===null||e===void 0?void 0:e.disconnect();(t=this.resizeObserver)===null||t===void 0?void 0:t.disconnect()}componentWillLoad(){this.setTreeItems();this.previousTruncateHeading=this.truncateHeading;this.previousTruncateTreeItems=this.truncateTreeItems;n(this.runResizeObserver);this.watchSizeHandler();this.watchThemeHandler();this.treeItems.forEach((i=>{if(i.truncateTreeItem===undefined){i.truncateTreeItem=this.truncateTreeItems}}))}componentDidRender(){this.truncateHeading?this.truncateTreeViewHeading():this.removeHeadingTruncation()}componentDidLoad(){this.addSlotChangeListener();this.hostMutationObserver=new MutationObserver((i=>o(i,"icon",this)));this.hostMutationObserver.observe(this.el,{childList:true});this.isLoaded=true}handleTreeItemSelected(i){this.treeItems.forEach((e=>{if(e.selected&&e.id!==i.detail.id){e.selected=false}}))}getAllTreeItems(i){const e=[];const t=i=>{Array.from(i.children).forEach((i=>{if(i.tagName===this.treeItemTag){e.push(i)}t(i)}))};const s=(i,t)=>{Array.from(t.children).forEach((i=>{if(i.tagName===this.treeItemTag){t.removeChild(i)}}));i.forEach((i=>{const a=document.createElement(this.treeItemTag);const{children:h,icon:c}=i,r=v(i,["children","icon"]);Object.assign(a,r);if(c){const i=document.createElement("div");i.setAttribute("slot","icon");i.innerHTML=c;a.appendChild(i)}t.appendChild(a);e.push(a);if(h&&h.length>0){s(h,a)}}))};if(this.treeItemData.length>0){s(this.treeItemData,i)}else{t(i)}return e}render(){const{heading:i,isLoaded:s,size:a,theme:h,truncateHeading:c}=this;return e(t,{key:"10d73dbe1cf5483e085e42098719cf24546964a7","context-id":this.treeViewId,class:{[`ic-tree-view-${a}`]:a!=="medium",[`ic-theme-${h}`]:h!=="inherit","ic-tree-view-truncate":c},onKeyDown:this.handleKeyDown,"aria-label":this.isHeadingDefined()?i:null},this.hasHeadingAreaContent()&&e("div",{key:"037b388be0d0346b060f5f277e20a6c389f5b618",class:"heading-area-container"},r(this.el,"icon")&&e("div",{key:"5d388bd69d7ced75435399e66a3cd28e6b4d7c8e",class:"icon-container"},e("slot",{key:"6baa9d4d0ea215d64e5978d4bb3ad1ea96d0b23b",name:"icon"})),e("ic-typography",{key:"8ed1a2b54949c4333c9647e3eb28cf58d968af61",variant:"subtitle-large",class:{"tree-view-header":true,"with-padding":this.truncateHeading&&!s}},r(this.el,"heading")?e("slot",{name:"heading"}):i)),e("slot",{key:"fa3be8905fce45ae60e2b6634487b9cee208913d"}))}get el(){return s(this)}static get watchers(){return{smallDevice:["watchSmallDeviceHandler"],size:["watchSizeHandler"],theme:["watchThemeHandler"],treeItemData:["watchTreeItemOptionsHandler"],truncateTreeItems:["watchTruncateTreeItemsHandler"]}}};p.style=d;export{p as ic_tree_view};
2
- //# sourceMappingURL=p-5f8b09e4.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["icTreeViewCss","IcTreeViewStyle0","treeViewIds","TreeView","constructor","hostRef","this","treeViewId","treeItemTag","hostMutationObserver","isLoaded","resizeObserver","TOOLTIP","previousTruncateHeading","previousTruncateTreeItems","smallDevice","heading","size","theme","treeItemData","truncateHeading","truncateTreeItems","runResizeObserver","ResizeObserver","isSmallDevice","getCurrentDeviceSize","DEVICE_SIZES","S","observe","document","body","removeTruncation","handleKeyDown","event","focussedChild","treeItems","indexOf","filter","el","activeElement","expanded","_a","key","getNextItemToSelect","setFocus","length","preventDefault","isParent","hasParentExpanded","updateAriaLabel","children","_b","parentElement","tagName","currentItem","movingDown","numItems","nextItem","maxAttempts","attempts","offsetHeight","disabled","linkTreeItems","forEach","treeItem","setAttribute","setTreeItems","getAllTreeItems","addSlotChangeListener","addEventListener","truncateTreeViewHeading","typographyEl","shadowRoot","querySelector","tooltip","closest","headingContainer","scrollHeight","clientHeight","classList","add","tooltipEl","createElement","id","textContent","appendChild","removeHeadingTruncation","remove","_c","replaceChild","isHeadingDefined","isPropDefined","hasHeadingAreaContent","isSlotUsed","watchSmallDeviceHandler","watchSizeHandler","watchThemeHandler","watchTreeItemOptionsHandler","watchTruncateTreeItemsHandler","previousTruncateTreeItem","truncateTreeItem","disconnectedCallback","removeEventListener","disconnect","componentWillLoad","checkResizeObserver","undefined","componentDidRender","componentDidLoad","MutationObserver","mutationList","renderDynamicChildSlots","childList","handleTreeItemSelected","selected","detail","element","collectTreeItemsFromSlottedContent","Array","from","child","push","collectTreeItemsFromData","items","removeChild","item","icon","props","__rest","Object","assign","iconSlot","innerHTML","render","h","Host","class","onKeyDown","name","variant"],"sources":["src/components/ic-tree-view/ic-tree-view.css?tag=ic-tree-view&encapsulation=shadow","src/components/ic-tree-view/ic-tree-view.tsx"],"sourcesContent":["/**\n* @prop --tree-view-width: Width of the tree view\n*/\n\n:host {\n display: block;\n width: var(--tree-view-width, 100%);\n background-color: var(--ic-tree-view-background);\n}\n\n:host .heading-area-container {\n border-bottom: var(--ic-space-1px) solid var(--ic-tree-view-divider);\n display: flex;\n align-items: center;\n min-height: calc(\n var(--ic-space-xl) + var(--ic-space-xs) - var(--ic-space-1px)\n );\n padding: 0 var(--ic-space-xs);\n\n --ic-typography-color: var(--ic-tree-view-text);\n}\n\n:host(.ic-tree-view-small) .heading-area-container {\n min-height: calc(var(--ic-space-xl) - var(--ic-space-1px));\n}\n\n:host(.ic-tree-view-large) .heading-area-container {\n min-height: calc(var(--ic-space-xxl) - var(--ic-space-1px));\n}\n\n:host(.ic-tree-view-truncate) .heading-area-container {\n height: calc(var(--ic-space-xl) + var(--ic-space-xs) - var(--ic-space-1px));\n}\n\n:host(.ic-tree-view-truncate.ic-tree-view-small) .heading-area-container {\n height: calc(var(--ic-space-xl) - var(--ic-space-1px));\n}\n\n:host(.ic-tree-view-truncate.ic-tree-view-large) .heading-area-container {\n height: calc(var(--ic-space-xxl) - var(--ic-space-1px));\n}\n\n.icon-container {\n width: var(--ic-space-lg);\n min-width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n margin: 0 var(--ic-space-xs) 0 0;\n}\n\n:host(.ic-tree-view-small) .icon-container {\n margin: 0 var(--ic-space-xxs) 0 0;\n}\n\n.ic-text-overflow {\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n}\n\n.ic-tooltip-overflow {\n overflow: hidden;\n}\n\n/* Ensures truncation works - accounts for text width increase as component hydrates */\n.tree-view-header.with-padding {\n padding-right: var(--ic-space-xs);\n}\n\n.tree-items-container-hidden {\n visibility: hidden;\n}\n\n::slotted([slot=\"icon\"]) {\n fill: var(--ic-tree-view-icon);\n}\n\n/** High Contrast **/\n@media (forced-colors: active) {\n ::slotted([slot=\"icon\"]) {\n fill: currentcolor;\n }\n}\n","import {\n Component,\n h,\n Prop,\n Element,\n Host,\n Watch,\n State,\n Listen,\n} from \"@stencil/core\";\nimport { IcSizes, IcThemeMode } from \"../../utils/types\";\nimport {\n checkResizeObserver,\n DEVICE_SIZES,\n getCurrentDeviceSize,\n isPropDefined,\n isSlotUsed,\n renderDynamicChildSlots,\n} from \"../../utils/helpers\";\nimport { IcTreeItemOptions } from \"./ic-tree-view.types\";\n\nlet treeViewIds = 0;\n\n/**\n * @slot heading - Content is set as the tree view heading.\n * @slot icon - Content is placed to the left of the heading.\n */\n\n@Component({\n tag: \"ic-tree-view\",\n styleUrl: \"ic-tree-view.css\",\n shadow: true,\n})\nexport class TreeView {\n private treeViewId = `ic-tree-view-${treeViewIds++}`;\n private treeItemTag = \"IC-TREE-ITEM\";\n private hostMutationObserver: MutationObserver | null = null;\n private isLoaded = false;\n private resizeObserver: ResizeObserver | null = null;\n private TOOLTIP = \"ic-tooltip\";\n\n private previousTruncateHeading: boolean = false;\n private previousTruncateTreeItems: boolean = false;\n\n @Element() el: HTMLIcTreeViewElement;\n\n @State() smallDevice: boolean = false;\n @Watch(\"smallDevice\")\n watchSmallDeviceHandler(): void {\n if (this.smallDevice) {\n this.previousTruncateHeading = this.truncateHeading;\n this.previousTruncateTreeItems = this.truncateTreeItems;\n this.removeTruncation();\n } else {\n this.truncateHeading = this.previousTruncateHeading;\n this.truncateTreeItems = this.previousTruncateTreeItems;\n }\n }\n\n @State() treeItems: HTMLIcTreeItemElement[];\n\n /**\n * The heading of the tree view.\n */\n @Prop() heading: string = \"\";\n\n /**\n * The size of the tree view.\n */\n @Prop() size?: IcSizes = \"medium\";\n @Watch(\"size\")\n watchSizeHandler(): void {\n this.treeItems.forEach((treeItem) => {\n treeItem.size = this.size;\n });\n }\n\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme?: IcThemeMode = \"inherit\";\n @Watch(\"theme\")\n watchThemeHandler(): void {\n this.treeItems.forEach((treeItem) => {\n treeItem.theme = this.theme;\n });\n }\n\n /**\n * The content within the tree view tree items. This will take precedence over slotted content.\n * */\n @Prop() treeItemData: IcTreeItemOptions[] = [];\n @Watch(\"treeItemData\")\n watchTreeItemOptionsHandler(): void {\n this.setTreeItems();\n }\n\n /**\n * If `true`, the tree view heading will be truncated instead of text wrapping.\n * When used on small devices, this prop will be overridden and headings will be set to text-wrap.\n */\n @Prop({ mutable: true }) truncateHeading: boolean = false;\n\n /**\n * If `true`, tree items will be truncated, unless they are individually overridden.\n * When used on small devices, this prop will be overridden and tree-items will be set to text-wrap.\n */\n @Prop({ mutable: true }) truncateTreeItems: boolean = false;\n @Watch(\"truncateTreeItems\")\n watchTruncateTreeItemsHandler(): void {\n this.treeItems.forEach((treeItem) => {\n if (this.smallDevice) {\n treeItem.previousTruncateTreeItem = treeItem.truncateTreeItem;\n treeItem.truncateTreeItem = this.truncateTreeItems;\n } else {\n treeItem.truncateTreeItem = treeItem.previousTruncateTreeItem;\n }\n });\n }\n\n disconnectedCallback(): void {\n this.el?.removeEventListener(\"slotchange\", this.setTreeItems);\n\n this.hostMutationObserver?.disconnect();\n this.resizeObserver?.disconnect();\n }\n componentWillLoad(): void {\n this.setTreeItems();\n\n this.previousTruncateHeading = this.truncateHeading;\n this.previousTruncateTreeItems = this.truncateTreeItems;\n\n checkResizeObserver(this.runResizeObserver);\n\n this.watchSizeHandler();\n this.watchThemeHandler();\n this.treeItems.forEach((treeItem) => {\n if (treeItem.truncateTreeItem === undefined) {\n treeItem.truncateTreeItem = this.truncateTreeItems;\n }\n });\n }\n\n componentDidRender(): void {\n this.truncateHeading\n ? this.truncateTreeViewHeading()\n : this.removeHeadingTruncation();\n }\n\n componentDidLoad(): void {\n this.addSlotChangeListener();\n\n this.hostMutationObserver = new MutationObserver((mutationList) =>\n renderDynamicChildSlots(mutationList, \"icon\", this)\n );\n this.hostMutationObserver.observe(this.el, {\n childList: true,\n });\n\n this.isLoaded = true;\n }\n\n @Listen(\"icTreeItemSelected\")\n handleTreeItemSelected(event: CustomEvent): void {\n this.treeItems.forEach((treeItem) => {\n if (treeItem.selected && treeItem.id !== event.detail.id) {\n treeItem.selected = false;\n }\n });\n }\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n const isSmallDevice = getCurrentDeviceSize() <= DEVICE_SIZES.S;\n if (this.smallDevice !== isSmallDevice) this.smallDevice = isSmallDevice;\n });\n\n this.resizeObserver.observe(document.body);\n };\n\n private removeTruncation = (): void => {\n this.truncateHeading = false;\n this.truncateTreeItems = false;\n };\n\n private handleKeyDown = (event: KeyboardEvent): void => {\n const focussedChild = this.treeItems.indexOf(\n this.treeItems.filter((el) => el === document.activeElement)[0]\n );\n const expanded = this.treeItems[focussedChild]?.expanded;\n switch (event.key) {\n case \"ArrowDown\":\n this.treeItems[\n this.getNextItemToSelect(focussedChild, true)\n ].setFocus();\n if (focussedChild !== this.treeItems.length - 1) {\n event.preventDefault();\n }\n break;\n case \"ArrowUp\":\n this.treeItems[\n this.getNextItemToSelect(focussedChild, false)\n ].setFocus();\n if (focussedChild !== 0) {\n event.preventDefault();\n }\n break;\n case \"ArrowRight\":\n if (this.treeItems[focussedChild].isParent && !expanded) {\n this.treeItems[focussedChild].expanded = true;\n this.treeItems[focussedChild].hasParentExpanded = true;\n this.treeItems[focussedChild].updateAriaLabel();\n } else if (this.treeItems[focussedChild].isParent && expanded) {\n (\n this.treeItems[focussedChild].children[0] as HTMLIcTreeItemElement\n ).setFocus();\n }\n event.preventDefault();\n break;\n case \"ArrowLeft\":\n if (this.treeItems[focussedChild].isParent && expanded) {\n this.treeItems[focussedChild].expanded = false;\n this.treeItems[focussedChild].hasParentExpanded = false;\n this.treeItems[focussedChild].updateAriaLabel();\n } else if (\n this.treeItems[focussedChild].parentElement?.tagName ===\n this.treeItemTag\n ) {\n (\n this.treeItems[focussedChild].parentElement as HTMLIcTreeItemElement\n ).setFocus();\n }\n event.preventDefault();\n break;\n }\n };\n\n private getNextItemToSelect = (\n currentItem: number,\n movingDown: boolean\n ): number => {\n const numItems = this.treeItems.length - 1;\n\n if (currentItem < 1) {\n currentItem = 0;\n }\n\n let nextItem = movingDown ? currentItem + 1 : currentItem - 1;\n if (nextItem < 0) {\n nextItem = 0;\n } else if (nextItem > numItems) {\n nextItem = numItems;\n }\n\n const maxAttempts = numItems + 1;\n let attempts = 0;\n\n while (attempts < maxAttempts) {\n if (nextItem < 0 || nextItem > numItems) {\n return currentItem;\n }\n\n if (\n this.treeItems[nextItem].parentElement?.tagName !== this.treeItemTag ||\n ((this.treeItems[nextItem].parentElement as HTMLIcTreeItemElement)\n .expanded &&\n this.treeItems[nextItem].offsetHeight > 0)\n ) {\n return nextItem;\n }\n\n if (nextItem === numItems && this.treeItems[nextItem].disabled) {\n return currentItem;\n }\n\n nextItem = movingDown ? nextItem + 1 : nextItem - 1;\n attempts++;\n }\n\n return currentItem;\n };\n\n private linkTreeItems = () => {\n this.treeItems.forEach((treeItem) => {\n treeItem.setAttribute(\"context-id\", this.treeViewId);\n });\n };\n\n private setTreeItems = () => {\n this.treeItems = this.getAllTreeItems(this.el as HTMLElement);\n\n this.linkTreeItems();\n };\n\n private getAllTreeItems(element: HTMLElement): HTMLIcTreeItemElement[] {\n const treeItems: HTMLIcTreeItemElement[] = [];\n\n const collectTreeItemsFromSlottedContent = (el: HTMLElement) => {\n Array.from(el.children).forEach((child) => {\n if (child.tagName === this.treeItemTag) {\n treeItems.push(child as HTMLIcTreeItemElement);\n }\n\n collectTreeItemsFromSlottedContent(child as HTMLElement);\n });\n };\n\n const collectTreeItemsFromData = (\n items: IcTreeItemOptions[],\n parentElement: HTMLElement\n ) => {\n Array.from(parentElement.children).forEach((child) => {\n if (child.tagName === this.treeItemTag) {\n parentElement.removeChild(child);\n }\n });\n\n items.forEach((item) => {\n const treeItem = document.createElement(\n this.treeItemTag\n ) as HTMLIcTreeItemElement;\n const { children, icon, ...props } = item;\n Object.assign(treeItem, props);\n\n if (icon) {\n const iconSlot = document.createElement(\"div\");\n iconSlot.setAttribute(\"slot\", \"icon\");\n iconSlot.innerHTML = icon;\n treeItem.appendChild(iconSlot);\n }\n\n parentElement.appendChild(treeItem);\n treeItems.push(treeItem);\n\n if (children && children.length > 0) {\n collectTreeItemsFromData(children, treeItem);\n }\n });\n };\n\n if (this.treeItemData.length > 0) {\n collectTreeItemsFromData(this.treeItemData, element);\n } else {\n collectTreeItemsFromSlottedContent(element);\n }\n\n return treeItems;\n }\n\n private addSlotChangeListener = () => {\n this.el.addEventListener(\"slotchange\", this.setTreeItems);\n };\n\n private truncateTreeViewHeading = () => {\n const typographyEl =\n this.el.shadowRoot?.querySelector<HTMLIcTypographyElement>(\n \".tree-view-header\"\n );\n const tooltip = typographyEl?.closest(this.TOOLTIP);\n const headingContainer = this.el.shadowRoot?.querySelector<HTMLElement>(\n \".heading-area-container\"\n );\n\n if (\n typographyEl &&\n headingContainer &&\n typographyEl.scrollHeight > headingContainer.clientHeight\n ) {\n typographyEl.classList.add(\"ic-text-overflow\");\n\n if (!tooltip) {\n const tooltipEl = document.createElement(\"ic-tooltip\");\n tooltipEl.setAttribute(\"target\", this.el.id);\n tooltipEl.setAttribute(\"label\", typographyEl.textContent!);\n tooltipEl.classList.add(\"ic-tooltip-overflow\");\n tooltipEl.setAttribute(\"placement\", \"right\");\n headingContainer.appendChild(tooltipEl);\n tooltipEl.appendChild(typographyEl);\n }\n }\n };\n\n private removeHeadingTruncation = () => {\n const typographyEl =\n this.el.shadowRoot?.querySelector<HTMLIcTypographyElement>(\n \".tree-view-header\"\n );\n const tooltipEl = typographyEl?.closest<HTMLIcTooltipElement>(this.TOOLTIP);\n\n if (tooltipEl && typographyEl) {\n typographyEl.classList.remove(\"ic-text-overflow\");\n this.el.shadowRoot\n ?.querySelector(\".heading-area-container\")\n ?.replaceChild(typographyEl, tooltipEl);\n }\n };\n\n private isHeadingDefined = () =>\n isPropDefined(this.heading) && this.heading !== null;\n\n private hasHeadingAreaContent = (): boolean => {\n return (\n isSlotUsed(this.el, \"heading\") ||\n this.isHeadingDefined() ||\n isSlotUsed(this.el, \"icon\")\n );\n };\n\n render() {\n const { heading, isLoaded, size, theme, truncateHeading } = this;\n\n return (\n <Host\n context-id={this.treeViewId}\n class={{\n [`ic-tree-view-${size}`]: size !== \"medium\",\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n \"ic-tree-view-truncate\": truncateHeading,\n }}\n onKeyDown={this.handleKeyDown}\n aria-label={this.isHeadingDefined() ? heading : null}\n >\n {this.hasHeadingAreaContent() && (\n <div class=\"heading-area-container\">\n {isSlotUsed(this.el, \"icon\") && (\n <div class=\"icon-container\">\n <slot name=\"icon\" />\n </div>\n )}\n <ic-typography\n variant=\"subtitle-large\"\n class={{\n \"tree-view-header\": true,\n \"with-padding\": this.truncateHeading && !isLoaded,\n }}\n >\n {isSlotUsed(this.el, \"heading\") ? (\n <slot name=\"heading\" />\n ) : (\n heading\n )}\n </ic-typography>\n </div>\n )}\n\n <slot></slot>\n </Host>\n );\n }\n}\n"],"mappings":"gIAAA,MAAMA,EAAgB,0hDACtB,MAAAC,EAAeD,E,8WCoBf,IAAIE,EAAc,E,MAYLC,EAAQ,MALrB,WAAAC,CAAAC,G,UAMUC,KAAAC,WAAa,gBAAgBL,MAC7BI,KAAAE,YAAc,eACdF,KAAAG,qBAAgD,KAChDH,KAAAI,SAAW,MACXJ,KAAAK,eAAwC,KACxCL,KAAAM,QAAU,aAEVN,KAAAO,wBAAmC,MACnCP,KAAAQ,0BAAqC,MAIpCR,KAAAS,YAAuB,MAkBxBT,KAAAU,QAAkB,GAKlBV,KAAAW,KAAiB,SAWjBX,KAAAY,MAAsB,UAWtBZ,KAAAa,aAAoC,GAUnBb,KAAAc,gBAA2B,MAM3Bd,KAAAe,kBAA6B,MAgE9Cf,KAAAgB,kBAAoB,KAC1BhB,KAAKK,eAAiB,IAAIY,gBAAe,KACvC,MAAMC,EAAgBC,KAA0BC,EAAaC,EAC7D,GAAIrB,KAAKS,cAAgBS,EAAelB,KAAKS,YAAcS,CAAa,IAG1ElB,KAAKK,eAAeiB,QAAQC,SAASC,KAAK,EAGpCxB,KAAAyB,iBAAmB,KACzBzB,KAAKc,gBAAkB,MACvBd,KAAKe,kBAAoB,KAAK,EAGxBf,KAAA0B,cAAiBC,I,QACvB,MAAMC,EAAgB5B,KAAK6B,UAAUC,QACnC9B,KAAK6B,UAAUE,QAAQC,GAAOA,IAAOT,SAASU,gBAAe,IAE/D,MAAMC,GAAWC,EAAAnC,KAAK6B,UAAUD,MAAc,MAAAO,SAAA,SAAAA,EAAED,SAChD,OAAQP,EAAMS,KACZ,IAAK,YACHpC,KAAK6B,UACH7B,KAAKqC,oBAAoBT,EAAe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0 @@
1
- import{r as t,c as e,h as i,H as s,g as o}from"./p-8e4e97b4.js";import{r,i as c,o as a,a as l}from"./p-e253a857.js";const n=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M7 9.5L12 14.5L17 9.5H7Z" fill="currentColor"/>\n</svg>`;const h=':host{display:block;border:none;position:relative}:host .tree-item-content{display:flex;align-items:center;min-height:var(--ic-space-xl);padding:var(--ic-space-xxs) var(--ic-space-xs);text-decoration:none;color:var(--ic-tree-view-text);--ic-typography-color:var(--ic-tree-view-text)}::slotted([slot="router-item"]){display:flex;align-items:center;min-height:var(--ic-space-xl);text-decoration:none;font-family:var(--ic-font-body-family);color:var(--ic-tree-view-text);padding:var(--ic-space-xxs) var(--ic-space-xs) !important}:host(.ic-tree-item-truncate) .tree-item-content,:host(.ic-tree-item-truncate) ::slotted([slot="router-item"]){height:calc(var(--ic-space-xl) + var(--ic-space-xs))}::slotted([slot="router-item"].ic-tree-item-single){padding-left:calc(var(--ic-space-xl) + var(--ic-space-xs)) !important}:host .tree-item-content:focus,::slotted([slot="router-item"]:focus){box-shadow:var(--ic-border-focus-inset);border-radius:var(--ic-border-radius-inset);transition:var(--ic-transition-duration-fast);outline:none}:host .tree-item-content:hover,::slotted([slot="router-item"]:hover){background-color:var(--ic-tree-view-hover) !important;cursor:pointer}:host .tree-item-content:active,::slotted([slot="router-item"]:active){background-color:var(--ic-tree-view-pressed) !important}:host(.ic-tree-item-selected) .tree-item-content,:host(.ic-tree-item-selected) ::slotted([slot="router-item"]){background-color:var(--ic-tree-view-selected) !important}:host(.ic-tree-item-small) .tree-item-content,:host(.ic-tree-item-small) ::slotted([slot="router-item"]){min-height:var(--ic-space-lg)}:host(.ic-tree-item-large) .tree-item-content,:host(.ic-tree-item-large) ::slotted([slot="router-item"]){min-height:calc(var(--ic-space-xl) + var(--ic-space-xs))}:host(.ic-tree-item-truncate.ic-tree-item-small) .tree-item-content,:host(.ic-tree-item-truncate.ic-tree-item-small) ::slotted([slot="router-item"]){height:var(--ic-space-lg)}:host(.ic-tree-item-truncate.ic-tree-item-large) .tree-item-content,:host(.ic-tree-item-truncate.ic-tree-item-large) ::slotted([slot="router-item"]){height:calc(var(--ic-space-xl) + var(--ic-space-xs))}:host(.ic-tree-item-disabled){pointer-events:none}:host(.ic-tree-item-disabled) .tree-item-content,:host(.ic-tree-item-disabled) ::slotted([slot="icon"]),:host(.ic-tree-item-disabled) ::slotted([slot="router-item"]){color:var(--ic-tree-view-text-disabled) !important;--ic-typography-color:var(--ic-tree-view-text-disabled) !important;fill:var(--ic-tree-view-icon-disabled);pointer-events:none}:host .arrow-dropdown{color:var(--ic-tree-view-dropdown-arrow);margin-right:var(--ic-space-xs);margin-bottom:calc(var(--ic-space-xxs) * -1)}:host(.ic-tree-item-disabled) .arrow-dropdown{color:var(--ic-tree-view-dropdown-arrow-disabled)}:host(.ic-tree-item-small) .arrow-dropdown{margin-right:var(--ic-space-xxs)}:host .tree-item-expanded{transform:rotate(180deg);margin-top:calc(-1 * var(--ic-space-xxs));margin-bottom:0}:host .ic-tree-item-single{padding-left:calc(var(--ic-space-xl) + var(--ic-space-xs))}:host(.ic-tree-item-small) .ic-tree-item-single{padding-left:calc(var(--ic-space-xl) + var(--ic-space-xxs))}.icon-container{min-width:var(--ic-space-lg);width:var(--ic-space-lg);height:var(--ic-space-lg);margin:0 var(--ic-space-xs) 0 0}:host(.ic-tree-item-small) .icon-container{margin:0 var(--ic-space-xxs) 0 0}.ic-text-overflow{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.ic-tooltip-overflow{overflow:hidden}::slotted([slot="icon"]){fill:var(--ic-tree-view-icon)}@media (forced-colors: active){::slotted([slot="icon"]){fill:currentcolor}:host .tree-item-content:hover,::slotted([slot="router-item"]:hover),:host .tree-item-content:active,::slotted([slot="router-item"]:active),:host(.ic-tree-item-selected) .tree-item-content,:host(.ic-tree-item-selected) ::slotted([slot="router-item"]){background-color:none !important}:host(.ic-tree-item-disabled) .tree-item-content,:host(.ic-tree-item-disabled) .arrow-dropdown,:host(.ic-tree-item-disabled) ::slotted([slot="icon"]),:host(.ic-tree-item-disabled) ::slotted([slot="router-item"]){color:GrayText !important;--ic-typography-color:GrayText !important;fill:GrayText !important}:host .tree-item-content:focus,::slotted([slot="router-item"]:focus){border:var(--ic-border-hc) !important}:host(.ic-tree-item-selected) .tree-item-content,:host(.ic-tree-item-selected) ::slotted([slot="router-item"]){color:Highlight !important;--ic-typography-color:Highlight !important}}';const d=h;let m=0;const v=class{constructor(i){t(this,i);this.icTreeItemSelected=e(this,"icTreeItemSelected",7);this.icTreeItemExpanded=e(this,"icTreeItemExpanded",7);this.treeItemTag="IC-TREE-ITEM";this.hostMutationObserver=null;this.TOOLTIP="ic-tooltip";this.TREE_ITEM_LABEL_CLASS_SELECTOR=".tree-item-label";this.TREE_ITEM_CONTENT_CLASS_SELECTOR=".tree-item-content";this.disabled=false;this.expanded=false;this.hasParentExpanded=false;this.hreflang="";this.isParent=false;this.label="";this.selected=false;this.size="medium";this.theme="inherit";this.handleTreeItemClicked=()=>{if(this.isParent){this.expanded=!this.expanded;this.hasParentExpanded=true}this.updateAriaLabel();this.selected=true;this.watchSelectedHandler()};this.setTreeItemPadding=()=>{var t;let e=1;let i=this.el.parentElement;const s=(t=this.el.shadowRoot)===null||t===void 0?void 0:t.querySelector(this.TREE_ITEM_CONTENT_CLASS_SELECTOR);if(!i){return}const o=Array.from(i.children).some((t=>t!==this.el&&!t.querySelector('[slot="router-item"]')&&!t.querySelector('[slot="label"]')&&t.children.length>0));if(o&&!this.el.isParent||i.tagName===this.treeItemTag&&!this.el.isParent){if(this.hasRouterSlot()){this.routerSlot.classList.add("ic-tree-item-single")}else{s.classList.add("ic-tree-item-single")}}while(i){if(i.tagName===this.treeItemTag){e++;s.style.paddingLeft=!this.el.isParent?`calc(var(--ic-space-${o?"xl":"xs"}) + ${e*(o?16:24)}px)`:`${e*16}px`}i=i.parentElement}};this.truncateTreeItemLabel=t=>{var e,i;let s=(e=t.shadowRoot)===null||e===void 0?void 0:e.querySelector(this.TREE_ITEM_LABEL_CLASS_SELECTOR);const o=t.querySelector("[slot='router-item']");let r=o===null||o===void 0?void 0:o.scrollHeight;if(!s&&o){const t=document.createElement("ic-typography");t.innerHTML=o.textContent;t.classList.add("tree-item-label");o.replaceChild(t,o.firstChild);s=t}else if(s){r=s.scrollHeight}const c=!!(s===null||s===void 0?void 0:s.closest(this.TOOLTIP));const a=((i=t.shadowRoot)===null||i===void 0?void 0:i.querySelector(this.TREE_ITEM_CONTENT_CLASS_SELECTOR))||o;if(a){const t=parseFloat(getComputedStyle(a).height);if(r&&t&&r>t&&!c&&s){const t=document.createElement("ic-tooltip");t.setAttribute("target",this.el.id);t.setAttribute("label",s.textContent);t.setAttribute("placement","right");if(a===o){a.addEventListener("focus",(()=>this.handleDisplayTooltip(true)));a.addEventListener("blur",(()=>this.handleDisplayTooltip(false)));t.setAttribute("style","overflow:hidden;");s.setAttribute("style","overflow:hidden;text-overflow:ellipsis;white-space:nowrap;")}else{t.classList.add("ic-tooltip-overflow");s.classList.add("ic-text-overflow")}a.appendChild(t);t.appendChild(s)}}};this.removeTreeItemTruncation=t=>{var e,i;const s=t.querySelector("[slot='router-item']");const o=((e=t.shadowRoot)===null||e===void 0?void 0:e.querySelector(this.TREE_ITEM_LABEL_CLASS_SELECTOR))||s.querySelector(this.TREE_ITEM_LABEL_CLASS_SELECTOR);const r=o===null||o===void 0?void 0:o.closest(this.TOOLTIP);const c=((i=t.shadowRoot)===null||i===void 0?void 0:i.querySelector(this.TREE_ITEM_CONTENT_CLASS_SELECTOR))||s;if(r){o.classList.remove("ic-text-overflow");c.replaceChild(c===s?o.firstChild:o,r)}};this.handleDisplayTooltip=t=>{var e;const i=((e=this.el.shadowRoot)===null||e===void 0?void 0:e.querySelector(this.TREE_ITEM_LABEL_CLASS_SELECTOR))||this.el.querySelector(this.TREE_ITEM_LABEL_CLASS_SELECTOR);const s=i===null||i===void 0?void 0:i.closest(this.TOOLTIP);s===null||s===void 0?void 0:s.displayTooltip(t)}}watchDisabledHandler(){r(this.disabled,this.el)}watchExpandedHandler(){this.icTreeItemExpanded.emit({isExpanded:this.expanded,id:this.el.id})}watchSelectedHandler(){if(this.selected){this.icTreeItemSelected.emit({id:this.el.id})}this.updateAriaLabel()}disconnectedCallback(){var t;(t=this.hostMutationObserver)===null||t===void 0?void 0:t.disconnect()}componentWillLoad(){r(this.disabled,this.el);this.childTreeItems=Array.from(this.el.children).filter((t=>t.tagName===this.treeItemTag));if(this.childTreeItems.length>0){this.isParent=true}}componentDidLoad(){this.setTreeItemPadding();this.updateAriaLabel();!c(this.el,"label")&&a([{prop:this.label,propName:"label"}],"Tree item");this.hostMutationObserver=new MutationObserver((t=>l(t,"icon",this)));this.hostMutationObserver.observe(this.el,{childList:true})}componentDidRender(){this.truncateTreeItem?this.truncateTreeItemLabel(this.el):this.removeTreeItemTruncation(this.el);if(this.expanded){this.childTreeItems.forEach((t=>{t.truncateTreeItem?this.truncateTreeItemLabel(t):this.removeTreeItemTruncation(t)}))}}componentDidUpdate(){if(this.hasParentExpanded){this.childTreeItems.forEach((t=>{t.truncateTreeItem?this.truncateTreeItemLabel(t):this.removeTreeItemTruncation(t)}));this.hasParentExpanded=false}}handleKeyDown(t){if(t.key==="Enter"||t.key===" "){t.stopImmediatePropagation();this.handleTreeItemClicked()}}async setFocus(){var t,e;if(this.hasRouterSlot()){(t=this.routerSlot)===null||t===void 0?void 0:t.focus()}else{(e=this.treeItemElement)===null||e===void 0?void 0:e.focus()}}async updateAriaLabel(){let t;if(this.hasRouterSlot()){t=this.routerSlot.textContent}else if(c(this.el,"label")){t=this.el.querySelector('[slot="label"]').textContent}else{t=this.label}if(this.isParent){t=`${t}, triggers submenu, ${this.expanded?"expanded":"collapsed"}`}if(this.el.parentElement){const e=Array.from(this.el.parentElement.children).filter((t=>t.tagName===this.treeItemTag));const i=e.indexOf(this.el)+1;const s=e.length;t=`${t}, ${i} of ${s}`}if(this.selected){t=`${t}, active`}if(this.disabled){t=`${t}, dimmed`}if(this.hasRouterSlot()){this.routerSlot.ariaLabel=t}else{this.treeItemElement.ariaLabel=t}}hasRouterSlot(){this.routerSlot=this.el.querySelector('[slot="router-item"]');return!!this.routerSlot}render(){var t;const{disabled:e,label:o,selected:r,size:a,expanded:l,theme:h}=this;const d=this.href&&!this.disabled?"a":"div";const v=d=="a"&&{href:this.href,hrefLang:this.hreflang,referrerPolicy:this.referrerpolicy,rel:this.rel,target:this.target};return i(s,{key:"14eade7c0b23b1c2c2918dda4f011953d6463ec6",class:{"ic-tree-item-disabled":e,"ic-tree-item-selected":!e&&r,[`ic-tree-item-${a}`]:a!=="medium",[`ic-theme-${h}`]:h!=="inherit","ic-tree-item-truncate":!!this.truncateTreeItem},id:(t=this.treeItemId)!==null&&t!==void 0?t:`ic-tree-item-${m++}`},this.hasRouterSlot()?i("slot",{name:"router-item"}):i(d,Object.assign({class:{"tree-item-content":true},tabIndex:e?-1:0,onClick:this.handleTreeItemClicked,ref:t=>this.treeItemElement=t,"aria-disabled":e?"true":"false","aria-live":"polite"},v,{onFocus:()=>this.handleDisplayTooltip(true),onBlur:()=>this.handleDisplayTooltip(false)}),this.isParent&&i("span",{class:{["arrow-dropdown"]:true,["tree-item-expanded"]:l},"aria-hidden":"true",innerHTML:n}),c(this.el,"icon")&&i("div",{class:"icon-container"},i("slot",{name:"icon"})),i("ic-typography",{class:"tree-item-label"},c(this.el,"label")?i("slot",{name:"label"}):o)),l&&i("div",{key:"0a7704d93ccba8640265eacd9c81971d3717a233","aria-hidden":`${!l}`},i("slot",{key:"27eb9361c885e589eac4a3bd6cfd303efb60e1fb"})))}get el(){return o(this)}static get watchers(){return{disabled:["watchDisabledHandler"],expanded:["watchExpandedHandler"],selected:["watchSelectedHandler"]}}};v.style=d;export{v as ic_tree_item};
2
- //# sourceMappingURL=p-7001f1c1.entry.js.map