@digital-realty/ix-icon-button 1.1.6 → 1.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ix-icon-button.js
CHANGED
|
@@ -27,5 +27,5 @@ IxIconButtonStyled.styles = css `
|
|
|
27
27
|
--md-sys-color-on-surface-variant: var(--ix-button-cancel-color);
|
|
28
28
|
}
|
|
29
29
|
`;
|
|
30
|
-
|
|
30
|
+
customElements.define('ix-icon-button', IxIconButtonStyled);
|
|
31
31
|
//# sourceMappingURL=ix-icon-button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ix-icon-button.js","sourceRoot":"","sources":["../src/ix-icon-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,MAAM,OAAO,kBAAmB,SAAQ,YAAY;;AAClC,yBAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwB3B,CAAC;AAGJ,
|
|
1
|
+
{"version":3,"file":"ix-icon-button.js","sourceRoot":"","sources":["../src/ix-icon-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,MAAM,OAAO,kBAAmB,SAAQ,YAAY;;AAClC,yBAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwB3B,CAAC;AAGJ,cAAc,CAAC,MAAM,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,CAAC","sourcesContent":["import { css } from 'lit';\nimport { IxIconButton } from './IxIconButton.js';\n\nexport class IxIconButtonStyled extends IxIconButton {\n static override styles = css`\n :host {\n display: flex;\n\n --md-icon-button-state-layer-height: calc(\n var(--md-icon-button-icon-size) * 1.65\n );\n --md-icon-button-state-layer-width: calc(\n var(--md-icon-button-icon-size) * 1.65\n );\n }\n\n :host([small]) {\n --md-icon-button-state-layer-height: calc(\n var(--md-icon-button-icon-size) * 1.2\n );\n --md-icon-button-state-layer-width: calc(\n var(--md-icon-button-icon-size) * 1.2\n );\n }\n\n :host(.cancel) {\n --md-sys-color-on-surface-variant: var(--ix-button-cancel-color);\n }\n `;\n}\n\ncustomElements.define('ix-icon-button', IxIconButtonStyled);\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{LitElement,nothing,html
|
|
1
|
+
import{LitElement,nothing,html,css}from"lit";import{__decorate}from"tslib";import{query,property}from"lit/decorators.js";import{literal,html as html$1}from"lit/static-html.js";import{ifDefined}from"lit/directives/if-defined.js";import"@material/web/iconbutton/icon-button.js";import"@material/web/iconbutton/filled-icon-button.js";import"@material/web/iconbutton/filled-tonal-icon-button.js";import"@material/web/iconbutton/outlined-icon-button.js";import"@digital-realty/ix-icon/ix-icon.js";class IxIconButton extends LitElement{constructor(){super(...arguments),this.appearance="default",this.icon="",this.selectedIcon="",this.disabled=!1,this.flipIconInRtl=!1,this.href=void 0,this.target=void 0,this.ariaLabelSelected=void 0,this.toggle=!1,this.selected=!1,this.type="submit",this.name=void 0,this.value=void 0,this.label=void 0,this.filledIcon=!1}render(){var t=this.label||this.ariaLabel;let e=literal`md-icon-button`;return"outlined"===this.appearance?e=literal`md-outlined-icon-button`:"filled"===this.appearance?e=literal`md-filled-icon-button`:"filled-tonal"===this.appearance&&(e=literal`md-filled-tonal-icon-button`),html$1`<${e}
|
|
2
2
|
class="button"
|
|
3
3
|
?disabled=${this.disabled}
|
|
4
4
|
?flip-icon-in-rtl=${this.flipIconInRtl}
|
|
@@ -11,9 +11,9 @@ import{LitElement,nothing,html as html$1,css}from"lit";import{__decorate}from"ts
|
|
|
11
11
|
type=${this.type}
|
|
12
12
|
name=${ifDefined(this.name)}
|
|
13
13
|
value=${ifDefined(this.value)}
|
|
14
|
-
>${this.icon?html
|
|
14
|
+
>${this.icon?html`<ix-icon ?filled=${this.filledIcon}>${this.icon}</ix-icon>`:html`<slot name="default"></slot
|
|
15
15
|
><slot name="selected" slot="selected"></slot>`}
|
|
16
|
-
${this.selectedIcon?html
|
|
16
|
+
${this.selectedIcon?html`<ix-icon ?filled=${this.filledIcon} slot="selected"
|
|
17
17
|
>${this.selectedIcon}</ix-icon
|
|
18
18
|
>`:nothing}
|
|
19
19
|
</${e}>`}}__decorate([query(".button")],IxIconButton.prototype,"component",void 0),__decorate([property()],IxIconButton.prototype,"appearance",void 0),__decorate([property()],IxIconButton.prototype,"icon",void 0),__decorate([property()],IxIconButton.prototype,"selectedIcon",void 0),__decorate([property({type:Boolean,reflect:!0})],IxIconButton.prototype,"disabled",void 0),__decorate([property({type:Boolean,attribute:"flip-icon-in-rtl"})],IxIconButton.prototype,"flipIconInRtl",void 0),__decorate([property()],IxIconButton.prototype,"href",void 0),__decorate([property()],IxIconButton.prototype,"target",void 0),__decorate([property({attribute:"aria-label-selected"})],IxIconButton.prototype,"ariaLabelSelected",void 0),__decorate([property({type:Boolean})],IxIconButton.prototype,"toggle",void 0),__decorate([property({type:Boolean,reflect:!0})],IxIconButton.prototype,"selected",void 0),__decorate([property()],IxIconButton.prototype,"type",void 0),__decorate([property()],IxIconButton.prototype,"name",void 0),__decorate([property()],IxIconButton.prototype,"value",void 0),__decorate([property()],IxIconButton.prototype,"label",void 0),__decorate([property({type:Boolean})],IxIconButton.prototype,"filledIcon",void 0);class IxIconButtonStyled extends IxIconButton{}IxIconButtonStyled.styles=css`:host{display:flex;--md-icon-button-state-layer-height:calc(
|
|
@@ -24,4 +24,4 @@ import{LitElement,nothing,html as html$1,css}from"lit";import{__decorate}from"ts
|
|
|
24
24
|
var(--md-icon-button-icon-size) * 1.2
|
|
25
25
|
);--md-icon-button-state-layer-width:calc(
|
|
26
26
|
var(--md-icon-button-icon-size) * 1.2
|
|
27
|
-
)}:host(.cancel){--md-sys-color-on-surface-variant:var(--ix-button-cancel-color)}`,
|
|
27
|
+
)}:host(.cancel){--md-sys-color-on-surface-variant:var(--ix-button-cancel-color)}`,customElements.define("ix-icon-button",IxIconButtonStyled);export{IxIconButtonStyled};
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Webcomponent ix-icon-button following open-wc recommendations",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Digital Realty",
|
|
6
|
-
"version": "1.1.
|
|
6
|
+
"version": "1.1.8",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"module": "dist/index.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"test:watch": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wtr --watch\""
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@digital-realty/ix-icon": "^1.1.
|
|
30
|
+
"@digital-realty/ix-icon": "^1.1.8",
|
|
31
31
|
"@lit/react": "^1.0.2",
|
|
32
32
|
"@material/web": "1.2.0",
|
|
33
33
|
"lit": "^3.2.1",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"@open-wc/testing": "^3.1.6",
|
|
40
40
|
"@typescript-eslint/eslint-plugin": "^5.48.0",
|
|
41
41
|
"@typescript-eslint/parser": "^5.48.0",
|
|
42
|
-
"@web/dev-server": "^0.
|
|
43
|
-
"@web/test-runner": "^0.
|
|
42
|
+
"@web/dev-server": "^0.4.6",
|
|
43
|
+
"@web/test-runner": "^0.20.2",
|
|
44
44
|
"concurrently": "^9.1.0",
|
|
45
45
|
"eslint": "^8.31.0",
|
|
46
46
|
"eslint-config-prettier": "^8.3.0",
|
|
@@ -103,5 +103,5 @@
|
|
|
103
103
|
"README.md",
|
|
104
104
|
"LICENSE"
|
|
105
105
|
],
|
|
106
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "efb86e89e9bfdb5a9a797dd223331ad6455b692c"
|
|
107
107
|
}
|