@spear-ai/spectral 1.3.62 → 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.js +1 -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.js +1 -1
- package/dist/Checkbox.js +11 -12
- 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/MessagesIcon.d.ts +3 -0
- package/dist/Icons/MessagesIcon.js +31 -0
- 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/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.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/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/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,13 +0,0 @@
|
|
|
1
|
-
import { VariantProps } from 'class-variance-authority';
|
|
2
|
-
import { ComponentProps } from 'react';
|
|
3
|
-
export type BadgeProps = ComponentProps<'span'> & VariantProps<typeof badgeVariants> & {
|
|
4
|
-
asChild?: boolean;
|
|
5
|
-
};
|
|
6
|
-
declare const badgeVariants: (props?: ({
|
|
7
|
-
variant?: "default" | "secondary" | "destructive" | "outline" | null | undefined;
|
|
8
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
|
-
declare function BadgeBase({ className, variant, asChild, ...props }: ComponentProps<'span'> & VariantProps<typeof badgeVariants> & {
|
|
10
|
-
asChild?: boolean;
|
|
11
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export { BadgeBase, badgeVariants };
|
|
13
|
-
//# sourceMappingURL=BadgeBase.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BadgeBase.d.ts","sourceRoot":"","sources":["../../../src/components/Badge/BadgeBase.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAE3C,MAAM,MAAM,UAAU,GAAG,cAAc,CAAC,MAAM,CAAC,GAAG,YAAY,CAAC,OAAO,aAAa,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAA;AAE5G,QAAA,MAAM,aAAa;;8EAmBlB,CAAA;AAED,iBAAS,SAAS,CAAC,EACjB,SAAS,EACT,OAAO,EACP,OAAe,EACf,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,MAAM,CAAC,GAAG,YAAY,CAAC,OAAO,aAAa,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,2CAIrF;AAED,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,CAAA"}
|
package/dist/index-CA7haECj.js
DELETED
|
@@ -1,248 +0,0 @@
|
|
|
1
|
-
import "./styles/main.css";
|
|
2
|
-
import * as r from "react";
|
|
3
|
-
import { jsx as p, Fragment as x } from "react/jsx-runtime";
|
|
4
|
-
import * as R from "react-dom";
|
|
5
|
-
function A(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
6
|
-
return function(o) {
|
|
7
|
-
if (e?.(o), n === !1 || !o.defaultPrevented)
|
|
8
|
-
return t?.(o);
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
function S(e, t) {
|
|
12
|
-
if (typeof e == "function")
|
|
13
|
-
return e(t);
|
|
14
|
-
e != null && (e.current = t);
|
|
15
|
-
}
|
|
16
|
-
function h(...e) {
|
|
17
|
-
return (t) => {
|
|
18
|
-
let n = !1;
|
|
19
|
-
const s = e.map((o) => {
|
|
20
|
-
const c = S(o, t);
|
|
21
|
-
return !n && typeof c == "function" && (n = !0), c;
|
|
22
|
-
});
|
|
23
|
-
if (n)
|
|
24
|
-
return () => {
|
|
25
|
-
for (let o = 0; o < s.length; o++) {
|
|
26
|
-
const c = s[o];
|
|
27
|
-
typeof c == "function" ? c() : S(e[o], null);
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
function F(...e) {
|
|
33
|
-
return r.useCallback(h(...e), e);
|
|
34
|
-
}
|
|
35
|
-
function H(e, t) {
|
|
36
|
-
const n = r.createContext(t), s = (c) => {
|
|
37
|
-
const { children: u, ...i } = c, l = r.useMemo(() => i, Object.values(i));
|
|
38
|
-
return /* @__PURE__ */ p(n.Provider, { value: l, children: u });
|
|
39
|
-
};
|
|
40
|
-
s.displayName = e + "Provider";
|
|
41
|
-
function o(c) {
|
|
42
|
-
const u = r.useContext(n);
|
|
43
|
-
if (u) return u;
|
|
44
|
-
if (t !== void 0) return t;
|
|
45
|
-
throw new Error(`\`${c}\` must be used within \`${e}\``);
|
|
46
|
-
}
|
|
47
|
-
return [s, o];
|
|
48
|
-
}
|
|
49
|
-
function L(e, t = []) {
|
|
50
|
-
let n = [];
|
|
51
|
-
function s(c, u) {
|
|
52
|
-
const i = r.createContext(u), l = n.length;
|
|
53
|
-
n = [...n, u];
|
|
54
|
-
const f = (a) => {
|
|
55
|
-
const { scope: v, children: C, ...m } = a, b = v?.[e]?.[l] || i, g = r.useMemo(() => m, Object.values(m));
|
|
56
|
-
return /* @__PURE__ */ p(b.Provider, { value: g, children: C });
|
|
57
|
-
};
|
|
58
|
-
f.displayName = c + "Provider";
|
|
59
|
-
function d(a, v) {
|
|
60
|
-
const C = v?.[e]?.[l] || i, m = r.useContext(C);
|
|
61
|
-
if (m) return m;
|
|
62
|
-
if (u !== void 0) return u;
|
|
63
|
-
throw new Error(`\`${a}\` must be used within \`${c}\``);
|
|
64
|
-
}
|
|
65
|
-
return [f, d];
|
|
66
|
-
}
|
|
67
|
-
const o = () => {
|
|
68
|
-
const c = n.map((u) => r.createContext(u));
|
|
69
|
-
return function(i) {
|
|
70
|
-
const l = i?.[e] || c;
|
|
71
|
-
return r.useMemo(
|
|
72
|
-
() => ({ [`__scope${e}`]: { ...i, [e]: l } }),
|
|
73
|
-
[i, l]
|
|
74
|
-
);
|
|
75
|
-
};
|
|
76
|
-
};
|
|
77
|
-
return o.scopeName = e, [s, P(o, ...t)];
|
|
78
|
-
}
|
|
79
|
-
function P(...e) {
|
|
80
|
-
const t = e[0];
|
|
81
|
-
if (e.length === 1) return t;
|
|
82
|
-
const n = () => {
|
|
83
|
-
const s = e.map((o) => ({
|
|
84
|
-
useScope: o(),
|
|
85
|
-
scopeName: o.scopeName
|
|
86
|
-
}));
|
|
87
|
-
return function(c) {
|
|
88
|
-
const u = s.reduce((i, { useScope: l, scopeName: f }) => {
|
|
89
|
-
const a = l(c)[`__scope${f}`];
|
|
90
|
-
return { ...i, ...a };
|
|
91
|
-
}, {});
|
|
92
|
-
return r.useMemo(() => ({ [`__scope${t.scopeName}`]: u }), [u]);
|
|
93
|
-
};
|
|
94
|
-
};
|
|
95
|
-
return n.scopeName = t.scopeName, n;
|
|
96
|
-
}
|
|
97
|
-
var y = globalThis?.document ? r.useLayoutEffect : () => {
|
|
98
|
-
}, w = r[" useId ".trim().toString()] || (() => {
|
|
99
|
-
}), $ = 0;
|
|
100
|
-
function T(e) {
|
|
101
|
-
const [t, n] = r.useState(w());
|
|
102
|
-
return y(() => {
|
|
103
|
-
n((s) => s ?? String($++));
|
|
104
|
-
}, [e]), t ? `radix-${t}` : "";
|
|
105
|
-
}
|
|
106
|
-
var _ = r[" useInsertionEffect ".trim().toString()] || y;
|
|
107
|
-
function B({
|
|
108
|
-
prop: e,
|
|
109
|
-
defaultProp: t,
|
|
110
|
-
onChange: n = () => {
|
|
111
|
-
},
|
|
112
|
-
caller: s
|
|
113
|
-
}) {
|
|
114
|
-
const [o, c, u] = I({
|
|
115
|
-
defaultProp: t,
|
|
116
|
-
onChange: n
|
|
117
|
-
}), i = e !== void 0, l = i ? e : o;
|
|
118
|
-
{
|
|
119
|
-
const d = r.useRef(e !== void 0);
|
|
120
|
-
r.useEffect(() => {
|
|
121
|
-
const a = d.current;
|
|
122
|
-
a !== i && console.warn(
|
|
123
|
-
`${s} is changing from ${a ? "controlled" : "uncontrolled"} to ${i ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
|
|
124
|
-
), d.current = i;
|
|
125
|
-
}, [i, s]);
|
|
126
|
-
}
|
|
127
|
-
const f = r.useCallback(
|
|
128
|
-
(d) => {
|
|
129
|
-
if (i) {
|
|
130
|
-
const a = N(d) ? d(e) : d;
|
|
131
|
-
a !== e && u.current?.(a);
|
|
132
|
-
} else
|
|
133
|
-
c(d);
|
|
134
|
-
},
|
|
135
|
-
[i, e, c, u]
|
|
136
|
-
);
|
|
137
|
-
return [l, f];
|
|
138
|
-
}
|
|
139
|
-
function I({
|
|
140
|
-
defaultProp: e,
|
|
141
|
-
onChange: t
|
|
142
|
-
}) {
|
|
143
|
-
const [n, s] = r.useState(e), o = r.useRef(n), c = r.useRef(t);
|
|
144
|
-
return _(() => {
|
|
145
|
-
c.current = t;
|
|
146
|
-
}, [t]), r.useEffect(() => {
|
|
147
|
-
o.current !== n && (c.current?.(n), o.current = n);
|
|
148
|
-
}, [n, o]), [n, s, c];
|
|
149
|
-
}
|
|
150
|
-
function N(e) {
|
|
151
|
-
return typeof e == "function";
|
|
152
|
-
}
|
|
153
|
-
// @__NO_SIDE_EFFECTS__
|
|
154
|
-
function O(e) {
|
|
155
|
-
const t = /* @__PURE__ */ j(e), n = r.forwardRef((s, o) => {
|
|
156
|
-
const { children: c, ...u } = s, i = r.Children.toArray(c), l = i.find(D);
|
|
157
|
-
if (l) {
|
|
158
|
-
const f = l.props.children, d = i.map((a) => a === l ? r.Children.count(f) > 1 ? r.Children.only(null) : r.isValidElement(f) ? f.props.children : null : a);
|
|
159
|
-
return /* @__PURE__ */ p(t, { ...u, ref: o, children: r.isValidElement(f) ? r.cloneElement(f, void 0, d) : null });
|
|
160
|
-
}
|
|
161
|
-
return /* @__PURE__ */ p(t, { ...u, ref: o, children: c });
|
|
162
|
-
});
|
|
163
|
-
return n.displayName = `${e}.Slot`, n;
|
|
164
|
-
}
|
|
165
|
-
// @__NO_SIDE_EFFECTS__
|
|
166
|
-
function j(e) {
|
|
167
|
-
const t = r.forwardRef((n, s) => {
|
|
168
|
-
const { children: o, ...c } = n;
|
|
169
|
-
if (r.isValidElement(o)) {
|
|
170
|
-
const u = V(o), i = M(c, o.props);
|
|
171
|
-
return o.type !== r.Fragment && (i.ref = s ? h(s, u) : u), r.cloneElement(o, i);
|
|
172
|
-
}
|
|
173
|
-
return r.Children.count(o) > 1 ? r.Children.only(null) : null;
|
|
174
|
-
});
|
|
175
|
-
return t.displayName = `${e}.SlotClone`, t;
|
|
176
|
-
}
|
|
177
|
-
var E = Symbol("radix.slottable");
|
|
178
|
-
// @__NO_SIDE_EFFECTS__
|
|
179
|
-
function U(e) {
|
|
180
|
-
const t = ({ children: n }) => /* @__PURE__ */ p(x, { children: n });
|
|
181
|
-
return t.displayName = `${e}.Slottable`, t.__radixId = E, t;
|
|
182
|
-
}
|
|
183
|
-
function D(e) {
|
|
184
|
-
return r.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === E;
|
|
185
|
-
}
|
|
186
|
-
function M(e, t) {
|
|
187
|
-
const n = { ...t };
|
|
188
|
-
for (const s in t) {
|
|
189
|
-
const o = e[s], c = t[s];
|
|
190
|
-
/^on[A-Z]/.test(s) ? o && c ? n[s] = (...i) => {
|
|
191
|
-
const l = c(...i);
|
|
192
|
-
return o(...i), l;
|
|
193
|
-
} : o && (n[s] = o) : s === "style" ? n[s] = { ...o, ...c } : s === "className" && (n[s] = [o, c].filter(Boolean).join(" "));
|
|
194
|
-
}
|
|
195
|
-
return { ...e, ...n };
|
|
196
|
-
}
|
|
197
|
-
function V(e) {
|
|
198
|
-
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
199
|
-
return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
200
|
-
}
|
|
201
|
-
var W = [
|
|
202
|
-
"a",
|
|
203
|
-
"button",
|
|
204
|
-
"div",
|
|
205
|
-
"form",
|
|
206
|
-
"h2",
|
|
207
|
-
"h3",
|
|
208
|
-
"img",
|
|
209
|
-
"input",
|
|
210
|
-
"label",
|
|
211
|
-
"li",
|
|
212
|
-
"nav",
|
|
213
|
-
"ol",
|
|
214
|
-
"p",
|
|
215
|
-
"select",
|
|
216
|
-
"span",
|
|
217
|
-
"svg",
|
|
218
|
-
"ul"
|
|
219
|
-
], Z = W.reduce((e, t) => {
|
|
220
|
-
const n = /* @__PURE__ */ O(`Primitive.${t}`), s = r.forwardRef((o, c) => {
|
|
221
|
-
const { asChild: u, ...i } = o, l = u ? n : t;
|
|
222
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ p(l, { ...i, ref: c });
|
|
223
|
-
});
|
|
224
|
-
return s.displayName = `Primitive.${t}`, { ...e, [t]: s };
|
|
225
|
-
}, {});
|
|
226
|
-
function q(e, t) {
|
|
227
|
-
e && R.flushSync(() => e.dispatchEvent(t));
|
|
228
|
-
}
|
|
229
|
-
function z(e) {
|
|
230
|
-
const t = r.useRef(e);
|
|
231
|
-
return r.useEffect(() => {
|
|
232
|
-
t.current = e;
|
|
233
|
-
}), r.useMemo(() => (...n) => t.current?.(...n), []);
|
|
234
|
-
}
|
|
235
|
-
export {
|
|
236
|
-
Z as P,
|
|
237
|
-
F as a,
|
|
238
|
-
T as b,
|
|
239
|
-
L as c,
|
|
240
|
-
B as d,
|
|
241
|
-
A as e,
|
|
242
|
-
U as f,
|
|
243
|
-
O as g,
|
|
244
|
-
z as h,
|
|
245
|
-
q as i,
|
|
246
|
-
H as j,
|
|
247
|
-
y as u
|
|
248
|
-
};
|
package/dist/index-CbXx14YO.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import "./styles/main.css";
|
|
2
|
-
import * as a from "react";
|
|
3
|
-
import s from "react";
|
|
4
|
-
import { c as D, a as S, g as v } from "./index-CA7haECj.js";
|
|
5
|
-
import { jsx as p } from "react/jsx-runtime";
|
|
6
|
-
function h(e) {
|
|
7
|
-
const t = e + "CollectionProvider", [A, N] = D(t), [_, f] = A(
|
|
8
|
-
t,
|
|
9
|
-
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
10
|
-
), C = (n) => {
|
|
11
|
-
const { scope: o, children: i } = n, r = s.useRef(null), c = s.useRef(/* @__PURE__ */ new Map()).current;
|
|
12
|
-
return /* @__PURE__ */ p(_, { scope: o, itemMap: c, collectionRef: r, children: i });
|
|
13
|
-
};
|
|
14
|
-
C.displayName = t;
|
|
15
|
-
const m = e + "CollectionSlot", E = v(m), R = s.forwardRef(
|
|
16
|
-
(n, o) => {
|
|
17
|
-
const { scope: i, children: r } = n, c = f(m, i), l = S(o, c.collectionRef);
|
|
18
|
-
return /* @__PURE__ */ p(E, { ref: l, children: r });
|
|
19
|
-
}
|
|
20
|
-
);
|
|
21
|
-
R.displayName = m;
|
|
22
|
-
const d = e + "CollectionItemSlot", I = "data-radix-collection-item", T = v(d), x = s.forwardRef(
|
|
23
|
-
(n, o) => {
|
|
24
|
-
const { scope: i, children: r, ...c } = n, l = s.useRef(null), M = S(o, l), u = f(d, i);
|
|
25
|
-
return s.useEffect(() => (u.itemMap.set(l, { ref: l, ...c }), () => void u.itemMap.delete(l))), /* @__PURE__ */ p(T, { [I]: "", ref: M, children: r });
|
|
26
|
-
}
|
|
27
|
-
);
|
|
28
|
-
x.displayName = d;
|
|
29
|
-
function O(n) {
|
|
30
|
-
const o = f(e + "CollectionConsumer", n);
|
|
31
|
-
return s.useCallback(() => {
|
|
32
|
-
const r = o.collectionRef.current;
|
|
33
|
-
if (!r) return [];
|
|
34
|
-
const c = Array.from(r.querySelectorAll(`[${I}]`));
|
|
35
|
-
return Array.from(o.itemMap.values()).sort(
|
|
36
|
-
(u, y) => c.indexOf(u.ref.current) - c.indexOf(y.ref.current)
|
|
37
|
-
);
|
|
38
|
-
}, [o.collectionRef, o.itemMap]);
|
|
39
|
-
}
|
|
40
|
-
return [
|
|
41
|
-
{ Provider: C, Slot: R, ItemSlot: x },
|
|
42
|
-
O,
|
|
43
|
-
N
|
|
44
|
-
];
|
|
45
|
-
}
|
|
46
|
-
var P = a.createContext(void 0);
|
|
47
|
-
function b(e) {
|
|
48
|
-
const t = a.useContext(P);
|
|
49
|
-
return e || t || "ltr";
|
|
50
|
-
}
|
|
51
|
-
function j(e) {
|
|
52
|
-
const t = a.useRef({ value: e, previous: e });
|
|
53
|
-
return a.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
|
|
54
|
-
}
|
|
55
|
-
export {
|
|
56
|
-
j as a,
|
|
57
|
-
h as c,
|
|
58
|
-
b as u
|
|
59
|
-
};
|
package/dist/index-VXXKXen4.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import "./styles/main.css";
|
|
2
|
-
import * as o from "react";
|
|
3
|
-
import m from "react-dom";
|
|
4
|
-
import { u as c, P as f } from "./index-CA7haECj.js";
|
|
5
|
-
import { jsx as l } from "react/jsx-runtime";
|
|
6
|
-
var u = "Portal", p = o.forwardRef((r, a) => {
|
|
7
|
-
const { container: e, ...s } = r, [n, i] = o.useState(!1);
|
|
8
|
-
c(() => i(!0), []);
|
|
9
|
-
const t = e || n && globalThis?.document?.body;
|
|
10
|
-
return t ? m.createPortal(/* @__PURE__ */ l(f.div, { ...s, ref: a }), t) : null;
|
|
11
|
-
});
|
|
12
|
-
p.displayName = u;
|
|
13
|
-
export {
|
|
14
|
-
p as P
|
|
15
|
-
};
|
package/dist/index-cCg4yNa8.js
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
import "./styles/main.css";
|
|
2
|
-
import * as i from "react";
|
|
3
|
-
import { h as b, a as g, P as R, e as h, i as _ } from "./index-CA7haECj.js";
|
|
4
|
-
import { jsx as T } from "react/jsx-runtime";
|
|
5
|
-
function U(n, e = globalThis?.document) {
|
|
6
|
-
const t = b(n);
|
|
7
|
-
i.useEffect(() => {
|
|
8
|
-
const o = (s) => {
|
|
9
|
-
s.key === "Escape" && t(s);
|
|
10
|
-
};
|
|
11
|
-
return e.addEventListener("keydown", o, { capture: !0 }), () => e.removeEventListener("keydown", o, { capture: !0 });
|
|
12
|
-
}, [t, e]);
|
|
13
|
-
}
|
|
14
|
-
var z = "DismissableLayer", p = "dismissableLayer.update", H = "dismissableLayer.pointerDownOutside", K = "dismissableLayer.focusOutside", C, B = i.createContext({
|
|
15
|
-
layers: /* @__PURE__ */ new Set(),
|
|
16
|
-
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
17
|
-
branches: /* @__PURE__ */ new Set()
|
|
18
|
-
}), M = i.forwardRef(
|
|
19
|
-
(n, e) => {
|
|
20
|
-
const {
|
|
21
|
-
disableOutsidePointerEvents: t = !1,
|
|
22
|
-
onEscapeKeyDown: o,
|
|
23
|
-
onPointerDownOutside: s,
|
|
24
|
-
onFocusOutside: c,
|
|
25
|
-
onInteractOutside: f,
|
|
26
|
-
onDismiss: d,
|
|
27
|
-
...E
|
|
28
|
-
} = n, a = i.useContext(B), [u, F] = i.useState(null), l = u?.ownerDocument ?? globalThis?.document, [, I] = i.useState({}), S = g(e, (r) => F(r)), m = Array.from(a.layers), [W] = [...a.layersWithOutsidePointerEventsDisabled].slice(-1), k = m.indexOf(W), D = u ? m.indexOf(u) : -1, A = a.layersWithOutsidePointerEventsDisabled.size > 0, P = D >= k, N = Y((r) => {
|
|
29
|
-
const v = r.target, L = [...a.branches].some((y) => y.contains(v));
|
|
30
|
-
!P || L || (s?.(r), f?.(r), r.defaultPrevented || d?.());
|
|
31
|
-
}, l), O = q((r) => {
|
|
32
|
-
const v = r.target;
|
|
33
|
-
[...a.branches].some((y) => y.contains(v)) || (c?.(r), f?.(r), r.defaultPrevented || d?.());
|
|
34
|
-
}, l);
|
|
35
|
-
return U((r) => {
|
|
36
|
-
D === a.layers.size - 1 && (o?.(r), !r.defaultPrevented && d && (r.preventDefault(), d()));
|
|
37
|
-
}, l), i.useEffect(() => {
|
|
38
|
-
if (u)
|
|
39
|
-
return t && (a.layersWithOutsidePointerEventsDisabled.size === 0 && (C = l.body.style.pointerEvents, l.body.style.pointerEvents = "none"), a.layersWithOutsidePointerEventsDisabled.add(u)), a.layers.add(u), w(), () => {
|
|
40
|
-
t && a.layersWithOutsidePointerEventsDisabled.size === 1 && (l.body.style.pointerEvents = C);
|
|
41
|
-
};
|
|
42
|
-
}, [u, l, t, a]), i.useEffect(() => () => {
|
|
43
|
-
u && (a.layers.delete(u), a.layersWithOutsidePointerEventsDisabled.delete(u), w());
|
|
44
|
-
}, [u, a]), i.useEffect(() => {
|
|
45
|
-
const r = () => I({});
|
|
46
|
-
return document.addEventListener(p, r), () => document.removeEventListener(p, r);
|
|
47
|
-
}, []), /* @__PURE__ */ T(
|
|
48
|
-
R.div,
|
|
49
|
-
{
|
|
50
|
-
...E,
|
|
51
|
-
ref: S,
|
|
52
|
-
style: {
|
|
53
|
-
pointerEvents: A ? P ? "auto" : "none" : void 0,
|
|
54
|
-
...n.style
|
|
55
|
-
},
|
|
56
|
-
onFocusCapture: h(n.onFocusCapture, O.onFocusCapture),
|
|
57
|
-
onBlurCapture: h(n.onBlurCapture, O.onBlurCapture),
|
|
58
|
-
onPointerDownCapture: h(
|
|
59
|
-
n.onPointerDownCapture,
|
|
60
|
-
N.onPointerDownCapture
|
|
61
|
-
)
|
|
62
|
-
}
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
);
|
|
66
|
-
M.displayName = z;
|
|
67
|
-
var j = "DismissableLayerBranch", X = i.forwardRef((n, e) => {
|
|
68
|
-
const t = i.useContext(B), o = i.useRef(null), s = g(e, o);
|
|
69
|
-
return i.useEffect(() => {
|
|
70
|
-
const c = o.current;
|
|
71
|
-
if (c)
|
|
72
|
-
return t.branches.add(c), () => {
|
|
73
|
-
t.branches.delete(c);
|
|
74
|
-
};
|
|
75
|
-
}, [t.branches]), /* @__PURE__ */ T(R.div, { ...n, ref: s });
|
|
76
|
-
});
|
|
77
|
-
X.displayName = j;
|
|
78
|
-
function Y(n, e = globalThis?.document) {
|
|
79
|
-
const t = b(n), o = i.useRef(!1), s = i.useRef(() => {
|
|
80
|
-
});
|
|
81
|
-
return i.useEffect(() => {
|
|
82
|
-
const c = (d) => {
|
|
83
|
-
if (d.target && !o.current) {
|
|
84
|
-
let E = function() {
|
|
85
|
-
x(
|
|
86
|
-
H,
|
|
87
|
-
t,
|
|
88
|
-
a,
|
|
89
|
-
{ discrete: !0 }
|
|
90
|
-
);
|
|
91
|
-
};
|
|
92
|
-
const a = { originalEvent: d };
|
|
93
|
-
d.pointerType === "touch" ? (e.removeEventListener("click", s.current), s.current = E, e.addEventListener("click", s.current, { once: !0 })) : E();
|
|
94
|
-
} else
|
|
95
|
-
e.removeEventListener("click", s.current);
|
|
96
|
-
o.current = !1;
|
|
97
|
-
}, f = window.setTimeout(() => {
|
|
98
|
-
e.addEventListener("pointerdown", c);
|
|
99
|
-
}, 0);
|
|
100
|
-
return () => {
|
|
101
|
-
window.clearTimeout(f), e.removeEventListener("pointerdown", c), e.removeEventListener("click", s.current);
|
|
102
|
-
};
|
|
103
|
-
}, [e, t]), {
|
|
104
|
-
// ensures we check React component tree (not just DOM tree)
|
|
105
|
-
onPointerDownCapture: () => o.current = !0
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
function q(n, e = globalThis?.document) {
|
|
109
|
-
const t = b(n), o = i.useRef(!1);
|
|
110
|
-
return i.useEffect(() => {
|
|
111
|
-
const s = (c) => {
|
|
112
|
-
c.target && !o.current && x(K, t, { originalEvent: c }, {
|
|
113
|
-
discrete: !1
|
|
114
|
-
});
|
|
115
|
-
};
|
|
116
|
-
return e.addEventListener("focusin", s), () => e.removeEventListener("focusin", s);
|
|
117
|
-
}, [e, t]), {
|
|
118
|
-
onFocusCapture: () => o.current = !0,
|
|
119
|
-
onBlurCapture: () => o.current = !1
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
function w() {
|
|
123
|
-
const n = new CustomEvent(p);
|
|
124
|
-
document.dispatchEvent(n);
|
|
125
|
-
}
|
|
126
|
-
function x(n, e, t, { discrete: o }) {
|
|
127
|
-
const s = t.originalEvent.target, c = new CustomEvent(n, { bubbles: !1, cancelable: !0, detail: t });
|
|
128
|
-
e && s.addEventListener(n, e, { once: !0 }), o ? _(s, c) : s.dispatchEvent(c);
|
|
129
|
-
}
|
|
130
|
-
export {
|
|
131
|
-
M as D
|
|
132
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { AsChildProp } from './slot';
|
|
2
|
-
import { LabelHTMLAttributes } from 'react';
|
|
3
|
-
export type LabelProps = LabelHTMLAttributes<HTMLLabelElement> & AsChildProp;
|
|
4
|
-
export declare const Label: import('react').ForwardRefExoticComponent<LabelHTMLAttributes<HTMLLabelElement> & AsChildProp & import('react').RefAttributes<HTMLLabelElement>>;
|
|
5
|
-
//# sourceMappingURL=label.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../src/primitives/label.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,WAAW,EAAE,MAAM,QAAQ,CAAA;AAC/C,OAAO,EAAqB,KAAK,mBAAmB,EAAY,MAAM,OAAO,CAAA;AAM7E,MAAM,MAAM,UAAU,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,GAAG,WAAW,CAAA;AAE5E,eAAO,MAAM,KAAK,kJAkBhB,CAAA"}
|
package/dist/primitives/label.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as n } from "react/jsx-runtime";
|
|
3
|
-
import { Slot as s } from "./slot.js";
|
|
4
|
-
import { forwardRef as f, useId as i } from "react";
|
|
5
|
-
function m(...e) {
|
|
6
|
-
return e.filter(Boolean).join(" ");
|
|
7
|
-
}
|
|
8
|
-
const c = f(({ asChild: e, className: o, id: r, ...t }, d) => {
|
|
9
|
-
const a = i(), l = r ?? `lbl-${a}`;
|
|
10
|
-
return /* @__PURE__ */ n(
|
|
11
|
-
e ? s : "label",
|
|
12
|
-
{
|
|
13
|
-
id: l,
|
|
14
|
-
ref: d,
|
|
15
|
-
className: m(
|
|
16
|
-
"text-sm leading-none font-medium",
|
|
17
|
-
"peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
18
|
-
o
|
|
19
|
-
),
|
|
20
|
-
...t
|
|
21
|
-
}
|
|
22
|
-
);
|
|
23
|
-
});
|
|
24
|
-
c.displayName = "Label";
|
|
25
|
-
export {
|
|
26
|
-
c as Label
|
|
27
|
-
};
|