Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@digital-realty/ix-button

Package Overview
Dependencies
Maintainers
0
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@digital-realty/ix-button - npm Package Compare versions

Comparing version 3.3.4-alpha-224946-t51.0 to 3.3.4-alpha-225490-t51.0

1

dist/ix-button.js

@@ -8,3 +8,2 @@ import { css } from 'lit';

display: flex;
--md-circular-progress-size: 24px;
}

@@ -11,0 +10,0 @@

11

dist/ix-button.min.js

@@ -1,2 +0,2 @@

import{LitElement,isServer,html,nothing,css}from"lit";import{__decorate}from"tslib";import{literal,html as html$1}from"lit/static-html.js";import{property}from"lit/decorators.js";import{isActivationClick,dispatchActivationClick}from"@material/web/internal/events/form-label-activation.js";import{ifDefined}from"lit/directives/if-defined.js";import{internals}from"@material/web/labs/behaviors/element-internals.js";import"@material/web/button/text-button.js";import"@material/web/button/elevated-button.js";import"@material/web/button/filled-button.js";import"@material/web/button/outlined-button.js";import"@material/web/button/filled-tonal-button.js";import"@material/web/icon/icon.js";import"@digital-realty/ix-progress/ix-progress.js";import{setupFormSubmitter}from"@material/web/internal/controller/form-submitter.js";import{requestUpdateOnAriaChange}from"@material/web/internal/aria/delegate.js";var _a;class IxButton extends LitElement{get form(){return this[internals].form}set form(t){this.setAttribute("form",t)}get buttonElement(){var t;return null==(t=null==(t=null==(t=this.shadowRoot)?void 0:t.querySelector(".md-button"))?void 0:t.shadowRoot)?void 0:t.querySelector(".button")}get name(){var t;return null!=(t=this.getAttribute("name"))?t:""}set name(t){this.setAttribute("name",t)}focus(){this.buttonElement.focus()}blur(){this.buttonElement.blur()}constructor(){super(),this.value="",this[_a]=this.attachInternals(),this.type="submit",this.disabled=!1,this.submitting=!1,this.href=void 0,this.target="",this.trailingIcon=!1,this.hasIcon=!1,this.appearance="filled",this.handleActivationClick=t=>{isActivationClick(t)&&this.buttonElement&&(this.focus(),dispatchActivationClick(this.buttonElement))},this.tags={elevated:literal`md-elevated-button`,filled:literal`md-filled-button`,"filled-tonal":literal`md-filled-tonal-button`,outlined:literal`md-outlined-button`,text:literal`md-text-button`},isServer||this.addEventListener("click",this.handleActivationClick)}render(){var t;return"anchor"===this.appearance?html`<a
import{LitElement,isServer,html,nothing,css}from"lit";import{__decorate}from"tslib";import{literal,html as html$1}from"lit/static-html.js";import{property}from"lit/decorators.js";import{isActivationClick,dispatchActivationClick}from"@material/web/internal/events/form-label-activation.js";import{ifDefined}from"lit/directives/if-defined.js";import{internals}from"@material/web/labs/behaviors/element-internals.js";import"@material/web/button/text-button.js";import"@material/web/button/elevated-button.js";import"@material/web/button/filled-button.js";import"@material/web/button/outlined-button.js";import"@material/web/button/filled-tonal-button.js";import"@material/web/icon/icon.js";import{setupFormSubmitter}from"@material/web/internal/controller/form-submitter.js";import{requestUpdateOnAriaChange}from"@material/web/internal/aria/delegate.js";var _a;class IxButton extends LitElement{get form(){return this[internals].form}set form(t){this.setAttribute("form",t)}get buttonElement(){var t;return null==(t=null==(t=null==(t=this.shadowRoot)?void 0:t.querySelector(".md-button"))?void 0:t.shadowRoot)?void 0:t.querySelector(".button")}get name(){var t;return null!=(t=this.getAttribute("name"))?t:""}set name(t){this.setAttribute("name",t)}focus(){this.buttonElement.focus()}blur(){this.buttonElement.blur()}constructor(){super(),this.value="",this[_a]=this.attachInternals(),this.type="submit",this.disabled=!1,this.href=void 0,this.target="",this.trailingIcon=!1,this.hasIcon=!1,this.appearance="filled",this.handleActivationClick=t=>{isActivationClick(t)&&this.buttonElement&&(this.focus(),dispatchActivationClick(this.buttonElement))},this.tags={elevated:literal`md-elevated-button`,filled:literal`md-filled-button`,"filled-tonal":literal`md-filled-tonal-button`,outlined:literal`md-outlined-button`,text:literal`md-text-button`},isServer||this.addEventListener("click",this.handleActivationClick)}render(){var t;return"anchor"===this.appearance?html`<a
target=${ifDefined(this.target)}

@@ -6,3 +6,3 @@ href=${ifDefined(this.href)}

></a>`:(t=(null==(t=this.tags)?void 0:t[this.appearance])||this.tags.outlined,html$1`<${t}
?disabled=${this.disabled||this.submitting}
?disabled=${this.disabled}
target=${ifDefined(this.target)}

@@ -17,8 +17,5 @@ href=${ifDefined(this.href)}

<div class="slot-wrap">
${this.submitting?html`<ix-progress
.indeterminate=${!0}
.linear=${!1}
></ix-progress>`:html`<slot></slot>`}
<slot></slot>
</div>
${this.hasIcon?html`<slot slot="icon" name="icon"></slot>`:nothing}
</${t}>`)}}_a=internals,requestUpdateOnAriaChange(IxButton),setupFormSubmitter(IxButton),IxButton.formAssociated=!0,IxButton.shadowRootOptions={mode:"open",delegatesFocus:!0},__decorate([property()],IxButton.prototype,"value",void 0),__decorate([property()],IxButton.prototype,"type",void 0),__decorate([property({type:Boolean,reflect:!0})],IxButton.prototype,"disabled",void 0),__decorate([property({type:Boolean,reflect:!0})],IxButton.prototype,"submitting",void 0),__decorate([property()],IxButton.prototype,"href",void 0),__decorate([property()],IxButton.prototype,"target",void 0),__decorate([property({type:Boolean,attribute:"trailing-icon"})],IxButton.prototype,"trailingIcon",void 0),__decorate([property({type:Boolean,attribute:"has-icon"})],IxButton.prototype,"hasIcon",void 0),__decorate([property()],IxButton.prototype,"appearance",void 0);class IxButtonStyled extends IxButton{}IxButtonStyled.styles=css`.md-button{display:flex;--md-circular-progress-size:24px}.slot-wrap{font-weight:700;text-transform:uppercase;position:relative;letter-spacing:1.25px}`,window.customElements.define("ix-button",IxButtonStyled);export{IxButtonStyled};
</${t}>`)}}_a=internals,requestUpdateOnAriaChange(IxButton),setupFormSubmitter(IxButton),IxButton.formAssociated=!0,IxButton.shadowRootOptions={mode:"open",delegatesFocus:!0},__decorate([property()],IxButton.prototype,"value",void 0),__decorate([property()],IxButton.prototype,"type",void 0),__decorate([property({type:Boolean,reflect:!0})],IxButton.prototype,"disabled",void 0),__decorate([property()],IxButton.prototype,"href",void 0),__decorate([property()],IxButton.prototype,"target",void 0),__decorate([property({type:Boolean,attribute:"trailing-icon"})],IxButton.prototype,"trailingIcon",void 0),__decorate([property({type:Boolean,attribute:"has-icon"})],IxButton.prototype,"hasIcon",void 0),__decorate([property()],IxButton.prototype,"appearance",void 0);class IxButtonStyled extends IxButton{}IxButtonStyled.styles=css`.md-button{display:flex}.slot-wrap{font-weight:700;text-transform:uppercase;position:relative;letter-spacing:1.25px}`,window.customElements.define("ix-button",IxButtonStyled);export{IxButtonStyled};

@@ -9,3 +9,2 @@ import { LitElement } from 'lit';

import '@material/web/icon/icon.js';
import '@digital-realty/ix-progress/ix-progress.js';
import { FormSubmitter, FormSubmitterType } from '@material/web/internal/controller/form-submitter.js';

@@ -36,6 +35,2 @@ export declare class IxButton extends LitElement implements FormSubmitter {

/**
* Whether or not the button is submitting.
*/
submitting: boolean;
/**
* The URL that the link button points to.

@@ -42,0 +37,0 @@ */

@@ -15,3 +15,2 @@ var _a;

import '@material/web/icon/icon.js';
import '@digital-realty/ix-progress/ix-progress.js';
import { setupFormSubmitter, } from '@material/web/internal/controller/form-submitter.js';

@@ -58,6 +57,2 @@ import { requestUpdateOnAriaChange } from '@material/web/internal/aria/delegate.js';

/**
* Whether or not the button is submitting.
*/
this.submitting = false;
/**
* The URL that the link button points to.

@@ -112,3 +107,3 @@ */

return staticHtml `<${tag}
?disabled=${this.disabled || this.submitting}
?disabled=${this.disabled}
target=${ifDefined(this.target)}

@@ -123,8 +118,3 @@ href=${ifDefined(this.href)}

<div class="slot-wrap">
${this.submitting
? html `<ix-progress
.indeterminate=${true}
.linear=${false}
></ix-progress>`
: html `<slot></slot>`}
<slot></slot>
</div>

@@ -157,5 +147,2 @@ ${this.hasIcon ? html `<slot slot="icon" name="icon"></slot>` : nothing}

__decorate([
property({ type: Boolean, reflect: true })
], IxButton.prototype, "submitting", void 0);
__decorate([
property()

@@ -162,0 +149,0 @@ ], IxButton.prototype, "href", void 0);

@@ -6,3 +6,3 @@ {

"author": "Digital Realty",
"version": "3.3.4-alpha-224946-t51.0",
"version": "3.3.4-alpha-225490-t51.0",
"type": "module",

@@ -31,3 +31,2 @@ "main": "dist/index.js",

"dependencies": {
"@digital-realty/ix-progress": "^1.2.4-alpha-224946-t51.0",
"@lit/react": "^1.0.2",

@@ -112,3 +111,3 @@ "@material/web": "1.2.0",

],
"gitHead": "437314309d1a36abb68fb6a6c31e96ef466759a5"
"gitHead": "c15ea02b7341615d8c9df7454aa4913b29773356"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc