@spear-ai/spectral 1.3.37 → 1.3.39
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/.js +96 -93
- package/dist/Button.js +30 -24
- package/dist/Popover.js +45 -42
- package/dist/RadioButtonGroup/RadioButtonGroupBase.d.ts +18 -0
- package/dist/RadioButtonGroup/RadioButtonGroupBase.js +58 -0
- package/dist/RadioButtonGroup.d.ts +6 -0
- package/dist/RadioButtonGroup.js +20 -0
- package/dist/components/Popover/Popover.d.ts.map +1 -1
- package/dist/components/RadioButtonGroup/RadioButtonGroup.d.ts +6 -0
- package/dist/components/RadioButtonGroup/RadioButtonGroup.d.ts.map +1 -0
- package/dist/components/RadioButtonGroup/RadioButtonGroupBase.d.ts +18 -0
- package/dist/components/RadioButtonGroup/RadioButtonGroupBase.d.ts.map +1 -0
- package/dist/features/SettingsPopover/SettingsPopover.d.ts.map +1 -1
- package/dist/features/SettingsPopover.js +57 -72
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/styles/main.css +1 -1
- package/package.json +10 -3
- package/dist/Card.d.ts +0 -10
- package/dist/Card.js +0 -36
- package/dist/components/Card/Card.d.ts +0 -10
- package/dist/components/Card/Card.d.ts.map +0 -1
- package/dist/loader-circle-CvdzOiQ_.js +0 -11
package/dist/.js
CHANGED
|
@@ -2,104 +2,107 @@ import { Badge as e } from "./Badge.js";
|
|
|
2
2
|
import { Button as p } from "./Button.js";
|
|
3
3
|
import { Drawer as m } from "./Drawer.js";
|
|
4
4
|
import { Popover as x, PopoverContent as c, PopoverTrigger as I } from "./Popover.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
5
|
+
import { RadioButtonGroup as i, RadioButtonGroupItem as s } from "./RadioButtonGroup.js";
|
|
6
|
+
import { RadioGroup as u, RadioGroupItem as g } from "./RadioGroup.js";
|
|
7
|
+
import { Skeleton as T } from "./Skeleton.js";
|
|
8
|
+
import { Slider as C } from "./Slider.js";
|
|
9
|
+
import { Switch as P } from "./Switch.js";
|
|
10
|
+
import { Toggle as v } from "./Toggle.js";
|
|
11
|
+
import { ToggleGroup as R, ToggleGroupItem as h } from "./ToggleGroup.js";
|
|
12
|
+
import { Tooltip as k, TooltipContent as w, TooltipTrigger as Z } from "./Tooltip.js";
|
|
13
|
+
import { AnnotationsIcon as y } from "./Icons/AnnotationsIcon.js";
|
|
14
|
+
import { CalendarIcon as O } from "./Icons/CalendarIcon.js";
|
|
15
|
+
import { ClockIcon as E } from "./Icons/ClockIcon.js";
|
|
16
|
+
import { DashboardIcon as H } from "./Icons/DashboardIcon.js";
|
|
17
|
+
import { DeleteIcon as V } from "./Icons/DeleteIcon.js";
|
|
18
|
+
import { DurationIcon as X } from "./Icons/DurationIcon.js";
|
|
19
|
+
import { EraserIcon as j } from "./Icons/EraserIcon.js";
|
|
20
|
+
import { GoToFirstIcon as z } from "./Icons/GoToFirstIcon.js";
|
|
21
|
+
import { GoToLastIcon as K } from "./Icons/GoToLastIcon.js";
|
|
22
|
+
import { HarmonicCursorsIcon as Q } from "./Icons/HarmonicCursorsIcon.js";
|
|
23
|
+
import { InfoIcon as $ } from "./Icons/InfoIcon.js";
|
|
24
|
+
import { LabelIcon as ro } from "./Icons/LabelIcon.js";
|
|
25
|
+
import { LassoIcon as to } from "./Icons/LassoIcon.js";
|
|
26
|
+
import { LineToolIcon as no } from "./Icons/LineToolIcon.js";
|
|
27
|
+
import { LiveViewIcon as fo } from "./Icons/LiveViewIcon.js";
|
|
28
|
+
import { LocationIcon as co } from "./Icons/LocationIcon.js";
|
|
29
|
+
import { LogoutIcon as ao } from "./Icons/LogoutIcon.js";
|
|
30
|
+
import { MetadataIcon as so } from "./Icons/MetadataIcon.js";
|
|
31
|
+
import { OntologyIcon as uo } from "./Icons/OntologyIcon.js";
|
|
32
|
+
import { PanelIcon as To } from "./Icons/PanelIcon.js";
|
|
33
|
+
import { PlayIcon as Co } from "./Icons/PlayIcon.js";
|
|
34
|
+
import { PlusIcon as Po } from "./Icons/PlusIcon.js";
|
|
35
|
+
import { ResetIcon as vo } from "./Icons/ResetIcon.js";
|
|
36
|
+
import { ScissorsIcon as Ro } from "./Icons/ScissorsIcon.js";
|
|
37
|
+
import { SettingsIcon as Do } from "./Icons/SettingsIcon.js";
|
|
38
|
+
import { TrashIcon as wo } from "./Icons/TrashIcon.js";
|
|
39
|
+
import { UndoIcon as bo } from "./Icons/UndoIcon.js";
|
|
40
|
+
import { UserIcon as Ao } from "./Icons/UserIcon.js";
|
|
41
|
+
import { WarningIcon as Uo } from "./Icons/WarningIcon.js";
|
|
42
|
+
import { ZoomAllIcon as Fo } from "./Icons/ZoomAllIcon.js";
|
|
43
|
+
import { ZoomXIcon as Mo } from "./Icons/ZoomXIcon.js";
|
|
44
|
+
import { ZoomYIcon as Wo } from "./Icons/ZoomYIcon.js";
|
|
45
|
+
import { default as Yo, SvgIdContext as jo } from "./Icons/IconBase.js";
|
|
46
|
+
import { useOutsideClick as zo } from "./hooks/useOutsideClick.js";
|
|
47
|
+
import { useTheme as Ko } from "./hooks/useTheme.js";
|
|
48
|
+
import { c as Qo } from "./twUtils-CRiPKpXj.js";
|
|
49
|
+
import { SpectralProvider as $o } from "./SpectralProvider.js";
|
|
49
50
|
export {
|
|
50
|
-
|
|
51
|
+
y as AnnotationsIcon,
|
|
51
52
|
e as Badge,
|
|
52
53
|
p as Button,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
O as CalendarIcon,
|
|
55
|
+
E as ClockIcon,
|
|
56
|
+
H as DashboardIcon,
|
|
57
|
+
V as DeleteIcon,
|
|
57
58
|
m as Drawer,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
59
|
+
X as DurationIcon,
|
|
60
|
+
j as EraserIcon,
|
|
61
|
+
z as GoToFirstIcon,
|
|
62
|
+
K as GoToLastIcon,
|
|
63
|
+
Q as HarmonicCursorsIcon,
|
|
64
|
+
Yo as IconBase,
|
|
65
|
+
$ as InfoIcon,
|
|
66
|
+
ro as LabelIcon,
|
|
67
|
+
to as LassoIcon,
|
|
68
|
+
no as LineToolIcon,
|
|
69
|
+
fo as LiveViewIcon,
|
|
70
|
+
co as LocationIcon,
|
|
71
|
+
ao as LogoutIcon,
|
|
72
|
+
so as MetadataIcon,
|
|
73
|
+
uo as OntologyIcon,
|
|
74
|
+
To as PanelIcon,
|
|
75
|
+
Co as PlayIcon,
|
|
76
|
+
Po as PlusIcon,
|
|
76
77
|
x as Popover,
|
|
77
78
|
c as PopoverContent,
|
|
78
79
|
I as PopoverTrigger,
|
|
79
|
-
i as
|
|
80
|
-
s as
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
80
|
+
i as RadioButtonGroup,
|
|
81
|
+
s as RadioButtonGroupItem,
|
|
82
|
+
u as RadioGroup,
|
|
83
|
+
g as RadioGroupItem,
|
|
84
|
+
vo as ResetIcon,
|
|
85
|
+
Ro as ScissorsIcon,
|
|
86
|
+
Do as SettingsIcon,
|
|
87
|
+
T as Skeleton,
|
|
88
|
+
C as Slider,
|
|
89
|
+
$o as SpectralProvider,
|
|
90
|
+
jo as SvgIdContext,
|
|
91
|
+
P as Switch,
|
|
92
|
+
v as Toggle,
|
|
93
|
+
R as ToggleGroup,
|
|
94
|
+
h as ToggleGroupItem,
|
|
95
|
+
k as Tooltip,
|
|
96
|
+
w as TooltipContent,
|
|
97
|
+
Z as TooltipTrigger,
|
|
98
|
+
wo as TrashIcon,
|
|
99
|
+
bo as UndoIcon,
|
|
100
|
+
Ao as UserIcon,
|
|
101
|
+
Uo as WarningIcon,
|
|
102
|
+
Fo as ZoomAllIcon,
|
|
103
|
+
Mo as ZoomXIcon,
|
|
104
|
+
Wo as ZoomYIcon,
|
|
105
|
+
Qo as cn,
|
|
106
|
+
zo as useOutsideClick,
|
|
107
|
+
Ko as useTheme
|
|
105
108
|
};
|
package/dist/Button.js
CHANGED
|
@@ -4,8 +4,14 @@ import { jsxs as l, jsx as n } from "react/jsx-runtime";
|
|
|
4
4
|
import { c as u } from "./twUtils-CRiPKpXj.js";
|
|
5
5
|
import { c as v } from "./index-CRBC94ik.js";
|
|
6
6
|
import { forwardRef as h } from "react";
|
|
7
|
-
import {
|
|
8
|
-
|
|
7
|
+
import { c as N } from "./createLucideIcon-CI1yJrZf.js";
|
|
8
|
+
/**
|
|
9
|
+
* @license lucide-react v0.542.0 - ISC
|
|
10
|
+
*
|
|
11
|
+
* This source code is licensed under the ISC license.
|
|
12
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
13
|
+
*/
|
|
14
|
+
const w = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], _ = N("loader-circle", w), j = v(
|
|
9
15
|
`
|
|
10
16
|
!font-sans flex relative items-center justify-center gap-2 whitespace-nowrap transition-colors cursor-pointer rounded-lg border font-semibold disabled:pointer-events-none
|
|
11
17
|
focus:outline-none focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0
|
|
@@ -35,18 +41,18 @@ const w = v(
|
|
|
35
41
|
size: "default"
|
|
36
42
|
}
|
|
37
43
|
}
|
|
38
|
-
),
|
|
44
|
+
), k = h(
|
|
39
45
|
({
|
|
40
|
-
className:
|
|
41
|
-
variant:
|
|
42
|
-
label:
|
|
43
|
-
endIcon:
|
|
46
|
+
className: c,
|
|
47
|
+
variant: o,
|
|
48
|
+
label: r,
|
|
49
|
+
endIcon: a,
|
|
44
50
|
state: t,
|
|
45
|
-
errorMessage:
|
|
46
|
-
startIcon:
|
|
51
|
+
errorMessage: d,
|
|
52
|
+
startIcon: i,
|
|
47
53
|
disabled: s,
|
|
48
|
-
type:
|
|
49
|
-
dataTestId:
|
|
54
|
+
type: g = "button",
|
|
55
|
+
dataTestId: p = `button-${o}`,
|
|
50
56
|
size: e,
|
|
51
57
|
children: x,
|
|
52
58
|
...m
|
|
@@ -65,11 +71,11 @@ const w = v(
|
|
|
65
71
|
ghost: "bg-transparent text-button-ghost-text--disabled pointer-events-none"
|
|
66
72
|
}
|
|
67
73
|
}, f = u(
|
|
68
|
-
|
|
69
|
-
t === "error" && b.error[
|
|
70
|
-
t === "loading" && b.loading[
|
|
74
|
+
j({ variant: o, state: t, size: e }),
|
|
75
|
+
t === "error" && b.error[o || "primary"],
|
|
76
|
+
t === "loading" && b.loading[o || "primary"],
|
|
71
77
|
e,
|
|
72
|
-
|
|
78
|
+
c
|
|
73
79
|
);
|
|
74
80
|
return /* @__PURE__ */ l("div", { className: u("flex flex-col justify-items-center", e), children: [
|
|
75
81
|
/* @__PURE__ */ l(
|
|
@@ -77,26 +83,26 @@ const w = v(
|
|
|
77
83
|
{
|
|
78
84
|
className: f,
|
|
79
85
|
ref: y,
|
|
80
|
-
type:
|
|
86
|
+
type: g,
|
|
81
87
|
"aria-disabled": s,
|
|
82
88
|
disabled: s,
|
|
83
|
-
"data-testid":
|
|
89
|
+
"data-testid": p,
|
|
84
90
|
...m,
|
|
85
91
|
"data-state": t,
|
|
86
92
|
children: [
|
|
87
|
-
|
|
88
|
-
e === "icon" ? /* @__PURE__ */ n("span", { className: "sr-only", children:
|
|
89
|
-
t === "loading" && /* @__PURE__ */ n(
|
|
90
|
-
|
|
93
|
+
i && /* @__PURE__ */ n("span", { className: "flex pr-2", "aria-hidden": !0, children: i }),
|
|
94
|
+
e === "icon" ? /* @__PURE__ */ n("span", { className: "sr-only", children: r }) : r,
|
|
95
|
+
t === "loading" && /* @__PURE__ */ n(_, { className: "ml-2 animate-spin", size: 16 }),
|
|
96
|
+
a && t !== "loading" && /* @__PURE__ */ n("span", { className: "flex pl-2", "aria-hidden": !0, children: a }),
|
|
91
97
|
e === "icon" && x
|
|
92
98
|
]
|
|
93
99
|
}
|
|
94
100
|
),
|
|
95
|
-
t === "error" &&
|
|
101
|
+
t === "error" && d && /* @__PURE__ */ n("p", { className: "text-danger-100 mt-2 text-xs", role: "alert", "aria-live": "assertive", children: d })
|
|
96
102
|
] });
|
|
97
103
|
}
|
|
98
104
|
);
|
|
99
|
-
|
|
105
|
+
k.displayName = "Button";
|
|
100
106
|
export {
|
|
101
|
-
|
|
107
|
+
k as Button
|
|
102
108
|
};
|
package/dist/Popover.js
CHANGED
|
@@ -4,22 +4,22 @@ import { jsx as s } from "react/jsx-runtime";
|
|
|
4
4
|
import * as i from "react";
|
|
5
5
|
import { u as L, c as z, a as G, P as x, b as H, d as O, e as _, f as P, g as K, D as j } from "./index-B7LSgz_k.js";
|
|
6
6
|
import { h as U, R as V, u as W, F as Z } from "./index-gg2zpNk0.js";
|
|
7
|
-
import { c as
|
|
7
|
+
import { c as b, R as q, A as w, C as B, a as J } from "./index-sDEISz8i.js";
|
|
8
8
|
import { c as Q } from "./twUtils-CRiPKpXj.js";
|
|
9
9
|
var C = "Popover", [E, he] = z(C, [
|
|
10
|
-
|
|
11
|
-
]), g =
|
|
10
|
+
b
|
|
11
|
+
]), g = b(), [X, l] = E(C), F = (e) => {
|
|
12
12
|
const {
|
|
13
13
|
__scopePopover: a,
|
|
14
14
|
children: t,
|
|
15
|
-
open:
|
|
15
|
+
open: r,
|
|
16
16
|
defaultOpen: o,
|
|
17
|
-
onOpenChange:
|
|
17
|
+
onOpenChange: n,
|
|
18
18
|
modal: c = !1
|
|
19
19
|
} = e, p = g(a), f = i.useRef(null), [v, h] = i.useState(!1), [m, u] = L({
|
|
20
|
-
prop:
|
|
20
|
+
prop: r,
|
|
21
21
|
defaultProp: o ?? !1,
|
|
22
|
-
onChange:
|
|
22
|
+
onChange: n,
|
|
23
23
|
caller: C
|
|
24
24
|
});
|
|
25
25
|
return /* @__PURE__ */ s(q, { ...p, children: /* @__PURE__ */ s(
|
|
@@ -40,16 +40,16 @@ var C = "Popover", [E, he] = z(C, [
|
|
|
40
40
|
) });
|
|
41
41
|
};
|
|
42
42
|
F.displayName = C;
|
|
43
|
-
var N = "PopoverAnchor",
|
|
43
|
+
var N = "PopoverAnchor", y = i.forwardRef(
|
|
44
44
|
(e, a) => {
|
|
45
|
-
const { __scopePopover: t, ...
|
|
46
|
-
return i.useEffect(() => (c(), () => p()), [c, p]), /* @__PURE__ */ s(
|
|
45
|
+
const { __scopePopover: t, ...r } = e, o = l(N, t), n = g(t), { onCustomAnchorAdd: c, onCustomAnchorRemove: p } = o;
|
|
46
|
+
return i.useEffect(() => (c(), () => p()), [c, p]), /* @__PURE__ */ s(w, { ...n, ...r, ref: a });
|
|
47
47
|
}
|
|
48
48
|
);
|
|
49
|
-
|
|
50
|
-
var
|
|
49
|
+
y.displayName = N;
|
|
50
|
+
var S = "PopoverTrigger", D = i.forwardRef(
|
|
51
51
|
(e, a) => {
|
|
52
|
-
const { __scopePopover: t, ...
|
|
52
|
+
const { __scopePopover: t, ...r } = e, o = l(S, t), n = g(t), c = O(a, o.triggerRef), p = /* @__PURE__ */ s(
|
|
53
53
|
_.button,
|
|
54
54
|
{
|
|
55
55
|
type: "button",
|
|
@@ -57,34 +57,34 @@ var y = "PopoverTrigger", D = i.forwardRef(
|
|
|
57
57
|
"aria-expanded": o.open,
|
|
58
58
|
"aria-controls": o.contentId,
|
|
59
59
|
"data-state": $(o.open),
|
|
60
|
-
...
|
|
60
|
+
...r,
|
|
61
61
|
ref: c,
|
|
62
62
|
onClick: P(e.onClick, o.onOpenToggle)
|
|
63
63
|
}
|
|
64
64
|
);
|
|
65
|
-
return o.hasCustomAnchor ? p : /* @__PURE__ */ s(
|
|
65
|
+
return o.hasCustomAnchor ? p : /* @__PURE__ */ s(w, { asChild: !0, ...n, children: p });
|
|
66
66
|
}
|
|
67
67
|
);
|
|
68
|
-
D.displayName =
|
|
68
|
+
D.displayName = S;
|
|
69
69
|
var A = "PopoverPortal", [Y, ee] = E(A, {
|
|
70
70
|
forceMount: void 0
|
|
71
71
|
}), M = (e) => {
|
|
72
|
-
const { __scopePopover: a, forceMount: t, children:
|
|
73
|
-
return /* @__PURE__ */ s(Y, { scope: a, forceMount: t, children: /* @__PURE__ */ s(x, { present: t ||
|
|
72
|
+
const { __scopePopover: a, forceMount: t, children: r, container: o } = e, n = l(A, a);
|
|
73
|
+
return /* @__PURE__ */ s(Y, { scope: a, forceMount: t, children: /* @__PURE__ */ s(x, { present: t || n.open, children: /* @__PURE__ */ s(H, { asChild: !0, container: o, children: r }) }) });
|
|
74
74
|
};
|
|
75
75
|
M.displayName = A;
|
|
76
76
|
var d = "PopoverContent", T = i.forwardRef(
|
|
77
77
|
(e, a) => {
|
|
78
|
-
const t = ee(d, e.__scopePopover), { forceMount:
|
|
79
|
-
return /* @__PURE__ */ s(x, { present:
|
|
78
|
+
const t = ee(d, e.__scopePopover), { forceMount: r = t.forceMount, ...o } = e, n = l(d, e.__scopePopover);
|
|
79
|
+
return /* @__PURE__ */ s(x, { present: r || n.open, children: n.modal ? /* @__PURE__ */ s(te, { ...o, ref: a }) : /* @__PURE__ */ s(re, { ...o, ref: a }) });
|
|
80
80
|
}
|
|
81
81
|
);
|
|
82
82
|
T.displayName = d;
|
|
83
83
|
var oe = K("PopoverContent.RemoveScroll"), te = i.forwardRef(
|
|
84
84
|
(e, a) => {
|
|
85
|
-
const t = l(d, e.__scopePopover),
|
|
85
|
+
const t = l(d, e.__scopePopover), r = i.useRef(null), o = O(a, r), n = i.useRef(!1);
|
|
86
86
|
return i.useEffect(() => {
|
|
87
|
-
const c =
|
|
87
|
+
const c = r.current;
|
|
88
88
|
if (c) return U(c);
|
|
89
89
|
}, []), /* @__PURE__ */ s(V, { as: oe, allowPinchZoom: !0, children: /* @__PURE__ */ s(
|
|
90
90
|
k,
|
|
@@ -94,13 +94,13 @@ var oe = K("PopoverContent.RemoveScroll"), te = i.forwardRef(
|
|
|
94
94
|
trapFocus: t.open,
|
|
95
95
|
disableOutsidePointerEvents: !0,
|
|
96
96
|
onCloseAutoFocus: P(e.onCloseAutoFocus, (c) => {
|
|
97
|
-
c.preventDefault(),
|
|
97
|
+
c.preventDefault(), n.current || t.triggerRef.current?.focus();
|
|
98
98
|
}),
|
|
99
99
|
onPointerDownOutside: P(
|
|
100
100
|
e.onPointerDownOutside,
|
|
101
101
|
(c) => {
|
|
102
102
|
const p = c.detail.originalEvent, f = p.button === 0 && p.ctrlKey === !0, v = p.button === 2 || f;
|
|
103
|
-
|
|
103
|
+
n.current = v;
|
|
104
104
|
},
|
|
105
105
|
{ checkForDefaultPrevented: !1 }
|
|
106
106
|
),
|
|
@@ -114,7 +114,7 @@ var oe = K("PopoverContent.RemoveScroll"), te = i.forwardRef(
|
|
|
114
114
|
}
|
|
115
115
|
), re = i.forwardRef(
|
|
116
116
|
(e, a) => {
|
|
117
|
-
const t = l(d, e.__scopePopover),
|
|
117
|
+
const t = l(d, e.__scopePopover), r = i.useRef(!1), o = i.useRef(!1);
|
|
118
118
|
return /* @__PURE__ */ s(
|
|
119
119
|
k,
|
|
120
120
|
{
|
|
@@ -122,13 +122,13 @@ var oe = K("PopoverContent.RemoveScroll"), te = i.forwardRef(
|
|
|
122
122
|
ref: a,
|
|
123
123
|
trapFocus: !1,
|
|
124
124
|
disableOutsidePointerEvents: !1,
|
|
125
|
-
onCloseAutoFocus: (
|
|
126
|
-
e.onCloseAutoFocus?.(
|
|
125
|
+
onCloseAutoFocus: (n) => {
|
|
126
|
+
e.onCloseAutoFocus?.(n), n.defaultPrevented || (r.current || t.triggerRef.current?.focus(), n.preventDefault()), r.current = !1, o.current = !1;
|
|
127
127
|
},
|
|
128
|
-
onInteractOutside: (
|
|
129
|
-
e.onInteractOutside?.(
|
|
130
|
-
const c =
|
|
131
|
-
t.triggerRef.current?.contains(c) &&
|
|
128
|
+
onInteractOutside: (n) => {
|
|
129
|
+
e.onInteractOutside?.(n), n.defaultPrevented || (r.current = !0, n.detail.originalEvent.type === "pointerdown" && (o.current = !0));
|
|
130
|
+
const c = n.target;
|
|
131
|
+
t.triggerRef.current?.contains(c) && n.preventDefault(), n.detail.originalEvent.type === "focusin" && o.current && n.preventDefault();
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
);
|
|
@@ -137,9 +137,9 @@ var oe = K("PopoverContent.RemoveScroll"), te = i.forwardRef(
|
|
|
137
137
|
(e, a) => {
|
|
138
138
|
const {
|
|
139
139
|
__scopePopover: t,
|
|
140
|
-
trapFocus:
|
|
140
|
+
trapFocus: r,
|
|
141
141
|
onOpenAutoFocus: o,
|
|
142
|
-
onCloseAutoFocus:
|
|
142
|
+
onCloseAutoFocus: n,
|
|
143
143
|
disableOutsidePointerEvents: c,
|
|
144
144
|
onEscapeKeyDown: p,
|
|
145
145
|
onPointerDownOutside: f,
|
|
@@ -152,9 +152,9 @@ var oe = K("PopoverContent.RemoveScroll"), te = i.forwardRef(
|
|
|
152
152
|
{
|
|
153
153
|
asChild: !0,
|
|
154
154
|
loop: !0,
|
|
155
|
-
trapped:
|
|
155
|
+
trapped: r,
|
|
156
156
|
onMountAutoFocus: o,
|
|
157
|
-
onUnmountAutoFocus:
|
|
157
|
+
onUnmountAutoFocus: n,
|
|
158
158
|
children: /* @__PURE__ */ s(
|
|
159
159
|
j,
|
|
160
160
|
{
|
|
@@ -191,12 +191,12 @@ var oe = K("PopoverContent.RemoveScroll"), te = i.forwardRef(
|
|
|
191
191
|
}
|
|
192
192
|
), I = "PopoverClose", ne = i.forwardRef(
|
|
193
193
|
(e, a) => {
|
|
194
|
-
const { __scopePopover: t, ...
|
|
194
|
+
const { __scopePopover: t, ...r } = e, o = l(I, t);
|
|
195
195
|
return /* @__PURE__ */ s(
|
|
196
196
|
_.button,
|
|
197
197
|
{
|
|
198
198
|
type: "button",
|
|
199
|
-
...
|
|
199
|
+
...r,
|
|
200
200
|
ref: a,
|
|
201
201
|
onClick: P(e.onClick, () => o.onOpenChange(!1))
|
|
202
202
|
}
|
|
@@ -206,15 +206,15 @@ var oe = K("PopoverContent.RemoveScroll"), te = i.forwardRef(
|
|
|
206
206
|
ne.displayName = I;
|
|
207
207
|
var ae = "PopoverArrow", se = i.forwardRef(
|
|
208
208
|
(e, a) => {
|
|
209
|
-
const { __scopePopover: t, ...
|
|
210
|
-
return /* @__PURE__ */ s(J, { ...o, ...
|
|
209
|
+
const { __scopePopover: t, ...r } = e, o = g(t);
|
|
210
|
+
return /* @__PURE__ */ s(J, { ...o, ...r, ref: a });
|
|
211
211
|
}
|
|
212
212
|
);
|
|
213
213
|
se.displayName = ae;
|
|
214
214
|
function $(e) {
|
|
215
215
|
return e ? "open" : "closed";
|
|
216
216
|
}
|
|
217
|
-
var ce = F, ie =
|
|
217
|
+
var ce = F, ie = y, pe = D, le = M, ue = T;
|
|
218
218
|
function me({ ...e }) {
|
|
219
219
|
return /* @__PURE__ */ s(ce, { "data-slot": "popover", ...e });
|
|
220
220
|
}
|
|
@@ -225,7 +225,7 @@ function Re({
|
|
|
225
225
|
className: e,
|
|
226
226
|
align: a = "center",
|
|
227
227
|
sideOffset: t = 4,
|
|
228
|
-
width:
|
|
228
|
+
width: r = "w-fit",
|
|
229
229
|
...o
|
|
230
230
|
}) {
|
|
231
231
|
return /* @__PURE__ */ s(le, { children: /* @__PURE__ */ s(
|
|
@@ -239,9 +239,12 @@ function Re({
|
|
|
239
239
|
"data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2",
|
|
240
240
|
"data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 h-fit",
|
|
241
241
|
"max-h-[var(--radix-popover-content-max-height)] origin-(--radix-popover-content-transform-origin) rounded-lg border-none p-4 shadow-md outline-hidden",
|
|
242
|
+
"w-[var(--popover-width)]",
|
|
242
243
|
e
|
|
243
244
|
),
|
|
244
|
-
style: {
|
|
245
|
+
style: {
|
|
246
|
+
"--popover-width": typeof r == "number" ? `${r}px` : r === "w-fit" ? "320px" : r
|
|
247
|
+
},
|
|
245
248
|
...o
|
|
246
249
|
}
|
|
247
250
|
) });
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ReactNode } from '../../../node_modules/react';
|
|
2
|
+
export type RadioButtonGroupProps = {
|
|
3
|
+
value?: string;
|
|
4
|
+
onValueChange?: (value: string) => void;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
isKeptActive?: boolean;
|
|
8
|
+
expanded?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export type RadioButtonGroupItemProps = {
|
|
11
|
+
value: string;
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
className?: string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
};
|
|
16
|
+
export declare const RadioButtonGroupBase: ({ value, onValueChange, children, className, isKeptActive, expanded, }: RadioButtonGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare const RadioButtonGroupItem: ({ value, children, className, disabled }: RadioButtonGroupItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
//# sourceMappingURL=RadioButtonGroupBase.d.ts.map
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "../styles/main.css";
|
|
3
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
4
|
+
import { c as l } from "../twUtils-CRiPKpXj.js";
|
|
5
|
+
import { createContext as f, useContext as b } from "react";
|
|
6
|
+
const u = f(null), x = ({
|
|
7
|
+
value: e,
|
|
8
|
+
onValueChange: r,
|
|
9
|
+
children: i,
|
|
10
|
+
className: t,
|
|
11
|
+
isKeptActive: o = !1,
|
|
12
|
+
expanded: n = !1
|
|
13
|
+
}) => /* @__PURE__ */ s(u.Provider, { value: { value: e, onValueChange: r, isKeptActive: o, expanded: n }, children: /* @__PURE__ */ s(
|
|
14
|
+
"div",
|
|
15
|
+
{
|
|
16
|
+
role: "radiogroup",
|
|
17
|
+
"data-expanded": n,
|
|
18
|
+
className: l(
|
|
19
|
+
"flex h-fit w-fit items-center rounded-md [&_button:first-of-type]:rounded-l-md [&_button:last-of-type]:rounded-r-md",
|
|
20
|
+
"data-[expanded=true]:w-full",
|
|
21
|
+
t
|
|
22
|
+
),
|
|
23
|
+
children: i
|
|
24
|
+
}
|
|
25
|
+
) }), w = ({ value: e, children: r, className: i, disabled: t = !1 }) => {
|
|
26
|
+
const o = b(u);
|
|
27
|
+
if (!o)
|
|
28
|
+
throw new Error("RadioButtonGroupItem must be used within a RadioButtonGroup");
|
|
29
|
+
const { value: n, onValueChange: a, isKeptActive: c, expanded: g } = o, d = n === e;
|
|
30
|
+
return /* @__PURE__ */ s(
|
|
31
|
+
"button",
|
|
32
|
+
{
|
|
33
|
+
type: "button",
|
|
34
|
+
role: "radio",
|
|
35
|
+
"aria-checked": d,
|
|
36
|
+
"data-state": d ? "on" : "off",
|
|
37
|
+
disabled: t,
|
|
38
|
+
onClick: () => {
|
|
39
|
+
!t && a && a(e);
|
|
40
|
+
},
|
|
41
|
+
className: l(
|
|
42
|
+
"bg-toggle-bg inline-flex items-center justify-center gap-2 border text-sm font-medium disabled:pointer-events-none disabled:opacity-50",
|
|
43
|
+
"text-toggle-text hover:bg-toggle-bg--hover hover:text-toggle-text--hover transition-[colors] hover:cursor-pointer disabled:cursor-not-allowed",
|
|
44
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 focus:outline-none focus-visible:ring-[3px] [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
45
|
+
'border-toggle-border hover:border-toggle-border--hover h-9 min-w-9 px-3 outline-none [&_svg:not([class*="size-"]):not([width]):not([height])]:size-4',
|
|
46
|
+
"rounded-none shadow-none focus:z-10 focus-visible:z-10 [&:not(:first-child)]:border-l-0",
|
|
47
|
+
g && "w-full",
|
|
48
|
+
c && "data-[state=on]:bg-toggle-bg--active data-[state=on]:text-toggle-text--active data-[state=on]:border-toggle-border--active",
|
|
49
|
+
i
|
|
50
|
+
),
|
|
51
|
+
children: r
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
};
|
|
55
|
+
export {
|
|
56
|
+
x as RadioButtonGroupBase,
|
|
57
|
+
w as RadioButtonGroupItem
|
|
58
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { RadioButtonGroupBase } from './RadioButtonGroupBase';
|
|
2
|
+
import { ComponentProps } from '../../../node_modules/react';
|
|
3
|
+
export type RadioButtonGroupProps = ComponentProps<typeof RadioButtonGroupBase>;
|
|
4
|
+
export declare const RadioButtonGroup: ({ className, children, ...props }: RadioButtonGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const RadioButtonGroupItem: ({ value, children, className, disabled }: import('./RadioButtonGroupBase').RadioButtonGroupItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=RadioButtonGroup.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import "./styles/main.css";
|
|
2
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { RadioButtonGroupItem as u, RadioButtonGroupBase as m } from "./RadioButtonGroup/RadioButtonGroupBase.js";
|
|
4
|
+
import { c as n } from "./twUtils-CRiPKpXj.js";
|
|
5
|
+
import "react";
|
|
6
|
+
const s = ({ className: t, children: o, ...r }) => /* @__PURE__ */ e(
|
|
7
|
+
m,
|
|
8
|
+
{
|
|
9
|
+
className: n(
|
|
10
|
+
"flex h-fit w-fit items-center rounded-md [&_button:first-of-type]:rounded-l-md [&_button:last-of-type]:rounded-r-md",
|
|
11
|
+
t
|
|
12
|
+
),
|
|
13
|
+
...r,
|
|
14
|
+
children: o
|
|
15
|
+
}
|
|
16
|
+
), f = u;
|
|
17
|
+
export {
|
|
18
|
+
s as RadioButtonGroup,
|
|
19
|
+
f as RadioButtonGroupItem
|
|
20
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAA;AAE3D,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAA;AAE3C,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,GAAG;IAClF,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CACxB,CAAA;AAED,iBAAS,OAAO,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,2CAE1E;AAED,iBAAS,cAAc,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,2CAEpF;AAED,iBAAS,cAAc,CAAC,EACtB,SAAS,EACT,KAAgB,EAChB,UAAc,EACd,KAAe,EACf,GAAG,KAAK,EACT,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAA;AAE3D,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAA;AAE3C,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,GAAG;IAClF,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CACxB,CAAA;AAED,iBAAS,OAAO,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,2CAE1E;AAED,iBAAS,cAAc,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,2CAEpF;AAED,iBAAS,cAAc,CAAC,EACtB,SAAS,EACT,KAAgB,EAChB,UAAc,EACd,KAAe,EACf,GAAG,KAAK,EACT,EAAE,mBAAmB,2CAwBrB;AAED,iBAAS,aAAa,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,OAAO,gBAAgB,CAAC,MAAM,CAAC,2CAElF;AAED,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { RadioButtonGroupBase } from './RadioButtonGroupBase';
|
|
2
|
+
import { ComponentProps } from '../../../node_modules/react';
|
|
3
|
+
export type RadioButtonGroupProps = ComponentProps<typeof RadioButtonGroupBase>;
|
|
4
|
+
export declare const RadioButtonGroup: ({ className, children, ...props }: RadioButtonGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const RadioButtonGroupItem: ({ value, children, className, disabled }: import('./RadioButtonGroupBase').RadioButtonGroupItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=RadioButtonGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioButtonGroup.d.ts","sourceRoot":"","sources":["../../../src/components/RadioButtonGroup/RadioButtonGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAoD,MAAM,wBAAwB,CAAA;AAE/G,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAA;AAE3C,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAE/E,eAAO,MAAM,gBAAgB,GAAI,mCAAmC,qBAAqB,4CAYxF,CAAA;AAED,eAAO,MAAM,oBAAoB,mJAA2B,CAAA"}
|