@spear-ai/spectral 1.3.65 → 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 CHANGED
@@ -1,10 +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
- onValueChange?: (value: string) => void;
7
+ onChange?: (value: string) => void;
8
8
  readonly className?: string;
9
9
  readonly clearOnFocus?: boolean;
10
10
  readonly placeholder?: string;
@@ -16,10 +16,10 @@ export type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'id'> & Bas
16
16
  readonly endIcon?: ReactElement;
17
17
  value?: string;
18
18
  };
19
- export declare const Input: import('react').ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "id"> & BaseFormFieldProps & {
19
+ export declare const Input: import('react').ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "id" | "onChange"> & BaseFormFieldProps & {
20
20
  onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
21
21
  onFocus?: (e: FocusEvent<HTMLInputElement>) => void;
22
- onValueChange?: (value: string) => void;
22
+ onChange?: (value: string) => void;
23
23
  readonly className?: string;
24
24
  readonly clearOnFocus?: boolean;
25
25
  readonly placeholder?: string;
package/dist/Input.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import "./styles/main.css";
3
- import { jsxs as u, jsx as t } from "react/jsx-runtime";
3
+ import { jsxs as d, jsx as t } from "react/jsx-runtime";
4
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";
@@ -60,7 +60,7 @@ import "./Icons/ZoomAllIcon.js";
60
60
  import "./Icons/ZoomXIcon.js";
61
61
  import "./Icons/ZoomYIcon.js";
62
62
  import { Label as pt } from "./Label.js";
63
- import { useFormFieldId as lt, getAriaProps as ct, getInputClasses as mt, useFormFieldState as dt, getFormFieldCSSProperties as ut, ErrorMessage as ft } from "./utils/formFieldUtils.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
65
  import { forwardRef as ht, useRef as bt, useCallback as c } from "react";
66
66
  const xt = (m) => ({
@@ -82,23 +82,23 @@ const xt = (m) => ({
82
82
  label: e,
83
83
  name: x,
84
84
  onBlur: g,
85
- onValueChange: a,
85
+ onChange: a,
86
86
  onFocus: C,
87
87
  placeholder: R,
88
88
  prefix: n,
89
89
  showClearButton: S = !1,
90
- suppressHydrationWarning: $ = !0,
91
- state: o = "default",
90
+ suppressHydrationWarning: V = !0,
91
+ state: i = "default",
92
92
  type: p = "text",
93
- value: v = "",
94
- required: w,
93
+ value: w = "",
94
+ required: v,
95
95
  startIcon: y,
96
96
  endIcon: I,
97
- "aria-label": L,
98
- "aria-describedby": M,
99
- ...O
100
- }, j) => {
101
- const l = lt(P, x), N = `${l}-error`, { isDisabled: F, isLoading: A, isInvalid: B } = dt(k, o), H = ct(o, w, N, M), W = bt(null), i = j || W, { isVisible: d, toggleVisibility: D, inputType: T } = q(), { prefixWidth: V, prefixRef: G } = tt(n), { handleFocus: E } = rt(
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(
102
102
  h,
103
103
  a ? (r) => a(r.target.value) : void 0
104
104
  ), J = c(
@@ -113,24 +113,25 @@ const xt = (m) => ({
113
113
  [E, C]
114
114
  ), Q = c(
115
115
  (r) => {
116
- a?.(r.target.value);
116
+ const o = r.target.value;
117
+ a?.(o);
117
118
  },
118
119
  [a]
119
120
  ), U = c(() => {
120
- i.current && (i.current.value = "", i.current.dispatchEvent(new Event("input", { bubbles: !0 })), i.current.focus());
121
- }, [i]), z = S && v.length > 0, X = () => {
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", s = {
121
+ s.current && (s.current.value = "", s.current.dispatchEvent(new Event("input", { bubbles: !0 })), s.current.focus());
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 = {
123
124
  password: () => /* @__PURE__ */ t(
124
125
  "button",
125
126
  {
126
127
  className: r,
127
128
  type: "button",
128
- onClick: D,
129
- "aria-label": d ? `Hide ${e}` : `Show ${e}`,
130
- "aria-pressed": d,
129
+ onClick: W,
130
+ "aria-label": u ? `Hide ${e}` : `Show ${e}`,
131
+ "aria-pressed": u,
131
132
  "aria-controls": l,
132
133
  "data-testid": "input-password-toggle",
133
- children: d ? /* @__PURE__ */ t(st, { size: 22 }) : /* @__PURE__ */ t(at, { size: 22 })
134
+ children: u ? /* @__PURE__ */ t(st, { size: 22 }) : /* @__PURE__ */ t(at, { size: 22 })
134
135
  }
135
136
  ),
136
137
  clear: () => /* @__PURE__ */ t(
@@ -148,15 +149,15 @@ const xt = (m) => ({
148
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 }) }),
149
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 }) })
150
151
  };
151
- return I || (p === "password" ? s.password() : z ? s.clear() : A ? s.loading() : o === "success" ? s.success() : o === "error" ? s.error() : null);
152
+ return I || (p === "password" ? o.password() : z ? o.clear() : j ? o.loading() : i === "success" ? o.success() : i === "error" ? o.error() : null);
152
153
  }, Y = () => y || null, Z = f(
153
- mt(o, m),
154
+ mt(i, m),
154
155
  "[text-indent:var(--prefix-width)]",
155
156
  z && "pr-10"
156
157
  ), _ = f(
157
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"
158
159
  );
159
- return /* @__PURE__ */ u("div", { className: "w-full space-y-1.5", "data-testid": "input-root", children: [
160
+ return /* @__PURE__ */ d("div", { className: "w-full space-y-1.5", "data-testid": "input-root", children: [
160
161
  e && /* @__PURE__ */ t(
161
162
  pt,
162
163
  {
@@ -168,8 +169,8 @@ const xt = (m) => ({
168
169
  children: e
169
170
  }
170
171
  ),
171
- /* @__PURE__ */ u("div", { className: "relative", "data-testid": "input-wrapper", children: [
172
- /* @__PURE__ */ u("div", { className: "relative", children: [
172
+ /* @__PURE__ */ d("div", { className: "relative", "data-testid": "input-wrapper", children: [
173
+ /* @__PURE__ */ d("div", { className: "relative", children: [
173
174
  Y(),
174
175
  n && /* @__PURE__ */ t("span", { ref: G, className: _, children: n }),
175
176
  /* @__PURE__ */ t(
@@ -177,31 +178,31 @@ const xt = (m) => ({
177
178
  {
178
179
  id: l,
179
180
  name: x,
180
- ref: i,
181
- type: p === "password" ? T : p,
182
- value: v,
181
+ ref: s,
182
+ type: p === "password" ? D : p,
183
+ value: w,
183
184
  disabled: F,
184
- required: w,
185
+ required: v,
185
186
  autoComplete: xt(p),
186
187
  className: Z,
187
188
  onChange: Q,
188
189
  onFocus: K,
189
190
  onBlur: J,
190
191
  placeholder: R || e,
191
- suppressHydrationWarning: $,
192
- ...H,
193
- ...O,
192
+ suppressHydrationWarning: V,
193
+ ...B,
194
+ ...M,
194
195
  "data-testid": "input-input",
195
- "data-state": o,
196
- style: ut({
197
- "--prefix-width": n ? `${V}px` : "0px"
196
+ "data-state": i,
197
+ style: dt({
198
+ "--prefix-width": n ? `${T}px` : "0px"
198
199
  }),
199
- "aria-label": L || e
200
+ "aria-label": $ || e
200
201
  }
201
202
  ),
202
203
  X()
203
204
  ] }),
204
- B && b && /* @__PURE__ */ t(ft, { id: N, message: b })
205
+ A && b && /* @__PURE__ */ t(ft, { id: N, message: b })
205
206
  ] })
206
207
  ] });
207
208
  }
@@ -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?: (e: ChangeEvent<HTMLTextAreaElement>) => void;
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 v = (t, s, a) => {
4
- t.target.value.length <= s && a?.(t);
5
- }, V = (t, s, a, r) => {
6
- const c = t.clipboardData.getData("text"), o = s || "", n = t.currentTarget, l = n.selectionStart || 0, u = n.selectionEnd || 0, e = o.substring(0, l), d = o.substring(u);
7
- if ((e + c + d).length > a) {
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 b = u - l, f = a - o.length + b, p = c.substring(0, Math.max(0, f)), g = e + p + d, T = {
10
- target: { value: g, name: n.name },
11
- currentTarget: { value: g, name: n.name },
12
- type: "change",
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
- }, m = ({ maxLength: t, value: s, onChange: a, onFocus: r, onBlur: c }) => {
24
- const o = i(
16
+ }, P = ({ maxLength: t, value: n, onChange: s, onFocus: a, onBlur: r }) => {
17
+ const c = i(
25
18
  (e) => {
26
- r?.(e);
19
+ a?.(e);
27
20
  },
28
- [r]
29
- ), n = i(
21
+ [a]
22
+ ), o = i(
30
23
  (e) => {
31
- c?.(e);
24
+ r?.(e);
32
25
  },
33
- [c]
26
+ [r]
34
27
  ), l = i(
35
28
  (e) => {
36
- v(e, t, a);
29
+ T(e, t, s);
37
30
  },
38
- [t, a]
31
+ [t, s]
39
32
  ), u = i(
40
33
  (e) => {
41
- V(e, s, t, a);
34
+ V(e, n, t, s);
42
35
  },
43
- [s, t, a]
36
+ [n, t, s]
44
37
  );
45
38
  return {
46
- handleFocus: o,
47
- handleBlur: n,
39
+ handleFocus: c,
40
+ handleBlur: o,
48
41
  handleChange: l,
49
42
  handlePaste: u
50
43
  };
51
44
  };
52
45
  export {
53
- m as useTextarea
46
+ P as useTextarea
54
47
  };
@@ -1,9 +1,9 @@
1
1
  import { FormFieldState } from '../../utils/formFieldUtils';
2
- import { ChangeEvent, ComponentProps, FocusEvent } from 'react';
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?: (e: ChangeEvent<HTMLTextAreaElement>) => void;
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,10 +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
- onValueChange?: (value: string) => void;
7
+ onChange?: (value: string) => void;
8
8
  readonly className?: string;
9
9
  readonly clearOnFocus?: boolean;
10
10
  readonly placeholder?: string;
@@ -16,10 +16,10 @@ export type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'id'> & Bas
16
16
  readonly endIcon?: ReactElement;
17
17
  value?: string;
18
18
  };
19
- export declare const Input: import('react').ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "id"> & BaseFormFieldProps & {
19
+ export declare const Input: import('react').ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "id" | "onChange"> & BaseFormFieldProps & {
20
20
  onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
21
21
  onFocus?: (e: FocusEvent<HTMLInputElement>) => void;
22
- onValueChange?: (value: string) => void;
22
+ onChange?: (value: string) => void;
23
23
  readonly className?: string;
24
24
  readonly clearOnFocus?: boolean;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,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 { ChangeEvent, ComponentProps, FocusEvent } from 'react';
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?: (e: ChangeEvent<HTMLTextAreaElement>) => void;
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,c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AAkB,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?: (e: ChangeEvent<HTMLTextAreaElement>) => void;
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,CAAC,EAAE,WAAW,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAA;IACxD,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAA;IACtD,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAA;CACtD,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,WAAW,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAA;IACzD,UAAU,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAA;IACxD,YAAY,EAAE,CAAC,CAAC,EAAE,WAAW,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAA;IAC3D,WAAW,EAAE,CAAC,CAAC,EAAE,cAAc,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAA;CAC9D,CAAA;AAqED;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,iDAAiD,kBAAkB,KAAG,iBAmCjG,CAAA"}
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;IAClC,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAA;IACtD,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAA;CACtD,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,WAAW,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAA;IACzD,UAAU,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAA;IACxD,YAAY,EAAE,CAAC,CAAC,EAAE,WAAW,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAA;IAC3D,WAAW,EAAE,CAAC,CAAC,EAAE,cAAc,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAA;CAC9D,CAAA;AA6DD;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,iDAAiD,kBAAkB,KAAG,iBAmCjG,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 s } from "../../Icons/EmailIcon.js";
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 c } from "../../Input.js";
62
- import { Label as n } from "../../Label.js";
61
+ import { Input as s } from "../../Input.js";
62
+ import { Label as c } from "../../Label.js";
63
63
  import "react";
64
- import { m as d } from "../../proxy-C9AqCss6.js";
65
- const ko = ({
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(n, { htmlFor: "reset-email", className: "mb-2 block", children: "Email address" }),
73
+ /* @__PURE__ */ o(c, { htmlFor: "reset-email", className: "mb-2 block", children: "Email address" }),
74
74
  /* @__PURE__ */ o(
75
- c,
75
+ s,
76
76
  {
77
77
  type: "email",
78
78
  id: "reset-email",
79
79
  value: m,
80
- onChange: (l) => p(l.target.value),
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(s, { size: 22, className: "absolute top-1/2 right-4 -translate-y-1/2 transition-colors" })
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(d.div, { whileHover: { scale: r ? 1 : 1.02 }, whileTap: { scale: r ? 1 : 0.98 }, children: /* @__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
- ko as ForgotPasswordEmailForm
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 u } from "../../Icons/EyeClosedIcon.js";
23
+ import { EyeClosedIcon as h } from "../../Icons/EyeClosedIcon.js";
24
24
  import "../../Icons/EyeClosedIcon2.js";
25
- import { EyeOpenIcon as f } from "../../Icons/EyeOpenIcon.js";
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 w } from "../../Input.js";
62
- import { calculatePasswordStrength as g } from "../../utils/sharedUtils.js";
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 zt = ({
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 ? g(r) : null;
75
+ const [i, p] = x(!1), o = r && c ? w(r) : null;
76
76
  return /* @__PURE__ */ m("div", { children: [
77
77
  /* @__PURE__ */ t(
78
- w,
78
+ f,
79
79
  {
80
80
  type: i ? "text" : "password",
81
81
  value: r,
82
- onChange: (h) => s(h.target.value),
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
- u,
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
- f,
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
- zt as PasswordInput
133
+ vt as PasswordInput
134
134
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spear-ai/spectral",
3
- "version": "1.3.65",
3
+ "version": "1.3.67",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "repository": {