@purpurds/text-area 8.2.2 → 8.2.4
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/LICENSE.txt +3 -10
- package/dist/text-area.cjs.js +6 -6
- package/dist/text-area.cjs.js.map +1 -1
- package/dist/text-area.es.js +188 -193
- package/dist/text-area.es.js.map +1 -1
- package/package.json +8 -8
package/dist/text-area.es.js
CHANGED
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as _, jsx as p } from "react/jsx-runtime";
|
|
2
2
|
import * as l from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { forwardRef as Z } from "react";
|
|
4
4
|
import "react-dom";
|
|
5
|
-
|
|
5
|
+
import { useColorScheme as W } from "@purpurds/theme";
|
|
6
|
+
function F(r) {
|
|
6
7
|
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
7
8
|
}
|
|
8
|
-
var
|
|
9
|
+
var w = { exports: {} };
|
|
9
10
|
/*!
|
|
10
11
|
Copyright (c) 2018 Jed Watson.
|
|
11
12
|
Licensed under the MIT License (MIT), see
|
|
12
13
|
http://jedwatson.github.io/classnames
|
|
13
14
|
*/
|
|
14
|
-
var
|
|
15
|
-
function
|
|
16
|
-
return
|
|
15
|
+
var q;
|
|
16
|
+
function z() {
|
|
17
|
+
return q || (q = 1, (function(r) {
|
|
17
18
|
(function() {
|
|
18
|
-
var
|
|
19
|
+
var i = {}.hasOwnProperty;
|
|
19
20
|
function n() {
|
|
20
21
|
for (var e = "", t = 0; t < arguments.length; t++) {
|
|
21
22
|
var o = arguments[t];
|
|
22
|
-
o && (e = u(e,
|
|
23
|
+
o && (e = u(e, a.call(this, o)));
|
|
23
24
|
}
|
|
24
25
|
return e;
|
|
25
26
|
}
|
|
26
|
-
function
|
|
27
|
+
function a(e) {
|
|
27
28
|
if (typeof e == "string" || typeof e == "number")
|
|
28
29
|
return this && this[e] || e;
|
|
29
30
|
if (typeof e != "object")
|
|
@@ -34,7 +35,7 @@ function H() {
|
|
|
34
35
|
return e.toString();
|
|
35
36
|
var t = "";
|
|
36
37
|
for (var o in e)
|
|
37
|
-
|
|
38
|
+
i.call(e, o) && e[o] && (t = u(t, this && this[o] || o));
|
|
38
39
|
return t;
|
|
39
40
|
}
|
|
40
41
|
function u(e, t) {
|
|
@@ -42,10 +43,10 @@ function H() {
|
|
|
42
43
|
}
|
|
43
44
|
r.exports ? (n.default = n, r.exports = n) : window.classNames = n;
|
|
44
45
|
})();
|
|
45
|
-
}(
|
|
46
|
+
})(w)), w.exports;
|
|
46
47
|
}
|
|
47
|
-
var
|
|
48
|
-
const
|
|
48
|
+
var L = z();
|
|
49
|
+
const k = /* @__PURE__ */ F(L), H = {
|
|
49
50
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
50
51
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
51
52
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -53,50 +54,50 @@ const J = /* @__PURE__ */ k(G), K = {
|
|
|
53
54
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
54
55
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
55
56
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
56
|
-
},
|
|
57
|
+
}, G = k.bind(H), S = "purpur-icon", J = "md", K = (r) => r.filter((i) => Object.keys(i).length >= 1).map((i) => `${i.name}="${i.value}"`).join(" "), Q = ({ content: r = "", title: i } = {}) => {
|
|
57
58
|
const n = [
|
|
58
59
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
59
60
|
{ name: "fill", value: "currentColor" },
|
|
60
61
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
61
|
-
|
|
62
|
-
],
|
|
63
|
-
return `<svg ${
|
|
64
|
-
},
|
|
65
|
-
const e =
|
|
66
|
-
content:
|
|
67
|
-
title:
|
|
68
|
-
}), t =
|
|
69
|
-
return /* @__PURE__ */
|
|
62
|
+
i ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
63
|
+
], a = i ? `<title>${i}</title>` : "";
|
|
64
|
+
return `<svg ${K(n)}>${a}${r}</svg>`;
|
|
65
|
+
}, T = (r) => r.replace(/<(\/?)svg([^>]*)>/g, "").trim(), B = ({ svg: r, allyTitle: i, className: n, size: a = J, ...u }) => {
|
|
66
|
+
const e = Q({
|
|
67
|
+
content: T(r.svg),
|
|
68
|
+
title: i
|
|
69
|
+
}), t = G(n, S, `${S}--${a}`);
|
|
70
|
+
return /* @__PURE__ */ p("span", { className: t, dangerouslySetInnerHTML: { __html: e }, ...u });
|
|
70
71
|
};
|
|
71
|
-
|
|
72
|
-
const
|
|
72
|
+
B.displayName = "Icon";
|
|
73
|
+
const U = {
|
|
73
74
|
name: "error-filled",
|
|
74
75
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 24" fill="currentColor"><path fill-rule="evenodd" d="M14.268 3.5c-.77-1.333-2.694-1.333-3.464 0l-8.66 15c-.77 1.333.192 3 1.732 3h17.32c1.54 0 2.502-1.667 1.733-3l-8.66-15Zm-.694 5.067-.247 6.876h-1.566l-.247-6.876a1.03 1.03 0 1 1 2.06 0Zm.212 8.917c0 .649-.585 1.234-1.25 1.234-.648 0-1.25-.585-1.25-1.234 0-.633.602-1.234 1.25-1.234.665 0 1.25.601 1.25 1.234Z" clip-rule="evenodd"/></svg>',
|
|
75
76
|
keywords: ["error-filled"],
|
|
76
77
|
category: "status"
|
|
77
78
|
};
|
|
78
|
-
function
|
|
79
|
+
function X(r) {
|
|
79
80
|
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
80
81
|
}
|
|
81
|
-
var
|
|
82
|
+
var N = { exports: {} };
|
|
82
83
|
/*!
|
|
83
84
|
Copyright (c) 2018 Jed Watson.
|
|
84
85
|
Licensed under the MIT License (MIT), see
|
|
85
86
|
http://jedwatson.github.io/classnames
|
|
86
87
|
*/
|
|
87
|
-
var
|
|
88
|
-
function
|
|
89
|
-
return
|
|
88
|
+
var O;
|
|
89
|
+
function Y() {
|
|
90
|
+
return O || (O = 1, (function(r) {
|
|
90
91
|
(function() {
|
|
91
|
-
var
|
|
92
|
+
var i = {}.hasOwnProperty;
|
|
92
93
|
function n() {
|
|
93
94
|
for (var e = "", t = 0; t < arguments.length; t++) {
|
|
94
95
|
var o = arguments[t];
|
|
95
|
-
o && (e = u(e,
|
|
96
|
+
o && (e = u(e, a.call(this, o)));
|
|
96
97
|
}
|
|
97
98
|
return e;
|
|
98
99
|
}
|
|
99
|
-
function
|
|
100
|
+
function a(e) {
|
|
100
101
|
if (typeof e == "string" || typeof e == "number")
|
|
101
102
|
return this && this[e] || e;
|
|
102
103
|
if (typeof e != "object")
|
|
@@ -107,7 +108,7 @@ function ne() {
|
|
|
107
108
|
return e.toString();
|
|
108
109
|
var t = "";
|
|
109
110
|
for (var o in e)
|
|
110
|
-
|
|
111
|
+
i.call(e, o) && e[o] && (t = u(t, this && this[o] || o));
|
|
111
112
|
return t;
|
|
112
113
|
}
|
|
113
114
|
function u(e, t) {
|
|
@@ -115,56 +116,56 @@ function ne() {
|
|
|
115
116
|
}
|
|
116
117
|
r.exports ? (n.default = n, r.exports = n) : window.classNames = n;
|
|
117
118
|
})();
|
|
118
|
-
}(
|
|
119
|
+
})(N)), N.exports;
|
|
119
120
|
}
|
|
120
|
-
var
|
|
121
|
-
const
|
|
121
|
+
var ee = Y();
|
|
122
|
+
const re = /* @__PURE__ */ X(ee), te = {
|
|
122
123
|
"purpur-field-error-text": "_purpur-field-error-text_u1cy2_1",
|
|
123
124
|
"purpur-field-error-text--negative": "_purpur-field-error-text--negative_u1cy2_11",
|
|
124
125
|
"purpur-field-error-text__icon": "_purpur-field-error-text__icon_u1cy2_14"
|
|
125
|
-
},
|
|
126
|
+
}, j = re.bind(te), h = "purpur-field-error-text", ne = ({
|
|
126
127
|
children: r,
|
|
127
|
-
className:
|
|
128
|
+
className: i,
|
|
128
129
|
negative: n = !1,
|
|
129
|
-
["aria-relevant"]:
|
|
130
|
+
["aria-relevant"]: a = "additions text",
|
|
130
131
|
...u
|
|
131
|
-
}) => /* @__PURE__ */
|
|
132
|
+
}) => /* @__PURE__ */ _(
|
|
132
133
|
"div",
|
|
133
134
|
{
|
|
134
|
-
className:
|
|
135
|
+
className: j(i, h, {
|
|
135
136
|
[`${h}--negative`]: n
|
|
136
137
|
}),
|
|
137
138
|
"aria-live": "assertive",
|
|
138
|
-
"aria-relevant":
|
|
139
|
+
"aria-relevant": a,
|
|
139
140
|
...u,
|
|
140
141
|
children: [
|
|
141
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ p(B, { svg: U, size: "xs", className: j(`${h}__icon`) }),
|
|
142
143
|
r
|
|
143
144
|
]
|
|
144
145
|
}
|
|
145
146
|
);
|
|
146
|
-
function
|
|
147
|
+
function ae(r) {
|
|
147
148
|
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
148
149
|
}
|
|
149
|
-
var
|
|
150
|
+
var A = { exports: {} };
|
|
150
151
|
/*!
|
|
151
152
|
Copyright (c) 2018 Jed Watson.
|
|
152
153
|
Licensed under the MIT License (MIT), see
|
|
153
154
|
http://jedwatson.github.io/classnames
|
|
154
155
|
*/
|
|
155
|
-
var
|
|
156
|
-
function
|
|
157
|
-
return
|
|
156
|
+
var P;
|
|
157
|
+
function ie() {
|
|
158
|
+
return P || (P = 1, (function(r) {
|
|
158
159
|
(function() {
|
|
159
|
-
var
|
|
160
|
+
var i = {}.hasOwnProperty;
|
|
160
161
|
function n() {
|
|
161
162
|
for (var e = "", t = 0; t < arguments.length; t++) {
|
|
162
163
|
var o = arguments[t];
|
|
163
|
-
o && (e = u(e,
|
|
164
|
+
o && (e = u(e, a.call(this, o)));
|
|
164
165
|
}
|
|
165
166
|
return e;
|
|
166
167
|
}
|
|
167
|
-
function
|
|
168
|
+
function a(e) {
|
|
168
169
|
if (typeof e == "string" || typeof e == "number")
|
|
169
170
|
return this && this[e] || e;
|
|
170
171
|
if (typeof e != "object")
|
|
@@ -175,7 +176,7 @@ function se() {
|
|
|
175
176
|
return e.toString();
|
|
176
177
|
var t = "";
|
|
177
178
|
for (var o in e)
|
|
178
|
-
|
|
179
|
+
i.call(e, o) && e[o] && (t = u(t, this && this[o] || o));
|
|
179
180
|
return t;
|
|
180
181
|
}
|
|
181
182
|
function u(e, t) {
|
|
@@ -183,86 +184,93 @@ function se() {
|
|
|
183
184
|
}
|
|
184
185
|
r.exports ? (n.default = n, r.exports = n) : window.classNames = n;
|
|
185
186
|
})();
|
|
186
|
-
}(
|
|
187
|
+
})(A)), A.exports;
|
|
187
188
|
}
|
|
188
|
-
var
|
|
189
|
-
const
|
|
189
|
+
var ue = ie();
|
|
190
|
+
const oe = /* @__PURE__ */ ae(ue), le = {
|
|
190
191
|
"purpur-field-helper-text": "_purpur-field-helper-text_11nsh_1",
|
|
191
192
|
"purpur-field-helper-text--disabled": "_purpur-field-helper-text--disabled_11nsh_9",
|
|
192
193
|
"purpur-field-helper-text--negative": "_purpur-field-helper-text--negative_11nsh_12"
|
|
193
|
-
},
|
|
194
|
+
}, se = oe.bind(le), m = "purpur-field-helper-text", pe = ({
|
|
194
195
|
children: r,
|
|
195
|
-
className:
|
|
196
|
+
className: i,
|
|
196
197
|
disabled: n,
|
|
197
|
-
id:
|
|
198
|
+
id: a,
|
|
198
199
|
negative: u,
|
|
199
200
|
...e
|
|
200
201
|
}) => {
|
|
201
|
-
const t =
|
|
202
|
-
[`${
|
|
203
|
-
[`${
|
|
202
|
+
const t = se(i, m, {
|
|
203
|
+
[`${m}--disabled`]: n,
|
|
204
|
+
[`${m}--negative`]: u
|
|
204
205
|
});
|
|
205
|
-
return /* @__PURE__ */
|
|
206
|
+
return /* @__PURE__ */ p("span", { id: a, className: t, ...e, children: r });
|
|
206
207
|
};
|
|
207
|
-
function
|
|
208
|
+
function C(r, i) {
|
|
208
209
|
if (typeof r == "function")
|
|
209
|
-
return r(
|
|
210
|
-
r != null && (r.current =
|
|
210
|
+
return r(i);
|
|
211
|
+
r != null && (r.current = i);
|
|
211
212
|
}
|
|
212
|
-
function
|
|
213
|
-
return (
|
|
213
|
+
function ce(...r) {
|
|
214
|
+
return (i) => {
|
|
214
215
|
let n = !1;
|
|
215
|
-
const
|
|
216
|
-
const e =
|
|
216
|
+
const a = r.map((u) => {
|
|
217
|
+
const e = C(u, i);
|
|
217
218
|
return !n && typeof e == "function" && (n = !0), e;
|
|
218
219
|
});
|
|
219
220
|
if (n)
|
|
220
221
|
return () => {
|
|
221
|
-
for (let u = 0; u <
|
|
222
|
-
const e =
|
|
223
|
-
typeof e == "function" ? e() :
|
|
222
|
+
for (let u = 0; u < a.length; u++) {
|
|
223
|
+
const e = a[u];
|
|
224
|
+
typeof e == "function" ? e() : C(r[u], null);
|
|
224
225
|
}
|
|
225
226
|
};
|
|
226
227
|
};
|
|
227
228
|
}
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
const
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
229
|
+
// @__NO_SIDE_EFFECTS__
|
|
230
|
+
function de(r) {
|
|
231
|
+
const i = /* @__PURE__ */ fe(r), n = l.forwardRef((a, u) => {
|
|
232
|
+
const { children: e, ...t } = a, o = l.Children.toArray(e), s = o.find(xe);
|
|
233
|
+
if (s) {
|
|
234
|
+
const d = s.props.children, x = o.map((f) => f === s ? l.Children.count(d) > 1 ? l.Children.only(null) : l.isValidElement(d) ? d.props.children : null : f);
|
|
235
|
+
return /* @__PURE__ */ p(i, { ...t, ref: u, children: l.isValidElement(d) ? l.cloneElement(d, void 0, x) : null });
|
|
236
|
+
}
|
|
237
|
+
return /* @__PURE__ */ p(i, { ...t, ref: u, children: e });
|
|
238
|
+
});
|
|
239
|
+
return n.displayName = `${r}.Slot`, n;
|
|
240
|
+
}
|
|
241
|
+
// @__NO_SIDE_EFFECTS__
|
|
242
|
+
function fe(r) {
|
|
243
|
+
const i = l.forwardRef((n, a) => {
|
|
244
|
+
const { children: u, ...e } = n;
|
|
245
|
+
if (l.isValidElement(u)) {
|
|
246
|
+
const t = he(u), o = ve(e, u.props);
|
|
247
|
+
return u.type !== l.Fragment && (o.ref = a ? ce(a, t) : t), l.cloneElement(u, o);
|
|
248
|
+
}
|
|
249
|
+
return l.Children.count(u) > 1 ? l.Children.only(null) : null;
|
|
250
|
+
});
|
|
251
|
+
return i.displayName = `${r}.SlotClone`, i;
|
|
252
|
+
}
|
|
253
|
+
var _e = Symbol("radix.slottable");
|
|
254
|
+
function xe(r) {
|
|
255
|
+
return l.isValidElement(r) && typeof r.type == "function" && "__radixId" in r.type && r.type.__radixId === _e;
|
|
249
256
|
}
|
|
250
|
-
function
|
|
251
|
-
const n = { ...
|
|
252
|
-
for (const
|
|
253
|
-
const u = r[
|
|
254
|
-
/^on[A-Z]/.test(
|
|
255
|
-
e(...t)
|
|
256
|
-
|
|
257
|
+
function ve(r, i) {
|
|
258
|
+
const n = { ...i };
|
|
259
|
+
for (const a in i) {
|
|
260
|
+
const u = r[a], e = i[a];
|
|
261
|
+
/^on[A-Z]/.test(a) ? u && e ? n[a] = (...t) => {
|
|
262
|
+
const o = e(...t);
|
|
263
|
+
return u(...t), o;
|
|
264
|
+
} : u && (n[a] = u) : a === "style" ? n[a] = { ...u, ...e } : a === "className" && (n[a] = [u, e].filter(Boolean).join(" "));
|
|
257
265
|
}
|
|
258
266
|
return { ...r, ...n };
|
|
259
267
|
}
|
|
260
|
-
function
|
|
261
|
-
var
|
|
262
|
-
let
|
|
263
|
-
return u ? r.ref : (
|
|
268
|
+
function he(r) {
|
|
269
|
+
var i, n;
|
|
270
|
+
let a = (i = Object.getOwnPropertyDescriptor(r.props, "ref")) == null ? void 0 : i.get, u = a && "isReactWarning" in a && a.isReactWarning;
|
|
271
|
+
return u ? r.ref : (a = (n = Object.getOwnPropertyDescriptor(r, "ref")) == null ? void 0 : n.get, u = a && "isReactWarning" in a && a.isReactWarning, u ? r.props.ref : r.props.ref || r.ref);
|
|
264
272
|
}
|
|
265
|
-
var
|
|
273
|
+
var me = [
|
|
266
274
|
"a",
|
|
267
275
|
"button",
|
|
268
276
|
"div",
|
|
@@ -276,50 +284,51 @@ var ye = [
|
|
|
276
284
|
"nav",
|
|
277
285
|
"ol",
|
|
278
286
|
"p",
|
|
287
|
+
"select",
|
|
279
288
|
"span",
|
|
280
289
|
"svg",
|
|
281
290
|
"ul"
|
|
282
|
-
],
|
|
283
|
-
const n = l.forwardRef((
|
|
284
|
-
const { asChild:
|
|
285
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ s
|
|
291
|
+
], ye = me.reduce((r, i) => {
|
|
292
|
+
const n = /* @__PURE__ */ de(`Primitive.${i}`), a = l.forwardRef((u, e) => {
|
|
293
|
+
const { asChild: t, ...o } = u, s = t ? n : i;
|
|
294
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ p(s, { ...o, ref: e });
|
|
286
295
|
});
|
|
287
|
-
return
|
|
288
|
-
}, {}),
|
|
289
|
-
|
|
296
|
+
return a.displayName = `Primitive.${i}`, { ...r, [i]: a };
|
|
297
|
+
}, {}), ge = "Label", D = l.forwardRef((r, i) => /* @__PURE__ */ p(
|
|
298
|
+
ye.label,
|
|
290
299
|
{
|
|
291
300
|
...r,
|
|
292
|
-
ref:
|
|
301
|
+
ref: i,
|
|
293
302
|
onMouseDown: (n) => {
|
|
294
|
-
var
|
|
295
|
-
n.target.closest("button, input, select, textarea") || ((
|
|
303
|
+
var a;
|
|
304
|
+
n.target.closest("button, input, select, textarea") || ((a = r.onMouseDown) == null || a.call(r, n), !n.defaultPrevented && n.detail > 1 && n.preventDefault());
|
|
296
305
|
}
|
|
297
306
|
}
|
|
298
307
|
));
|
|
299
|
-
|
|
300
|
-
var
|
|
301
|
-
function
|
|
308
|
+
D.displayName = ge;
|
|
309
|
+
var be = D;
|
|
310
|
+
function $e(r) {
|
|
302
311
|
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
303
312
|
}
|
|
304
|
-
var
|
|
313
|
+
var R = { exports: {} };
|
|
305
314
|
/*!
|
|
306
315
|
Copyright (c) 2018 Jed Watson.
|
|
307
316
|
Licensed under the MIT License (MIT), see
|
|
308
317
|
http://jedwatson.github.io/classnames
|
|
309
318
|
*/
|
|
310
|
-
var
|
|
311
|
-
function
|
|
312
|
-
return
|
|
319
|
+
var M;
|
|
320
|
+
function we() {
|
|
321
|
+
return M || (M = 1, (function(r) {
|
|
313
322
|
(function() {
|
|
314
|
-
var
|
|
323
|
+
var i = {}.hasOwnProperty;
|
|
315
324
|
function n() {
|
|
316
325
|
for (var e = "", t = 0; t < arguments.length; t++) {
|
|
317
326
|
var o = arguments[t];
|
|
318
|
-
o && (e = u(e,
|
|
327
|
+
o && (e = u(e, a.call(this, o)));
|
|
319
328
|
}
|
|
320
329
|
return e;
|
|
321
330
|
}
|
|
322
|
-
function
|
|
331
|
+
function a(e) {
|
|
323
332
|
if (typeof e == "string" || typeof e == "number")
|
|
324
333
|
return this && this[e] || e;
|
|
325
334
|
if (typeof e != "object")
|
|
@@ -330,7 +339,7 @@ function qe() {
|
|
|
330
339
|
return e.toString();
|
|
331
340
|
var t = "";
|
|
332
341
|
for (var o in e)
|
|
333
|
-
|
|
342
|
+
i.call(e, o) && e[o] && (t = u(t, this && this[o] || o));
|
|
334
343
|
return t;
|
|
335
344
|
}
|
|
336
345
|
function u(e, t) {
|
|
@@ -338,62 +347,48 @@ function qe() {
|
|
|
338
347
|
}
|
|
339
348
|
r.exports ? (n.default = n, r.exports = n) : window.classNames = n;
|
|
340
349
|
})();
|
|
341
|
-
}(
|
|
350
|
+
})(R)), R.exports;
|
|
342
351
|
}
|
|
343
|
-
var
|
|
344
|
-
const
|
|
352
|
+
var qe = we();
|
|
353
|
+
const Se = /* @__PURE__ */ $e(qe), Ne = {
|
|
345
354
|
"purpur-label": "_purpur-label_1x80u_1",
|
|
346
355
|
"purpur-label--negative": "_purpur-label--negative_1x80u_8",
|
|
347
356
|
"purpur-label--disabled": "_purpur-label--disabled_1x80u_11"
|
|
348
|
-
},
|
|
357
|
+
}, Oe = Se.bind(Ne), y = "purpur-label", je = ({
|
|
349
358
|
children: r,
|
|
350
|
-
className:
|
|
359
|
+
className: i,
|
|
351
360
|
disabled: n,
|
|
352
|
-
negative:
|
|
361
|
+
negative: a = !1,
|
|
353
362
|
...u
|
|
354
363
|
}) => {
|
|
355
|
-
const e =
|
|
356
|
-
[`${
|
|
357
|
-
[`${
|
|
364
|
+
const e = Oe(i, y, {
|
|
365
|
+
[`${y}--disabled`]: n,
|
|
366
|
+
[`${y}--negative`]: a
|
|
358
367
|
});
|
|
359
|
-
return /* @__PURE__ */
|
|
360
|
-
}, Pe = I({
|
|
361
|
-
colorScheme: "light",
|
|
362
|
-
currentColorScheme: "light",
|
|
363
|
-
setColorScheme: () => {
|
|
364
|
-
},
|
|
365
|
-
options: {}
|
|
366
|
-
}), Re = () => {
|
|
367
|
-
const r = L(Pe);
|
|
368
|
-
if (!r)
|
|
369
|
-
throw new Error("useTheme must be used within a ThemeProvider");
|
|
370
|
-
return r;
|
|
371
|
-
}, Ee = () => {
|
|
372
|
-
const { currentColorScheme: r, setColorScheme: a } = Re();
|
|
373
|
-
return [r, a];
|
|
368
|
+
return /* @__PURE__ */ p(be, { className: e, ...u, children: r });
|
|
374
369
|
};
|
|
375
|
-
function
|
|
370
|
+
function Ae(r) {
|
|
376
371
|
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
377
372
|
}
|
|
378
|
-
var
|
|
373
|
+
var g = { exports: {} };
|
|
379
374
|
/*!
|
|
380
375
|
Copyright (c) 2018 Jed Watson.
|
|
381
376
|
Licensed under the MIT License (MIT), see
|
|
382
377
|
http://jedwatson.github.io/classnames
|
|
383
378
|
*/
|
|
384
379
|
var E;
|
|
385
|
-
function
|
|
386
|
-
return E || (E = 1, function(r) {
|
|
380
|
+
function Pe() {
|
|
381
|
+
return E || (E = 1, (function(r) {
|
|
387
382
|
(function() {
|
|
388
|
-
var
|
|
383
|
+
var i = {}.hasOwnProperty;
|
|
389
384
|
function n() {
|
|
390
385
|
for (var e = "", t = 0; t < arguments.length; t++) {
|
|
391
386
|
var o = arguments[t];
|
|
392
|
-
o && (e = u(e,
|
|
387
|
+
o && (e = u(e, a.call(this, o)));
|
|
393
388
|
}
|
|
394
389
|
return e;
|
|
395
390
|
}
|
|
396
|
-
function
|
|
391
|
+
function a(e) {
|
|
397
392
|
if (typeof e == "string" || typeof e == "number")
|
|
398
393
|
return this && this[e] || e;
|
|
399
394
|
if (typeof e != "object")
|
|
@@ -404,7 +399,7 @@ function De() {
|
|
|
404
399
|
return e.toString();
|
|
405
400
|
var t = "";
|
|
406
401
|
for (var o in e)
|
|
407
|
-
|
|
402
|
+
i.call(e, o) && e[o] && (t = u(t, this && this[o] || o));
|
|
408
403
|
return t;
|
|
409
404
|
}
|
|
410
405
|
function u(e, t) {
|
|
@@ -412,10 +407,10 @@ function De() {
|
|
|
412
407
|
}
|
|
413
408
|
r.exports ? (n.default = n, r.exports = n) : window.classNames = n;
|
|
414
409
|
})();
|
|
415
|
-
}(
|
|
410
|
+
})(g)), g.exports;
|
|
416
411
|
}
|
|
417
|
-
var
|
|
418
|
-
const
|
|
412
|
+
var Ce = Pe();
|
|
413
|
+
const Re = /* @__PURE__ */ Ae(Ce), $ = {
|
|
419
414
|
"purpur-text-area": "_purpur-text-area_1qqf0_1",
|
|
420
415
|
"purpur-text-area__label": "_purpur-text-area__label_1qqf0_8",
|
|
421
416
|
"purpur-text-area__label-text": "_purpur-text-area__label-text_1qqf0_13",
|
|
@@ -428,66 +423,66 @@ const Ve = /* @__PURE__ */ Me(Be), b = {
|
|
|
428
423
|
"purpur-text-area__textarea--dark": "_purpur-text-area__textarea--dark_1qqf0_60",
|
|
429
424
|
"purpur-text-area__textarea--valid": "_purpur-text-area__textarea--valid_1qqf0_91",
|
|
430
425
|
"purpur-text-area__textarea--error": "_purpur-text-area__textarea--error_1qqf0_91"
|
|
431
|
-
},
|
|
426
|
+
}, b = Re.bind($), c = "purpur-text-area", Me = Z(
|
|
432
427
|
({
|
|
433
428
|
id: r,
|
|
434
|
-
["data-testid"]:
|
|
429
|
+
["data-testid"]: i,
|
|
435
430
|
className: n,
|
|
436
|
-
errorText:
|
|
431
|
+
errorText: a,
|
|
437
432
|
helperText: u,
|
|
438
433
|
label: e,
|
|
439
434
|
rows: t = 3,
|
|
440
435
|
cols: o = 90,
|
|
441
|
-
...
|
|
442
|
-
},
|
|
443
|
-
const [
|
|
444
|
-
[`${c}__textarea-container--disabled`]:
|
|
445
|
-
[`${c}__textarea-container--readonly`]:
|
|
436
|
+
...s
|
|
437
|
+
}, d) => {
|
|
438
|
+
const [x] = W(), f = (I) => i ? `${i}-${I}` : void 0, v = u ? `${r}-helper-text` : void 0, V = b(`${c}__textarea-container`, {
|
|
439
|
+
[`${c}__textarea-container--disabled`]: s.disabled,
|
|
440
|
+
[`${c}__textarea-container--readonly`]: s.readOnly && !s.disabled
|
|
446
441
|
});
|
|
447
|
-
return /* @__PURE__ */
|
|
448
|
-
e && /* @__PURE__ */
|
|
449
|
-
|
|
442
|
+
return /* @__PURE__ */ _("div", { className: b(n, c), "data-testid": i, children: [
|
|
443
|
+
e && /* @__PURE__ */ _(
|
|
444
|
+
je,
|
|
450
445
|
{
|
|
451
446
|
htmlFor: r,
|
|
452
|
-
disabled:
|
|
453
|
-
className:
|
|
454
|
-
"data-testid":
|
|
447
|
+
disabled: s.disabled,
|
|
448
|
+
className: $[`${c}__label`],
|
|
449
|
+
"data-testid": f("label"),
|
|
455
450
|
children: [
|
|
456
|
-
|
|
451
|
+
s.required && /* @__PURE__ */ p("span", { "aria-hidden": !0, children: "*" }),
|
|
457
452
|
e
|
|
458
453
|
]
|
|
459
454
|
}
|
|
460
455
|
),
|
|
461
|
-
/* @__PURE__ */
|
|
462
|
-
/* @__PURE__ */
|
|
456
|
+
/* @__PURE__ */ _("div", { className: V, children: [
|
|
457
|
+
/* @__PURE__ */ p(
|
|
463
458
|
"textarea",
|
|
464
459
|
{
|
|
465
|
-
...
|
|
466
|
-
ref:
|
|
460
|
+
...s,
|
|
461
|
+
ref: d,
|
|
467
462
|
id: r,
|
|
468
|
-
"data-testid":
|
|
469
|
-
"aria-describedby":
|
|
470
|
-
"aria-invalid":
|
|
471
|
-
className:
|
|
463
|
+
"data-testid": f("textarea"),
|
|
464
|
+
"aria-describedby": s["aria-describedby"] || v,
|
|
465
|
+
"aria-invalid": s["aria-invalid"] || !!a,
|
|
466
|
+
className: b(
|
|
472
467
|
`${c}__textarea`,
|
|
473
|
-
`${c}__textarea--${
|
|
468
|
+
`${c}__textarea--${x}`,
|
|
474
469
|
{
|
|
475
|
-
[`${c}__textarea--error`]: !!
|
|
470
|
+
[`${c}__textarea--error`]: !!a
|
|
476
471
|
}
|
|
477
472
|
),
|
|
478
473
|
rows: t,
|
|
479
474
|
cols: o
|
|
480
475
|
}
|
|
481
476
|
),
|
|
482
|
-
/* @__PURE__ */
|
|
477
|
+
/* @__PURE__ */ p("div", { className: $[`${c}__frame`] })
|
|
483
478
|
] }),
|
|
484
|
-
|
|
485
|
-
|
|
479
|
+
v && /* @__PURE__ */ p(pe, { "data-testid": f("helper-text"), id: v, children: u }),
|
|
480
|
+
a && /* @__PURE__ */ p(ne, { "data-testid": f("error-text"), children: a })
|
|
486
481
|
] });
|
|
487
482
|
}
|
|
488
483
|
);
|
|
489
|
-
|
|
484
|
+
Me.displayName = "TextArea";
|
|
490
485
|
export {
|
|
491
|
-
|
|
486
|
+
Me as TextArea
|
|
492
487
|
};
|
|
493
488
|
//# sourceMappingURL=text-area.es.js.map
|