@spear-ai/spectral 1.3.66 → 1.3.67
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/Input.d.ts +0 -2
- package/dist/Input.js +85 -86
- package/dist/Textarea/TextareaUtils.d.ts +1 -1
- package/dist/Textarea/TextareaUtils.js +24 -31
- package/dist/Textarea.d.ts +3 -3
- package/dist/components/Input/Input.d.ts +0 -2
- package/dist/components/Input/Input.d.ts.map +1 -1
- package/dist/components/Textarea/Textarea.d.ts +3 -3
- package/dist/components/Textarea/Textarea.d.ts.map +1 -1
- package/dist/components/Textarea/TextareaUtils.d.ts +1 -1
- package/dist/components/Textarea/TextareaUtils.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/Input.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ export type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'id' | 'onC
|
|
|
5
5
|
onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
|
|
6
6
|
onFocus?: (e: FocusEvent<HTMLInputElement>) => void;
|
|
7
7
|
onChange?: (value: string) => void;
|
|
8
|
-
onValueChange?: (value: string) => void;
|
|
9
8
|
readonly className?: string;
|
|
10
9
|
readonly clearOnFocus?: boolean;
|
|
11
10
|
readonly placeholder?: string;
|
|
@@ -21,7 +20,6 @@ export declare const Input: import('react').ForwardRefExoticComponent<Omit<Input
|
|
|
21
20
|
onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
|
|
22
21
|
onFocus?: (e: FocusEvent<HTMLInputElement>) => void;
|
|
23
22
|
onChange?: (value: string) => void;
|
|
24
|
-
onValueChange?: (value: string) => void;
|
|
25
23
|
readonly className?: string;
|
|
26
24
|
readonly clearOnFocus?: boolean;
|
|
27
25
|
readonly placeholder?: string;
|
package/dist/Input.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "./styles/main.css";
|
|
3
|
-
import { jsxs as
|
|
4
|
-
import { usePasswordVisibility as
|
|
3
|
+
import { jsxs as d, jsx as t } from "react/jsx-runtime";
|
|
4
|
+
import { usePasswordVisibility as q, usePrefixWidth as tt, useClearOnFocus as rt } from "./Input/InputUtils.js";
|
|
5
5
|
import "./Icons/AnalyzeIcon.js";
|
|
6
6
|
import "./Icons/AnnotationsIcon.js";
|
|
7
7
|
import "./Icons/ApprovedIcon.js";
|
|
8
8
|
import "./Icons/CalendarIcon.js";
|
|
9
|
-
import { CheckCircleIcon as
|
|
9
|
+
import { CheckCircleIcon as et } from "./Icons/CheckCircleIcon.js";
|
|
10
10
|
import "./Icons/CheckSquareIcon.js";
|
|
11
11
|
import "./Icons/CheckmarkIcon.js";
|
|
12
12
|
import "./Icons/ChevronDownIcon.js";
|
|
13
13
|
import "./Icons/ChevronUpIcon.js";
|
|
14
14
|
import "./Icons/ClockIcon.js";
|
|
15
|
-
import { CloseCircleIcon as
|
|
15
|
+
import { CloseCircleIcon as ot } from "./Icons/CloseCircleIcon.js";
|
|
16
16
|
import "./Icons/CloseIcon.js";
|
|
17
17
|
import "./Icons/DashboardIcon.js";
|
|
18
18
|
import "./Icons/DatabaseIcon.js";
|
|
@@ -20,10 +20,10 @@ import "./Icons/DeleteIcon.js";
|
|
|
20
20
|
import "./Icons/DurationIcon.js";
|
|
21
21
|
import "./Icons/EmailIcon.js";
|
|
22
22
|
import "./Icons/EraserIcon.js";
|
|
23
|
-
import { ErrorIcon as
|
|
24
|
-
import { EyeClosedIcon as
|
|
23
|
+
import { ErrorIcon as it } from "./Icons/ErrorIcon.js";
|
|
24
|
+
import { EyeClosedIcon as st } from "./Icons/EyeClosedIcon.js";
|
|
25
25
|
import "./Icons/EyeClosedIcon2.js";
|
|
26
|
-
import { EyeOpenIcon as
|
|
26
|
+
import { EyeOpenIcon as at } from "./Icons/EyeOpenIcon.js";
|
|
27
27
|
import "./Icons/GoToFirstIcon.js";
|
|
28
28
|
import "./Icons/GoToLastIcon.js";
|
|
29
29
|
import "./Icons/HarmonicCursorsIcon.js";
|
|
@@ -33,7 +33,7 @@ import "./Icons/LassoIcon.js";
|
|
|
33
33
|
import "./Icons/LineToolIcon.js";
|
|
34
34
|
import "./Icons/LineToolIcon2.js";
|
|
35
35
|
import "./Icons/LiveViewIcon.js";
|
|
36
|
-
import { LoaderIcon as
|
|
36
|
+
import { LoaderIcon as nt } from "./Icons/LoaderIcon.js";
|
|
37
37
|
import "./Icons/LocationIcon.js";
|
|
38
38
|
import "./Icons/LogoutIcon.js";
|
|
39
39
|
import "./Icons/MessagesIcon.js";
|
|
@@ -59,11 +59,11 @@ import "./Icons/WarningIcon.js";
|
|
|
59
59
|
import "./Icons/ZoomAllIcon.js";
|
|
60
60
|
import "./Icons/ZoomXIcon.js";
|
|
61
61
|
import "./Icons/ZoomYIcon.js";
|
|
62
|
-
import { Label as
|
|
63
|
-
import { useFormFieldId as
|
|
62
|
+
import { Label as pt } from "./Label.js";
|
|
63
|
+
import { useFormFieldId as lt, getAriaProps as ct, getInputClasses as mt, useFormFieldState as ut, getFormFieldCSSProperties as dt, ErrorMessage as ft } from "./utils/formFieldUtils.js";
|
|
64
64
|
import { cn as f } from "./utils/twUtils.js";
|
|
65
|
-
import { forwardRef as
|
|
66
|
-
const
|
|
65
|
+
import { forwardRef as ht, useRef as bt, useCallback as c } from "react";
|
|
66
|
+
const xt = (m) => ({
|
|
67
67
|
email: "email",
|
|
68
68
|
password: "current-password",
|
|
69
69
|
tel: "tel",
|
|
@@ -72,67 +72,66 @@ const gt = (m) => ({
|
|
|
72
72
|
number: "off",
|
|
73
73
|
date: "off",
|
|
74
74
|
"datetime-local": "off"
|
|
75
|
-
})[m] || "off",
|
|
75
|
+
})[m] || "off", gt = ht(
|
|
76
76
|
({
|
|
77
77
|
className: m,
|
|
78
78
|
clearOnFocus: h = !1,
|
|
79
|
-
disabled:
|
|
79
|
+
disabled: k,
|
|
80
80
|
errorMessage: b,
|
|
81
|
-
id:
|
|
82
|
-
label:
|
|
81
|
+
id: P,
|
|
82
|
+
label: e,
|
|
83
83
|
name: x,
|
|
84
84
|
onBlur: g,
|
|
85
|
-
onChange:
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
placeholder: S,
|
|
85
|
+
onChange: a,
|
|
86
|
+
onFocus: C,
|
|
87
|
+
placeholder: R,
|
|
89
88
|
prefix: n,
|
|
90
|
-
showClearButton:
|
|
91
|
-
suppressHydrationWarning:
|
|
89
|
+
showClearButton: S = !1,
|
|
90
|
+
suppressHydrationWarning: V = !0,
|
|
92
91
|
state: i = "default",
|
|
93
92
|
type: p = "text",
|
|
94
|
-
value:
|
|
95
|
-
required:
|
|
96
|
-
startIcon:
|
|
97
|
-
endIcon:
|
|
98
|
-
"aria-label":
|
|
99
|
-
"aria-describedby":
|
|
100
|
-
...
|
|
101
|
-
},
|
|
102
|
-
const l =
|
|
93
|
+
value: w = "",
|
|
94
|
+
required: v,
|
|
95
|
+
startIcon: y,
|
|
96
|
+
endIcon: I,
|
|
97
|
+
"aria-label": $,
|
|
98
|
+
"aria-describedby": L,
|
|
99
|
+
...M
|
|
100
|
+
}, O) => {
|
|
101
|
+
const l = lt(P, x), N = `${l}-error`, { isDisabled: F, isLoading: j, isInvalid: A } = ut(k, i), B = ct(i, v, N, L), H = bt(null), s = O || H, { isVisible: u, toggleVisibility: W, inputType: D } = q(), { prefixWidth: T, prefixRef: G } = tt(n), { handleFocus: E } = rt(
|
|
103
102
|
h,
|
|
104
103
|
a ? (r) => a(r.target.value) : void 0
|
|
105
|
-
),
|
|
104
|
+
), J = c(
|
|
106
105
|
(r) => {
|
|
107
106
|
g?.(r);
|
|
108
107
|
},
|
|
109
108
|
[g]
|
|
110
|
-
),
|
|
109
|
+
), K = c(
|
|
111
110
|
(r) => {
|
|
112
|
-
|
|
111
|
+
E(r, C);
|
|
113
112
|
},
|
|
114
|
-
[
|
|
115
|
-
),
|
|
113
|
+
[E, C]
|
|
114
|
+
), Q = c(
|
|
116
115
|
(r) => {
|
|
117
|
-
const
|
|
118
|
-
|
|
116
|
+
const o = r.target.value;
|
|
117
|
+
a?.(o);
|
|
119
118
|
},
|
|
120
|
-
[
|
|
121
|
-
),
|
|
119
|
+
[a]
|
|
120
|
+
), U = c(() => {
|
|
122
121
|
s.current && (s.current.value = "", s.current.dispatchEvent(new Event("input", { bubbles: !0 })), s.current.focus());
|
|
123
|
-
}, [s]),
|
|
124
|
-
const r = "absolute right-4 top-1/2 -translate-y-1/2 text-input-icon hover:text-input-icon--hover focus:outline-none cursor-pointer",
|
|
122
|
+
}, [s]), z = S && w.length > 0, X = () => {
|
|
123
|
+
const r = "absolute right-4 top-1/2 -translate-y-1/2 text-input-icon hover:text-input-icon--hover focus:outline-none cursor-pointer", o = {
|
|
125
124
|
password: () => /* @__PURE__ */ t(
|
|
126
125
|
"button",
|
|
127
126
|
{
|
|
128
127
|
className: r,
|
|
129
128
|
type: "button",
|
|
130
|
-
onClick:
|
|
131
|
-
"aria-label":
|
|
132
|
-
"aria-pressed":
|
|
129
|
+
onClick: W,
|
|
130
|
+
"aria-label": u ? `Hide ${e}` : `Show ${e}`,
|
|
131
|
+
"aria-pressed": u,
|
|
133
132
|
"aria-controls": l,
|
|
134
133
|
"data-testid": "input-password-toggle",
|
|
135
|
-
children:
|
|
134
|
+
children: u ? /* @__PURE__ */ t(st, { size: 22 }) : /* @__PURE__ */ t(at, { size: 22 })
|
|
136
135
|
}
|
|
137
136
|
),
|
|
138
137
|
clear: () => /* @__PURE__ */ t(
|
|
@@ -140,75 +139,75 @@ const gt = (m) => ({
|
|
|
140
139
|
{
|
|
141
140
|
className: r,
|
|
142
141
|
type: "button",
|
|
143
|
-
onClick:
|
|
144
|
-
"aria-label": `Clear ${
|
|
142
|
+
onClick: U,
|
|
143
|
+
"aria-label": `Clear ${e}`,
|
|
145
144
|
"data-testid": "input-clear-button",
|
|
146
|
-
children: /* @__PURE__ */ t(
|
|
145
|
+
children: /* @__PURE__ */ t(ot, { size: 24 })
|
|
147
146
|
}
|
|
148
147
|
),
|
|
149
|
-
loading: () => /* @__PURE__ */ t("div", { className: "absolute top-1/2 right-4 -translate-y-1/2", "data-testid": "input-loading-icon", children: /* @__PURE__ */ t(
|
|
150
|
-
error: () => /* @__PURE__ */ t("div", { className: "text-danger-400 absolute top-1/2 right-4 -translate-y-1/2", "data-testid": "input-error-icon", children: /* @__PURE__ */ t(
|
|
151
|
-
success: () => /* @__PURE__ */ t("div", { className: "text-success-400 absolute top-1/2 right-4 -translate-y-1/2", "data-testid": "input-success-icon", children: /* @__PURE__ */ t(
|
|
148
|
+
loading: () => /* @__PURE__ */ t("div", { className: "absolute top-1/2 right-4 -translate-y-1/2", "data-testid": "input-loading-icon", children: /* @__PURE__ */ t(nt, { size: 24 }) }),
|
|
149
|
+
error: () => /* @__PURE__ */ t("div", { className: "text-danger-400 absolute top-1/2 right-4 -translate-y-1/2", "data-testid": "input-error-icon", children: /* @__PURE__ */ t(it, { size: 24 }) }),
|
|
150
|
+
success: () => /* @__PURE__ */ t("div", { className: "text-success-400 absolute top-1/2 right-4 -translate-y-1/2", "data-testid": "input-success-icon", children: /* @__PURE__ */ t(et, { size: 24 }) })
|
|
152
151
|
};
|
|
153
|
-
return
|
|
154
|
-
},
|
|
155
|
-
|
|
152
|
+
return I || (p === "password" ? o.password() : z ? o.clear() : j ? o.loading() : i === "success" ? o.success() : i === "error" ? o.error() : null);
|
|
153
|
+
}, Y = () => y || null, Z = f(
|
|
154
|
+
mt(i, m),
|
|
156
155
|
"[text-indent:var(--prefix-width)]",
|
|
157
|
-
|
|
158
|
-
),
|
|
156
|
+
z && "pr-10"
|
|
157
|
+
), _ = f(
|
|
159
158
|
"pointer-events-none absolute inset-y-0 left-4 flex items-center text-base text-input-text-prefix opacity-100 peer-disabled:opacity-50"
|
|
160
159
|
);
|
|
161
|
-
return /* @__PURE__ */
|
|
162
|
-
|
|
163
|
-
|
|
160
|
+
return /* @__PURE__ */ d("div", { className: "w-full space-y-1.5", "data-testid": "input-root", children: [
|
|
161
|
+
e && /* @__PURE__ */ t(
|
|
162
|
+
pt,
|
|
164
163
|
{
|
|
165
164
|
htmlFor: l,
|
|
166
165
|
className: f(
|
|
167
166
|
"mb-2 block",
|
|
168
|
-
|
|
167
|
+
F && "text-input-text--disabled placeholder:text-input-text-placeholder cursor-not-allowed"
|
|
169
168
|
),
|
|
170
|
-
children:
|
|
169
|
+
children: e
|
|
171
170
|
}
|
|
172
171
|
),
|
|
173
|
-
/* @__PURE__ */
|
|
174
|
-
/* @__PURE__ */
|
|
175
|
-
|
|
176
|
-
n && /* @__PURE__ */ t("span", { ref:
|
|
172
|
+
/* @__PURE__ */ d("div", { className: "relative", "data-testid": "input-wrapper", children: [
|
|
173
|
+
/* @__PURE__ */ d("div", { className: "relative", children: [
|
|
174
|
+
Y(),
|
|
175
|
+
n && /* @__PURE__ */ t("span", { ref: G, className: _, children: n }),
|
|
177
176
|
/* @__PURE__ */ t(
|
|
178
177
|
"input",
|
|
179
178
|
{
|
|
180
179
|
id: l,
|
|
181
180
|
name: x,
|
|
182
181
|
ref: s,
|
|
183
|
-
type: p === "password" ?
|
|
184
|
-
value:
|
|
185
|
-
disabled:
|
|
186
|
-
required:
|
|
187
|
-
autoComplete:
|
|
188
|
-
className:
|
|
189
|
-
onChange:
|
|
190
|
-
onFocus:
|
|
191
|
-
onBlur:
|
|
192
|
-
placeholder:
|
|
193
|
-
suppressHydrationWarning:
|
|
194
|
-
...
|
|
195
|
-
...
|
|
182
|
+
type: p === "password" ? D : p,
|
|
183
|
+
value: w,
|
|
184
|
+
disabled: F,
|
|
185
|
+
required: v,
|
|
186
|
+
autoComplete: xt(p),
|
|
187
|
+
className: Z,
|
|
188
|
+
onChange: Q,
|
|
189
|
+
onFocus: K,
|
|
190
|
+
onBlur: J,
|
|
191
|
+
placeholder: R || e,
|
|
192
|
+
suppressHydrationWarning: V,
|
|
193
|
+
...B,
|
|
194
|
+
...M,
|
|
196
195
|
"data-testid": "input-input",
|
|
197
196
|
"data-state": i,
|
|
198
|
-
style:
|
|
199
|
-
"--prefix-width": n ? `${
|
|
197
|
+
style: dt({
|
|
198
|
+
"--prefix-width": n ? `${T}px` : "0px"
|
|
200
199
|
}),
|
|
201
|
-
"aria-label":
|
|
200
|
+
"aria-label": $ || e
|
|
202
201
|
}
|
|
203
202
|
),
|
|
204
|
-
|
|
203
|
+
X()
|
|
205
204
|
] }),
|
|
206
|
-
|
|
205
|
+
A && b && /* @__PURE__ */ t(ft, { id: N, message: b })
|
|
207
206
|
] })
|
|
208
207
|
] });
|
|
209
208
|
}
|
|
210
209
|
);
|
|
211
|
-
|
|
210
|
+
gt.displayName = "Input";
|
|
212
211
|
export {
|
|
213
|
-
|
|
212
|
+
gt as Input
|
|
214
213
|
};
|
|
@@ -2,7 +2,7 @@ import { ChangeEvent, ClipboardEvent, FocusEvent } from 'react';
|
|
|
2
2
|
export type UseTextareaOptions = {
|
|
3
3
|
maxLength: number;
|
|
4
4
|
value: string;
|
|
5
|
-
onChange?: (
|
|
5
|
+
onChange?: (value: string) => void;
|
|
6
6
|
onFocus?: (e: FocusEvent<HTMLTextAreaElement>) => void;
|
|
7
7
|
onBlur?: (e: FocusEvent<HTMLTextAreaElement>) => void;
|
|
8
8
|
};
|
|
@@ -1,54 +1,47 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useCallback as i } from "react";
|
|
3
|
-
const
|
|
4
|
-
t.target.value
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
const T = (t, n, s) => {
|
|
4
|
+
const a = t.target.value;
|
|
5
|
+
a.length <= n && s?.(a);
|
|
6
|
+
}, V = (t, n, s, a) => {
|
|
7
|
+
const r = t.clipboardData.getData("text"), c = n || "", o = t.currentTarget, l = o.selectionStart || 0, u = o.selectionEnd || 0, e = c.substring(0, l), d = c.substring(u);
|
|
8
|
+
if ((e + r + d).length > s) {
|
|
8
9
|
t.preventDefault();
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
preventDefault: () => {
|
|
14
|
-
},
|
|
15
|
-
stopPropagation: () => {
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
r?.(T), setTimeout(() => {
|
|
19
|
-
const h = l + p.length;
|
|
20
|
-
n.setSelectionRange(h, h);
|
|
10
|
+
const g = u - l, h = s - c.length + g, p = r.substring(0, Math.max(0, h)), f = e + p + d;
|
|
11
|
+
a?.(f), setTimeout(() => {
|
|
12
|
+
const b = l + p.length;
|
|
13
|
+
o.setSelectionRange(b, b);
|
|
21
14
|
}, 0);
|
|
22
15
|
}
|
|
23
|
-
},
|
|
24
|
-
const
|
|
16
|
+
}, P = ({ maxLength: t, value: n, onChange: s, onFocus: a, onBlur: r }) => {
|
|
17
|
+
const c = i(
|
|
25
18
|
(e) => {
|
|
26
|
-
|
|
19
|
+
a?.(e);
|
|
27
20
|
},
|
|
28
|
-
[
|
|
29
|
-
),
|
|
21
|
+
[a]
|
|
22
|
+
), o = i(
|
|
30
23
|
(e) => {
|
|
31
|
-
|
|
24
|
+
r?.(e);
|
|
32
25
|
},
|
|
33
|
-
[
|
|
26
|
+
[r]
|
|
34
27
|
), l = i(
|
|
35
28
|
(e) => {
|
|
36
|
-
|
|
29
|
+
T(e, t, s);
|
|
37
30
|
},
|
|
38
|
-
[t,
|
|
31
|
+
[t, s]
|
|
39
32
|
), u = i(
|
|
40
33
|
(e) => {
|
|
41
|
-
V(e,
|
|
34
|
+
V(e, n, t, s);
|
|
42
35
|
},
|
|
43
|
-
[
|
|
36
|
+
[n, t, s]
|
|
44
37
|
);
|
|
45
38
|
return {
|
|
46
|
-
handleFocus:
|
|
47
|
-
handleBlur:
|
|
39
|
+
handleFocus: c,
|
|
40
|
+
handleBlur: o,
|
|
48
41
|
handleChange: l,
|
|
49
42
|
handlePaste: u
|
|
50
43
|
};
|
|
51
44
|
};
|
|
52
45
|
export {
|
|
53
|
-
|
|
46
|
+
P as useTextarea
|
|
54
47
|
};
|
package/dist/Textarea.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { FormFieldState } from '../../utils/formFieldUtils';
|
|
2
|
-
import {
|
|
2
|
+
import { ComponentProps, FocusEvent } from 'react';
|
|
3
3
|
export type TextareaState = FormFieldState;
|
|
4
|
-
export type TextareaProps = ComponentProps<'textarea'> & {
|
|
4
|
+
export type TextareaProps = Omit<ComponentProps<'textarea'>, 'onChange'> & {
|
|
5
5
|
onBlur?: (e: FocusEvent<HTMLTextAreaElement>) => void;
|
|
6
|
-
onChange?: (
|
|
6
|
+
onChange?: (value: string) => void;
|
|
7
7
|
onFocus?: (e: FocusEvent<HTMLTextAreaElement>) => void;
|
|
8
8
|
readonly className?: string | undefined;
|
|
9
9
|
readonly errorMessage?: string | undefined;
|
|
@@ -5,7 +5,6 @@ export type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'id' | 'onC
|
|
|
5
5
|
onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
|
|
6
6
|
onFocus?: (e: FocusEvent<HTMLInputElement>) => void;
|
|
7
7
|
onChange?: (value: string) => void;
|
|
8
|
-
onValueChange?: (value: string) => void;
|
|
9
8
|
readonly className?: string;
|
|
10
9
|
readonly clearOnFocus?: boolean;
|
|
11
10
|
readonly placeholder?: string;
|
|
@@ -21,7 +20,6 @@ export declare const Input: import('react').ForwardRefExoticComponent<Omit<Input
|
|
|
21
20
|
onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
|
|
22
21
|
onFocus?: (e: FocusEvent<HTMLInputElement>) => void;
|
|
23
22
|
onChange?: (value: string) => void;
|
|
24
|
-
onValueChange?: (value: string) => void;
|
|
25
23
|
readonly className?: string;
|
|
26
24
|
readonly clearOnFocus?: boolean;
|
|
27
25
|
readonly placeholder?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAGA,OAAO,EAOL,KAAK,kBAAkB,EACxB,MAAM,uBAAuB,CAAA;AAE9B,OAAO,E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CAAA;IACnD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAA;IAC/B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAA;IAClC,QAAQ,CAAC,wBAAwB,CAAC,EAAE,OAAO,CAAA;IAC3C,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,CAAA;IACzB,QAAQ,CAAC,SAAS,CAAC,EAAE,YAAY,CAAA;IACjC,QAAQ,CAAC,OAAO,CAAC,EAAE,YAAY,CAAA;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAgBH,eAAO,MAAM,KAAK;aA7BL,CAAC,CAAC,EAAE,UAAU,CAAC,gBAAgB,CAAC,KAAK,IAAI;cACxC,CAAC,CAAC,EAAE,UAAU,CAAC,gBAAgB,CAAC,KAAK,IAAI;eACxC,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI;yBACb,MAAM;4BACH,OAAO;2BACR,MAAM;sBACX,MAAM;+BACG,OAAO;wCACE,OAAO;oBAC3B,SAAS;yBACJ,YAAY;uBACd,YAAY;YACvB,MAAM;oDA2NjB,CAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { FormFieldState } from '../../utils/formFieldUtils';
|
|
2
|
-
import {
|
|
2
|
+
import { ComponentProps, FocusEvent } from 'react';
|
|
3
3
|
export type TextareaState = FormFieldState;
|
|
4
|
-
export type TextareaProps = ComponentProps<'textarea'> & {
|
|
4
|
+
export type TextareaProps = Omit<ComponentProps<'textarea'>, 'onChange'> & {
|
|
5
5
|
onBlur?: (e: FocusEvent<HTMLTextAreaElement>) => void;
|
|
6
|
-
onChange?: (
|
|
6
|
+
onChange?: (value: string) => void;
|
|
7
7
|
onFocus?: (e: FocusEvent<HTMLTextAreaElement>) => void;
|
|
8
8
|
readonly className?: string | undefined;
|
|
9
9
|
readonly errorMessage?: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/Textarea.tsx"],"names":[],"mappings":"AAGA,OAAO,EAML,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAA;AAE9B,OAAO,
|
|
1
|
+
{"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/Textarea.tsx"],"names":[],"mappings":"AAGA,OAAO,EAML,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAAsB,KAAK,cAAc,EAAsB,KAAK,UAAU,EAAkB,MAAM,OAAO,CAAA;AAEpH,MAAM,MAAM,aAAa,GAAG,cAAc,CAAA;AAI1C,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC,GAAG;IACzE,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAA;IACrD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAA;IACtD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACvC,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1C,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAChC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACvC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACzC,QAAQ,CAAC,KAAK,CAAC,EAAE,aAAa,CAAA;IAC9B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC3B,CAAA;AAeD,eAAO,MAAM,QAAQ,4HA2GpB,CAAA"}
|
|
@@ -2,7 +2,7 @@ import { ChangeEvent, ClipboardEvent, FocusEvent } from 'react';
|
|
|
2
2
|
export type UseTextareaOptions = {
|
|
3
3
|
maxLength: number;
|
|
4
4
|
value: string;
|
|
5
|
-
onChange?: (
|
|
5
|
+
onChange?: (value: string) => void;
|
|
6
6
|
onFocus?: (e: FocusEvent<HTMLTextAreaElement>) => void;
|
|
7
7
|
onBlur?: (e: FocusEvent<HTMLTextAreaElement>) => void;
|
|
8
8
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextareaUtils.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/TextareaUtils.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,cAAc,EAAE,KAAK,UAAU,EAAe,MAAM,OAAO,CAAA;AAE3F,MAAM,MAAM,kBAAkB,GAAG;IAC/B,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"TextareaUtils.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/TextareaUtils.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,cAAc,EAAE,KAAK,UAAU,EAAe,MAAM,OAAO,CAAA;AAE3F,MAAM,MAAM,kBAAkB,GAAG;IAC/B,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IA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