@justeattakeaway/pie-textarea 0.10.0 → 0.10.2
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/index.js +132 -134
- package/dist/react.js +11 -19
- package/package.json +4 -4
- package/src/defs-react.ts +1 -1
- package/src/react.ts +2 -2
package/dist/index.js
CHANGED
|
@@ -1,103 +1,102 @@
|
|
|
1
|
-
import { LitElement as
|
|
2
|
-
import { property as l, query as
|
|
3
|
-
import { classMap as
|
|
4
|
-
import { ifDefined as
|
|
5
|
-
import { live as
|
|
1
|
+
import { LitElement as M, html as E, nothing as V, unsafeCSS as P } from "lit";
|
|
2
|
+
import { property as l, query as D } from "lit/decorators.js";
|
|
3
|
+
import { classMap as G } from "lit/directives/class-map.js";
|
|
4
|
+
import { ifDefined as m } from "lit/directives/if-defined.js";
|
|
5
|
+
import { live as H } from "lit/directives/live.js";
|
|
6
6
|
import "@justeattakeaway/pie-assistive-text";
|
|
7
7
|
import "@justeattakeaway/pie-form-label";
|
|
8
|
-
import { FormControlMixin as
|
|
8
|
+
import { FormControlMixin as U, RtlMixin as X, wrapNativeEvent as J, validPropertyValues as C, defineCustomElement as Q } from "@justeattakeaway/pie-webc-core";
|
|
9
9
|
var T = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
10
|
-
function
|
|
10
|
+
function Y(t) {
|
|
11
11
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
12
12
|
}
|
|
13
|
-
var
|
|
14
|
-
return
|
|
13
|
+
var N = "Expected a function", q = NaN, Z = "[object Symbol]", ee = /^\s+|\s+$/g, te = /^[-+]0x[0-9a-f]+$/i, ae = /^0b[01]+$/i, re = /^0o[0-7]+$/i, ie = parseInt, oe = typeof T == "object" && T && T.Object === Object && T, ne = typeof self == "object" && self && self.Object === Object && self, se = oe || ne || Function("return this")(), le = Object.prototype, de = le.toString, ce = Math.max, ue = Math.min, j = function() {
|
|
14
|
+
return se.Date.now();
|
|
15
15
|
};
|
|
16
|
-
function
|
|
17
|
-
var
|
|
16
|
+
function he(t, e, a) {
|
|
17
|
+
var s, o, h, u, d, p, x = 0, k = !1, v = !1, y = !0;
|
|
18
18
|
if (typeof t != "function")
|
|
19
|
-
throw new TypeError(
|
|
20
|
-
e =
|
|
21
|
-
function g(
|
|
22
|
-
var
|
|
23
|
-
return
|
|
19
|
+
throw new TypeError(N);
|
|
20
|
+
e = B(e) || 0, S(a) && (k = !!a.leading, v = "maxWait" in a, h = v ? ce(B(a.maxWait) || 0, e) : h, y = "trailing" in a ? !!a.trailing : y);
|
|
21
|
+
function g(i) {
|
|
22
|
+
var f = s, z = o;
|
|
23
|
+
return s = o = void 0, x = i, u = t.apply(z, f), u;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
return
|
|
25
|
+
function L(i) {
|
|
26
|
+
return x = i, d = setTimeout($, e), k ? g(i) : u;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
var
|
|
30
|
-
return v ?
|
|
28
|
+
function W(i) {
|
|
29
|
+
var f = i - p, z = i - x, R = e - f;
|
|
30
|
+
return v ? ue(R, h - z) : R;
|
|
31
31
|
}
|
|
32
|
-
function
|
|
33
|
-
var
|
|
34
|
-
return
|
|
32
|
+
function O(i) {
|
|
33
|
+
var f = i - p, z = i - x;
|
|
34
|
+
return p === void 0 || f >= e || f < 0 || v && z >= h;
|
|
35
35
|
}
|
|
36
36
|
function $() {
|
|
37
|
-
var
|
|
38
|
-
if (
|
|
39
|
-
return
|
|
40
|
-
d = setTimeout($,
|
|
37
|
+
var i = j();
|
|
38
|
+
if (O(i))
|
|
39
|
+
return F(i);
|
|
40
|
+
d = setTimeout($, W(i));
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
return d = void 0, y &&
|
|
42
|
+
function F(i) {
|
|
43
|
+
return d = void 0, y && s ? g(i) : (s = o = void 0, u);
|
|
44
44
|
}
|
|
45
|
-
function
|
|
46
|
-
d !== void 0 && clearTimeout(d),
|
|
45
|
+
function A() {
|
|
46
|
+
d !== void 0 && clearTimeout(d), x = 0, s = p = o = d = void 0;
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
return d === void 0 ? u :
|
|
48
|
+
function K() {
|
|
49
|
+
return d === void 0 ? u : F(j());
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
var
|
|
53
|
-
if (
|
|
51
|
+
function w() {
|
|
52
|
+
var i = j(), f = O(i);
|
|
53
|
+
if (s = arguments, o = this, p = i, f) {
|
|
54
54
|
if (d === void 0)
|
|
55
|
-
return
|
|
55
|
+
return L(p);
|
|
56
56
|
if (v)
|
|
57
|
-
return d = setTimeout($, e), g(
|
|
57
|
+
return d = setTimeout($, e), g(p);
|
|
58
58
|
}
|
|
59
59
|
return d === void 0 && (d = setTimeout($, e)), u;
|
|
60
60
|
}
|
|
61
|
-
return
|
|
61
|
+
return w.cancel = A, w.flush = K, w;
|
|
62
62
|
}
|
|
63
63
|
function pe(t, e, a) {
|
|
64
|
-
var
|
|
64
|
+
var s = !0, o = !0;
|
|
65
65
|
if (typeof t != "function")
|
|
66
|
-
throw new TypeError(
|
|
67
|
-
return
|
|
68
|
-
leading:
|
|
66
|
+
throw new TypeError(N);
|
|
67
|
+
return S(a) && (s = "leading" in a ? !!a.leading : s, o = "trailing" in a ? !!a.trailing : o), he(t, e, {
|
|
68
|
+
leading: s,
|
|
69
69
|
maxWait: e,
|
|
70
70
|
trailing: o
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function S(t) {
|
|
74
74
|
var e = typeof t;
|
|
75
75
|
return !!t && (e == "object" || e == "function");
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function fe(t) {
|
|
78
78
|
return !!t && typeof t == "object";
|
|
79
79
|
}
|
|
80
80
|
function xe(t) {
|
|
81
|
-
return typeof t == "symbol" ||
|
|
81
|
+
return typeof t == "symbol" || fe(t) && de.call(t) == Z;
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function B(t) {
|
|
84
84
|
if (typeof t == "number")
|
|
85
85
|
return t;
|
|
86
86
|
if (xe(t))
|
|
87
|
-
return
|
|
88
|
-
if (
|
|
87
|
+
return q;
|
|
88
|
+
if (S(t)) {
|
|
89
89
|
var e = typeof t.valueOf == "function" ? t.valueOf() : t;
|
|
90
|
-
t =
|
|
90
|
+
t = S(e) ? e + "" : e;
|
|
91
91
|
}
|
|
92
92
|
if (typeof t != "string")
|
|
93
93
|
return t === 0 ? t : +t;
|
|
94
|
-
t = t.replace(
|
|
95
|
-
var a =
|
|
96
|
-
return a ||
|
|
94
|
+
t = t.replace(ee, "");
|
|
95
|
+
var a = ae.test(t);
|
|
96
|
+
return a || re.test(t) ? ie(t.slice(2), a ? 2 : 8) : te.test(t) ? q : +t;
|
|
97
97
|
}
|
|
98
|
-
var
|
|
99
|
-
const
|
|
100
|
-
`, be = ["small", "medium", "large"], me = ["auto", "manual"], ye = ["default", "success", "error"], c = {
|
|
98
|
+
var ve = pe;
|
|
99
|
+
const ge = /* @__PURE__ */ Y(ve), me = "*,*:after,*:before{box-sizing:inherit}.c-textareaWrapper{--textarea-line-height: calc(var(--dt-font-body-l-line-height) * 1px);--textarea-border-thickness: 1px;--textarea-resize: none;--textarea-padding-inline: var(--dt-spacing-c);--textarea-padding-block: var(--dt-spacing-b);--textarea-background-color: var(--dt-color-container-default);--textarea-border-color: var(--dt-color-interactive-form);--textarea-content-color: var(--dt-color-content-default);--textarea-placeholder-color: var(--dt-color-content-placeholder);--textarea-height: calc((var(--textarea-line-height) * 2) + (var(--textarea-padding-block) * 2));line-height:0;padding:var(--dt-spacing-a);border:var(--textarea-border-thickness) solid var(--textarea-border-color);background-color:var(--textarea-background-color);border-radius:var(--dt-radius-rounded-c);inline-size:100%}.c-textareaWrapper textarea{font-size:calc(var(--dt-font-body-l-size) * 1px);line-height:var(--textarea-line-height);font-family:var(--dt-font-body-l-family);resize:var(--textarea-resize);border:none;background-color:var(--textarea-background-color);color:var(--textarea-content-color);block-size:var(--textarea-height);max-block-size:var(--textarea-max-height);min-block-size:var(--textarea-min-height);inline-size:100%;padding-block-start:var(--textarea-padding-block);padding-block-end:var(--textarea-padding-block);padding-inline-start:var(--textarea-padding-inline);padding-inline-end:var(--textarea-padding-inline)}.c-textareaWrapper textarea:focus{box-shadow:none;outline:none}.c-textareaWrapper textarea::placeholder{color:var(--textarea-placeholder-color);opacity:1}.c-textareaWrapper.c-textarea--readonly{--textarea-background-color: var(--dt-color-container-subtle);--textarea-border-color: var(--dt-color-interactive-form)}.c-textareaWrapper.c-textarea--disabled{--textarea-background-color: var(--dt-color-disabled-01);--textarea-border-color: var(--dt-color-disabled-01);--textarea-content-color: var(--dt-color-content-disabled);--textarea-placeholder-color: var(--dt-color-content-disabled)}@media (hover: hover){.c-textareaWrapper:hover:not(.c-textarea--disabled,.c-textarea--readonly){--textarea-background-color: hsl(var(--dt-color-container-default-h), var(--dt-color-container-default-s), calc(var(--dt-color-container-default-l) + calc(-1 * var(--dt-color-hover-01))))}}.c-textareaWrapper:focus-within{box-shadow:0 0 0 2px var(--dt-color-focus-inner),0 0 0 4px var(--dt-color-focus-outer);outline:none}.c-textareaWrapper.c-textarea--large{--textarea-padding-block: var(--dt-spacing-c)}.c-textareaWrapper.c-textarea--small{--textarea-padding-block: var(--dt-spacing-a)}.c-textareaWrapper.c-textarea--resize-manual{--textarea-resize: vertical;--textarea-min-height: calc((var(--textarea-line-height) * 1) + (var(--textarea-padding-block) * 2))}@media (pointer: coarse){.c-textareaWrapper.c-textarea--resize-manual{--textarea-height: calc((var(--textarea-line-height) * 6) + (var(--textarea-padding-block) * 2));--textarea-min-height: calc((var(--textarea-line-height) * 6) + (var(--textarea-padding-block) * 2));--textarea-max-height: calc((var(--textarea-line-height) * 6) + (var(--textarea-padding-block) * 2));--textarea-resize: none}}.c-textareaWrapper.c-textarea--resize-auto{--textarea-max-height: calc((var(--textarea-line-height) * 6) + (var(--textarea-padding-block) * 2));--textarea-min-height: var(--textarea-height)}.c-textareaWrapper.c-textarea--error{--textarea-border-color: var(--dt-color-support-error)}", be = ["small", "medium", "large"], ye = ["auto", "manual"], ze = ["default", "success", "error"], c = {
|
|
101
100
|
disabled: !1,
|
|
102
101
|
size: "medium",
|
|
103
102
|
resize: "auto",
|
|
@@ -109,20 +108,19 @@ const ve = /* @__PURE__ */ Q(fe), ge = `*,*:after,*:before{box-sizing:inherit}.c
|
|
|
109
108
|
readonly: !1,
|
|
110
109
|
required: !1
|
|
111
110
|
};
|
|
112
|
-
var
|
|
113
|
-
for (var o =
|
|
114
|
-
(u = t[
|
|
115
|
-
return
|
|
111
|
+
var ke = Object.defineProperty, n = (t, e, a, s) => {
|
|
112
|
+
for (var o = void 0, h = t.length - 1, u; h >= 0; h--)
|
|
113
|
+
(u = t[h]) && (o = u(e, a, o) || o);
|
|
114
|
+
return o && ke(e, a, o), o;
|
|
116
115
|
};
|
|
117
|
-
const
|
|
118
|
-
class r extends H(U(P)) {
|
|
116
|
+
const b = "pie-textarea", I = "assistive-text", _ = class _ extends U(X(M)) {
|
|
119
117
|
constructor() {
|
|
120
|
-
super(...arguments), this.value = c.value, this.disabled = c.disabled, this.size = c.size, this.resize = c.resize, this.label = c.label, this.readonly = c.readonly, this.autoFocus = c.autoFocus, this.required = c.required, this.status = c.status, this._throttledResize =
|
|
118
|
+
super(...arguments), this.value = c.value, this.disabled = c.disabled, this.size = c.size, this.resize = c.resize, this.label = c.label, this.readonly = c.readonly, this.autoFocus = c.autoFocus, this.required = c.required, this.status = c.status, this._throttledResize = ge(() => {
|
|
121
119
|
this.resize === "auto" && (this._textarea.style.height = "auto", this._textarea.style.height = `${this._textarea.scrollHeight}px`);
|
|
122
120
|
}, 100), this.handleInput = (e) => {
|
|
123
121
|
this.value = e.target.value, this.restrictInputLength(), this._internals.setFormValue(this.value), this.handleResize();
|
|
124
122
|
}, this.handleChange = (e) => {
|
|
125
|
-
const a =
|
|
123
|
+
const a = J(e);
|
|
126
124
|
this.dispatchEvent(a);
|
|
127
125
|
}, this.handleKeyDown = (e) => {
|
|
128
126
|
e.key === "Enter" && e.stopPropagation();
|
|
@@ -170,62 +168,62 @@ class r extends H(U(P)) {
|
|
|
170
168
|
this._textarea.removeEventListener("keydown", this.handleKeyDown), window.removeEventListener("resize", () => this.handleResize());
|
|
171
169
|
}
|
|
172
170
|
renderLabel(e, a) {
|
|
173
|
-
const
|
|
174
|
-
return e != null && e.length ?
|
|
171
|
+
const s = a ? `${this.value.length}/${a}` : void 0;
|
|
172
|
+
return e != null && e.length ? E`<pie-form-label for="${b}" trailing=${m(s)}>${e}</pie-form-label>` : V;
|
|
175
173
|
}
|
|
176
174
|
renderAssistiveText() {
|
|
177
|
-
return this.assistiveText ?
|
|
175
|
+
return this.assistiveText ? E`
|
|
178
176
|
<pie-assistive-text
|
|
179
|
-
id="${
|
|
180
|
-
variant=${
|
|
177
|
+
id="${I}"
|
|
178
|
+
variant=${m(this.status)}
|
|
181
179
|
data-test-id="pie-textarea-assistive-text">
|
|
182
180
|
${this.assistiveText}
|
|
183
181
|
</pie-assistive-text>
|
|
184
|
-
` :
|
|
182
|
+
` : V;
|
|
185
183
|
}
|
|
186
184
|
render() {
|
|
187
185
|
const {
|
|
188
186
|
disabled: e,
|
|
189
187
|
resize: a,
|
|
190
|
-
size:
|
|
188
|
+
size: s,
|
|
191
189
|
autocomplete: o,
|
|
192
|
-
autoFocus:
|
|
190
|
+
autoFocus: h,
|
|
193
191
|
name: u,
|
|
194
192
|
readonly: d,
|
|
195
|
-
placeholder:
|
|
196
|
-
value:
|
|
193
|
+
placeholder: p,
|
|
194
|
+
value: x,
|
|
197
195
|
required: k,
|
|
198
196
|
label: v,
|
|
199
197
|
maxLength: y,
|
|
200
198
|
status: g,
|
|
201
|
-
assistiveText:
|
|
202
|
-
} = this,
|
|
199
|
+
assistiveText: L
|
|
200
|
+
} = this, W = {
|
|
203
201
|
"c-textareaWrapper": !0,
|
|
204
202
|
"c-textarea--disabled": e,
|
|
205
203
|
"c-textarea--readonly": d,
|
|
206
204
|
"c-textarea--error": g === "error",
|
|
207
205
|
[`c-textarea--resize-${a}`]: !0,
|
|
208
|
-
[`c-textarea--${
|
|
206
|
+
[`c-textarea--${s}`]: !0
|
|
209
207
|
};
|
|
210
|
-
return
|
|
208
|
+
return E`<div>
|
|
211
209
|
${this.renderLabel(v, y)}
|
|
212
210
|
<div
|
|
213
|
-
class="${
|
|
211
|
+
class="${G(W)}"
|
|
214
212
|
data-test-id="pie-textarea-wrapper">
|
|
215
213
|
<textarea
|
|
216
|
-
id="${
|
|
217
|
-
data-test-id="${
|
|
218
|
-
name=${
|
|
219
|
-
autocomplete=${
|
|
220
|
-
placeholder=${
|
|
221
|
-
.value=${
|
|
222
|
-
?autofocus=${
|
|
214
|
+
id="${b}"
|
|
215
|
+
data-test-id="${b}"
|
|
216
|
+
name=${m(u)}
|
|
217
|
+
autocomplete=${m(o)}
|
|
218
|
+
placeholder=${m(p)}
|
|
219
|
+
.value=${H(x)}
|
|
220
|
+
?autofocus=${h}
|
|
223
221
|
?readonly=${d}
|
|
224
222
|
?required=${k}
|
|
225
223
|
?disabled=${e}
|
|
226
|
-
aria-describedby=${
|
|
224
|
+
aria-describedby=${m(L ? I : void 0)}
|
|
227
225
|
aria-invalid=${g === "error" ? "true" : "false"}
|
|
228
|
-
aria-errormessage="${
|
|
226
|
+
aria-errormessage="${m(g === "error" ? I : void 0)}"
|
|
229
227
|
@input=${this.handleInput}
|
|
230
228
|
@change=${this.handleChange}
|
|
231
229
|
></textarea>
|
|
@@ -233,68 +231,68 @@ class r extends H(U(P)) {
|
|
|
233
231
|
${this.renderAssistiveText()}
|
|
234
232
|
</div>`;
|
|
235
233
|
}
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
r
|
|
239
|
-
|
|
234
|
+
};
|
|
235
|
+
_.shadowRootOptions = { ...M.shadowRootOptions, delegatesFocus: !0 }, _.styles = P(me);
|
|
236
|
+
let r = _;
|
|
237
|
+
n([
|
|
240
238
|
l({ type: String })
|
|
241
|
-
], r.prototype, "value"
|
|
242
|
-
|
|
239
|
+
], r.prototype, "value");
|
|
240
|
+
n([
|
|
243
241
|
l({ type: String })
|
|
244
|
-
], r.prototype, "defaultValue"
|
|
245
|
-
|
|
242
|
+
], r.prototype, "defaultValue");
|
|
243
|
+
n([
|
|
246
244
|
l({ type: Boolean, reflect: !0 })
|
|
247
|
-
], r.prototype, "disabled"
|
|
248
|
-
|
|
245
|
+
], r.prototype, "disabled");
|
|
246
|
+
n([
|
|
249
247
|
l({ type: String }),
|
|
250
|
-
|
|
251
|
-
], r.prototype, "size"
|
|
252
|
-
|
|
248
|
+
C(b, be, c.size)
|
|
249
|
+
], r.prototype, "size");
|
|
250
|
+
n([
|
|
253
251
|
l({ type: String }),
|
|
254
|
-
|
|
255
|
-
], r.prototype, "resize"
|
|
256
|
-
|
|
252
|
+
C(b, ye, c.resize)
|
|
253
|
+
], r.prototype, "resize");
|
|
254
|
+
n([
|
|
257
255
|
l({ type: String })
|
|
258
|
-
], r.prototype, "label"
|
|
259
|
-
|
|
256
|
+
], r.prototype, "label");
|
|
257
|
+
n([
|
|
260
258
|
l({ type: Number })
|
|
261
|
-
], r.prototype, "maxLength"
|
|
262
|
-
|
|
259
|
+
], r.prototype, "maxLength");
|
|
260
|
+
n([
|
|
263
261
|
l({ type: Boolean })
|
|
264
|
-
], r.prototype, "readonly"
|
|
265
|
-
|
|
262
|
+
], r.prototype, "readonly");
|
|
263
|
+
n([
|
|
266
264
|
l({ type: Boolean })
|
|
267
|
-
], r.prototype, "autoFocus"
|
|
268
|
-
|
|
265
|
+
], r.prototype, "autoFocus");
|
|
266
|
+
n([
|
|
269
267
|
l({ type: Boolean })
|
|
270
|
-
], r.prototype, "required"
|
|
271
|
-
|
|
268
|
+
], r.prototype, "required");
|
|
269
|
+
n([
|
|
272
270
|
l({ type: String }),
|
|
273
|
-
|
|
274
|
-
], r.prototype, "status"
|
|
275
|
-
|
|
271
|
+
C(b, ze, c.status)
|
|
272
|
+
], r.prototype, "status");
|
|
273
|
+
n([
|
|
276
274
|
l({ type: String })
|
|
277
|
-
], r.prototype, "assistiveText"
|
|
278
|
-
|
|
275
|
+
], r.prototype, "assistiveText");
|
|
276
|
+
n([
|
|
279
277
|
l({ type: String })
|
|
280
|
-
], r.prototype, "name"
|
|
281
|
-
|
|
278
|
+
], r.prototype, "name");
|
|
279
|
+
n([
|
|
282
280
|
l({ type: String })
|
|
283
|
-
], r.prototype, "autocomplete"
|
|
284
|
-
|
|
281
|
+
], r.prototype, "autocomplete");
|
|
282
|
+
n([
|
|
285
283
|
l({ type: String })
|
|
286
|
-
], r.prototype, "placeholder"
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
], r.prototype, "_textarea"
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
], r.prototype, "focusTarget"
|
|
293
|
-
|
|
284
|
+
], r.prototype, "placeholder");
|
|
285
|
+
n([
|
|
286
|
+
D("textarea")
|
|
287
|
+
], r.prototype, "_textarea");
|
|
288
|
+
n([
|
|
289
|
+
D("textarea")
|
|
290
|
+
], r.prototype, "focusTarget");
|
|
291
|
+
Q(b, r);
|
|
294
292
|
export {
|
|
295
293
|
r as PieTextarea,
|
|
296
294
|
c as defaultProps,
|
|
297
|
-
|
|
295
|
+
ye as resizeModes,
|
|
298
296
|
be as sizes,
|
|
299
|
-
|
|
297
|
+
ze as statusTypes
|
|
300
298
|
};
|
package/dist/react.js
CHANGED
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
import * as e from "react";
|
|
2
|
-
import { createComponent as
|
|
3
|
-
import { PieTextarea as
|
|
4
|
-
import { defaultProps as
|
|
5
|
-
|
|
6
|
-
import "lit/decorators.js";
|
|
7
|
-
import "lit/directives/class-map.js";
|
|
8
|
-
import "lit/directives/if-defined.js";
|
|
9
|
-
import "lit/directives/live.js";
|
|
10
|
-
import "@justeattakeaway/pie-assistive-text";
|
|
11
|
-
import "@justeattakeaway/pie-form-label";
|
|
12
|
-
import "@justeattakeaway/pie-webc-core";
|
|
13
|
-
const r = t({
|
|
2
|
+
import { createComponent as a } from "@lit/react";
|
|
3
|
+
import { PieTextarea as t } from "./index.js";
|
|
4
|
+
import { defaultProps as m, resizeModes as x, sizes as c, statusTypes as P } from "./index.js";
|
|
5
|
+
const r = a({
|
|
14
6
|
displayName: "PieTextarea",
|
|
15
|
-
elementClass:
|
|
7
|
+
elementClass: t,
|
|
16
8
|
react: e,
|
|
17
9
|
tagName: "pie-textarea",
|
|
18
10
|
events: {
|
|
@@ -21,11 +13,11 @@ const r = t({
|
|
|
21
13
|
onChange: "change"
|
|
22
14
|
// when the textarea value is changed.
|
|
23
15
|
}
|
|
24
|
-
}),
|
|
16
|
+
}), i = r;
|
|
25
17
|
export {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
18
|
+
i as PieTextarea,
|
|
19
|
+
m as defaultProps,
|
|
20
|
+
x as resizeModes,
|
|
21
|
+
c as sizes,
|
|
22
|
+
P as statusTypes
|
|
31
23
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@justeattakeaway/pie-textarea",
|
|
3
3
|
"description": "PIE Design System Textarea built using Web Components",
|
|
4
|
-
"version": "0.10.
|
|
4
|
+
"version": "0.10.2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -37,13 +37,13 @@
|
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@custom-elements-manifest/analyzer": "0.9.0",
|
|
39
39
|
"@justeattakeaway/pie-components-config": "0.18.0",
|
|
40
|
-
"@justeattakeaway/pie-css": "0.
|
|
40
|
+
"@justeattakeaway/pie-css": "0.13.1",
|
|
41
41
|
"@types/lodash.throttle": "4.1.9",
|
|
42
42
|
"cem-plugin-module-file-extensions": "0.0.5"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@justeattakeaway/pie-form-label": "0.14.
|
|
46
|
-
"@justeattakeaway/pie-webc-core": "0.24.
|
|
45
|
+
"@justeattakeaway/pie-form-label": "0.14.3",
|
|
46
|
+
"@justeattakeaway/pie-webc-core": "0.24.2",
|
|
47
47
|
"lodash.throttle": "4.1.1"
|
|
48
48
|
},
|
|
49
49
|
"volta": {
|
package/src/defs-react.ts
CHANGED
package/src/react.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { createComponent, EventName } from '@lit/react';
|
|
2
|
+
import { createComponent, type EventName } from '@lit/react';
|
|
3
3
|
import { PieTextarea as PieTextareaLit } from './index';
|
|
4
|
-
import { TextareaProps } from './defs';
|
|
4
|
+
import { type TextareaProps } from './defs';
|
|
5
5
|
|
|
6
6
|
export * from './defs';
|
|
7
7
|
|