@starasia/textarea 1.0.1 → 1.0.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/textarea.es.js +22 -664
- package/dist/textarea.umd.js +2 -33
- package/package.json +6 -6
package/dist/textarea.es.js
CHANGED
|
@@ -1,647 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @license React
|
|
5
|
-
* react-jsx-runtime.production.min.js
|
|
6
|
-
*
|
|
7
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the MIT license found in the
|
|
10
|
-
* LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/
|
|
12
|
-
var wr;
|
|
13
|
-
function fe() {
|
|
14
|
-
if (wr)
|
|
15
|
-
return W;
|
|
16
|
-
wr = 1;
|
|
17
|
-
var E = Or, b = Symbol.for("react.element"), D = Symbol.for("react.fragment"), m = Object.prototype.hasOwnProperty, O = E.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, R = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
18
|
-
function _(h, f, C) {
|
|
19
|
-
var p, y = {}, w = null, $ = null;
|
|
20
|
-
C !== void 0 && (w = "" + C), f.key !== void 0 && (w = "" + f.key), f.ref !== void 0 && ($ = f.ref);
|
|
21
|
-
for (p in f)
|
|
22
|
-
m.call(f, p) && !R.hasOwnProperty(p) && (y[p] = f[p]);
|
|
23
|
-
if (h && h.defaultProps)
|
|
24
|
-
for (p in f = h.defaultProps, f)
|
|
25
|
-
y[p] === void 0 && (y[p] = f[p]);
|
|
26
|
-
return { $$typeof: b, type: h, key: w, ref: $, props: y, _owner: O.current };
|
|
27
|
-
}
|
|
28
|
-
return W.Fragment = D, W.jsx = _, W.jsxs = _, W;
|
|
29
|
-
}
|
|
30
|
-
var z = {};
|
|
31
|
-
/**
|
|
32
|
-
* @license React
|
|
33
|
-
* react-jsx-runtime.development.js
|
|
34
|
-
*
|
|
35
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
36
|
-
*
|
|
37
|
-
* This source code is licensed under the MIT license found in the
|
|
38
|
-
* LICENSE file in the root directory of this source tree.
|
|
39
|
-
*/
|
|
40
|
-
var Tr;
|
|
41
|
-
function de() {
|
|
42
|
-
return Tr || (Tr = 1, process.env.NODE_ENV !== "production" && function() {
|
|
43
|
-
var E = Or, b = Symbol.for("react.element"), D = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), O = Symbol.for("react.strict_mode"), R = Symbol.for("react.profiler"), _ = Symbol.for("react.provider"), h = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), C = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"), y = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), $ = Symbol.for("react.offscreen"), Q = Symbol.iterator, Cr = "@@iterator";
|
|
44
|
-
function Pr(r) {
|
|
45
|
-
if (r === null || typeof r != "object")
|
|
46
|
-
return null;
|
|
47
|
-
var e = Q && r[Q] || r[Cr];
|
|
48
|
-
return typeof e == "function" ? e : null;
|
|
49
|
-
}
|
|
50
|
-
var P = E.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
51
|
-
function c(r) {
|
|
52
|
-
{
|
|
53
|
-
for (var e = arguments.length, a = new Array(e > 1 ? e - 1 : 0), t = 1; t < e; t++)
|
|
54
|
-
a[t - 1] = arguments[t];
|
|
55
|
-
jr("error", r, a);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
function jr(r, e, a) {
|
|
59
|
-
{
|
|
60
|
-
var t = P.ReactDebugCurrentFrame, s = t.getStackAddendum();
|
|
61
|
-
s !== "" && (e += "%s", a = a.concat([s]));
|
|
62
|
-
var o = a.map(function(i) {
|
|
63
|
-
return String(i);
|
|
64
|
-
});
|
|
65
|
-
o.unshift("Warning: " + e), Function.prototype.apply.call(console[r], console, o);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
var kr = !1, Dr = !1, Fr = !1, Ar = !1, Ir = !1, rr;
|
|
69
|
-
rr = Symbol.for("react.module.reference");
|
|
70
|
-
function Wr(r) {
|
|
71
|
-
return !!(typeof r == "string" || typeof r == "function" || r === m || r === R || Ir || r === O || r === C || r === p || Ar || r === $ || kr || Dr || Fr || typeof r == "object" && r !== null && (r.$$typeof === w || r.$$typeof === y || r.$$typeof === _ || r.$$typeof === h || r.$$typeof === f || // This needs to include all possible module reference object
|
|
72
|
-
// types supported by any Flight configuration anywhere since
|
|
73
|
-
// we don't know which Flight build this will end up being used
|
|
74
|
-
// with.
|
|
75
|
-
r.$$typeof === rr || r.getModuleId !== void 0));
|
|
76
|
-
}
|
|
77
|
-
function zr(r, e, a) {
|
|
78
|
-
var t = r.displayName;
|
|
79
|
-
if (t)
|
|
80
|
-
return t;
|
|
81
|
-
var s = e.displayName || e.name || "";
|
|
82
|
-
return s !== "" ? a + "(" + s + ")" : a;
|
|
83
|
-
}
|
|
84
|
-
function er(r) {
|
|
85
|
-
return r.displayName || "Context";
|
|
86
|
-
}
|
|
87
|
-
function x(r) {
|
|
88
|
-
if (r == null)
|
|
89
|
-
return null;
|
|
90
|
-
if (typeof r.tag == "number" && c("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function")
|
|
91
|
-
return r.displayName || r.name || null;
|
|
92
|
-
if (typeof r == "string")
|
|
93
|
-
return r;
|
|
94
|
-
switch (r) {
|
|
95
|
-
case m:
|
|
96
|
-
return "Fragment";
|
|
97
|
-
case D:
|
|
98
|
-
return "Portal";
|
|
99
|
-
case R:
|
|
100
|
-
return "Profiler";
|
|
101
|
-
case O:
|
|
102
|
-
return "StrictMode";
|
|
103
|
-
case C:
|
|
104
|
-
return "Suspense";
|
|
105
|
-
case p:
|
|
106
|
-
return "SuspenseList";
|
|
107
|
-
}
|
|
108
|
-
if (typeof r == "object")
|
|
109
|
-
switch (r.$$typeof) {
|
|
110
|
-
case h:
|
|
111
|
-
var e = r;
|
|
112
|
-
return er(e) + ".Consumer";
|
|
113
|
-
case _:
|
|
114
|
-
var a = r;
|
|
115
|
-
return er(a._context) + ".Provider";
|
|
116
|
-
case f:
|
|
117
|
-
return zr(r, r.render, "ForwardRef");
|
|
118
|
-
case y:
|
|
119
|
-
var t = r.displayName || null;
|
|
120
|
-
return t !== null ? t : x(r.type) || "Memo";
|
|
121
|
-
case w: {
|
|
122
|
-
var s = r, o = s._payload, i = s._init;
|
|
123
|
-
try {
|
|
124
|
-
return x(i(o));
|
|
125
|
-
} catch {
|
|
126
|
-
return null;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
return null;
|
|
131
|
-
}
|
|
132
|
-
var T = Object.assign, F = 0, ar, tr, nr, ir, sr, or, ur;
|
|
133
|
-
function lr() {
|
|
134
|
-
}
|
|
135
|
-
lr.__reactDisabledLog = !0;
|
|
136
|
-
function $r() {
|
|
137
|
-
{
|
|
138
|
-
if (F === 0) {
|
|
139
|
-
ar = console.log, tr = console.info, nr = console.warn, ir = console.error, sr = console.group, or = console.groupCollapsed, ur = console.groupEnd;
|
|
140
|
-
var r = {
|
|
141
|
-
configurable: !0,
|
|
142
|
-
enumerable: !0,
|
|
143
|
-
value: lr,
|
|
144
|
-
writable: !0
|
|
145
|
-
};
|
|
146
|
-
Object.defineProperties(console, {
|
|
147
|
-
info: r,
|
|
148
|
-
log: r,
|
|
149
|
-
warn: r,
|
|
150
|
-
error: r,
|
|
151
|
-
group: r,
|
|
152
|
-
groupCollapsed: r,
|
|
153
|
-
groupEnd: r
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
F++;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
function Yr() {
|
|
160
|
-
{
|
|
161
|
-
if (F--, F === 0) {
|
|
162
|
-
var r = {
|
|
163
|
-
configurable: !0,
|
|
164
|
-
enumerable: !0,
|
|
165
|
-
writable: !0
|
|
166
|
-
};
|
|
167
|
-
Object.defineProperties(console, {
|
|
168
|
-
log: T({}, r, {
|
|
169
|
-
value: ar
|
|
170
|
-
}),
|
|
171
|
-
info: T({}, r, {
|
|
172
|
-
value: tr
|
|
173
|
-
}),
|
|
174
|
-
warn: T({}, r, {
|
|
175
|
-
value: nr
|
|
176
|
-
}),
|
|
177
|
-
error: T({}, r, {
|
|
178
|
-
value: ir
|
|
179
|
-
}),
|
|
180
|
-
group: T({}, r, {
|
|
181
|
-
value: sr
|
|
182
|
-
}),
|
|
183
|
-
groupCollapsed: T({}, r, {
|
|
184
|
-
value: or
|
|
185
|
-
}),
|
|
186
|
-
groupEnd: T({}, r, {
|
|
187
|
-
value: ur
|
|
188
|
-
})
|
|
189
|
-
});
|
|
190
|
-
}
|
|
191
|
-
F < 0 && c("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
var N = P.ReactCurrentDispatcher, U;
|
|
195
|
-
function Y(r, e, a) {
|
|
196
|
-
{
|
|
197
|
-
if (U === void 0)
|
|
198
|
-
try {
|
|
199
|
-
throw Error();
|
|
200
|
-
} catch (s) {
|
|
201
|
-
var t = s.stack.trim().match(/\n( *(at )?)/);
|
|
202
|
-
U = t && t[1] || "";
|
|
203
|
-
}
|
|
204
|
-
return `
|
|
205
|
-
` + U + r;
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
var q = !1, L;
|
|
209
|
-
{
|
|
210
|
-
var Lr = typeof WeakMap == "function" ? WeakMap : Map;
|
|
211
|
-
L = new Lr();
|
|
212
|
-
}
|
|
213
|
-
function cr(r, e) {
|
|
214
|
-
if (!r || q)
|
|
215
|
-
return "";
|
|
216
|
-
{
|
|
217
|
-
var a = L.get(r);
|
|
218
|
-
if (a !== void 0)
|
|
219
|
-
return a;
|
|
220
|
-
}
|
|
221
|
-
var t;
|
|
222
|
-
q = !0;
|
|
223
|
-
var s = Error.prepareStackTrace;
|
|
224
|
-
Error.prepareStackTrace = void 0;
|
|
225
|
-
var o;
|
|
226
|
-
o = N.current, N.current = null, $r();
|
|
227
|
-
try {
|
|
228
|
-
if (e) {
|
|
229
|
-
var i = function() {
|
|
230
|
-
throw Error();
|
|
231
|
-
};
|
|
232
|
-
if (Object.defineProperty(i.prototype, "props", {
|
|
233
|
-
set: function() {
|
|
234
|
-
throw Error();
|
|
235
|
-
}
|
|
236
|
-
}), typeof Reflect == "object" && Reflect.construct) {
|
|
237
|
-
try {
|
|
238
|
-
Reflect.construct(i, []);
|
|
239
|
-
} catch (v) {
|
|
240
|
-
t = v;
|
|
241
|
-
}
|
|
242
|
-
Reflect.construct(r, [], i);
|
|
243
|
-
} else {
|
|
244
|
-
try {
|
|
245
|
-
i.call();
|
|
246
|
-
} catch (v) {
|
|
247
|
-
t = v;
|
|
248
|
-
}
|
|
249
|
-
r.call(i.prototype);
|
|
250
|
-
}
|
|
251
|
-
} else {
|
|
252
|
-
try {
|
|
253
|
-
throw Error();
|
|
254
|
-
} catch (v) {
|
|
255
|
-
t = v;
|
|
256
|
-
}
|
|
257
|
-
r();
|
|
258
|
-
}
|
|
259
|
-
} catch (v) {
|
|
260
|
-
if (v && t && typeof v.stack == "string") {
|
|
261
|
-
for (var n = v.stack.split(`
|
|
262
|
-
`), d = t.stack.split(`
|
|
263
|
-
`), u = n.length - 1, l = d.length - 1; u >= 1 && l >= 0 && n[u] !== d[l]; )
|
|
264
|
-
l--;
|
|
265
|
-
for (; u >= 1 && l >= 0; u--, l--)
|
|
266
|
-
if (n[u] !== d[l]) {
|
|
267
|
-
if (u !== 1 || l !== 1)
|
|
268
|
-
do
|
|
269
|
-
if (u--, l--, l < 0 || n[u] !== d[l]) {
|
|
270
|
-
var g = `
|
|
271
|
-
` + n[u].replace(" at new ", " at ");
|
|
272
|
-
return r.displayName && g.includes("<anonymous>") && (g = g.replace("<anonymous>", r.displayName)), typeof r == "function" && L.set(r, g), g;
|
|
273
|
-
}
|
|
274
|
-
while (u >= 1 && l >= 0);
|
|
275
|
-
break;
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
} finally {
|
|
279
|
-
q = !1, N.current = o, Yr(), Error.prepareStackTrace = s;
|
|
280
|
-
}
|
|
281
|
-
var k = r ? r.displayName || r.name : "", S = k ? Y(k) : "";
|
|
282
|
-
return typeof r == "function" && L.set(r, S), S;
|
|
283
|
-
}
|
|
284
|
-
function Vr(r, e, a) {
|
|
285
|
-
return cr(r, !1);
|
|
286
|
-
}
|
|
287
|
-
function Mr(r) {
|
|
288
|
-
var e = r.prototype;
|
|
289
|
-
return !!(e && e.isReactComponent);
|
|
290
|
-
}
|
|
291
|
-
function V(r, e, a) {
|
|
292
|
-
if (r == null)
|
|
293
|
-
return "";
|
|
294
|
-
if (typeof r == "function")
|
|
295
|
-
return cr(r, Mr(r));
|
|
296
|
-
if (typeof r == "string")
|
|
297
|
-
return Y(r);
|
|
298
|
-
switch (r) {
|
|
299
|
-
case C:
|
|
300
|
-
return Y("Suspense");
|
|
301
|
-
case p:
|
|
302
|
-
return Y("SuspenseList");
|
|
303
|
-
}
|
|
304
|
-
if (typeof r == "object")
|
|
305
|
-
switch (r.$$typeof) {
|
|
306
|
-
case f:
|
|
307
|
-
return Vr(r.render);
|
|
308
|
-
case y:
|
|
309
|
-
return V(r.type, e, a);
|
|
310
|
-
case w: {
|
|
311
|
-
var t = r, s = t._payload, o = t._init;
|
|
312
|
-
try {
|
|
313
|
-
return V(o(s), e, a);
|
|
314
|
-
} catch {
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
return "";
|
|
319
|
-
}
|
|
320
|
-
var A = Object.prototype.hasOwnProperty, fr = {}, dr = P.ReactDebugCurrentFrame;
|
|
321
|
-
function M(r) {
|
|
322
|
-
if (r) {
|
|
323
|
-
var e = r._owner, a = V(r.type, r._source, e ? e.type : null);
|
|
324
|
-
dr.setExtraStackFrame(a);
|
|
325
|
-
} else
|
|
326
|
-
dr.setExtraStackFrame(null);
|
|
327
|
-
}
|
|
328
|
-
function Nr(r, e, a, t, s) {
|
|
329
|
-
{
|
|
330
|
-
var o = Function.call.bind(A);
|
|
331
|
-
for (var i in r)
|
|
332
|
-
if (o(r, i)) {
|
|
333
|
-
var n = void 0;
|
|
334
|
-
try {
|
|
335
|
-
if (typeof r[i] != "function") {
|
|
336
|
-
var d = Error((t || "React class") + ": " + a + " type `" + i + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[i] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
337
|
-
throw d.name = "Invariant Violation", d;
|
|
338
|
-
}
|
|
339
|
-
n = r[i](e, i, t, a, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
340
|
-
} catch (u) {
|
|
341
|
-
n = u;
|
|
342
|
-
}
|
|
343
|
-
n && !(n instanceof Error) && (M(s), c("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", t || "React class", a, i, typeof n), M(null)), n instanceof Error && !(n.message in fr) && (fr[n.message] = !0, M(s), c("Failed %s type: %s", a, n.message), M(null));
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
var Ur = Array.isArray;
|
|
348
|
-
function B(r) {
|
|
349
|
-
return Ur(r);
|
|
350
|
-
}
|
|
351
|
-
function qr(r) {
|
|
352
|
-
{
|
|
353
|
-
var e = typeof Symbol == "function" && Symbol.toStringTag, a = e && r[Symbol.toStringTag] || r.constructor.name || "Object";
|
|
354
|
-
return a;
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
function Br(r) {
|
|
358
|
-
try {
|
|
359
|
-
return vr(r), !1;
|
|
360
|
-
} catch {
|
|
361
|
-
return !0;
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
function vr(r) {
|
|
365
|
-
return "" + r;
|
|
366
|
-
}
|
|
367
|
-
function pr(r) {
|
|
368
|
-
if (Br(r))
|
|
369
|
-
return c("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", qr(r)), vr(r);
|
|
370
|
-
}
|
|
371
|
-
var I = P.ReactCurrentOwner, Jr = {
|
|
372
|
-
key: !0,
|
|
373
|
-
ref: !0,
|
|
374
|
-
__self: !0,
|
|
375
|
-
__source: !0
|
|
376
|
-
}, gr, br, J;
|
|
377
|
-
J = {};
|
|
378
|
-
function Kr(r) {
|
|
379
|
-
if (A.call(r, "ref")) {
|
|
380
|
-
var e = Object.getOwnPropertyDescriptor(r, "ref").get;
|
|
381
|
-
if (e && e.isReactWarning)
|
|
382
|
-
return !1;
|
|
383
|
-
}
|
|
384
|
-
return r.ref !== void 0;
|
|
385
|
-
}
|
|
386
|
-
function Gr(r) {
|
|
387
|
-
if (A.call(r, "key")) {
|
|
388
|
-
var e = Object.getOwnPropertyDescriptor(r, "key").get;
|
|
389
|
-
if (e && e.isReactWarning)
|
|
390
|
-
return !1;
|
|
391
|
-
}
|
|
392
|
-
return r.key !== void 0;
|
|
393
|
-
}
|
|
394
|
-
function Xr(r, e) {
|
|
395
|
-
if (typeof r.ref == "string" && I.current && e && I.current.stateNode !== e) {
|
|
396
|
-
var a = x(I.current.type);
|
|
397
|
-
J[a] || (c('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', x(I.current.type), r.ref), J[a] = !0);
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
function Hr(r, e) {
|
|
401
|
-
{
|
|
402
|
-
var a = function() {
|
|
403
|
-
gr || (gr = !0, c("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", e));
|
|
404
|
-
};
|
|
405
|
-
a.isReactWarning = !0, Object.defineProperty(r, "key", {
|
|
406
|
-
get: a,
|
|
407
|
-
configurable: !0
|
|
408
|
-
});
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
function Zr(r, e) {
|
|
412
|
-
{
|
|
413
|
-
var a = function() {
|
|
414
|
-
br || (br = !0, c("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", e));
|
|
415
|
-
};
|
|
416
|
-
a.isReactWarning = !0, Object.defineProperty(r, "ref", {
|
|
417
|
-
get: a,
|
|
418
|
-
configurable: !0
|
|
419
|
-
});
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
var Qr = function(r, e, a, t, s, o, i) {
|
|
423
|
-
var n = {
|
|
424
|
-
// This tag allows us to uniquely identify this as a React Element
|
|
425
|
-
$$typeof: b,
|
|
426
|
-
// Built-in properties that belong on the element
|
|
427
|
-
type: r,
|
|
428
|
-
key: e,
|
|
429
|
-
ref: a,
|
|
430
|
-
props: i,
|
|
431
|
-
// Record the component responsible for creating this element.
|
|
432
|
-
_owner: o
|
|
433
|
-
};
|
|
434
|
-
return n._store = {}, Object.defineProperty(n._store, "validated", {
|
|
435
|
-
configurable: !1,
|
|
436
|
-
enumerable: !1,
|
|
437
|
-
writable: !0,
|
|
438
|
-
value: !1
|
|
439
|
-
}), Object.defineProperty(n, "_self", {
|
|
440
|
-
configurable: !1,
|
|
441
|
-
enumerable: !1,
|
|
442
|
-
writable: !1,
|
|
443
|
-
value: t
|
|
444
|
-
}), Object.defineProperty(n, "_source", {
|
|
445
|
-
configurable: !1,
|
|
446
|
-
enumerable: !1,
|
|
447
|
-
writable: !1,
|
|
448
|
-
value: s
|
|
449
|
-
}), Object.freeze && (Object.freeze(n.props), Object.freeze(n)), n;
|
|
450
|
-
};
|
|
451
|
-
function re(r, e, a, t, s) {
|
|
452
|
-
{
|
|
453
|
-
var o, i = {}, n = null, d = null;
|
|
454
|
-
a !== void 0 && (pr(a), n = "" + a), Gr(e) && (pr(e.key), n = "" + e.key), Kr(e) && (d = e.ref, Xr(e, s));
|
|
455
|
-
for (o in e)
|
|
456
|
-
A.call(e, o) && !Jr.hasOwnProperty(o) && (i[o] = e[o]);
|
|
457
|
-
if (r && r.defaultProps) {
|
|
458
|
-
var u = r.defaultProps;
|
|
459
|
-
for (o in u)
|
|
460
|
-
i[o] === void 0 && (i[o] = u[o]);
|
|
461
|
-
}
|
|
462
|
-
if (n || d) {
|
|
463
|
-
var l = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
|
|
464
|
-
n && Hr(i, l), d && Zr(i, l);
|
|
465
|
-
}
|
|
466
|
-
return Qr(r, n, d, s, t, I.current, i);
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
var K = P.ReactCurrentOwner, hr = P.ReactDebugCurrentFrame;
|
|
470
|
-
function j(r) {
|
|
471
|
-
if (r) {
|
|
472
|
-
var e = r._owner, a = V(r.type, r._source, e ? e.type : null);
|
|
473
|
-
hr.setExtraStackFrame(a);
|
|
474
|
-
} else
|
|
475
|
-
hr.setExtraStackFrame(null);
|
|
476
|
-
}
|
|
477
|
-
var G;
|
|
478
|
-
G = !1;
|
|
479
|
-
function X(r) {
|
|
480
|
-
return typeof r == "object" && r !== null && r.$$typeof === b;
|
|
481
|
-
}
|
|
482
|
-
function xr() {
|
|
483
|
-
{
|
|
484
|
-
if (K.current) {
|
|
485
|
-
var r = x(K.current.type);
|
|
486
|
-
if (r)
|
|
487
|
-
return `
|
|
488
|
-
|
|
489
|
-
Check the render method of \`` + r + "`.";
|
|
490
|
-
}
|
|
491
|
-
return "";
|
|
492
|
-
}
|
|
493
|
-
}
|
|
494
|
-
function ee(r) {
|
|
495
|
-
{
|
|
496
|
-
if (r !== void 0) {
|
|
497
|
-
var e = r.fileName.replace(/^.*[\\\/]/, ""), a = r.lineNumber;
|
|
498
|
-
return `
|
|
499
|
-
|
|
500
|
-
Check your code at ` + e + ":" + a + ".";
|
|
501
|
-
}
|
|
502
|
-
return "";
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
var yr = {};
|
|
506
|
-
function ae(r) {
|
|
507
|
-
{
|
|
508
|
-
var e = xr();
|
|
509
|
-
if (!e) {
|
|
510
|
-
var a = typeof r == "string" ? r : r.displayName || r.name;
|
|
511
|
-
a && (e = `
|
|
512
|
-
|
|
513
|
-
Check the top-level render call using <` + a + ">.");
|
|
514
|
-
}
|
|
515
|
-
return e;
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
function mr(r, e) {
|
|
519
|
-
{
|
|
520
|
-
if (!r._store || r._store.validated || r.key != null)
|
|
521
|
-
return;
|
|
522
|
-
r._store.validated = !0;
|
|
523
|
-
var a = ae(e);
|
|
524
|
-
if (yr[a])
|
|
525
|
-
return;
|
|
526
|
-
yr[a] = !0;
|
|
527
|
-
var t = "";
|
|
528
|
-
r && r._owner && r._owner !== K.current && (t = " It was passed a child from " + x(r._owner.type) + "."), j(r), c('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', a, t), j(null);
|
|
529
|
-
}
|
|
530
|
-
}
|
|
531
|
-
function Er(r, e) {
|
|
532
|
-
{
|
|
533
|
-
if (typeof r != "object")
|
|
534
|
-
return;
|
|
535
|
-
if (B(r))
|
|
536
|
-
for (var a = 0; a < r.length; a++) {
|
|
537
|
-
var t = r[a];
|
|
538
|
-
X(t) && mr(t, e);
|
|
539
|
-
}
|
|
540
|
-
else if (X(r))
|
|
541
|
-
r._store && (r._store.validated = !0);
|
|
542
|
-
else if (r) {
|
|
543
|
-
var s = Pr(r);
|
|
544
|
-
if (typeof s == "function" && s !== r.entries)
|
|
545
|
-
for (var o = s.call(r), i; !(i = o.next()).done; )
|
|
546
|
-
X(i.value) && mr(i.value, e);
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
|
-
}
|
|
550
|
-
function te(r) {
|
|
551
|
-
{
|
|
552
|
-
var e = r.type;
|
|
553
|
-
if (e == null || typeof e == "string")
|
|
554
|
-
return;
|
|
555
|
-
var a;
|
|
556
|
-
if (typeof e == "function")
|
|
557
|
-
a = e.propTypes;
|
|
558
|
-
else if (typeof e == "object" && (e.$$typeof === f || // Note: Memo only checks outer props here.
|
|
559
|
-
// Inner props are checked in the reconciler.
|
|
560
|
-
e.$$typeof === y))
|
|
561
|
-
a = e.propTypes;
|
|
562
|
-
else
|
|
563
|
-
return;
|
|
564
|
-
if (a) {
|
|
565
|
-
var t = x(e);
|
|
566
|
-
Nr(a, r.props, "prop", t, r);
|
|
567
|
-
} else if (e.PropTypes !== void 0 && !G) {
|
|
568
|
-
G = !0;
|
|
569
|
-
var s = x(e);
|
|
570
|
-
c("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", s || "Unknown");
|
|
571
|
-
}
|
|
572
|
-
typeof e.getDefaultProps == "function" && !e.getDefaultProps.isReactClassApproved && c("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
573
|
-
}
|
|
574
|
-
}
|
|
575
|
-
function ne(r) {
|
|
576
|
-
{
|
|
577
|
-
for (var e = Object.keys(r.props), a = 0; a < e.length; a++) {
|
|
578
|
-
var t = e[a];
|
|
579
|
-
if (t !== "children" && t !== "key") {
|
|
580
|
-
j(r), c("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", t), j(null);
|
|
581
|
-
break;
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
|
-
r.ref !== null && (j(r), c("Invalid attribute `ref` supplied to `React.Fragment`."), j(null));
|
|
585
|
-
}
|
|
586
|
-
}
|
|
587
|
-
var Rr = {};
|
|
588
|
-
function _r(r, e, a, t, s, o) {
|
|
589
|
-
{
|
|
590
|
-
var i = Wr(r);
|
|
591
|
-
if (!i) {
|
|
592
|
-
var n = "";
|
|
593
|
-
(r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (n += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
594
|
-
var d = ee(s);
|
|
595
|
-
d ? n += d : n += xr();
|
|
596
|
-
var u;
|
|
597
|
-
r === null ? u = "null" : B(r) ? u = "array" : r !== void 0 && r.$$typeof === b ? (u = "<" + (x(r.type) || "Unknown") + " />", n = " Did you accidentally export a JSX literal instead of a component?") : u = typeof r, c("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", u, n);
|
|
598
|
-
}
|
|
599
|
-
var l = re(r, e, a, s, o);
|
|
600
|
-
if (l == null)
|
|
601
|
-
return l;
|
|
602
|
-
if (i) {
|
|
603
|
-
var g = e.children;
|
|
604
|
-
if (g !== void 0)
|
|
605
|
-
if (t)
|
|
606
|
-
if (B(g)) {
|
|
607
|
-
for (var k = 0; k < g.length; k++)
|
|
608
|
-
Er(g[k], r);
|
|
609
|
-
Object.freeze && Object.freeze(g);
|
|
610
|
-
} else
|
|
611
|
-
c("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
612
|
-
else
|
|
613
|
-
Er(g, r);
|
|
614
|
-
}
|
|
615
|
-
if (A.call(e, "key")) {
|
|
616
|
-
var S = x(r), v = Object.keys(e).filter(function(ce) {
|
|
617
|
-
return ce !== "key";
|
|
618
|
-
}), H = v.length > 0 ? "{key: someKey, " + v.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
619
|
-
if (!Rr[S + H]) {
|
|
620
|
-
var le = v.length > 0 ? "{" + v.join(": ..., ") + ": ...}" : "{}";
|
|
621
|
-
c(`A props object containing a "key" prop is being spread into JSX:
|
|
622
|
-
let props = %s;
|
|
623
|
-
<%s {...props} />
|
|
624
|
-
React keys must be passed directly to JSX without using spread:
|
|
625
|
-
let props = %s;
|
|
626
|
-
<%s key={someKey} {...props} />`, H, S, le, S), Rr[S + H] = !0;
|
|
627
|
-
}
|
|
628
|
-
}
|
|
629
|
-
return r === m ? ne(l) : te(l), l;
|
|
630
|
-
}
|
|
631
|
-
}
|
|
632
|
-
function ie(r, e, a) {
|
|
633
|
-
return _r(r, e, a, !0);
|
|
634
|
-
}
|
|
635
|
-
function se(r, e, a) {
|
|
636
|
-
return _r(r, e, a, !1);
|
|
637
|
-
}
|
|
638
|
-
var oe = se, ue = ie;
|
|
639
|
-
z.Fragment = m, z.jsx = oe, z.jsxs = ue;
|
|
640
|
-
}()), z;
|
|
641
|
-
}
|
|
642
|
-
process.env.NODE_ENV === "production" ? Z.exports = fe() : Z.exports = de();
|
|
643
|
-
var ve = Z.exports;
|
|
644
|
-
const pe = `@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
const l = `@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");
|
|
645
3
|
|
|
646
4
|
* {
|
|
647
5
|
margin: 0;
|
|
@@ -801,33 +159,33 @@ const pe = `@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@3
|
|
|
801
159
|
border-color: #ef4444 !important;
|
|
802
160
|
/* outline-color: #eab308 !important; */
|
|
803
161
|
}
|
|
804
|
-
`,
|
|
805
|
-
if (!document.getElementById(
|
|
806
|
-
const
|
|
807
|
-
|
|
162
|
+
`, e = "starasia-textarea-styles", x = (r) => {
|
|
163
|
+
if (!document.getElementById(e)) {
|
|
164
|
+
const a = document.createElement("style");
|
|
165
|
+
a.id = e, a.textContent = r, document.head.appendChild(a);
|
|
808
166
|
}
|
|
809
167
|
};
|
|
810
|
-
|
|
811
|
-
const
|
|
168
|
+
x(l);
|
|
169
|
+
const g = (r) => {
|
|
812
170
|
const {
|
|
813
|
-
height:
|
|
814
|
-
width:
|
|
815
|
-
resize:
|
|
816
|
-
size:
|
|
817
|
-
status:
|
|
818
|
-
fullWidth:
|
|
819
|
-
...
|
|
820
|
-
} =
|
|
821
|
-
return /* @__PURE__ */
|
|
171
|
+
height: a,
|
|
172
|
+
width: s = "fit-content",
|
|
173
|
+
resize: n,
|
|
174
|
+
size: o = "md",
|
|
175
|
+
status: i,
|
|
176
|
+
fullWidth: d,
|
|
177
|
+
...t
|
|
178
|
+
} = r;
|
|
179
|
+
return /* @__PURE__ */ u(
|
|
822
180
|
"textarea",
|
|
823
181
|
{
|
|
824
|
-
className: `starasia-textarea starasia-textarea-resize-${
|
|
825
|
-
...
|
|
826
|
-
disabled:
|
|
827
|
-
style: { height:
|
|
182
|
+
className: `starasia-textarea starasia-textarea-resize-${n} starasia-textarea-${o} starasia-textarea-${i}`,
|
|
183
|
+
...t,
|
|
184
|
+
disabled: i === "disable" ? !0 : t.disabled,
|
|
185
|
+
style: { height: a, width: d ? "100%" : s, ...t.style }
|
|
828
186
|
}
|
|
829
187
|
);
|
|
830
188
|
};
|
|
831
189
|
export {
|
|
832
|
-
|
|
190
|
+
g as Textarea
|
|
833
191
|
};
|
package/dist/textarea.umd.js
CHANGED
|
@@ -1,35 +1,4 @@
|
|
|
1
|
-
(function(
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var er;function Pr(){if(er)return A;er=1;var R=C,b=Symbol.for("react.element"),W=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,P=R.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,_={key:!0,ref:!0,__self:!0,__source:!0};function T(h,f,j){var p,y={},w=null,L=null;j!==void 0&&(w=""+j),f.key!==void 0&&(w=""+f.key),f.ref!==void 0&&(L=f.ref);for(p in f)m.call(f,p)&&!_.hasOwnProperty(p)&&(y[p]=f[p]);if(h&&h.defaultProps)for(p in f=h.defaultProps,f)y[p]===void 0&&(y[p]=f[p]);return{$$typeof:b,type:h,key:w,ref:L,props:y,_owner:P.current}}return A.Fragment=W,A.jsx=T,A.jsxs=T,A}var I={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.development.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var ar;function jr(){return ar||(ar=1,process.env.NODE_ENV!=="production"&&function(){var R=C,b=Symbol.for("react.element"),W=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),P=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),T=Symbol.for("react.provider"),h=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),j=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),L=Symbol.for("react.offscreen"),nr=Symbol.iterator,Ar="@@iterator";function Ir(r){if(r===null||typeof r!="object")return null;var e=nr&&r[nr]||r[Ar];return typeof e=="function"?e:null}var k=R.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function c(r){{for(var e=arguments.length,a=new Array(e>1?e-1:0),t=1;t<e;t++)a[t-1]=arguments[t];Wr("error",r,a)}}function Wr(r,e,a){{var t=k.ReactDebugCurrentFrame,s=t.getStackAddendum();s!==""&&(e+="%s",a=a.concat([s]));var o=a.map(function(i){return String(i)});o.unshift("Warning: "+e),Function.prototype.apply.call(console[r],console,o)}}var zr=!1,$r=!1,Yr=!1,Lr=!1,Mr=!1,ir;ir=Symbol.for("react.module.reference");function Vr(r){return!!(typeof r=="string"||typeof r=="function"||r===m||r===_||Mr||r===P||r===j||r===p||Lr||r===L||zr||$r||Yr||typeof r=="object"&&r!==null&&(r.$$typeof===w||r.$$typeof===y||r.$$typeof===T||r.$$typeof===h||r.$$typeof===f||r.$$typeof===ir||r.getModuleId!==void 0))}function Nr(r,e,a){var t=r.displayName;if(t)return t;var s=e.displayName||e.name||"";return s!==""?a+"("+s+")":a}function sr(r){return r.displayName||"Context"}function x(r){if(r==null)return null;if(typeof r.tag=="number"&&c("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case m:return"Fragment";case W:return"Portal";case _:return"Profiler";case P:return"StrictMode";case j:return"Suspense";case p:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case h:var e=r;return sr(e)+".Consumer";case T:var a=r;return sr(a._context)+".Provider";case f:return Nr(r,r.render,"ForwardRef");case y:var t=r.displayName||null;return t!==null?t:x(r.type)||"Memo";case w:{var s=r,o=s._payload,i=s._init;try{return x(i(o))}catch{return null}}}return null}var S=Object.assign,z=0,or,ur,lr,cr,fr,dr,vr;function pr(){}pr.__reactDisabledLog=!0;function Ur(){{if(z===0){or=console.log,ur=console.info,lr=console.warn,cr=console.error,fr=console.group,dr=console.groupCollapsed,vr=console.groupEnd;var r={configurable:!0,enumerable:!0,value:pr,writable:!0};Object.defineProperties(console,{info:r,log:r,warn:r,error:r,group:r,groupCollapsed:r,groupEnd:r})}z++}}function Br(){{if(z--,z===0){var r={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:S({},r,{value:or}),info:S({},r,{value:ur}),warn:S({},r,{value:lr}),error:S({},r,{value:cr}),group:S({},r,{value:fr}),groupCollapsed:S({},r,{value:dr}),groupEnd:S({},r,{value:vr})})}z<0&&c("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var q=k.ReactCurrentDispatcher,J;function M(r,e,a){{if(J===void 0)try{throw Error()}catch(s){var t=s.stack.trim().match(/\n( *(at )?)/);J=t&&t[1]||""}return`
|
|
18
|
-
`+J+r}}var K=!1,V;{var qr=typeof WeakMap=="function"?WeakMap:Map;V=new qr}function gr(r,e){if(!r||K)return"";{var a=V.get(r);if(a!==void 0)return a}var t;K=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var o;o=q.current,q.current=null,Ur();try{if(e){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(v){t=v}Reflect.construct(r,[],i)}else{try{i.call()}catch(v){t=v}r.call(i.prototype)}}else{try{throw Error()}catch(v){t=v}r()}}catch(v){if(v&&t&&typeof v.stack=="string"){for(var n=v.stack.split(`
|
|
19
|
-
`),d=t.stack.split(`
|
|
20
|
-
`),u=n.length-1,l=d.length-1;u>=1&&l>=0&&n[u]!==d[l];)l--;for(;u>=1&&l>=0;u--,l--)if(n[u]!==d[l]){if(u!==1||l!==1)do if(u--,l--,l<0||n[u]!==d[l]){var g=`
|
|
21
|
-
`+n[u].replace(" at new "," at ");return r.displayName&&g.includes("<anonymous>")&&(g=g.replace("<anonymous>",r.displayName)),typeof r=="function"&&V.set(r,g),g}while(u>=1&&l>=0);break}}}finally{K=!1,q.current=o,Br(),Error.prepareStackTrace=s}var F=r?r.displayName||r.name:"",O=F?M(F):"";return typeof r=="function"&&V.set(r,O),O}function Jr(r,e,a){return gr(r,!1)}function Kr(r){var e=r.prototype;return!!(e&&e.isReactComponent)}function N(r,e,a){if(r==null)return"";if(typeof r=="function")return gr(r,Kr(r));if(typeof r=="string")return M(r);switch(r){case j:return M("Suspense");case p:return M("SuspenseList")}if(typeof r=="object")switch(r.$$typeof){case f:return Jr(r.render);case y:return N(r.type,e,a);case w:{var t=r,s=t._payload,o=t._init;try{return N(o(s),e,a)}catch{}}}return""}var $=Object.prototype.hasOwnProperty,br={},hr=k.ReactDebugCurrentFrame;function U(r){if(r){var e=r._owner,a=N(r.type,r._source,e?e.type:null);hr.setExtraStackFrame(a)}else hr.setExtraStackFrame(null)}function Gr(r,e,a,t,s){{var o=Function.call.bind($);for(var i in r)if(o(r,i)){var n=void 0;try{if(typeof r[i]!="function"){var d=Error((t||"React class")+": "+a+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}n=r[i](e,i,t,a,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(u){n=u}n&&!(n instanceof Error)&&(U(s),c("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",t||"React class",a,i,typeof n),U(null)),n instanceof Error&&!(n.message in br)&&(br[n.message]=!0,U(s),c("Failed %s type: %s",a,n.message),U(null))}}}var Xr=Array.isArray;function G(r){return Xr(r)}function Hr(r){{var e=typeof Symbol=="function"&&Symbol.toStringTag,a=e&&r[Symbol.toStringTag]||r.constructor.name||"Object";return a}}function Zr(r){try{return xr(r),!1}catch{return!0}}function xr(r){return""+r}function yr(r){if(Zr(r))return c("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Hr(r)),xr(r)}var Y=k.ReactCurrentOwner,Qr={key:!0,ref:!0,__self:!0,__source:!0},mr,Er,X;X={};function re(r){if($.call(r,"ref")){var e=Object.getOwnPropertyDescriptor(r,"ref").get;if(e&&e.isReactWarning)return!1}return r.ref!==void 0}function ee(r){if($.call(r,"key")){var e=Object.getOwnPropertyDescriptor(r,"key").get;if(e&&e.isReactWarning)return!1}return r.key!==void 0}function ae(r,e){if(typeof r.ref=="string"&&Y.current&&e&&Y.current.stateNode!==e){var a=x(Y.current.type);X[a]||(c('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',x(Y.current.type),r.ref),X[a]=!0)}}function te(r,e){{var a=function(){mr||(mr=!0,c("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",e))};a.isReactWarning=!0,Object.defineProperty(r,"key",{get:a,configurable:!0})}}function ne(r,e){{var a=function(){Er||(Er=!0,c("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",e))};a.isReactWarning=!0,Object.defineProperty(r,"ref",{get:a,configurable:!0})}}var ie=function(r,e,a,t,s,o,i){var n={$$typeof:b,type:r,key:e,ref:a,props:i,_owner:o};return n._store={},Object.defineProperty(n._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(n,"_self",{configurable:!1,enumerable:!1,writable:!1,value:t}),Object.defineProperty(n,"_source",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.freeze&&(Object.freeze(n.props),Object.freeze(n)),n};function se(r,e,a,t,s){{var o,i={},n=null,d=null;a!==void 0&&(yr(a),n=""+a),ee(e)&&(yr(e.key),n=""+e.key),re(e)&&(d=e.ref,ae(e,s));for(o in e)$.call(e,o)&&!Qr.hasOwnProperty(o)&&(i[o]=e[o]);if(r&&r.defaultProps){var u=r.defaultProps;for(o in u)i[o]===void 0&&(i[o]=u[o])}if(n||d){var l=typeof r=="function"?r.displayName||r.name||"Unknown":r;n&&te(i,l),d&&ne(i,l)}return ie(r,n,d,s,t,Y.current,i)}}var H=k.ReactCurrentOwner,Rr=k.ReactDebugCurrentFrame;function D(r){if(r){var e=r._owner,a=N(r.type,r._source,e?e.type:null);Rr.setExtraStackFrame(a)}else Rr.setExtraStackFrame(null)}var Z;Z=!1;function Q(r){return typeof r=="object"&&r!==null&&r.$$typeof===b}function _r(){{if(H.current){var r=x(H.current.type);if(r)return`
|
|
22
|
-
|
|
23
|
-
Check the render method of \``+r+"`."}return""}}function oe(r){{if(r!==void 0){var e=r.fileName.replace(/^.*[\\\/]/,""),a=r.lineNumber;return`
|
|
24
|
-
|
|
25
|
-
Check your code at `+e+":"+a+"."}return""}}var Tr={};function ue(r){{var e=_r();if(!e){var a=typeof r=="string"?r:r.displayName||r.name;a&&(e=`
|
|
26
|
-
|
|
27
|
-
Check the top-level render call using <`+a+">.")}return e}}function wr(r,e){{if(!r._store||r._store.validated||r.key!=null)return;r._store.validated=!0;var a=ue(e);if(Tr[a])return;Tr[a]=!0;var t="";r&&r._owner&&r._owner!==H.current&&(t=" It was passed a child from "+x(r._owner.type)+"."),D(r),c('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',a,t),D(null)}}function Sr(r,e){{if(typeof r!="object")return;if(G(r))for(var a=0;a<r.length;a++){var t=r[a];Q(t)&&wr(t,e)}else if(Q(r))r._store&&(r._store.validated=!0);else if(r){var s=Ir(r);if(typeof s=="function"&&s!==r.entries)for(var o=s.call(r),i;!(i=o.next()).done;)Q(i.value)&&wr(i.value,e)}}}function le(r){{var e=r.type;if(e==null||typeof e=="string")return;var a;if(typeof e=="function")a=e.propTypes;else if(typeof e=="object"&&(e.$$typeof===f||e.$$typeof===y))a=e.propTypes;else return;if(a){var t=x(e);Gr(a,r.props,"prop",t,r)}else if(e.PropTypes!==void 0&&!Z){Z=!0;var s=x(e);c("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",s||"Unknown")}typeof e.getDefaultProps=="function"&&!e.getDefaultProps.isReactClassApproved&&c("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ce(r){{for(var e=Object.keys(r.props),a=0;a<e.length;a++){var t=e[a];if(t!=="children"&&t!=="key"){D(r),c("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",t),D(null);break}}r.ref!==null&&(D(r),c("Invalid attribute `ref` supplied to `React.Fragment`."),D(null))}}var Or={};function Cr(r,e,a,t,s,o){{var i=Vr(r);if(!i){var n="";(r===void 0||typeof r=="object"&&r!==null&&Object.keys(r).length===0)&&(n+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var d=oe(s);d?n+=d:n+=_r();var u;r===null?u="null":G(r)?u="array":r!==void 0&&r.$$typeof===b?(u="<"+(x(r.type)||"Unknown")+" />",n=" Did you accidentally export a JSX literal instead of a component?"):u=typeof r,c("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",u,n)}var l=se(r,e,a,s,o);if(l==null)return l;if(i){var g=e.children;if(g!==void 0)if(t)if(G(g)){for(var F=0;F<g.length;F++)Sr(g[F],r);Object.freeze&&Object.freeze(g)}else c("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Sr(g,r)}if($.call(e,"key")){var O=x(r),v=Object.keys(e).filter(function(be){return be!=="key"}),rr=v.length>0?"{key: someKey, "+v.join(": ..., ")+": ...}":"{key: someKey}";if(!Or[O+rr]){var ge=v.length>0?"{"+v.join(": ..., ")+": ...}":"{}";c(`A props object containing a "key" prop is being spread into JSX:
|
|
28
|
-
let props = %s;
|
|
29
|
-
<%s {...props} />
|
|
30
|
-
React keys must be passed directly to JSX without using spread:
|
|
31
|
-
let props = %s;
|
|
32
|
-
<%s key={someKey} {...props} />`,rr,O,ge,O),Or[O+rr]=!0}}return r===m?ce(l):le(l),l}}function fe(r,e,a){return Cr(r,e,a,!0)}function de(r,e,a){return Cr(r,e,a,!1)}var ve=de,pe=fe;I.Fragment=m,I.jsx=ve,I.jsxs=pe}()),I}process.env.NODE_ENV==="production"?B.exports=Pr():B.exports=jr();var kr=B.exports;const Dr=`@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");
|
|
1
|
+
(function(a,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("react/jsx-runtime")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime"],r):(a=typeof globalThis<"u"?globalThis:a||self,r(a.Textarea={},a.jsxRuntime))})(this,function(a,r){"use strict";const o=`@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");
|
|
33
2
|
|
|
34
3
|
* {
|
|
35
4
|
margin: 0;
|
|
@@ -189,4 +158,4 @@ React keys must be passed directly to JSX without using spread:
|
|
|
189
158
|
border-color: #ef4444 !important;
|
|
190
159
|
/* outline-color: #eab308 !important; */
|
|
191
160
|
}
|
|
192
|
-
`,
|
|
161
|
+
`,s="starasia-textarea-styles";(e=>{if(!document.getElementById(s)){const t=document.createElement("style");t.id=s,t.textContent=e,document.head.appendChild(t)}})(o);const d=e=>{const{height:t,width:u="fit-content",resize:l,size:x="md",status:n,fullWidth:c,...i}=e;return r.jsx("textarea",{className:`starasia-textarea starasia-textarea-resize-${l} starasia-textarea-${x} starasia-textarea-${n}`,...i,disabled:n==="disable"?!0:i.disabled,style:{height:t,width:c?"100%":u,...i.style}})};a.Textarea=d,Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@starasia/textarea",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "textarea component for starasia UI",
|
|
5
5
|
"author": "Prawito Hudoro",
|
|
6
6
|
"main": "dist/textarea.umd.js",
|
|
@@ -12,10 +12,6 @@
|
|
|
12
12
|
"dist/*.map",
|
|
13
13
|
"dist/*.css"
|
|
14
14
|
],
|
|
15
|
-
"scripts": {
|
|
16
|
-
"dev": "vite --config vite.config.ts --port 3000",
|
|
17
|
-
"build": "vite build --config vite.config.ts"
|
|
18
|
-
},
|
|
19
15
|
"keywords": [],
|
|
20
16
|
"license": "ISC",
|
|
21
17
|
"type": "module",
|
|
@@ -37,5 +33,9 @@
|
|
|
37
33
|
"react-dom": "^18.2.0",
|
|
38
34
|
"@types/react": "^18.2.55",
|
|
39
35
|
"@types/react-dom": "^18.2.19"
|
|
36
|
+
},
|
|
37
|
+
"scripts": {
|
|
38
|
+
"dev": "vite --config vite.config.ts --port 3000",
|
|
39
|
+
"build": "vite build --config vite.config.ts"
|
|
40
40
|
}
|
|
41
|
-
}
|
|
41
|
+
}
|