@remotion/design 4.0.451 → 4.0.452
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/Button.d.ts +9 -1
- package/dist/Button.js +18 -11
- package/dist/esm/index.mjs +716 -581
- package/package.json +9 -8
package/dist/esm/index.mjs
CHANGED
|
@@ -1,5 +1,153 @@
|
|
|
1
|
+
// ../../node_modules/.bun/@radix-ui+react-slot@1.2.4+09a4a3ac15cb54ba/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
2
|
+
import * as React2 from "react";
|
|
3
|
+
|
|
4
|
+
// ../../node_modules/.bun/@radix-ui+react-compose-refs@1.1.2+09a4a3ac15cb54ba/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
function setRef(ref, value) {
|
|
7
|
+
if (typeof ref === "function") {
|
|
8
|
+
return ref(value);
|
|
9
|
+
} else if (ref !== null && ref !== undefined) {
|
|
10
|
+
ref.current = value;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
function composeRefs(...refs) {
|
|
14
|
+
return (node) => {
|
|
15
|
+
let hasCleanup = false;
|
|
16
|
+
const cleanups = refs.map((ref) => {
|
|
17
|
+
const cleanup = setRef(ref, node);
|
|
18
|
+
if (!hasCleanup && typeof cleanup == "function") {
|
|
19
|
+
hasCleanup = true;
|
|
20
|
+
}
|
|
21
|
+
return cleanup;
|
|
22
|
+
});
|
|
23
|
+
if (hasCleanup) {
|
|
24
|
+
return () => {
|
|
25
|
+
for (let i = 0;i < cleanups.length; i++) {
|
|
26
|
+
const cleanup = cleanups[i];
|
|
27
|
+
if (typeof cleanup == "function") {
|
|
28
|
+
cleanup();
|
|
29
|
+
} else {
|
|
30
|
+
setRef(refs[i], null);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
function useComposedRefs(...refs) {
|
|
38
|
+
return React.useCallback(composeRefs(...refs), refs);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// ../../node_modules/.bun/@radix-ui+react-slot@1.2.4+09a4a3ac15cb54ba/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
42
|
+
import { Fragment as Fragment2, jsx } from "react/jsx-runtime";
|
|
43
|
+
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
44
|
+
var use = React2[" use ".trim().toString()];
|
|
45
|
+
function isPromiseLike(value) {
|
|
46
|
+
return typeof value === "object" && value !== null && "then" in value;
|
|
47
|
+
}
|
|
48
|
+
function isLazyComponent(element) {
|
|
49
|
+
return element != null && typeof element === "object" && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload);
|
|
50
|
+
}
|
|
51
|
+
function createSlot(ownerName) {
|
|
52
|
+
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
53
|
+
const Slot2 = React2.forwardRef((props, forwardedRef) => {
|
|
54
|
+
let { children, ...slotProps } = props;
|
|
55
|
+
if (isLazyComponent(children) && typeof use === "function") {
|
|
56
|
+
children = use(children._payload);
|
|
57
|
+
}
|
|
58
|
+
const childrenArray = React2.Children.toArray(children);
|
|
59
|
+
const slottable = childrenArray.find(isSlottable);
|
|
60
|
+
if (slottable) {
|
|
61
|
+
const newElement = slottable.props.children;
|
|
62
|
+
const newChildren = childrenArray.map((child) => {
|
|
63
|
+
if (child === slottable) {
|
|
64
|
+
if (React2.Children.count(newElement) > 1)
|
|
65
|
+
return React2.Children.only(null);
|
|
66
|
+
return React2.isValidElement(newElement) ? newElement.props.children : null;
|
|
67
|
+
} else {
|
|
68
|
+
return child;
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React2.isValidElement(newElement) ? React2.cloneElement(newElement, undefined, newChildren) : null });
|
|
72
|
+
}
|
|
73
|
+
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
74
|
+
});
|
|
75
|
+
Slot2.displayName = `${ownerName}.Slot`;
|
|
76
|
+
return Slot2;
|
|
77
|
+
}
|
|
78
|
+
var Slot = /* @__PURE__ */ createSlot("Slot");
|
|
79
|
+
function createSlotClone(ownerName) {
|
|
80
|
+
const SlotClone = React2.forwardRef((props, forwardedRef) => {
|
|
81
|
+
let { children, ...slotProps } = props;
|
|
82
|
+
if (isLazyComponent(children) && typeof use === "function") {
|
|
83
|
+
children = use(children._payload);
|
|
84
|
+
}
|
|
85
|
+
if (React2.isValidElement(children)) {
|
|
86
|
+
const childrenRef = getElementRef(children);
|
|
87
|
+
const props2 = mergeProps(slotProps, children.props);
|
|
88
|
+
if (children.type !== React2.Fragment) {
|
|
89
|
+
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
90
|
+
}
|
|
91
|
+
return React2.cloneElement(children, props2);
|
|
92
|
+
}
|
|
93
|
+
return React2.Children.count(children) > 1 ? React2.Children.only(null) : null;
|
|
94
|
+
});
|
|
95
|
+
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
96
|
+
return SlotClone;
|
|
97
|
+
}
|
|
98
|
+
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
99
|
+
function createSlottable(ownerName) {
|
|
100
|
+
const Slottable2 = ({ children }) => {
|
|
101
|
+
return /* @__PURE__ */ jsx(Fragment2, { children });
|
|
102
|
+
};
|
|
103
|
+
Slottable2.displayName = `${ownerName}.Slottable`;
|
|
104
|
+
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
|
105
|
+
return Slottable2;
|
|
106
|
+
}
|
|
107
|
+
var Slottable = /* @__PURE__ */ createSlottable("Slottable");
|
|
108
|
+
function isSlottable(child) {
|
|
109
|
+
return React2.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
110
|
+
}
|
|
111
|
+
function mergeProps(slotProps, childProps) {
|
|
112
|
+
const overrideProps = { ...childProps };
|
|
113
|
+
for (const propName in childProps) {
|
|
114
|
+
const slotPropValue = slotProps[propName];
|
|
115
|
+
const childPropValue = childProps[propName];
|
|
116
|
+
const isHandler = /^on[A-Z]/.test(propName);
|
|
117
|
+
if (isHandler) {
|
|
118
|
+
if (slotPropValue && childPropValue) {
|
|
119
|
+
overrideProps[propName] = (...args) => {
|
|
120
|
+
const result = childPropValue(...args);
|
|
121
|
+
slotPropValue(...args);
|
|
122
|
+
return result;
|
|
123
|
+
};
|
|
124
|
+
} else if (slotPropValue) {
|
|
125
|
+
overrideProps[propName] = slotPropValue;
|
|
126
|
+
}
|
|
127
|
+
} else if (propName === "style") {
|
|
128
|
+
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
|
129
|
+
} else if (propName === "className") {
|
|
130
|
+
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
return { ...slotProps, ...overrideProps };
|
|
134
|
+
}
|
|
135
|
+
function getElementRef(element) {
|
|
136
|
+
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
137
|
+
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
138
|
+
if (mayWarn) {
|
|
139
|
+
return element.ref;
|
|
140
|
+
}
|
|
141
|
+
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
|
142
|
+
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
143
|
+
if (mayWarn) {
|
|
144
|
+
return element.props.ref;
|
|
145
|
+
}
|
|
146
|
+
return element.props.ref || element.ref;
|
|
147
|
+
}
|
|
148
|
+
|
|
1
149
|
// src/Button.tsx
|
|
2
|
-
import { useCallback, useRef as useRef2, useState as useState2 } from "react";
|
|
150
|
+
import React5, { useCallback as useCallback2, useRef as useRef2, useState as useState2 } from "react";
|
|
3
151
|
|
|
4
152
|
// src/helpers/cn.ts
|
|
5
153
|
import { clsx } from "clsx";
|
|
@@ -9,7 +157,7 @@ function cn(...inputs) {
|
|
|
9
157
|
}
|
|
10
158
|
|
|
11
159
|
// src/helpers/hover-transforms.ts
|
|
12
|
-
import
|
|
160
|
+
import React3, { useEffect, useMemo, useState } from "react";
|
|
13
161
|
|
|
14
162
|
// src/helpers/get-child-node-from.ts
|
|
15
163
|
var getChildNodeFrom = (htmlElement) => {
|
|
@@ -29,7 +177,7 @@ var getChildNodeFrom = (htmlElement) => {
|
|
|
29
177
|
|
|
30
178
|
// src/helpers/hover-transforms.ts
|
|
31
179
|
var useHoverTransforms = (ref, disabled) => {
|
|
32
|
-
const [state, setState] =
|
|
180
|
+
const [state, setState] = React3.useState({
|
|
33
181
|
progress: 0,
|
|
34
182
|
isActive: false
|
|
35
183
|
});
|
|
@@ -41,7 +189,7 @@ var useHoverTransforms = (ref, disabled) => {
|
|
|
41
189
|
eventTarget.dispatchEvent(new Event("enabled"));
|
|
42
190
|
}
|
|
43
191
|
}, [disabled, eventTarget]);
|
|
44
|
-
|
|
192
|
+
React3.useEffect(() => {
|
|
45
193
|
const element = ref.current;
|
|
46
194
|
if (!element)
|
|
47
195
|
return;
|
|
@@ -116,8 +264,8 @@ var useHoverTransforms = (ref, disabled) => {
|
|
|
116
264
|
return state;
|
|
117
265
|
};
|
|
118
266
|
var useClickTransforms = (ref) => {
|
|
119
|
-
const [hoverProgress, setHoverProgress] =
|
|
120
|
-
|
|
267
|
+
const [hoverProgress, setHoverProgress] = React3.useState(0);
|
|
268
|
+
React3.useEffect(() => {
|
|
121
269
|
const element = getChildNodeFrom(ref.current);
|
|
122
270
|
if (!element) {
|
|
123
271
|
return;
|
|
@@ -221,11 +369,11 @@ import { interpolate } from "remotion";
|
|
|
221
369
|
|
|
222
370
|
// src/helpers/Faces.tsx
|
|
223
371
|
import { threeDIntoSvgPath } from "@remotion/svg-3d-engine";
|
|
224
|
-
import { jsx, Fragment } from "react/jsx-runtime";
|
|
372
|
+
import { jsx as jsx2, Fragment as Fragment3 } from "react/jsx-runtime";
|
|
225
373
|
var Faces = ({ elements, ...svgProps }) => {
|
|
226
|
-
return /* @__PURE__ */
|
|
374
|
+
return /* @__PURE__ */ jsx2(Fragment3, {
|
|
227
375
|
children: elements.map(({ points, color, crispEdges }, idx) => {
|
|
228
|
-
return /* @__PURE__ */
|
|
376
|
+
return /* @__PURE__ */ jsx2("path", {
|
|
229
377
|
d: threeDIntoSvgPath(points),
|
|
230
378
|
fill: color,
|
|
231
379
|
shapeRendering: crispEdges ? "crispEdges" : undefined,
|
|
@@ -236,7 +384,7 @@ var Faces = ({ elements, ...svgProps }) => {
|
|
|
236
384
|
};
|
|
237
385
|
|
|
238
386
|
// src/helpers/Outer.tsx
|
|
239
|
-
import { jsx as
|
|
387
|
+
import { jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
240
388
|
var Outer = ({
|
|
241
389
|
children,
|
|
242
390
|
width,
|
|
@@ -289,7 +437,7 @@ var Outer = ({
|
|
|
289
437
|
className: "relative",
|
|
290
438
|
style: { width, height },
|
|
291
439
|
children: [
|
|
292
|
-
/* @__PURE__ */
|
|
440
|
+
/* @__PURE__ */ jsx3("svg", {
|
|
293
441
|
viewBox,
|
|
294
442
|
style: {
|
|
295
443
|
overflow: "visible",
|
|
@@ -300,11 +448,11 @@ var Outer = ({
|
|
|
300
448
|
left: 0
|
|
301
449
|
},
|
|
302
450
|
pointerEvents: "none",
|
|
303
|
-
children: /* @__PURE__ */
|
|
451
|
+
children: /* @__PURE__ */ jsx3(Faces, {
|
|
304
452
|
elements: inbetween
|
|
305
453
|
})
|
|
306
454
|
}),
|
|
307
|
-
/* @__PURE__ */
|
|
455
|
+
/* @__PURE__ */ jsx3("div", {
|
|
308
456
|
style: {
|
|
309
457
|
transform: makeMatrix3dTransform(frontFace),
|
|
310
458
|
width,
|
|
@@ -318,7 +466,7 @@ var Outer = ({
|
|
|
318
466
|
|
|
319
467
|
// src/Spinner.tsx
|
|
320
468
|
import { useEffect as useEffect2, useMemo as useMemo2, useRef } from "react";
|
|
321
|
-
import { jsx as
|
|
469
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
322
470
|
var viewBox = 100;
|
|
323
471
|
var lines = 8;
|
|
324
472
|
var translated = "M 44 0 L 50 0 a 6 6 0 0 1 6 6 L 56 26 a 6 6 0 0 1 -6 6 L 50 32 a 6 6 0 0 1 -6 -6 L 44 6 a 6 6 0 0 1 6 -6 Z";
|
|
@@ -348,11 +496,11 @@ var Spinner = ({ size, duration }) => {
|
|
|
348
496
|
cancelAnimationFrame(id);
|
|
349
497
|
};
|
|
350
498
|
}, [duration]);
|
|
351
|
-
return /* @__PURE__ */
|
|
499
|
+
return /* @__PURE__ */ jsx4("svg", {
|
|
352
500
|
style,
|
|
353
501
|
viewBox: `0 0 ${viewBox} ${viewBox}`,
|
|
354
502
|
children: new Array(lines).fill(true).map((_, index) => {
|
|
355
|
-
return /* @__PURE__ */
|
|
503
|
+
return /* @__PURE__ */ jsx4("path", {
|
|
356
504
|
ref: (el) => pathsRef.current[index] = el,
|
|
357
505
|
style: {
|
|
358
506
|
rotate: `${index * Math.PI * 2 / lines}rad`,
|
|
@@ -367,8 +515,9 @@ var Spinner = ({ size, duration }) => {
|
|
|
367
515
|
};
|
|
368
516
|
|
|
369
517
|
// src/Button.tsx
|
|
370
|
-
import { jsx as
|
|
518
|
+
import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
371
519
|
var Button = ({
|
|
520
|
+
asChild = false,
|
|
372
521
|
children,
|
|
373
522
|
className,
|
|
374
523
|
disabled,
|
|
@@ -379,7 +528,7 @@ var Button = ({
|
|
|
379
528
|
const [dimensions, setDimensions] = useState2(null);
|
|
380
529
|
const ref = useRef2(null);
|
|
381
530
|
const { isActive, progress } = useHoverTransforms(ref, Boolean(disabled || loading));
|
|
382
|
-
const onPointerEnter =
|
|
531
|
+
const onPointerEnter = useCallback2((e) => {
|
|
383
532
|
if (e.pointerType !== "mouse") {
|
|
384
533
|
return;
|
|
385
534
|
}
|
|
@@ -414,44 +563,67 @@ var Button = ({
|
|
|
414
563
|
});
|
|
415
564
|
}, []);
|
|
416
565
|
const isDisabled = disabled || loading;
|
|
566
|
+
const isAnchor = !asChild && "href" in rest && rest.href !== undefined;
|
|
417
567
|
const sharedClasses = cn("text-text", "inline-flex", "justify-center", "bg-button-bg", "items-center", "font-brand", "border-solid", "text-[1em]", "rounded-lg", "border-black", "border-2", "border-b-4", "cursor-pointer", "px-4", "h-12", "flex-row", "items-center", "relative", "overflow-hidden", isDisabled && "cursor-default opacity-50", className);
|
|
418
|
-
const
|
|
568
|
+
const preventInteraction = useCallback2((e) => {
|
|
569
|
+
e.preventDefault();
|
|
570
|
+
e.stopPropagation();
|
|
571
|
+
}, []);
|
|
572
|
+
const spinnerOverlay = loading ? /* @__PURE__ */ jsx5("div", {
|
|
573
|
+
"data-button-spinner": true,
|
|
574
|
+
className: cn("absolute w-full h-full flex inset-0 items-center justify-center text-inherit bg-inherit"),
|
|
575
|
+
children: /* @__PURE__ */ jsx5(Spinner, {
|
|
576
|
+
size: 20,
|
|
577
|
+
duration: 1
|
|
578
|
+
})
|
|
579
|
+
}) : null;
|
|
580
|
+
const slottableChild = asChild ? React5.cloneElement(children, undefined, /* @__PURE__ */ jsx5("span", {
|
|
581
|
+
className: cn(loading && "invisible", "inline-flex items-center"),
|
|
582
|
+
children: children.props.children
|
|
583
|
+
})) : null;
|
|
584
|
+
const content = asChild ? /* @__PURE__ */ jsxs2(Slot, {
|
|
585
|
+
...rest,
|
|
586
|
+
className: cn("no-underline text-inherit", sharedClasses),
|
|
587
|
+
"aria-disabled": isDisabled || undefined,
|
|
588
|
+
tabIndex: isDisabled ? -1 : undefined,
|
|
589
|
+
onClickCapture: isDisabled ? preventInteraction : undefined,
|
|
419
590
|
children: [
|
|
420
|
-
/* @__PURE__ */
|
|
421
|
-
|
|
422
|
-
children
|
|
591
|
+
/* @__PURE__ */ jsx5(Slottable, {
|
|
592
|
+
children: slottableChild
|
|
423
593
|
}),
|
|
424
|
-
|
|
425
|
-
className: cn("absolute w-full h-full flex inset-0 items-center justify-center text-inherit bg-inherit"),
|
|
426
|
-
children: /* @__PURE__ */ jsx4(Spinner, {
|
|
427
|
-
size: 20,
|
|
428
|
-
duration: 1
|
|
429
|
-
})
|
|
430
|
-
}) : null
|
|
594
|
+
spinnerOverlay
|
|
431
595
|
]
|
|
432
|
-
})
|
|
433
|
-
const isAnchor = "href" in rest && rest.href !== undefined;
|
|
434
|
-
const content = isAnchor ? /* @__PURE__ */ jsx4("a", {
|
|
596
|
+
}) : isAnchor ? /* @__PURE__ */ jsxs2("a", {
|
|
435
597
|
...rest,
|
|
436
598
|
className: cn("no-underline text-inherit", sharedClasses),
|
|
437
599
|
"aria-disabled": isDisabled || undefined,
|
|
438
600
|
tabIndex: isDisabled ? -1 : undefined,
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
601
|
+
onClickCapture: isDisabled ? preventInteraction : undefined,
|
|
602
|
+
children: [
|
|
603
|
+
/* @__PURE__ */ jsx5("div", {
|
|
604
|
+
className: cn(loading && "invisible", "inline-flex items-center"),
|
|
605
|
+
children
|
|
606
|
+
}),
|
|
607
|
+
spinnerOverlay
|
|
608
|
+
]
|
|
609
|
+
}) : /* @__PURE__ */ jsxs2("button", {
|
|
444
610
|
type: "button",
|
|
445
611
|
disabled: isDisabled,
|
|
446
612
|
className: sharedClasses,
|
|
447
613
|
...rest,
|
|
448
|
-
children:
|
|
614
|
+
children: [
|
|
615
|
+
/* @__PURE__ */ jsx5("div", {
|
|
616
|
+
className: cn(loading && "invisible", "inline-flex items-center"),
|
|
617
|
+
children
|
|
618
|
+
}),
|
|
619
|
+
spinnerOverlay
|
|
620
|
+
]
|
|
449
621
|
});
|
|
450
|
-
return /* @__PURE__ */
|
|
622
|
+
return /* @__PURE__ */ jsx5("div", {
|
|
451
623
|
ref,
|
|
452
624
|
className: "contents",
|
|
453
625
|
onPointerEnter,
|
|
454
|
-
children: dimensions && (isActive || progress > 0) ? /* @__PURE__ */
|
|
626
|
+
children: dimensions && (isActive || progress > 0) ? /* @__PURE__ */ jsx5(Outer, {
|
|
455
627
|
parentRef: ref,
|
|
456
628
|
width: dimensions.width,
|
|
457
629
|
height: dimensions.height,
|
|
@@ -463,10 +635,10 @@ var Button = ({
|
|
|
463
635
|
});
|
|
464
636
|
};
|
|
465
637
|
// src/Card.tsx
|
|
466
|
-
import
|
|
467
|
-
import { jsx as
|
|
468
|
-
var Card =
|
|
469
|
-
return /* @__PURE__ */
|
|
638
|
+
import React6 from "react";
|
|
639
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
640
|
+
var Card = React6.forwardRef(({ children, className, ...rest }, ref) => {
|
|
641
|
+
return /* @__PURE__ */ jsx6("div", {
|
|
470
642
|
ref,
|
|
471
643
|
className: cn("rounded-lg border-2 border-black bg-card-bg text-text border-b-4", className),
|
|
472
644
|
...rest,
|
|
@@ -475,23 +647,23 @@ var Card = React4.forwardRef(({ children, className, ...rest }, ref) => {
|
|
|
475
647
|
});
|
|
476
648
|
Card.displayName = "Card";
|
|
477
649
|
// src/CheckIcon.tsx
|
|
478
|
-
import { jsx as
|
|
650
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
479
651
|
var d = "M143.056 81.4934C147.25 77.2994 147.25 70.4506 143.056 66.2566C138.862 62.0627 132.013 62.0627 127.819 66.2566L86.1875 107.888L69.1809 90.8816C64.9869 86.6877 58.1381 86.6877 53.9441 90.8816C49.7502 95.0756 49.7502 101.924 53.9441 106.118L78.5691 130.743C82.7631 134.937 89.6119 134.937 93.8059 130.743L143.056 81.4934Z";
|
|
480
652
|
var CheckIcon = (props) => {
|
|
481
|
-
return /* @__PURE__ */
|
|
653
|
+
return /* @__PURE__ */ jsx7("svg", {
|
|
482
654
|
...props,
|
|
483
655
|
viewBox: "50.79867500000001 63.11117499999997 95.40282500000015 70.77732499999999",
|
|
484
656
|
fill: "none",
|
|
485
657
|
xmlns: "http://www.w3.org/2000/svg",
|
|
486
|
-
children: /* @__PURE__ */
|
|
658
|
+
children: /* @__PURE__ */ jsx7("path", {
|
|
487
659
|
d,
|
|
488
660
|
fill: "currentcolor"
|
|
489
661
|
})
|
|
490
662
|
});
|
|
491
663
|
};
|
|
492
664
|
// src/Counter.tsx
|
|
493
|
-
import { jsx as
|
|
494
|
-
var Triangle = ({ rotated }) => /* @__PURE__ */
|
|
665
|
+
import { jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
666
|
+
var Triangle = ({ rotated }) => /* @__PURE__ */ jsx8("svg", {
|
|
495
667
|
width: "12px",
|
|
496
668
|
height: "7px",
|
|
497
669
|
viewBox: "0 0 12 7",
|
|
@@ -499,7 +671,7 @@ var Triangle = ({ rotated }) => /* @__PURE__ */ jsx7("svg", {
|
|
|
499
671
|
style: {
|
|
500
672
|
transform: rotated ? "rotate(180deg)" : "rotate(0deg)"
|
|
501
673
|
},
|
|
502
|
-
children: /* @__PURE__ */
|
|
674
|
+
children: /* @__PURE__ */ jsx8("path", {
|
|
503
675
|
className: "fill-text",
|
|
504
676
|
d: "M7.17096 0.475588C6.73198 0.0764969 6.01906 0.0764969 5.58007 0.475588L1.08483 4.56228C0.761737 4.85601 0.666915 5.29341 0.84251 5.67654C1.01811 6.05966 1.42549 6.3087 1.88203 6.3087H10.8725C11.3255 6.3087 11.7364 6.05966 11.912 5.67654C12.0876 5.29341 11.9893 4.85601 11.6697 4.56228L7.17448 0.475588H7.17096Z"
|
|
505
677
|
})
|
|
@@ -543,7 +715,7 @@ var Counter = ({
|
|
|
543
715
|
style: container,
|
|
544
716
|
className: cn("w-[140px] flex flex-row overflow-hidden"),
|
|
545
717
|
children: [
|
|
546
|
-
/* @__PURE__ */
|
|
718
|
+
/* @__PURE__ */ jsx8("input", {
|
|
547
719
|
className: cn("fontbrand font-medium min-w-[80px] border-0 text-end outline-0 text-text overflow-hidden flex-1 px-0 py-0 pr-2 w-full h-full tabular-nums", shrink ? "text-lg" : "text-2xl"),
|
|
548
720
|
type: "number",
|
|
549
721
|
value: count,
|
|
@@ -566,25 +738,25 @@ var Counter = ({
|
|
|
566
738
|
/* @__PURE__ */ jsxs3("div", {
|
|
567
739
|
className: "flex flex-col h-full",
|
|
568
740
|
children: [
|
|
569
|
-
/* @__PURE__ */
|
|
741
|
+
/* @__PURE__ */ jsx8("button", {
|
|
570
742
|
type: "button",
|
|
571
743
|
className: "border-0 flex-1 p-0 pt-[5px] bg-transparent",
|
|
572
744
|
style: {
|
|
573
745
|
...buttonContainer
|
|
574
746
|
},
|
|
575
747
|
onClick: increment,
|
|
576
|
-
children: /* @__PURE__ */
|
|
748
|
+
children: /* @__PURE__ */ jsx8(Triangle, {
|
|
577
749
|
rotated: false
|
|
578
750
|
})
|
|
579
751
|
}),
|
|
580
|
-
/* @__PURE__ */
|
|
752
|
+
/* @__PURE__ */ jsx8("button", {
|
|
581
753
|
type: "button",
|
|
582
754
|
className: "border-0 flex-1 p-0 bg-transparent pb-[5px] pl-[1px]",
|
|
583
755
|
style: {
|
|
584
756
|
...buttonContainer
|
|
585
757
|
},
|
|
586
758
|
onClick: decrement,
|
|
587
|
-
children: /* @__PURE__ */
|
|
759
|
+
children: /* @__PURE__ */ jsx8(Triangle, {
|
|
588
760
|
rotated: true
|
|
589
761
|
})
|
|
590
762
|
})
|
|
@@ -594,18 +766,18 @@ var Counter = ({
|
|
|
594
766
|
});
|
|
595
767
|
};
|
|
596
768
|
// src/InlineCode.tsx
|
|
597
|
-
import { jsx as
|
|
769
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
598
770
|
var InlineCode = ({ children }) => {
|
|
599
|
-
return /* @__PURE__ */
|
|
771
|
+
return /* @__PURE__ */ jsx9("code", {
|
|
600
772
|
className: "font-brand text-brand",
|
|
601
773
|
children
|
|
602
774
|
});
|
|
603
775
|
};
|
|
604
776
|
// src/Input.tsx
|
|
605
|
-
import
|
|
606
|
-
import { jsx as
|
|
607
|
-
var Input =
|
|
608
|
-
return /* @__PURE__ */
|
|
777
|
+
import React7 from "react";
|
|
778
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
779
|
+
var Input = React7.forwardRef(({ className, ...props }, ref) => {
|
|
780
|
+
return /* @__PURE__ */ jsx10("input", {
|
|
609
781
|
ref,
|
|
610
782
|
className: cn("w-full bg-white dark:bg-[#121212] rounded-lg border-2 border-b-4 border-black outline-none h-14 px-3 fontbrand text-lg box-border", className),
|
|
611
783
|
...props
|
|
@@ -613,32 +785,32 @@ var Input = React5.forwardRef(({ className, ...props }, ref) => {
|
|
|
613
785
|
});
|
|
614
786
|
Input.displayName = "Input";
|
|
615
787
|
// src/Link.tsx
|
|
616
|
-
import { jsx as
|
|
788
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
617
789
|
var Link = ({
|
|
618
790
|
className,
|
|
619
791
|
...props
|
|
620
792
|
}) => {
|
|
621
|
-
return /* @__PURE__ */
|
|
793
|
+
return /* @__PURE__ */ jsx11("a", {
|
|
622
794
|
...props,
|
|
623
795
|
className: cn(className, "text-brand underline underline-offset-4"),
|
|
624
796
|
children: props.children
|
|
625
797
|
});
|
|
626
798
|
};
|
|
627
799
|
// src/PaperPlaneIcon.tsx
|
|
628
|
-
import { jsx as
|
|
800
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
629
801
|
var PlanePaperIcon = (props) => {
|
|
630
|
-
return /* @__PURE__ */
|
|
802
|
+
return /* @__PURE__ */ jsx12("svg", {
|
|
631
803
|
xmlns: "http://www.w3.org/2000/svg",
|
|
632
804
|
...props,
|
|
633
805
|
viewBox: "0 0 576 512",
|
|
634
|
-
children: /* @__PURE__ */
|
|
806
|
+
children: /* @__PURE__ */ jsx12("path", {
|
|
635
807
|
fill: "currentcolor",
|
|
636
808
|
d: "M169.9 280L94.9 448.6 461.2 280 169.9 280zm291.3-48L94.9 63.4 169.9 232 461.2 232zM34.8 465.6L128 256 34.8 46.4C33 42.2 32 37.6 32 33 32 14.8 46.7 0 64.8 0 69.5 0 74.2 1 78.5 3L554.2 222c13.3 6.1 21.8 19.4 21.8 34s-8.5 27.9-21.8 34L78.5 509c-4.3 2-9 3-13.7 3-18.1 0-32.8-14.8-32.8-33 0-4.6 1-9.2 2.8-13.4z"
|
|
637
809
|
})
|
|
638
810
|
});
|
|
639
811
|
};
|
|
640
812
|
// ../../node_modules/.bun/@radix-ui+react-select@2.1.1+f178f9b1194b24ba/node_modules/@radix-ui/react-select/dist/index.mjs
|
|
641
|
-
import * as
|
|
813
|
+
import * as React36 from "react";
|
|
642
814
|
import * as ReactDOM4 from "react-dom";
|
|
643
815
|
|
|
644
816
|
// ../../node_modules/.bun/@radix-ui+number@1.1.0/node_modules/@radix-ui/number/dist/index.mjs
|
|
@@ -657,26 +829,26 @@ function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForD
|
|
|
657
829
|
}
|
|
658
830
|
|
|
659
831
|
// ../../node_modules/.bun/@radix-ui+react-collection@1.1.0+f178f9b1194b24ba/node_modules/@radix-ui/react-collection/dist/index.mjs
|
|
660
|
-
import
|
|
832
|
+
import React11 from "react";
|
|
661
833
|
|
|
662
834
|
// ../../node_modules/.bun/@radix-ui+react-context@1.1.0+09a4a3ac15cb54ba/node_modules/@radix-ui/react-context/dist/index.mjs
|
|
663
|
-
import * as
|
|
664
|
-
import { jsx as
|
|
835
|
+
import * as React8 from "react";
|
|
836
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
665
837
|
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
666
838
|
let defaultContexts = [];
|
|
667
839
|
function createContext3(rootComponentName, defaultContext) {
|
|
668
|
-
const BaseContext =
|
|
840
|
+
const BaseContext = React8.createContext(defaultContext);
|
|
669
841
|
const index = defaultContexts.length;
|
|
670
842
|
defaultContexts = [...defaultContexts, defaultContext];
|
|
671
843
|
function Provider(props) {
|
|
672
844
|
const { scope, children, ...context } = props;
|
|
673
845
|
const Context = scope?.[scopeName][index] || BaseContext;
|
|
674
|
-
const value =
|
|
675
|
-
return /* @__PURE__ */
|
|
846
|
+
const value = React8.useMemo(() => context, Object.values(context));
|
|
847
|
+
return /* @__PURE__ */ jsx13(Context.Provider, { value, children });
|
|
676
848
|
}
|
|
677
849
|
function useContext2(consumerName, scope) {
|
|
678
850
|
const Context = scope?.[scopeName][index] || BaseContext;
|
|
679
|
-
const context =
|
|
851
|
+
const context = React8.useContext(Context);
|
|
680
852
|
if (context)
|
|
681
853
|
return context;
|
|
682
854
|
if (defaultContext !== undefined)
|
|
@@ -688,11 +860,11 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
|
688
860
|
}
|
|
689
861
|
const createScope = () => {
|
|
690
862
|
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
691
|
-
return
|
|
863
|
+
return React8.createContext(defaultContext);
|
|
692
864
|
});
|
|
693
865
|
return function useScope(scope) {
|
|
694
866
|
const contexts = scope?.[scopeName] || scopeContexts;
|
|
695
|
-
return
|
|
867
|
+
return React8.useMemo(() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }), [scope, contexts]);
|
|
696
868
|
};
|
|
697
869
|
};
|
|
698
870
|
createScope.scopeName = scopeName;
|
|
@@ -713,7 +885,7 @@ function composeContextScopes(...scopes) {
|
|
|
713
885
|
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
714
886
|
return { ...nextScopes2, ...currentScope };
|
|
715
887
|
}, {});
|
|
716
|
-
return
|
|
888
|
+
return React8.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
717
889
|
};
|
|
718
890
|
};
|
|
719
891
|
createScope.scopeName = baseScope.scopeName;
|
|
@@ -721,63 +893,63 @@ function composeContextScopes(...scopes) {
|
|
|
721
893
|
}
|
|
722
894
|
|
|
723
895
|
// ../../node_modules/.bun/@radix-ui+react-compose-refs@1.1.0+09a4a3ac15cb54ba/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
724
|
-
import * as
|
|
725
|
-
function
|
|
896
|
+
import * as React9 from "react";
|
|
897
|
+
function setRef2(ref, value) {
|
|
726
898
|
if (typeof ref === "function") {
|
|
727
899
|
ref(value);
|
|
728
900
|
} else if (ref !== null && ref !== undefined) {
|
|
729
901
|
ref.current = value;
|
|
730
902
|
}
|
|
731
903
|
}
|
|
732
|
-
function
|
|
733
|
-
return (node) => refs.forEach((ref) =>
|
|
904
|
+
function composeRefs2(...refs) {
|
|
905
|
+
return (node) => refs.forEach((ref) => setRef2(ref, node));
|
|
734
906
|
}
|
|
735
|
-
function
|
|
736
|
-
return
|
|
907
|
+
function useComposedRefs2(...refs) {
|
|
908
|
+
return React9.useCallback(composeRefs2(...refs), refs);
|
|
737
909
|
}
|
|
738
910
|
|
|
739
911
|
// ../../node_modules/.bun/@radix-ui+react-slot@1.1.0+09a4a3ac15cb54ba/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
740
|
-
import * as
|
|
741
|
-
import { Fragment as
|
|
742
|
-
var
|
|
912
|
+
import * as React10 from "react";
|
|
913
|
+
import { Fragment as Fragment5, jsx as jsx14 } from "react/jsx-runtime";
|
|
914
|
+
var Slot2 = React10.forwardRef((props, forwardedRef) => {
|
|
743
915
|
const { children, ...slotProps } = props;
|
|
744
|
-
const childrenArray =
|
|
745
|
-
const slottable = childrenArray.find(
|
|
916
|
+
const childrenArray = React10.Children.toArray(children);
|
|
917
|
+
const slottable = childrenArray.find(isSlottable2);
|
|
746
918
|
if (slottable) {
|
|
747
919
|
const newElement = slottable.props.children;
|
|
748
920
|
const newChildren = childrenArray.map((child) => {
|
|
749
921
|
if (child === slottable) {
|
|
750
|
-
if (
|
|
751
|
-
return
|
|
752
|
-
return
|
|
922
|
+
if (React10.Children.count(newElement) > 1)
|
|
923
|
+
return React10.Children.only(null);
|
|
924
|
+
return React10.isValidElement(newElement) ? newElement.props.children : null;
|
|
753
925
|
} else {
|
|
754
926
|
return child;
|
|
755
927
|
}
|
|
756
928
|
});
|
|
757
|
-
return /* @__PURE__ */
|
|
929
|
+
return /* @__PURE__ */ jsx14(SlotClone, { ...slotProps, ref: forwardedRef, children: React10.isValidElement(newElement) ? React10.cloneElement(newElement, undefined, newChildren) : null });
|
|
758
930
|
}
|
|
759
|
-
return /* @__PURE__ */
|
|
931
|
+
return /* @__PURE__ */ jsx14(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
760
932
|
});
|
|
761
|
-
|
|
762
|
-
var SlotClone =
|
|
933
|
+
Slot2.displayName = "Slot";
|
|
934
|
+
var SlotClone = React10.forwardRef((props, forwardedRef) => {
|
|
763
935
|
const { children, ...slotProps } = props;
|
|
764
|
-
if (
|
|
765
|
-
const childrenRef =
|
|
766
|
-
return
|
|
767
|
-
...
|
|
768
|
-
ref: forwardedRef ?
|
|
936
|
+
if (React10.isValidElement(children)) {
|
|
937
|
+
const childrenRef = getElementRef2(children);
|
|
938
|
+
return React10.cloneElement(children, {
|
|
939
|
+
...mergeProps2(slotProps, children.props),
|
|
940
|
+
ref: forwardedRef ? composeRefs2(forwardedRef, childrenRef) : childrenRef
|
|
769
941
|
});
|
|
770
942
|
}
|
|
771
|
-
return
|
|
943
|
+
return React10.Children.count(children) > 1 ? React10.Children.only(null) : null;
|
|
772
944
|
});
|
|
773
945
|
SlotClone.displayName = "SlotClone";
|
|
774
|
-
var
|
|
775
|
-
return /* @__PURE__ */
|
|
946
|
+
var Slottable2 = ({ children }) => {
|
|
947
|
+
return /* @__PURE__ */ jsx14(Fragment5, { children });
|
|
776
948
|
};
|
|
777
|
-
function
|
|
778
|
-
return
|
|
949
|
+
function isSlottable2(child) {
|
|
950
|
+
return React10.isValidElement(child) && child.type === Slottable2;
|
|
779
951
|
}
|
|
780
|
-
function
|
|
952
|
+
function mergeProps2(slotProps, childProps) {
|
|
781
953
|
const overrideProps = { ...childProps };
|
|
782
954
|
for (const propName in childProps) {
|
|
783
955
|
const slotPropValue = slotProps[propName];
|
|
@@ -800,7 +972,7 @@ function mergeProps(slotProps, childProps) {
|
|
|
800
972
|
}
|
|
801
973
|
return { ...slotProps, ...overrideProps };
|
|
802
974
|
}
|
|
803
|
-
function
|
|
975
|
+
function getElementRef2(element) {
|
|
804
976
|
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
805
977
|
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
806
978
|
if (mayWarn) {
|
|
@@ -815,7 +987,7 @@ function getElementRef(element) {
|
|
|
815
987
|
}
|
|
816
988
|
|
|
817
989
|
// ../../node_modules/.bun/@radix-ui+react-collection@1.1.0+f178f9b1194b24ba/node_modules/@radix-ui/react-collection/dist/index.mjs
|
|
818
|
-
import { jsx as
|
|
990
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
819
991
|
"use client";
|
|
820
992
|
function createCollection(name) {
|
|
821
993
|
const PROVIDER_NAME = name + "CollectionProvider";
|
|
@@ -823,36 +995,36 @@ function createCollection(name) {
|
|
|
823
995
|
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(PROVIDER_NAME, { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map });
|
|
824
996
|
const CollectionProvider = (props) => {
|
|
825
997
|
const { scope, children } = props;
|
|
826
|
-
const ref =
|
|
827
|
-
const itemMap =
|
|
828
|
-
return /* @__PURE__ */
|
|
998
|
+
const ref = React11.useRef(null);
|
|
999
|
+
const itemMap = React11.useRef(/* @__PURE__ */ new Map).current;
|
|
1000
|
+
return /* @__PURE__ */ jsx15(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
829
1001
|
};
|
|
830
1002
|
CollectionProvider.displayName = PROVIDER_NAME;
|
|
831
1003
|
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
832
|
-
const CollectionSlot =
|
|
1004
|
+
const CollectionSlot = React11.forwardRef((props, forwardedRef) => {
|
|
833
1005
|
const { scope, children } = props;
|
|
834
1006
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
835
|
-
const composedRefs =
|
|
836
|
-
return /* @__PURE__ */
|
|
1007
|
+
const composedRefs = useComposedRefs2(forwardedRef, context.collectionRef);
|
|
1008
|
+
return /* @__PURE__ */ jsx15(Slot2, { ref: composedRefs, children });
|
|
837
1009
|
});
|
|
838
1010
|
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
839
1011
|
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
840
1012
|
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
841
|
-
const CollectionItemSlot =
|
|
1013
|
+
const CollectionItemSlot = React11.forwardRef((props, forwardedRef) => {
|
|
842
1014
|
const { scope, children, ...itemData } = props;
|
|
843
|
-
const ref =
|
|
844
|
-
const composedRefs =
|
|
1015
|
+
const ref = React11.useRef(null);
|
|
1016
|
+
const composedRefs = useComposedRefs2(forwardedRef, ref);
|
|
845
1017
|
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
846
|
-
|
|
1018
|
+
React11.useEffect(() => {
|
|
847
1019
|
context.itemMap.set(ref, { ref, ...itemData });
|
|
848
1020
|
return () => void context.itemMap.delete(ref);
|
|
849
1021
|
});
|
|
850
|
-
return /* @__PURE__ */
|
|
1022
|
+
return /* @__PURE__ */ jsx15(Slot2, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children });
|
|
851
1023
|
});
|
|
852
1024
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
853
1025
|
function useCollection(scope) {
|
|
854
1026
|
const context = useCollectionContext(name + "CollectionConsumer", scope);
|
|
855
|
-
const getItems =
|
|
1027
|
+
const getItems = React11.useCallback(() => {
|
|
856
1028
|
const collectionNode = context.collectionRef.current;
|
|
857
1029
|
if (!collectionNode)
|
|
858
1030
|
return [];
|
|
@@ -871,21 +1043,21 @@ function createCollection(name) {
|
|
|
871
1043
|
}
|
|
872
1044
|
|
|
873
1045
|
// ../../node_modules/.bun/@radix-ui+react-direction@1.1.0+09a4a3ac15cb54ba/node_modules/@radix-ui/react-direction/dist/index.mjs
|
|
874
|
-
import * as
|
|
875
|
-
import { jsx as
|
|
876
|
-
var DirectionContext =
|
|
1046
|
+
import * as React12 from "react";
|
|
1047
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
1048
|
+
var DirectionContext = React12.createContext(undefined);
|
|
877
1049
|
function useDirection(localDir) {
|
|
878
|
-
const globalDir =
|
|
1050
|
+
const globalDir = React12.useContext(DirectionContext);
|
|
879
1051
|
return localDir || globalDir || "ltr";
|
|
880
1052
|
}
|
|
881
1053
|
|
|
882
1054
|
// ../../node_modules/.bun/@radix-ui+react-dismissable-layer@1.1.0+f178f9b1194b24ba/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
883
|
-
import * as
|
|
1055
|
+
import * as React16 from "react";
|
|
884
1056
|
|
|
885
1057
|
// ../../node_modules/.bun/@radix-ui+react-primitive@2.0.0+f178f9b1194b24ba/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
886
|
-
import * as
|
|
1058
|
+
import * as React13 from "react";
|
|
887
1059
|
import * as ReactDOM from "react-dom";
|
|
888
|
-
import { jsx as
|
|
1060
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
889
1061
|
var NODES = [
|
|
890
1062
|
"a",
|
|
891
1063
|
"button",
|
|
@@ -905,13 +1077,13 @@ var NODES = [
|
|
|
905
1077
|
"ul"
|
|
906
1078
|
];
|
|
907
1079
|
var Primitive = NODES.reduce((primitive, node) => {
|
|
908
|
-
const Node2 =
|
|
1080
|
+
const Node2 = React13.forwardRef((props, forwardedRef) => {
|
|
909
1081
|
const { asChild, ...primitiveProps } = props;
|
|
910
|
-
const Comp = asChild ?
|
|
1082
|
+
const Comp = asChild ? Slot2 : node;
|
|
911
1083
|
if (typeof window !== "undefined") {
|
|
912
1084
|
window[Symbol.for("radix-ui")] = true;
|
|
913
1085
|
}
|
|
914
|
-
return /* @__PURE__ */
|
|
1086
|
+
return /* @__PURE__ */ jsx17(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
915
1087
|
});
|
|
916
1088
|
Node2.displayName = `Primitive.${node}`;
|
|
917
1089
|
return { ...primitive, [node]: Node2 };
|
|
@@ -922,20 +1094,20 @@ function dispatchDiscreteCustomEvent(target, event) {
|
|
|
922
1094
|
}
|
|
923
1095
|
|
|
924
1096
|
// ../../node_modules/.bun/@radix-ui+react-use-callback-ref@1.1.0+09a4a3ac15cb54ba/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
|
|
925
|
-
import * as
|
|
1097
|
+
import * as React14 from "react";
|
|
926
1098
|
function useCallbackRef(callback) {
|
|
927
|
-
const callbackRef =
|
|
928
|
-
|
|
1099
|
+
const callbackRef = React14.useRef(callback);
|
|
1100
|
+
React14.useEffect(() => {
|
|
929
1101
|
callbackRef.current = callback;
|
|
930
1102
|
});
|
|
931
|
-
return
|
|
1103
|
+
return React14.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
932
1104
|
}
|
|
933
1105
|
|
|
934
1106
|
// ../../node_modules/.bun/@radix-ui+react-use-escape-keydown@1.1.0+09a4a3ac15cb54ba/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
|
|
935
|
-
import * as
|
|
1107
|
+
import * as React15 from "react";
|
|
936
1108
|
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
|
937
1109
|
const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
|
|
938
|
-
|
|
1110
|
+
React15.useEffect(() => {
|
|
939
1111
|
const handleKeyDown = (event) => {
|
|
940
1112
|
if (event.key === "Escape") {
|
|
941
1113
|
onEscapeKeyDown(event);
|
|
@@ -947,19 +1119,19 @@ function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.docum
|
|
|
947
1119
|
}
|
|
948
1120
|
|
|
949
1121
|
// ../../node_modules/.bun/@radix-ui+react-dismissable-layer@1.1.0+f178f9b1194b24ba/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
950
|
-
import { jsx as
|
|
1122
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
951
1123
|
"use client";
|
|
952
1124
|
var DISMISSABLE_LAYER_NAME = "DismissableLayer";
|
|
953
1125
|
var CONTEXT_UPDATE = "dismissableLayer.update";
|
|
954
1126
|
var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
|
|
955
1127
|
var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
|
|
956
1128
|
var originalBodyPointerEvents;
|
|
957
|
-
var DismissableLayerContext =
|
|
1129
|
+
var DismissableLayerContext = React16.createContext({
|
|
958
1130
|
layers: /* @__PURE__ */ new Set,
|
|
959
1131
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set,
|
|
960
1132
|
branches: /* @__PURE__ */ new Set
|
|
961
1133
|
});
|
|
962
|
-
var DismissableLayer =
|
|
1134
|
+
var DismissableLayer = React16.forwardRef((props, forwardedRef) => {
|
|
963
1135
|
const {
|
|
964
1136
|
disableOutsidePointerEvents = false,
|
|
965
1137
|
onEscapeKeyDown,
|
|
@@ -969,11 +1141,11 @@ var DismissableLayer = React14.forwardRef((props, forwardedRef) => {
|
|
|
969
1141
|
onDismiss,
|
|
970
1142
|
...layerProps
|
|
971
1143
|
} = props;
|
|
972
|
-
const context =
|
|
973
|
-
const [node, setNode] =
|
|
1144
|
+
const context = React16.useContext(DismissableLayerContext);
|
|
1145
|
+
const [node, setNode] = React16.useState(null);
|
|
974
1146
|
const ownerDocument = node?.ownerDocument ?? globalThis?.document;
|
|
975
|
-
const [, force] =
|
|
976
|
-
const composedRefs =
|
|
1147
|
+
const [, force] = React16.useState({});
|
|
1148
|
+
const composedRefs = useComposedRefs2(forwardedRef, (node2) => setNode(node2));
|
|
977
1149
|
const layers = Array.from(context.layers);
|
|
978
1150
|
const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
|
|
979
1151
|
const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
|
|
@@ -1010,7 +1182,7 @@ var DismissableLayer = React14.forwardRef((props, forwardedRef) => {
|
|
|
1010
1182
|
onDismiss();
|
|
1011
1183
|
}
|
|
1012
1184
|
}, ownerDocument);
|
|
1013
|
-
|
|
1185
|
+
React16.useEffect(() => {
|
|
1014
1186
|
if (!node)
|
|
1015
1187
|
return;
|
|
1016
1188
|
if (disableOutsidePointerEvents) {
|
|
@@ -1028,7 +1200,7 @@ var DismissableLayer = React14.forwardRef((props, forwardedRef) => {
|
|
|
1028
1200
|
}
|
|
1029
1201
|
};
|
|
1030
1202
|
}, [node, ownerDocument, disableOutsidePointerEvents, context]);
|
|
1031
|
-
|
|
1203
|
+
React16.useEffect(() => {
|
|
1032
1204
|
return () => {
|
|
1033
1205
|
if (!node)
|
|
1034
1206
|
return;
|
|
@@ -1037,12 +1209,12 @@ var DismissableLayer = React14.forwardRef((props, forwardedRef) => {
|
|
|
1037
1209
|
dispatchUpdate();
|
|
1038
1210
|
};
|
|
1039
1211
|
}, [node, context]);
|
|
1040
|
-
|
|
1212
|
+
React16.useEffect(() => {
|
|
1041
1213
|
const handleUpdate = () => force({});
|
|
1042
1214
|
document.addEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
1043
1215
|
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
1044
1216
|
}, []);
|
|
1045
|
-
return /* @__PURE__ */
|
|
1217
|
+
return /* @__PURE__ */ jsx18(Primitive.div, {
|
|
1046
1218
|
...layerProps,
|
|
1047
1219
|
ref: composedRefs,
|
|
1048
1220
|
style: {
|
|
@@ -1056,11 +1228,11 @@ var DismissableLayer = React14.forwardRef((props, forwardedRef) => {
|
|
|
1056
1228
|
});
|
|
1057
1229
|
DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
|
|
1058
1230
|
var BRANCH_NAME = "DismissableLayerBranch";
|
|
1059
|
-
var DismissableLayerBranch =
|
|
1060
|
-
const context =
|
|
1061
|
-
const ref =
|
|
1062
|
-
const composedRefs =
|
|
1063
|
-
|
|
1231
|
+
var DismissableLayerBranch = React16.forwardRef((props, forwardedRef) => {
|
|
1232
|
+
const context = React16.useContext(DismissableLayerContext);
|
|
1233
|
+
const ref = React16.useRef(null);
|
|
1234
|
+
const composedRefs = useComposedRefs2(forwardedRef, ref);
|
|
1235
|
+
React16.useEffect(() => {
|
|
1064
1236
|
const node = ref.current;
|
|
1065
1237
|
if (node) {
|
|
1066
1238
|
context.branches.add(node);
|
|
@@ -1069,14 +1241,14 @@ var DismissableLayerBranch = React14.forwardRef((props, forwardedRef) => {
|
|
|
1069
1241
|
};
|
|
1070
1242
|
}
|
|
1071
1243
|
}, [context.branches]);
|
|
1072
|
-
return /* @__PURE__ */
|
|
1244
|
+
return /* @__PURE__ */ jsx18(Primitive.div, { ...props, ref: composedRefs });
|
|
1073
1245
|
});
|
|
1074
1246
|
DismissableLayerBranch.displayName = BRANCH_NAME;
|
|
1075
1247
|
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
|
|
1076
1248
|
const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);
|
|
1077
|
-
const isPointerInsideReactTreeRef =
|
|
1078
|
-
const handleClickRef =
|
|
1079
|
-
|
|
1249
|
+
const isPointerInsideReactTreeRef = React16.useRef(false);
|
|
1250
|
+
const handleClickRef = React16.useRef(() => {});
|
|
1251
|
+
React16.useEffect(() => {
|
|
1080
1252
|
const handlePointerDown = (event) => {
|
|
1081
1253
|
if (event.target && !isPointerInsideReactTreeRef.current) {
|
|
1082
1254
|
let handleAndDispatchPointerDownOutsideEvent2 = function() {
|
|
@@ -1111,8 +1283,8 @@ function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?
|
|
|
1111
1283
|
}
|
|
1112
1284
|
function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {
|
|
1113
1285
|
const handleFocusOutside = useCallbackRef(onFocusOutside);
|
|
1114
|
-
const isFocusInsideReactTreeRef =
|
|
1115
|
-
|
|
1286
|
+
const isFocusInsideReactTreeRef = React16.useRef(false);
|
|
1287
|
+
React16.useEffect(() => {
|
|
1116
1288
|
const handleFocus = (event) => {
|
|
1117
1289
|
if (event.target && !isFocusInsideReactTreeRef.current) {
|
|
1118
1290
|
const eventDetail = { originalEvent: event };
|
|
@@ -1146,11 +1318,11 @@ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|
|
1146
1318
|
}
|
|
1147
1319
|
|
|
1148
1320
|
// ../../node_modules/.bun/@radix-ui+react-focus-guards@1.1.0+09a4a3ac15cb54ba/node_modules/@radix-ui/react-focus-guards/dist/index.mjs
|
|
1149
|
-
import * as
|
|
1321
|
+
import * as React17 from "react";
|
|
1150
1322
|
"use client";
|
|
1151
1323
|
var count = 0;
|
|
1152
1324
|
function useFocusGuards() {
|
|
1153
|
-
|
|
1325
|
+
React17.useEffect(() => {
|
|
1154
1326
|
const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
|
|
1155
1327
|
document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
|
|
1156
1328
|
document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
|
|
@@ -1172,14 +1344,14 @@ function createFocusGuard() {
|
|
|
1172
1344
|
}
|
|
1173
1345
|
|
|
1174
1346
|
// ../../node_modules/.bun/@radix-ui+react-focus-scope@1.1.0+f178f9b1194b24ba/node_modules/@radix-ui/react-focus-scope/dist/index.mjs
|
|
1175
|
-
import * as
|
|
1176
|
-
import { jsx as
|
|
1347
|
+
import * as React18 from "react";
|
|
1348
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
1177
1349
|
"use client";
|
|
1178
1350
|
var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
|
|
1179
1351
|
var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
|
|
1180
1352
|
var EVENT_OPTIONS = { bubbles: false, cancelable: true };
|
|
1181
1353
|
var FOCUS_SCOPE_NAME = "FocusScope";
|
|
1182
|
-
var FocusScope =
|
|
1354
|
+
var FocusScope = React18.forwardRef((props, forwardedRef) => {
|
|
1183
1355
|
const {
|
|
1184
1356
|
loop = false,
|
|
1185
1357
|
trapped = false,
|
|
@@ -1187,12 +1359,12 @@ var FocusScope = React16.forwardRef((props, forwardedRef) => {
|
|
|
1187
1359
|
onUnmountAutoFocus: onUnmountAutoFocusProp,
|
|
1188
1360
|
...scopeProps
|
|
1189
1361
|
} = props;
|
|
1190
|
-
const [container2, setContainer] =
|
|
1362
|
+
const [container2, setContainer] = React18.useState(null);
|
|
1191
1363
|
const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);
|
|
1192
1364
|
const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);
|
|
1193
|
-
const lastFocusedElementRef =
|
|
1194
|
-
const composedRefs =
|
|
1195
|
-
const focusScope =
|
|
1365
|
+
const lastFocusedElementRef = React18.useRef(null);
|
|
1366
|
+
const composedRefs = useComposedRefs2(forwardedRef, (node) => setContainer(node));
|
|
1367
|
+
const focusScope = React18.useRef({
|
|
1196
1368
|
paused: false,
|
|
1197
1369
|
pause() {
|
|
1198
1370
|
this.paused = true;
|
|
@@ -1201,7 +1373,7 @@ var FocusScope = React16.forwardRef((props, forwardedRef) => {
|
|
|
1201
1373
|
this.paused = false;
|
|
1202
1374
|
}
|
|
1203
1375
|
}).current;
|
|
1204
|
-
|
|
1376
|
+
React18.useEffect(() => {
|
|
1205
1377
|
if (trapped) {
|
|
1206
1378
|
let handleFocusIn2 = function(event) {
|
|
1207
1379
|
if (focusScope.paused || !container2)
|
|
@@ -1243,7 +1415,7 @@ var FocusScope = React16.forwardRef((props, forwardedRef) => {
|
|
|
1243
1415
|
};
|
|
1244
1416
|
}
|
|
1245
1417
|
}, [trapped, container2, focusScope.paused]);
|
|
1246
|
-
|
|
1418
|
+
React18.useEffect(() => {
|
|
1247
1419
|
if (container2) {
|
|
1248
1420
|
focusScopesStack.add(focusScope);
|
|
1249
1421
|
const previouslyFocusedElement = document.activeElement;
|
|
@@ -1274,7 +1446,7 @@ var FocusScope = React16.forwardRef((props, forwardedRef) => {
|
|
|
1274
1446
|
};
|
|
1275
1447
|
}
|
|
1276
1448
|
}, [container2, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
|
|
1277
|
-
const handleKeyDown =
|
|
1449
|
+
const handleKeyDown = React18.useCallback((event) => {
|
|
1278
1450
|
if (!loop && !trapped)
|
|
1279
1451
|
return;
|
|
1280
1452
|
if (focusScope.paused)
|
|
@@ -1301,7 +1473,7 @@ var FocusScope = React16.forwardRef((props, forwardedRef) => {
|
|
|
1301
1473
|
}
|
|
1302
1474
|
}
|
|
1303
1475
|
}, [loop, trapped, focusScope.paused]);
|
|
1304
|
-
return /* @__PURE__ */
|
|
1476
|
+
return /* @__PURE__ */ jsx19(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
|
|
1305
1477
|
});
|
|
1306
1478
|
FocusScope.displayName = FOCUS_SCOPE_NAME;
|
|
1307
1479
|
function focusFirst(candidates, { select = false } = {}) {
|
|
@@ -1392,19 +1564,19 @@ function removeLinks(items) {
|
|
|
1392
1564
|
}
|
|
1393
1565
|
|
|
1394
1566
|
// ../../node_modules/.bun/@radix-ui+react-id@1.1.0+09a4a3ac15cb54ba/node_modules/@radix-ui/react-id/dist/index.mjs
|
|
1395
|
-
import * as
|
|
1567
|
+
import * as React20 from "react";
|
|
1396
1568
|
|
|
1397
1569
|
// ../../node_modules/.bun/@radix-ui+react-use-layout-effect@1.1.0+09a4a3ac15cb54ba/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
|
1398
|
-
import * as
|
|
1399
|
-
var useLayoutEffect2 = Boolean(globalThis?.document) ?
|
|
1570
|
+
import * as React19 from "react";
|
|
1571
|
+
var useLayoutEffect2 = Boolean(globalThis?.document) ? React19.useLayoutEffect : () => {};
|
|
1400
1572
|
|
|
1401
1573
|
// ../../node_modules/.bun/@radix-ui+react-id@1.1.0+09a4a3ac15cb54ba/node_modules/@radix-ui/react-id/dist/index.mjs
|
|
1402
|
-
var useReactId =
|
|
1574
|
+
var useReactId = React20["useId".toString()] || (() => {
|
|
1403
1575
|
return;
|
|
1404
1576
|
});
|
|
1405
1577
|
var count2 = 0;
|
|
1406
1578
|
function useId(deterministicId) {
|
|
1407
|
-
const [id, setId] =
|
|
1579
|
+
const [id, setId] = React20.useState(useReactId());
|
|
1408
1580
|
useLayoutEffect2(() => {
|
|
1409
1581
|
if (!deterministicId)
|
|
1410
1582
|
setId((reactId) => reactId ?? String(count2++));
|
|
@@ -1413,7 +1585,7 @@ function useId(deterministicId) {
|
|
|
1413
1585
|
}
|
|
1414
1586
|
|
|
1415
1587
|
// ../../node_modules/.bun/@radix-ui+react-popper@1.2.0+f178f9b1194b24ba/node_modules/@radix-ui/react-popper/dist/index.mjs
|
|
1416
|
-
import * as
|
|
1588
|
+
import * as React24 from "react";
|
|
1417
1589
|
|
|
1418
1590
|
// ../../node_modules/.bun/@floating-ui+utils@0.2.7/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
|
|
1419
1591
|
var sides = ["top", "right", "bottom", "left"];
|
|
@@ -2935,7 +3107,7 @@ var computePosition2 = (reference, floating, options) => {
|
|
|
2935
3107
|
};
|
|
2936
3108
|
|
|
2937
3109
|
// ../../node_modules/.bun/@floating-ui+react-dom@2.1.1+67f6792bdf102c28/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
|
|
2938
|
-
import * as
|
|
3110
|
+
import * as React21 from "react";
|
|
2939
3111
|
import { useLayoutEffect as useLayoutEffect3, useEffect as useEffect8 } from "react";
|
|
2940
3112
|
import * as ReactDOM2 from "react-dom";
|
|
2941
3113
|
var index = typeof document !== "undefined" ? useLayoutEffect3 : useEffect8;
|
|
@@ -2999,7 +3171,7 @@ function roundByDPR(element, value) {
|
|
|
2999
3171
|
return Math.round(value * dpr) / dpr;
|
|
3000
3172
|
}
|
|
3001
3173
|
function useLatestRef(value) {
|
|
3002
|
-
const ref =
|
|
3174
|
+
const ref = React21.useRef(value);
|
|
3003
3175
|
index(() => {
|
|
3004
3176
|
ref.current = value;
|
|
3005
3177
|
});
|
|
@@ -3022,7 +3194,7 @@ function useFloating(options) {
|
|
|
3022
3194
|
whileElementsMounted,
|
|
3023
3195
|
open
|
|
3024
3196
|
} = options;
|
|
3025
|
-
const [data, setData] =
|
|
3197
|
+
const [data, setData] = React21.useState({
|
|
3026
3198
|
x: 0,
|
|
3027
3199
|
y: 0,
|
|
3028
3200
|
strategy,
|
|
@@ -3030,19 +3202,19 @@ function useFloating(options) {
|
|
|
3030
3202
|
middlewareData: {},
|
|
3031
3203
|
isPositioned: false
|
|
3032
3204
|
});
|
|
3033
|
-
const [latestMiddleware, setLatestMiddleware] =
|
|
3205
|
+
const [latestMiddleware, setLatestMiddleware] = React21.useState(middleware);
|
|
3034
3206
|
if (!deepEqual(latestMiddleware, middleware)) {
|
|
3035
3207
|
setLatestMiddleware(middleware);
|
|
3036
3208
|
}
|
|
3037
|
-
const [_reference, _setReference] =
|
|
3038
|
-
const [_floating, _setFloating] =
|
|
3039
|
-
const setReference =
|
|
3209
|
+
const [_reference, _setReference] = React21.useState(null);
|
|
3210
|
+
const [_floating, _setFloating] = React21.useState(null);
|
|
3211
|
+
const setReference = React21.useCallback((node) => {
|
|
3040
3212
|
if (node !== referenceRef.current) {
|
|
3041
3213
|
referenceRef.current = node;
|
|
3042
3214
|
_setReference(node);
|
|
3043
3215
|
}
|
|
3044
3216
|
}, []);
|
|
3045
|
-
const setFloating =
|
|
3217
|
+
const setFloating = React21.useCallback((node) => {
|
|
3046
3218
|
if (node !== floatingRef.current) {
|
|
3047
3219
|
floatingRef.current = node;
|
|
3048
3220
|
_setFloating(node);
|
|
@@ -3050,13 +3222,13 @@ function useFloating(options) {
|
|
|
3050
3222
|
}, []);
|
|
3051
3223
|
const referenceEl = externalReference || _reference;
|
|
3052
3224
|
const floatingEl = externalFloating || _floating;
|
|
3053
|
-
const referenceRef =
|
|
3054
|
-
const floatingRef =
|
|
3055
|
-
const dataRef =
|
|
3225
|
+
const referenceRef = React21.useRef(null);
|
|
3226
|
+
const floatingRef = React21.useRef(null);
|
|
3227
|
+
const dataRef = React21.useRef(data);
|
|
3056
3228
|
const hasWhileElementsMounted = whileElementsMounted != null;
|
|
3057
3229
|
const whileElementsMountedRef = useLatestRef(whileElementsMounted);
|
|
3058
3230
|
const platformRef = useLatestRef(platform2);
|
|
3059
|
-
const update =
|
|
3231
|
+
const update = React21.useCallback(() => {
|
|
3060
3232
|
if (!referenceRef.current || !floatingRef.current) {
|
|
3061
3233
|
return;
|
|
3062
3234
|
}
|
|
@@ -3090,7 +3262,7 @@ function useFloating(options) {
|
|
|
3090
3262
|
}));
|
|
3091
3263
|
}
|
|
3092
3264
|
}, [open]);
|
|
3093
|
-
const isMountedRef =
|
|
3265
|
+
const isMountedRef = React21.useRef(false);
|
|
3094
3266
|
index(() => {
|
|
3095
3267
|
isMountedRef.current = true;
|
|
3096
3268
|
return () => {
|
|
@@ -3109,17 +3281,17 @@ function useFloating(options) {
|
|
|
3109
3281
|
update();
|
|
3110
3282
|
}
|
|
3111
3283
|
}, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);
|
|
3112
|
-
const refs =
|
|
3284
|
+
const refs = React21.useMemo(() => ({
|
|
3113
3285
|
reference: referenceRef,
|
|
3114
3286
|
floating: floatingRef,
|
|
3115
3287
|
setReference,
|
|
3116
3288
|
setFloating
|
|
3117
3289
|
}), [setReference, setFloating]);
|
|
3118
|
-
const elements =
|
|
3290
|
+
const elements = React21.useMemo(() => ({
|
|
3119
3291
|
reference: referenceEl,
|
|
3120
3292
|
floating: floatingEl
|
|
3121
3293
|
}), [referenceEl, floatingEl]);
|
|
3122
|
-
const floatingStyles =
|
|
3294
|
+
const floatingStyles = React21.useMemo(() => {
|
|
3123
3295
|
const initialStyles = {
|
|
3124
3296
|
position: strategy,
|
|
3125
3297
|
left: 0,
|
|
@@ -3145,7 +3317,7 @@ function useFloating(options) {
|
|
|
3145
3317
|
top: y
|
|
3146
3318
|
};
|
|
3147
3319
|
}, [strategy, transform, elements.floating, data.x, data.y]);
|
|
3148
|
-
return
|
|
3320
|
+
return React21.useMemo(() => ({
|
|
3149
3321
|
...data,
|
|
3150
3322
|
update,
|
|
3151
3323
|
refs,
|
|
@@ -3214,28 +3386,28 @@ var arrow3 = (options, deps) => ({
|
|
|
3214
3386
|
});
|
|
3215
3387
|
|
|
3216
3388
|
// ../../node_modules/.bun/@radix-ui+react-arrow@1.1.0+f178f9b1194b24ba/node_modules/@radix-ui/react-arrow/dist/index.mjs
|
|
3217
|
-
import * as
|
|
3218
|
-
import { jsx as
|
|
3389
|
+
import * as React22 from "react";
|
|
3390
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
3219
3391
|
var NAME = "Arrow";
|
|
3220
|
-
var Arrow =
|
|
3392
|
+
var Arrow = React22.forwardRef((props, forwardedRef) => {
|
|
3221
3393
|
const { children, width = 10, height = 5, ...arrowProps } = props;
|
|
3222
|
-
return /* @__PURE__ */
|
|
3394
|
+
return /* @__PURE__ */ jsx20(Primitive.svg, {
|
|
3223
3395
|
...arrowProps,
|
|
3224
3396
|
ref: forwardedRef,
|
|
3225
3397
|
width,
|
|
3226
3398
|
height,
|
|
3227
3399
|
viewBox: "0 0 30 10",
|
|
3228
3400
|
preserveAspectRatio: "none",
|
|
3229
|
-
children: props.asChild ? children : /* @__PURE__ */
|
|
3401
|
+
children: props.asChild ? children : /* @__PURE__ */ jsx20("polygon", { points: "0,0 30,0 15,10" })
|
|
3230
3402
|
});
|
|
3231
3403
|
});
|
|
3232
3404
|
Arrow.displayName = NAME;
|
|
3233
3405
|
var Root = Arrow;
|
|
3234
3406
|
|
|
3235
3407
|
// ../../node_modules/.bun/@radix-ui+react-use-size@1.1.0+09a4a3ac15cb54ba/node_modules/@radix-ui/react-use-size/dist/index.mjs
|
|
3236
|
-
import * as
|
|
3408
|
+
import * as React23 from "react";
|
|
3237
3409
|
function useSize(element) {
|
|
3238
|
-
const [size4, setSize] =
|
|
3410
|
+
const [size4, setSize] = React23.useState(undefined);
|
|
3239
3411
|
useLayoutEffect2(() => {
|
|
3240
3412
|
if (element) {
|
|
3241
3413
|
setSize({ width: element.offsetWidth, height: element.offsetHeight });
|
|
@@ -3270,32 +3442,32 @@ function useSize(element) {
|
|
|
3270
3442
|
}
|
|
3271
3443
|
|
|
3272
3444
|
// ../../node_modules/.bun/@radix-ui+react-popper@1.2.0+f178f9b1194b24ba/node_modules/@radix-ui/react-popper/dist/index.mjs
|
|
3273
|
-
import { jsx as
|
|
3445
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
3274
3446
|
"use client";
|
|
3275
3447
|
var POPPER_NAME = "Popper";
|
|
3276
3448
|
var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
|
|
3277
3449
|
var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
|
|
3278
3450
|
var Popper = (props) => {
|
|
3279
3451
|
const { __scopePopper, children } = props;
|
|
3280
|
-
const [anchor, setAnchor] =
|
|
3281
|
-
return /* @__PURE__ */
|
|
3452
|
+
const [anchor, setAnchor] = React24.useState(null);
|
|
3453
|
+
return /* @__PURE__ */ jsx21(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });
|
|
3282
3454
|
};
|
|
3283
3455
|
Popper.displayName = POPPER_NAME;
|
|
3284
3456
|
var ANCHOR_NAME = "PopperAnchor";
|
|
3285
|
-
var PopperAnchor =
|
|
3457
|
+
var PopperAnchor = React24.forwardRef((props, forwardedRef) => {
|
|
3286
3458
|
const { __scopePopper, virtualRef, ...anchorProps } = props;
|
|
3287
3459
|
const context = usePopperContext(ANCHOR_NAME, __scopePopper);
|
|
3288
|
-
const ref =
|
|
3289
|
-
const composedRefs =
|
|
3290
|
-
|
|
3460
|
+
const ref = React24.useRef(null);
|
|
3461
|
+
const composedRefs = useComposedRefs2(forwardedRef, ref);
|
|
3462
|
+
React24.useEffect(() => {
|
|
3291
3463
|
context.onAnchorChange(virtualRef?.current || ref.current);
|
|
3292
3464
|
});
|
|
3293
|
-
return virtualRef ? null : /* @__PURE__ */
|
|
3465
|
+
return virtualRef ? null : /* @__PURE__ */ jsx21(Primitive.div, { ...anchorProps, ref: composedRefs });
|
|
3294
3466
|
});
|
|
3295
3467
|
PopperAnchor.displayName = ANCHOR_NAME;
|
|
3296
3468
|
var CONTENT_NAME = "PopperContent";
|
|
3297
3469
|
var [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME);
|
|
3298
|
-
var PopperContent =
|
|
3470
|
+
var PopperContent = React24.forwardRef((props, forwardedRef) => {
|
|
3299
3471
|
const {
|
|
3300
3472
|
__scopePopper,
|
|
3301
3473
|
side = "bottom",
|
|
@@ -3313,9 +3485,9 @@ var PopperContent = React22.forwardRef((props, forwardedRef) => {
|
|
|
3313
3485
|
...contentProps
|
|
3314
3486
|
} = props;
|
|
3315
3487
|
const context = usePopperContext(CONTENT_NAME, __scopePopper);
|
|
3316
|
-
const [content, setContent] =
|
|
3317
|
-
const composedRefs =
|
|
3318
|
-
const [arrow4, setArrow] =
|
|
3488
|
+
const [content, setContent] = React24.useState(null);
|
|
3489
|
+
const composedRefs = useComposedRefs2(forwardedRef, (node) => setContent(node));
|
|
3490
|
+
const [arrow4, setArrow] = React24.useState(null);
|
|
3319
3491
|
const arrowSize = useSize(arrow4);
|
|
3320
3492
|
const arrowWidth = arrowSize?.width ?? 0;
|
|
3321
3493
|
const arrowHeight = arrowSize?.height ?? 0;
|
|
@@ -3375,12 +3547,12 @@ var PopperContent = React22.forwardRef((props, forwardedRef) => {
|
|
|
3375
3547
|
const arrowX = middlewareData.arrow?.x;
|
|
3376
3548
|
const arrowY = middlewareData.arrow?.y;
|
|
3377
3549
|
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
|
|
3378
|
-
const [contentZIndex, setContentZIndex] =
|
|
3550
|
+
const [contentZIndex, setContentZIndex] = React24.useState();
|
|
3379
3551
|
useLayoutEffect2(() => {
|
|
3380
3552
|
if (content)
|
|
3381
3553
|
setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
3382
3554
|
}, [content]);
|
|
3383
|
-
return /* @__PURE__ */
|
|
3555
|
+
return /* @__PURE__ */ jsx21("div", {
|
|
3384
3556
|
ref: refs.setFloating,
|
|
3385
3557
|
"data-radix-popper-content-wrapper": "",
|
|
3386
3558
|
style: {
|
|
@@ -3398,14 +3570,14 @@ var PopperContent = React22.forwardRef((props, forwardedRef) => {
|
|
|
3398
3570
|
}
|
|
3399
3571
|
},
|
|
3400
3572
|
dir: props.dir,
|
|
3401
|
-
children: /* @__PURE__ */
|
|
3573
|
+
children: /* @__PURE__ */ jsx21(PopperContentProvider, {
|
|
3402
3574
|
scope: __scopePopper,
|
|
3403
3575
|
placedSide,
|
|
3404
3576
|
onArrowChange: setArrow,
|
|
3405
3577
|
arrowX,
|
|
3406
3578
|
arrowY,
|
|
3407
3579
|
shouldHideArrow: cannotCenterArrow,
|
|
3408
|
-
children: /* @__PURE__ */
|
|
3580
|
+
children: /* @__PURE__ */ jsx21(Primitive.div, {
|
|
3409
3581
|
"data-side": placedSide,
|
|
3410
3582
|
"data-align": placedAlign,
|
|
3411
3583
|
...contentProps,
|
|
@@ -3426,11 +3598,11 @@ var OPPOSITE_SIDE = {
|
|
|
3426
3598
|
bottom: "top",
|
|
3427
3599
|
left: "right"
|
|
3428
3600
|
};
|
|
3429
|
-
var PopperArrow =
|
|
3601
|
+
var PopperArrow = React24.forwardRef(function PopperArrow2(props, forwardedRef) {
|
|
3430
3602
|
const { __scopePopper, ...arrowProps } = props;
|
|
3431
3603
|
const contentContext = useContentContext(ARROW_NAME, __scopePopper);
|
|
3432
3604
|
const baseSide = OPPOSITE_SIDE[contentContext.placedSide];
|
|
3433
|
-
return /* @__PURE__ */
|
|
3605
|
+
return /* @__PURE__ */ jsx21("span", {
|
|
3434
3606
|
ref: contentContext.onArrowChange,
|
|
3435
3607
|
style: {
|
|
3436
3608
|
position: "absolute",
|
|
@@ -3451,7 +3623,7 @@ var PopperArrow = React22.forwardRef(function PopperArrow2(props, forwardedRef)
|
|
|
3451
3623
|
}[contentContext.placedSide],
|
|
3452
3624
|
visibility: contentContext.shouldHideArrow ? "hidden" : undefined
|
|
3453
3625
|
},
|
|
3454
|
-
children: /* @__PURE__ */
|
|
3626
|
+
children: /* @__PURE__ */ jsx21(Root, {
|
|
3455
3627
|
...arrowProps,
|
|
3456
3628
|
ref: forwardedRef,
|
|
3457
3629
|
style: {
|
|
@@ -3506,22 +3678,22 @@ var Content = PopperContent;
|
|
|
3506
3678
|
var Arrow2 = PopperArrow;
|
|
3507
3679
|
|
|
3508
3680
|
// ../../node_modules/.bun/@radix-ui+react-portal@1.1.1+f178f9b1194b24ba/node_modules/@radix-ui/react-portal/dist/index.mjs
|
|
3509
|
-
import * as
|
|
3681
|
+
import * as React25 from "react";
|
|
3510
3682
|
import ReactDOM3 from "react-dom";
|
|
3511
|
-
import { jsx as
|
|
3683
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
3512
3684
|
"use client";
|
|
3513
3685
|
var PORTAL_NAME = "Portal";
|
|
3514
|
-
var Portal =
|
|
3686
|
+
var Portal = React25.forwardRef((props, forwardedRef) => {
|
|
3515
3687
|
const { container: containerProp, ...portalProps } = props;
|
|
3516
|
-
const [mounted, setMounted] =
|
|
3688
|
+
const [mounted, setMounted] = React25.useState(false);
|
|
3517
3689
|
useLayoutEffect2(() => setMounted(true), []);
|
|
3518
3690
|
const container2 = containerProp || mounted && globalThis?.document?.body;
|
|
3519
|
-
return container2 ? ReactDOM3.createPortal(/* @__PURE__ */
|
|
3691
|
+
return container2 ? ReactDOM3.createPortal(/* @__PURE__ */ jsx22(Primitive.div, { ...portalProps, ref: forwardedRef }), container2) : null;
|
|
3520
3692
|
});
|
|
3521
3693
|
Portal.displayName = PORTAL_NAME;
|
|
3522
3694
|
|
|
3523
3695
|
// ../../node_modules/.bun/@radix-ui+react-use-controllable-state@1.1.0+09a4a3ac15cb54ba/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
|
|
3524
|
-
import * as
|
|
3696
|
+
import * as React26 from "react";
|
|
3525
3697
|
function useControllableState({
|
|
3526
3698
|
prop,
|
|
3527
3699
|
defaultProp,
|
|
@@ -3531,7 +3703,7 @@ function useControllableState({
|
|
|
3531
3703
|
const isControlled = prop !== undefined;
|
|
3532
3704
|
const value = isControlled ? prop : uncontrolledProp;
|
|
3533
3705
|
const handleChange = useCallbackRef(onChange);
|
|
3534
|
-
const setValue =
|
|
3706
|
+
const setValue = React26.useCallback((nextValue) => {
|
|
3535
3707
|
if (isControlled) {
|
|
3536
3708
|
const setter = nextValue;
|
|
3537
3709
|
const value2 = typeof nextValue === "function" ? setter(prop) : nextValue;
|
|
@@ -3547,11 +3719,11 @@ function useUncontrolledState({
|
|
|
3547
3719
|
defaultProp,
|
|
3548
3720
|
onChange
|
|
3549
3721
|
}) {
|
|
3550
|
-
const uncontrolledState =
|
|
3722
|
+
const uncontrolledState = React26.useState(defaultProp);
|
|
3551
3723
|
const [value] = uncontrolledState;
|
|
3552
|
-
const prevValueRef =
|
|
3724
|
+
const prevValueRef = React26.useRef(value);
|
|
3553
3725
|
const handleChange = useCallbackRef(onChange);
|
|
3554
|
-
|
|
3726
|
+
React26.useEffect(() => {
|
|
3555
3727
|
if (prevValueRef.current !== value) {
|
|
3556
3728
|
handleChange(value);
|
|
3557
3729
|
prevValueRef.current = value;
|
|
@@ -3561,10 +3733,10 @@ function useUncontrolledState({
|
|
|
3561
3733
|
}
|
|
3562
3734
|
|
|
3563
3735
|
// ../../node_modules/.bun/@radix-ui+react-use-previous@1.1.0+09a4a3ac15cb54ba/node_modules/@radix-ui/react-use-previous/dist/index.mjs
|
|
3564
|
-
import * as
|
|
3736
|
+
import * as React27 from "react";
|
|
3565
3737
|
function usePrevious(value) {
|
|
3566
|
-
const ref =
|
|
3567
|
-
return
|
|
3738
|
+
const ref = React27.useRef({ value, previous: value });
|
|
3739
|
+
return React27.useMemo(() => {
|
|
3568
3740
|
if (ref.current.value !== value) {
|
|
3569
3741
|
ref.current.previous = ref.current.value;
|
|
3570
3742
|
ref.current.value = value;
|
|
@@ -3574,11 +3746,11 @@ function usePrevious(value) {
|
|
|
3574
3746
|
}
|
|
3575
3747
|
|
|
3576
3748
|
// ../../node_modules/.bun/@radix-ui+react-visually-hidden@1.1.0+f178f9b1194b24ba/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
|
|
3577
|
-
import * as
|
|
3578
|
-
import { jsx as
|
|
3749
|
+
import * as React28 from "react";
|
|
3750
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
3579
3751
|
var NAME2 = "VisuallyHidden";
|
|
3580
|
-
var VisuallyHidden =
|
|
3581
|
-
return /* @__PURE__ */
|
|
3752
|
+
var VisuallyHidden = React28.forwardRef((props, forwardedRef) => {
|
|
3753
|
+
return /* @__PURE__ */ jsx23(Primitive.span, {
|
|
3582
3754
|
...props,
|
|
3583
3755
|
ref: forwardedRef,
|
|
3584
3756
|
style: {
|
|
@@ -3757,10 +3929,10 @@ function __spreadArray(to, from, pack) {
|
|
|
3757
3929
|
}
|
|
3758
3930
|
|
|
3759
3931
|
// ../../node_modules/.bun/react-remove-scroll@2.5.7+09a4a3ac15cb54ba/node_modules/react-remove-scroll/dist/es2015/Combination.js
|
|
3760
|
-
import * as
|
|
3932
|
+
import * as React35 from "react";
|
|
3761
3933
|
|
|
3762
3934
|
// ../../node_modules/.bun/react-remove-scroll@2.5.7+09a4a3ac15cb54ba/node_modules/react-remove-scroll/dist/es2015/UI.js
|
|
3763
|
-
import * as
|
|
3935
|
+
import * as React31 from "react";
|
|
3764
3936
|
|
|
3765
3937
|
// ../../node_modules/.bun/react-remove-scroll-bar@2.3.8+09a4a3ac15cb54ba/node_modules/react-remove-scroll-bar/dist/es2015/constants.js
|
|
3766
3938
|
var zeroRightClassName = "right-scroll-bar-position";
|
|
@@ -3804,8 +3976,8 @@ function useCallbackRef2(initialValue, callback) {
|
|
|
3804
3976
|
}
|
|
3805
3977
|
|
|
3806
3978
|
// ../../node_modules/.bun/use-callback-ref@1.3.3+09a4a3ac15cb54ba/node_modules/use-callback-ref/dist/es2015/useMergeRef.js
|
|
3807
|
-
import * as
|
|
3808
|
-
var useIsomorphicLayoutEffect = typeof window !== "undefined" ?
|
|
3979
|
+
import * as React29 from "react";
|
|
3980
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React29.useLayoutEffect : React29.useEffect;
|
|
3809
3981
|
var currentValues = new WeakMap;
|
|
3810
3982
|
function useMergeRefs(refs, defaultValue) {
|
|
3811
3983
|
var callbackRef = useCallbackRef2(defaultValue || null, function(newValue) {
|
|
@@ -3920,7 +4092,7 @@ function createSidecarMedium(options) {
|
|
|
3920
4092
|
return medium;
|
|
3921
4093
|
}
|
|
3922
4094
|
// ../../node_modules/.bun/use-sidecar@1.1.3+09a4a3ac15cb54ba/node_modules/use-sidecar/dist/es2015/exports.js
|
|
3923
|
-
import * as
|
|
4095
|
+
import * as React30 from "react";
|
|
3924
4096
|
var SideCar = function(_a) {
|
|
3925
4097
|
var sideCar = _a.sideCar, rest = __rest(_a, ["sideCar"]);
|
|
3926
4098
|
if (!sideCar) {
|
|
@@ -3930,7 +4102,7 @@ var SideCar = function(_a) {
|
|
|
3930
4102
|
if (!Target) {
|
|
3931
4103
|
throw new Error("Sidecar medium not found");
|
|
3932
4104
|
}
|
|
3933
|
-
return
|
|
4105
|
+
return React30.createElement(Target, __assign({}, rest));
|
|
3934
4106
|
};
|
|
3935
4107
|
SideCar.isSideCarExport = true;
|
|
3936
4108
|
function exportSidecar(medium, exported) {
|
|
@@ -3944,9 +4116,9 @@ var effectCar = createSidecarMedium();
|
|
|
3944
4116
|
var nothing = function() {
|
|
3945
4117
|
return;
|
|
3946
4118
|
};
|
|
3947
|
-
var RemoveScroll =
|
|
3948
|
-
var ref =
|
|
3949
|
-
var _a =
|
|
4119
|
+
var RemoveScroll = React31.forwardRef(function(props, parentRef) {
|
|
4120
|
+
var ref = React31.useRef(null);
|
|
4121
|
+
var _a = React31.useState({
|
|
3950
4122
|
onScrollCapture: nothing,
|
|
3951
4123
|
onWheelCapture: nothing,
|
|
3952
4124
|
onTouchMoveCapture: nothing
|
|
@@ -3955,7 +4127,7 @@ var RemoveScroll = React29.forwardRef(function(props, parentRef) {
|
|
|
3955
4127
|
var SideCar2 = sideCar;
|
|
3956
4128
|
var containerRef = useMergeRefs([ref, parentRef]);
|
|
3957
4129
|
var containerProps = __assign(__assign({}, rest), callbacks);
|
|
3958
|
-
return
|
|
4130
|
+
return React31.createElement(React31.Fragment, null, enabled && React31.createElement(SideCar2, { sideCar: effectCar, removeScrollBar, shards, noIsolation, inert, setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode }), forwardProps ? React31.cloneElement(React31.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : React31.createElement(Container, __assign({}, containerProps, { className, ref: containerRef }), children));
|
|
3959
4131
|
});
|
|
3960
4132
|
RemoveScroll.defaultProps = {
|
|
3961
4133
|
enabled: true,
|
|
@@ -3968,13 +4140,13 @@ RemoveScroll.classNames = {
|
|
|
3968
4140
|
};
|
|
3969
4141
|
|
|
3970
4142
|
// ../../node_modules/.bun/react-remove-scroll@2.5.7+09a4a3ac15cb54ba/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
|
|
3971
|
-
import * as
|
|
4143
|
+
import * as React34 from "react";
|
|
3972
4144
|
|
|
3973
4145
|
// ../../node_modules/.bun/react-remove-scroll-bar@2.3.8+09a4a3ac15cb54ba/node_modules/react-remove-scroll-bar/dist/es2015/component.js
|
|
3974
|
-
import * as
|
|
4146
|
+
import * as React33 from "react";
|
|
3975
4147
|
|
|
3976
4148
|
// ../../node_modules/.bun/react-style-singleton@2.2.3+09a4a3ac15cb54ba/node_modules/react-style-singleton/dist/es2015/hook.js
|
|
3977
|
-
import * as
|
|
4149
|
+
import * as React32 from "react";
|
|
3978
4150
|
|
|
3979
4151
|
// ../../node_modules/.bun/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js
|
|
3980
4152
|
var currentNonce;
|
|
@@ -4038,7 +4210,7 @@ var stylesheetSingleton = function() {
|
|
|
4038
4210
|
var styleHookSingleton = function() {
|
|
4039
4211
|
var sheet = stylesheetSingleton();
|
|
4040
4212
|
return function(styles, isDynamic) {
|
|
4041
|
-
|
|
4213
|
+
React32.useEffect(function() {
|
|
4042
4214
|
sheet.add(styles);
|
|
4043
4215
|
return function() {
|
|
4044
4216
|
sheet.remove();
|
|
@@ -4148,7 +4320,7 @@ var getCurrentUseCounter = function() {
|
|
|
4148
4320
|
return isFinite(counter) ? counter : 0;
|
|
4149
4321
|
};
|
|
4150
4322
|
var useLockAttribute = function() {
|
|
4151
|
-
|
|
4323
|
+
React33.useEffect(function() {
|
|
4152
4324
|
document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
|
|
4153
4325
|
return function() {
|
|
4154
4326
|
var newCounter = getCurrentUseCounter() - 1;
|
|
@@ -4163,10 +4335,10 @@ var useLockAttribute = function() {
|
|
|
4163
4335
|
var RemoveScrollBar = function(_a) {
|
|
4164
4336
|
var { noRelative, noImportant, gapMode: _b } = _a, gapMode = _b === undefined ? "margin" : _b;
|
|
4165
4337
|
useLockAttribute();
|
|
4166
|
-
var gap =
|
|
4338
|
+
var gap = React33.useMemo(function() {
|
|
4167
4339
|
return getGapWidth(gapMode);
|
|
4168
4340
|
}, [gapMode]);
|
|
4169
|
-
return
|
|
4341
|
+
return React33.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
|
|
4170
4342
|
};
|
|
4171
4343
|
|
|
4172
4344
|
// ../../node_modules/.bun/react-remove-scroll@2.5.7+09a4a3ac15cb54ba/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js
|
|
@@ -4299,16 +4471,16 @@ var generateStyle = function(id) {
|
|
|
4299
4471
|
var idCounter = 0;
|
|
4300
4472
|
var lockStack = [];
|
|
4301
4473
|
function RemoveScrollSideCar(props) {
|
|
4302
|
-
var shouldPreventQueue =
|
|
4303
|
-
var touchStartRef =
|
|
4304
|
-
var activeAxis =
|
|
4305
|
-
var id =
|
|
4306
|
-
var Style2 =
|
|
4307
|
-
var lastProps =
|
|
4308
|
-
|
|
4474
|
+
var shouldPreventQueue = React34.useRef([]);
|
|
4475
|
+
var touchStartRef = React34.useRef([0, 0]);
|
|
4476
|
+
var activeAxis = React34.useRef();
|
|
4477
|
+
var id = React34.useState(idCounter++)[0];
|
|
4478
|
+
var Style2 = React34.useState(styleSingleton)[0];
|
|
4479
|
+
var lastProps = React34.useRef(props);
|
|
4480
|
+
React34.useEffect(function() {
|
|
4309
4481
|
lastProps.current = props;
|
|
4310
4482
|
}, [props]);
|
|
4311
|
-
|
|
4483
|
+
React34.useEffect(function() {
|
|
4312
4484
|
if (props.inert) {
|
|
4313
4485
|
document.body.classList.add("block-interactivity-".concat(id));
|
|
4314
4486
|
var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
|
|
@@ -4324,7 +4496,7 @@ function RemoveScrollSideCar(props) {
|
|
|
4324
4496
|
}
|
|
4325
4497
|
return;
|
|
4326
4498
|
}, [props.inert, props.lockRef.current, props.shards]);
|
|
4327
|
-
var shouldCancelEvent =
|
|
4499
|
+
var shouldCancelEvent = React34.useCallback(function(event, parent) {
|
|
4328
4500
|
if ("touches" in event && event.touches.length === 2) {
|
|
4329
4501
|
return !lastProps.current.allowPinchZoom;
|
|
4330
4502
|
}
|
|
@@ -4360,7 +4532,7 @@ function RemoveScrollSideCar(props) {
|
|
|
4360
4532
|
var cancelingAxis = activeAxis.current || currentAxis;
|
|
4361
4533
|
return handleScroll(cancelingAxis, parent, event, cancelingAxis === "h" ? deltaX : deltaY, true);
|
|
4362
4534
|
}, []);
|
|
4363
|
-
var shouldPrevent =
|
|
4535
|
+
var shouldPrevent = React34.useCallback(function(_event) {
|
|
4364
4536
|
var event = _event;
|
|
4365
4537
|
if (!lockStack.length || lockStack[lockStack.length - 1] !== Style2) {
|
|
4366
4538
|
return;
|
|
@@ -4387,7 +4559,7 @@ function RemoveScrollSideCar(props) {
|
|
|
4387
4559
|
}
|
|
4388
4560
|
}
|
|
4389
4561
|
}, []);
|
|
4390
|
-
var shouldCancel =
|
|
4562
|
+
var shouldCancel = React34.useCallback(function(name, delta, target, should) {
|
|
4391
4563
|
var event = { name, delta, target, should, shadowParent: getOutermostShadowParent(target) };
|
|
4392
4564
|
shouldPreventQueue.current.push(event);
|
|
4393
4565
|
setTimeout(function() {
|
|
@@ -4396,17 +4568,17 @@ function RemoveScrollSideCar(props) {
|
|
|
4396
4568
|
});
|
|
4397
4569
|
}, 1);
|
|
4398
4570
|
}, []);
|
|
4399
|
-
var scrollTouchStart =
|
|
4571
|
+
var scrollTouchStart = React34.useCallback(function(event) {
|
|
4400
4572
|
touchStartRef.current = getTouchXY(event);
|
|
4401
4573
|
activeAxis.current = undefined;
|
|
4402
4574
|
}, []);
|
|
4403
|
-
var scrollWheel =
|
|
4575
|
+
var scrollWheel = React34.useCallback(function(event) {
|
|
4404
4576
|
shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
4405
4577
|
}, []);
|
|
4406
|
-
var scrollTouchMove =
|
|
4578
|
+
var scrollTouchMove = React34.useCallback(function(event) {
|
|
4407
4579
|
shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
4408
4580
|
}, []);
|
|
4409
|
-
|
|
4581
|
+
React34.useEffect(function() {
|
|
4410
4582
|
lockStack.push(Style2);
|
|
4411
4583
|
props.setCallbacks({
|
|
4412
4584
|
onScrollCapture: scrollWheel,
|
|
@@ -4426,7 +4598,7 @@ function RemoveScrollSideCar(props) {
|
|
|
4426
4598
|
};
|
|
4427
4599
|
}, []);
|
|
4428
4600
|
var { removeScrollBar, inert } = props;
|
|
4429
|
-
return
|
|
4601
|
+
return React34.createElement(React34.Fragment, null, inert ? React34.createElement(Style2, { styles: generateStyle(id) }) : null, removeScrollBar ? React34.createElement(RemoveScrollBar, { gapMode: props.gapMode }) : null);
|
|
4430
4602
|
}
|
|
4431
4603
|
function getOutermostShadowParent(node) {
|
|
4432
4604
|
var shadowParent = null;
|
|
@@ -4444,14 +4616,14 @@ function getOutermostShadowParent(node) {
|
|
|
4444
4616
|
var sidecar_default = exportSidecar(effectCar, RemoveScrollSideCar);
|
|
4445
4617
|
|
|
4446
4618
|
// ../../node_modules/.bun/react-remove-scroll@2.5.7+09a4a3ac15cb54ba/node_modules/react-remove-scroll/dist/es2015/Combination.js
|
|
4447
|
-
var ReactRemoveScroll =
|
|
4448
|
-
return
|
|
4619
|
+
var ReactRemoveScroll = React35.forwardRef(function(props, ref) {
|
|
4620
|
+
return React35.createElement(RemoveScroll, __assign({}, props, { ref, sideCar: sidecar_default }));
|
|
4449
4621
|
});
|
|
4450
4622
|
ReactRemoveScroll.classNames = RemoveScroll.classNames;
|
|
4451
4623
|
var Combination_default = ReactRemoveScroll;
|
|
4452
4624
|
|
|
4453
4625
|
// ../../node_modules/.bun/@radix-ui+react-select@2.1.1+f178f9b1194b24ba/node_modules/@radix-ui/react-select/dist/index.mjs
|
|
4454
|
-
import { Fragment as
|
|
4626
|
+
import { Fragment as Fragment8, jsx as jsx24, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
4455
4627
|
"use client";
|
|
4456
4628
|
var OPEN_KEYS = [" ", "Enter", "ArrowUp", "ArrowDown"];
|
|
4457
4629
|
var SELECTION_KEYS = [" ", "Enter"];
|
|
@@ -4481,9 +4653,9 @@ var Select = (props) => {
|
|
|
4481
4653
|
required
|
|
4482
4654
|
} = props;
|
|
4483
4655
|
const popperScope = usePopperScope(__scopeSelect);
|
|
4484
|
-
const [trigger, setTrigger] =
|
|
4485
|
-
const [valueNode, setValueNode] =
|
|
4486
|
-
const [valueNodeHasChildren, setValueNodeHasChildren] =
|
|
4656
|
+
const [trigger, setTrigger] = React36.useState(null);
|
|
4657
|
+
const [valueNode, setValueNode] = React36.useState(null);
|
|
4658
|
+
const [valueNodeHasChildren, setValueNodeHasChildren] = React36.useState(false);
|
|
4487
4659
|
const direction = useDirection(dir);
|
|
4488
4660
|
const [open = false, setOpen] = useControllableState({
|
|
4489
4661
|
prop: openProp,
|
|
@@ -4495,11 +4667,11 @@ var Select = (props) => {
|
|
|
4495
4667
|
defaultProp: defaultValue,
|
|
4496
4668
|
onChange: onValueChange
|
|
4497
4669
|
});
|
|
4498
|
-
const triggerPointerDownPosRef =
|
|
4670
|
+
const triggerPointerDownPosRef = React36.useRef(null);
|
|
4499
4671
|
const isFormControl = trigger ? Boolean(trigger.closest("form")) : true;
|
|
4500
|
-
const [nativeOptionsSet, setNativeOptionsSet] =
|
|
4672
|
+
const [nativeOptionsSet, setNativeOptionsSet] = React36.useState(/* @__PURE__ */ new Set);
|
|
4501
4673
|
const nativeSelectKey = Array.from(nativeOptionsSet).map((option) => option.props.value).join(";");
|
|
4502
|
-
return /* @__PURE__ */
|
|
4674
|
+
return /* @__PURE__ */ jsx24(Root2, { ...popperScope, children: /* @__PURE__ */ jsxs4(SelectProvider, {
|
|
4503
4675
|
required,
|
|
4504
4676
|
scope: __scopeSelect,
|
|
4505
4677
|
trigger,
|
|
@@ -4517,12 +4689,12 @@ var Select = (props) => {
|
|
|
4517
4689
|
triggerPointerDownPosRef,
|
|
4518
4690
|
disabled,
|
|
4519
4691
|
children: [
|
|
4520
|
-
/* @__PURE__ */
|
|
4692
|
+
/* @__PURE__ */ jsx24(Collection.Provider, { scope: __scopeSelect, children: /* @__PURE__ */ jsx24(SelectNativeOptionsProvider, {
|
|
4521
4693
|
scope: props.__scopeSelect,
|
|
4522
|
-
onNativeOptionAdd:
|
|
4694
|
+
onNativeOptionAdd: React36.useCallback((option) => {
|
|
4523
4695
|
setNativeOptionsSet((prev) => new Set(prev).add(option));
|
|
4524
4696
|
}, []),
|
|
4525
|
-
onNativeOptionRemove:
|
|
4697
|
+
onNativeOptionRemove: React36.useCallback((option) => {
|
|
4526
4698
|
setNativeOptionsSet((prev) => {
|
|
4527
4699
|
const optionsSet = new Set(prev);
|
|
4528
4700
|
optionsSet.delete(option);
|
|
@@ -4541,7 +4713,7 @@ var Select = (props) => {
|
|
|
4541
4713
|
onChange: (event) => setValue(event.target.value),
|
|
4542
4714
|
disabled,
|
|
4543
4715
|
children: [
|
|
4544
|
-
value === undefined ? /* @__PURE__ */
|
|
4716
|
+
value === undefined ? /* @__PURE__ */ jsx24("option", { value: "" }) : null,
|
|
4545
4717
|
Array.from(nativeOptionsSet)
|
|
4546
4718
|
]
|
|
4547
4719
|
}, nativeSelectKey) : null
|
|
@@ -4550,12 +4722,12 @@ var Select = (props) => {
|
|
|
4550
4722
|
};
|
|
4551
4723
|
Select.displayName = SELECT_NAME;
|
|
4552
4724
|
var TRIGGER_NAME = "SelectTrigger";
|
|
4553
|
-
var SelectTrigger =
|
|
4725
|
+
var SelectTrigger = React36.forwardRef((props, forwardedRef) => {
|
|
4554
4726
|
const { __scopeSelect, disabled = false, ...triggerProps } = props;
|
|
4555
4727
|
const popperScope = usePopperScope(__scopeSelect);
|
|
4556
4728
|
const context = useSelectContext(TRIGGER_NAME, __scopeSelect);
|
|
4557
4729
|
const isDisabled = context.disabled || disabled;
|
|
4558
|
-
const composedRefs =
|
|
4730
|
+
const composedRefs = useComposedRefs2(forwardedRef, context.onTriggerChange);
|
|
4559
4731
|
const getItems = useCollection(__scopeSelect);
|
|
4560
4732
|
const [searchRef, handleTypeaheadSearch, resetTypeahead] = useTypeaheadSearch((search) => {
|
|
4561
4733
|
const enabledItems = getItems().filter((item) => !item.disabled);
|
|
@@ -4571,7 +4743,7 @@ var SelectTrigger = React34.forwardRef((props, forwardedRef) => {
|
|
|
4571
4743
|
resetTypeahead();
|
|
4572
4744
|
}
|
|
4573
4745
|
};
|
|
4574
|
-
return /* @__PURE__ */
|
|
4746
|
+
return /* @__PURE__ */ jsx24(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx24(Primitive.button, {
|
|
4575
4747
|
type: "button",
|
|
4576
4748
|
role: "combobox",
|
|
4577
4749
|
"aria-controls": context.contentId,
|
|
@@ -4618,52 +4790,52 @@ var SelectTrigger = React34.forwardRef((props, forwardedRef) => {
|
|
|
4618
4790
|
});
|
|
4619
4791
|
SelectTrigger.displayName = TRIGGER_NAME;
|
|
4620
4792
|
var VALUE_NAME = "SelectValue";
|
|
4621
|
-
var SelectValue =
|
|
4793
|
+
var SelectValue = React36.forwardRef((props, forwardedRef) => {
|
|
4622
4794
|
const { __scopeSelect, className, style, children, placeholder = "", ...valueProps } = props;
|
|
4623
4795
|
const context = useSelectContext(VALUE_NAME, __scopeSelect);
|
|
4624
4796
|
const { onValueNodeHasChildrenChange } = context;
|
|
4625
4797
|
const hasChildren = children !== undefined;
|
|
4626
|
-
const composedRefs =
|
|
4798
|
+
const composedRefs = useComposedRefs2(forwardedRef, context.onValueNodeChange);
|
|
4627
4799
|
useLayoutEffect2(() => {
|
|
4628
4800
|
onValueNodeHasChildrenChange(hasChildren);
|
|
4629
4801
|
}, [onValueNodeHasChildrenChange, hasChildren]);
|
|
4630
|
-
return /* @__PURE__ */
|
|
4802
|
+
return /* @__PURE__ */ jsx24(Primitive.span, {
|
|
4631
4803
|
...valueProps,
|
|
4632
4804
|
ref: composedRefs,
|
|
4633
4805
|
style: { pointerEvents: "none" },
|
|
4634
|
-
children: shouldShowPlaceholder(context.value) ? /* @__PURE__ */
|
|
4806
|
+
children: shouldShowPlaceholder(context.value) ? /* @__PURE__ */ jsx24(Fragment8, { children: placeholder }) : children
|
|
4635
4807
|
});
|
|
4636
4808
|
});
|
|
4637
4809
|
SelectValue.displayName = VALUE_NAME;
|
|
4638
4810
|
var ICON_NAME = "SelectIcon";
|
|
4639
|
-
var SelectIcon =
|
|
4811
|
+
var SelectIcon = React36.forwardRef((props, forwardedRef) => {
|
|
4640
4812
|
const { __scopeSelect, children, ...iconProps } = props;
|
|
4641
|
-
return /* @__PURE__ */
|
|
4813
|
+
return /* @__PURE__ */ jsx24(Primitive.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "▼" });
|
|
4642
4814
|
});
|
|
4643
4815
|
SelectIcon.displayName = ICON_NAME;
|
|
4644
4816
|
var PORTAL_NAME2 = "SelectPortal";
|
|
4645
4817
|
var SelectPortal = (props) => {
|
|
4646
|
-
return /* @__PURE__ */
|
|
4818
|
+
return /* @__PURE__ */ jsx24(Portal, { asChild: true, ...props });
|
|
4647
4819
|
};
|
|
4648
4820
|
SelectPortal.displayName = PORTAL_NAME2;
|
|
4649
4821
|
var CONTENT_NAME2 = "SelectContent";
|
|
4650
|
-
var SelectContent =
|
|
4822
|
+
var SelectContent = React36.forwardRef((props, forwardedRef) => {
|
|
4651
4823
|
const context = useSelectContext(CONTENT_NAME2, props.__scopeSelect);
|
|
4652
|
-
const [fragment, setFragment] =
|
|
4824
|
+
const [fragment, setFragment] = React36.useState();
|
|
4653
4825
|
useLayoutEffect2(() => {
|
|
4654
4826
|
setFragment(new DocumentFragment);
|
|
4655
4827
|
}, []);
|
|
4656
4828
|
if (!context.open) {
|
|
4657
4829
|
const frag = fragment;
|
|
4658
|
-
return frag ? ReactDOM4.createPortal(/* @__PURE__ */
|
|
4830
|
+
return frag ? ReactDOM4.createPortal(/* @__PURE__ */ jsx24(SelectContentProvider, { scope: props.__scopeSelect, children: /* @__PURE__ */ jsx24(Collection.Slot, { scope: props.__scopeSelect, children: /* @__PURE__ */ jsx24("div", { children: props.children }) }) }), frag) : null;
|
|
4659
4831
|
}
|
|
4660
|
-
return /* @__PURE__ */
|
|
4832
|
+
return /* @__PURE__ */ jsx24(SelectContentImpl, { ...props, ref: forwardedRef });
|
|
4661
4833
|
});
|
|
4662
4834
|
SelectContent.displayName = CONTENT_NAME2;
|
|
4663
4835
|
var CONTENT_MARGIN = 10;
|
|
4664
4836
|
var [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME2);
|
|
4665
4837
|
var CONTENT_IMPL_NAME = "SelectContentImpl";
|
|
4666
|
-
var SelectContentImpl =
|
|
4838
|
+
var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
4667
4839
|
const {
|
|
4668
4840
|
__scopeSelect,
|
|
4669
4841
|
position = "item-aligned",
|
|
@@ -4683,20 +4855,20 @@ var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
4683
4855
|
...contentProps
|
|
4684
4856
|
} = props;
|
|
4685
4857
|
const context = useSelectContext(CONTENT_NAME2, __scopeSelect);
|
|
4686
|
-
const [content, setContent] =
|
|
4687
|
-
const [viewport, setViewport] =
|
|
4688
|
-
const composedRefs =
|
|
4689
|
-
const [selectedItem, setSelectedItem] =
|
|
4690
|
-
const [selectedItemText, setSelectedItemText] =
|
|
4858
|
+
const [content, setContent] = React36.useState(null);
|
|
4859
|
+
const [viewport, setViewport] = React36.useState(null);
|
|
4860
|
+
const composedRefs = useComposedRefs2(forwardedRef, (node) => setContent(node));
|
|
4861
|
+
const [selectedItem, setSelectedItem] = React36.useState(null);
|
|
4862
|
+
const [selectedItemText, setSelectedItemText] = React36.useState(null);
|
|
4691
4863
|
const getItems = useCollection(__scopeSelect);
|
|
4692
|
-
const [isPositioned, setIsPositioned] =
|
|
4693
|
-
const firstValidItemFoundRef =
|
|
4694
|
-
|
|
4864
|
+
const [isPositioned, setIsPositioned] = React36.useState(false);
|
|
4865
|
+
const firstValidItemFoundRef = React36.useRef(false);
|
|
4866
|
+
React36.useEffect(() => {
|
|
4695
4867
|
if (content)
|
|
4696
4868
|
return hideOthers(content);
|
|
4697
4869
|
}, [content]);
|
|
4698
4870
|
useFocusGuards();
|
|
4699
|
-
const focusFirst2 =
|
|
4871
|
+
const focusFirst2 = React36.useCallback((candidates) => {
|
|
4700
4872
|
const [firstItem, ...restItems] = getItems().map((item) => item.ref.current);
|
|
4701
4873
|
const [lastItem] = restItems.slice(-1);
|
|
4702
4874
|
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
|
|
@@ -4713,14 +4885,14 @@ var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
4713
4885
|
return;
|
|
4714
4886
|
}
|
|
4715
4887
|
}, [getItems, viewport]);
|
|
4716
|
-
const focusSelectedItem =
|
|
4717
|
-
|
|
4888
|
+
const focusSelectedItem = React36.useCallback(() => focusFirst2([selectedItem, content]), [focusFirst2, selectedItem, content]);
|
|
4889
|
+
React36.useEffect(() => {
|
|
4718
4890
|
if (isPositioned) {
|
|
4719
4891
|
focusSelectedItem();
|
|
4720
4892
|
}
|
|
4721
4893
|
}, [isPositioned, focusSelectedItem]);
|
|
4722
4894
|
const { onOpenChange, triggerPointerDownPosRef } = context;
|
|
4723
|
-
|
|
4895
|
+
React36.useEffect(() => {
|
|
4724
4896
|
if (content) {
|
|
4725
4897
|
let pointerMoveDelta = { x: 0, y: 0 };
|
|
4726
4898
|
const handlePointerMove = (event) => {
|
|
@@ -4750,7 +4922,7 @@ var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
4750
4922
|
};
|
|
4751
4923
|
}
|
|
4752
4924
|
}, [content, onOpenChange, triggerPointerDownPosRef]);
|
|
4753
|
-
|
|
4925
|
+
React36.useEffect(() => {
|
|
4754
4926
|
const close = () => onOpenChange(false);
|
|
4755
4927
|
window.addEventListener("blur", close);
|
|
4756
4928
|
window.addEventListener("resize", close);
|
|
@@ -4767,7 +4939,7 @@ var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
4767
4939
|
setTimeout(() => nextItem.ref.current.focus());
|
|
4768
4940
|
}
|
|
4769
4941
|
});
|
|
4770
|
-
const itemRefCallback =
|
|
4942
|
+
const itemRefCallback = React36.useCallback((node, value, disabled) => {
|
|
4771
4943
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
4772
4944
|
const isSelectedItem = context.value !== undefined && context.value === value;
|
|
4773
4945
|
if (isSelectedItem || isFirstValidItem) {
|
|
@@ -4776,8 +4948,8 @@ var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
4776
4948
|
firstValidItemFoundRef.current = true;
|
|
4777
4949
|
}
|
|
4778
4950
|
}, [context.value]);
|
|
4779
|
-
const handleItemLeave =
|
|
4780
|
-
const itemTextRefCallback =
|
|
4951
|
+
const handleItemLeave = React36.useCallback(() => content?.focus(), [content]);
|
|
4952
|
+
const itemTextRefCallback = React36.useCallback((node, value, disabled) => {
|
|
4781
4953
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
4782
4954
|
const isSelectedItem = context.value !== undefined && context.value === value;
|
|
4783
4955
|
if (isSelectedItem || isFirstValidItem) {
|
|
@@ -4797,7 +4969,7 @@ var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
4797
4969
|
hideWhenDetached,
|
|
4798
4970
|
avoidCollisions
|
|
4799
4971
|
} : {};
|
|
4800
|
-
return /* @__PURE__ */
|
|
4972
|
+
return /* @__PURE__ */ jsx24(SelectContentProvider, {
|
|
4801
4973
|
scope: __scopeSelect,
|
|
4802
4974
|
content,
|
|
4803
4975
|
viewport,
|
|
@@ -4811,7 +4983,7 @@ var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
4811
4983
|
position,
|
|
4812
4984
|
isPositioned,
|
|
4813
4985
|
searchRef,
|
|
4814
|
-
children: /* @__PURE__ */
|
|
4986
|
+
children: /* @__PURE__ */ jsx24(Combination_default, { as: Slot2, allowPinchZoom: true, children: /* @__PURE__ */ jsx24(FocusScope, {
|
|
4815
4987
|
asChild: true,
|
|
4816
4988
|
trapped: context.open,
|
|
4817
4989
|
onMountAutoFocus: (event) => {
|
|
@@ -4821,14 +4993,14 @@ var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
4821
4993
|
context.trigger?.focus({ preventScroll: true });
|
|
4822
4994
|
event.preventDefault();
|
|
4823
4995
|
}),
|
|
4824
|
-
children: /* @__PURE__ */
|
|
4996
|
+
children: /* @__PURE__ */ jsx24(DismissableLayer, {
|
|
4825
4997
|
asChild: true,
|
|
4826
4998
|
disableOutsidePointerEvents: true,
|
|
4827
4999
|
onEscapeKeyDown,
|
|
4828
5000
|
onPointerDownOutside,
|
|
4829
5001
|
onFocusOutside: (event) => event.preventDefault(),
|
|
4830
5002
|
onDismiss: () => context.onOpenChange(false),
|
|
4831
|
-
children: /* @__PURE__ */
|
|
5003
|
+
children: /* @__PURE__ */ jsx24(SelectPosition, {
|
|
4832
5004
|
role: "listbox",
|
|
4833
5005
|
id: context.contentId,
|
|
4834
5006
|
"data-state": context.open ? "open" : "closed",
|
|
@@ -4872,18 +5044,18 @@ var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
4872
5044
|
});
|
|
4873
5045
|
SelectContentImpl.displayName = CONTENT_IMPL_NAME;
|
|
4874
5046
|
var ITEM_ALIGNED_POSITION_NAME = "SelectItemAlignedPosition";
|
|
4875
|
-
var SelectItemAlignedPosition =
|
|
5047
|
+
var SelectItemAlignedPosition = React36.forwardRef((props, forwardedRef) => {
|
|
4876
5048
|
const { __scopeSelect, onPlaced, ...popperProps } = props;
|
|
4877
5049
|
const context = useSelectContext(CONTENT_NAME2, __scopeSelect);
|
|
4878
5050
|
const contentContext = useSelectContentContext(CONTENT_NAME2, __scopeSelect);
|
|
4879
|
-
const [contentWrapper, setContentWrapper] =
|
|
4880
|
-
const [content, setContent] =
|
|
4881
|
-
const composedRefs =
|
|
5051
|
+
const [contentWrapper, setContentWrapper] = React36.useState(null);
|
|
5052
|
+
const [content, setContent] = React36.useState(null);
|
|
5053
|
+
const composedRefs = useComposedRefs2(forwardedRef, (node) => setContent(node));
|
|
4882
5054
|
const getItems = useCollection(__scopeSelect);
|
|
4883
|
-
const shouldExpandOnScrollRef =
|
|
4884
|
-
const shouldRepositionRef =
|
|
5055
|
+
const shouldExpandOnScrollRef = React36.useRef(false);
|
|
5056
|
+
const shouldRepositionRef = React36.useRef(true);
|
|
4885
5057
|
const { viewport, selectedItem, selectedItemText, focusSelectedItem } = contentContext;
|
|
4886
|
-
const position =
|
|
5058
|
+
const position = React36.useCallback(() => {
|
|
4887
5059
|
if (context.trigger && context.valueNode && contentWrapper && content && viewport && selectedItem && selectedItemText) {
|
|
4888
5060
|
const triggerRect = context.trigger.getBoundingClientRect();
|
|
4889
5061
|
const contentRect = content.getBoundingClientRect();
|
|
@@ -4964,24 +5136,24 @@ var SelectItemAlignedPosition = React34.forwardRef((props, forwardedRef) => {
|
|
|
4964
5136
|
onPlaced
|
|
4965
5137
|
]);
|
|
4966
5138
|
useLayoutEffect2(() => position(), [position]);
|
|
4967
|
-
const [contentZIndex, setContentZIndex] =
|
|
5139
|
+
const [contentZIndex, setContentZIndex] = React36.useState();
|
|
4968
5140
|
useLayoutEffect2(() => {
|
|
4969
5141
|
if (content)
|
|
4970
5142
|
setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
4971
5143
|
}, [content]);
|
|
4972
|
-
const handleScrollButtonChange =
|
|
5144
|
+
const handleScrollButtonChange = React36.useCallback((node) => {
|
|
4973
5145
|
if (node && shouldRepositionRef.current === true) {
|
|
4974
5146
|
position();
|
|
4975
5147
|
focusSelectedItem?.();
|
|
4976
5148
|
shouldRepositionRef.current = false;
|
|
4977
5149
|
}
|
|
4978
5150
|
}, [position, focusSelectedItem]);
|
|
4979
|
-
return /* @__PURE__ */
|
|
5151
|
+
return /* @__PURE__ */ jsx24(SelectViewportProvider, {
|
|
4980
5152
|
scope: __scopeSelect,
|
|
4981
5153
|
contentWrapper,
|
|
4982
5154
|
shouldExpandOnScrollRef,
|
|
4983
5155
|
onScrollButtonChange: handleScrollButtonChange,
|
|
4984
|
-
children: /* @__PURE__ */
|
|
5156
|
+
children: /* @__PURE__ */ jsx24("div", {
|
|
4985
5157
|
ref: setContentWrapper,
|
|
4986
5158
|
style: {
|
|
4987
5159
|
display: "flex",
|
|
@@ -4989,7 +5161,7 @@ var SelectItemAlignedPosition = React34.forwardRef((props, forwardedRef) => {
|
|
|
4989
5161
|
position: "fixed",
|
|
4990
5162
|
zIndex: contentZIndex
|
|
4991
5163
|
},
|
|
4992
|
-
children: /* @__PURE__ */
|
|
5164
|
+
children: /* @__PURE__ */ jsx24(Primitive.div, {
|
|
4993
5165
|
...popperProps,
|
|
4994
5166
|
ref: composedRefs,
|
|
4995
5167
|
style: {
|
|
@@ -5003,7 +5175,7 @@ var SelectItemAlignedPosition = React34.forwardRef((props, forwardedRef) => {
|
|
|
5003
5175
|
});
|
|
5004
5176
|
SelectItemAlignedPosition.displayName = ITEM_ALIGNED_POSITION_NAME;
|
|
5005
5177
|
var POPPER_POSITION_NAME = "SelectPopperPosition";
|
|
5006
|
-
var SelectPopperPosition =
|
|
5178
|
+
var SelectPopperPosition = React36.forwardRef((props, forwardedRef) => {
|
|
5007
5179
|
const {
|
|
5008
5180
|
__scopeSelect,
|
|
5009
5181
|
align = "start",
|
|
@@ -5011,7 +5183,7 @@ var SelectPopperPosition = React34.forwardRef((props, forwardedRef) => {
|
|
|
5011
5183
|
...popperProps
|
|
5012
5184
|
} = props;
|
|
5013
5185
|
const popperScope = usePopperScope(__scopeSelect);
|
|
5014
|
-
return /* @__PURE__ */
|
|
5186
|
+
return /* @__PURE__ */ jsx24(Content, {
|
|
5015
5187
|
...popperScope,
|
|
5016
5188
|
...popperProps,
|
|
5017
5189
|
ref: forwardedRef,
|
|
@@ -5033,20 +5205,20 @@ var SelectPopperPosition = React34.forwardRef((props, forwardedRef) => {
|
|
|
5033
5205
|
SelectPopperPosition.displayName = POPPER_POSITION_NAME;
|
|
5034
5206
|
var [SelectViewportProvider, useSelectViewportContext] = createSelectContext(CONTENT_NAME2, {});
|
|
5035
5207
|
var VIEWPORT_NAME = "SelectViewport";
|
|
5036
|
-
var SelectViewport =
|
|
5208
|
+
var SelectViewport = React36.forwardRef((props, forwardedRef) => {
|
|
5037
5209
|
const { __scopeSelect, nonce, ...viewportProps } = props;
|
|
5038
5210
|
const contentContext = useSelectContentContext(VIEWPORT_NAME, __scopeSelect);
|
|
5039
5211
|
const viewportContext = useSelectViewportContext(VIEWPORT_NAME, __scopeSelect);
|
|
5040
|
-
const composedRefs =
|
|
5041
|
-
const prevScrollTopRef =
|
|
5042
|
-
return /* @__PURE__ */ jsxs4(
|
|
5043
|
-
/* @__PURE__ */
|
|
5212
|
+
const composedRefs = useComposedRefs2(forwardedRef, contentContext.onViewportChange);
|
|
5213
|
+
const prevScrollTopRef = React36.useRef(0);
|
|
5214
|
+
return /* @__PURE__ */ jsxs4(Fragment8, { children: [
|
|
5215
|
+
/* @__PURE__ */ jsx24("style", {
|
|
5044
5216
|
dangerouslySetInnerHTML: {
|
|
5045
5217
|
__html: `[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`
|
|
5046
5218
|
},
|
|
5047
5219
|
nonce
|
|
5048
5220
|
}),
|
|
5049
|
-
/* @__PURE__ */
|
|
5221
|
+
/* @__PURE__ */ jsx24(Collection.Slot, { scope: __scopeSelect, children: /* @__PURE__ */ jsx24(Primitive.div, {
|
|
5050
5222
|
"data-radix-select-viewport": "",
|
|
5051
5223
|
role: "presentation",
|
|
5052
5224
|
...viewportProps,
|
|
@@ -5087,22 +5259,22 @@ var SelectViewport = React34.forwardRef((props, forwardedRef) => {
|
|
|
5087
5259
|
SelectViewport.displayName = VIEWPORT_NAME;
|
|
5088
5260
|
var GROUP_NAME = "SelectGroup";
|
|
5089
5261
|
var [SelectGroupContextProvider, useSelectGroupContext] = createSelectContext(GROUP_NAME);
|
|
5090
|
-
var SelectGroup =
|
|
5262
|
+
var SelectGroup = React36.forwardRef((props, forwardedRef) => {
|
|
5091
5263
|
const { __scopeSelect, ...groupProps } = props;
|
|
5092
5264
|
const groupId = useId();
|
|
5093
|
-
return /* @__PURE__ */
|
|
5265
|
+
return /* @__PURE__ */ jsx24(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx24(Primitive.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) });
|
|
5094
5266
|
});
|
|
5095
5267
|
SelectGroup.displayName = GROUP_NAME;
|
|
5096
5268
|
var LABEL_NAME = "SelectLabel";
|
|
5097
|
-
var SelectLabel =
|
|
5269
|
+
var SelectLabel = React36.forwardRef((props, forwardedRef) => {
|
|
5098
5270
|
const { __scopeSelect, ...labelProps } = props;
|
|
5099
5271
|
const groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect);
|
|
5100
|
-
return /* @__PURE__ */
|
|
5272
|
+
return /* @__PURE__ */ jsx24(Primitive.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
|
|
5101
5273
|
});
|
|
5102
5274
|
SelectLabel.displayName = LABEL_NAME;
|
|
5103
5275
|
var ITEM_NAME = "SelectItem";
|
|
5104
5276
|
var [SelectItemContextProvider, useSelectItemContext] = createSelectContext(ITEM_NAME);
|
|
5105
|
-
var SelectItem =
|
|
5277
|
+
var SelectItem = React36.forwardRef((props, forwardedRef) => {
|
|
5106
5278
|
const {
|
|
5107
5279
|
__scopeSelect,
|
|
5108
5280
|
value,
|
|
@@ -5113,9 +5285,9 @@ var SelectItem = React34.forwardRef((props, forwardedRef) => {
|
|
|
5113
5285
|
const context = useSelectContext(ITEM_NAME, __scopeSelect);
|
|
5114
5286
|
const contentContext = useSelectContentContext(ITEM_NAME, __scopeSelect);
|
|
5115
5287
|
const isSelected = context.value === value;
|
|
5116
|
-
const [textValue, setTextValue] =
|
|
5117
|
-
const [isFocused, setIsFocused] =
|
|
5118
|
-
const composedRefs =
|
|
5288
|
+
const [textValue, setTextValue] = React36.useState(textValueProp ?? "");
|
|
5289
|
+
const [isFocused, setIsFocused] = React36.useState(false);
|
|
5290
|
+
const composedRefs = useComposedRefs2(forwardedRef, (node) => contentContext.itemRefCallback?.(node, value, disabled));
|
|
5119
5291
|
const textId = useId();
|
|
5120
5292
|
const handleSelect = () => {
|
|
5121
5293
|
if (!disabled) {
|
|
@@ -5126,21 +5298,21 @@ var SelectItem = React34.forwardRef((props, forwardedRef) => {
|
|
|
5126
5298
|
if (value === "") {
|
|
5127
5299
|
throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");
|
|
5128
5300
|
}
|
|
5129
|
-
return /* @__PURE__ */
|
|
5301
|
+
return /* @__PURE__ */ jsx24(SelectItemContextProvider, {
|
|
5130
5302
|
scope: __scopeSelect,
|
|
5131
5303
|
value,
|
|
5132
5304
|
disabled,
|
|
5133
5305
|
textId,
|
|
5134
5306
|
isSelected,
|
|
5135
|
-
onItemTextChange:
|
|
5307
|
+
onItemTextChange: React36.useCallback((node) => {
|
|
5136
5308
|
setTextValue((prevTextValue) => prevTextValue || (node?.textContent ?? "").trim());
|
|
5137
5309
|
}, []),
|
|
5138
|
-
children: /* @__PURE__ */
|
|
5310
|
+
children: /* @__PURE__ */ jsx24(Collection.ItemSlot, {
|
|
5139
5311
|
scope: __scopeSelect,
|
|
5140
5312
|
value,
|
|
5141
5313
|
disabled,
|
|
5142
5314
|
textValue,
|
|
5143
|
-
children: /* @__PURE__ */
|
|
5315
|
+
children: /* @__PURE__ */ jsx24(Primitive.div, {
|
|
5144
5316
|
role: "option",
|
|
5145
5317
|
"aria-labelledby": textId,
|
|
5146
5318
|
"data-highlighted": isFocused ? "" : undefined,
|
|
@@ -5181,40 +5353,40 @@ var SelectItem = React34.forwardRef((props, forwardedRef) => {
|
|
|
5181
5353
|
});
|
|
5182
5354
|
SelectItem.displayName = ITEM_NAME;
|
|
5183
5355
|
var ITEM_TEXT_NAME = "SelectItemText";
|
|
5184
|
-
var SelectItemText =
|
|
5356
|
+
var SelectItemText = React36.forwardRef((props, forwardedRef) => {
|
|
5185
5357
|
const { __scopeSelect, className, style, ...itemTextProps } = props;
|
|
5186
5358
|
const context = useSelectContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
5187
5359
|
const contentContext = useSelectContentContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
5188
5360
|
const itemContext = useSelectItemContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
5189
5361
|
const nativeOptionsContext = useSelectNativeOptionsContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
5190
|
-
const [itemTextNode, setItemTextNode] =
|
|
5191
|
-
const composedRefs =
|
|
5362
|
+
const [itemTextNode, setItemTextNode] = React36.useState(null);
|
|
5363
|
+
const composedRefs = useComposedRefs2(forwardedRef, (node) => setItemTextNode(node), itemContext.onItemTextChange, (node) => contentContext.itemTextRefCallback?.(node, itemContext.value, itemContext.disabled));
|
|
5192
5364
|
const textContent = itemTextNode?.textContent;
|
|
5193
|
-
const nativeOption =
|
|
5365
|
+
const nativeOption = React36.useMemo(() => /* @__PURE__ */ jsx24("option", { value: itemContext.value, disabled: itemContext.disabled, children: textContent }, itemContext.value), [itemContext.disabled, itemContext.value, textContent]);
|
|
5194
5366
|
const { onNativeOptionAdd, onNativeOptionRemove } = nativeOptionsContext;
|
|
5195
5367
|
useLayoutEffect2(() => {
|
|
5196
5368
|
onNativeOptionAdd(nativeOption);
|
|
5197
5369
|
return () => onNativeOptionRemove(nativeOption);
|
|
5198
5370
|
}, [onNativeOptionAdd, onNativeOptionRemove, nativeOption]);
|
|
5199
|
-
return /* @__PURE__ */ jsxs4(
|
|
5200
|
-
/* @__PURE__ */
|
|
5371
|
+
return /* @__PURE__ */ jsxs4(Fragment8, { children: [
|
|
5372
|
+
/* @__PURE__ */ jsx24(Primitive.span, { id: itemContext.textId, ...itemTextProps, ref: composedRefs }),
|
|
5201
5373
|
itemContext.isSelected && context.valueNode && !context.valueNodeHasChildren ? ReactDOM4.createPortal(itemTextProps.children, context.valueNode) : null
|
|
5202
5374
|
] });
|
|
5203
5375
|
});
|
|
5204
5376
|
SelectItemText.displayName = ITEM_TEXT_NAME;
|
|
5205
5377
|
var ITEM_INDICATOR_NAME = "SelectItemIndicator";
|
|
5206
|
-
var SelectItemIndicator =
|
|
5378
|
+
var SelectItemIndicator = React36.forwardRef((props, forwardedRef) => {
|
|
5207
5379
|
const { __scopeSelect, ...itemIndicatorProps } = props;
|
|
5208
5380
|
const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME, __scopeSelect);
|
|
5209
|
-
return itemContext.isSelected ? /* @__PURE__ */
|
|
5381
|
+
return itemContext.isSelected ? /* @__PURE__ */ jsx24(Primitive.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null;
|
|
5210
5382
|
});
|
|
5211
5383
|
SelectItemIndicator.displayName = ITEM_INDICATOR_NAME;
|
|
5212
5384
|
var SCROLL_UP_BUTTON_NAME = "SelectScrollUpButton";
|
|
5213
|
-
var SelectScrollUpButton =
|
|
5385
|
+
var SelectScrollUpButton = React36.forwardRef((props, forwardedRef) => {
|
|
5214
5386
|
const contentContext = useSelectContentContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
5215
5387
|
const viewportContext = useSelectViewportContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
5216
|
-
const [canScrollUp, setCanScrollUp] =
|
|
5217
|
-
const composedRefs =
|
|
5388
|
+
const [canScrollUp, setCanScrollUp] = React36.useState(false);
|
|
5389
|
+
const composedRefs = useComposedRefs2(forwardedRef, viewportContext.onScrollButtonChange);
|
|
5218
5390
|
useLayoutEffect2(() => {
|
|
5219
5391
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
5220
5392
|
let handleScroll22 = function() {
|
|
@@ -5228,7 +5400,7 @@ var SelectScrollUpButton = React34.forwardRef((props, forwardedRef) => {
|
|
|
5228
5400
|
return () => viewport.removeEventListener("scroll", handleScroll22);
|
|
5229
5401
|
}
|
|
5230
5402
|
}, [contentContext.viewport, contentContext.isPositioned]);
|
|
5231
|
-
return canScrollUp ? /* @__PURE__ */
|
|
5403
|
+
return canScrollUp ? /* @__PURE__ */ jsx24(SelectScrollButtonImpl, {
|
|
5232
5404
|
...props,
|
|
5233
5405
|
ref: composedRefs,
|
|
5234
5406
|
onAutoScroll: () => {
|
|
@@ -5241,11 +5413,11 @@ var SelectScrollUpButton = React34.forwardRef((props, forwardedRef) => {
|
|
|
5241
5413
|
});
|
|
5242
5414
|
SelectScrollUpButton.displayName = SCROLL_UP_BUTTON_NAME;
|
|
5243
5415
|
var SCROLL_DOWN_BUTTON_NAME = "SelectScrollDownButton";
|
|
5244
|
-
var SelectScrollDownButton =
|
|
5416
|
+
var SelectScrollDownButton = React36.forwardRef((props, forwardedRef) => {
|
|
5245
5417
|
const contentContext = useSelectContentContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
5246
5418
|
const viewportContext = useSelectViewportContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
5247
|
-
const [canScrollDown, setCanScrollDown] =
|
|
5248
|
-
const composedRefs =
|
|
5419
|
+
const [canScrollDown, setCanScrollDown] = React36.useState(false);
|
|
5420
|
+
const composedRefs = useComposedRefs2(forwardedRef, viewportContext.onScrollButtonChange);
|
|
5249
5421
|
useLayoutEffect2(() => {
|
|
5250
5422
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
5251
5423
|
let handleScroll22 = function() {
|
|
@@ -5260,7 +5432,7 @@ var SelectScrollDownButton = React34.forwardRef((props, forwardedRef) => {
|
|
|
5260
5432
|
return () => viewport.removeEventListener("scroll", handleScroll22);
|
|
5261
5433
|
}
|
|
5262
5434
|
}, [contentContext.viewport, contentContext.isPositioned]);
|
|
5263
|
-
return canScrollDown ? /* @__PURE__ */
|
|
5435
|
+
return canScrollDown ? /* @__PURE__ */ jsx24(SelectScrollButtonImpl, {
|
|
5264
5436
|
...props,
|
|
5265
5437
|
ref: composedRefs,
|
|
5266
5438
|
onAutoScroll: () => {
|
|
@@ -5272,25 +5444,25 @@ var SelectScrollDownButton = React34.forwardRef((props, forwardedRef) => {
|
|
|
5272
5444
|
}) : null;
|
|
5273
5445
|
});
|
|
5274
5446
|
SelectScrollDownButton.displayName = SCROLL_DOWN_BUTTON_NAME;
|
|
5275
|
-
var SelectScrollButtonImpl =
|
|
5447
|
+
var SelectScrollButtonImpl = React36.forwardRef((props, forwardedRef) => {
|
|
5276
5448
|
const { __scopeSelect, onAutoScroll, ...scrollIndicatorProps } = props;
|
|
5277
5449
|
const contentContext = useSelectContentContext("SelectScrollButton", __scopeSelect);
|
|
5278
|
-
const autoScrollTimerRef =
|
|
5450
|
+
const autoScrollTimerRef = React36.useRef(null);
|
|
5279
5451
|
const getItems = useCollection(__scopeSelect);
|
|
5280
|
-
const clearAutoScrollTimer =
|
|
5452
|
+
const clearAutoScrollTimer = React36.useCallback(() => {
|
|
5281
5453
|
if (autoScrollTimerRef.current !== null) {
|
|
5282
5454
|
window.clearInterval(autoScrollTimerRef.current);
|
|
5283
5455
|
autoScrollTimerRef.current = null;
|
|
5284
5456
|
}
|
|
5285
5457
|
}, []);
|
|
5286
|
-
|
|
5458
|
+
React36.useEffect(() => {
|
|
5287
5459
|
return () => clearAutoScrollTimer();
|
|
5288
5460
|
}, [clearAutoScrollTimer]);
|
|
5289
5461
|
useLayoutEffect2(() => {
|
|
5290
5462
|
const activeItem = getItems().find((item) => item.ref.current === document.activeElement);
|
|
5291
5463
|
activeItem?.ref.current?.scrollIntoView({ block: "nearest" });
|
|
5292
5464
|
}, [getItems]);
|
|
5293
|
-
return /* @__PURE__ */
|
|
5465
|
+
return /* @__PURE__ */ jsx24(Primitive.div, {
|
|
5294
5466
|
"aria-hidden": true,
|
|
5295
5467
|
...scrollIndicatorProps,
|
|
5296
5468
|
ref: forwardedRef,
|
|
@@ -5312,29 +5484,29 @@ var SelectScrollButtonImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
5312
5484
|
});
|
|
5313
5485
|
});
|
|
5314
5486
|
var SEPARATOR_NAME = "SelectSeparator";
|
|
5315
|
-
var SelectSeparator =
|
|
5487
|
+
var SelectSeparator = React36.forwardRef((props, forwardedRef) => {
|
|
5316
5488
|
const { __scopeSelect, ...separatorProps } = props;
|
|
5317
|
-
return /* @__PURE__ */
|
|
5489
|
+
return /* @__PURE__ */ jsx24(Primitive.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
|
|
5318
5490
|
});
|
|
5319
5491
|
SelectSeparator.displayName = SEPARATOR_NAME;
|
|
5320
5492
|
var ARROW_NAME2 = "SelectArrow";
|
|
5321
|
-
var SelectArrow =
|
|
5493
|
+
var SelectArrow = React36.forwardRef((props, forwardedRef) => {
|
|
5322
5494
|
const { __scopeSelect, ...arrowProps } = props;
|
|
5323
5495
|
const popperScope = usePopperScope(__scopeSelect);
|
|
5324
5496
|
const context = useSelectContext(ARROW_NAME2, __scopeSelect);
|
|
5325
5497
|
const contentContext = useSelectContentContext(ARROW_NAME2, __scopeSelect);
|
|
5326
|
-
return context.open && contentContext.position === "popper" ? /* @__PURE__ */
|
|
5498
|
+
return context.open && contentContext.position === "popper" ? /* @__PURE__ */ jsx24(Arrow2, { ...popperScope, ...arrowProps, ref: forwardedRef }) : null;
|
|
5327
5499
|
});
|
|
5328
5500
|
SelectArrow.displayName = ARROW_NAME2;
|
|
5329
5501
|
function shouldShowPlaceholder(value) {
|
|
5330
5502
|
return value === "" || value === undefined;
|
|
5331
5503
|
}
|
|
5332
|
-
var BubbleSelect =
|
|
5504
|
+
var BubbleSelect = React36.forwardRef((props, forwardedRef) => {
|
|
5333
5505
|
const { value, ...selectProps } = props;
|
|
5334
|
-
const ref =
|
|
5335
|
-
const composedRefs =
|
|
5506
|
+
const ref = React36.useRef(null);
|
|
5507
|
+
const composedRefs = useComposedRefs2(forwardedRef, ref);
|
|
5336
5508
|
const prevValue = usePrevious(value);
|
|
5337
|
-
|
|
5509
|
+
React36.useEffect(() => {
|
|
5338
5510
|
const select = ref.current;
|
|
5339
5511
|
const selectProto = window.HTMLSelectElement.prototype;
|
|
5340
5512
|
const descriptor = Object.getOwnPropertyDescriptor(selectProto, "value");
|
|
@@ -5345,14 +5517,14 @@ var BubbleSelect = React34.forwardRef((props, forwardedRef) => {
|
|
|
5345
5517
|
select.dispatchEvent(event);
|
|
5346
5518
|
}
|
|
5347
5519
|
}, [prevValue, value]);
|
|
5348
|
-
return /* @__PURE__ */
|
|
5520
|
+
return /* @__PURE__ */ jsx24(VisuallyHidden, { asChild: true, children: /* @__PURE__ */ jsx24("select", { ...selectProps, ref: composedRefs, defaultValue: value }) });
|
|
5349
5521
|
});
|
|
5350
5522
|
BubbleSelect.displayName = "BubbleSelect";
|
|
5351
5523
|
function useTypeaheadSearch(onSearchChange) {
|
|
5352
5524
|
const handleSearchChange = useCallbackRef(onSearchChange);
|
|
5353
|
-
const searchRef =
|
|
5354
|
-
const timerRef =
|
|
5355
|
-
const handleTypeaheadSearch =
|
|
5525
|
+
const searchRef = React36.useRef("");
|
|
5526
|
+
const timerRef = React36.useRef(0);
|
|
5527
|
+
const handleTypeaheadSearch = React36.useCallback((key) => {
|
|
5356
5528
|
const search = searchRef.current + key;
|
|
5357
5529
|
handleSearchChange(search);
|
|
5358
5530
|
(function updateSearch(value) {
|
|
@@ -5362,11 +5534,11 @@ function useTypeaheadSearch(onSearchChange) {
|
|
|
5362
5534
|
timerRef.current = window.setTimeout(() => updateSearch(""), 1000);
|
|
5363
5535
|
})(search);
|
|
5364
5536
|
}, [handleSearchChange]);
|
|
5365
|
-
const resetTypeahead =
|
|
5537
|
+
const resetTypeahead = React36.useCallback(() => {
|
|
5366
5538
|
searchRef.current = "";
|
|
5367
5539
|
window.clearTimeout(timerRef.current);
|
|
5368
5540
|
}, []);
|
|
5369
|
-
|
|
5541
|
+
React36.useEffect(() => {
|
|
5370
5542
|
return () => window.clearTimeout(timerRef.current);
|
|
5371
5543
|
}, []);
|
|
5372
5544
|
return [searchRef, handleTypeaheadSearch, resetTypeahead];
|
|
@@ -5402,7 +5574,7 @@ var ScrollDownButton = SelectScrollDownButton;
|
|
|
5402
5574
|
var Separator = SelectSeparator;
|
|
5403
5575
|
|
|
5404
5576
|
// ../../node_modules/.bun/lucide-react@0.439.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
5405
|
-
import { forwardRef as
|
|
5577
|
+
import { forwardRef as forwardRef14, createElement as createElement7 } from "react";
|
|
5406
5578
|
|
|
5407
5579
|
// ../../node_modules/.bun/lucide-react@0.439.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/shared/src/utils.js
|
|
5408
5580
|
var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
@@ -5411,7 +5583,7 @@ var mergeClasses = (...classes) => classes.filter((className, index2, array) =>
|
|
|
5411
5583
|
}).join(" ");
|
|
5412
5584
|
|
|
5413
5585
|
// ../../node_modules/.bun/lucide-react@0.439.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/Icon.js
|
|
5414
|
-
import { forwardRef as
|
|
5586
|
+
import { forwardRef as forwardRef13, createElement as createElement6 } from "react";
|
|
5415
5587
|
|
|
5416
5588
|
// ../../node_modules/.bun/lucide-react@0.439.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/defaultAttributes.js
|
|
5417
5589
|
var defaultAttributes = {
|
|
@@ -5427,7 +5599,7 @@ var defaultAttributes = {
|
|
|
5427
5599
|
};
|
|
5428
5600
|
|
|
5429
5601
|
// ../../node_modules/.bun/lucide-react@0.439.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/Icon.js
|
|
5430
|
-
var Icon2 =
|
|
5602
|
+
var Icon2 = forwardRef13(({
|
|
5431
5603
|
color = "currentColor",
|
|
5432
5604
|
size: size4 = 24,
|
|
5433
5605
|
strokeWidth = 2,
|
|
@@ -5454,7 +5626,7 @@ var Icon2 = forwardRef12(({
|
|
|
5454
5626
|
|
|
5455
5627
|
// ../../node_modules/.bun/lucide-react@0.439.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
5456
5628
|
var createLucideIcon = (iconName, iconNode) => {
|
|
5457
|
-
const Component =
|
|
5629
|
+
const Component = forwardRef14(({ className, ...props }, ref) => createElement7(Icon2, {
|
|
5458
5630
|
ref,
|
|
5459
5631
|
iconNode,
|
|
5460
5632
|
className: mergeClasses(`lucide-${toKebabCase(iconName)}`, className),
|
|
@@ -5475,96 +5647,96 @@ var ChevronDown = createLucideIcon("ChevronDown", [
|
|
|
5475
5647
|
// ../../node_modules/.bun/lucide-react@0.439.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/icons/chevron-up.js
|
|
5476
5648
|
var ChevronUp = createLucideIcon("ChevronUp", [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]]);
|
|
5477
5649
|
// src/Select.tsx
|
|
5478
|
-
import * as
|
|
5479
|
-
import { jsx as
|
|
5650
|
+
import * as React37 from "react";
|
|
5651
|
+
import { jsx as jsx25, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
5480
5652
|
var Select2 = Root22;
|
|
5481
5653
|
var SelectGroup2 = Group;
|
|
5482
5654
|
var SelectValue2 = Value;
|
|
5483
|
-
var SelectTrigger2 =
|
|
5655
|
+
var SelectTrigger2 = React37.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(Trigger, {
|
|
5484
5656
|
ref,
|
|
5485
5657
|
className: cn("flex h-10 w-full items-center justify-between rounded-md border-black border-2 border-b-4 bg-card-bg px-3 py-5 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 font-brand", className),
|
|
5486
5658
|
...props,
|
|
5487
5659
|
children: [
|
|
5488
5660
|
children,
|
|
5489
|
-
/* @__PURE__ */
|
|
5661
|
+
/* @__PURE__ */ jsx25(Icon, {
|
|
5490
5662
|
asChild: true,
|
|
5491
|
-
children: /* @__PURE__ */
|
|
5663
|
+
children: /* @__PURE__ */ jsx25(ChevronDown, {
|
|
5492
5664
|
className: "h-4 w-4 opacity-50"
|
|
5493
5665
|
})
|
|
5494
5666
|
})
|
|
5495
5667
|
]
|
|
5496
5668
|
}));
|
|
5497
5669
|
SelectTrigger2.displayName = Trigger.displayName;
|
|
5498
|
-
var SelectScrollUpButton2 =
|
|
5670
|
+
var SelectScrollUpButton2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25(ScrollUpButton, {
|
|
5499
5671
|
ref,
|
|
5500
5672
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
5501
5673
|
...props,
|
|
5502
|
-
children: /* @__PURE__ */
|
|
5674
|
+
children: /* @__PURE__ */ jsx25(ChevronUp, {
|
|
5503
5675
|
className: "h-4 w-4"
|
|
5504
5676
|
})
|
|
5505
5677
|
}));
|
|
5506
5678
|
SelectScrollUpButton2.displayName = ScrollUpButton.displayName;
|
|
5507
|
-
var SelectScrollDownButton2 =
|
|
5679
|
+
var SelectScrollDownButton2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25(ScrollDownButton, {
|
|
5508
5680
|
ref,
|
|
5509
5681
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
5510
5682
|
...props,
|
|
5511
|
-
children: /* @__PURE__ */
|
|
5683
|
+
children: /* @__PURE__ */ jsx25(ChevronDown, {
|
|
5512
5684
|
className: "h-4 w-4"
|
|
5513
5685
|
})
|
|
5514
5686
|
}));
|
|
5515
5687
|
SelectScrollDownButton2.displayName = ScrollDownButton.displayName;
|
|
5516
|
-
var SelectContent2 =
|
|
5688
|
+
var SelectContent2 = React37.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx25(Portal2, {
|
|
5517
5689
|
children: /* @__PURE__ */ jsxs5(Content2, {
|
|
5518
5690
|
ref,
|
|
5519
5691
|
className: cn(" border-2 border-black relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md font-brand bg-card-bg text-text shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 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 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className),
|
|
5520
5692
|
position,
|
|
5521
5693
|
...props,
|
|
5522
5694
|
children: [
|
|
5523
|
-
/* @__PURE__ */
|
|
5524
|
-
/* @__PURE__ */
|
|
5695
|
+
/* @__PURE__ */ jsx25(SelectScrollUpButton2, {}),
|
|
5696
|
+
/* @__PURE__ */ jsx25(Viewport, {
|
|
5525
5697
|
className: cn("p-1", position === "popper" && "h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)"),
|
|
5526
5698
|
children
|
|
5527
5699
|
}),
|
|
5528
|
-
/* @__PURE__ */
|
|
5700
|
+
/* @__PURE__ */ jsx25(SelectScrollDownButton2, {})
|
|
5529
5701
|
]
|
|
5530
5702
|
})
|
|
5531
5703
|
}));
|
|
5532
5704
|
SelectContent2.displayName = Content2.displayName;
|
|
5533
|
-
var SelectLabel2 =
|
|
5705
|
+
var SelectLabel2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25(Label, {
|
|
5534
5706
|
ref,
|
|
5535
5707
|
className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
|
|
5536
5708
|
...props
|
|
5537
5709
|
}));
|
|
5538
5710
|
SelectLabel2.displayName = Label.displayName;
|
|
5539
|
-
var SelectItem2 =
|
|
5711
|
+
var SelectItem2 = React37.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(Item, {
|
|
5540
5712
|
ref,
|
|
5541
5713
|
className: cn("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-slate-200 dark:focus:bg-white/10 data-disabled:pointer-events-none data-disabled:opacity-50 font-brand", className),
|
|
5542
5714
|
...props,
|
|
5543
5715
|
children: [
|
|
5544
|
-
/* @__PURE__ */
|
|
5716
|
+
/* @__PURE__ */ jsx25("span", {
|
|
5545
5717
|
className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
|
|
5546
|
-
children: /* @__PURE__ */
|
|
5547
|
-
children: /* @__PURE__ */
|
|
5718
|
+
children: /* @__PURE__ */ jsx25(ItemIndicator, {
|
|
5719
|
+
children: /* @__PURE__ */ jsx25(Check, {
|
|
5548
5720
|
className: "h-4 w-4"
|
|
5549
5721
|
})
|
|
5550
5722
|
})
|
|
5551
5723
|
}),
|
|
5552
|
-
/* @__PURE__ */
|
|
5724
|
+
/* @__PURE__ */ jsx25(ItemText, {
|
|
5553
5725
|
children
|
|
5554
5726
|
})
|
|
5555
5727
|
]
|
|
5556
5728
|
}));
|
|
5557
5729
|
SelectItem2.displayName = Item.displayName;
|
|
5558
|
-
var SelectSeparator2 =
|
|
5730
|
+
var SelectSeparator2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25(Separator, {
|
|
5559
5731
|
ref,
|
|
5560
5732
|
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
5561
5733
|
...props
|
|
5562
5734
|
}));
|
|
5563
5735
|
SelectSeparator2.displayName = Separator.displayName;
|
|
5564
5736
|
// src/Switch.tsx
|
|
5565
|
-
import { jsx as
|
|
5737
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
5566
5738
|
var Switch = ({ active, onToggle, "aria-label": ariaLabel }) => {
|
|
5567
|
-
return /* @__PURE__ */
|
|
5739
|
+
return /* @__PURE__ */ jsx26("button", {
|
|
5568
5740
|
type: "button",
|
|
5569
5741
|
role: "switch",
|
|
5570
5742
|
"aria-checked": active,
|
|
@@ -5572,14 +5744,14 @@ var Switch = ({ active, onToggle, "aria-label": ariaLabel }) => {
|
|
|
5572
5744
|
"data-active": active,
|
|
5573
5745
|
className: "h-[34px] transition-all rounded-full w-[56px] border-2 border-b-4 bg-gray-200 p-[2px] cursor-pointer data-[active=true]:bg-brand border-black relative shrink-0",
|
|
5574
5746
|
onClick: onToggle,
|
|
5575
|
-
children: /* @__PURE__ */
|
|
5747
|
+
children: /* @__PURE__ */ jsx26("div", {
|
|
5576
5748
|
"data-active": active,
|
|
5577
5749
|
className: "h-[20px] w-[20px] left-[4px] top-[4px] transition-all rounded-full bg-white border-2 border-black absolute data-[active=true]:left-[calc(100%-24px)]"
|
|
5578
5750
|
})
|
|
5579
5751
|
});
|
|
5580
5752
|
};
|
|
5581
5753
|
// ../../node_modules/.bun/@radix-ui+react-tabs@1.1.13+f178f9b1194b24ba/node_modules/@radix-ui/react-tabs/dist/index.mjs
|
|
5582
|
-
import * as
|
|
5754
|
+
import * as React49 from "react";
|
|
5583
5755
|
|
|
5584
5756
|
// ../../node_modules/.bun/@radix-ui+primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.mjs
|
|
5585
5757
|
var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
@@ -5593,24 +5765,24 @@ function composeEventHandlers2(originalEventHandler, ourEventHandler, { checkFor
|
|
|
5593
5765
|
}
|
|
5594
5766
|
|
|
5595
5767
|
// ../../node_modules/.bun/@radix-ui+react-context@1.1.2+09a4a3ac15cb54ba/node_modules/@radix-ui/react-context/dist/index.mjs
|
|
5596
|
-
import * as
|
|
5597
|
-
import { jsx as
|
|
5768
|
+
import * as React38 from "react";
|
|
5769
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
5598
5770
|
function createContextScope2(scopeName, createContextScopeDeps = []) {
|
|
5599
5771
|
let defaultContexts = [];
|
|
5600
5772
|
function createContext32(rootComponentName, defaultContext) {
|
|
5601
|
-
const BaseContext =
|
|
5773
|
+
const BaseContext = React38.createContext(defaultContext);
|
|
5602
5774
|
const index2 = defaultContexts.length;
|
|
5603
5775
|
defaultContexts = [...defaultContexts, defaultContext];
|
|
5604
5776
|
const Provider = (props) => {
|
|
5605
5777
|
const { scope, children, ...context } = props;
|
|
5606
5778
|
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
5607
|
-
const value =
|
|
5608
|
-
return /* @__PURE__ */
|
|
5779
|
+
const value = React38.useMemo(() => context, Object.values(context));
|
|
5780
|
+
return /* @__PURE__ */ jsx27(Context.Provider, { value, children });
|
|
5609
5781
|
};
|
|
5610
5782
|
Provider.displayName = rootComponentName + "Provider";
|
|
5611
5783
|
function useContext22(consumerName, scope) {
|
|
5612
5784
|
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
5613
|
-
const context =
|
|
5785
|
+
const context = React38.useContext(Context);
|
|
5614
5786
|
if (context)
|
|
5615
5787
|
return context;
|
|
5616
5788
|
if (defaultContext !== undefined)
|
|
@@ -5621,11 +5793,11 @@ function createContextScope2(scopeName, createContextScopeDeps = []) {
|
|
|
5621
5793
|
}
|
|
5622
5794
|
const createScope = () => {
|
|
5623
5795
|
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
5624
|
-
return
|
|
5796
|
+
return React38.createContext(defaultContext);
|
|
5625
5797
|
});
|
|
5626
5798
|
return function useScope(scope) {
|
|
5627
5799
|
const contexts = scope?.[scopeName] || scopeContexts;
|
|
5628
|
-
return
|
|
5800
|
+
return React38.useMemo(() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }), [scope, contexts]);
|
|
5629
5801
|
};
|
|
5630
5802
|
};
|
|
5631
5803
|
createScope.scopeName = scopeName;
|
|
@@ -5646,7 +5818,7 @@ function composeContextScopes2(...scopes) {
|
|
|
5646
5818
|
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
5647
5819
|
return { ...nextScopes2, ...currentScope };
|
|
5648
5820
|
}, {});
|
|
5649
|
-
return
|
|
5821
|
+
return React38.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
5650
5822
|
};
|
|
5651
5823
|
};
|
|
5652
5824
|
createScope.scopeName = baseScope.scopeName;
|
|
@@ -5654,96 +5826,59 @@ function composeContextScopes2(...scopes) {
|
|
|
5654
5826
|
}
|
|
5655
5827
|
|
|
5656
5828
|
// ../../node_modules/.bun/@radix-ui+react-roving-focus@1.1.11+f178f9b1194b24ba/node_modules/@radix-ui/react-roving-focus/dist/index.mjs
|
|
5657
|
-
import * as
|
|
5829
|
+
import * as React47 from "react";
|
|
5658
5830
|
|
|
5659
5831
|
// ../../node_modules/.bun/@radix-ui+react-collection@1.1.7+f178f9b1194b24ba/node_modules/@radix-ui/react-collection/dist/index.mjs
|
|
5660
|
-
import
|
|
5661
|
-
|
|
5662
|
-
// ../../node_modules/.bun/@radix-ui+react-compose-refs@1.1.2+09a4a3ac15cb54ba/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
5663
|
-
import * as React37 from "react";
|
|
5664
|
-
function setRef2(ref, value) {
|
|
5665
|
-
if (typeof ref === "function") {
|
|
5666
|
-
return ref(value);
|
|
5667
|
-
} else if (ref !== null && ref !== undefined) {
|
|
5668
|
-
ref.current = value;
|
|
5669
|
-
}
|
|
5670
|
-
}
|
|
5671
|
-
function composeRefs2(...refs) {
|
|
5672
|
-
return (node) => {
|
|
5673
|
-
let hasCleanup = false;
|
|
5674
|
-
const cleanups = refs.map((ref) => {
|
|
5675
|
-
const cleanup = setRef2(ref, node);
|
|
5676
|
-
if (!hasCleanup && typeof cleanup == "function") {
|
|
5677
|
-
hasCleanup = true;
|
|
5678
|
-
}
|
|
5679
|
-
return cleanup;
|
|
5680
|
-
});
|
|
5681
|
-
if (hasCleanup) {
|
|
5682
|
-
return () => {
|
|
5683
|
-
for (let i = 0;i < cleanups.length; i++) {
|
|
5684
|
-
const cleanup = cleanups[i];
|
|
5685
|
-
if (typeof cleanup == "function") {
|
|
5686
|
-
cleanup();
|
|
5687
|
-
} else {
|
|
5688
|
-
setRef2(refs[i], null);
|
|
5689
|
-
}
|
|
5690
|
-
}
|
|
5691
|
-
};
|
|
5692
|
-
}
|
|
5693
|
-
};
|
|
5694
|
-
}
|
|
5695
|
-
function useComposedRefs2(...refs) {
|
|
5696
|
-
return React37.useCallback(composeRefs2(...refs), refs);
|
|
5697
|
-
}
|
|
5832
|
+
import React40 from "react";
|
|
5698
5833
|
|
|
5699
5834
|
// ../../node_modules/.bun/@radix-ui+react-slot@1.2.3+09a4a3ac15cb54ba/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
5700
|
-
import * as
|
|
5701
|
-
import { Fragment as Fragment22, jsx as
|
|
5702
|
-
function
|
|
5703
|
-
const SlotClone2 = /* @__PURE__ */
|
|
5704
|
-
const
|
|
5835
|
+
import * as React39 from "react";
|
|
5836
|
+
import { Fragment as Fragment22, jsx as jsx28 } from "react/jsx-runtime";
|
|
5837
|
+
function createSlot2(ownerName) {
|
|
5838
|
+
const SlotClone2 = /* @__PURE__ */ createSlotClone2(ownerName);
|
|
5839
|
+
const Slot22 = React39.forwardRef((props, forwardedRef) => {
|
|
5705
5840
|
const { children, ...slotProps } = props;
|
|
5706
|
-
const childrenArray =
|
|
5707
|
-
const slottable = childrenArray.find(
|
|
5841
|
+
const childrenArray = React39.Children.toArray(children);
|
|
5842
|
+
const slottable = childrenArray.find(isSlottable3);
|
|
5708
5843
|
if (slottable) {
|
|
5709
5844
|
const newElement = slottable.props.children;
|
|
5710
5845
|
const newChildren = childrenArray.map((child) => {
|
|
5711
5846
|
if (child === slottable) {
|
|
5712
|
-
if (
|
|
5713
|
-
return
|
|
5714
|
-
return
|
|
5847
|
+
if (React39.Children.count(newElement) > 1)
|
|
5848
|
+
return React39.Children.only(null);
|
|
5849
|
+
return React39.isValidElement(newElement) ? newElement.props.children : null;
|
|
5715
5850
|
} else {
|
|
5716
5851
|
return child;
|
|
5717
5852
|
}
|
|
5718
5853
|
});
|
|
5719
|
-
return /* @__PURE__ */
|
|
5854
|
+
return /* @__PURE__ */ jsx28(SlotClone2, { ...slotProps, ref: forwardedRef, children: React39.isValidElement(newElement) ? React39.cloneElement(newElement, undefined, newChildren) : null });
|
|
5720
5855
|
}
|
|
5721
|
-
return /* @__PURE__ */
|
|
5856
|
+
return /* @__PURE__ */ jsx28(SlotClone2, { ...slotProps, ref: forwardedRef, children });
|
|
5722
5857
|
});
|
|
5723
|
-
|
|
5724
|
-
return
|
|
5858
|
+
Slot22.displayName = `${ownerName}.Slot`;
|
|
5859
|
+
return Slot22;
|
|
5725
5860
|
}
|
|
5726
|
-
function
|
|
5727
|
-
const SlotClone2 =
|
|
5861
|
+
function createSlotClone2(ownerName) {
|
|
5862
|
+
const SlotClone2 = React39.forwardRef((props, forwardedRef) => {
|
|
5728
5863
|
const { children, ...slotProps } = props;
|
|
5729
|
-
if (
|
|
5730
|
-
const childrenRef =
|
|
5731
|
-
const props2 =
|
|
5732
|
-
if (children.type !==
|
|
5733
|
-
props2.ref = forwardedRef ?
|
|
5864
|
+
if (React39.isValidElement(children)) {
|
|
5865
|
+
const childrenRef = getElementRef3(children);
|
|
5866
|
+
const props2 = mergeProps3(slotProps, children.props);
|
|
5867
|
+
if (children.type !== React39.Fragment) {
|
|
5868
|
+
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
5734
5869
|
}
|
|
5735
|
-
return
|
|
5870
|
+
return React39.cloneElement(children, props2);
|
|
5736
5871
|
}
|
|
5737
|
-
return
|
|
5872
|
+
return React39.Children.count(children) > 1 ? React39.Children.only(null) : null;
|
|
5738
5873
|
});
|
|
5739
5874
|
SlotClone2.displayName = `${ownerName}.SlotClone`;
|
|
5740
5875
|
return SlotClone2;
|
|
5741
5876
|
}
|
|
5742
|
-
var
|
|
5743
|
-
function
|
|
5744
|
-
return
|
|
5877
|
+
var SLOTTABLE_IDENTIFIER2 = Symbol("radix.slottable");
|
|
5878
|
+
function isSlottable3(child) {
|
|
5879
|
+
return React39.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER2;
|
|
5745
5880
|
}
|
|
5746
|
-
function
|
|
5881
|
+
function mergeProps3(slotProps, childProps) {
|
|
5747
5882
|
const overrideProps = { ...childProps };
|
|
5748
5883
|
for (const propName in childProps) {
|
|
5749
5884
|
const slotPropValue = slotProps[propName];
|
|
@@ -5767,7 +5902,7 @@ function mergeProps2(slotProps, childProps) {
|
|
|
5767
5902
|
}
|
|
5768
5903
|
return { ...slotProps, ...overrideProps };
|
|
5769
5904
|
}
|
|
5770
|
-
function
|
|
5905
|
+
function getElementRef3(element) {
|
|
5771
5906
|
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
5772
5907
|
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
5773
5908
|
if (mayWarn) {
|
|
@@ -5782,9 +5917,9 @@ function getElementRef2(element) {
|
|
|
5782
5917
|
}
|
|
5783
5918
|
|
|
5784
5919
|
// ../../node_modules/.bun/@radix-ui+react-collection@1.1.7+f178f9b1194b24ba/node_modules/@radix-ui/react-collection/dist/index.mjs
|
|
5785
|
-
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
5786
|
-
import React210 from "react";
|
|
5787
5920
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
5921
|
+
import React210 from "react";
|
|
5922
|
+
import { jsx as jsx210 } from "react/jsx-runtime";
|
|
5788
5923
|
"use client";
|
|
5789
5924
|
function createCollection2(name) {
|
|
5790
5925
|
const PROVIDER_NAME = name + "CollectionProvider";
|
|
@@ -5792,38 +5927,38 @@ function createCollection2(name) {
|
|
|
5792
5927
|
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(PROVIDER_NAME, { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map });
|
|
5793
5928
|
const CollectionProvider = (props) => {
|
|
5794
5929
|
const { scope, children } = props;
|
|
5795
|
-
const ref =
|
|
5796
|
-
const itemMap =
|
|
5797
|
-
return /* @__PURE__ */
|
|
5930
|
+
const ref = React40.useRef(null);
|
|
5931
|
+
const itemMap = React40.useRef(/* @__PURE__ */ new Map).current;
|
|
5932
|
+
return /* @__PURE__ */ jsx29(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
5798
5933
|
};
|
|
5799
5934
|
CollectionProvider.displayName = PROVIDER_NAME;
|
|
5800
5935
|
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
5801
|
-
const CollectionSlotImpl =
|
|
5802
|
-
const CollectionSlot =
|
|
5936
|
+
const CollectionSlotImpl = createSlot2(COLLECTION_SLOT_NAME);
|
|
5937
|
+
const CollectionSlot = React40.forwardRef((props, forwardedRef) => {
|
|
5803
5938
|
const { scope, children } = props;
|
|
5804
5939
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
5805
|
-
const composedRefs =
|
|
5806
|
-
return /* @__PURE__ */
|
|
5940
|
+
const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
|
|
5941
|
+
return /* @__PURE__ */ jsx29(CollectionSlotImpl, { ref: composedRefs, children });
|
|
5807
5942
|
});
|
|
5808
5943
|
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
5809
5944
|
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
5810
5945
|
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
5811
|
-
const CollectionItemSlotImpl =
|
|
5812
|
-
const CollectionItemSlot =
|
|
5946
|
+
const CollectionItemSlotImpl = createSlot2(ITEM_SLOT_NAME);
|
|
5947
|
+
const CollectionItemSlot = React40.forwardRef((props, forwardedRef) => {
|
|
5813
5948
|
const { scope, children, ...itemData } = props;
|
|
5814
|
-
const ref =
|
|
5815
|
-
const composedRefs =
|
|
5949
|
+
const ref = React40.useRef(null);
|
|
5950
|
+
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
5816
5951
|
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
5817
|
-
|
|
5952
|
+
React40.useEffect(() => {
|
|
5818
5953
|
context.itemMap.set(ref, { ref, ...itemData });
|
|
5819
5954
|
return () => void context.itemMap.delete(ref);
|
|
5820
5955
|
});
|
|
5821
|
-
return /* @__PURE__ */
|
|
5956
|
+
return /* @__PURE__ */ jsx29(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children });
|
|
5822
5957
|
});
|
|
5823
5958
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
5824
5959
|
function useCollection2(scope) {
|
|
5825
5960
|
const context = useCollectionContext(name + "CollectionConsumer", scope);
|
|
5826
|
-
const getItems =
|
|
5961
|
+
const getItems = React40.useCallback(() => {
|
|
5827
5962
|
const collectionNode = context.collectionRef.current;
|
|
5828
5963
|
if (!collectionNode)
|
|
5829
5964
|
return [];
|
|
@@ -6143,19 +6278,19 @@ function toSafeInteger(number) {
|
|
|
6143
6278
|
}
|
|
6144
6279
|
|
|
6145
6280
|
// ../../node_modules/.bun/@radix-ui+react-id@1.1.1+09a4a3ac15cb54ba/node_modules/@radix-ui/react-id/dist/index.mjs
|
|
6146
|
-
import * as
|
|
6281
|
+
import * as React42 from "react";
|
|
6147
6282
|
|
|
6148
6283
|
// ../../node_modules/.bun/@radix-ui+react-use-layout-effect@1.1.1+09a4a3ac15cb54ba/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
|
6149
|
-
import * as
|
|
6150
|
-
var useLayoutEffect22 = globalThis?.document ?
|
|
6284
|
+
import * as React41 from "react";
|
|
6285
|
+
var useLayoutEffect22 = globalThis?.document ? React41.useLayoutEffect : () => {};
|
|
6151
6286
|
|
|
6152
6287
|
// ../../node_modules/.bun/@radix-ui+react-id@1.1.1+09a4a3ac15cb54ba/node_modules/@radix-ui/react-id/dist/index.mjs
|
|
6153
|
-
var useReactId2 =
|
|
6288
|
+
var useReactId2 = React42[" useId ".trim().toString()] || (() => {
|
|
6154
6289
|
return;
|
|
6155
6290
|
});
|
|
6156
6291
|
var count3 = 0;
|
|
6157
6292
|
function useId2(deterministicId) {
|
|
6158
|
-
const [id, setId] =
|
|
6293
|
+
const [id, setId] = React42.useState(useReactId2());
|
|
6159
6294
|
useLayoutEffect22(() => {
|
|
6160
6295
|
if (!deterministicId)
|
|
6161
6296
|
setId((reactId) => reactId ?? String(count3++));
|
|
@@ -6164,7 +6299,7 @@ function useId2(deterministicId) {
|
|
|
6164
6299
|
}
|
|
6165
6300
|
|
|
6166
6301
|
// ../../node_modules/.bun/@radix-ui+react-primitive@2.1.3+f178f9b1194b24ba/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
6167
|
-
import * as
|
|
6302
|
+
import * as React43 from "react";
|
|
6168
6303
|
import * as ReactDOM5 from "react-dom";
|
|
6169
6304
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
6170
6305
|
var NODES2 = [
|
|
@@ -6187,10 +6322,10 @@ var NODES2 = [
|
|
|
6187
6322
|
"ul"
|
|
6188
6323
|
];
|
|
6189
6324
|
var Primitive2 = NODES2.reduce((primitive, node) => {
|
|
6190
|
-
const
|
|
6191
|
-
const Node2 =
|
|
6325
|
+
const Slot3 = createSlot2(`Primitive.${node}`);
|
|
6326
|
+
const Node2 = React43.forwardRef((props, forwardedRef) => {
|
|
6192
6327
|
const { asChild, ...primitiveProps } = props;
|
|
6193
|
-
const Comp = asChild ?
|
|
6328
|
+
const Comp = asChild ? Slot3 : node;
|
|
6194
6329
|
if (typeof window !== "undefined") {
|
|
6195
6330
|
window[Symbol.for("radix-ui")] = true;
|
|
6196
6331
|
}
|
|
@@ -6201,19 +6336,19 @@ var Primitive2 = NODES2.reduce((primitive, node) => {
|
|
|
6201
6336
|
}, {});
|
|
6202
6337
|
|
|
6203
6338
|
// ../../node_modules/.bun/@radix-ui+react-use-callback-ref@1.1.1+09a4a3ac15cb54ba/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
|
|
6204
|
-
import * as
|
|
6339
|
+
import * as React44 from "react";
|
|
6205
6340
|
function useCallbackRef3(callback) {
|
|
6206
|
-
const callbackRef =
|
|
6207
|
-
|
|
6341
|
+
const callbackRef = React44.useRef(callback);
|
|
6342
|
+
React44.useEffect(() => {
|
|
6208
6343
|
callbackRef.current = callback;
|
|
6209
6344
|
});
|
|
6210
|
-
return
|
|
6345
|
+
return React44.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
6211
6346
|
}
|
|
6212
6347
|
|
|
6213
6348
|
// ../../node_modules/.bun/@radix-ui+react-use-controllable-state@1.2.2+09a4a3ac15cb54ba/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
|
|
6214
|
-
import * as
|
|
6349
|
+
import * as React45 from "react";
|
|
6215
6350
|
import * as React212 from "react";
|
|
6216
|
-
var useInsertionEffect =
|
|
6351
|
+
var useInsertionEffect = React45[" useInsertionEffect ".trim().toString()] || useLayoutEffect22;
|
|
6217
6352
|
function useControllableState2({
|
|
6218
6353
|
prop,
|
|
6219
6354
|
defaultProp,
|
|
@@ -6227,8 +6362,8 @@ function useControllableState2({
|
|
|
6227
6362
|
const isControlled = prop !== undefined;
|
|
6228
6363
|
const value = isControlled ? prop : uncontrolledProp;
|
|
6229
6364
|
if (true) {
|
|
6230
|
-
const isControlledRef =
|
|
6231
|
-
|
|
6365
|
+
const isControlledRef = React45.useRef(prop !== undefined);
|
|
6366
|
+
React45.useEffect(() => {
|
|
6232
6367
|
const wasControlled = isControlledRef.current;
|
|
6233
6368
|
if (wasControlled !== isControlled) {
|
|
6234
6369
|
const from = wasControlled ? "controlled" : "uncontrolled";
|
|
@@ -6238,7 +6373,7 @@ function useControllableState2({
|
|
|
6238
6373
|
isControlledRef.current = isControlled;
|
|
6239
6374
|
}, [isControlled, caller]);
|
|
6240
6375
|
}
|
|
6241
|
-
const setValue =
|
|
6376
|
+
const setValue = React45.useCallback((nextValue) => {
|
|
6242
6377
|
if (isControlled) {
|
|
6243
6378
|
const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
|
|
6244
6379
|
if (value2 !== prop) {
|
|
@@ -6254,13 +6389,13 @@ function useUncontrolledState2({
|
|
|
6254
6389
|
defaultProp,
|
|
6255
6390
|
onChange
|
|
6256
6391
|
}) {
|
|
6257
|
-
const [value, setValue] =
|
|
6258
|
-
const prevValueRef =
|
|
6259
|
-
const onChangeRef =
|
|
6392
|
+
const [value, setValue] = React45.useState(defaultProp);
|
|
6393
|
+
const prevValueRef = React45.useRef(value);
|
|
6394
|
+
const onChangeRef = React45.useRef(onChange);
|
|
6260
6395
|
useInsertionEffect(() => {
|
|
6261
6396
|
onChangeRef.current = onChange;
|
|
6262
6397
|
}, [onChange]);
|
|
6263
|
-
|
|
6398
|
+
React45.useEffect(() => {
|
|
6264
6399
|
if (prevValueRef.current !== value) {
|
|
6265
6400
|
onChangeRef.current?.(value);
|
|
6266
6401
|
prevValueRef.current = value;
|
|
@@ -6274,16 +6409,16 @@ function isFunction(value) {
|
|
|
6274
6409
|
var SYNC_STATE = Symbol("RADIX:SYNC_STATE");
|
|
6275
6410
|
|
|
6276
6411
|
// ../../node_modules/.bun/@radix-ui+react-direction@1.1.1+09a4a3ac15cb54ba/node_modules/@radix-ui/react-direction/dist/index.mjs
|
|
6277
|
-
import * as
|
|
6278
|
-
import { jsx as
|
|
6279
|
-
var DirectionContext2 =
|
|
6412
|
+
import * as React46 from "react";
|
|
6413
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
6414
|
+
var DirectionContext2 = React46.createContext(undefined);
|
|
6280
6415
|
function useDirection2(localDir) {
|
|
6281
|
-
const globalDir =
|
|
6416
|
+
const globalDir = React46.useContext(DirectionContext2);
|
|
6282
6417
|
return localDir || globalDir || "ltr";
|
|
6283
6418
|
}
|
|
6284
6419
|
|
|
6285
6420
|
// ../../node_modules/.bun/@radix-ui+react-roving-focus@1.1.11+f178f9b1194b24ba/node_modules/@radix-ui/react-roving-focus/dist/index.mjs
|
|
6286
|
-
import { jsx as
|
|
6421
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
6287
6422
|
"use client";
|
|
6288
6423
|
var ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus";
|
|
6289
6424
|
var EVENT_OPTIONS2 = { bubbles: false, cancelable: true };
|
|
@@ -6291,11 +6426,11 @@ var GROUP_NAME2 = "RovingFocusGroup";
|
|
|
6291
6426
|
var [Collection2, useCollection2, createCollectionScope2] = createCollection2(GROUP_NAME2);
|
|
6292
6427
|
var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope2(GROUP_NAME2, [createCollectionScope2]);
|
|
6293
6428
|
var [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME2);
|
|
6294
|
-
var RovingFocusGroup =
|
|
6295
|
-
return /* @__PURE__ */
|
|
6429
|
+
var RovingFocusGroup = React47.forwardRef((props, forwardedRef) => {
|
|
6430
|
+
return /* @__PURE__ */ jsx32(Collection2.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx32(Collection2.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx32(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });
|
|
6296
6431
|
});
|
|
6297
6432
|
RovingFocusGroup.displayName = GROUP_NAME2;
|
|
6298
|
-
var RovingFocusGroupImpl =
|
|
6433
|
+
var RovingFocusGroupImpl = React47.forwardRef((props, forwardedRef) => {
|
|
6299
6434
|
const {
|
|
6300
6435
|
__scopeRovingFocusGroup,
|
|
6301
6436
|
orientation,
|
|
@@ -6308,8 +6443,8 @@ var RovingFocusGroupImpl = React46.forwardRef((props, forwardedRef) => {
|
|
|
6308
6443
|
preventScrollOnEntryFocus = false,
|
|
6309
6444
|
...groupProps
|
|
6310
6445
|
} = props;
|
|
6311
|
-
const ref =
|
|
6312
|
-
const composedRefs =
|
|
6446
|
+
const ref = React47.useRef(null);
|
|
6447
|
+
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
6313
6448
|
const direction = useDirection2(dir);
|
|
6314
6449
|
const [currentTabStopId, setCurrentTabStopId] = useControllableState2({
|
|
6315
6450
|
prop: currentTabStopIdProp,
|
|
@@ -6317,29 +6452,29 @@ var RovingFocusGroupImpl = React46.forwardRef((props, forwardedRef) => {
|
|
|
6317
6452
|
onChange: onCurrentTabStopIdChange,
|
|
6318
6453
|
caller: GROUP_NAME2
|
|
6319
6454
|
});
|
|
6320
|
-
const [isTabbingBackOut, setIsTabbingBackOut] =
|
|
6455
|
+
const [isTabbingBackOut, setIsTabbingBackOut] = React47.useState(false);
|
|
6321
6456
|
const handleEntryFocus = useCallbackRef3(onEntryFocus);
|
|
6322
6457
|
const getItems = useCollection2(__scopeRovingFocusGroup);
|
|
6323
|
-
const isClickFocusRef =
|
|
6324
|
-
const [focusableItemsCount, setFocusableItemsCount] =
|
|
6325
|
-
|
|
6458
|
+
const isClickFocusRef = React47.useRef(false);
|
|
6459
|
+
const [focusableItemsCount, setFocusableItemsCount] = React47.useState(0);
|
|
6460
|
+
React47.useEffect(() => {
|
|
6326
6461
|
const node = ref.current;
|
|
6327
6462
|
if (node) {
|
|
6328
6463
|
node.addEventListener(ENTRY_FOCUS, handleEntryFocus);
|
|
6329
6464
|
return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);
|
|
6330
6465
|
}
|
|
6331
6466
|
}, [handleEntryFocus]);
|
|
6332
|
-
return /* @__PURE__ */
|
|
6467
|
+
return /* @__PURE__ */ jsx32(RovingFocusProvider, {
|
|
6333
6468
|
scope: __scopeRovingFocusGroup,
|
|
6334
6469
|
orientation,
|
|
6335
6470
|
dir: direction,
|
|
6336
6471
|
loop,
|
|
6337
6472
|
currentTabStopId,
|
|
6338
|
-
onItemFocus:
|
|
6339
|
-
onItemShiftTab:
|
|
6340
|
-
onFocusableItemAdd:
|
|
6341
|
-
onFocusableItemRemove:
|
|
6342
|
-
children: /* @__PURE__ */
|
|
6473
|
+
onItemFocus: React47.useCallback((tabStopId) => setCurrentTabStopId(tabStopId), [setCurrentTabStopId]),
|
|
6474
|
+
onItemShiftTab: React47.useCallback(() => setIsTabbingBackOut(true), []),
|
|
6475
|
+
onFocusableItemAdd: React47.useCallback(() => setFocusableItemsCount((prevCount) => prevCount + 1), []),
|
|
6476
|
+
onFocusableItemRemove: React47.useCallback(() => setFocusableItemsCount((prevCount) => prevCount - 1), []),
|
|
6477
|
+
children: /* @__PURE__ */ jsx32(Primitive2.div, {
|
|
6343
6478
|
tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
|
|
6344
6479
|
"data-orientation": orientation,
|
|
6345
6480
|
...groupProps,
|
|
@@ -6369,7 +6504,7 @@ var RovingFocusGroupImpl = React46.forwardRef((props, forwardedRef) => {
|
|
|
6369
6504
|
});
|
|
6370
6505
|
});
|
|
6371
6506
|
var ITEM_NAME2 = "RovingFocusGroupItem";
|
|
6372
|
-
var RovingFocusGroupItem =
|
|
6507
|
+
var RovingFocusGroupItem = React47.forwardRef((props, forwardedRef) => {
|
|
6373
6508
|
const {
|
|
6374
6509
|
__scopeRovingFocusGroup,
|
|
6375
6510
|
focusable = true,
|
|
@@ -6384,18 +6519,18 @@ var RovingFocusGroupItem = React46.forwardRef((props, forwardedRef) => {
|
|
|
6384
6519
|
const isCurrentTabStop = context.currentTabStopId === id;
|
|
6385
6520
|
const getItems = useCollection2(__scopeRovingFocusGroup);
|
|
6386
6521
|
const { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context;
|
|
6387
|
-
|
|
6522
|
+
React47.useEffect(() => {
|
|
6388
6523
|
if (focusable) {
|
|
6389
6524
|
onFocusableItemAdd();
|
|
6390
6525
|
return () => onFocusableItemRemove();
|
|
6391
6526
|
}
|
|
6392
6527
|
}, [focusable, onFocusableItemAdd, onFocusableItemRemove]);
|
|
6393
|
-
return /* @__PURE__ */
|
|
6528
|
+
return /* @__PURE__ */ jsx32(Collection2.ItemSlot, {
|
|
6394
6529
|
scope: __scopeRovingFocusGroup,
|
|
6395
6530
|
id,
|
|
6396
6531
|
focusable,
|
|
6397
6532
|
active,
|
|
6398
|
-
children: /* @__PURE__ */
|
|
6533
|
+
children: /* @__PURE__ */ jsx32(Primitive2.span, {
|
|
6399
6534
|
tabIndex: isCurrentTabStop ? 0 : -1,
|
|
6400
6535
|
"data-orientation": context.orientation,
|
|
6401
6536
|
...itemProps,
|
|
@@ -6478,10 +6613,10 @@ var Item2 = RovingFocusGroupItem;
|
|
|
6478
6613
|
|
|
6479
6614
|
// ../../node_modules/.bun/@radix-ui+react-presence@1.1.5+f178f9b1194b24ba/node_modules/@radix-ui/react-presence/dist/index.mjs
|
|
6480
6615
|
import * as React213 from "react";
|
|
6481
|
-
import * as
|
|
6616
|
+
import * as React48 from "react";
|
|
6482
6617
|
"use client";
|
|
6483
6618
|
function useStateMachine(initialState, machine) {
|
|
6484
|
-
return
|
|
6619
|
+
return React48.useReducer((state, event) => {
|
|
6485
6620
|
const nextState = machine[state][event];
|
|
6486
6621
|
return nextState ?? state;
|
|
6487
6622
|
}, initialState);
|
|
@@ -6490,7 +6625,7 @@ var Presence = (props) => {
|
|
|
6490
6625
|
const { present, children } = props;
|
|
6491
6626
|
const presence = usePresence(present);
|
|
6492
6627
|
const child = typeof children === "function" ? children({ present: presence.isPresent }) : React213.Children.only(children);
|
|
6493
|
-
const ref =
|
|
6628
|
+
const ref = useComposedRefs(presence.ref, getElementRef4(child));
|
|
6494
6629
|
const forceMount = typeof children === "function";
|
|
6495
6630
|
return forceMount || presence.isPresent ? React213.cloneElement(child, { ref }) : null;
|
|
6496
6631
|
};
|
|
@@ -6589,7 +6724,7 @@ function usePresence(present) {
|
|
|
6589
6724
|
function getAnimationName(styles) {
|
|
6590
6725
|
return styles?.animationName || "none";
|
|
6591
6726
|
}
|
|
6592
|
-
function
|
|
6727
|
+
function getElementRef4(element) {
|
|
6593
6728
|
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
6594
6729
|
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
6595
6730
|
if (mayWarn) {
|
|
@@ -6604,7 +6739,7 @@ function getElementRef3(element) {
|
|
|
6604
6739
|
}
|
|
6605
6740
|
|
|
6606
6741
|
// ../../node_modules/.bun/@radix-ui+react-tabs@1.1.13+f178f9b1194b24ba/node_modules/@radix-ui/react-tabs/dist/index.mjs
|
|
6607
|
-
import { jsx as
|
|
6742
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
6608
6743
|
"use client";
|
|
6609
6744
|
var TABS_NAME = "Tabs";
|
|
6610
6745
|
var [createTabsContext, createTabsScope] = createContextScope2(TABS_NAME, [
|
|
@@ -6612,7 +6747,7 @@ var [createTabsContext, createTabsScope] = createContextScope2(TABS_NAME, [
|
|
|
6612
6747
|
]);
|
|
6613
6748
|
var useRovingFocusGroupScope = createRovingFocusGroupScope();
|
|
6614
6749
|
var [TabsProvider, useTabsContext] = createTabsContext(TABS_NAME);
|
|
6615
|
-
var Tabs =
|
|
6750
|
+
var Tabs = React49.forwardRef((props, forwardedRef) => {
|
|
6616
6751
|
const {
|
|
6617
6752
|
__scopeTabs,
|
|
6618
6753
|
value: valueProp,
|
|
@@ -6630,7 +6765,7 @@ var Tabs = React48.forwardRef((props, forwardedRef) => {
|
|
|
6630
6765
|
defaultProp: defaultValue ?? "",
|
|
6631
6766
|
caller: TABS_NAME
|
|
6632
6767
|
});
|
|
6633
|
-
return /* @__PURE__ */
|
|
6768
|
+
return /* @__PURE__ */ jsx33(TabsProvider, {
|
|
6634
6769
|
scope: __scopeTabs,
|
|
6635
6770
|
baseId: useId2(),
|
|
6636
6771
|
value,
|
|
@@ -6638,7 +6773,7 @@ var Tabs = React48.forwardRef((props, forwardedRef) => {
|
|
|
6638
6773
|
orientation,
|
|
6639
6774
|
dir: direction,
|
|
6640
6775
|
activationMode,
|
|
6641
|
-
children: /* @__PURE__ */
|
|
6776
|
+
children: /* @__PURE__ */ jsx33(Primitive2.div, {
|
|
6642
6777
|
dir: direction,
|
|
6643
6778
|
"data-orientation": orientation,
|
|
6644
6779
|
...tabsProps,
|
|
@@ -6648,17 +6783,17 @@ var Tabs = React48.forwardRef((props, forwardedRef) => {
|
|
|
6648
6783
|
});
|
|
6649
6784
|
Tabs.displayName = TABS_NAME;
|
|
6650
6785
|
var TAB_LIST_NAME = "TabsList";
|
|
6651
|
-
var TabsList =
|
|
6786
|
+
var TabsList = React49.forwardRef((props, forwardedRef) => {
|
|
6652
6787
|
const { __scopeTabs, loop = true, ...listProps } = props;
|
|
6653
6788
|
const context = useTabsContext(TAB_LIST_NAME, __scopeTabs);
|
|
6654
6789
|
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs);
|
|
6655
|
-
return /* @__PURE__ */
|
|
6790
|
+
return /* @__PURE__ */ jsx33(Root3, {
|
|
6656
6791
|
asChild: true,
|
|
6657
6792
|
...rovingFocusGroupScope,
|
|
6658
6793
|
orientation: context.orientation,
|
|
6659
6794
|
dir: context.dir,
|
|
6660
6795
|
loop,
|
|
6661
|
-
children: /* @__PURE__ */
|
|
6796
|
+
children: /* @__PURE__ */ jsx33(Primitive2.div, {
|
|
6662
6797
|
role: "tablist",
|
|
6663
6798
|
"aria-orientation": context.orientation,
|
|
6664
6799
|
...listProps,
|
|
@@ -6668,19 +6803,19 @@ var TabsList = React48.forwardRef((props, forwardedRef) => {
|
|
|
6668
6803
|
});
|
|
6669
6804
|
TabsList.displayName = TAB_LIST_NAME;
|
|
6670
6805
|
var TRIGGER_NAME2 = "TabsTrigger";
|
|
6671
|
-
var TabsTrigger =
|
|
6806
|
+
var TabsTrigger = React49.forwardRef((props, forwardedRef) => {
|
|
6672
6807
|
const { __scopeTabs, value, disabled = false, ...triggerProps } = props;
|
|
6673
6808
|
const context = useTabsContext(TRIGGER_NAME2, __scopeTabs);
|
|
6674
6809
|
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs);
|
|
6675
6810
|
const triggerId = makeTriggerId(context.baseId, value);
|
|
6676
6811
|
const contentId = makeContentId(context.baseId, value);
|
|
6677
6812
|
const isSelected = value === context.value;
|
|
6678
|
-
return /* @__PURE__ */
|
|
6813
|
+
return /* @__PURE__ */ jsx33(Item2, {
|
|
6679
6814
|
asChild: true,
|
|
6680
6815
|
...rovingFocusGroupScope,
|
|
6681
6816
|
focusable: !disabled,
|
|
6682
6817
|
active: isSelected,
|
|
6683
|
-
children: /* @__PURE__ */
|
|
6818
|
+
children: /* @__PURE__ */ jsx33(Primitive2.button, {
|
|
6684
6819
|
type: "button",
|
|
6685
6820
|
role: "tab",
|
|
6686
6821
|
"aria-selected": isSelected,
|
|
@@ -6713,18 +6848,18 @@ var TabsTrigger = React48.forwardRef((props, forwardedRef) => {
|
|
|
6713
6848
|
});
|
|
6714
6849
|
TabsTrigger.displayName = TRIGGER_NAME2;
|
|
6715
6850
|
var CONTENT_NAME3 = "TabsContent";
|
|
6716
|
-
var TabsContent =
|
|
6851
|
+
var TabsContent = React49.forwardRef((props, forwardedRef) => {
|
|
6717
6852
|
const { __scopeTabs, value, forceMount, children, ...contentProps } = props;
|
|
6718
6853
|
const context = useTabsContext(CONTENT_NAME3, __scopeTabs);
|
|
6719
6854
|
const triggerId = makeTriggerId(context.baseId, value);
|
|
6720
6855
|
const contentId = makeContentId(context.baseId, value);
|
|
6721
6856
|
const isSelected = value === context.value;
|
|
6722
|
-
const isMountAnimationPreventedRef =
|
|
6723
|
-
|
|
6857
|
+
const isMountAnimationPreventedRef = React49.useRef(isSelected);
|
|
6858
|
+
React49.useEffect(() => {
|
|
6724
6859
|
const rAF = requestAnimationFrame(() => isMountAnimationPreventedRef.current = false);
|
|
6725
6860
|
return () => cancelAnimationFrame(rAF);
|
|
6726
6861
|
}, []);
|
|
6727
|
-
return /* @__PURE__ */
|
|
6862
|
+
return /* @__PURE__ */ jsx33(Presence, { present: forceMount || isSelected, children: ({ present }) => /* @__PURE__ */ jsx33(Primitive2.div, {
|
|
6728
6863
|
"data-state": isSelected ? "active" : "inactive",
|
|
6729
6864
|
"data-orientation": context.orientation,
|
|
6730
6865
|
role: "tabpanel",
|
|
@@ -6754,32 +6889,32 @@ var Trigger2 = TabsTrigger;
|
|
|
6754
6889
|
var Content3 = TabsContent;
|
|
6755
6890
|
|
|
6756
6891
|
// src/Tabs.tsx
|
|
6757
|
-
import * as
|
|
6758
|
-
import { jsx as
|
|
6892
|
+
import * as React50 from "react";
|
|
6893
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
6759
6894
|
var Tabs2 = Root23;
|
|
6760
|
-
var TabsList2 =
|
|
6895
|
+
var TabsList2 = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx34(List, {
|
|
6761
6896
|
ref,
|
|
6762
6897
|
className: cn("inline-flex items-center justify-center bg-white p-1 border-2 border-black border-b-4 rounded-full", className),
|
|
6763
6898
|
...props
|
|
6764
6899
|
}));
|
|
6765
6900
|
TabsList2.displayName = List.displayName;
|
|
6766
|
-
var TabsTrigger2 =
|
|
6901
|
+
var TabsTrigger2 = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx34(Trigger2, {
|
|
6767
6902
|
ref,
|
|
6768
6903
|
className: cn("inline-flex items-center border-none font-brand bg-transparent justify-center whitespace-nowrap rounded-full px-3 py-1.5 text-sm ring-offset-background focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-brand data-[state=active]:text-white data-[state=inactive]:hover:bg-gray-100", className),
|
|
6769
6904
|
...props
|
|
6770
6905
|
}));
|
|
6771
6906
|
TabsTrigger2.displayName = Trigger2.displayName;
|
|
6772
|
-
var TabsContent2 =
|
|
6907
|
+
var TabsContent2 = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx34(Content3, {
|
|
6773
6908
|
ref,
|
|
6774
6909
|
className: cn("mt-2 ring-offset-background focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", className),
|
|
6775
6910
|
...props
|
|
6776
6911
|
}));
|
|
6777
6912
|
TabsContent2.displayName = Content3.displayName;
|
|
6778
6913
|
// src/Textarea.tsx
|
|
6779
|
-
import
|
|
6780
|
-
import { jsx as
|
|
6781
|
-
var Textarea =
|
|
6782
|
-
return /* @__PURE__ */
|
|
6914
|
+
import React51 from "react";
|
|
6915
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
6916
|
+
var Textarea = React51.forwardRef(({ className, style, ...props }, ref) => {
|
|
6917
|
+
return /* @__PURE__ */ jsx35("textarea", {
|
|
6783
6918
|
ref,
|
|
6784
6919
|
className: cn("w-full bg-white dark:bg-[#121212] rounded-lg border-2 border-b-4 border-black outline-none px-3 py-3 fontbrand text-lg box-border field-sizing-content min-h-[90px]", className),
|
|
6785
6920
|
style: {
|
|
@@ -6790,13 +6925,13 @@ var Textarea = React50.forwardRef(({ className, style, ...props }, ref) => {
|
|
|
6790
6925
|
});
|
|
6791
6926
|
Textarea.displayName = "Textarea";
|
|
6792
6927
|
// src/Triangle.tsx
|
|
6793
|
-
import { jsx as
|
|
6928
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
6794
6929
|
var Triangle2 = (props) => {
|
|
6795
|
-
return /* @__PURE__ */
|
|
6930
|
+
return /* @__PURE__ */ jsx36("svg", {
|
|
6796
6931
|
viewBox: "0 0 127 131",
|
|
6797
6932
|
fill: "none",
|
|
6798
6933
|
...props,
|
|
6799
|
-
children: /* @__PURE__ */
|
|
6934
|
+
children: /* @__PURE__ */ jsx36("path", {
|
|
6800
6935
|
d: "M28.5644 0.011261C25.8196 0.159241 23.6077 0.591782 21.3786 1.43413C20.2669 1.84959 18.4446 2.75455 17.4418 3.38062C13.2472 5.993 10.0496 9.9201 8.38209 14.4903C8.04973 15.3953 7.15007 18.2809 6.5713 20.2672C2.71476 33.5453 0.525761 48.0643 0.0558711 63.4312C-0.0186237 65.8785 -0.0186237 71.7066 0.0558711 74.1141C0.371041 84.3018 1.35093 93.4992 3.12735 102.879C3.84937 106.675 5.00691 111.774 5.67736 114.091C7.04692 118.798 9.84334 122.805 13.8202 125.741C16.4848 127.711 19.5105 129.031 22.8627 129.68C24.4787 129.993 26.6104 130.135 28.1805 130.033C30.3523 129.89 34.6616 129.316 38.1628 128.695C53.9442 125.901 68.5223 120.898 81.7422 113.738C90.1143 109.202 97.2715 104.29 104.177 98.3312C111.059 92.4007 116.927 86.0206 122.09 78.8608C123.287 77.2045 123.889 76.237 124.491 75.019C126.038 71.8773 126.766 68.7527 126.76 65.2582C126.76 62.0027 126.141 59.1114 124.806 56.1518C124.164 54.7233 123.551 53.6988 122.176 51.7523C117.11 44.5868 111.489 38.3433 104.635 32.2762C94.011 22.8739 81.3927 15.1619 67.3017 9.45339C64.2474 8.21835 61.239 7.13128 57.6174 5.95315C49.9502 3.46598 40.4607 1.30891 32.4324 0.233231C31.1718 0.0624847 29.4584 -0.0342712 28.5644 0.011261Z",
|
|
6801
6936
|
fill: "currentcolor"
|
|
6802
6937
|
})
|