@spear-ai/spectral 1.7.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.
Files changed (41) hide show
  1. package/dist/.js +65 -65
  2. package/dist/Accordion.js +1 -1
  3. package/dist/Alert/AlertBase.js +1 -1
  4. package/dist/Alert.js +1 -1
  5. package/dist/Button.js +1 -1
  6. package/dist/ButtonIcon.js +1 -1
  7. package/dist/Checkbox.js +1 -1
  8. package/dist/DateTimePicker/Calendar.js +365 -360
  9. package/dist/DateTimePicker/DateTimeUtils.js +2 -2
  10. package/dist/DateTimePicker.js +1 -1
  11. package/dist/Icons/PolygonIcon.d.ts +5 -0
  12. package/dist/Icons/PolygonIcon.js +40 -0
  13. package/dist/Icons/index.d.ts +1 -1
  14. package/dist/Icons.js +34 -34
  15. package/dist/IconsAnimated/PanelLeftCloseIcon.js +4 -4
  16. package/dist/IconsAnimated/PanelLeftOpenIcon.js +2 -2
  17. package/dist/Input.js +1 -1
  18. package/dist/InputOTP.js +1 -1
  19. package/dist/MultiSelect/MultiSelectBase.js +30 -30
  20. package/dist/RadioGroup.js +2 -2
  21. package/dist/Select.js +39 -39
  22. package/dist/Switch/SwitchBase.js +70 -106
  23. package/dist/Switch.d.ts +1 -1
  24. package/dist/Switch.js +122 -33
  25. package/dist/Tabs/TabsBase.js +2 -2
  26. package/dist/Textarea.js +1 -1
  27. package/dist/Toast.js +1 -1
  28. package/dist/Tray.js +3 -3
  29. package/dist/index-Cl8VeY0o.js +149 -0
  30. package/dist/primitives/select.js +1 -1
  31. package/dist/{proxy-CgaCj1WQ.js → proxy-CO_-Vget.js} +3107 -2803
  32. package/dist/styles/horizon/colors.css +3 -2
  33. package/dist/styles/main.css +1 -1
  34. package/dist/styles/spectral.css +2 -2
  35. package/dist/styles/theme.css +3 -2
  36. package/dist/{use-animation-CR-SdV2l.js → use-animation-DhEPRwZ3.js} +1 -1
  37. package/dist/utils/twUtils.js +528 -369
  38. package/package.json +33 -32
  39. package/dist/Icons/LineToolIcon2.d.ts +0 -5
  40. package/dist/Icons/LineToolIcon2.js +0 -49
  41. 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.7.0",
3
+ "version": "1.8.1",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "repository": {
@@ -65,61 +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.23.26",
69
- "react-day-picker": "^9.13.0",
68
+ "motion": "^12.34.4",
69
+ "react-day-picker": "^9.14.0",
70
70
  "react-remove-scroll": "^2.7.2",
71
- "react-router": "^7.12.0",
71
+ "react-router": "^7.13.1",
72
72
  "react-use-measure": "^2.1.7",
73
73
  "sonner": "^2.0.7",
74
- "tailwind-merge": "^3.4.0",
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.4"
78
+ "zod": "^4.3.6"
79
79
  },
80
80
  "devDependencies": {
81
81
  "@changesets/cli": "^2.29.8",
82
82
  "@chromatic-com/storybook": "^4.1.3",
83
+ "@github-ui/storybook-addon-performance-panel": "^1.1.4",
83
84
  "@prettier/plugin-oxc": "^0.1.3",
84
- "@sentry/react": "^10.32.1",
85
- "@sentry/vite-plugin": "^4.6.1",
86
- "@storybook/addon-docs": "^10.1.11",
87
- "@storybook/addon-themes": "^10.1.11",
88
- "@storybook/addon-vitest": "^10.1.11",
89
- "@storybook/builder-vite": "^10.1.11",
90
- "@storybook/react-vite": "^10.1.11",
91
- "@tailwindcss/vite": "^4.1.18",
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",
92
93
  "@testing-library/jest-dom": "^6.9.1",
93
- "@testing-library/react": "^16.3.1",
94
+ "@testing-library/react": "^16.3.2",
94
95
  "@testing-library/user-event": "^14.6.1",
95
- "@types/node": "^24.10.1",
96
- "@types/react": "^19.2.7",
96
+ "@types/node": "^24.11.0",
97
+ "@types/react": "^19.2.14",
97
98
  "@types/react-dom": "^19.2.3",
98
- "@vitejs/plugin-react": "^5.1.2",
99
- "@vitejs/plugin-react-swc": "^4.2.2",
99
+ "@vitejs/plugin-react": "^5.1.4",
100
+ "@vitejs/plugin-react-swc": "^4.2.3",
100
101
  "@vitest/browser": "4.0.16",
101
- "@vitest/browser-playwright": "^4.0.16",
102
+ "@vitest/browser-playwright": "^4.0.18",
102
103
  "@vitest/coverage-v8": "4.0.16",
103
- "@vitest/ui": "^4.0.16",
104
+ "@vitest/ui": "^4.0.18",
104
105
  "eslint-plugin-jsx-a11y": "^6.10.2",
105
- "glob": "^13.0.0",
106
+ "glob": "^13.0.6",
106
107
  "http-server": "^14.1.1",
107
- "oxlint": "^1.36.0",
108
- "oxlint-tsgolint": "^0.11.1",
109
- "playwright": "^1.57.0",
110
- "prettier": "^3.7.4",
111
- "prettier-plugin-sort-imports": "^1.8.9",
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",
112
113
  "prettier-plugin-tailwindcss": "^0.7.2",
113
- "storybook": "^10.1.11",
114
+ "storybook": "^10.2.14",
114
115
  "stylelint": "^16.26.1",
115
116
  "stylelint-config-standard": "^39.0.1",
116
- "tailwindcss": "^4.1.18",
117
+ "tailwindcss": "^4.2.1",
117
118
  "typescript": "^5.9.3",
118
- "vite": "^7.3.0",
119
+ "vite": "^7.3.1",
119
120
  "vite-bundle-visualizer": "^1.2.1",
120
121
  "vite-plugin-dts": "^4.5.4",
121
- "vitest": "^4.0.16",
122
- "vitest-browser-react": "^2.0.0"
122
+ "vitest": "^4.0.18",
123
+ "vitest-browser-react": "^2.0.5"
123
124
  },
124
125
  "peerDependencies": {
125
126
  "react": "^18.0.0 || ^19.0.0",
@@ -1,5 +0,0 @@
1
- import { IconProps } from './iconTypes';
2
- export declare const LineToolIcon2: (({ ref, className, ariaHidden, title, description, size, ...rest }: IconProps) => import("react/jsx-runtime").JSX.Element) & {
3
- displayName: string;
4
- };
5
- //# sourceMappingURL=LineToolIcon2.d.ts.map
@@ -1,49 +0,0 @@
1
- import "../styles/main.css";
2
- import { jsxs as d, jsx as o } from "react/jsx-runtime";
3
- import k from "./IconBase.js";
4
- const c = ({ ref: r, className: e, ariaHidden: n, title: t, description: C, size: s = 24, ...i }) => /* @__PURE__ */ d(k, { size: s, className: e, title: t, description: C, ariaHidden: n, ref: r, ...i, children: [
5
- /* @__PURE__ */ o(
6
- "path",
7
- {
8
- d: "M2.95239 4.84212C2.95239 5.34464 3.15307 5.82657 3.51028 6.18191C3.8675 6.53724 4.35198 6.73686 4.85715 6.73686C5.36233 6.73686 5.84681 6.53724 6.20402 6.18191C6.56124 5.82657 6.76192 5.34464 6.76192 4.84212C6.76192 4.33961 6.56124 3.85768 6.20402 3.50234C5.84681 3.14701 5.36233 2.94739 4.85715 2.94739C4.35198 2.94739 3.8675 3.14701 3.51028 3.50234C3.15307 3.85768 2.95239 4.33961 2.95239 4.84212Z",
9
- stroke: "currentColor",
10
- strokeWidth: "2",
11
- strokeLinecap: "round",
12
- strokeLinejoin: "round"
13
- }
14
- ),
15
- /* @__PURE__ */ o(
16
- "path",
17
- {
18
- d: "M17.238 17.1579C17.238 17.6604 17.4387 18.1424 17.7959 18.4977C18.1531 18.853 18.6376 19.0527 19.1428 19.0527C19.648 19.0527 20.1325 18.853 20.4897 18.4977C20.8469 18.1424 21.0476 17.6604 21.0476 17.1579C21.0476 16.6554 20.8469 16.1735 20.4897 15.8181C20.1325 15.4628 19.648 15.2632 19.1428 15.2632C18.6376 15.2632 18.1531 15.4628 17.7959 15.8181C17.4387 16.1735 17.238 16.6554 17.238 17.1579Z",
19
- stroke: "currentColor",
20
- strokeWidth: "2",
21
- strokeLinecap: "round",
22
- strokeLinejoin: "round"
23
- }
24
- ),
25
- /* @__PURE__ */ o(
26
- "path",
27
- {
28
- d: "M13.4286 4.84212C13.4286 5.34464 13.6293 5.82657 13.9865 6.18191C14.3437 6.53724 14.8282 6.73686 15.3334 6.73686C15.8385 6.73686 16.323 6.53724 16.6802 6.18191C17.0374 5.82657 17.2381 5.34464 17.2381 4.84212C17.2381 4.33961 17.0374 3.85768 16.6802 3.50234C16.323 3.14701 15.8385 2.94739 15.3334 2.94739C14.8282 2.94739 14.3437 3.14701 13.9865 3.50234C13.6293 3.85768 13.4286 4.33961 13.4286 4.84212Z",
29
- stroke: "currentColor",
30
- strokeWidth: "2",
31
- strokeLinecap: "round",
32
- strokeLinejoin: "round"
33
- }
34
- ),
35
- /* @__PURE__ */ o(
36
- "path",
37
- {
38
- d: "M6.74841 14.6602C6.74841 15.1628 6.94909 15.6447 7.3063 16C7.66352 16.3554 8.148 16.555 8.65317 16.555C9.15835 16.555 9.64283 16.3554 10 16C10.3573 15.6447 10.5579 15.1628 10.5579 14.6602C10.5579 14.1577 10.3573 13.6758 10 13.3205C9.64283 12.9651 9.15835 12.7655 8.65317 12.7655C8.148 12.7655 7.66352 12.9651 7.3063 13.3205C6.94909 13.6758 6.74841 14.1577 6.74841 14.6602Z",
39
- stroke: "currentColor",
40
- strokeWidth: "2",
41
- strokeLinecap: "round",
42
- strokeLinejoin: "round"
43
- }
44
- ),
45
- /* @__PURE__ */ o("path", { d: "M10 13L15.3334 6.73682L19.1429 15.2631M5.80957 7.2105L8 12.5", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
46
- ] }), a = Object.assign(c, { displayName: "LineToolIcon2" });
47
- export {
48
- a as LineToolIcon2
49
- };
@@ -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
- };