@ukic/web-components 3.28.0 → 3.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ic-breadcrumb-group.js +16 -12
- package/components/ic-breadcrumb-group.js.map +1 -1
- package/components/ic-menu-item2.js +7 -2
- package/components/ic-menu-item2.js.map +1 -1
- package/components/ic-menu2.js +1153 -306
- package/components/ic-menu2.js.map +1 -1
- package/components/ic-pagination-item2.js.map +1 -1
- package/components/ic-pagination2.js.map +1 -1
- package/components/ic-popover-menu.js +17 -5
- package/components/ic-popover-menu.js.map +1 -1
- package/components/ic-radio-group.js.map +1 -1
- package/components/ic-switch.js.map +1 -1
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +16 -12
- package/dist/cjs/ic-breadcrumb-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js +1153 -306
- package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-menu-item.cjs.entry.js +5 -1
- package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-popover-menu.cjs.entry.js +16 -5
- package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-section-container.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.js +17 -13
- package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.js.map +1 -1
- package/dist/collection/components/ic-menu-item/ic-menu-item.css +9 -14
- package/dist/collection/components/ic-menu-item/ic-menu-item.js +24 -0
- package/dist/collection/components/ic-menu-item/ic-menu-item.js.map +1 -1
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.js +36 -5
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.js.map +1 -1
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.stories.js +169 -1
- package/dist/components/ic-breadcrumb-group.js +16 -12
- package/dist/components/ic-breadcrumb-group.js.map +1 -1
- package/dist/components/ic-hero.js.map +1 -1
- package/dist/components/ic-menu-item2.js +7 -2
- package/dist/components/ic-menu-item2.js.map +1 -1
- package/dist/components/ic-menu2.js +1153 -306
- package/dist/components/ic-menu2.js.map +1 -1
- package/dist/components/ic-pagination-bar.js.map +1 -1
- package/dist/components/ic-popover-menu.js +17 -5
- package/dist/components/ic-popover-menu.js.map +1 -1
- package/dist/components/ic-search-bar.js.map +1 -1
- package/dist/components/ic-side-navigation.js.map +1 -1
- package/dist/components/ic-switch.js.map +1 -1
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/p-305d9639.entry.js +3 -0
- package/dist/core/p-305d9639.entry.js.map +1 -0
- package/dist/core/p-98dee727.entry.js.map +1 -1
- package/dist/core/p-a8d98164.entry.js.map +1 -1
- package/dist/core/p-be8bbed8.entry.js +2 -0
- package/dist/core/p-be8bbed8.entry.js.map +1 -0
- package/dist/core/p-ef289935.entry.js +2 -0
- package/dist/core/p-ef289935.entry.js.map +1 -0
- package/dist/core/p-f8aa89ff.entry.js +2 -0
- package/dist/core/p-f8aa89ff.entry.js.map +1 -0
- package/dist/esm/core.js +1 -1
- package/dist/esm/ic-breadcrumb-group.entry.js +16 -12
- package/dist/esm/ic-breadcrumb-group.entry.js.map +1 -1
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-input-component-container_3.entry.js +1153 -306
- package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
- package/dist/esm/ic-menu-item.entry.js +5 -1
- package/dist/esm/ic-menu-item.entry.js.map +1 -1
- package/dist/esm/ic-popover-menu.entry.js +16 -5
- package/dist/esm/ic-popover-menu.entry.js.map +1 -1
- package/dist/esm/ic-section-container.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-breadcrumb-group/ic-breadcrumb-group.d.ts +6 -1
- package/dist/types/components/ic-menu-item/ic-menu-item.d.ts +4 -0
- package/dist/types/components/ic-popover-menu/ic-popover-menu.d.ts +4 -0
- package/dist/types/components.d.ts +18 -2
- package/hydrate/index.js +1193 -325
- package/hydrate/index.mjs +1193 -325
- package/package.json +10 -6
- package/vscode-data.json +20 -1
- package/dist/core/p-2b1ce5b7.entry.js +0 -2
- package/dist/core/p-2b1ce5b7.entry.js.map +0 -1
- package/dist/core/p-56ab6fb7.entry.js +0 -2
- package/dist/core/p-56ab6fb7.entry.js.map +0 -1
- package/dist/core/p-d5fcd4f9.entry.js +0 -2
- package/dist/core/p-d5fcd4f9.entry.js.map +0 -1
- package/dist/core/p-fdc4376e.entry.js +0 -3
- package/dist/core/p-fdc4376e.entry.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ukic/web-components",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.29.0",
|
|
4
4
|
"description": "A web component UI library compiled with StencilJS",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/mi6/ic-ui-kit",
|
|
@@ -58,10 +58,10 @@
|
|
|
58
58
|
"@stencil/angular-output-target": "^1.1.1",
|
|
59
59
|
"@stencil/postcss": "^2.1.0",
|
|
60
60
|
"@stencil/react-output-target": "^0.5.3",
|
|
61
|
-
"@storybook/addon-a11y": "^10.
|
|
62
|
-
"@storybook/addon-docs": "^10.
|
|
63
|
-
"@storybook/addon-links": "^10.
|
|
64
|
-
"@storybook/web-components-vite": "^10.
|
|
61
|
+
"@storybook/addon-a11y": "^10.4.6",
|
|
62
|
+
"@storybook/addon-docs": "^10.4.6",
|
|
63
|
+
"@storybook/addon-links": "^10.4.6",
|
|
64
|
+
"@storybook/web-components-vite": "^10.4.6",
|
|
65
65
|
"@types/autoprefixer": "^10.2.0",
|
|
66
66
|
"@types/jest": "^29.5.14",
|
|
67
67
|
"@types/jest-axe": "^3.5.9",
|
|
@@ -81,13 +81,17 @@
|
|
|
81
81
|
"react": "^17.0.0",
|
|
82
82
|
"react-dom": "^17.0.0",
|
|
83
83
|
"stencil-inline-svg": "^1.1.0",
|
|
84
|
-
"storybook": "^10.
|
|
84
|
+
"storybook": "^10.4.6",
|
|
85
85
|
"style-loader": "^4.0.0",
|
|
86
86
|
"ts-jest": "^29.4.9"
|
|
87
87
|
},
|
|
88
88
|
"peerDependencies": {
|
|
89
89
|
"@ukic/fonts": "^3.1.0"
|
|
90
90
|
},
|
|
91
|
+
"overrides": {
|
|
92
|
+
"esbuild": "0.28.1",
|
|
93
|
+
"js-yaml": "4.2.0"
|
|
94
|
+
},
|
|
91
95
|
"packageManager": "^npm@10.9.2",
|
|
92
96
|
"collection": "dist/collection/collection-manifest.json",
|
|
93
97
|
"collection:main": "dist/collection/index.js",
|
package/vscode-data.json
CHANGED
|
@@ -547,7 +547,7 @@
|
|
|
547
547
|
"attributes": [
|
|
548
548
|
{
|
|
549
549
|
"name": "back-breadcrumb-only",
|
|
550
|
-
"description": "If `true`, display only a single breadcrumb for the parent page with a back icon."
|
|
550
|
+
"description": "If `true`, display only a single breadcrumb for the parent page with a back icon.\nRequires at least two `ic-breadcrumb` children, as the displayed breadcrumb\nshows the title of the parent (second-to-last) page."
|
|
551
551
|
},
|
|
552
552
|
{
|
|
553
553
|
"name": "collapsed",
|
|
@@ -2454,6 +2454,10 @@
|
|
|
2454
2454
|
"name": "checked",
|
|
2455
2455
|
"description": "If `true`, the menu item will be in a checked state. This is only applicable when variant is set to `toggle`."
|
|
2456
2456
|
},
|
|
2457
|
+
{
|
|
2458
|
+
"name": "close-menu-on-select",
|
|
2459
|
+
"description": "If `true`, the menu will close when this menu item is clicked."
|
|
2460
|
+
},
|
|
2457
2461
|
{
|
|
2458
2462
|
"name": "description",
|
|
2459
2463
|
"description": "The description displayed in the menu item, below the label."
|
|
@@ -3113,6 +3117,21 @@
|
|
|
3113
3117
|
"name": "anchor",
|
|
3114
3118
|
"description": "The ID of the element the popover menu will anchor itself to. This is required unless the popover is a submenu."
|
|
3115
3119
|
},
|
|
3120
|
+
{
|
|
3121
|
+
"name": "close-on-item-select",
|
|
3122
|
+
"description": "If `always`, the popover menu will close when any menu item is clicked. If `toggle`, the popover menu will close when a non-toggle menu item is clicked. If `never`, the popover menu will not close when any menu item is clicked.",
|
|
3123
|
+
"values": [
|
|
3124
|
+
{
|
|
3125
|
+
"name": "always"
|
|
3126
|
+
},
|
|
3127
|
+
{
|
|
3128
|
+
"name": "never"
|
|
3129
|
+
},
|
|
3130
|
+
{
|
|
3131
|
+
"name": "toggle"
|
|
3132
|
+
}
|
|
3133
|
+
]
|
|
3134
|
+
},
|
|
3116
3135
|
{
|
|
3117
3136
|
"name": "fixed-positioning",
|
|
3118
3137
|
"description": "Setting to `true` can help in situations where tooltip content is clipped by a parent element."
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as e,c as t,h as i,H as o,g as r}from"./p-8e4e97b4.js";import{e as s,r as n,o as a,i as c}from"./p-eeb8d98a.js";import{C as u}from"./p-c2e091d7.js";import{C as l}from"./p-3b185c32.js";import"./p-6215e2ae.js";const p='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host ::part(button){color:var(--ic-popover-menu-item-check);--ic-typography-color:var(--ic-popover-menu-item-check);padding:calc(var(--ic-space-xxxs) / 2);display:flex;align-items:flex-start;gap:var(--ic-space-xs);border-radius:0;min-height:2.5rem;height:auto}.focus-border{display:flex;align-items:flex-start;gap:var(--ic-space-xs);border-radius:var(--ic-border-radius);margin:calc(var(--ic-space-xxxs) / 2);padding:var(--ic-space-xxs);border:var(--ic-space-xxxs) dashed transparent;--icon-height:auto}:host(.ic-menu-item-disabled) ::part(button){color:var(--ic-popover-menu-item-check-disabled) !important;--ic-typography-color:var(--ic-popover-menu-item-check-disabled) !important;pointer-events:none}:host(.ic-menu-item-disabled) .menu-item-label,:host(.ic-menu-item-disabled) .shortcut,:host(.ic-menu-item-disabled) .menu-item-description{--ic-typography-color:var(--ic-popover-menu-item-label-disabled) !important}:host(.ic-menu-item-variant-destructive) ::part(button){color:var(--ic-popover-menu-destructive-item-icon);--ic-typography-color:var(--ic-popover-menu-destructive-item-label)}:host ::part(button):hover{background-color:var(--ic-popover-background-hover)}:host ::part(button):focus-visible,:host ::part(button):focus{color:var(--ic-popover-menu-item-icon-focused);--ic-typography-color:purple;background-color:var(--ic-popover-background-focus);box-shadow:none}:host(.ic-menu-item-disabled) ::part(button):focus-visible,:host(.ic-menu-item-disabled) ::part(button):focus{color:var(--ic-popover-menu-item-icon-disabled) !important;--ic-typography-color:orange !important}:host(.ic-menu-item-variant-destructive) ::part(button):focus-visible,:host(.ic-menu-item-variant-destructive) ::part(button):focus{background-color:var(--ic-popover-destructive-background-focus)}ic-button:focus-within .menu-item-label,ic-button:focus-within .shortcut,ic-button:focus-within .menu-item-description{--ic-typography-color:var(--ic-popover-menu-item-label-focused)}:host(.ic-menu-item-disabled) ic-button:focus-within .focus-border{border-color:var(--ic-popover-menu-border)}:host(.ic-menu-item-disabled) ic-button:focus-within .menu-item-label,:host(.ic-menu-item-disabled) ic-button:focus-within .shortcut,:host(.ic-menu-item-disabled) ic-button:focus-within .menu-item-description{--ic-typography-color:var(--ic-popover-menu-item-label-disabled) !important}:host ::part(button):active{background-color:var(--ic-popover-background-pressed);color:var(--ic-popover-menu-item-label) !important;--ic-typography-color:var(--ic-popover-menu-item-label) !important}:host(.ic-menu-item-variant-destructive) ::part(button):active{background-color:var(--ic-popover-background-pressed);color:var(--ic-popover-menu-destructive-item-label) !important;--ic-typography-color:var(\n --ic-popover-menu-destructive-item-label\n ) !important}.menu-item-info{display:flex;flex-direction:column;flex:1;align-items:baseline;white-space:pre-line;text-align:left}.menu-labels{display:flex;align-items:baseline;gap:var(--ic-space-xs)}.menu-item-description{--ic-typography-color:var(--ic-popover-menu-item-description)}.shortcut{--ic-typography-color:var(--ic-popover-menu-item-shortcut);display:flex;flex:min-content}:host(.ic-menu-item-variant-destructive) .menu-item-label{text-transform:uppercase;font-weight:600;letter-spacing:0.025em}ic-button:active .menu-item-label{--ic-typography-color:var(--ic-popover-menu-item-label)}ic-button:active .menu-item-description{--ic-typography-color:var(--ic-popover-menu-item-description)}ic-button:active .shortcut{--ic-typography-color:var(--ic-popover-menu-item-shortcut)}:host(.ic-menu-item-variant-destructive) ic-button:active .menu-item-label{--ic-typography-color:var(\n --ic-popover-menu-destructive-item-label\n ) !important}.icon,.check-icon,.submenu-icon,.icon ::slotted(svg),.check-icon svg,.submenu-icon svg{width:var(--ic-space-lg);height:var(--ic-space-lg)}.check-icon.hide{visibility:hidden}@media (forced-colors: active){:host ::part(button){border:canvas}:host ::part(button):focus-visible{outline:var(--ic-space-xxxs) solid transparent}.focus-border{border-color:canvas}:host(.ic-menu-item-disabled) ic-button:focus-within .focus-border{border-color:GrayText}:host(.ic-menu-item-disabled) .menu-item-info,:host(.ic-menu-item-disabled) .menu-item-label,:host(.ic-menu-item-disabled) .shortcut,:host(.ic-menu-item-disabled) .menu-item-description,:host(.ic-menu-item-disabled) ic-button:focus-within .menu-item-info,:host(.ic-menu-item-disabled) ic-button:focus-within .menu-item-label,:host(.ic-menu-item-disabled) ic-button:focus-within .shortcut,:host(.ic-menu-item-disabled) ic-button:focus-within .menu-item-description{--ic-typography-color:GrayText !important}:host(.ic-menu-item-disabled) ::part(button):focus-visible,:host(.ic-menu-item-disabled) ::part(button):focus{outline-color:GrayText !important}}';const m=p;const d=class{constructor(i){e(this,i);this.childBlur=t(this,"childBlur",7);this.handleMenuItemClick=t(this,"handleMenuItemClick",7);this.icToggleChecked=t(this,"icToggleChecked",7);this.triggerPopoverMenuInstance=t(this,"triggerPopoverMenuInstance",7);this.checked=false;this.disabled=false;this.variant="default";this.handleClick=e=>{if(s(this.submenuTriggerFor)){this.triggerPopoverMenuInstance.emit()}else if(this.variant==="toggle"){e.preventDefault();this.checked=!this.checked;this.icToggleChecked.emit({checked:this.checked})}this.handleMenuItemClick.emit(this.el)};this.getMenuItemAriaLabel=()=>{let e=this.label;if(s(this.description)){e=`${e}, ${this.description}`}if(s(this.keyboardShortcutLabel)){e=`${e}, ${this.keyboardShortcutLabel}`}if(this.variant==="destructive"){e=`${e}, destructive`}if(s(this.submenuTriggerFor)){e=`${e}, triggers submenu`}if(this.el.classList.contains("ic-popover-submenu-back-button")){e="Go back to parent menu"}const t=this.el.parentElement;if(t&&t.tagName==="IC-MENU-GROUP"&&t.label){return`${e}, ${t.label} menu group`}else{return e}}}watchDisabledHandler(){n(this.disabled,this.el)}componentWillLoad(){if(s(this.submenuTriggerFor)&&this.variant!=="default"){this.variant="default"}n(this.disabled,this.el)}componentDidLoad(){a([{prop:this.label,propName:"label"}],"Menu Item")}handleHostClick(e){if(this.disabled){e.stopImmediatePropagation()}}render(){const e=()=>i("div",{class:"menu-item-info"},i("div",{class:"menu-labels"},i("ic-typography",{class:"menu-item-label"},this.label),this.keyboardShortcutLabel&&i("ic-typography",{variant:"caption",class:"shortcut"},this.keyboardShortcutLabel)),this.description&&i("ic-typography",{class:"menu-item-description",variant:"caption"},this.description));return i(o,{class:{["ic-menu-item-disabled"]:!!this.disabled,[`ic-menu-item-variant-${this.variant}`]:this.variant!==undefined}},i("ic-button",{fullWidth:true,variant:"tertiary",onClick:this.handleClick,href:s(this.href),hreflang:s(this.hreflang),target:s(this.target),rel:s(this.rel),referrerpolicy:this.referrerpolicy,role:this.variant==="toggle"?"menuitemcheckbox":"menuitem","aria-disabled":`${this.disabled}`,"aria-checked":this.variant==="toggle"?this.checked?"true":"false":undefined,"aria-label":this.getMenuItemAriaLabel(),"aria-haspopup":s(this.submenuTriggerFor)||this.el.classList.contains("ic-popover-submenu-back-button")?"menu":false},i("div",{class:"focus-border"},c(this.el,"icon")&&i("span",{class:"icon"},i("slot",{name:"icon"})),i(e,null),this.variant==="toggle"&&i("span",{class:{["check-icon"]:true,["hide"]:!this.checked},"aria-hidden":"true",innerHTML:u}),s(this.submenuTriggerFor)&&i("span",{class:{["submenu-icon"]:true},"aria-hidden":"true",innerHTML:l}))))}static get delegatesFocus(){return true}get el(){return r(this)}static get watchers(){return{disabled:["watchDisabledHandler"]}}};d.style=m;export{d as ic_menu_item};
|
|
2
|
-
//# sourceMappingURL=p-2b1ce5b7.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["icMenuItemCss","IcMenuItemStyle0","MenuItem","constructor","hostRef","this","checked","disabled","variant","handleClick","e","isPropDefined","submenuTriggerFor","triggerPopoverMenuInstance","emit","preventDefault","icToggleChecked","handleMenuItemClick","el","getMenuItemAriaLabel","ariaLabel","label","description","keyboardShortcutLabel","classList","contains","parentEl","parentElement","tagName","watchDisabledHandler","removeDisabledFalse","componentWillLoad","componentDidLoad","onComponentRequiredPropUndefined","prop","propName","handleHostClick","stopImmediatePropagation","render","MenuItemInformation","h","class","Host","undefined","fullWidth","onClick","href","hreflang","target","rel","referrerpolicy","role","isSlotUsed","name","innerHTML","Check","Chevron"],"sources":["src/components/ic-menu-item/ic-menu-item.css?tag=ic-menu-item&encapsulation=shadow","src/components/ic-menu-item/ic-menu-item.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host ::part(button) {\n color: var(--ic-popover-menu-item-check);\n\n --ic-typography-color: var(--ic-popover-menu-item-check);\n\n padding: calc(var(--ic-space-xxxs) / 2);\n display: flex;\n align-items: flex-start;\n gap: var(--ic-space-xs);\n border-radius: 0;\n min-height: 2.5rem;\n height: auto;\n}\n\n.focus-border {\n display: flex;\n align-items: flex-start;\n gap: var(--ic-space-xs);\n border-radius: var(--ic-border-radius);\n margin: calc(var(--ic-space-xxxs) / 2);\n padding: var(--ic-space-xxs);\n border: var(--ic-space-xxxs) dashed transparent;\n\n --icon-height: auto;\n}\n\n:host(.ic-menu-item-disabled) ::part(button) {\n color: var(--ic-popover-menu-item-check-disabled) !important;\n\n --ic-typography-color: var(--ic-popover-menu-item-check-disabled) !important;\n\n pointer-events: none;\n}\n\n:host(.ic-menu-item-disabled) .menu-item-label,\n:host(.ic-menu-item-disabled) .shortcut,\n:host(.ic-menu-item-disabled) .menu-item-description {\n --ic-typography-color: var(--ic-popover-menu-item-label-disabled) !important;\n}\n\n:host(.ic-menu-item-variant-destructive) ::part(button) {\n color: var(--ic-popover-menu-destructive-item-icon);\n\n --ic-typography-color: var(--ic-popover-menu-destructive-item-label);\n}\n\n:host ::part(button):hover {\n background-color: var(--ic-popover-background-hover);\n}\n\n:host ::part(button):focus-visible,\n:host ::part(button):focus {\n color: var(--ic-popover-menu-item-icon-focused);\n\n --ic-typography-color: purple;\n\n background-color: var(--ic-popover-background-focus);\n box-shadow: none;\n}\n\n:host(.ic-menu-item-disabled) ::part(button):focus-visible,\n:host(.ic-menu-item-disabled) ::part(button):focus {\n color: var(--ic-popover-menu-item-icon-disabled) !important;\n\n --ic-typography-color: orange !important;\n}\n\n:host(.ic-menu-item-variant-destructive) ::part(button):focus-visible,\n:host(.ic-menu-item-variant-destructive) ::part(button):focus {\n background-color: var(--ic-popover-destructive-background-focus);\n}\n\nic-button:focus-within .menu-item-label,\nic-button:focus-within .shortcut,\nic-button:focus-within .menu-item-description {\n --ic-typography-color: var(--ic-popover-menu-item-label-focused);\n}\n\n:host(.ic-menu-item-disabled) ic-button:focus-within .focus-border {\n border-color: var(--ic-popover-menu-border);\n}\n\n:host(.ic-menu-item-disabled) ic-button:focus-within .menu-item-label,\n:host(.ic-menu-item-disabled) ic-button:focus-within .shortcut,\n:host(.ic-menu-item-disabled) ic-button:focus-within .menu-item-description {\n --ic-typography-color: var(--ic-popover-menu-item-label-disabled) !important;\n}\n\n:host ::part(button):active {\n background-color: var(--ic-popover-background-pressed);\n color: var(--ic-popover-menu-item-label) !important;\n\n --ic-typography-color: var(--ic-popover-menu-item-label) !important;\n}\n\n:host(.ic-menu-item-variant-destructive) ::part(button):active {\n background-color: var(--ic-popover-background-pressed);\n color: var(--ic-popover-menu-destructive-item-label) !important;\n\n --ic-typography-color: var(\n --ic-popover-menu-destructive-item-label\n ) !important;\n}\n\n.menu-item-info {\n display: flex;\n flex-direction: column;\n flex: 1;\n align-items: baseline;\n white-space: pre-line;\n text-align: left;\n}\n\n.menu-labels {\n display: flex;\n align-items: baseline;\n gap: var(--ic-space-xs);\n}\n\n.menu-item-description {\n --ic-typography-color: var(--ic-popover-menu-item-description);\n}\n\n.shortcut {\n --ic-typography-color: var(--ic-popover-menu-item-shortcut);\n\n display: flex;\n flex: min-content;\n}\n\n:host(.ic-menu-item-variant-destructive) .menu-item-label {\n text-transform: uppercase;\n font-weight: 600;\n letter-spacing: 0.025em;\n}\n\nic-button:active .menu-item-label {\n --ic-typography-color: var(--ic-popover-menu-item-label);\n}\n\nic-button:active .menu-item-description {\n --ic-typography-color: var(--ic-popover-menu-item-description);\n}\n\nic-button:active .shortcut {\n --ic-typography-color: var(--ic-popover-menu-item-shortcut);\n}\n\n:host(.ic-menu-item-variant-destructive) ic-button:active .menu-item-label {\n --ic-typography-color: var(\n --ic-popover-menu-destructive-item-label\n ) !important;\n}\n\n.icon,\n.check-icon,\n.submenu-icon,\n.icon ::slotted(svg),\n.check-icon svg,\n.submenu-icon svg {\n width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n}\n\n.check-icon.hide {\n visibility: hidden;\n}\n\n/** High Contrast **/\n@media (forced-colors: active) {\n :host ::part(button) {\n border: canvas;\n }\n\n :host ::part(button):focus-visible {\n outline: var(--ic-space-xxxs) solid transparent;\n }\n\n .focus-border {\n border-color: canvas;\n }\n\n :host(.ic-menu-item-disabled) ic-button:focus-within .focus-border {\n border-color: GrayText;\n }\n\n :host(.ic-menu-item-disabled) .menu-item-info,\n :host(.ic-menu-item-disabled) .menu-item-label,\n :host(.ic-menu-item-disabled) .shortcut,\n :host(.ic-menu-item-disabled) .menu-item-description,\n :host(.ic-menu-item-disabled) ic-button:focus-within .menu-item-info,\n :host(.ic-menu-item-disabled) ic-button:focus-within .menu-item-label,\n :host(.ic-menu-item-disabled) ic-button:focus-within .shortcut,\n :host(.ic-menu-item-disabled) ic-button:focus-within .menu-item-description {\n --ic-typography-color: GrayText !important;\n }\n\n :host(.ic-menu-item-disabled) ::part(button):focus-visible,\n :host(.ic-menu-item-disabled) ::part(button):focus {\n outline-color: GrayText !important;\n }\n}\n","import {\n Component,\n Element,\n Host,\n Prop,\n h,\n Event,\n EventEmitter,\n Listen,\n Watch,\n} from \"@stencil/core\";\nimport {\n isSlotUsed,\n onComponentRequiredPropUndefined,\n removeDisabledFalse,\n isPropDefined,\n} from \"../../utils/helpers\";\nimport { IcMenuItemVariants } from \"./ic-menu-item.types\";\nimport Check from \"../../assets/check-icon.svg\";\nimport Chevron from \"../../assets/chevron-icon.svg\";\n\n/**\n * @slot icon - Content will be placed to the left of the menu item label.\n */\n\n@Component({\n tag: \"ic-menu-item\",\n styleUrl: \"ic-menu-item.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class MenuItem {\n @Element() el: HTMLIcMenuItemElement;\n\n /**\n * If `true`, the menu item will be in a checked state. This is only applicable when variant is set to `toggle`.\n */\n @Prop({ mutable: true, reflect: true }) checked?: boolean = false;\n\n /**\n * The description displayed in the menu item, below the label.\n */\n @Prop() description?: string;\n\n /**\n * If `true`, the menu item will be in disabled state.\n */\n @Prop() disabled?: boolean = false;\n @Watch(\"disabled\")\n watchDisabledHandler(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n /**\n * The URL that the link points to. This will render the menu item as an \"a\" tag.\n */\n @Prop() href?: string;\n\n /**\n * The human language of the linked URL.\n */\n @Prop() hreflang?: string;\n\n /**\n * The label describing the keyboard shortcut for a menu item's action.\n */\n @Prop() keyboardShortcutLabel?: string;\n\n /**\n * The label to display in the menu item.\n */\n @Prop() label!: string;\n\n /**\n * How much of the referrer to send when following the link.\n */\n @Prop() referrerpolicy?: ReferrerPolicy;\n\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n @Prop() rel?: string;\n\n /**\n * This references the popover menu instance that the menu item is a trigger for. If this prop is set, then the variant will always be default.\n */\n @Prop() submenuTriggerFor?: string;\n\n /**\n * The place to display the linked URL, as the name for a browsing context (a tab, window, or iframe).\n */\n @Prop() target?: string;\n\n /**\n * The variant of the menu item.\n */\n @Prop({ mutable: true, reflect: true }) variant?: IcMenuItemVariants =\n \"default\";\n\n /**\n * @internal Emitted when item loses focus.\n */\n @Event() childBlur: EventEmitter<void>;\n\n /**\n * @internal Emitted when the user clicks a menu item.\n */\n @Event() handleMenuItemClick: EventEmitter<HTMLIcMenuItemElement>;\n\n /**\n * Emitted when the user clicks a menu item that is set to the toggle variant.\n */\n @Event() icToggleChecked: EventEmitter<{\n checked: boolean;\n }>;\n\n /**\n * @internal Emitted when the user clicks a menu item that triggers a popover menu instance.\n */\n @Event() triggerPopoverMenuInstance: EventEmitter<void>;\n\n componentWillLoad(): void {\n // This ensures that trigger menu items are always set to the default variant\n if (isPropDefined(this.submenuTriggerFor) && this.variant !== \"default\") {\n this.variant = \"default\";\n }\n removeDisabledFalse(this.disabled, this.el);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Menu Item\"\n );\n }\n\n @Listen(\"click\", { capture: true })\n handleHostClick(e: Event): void {\n if (this.disabled) {\n e.stopImmediatePropagation();\n }\n }\n\n private handleClick = (e: Event): void => {\n if (isPropDefined(this.submenuTriggerFor)) {\n this.triggerPopoverMenuInstance.emit();\n } else if (this.variant === \"toggle\") {\n e.preventDefault();\n this.checked = !this.checked;\n this.icToggleChecked.emit({\n checked: this.checked,\n });\n }\n this.handleMenuItemClick.emit(this.el);\n };\n\n private getMenuItemAriaLabel = (): string => {\n let ariaLabel = this.label;\n\n if (isPropDefined(this.description)) {\n ariaLabel = `${ariaLabel}, ${this.description}`;\n }\n\n if (isPropDefined(this.keyboardShortcutLabel)) {\n ariaLabel = `${ariaLabel}, ${this.keyboardShortcutLabel}`;\n }\n\n if (this.variant === \"destructive\") {\n ariaLabel = `${ariaLabel}, destructive`;\n }\n\n if (isPropDefined(this.submenuTriggerFor)) {\n ariaLabel = `${ariaLabel}, triggers submenu`;\n }\n\n if (this.el.classList.contains(\"ic-popover-submenu-back-button\")) {\n ariaLabel = \"Go back to parent menu\";\n }\n const parentEl = this.el.parentElement;\n\n if (\n parentEl &&\n parentEl.tagName === \"IC-MENU-GROUP\" &&\n (parentEl as HTMLIcMenuGroupElement).label\n ) {\n return `${ariaLabel}, ${\n (parentEl as HTMLIcMenuGroupElement).label\n } menu group`;\n } else {\n return ariaLabel;\n }\n };\n\n render() {\n // A sub-component to layout the menu information correctly in ic-button\n const MenuItemInformation = () => {\n return (\n <div class=\"menu-item-info\">\n <div class=\"menu-labels\">\n <ic-typography class=\"menu-item-label\">{this.label}</ic-typography>\n {this.keyboardShortcutLabel && (\n <ic-typography variant=\"caption\" class=\"shortcut\">\n {this.keyboardShortcutLabel}\n </ic-typography>\n )}\n </div>\n {this.description && (\n <ic-typography class=\"menu-item-description\" variant=\"caption\">\n {this.description}\n </ic-typography>\n )}\n </div>\n );\n };\n\n return (\n <Host\n class={{\n [\"ic-menu-item-disabled\"]: !!this.disabled,\n [`ic-menu-item-variant-${this.variant}`]: this.variant !== undefined,\n }}\n >\n <ic-button\n fullWidth\n variant=\"tertiary\"\n onClick={this.handleClick}\n href={isPropDefined(this.href)}\n hreflang={isPropDefined(this.hreflang)}\n target={isPropDefined(this.target)}\n rel={isPropDefined(this.rel)}\n referrerpolicy={this.referrerpolicy}\n role={this.variant === \"toggle\" ? \"menuitemcheckbox\" : \"menuitem\"}\n aria-disabled={`${this.disabled}`}\n aria-checked={\n this.variant === \"toggle\"\n ? this.checked\n ? \"true\"\n : \"false\"\n : undefined\n }\n aria-label={this.getMenuItemAriaLabel()}\n aria-haspopup={\n isPropDefined(this.submenuTriggerFor) ||\n this.el.classList.contains(\"ic-popover-submenu-back-button\")\n ? \"menu\"\n : false\n }\n >\n <div class=\"focus-border\">\n {isSlotUsed(this.el, \"icon\") && (\n <span class=\"icon\">\n <slot name=\"icon\"></slot>\n </span>\n )}\n <MenuItemInformation />\n {this.variant === \"toggle\" && (\n <span\n class={{\n [\"check-icon\"]: true,\n [\"hide\"]: !this.checked,\n }}\n aria-hidden=\"true\"\n innerHTML={Check}\n />\n )}\n {isPropDefined(this.submenuTriggerFor) && (\n <span\n class={{ [\"submenu-icon\"]: true }}\n aria-hidden=\"true\"\n innerHTML={Chevron}\n />\n )}\n </div>\n </ic-button>\n </Host>\n );\n }\n}\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as e,c as t,h as i,H as o,g as s}from"./p-8e4e97b4.js";import{E as n,e as a,i as r}from"./p-eeb8d98a.js";import{c as l}from"./p-68a5aaff.js";import"./p-6215e2ae.js";const c='/*! 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}@media (prefers-reduced-motion: no-preference){:host .opening-from-parent{animation:slide-in var(--ic-transition-duration-slow) ease-in-out}:host .opening-from-child{animation:slide-out var(--ic-transition-duration-slow) ease-in-out}}:host .ic-popover-menu{border-radius:var(--ic-border-radius);color:var(--ic-popover-nav-text);--ic-typography-color:var(--ic-popover-nav-text);position:relative;z-index:var(--ic-z-index-popover);box-sizing:border-box;box-shadow:var(--ic-elevation-overlay);display:none}:host(.on-dialog){inset:auto !important}:host(.on-dialog-fix-translate){transform:translate(0, var(--ic-space-xs)) !important}:host(.on-dialog-translate-y){transform:translate(0, calc(-1 * var(--translate-y))) !important}.menu{border:var(--ic-border-default);border-color:var(--ic-popover-border);border-radius:var(--ic-border-radius);background-color:var(--ic-popover-background);visibility:hidden;height:0;display:flex;flex-direction:column}:host .ic-popover-menu:focus-within{box-shadow:var(--ic-border-focus)}.menu:focus-visible{outline:none}:host .ic-popover-menu-open{display:block;min-width:calc(20rem - var(--ic-space-xl));width:var(--popover-width, 20rem);max-width:calc(100vw - var(--ic-space-xl))}:host .ic-popover-menu-open .menu{visibility:visible;height:-moz-fit-content;height:fit-content;max-height:var(--max-height, -moz-fit-content);max-height:var(--max-height, fit-content);overflow-y:auto;overflow-x:hidden}.parent-label{--ic-typography-color:var(--ic-popover-parent-label);margin:var(--ic-space-xs) var(--ic-space-xs) 0}@keyframes slide-in{from{opacity:0;transform:translateX(10rem)}to{opacity:1;transform:translateX(0)}}@keyframes slide-out{from{opacity:0;transform:translateX(-10rem)}to{opacity:1;transform:translateX(0)}}';const h=c;const d="div.menu-body";const p=class{constructor(i){e(this,i);this.icPopoverClosed=t(this,"icPopoverClosed",7);this.ARIA_LABEL="aria-label";this.popoverMenuEls=[];this.openingFromChild=false;this.openingFromParent=false;this.popperProps={};this.fixedPositioning=false;this.submenuLevel=1;this.theme="inherit";this.open=undefined;this.setButtonFocus=()=>{var e;(e=this.popoverMenuEls[this.currentFocus])===null||e===void 0?void 0:e.focus()};this.findAnchorEl=e=>{let t=null;if(!e){this.submenuId===undefined&&console.error("No anchor specified for popover component")}else{t=document.querySelector(e.indexOf("#")===0?e:"#"+e);if(t===null){console.error(`Popover anchor element '${e}' not found`)}}return t};this.isNotPopoverMenuEl=e=>{const t=e.target;const{id:i,tagName:o}=t;const s=this.anchorEl&&t===this.anchorEl;return!s&&i!==this.anchor&&o!=="IC-MENU-ITEM"&&o!=="IC-MENU-GROUP"&&o!=="IC-POPOVER-MENU"};this.getNextItemToSelect=(e,t)=>{const i=this.popoverMenuEls.length-1;if(e<1){e=0}let o=t?e+1:e-1;if(o<0){o=i}else if(o>i){o=0}return o};this.addMenuItems=e=>{var t;for(let i=0;i<e.length;i++){const o=e[i];if(o.tagName==="IC-MENU-ITEM"){this.popoverMenuEls.push(o)}else if(o.tagName==="IC-MENU-GROUP"){const e=(t=o.shadowRoot)===null||t===void 0?void 0:t.querySelector(".menu-items-wrapper");if(e){const t=n(e);t&&this.addMenuItems(t)}}}};this.getMenuAriaLabel=()=>{let e=this.el.getAttribute(this.ARIA_LABEL);if(e){this.menuAriaLabel=e;this.el.removeAttribute(this.ARIA_LABEL)}else if(this.menuAriaLabel){e=this.menuAriaLabel}if(!e)return null;if(a(this.submenuId)){return`${e}, within nested level ${this.submenuLevel} ${this.parentLabel} submenu,`}else{return e}};this.handleBackButtonClick=()=>{var e;(e=this.parentPopover)===null||e===void 0?void 0:e.openFromChild();this.open=false};this.initPopperJS=()=>{var e;const t=(e=this.el.shadowRoot)===null||e===void 0?void 0:e.querySelector(".ic-popover-menu");if(this.anchorEl){this.popperInstance=l(this.anchorEl,t,Object.assign({strategy:this.fixedPositioning?"fixed":"absolute",placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[0,4]}},{name:"flip",options:{fallbackPlacements:["top-start","top-end","bottom-end"],rootBoundary:"viewport"}}]},this.popperProps))}}}watchOpenHandler(){var e;const t=(e=this.el.parentElement)===null||e===void 0?void 0:e.querySelectorAll(`ic-popover-menu`);if(this.open){if(t.length>0){t.forEach((e=>{if(e!==this.el){e.open=false}}))}if(this.parentPopover!==undefined&&!this.popoverMenuEls.some((e=>e.id))){this.backButton&&this.popoverMenuEls.unshift(this.backButton)}this.currentFocus=0;setTimeout(this.setButtonFocus,50)}else if(this.popperInstance){if(t.length>0){t.forEach((e=>{if(e!==this.el){e.open=false}}))}this.popperInstance.destroy();this.popperInstance=null}}disconnectedCallback(){if(this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}}componentDidLoad(){var e;const t=(e=this.el.shadowRoot)===null||e===void 0?void 0:e.querySelector(d);if(t){const e=n(t);if(e!==null){this.addMenuItems(e)}}if(this.submenuId===undefined&&this.el.getAttribute(this.ARIA_LABEL)===null){console.error(`No aria-label specified for popover menu component - aria-label required`)}this.watchOpenHandler()}componentWillRender(){const e=this.el.querySelector('[slot="anchor"]');if(e){this.anchorEl=e}else{this.anchorEl=this.findAnchorEl(this.anchor)}}componentDidRender(){if(this.open&&!this.popperInstance){this.initPopperJS()}}handleMenuItemClick(e){if(!e.detail.submenuTriggerFor&&e.detail.label!=="Back"){this.closeMenu(false,e.detail)}}handleSubmenuChange(e){const t=e.target;this.open=false;const i=document.querySelector(`ic-popover-menu[submenu-id=${t.submenuTriggerFor}]`);i.parentPopover=this.el;i.anchor=this.anchor;i.ariaLabel=this.el.getAttribute(this.ARIA_LABEL);i.openFromParent();i.submenuLevel=this.submenuLevel+1;i.parentLabel=t.label}handleClick(e){if(this.open&&this.isNotPopoverMenuEl(e)){this.closeMenu()}}handleKeyDown(e){switch(e.key){case"ArrowDown":case"ArrowUp":e.preventDefault();this.currentFocus=this.getNextItemToSelect(this.currentFocus,e.key==="ArrowDown");this.setButtonFocus();break;case"Home":this.currentFocus=0;this.setButtonFocus();break;case"End":this.currentFocus=this.popoverMenuEls.length-1;this.setButtonFocus();break;case"Escape":case"Tab":e.preventDefault();if(this.open){this.closeMenu(true);this.el.blur()}break}}async openFromChild(){this.open=true;this.openingFromChild=true;setTimeout((()=>this.openingFromChild=false),1e3)}async openFromParent(){this.open=true;this.openingFromParent=true;setTimeout((()=>this.openingFromParent=false),1e3)}async closeMenu(e=false,t){var i;this.open=false;if(this.parentPopover){this.parentPopover.closeMenu(e,t)}else{if(e){(i=this.anchorEl)===null||i===void 0?void 0:i.focus()}this.icPopoverClosed.emit(t)}}async setExternalPopperProps(e){this.popperProps=e}render(){return i(o,{key:"7f6ecb546f399d0b1b5da98ede2923e196314f54",class:{[`ic-theme-${this.theme}`]:this.theme!=="inherit"}},r(this.el,"anchor")&&i("slot",{key:"70e80e8ce605af1076d48399bd19ef337fba4e69",name:"anchor"}),i("div",{key:"d5bae4e0dc2318a501855154eb6f8f904eba823e",class:{["ic-popover-menu"]:true,["ic-popover-menu-open"]:!!this.open}},i("div",{key:"552017695fedbac167dfba7972a93ec8fded05ed",id:this.parentPopover===undefined?`ic-popover-submenu-${this.submenuId}`:"",class:{menu:true}},i("span",{key:"d7acdf61f5003080acfb2fcfb906ade2ea029285",class:{"opening-from-parent":this.openingFromParent,"opening-from-child":this.openingFromChild}},a(this.submenuId)&&i("span",{key:"25b80b6353fb4e169c7af7738a5c14ce7284431c"},i("span",{key:"2241c3237bf2c032768b13560e1d2fc64d65491b",role:"menu"},i("ic-menu-item",{key:"814abfe87aa94ed2d6422b0e8c8186f77415370b",class:"ic-popover-submenu-back-button",ref:e=>this.backButton=e,label:"Back",onClick:this.handleBackButtonClick,id:`ic-popover-submenu-back-button-${this.submenuLevel}`},i("svg",{key:"5489c92487057e827a2ddc0b7ae3117ead6914ac",slot:"icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"submenu-back-icon"},i("path",{key:"ad3b776b8cd8272231f98fa5e3826ceace0c81a2",d:"M20 11H7.83L13.42 5.41L12 4L4 12L12 20L13.41 18.59L7.83 13H20V11Z",fill:"currentColor"})))),i("ic-typography",{key:"d78a1a238211a3676b5f0cbc2f0f0565914915c8",variant:"subtitle-small",class:"parent-label"},this.parentLabel)),i("div",{key:"9e4590864d5595d7bcdd13a7a193f6ad5b3f3f5c",class:"menu-body","aria-label":this.getMenuAriaLabel(),role:"menu"},i("slot",{key:"c2a730872a8782847df15906996d290d2d0b23a5"}))))))}static get delegatesFocus(){return true}get el(){return s(this)}static get watchers(){return{open:["watchOpenHandler"]}}};p.style=h;export{p as ic_popover_menu};
|
|
2
|
-
//# sourceMappingURL=p-56ab6fb7.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["icPopoverMenuCss","IcPopoverMenuStyle0","MENU_SELECTOR","PopoverMenu","constructor","hostRef","this","ARIA_LABEL","popoverMenuEls","openingFromChild","openingFromParent","popperProps","fixedPositioning","submenuLevel","theme","open","undefined","setButtonFocus","_a","currentFocus","focus","findAnchorEl","anchor","anchorElement","submenuId","console","error","document","querySelector","indexOf","isNotPopoverMenuEl","ev","target","id","tagName","isAnchor","anchorEl","getNextItemToSelect","currentItem","movingDown","numButtons","length","nextItem","addMenuItems","elements","i","el","push","groupSlotWrapper","shadowRoot","menuGroupElements","getSlotElements","getMenuAriaLabel","ariaLabel","getAttribute","menuAriaLabel","removeAttribute","isPropDefined","parentLabel","handleBackButtonClick","parentPopover","openFromChild","initPopperJS","popoverMenu","popperInstance","createPopper","Object","assign","strategy","placement","modifiers","name","options","offset","fallbackPlacements","rootBoundary","watchOpenHandler","popoverArr","parentElement","querySelectorAll","forEach","popover","some","menuItem","backButton","unshift","setTimeout","destroy","disconnectedCallback","componentDidLoad","slotWrapper","popoverMenuElements","componentWillRender","slottedAnchor","componentDidRender","handleMenuItemClick","detail","submenuTriggerFor","label","closeMenu","handleSubmenuChange","childEl","openFromParent","handleClick","handleKeyDown","key","preventDefault","blur","setFocusToAnchor","menuElement","icPopoverClosed","emit","setExternalPopperProps","props","render","h","Host","class","isSlotUsed","menu","role","ref","onClick","slot","viewBox","fill","xmlns","d","variant"],"sources":["src/components/ic-popover-menu/ic-popover-menu.css?tag=ic-popover-menu&encapsulation=shadow","src/components/ic-popover-menu/ic-popover-menu.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n/**\n* @prop --ic-z-index-popover: z-index of popover menu. \n* @prop --max-height: Maximum height of the popover menu.\n* @prop --popover-width: Default width of the popover menu.\n*/\n\n@media (prefers-reduced-motion: no-preference) {\n :host .opening-from-parent {\n animation: slide-in var(--ic-transition-duration-slow) ease-in-out;\n }\n\n :host .opening-from-child {\n animation: slide-out var(--ic-transition-duration-slow) ease-in-out;\n }\n}\n\n:host .ic-popover-menu {\n border-radius: var(--ic-border-radius);\n color: var(--ic-popover-nav-text);\n\n --ic-typography-color: var(--ic-popover-nav-text);\n\n position: relative;\n z-index: var(--ic-z-index-popover);\n box-sizing: border-box;\n box-shadow: var(--ic-elevation-overlay);\n display: none;\n}\n\n:host(.on-dialog) {\n inset: auto !important;\n}\n\n:host(.on-dialog-fix-translate) {\n transform: translate(0, var(--ic-space-xs)) !important;\n}\n\n:host(.on-dialog-translate-y) {\n transform: translate(0, calc(-1 * var(--translate-y))) !important;\n}\n\n.menu {\n border: var(--ic-border-default);\n border-color: var(--ic-popover-border);\n border-radius: var(--ic-border-radius);\n background-color: var(--ic-popover-background);\n visibility: hidden;\n height: 0;\n display: flex;\n flex-direction: column;\n}\n\n:host .ic-popover-menu:focus-within {\n box-shadow: var(--ic-border-focus);\n}\n\n.menu:focus-visible {\n outline: none;\n}\n\n:host .ic-popover-menu-open {\n display: block;\n min-width: calc(20rem - var(--ic-space-xl));\n width: var(--popover-width, 20rem);\n max-width: calc(100vw - var(--ic-space-xl));\n}\n\n:host .ic-popover-menu-open .menu {\n visibility: visible;\n height: fit-content;\n max-height: var(--max-height, fit-content);\n overflow-y: auto;\n overflow-x: hidden;\n}\n\n.parent-label {\n --ic-typography-color: var(--ic-popover-parent-label);\n\n margin: var(--ic-space-xs) var(--ic-space-xs) 0;\n}\n\n@keyframes slide-in {\n from {\n opacity: 0;\n transform: translateX(10rem);\n }\n\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n@keyframes slide-out {\n from {\n opacity: 0;\n transform: translateX(-10rem);\n }\n\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n","import {\n Component,\n Element,\n Host,\n h,\n Prop,\n Listen,\n Watch,\n State,\n Method,\n Event,\n EventEmitter,\n} from \"@stencil/core\";\nimport {\n getSlotElements,\n isPropDefined,\n isSlotUsed,\n} from \"../../utils/helpers\";\nimport {\n createPopper,\n Instance as PopperInstance,\n Options,\n} from \"@popperjs/core\";\nimport { IcThemeMode } from \"../../utils/types\";\n\nconst MENU_SELECTOR = \"div.menu-body\";\n\n/**\n * @slot anchor - The default anchor element for the popover menu. This will take precedence over the `anchor` prop.\n */\n@Component({\n tag: \"ic-popover-menu\",\n styleUrl: \"ic-popover-menu.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class PopoverMenu {\n private anchorEl: HTMLElement | null;\n private ARIA_LABEL: string = \"aria-label\";\n private backButton?: HTMLIcMenuItemElement;\n private currentFocus: number;\n private popoverMenuEls: HTMLIcMenuItemElement[] = [];\n private popperInstance: PopperInstance | null;\n private menuAriaLabel?: string;\n\n @Element() el: HTMLIcPopoverMenuElement;\n\n @State() openingFromChild: boolean = false;\n @State() openingFromParent: boolean = false;\n @State() popperProps: Partial<Options> = {};\n\n /**\n * The ID of the element the popover menu will anchor itself to. This is required unless the popover is a submenu.\n */\n @Prop() anchor?: string;\n\n /**\n * Setting to `true` can help in situations where tooltip content is clipped by a parent element.\n */\n @Prop() fixedPositioning: boolean = false;\n\n /**\n * @internal The parent popover menu of a child popover menu.\n */\n @Prop() parentLabel?: string;\n\n /**\n * @internal The parent popover menu of a child popover menu.\n */\n @Prop() parentPopover?: HTMLIcPopoverMenuElement;\n\n /**\n * The unique identifier for a popover submenu.\n */\n @Prop() submenuId?: string;\n\n /**\n * @internal The level of menu being displayed.\n */\n @Prop() submenuLevel?: number = 1;\n\n /**\n * 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\n /**\n * If `true`, the popover menu will be displayed.\n */\n @Prop({ reflect: true, mutable: true }) open?: boolean | undefined =\n undefined;\n\n @Watch(\"open\")\n watchOpenHandler(): void {\n const popoverArr = this.el.parentElement?.querySelectorAll(\n `ic-popover-menu`\n ) as NodeListOf<HTMLIcPopoverMenuElement>;\n if (this.open) {\n if (popoverArr.length > 0) {\n popoverArr.forEach((popover) => {\n if (popover !== this.el) {\n popover.open = false;\n }\n });\n }\n if (\n this.parentPopover !== undefined &&\n !this.popoverMenuEls.some((menuItem) => menuItem.id)\n ) {\n this.backButton && this.popoverMenuEls.unshift(this.backButton);\n }\n\n this.currentFocus = 0;\n // Needed so that anchorEl isn't always focused\n setTimeout(this.setButtonFocus, 50);\n } else if (this.popperInstance) {\n if (popoverArr.length > 0) {\n popoverArr.forEach((popover) => {\n if (popover !== this.el) {\n popover.open = false;\n }\n });\n }\n this.popperInstance.destroy();\n this.popperInstance = null;\n }\n }\n\n /**\n * Emitted when the popover menu is closed.\n */\n @Event() icPopoverClosed: EventEmitter<HTMLIcMenuItemElement>;\n\n disconnectedCallback(): void {\n if (this.popperInstance) {\n this.popperInstance.destroy();\n this.popperInstance = null;\n }\n }\n\n componentDidLoad(): void {\n const slotWrapper = this.el.shadowRoot?.querySelector(MENU_SELECTOR);\n if (slotWrapper) {\n const popoverMenuElements = getSlotElements(slotWrapper);\n\n if (popoverMenuElements !== null) {\n this.addMenuItems(popoverMenuElements);\n }\n }\n\n if (\n this.submenuId === undefined &&\n this.el.getAttribute(this.ARIA_LABEL) === null\n ) {\n console.error(\n `No aria-label specified for popover menu component - aria-label required`\n );\n }\n\n this.watchOpenHandler();\n }\n\n componentWillRender(): void {\n const slottedAnchor = this.el.querySelector(\n '[slot=\"anchor\"]'\n ) as HTMLElement | null;\n\n if (slottedAnchor) {\n this.anchorEl = slottedAnchor;\n } else {\n this.anchorEl = this.findAnchorEl(this.anchor);\n }\n }\n\n componentDidRender(): void {\n if (this.open && !this.popperInstance) {\n this.initPopperJS();\n }\n }\n\n @Listen(\"handleMenuItemClick\")\n handleMenuItemClick(ev: CustomEvent<HTMLIcMenuItemElement>): void {\n if (!ev.detail.submenuTriggerFor && ev.detail.label !== \"Back\") {\n this.closeMenu(false, ev.detail);\n }\n }\n\n // This is listening for the event emitted when a menu item is acting as a trigger button\n @Listen(\"triggerPopoverMenuInstance\", { capture: true })\n handleSubmenuChange(ev: Event): void {\n // Finds the trigger menu item that has emitted the event\n const target = ev.target as HTMLIcMenuItemElement;\n this.open = false;\n\n // Find the popover menu that the menu item triggers (i.e. submenu-trigger-for === submenu-id).\n const childEl = document.querySelector(\n `ic-popover-menu[submenu-id=${target.submenuTriggerFor}]`\n ) as HTMLIcPopoverMenuElement;\n // Set the parent popover menu of the submenu and open the submenu\n childEl.parentPopover = this.el;\n childEl.anchor = this.anchor;\n childEl.ariaLabel = this.el.getAttribute(this.ARIA_LABEL);\n childEl.openFromParent();\n childEl.submenuLevel = this.submenuLevel! + 1;\n // Set the label in the submenu using the label of the menu item that has emitted the event\n childEl.parentLabel = target.label;\n }\n\n @Listen(\"click\", { target: \"document\" })\n handleClick(ev: Event): void {\n if (this.open && this.isNotPopoverMenuEl(ev)) {\n // If menu is open and the next click on the document is not a popover El, close the popover\n this.closeMenu();\n }\n }\n\n // Manages the keyboard navigation in the popover menu\n @Listen(\"keydown\", {})\n handleKeyDown(ev: KeyboardEvent): void {\n switch (ev.key) {\n case \"ArrowDown\":\n case \"ArrowUp\":\n ev.preventDefault();\n this.currentFocus = this.getNextItemToSelect(\n this.currentFocus,\n ev.key === \"ArrowDown\"\n );\n this.setButtonFocus();\n break;\n case \"Home\":\n //Sets home focus as first element, or back button\n this.currentFocus = 0;\n this.setButtonFocus();\n break;\n case \"End\":\n //Sets end focus as last element\n this.currentFocus = this.popoverMenuEls.length - 1;\n this.setButtonFocus();\n break;\n case \"Escape\":\n case \"Tab\":\n ev.preventDefault();\n if (this.open) {\n this.closeMenu(true);\n this.el.blur();\n }\n break;\n }\n }\n\n /**\n * @internal Opens the menu from the child menu.\n */\n @Method()\n async openFromChild(): Promise<void> {\n this.open = true;\n this.openingFromChild = true;\n\n setTimeout(() => (this.openingFromChild = false), 1000);\n }\n\n /**\n * @internal Opens the menu from the parent menu.\n */\n @Method()\n async openFromParent(): Promise<void> {\n this.open = true;\n this.openingFromParent = true;\n\n setTimeout(() => (this.openingFromParent = false), 1000);\n }\n\n private setButtonFocus = () => {\n this.popoverMenuEls[this.currentFocus]?.focus();\n };\n\n // Checks that the popover menu has an anchor\n private findAnchorEl = (anchor: string | undefined): HTMLElement | null => {\n let anchorElement: HTMLElement | null = null;\n if (!anchor) {\n this.submenuId === undefined &&\n console.error(\"No anchor specified for popover component\");\n } else {\n anchorElement = document.querySelector(\n anchor.indexOf(\"#\") === 0 ? anchor : \"#\" + anchor\n );\n if (anchorElement === null) {\n console.error(`Popover anchor element '${anchor}' not found`);\n }\n }\n return anchorElement;\n };\n\n private isNotPopoverMenuEl = (ev: Event) => {\n const target = ev.target as HTMLElement;\n const { id, tagName } = target;\n const isAnchor = this.anchorEl && target === this.anchorEl;\n return (\n !isAnchor &&\n id !== this.anchor &&\n tagName !== \"IC-MENU-ITEM\" &&\n tagName !== \"IC-MENU-GROUP\" &&\n tagName !== \"IC-POPOVER-MENU\"\n );\n };\n\n /**\n * @internal Close the menu, emit icPopoverClosed of the root popover\n * @param setFocusToAnchor when true return focus to anchor element when menu is closed\n */\n @Method()\n async closeMenu(\n setFocusToAnchor = false,\n menuElement?: HTMLIcMenuItemElement\n ): Promise<void> {\n this.open = false;\n if (this.parentPopover) {\n this.parentPopover.closeMenu(setFocusToAnchor, menuElement);\n } else {\n if (setFocusToAnchor) {\n this.anchorEl?.focus();\n }\n this.icPopoverClosed.emit(menuElement);\n }\n }\n\n /**\n * @internal This method allows props to be added to the PopperJS createPopper instance outside of the popover menu\n * @param props object - createPopper props set externally\n */\n @Method()\n async setExternalPopperProps<T extends Partial<Options>>(props: T) {\n this.popperProps = props;\n }\n\n private getNextItemToSelect = (\n currentItem: number,\n movingDown: boolean\n ): number => {\n const numButtons = this.popoverMenuEls.length - 1;\n\n if (currentItem < 1) {\n currentItem = 0;\n }\n\n let nextItem = movingDown ? currentItem + 1 : currentItem - 1;\n\n // Check if wrap around necessary\n if (nextItem < 0) {\n nextItem = numButtons;\n } else if (nextItem > numButtons) {\n nextItem = 0;\n }\n\n return nextItem;\n };\n\n private addMenuItems = (elements: Element[] | NodeListOf<ChildNode>) => {\n for (let i = 0; i < elements.length; i++) {\n const el = elements[i] as HTMLIcMenuItemElement;\n if (el.tagName === \"IC-MENU-ITEM\") {\n this.popoverMenuEls.push(el);\n } else if (el.tagName === \"IC-MENU-GROUP\") {\n const groupSlotWrapper = el.shadowRoot?.querySelector(\n \".menu-items-wrapper\"\n );\n if (groupSlotWrapper) {\n const menuGroupElements = getSlotElements(groupSlotWrapper);\n menuGroupElements && this.addMenuItems(menuGroupElements);\n }\n }\n }\n };\n\n private getMenuAriaLabel = (): string | null => {\n let ariaLabel = this.el.getAttribute(this.ARIA_LABEL);\n if (ariaLabel) {\n this.menuAriaLabel = ariaLabel;\n this.el.removeAttribute(this.ARIA_LABEL);\n } else if (this.menuAriaLabel) {\n ariaLabel = this.menuAriaLabel;\n }\n if (!ariaLabel) return null;\n if (isPropDefined(this.submenuId)) {\n return `${ariaLabel}, within nested level ${this.submenuLevel} ${this.parentLabel} submenu,`;\n } else {\n return ariaLabel;\n }\n };\n\n private handleBackButtonClick = (): void => {\n this.parentPopover?.openFromChild();\n this.open = false;\n };\n\n private initPopperJS = () => {\n const popoverMenu = this.el.shadowRoot?.querySelector(\n \".ic-popover-menu\"\n ) as HTMLElement;\n if (this.anchorEl) {\n this.popperInstance = createPopper(this.anchorEl, popoverMenu, {\n strategy: this.fixedPositioning ? \"fixed\" : \"absolute\",\n placement: \"bottom-start\",\n modifiers: [\n {\n name: \"offset\",\n options: {\n offset: [0, 4],\n },\n },\n {\n name: \"flip\",\n options: {\n fallbackPlacements: [\"top-start\", \"top-end\", \"bottom-end\"],\n rootBoundary: \"viewport\",\n },\n },\n ],\n ...this.popperProps,\n });\n }\n };\n\n render() {\n return (\n <Host\n class={{\n [`ic-theme-${this.theme}`]: this.theme !== \"inherit\",\n }}\n >\n {isSlotUsed(this.el, \"anchor\") && <slot name=\"anchor\"></slot>}\n <div\n class={{\n [\"ic-popover-menu\"]: true,\n [\"ic-popover-menu-open\"]: !!this.open,\n }}\n >\n <div\n id={\n this.parentPopover === undefined\n ? `ic-popover-submenu-${this.submenuId}`\n : \"\"\n }\n class={{\n menu: true,\n }}\n >\n <span\n class={{\n \"opening-from-parent\": this.openingFromParent,\n \"opening-from-child\": this.openingFromChild,\n }}\n >\n {isPropDefined(this.submenuId) && (\n <span>\n <span role=\"menu\">\n <ic-menu-item\n class=\"ic-popover-submenu-back-button\"\n ref={(el) => (this.backButton = el)}\n label=\"Back\"\n onClick={this.handleBackButtonClick}\n id={`ic-popover-submenu-back-button-${this.submenuLevel}`}\n >\n <svg\n slot=\"icon\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"submenu-back-icon\"\n >\n <path\n d=\"M20 11H7.83L13.42 5.41L12 4L4 12L12 20L13.41 18.59L7.83 13H20V11Z\"\n fill=\"currentColor\"\n />\n </svg>\n </ic-menu-item>\n </span>\n <ic-typography variant=\"subtitle-small\" class=\"parent-label\">\n {this.parentLabel}\n </ic-typography>\n </span>\n )}\n <div\n class=\"menu-body\"\n aria-label={this.getMenuAriaLabel()}\n role=\"menu\"\n >\n <slot></slot>\n </div>\n </span>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as i,h as s,H as t,g as e}from"./p-8e4e97b4.js";import{D as h,f as a,h as d}from"./p-eeb8d98a.js";import"./p-6215e2ae.js";const l=":host{display:block}:host ol{display:flex;list-style-type:none;align-items:center;flex-wrap:wrap;padding:0;margin:0}:host(.ic-breadcrumb-group-back) ol ::slotted(ic-breadcrumb){display:none}:host(.ic-breadcrumb-group-back) ol ::slotted(ic-breadcrumb.show){display:flex}:host(.ic-breadcrumb-group-collapsed) ol ::slotted(ic-breadcrumb.hide){display:none;opacity:0;visibility:hidden}:host(.ic-breadcrumb-group-collapsed) ol ::slotted(ic-breadcrumb.visuallyhidden){display:block;opacity:0;transition:all var(--ic-easing-transition-slow)}:host(.ic-breadcrumb-group-collapsed) ol ::slotted(ic-breadcrumb.fade){opacity:1}@media (prefers-reduced-motion: reduce){:host(.ic-breadcrumb-group-collapsed) ol ::slotted(ic-breadcrumb.visuallyhidden){transition:none}}";const r=l;const c=class{constructor(s){i(this,s);this.ADD_CLASS_DELAY=50;this.IC_BREADCRUMB="ic-breadcrumb";this.SHOW_BACK_ICON="show-back-icon";this.collapsedBreadcrumbs=[];this.resizeObserver=null;this.lastParentBreadcrumb=null;this.deviceSize=h.XL;this.backBreadcrumbOnly=false;this.collapsed=false;this.monochrome=false;this.theme="inherit";this.setBreadcrumbTheme=()=>{Array.from(this.el.querySelectorAll(this.IC_BREADCRUMB)).forEach((i=>{i.theme=this.theme}))};this.setBreadcrumbMonochrome=()=>{Array.from(this.el.querySelectorAll(this.IC_BREADCRUMB)).forEach((i=>{i.monochrome=this.monochrome}))};this.setBackBreadcrumb=()=>{if(this.backBreadcrumbOnly){this.setLastParentCollapsedBackBreadcrumb()}else{this.revertLastParentCollapsedBreadcrumb()}};this.setBackBreadcrumbAttr=()=>{if(this.lastParentBreadcrumb){this.lastParentBreadcrumb.classList.add("show");this.lastParentBreadcrumb.setAttribute(this.SHOW_BACK_ICON,"true")}};this.getLastParentBreadcrumb=()=>{const i=this.el.querySelectorAll(this.IC_BREADCRUMB);return i.length>1?i[i.length-2]:null};this.setCollapsed=()=>{var i,s;this.collapsedBreadcrumbs.forEach((i=>{i.classList.remove("visuallyhidden");i.classList.remove("fade")}));if(this.collapsed){this.renderCollapsedBreadcrumb();const s=Array.from(this.el.querySelectorAll(this.IC_BREADCRUMB));this.collapsedBreadcrumbs=s.splice(1,s.length-2).filter((i=>!i.classList.contains("collapsed-breadcrumb-wrapper")));if(!this.backBreadcrumbOnly){this.collapsedBreadcrumbs.forEach((i=>i.classList.add("hide")))}if(this.collapsedBreadcrumbWrapper){(i=s[0])===null||i===void 0?void 0:i.insertAdjacentElement("afterend",this.collapsedBreadcrumbWrapper)}}else{(s=this.collapsedBreadcrumbWrapper)===null||s===void 0?void 0:s.remove()}};this.clickHandler=()=>{var i;(i=this.collapsedBreadcrumbWrapper)===null||i===void 0?void 0:i.remove();this.collapsedBreadcrumbs.forEach((i=>{i.classList.add("visuallyhidden");i.classList.remove("hide");setTimeout((()=>{i.classList.add("fade")}),this.ADD_CLASS_DELAY);i.addEventListener("transitionend",this.transitionendHandler)}));this.collapsed=false;this.collapsedBreadcrumbs[0].setFocus()};this.renderCollapsedBreadcrumb=()=>{if(this.collapsedBreadcrumbEl===undefined){this.collapsedBreadcrumbWrapper=document.createElement("ic-breadcrumb");this.collapsedBreadcrumbWrapper.classList.add("collapsed-breadcrumb-wrapper");this.collapsedBreadcrumbEl=document.createElement("button");const i=document.createElement("span");i.id="collapsed-button-label";i.innerText="Collapsed breadcrumbs";i.className="hide";this.collapsedBreadcrumbEl.setAttribute("aria-labelledby",i.id);const s=document.createElement("span");s.id="collapsed-button-described";s.innerText="Select to view collapsed breadcrumbs";s.className="hide";this.collapsedBreadcrumbEl.setAttribute("aria-describedby",s.id);this.collapsedBreadcrumbEl.id="collapsed-ellipsis";this.collapsedBreadcrumbEl.innerText="...";this.collapsedBreadcrumbEl.classList.add("collapsed-breadcrumb");this.collapsedBreadcrumbEl.addEventListener("click",this.clickHandler);this.collapsedBreadcrumbWrapper.append(s);this.collapsedBreadcrumbWrapper.append(i);this.collapsedBreadcrumbWrapper.append(this.collapsedBreadcrumbEl)}};this.transitionendHandler=i=>{if(i.propertyName==="opacity"){i.target.classList.remove("visuallyhidden")}};this.setLastParentCollapsedBackBreadcrumb=()=>{this.lastParentBreadcrumb=this.getLastParentBreadcrumb();this.setBackBreadcrumbAttr();if(this.lastParentBreadcrumb){this.lastParentBreadcrumb.classList.remove("hide");this.lastParentBreadcrumb.classList.add("show")}};this.revertLastParentCollapsedBreadcrumb=()=>{if(this.lastParentBreadcrumb){this.lastParentBreadcrumb.setAttribute(this.SHOW_BACK_ICON,"false");if(this.collapsed){this.lastParentBreadcrumb.classList.add("hide")}}};this.resizeObserverCallback=i=>{if(i!==this.deviceSize){this.deviceSize=i;const s=this.deviceSize<=h.S;this.el.setAttribute("back-breadcrumb-only",`${s}`);if(s){if(this.collapsed){this.setLastParentCollapsedBackBreadcrumb()}else{this.setBackBreadcrumb()}}else{const i=Array.from(this.el.querySelectorAll(this.IC_BREADCRUMB));if(this.collapsed&&i.length>2){this.revertLastParentCollapsedBreadcrumb();this.setCollapsed()}else{i.forEach((i=>{i.setAttribute(this.SHOW_BACK_ICON,"false")}))}}}};this.runResizeObserver=()=>{this.resizeObserver=new ResizeObserver((()=>{this.resizeObserverCallback(a())}));this.resizeObserver.observe(this.el)}}watchBackBreadcrumbHandler(){this.setBackBreadcrumb()}watchCollapsedHandler(){this.setCollapsed()}watchMonochromeHandler(){this.setBreadcrumbMonochrome()}watchThemeHandler(){this.setBreadcrumbTheme()}componentWillLoad(){this.setBreadcrumbTheme();this.setBreadcrumbMonochrome();if(this.backBreadcrumbOnly){this.setBackBreadcrumb()}else{d(this.runResizeObserver)}if(this.collapsed&&this.el.querySelectorAll(this.IC_BREADCRUMB).length>2){if(a()===h.S){this.setLastParentCollapsedBackBreadcrumb()}else{this.setCollapsed()}}this.lastParentBreadcrumb=this.getLastParentBreadcrumb()}disconnectedCallback(){var i,s;(i=this.lastParentBreadcrumb)===null||i===void 0?void 0:i.removeEventListener("transitionend",this.transitionendHandler);(s=this.collapsedBreadcrumbEl)===null||s===void 0?void 0:s.removeEventListener("click",this.clickHandler)}render(){const{backBreadcrumbOnly:i,collapsed:e,theme:h}=this;return s(t,{key:"6bee18e1a84707b5d493149d23094af6a0fb1be8",class:{"ic-breadcrumb-group-back":i,"ic-breadcrumb-group-collapsed":e,[`ic-theme-${h}`]:h!=="inherit"}},s("nav",{key:"144ad11cead96e18ae62eba8fc2dead82e188854","aria-label":"breadcrumbs"},s("ol",{key:"c101766f5e9b0e5d9a5aaebd5d0d8eda63ffc9ea"},s("slot",{key:"c761cdbb01472d0d8c2550254063b59fa714f722"}))))}get el(){return e(this)}static get watchers(){return{backBreadcrumbOnly:["watchBackBreadcrumbHandler"],collapsed:["watchCollapsedHandler"],monochrome:["watchMonochromeHandler"],theme:["watchThemeHandler"]}}};c.style=r;export{c as ic_breadcrumb_group};
|
|
2
|
-
//# sourceMappingURL=p-d5fcd4f9.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["icBreadcrumbGroupCss","IcBreadcrumbGroupStyle0","BreadcrumbGroup","constructor","hostRef","this","ADD_CLASS_DELAY","IC_BREADCRUMB","SHOW_BACK_ICON","collapsedBreadcrumbs","resizeObserver","lastParentBreadcrumb","deviceSize","DEVICE_SIZES","XL","backBreadcrumbOnly","collapsed","monochrome","theme","setBreadcrumbTheme","Array","from","el","querySelectorAll","forEach","breadcrumb","setBreadcrumbMonochrome","setBackBreadcrumb","setLastParentCollapsedBackBreadcrumb","revertLastParentCollapsedBreadcrumb","setBackBreadcrumbAttr","classList","add","setAttribute","getLastParentBreadcrumb","allBreadcrumbs","length","setCollapsed","remove","renderCollapsedBreadcrumb","splice","filter","contains","collapsedBreadcrumbWrapper","_a","insertAdjacentElement","_b","clickHandler","setTimeout","addEventListener","transitionendHandler","setFocus","collapsedBreadcrumbEl","undefined","document","createElement","ariaLabel","id","innerText","className","ariaDescribed","append","event","propertyName","target","resizeObserverCallback","currSize","isSmallDevice","S","runResizeObserver","ResizeObserver","getCurrentDeviceSize","observe","watchBackBreadcrumbHandler","watchCollapsedHandler","watchMonochromeHandler","watchThemeHandler","componentWillLoad","checkResizeObserver","disconnectedCallback","removeEventListener","render","h","Host","key","class"],"sources":["src/components/ic-breadcrumb-group/ic-breadcrumb-group.css?tag=ic-breadcrumb-group&encapsulation=shadow","src/components/ic-breadcrumb-group/ic-breadcrumb-group.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n:host ol {\n display: flex;\n list-style-type: none;\n align-items: center;\n flex-wrap: wrap;\n padding: 0;\n margin: 0;\n}\n\n:host(.ic-breadcrumb-group-back) ol ::slotted(ic-breadcrumb) {\n display: none;\n}\n\n:host(.ic-breadcrumb-group-back) ol ::slotted(ic-breadcrumb.show) {\n display: flex;\n}\n\n:host(.ic-breadcrumb-group-collapsed) ol ::slotted(ic-breadcrumb.hide) {\n display: none;\n opacity: 0;\n visibility: hidden;\n}\n\n:host(.ic-breadcrumb-group-collapsed)\n ol\n ::slotted(ic-breadcrumb.visuallyhidden) {\n display: block;\n opacity: 0;\n transition: all var(--ic-easing-transition-slow);\n}\n\n:host(.ic-breadcrumb-group-collapsed) ol ::slotted(ic-breadcrumb.fade) {\n opacity: 1;\n}\n\n@media (prefers-reduced-motion: reduce) {\n :host(.ic-breadcrumb-group-collapsed)\n ol\n ::slotted(ic-breadcrumb.visuallyhidden) {\n transition: none;\n }\n}\n","import { Component, Host, h, Element, Prop, State, Watch } from \"@stencil/core\";\nimport {\n checkResizeObserver,\n DEVICE_SIZES,\n getCurrentDeviceSize,\n} from \"../../utils/helpers\";\nimport { IcThemeMode } from \"../../utils/types\";\n\n@Component({\n tag: \"ic-breadcrumb-group\",\n styleUrl: \"ic-breadcrumb-group.css\",\n shadow: true,\n})\n\n// Added ResizeObserver to find out width of breadcrumbs and parents. Use side navigation long title for ref.\nexport class BreadcrumbGroup {\n private ADD_CLASS_DELAY = 50;\n private IC_BREADCRUMB = \"ic-breadcrumb\";\n private SHOW_BACK_ICON = \"show-back-icon\";\n private collapsedBreadcrumbEl?: HTMLButtonElement;\n private collapsedBreadcrumbs: HTMLIcBreadcrumbElement[] = [];\n private collapsedBreadcrumbWrapper?: HTMLIcBreadcrumbElement;\n private resizeObserver: ResizeObserver | null = null;\n private lastParentBreadcrumb: HTMLIcBreadcrumbElement | null = null;\n\n @Element() el: HTMLIcBreadcrumbGroupElement;\n\n @State() deviceSize: number = DEVICE_SIZES.XL;\n\n /**\n * If `true`, display only a single breadcrumb for the parent page with a back icon.\n */\n @Prop() backBreadcrumbOnly = false;\n @Watch(\"backBreadcrumbOnly\")\n watchBackBreadcrumbHandler(): void {\n this.setBackBreadcrumb();\n }\n\n /**\n * If `true`, all breadcrumbs between the first and last breadcrumb will be collapsed.\n */\n @Prop({ mutable: true }) collapsed = false;\n @Watch(\"collapsed\")\n watchCollapsedHandler(): void {\n this.setCollapsed();\n }\n\n /**\n * If `true`, the breadcrumb group will display as black in the light theme, and white in the dark theme.\n */\n @Prop() monochrome = false;\n @Watch(\"monochrome\")\n watchMonochromeHandler(): void {\n this.setBreadcrumbMonochrome();\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.setBreadcrumbTheme();\n }\n\n componentWillLoad(): void {\n this.setBreadcrumbTheme();\n this.setBreadcrumbMonochrome();\n\n if (this.backBreadcrumbOnly) {\n this.setBackBreadcrumb();\n } else {\n checkResizeObserver(this.runResizeObserver);\n }\n\n if (\n this.collapsed &&\n this.el.querySelectorAll(this.IC_BREADCRUMB).length > 2\n ) {\n if (getCurrentDeviceSize() === DEVICE_SIZES.S) {\n this.setLastParentCollapsedBackBreadcrumb();\n } else {\n this.setCollapsed();\n }\n }\n\n this.lastParentBreadcrumb = this.getLastParentBreadcrumb();\n }\n\n disconnectedCallback(): void {\n this.lastParentBreadcrumb?.removeEventListener(\n \"transitionend\",\n this.transitionendHandler\n );\n\n this.collapsedBreadcrumbEl?.removeEventListener(\"click\", this.clickHandler);\n }\n\n private setBreadcrumbTheme = () => {\n Array.from(\n this.el.querySelectorAll<HTMLIcBreadcrumbElement>(this.IC_BREADCRUMB)\n ).forEach((breadcrumb) => {\n breadcrumb.theme = this.theme;\n });\n };\n\n private setBreadcrumbMonochrome = () => {\n Array.from(\n this.el.querySelectorAll<HTMLIcBreadcrumbElement>(this.IC_BREADCRUMB)\n ).forEach((breadcrumb) => {\n breadcrumb.monochrome = this.monochrome;\n });\n };\n\n private setBackBreadcrumb = () => {\n if (this.backBreadcrumbOnly) {\n this.setLastParentCollapsedBackBreadcrumb();\n } else {\n this.revertLastParentCollapsedBreadcrumb();\n }\n };\n\n private setBackBreadcrumbAttr = () => {\n if (this.lastParentBreadcrumb) {\n this.lastParentBreadcrumb.classList.add(\"show\");\n this.lastParentBreadcrumb.setAttribute(this.SHOW_BACK_ICON, \"true\");\n }\n };\n\n private getLastParentBreadcrumb = (): HTMLIcBreadcrumbElement | null => {\n const allBreadcrumbs = this.el.querySelectorAll<HTMLIcBreadcrumbElement>(\n this.IC_BREADCRUMB\n );\n\n return allBreadcrumbs.length > 1\n ? allBreadcrumbs[allBreadcrumbs.length - 2]\n : null;\n };\n\n private setCollapsed = () => {\n this.collapsedBreadcrumbs.forEach((breadcrumb) => {\n breadcrumb.classList.remove(\"visuallyhidden\");\n breadcrumb.classList.remove(\"fade\");\n });\n\n if (this.collapsed) {\n this.renderCollapsedBreadcrumb();\n const allBreadcrumbs = Array.from(\n this.el.querySelectorAll<HTMLIcBreadcrumbElement>(this.IC_BREADCRUMB)\n );\n\n this.collapsedBreadcrumbs = allBreadcrumbs\n .splice(1, allBreadcrumbs.length - 2)\n .filter(\n (breadcrumb) =>\n !breadcrumb.classList.contains(\"collapsed-breadcrumb-wrapper\")\n );\n if (!this.backBreadcrumbOnly) {\n this.collapsedBreadcrumbs.forEach((breadcrumb) =>\n breadcrumb.classList.add(\"hide\")\n );\n }\n\n if (this.collapsedBreadcrumbWrapper) {\n allBreadcrumbs[0]?.insertAdjacentElement(\n \"afterend\",\n this.collapsedBreadcrumbWrapper\n );\n }\n } else {\n this.collapsedBreadcrumbWrapper?.remove();\n }\n };\n\n private clickHandler = () => {\n this.collapsedBreadcrumbWrapper?.remove();\n this.collapsedBreadcrumbs.forEach((breadcrumb) => {\n breadcrumb.classList.add(\"visuallyhidden\");\n breadcrumb.classList.remove(\"hide\");\n setTimeout(() => {\n breadcrumb.classList.add(\"fade\");\n }, this.ADD_CLASS_DELAY);\n\n breadcrumb.addEventListener(\"transitionend\", this.transitionendHandler);\n });\n this.collapsed = false;\n // Set focus to first unhidden breadcrumb\n this.collapsedBreadcrumbs[0].setFocus();\n };\n\n private renderCollapsedBreadcrumb = () => {\n if (this.collapsedBreadcrumbEl === undefined) {\n this.collapsedBreadcrumbWrapper = document.createElement(\"ic-breadcrumb\");\n this.collapsedBreadcrumbWrapper.classList.add(\n \"collapsed-breadcrumb-wrapper\"\n );\n this.collapsedBreadcrumbEl = document.createElement(\"button\");\n\n const ariaLabel = document.createElement(\"span\");\n ariaLabel.id = \"collapsed-button-label\";\n ariaLabel.innerText = \"Collapsed breadcrumbs\";\n ariaLabel.className = \"hide\";\n this.collapsedBreadcrumbEl.setAttribute(\"aria-labelledby\", ariaLabel.id);\n\n const ariaDescribed = document.createElement(\"span\");\n ariaDescribed.id = \"collapsed-button-described\";\n ariaDescribed.innerText = \"Select to view collapsed breadcrumbs\";\n ariaDescribed.className = \"hide\";\n this.collapsedBreadcrumbEl.setAttribute(\n \"aria-describedby\",\n ariaDescribed.id\n );\n\n this.collapsedBreadcrumbEl.id = \"collapsed-ellipsis\";\n this.collapsedBreadcrumbEl.innerText = \"...\";\n this.collapsedBreadcrumbEl.classList.add(\"collapsed-breadcrumb\");\n this.collapsedBreadcrumbEl.addEventListener(\"click\", this.clickHandler);\n\n this.collapsedBreadcrumbWrapper.append(ariaDescribed);\n this.collapsedBreadcrumbWrapper.append(ariaLabel);\n this.collapsedBreadcrumbWrapper.append(this.collapsedBreadcrumbEl);\n }\n };\n\n private transitionendHandler = (event: TransitionEvent) => {\n if (event.propertyName === \"opacity\") {\n (event.target as HTMLElement).classList.remove(\"visuallyhidden\");\n }\n };\n\n private setLastParentCollapsedBackBreadcrumb = () => {\n this.lastParentBreadcrumb = this.getLastParentBreadcrumb();\n this.setBackBreadcrumbAttr();\n if (this.lastParentBreadcrumb) {\n this.lastParentBreadcrumb.classList.remove(\"hide\");\n this.lastParentBreadcrumb.classList.add(\"show\");\n }\n };\n\n private revertLastParentCollapsedBreadcrumb = () => {\n if (this.lastParentBreadcrumb) {\n this.lastParentBreadcrumb.setAttribute(this.SHOW_BACK_ICON, \"false\");\n if (this.collapsed) {\n this.lastParentBreadcrumb.classList.add(\"hide\");\n }\n }\n };\n\n private resizeObserverCallback = (currSize: number) => {\n if (currSize !== this.deviceSize) {\n this.deviceSize = currSize;\n\n const isSmallDevice = this.deviceSize <= DEVICE_SIZES.S;\n this.el.setAttribute(\"back-breadcrumb-only\", `${isSmallDevice}`);\n\n if (isSmallDevice) {\n if (this.collapsed) {\n this.setLastParentCollapsedBackBreadcrumb();\n } else {\n this.setBackBreadcrumb();\n }\n } else {\n const allBreadcrumbs = Array.from(\n this.el.querySelectorAll(this.IC_BREADCRUMB)\n );\n\n if (this.collapsed && allBreadcrumbs.length > 2) {\n this.revertLastParentCollapsedBreadcrumb();\n this.setCollapsed();\n } else {\n allBreadcrumbs.forEach((breadcrumb) => {\n breadcrumb.setAttribute(this.SHOW_BACK_ICON, \"false\");\n });\n }\n }\n }\n };\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n this.resizeObserverCallback(getCurrentDeviceSize());\n });\n\n this.resizeObserver.observe(this.el);\n };\n\n render() {\n const { backBreadcrumbOnly, collapsed, theme } = this;\n\n return (\n <Host\n class={{\n \"ic-breadcrumb-group-back\": backBreadcrumbOnly,\n \"ic-breadcrumb-group-collapsed\": collapsed,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }}\n >\n <nav aria-label=\"breadcrumbs\">\n <ol>\n <slot />\n </ol>\n </nav>\n </Host>\n );\n }\n}\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{r as i,h as t,H as e,g as n,c as s,F as o}from"./p-8e4e97b4.js";import{r as c,a as r,t as a,R as l,T as u,o as h,U as d}from"./p-eeb8d98a.js";import{s as p,f as m}from"./p-6215e2ae.js";import{C as f}from"./p-c2e091d7.js";import{c as b}from"./p-68a5aaff.js";const v="ic-input-component-container{display:flex;border:var(--ic-border-width) solid\n var(--border-color, var(--ic-architectural-400));border-radius:var(--ic-border-radius);transition:var(--ic-easing-transition-slow);height:2.5rem;min-height:2.5rem;width:var(--input-width, 20rem);padding:var(--ic-space-1px);background-color:var(--input-bg-color, var(--ic-color-background-primary));box-sizing:border-box;fill:var(--ic-architectural-400);outline:none}ic-input-component-container.ic-input-component-container-full-width{width:100%;max-width:none}ic-input-component-container.ic-input-component-container-disabled,ic-input-component-container.ic-input-component-container-disabled:hover{border:var(--ic-border-width) dashed\n var(--border-color-disabled, var(--ic-color-border-neutral-disabled))}ic-input-component-container.ic-input-component-container-readonly,ic-input-component-container.ic-input-component-container-small.ic-input-component-container-readonly,ic-input-component-container.ic-input-component-container-large.ic-input-component-container-readonly{height:auto;background:transparent}ic-input-component-container.ic-input-component-container-readonly,ic-input-component-container.ic-input-component-container-readonly:hover{border:none;padding:0}ic-input-component-container.ic-input-component-container-error{border:var(--ic-space-xxxs) solid\n var(--border-color-error, var(--ic-color-border-error));padding:0}ic-input-component-container.ic-input-component-container-error:hover{border:var(--ic-space-xxxs) solid\n var(--border-color-error-hover, var(--ic-color-border-error-hover))}ic-input-component-container.ic-input-component-container-error:focus-within{border:var(--ic-space-xxxs) solid\n var(--border-color-error-pressed, var(--ic-color-border-error-pressed))}ic-input-component-container.ic-input-component-container-warning{border:var(--ic-space-xxxs) solid\n var(--border-color-warning, var(--ic-color-border-warning));padding:0}ic-input-component-container.ic-input-component-container-warning:hover{border:var(--ic-space-xxxs) solid\n var(--border-color-warning-hover, var(--ic-color-border-warning-hover))}ic-input-component-container.ic-input-component-container-warning:focus-within{border:var(--ic-space-xxxs) solid\n var(--border-color-warning-pressed, var(--ic-color-border-warning-pressed))}ic-input-component-container.ic-input-component-container-success{border:var(--ic-space-xxxs) solid\n var(--border-color-success, var(--ic-color-border-success));padding:0}ic-input-component-container.ic-input-component-container-success:hover{border:var(--ic-space-xxxs) solid\n var(--border-color-success-hover, var(--ic-color-border-success-hover))}ic-input-component-container.ic-input-component-container-success:focus-within{border:var(--ic-space-xxxs) solid\n var(--border-color-success-pressed, var(--ic-color-border-success-pressed))}ic-input-component-container.ic-input-component-container-small{height:var(--ic-space-xl);min-height:var(--ic-space-xl)}ic-input-component-container.ic-input-component-container-large{height:var(--ic-space-xxl);min-height:var(--ic-space-xxl)}ic-input-component-container.ic-input-component-container-multiline{height:auto}ic-input-component-container .icon-container{margin-top:var(--ic-space-xxs);margin-left:0.438rem;display:flex;align-items:center}ic-input-component-container.ic-input-component-container-multiline .icon-container,ic-input-component-container.ic-input-component-container-multiline.ic-input-component-container-small .icon-container{margin-top:0.375rem;display:block}ic-input-component-container.ic-input-component-container-readonly .icon-container{margin-left:-0.313rem}ic-input-component-container.ic-input-component-container-disabled ::-moz-placeholder{display:none}ic-input-component-container.ic-input-component-container-disabled ::placeholder{display:none}ic-input-component-container .inline-success{margin:var(--ic-space-xs) 0.375rem;display:flex;align-items:center}ic-input-component-container .inline-success>svg{fill:var(--ic-input-component-container-success-icon-inline-color);height:1.25rem;width:1.25rem}ic-input-component-container:hover{border:var(--ic-input-component-container-hover-border);border-color:var(--border-color-hover, var(--ic-color-border-neutral-hover));color:var(--ic-action-monochrome-hover-dark)}ic-input-component-container:focus{border:var(--ic-border-pressed);border-color:var(\n --border-color-pressed,\n var(--ic-color-border-neutral-pressed)\n )}.focus-indicator{display:flex;width:100%;margin:-0.125rem;padding:0.125rem;border-radius:var(--ic-border-radius);transition:var(--ic-easing-transition-fast)}.focus-indicator:focus-within,.focus-indicator-enabled{box-shadow:var(--ic-border-focus)}.focus-indicator.ic-input-component-container-dark:focus-within{box-shadow:var(--ic-border-focus)}@media (forced-colors: active){ic-input-component-container,.focus-indicator{transition:none}ic-input-component-container:focus-within{border:var(--ic-border-width) solid Highlight;outline:0.125rem solid Highlight}ic-input-component-container.ic-input-component-container-disabled,ic-input-component-container.ic-input-component-container-disabled:hover{border:var(--ic-border-width) dashed GrayText}}@media screen AND (max-width: 22rem){ic-input-component-container{max-width:var(--input-width, 20rem);width:100%}}@media (prefers-reduced-motion: reduce){ic-input-component-container,.focus-indicator{transition:none}}";const g=v;const y=class{constructor(t){i(this,t);this.disabled=false;this.fullWidth=false;this.multiLine=false;this.readonly=false;this.size="medium";this.validationInline=false;this.validationStatus=""}watchDisabledHandler(){c(this.disabled,this.el)}componentWillLoad(){c(this.disabled,this.el)}componentDidLoad(){this.hostMutationObserver=new MutationObserver((i=>r(i,"left-icon",this)));this.hostMutationObserver.observe(this.el,{childList:true})}render(){const{size:i,validationStatus:n,disabled:s,readonly:o,multiLine:c,fullWidth:r,validationInline:u}=this;return t(e,{key:"89ddddb905fb2169968a978feb1db2ddaed8fb0c",class:{[`ic-input-component-container-${i}`]:true,[`ic-input-component-container-${n}`]:n!==""&&!s&&!o,"ic-input-component-container-disabled":!!s,"ic-input-component-container-readonly":!!o,"ic-input-component-container-multiline":!!c,"ic-input-component-container-full-width":!!r},"aria-disabled":s?"true":null},t("div",{key:"e26afb0f2d7b78a1ca9b1ec3976b8e8fa3b2f3fe",class:"focus-indicator"},a(this.el,"left-icon")&&t("div",{key:"d314cf7303bab259eb78c85f38b943d758e6d874",class:"icon-container"},t("slot",{key:"128cdd1e6a537838dc490b33e2a657e613d6c969",name:"left-icon"})),t("slot",{key:"9d5fd3e67c6658f988a335e080b6e7141d1c8712"}),u&&n===l.Success&&t("span",{key:"119749d6c32bebe9c8540fa7fadb28e7387428e5",class:"inline-success",innerHTML:p})))}get el(){return n(this)}static get watchers(){return{disabled:["watchDisabledHandler"]}}};y.style=g;const x="ic-input-container .component-container{display:flex;flex-direction:column}";const w=x;const k=class{constructor(t){i(this,t);this.disabled=false;this.readonly=false}render(){return t(e,{key:"f8a56b6ed7706188078d28f8fd7216c046fe32a2"},t("div",{key:"f7d41111869769c9ab8e5ad72ee936827ef36c91",class:{["component-container"]:true,["disabled"]:!!this.disabled,["readonly"]:!!this.readonly}},t("slot",{key:"42fc42d0f226b11b93ab910c00ed25c027ebb549"})))}};k.style=w;var T=typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};var A={exports:{}};
|
|
2
|
-
/*! @license DOMPurify 3.4.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.0/LICENSE */(function(i,t){(function(t,e){i.exports=e()})(T,(function(){const{entries:i,setPrototypeOf:t,isFrozen:e,getPrototypeOf:n,getOwnPropertyDescriptor:s}=Object;let{freeze:o,seal:c,create:r}=Object;let{apply:a,construct:l}=typeof Reflect!=="undefined"&&Reflect;if(!o){o=function i(t){return t}}if(!c){c=function i(t){return t}}if(!a){a=function i(t,e){for(var n=arguments.length,s=new Array(n>2?n-2:0),o=2;o<n;o++){s[o-2]=arguments[o]}return t.apply(e,s)}}if(!l){l=function i(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),s=1;s<e;s++){n[s-1]=arguments[s]}return new t(...n)}}const u=A(Array.prototype.forEach);const h=A(Array.prototype.lastIndexOf);const d=A(Array.prototype.pop);const p=A(Array.prototype.push);const m=A(Array.prototype.splice);const f=A(String.prototype.toLowerCase);const b=A(String.prototype.toString);const v=A(String.prototype.match);const g=A(String.prototype.replace);const y=A(String.prototype.indexOf);const x=A(String.prototype.trim);const w=A(Object.prototype.hasOwnProperty);const k=A(RegExp.prototype.test);const T=E(TypeError);function A(i){return function(t){if(t instanceof RegExp){t.lastIndex=0}for(var e=arguments.length,n=new Array(e>1?e-1:0),s=1;s<e;s++){n[s-1]=arguments[s]}return a(i,t,n)}}function E(i){return function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++){e[n]=arguments[n]}return l(i,e)}}function S(i,n){let s=arguments.length>2&&arguments[2]!==undefined?arguments[2]:f;if(t){t(i,null)}let o=n.length;while(o--){let t=n[o];if(typeof t==="string"){const i=s(t);if(i!==t){if(!e(n)){n[o]=i}t=i}}i[t]=true}return i}function L(i){for(let t=0;t<i.length;t++){const e=w(i,t);if(!e){i[t]=null}}return i}function z(t){const e=r(null);for(const[n,s]of i(t)){const i=w(t,n);if(i){if(Array.isArray(s)){e[n]=L(s)}else if(s&&typeof s==="object"&&s.constructor===Object){e[n]=z(s)}else{e[n]=s}}}return e}function R(i,t){while(i!==null){const e=s(i,t);if(e){if(e.get){return A(e.get)}if(typeof e.value==="function"){return A(e.value)}}i=n(i)}function e(){return null}return e}const _=o(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]);const I=o(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]);const O=o(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]);const D=o(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]);const M=o(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]);const C=o(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]);const N=o(["#text"]);const P=o(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]);const H=o(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]);const F=o(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]);const j=o(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]);const U=c(/\{\{[\w\W]*|[\w\W]*\}\}/gm);const B=c(/<%[\w\W]*|[\w\W]*%>/gm);const $=c(/\$\{[\w\W]*/gm);const W=c(/^data-[\-\w.\u00B7-\uFFFF]+$/);const q=c(/^aria-[\-\w]+$/);const G=c(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i);const K=c(/^(?:\w+script|data):/i);const Y=c(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g);const X=c(/^html$/i);const V=c(/^[a-z][.\w]*(-[.\w]+)+$/i);var J=Object.freeze({__proto__:null,ARIA_ATTR:q,ATTR_WHITESPACE:Y,CUSTOM_ELEMENT:V,DATA_ATTR:W,DOCTYPE_NAME:X,ERB_EXPR:B,IS_ALLOWED_URI:G,IS_SCRIPT_OR_DATA:K,MUSTACHE_EXPR:U,TMPLIT_EXPR:$});const Q={element:1,text:3,progressingInstruction:7,comment:8,document:9};const Z=function i(){return typeof window==="undefined"?null:window};const ii=function i(t,e){if(typeof t!=="object"||typeof t.createPolicy!=="function"){return null}let n=null;const s="data-tt-policy-suffix";if(e&&e.hasAttribute(s)){n=e.getAttribute(s)}const o="dompurify"+(n?"#"+n:"");try{return t.createPolicy(o,{createHTML(i){return i},createScriptURL(i){return i}})}catch(i){console.warn("TrustedTypes policy "+o+" could not be created.");return null}};const ti=function i(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function ei(){let t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:Z();const e=i=>ei(i);e.version="3.4.0";e.removed=[];if(!t||!t.document||t.document.nodeType!==Q.document||!t.Element){e.isSupported=false;return e}let{document:n}=t;const s=n;const c=s.currentScript;const{DocumentFragment:a,HTMLTemplateElement:l,Node:A,Element:E,NodeFilter:L,NamedNodeMap:U=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:B,DOMParser:$,trustedTypes:W}=t;const q=E.prototype;const K=R(q,"cloneNode");const Y=R(q,"remove");const V=R(q,"nextSibling");const ni=R(q,"childNodes");const si=R(q,"parentNode");if(typeof l==="function"){const i=n.createElement("template");if(i.content&&i.content.ownerDocument){n=i.content.ownerDocument}}let oi;let ci="";const{implementation:ri,createNodeIterator:ai,createDocumentFragment:li,getElementsByTagName:ui}=n;const{importNode:hi}=s;let di=ti();e.isSupported=typeof i==="function"&&typeof si==="function"&&ri&&ri.createHTMLDocument!==undefined;const{MUSTACHE_EXPR:pi,ERB_EXPR:mi,TMPLIT_EXPR:fi,DATA_ATTR:bi,ARIA_ATTR:vi,IS_SCRIPT_OR_DATA:gi,ATTR_WHITESPACE:yi,CUSTOM_ELEMENT:xi}=J;let{IS_ALLOWED_URI:wi}=J;let ki=null;const Ti=S({},[..._,...I,...O,...M,...N]);let Ai=null;const Ei=S({},[...P,...H,...F,...j]);let Si=Object.seal(r(null,{tagNameCheck:{writable:true,configurable:false,enumerable:true,value:null},attributeNameCheck:{writable:true,configurable:false,enumerable:true,value:null},allowCustomizedBuiltInElements:{writable:true,configurable:false,enumerable:true,value:false}}));let Li=null;let zi=null;const Ri=Object.seal(r(null,{tagCheck:{writable:true,configurable:false,enumerable:true,value:null},attributeCheck:{writable:true,configurable:false,enumerable:true,value:null}}));let _i=true;let Ii=true;let Oi=false;let Di=true;let Mi=false;let Ci=true;let Ni=false;let Pi=false;let Hi=false;let Fi=false;let ji=false;let Ui=false;let Bi=true;let $i=false;const Wi="user-content-";let qi=true;let Gi=false;let Ki={};let Yi=null;const Xi=S({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Vi=null;const Ji=S({},["audio","video","img","source","image","track"]);let Qi=null;const Zi=S({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]);const it="http://www.w3.org/1998/Math/MathML";const tt="http://www.w3.org/2000/svg";const et="http://www.w3.org/1999/xhtml";let nt=et;let st=false;let ot=null;const ct=S({},[it,tt,et],b);let rt=S({},["mi","mo","mn","ms","mtext"]);let at=S({},["annotation-xml"]);const lt=S({},["title","style","font","a","script"]);let ut=null;const ht=["application/xhtml+xml","text/html"];const dt="text/html";let pt=null;let mt=null;const ft=n.createElement("form");const bt=function i(t){return t instanceof RegExp||t instanceof Function};const vt=function i(){let t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};if(mt&&mt===t){return}if(!t||typeof t!=="object"){t={}}t=z(t);ut=ht.indexOf(t.PARSER_MEDIA_TYPE)===-1?dt:t.PARSER_MEDIA_TYPE;pt=ut==="application/xhtml+xml"?b:f;ki=w(t,"ALLOWED_TAGS")?S({},t.ALLOWED_TAGS,pt):Ti;Ai=w(t,"ALLOWED_ATTR")?S({},t.ALLOWED_ATTR,pt):Ei;ot=w(t,"ALLOWED_NAMESPACES")?S({},t.ALLOWED_NAMESPACES,b):ct;Qi=w(t,"ADD_URI_SAFE_ATTR")?S(z(Zi),t.ADD_URI_SAFE_ATTR,pt):Zi;Vi=w(t,"ADD_DATA_URI_TAGS")?S(z(Ji),t.ADD_DATA_URI_TAGS,pt):Ji;Yi=w(t,"FORBID_CONTENTS")?S({},t.FORBID_CONTENTS,pt):Xi;Li=w(t,"FORBID_TAGS")?S({},t.FORBID_TAGS,pt):z({});zi=w(t,"FORBID_ATTR")?S({},t.FORBID_ATTR,pt):z({});Ki=w(t,"USE_PROFILES")?t.USE_PROFILES:false;_i=t.ALLOW_ARIA_ATTR!==false;Ii=t.ALLOW_DATA_ATTR!==false;Oi=t.ALLOW_UNKNOWN_PROTOCOLS||false;Di=t.ALLOW_SELF_CLOSE_IN_ATTR!==false;Mi=t.SAFE_FOR_TEMPLATES||false;Ci=t.SAFE_FOR_XML!==false;Ni=t.WHOLE_DOCUMENT||false;Fi=t.RETURN_DOM||false;ji=t.RETURN_DOM_FRAGMENT||false;Ui=t.RETURN_TRUSTED_TYPE||false;Hi=t.FORCE_BODY||false;Bi=t.SANITIZE_DOM!==false;$i=t.SANITIZE_NAMED_PROPS||false;qi=t.KEEP_CONTENT!==false;Gi=t.IN_PLACE||false;wi=t.ALLOWED_URI_REGEXP||G;nt=t.NAMESPACE||et;rt=t.MATHML_TEXT_INTEGRATION_POINTS||rt;at=t.HTML_INTEGRATION_POINTS||at;Si=t.CUSTOM_ELEMENT_HANDLING||r(null);if(t.CUSTOM_ELEMENT_HANDLING&&bt(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)){Si.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck}if(t.CUSTOM_ELEMENT_HANDLING&&bt(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)){Si.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck}if(t.CUSTOM_ELEMENT_HANDLING&&typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements==="boolean"){Si.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements}if(Mi){Ii=false}if(ji){Fi=true}if(Ki){ki=S({},N);Ai=r(null);if(Ki.html===true){S(ki,_);S(Ai,P)}if(Ki.svg===true){S(ki,I);S(Ai,H);S(Ai,j)}if(Ki.svgFilters===true){S(ki,O);S(Ai,H);S(Ai,j)}if(Ki.mathMl===true){S(ki,M);S(Ai,F);S(Ai,j)}}Ri.tagCheck=null;Ri.attributeCheck=null;if(t.ADD_TAGS){if(typeof t.ADD_TAGS==="function"){Ri.tagCheck=t.ADD_TAGS}else{if(ki===Ti){ki=z(ki)}S(ki,t.ADD_TAGS,pt)}}if(t.ADD_ATTR){if(typeof t.ADD_ATTR==="function"){Ri.attributeCheck=t.ADD_ATTR}else{if(Ai===Ei){Ai=z(Ai)}S(Ai,t.ADD_ATTR,pt)}}if(t.ADD_URI_SAFE_ATTR){S(Qi,t.ADD_URI_SAFE_ATTR,pt)}if(t.FORBID_CONTENTS){if(Yi===Xi){Yi=z(Yi)}S(Yi,t.FORBID_CONTENTS,pt)}if(t.ADD_FORBID_CONTENTS){if(Yi===Xi){Yi=z(Yi)}S(Yi,t.ADD_FORBID_CONTENTS,pt)}if(qi){ki["#text"]=true}if(Ni){S(ki,["html","head","body"])}if(ki.table){S(ki,["tbody"]);delete Li.tbody}if(t.TRUSTED_TYPES_POLICY){if(typeof t.TRUSTED_TYPES_POLICY.createHTML!=="function"){throw T('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.')}if(typeof t.TRUSTED_TYPES_POLICY.createScriptURL!=="function"){throw T('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.')}oi=t.TRUSTED_TYPES_POLICY;ci=oi.createHTML("")}else{if(oi===undefined){oi=ii(W,c)}if(oi!==null&&typeof ci==="string"){ci=oi.createHTML("")}}if(o){o(t)}mt=t};const gt=S({},[...I,...O,...D]);const yt=S({},[...M,...C]);const xt=function i(t){let e=si(t);if(!e||!e.tagName){e={namespaceURI:nt,tagName:"template"}}const n=f(t.tagName);const s=f(e.tagName);if(!ot[t.namespaceURI]){return false}if(t.namespaceURI===tt){if(e.namespaceURI===et){return n==="svg"}if(e.namespaceURI===it){return n==="svg"&&(s==="annotation-xml"||rt[s])}return Boolean(gt[n])}if(t.namespaceURI===it){if(e.namespaceURI===et){return n==="math"}if(e.namespaceURI===tt){return n==="math"&&at[s]}return Boolean(yt[n])}if(t.namespaceURI===et){if(e.namespaceURI===tt&&!at[s]){return false}if(e.namespaceURI===it&&!rt[s]){return false}return!yt[n]&&(lt[n]||!gt[n])}if(ut==="application/xhtml+xml"&&ot[t.namespaceURI]){return true}return false};const wt=function i(t){p(e.removed,{element:t});try{si(t).removeChild(t)}catch(i){Y(t)}};const kt=function i(t,n){try{p(e.removed,{attribute:n.getAttributeNode(t),from:n})}catch(i){p(e.removed,{attribute:null,from:n})}n.removeAttribute(t);if(t==="is"){if(Fi||ji){try{wt(n)}catch(i){}}else{try{n.setAttribute(t,"")}catch(i){}}}};const Tt=function i(t){let e=null;let s=null;if(Hi){t="<remove></remove>"+t}else{const i=v(t,/^[\r\n\t ]+/);s=i&&i[0]}if(ut==="application/xhtml+xml"&&nt===et){t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>"}const o=oi?oi.createHTML(t):t;if(nt===et){try{e=(new $).parseFromString(o,ut)}catch(i){}}if(!e||!e.documentElement){e=ri.createDocument(nt,"template",null);try{e.documentElement.innerHTML=st?ci:o}catch(i){}}const c=e.body||e.documentElement;if(t&&s){c.insertBefore(n.createTextNode(s),c.childNodes[0]||null)}if(nt===et){return ui.call(e,Ni?"html":"body")[0]}return Ni?e.documentElement:c};const At=function i(t){return ai.call(t.ownerDocument||t,t,L.SHOW_ELEMENT|L.SHOW_COMMENT|L.SHOW_TEXT|L.SHOW_PROCESSING_INSTRUCTION|L.SHOW_CDATA_SECTION,null)};const Et=function i(t){return t instanceof B&&(typeof t.nodeName!=="string"||typeof t.textContent!=="string"||typeof t.removeChild!=="function"||!(t.attributes instanceof U)||typeof t.removeAttribute!=="function"||typeof t.setAttribute!=="function"||typeof t.namespaceURI!=="string"||typeof t.insertBefore!=="function"||typeof t.hasChildNodes!=="function")};const St=function i(t){return typeof A==="function"&&t instanceof A};function Lt(i,t,n){u(i,(i=>{i.call(e,t,n,mt)}))}const zt=function i(t){let n=null;Lt(di.beforeSanitizeElements,t,null);if(Et(t)){wt(t);return true}const s=pt(t.nodeName);Lt(di.uponSanitizeElement,t,{tagName:s,allowedTags:ki});if(Ci&&t.hasChildNodes()&&!St(t.firstElementChild)&&k(/<[/\w!]/g,t.innerHTML)&&k(/<[/\w!]/g,t.textContent)){wt(t);return true}if(Ci&&t.namespaceURI===et&&s==="style"&&St(t.firstElementChild)){wt(t);return true}if(t.nodeType===Q.progressingInstruction){wt(t);return true}if(Ci&&t.nodeType===Q.comment&&k(/<[/\w]/g,t.data)){wt(t);return true}if(Li[s]||!(Ri.tagCheck instanceof Function&&Ri.tagCheck(s))&&!ki[s]){if(!Li[s]&&_t(s)){if(Si.tagNameCheck instanceof RegExp&&k(Si.tagNameCheck,s)){return false}if(Si.tagNameCheck instanceof Function&&Si.tagNameCheck(s)){return false}}if(qi&&!Yi[s]){const i=si(t)||t.parentNode;const e=ni(t)||t.childNodes;if(e&&i){const n=e.length;for(let s=n-1;s>=0;--s){const n=K(e[s],true);n.__removalCount=(t.__removalCount||0)+1;i.insertBefore(n,V(t))}}}wt(t);return true}if(t instanceof E&&!xt(t)){wt(t);return true}if((s==="noscript"||s==="noembed"||s==="noframes")&&k(/<\/no(script|embed|frames)/i,t.innerHTML)){wt(t);return true}if(Mi&&t.nodeType===Q.text){n=t.textContent;u([pi,mi,fi],(i=>{n=g(n,i," ")}));if(t.textContent!==n){p(e.removed,{element:t.cloneNode()});t.textContent=n}}Lt(di.afterSanitizeElements,t,null);return false};const Rt=function i(t,e,s){if(zi[e]){return false}if(Bi&&(e==="id"||e==="name")&&(s in n||s in ft)){return false}if(Ii&&!zi[e]&&k(bi,e));else if(_i&&k(vi,e));else if(Ri.attributeCheck instanceof Function&&Ri.attributeCheck(e,t));else if(!Ai[e]||zi[e]){if(_t(t)&&(Si.tagNameCheck instanceof RegExp&&k(Si.tagNameCheck,t)||Si.tagNameCheck instanceof Function&&Si.tagNameCheck(t))&&(Si.attributeNameCheck instanceof RegExp&&k(Si.attributeNameCheck,e)||Si.attributeNameCheck instanceof Function&&Si.attributeNameCheck(e,t))||e==="is"&&Si.allowCustomizedBuiltInElements&&(Si.tagNameCheck instanceof RegExp&&k(Si.tagNameCheck,s)||Si.tagNameCheck instanceof Function&&Si.tagNameCheck(s)));else{return false}}else if(Qi[e]);else if(k(wi,g(s,yi,"")));else if((e==="src"||e==="xlink:href"||e==="href")&&t!=="script"&&y(s,"data:")===0&&Vi[t]);else if(Oi&&!k(gi,g(s,yi,"")));else if(s){return false}else;return true};const _t=function i(t){return t!=="annotation-xml"&&v(t,xi)};const It=function i(t){Lt(di.beforeSanitizeAttributes,t,null);const{attributes:n}=t;if(!n||Et(t)){return}const s={attrName:"",attrValue:"",keepAttr:true,allowedAttributes:Ai,forceKeepAttr:undefined};let o=n.length;while(o--){const i=n[o];const{name:c,namespaceURI:r,value:a}=i;const l=pt(c);const h=a;let p=c==="value"?h:x(h);s.attrName=l;s.attrValue=p;s.keepAttr=true;s.forceKeepAttr=undefined;Lt(di.uponSanitizeAttribute,t,s);p=s.attrValue;if($i&&(l==="id"||l==="name")){kt(c,t);p=Wi+p}if(Ci&&k(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,p)){kt(c,t);continue}if(l==="attributename"&&v(p,"href")){kt(c,t);continue}if(s.forceKeepAttr){continue}if(!s.keepAttr){kt(c,t);continue}if(!Di&&k(/\/>/i,p)){kt(c,t);continue}if(Mi){u([pi,mi,fi],(i=>{p=g(p,i," ")}))}const m=pt(t.nodeName);if(!Rt(m,l,p)){kt(c,t);continue}if(oi&&typeof W==="object"&&typeof W.getAttributeType==="function"){if(r);else{switch(W.getAttributeType(m,l)){case"TrustedHTML":{p=oi.createHTML(p);break}case"TrustedScriptURL":{p=oi.createScriptURL(p);break}}}}if(p!==h){try{if(r){t.setAttributeNS(r,c,p)}else{t.setAttribute(c,p)}if(Et(t)){wt(t)}else{d(e.removed)}}catch(i){kt(c,t)}}}Lt(di.afterSanitizeAttributes,t,null)};const Ot=function i(t){let e=null;const n=At(t);Lt(di.beforeSanitizeShadowDOM,t,null);while(e=n.nextNode()){Lt(di.uponSanitizeShadowNode,e,null);zt(e);It(e);if(e.content instanceof a){Ot(e.content)}}Lt(di.afterSanitizeShadowDOM,t,null)};e.sanitize=function(i){let t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};let n=null;let o=null;let c=null;let r=null;st=!i;if(st){i="\x3c!--\x3e"}if(typeof i!=="string"&&!St(i)){if(typeof i.toString==="function"){i=i.toString();if(typeof i!=="string"){throw T("dirty is not a string, aborting")}}else{throw T("toString is not a function")}}if(!e.isSupported){return i}if(!Pi){vt(t)}e.removed=[];if(typeof i==="string"){Gi=false}if(Gi){if(i.nodeName){const t=pt(i.nodeName);if(!ki[t]||Li[t]){throw T("root node is forbidden and cannot be sanitized in-place")}}}else if(i instanceof A){n=Tt("\x3c!----\x3e");o=n.ownerDocument.importNode(i,true);if(o.nodeType===Q.element&&o.nodeName==="BODY"){n=o}else if(o.nodeName==="HTML"){n=o}else{n.appendChild(o)}}else{if(!Fi&&!Mi&&!Ni&&i.indexOf("<")===-1){return oi&&Ui?oi.createHTML(i):i}n=Tt(i);if(!n){return Fi?null:Ui?ci:""}}if(n&&Hi){wt(n.firstChild)}const l=At(Gi?i:n);while(c=l.nextNode()){zt(c);It(c);if(c.content instanceof a){Ot(c.content)}}if(Gi){return i}if(Fi){if(Mi){n.normalize();let i=n.innerHTML;u([pi,mi,fi],(t=>{i=g(i,t," ")}));n.innerHTML=i}if(ji){r=li.call(n.ownerDocument);while(n.firstChild){r.appendChild(n.firstChild)}}else{r=n}if(Ai.shadowroot||Ai.shadowrootmode){r=hi.call(s,r,true)}return r}let h=Ni?n.outerHTML:n.innerHTML;if(Ni&&ki["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&k(X,n.ownerDocument.doctype.name)){h="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+h}if(Mi){u([pi,mi,fi],(i=>{h=g(h,i," ")}))}return oi&&Ui?oi.createHTML(h):h};e.setConfig=function(){let i=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};vt(i);Pi=true};e.clearConfig=function(){mt=null;Pi=false};e.isValidAttribute=function(i,t,e){if(!mt){vt({})}const n=pt(i);const s=pt(t);return Rt(n,s,e)};e.addHook=function(i,t){if(typeof t!=="function"){return}p(di[i],t)};e.removeHook=function(i,t){if(t!==undefined){const e=h(di[i],t);return e===-1?undefined:m(di[i],e,1)[0]}return d(di[i])};e.removeHooks=function(i){di[i]=[]};e.removeAllHooks=function(){di=ti()};return e}var ni=ei();return ni}))})(A);const E=A.exports;const S=i=>({CUSTOM_ELEMENT_HANDLING:{tagNameCheck:t=>i&&t.startsWith("ic-")||m.includes(t),attributeNameCheck:/.*/}});const L=i=>E.sanitize(i,S(true));const z=i=>E.sanitize(i,S(false));const R='html.sc-ic-menu{line-height:1.15;-webkit-text-size-adjust:100%}body.sc-ic-menu{margin:0}main.sc-ic-menu{display:block}h1.sc-ic-menu{font-size:2em;margin:0.67em 0}hr.sc-ic-menu{box-sizing:content-box;height:0;overflow:visible}pre.sc-ic-menu{font-family:monospace, monospace;font-size:1em}a.sc-ic-menu{background-color:transparent}abbr[title].sc-ic-menu{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b.sc-ic-menu,strong.sc-ic-menu{font-weight:bolder}code.sc-ic-menu,kbd.sc-ic-menu,samp.sc-ic-menu{font-family:monospace, monospace;font-size:1em}small.sc-ic-menu{font-size:80%}sub.sc-ic-menu,sup.sc-ic-menu{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub.sc-ic-menu{bottom:-0.25em}sup.sc-ic-menu{top:-0.5em}img.sc-ic-menu{border-style:none}button.sc-ic-menu,input.sc-ic-menu,optgroup.sc-ic-menu,select.sc-ic-menu,textarea.sc-ic-menu{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button.sc-ic-menu,input.sc-ic-menu{overflow:visible}button.sc-ic-menu,select.sc-ic-menu{text-transform:none}button.sc-ic-menu,[type="button"].sc-ic-menu,[type="reset"].sc-ic-menu,[type="submit"].sc-ic-menu{-webkit-appearance:button}button.sc-ic-menu::-moz-focus-inner,[type="button"].sc-ic-menu::-moz-focus-inner,[type="reset"].sc-ic-menu::-moz-focus-inner,[type="submit"].sc-ic-menu::-moz-focus-inner{border-style:none;padding:0}button.sc-ic-menu:-moz-focusring,[type="button"].sc-ic-menu:-moz-focusring,[type="reset"].sc-ic-menu:-moz-focusring,[type="submit"].sc-ic-menu:-moz-focusring{outline:1px dotted ButtonText}fieldset.sc-ic-menu{padding:0.35em 0.75em 0.625em}legend.sc-ic-menu{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress.sc-ic-menu{vertical-align:baseline}textarea.sc-ic-menu{overflow:auto}[type="checkbox"].sc-ic-menu,[type="radio"].sc-ic-menu{box-sizing:border-box;padding:0}[type="number"].sc-ic-menu::-webkit-inner-spin-button,[type="number"].sc-ic-menu::-webkit-outer-spin-button{height:auto}[type="search"].sc-ic-menu{-webkit-appearance:textfield;outline-offset:-2px}[type="search"].sc-ic-menu::-webkit-search-decoration{-webkit-appearance:none}.sc-ic-menu::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details.sc-ic-menu{display:block}summary.sc-ic-menu{display:list-item}template.sc-ic-menu{display:none}[hidden].sc-ic-menu{display:none}html.sc-ic-menu,body.sc-ic-menu,div.sc-ic-menu,span.sc-ic-menu,applet.sc-ic-menu,object.sc-ic-menu,iframe.sc-ic-menu,h1.sc-ic-menu,h2.sc-ic-menu,h3.sc-ic-menu,h4.sc-ic-menu,h5.sc-ic-menu,h6.sc-ic-menu,p.sc-ic-menu,blockquote.sc-ic-menu,pre.sc-ic-menu,a.sc-ic-menu,abbr.sc-ic-menu,acronym.sc-ic-menu,address.sc-ic-menu,big.sc-ic-menu,cite.sc-ic-menu,code.sc-ic-menu,del.sc-ic-menu,dfn.sc-ic-menu,em.sc-ic-menu,img.sc-ic-menu,ins.sc-ic-menu,kbd.sc-ic-menu,q.sc-ic-menu,s.sc-ic-menu,samp.sc-ic-menu,small.sc-ic-menu,strike.sc-ic-menu,strong.sc-ic-menu,sub.sc-ic-menu,sup.sc-ic-menu,tt.sc-ic-menu,var.sc-ic-menu,b.sc-ic-menu,u.sc-ic-menu,i.sc-ic-menu,center.sc-ic-menu,dl.sc-ic-menu,dt.sc-ic-menu,dd.sc-ic-menu,ol.sc-ic-menu,ul.sc-ic-menu,li.sc-ic-menu,fieldset.sc-ic-menu,form.sc-ic-menu,label.sc-ic-menu,legend.sc-ic-menu,table.sc-ic-menu,caption.sc-ic-menu,tbody.sc-ic-menu,tfoot.sc-ic-menu,thead.sc-ic-menu,tr.sc-ic-menu,th.sc-ic-menu,td.sc-ic-menu,article.sc-ic-menu,aside.sc-ic-menu,canvas.sc-ic-menu,details.sc-ic-menu,embed.sc-ic-menu,figure.sc-ic-menu,figcaption.sc-ic-menu,footer.sc-ic-menu,header.sc-ic-menu,hgroup.sc-ic-menu,menu.sc-ic-menu,nav.sc-ic-menu,output.sc-ic-menu,ruby.sc-ic-menu,section.sc-ic-menu,summary.sc-ic-menu,time.sc-ic-menu,mark.sc-ic-menu,audio.sc-ic-menu,video.sc-ic-menu{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}@media (prefers-reduced-motion: no-preference){.ic-menu-open.sc-ic-menu-h .menu.sc-ic-menu{transition:max-height var(--ic-transition-duration-slow)}}.sc-ic-menu-h{max-height:0;width:var(--menu-width, var(--input-width, 20rem));color:var(--menu-item-text-color, var(--ic-menu-list-option-text-color));--ic-typography-color:var(\n --menu-item-text-color,\n var(--ic-menu-list-option-text-color)\n );background-color:var(\n --menu-bg-color,\n var(--ic-menu-list-option-background-color)\n );position:relative;z-index:var(--ic-z-index-menu);box-sizing:border-box;box-shadow:var(--ic-elevation-overlay);border-radius:var(--ic-border-radius)}.ic-menu-open.sc-ic-menu-h:not(.ic-menu-no-focus):focus-within{box-shadow:var(--ic-border-focus);outline:var(--ic-hc-focus-outline)}.ic-select-select-all-focused.sc-ic-menu-h{box-shadow:var(--ic-elevation-overlay) !important}#retry-button.sc-ic-menu::part(button){height:var(--ic-space-lg)}.small.sc-ic-menu #retry-button.sc-ic-menu::part(button){height:var(--ic-space-md)}.on-dialog.sc-ic-menu-h{inset:auto !important}.menu.sc-ic-menu{text-decoration:none;list-style-type:none;border-radius:1px;background-color:var(\n --menu-bg-color,\n var(--ic-menu-list-option-background-color)\n );visibility:hidden;max-height:0;overflow-y:hidden}.menu.sc-ic-menu:has(+.option-bar).sc-ic-menu{border-radius:0 0 1px 1px}.menu-scroll.sc-ic-menu{overflow-y:auto}.menu.sc-ic-menu:focus-visible{outline:none}.ic-menu-open.sc-ic-menu-h{max-height:none;display:flex;flex-direction:column-reverse;border:var(--ic-border-width) solid\n var(--menu-border-color, var(--ic-menu-border-color));transition:box-shadow var(--ic-easing-transition-fast)}.ic-menu-open.sc-ic-menu-h .menu.sc-ic-menu{visibility:visible;max-height:calc(var(--ic-space-xl) * 10 + var(--ic-space-xxxs))}.ic-menu-open.sc-ic-menu-h .option-bar.sc-ic-menu{visibility:visible}.ic-menu-open.sc-ic-menu-h .select-all-button.sc-ic-menu{display:block}.ic-menu-full-width.sc-ic-menu-h{width:100%}.option.sc-ic-menu{padding:var(--ic-space-xs) calc(var(--ic-space-xs) - var(--ic-space-1px));cursor:pointer;display:flex;align-items:center;gap:var(--ic-space-xs)}.loading-option.sc-ic-menu p.sc-ic-menu{margin-bottom:0 !important}.option.sc-ic-menu:not(.loading-option){justify-content:space-between}.ic-menu-small.sc-ic-menu-h .option.sc-ic-menu{padding:var(--ic-space-xxs) calc(var(--ic-space-xs) - var(--ic-space-1px))}.ic-menu-large.sc-ic-menu-h .option.sc-ic-menu{padding:var(--ic-space-sm) calc(var(--ic-space-xs) - var(--ic-space-1px))}.option.sc-ic-menu:last-child{border-radius:0 0 1px 1px}.sc-ic-menu:not(.menu:has(+.option-bar)).sc-ic-menu .option.sc-ic-menu:first-child{border-radius:1px 1px 0 0}.option.sc-ic-menu:not(.disabled-option):hover{background-color:var(--ic-menu-list-option-hover-background-color)}.option.sc-ic-menu:not(.disabled-option):active{background-color:var(--ic-menu-list-option-pressed-background-color)}.option.sc-ic-menu:focus-visible{outline:var(--ic-hc-focus-outline)}.option.sc-ic-menu:not(.disabled-option) .option-description.sc-ic-menu{--ic-typography-color:var(\n --menu-item-desc-text-color,\n var(--ic-menu-list-option-description-text-color)\n )}.option.sc-ic-menu .option-label.sc-ic-menu{display:flex;flex-direction:row;align-items:top}.option.sc-ic-menu .option-label.sc-ic-menu ic-typography.sc-ic-menu{max-width:100%;word-wrap:break-word}.option.sc-ic-menu .option-element.sc-ic-menu{margin-top:var(--ic-space-xxs)}.option.sc-ic-menu .option-icon.sc-ic-menu{height:var(--ic-space-md);width:var(--ic-space-md);margin-top:var(--ic-space-xxs);margin-right:var(--ic-space-xxs)}.option-text-container.sc-ic-menu{pointer-events:none;width:100%}.option-text-container.show-check-icon.sc-ic-menu{flex-grow:1}.option.loading-option.sc-ic-menu .option-text-container.sc-ic-menu{margin-left:calc(var(--ic-space-xs) + var(--ic-space-xxxs));color:var(--ic-menu-loading-list-option-text-color);--ic-typography-color:var(--ic-menu-loading-list-option-text-color)}.error-icon-svg.sc-ic-menu{height:var(--ic-space-md);width:var(--ic-space-md);fill:var(--ic-atoms-status-icon-error);align-self:center;display:flex;margin-right:calc(var(--ic-space-xxs) * 1.2)}.loading-error-info.sc-ic-menu{display:flex}.check-icon.sc-ic-menu{height:var(--ic-space-lg);min-width:var(--ic-space-lg);width:var(--ic-space-lg);pointer-events:none}.focused-option.sc-ic-menu .check-icon.sc-ic-menu *.sc-ic-menu{fill:currentcolor}.sc-ic-menu:first-child>.option-group-title.sc-ic-menu{padding:var(--ic-space-xs) calc(var(--ic-space-xs) - var(--ic-space-1px))\n var(--ic-space-xs)}.option-group-title.sc-ic-menu{padding:var(--ic-space-lg) calc(var(--ic-space-xs) - var(--ic-space-1px))\n var(--ic-space-xs);--ic-typography-color:var(--ic-menu-option-group-label-text-color)}.ic-menu-small.sc-ic-menu-h .option-group-title.sc-ic-menu{padding:var(--ic-space-sm) calc(var(--ic-space-xs) - var(--ic-space-1px))\n var(--ic-space-xxs)}.last-recommended-option.sc-ic-menu{border-bottom:var(--ic-menu-last-recommended-option-border)}.disabled-option.sc-ic-menu{color:var(--ic-atoms-list-option-text-disabled-light);--ic-typography-color:var(--ic-atoms-list-option-text-disabled-light);cursor:default;pointer-events:none}.focus-border.sc-ic-menu{border-radius:var(--ic-border-radius);padding:var(--ic-space-xxs);border:var(--ic-space-xxxs) dashed transparent;border-color:var(--ic-popover-menu-border);background-color:var(--ic-color-focus-inner) !important;--icon-height:auto}.focus-disabled.sc-ic-menu{background-color:var(--ic-color-focus-inner) !important;padding:calc(var(--ic-space-xs) - var(--ic-space-xxxs) - var(--ic-space-xxs))\n calc(\n var(--ic-space-xs) - var(--ic-space-1px) - var(--ic-space-xxxs) -\n var(--ic-space-xxs)\n )}.focused-option.sc-ic-menu,.focused-option.sc-ic-menu .option-description.sc-ic-menu{background-color:var(--ic-color-focus-inner) !important;color:var(--ic-atoms-list-option-text-focused-light) !important;--ic-typography-color:var(\n --ic-atoms-list-option-text-focused-light\n ) !important}.no-results.sc-ic-menu-h li.sc-ic-menu{cursor:no-drop}.no-results.sc-ic-menu-h li.sc-ic-menu:hover{background-color:transparent}.option-bar.sc-ic-menu{padding:var(--ic-space-xxs) var(--ic-space-xs);display:flex;align-items:center;justify-content:space-between;background-color:var(--ic-menu-option-bar-background-color);visibility:hidden;border-bottom:var(--ic-border-width) solid\n var(--ic-menu-option-bar-divider-color);border-radius:1px 1px 0 0}.option-bar.sc-ic-menu p.sc-ic-menu{margin-bottom:0 !important}.ic-menu-large.sc-ic-menu-h .option-bar.sc-ic-menu{padding:var(--ic-space-xs)}.select-all-button.sc-ic-menu{display:none}.select-all-button.sc-ic-menu:focus{z-index:calc(var(--ic-z-index-menu) + 1)}@media (forced-colors: active){.focused-option.sc-ic-menu{outline:none;border:0.125rem solid transparent}.disabled-option.sc-ic-menu{color:GrayText;--ic-typography-color:GrayText}}@media screen AND (max-width: 22rem){.sc-ic-menu-h{max-width:var(--menu-width, var(--input-width, 20rem));width:100%}}@media (prefers-reduced-motion: reduce){.ic-menu-open.sc-ic-menu-h{transition:none}}';const _=R;const I=class{constructor(e){i(this,e);this.icClear=s(this,"icClear",7);this.menuKeyPress=s(this,"menuKeyPress",7);this.menuOptionId=s(this,"menuOptionId",7);this.menuOptionSelect=s(this,"menuOptionSelect",7);this.menuOptionSelectAll=s(this,"menuOptionSelectAll",7);this.menuStateChange=s(this,"menuStateChange",7);this.retryButtonClicked=s(this,"retryButtonClicked",7);this.timeoutBlur=s(this,"timeoutBlur",7);this.ungroupedOptionsSet=s(this,"ungroupedOptionsSet",7);this.ACTIVE_DESCENDANT="aria-activedescendant";this.CLEAR_BUTTON_ID="clear-button";this.SEARCH_BAR_TAG="IC-SEARCH-BAR";this.disabledOptionSelected=false;this.hasPreviouslyBlurred=false;this.hasTimedOut=false;this.isLoading=false;this.lastOptionSelected=null;this.lastOptionFocused=null;this.multiOptionClicked=null;this.preventClickOpen=false;this.preventMenuFocus=false;this.shiftPressed=false;this.ungroupedOptions=[];this.focusFromSearchKeypress=false;this.initialOptionsListRender=false;this.keyboardNav=false;this.preventIncorrectTabOrder=false;this.popperProps={};this.activationType="automatic";this.autofocusOnSelected=true;this.closeOnSelect=true;this.fullWidth=false;this.labelField="label";this.multiSelect=false;this.searchableSelect=false;this.searchBar=false;this.searchMode="navigation";this.selectOnEnter=false;this.size="medium";this.valueField="value";this.allowMenuFocus=true;this.emitOptionId=i=>{let t;if(i>=0&&i<this.ungroupedOptions.length){t=this.ungroupedOptions[i]}else if(this.ungroupedOptions.length>0){t=i<0?this.ungroupedOptions[this.ungroupedOptions.length-1]:this.ungroupedOptions[0]}if(t){this.menuOptionId.emit({optionId:this.getOptionId(t[this.valueField])})}else{this.menuOptionId.emit({optionId:undefined})}};this.handleClearListener=()=>{this.optionHighlighted=""};this.handleSubmitSearch=()=>{const i=this.options.findIndex((i=>i[this.valueField]===this.optionHighlighted));this.setInputValue(i)};this.handleMenuChange=(i,t)=>{var e;this.menuStateChange.emit({open:i,focusInput:t});if(!i){if(t!==false){if(this.allowMenuFocus){(e=this.inputEl)===null||e===void 0?void 0:e.focus()}this.preventClickOpen=false}if(this.multiSelect){this.optionHighlighted=undefined;this.multiOptionClicked=null}}};this.setNextOptionValue=i=>{const t=i%this.ungroupedOptions.length;const e=this.ungroupedOptions[t];this.setHighlightedOption(t);if(e.disabled){this.menuOptionId.emit({optionId:this.getOptionId(e[this.valueField])})}else{this.menuOptionSelect.emit({value:e[this.valueField],optionId:this.getOptionId(e[this.valueField])})}};this.setPreviousOptionValue=i=>{const t=i%this.ungroupedOptions.length;const e=this.ungroupedOptions[t];this.setHighlightedOption(t);if(e.disabled){this.menuOptionId.emit({optionId:this.getOptionId(e[this.valueField])})}else{this.menuOptionSelect.emit({value:e[this.valueField],optionId:this.getOptionId(e[this.valueField])})}};this.arrowBehaviour=i=>{i.preventDefault();this.handleMenuChange(true)};this.getMenuOptions=()=>this.searchBar?this.options:this.ungroupedOptions;this.setHighlightedOption=i=>{const t=this.getMenuOptions();t[i]&&!t[i].timedOut&&(this.optionHighlighted=t[i][this.valueField]||undefined)};this.autoSetInputValueKeyboardOpen=i=>{const t=this.ungroupedOptions.findIndex((i=>i[this.valueField]===this.value));this.keyboardNav=false;switch(i.key){case"ArrowDown":{this.keyboardNav=true;this.arrowBehaviour(i);const e=t<this.ungroupedOptions.length-1?t+1:0;this.setNextOptionValue(e);this.emitOptionId(e);break}case"ArrowUp":{this.keyboardNav=true;this.arrowBehaviour(i);const e=t>0?t-1:this.ungroupedOptions.length-1;this.setPreviousOptionValue(e);this.emitOptionId(e);break}case"Home":{this.keyboardNav=true;i.preventDefault();this.arrowBehaviour(i);this.setNextOptionValue(-1);this.emitOptionId(0);break}case"End":{this.keyboardNav=true;i.preventDefault();this.arrowBehaviour(i);this.setPreviousOptionValue(this.ungroupedOptions.length);this.emitOptionId(this.ungroupedOptions.length-1);break}case" ":case"Enter":if(i.target.id!==this.CLEAR_BUTTON_ID){this.handleMenuChange(true)}break}};this.selectHighlightedOption=(i,t)=>{if(!this.isLoading&&!this.hasTimedOut){this.keyboardNav=true}const e=this.searchBar||this.searchableSelect||this.open;if(e){if(t>=0){if(i[t]!==undefined){if(this.searchBar&&i[t].disabled===true){this.disabledOptionSelected=true;this.optionHighlighted=undefined}else{this.setInputValue(t)}}}else{this.setInputValue(t)}}else{this.handleMenuChange(true)}};this.isOptionSelected=i=>{const t=this.getMenuOptions();return this.value?this.value.includes(t[i][this.valueField]):false};this.deselectSelectedOptions=i=>{const t=this.getMenuOptions();if(this.value){const e=this.value.map((i=>t.findIndex((t=>t[this.valueField]===i))));e.forEach((t=>!i.includes(t)&&this.setInputValue(t)))}};this.manualSetInputValueKeyboardOpen=i=>{const t=this.getMenuOptions();const e=i.shiftKey||i.metaKey||i.ctrlKey;const n=this.getOptionHighlightedIndex();const s=t.findIndex((i=>i[this.valueField]===this.multiOptionClicked));const o=i=>{var t;return(t=Array.from(this.host.querySelectorAll("li"))[i])===null||t===void 0?void 0:t.id};if(i.key===" "&&this.multiSelect){this.handleOptionSelect(i,n)}else{switch(i.key){case"ArrowDown":this.keyboardNav=true;this.arrowBehaviour(i);if(this.multiOptionClicked){this.setHighlightedOption(s);this.multiOptionClicked=null}else{this.handleSingleShiftSelect(i,n,t);if(n<t.length-1){this.setHighlightedOption(n+1);this.menuOptionId.emit({optionId:o(n+1)});this.handleSingleShiftSelect(i,n+1,t)}else{this.setHighlightedOption(0);this.menuOptionId.emit({optionId:o(0)});this.handleSingleShiftSelect(i,0,t)}if(this.multiSelect&&this.shiftPressed){this.deselectSelectedOptions([n,this.getOptionHighlightedIndex()]);this.shiftPressed=false}}this.lastOptionFocused=this.getOptionHighlightedIndex();this.preventIncorrectTabOrder=false;this.focusFromSearchKeypress=false;break;case"ArrowUp":this.keyboardNav=true;this.arrowBehaviour(i);if(this.multiOptionClicked){this.setHighlightedOption(s);this.multiOptionClicked=null}else{this.handleSingleShiftSelect(i,n,t);if(n<=0||n>t.length+1){this.setHighlightedOption(t.length-1);this.menuOptionId.emit({optionId:o(t.length-1)});this.handleSingleShiftSelect(i,t.length-1,t)}else{this.setHighlightedOption(n-1);this.menuOptionId.emit({optionId:o(n-1)});this.handleSingleShiftSelect(i,n-1,t)}if(this.multiSelect&&this.shiftPressed){this.deselectSelectedOptions([n,this.getOptionHighlightedIndex()]);this.shiftPressed=false}}this.lastOptionFocused=this.getOptionHighlightedIndex();this.preventIncorrectTabOrder=false;this.focusFromSearchKeypress=false;break;case"Home":{const t=0;this.keyboardNav=true;i.preventDefault();this.arrowBehaviour(i);this.setHighlightedOption(t);this.menuOptionId.emit({optionId:o(t)});if(i.shiftKey&&i.ctrlKey){this.handleMultipleShiftSelect(t)}this.lastOptionFocused=t;this.lastOptionSelected=t;break}case"End":{const e=t.length-1;this.keyboardNav=true;i.preventDefault();this.arrowBehaviour(i);this.setHighlightedOption(e);this.menuOptionId.emit({optionId:o(e)});if(i.shiftKey&&i.ctrlKey){this.handleMultipleShiftSelect(e)}this.lastOptionFocused=e;this.lastOptionSelected=e;break}case" ":if(!e){this.keyboardNav=false}if(this.searchBar||this.searchableSelect){break}else{if(i.target.id!==this.CLEAR_BUTTON_ID){this.handleMenuChange(true)}}break;case"Enter":i.preventDefault();if(!e){this.keyboardNav=false}this.handleOptionSelect(i,n);break;case"Escape":if(this.open){i.stopImmediatePropagation()}this.handleMenuChange(false,!this.allowMenuFocus);this.menuOptionId.emit({optionId:undefined});break;case"a":if(this.multiSelect&&(u()&&i.metaKey||!u()&&i.ctrlKey)){this.emitSelectAllEvents();this.lastOptionFocused=null;this.lastOptionSelected=null}break;case"Shift":case"Tab":if(i.key==="Shift"){this.shiftPressed=true}if(this.searchBar){this.keyboardNav=true}if(this.multiSelect){if(this.open&&!i.shiftKey&&this.selectAllButton){i.preventDefault();this.selectAllButton.focus();this.preventMenuFocus=true;this.preventClickOpen=true;this.optionHighlighted=undefined}}else{this.preventIncorrectTabOrder=true}break;default:if(!e){this.keyboardNav=false}this.focusOnSearchOrSelectInput(t,n)}}};this.setInputValue=i=>{const t=this.getMenuOptions();if(t[i]!==undefined&&!t[i].disabled){this.menuOptionSelect.emit({value:t[i][this.valueField]})}if(this.closeOnSelect){this.optionHighlighted=undefined;this.menuOptionId.emit({optionId:undefined})}if(this.closeOnSelect){if(!this.hasTimedOut){this.handleMenuChange(false)}else{this.parentEl.setFocus()}}};this.handleOptionClick=i=>{const{value:t,label:e}=i.target.dataset;if(this.multiSelect){const e=this.getMenuOptions();const n=e.findIndex((i=>i[this.valueField]===t));this.handleOptionSelect(i,n,true);this.multiOptionClicked=t||null}else{this.menuOptionSelect.emit({value:t,label:e});this.handleMenuChange(false)}this.optionHighlighted=undefined};this.handleRetry=()=>{this.retryButtonClicked.emit({value:this.value})};this.handleRetryKeyDown=i=>{if(i.key==="Enter"||i.key===" "){i.preventDefault();this.retryButtonClicked.emit({value:this.value,keyPressed:i.key})}};this.handleBlur=i=>{var t,e,n,s;if(i.relatedTarget!==this.inputEl){if(i.relatedTarget===this.selectAllButton){(t=this.menu)===null||t===void 0?void 0:t.removeAttribute(this.ACTIVE_DESCENDANT)}if(!(((e=this.menu)===null||e===void 0?void 0:e.contains(i.relatedTarget))||i.relatedTarget===this.selectAllButton)){this.handleMenuChange(false,this.hasPreviouslyBlurred);(n=this.menu)===null||n===void 0?void 0:n.removeAttribute(this.ACTIVE_DESCENDANT);this.lastOptionFocused=null;this.lastOptionSelected=null}}else{this.handleMenuChange(false);this.preventClickOpen=true;(s=this.menu)===null||s===void 0?void 0:s.removeAttribute(this.ACTIVE_DESCENDANT);this.lastOptionFocused=null;this.lastOptionSelected=null}if(!this.searchBar)this.hasPreviouslyBlurred=!!i.relatedTarget};this.handleMouseDown=i=>{i.preventDefault()};this.handleMenuKeyUp=i=>{if(i.key==="Tab"&&i.shiftKey){this.preventClickOpen=false}if(i.key==="Enter"&&this.disabledOptionSelected){this.disabledOptionSelected=false;i.stopImmediatePropagation()}if(i.key==="Shift"){this.shiftPressed=false}};this.handleSelectAllClick=()=>{var i;this.keyboardNav=false;if(this.allowMenuFocus){(i=this.menu)===null||i===void 0?void 0:i.focus()}this.emitSelectAllEvents();this.lastOptionFocused=null;this.lastOptionSelected=null};this.handleSelectAllBlur=i=>{var t,e,n;this.host.classList.remove("ic-select-select-all-focused");const s=i.relatedTarget;if(!((t=this.menu)===null||t===void 0?void 0:t.contains(s))&&!((n=(e=this.parentEl)===null||e===void 0?void 0:e.shadowRoot)===null||n===void 0?void 0:n.contains(s))){this.handleMenuChange(false,false)}};this.handleSelectAllFocus=()=>{this.host.classList.add("ic-select-select-all-focused");this.lastOptionFocused=null;this.lastOptionSelected=null};this.handleSelectAllMouseDown=i=>{i.preventDefault()};this.handleSingleShiftSelect=(i,t,e)=>{if(this.multiSelect&&i.shiftKey&&!this.isOptionSelected(t)){this.selectHighlightedOption(e,t);this.lastOptionSelected=t}};this.handleMultipleShiftSelect=(i,t=false,e=null)=>{this.shiftPressed=false;const n=e===null?this.getFirstOptionInSelection(t):e;if(n!==null){const t=[];if(n<i){for(let e=n;e<i+1;e++){t.push(e)}}else{for(let e=n;e>i-1;e--){t.push(e)}}t.forEach((i=>!this.isOptionSelected(i)&&this.setInputValue(i)));this.deselectSelectedOptions(t)}};this.handleOptionSelect=(i,t,e=false)=>{const n=this.getMenuOptions();const s=this.getFirstOptionInSelection(e);if(i.shiftKey&&s!==null){this.handleMultipleShiftSelect(t,e,s)}else{this.selectHighlightedOption(n,t)}this.lastOptionFocused=t;this.lastOptionSelected=t};this.getFirstOptionInSelection=i=>i&&this.lastOptionFocused!==null?this.lastOptionFocused:this.lastOptionSelected!==null?this.lastOptionSelected:null;this.emitSelectAllEvents=()=>{var i,t;const e=this.ungroupedOptions.filter((i=>!i.disabled)).length;this.menuOptionSelectAll.emit({select:!this.value||!(((i=this.value)===null||i===void 0?void 0:i.length)===e)});if(((t=this.value)===null||t===void 0?void 0:t.length)===e){this.icClear.emit()}};this.emitMenuKeyPress=(i,t)=>{this.menuKeyPress.emit({isNavKey:i,key:t})};this.autoSetValueOnMenuKeyDown=i=>{var t;i.cancelBubble=true;const e=this.getOptionHighlightedIndex();const n=e>=0?e:this.ungroupedOptions.findIndex((i=>i[this.valueField]===this.value));const s=!!this.inputEl&&this.inputEl.tagName==="INPUT";this.keyboardNav=false;switch(i.key){case" ":i.preventDefault();break;case"ArrowUp":if(!this.hasTimedOut){i.preventDefault();const t=n>0?n-1:this.ungroupedOptions.length-1;this.setPreviousOptionValue(t);this.emitOptionId(t);this.keyboardNav=true}break;case"ArrowDown":if(!this.hasTimedOut){i.preventDefault();const t=n<this.ungroupedOptions.length-1?n+1:0;this.setNextOptionValue(t);this.emitOptionId(t);this.keyboardNav=true}break;case"Home":this.menuOptionSelect.emit({value:this.ungroupedOptions[0][this.valueField]});this.emitOptionId(0);this.keyboardNav=true;break;case"End":this.menuOptionSelect.emit({value:this.ungroupedOptions[this.ungroupedOptions.length-1][this.valueField]});this.emitOptionId(this.ungroupedOptions.length-1);this.keyboardNav=true;break;case"Enter":!this.hasTimedOut&&this.handleMenuChange(false);break;case"Escape":this.handleMenuChange(false,!this.allowMenuFocus);break;case"Backspace":break;case"Shift":break;default:if(s&&i.key!=="Tab"&&!this.hasTimedOut){(t=this.inputEl)===null||t===void 0?void 0:t.focus()}if(i.key.length===1){this.keyboardNav=true}break}this.emitMenuKeyPress(this.keyboardNav,i.key)};this.getOptionId=i=>`${this.menuId}-${i}`;this.getOptionAriaLabel=(i,t)=>{let e=i[this.labelField];if(i.description){e=`${e}, ${i.description}`}if(i.element){e=`${e}, ${i.element.ariaLabel}`}if(t){return`${e}, ${t[this.labelField]} group`}else{return e}};this.getSortedOptions=i=>{let t=[];if(i.sort){t=i.sort(((i,t)=>i.recommended&&!t.recommended?-1:0))}return t};this.getOptionHighlightedIndex=()=>{const i=this.getMenuOptions();return i.findIndex((i=>i[this.valueField]===this.optionHighlighted))};this.isManualMode=this.activationType==="manual";this.scrollToSelected=()=>{var i;const t=this.menu;const e=this.selectOnEnter||this.searchableSelect||this.multiSelect?this.host.querySelector(`li[data-value="${this.optionHighlighted}"]`):t.querySelector(".option[aria-selected='true']");if(e){const n=t.getBoundingClientRect();const s=e.getBoundingClientRect();if(s.top<n.top){t.scrollTop-=n.top-s.top}else if(s.bottom>n.bottom){t.scrollTop+=s.bottom-n.bottom}(i=this.menu)===null||i===void 0?void 0:i.setAttribute(this.ACTIVE_DESCENDANT,e.id);if(this.allowMenuFocus){e.focus()}}};this.loadUngroupedOptions=()=>{if(this.options.length>0&&this.options.map){this.options.map((i=>{if(i.children){i.children.map((i=>!i.disabled&&this.ungroupedOptions.push(i)))}else{this.ungroupedOptions.push(i)}}))}this.ungroupedOptions=this.getSortedOptions(this.ungroupedOptions);this.ungroupedOptionsSet.emit({options:this.ungroupedOptions})};this.setMenuScrollbar=()=>{var i;let t=0;this.host.querySelectorAll(".option, .option-group-title").forEach((i=>t+=i.clientHeight));if(t>=320){(i=this.menu)===null||i===void 0?void 0:i.classList.add("menu-scroll")}};this.handleTimeoutBlur=i=>{this.timeoutBlur.emit({ev:i})};this.optionContent=(i,e)=>{var n;const s=!!i[this.valueField]&&!!this.value&&e&&((n=this.parentEl)===null||n===void 0?void 0:n.tagName)!==this.SEARCH_BAR_TAG;return t(o,null,i.loading&&t("ic-loading-indicator",{size:"icon"}),t("div",{class:{"option-text-container":true,"show-check-icon":s,"focus-border":(this.keyboardNav||this.initialOptionsListRender)&&i[this.valueField]===this.optionHighlighted&&!!i.disabled}},(i.icon||!i.hideLabel)&&t("div",{class:"option-label"},i.icon&&t("div",{class:"option-icon",innerHTML:z(i.icon),"aria-hidden":"true"}),!i.hideLabel&&t("ic-typography",{variant:"body","aria-hidden":"true"},i[this.labelField])),i.description&&t("ic-typography",{id:`${this.getOptionId(i[this.valueField])}-description`,class:"option-description",variant:"caption","aria-hidden":"true"},t("p",null,i.description)),i.element&&t("div",{class:{"option-element":i.icon||!i.hideLabel||i.description},innerHTML:L(i.element.component),"aria-hidden":"true"})),s&&t("span",{class:"check-icon",innerHTML:f,"aria-hidden":"true"}))};this.displayOption=(i,e,n,s)=>{var c;const{open:r,keyboardNav:a,isManualMode:l,initialOptionsListRender:u,optionHighlighted:h,options:d}=this;return t("li",Object.assign({id:this.getOptionId(i[this.valueField]),class:{option:true,"focused-option":l?(a||u)&&i[this.valueField]===h&&!i.disabled:a&&i[this.valueField]===h&&!i.disabled,"focus-disabled":l?(a||u)&&i[this.valueField]===h&&!!i.disabled:a&&i[this.valueField]===h&&!!i.disabled,"last-recommended-option":!!(i.recommended&&d[n+1]&&!d[n+1].recommended),"disabled-option":!!i.disabled,"loading-option":!!i.loading,timeout:!!i.timedOut},role:"option",tabindex:!this.allowMenuFocus?"-1":r&&(e||i[this.valueField]===h)&&a?"0":"-1","aria-label":this.getOptionAriaLabel(i,s),"aria-selected":e?"true":"false","aria-disabled":i.disabled?"true":"false",onClick:!i.timedOut&&!i.loading?this.handleOptionClick:undefined,onBlur:this.handleBlur,onMouseDown:this.handleMouseDown,"data-value":i[this.valueField],"data-label":i[this.labelField]},(c=i.htmlProps)!==null&&c!==void 0?c:{}),i.timedOut?t(o,null,t("div",{class:"loading-error-info"},t("svg",{class:"error-icon-svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#000000"},t("title",null,"Error"),t("g",null,t("path",{d:"M8.77 3L3.5 8.27V15.73L8.77 21H16.23L21.5 15.73V8.27L16.23 3M8.91 7L12.5 10.59L16.09 7L17.5 8.41L13.91 12L17.5 15.59L16.09 17L12.5 13.41L8.91 17L7.5 15.59L11.09 12L7.5 8.41"}))),t("ic-typography",{variant:"label"},i[this.labelField])),t("ic-button",{size:"small",variant:"tertiary",onClick:this.handleRetry,onKeyDown:this.handleRetryKeyDown,onBlur:this.handleTimeoutBlur,id:"retry-button"},"Retry")):this.optionContent(i,e))}}watchOpenHandler(){if(!this.open&&this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}}watchOptionsHandler(i){this.hasTimedOut=i.some((i=>i.timedOut));this.isLoading=i.some((i=>i.loading));this.ungroupedOptions=[];this.loadUngroupedOptions()}connectedCallback(){if(this.searchBar){if(this.searchMode==="navigation")this.setHighlightedOption(0);this.initialOptionsListRender=true}}disconnectedCallback(){var i,t,e;(i=this.popperInstance)===null||i===void 0?void 0:i.destroy();(t=this.parentEl)===null||t===void 0?void 0:t.removeEventListener("icClear",this.handleClearListener);(e=this.parentEl)===null||e===void 0?void 0:e.removeEventListener("icSubmitSearch",this.handleSubmitSearch)}componentWillLoad(){var i,t,e,n;this.loadUngroupedOptions();(i=this.parentEl)===null||i===void 0?void 0:i.addEventListener("icClear",this.handleClearListener);(t=this.parentEl)===null||t===void 0?void 0:t.addEventListener("icSubmitSearch",this.handleSubmitSearch);this.hasTimedOut=(e=this.options)===null||e===void 0?void 0:e.some((i=>i.timedOut));this.isLoading=(n=this.options)===null||n===void 0?void 0:n.some((i=>i.loading))}componentDidLoad(){if(this.searchBar&&this.parentEl.disableAutoFiltering){this.focusFromSearchKeypress=true}h([{prop:this.open,propName:"open"},{prop:this.options,propName:"options"},{prop:this.menuId,propName:"menu-id"},{prop:this.inputLabel,propName:"input-label"}],"Menu")}componentDidUpdate(){const i=this.options.some((i=>i[this.valueField]===this.value));if(this.menu&&this.open&&this.options.length!==0&&!this.preventMenuFocus){if(this.value&&this.keyboardNav&&i&&this.autofocusOnSelected&&!this.searchableSelect){this.scrollToSelected()}else if(!!this.optionHighlighted&&!this.focusFromSearchKeypress&&!this.preventIncorrectTabOrder){const i=this.host.querySelector(`li[data-value="${this.optionHighlighted}"]`);if(i){this.menu.setAttribute(this.ACTIVE_DESCENDANT,i.id);if(this.allowMenuFocus){i.focus()}}}else if(this.inputEl&&this.inputEl.tagName!=="INPUT"&&this.allowMenuFocus){this.menu.focus()}}if(this.menu&&this.open){this.scrollToSelected()}this.preventMenuFocus=false}componentDidRender(){if(this.open&&!this.popperInstance&&this.anchorEl){this.initPopperJs(this.anchorEl)}if(this.open&&!!this.options.length){this.setMenuScrollbar()}}async handleClickOpen(){if(!this.preventClickOpen){this.menuStateChange.emit({open:!this.open});this.keyboardNav=false}this.preventClickOpen=false}async handleKeyboardOpen(i){if(this.activationType==="automatic"){this.autoSetInputValueKeyboardOpen(i)}else{this.manualSetInputValueKeyboardOpen(i)}}async handleMenuKeyDown(i){if(this.activationType==="automatic"){this.autoSetValueOnMenuKeyDown(i)}else if(this.activationType==="manual"&&!this.searchBar){this.manualSetInputValueKeyboardOpen(i)}}async handleSetFirstOption(){this.setHighlightedOption(0)}async initPopperJs(i){this.popperInstance=b(i,this.host,Object.assign({placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[0,7]}},{name:"flip",options:{fallbackPlacements:["top-start"],rootBoundary:"viewport"}}]},this.popperProps))}async setExternalPopperProps(i){this.popperProps=i}focusOnSearchOrSelectInput(i,t){if(!i[t])return;if(this.searchBar){this.parentEl.setFocus();if(this.searchMode==="navigation")this.setHighlightedOption(0)}if(this.searchableSelect){this.parentEl.setFocus()}this.focusFromSearchKeypress=true}render(){const{inputLabel:i,options:n,menuId:s,value:o,fullWidth:c,hasTimedOut:r,isLoading:a,size:l,open:u,inputEl:h,keyboardNav:p,parentEl:m,SEARCH_BAR_TAG:f,multiSelect:b}=this;const v=this.ungroupedOptions.filter((i=>!i.disabled)).length;const g=`${(o===null||o===void 0?void 0:o.length)===v?"Clear":"Select"} all`;const y=this.host.classList.contains("no-results");return t(e,{key:"f2126f99757d13606827ea1eac7c08b023b97bae",class:{"ic-menu-full-width":!!c,"ic-menu-no-focus":(h===null||h===void 0?void 0:h.tagName)==="INPUT"&&(m===null||m===void 0?void 0:m.tagName)!==f||r||a,[`ic-menu-${l}`]:true,"ic-menu-open":u&&n.length!==0,"ic-menu-multiple":b}},n.length!==0&&t("ul",{key:"9b41a2c0ab9d6b08dca829db341614b248675050",id:s,class:"menu",role:"listbox","aria-label":`${i} pop-up`,"aria-multiselectable":b?"true":"false","aria-activedescendant":this.optionHighlighted?this.getOptionId(this.optionHighlighted):undefined,tabindex:!this.allowMenuFocus?"-1":u&&!p&&((h===null||h===void 0?void 0:h.tagName)!=="INPUT"||(m===null||m===void 0?void 0:m.tagName)===f)?"0":"-1",ref:i=>this.menu=i,onKeyDown:this.handleMenuKeyDown,onKeyUp:this.handleMenuKeyUp,onBlur:this.handleBlur},this.getSortedOptions(n).map(((i,e)=>{if(i.children){if(i.children.length>0){return t("div",null,t("ic-typography",{class:"option-group-title",role:"presentation",variant:"subtitle-small"},t("p",null,i[this.labelField])),i.children.map((t=>t[this.labelField]&&this.displayOption(t,b?o===null||o===void 0?void 0:o.includes(t[this.valueField]):t[this.valueField]===o,e,i))))}else{return null}}else{return i[this.labelField]&&this.displayOption(i,b?o===null||o===void 0?void 0:o.includes(i[this.valueField]):i[this.valueField]===o,e)}}))),n.length!==0&&b&&!a&&!r&&!y&&t("div",{key:"7440008eccba1fc099d09ae3916e0d186686d59e",class:"option-bar"},t("ic-typography",{key:"802bd46a5d028a541060eb4cc57c2c4607cb1b86"},t("p",{key:"17a482e5bbff099b44550f9800980a649a319358"},`${o?o.length:0}/${d(this.options)} selected`)),t("ic-button",{key:"5aa400fd2be98bc038400b699c33bd2b1814cb5d",class:"select-all-button","aria-label":`${g} options for ${i}`,ref:i=>this.selectAllButton=i,variant:"tertiary",onClick:this.handleSelectAllClick,onMouseDown:this.handleSelectAllMouseDown,onBlur:this.handleSelectAllBlur,onFocus:this.handleSelectAllFocus,size:l==="small"?"small":"medium"},g)))}get host(){return n(this)}static get watchers(){return{open:["watchOpenHandler"],options:["watchOptionsHandler"]}}};I.style=_;export{y as ic_input_component_container,k as ic_input_container,I as ic_menu};
|
|
3
|
-
//# sourceMappingURL=p-fdc4376e.entry.js.map
|