@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.
@@ -1,29 +1,30 @@
1
- import { jsxs as f, jsx as s, Fragment as z } from "react/jsx-runtime";
1
+ import { jsxs as _, jsx as p } from "react/jsx-runtime";
2
2
  import * as l from "react";
3
- import { createContext as I, useContext as L, forwardRef as T } from "react";
3
+ import { forwardRef as Z } from "react";
4
4
  import "react-dom";
5
- function k(r) {
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 $ = { exports: {} };
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 w;
15
- function H() {
16
- return w || (w = 1, function(r) {
15
+ var q;
16
+ function z() {
17
+ return q || (q = 1, (function(r) {
17
18
  (function() {
18
- var a = {}.hasOwnProperty;
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, i.call(this, o)));
23
+ o && (e = u(e, a.call(this, o)));
23
24
  }
24
25
  return e;
25
26
  }
26
- function i(e) {
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
- a.call(e, o) && e[o] && (t = u(t, this && this[o] || o));
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
- }($)), $.exports;
46
+ })(w)), w.exports;
46
47
  }
47
- var G = H();
48
- const J = /* @__PURE__ */ k(G), K = {
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
- }, Q = J.bind(K), S = "purpur-icon", U = "md", X = (r) => r.filter((a) => Object.keys(a).length >= 1).map((a) => `${a.name}="${a.value}"`).join(" "), Y = ({ content: r = "", title: a } = {}) => {
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
- a ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
62
- ], i = a ? `<title>${a}</title>` : "";
63
- return `<svg ${X(n)}>${i}${r}</svg>`;
64
- }, ee = (r) => r.replace(/<(\/?)svg([^>]*)>/g, "").trim(), M = ({ svg: r, allyTitle: a, className: n, size: i = U, ...u }) => {
65
- const e = Y({
66
- content: ee(r.svg),
67
- title: a
68
- }), t = Q(n, S, `${S}--${i}`);
69
- return /* @__PURE__ */ s("span", { className: t, dangerouslySetInnerHTML: { __html: e }, ...u });
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
- M.displayName = "Icon";
72
- const re = {
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 te(r) {
79
+ function X(r) {
79
80
  return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
80
81
  }
81
- var q = { exports: {} };
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 N;
88
- function ne() {
89
- return N || (N = 1, function(r) {
88
+ var O;
89
+ function Y() {
90
+ return O || (O = 1, (function(r) {
90
91
  (function() {
91
- var a = {}.hasOwnProperty;
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, i.call(this, o)));
96
+ o && (e = u(e, a.call(this, o)));
96
97
  }
97
98
  return e;
98
99
  }
99
- function i(e) {
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
- a.call(e, o) && e[o] && (t = u(t, this && this[o] || o));
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
- }(q)), q.exports;
119
+ })(N)), N.exports;
119
120
  }
120
- var ae = ne();
121
- const ie = /* @__PURE__ */ te(ae), ue = {
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
- }, O = ie.bind(ue), h = "purpur-field-error-text", oe = ({
126
+ }, j = re.bind(te), h = "purpur-field-error-text", ne = ({
126
127
  children: r,
127
- className: a,
128
+ className: i,
128
129
  negative: n = !1,
129
- ["aria-relevant"]: i = "additions text",
130
+ ["aria-relevant"]: a = "additions text",
130
131
  ...u
131
- }) => /* @__PURE__ */ f(
132
+ }) => /* @__PURE__ */ _(
132
133
  "div",
133
134
  {
134
- className: O(a, h, {
135
+ className: j(i, h, {
135
136
  [`${h}--negative`]: n
136
137
  }),
137
138
  "aria-live": "assertive",
138
- "aria-relevant": i,
139
+ "aria-relevant": a,
139
140
  ...u,
140
141
  children: [
141
- /* @__PURE__ */ s(M, { svg: re, size: "xs", className: O(`${h}__icon`) }),
142
+ /* @__PURE__ */ p(B, { svg: U, size: "xs", className: j(`${h}__icon`) }),
142
143
  r
143
144
  ]
144
145
  }
145
146
  );
146
- function le(r) {
147
+ function ae(r) {
147
148
  return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
148
149
  }
149
- var j = { exports: {} };
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 C;
156
- function se() {
157
- return C || (C = 1, function(r) {
156
+ var P;
157
+ function ie() {
158
+ return P || (P = 1, (function(r) {
158
159
  (function() {
159
- var a = {}.hasOwnProperty;
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, i.call(this, o)));
164
+ o && (e = u(e, a.call(this, o)));
164
165
  }
165
166
  return e;
166
167
  }
167
- function i(e) {
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
- a.call(e, o) && e[o] && (t = u(t, this && this[o] || o));
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
- }(j)), j.exports;
187
+ })(A)), A.exports;
187
188
  }
188
- var pe = se();
189
- const ce = /* @__PURE__ */ le(pe), de = {
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
- }, fe = ce.bind(de), x = "purpur-field-helper-text", _e = ({
194
+ }, se = oe.bind(le), m = "purpur-field-helper-text", pe = ({
194
195
  children: r,
195
- className: a,
196
+ className: i,
196
197
  disabled: n,
197
- id: i,
198
+ id: a,
198
199
  negative: u,
199
200
  ...e
200
201
  }) => {
201
- const t = fe(a, x, {
202
- [`${x}--disabled`]: n,
203
- [`${x}--negative`]: u
202
+ const t = se(i, m, {
203
+ [`${m}--disabled`]: n,
204
+ [`${m}--negative`]: u
204
205
  });
205
- return /* @__PURE__ */ s("span", { id: i, className: t, ...e, children: r });
206
+ return /* @__PURE__ */ p("span", { id: a, className: t, ...e, children: r });
206
207
  };
207
- function A(r, a) {
208
+ function C(r, i) {
208
209
  if (typeof r == "function")
209
- return r(a);
210
- r != null && (r.current = a);
210
+ return r(i);
211
+ r != null && (r.current = i);
211
212
  }
212
- function he(...r) {
213
- return (a) => {
213
+ function ce(...r) {
214
+ return (i) => {
214
215
  let n = !1;
215
- const i = r.map((u) => {
216
- const e = A(u, a);
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 < i.length; u++) {
222
- const e = i[u];
223
- typeof e == "function" ? e() : A(r[u], null);
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
- var D = l.forwardRef((r, a) => {
229
- const { children: n, ...i } = r, u = l.Children.toArray(n), e = u.find(ve);
230
- if (e) {
231
- const t = e.props.children, o = u.map((p) => p === e ? l.Children.count(t) > 1 ? l.Children.only(null) : l.isValidElement(t) ? t.props.children : null : p);
232
- return /* @__PURE__ */ s(y, { ...i, ref: a, children: l.isValidElement(t) ? l.cloneElement(t, void 0, o) : null });
233
- }
234
- return /* @__PURE__ */ s(y, { ...i, ref: a, children: n });
235
- });
236
- D.displayName = "Slot";
237
- var y = l.forwardRef((r, a) => {
238
- const { children: n, ...i } = r;
239
- if (l.isValidElement(n)) {
240
- const u = ge(n), e = me(i, n.props);
241
- return n.type !== l.Fragment && (e.ref = a ? he(a, u) : u), l.cloneElement(n, e);
242
- }
243
- return l.Children.count(n) > 1 ? l.Children.only(null) : null;
244
- });
245
- y.displayName = "SlotClone";
246
- var xe = ({ children: r }) => /* @__PURE__ */ s(z, { children: r });
247
- function ve(r) {
248
- return l.isValidElement(r) && r.type === xe;
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 me(r, a) {
251
- const n = { ...a };
252
- for (const i in a) {
253
- const u = r[i], e = a[i];
254
- /^on[A-Z]/.test(i) ? u && e ? n[i] = (...t) => {
255
- e(...t), u(...t);
256
- } : u && (n[i] = u) : i === "style" ? n[i] = { ...u, ...e } : i === "className" && (n[i] = [u, e].filter(Boolean).join(" "));
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 ge(r) {
261
- var a, n;
262
- let i = (a = Object.getOwnPropertyDescriptor(r.props, "ref")) == null ? void 0 : a.get, u = i && "isReactWarning" in i && i.isReactWarning;
263
- return u ? r.ref : (i = (n = Object.getOwnPropertyDescriptor(r, "ref")) == null ? void 0 : n.get, u = i && "isReactWarning" in i && i.isReactWarning, u ? r.props.ref : r.props.ref || 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 ye = [
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
- ], be = ye.reduce((r, a) => {
283
- const n = l.forwardRef((i, u) => {
284
- const { asChild: e, ...t } = i, o = e ? D : a;
285
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ s(o, { ...t, ref: u });
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 n.displayName = `Primitive.${a}`, { ...r, [a]: n };
288
- }, {}), $e = "Label", B = l.forwardRef((r, a) => /* @__PURE__ */ s(
289
- be.label,
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: a,
301
+ ref: i,
293
302
  onMouseDown: (n) => {
294
- var i;
295
- n.target.closest("button, input, select, textarea") || ((i = r.onMouseDown) == null || i.call(r, n), !n.defaultPrevented && n.detail > 1 && n.preventDefault());
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
- B.displayName = $e;
300
- var we = B;
301
- function Se(r) {
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 P = { exports: {} };
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 R;
311
- function qe() {
312
- return R || (R = 1, function(r) {
319
+ var M;
320
+ function we() {
321
+ return M || (M = 1, (function(r) {
313
322
  (function() {
314
- var a = {}.hasOwnProperty;
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, i.call(this, o)));
327
+ o && (e = u(e, a.call(this, o)));
319
328
  }
320
329
  return e;
321
330
  }
322
- function i(e) {
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
- a.call(e, o) && e[o] && (t = u(t, this && this[o] || o));
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
- }(P)), P.exports;
350
+ })(R)), R.exports;
342
351
  }
343
- var Ne = qe();
344
- const Oe = /* @__PURE__ */ Se(Ne), je = {
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
- }, Ce = Oe.bind(je), v = "purpur-label", Ae = ({
357
+ }, Oe = Se.bind(Ne), y = "purpur-label", je = ({
349
358
  children: r,
350
- className: a,
359
+ className: i,
351
360
  disabled: n,
352
- negative: i = !1,
361
+ negative: a = !1,
353
362
  ...u
354
363
  }) => {
355
- const e = Ce(a, v, {
356
- [`${v}--disabled`]: n,
357
- [`${v}--negative`]: i
364
+ const e = Oe(i, y, {
365
+ [`${y}--disabled`]: n,
366
+ [`${y}--negative`]: a
358
367
  });
359
- return /* @__PURE__ */ s(we, { className: e, ...u, children: r });
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 Me(r) {
370
+ function Ae(r) {
376
371
  return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
377
372
  }
378
- var m = { exports: {} };
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 De() {
386
- return E || (E = 1, function(r) {
380
+ function Pe() {
381
+ return E || (E = 1, (function(r) {
387
382
  (function() {
388
- var a = {}.hasOwnProperty;
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, i.call(this, o)));
387
+ o && (e = u(e, a.call(this, o)));
393
388
  }
394
389
  return e;
395
390
  }
396
- function i(e) {
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
- a.call(e, o) && e[o] && (t = u(t, this && this[o] || o));
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
- }(m)), m.exports;
410
+ })(g)), g.exports;
416
411
  }
417
- var Be = De();
418
- const Ve = /* @__PURE__ */ Me(Be), b = {
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
- }, g = Ve.bind(b), c = "purpur-text-area", Ze = T(
426
+ }, b = Re.bind($), c = "purpur-text-area", Me = Z(
432
427
  ({
433
428
  id: r,
434
- ["data-testid"]: a,
429
+ ["data-testid"]: i,
435
430
  className: n,
436
- errorText: i,
431
+ errorText: a,
437
432
  helperText: u,
438
433
  label: e,
439
434
  rows: t = 3,
440
435
  cols: o = 90,
441
- ...p
442
- }, V) => {
443
- const [Z] = Ee(), d = (W) => a ? `${a}-${W}` : void 0, _ = u ? `${r}-helper-text` : void 0, F = g(`${c}__textarea-container`, {
444
- [`${c}__textarea-container--disabled`]: p.disabled,
445
- [`${c}__textarea-container--readonly`]: p.readOnly && !p.disabled
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__ */ f("div", { className: g(n, c), "data-testid": a, children: [
448
- e && /* @__PURE__ */ f(
449
- Ae,
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: p.disabled,
453
- className: b[`${c}__label`],
454
- "data-testid": d("label"),
447
+ disabled: s.disabled,
448
+ className: $[`${c}__label`],
449
+ "data-testid": f("label"),
455
450
  children: [
456
- p.required && /* @__PURE__ */ s("span", { "aria-hidden": !0, children: "*" }),
451
+ s.required && /* @__PURE__ */ p("span", { "aria-hidden": !0, children: "*" }),
457
452
  e
458
453
  ]
459
454
  }
460
455
  ),
461
- /* @__PURE__ */ f("div", { className: F, children: [
462
- /* @__PURE__ */ s(
456
+ /* @__PURE__ */ _("div", { className: V, children: [
457
+ /* @__PURE__ */ p(
463
458
  "textarea",
464
459
  {
465
- ...p,
466
- ref: V,
460
+ ...s,
461
+ ref: d,
467
462
  id: r,
468
- "data-testid": d("textarea"),
469
- "aria-describedby": p["aria-describedby"] || _,
470
- "aria-invalid": p["aria-invalid"] || !!i,
471
- className: g(
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--${Z}`,
468
+ `${c}__textarea--${x}`,
474
469
  {
475
- [`${c}__textarea--error`]: !!i
470
+ [`${c}__textarea--error`]: !!a
476
471
  }
477
472
  ),
478
473
  rows: t,
479
474
  cols: o
480
475
  }
481
476
  ),
482
- /* @__PURE__ */ s("div", { className: b[`${c}__frame`] })
477
+ /* @__PURE__ */ p("div", { className: $[`${c}__frame`] })
483
478
  ] }),
484
- _ && /* @__PURE__ */ s(_e, { "data-testid": d("helper-text"), id: _, children: u }),
485
- i && /* @__PURE__ */ s(oe, { "data-testid": d("error-text"), children: i })
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
- Ze.displayName = "TextArea";
484
+ Me.displayName = "TextArea";
490
485
  export {
491
- Ze as TextArea
486
+ Me as TextArea
492
487
  };
493
488
  //# sourceMappingURL=text-area.es.js.map