{"version":3,"sources":["components/list/unordered-list.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAuB,UAAU,EAAY,MAAM,aAAa,CAAC;AAMxE;;GAEG;AACH,cACM,eAAgB,SAAQ,UAAU;IACtC;;OAEG;IAEH,YAAY,UAAS;IAErB,iBAAiB;IAUjB,MAAM;IAaN;;OAEG;IACH,MAAM,KAAK,gBAAgB,WAE1B;IAED,MAAM,CAAC,MAAM,MAAU;CACxB;AAED,eAAe,eAAe,CAAC","file":"unordered-list.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 { classMap } from 'lit-html/directives/class-map';\nimport { html, customElement, LitElement, property } from 'lit-element';\nimport settings from 'carbon-components/es/globals/js/settings';\nimport styles from './list.scss';\n\nconst { prefix } = settings;\n\n/**\n * Ordered list.\n */\n@customElement(`${prefix}-unordered-list`)\nclass BXUnorderedList extends LitElement {\n  /**\n   * `true` if expressive theme enabled.\n   */\n  @property({ type: Boolean, reflect: true })\n  isExpressive = false;\n\n  connectedCallback() {\n    // Uses attribute for lookup from child\n    if (this.closest((this.constructor as typeof BXUnorderedList).selectorListItem)) {\n      this.setAttribute('slot', 'nested');\n    } else {\n      this.removeAttribute('slot');\n    }\n    super.connectedCallback();\n  }\n\n  render() {\n    const classes = classMap({\n      [`${prefix}--list--unordered`]: true,\n      [`${prefix}--list--nested`]: this.getAttribute('slot') === 'nested',\n      [`${prefix}--list--expressive`]: this.isExpressive,\n    });\n    return html`\n      <ul class=\"${classes}\">\n        <slot></slot>\n      </ul>\n    `;\n  }\n\n  /**\n   * A selector that will return list item.\n   */\n  static get selectorListItem() {\n    return `${prefix}-list-item`;\n  }\n\n  static styles = styles;\n}\n\nexport default BXUnorderedList;\n"]}