You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@aurelia2-mdc-web/button

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aurelia2-mdc-web/button - npm Package Compare versions

Comparing version
1.0.12
to
1.0.13
+2
-2
dist/mdc-button-label.js
import { __decorate, __metadata } from "tslib";
import { inject, customAttribute, INode } from 'aurelia';
import { customAttribute, inject } from 'aurelia';
/**

@@ -17,3 +17,3 @@ * The mdc-button-label attribute is required in order for the trailing icon to be styled appropriately.

MdcButtonLabel = __decorate([
inject(INode),
inject(Element),
customAttribute('mdc-button-label'),

@@ -20,0 +20,0 @@ __metadata("design:paramtypes", [HTMLElement])

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

{"version":3,"file":"mdc-button-label.js","sourceRoot":"","sources":["../src/mdc-button-label.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEzD;;;GAGG;AACH,IAEa,cAAc,GAF3B,MAEa,cAAc;IACL;IAApB,YAAoB,IAAiB;QAAjB,SAAI,GAAJ,IAAI,CAAa;IAAI,CAAC;IAE1C,QAAQ;QACN,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;IAC/C,CAAC;CACF,CAAA;AANY,cAAc;IAF1B,MAAM,CAAC,KAAK,CAAC;IACb,eAAe,CAAC,kBAAkB,CAAC;qCAER,WAAW;GAD1B,cAAc,CAM1B;SANY,cAAc","sourcesContent":["import { inject, customAttribute, INode } from 'aurelia';\n\n/**\n * The mdc-button-label attribute is required in order for the trailing icon to be styled appropriately.\n * @selector [mdc-button-label]\n */\n@inject(INode)\n@customAttribute('mdc-button-label')\nexport class MdcButtonLabel {\n constructor(private root: HTMLElement) { }\n\n attached() {\n this.root.classList.add('mdc-button__label');\n }\n}\n"]}
{"version":3,"file":"mdc-button-label.js","sourceRoot":"","sources":["../src/mdc-button-label.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAElD;;;GAGG;AACH,IAEa,cAAc,GAF3B,MAEa,cAAc;IACL;IAApB,YAAoB,IAAiB;QAAjB,SAAI,GAAJ,IAAI,CAAa;IAAI,CAAC;IAE1C,QAAQ;QACN,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;IAC/C,CAAC;CACF,CAAA;AANY,cAAc;IAF1B,MAAM,CAAC,OAAO,CAAC;IACf,eAAe,CAAC,kBAAkB,CAAC;qCAER,WAAW;GAD1B,cAAc,CAM1B;SANY,cAAc","sourcesContent":["import { customAttribute, inject } from 'aurelia';\n\n/**\n * The mdc-button-label attribute is required in order for the trailing icon to be styled appropriately.\n * @selector [mdc-button-label]\n */\n@inject(Element)\n@customAttribute('mdc-button-label')\nexport class MdcButtonLabel {\n constructor(private root: HTMLElement) { }\n\n attached() {\n this.root.classList.add('mdc-button__label');\n }\n}\n"]}
import { __decorate, __metadata } from "tslib";
import { inject, customElement, bindable, INode } from 'aurelia';
import template from './mdc-button.html';
import { customElement, bindable, inject } from 'aurelia';
import { booleanAttr } from '@aurelia2-mdc-web/base';
/**

@@ -15,2 +15,6 @@ * @selector button[mdc-button]

/**
* Set the component label
*/
label;
/**
* Set the component touch target to 48 x 48 px

@@ -31,18 +35,2 @@ */

outlined;
/**
* Set the button label
*/
label;
/**
* Set the button disabled
*/
disabled;
disabledChanged() {
if (this.disabled) {
this.root.setAttribute('disabled', '');
}
else {
this.root.removeAttribute('disabled');
}
}
// this is necessary for the route-href to work

@@ -58,3 +46,13 @@ href;

}
// beforeCompile(controller: Controller) {
// const t = document.createElement('template');
// t.setAttribute('au-slot', '');
// const host = (controller.host as HTMLElement);
// const nodes = Array.from(host.childNodes);
// nodes.forEach(x => t.appendChild(x));
// host.innerHTML = '';
// host.appendChild(t);
// }
attached() {
this.hrefChanged();
const icons = this.root.querySelectorAll('mdc-icon');

@@ -66,14 +64,18 @@ Array.from(icons).forEach(x => x.classList.add('mdc-button__icon'));

bindable,
__metadata("design:type", String)
], MdcButton.prototype, "label", void 0);
__decorate([
bindable({ set: booleanAttr }),
__metadata("design:type", Boolean)
], MdcButton.prototype, "touch", void 0);
__decorate([
bindable,
bindable({ set: booleanAttr }),
__metadata("design:type", Boolean)
], MdcButton.prototype, "raised", void 0);
__decorate([
bindable,
bindable({ set: booleanAttr }),
__metadata("design:type", Boolean)
], MdcButton.prototype, "unelevated", void 0);
__decorate([
bindable,
bindable({ set: booleanAttr }),
__metadata("design:type", Boolean)

@@ -84,17 +86,6 @@ ], MdcButton.prototype, "outlined", void 0);

__metadata("design:type", String)
], MdcButton.prototype, "label", void 0);
__decorate([
bindable,
__metadata("design:type", Boolean)
], MdcButton.prototype, "disabled", void 0);
__decorate([
bindable,
__metadata("design:type", String)
], MdcButton.prototype, "href", void 0);
MdcButton = __decorate([
inject(INode),
customElement({
name: 'mdc-button',
template,
}),
inject(Element),
customElement('mdc-button'),
__metadata("design:paramtypes", [HTMLElement])

@@ -101,0 +92,0 @@ ], MdcButton);

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

{"version":3,"file":"mdc-button.js","sourceRoot":"","sources":["../src/mdc-button.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEjE,OAAO,QAAQ,MAAM,mBAAmB,CAAC;AAEzC;;;;GAIG;AACH,IAKa,SAAS,GALtB,MAKa,SAAS;IACD;IAAnB,YAAmB,IAAiB;QAAjB,SAAI,GAAJ,IAAI,CAAa;IAAI,CAAC;IAEzC;;OAEG;IAEH,KAAK,CAAU;IAEf;;OAEG;IAEH,MAAM,CAAU;IAEhB;;OAEG;IAEH,UAAU,CAAU;IAEpB;;OAEG;IAEH,QAAQ,CAAU;IAElB;;OAEG;IAEH,KAAK,CAAS;IAEd;;OAEG;IAEH,QAAQ,CAAU;IAClB,eAAe;QACb,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;SACxC;aAAM;YACL,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;SACvC;IACH,CAAC;IAED,+CAA+C;IAE/C,IAAI,CAAS;IACb,WAAW;QACT,IAAI,IAAI,CAAC,IAAI,EAAE;YACb,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;SAC3C;aAAM;YACL,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;SACnC;IACH,CAAC;IAED,QAAQ;QACN,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;QACrD,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC,CAAC;IACtE,CAAC;CACF,CAAA;AAtDC;IADC,QAAQ;;wCACM;AAMf;IADC,QAAQ;;yCACO;AAMhB;IADC,QAAQ;;6CACW;AAMpB;IADC,QAAQ;;2CACS;AAMlB;IADC,QAAQ;;wCACK;AAMd;IADC,QAAQ;;2CACS;AAWlB;IADC,QAAQ;;uCACI;AAhDF,SAAS;IALrB,MAAM,CAAC,KAAK,CAAC;IACb,aAAa,CAAC;QACb,IAAI,EAAE,YAAY;QAClB,QAAQ;KACT,CAAC;qCAEyB,WAAW;GADzB,SAAS,CA6DrB;SA7DY,SAAS","sourcesContent":["import { inject, customElement, bindable, INode } from 'aurelia';\n\nimport template from './mdc-button.html';\n\n/**\n * @selector button[mdc-button]\n * @selector a[mdc-button]\n * @selector mdc-button\n */\n@inject(INode)\n@customElement({\n name: 'mdc-button',\n template,\n})\nexport class MdcButton {\n constructor(public root: HTMLElement) { }\n\n /**\n * Set the component touch target to 48 x 48 px\n */\n @bindable\n touch: boolean;\n\n /**\n * A contained button that is elevated upon the surface\n */\n @bindable\n raised: boolean;\n\n /**\n * A contained button that is flush with the surface\n */\n @bindable\n unelevated: boolean;\n\n /**\n * A contained button that is flush with the surface and has a visible border\n */\n @bindable\n outlined: boolean;\n\n /**\n * Set the button label\n */\n @bindable\n label: string;\n\n /**\n * Set the button disabled\n */\n @bindable\n disabled: boolean;\n disabledChanged() {\n if (this.disabled) {\n this.root.setAttribute('disabled', '');\n } else {\n this.root.removeAttribute('disabled');\n }\n }\n\n // this is necessary for the route-href to work\n @bindable\n href: string;\n hrefChanged() {\n if (this.href) {\n this.root.setAttribute('href', this.href);\n } else {\n this.root.removeAttribute('href');\n }\n }\n\n attached() {\n const icons = this.root.querySelectorAll('mdc-icon');\n Array.from(icons).forEach(x => x.classList.add('mdc-button__icon'));\n }\n}\n"]}
{"version":3,"file":"mdc-button.js","sourceRoot":"","sources":["../src/mdc-button.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD;;;;GAIG;AACH,IAEa,SAAS,GAFtB,MAEa,SAAS;IACD;IAAnB,YAAmB,IAAiB;QAAjB,SAAI,GAAJ,IAAI,CAAa;IAAI,CAAC;IAEzC;;OAEG;IAEH,KAAK,CAAS;IAEd;;OAEG;IAEH,KAAK,CAAU;IAEf;;OAEG;IAEH,MAAM,CAAU;IAEhB;;OAEG;IAEH,UAAU,CAAU;IAEpB;;OAEG;IAEH,QAAQ,CAAU;IAElB,+CAA+C;IAE/C,IAAI,CAAS;IACb,WAAW;QACT,IAAI,IAAI,CAAC,IAAI,EAAE;YACb,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;SAC3C;aAAM;YACL,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;SACnC;IACH,CAAC;IAED,0CAA0C;IAC1C,kDAAkD;IAClD,mCAAmC;IACnC,mDAAmD;IACnD,+CAA+C;IAC/C,0CAA0C;IAC1C,yBAAyB;IACzB,yBAAyB;IACzB,IAAI;IAEJ,QAAQ;QACN,IAAI,CAAC,WAAW,EAAE,CAAC;QACnB,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;QACrD,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC,CAAC;IACtE,CAAC;CACF,CAAA;AApDC;IADC,QAAQ;;wCACK;AAMd;IADC,QAAQ,CAAC,EAAE,GAAG,EAAE,WAAW,EAAE,CAAC;;wCAChB;AAMf;IADC,QAAQ,CAAC,EAAE,GAAG,EAAE,WAAW,EAAE,CAAC;;yCACf;AAMhB;IADC,QAAQ,CAAC,EAAE,GAAG,EAAE,WAAW,EAAE,CAAC;;6CACX;AAMpB;IADC,QAAQ,CAAC,EAAE,GAAG,EAAE,WAAW,EAAE,CAAC;;2CACb;AAIlB;IADC,QAAQ;;uCACI;AAnCF,SAAS;IAFrB,MAAM,CAAC,OAAO,CAAC;IACf,aAAa,CAAC,YAAY,CAAC;qCAED,WAAW;GADzB,SAAS,CA2DrB;SA3DY,SAAS","sourcesContent":["import { customElement, bindable, inject } from 'aurelia';\nimport { booleanAttr } from '@aurelia2-mdc-web/base';\n\n/**\n * @selector button[mdc-button]\n * @selector a[mdc-button]\n * @selector mdc-button\n */\n@inject(Element)\n@customElement('mdc-button')\nexport class MdcButton {\n constructor(public root: HTMLElement) { }\n\n /**\n * Set the component label\n */\n @bindable\n label: string;\n\n /**\n * Set the component touch target to 48 x 48 px\n */\n @bindable({ set: booleanAttr })\n touch: boolean;\n\n /**\n * A contained button that is elevated upon the surface\n */\n @bindable({ set: booleanAttr })\n raised: boolean;\n\n /**\n * A contained button that is flush with the surface\n */\n @bindable({ set: booleanAttr })\n unelevated: boolean;\n\n /**\n * A contained button that is flush with the surface and has a visible border\n */\n @bindable({ set: booleanAttr })\n outlined: boolean;\n\n // this is necessary for the route-href to work\n @bindable\n href: string;\n hrefChanged() {\n if (this.href) {\n this.root.setAttribute('href', this.href);\n } else {\n this.root.removeAttribute('href');\n }\n }\n\n // beforeCompile(controller: Controller) {\n // const t = document.createElement('template');\n // t.setAttribute('au-slot', '');\n // const host = (controller.host as HTMLElement);\n // const nodes = Array.from(host.childNodes);\n // nodes.forEach(x => t.appendChild(x));\n // host.innerHTML = '';\n // host.appendChild(t);\n // }\n\n attached() {\n this.hrefChanged();\n const icons = this.root.querySelectorAll('mdc-icon');\n Array.from(icons).forEach(x => x.classList.add('mdc-button__icon'));\n }\n}\n"]}

@@ -10,2 +10,6 @@ /**

/**
* Set the component label
*/
label: string;
/**
* Set the component touch target to 48 x 48 px

@@ -26,11 +30,2 @@ */

outlined: boolean;
/**
* Set the button label
*/
label: string;
/**
* Set the button disabled
*/
disabled: boolean;
disabledChanged(): void;
href: string;

@@ -37,0 +32,0 @@ hrefChanged(): void;

{
"name": "@aurelia2-mdc-web/button",
"version": "1.0.12",
"version": "1.0.13",
"publishConfig": {

@@ -44,6 +44,6 @@ "access": "public"

"dependencies": {
"@aurelia2-mdc-web/base": "1.0.12",
"@aurelia2-mdc-web/ripple": "1.0.12",
"@aurelia2-mdc-web/base": "1.0.13",
"@aurelia2-mdc-web/ripple": "1.0.13",
"@material/button": "^14.0.0"
}
}