@ukic/canary-web-components 2.0.0-canary.28 → 2.0.0-canary.29
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-data-table.cjs.entry.js +62 -8
- package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-date-input.cjs.entry.js +3 -2
- package/dist/cjs/ic-date-input.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +3 -2
- package/dist/cjs/ic-horizontal-scroll.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-menu-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-menu-item.cjs.entry.js +10 -6
- package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-menu.cjs.entry.js +3 -2
- package/dist/cjs/ic-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-group.cjs.entry.js +3 -2
- package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js +28 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-popover-menu.cjs.entry.js +3 -3
- package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-side-navigation.cjs.entry.js +2 -1
- package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tab-context.cjs.entry.js +2 -1
- package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js +1 -1
- package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-tree-item.cjs.entry.js +3 -1
- package/dist/cjs/ic-tree-item.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ic-data-table/ic-data-table.css +20 -0
- package/dist/collection/components/ic-data-table/ic-data-table.js +82 -8
- package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
- package/dist/collection/components/ic-data-table/story-data.js +7 -0
- package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
- package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js +17 -0
- package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js.map +1 -1
- package/dist/collection/components/ic-date-input/ic-date-input.css +4 -0
- package/dist/collection/components/ic-date-input/ic-date-input.js +2 -1
- package/dist/collection/components/ic-date-input/ic-date-input.js.map +1 -1
- package/dist/collection/components/ic-tree-item/ic-tree-item.js +3 -1
- package/dist/collection/components/ic-tree-item/ic-tree-item.js.map +1 -1
- package/dist/components/helpers2.js +1 -1
- package/dist/components/ic-checkbox.js.map +1 -1
- package/dist/components/ic-data-table.js +65 -9
- package/dist/components/ic-data-table.js.map +1 -1
- package/dist/components/ic-date-input2.js +3 -2
- package/dist/components/ic-date-input2.js.map +1 -1
- package/dist/components/ic-horizontal-scroll2.js +3 -2
- package/dist/components/ic-horizontal-scroll2.js.map +1 -1
- package/dist/components/ic-menu-group.js +1 -1
- package/dist/components/ic-menu-group.js.map +1 -1
- package/dist/components/ic-menu-item2.js +12 -8
- package/dist/components/ic-menu-item2.js.map +1 -1
- package/dist/components/ic-menu2.js +3 -2
- package/dist/components/ic-menu2.js.map +1 -1
- package/dist/components/ic-navigation-group.js +3 -2
- package/dist/components/ic-navigation-group.js.map +1 -1
- package/dist/components/ic-navigation-item.js +30 -2
- package/dist/components/ic-navigation-item.js.map +1 -1
- package/dist/components/ic-pagination-bar2.js +1 -1
- package/dist/components/ic-popover-menu.js +3 -3
- package/dist/components/ic-popover-menu.js.map +1 -1
- package/dist/components/ic-select2.js.map +1 -1
- package/dist/components/ic-side-navigation.js +2 -1
- package/dist/components/ic-side-navigation.js.map +1 -1
- package/dist/components/ic-tab-context.js +2 -1
- package/dist/components/ic-tab-context.js.map +1 -1
- package/dist/components/ic-text-field2.js.map +1 -1
- package/dist/components/ic-toggle-button-group.js +1 -1
- package/dist/components/ic-toggle-button-group.js.map +1 -1
- package/dist/components/ic-tree-item.js +3 -1
- package/dist/components/ic-tree-item.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-09746a07.entry.js +2 -0
- package/dist/core/p-09746a07.entry.js.map +1 -0
- package/dist/core/p-097bfd3f.entry.js +2 -0
- package/dist/core/{p-fc76d510.entry.js.map → p-097bfd3f.entry.js.map} +1 -1
- package/dist/core/{p-d02a4d1b.entry.js → p-0cba186f.entry.js} +2 -2
- package/dist/core/{p-d02a4d1b.entry.js.map → p-0cba186f.entry.js.map} +1 -1
- package/dist/core/{p-5741a8bf.entry.js → p-1a317582.entry.js} +2 -2
- package/dist/core/p-1f262ffe.entry.js +2 -0
- package/dist/core/p-1f262ffe.entry.js.map +1 -0
- package/dist/core/p-2ecedbe5.entry.js.map +1 -1
- package/dist/core/p-3848f199.entry.js +2 -0
- package/dist/core/p-3848f199.entry.js.map +1 -0
- package/dist/core/{p-7435de65.js → p-40510c97.js} +2 -2
- package/dist/core/{p-a7794aa9.entry.js → p-4352b9c5.entry.js} +2 -2
- package/dist/core/p-4352b9c5.entry.js.map +1 -0
- package/dist/core/{p-6358925c.entry.js → p-43a2cad3.entry.js} +2 -2
- package/dist/core/{p-6358925c.entry.js.map → p-43a2cad3.entry.js.map} +1 -1
- package/dist/core/{p-07e4b89b.entry.js → p-4fd35690.entry.js} +2 -2
- package/dist/core/{p-7ee62798.entry.js → p-810561ab.entry.js} +2 -2
- package/dist/core/{p-d8322108.entry.js → p-9b70d4f8.entry.js} +2 -2
- package/dist/core/p-9b70d4f8.entry.js.map +1 -0
- package/dist/core/{p-3ce541df.entry.js → p-cf4572c9.entry.js} +2 -2
- package/dist/core/{p-6ca98c5d.entry.js → p-d56248df.entry.js} +2 -2
- package/dist/core/p-d56248df.entry.js.map +1 -0
- package/dist/core/{p-6b01e096.entry.js → p-d56593cc.entry.js} +2 -2
- package/dist/core/p-d56593cc.entry.js.map +1 -0
- package/dist/core/{p-d10e81f3.entry.js → p-dcb7d549.entry.js} +2 -2
- package/dist/core/p-dcb7d549.entry.js.map +1 -0
- package/dist/core/{p-d86cdbc8.entry.js → p-de630a67.entry.js} +2 -2
- package/dist/core/p-de630a67.entry.js.map +1 -0
- package/dist/core/p-e210f51a.entry.js.map +1 -1
- package/dist/core/{p-b03d14fc.entry.js → p-e35d6d78.entry.js} +2 -2
- package/dist/core/{p-89c7ea3e.entry.js → p-f39cf43c.entry.js} +2 -2
- package/dist/core/p-f39cf43c.entry.js.map +1 -0
- package/dist/core/{p-3ef5017d.entry.js → p-f4e57aaf.entry.js} +2 -2
- package/dist/core/p-f4e57aaf.entry.js.map +1 -0
- package/dist/core/{p-ac591209.entry.js → p-f6a93c4d.entry.js} +2 -2
- package/dist/esm/core.js +1 -1
- package/dist/esm/{helpers-c24d4455.js → helpers-e0c3e667.js} +2 -2
- package/dist/esm/{helpers-c24d4455.js.map → helpers-e0c3e667.js.map} +1 -1
- package/dist/esm/ic-card-horizontal.entry.js +1 -1
- package/dist/esm/ic-checkbox.entry.js.map +1 -1
- package/dist/esm/ic-data-table-title-bar.entry.js +1 -1
- package/dist/esm/ic-data-table.entry.js +63 -9
- package/dist/esm/ic-data-table.entry.js.map +1 -1
- package/dist/esm/ic-date-input.entry.js +4 -3
- package/dist/esm/ic-date-input.entry.js.map +1 -1
- package/dist/esm/ic-date-picker.entry.js +1 -1
- package/dist/esm/ic-empty-state_2.entry.js +1 -1
- package/dist/esm/ic-horizontal-scroll.entry.js +3 -2
- package/dist/esm/ic-horizontal-scroll.entry.js.map +1 -1
- package/dist/esm/ic-menu-group.entry.js +1 -1
- package/dist/esm/ic-menu-group.entry.js.map +1 -1
- package/dist/esm/ic-menu-item.entry.js +10 -6
- package/dist/esm/ic-menu-item.entry.js.map +1 -1
- package/dist/esm/ic-menu-with-multi.entry.js +1 -1
- package/dist/esm/ic-menu.entry.js +3 -2
- package/dist/esm/ic-menu.entry.js.map +1 -1
- package/dist/esm/ic-navigation-group.entry.js +3 -2
- package/dist/esm/ic-navigation-group.entry.js.map +1 -1
- package/dist/esm/ic-navigation-item.entry.js +29 -2
- package/dist/esm/ic-navigation-item.entry.js.map +1 -1
- package/dist/esm/ic-pagination_4.entry.js.map +1 -1
- package/dist/esm/ic-popover-menu.entry.js +3 -3
- package/dist/esm/ic-popover-menu.entry.js.map +1 -1
- package/dist/esm/ic-select-with-multi.entry.js +1 -1
- package/dist/esm/ic-side-navigation.entry.js +2 -1
- package/dist/esm/ic-side-navigation.entry.js.map +1 -1
- package/dist/esm/ic-tab-context.entry.js +2 -1
- package/dist/esm/ic-tab-context.entry.js.map +1 -1
- package/dist/esm/ic-toggle-button-group.entry.js +1 -1
- package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
- package/dist/esm/ic-tree-item.entry.js +4 -2
- package/dist/esm/ic-tree-item.entry.js.map +1 -1
- package/dist/esm/ic-tree-view.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-data-table/ic-data-table.d.ts +11 -0
- package/dist/types/components/ic-data-table/story-data.d.ts +1 -0
- package/dist/types/components.d.ts +8 -0
- package/hydrate/index.js +124 -34
- package/package.json +3 -3
- package/dist/core/p-3ef5017d.entry.js.map +0 -1
- package/dist/core/p-6b01e096.entry.js.map +0 -1
- package/dist/core/p-6ca98c5d.entry.js.map +0 -1
- package/dist/core/p-89c7ea3e.entry.js.map +0 -1
- package/dist/core/p-8f0660ec.entry.js +0 -2
- package/dist/core/p-8f0660ec.entry.js.map +0 -1
- package/dist/core/p-a7794aa9.entry.js.map +0 -1
- package/dist/core/p-bdb5addb.entry.js +0 -2
- package/dist/core/p-bdb5addb.entry.js.map +0 -1
- package/dist/core/p-d10e81f3.entry.js.map +0 -1
- package/dist/core/p-d8322108.entry.js.map +0 -1
- package/dist/core/p-d86cdbc8.entry.js.map +0 -1
- package/dist/core/p-f09b2041.entry.js +0 -2
- package/dist/core/p-f09b2041.entry.js.map +0 -1
- package/dist/core/p-fc76d510.entry.js +0 -2
- /package/dist/core/{p-5741a8bf.entry.js.map → p-1a317582.entry.js.map} +0 -0
- /package/dist/core/{p-7435de65.js.map → p-40510c97.js.map} +0 -0
- /package/dist/core/{p-07e4b89b.entry.js.map → p-4fd35690.entry.js.map} +0 -0
- /package/dist/core/{p-7ee62798.entry.js.map → p-810561ab.entry.js.map} +0 -0
- /package/dist/core/{p-3ce541df.entry.js.map → p-cf4572c9.entry.js.map} +0 -0
- /package/dist/core/{p-b03d14fc.entry.js.map → p-e35d6d78.entry.js.map} +0 -0
- /package/dist/core/{p-ac591209.entry.js.map → p-f6a93c4d.entry.js.map} +0 -0
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as i,c as e,h as s,F as t,H as c,g as n}from"./p-8455d1bb.js";import{C as o}from"./p-0aa9ce8b.js";import{a}from"./p-8128572e.js";import{c as r}from"./p-aae38bee.js";import"./p-fd186591.js";const h='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){.open.sc-ic-menu-h .menu.sc-ic-menu{transition:max-height var(--ic-transition-duration-slow)}}.sc-ic-menu-h{border-radius:var(--ic-border-radius);max-height:0;width:var(--input-width, 20rem);color:var(--ic-color-primary-text);background-color:var(--ic-architectural-white);position:relative;z-index:var(--ic-z-index-menu);box-sizing:border-box;box-shadow:var(--ic-elevation-overlay)}.sc-ic-menu-h:not(.no-focus):focus-within{box-shadow:var(--ic-border-focus)}#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:var(--ic-border-width) solid var(--ic-architectural-400);border-radius:var(--ic-border-radius);background-color:var(--ic-architectural-white);visibility:hidden;max-height:0;overflow-y:hidden}.menu-scroll.sc-ic-menu{overflow-y:auto}.menu.sc-ic-menu:focus-visible{outline:none}.open.sc-ic-menu-h{max-height:none;display:block}.open.sc-ic-menu-h .menu.sc-ic-menu{visibility:visible;max-height:calc(var(--ic-space-xl) * 10 + var(--ic-space-xxxs))}.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;overflow-wrap:anywhere}.option.sc-ic-menu:not(.loading-option){justify-content:space-between}.small.sc-ic-menu-h .option.sc-ic-menu{padding:var(--ic-space-xxs) calc(var(--ic-space-xs) - var(--ic-space-1px))}.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 var(--ic-space-1px) var(--ic-space-1px)}.option.sc-ic-menu:first-child{border-radius:var(--ic-space-1px) var(--ic-space-1px) 0 0}.option.sc-ic-menu:not(.disabled-option):hover{background-color:var(--ic-action-dark-bg-hover)}.option.sc-ic-menu:not(.disabled-option):active{background-color:var(--ic-action-dark-bg-active)}.option.sc-ic-menu:focus-visible{outline:var(--ic-hc-focus-outline)}.option.sc-ic-menu:not(.disabled-option) .option-description.sc-ic-menu{color:var(--ic-color-secondary-text)}.option.sc-ic-menu .option-label.sc-ic-menu{display:flex;flex-direction:row;align-items:top}.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-xxxs)}.option-text-container.sc-ic-menu{pointer-events:none}.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-color-secondary-text)}.error-icon-svg.sc-ic-menu{height:var(--ic-space-md);width:var(--ic-space-md);fill:var(--ic-status-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);width:var(--ic-space-lg);margin-left:var(--ic-space-xs);pointer-events:none}.focused-option.sc-ic-menu .check-icon.sc-ic-menu *.sc-ic-menu{fill:currentcolor}.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);color:var(--ic-color-tertiary-text)}.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-border-default)}.disabled-option.sc-ic-menu{color:var(--ic-architectural-200);cursor:default;pointer-events:none}.focused-option.sc-ic-menu,.focused-option.sc-ic-menu .option-description.sc-ic-menu{background-color:var(--ic-focus-blue) !important;color:var(--ic-color-white-text) !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}@media (forced-colors: active){.focused-option.sc-ic-menu:focus{outline:none;border:0.125rem solid transparent}}';const u=class{constructor(c){i(this,c);this.menuKeyPress=e(this,"menuKeyPress",7);this.menuOptionId=e(this,"menuOptionId",7);this.menuOptionSelect=e(this,"menuOptionSelect",7);this.menuStateChange=e(this,"menuStateChange",7);this.menuValueChange=e(this,"menuValueChange",7);this.retryButtonClicked=e(this,"retryButtonClicked",7);this.timeoutBlur=e(this,"timeoutBlur",7);this.ungroupedOptionsSet=e(this,"ungroupedOptionsSet",7);this.disabledOptionSelected=false;this.hasPreviouslyBlurred=false;this.hasTimedOut=false;this.isLoading=false;this.isSearchBar=false;this.isSearchableSelect=false;this.preventClickOpen=false;this.ungroupedOptions=[];this.handleClearListener=()=>{this.optionHighlighted=""};this.handleSubmitSearch=()=>{const i=this.options.findIndex((i=>i[this.valueField]===this.optionHighlighted));this.setInputValue(i)};this.handleMenuChange=(i,e)=>{this.menuStateChange.emit({open:i,focusInput:e});if(!i&&e!==false){this.inputEl.focus();this.preventClickOpen=false}};this.setNextOptionValue=i=>{if(this.ungroupedOptions[i+1]){this.menuOptionSelect.emit({value:this.ungroupedOptions[i+1][this.valueField],optionId:this.getOptionId(this.ungroupedOptions[i+1][this.valueField])})}else{this.menuOptionSelect.emit({value:this.ungroupedOptions[0][this.valueField],optionId:this.getOptionId(this.ungroupedOptions[0][this.valueField])})}};this.setPreviousOptionValue=i=>{if(this.ungroupedOptions[i-1]){this.menuOptionSelect.emit({value:this.ungroupedOptions[i-1][this.valueField],optionId:this.getOptionId(this.ungroupedOptions[i-1][this.valueField])})}else{this.menuOptionSelect.emit({value:this.ungroupedOptions[this.ungroupedOptions.length-1][this.valueField],optionId:this.getOptionId(this.ungroupedOptions[this.ungroupedOptions.length-1][this.valueField])})}};this.getParentEl=i=>{if(i.tagName==="IC-SEARCH-BAR"){this.isSearchBar=true}else if(i.tagName==="IC-SELECT"&&i.getAttribute("searchable")!==null&&i.getAttribute("searchable")!==undefined){this.isSearchableSelect=true}};this.arrowBehaviour=i=>{i.preventDefault();this.handleMenuChange(true)};this.setMenuOptions=()=>this.isSearchBar?this.options:this.ungroupedOptions;this.setHighlightedOption=i=>{const e=this.setMenuOptions();e[i]&&!e[i].timedOut&&(this.optionHighlighted=e[i][this.valueField]||undefined)};this.autoSetInputValueKeyboardOpen=i=>{const e=this.ungroupedOptions.findIndex((i=>i[this.valueField]===this.value));this.keyboardNav=false;switch(i.key){case"ArrowDown":this.keyboardNav=true;this.arrowBehaviour(i);this.setNextOptionValue(e);break;case"ArrowUp":this.keyboardNav=true;this.arrowBehaviour(i);this.setPreviousOptionValue(e);break;case" ":case"Enter":if(i.target.id!=="clear-button"){this.handleMenuChange(true)}break}};this.manSetInputValueKeyboardOpen=i=>{const e=this.setMenuOptions();const s=e.findIndex((i=>i[this.valueField]===this.optionHighlighted));const t=i=>{var e;return(e=Array.from(this.host.querySelectorAll("li"))[i])===null||e===void 0?void 0:e.id};const c=this.isSearchBar||this.isSearchableSelect||this.open;switch(i.key){case"ArrowDown":this.keyboardNav=true;this.arrowBehaviour(i);if(s<e.length-1){this.setHighlightedOption(s+1);this.menuOptionId.emit({optionId:t(s+1)})}else{this.setHighlightedOption(0);this.menuOptionId.emit({optionId:t(0)})}this.preventIncorrectTabOrder=false;this.focusFromSearchKeypress=false;break;case"ArrowUp":this.keyboardNav=true;this.arrowBehaviour(i);if(s<=0||s>e.length+1){this.setHighlightedOption(e.length-1);this.menuOptionId.emit({optionId:t(e.length-1)})}else{this.setHighlightedOption(s-1);this.menuOptionId.emit({optionId:t(s-1)})}this.preventIncorrectTabOrder=false;this.focusFromSearchKeypress=false;break;case"Home":this.keyboardNav=true;i.preventDefault();this.arrowBehaviour(i);this.setHighlightedOption(0);this.menuOptionId.emit({optionId:t(0)});break;case"End":this.keyboardNav=true;i.preventDefault();this.arrowBehaviour(i);this.setHighlightedOption(e.length-1);this.menuOptionId.emit({optionId:t(e.length-1)});break;case" ":this.keyboardNav=false;if(this.isSearchBar||this.isSearchableSelect){break}else{if(i.target.id!=="clear-button"){this.handleMenuChange(true)}}break;case"Enter":i.preventDefault();this.keyboardNav=false;if(c){if(s>=0){if(e[s]!==undefined){if(this.isSearchBar&&e[s].disabled===true){this.disabledOptionSelected=true}else{this.setInputValue(s);this.value=e[s][this.valueField]}}}else{this.setInputValue(s)}}else{this.handleMenuChange(true)}break;case"Escape":if(this.open){i.stopImmediatePropagation()}this.handleMenuChange(false);this.menuOptionId.emit({optionId:undefined});break;case"Shift":case"Tab":if(this.isSearchBar){this.keyboardNav=true}this.preventIncorrectTabOrder=true;break;default:this.keyboardNav=false;this.focusOnSearchOrSelectInput(e,s);break}};this.setInputValue=i=>{const e=this.setMenuOptions();if(e[i]!==undefined){this.menuOptionSelect.emit({value:e[i][this.valueField]});this.optionHighlighted=undefined;this.menuOptionId.emit({optionId:undefined})}if(!this.hasTimedOut)this.handleMenuChange(false);else this.parentEl.setFocus()};this.handleOptionClick=i=>{const{value:e,label:s}=i.target.dataset;this.menuOptionSelect.emit({value:e,label:s});this.handleMenuChange(false)};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=>{if(i.relatedTarget!==this.inputEl){if(!this.menu.contains(i.relatedTarget)){this.handleMenuChange(false,this.hasPreviouslyBlurred)}}else{this.handleMenuChange(false);this.preventClickOpen=true}if(!this.isSearchBar)this.hasPreviouslyBlurred=!!i.relatedTarget};this.handleMouseDown=i=>{i.preventDefault()};this.handleMenuKeyDown=i=>{if(this.activationType==="automatic"){this.autoSetValueOnMenuKeyDown(i)}else if(this.activationType==="manual"&&!this.isSearchBar){this.manSetInputValueKeyboardOpen(i)}};this.emitMenuKeyPress=(i,e)=>{this.menuKeyPress.emit({isNavKey:i,key:e})};this.autoSetValueOnMenuKeyDown=i=>{i.cancelBubble=true;const e=this.ungroupedOptions.findIndex((i=>i[this.valueField]===this.value));const s=this.inputEl.tagName==="INPUT";this.keyboardNav=false;switch(i.key){case" ":i.preventDefault();break;case"ArrowUp":if(!this.hasTimedOut){i.preventDefault();this.setPreviousOptionValue(e);this.keyboardNav=true}break;case"ArrowDown":if(!this.hasTimedOut){i.preventDefault();this.setNextOptionValue(e);this.keyboardNav=true}break;case"Home":this.menuOptionSelect.emit({value:this.ungroupedOptions[0][this.valueField]});this.keyboardNav=true;break;case"End":this.menuOptionSelect.emit({value:this.ungroupedOptions[this.ungroupedOptions.length-1][this.valueField]});this.keyboardNav=true;break;case"Enter":!this.hasTimedOut&&this.handleMenuChange(false);break;case"Escape":this.handleMenuChange(false);break;case"Backspace":if(s){this.inputEl.focus()}break;case"Shift":break;default:if(s&&i.key!=="Tab"&&!this.hasTimedOut){this.inputEl.focus()}if(i.key.length===1){this.keyboardNav=true}break}this.emitMenuKeyPress(this.keyboardNav,i.key)};this.handleMenuKeyUp=i=>{if(i.key==="Tab"&&i.shiftKey){this.preventClickOpen=false}if(i.key==="Enter"&&this.disabledOptionSelected){this.disabledOptionSelected=false;i.stopImmediatePropagation()}};this.getOptionId=i=>`${this.menuId}-${i}`;this.getOptionAriaLabel=(i,e)=>{let s=i[this.labelField];if(i.description){s=`${s}, ${i.description}`}if(i.element){s=`${s}, ${i.element.ariaLabel}`}if(e){return`${s}, ${e[this.labelField]} group`}else{return s}};this.getSortedOptions=i=>{let e=[];if(i.sort){e=i.sort(((i,e)=>i.recommended&&!e.recommended?-1:0))}return e};this.isManualMode=this.activationType==="manual";this.scrollToSelected=i=>{const e=this.selectOnEnter?this.host.querySelector(`li[data-value="${this.optionHighlighted}"]`):i.querySelector(".option[aria-selected='true']");if(e){const s=e.offsetTop+e.offsetHeight;if(s>i.scrollTop+i.offsetHeight||s<i.scrollTop+i.offsetHeight){i.scrollTop=e.offsetTop}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 if(!i.disabled){this.ungroupedOptions.push(i)}}))}this.ungroupedOptions=this.getSortedOptions(this.ungroupedOptions);this.ungroupedOptionsSet.emit({options:this.ungroupedOptions})};this.setMenuScrollbar=()=>{let i=0;this.host.querySelectorAll(".option").forEach((e=>i+=e.clientHeight));if(i>=320){this.menu.classList.add("menu-scroll")}};this.handleTimeoutBlur=i=>{this.timeoutBlur.emit({ev:i})};this.optionContent=i=>{var e;return s(t,null,i.loading&&s("ic-loading-indicator",{size:"icon"}),s("div",{class:"option-text-container"},s("div",{class:"option-label"},i.icon&&s("div",{class:"option-icon",innerHTML:i.icon,"aria-hidden":"true"}),s("ic-typography",{variant:"body","aria-hidden":"true"},i[this.labelField])),i.description&&s("ic-typography",{id:`${this.getOptionId(i[this.valueField])}-description`,class:"option-description",variant:"caption","aria-hidden":"true"},s("p",null,i.description)),i.element&&s("div",{class:"option-element",innerHTML:i.element.component,"aria-hidden":"true"})),!!i[this.valueField]&&!!this.value&&i[this.valueField].toLowerCase()===((e=this.value)===null||e===void 0?void 0:e.toLowerCase())&&this.parentEl.tagName!=="IC-SEARCH-BAR"&&s("span",{class:"check-icon",innerHTML:o}))};this.displayOption=(i,e,c)=>{const{open:n,value:o,keyboardNav:a,isManualMode:r,initialOptionsListRender:h,optionHighlighted:u,options:l}=this;return s("li",{id:this.getOptionId(i[this.valueField]),class:{option:true,"focused-option":r?(a||h)&&i[this.valueField]===u:a&&i[this.valueField]===o,"last-recommended-option":i.recommended&&l[e+1]&&!l[e+1].recommended,"disabled-option":i.disabled,"loading-option":i.loading,timeout:i.timedOut},role:"option",tabindex:n&&(i[this.valueField]===o||i[this.valueField]===u)&&a?"0":"-1","aria-label":this.getOptionAriaLabel(i,c),"aria-selected":`${i[this.valueField]===o}`,"aria-disabled":i.disabled?"true":"false",onClick:!i.timedOut&&!i.loading&&this.handleOptionClick,onBlur:this.handleBlur,onMouseDown:this.handleMouseDown,"data-value":i[this.valueField],"data-label":i[this.labelField]},i.timedOut?s(t,null,s("div",{class:"loading-error-info"},s("svg",{class:"error-icon-svg","aria-labelledby":"error-title",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#000000"},s("title",{id:"error-title"},"Error"),s("g",{id:"close-octagon"},s("path",{id:"Vector",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"}))),s("ic-typography",{variant:"label"},i[this.labelField])),s("ic-button",{size:"small",variant:"tertiary",onClick:this.handleRetry,onKeyDown:this.handleRetryKeyDown,onBlur:this.handleTimeoutBlur,id:"retry-button"},"Retry")):this.optionContent(i))};this.focusFromSearchKeypress=false;this.initialOptionsListRender=false;this.keyboardNav=false;this.optionHighlighted=undefined;this.preventIncorrectTabOrder=false;this.activationType="automatic";this.anchorEl=undefined;this.autoFocusOnSelected=true;this.fullWidth=false;this.inputEl=undefined;this.inputLabel=undefined;this.labelField="label";this.menuId=undefined;this.open=undefined;this.parentEl=undefined;this.searchMode="navigation";this.selectOnEnter=false;this.size="default";this.small=false;this.options=undefined;this.value=undefined;this.valueField="value"}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()}watchValueHandler(){this.menuValueChange.emit({value:this.value})}connectedCallback(){this.getParentEl(this.parentEl);if(this.isSearchBar){if(this.searchMode==="navigation")this.setHighlightedOption(0);this.initialOptionsListRender=true}}disconnectedCallback(){if(this.popperInstance){this.popperInstance.destroy()}this.parentEl.removeEventListener("icClear",this.handleClearListener);this.parentEl.removeEventListener("icSubmitSearch",this.handleSubmitSearch)}componentWillLoad(){var i,e;this.loadUngroupedOptions();this.parentEl.addEventListener("icClear",this.handleClearListener);this.parentEl.addEventListener("icSubmitSearch",this.handleSubmitSearch);this.hasTimedOut=(i=this.options)===null||i===void 0?void 0:i.some((i=>i.timedOut));this.isLoading=(e=this.options)===null||e===void 0?void 0:e.some((i=>i.loading))}componentDidLoad(){if(this.isSearchBar&&this.parentEl.disableFilter){this.focusFromSearchKeypress=true}a([{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.open&&this.options.length!==0){if(this.value&&this.keyboardNav&&i&&this.autoFocusOnSelected&&!this.isSearchableSelect){this.scrollToSelected(this.menu)}else if(this.inputEl.tagName!=="IC-TEXT-FIELD"&&this.inputEl.tagName!=="INPUT"){this.menu.focus()}else if(!!this.optionHighlighted&&!this.focusFromSearchKeypress&&!this.preventIncorrectTabOrder){const i=this.host.querySelector(`li[data-value="${this.optionHighlighted}"]`);if(i){i.focus()}}}if(this.open&&!this.value&&this.selectOnEnter){this.scrollToSelected(this.menu)}}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.manSetInputValueKeyboardOpen(i)}}async handleSetFirstOption(){this.setHighlightedOption(0)}async initPopperJs(i){this.popperInstance=r(i,this.host,{placement:"bottom",modifiers:[{name:"offset",options:{offset:[0,7]}},{name:"flip",options:{fallbackPlacements:["top"],rootBoundary:"viewport"}}]})}focusOnSearchOrSelectInput(i,e){if(!i[e])return;if(this.isSearchBar){this.parentEl.setFocus();if(this.searchMode==="navigation")this.setHighlightedOption(0)}if(this.isSearchableSelect){this.parentEl.setFocus()}this.focusFromSearchKeypress=true}render(){const{inputLabel:i,options:e,menuId:t,value:n,fullWidth:o,hasTimedOut:a,isLoading:r,size:h,small:u,open:l,inputEl:m,keyboardNav:d}=this;return s(c,{class:{"full-width":o,"no-focus":(m===null||m===void 0?void 0:m.tagName)==="INPUT"||a||r,small:u,[h]:true,open:l}},e.length!==0&&s("ul",{id:t,class:"menu",role:"listbox","aria-label":i,"aria-activedescendant":n!=null&&n!==""?this.getOptionId(n):"",tabindex:l&&!d&&(m===null||m===void 0?void 0:m.tagName)!=="INPUT"?"0":"-1",ref:i=>this.menu=i,onKeyDown:this.handleMenuKeyDown,onKeyUp:this.handleMenuKeyUp,onBlur:this.handleBlur},this.getSortedOptions(e).map(((i,e)=>{if(i.children){if(i.children.length>0){return s("div",null,s("ic-typography",{class:"option-group-title",role:"presentation",variant:"subtitle-small"},s("p",null,i[this.labelField])),i.children.map((s=>this.displayOption(s,e,i))))}else{return null}}else{return this.displayOption(i,e)}}))))}get host(){return n(this)}static get watchers(){return{open:["watchOpenHandler"],options:["watchOptionsHandler"],value:["watchValueHandler"]}}};u.style=h;export{u as ic_menu};
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as i,c as e,h as s,F as t,H as c,g as n}from"./p-8455d1bb.js";import{C as o}from"./p-0aa9ce8b.js";import{a}from"./p-8128572e.js";import{c as r}from"./p-aae38bee.js";import"./p-fd186591.js";const h='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){.open.sc-ic-menu-h .menu.sc-ic-menu{transition:max-height var(--ic-transition-duration-slow)}}.sc-ic-menu-h{border-radius:var(--ic-border-radius);max-height:0;width:var(--input-width, 20rem);color:var(--ic-color-primary-text);background-color:var(--ic-architectural-white);position:relative;z-index:var(--ic-z-index-menu);box-sizing:border-box;box-shadow:var(--ic-elevation-overlay)}.sc-ic-menu-h:not(.no-focus):focus-within{box-shadow:var(--ic-border-focus)}#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:var(--ic-border-width) solid var(--ic-architectural-400);border-radius:var(--ic-border-radius);background-color:var(--ic-architectural-white);visibility:hidden;max-height:0;overflow-y:hidden}.menu-scroll.sc-ic-menu{overflow-y:auto}.menu.sc-ic-menu:focus-visible{outline:none}.open.sc-ic-menu-h{max-height:none;display:block}.open.sc-ic-menu-h .menu.sc-ic-menu{visibility:visible;max-height:calc(var(--ic-space-xl) * 10 + var(--ic-space-xxxs))}.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;overflow-wrap:anywhere}.option.sc-ic-menu:not(.loading-option){justify-content:space-between}.small.sc-ic-menu-h .option.sc-ic-menu{padding:var(--ic-space-xxs) calc(var(--ic-space-xs) - var(--ic-space-1px))}.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 var(--ic-space-1px) var(--ic-space-1px)}.option.sc-ic-menu:first-child{border-radius:var(--ic-space-1px) var(--ic-space-1px) 0 0}.option.sc-ic-menu:not(.disabled-option):hover{background-color:var(--ic-action-dark-bg-hover)}.option.sc-ic-menu:not(.disabled-option):active{background-color:var(--ic-action-dark-bg-active)}.option.sc-ic-menu:focus-visible{outline:var(--ic-hc-focus-outline)}.option.sc-ic-menu:not(.disabled-option) .option-description.sc-ic-menu{color:var(--ic-color-secondary-text)}.option.sc-ic-menu .option-label.sc-ic-menu{display:flex;flex-direction:row;align-items:top}.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-xxxs)}.option-text-container.sc-ic-menu{pointer-events:none}.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-color-secondary-text)}.error-icon-svg.sc-ic-menu{height:var(--ic-space-md);width:var(--ic-space-md);fill:var(--ic-status-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);width:var(--ic-space-lg);margin-left:var(--ic-space-xs);pointer-events:none}.focused-option.sc-ic-menu .check-icon.sc-ic-menu *.sc-ic-menu{fill:currentcolor}.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);color:var(--ic-color-tertiary-text)}.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-border-default)}.disabled-option.sc-ic-menu{color:var(--ic-architectural-200);cursor:default;pointer-events:none}.focused-option.sc-ic-menu,.focused-option.sc-ic-menu .option-description.sc-ic-menu{background-color:var(--ic-focus-blue) !important;color:var(--ic-color-white-text) !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}@media (forced-colors: active){.focused-option.sc-ic-menu:focus{outline:none;border:0.125rem solid transparent}}';const u=class{constructor(c){i(this,c);this.menuKeyPress=e(this,"menuKeyPress",7);this.menuOptionId=e(this,"menuOptionId",7);this.menuOptionSelect=e(this,"menuOptionSelect",7);this.menuStateChange=e(this,"menuStateChange",7);this.menuValueChange=e(this,"menuValueChange",7);this.retryButtonClicked=e(this,"retryButtonClicked",7);this.timeoutBlur=e(this,"timeoutBlur",7);this.ungroupedOptionsSet=e(this,"ungroupedOptionsSet",7);this.disabledOptionSelected=false;this.hasPreviouslyBlurred=false;this.hasTimedOut=false;this.isLoading=false;this.isSearchBar=false;this.isSearchableSelect=false;this.preventClickOpen=false;this.ungroupedOptions=[];this.handleClearListener=()=>{this.optionHighlighted=""};this.handleSubmitSearch=()=>{const i=this.options.findIndex((i=>i[this.valueField]===this.optionHighlighted));this.setInputValue(i)};this.handleMenuChange=(i,e)=>{this.menuStateChange.emit({open:i,focusInput:e});if(!i&&e!==false){this.inputEl.focus();this.preventClickOpen=false}};this.setNextOptionValue=i=>{if(this.ungroupedOptions[i+1]){this.menuOptionSelect.emit({value:this.ungroupedOptions[i+1][this.valueField],optionId:this.getOptionId(this.ungroupedOptions[i+1][this.valueField])})}else{this.menuOptionSelect.emit({value:this.ungroupedOptions[0][this.valueField],optionId:this.getOptionId(this.ungroupedOptions[0][this.valueField])})}};this.setPreviousOptionValue=i=>{if(this.ungroupedOptions[i-1]){this.menuOptionSelect.emit({value:this.ungroupedOptions[i-1][this.valueField],optionId:this.getOptionId(this.ungroupedOptions[i-1][this.valueField])})}else{this.menuOptionSelect.emit({value:this.ungroupedOptions[this.ungroupedOptions.length-1][this.valueField],optionId:this.getOptionId(this.ungroupedOptions[this.ungroupedOptions.length-1][this.valueField])})}};this.getParentEl=i=>{if(i.tagName==="IC-SEARCH-BAR"){this.isSearchBar=true}else if(i.tagName==="IC-SELECT"&&i.getAttribute("searchable")!==null&&i.getAttribute("searchable")!==undefined){this.isSearchableSelect=true}};this.arrowBehaviour=i=>{i.preventDefault();this.handleMenuChange(true)};this.setMenuOptions=()=>this.isSearchBar?this.options:this.ungroupedOptions;this.setHighlightedOption=i=>{const e=this.setMenuOptions();e[i]&&!e[i].timedOut&&(this.optionHighlighted=e[i][this.valueField]||undefined)};this.autoSetInputValueKeyboardOpen=i=>{const e=this.ungroupedOptions.findIndex((i=>i[this.valueField]===this.value));this.keyboardNav=false;switch(i.key){case"ArrowDown":this.keyboardNav=true;this.arrowBehaviour(i);this.setNextOptionValue(e);break;case"ArrowUp":this.keyboardNav=true;this.arrowBehaviour(i);this.setPreviousOptionValue(e);break;case" ":case"Enter":if(i.target.id!=="clear-button"){this.handleMenuChange(true)}break}};this.manSetInputValueKeyboardOpen=i=>{const e=this.setMenuOptions();const s=e.findIndex((i=>i[this.valueField]===this.optionHighlighted));const t=i=>{var e;return(e=Array.from(this.host.querySelectorAll("li"))[i])===null||e===void 0?void 0:e.id};const c=this.isSearchBar||this.isSearchableSelect||this.open;switch(i.key){case"ArrowDown":this.keyboardNav=true;this.arrowBehaviour(i);if(s<e.length-1){this.setHighlightedOption(s+1);this.menuOptionId.emit({optionId:t(s+1)})}else{this.setHighlightedOption(0);this.menuOptionId.emit({optionId:t(0)})}this.preventIncorrectTabOrder=false;this.focusFromSearchKeypress=false;break;case"ArrowUp":this.keyboardNav=true;this.arrowBehaviour(i);if(s<=0||s>e.length+1){this.setHighlightedOption(e.length-1);this.menuOptionId.emit({optionId:t(e.length-1)})}else{this.setHighlightedOption(s-1);this.menuOptionId.emit({optionId:t(s-1)})}this.preventIncorrectTabOrder=false;this.focusFromSearchKeypress=false;break;case"Home":this.keyboardNav=true;i.preventDefault();this.arrowBehaviour(i);this.setHighlightedOption(0);this.menuOptionId.emit({optionId:t(0)});break;case"End":this.keyboardNav=true;i.preventDefault();this.arrowBehaviour(i);this.setHighlightedOption(e.length-1);this.menuOptionId.emit({optionId:t(e.length-1)});break;case" ":this.keyboardNav=false;if(this.isSearchBar||this.isSearchableSelect){break}else{if(i.target.id!=="clear-button"){this.handleMenuChange(true)}}break;case"Enter":i.preventDefault();this.keyboardNav=false;if(c){if(s>=0){if(e[s]!==undefined){if(this.isSearchBar&&e[s].disabled===true){this.disabledOptionSelected=true}else{this.setInputValue(s);this.value=e[s][this.valueField]}}}else{this.setInputValue(s)}}else{this.handleMenuChange(true)}break;case"Escape":if(this.open){i.stopImmediatePropagation()}this.handleMenuChange(false);this.menuOptionId.emit({optionId:undefined});break;case"Shift":case"Tab":if(this.isSearchBar){this.keyboardNav=true}this.preventIncorrectTabOrder=true;break;default:this.keyboardNav=false;this.focusOnSearchOrSelectInput(e,s);break}};this.setInputValue=i=>{const e=this.setMenuOptions();if(e[i]!==undefined){this.menuOptionSelect.emit({value:e[i][this.valueField]});this.optionHighlighted=undefined;this.menuOptionId.emit({optionId:undefined})}if(!this.hasTimedOut)this.handleMenuChange(false);else this.parentEl.setFocus()};this.handleOptionClick=i=>{const{value:e,label:s}=i.target.dataset;this.menuOptionSelect.emit({value:e,label:s});this.handleMenuChange(false)};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=>{if(i.relatedTarget!==this.inputEl){if(!this.menu.contains(i.relatedTarget)){this.handleMenuChange(false,this.hasPreviouslyBlurred)}}else{this.handleMenuChange(false);this.preventClickOpen=true}if(!this.isSearchBar)this.hasPreviouslyBlurred=!!i.relatedTarget};this.handleMouseDown=i=>{i.preventDefault()};this.handleMenuKeyDown=i=>{if(this.activationType==="automatic"){this.autoSetValueOnMenuKeyDown(i)}else if(this.activationType==="manual"&&!this.isSearchBar){this.manSetInputValueKeyboardOpen(i)}};this.emitMenuKeyPress=(i,e)=>{this.menuKeyPress.emit({isNavKey:i,key:e})};this.autoSetValueOnMenuKeyDown=i=>{i.cancelBubble=true;const e=this.ungroupedOptions.findIndex((i=>i[this.valueField]===this.value));const s=this.inputEl.tagName==="INPUT";this.keyboardNav=false;switch(i.key){case" ":i.preventDefault();break;case"ArrowUp":if(!this.hasTimedOut){i.preventDefault();this.setPreviousOptionValue(e);this.keyboardNav=true}break;case"ArrowDown":if(!this.hasTimedOut){i.preventDefault();this.setNextOptionValue(e);this.keyboardNav=true}break;case"Home":this.menuOptionSelect.emit({value:this.ungroupedOptions[0][this.valueField]});this.keyboardNav=true;break;case"End":this.menuOptionSelect.emit({value:this.ungroupedOptions[this.ungroupedOptions.length-1][this.valueField]});this.keyboardNav=true;break;case"Enter":!this.hasTimedOut&&this.handleMenuChange(false);break;case"Escape":this.handleMenuChange(false);break;case"Backspace":if(s){this.inputEl.focus()}break;case"Shift":break;default:if(s&&i.key!=="Tab"&&!this.hasTimedOut){this.inputEl.focus()}if(i.key.length===1){this.keyboardNav=true}break}this.emitMenuKeyPress(this.keyboardNav,i.key)};this.handleMenuKeyUp=i=>{if(i.key==="Tab"&&i.shiftKey){this.preventClickOpen=false}if(i.key==="Enter"&&this.disabledOptionSelected){this.disabledOptionSelected=false;i.stopImmediatePropagation()}};this.getOptionId=i=>`${this.menuId}-${i}`;this.getOptionAriaLabel=(i,e)=>{let s=i[this.labelField];if(i.description){s=`${s}, ${i.description}`}if(i.element){s=`${s}, ${i.element.ariaLabel}`}if(e){return`${s}, ${e[this.labelField]} group`}else{return s}};this.getSortedOptions=i=>{let e=[];if(i.sort){e=i.sort(((i,e)=>i.recommended&&!e.recommended?-1:0))}return e};this.isManualMode=this.activationType==="manual";this.scrollToSelected=i=>{const e=this.selectOnEnter?this.host.querySelector(`li[data-value="${this.optionHighlighted}"]`):i.querySelector(".option[aria-selected='true']");if(e){const s=e.offsetTop+e.offsetHeight;if(s>i.scrollTop+i.offsetHeight||s<i.scrollTop+i.offsetHeight){i.scrollTop=e.offsetTop}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 if(!i.disabled){this.ungroupedOptions.push(i)}}))}this.ungroupedOptions=this.getSortedOptions(this.ungroupedOptions);this.ungroupedOptionsSet.emit({options:this.ungroupedOptions})};this.setMenuScrollbar=()=>{let i=0;this.host.querySelectorAll(".option").forEach((e=>i+=e.clientHeight));if(i>=320){this.menu.classList.add("menu-scroll")}};this.handleTimeoutBlur=i=>{this.timeoutBlur.emit({ev:i})};this.optionContent=i=>{var e;return s(t,null,i.loading&&s("ic-loading-indicator",{size:"icon"}),s("div",{class:"option-text-container"},s("div",{class:"option-label"},i.icon&&s("div",{class:"option-icon",innerHTML:i.icon,"aria-hidden":"true"}),s("ic-typography",{variant:"body","aria-hidden":"true"},i[this.labelField])),i.description&&s("ic-typography",{id:`${this.getOptionId(i[this.valueField])}-description`,class:"option-description",variant:"caption","aria-hidden":"true"},s("p",null,i.description)),i.element&&s("div",{class:"option-element",innerHTML:i.element.component,"aria-hidden":"true"})),!!i[this.valueField]&&!!this.value&&i[this.valueField].toLowerCase()===((e=this.value)===null||e===void 0?void 0:e.toLowerCase())&&this.parentEl.tagName!=="IC-SEARCH-BAR"&&s("span",{class:"check-icon",innerHTML:o}))};this.displayOption=(i,e,c)=>{const{open:n,value:o,keyboardNav:a,isManualMode:r,initialOptionsListRender:h,optionHighlighted:u,options:l}=this;return s("li",{id:this.getOptionId(i[this.valueField]),class:{option:true,"focused-option":r?(a||h)&&i[this.valueField]===u:a&&i[this.valueField]===o,"last-recommended-option":i.recommended&&l[e+1]&&!l[e+1].recommended,"disabled-option":i.disabled,"loading-option":i.loading,timeout:i.timedOut},role:"option",tabindex:n&&(i[this.valueField]===o||i[this.valueField]===u)&&a?"0":"-1","aria-label":this.getOptionAriaLabel(i,c),"aria-selected":`${i[this.valueField]===o}`,"aria-disabled":i.disabled?"true":"false",onClick:!i.timedOut&&!i.loading&&this.handleOptionClick,onBlur:this.handleBlur,onMouseDown:this.handleMouseDown,"data-value":i[this.valueField],"data-label":i[this.labelField]},i.timedOut?s(t,null,s("div",{class:"loading-error-info"},s("svg",{class:"error-icon-svg","aria-labelledby":"error-title",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#000000"},s("title",{id:"error-title"},"Error"),s("g",{id:"close-octagon"},s("path",{id:"Vector",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"}))),s("ic-typography",{variant:"label"},i[this.labelField])),s("ic-button",{size:"small",variant:"tertiary",onClick:this.handleRetry,onKeyDown:this.handleRetryKeyDown,onBlur:this.handleTimeoutBlur,id:"retry-button"},"Retry")):this.optionContent(i))};this.focusFromSearchKeypress=false;this.initialOptionsListRender=false;this.keyboardNav=false;this.optionHighlighted=undefined;this.preventIncorrectTabOrder=false;this.activationType="automatic";this.anchorEl=undefined;this.autoFocusOnSelected=true;this.fullWidth=false;this.inputEl=undefined;this.inputLabel=undefined;this.labelField="label";this.menuId=undefined;this.open=undefined;this.parentEl=undefined;this.searchMode="navigation";this.selectOnEnter=false;this.size="default";this.small=false;this.options=undefined;this.value=undefined;this.valueField="value"}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()}watchValueHandler(){this.menuValueChange.emit({value:this.value})}connectedCallback(){this.getParentEl(this.parentEl);if(this.isSearchBar){if(this.searchMode==="navigation")this.setHighlightedOption(0);this.initialOptionsListRender=true}}disconnectedCallback(){var i,e;if(this.popperInstance){this.popperInstance.destroy()}(i=this.parentEl)===null||i===void 0?void 0:i.removeEventListener("icClear",this.handleClearListener);(e=this.parentEl)===null||e===void 0?void 0:e.removeEventListener("icSubmitSearch",this.handleSubmitSearch)}componentWillLoad(){var i,e;this.loadUngroupedOptions();this.parentEl.addEventListener("icClear",this.handleClearListener);this.parentEl.addEventListener("icSubmitSearch",this.handleSubmitSearch);this.hasTimedOut=(i=this.options)===null||i===void 0?void 0:i.some((i=>i.timedOut));this.isLoading=(e=this.options)===null||e===void 0?void 0:e.some((i=>i.loading))}componentDidLoad(){if(this.isSearchBar&&this.parentEl.disableFilter){this.focusFromSearchKeypress=true}a([{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.open&&this.options.length!==0){if(this.value&&this.keyboardNav&&i&&this.autoFocusOnSelected&&!this.isSearchableSelect){this.scrollToSelected(this.menu)}else if(this.inputEl.tagName!=="IC-TEXT-FIELD"&&this.inputEl.tagName!=="INPUT"){this.menu.focus()}else if(!!this.optionHighlighted&&!this.focusFromSearchKeypress&&!this.preventIncorrectTabOrder){const i=this.host.querySelector(`li[data-value="${this.optionHighlighted}"]`);if(i){i.focus()}}}if(this.open&&!this.value&&this.selectOnEnter){this.scrollToSelected(this.menu)}}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.manSetInputValueKeyboardOpen(i)}}async handleSetFirstOption(){this.setHighlightedOption(0)}async initPopperJs(i){this.popperInstance=r(i,this.host,{placement:"bottom",modifiers:[{name:"offset",options:{offset:[0,7]}},{name:"flip",options:{fallbackPlacements:["top"],rootBoundary:"viewport"}}]})}focusOnSearchOrSelectInput(i,e){if(!i[e])return;if(this.isSearchBar){this.parentEl.setFocus();if(this.searchMode==="navigation")this.setHighlightedOption(0)}if(this.isSearchableSelect){this.parentEl.setFocus()}this.focusFromSearchKeypress=true}render(){const{inputLabel:i,options:e,menuId:t,value:n,fullWidth:o,hasTimedOut:a,isLoading:r,size:h,small:u,open:l,inputEl:m,keyboardNav:d}=this;return s(c,{class:{"full-width":o,"no-focus":(m===null||m===void 0?void 0:m.tagName)==="INPUT"||a||r,small:u,[h]:true,open:l}},e.length!==0&&s("ul",{id:t,class:"menu",role:"listbox","aria-label":i,"aria-activedescendant":n!=null&&n!==""?this.getOptionId(n):"",tabindex:l&&!d&&(m===null||m===void 0?void 0:m.tagName)!=="INPUT"?"0":"-1",ref:i=>this.menu=i,onKeyDown:this.handleMenuKeyDown,onKeyUp:this.handleMenuKeyUp,onBlur:this.handleBlur},this.getSortedOptions(e).map(((i,e)=>{if(i.children){if(i.children.length>0){return s("div",null,s("ic-typography",{class:"option-group-title",role:"presentation",variant:"subtitle-small"},s("p",null,i[this.labelField])),i.children.map((s=>this.displayOption(s,e,i))))}else{return null}}else{return this.displayOption(i,e)}}))))}get host(){return n(this)}static get watchers(){return{open:["watchOpenHandler"],options:["watchOptionsHandler"],value:["watchValueHandler"]}}};u.style=h;export{u as ic_menu};
|
2
|
+
//# sourceMappingURL=p-d56593cc.entry.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["icMenuCss","Menu","constructor","hostRef","this","disabledOptionSelected","hasPreviouslyBlurred","hasTimedOut","isLoading","isSearchBar","isSearchableSelect","preventClickOpen","ungroupedOptions","handleClearListener","optionHighlighted","handleSubmitSearch","highlightedOptionIndex","options","findIndex","option","valueField","setInputValue","handleMenuChange","open","focusInput","menuStateChange","emit","inputEl","focus","setNextOptionValue","selectedOptionIndex","menuOptionSelect","value","optionId","getOptionId","setPreviousOptionValue","length","getParentEl","parent","tagName","getAttribute","undefined","arrowBehaviour","event","preventDefault","setMenuOptions","setHighlightedOption","highlightedIndex","menuOptions","timedOut","autoSetInputValueKeyboardOpen","keyboardNav","key","target","id","manSetInputValueKeyboardOpen","index","_a","Array","from","host","querySelectorAll","isOpen","menuOptionId","preventIncorrectTabOrder","focusFromSearchKeypress","disabled","stopImmediatePropagation","focusOnSearchOrSelectInput","parentEl","setFocus","handleOptionClick","label","dataset","handleRetry","retryButtonClicked","handleRetryKeyDown","ev","keyPressed","handleBlur","relatedTarget","menu","contains","handleMouseDown","handleMenuKeyDown","activationType","autoSetValueOnMenuKeyDown","emitMenuKeyPress","isNavKey","menuKeyPress","cancelBubble","handleMenuKeyUp","shiftKey","menuId","getOptionAriaLabel","parentOption","ariaLabel","labelField","description","element","getSortedOptions","sorted","sort","optionA","optionB","recommended","isManualMode","scrollToSelected","selectedOption","selectOnEnter","querySelector","elTop","offsetTop","offsetHeight","scrollTop","loadUngroupedOptions","map","children","push","ungroupedOptionsSet","setMenuScrollbar","optionsHeight","forEach","clientHeight","classList","add","handleTimeoutBlur","timeoutBlur","optionContent","h","Fragment","loading","size","class","icon","innerHTML","variant","component","toLowerCase","Check","displayOption","initialOptionsListRender","timeout","role","tabindex","onClick","onBlur","onMouseDown","xmlns","viewBox","fill","d","onKeyDown","anchorEl","autoFocusOnSelected","fullWidth","inputLabel","searchMode","small","watchOpenHandler","popperInstance","destroy","watchOptionsHandler","newOptions","some","opt","watchValueHandler","menuValueChange","connectedCallback","disconnectedCallback","_b","removeEventListener","componentWillLoad","addEventListener","componentDidLoad","disableFilter","onComponentRequiredPropUndefined","prop","propName","componentDidUpdate","inputValueInOptions","highlightedEl","componentDidRender","initPopperJs","handleClickOpen","handleKeyboardOpen","handleSetFirstOption","anchor","createPopper","placement","modifiers","name","offset","fallbackPlacements","rootBoundary","render","Host","ref","el","onKeyUp","childOption"],"sources":["../web-components/dist/collection/components/ic-menu/ic-menu.css?tag=ic-menu&encapsulation=scoped","../web-components/dist/collection/components/ic-menu/ic-menu.js"],"sourcesContent":["/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n ========================================================================== */\n\n/**\n * Remove the margin in all browsers.\n */\n\nbody {\n margin: 0;\n}\n\n/**\n * Render the `main` element consistently in IE.\n */\n\nmain {\n display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n box-sizing: content-box; /* 1 */\n height: 0; /* 1 */\n overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\npre {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * Remove the gray background on active links in IE 10.\n */\n\na {\n background-color: transparent;\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n border-bottom: none; /* 1 */\n text-decoration: underline; /* 2 */\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Remove the border on images inside links in IE 10.\n */\n\nimg {\n border-style: none;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput {\n /* 1 */\n overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect {\n /* 1 */\n text-transform: none;\n}\n\n/**\n * Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button;\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * `fieldset` elements in all browsers.\n */\n\nlegend {\n box-sizing: border-box; /* 1 */\n color: inherit; /* 2 */\n display: table; /* 1 */\n max-width: 100%; /* 1 */\n padding: 0; /* 3 */\n white-space: normal; /* 1 */\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\n * Remove the default vertical scrollbar in IE 10+.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type=\"search\"] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n\n[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\n ========================================================================== */\n\n/*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\n\ndetails {\n display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\nsummary {\n display: list-item;\n}\n\n/* Misc\n ========================================================================== */\n\n/**\n * Add the correct display in IE 10+.\n */\n\ntemplate {\n display: none;\n}\n\n/**\n * Add the correct display in IE 10.\n */\n\n[hidden] {\n display: none;\n}\n\nhtml,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font-style: inherit;\n vertical-align: baseline;\n}\n\n\n/**\n * @prop --ic-z-index-menu: z-index of menu\n */\n\n@media (prefers-reduced-motion: no-preference) {\n :host(.open) .menu {\n transition: max-height var(--ic-transition-duration-slow);\n }\n}\n\n:host {\n border-radius: var(--ic-border-radius);\n max-height: 0;\n width: var(--input-width, 20rem);\n color: var(--ic-color-primary-text);\n background-color: var(--ic-architectural-white);\n position: relative;\n z-index: var(--ic-z-index-menu);\n box-sizing: border-box;\n box-shadow: var(--ic-elevation-overlay);\n}\n\n:host(:not(.no-focus):focus-within) {\n box-shadow: var(--ic-border-focus);\n}\n\n#retry-button::part(button) {\n height: var(--ic-space-lg);\n}\n\n.small #retry-button::part(button) {\n height: var(--ic-space-md);\n}\n\n:host(.on-dialog) {\n inset: auto !important;\n}\n\n.menu {\n text-decoration: none;\n list-style-type: none;\n border: var(--ic-border-width) solid var(--ic-architectural-400);\n border-radius: var(--ic-border-radius);\n background-color: var(--ic-architectural-white);\n visibility: hidden;\n max-height: 0;\n overflow-y: hidden;\n}\n\n.menu-scroll {\n overflow-y: auto;\n}\n\n.menu:focus-visible {\n outline: none;\n}\n\n:host(.open) {\n max-height: none;\n display: block;\n}\n\n:host(.open) .menu {\n visibility: visible;\n max-height: calc(var(--ic-space-xl) * 10 + var(--ic-space-xxxs));\n}\n\n:host(.full-width) {\n width: 100%;\n}\n\n.option {\n padding: var(--ic-space-xs) calc(var(--ic-space-xs) - var(--ic-space-1px));\n cursor: pointer;\n display: flex;\n align-items: center;\n overflow-wrap: anywhere;\n}\n\n.option:not(.loading-option) {\n justify-content: space-between;\n}\n\n:host(.small) .option {\n padding: var(--ic-space-xxs) calc(var(--ic-space-xs) - var(--ic-space-1px));\n}\n\n:host(.large) .option {\n padding: var(--ic-space-sm) calc(var(--ic-space-xs) - var(--ic-space-1px));\n}\n\n.option:last-child {\n border-radius: 0 0 var(--ic-space-1px) var(--ic-space-1px);\n}\n\n.option:first-child {\n border-radius: var(--ic-space-1px) var(--ic-space-1px) 0 0;\n}\n\n.option:not(.disabled-option):hover {\n background-color: var(--ic-action-dark-bg-hover);\n}\n\n.option:not(.disabled-option):active {\n background-color: var(--ic-action-dark-bg-active);\n}\n\n.option:focus-visible {\n outline: var(--ic-hc-focus-outline);\n}\n\n.option:not(.disabled-option) .option-description {\n color: var(--ic-color-secondary-text);\n}\n\n.option .option-label {\n display: flex;\n flex-direction: row;\n align-items: top;\n}\n\n.option .option-element {\n margin-top: var(--ic-space-xxs);\n}\n\n.option .option-icon {\n height: var(--ic-space-md);\n width: var(--ic-space-md);\n margin-top: var(--ic-space-xxs);\n margin-right: var(--ic-space-xxxs);\n}\n\n.option-text-container {\n pointer-events: none;\n}\n\n.option.loading-option .option-text-container {\n margin-left: calc(var(--ic-space-xs) + var(--ic-space-xxxs));\n color: var(--ic-color-secondary-text);\n}\n\n.error-icon-svg {\n height: var(--ic-space-md);\n width: var(--ic-space-md);\n fill: var(--ic-status-error);\n align-self: center;\n display: flex;\n margin-right: calc(var(--ic-space-xxs) * 1.2);\n}\n\n.loading-error-info {\n display: flex;\n}\n\n.check-icon {\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n margin-left: var(--ic-space-xs);\n pointer-events: none;\n}\n\n.focused-option .check-icon * {\n fill: currentcolor;\n}\n\n.option-group-title {\n padding: var(--ic-space-lg) calc(var(--ic-space-xs) - var(--ic-space-1px))\n var(--ic-space-xs);\n color: var(--ic-color-tertiary-text);\n}\n\n:host(.small) .option-group-title {\n padding: var(--ic-space-sm) calc(var(--ic-space-xs) - var(--ic-space-1px))\n var(--ic-space-xxs);\n}\n\n.last-recommended-option {\n border-bottom: var(--ic-border-default);\n}\n\n.disabled-option {\n color: var(--ic-architectural-200);\n cursor: default;\n pointer-events: none;\n}\n\n.focused-option,\n.focused-option .option-description {\n background-color: var(--ic-focus-blue) !important;\n color: var(--ic-color-white-text) !important;\n}\n\n:host(.no-results) li {\n cursor: no-drop;\n}\n\n:host(.no-results) li:hover {\n background-color: transparent;\n}\n\n@media (forced-colors: active) {\n .focused-option:focus {\n outline: none;\n border: 0.125rem solid transparent;\n }\n}\n","import { h, Host, Fragment, } from \"@stencil/core\";\nimport { createPopper } from \"@popperjs/core\";\nimport Check from \"../../assets/check-icon.svg\";\nimport { onComponentRequiredPropUndefined } from \"../../utils/helpers\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport class Menu {\n constructor() {\n this.disabledOptionSelected = false;\n this.hasPreviouslyBlurred = false;\n this.hasTimedOut = false;\n this.isLoading = false;\n this.isSearchBar = false;\n this.isSearchableSelect = false;\n // Prevents menu re-opening immediately after it is closed on blur when clicking input.\n this.preventClickOpen = false;\n this.ungroupedOptions = [];\n this.handleClearListener = () => {\n this.optionHighlighted = \"\";\n };\n this.handleSubmitSearch = () => {\n const highlightedOptionIndex = this.options.findIndex((option) => option[this.valueField] === this.optionHighlighted);\n this.setInputValue(highlightedOptionIndex);\n };\n this.handleMenuChange = (open, focusInput) => {\n this.menuStateChange.emit({ open, focusInput });\n if (!open && focusInput !== false) {\n this.inputEl.focus();\n this.preventClickOpen = false;\n }\n };\n this.setNextOptionValue = (selectedOptionIndex) => {\n if (this.ungroupedOptions[selectedOptionIndex + 1]) {\n this.menuOptionSelect.emit({\n value: this.ungroupedOptions[selectedOptionIndex + 1][this.valueField],\n optionId: this.getOptionId(this.ungroupedOptions[selectedOptionIndex + 1][this.valueField]),\n });\n }\n else {\n this.menuOptionSelect.emit({\n value: this.ungroupedOptions[0][this.valueField],\n optionId: this.getOptionId(this.ungroupedOptions[0][this.valueField]),\n });\n }\n };\n this.setPreviousOptionValue = (selectedOptionIndex) => {\n if (this.ungroupedOptions[selectedOptionIndex - 1]) {\n this.menuOptionSelect.emit({\n value: this.ungroupedOptions[selectedOptionIndex - 1][this.valueField],\n optionId: this.getOptionId(this.ungroupedOptions[selectedOptionIndex - 1][this.valueField]),\n });\n }\n else {\n this.menuOptionSelect.emit({\n value: this.ungroupedOptions[this.ungroupedOptions.length - 1][this.valueField],\n optionId: this.getOptionId(this.ungroupedOptions[this.ungroupedOptions.length - 1][this.valueField]),\n });\n }\n };\n this.getParentEl = (parent) => {\n if (parent.tagName === \"IC-SEARCH-BAR\") {\n this.isSearchBar = true;\n }\n else if (parent.tagName === \"IC-SELECT\" &&\n parent.getAttribute(\"searchable\") !== null &&\n parent.getAttribute(\"searchable\") !== undefined) {\n this.isSearchableSelect = true;\n }\n };\n this.arrowBehaviour = (event) => {\n event.preventDefault();\n this.handleMenuChange(true);\n };\n this.setMenuOptions = () => this.isSearchBar ? this.options : this.ungroupedOptions;\n this.setHighlightedOption = (highlightedIndex) => {\n const menuOptions = this.setMenuOptions();\n menuOptions[highlightedIndex] &&\n !menuOptions[highlightedIndex].timedOut &&\n (this.optionHighlighted =\n menuOptions[highlightedIndex][this.valueField] || undefined);\n };\n this.autoSetInputValueKeyboardOpen = (event) => {\n const selectedOptionIndex = this.ungroupedOptions.findIndex((option) => option[this.valueField] === this.value);\n this.keyboardNav = false;\n switch (event.key) {\n case \"ArrowDown\":\n this.keyboardNav = true;\n this.arrowBehaviour(event);\n this.setNextOptionValue(selectedOptionIndex);\n break;\n case \"ArrowUp\":\n this.keyboardNav = true;\n this.arrowBehaviour(event);\n this.setPreviousOptionValue(selectedOptionIndex);\n break;\n case \" \":\n case \"Enter\":\n if (event.target.id !== \"clear-button\") {\n this.handleMenuChange(true);\n }\n break;\n }\n };\n this.manSetInputValueKeyboardOpen = (event) => {\n const menuOptions = this.setMenuOptions();\n const highlightedOptionIndex = menuOptions.findIndex((option) => option[this.valueField] === this.optionHighlighted);\n const getOptionId = (index) => { var _a; return (_a = Array.from(this.host.querySelectorAll(\"li\"))[index]) === null || _a === void 0 ? void 0 : _a.id; };\n const isOpen = this.isSearchBar || this.isSearchableSelect || this.open;\n switch (event.key) {\n case \"ArrowDown\":\n this.keyboardNav = true;\n this.arrowBehaviour(event);\n if (highlightedOptionIndex < menuOptions.length - 1) {\n this.setHighlightedOption(highlightedOptionIndex + 1);\n this.menuOptionId.emit({\n optionId: getOptionId(highlightedOptionIndex + 1),\n });\n }\n else {\n this.setHighlightedOption(0);\n this.menuOptionId.emit({\n optionId: getOptionId(0),\n });\n }\n this.preventIncorrectTabOrder = false;\n this.focusFromSearchKeypress = false;\n break;\n case \"ArrowUp\":\n this.keyboardNav = true;\n this.arrowBehaviour(event);\n if (highlightedOptionIndex <= 0 ||\n highlightedOptionIndex > menuOptions.length + 1) {\n this.setHighlightedOption(menuOptions.length - 1);\n this.menuOptionId.emit({\n optionId: getOptionId(menuOptions.length - 1),\n });\n }\n else {\n this.setHighlightedOption(highlightedOptionIndex - 1);\n this.menuOptionId.emit({\n optionId: getOptionId(highlightedOptionIndex - 1),\n });\n }\n this.preventIncorrectTabOrder = false;\n this.focusFromSearchKeypress = false;\n break;\n case \"Home\":\n this.keyboardNav = true;\n event.preventDefault();\n this.arrowBehaviour(event);\n this.setHighlightedOption(0);\n this.menuOptionId.emit({\n optionId: getOptionId(0),\n });\n break;\n case \"End\":\n this.keyboardNav = true;\n event.preventDefault();\n this.arrowBehaviour(event);\n this.setHighlightedOption(menuOptions.length - 1);\n this.menuOptionId.emit({\n optionId: getOptionId(menuOptions.length - 1),\n });\n break;\n case \" \":\n this.keyboardNav = false;\n if (this.isSearchBar || this.isSearchableSelect) {\n break;\n }\n else {\n if (event.target.id !== \"clear-button\") {\n this.handleMenuChange(true);\n }\n }\n break;\n case \"Enter\":\n event.preventDefault();\n this.keyboardNav = false;\n if (isOpen) {\n if (highlightedOptionIndex >= 0) {\n if (menuOptions[highlightedOptionIndex] !== undefined) {\n if (this.isSearchBar &&\n menuOptions[highlightedOptionIndex].disabled === true) {\n this.disabledOptionSelected = true;\n }\n else {\n this.setInputValue(highlightedOptionIndex);\n this.value =\n menuOptions[highlightedOptionIndex][this.valueField];\n }\n }\n }\n else {\n this.setInputValue(highlightedOptionIndex);\n }\n }\n else {\n this.handleMenuChange(true);\n }\n break;\n case \"Escape\":\n if (this.open) {\n event.stopImmediatePropagation();\n }\n this.handleMenuChange(false);\n this.menuOptionId.emit({ optionId: undefined });\n break;\n case \"Shift\":\n case \"Tab\":\n if (this.isSearchBar) {\n this.keyboardNav = true;\n }\n this.preventIncorrectTabOrder = true;\n break;\n default:\n this.keyboardNav = false;\n this.focusOnSearchOrSelectInput(menuOptions, highlightedOptionIndex);\n break;\n }\n };\n this.setInputValue = (highlightedOptionIndex) => {\n const menuOptions = this.setMenuOptions();\n if (menuOptions[highlightedOptionIndex] !== undefined) {\n this.menuOptionSelect.emit({\n value: menuOptions[highlightedOptionIndex][this.valueField],\n });\n this.optionHighlighted = undefined;\n this.menuOptionId.emit({ optionId: undefined });\n }\n if (!this.hasTimedOut)\n this.handleMenuChange(false);\n else\n this.parentEl.setFocus();\n };\n this.handleOptionClick = (event) => {\n const { value, label } = event.target.dataset;\n this.menuOptionSelect.emit({ value, label });\n this.handleMenuChange(false);\n };\n this.handleRetry = () => {\n this.retryButtonClicked.emit({ value: this.value });\n };\n this.handleRetryKeyDown = (ev) => {\n if (ev.key === \"Enter\" || ev.key === \" \") {\n ev.preventDefault();\n this.retryButtonClicked.emit({ value: this.value, keyPressed: ev.key });\n }\n };\n this.handleBlur = (event) => {\n if (event.relatedTarget !== this.inputEl) {\n if (!this.menu.contains(event.relatedTarget)) {\n this.handleMenuChange(false, this.hasPreviouslyBlurred);\n }\n }\n else {\n this.handleMenuChange(false);\n this.preventClickOpen = true;\n }\n if (!this.isSearchBar)\n this.hasPreviouslyBlurred = !!event.relatedTarget;\n };\n this.handleMouseDown = (event) => {\n event.preventDefault();\n };\n this.handleMenuKeyDown = (event) => {\n if (this.activationType === \"automatic\") {\n this.autoSetValueOnMenuKeyDown(event);\n }\n else if (this.activationType === \"manual\" && !this.isSearchBar) {\n this.manSetInputValueKeyboardOpen(event);\n }\n };\n this.emitMenuKeyPress = (isNavKey, key) => {\n this.menuKeyPress.emit({ isNavKey: isNavKey, key: key });\n };\n this.autoSetValueOnMenuKeyDown = (event) => {\n event.cancelBubble = true;\n const selectedOptionIndex = this.ungroupedOptions.findIndex((option) => option[this.valueField] === this.value);\n const isSearchableSelect = this.inputEl.tagName === \"INPUT\";\n this.keyboardNav = false;\n switch (event.key) {\n case \" \":\n event.preventDefault();\n break;\n case \"ArrowUp\":\n if (!this.hasTimedOut) {\n event.preventDefault();\n this.setPreviousOptionValue(selectedOptionIndex);\n this.keyboardNav = true;\n }\n break;\n case \"ArrowDown\":\n if (!this.hasTimedOut) {\n event.preventDefault();\n this.setNextOptionValue(selectedOptionIndex);\n this.keyboardNav = true;\n }\n break;\n case \"Home\":\n this.menuOptionSelect.emit({\n value: this.ungroupedOptions[0][this.valueField],\n });\n this.keyboardNav = true;\n break;\n case \"End\":\n this.menuOptionSelect.emit({\n value: this.ungroupedOptions[this.ungroupedOptions.length - 1][this.valueField],\n });\n this.keyboardNav = true;\n break;\n case \"Enter\":\n !this.hasTimedOut && this.handleMenuChange(false);\n break;\n case \"Escape\":\n this.handleMenuChange(false);\n break;\n case \"Backspace\":\n if (isSearchableSelect) {\n this.inputEl.focus();\n }\n break;\n case \"Shift\":\n break;\n default:\n if (isSearchableSelect && event.key !== \"Tab\" && !this.hasTimedOut) {\n this.inputEl.focus();\n }\n if (event.key.length === 1) {\n this.keyboardNav = true;\n }\n break;\n }\n this.emitMenuKeyPress(this.keyboardNav, event.key);\n };\n this.handleMenuKeyUp = (event) => {\n if (event.key === \"Tab\" && event.shiftKey) {\n this.preventClickOpen = false;\n }\n if (event.key === \"Enter\" && this.disabledOptionSelected) {\n this.disabledOptionSelected = false;\n event.stopImmediatePropagation();\n }\n };\n this.getOptionId = (value) => {\n return `${this.menuId}-${value}`;\n };\n this.getOptionAriaLabel = (option, parentOption) => {\n let ariaLabel = option[this.labelField];\n if (option.description) {\n ariaLabel = `${ariaLabel}, ${option.description}`;\n }\n if (option.element) {\n ariaLabel = `${ariaLabel}, ${option.element.ariaLabel}`;\n }\n if (parentOption) {\n return `${ariaLabel}, ${parentOption[this.labelField]} group`;\n }\n else {\n return ariaLabel;\n }\n };\n this.getSortedOptions = (options) => {\n let sorted = [];\n if (options.sort) {\n sorted = options.sort((optionA, optionB) => optionA.recommended && !optionB.recommended ? -1 : 0);\n }\n return sorted;\n };\n this.isManualMode = this.activationType === \"manual\";\n this.scrollToSelected = (menu) => {\n const selectedOption = this.selectOnEnter\n ? this.host.querySelector(`li[data-value=\"${this.optionHighlighted}\"]`)\n : menu.querySelector(\".option[aria-selected='true']\");\n if (selectedOption) {\n const elTop = selectedOption.offsetTop + selectedOption.offsetHeight;\n if (elTop > menu.scrollTop + menu.offsetHeight ||\n elTop < menu.scrollTop + menu.offsetHeight) {\n menu.scrollTop = selectedOption.offsetTop;\n }\n selectedOption.focus();\n }\n };\n this.loadUngroupedOptions = () => {\n if (this.options.length > 0 && this.options.map) {\n this.options.map((option) => {\n if (option.children) {\n option.children.map((option) => !option.disabled && this.ungroupedOptions.push(option));\n }\n else if (!option.disabled) {\n this.ungroupedOptions.push(option);\n }\n });\n }\n this.ungroupedOptions = this.getSortedOptions(this.ungroupedOptions);\n this.ungroupedOptionsSet.emit({ options: this.ungroupedOptions });\n };\n this.setMenuScrollbar = () => {\n let optionsHeight = 0;\n this.host\n .querySelectorAll(\".option\")\n .forEach((option) => (optionsHeight += option.clientHeight));\n if (optionsHeight >= 320) {\n this.menu.classList.add(\"menu-scroll\");\n }\n };\n this.handleTimeoutBlur = (ev) => {\n this.timeoutBlur.emit({ ev });\n };\n this.optionContent = (option) => {\n var _a;\n return (h(Fragment, null, option.loading && h(\"ic-loading-indicator\", { size: \"icon\" }), h(\"div\", { class: \"option-text-container\" }, h(\"div\", { class: \"option-label\" }, option.icon && (h(\"div\", { class: \"option-icon\", innerHTML: option.icon, \"aria-hidden\": \"true\" })), h(\"ic-typography\", { variant: \"body\", \"aria-hidden\": \"true\" }, option[this.labelField])), option.description && (h(\"ic-typography\", { id: `${this.getOptionId(option[this.valueField])}-description`, class: \"option-description\", variant: \"caption\", \"aria-hidden\": \"true\" }, h(\"p\", null, option.description))), option.element && (h(\"div\", { class: \"option-element\", innerHTML: option.element.component, \"aria-hidden\": \"true\" }))), !!option[this.valueField] &&\n !!this.value &&\n option[this.valueField].toLowerCase() === ((_a = this.value) === null || _a === void 0 ? void 0 : _a.toLowerCase()) &&\n this.parentEl.tagName !== \"IC-SEARCH-BAR\" && (h(\"span\", { class: \"check-icon\", innerHTML: Check }))));\n };\n this.displayOption = (option, index, parentOption) => {\n const { open, value, keyboardNav, isManualMode, initialOptionsListRender, optionHighlighted, options, } = this;\n return (h(\"li\", { id: this.getOptionId(option[this.valueField]), class: {\n option: true,\n \"focused-option\": isManualMode\n ? (keyboardNav || initialOptionsListRender) &&\n option[this.valueField] === optionHighlighted\n : keyboardNav && option[this.valueField] === value,\n \"last-recommended-option\": option.recommended &&\n options[index + 1] &&\n !options[index + 1].recommended,\n \"disabled-option\": option.disabled,\n \"loading-option\": option.loading,\n timeout: option.timedOut,\n }, role: \"option\", tabindex: open &&\n (option[this.valueField] === value ||\n option[this.valueField] === optionHighlighted) &&\n keyboardNav\n ? \"0\"\n : \"-1\", \"aria-label\": this.getOptionAriaLabel(option, parentOption), \"aria-selected\": `${option[this.valueField] === value}`, \"aria-disabled\": option.disabled ? \"true\" : \"false\", onClick: !option.timedOut && !option.loading && this.handleOptionClick, onBlur: this.handleBlur, onMouseDown: this.handleMouseDown, \"data-value\": option[this.valueField], \"data-label\": option[this.labelField] }, option.timedOut ? (h(Fragment, null, h(\"div\", { class: \"loading-error-info\" }, h(\"svg\", { class: \"error-icon-svg\", \"aria-labelledby\": \"error-title\", xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 24 24\", fill: \"#000000\" }, h(\"title\", { id: \"error-title\" }, \"Error\"), h(\"g\", { id: \"close-octagon\" }, h(\"path\", { id: \"Vector\", 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\" }))), h(\"ic-typography\", { variant: \"label\" }, option[this.labelField])), h(\"ic-button\", { size: \"small\", variant: \"tertiary\", onClick: this.handleRetry, onKeyDown: this.handleRetryKeyDown, onBlur: this.handleTimeoutBlur, id: \"retry-button\" }, \"Retry\"))) : (this.optionContent(option))));\n };\n this.focusFromSearchKeypress = false;\n this.initialOptionsListRender = false;\n this.keyboardNav = false;\n this.optionHighlighted = undefined;\n this.preventIncorrectTabOrder = false;\n this.activationType = \"automatic\";\n this.anchorEl = undefined;\n this.autoFocusOnSelected = true;\n this.fullWidth = false;\n this.inputEl = undefined;\n this.inputLabel = undefined;\n this.labelField = \"label\";\n this.menuId = undefined;\n this.open = undefined;\n this.parentEl = undefined;\n this.searchMode = \"navigation\";\n this.selectOnEnter = false;\n this.size = \"default\";\n this.small = false;\n this.options = undefined;\n this.value = undefined;\n this.valueField = \"value\";\n }\n watchOpenHandler() {\n if (!this.open && this.popperInstance) {\n this.popperInstance.destroy();\n this.popperInstance = null;\n }\n }\n watchOptionsHandler(newOptions) {\n this.hasTimedOut = newOptions.some((opt) => opt.timedOut);\n this.isLoading = newOptions.some((opt) => opt.loading);\n this.ungroupedOptions = [];\n this.loadUngroupedOptions();\n }\n watchValueHandler() {\n this.menuValueChange.emit({ value: this.value });\n }\n connectedCallback() {\n this.getParentEl(this.parentEl);\n if (this.isSearchBar) {\n if (this.searchMode === \"navigation\")\n this.setHighlightedOption(0);\n this.initialOptionsListRender = true;\n }\n }\n disconnectedCallback() {\n var _a, _b;\n if (this.popperInstance) {\n this.popperInstance.destroy();\n }\n (_a = this.parentEl) === null || _a === void 0 ? void 0 : _a.removeEventListener(\"icClear\", this.handleClearListener);\n (_b = this.parentEl) === null || _b === void 0 ? void 0 : _b.removeEventListener(\"icSubmitSearch\", this.handleSubmitSearch);\n }\n componentWillLoad() {\n var _a, _b;\n this.loadUngroupedOptions();\n this.parentEl.addEventListener(\"icClear\", this.handleClearListener);\n this.parentEl.addEventListener(\"icSubmitSearch\", this.handleSubmitSearch);\n this.hasTimedOut = (_a = this.options) === null || _a === void 0 ? void 0 : _a.some((opt) => opt.timedOut);\n this.isLoading = (_b = this.options) === null || _b === void 0 ? void 0 : _b.some((opt) => opt.loading);\n }\n componentDidLoad() {\n if (this.isSearchBar &&\n this.parentEl.disableFilter) {\n this.focusFromSearchKeypress = true;\n }\n onComponentRequiredPropUndefined([\n { prop: this.open, propName: \"open\" },\n { prop: this.options, propName: \"options\" },\n { prop: this.menuId, propName: \"menu-id\" },\n { prop: this.inputLabel, propName: \"input-label\" },\n //NOTE: no check for value, input-el or anchor-el as otherwise get console errors on first load of select component\n ], \"Menu\");\n }\n componentDidUpdate() {\n const inputValueInOptions = this.options.some((option) => option[this.valueField] === this.value);\n if (this.open && this.options.length !== 0) {\n if (this.value &&\n this.keyboardNav &&\n inputValueInOptions &&\n this.autoFocusOnSelected &&\n !this.isSearchableSelect) {\n this.scrollToSelected(this.menu);\n }\n else if (this.inputEl.tagName !== \"IC-TEXT-FIELD\" &&\n this.inputEl.tagName !== \"INPUT\") {\n this.menu.focus();\n }\n else if (!!this.optionHighlighted &&\n !this.focusFromSearchKeypress &&\n !this.preventIncorrectTabOrder) {\n const highlightedEl = this.host.querySelector(`li[data-value=\"${this.optionHighlighted}\"]`);\n if (highlightedEl) {\n highlightedEl.focus();\n }\n }\n }\n if (this.open && !this.value && this.selectOnEnter) {\n this.scrollToSelected(this.menu);\n }\n }\n componentDidRender() {\n if (this.open && !this.popperInstance && this.anchorEl) {\n this.initPopperJs(this.anchorEl);\n }\n if (this.open && !!this.options.length) {\n this.setMenuScrollbar();\n }\n }\n /**\n * @internal If menu is opened with the mouse, emit menuStateChange custom event.\n */\n async handleClickOpen() {\n if (!this.preventClickOpen) {\n this.menuStateChange.emit({ open: !this.open });\n this.keyboardNav = false;\n }\n this.preventClickOpen = false;\n }\n /**\n * Used alongside activationType\n * If menu is opened via keyboard navigation (i.e. Enter, ArrowUp or ArrowDown), emit optionSelect custom event.\n * @param {KeyboardEvent} event The keyboard event which is available when handleKeyboardOpen is invoked.\n */\n async handleKeyboardOpen(event) {\n if (this.activationType === \"automatic\") {\n this.autoSetInputValueKeyboardOpen(event);\n }\n else {\n this.manSetInputValueKeyboardOpen(event);\n }\n }\n /**\n * @internal Used to highlight the first option in the menu.\n */\n async handleSetFirstOption() {\n this.setHighlightedOption(0);\n }\n /**\n * @internal Used to initialize popperJS with an anchor element.\n * 5/12/2023: Tested with Floating UI, however, discovered inconsistent\n * boundary behaviour so sticking with PopperJS.\n */\n async initPopperJs(anchor) {\n this.popperInstance = createPopper(anchor, this.host, {\n placement: \"bottom\",\n modifiers: [\n {\n name: \"offset\",\n options: {\n offset: [0, 7],\n },\n },\n {\n name: \"flip\",\n options: {\n fallbackPlacements: [\"top\"],\n rootBoundary: \"viewport\",\n },\n },\n ],\n });\n }\n focusOnSearchOrSelectInput(menuOptions, highlightedOptionIndex) {\n if (!menuOptions[highlightedOptionIndex])\n return;\n if (this.isSearchBar) {\n this.parentEl.setFocus();\n if (this.searchMode === \"navigation\")\n this.setHighlightedOption(0);\n }\n if (this.isSearchableSelect) {\n this.parentEl.setFocus();\n }\n this.focusFromSearchKeypress = true;\n }\n render() {\n const { inputLabel, options, menuId, value, fullWidth, hasTimedOut, isLoading, size, small, open, inputEl, keyboardNav, } = this;\n return (h(Host, { class: {\n \"full-width\": fullWidth,\n \"no-focus\": (inputEl === null || inputEl === void 0 ? void 0 : inputEl.tagName) === \"INPUT\" || hasTimedOut || isLoading,\n small: small,\n [size]: true,\n open: open,\n } }, options.length !== 0 && (h(\"ul\", { id: menuId, class: \"menu\", role: \"listbox\", \"aria-label\": inputLabel, \"aria-activedescendant\": value != null && value !== \"\" ? this.getOptionId(value) : \"\", tabindex: open && !keyboardNav && (inputEl === null || inputEl === void 0 ? void 0 : inputEl.tagName) !== \"INPUT\" ? \"0\" : \"-1\", ref: (el) => (this.menu = el), onKeyDown: this.handleMenuKeyDown, onKeyUp: this.handleMenuKeyUp, onBlur: this.handleBlur }, this.getSortedOptions(options).map((option, index) => {\n if (option.children) {\n if (option.children.length > 0) {\n return (h(\"div\", null, h(\"ic-typography\", { class: \"option-group-title\", role: \"presentation\", variant: \"subtitle-small\" }, h(\"p\", null, option[this.labelField])), option.children.map((childOption) => this.displayOption(childOption, index, option))));\n }\n else {\n return null;\n }\n }\n else {\n return this.displayOption(option, index);\n }\n })))));\n }\n static get is() { return \"ic-menu\"; }\n static get encapsulation() { return \"scoped\"; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-menu.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-menu.css\"]\n };\n }\n static get properties() {\n return {\n \"activationType\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcActivationTypes\",\n \"resolved\": \"\\\"automatic\\\" | \\\"manual\\\"\",\n \"references\": {\n \"IcActivationTypes\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcActivationTypes\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Determines whether options manually set as values (by pressing 'Enter') when they receive focus using keyboard navigation.\"\n },\n \"attribute\": \"activation-type\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"automatic\\\"\"\n },\n \"anchorEl\": {\n \"type\": \"unknown\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"HTMLElement\",\n \"resolved\": \"HTMLElement\",\n \"references\": {\n \"HTMLElement\": {\n \"location\": \"global\",\n \"id\": \"global::HTMLElement\"\n }\n }\n },\n \"required\": true,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The reference to an anchor element the menu will position itself from when rendered.\"\n }\n },\n \"autoFocusOnSelected\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"If `true`, autofocus will be applied on selected item when menu is open.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"auto-focus-on-selected\",\n \"reflect\": false,\n \"defaultValue\": \"true\"\n },\n \"fullWidth\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the menu will fill the width of the container.\"\n },\n \"attribute\": \"full-width\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"inputEl\": {\n \"type\": \"unknown\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"HTMLElement\",\n \"resolved\": \"HTMLElement\",\n \"references\": {\n \"HTMLElement\": {\n \"location\": \"global\",\n \"id\": \"global::HTMLElement\"\n }\n }\n },\n \"required\": true,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The reference to the input element.\"\n }\n },\n \"inputLabel\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": true,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The label for the input element.\"\n },\n \"attribute\": \"input-label\",\n \"reflect\": false\n },\n \"labelField\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The custom name for the label field for IcMenuOption.\"\n },\n \"attribute\": \"label-field\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"label\\\"\"\n },\n \"menuId\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": true,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The ID of the menu.\"\n },\n \"attribute\": \"menu-id\",\n \"reflect\": false\n },\n \"open\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": true,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the menu will be displayed open.\"\n },\n \"attribute\": \"open\",\n \"reflect\": true\n },\n \"parentEl\": {\n \"type\": \"unknown\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"HTMLElement\",\n \"resolved\": \"HTMLElement\",\n \"references\": {\n \"HTMLElement\": {\n \"location\": \"global\",\n \"id\": \"global::HTMLElement\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"- The parent element if ic-menu is nested inside another component.\"\n }],\n \"text\": \"\"\n }\n },\n \"searchMode\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcSearchBarSearchModes\",\n \"resolved\": \"\\\"navigation\\\" | \\\"query\\\"\",\n \"references\": {\n \"IcSearchBarSearchModes\": {\n \"location\": \"import\",\n \"path\": \"../ic-search-bar/ic-search-bar.types\",\n \"id\": \"src/components/ic-search-bar/ic-search-bar.types.ts::IcSearchBarSearchModes\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Specify the mode search bar uses to search. `navigation` allows for quick lookups of a set of values, `query` allows for more general searches.\"\n },\n \"attribute\": \"search-mode\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"navigation\\\"\"\n },\n \"selectOnEnter\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"If `true`, the icOptionSelect event will be fired on enter instead of ArrowUp and ArrowDown.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"select-on-enter\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"size\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcSizes\",\n \"resolved\": \"\\\"default\\\" | \\\"large\\\" | \\\"small\\\"\",\n \"references\": {\n \"IcSizes\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcSizes\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The size of the menu component.\"\n },\n \"attribute\": \"size\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"default\\\"\"\n },\n \"small\": {\n \"type\": \"boolean\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"deprecated\",\n \"text\": \"This prop should not be used anymore. Set prop `size` to \\\"small\\\" instead.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"small\",\n \"reflect\": false,\n \"defaultValue\": \"false\"\n },\n \"options\": {\n \"type\": \"unknown\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"IcMenuOption[]\",\n \"resolved\": \"IcMenuOption[]\",\n \"references\": {\n \"IcMenuOption\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcMenuOption\"\n }\n }\n },\n \"required\": true,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The possible menu selection options.\"\n }\n },\n \"value\": {\n \"type\": \"string\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": true,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The value of the currently selected option.\"\n },\n \"attribute\": \"value\",\n \"reflect\": false\n },\n \"valueField\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The custom name for the value field for IcMenuOption.\"\n },\n \"attribute\": \"value-field\",\n \"reflect\": false,\n \"defaultValue\": \"\\\"value\\\"\"\n }\n };\n }\n static get states() {\n return {\n \"focusFromSearchKeypress\": {},\n \"initialOptionsListRender\": {},\n \"keyboardNav\": {},\n \"optionHighlighted\": {},\n \"preventIncorrectTabOrder\": {}\n };\n }\n static get events() {\n return [{\n \"method\": \"menuKeyPress\",\n \"name\": \"menuKeyPress\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Emitted when key is pressed while menu is open\"\n }],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"{ isNavKey: boolean; key: string }\",\n \"resolved\": \"{ isNavKey: boolean; key: string; }\",\n \"references\": {}\n }\n }, {\n \"method\": \"menuOptionId\",\n \"name\": \"menuOptionId\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Emitted when an option has been highlighted\"\n }],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"IcMenuOptionIdEventDetail\",\n \"resolved\": \"IcMenuOptionIdEventDetail\",\n \"references\": {\n \"IcMenuOptionIdEventDetail\": {\n \"location\": \"import\",\n \"path\": \"./ic-menu.types\",\n \"id\": \"src/components/ic-menu/ic-menu.types.ts::IcMenuOptionIdEventDetail\"\n }\n }\n }\n }, {\n \"method\": \"menuOptionSelect\",\n \"name\": \"menuOptionSelect\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Emitted when an option is selected.\"\n }],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"IcOptionSelectEventDetail\",\n \"resolved\": \"IcOptionSelectEventDetail\",\n \"references\": {\n \"IcOptionSelectEventDetail\": {\n \"location\": \"import\",\n \"path\": \"./ic-menu.types\",\n \"id\": \"src/components/ic-menu/ic-menu.types.ts::IcOptionSelectEventDetail\"\n }\n }\n }\n }, {\n \"method\": \"menuStateChange\",\n \"name\": \"menuStateChange\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Emitted when state of menu changes (i.e. open or close).\"\n }],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"IcMenuChangeEventDetail\",\n \"resolved\": \"IcMenuChangeEventDetail\",\n \"references\": {\n \"IcMenuChangeEventDetail\": {\n \"location\": \"import\",\n \"path\": \"./ic-menu.types\",\n \"id\": \"src/components/ic-menu/ic-menu.types.ts::IcMenuChangeEventDetail\"\n }\n }\n }\n }, {\n \"method\": \"menuValueChange\",\n \"name\": \"menuValueChange\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Emitted when menu value changes.\"\n }],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"IcValueEventDetail\",\n \"resolved\": \"IcValueEventDetail\",\n \"references\": {\n \"IcValueEventDetail\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcValueEventDetail\"\n }\n }\n }\n }, {\n \"method\": \"retryButtonClicked\",\n \"name\": \"retryButtonClicked\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Emitted when the retry button is clicked\"\n }],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"IcValueEventDetail\",\n \"resolved\": \"IcValueEventDetail\",\n \"references\": {\n \"IcValueEventDetail\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcValueEventDetail\"\n }\n }\n }\n }, {\n \"method\": \"timeoutBlur\",\n \"name\": \"timeoutBlur\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Emitted when the timeout menu loses focus\"\n }],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"{ ev: FocusEvent }\",\n \"resolved\": \"{ ev: FocusEvent; }\",\n \"references\": {\n \"FocusEvent\": {\n \"location\": \"global\",\n \"id\": \"global::FocusEvent\"\n }\n }\n }\n }, {\n \"method\": \"ungroupedOptionsSet\",\n \"name\": \"ungroupedOptionsSet\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Emitted when the ungrouped options have been set.\"\n }],\n \"text\": \"\"\n },\n \"complexType\": {\n \"original\": \"{ options: IcMenuOption[] }\",\n \"resolved\": \"{ options: IcMenuOption[]; }\",\n \"references\": {\n \"IcMenuOption\": {\n \"location\": \"import\",\n \"path\": \"../../utils/types\",\n \"id\": \"src/utils/types.ts::IcMenuOption\"\n }\n }\n }\n }];\n }\n static get methods() {\n return {\n \"handleClickOpen\": {\n \"complexType\": {\n \"signature\": \"() => Promise<void>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"\",\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"If menu is opened with the mouse, emit menuStateChange custom event.\"\n }]\n }\n },\n \"handleKeyboardOpen\": {\n \"complexType\": {\n \"signature\": \"(event: KeyboardEvent) => Promise<void>\",\n \"parameters\": [{\n \"name\": \"event\",\n \"type\": \"KeyboardEvent\",\n \"docs\": \"The keyboard event which is available when handleKeyboardOpen is invoked.\"\n }],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n },\n \"KeyboardEvent\": {\n \"location\": \"global\",\n \"id\": \"global::KeyboardEvent\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"Used alongside activationType\\nIf menu is opened via keyboard navigation (i.e. Enter, ArrowUp or ArrowDown), emit optionSelect custom event.\",\n \"tags\": [{\n \"name\": \"param\",\n \"text\": \"event The keyboard event which is available when handleKeyboardOpen is invoked.\"\n }]\n }\n },\n \"handleSetFirstOption\": {\n \"complexType\": {\n \"signature\": \"() => Promise<void>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"\",\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Used to highlight the first option in the menu.\"\n }]\n }\n },\n \"initPopperJs\": {\n \"complexType\": {\n \"signature\": \"(anchor: HTMLElement) => Promise<void>\",\n \"parameters\": [{\n \"name\": \"anchor\",\n \"type\": \"HTMLElement\",\n \"docs\": \"\"\n }],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n },\n \"HTMLElement\": {\n \"location\": \"global\",\n \"id\": \"global::HTMLElement\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"\",\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Used to initialize popperJS with an anchor element.\\n5/12/2023: Tested with Floating UI, however, discovered inconsistent\\nboundary behaviour so sticking with PopperJS.\"\n }]\n }\n }\n };\n }\n static get elementRef() { return \"host\"; }\n static get watchers() {\n return [{\n \"propName\": \"open\",\n \"methodName\": \"watchOpenHandler\"\n }, {\n \"propName\": \"options\",\n \"methodName\": \"watchOptionsHandler\"\n }, {\n \"propName\": \"value\",\n \"methodName\": \"watchValueHandler\"\n }];\n }\n}\n//# sourceMappingURL=ic-menu.js.map\n"],"mappings":"sMAAA,MAAMA,EAAY,6wP,MCKLC,EAAI,MACb,WAAAC,CAAAC,G,8YACIC,KAAKC,uBAAyB,MAC9BD,KAAKE,qBAAuB,MAC5BF,KAAKG,YAAc,MACnBH,KAAKI,UAAY,MACjBJ,KAAKK,YAAc,MACnBL,KAAKM,mBAAqB,MAE1BN,KAAKO,iBAAmB,MACxBP,KAAKQ,iBAAmB,GACxBR,KAAKS,oBAAsB,KACvBT,KAAKU,kBAAoB,EAAE,EAE/BV,KAAKW,mBAAqB,KACtB,MAAMC,EAAyBZ,KAAKa,QAAQC,WAAWC,GAAWA,EAAOf,KAAKgB,cAAgBhB,KAAKU,oBACnGV,KAAKiB,cAAcL,EAAuB,EAE9CZ,KAAKkB,iBAAmB,CAACC,EAAMC,KAC3BpB,KAAKqB,gBAAgBC,KAAK,CAAEH,OAAMC,eAClC,IAAKD,GAAQC,IAAe,MAAO,CAC/BpB,KAAKuB,QAAQC,QACbxB,KAAKO,iBAAmB,K,GAGhCP,KAAKyB,mBAAsBC,IACvB,GAAI1B,KAAKQ,iBAAiBkB,EAAsB,GAAI,CAChD1B,KAAK2B,iBAAiBL,KAAK,CACvBM,MAAO5B,KAAKQ,iBAAiBkB,EAAsB,GAAG1B,KAAKgB,YAC3Da,SAAU7B,KAAK8B,YAAY9B,KAAKQ,iBAAiBkB,EAAsB,GAAG1B,KAAKgB,c,KAGlF,CACDhB,KAAK2B,iBAAiBL,KAAK,CACvBM,MAAO5B,KAAKQ,iBAAiB,GAAGR,KAAKgB,YACrCa,SAAU7B,KAAK8B,YAAY9B,KAAKQ,iBAAiB,GAAGR,KAAKgB,c,GAIrEhB,KAAK+B,uBAA0BL,IAC3B,GAAI1B,KAAKQ,iBAAiBkB,EAAsB,GAAI,CAChD1B,KAAK2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Ac3E,KAAKgG,iBAAiBnF,GAASmG,KAAI,CAACjG,EAAQqC,KAC7e,GAAIrC,EAAOkG,SAAU,CACjB,GAAIlG,EAAOkG,SAASjF,OAAS,EAAG,CAC5B,OAAQ6F,EAAE,MAAO,KAAMA,EAAE,gBAAiB,CAAEI,MAAO,qBAAsBU,KAAM,eAAgBP,QAAS,kBAAoBP,EAAE,IAAK,KAAM9G,EAAOf,KAAK6F,cAAe9E,EAAOkG,SAASD,KAAKoF,GAAgBpM,KAAKwI,cAAc4D,EAAahJ,EAAOrC,K,KAE/O,CACD,OAAO,I,MAGV,CACD,OAAOf,KAAKwI,cAAczH,EAAQqC,E"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as t,c as e,h as i,H as o,g as s}from"./p-8455d1bb.js";import{A as n,d as a}from"./p-8128572e.js";import{c as r}from"./p-aae38bee.js";import"./p-fd186591.js";const l='/*! 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{border-radius:var(--ic-border-radius);color:var(--ic-color-primary-text);background-color:var(--ic-architectural-white);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-radius:var(--ic-border-radius);background-color:var(--ic-architectural-white);visibility:hidden;height:0}.button{text-decoration:none;list-style-type:none}:host(:focus-within){box-shadow:var(--ic-border-focus)}.menu:focus-visible{outline:none}:host(.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(.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{color:var(--ic-color-tertiary-text);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=class{constructor(i){t(this,i);this.icPopoverClosed=e(this,"icPopoverClosed",7);this.ARIA_LABEL="aria-label";this.popoverMenuEls=[];this.setButtonFocus=()=>{var t;(t=this.popoverMenuEls[this.currentFocus])===null||t===void 0?void 0:t.focus()};this.findAnchorEl=t=>{let e=null;if(!t){this.submenuId===undefined&&console.error("No anchor specified for popover component")}else{e=document.querySelector(t.indexOf("#")===0?t:"#"+t);if(e===null){console.error(`Popover anchor element '${t}' not found`)}}return e};this.isNotPopoverMenuEl=t=>{const{id:e,tagName:i}=t.target;return e!==this.anchor&&i!=="IC-MENU-ITEM"&&i!=="IC-MENU-GROUP"&&i!=="IC-POPOVER-MENU"};this.getNextItemToSelect=(t,e)=>{const i=this.popoverMenuEls.length-1;if(t<1){t=0}let o=e?t+1:t-1;if(o<0){o=i}else if(o>i){o=0}return o};this.addMenuItems=t=>{for(let e=0;e<t.length;e++){const i=t[e];if(i.tagName==="IC-MENU-ITEM"){this.popoverMenuEls.push(i)}else if(i.tagName==="IC-MENU-GROUP"){const t=i.shadowRoot.querySelector("
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as t,c as e,h as i,H as o,g as s}from"./p-8455d1bb.js";import{A as n,d as a}from"./p-8128572e.js";import{c as r}from"./p-aae38bee.js";import"./p-fd186591.js";const l='/*! 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{border-radius:var(--ic-border-radius);color:var(--ic-color-primary-text);background-color:var(--ic-architectural-white);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-radius:var(--ic-border-radius);background-color:var(--ic-architectural-white);visibility:hidden;height:0}.button{text-decoration:none;list-style-type:none}:host(:focus-within){box-shadow:var(--ic-border-focus)}.menu:focus-visible{outline:none}:host(.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(.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{color:var(--ic-color-tertiary-text);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=class{constructor(i){t(this,i);this.icPopoverClosed=e(this,"icPopoverClosed",7);this.ARIA_LABEL="aria-label";this.popoverMenuEls=[];this.setButtonFocus=()=>{var t;(t=this.popoverMenuEls[this.currentFocus])===null||t===void 0?void 0:t.focus()};this.findAnchorEl=t=>{let e=null;if(!t){this.submenuId===undefined&&console.error("No anchor specified for popover component")}else{e=document.querySelector(t.indexOf("#")===0?t:"#"+t);if(e===null){console.error(`Popover anchor element '${t}' not found`)}}return e};this.isNotPopoverMenuEl=t=>{const{id:e,tagName:i}=t.target;return e!==this.anchor&&i!=="IC-MENU-ITEM"&&i!=="IC-MENU-GROUP"&&i!=="IC-POPOVER-MENU"};this.getNextItemToSelect=(t,e)=>{const i=this.popoverMenuEls.length-1;if(t<1){t=0}let o=e?t+1:t-1;if(o<0){o=i}else if(o>i){o=0}return o};this.addMenuItems=t=>{for(let e=0;e<t.length;e++){const i=t[e];if(i.tagName==="IC-MENU-ITEM"){this.popoverMenuEls.push(i)}else if(i.tagName==="IC-MENU-GROUP"){const t=i.shadowRoot.querySelector(".menu-items-wrapper");const e=n(t);this.addMenuItems(e)}}};this.getMenuAriaLabel=()=>{const t=this.el.getAttribute(this.ARIA_LABEL);if(a(this.submenuId)){return`${t}, within nested level ${this.submenuLevel} ${this.parentLabel} submenu,`}else{return t}};this.handleBackButtonClick=()=>{this.parentPopover.openFromChild();this.open=false};this.initPopperJS=()=>{this.popperInstance=r(this.anchorEl,this.el,{placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[0,4]}},{name:"flip",options:{fallbackPlacements:["top-start","top-end","bottom-end"],rootBoundary:"viewport"}}]})};this.openingFromChild=false;this.openingFromParent=false;this.anchor=undefined;this.parentLabel=undefined;this.parentPopover=undefined;this.submenuId=undefined;this.submenuLevel=1;this.open=undefined}watchOpenHandler(){if(this.open){if(this.parentPopover!==undefined&&!this.popoverMenuEls.some((t=>t.id))){this.popoverMenuEls.unshift(this.backButton)}this.currentFocus=0;setTimeout(this.setButtonFocus,50)}else if(this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}}disconnectedCallback(){if(this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}}componentDidLoad(){const t=this.el.shadowRoot.querySelector("ul.button");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`)}}componentWillRender(){this.anchorEl=this.findAnchorEl(this.anchor)}componentDidRender(){if(this.open&&!this.popperInstance){this.initPopperJS()}}handleMenuItemClick(t){if(!t.detail.hasSubMenu&&t.detail.label!=="Back"){this.closeMenu()}}handleSubmenuChange(t){const e=t.target;this.open=false;const i=document.querySelector(`ic-popover-menu[submenu-id=${e.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=e.label}handleClick(t){if(this.open&&this.isNotPopoverMenuEl(t)){this.closeMenu()}}handleKeyDown(t){switch(t.key){case"ArrowDown":case"ArrowUp":t.preventDefault();this.currentFocus=this.getNextItemToSelect(this.currentFocus,t.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":t.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(t=false){var e;this.open=false;if(this.parentPopover){this.parentPopover.closeMenu(t)}else{if(t){(e=this.anchorEl)===null||e===void 0?void 0:e.focus()}this.icPopoverClosed.emit()}}render(){return i(o,{class:{open:this.open}},i("div",{id:this.parentPopover===undefined?`ic-popover-submenu-${this.submenuId}`:"",class:{menu:true},tabindex:open?"0":"-1"},i("span",{class:{"opening-from-parent":this.openingFromParent,"opening-from-child":this.openingFromChild}},a(this.submenuId)&&i("span",null,i("span",{role:"menu"},i("ic-menu-item",{class:"ic-popover-submenu-back-button",ref:t=>this.backButton=t,label:"Back",onClick:this.handleBackButtonClick,id:`ic-popover-submenu-back-button-${this.submenuLevel}`},i("svg",{slot:"icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"submenu-back-icon"},i("path",{d:"M20 11H7.83L13.42 5.41L12 4L4 12L12 20L13.41 18.59L7.83 13H20V11Z",fill:"currentColor"})))),i("ic-typography",{variant:"subtitle-small",class:"parent-label"},this.parentLabel)),i("ul",{class:"button","aria-label":this.getMenuAriaLabel(),role:"menu"},i("slot",null)))))}static get delegatesFocus(){return true}get el(){return s(this)}static get watchers(){return{open:["watchOpenHandler"]}}};h.style=l;export{h as ic_popover_menu};
|
2
|
+
//# sourceMappingURL=p-dcb7d549.entry.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["icPopoverMenuCss","PopoverMenu","constructor","hostRef","this","ARIA_LABEL","popoverMenuEls","setButtonFocus","_a","currentFocus","focus","findAnchorEl","anchor","anchorElement","submenuId","undefined","console","error","document","querySelector","indexOf","isNotPopoverMenuEl","ev","id","tagName","target","getNextItemToSelect","currentItem","movingDown","numButtons","length","nextItem","addMenuItems","elements","i","el","push","groupSlotWrapper","shadowRoot","menuGroupElements","getSlotElements","getMenuAriaLabel","ariaLabel","getAttribute","isPropDefined","submenuLevel","parentLabel","handleBackButtonClick","parentPopover","openFromChild","open","initPopperJS","popperInstance","createPopper","anchorEl","placement","modifiers","name","options","offset","fallbackPlacements","rootBoundary","openingFromChild","openingFromParent","watchOpenHandler","some","menuItem","unshift","backButton","setTimeout","destroy","disconnectedCallback","componentDidLoad","slotWrapper","popoverMenuElements","componentWillRender","componentDidRender","handleMenuItemClick","detail","hasSubMenu","label","closeMenu","handleSubmenuChange","childEl","submenuTriggerFor","openFromParent","handleClick","handleKeyDown","key","preventDefault","blur","setFocusToAnchor","icPopoverClosed","emit","render","h","Host","class","menu","tabindex","role","ref","onClick","slot","viewBox","fill","xmlns","d","variant","delegatesFocus"],"sources":["../web-components/dist/collection/components/ic-popover-menu/ic-popover-menu.css?tag=ic-popover-menu&encapsulation=shadow","../web-components/dist/collection/components/ic-popover-menu/ic-popover-menu.js"],"sourcesContent":["/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n ========================================================================== */\n\n/**\n * Remove the margin in all browsers.\n */\n\nbody {\n margin: 0;\n}\n\n/**\n * Render the `main` element consistently in IE.\n */\n\nmain {\n display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n box-sizing: content-box; /* 1 */\n height: 0; /* 1 */\n overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\npre {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * Remove the gray background on active links in IE 10.\n */\n\na {\n background-color: transparent;\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n border-bottom: none; /* 1 */\n text-decoration: underline; /* 2 */\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Remove the border on images inside links in IE 10.\n */\n\nimg {\n border-style: none;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput {\n /* 1 */\n overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect {\n /* 1 */\n text-transform: none;\n}\n\n/**\n * Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button;\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * `fieldset` elements in all browsers.\n */\n\nlegend {\n box-sizing: border-box; /* 1 */\n color: inherit; /* 2 */\n display: table; /* 1 */\n max-width: 100%; /* 1 */\n padding: 0; /* 3 */\n white-space: normal; /* 1 */\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\n * Remove the default vertical scrollbar in IE 10+.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type=\"search\"] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n\n[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\n ========================================================================== */\n\n/*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\n\ndetails {\n display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\nsummary {\n display: list-item;\n}\n\n/* Misc\n ========================================================================== */\n\n/**\n * Add the correct display in IE 10+.\n */\n\ntemplate {\n display: none;\n}\n\n/**\n * Add the correct display in IE 10.\n */\n\n[hidden] {\n display: none;\n}\n\nhtml,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font-style: inherit;\n vertical-align: baseline;\n}\n\n\n/**\n* @prop --ic-z-index-popover: z-index of popover menu. \n* @prop --max-height: Maximum height of the popover menu.\n* @prop --popover-width: Default width of the popover menu.\n*/\n\n@media (prefers-reduced-motion: no-preference) {\n :host .opening-from-parent {\n animation: slide-in var(--ic-transition-duration-slow) ease-in-out;\n }\n\n :host .opening-from-child {\n animation: slide-out var(--ic-transition-duration-slow) ease-in-out;\n }\n}\n\n:host {\n border-radius: var(--ic-border-radius);\n color: var(--ic-color-primary-text);\n background-color: var(--ic-architectural-white);\n position: relative;\n z-index: var(--ic-z-index-popover);\n box-sizing: border-box;\n box-shadow: var(--ic-elevation-overlay);\n display: none;\n}\n\n:host(.on-dialog) {\n inset: auto !important;\n}\n\n:host(.on-dialog-fix-translate) {\n transform: translate(0, var(--ic-space-xs)) !important;\n}\n\n:host(.on-dialog-translate-y) {\n transform: translate(0, calc(-1 * var(--translate-y))) !important;\n}\n\n.menu {\n border: var(--ic-border-default);\n border-radius: var(--ic-border-radius);\n background-color: var(--ic-architectural-white);\n visibility: hidden;\n height: 0;\n}\n\n.button {\n text-decoration: none;\n list-style-type: none;\n}\n\n:host(:focus-within) {\n box-shadow: var(--ic-border-focus);\n}\n\n.menu:focus-visible {\n outline: none;\n}\n\n:host(.open) {\n display: block;\n min-width: calc(20rem - var(--ic-space-xl));\n width: var(--popover-width, 20rem);\n max-width: calc(100vw - var(--ic-space-xl));\n}\n\n:host(.open) .menu {\n visibility: visible;\n height: -moz-fit-content;\n height: fit-content;\n max-height: var(--max-height, -moz-fit-content);\n max-height: var(--max-height, fit-content);\n overflow-y: auto;\n overflow-x: hidden;\n}\n\n.parent-label {\n color: var(--ic-color-tertiary-text);\n margin: var(--ic-space-xs) var(--ic-space-xs) 0;\n}\n\n@keyframes slide-in {\n from {\n opacity: 0;\n transform: translateX(10rem);\n }\n\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n@keyframes slide-out {\n from {\n opacity: 0;\n transform: translateX(-10rem);\n }\n\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n","import { Host, h, } from \"@stencil/core\";\nimport { getSlotElements, isPropDefined } from \"../../utils/helpers\";\nimport { createPopper } from \"@popperjs/core\";\nexport class PopoverMenu {\n constructor() {\n this.ARIA_LABEL = \"aria-label\";\n this.popoverMenuEls = [];\n this.setButtonFocus = () => {\n var _a;\n (_a = this.popoverMenuEls[this.currentFocus]) === null || _a === void 0 ? void 0 : _a.focus();\n };\n // Checks that the popover menu has an anchor\n this.findAnchorEl = (anchor) => {\n let anchorElement = null;\n if (!anchor) {\n this.submenuId === undefined &&\n console.error(\"No anchor specified for popover component\");\n }\n else {\n anchorElement = document.querySelector(anchor.indexOf(\"#\") === 0 ? anchor : \"#\" + anchor);\n if (anchorElement === null) {\n console.error(`Popover anchor element '${anchor}' not found`);\n }\n }\n return anchorElement;\n };\n this.isNotPopoverMenuEl = (ev) => {\n const { id, tagName } = ev.target;\n return (id !== this.anchor &&\n tagName !== \"IC-MENU-ITEM\" &&\n tagName !== \"IC-MENU-GROUP\" &&\n tagName !== \"IC-POPOVER-MENU\");\n };\n this.getNextItemToSelect = (currentItem, movingDown) => {\n const numButtons = this.popoverMenuEls.length - 1;\n if (currentItem < 1) {\n currentItem = 0;\n }\n let nextItem = movingDown ? currentItem + 1 : currentItem - 1;\n // Check if wrap around necessary\n if (nextItem < 0) {\n nextItem = numButtons;\n }\n else if (nextItem > numButtons) {\n nextItem = 0;\n }\n return nextItem;\n };\n this.addMenuItems = (elements) => {\n for (let i = 0; i < elements.length; i++) {\n const el = elements[i];\n if (el.tagName === \"IC-MENU-ITEM\") {\n this.popoverMenuEls.push(el);\n }\n else if (el.tagName === \"IC-MENU-GROUP\") {\n const groupSlotWrapper = el.shadowRoot.querySelector(\".menu-items-wrapper\");\n const menuGroupElements = getSlotElements(groupSlotWrapper);\n this.addMenuItems(menuGroupElements);\n }\n }\n };\n this.getMenuAriaLabel = () => {\n const ariaLabel = this.el.getAttribute(this.ARIA_LABEL);\n if (isPropDefined(this.submenuId)) {\n return `${ariaLabel}, within nested level ${this.submenuLevel} ${this.parentLabel} submenu,`;\n }\n else {\n return ariaLabel;\n }\n };\n this.handleBackButtonClick = () => {\n this.parentPopover.openFromChild();\n this.open = false;\n };\n this.initPopperJS = () => {\n this.popperInstance = createPopper(this.anchorEl, this.el, {\n placement: \"bottom-start\",\n modifiers: [\n {\n name: \"offset\",\n options: {\n offset: [0, 4],\n },\n },\n {\n name: \"flip\",\n options: {\n fallbackPlacements: [\"top-start\", \"top-end\", \"bottom-end\"],\n rootBoundary: \"viewport\",\n },\n },\n ],\n });\n };\n this.openingFromChild = false;\n this.openingFromParent = false;\n this.anchor = undefined;\n this.parentLabel = undefined;\n this.parentPopover = undefined;\n this.submenuId = undefined;\n this.submenuLevel = 1;\n this.open = undefined;\n }\n watchOpenHandler() {\n if (this.open) {\n if (this.parentPopover !== undefined &&\n !this.popoverMenuEls.some((menuItem) => menuItem.id)) {\n this.popoverMenuEls.unshift(this.backButton);\n }\n this.currentFocus = 0;\n // Needed so that anchorEl isn't always focused\n setTimeout(this.setButtonFocus, 50);\n }\n else if (this.popperInstance) {\n this.popperInstance.destroy();\n this.popperInstance = null;\n }\n }\n disconnectedCallback() {\n if (this.popperInstance) {\n this.popperInstance.destroy();\n this.popperInstance = null;\n }\n }\n componentDidLoad() {\n const slotWrapper = this.el.shadowRoot.querySelector(\"ul.button\");\n const popoverMenuElements = getSlotElements(slotWrapper);\n if (popoverMenuElements !== null) {\n this.addMenuItems(popoverMenuElements);\n }\n if (this.submenuId === undefined &&\n this.el.getAttribute(this.ARIA_LABEL) === null) {\n console.error(`No aria-label specified for popover menu component - aria-label required`);\n }\n }\n componentWillRender() {\n this.anchorEl = this.findAnchorEl(this.anchor);\n }\n componentDidRender() {\n if (this.open && !this.popperInstance) {\n this.initPopperJS();\n }\n }\n handleMenuItemClick(ev) {\n if (!ev.detail.hasSubMenu && ev.detail.label !== \"Back\") {\n this.closeMenu();\n }\n }\n // This is listening for the event emitted when a menu item is acting as a trigger button\n handleSubmenuChange(ev) {\n // Finds the trigger menu item that has emitted the event\n const target = ev.target;\n this.open = false;\n // Find the popover menu that the menu item triggers (i.e. submenu-trigger-for === submenu-id).\n const childEl = document.querySelector(`ic-popover-menu[submenu-id=${target.submenuTriggerFor}]`);\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 handleClick(ev) {\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 // Manages the keyboard navigation in the popover menu\n handleKeyDown(ev) {\n switch (ev.key) {\n case \"ArrowDown\":\n case \"ArrowUp\":\n ev.preventDefault();\n this.currentFocus = this.getNextItemToSelect(this.currentFocus, ev.key === \"ArrowDown\");\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 * @internal Opens the menu from the child menu.\n */\n async openFromChild() {\n this.open = true;\n this.openingFromChild = true;\n setTimeout(() => (this.openingFromChild = false), 1000);\n }\n /**\n * @internal Opens the menu from the parent menu.\n */\n async openFromParent() {\n this.open = true;\n this.openingFromParent = true;\n setTimeout(() => (this.openingFromParent = false), 1000);\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 async closeMenu(setFocusToAnchor = false) {\n var _a;\n this.open = false;\n if (this.parentPopover) {\n this.parentPopover.closeMenu(setFocusToAnchor);\n }\n else {\n if (setFocusToAnchor) {\n (_a = this.anchorEl) === null || _a === void 0 ? void 0 : _a.focus();\n }\n this.icPopoverClosed.emit();\n }\n }\n render() {\n return (h(Host, { class: { open: this.open } }, h(\"div\", { id: this.parentPopover === undefined\n ? `ic-popover-submenu-${this.submenuId}`\n : \"\", class: {\n menu: true,\n }, tabindex: open ? \"0\" : \"-1\" }, h(\"span\", { class: {\n \"opening-from-parent\": this.openingFromParent,\n \"opening-from-child\": this.openingFromChild,\n } }, isPropDefined(this.submenuId) && (h(\"span\", null, h(\"span\", { role: \"menu\" }, h(\"ic-menu-item\", { class: \"ic-popover-submenu-back-button\", ref: (el) => (this.backButton = el), label: \"Back\", onClick: this.handleBackButtonClick, id: `ic-popover-submenu-back-button-${this.submenuLevel}` }, h(\"svg\", { slot: \"icon\", viewBox: \"0 0 24 24\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", class: \"submenu-back-icon\" }, h(\"path\", { d: \"M20 11H7.83L13.42 5.41L12 4L4 12L12 20L13.41 18.59L7.83 13H20V11Z\", fill: \"currentColor\" })))), h(\"ic-typography\", { variant: \"subtitle-small\", class: \"parent-label\" }, this.parentLabel))), h(\"ul\", { class: \"button\", \"aria-label\": this.getMenuAriaLabel(), role: \"menu\" }, h(\"slot\", null))))));\n }\n static get is() { return \"ic-popover-menu\"; }\n static get encapsulation() { return \"shadow\"; }\n static get delegatesFocus() { return true; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-popover-menu.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-popover-menu.css\"]\n };\n }\n static get properties() {\n return {\n \"anchor\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The ID of the element the popover menu will anchor itself to. This is required unless the popover is a submenu.\"\n },\n \"attribute\": \"anchor\",\n \"reflect\": false\n },\n \"parentLabel\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"The parent popover menu of a child popover menu.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"parent-label\",\n \"reflect\": false\n },\n \"parentPopover\": {\n \"type\": \"unknown\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"HTMLIcPopoverMenuElement\",\n \"resolved\": \"HTMLIcPopoverMenuElement\",\n \"references\": {\n \"HTMLIcPopoverMenuElement\": {\n \"location\": \"global\",\n \"id\": \"global::HTMLIcPopoverMenuElement\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"The parent popover menu of a child popover menu.\"\n }],\n \"text\": \"\"\n }\n },\n \"submenuId\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The unique identifier for a popover submenu.\"\n },\n \"attribute\": \"submenu-id\",\n \"reflect\": false\n },\n \"submenuLevel\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"The level of menu being displayed.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"submenu-level\",\n \"reflect\": false,\n \"defaultValue\": \"1\"\n },\n \"open\": {\n \"type\": \"boolean\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the popover menu will be displayed.\"\n },\n \"attribute\": \"open\",\n \"reflect\": true,\n \"defaultValue\": \"undefined\"\n }\n };\n }\n static get states() {\n return {\n \"openingFromChild\": {},\n \"openingFromParent\": {}\n };\n }\n static get events() {\n return [{\n \"method\": \"icPopoverClosed\",\n \"name\": \"icPopoverClosed\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when the popover menu is closed.\"\n },\n \"complexType\": {\n \"original\": \"void\",\n \"resolved\": \"void\",\n \"references\": {}\n }\n }];\n }\n static get methods() {\n return {\n \"openFromChild\": {\n \"complexType\": {\n \"signature\": \"() => Promise<void>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"\",\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Opens the menu from the child menu.\"\n }]\n }\n },\n \"openFromParent\": {\n \"complexType\": {\n \"signature\": \"() => Promise<void>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"\",\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Opens the menu from the parent menu.\"\n }]\n }\n },\n \"closeMenu\": {\n \"complexType\": {\n \"signature\": \"(setFocusToAnchor?: boolean) => Promise<void>\",\n \"parameters\": [{\n \"name\": \"setFocusToAnchor\",\n \"type\": \"boolean\",\n \"docs\": \"when true return focus to anchor element when menu is closed\"\n }],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"\",\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Close the menu, emit icPopoverClosed of the root popover\"\n }, {\n \"name\": \"param\",\n \"text\": \"setFocusToAnchor when true return focus to anchor element when menu is closed\"\n }]\n }\n }\n };\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"open\",\n \"methodName\": \"watchOpenHandler\"\n }];\n }\n static get listeners() {\n return [{\n \"name\": \"handleMenuItemClick\",\n \"method\": \"handleMenuItemClick\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }, {\n \"name\": \"triggerPopoverMenuInstance\",\n \"method\": \"handleSubmenuChange\",\n \"target\": undefined,\n \"capture\": true,\n \"passive\": false\n }, {\n \"name\": \"click\",\n \"method\": \"handleClick\",\n \"target\": \"document\",\n \"capture\": false,\n \"passive\": false\n }, {\n \"name\": \"keydown\",\n \"method\": \"handleKeyDown\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }];\n }\n}\n//# sourceMappingURL=ic-popover-menu.js.map\n"],"mappings":"uKAAA,MAAMA,EAAmB,m9H,MCGZC,EAAW,MACpB,WAAAC,CAAAC,G,2DACIC,KAAKC,WAAa,aAClBD,KAAKE,eAAiB,GACtBF,KAAKG,eAAiB,KAClB,IAAIC,GACHA,EAAKJ,KAAKE,eAAeF,KAAKK,iBAAmB,MAAQD,SAAY,OAAS,EAAIA,EAAGE,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
1
|
-
import{r as e,h as t,H as i,g as o}from"./p-8455d1bb.js";import{d as n}from"./p-8128572e.js";import"./p-fd186591.js";const a='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:flex;flex-direction:column}ic-typography{color:var(--ic-color-tertiary-text);margin:var(--ic-space-xs) var(--ic-space-xs) 0}ul{list-style-type:none;margin:0;padding:0}hr{display:flex;align-self:stretch;border:calc(var(--ic-space-xxxs) / 2) solid var(--ic-architectural-300);margin:var(--ic-space-xxs) 0 calc(var(--ic-space-sm) / 4)}';const r=class{constructor(t){e(this,t);this.label=undefined}render(){const e=this.el.closest("ic-popover-menu");return t(i,{"aria-label":this.label!==null?this.label:""},n(this.label)&&t("ic-typography",{variant:"subtitle-small"},this.label),t("
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as e,h as t,H as i,g as o}from"./p-8455d1bb.js";import{d as n}from"./p-8128572e.js";import"./p-fd186591.js";const a='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:flex;flex-direction:column}ic-typography{color:var(--ic-color-tertiary-text);margin:var(--ic-space-xs) var(--ic-space-xs) 0}ul{list-style-type:none;margin:0;padding:0}hr{display:flex;align-self:stretch;border:calc(var(--ic-space-xxxs) / 2) solid var(--ic-architectural-300);margin:var(--ic-space-xxs) 0 calc(var(--ic-space-sm) / 4)}';const r=class{constructor(t){e(this,t);this.label=undefined}render(){const e=this.el.closest("ic-popover-menu");return t(i,{role:"group","aria-label":this.label!==null?this.label:""},n(this.label)&&t("ic-typography",{variant:"subtitle-small"},this.label),t("span",{class:"menu-items-wrapper"},t("slot",null)),this.el!==(e===null||e===void 0?void 0:e.querySelector("ic-menu-group:last-child"))&&t("hr",null))}get el(){return o(this)}};r.style=a;export{r as ic_menu_group};
|
2
|
+
//# sourceMappingURL=p-de630a67.entry.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["icMenuGroupCss","MenuGroup","constructor","hostRef","this","label","undefined","render","parentMenu","el","closest","h","Host","role","isPropDefined","variant","class","querySelector"],"sources":["../web-components/dist/collection/components/ic-menu-group/ic-menu-group.css?tag=ic-menu-group&encapsulation=shadow","../web-components/dist/collection/components/ic-menu-group/ic-menu-group.js"],"sourcesContent":["/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n ========================================================================== */\n\n/**\n * Remove the margin in all browsers.\n */\n\nbody {\n margin: 0;\n}\n\n/**\n * Render the `main` element consistently in IE.\n */\n\nmain {\n display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n box-sizing: content-box; /* 1 */\n height: 0; /* 1 */\n overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\npre {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * Remove the gray background on active links in IE 10.\n */\n\na {\n background-color: transparent;\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n border-bottom: none; /* 1 */\n text-decoration: underline; /* 2 */\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Remove the border on images inside links in IE 10.\n */\n\nimg {\n border-style: none;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput {\n /* 1 */\n overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect {\n /* 1 */\n text-transform: none;\n}\n\n/**\n * Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button;\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * `fieldset` elements in all browsers.\n */\n\nlegend {\n box-sizing: border-box; /* 1 */\n color: inherit; /* 2 */\n display: table; /* 1 */\n max-width: 100%; /* 1 */\n padding: 0; /* 3 */\n white-space: normal; /* 1 */\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\n * Remove the default vertical scrollbar in IE 10+.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type=\"search\"] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n\n[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\n ========================================================================== */\n\n/*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\n\ndetails {\n display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\nsummary {\n display: list-item;\n}\n\n/* Misc\n ========================================================================== */\n\n/**\n * Add the correct display in IE 10+.\n */\n\ntemplate {\n display: none;\n}\n\n/**\n * Add the correct display in IE 10.\n */\n\n[hidden] {\n display: none;\n}\n\nhtml,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font-style: inherit;\n vertical-align: baseline;\n}\n\n\n:host {\n display: flex;\n flex-direction: column;\n}\n\nic-typography {\n color: var(--ic-color-tertiary-text);\n margin: var(--ic-space-xs) var(--ic-space-xs) 0;\n}\n\nul {\n list-style-type: none;\n margin: 0;\n padding: 0;\n}\n\nhr {\n display: flex;\n align-self: stretch;\n border: calc(var(--ic-space-xxxs) / 2) solid var(--ic-architectural-300);\n margin: var(--ic-space-xxs) 0 calc(var(--ic-space-sm) / 4);\n}\n","import { Host, h } from \"@stencil/core\";\nimport { isPropDefined } from \"../../utils/helpers\";\nexport class MenuGroup {\n constructor() {\n this.label = undefined;\n }\n render() {\n const parentMenu = this.el.closest(\"ic-popover-menu\");\n return (h(Host, { role: \"group\", \"aria-label\": this.label !== null ? this.label : \"\" }, isPropDefined(this.label) && (h(\"ic-typography\", { variant: \"subtitle-small\" }, this.label)), h(\"span\", { class: \"menu-items-wrapper\" }, h(\"slot\", null)), this.el !== (parentMenu === null || parentMenu === void 0 ? void 0 : parentMenu.querySelector(\"ic-menu-group:last-child\")) && (h(\"hr\", null))));\n }\n static get is() { return \"ic-menu-group\"; }\n static get encapsulation() { return \"shadow\"; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-menu-group.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-menu-group.css\"]\n };\n }\n static get properties() {\n return {\n \"label\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The label to display as the title of the menu group.\"\n },\n \"attribute\": \"label\",\n \"reflect\": false\n }\n };\n }\n static get elementRef() { return \"el\"; }\n}\n//# sourceMappingURL=ic-menu-group.js.map\n"],"mappings":"qHAAA,MAAMA,EAAiB,8rF,MCEVC,EAAS,MAClB,WAAAC,CAAAC,G,UACIC,KAAKC,MAAQC,S,CAEjB,MAAAC,GACI,MAAMC,EAAaJ,KAAKK,GAAGC,QAAQ,mBACnC,OAAQC,EAAEC,EAAM,CAAEC,KAAM,QAAS,aAAcT,KAAKC,QAAU,KAAOD,KAAKC,MAAQ,IAAMS,EAAcV,KAAKC,QAAWM,EAAE,gBAAiB,CAAEI,QAAS,kBAAoBX,KAAKC,OAASM,EAAE,OAAQ,CAAEK,MAAO,sBAAwBL,EAAE,OAAQ,OAAQP,KAAKK,MAAQD,IAAe,MAAQA,SAAoB,OAAS,EAAIA,EAAWS,cAAc,8BAAiCN,EAAE,KAAM,M"}
|