@digital-realty/ix-field 1.0.5 → 1.0.7-alpha.0
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/IxField.d.ts +30 -30
- package/dist/IxField.js +91 -91
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/ix-field.d.ts +1 -1
- package/dist/ix-field.js +2 -2
- package/dist/react/IxField.d.ts +2 -2
- package/dist/react/IxField.js +9 -9
- package/package.json +2 -2
package/dist/IxField.d.ts
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import '@material/web/field/filled-field.js';
|
|
2
|
-
import '@material/web/field/outlined-field.js';
|
|
3
|
-
import { LitElement } from 'lit';
|
|
4
|
-
export declare class IxField extends LitElement {
|
|
5
|
-
static styles: import("lit").CSSResult;
|
|
6
|
-
filled: boolean;
|
|
7
|
-
disabled: boolean;
|
|
8
|
-
error: boolean;
|
|
9
|
-
focused: boolean;
|
|
10
|
-
label: string;
|
|
11
|
-
populated: boolean;
|
|
12
|
-
required: boolean;
|
|
13
|
-
resizable: boolean;
|
|
14
|
-
supportingText: string;
|
|
15
|
-
errorText: string;
|
|
16
|
-
count: number;
|
|
17
|
-
max: number;
|
|
18
|
-
/**
|
|
19
|
-
* Whether or not the field has leading content.
|
|
20
|
-
*/
|
|
21
|
-
hasStart: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Whether or not the field has trailing content.
|
|
24
|
-
*/
|
|
25
|
-
hasEnd: boolean;
|
|
26
|
-
private input;
|
|
27
|
-
connectedCallback(): void;
|
|
28
|
-
private handleSlotInput;
|
|
29
|
-
protected render(): import("lit").TemplateResult<1 | 2>;
|
|
30
|
-
}
|
|
1
|
+
import '@material/web/field/filled-field.js';
|
|
2
|
+
import '@material/web/field/outlined-field.js';
|
|
3
|
+
import { LitElement } from 'lit';
|
|
4
|
+
export declare class IxField extends LitElement {
|
|
5
|
+
static styles: import("lit").CSSResult;
|
|
6
|
+
filled: boolean;
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
error: boolean;
|
|
9
|
+
focused: boolean;
|
|
10
|
+
label: string;
|
|
11
|
+
populated: boolean;
|
|
12
|
+
required: boolean;
|
|
13
|
+
resizable: boolean;
|
|
14
|
+
supportingText: string;
|
|
15
|
+
errorText: string;
|
|
16
|
+
count: number;
|
|
17
|
+
max: number;
|
|
18
|
+
/**
|
|
19
|
+
* Whether or not the field has leading content.
|
|
20
|
+
*/
|
|
21
|
+
hasStart: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Whether or not the field has trailing content.
|
|
24
|
+
*/
|
|
25
|
+
hasEnd: boolean;
|
|
26
|
+
private input;
|
|
27
|
+
connectedCallback(): void;
|
|
28
|
+
private handleSlotInput;
|
|
29
|
+
protected render(): import("lit").TemplateResult<1 | 2>;
|
|
30
|
+
}
|
package/dist/IxField.js
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import '@material/web/field/filled-field.js';
|
|
3
|
-
import '@material/web/field/outlined-field.js';
|
|
4
|
-
import { LitElement, css } from 'lit';
|
|
5
|
-
import { property } from 'lit/decorators.js';
|
|
6
|
-
import { literal, html as staticHtml } from 'lit/static-html.js';
|
|
7
|
-
export class IxField extends LitElement {
|
|
8
|
-
constructor() {
|
|
9
|
-
super(...arguments);
|
|
10
|
-
this.filled = false;
|
|
11
|
-
this.disabled = false;
|
|
12
|
-
this.error = false;
|
|
13
|
-
this.focused = false;
|
|
14
|
-
this.label = '';
|
|
15
|
-
this.populated = false;
|
|
16
|
-
this.required = false;
|
|
17
|
-
this.resizable = false;
|
|
18
|
-
this.supportingText = '';
|
|
19
|
-
this.errorText = '';
|
|
20
|
-
this.count = -1;
|
|
21
|
-
this.max = -1;
|
|
22
|
-
/**
|
|
23
|
-
* Whether or not the field has leading content.
|
|
24
|
-
*/
|
|
25
|
-
this.hasStart = false;
|
|
26
|
-
/**
|
|
27
|
-
* Whether or not the field has trailing content.
|
|
28
|
-
*/
|
|
29
|
-
this.hasEnd = false;
|
|
30
|
-
this.input = null;
|
|
31
|
-
}
|
|
32
|
-
connectedCallback() {
|
|
33
|
-
super.connectedCallback();
|
|
34
|
-
this.input = this.querySelector('input, textarea');
|
|
35
|
-
this.handleSlotInput();
|
|
36
|
-
}
|
|
37
|
-
handleSlotInput() {
|
|
38
|
-
var _a, _b;
|
|
39
|
-
const length = (_b = (_a = this.input) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.length;
|
|
40
|
-
this.count = length !== undefined ? length : this.count;
|
|
41
|
-
}
|
|
42
|
-
render() {
|
|
43
|
-
const tag = this.filled
|
|
44
|
-
? literal `md-filled-field`
|
|
45
|
-
: literal `md-outlined-field`;
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import '@material/web/field/filled-field.js';
|
|
3
|
+
import '@material/web/field/outlined-field.js';
|
|
4
|
+
import { LitElement, css } from 'lit';
|
|
5
|
+
import { property } from 'lit/decorators.js';
|
|
6
|
+
import { literal, html as staticHtml } from 'lit/static-html.js';
|
|
7
|
+
export class IxField extends LitElement {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
this.filled = false;
|
|
11
|
+
this.disabled = false;
|
|
12
|
+
this.error = false;
|
|
13
|
+
this.focused = false;
|
|
14
|
+
this.label = '';
|
|
15
|
+
this.populated = false;
|
|
16
|
+
this.required = false;
|
|
17
|
+
this.resizable = false;
|
|
18
|
+
this.supportingText = '';
|
|
19
|
+
this.errorText = '';
|
|
20
|
+
this.count = -1;
|
|
21
|
+
this.max = -1;
|
|
22
|
+
/**
|
|
23
|
+
* Whether or not the field has leading content.
|
|
24
|
+
*/
|
|
25
|
+
this.hasStart = false;
|
|
26
|
+
/**
|
|
27
|
+
* Whether or not the field has trailing content.
|
|
28
|
+
*/
|
|
29
|
+
this.hasEnd = false;
|
|
30
|
+
this.input = null;
|
|
31
|
+
}
|
|
32
|
+
connectedCallback() {
|
|
33
|
+
super.connectedCallback();
|
|
34
|
+
this.input = this.querySelector('input, textarea');
|
|
35
|
+
this.handleSlotInput();
|
|
36
|
+
}
|
|
37
|
+
handleSlotInput() {
|
|
38
|
+
var _a, _b;
|
|
39
|
+
const length = (_b = (_a = this.input) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.length;
|
|
40
|
+
this.count = length !== undefined ? length : this.count;
|
|
41
|
+
}
|
|
42
|
+
render() {
|
|
43
|
+
const tag = this.filled
|
|
44
|
+
? literal `md-filled-field`
|
|
45
|
+
: literal `md-outlined-field`;
|
|
46
46
|
return staticHtml `<${tag}
|
|
47
47
|
?disabled=${this.disabled}
|
|
48
48
|
?error=${this.error}
|
|
@@ -65,54 +65,54 @@ export class IxField extends LitElement {
|
|
|
65
65
|
></slot>
|
|
66
66
|
<slot name="end" slot="end"></slot>
|
|
67
67
|
<slot name="aria-describedby" slot="aria-describedby"></slot>
|
|
68
|
-
</${tag}>`;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
68
|
+
</${tag}>`;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
71
|
IxField.styles = css `
|
|
72
72
|
.field {
|
|
73
73
|
display: block;
|
|
74
74
|
}
|
|
75
|
-
`;
|
|
76
|
-
__decorate([
|
|
77
|
-
property({ type: Boolean })
|
|
78
|
-
], IxField.prototype, "filled", void 0);
|
|
79
|
-
__decorate([
|
|
80
|
-
property({ type: Boolean, reflect: true })
|
|
81
|
-
], IxField.prototype, "disabled", void 0);
|
|
82
|
-
__decorate([
|
|
83
|
-
property({ type: Boolean })
|
|
84
|
-
], IxField.prototype, "error", void 0);
|
|
85
|
-
__decorate([
|
|
86
|
-
property({ type: Boolean })
|
|
87
|
-
], IxField.prototype, "focused", void 0);
|
|
88
|
-
__decorate([
|
|
89
|
-
property()
|
|
90
|
-
], IxField.prototype, "label", void 0);
|
|
91
|
-
__decorate([
|
|
92
|
-
property({ type: Boolean })
|
|
93
|
-
], IxField.prototype, "populated", void 0);
|
|
94
|
-
__decorate([
|
|
95
|
-
property({ type: Boolean })
|
|
96
|
-
], IxField.prototype, "required", void 0);
|
|
97
|
-
__decorate([
|
|
98
|
-
property({ type: Boolean })
|
|
99
|
-
], IxField.prototype, "resizable", void 0);
|
|
100
|
-
__decorate([
|
|
101
|
-
property({ attribute: 'supporting-text' })
|
|
102
|
-
], IxField.prototype, "supportingText", void 0);
|
|
103
|
-
__decorate([
|
|
104
|
-
property({ attribute: 'error-text' })
|
|
105
|
-
], IxField.prototype, "errorText", void 0);
|
|
106
|
-
__decorate([
|
|
107
|
-
property({ type: Number })
|
|
108
|
-
], IxField.prototype, "count", void 0);
|
|
109
|
-
__decorate([
|
|
110
|
-
property({ type: Number })
|
|
111
|
-
], IxField.prototype, "max", void 0);
|
|
112
|
-
__decorate([
|
|
113
|
-
property({ type: Boolean, attribute: 'has-start' })
|
|
114
|
-
], IxField.prototype, "hasStart", void 0);
|
|
115
|
-
__decorate([
|
|
116
|
-
property({ type: Boolean, attribute: 'has-end' })
|
|
117
|
-
], IxField.prototype, "hasEnd", void 0);
|
|
75
|
+
`;
|
|
76
|
+
__decorate([
|
|
77
|
+
property({ type: Boolean })
|
|
78
|
+
], IxField.prototype, "filled", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
property({ type: Boolean, reflect: true })
|
|
81
|
+
], IxField.prototype, "disabled", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
property({ type: Boolean })
|
|
84
|
+
], IxField.prototype, "error", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
property({ type: Boolean })
|
|
87
|
+
], IxField.prototype, "focused", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
property()
|
|
90
|
+
], IxField.prototype, "label", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
property({ type: Boolean })
|
|
93
|
+
], IxField.prototype, "populated", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
property({ type: Boolean })
|
|
96
|
+
], IxField.prototype, "required", void 0);
|
|
97
|
+
__decorate([
|
|
98
|
+
property({ type: Boolean })
|
|
99
|
+
], IxField.prototype, "resizable", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
property({ attribute: 'supporting-text' })
|
|
102
|
+
], IxField.prototype, "supportingText", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
property({ attribute: 'error-text' })
|
|
105
|
+
], IxField.prototype, "errorText", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
property({ type: Number })
|
|
108
|
+
], IxField.prototype, "count", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
property({ type: Number })
|
|
111
|
+
], IxField.prototype, "max", void 0);
|
|
112
|
+
__decorate([
|
|
113
|
+
property({ type: Boolean, attribute: 'has-start' })
|
|
114
|
+
], IxField.prototype, "hasStart", void 0);
|
|
115
|
+
__decorate([
|
|
116
|
+
property({ type: Boolean, attribute: 'has-end' })
|
|
117
|
+
], IxField.prototype, "hasEnd", void 0);
|
|
118
118
|
//# sourceMappingURL=IxField.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { IxField } from './IxField.js';
|
|
1
|
+
export { IxField } from './IxField.js';
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { IxField } from './IxField.js';
|
|
1
|
+
export { IxField } from './IxField.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/ix-field.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
package/dist/ix-field.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { IxField } from './IxField.js';
|
|
2
|
-
customElements.define('ix-field', IxField);
|
|
1
|
+
import { IxField } from './IxField.js';
|
|
2
|
+
customElements.define('ix-field', IxField);
|
|
3
3
|
//# sourceMappingURL=ix-field.js.map
|
package/dist/react/IxField.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { IxField as LitComp } from '../IxField.js';
|
|
2
|
-
export declare const IxField: import("@lit/react").ReactWebComponent<LitComp, {}>;
|
|
1
|
+
import { IxField as LitComp } from '../IxField.js';
|
|
2
|
+
export declare const IxField: import("@lit/react").ReactWebComponent<LitComp, {}>;
|
package/dist/react/IxField.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { createComponent } from '@lit/react';
|
|
3
|
-
import { IxField as LitComp } from '../IxField.js';
|
|
4
|
-
customElements.define('ix-field', LitComp);
|
|
5
|
-
export const IxField = createComponent({
|
|
6
|
-
tagName: 'ix-field',
|
|
7
|
-
elementClass: LitComp,
|
|
8
|
-
react: React,
|
|
9
|
-
});
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { IxField as LitComp } from '../IxField.js';
|
|
4
|
+
customElements.define('ix-field', LitComp);
|
|
5
|
+
export const IxField = createComponent({
|
|
6
|
+
tagName: 'ix-field',
|
|
7
|
+
elementClass: LitComp,
|
|
8
|
+
react: React,
|
|
9
|
+
});
|
|
10
10
|
//# sourceMappingURL=IxField.js.map
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Webcomponent ix-field following open-wc recommendations",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Digital Realty",
|
|
6
|
-
"version": "1.0.
|
|
6
|
+
"version": "1.0.7-alpha.0",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"module": "dist/index.js",
|
|
@@ -99,5 +99,5 @@
|
|
|
99
99
|
"README.md",
|
|
100
100
|
"LICENSE"
|
|
101
101
|
],
|
|
102
|
-
"gitHead": "
|
|
102
|
+
"gitHead": "020de6dab25bbe6058e9a71b2c56681822403481"
|
|
103
103
|
}
|