All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.dist.includes.form-button-widget.FormButtonWidgetBase.js.map Maven / Gradle / Ivy

The newest version!
{"version":3,"file":"FormButtonWidgetBase.js","sourceRoot":"","sources":["../../../src/includes/form-button-widget/FormButtonWidgetBase.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAC,mBAAmB,EAAC,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAC,UAAU,EAAC,MAAM,kBAAkB,CAAC;AAE5C,MAAM,OAAO,oBAAqB,SAAQ,UAAU;IAIlD;QACE,KAAK,EAAE,CAAC;QAHV,YAAO,GAAG,KAAK,CAAC;QA8BR,kBAAa,GAAG,CAAC,CAAC;QAElB,iBAAY,GAAG,GAAS,EAAE;YAChC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACtB,CAAC,CAAA;QAEO,gBAAW,GAAG,GAAS,EAAE;YAC/B,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACvB,CAAC,CAAA;QAlCC,mBAAmB,EAAE,CAAC;IACxB,CAAC;IAED,iBAAiB;QACf,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QAClD,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IAClD,CAAC;IAED,oBAAoB;QAClB,KAAK,CAAC,oBAAoB,EAAE,CAAC;QAC7B,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QACrD,IAAI,CAAC,mBAAmB,CAAC,MAAM,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IACrD,CAAC;IAED,wBAAwB,CAAC,IAAY,EAAE,MAAc,EAAE,MAAc;QACnE,KAAK,CAAC,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;QAErD,IAAI,IAAI,KAAK,UAAU,IAAI,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,EAAE,CAAC;YACzD,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,QAAQ,CAAC;YACnC,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC;QACrB,CAAC;aAAM,IAAI,IAAI,KAAK,UAAU,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,EAAE,CAAC;YACjE,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,aAAa,CAAC;QACrC,CAAC;IACH,CAAC;CAWF;AAvCC;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;qDACzB","sourcesContent":["import {property} from 'lit/decorators.js';\nimport {applyForegroundRGBA} from '../themeHelpers.js';\nimport {VscElement} from '../VscElement.js';\n\nexport class FormButtonWidgetBase extends VscElement {\n  @property({type: Boolean, reflect: true})\n  focused = false;\n\n  constructor() {\n    super();\n    applyForegroundRGBA();\n  }\n\n  connectedCallback(): void {\n    super.connectedCallback();\n    this.addEventListener('focus', this._handleFocus);\n    this.addEventListener('blur', this._handleBlur);\n  }\n\n  disconnectedCallback(): void {\n    super.disconnectedCallback();\n    this.removeEventListener('focus', this._handleFocus);\n    this.removeEventListener('blur', this._handleBlur);\n  }\n\n  attributeChangedCallback(name: string, oldVal: string, newVal: string): void {\n    super.attributeChangedCallback(name, oldVal, newVal);\n\n    if (name === 'disabled' && this.hasAttribute('disabled')) {\n      this._prevTabindex = this.tabIndex;\n      this.tabIndex = -1;\n    } else if (name === 'disabled' && !this.hasAttribute('disabled')) {\n      this.tabIndex = this._prevTabindex;\n    }\n  }\n\n  private _prevTabindex = 0;\n\n  private _handleFocus = (): void => {\n    this.focused = true;\n  }\n\n  private _handleBlur = (): void => {\n    this.focused = false;\n  }\n}\n"]}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy