@digital-realty/ix-icon-button 1.0.35 → 1.0.37

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.
@@ -0,0 +1,19 @@
1
+ import{__decorate}from"tslib";import{LitElement,nothing,html as html$1}from"lit";import{query,property}from"lit/decorators.js";import{literal,html}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`<${e}
2
+ class="button"
3
+ ?disabled=${this.disabled}
4
+ ?flip-icon-in-rtl=${this.flipIconInRtl}
5
+ href=${ifDefined(this.href)}
6
+ target=${ifDefined(this.target)}
7
+ aria-label-selected=${ifDefined(this.ariaLabelSelected)}
8
+ aria-label=${t||nothing}
9
+ ?toggle=${this.toggle}
10
+ ?selected=${this.selected}
11
+ type=${this.type}
12
+ name=${ifDefined(this.name)}
13
+ value=${ifDefined(this.value)}
14
+ >${this.icon?html$1`<ix-icon ?filled=${this.filledIcon}>${this.icon}</ix-icon>`:html$1`<slot name="default"></slot
15
+ ><slot name="selected" slot="selected"></slot>`}
16
+ ${this.selectedIcon?html$1`<ix-icon ?filled=${this.filledIcon} slot="selected"
17
+ >${this.selectedIcon}</ix-icon
18
+ >`:nothing}
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),window.customElements.define("ix-icon-button",IxIconButton);
package/package.json CHANGED
@@ -3,13 +3,14 @@
3
3
  "description": "Webcomponent ix-icon-button following open-wc recommendations",
4
4
  "license": "MIT",
5
5
  "author": "Digital Realty",
6
- "version": "1.0.35",
6
+ "version": "1.0.37",
7
7
  "type": "module",
8
8
  "main": "dist/index.js",
9
9
  "module": "dist/index.js",
10
10
  "exports": {
11
11
  ".": "./dist/index.js",
12
12
  "./ix-icon-button.js": "./dist/ix-icon-button.js",
13
+ "./ix-icon-button.min.js": "./dist/ix-icon-button.min.js",
13
14
  "./IxIconButton": "./dist/react/IxIconButton.js"
14
15
  },
15
16
  "publishConfig": {
@@ -18,7 +19,7 @@
18
19
  "scripts": {
19
20
  "analyze": "cem analyze --litelement",
20
21
  "start": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wds\"",
21
- "build": "tsc && npm run analyze -- --exclude dist",
22
+ "build": "tsc && npm run analyze -- --exclude dist && rollup -c",
22
23
  "prepublish": "tsc && npm run analyze -- --exclude dist",
23
24
  "lint": "eslint --ext .ts,.html . --ignore-path .gitignore && prettier \"**/*.ts\" --check --ignore-path .gitignore",
24
25
  "format": "eslint --ext .ts,.html . --fix --ignore-path .gitignore && prettier \"**/*.ts\" --write --ignore-path .gitignore",
@@ -26,7 +27,7 @@
26
27
  "test:watch": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wtr --watch\""
27
28
  },
28
29
  "dependencies": {
29
- "@digital-realty/ix-icon": "^1.0.35",
30
+ "@digital-realty/ix-icon": "^1.0.36",
30
31
  "@lit/react": "^1.0.2",
31
32
  "@material/web": "1.2.0",
32
33
  "lit": "^2.0.2",
@@ -34,7 +35,7 @@
34
35
  },
35
36
  "devDependencies": {
36
37
  "@custom-elements-manifest/analyzer": "^0.4.17",
37
- "@digital-realty/theme": "^1.0.26",
38
+ "@digital-realty/theme": "^1.0.27",
38
39
  "@open-wc/eslint-config": "^9.2.1",
39
40
  "@open-wc/testing": "^3.1.6",
40
41
  "@typescript-eslint/eslint-plugin": "^5.48.0",
@@ -47,6 +48,9 @@
47
48
  "husky": "^4.3.8",
48
49
  "lint-staged": "^10.5.4",
49
50
  "prettier": "^2.4.1",
51
+ "rollup-plugin-minify-html-literals": "^1.2.6",
52
+ "rollup-plugin-summary": "^2.0.0",
53
+ "rollup-plugin-uglify": "^6.0.4",
50
54
  "tslib": "^2.3.1",
51
55
  "typescript": "^4.5.2"
52
56
  },
@@ -99,5 +103,5 @@
99
103
  "README.md",
100
104
  "LICENSE"
101
105
  ],
102
- "gitHead": "dced04ebef5c8342344b1fd3df33b5e22a78725f"
106
+ "gitHead": "c7668fda980293ca038c0dd061ebe350fa88ee60"
103
107
  }