@spear-ai/spectral 1.3.57 → 1.3.59

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.
Files changed (90) hide show
  1. package/dist/.js +51 -49
  2. package/dist/Alert.d.ts +1 -1
  3. package/dist/Alert.js +3 -2
  4. package/dist/Button.d.ts +5 -5
  5. package/dist/Button.js +4 -5
  6. package/dist/ButtonIcon.d.ts +4 -4
  7. package/dist/ButtonIcon.js +1 -0
  8. package/dist/Dialog/DialogBase.d.ts +14 -14
  9. package/dist/Dialog/DialogBase.js +1 -1
  10. package/dist/Drawer.d.ts +6 -6
  11. package/dist/Icons/MinusIcon.d.ts +3 -0
  12. package/dist/Icons/MinusIcon.js +26 -0
  13. package/dist/Icons/index.d.ts +1 -0
  14. package/dist/Icons.js +40 -38
  15. package/dist/Input.js +1 -0
  16. package/dist/InputOTP.d.ts +29 -0
  17. package/dist/InputOTP.js +302 -0
  18. package/dist/PasswordInput-ClY_hxuN.js +261 -0
  19. package/dist/RadioButtonGroup/RadioButtonGroupBase.d.ts +6 -6
  20. package/dist/RadioGroup.d.ts +7 -7
  21. package/dist/Select.d.ts +12 -12
  22. package/dist/Select.js +1 -0
  23. package/dist/Switch.d.ts +6 -6
  24. package/dist/Textarea.js +1 -0
  25. package/dist/Toggle/ToggleBase.d.ts +6 -4
  26. package/dist/ToggleGroup/ToggleGroupBase.d.ts +8 -8
  27. package/dist/components/Alert/Alert.d.ts +1 -1
  28. package/dist/components/Alert/Alert.d.ts.map +1 -1
  29. package/dist/components/Button/Button.d.ts +5 -5
  30. package/dist/components/Button/Button.d.ts.map +1 -1
  31. package/dist/components/ButtonIcon/ButtonIcon.d.ts +4 -4
  32. package/dist/components/ButtonIcon/ButtonIcon.d.ts.map +1 -1
  33. package/dist/components/Dialog/DialogBase.d.ts +14 -14
  34. package/dist/components/Dialog/DialogBase.d.ts.map +1 -1
  35. package/dist/components/Drawer/Drawer.d.ts +6 -6
  36. package/dist/components/Drawer/Drawer.d.ts.map +1 -1
  37. package/dist/components/Icons/MinusIcon.d.ts +3 -0
  38. package/dist/components/Icons/MinusIcon.d.ts.map +1 -0
  39. package/dist/components/Icons/index.d.ts +1 -0
  40. package/dist/components/Icons/index.d.ts.map +1 -1
  41. package/dist/components/InputOTP/InputOTP.d.ts +29 -0
  42. package/dist/components/InputOTP/InputOTP.d.ts.map +1 -0
  43. package/dist/components/RadioButtonGroup/RadioButtonGroupBase.d.ts +6 -6
  44. package/dist/components/RadioButtonGroup/RadioButtonGroupBase.d.ts.map +1 -1
  45. package/dist/components/RadioGroup/RadioGroup.d.ts +7 -7
  46. package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -1
  47. package/dist/components/Select/Select.d.ts +12 -12
  48. package/dist/components/Select/Select.d.ts.map +1 -1
  49. package/dist/components/Switch/Switch.d.ts +6 -6
  50. package/dist/components/Switch/Switch.d.ts.map +1 -1
  51. package/dist/components/Toggle/ToggleBase.d.ts +6 -4
  52. package/dist/components/Toggle/ToggleBase.d.ts.map +1 -1
  53. package/dist/components/ToggleGroup/ToggleGroupBase.d.ts +8 -8
  54. package/dist/components/ToggleGroup/ToggleGroupBase.d.ts.map +1 -1
  55. package/dist/features/AuthCard/AuthCard.d.ts.map +1 -1
  56. package/dist/features/AuthCard/AuthToggle.d.ts +9 -0
  57. package/dist/features/AuthCard/AuthToggle.d.ts.map +1 -0
  58. package/dist/features/AuthCard/AuthToggle.js +36 -0
  59. package/dist/features/AuthCard/ForgotPasswordEmailForm.d.ts +11 -0
  60. package/dist/features/AuthCard/ForgotPasswordEmailForm.d.ts.map +1 -0
  61. package/dist/features/AuthCard/ForgotPasswordEmailForm.js +92 -0
  62. package/dist/features/AuthCard/ForgotPasswordResetForm.d.ts +11 -0
  63. package/dist/features/AuthCard/ForgotPasswordResetForm.d.ts.map +1 -0
  64. package/dist/features/AuthCard/ForgotPasswordResetForm.js +66 -0
  65. package/dist/features/AuthCard/OTPInput.d.ts +12 -0
  66. package/dist/features/AuthCard/OTPInput.d.ts.map +1 -0
  67. package/dist/features/AuthCard/OTPInput.js +30 -0
  68. package/dist/features/AuthCard/PasswordInput.d.ts +13 -0
  69. package/dist/features/AuthCard/PasswordInput.d.ts.map +1 -0
  70. package/dist/features/AuthCard/PasswordInput.js +56 -0
  71. package/dist/features/AuthCard/SignInForm.d.ts +9 -0
  72. package/dist/features/AuthCard/SignInForm.d.ts.map +1 -0
  73. package/dist/features/AuthCard/SignInForm.js +120 -0
  74. package/dist/features/AuthCard/SignUpForm.d.ts +8 -0
  75. package/dist/features/AuthCard/SignUpForm.d.ts.map +1 -0
  76. package/dist/features/AuthCard/SignUpForm.js +135 -0
  77. package/dist/features/AuthCard.js +234 -5124
  78. package/dist/features/LabelingTools.js +3 -2
  79. package/dist/features/SensorMetadata.js +3 -2
  80. package/dist/features/SettingsPopover.js +3 -2
  81. package/dist/index.d.ts +1 -1
  82. package/dist/index.d.ts.map +1 -1
  83. package/dist/proxy-DD79Ok6n.js +4670 -0
  84. package/dist/styles/main.css +1 -1
  85. package/dist/utils/formFieldUtils.js +1 -1
  86. package/package.json +1 -1
  87. package/dist/RadioGroup/RadioGroupBase.d.ts +0 -52
  88. package/dist/RadioGroup/RadioGroupBase.js +0 -249
  89. package/dist/components/RadioGroup/RadioGroupBase.d.ts +0 -52
  90. package/dist/components/RadioGroup/RadioGroupBase.d.ts.map +0 -1
@@ -1,249 +0,0 @@
1
- "use client";
2
- import "../styles/main.css";
3
- import { jsx as A, jsxs as T } from "react/jsx-runtime";
4
- import { useControllableState as z } from "../hooks/useControllableState.js";
5
- import { Slot as L } from "../primitives/slot.js";
6
- import { createContext as J, forwardRef as P, useId as U, useState as $, useRef as V, useEffect as E, useCallback as G, useContext as B, useImperativeHandle as K } from "react";
7
- function q(...u) {
8
- return u.filter(Boolean).join(" ");
9
- }
10
- const H = J(null);
11
- function Q(u, a, t, o) {
12
- const l = u.length;
13
- let n = a;
14
- for (let f = 0; f < l; f += 1) {
15
- if (n = t === "next" ? n + 1 : n - 1, o && (n < 0 && (n = l - 1), n >= l && (n = 0)), n < 0 || n >= l) return a;
16
- if (!u[n].disabled) return n;
17
- }
18
- return a;
19
- }
20
- function W(u, a, t) {
21
- const { key: o } = u;
22
- return o === "Home" ? "first" : o === "End" ? "last" : a === "vertical" ? o === "ArrowDown" ? "next" : o === "ArrowUp" ? "prev" : null : o === "ArrowRight" ? t === "rtl" ? "prev" : "next" : o === "ArrowLeft" ? t === "rtl" ? "next" : "prev" : null;
23
- }
24
- const X = P(
25
- ({
26
- asChild: u,
27
- className: a,
28
- value: t,
29
- defaultValue: o,
30
- onValueChange: l,
31
- name: n,
32
- required: f = !1,
33
- form: y,
34
- disabled: b = !1,
35
- orientation: e = "vertical",
36
- dir: N = "ltr",
37
- loop: p = !0,
38
- variant: v = "default",
39
- id: c,
40
- ...d
41
- }, m) => {
42
- const O = U(), F = c ?? `rg-${O}`, [g, k] = z({
43
- value: t,
44
- defaultValue: o ?? void 0,
45
- onChange: l
46
- }), [w, C] = $(g), R = V([]), I = V(null);
47
- E(() => {
48
- g !== void 0 && C(g);
49
- }, [g]), E(() => {
50
- const s = I.current;
51
- if (!s) return;
52
- const i = () => {
53
- k(o ?? void 0);
54
- };
55
- return s.addEventListener("reset", i), () => s.removeEventListener("reset", i);
56
- }, [o, k]);
57
- const r = G((s) => (R.current.push(s), () => {
58
- R.current = R.current.filter((i) => i.value !== s.value);
59
- }), []), h = G(
60
- (s, i) => {
61
- b || (k(s), i?.focus && (C(s), R.current.find((M) => M.value === s)?.ref.current?.focus()));
62
- },
63
- [b, k]
64
- ), x = {
65
- value: g,
66
- setValue: h,
67
- name: n,
68
- required: f,
69
- form: y,
70
- disabled: b,
71
- orientation: e,
72
- dir: N,
73
- loop: p,
74
- registerItem: r,
75
- focusableValue: w,
76
- setFocusableValue: C,
77
- formElRef: I,
78
- itemsRef: R,
79
- variant: v
80
- }, D = u ? L : "div", S = m;
81
- return /* @__PURE__ */ A(H.Provider, { value: x, children: /* @__PURE__ */ A(
82
- D,
83
- {
84
- id: F,
85
- ref: S,
86
- role: "radiogroup",
87
- "aria-orientation": e,
88
- "data-disabled": b ? "" : void 0,
89
- className: q(a),
90
- ...d
91
- }
92
- ) });
93
- }
94
- );
95
- X.displayName = "RadioGroup";
96
- const Y = P(
97
- ({ asChild: u, className: a, value: t, disabled: o, id: l, onKeyDown: n, onClick: f, ...y }, b) => {
98
- const e = B(H);
99
- if (!e) throw new Error("RadioGroupItem must be used within RadioGroup");
100
- const N = U(), p = l ?? `rgi-${N}`, v = V(null), c = V(null);
101
- K(
102
- b,
103
- () => v.current,
104
- []
105
- );
106
- const d = e.value === t, m = !!o || e.disabled;
107
- E(() => {
108
- const r = { value: t, ref: v, disabled: !!m, id: p };
109
- return e.registerItem(r);
110
- }, [t, m, p]), E(() => {
111
- !e.formElRef.current && c.current?.form && (e.formElRef.current = c.current.form);
112
- }, [e.formElRef]), E(() => {
113
- c.current && (c.current.checked = d);
114
- }, [d]);
115
- const F = (e.focusableValue ? e.focusableValue === t : d) && !m ? 0 : -1, g = u ? L : "button", k = (r) => {
116
- v.current = r;
117
- }, w = G(
118
- (r) => {
119
- if (!m && (e.setValue(t, { focus: !0, user: r }), c.current)) {
120
- const h = new Event("change", { bubbles: !0 });
121
- c.current.dispatchEvent(h);
122
- }
123
- },
124
- [e, m, t]
125
- ), C = G(
126
- (r) => {
127
- f?.(r), !r.defaultPrevented && w(!0);
128
- },
129
- [f, w]
130
- ), R = G(
131
- (r) => {
132
- if (n?.(r), r.defaultPrevented) return;
133
- if (r.key === " " || r.key === "Enter") {
134
- r.preventDefault(), w(!0);
135
- return;
136
- }
137
- const h = W(r, e.orientation, e.dir);
138
- if (h) {
139
- r.preventDefault();
140
- const x = [...e.itemsRef.current], D = x.findIndex((i) => i.value === t);
141
- if (D === -1) return;
142
- if (h === "first") {
143
- const i = x.find((j) => !j.disabled);
144
- i && e.setValue(i.value, { focus: !0, user: !0 });
145
- return;
146
- }
147
- if (h === "last") {
148
- const i = [...x].reverse().find((j) => !j.disabled);
149
- i && e.setValue(i.value, { focus: !0, user: !0 });
150
- return;
151
- }
152
- const S = Q(x, D, h, e.loop), s = x[S];
153
- s && !s.disabled && e.setValue(s.value, { focus: !0, user: !0 });
154
- }
155
- },
156
- [e, n, w, t]
157
- ), I = e.variant === "unstyled";
158
- return /* @__PURE__ */ T(
159
- g,
160
- {
161
- id: p,
162
- ref: k,
163
- type: "button",
164
- role: "radio",
165
- "aria-checked": d,
166
- "aria-disabled": m || void 0,
167
- "data-state": d ? "checked" : "unchecked",
168
- "data-disabled": m ? "" : void 0,
169
- tabIndex: F,
170
- onClick: C,
171
- onKeyDown: R,
172
- className: q(
173
- // Only apply default styles when not unstyled
174
- !I && "border-input bg-background focus-visible:ring-ring inline-flex h-4 w-4 shrink-0 items-center justify-center rounded-full border focus-visible:ring-2 focus-visible:ring-offset-2",
175
- !I && "data-[state=checked]:border-primary data-[state=checked]:bg-primary/10 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
176
- // Always preserve basic accessibility for unstyled variant
177
- I && "border-sm focus-visible:ring-ring data-[state=checked]:border-selected-primary cursor-pointer rounded-sm border-2 border-transparent transition-opacity hover:opacity-70 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",
178
- a
179
- ),
180
- ...y,
181
- children: [
182
- /* @__PURE__ */ A(
183
- "input",
184
- {
185
- ref: c,
186
- type: "radio",
187
- name: e.name,
188
- value: t,
189
- required: e.required,
190
- disabled: m,
191
- form: e.form,
192
- checked: d,
193
- readOnly: !0,
194
- tabIndex: -1,
195
- "aria-hidden": "true",
196
- style: {
197
- position: "absolute",
198
- opacity: 0,
199
- width: 0,
200
- height: 0,
201
- pointerEvents: "none"
202
- }
203
- }
204
- ),
205
- y.children
206
- ]
207
- }
208
- );
209
- }
210
- );
211
- Y.displayName = "RadioGroupItem";
212
- const Z = P(
213
- ({ asChild: u, className: a, forceMount: t, ...o }, l) => {
214
- if (!B(H)) return null;
215
- const [f, y] = $(!1), b = V(null);
216
- return K(
217
- l,
218
- () => b.current,
219
- []
220
- ), E(() => {
221
- const p = b.current;
222
- if (!p) return;
223
- const v = p.closest('[role="radio"]');
224
- if (!v) return;
225
- const c = () => {
226
- y(v.getAttribute("aria-checked") === "true");
227
- };
228
- c();
229
- const d = new MutationObserver(c);
230
- return d.observe(v, { attributes: !0, attributeFilter: ["aria-checked"] }), () => d.disconnect();
231
- }, []), !f && !t ? null : /* @__PURE__ */ A(
232
- u ? L : "span",
233
- {
234
- ref: (p) => {
235
- b.current = p;
236
- },
237
- "data-state": f ? "checked" : "unchecked",
238
- className: q("flex items-center justify-center text-current", a),
239
- ...o
240
- }
241
- );
242
- }
243
- );
244
- Z.displayName = "RadioGroupIndicator";
245
- export {
246
- X as RadioGroup,
247
- Z as RadioGroupIndicator,
248
- Y as RadioGroupItem
249
- };
@@ -1,52 +0,0 @@
1
- import { AsChildProp } from '../../primitives/slot';
2
- import { ButtonHTMLAttributes, HTMLAttributes } from 'react';
3
- type Orientation = 'horizontal' | 'vertical';
4
- type Dir = 'ltr' | 'rtl';
5
- type GroupBaseProps = Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'role'>;
6
- export type RadioGroupProps = GroupBaseProps & AsChildProp & {
7
- value?: string;
8
- defaultValue?: string;
9
- onValueChange?: (value: string | undefined) => void;
10
- name?: string;
11
- required?: boolean;
12
- form?: string;
13
- disabled?: boolean;
14
- orientation?: Orientation;
15
- dir?: Dir;
16
- loop?: boolean;
17
- variant?: 'default' | 'unstyled';
18
- };
19
- type ItemBaseProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onChange' | 'role' | 'value'>;
20
- export type RadioGroupItemProps = ItemBaseProps & AsChildProp & {
21
- value: string;
22
- disabled?: boolean;
23
- id?: string;
24
- 'aria-label'?: string;
25
- };
26
- export type RadioGroupIndicatorProps = HTMLAttributes<HTMLSpanElement> & AsChildProp & {
27
- forceMount?: boolean;
28
- };
29
- export declare const RadioGroup: import('react').ForwardRefExoticComponent<GroupBaseProps & AsChildProp & {
30
- value?: string;
31
- defaultValue?: string;
32
- onValueChange?: (value: string | undefined) => void;
33
- name?: string;
34
- required?: boolean;
35
- form?: string;
36
- disabled?: boolean;
37
- orientation?: Orientation;
38
- dir?: Dir;
39
- loop?: boolean;
40
- variant?: "default" | "unstyled";
41
- } & import('react').RefAttributes<HTMLDivElement>>;
42
- export declare const RadioGroupItem: import('react').ForwardRefExoticComponent<ItemBaseProps & AsChildProp & {
43
- value: string;
44
- disabled?: boolean;
45
- id?: string;
46
- 'aria-label'?: string;
47
- } & import('react').RefAttributes<HTMLButtonElement>>;
48
- export declare const RadioGroupIndicator: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLSpanElement> & AsChildProp & {
49
- forceMount?: boolean;
50
- } & import('react').RefAttributes<HTMLSpanElement>>;
51
- export {};
52
- //# sourceMappingURL=RadioGroupBase.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RadioGroupBase.d.ts","sourceRoot":"","sources":["../../../src/components/RadioGroup/RadioGroupBase.tsx"],"names":[],"mappings":"AACA,OAAO,EAAQ,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACzD,OAAO,EAUL,KAAK,oBAAoB,EAEzB,KAAK,cAAc,EAKpB,MAAM,OAAO,CAAA;AAMd,KAAK,WAAW,GAAG,YAAY,GAAG,UAAU,CAAA;AAC5C,KAAK,GAAG,GAAG,KAAK,GAAG,KAAK,CAAA;AAExB,KAAK,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC,CAAA;AAE/E,MAAM,MAAM,eAAe,GAAG,cAAc,GAC1C,WAAW,GAAG;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAA;IACnD,IAAI,CAAC,EAA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