{"version":3,"sources":["components/overflow-menu/overflow-menu-body.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,cAAc,EAAE,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAClH,OAAO,EAAE,0BAA0B,EAAE,MAAM,QAAQ,CAAC;AAKpD;;;GAGG;AACH,cACM,kBAAmB,SAAQ,cAAc;IAC7C;;OAEG;IAEH,SAAS,0BAAiC;IAE1C;;OAEG;IAEH,WAAW,6BAAsC;IAEjD;;OAEG;IAEH,SAAS,0BAAkC;IAE3C;;;OAGG;IAEH,IAAI,UAAS;IAEb,iBAAiB;IAWjB,MAAM;IAIN,MAAM,CAAC,MAAM,MAAU;CACxB;AAED,eAAe,kBAAkB,CAAC","file":"overflow-menu-body.d.ts","sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2019, 2021\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport settings from 'carbon-components/es/globals/js/settings';\nimport { html, property, customElement } from 'lit-element';\nimport BXFloatingMenu, { FLOATING_MENU_ALIGNMENT, FLOATING_MENU_DIRECTION } from '../floating-menu/floating-menu';\nimport { OVERFLOW_MENU_COLOR_SCHEME } from './defs';\nimport styles from './overflow-menu.scss';\n\nconst { prefix } = settings;\n\n/**\n * Overflow menu body.\n * @element bx-overflow-menu-body\n */\n@customElement(`${prefix}-overflow-menu-body`)\nclass BXOverflowMenuBody extends BXFloatingMenu {\n  /**\n   * How the menu is aligned to the trigger button.\n   */\n  @property()\n  alignment = FLOATING_MENU_ALIGNMENT.START;\n\n  /**\n   * The color scheme.\n   */\n  @property({ attribute: 'color-scheme', reflect: true })\n  colorScheme = OVERFLOW_MENU_COLOR_SCHEME.REGULAR;\n\n  /**\n   * The menu direction.\n   */\n  @property()\n  direction = FLOATING_MENU_DIRECTION.BOTTOM;\n\n  /**\n   * `true` if the menu should be open.\n   * @private\n   */\n  @property({ type: Boolean, reflect: true })\n  open = false;\n\n  connectedCallback() {\n    if (!this.hasAttribute('role')) {\n      this.setAttribute('role', 'menu');\n    }\n    if (!this.hasAttribute('tabindex')) {\n      // TODO: Should we use a property?\n      this.setAttribute('tabindex', '-1');\n    }\n    super.connectedCallback();\n  }\n\n  render() {\n    return html`<slot></slot>`;\n  }\n\n  static styles = styles; // `styles` here is a `CSSResult` generated by custom WebPack loader\n}\n\nexport default BXOverflowMenuBody;\n"]}