@spear-ai/spectral 1.4.5 → 1.4.6

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.
@@ -1,6 +1,6 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
2
  import { HTMLAttributes, ReactNode } from 'react';
3
- declare const titleIconColors: {
3
+ declare const variantColors: {
4
4
  success: string;
5
5
  warning: string;
6
6
  danger: string;
@@ -11,9 +11,11 @@ export declare const AlertBase: import('react').ForwardRefExoticComponent<HTMLAt
11
11
  variant?: "default" | "success" | "warning" | "danger" | "info" | null | undefined;
12
12
  } & import('class-variance-authority/types').ClassProp) | undefined) => string> & import('react').RefAttributes<HTMLDivElement>>;
13
13
  export declare const AlertTitle: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLHeadingElement> & {
14
- variant: keyof typeof titleIconColors;
14
+ variant: keyof typeof variantColors;
15
+ } & import('react').RefAttributes<HTMLParagraphElement>>;
16
+ export declare const AlertDescription: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & {
17
+ variant: keyof typeof variantColors;
15
18
  } & import('react').RefAttributes<HTMLParagraphElement>>;
16
- export declare const AlertDescription: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & import('react').RefAttributes<HTMLParagraphElement>>;
17
19
  type AlertPortalProps = {
18
20
  children: ReactNode;
19
21
  container?: Element | DocumentFragment;
@@ -1,46 +1,46 @@
1
1
  "use client";
2
2
  import "../styles/main.css";
3
- import { jsx as l } from "react/jsx-runtime";
4
- import { cn as s } from "../utils/twUtils.js";
5
- import { c as n } from "../index-D29mdTf5.js";
6
- import { forwardRef as i, useState as o, useEffect as d } from "react";
7
- import { createPortal as c } from "react-dom";
8
- const g = n(
9
- `fixed top-2 left-1/2 -translate-x-1/2 z-50 w-full max-w-md rounded-md border px-4 py-3 text-sm flex has-[>svg]:grid-cols-[6_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-2 gap-y-0.5
3
+ import { jsx as s } from "react/jsx-runtime";
4
+ import { cn as l } from "../utils/twUtils.js";
5
+ import { c as o } from "../index-D29mdTf5.js";
6
+ import { forwardRef as i, useState as d, useEffect as c } from "react";
7
+ import { createPortal as f } from "react-dom";
8
+ const g = o(
9
+ `fixed top-2 left-1/2 -translate-x-1/2 z-50 w-full max-w-md rounded-md border px-4 py-3 text-sm flex has-[>svg]:grid-cols-[6_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-2 [&>svg]items-start gap-y-0.5
10
10
  items-start [&>svg]:size-6 [&>svg]:translate-y-0.5 transform transition-all duration-300 ease-in-out translate-y-0 opacity-100 scale-100 animate-in slide-in-from-top-full fade-in duration-300`,
11
11
  {
12
12
  variants: {
13
13
  variant: {
14
- default: "bg-alert-bg text-alert-text border-alert-border",
15
- success: "bg-alert-success-bg border-alert-success-border [&>svg]:!text-alert-success-text [&>svg]items-start",
16
- warning: "bg-alert-warning-bg border-alert-warning-border [&>svg]:!text-alert-warning-text [&_[data-slot='alert-title']]:!text-alert-warning-text",
17
- danger: "bg-alert-danger-bg border-alert-danger-border [&>svg]:!text-alert-danger-text [&_[data-slot='alert-title']]:!text-alert-danger-text",
18
- info: "bg-alert-info-bg border-alert-info-border [&>svg]:!text-alert-info-text [&_[data-slot='alert-title']]:!text-alert-info-text"
14
+ default: "bg-alert-bg border-alert-border",
15
+ success: "bg-alert-success-bg border-alert-success-border",
16
+ warning: "bg-alert-warning-bg border-alert-warning-border",
17
+ danger: "bg-alert-danger-bg border-alert-danger-border",
18
+ info: "bg-alert-info-bg border-alert-info-border"
19
19
  }
20
20
  },
21
21
  defaultVariants: {
22
22
  variant: "default"
23
23
  }
24
24
  }
25
- ), x = {
26
- success: "text-alert-success-text",
27
- warning: "text-alert-warning-text",
28
- danger: "text-alert-danger-text",
29
- info: "text-alert-info-text",
30
- default: "text-alert-text"
31
- }, f = i(({ className: t, variant: e, ...a }, r) => /* @__PURE__ */ l("div", { className: s(g({ variant: e }), t), "data-slot": "alert", "data-testid": "spectral-alert", ref: r, role: "alert", ...a }));
32
- f.displayName = "AlertBase";
33
- const m = i(({ className: t, variant: e, ...a }, r) => /* @__PURE__ */ l("div", { className: s(x[e], "col-start-2 line-clamp-1 min-h-4 font-semibold text-base tracking-tight h-6 flex items-center", t), "data-slot": "alert-title", "data-testid": "spectral-alert-title", ref: r, ...a }));
34
- m.displayName = "AlertTitle";
35
- const u = i(({ className: t, ...e }, a) => /* @__PURE__ */ l("div", { className: s("text-primary-inverse col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed", t), "data-slot": "alert-description", "data-testid": "spectral-alert-description", ref: a, ...e }));
36
- u.displayName = "AlertDescription";
37
- function A({ children: t, container: e }) {
38
- const [a, r] = o(!1);
39
- return d(() => (r(!0), () => r(!1)), []), a ? c(t, e ?? document.body) : null;
25
+ ), n = {
26
+ success: "text-alert-success-text [&_p]:!text-alert-success-text",
27
+ warning: "text-alert-warning-text [&_p]:!text-alert-warning-text",
28
+ danger: "text-alert-danger-text [&_p]:!text-alert-danger-text",
29
+ info: "text-alert-info-text [&_p]:!text-alert-info-text",
30
+ default: "text-alert-text [&_p]:!text-alert-text"
31
+ }, m = i(({ className: e, variant: r, ...a }, t) => /* @__PURE__ */ s("div", { className: l(g({ variant: r }), e), "data-slot": "alert", "data-testid": "spectral-alert", ref: t, role: "alert", ...a }));
32
+ m.displayName = "AlertBase";
33
+ const x = i(({ className: e, variant: r, ...a }, t) => /* @__PURE__ */ s("div", { className: l(n[r], "col-start-2 line-clamp-1 min-h-4 font-semibold text-base tracking-tight h-6 flex items-center", e), "data-slot": "alert-title", "data-testid": "spectral-alert-title", ref: t, ...a }));
34
+ x.displayName = "AlertTitle";
35
+ const p = i(({ className: e, variant: r, ...a }, t) => /* @__PURE__ */ s("div", { className: l(n[r], "col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed", e), "data-slot": "alert-description", "data-testid": "spectral-alert-description", ref: t, ...a }));
36
+ p.displayName = "AlertDescription";
37
+ function _({ children: e, container: r }) {
38
+ const [a, t] = d(!1);
39
+ return c(() => (t(!0), () => t(!1)), []), a ? f(e, r ?? document.body) : null;
40
40
  }
41
41
  export {
42
- f as AlertBase,
43
- u as AlertDescription,
44
- A as AlertPortal,
45
- m as AlertTitle
42
+ m as AlertBase,
43
+ p as AlertDescription,
44
+ _ as AlertPortal,
45
+ x as AlertTitle
46
46
  };
package/dist/Alert.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import "./styles/main.css";
3
3
  import { jsx as t, jsxs as m } from "react/jsx-runtime";
4
- import { AlertPortal as y, AlertBase as h, AlertTitle as v, AlertDescription as A } from "./Alert/AlertBase.js";
4
+ import { AlertPortal as y, AlertBase as h, AlertTitle as A, AlertDescription as v } from "./Alert/AlertBase.js";
5
5
  import "./Icons/AnalyzeIcon.js";
6
6
  import "./Icons/AnnotationsIcon.js";
7
7
  import "./Icons/ApprovedIcon.js";
@@ -61,34 +61,34 @@ import "./Icons/ZoomXIcon.js";
61
61
  import "./Icons/ZoomYIcon.js";
62
62
  import { cn as g } from "./utils/twUtils.js";
63
63
  import { useRef as R, useEffect as T } from "react";
64
- const Vt = ({ id: n, description: a, onClose: s, icon: l, title: c, className: d, variant: o = "default" }) => {
65
- const r = R(null), u = l || {
64
+ const Vt = ({ id: n, description: s, onClose: a, icon: l, title: c, className: d, variant: r = "default" }) => {
65
+ const o = R(null), u = l || {
66
66
  info: /* @__PURE__ */ t(E, {}),
67
67
  success: /* @__PURE__ */ t(w, {}),
68
68
  warning: /* @__PURE__ */ t(N, {}),
69
69
  danger: /* @__PURE__ */ t(b, {}),
70
70
  default: null
71
- }[o];
71
+ }[r];
72
72
  T(() => {
73
73
  const e = (p) => {
74
- p.key === "Escape" && r.current && (p.preventDefault(), i());
74
+ p.key === "Escape" && o.current && (p.preventDefault(), i());
75
75
  };
76
76
  return document.addEventListener("keydown", e), () => {
77
77
  document.removeEventListener("keydown", e);
78
78
  };
79
79
  }, []);
80
80
  const i = () => {
81
- r.current && (r.current.style.opacity = "0", setTimeout(() => {
82
- r.current && (r.current.style.display = "none"), s?.();
81
+ o.current && (o.current.style.opacity = "0", setTimeout(() => {
82
+ o.current && (o.current.style.display = "none"), a?.();
83
83
  }, 300));
84
84
  }, f = () => {
85
85
  i();
86
- }, I = (/* @__PURE__ */ new Set(["danger", "warning"])).has(o) ? "assertive" : "polite";
87
- return /* @__PURE__ */ t(y, { children: /* @__PURE__ */ m(h, { "aria-live": I, className: g("alert-wrapper transition-opacity duration-300", d), "data-slot": "alert", "data-variant": o, id: n, ref: r, variant: o, children: [
86
+ }, I = (/* @__PURE__ */ new Set(["danger", "warning"])).has(r) ? "assertive" : "polite";
87
+ return /* @__PURE__ */ t(y, { children: /* @__PURE__ */ m(h, { "aria-live": I, className: g("alert-wrapper transition-opacity duration-300", d), "data-slot": "alert", "data-variant": r, id: n, ref: o, variant: r, children: [
88
88
  u,
89
89
  /* @__PURE__ */ m("div", { className: "content-wrapper", children: [
90
- /* @__PURE__ */ t(v, { "data-slot": "alert-title", variant: o, children: c }),
91
- /* @__PURE__ */ t(A, { "data-slot": "alert-description", children: a })
90
+ /* @__PURE__ */ t(A, { "data-slot": "alert-title", variant: r, children: c }),
91
+ /* @__PURE__ */ t(v, { "data-slot": "alert-description", variant: r, children: s })
92
92
  ] }),
93
93
  /* @__PURE__ */ t(
94
94
  C,
package/dist/Avatar.js CHANGED
@@ -2,26 +2,26 @@
2
2
  import "./styles/main.css";
3
3
  import { jsx as r } from "react/jsx-runtime";
4
4
  import { cn as s } from "./utils/twUtils.js";
5
- import { useState as x, useEffect as v, isValidElement as w, cloneElement as p } from "react";
5
+ import { useState as g, useEffect as v, isValidElement as w, cloneElement as p } from "react";
6
6
  const y = {
7
7
  sm: "h-8 w-8",
8
8
  md: "h-10 w-10",
9
9
  lg: "h-12 w-12"
10
10
  }, f = {
11
- sm: "text-sm",
12
- md: "text-lg",
13
- lg: "text-2xl"
11
+ sm: "text-xs",
12
+ md: "text-base",
13
+ lg: "text-xl"
14
14
  }, b = {
15
15
  sm: 24,
16
16
  md: 32,
17
17
  lg: 40
18
18
  }, j = (l) => {
19
- const i = l.trim();
20
- if (!i) return "?";
21
- const t = i.split(/\s+/).filter(Boolean);
19
+ const o = l.trim();
20
+ if (!o) return "?";
21
+ const t = o.split(/\s+/).filter(Boolean);
22
22
  return t.length === 0 ? "?" : t.length === 1 ? t[0].charAt(0).toUpperCase() : (t[0].charAt(0) + t[t.length - 1].charAt(0)).toUpperCase();
23
- }, k = ({ alt: l, className: i, icon: t, imageSource: a, fallback: o, size: n = "md", userFullName: c }) => {
24
- const [m, d] = x("loading");
23
+ }, k = ({ alt: l, className: o, icon: t, imageSource: a, fallback: i, size: n = "md", userFullName: c }) => {
24
+ const [m, d] = g("loading");
25
25
  v(() => {
26
26
  if (!a) return;
27
27
  d("loading");
@@ -32,7 +32,7 @@ const y = {
32
32
  }, [a]);
33
33
  const h = () => {
34
34
  if (c)
35
- return /* @__PURE__ */ r("span", { "aria-label": `${c} avatar`, className: s("flex items-center justify-center w-full h-full font-bold text-text-primary tracking-tighter", f[n]), "data-testid": "spectral-avatar-initials", children: j(c) });
35
+ return /* @__PURE__ */ r("span", { "aria-label": `${c} avatar`, className: s("flex items-center justify-center w-full h-full font-bold text-text-primary tracking-tighter font-stretch-condensed", f[n]), "data-testid": "spectral-avatar-initials", children: j(c) });
36
36
  if (t) {
37
37
  const e = b[n];
38
38
  return /* @__PURE__ */ r("span", { className: "flex items-center justify-center w-full h-full", children: w(t) ? (() => {
@@ -41,18 +41,18 @@ const y = {
41
41
  "aria-hidden": "true"
42
42
  };
43
43
  if (t.type.displayName?.includes("Icon") ?? !1) {
44
- const g = {
44
+ const x = {
45
45
  ...u,
46
46
  size: e
47
47
  };
48
- return p(t, g);
48
+ return p(t, x);
49
49
  }
50
50
  return p(t, u);
51
51
  })() : t });
52
52
  }
53
- return a && m === "loaded" ? /* @__PURE__ */ r("img", { alt: l || "Avatar", "aria-label": l || "Avatar", className: "absolute inset-0 w-full h-full object-cover rounded-full", "data-testid": "spectral-avatar-image", role: "img", src: a }) : a && m === "error" && o ? /* @__PURE__ */ r("span", { className: "flex items-center justify-center w-full h-full", "data-testid": "spectral-avatar-img-error-fallback", children: o }) : o ? /* @__PURE__ */ r("span", { className: s("flex items-center justify-center w-full h-full text-text-primary", f[n]), "data-testid": "spectral-avatar-fallback", children: o }) : /* @__PURE__ */ r("span", { className: s("flex items-center justify-center w-full h-full font-bold border-2 border-danger-400 text-danger-400 rounded-full font-bold", f[n]), "data-testid": "spectral-avatar-last-resort", children: "?" });
53
+ return a && m === "loaded" ? /* @__PURE__ */ r("img", { alt: l || "Avatar", "aria-label": l || "Avatar", className: "absolute inset-0 w-full h-full object-cover rounded-full", "data-testid": "spectral-avatar-image", role: "img", src: a }) : a && m === "error" && i ? /* @__PURE__ */ r("span", { className: "flex items-center justify-center w-full h-full", "data-testid": "spectral-avatar-img-error-fallback", children: i }) : i ? /* @__PURE__ */ r("span", { className: s("flex items-center justify-center w-full h-full text-text-primary", f[n]), "data-testid": "spectral-avatar-fallback", children: i }) : /* @__PURE__ */ r("span", { className: s("flex items-center justify-center w-full h-full font-bold border-2 border-danger-400 text-danger-400 rounded-full font-bold", f[n]), "data-testid": "spectral-avatar-last-resort", children: "?" });
54
54
  };
55
- return /* @__PURE__ */ r("div", { className: s("relative inline-flex items-center justify-center overflow-hidden rounded-full shrink-0 bg-level-two", y[n], i), "data-slot": "avatar", "data-testid": "spectral-avatar", children: h() });
55
+ return /* @__PURE__ */ r("div", { className: s("relative inline-flex items-center justify-center overflow-hidden rounded-full shrink-0 bg-level-two", y[n], o), "data-slot": "avatar", "data-testid": "spectral-avatar", children: h() });
56
56
  };
57
57
  export {
58
58
  k as Avatar
package/dist/Button.js CHANGED
@@ -5,13 +5,7 @@ import { ErrorMessage as y } from "./utils/formFieldUtils.js";
5
5
  import { cn as u } from "./utils/twUtils.js";
6
6
  import { c as h } from "./index-D29mdTf5.js";
7
7
  import { forwardRef as f } from "react";
8
- import { c as N } from "./createLucideIcon-B_8CJpcQ.js";
9
- /**
10
- * @license lucide-react v0.546.0 - ISC
11
- *
12
- * This source code is licensed under the ISC license.
13
- * See the LICENSE file in the root directory of this source tree.
14
- */
8
+ import { c as N } from "./createLucideIcon-D4r5Phnh.js";
15
9
  const w = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], _ = N("loader-circle", w), j = h(
16
10
  `
17
11
  !font-sans flex relative items-center justify-center gap-2 whitespace-nowrap transition-colors cursor-pointer rounded-lg border font-semibold focus:outline-none focus:outline-none
@@ -6,7 +6,7 @@ import { c } from "../index-D29mdTf5.js";
6
6
  import "react";
7
7
  const l = c(
8
8
  `inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-[var(--radius,0.375rem)] text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none
9
- [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-accent focus-visible:outline-offset-2 focus-visible:outline-2 focus-visitble:outline-accent
9
+ [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-accent focus-visible:outline-offset-2 focus-visible:outline-2 focus-visible:outline-accent
10
10
  aria-invalid:ring-destructive/20 aria-invalid:border-destructive bg-level-one text-text-primary hover:bg-level-two cursor-pointer active:text-accent`,
11
11
  {
12
12
  variants: {
package/dist/Dialog.js CHANGED
@@ -3,19 +3,19 @@ import { jsx as o, Fragment as n } from "react/jsx-runtime";
3
3
  import { DialogBase as g, DialogCloseBase as c, DialogContentBase as f, DialogDescriptionBase as u, DialogFooterBase as m, DialogHeaderBase as p, DialogOverlayBase as D, DialogPortalBase as x, DialogTitleBase as T, DialogTriggerBase as B } from "./Dialog/DialogBase.js";
4
4
  import { cn as l } from "./utils/twUtils.js";
5
5
  import "react";
6
- function h({ ...a }) {
6
+ function v({ ...a }) {
7
7
  return /* @__PURE__ */ o(g, { "data-slot": "dialog", "data-testid": "spectral-dialog", ...a });
8
8
  }
9
- function v({ dataTestId: a, ...t }) {
10
- return /* @__PURE__ */ o(B, { asChild: !0, "data-slot": "dialog-trigger", dataTestId: a || "dialog-trigger", ...t });
9
+ function w({ dataTestId: a, ...t }) {
10
+ return /* @__PURE__ */ o(B, { "data-slot": "dialog-trigger", dataTestId: a || "dialog-trigger", ...t });
11
11
  }
12
- function w({ ...a }) {
12
+ function h({ ...a }) {
13
13
  return /* @__PURE__ */ o(x, { "data-slot": "dialog-portal", "data-testid": "dialog-portal", ...a });
14
14
  }
15
- function C({ dataTestId: a, ...t }) {
15
+ function z({ dataTestId: a, ...t }) {
16
16
  return /* @__PURE__ */ o(c, { "data-slot": "dialog-close", dataTestId: a || "dialog-close", ...t });
17
17
  }
18
- function z({ className: a, dataTestId: t, ...e }) {
18
+ function C({ className: a, dataTestId: t, ...e }) {
19
19
  return /* @__PURE__ */ o(
20
20
  D,
21
21
  {
@@ -65,14 +65,14 @@ function P({ className: a, dataTestId: t, ...e }) {
65
65
  return /* @__PURE__ */ o(u, { className: l("text-muted-foreground text-sm", a), "data-slot": "dialog-description", dataTestId: t || "dialog-description", ...e });
66
66
  }
67
67
  export {
68
- h as Dialog,
69
- C as DialogClose,
68
+ v as Dialog,
69
+ z as DialogClose,
70
70
  F as DialogContent,
71
71
  P as DialogDescription,
72
72
  H as DialogFooter,
73
73
  j as DialogHeader,
74
- z as DialogOverlay,
75
- w as DialogPortal,
74
+ C as DialogOverlay,
75
+ h as DialogPortal,
76
76
  O as DialogTitle,
77
- v as DialogTrigger
77
+ w as DialogTrigger
78
78
  };
package/dist/Drawer.d.ts CHANGED
@@ -1,13 +1,16 @@
1
1
  import { ReactNode } from 'react';
2
2
  export type DrawerProps = {
3
3
  children?: ReactNode;
4
+ defaultOpen?: boolean;
4
5
  description?: string;
5
6
  direction?: 'left' | 'right' | 'top' | 'bottom';
7
+ dismissible?: boolean;
8
+ modal?: boolean;
9
+ onOpenChange?: (open: boolean) => void;
10
+ open?: boolean;
6
11
  size?: string;
7
12
  title?: string;
8
13
  trigger: ReactNode;
9
- open?: boolean;
10
- onOpenChange?: (open: boolean) => void;
11
14
  };
12
- export declare const Drawer: ({ trigger, title, description, children, direction, size }: DrawerProps) => import("react/jsx-runtime").JSX.Element;
15
+ export declare const Drawer: ({ children, defaultOpen, description, direction, dismissible, modal, onOpenChange, open, size, title, trigger }: DrawerProps) => import("react/jsx-runtime").JSX.Element;
13
16
  //# sourceMappingURL=Drawer.d.ts.map
package/dist/Drawer.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import "./styles/main.css";
2
2
  import { jsx as t, jsxs as s } from "react/jsx-runtime";
3
- import { SpectralProvider as x } from "./SpectralProvider.js";
3
+ import { SpectralProvider as f } from "./SpectralProvider.js";
4
4
  import { D as e } from "./index-CAKA12cC.js";
5
- const b = ({ trigger: d, title: o, description: i, children: c, direction: l = "right", size: r = "380px" }) => {
6
- const a = "!font-sans fixed", p = {
5
+ const u = ({ children: d, defaultOpen: o = !1, description: i, direction: l = "right", dismissible: c = !0, modal: p = !0, onOpenChange: n, open: m, size: r = "380px", title: x, trigger: h }) => {
6
+ const a = "!font-sans fixed", w = {
7
7
  left: {
8
8
  className: `${a} top-0 bottom-0 left-0 shadow-[20px_0_20px_rgba(0,0,0,0.4)]`,
9
9
  style: { width: r }
@@ -20,20 +20,20 @@ const b = ({ trigger: d, title: o, description: i, children: c, direction: l = "
20
20
  className: `${a} bottom-0 left-0 right-0 shadow-[0_-20px_20px_rgba(0,0,0,0.4)]`,
21
21
  style: { height: r }
22
22
  }
23
- }, { className: n, style: m } = p[l];
24
- return /* @__PURE__ */ t(x, { children: /* @__PURE__ */ s(e.Root, { direction: l, "data-testid": "spectral-drawer", children: [
25
- /* @__PURE__ */ t(e.Trigger, { asChild: !0, "data-testid": "spectral-drawer-trigger", children: d }),
23
+ }, { className: g, style: b } = w[l];
24
+ return /* @__PURE__ */ t(f, { children: /* @__PURE__ */ s(e.Root, { defaultOpen: o, dismissible: c, open: m, onOpenChange: n, direction: l, modal: p, "data-testid": "spectral-drawer", children: [
25
+ /* @__PURE__ */ t(e.Trigger, { asChild: !0, "data-testid": "spectral-drawer-trigger", children: h }),
26
26
  /* @__PURE__ */ s(e.Portal, { children: [
27
27
  /* @__PURE__ */ t(e.Overlay, { className: "fixed inset-0 bg-transparent", "data-testid": "spectral-drawer-overlay" }),
28
- /* @__PURE__ */ t(e.Content, { asChild: !0, className: `bg-drawer-bg z-10 flex flex-col outline-none [&_*]:box-border ${n}`, style: m, "data-testid": "spectral-drawer-content", children: /* @__PURE__ */ s("div", { children: [
28
+ /* @__PURE__ */ t(e.Content, { asChild: !0, className: `bg-drawer-bg z-10 flex flex-col outline-none [&_*]:box-border ${g}`, style: b, "data-testid": "spectral-drawer-content", children: /* @__PURE__ */ s("div", { children: [
29
29
  /* @__PURE__ */ t(e.Close, {}),
30
- /* @__PURE__ */ t(e.Title, { className: "text-text-primary px-3 pt-4 text-lg font-medium", "data-testid": "spectral-drawer-title", children: o }),
30
+ /* @__PURE__ */ t(e.Title, { className: "text-text-primary px-3 pt-4 text-lg font-medium", "data-testid": "spectral-drawer-title", children: x }),
31
31
  /* @__PURE__ */ t(e.Description, { className: "!text-text-secondary mb-2 px-3 !text-xs uppercase", "data-testid": "spectral-drawer-description", children: i }),
32
- /* @__PURE__ */ t("div", { className: "py-2 px-3 min-w-0 w-auto overflow-hidden [&>*]:min-w-0 [&_*]:min-w-0", "data-testid": "spectral-drawer-body", children: c })
32
+ /* @__PURE__ */ t("div", { className: "py-2 px-3 min-w-0 w-auto overflow-hidden [&>*]:min-w-0 [&_*]:min-w-0", "data-testid": "spectral-drawer-body", children: d })
33
33
  ] }) })
34
34
  ] })
35
35
  ] }) });
36
36
  };
37
37
  export {
38
- b as Drawer
38
+ u as Drawer
39
39
  };
package/dist/InputOTP.js CHANGED
@@ -280,6 +280,7 @@ const St = ht({}), Pt = ht(null), Ct = () => {
280
280
  onChange: E,
281
281
  onComplete: A,
282
282
  onPaste: I,
283
+ pasteTransformer: (l) => l.replaceAll("-", ""),
283
284
  pushPasswordManagerStrategy: "none",
284
285
  ref: g,
285
286
  role: "textbox",
@@ -61,13 +61,7 @@ import "../Icons/ZoomYIcon.js";
61
61
  import { ErrorMessage as me } from "../utils/formFieldUtils.js";
62
62
  import { cn as f } from "../utils/twUtils.js";
63
63
  import { forwardRef as be, useId as fe, useState as L, useRef as _, useMemo as T, useCallback as b, useEffect as ge } from "react";
64
- import { c as he } from "../createLucideIcon-B_8CJpcQ.js";
65
- /**
66
- * @license lucide-react v0.546.0 - ISC
67
- *
68
- * This source code is licensed under the ISC license.
69
- * See the LICENSE file in the root directory of this source tree.
70
- */
64
+ import { c as he } from "../createLucideIcon-D4r5Phnh.js";
71
65
  const xe = [
72
66
  ["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
73
67
  ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
@@ -432,7 +432,7 @@ const B = he(
432
432
  "data-testid": "spectral-radio-group-item",
433
433
  className: F(
434
434
  "relative aspect-square h-4.5 w-4.5 rounded-full border-2 border-border-subtle bg-radio-bg ring-black transition-colors cursor-pointer",
435
- "hover:border-radio-border--hover focus-visible:ring-1 focus-visible:ring-offset-2",
435
+ "hover:border-radio-border--hover focus-visible:outline-1 focus-visible:outline-offset-2 focus-visible:outline-accent",
436
436
  "[&[data-state=checked]]:border-radio-border--selected [&[data-state=checked]]:bg-radio-bg",
437
437
  o && A,
438
438
  r
@@ -13,5 +13,5 @@ export declare const ToggleBase: import('react').ForwardRefExoticComponent<Omit<
13
13
  onPressedChange?: (pressed: boolean) => void;
14
14
  disabled?: boolean;
15
15
  asChild?: boolean;
16
- } & import('react').RefAttributes<HTMLButtonElement>>;
16
+ } & import('react').RefAttributes<HTMLButtonElement | HTMLDivElement>>;
17
17
  //# sourceMappingURL=ToggleBase.d.ts.map
@@ -1,28 +1,46 @@
1
1
  "use client";
2
2
  import "../styles/main.css";
3
- import { jsx as h } from "react/jsx-runtime";
3
+ import { jsx as f } from "react/jsx-runtime";
4
4
  import { useControllableState as k } from "../hooks/useControllableState.js";
5
- import { Slot as y } from "../primitives/slot.js";
6
- import { forwardRef as P, useCallback as f } from "react";
7
- const B = P(function({ pressed: u, defaultPressed: d = !1, onPressedChange: p, disabled: t, className: i, onKeyDown: n, onClick: a, type: m = "button", asChild: s = !1, ...c }, g) {
8
- const [o, l] = k({
9
- value: u,
10
- defaultValue: d,
11
- onChange: p
12
- }), r = f(() => {
13
- t || l(!o);
14
- }, [t, o, l]), v = f(
5
+ import { Slot as C } from "../primitives/slot.js";
6
+ import { forwardRef as T, useCallback as s } from "react";
7
+ const B = T(function({ pressed: c, defaultPressed: m = !1, onPressedChange: g, disabled: t, className: v, onKeyDown: a, onClick: n, type: h = "button", asChild: b = !1, children: l, ...u }, d) {
8
+ const [r, i] = k({
9
+ defaultValue: m,
10
+ onChange: g,
11
+ value: c
12
+ }), o = s(() => {
13
+ t || i(!r);
14
+ }, [t, r, i]), x = s(
15
15
  (e) => {
16
- n && n(e), !e.defaultPrevented && (e.key === " " || e.key === "Enter") && (e.preventDefault(), r());
16
+ a && a(e), !e.defaultPrevented && (e.key === " " || e.key === "Enter") && (e.preventDefault(), o());
17
17
  },
18
- [r, n]
19
- ), C = f(
18
+ [o, a]
19
+ ), P = s(
20
20
  (e) => {
21
- a && a(e), !e.defaultPrevented && r();
21
+ n && n(e), !e.defaultPrevented && o();
22
22
  },
23
- [r, a]
24
- );
25
- return /* @__PURE__ */ h(s ? y : "button", { ...c, ref: g, type: s ? void 0 : m, "aria-pressed": o, "data-state": o ? "on" : "off", "data-disabled": t ? "" : void 0, disabled: t, onKeyDown: v, onClick: C, className: i });
23
+ [o, n]
24
+ ), p = {
25
+ "aria-disabled": t || void 0,
26
+ "aria-pressed": r,
27
+ "data-state": r ? "on" : "off",
28
+ "data-disabled": t || void 0,
29
+ className: v,
30
+ onClick: P,
31
+ onKeyDown: x
32
+ };
33
+ return b ? /* @__PURE__ */ f(
34
+ "div",
35
+ {
36
+ ref: d,
37
+ role: "button",
38
+ tabIndex: t ? -1 : 0,
39
+ ...u,
40
+ ...p,
41
+ children: /* @__PURE__ */ f(C, { children: l })
42
+ }
43
+ ) : /* @__PURE__ */ f("button", { ref: d, tabIndex: t ? -1 : 0, type: h, ...u, ...p, children: l });
26
44
  });
27
45
  export {
28
46
  B as ToggleBase
package/dist/Toggle.js CHANGED
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  import "./styles/main.css";
3
- import { jsx as g } from "react/jsx-runtime";
4
- import { ToggleBase as n } from "./Toggle/ToggleBase.js";
5
- import { cn as s } from "./utils/twUtils.js";
6
- import { c as d } from "./index-D29mdTf5.js";
7
- import { forwardRef as l } from "react";
8
- const v = d(
3
+ import { jsx as n } from "react/jsx-runtime";
4
+ import { ToggleBase as s } from "./Toggle/ToggleBase.js";
5
+ import { cn as d } from "./utils/twUtils.js";
6
+ import { c as l } from "./index-D29mdTf5.js";
7
+ import { forwardRef as v } from "react";
8
+ const b = l(
9
9
  `
10
- bg-toggle-bg inline-flex items-center justify-center gap-2 border rounded-md text-sm shadow-sm font-medium w-fit disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed
10
+ bg-toggle-bg inline-flex items-center justify-center gap-2 border rounded-md text-sm shadow-sm font-medium w-fit data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed
11
11
  hover:cursor-pointer data-[state=on]:text-toggle-text--active text-toggle-text hover:bg-toggle-bg--hover hover:border-toggle-border--hover data-[state=on]:bg-toggle-bg--active
12
12
  data-[state=on]:border-toggle-border--active hover:text-toggle-text--hover data-[state=on]:bg-toggle-bg--active data-[state=on]:text-toggle-text--active data-[state=on]:border-toggle-border--active
13
13
  transition-[colors] [&_svg]:pointer-events-none [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] focus:outline-none outline-none
@@ -35,8 +35,8 @@ const v = d(
35
35
  layout: "default"
36
36
  }
37
37
  }
38
- ), m = l(({ className: e, variant: t, size: o, layout: r, ...a }, i) => /* @__PURE__ */ g(n, { ref: i, "data-slot": "toggle", "data-testid": "spectral-toggle", className: s(v({ variant: t, size: o, layout: r }), e), ...a }));
38
+ ), p = v(({ className: e, variant: t, size: o, layout: r, disabled: a, ...i }, g) => /* @__PURE__ */ n(s, { ref: g, disabled: a, "data-slot": "toggle", "data-testid": "spectral-toggle", className: d(b({ variant: t, size: o, layout: r }), e), ...i }));
39
39
  export {
40
- m as Toggle,
41
- v as toggleVariants
40
+ p as Toggle,
41
+ b as toggleVariants
42
42
  };
package/dist/Tooltip.d.ts CHANGED
@@ -1,9 +1,14 @@
1
+ import { VariantProps } from 'class-variance-authority';
1
2
  import { ComponentProps } from 'react';
2
3
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
3
4
  export declare const TooltipProvider: ({ delayDuration, ...props }: ComponentProps<typeof TooltipPrimitive.Provider>) => import("react/jsx-runtime").JSX.Element;
4
5
  export declare const Tooltip: ({ ...props }: ComponentProps<typeof TooltipPrimitive.Root>) => import("react/jsx-runtime").JSX.Element;
5
- export declare const TooltipTrigger: ({ ...props }: ComponentProps<typeof TooltipPrimitive.Trigger>) => import("react/jsx-runtime").JSX.Element;
6
- export declare const TooltipContent: ({ children, className, showArrow, sideOffset, ...props }: ComponentProps<typeof TooltipPrimitive.Content> & {
6
+ export declare const TooltipTrigger: ({ asChild, children, ...props }: ComponentProps<typeof TooltipPrimitive.Trigger>) => import("react/jsx-runtime").JSX.Element;
7
+ declare const tooltipVariants: (props?: ({
8
+ variant?: "default" | "outline" | null | undefined;
9
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
10
+ export declare const TooltipContent: ({ children, className, showArrow, sideOffset, variant, side, ...props }: ComponentProps<typeof TooltipPrimitive.Content> & VariantProps<typeof tooltipVariants> & {
7
11
  showArrow?: boolean;
8
12
  }) => import("react/jsx-runtime").JSX.Element;
13
+ export {};
9
14
  //# sourceMappingURL=Tooltip.d.ts.map