@ukic/canary-web-components 2.0.0-canary.26 → 2.0.0-canary.27

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/ic-alert.cjs.entry.js +1 -1
  3. package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
  4. package/dist/cjs/ic-data-table.cjs.entry.js +5 -3
  5. package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
  6. package/dist/cjs/ic-empty-state_2.cjs.entry.js +15 -9
  7. package/dist/cjs/ic-empty-state_2.cjs.entry.js.map +1 -1
  8. package/dist/cjs/ic-pagination_4.cjs.entry.js +6 -6
  9. package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
  10. package/dist/cjs/ic-popover-menu.cjs.entry.js +18 -12
  11. package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
  12. package/dist/cjs/ic-search-bar.cjs.entry.js +14 -27
  13. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  14. package/dist/cjs/ic-tab-context.cjs.entry.js +68 -145
  15. package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
  16. package/dist/cjs/ic-tab-panel.cjs.entry.js +5 -13
  17. package/dist/cjs/ic-tab-panel.cjs.entry.js.map +1 -1
  18. package/dist/cjs/ic-tab.cjs.entry.js +9 -10
  19. package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
  20. package/dist/cjs/ic-typography.cjs.entry.js +3 -1
  21. package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
  22. package/dist/cjs/loader.cjs.js +1 -1
  23. package/dist/collection/components/ic-data-table/ic-data-table.css +5 -1
  24. package/dist/collection/components/ic-data-table/ic-data-table.js +4 -2
  25. package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
  26. package/dist/collection/components/ic-data-table/story-data.js +46 -5
  27. package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
  28. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +46 -14
  29. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -1
  30. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.types.js +2 -0
  31. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.types.js.map +1 -0
  32. package/dist/collection/components/ic-pagination-bar/test/basic/ic-pagination-bar.spec.js +20 -2
  33. package/dist/collection/components/ic-pagination-bar/test/basic/ic-pagination-bar.spec.js.map +1 -1
  34. package/dist/components/ic-alert2.js +1 -1
  35. package/dist/components/ic-alert2.js.map +1 -1
  36. package/dist/components/ic-data-table.js +5 -3
  37. package/dist/components/ic-data-table.js.map +1 -1
  38. package/dist/components/ic-pagination-bar2.js +18 -10
  39. package/dist/components/ic-pagination-bar2.js.map +1 -1
  40. package/dist/components/ic-popover-menu.js +20 -13
  41. package/dist/components/ic-popover-menu.js.map +1 -1
  42. package/dist/components/ic-search-bar.js +14 -27
  43. package/dist/components/ic-search-bar.js.map +1 -1
  44. package/dist/components/ic-select2.js +5 -5
  45. package/dist/components/ic-select2.js.map +1 -1
  46. package/dist/components/ic-tab-context.js +68 -145
  47. package/dist/components/ic-tab-context.js.map +1 -1
  48. package/dist/components/ic-tab-panel.js +6 -17
  49. package/dist/components/ic-tab-panel.js.map +1 -1
  50. package/dist/components/ic-tab.js +9 -10
  51. package/dist/components/ic-tab.js.map +1 -1
  52. package/dist/components/ic-text-field2.js +1 -1
  53. package/dist/components/ic-text-field2.js.map +1 -1
  54. package/dist/components/ic-typography2.js +3 -1
  55. package/dist/components/ic-typography2.js.map +1 -1
  56. package/dist/core/core.esm.js +1 -1
  57. package/dist/core/core.esm.js.map +1 -1
  58. package/dist/core/p-05ae9a59.entry.js +2 -0
  59. package/dist/core/p-05ae9a59.entry.js.map +1 -0
  60. package/dist/core/{p-989310a8.entry.js → p-0cf856e4.entry.js} +2 -2
  61. package/dist/core/p-0cf856e4.entry.js.map +1 -0
  62. package/dist/core/{p-2ee5d3fb.entry.js → p-34b333de.entry.js} +2 -2
  63. package/dist/core/p-34b333de.entry.js.map +1 -0
  64. package/dist/core/{p-6b1fcf87.entry.js → p-383ba7e8.entry.js} +2 -2
  65. package/dist/core/p-383ba7e8.entry.js.map +1 -0
  66. package/dist/core/p-6ca98c5d.entry.js +2 -0
  67. package/dist/core/p-6ca98c5d.entry.js.map +1 -0
  68. package/dist/core/{p-0ec04c16.entry.js → p-a7331e7c.entry.js} +2 -2
  69. package/dist/core/p-a7331e7c.entry.js.map +1 -0
  70. package/dist/core/p-b535c802.entry.js +2 -0
  71. package/dist/core/p-b535c802.entry.js.map +1 -0
  72. package/dist/core/{p-fa77211d.entry.js → p-cb156309.entry.js} +2 -2
  73. package/dist/core/p-cb156309.entry.js.map +1 -0
  74. package/dist/core/p-e50af3df.entry.js +2 -0
  75. package/dist/core/p-e50af3df.entry.js.map +1 -0
  76. package/dist/core/p-fc007ce4.entry.js +2 -0
  77. package/dist/core/p-fc007ce4.entry.js.map +1 -0
  78. package/dist/esm/core.js +1 -1
  79. package/dist/esm/ic-alert.entry.js +1 -1
  80. package/dist/esm/ic-alert.entry.js.map +1 -1
  81. package/dist/esm/ic-data-table.entry.js +5 -3
  82. package/dist/esm/ic-data-table.entry.js.map +1 -1
  83. package/dist/esm/ic-empty-state_2.entry.js +15 -9
  84. package/dist/esm/ic-empty-state_2.entry.js.map +1 -1
  85. package/dist/esm/ic-pagination_4.entry.js +6 -6
  86. package/dist/esm/ic-pagination_4.entry.js.map +1 -1
  87. package/dist/esm/ic-popover-menu.entry.js +18 -12
  88. package/dist/esm/ic-popover-menu.entry.js.map +1 -1
  89. package/dist/esm/ic-search-bar.entry.js +14 -27
  90. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  91. package/dist/esm/ic-tab-context.entry.js +68 -145
  92. package/dist/esm/ic-tab-context.entry.js.map +1 -1
  93. package/dist/esm/ic-tab-panel.entry.js +5 -13
  94. package/dist/esm/ic-tab-panel.entry.js.map +1 -1
  95. package/dist/esm/ic-tab.entry.js +9 -10
  96. package/dist/esm/ic-tab.entry.js.map +1 -1
  97. package/dist/esm/ic-typography.entry.js +3 -1
  98. package/dist/esm/ic-typography.entry.js.map +1 -1
  99. package/dist/esm/loader.js +1 -1
  100. package/dist/types/components/ic-data-table/story-data.d.ts +15 -0
  101. package/dist/types/components/ic-pagination-bar/ic-pagination-bar.d.ts +9 -4
  102. package/dist/types/components/ic-pagination-bar/ic-pagination-bar.types.d.ts +4 -0
  103. package/dist/types/components.d.ts +13 -3
  104. package/hydrate/index.js +150 -233
  105. package/package.json +3 -3
  106. package/dist/core/p-0ec04c16.entry.js.map +0 -1
  107. package/dist/core/p-216fbd5e.entry.js +0 -2
  108. package/dist/core/p-216fbd5e.entry.js.map +0 -1
  109. package/dist/core/p-2ee5d3fb.entry.js.map +0 -1
  110. package/dist/core/p-3ba4335c.entry.js +0 -2
  111. package/dist/core/p-3ba4335c.entry.js.map +0 -1
  112. package/dist/core/p-40e5fa80.entry.js +0 -2
  113. package/dist/core/p-40e5fa80.entry.js.map +0 -1
  114. package/dist/core/p-6af080d3.entry.js +0 -2
  115. package/dist/core/p-6af080d3.entry.js.map +0 -1
  116. package/dist/core/p-6b1fcf87.entry.js.map +0 -1
  117. package/dist/core/p-989310a8.entry.js.map +0 -1
  118. package/dist/core/p-c98ce508.entry.js +0 -2
  119. package/dist/core/p-c98ce508.entry.js.map +0 -1
  120. package/dist/core/p-fa77211d.entry.js.map +0 -1
@@ -37,18 +37,6 @@ const PopoverMenu = class {
37
37
  tagName !== "IC-MENU-GROUP" &&
38
38
  tagName !== "IC-POPOVER-MENU");
39
39
  };
40
- /**
41
- * Close the popover menu, emit isPopoverClosed event
42
- * @param setFocusToAnchor when true return focus to anchor element when menu is closed
43
- */
44
- this.closeMenu = (setFocusToAnchor = false) => {
45
- var _a;
46
- this.open = false;
47
- if (setFocusToAnchor) {
48
- (_a = this.anchorEl) === null || _a === void 0 ? void 0 : _a.focus();
49
- }
50
- this.icPopoverClosed.emit();
51
- };
52
40
  this.getNextItemToSelect = (currentItem, movingDown) => {
53
41
  const numButtons = this.popoverMenuEls.length - 1;
54
42
  if (currentItem < 1) {
@@ -207,6 +195,7 @@ const PopoverMenu = class {
207
195
  break;
208
196
  case "Escape":
209
197
  case "Tab":
198
+ ev.preventDefault();
210
199
  if (this.open) {
211
200
  this.closeMenu(true);
212
201
  this.el.blur();
@@ -230,6 +219,23 @@ const PopoverMenu = class {
230
219
  this.openingFromParent = true;
231
220
  setTimeout(() => (this.openingFromParent = false), 1000);
232
221
  }
222
+ /**
223
+ * @internal Close the menu, emit icPopoverClosed of the root popover
224
+ * @param setFocusToAnchor when true return focus to anchor element when menu is closed
225
+ */
226
+ async closeMenu(setFocusToAnchor = false) {
227
+ var _a;
228
+ this.open = false;
229
+ if (this.parentPopover) {
230
+ this.parentPopover.closeMenu(setFocusToAnchor);
231
+ }
232
+ else {
233
+ if (setFocusToAnchor) {
234
+ (_a = this.anchorEl) === null || _a === void 0 ? void 0 : _a.focus();
235
+ }
236
+ this.icPopoverClosed.emit();
237
+ }
238
+ }
233
239
  render() {
234
240
  return (h(Host, { class: { open: this.open } }, h("div", { id: this.parentPopover === undefined
235
241
  ? `ic-popover-submenu-${this.submenuId}`
@@ -1 +1 @@
1
- {"file":"ic-popover-menu.entry.js","mappings":";;;;;AAAA,MAAM,gBAAgB,GAAG,g/HAAg/H;;MCG5/H,WAAW;IACpB;;;QACI,IAAI,CAAC,UAAU,GAAG,YAAY,CAAC;QAC/B,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC,cAAc,GAAG;YAClB,IAAI,EAAE,CAAC;YACP,CAAC,EAAE,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC;SACjG,CAAC;;QAEF,IAAI,CAAC,YAAY,GAAG,CAAC,MAAM;YACvB,IAAI,aAAa,GAAG,I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.css?tag=ic-popover-menu&encapsulation=shadow","../web-components/dist/collection/components/ic-popover-menu/ic-popover-menu.js"],"sourcesContent":["/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n ========================================================================== */\n\n/**\n * Remove the margin in all browsers.\n */\n\nbody {\n margin: 0;\n}\n\n/**\n * Render the `main` element consistently in IE.\n */\n\nmain {\n display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n box-sizing: content-box; /* 1 */\n height: 0; /* 1 */\n overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\npre {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * Remove the gray background on active links in IE 10.\n */\n\na {\n background-color: transparent;\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n border-bottom: none; /* 1 */\n text-decoration: underline; /* 2 */\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Remove the border on images inside links in IE 10.\n */\n\nimg {\n border-style: none;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput {\n /* 1 */\n overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect {\n /* 1 */\n text-transform: none;\n}\n\n/**\n * Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button;\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * `fieldset` elements in all browsers.\n */\n\nlegend {\n box-sizing: border-box; /* 1 */\n color: inherit; /* 2 */\n display: table; /* 1 */\n max-width: 100%; /* 1 */\n padding: 0; /* 3 */\n white-space: normal; /* 1 */\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\n * Remove the default vertical scrollbar in IE 10+.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type=\"search\"] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n\n[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\n ========================================================================== */\n\n/*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\n\ndetails {\n display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\nsummary {\n display: list-item;\n}\n\n/* Misc\n ========================================================================== */\n\n/**\n * Add the correct display in IE 10+.\n */\n\ntemplate {\n display: none;\n}\n\n/**\n * Add the correct display in IE 10.\n */\n\n[hidden] {\n display: none;\n}\n\nhtml,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font-style: inherit;\n vertical-align: baseline;\n}\n\n\n/**\n* @prop --ic-z-index-popover: z-index of popover menu. \n* @prop --max-height: Maximum height of the popover menu.\n* @prop --popover-width: Default width of the popover menu.\n*/\n\n@media (prefers-reduced-motion: no-preference) {\n :host .opening-from-parent {\n animation: slide-in var(--ic-transition-duration-slow) ease-in-out;\n }\n\n :host .opening-from-child {\n animation: slide-out var(--ic-transition-duration-slow) ease-in-out;\n }\n}\n\n:host {\n border-radius: var(--ic-border-radius);\n color: var(--ic-color-primary-text);\n background-color: var(--ic-architectural-white);\n position: relative;\n z-index: var(--ic-z-index-popover);\n box-sizing: border-box;\n box-shadow: var(--ic-elevation-overlay);\n display: none;\n}\n\n:host(.on-dialog) {\n inset: auto !important;\n}\n\n:host(.on-dialog-fix-translate) {\n transform: translate(0, var(--ic-space-xs)) !important;\n}\n\n:host(.on-dialog-translate-y) {\n transform: translate(0, calc(-1 * var(--translate-y))) !important;\n}\n\n.menu {\n border: var(--ic-border-default);\n border-radius: var(--ic-border-radius);\n background-color: var(--ic-architectural-white);\n visibility: hidden;\n height: 0;\n}\n\n.button {\n text-decoration: none;\n list-style-type: none;\n}\n\n:host(:focus-within) {\n box-shadow: var(--ic-border-focus);\n}\n\n.menu:focus-visible {\n outline: none;\n}\n\n:host(.open) {\n display: block;\n min-width: calc(20rem - var(--ic-space-xl));\n width: var(--popover-width, 20rem);\n max-width: calc(100vw - var(--ic-space-xl));\n}\n\n:host(.open) .menu {\n visibility: visible;\n height: -moz-fit-content;\n height: fit-content;\n max-height: var(--max-height, -moz-fit-content);\n max-height: var(--max-height, fit-content);\n overflow-y: auto;\n overflow-x: hidden;\n}\n\n.parent-label {\n color: var(--ic-color-tertiary-text);\n margin: var(--ic-space-xs) var(--ic-space-xs) 0;\n}\n\n@keyframes slide-in {\n from {\n opacity: 0;\n transform: translateX(10rem);\n }\n\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n@keyframes slide-out {\n from {\n opacity: 0;\n transform: translateX(-10rem);\n }\n\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n","import { Host, h, } from \"@stencil/core\";\nimport { getSlotElements, isPropDefined } from \"../../utils/helpers\";\nimport { createPopper } from \"@popperjs/core\";\nexport class PopoverMenu {\n constructor() {\n this.ARIA_LABEL = \"aria-label\";\n this.popoverMenuEls = [];\n this.setButtonFocus = () => {\n var _a;\n (_a = this.popoverMenuEls[this.currentFocus]) === null || _a === void 0 ? void 0 : _a.focus();\n };\n // Checks that the popover menu has an anchor\n this.findAnchorEl = (anchor) => {\n let anchorElement = null;\n if (!anchor) {\n this.submenuId === undefined &&\n console.error(\"No anchor specified for popover component\");\n }\n else {\n anchorElement = document.querySelector(anchor.indexOf(\"#\") === 0 ? anchor : \"#\" + anchor);\n if (anchorElement === null) {\n console.error(`Popover anchor element '${anchor}' not found`);\n }\n }\n return anchorElement;\n };\n this.isNotPopoverMenuEl = (ev) => {\n const { id, tagName } = ev.target;\n return (id !== this.anchor &&\n tagName !== \"IC-MENU-ITEM\" &&\n tagName !== \"IC-MENU-GROUP\" &&\n tagName !== \"IC-POPOVER-MENU\");\n };\n /**\n * Close the popover menu, emit isPopoverClosed event\n * @param setFocusToAnchor when true return focus to anchor element when menu is closed\n */\n this.closeMenu = (setFocusToAnchor = false) => {\n var _a;\n this.open = false;\n if (setFocusToAnchor) {\n (_a = this.anchorEl) === null || _a === void 0 ? void 0 : _a.focus();\n }\n this.icPopoverClosed.emit();\n };\n this.getNextItemToSelect = (currentItem, movingDown) => {\n const numButtons = this.popoverMenuEls.length - 1;\n if (currentItem < 1) {\n currentItem = 0;\n }\n let nextItem = movingDown ? currentItem + 1 : currentItem - 1;\n // Check if wrap around necessary\n if (nextItem < 0) {\n nextItem = numButtons;\n }\n else if (nextItem > numButtons) {\n nextItem = 0;\n }\n return nextItem;\n };\n this.addMenuItems = (elements) => {\n for (let i = 0; i < elements.length; i++) {\n const el = elements[i];\n if (el.tagName === \"IC-MENU-ITEM\") {\n this.popoverMenuEls.push(el);\n }\n else if (el.tagName === \"IC-MENU-GROUP\") {\n const groupSlotWrapper = el.shadowRoot.querySelector(\"ul\");\n const menuGroupElements = getSlotElements(groupSlotWrapper);\n this.addMenuItems(menuGroupElements);\n }\n }\n };\n this.getMenuAriaLabel = () => {\n const ariaLabel = this.el.getAttribute(this.ARIA_LABEL);\n if (isPropDefined(this.submenuId)) {\n return `${ariaLabel}, within nested level ${this.submenuLevel} ${this.parentLabel} submenu,`;\n }\n else {\n return ariaLabel;\n }\n };\n this.handleBackButtonClick = () => {\n this.parentPopover.openFromChild();\n this.open = false;\n };\n this.initPopperJS = () => {\n this.popperInstance = createPopper(this.anchorEl, this.el, {\n placement: \"bottom-start\",\n modifiers: [\n {\n name: \"offset\",\n options: {\n offset: [0, 4],\n },\n },\n {\n name: \"flip\",\n options: {\n fallbackPlacements: [\"top-start\", \"top-end\", \"bottom-end\"],\n rootBoundary: \"viewport\",\n },\n },\n ],\n });\n };\n this.openingFromChild = false;\n this.openingFromParent = false;\n this.anchor = undefined;\n this.parentLabel = undefined;\n this.parentPopover = undefined;\n this.submenuId = undefined;\n this.submenuLevel = 1;\n this.open = undefined;\n }\n watchOpenHandler() {\n if (this.open) {\n if (this.parentPopover !== undefined &&\n !this.popoverMenuEls.some((menuItem) => menuItem.id)) {\n this.popoverMenuEls.unshift(this.backButton);\n }\n this.currentFocus = isPropDefined(this.submenuId) ? 1 : 0;\n // Needed so that anchorEl isn't always focused\n setTimeout(this.setButtonFocus, 50);\n }\n else if (this.popperInstance) {\n this.popperInstance.destroy();\n this.popperInstance = null;\n }\n }\n disconnectedCallback() {\n if (this.popperInstance) {\n this.popperInstance.destroy();\n this.popperInstance = null;\n }\n }\n componentDidLoad() {\n const slotWrapper = this.el.shadowRoot.querySelector(\"ul.button\");\n const popoverMenuElements = getSlotElements(slotWrapper);\n if (popoverMenuElements !== null) {\n this.addMenuItems(popoverMenuElements);\n }\n if (this.submenuId === undefined &&\n this.el.getAttribute(this.ARIA_LABEL) === null) {\n console.error(`No aria-label specified for popover menu component - aria-label required`);\n }\n }\n componentWillRender() {\n this.anchorEl = this.findAnchorEl(this.anchor);\n }\n componentDidRender() {\n if (this.open && !this.popperInstance) {\n this.initPopperJS();\n }\n }\n handleMenuItemClick(ev) {\n if (!ev.detail.hasSubMenu && ev.detail.label !== \"Back\") {\n this.closeMenu();\n }\n }\n // This is listening for the event emitted when a menu item is acting as a trigger button\n handleSubmenuChange(ev) {\n // Finds the trigger menu item that has emitted the event\n const target = ev.target;\n this.open = false;\n // Find the popover menu that the menu item triggers (i.e. submenu-trigger-for === submenu-id).\n const childEl = document.querySelector(`ic-popover-menu[submenu-id=${target.submenuTriggerFor}]`);\n // Set the parent popover menu of the submenu and open the submenu\n childEl.parentPopover = this.el;\n childEl.anchor = this.anchor;\n childEl.ariaLabel = this.el.getAttribute(this.ARIA_LABEL);\n childEl.openFromParent();\n childEl.submenuLevel = this.submenuLevel + 1;\n // Set the label in the submenu using the label of the menu item that has emitted the event\n childEl.parentLabel = target.label;\n }\n handleClick(ev) {\n if (this.open && this.isNotPopoverMenuEl(ev)) {\n // If menu is open and the next click on the document is not a popover El, close the popover\n this.closeMenu();\n }\n }\n // Manages the keyboard navigation in the popover menu\n handleKeyDown(ev) {\n switch (ev.key) {\n case \"ArrowDown\":\n case \"ArrowUp\":\n ev.preventDefault();\n this.currentFocus = this.getNextItemToSelect(this.currentFocus, ev.key === \"ArrowDown\");\n this.setButtonFocus();\n break;\n case \"Home\":\n //Sets home focus as first element, or back button\n this.currentFocus = 0;\n this.setButtonFocus();\n break;\n case \"End\":\n //Sets end focus as last element\n this.currentFocus = this.popoverMenuEls.length - 1;\n this.setButtonFocus();\n break;\n case \"Escape\":\n case \"Tab\":\n if (this.open) {\n this.closeMenu(true);\n this.el.blur();\n }\n break;\n }\n }\n /**\n * @internal Opens the menu from the child menu.\n */\n async openFromChild() {\n this.open = true;\n this.openingFromChild = true;\n setTimeout(() => (this.openingFromChild = false), 1000);\n }\n /**\n * @internal Opens the menu from the parent menu.\n */\n async openFromParent() {\n this.open = true;\n this.openingFromParent = true;\n setTimeout(() => (this.openingFromParent = false), 1000);\n }\n render() {\n return (h(Host, { class: { open: this.open } }, h(\"div\", { id: this.parentPopover === undefined\n ? `ic-popover-submenu-${this.submenuId}`\n : \"\", class: {\n menu: true,\n }, tabindex: open ? \"0\" : \"-1\" }, h(\"div\", { class: {\n \"opening-from-parent\": this.openingFromParent,\n \"opening-from-child\": this.openingFromChild,\n } }, isPropDefined(this.submenuId) && (h(\"div\", null, h(\"ic-menu-item\", { class: \"ic-popover-submenu-back-button\", ref: (el) => (this.backButton = el), label: \"Back\", onClick: this.handleBackButtonClick, id: `ic-popover-submenu-back-button-${this.submenuLevel}` }, h(\"svg\", { slot: \"icon\", viewBox: \"0 0 24 24\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", class: \"submenu-back-icon\" }, h(\"path\", { d: \"M20 11H7.83L13.42 5.41L12 4L4 12L12 20L13.41 18.59L7.83 13H20V11Z\", fill: \"currentColor\" }))), h(\"ic-typography\", { variant: \"subtitle-small\", class: \"parent-label\" }, this.parentLabel))), h(\"ul\", { class: \"button\", \"aria-label\": this.getMenuAriaLabel(), role: \"menu\", \"aria-owns\": isPropDefined(this.submenuId)\n ? `ic-popover-submenu-back-button-${this.submenuLevel}`\n : false, \"aria-controls\": isPropDefined(this.submenuId)\n ? `ic-popover-submenu-back-button-${this.submenuLevel}`\n : false }, h(\"slot\", null))))));\n }\n static get is() { return \"ic-popover-menu\"; }\n static get encapsulation() { return \"shadow\"; }\n static get delegatesFocus() { return true; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-popover-menu.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-popover-menu.css\"]\n };\n }\n static get properties() {\n return {\n \"anchor\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The ID of the element the popover menu will anchor itself to. This is required unless the popover is a submenu.\"\n },\n \"attribute\": \"anchor\",\n \"reflect\": false\n },\n \"parentLabel\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"The parent popover menu of a child popover menu.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"parent-label\",\n \"reflect\": false\n },\n \"parentPopover\": {\n \"type\": \"unknown\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"HTMLIcPopoverMenuElement\",\n \"resolved\": \"HTMLIcPopoverMenuElement\",\n \"references\": {\n \"HTMLIcPopoverMenuElement\": {\n \"location\": \"global\",\n \"id\": \"global::HTMLIcPopoverMenuElement\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"The parent popover menu of a child popover menu.\"\n }],\n \"text\": \"\"\n }\n },\n \"submenuId\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The unique identifier for a popover submenu.\"\n },\n \"attribute\": \"submenu-id\",\n \"reflect\": false\n },\n \"submenuLevel\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"The level of menu being displayed.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"submenu-level\",\n \"reflect\": false,\n \"defaultValue\": \"1\"\n },\n \"open\": {\n \"type\": \"boolean\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the popover menu will be displayed.\"\n },\n \"attribute\": \"open\",\n \"reflect\": true,\n \"defaultValue\": \"undefined\"\n }\n };\n }\n static get states() {\n return {\n \"openingFromChild\": {},\n \"openingFromParent\": {}\n };\n }\n static get events() {\n return [{\n \"method\": \"icPopoverClosed\",\n \"name\": \"icPopoverClosed\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when the popover menu is closed.\"\n },\n \"complexType\": {\n \"original\": \"void\",\n \"resolved\": \"void\",\n \"references\": {}\n }\n }];\n }\n static get methods() {\n return {\n \"openFromChild\": {\n \"complexType\": {\n \"signature\": \"() => Promise<void>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"\",\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Opens the menu from the child menu.\"\n }]\n }\n },\n \"openFromParent\": {\n \"complexType\": {\n \"signature\": \"() => Promise<void>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"\",\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Opens the menu from the parent menu.\"\n }]\n }\n }\n };\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"open\",\n \"methodName\": \"watchOpenHandler\"\n }];\n }\n static get listeners() {\n return [{\n \"name\": \"handleMenuItemClick\",\n \"method\": \"handleMenuItemClick\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }, {\n \"name\": \"triggerPopoverMenuInstance\",\n \"method\": \"handleSubmenuChange\",\n \"target\": undefined,\n \"capture\": true,\n \"passive\": false\n }, {\n \"name\": \"click\",\n \"method\": \"handleClick\",\n \"target\": \"document\",\n \"capture\": false,\n \"passive\": false\n }, {\n \"name\": \"keydown\",\n \"method\": \"handleKeyDown\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }];\n }\n}\n//# sourceMappingURL=ic-popover-menu.js.map\n"],"version":3}
1
+ {"file":"ic-popover-menu.entry.js","mappings":";;;;;AAAA,MAAM,gBAAgB,GAAG,g/HAAg/H;;MCG5/H,WAAW;IACpB;;;QACI,IAAI,CAAC,UAAU,GAAG,YAAY,CAAC;QAC/B,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC,cAAc,GAAG;YAClB,IAAI,EAAE,CAAC;YACP,CAAC,EAAE,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC;SACjG,CAAC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ACrD,KAAK,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;KAC3C;IAGD,WAAW,cAAc,KAAK,OAAO,IAAI,CAAC,EAAE;;;;;;;;;;","names":[],"sources":["../web-components/dist/collection/components/ic-popover-menu/ic-popover-menu.css?tag=ic-popover-menu&encapsulation=shadow","../web-components/dist/collection/components/ic-popover-menu/ic-popover-menu.js"],"sourcesContent":["/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n ========================================================================== */\n\n/**\n * Remove the margin in all browsers.\n */\n\nbody {\n margin: 0;\n}\n\n/**\n * Render the `main` element consistently in IE.\n */\n\nmain {\n display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n box-sizing: content-box; /* 1 */\n height: 0; /* 1 */\n overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\npre {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * Remove the gray background on active links in IE 10.\n */\n\na {\n background-color: transparent;\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n border-bottom: none; /* 1 */\n text-decoration: underline; /* 2 */\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Remove the border on images inside links in IE 10.\n */\n\nimg {\n border-style: none;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput {\n /* 1 */\n overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect {\n /* 1 */\n text-transform: none;\n}\n\n/**\n * Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button;\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * `fieldset` elements in all browsers.\n */\n\nlegend {\n box-sizing: border-box; /* 1 */\n color: inherit; /* 2 */\n display: table; /* 1 */\n max-width: 100%; /* 1 */\n padding: 0; /* 3 */\n white-space: normal; /* 1 */\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\n * Remove the default vertical scrollbar in IE 10+.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type=\"search\"] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n\n[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\n ========================================================================== */\n\n/*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\n\ndetails {\n display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\nsummary {\n display: list-item;\n}\n\n/* Misc\n ========================================================================== */\n\n/**\n * Add the correct display in IE 10+.\n */\n\ntemplate {\n display: none;\n}\n\n/**\n * Add the correct display in IE 10.\n */\n\n[hidden] {\n display: none;\n}\n\nhtml,\nbody,\ndiv,\nspan,\napplet,\nobject,\niframe,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np,\nblockquote,\npre,\na,\nabbr,\nacronym,\naddress,\nbig,\ncite,\ncode,\ndel,\ndfn,\nem,\nimg,\nins,\nkbd,\nq,\ns,\nsamp,\nsmall,\nstrike,\nstrong,\nsub,\nsup,\ntt,\nvar,\nb,\nu,\ni,\ncenter,\ndl,\ndt,\ndd,\nol,\nul,\nli,\nfieldset,\nform,\nlabel,\nlegend,\ntable,\ncaption,\ntbody,\ntfoot,\nthead,\ntr,\nth,\ntd,\narticle,\naside,\ncanvas,\ndetails,\nembed,\nfigure,\nfigcaption,\nfooter,\nheader,\nhgroup,\nmenu,\nnav,\noutput,\nruby,\nsection,\nsummary,\ntime,\nmark,\naudio,\nvideo {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font-style: inherit;\n vertical-align: baseline;\n}\n\n\n/**\n* @prop --ic-z-index-popover: z-index of popover menu. \n* @prop --max-height: Maximum height of the popover menu.\n* @prop --popover-width: Default width of the popover menu.\n*/\n\n@media (prefers-reduced-motion: no-preference) {\n :host .opening-from-parent {\n animation: slide-in var(--ic-transition-duration-slow) ease-in-out;\n }\n\n :host .opening-from-child {\n animation: slide-out var(--ic-transition-duration-slow) ease-in-out;\n }\n}\n\n:host {\n border-radius: var(--ic-border-radius);\n color: var(--ic-color-primary-text);\n background-color: var(--ic-architectural-white);\n position: relative;\n z-index: var(--ic-z-index-popover);\n box-sizing: border-box;\n box-shadow: var(--ic-elevation-overlay);\n display: none;\n}\n\n:host(.on-dialog) {\n inset: auto !important;\n}\n\n:host(.on-dialog-fix-translate) {\n transform: translate(0, var(--ic-space-xs)) !important;\n}\n\n:host(.on-dialog-translate-y) {\n transform: translate(0, calc(-1 * var(--translate-y))) !important;\n}\n\n.menu {\n border: var(--ic-border-default);\n border-radius: var(--ic-border-radius);\n background-color: var(--ic-architectural-white);\n visibility: hidden;\n height: 0;\n}\n\n.button {\n text-decoration: none;\n list-style-type: none;\n}\n\n:host(:focus-within) {\n box-shadow: var(--ic-border-focus);\n}\n\n.menu:focus-visible {\n outline: none;\n}\n\n:host(.open) {\n display: block;\n min-width: calc(20rem - var(--ic-space-xl));\n width: var(--popover-width, 20rem);\n max-width: calc(100vw - var(--ic-space-xl));\n}\n\n:host(.open) .menu {\n visibility: visible;\n height: -moz-fit-content;\n height: fit-content;\n max-height: var(--max-height, -moz-fit-content);\n max-height: var(--max-height, fit-content);\n overflow-y: auto;\n overflow-x: hidden;\n}\n\n.parent-label {\n color: var(--ic-color-tertiary-text);\n margin: var(--ic-space-xs) var(--ic-space-xs) 0;\n}\n\n@keyframes slide-in {\n from {\n opacity: 0;\n transform: translateX(10rem);\n }\n\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n@keyframes slide-out {\n from {\n opacity: 0;\n transform: translateX(-10rem);\n }\n\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n","import { Host, h, } from \"@stencil/core\";\nimport { getSlotElements, isPropDefined } from \"../../utils/helpers\";\nimport { createPopper } from \"@popperjs/core\";\nexport class PopoverMenu {\n constructor() {\n this.ARIA_LABEL = \"aria-label\";\n this.popoverMenuEls = [];\n this.setButtonFocus = () => {\n var _a;\n (_a = this.popoverMenuEls[this.currentFocus]) === null || _a === void 0 ? void 0 : _a.focus();\n };\n // Checks that the popover menu has an anchor\n this.findAnchorEl = (anchor) => {\n let anchorElement = null;\n if (!anchor) {\n this.submenuId === undefined &&\n console.error(\"No anchor specified for popover component\");\n }\n else {\n anchorElement = document.querySelector(anchor.indexOf(\"#\") === 0 ? anchor : \"#\" + anchor);\n if (anchorElement === null) {\n console.error(`Popover anchor element '${anchor}' not found`);\n }\n }\n return anchorElement;\n };\n this.isNotPopoverMenuEl = (ev) => {\n const { id, tagName } = ev.target;\n return (id !== this.anchor &&\n tagName !== \"IC-MENU-ITEM\" &&\n tagName !== \"IC-MENU-GROUP\" &&\n tagName !== \"IC-POPOVER-MENU\");\n };\n this.getNextItemToSelect = (currentItem, movingDown) => {\n const numButtons = this.popoverMenuEls.length - 1;\n if (currentItem < 1) {\n currentItem = 0;\n }\n let nextItem = movingDown ? currentItem + 1 : currentItem - 1;\n // Check if wrap around necessary\n if (nextItem < 0) {\n nextItem = numButtons;\n }\n else if (nextItem > numButtons) {\n nextItem = 0;\n }\n return nextItem;\n };\n this.addMenuItems = (elements) => {\n for (let i = 0; i < elements.length; i++) {\n const el = elements[i];\n if (el.tagName === \"IC-MENU-ITEM\") {\n this.popoverMenuEls.push(el);\n }\n else if (el.tagName === \"IC-MENU-GROUP\") {\n const groupSlotWrapper = el.shadowRoot.querySelector(\"ul\");\n const menuGroupElements = getSlotElements(groupSlotWrapper);\n this.addMenuItems(menuGroupElements);\n }\n }\n };\n this.getMenuAriaLabel = () => {\n const ariaLabel = this.el.getAttribute(this.ARIA_LABEL);\n if (isPropDefined(this.submenuId)) {\n return `${ariaLabel}, within nested level ${this.submenuLevel} ${this.parentLabel} submenu,`;\n }\n else {\n return ariaLabel;\n }\n };\n this.handleBackButtonClick = () => {\n this.parentPopover.openFromChild();\n this.open = false;\n };\n this.initPopperJS = () => {\n this.popperInstance = createPopper(this.anchorEl, this.el, {\n placement: \"bottom-start\",\n modifiers: [\n {\n name: \"offset\",\n options: {\n offset: [0, 4],\n },\n },\n {\n name: \"flip\",\n options: {\n fallbackPlacements: [\"top-start\", \"top-end\", \"bottom-end\"],\n rootBoundary: \"viewport\",\n },\n },\n ],\n });\n };\n this.openingFromChild = false;\n this.openingFromParent = false;\n this.anchor = undefined;\n this.parentLabel = undefined;\n this.parentPopover = undefined;\n this.submenuId = undefined;\n this.submenuLevel = 1;\n this.open = undefined;\n }\n watchOpenHandler() {\n if (this.open) {\n if (this.parentPopover !== undefined &&\n !this.popoverMenuEls.some((menuItem) => menuItem.id)) {\n this.popoverMenuEls.unshift(this.backButton);\n }\n this.currentFocus = isPropDefined(this.submenuId) ? 1 : 0;\n // Needed so that anchorEl isn't always focused\n setTimeout(this.setButtonFocus, 50);\n }\n else if (this.popperInstance) {\n this.popperInstance.destroy();\n this.popperInstance = null;\n }\n }\n disconnectedCallback() {\n if (this.popperInstance) {\n this.popperInstance.destroy();\n this.popperInstance = null;\n }\n }\n componentDidLoad() {\n const slotWrapper = this.el.shadowRoot.querySelector(\"ul.button\");\n const popoverMenuElements = getSlotElements(slotWrapper);\n if (popoverMenuElements !== null) {\n this.addMenuItems(popoverMenuElements);\n }\n if (this.submenuId === undefined &&\n this.el.getAttribute(this.ARIA_LABEL) === null) {\n console.error(`No aria-label specified for popover menu component - aria-label required`);\n }\n }\n componentWillRender() {\n this.anchorEl = this.findAnchorEl(this.anchor);\n }\n componentDidRender() {\n if (this.open && !this.popperInstance) {\n this.initPopperJS();\n }\n }\n handleMenuItemClick(ev) {\n if (!ev.detail.hasSubMenu && ev.detail.label !== \"Back\") {\n this.closeMenu();\n }\n }\n // This is listening for the event emitted when a menu item is acting as a trigger button\n handleSubmenuChange(ev) {\n // Finds the trigger menu item that has emitted the event\n const target = ev.target;\n this.open = false;\n // Find the popover menu that the menu item triggers (i.e. submenu-trigger-for === submenu-id).\n const childEl = document.querySelector(`ic-popover-menu[submenu-id=${target.submenuTriggerFor}]`);\n // Set the parent popover menu of the submenu and open the submenu\n childEl.parentPopover = this.el;\n childEl.anchor = this.anchor;\n childEl.ariaLabel = this.el.getAttribute(this.ARIA_LABEL);\n childEl.openFromParent();\n childEl.submenuLevel = this.submenuLevel + 1;\n // Set the label in the submenu using the label of the menu item that has emitted the event\n childEl.parentLabel = target.label;\n }\n handleClick(ev) {\n if (this.open && this.isNotPopoverMenuEl(ev)) {\n // If menu is open and the next click on the document is not a popover El, close the popover\n this.closeMenu();\n }\n }\n // Manages the keyboard navigation in the popover menu\n handleKeyDown(ev) {\n switch (ev.key) {\n case \"ArrowDown\":\n case \"ArrowUp\":\n ev.preventDefault();\n this.currentFocus = this.getNextItemToSelect(this.currentFocus, ev.key === \"ArrowDown\");\n this.setButtonFocus();\n break;\n case \"Home\":\n //Sets home focus as first element, or back button\n this.currentFocus = 0;\n this.setButtonFocus();\n break;\n case \"End\":\n //Sets end focus as last element\n this.currentFocus = this.popoverMenuEls.length - 1;\n this.setButtonFocus();\n break;\n case \"Escape\":\n case \"Tab\":\n ev.preventDefault();\n if (this.open) {\n this.closeMenu(true);\n this.el.blur();\n }\n break;\n }\n }\n /**\n * @internal Opens the menu from the child menu.\n */\n async openFromChild() {\n this.open = true;\n this.openingFromChild = true;\n setTimeout(() => (this.openingFromChild = false), 1000);\n }\n /**\n * @internal Opens the menu from the parent menu.\n */\n async openFromParent() {\n this.open = true;\n this.openingFromParent = true;\n setTimeout(() => (this.openingFromParent = false), 1000);\n }\n /**\n * @internal Close the menu, emit icPopoverClosed of the root popover\n * @param setFocusToAnchor when true return focus to anchor element when menu is closed\n */\n async closeMenu(setFocusToAnchor = false) {\n var _a;\n this.open = false;\n if (this.parentPopover) {\n this.parentPopover.closeMenu(setFocusToAnchor);\n }\n else {\n if (setFocusToAnchor) {\n (_a = this.anchorEl) === null || _a === void 0 ? void 0 : _a.focus();\n }\n this.icPopoverClosed.emit();\n }\n }\n render() {\n return (h(Host, { class: { open: this.open } }, h(\"div\", { id: this.parentPopover === undefined\n ? `ic-popover-submenu-${this.submenuId}`\n : \"\", class: {\n menu: true,\n }, tabindex: open ? \"0\" : \"-1\" }, h(\"div\", { class: {\n \"opening-from-parent\": this.openingFromParent,\n \"opening-from-child\": this.openingFromChild,\n } }, isPropDefined(this.submenuId) && (h(\"div\", null, h(\"ic-menu-item\", { class: \"ic-popover-submenu-back-button\", ref: (el) => (this.backButton = el), label: \"Back\", onClick: this.handleBackButtonClick, id: `ic-popover-submenu-back-button-${this.submenuLevel}` }, h(\"svg\", { slot: \"icon\", viewBox: \"0 0 24 24\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", class: \"submenu-back-icon\" }, h(\"path\", { d: \"M20 11H7.83L13.42 5.41L12 4L4 12L12 20L13.41 18.59L7.83 13H20V11Z\", fill: \"currentColor\" }))), h(\"ic-typography\", { variant: \"subtitle-small\", class: \"parent-label\" }, this.parentLabel))), h(\"ul\", { class: \"button\", \"aria-label\": this.getMenuAriaLabel(), role: \"menu\", \"aria-owns\": isPropDefined(this.submenuId)\n ? `ic-popover-submenu-back-button-${this.submenuLevel}`\n : false, \"aria-controls\": isPropDefined(this.submenuId)\n ? `ic-popover-submenu-back-button-${this.submenuLevel}`\n : false }, h(\"slot\", null))))));\n }\n static get is() { return \"ic-popover-menu\"; }\n static get encapsulation() { return \"shadow\"; }\n static get delegatesFocus() { return true; }\n static get originalStyleUrls() {\n return {\n \"$\": [\"ic-popover-menu.css\"]\n };\n }\n static get styleUrls() {\n return {\n \"$\": [\"ic-popover-menu.css\"]\n };\n }\n static get properties() {\n return {\n \"anchor\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The ID of the element the popover menu will anchor itself to. This is required unless the popover is a submenu.\"\n },\n \"attribute\": \"anchor\",\n \"reflect\": false\n },\n \"parentLabel\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"The parent popover menu of a child popover menu.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"parent-label\",\n \"reflect\": false\n },\n \"parentPopover\": {\n \"type\": \"unknown\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"HTMLIcPopoverMenuElement\",\n \"resolved\": \"HTMLIcPopoverMenuElement\",\n \"references\": {\n \"HTMLIcPopoverMenuElement\": {\n \"location\": \"global\",\n \"id\": \"global::HTMLIcPopoverMenuElement\"\n }\n }\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"The parent popover menu of a child popover menu.\"\n }],\n \"text\": \"\"\n }\n },\n \"submenuId\": {\n \"type\": \"string\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"string\",\n \"resolved\": \"string\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"The unique identifier for a popover submenu.\"\n },\n \"attribute\": \"submenu-id\",\n \"reflect\": false\n },\n \"submenuLevel\": {\n \"type\": \"number\",\n \"mutable\": false,\n \"complexType\": {\n \"original\": \"number\",\n \"resolved\": \"number\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"The level of menu being displayed.\"\n }],\n \"text\": \"\"\n },\n \"attribute\": \"submenu-level\",\n \"reflect\": false,\n \"defaultValue\": \"1\"\n },\n \"open\": {\n \"type\": \"boolean\",\n \"mutable\": true,\n \"complexType\": {\n \"original\": \"boolean\",\n \"resolved\": \"boolean\",\n \"references\": {}\n },\n \"required\": false,\n \"optional\": false,\n \"docs\": {\n \"tags\": [],\n \"text\": \"If `true`, the popover menu will be displayed.\"\n },\n \"attribute\": \"open\",\n \"reflect\": true,\n \"defaultValue\": \"undefined\"\n }\n };\n }\n static get states() {\n return {\n \"openingFromChild\": {},\n \"openingFromParent\": {}\n };\n }\n static get events() {\n return [{\n \"method\": \"icPopoverClosed\",\n \"name\": \"icPopoverClosed\",\n \"bubbles\": true,\n \"cancelable\": true,\n \"composed\": true,\n \"docs\": {\n \"tags\": [],\n \"text\": \"Emitted when the popover menu is closed.\"\n },\n \"complexType\": {\n \"original\": \"void\",\n \"resolved\": \"void\",\n \"references\": {}\n }\n }];\n }\n static get methods() {\n return {\n \"openFromChild\": {\n \"complexType\": {\n \"signature\": \"() => Promise<void>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"\",\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Opens the menu from the child menu.\"\n }]\n }\n },\n \"openFromParent\": {\n \"complexType\": {\n \"signature\": \"() => Promise<void>\",\n \"parameters\": [],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"\",\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Opens the menu from the parent menu.\"\n }]\n }\n },\n \"closeMenu\": {\n \"complexType\": {\n \"signature\": \"(setFocusToAnchor?: boolean) => Promise<void>\",\n \"parameters\": [{\n \"name\": \"setFocusToAnchor\",\n \"type\": \"boolean\",\n \"docs\": \"when true return focus to anchor element when menu is closed\"\n }],\n \"references\": {\n \"Promise\": {\n \"location\": \"global\",\n \"id\": \"global::Promise\"\n }\n },\n \"return\": \"Promise<void>\"\n },\n \"docs\": {\n \"text\": \"\",\n \"tags\": [{\n \"name\": \"internal\",\n \"text\": \"Close the menu, emit icPopoverClosed of the root popover\"\n }, {\n \"name\": \"param\",\n \"text\": \"setFocusToAnchor when true return focus to anchor element when menu is closed\"\n }]\n }\n }\n };\n }\n static get elementRef() { return \"el\"; }\n static get watchers() {\n return [{\n \"propName\": \"open\",\n \"methodName\": \"watchOpenHandler\"\n }];\n }\n static get listeners() {\n return [{\n \"name\": \"handleMenuItemClick\",\n \"method\": \"handleMenuItemClick\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }, {\n \"name\": \"triggerPopoverMenuInstance\",\n \"method\": \"handleSubmenuChange\",\n \"target\": undefined,\n \"capture\": true,\n \"passive\": false\n }, {\n \"name\": \"click\",\n \"method\": \"handleClick\",\n \"target\": \"document\",\n \"capture\": false,\n \"passive\": false\n }, {\n \"name\": \"keydown\",\n \"method\": \"handleKeyDown\",\n \"target\": undefined,\n \"capture\": false,\n \"passive\": false\n }];\n }\n}\n//# sourceMappingURL=ic-popover-menu.js.map\n"],"version":3}
@@ -431,7 +431,7 @@ const SearchBar = class {
431
431
  }
432
432
  render() {
433
433
  const { inputId, name, label, required, small, size, placeholder, helperText, disabled, value, readonly, spellcheck, fullWidth, options, open, hideLabel, menuId, ariaActiveDescendant, truncateValue, autofocus, autocapitalize, autocomplete, filteredOptions, } = this;
434
- const disabledMode = readonly || disabled ? true : false;
434
+ const disabledMode = readonly || disabled;
435
435
  const describedBy = getInputDescribedByText(inputId, helperText !== "", false).trim();
436
436
  let describedById;
437
437
  if (describedBy !== "" && this.hasOptionsOrFilterDisabled()) {
@@ -446,35 +446,17 @@ const SearchBar = class {
446
446
  else {
447
447
  describedById = undefined;
448
448
  }
449
- const disabledText = disabledMode && !readonly;
450
- const hasSuggestedSearch = value && this.hasOptionsOrFilterDisabled();
449
+ const hasSuggestedSearch = !!value && this.hasOptionsOrFilterDisabled();
451
450
  const menuOpen = hasSuggestedSearch && open && filteredOptions.length > 0;
452
451
  const menuRendered = menuOpen && value.length >= this.charactersUntilSuggestion;
453
- const isOrHasLoaded = this.filteredOptions.length === 1 &&
454
- (this.filteredOptions[0][this.labelField] === this.loadingLabel ||
455
- filteredOptions[0][this.labelField] === this.loadingErrorLabel);
456
- let expanded;
457
- if (options.length > 0) {
458
- if (menuOpen) {
459
- expanded = "true";
460
- }
461
- else {
462
- expanded = "false";
463
- }
464
- }
465
- else {
466
- expanded = undefined;
467
- }
452
+ const labelValue = getLabelFromValue(value, options, this.valueField, this.labelField);
468
453
  renderHiddenInput(true, this.el, name, value, disabledMode);
469
454
  return (h(Host, { class: {
470
- ["search"]: true,
471
- ["fullwidth"]: fullWidth,
472
- ["disabled"]: disabled,
473
- ["small"]: size === "small",
474
- }, onFocus: this.handleHostFocus, onBlur: this.handleHostBlur }, h("ic-text-field", { ref: (el) => (this.inputEl = el), inputId: inputId, label: label, helperText: helperText, required: required, disabled: disabledText, readonly: readonly, size: size, hideLabel: hideLabel, fullWidth: fullWidth, name: name, truncateValue: truncateValue, value: options &&
475
- !!getLabelFromValue(value, options, this.valueField, this.labelField)
476
- ? getLabelFromValue(value, options, this.valueField, this.labelField)
477
- : value, placeholder: placeholder, onInput: this.onInput, onBlur: this.onInputBlur, onFocus: this.onInputFocus, "aria-label": hideLabel ? label : "", "aria-describedby": describedById, "aria-owns": menuRendered ? menuId : undefined, "aria-haspopup": options.length > 0 ? "listbox" : undefined, ariaExpanded: expanded, ariaActiveDescendant: ariaActiveDescendant, "aria-autocomplete": hasSuggestedSearch ? "list" : undefined, role: hasSuggestedSearch ? "combobox" : undefined, autocomplete: autocomplete, autocapitalize: autocapitalize, autoFocus: autofocus, spellcheck: spellcheck, inputmode: "search", debounce: this.debounce }, h("div", { class: {
455
+ search: true,
456
+ fullwidth: fullWidth,
457
+ disabled,
458
+ small: size === "small",
459
+ }, onFocus: this.handleHostFocus, onBlur: this.handleHostBlur }, h("ic-text-field", { ref: (el) => (this.inputEl = el), inputId: inputId, label: label, helperText: helperText, required: required, disabled: disabledMode && !readonly, readonly: readonly, size: size, hideLabel: hideLabel, fullWidth: fullWidth, name: name, truncateValue: truncateValue, value: options && !!labelValue ? labelValue : value, placeholder: placeholder, onInput: this.onInput, onBlur: this.onInputBlur, onFocus: this.onInputFocus, "aria-label": hideLabel ? label : "", "aria-describedby": describedById, "aria-owns": menuRendered ? menuId : undefined, "aria-controls": menuRendered ? menuId : undefined, "aria-haspopup": options.length > 0 ? "listbox" : undefined, ariaExpanded: options.length > 0 ? `${menuOpen}` : undefined, ariaActiveDescendant: ariaActiveDescendant, "aria-autocomplete": hasSuggestedSearch ? "list" : undefined, role: options.length > 0 ? "combobox" : undefined, autocomplete: autocomplete, autocapitalize: autocapitalize, autoFocus: autofocus, spellcheck: spellcheck, inputmode: "search", debounce: this.debounce }, h("div", { class: {
478
460
  "clear-button-container": true,
479
461
  "clear-button-visible": value && !disabledMode && this.showClearButton,
480
462
  }, slot: "clear-button" }, h("ic-button", { id: "clear-button", class: "clear-button", "aria-label": "Clear", innerHTML: clearIcon, onClick: this.handleClear, onMouseDown: this.handleMouseDown, size: size, onFocus: this.handleFocusClearButton, onBlur: this.handleClearBlur, onKeyDown: this.handleClear, type: "submit", variant: "icon", appearance: this.clearButtonFocused
@@ -491,7 +473,12 @@ const SearchBar = class {
491
473
  "menu-container": true,
492
474
  fullwidth: fullWidth,
493
475
  }, slot: "menu" }, menuRendered && (h("ic-menu", { class: {
494
- "no-results": this.hadNoOptions() || isOrHasLoaded,
476
+ "no-results": this.hadNoOptions() ||
477
+ (filteredOptions.length === 1 &&
478
+ (filteredOptions[0][this.labelField] ===
479
+ this.loadingLabel ||
480
+ filteredOptions[0][this.labelField] ===
481
+ this.loadingErrorLabel)),
495
482
  }, activationType: "manual", anchorEl: this.anchorEl, autoFocusOnSelected: false, searchMode: this.searchMode, inputEl: this.inputEl, inputLabel: label, ref: (el) => (this.menu = el), small: size === "small", fullWidth: fullWidth, menuId: menuId, open: !!menuRendered, options: filteredOptions, onMenuOptionSelect: this.handleOptionSelect, onMenuStateChange: this.handleMenuChange, onMenuOptionId: this.handleMenuOptionHighlight, onRetryButtonClicked: this.handleRetry, parentEl: this.el, value: value, labelField: this.labelField, valueField: this.valueField })))), h("div", { "aria-live": "polite", role: "status", class: "search-results-status" })));
496
483
  }
497
484
  static get delegatesFocus() { return true; }