@spear-ai/spectral 1.1.2 → 1.1.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spear-ai/spectral",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "repository": {
@@ -61,10 +61,12 @@
61
61
  "@vitejs/plugin-react-swc": "^4.0.1",
62
62
  "@vitest/browser": "3.2.4",
63
63
  "@vitest/coverage-v8": "3.2.4",
64
+ "autoprefixer": "^10.4.21",
64
65
  "eslint-plugin-jsx-a11y": "^6.10.2",
65
66
  "husky": "^9.1.7",
66
67
  "oxlint": "^1.14.0",
67
68
  "playwright": "^1.55.0",
69
+ "postcss": "^8.5.6",
68
70
  "prettier": "^3.6.2",
69
71
  "prettier-plugin-sort-imports": "^1.8.8",
70
72
  "prettier-plugin-tailwindcss": "^0.6.14",
package/dist/Button.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from './components/Button/Button'
2
- export {}
package/dist/Button.js DELETED
@@ -1,118 +0,0 @@
1
- import { jsxs as f, jsx as v } from "react/jsx-runtime";
2
- import { a as V, c as p } from "./twUtils-B9ArqCOv.js";
3
- import { forwardRef as j } from "react";
4
- import { L as w } from "./loader-circle-Btf6jOd5.js";
5
- const N = (o) => typeof o == "boolean" ? `${o}` : o === 0 ? "0" : o, h = V, C = (o, e) => (t) => {
6
- var l;
7
- if (e?.variants == null) return h(o, t?.class, t?.className);
8
- const { variants: r, defaultVariants: i } = e, u = Object.keys(r).map((n) => {
9
- const a = t?.[n], s = i?.[n];
10
- if (a === null) return null;
11
- const d = N(a) || N(s);
12
- return r[n][d];
13
- }), b = t && Object.entries(t).reduce((n, a) => {
14
- let [s, d] = a;
15
- return d === void 0 || (n[s] = d), n;
16
- }, {}), y = e == null || (l = e.compoundVariants) === null || l === void 0 ? void 0 : l.reduce((n, a) => {
17
- let { class: s, className: d, ...c } = a;
18
- return Object.entries(c).every((m) => {
19
- let [g, x] = m;
20
- return Array.isArray(x) ? x.includes({
21
- ...i,
22
- ...b
23
- }[g]) : {
24
- ...i,
25
- ...b
26
- }[g] === x;
27
- }) ? [
28
- ...n,
29
- s,
30
- d
31
- ] : n;
32
- }, []);
33
- return h(o, u, y, t?.class, t?.className);
34
- }, _ = C(
35
- `
36
- !font-sans flex relative items-center justify-center gap-2 whitespace-nowrap transition-colors cursor-pointer py-2 px-6 rounded-lg border font-semibold
37
- focus:outline-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus:ring-2 focus:ring-ring focus:ring-offset-2
38
- focus-visible:ring-offset-2 disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0
39
- `,
40
- {
41
- variants: {
42
- variant: {
43
- primary: "bg-button-primary-bg text-button-primary-text border-button-primary-border disabled:bg-button-primary-bg--disabled disabled:text-button-primary-text--disabled disabled:border-button-primary-border--disabled",
44
- secondary: "bg-button-secondary-bg border-button-secondary-border text-button-secondary-text disabled:bg-button-secondary-bg--disabled disabled:text-button-secondary-text--disabled disabled:border-button-secondary-border--disabled",
45
- outline: "bg-button-outline-bg border-button-outline-border text-button-outline-text disabled:text-button-outline-text--disabled disabled:border-button-outline-border--disabled"
46
- },
47
- state: {
48
- default: "",
49
- error: "bg-button-danger text-button-primary-text transition pointer-events-none",
50
- loading: "cursor-wait pointer-events-none"
51
- }
52
- },
53
- defaultVariants: {
54
- variant: "primary",
55
- state: "default"
56
- }
57
- }
58
- ), k = j(
59
- ({
60
- className: o,
61
- variant: e,
62
- label: t,
63
- endIcon: l,
64
- state: r,
65
- errorMessage: i,
66
- startIcon: u,
67
- disabled: b,
68
- type: y = "button",
69
- dataTestId: n = `button-${e}`,
70
- isFullWidth: a,
71
- ...s
72
- }, d) => {
73
- const c = {
74
- error: {
75
- primary: "bg-button-danger border-button-danger text-button-primary-text pointer-events-none",
76
- secondary: "bg-button-danger border-button-danger text-button-secondary-text pointer-events-none",
77
- outline: "bg-transparent border-button-danger text-button-danger pointer-events-none"
78
- },
79
- loading: {
80
- primary: "bg-button-primary-bg--disabled border-button-primary-border--disabled text-button-primary-text--disabled pointer-events-none",
81
- secondary: "bg-button-secondary-bg--disabled border-button-secondary-border--disabled text-button-secondary-text--disabled pointer-events-none",
82
- outline: "bg-button-outline-bg--disabled border-button-outline-border--disabled text-button-outline-text--disabled pointer-events-none"
83
- }
84
- }, m = a ? "w-full" : "w-auto", g = p(
85
- _({ variant: e, state: r }),
86
- r === "error" && c.error[e || "primary"],
87
- r === "loading" && c.loading[e || "primary"],
88
- m,
89
- o
90
- );
91
- return /* @__PURE__ */ f("div", { className: p("flex justify-items-center", m), children: [
92
- /* @__PURE__ */ f(
93
- "button",
94
- {
95
- className: g,
96
- ref: d,
97
- type: y,
98
- "aria-disabled": b,
99
- disabled: b,
100
- "data-testid": n,
101
- ...s,
102
- "data-state": r,
103
- children: [
104
- u && /* @__PURE__ */ v("span", { className: "flex pr-2", "aria-hidden": !0, children: u }),
105
- t,
106
- r === "loading" && /* @__PURE__ */ v(w, { className: "ml-2 animate-spin", size: 16 }),
107
- l && r !== "loading" && /* @__PURE__ */ v("span", { className: "flex pl-2", "aria-hidden": !0, children: l })
108
- ]
109
- }
110
- ),
111
- r === "error" && i && /* @__PURE__ */ v("p", { className: "text-danger text-xs", role: "alert", "aria-live": "polite", children: i })
112
- ] });
113
- }
114
- );
115
- k.displayName = "Button";
116
- export {
117
- k as Button
118
- };
package/dist/Card.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from './components/Card/Card'
2
- export {}
package/dist/Card.js DELETED
@@ -1,25 +0,0 @@
1
- import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
- import { c as a } from "./twUtils-B9ArqCOv.js";
3
- import { forwardRef as u } from "react";
4
- import { L as b } from "./loader-circle-Btf6jOd5.js";
5
- const p = u(
6
- ({ className: n, title: s, icon: r, width: l = "full", isLoading: c = !1, children: d, ...f }, o) => {
7
- const i = s || r, m = a(
8
- "!font-sans relative bg-card-bg rounded-2xl p-4 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
9
- l === "full" ? "w-full" : "w-fit",
10
- n
11
- );
12
- return /* @__PURE__ */ t("div", { ref: o, className: m, ...f, children: [
13
- c && /* @__PURE__ */ e("div", { className: "bg-card-bg/50 absolute inset-0 z-10 flex items-center justify-center", children: /* @__PURE__ */ e(b, { className: "text-muted-foreground animate-spin", size: 24 }) }),
14
- i && /* @__PURE__ */ t("div", { className: a("flex items-center pb-4", s ? "justify-between" : "justify-end"), children: [
15
- s && /* @__PURE__ */ e("h3", { className: "text-card-text truncate text-base font-semibold", children: s }),
16
- r && /* @__PURE__ */ e("div", { className: "flex-shrink-0", "aria-hidden": "true", children: r })
17
- ] }),
18
- /* @__PURE__ */ e("div", { className: a("min-h-40 p-4", i && "pt-0"), children: d })
19
- ] });
20
- }
21
- );
22
- p.displayName = "Card";
23
- export {
24
- p as Card
25
- };
package/dist/Drawer.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from './components/Drawer/Drawer'
2
- export {}