@spear-ai/spectral 1.3.65 → 1.3.66
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 +4 -2
- package/dist/Input.js +80 -78
- package/dist/components/Input/Input.d.ts +4 -2
- package/dist/components/Input/Input.d.ts.map +1 -1
- package/dist/features/AuthCard/ForgotPasswordEmailForm.js +11 -11
- package/dist/features/AuthCard/PasswordInput.js +11 -11
- package/package.json +1 -1
package/dist/Input.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { BaseFormFieldProps } from '../../utils/formFieldUtils';
|
|
2
2
|
import { FocusEvent, InputHTMLAttributes, ReactElement } from 'react';
|
|
3
3
|
export type InputType = 'text' | 'email' | 'url' | 'tel' | 'password' | 'number' | 'date' | 'datetime-local';
|
|
4
|
-
export type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'id'> & BaseFormFieldProps & {
|
|
4
|
+
export type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'id' | 'onChange'> & BaseFormFieldProps & {
|
|
5
5
|
onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
|
|
6
6
|
onFocus?: (e: FocusEvent<HTMLInputElement>) => void;
|
|
7
|
+
onChange?: (value: string) => void;
|
|
7
8
|
onValueChange?: (value: string) => void;
|
|
8
9
|
readonly className?: string;
|
|
9
10
|
readonly clearOnFocus?: boolean;
|
|
@@ -16,9 +17,10 @@ export type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'id'> & Bas
|
|
|
16
17
|
readonly endIcon?: ReactElement;
|
|
17
18
|
value?: string;
|
|
18
19
|
};
|
|
19
|
-
export declare const Input: import('react').ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "id"> & BaseFormFieldProps & {
|
|
20
|
+
export declare const Input: import('react').ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "id" | "onChange"> & BaseFormFieldProps & {
|
|
20
21
|
onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
|
|
21
22
|
onFocus?: (e: FocusEvent<HTMLInputElement>) => void;
|
|
23
|
+
onChange?: (value: string) => void;
|
|
22
24
|
onValueChange?: (value: string) => void;
|
|
23
25
|
readonly className?: string;
|
|
24
26
|
readonly clearOnFocus?: boolean;
|
package/dist/Input.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "./styles/main.css";
|
|
3
3
|
import { jsxs as u, jsx as t } from "react/jsx-runtime";
|
|
4
|
-
import { usePasswordVisibility as
|
|
4
|
+
import { usePasswordVisibility as tt, usePrefixWidth as rt, useClearOnFocus as et } 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 ot } 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 it } 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 st } from "./Icons/ErrorIcon.js";
|
|
24
|
+
import { EyeClosedIcon as at } from "./Icons/EyeClosedIcon.js";
|
|
25
25
|
import "./Icons/EyeClosedIcon2.js";
|
|
26
|
-
import { EyeOpenIcon as
|
|
26
|
+
import { EyeOpenIcon as nt } 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 pt } 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 lt } from "./Label.js";
|
|
63
|
+
import { useFormFieldId as ct, getAriaProps as mt, getInputClasses as dt, useFormFieldState as ut, getFormFieldCSSProperties as ft, ErrorMessage as ht } from "./utils/formFieldUtils.js";
|
|
64
64
|
import { cn as f } from "./utils/twUtils.js";
|
|
65
|
-
import { forwardRef as
|
|
66
|
-
const
|
|
65
|
+
import { forwardRef as bt, useRef as xt, useCallback as c } from "react";
|
|
66
|
+
const gt = (m) => ({
|
|
67
67
|
email: "email",
|
|
68
68
|
password: "current-password",
|
|
69
69
|
tel: "tel",
|
|
@@ -72,65 +72,67 @@ const xt = (m) => ({
|
|
|
72
72
|
number: "off",
|
|
73
73
|
date: "off",
|
|
74
74
|
"datetime-local": "off"
|
|
75
|
-
})[m] || "off",
|
|
75
|
+
})[m] || "off", Ct = bt(
|
|
76
76
|
({
|
|
77
77
|
className: m,
|
|
78
78
|
clearOnFocus: h = !1,
|
|
79
|
-
disabled:
|
|
79
|
+
disabled: P,
|
|
80
80
|
errorMessage: b,
|
|
81
|
-
id:
|
|
82
|
-
label:
|
|
81
|
+
id: R,
|
|
82
|
+
label: o,
|
|
83
83
|
name: x,
|
|
84
84
|
onBlur: g,
|
|
85
|
+
onChange: C,
|
|
85
86
|
onValueChange: a,
|
|
86
|
-
onFocus:
|
|
87
|
-
placeholder:
|
|
87
|
+
onFocus: w,
|
|
88
|
+
placeholder: S,
|
|
88
89
|
prefix: n,
|
|
89
|
-
showClearButton:
|
|
90
|
-
suppressHydrationWarning:
|
|
91
|
-
state:
|
|
90
|
+
showClearButton: $ = !1,
|
|
91
|
+
suppressHydrationWarning: L = !0,
|
|
92
|
+
state: i = "default",
|
|
92
93
|
type: p = "text",
|
|
93
94
|
value: v = "",
|
|
94
|
-
required:
|
|
95
|
-
startIcon:
|
|
96
|
-
endIcon:
|
|
97
|
-
"aria-label":
|
|
98
|
-
"aria-describedby":
|
|
99
|
-
...
|
|
100
|
-
},
|
|
101
|
-
const l =
|
|
95
|
+
required: y,
|
|
96
|
+
startIcon: I,
|
|
97
|
+
endIcon: N,
|
|
98
|
+
"aria-label": M,
|
|
99
|
+
"aria-describedby": O,
|
|
100
|
+
...j
|
|
101
|
+
}, A) => {
|
|
102
|
+
const l = ct(R, x), F = `${l}-error`, { isDisabled: E, isLoading: B, isInvalid: H } = ut(P, i), V = mt(i, y, F, O), W = xt(null), s = A || W, { isVisible: d, toggleVisibility: D, inputType: T } = tt(), { prefixWidth: G, prefixRef: J } = rt(n), { handleFocus: z } = et(
|
|
102
103
|
h,
|
|
103
104
|
a ? (r) => a(r.target.value) : void 0
|
|
104
|
-
),
|
|
105
|
+
), K = c(
|
|
105
106
|
(r) => {
|
|
106
107
|
g?.(r);
|
|
107
108
|
},
|
|
108
109
|
[g]
|
|
109
|
-
),
|
|
110
|
+
), Q = c(
|
|
110
111
|
(r) => {
|
|
111
|
-
|
|
112
|
+
z(r, w);
|
|
112
113
|
},
|
|
113
|
-
[
|
|
114
|
-
),
|
|
114
|
+
[z, w]
|
|
115
|
+
), U = c(
|
|
115
116
|
(r) => {
|
|
116
|
-
|
|
117
|
+
const e = r.target.value;
|
|
118
|
+
C?.(e), a?.(e);
|
|
117
119
|
},
|
|
118
|
-
[a]
|
|
119
|
-
),
|
|
120
|
-
|
|
121
|
-
}, [
|
|
122
|
-
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",
|
|
120
|
+
[C, a]
|
|
121
|
+
), X = c(() => {
|
|
122
|
+
s.current && (s.current.value = "", s.current.dispatchEvent(new Event("input", { bubbles: !0 })), s.current.focus());
|
|
123
|
+
}, [s]), k = $ && v.length > 0, Y = () => {
|
|
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", e = {
|
|
123
125
|
password: () => /* @__PURE__ */ t(
|
|
124
126
|
"button",
|
|
125
127
|
{
|
|
126
128
|
className: r,
|
|
127
129
|
type: "button",
|
|
128
130
|
onClick: D,
|
|
129
|
-
"aria-label": d ? `Hide ${
|
|
131
|
+
"aria-label": d ? `Hide ${o}` : `Show ${o}`,
|
|
130
132
|
"aria-pressed": d,
|
|
131
133
|
"aria-controls": l,
|
|
132
134
|
"data-testid": "input-password-toggle",
|
|
133
|
-
children: d ? /* @__PURE__ */ t(
|
|
135
|
+
children: d ? /* @__PURE__ */ t(at, { size: 22 }) : /* @__PURE__ */ t(nt, { size: 22 })
|
|
134
136
|
}
|
|
135
137
|
),
|
|
136
138
|
clear: () => /* @__PURE__ */ t(
|
|
@@ -138,75 +140,75 @@ const xt = (m) => ({
|
|
|
138
140
|
{
|
|
139
141
|
className: r,
|
|
140
142
|
type: "button",
|
|
141
|
-
onClick:
|
|
142
|
-
"aria-label": `Clear ${
|
|
143
|
+
onClick: X,
|
|
144
|
+
"aria-label": `Clear ${o}`,
|
|
143
145
|
"data-testid": "input-clear-button",
|
|
144
|
-
children: /* @__PURE__ */ t(
|
|
146
|
+
children: /* @__PURE__ */ t(it, { size: 24 })
|
|
145
147
|
}
|
|
146
148
|
),
|
|
147
|
-
loading: () => /* @__PURE__ */ t("div", { className: "absolute top-1/2 right-4 -translate-y-1/2", "data-testid": "input-loading-icon", children: /* @__PURE__ */ t(
|
|
148
|
-
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(
|
|
149
|
-
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(
|
|
149
|
+
loading: () => /* @__PURE__ */ t("div", { className: "absolute top-1/2 right-4 -translate-y-1/2", "data-testid": "input-loading-icon", children: /* @__PURE__ */ t(pt, { size: 24 }) }),
|
|
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(st, { size: 24 }) }),
|
|
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(ot, { size: 24 }) })
|
|
150
152
|
};
|
|
151
|
-
return
|
|
152
|
-
},
|
|
153
|
-
|
|
153
|
+
return N || (p === "password" ? e.password() : k ? e.clear() : B ? e.loading() : i === "success" ? e.success() : i === "error" ? e.error() : null);
|
|
154
|
+
}, Z = () => I || null, _ = f(
|
|
155
|
+
dt(i, m),
|
|
154
156
|
"[text-indent:var(--prefix-width)]",
|
|
155
|
-
|
|
156
|
-
),
|
|
157
|
+
k && "pr-10"
|
|
158
|
+
), q = f(
|
|
157
159
|
"pointer-events-none absolute inset-y-0 left-4 flex items-center text-base text-input-text-prefix opacity-100 peer-disabled:opacity-50"
|
|
158
160
|
);
|
|
159
161
|
return /* @__PURE__ */ u("div", { className: "w-full space-y-1.5", "data-testid": "input-root", children: [
|
|
160
|
-
|
|
161
|
-
|
|
162
|
+
o && /* @__PURE__ */ t(
|
|
163
|
+
lt,
|
|
162
164
|
{
|
|
163
165
|
htmlFor: l,
|
|
164
166
|
className: f(
|
|
165
167
|
"mb-2 block",
|
|
166
|
-
|
|
168
|
+
E && "text-input-text--disabled placeholder:text-input-text-placeholder cursor-not-allowed"
|
|
167
169
|
),
|
|
168
|
-
children:
|
|
170
|
+
children: o
|
|
169
171
|
}
|
|
170
172
|
),
|
|
171
173
|
/* @__PURE__ */ u("div", { className: "relative", "data-testid": "input-wrapper", children: [
|
|
172
174
|
/* @__PURE__ */ u("div", { className: "relative", children: [
|
|
173
|
-
|
|
174
|
-
n && /* @__PURE__ */ t("span", { ref:
|
|
175
|
+
Z(),
|
|
176
|
+
n && /* @__PURE__ */ t("span", { ref: J, className: q, children: n }),
|
|
175
177
|
/* @__PURE__ */ t(
|
|
176
178
|
"input",
|
|
177
179
|
{
|
|
178
180
|
id: l,
|
|
179
181
|
name: x,
|
|
180
|
-
ref:
|
|
182
|
+
ref: s,
|
|
181
183
|
type: p === "password" ? T : p,
|
|
182
184
|
value: v,
|
|
183
|
-
disabled:
|
|
184
|
-
required:
|
|
185
|
-
autoComplete:
|
|
186
|
-
className:
|
|
187
|
-
onChange:
|
|
188
|
-
onFocus:
|
|
189
|
-
onBlur:
|
|
190
|
-
placeholder:
|
|
191
|
-
suppressHydrationWarning:
|
|
192
|
-
...
|
|
193
|
-
...
|
|
185
|
+
disabled: E,
|
|
186
|
+
required: y,
|
|
187
|
+
autoComplete: gt(p),
|
|
188
|
+
className: _,
|
|
189
|
+
onChange: U,
|
|
190
|
+
onFocus: Q,
|
|
191
|
+
onBlur: K,
|
|
192
|
+
placeholder: S || o,
|
|
193
|
+
suppressHydrationWarning: L,
|
|
194
|
+
...V,
|
|
195
|
+
...j,
|
|
194
196
|
"data-testid": "input-input",
|
|
195
|
-
"data-state":
|
|
196
|
-
style:
|
|
197
|
-
"--prefix-width": n ? `${
|
|
197
|
+
"data-state": i,
|
|
198
|
+
style: ft({
|
|
199
|
+
"--prefix-width": n ? `${G}px` : "0px"
|
|
198
200
|
}),
|
|
199
|
-
"aria-label":
|
|
201
|
+
"aria-label": M || o
|
|
200
202
|
}
|
|
201
203
|
),
|
|
202
|
-
|
|
204
|
+
Y()
|
|
203
205
|
] }),
|
|
204
|
-
|
|
206
|
+
H && b && /* @__PURE__ */ t(ht, { id: F, message: b })
|
|
205
207
|
] })
|
|
206
208
|
] });
|
|
207
209
|
}
|
|
208
210
|
);
|
|
209
|
-
|
|
211
|
+
Ct.displayName = "Input";
|
|
210
212
|
export {
|
|
211
|
-
|
|
213
|
+
Ct as Input
|
|
212
214
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { BaseFormFieldProps } from '../../utils/formFieldUtils';
|
|
2
2
|
import { FocusEvent, InputHTMLAttributes, ReactElement } from 'react';
|
|
3
3
|
export type InputType = 'text' | 'email' | 'url' | 'tel' | 'password' | 'number' | 'date' | 'datetime-local';
|
|
4
|
-
export type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'id'> & BaseFormFieldProps & {
|
|
4
|
+
export type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'id' | 'onChange'> & BaseFormFieldProps & {
|
|
5
5
|
onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
|
|
6
6
|
onFocus?: (e: FocusEvent<HTMLInputElement>) => void;
|
|
7
|
+
onChange?: (value: string) => void;
|
|
7
8
|
onValueChange?: (value: string) => void;
|
|
8
9
|
readonly className?: string;
|
|
9
10
|
readonly clearOnFocus?: boolean;
|
|
@@ -16,9 +17,10 @@ export type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'id'> & Bas
|
|
|
16
17
|
readonly endIcon?: ReactElement;
|
|
17
18
|
value?: string;
|
|
18
19
|
};
|
|
19
|
-
export declare const Input: import('react').ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "id"> & BaseFormFieldProps & {
|
|
20
|
+
export declare const Input: import('react').ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "id" | "onChange"> & BaseFormFieldProps & {
|
|
20
21
|
onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
|
|
21
22
|
onFocus?: (e: FocusEvent<HTMLInputElement>) => void;
|
|
23
|
+
onChange?: (value: string) => void;
|
|
22
24
|
onValueChange?: (value: string) => void;
|
|
23
25
|
readonly className?: string;
|
|
24
26
|
readonly clearOnFocus?: boolean;
|
|
@@ -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,EAML,KAAK,UAAU,EACf,KAAK,mBAAmB,EACxB,KAAK,YAAY,EAElB,MAAM,OAAO,CAAA;AAEd,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,UAAU,GAAG,QAAQ,GAAG,MAAM,GAAG,gBAAgB,CAAA;AAE5G,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,IAAI,CAAC,
|
|
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,EAML,KAAK,UAAU,EACf,KAAK,mBAAmB,EACxB,KAAK,YAAY,EAElB,MAAM,OAAO,CAAA;AAEd,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,UAAU,GAAG,QAAQ,GAAG,MAAM,GAAG,gBAAgB,CAAA;AAE5G,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,IAAI,GAAG,UAAU,CAAC,GACrF,kBAAkB,GAAG;IACnB,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAA;IAClD,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAA;IACnD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC,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;aA9BL,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;oBAClB,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI;yBAClB,MAAM;4BACH,OAAO;2BACR,MAAM;sBACX,MAAM;+BACG,OAAO;wCACE,OAAO;oBAC3B,SAAS;yBACJ,YAAY;uBACd,YAAY;YACvB,MAAM;oDA6NjB,CAAA"}
|
|
@@ -17,7 +17,7 @@ import "../../Icons/DashboardIcon.js";
|
|
|
17
17
|
import "../../Icons/DatabaseIcon.js";
|
|
18
18
|
import "../../Icons/DeleteIcon.js";
|
|
19
19
|
import "../../Icons/DurationIcon.js";
|
|
20
|
-
import { EmailIcon as
|
|
20
|
+
import { EmailIcon as l } from "../../Icons/EmailIcon.js";
|
|
21
21
|
import "../../Icons/EraserIcon.js";
|
|
22
22
|
import "../../Icons/ErrorIcon.js";
|
|
23
23
|
import "../../Icons/EyeClosedIcon.js";
|
|
@@ -58,11 +58,11 @@ import "../../Icons/WarningIcon.js";
|
|
|
58
58
|
import "../../Icons/ZoomAllIcon.js";
|
|
59
59
|
import "../../Icons/ZoomXIcon.js";
|
|
60
60
|
import "../../Icons/ZoomYIcon.js";
|
|
61
|
-
import { Input as
|
|
62
|
-
import { Label as
|
|
61
|
+
import { Input as s } from "../../Input.js";
|
|
62
|
+
import { Label as c } from "../../Label.js";
|
|
63
63
|
import "react";
|
|
64
|
-
import { m as
|
|
65
|
-
const
|
|
64
|
+
import { m as n } from "../../proxy-C9AqCss6.js";
|
|
65
|
+
const go = ({
|
|
66
66
|
email: m,
|
|
67
67
|
onEmailChange: p,
|
|
68
68
|
onSubmit: e,
|
|
@@ -70,21 +70,21 @@ const ko = ({
|
|
|
70
70
|
isSubmitting: r
|
|
71
71
|
}) => /* @__PURE__ */ t("div", { className: "space-y-6", children: [
|
|
72
72
|
/* @__PURE__ */ t("div", { children: [
|
|
73
|
-
/* @__PURE__ */ o(
|
|
73
|
+
/* @__PURE__ */ o(c, { htmlFor: "reset-email", className: "mb-2 block", children: "Email address" }),
|
|
74
74
|
/* @__PURE__ */ o(
|
|
75
|
-
|
|
75
|
+
s,
|
|
76
76
|
{
|
|
77
77
|
type: "email",
|
|
78
78
|
id: "reset-email",
|
|
79
79
|
value: m,
|
|
80
|
-
onChange:
|
|
80
|
+
onChange: p,
|
|
81
81
|
className: "w-full rounded-lg border border-white/10 bg-white/5 px-4 py-3 pr-12 transition-all",
|
|
82
82
|
placeholder: "you@example.com",
|
|
83
|
-
endIcon: /* @__PURE__ */ o(
|
|
83
|
+
endIcon: /* @__PURE__ */ o(l, { size: 22, className: "absolute top-1/2 right-4 -translate-y-1/2 transition-colors" })
|
|
84
84
|
}
|
|
85
85
|
)
|
|
86
86
|
] }),
|
|
87
|
-
/* @__PURE__ */ o(
|
|
87
|
+
/* @__PURE__ */ o(n.div, { whileHover: { scale: r ? 1 : 1.02 }, whileTap: { scale: r ? 1 : 0.98 }, children: /* @__PURE__ */ o(
|
|
88
88
|
i,
|
|
89
89
|
{
|
|
90
90
|
type: "button",
|
|
@@ -98,5 +98,5 @@ const ko = ({
|
|
|
98
98
|
/* @__PURE__ */ o("div", { className: "flex justify-center", children: /* @__PURE__ */ o(i, { type: "button", label: "Back to sign in", variant: "ghost", className: "text-sm", onClick: a }) })
|
|
99
99
|
] });
|
|
100
100
|
export {
|
|
101
|
-
|
|
101
|
+
go as ForgotPasswordEmailForm
|
|
102
102
|
};
|
|
@@ -20,9 +20,9 @@ import "../../Icons/DurationIcon.js";
|
|
|
20
20
|
import "../../Icons/EmailIcon.js";
|
|
21
21
|
import "../../Icons/EraserIcon.js";
|
|
22
22
|
import "../../Icons/ErrorIcon.js";
|
|
23
|
-
import { EyeClosedIcon as
|
|
23
|
+
import { EyeClosedIcon as h } from "../../Icons/EyeClosedIcon.js";
|
|
24
24
|
import "../../Icons/EyeClosedIcon2.js";
|
|
25
|
-
import { EyeOpenIcon as
|
|
25
|
+
import { EyeOpenIcon as u } from "../../Icons/EyeOpenIcon.js";
|
|
26
26
|
import "../../Icons/GoToFirstIcon.js";
|
|
27
27
|
import "../../Icons/GoToLastIcon.js";
|
|
28
28
|
import "../../Icons/HarmonicCursorsIcon.js";
|
|
@@ -58,12 +58,12 @@ import "../../Icons/WarningIcon.js";
|
|
|
58
58
|
import "../../Icons/ZoomAllIcon.js";
|
|
59
59
|
import "../../Icons/ZoomXIcon.js";
|
|
60
60
|
import "../../Icons/ZoomYIcon.js";
|
|
61
|
-
import { Input as
|
|
62
|
-
import { calculatePasswordStrength as
|
|
61
|
+
import { Input as f } from "../../Input.js";
|
|
62
|
+
import { calculatePasswordStrength as w } from "../../utils/sharedUtils.js";
|
|
63
63
|
import { useState as x } from "react";
|
|
64
64
|
import { A as y } from "../../index-BIpuW_o8.js";
|
|
65
65
|
import { m as e } from "../../proxy-C9AqCss6.js";
|
|
66
|
-
const
|
|
66
|
+
const vt = ({
|
|
67
67
|
value: r,
|
|
68
68
|
onChange: s,
|
|
69
69
|
id: a,
|
|
@@ -72,27 +72,27 @@ const zt = ({
|
|
|
72
72
|
showStrength: c = !1,
|
|
73
73
|
className: d = ""
|
|
74
74
|
}) => {
|
|
75
|
-
const [i, p] = x(!1), o = r && c ?
|
|
75
|
+
const [i, p] = x(!1), o = r && c ? w(r) : null;
|
|
76
76
|
return /* @__PURE__ */ m("div", { children: [
|
|
77
77
|
/* @__PURE__ */ t(
|
|
78
|
-
|
|
78
|
+
f,
|
|
79
79
|
{
|
|
80
80
|
type: i ? "text" : "password",
|
|
81
81
|
value: r,
|
|
82
|
-
onChange:
|
|
82
|
+
onChange: s,
|
|
83
83
|
className: d,
|
|
84
84
|
id: a,
|
|
85
85
|
label: n,
|
|
86
86
|
placeholder: l,
|
|
87
87
|
endIcon: i ? /* @__PURE__ */ t(
|
|
88
|
-
|
|
88
|
+
h,
|
|
89
89
|
{
|
|
90
90
|
size: 22,
|
|
91
91
|
onClick: () => p(!i),
|
|
92
92
|
className: "absolute top-1/2 right-4 -translate-y-1/2 cursor-pointer transition-colors"
|
|
93
93
|
}
|
|
94
94
|
) : /* @__PURE__ */ t(
|
|
95
|
-
|
|
95
|
+
u,
|
|
96
96
|
{
|
|
97
97
|
size: 22,
|
|
98
98
|
onClick: () => p(!i),
|
|
@@ -130,5 +130,5 @@ const zt = ({
|
|
|
130
130
|
] });
|
|
131
131
|
};
|
|
132
132
|
export {
|
|
133
|
-
|
|
133
|
+
vt as PasswordInput
|
|
134
134
|
};
|