@fluid-topics/ft-text-area 1.0.44 → 1.0.45
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/build/ft-text-area.d.ts
CHANGED
|
@@ -14,8 +14,8 @@ export declare class FtTextArea extends FtLitElement implements FtTextAreaProper
|
|
|
14
14
|
private textarea?;
|
|
15
15
|
private focused;
|
|
16
16
|
protected render(): import("lit-html").TemplateResult<1>;
|
|
17
|
+
setValue(value: string, sendEvents?: boolean): void;
|
|
17
18
|
protected contentAvailableCallback(props: PropertyValues): void;
|
|
18
|
-
protected updated(props: PropertyValues): void;
|
|
19
19
|
private onKeyDown;
|
|
20
20
|
private updateValueFromInputField;
|
|
21
21
|
private liveUpdateValueFromInputField;
|
package/build/ft-text-area.js
CHANGED
|
@@ -40,6 +40,7 @@ class FtTextArea extends FtLitElement {
|
|
|
40
40
|
.ft-text-area--main-panel {
|
|
41
41
|
height: calc(4 * ${FtTextAreaCssVariables.verticalSpacing} + ${FtTextAreaCssVariables.labelSize} + ${FtTextAreaCssVariables.fontSize} + ${this.height}px);
|
|
42
42
|
}
|
|
43
|
+
|
|
43
44
|
ft-resizer {
|
|
44
45
|
right: ${this.textarea != null ? this.textarea.offsetWidth - this.textarea.clientWidth : 0}px;
|
|
45
46
|
}
|
|
@@ -78,16 +79,17 @@ class FtTextArea extends FtLitElement {
|
|
|
78
79
|
</div>
|
|
79
80
|
`;
|
|
80
81
|
}
|
|
82
|
+
setValue(value, sendEvents = false) {
|
|
83
|
+
this.value = value;
|
|
84
|
+
if (sendEvents) {
|
|
85
|
+
this.dispatchEvent(new CustomEvent("live-change", { detail: this.value }));
|
|
86
|
+
this.dispatchEvent(new CustomEvent("change", { detail: this.value }));
|
|
87
|
+
}
|
|
88
|
+
}
|
|
81
89
|
contentAvailableCallback(props) {
|
|
82
90
|
super.contentAvailableCallback(props);
|
|
83
91
|
this.requestUpdate();
|
|
84
92
|
}
|
|
85
|
-
updated(props) {
|
|
86
|
-
super.updated(props);
|
|
87
|
-
if (props.has("value")) {
|
|
88
|
-
this.dispatchEvent(new CustomEvent("live-change", { detail: this.value }));
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
93
|
onKeyDown(e) {
|
|
92
94
|
if (e.key === "Enter" || e.key === " ") {
|
|
93
95
|
e.stopPropagation();
|
|
@@ -99,6 +101,7 @@ class FtTextArea extends FtLitElement {
|
|
|
99
101
|
liveUpdateValueFromInputField() {
|
|
100
102
|
var _a;
|
|
101
103
|
this.value = ((_a = this.textarea) === null || _a === void 0 ? void 0 : _a.value) || "";
|
|
104
|
+
this.dispatchEvent(new CustomEvent("live-change", { detail: this.value }));
|
|
102
105
|
}
|
|
103
106
|
onResize(event) {
|
|
104
107
|
if (event.detail.height >= 50) {
|
|
@@ -537,6 +537,7 @@ const H=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
537
537
|
.ft-text-area--main-panel {
|
|
538
538
|
height: calc(4 * ${Fe.verticalSpacing} + ${Fe.labelSize} + ${Fe.fontSize} + ${this.height}px);
|
|
539
539
|
}
|
|
540
|
+
|
|
540
541
|
ft-resizer {
|
|
541
542
|
right: ${null!=this.textarea?this.textarea.offsetWidth-this.textarea.clientWidth:0}px;
|
|
542
543
|
}
|
|
@@ -573,4 +574,4 @@ const H=Symbol.for(""),K=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
573
574
|
${this.helper}
|
|
574
575
|
</ft-typography>`:void 0}
|
|
575
576
|
</div>
|
|
576
|
-
`}
|
|
577
|
+
`}setValue(t,e=!1){this.value=t,e&&(this.dispatchEvent(new CustomEvent("live-change",{detail:this.value})),this.dispatchEvent(new CustomEvent("change",{detail:this.value})))}contentAvailableCallback(t){super.contentAvailableCallback(t),this.requestUpdate()}onKeyDown(t){"Enter"!==t.key&&" "!==t.key||t.stopPropagation()}updateValueFromInputField(){this.dispatchEvent(new CustomEvent("change",{detail:this.value}))}liveUpdateValueFromInputField(){var t;this.value=(null===(t=this.textarea)||void 0===t?void 0:t.value)||"",this.dispatchEvent(new CustomEvent("live-change",{detail:this.value}))}onResize(t){t.detail.height>=50&&(this.height=t.detail.height)}}We.elementDefinitions={"ft-input-label":je,"ft-resizer":ze,"ft-ripple":Ue,"ft-typography":ae},We.styles=[Jt,Re],Te([o.property({type:String})],We.prototype,"label",void 0),Te([o.property({reflect:!0})],We.prototype,"value",void 0),Te([o.property({type:String})],We.prototype,"helper",void 0),Te([o.property({type:Boolean})],We.prototype,"outlined",void 0),Te([o.property({type:Boolean})],We.prototype,"disabled",void 0),Te([o.property({type:Boolean})],We.prototype,"error",void 0),Te([o.property({type:Number,reflect:!0})],We.prototype,"height",void 0),Te([o.query("textarea")],We.prototype,"textarea",void 0),Te([o.state()],We.prototype,"focused",void 0),e.customElement("ft-text-area")(We),t.FtTextArea=We,t.FtTextAreaCssVariables=Fe,t.styles=Re}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
|
|
@@ -644,6 +644,7 @@ class Xe extends zt{constructor(t){if(super(t),this.et=q,t.type!==Ct)throw Error
|
|
|
644
644
|
.ft-text-area--main-panel {
|
|
645
645
|
height: calc(4 * ${zi.verticalSpacing} + ${zi.labelSize} + ${zi.fontSize} + ${this.height}px);
|
|
646
646
|
}
|
|
647
|
+
|
|
647
648
|
ft-resizer {
|
|
648
649
|
right: ${null!=this.textarea?this.textarea.offsetWidth-this.textarea.clientWidth:0}px;
|
|
649
650
|
}
|
|
@@ -680,4 +681,4 @@ class Xe extends zt{constructor(t){if(super(t),this.et=q,t.type!==Ct)throw Error
|
|
|
680
681
|
${this.helper}
|
|
681
682
|
</ft-typography>`:void 0}
|
|
682
683
|
</div>
|
|
683
|
-
`}
|
|
684
|
+
`}setValue(t,e=!1){this.value=t,e&&(this.dispatchEvent(new CustomEvent("live-change",{detail:this.value})),this.dispatchEvent(new CustomEvent("change",{detail:this.value})))}contentAvailableCallback(t){super.contentAvailableCallback(t),this.requestUpdate()}onKeyDown(t){"Enter"!==t.key&&" "!==t.key||t.stopPropagation()}updateValueFromInputField(){this.dispatchEvent(new CustomEvent("change",{detail:this.value}))}liveUpdateValueFromInputField(){var t;this.value=(null===(t=this.textarea)||void 0===t?void 0:t.value)||"",this.dispatchEvent(new CustomEvent("live-change",{detail:this.value}))}onResize(t){t.detail.height>=50&&(this.height=t.detail.height)}}ji.elementDefinitions={"ft-input-label":vi,"ft-resizer":ui,"ft-ripple":Ri,"ft-typography":qe},ji.styles=[Te,Mi],Ui([o({type:String})],ji.prototype,"label",void 0),Ui([o({reflect:!0})],ji.prototype,"value",void 0),Ui([o({type:String})],ji.prototype,"helper",void 0),Ui([o({type:Boolean})],ji.prototype,"outlined",void 0),Ui([o({type:Boolean})],ji.prototype,"disabled",void 0),Ui([o({type:Boolean})],ji.prototype,"error",void 0),Ui([o({type:Number,reflect:!0})],ji.prototype,"height",void 0),Ui([s("textarea")],ji.prototype,"textarea",void 0),Ui([r()],ji.prototype,"focused",void 0),l("ft-text-area")(ji),t.FtTextArea=ji,t.FtTextAreaCssVariables=zi,t.styles=Mi}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-text-area",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.45",
|
|
4
4
|
"description": "A fluidtopics text field",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-resizer": "1.0.
|
|
23
|
-
"@fluid-topics/ft-ripple": "1.0.
|
|
24
|
-
"@fluid-topics/ft-wc-utils": "1.0.
|
|
22
|
+
"@fluid-topics/ft-resizer": "1.0.45",
|
|
23
|
+
"@fluid-topics/ft-ripple": "1.0.45",
|
|
24
|
+
"@fluid-topics/ft-wc-utils": "1.0.45",
|
|
25
25
|
"lit": "2.7.2"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "65789e7f65d22cc6e08cb431f8d24a036309321e"
|
|
28
28
|
}
|