@spear-ai/spectral 1.3.61 → 1.3.63
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 +181 -152
- package/dist/Accordion.d.ts +37 -0
- package/dist/Accordion.js +465 -0
- package/dist/Alert/AlertBase.js +2 -2
- package/dist/Alert.js +4 -3
- package/dist/Avatar.d.ts +12 -0
- package/dist/Avatar.js +88 -1
- package/dist/Badge.d.ts +12 -2
- package/dist/Badge.js +28 -4
- package/dist/Button.js +2 -2
- package/dist/ButtonGroup/ButtonGroupButton.d.ts +13 -0
- package/dist/ButtonGroup/ButtonGroupButton.js +51 -0
- package/dist/ButtonGroup.d.ts +29 -0
- package/dist/ButtonGroup.js +89 -0
- package/dist/ButtonIcon.js +2 -1
- package/dist/Checkbox/CheckboxBase.d.ts +2 -2
- package/dist/Checkbox/CheckboxBase.js +21 -21
- package/dist/Checkbox.d.ts +14 -0
- package/dist/Checkbox.js +98 -0
- package/dist/Dialog/DialogBase.d.ts +1 -1
- package/dist/Dialog/DialogBase.js +2 -2
- package/dist/Dialog.js +4 -4
- package/dist/Drawer.js +24 -1283
- package/dist/HoverCard.d.ts +29 -0
- package/dist/HoverCard.js +207 -0
- package/dist/Icons/CheckmarkIcon.js +9 -9
- package/dist/Icons/MessagesIcon.d.ts +3 -0
- package/dist/Icons/MessagesIcon.js +31 -0
- package/dist/Icons/MinusIcon.js +13 -13
- package/dist/Icons/index.d.ts +1 -0
- package/dist/Icons.js +50 -48
- package/dist/Input.d.ts +2 -0
- package/dist/Input.js +98 -89
- package/dist/InputGroup.d.ts +16 -0
- package/dist/InputGroup.js +129 -0
- package/dist/InputOTP.d.ts +0 -2
- package/dist/InputOTP.js +138 -142
- package/dist/Label.d.ts +3 -7
- package/dist/Label.js +11 -11
- package/dist/MultiSelect/MultiSelectBase.js +22 -22
- package/dist/Popover.d.ts +6 -7
- package/dist/Popover.js +60 -71
- package/dist/RadioButtonGroup/RadioButtonGroupBase.js +1 -1
- package/dist/RadioButtonGroup.js +1 -1
- package/dist/RadioGroup.d.ts +1 -1
- package/dist/RadioGroup.js +141 -134
- package/dist/Select.js +97 -895
- package/dist/Separator.d.ts +12 -0
- package/dist/Separator.js +24 -0
- package/dist/Skeleton.js +3 -3
- package/dist/Slider.d.ts +15 -3
- package/dist/Slider.js +464 -40
- package/dist/Switch/SwitchBase.js +1 -1
- package/dist/Switch.js +2 -2
- package/dist/Tabs/TabsBase.js +1 -1
- package/dist/Tabs.js +16 -16
- package/dist/Textarea.js +41 -42
- package/dist/Toggle.js +2 -2
- package/dist/ToggleGroup.js +1 -1
- package/dist/Tooltip/TooltipBase.js +29 -29
- package/dist/Tooltip.js +15 -15
- package/dist/Tray/TrayStoriesData.d.ts +39 -0
- package/dist/Tray/TrayStoriesData.js +438 -0
- package/dist/Tray.d.ts +28 -0
- package/dist/Tray.js +227 -0
- package/dist/clsx-OuTLNxxd.js +16 -0
- package/dist/components/Accordion/Accordion.d.ts +37 -0
- package/dist/components/Accordion/Accordion.d.ts.map +1 -0
- package/dist/components/Avatar/Avatar.d.ts +12 -0
- package/dist/components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/components/Badge/Badge.d.ts +12 -2
- package/dist/components/Badge/Badge.d.ts.map +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +29 -0
- package/dist/components/ButtonGroup/ButtonGroup.d.ts.map +1 -0
- package/dist/components/ButtonGroup/ButtonGroupButton.d.ts +13 -0
- package/dist/components/ButtonGroup/ButtonGroupButton.d.ts.map +1 -0
- package/dist/components/Checkbox/Checkbox.d.ts +14 -0
- package/dist/components/Checkbox/Checkbox.d.ts.map +1 -0
- package/dist/components/Checkbox/CheckboxBase.d.ts +2 -2
- package/dist/components/Checkbox/CheckboxBase.d.ts.map +1 -1
- package/dist/components/Dialog/DialogBase.d.ts +1 -1
- package/dist/components/HoverCard/HoverCard.d.ts +29 -0
- package/dist/components/HoverCard/HoverCard.d.ts.map +1 -0
- package/dist/components/Icons/MessagesIcon.d.ts +3 -0
- package/dist/components/Icons/MessagesIcon.d.ts.map +1 -0
- package/dist/components/Icons/iconTypes.d.ts +1 -0
- package/dist/components/Icons/iconTypes.d.ts.map +1 -1
- package/dist/components/Icons/index.d.ts +1 -0
- package/dist/components/Icons/index.d.ts.map +1 -1
- package/dist/components/Input/Input.d.ts +2 -0
- package/dist/components/Input/Input.d.ts.map +1 -1
- package/dist/components/InputGroup/InputGroup.d.ts +16 -0
- package/dist/components/InputGroup/InputGroup.d.ts.map +1 -0
- package/dist/components/InputOTP/InputOTP.d.ts +0 -2
- package/dist/components/InputOTP/InputOTP.d.ts.map +1 -1
- package/dist/components/Label/Label.d.ts +3 -7
- package/dist/components/Label/Label.d.ts.map +1 -1
- package/dist/components/Popover/Popover.d.ts +6 -7
- package/dist/components/Popover/Popover.d.ts.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -1
- package/dist/components/Separator/Separator.d.ts +12 -0
- package/dist/components/Separator/Separator.d.ts.map +1 -0
- package/dist/components/Slider/Slider.d.ts +15 -3
- package/dist/components/Slider/Slider.d.ts.map +1 -1
- package/dist/components/Textarea/Textarea.d.ts.map +1 -1
- package/dist/components/Tray/Tray.d.ts +28 -0
- package/dist/components/Tray/Tray.d.ts.map +1 -0
- package/dist/components/Tray/TrayStoriesData.d.ts +39 -0
- package/dist/components/Tray/TrayStoriesData.d.ts.map +1 -0
- package/dist/features/AuthCard/ForgotPasswordEmailForm.js +4 -3
- package/dist/features/AuthCard/ForgotPasswordResetForm.js +9 -9
- package/dist/features/AuthCard/PasswordInput.js +78 -9
- package/dist/features/AuthCard/SignInForm.js +8 -7
- package/dist/features/AuthCard/SignUpForm.js +8 -7
- package/dist/features/AuthCard.js +2 -2
- package/dist/features/LabelingTools.js +7 -6
- package/dist/features/SensorMetadata.js +3 -2
- package/dist/features/SettingsPopover.js +3 -2
- package/dist/index-0ioNhtNM.js +10 -0
- package/dist/{index-CBwRmAsQ.js → index-6Abv_Flm.js} +1 -1
- package/dist/{index-DUK1rxhf.js → index-B-GQStVW.js} +6 -5
- package/dist/index-B2oBi8ng.js +142 -0
- package/dist/index-BIpuW_o8.js +146 -0
- package/dist/index-BZPx6jYI.js +8 -0
- package/dist/index-BhufZRa2.js +232 -0
- package/dist/index-CAKA12cC.js +1265 -0
- package/dist/{index-Cfyte2YO.js → index-CGALWSq_.js} +1 -1
- package/dist/index-CVSxKOPp.js +13 -0
- package/dist/index-CevVJ05e.js +822 -0
- package/dist/{index-CRBC94ik.js → index-D29mdTf5.js} +1 -1
- package/dist/{index-FeGk8zep.js → index-NzygPVvJ.js} +10 -9
- package/dist/index-UEFPWH8U.js +54 -0
- package/dist/index-rKs9bXHr.js +6 -0
- package/dist/{index-Cb7rjMhE.js → index-y6Br5T4h.js} +6 -6
- package/dist/index.d.ts +10 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/linear-cursor-small.png +0 -0
- package/dist/list.yml.webp +0 -0
- package/dist/message-alert-matte-glass-gradient.webp +0 -0
- package/dist/primitives/button.d.ts +10 -0
- package/dist/primitives/button.d.ts.map +1 -0
- package/dist/primitives/button.js +42 -0
- package/dist/primitives/input.d.ts +3 -0
- package/dist/primitives/input.d.ts.map +1 -0
- package/dist/primitives/input.js +18 -0
- package/dist/primitives/select.d.ts +16 -0
- package/dist/primitives/select.d.ts.map +1 -0
- package/dist/primitives/select.js +196 -0
- package/dist/primitives/slot.d.ts.map +1 -1
- package/dist/primitives/slot.js +21 -20
- package/dist/primitives/textarea.d.ts +3 -0
- package/dist/primitives/textarea.d.ts.map +1 -0
- package/dist/primitives/textarea.js +16 -0
- package/dist/{proxy-DD79Ok6n.js → proxy-C9AqCss6.js} +1 -1
- package/dist/speech-bubble-fluid-glass-gradient.webp +0 -0
- package/dist/styles/main.css +1 -1
- package/dist/utils/formFieldUtils.js +1 -1
- package/dist/utils/twUtils.js +2728 -2
- package/package.json +13 -8
- package/dist/Accordion/AccordionBase.d.ts +0 -42
- package/dist/Accordion/AccordionBase.js +0 -225
- package/dist/Badge/BadgeBase.d.ts +0 -13
- package/dist/Badge/BadgeBase.js +0 -35
- package/dist/PasswordInput-ClY_hxuN.js +0 -261
- package/dist/components/Accordion/AccordionBase.d.ts +0 -42
- package/dist/components/Accordion/AccordionBase.d.ts.map +0 -1
- package/dist/components/Badge/BadgeBase.d.ts +0 -13
- package/dist/components/Badge/BadgeBase.d.ts.map +0 -1
- package/dist/index-CA7haECj.js +0 -248
- package/dist/index-CbXx14YO.js +0 -59
- package/dist/index-VXXKXen4.js +0 -15
- package/dist/index-cCg4yNa8.js +0 -132
- package/dist/primitives/label.d.ts +0 -5
- package/dist/primitives/label.d.ts.map +0 -1
- package/dist/primitives/label.js +0 -27
- package/dist/twUtils-CRiPKpXj.js +0 -2743
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "../styles/main.css";
|
|
3
3
|
import { jsxs as a, jsx as s, Fragment as ue } from "react/jsx-runtime";
|
|
4
|
-
import {
|
|
4
|
+
import { cn as p } from "../utils/twUtils.js";
|
|
5
5
|
import { forwardRef as pe, useId as me, useState as I, useRef as P, useMemo as F, useCallback as b, useEffect as be } from "react";
|
|
6
6
|
import { X as K } from "../x-BBpi7a_7.js";
|
|
7
7
|
import { c as O } from "../createLucideIcon-CI1yJrZf.js";
|
|
@@ -57,24 +57,24 @@ const ve = [
|
|
|
57
57
|
}, [t]), l;
|
|
58
58
|
}, Oe = (t, l, i) => {
|
|
59
59
|
const [o, m] = I(-1), u = b(
|
|
60
|
-
(
|
|
60
|
+
(d) => {
|
|
61
61
|
const y = {
|
|
62
62
|
ArrowDown: () => {
|
|
63
|
-
|
|
63
|
+
d.preventDefault(), m((f) => Math.min(f + 1, t.length - 1));
|
|
64
64
|
},
|
|
65
65
|
ArrowUp: () => {
|
|
66
|
-
|
|
66
|
+
d.preventDefault(), m((f) => Math.max(f - 1, -1));
|
|
67
67
|
},
|
|
68
68
|
Enter: () => {
|
|
69
|
-
|
|
69
|
+
d.preventDefault(), o >= 0 && t[o] && l(t[o].value);
|
|
70
70
|
},
|
|
71
71
|
" ": () => {
|
|
72
|
-
|
|
72
|
+
d.preventDefault(), o >= 0 && t[o] && l(t[o].value);
|
|
73
73
|
},
|
|
74
74
|
Escape: () => {
|
|
75
|
-
|
|
75
|
+
d.preventDefault(), i();
|
|
76
76
|
}
|
|
77
|
-
}[
|
|
77
|
+
}[d.key];
|
|
78
78
|
y && y();
|
|
79
79
|
},
|
|
80
80
|
[t, o, l, i]
|
|
@@ -88,7 +88,7 @@ const ve = [
|
|
|
88
88
|
placeholder: o = "Select options",
|
|
89
89
|
maxCount: m = 3,
|
|
90
90
|
state: u = "default",
|
|
91
|
-
errorMessage:
|
|
91
|
+
errorMessage: d,
|
|
92
92
|
emptyMessage: D = "No options found",
|
|
93
93
|
loadingMessage: y = "Loading options...",
|
|
94
94
|
searchPlaceholder: f = "Search options...",
|
|
@@ -119,8 +119,8 @@ const ve = [
|
|
|
119
119
|
k || v((e) => (e || setTimeout(() => R.current?.focus(), 0), !e));
|
|
120
120
|
}, [k]);
|
|
121
121
|
function N(e) {
|
|
122
|
-
if (i.find((
|
|
123
|
-
const r = t.includes(e) ? t.filter((
|
|
122
|
+
if (i.find((c) => c.value === e)?.disabled) return;
|
|
123
|
+
const r = t.includes(e) ? t.filter((c) => c !== e) : [...t, e];
|
|
124
124
|
l(r), Z && v(!1);
|
|
125
125
|
}
|
|
126
126
|
const ae = b(() => {
|
|
@@ -135,26 +135,26 @@ const ve = [
|
|
|
135
135
|
n.stopPropagation(), N(e);
|
|
136
136
|
},
|
|
137
137
|
[N]
|
|
138
|
-
),
|
|
138
|
+
), de = () => {
|
|
139
139
|
if (t.length === 0)
|
|
140
140
|
return /* @__PURE__ */ s("span", { className: "text-input-text-placeholder", children: o });
|
|
141
141
|
const e = t.slice(0, m), n = t.length - m;
|
|
142
142
|
return /* @__PURE__ */ a("div", { className: "flex flex-wrap items-center gap-1", children: [
|
|
143
143
|
e.map((r) => {
|
|
144
|
-
const
|
|
145
|
-
return
|
|
144
|
+
const c = i.find((C) => C.value === r);
|
|
145
|
+
return c ? /* @__PURE__ */ a(
|
|
146
146
|
"span",
|
|
147
147
|
{
|
|
148
148
|
className: "bg-input-bg--selected text-input-text inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs",
|
|
149
149
|
children: [
|
|
150
|
-
|
|
150
|
+
c.label,
|
|
151
151
|
/* @__PURE__ */ s(
|
|
152
152
|
"button",
|
|
153
153
|
{
|
|
154
154
|
type: "button",
|
|
155
155
|
onClick: (C) => oe(r, C),
|
|
156
156
|
className: "hover:text-danger focus:outline-none",
|
|
157
|
-
"aria-label": `Remove ${
|
|
157
|
+
"aria-label": `Remove ${c.label}`,
|
|
158
158
|
children: /* @__PURE__ */ s(K, { className: "h-3 w-3" })
|
|
159
159
|
}
|
|
160
160
|
)
|
|
@@ -199,7 +199,7 @@ const ve = [
|
|
|
199
199
|
},
|
|
200
200
|
e.value
|
|
201
201
|
);
|
|
202
|
-
},
|
|
202
|
+
}, ce = () => ({
|
|
203
203
|
"--multiselect-border-radius": "0.5rem",
|
|
204
204
|
"--multiselect-trigger-height": "3rem",
|
|
205
205
|
"--multiselect-dropdown-max-height": "20rem"
|
|
@@ -228,10 +228,10 @@ const ve = [
|
|
|
228
228
|
"aria-expanded": g,
|
|
229
229
|
"aria-haspopup": "listbox",
|
|
230
230
|
"data-state": u,
|
|
231
|
-
style:
|
|
231
|
+
style: ce(),
|
|
232
232
|
..._,
|
|
233
233
|
children: [
|
|
234
|
-
/* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children:
|
|
234
|
+
/* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: de() }),
|
|
235
235
|
/* @__PURE__ */ a("div", { className: "ml-2 flex items-center gap-2", children: [
|
|
236
236
|
t.length > 0 && /* @__PURE__ */ s(
|
|
237
237
|
"button",
|
|
@@ -295,7 +295,7 @@ const ve = [
|
|
|
295
295
|
Object.entries(x.groups).map(([e, n]) => /* @__PURE__ */ a("div", { className: "mb-1", children: [
|
|
296
296
|
(x.ungrouped.length > 0 || Object.keys(x.groups).indexOf(e) > 0) && /* @__PURE__ */ s("div", { className: "bg-input-border mx-3 my-1 h-px" }),
|
|
297
297
|
/* @__PURE__ */ s("div", { className: "text-input-text-secondary px-3 py-1 text-xs font-semibold tracking-wide uppercase", children: e }),
|
|
298
|
-
n.map((r,
|
|
298
|
+
n.map((r, c) => A(r, h.indexOf(r)))
|
|
299
299
|
] }, e)),
|
|
300
300
|
H && t.length > 0 && /* @__PURE__ */ a("div", { className: "mt-1", children: [
|
|
301
301
|
/* @__PURE__ */ s("div", { className: "bg-input-border mx-3 my-1 h-px" }),
|
|
@@ -314,7 +314,7 @@ const ve = [
|
|
|
314
314
|
]
|
|
315
315
|
}
|
|
316
316
|
),
|
|
317
|
-
u === "error" &&
|
|
317
|
+
u === "error" && d && /* @__PURE__ */ s(
|
|
318
318
|
"p",
|
|
319
319
|
{
|
|
320
320
|
id: M,
|
|
@@ -322,7 +322,7 @@ const ve = [
|
|
|
322
322
|
"data-testid": "multiselect-error-message",
|
|
323
323
|
"aria-live": "polite",
|
|
324
324
|
"aria-atomic": "true",
|
|
325
|
-
children:
|
|
325
|
+
children: d
|
|
326
326
|
}
|
|
327
327
|
)
|
|
328
328
|
] });
|
package/dist/Popover.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
2
2
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
3
|
-
export type PopoverContentProps =
|
|
3
|
+
export type PopoverContentProps = ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> & {
|
|
4
4
|
width?: number | string;
|
|
5
5
|
};
|
|
6
|
-
declare
|
|
7
|
-
declare
|
|
8
|
-
declare
|
|
9
|
-
declare
|
|
10
|
-
export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger };
|
|
6
|
+
export declare const Popover: ({ ...props }: ComponentPropsWithoutRef<typeof PopoverPrimitive.Root>) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const PopoverTrigger: ({ ...props }: ComponentPropsWithoutRef<typeof PopoverPrimitive.Trigger>) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const PopoverContent: ({ align, className, side, sideOffset, width, ...props }: PopoverContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const PopoverAnchor: ({ ...props }: ComponentPropsWithoutRef<typeof PopoverPrimitive.Anchor>) => import("react/jsx-runtime").JSX.Element;
|
|
11
10
|
//# sourceMappingURL=Popover.d.ts.map
|
package/dist/Popover.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "./styles/main.css";
|
|
3
3
|
import { jsx as s } from "react/jsx-runtime";
|
|
4
|
-
import * as
|
|
5
|
-
import {
|
|
6
|
-
import { D as K } from "./index-
|
|
7
|
-
import { h as j, R as U, u as V, F as W } from "./index-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { P as w } from "./index-
|
|
11
|
-
import {
|
|
4
|
+
import * as p from "react";
|
|
5
|
+
import { u as L, c as z, a as x, P as O, b as P, e as G } from "./index-BhufZRa2.js";
|
|
6
|
+
import { P as H, D as K } from "./index-B2oBi8ng.js";
|
|
7
|
+
import { h as j, R as U, u as V, F as W } from "./index-B-GQStVW.js";
|
|
8
|
+
import { u as Z } from "./index-CVSxKOPp.js";
|
|
9
|
+
import { c as _, R as q, A as b, C as B, a as J } from "./index-NzygPVvJ.js";
|
|
10
|
+
import { P as w } from "./index-6Abv_Flm.js";
|
|
11
|
+
import { cn as Q } from "./utils/twUtils.js";
|
|
12
12
|
var C = "Popover", [E] = z(C, [
|
|
13
13
|
_
|
|
14
14
|
]), g = _(), [X, l] = E(C), F = (e) => {
|
|
@@ -19,40 +19,40 @@ var C = "Popover", [E] = z(C, [
|
|
|
19
19
|
defaultOpen: o,
|
|
20
20
|
onOpenChange: t,
|
|
21
21
|
modal: c = !1
|
|
22
|
-
} = e,
|
|
22
|
+
} = e, i = g(n), f = p.useRef(null), [v, h] = p.useState(!1), [m, u] = L({
|
|
23
23
|
prop: a,
|
|
24
24
|
defaultProp: o ?? !1,
|
|
25
25
|
onChange: t,
|
|
26
26
|
caller: C
|
|
27
27
|
});
|
|
28
|
-
return /* @__PURE__ */ s(
|
|
28
|
+
return /* @__PURE__ */ s(q, { ...i, children: /* @__PURE__ */ s(
|
|
29
29
|
X,
|
|
30
30
|
{
|
|
31
31
|
scope: n,
|
|
32
|
-
contentId:
|
|
32
|
+
contentId: Z(),
|
|
33
33
|
triggerRef: f,
|
|
34
34
|
open: m,
|
|
35
35
|
onOpenChange: u,
|
|
36
|
-
onOpenToggle:
|
|
36
|
+
onOpenToggle: p.useCallback(() => u((R) => !R), [u]),
|
|
37
37
|
hasCustomAnchor: v,
|
|
38
|
-
onCustomAnchorAdd:
|
|
39
|
-
onCustomAnchorRemove:
|
|
38
|
+
onCustomAnchorAdd: p.useCallback(() => h(!0), []),
|
|
39
|
+
onCustomAnchorRemove: p.useCallback(() => h(!1), []),
|
|
40
40
|
modal: c,
|
|
41
41
|
children: r
|
|
42
42
|
}
|
|
43
43
|
) });
|
|
44
44
|
};
|
|
45
45
|
F.displayName = C;
|
|
46
|
-
var N = "PopoverAnchor", y =
|
|
46
|
+
var N = "PopoverAnchor", y = p.forwardRef(
|
|
47
47
|
(e, n) => {
|
|
48
|
-
const { __scopePopover: r, ...a } = e, o = l(N, r), t = g(r), { onCustomAnchorAdd: c, onCustomAnchorRemove:
|
|
49
|
-
return
|
|
48
|
+
const { __scopePopover: r, ...a } = e, o = l(N, r), t = g(r), { onCustomAnchorAdd: c, onCustomAnchorRemove: i } = o;
|
|
49
|
+
return p.useEffect(() => (c(), () => i()), [c, i]), /* @__PURE__ */ s(b, { ...t, ...a, ref: n });
|
|
50
50
|
}
|
|
51
51
|
);
|
|
52
52
|
y.displayName = N;
|
|
53
|
-
var S = "PopoverTrigger", D =
|
|
53
|
+
var S = "PopoverTrigger", D = p.forwardRef(
|
|
54
54
|
(e, n) => {
|
|
55
|
-
const { __scopePopover: r, ...a } = e, o = l(S, r), t = g(r), c = x(n, o.triggerRef),
|
|
55
|
+
const { __scopePopover: r, ...a } = e, o = l(S, r), t = g(r), c = x(n, o.triggerRef), i = /* @__PURE__ */ s(
|
|
56
56
|
O.button,
|
|
57
57
|
{
|
|
58
58
|
type: "button",
|
|
@@ -65,7 +65,7 @@ var S = "PopoverTrigger", D = i.forwardRef(
|
|
|
65
65
|
onClick: P(e.onClick, o.onOpenToggle)
|
|
66
66
|
}
|
|
67
67
|
);
|
|
68
|
-
return o.hasCustomAnchor ?
|
|
68
|
+
return o.hasCustomAnchor ? i : /* @__PURE__ */ s(b, { asChild: !0, ...t, children: i });
|
|
69
69
|
}
|
|
70
70
|
);
|
|
71
71
|
D.displayName = S;
|
|
@@ -73,20 +73,20 @@ var A = "PopoverPortal", [Y, ee] = E(A, {
|
|
|
73
73
|
forceMount: void 0
|
|
74
74
|
}), M = (e) => {
|
|
75
75
|
const { __scopePopover: n, forceMount: r, children: a, container: o } = e, t = l(A, n);
|
|
76
|
-
return /* @__PURE__ */ s(Y, { scope: n, forceMount: r, children: /* @__PURE__ */ s(w, { present: r || t.open, children: /* @__PURE__ */ s(
|
|
76
|
+
return /* @__PURE__ */ s(Y, { scope: n, forceMount: r, children: /* @__PURE__ */ s(w, { present: r || t.open, children: /* @__PURE__ */ s(H, { asChild: !0, container: o, children: a }) }) });
|
|
77
77
|
};
|
|
78
78
|
M.displayName = A;
|
|
79
|
-
var d = "PopoverContent", T =
|
|
79
|
+
var d = "PopoverContent", T = p.forwardRef(
|
|
80
80
|
(e, n) => {
|
|
81
81
|
const r = ee(d, e.__scopePopover), { forceMount: a = r.forceMount, ...o } = e, t = l(d, e.__scopePopover);
|
|
82
82
|
return /* @__PURE__ */ s(w, { present: a || t.open, children: t.modal ? /* @__PURE__ */ s(te, { ...o, ref: n }) : /* @__PURE__ */ s(re, { ...o, ref: n }) });
|
|
83
83
|
}
|
|
84
84
|
);
|
|
85
85
|
T.displayName = d;
|
|
86
|
-
var oe =
|
|
86
|
+
var oe = G("PopoverContent.RemoveScroll"), te = p.forwardRef(
|
|
87
87
|
(e, n) => {
|
|
88
|
-
const r = l(d, e.__scopePopover), a =
|
|
89
|
-
return
|
|
88
|
+
const r = l(d, e.__scopePopover), a = p.useRef(null), o = x(n, a), t = p.useRef(!1);
|
|
89
|
+
return p.useEffect(() => {
|
|
90
90
|
const c = a.current;
|
|
91
91
|
if (c) return j(c);
|
|
92
92
|
}, []), /* @__PURE__ */ s(U, { as: oe, allowPinchZoom: !0, children: /* @__PURE__ */ s(
|
|
@@ -102,7 +102,7 @@ var oe = H("PopoverContent.RemoveScroll"), te = i.forwardRef(
|
|
|
102
102
|
onPointerDownOutside: P(
|
|
103
103
|
e.onPointerDownOutside,
|
|
104
104
|
(c) => {
|
|
105
|
-
const
|
|
105
|
+
const i = c.detail.originalEvent, f = i.button === 0 && i.ctrlKey === !0, v = i.button === 2 || f;
|
|
106
106
|
t.current = v;
|
|
107
107
|
},
|
|
108
108
|
{ checkForDefaultPrevented: !1 }
|
|
@@ -115,9 +115,9 @@ var oe = H("PopoverContent.RemoveScroll"), te = i.forwardRef(
|
|
|
115
115
|
}
|
|
116
116
|
) });
|
|
117
117
|
}
|
|
118
|
-
), re =
|
|
118
|
+
), re = p.forwardRef(
|
|
119
119
|
(e, n) => {
|
|
120
|
-
const r = l(d, e.__scopePopover), a =
|
|
120
|
+
const r = l(d, e.__scopePopover), a = p.useRef(!1), o = p.useRef(!1);
|
|
121
121
|
return /* @__PURE__ */ s(
|
|
122
122
|
k,
|
|
123
123
|
{
|
|
@@ -136,7 +136,7 @@ var oe = H("PopoverContent.RemoveScroll"), te = i.forwardRef(
|
|
|
136
136
|
}
|
|
137
137
|
);
|
|
138
138
|
}
|
|
139
|
-
), k =
|
|
139
|
+
), k = p.forwardRef(
|
|
140
140
|
(e, n) => {
|
|
141
141
|
const {
|
|
142
142
|
__scopePopover: r,
|
|
@@ -144,7 +144,7 @@ var oe = H("PopoverContent.RemoveScroll"), te = i.forwardRef(
|
|
|
144
144
|
onOpenAutoFocus: o,
|
|
145
145
|
onCloseAutoFocus: t,
|
|
146
146
|
disableOutsidePointerEvents: c,
|
|
147
|
-
onEscapeKeyDown:
|
|
147
|
+
onEscapeKeyDown: i,
|
|
148
148
|
onPointerDownOutside: f,
|
|
149
149
|
onFocusOutside: v,
|
|
150
150
|
onInteractOutside: h,
|
|
@@ -164,12 +164,12 @@ var oe = H("PopoverContent.RemoveScroll"), te = i.forwardRef(
|
|
|
164
164
|
asChild: !0,
|
|
165
165
|
disableOutsidePointerEvents: c,
|
|
166
166
|
onInteractOutside: h,
|
|
167
|
-
onEscapeKeyDown:
|
|
167
|
+
onEscapeKeyDown: i,
|
|
168
168
|
onPointerDownOutside: f,
|
|
169
169
|
onFocusOutside: v,
|
|
170
170
|
onDismiss: () => u.onOpenChange(!1),
|
|
171
171
|
children: /* @__PURE__ */ s(
|
|
172
|
-
|
|
172
|
+
B,
|
|
173
173
|
{
|
|
174
174
|
"data-state": $(u.open),
|
|
175
175
|
role: "dialog",
|
|
@@ -192,7 +192,7 @@ var oe = H("PopoverContent.RemoveScroll"), te = i.forwardRef(
|
|
|
192
192
|
}
|
|
193
193
|
);
|
|
194
194
|
}
|
|
195
|
-
), I = "PopoverClose", ne =
|
|
195
|
+
), I = "PopoverClose", ne = p.forwardRef(
|
|
196
196
|
(e, n) => {
|
|
197
197
|
const { __scopePopover: r, ...a } = e, o = l(I, r);
|
|
198
198
|
return /* @__PURE__ */ s(
|
|
@@ -207,56 +207,45 @@ var oe = H("PopoverContent.RemoveScroll"), te = i.forwardRef(
|
|
|
207
207
|
}
|
|
208
208
|
);
|
|
209
209
|
ne.displayName = I;
|
|
210
|
-
var ae = "PopoverArrow", se =
|
|
210
|
+
var ae = "PopoverArrow", se = p.forwardRef(
|
|
211
211
|
(e, n) => {
|
|
212
212
|
const { __scopePopover: r, ...a } = e, o = g(r);
|
|
213
|
-
return /* @__PURE__ */ s(
|
|
213
|
+
return /* @__PURE__ */ s(J, { ...o, ...a, ref: n });
|
|
214
214
|
}
|
|
215
215
|
);
|
|
216
216
|
se.displayName = ae;
|
|
217
217
|
function $(e) {
|
|
218
218
|
return e ? "open" : "closed";
|
|
219
219
|
}
|
|
220
|
-
var ce = F,
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
function Ae({ ...e }) {
|
|
225
|
-
return /* @__PURE__ */ s(pe, { asChild: !0, "data-slot": "popover-trigger", ...e });
|
|
226
|
-
}
|
|
227
|
-
function xe({
|
|
228
|
-
className: e,
|
|
229
|
-
align: n = "center",
|
|
220
|
+
var ce = F, pe = y, ie = D, le = M, ue = T;
|
|
221
|
+
const Re = ({ ...e }) => /* @__PURE__ */ s(ce, { "data-slot": "popover", ...e }), Ae = ({ ...e }) => /* @__PURE__ */ s(ie, { "data-slot": "popover-trigger", ...e }), xe = ({
|
|
222
|
+
align: e = "center",
|
|
223
|
+
className: n,
|
|
230
224
|
side: r = "bottom",
|
|
231
225
|
sideOffset: a = 4,
|
|
232
226
|
width: o = "w-fit",
|
|
233
227
|
...t
|
|
234
|
-
}) {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
) });
|
|
256
|
-
}
|
|
257
|
-
function Oe({ ...e }) {
|
|
258
|
-
return /* @__PURE__ */ s(ie, { "data-slot": "popover-anchor", ...e });
|
|
259
|
-
}
|
|
228
|
+
}) => /* @__PURE__ */ s(le, { children: /* @__PURE__ */ s(
|
|
229
|
+
ue,
|
|
230
|
+
{
|
|
231
|
+
align: e,
|
|
232
|
+
"data-slot": "popover-content",
|
|
233
|
+
side: r,
|
|
234
|
+
sideOffset: a,
|
|
235
|
+
className: Q(
|
|
236
|
+
"bg-popover-bg text-popover-text data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
|
|
237
|
+
"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",
|
|
238
|
+
"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",
|
|
239
|
+
"max-h-[var(--radix-popover-content-max-height)] origin-[--radix-popover-content-transform-origin] rounded-lg border-none p-4",
|
|
240
|
+
"w-[var(--popover-width)] shadow-md outline-none",
|
|
241
|
+
n
|
|
242
|
+
),
|
|
243
|
+
style: {
|
|
244
|
+
"--popover-width": typeof o == "number" ? `${o}px` : o === "w-fit" ? "320px" : o
|
|
245
|
+
},
|
|
246
|
+
...t
|
|
247
|
+
}
|
|
248
|
+
) }), Oe = ({ ...e }) => /* @__PURE__ */ s(pe, { "data-slot": "popover-anchor", ...e });
|
|
260
249
|
export {
|
|
261
250
|
Re as Popover,
|
|
262
251
|
Oe as PopoverAnchor,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import "../styles/main.css";
|
|
3
3
|
import { jsx as s } from "react/jsx-runtime";
|
|
4
4
|
import { Slot as x } from "../primitives/slot.js";
|
|
5
|
-
import { c } from "../twUtils
|
|
5
|
+
import { cn as c } from "../utils/twUtils.js";
|
|
6
6
|
import { createContext as h, useContext as w } from "react";
|
|
7
7
|
const g = h(null), R = ({
|
|
8
8
|
value: e,
|
package/dist/RadioButtonGroup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./styles/main.css";
|
|
2
2
|
import { jsx as e } from "react/jsx-runtime";
|
|
3
3
|
import { RadioButtonGroupItem as n, RadioButtonGroupBase as u } from "./RadioButtonGroup/RadioButtonGroupBase.js";
|
|
4
|
-
import {
|
|
4
|
+
import { cn as m } from "./utils/twUtils.js";
|
|
5
5
|
import "react";
|
|
6
6
|
const s = ({ className: t, children: o, ...r }) => /* @__PURE__ */ e(
|
|
7
7
|
u,
|
package/dist/RadioGroup.d.ts
CHANGED
|
@@ -31,6 +31,6 @@ declare const RadioGroup: import('react').ForwardRefExoticComponent<Omit<Omit<Ra
|
|
|
31
31
|
itemClassName?: string;
|
|
32
32
|
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
33
33
|
declare const RadioGroupItem: import('react').ForwardRefExoticComponent<RadioGroupItemProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
34
|
-
declare const RadioGroupLabel: import('react').ForwardRefExoticComponent<Omit<Omit<import('
|
|
34
|
+
declare const RadioGroupLabel: import('react').ForwardRefExoticComponent<Omit<Omit<import('react').DetailedHTMLProps<import('react').LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref"> & import('react').RefAttributes<HTMLLabelElement>, "ref"> & import('react').RefAttributes<HTMLLabelElement>>;
|
|
35
35
|
export { RadioGroup, RadioGroupItem, RadioGroupLabel };
|
|
36
36
|
//# sourceMappingURL=RadioGroup.d.ts.map
|