@spear-ai/spectral 1.4.12 → 1.4.14
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/Accordion.js +4 -4
- package/dist/Button.js +1 -1
- package/dist/Dialog.d.ts +16 -11
- package/dist/Dialog.js +68 -50
- package/dist/Drawer.js +1 -1
- package/dist/HoverCard.js +4 -4
- package/dist/Icons/IconBase.d.ts +1 -2
- package/dist/Icons/IconBase.js +8 -8
- package/dist/Popover.js +6 -6
- package/dist/RadioGroup.js +5 -5
- package/dist/Select.js +1 -1
- package/dist/Slider.js +3 -3
- package/dist/Tooltip.js +6 -6
- package/dist/Tray.js +1 -1
- package/dist/index-BFu0M-5-.js +240 -0
- package/dist/{index-y6Br5T4h.js → index-BRDfoF8s.js} +1 -1
- package/dist/{index-CevVJ05e.js → index-BSCg4Mei.js} +7 -7
- package/dist/{index-CVSxKOPp.js → index-CDYW5LDR.js} +1 -1
- package/dist/{index-BhufZRa2.js → index-CfypDjr2.js} +6 -6
- package/dist/{index-B-GQStVW.js → index-CpUJ8sN0.js} +171 -168
- package/dist/{index-B2oBi8ng.js → index-D-PVGGln.js} +1 -1
- package/dist/{index-NzygPVvJ.js → index-DMDsy0y2.js} +2 -2
- package/dist/{index-6Abv_Flm.js → index-DdOwqCfb.js} +1 -1
- package/dist/{index-UEFPWH8U.js → index-DvqEQspb.js} +7 -7
- package/dist/{index-CGALWSq_.js → index-bcth-MVh.js} +1 -1
- package/dist/index-jgQ7sgLl.js +1037 -0
- package/dist/primitives/select.js +1 -1
- package/dist/styles/main.css +1 -1
- package/package.json +3 -1
- package/dist/Dialog/DialogBase.d.ts +0 -86
- package/dist/Dialog/DialogBase.js +0 -215
- package/dist/index-CAKA12cC.js +0 -1265
package/dist/Accordion.js
CHANGED
|
@@ -66,10 +66,10 @@ import "./Icons/ZoomYIcon.js";
|
|
|
66
66
|
import { useAccordionAutoScroll as ue } from "./hooks/useAccordionAutoScroll.js";
|
|
67
67
|
import * as f from "react";
|
|
68
68
|
import u, { createContext as fe, forwardRef as w, Children as ve, isValidElement as Ce, cloneElement as ge, useContext as be, useRef as Ae, useCallback as he } from "react";
|
|
69
|
-
import { c as z,
|
|
70
|
-
import { c as ye, u as Ie } from "./index-
|
|
71
|
-
import { P as Re } from "./index-
|
|
72
|
-
import { u as q } from "./index-
|
|
69
|
+
import { c as z, e as V, P as I, b as B, u as U, f as xe } from "./index-CfypDjr2.js";
|
|
70
|
+
import { c as ye, u as Ie } from "./index-DvqEQspb.js";
|
|
71
|
+
import { P as Re } from "./index-DdOwqCfb.js";
|
|
72
|
+
import { u as q } from "./index-CDYW5LDR.js";
|
|
73
73
|
import { cn as _ } from "./utils/twUtils.js";
|
|
74
74
|
var P = "Collapsible", [Ne, J] = z(P), [we, $] = Ne(P), Y = f.forwardRef(
|
|
75
75
|
(e, i) => {
|
package/dist/Button.js
CHANGED
|
@@ -56,7 +56,7 @@ const N = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], _ = w
|
|
|
56
56
|
}, v = u(j({ variant: e, state: t, size: a }), t === "error" && i.error[e], t === "loading" && i.loading[e], l);
|
|
57
57
|
return /* @__PURE__ */ s("div", { className: u("flex flex-col justify-items-center", a), children: [
|
|
58
58
|
/* @__PURE__ */ s("button", { "aria-disabled": r, className: v, "data-state": t, "data-testid": g || `spectral-button-${e}`, disabled: r, ref: m, type: p, ...x, children: [
|
|
59
|
-
d && /* @__PURE__ */ o("span", { className: "flex pr-
|
|
59
|
+
d && /* @__PURE__ */ o("span", { className: "flex pr-1", "aria-hidden": !0, "data-testid": "spectral-button-start-icon", children: d }),
|
|
60
60
|
t === "loading" && /* @__PURE__ */ o(_, { className: "ml-2 animate-spin", size: 16 }),
|
|
61
61
|
c,
|
|
62
62
|
n && t !== "loading" && /* @__PURE__ */ o("span", { className: "flex pl-2", "aria-hidden": !0, "data-testid": "spectral-button-end-icon", children: n })
|
package/dist/Dialog.d.ts
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
import { DialogCloseBase, DialogContentBase, DialogDescriptionBase, DialogFooterBase, DialogHeaderBase, DialogOverlayBase, DialogPortalBase, DialogTitleBase, DialogTriggerBase, DialogBaseProps } from './DialogBase';
|
|
2
1
|
import { ComponentProps } from 'react';
|
|
3
|
-
|
|
4
|
-
declare function
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
declare function
|
|
8
|
-
declare function
|
|
2
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
3
|
+
declare function Dialog({ isOpen, modal, ...props }: Omit<ComponentProps<typeof DialogPrimitive.Root>, 'open'> & {
|
|
4
|
+
isOpen?: boolean;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function DialogTrigger({ ...props }: ComponentProps<typeof DialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function DialogPortal({ ...props }: ComponentProps<typeof DialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function DialogClose({ ...props }: ComponentProps<typeof DialogPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function DialogOverlay({ className, ...props }: ComponentProps<typeof DialogPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function DialogContent({ className, children, showCloseButton, onEscapeKeyDown, onInteractOutside, onPointerDownOutside, ...props }: ComponentProps<typeof DialogPrimitive.Content> & {
|
|
9
11
|
showCloseButton?: boolean;
|
|
12
|
+
onEscapeKeyDown?: (event: KeyboardEvent) => void;
|
|
13
|
+
onInteractOutside?: (event: PointerEvent | FocusEvent) => void;
|
|
14
|
+
onPointerDownOutside?: (event: PointerEvent) => void;
|
|
10
15
|
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
declare function DialogHeader({ className,
|
|
12
|
-
declare function DialogFooter({ className,
|
|
13
|
-
declare function DialogTitle({ className,
|
|
14
|
-
declare function DialogDescription({ className,
|
|
16
|
+
declare function DialogHeader({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
declare function DialogFooter({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
declare function DialogTitle({ className, ...props }: ComponentProps<typeof DialogPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare function DialogDescription({ className, ...props }: ComponentProps<typeof DialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
|
|
15
20
|
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
|
|
16
21
|
//# sourceMappingURL=Dialog.d.ts.map
|
package/dist/Dialog.js
CHANGED
|
@@ -1,79 +1,97 @@
|
|
|
1
1
|
import "./styles/main.css";
|
|
2
|
-
import { jsx as e, jsxs as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
3
|
+
import { CloseIcon as g } from "./Icons/CloseIcon.js";
|
|
4
|
+
import { R as p, C as i, a as f, D as u, O as m, P as x, T as b, b as h } from "./index-BFu0M-5-.js";
|
|
5
|
+
import { cn as o } from "./utils/twUtils.js";
|
|
5
6
|
import "react";
|
|
6
|
-
function
|
|
7
|
-
|
|
7
|
+
function T({
|
|
8
|
+
isOpen: t,
|
|
9
|
+
modal: a = !1,
|
|
10
|
+
...l
|
|
11
|
+
}) {
|
|
12
|
+
return /* @__PURE__ */ e(p, { open: t, modal: a, "data-slot": "dialog", "data-testid": "spectral-dialog", ...l });
|
|
8
13
|
}
|
|
9
|
-
function z({
|
|
10
|
-
return /* @__PURE__ */ e(
|
|
14
|
+
function z({ ...t }) {
|
|
15
|
+
return /* @__PURE__ */ e(h, { asChild: !0, "data-testid": "spectral-dialog-trigger", ...t });
|
|
11
16
|
}
|
|
12
|
-
function
|
|
13
|
-
return /* @__PURE__ */ e(
|
|
17
|
+
function v({ ...t }) {
|
|
18
|
+
return /* @__PURE__ */ e(x, { "data-slot": "dialog-portal", "data-testid": "dialog-portal", ...t });
|
|
14
19
|
}
|
|
15
|
-
function
|
|
16
|
-
return /* @__PURE__ */ e(
|
|
20
|
+
function j({ ...t }) {
|
|
21
|
+
return /* @__PURE__ */ e(i, { "aria-label": "close", "data-slot": "dialog-close", "data-testid": "spectral-dialog-close", ...t });
|
|
17
22
|
}
|
|
18
|
-
function
|
|
23
|
+
function y({ className: t, ...a }) {
|
|
19
24
|
return /* @__PURE__ */ e(
|
|
20
|
-
|
|
25
|
+
m,
|
|
21
26
|
{
|
|
22
|
-
className:
|
|
27
|
+
className: o("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 backdrop-blur-sm", t),
|
|
23
28
|
"data-slot": "dialog-overlay",
|
|
24
|
-
|
|
25
|
-
...
|
|
29
|
+
"data-testid": "spectral-dialog-overlay",
|
|
30
|
+
...a
|
|
26
31
|
}
|
|
27
32
|
);
|
|
28
33
|
}
|
|
29
34
|
function O({
|
|
30
|
-
className:
|
|
31
|
-
children:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
...
|
|
35
|
+
className: t,
|
|
36
|
+
children: a,
|
|
37
|
+
showCloseButton: l = !0,
|
|
38
|
+
onEscapeKeyDown: d,
|
|
39
|
+
onInteractOutside: r,
|
|
40
|
+
onPointerDownOutside: n,
|
|
41
|
+
...c
|
|
37
42
|
}) {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
p,
|
|
43
|
+
return /* @__PURE__ */ s(v, { "data-slot": "dialog-portal", "data-testid": "spectral-dialog-portal", children: [
|
|
44
|
+
/* @__PURE__ */ e(y, {}),
|
|
45
|
+
/* @__PURE__ */ s(
|
|
46
|
+
f,
|
|
43
47
|
{
|
|
44
|
-
className:
|
|
48
|
+
className: o("bg-dialog-bg fixed px-6 pt-6 pb-6 has-[[data-slot=dialog-footer]]:pb-0 top-[50%] left-[50%] z-50 flex flex-col w-full max-w-xl translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg shadow-lg duration-200 max-h-[80vh] overflow-y-auto", t),
|
|
45
49
|
"data-slot": "dialog-content",
|
|
46
|
-
|
|
47
|
-
onEscapeKeyDown:
|
|
48
|
-
onInteractOutside:
|
|
49
|
-
onPointerDownOutside:
|
|
50
|
-
...
|
|
51
|
-
children:
|
|
50
|
+
"data-testid": "spectral-dialog-content",
|
|
51
|
+
onEscapeKeyDown: d,
|
|
52
|
+
onInteractOutside: r,
|
|
53
|
+
onPointerDownOutside: n,
|
|
54
|
+
...c,
|
|
55
|
+
children: [
|
|
56
|
+
a,
|
|
57
|
+
l && /* @__PURE__ */ s(
|
|
58
|
+
i,
|
|
59
|
+
{
|
|
60
|
+
className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
61
|
+
"data-slot": "dialog-close",
|
|
62
|
+
"data-testid": "spectral-dialog-close",
|
|
63
|
+
children: [
|
|
64
|
+
/* @__PURE__ */ e(g, { size: 16 }),
|
|
65
|
+
/* @__PURE__ */ e("span", { className: "sr-only", children: "Close" })
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
]
|
|
52
70
|
}
|
|
53
71
|
)
|
|
54
72
|
] });
|
|
55
73
|
}
|
|
56
|
-
function P({ className:
|
|
57
|
-
return /* @__PURE__ */ e(
|
|
74
|
+
function P({ className: t, ...a }) {
|
|
75
|
+
return /* @__PURE__ */ e("div", { className: o("flex flex-col gap-2 text-center sm:text-left", t), "data-slot": "dialog-header", "data-testid": "spectral-dialog-header", ...a });
|
|
58
76
|
}
|
|
59
|
-
function
|
|
60
|
-
return /* @__PURE__ */ e(
|
|
77
|
+
function R({ className: t, ...a }) {
|
|
78
|
+
return /* @__PURE__ */ e("div", { className: o("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end sticky bottom-0 z-10 bg-dialog-bg py-4 px-6 -mx-6", t), "data-slot": "dialog-footer", "data-testid": "spectral-dialog-footer", ...a });
|
|
61
79
|
}
|
|
62
|
-
function
|
|
63
|
-
return /* @__PURE__ */ e(
|
|
80
|
+
function _({ className: t, ...a }) {
|
|
81
|
+
return /* @__PURE__ */ e(b, { className: o("text-2xl leading-none font-semibold", t), "data-slot": "dialog-title", "data-testid": "spectral-dialog-title", ...a });
|
|
64
82
|
}
|
|
65
|
-
function
|
|
66
|
-
return /* @__PURE__ */ e(
|
|
83
|
+
function F({ className: t, ...a }) {
|
|
84
|
+
return /* @__PURE__ */ e(u, { className: o("text-muted-foreground text-sm", t), "data-slot": "dialog-description", "data-testid": "spectral-dialog-description", ...a });
|
|
67
85
|
}
|
|
68
86
|
export {
|
|
69
|
-
|
|
70
|
-
|
|
87
|
+
T as Dialog,
|
|
88
|
+
j as DialogClose,
|
|
71
89
|
O as DialogContent,
|
|
72
|
-
|
|
73
|
-
|
|
90
|
+
F as DialogDescription,
|
|
91
|
+
R as DialogFooter,
|
|
74
92
|
P as DialogHeader,
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
93
|
+
y as DialogOverlay,
|
|
94
|
+
v as DialogPortal,
|
|
95
|
+
_ as DialogTitle,
|
|
78
96
|
z as DialogTrigger
|
|
79
97
|
};
|
package/dist/Drawer.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./styles/main.css";
|
|
2
2
|
import { jsx as t, jsxs as s } from "react/jsx-runtime";
|
|
3
3
|
import { SpectralProvider as f } from "./SpectralProvider.js";
|
|
4
|
-
import { D as e } from "./index-
|
|
4
|
+
import { D as e } from "./index-jgQ7sgLl.js";
|
|
5
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
6
|
const a = "!font-sans fixed", w = {
|
|
7
7
|
left: {
|
package/dist/HoverCard.js
CHANGED
|
@@ -3,10 +3,10 @@ import "./styles/main.css";
|
|
|
3
3
|
import { jsx as i } from "react/jsx-runtime";
|
|
4
4
|
import * as s from "react";
|
|
5
5
|
import { createContext as F, useContext as I } from "react";
|
|
6
|
-
import {
|
|
7
|
-
import { c as O, R as z, A as G, C as K, a as j } from "./index-
|
|
8
|
-
import { P as V, D as q } from "./index-
|
|
9
|
-
import { P as T } from "./index-
|
|
6
|
+
import { e as B, c as U, b as h, P as $, u as W } from "./index-CfypDjr2.js";
|
|
7
|
+
import { c as O, R as z, A as G, C as K, a as j } from "./index-DMDsy0y2.js";
|
|
8
|
+
import { P as V, D as q } from "./index-D-PVGGln.js";
|
|
9
|
+
import { P as T } from "./index-DdOwqCfb.js";
|
|
10
10
|
import { cn as J } from "./utils/twUtils.js";
|
|
11
11
|
var H, x = "HoverCard", [E] = U(x, [
|
|
12
12
|
O
|
package/dist/Icons/IconBase.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { IconProps } from './iconTypes';
|
|
2
|
-
import { ComponentPropsWithoutRef,
|
|
2
|
+
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
3
3
|
export declare const SvgIdContext: import('react').Context<string>;
|
|
4
4
|
interface IconBaseProps extends Omit<IconProps, 'strokeWidth'>, ComponentPropsWithoutRef<'svg'> {
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
className?: string;
|
|
7
7
|
size?: number;
|
|
8
8
|
title?: string;
|
|
9
|
-
style?: CSSProperties;
|
|
10
9
|
color?: string;
|
|
11
10
|
}
|
|
12
11
|
declare const IconBase: import('react').ForwardRefExoticComponent<IconBaseProps & import('react').RefAttributes<SVGSVGElement>>;
|
package/dist/Icons/IconBase.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "../styles/main.css";
|
|
3
|
-
import { jsxs as
|
|
4
|
-
import { createContext as
|
|
5
|
-
const
|
|
6
|
-
const s =
|
|
7
|
-
return /* @__PURE__ */
|
|
3
|
+
import { jsxs as u, jsx as t } from "react/jsx-runtime";
|
|
4
|
+
import { createContext as w, forwardRef as x, useId as B } from "react";
|
|
5
|
+
const g = w(""), A = x(function({ children: c, title: o, size: n = 24, ariaHidden: r = !0, description: d, className: a, ...f }, h) {
|
|
6
|
+
const s = B(), e = o !== void 0 ? !1 : r, i = !e && o ? `${s}_title` : "", l = !e && d ? `${s}_desc` : "", v = [i, l].filter(Boolean).join(" ") || void 0;
|
|
7
|
+
return /* @__PURE__ */ u("svg", { height: n, width: n, xmlns: "http://www.w3.org/2000/svg", className: a, role: "img", "aria-hidden": e, "aria-labelledby": v, ref: h, fill: "none", viewBox: "0 0 24 24", ...f, children: [
|
|
8
8
|
!e && o && /* @__PURE__ */ t("title", { id: i, children: o }),
|
|
9
9
|
!e && d && /* @__PURE__ */ t("desc", { id: l, children: d }),
|
|
10
|
-
/* @__PURE__ */ t(
|
|
10
|
+
/* @__PURE__ */ t(g.Provider, { value: s, children: c })
|
|
11
11
|
] });
|
|
12
12
|
});
|
|
13
13
|
export {
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
g as SvgIdContext,
|
|
15
|
+
A as default
|
|
16
16
|
};
|
package/dist/Popover.js
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import "./styles/main.css";
|
|
3
3
|
import { jsx as s } from "react/jsx-runtime";
|
|
4
4
|
import * as p from "react";
|
|
5
|
-
import {
|
|
6
|
-
import { P as H, D as K } from "./index-
|
|
7
|
-
import { h as j, R as U, u as V, F as W } from "./index-
|
|
8
|
-
import { u as Z } from "./index-
|
|
9
|
-
import { c as _, R as q, A as b, C as B, a as J } from "./index-
|
|
10
|
-
import { P as w } from "./index-
|
|
5
|
+
import { e as L, c as z, u as x, P as O, b as P, a as G } from "./index-CfypDjr2.js";
|
|
6
|
+
import { P as H, D as K } from "./index-D-PVGGln.js";
|
|
7
|
+
import { h as j, R as U, u as V, F as W } from "./index-CpUJ8sN0.js";
|
|
8
|
+
import { u as Z } from "./index-CDYW5LDR.js";
|
|
9
|
+
import { c as _, R as q, A as b, C as B, a as J } from "./index-DMDsy0y2.js";
|
|
10
|
+
import { P as w } from "./index-DdOwqCfb.js";
|
|
11
11
|
import { cn as Q } from "./utils/twUtils.js";
|
|
12
12
|
var C = "Popover", [E] = z(C, [
|
|
13
13
|
_
|
package/dist/RadioGroup.js
CHANGED
|
@@ -4,13 +4,13 @@ import { jsx as n, jsxs as N } from "react/jsx-runtime";
|
|
|
4
4
|
import { Label as _ } from "./Label.js";
|
|
5
5
|
import * as c from "react";
|
|
6
6
|
import { createContext as Re, forwardRef as G, useMemo as ge, memo as he, useContext as Ie } from "react";
|
|
7
|
-
import { c as K, P as S, b as w,
|
|
8
|
-
import { c as we, u as j } from "./index-
|
|
9
|
-
import { u as ye } from "./index-
|
|
7
|
+
import { c as K, P as S, b as w, u as P, e as Y } from "./index-CfypDjr2.js";
|
|
8
|
+
import { c as we, u as j } from "./index-DvqEQspb.js";
|
|
9
|
+
import { u as ye } from "./index-CDYW5LDR.js";
|
|
10
10
|
import { u as Ce } from "./index-0ioNhtNM.js";
|
|
11
|
-
import { u as Ee } from "./index-
|
|
11
|
+
import { u as Ee } from "./index-BRDfoF8s.js";
|
|
12
12
|
import { u as Fe } from "./index-BZPx6jYI.js";
|
|
13
|
-
import { P as Se } from "./index-
|
|
13
|
+
import { P as Se } from "./index-DdOwqCfb.js";
|
|
14
14
|
import { cn as F } from "./utils/twUtils.js";
|
|
15
15
|
var O = "rovingFocusGroup.onEntryFocus", xe = { bubbles: !1, cancelable: !0 }, x = "RovingFocusGroup", [M, z, Ne] = we(x), [_e, H] = K(
|
|
16
16
|
x,
|
package/dist/Select.js
CHANGED
|
@@ -64,7 +64,7 @@ import "./Icons/ZoomAllIcon.js";
|
|
|
64
64
|
import "./Icons/ZoomXIcon.js";
|
|
65
65
|
import "./Icons/ZoomYIcon.js";
|
|
66
66
|
import { Label as C } from "./Label.js";
|
|
67
|
-
import { R as X, T as Y, f as Z, e as _, C as $, c as tt, V as et, S as rt, d as I, G as at, I as it, b as st, a as ot } from "./index-
|
|
67
|
+
import { R as X, T as Y, f as Z, e as _, C as $, c as tt, V as et, S as rt, d as I, G as at, I as it, b as st, a as ot } from "./index-BSCg4Mei.js";
|
|
68
68
|
import { useFormFieldId as lt, useFormFieldState as dt, getAriaProps as mt, getErrorMessageId as ct, groupOptions as pt, getFormFieldCSSProperties as nt, getStateClasses as ut, getTriggerClasses as ht, ErrorMessage as gt, LoadingState as bt, EmptyState as ft, getOptionClasses as xt } from "./utils/formFieldUtils.js";
|
|
69
69
|
import { cn as s } from "./utils/twUtils.js";
|
|
70
70
|
import { forwardRef as yt, useState as Nt } from "react";
|
package/dist/Slider.js
CHANGED
|
@@ -4,10 +4,10 @@ import { jsx as m, jsxs as j } from "react/jsx-runtime";
|
|
|
4
4
|
import * as c from "react";
|
|
5
5
|
import { useMemo as de } from "react";
|
|
6
6
|
import { c as X } from "./index-rKs9bXHr.js";
|
|
7
|
-
import {
|
|
8
|
-
import { c as me, u as he } from "./index-
|
|
7
|
+
import { e as ue, c as fe, b as _, P as k, u as C } from "./index-CfypDjr2.js";
|
|
8
|
+
import { c as me, u as he } from "./index-DvqEQspb.js";
|
|
9
9
|
import { u as pe } from "./index-BZPx6jYI.js";
|
|
10
|
-
import { u as Se } from "./index-
|
|
10
|
+
import { u as Se } from "./index-BRDfoF8s.js";
|
|
11
11
|
import { cn as H } from "./utils/twUtils.js";
|
|
12
12
|
var G = ["PageUp", "PageDown"], W = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], q = {
|
|
13
13
|
"from-left": ["Home", "PageDown", "ArrowDown", "ArrowLeft"],
|
package/dist/Tooltip.js
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import "./styles/main.css";
|
|
3
3
|
import { jsx as d, jsxs as S } from "react/jsx-runtime";
|
|
4
4
|
import * as a from "react";
|
|
5
|
-
import { c as J,
|
|
6
|
-
import { P as te, D as oe } from "./index-
|
|
7
|
-
import { u as re } from "./index-
|
|
8
|
-
import { c as j, R as ne, a as ae, A as se, C as ie } from "./index-
|
|
9
|
-
import { P as V } from "./index-
|
|
10
|
-
import { R as le } from "./index-
|
|
5
|
+
import { c as J, e as Q, u as G, P as Z, b as T, g as ee } from "./index-CfypDjr2.js";
|
|
6
|
+
import { P as te, D as oe } from "./index-D-PVGGln.js";
|
|
7
|
+
import { u as re } from "./index-CDYW5LDR.js";
|
|
8
|
+
import { c as j, R as ne, a as ae, A as se, C as ie } from "./index-DMDsy0y2.js";
|
|
9
|
+
import { P as V } from "./index-DdOwqCfb.js";
|
|
10
|
+
import { R as le } from "./index-bcth-MVh.js";
|
|
11
11
|
import { cn as H } from "./utils/twUtils.js";
|
|
12
12
|
import { c as F } from "./index-D29mdTf5.js";
|
|
13
13
|
var [O] = J("Tooltip", [
|
package/dist/Tray.js
CHANGED
|
@@ -68,7 +68,7 @@ import { cn as rt } from "./utils/twUtils.js";
|
|
|
68
68
|
import { c as $r } from "./index-D29mdTf5.js";
|
|
69
69
|
import * as re from "react";
|
|
70
70
|
import { createContext as mt, useRef as z, useLayoutEffect as zr, useEffect as nt, useId as Ye, useContext as O, useInsertionEffect as Zi, useMemo as Y, useCallback as Ji, Children as Hr, isValidElement as _r, useState as Ae, Fragment as Qi, createElement as Gr, forwardRef as q, Component as Xr } from "react";
|
|
71
|
-
import { D as Pt } from "./index-
|
|
71
|
+
import { D as Pt } from "./index-jgQ7sgLl.js";
|
|
72
72
|
const qe = mt({});
|
|
73
73
|
function Ze(t) {
|
|
74
74
|
const e = z(null);
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import "./styles/main.css";
|
|
2
|
+
import * as i from "react";
|
|
3
|
+
import { c as V, a as q, P as p, u as _, b as g, d as K, e as U } from "./index-CfypDjr2.js";
|
|
4
|
+
import { u as R } from "./index-CDYW5LDR.js";
|
|
5
|
+
import { D as Y, P as Z } from "./index-D-PVGGln.js";
|
|
6
|
+
import { R as z, h as J, u as Q, F as X } from "./index-CpUJ8sN0.js";
|
|
7
|
+
import { P as h } from "./index-DdOwqCfb.js";
|
|
8
|
+
import { jsx as s, jsxs as N, Fragment as O } from "react/jsx-runtime";
|
|
9
|
+
var v = "Dialog", [I] = V(v), [ee, u] = I(v), x = (e) => {
|
|
10
|
+
const {
|
|
11
|
+
__scopeDialog: o,
|
|
12
|
+
children: r,
|
|
13
|
+
open: a,
|
|
14
|
+
defaultOpen: n,
|
|
15
|
+
onOpenChange: t,
|
|
16
|
+
modal: l = !0
|
|
17
|
+
} = e, c = i.useRef(null), f = i.useRef(null), [m, C] = U({
|
|
18
|
+
prop: a,
|
|
19
|
+
defaultProp: n ?? !1,
|
|
20
|
+
onChange: t,
|
|
21
|
+
caller: v
|
|
22
|
+
});
|
|
23
|
+
return /* @__PURE__ */ s(
|
|
24
|
+
ee,
|
|
25
|
+
{
|
|
26
|
+
scope: o,
|
|
27
|
+
triggerRef: c,
|
|
28
|
+
contentRef: f,
|
|
29
|
+
contentId: R(),
|
|
30
|
+
titleId: R(),
|
|
31
|
+
descriptionId: R(),
|
|
32
|
+
open: m,
|
|
33
|
+
onOpenChange: C,
|
|
34
|
+
onOpenToggle: i.useCallback(() => C((H) => !H), [C]),
|
|
35
|
+
modal: l,
|
|
36
|
+
children: r
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
};
|
|
40
|
+
x.displayName = v;
|
|
41
|
+
var A = "DialogTrigger", T = i.forwardRef(
|
|
42
|
+
(e, o) => {
|
|
43
|
+
const { __scopeDialog: r, ...a } = e, n = u(A, r), t = _(o, n.triggerRef);
|
|
44
|
+
return /* @__PURE__ */ s(
|
|
45
|
+
p.button,
|
|
46
|
+
{
|
|
47
|
+
type: "button",
|
|
48
|
+
"aria-haspopup": "dialog",
|
|
49
|
+
"aria-expanded": n.open,
|
|
50
|
+
"aria-controls": n.contentId,
|
|
51
|
+
"data-state": y(n.open),
|
|
52
|
+
...a,
|
|
53
|
+
ref: t,
|
|
54
|
+
onClick: g(e.onClick, n.onOpenToggle)
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
T.displayName = A;
|
|
60
|
+
var P = "DialogPortal", [te, b] = I(P, {
|
|
61
|
+
forceMount: void 0
|
|
62
|
+
}), M = (e) => {
|
|
63
|
+
const { __scopeDialog: o, forceMount: r, children: a, container: n } = e, t = u(P, o);
|
|
64
|
+
return /* @__PURE__ */ s(te, { scope: o, forceMount: r, children: i.Children.map(a, (l) => /* @__PURE__ */ s(h, { present: r || t.open, children: /* @__PURE__ */ s(Z, { asChild: !0, container: n, children: l }) })) });
|
|
65
|
+
};
|
|
66
|
+
M.displayName = P;
|
|
67
|
+
var D = "DialogOverlay", w = i.forwardRef(
|
|
68
|
+
(e, o) => {
|
|
69
|
+
const r = b(D, e.__scopeDialog), { forceMount: a = r.forceMount, ...n } = e, t = u(D, e.__scopeDialog);
|
|
70
|
+
return t.modal ? /* @__PURE__ */ s(h, { present: a || t.open, children: /* @__PURE__ */ s(ne, { ...n, ref: o }) }) : null;
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
w.displayName = D;
|
|
74
|
+
var oe = q("DialogOverlay.RemoveScroll"), ne = i.forwardRef(
|
|
75
|
+
(e, o) => {
|
|
76
|
+
const { __scopeDialog: r, ...a } = e, n = u(D, r);
|
|
77
|
+
return (
|
|
78
|
+
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
79
|
+
// ie. when `Overlay` and `Content` are siblings
|
|
80
|
+
/* @__PURE__ */ s(z, { as: oe, allowPinchZoom: !0, shards: [n.contentRef], children: /* @__PURE__ */ s(
|
|
81
|
+
p.div,
|
|
82
|
+
{
|
|
83
|
+
"data-state": y(n.open),
|
|
84
|
+
...a,
|
|
85
|
+
ref: o,
|
|
86
|
+
style: { pointerEvents: "auto", ...a.style }
|
|
87
|
+
}
|
|
88
|
+
) })
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
), d = "DialogContent", F = i.forwardRef(
|
|
92
|
+
(e, o) => {
|
|
93
|
+
const r = b(d, e.__scopeDialog), { forceMount: a = r.forceMount, ...n } = e, t = u(d, e.__scopeDialog);
|
|
94
|
+
return /* @__PURE__ */ s(h, { present: a || t.open, children: t.modal ? /* @__PURE__ */ s(re, { ...n, ref: o }) : /* @__PURE__ */ s(ae, { ...n, ref: o }) });
|
|
95
|
+
}
|
|
96
|
+
);
|
|
97
|
+
F.displayName = d;
|
|
98
|
+
var re = i.forwardRef(
|
|
99
|
+
(e, o) => {
|
|
100
|
+
const r = u(d, e.__scopeDialog), a = i.useRef(null), n = _(o, r.contentRef, a);
|
|
101
|
+
return i.useEffect(() => {
|
|
102
|
+
const t = a.current;
|
|
103
|
+
if (t) return J(t);
|
|
104
|
+
}, []), /* @__PURE__ */ s(
|
|
105
|
+
S,
|
|
106
|
+
{
|
|
107
|
+
...e,
|
|
108
|
+
ref: n,
|
|
109
|
+
trapFocus: r.open,
|
|
110
|
+
disableOutsidePointerEvents: !0,
|
|
111
|
+
onCloseAutoFocus: g(e.onCloseAutoFocus, (t) => {
|
|
112
|
+
t.preventDefault(), r.triggerRef.current?.focus();
|
|
113
|
+
}),
|
|
114
|
+
onPointerDownOutside: g(e.onPointerDownOutside, (t) => {
|
|
115
|
+
const l = t.detail.originalEvent, c = l.button === 0 && l.ctrlKey === !0;
|
|
116
|
+
(l.button === 2 || c) && t.preventDefault();
|
|
117
|
+
}),
|
|
118
|
+
onFocusOutside: g(
|
|
119
|
+
e.onFocusOutside,
|
|
120
|
+
(t) => t.preventDefault()
|
|
121
|
+
)
|
|
122
|
+
}
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
), ae = i.forwardRef(
|
|
126
|
+
(e, o) => {
|
|
127
|
+
const r = u(d, e.__scopeDialog), a = i.useRef(!1), n = i.useRef(!1);
|
|
128
|
+
return /* @__PURE__ */ s(
|
|
129
|
+
S,
|
|
130
|
+
{
|
|
131
|
+
...e,
|
|
132
|
+
ref: o,
|
|
133
|
+
trapFocus: !1,
|
|
134
|
+
disableOutsidePointerEvents: !1,
|
|
135
|
+
onCloseAutoFocus: (t) => {
|
|
136
|
+
e.onCloseAutoFocus?.(t), t.defaultPrevented || (a.current || r.triggerRef.current?.focus(), t.preventDefault()), a.current = !1, n.current = !1;
|
|
137
|
+
},
|
|
138
|
+
onInteractOutside: (t) => {
|
|
139
|
+
e.onInteractOutside?.(t), t.defaultPrevented || (a.current = !0, t.detail.originalEvent.type === "pointerdown" && (n.current = !0));
|
|
140
|
+
const l = t.target;
|
|
141
|
+
r.triggerRef.current?.contains(l) && t.preventDefault(), t.detail.originalEvent.type === "focusin" && n.current && t.preventDefault();
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
), S = i.forwardRef(
|
|
147
|
+
(e, o) => {
|
|
148
|
+
const { __scopeDialog: r, trapFocus: a, onOpenAutoFocus: n, onCloseAutoFocus: t, ...l } = e, c = u(d, r), f = i.useRef(null), m = _(o, f);
|
|
149
|
+
return Q(), /* @__PURE__ */ N(O, { children: [
|
|
150
|
+
/* @__PURE__ */ s(
|
|
151
|
+
X,
|
|
152
|
+
{
|
|
153
|
+
asChild: !0,
|
|
154
|
+
loop: !0,
|
|
155
|
+
trapped: a,
|
|
156
|
+
onMountAutoFocus: n,
|
|
157
|
+
onUnmountAutoFocus: t,
|
|
158
|
+
children: /* @__PURE__ */ s(
|
|
159
|
+
Y,
|
|
160
|
+
{
|
|
161
|
+
role: "dialog",
|
|
162
|
+
id: c.contentId,
|
|
163
|
+
"aria-describedby": c.descriptionId,
|
|
164
|
+
"aria-labelledby": c.titleId,
|
|
165
|
+
"data-state": y(c.open),
|
|
166
|
+
...l,
|
|
167
|
+
ref: m,
|
|
168
|
+
onDismiss: () => c.onOpenChange(!1)
|
|
169
|
+
}
|
|
170
|
+
)
|
|
171
|
+
}
|
|
172
|
+
),
|
|
173
|
+
/* @__PURE__ */ N(O, { children: [
|
|
174
|
+
/* @__PURE__ */ s(se, { titleId: c.titleId }),
|
|
175
|
+
/* @__PURE__ */ s(ce, { contentRef: f, descriptionId: c.descriptionId })
|
|
176
|
+
] })
|
|
177
|
+
] });
|
|
178
|
+
}
|
|
179
|
+
), E = "DialogTitle", W = i.forwardRef(
|
|
180
|
+
(e, o) => {
|
|
181
|
+
const { __scopeDialog: r, ...a } = e, n = u(E, r);
|
|
182
|
+
return /* @__PURE__ */ s(p.h2, { id: n.titleId, ...a, ref: o });
|
|
183
|
+
}
|
|
184
|
+
);
|
|
185
|
+
W.displayName = E;
|
|
186
|
+
var k = "DialogDescription", G = i.forwardRef(
|
|
187
|
+
(e, o) => {
|
|
188
|
+
const { __scopeDialog: r, ...a } = e, n = u(k, r);
|
|
189
|
+
return /* @__PURE__ */ s(p.p, { id: n.descriptionId, ...a, ref: o });
|
|
190
|
+
}
|
|
191
|
+
);
|
|
192
|
+
G.displayName = k;
|
|
193
|
+
var L = "DialogClose", $ = i.forwardRef(
|
|
194
|
+
(e, o) => {
|
|
195
|
+
const { __scopeDialog: r, ...a } = e, n = u(L, r);
|
|
196
|
+
return /* @__PURE__ */ s(
|
|
197
|
+
p.button,
|
|
198
|
+
{
|
|
199
|
+
type: "button",
|
|
200
|
+
...a,
|
|
201
|
+
ref: o,
|
|
202
|
+
onClick: g(e.onClick, () => n.onOpenChange(!1))
|
|
203
|
+
}
|
|
204
|
+
);
|
|
205
|
+
}
|
|
206
|
+
);
|
|
207
|
+
$.displayName = L;
|
|
208
|
+
function y(e) {
|
|
209
|
+
return e ? "open" : "closed";
|
|
210
|
+
}
|
|
211
|
+
var B = "DialogTitleWarning", [De, j] = K(B, {
|
|
212
|
+
contentName: d,
|
|
213
|
+
titleName: E,
|
|
214
|
+
docsSlug: "dialog"
|
|
215
|
+
}), se = ({ titleId: e }) => {
|
|
216
|
+
const o = j(B), r = `\`${o.contentName}\` requires a \`${o.titleName}\` for the component to be accessible for screen reader users.
|
|
217
|
+
|
|
218
|
+
If you want to hide the \`${o.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
219
|
+
|
|
220
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${o.docsSlug}`;
|
|
221
|
+
return i.useEffect(() => {
|
|
222
|
+
e && (document.getElementById(e) || console.error(r));
|
|
223
|
+
}, [r, e]), null;
|
|
224
|
+
}, ie = "DialogDescriptionWarning", ce = ({ contentRef: e, descriptionId: o }) => {
|
|
225
|
+
const a = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${j(ie).contentName}}.`;
|
|
226
|
+
return i.useEffect(() => {
|
|
227
|
+
const n = e.current?.getAttribute("aria-describedby");
|
|
228
|
+
o && n && (document.getElementById(o) || console.warn(a));
|
|
229
|
+
}, [a, e, o]), null;
|
|
230
|
+
}, ve = x, me = T, Ce = M, Re = w, _e = F, he = W, Pe = G, Ee = $;
|
|
231
|
+
export {
|
|
232
|
+
Ee as C,
|
|
233
|
+
Pe as D,
|
|
234
|
+
Re as O,
|
|
235
|
+
Ce as P,
|
|
236
|
+
ve as R,
|
|
237
|
+
he as T,
|
|
238
|
+
_e as a,
|
|
239
|
+
me as b
|
|
240
|
+
};
|