@remotion/design 4.0.451 → 4.0.453
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 -592
- 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,44 +987,43 @@ 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
|
|
819
|
-
"use client";
|
|
990
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
820
991
|
function createCollection(name) {
|
|
821
992
|
const PROVIDER_NAME = name + "CollectionProvider";
|
|
822
993
|
const [createCollectionContext, createCollectionScope] = createContextScope(PROVIDER_NAME);
|
|
823
994
|
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(PROVIDER_NAME, { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map });
|
|
824
995
|
const CollectionProvider = (props) => {
|
|
825
996
|
const { scope, children } = props;
|
|
826
|
-
const ref =
|
|
827
|
-
const itemMap =
|
|
828
|
-
return /* @__PURE__ */
|
|
997
|
+
const ref = React11.useRef(null);
|
|
998
|
+
const itemMap = React11.useRef(/* @__PURE__ */ new Map).current;
|
|
999
|
+
return /* @__PURE__ */ jsx15(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
829
1000
|
};
|
|
830
1001
|
CollectionProvider.displayName = PROVIDER_NAME;
|
|
831
1002
|
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
832
|
-
const CollectionSlot =
|
|
1003
|
+
const CollectionSlot = React11.forwardRef((props, forwardedRef) => {
|
|
833
1004
|
const { scope, children } = props;
|
|
834
1005
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
835
|
-
const composedRefs =
|
|
836
|
-
return /* @__PURE__ */
|
|
1006
|
+
const composedRefs = useComposedRefs2(forwardedRef, context.collectionRef);
|
|
1007
|
+
return /* @__PURE__ */ jsx15(Slot2, { ref: composedRefs, children });
|
|
837
1008
|
});
|
|
838
1009
|
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
839
1010
|
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
840
1011
|
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
841
|
-
const CollectionItemSlot =
|
|
1012
|
+
const CollectionItemSlot = React11.forwardRef((props, forwardedRef) => {
|
|
842
1013
|
const { scope, children, ...itemData } = props;
|
|
843
|
-
const ref =
|
|
844
|
-
const composedRefs =
|
|
1014
|
+
const ref = React11.useRef(null);
|
|
1015
|
+
const composedRefs = useComposedRefs2(forwardedRef, ref);
|
|
845
1016
|
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
846
|
-
|
|
1017
|
+
React11.useEffect(() => {
|
|
847
1018
|
context.itemMap.set(ref, { ref, ...itemData });
|
|
848
1019
|
return () => void context.itemMap.delete(ref);
|
|
849
1020
|
});
|
|
850
|
-
return /* @__PURE__ */
|
|
1021
|
+
return /* @__PURE__ */ jsx15(Slot2, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children });
|
|
851
1022
|
});
|
|
852
1023
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
853
1024
|
function useCollection(scope) {
|
|
854
1025
|
const context = useCollectionContext(name + "CollectionConsumer", scope);
|
|
855
|
-
const getItems =
|
|
1026
|
+
const getItems = React11.useCallback(() => {
|
|
856
1027
|
const collectionNode = context.collectionRef.current;
|
|
857
1028
|
if (!collectionNode)
|
|
858
1029
|
return [];
|
|
@@ -871,21 +1042,21 @@ function createCollection(name) {
|
|
|
871
1042
|
}
|
|
872
1043
|
|
|
873
1044
|
// ../../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 =
|
|
1045
|
+
import * as React12 from "react";
|
|
1046
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
1047
|
+
var DirectionContext = React12.createContext(undefined);
|
|
877
1048
|
function useDirection(localDir) {
|
|
878
|
-
const globalDir =
|
|
1049
|
+
const globalDir = React12.useContext(DirectionContext);
|
|
879
1050
|
return localDir || globalDir || "ltr";
|
|
880
1051
|
}
|
|
881
1052
|
|
|
882
1053
|
// ../../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
|
|
1054
|
+
import * as React16 from "react";
|
|
884
1055
|
|
|
885
1056
|
// ../../node_modules/.bun/@radix-ui+react-primitive@2.0.0+f178f9b1194b24ba/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
886
|
-
import * as
|
|
1057
|
+
import * as React13 from "react";
|
|
887
1058
|
import * as ReactDOM from "react-dom";
|
|
888
|
-
import { jsx as
|
|
1059
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
889
1060
|
var NODES = [
|
|
890
1061
|
"a",
|
|
891
1062
|
"button",
|
|
@@ -905,13 +1076,13 @@ var NODES = [
|
|
|
905
1076
|
"ul"
|
|
906
1077
|
];
|
|
907
1078
|
var Primitive = NODES.reduce((primitive, node) => {
|
|
908
|
-
const Node2 =
|
|
1079
|
+
const Node2 = React13.forwardRef((props, forwardedRef) => {
|
|
909
1080
|
const { asChild, ...primitiveProps } = props;
|
|
910
|
-
const Comp = asChild ?
|
|
1081
|
+
const Comp = asChild ? Slot2 : node;
|
|
911
1082
|
if (typeof window !== "undefined") {
|
|
912
1083
|
window[Symbol.for("radix-ui")] = true;
|
|
913
1084
|
}
|
|
914
|
-
return /* @__PURE__ */
|
|
1085
|
+
return /* @__PURE__ */ jsx17(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
915
1086
|
});
|
|
916
1087
|
Node2.displayName = `Primitive.${node}`;
|
|
917
1088
|
return { ...primitive, [node]: Node2 };
|
|
@@ -922,20 +1093,20 @@ function dispatchDiscreteCustomEvent(target, event) {
|
|
|
922
1093
|
}
|
|
923
1094
|
|
|
924
1095
|
// ../../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
|
|
1096
|
+
import * as React14 from "react";
|
|
926
1097
|
function useCallbackRef(callback) {
|
|
927
|
-
const callbackRef =
|
|
928
|
-
|
|
1098
|
+
const callbackRef = React14.useRef(callback);
|
|
1099
|
+
React14.useEffect(() => {
|
|
929
1100
|
callbackRef.current = callback;
|
|
930
1101
|
});
|
|
931
|
-
return
|
|
1102
|
+
return React14.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
932
1103
|
}
|
|
933
1104
|
|
|
934
1105
|
// ../../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
|
|
1106
|
+
import * as React15 from "react";
|
|
936
1107
|
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
|
937
1108
|
const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
|
|
938
|
-
|
|
1109
|
+
React15.useEffect(() => {
|
|
939
1110
|
const handleKeyDown = (event) => {
|
|
940
1111
|
if (event.key === "Escape") {
|
|
941
1112
|
onEscapeKeyDown(event);
|
|
@@ -947,19 +1118,18 @@ function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.docum
|
|
|
947
1118
|
}
|
|
948
1119
|
|
|
949
1120
|
// ../../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
|
|
951
|
-
"use client";
|
|
1121
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
952
1122
|
var DISMISSABLE_LAYER_NAME = "DismissableLayer";
|
|
953
1123
|
var CONTEXT_UPDATE = "dismissableLayer.update";
|
|
954
1124
|
var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
|
|
955
1125
|
var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
|
|
956
1126
|
var originalBodyPointerEvents;
|
|
957
|
-
var DismissableLayerContext =
|
|
1127
|
+
var DismissableLayerContext = React16.createContext({
|
|
958
1128
|
layers: /* @__PURE__ */ new Set,
|
|
959
1129
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set,
|
|
960
1130
|
branches: /* @__PURE__ */ new Set
|
|
961
1131
|
});
|
|
962
|
-
var DismissableLayer =
|
|
1132
|
+
var DismissableLayer = React16.forwardRef((props, forwardedRef) => {
|
|
963
1133
|
const {
|
|
964
1134
|
disableOutsidePointerEvents = false,
|
|
965
1135
|
onEscapeKeyDown,
|
|
@@ -969,11 +1139,11 @@ var DismissableLayer = React14.forwardRef((props, forwardedRef) => {
|
|
|
969
1139
|
onDismiss,
|
|
970
1140
|
...layerProps
|
|
971
1141
|
} = props;
|
|
972
|
-
const context =
|
|
973
|
-
const [node, setNode] =
|
|
1142
|
+
const context = React16.useContext(DismissableLayerContext);
|
|
1143
|
+
const [node, setNode] = React16.useState(null);
|
|
974
1144
|
const ownerDocument = node?.ownerDocument ?? globalThis?.document;
|
|
975
|
-
const [, force] =
|
|
976
|
-
const composedRefs =
|
|
1145
|
+
const [, force] = React16.useState({});
|
|
1146
|
+
const composedRefs = useComposedRefs2(forwardedRef, (node2) => setNode(node2));
|
|
977
1147
|
const layers = Array.from(context.layers);
|
|
978
1148
|
const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
|
|
979
1149
|
const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
|
|
@@ -1010,7 +1180,7 @@ var DismissableLayer = React14.forwardRef((props, forwardedRef) => {
|
|
|
1010
1180
|
onDismiss();
|
|
1011
1181
|
}
|
|
1012
1182
|
}, ownerDocument);
|
|
1013
|
-
|
|
1183
|
+
React16.useEffect(() => {
|
|
1014
1184
|
if (!node)
|
|
1015
1185
|
return;
|
|
1016
1186
|
if (disableOutsidePointerEvents) {
|
|
@@ -1028,7 +1198,7 @@ var DismissableLayer = React14.forwardRef((props, forwardedRef) => {
|
|
|
1028
1198
|
}
|
|
1029
1199
|
};
|
|
1030
1200
|
}, [node, ownerDocument, disableOutsidePointerEvents, context]);
|
|
1031
|
-
|
|
1201
|
+
React16.useEffect(() => {
|
|
1032
1202
|
return () => {
|
|
1033
1203
|
if (!node)
|
|
1034
1204
|
return;
|
|
@@ -1037,12 +1207,12 @@ var DismissableLayer = React14.forwardRef((props, forwardedRef) => {
|
|
|
1037
1207
|
dispatchUpdate();
|
|
1038
1208
|
};
|
|
1039
1209
|
}, [node, context]);
|
|
1040
|
-
|
|
1210
|
+
React16.useEffect(() => {
|
|
1041
1211
|
const handleUpdate = () => force({});
|
|
1042
1212
|
document.addEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
1043
1213
|
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
1044
1214
|
}, []);
|
|
1045
|
-
return /* @__PURE__ */
|
|
1215
|
+
return /* @__PURE__ */ jsx18(Primitive.div, {
|
|
1046
1216
|
...layerProps,
|
|
1047
1217
|
ref: composedRefs,
|
|
1048
1218
|
style: {
|
|
@@ -1056,11 +1226,11 @@ var DismissableLayer = React14.forwardRef((props, forwardedRef) => {
|
|
|
1056
1226
|
});
|
|
1057
1227
|
DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
|
|
1058
1228
|
var BRANCH_NAME = "DismissableLayerBranch";
|
|
1059
|
-
var DismissableLayerBranch =
|
|
1060
|
-
const context =
|
|
1061
|
-
const ref =
|
|
1062
|
-
const composedRefs =
|
|
1063
|
-
|
|
1229
|
+
var DismissableLayerBranch = React16.forwardRef((props, forwardedRef) => {
|
|
1230
|
+
const context = React16.useContext(DismissableLayerContext);
|
|
1231
|
+
const ref = React16.useRef(null);
|
|
1232
|
+
const composedRefs = useComposedRefs2(forwardedRef, ref);
|
|
1233
|
+
React16.useEffect(() => {
|
|
1064
1234
|
const node = ref.current;
|
|
1065
1235
|
if (node) {
|
|
1066
1236
|
context.branches.add(node);
|
|
@@ -1069,14 +1239,14 @@ var DismissableLayerBranch = React14.forwardRef((props, forwardedRef) => {
|
|
|
1069
1239
|
};
|
|
1070
1240
|
}
|
|
1071
1241
|
}, [context.branches]);
|
|
1072
|
-
return /* @__PURE__ */
|
|
1242
|
+
return /* @__PURE__ */ jsx18(Primitive.div, { ...props, ref: composedRefs });
|
|
1073
1243
|
});
|
|
1074
1244
|
DismissableLayerBranch.displayName = BRANCH_NAME;
|
|
1075
1245
|
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
|
|
1076
1246
|
const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);
|
|
1077
|
-
const isPointerInsideReactTreeRef =
|
|
1078
|
-
const handleClickRef =
|
|
1079
|
-
|
|
1247
|
+
const isPointerInsideReactTreeRef = React16.useRef(false);
|
|
1248
|
+
const handleClickRef = React16.useRef(() => {});
|
|
1249
|
+
React16.useEffect(() => {
|
|
1080
1250
|
const handlePointerDown = (event) => {
|
|
1081
1251
|
if (event.target && !isPointerInsideReactTreeRef.current) {
|
|
1082
1252
|
let handleAndDispatchPointerDownOutsideEvent2 = function() {
|
|
@@ -1111,8 +1281,8 @@ function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?
|
|
|
1111
1281
|
}
|
|
1112
1282
|
function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {
|
|
1113
1283
|
const handleFocusOutside = useCallbackRef(onFocusOutside);
|
|
1114
|
-
const isFocusInsideReactTreeRef =
|
|
1115
|
-
|
|
1284
|
+
const isFocusInsideReactTreeRef = React16.useRef(false);
|
|
1285
|
+
React16.useEffect(() => {
|
|
1116
1286
|
const handleFocus = (event) => {
|
|
1117
1287
|
if (event.target && !isFocusInsideReactTreeRef.current) {
|
|
1118
1288
|
const eventDetail = { originalEvent: event };
|
|
@@ -1146,11 +1316,10 @@ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|
|
1146
1316
|
}
|
|
1147
1317
|
|
|
1148
1318
|
// ../../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
|
|
1150
|
-
"use client";
|
|
1319
|
+
import * as React17 from "react";
|
|
1151
1320
|
var count = 0;
|
|
1152
1321
|
function useFocusGuards() {
|
|
1153
|
-
|
|
1322
|
+
React17.useEffect(() => {
|
|
1154
1323
|
const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
|
|
1155
1324
|
document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
|
|
1156
1325
|
document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
|
|
@@ -1172,14 +1341,13 @@ function createFocusGuard() {
|
|
|
1172
1341
|
}
|
|
1173
1342
|
|
|
1174
1343
|
// ../../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
|
|
1177
|
-
"use client";
|
|
1344
|
+
import * as React18 from "react";
|
|
1345
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
1178
1346
|
var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
|
|
1179
1347
|
var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
|
|
1180
1348
|
var EVENT_OPTIONS = { bubbles: false, cancelable: true };
|
|
1181
1349
|
var FOCUS_SCOPE_NAME = "FocusScope";
|
|
1182
|
-
var FocusScope =
|
|
1350
|
+
var FocusScope = React18.forwardRef((props, forwardedRef) => {
|
|
1183
1351
|
const {
|
|
1184
1352
|
loop = false,
|
|
1185
1353
|
trapped = false,
|
|
@@ -1187,12 +1355,12 @@ var FocusScope = React16.forwardRef((props, forwardedRef) => {
|
|
|
1187
1355
|
onUnmountAutoFocus: onUnmountAutoFocusProp,
|
|
1188
1356
|
...scopeProps
|
|
1189
1357
|
} = props;
|
|
1190
|
-
const [container2, setContainer] =
|
|
1358
|
+
const [container2, setContainer] = React18.useState(null);
|
|
1191
1359
|
const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);
|
|
1192
1360
|
const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);
|
|
1193
|
-
const lastFocusedElementRef =
|
|
1194
|
-
const composedRefs =
|
|
1195
|
-
const focusScope =
|
|
1361
|
+
const lastFocusedElementRef = React18.useRef(null);
|
|
1362
|
+
const composedRefs = useComposedRefs2(forwardedRef, (node) => setContainer(node));
|
|
1363
|
+
const focusScope = React18.useRef({
|
|
1196
1364
|
paused: false,
|
|
1197
1365
|
pause() {
|
|
1198
1366
|
this.paused = true;
|
|
@@ -1201,7 +1369,7 @@ var FocusScope = React16.forwardRef((props, forwardedRef) => {
|
|
|
1201
1369
|
this.paused = false;
|
|
1202
1370
|
}
|
|
1203
1371
|
}).current;
|
|
1204
|
-
|
|
1372
|
+
React18.useEffect(() => {
|
|
1205
1373
|
if (trapped) {
|
|
1206
1374
|
let handleFocusIn2 = function(event) {
|
|
1207
1375
|
if (focusScope.paused || !container2)
|
|
@@ -1243,7 +1411,7 @@ var FocusScope = React16.forwardRef((props, forwardedRef) => {
|
|
|
1243
1411
|
};
|
|
1244
1412
|
}
|
|
1245
1413
|
}, [trapped, container2, focusScope.paused]);
|
|
1246
|
-
|
|
1414
|
+
React18.useEffect(() => {
|
|
1247
1415
|
if (container2) {
|
|
1248
1416
|
focusScopesStack.add(focusScope);
|
|
1249
1417
|
const previouslyFocusedElement = document.activeElement;
|
|
@@ -1274,7 +1442,7 @@ var FocusScope = React16.forwardRef((props, forwardedRef) => {
|
|
|
1274
1442
|
};
|
|
1275
1443
|
}
|
|
1276
1444
|
}, [container2, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
|
|
1277
|
-
const handleKeyDown =
|
|
1445
|
+
const handleKeyDown = React18.useCallback((event) => {
|
|
1278
1446
|
if (!loop && !trapped)
|
|
1279
1447
|
return;
|
|
1280
1448
|
if (focusScope.paused)
|
|
@@ -1301,7 +1469,7 @@ var FocusScope = React16.forwardRef((props, forwardedRef) => {
|
|
|
1301
1469
|
}
|
|
1302
1470
|
}
|
|
1303
1471
|
}, [loop, trapped, focusScope.paused]);
|
|
1304
|
-
return /* @__PURE__ */
|
|
1472
|
+
return /* @__PURE__ */ jsx19(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
|
|
1305
1473
|
});
|
|
1306
1474
|
FocusScope.displayName = FOCUS_SCOPE_NAME;
|
|
1307
1475
|
function focusFirst(candidates, { select = false } = {}) {
|
|
@@ -1392,19 +1560,19 @@ function removeLinks(items) {
|
|
|
1392
1560
|
}
|
|
1393
1561
|
|
|
1394
1562
|
// ../../node_modules/.bun/@radix-ui+react-id@1.1.0+09a4a3ac15cb54ba/node_modules/@radix-ui/react-id/dist/index.mjs
|
|
1395
|
-
import * as
|
|
1563
|
+
import * as React20 from "react";
|
|
1396
1564
|
|
|
1397
1565
|
// ../../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) ?
|
|
1566
|
+
import * as React19 from "react";
|
|
1567
|
+
var useLayoutEffect2 = Boolean(globalThis?.document) ? React19.useLayoutEffect : () => {};
|
|
1400
1568
|
|
|
1401
1569
|
// ../../node_modules/.bun/@radix-ui+react-id@1.1.0+09a4a3ac15cb54ba/node_modules/@radix-ui/react-id/dist/index.mjs
|
|
1402
|
-
var useReactId =
|
|
1570
|
+
var useReactId = React20["useId".toString()] || (() => {
|
|
1403
1571
|
return;
|
|
1404
1572
|
});
|
|
1405
1573
|
var count2 = 0;
|
|
1406
1574
|
function useId(deterministicId) {
|
|
1407
|
-
const [id, setId] =
|
|
1575
|
+
const [id, setId] = React20.useState(useReactId());
|
|
1408
1576
|
useLayoutEffect2(() => {
|
|
1409
1577
|
if (!deterministicId)
|
|
1410
1578
|
setId((reactId) => reactId ?? String(count2++));
|
|
@@ -1413,7 +1581,7 @@ function useId(deterministicId) {
|
|
|
1413
1581
|
}
|
|
1414
1582
|
|
|
1415
1583
|
// ../../node_modules/.bun/@radix-ui+react-popper@1.2.0+f178f9b1194b24ba/node_modules/@radix-ui/react-popper/dist/index.mjs
|
|
1416
|
-
import * as
|
|
1584
|
+
import * as React24 from "react";
|
|
1417
1585
|
|
|
1418
1586
|
// ../../node_modules/.bun/@floating-ui+utils@0.2.7/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
|
|
1419
1587
|
var sides = ["top", "right", "bottom", "left"];
|
|
@@ -2935,7 +3103,7 @@ var computePosition2 = (reference, floating, options) => {
|
|
|
2935
3103
|
};
|
|
2936
3104
|
|
|
2937
3105
|
// ../../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
|
|
3106
|
+
import * as React21 from "react";
|
|
2939
3107
|
import { useLayoutEffect as useLayoutEffect3, useEffect as useEffect8 } from "react";
|
|
2940
3108
|
import * as ReactDOM2 from "react-dom";
|
|
2941
3109
|
var index = typeof document !== "undefined" ? useLayoutEffect3 : useEffect8;
|
|
@@ -2999,7 +3167,7 @@ function roundByDPR(element, value) {
|
|
|
2999
3167
|
return Math.round(value * dpr) / dpr;
|
|
3000
3168
|
}
|
|
3001
3169
|
function useLatestRef(value) {
|
|
3002
|
-
const ref =
|
|
3170
|
+
const ref = React21.useRef(value);
|
|
3003
3171
|
index(() => {
|
|
3004
3172
|
ref.current = value;
|
|
3005
3173
|
});
|
|
@@ -3022,7 +3190,7 @@ function useFloating(options) {
|
|
|
3022
3190
|
whileElementsMounted,
|
|
3023
3191
|
open
|
|
3024
3192
|
} = options;
|
|
3025
|
-
const [data, setData] =
|
|
3193
|
+
const [data, setData] = React21.useState({
|
|
3026
3194
|
x: 0,
|
|
3027
3195
|
y: 0,
|
|
3028
3196
|
strategy,
|
|
@@ -3030,19 +3198,19 @@ function useFloating(options) {
|
|
|
3030
3198
|
middlewareData: {},
|
|
3031
3199
|
isPositioned: false
|
|
3032
3200
|
});
|
|
3033
|
-
const [latestMiddleware, setLatestMiddleware] =
|
|
3201
|
+
const [latestMiddleware, setLatestMiddleware] = React21.useState(middleware);
|
|
3034
3202
|
if (!deepEqual(latestMiddleware, middleware)) {
|
|
3035
3203
|
setLatestMiddleware(middleware);
|
|
3036
3204
|
}
|
|
3037
|
-
const [_reference, _setReference] =
|
|
3038
|
-
const [_floating, _setFloating] =
|
|
3039
|
-
const setReference =
|
|
3205
|
+
const [_reference, _setReference] = React21.useState(null);
|
|
3206
|
+
const [_floating, _setFloating] = React21.useState(null);
|
|
3207
|
+
const setReference = React21.useCallback((node) => {
|
|
3040
3208
|
if (node !== referenceRef.current) {
|
|
3041
3209
|
referenceRef.current = node;
|
|
3042
3210
|
_setReference(node);
|
|
3043
3211
|
}
|
|
3044
3212
|
}, []);
|
|
3045
|
-
const setFloating =
|
|
3213
|
+
const setFloating = React21.useCallback((node) => {
|
|
3046
3214
|
if (node !== floatingRef.current) {
|
|
3047
3215
|
floatingRef.current = node;
|
|
3048
3216
|
_setFloating(node);
|
|
@@ -3050,13 +3218,13 @@ function useFloating(options) {
|
|
|
3050
3218
|
}, []);
|
|
3051
3219
|
const referenceEl = externalReference || _reference;
|
|
3052
3220
|
const floatingEl = externalFloating || _floating;
|
|
3053
|
-
const referenceRef =
|
|
3054
|
-
const floatingRef =
|
|
3055
|
-
const dataRef =
|
|
3221
|
+
const referenceRef = React21.useRef(null);
|
|
3222
|
+
const floatingRef = React21.useRef(null);
|
|
3223
|
+
const dataRef = React21.useRef(data);
|
|
3056
3224
|
const hasWhileElementsMounted = whileElementsMounted != null;
|
|
3057
3225
|
const whileElementsMountedRef = useLatestRef(whileElementsMounted);
|
|
3058
3226
|
const platformRef = useLatestRef(platform2);
|
|
3059
|
-
const update =
|
|
3227
|
+
const update = React21.useCallback(() => {
|
|
3060
3228
|
if (!referenceRef.current || !floatingRef.current) {
|
|
3061
3229
|
return;
|
|
3062
3230
|
}
|
|
@@ -3090,7 +3258,7 @@ function useFloating(options) {
|
|
|
3090
3258
|
}));
|
|
3091
3259
|
}
|
|
3092
3260
|
}, [open]);
|
|
3093
|
-
const isMountedRef =
|
|
3261
|
+
const isMountedRef = React21.useRef(false);
|
|
3094
3262
|
index(() => {
|
|
3095
3263
|
isMountedRef.current = true;
|
|
3096
3264
|
return () => {
|
|
@@ -3109,17 +3277,17 @@ function useFloating(options) {
|
|
|
3109
3277
|
update();
|
|
3110
3278
|
}
|
|
3111
3279
|
}, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);
|
|
3112
|
-
const refs =
|
|
3280
|
+
const refs = React21.useMemo(() => ({
|
|
3113
3281
|
reference: referenceRef,
|
|
3114
3282
|
floating: floatingRef,
|
|
3115
3283
|
setReference,
|
|
3116
3284
|
setFloating
|
|
3117
3285
|
}), [setReference, setFloating]);
|
|
3118
|
-
const elements =
|
|
3286
|
+
const elements = React21.useMemo(() => ({
|
|
3119
3287
|
reference: referenceEl,
|
|
3120
3288
|
floating: floatingEl
|
|
3121
3289
|
}), [referenceEl, floatingEl]);
|
|
3122
|
-
const floatingStyles =
|
|
3290
|
+
const floatingStyles = React21.useMemo(() => {
|
|
3123
3291
|
const initialStyles = {
|
|
3124
3292
|
position: strategy,
|
|
3125
3293
|
left: 0,
|
|
@@ -3145,7 +3313,7 @@ function useFloating(options) {
|
|
|
3145
3313
|
top: y
|
|
3146
3314
|
};
|
|
3147
3315
|
}, [strategy, transform, elements.floating, data.x, data.y]);
|
|
3148
|
-
return
|
|
3316
|
+
return React21.useMemo(() => ({
|
|
3149
3317
|
...data,
|
|
3150
3318
|
update,
|
|
3151
3319
|
refs,
|
|
@@ -3214,28 +3382,28 @@ var arrow3 = (options, deps) => ({
|
|
|
3214
3382
|
});
|
|
3215
3383
|
|
|
3216
3384
|
// ../../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
|
|
3385
|
+
import * as React22 from "react";
|
|
3386
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
3219
3387
|
var NAME = "Arrow";
|
|
3220
|
-
var Arrow =
|
|
3388
|
+
var Arrow = React22.forwardRef((props, forwardedRef) => {
|
|
3221
3389
|
const { children, width = 10, height = 5, ...arrowProps } = props;
|
|
3222
|
-
return /* @__PURE__ */
|
|
3390
|
+
return /* @__PURE__ */ jsx20(Primitive.svg, {
|
|
3223
3391
|
...arrowProps,
|
|
3224
3392
|
ref: forwardedRef,
|
|
3225
3393
|
width,
|
|
3226
3394
|
height,
|
|
3227
3395
|
viewBox: "0 0 30 10",
|
|
3228
3396
|
preserveAspectRatio: "none",
|
|
3229
|
-
children: props.asChild ? children : /* @__PURE__ */
|
|
3397
|
+
children: props.asChild ? children : /* @__PURE__ */ jsx20("polygon", { points: "0,0 30,0 15,10" })
|
|
3230
3398
|
});
|
|
3231
3399
|
});
|
|
3232
3400
|
Arrow.displayName = NAME;
|
|
3233
3401
|
var Root = Arrow;
|
|
3234
3402
|
|
|
3235
3403
|
// ../../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
|
|
3404
|
+
import * as React23 from "react";
|
|
3237
3405
|
function useSize(element) {
|
|
3238
|
-
const [size4, setSize] =
|
|
3406
|
+
const [size4, setSize] = React23.useState(undefined);
|
|
3239
3407
|
useLayoutEffect2(() => {
|
|
3240
3408
|
if (element) {
|
|
3241
3409
|
setSize({ width: element.offsetWidth, height: element.offsetHeight });
|
|
@@ -3270,32 +3438,31 @@ function useSize(element) {
|
|
|
3270
3438
|
}
|
|
3271
3439
|
|
|
3272
3440
|
// ../../node_modules/.bun/@radix-ui+react-popper@1.2.0+f178f9b1194b24ba/node_modules/@radix-ui/react-popper/dist/index.mjs
|
|
3273
|
-
import { jsx as
|
|
3274
|
-
"use client";
|
|
3441
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
3275
3442
|
var POPPER_NAME = "Popper";
|
|
3276
3443
|
var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
|
|
3277
3444
|
var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
|
|
3278
3445
|
var Popper = (props) => {
|
|
3279
3446
|
const { __scopePopper, children } = props;
|
|
3280
|
-
const [anchor, setAnchor] =
|
|
3281
|
-
return /* @__PURE__ */
|
|
3447
|
+
const [anchor, setAnchor] = React24.useState(null);
|
|
3448
|
+
return /* @__PURE__ */ jsx21(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });
|
|
3282
3449
|
};
|
|
3283
3450
|
Popper.displayName = POPPER_NAME;
|
|
3284
3451
|
var ANCHOR_NAME = "PopperAnchor";
|
|
3285
|
-
var PopperAnchor =
|
|
3452
|
+
var PopperAnchor = React24.forwardRef((props, forwardedRef) => {
|
|
3286
3453
|
const { __scopePopper, virtualRef, ...anchorProps } = props;
|
|
3287
3454
|
const context = usePopperContext(ANCHOR_NAME, __scopePopper);
|
|
3288
|
-
const ref =
|
|
3289
|
-
const composedRefs =
|
|
3290
|
-
|
|
3455
|
+
const ref = React24.useRef(null);
|
|
3456
|
+
const composedRefs = useComposedRefs2(forwardedRef, ref);
|
|
3457
|
+
React24.useEffect(() => {
|
|
3291
3458
|
context.onAnchorChange(virtualRef?.current || ref.current);
|
|
3292
3459
|
});
|
|
3293
|
-
return virtualRef ? null : /* @__PURE__ */
|
|
3460
|
+
return virtualRef ? null : /* @__PURE__ */ jsx21(Primitive.div, { ...anchorProps, ref: composedRefs });
|
|
3294
3461
|
});
|
|
3295
3462
|
PopperAnchor.displayName = ANCHOR_NAME;
|
|
3296
3463
|
var CONTENT_NAME = "PopperContent";
|
|
3297
3464
|
var [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME);
|
|
3298
|
-
var PopperContent =
|
|
3465
|
+
var PopperContent = React24.forwardRef((props, forwardedRef) => {
|
|
3299
3466
|
const {
|
|
3300
3467
|
__scopePopper,
|
|
3301
3468
|
side = "bottom",
|
|
@@ -3313,9 +3480,9 @@ var PopperContent = React22.forwardRef((props, forwardedRef) => {
|
|
|
3313
3480
|
...contentProps
|
|
3314
3481
|
} = props;
|
|
3315
3482
|
const context = usePopperContext(CONTENT_NAME, __scopePopper);
|
|
3316
|
-
const [content, setContent] =
|
|
3317
|
-
const composedRefs =
|
|
3318
|
-
const [arrow4, setArrow] =
|
|
3483
|
+
const [content, setContent] = React24.useState(null);
|
|
3484
|
+
const composedRefs = useComposedRefs2(forwardedRef, (node) => setContent(node));
|
|
3485
|
+
const [arrow4, setArrow] = React24.useState(null);
|
|
3319
3486
|
const arrowSize = useSize(arrow4);
|
|
3320
3487
|
const arrowWidth = arrowSize?.width ?? 0;
|
|
3321
3488
|
const arrowHeight = arrowSize?.height ?? 0;
|
|
@@ -3375,12 +3542,12 @@ var PopperContent = React22.forwardRef((props, forwardedRef) => {
|
|
|
3375
3542
|
const arrowX = middlewareData.arrow?.x;
|
|
3376
3543
|
const arrowY = middlewareData.arrow?.y;
|
|
3377
3544
|
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
|
|
3378
|
-
const [contentZIndex, setContentZIndex] =
|
|
3545
|
+
const [contentZIndex, setContentZIndex] = React24.useState();
|
|
3379
3546
|
useLayoutEffect2(() => {
|
|
3380
3547
|
if (content)
|
|
3381
3548
|
setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
3382
3549
|
}, [content]);
|
|
3383
|
-
return /* @__PURE__ */
|
|
3550
|
+
return /* @__PURE__ */ jsx21("div", {
|
|
3384
3551
|
ref: refs.setFloating,
|
|
3385
3552
|
"data-radix-popper-content-wrapper": "",
|
|
3386
3553
|
style: {
|
|
@@ -3398,14 +3565,14 @@ var PopperContent = React22.forwardRef((props, forwardedRef) => {
|
|
|
3398
3565
|
}
|
|
3399
3566
|
},
|
|
3400
3567
|
dir: props.dir,
|
|
3401
|
-
children: /* @__PURE__ */
|
|
3568
|
+
children: /* @__PURE__ */ jsx21(PopperContentProvider, {
|
|
3402
3569
|
scope: __scopePopper,
|
|
3403
3570
|
placedSide,
|
|
3404
3571
|
onArrowChange: setArrow,
|
|
3405
3572
|
arrowX,
|
|
3406
3573
|
arrowY,
|
|
3407
3574
|
shouldHideArrow: cannotCenterArrow,
|
|
3408
|
-
children: /* @__PURE__ */
|
|
3575
|
+
children: /* @__PURE__ */ jsx21(Primitive.div, {
|
|
3409
3576
|
"data-side": placedSide,
|
|
3410
3577
|
"data-align": placedAlign,
|
|
3411
3578
|
...contentProps,
|
|
@@ -3426,11 +3593,11 @@ var OPPOSITE_SIDE = {
|
|
|
3426
3593
|
bottom: "top",
|
|
3427
3594
|
left: "right"
|
|
3428
3595
|
};
|
|
3429
|
-
var PopperArrow =
|
|
3596
|
+
var PopperArrow = React24.forwardRef(function PopperArrow2(props, forwardedRef) {
|
|
3430
3597
|
const { __scopePopper, ...arrowProps } = props;
|
|
3431
3598
|
const contentContext = useContentContext(ARROW_NAME, __scopePopper);
|
|
3432
3599
|
const baseSide = OPPOSITE_SIDE[contentContext.placedSide];
|
|
3433
|
-
return /* @__PURE__ */
|
|
3600
|
+
return /* @__PURE__ */ jsx21("span", {
|
|
3434
3601
|
ref: contentContext.onArrowChange,
|
|
3435
3602
|
style: {
|
|
3436
3603
|
position: "absolute",
|
|
@@ -3451,7 +3618,7 @@ var PopperArrow = React22.forwardRef(function PopperArrow2(props, forwardedRef)
|
|
|
3451
3618
|
}[contentContext.placedSide],
|
|
3452
3619
|
visibility: contentContext.shouldHideArrow ? "hidden" : undefined
|
|
3453
3620
|
},
|
|
3454
|
-
children: /* @__PURE__ */
|
|
3621
|
+
children: /* @__PURE__ */ jsx21(Root, {
|
|
3455
3622
|
...arrowProps,
|
|
3456
3623
|
ref: forwardedRef,
|
|
3457
3624
|
style: {
|
|
@@ -3506,22 +3673,21 @@ var Content = PopperContent;
|
|
|
3506
3673
|
var Arrow2 = PopperArrow;
|
|
3507
3674
|
|
|
3508
3675
|
// ../../node_modules/.bun/@radix-ui+react-portal@1.1.1+f178f9b1194b24ba/node_modules/@radix-ui/react-portal/dist/index.mjs
|
|
3509
|
-
import * as
|
|
3676
|
+
import * as React25 from "react";
|
|
3510
3677
|
import ReactDOM3 from "react-dom";
|
|
3511
|
-
import { jsx as
|
|
3512
|
-
"use client";
|
|
3678
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
3513
3679
|
var PORTAL_NAME = "Portal";
|
|
3514
|
-
var Portal =
|
|
3680
|
+
var Portal = React25.forwardRef((props, forwardedRef) => {
|
|
3515
3681
|
const { container: containerProp, ...portalProps } = props;
|
|
3516
|
-
const [mounted, setMounted] =
|
|
3682
|
+
const [mounted, setMounted] = React25.useState(false);
|
|
3517
3683
|
useLayoutEffect2(() => setMounted(true), []);
|
|
3518
3684
|
const container2 = containerProp || mounted && globalThis?.document?.body;
|
|
3519
|
-
return container2 ? ReactDOM3.createPortal(/* @__PURE__ */
|
|
3685
|
+
return container2 ? ReactDOM3.createPortal(/* @__PURE__ */ jsx22(Primitive.div, { ...portalProps, ref: forwardedRef }), container2) : null;
|
|
3520
3686
|
});
|
|
3521
3687
|
Portal.displayName = PORTAL_NAME;
|
|
3522
3688
|
|
|
3523
3689
|
// ../../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
|
|
3690
|
+
import * as React26 from "react";
|
|
3525
3691
|
function useControllableState({
|
|
3526
3692
|
prop,
|
|
3527
3693
|
defaultProp,
|
|
@@ -3531,7 +3697,7 @@ function useControllableState({
|
|
|
3531
3697
|
const isControlled = prop !== undefined;
|
|
3532
3698
|
const value = isControlled ? prop : uncontrolledProp;
|
|
3533
3699
|
const handleChange = useCallbackRef(onChange);
|
|
3534
|
-
const setValue =
|
|
3700
|
+
const setValue = React26.useCallback((nextValue) => {
|
|
3535
3701
|
if (isControlled) {
|
|
3536
3702
|
const setter = nextValue;
|
|
3537
3703
|
const value2 = typeof nextValue === "function" ? setter(prop) : nextValue;
|
|
@@ -3547,11 +3713,11 @@ function useUncontrolledState({
|
|
|
3547
3713
|
defaultProp,
|
|
3548
3714
|
onChange
|
|
3549
3715
|
}) {
|
|
3550
|
-
const uncontrolledState =
|
|
3716
|
+
const uncontrolledState = React26.useState(defaultProp);
|
|
3551
3717
|
const [value] = uncontrolledState;
|
|
3552
|
-
const prevValueRef =
|
|
3718
|
+
const prevValueRef = React26.useRef(value);
|
|
3553
3719
|
const handleChange = useCallbackRef(onChange);
|
|
3554
|
-
|
|
3720
|
+
React26.useEffect(() => {
|
|
3555
3721
|
if (prevValueRef.current !== value) {
|
|
3556
3722
|
handleChange(value);
|
|
3557
3723
|
prevValueRef.current = value;
|
|
@@ -3561,10 +3727,10 @@ function useUncontrolledState({
|
|
|
3561
3727
|
}
|
|
3562
3728
|
|
|
3563
3729
|
// ../../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
|
|
3730
|
+
import * as React27 from "react";
|
|
3565
3731
|
function usePrevious(value) {
|
|
3566
|
-
const ref =
|
|
3567
|
-
return
|
|
3732
|
+
const ref = React27.useRef({ value, previous: value });
|
|
3733
|
+
return React27.useMemo(() => {
|
|
3568
3734
|
if (ref.current.value !== value) {
|
|
3569
3735
|
ref.current.previous = ref.current.value;
|
|
3570
3736
|
ref.current.value = value;
|
|
@@ -3574,11 +3740,11 @@ function usePrevious(value) {
|
|
|
3574
3740
|
}
|
|
3575
3741
|
|
|
3576
3742
|
// ../../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
|
|
3743
|
+
import * as React28 from "react";
|
|
3744
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
3579
3745
|
var NAME2 = "VisuallyHidden";
|
|
3580
|
-
var VisuallyHidden =
|
|
3581
|
-
return /* @__PURE__ */
|
|
3746
|
+
var VisuallyHidden = React28.forwardRef((props, forwardedRef) => {
|
|
3747
|
+
return /* @__PURE__ */ jsx23(Primitive.span, {
|
|
3582
3748
|
...props,
|
|
3583
3749
|
ref: forwardedRef,
|
|
3584
3750
|
style: {
|
|
@@ -3757,10 +3923,10 @@ function __spreadArray(to, from, pack) {
|
|
|
3757
3923
|
}
|
|
3758
3924
|
|
|
3759
3925
|
// ../../node_modules/.bun/react-remove-scroll@2.5.7+09a4a3ac15cb54ba/node_modules/react-remove-scroll/dist/es2015/Combination.js
|
|
3760
|
-
import * as
|
|
3926
|
+
import * as React35 from "react";
|
|
3761
3927
|
|
|
3762
3928
|
// ../../node_modules/.bun/react-remove-scroll@2.5.7+09a4a3ac15cb54ba/node_modules/react-remove-scroll/dist/es2015/UI.js
|
|
3763
|
-
import * as
|
|
3929
|
+
import * as React31 from "react";
|
|
3764
3930
|
|
|
3765
3931
|
// ../../node_modules/.bun/react-remove-scroll-bar@2.3.8+09a4a3ac15cb54ba/node_modules/react-remove-scroll-bar/dist/es2015/constants.js
|
|
3766
3932
|
var zeroRightClassName = "right-scroll-bar-position";
|
|
@@ -3804,8 +3970,8 @@ function useCallbackRef2(initialValue, callback) {
|
|
|
3804
3970
|
}
|
|
3805
3971
|
|
|
3806
3972
|
// ../../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" ?
|
|
3973
|
+
import * as React29 from "react";
|
|
3974
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React29.useLayoutEffect : React29.useEffect;
|
|
3809
3975
|
var currentValues = new WeakMap;
|
|
3810
3976
|
function useMergeRefs(refs, defaultValue) {
|
|
3811
3977
|
var callbackRef = useCallbackRef2(defaultValue || null, function(newValue) {
|
|
@@ -3920,7 +4086,7 @@ function createSidecarMedium(options) {
|
|
|
3920
4086
|
return medium;
|
|
3921
4087
|
}
|
|
3922
4088
|
// ../../node_modules/.bun/use-sidecar@1.1.3+09a4a3ac15cb54ba/node_modules/use-sidecar/dist/es2015/exports.js
|
|
3923
|
-
import * as
|
|
4089
|
+
import * as React30 from "react";
|
|
3924
4090
|
var SideCar = function(_a) {
|
|
3925
4091
|
var sideCar = _a.sideCar, rest = __rest(_a, ["sideCar"]);
|
|
3926
4092
|
if (!sideCar) {
|
|
@@ -3930,7 +4096,7 @@ var SideCar = function(_a) {
|
|
|
3930
4096
|
if (!Target) {
|
|
3931
4097
|
throw new Error("Sidecar medium not found");
|
|
3932
4098
|
}
|
|
3933
|
-
return
|
|
4099
|
+
return React30.createElement(Target, __assign({}, rest));
|
|
3934
4100
|
};
|
|
3935
4101
|
SideCar.isSideCarExport = true;
|
|
3936
4102
|
function exportSidecar(medium, exported) {
|
|
@@ -3944,9 +4110,9 @@ var effectCar = createSidecarMedium();
|
|
|
3944
4110
|
var nothing = function() {
|
|
3945
4111
|
return;
|
|
3946
4112
|
};
|
|
3947
|
-
var RemoveScroll =
|
|
3948
|
-
var ref =
|
|
3949
|
-
var _a =
|
|
4113
|
+
var RemoveScroll = React31.forwardRef(function(props, parentRef) {
|
|
4114
|
+
var ref = React31.useRef(null);
|
|
4115
|
+
var _a = React31.useState({
|
|
3950
4116
|
onScrollCapture: nothing,
|
|
3951
4117
|
onWheelCapture: nothing,
|
|
3952
4118
|
onTouchMoveCapture: nothing
|
|
@@ -3955,7 +4121,7 @@ var RemoveScroll = React29.forwardRef(function(props, parentRef) {
|
|
|
3955
4121
|
var SideCar2 = sideCar;
|
|
3956
4122
|
var containerRef = useMergeRefs([ref, parentRef]);
|
|
3957
4123
|
var containerProps = __assign(__assign({}, rest), callbacks);
|
|
3958
|
-
return
|
|
4124
|
+
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
4125
|
});
|
|
3960
4126
|
RemoveScroll.defaultProps = {
|
|
3961
4127
|
enabled: true,
|
|
@@ -3968,13 +4134,13 @@ RemoveScroll.classNames = {
|
|
|
3968
4134
|
};
|
|
3969
4135
|
|
|
3970
4136
|
// ../../node_modules/.bun/react-remove-scroll@2.5.7+09a4a3ac15cb54ba/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
|
|
3971
|
-
import * as
|
|
4137
|
+
import * as React34 from "react";
|
|
3972
4138
|
|
|
3973
4139
|
// ../../node_modules/.bun/react-remove-scroll-bar@2.3.8+09a4a3ac15cb54ba/node_modules/react-remove-scroll-bar/dist/es2015/component.js
|
|
3974
|
-
import * as
|
|
4140
|
+
import * as React33 from "react";
|
|
3975
4141
|
|
|
3976
4142
|
// ../../node_modules/.bun/react-style-singleton@2.2.3+09a4a3ac15cb54ba/node_modules/react-style-singleton/dist/es2015/hook.js
|
|
3977
|
-
import * as
|
|
4143
|
+
import * as React32 from "react";
|
|
3978
4144
|
|
|
3979
4145
|
// ../../node_modules/.bun/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js
|
|
3980
4146
|
var currentNonce;
|
|
@@ -4038,7 +4204,7 @@ var stylesheetSingleton = function() {
|
|
|
4038
4204
|
var styleHookSingleton = function() {
|
|
4039
4205
|
var sheet = stylesheetSingleton();
|
|
4040
4206
|
return function(styles, isDynamic) {
|
|
4041
|
-
|
|
4207
|
+
React32.useEffect(function() {
|
|
4042
4208
|
sheet.add(styles);
|
|
4043
4209
|
return function() {
|
|
4044
4210
|
sheet.remove();
|
|
@@ -4148,7 +4314,7 @@ var getCurrentUseCounter = function() {
|
|
|
4148
4314
|
return isFinite(counter) ? counter : 0;
|
|
4149
4315
|
};
|
|
4150
4316
|
var useLockAttribute = function() {
|
|
4151
|
-
|
|
4317
|
+
React33.useEffect(function() {
|
|
4152
4318
|
document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
|
|
4153
4319
|
return function() {
|
|
4154
4320
|
var newCounter = getCurrentUseCounter() - 1;
|
|
@@ -4163,10 +4329,10 @@ var useLockAttribute = function() {
|
|
|
4163
4329
|
var RemoveScrollBar = function(_a) {
|
|
4164
4330
|
var { noRelative, noImportant, gapMode: _b } = _a, gapMode = _b === undefined ? "margin" : _b;
|
|
4165
4331
|
useLockAttribute();
|
|
4166
|
-
var gap =
|
|
4332
|
+
var gap = React33.useMemo(function() {
|
|
4167
4333
|
return getGapWidth(gapMode);
|
|
4168
4334
|
}, [gapMode]);
|
|
4169
|
-
return
|
|
4335
|
+
return React33.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
|
|
4170
4336
|
};
|
|
4171
4337
|
|
|
4172
4338
|
// ../../node_modules/.bun/react-remove-scroll@2.5.7+09a4a3ac15cb54ba/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js
|
|
@@ -4299,16 +4465,16 @@ var generateStyle = function(id) {
|
|
|
4299
4465
|
var idCounter = 0;
|
|
4300
4466
|
var lockStack = [];
|
|
4301
4467
|
function RemoveScrollSideCar(props) {
|
|
4302
|
-
var shouldPreventQueue =
|
|
4303
|
-
var touchStartRef =
|
|
4304
|
-
var activeAxis =
|
|
4305
|
-
var id =
|
|
4306
|
-
var Style2 =
|
|
4307
|
-
var lastProps =
|
|
4308
|
-
|
|
4468
|
+
var shouldPreventQueue = React34.useRef([]);
|
|
4469
|
+
var touchStartRef = React34.useRef([0, 0]);
|
|
4470
|
+
var activeAxis = React34.useRef();
|
|
4471
|
+
var id = React34.useState(idCounter++)[0];
|
|
4472
|
+
var Style2 = React34.useState(styleSingleton)[0];
|
|
4473
|
+
var lastProps = React34.useRef(props);
|
|
4474
|
+
React34.useEffect(function() {
|
|
4309
4475
|
lastProps.current = props;
|
|
4310
4476
|
}, [props]);
|
|
4311
|
-
|
|
4477
|
+
React34.useEffect(function() {
|
|
4312
4478
|
if (props.inert) {
|
|
4313
4479
|
document.body.classList.add("block-interactivity-".concat(id));
|
|
4314
4480
|
var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
|
|
@@ -4324,7 +4490,7 @@ function RemoveScrollSideCar(props) {
|
|
|
4324
4490
|
}
|
|
4325
4491
|
return;
|
|
4326
4492
|
}, [props.inert, props.lockRef.current, props.shards]);
|
|
4327
|
-
var shouldCancelEvent =
|
|
4493
|
+
var shouldCancelEvent = React34.useCallback(function(event, parent) {
|
|
4328
4494
|
if ("touches" in event && event.touches.length === 2) {
|
|
4329
4495
|
return !lastProps.current.allowPinchZoom;
|
|
4330
4496
|
}
|
|
@@ -4360,7 +4526,7 @@ function RemoveScrollSideCar(props) {
|
|
|
4360
4526
|
var cancelingAxis = activeAxis.current || currentAxis;
|
|
4361
4527
|
return handleScroll(cancelingAxis, parent, event, cancelingAxis === "h" ? deltaX : deltaY, true);
|
|
4362
4528
|
}, []);
|
|
4363
|
-
var shouldPrevent =
|
|
4529
|
+
var shouldPrevent = React34.useCallback(function(_event) {
|
|
4364
4530
|
var event = _event;
|
|
4365
4531
|
if (!lockStack.length || lockStack[lockStack.length - 1] !== Style2) {
|
|
4366
4532
|
return;
|
|
@@ -4387,7 +4553,7 @@ function RemoveScrollSideCar(props) {
|
|
|
4387
4553
|
}
|
|
4388
4554
|
}
|
|
4389
4555
|
}, []);
|
|
4390
|
-
var shouldCancel =
|
|
4556
|
+
var shouldCancel = React34.useCallback(function(name, delta, target, should) {
|
|
4391
4557
|
var event = { name, delta, target, should, shadowParent: getOutermostShadowParent(target) };
|
|
4392
4558
|
shouldPreventQueue.current.push(event);
|
|
4393
4559
|
setTimeout(function() {
|
|
@@ -4396,17 +4562,17 @@ function RemoveScrollSideCar(props) {
|
|
|
4396
4562
|
});
|
|
4397
4563
|
}, 1);
|
|
4398
4564
|
}, []);
|
|
4399
|
-
var scrollTouchStart =
|
|
4565
|
+
var scrollTouchStart = React34.useCallback(function(event) {
|
|
4400
4566
|
touchStartRef.current = getTouchXY(event);
|
|
4401
4567
|
activeAxis.current = undefined;
|
|
4402
4568
|
}, []);
|
|
4403
|
-
var scrollWheel =
|
|
4569
|
+
var scrollWheel = React34.useCallback(function(event) {
|
|
4404
4570
|
shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
4405
4571
|
}, []);
|
|
4406
|
-
var scrollTouchMove =
|
|
4572
|
+
var scrollTouchMove = React34.useCallback(function(event) {
|
|
4407
4573
|
shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
4408
4574
|
}, []);
|
|
4409
|
-
|
|
4575
|
+
React34.useEffect(function() {
|
|
4410
4576
|
lockStack.push(Style2);
|
|
4411
4577
|
props.setCallbacks({
|
|
4412
4578
|
onScrollCapture: scrollWheel,
|
|
@@ -4426,7 +4592,7 @@ function RemoveScrollSideCar(props) {
|
|
|
4426
4592
|
};
|
|
4427
4593
|
}, []);
|
|
4428
4594
|
var { removeScrollBar, inert } = props;
|
|
4429
|
-
return
|
|
4595
|
+
return React34.createElement(React34.Fragment, null, inert ? React34.createElement(Style2, { styles: generateStyle(id) }) : null, removeScrollBar ? React34.createElement(RemoveScrollBar, { gapMode: props.gapMode }) : null);
|
|
4430
4596
|
}
|
|
4431
4597
|
function getOutermostShadowParent(node) {
|
|
4432
4598
|
var shadowParent = null;
|
|
@@ -4444,15 +4610,14 @@ function getOutermostShadowParent(node) {
|
|
|
4444
4610
|
var sidecar_default = exportSidecar(effectCar, RemoveScrollSideCar);
|
|
4445
4611
|
|
|
4446
4612
|
// ../../node_modules/.bun/react-remove-scroll@2.5.7+09a4a3ac15cb54ba/node_modules/react-remove-scroll/dist/es2015/Combination.js
|
|
4447
|
-
var ReactRemoveScroll =
|
|
4448
|
-
return
|
|
4613
|
+
var ReactRemoveScroll = React35.forwardRef(function(props, ref) {
|
|
4614
|
+
return React35.createElement(RemoveScroll, __assign({}, props, { ref, sideCar: sidecar_default }));
|
|
4449
4615
|
});
|
|
4450
4616
|
ReactRemoveScroll.classNames = RemoveScroll.classNames;
|
|
4451
4617
|
var Combination_default = ReactRemoveScroll;
|
|
4452
4618
|
|
|
4453
4619
|
// ../../node_modules/.bun/@radix-ui+react-select@2.1.1+f178f9b1194b24ba/node_modules/@radix-ui/react-select/dist/index.mjs
|
|
4454
|
-
import { Fragment as
|
|
4455
|
-
"use client";
|
|
4620
|
+
import { Fragment as Fragment8, jsx as jsx24, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
4456
4621
|
var OPEN_KEYS = [" ", "Enter", "ArrowUp", "ArrowDown"];
|
|
4457
4622
|
var SELECTION_KEYS = [" ", "Enter"];
|
|
4458
4623
|
var SELECT_NAME = "Select";
|
|
@@ -4481,9 +4646,9 @@ var Select = (props) => {
|
|
|
4481
4646
|
required
|
|
4482
4647
|
} = props;
|
|
4483
4648
|
const popperScope = usePopperScope(__scopeSelect);
|
|
4484
|
-
const [trigger, setTrigger] =
|
|
4485
|
-
const [valueNode, setValueNode] =
|
|
4486
|
-
const [valueNodeHasChildren, setValueNodeHasChildren] =
|
|
4649
|
+
const [trigger, setTrigger] = React36.useState(null);
|
|
4650
|
+
const [valueNode, setValueNode] = React36.useState(null);
|
|
4651
|
+
const [valueNodeHasChildren, setValueNodeHasChildren] = React36.useState(false);
|
|
4487
4652
|
const direction = useDirection(dir);
|
|
4488
4653
|
const [open = false, setOpen] = useControllableState({
|
|
4489
4654
|
prop: openProp,
|
|
@@ -4495,11 +4660,11 @@ var Select = (props) => {
|
|
|
4495
4660
|
defaultProp: defaultValue,
|
|
4496
4661
|
onChange: onValueChange
|
|
4497
4662
|
});
|
|
4498
|
-
const triggerPointerDownPosRef =
|
|
4663
|
+
const triggerPointerDownPosRef = React36.useRef(null);
|
|
4499
4664
|
const isFormControl = trigger ? Boolean(trigger.closest("form")) : true;
|
|
4500
|
-
const [nativeOptionsSet, setNativeOptionsSet] =
|
|
4665
|
+
const [nativeOptionsSet, setNativeOptionsSet] = React36.useState(/* @__PURE__ */ new Set);
|
|
4501
4666
|
const nativeSelectKey = Array.from(nativeOptionsSet).map((option) => option.props.value).join(";");
|
|
4502
|
-
return /* @__PURE__ */
|
|
4667
|
+
return /* @__PURE__ */ jsx24(Root2, { ...popperScope, children: /* @__PURE__ */ jsxs4(SelectProvider, {
|
|
4503
4668
|
required,
|
|
4504
4669
|
scope: __scopeSelect,
|
|
4505
4670
|
trigger,
|
|
@@ -4517,12 +4682,12 @@ var Select = (props) => {
|
|
|
4517
4682
|
triggerPointerDownPosRef,
|
|
4518
4683
|
disabled,
|
|
4519
4684
|
children: [
|
|
4520
|
-
/* @__PURE__ */
|
|
4685
|
+
/* @__PURE__ */ jsx24(Collection.Provider, { scope: __scopeSelect, children: /* @__PURE__ */ jsx24(SelectNativeOptionsProvider, {
|
|
4521
4686
|
scope: props.__scopeSelect,
|
|
4522
|
-
onNativeOptionAdd:
|
|
4687
|
+
onNativeOptionAdd: React36.useCallback((option) => {
|
|
4523
4688
|
setNativeOptionsSet((prev) => new Set(prev).add(option));
|
|
4524
4689
|
}, []),
|
|
4525
|
-
onNativeOptionRemove:
|
|
4690
|
+
onNativeOptionRemove: React36.useCallback((option) => {
|
|
4526
4691
|
setNativeOptionsSet((prev) => {
|
|
4527
4692
|
const optionsSet = new Set(prev);
|
|
4528
4693
|
optionsSet.delete(option);
|
|
@@ -4541,7 +4706,7 @@ var Select = (props) => {
|
|
|
4541
4706
|
onChange: (event) => setValue(event.target.value),
|
|
4542
4707
|
disabled,
|
|
4543
4708
|
children: [
|
|
4544
|
-
value === undefined ? /* @__PURE__ */
|
|
4709
|
+
value === undefined ? /* @__PURE__ */ jsx24("option", { value: "" }) : null,
|
|
4545
4710
|
Array.from(nativeOptionsSet)
|
|
4546
4711
|
]
|
|
4547
4712
|
}, nativeSelectKey) : null
|
|
@@ -4550,12 +4715,12 @@ var Select = (props) => {
|
|
|
4550
4715
|
};
|
|
4551
4716
|
Select.displayName = SELECT_NAME;
|
|
4552
4717
|
var TRIGGER_NAME = "SelectTrigger";
|
|
4553
|
-
var SelectTrigger =
|
|
4718
|
+
var SelectTrigger = React36.forwardRef((props, forwardedRef) => {
|
|
4554
4719
|
const { __scopeSelect, disabled = false, ...triggerProps } = props;
|
|
4555
4720
|
const popperScope = usePopperScope(__scopeSelect);
|
|
4556
4721
|
const context = useSelectContext(TRIGGER_NAME, __scopeSelect);
|
|
4557
4722
|
const isDisabled = context.disabled || disabled;
|
|
4558
|
-
const composedRefs =
|
|
4723
|
+
const composedRefs = useComposedRefs2(forwardedRef, context.onTriggerChange);
|
|
4559
4724
|
const getItems = useCollection(__scopeSelect);
|
|
4560
4725
|
const [searchRef, handleTypeaheadSearch, resetTypeahead] = useTypeaheadSearch((search) => {
|
|
4561
4726
|
const enabledItems = getItems().filter((item) => !item.disabled);
|
|
@@ -4571,7 +4736,7 @@ var SelectTrigger = React34.forwardRef((props, forwardedRef) => {
|
|
|
4571
4736
|
resetTypeahead();
|
|
4572
4737
|
}
|
|
4573
4738
|
};
|
|
4574
|
-
return /* @__PURE__ */
|
|
4739
|
+
return /* @__PURE__ */ jsx24(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx24(Primitive.button, {
|
|
4575
4740
|
type: "button",
|
|
4576
4741
|
role: "combobox",
|
|
4577
4742
|
"aria-controls": context.contentId,
|
|
@@ -4618,52 +4783,52 @@ var SelectTrigger = React34.forwardRef((props, forwardedRef) => {
|
|
|
4618
4783
|
});
|
|
4619
4784
|
SelectTrigger.displayName = TRIGGER_NAME;
|
|
4620
4785
|
var VALUE_NAME = "SelectValue";
|
|
4621
|
-
var SelectValue =
|
|
4786
|
+
var SelectValue = React36.forwardRef((props, forwardedRef) => {
|
|
4622
4787
|
const { __scopeSelect, className, style, children, placeholder = "", ...valueProps } = props;
|
|
4623
4788
|
const context = useSelectContext(VALUE_NAME, __scopeSelect);
|
|
4624
4789
|
const { onValueNodeHasChildrenChange } = context;
|
|
4625
4790
|
const hasChildren = children !== undefined;
|
|
4626
|
-
const composedRefs =
|
|
4791
|
+
const composedRefs = useComposedRefs2(forwardedRef, context.onValueNodeChange);
|
|
4627
4792
|
useLayoutEffect2(() => {
|
|
4628
4793
|
onValueNodeHasChildrenChange(hasChildren);
|
|
4629
4794
|
}, [onValueNodeHasChildrenChange, hasChildren]);
|
|
4630
|
-
return /* @__PURE__ */
|
|
4795
|
+
return /* @__PURE__ */ jsx24(Primitive.span, {
|
|
4631
4796
|
...valueProps,
|
|
4632
4797
|
ref: composedRefs,
|
|
4633
4798
|
style: { pointerEvents: "none" },
|
|
4634
|
-
children: shouldShowPlaceholder(context.value) ? /* @__PURE__ */
|
|
4799
|
+
children: shouldShowPlaceholder(context.value) ? /* @__PURE__ */ jsx24(Fragment8, { children: placeholder }) : children
|
|
4635
4800
|
});
|
|
4636
4801
|
});
|
|
4637
4802
|
SelectValue.displayName = VALUE_NAME;
|
|
4638
4803
|
var ICON_NAME = "SelectIcon";
|
|
4639
|
-
var SelectIcon =
|
|
4804
|
+
var SelectIcon = React36.forwardRef((props, forwardedRef) => {
|
|
4640
4805
|
const { __scopeSelect, children, ...iconProps } = props;
|
|
4641
|
-
return /* @__PURE__ */
|
|
4806
|
+
return /* @__PURE__ */ jsx24(Primitive.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "▼" });
|
|
4642
4807
|
});
|
|
4643
4808
|
SelectIcon.displayName = ICON_NAME;
|
|
4644
4809
|
var PORTAL_NAME2 = "SelectPortal";
|
|
4645
4810
|
var SelectPortal = (props) => {
|
|
4646
|
-
return /* @__PURE__ */
|
|
4811
|
+
return /* @__PURE__ */ jsx24(Portal, { asChild: true, ...props });
|
|
4647
4812
|
};
|
|
4648
4813
|
SelectPortal.displayName = PORTAL_NAME2;
|
|
4649
4814
|
var CONTENT_NAME2 = "SelectContent";
|
|
4650
|
-
var SelectContent =
|
|
4815
|
+
var SelectContent = React36.forwardRef((props, forwardedRef) => {
|
|
4651
4816
|
const context = useSelectContext(CONTENT_NAME2, props.__scopeSelect);
|
|
4652
|
-
const [fragment, setFragment] =
|
|
4817
|
+
const [fragment, setFragment] = React36.useState();
|
|
4653
4818
|
useLayoutEffect2(() => {
|
|
4654
4819
|
setFragment(new DocumentFragment);
|
|
4655
4820
|
}, []);
|
|
4656
4821
|
if (!context.open) {
|
|
4657
4822
|
const frag = fragment;
|
|
4658
|
-
return frag ? ReactDOM4.createPortal(/* @__PURE__ */
|
|
4823
|
+
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
4824
|
}
|
|
4660
|
-
return /* @__PURE__ */
|
|
4825
|
+
return /* @__PURE__ */ jsx24(SelectContentImpl, { ...props, ref: forwardedRef });
|
|
4661
4826
|
});
|
|
4662
4827
|
SelectContent.displayName = CONTENT_NAME2;
|
|
4663
4828
|
var CONTENT_MARGIN = 10;
|
|
4664
4829
|
var [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME2);
|
|
4665
4830
|
var CONTENT_IMPL_NAME = "SelectContentImpl";
|
|
4666
|
-
var SelectContentImpl =
|
|
4831
|
+
var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
|
|
4667
4832
|
const {
|
|
4668
4833
|
__scopeSelect,
|
|
4669
4834
|
position = "item-aligned",
|
|
@@ -4683,20 +4848,20 @@ var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
4683
4848
|
...contentProps
|
|
4684
4849
|
} = props;
|
|
4685
4850
|
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] =
|
|
4851
|
+
const [content, setContent] = React36.useState(null);
|
|
4852
|
+
const [viewport, setViewport] = React36.useState(null);
|
|
4853
|
+
const composedRefs = useComposedRefs2(forwardedRef, (node) => setContent(node));
|
|
4854
|
+
const [selectedItem, setSelectedItem] = React36.useState(null);
|
|
4855
|
+
const [selectedItemText, setSelectedItemText] = React36.useState(null);
|
|
4691
4856
|
const getItems = useCollection(__scopeSelect);
|
|
4692
|
-
const [isPositioned, setIsPositioned] =
|
|
4693
|
-
const firstValidItemFoundRef =
|
|
4694
|
-
|
|
4857
|
+
const [isPositioned, setIsPositioned] = React36.useState(false);
|
|
4858
|
+
const firstValidItemFoundRef = React36.useRef(false);
|
|
4859
|
+
React36.useEffect(() => {
|
|
4695
4860
|
if (content)
|
|
4696
4861
|
return hideOthers(content);
|
|
4697
4862
|
}, [content]);
|
|
4698
4863
|
useFocusGuards();
|
|
4699
|
-
const focusFirst2 =
|
|
4864
|
+
const focusFirst2 = React36.useCallback((candidates) => {
|
|
4700
4865
|
const [firstItem, ...restItems] = getItems().map((item) => item.ref.current);
|
|
4701
4866
|
const [lastItem] = restItems.slice(-1);
|
|
4702
4867
|
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
|
|
@@ -4713,14 +4878,14 @@ var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
4713
4878
|
return;
|
|
4714
4879
|
}
|
|
4715
4880
|
}, [getItems, viewport]);
|
|
4716
|
-
const focusSelectedItem =
|
|
4717
|
-
|
|
4881
|
+
const focusSelectedItem = React36.useCallback(() => focusFirst2([selectedItem, content]), [focusFirst2, selectedItem, content]);
|
|
4882
|
+
React36.useEffect(() => {
|
|
4718
4883
|
if (isPositioned) {
|
|
4719
4884
|
focusSelectedItem();
|
|
4720
4885
|
}
|
|
4721
4886
|
}, [isPositioned, focusSelectedItem]);
|
|
4722
4887
|
const { onOpenChange, triggerPointerDownPosRef } = context;
|
|
4723
|
-
|
|
4888
|
+
React36.useEffect(() => {
|
|
4724
4889
|
if (content) {
|
|
4725
4890
|
let pointerMoveDelta = { x: 0, y: 0 };
|
|
4726
4891
|
const handlePointerMove = (event) => {
|
|
@@ -4750,7 +4915,7 @@ var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
4750
4915
|
};
|
|
4751
4916
|
}
|
|
4752
4917
|
}, [content, onOpenChange, triggerPointerDownPosRef]);
|
|
4753
|
-
|
|
4918
|
+
React36.useEffect(() => {
|
|
4754
4919
|
const close = () => onOpenChange(false);
|
|
4755
4920
|
window.addEventListener("blur", close);
|
|
4756
4921
|
window.addEventListener("resize", close);
|
|
@@ -4767,7 +4932,7 @@ var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
4767
4932
|
setTimeout(() => nextItem.ref.current.focus());
|
|
4768
4933
|
}
|
|
4769
4934
|
});
|
|
4770
|
-
const itemRefCallback =
|
|
4935
|
+
const itemRefCallback = React36.useCallback((node, value, disabled) => {
|
|
4771
4936
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
4772
4937
|
const isSelectedItem = context.value !== undefined && context.value === value;
|
|
4773
4938
|
if (isSelectedItem || isFirstValidItem) {
|
|
@@ -4776,8 +4941,8 @@ var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
4776
4941
|
firstValidItemFoundRef.current = true;
|
|
4777
4942
|
}
|
|
4778
4943
|
}, [context.value]);
|
|
4779
|
-
const handleItemLeave =
|
|
4780
|
-
const itemTextRefCallback =
|
|
4944
|
+
const handleItemLeave = React36.useCallback(() => content?.focus(), [content]);
|
|
4945
|
+
const itemTextRefCallback = React36.useCallback((node, value, disabled) => {
|
|
4781
4946
|
const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
|
|
4782
4947
|
const isSelectedItem = context.value !== undefined && context.value === value;
|
|
4783
4948
|
if (isSelectedItem || isFirstValidItem) {
|
|
@@ -4797,7 +4962,7 @@ var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
4797
4962
|
hideWhenDetached,
|
|
4798
4963
|
avoidCollisions
|
|
4799
4964
|
} : {};
|
|
4800
|
-
return /* @__PURE__ */
|
|
4965
|
+
return /* @__PURE__ */ jsx24(SelectContentProvider, {
|
|
4801
4966
|
scope: __scopeSelect,
|
|
4802
4967
|
content,
|
|
4803
4968
|
viewport,
|
|
@@ -4811,7 +4976,7 @@ var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
4811
4976
|
position,
|
|
4812
4977
|
isPositioned,
|
|
4813
4978
|
searchRef,
|
|
4814
|
-
children: /* @__PURE__ */
|
|
4979
|
+
children: /* @__PURE__ */ jsx24(Combination_default, { as: Slot2, allowPinchZoom: true, children: /* @__PURE__ */ jsx24(FocusScope, {
|
|
4815
4980
|
asChild: true,
|
|
4816
4981
|
trapped: context.open,
|
|
4817
4982
|
onMountAutoFocus: (event) => {
|
|
@@ -4821,14 +4986,14 @@ var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
4821
4986
|
context.trigger?.focus({ preventScroll: true });
|
|
4822
4987
|
event.preventDefault();
|
|
4823
4988
|
}),
|
|
4824
|
-
children: /* @__PURE__ */
|
|
4989
|
+
children: /* @__PURE__ */ jsx24(DismissableLayer, {
|
|
4825
4990
|
asChild: true,
|
|
4826
4991
|
disableOutsidePointerEvents: true,
|
|
4827
4992
|
onEscapeKeyDown,
|
|
4828
4993
|
onPointerDownOutside,
|
|
4829
4994
|
onFocusOutside: (event) => event.preventDefault(),
|
|
4830
4995
|
onDismiss: () => context.onOpenChange(false),
|
|
4831
|
-
children: /* @__PURE__ */
|
|
4996
|
+
children: /* @__PURE__ */ jsx24(SelectPosition, {
|
|
4832
4997
|
role: "listbox",
|
|
4833
4998
|
id: context.contentId,
|
|
4834
4999
|
"data-state": context.open ? "open" : "closed",
|
|
@@ -4872,18 +5037,18 @@ var SelectContentImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
4872
5037
|
});
|
|
4873
5038
|
SelectContentImpl.displayName = CONTENT_IMPL_NAME;
|
|
4874
5039
|
var ITEM_ALIGNED_POSITION_NAME = "SelectItemAlignedPosition";
|
|
4875
|
-
var SelectItemAlignedPosition =
|
|
5040
|
+
var SelectItemAlignedPosition = React36.forwardRef((props, forwardedRef) => {
|
|
4876
5041
|
const { __scopeSelect, onPlaced, ...popperProps } = props;
|
|
4877
5042
|
const context = useSelectContext(CONTENT_NAME2, __scopeSelect);
|
|
4878
5043
|
const contentContext = useSelectContentContext(CONTENT_NAME2, __scopeSelect);
|
|
4879
|
-
const [contentWrapper, setContentWrapper] =
|
|
4880
|
-
const [content, setContent] =
|
|
4881
|
-
const composedRefs =
|
|
5044
|
+
const [contentWrapper, setContentWrapper] = React36.useState(null);
|
|
5045
|
+
const [content, setContent] = React36.useState(null);
|
|
5046
|
+
const composedRefs = useComposedRefs2(forwardedRef, (node) => setContent(node));
|
|
4882
5047
|
const getItems = useCollection(__scopeSelect);
|
|
4883
|
-
const shouldExpandOnScrollRef =
|
|
4884
|
-
const shouldRepositionRef =
|
|
5048
|
+
const shouldExpandOnScrollRef = React36.useRef(false);
|
|
5049
|
+
const shouldRepositionRef = React36.useRef(true);
|
|
4885
5050
|
const { viewport, selectedItem, selectedItemText, focusSelectedItem } = contentContext;
|
|
4886
|
-
const position =
|
|
5051
|
+
const position = React36.useCallback(() => {
|
|
4887
5052
|
if (context.trigger && context.valueNode && contentWrapper && content && viewport && selectedItem && selectedItemText) {
|
|
4888
5053
|
const triggerRect = context.trigger.getBoundingClientRect();
|
|
4889
5054
|
const contentRect = content.getBoundingClientRect();
|
|
@@ -4964,24 +5129,24 @@ var SelectItemAlignedPosition = React34.forwardRef((props, forwardedRef) => {
|
|
|
4964
5129
|
onPlaced
|
|
4965
5130
|
]);
|
|
4966
5131
|
useLayoutEffect2(() => position(), [position]);
|
|
4967
|
-
const [contentZIndex, setContentZIndex] =
|
|
5132
|
+
const [contentZIndex, setContentZIndex] = React36.useState();
|
|
4968
5133
|
useLayoutEffect2(() => {
|
|
4969
5134
|
if (content)
|
|
4970
5135
|
setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
4971
5136
|
}, [content]);
|
|
4972
|
-
const handleScrollButtonChange =
|
|
5137
|
+
const handleScrollButtonChange = React36.useCallback((node) => {
|
|
4973
5138
|
if (node && shouldRepositionRef.current === true) {
|
|
4974
5139
|
position();
|
|
4975
5140
|
focusSelectedItem?.();
|
|
4976
5141
|
shouldRepositionRef.current = false;
|
|
4977
5142
|
}
|
|
4978
5143
|
}, [position, focusSelectedItem]);
|
|
4979
|
-
return /* @__PURE__ */
|
|
5144
|
+
return /* @__PURE__ */ jsx24(SelectViewportProvider, {
|
|
4980
5145
|
scope: __scopeSelect,
|
|
4981
5146
|
contentWrapper,
|
|
4982
5147
|
shouldExpandOnScrollRef,
|
|
4983
5148
|
onScrollButtonChange: handleScrollButtonChange,
|
|
4984
|
-
children: /* @__PURE__ */
|
|
5149
|
+
children: /* @__PURE__ */ jsx24("div", {
|
|
4985
5150
|
ref: setContentWrapper,
|
|
4986
5151
|
style: {
|
|
4987
5152
|
display: "flex",
|
|
@@ -4989,7 +5154,7 @@ var SelectItemAlignedPosition = React34.forwardRef((props, forwardedRef) => {
|
|
|
4989
5154
|
position: "fixed",
|
|
4990
5155
|
zIndex: contentZIndex
|
|
4991
5156
|
},
|
|
4992
|
-
children: /* @__PURE__ */
|
|
5157
|
+
children: /* @__PURE__ */ jsx24(Primitive.div, {
|
|
4993
5158
|
...popperProps,
|
|
4994
5159
|
ref: composedRefs,
|
|
4995
5160
|
style: {
|
|
@@ -5003,7 +5168,7 @@ var SelectItemAlignedPosition = React34.forwardRef((props, forwardedRef) => {
|
|
|
5003
5168
|
});
|
|
5004
5169
|
SelectItemAlignedPosition.displayName = ITEM_ALIGNED_POSITION_NAME;
|
|
5005
5170
|
var POPPER_POSITION_NAME = "SelectPopperPosition";
|
|
5006
|
-
var SelectPopperPosition =
|
|
5171
|
+
var SelectPopperPosition = React36.forwardRef((props, forwardedRef) => {
|
|
5007
5172
|
const {
|
|
5008
5173
|
__scopeSelect,
|
|
5009
5174
|
align = "start",
|
|
@@ -5011,7 +5176,7 @@ var SelectPopperPosition = React34.forwardRef((props, forwardedRef) => {
|
|
|
5011
5176
|
...popperProps
|
|
5012
5177
|
} = props;
|
|
5013
5178
|
const popperScope = usePopperScope(__scopeSelect);
|
|
5014
|
-
return /* @__PURE__ */
|
|
5179
|
+
return /* @__PURE__ */ jsx24(Content, {
|
|
5015
5180
|
...popperScope,
|
|
5016
5181
|
...popperProps,
|
|
5017
5182
|
ref: forwardedRef,
|
|
@@ -5033,20 +5198,20 @@ var SelectPopperPosition = React34.forwardRef((props, forwardedRef) => {
|
|
|
5033
5198
|
SelectPopperPosition.displayName = POPPER_POSITION_NAME;
|
|
5034
5199
|
var [SelectViewportProvider, useSelectViewportContext] = createSelectContext(CONTENT_NAME2, {});
|
|
5035
5200
|
var VIEWPORT_NAME = "SelectViewport";
|
|
5036
|
-
var SelectViewport =
|
|
5201
|
+
var SelectViewport = React36.forwardRef((props, forwardedRef) => {
|
|
5037
5202
|
const { __scopeSelect, nonce, ...viewportProps } = props;
|
|
5038
5203
|
const contentContext = useSelectContentContext(VIEWPORT_NAME, __scopeSelect);
|
|
5039
5204
|
const viewportContext = useSelectViewportContext(VIEWPORT_NAME, __scopeSelect);
|
|
5040
|
-
const composedRefs =
|
|
5041
|
-
const prevScrollTopRef =
|
|
5042
|
-
return /* @__PURE__ */ jsxs4(
|
|
5043
|
-
/* @__PURE__ */
|
|
5205
|
+
const composedRefs = useComposedRefs2(forwardedRef, contentContext.onViewportChange);
|
|
5206
|
+
const prevScrollTopRef = React36.useRef(0);
|
|
5207
|
+
return /* @__PURE__ */ jsxs4(Fragment8, { children: [
|
|
5208
|
+
/* @__PURE__ */ jsx24("style", {
|
|
5044
5209
|
dangerouslySetInnerHTML: {
|
|
5045
5210
|
__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
5211
|
},
|
|
5047
5212
|
nonce
|
|
5048
5213
|
}),
|
|
5049
|
-
/* @__PURE__ */
|
|
5214
|
+
/* @__PURE__ */ jsx24(Collection.Slot, { scope: __scopeSelect, children: /* @__PURE__ */ jsx24(Primitive.div, {
|
|
5050
5215
|
"data-radix-select-viewport": "",
|
|
5051
5216
|
role: "presentation",
|
|
5052
5217
|
...viewportProps,
|
|
@@ -5087,22 +5252,22 @@ var SelectViewport = React34.forwardRef((props, forwardedRef) => {
|
|
|
5087
5252
|
SelectViewport.displayName = VIEWPORT_NAME;
|
|
5088
5253
|
var GROUP_NAME = "SelectGroup";
|
|
5089
5254
|
var [SelectGroupContextProvider, useSelectGroupContext] = createSelectContext(GROUP_NAME);
|
|
5090
|
-
var SelectGroup =
|
|
5255
|
+
var SelectGroup = React36.forwardRef((props, forwardedRef) => {
|
|
5091
5256
|
const { __scopeSelect, ...groupProps } = props;
|
|
5092
5257
|
const groupId = useId();
|
|
5093
|
-
return /* @__PURE__ */
|
|
5258
|
+
return /* @__PURE__ */ jsx24(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx24(Primitive.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) });
|
|
5094
5259
|
});
|
|
5095
5260
|
SelectGroup.displayName = GROUP_NAME;
|
|
5096
5261
|
var LABEL_NAME = "SelectLabel";
|
|
5097
|
-
var SelectLabel =
|
|
5262
|
+
var SelectLabel = React36.forwardRef((props, forwardedRef) => {
|
|
5098
5263
|
const { __scopeSelect, ...labelProps } = props;
|
|
5099
5264
|
const groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect);
|
|
5100
|
-
return /* @__PURE__ */
|
|
5265
|
+
return /* @__PURE__ */ jsx24(Primitive.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
|
|
5101
5266
|
});
|
|
5102
5267
|
SelectLabel.displayName = LABEL_NAME;
|
|
5103
5268
|
var ITEM_NAME = "SelectItem";
|
|
5104
5269
|
var [SelectItemContextProvider, useSelectItemContext] = createSelectContext(ITEM_NAME);
|
|
5105
|
-
var SelectItem =
|
|
5270
|
+
var SelectItem = React36.forwardRef((props, forwardedRef) => {
|
|
5106
5271
|
const {
|
|
5107
5272
|
__scopeSelect,
|
|
5108
5273
|
value,
|
|
@@ -5113,9 +5278,9 @@ var SelectItem = React34.forwardRef((props, forwardedRef) => {
|
|
|
5113
5278
|
const context = useSelectContext(ITEM_NAME, __scopeSelect);
|
|
5114
5279
|
const contentContext = useSelectContentContext(ITEM_NAME, __scopeSelect);
|
|
5115
5280
|
const isSelected = context.value === value;
|
|
5116
|
-
const [textValue, setTextValue] =
|
|
5117
|
-
const [isFocused, setIsFocused] =
|
|
5118
|
-
const composedRefs =
|
|
5281
|
+
const [textValue, setTextValue] = React36.useState(textValueProp ?? "");
|
|
5282
|
+
const [isFocused, setIsFocused] = React36.useState(false);
|
|
5283
|
+
const composedRefs = useComposedRefs2(forwardedRef, (node) => contentContext.itemRefCallback?.(node, value, disabled));
|
|
5119
5284
|
const textId = useId();
|
|
5120
5285
|
const handleSelect = () => {
|
|
5121
5286
|
if (!disabled) {
|
|
@@ -5126,21 +5291,21 @@ var SelectItem = React34.forwardRef((props, forwardedRef) => {
|
|
|
5126
5291
|
if (value === "") {
|
|
5127
5292
|
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
5293
|
}
|
|
5129
|
-
return /* @__PURE__ */
|
|
5294
|
+
return /* @__PURE__ */ jsx24(SelectItemContextProvider, {
|
|
5130
5295
|
scope: __scopeSelect,
|
|
5131
5296
|
value,
|
|
5132
5297
|
disabled,
|
|
5133
5298
|
textId,
|
|
5134
5299
|
isSelected,
|
|
5135
|
-
onItemTextChange:
|
|
5300
|
+
onItemTextChange: React36.useCallback((node) => {
|
|
5136
5301
|
setTextValue((prevTextValue) => prevTextValue || (node?.textContent ?? "").trim());
|
|
5137
5302
|
}, []),
|
|
5138
|
-
children: /* @__PURE__ */
|
|
5303
|
+
children: /* @__PURE__ */ jsx24(Collection.ItemSlot, {
|
|
5139
5304
|
scope: __scopeSelect,
|
|
5140
5305
|
value,
|
|
5141
5306
|
disabled,
|
|
5142
5307
|
textValue,
|
|
5143
|
-
children: /* @__PURE__ */
|
|
5308
|
+
children: /* @__PURE__ */ jsx24(Primitive.div, {
|
|
5144
5309
|
role: "option",
|
|
5145
5310
|
"aria-labelledby": textId,
|
|
5146
5311
|
"data-highlighted": isFocused ? "" : undefined,
|
|
@@ -5181,40 +5346,40 @@ var SelectItem = React34.forwardRef((props, forwardedRef) => {
|
|
|
5181
5346
|
});
|
|
5182
5347
|
SelectItem.displayName = ITEM_NAME;
|
|
5183
5348
|
var ITEM_TEXT_NAME = "SelectItemText";
|
|
5184
|
-
var SelectItemText =
|
|
5349
|
+
var SelectItemText = React36.forwardRef((props, forwardedRef) => {
|
|
5185
5350
|
const { __scopeSelect, className, style, ...itemTextProps } = props;
|
|
5186
5351
|
const context = useSelectContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
5187
5352
|
const contentContext = useSelectContentContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
5188
5353
|
const itemContext = useSelectItemContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
5189
5354
|
const nativeOptionsContext = useSelectNativeOptionsContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
5190
|
-
const [itemTextNode, setItemTextNode] =
|
|
5191
|
-
const composedRefs =
|
|
5355
|
+
const [itemTextNode, setItemTextNode] = React36.useState(null);
|
|
5356
|
+
const composedRefs = useComposedRefs2(forwardedRef, (node) => setItemTextNode(node), itemContext.onItemTextChange, (node) => contentContext.itemTextRefCallback?.(node, itemContext.value, itemContext.disabled));
|
|
5192
5357
|
const textContent = itemTextNode?.textContent;
|
|
5193
|
-
const nativeOption =
|
|
5358
|
+
const nativeOption = React36.useMemo(() => /* @__PURE__ */ jsx24("option", { value: itemContext.value, disabled: itemContext.disabled, children: textContent }, itemContext.value), [itemContext.disabled, itemContext.value, textContent]);
|
|
5194
5359
|
const { onNativeOptionAdd, onNativeOptionRemove } = nativeOptionsContext;
|
|
5195
5360
|
useLayoutEffect2(() => {
|
|
5196
5361
|
onNativeOptionAdd(nativeOption);
|
|
5197
5362
|
return () => onNativeOptionRemove(nativeOption);
|
|
5198
5363
|
}, [onNativeOptionAdd, onNativeOptionRemove, nativeOption]);
|
|
5199
|
-
return /* @__PURE__ */ jsxs4(
|
|
5200
|
-
/* @__PURE__ */
|
|
5364
|
+
return /* @__PURE__ */ jsxs4(Fragment8, { children: [
|
|
5365
|
+
/* @__PURE__ */ jsx24(Primitive.span, { id: itemContext.textId, ...itemTextProps, ref: composedRefs }),
|
|
5201
5366
|
itemContext.isSelected && context.valueNode && !context.valueNodeHasChildren ? ReactDOM4.createPortal(itemTextProps.children, context.valueNode) : null
|
|
5202
5367
|
] });
|
|
5203
5368
|
});
|
|
5204
5369
|
SelectItemText.displayName = ITEM_TEXT_NAME;
|
|
5205
5370
|
var ITEM_INDICATOR_NAME = "SelectItemIndicator";
|
|
5206
|
-
var SelectItemIndicator =
|
|
5371
|
+
var SelectItemIndicator = React36.forwardRef((props, forwardedRef) => {
|
|
5207
5372
|
const { __scopeSelect, ...itemIndicatorProps } = props;
|
|
5208
5373
|
const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME, __scopeSelect);
|
|
5209
|
-
return itemContext.isSelected ? /* @__PURE__ */
|
|
5374
|
+
return itemContext.isSelected ? /* @__PURE__ */ jsx24(Primitive.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null;
|
|
5210
5375
|
});
|
|
5211
5376
|
SelectItemIndicator.displayName = ITEM_INDICATOR_NAME;
|
|
5212
5377
|
var SCROLL_UP_BUTTON_NAME = "SelectScrollUpButton";
|
|
5213
|
-
var SelectScrollUpButton =
|
|
5378
|
+
var SelectScrollUpButton = React36.forwardRef((props, forwardedRef) => {
|
|
5214
5379
|
const contentContext = useSelectContentContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
5215
5380
|
const viewportContext = useSelectViewportContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
|
|
5216
|
-
const [canScrollUp, setCanScrollUp] =
|
|
5217
|
-
const composedRefs =
|
|
5381
|
+
const [canScrollUp, setCanScrollUp] = React36.useState(false);
|
|
5382
|
+
const composedRefs = useComposedRefs2(forwardedRef, viewportContext.onScrollButtonChange);
|
|
5218
5383
|
useLayoutEffect2(() => {
|
|
5219
5384
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
5220
5385
|
let handleScroll22 = function() {
|
|
@@ -5228,7 +5393,7 @@ var SelectScrollUpButton = React34.forwardRef((props, forwardedRef) => {
|
|
|
5228
5393
|
return () => viewport.removeEventListener("scroll", handleScroll22);
|
|
5229
5394
|
}
|
|
5230
5395
|
}, [contentContext.viewport, contentContext.isPositioned]);
|
|
5231
|
-
return canScrollUp ? /* @__PURE__ */
|
|
5396
|
+
return canScrollUp ? /* @__PURE__ */ jsx24(SelectScrollButtonImpl, {
|
|
5232
5397
|
...props,
|
|
5233
5398
|
ref: composedRefs,
|
|
5234
5399
|
onAutoScroll: () => {
|
|
@@ -5241,11 +5406,11 @@ var SelectScrollUpButton = React34.forwardRef((props, forwardedRef) => {
|
|
|
5241
5406
|
});
|
|
5242
5407
|
SelectScrollUpButton.displayName = SCROLL_UP_BUTTON_NAME;
|
|
5243
5408
|
var SCROLL_DOWN_BUTTON_NAME = "SelectScrollDownButton";
|
|
5244
|
-
var SelectScrollDownButton =
|
|
5409
|
+
var SelectScrollDownButton = React36.forwardRef((props, forwardedRef) => {
|
|
5245
5410
|
const contentContext = useSelectContentContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
5246
5411
|
const viewportContext = useSelectViewportContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
|
|
5247
|
-
const [canScrollDown, setCanScrollDown] =
|
|
5248
|
-
const composedRefs =
|
|
5412
|
+
const [canScrollDown, setCanScrollDown] = React36.useState(false);
|
|
5413
|
+
const composedRefs = useComposedRefs2(forwardedRef, viewportContext.onScrollButtonChange);
|
|
5249
5414
|
useLayoutEffect2(() => {
|
|
5250
5415
|
if (contentContext.viewport && contentContext.isPositioned) {
|
|
5251
5416
|
let handleScroll22 = function() {
|
|
@@ -5260,7 +5425,7 @@ var SelectScrollDownButton = React34.forwardRef((props, forwardedRef) => {
|
|
|
5260
5425
|
return () => viewport.removeEventListener("scroll", handleScroll22);
|
|
5261
5426
|
}
|
|
5262
5427
|
}, [contentContext.viewport, contentContext.isPositioned]);
|
|
5263
|
-
return canScrollDown ? /* @__PURE__ */
|
|
5428
|
+
return canScrollDown ? /* @__PURE__ */ jsx24(SelectScrollButtonImpl, {
|
|
5264
5429
|
...props,
|
|
5265
5430
|
ref: composedRefs,
|
|
5266
5431
|
onAutoScroll: () => {
|
|
@@ -5272,25 +5437,25 @@ var SelectScrollDownButton = React34.forwardRef((props, forwardedRef) => {
|
|
|
5272
5437
|
}) : null;
|
|
5273
5438
|
});
|
|
5274
5439
|
SelectScrollDownButton.displayName = SCROLL_DOWN_BUTTON_NAME;
|
|
5275
|
-
var SelectScrollButtonImpl =
|
|
5440
|
+
var SelectScrollButtonImpl = React36.forwardRef((props, forwardedRef) => {
|
|
5276
5441
|
const { __scopeSelect, onAutoScroll, ...scrollIndicatorProps } = props;
|
|
5277
5442
|
const contentContext = useSelectContentContext("SelectScrollButton", __scopeSelect);
|
|
5278
|
-
const autoScrollTimerRef =
|
|
5443
|
+
const autoScrollTimerRef = React36.useRef(null);
|
|
5279
5444
|
const getItems = useCollection(__scopeSelect);
|
|
5280
|
-
const clearAutoScrollTimer =
|
|
5445
|
+
const clearAutoScrollTimer = React36.useCallback(() => {
|
|
5281
5446
|
if (autoScrollTimerRef.current !== null) {
|
|
5282
5447
|
window.clearInterval(autoScrollTimerRef.current);
|
|
5283
5448
|
autoScrollTimerRef.current = null;
|
|
5284
5449
|
}
|
|
5285
5450
|
}, []);
|
|
5286
|
-
|
|
5451
|
+
React36.useEffect(() => {
|
|
5287
5452
|
return () => clearAutoScrollTimer();
|
|
5288
5453
|
}, [clearAutoScrollTimer]);
|
|
5289
5454
|
useLayoutEffect2(() => {
|
|
5290
5455
|
const activeItem = getItems().find((item) => item.ref.current === document.activeElement);
|
|
5291
5456
|
activeItem?.ref.current?.scrollIntoView({ block: "nearest" });
|
|
5292
5457
|
}, [getItems]);
|
|
5293
|
-
return /* @__PURE__ */
|
|
5458
|
+
return /* @__PURE__ */ jsx24(Primitive.div, {
|
|
5294
5459
|
"aria-hidden": true,
|
|
5295
5460
|
...scrollIndicatorProps,
|
|
5296
5461
|
ref: forwardedRef,
|
|
@@ -5312,29 +5477,29 @@ var SelectScrollButtonImpl = React34.forwardRef((props, forwardedRef) => {
|
|
|
5312
5477
|
});
|
|
5313
5478
|
});
|
|
5314
5479
|
var SEPARATOR_NAME = "SelectSeparator";
|
|
5315
|
-
var SelectSeparator =
|
|
5480
|
+
var SelectSeparator = React36.forwardRef((props, forwardedRef) => {
|
|
5316
5481
|
const { __scopeSelect, ...separatorProps } = props;
|
|
5317
|
-
return /* @__PURE__ */
|
|
5482
|
+
return /* @__PURE__ */ jsx24(Primitive.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
|
|
5318
5483
|
});
|
|
5319
5484
|
SelectSeparator.displayName = SEPARATOR_NAME;
|
|
5320
5485
|
var ARROW_NAME2 = "SelectArrow";
|
|
5321
|
-
var SelectArrow =
|
|
5486
|
+
var SelectArrow = React36.forwardRef((props, forwardedRef) => {
|
|
5322
5487
|
const { __scopeSelect, ...arrowProps } = props;
|
|
5323
5488
|
const popperScope = usePopperScope(__scopeSelect);
|
|
5324
5489
|
const context = useSelectContext(ARROW_NAME2, __scopeSelect);
|
|
5325
5490
|
const contentContext = useSelectContentContext(ARROW_NAME2, __scopeSelect);
|
|
5326
|
-
return context.open && contentContext.position === "popper" ? /* @__PURE__ */
|
|
5491
|
+
return context.open && contentContext.position === "popper" ? /* @__PURE__ */ jsx24(Arrow2, { ...popperScope, ...arrowProps, ref: forwardedRef }) : null;
|
|
5327
5492
|
});
|
|
5328
5493
|
SelectArrow.displayName = ARROW_NAME2;
|
|
5329
5494
|
function shouldShowPlaceholder(value) {
|
|
5330
5495
|
return value === "" || value === undefined;
|
|
5331
5496
|
}
|
|
5332
|
-
var BubbleSelect =
|
|
5497
|
+
var BubbleSelect = React36.forwardRef((props, forwardedRef) => {
|
|
5333
5498
|
const { value, ...selectProps } = props;
|
|
5334
|
-
const ref =
|
|
5335
|
-
const composedRefs =
|
|
5499
|
+
const ref = React36.useRef(null);
|
|
5500
|
+
const composedRefs = useComposedRefs2(forwardedRef, ref);
|
|
5336
5501
|
const prevValue = usePrevious(value);
|
|
5337
|
-
|
|
5502
|
+
React36.useEffect(() => {
|
|
5338
5503
|
const select = ref.current;
|
|
5339
5504
|
const selectProto = window.HTMLSelectElement.prototype;
|
|
5340
5505
|
const descriptor = Object.getOwnPropertyDescriptor(selectProto, "value");
|
|
@@ -5345,14 +5510,14 @@ var BubbleSelect = React34.forwardRef((props, forwardedRef) => {
|
|
|
5345
5510
|
select.dispatchEvent(event);
|
|
5346
5511
|
}
|
|
5347
5512
|
}, [prevValue, value]);
|
|
5348
|
-
return /* @__PURE__ */
|
|
5513
|
+
return /* @__PURE__ */ jsx24(VisuallyHidden, { asChild: true, children: /* @__PURE__ */ jsx24("select", { ...selectProps, ref: composedRefs, defaultValue: value }) });
|
|
5349
5514
|
});
|
|
5350
5515
|
BubbleSelect.displayName = "BubbleSelect";
|
|
5351
5516
|
function useTypeaheadSearch(onSearchChange) {
|
|
5352
5517
|
const handleSearchChange = useCallbackRef(onSearchChange);
|
|
5353
|
-
const searchRef =
|
|
5354
|
-
const timerRef =
|
|
5355
|
-
const handleTypeaheadSearch =
|
|
5518
|
+
const searchRef = React36.useRef("");
|
|
5519
|
+
const timerRef = React36.useRef(0);
|
|
5520
|
+
const handleTypeaheadSearch = React36.useCallback((key) => {
|
|
5356
5521
|
const search = searchRef.current + key;
|
|
5357
5522
|
handleSearchChange(search);
|
|
5358
5523
|
(function updateSearch(value) {
|
|
@@ -5362,11 +5527,11 @@ function useTypeaheadSearch(onSearchChange) {
|
|
|
5362
5527
|
timerRef.current = window.setTimeout(() => updateSearch(""), 1000);
|
|
5363
5528
|
})(search);
|
|
5364
5529
|
}, [handleSearchChange]);
|
|
5365
|
-
const resetTypeahead =
|
|
5530
|
+
const resetTypeahead = React36.useCallback(() => {
|
|
5366
5531
|
searchRef.current = "";
|
|
5367
5532
|
window.clearTimeout(timerRef.current);
|
|
5368
5533
|
}, []);
|
|
5369
|
-
|
|
5534
|
+
React36.useEffect(() => {
|
|
5370
5535
|
return () => window.clearTimeout(timerRef.current);
|
|
5371
5536
|
}, []);
|
|
5372
5537
|
return [searchRef, handleTypeaheadSearch, resetTypeahead];
|
|
@@ -5402,7 +5567,7 @@ var ScrollDownButton = SelectScrollDownButton;
|
|
|
5402
5567
|
var Separator = SelectSeparator;
|
|
5403
5568
|
|
|
5404
5569
|
// ../../node_modules/.bun/lucide-react@0.439.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
5405
|
-
import { forwardRef as
|
|
5570
|
+
import { forwardRef as forwardRef14, createElement as createElement7 } from "react";
|
|
5406
5571
|
|
|
5407
5572
|
// ../../node_modules/.bun/lucide-react@0.439.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/shared/src/utils.js
|
|
5408
5573
|
var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
@@ -5411,7 +5576,7 @@ var mergeClasses = (...classes) => classes.filter((className, index2, array) =>
|
|
|
5411
5576
|
}).join(" ");
|
|
5412
5577
|
|
|
5413
5578
|
// ../../node_modules/.bun/lucide-react@0.439.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/Icon.js
|
|
5414
|
-
import { forwardRef as
|
|
5579
|
+
import { forwardRef as forwardRef13, createElement as createElement6 } from "react";
|
|
5415
5580
|
|
|
5416
5581
|
// ../../node_modules/.bun/lucide-react@0.439.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/defaultAttributes.js
|
|
5417
5582
|
var defaultAttributes = {
|
|
@@ -5427,7 +5592,7 @@ var defaultAttributes = {
|
|
|
5427
5592
|
};
|
|
5428
5593
|
|
|
5429
5594
|
// ../../node_modules/.bun/lucide-react@0.439.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/Icon.js
|
|
5430
|
-
var Icon2 =
|
|
5595
|
+
var Icon2 = forwardRef13(({
|
|
5431
5596
|
color = "currentColor",
|
|
5432
5597
|
size: size4 = 24,
|
|
5433
5598
|
strokeWidth = 2,
|
|
@@ -5454,7 +5619,7 @@ var Icon2 = forwardRef12(({
|
|
|
5454
5619
|
|
|
5455
5620
|
// ../../node_modules/.bun/lucide-react@0.439.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
5456
5621
|
var createLucideIcon = (iconName, iconNode) => {
|
|
5457
|
-
const Component =
|
|
5622
|
+
const Component = forwardRef14(({ className, ...props }, ref) => createElement7(Icon2, {
|
|
5458
5623
|
ref,
|
|
5459
5624
|
iconNode,
|
|
5460
5625
|
className: mergeClasses(`lucide-${toKebabCase(iconName)}`, className),
|
|
@@ -5475,96 +5640,96 @@ var ChevronDown = createLucideIcon("ChevronDown", [
|
|
|
5475
5640
|
// ../../node_modules/.bun/lucide-react@0.439.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/icons/chevron-up.js
|
|
5476
5641
|
var ChevronUp = createLucideIcon("ChevronUp", [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]]);
|
|
5477
5642
|
// src/Select.tsx
|
|
5478
|
-
import * as
|
|
5479
|
-
import { jsx as
|
|
5643
|
+
import * as React37 from "react";
|
|
5644
|
+
import { jsx as jsx25, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
5480
5645
|
var Select2 = Root22;
|
|
5481
5646
|
var SelectGroup2 = Group;
|
|
5482
5647
|
var SelectValue2 = Value;
|
|
5483
|
-
var SelectTrigger2 =
|
|
5648
|
+
var SelectTrigger2 = React37.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(Trigger, {
|
|
5484
5649
|
ref,
|
|
5485
5650
|
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
5651
|
...props,
|
|
5487
5652
|
children: [
|
|
5488
5653
|
children,
|
|
5489
|
-
/* @__PURE__ */
|
|
5654
|
+
/* @__PURE__ */ jsx25(Icon, {
|
|
5490
5655
|
asChild: true,
|
|
5491
|
-
children: /* @__PURE__ */
|
|
5656
|
+
children: /* @__PURE__ */ jsx25(ChevronDown, {
|
|
5492
5657
|
className: "h-4 w-4 opacity-50"
|
|
5493
5658
|
})
|
|
5494
5659
|
})
|
|
5495
5660
|
]
|
|
5496
5661
|
}));
|
|
5497
5662
|
SelectTrigger2.displayName = Trigger.displayName;
|
|
5498
|
-
var SelectScrollUpButton2 =
|
|
5663
|
+
var SelectScrollUpButton2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25(ScrollUpButton, {
|
|
5499
5664
|
ref,
|
|
5500
5665
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
5501
5666
|
...props,
|
|
5502
|
-
children: /* @__PURE__ */
|
|
5667
|
+
children: /* @__PURE__ */ jsx25(ChevronUp, {
|
|
5503
5668
|
className: "h-4 w-4"
|
|
5504
5669
|
})
|
|
5505
5670
|
}));
|
|
5506
5671
|
SelectScrollUpButton2.displayName = ScrollUpButton.displayName;
|
|
5507
|
-
var SelectScrollDownButton2 =
|
|
5672
|
+
var SelectScrollDownButton2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25(ScrollDownButton, {
|
|
5508
5673
|
ref,
|
|
5509
5674
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
5510
5675
|
...props,
|
|
5511
|
-
children: /* @__PURE__ */
|
|
5676
|
+
children: /* @__PURE__ */ jsx25(ChevronDown, {
|
|
5512
5677
|
className: "h-4 w-4"
|
|
5513
5678
|
})
|
|
5514
5679
|
}));
|
|
5515
5680
|
SelectScrollDownButton2.displayName = ScrollDownButton.displayName;
|
|
5516
|
-
var SelectContent2 =
|
|
5681
|
+
var SelectContent2 = React37.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx25(Portal2, {
|
|
5517
5682
|
children: /* @__PURE__ */ jsxs5(Content2, {
|
|
5518
5683
|
ref,
|
|
5519
5684
|
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
5685
|
position,
|
|
5521
5686
|
...props,
|
|
5522
5687
|
children: [
|
|
5523
|
-
/* @__PURE__ */
|
|
5524
|
-
/* @__PURE__ */
|
|
5688
|
+
/* @__PURE__ */ jsx25(SelectScrollUpButton2, {}),
|
|
5689
|
+
/* @__PURE__ */ jsx25(Viewport, {
|
|
5525
5690
|
className: cn("p-1", position === "popper" && "h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)"),
|
|
5526
5691
|
children
|
|
5527
5692
|
}),
|
|
5528
|
-
/* @__PURE__ */
|
|
5693
|
+
/* @__PURE__ */ jsx25(SelectScrollDownButton2, {})
|
|
5529
5694
|
]
|
|
5530
5695
|
})
|
|
5531
5696
|
}));
|
|
5532
5697
|
SelectContent2.displayName = Content2.displayName;
|
|
5533
|
-
var SelectLabel2 =
|
|
5698
|
+
var SelectLabel2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25(Label, {
|
|
5534
5699
|
ref,
|
|
5535
5700
|
className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
|
|
5536
5701
|
...props
|
|
5537
5702
|
}));
|
|
5538
5703
|
SelectLabel2.displayName = Label.displayName;
|
|
5539
|
-
var SelectItem2 =
|
|
5704
|
+
var SelectItem2 = React37.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(Item, {
|
|
5540
5705
|
ref,
|
|
5541
5706
|
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
5707
|
...props,
|
|
5543
5708
|
children: [
|
|
5544
|
-
/* @__PURE__ */
|
|
5709
|
+
/* @__PURE__ */ jsx25("span", {
|
|
5545
5710
|
className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
|
|
5546
|
-
children: /* @__PURE__ */
|
|
5547
|
-
children: /* @__PURE__ */
|
|
5711
|
+
children: /* @__PURE__ */ jsx25(ItemIndicator, {
|
|
5712
|
+
children: /* @__PURE__ */ jsx25(Check, {
|
|
5548
5713
|
className: "h-4 w-4"
|
|
5549
5714
|
})
|
|
5550
5715
|
})
|
|
5551
5716
|
}),
|
|
5552
|
-
/* @__PURE__ */
|
|
5717
|
+
/* @__PURE__ */ jsx25(ItemText, {
|
|
5553
5718
|
children
|
|
5554
5719
|
})
|
|
5555
5720
|
]
|
|
5556
5721
|
}));
|
|
5557
5722
|
SelectItem2.displayName = Item.displayName;
|
|
5558
|
-
var SelectSeparator2 =
|
|
5723
|
+
var SelectSeparator2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25(Separator, {
|
|
5559
5724
|
ref,
|
|
5560
5725
|
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
5561
5726
|
...props
|
|
5562
5727
|
}));
|
|
5563
5728
|
SelectSeparator2.displayName = Separator.displayName;
|
|
5564
5729
|
// src/Switch.tsx
|
|
5565
|
-
import { jsx as
|
|
5730
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
5566
5731
|
var Switch = ({ active, onToggle, "aria-label": ariaLabel }) => {
|
|
5567
|
-
return /* @__PURE__ */
|
|
5732
|
+
return /* @__PURE__ */ jsx26("button", {
|
|
5568
5733
|
type: "button",
|
|
5569
5734
|
role: "switch",
|
|
5570
5735
|
"aria-checked": active,
|
|
@@ -5572,14 +5737,14 @@ var Switch = ({ active, onToggle, "aria-label": ariaLabel }) => {
|
|
|
5572
5737
|
"data-active": active,
|
|
5573
5738
|
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
5739
|
onClick: onToggle,
|
|
5575
|
-
children: /* @__PURE__ */
|
|
5740
|
+
children: /* @__PURE__ */ jsx26("div", {
|
|
5576
5741
|
"data-active": active,
|
|
5577
5742
|
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
5743
|
})
|
|
5579
5744
|
});
|
|
5580
5745
|
};
|
|
5581
5746
|
// ../../node_modules/.bun/@radix-ui+react-tabs@1.1.13+f178f9b1194b24ba/node_modules/@radix-ui/react-tabs/dist/index.mjs
|
|
5582
|
-
import * as
|
|
5747
|
+
import * as React49 from "react";
|
|
5583
5748
|
|
|
5584
5749
|
// ../../node_modules/.bun/@radix-ui+primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.mjs
|
|
5585
5750
|
var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
@@ -5593,24 +5758,24 @@ function composeEventHandlers2(originalEventHandler, ourEventHandler, { checkFor
|
|
|
5593
5758
|
}
|
|
5594
5759
|
|
|
5595
5760
|
// ../../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
|
|
5761
|
+
import * as React38 from "react";
|
|
5762
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
5598
5763
|
function createContextScope2(scopeName, createContextScopeDeps = []) {
|
|
5599
5764
|
let defaultContexts = [];
|
|
5600
5765
|
function createContext32(rootComponentName, defaultContext) {
|
|
5601
|
-
const BaseContext =
|
|
5766
|
+
const BaseContext = React38.createContext(defaultContext);
|
|
5602
5767
|
const index2 = defaultContexts.length;
|
|
5603
5768
|
defaultContexts = [...defaultContexts, defaultContext];
|
|
5604
5769
|
const Provider = (props) => {
|
|
5605
5770
|
const { scope, children, ...context } = props;
|
|
5606
5771
|
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
5607
|
-
const value =
|
|
5608
|
-
return /* @__PURE__ */
|
|
5772
|
+
const value = React38.useMemo(() => context, Object.values(context));
|
|
5773
|
+
return /* @__PURE__ */ jsx27(Context.Provider, { value, children });
|
|
5609
5774
|
};
|
|
5610
5775
|
Provider.displayName = rootComponentName + "Provider";
|
|
5611
5776
|
function useContext22(consumerName, scope) {
|
|
5612
5777
|
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
5613
|
-
const context =
|
|
5778
|
+
const context = React38.useContext(Context);
|
|
5614
5779
|
if (context)
|
|
5615
5780
|
return context;
|
|
5616
5781
|
if (defaultContext !== undefined)
|
|
@@ -5621,11 +5786,11 @@ function createContextScope2(scopeName, createContextScopeDeps = []) {
|
|
|
5621
5786
|
}
|
|
5622
5787
|
const createScope = () => {
|
|
5623
5788
|
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
5624
|
-
return
|
|
5789
|
+
return React38.createContext(defaultContext);
|
|
5625
5790
|
});
|
|
5626
5791
|
return function useScope(scope) {
|
|
5627
5792
|
const contexts = scope?.[scopeName] || scopeContexts;
|
|
5628
|
-
return
|
|
5793
|
+
return React38.useMemo(() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }), [scope, contexts]);
|
|
5629
5794
|
};
|
|
5630
5795
|
};
|
|
5631
5796
|
createScope.scopeName = scopeName;
|
|
@@ -5646,7 +5811,7 @@ function composeContextScopes2(...scopes) {
|
|
|
5646
5811
|
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
5647
5812
|
return { ...nextScopes2, ...currentScope };
|
|
5648
5813
|
}, {});
|
|
5649
|
-
return
|
|
5814
|
+
return React38.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
5650
5815
|
};
|
|
5651
5816
|
};
|
|
5652
5817
|
createScope.scopeName = baseScope.scopeName;
|
|
@@ -5654,96 +5819,59 @@ function composeContextScopes2(...scopes) {
|
|
|
5654
5819
|
}
|
|
5655
5820
|
|
|
5656
5821
|
// ../../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
|
|
5822
|
+
import * as React47 from "react";
|
|
5658
5823
|
|
|
5659
5824
|
// ../../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
|
-
}
|
|
5825
|
+
import React40 from "react";
|
|
5698
5826
|
|
|
5699
5827
|
// ../../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
|
|
5828
|
+
import * as React39 from "react";
|
|
5829
|
+
import { Fragment as Fragment22, jsx as jsx28 } from "react/jsx-runtime";
|
|
5830
|
+
function createSlot2(ownerName) {
|
|
5831
|
+
const SlotClone2 = /* @__PURE__ */ createSlotClone2(ownerName);
|
|
5832
|
+
const Slot22 = React39.forwardRef((props, forwardedRef) => {
|
|
5705
5833
|
const { children, ...slotProps } = props;
|
|
5706
|
-
const childrenArray =
|
|
5707
|
-
const slottable = childrenArray.find(
|
|
5834
|
+
const childrenArray = React39.Children.toArray(children);
|
|
5835
|
+
const slottable = childrenArray.find(isSlottable3);
|
|
5708
5836
|
if (slottable) {
|
|
5709
5837
|
const newElement = slottable.props.children;
|
|
5710
5838
|
const newChildren = childrenArray.map((child) => {
|
|
5711
5839
|
if (child === slottable) {
|
|
5712
|
-
if (
|
|
5713
|
-
return
|
|
5714
|
-
return
|
|
5840
|
+
if (React39.Children.count(newElement) > 1)
|
|
5841
|
+
return React39.Children.only(null);
|
|
5842
|
+
return React39.isValidElement(newElement) ? newElement.props.children : null;
|
|
5715
5843
|
} else {
|
|
5716
5844
|
return child;
|
|
5717
5845
|
}
|
|
5718
5846
|
});
|
|
5719
|
-
return /* @__PURE__ */
|
|
5847
|
+
return /* @__PURE__ */ jsx28(SlotClone2, { ...slotProps, ref: forwardedRef, children: React39.isValidElement(newElement) ? React39.cloneElement(newElement, undefined, newChildren) : null });
|
|
5720
5848
|
}
|
|
5721
|
-
return /* @__PURE__ */
|
|
5849
|
+
return /* @__PURE__ */ jsx28(SlotClone2, { ...slotProps, ref: forwardedRef, children });
|
|
5722
5850
|
});
|
|
5723
|
-
|
|
5724
|
-
return
|
|
5851
|
+
Slot22.displayName = `${ownerName}.Slot`;
|
|
5852
|
+
return Slot22;
|
|
5725
5853
|
}
|
|
5726
|
-
function
|
|
5727
|
-
const SlotClone2 =
|
|
5854
|
+
function createSlotClone2(ownerName) {
|
|
5855
|
+
const SlotClone2 = React39.forwardRef((props, forwardedRef) => {
|
|
5728
5856
|
const { children, ...slotProps } = props;
|
|
5729
|
-
if (
|
|
5730
|
-
const childrenRef =
|
|
5731
|
-
const props2 =
|
|
5732
|
-
if (children.type !==
|
|
5733
|
-
props2.ref = forwardedRef ?
|
|
5857
|
+
if (React39.isValidElement(children)) {
|
|
5858
|
+
const childrenRef = getElementRef3(children);
|
|
5859
|
+
const props2 = mergeProps3(slotProps, children.props);
|
|
5860
|
+
if (children.type !== React39.Fragment) {
|
|
5861
|
+
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
5734
5862
|
}
|
|
5735
|
-
return
|
|
5863
|
+
return React39.cloneElement(children, props2);
|
|
5736
5864
|
}
|
|
5737
|
-
return
|
|
5865
|
+
return React39.Children.count(children) > 1 ? React39.Children.only(null) : null;
|
|
5738
5866
|
});
|
|
5739
5867
|
SlotClone2.displayName = `${ownerName}.SlotClone`;
|
|
5740
5868
|
return SlotClone2;
|
|
5741
5869
|
}
|
|
5742
|
-
var
|
|
5743
|
-
function
|
|
5744
|
-
return
|
|
5870
|
+
var SLOTTABLE_IDENTIFIER2 = Symbol("radix.slottable");
|
|
5871
|
+
function isSlottable3(child) {
|
|
5872
|
+
return React39.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER2;
|
|
5745
5873
|
}
|
|
5746
|
-
function
|
|
5874
|
+
function mergeProps3(slotProps, childProps) {
|
|
5747
5875
|
const overrideProps = { ...childProps };
|
|
5748
5876
|
for (const propName in childProps) {
|
|
5749
5877
|
const slotPropValue = slotProps[propName];
|
|
@@ -5767,7 +5895,7 @@ function mergeProps2(slotProps, childProps) {
|
|
|
5767
5895
|
}
|
|
5768
5896
|
return { ...slotProps, ...overrideProps };
|
|
5769
5897
|
}
|
|
5770
|
-
function
|
|
5898
|
+
function getElementRef3(element) {
|
|
5771
5899
|
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
5772
5900
|
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
5773
5901
|
if (mayWarn) {
|
|
@@ -5782,48 +5910,47 @@ function getElementRef2(element) {
|
|
|
5782
5910
|
}
|
|
5783
5911
|
|
|
5784
5912
|
// ../../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
5913
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
5788
|
-
|
|
5914
|
+
import React210 from "react";
|
|
5915
|
+
import { jsx as jsx210 } from "react/jsx-runtime";
|
|
5789
5916
|
function createCollection2(name) {
|
|
5790
5917
|
const PROVIDER_NAME = name + "CollectionProvider";
|
|
5791
5918
|
const [createCollectionContext, createCollectionScope2] = createContextScope2(PROVIDER_NAME);
|
|
5792
5919
|
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(PROVIDER_NAME, { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map });
|
|
5793
5920
|
const CollectionProvider = (props) => {
|
|
5794
5921
|
const { scope, children } = props;
|
|
5795
|
-
const ref =
|
|
5796
|
-
const itemMap =
|
|
5797
|
-
return /* @__PURE__ */
|
|
5922
|
+
const ref = React40.useRef(null);
|
|
5923
|
+
const itemMap = React40.useRef(/* @__PURE__ */ new Map).current;
|
|
5924
|
+
return /* @__PURE__ */ jsx29(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
5798
5925
|
};
|
|
5799
5926
|
CollectionProvider.displayName = PROVIDER_NAME;
|
|
5800
5927
|
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
5801
|
-
const CollectionSlotImpl =
|
|
5802
|
-
const CollectionSlot =
|
|
5928
|
+
const CollectionSlotImpl = createSlot2(COLLECTION_SLOT_NAME);
|
|
5929
|
+
const CollectionSlot = React40.forwardRef((props, forwardedRef) => {
|
|
5803
5930
|
const { scope, children } = props;
|
|
5804
5931
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
5805
|
-
const composedRefs =
|
|
5806
|
-
return /* @__PURE__ */
|
|
5932
|
+
const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
|
|
5933
|
+
return /* @__PURE__ */ jsx29(CollectionSlotImpl, { ref: composedRefs, children });
|
|
5807
5934
|
});
|
|
5808
5935
|
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
5809
5936
|
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
5810
5937
|
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
5811
|
-
const CollectionItemSlotImpl =
|
|
5812
|
-
const CollectionItemSlot =
|
|
5938
|
+
const CollectionItemSlotImpl = createSlot2(ITEM_SLOT_NAME);
|
|
5939
|
+
const CollectionItemSlot = React40.forwardRef((props, forwardedRef) => {
|
|
5813
5940
|
const { scope, children, ...itemData } = props;
|
|
5814
|
-
const ref =
|
|
5815
|
-
const composedRefs =
|
|
5941
|
+
const ref = React40.useRef(null);
|
|
5942
|
+
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
5816
5943
|
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
5817
|
-
|
|
5944
|
+
React40.useEffect(() => {
|
|
5818
5945
|
context.itemMap.set(ref, { ref, ...itemData });
|
|
5819
5946
|
return () => void context.itemMap.delete(ref);
|
|
5820
5947
|
});
|
|
5821
|
-
return /* @__PURE__ */
|
|
5948
|
+
return /* @__PURE__ */ jsx29(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children });
|
|
5822
5949
|
});
|
|
5823
5950
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
5824
5951
|
function useCollection2(scope) {
|
|
5825
5952
|
const context = useCollectionContext(name + "CollectionConsumer", scope);
|
|
5826
|
-
const getItems =
|
|
5953
|
+
const getItems = React40.useCallback(() => {
|
|
5827
5954
|
const collectionNode = context.collectionRef.current;
|
|
5828
5955
|
if (!collectionNode)
|
|
5829
5956
|
return [];
|
|
@@ -6143,19 +6270,19 @@ function toSafeInteger(number) {
|
|
|
6143
6270
|
}
|
|
6144
6271
|
|
|
6145
6272
|
// ../../node_modules/.bun/@radix-ui+react-id@1.1.1+09a4a3ac15cb54ba/node_modules/@radix-ui/react-id/dist/index.mjs
|
|
6146
|
-
import * as
|
|
6273
|
+
import * as React42 from "react";
|
|
6147
6274
|
|
|
6148
6275
|
// ../../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 ?
|
|
6276
|
+
import * as React41 from "react";
|
|
6277
|
+
var useLayoutEffect22 = globalThis?.document ? React41.useLayoutEffect : () => {};
|
|
6151
6278
|
|
|
6152
6279
|
// ../../node_modules/.bun/@radix-ui+react-id@1.1.1+09a4a3ac15cb54ba/node_modules/@radix-ui/react-id/dist/index.mjs
|
|
6153
|
-
var useReactId2 =
|
|
6280
|
+
var useReactId2 = React42[" useId ".trim().toString()] || (() => {
|
|
6154
6281
|
return;
|
|
6155
6282
|
});
|
|
6156
6283
|
var count3 = 0;
|
|
6157
6284
|
function useId2(deterministicId) {
|
|
6158
|
-
const [id, setId] =
|
|
6285
|
+
const [id, setId] = React42.useState(useReactId2());
|
|
6159
6286
|
useLayoutEffect22(() => {
|
|
6160
6287
|
if (!deterministicId)
|
|
6161
6288
|
setId((reactId) => reactId ?? String(count3++));
|
|
@@ -6164,7 +6291,7 @@ function useId2(deterministicId) {
|
|
|
6164
6291
|
}
|
|
6165
6292
|
|
|
6166
6293
|
// ../../node_modules/.bun/@radix-ui+react-primitive@2.1.3+f178f9b1194b24ba/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
6167
|
-
import * as
|
|
6294
|
+
import * as React43 from "react";
|
|
6168
6295
|
import * as ReactDOM5 from "react-dom";
|
|
6169
6296
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
6170
6297
|
var NODES2 = [
|
|
@@ -6187,10 +6314,10 @@ var NODES2 = [
|
|
|
6187
6314
|
"ul"
|
|
6188
6315
|
];
|
|
6189
6316
|
var Primitive2 = NODES2.reduce((primitive, node) => {
|
|
6190
|
-
const
|
|
6191
|
-
const Node2 =
|
|
6317
|
+
const Slot3 = createSlot2(`Primitive.${node}`);
|
|
6318
|
+
const Node2 = React43.forwardRef((props, forwardedRef) => {
|
|
6192
6319
|
const { asChild, ...primitiveProps } = props;
|
|
6193
|
-
const Comp = asChild ?
|
|
6320
|
+
const Comp = asChild ? Slot3 : node;
|
|
6194
6321
|
if (typeof window !== "undefined") {
|
|
6195
6322
|
window[Symbol.for("radix-ui")] = true;
|
|
6196
6323
|
}
|
|
@@ -6201,19 +6328,19 @@ var Primitive2 = NODES2.reduce((primitive, node) => {
|
|
|
6201
6328
|
}, {});
|
|
6202
6329
|
|
|
6203
6330
|
// ../../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
|
|
6331
|
+
import * as React44 from "react";
|
|
6205
6332
|
function useCallbackRef3(callback) {
|
|
6206
|
-
const callbackRef =
|
|
6207
|
-
|
|
6333
|
+
const callbackRef = React44.useRef(callback);
|
|
6334
|
+
React44.useEffect(() => {
|
|
6208
6335
|
callbackRef.current = callback;
|
|
6209
6336
|
});
|
|
6210
|
-
return
|
|
6337
|
+
return React44.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
6211
6338
|
}
|
|
6212
6339
|
|
|
6213
6340
|
// ../../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
|
|
6341
|
+
import * as React45 from "react";
|
|
6215
6342
|
import * as React212 from "react";
|
|
6216
|
-
var useInsertionEffect =
|
|
6343
|
+
var useInsertionEffect = React45[" useInsertionEffect ".trim().toString()] || useLayoutEffect22;
|
|
6217
6344
|
function useControllableState2({
|
|
6218
6345
|
prop,
|
|
6219
6346
|
defaultProp,
|
|
@@ -6227,8 +6354,8 @@ function useControllableState2({
|
|
|
6227
6354
|
const isControlled = prop !== undefined;
|
|
6228
6355
|
const value = isControlled ? prop : uncontrolledProp;
|
|
6229
6356
|
if (true) {
|
|
6230
|
-
const isControlledRef =
|
|
6231
|
-
|
|
6357
|
+
const isControlledRef = React45.useRef(prop !== undefined);
|
|
6358
|
+
React45.useEffect(() => {
|
|
6232
6359
|
const wasControlled = isControlledRef.current;
|
|
6233
6360
|
if (wasControlled !== isControlled) {
|
|
6234
6361
|
const from = wasControlled ? "controlled" : "uncontrolled";
|
|
@@ -6238,7 +6365,7 @@ function useControllableState2({
|
|
|
6238
6365
|
isControlledRef.current = isControlled;
|
|
6239
6366
|
}, [isControlled, caller]);
|
|
6240
6367
|
}
|
|
6241
|
-
const setValue =
|
|
6368
|
+
const setValue = React45.useCallback((nextValue) => {
|
|
6242
6369
|
if (isControlled) {
|
|
6243
6370
|
const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
|
|
6244
6371
|
if (value2 !== prop) {
|
|
@@ -6254,13 +6381,13 @@ function useUncontrolledState2({
|
|
|
6254
6381
|
defaultProp,
|
|
6255
6382
|
onChange
|
|
6256
6383
|
}) {
|
|
6257
|
-
const [value, setValue] =
|
|
6258
|
-
const prevValueRef =
|
|
6259
|
-
const onChangeRef =
|
|
6384
|
+
const [value, setValue] = React45.useState(defaultProp);
|
|
6385
|
+
const prevValueRef = React45.useRef(value);
|
|
6386
|
+
const onChangeRef = React45.useRef(onChange);
|
|
6260
6387
|
useInsertionEffect(() => {
|
|
6261
6388
|
onChangeRef.current = onChange;
|
|
6262
6389
|
}, [onChange]);
|
|
6263
|
-
|
|
6390
|
+
React45.useEffect(() => {
|
|
6264
6391
|
if (prevValueRef.current !== value) {
|
|
6265
6392
|
onChangeRef.current?.(value);
|
|
6266
6393
|
prevValueRef.current = value;
|
|
@@ -6274,28 +6401,27 @@ function isFunction(value) {
|
|
|
6274
6401
|
var SYNC_STATE = Symbol("RADIX:SYNC_STATE");
|
|
6275
6402
|
|
|
6276
6403
|
// ../../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 =
|
|
6404
|
+
import * as React46 from "react";
|
|
6405
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
6406
|
+
var DirectionContext2 = React46.createContext(undefined);
|
|
6280
6407
|
function useDirection2(localDir) {
|
|
6281
|
-
const globalDir =
|
|
6408
|
+
const globalDir = React46.useContext(DirectionContext2);
|
|
6282
6409
|
return localDir || globalDir || "ltr";
|
|
6283
6410
|
}
|
|
6284
6411
|
|
|
6285
6412
|
// ../../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
|
|
6287
|
-
"use client";
|
|
6413
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
6288
6414
|
var ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus";
|
|
6289
6415
|
var EVENT_OPTIONS2 = { bubbles: false, cancelable: true };
|
|
6290
6416
|
var GROUP_NAME2 = "RovingFocusGroup";
|
|
6291
6417
|
var [Collection2, useCollection2, createCollectionScope2] = createCollection2(GROUP_NAME2);
|
|
6292
6418
|
var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope2(GROUP_NAME2, [createCollectionScope2]);
|
|
6293
6419
|
var [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME2);
|
|
6294
|
-
var RovingFocusGroup =
|
|
6295
|
-
return /* @__PURE__ */
|
|
6420
|
+
var RovingFocusGroup = React47.forwardRef((props, forwardedRef) => {
|
|
6421
|
+
return /* @__PURE__ */ jsx32(Collection2.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx32(Collection2.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx32(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });
|
|
6296
6422
|
});
|
|
6297
6423
|
RovingFocusGroup.displayName = GROUP_NAME2;
|
|
6298
|
-
var RovingFocusGroupImpl =
|
|
6424
|
+
var RovingFocusGroupImpl = React47.forwardRef((props, forwardedRef) => {
|
|
6299
6425
|
const {
|
|
6300
6426
|
__scopeRovingFocusGroup,
|
|
6301
6427
|
orientation,
|
|
@@ -6308,8 +6434,8 @@ var RovingFocusGroupImpl = React46.forwardRef((props, forwardedRef) => {
|
|
|
6308
6434
|
preventScrollOnEntryFocus = false,
|
|
6309
6435
|
...groupProps
|
|
6310
6436
|
} = props;
|
|
6311
|
-
const ref =
|
|
6312
|
-
const composedRefs =
|
|
6437
|
+
const ref = React47.useRef(null);
|
|
6438
|
+
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
6313
6439
|
const direction = useDirection2(dir);
|
|
6314
6440
|
const [currentTabStopId, setCurrentTabStopId] = useControllableState2({
|
|
6315
6441
|
prop: currentTabStopIdProp,
|
|
@@ -6317,29 +6443,29 @@ var RovingFocusGroupImpl = React46.forwardRef((props, forwardedRef) => {
|
|
|
6317
6443
|
onChange: onCurrentTabStopIdChange,
|
|
6318
6444
|
caller: GROUP_NAME2
|
|
6319
6445
|
});
|
|
6320
|
-
const [isTabbingBackOut, setIsTabbingBackOut] =
|
|
6446
|
+
const [isTabbingBackOut, setIsTabbingBackOut] = React47.useState(false);
|
|
6321
6447
|
const handleEntryFocus = useCallbackRef3(onEntryFocus);
|
|
6322
6448
|
const getItems = useCollection2(__scopeRovingFocusGroup);
|
|
6323
|
-
const isClickFocusRef =
|
|
6324
|
-
const [focusableItemsCount, setFocusableItemsCount] =
|
|
6325
|
-
|
|
6449
|
+
const isClickFocusRef = React47.useRef(false);
|
|
6450
|
+
const [focusableItemsCount, setFocusableItemsCount] = React47.useState(0);
|
|
6451
|
+
React47.useEffect(() => {
|
|
6326
6452
|
const node = ref.current;
|
|
6327
6453
|
if (node) {
|
|
6328
6454
|
node.addEventListener(ENTRY_FOCUS, handleEntryFocus);
|
|
6329
6455
|
return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);
|
|
6330
6456
|
}
|
|
6331
6457
|
}, [handleEntryFocus]);
|
|
6332
|
-
return /* @__PURE__ */
|
|
6458
|
+
return /* @__PURE__ */ jsx32(RovingFocusProvider, {
|
|
6333
6459
|
scope: __scopeRovingFocusGroup,
|
|
6334
6460
|
orientation,
|
|
6335
6461
|
dir: direction,
|
|
6336
6462
|
loop,
|
|
6337
6463
|
currentTabStopId,
|
|
6338
|
-
onItemFocus:
|
|
6339
|
-
onItemShiftTab:
|
|
6340
|
-
onFocusableItemAdd:
|
|
6341
|
-
onFocusableItemRemove:
|
|
6342
|
-
children: /* @__PURE__ */
|
|
6464
|
+
onItemFocus: React47.useCallback((tabStopId) => setCurrentTabStopId(tabStopId), [setCurrentTabStopId]),
|
|
6465
|
+
onItemShiftTab: React47.useCallback(() => setIsTabbingBackOut(true), []),
|
|
6466
|
+
onFocusableItemAdd: React47.useCallback(() => setFocusableItemsCount((prevCount) => prevCount + 1), []),
|
|
6467
|
+
onFocusableItemRemove: React47.useCallback(() => setFocusableItemsCount((prevCount) => prevCount - 1), []),
|
|
6468
|
+
children: /* @__PURE__ */ jsx32(Primitive2.div, {
|
|
6343
6469
|
tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
|
|
6344
6470
|
"data-orientation": orientation,
|
|
6345
6471
|
...groupProps,
|
|
@@ -6369,7 +6495,7 @@ var RovingFocusGroupImpl = React46.forwardRef((props, forwardedRef) => {
|
|
|
6369
6495
|
});
|
|
6370
6496
|
});
|
|
6371
6497
|
var ITEM_NAME2 = "RovingFocusGroupItem";
|
|
6372
|
-
var RovingFocusGroupItem =
|
|
6498
|
+
var RovingFocusGroupItem = React47.forwardRef((props, forwardedRef) => {
|
|
6373
6499
|
const {
|
|
6374
6500
|
__scopeRovingFocusGroup,
|
|
6375
6501
|
focusable = true,
|
|
@@ -6384,18 +6510,18 @@ var RovingFocusGroupItem = React46.forwardRef((props, forwardedRef) => {
|
|
|
6384
6510
|
const isCurrentTabStop = context.currentTabStopId === id;
|
|
6385
6511
|
const getItems = useCollection2(__scopeRovingFocusGroup);
|
|
6386
6512
|
const { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context;
|
|
6387
|
-
|
|
6513
|
+
React47.useEffect(() => {
|
|
6388
6514
|
if (focusable) {
|
|
6389
6515
|
onFocusableItemAdd();
|
|
6390
6516
|
return () => onFocusableItemRemove();
|
|
6391
6517
|
}
|
|
6392
6518
|
}, [focusable, onFocusableItemAdd, onFocusableItemRemove]);
|
|
6393
|
-
return /* @__PURE__ */
|
|
6519
|
+
return /* @__PURE__ */ jsx32(Collection2.ItemSlot, {
|
|
6394
6520
|
scope: __scopeRovingFocusGroup,
|
|
6395
6521
|
id,
|
|
6396
6522
|
focusable,
|
|
6397
6523
|
active,
|
|
6398
|
-
children: /* @__PURE__ */
|
|
6524
|
+
children: /* @__PURE__ */ jsx32(Primitive2.span, {
|
|
6399
6525
|
tabIndex: isCurrentTabStop ? 0 : -1,
|
|
6400
6526
|
"data-orientation": context.orientation,
|
|
6401
6527
|
...itemProps,
|
|
@@ -6478,10 +6604,9 @@ var Item2 = RovingFocusGroupItem;
|
|
|
6478
6604
|
|
|
6479
6605
|
// ../../node_modules/.bun/@radix-ui+react-presence@1.1.5+f178f9b1194b24ba/node_modules/@radix-ui/react-presence/dist/index.mjs
|
|
6480
6606
|
import * as React213 from "react";
|
|
6481
|
-
import * as
|
|
6482
|
-
"use client";
|
|
6607
|
+
import * as React48 from "react";
|
|
6483
6608
|
function useStateMachine(initialState, machine) {
|
|
6484
|
-
return
|
|
6609
|
+
return React48.useReducer((state, event) => {
|
|
6485
6610
|
const nextState = machine[state][event];
|
|
6486
6611
|
return nextState ?? state;
|
|
6487
6612
|
}, initialState);
|
|
@@ -6490,7 +6615,7 @@ var Presence = (props) => {
|
|
|
6490
6615
|
const { present, children } = props;
|
|
6491
6616
|
const presence = usePresence(present);
|
|
6492
6617
|
const child = typeof children === "function" ? children({ present: presence.isPresent }) : React213.Children.only(children);
|
|
6493
|
-
const ref =
|
|
6618
|
+
const ref = useComposedRefs(presence.ref, getElementRef4(child));
|
|
6494
6619
|
const forceMount = typeof children === "function";
|
|
6495
6620
|
return forceMount || presence.isPresent ? React213.cloneElement(child, { ref }) : null;
|
|
6496
6621
|
};
|
|
@@ -6589,7 +6714,7 @@ function usePresence(present) {
|
|
|
6589
6714
|
function getAnimationName(styles) {
|
|
6590
6715
|
return styles?.animationName || "none";
|
|
6591
6716
|
}
|
|
6592
|
-
function
|
|
6717
|
+
function getElementRef4(element) {
|
|
6593
6718
|
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
6594
6719
|
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
6595
6720
|
if (mayWarn) {
|
|
@@ -6604,15 +6729,14 @@ function getElementRef3(element) {
|
|
|
6604
6729
|
}
|
|
6605
6730
|
|
|
6606
6731
|
// ../../node_modules/.bun/@radix-ui+react-tabs@1.1.13+f178f9b1194b24ba/node_modules/@radix-ui/react-tabs/dist/index.mjs
|
|
6607
|
-
import { jsx as
|
|
6608
|
-
"use client";
|
|
6732
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
6609
6733
|
var TABS_NAME = "Tabs";
|
|
6610
6734
|
var [createTabsContext, createTabsScope] = createContextScope2(TABS_NAME, [
|
|
6611
6735
|
createRovingFocusGroupScope
|
|
6612
6736
|
]);
|
|
6613
6737
|
var useRovingFocusGroupScope = createRovingFocusGroupScope();
|
|
6614
6738
|
var [TabsProvider, useTabsContext] = createTabsContext(TABS_NAME);
|
|
6615
|
-
var Tabs =
|
|
6739
|
+
var Tabs = React49.forwardRef((props, forwardedRef) => {
|
|
6616
6740
|
const {
|
|
6617
6741
|
__scopeTabs,
|
|
6618
6742
|
value: valueProp,
|
|
@@ -6630,7 +6754,7 @@ var Tabs = React48.forwardRef((props, forwardedRef) => {
|
|
|
6630
6754
|
defaultProp: defaultValue ?? "",
|
|
6631
6755
|
caller: TABS_NAME
|
|
6632
6756
|
});
|
|
6633
|
-
return /* @__PURE__ */
|
|
6757
|
+
return /* @__PURE__ */ jsx33(TabsProvider, {
|
|
6634
6758
|
scope: __scopeTabs,
|
|
6635
6759
|
baseId: useId2(),
|
|
6636
6760
|
value,
|
|
@@ -6638,7 +6762,7 @@ var Tabs = React48.forwardRef((props, forwardedRef) => {
|
|
|
6638
6762
|
orientation,
|
|
6639
6763
|
dir: direction,
|
|
6640
6764
|
activationMode,
|
|
6641
|
-
children: /* @__PURE__ */
|
|
6765
|
+
children: /* @__PURE__ */ jsx33(Primitive2.div, {
|
|
6642
6766
|
dir: direction,
|
|
6643
6767
|
"data-orientation": orientation,
|
|
6644
6768
|
...tabsProps,
|
|
@@ -6648,17 +6772,17 @@ var Tabs = React48.forwardRef((props, forwardedRef) => {
|
|
|
6648
6772
|
});
|
|
6649
6773
|
Tabs.displayName = TABS_NAME;
|
|
6650
6774
|
var TAB_LIST_NAME = "TabsList";
|
|
6651
|
-
var TabsList =
|
|
6775
|
+
var TabsList = React49.forwardRef((props, forwardedRef) => {
|
|
6652
6776
|
const { __scopeTabs, loop = true, ...listProps } = props;
|
|
6653
6777
|
const context = useTabsContext(TAB_LIST_NAME, __scopeTabs);
|
|
6654
6778
|
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs);
|
|
6655
|
-
return /* @__PURE__ */
|
|
6779
|
+
return /* @__PURE__ */ jsx33(Root3, {
|
|
6656
6780
|
asChild: true,
|
|
6657
6781
|
...rovingFocusGroupScope,
|
|
6658
6782
|
orientation: context.orientation,
|
|
6659
6783
|
dir: context.dir,
|
|
6660
6784
|
loop,
|
|
6661
|
-
children: /* @__PURE__ */
|
|
6785
|
+
children: /* @__PURE__ */ jsx33(Primitive2.div, {
|
|
6662
6786
|
role: "tablist",
|
|
6663
6787
|
"aria-orientation": context.orientation,
|
|
6664
6788
|
...listProps,
|
|
@@ -6668,19 +6792,19 @@ var TabsList = React48.forwardRef((props, forwardedRef) => {
|
|
|
6668
6792
|
});
|
|
6669
6793
|
TabsList.displayName = TAB_LIST_NAME;
|
|
6670
6794
|
var TRIGGER_NAME2 = "TabsTrigger";
|
|
6671
|
-
var TabsTrigger =
|
|
6795
|
+
var TabsTrigger = React49.forwardRef((props, forwardedRef) => {
|
|
6672
6796
|
const { __scopeTabs, value, disabled = false, ...triggerProps } = props;
|
|
6673
6797
|
const context = useTabsContext(TRIGGER_NAME2, __scopeTabs);
|
|
6674
6798
|
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs);
|
|
6675
6799
|
const triggerId = makeTriggerId(context.baseId, value);
|
|
6676
6800
|
const contentId = makeContentId(context.baseId, value);
|
|
6677
6801
|
const isSelected = value === context.value;
|
|
6678
|
-
return /* @__PURE__ */
|
|
6802
|
+
return /* @__PURE__ */ jsx33(Item2, {
|
|
6679
6803
|
asChild: true,
|
|
6680
6804
|
...rovingFocusGroupScope,
|
|
6681
6805
|
focusable: !disabled,
|
|
6682
6806
|
active: isSelected,
|
|
6683
|
-
children: /* @__PURE__ */
|
|
6807
|
+
children: /* @__PURE__ */ jsx33(Primitive2.button, {
|
|
6684
6808
|
type: "button",
|
|
6685
6809
|
role: "tab",
|
|
6686
6810
|
"aria-selected": isSelected,
|
|
@@ -6713,18 +6837,18 @@ var TabsTrigger = React48.forwardRef((props, forwardedRef) => {
|
|
|
6713
6837
|
});
|
|
6714
6838
|
TabsTrigger.displayName = TRIGGER_NAME2;
|
|
6715
6839
|
var CONTENT_NAME3 = "TabsContent";
|
|
6716
|
-
var TabsContent =
|
|
6840
|
+
var TabsContent = React49.forwardRef((props, forwardedRef) => {
|
|
6717
6841
|
const { __scopeTabs, value, forceMount, children, ...contentProps } = props;
|
|
6718
6842
|
const context = useTabsContext(CONTENT_NAME3, __scopeTabs);
|
|
6719
6843
|
const triggerId = makeTriggerId(context.baseId, value);
|
|
6720
6844
|
const contentId = makeContentId(context.baseId, value);
|
|
6721
6845
|
const isSelected = value === context.value;
|
|
6722
|
-
const isMountAnimationPreventedRef =
|
|
6723
|
-
|
|
6846
|
+
const isMountAnimationPreventedRef = React49.useRef(isSelected);
|
|
6847
|
+
React49.useEffect(() => {
|
|
6724
6848
|
const rAF = requestAnimationFrame(() => isMountAnimationPreventedRef.current = false);
|
|
6725
6849
|
return () => cancelAnimationFrame(rAF);
|
|
6726
6850
|
}, []);
|
|
6727
|
-
return /* @__PURE__ */
|
|
6851
|
+
return /* @__PURE__ */ jsx33(Presence, { present: forceMount || isSelected, children: ({ present }) => /* @__PURE__ */ jsx33(Primitive2.div, {
|
|
6728
6852
|
"data-state": isSelected ? "active" : "inactive",
|
|
6729
6853
|
"data-orientation": context.orientation,
|
|
6730
6854
|
role: "tabpanel",
|
|
@@ -6754,32 +6878,32 @@ var Trigger2 = TabsTrigger;
|
|
|
6754
6878
|
var Content3 = TabsContent;
|
|
6755
6879
|
|
|
6756
6880
|
// src/Tabs.tsx
|
|
6757
|
-
import * as
|
|
6758
|
-
import { jsx as
|
|
6881
|
+
import * as React50 from "react";
|
|
6882
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
6759
6883
|
var Tabs2 = Root23;
|
|
6760
|
-
var TabsList2 =
|
|
6884
|
+
var TabsList2 = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx34(List, {
|
|
6761
6885
|
ref,
|
|
6762
6886
|
className: cn("inline-flex items-center justify-center bg-white p-1 border-2 border-black border-b-4 rounded-full", className),
|
|
6763
6887
|
...props
|
|
6764
6888
|
}));
|
|
6765
6889
|
TabsList2.displayName = List.displayName;
|
|
6766
|
-
var TabsTrigger2 =
|
|
6890
|
+
var TabsTrigger2 = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx34(Trigger2, {
|
|
6767
6891
|
ref,
|
|
6768
6892
|
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
6893
|
...props
|
|
6770
6894
|
}));
|
|
6771
6895
|
TabsTrigger2.displayName = Trigger2.displayName;
|
|
6772
|
-
var TabsContent2 =
|
|
6896
|
+
var TabsContent2 = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx34(Content3, {
|
|
6773
6897
|
ref,
|
|
6774
6898
|
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
6899
|
...props
|
|
6776
6900
|
}));
|
|
6777
6901
|
TabsContent2.displayName = Content3.displayName;
|
|
6778
6902
|
// src/Textarea.tsx
|
|
6779
|
-
import
|
|
6780
|
-
import { jsx as
|
|
6781
|
-
var Textarea =
|
|
6782
|
-
return /* @__PURE__ */
|
|
6903
|
+
import React51 from "react";
|
|
6904
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
6905
|
+
var Textarea = React51.forwardRef(({ className, style, ...props }, ref) => {
|
|
6906
|
+
return /* @__PURE__ */ jsx35("textarea", {
|
|
6783
6907
|
ref,
|
|
6784
6908
|
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
6909
|
style: {
|
|
@@ -6790,13 +6914,13 @@ var Textarea = React50.forwardRef(({ className, style, ...props }, ref) => {
|
|
|
6790
6914
|
});
|
|
6791
6915
|
Textarea.displayName = "Textarea";
|
|
6792
6916
|
// src/Triangle.tsx
|
|
6793
|
-
import { jsx as
|
|
6917
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
6794
6918
|
var Triangle2 = (props) => {
|
|
6795
|
-
return /* @__PURE__ */
|
|
6919
|
+
return /* @__PURE__ */ jsx36("svg", {
|
|
6796
6920
|
viewBox: "0 0 127 131",
|
|
6797
6921
|
fill: "none",
|
|
6798
6922
|
...props,
|
|
6799
|
-
children: /* @__PURE__ */
|
|
6923
|
+
children: /* @__PURE__ */ jsx36("path", {
|
|
6800
6924
|
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
6925
|
fill: "currentcolor"
|
|
6802
6926
|
})
|