@ukic/web-components 3.0.0-alpha.13 → 3.0.0-alpha.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. package/dist/cjs/ic-button_3.cjs.entry.js +59 -1
  2. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  3. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js.map +1 -1
  4. package/dist/cjs/ic-menu-item.cjs.entry.js +1 -1
  5. package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
  6. package/dist/cjs/ic-navigation-group.cjs.entry.js +6 -3
  7. package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
  8. package/dist/cjs/ic-navigation-menu.cjs.entry.js +36 -22
  9. package/dist/cjs/ic-navigation-menu.cjs.entry.js.map +1 -1
  10. package/dist/cjs/ic-popover-menu.cjs.entry.js +5 -4
  11. package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
  12. package/dist/cjs/ic-select.cjs.entry.js +13 -10
  13. package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
  14. package/dist/cjs/ic-side-navigation.cjs.entry.js +7 -4
  15. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  16. package/dist/cjs/ic-skip-link.cjs.entry.js +10 -9
  17. package/dist/cjs/ic-skip-link.cjs.entry.js.map +1 -1
  18. package/dist/cjs/ic-status-tag.cjs.entry.js +1 -1
  19. package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
  20. package/dist/cjs/ic-step.cjs.entry.js +13 -12
  21. package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
  22. package/dist/cjs/ic-toast.cjs.entry.js +3 -3
  23. package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
  24. package/dist/collection/components/ic-button/ic-button.css +6 -0
  25. package/dist/collection/components/ic-button/ic-button.js +58 -0
  26. package/dist/collection/components/ic-button/ic-button.js.map +1 -1
  27. package/dist/collection/components/ic-button/ic-button.stories.js +179 -0
  28. package/dist/collection/components/ic-menu-item/ic-menu-item.css +1 -0
  29. package/dist/collection/components/ic-navigation-group/ic-navigation-group.js +30 -4
  30. package/dist/collection/components/ic-navigation-group/ic-navigation-group.js.map +1 -1
  31. package/dist/collection/components/ic-navigation-group/ic-navigation-group.types.js.map +1 -1
  32. package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js +36 -22
  33. package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js.map +1 -1
  34. package/dist/collection/components/ic-popover-menu/ic-popover-menu.js +5 -4
  35. package/dist/collection/components/ic-popover-menu/ic-popover-menu.js.map +1 -1
  36. package/dist/collection/components/ic-popover-menu/ic-popover-menu.stories.js +70 -1
  37. package/dist/collection/components/ic-select/ic-select.css +1 -0
  38. package/dist/collection/components/ic-select/ic-select.js +12 -9
  39. package/dist/collection/components/ic-select/ic-select.js.map +1 -1
  40. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +7 -4
  41. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js.map +1 -1
  42. package/dist/collection/components/ic-side-navigation/ic-side-navigation.stories.js +12 -0
  43. package/dist/collection/components/ic-skip-link/ic-skip-link.css +22 -2
  44. package/dist/collection/components/ic-skip-link/ic-skip-link.js +13 -12
  45. package/dist/collection/components/ic-skip-link/ic-skip-link.js.map +1 -1
  46. package/dist/collection/components/ic-skip-link/ic-skip-link.stories.js +375 -31
  47. package/dist/collection/components/ic-status-tag/ic-status-tag.css +1 -1
  48. package/dist/collection/components/ic-step/ic-step.css +2 -2
  49. package/dist/collection/components/ic-step/ic-step.js +12 -11
  50. package/dist/collection/components/ic-step/ic-step.js.map +1 -1
  51. package/dist/collection/components/ic-stepper/ic-stepper.stories.js +5 -1
  52. package/dist/collection/components/ic-toast/ic-toast.js +3 -3
  53. package/dist/collection/components/ic-toast/ic-toast.js.map +1 -1
  54. package/dist/collection/components/ic-top-navigation/ic-top-navigation.stories.js +8 -19
  55. package/dist/components/helpers.js +1 -1
  56. package/dist/components/ic-button2.js +59 -1
  57. package/dist/components/ic-button2.js.map +1 -1
  58. package/dist/components/ic-menu-item2.js +1 -1
  59. package/dist/components/ic-menu-item2.js.map +1 -1
  60. package/dist/components/ic-navigation-group.js +6 -3
  61. package/dist/components/ic-navigation-group.js.map +1 -1
  62. package/dist/components/ic-navigation-menu2.js +37 -23
  63. package/dist/components/ic-navigation-menu2.js.map +1 -1
  64. package/dist/components/ic-popover-menu.js +5 -4
  65. package/dist/components/ic-popover-menu.js.map +1 -1
  66. package/dist/components/ic-radio-group.js.map +1 -1
  67. package/dist/components/ic-radio-option.js.map +1 -1
  68. package/dist/components/ic-search-bar.js.map +1 -1
  69. package/dist/components/ic-select.js +13 -10
  70. package/dist/components/ic-select.js.map +1 -1
  71. package/dist/components/ic-side-navigation.js +7 -4
  72. package/dist/components/ic-side-navigation.js.map +1 -1
  73. package/dist/components/ic-skeleton.js.map +1 -1
  74. package/dist/components/ic-skip-link.js +10 -9
  75. package/dist/components/ic-skip-link.js.map +1 -1
  76. package/dist/components/ic-status-tag.js +1 -1
  77. package/dist/components/ic-status-tag.js.map +1 -1
  78. package/dist/components/ic-step.js +13 -12
  79. package/dist/components/ic-step.js.map +1 -1
  80. package/dist/components/ic-tab-panel.js.map +1 -1
  81. package/dist/components/ic-toast.js +4 -4
  82. package/dist/components/ic-toast.js.map +1 -1
  83. package/dist/components/ic-top-navigation.js +1 -1
  84. package/dist/core/core.css +35 -29
  85. package/dist/core/core.esm.js +1 -1
  86. package/dist/core/{p-abf767e3.entry.js → p-1dc0c174.entry.js} +2 -2
  87. package/dist/core/p-1dc0c174.entry.js.map +1 -0
  88. package/dist/core/{p-e30c6d79.entry.js → p-22d88d2f.entry.js} +2 -2
  89. package/dist/core/p-22d88d2f.entry.js.map +1 -0
  90. package/dist/core/p-39bf060d.entry.js +2 -0
  91. package/dist/core/p-39bf060d.entry.js.map +1 -0
  92. package/dist/core/p-4a5ab31e.entry.js.map +1 -1
  93. package/dist/core/p-625f914e.entry.js +2 -0
  94. package/dist/core/p-625f914e.entry.js.map +1 -0
  95. package/dist/core/p-67d47db4.entry.js +2 -0
  96. package/dist/core/p-67d47db4.entry.js.map +1 -0
  97. package/dist/core/{p-8577de91.entry.js → p-9dbe3f3e.entry.js} +2 -2
  98. package/dist/core/{p-8577de91.entry.js.map → p-9dbe3f3e.entry.js.map} +1 -1
  99. package/dist/core/p-a9fd6dcf.entry.js +2 -0
  100. package/dist/core/p-a9fd6dcf.entry.js.map +1 -0
  101. package/dist/core/p-c7be6679.entry.js +2 -0
  102. package/dist/core/p-c7be6679.entry.js.map +1 -0
  103. package/dist/core/p-d80f3ec1.entry.js +2 -0
  104. package/dist/core/p-d80f3ec1.entry.js.map +1 -0
  105. package/dist/core/p-dce2c5e8.entry.js +2 -0
  106. package/dist/core/p-dce2c5e8.entry.js.map +1 -0
  107. package/dist/core/{p-de7542fa.entry.js → p-e3be3502.entry.js} +2 -2
  108. package/dist/core/p-e3be3502.entry.js.map +1 -0
  109. package/dist/esm/ic-button_3.entry.js +59 -1
  110. package/dist/esm/ic-button_3.entry.js.map +1 -1
  111. package/dist/esm/ic-horizontal-scroll.entry.js.map +1 -1
  112. package/dist/esm/ic-menu-item.entry.js +1 -1
  113. package/dist/esm/ic-menu-item.entry.js.map +1 -1
  114. package/dist/esm/ic-navigation-group.entry.js +6 -3
  115. package/dist/esm/ic-navigation-group.entry.js.map +1 -1
  116. package/dist/esm/ic-navigation-menu.entry.js +37 -23
  117. package/dist/esm/ic-navigation-menu.entry.js.map +1 -1
  118. package/dist/esm/ic-popover-menu.entry.js +5 -4
  119. package/dist/esm/ic-popover-menu.entry.js.map +1 -1
  120. package/dist/esm/ic-select.entry.js +13 -10
  121. package/dist/esm/ic-select.entry.js.map +1 -1
  122. package/dist/esm/ic-side-navigation.entry.js +7 -4
  123. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  124. package/dist/esm/ic-skip-link.entry.js +10 -9
  125. package/dist/esm/ic-skip-link.entry.js.map +1 -1
  126. package/dist/esm/ic-status-tag.entry.js +1 -1
  127. package/dist/esm/ic-status-tag.entry.js.map +1 -1
  128. package/dist/esm/ic-step.entry.js +13 -12
  129. package/dist/esm/ic-step.entry.js.map +1 -1
  130. package/dist/esm/ic-toast.entry.js +3 -3
  131. package/dist/esm/ic-toast.entry.js.map +1 -1
  132. package/dist/types/components/ic-button/ic-button.d.ts +1 -0
  133. package/dist/types/components/ic-navigation-group/ic-navigation-group.d.ts +6 -2
  134. package/dist/types/components/ic-navigation-group/ic-navigation-group.types.d.ts +3 -0
  135. package/dist/types/components/ic-navigation-menu/ic-navigation-menu.d.ts +2 -0
  136. package/dist/types/components/ic-skip-link/ic-skip-link.d.ts +4 -4
  137. package/dist/types/components.d.ts +11 -10
  138. package/hydrate/index.js +154 -70
  139. package/hydrate/index.mjs +154 -70
  140. package/package.json +2 -2
  141. package/vscode-data.json +4 -4
  142. package/dist/core/p-052d1ff0.entry.js +0 -2
  143. package/dist/core/p-052d1ff0.entry.js.map +0 -1
  144. package/dist/core/p-0b757d78.entry.js +0 -2
  145. package/dist/core/p-0b757d78.entry.js.map +0 -1
  146. package/dist/core/p-59287779.entry.js +0 -2
  147. package/dist/core/p-59287779.entry.js.map +0 -1
  148. package/dist/core/p-6c8e72b4.entry.js +0 -2
  149. package/dist/core/p-6c8e72b4.entry.js.map +0 -1
  150. package/dist/core/p-6fdb8a79.entry.js +0 -2
  151. package/dist/core/p-6fdb8a79.entry.js.map +0 -1
  152. package/dist/core/p-76bdbc98.entry.js +0 -2
  153. package/dist/core/p-76bdbc98.entry.js.map +0 -1
  154. package/dist/core/p-9bcd2c77.entry.js +0 -2
  155. package/dist/core/p-9bcd2c77.entry.js.map +0 -1
  156. package/dist/core/p-abf767e3.entry.js.map +0 -1
  157. package/dist/core/p-de7542fa.entry.js.map +0 -1
  158. package/dist/core/p-e30c6d79.entry.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"names":["icSelectCss","IcSelectStyle0","inputIds","MUTABLE_ATTRIBUTES","IC_INHERITED_ARIA","Select","constructor","hostRef","this","hasSetDefaultValue","inheritedAttributes","initialOptionsEmpty","inputId","menuId","searchableMenuItemSelected","ungroupedOptions","hostMutationObserver","clearButtonFocused","noOptions","open","pressedCharacters","searchableSelectInputValue","disabled","disableAutoFiltering","emptyOptionListText","fullWidth","helperText","hideLabel","includeDescriptionsInSearch","includeGroupTitlesInSearch","loadingErrorLabel","loadingLabel","multiple","name","placeholder","readonly","required","searchable","searchMatchPosition","selectOnEnter","showClearButton","size","theme","validationStatus","validationText","loading","options","filteredOptions","uniqueOptions","debounce","currDebounce","initialValue","value","inputValueToFilter","hostMutationCallback","mutationList","forceComponentUpdate","forEach","attributeName","type","addedNodes","removedNodes","attribute","el","getAttribute","includes","checkSlotInChildMutations","forceUpdate","handleRetry","ev","detail","keyPressed","_a","searchableSelectElement","focus","blurredBecauseButtonPressed","retryButtonClick","icRetryLoad","emit","hiddenInputValue","emitIcChange","Array","isArray","handleMultipleSelectChange","String","valueToEmit","icChange","emitIcInput","clearTimeout","debounceIcInput","window","setTimeout","icInput","deduplicateOptions","uniqueValues","dedupedOptions","dedupedChildren","option","children","child","console","warn","label","push","modifiedParent","Object","assign","setOptionsValuesFromLabels","length","map","setUngroupedOptions","event","setTextColor","nativeSelectElement","selectedIndex","className","setMenuChange","getLabelFromValue","getMultipleOptionsString","selectedValues","selectedLabels","filter","join","getFilteredChildMenuOptions","getFilteredMenuOptions","newOption","getValueSortedByOptions","valueArray","valuesFromAllOptions","sort","a","b","indexOf","handleNativeSelectChange","icOptionSelect","handleCustomSelectChange","currValue","getValueFromLabel","_b","icOptionDeselect","ariaActiveDescendant","optionId","slice","valueIndex","splice","handleSelectAllChange","selectAllOptions","select","allEnabledOptions","allValues","newValue","unselectedValues","handleMenuChange","handleFocusIndicatorDisplay","handleMenuKeyPress","cancelBubble","handleCharacterKeyDown","key","focusIndicator","shadowRoot","querySelector","classList","add","remove","handleMouseDown","preventDefault","isExternalFiltering","handleClick","menu","hasTimedOut","handleClickOpen","handleExpandIconMouseDown","handleClear","stopPropagation","timeoutTimer","clearInput","icClear","customSelectElement","characterKeyPressTimer","handleFilter","handleNativeSelectKeyDown","handleKeyDown","isArrowKey","handleKeyboardOpen","handleClearButtonFocus","handleClearButtonBlur","retryButton","relatedTarget","isGrouped","newFilteredOptions","menuOptionsFiltered","noChildOptionsWhenFiltered","triggerLoading","timeout","timedOut","find","handleSearchableSelectInput","target","debounceAriaLiveUpdate","updateSearchableSelectResultAriaLive","searchableSelectResultsStatusEl","innerText","updateMultiSelectedCountAriaLive","multiSelectSelectedCountEl","selectedCount","getOptionsWithoutGroupTitlesCount","getDefaultValue","setDefaultValue","onFocus","icFocus","onBlur","tagName","isSearchableAndNoFocusedInternalElements","from","querySelectorAll","clearButton","icBlur","onTimeoutBlur","handleFormReset","setAttribute","watchDisabledHandler","removeDisabledFalse","loadingHandler","watchOptionsHandler","debounceChangedHandler","updateOnChangeDebounce","valueChangedHandler","openChangedHandler","icOpen","icClose","disconnectedCallback","removeFormResetListener","disconnect","componentWillLoad","valueInOptions","inheritAttributes","addFormResetListener","componentDidLoad","onComponentRequiredPropUndefined","prop","propName","MutationObserver","observe","attributes","childList","componentDidRender","setFocus","debounceAria","render","renderHiddenInput","invalid","IcInformationStatus","Error","describedBy","getInputDescribedByText","hasValidationStatus","trim","showLeftIcon","optionsSelectedCount","valueLabelString","isClearable","h","Host","class","for","ref","anchorEl","slot","isMobileOrTablet","onChange","id","onKeyDown","form","selected","role","autocomplete","undefined","onInput","onClick","innerHTML","Clear","variant","onMouseDown","Expand","inputEl","inputLabel","onMenuStateChange","onMenuOptionSelect","onMenuOptionSelectAll","onMenuKeyPress","onUngroupedOptionsSet","onRetryButtonClicked","parentEl","activationType","closeOnSelect","ariaLiveMode","status","message"],"sources":["src/components/ic-select/ic-select.css?tag=ic-select&encapsulation=shadow","src/components/ic-select/ic-select.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n/**\n * @prop --input-width: Width of the input field\n * @prop --menu-width: Width of the dropdown menu\n * @prop --ic-z-index-menu: z-index of select menu\n */\n\n:host {\n display: block;\n position: relative;\n\n --ic-input-label-helpertext-padding: var(--ic-space-xxs);\n --menu-max-height: 100px;\n --border-color: var(--ic-select-field-border);\n --border-color-hover: var(--ic-select-field-border-hover);\n --border-color-pressed: var(--ic-select-field-border-pressed);\n --border-color-disabled: var(--ic-select-field-border-disabled);\n --border-color-error: var(--ic-select-field-border-error);\n --border-color-error-hover: var(--ic-select-field-border-error-hover);\n --border-color-error-pressed: var(--ic-select-field-border-error-pressed);\n --border-color-success: var(--ic-select-field-border-success);\n --border-color-success-hover: var(--ic-select-field-border-success-hover);\n --border-color-success-pressed: var(--ic-select-field-border-success-pressed);\n --border-color-warning: var(--ic-select-field-border-warning);\n --border-color-warning-hover: var(--ic-select-field-border-warning-hover);\n --border-color-warning-pressed: var(--ic-select-field-border-warning-pressed);\n --ic-input-label-text-color: var(--ic-select-field-labe);\n --ic-input-label-helper-text-color: var(\n --ic-select-input-field-label-subtitle\n );\n --ic-input-validation-status-text-color: var(--ic-select-state-text);\n --ic-input-validation-error: var(--ic-select-state-icon-error);\n --ic-input-validation-warning-icon-color: var(--ic-select-state-icon-warning);\n --ic-input-validation-success-icon-color: var(--ic-select-state-icon-success);\n --menu-item-text-color: var(--ic-select-list-option-text);\n --menu-bg-color: var(--ic-select-list-option-background);\n --menu-border-color: var(--ic-select-dropdown-list-border);\n}\n\n:host(.ic-select-disabled) {\n --ic-input-label-text-color: var(--ic-select-field-label-disabled);\n --ic-input-label-helper-text-color: var(\n --ic-select-input-field-label-subtitle-disabled\n );\n}\n\n:host(.ic-select-full-width) {\n width: 100%;\n}\n\nic-input-component-container.menu-open {\n --border-color: var(--ic-select-field-border-pressed);\n}\n\nic-input-validation .status-icon,\nic-input-validation .statustext {\n visibility: visible;\n}\n\nic-input-validation.menu-open .status-icon,\nic-input-validation.menu-open .statustext {\n visibility: hidden;\n transition: visibility 0s;\n}\n\nic-input-label {\n margin-bottom: var(--ic-space-xs) !important;\n}\n\nselect {\n border: 0;\n border-radius: var(--ic-border-radius);\n background-color: var(--ic-select-field-background);\n color: var(--ic-select-content-text);\n line-height: 1.5rem;\n letter-spacing: 0.005rem;\n width: 100%;\n height: 100%;\n padding-left: 0.375rem;\n appearance: none;\n background-repeat: no-repeat;\n background-position: right 0.375rem center;\n background-image: var(--ic-select-mobile-dropdown-icon);\n caret-color: var(--ic-select-input-field-text-cursor);\n}\n\nselect option,\n.select-option-selected {\n color: var(--ic-select-list-option-text);\n}\n\nselect:disabled {\n color: var(--ic-select-content-text-disabled);\n background-image: var(--ic-select-mobile-dropdown-icon-disabled);\n}\n\nselect:focus {\n border: 0;\n outline: 0;\n}\n\nselect:not([disabled]) {\n cursor: pointer;\n}\n\n.select-container {\n width: 100%;\n display: flex;\n align-items: center;\n position: relative;\n}\n\n.select-input {\n width: 100%;\n height: 100%;\n padding: 0 0.375rem;\n display: flex;\n cursor: pointer;\n align-items: center;\n justify-content: space-between;\n background: none;\n border: none;\n background-color: var(--ic-select-field-background);\n color: var(--ic-select-content-text);\n}\n\n.select-input:focus {\n outline: none;\n}\n\n.select-input[disabled] {\n pointer-events: none;\n}\n\n:host(.ic-select-searchable) .select-input {\n cursor: auto;\n}\n\n.select-input.with-clear-button {\n padding-right: 0;\n}\n\n.value-text {\n max-width: calc(100% - (var(--ic-space-lg) + var(--ic-space-xxs)));\n box-sizing: border-box;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n margin-bottom: 0 !important;\n}\n\n.value-text.with-clear-button {\n padding-right: calc(var(--ic-space-xl) + var(--ic-space-xs));\n}\n\n.searchable-select-container {\n align-items: center;\n display: flex;\n width: 100%;\n position: relative;\n}\n\n.expand-icon {\n height: var(--ic-space-lg);\n padding-left: var(--ic-space-xxs);\n color: var(--ic-select-expand-icon-color);\n}\n\n.expand-icon > svg {\n display: inline-block;\n width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n}\n\n:host(.ic-select-disabled) .expand-icon,\n:host(.ic-select-disabled) .expand-icon > svg > path {\n color: var(--ic-select-disabled-expand-icon-color);\n}\n\n:host(.ic-select-searchable) .expand-icon {\n padding-left: 0;\n height: 2.25rem;\n}\n\n:host(.ic-select-searchable) .expand-icon > svg {\n height: 2.25rem;\n padding: 0 calc(var(--ic-space-xxxs) + var(--ic-space-xxs)) 0\n var(--ic-space-xxs);\n}\n\n:host(.ic-select-searchable:not(.ic-select-disabled)) .expand-icon > svg {\n cursor: pointer;\n}\n\n.expand-icon-open {\n color: var(--ic-select-expand-icon-color);\n}\n\n.expand-icon-open,\n:host(.ic-select-searchable) .expand-icon-open {\n transform: rotateX(180deg);\n}\n\n:host(.ic-select-disabled) .value-text,\n:host(.ic-select-disabled) .select-input,\n.placeholder {\n color: var(--ic-select-content-placeholder-text);\n}\n\n.select-input-end {\n display: flex;\n align-items: center;\n}\n\n.clear-button-container {\n display: flex;\n align-items: center;\n}\n\n.divider {\n width: var(--ic-space-1px);\n background-color: var(--ic-select-content-divider);\n margin: var(--ic-space-xxs) 0;\n border-radius: var(--ic-space-1px);\n height: var(--ic-space-lg);\n}\n\n:host(.ic-select-small) .divider {\n height: var(--ic-space-md);\n}\n\n:host(.ic-select-large) .divider {\n height: var(--ic-space-xl);\n}\n\n.clear-button {\n color: var(--ic-select-clear-button);\n position: absolute;\n right: calc(var(--ic-space-xl) + var(--ic-space-xxs) - var(--ic-space-1px));\n border-radius: var(--ic-border-radius);\n transition: box-shadow var(--ic-easing-transition),\n border-radius var(--ic-easing-transition);\n}\n\n.clear-button:focus,\n.clear-button:active {\n background-color: var(--ic-color-focus-inner);\n box-shadow: inset 0 0 0 0.125rem var(--ic-color-focus-outer);\n border-radius: 0.25rem;\n}\n\n.clear-button:focus,\n.clear-button:active * {\n fill: var(--ic-atoms-input-clear-button-focus);\n}\n\n.clear-button.searchable {\n position: static;\n}\n\n.searchable-select-results-status,\n.multi-select-selected-count {\n border: 0;\n clip: rect(0, 0, 0, 0, 0);\n height: var(--ic-space-1px);\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n width: var(--ic-space-1px);\n}\n\n::slotted([slot=\"icon\"]) {\n fill: var(--ic-select-content-placeholder-text);\n}\n\n.has-value ::slotted([slot=\"icon\"]) {\n fill: var(--ic-select-content-text);\n}\n\n.readonly ::slotted([slot=\"icon\"]) {\n padding: 0.375rem;\n margin-bottom: 0.75rem;\n}\n\n@media (forced-colors: active) {\n .has-value ::slotted([slot=\"icon\"]) {\n fill: currentcolor;\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Method,\n Prop,\n h,\n State,\n Watch,\n forceUpdate,\n} from \"@stencil/core\";\n\nimport {\n getInputDescribedByText,\n getLabelFromValue,\n hasValidationStatus,\n inheritAttributes,\n onComponentRequiredPropUndefined,\n renderHiddenInput,\n isMobileOrTablet,\n getFilteredMenuOptions,\n getOptionsWithoutGroupTitlesCount,\n addFormResetListener,\n removeFormResetListener,\n removeDisabledFalse,\n checkSlotInChildMutations,\n} from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport {\n IcInformationStatus,\n IcInformationStatusOrEmpty,\n IcMenuOption,\n IcSearchMatchPositions,\n IcMultiValueEventDetail,\n IcSizes,\n IcThemeMode,\n} from \"../../utils/types\";\nimport Expand from \"./assets/Expand.svg\";\nimport Clear from \"./assets/Clear.svg\";\nimport { IcOptionSelectEventDetail } from \"../ic-menu/ic-menu.types\";\n\nlet inputIds = 0;\nconst MUTABLE_ATTRIBUTES = [...IC_INHERITED_ARIA, \"tabindex\", \"title\"];\n\n/**\n * @slot icon - Content will be placed to the left of the select text input.\n */\n@Component({\n tag: \"ic-select\",\n styleUrl: \"ic-select.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class Select {\n private anchorEl?: HTMLElement;\n private blurredBecauseButtonPressed: boolean;\n private characterKeyPressTimer: number;\n private clearButton?: HTMLIcButtonElement;\n private customSelectElement?: HTMLButtonElement;\n private debounceAria: number;\n private hasSetDefaultValue = false;\n private hasTimedOut: boolean;\n private inheritedAttributes: { [k: string]: string } = {};\n private initialOptionsEmpty = false;\n private inputId = `ic-select-input-${inputIds++}`;\n private menu?: HTMLIcMenuElement;\n private menuId = `${this.inputId}-menu`;\n private nativeSelectElement?: HTMLSelectElement;\n private retryButtonClick: boolean;\n private searchableMenuItemSelected: boolean = false;\n private searchableSelectElement?: HTMLInputElement;\n private timeoutTimer: number;\n private ungroupedOptions: IcMenuOption[] = [];\n private hostMutationObserver: MutationObserver | null = null;\n\n @Element() el!: HTMLIcSelectElement;\n\n @State() ariaActiveDescendant: string;\n @State() clearButtonFocused: boolean = false;\n @State() debounceIcInput: number;\n @State() hiddenInputValue: string | null;\n @State() noOptions: IcMenuOption[] | null = null;\n @State() open: boolean = false;\n @State() pressedCharacters: string = \"\";\n @State() searchableSelectInputValue: string | null = null;\n\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop({ reflect: true }) disabled?: boolean = false;\n @Watch(\"disabled\")\n watchDisabledHandler(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n /**\n * If `true`, the built in filtering will be disabled for a searchable variant. For example, if options will already be filtered from external source.\n */\n @Prop() disableAutoFiltering?: boolean = false;\n\n /**\n * The text displayed when there are no options in the option list.\n */\n @Prop() emptyOptionListText?: string = \"No results found\";\n\n /**\n * The <form> element to associate the select with.\n */\n @Prop() form?: string;\n\n /**\n * If `true`, the select will fill the width of the container.\n */\n @Prop() fullWidth?: boolean = false;\n\n /**\n * The helper text that will be displayed for additional field guidance.\n */\n @Prop() helperText?: string = \"\";\n\n /**\n * If `true`, the label will be hidden and the required label value will be applied as an aria-label.\n */\n @Prop() hideLabel?: boolean = false;\n\n /**\n * If `true`, descriptions of options will be included when filtering options in a searchable select. Only applies to built in filtering.\n */\n @Prop() includeDescriptionsInSearch?: boolean = false;\n\n /**\n * If `true`, group titles of grouped options will be included when filtering options in a searchable select. Only applies to built in filtering.\n */\n @Prop() includeGroupTitlesInSearch?: boolean = false;\n\n /**\n * The label for the select.\n */\n @Prop() label!: string;\n\n /**\n * The message displayed when external loading times out.\n */\n @Prop() loadingErrorLabel?: string = \"Loading Error\";\n\n /**\n * The message displayed whilst the options are being loaded externally.\n */\n @Prop() loadingLabel?: string = \"Loading...\";\n\n /**\n * If `true`, multiple options can be selected.\n */\n @Prop() multiple?: boolean = false;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name?: string = this.inputId;\n\n /**\n * The placeholder value to be displayed.\n */\n @Prop() placeholder?: string = \"Select an option\";\n\n /**\n * If `true`, the readonly state will be set.\n */\n @Prop() readonly?: boolean = false;\n\n /**\n * If `true`, the select will require a value.\n */\n @Prop() required?: boolean = false;\n\n /**\n * If `true`, a searchable variant of the select will be displayed which can be typed in to filter options. This functionality is only available on the single-select variant of the select component.\n */\n @Prop() searchable?: boolean = false;\n\n /**\n * Whether the search string of the searchable select should match the start of or anywhere in the options. Only applies to built in filtering.\n */\n @Prop() searchMatchPosition?: IcSearchMatchPositions = \"anywhere\";\n\n /**\n * If `true`, the icOptionSelect event will be fired on enter instead of ArrowUp and ArrowDown on the single select.\n */\n @Prop() selectOnEnter?: boolean = false;\n\n /**\n * If `true`, a button which clears the select input when clicked will be displayed. The button will always appear on the searchable select.\n */\n @Prop() showClearButton?: boolean = false;\n\n /**\n * The size of the select.\n */\n @Prop() size?: IcSizes = \"medium\";\n\n /**\n * If using external filtering, set a timeout for when loading takes too long.\n */\n @Prop() timeout?: number;\n\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme?: IcThemeMode = \"inherit\";\n\n /**\n * The validation status - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationStatus?: IcInformationStatusOrEmpty = \"\";\n\n /**\n * The text to display as the validation message.\n */\n @Prop() validationText?: string = \"\";\n\n /**\n * If `true`, the loading state will be triggered when fetching options asynchronously.\n */\n @Prop({ mutable: true }) loading?: boolean = false;\n\n @Watch(\"loading\")\n loadingHandler(newValue: boolean): void {\n newValue && this.triggerLoading();\n }\n\n /**\n * The possible selection options.\n */\n @Prop() options?: IcMenuOption[] = [];\n @State() filteredOptions: IcMenuOption[] = this.options!;\n @State() uniqueOptions: IcMenuOption[] = this.options!;\n\n @Watch(\"options\")\n watchOptionsHandler(): void {\n if (!this.hasTimedOut && this.options !== this.noOptions) {\n this.loading = false;\n clearTimeout(this.timeoutTimer);\n if (this.isExternalFiltering()) {\n // When searchable select\n if (this.options!.length > 0) {\n this.setOptionsValuesFromLabels();\n this.noOptions = null;\n this.uniqueOptions = this.deduplicateOptions(this.options!);\n this.filteredOptions = this.uniqueOptions;\n } else {\n this.noOptions = [{ label: this.emptyOptionListText, value: \"\" }];\n this.uniqueOptions = this.noOptions;\n this.filteredOptions = this.noOptions;\n }\n this.updateSearchableSelectResultAriaLive();\n this.setDefaultValue();\n } else {\n this.setOptionsValuesFromLabels();\n this.uniqueOptions = this.deduplicateOptions(this.options!);\n this.filteredOptions = this.uniqueOptions;\n if (this.initialOptionsEmpty) {\n this.setDefaultValue();\n this.initialOptionsEmpty = false;\n }\n }\n } else {\n if (!this.searchable) {\n this.options = this.noOptions || [];\n }\n }\n }\n\n /**\n * The amount of time, in milliseconds, to wait to trigger the `icInput` event after each keystroke.\n */\n @Prop() debounce?: number = 0;\n @State() currDebounce = this.debounce;\n\n @Watch(\"debounce\")\n debounceChangedHandler(newValue: number): void {\n this.updateOnChangeDebounce(newValue);\n }\n\n /**\n * The value of the select, reflected by the value of the currently selected option.\n * For the searchable variant, the value is also reflected by the user input.\n * For the multi-select variant, the value must be an array of option values.\n */\n @Prop({ mutable: true }) value?: string | string[] | null;\n @State() initialValue = this.value;\n @State() inputValueToFilter: string | null = this.value as string;\n @State() currValue?: string | string[] | null;\n\n @Watch(\"value\")\n valueChangedHandler(): void {\n if (this.value !== this.currValue) {\n if (this.value && this.multiple) {\n this.currValue = this.getMultipleOptionsString(this.value as string[])\n ? this.getValueSortedByOptions(this.value as string[])\n : null;\n this.updateMultiSelectedCountAriaLive();\n } else {\n this.currValue = this.getLabelFromValue(this.value as string)\n ? this.value\n : null;\n }\n }\n\n if (this.searchable && this.value) {\n // Only set if value not null - prevents whole input value being cleared when edited\n this.searchableSelectInputValue =\n this.getLabelFromValue(String(this.currValue)) || null;\n }\n }\n\n @Watch(\"open\")\n openChangedHandler(): void {\n this.open ? this.icOpen.emit() : this.icClose.emit();\n }\n\n /**\n * Emitted when the select loses focus.\n */\n @Event() icBlur: EventEmitter<void>;\n\n /**\n * Emitted when the value changes.\n */\n @Event() icChange: EventEmitter<IcMultiValueEventDetail>;\n\n /**\n * Emitted when the clear or clear all button is clicked.\n */\n @Event() icClear: EventEmitter<void>;\n\n /**\n * Emitted when the select options menu is closed.\n */\n @Event() icClose: EventEmitter<void>;\n\n /**\n * Emitted when the select gains focus.\n */\n @Event() icFocus: EventEmitter<void>;\n\n /**\n * Emitted when a keyboard input occurred.\n */\n @Event() icInput: EventEmitter<IcMultiValueEventDetail>;\n\n /**\n * Emitted when the select options menu is opened.\n */\n @Event() icOpen: EventEmitter<void>;\n\n /**\n * Emitted when an option is selected.\n * Selecting an option will also trigger an `icChange/onIcChange` due to the value being updated.\n */\n @Event() icOptionSelect: EventEmitter<IcOptionSelectEventDetail>;\n\n /**\n * Emitted when `multiple` is `true` and an option is deselected.\n */\n @Event() icOptionDeselect: EventEmitter<IcOptionSelectEventDetail>;\n\n /**\n * Emitted when the 'retry loading' button is clicked for a searchable variant.\n */\n @Event() icRetryLoad: EventEmitter<IcMultiValueEventDetail>;\n\n disconnectedCallback(): void {\n removeFormResetListener(this.el, this.handleFormReset);\n this.hostMutationObserver?.disconnect();\n }\n\n componentWillLoad(): void {\n const valueInOptions = this.multiple\n ? this.getMultipleOptionsString(this.value as string[])\n : this.getLabelFromValue(this.value as string);\n this.currValue = valueInOptions ? this.value : null;\n this.inheritedAttributes = inheritAttributes(this.el, MUTABLE_ATTRIBUTES);\n\n removeDisabledFalse(this.disabled, this.el);\n\n this.setOptionsValuesFromLabels();\n\n addFormResetListener(this.el, this.handleFormReset);\n\n if (!this.options!.length) {\n this.initialOptionsEmpty = true;\n this.noOptions = [{ label: this.emptyOptionListText, value: \"\" }];\n this.uniqueOptions = this.noOptions;\n this.filteredOptions = this.noOptions;\n } else {\n this.setDefaultValue();\n this.uniqueOptions = this.deduplicateOptions(this.options!);\n }\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Select\"\n );\n\n if (this.loading) {\n this.triggerLoading();\n }\n\n if (this.searchable) {\n this.hiddenInputValue = this.currValue as string;\n }\n\n this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);\n this.hostMutationObserver.observe(this.el, {\n attributes: true,\n childList: true,\n });\n }\n\n componentDidRender(): void {\n if (this.nativeSelectElement && !this.disabled) {\n this.setTextColor();\n }\n }\n\n /**\n * Sets focus on the input box.\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.nativeSelectElement) {\n this.nativeSelectElement.focus();\n } else if (this.customSelectElement) {\n this.customSelectElement.focus();\n } else if (this.searchableSelectElement) {\n this.searchableSelectElement.focus();\n }\n }\n\n // triggered when attributes of host element change\n private hostMutationCallback = (mutationList: MutationRecord[]): void => {\n let forceComponentUpdate = false;\n mutationList.forEach(\n ({ attributeName, type, addedNodes, removedNodes }) => {\n if (attributeName) {\n const attribute = this.el.getAttribute(attributeName);\n if (attribute && MUTABLE_ATTRIBUTES.includes(attributeName)) {\n this.inheritedAttributes[attributeName] = attribute;\n forceComponentUpdate = true;\n }\n } else if (type === \"childList\") {\n forceComponentUpdate = checkSlotInChildMutations(\n addedNodes,\n removedNodes,\n \"icon\"\n );\n }\n }\n );\n if (forceComponentUpdate) {\n forceUpdate(this);\n }\n };\n\n private handleRetry = (ev: CustomEvent<IcMultiValueEventDetail>) => {\n if (ev.detail.keyPressed) this.searchableSelectElement?.focus();\n this.blurredBecauseButtonPressed = true;\n this.retryButtonClick = true;\n this.hasSetDefaultValue = true;\n this.icRetryLoad.emit({\n value: this.searchable\n ? this.searchableSelectInputValue\n : this.hiddenInputValue,\n });\n };\n\n private updateOnChangeDebounce(newValue: number) {\n if (this.currDebounce !== newValue) {\n this.currDebounce = newValue;\n }\n }\n\n private emitIcChange = (value: string | string[] | null) => {\n // If \"Select all\" button clicked, replace value with new value (array of all option values)\n if (this.multiple && !Array.isArray(value) && value !== null) {\n this.handleMultipleSelectChange(String(value));\n } else {\n this.value = value;\n }\n\n const valueToEmit = this.multiple ? this.value : value;\n this.icChange.emit({ value: valueToEmit || null });\n };\n\n private emitIcInput = (value: string) => {\n clearTimeout(this.debounceIcInput);\n this.debounceIcInput = window.setTimeout(\n () => this.icInput.emit({ value }),\n this.currDebounce\n );\n };\n\n /**\n * Processes the provided array of IcMenuOptions, removing duplicates and reporting them with a console.warn\n * @param options array of IcMenuOptions\n * @returns a new options object, with all entries possessing a duplicate 'value' field removed\n */\n private deduplicateOptions = (options: IcMenuOption[]): IcMenuOption[] => {\n const uniqueValues: string[] = [];\n const dedupedOptions: IcMenuOption[] = [];\n let dedupedChildren: IcMenuOption[];\n\n options.forEach((option: IcMenuOption) => {\n if (option.children) {\n //If an option has children, we will loop through them\n dedupedChildren = [];\n option.children.forEach((child) => {\n if (uniqueValues.includes(child.value)) {\n console.warn(\n `ic-select with label ${this.label} was populated with duplicate option (value: ${child.value}) which has been removed.`\n );\n } else {\n uniqueValues.push(child.value);\n dedupedChildren.push(child);\n }\n });\n // construct a modified option, inserting the deduplicated children alongside the original information\n const modifiedParent: IcMenuOption = {\n ...option,\n children: dedupedChildren,\n };\n dedupedOptions.push(modifiedParent);\n } else {\n // If an option does not have children, assess to see if it's value has been included already\n if (uniqueValues.includes(option.value)) {\n console.warn(\n `ic-select with label ${this.label} was populated with duplicate option (value: ${option.value}) which has been removed.`\n );\n } else {\n uniqueValues.push(option.value);\n dedupedOptions.push(option);\n }\n }\n });\n return dedupedOptions;\n };\n\n /**\n * Loop through options array and for all options with no value, infer it from the label\n */\n private setOptionsValuesFromLabels = (): void => {\n if (this.options!.length > 0) {\n this.options!.map((option) => {\n if (!option.value) {\n option.value = option.label;\n }\n });\n }\n };\n\n private setUngroupedOptions = (event: CustomEvent): void => {\n this.ungroupedOptions = event.detail.options;\n };\n\n private setTextColor = (): void => {\n if (this.nativeSelectElement) {\n if (this.nativeSelectElement.selectedIndex === 0) {\n this.nativeSelectElement.className = \"placeholder\";\n } else {\n this.nativeSelectElement.className = \"select-option-selected\";\n }\n }\n };\n\n private setMenuChange = (open: boolean) => {\n if (this.open !== open) {\n this.open = open;\n }\n };\n\n private getLabelFromValue = (value: string): string | undefined => {\n return getLabelFromValue(value, this.uniqueOptions);\n };\n\n private getMultipleOptionsString = (selectedValues: string[]) => {\n const selectedLabels = selectedValues\n ?.map((value) => this.getLabelFromValue(value))\n .filter((label) => !!label);\n return selectedLabels?.join(\", \");\n };\n\n private getFilteredChildMenuOptions = (option: IcMenuOption) => {\n let children = option.children;\n\n if (option.children) {\n if (this.searchable) {\n children = getFilteredMenuOptions(\n option.children,\n !!this.includeDescriptionsInSearch,\n this.searchableSelectInputValue || \"\",\n this.searchMatchPosition\n );\n } else {\n children = getFilteredMenuOptions(\n option.children,\n false,\n this.pressedCharacters,\n \"start\"\n );\n }\n }\n\n const newOption = { ...option };\n newOption.children = children;\n return newOption;\n };\n\n // (For multi-select) get value array, i.e. selected option values, in order they appear in option list\n private getValueSortedByOptions = (value: string[]) => {\n const valueArray = value;\n const valuesFromAllOptions = this.ungroupedOptions.map(\n (option) => option.value\n );\n\n valueArray.sort(\n (a, b) =>\n valuesFromAllOptions.indexOf(a) - valuesFromAllOptions.indexOf(b)\n );\n\n return valueArray;\n };\n\n private handleNativeSelectChange = (): void => {\n if (this.nativeSelectElement) {\n this.icOptionSelect.emit({ value: this.nativeSelectElement.value });\n this.emitIcChange(this.nativeSelectElement.value);\n }\n this.setTextColor();\n };\n\n // Handle option select for when a custom input box and menu is rendered\n // (rather than native <select> - rendered when viewed on a mobile / tablet screen)\n private handleCustomSelectChange = (event: CustomEvent): void => {\n const value = event.detail.value;\n\n if (event.detail.label === this.emptyOptionListText) {\n this.searchableSelectElement?.focus();\n return;\n }\n\n if (this.searchable) {\n this.value = value;\n this.searchableMenuItemSelected = true;\n\n // After editing the input, if selecting the same option as before, set the input value to label again\n if (this.value === this.currValue) {\n this.searchableSelectInputValue =\n this.getLabelFromValue(this.value as string) || null;\n }\n\n this.inputValueToFilter = null;\n this.hiddenInputValue =\n this.getValueFromLabel(this.searchableSelectInputValue) || null;\n }\n\n if (this.multiple && this.value?.includes(value)) {\n this.icOptionDeselect.emit({ value });\n } else {\n this.icOptionSelect.emit({ value });\n }\n\n this.ariaActiveDescendant = event.detail.optionId;\n this.emitIcChange(value);\n };\n\n // Update selected options - adds / removes them, in order of option list\n // Create new array if value prop is undefined\n private handleMultipleSelectChange = (value: string) => {\n if (this.value) {\n let valueArray = (this.value as string[]).slice();\n\n if (this.value.includes(value)) {\n const valueIndex = valueArray.indexOf(value);\n valueArray.splice(valueIndex, 1);\n } else {\n valueArray.push(value);\n valueArray = this.getValueSortedByOptions(valueArray);\n }\n\n this.value = valueArray.length === 0 ? null : valueArray;\n } else {\n const valueArray = [];\n valueArray.push(value);\n this.value = valueArray;\n }\n };\n\n private handleSelectAllChange = (event: CustomEvent) => {\n const selectAllOptions = event.detail.select;\n const allEnabledOptions = this.ungroupedOptions.filter(\n (option) => !option.disabled\n );\n const allValues = allEnabledOptions.map((option) => option.value);\n let newValue: string[] | null;\n\n if (selectAllOptions) {\n let unselectedValues;\n\n // Only emit icOptionSelect for all values that are newly selected\n if (this.value) {\n unselectedValues = allValues.filter(\n (value) => this.value && !(this.value as string[]).includes(value)\n );\n } else {\n unselectedValues = allValues;\n }\n\n unselectedValues.forEach((value) => this.icOptionSelect.emit({ value }));\n newValue = allValues;\n } else {\n // Only emit icOptionDeselect for values that were selected\n (this.value as string[]).forEach((value) =>\n this.icOptionDeselect.emit({ value })\n );\n newValue = null;\n }\n\n this.emitIcChange(newValue);\n };\n\n private handleMenuChange = (event: CustomEvent): void => {\n this.open = event.detail.open;\n this.pressedCharacters = \"\";\n\n this.searchable && this.handleFocusIndicatorDisplay();\n };\n\n // clears the debounce delay when navigating the menu with arrow keys etc\n // to prevent delay in change event, which should only occur when typing in input\n private handleMenuKeyPress = (ev: CustomEvent): void => {\n ev.cancelBubble = true;\n if (!this.multiple) {\n this.handleCharacterKeyDown(ev.detail.key);\n }\n };\n\n private handleFocusIndicatorDisplay = () => {\n const focusIndicator =\n this.el.shadowRoot?.querySelector(\".focus-indicator\");\n\n if (focusIndicator) {\n if (this.open) {\n focusIndicator.classList.add(\"focus-indicator-enabled\");\n } else {\n focusIndicator.classList.remove(\"focus-indicator-enabled\");\n }\n }\n };\n\n private handleMouseDown = (event: Event): void => {\n if (!this.open) {\n event.preventDefault();\n }\n };\n\n private isExternalFiltering = (): boolean =>\n this.searchable! && !!this.disableAutoFiltering;\n\n private handleClick = (event: MouseEvent): void => {\n if (!this.open && this.menu) {\n if (this.isExternalFiltering()) {\n this.menu.options = this.filteredOptions;\n } else if (\n !this.hasTimedOut &&\n !this.loading &&\n !this.noOptions?.length &&\n (!this.searchable || this.searchableMenuItemSelected)\n ) {\n this.noOptions = null;\n this.menu.options = this.uniqueOptions;\n }\n }\n\n if (event.detail !== 0) {\n this.menu?.handleClickOpen();\n }\n };\n\n private handleExpandIconMouseDown = (event: MouseEvent) => {\n if (!this.disabled) {\n event.preventDefault();\n this.searchableSelectElement?.focus();\n this.handleClick(event);\n }\n };\n\n private handleClear = (event: Event): void => {\n event.stopPropagation();\n this.hasTimedOut = false;\n clearTimeout(this.timeoutTimer);\n this.clearInput();\n this.emitIcChange(null);\n this.icClear.emit();\n\n if (this.searchable) {\n this.hiddenInputValue = null;\n this.searchableSelectElement?.focus();\n } else {\n this.customSelectElement?.focus();\n }\n };\n\n private handleCharacterKeyDown = (key: string) => {\n // Only close menu when space is pressed if not being used alongside character keys to quickly select options\n if (\n this.open &&\n key === \" \" &&\n this.pressedCharacters.length === 0 &&\n !this.hasTimedOut &&\n !this.loading\n ) {\n this.setMenuChange(false);\n }\n\n if (key.length === 1 && !this.searchable) {\n window.clearTimeout(this.characterKeyPressTimer);\n this.characterKeyPressTimer = window.setTimeout(\n () => (this.pressedCharacters = \"\"),\n 1000\n );\n\n if (!(key === \" \" && !this.pressedCharacters)) {\n this.pressedCharacters += key;\n this.handleFilter();\n\n if (!this.noOptions) {\n this.emitIcChange(this.filteredOptions[0].value);\n }\n }\n } else {\n this.pressedCharacters = \"\";\n }\n };\n\n private handleNativeSelectKeyDown = (event: KeyboardEvent) => {\n if ((event.key !== \"Escape\" && event.key !== \"Tab\") || this.open) {\n event.cancelBubble = true;\n }\n this.handleCharacterKeyDown(event.key);\n };\n\n private handleKeyDown = (event: KeyboardEvent): void => {\n if ((event.key !== \"Escape\" && event.key !== \"Tab\") || this.open) {\n event.cancelBubble = true;\n }\n const isArrowKey = event.key === \"ArrowDown\" || event.key === \"ArrowUp\";\n\n if (this.menu && !this.open) {\n if (this.isExternalFiltering() && (event.key === \"Enter\" || isArrowKey)) {\n this.menu.options = this.filteredOptions;\n } else {\n if (!this.hasTimedOut) {\n this.noOptions = null;\n this.menu.options = this.uniqueOptions;\n }\n }\n }\n\n if (this.open && event.key === \"Enter\") {\n this.setMenuChange(false);\n } else {\n if (!(isArrowKey && this.noOptions !== null)) {\n if (!(event.key === \" \" && this.pressedCharacters.length > 0)) {\n // Keyboard events get passed onto ic-menu\n this.menu?.handleKeyboardOpen(event);\n }\n if (!this.multiple) {\n this.handleCharacterKeyDown(event.key);\n }\n }\n }\n };\n\n private handleClearButtonFocus = (): void => {\n this.clearButtonFocused = true;\n };\n\n private handleClearButtonBlur = (ev: FocusEvent): void => {\n const retryButton = this.menu?.querySelector(\"#retry-button\");\n if (\n !(\n this.searchableSelectElement &&\n ev.relatedTarget === this.searchableSelectElement\n ) &&\n !(retryButton && ev.relatedTarget === retryButton)\n ) {\n this.setMenuChange(false);\n this.handleFocusIndicatorDisplay();\n }\n this.clearButtonFocused = false;\n };\n\n private handleFilter = (): void => {\n const options = this.deduplicateOptions(\n this.searchable ? [...this.uniqueOptions] : this.ungroupedOptions\n );\n\n let isGrouped = false;\n let newFilteredOptions: IcMenuOption[] = [];\n\n options.map((option) => {\n if (option.children) isGrouped = true;\n });\n\n let menuOptionsFiltered: IcMenuOption[];\n\n if (this.searchable) {\n menuOptionsFiltered = getFilteredMenuOptions(\n options,\n !!this.includeDescriptionsInSearch,\n this.inputValueToFilter || \"\",\n this.searchMatchPosition\n );\n this.searchableMenuItemSelected = false;\n } else {\n menuOptionsFiltered = getFilteredMenuOptions(\n options,\n false,\n this.pressedCharacters,\n \"start\"\n );\n }\n\n if (\n !isGrouped &&\n menuOptionsFiltered[0]?.label !== this.emptyOptionListText\n ) {\n newFilteredOptions = menuOptionsFiltered;\n } else if (isGrouped) {\n options.map((option) => {\n if (this.includeGroupTitlesInSearch) {\n if (menuOptionsFiltered.indexOf(option) !== -1) {\n newFilteredOptions.push(option);\n } else {\n newFilteredOptions.push(this.getFilteredChildMenuOptions(option));\n }\n } else {\n newFilteredOptions.push(this.getFilteredChildMenuOptions(option));\n }\n });\n }\n\n let noChildOptionsWhenFiltered = false;\n\n if (isGrouped) {\n noChildOptionsWhenFiltered = true;\n newFilteredOptions.map((option) => {\n if (option.children && option.children.length > 0) {\n noChildOptionsWhenFiltered = false;\n }\n });\n }\n\n if (newFilteredOptions.length > 0 && !noChildOptionsWhenFiltered) {\n this.noOptions = null;\n this.filteredOptions = newFilteredOptions;\n } else {\n this.noOptions = [{ label: this.emptyOptionListText, value: \"\" }];\n this.filteredOptions = this.noOptions;\n }\n };\n\n /**\n * Put the select component into loading state.\n * Replace options with the loading message. If timeout is enabled, set the timeout and once passed, replace options with the loading error message\n */\n private triggerLoading = () => {\n this.hasTimedOut = false;\n this.noOptions = [{ label: this.loadingLabel, value: \"\", loading: true }];\n if (this.filteredOptions !== this.noOptions && this.searchable) {\n this.filteredOptions = this.noOptions;\n } else if (this.uniqueOptions !== this.noOptions && !this.searchable) {\n this.uniqueOptions = this.noOptions;\n }\n if (this.timeout) {\n this.timeoutTimer = window.setTimeout(() => {\n this.loading = false;\n this.hasTimedOut = true;\n this.noOptions = [\n { label: this.loadingErrorLabel, value: \"\", timedOut: true },\n ];\n this.filteredOptions = this.noOptions;\n if (!this.searchable) this.uniqueOptions = this.noOptions;\n }, this.timeout);\n }\n };\n\n private getValueFromLabel = (label: string | null): string | undefined => {\n return (\n label &&\n this.uniqueOptions.find((option) => option.label === label)?.value\n );\n };\n\n private handleSearchableSelectInput = (event: Event): void => {\n this.searchableSelectInputValue = (event.target as HTMLInputElement).value;\n this.emitIcInput(this.searchableSelectInputValue);\n\n // De-select previous selection when input is edited\n // Only emit icChange once when editing input\n if (this.value != null) {\n this.emitIcChange(null);\n }\n\n this.hiddenInputValue = null;\n this.inputValueToFilter = this.searchableSelectInputValue;\n this.setMenuChange(true);\n\n if (!this.disableAutoFiltering) {\n this.handleFilter();\n this.debounceAriaLiveUpdate();\n }\n };\n\n private updateSearchableSelectResultAriaLive = (): void => {\n const searchableSelectResultsStatusEl = this.el.shadowRoot?.querySelector(\n \".searchable-select-results-status\"\n ) as HTMLDivElement;\n\n if (searchableSelectResultsStatusEl) {\n if (this.noOptions !== null) {\n searchableSelectResultsStatusEl.innerText = this.emptyOptionListText!;\n } else {\n searchableSelectResultsStatusEl.innerText = \"\";\n }\n }\n };\n\n private debounceAriaLiveUpdate() {\n clearTimeout(this.debounceAria);\n\n window.setTimeout(() => {\n this.updateSearchableSelectResultAriaLive();\n }, 800);\n }\n\n private updateMultiSelectedCountAriaLive = (): void => {\n const multiSelectSelectedCountEl = this.el.shadowRoot?.querySelector(\n \".multi-select-selected-count\"\n ) as HTMLDivElement;\n\n const selectedCount = `${\n this.currValue?.length\n } of ${getOptionsWithoutGroupTitlesCount(this.options!)} selected`;\n\n if (\n multiSelectSelectedCountEl &&\n multiSelectSelectedCountEl.innerText !== selectedCount\n ) {\n multiSelectSelectedCountEl.innerText = selectedCount;\n }\n };\n\n private getDefaultValue = (value: string): string | null =>\n this.getLabelFromValue(value) || null;\n\n private setDefaultValue = (): void => {\n if (!this.hasSetDefaultValue && this.currValue) {\n this.searchableSelectInputValue = this.searchable\n ? this.getDefaultValue(this.currValue as string)\n : null;\n\n this.initialValue = this.currValue;\n this.hasSetDefaultValue = true;\n }\n };\n\n private onFocus = (): void => {\n this.icFocus.emit();\n };\n\n private onBlur = ({ relatedTarget }: FocusEvent): void => {\n const target = relatedTarget as HTMLElement;\n if (\n target !== null &&\n ((target.tagName === \"UL\" && target.className.includes(\"menu\")) ||\n (target.tagName === \"LI\" && target.className.includes(\"option\")))\n ) {\n return;\n }\n\n const retryButton = this.menu?.querySelector(\"#retry-button\");\n const isSearchableAndNoFocusedInternalElements =\n this.searchable &&\n !!this.menu &&\n target !== this.menu &&\n !Array.from(this.menu.querySelectorAll(\"[role='option']\")).includes(\n target\n ) &&\n !(this.clearButton && target === this.clearButton) &&\n !(retryButton && target === retryButton);\n\n if (isSearchableAndNoFocusedInternalElements) {\n if (!this.retryButtonClick) {\n this.setMenuChange(false);\n // Clear input field on blur when searchable if no option is selected\n if (!this.value) {\n this.clearInput();\n }\n }\n this.handleFocusIndicatorDisplay();\n }\n\n this.retryButtonClick = false;\n this.icBlur.emit();\n };\n\n private onTimeoutBlur = (ev: CustomEvent) => {\n if (\n (ev.detail.ev as FocusEvent).relatedTarget !==\n this.searchableSelectElement &&\n !this.blurredBecauseButtonPressed\n ) {\n this.setMenuChange(false);\n this.handleFocusIndicatorDisplay();\n this.icBlur.emit();\n }\n this.blurredBecauseButtonPressed = false;\n };\n\n private handleFormReset = (): void => {\n this.value = this.initialValue;\n if (this.searchable) {\n this.searchableSelectInputValue = this.getDefaultValue(\n this.value as string\n );\n this.hiddenInputValue = this.value as string;\n }\n };\n\n private clearInput = (): void => {\n this.noOptions = null;\n\n if (this.searchable) {\n this.searchableSelectElement?.setAttribute(\"value\", \"\");\n this.searchableSelectInputValue = null;\n this.filteredOptions = this.uniqueOptions;\n }\n };\n\n render() {\n const {\n size,\n disabled,\n fullWidth,\n helperText,\n hideLabel,\n label,\n menuId,\n multiple,\n name,\n options,\n placeholder,\n readonly,\n required,\n searchable,\n showClearButton,\n validationStatus,\n validationText,\n currValue,\n theme,\n } = this;\n\n // HTML inputs only accept 'string' for their value\n // Does not cause errors when it is a multi-select - sets value correctly, to a comma-separated string\n renderHiddenInput(\n true,\n this.el,\n name || this.inputId,\n this.searchable ? this.hiddenInputValue : (currValue as string),\n disabled\n );\n\n const invalid = `${validationStatus === IcInformationStatus.Error}`;\n\n const describedBy = getInputDescribedByText(\n this.inputId,\n helperText !== \"\",\n hasValidationStatus(this.validationStatus, !!this.disabled)\n ).trim();\n\n let showLeftIcon = !!this.el.querySelector(`[slot=\"icon\"]`);\n if (showLeftIcon && (disabled || (readonly && !this.value))) {\n showLeftIcon = false;\n }\n\n const optionsSelectedCount = `${\n currValue?.length\n } of ${getOptionsWithoutGroupTitlesCount(this.options!)} selected`;\n\n const valueLabelString = multiple\n ? this.getMultipleOptionsString(currValue as string[])\n : this.getLabelFromValue(currValue as string);\n\n const isClearable =\n !disabled &&\n (searchable\n ? this.searchableSelectInputValue\n : currValue && showClearButton);\n\n return (\n <Host\n class={{\n \"ic-select-disabled\": !!disabled,\n \"ic-select-searchable\": !!searchable,\n [`ic-select-${size}`]: size !== \"medium\",\n \"ic-select-full-width\": !!fullWidth,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }}\n onBlur={this.onBlur}\n >\n <ic-input-container readonly={readonly}>\n {!hideLabel && (\n <ic-input-label\n for={this.inputId}\n label={label}\n helperText={helperText}\n required={required}\n disabled={disabled}\n readonly={readonly}\n ></ic-input-label>\n )}\n <ic-input-component-container\n ref={(el) => (this.anchorEl = el)}\n class={{ \"menu-open\": this.open }}\n size={size}\n fullWidth={fullWidth}\n disabled={disabled}\n readonly={readonly}\n validationStatus={validationStatus}\n >\n {showLeftIcon && (\n <span\n slot=\"left-icon\"\n class={{\n [\"readonly\"]: !!readonly,\n [\"has-value\"]: !!this.value,\n }}\n >\n <slot name=\"icon\" />\n </span>\n )}\n {readonly ? (\n <ic-typography>\n <p>{valueLabelString}</p>\n </ic-typography>\n ) : isMobileOrTablet() && !multiple ? (\n <select\n ref={(el) => (this.nativeSelectElement = el)}\n disabled={disabled}\n onChange={this.handleNativeSelectChange}\n required={required}\n id={this.inputId}\n aria-label={label}\n aria-describedby={describedBy}\n aria-invalid={invalid}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n onKeyDown={this.handleNativeSelectKeyDown}\n form={this.form}\n {...this.inheritedAttributes}\n >\n <option value=\"\" selected disabled={!showClearButton}>\n {placeholder}\n </option>\n {options!.map((option) => {\n if (option.children) {\n return (\n <optgroup label={option.label}>\n {option.children.map((option) => (\n <option\n value={option.value}\n disabled={option.disabled}\n selected={option.value === currValue}\n >\n {option.label}\n </option>\n ))}\n </optgroup>\n );\n } else {\n return (\n <option\n value={option.value}\n disabled={option.disabled}\n selected={option.value === currValue}\n >\n {option.label}\n </option>\n );\n }\n })}\n </select>\n ) : searchable ? (\n <div class=\"searchable-select-container\">\n <input\n class={{\n \"select-input\": true,\n \"with-clear-button\": !!this.searchableSelectInputValue,\n }}\n role=\"combobox\"\n autocomplete=\"off\"\n aria-label={label}\n aria-describedby={describedBy}\n aria-activedescendant={this.ariaActiveDescendant}\n aria-autocomplete=\"list\"\n aria-expanded={`${this.open}`}\n aria-invalid={invalid}\n aria-required={`${required}`}\n aria-controls={menuId}\n ref={(el) => (this.searchableSelectElement = el)}\n id={this.inputId}\n value={this.searchableSelectInputValue || undefined}\n placeholder={placeholder}\n disabled={disabled}\n onInput={this.handleSearchableSelectInput}\n onClick={this.handleClick}\n onKeyDown={this.handleKeyDown}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n form={this.form}\n ></input>\n {isClearable && (\n <div class=\"clear-button-container\">\n <ic-button\n id=\"clear-button\"\n ref={(el) => (this.clearButton = el)}\n aria-label={\n this.searchableSelectInputValue && currValue === null\n ? \"Clear input\"\n : \"Clear selection\"\n }\n class=\"clear-button\"\n innerHTML={Clear}\n onClick={this.handleClear}\n onFocus={this.handleClearButtonFocus}\n onBlur={this.handleClearButtonBlur}\n size={size}\n variant=\"icon\"\n theme={this.clearButtonFocused ? \"light\" : \"dark\"}\n ></ic-button>\n <div class=\"divider\"></div>\n </div>\n )}\n <span\n onMouseDown={this.handleExpandIconMouseDown}\n class={{\n \"expand-icon\": true,\n \"expand-icon-open\": this.open,\n }}\n innerHTML={Expand}\n aria-hidden=\"true\"\n />\n <div\n aria-live=\"polite\"\n role=\"status\"\n class=\"searchable-select-results-status\"\n ></div>\n </div>\n ) : (\n <div class=\"select-container\">\n <button\n class=\"select-input\"\n ref={(el) => (this.customSelectElement = el)}\n id={this.inputId}\n aria-label={`${label}, ${\n (multiple && currValue\n ? `${optionsSelectedCount}, ${valueLabelString}`\n : valueLabelString) || placeholder\n }${required ? \", required\" : \"\"}`}\n aria-describedby={describedBy}\n aria-invalid={invalid}\n aria-haspopup=\"listbox\"\n aria-expanded={this.open ? \"true\" : \"false\"}\n aria-owns={menuId}\n aria-controls={menuId}\n disabled={disabled}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n onClick={this.handleClick}\n onMouseDown={this.handleMouseDown}\n onKeyDown={this.handleKeyDown}\n >\n <ic-typography\n variant=\"body\"\n class={{\n \"value-text\": true,\n \"with-clear-button\": !!isClearable,\n placeholder: multiple\n ? !this.value || this.value.length < 1\n : !this.getLabelFromValue(currValue as string),\n }}\n >\n {valueLabelString || placeholder}\n </ic-typography>\n <div class=\"select-input-end\">\n {isClearable && <div class=\"divider\"></div>}\n <span\n class={{\n \"expand-icon\": true,\n \"expand-icon-open\": this.open,\n }}\n innerHTML={Expand}\n aria-hidden=\"true\"\n />\n </div>\n </button>\n {isClearable && (\n <ic-button\n id=\"clear-button\"\n aria-label=\"Clear selection\"\n class=\"clear-button\"\n innerHTML={Clear}\n onClick={this.handleClear}\n onFocus={this.handleClearButtonFocus}\n onBlur={this.handleClearButtonBlur}\n size={size}\n variant=\"icon\"\n theme={this.clearButtonFocused ? \"light\" : \"dark\"}\n ></ic-button>\n )}\n </div>\n )}\n </ic-input-component-container>\n {(!isMobileOrTablet() || multiple) && (\n <ic-menu\n class={{\n \"no-results\":\n this.loading ||\n this.hasTimedOut ||\n (this.noOptions !== null &&\n this.noOptions[0] &&\n this.noOptions[0].label === this.emptyOptionListText),\n }}\n ref={(el) => (this.menu = el)}\n inputEl={\n (searchable\n ? this.searchableSelectElement\n : this.customSelectElement)!\n }\n inputLabel={label}\n anchorEl={this.anchorEl!}\n size={size}\n menuId={menuId}\n open={this.open}\n options={searchable ? this.filteredOptions : this.uniqueOptions}\n value={multiple ? (currValue as string[]) : (currValue as string)}\n fullWidth={fullWidth}\n selectOnEnter={this.selectOnEnter}\n onMenuStateChange={this.handleMenuChange}\n onMenuOptionSelect={this.handleCustomSelectChange}\n onMenuOptionSelectAll={this.handleSelectAllChange}\n onMenuKeyPress={this.handleMenuKeyPress}\n onUngroupedOptionsSet={this.setUngroupedOptions}\n onRetryButtonClicked={this.handleRetry}\n parentEl={this.el}\n onTimeoutBlur={this.onTimeoutBlur}\n activationType={\n this.searchable || multiple || this.selectOnEnter\n ? \"manual\"\n : \"automatic\"\n }\n closeOnSelect={!multiple}\n ></ic-menu>\n )}\n {this.multiple && (\n <div\n aria-live=\"polite\"\n role=\"status\"\n class=\"multi-select-selected-count\"\n ></div>\n )}\n {hasValidationStatus(this.validationStatus, !!this.disabled) && (\n <ic-input-validation\n class={{ \"menu-open\": this.open }}\n ariaLiveMode=\"polite\"\n status={validationStatus}\n message={validationText || \"\"}\n for={this.inputId}\n ></ic-input-validation>\n )}\n </ic-input-container>\n </Host>\n );\n }\n}\n"],"mappings":"2qBAAA,MAAMA,EAAc,45QACpB,MAAAC,EAAeD,EC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AKyI,sBAC5BgJ,eAAgBzR,KAAKkJ,mBACrBwI,sBAAuB1R,KAAKsG,oBAC5BqL,qBAAsB3R,KAAK4D,YAC3BgO,SAAU5R,KAAKuD,GACf0J,cAAejN,KAAKiN,cACpB4E,eACE7R,KAAK6B,YAAcL,GAAYxB,KAAK+B,cAChC,SACA,YAEN+P,eAAgBtQ,IAGnBxB,KAAKwB,UACJqO,EAAA,OAAAxG,IAAA,uDACY,SACVqH,KAAK,SACLX,MAAM,gCAGTR,EAAoBvP,KAAKmC,mBAAoBnC,KAAKc,WACjD+O,EAAA,uBAAAxG,IAAA,2CACE0G,MAAO,CAAE,YAAa/P,KAAKW,MAC3BoR,aAAa,SACbC,OAAQ7P,EACR8P,QAAS7P,GAAkB,GAC3B4N,IAAKhQ,KAAKI,W","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import{r as t,c as e,h as i,H as o,g as r}from"./p-8e4e97b4.js";import{d as s,r as n,b as a,i as c}from"./p-269f841d.js";import{C as u}from"./p-c2e091d7.js";import{C as l}from"./p-3b185c32.js";const p='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}li{list-style:none;padding:0}:host ::part(button){color:var(--ic-popover-menu-item-check);--ic-typography-color:var(--ic-popover-menu-item-check);padding:calc(var(--ic-space-xxxs) / 2);display:flex;align-items:flex-start;gap:var(--ic-space-xs);border-radius:0;min-height:2.5rem;height:auto}.focus-border{display:flex;align-items:flex-start;gap:var(--ic-space-xs);border-radius:var(--ic-border-radius);margin:calc(var(--ic-space-xxxs) / 2);padding:var(--ic-space-xxs);border:var(--ic-space-xxxs) dashed transparent;--icon-height:auto}:host(.ic-menu-item-disabled) ::part(button){color:var(--ic-popover-menu-item-check-disabled) !important;--ic-typography-color:var(--ic-popover-menu-item-check-disabled) !important;pointer-events:none}:host(.ic-menu-item-disabled) .menu-item-label,:host(.ic-menu-item-disabled) .shortcut,:host(.ic-menu-item-disabled) .menu-item-description{--ic-typography-color:var(--ic-popover-menu-item-label-disabled) !important}:host([variant="destructive"]) ::part(button){color:var(--ic-popover-menu-destructive-item-icon);--ic-typography-color:var(--ic-popover-menu-destructive-item-label)}:host ::part(button):hover{background-color:var(--ic-popover-background-hover)}:host ::part(button):focus-visible,:host ::part(button):focus{color:var(--ic-popover-menu-item-icon-focused);--ic-typography-color:purple;background-color:var(--ic-popover-background-focus);box-shadow:none}:host(.ic-menu-item-disabled) ::part(button):focus-visible,:host(.ic-menu-item-disabled) ::part(button):focus{color:var(--ic-popover-menu-item-icon-disabled) !important;--ic-typography-color:orange !important}:host([variant="destructive"]) ::part(button):focus-visible,:host([variant="destructive"]) ::part(button):focus{background-color:var(--ic-popover-destructive-background-focus)}ic-button:focus-within .menu-item-label,ic-button:focus-within .shortcut,ic-button:focus-within .menu-item-description{--ic-typography-color:var(--ic-popover-menu-item-label-focused)}:host(.ic-menu-item-disabled) ic-button:focus-within .focus-border{border-color:var(--ic-popover-menu-border)}:host(.ic-menu-item-disabled) ic-button:focus-within .menu-item-label,:host(.ic-menu-item-disabled) ic-button:focus-within .shortcut,:host(.ic-menu-item-disabled) ic-button:focus-within .menu-item-description{--ic-typography-color:var(--ic-popover-menu-item-label-disabled) !important}:host ::part(button):active{background-color:var(--ic-popover-background-pressed);color:var(--ic-popover-menu-item-label) !important;--ic-typography-color:var(--ic-popover-menu-item-label) !important}:host([variant="destructive"]) ::part(button):active{background-color:var(--ic-popover-background-pressed);color:var(--ic-popover-menu-destructive-item-label) !important;--ic-typography-color:var(\n --ic-popover-menu-destructive-item-label\n ) !important}.menu-item-info{display:flex;flex-direction:column;flex:1;align-items:baseline;white-space:pre-line;text-align:left}.menu-labels{display:flex;align-items:baseline;gap:var(--ic-space-xs)}.menu-item-description{--ic-typography-color:var(--ic-popover-menu-item-description)}.shortcut{--ic-typography-color:var(--ic-popover-menu-item-shortcut);display:flex;flex:min-content}:host([variant="destructive"]) .menu-item-label{text-transform:uppercase;font-weight:600;letter-spacing:0.025em}ic-button:active .menu-item-label{--ic-typography-color:var(--ic-popover-menu-item-label)}ic-button:active .menu-item-description{--ic-typography-color:var(--ic-popover-menu-item-description)}ic-button:active .shortcut{--ic-typography-color:var(--ic-popover-menu-item-shortcut)}:host([variant="destructive"]) ic-button:active .menu-item-label{--ic-typography-color:var(\n --ic-popover-menu-destructive-item-label\n ) !important}.icon,.check-icon,.submenu-icon,.icon ::slotted(svg),.check-icon svg,.submenu-icon svg{width:var(--ic-space-lg);height:var(--ic-space-lg)}.check-icon.hide{visibility:hidden}@media (forced-colors: active){:host ::part(button){border:canvas}:host ::part(button):focus-visible{outline:var(--ic-space-xxxs) solid transparent}.focus-border{border-color:canvas}:host(.ic-menu-item-disabled) ic-button:focus-within .focus-border{border-color:GrayText}:host(.ic-menu-item-disabled) .menu-item-info,:host(.ic-menu-item-disabled) .menu-item-label,:host(.ic-menu-item-disabled) .shortcut,:host(.ic-menu-item-disabled) .menu-item-description,:host(.ic-menu-item-disabled) ic-button:focus-within .menu-item-info,:host(.ic-menu-item-disabled) ic-button:focus-within .menu-item-label,:host(.ic-menu-item-disabled) ic-button:focus-within .shortcut,:host(.ic-menu-item-disabled) ic-button:focus-within .menu-item-description{--ic-typography-color:GrayText !important}:host(.ic-menu-item-disabled) ::part(button):focus-visible,:host(.ic-menu-item-disabled) ::part(button):focus{outline-color:GrayText !important}}';const m=p;const d=class{constructor(i){t(this,i);this.childBlur=e(this,"childBlur",7);this.handleMenuItemClick=e(this,"handleMenuItemClick",7);this.icToggleChecked=e(this,"icToggleChecked",7);this.triggerPopoverMenuInstance=e(this,"triggerPopoverMenuInstance",7);this.checked=false;this.disabled=false;this.variant="default";this.handleClick=t=>{if(s(this.submenuTriggerFor)){this.triggerPopoverMenuInstance.emit()}else if(this.variant==="toggle"){t.preventDefault();this.checked=!this.checked;this.icToggleChecked.emit({checked:this.checked})}this.handleMenuItemClick.emit(this.el)};this.getMenuItemAriaLabel=()=>{let t=this.label;if(s(this.description)){t=`${t}, ${this.description}`}if(s(this.keyboardShortcutLabel)){t=`${t}, ${this.keyboardShortcutLabel}`}if(this.variant==="destructive"){t=`${t}, destructive`}if(s(this.submenuTriggerFor)){t=`${t}, triggers submenu`}if(this.el.classList.contains("ic-popover-submenu-back-button")){t="Go back to parent menu"}const e=this.el.parentElement;if(e&&e.tagName==="IC-MENU-GROUP"&&e.label){return`${t}, ${e.label} menu group`}else{return t}}}watchDisabledHandler(){n(this.disabled,this.el)}componentWillLoad(){if(s(this.submenuTriggerFor)&&this.variant!=="default"){this.variant="default"}n(this.disabled,this.el)}componentDidLoad(){a([{prop:this.label,propName:"label"}],"Menu Item")}handleHostClick(t){if(this.disabled){t.stopImmediatePropagation()}}render(){const t=()=>i("div",{class:"menu-item-info"},i("div",{class:"menu-labels"},i("ic-typography",{class:"menu-item-label"},this.label),this.keyboardShortcutLabel&&i("ic-typography",{variant:"caption",class:"shortcut"},this.keyboardShortcutLabel)),this.description&&i("ic-typography",{class:"menu-item-description",variant:"caption"},this.description));return i(o,{class:{["ic-menu-item-disabled"]:!!this.disabled}},i("li",{role:this.variant==="toggle"?"menuitemcheckbox":"menuitem","aria-disabled":`${this.disabled}`,"aria-checked":this.variant==="toggle"?this.checked?"true":"false":undefined},i("ic-button",{fullWidth:true,variant:"tertiary",onClick:this.handleClick,href:s(this.href),hreflang:s(this.hreflang),target:s(this.target),rel:s(this.rel),referrerpolicy:this.referrerpolicy,"aria-disabled":`${this.disabled}`,"aria-label":this.getMenuItemAriaLabel(),"aria-haspopup":s(this.submenuTriggerFor)||this.el.classList.contains("ic-popover-submenu-back-button")?"menu":false},i("div",{class:"focus-border"},c(this.el,"icon")&&i("span",{class:"icon"},i("slot",{name:"icon"})),i(t,null),this.variant==="toggle"&&i("span",{class:{["check-icon"]:true,["hide"]:!this.checked},"aria-hidden":"true",innerHTML:u}),s(this.submenuTriggerFor)&&i("span",{class:{["submenu-icon"]:true},"aria-hidden":"true",innerHTML:l})))))}static get delegatesFocus(){return true}get el(){return r(this)}static get watchers(){return{disabled:["watchDisabledHandler"]}}};d.style=m;export{d as ic_menu_item};
2
+ //# sourceMappingURL=p-dce2c5e8.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["icMenuItemCss","IcMenuItemStyle0","MenuItem","constructor","hostRef","this","checked","disabled","variant","handleClick","e","isPropDefined","submenuTriggerFor","triggerPopoverMenuInstance","emit","preventDefault","icToggleChecked","handleMenuItemClick","el","getMenuItemAriaLabel","ariaLabel","label","description","keyboardShortcutLabel","classList","contains","parentEl","parentElement","tagName","watchDisabledHandler","removeDisabledFalse","componentWillLoad","componentDidLoad","onComponentRequiredPropUndefined","prop","propName","handleHostClick","stopImmediatePropagation","render","MenuItemInformation","h","class","Host","role","undefined","fullWidth","onClick","href","hreflang","target","rel","referrerpolicy","isSlotUsed","name","innerHTML","Check","Chevron"],"sources":["src/components/ic-menu-item/ic-menu-item.css?tag=ic-menu-item&encapsulation=shadow","src/components/ic-menu-item/ic-menu-item.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\nli {\n list-style: none;\n padding: 0;\n}\n\n:host ::part(button) {\n color: var(--ic-popover-menu-item-check);\n --ic-typography-color: var(--ic-popover-menu-item-check);\n padding: calc(var(--ic-space-xxxs) / 2);\n display: flex;\n align-items: flex-start;\n gap: var(--ic-space-xs);\n border-radius: 0;\n min-height: 2.5rem;\n height: auto;\n}\n\n.focus-border {\n display: flex;\n align-items: flex-start;\n gap: var(--ic-space-xs);\n border-radius: var(--ic-border-radius);\n margin: calc(var(--ic-space-xxxs) / 2);\n padding: var(--ic-space-xxs);\n border: var(--ic-space-xxxs) dashed transparent;\n\n --icon-height: auto;\n}\n\n:host(.ic-menu-item-disabled) ::part(button) {\n color: var(--ic-popover-menu-item-check-disabled) !important;\n\n --ic-typography-color: var(--ic-popover-menu-item-check-disabled) !important;\n\n pointer-events: none;\n}\n\n:host(.ic-menu-item-disabled) .menu-item-label,\n:host(.ic-menu-item-disabled) .shortcut,\n:host(.ic-menu-item-disabled) .menu-item-description {\n --ic-typography-color: var(--ic-popover-menu-item-label-disabled) !important;\n}\n\n:host([variant=\"destructive\"]) ::part(button) {\n color: var(--ic-popover-menu-destructive-item-icon);\n\n --ic-typography-color: var(--ic-popover-menu-destructive-item-label);\n}\n\n:host ::part(button):hover {\n background-color: var(--ic-popover-background-hover);\n}\n\n:host ::part(button):focus-visible,\n:host ::part(button):focus {\n color: var(--ic-popover-menu-item-icon-focused);\n\n --ic-typography-color: purple;\n\n background-color: var(--ic-popover-background-focus);\n box-shadow: none;\n}\n\n:host(.ic-menu-item-disabled) ::part(button):focus-visible,\n:host(.ic-menu-item-disabled) ::part(button):focus {\n color: var(--ic-popover-menu-item-icon-disabled) !important;\n\n --ic-typography-color: orange !important;\n}\n\n:host([variant=\"destructive\"]) ::part(button):focus-visible,\n:host([variant=\"destructive\"]) ::part(button):focus {\n background-color: var(--ic-popover-destructive-background-focus);\n}\n\nic-button:focus-within .menu-item-label,\nic-button:focus-within .shortcut,\nic-button:focus-within .menu-item-description {\n --ic-typography-color: var(--ic-popover-menu-item-label-focused);\n}\n\n:host(.ic-menu-item-disabled) ic-button:focus-within .focus-border {\n border-color: var(--ic-popover-menu-border);\n}\n\n:host(.ic-menu-item-disabled) ic-button:focus-within .menu-item-label,\n:host(.ic-menu-item-disabled) ic-button:focus-within .shortcut,\n:host(.ic-menu-item-disabled) ic-button:focus-within .menu-item-description {\n --ic-typography-color: var(--ic-popover-menu-item-label-disabled) !important;\n}\n\n:host ::part(button):active {\n background-color: var(--ic-popover-background-pressed);\n color: var(--ic-popover-menu-item-label) !important;\n\n --ic-typography-color: var(--ic-popover-menu-item-label) !important;\n}\n\n:host([variant=\"destructive\"]) ::part(button):active {\n background-color: var(--ic-popover-background-pressed);\n color: var(--ic-popover-menu-destructive-item-label) !important;\n\n --ic-typography-color: var(\n --ic-popover-menu-destructive-item-label\n ) !important;\n}\n\n.menu-item-info {\n display: flex;\n flex-direction: column;\n flex: 1;\n align-items: baseline;\n white-space: pre-line;\n text-align: left;\n}\n\n.menu-labels {\n display: flex;\n align-items: baseline;\n gap: var(--ic-space-xs);\n}\n\n.menu-item-description {\n --ic-typography-color: var(--ic-popover-menu-item-description);\n}\n\n.shortcut {\n --ic-typography-color: var(--ic-popover-menu-item-shortcut);\n\n display: flex;\n flex: min-content;\n}\n\n:host([variant=\"destructive\"]) .menu-item-label {\n text-transform: uppercase;\n font-weight: 600;\n letter-spacing: 0.025em;\n}\n\nic-button:active .menu-item-label {\n --ic-typography-color: var(--ic-popover-menu-item-label);\n}\n\nic-button:active .menu-item-description {\n --ic-typography-color: var(--ic-popover-menu-item-description);\n}\n\nic-button:active .shortcut {\n --ic-typography-color: var(--ic-popover-menu-item-shortcut);\n}\n\n:host([variant=\"destructive\"]) ic-button:active .menu-item-label {\n --ic-typography-color: var(\n --ic-popover-menu-destructive-item-label\n ) !important;\n}\n\n.icon,\n.check-icon,\n.submenu-icon,\n.icon ::slotted(svg),\n.check-icon svg,\n.submenu-icon svg {\n width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n}\n\n.check-icon.hide {\n visibility: hidden;\n}\n\n/** High Contrast **/\n@media (forced-colors: active) {\n :host ::part(button) {\n border: canvas;\n }\n\n :host ::part(button):focus-visible {\n outline: var(--ic-space-xxxs) solid transparent;\n }\n\n .focus-border {\n border-color: canvas;\n }\n\n :host(.ic-menu-item-disabled) ic-button:focus-within .focus-border {\n border-color: GrayText;\n }\n\n :host(.ic-menu-item-disabled) .menu-item-info,\n :host(.ic-menu-item-disabled) .menu-item-label,\n :host(.ic-menu-item-disabled) .shortcut,\n :host(.ic-menu-item-disabled) .menu-item-description,\n :host(.ic-menu-item-disabled) ic-button:focus-within .menu-item-info,\n :host(.ic-menu-item-disabled) ic-button:focus-within .menu-item-label,\n :host(.ic-menu-item-disabled) ic-button:focus-within .shortcut,\n :host(.ic-menu-item-disabled) ic-button:focus-within .menu-item-description {\n --ic-typography-color: GrayText !important;\n }\n\n :host(.ic-menu-item-disabled) ::part(button):focus-visible,\n :host(.ic-menu-item-disabled) ::part(button):focus {\n outline-color: GrayText !important;\n }\n}\n","import {\n Component,\n Element,\n Host,\n Prop,\n h,\n Event,\n EventEmitter,\n Listen,\n Watch,\n} from \"@stencil/core\";\nimport {\n isSlotUsed,\n onComponentRequiredPropUndefined,\n removeDisabledFalse,\n isPropDefined,\n} from \"../../utils/helpers\";\nimport { IcMenuItemVariants } from \"./ic-menu-item.types\";\nimport Check from \"../../assets/check-icon.svg\";\nimport Chevron from \"../../assets/chevron-icon.svg\";\n\n/**\n * @slot icon - Content will be placed to the left of the menu item label.\n */\n\n@Component({\n tag: \"ic-menu-item\",\n styleUrl: \"ic-menu-item.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class MenuItem {\n @Element() el: HTMLIcMenuItemElement;\n\n /**\n * If `true`, the menu item will be in a checked state. This is only applicable when variant is set to `toggle`.\n */\n @Prop({ mutable: true, reflect: true }) checked?: boolean = false;\n\n /**\n * The description displayed in the menu item, below the label.\n */\n @Prop() description?: string;\n\n /**\n * If `true`, the menu item will be in disabled state.\n */\n @Prop() disabled?: boolean = false;\n @Watch(\"disabled\")\n watchDisabledHandler(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n /**\n * The URL that the link points to. This will render the menu item as an \"a\" tag.\n */\n @Prop() href?: string;\n\n /**\n * The human language of the linked URL.\n */\n @Prop() hreflang?: string;\n\n /**\n * The label describing the keyboard shortcut for a menu item's action.\n */\n @Prop() keyboardShortcutLabel?: string;\n\n /**\n * The label to display in the menu item.\n */\n @Prop() label!: string;\n\n /**\n * How much of the referrer to send when following the link.\n */\n @Prop() referrerpolicy?: ReferrerPolicy;\n\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n @Prop() rel?: string;\n\n /**\n * This references the popover menu instance that the menu item is a trigger for. If this prop is set, then the variant will always be default.\n */\n @Prop() submenuTriggerFor?: string;\n\n /**\n * The place to display the linked URL, as the name for a browsing context (a tab, window, or iframe).\n */\n @Prop() target?: string;\n\n /**\n * The variant of the menu item.\n */\n @Prop({ mutable: true, reflect: true }) variant?: IcMenuItemVariants =\n \"default\";\n\n /**\n * @internal Emitted when item loses focus.\n */\n @Event() childBlur: EventEmitter<void>;\n\n /**\n * @internal Emitted when the user clicks a menu item.\n */\n @Event() handleMenuItemClick: EventEmitter<HTMLIcMenuItemElement>;\n\n /**\n * Emitted when the user clicks a menu item that is set to the toggle variant.\n */\n @Event() icToggleChecked: EventEmitter<{\n checked: boolean;\n }>;\n\n /**\n * @internal Emitted when the user clicks a menu item that triggers a popover menu instance.\n */\n @Event() triggerPopoverMenuInstance: EventEmitter<void>;\n\n componentWillLoad(): void {\n // This ensures that trigger menu items are always set to the default variant\n if (isPropDefined(this.submenuTriggerFor) && this.variant !== \"default\") {\n this.variant = \"default\";\n }\n removeDisabledFalse(this.disabled, this.el);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Menu Item\"\n );\n }\n\n @Listen(\"click\", { capture: true })\n handleHostClick(e: Event): void {\n if (this.disabled) {\n e.stopImmediatePropagation();\n }\n }\n\n private handleClick = (e: Event): void => {\n if (isPropDefined(this.submenuTriggerFor)) {\n this.triggerPopoverMenuInstance.emit();\n } else if (this.variant === \"toggle\") {\n e.preventDefault();\n this.checked = !this.checked;\n this.icToggleChecked.emit({\n checked: this.checked,\n });\n }\n this.handleMenuItemClick.emit(this.el);\n };\n\n private getMenuItemAriaLabel = (): string => {\n let ariaLabel = this.label;\n\n if (isPropDefined(this.description)) {\n ariaLabel = `${ariaLabel}, ${this.description}`;\n }\n\n if (isPropDefined(this.keyboardShortcutLabel)) {\n ariaLabel = `${ariaLabel}, ${this.keyboardShortcutLabel}`;\n }\n\n if (this.variant === \"destructive\") {\n ariaLabel = `${ariaLabel}, destructive`;\n }\n\n if (isPropDefined(this.submenuTriggerFor)) {\n ariaLabel = `${ariaLabel}, triggers submenu`;\n }\n\n if (this.el.classList.contains(\"ic-popover-submenu-back-button\")) {\n ariaLabel = \"Go back to parent menu\";\n }\n const parentEl = this.el.parentElement;\n\n if (\n parentEl &&\n parentEl.tagName === \"IC-MENU-GROUP\" &&\n (parentEl as HTMLIcMenuGroupElement).label\n ) {\n return `${ariaLabel}, ${\n (parentEl as HTMLIcMenuGroupElement).label\n } menu group`;\n } else {\n return ariaLabel;\n }\n };\n\n render() {\n // A sub-component to layout the menu information correctly in ic-button\n const MenuItemInformation = () => {\n return (\n <div class=\"menu-item-info\">\n <div class=\"menu-labels\">\n <ic-typography class=\"menu-item-label\">{this.label}</ic-typography>\n {this.keyboardShortcutLabel && (\n <ic-typography variant=\"caption\" class=\"shortcut\">\n {this.keyboardShortcutLabel}\n </ic-typography>\n )}\n </div>\n {this.description && (\n <ic-typography class=\"menu-item-description\" variant=\"caption\">\n {this.description}\n </ic-typography>\n )}\n </div>\n );\n };\n\n return (\n <Host\n class={{\n [\"ic-menu-item-disabled\"]: !!this.disabled,\n }}\n >\n <li\n role={this.variant === \"toggle\" ? \"menuitemcheckbox\" : \"menuitem\"}\n aria-disabled={`${this.disabled}`}\n aria-checked={\n this.variant === \"toggle\"\n ? this.checked\n ? \"true\"\n : \"false\"\n : undefined\n }\n >\n <ic-button\n fullWidth\n variant=\"tertiary\"\n onClick={this.handleClick}\n href={isPropDefined(this.href)}\n hreflang={isPropDefined(this.hreflang)}\n target={isPropDefined(this.target)}\n rel={isPropDefined(this.rel)}\n referrerpolicy={this.referrerpolicy}\n aria-disabled={`${this.disabled}`}\n aria-label={this.getMenuItemAriaLabel()}\n aria-haspopup={\n isPropDefined(this.submenuTriggerFor) ||\n this.el.classList.contains(\"ic-popover-submenu-back-button\")\n ? \"menu\"\n : false\n }\n >\n <div class=\"focus-border\">\n {isSlotUsed(this.el, \"icon\") && (\n <span class=\"icon\">\n <slot name=\"icon\"></slot>\n </span>\n )}\n <MenuItemInformation />\n {this.variant === \"toggle\" && (\n <span\n class={{\n [\"check-icon\"]: true,\n [\"hide\"]: !this.checked,\n }}\n aria-hidden=\"true\"\n innerHTML={Check}\n />\n )}\n {isPropDefined(this.submenuTriggerFor) && (\n <span\n class={{ [\"submenu-icon\"]: true }}\n aria-hidden=\"true\"\n innerHTML={Chevron}\n />\n )}\n </div>\n </ic-button>\n </li>\n </Host>\n );\n }\n}\n"],"mappings":"iMAAA,MAAMA,EAAgB,mkOACtB,MAAAC,EAAeD,E,MC+BFE,EAAQ,MAPrB,WAAAC,CAAAC,G,gOAa0CC,KAAAC,QAAoB,MAUpDD,KAAAE,SAAqB,MAiDWF,KAAAG,QACtC,UA8CMH,KAAAI,YAAeC,IACrB,GAAIC,EAAcN,KAAKO,mBAAoB,CACzCP,KAAKQ,2BAA2BC,M,MAC3B,GAAIT,KAAKG,UAAY,SAAU,CACpCE,EAAEK,iBACFV,KAAKC,SAAWD,KAAKC,QACrBD,KAAKW,gBAAgBF,KAAK,CACxBR,QAASD,KAAKC,S,CAGlBD,KAAKY,oBAAoBH,KAAKT,KAAKa,GAAG,EAGhCb,KAAAc,qBAAuB,KAC7B,IAAIC,EAAYf,KAAKgB,MAErB,GAAIV,EAAcN,KAAKiB,aAAc,CACnCF,EAAY,GAAGA,MAAcf,KAAKiB,a,CAGpC,GAAIX,EAAcN,KAAKkB,uBAAwB,CAC7CH,EAAY,GAAGA,MAAcf,KAAKkB,uB,CAGpC,GAAIlB,KAAKG,UAAY,cAAe,CAClCY,EAAY,GAAGA,gB,CAGjB,GAAIT,EAAcN,KAAKO,mBAAoB,CACzCQ,EAAY,GAAGA,qB,CAGjB,GAAIf,KAAKa,GAAGM,UAAUC,SAAS,kCAAmC,CAChEL,EAAY,wB,CAEd,MAAMM,EAAWrB,KAAKa,GAAGS,cAEzB,GACED,GACAA,EAASE,UAAY,iBACpBF,EAAoCL,MACrC,CACA,MAAO,GAAGD,MACPM,EAAoCL,kB,KAElC,CACL,OAAOD,C,GA5IX,oBAAAS,GACEC,EAAoBzB,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AAMC,MAAM,QACVD,EAAA,QAAMa,KAAK,UAGfb,EAACD,EAAmB,MACnBlC,KAAKG,UAAY,UAChBgC,EAAA,QACEC,MAAO,CACL,CAAC,cAAe,KAChB,CAAC,SAAUpC,KAAKC,SACjB,cACW,OACZgD,UAAWC,IAGd5C,EAAcN,KAAKO,oBAClB4B,EAAA,QACEC,MAAO,CAAE,CAAC,gBAAiB,MAAM,cACrB,OACZa,UAAWE,O","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{r as e,c as t,h as i,H as o,g as s}from"./p-8e4e97b4.js";import{t as n,d as a}from"./p-269f841d.js";import{c as r}from"./p-68a5aaff.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-popover-nav-text);--ic-typography-color:var(--ic-popover-nav-text);position:relative;z-index:var(--ic-z-index-popover);box-sizing:border-box;box-shadow:var(--ic-elevation-overlay);display:none}:host(.on-dialog){inset:auto !important}:host(.on-dialog-fix-translate){transform:translate(0, var(--ic-space-xs)) !important}:host(.on-dialog-translate-y){transform:translate(0, calc(-1 * var(--translate-y))) !important}.menu{border:var(--ic-border-default);border-color:var(--ic-popover-border);border-radius:var(--ic-border-radius);background-color:var(--ic-popover-background);visibility:hidden;height:0}.button{text-decoration:none;list-style-type:none}:host(:focus-within){box-shadow:var(--ic-border-focus)}.menu:focus-visible{outline:none}:host(.ic-popover-menu-open){display:block;min-width:calc(20rem - var(--ic-space-xl));width:var(--popover-width, 20rem);max-width:calc(100vw - var(--ic-space-xl))}:host(.ic-popover-menu-open) .menu{visibility:visible;height:-moz-fit-content;height:fit-content;max-height:var(--max-height, -moz-fit-content);max-height:var(--max-height, fit-content);overflow-y:auto;overflow-x:hidden}.parent-label{--ic-typography-color:var(--ic-popover-parent-label);margin:var(--ic-space-xs) var(--ic-space-xs) 0}@keyframes slide-in{from{opacity:0;transform:translateX(10rem)}to{opacity:1;transform:translateX(0)}}@keyframes slide-out{from{opacity:0;transform:translateX(-10rem)}to{opacity:1;transform:translateX(0)}}';const c=l;const d=class{constructor(i){e(this,i);this.icPopoverClosed=t(this,"icPopoverClosed",7);this.ARIA_LABEL="aria-label";this.popoverMenuEls=[];this.openingFromChild=false;this.openingFromParent=false;this.submenuLevel=1;this.theme="inherit";this.open=undefined;this.setButtonFocus=()=>{var e;(e=this.popoverMenuEls[this.currentFocus])===null||e===void 0?void 0:e.focus()};this.findAnchorEl=e=>{let t=null;if(!e){this.submenuId===undefined&&console.error("No anchor specified for popover component")}else{t=document.querySelector(e.indexOf("#")===0?e:"#"+e);if(t===null){console.error(`Popover anchor element '${e}' not found`)}}return t};this.isNotPopoverMenuEl=e=>{const{id:t,tagName:i}=e.target;return t!==this.anchor&&i!=="IC-MENU-ITEM"&&i!=="IC-MENU-GROUP"&&i!=="IC-POPOVER-MENU"};this.getNextItemToSelect=(e,t)=>{const i=this.popoverMenuEls.length-1;if(e<1){e=0}let o=t?e+1:e-1;if(o<0){o=i}else if(o>i){o=0}return o};this.addMenuItems=e=>{var t;for(let i=0;i<e.length;i++){const o=e[i];if(o.tagName==="IC-MENU-ITEM"){this.popoverMenuEls.push(o)}else if(o.tagName==="IC-MENU-GROUP"){const e=(t=o.shadowRoot)===null||t===void 0?void 0:t.querySelector(".menu-items-wrapper");if(e){const t=n(e);t&&this.addMenuItems(t)}}}};this.getMenuAriaLabel=()=>{const e=this.el.getAttribute(this.ARIA_LABEL);if(a(this.submenuId)){return`${e}, within nested level ${this.submenuLevel} ${this.parentLabel} submenu,`}else{return e}};this.handleBackButtonClick=()=>{var e;(e=this.parentPopover)===null||e===void 0?void 0:e.openFromChild();this.open=false};this.initPopperJS=()=>{if(this.anchorEl){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"}}]})}}}watchOpenHandler(){var e;const t=(e=this.el.parentElement)===null||e===void 0?void 0:e.querySelectorAll(`ic-popover-menu`);if(this.open){if(t.length>0){t.forEach((e=>{if(e!==this.el){e.open=false}}))}if(this.parentPopover!==undefined&&!this.popoverMenuEls.some((e=>e.id))){this.backButton&&this.popoverMenuEls.unshift(this.backButton)}this.currentFocus=0;setTimeout(this.setButtonFocus,50)}else if(this.popperInstance){if(t.length>0){t.forEach((e=>{if(e!==this.el){e.open=false}}))}this.popperInstance.destroy();this.popperInstance=null}}disconnectedCallback(){if(this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}}componentDidLoad(){var e;const t=(e=this.el.shadowRoot)===null||e===void 0?void 0:e.querySelector("ul.button");if(t){const e=n(t);if(e!==null){this.addMenuItems(e)}}if(this.submenuId===undefined&&this.el.getAttribute(this.ARIA_LABEL)===null){console.error(`No aria-label specified for popover menu component - aria-label required`)}}componentWillRender(){this.anchorEl=this.findAnchorEl(this.anchor)}componentDidRender(){if(this.open&&!this.popperInstance){this.initPopperJS()}}handleMenuItemClick(e){if(!e.detail.submenuTriggerFor&&e.detail.label!=="Back"){this.closeMenu(false,e.detail)}}handleSubmenuChange(e){const t=e.target;this.open=false;const i=document.querySelector(`ic-popover-menu[submenu-id=${t.submenuTriggerFor}]`);i.parentPopover=this.el;i.anchor=this.anchor;i.ariaLabel=this.el.getAttribute(this.ARIA_LABEL);i.openFromParent();i.submenuLevel=this.submenuLevel+1;i.parentLabel=t.label}handleClick(e){if(this.open&&this.isNotPopoverMenuEl(e)){this.closeMenu()}}handleKeyDown(e){switch(e.key){case"ArrowDown":case"ArrowUp":e.preventDefault();this.currentFocus=this.getNextItemToSelect(this.currentFocus,e.key==="ArrowDown");this.setButtonFocus();break;case"Home":this.currentFocus=0;this.setButtonFocus();break;case"End":this.currentFocus=this.popoverMenuEls.length-1;this.setButtonFocus();break;case"Escape":case"Tab":e.preventDefault();if(this.open){this.closeMenu(true);this.el.blur()}break}}async openFromChild(){this.open=true;this.openingFromChild=true;setTimeout((()=>this.openingFromChild=false),1e3)}async openFromParent(){this.open=true;this.openingFromParent=true;setTimeout((()=>this.openingFromParent=false),1e3)}async closeMenu(e=false,t){var i;this.open=false;if(this.parentPopover){this.parentPopover.closeMenu(e,t)}else{if(e){(i=this.anchorEl)===null||i===void 0?void 0:i.focus()}this.icPopoverClosed.emit(t)}}render(){return i(o,{key:"0d600ea25ae46dca927e100d1c0f321afff64b01",class:{["ic-popover-menu-open"]:!!this.open,[`ic-theme-${this.theme}`]:this.theme!=="inherit"}},i("div",{key:"c94ec7dcd89b7a9bcfed03d5def6cf1be0243d50",id:this.parentPopover===undefined?`ic-popover-submenu-${this.submenuId}`:"",class:{menu:true}},i("span",{key:"a01071126c2bbd39f26e837988efabdd07fd3da8",class:{"opening-from-parent":this.openingFromParent,"opening-from-child":this.openingFromChild}},a(this.submenuId)&&i("span",{key:"c5f225a965cb77832d77ad895e6feb070f61fc33"},i("span",{key:"1d5e3ff2f1c52e10bc8646ba04858be20b40c8c2",role:"menu"},i("ic-menu-item",{key:"4b3f0324f21ed33b24df68cb72ea16d5704b97b4",class:"ic-popover-submenu-back-button",ref:e=>this.backButton=e,label:"Back",onClick:this.handleBackButtonClick,id:`ic-popover-submenu-back-button-${this.submenuLevel}`},i("svg",{key:"cb9d8fdcef344a5d8659516de8baac5856b776bf",slot:"icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"submenu-back-icon"},i("path",{key:"1d79d4c02b06b5651878ebf11d4a6d6428a6f45e",d:"M20 11H7.83L13.42 5.41L12 4L4 12L12 20L13.41 18.59L7.83 13H20V11Z",fill:"currentColor"})))),i("ic-typography",{key:"594d0374d03ec7764afe48b2e8d5959f39eb761d",variant:"subtitle-small",class:"parent-label"},this.parentLabel)),i("ul",{key:"7fa43dcda50ed5740f3922955e26c08946377f2e",class:"button","aria-label":this.getMenuAriaLabel(),role:"menu"},i("slot",{key:"25da236864fe2afd3f94fe53a41b180566490e1f"})))))}static get delegatesFocus(){return true}get el(){return s(this)}static get watchers(){return{open:["watchOpenHandler"]}}};d.style=c;export{d as ic_popover_menu};
2
- //# sourceMappingURL=p-de7542fa.entry.js.map
1
+ import{r as e,c as t,h as i,H as o,g as s}from"./p-8e4e97b4.js";import{t as n,d as a}from"./p-269f841d.js";import{c as r}from"./p-68a5aaff.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-popover-nav-text);--ic-typography-color:var(--ic-popover-nav-text);position:relative;z-index:var(--ic-z-index-popover);box-sizing:border-box;box-shadow:var(--ic-elevation-overlay);display:none}:host(.on-dialog){inset:auto !important}:host(.on-dialog-fix-translate){transform:translate(0, var(--ic-space-xs)) !important}:host(.on-dialog-translate-y){transform:translate(0, calc(-1 * var(--translate-y))) !important}.menu{border:var(--ic-border-default);border-color:var(--ic-popover-border);border-radius:var(--ic-border-radius);background-color:var(--ic-popover-background);visibility:hidden;height:0}.button{text-decoration:none;list-style-type:none}:host(:focus-within){box-shadow:var(--ic-border-focus)}.menu:focus-visible{outline:none}:host(.ic-popover-menu-open){display:block;min-width:calc(20rem - var(--ic-space-xl));width:var(--popover-width, 20rem);max-width:calc(100vw - var(--ic-space-xl))}:host(.ic-popover-menu-open) .menu{visibility:visible;height:-moz-fit-content;height:fit-content;max-height:var(--max-height, -moz-fit-content);max-height:var(--max-height, fit-content);overflow-y:auto;overflow-x:hidden}.parent-label{--ic-typography-color:var(--ic-popover-parent-label);margin:var(--ic-space-xs) var(--ic-space-xs) 0}@keyframes slide-in{from{opacity:0;transform:translateX(10rem)}to{opacity:1;transform:translateX(0)}}@keyframes slide-out{from{opacity:0;transform:translateX(-10rem)}to{opacity:1;transform:translateX(0)}}';const c=l;const d=class{constructor(i){e(this,i);this.icPopoverClosed=t(this,"icPopoverClosed",7);this.ARIA_LABEL="aria-label";this.popoverMenuEls=[];this.openingFromChild=false;this.openingFromParent=false;this.submenuLevel=1;this.theme="inherit";this.open=undefined;this.setButtonFocus=()=>{var e;(e=this.popoverMenuEls[this.currentFocus])===null||e===void 0?void 0:e.focus()};this.findAnchorEl=e=>{let t=null;if(!e){this.submenuId===undefined&&console.error("No anchor specified for popover component")}else{t=document.querySelector(e.indexOf("#")===0?e:"#"+e);if(t===null){console.error(`Popover anchor element '${e}' not found`)}}return t};this.isNotPopoverMenuEl=e=>{const{id:t,tagName:i}=e.target;return t!==this.anchor&&i!=="IC-MENU-ITEM"&&i!=="IC-MENU-GROUP"&&i!=="IC-POPOVER-MENU"};this.getNextItemToSelect=(e,t)=>{const i=this.popoverMenuEls.length-1;if(e<1){e=0}let o=t?e+1:e-1;if(o<0){o=i}else if(o>i){o=0}return o};this.addMenuItems=e=>{var t;for(let i=0;i<e.length;i++){const o=e[i];if(o.tagName==="IC-MENU-ITEM"){this.popoverMenuEls.push(o)}else if(o.tagName==="IC-MENU-GROUP"){const e=(t=o.shadowRoot)===null||t===void 0?void 0:t.querySelector(".menu-items-wrapper");if(e){const t=n(e);t&&this.addMenuItems(t)}}}};this.getMenuAriaLabel=()=>{const e=this.el.getAttribute(this.ARIA_LABEL);if(a(this.submenuId)){return`${e}, within nested level ${this.submenuLevel} ${this.parentLabel} submenu,`}else{return e}};this.handleBackButtonClick=()=>{var e;(e=this.parentPopover)===null||e===void 0?void 0:e.openFromChild();this.open=false};this.initPopperJS=()=>{if(this.anchorEl){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"}}]})}}}watchOpenHandler(){var e;const t=(e=this.el.parentElement)===null||e===void 0?void 0:e.querySelectorAll(`ic-popover-menu`);if(this.open){if(t.length>0){t.forEach((e=>{if(e!==this.el){e.open=false}}))}if(this.parentPopover!==undefined&&!this.popoverMenuEls.some((e=>e.id))){this.backButton&&this.popoverMenuEls.unshift(this.backButton)}this.currentFocus=0;setTimeout(this.setButtonFocus,50)}else if(this.popperInstance){if(t.length>0){t.forEach((e=>{if(e!==this.el){e.open=false}}))}this.popperInstance.destroy();this.popperInstance=null}}disconnectedCallback(){if(this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}}componentDidLoad(){var e;const t=(e=this.el.shadowRoot)===null||e===void 0?void 0:e.querySelector("ul.button");if(t){const e=n(t);if(e!==null){this.addMenuItems(e)}}if(this.submenuId===undefined&&this.el.getAttribute(this.ARIA_LABEL)===null){console.error(`No aria-label specified for popover menu component - aria-label required`)}this.watchOpenHandler()}componentWillRender(){this.anchorEl=this.findAnchorEl(this.anchor)}componentDidRender(){if(this.open&&!this.popperInstance){this.initPopperJS()}}handleMenuItemClick(e){if(!e.detail.submenuTriggerFor&&e.detail.label!=="Back"){this.closeMenu(false,e.detail)}}handleSubmenuChange(e){const t=e.target;this.open=false;const i=document.querySelector(`ic-popover-menu[submenu-id=${t.submenuTriggerFor}]`);i.parentPopover=this.el;i.anchor=this.anchor;i.ariaLabel=this.el.getAttribute(this.ARIA_LABEL);i.openFromParent();i.submenuLevel=this.submenuLevel+1;i.parentLabel=t.label}handleClick(e){if(this.open&&this.isNotPopoverMenuEl(e)){this.closeMenu()}}handleKeyDown(e){switch(e.key){case"ArrowDown":case"ArrowUp":e.preventDefault();this.currentFocus=this.getNextItemToSelect(this.currentFocus,e.key==="ArrowDown");this.setButtonFocus();break;case"Home":this.currentFocus=0;this.setButtonFocus();break;case"End":this.currentFocus=this.popoverMenuEls.length-1;this.setButtonFocus();break;case"Escape":case"Tab":e.preventDefault();if(this.open){this.closeMenu(true);this.el.blur()}break}}async openFromChild(){this.open=true;this.openingFromChild=true;setTimeout((()=>this.openingFromChild=false),1e3)}async openFromParent(){this.open=true;this.openingFromParent=true;setTimeout((()=>this.openingFromParent=false),1e3)}async closeMenu(e=false,t){var i;this.open=false;if(this.parentPopover){this.parentPopover.closeMenu(e,t)}else{if(e){(i=this.anchorEl)===null||i===void 0?void 0:i.focus()}this.icPopoverClosed.emit(t)}}render(){return i(o,{key:"22d7146fb66905fd58370ecdb03dcbe750d5c287",class:{["ic-popover-menu-open"]:!!this.open,[`ic-theme-${this.theme}`]:this.theme!=="inherit"}},i("div",{key:"63efc4505ce4a676839c259b174604c79b0e7781",id:this.parentPopover===undefined?`ic-popover-submenu-${this.submenuId}`:"",class:{menu:true}},i("span",{key:"14860cdc189b85398dd92dce52907869d8223598",class:{"opening-from-parent":this.openingFromParent,"opening-from-child":this.openingFromChild}},a(this.submenuId)&&i("span",{key:"8e7a29c0d1159c156313247279c9b4bfb3e6ada4"},i("span",{key:"c2f9aa89fb51c822714ba71d078add0f55e529b1",role:"menu"},i("ic-menu-item",{key:"619dc3d8ba9dd9d479623d67fad0e3bc0d45f113",class:"ic-popover-submenu-back-button",ref:e=>this.backButton=e,label:"Back",onClick:this.handleBackButtonClick,id:`ic-popover-submenu-back-button-${this.submenuLevel}`},i("svg",{key:"61974e7d25308ab26ee4759243ba2f577f0e7ca8",slot:"icon",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"submenu-back-icon"},i("path",{key:"11e3b1b7496c19deeb22af35d4033e33d9c71b15",d:"M20 11H7.83L13.42 5.41L12 4L4 12L12 20L13.41 18.59L7.83 13H20V11Z",fill:"currentColor"})))),i("ic-typography",{key:"4f55d2cdc04fdc15157a76176339d8cb6548b3f2",variant:"subtitle-small",class:"parent-label"},this.parentLabel)),i("ul",{key:"ad2855ce0d5366fdf3a9ecaff58fba23edaee6f9",class:"button","aria-label":this.getMenuAriaLabel(),role:"menu"},i("slot",{key:"1f8122018db85fc386bc24fdb710de976d967240"})))))}static get delegatesFocus(){return true}get el(){return s(this)}static get watchers(){return{open:["watchOpenHandler"]}}};d.style=c;export{d as ic_popover_menu};
2
+ //# sourceMappingURL=p-e3be3502.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["icPopoverMenuCss","IcPopoverMenuStyle0","PopoverMenu","constructor","hostRef","this","ARIA_LABEL","popoverMenuEls","openingFromChild","openingFromParent","submenuLevel","theme","open","undefined","setButtonFocus","_a","currentFocus","focus","findAnchorEl","anchor","anchorElement","submenuId","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","parentLabel","handleBackButtonClick","parentPopover","openFromChild","initPopperJS","anchorEl","popperInstance","createPopper","placement","modifiers","name","options","offset","fallbackPlacements","rootBoundary","watchOpenHandler","popoverArr","parentElement","querySelectorAll","forEach","popover","some","menuItem","backButton","unshift","setTimeout","destroy","disconnectedCallback","componentDidLoad","slotWrapper","popoverMenuElements","componentWillRender","componentDidRender","handleMenuItemClick","detail","submenuTriggerFor","label","closeMenu","handleSubmenuChange","childEl","openFromParent","handleClick","handleKeyDown","key","preventDefault","blur","setFocusToAnchor","menuElement","icPopoverClosed","emit","render","h","Host","class","menu","role","ref","onClick","slot","viewBox","fill","xmlns","d","variant"],"sources":["src/components/ic-popover-menu/ic-popover-menu.css?tag=ic-popover-menu&encapsulation=shadow","src/components/ic-popover-menu/ic-popover-menu.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n/**\n* @prop --ic-z-index-popover: z-index of popover menu. \n* @prop --max-height: Maximum height of the popover menu.\n* @prop --popover-width: Default width of the popover menu.\n*/\n\n@media (prefers-reduced-motion: no-preference) {\n :host .opening-from-parent {\n animation: slide-in var(--ic-transition-duration-slow) ease-in-out;\n }\n\n :host .opening-from-child {\n animation: slide-out var(--ic-transition-duration-slow) ease-in-out;\n }\n}\n\n:host {\n border-radius: var(--ic-border-radius);\n color: var(--ic-popover-nav-text);\n\n --ic-typography-color: var(--ic-popover-nav-text);\n\n position: relative;\n z-index: var(--ic-z-index-popover);\n box-sizing: border-box;\n box-shadow: var(--ic-elevation-overlay);\n display: none;\n}\n\n:host(.on-dialog) {\n inset: auto !important;\n}\n\n:host(.on-dialog-fix-translate) {\n transform: translate(0, var(--ic-space-xs)) !important;\n}\n\n:host(.on-dialog-translate-y) {\n transform: translate(0, calc(-1 * var(--translate-y))) !important;\n}\n\n.menu {\n border: var(--ic-border-default);\n border-color: var(--ic-popover-border);\n border-radius: var(--ic-border-radius);\n background-color: var(--ic-popover-background);\n visibility: hidden;\n height: 0;\n}\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(.ic-popover-menu-open) {\n display: block;\n min-width: calc(20rem - var(--ic-space-xl));\n width: var(--popover-width, 20rem);\n max-width: calc(100vw - var(--ic-space-xl));\n}\n\n:host(.ic-popover-menu-open) .menu {\n visibility: visible;\n height: fit-content;\n max-height: var(--max-height, fit-content);\n overflow-y: auto;\n overflow-x: hidden;\n}\n\n.parent-label {\n --ic-typography-color: var(--ic-popover-parent-label);\n\n margin: var(--ic-space-xs) var(--ic-space-xs) 0;\n}\n\n@keyframes slide-in {\n from {\n opacity: 0;\n transform: translateX(10rem);\n }\n\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n@keyframes slide-out {\n from {\n opacity: 0;\n transform: translateX(-10rem);\n }\n\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n","import {\n Component,\n Element,\n Host,\n h,\n Prop,\n Listen,\n Watch,\n State,\n Method,\n Event,\n EventEmitter,\n} from \"@stencil/core\";\nimport { getSlotElements, isPropDefined } from \"../../utils/helpers\";\nimport { createPopper, Instance as PopperInstance } from \"@popperjs/core\";\nimport { IcThemeMode } from \"../../utils/types\";\n\n@Component({\n tag: \"ic-popover-menu\",\n styleUrl: \"ic-popover-menu.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class PopoverMenu {\n private anchorEl: HTMLElement | null;\n private ARIA_LABEL: string = \"aria-label\";\n private backButton?: HTMLIcMenuItemElement;\n private currentFocus: number;\n private popoverMenuEls: HTMLIcMenuItemElement[] = [];\n private popperInstance: PopperInstance | null;\n\n @Element() el: HTMLIcPopoverMenuElement;\n\n @State() openingFromChild: boolean = false;\n @State() openingFromParent: boolean = false;\n\n /**\n * The ID of the element the popover menu will anchor itself to. This is required unless the popover is a submenu.\n */\n @Prop() anchor?: string;\n\n /**\n * @internal The parent popover menu of a child popover menu.\n */\n @Prop() parentLabel?: string;\n\n /**\n * @internal The parent popover menu of a child popover menu.\n */\n @Prop() parentPopover?: HTMLIcPopoverMenuElement;\n\n /**\n * The unique identifier for a popover submenu.\n */\n @Prop() submenuId?: string;\n\n /**\n * @internal The level of menu being displayed.\n */\n @Prop() submenuLevel?: number = 1;\n\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme?: IcThemeMode = \"inherit\";\n\n /**\n * If `true`, the popover menu will be displayed.\n */\n @Prop({ reflect: true, mutable: true }) open?: boolean | undefined =\n undefined;\n\n @Watch(\"open\")\n watchOpenHandler(): void {\n const popoverArr = this.el.parentElement?.querySelectorAll(\n `ic-popover-menu`\n ) as NodeListOf<HTMLIcPopoverMenuElement>;\n if (this.open) {\n if (popoverArr.length > 0) {\n popoverArr.forEach((popover) => {\n if (popover !== this.el) {\n popover.open = false;\n }\n });\n }\n if (\n this.parentPopover !== undefined &&\n !this.popoverMenuEls.some((menuItem) => menuItem.id)\n ) {\n this.backButton && this.popoverMenuEls.unshift(this.backButton);\n }\n\n this.currentFocus = 0;\n // Needed so that anchorEl isn't always focused\n setTimeout(this.setButtonFocus, 50);\n } else if (this.popperInstance) {\n if (popoverArr.length > 0) {\n popoverArr.forEach((popover) => {\n if (popover !== this.el) {\n popover.open = false;\n }\n });\n }\n this.popperInstance.destroy();\n this.popperInstance = null;\n }\n }\n\n /**\n * Emitted when the popover menu is closed.\n */\n @Event() icPopoverClosed: EventEmitter<HTMLIcMenuItemElement>;\n\n disconnectedCallback(): void {\n if (this.popperInstance) {\n this.popperInstance.destroy();\n this.popperInstance = null;\n }\n }\n\n componentDidLoad(): void {\n const slotWrapper = this.el.shadowRoot?.querySelector(\"ul.button\");\n if (slotWrapper) {\n const popoverMenuElements = getSlotElements(slotWrapper);\n\n if (popoverMenuElements !== null) {\n this.addMenuItems(popoverMenuElements);\n }\n }\n\n if (\n this.submenuId === undefined &&\n this.el.getAttribute(this.ARIA_LABEL) === null\n ) {\n console.error(\n `No aria-label specified for popover menu component - aria-label required`\n );\n }\n\n this.watchOpenHandler();\n }\n\n componentWillRender(): void {\n this.anchorEl = this.findAnchorEl(this.anchor);\n }\n\n componentDidRender(): void {\n if (this.open && !this.popperInstance) {\n this.initPopperJS();\n }\n }\n\n @Listen(\"handleMenuItemClick\")\n handleMenuItemClick(ev: CustomEvent<HTMLIcMenuItemElement>): void {\n if (!ev.detail.submenuTriggerFor && ev.detail.label !== \"Back\") {\n this.closeMenu(false, ev.detail);\n }\n }\n\n // This is listening for the event emitted when a menu item is acting as a trigger button\n @Listen(\"triggerPopoverMenuInstance\", { capture: true })\n handleSubmenuChange(ev: Event): void {\n // Finds the trigger menu item that has emitted the event\n const target = ev.target as HTMLIcMenuItemElement;\n this.open = false;\n\n // Find the popover menu that the menu item triggers (i.e. submenu-trigger-for === submenu-id).\n const childEl = document.querySelector(\n `ic-popover-menu[submenu-id=${target.submenuTriggerFor}]`\n ) as HTMLIcPopoverMenuElement;\n // Set the parent popover menu of the submenu and open the submenu\n childEl.parentPopover = this.el;\n childEl.anchor = this.anchor;\n childEl.ariaLabel = this.el.getAttribute(this.ARIA_LABEL);\n childEl.openFromParent();\n childEl.submenuLevel = this.submenuLevel! + 1;\n // Set the label in the submenu using the label of the menu item that has emitted the event\n childEl.parentLabel = target.label;\n }\n\n @Listen(\"click\", { target: \"document\" })\n handleClick(ev: Event): void {\n if (this.open && this.isNotPopoverMenuEl(ev)) {\n // If menu is open and the next click on the document is not a popover El, close the popover\n this.closeMenu();\n }\n }\n\n // Manages the keyboard navigation in the popover menu\n @Listen(\"keydown\", {})\n handleKeyDown(ev: KeyboardEvent): void {\n switch (ev.key) {\n case \"ArrowDown\":\n case \"ArrowUp\":\n ev.preventDefault();\n this.currentFocus = this.getNextItemToSelect(\n this.currentFocus,\n ev.key === \"ArrowDown\"\n );\n this.setButtonFocus();\n break;\n case \"Home\":\n //Sets home focus as first element, or back button\n this.currentFocus = 0;\n this.setButtonFocus();\n break;\n case \"End\":\n //Sets end focus as last element\n this.currentFocus = this.popoverMenuEls.length - 1;\n this.setButtonFocus();\n break;\n case \"Escape\":\n case \"Tab\":\n ev.preventDefault();\n if (this.open) {\n this.closeMenu(true);\n this.el.blur();\n }\n break;\n }\n }\n\n /**\n * @internal Opens the menu from the child menu.\n */\n @Method()\n async openFromChild(): Promise<void> {\n this.open = true;\n this.openingFromChild = true;\n\n setTimeout(() => (this.openingFromChild = false), 1000);\n }\n\n /**\n * @internal Opens the menu from the parent menu.\n */\n @Method()\n async openFromParent(): Promise<void> {\n this.open = true;\n this.openingFromParent = true;\n\n setTimeout(() => (this.openingFromParent = false), 1000);\n }\n\n private setButtonFocus = () => {\n this.popoverMenuEls[this.currentFocus]?.focus();\n };\n\n // Checks that the popover menu has an anchor\n private findAnchorEl = (anchor: string | undefined): HTMLElement | null => {\n let anchorElement: HTMLElement | null = null;\n if (!anchor) {\n this.submenuId === undefined &&\n console.error(\"No anchor specified for popover component\");\n } else {\n anchorElement = document.querySelector(\n anchor.indexOf(\"#\") === 0 ? anchor : \"#\" + anchor\n );\n if (anchorElement === null) {\n console.error(`Popover anchor element '${anchor}' not found`);\n }\n }\n return anchorElement;\n };\n\n private isNotPopoverMenuEl = (ev: Event) => {\n const { id, tagName } = ev.target as HTMLElement;\n return (\n id !== this.anchor &&\n tagName !== \"IC-MENU-ITEM\" &&\n tagName !== \"IC-MENU-GROUP\" &&\n tagName !== \"IC-POPOVER-MENU\"\n );\n };\n\n /**\n * @internal Close the menu, emit icPopoverClosed of the root popover\n * @param setFocusToAnchor when true return focus to anchor element when menu is closed\n */\n @Method()\n async closeMenu(\n setFocusToAnchor = false,\n menuElement?: HTMLIcMenuItemElement\n ): Promise<void> {\n this.open = false;\n if (this.parentPopover) {\n this.parentPopover.closeMenu(setFocusToAnchor, menuElement);\n } else {\n if (setFocusToAnchor) {\n this.anchorEl?.focus();\n }\n this.icPopoverClosed.emit(menuElement);\n }\n }\n\n private getNextItemToSelect = (\n currentItem: number,\n movingDown: boolean\n ): number => {\n const numButtons = this.popoverMenuEls.length - 1;\n\n if (currentItem < 1) {\n currentItem = 0;\n }\n\n let nextItem = movingDown ? currentItem + 1 : currentItem - 1;\n\n // Check if wrap around necessary\n if (nextItem < 0) {\n nextItem = numButtons;\n } else if (nextItem > numButtons) {\n nextItem = 0;\n }\n\n return nextItem;\n };\n\n private addMenuItems = (elements: Element[] | NodeListOf<ChildNode>) => {\n for (let i = 0; i < elements.length; i++) {\n const el = elements[i] as HTMLIcMenuItemElement;\n if (el.tagName === \"IC-MENU-ITEM\") {\n this.popoverMenuEls.push(el);\n } else if (el.tagName === \"IC-MENU-GROUP\") {\n const groupSlotWrapper = el.shadowRoot?.querySelector(\n \".menu-items-wrapper\"\n );\n if (groupSlotWrapper) {\n const menuGroupElements = getSlotElements(groupSlotWrapper);\n menuGroupElements && this.addMenuItems(menuGroupElements);\n }\n }\n }\n };\n\n private getMenuAriaLabel = (): string | null => {\n const ariaLabel = this.el.getAttribute(this.ARIA_LABEL);\n\n if (isPropDefined(this.submenuId)) {\n return `${ariaLabel}, within nested level ${this.submenuLevel} ${this.parentLabel} submenu,`;\n } else {\n return ariaLabel;\n }\n };\n\n private handleBackButtonClick = (): void => {\n this.parentPopover?.openFromChild();\n this.open = false;\n };\n\n private initPopperJS = () => {\n if (this.anchorEl) {\n this.popperInstance = createPopper(this.anchorEl, this.el, {\n placement: \"bottom-start\",\n modifiers: [\n {\n name: \"offset\",\n options: {\n offset: [0, 4],\n },\n },\n {\n name: \"flip\",\n options: {\n fallbackPlacements: [\"top-start\", \"top-end\", \"bottom-end\"],\n rootBoundary: \"viewport\",\n },\n },\n ],\n });\n }\n };\n\n render() {\n return (\n <Host\n class={{\n [\"ic-popover-menu-open\"]: !!this.open,\n [`ic-theme-${this.theme}`]: this.theme !== \"inherit\",\n }}\n >\n <div\n id={\n this.parentPopover === undefined\n ? `ic-popover-submenu-${this.submenuId}`\n : \"\"\n }\n class={{\n menu: true,\n }}\n >\n <span\n class={{\n \"opening-from-parent\": this.openingFromParent,\n \"opening-from-child\": this.openingFromChild,\n }}\n >\n {isPropDefined(this.submenuId) && (\n <span>\n <span role=\"menu\">\n <ic-menu-item\n class=\"ic-popover-submenu-back-button\"\n ref={(el) => (this.backButton = el)}\n label=\"Back\"\n onClick={this.handleBackButtonClick}\n id={`ic-popover-submenu-back-button-${this.submenuLevel}`}\n >\n <svg\n slot=\"icon\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"submenu-back-icon\"\n >\n <path\n d=\"M20 11H7.83L13.42 5.41L12 4L4 12L12 20L13.41 18.59L7.83 13H20V11Z\"\n fill=\"currentColor\"\n />\n </svg>\n </ic-menu-item>\n </span>\n <ic-typography variant=\"subtitle-small\" class=\"parent-label\">\n {this.parentLabel}\n </ic-typography>\n </span>\n )}\n <ul class=\"button\" aria-label={this.getMenuAriaLabel()} role=\"menu\">\n <slot></slot>\n </ul>\n </span>\n </div>\n </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