{"version":3,"sources":["jsdelivr-header.js","/npm/@proximus/lavender-button-icon@2.0.0-alpha.18/dist/index.es.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,oBCNsB,qCAAsC,SAAU,MAAS,4BAC/E,MAAM,EAAI,+8HAAg9H,EAAI,IAAI,cACl+H,EAAE,YAAY,GACd,MAAM,EAAI,CAAC,GAAI,UAAW,SAAU,EAAI,CACtC,GACA,UACA,YACA,SACC,EAAI,MAAM,UAAU,EACrB,WAAA,GACE,MAAM,GAAI,KAAK,SAAW,IAAM,gBAChC,MAAM,EAAI,SAAS,cAAc,EAAE,YACnC,EAAE,UAAU,IAAI,YAAa,EAAE,UAAY,KAAK,WAAY,KAAK,WAAW,YAAY,EAC1F,CACA,6BAAW,GACT,MAAO,IACF,MAAM,mBACT,WACA,UACA,OACA,UACA,gBAEJ,CACA,iBAAA,GACE,MAAM,EAAI,KAAK,cAAc,WAC7B,GAAI,EAAG,CACL,MAAM,EAAI,EAAE,aAAa,QAAS,EAAI,EAAE,aAAa,SACrD,EAAE,iBAAiB,SAAS,KAC1B,KAAK,IAAI,OAAO,IACd,GAAK,EAAE,aAAa,OAAQ,KAAoB,UAAd,KAAK,MAAoB,EAAE,aAAa,OAAQ,MAAO,GAAK,EAAE,aAAa,QAAS,UAC5H,CACA,EAAE,KAAM,KAAK,KAAK,EACpB,CACA,wBAAA,CAAyB,EAAG,EAAG,GAC7B,GAAI,IAAM,EACR,OAAQ,GACN,IAAK,UACH,KAAK,gBACL,MACF,IAAK,OACH,KAAK,WAAW,EAAG,GACnB,MACF,IAAK,UACH,KAAK,cAAc,EAAG,GACtB,MACF,IAAK,gBACH,IAAM,KAAK,IAAI,aAAa,gBAAiB,GAAI,KAAK,gBAAgB,kBACtE,MACF,QACE,MAAM,yBAAyB,EAAG,EAAG,GAG7C,CACA,YAAA,CAAa,EAAG,GACR,OAAN,GAAoB,KAAN,GAAkB,YAAN,GAAmB,KAAK,IAAI,UAAU,OAAO,GA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0-alpha.18/dist/index.es.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@proximus/lavender-button-icon@2.0.0-alpha.18/dist/index.es.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","import { PxElement as s, transferAccessibilityAttributes as d, log as a } from \"@proximus/lavender-common\";\nconst c = \".btn-icon{font-size:var(--px-font-size-base);display:inline-flex;width:var(--px-size-l);height:var(--px-size-l);vertical-align:middle;align-items:center;justify-content:center;cursor:pointer;--btn-transition: all .2s ease-in-out 0s;transition:var(--btn-transition);background:var(--px-color-background-container-primary-default);color:var(--px-color-icon-brand-inverted);border-radius:var(--px-radius-pill);padding:var(--px-padding-xs-mobile);border:var(--px-size-border-m) solid transparent}.btn-icon,.btn-icon *{box-sizing:border-box}.btn-icon ::slotted(px-icon){line-height:0}.btn-icon:hover:not([disabled],[aria-disabled=true],.btn-icon--state-loading){background:var(--px-color-background-state-hover-bordered-default);color:var(--px-color-icon-brand-default);border-color:var(--px-color-border-state-hover-default)}.btn-icon:active:not([disabled],[aria-disabled=true],.btn-icon--state-loading){background:var(--px-color-background-state-active-inverted);color:var(--px-color-icon-state-active-default);border-color:var(--px-color-border-state-active-default)}.btn-icon:focus-visible:not([disabled],[aria-disabled=true]){outline-offset:var(--px-focus-offset-mobile);outline:var(--px-focus-outline-mobile) solid var(--px-color-border-focus-outline-default)}.btn-icon[disabled],.btn-icon[aria-disabled=true]{background:var(--px-color-background-state-disabled-default);color:var(--px-color-icon-state-disabled-default);cursor:default;pointer-events:none}.btn-icon.btn-icon--state-loading{background:var(--px-color-background-state-disabled-default);color:var(--px-color-icon-brand-default);cursor:inherit}.btn-icon--size-small{padding:var(--px-padding-2xs-mobile);width:var(--px-size-m);height:var(--px-size-m)}.btn-icon--variant-secondary{background-color:var(--px-color-background-container-secondary-default);color:var(--px-color-icon-brand-default)}.btn-icon--variant-naked{background-color:transparent;color:var(--px-color-icon-brand-default);width:auto;height:auto}:host([inverted]) .btn-icon{background:var(--px-color-background-container-primary-inverted);color:var(--px-color-icon-brand-default)}:host([inverted]) .btn-icon:hover:not([disabled],[aria-disabled=true],.btn-icon--state-loading){background:var(--px-color-background-state-hover-bordered-inverted);color:var(--px-color-icon-brand-inverted);border-color:var(--px-color-border-state-hover-inverted)}:host([inverted]) .btn-icon:active:not([disabled],[aria-disabled=true],.btn-icon--state-loading){background:var(--px-color-background-state-hover-default);color:var(--px-color-icon-state-active-inverted);border-color:var(--px-color-border-state-active-inverted)}:host([inverted]) .btn-icon:focus-visible:not([disabled],[aria-disabled=true]){outline-color:var(--px-color-border-focus-outline-inverted)}:host([inverted]) .btn-icon[disabled],:host([inverted]) .btn-icon[aria-disabled=true]{background:var(--px-color-background-state-disabled-inverted);color:var(--px-color-icon-state-disabled-inverted)}:host([inverted]) .btn-icon.btn-icon--state-loading{background:var(--px-color-background-state-disabled-inverted);color:var(--px-color-icon-brand-inverted);border-color:transparent}:host([inverted]) .btn-icon.btn-icon--variant-naked{background-color:transparent;color:var(--px-color-icon-brand-inverted)}:host([inverted]) .btn-icon--variant-secondary{background-color:var(--px-color-background-container-secondary-inverted);color:var(--px-color-icon-brand-inverted)}@media only screen and (min-width: 768px){.btn-icon{padding:var(--px-padding-xs-desktop)}.btn-icon:focus-visible:not([disabled],[aria-disabled=true]){outline-offset:var(--px-focus-offset-desktop);outline-width:var(--px-focus-outline-desktop)}.btn-icon--size-small{padding:var(--px-padding-2xs-desktop)}}@media only screen and (min-width: 1025px){.btn-icon{padding:var(--px-padding-xs-desktop)}.btn-icon:focus-visible:not([disabled],[aria-disabled=true]){outline-offset:var(--px-focus-offset-desktop);outline-width:var(--px-focus-outline-desktop)}.btn-icon--size-small{padding:var(--px-padding-2xs-desktop)}}\", n = new CSSStyleSheet();\nn.replaceSync(c);\nconst l = [\"\", \"default\", \"small\"], b = [\n  \"\",\n  \"default\",\n  \"secondary\",\n  \"naked\"\n], o = class o extends s {\n  constructor() {\n    super(n), this.template = () => \"<slot></slot>\";\n    const t = document.createElement(o.nativeName);\n    t.classList.add(\"btn-icon\"), t.innerHTML = this.template(), this.shadowRoot.appendChild(t);\n  }\n  static get observedAttributes() {\n    return [\n      ...super.observedAttributes,\n      \"inverted\",\n      \"loading\",\n      \"size\",\n      \"variant\",\n      \"aria-expanded\"\n    ];\n  }\n  connectedCallback() {\n    const t = this.querySelector(\"px-icon\");\n    if (t) {\n      const e = t.getAttribute(\"size\"), i = t.getAttribute(\"color\");\n      t.addEventListener(\"click\", () => {\n        this.$el.focus();\n      }), e || t.setAttribute(\"size\", \"s\"), this.size === \"small\" && t.setAttribute(\"size\", \"xs\"), i || t.setAttribute(\"color\", \"inherit\");\n    }\n    d(this, this.$el, !1);\n  }\n  attributeChangedCallback(t, e, i) {\n    if (e !== i)\n      switch (t) {\n        case \"loading\":\n          this.updateLoading();\n          break;\n        case \"size\":\n          this.updateSize(e, i);\n          break;\n        case \"variant\":\n          this.updateVariant(e, i);\n          break;\n        case \"aria-expanded\":\n          i && (this.$el.setAttribute(\"aria-expanded\", i), this.removeAttribute(\"aria-expanded\"));\n          break;\n        default:\n          super.attributeChangedCallback(t, e, i);\n          break;\n      }\n  }\n  _toggleClass(t, e) {\n    t !== null && t !== \"\" && t !== \"default\" && this.$el.classList.toggle(t), e !== null && e !== \"\" && e !== \"default\" && this.$el.classList.toggle(e);\n  }\n  updateLoading() {\n    this.$el.classList.toggle(\"btn-icon--state-loading\");\n  }\n  updateSize(t, e) {\n    this.checkName(l, e) ? (t !== null && t !== \"\" && t !== \"default\" && this.$el.classList.toggle(`btn-icon--size-${t}`), e !== null && e !== \"\" && e !== \"default\" && this.$el.classList.toggle(`btn-icon--size-${e}`)) : a(\n      `${e} is not a valid size value for ${this.tagName.toLowerCase()}`\n    );\n  }\n  updateVariant(t, e) {\n    this.checkName(b, e) ? (t !== null && t !== \"\" && t !== \"default\" && this.$el.classList.toggle(`btn-icon--variant-${t}`), e !== null && e !== \"\" && e !== \"default\" && this.$el.classList.toggle(`btn-icon--variant-${e}`)) : a(\n      `${e} is not a valid variant value for ${this.tagName.toLowerCase()}`\n    );\n  }\n  get inverted() {\n    return this.getAttribute(\"inverted\");\n  }\n  set inverted(t) {\n    this.setAttribute(\"inverted\", t);\n  }\n  get loading() {\n    return this.getAttribute(\"loading\");\n  }\n  set loading(t) {\n    this.setAttribute(\"loading\", t);\n  }\n  get size() {\n    return this.getAttribute(\"size\");\n  }\n  set size(t) {\n    this.setAttribute(\"size\", t);\n  }\n  get variant() {\n    return this.getAttribute(\"variant\");\n  }\n  set variant(t) {\n    this.setAttribute(\"variant\", t);\n  }\n  get ariaExpanded() {\n    return this.getAttribute(\"aria-expanded\");\n  }\n  set ariaExpanded(t) {\n    t ? this.setAttribute(\"aria-expanded\", t) : this.removeAttribute(\"aria-expanded\");\n  }\n};\no.nativeName = \"button\";\nlet r = o;\ncustomElements.get(\"px-button-icon\") || customElements.define(\"px-button-icon\", r);\nexport {\n  r as ButtonIcon,\n  l as buttonIconSizeValues,\n  b as buttonIconVariantValues\n};\n"]}