@digital-realty/ix-textbox 2.1.34 → 2.1.35

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,47 @@
1
+ import{LitElement,html,nothing,css}from"lit";import{__decorate}from"tslib";import{literal,html as html$1}from"lit/static-html.js";import{query,property}from"lit/decorators.js";import"@material/web/textfield/filled-text-field.js";import"@material/web/textfield/outlined-text-field.js";import"@digital-realty/ix-icon/ix-icon.js";import"@digital-realty/ix-phone-input/ix-phone-input.js";class IxTextbox extends LitElement{constructor(){super(...arguments),this.filled=!1,this.disabled=!1,this.error=!1,this.errorText="",this.label="",this.required=!1,this.value="",this.name="",this.prefixText="",this.suffixText="",this.leadingIcon="",this.trailingIcon="",this.supportingText="",this.textDirection="",this.rows=2,this.inputMode="",this.max="",this.maxLength=-1,this.min="",this.minLength=-1,this.pattern="",this.placeholder="",this.readOnly=!1,this.multiple=!1,this.step="",this.type="text",this.autocomplete=""}focus(){this.component.focus()}createRenderRoot(){return this}render(){var t;return"tel"===this.type?html`<ix-phone-input
2
+ class="textfield"
3
+ ?disabled=${this.disabled}
4
+ ?required=${this.required}
5
+ ?error=${this.error}
6
+ error-text=${this.errorText}
7
+ supporting-text=${this.supportingText}
8
+ type=${this.type}
9
+ label=${this.label}
10
+ name=${this.name}
11
+ value=${this.value}
12
+ ></ix-phone-input>`:(t=this.filled?literal`md-filled-text-field`:literal`md-outlined-text-field`,html$1`
13
+ <${t}
14
+ class="textfield"
15
+ ?disabled=${this.disabled}
16
+ ?required=${this.required}
17
+ ?error=${this.error}
18
+ ?multipule=${this.multiple}
19
+ ?readOnly=${this.readOnly}
20
+ ?has-leading-icon=${0<this.leadingIcon.length}
21
+ ?has-trailing-icon=${0<this.trailingIcon.length}
22
+ step=${this.step||nothing}
23
+ autocomplete=${this.autocomplete||nothing}
24
+ error-text=${this.errorText}
25
+ placeholder=${this.placeholder}
26
+ text-direction=${this.textDirection}
27
+ rows=${this.rows}
28
+ max=${this.max}
29
+ maxLength=${this.maxLength}
30
+ min=${this.min}
31
+ minLength=${this.minLength}
32
+ pattern=${this.pattern}
33
+ prefix-text=${this.prefixText}
34
+ suffix-text=${this.suffixText}
35
+ supporting-text=${this.supportingText}
36
+ inputMode=${this.inputMode}
37
+ type=${this.type}
38
+ label=${this.label}
39
+ name=${this.name}
40
+ value=${this.value}
41
+ >
42
+ ${this.leadingIcon?html`<ix-icon slot="leading-icon">${this.leadingIcon}</ix-icon>`:nothing}
43
+ ${this.trailingIcon?html`<ix-icon slot="trailing-icon"
44
+ >${this.trailingIcon}</ix-icon
45
+ >`:nothing}
46
+ </${t}>
47
+ `)}}__decorate([query(".textfield")],IxTextbox.prototype,"component",void 0),__decorate([property({type:Boolean,reflect:!0})],IxTextbox.prototype,"filled",void 0),__decorate([property({type:Boolean,reflect:!0})],IxTextbox.prototype,"disabled",void 0),__decorate([property({type:Boolean,reflect:!0})],IxTextbox.prototype,"error",void 0),__decorate([property({attribute:"error-text"})],IxTextbox.prototype,"errorText",void 0),__decorate([property()],IxTextbox.prototype,"label",void 0),__decorate([property({type:Boolean,reflect:!0})],IxTextbox.prototype,"required",void 0),__decorate([property()],IxTextbox.prototype,"value",void 0),__decorate([property()],IxTextbox.prototype,"name",void 0),__decorate([property({attribute:"prefix-text"})],IxTextbox.prototype,"prefixText",void 0),__decorate([property({attribute:"suffix-text"})],IxTextbox.prototype,"suffixText",void 0),__decorate([property({attribute:"leading-icon"})],IxTextbox.prototype,"leadingIcon",void 0),__decorate([property({attribute:"trailing-icon"})],IxTextbox.prototype,"trailingIcon",void 0),__decorate([property({attribute:"supporting-text"})],IxTextbox.prototype,"supportingText",void 0),__decorate([property({attribute:"text-direction"})],IxTextbox.prototype,"textDirection",void 0),__decorate([property({type:Number})],IxTextbox.prototype,"rows",void 0),__decorate([property({reflect:!0})],IxTextbox.prototype,"inputMode",void 0),__decorate([property()],IxTextbox.prototype,"max",void 0),__decorate([property({type:Number})],IxTextbox.prototype,"maxLength",void 0),__decorate([property()],IxTextbox.prototype,"min",void 0),__decorate([property({type:Number})],IxTextbox.prototype,"minLength",void 0),__decorate([property()],IxTextbox.prototype,"pattern",void 0),__decorate([property({reflect:!0})],IxTextbox.prototype,"placeholder",void 0),__decorate([property({type:Boolean,reflect:!0})],IxTextbox.prototype,"readOnly",void 0),__decorate([property({type:Boolean,reflect:!0})],IxTextbox.prototype,"multiple",void 0),__decorate([property()],IxTextbox.prototype,"step",void 0),__decorate([property({reflect:!0})],IxTextbox.prototype,"type",void 0),__decorate([property({reflect:!0})],IxTextbox.prototype,"autocomplete",void 0);class IxTextboxStyled extends IxTextbox{}IxTextboxStyled.styles=css`:host{display:block}.textfield{display:block}`,window.customElements.define("ix-textbox",IxTextboxStyled);export{IxTextboxStyled};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital-realty/ix-textbox",
3
- "version": "2.1.34",
3
+ "version": "2.1.35",
4
4
  "description": "Webcomponent ix-textbox following open-wc recommendations",
5
5
  "license": "MIT",
6
6
  "author": "Digital Realty",
@@ -10,6 +10,7 @@
10
10
  "exports": {
11
11
  ".": "./dist/index.js",
12
12
  "./ix-textbox.js": "./dist/ix-textbox.js",
13
+ "./ix-textbox.min.js": "./dist/ix-textbox.min.js",
13
14
  "./IxTextbox": "./dist/react/IxTextbox.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,8 +27,8 @@
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-phone-input": "^2.1.31",
30
+ "@digital-realty/ix-icon": "^1.0.36",
31
+ "@digital-realty/ix-phone-input": "^2.1.32",
31
32
  "@lit/react": "^1.0.2",
32
33
  "@material/web": "1.2.0",
33
34
  "lit": "^2.7.6",
@@ -49,6 +50,9 @@
49
50
  "husky": "^4.3.8",
50
51
  "lint-staged": "^10.5.4",
51
52
  "prettier": "^2.4.1",
53
+ "rollup-plugin-minify-html-literals": "^1.2.6",
54
+ "rollup-plugin-summary": "^2.0.0",
55
+ "rollup-plugin-uglify": "^6.0.4",
52
56
  "sinon": "^16.1.3",
53
57
  "tslib": "^2.3.1",
54
58
  "typescript": "^4.5.2"
@@ -107,5 +111,5 @@
107
111
  "README.md",
108
112
  "LICENSE"
109
113
  ],
110
- "gitHead": "19a1d3e8e78026eb3ba9747e8338d1061bc2c5aa"
114
+ "gitHead": "c7668fda980293ca038c0dd061ebe350fa88ee60"
111
115
  }