@spear-ai/spectral 1.8.0 → 1.8.1
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/DateTimePicker/Calendar.js +364 -359
- package/dist/DateTimePicker/DateTimeUtils.js +2 -2
- package/dist/IconsAnimated/PanelLeftCloseIcon.js +4 -4
- package/dist/IconsAnimated/PanelLeftOpenIcon.js +2 -2
- package/dist/MultiSelect/MultiSelectBase.js +29 -29
- package/dist/RadioGroup.js +2 -2
- package/dist/Select.js +38 -38
- package/dist/Tabs/TabsBase.js +2 -2
- package/dist/Tray.js +2 -2
- package/dist/index-Cl8VeY0o.js +149 -0
- package/dist/{proxy-CgaCj1WQ.js → proxy-CO_-Vget.js} +3107 -2803
- package/dist/styles/spectral.css +1 -1
- package/dist/{use-animation-CR-SdV2l.js → use-animation-DhEPRwZ3.js} +1 -1
- package/dist/utils/twUtils.js +528 -369
- package/package.json +33 -33
- package/dist/index-DdFoGvON.js +0 -146
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spear-ai/spectral",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"repository": {
|
|
@@ -65,62 +65,62 @@
|
|
|
65
65
|
"date-fns": "^4.1.0",
|
|
66
66
|
"input-otp": "^1.4.2",
|
|
67
67
|
"lucide-react": "^0.562.0",
|
|
68
|
-
"motion": "^12.
|
|
69
|
-
"react-day-picker": "^9.
|
|
68
|
+
"motion": "^12.34.4",
|
|
69
|
+
"react-day-picker": "^9.14.0",
|
|
70
70
|
"react-remove-scroll": "^2.7.2",
|
|
71
|
-
"react-router": "^7.
|
|
71
|
+
"react-router": "^7.13.1",
|
|
72
72
|
"react-use-measure": "^2.1.7",
|
|
73
73
|
"sonner": "^2.0.7",
|
|
74
|
-
"tailwind-merge": "^3.
|
|
74
|
+
"tailwind-merge": "^3.5.0",
|
|
75
75
|
"tailwindcss-animate": "^1.0.7",
|
|
76
76
|
"unicornstudio-react": "^1.5.2",
|
|
77
77
|
"vaul": "^1.1.2",
|
|
78
|
-
"zod": "^4.3.
|
|
78
|
+
"zod": "^4.3.6"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
81
|
"@changesets/cli": "^2.29.8",
|
|
82
|
-
"@github-ui/storybook-addon-performance-panel": "^1.0.1",
|
|
83
82
|
"@chromatic-com/storybook": "^4.1.3",
|
|
83
|
+
"@github-ui/storybook-addon-performance-panel": "^1.1.4",
|
|
84
84
|
"@prettier/plugin-oxc": "^0.1.3",
|
|
85
|
-
"@sentry/react": "^10.
|
|
86
|
-
"@sentry/vite-plugin": "^4.
|
|
87
|
-
"@storybook/addon-docs": "^10.
|
|
88
|
-
"@storybook/addon-themes": "^10.
|
|
89
|
-
"@storybook/addon-vitest": "^10.
|
|
90
|
-
"@storybook/builder-vite": "^10.
|
|
91
|
-
"@storybook/react-vite": "^10.
|
|
92
|
-
"@tailwindcss/vite": "^4.1
|
|
85
|
+
"@sentry/react": "^10.41.0",
|
|
86
|
+
"@sentry/vite-plugin": "^4.9.1",
|
|
87
|
+
"@storybook/addon-docs": "^10.2.14",
|
|
88
|
+
"@storybook/addon-themes": "^10.2.14",
|
|
89
|
+
"@storybook/addon-vitest": "^10.2.14",
|
|
90
|
+
"@storybook/builder-vite": "^10.2.14",
|
|
91
|
+
"@storybook/react-vite": "^10.2.14",
|
|
92
|
+
"@tailwindcss/vite": "^4.2.1",
|
|
93
93
|
"@testing-library/jest-dom": "^6.9.1",
|
|
94
|
-
"@testing-library/react": "^16.3.
|
|
94
|
+
"@testing-library/react": "^16.3.2",
|
|
95
95
|
"@testing-library/user-event": "^14.6.1",
|
|
96
|
-
"@types/node": "^24.
|
|
97
|
-
"@types/react": "^19.2.
|
|
96
|
+
"@types/node": "^24.11.0",
|
|
97
|
+
"@types/react": "^19.2.14",
|
|
98
98
|
"@types/react-dom": "^19.2.3",
|
|
99
|
-
"@vitejs/plugin-react": "^5.1.
|
|
100
|
-
"@vitejs/plugin-react-swc": "^4.2.
|
|
99
|
+
"@vitejs/plugin-react": "^5.1.4",
|
|
100
|
+
"@vitejs/plugin-react-swc": "^4.2.3",
|
|
101
101
|
"@vitest/browser": "4.0.16",
|
|
102
|
-
"@vitest/browser-playwright": "^4.0.
|
|
102
|
+
"@vitest/browser-playwright": "^4.0.18",
|
|
103
103
|
"@vitest/coverage-v8": "4.0.16",
|
|
104
|
-
"@vitest/ui": "^4.0.
|
|
104
|
+
"@vitest/ui": "^4.0.18",
|
|
105
105
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
106
|
-
"glob": "^13.0.
|
|
106
|
+
"glob": "^13.0.6",
|
|
107
107
|
"http-server": "^14.1.1",
|
|
108
|
-
"oxlint": "^1.
|
|
109
|
-
"oxlint-tsgolint": "^0.11.
|
|
110
|
-
"playwright": "^1.
|
|
111
|
-
"prettier": "^3.
|
|
112
|
-
"prettier-plugin-sort-imports": "^1.8.
|
|
108
|
+
"oxlint": "^1.51.0",
|
|
109
|
+
"oxlint-tsgolint": "^0.11.5",
|
|
110
|
+
"playwright": "^1.58.2",
|
|
111
|
+
"prettier": "^3.8.1",
|
|
112
|
+
"prettier-plugin-sort-imports": "^1.8.11",
|
|
113
113
|
"prettier-plugin-tailwindcss": "^0.7.2",
|
|
114
|
-
"storybook": "^10.
|
|
114
|
+
"storybook": "^10.2.14",
|
|
115
115
|
"stylelint": "^16.26.1",
|
|
116
116
|
"stylelint-config-standard": "^39.0.1",
|
|
117
|
-
"tailwindcss": "^4.1
|
|
117
|
+
"tailwindcss": "^4.2.1",
|
|
118
118
|
"typescript": "^5.9.3",
|
|
119
|
-
"vite": "^7.3.
|
|
119
|
+
"vite": "^7.3.1",
|
|
120
120
|
"vite-bundle-visualizer": "^1.2.1",
|
|
121
121
|
"vite-plugin-dts": "^4.5.4",
|
|
122
|
-
"vitest": "^4.0.
|
|
123
|
-
"vitest-browser-react": "^2.0.
|
|
122
|
+
"vitest": "^4.0.18",
|
|
123
|
+
"vitest-browser-react": "^2.0.5"
|
|
124
124
|
},
|
|
125
125
|
"peerDependencies": {
|
|
126
126
|
"react": "^18.0.0 || ^19.0.0",
|
package/dist/index-DdFoGvON.js
DELETED
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
import "./styles/main.css";
|
|
2
|
-
import { jsx as w, Fragment as N } from "react/jsx-runtime";
|
|
3
|
-
import * as v from "react";
|
|
4
|
-
import { useId as T, useRef as P, useContext as D, useInsertionEffect as S, useMemo as $, Children as U, isValidElement as V, useState as z } from "react";
|
|
5
|
-
import { M as X, d as _, u as W, P as B, e as F, b as G, L as O } from "./proxy-CgaCj1WQ.js";
|
|
6
|
-
function A(e, s) {
|
|
7
|
-
if (typeof e == "function")
|
|
8
|
-
return e(s);
|
|
9
|
-
e != null && (e.current = s);
|
|
10
|
-
}
|
|
11
|
-
function Y(...e) {
|
|
12
|
-
return (s) => {
|
|
13
|
-
let t = !1;
|
|
14
|
-
const o = e.map((r) => {
|
|
15
|
-
const n = A(r, s);
|
|
16
|
-
return !t && typeof n == "function" && (t = !0), n;
|
|
17
|
-
});
|
|
18
|
-
if (t)
|
|
19
|
-
return () => {
|
|
20
|
-
for (let r = 0; r < o.length; r++) {
|
|
21
|
-
const n = o[r];
|
|
22
|
-
typeof n == "function" ? n() : A(e[r], null);
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
function q(...e) {
|
|
28
|
-
return v.useCallback(Y(...e), e);
|
|
29
|
-
}
|
|
30
|
-
class J extends v.Component {
|
|
31
|
-
getSnapshotBeforeUpdate(s) {
|
|
32
|
-
const t = this.props.childRef.current;
|
|
33
|
-
if (t && s.isPresent && !this.props.isPresent) {
|
|
34
|
-
const o = t.offsetParent, r = _(o) && o.offsetWidth || 0, n = this.props.sizeRef.current;
|
|
35
|
-
n.height = t.offsetHeight || 0, n.width = t.offsetWidth || 0, n.top = t.offsetTop, n.left = t.offsetLeft, n.right = r - n.width - n.left;
|
|
36
|
-
}
|
|
37
|
-
return null;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Required with getSnapshotBeforeUpdate to stop React complaining.
|
|
41
|
-
*/
|
|
42
|
-
componentDidUpdate() {
|
|
43
|
-
}
|
|
44
|
-
render() {
|
|
45
|
-
return this.props.children;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
function Q({ children: e, isPresent: s, anchorX: t, root: o }) {
|
|
49
|
-
const r = T(), n = P(null), p = P({
|
|
50
|
-
width: 0,
|
|
51
|
-
height: 0,
|
|
52
|
-
top: 0,
|
|
53
|
-
left: 0,
|
|
54
|
-
right: 0
|
|
55
|
-
}), { nonce: C } = D(X), x = q(n, e?.ref);
|
|
56
|
-
return S(() => {
|
|
57
|
-
const { width: i, height: g, top: c, left: u, right: a } = p.current;
|
|
58
|
-
if (s || !n.current || !i || !g)
|
|
59
|
-
return;
|
|
60
|
-
const h = t === "left" ? `left: ${u}` : `right: ${a}`;
|
|
61
|
-
n.current.dataset.motionPopId = r;
|
|
62
|
-
const l = document.createElement("style");
|
|
63
|
-
C && (l.nonce = C);
|
|
64
|
-
const R = o ?? document.head;
|
|
65
|
-
return R.appendChild(l), l.sheet && l.sheet.insertRule(`
|
|
66
|
-
[data-motion-pop-id="${r}"] {
|
|
67
|
-
position: absolute !important;
|
|
68
|
-
width: ${i}px !important;
|
|
69
|
-
height: ${g}px !important;
|
|
70
|
-
${h}px !important;
|
|
71
|
-
top: ${c}px !important;
|
|
72
|
-
}
|
|
73
|
-
`), () => {
|
|
74
|
-
R.contains(l) && R.removeChild(l);
|
|
75
|
-
};
|
|
76
|
-
}, [s]), w(J, { isPresent: s, childRef: n, sizeRef: p, children: v.cloneElement(e, { ref: x }) });
|
|
77
|
-
}
|
|
78
|
-
const Z = ({ children: e, initial: s, isPresent: t, onExitComplete: o, custom: r, presenceAffectsLayout: n, mode: p, anchorX: C, root: x }) => {
|
|
79
|
-
const i = W(ee), g = T();
|
|
80
|
-
let c = !0, u = $(() => (c = !1, {
|
|
81
|
-
id: g,
|
|
82
|
-
initial: s,
|
|
83
|
-
isPresent: t,
|
|
84
|
-
custom: r,
|
|
85
|
-
onExitComplete: (a) => {
|
|
86
|
-
i.set(a, !0);
|
|
87
|
-
for (const h of i.values())
|
|
88
|
-
if (!h)
|
|
89
|
-
return;
|
|
90
|
-
o && o();
|
|
91
|
-
},
|
|
92
|
-
register: (a) => (i.set(a, !1), () => i.delete(a))
|
|
93
|
-
}), [t, i, o]);
|
|
94
|
-
return n && c && (u = { ...u }), $(() => {
|
|
95
|
-
i.forEach((a, h) => i.set(h, !1));
|
|
96
|
-
}, [t]), v.useEffect(() => {
|
|
97
|
-
!t && !i.size && o && o();
|
|
98
|
-
}, [t]), p === "popLayout" && (e = w(Q, { isPresent: t, anchorX: C, root: x, children: e })), w(B.Provider, { value: u, children: e });
|
|
99
|
-
};
|
|
100
|
-
function ee() {
|
|
101
|
-
return /* @__PURE__ */ new Map();
|
|
102
|
-
}
|
|
103
|
-
const E = (e) => e.key || "";
|
|
104
|
-
function I(e) {
|
|
105
|
-
const s = [];
|
|
106
|
-
return U.forEach(e, (t) => {
|
|
107
|
-
V(t) && s.push(t);
|
|
108
|
-
}), s;
|
|
109
|
-
}
|
|
110
|
-
const oe = ({ children: e, custom: s, initial: t = !0, onExitComplete: o, presenceAffectsLayout: r = !0, mode: n = "sync", propagate: p = !1, anchorX: C = "left", root: x }) => {
|
|
111
|
-
const [i, g] = F(p), c = $(() => I(e), [e]), u = p && !i ? [] : c.map(E), a = P(!0), h = P(c), l = W(() => /* @__PURE__ */ new Map()), [R, j] = z(c), [m, b] = z(c);
|
|
112
|
-
G(() => {
|
|
113
|
-
a.current = !1, h.current = c;
|
|
114
|
-
for (let d = 0; d < m.length; d++) {
|
|
115
|
-
const f = E(m[d]);
|
|
116
|
-
u.includes(f) ? l.delete(f) : l.get(f) !== !0 && l.set(f, !1);
|
|
117
|
-
}
|
|
118
|
-
}, [m, u.length, u.join("-")]);
|
|
119
|
-
const M = [];
|
|
120
|
-
if (c !== R) {
|
|
121
|
-
let d = [...c];
|
|
122
|
-
for (let f = 0; f < m.length; f++) {
|
|
123
|
-
const y = m[f], L = E(y);
|
|
124
|
-
u.includes(L) || (d.splice(f, 0, y), M.push(y));
|
|
125
|
-
}
|
|
126
|
-
return n === "wait" && M.length && (d = M), b(I(d)), j(c), null;
|
|
127
|
-
}
|
|
128
|
-
process.env.NODE_ENV !== "production" && n === "wait" && m.length > 1 && console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);
|
|
129
|
-
const { forceRender: H } = D(O);
|
|
130
|
-
return w(N, { children: m.map((d) => {
|
|
131
|
-
const f = E(d), y = p && !i ? !1 : c === m || u.includes(f), L = () => {
|
|
132
|
-
if (l.has(f))
|
|
133
|
-
l.set(f, !0);
|
|
134
|
-
else
|
|
135
|
-
return;
|
|
136
|
-
let k = !0;
|
|
137
|
-
l.forEach((K) => {
|
|
138
|
-
K || (k = !1);
|
|
139
|
-
}), k && (H?.(), b(h.current), p && g?.(), o && o());
|
|
140
|
-
};
|
|
141
|
-
return w(Z, { isPresent: y, initial: !a.current || t ? void 0 : !1, custom: s, presenceAffectsLayout: r, mode: n, root: x, onExitComplete: y ? void 0 : L, anchorX: C, children: d }, f);
|
|
142
|
-
}) });
|
|
143
|
-
};
|
|
144
|
-
export {
|
|
145
|
-
oe as A
|
|
146
|
-
};
|