@evinvest/uikit 0.6.0 → 0.8.0
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/README.md +14 -4
- package/dist/index.d.ts +59 -45
- package/dist/index.js +831 -663
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/styles/tokens.css +6 -1
package/dist/index.js
CHANGED
|
@@ -266,6 +266,53 @@ function useRovingFocus(opts) {
|
|
|
266
266
|
return { activeIndex, setActiveIndex, onKeyDown };
|
|
267
267
|
}
|
|
268
268
|
|
|
269
|
+
// src/primitives/use-hover-intent.ts
|
|
270
|
+
import * as React9 from "react";
|
|
271
|
+
function useHoverIntent(opts) {
|
|
272
|
+
const { onOpen, onClose, openDelay = 500, closeDelay = 0 } = opts;
|
|
273
|
+
const openRef = React9.useRef(onOpen);
|
|
274
|
+
const closeRef = React9.useRef(onClose);
|
|
275
|
+
React9.useEffect(() => {
|
|
276
|
+
openRef.current = onOpen;
|
|
277
|
+
closeRef.current = onClose;
|
|
278
|
+
});
|
|
279
|
+
const timer = React9.useRef(null);
|
|
280
|
+
const clear = React9.useCallback(() => {
|
|
281
|
+
if (timer.current != null) {
|
|
282
|
+
clearTimeout(timer.current);
|
|
283
|
+
timer.current = null;
|
|
284
|
+
}
|
|
285
|
+
}, []);
|
|
286
|
+
React9.useEffect(() => clear, [clear]);
|
|
287
|
+
const onPointerEnter = React9.useCallback(
|
|
288
|
+
(event) => {
|
|
289
|
+
if (event.pointerType !== "mouse") return;
|
|
290
|
+
clear();
|
|
291
|
+
timer.current = setTimeout(() => {
|
|
292
|
+
timer.current = null;
|
|
293
|
+
openRef.current();
|
|
294
|
+
}, openDelay);
|
|
295
|
+
},
|
|
296
|
+
[clear, openDelay]
|
|
297
|
+
);
|
|
298
|
+
const onPointerLeave = React9.useCallback(
|
|
299
|
+
(event) => {
|
|
300
|
+
if (event.pointerType !== "mouse") return;
|
|
301
|
+
clear();
|
|
302
|
+
if (closeDelay > 0) {
|
|
303
|
+
timer.current = setTimeout(() => {
|
|
304
|
+
timer.current = null;
|
|
305
|
+
closeRef.current();
|
|
306
|
+
}, closeDelay);
|
|
307
|
+
} else {
|
|
308
|
+
closeRef.current();
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
[clear, closeDelay]
|
|
312
|
+
);
|
|
313
|
+
return { onPointerEnter, onPointerLeave };
|
|
314
|
+
}
|
|
315
|
+
|
|
269
316
|
// src/primitives/merge-refs.ts
|
|
270
317
|
import "react";
|
|
271
318
|
function mergeRefs(...refs) {
|
|
@@ -327,7 +374,7 @@ function AlertDescription({
|
|
|
327
374
|
}
|
|
328
375
|
|
|
329
376
|
// src/components/avatar.tsx
|
|
330
|
-
import * as
|
|
377
|
+
import * as React12 from "react";
|
|
331
378
|
|
|
332
379
|
// src/generated/avatar.ts
|
|
333
380
|
var AVATAR = "relative flex size-8 shrink-0 overflow-hidden rounded-full";
|
|
@@ -351,7 +398,7 @@ function AvatarImage({
|
|
|
351
398
|
onError,
|
|
352
399
|
...props
|
|
353
400
|
}) {
|
|
354
|
-
const [errored, setErrored] =
|
|
401
|
+
const [errored, setErrored] = React12.useState(false);
|
|
355
402
|
if (errored) return null;
|
|
356
403
|
return /* @__PURE__ */ jsx2(
|
|
357
404
|
"img",
|
|
@@ -825,7 +872,7 @@ function EmptyContent({
|
|
|
825
872
|
}
|
|
826
873
|
|
|
827
874
|
// src/components/field.tsx
|
|
828
|
-
import * as
|
|
875
|
+
import * as React20 from "react";
|
|
829
876
|
|
|
830
877
|
// src/components/label.tsx
|
|
831
878
|
import "react";
|
|
@@ -983,7 +1030,7 @@ function FieldError({
|
|
|
983
1030
|
errors,
|
|
984
1031
|
...props
|
|
985
1032
|
}) {
|
|
986
|
-
const content =
|
|
1033
|
+
const content = React20.useMemo(() => {
|
|
987
1034
|
if (children) {
|
|
988
1035
|
return children;
|
|
989
1036
|
}
|
|
@@ -1012,8 +1059,92 @@ function FieldError({
|
|
|
1012
1059
|
);
|
|
1013
1060
|
}
|
|
1014
1061
|
|
|
1062
|
+
// src/components/section-descriptor.tsx
|
|
1063
|
+
import "react";
|
|
1064
|
+
import { Fragment, jsx as jsx11, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1065
|
+
var SECTION_DESCRIPTOR = "flex flex-col gap-2 rounded-lg border bg-accent p-4 text-left";
|
|
1066
|
+
function InfoGlyph({ className }) {
|
|
1067
|
+
return /* @__PURE__ */ jsxs3(
|
|
1068
|
+
"svg",
|
|
1069
|
+
{
|
|
1070
|
+
viewBox: "0 0 24 24",
|
|
1071
|
+
fill: "none",
|
|
1072
|
+
stroke: "currentColor",
|
|
1073
|
+
strokeWidth: 2,
|
|
1074
|
+
strokeLinecap: "round",
|
|
1075
|
+
strokeLinejoin: "round",
|
|
1076
|
+
"aria-hidden": true,
|
|
1077
|
+
className: cn("size-4 shrink-0", className),
|
|
1078
|
+
children: [
|
|
1079
|
+
/* @__PURE__ */ jsx11("circle", { cx: "12", cy: "12", r: "10" }),
|
|
1080
|
+
/* @__PURE__ */ jsx11("path", { d: "M12 16v-4" }),
|
|
1081
|
+
/* @__PURE__ */ jsx11("path", { d: "M12 8h.01" })
|
|
1082
|
+
]
|
|
1083
|
+
}
|
|
1084
|
+
);
|
|
1085
|
+
}
|
|
1086
|
+
function SectionDescriptor({
|
|
1087
|
+
title,
|
|
1088
|
+
icon = true,
|
|
1089
|
+
collapsible = false,
|
|
1090
|
+
defaultOpen = false,
|
|
1091
|
+
className,
|
|
1092
|
+
children,
|
|
1093
|
+
...props
|
|
1094
|
+
}) {
|
|
1095
|
+
const titleContent = /* @__PURE__ */ jsxs3(Fragment, { children: [
|
|
1096
|
+
icon && /* @__PURE__ */ jsx11(InfoGlyph, { className: "text-main-accent-t1" }),
|
|
1097
|
+
/* @__PURE__ */ jsx11("span", { children: title })
|
|
1098
|
+
] });
|
|
1099
|
+
if (collapsible) {
|
|
1100
|
+
return /* @__PURE__ */ jsxs3(
|
|
1101
|
+
"details",
|
|
1102
|
+
{
|
|
1103
|
+
"data-slot": "section-descriptor",
|
|
1104
|
+
"data-collapsible": "",
|
|
1105
|
+
open: defaultOpen,
|
|
1106
|
+
className: cn(SECTION_DESCRIPTOR, className),
|
|
1107
|
+
...props,
|
|
1108
|
+
children: [
|
|
1109
|
+
/* @__PURE__ */ jsx11(
|
|
1110
|
+
"summary",
|
|
1111
|
+
{
|
|
1112
|
+
"data-slot": "section-descriptor-title",
|
|
1113
|
+
className: cn(
|
|
1114
|
+
FIELD_TITLE,
|
|
1115
|
+
"cursor-pointer list-none [&::-webkit-details-marker]:hidden"
|
|
1116
|
+
),
|
|
1117
|
+
children: titleContent
|
|
1118
|
+
}
|
|
1119
|
+
),
|
|
1120
|
+
/* @__PURE__ */ jsx11(
|
|
1121
|
+
"p",
|
|
1122
|
+
{
|
|
1123
|
+
"data-slot": "section-descriptor-body",
|
|
1124
|
+
className: cn(FIELD_DESCRIPTION, "mt-2"),
|
|
1125
|
+
children
|
|
1126
|
+
}
|
|
1127
|
+
)
|
|
1128
|
+
]
|
|
1129
|
+
}
|
|
1130
|
+
);
|
|
1131
|
+
}
|
|
1132
|
+
return /* @__PURE__ */ jsxs3(
|
|
1133
|
+
"section",
|
|
1134
|
+
{
|
|
1135
|
+
"data-slot": "section-descriptor",
|
|
1136
|
+
className: cn(SECTION_DESCRIPTOR, className),
|
|
1137
|
+
...props,
|
|
1138
|
+
children: [
|
|
1139
|
+
/* @__PURE__ */ jsx11("div", { "data-slot": "section-descriptor-title", className: FIELD_TITLE, children: titleContent }),
|
|
1140
|
+
/* @__PURE__ */ jsx11("p", { "data-slot": "section-descriptor-body", className: FIELD_DESCRIPTION, children })
|
|
1141
|
+
]
|
|
1142
|
+
}
|
|
1143
|
+
);
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1015
1146
|
// src/components/footer.tsx
|
|
1016
|
-
import * as
|
|
1147
|
+
import * as React24 from "react";
|
|
1017
1148
|
|
|
1018
1149
|
// src/components/container.tsx
|
|
1019
1150
|
import "react";
|
|
@@ -1022,9 +1153,9 @@ import "react";
|
|
|
1022
1153
|
var CONTAINER_BASE = "mx-auto w-full max-w-[var(--page-max,90rem)] px-[var(--page-px,1rem)]";
|
|
1023
1154
|
|
|
1024
1155
|
// src/components/container.tsx
|
|
1025
|
-
import { jsx as
|
|
1156
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
1026
1157
|
function Container({ className, ...props }) {
|
|
1027
|
-
return /* @__PURE__ */
|
|
1158
|
+
return /* @__PURE__ */ jsx12(
|
|
1028
1159
|
"div",
|
|
1029
1160
|
{
|
|
1030
1161
|
"data-slot": "container",
|
|
@@ -1036,7 +1167,7 @@ function Container({ className, ...props }) {
|
|
|
1036
1167
|
|
|
1037
1168
|
// src/components/logo.tsx
|
|
1038
1169
|
import "react";
|
|
1039
|
-
import { jsx as
|
|
1170
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
1040
1171
|
var LOGO_DATA_URI = "data:image/svg+xml,%3Csvg width=%22387%22 height=%22335%22 viewBox=%220 0 387 335%22 fill=%22none%22 xmlns=%22http://www.w3.org/2000/svg%22%3E%3Cpath d=%22M0.120605 130.841L140.84 112.176V61.7481L156.149 65.3501V104.786L163.641 103.662V66.6599L178.625 69.607V102.353L185.791 101.043V61.0932L156.475 48.3224L119.992 60.4383V101.043L0.120605 130.841Z%22 fill=%22black%22/%3E%3Cpath d=%22M213.479 112.176L237.584 114.469L237.258 0.841309L202.078 19.8338V72.8816L213.479 78.1209V112.176Z%22 fill=%22black%22/%3E%3Cpath d=%22M240.841 0.841309L276.347 20.1612V117.743L260.711 115.778V26.3829L240.841 15.9043V0.841309Z%22 fill=%22black%22/%3E%3Cpath d=%22M284.816 118.725L386.121 127.239L304.36 109.884V74.1914L284.816 63.7128V118.725Z%22 fill=%22black%22/%3E%3Cpath d=%22M0.120605 130.841L140.84 112.176V61.7481L156.149 65.3501V104.786L163.641 103.662V66.6599L178.625 69.607V102.353L185.791 101.043V61.0932L156.475 48.3224L119.992 60.4383V101.043L0.120605 130.841Z%22 stroke=%22black%22/%3E%3Cpath d=%22M213.479 112.176L237.584 114.469L237.258 0.841309L202.078 19.8338V72.8816L213.479 78.1209V112.176Z%22 stroke=%22black%22/%3E%3Cpath d=%22M240.841 0.841309L276.347 20.1612V117.743L260.711 115.778V26.3829L240.841 15.9043V0.841309Z%22 stroke=%22black%22/%3E%3Cpath d=%22M284.816 118.725L386.121 127.239L304.36 109.884V74.1914L284.816 63.7128V118.725Z%22 stroke=%22black%22/%3E%3Cpath d=%22M25.1206 333.987H31.6206V306.987H25.1206V333.987Z%22 fill=%22black%22/%3E%3Cpath d=%22M92.6206 333.987H100.121L110.621 307.487H104.621L96.6206 325.987L88.6206 307.487H81.6206L92.6206 333.987Z%22 fill=%22black%22/%3E%3Cpath d=%22M44.6206 333.987H51.6206V318.987L65.1206 333.987H71.6206V307.487H65.1206V322.987L50.6206 307.487H44.6206V333.987Z%22 fill=%22black%22/%3E%3Cpath d=%22M120.621 333.987H142.121V329.487H127.621V322.987H140.121V318.487H127.621V312.487H142.121V307.487H120.621V333.987Z%22 fill=%22black%22/%3E%3Cpath d=%22M152.121 331.987L153.621 327.987C165.659 329.418 167.304 330.676 168.121 326.487C168.937 322.297 152.785 322.989 152.621 313.987C152.456 304.984 165.853 306.198 174.121 308.487L173.121 312.487C162.364 310.724 159.121 310.487 159.121 313.987C159.121 317.487 175.621 318.748 175.621 326.487C175.621 334.225 167.278 335.691 152.121 331.987Z%22 fill=%22black%22/%3E%3Cpath d=%22M192.621 333.987H199.621V312.487H208.621V307.487H183.621V312.487H192.621V333.987Z%22 fill=%22black%22/%3E%3Cpath d=%22M219.121 333.987H225.121V318.987L233.621 329.987H237.621L245.121 318.987V333.987L252.121 333.987V307.487H245.121L235.621 322.487L225.121 307.487H219.121V333.987Z%22 fill=%22black%22/%3E%3Cpath d=%22M265.121 333.987H286.621V329.487H272.121V322.987H284.621V318.487H272.121V312.487H286.621V307.487H265.121V333.987Z%22 fill=%22black%22/%3E%3Cpath d=%22M298.621 333.987H305.621V318.987L319.121 333.987H325.621V307.487H319.121V322.987L304.621 307.487H298.621V333.987Z%22 fill=%22black%22/%3E%3Cpath d=%22M345.121 333.987H352.121V312.487H361.121V307.487H336.121V312.487H345.121V333.987Z%22 fill=%22black%22/%3E%3Cpath d=%22M25.1206 333.987H31.6206V306.987H25.1206V333.987Z%22 stroke=%22black%22/%3E%3Cpath d=%22M92.6206 333.987H100.121L110.621 307.487H104.621L96.6206 325.987L88.6206 307.487H81.6206L92.6206 333.987Z%22 stroke=%22black%22/%3E%3Cpath d=%22M44.6206 333.987H51.6206V318.987L65.1206 333.987H71.6206V307.487H65.1206V322.987L50.6206 307.487H44.6206V333.987Z%22 stroke=%22black%22/%3E%3Cpath d=%22M120.621 333.987H142.121V329.487H127.621V322.987H140.121V318.487H127.621V312.487H142.121V307.487H120.621V333.987Z%22 stroke=%22black%22/%3E%3Cpath d=%22M152.121 331.987L153.621 327.987C165.659 329.418 167.304 330.676 168.121 326.487C168.937 322.297 152.785 322.989 152.621 313.987C152.456 304.984 165.853 306.198 174.121 308.487L173.121 312.487C162.364 310.724 159.121 310.487 159.121 313.987C159.121 317.487 175.621 318.748 175.621 326.487C175.621 334.225 167.278 335.691 152.121 331.987Z%22 stroke=%22black%22/%3E%3Cpath d=%22M192.621 333.987H199.621V312.487H208.621V307.487H183.621V312.487H192.621V333.987Z%22 stroke=%22black%22/%3E%3Cpath d=%22M219.121 333.987H225.121V318.987L233.621 329.987H237.621L245.121 318.987V333.987L252.121 333.987V307.487H245.121L235.621 322.487L225.121 307.487H219.121V333.987Z%22 stroke=%22black%22/%3E%3Cpath d=%22M265.121 333.987H286.621V329.487H272.121V322.987H284.621V318.487H272.121V312.487H286.621V307.487H265.121V333.987Z%22 stroke=%22black%22/%3E%3Cpath d=%22M298.621 333.987H305.621V318.987L319.121 333.987H325.621V307.487H319.121V322.987L304.621 307.487H298.621V333.987Z%22 stroke=%22black%22/%3E%3Cpath d=%22M345.121 333.987H352.121V312.487H361.121V307.487H336.121V312.487H345.121V333.987Z%22 stroke=%22black%22/%3E%3Cpath d=%22M232.621 276.02L166.121 145.841H204.905L255.905 246.341L306.905 145.841H345.905L279.405 276.02H232.621Z%22 fill=%22black%22 stroke=%22black%22/%3E%3Cpath d=%22M41.1206 276.02H208.336L195.73 251.341H74.8362V220.341H179.894L168.144 197.341H74.8362V170.841L154.352 170.341L141.836 145.841H41.1206V276.02Z%22 fill=%22black%22 stroke=%22black%22/%3E%3C/svg%3E";
|
|
1041
1172
|
var LOGO_BG = "oklch(0.256 0.1 260)";
|
|
1042
1173
|
function Logo({ className, withBackground = false, src }) {
|
|
@@ -1052,7 +1183,7 @@ function Logo({ className, withBackground = false, src }) {
|
|
|
1052
1183
|
maskSize: "contain",
|
|
1053
1184
|
WebkitMaskSize: "contain"
|
|
1054
1185
|
};
|
|
1055
|
-
const mark = /* @__PURE__ */
|
|
1186
|
+
const mark = /* @__PURE__ */ jsx13(
|
|
1056
1187
|
"span",
|
|
1057
1188
|
{
|
|
1058
1189
|
"data-slot": "logo",
|
|
@@ -1063,7 +1194,7 @@ function Logo({ className, withBackground = false, src }) {
|
|
|
1063
1194
|
}
|
|
1064
1195
|
);
|
|
1065
1196
|
if (!withBackground) return mark;
|
|
1066
|
-
return /* @__PURE__ */
|
|
1197
|
+
return /* @__PURE__ */ jsx13(
|
|
1067
1198
|
"span",
|
|
1068
1199
|
{
|
|
1069
1200
|
"data-slot": "logo-background",
|
|
@@ -1075,7 +1206,7 @@ function Logo({ className, withBackground = false, src }) {
|
|
|
1075
1206
|
}
|
|
1076
1207
|
|
|
1077
1208
|
// src/components/footer.tsx
|
|
1078
|
-
import { Fragment as
|
|
1209
|
+
import { Fragment as Fragment3, jsx as jsx14, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1079
1210
|
var DEFAULT_DESCRIPTION = "EV Investment is a registered real estate advisory and investment management fund specializing in premium coastal developments in Quy Nhon, Binh Dinh province, Vietnam.";
|
|
1080
1211
|
var DEFAULT_OFFICES = [
|
|
1081
1212
|
{
|
|
@@ -1105,37 +1236,37 @@ function Footer({
|
|
|
1105
1236
|
children
|
|
1106
1237
|
}) {
|
|
1107
1238
|
const L = linkComponent ?? "a";
|
|
1108
|
-
return /* @__PURE__ */
|
|
1239
|
+
return /* @__PURE__ */ jsxs4(
|
|
1109
1240
|
"footer",
|
|
1110
1241
|
{
|
|
1111
1242
|
"data-slot": "footer",
|
|
1112
1243
|
className: "bg-main-black border-t border-main-mist/10 py-16",
|
|
1113
1244
|
children: [
|
|
1114
1245
|
children,
|
|
1115
|
-
/* @__PURE__ */
|
|
1116
|
-
/* @__PURE__ */
|
|
1117
|
-
/* @__PURE__ */
|
|
1118
|
-
/* @__PURE__ */
|
|
1119
|
-
/* @__PURE__ */
|
|
1120
|
-
/* @__PURE__ */
|
|
1121
|
-
/* @__PURE__ */
|
|
1122
|
-
/* @__PURE__ */
|
|
1246
|
+
/* @__PURE__ */ jsxs4(Container, { children: [
|
|
1247
|
+
/* @__PURE__ */ jsxs4("div", { className: "grid grid-cols-2 gap-x-8 gap-y-8 lg:grid-cols-12 mb-12", children: [
|
|
1248
|
+
/* @__PURE__ */ jsxs4("div", { className: "col-span-2 lg:col-span-3", children: [
|
|
1249
|
+
/* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-3 mb-6", children: [
|
|
1250
|
+
/* @__PURE__ */ jsx14(Logo, { className: "w-8 h-8 text-white" }),
|
|
1251
|
+
/* @__PURE__ */ jsxs4("div", { className: "flex flex-col", children: [
|
|
1252
|
+
/* @__PURE__ */ jsx14("span", { className: "font-serif-display font-bold text-base tracking-wider text-white", children: "EV INVESTMENT" }),
|
|
1253
|
+
/* @__PURE__ */ jsx14("span", { className: "text-[8px] font-mono-tech tracking-[0.3em] text-main-accent-t1 uppercase", children: tagline })
|
|
1123
1254
|
] })
|
|
1124
1255
|
] }),
|
|
1125
|
-
/* @__PURE__ */
|
|
1126
|
-
/* @__PURE__ */
|
|
1127
|
-
i > 0 && /* @__PURE__ */
|
|
1128
|
-
/* @__PURE__ */
|
|
1256
|
+
/* @__PURE__ */ jsx14("p", { className: "text-main-mist/40 text-xs font-light max-w-sm leading-relaxed mb-6", children: description }),
|
|
1257
|
+
/* @__PURE__ */ jsx14("div", { className: "flex gap-4 text-xs font-mono-tech text-main-accent-t1", children: legalLinks.map((link, i) => /* @__PURE__ */ jsxs4(React24.Fragment, { children: [
|
|
1258
|
+
i > 0 && /* @__PURE__ */ jsx14("span", { className: "text-main-mist/20", children: "|" }),
|
|
1259
|
+
/* @__PURE__ */ jsx14(L, { href: link.href, className: "hover:underline", children: link.label })
|
|
1129
1260
|
] }, link.label)) })
|
|
1130
1261
|
] }),
|
|
1131
|
-
nav.map((group) => /* @__PURE__ */
|
|
1262
|
+
nav.map((group) => /* @__PURE__ */ jsxs4(
|
|
1132
1263
|
"nav",
|
|
1133
1264
|
{
|
|
1134
1265
|
"aria-label": `Footer ${group.heading} links`,
|
|
1135
1266
|
className: "lg:col-span-2",
|
|
1136
1267
|
children: [
|
|
1137
|
-
/* @__PURE__ */
|
|
1138
|
-
/* @__PURE__ */
|
|
1268
|
+
/* @__PURE__ */ jsx14("h4", { className: "font-mono-tech text-xs text-white uppercase tracking-widest mb-6", children: group.heading }),
|
|
1269
|
+
/* @__PURE__ */ jsx14("ul", { className: "space-y-3", children: group.links.map((link) => /* @__PURE__ */ jsx14("li", { children: /* @__PURE__ */ jsx14(
|
|
1139
1270
|
L,
|
|
1140
1271
|
{
|
|
1141
1272
|
href: link.href,
|
|
@@ -1147,24 +1278,24 @@ function Footer({
|
|
|
1147
1278
|
},
|
|
1148
1279
|
group.heading
|
|
1149
1280
|
)),
|
|
1150
|
-
/* @__PURE__ */
|
|
1151
|
-
/* @__PURE__ */
|
|
1152
|
-
/* @__PURE__ */
|
|
1153
|
-
/* @__PURE__ */
|
|
1281
|
+
/* @__PURE__ */ jsxs4("div", { className: "col-span-2 lg:col-span-3", children: [
|
|
1282
|
+
/* @__PURE__ */ jsx14("h4", { className: "font-mono-tech text-xs text-white uppercase tracking-widest mb-6", children: "Offices" }),
|
|
1283
|
+
/* @__PURE__ */ jsx14("ul", { className: "space-y-4 text-xs text-main-mist/70 font-light leading-relaxed", children: offices.map((office) => /* @__PURE__ */ jsxs4("li", { children: [
|
|
1284
|
+
/* @__PURE__ */ jsx14("strong", { className: "text-white block font-mono-tech text-[10px] uppercase tracking-wider mb-1", children: office.name }),
|
|
1154
1285
|
office.address
|
|
1155
1286
|
] }, office.name)) })
|
|
1156
1287
|
] }),
|
|
1157
|
-
newsletter && /* @__PURE__ */
|
|
1158
|
-
/* @__PURE__ */
|
|
1159
|
-
/* @__PURE__ */
|
|
1288
|
+
newsletter && /* @__PURE__ */ jsxs4("div", { className: "col-span-2 lg:col-span-2", children: [
|
|
1289
|
+
/* @__PURE__ */ jsx14("h4", { className: "font-mono-tech text-xs text-white uppercase tracking-widest mb-6", children: "Newsletter" }),
|
|
1290
|
+
/* @__PURE__ */ jsx14("p", { className: "text-sm sm:text-xs font-light leading-relaxed text-main-mist/70 mb-4", children: newsletterBlurb }),
|
|
1160
1291
|
newsletter
|
|
1161
1292
|
] })
|
|
1162
1293
|
] }),
|
|
1163
|
-
/* @__PURE__ */
|
|
1294
|
+
/* @__PURE__ */ jsx14("div", { className: "border-t border-main-mist/10 pt-8 text-[10px] font-mono-tech text-main-mist/40", children: /* @__PURE__ */ jsxs4("p", { children: [
|
|
1164
1295
|
"\xA9 2026 EV Investment. All rights reserved.",
|
|
1165
|
-
version && /* @__PURE__ */
|
|
1296
|
+
version && /* @__PURE__ */ jsxs4(Fragment3, { children: [
|
|
1166
1297
|
" ",
|
|
1167
|
-
/* @__PURE__ */
|
|
1298
|
+
/* @__PURE__ */ jsx14("a", { href: commitHref, className: "text-main-mist/30", children: version })
|
|
1168
1299
|
] })
|
|
1169
1300
|
] }) })
|
|
1170
1301
|
] })
|
|
@@ -1173,168 +1304,6 @@ function Footer({
|
|
|
1173
1304
|
);
|
|
1174
1305
|
}
|
|
1175
1306
|
|
|
1176
|
-
// src/components/header.tsx
|
|
1177
|
-
import * as React23 from "react";
|
|
1178
|
-
import { jsx as jsx14, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1179
|
-
function Header({
|
|
1180
|
-
nav,
|
|
1181
|
-
cta,
|
|
1182
|
-
mobileCta,
|
|
1183
|
-
tagline = "Quy Nhon Fund",
|
|
1184
|
-
homeHref = "/",
|
|
1185
|
-
className,
|
|
1186
|
-
linkComponent,
|
|
1187
|
-
variant = "marketing",
|
|
1188
|
-
hideNav = false
|
|
1189
|
-
}) {
|
|
1190
|
-
const L = linkComponent ?? "a";
|
|
1191
|
-
const compact = variant === "compact";
|
|
1192
|
-
const [hasScrolled, setHasScrolled] = React23.useState(false);
|
|
1193
|
-
React23.useEffect(() => {
|
|
1194
|
-
if (compact) return;
|
|
1195
|
-
const handleScroll = () => setHasScrolled(window.scrollY > 50);
|
|
1196
|
-
window.addEventListener("scroll", handleScroll);
|
|
1197
|
-
return () => window.removeEventListener("scroll", handleScroll);
|
|
1198
|
-
}, [compact]);
|
|
1199
|
-
return /* @__PURE__ */ jsx14(
|
|
1200
|
-
"header",
|
|
1201
|
-
{
|
|
1202
|
-
"data-slot": "header",
|
|
1203
|
-
"data-variant": variant,
|
|
1204
|
-
className: cn(
|
|
1205
|
-
"fixed top-0 left-0 w-full z-[60] border-b",
|
|
1206
|
-
compact ? (
|
|
1207
|
-
// Fixed 4rem bar (py-3 + the 40px lockup): opaque by default so app
|
|
1208
|
-
// content beneath it never bleeds through.
|
|
1209
|
-
"h-16 bg-main-black/90 backdrop-blur-md border-main-mist/10"
|
|
1210
|
-
) : cn(
|
|
1211
|
-
"transition-all duration-500",
|
|
1212
|
-
hasScrolled ? "bg-main-black/90 backdrop-blur-md border-main-mist/10 py-4" : "bg-transparent border-transparent py-6"
|
|
1213
|
-
),
|
|
1214
|
-
className
|
|
1215
|
-
),
|
|
1216
|
-
children: /* @__PURE__ */ jsxs4(Container, { className: "flex h-full items-center justify-between gap-4", children: [
|
|
1217
|
-
/* @__PURE__ */ jsxs4(
|
|
1218
|
-
L,
|
|
1219
|
-
{
|
|
1220
|
-
href: homeHref,
|
|
1221
|
-
className: "flex items-center gap-3",
|
|
1222
|
-
"aria-label": "EV Investment \u2014 home",
|
|
1223
|
-
children: [
|
|
1224
|
-
/* @__PURE__ */ jsx14(Logo, { className: "w-10 h-10 text-white" }),
|
|
1225
|
-
/* @__PURE__ */ jsxs4("div", { className: "flex flex-col", children: [
|
|
1226
|
-
/* @__PURE__ */ jsx14("span", { className: "font-serif-display font-bold text-lg tracking-wider text-white", children: "EV INVESTMENT" }),
|
|
1227
|
-
/* @__PURE__ */ jsx14("span", { className: "text-[9px] font-mono-tech tracking-[0.3em] text-main-accent-t1 uppercase", children: tagline })
|
|
1228
|
-
] })
|
|
1229
|
-
]
|
|
1230
|
-
}
|
|
1231
|
-
),
|
|
1232
|
-
!hideNav && /* @__PURE__ */ jsx14("nav", { className: "hidden lg:flex items-center gap-6 font-mono-tech text-xs tracking-widest uppercase", children: nav.map((item) => /* @__PURE__ */ jsx14(
|
|
1233
|
-
L,
|
|
1234
|
-
{
|
|
1235
|
-
href: item.href,
|
|
1236
|
-
className: "text-main-mist/80 hover:text-main-accent-t1 transition-colors",
|
|
1237
|
-
children: item.label
|
|
1238
|
-
},
|
|
1239
|
-
item.href
|
|
1240
|
-
)) }),
|
|
1241
|
-
/* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-3", children: [
|
|
1242
|
-
cta,
|
|
1243
|
-
!hideNav && /* @__PURE__ */ jsx14(MobileMenu, { nav, cta: mobileCta ?? cta, linkComponent: L })
|
|
1244
|
-
] })
|
|
1245
|
-
] })
|
|
1246
|
-
}
|
|
1247
|
-
);
|
|
1248
|
-
}
|
|
1249
|
-
function MobileMenu({
|
|
1250
|
-
nav,
|
|
1251
|
-
cta,
|
|
1252
|
-
linkComponent: L
|
|
1253
|
-
}) {
|
|
1254
|
-
const [open, setOpen] = React23.useState(false);
|
|
1255
|
-
React23.useEffect(() => {
|
|
1256
|
-
if (!open) return;
|
|
1257
|
-
document.body.style.overflow = "hidden";
|
|
1258
|
-
const onKeyDown = (e) => {
|
|
1259
|
-
if (e.key === "Escape") setOpen(false);
|
|
1260
|
-
};
|
|
1261
|
-
window.addEventListener("keydown", onKeyDown);
|
|
1262
|
-
return () => {
|
|
1263
|
-
document.body.style.overflow = "";
|
|
1264
|
-
window.removeEventListener("keydown", onKeyDown);
|
|
1265
|
-
};
|
|
1266
|
-
}, [open]);
|
|
1267
|
-
const closeOnNavigation = (e) => {
|
|
1268
|
-
if (e.target.closest("a, button")) setOpen(false);
|
|
1269
|
-
};
|
|
1270
|
-
return /* @__PURE__ */ jsxs4("div", { className: "lg:hidden", children: [
|
|
1271
|
-
/* @__PURE__ */ jsx14(
|
|
1272
|
-
"button",
|
|
1273
|
-
{
|
|
1274
|
-
type: "button",
|
|
1275
|
-
"aria-label": "Open menu",
|
|
1276
|
-
"aria-expanded": open,
|
|
1277
|
-
"aria-haspopup": "menu",
|
|
1278
|
-
onClick: () => setOpen(true),
|
|
1279
|
-
className: "flex size-10 items-center justify-center text-white",
|
|
1280
|
-
children: /* @__PURE__ */ jsx14(
|
|
1281
|
-
"svg",
|
|
1282
|
-
{
|
|
1283
|
-
className: "size-6",
|
|
1284
|
-
viewBox: "0 0 24 24",
|
|
1285
|
-
fill: "none",
|
|
1286
|
-
stroke: "currentColor",
|
|
1287
|
-
strokeWidth: 2,
|
|
1288
|
-
strokeLinecap: "round",
|
|
1289
|
-
strokeLinejoin: "round",
|
|
1290
|
-
children: /* @__PURE__ */ jsx14("path", { d: "M4 6h16M4 12h16M4 18h16" })
|
|
1291
|
-
}
|
|
1292
|
-
)
|
|
1293
|
-
}
|
|
1294
|
-
),
|
|
1295
|
-
open && /* @__PURE__ */ jsx14(Portal, { children: /* @__PURE__ */ jsxs4(
|
|
1296
|
-
"div",
|
|
1297
|
-
{
|
|
1298
|
-
onClick: closeOnNavigation,
|
|
1299
|
-
className: "fixed inset-0 z-[70] flex flex-col bg-main-black px-6 pb-10 duration-200 animate-in fade-in lg:hidden",
|
|
1300
|
-
children: [
|
|
1301
|
-
/* @__PURE__ */ jsx14("div", { className: "flex h-20 shrink-0 items-center justify-end", children: /* @__PURE__ */ jsx14(
|
|
1302
|
-
"button",
|
|
1303
|
-
{
|
|
1304
|
-
type: "button",
|
|
1305
|
-
"aria-label": "Close menu",
|
|
1306
|
-
className: "flex size-10 items-center justify-center text-white",
|
|
1307
|
-
children: /* @__PURE__ */ jsx14(
|
|
1308
|
-
"svg",
|
|
1309
|
-
{
|
|
1310
|
-
className: "size-6",
|
|
1311
|
-
viewBox: "0 0 24 24",
|
|
1312
|
-
fill: "none",
|
|
1313
|
-
stroke: "currentColor",
|
|
1314
|
-
strokeWidth: 2,
|
|
1315
|
-
strokeLinecap: "round",
|
|
1316
|
-
strokeLinejoin: "round",
|
|
1317
|
-
children: /* @__PURE__ */ jsx14("path", { d: "M18 6 6 18M6 6l12 12" })
|
|
1318
|
-
}
|
|
1319
|
-
)
|
|
1320
|
-
}
|
|
1321
|
-
) }),
|
|
1322
|
-
/* @__PURE__ */ jsx14("nav", { className: "flex flex-col font-mono-tech text-sm uppercase tracking-widest duration-300 ease-out animate-in fade-in slide-in-from-top-4", children: nav.map((item) => /* @__PURE__ */ jsx14(
|
|
1323
|
-
L,
|
|
1324
|
-
{
|
|
1325
|
-
href: item.href,
|
|
1326
|
-
className: "border-b border-main-mist/10 py-4 text-main-mist/80 transition-colors hover:text-main-accent-t1",
|
|
1327
|
-
children: item.label
|
|
1328
|
-
},
|
|
1329
|
-
item.href
|
|
1330
|
-
)) }),
|
|
1331
|
-
cta && /* @__PURE__ */ jsx14("div", { className: "mt-8 w-full block", children: cta })
|
|
1332
|
-
]
|
|
1333
|
-
}
|
|
1334
|
-
) })
|
|
1335
|
-
] });
|
|
1336
|
-
}
|
|
1337
|
-
|
|
1338
1307
|
// src/components/input.tsx
|
|
1339
1308
|
import "react";
|
|
1340
1309
|
|
|
@@ -2192,7 +2161,7 @@ function TableCaption({
|
|
|
2192
2161
|
}
|
|
2193
2162
|
|
|
2194
2163
|
// src/components/accordion.tsx
|
|
2195
|
-
import * as
|
|
2164
|
+
import * as React37 from "react";
|
|
2196
2165
|
|
|
2197
2166
|
// src/generated/accordion.ts
|
|
2198
2167
|
var ACCORDION_ITEM = "border-b last:border-b-0";
|
|
@@ -2203,15 +2172,15 @@ var ACCORDION_CONTENT_INNER = "pt-0 pb-4";
|
|
|
2203
2172
|
|
|
2204
2173
|
// src/components/accordion.tsx
|
|
2205
2174
|
import { jsx as jsx27, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
2206
|
-
var AccordionContext =
|
|
2175
|
+
var AccordionContext = React37.createContext(null);
|
|
2207
2176
|
function useAccordion() {
|
|
2208
|
-
const ctx =
|
|
2177
|
+
const ctx = React37.useContext(AccordionContext);
|
|
2209
2178
|
if (!ctx) throw new Error("Accordion parts must be used within <Accordion>");
|
|
2210
2179
|
return ctx;
|
|
2211
2180
|
}
|
|
2212
|
-
var ItemContext =
|
|
2181
|
+
var ItemContext = React37.createContext(null);
|
|
2213
2182
|
function useItemValue() {
|
|
2214
|
-
const value =
|
|
2183
|
+
const value = React37.useContext(ItemContext);
|
|
2215
2184
|
if (value === null)
|
|
2216
2185
|
throw new Error("AccordionTrigger/Content must be used within <AccordionItem>");
|
|
2217
2186
|
return value;
|
|
@@ -2322,13 +2291,13 @@ function AccordionContent({
|
|
|
2322
2291
|
}
|
|
2323
2292
|
|
|
2324
2293
|
// src/components/collapsible.tsx
|
|
2325
|
-
import * as
|
|
2294
|
+
import * as React38 from "react";
|
|
2326
2295
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
2327
|
-
var CollapsibleContext =
|
|
2296
|
+
var CollapsibleContext = React38.createContext(
|
|
2328
2297
|
null
|
|
2329
2298
|
);
|
|
2330
2299
|
function useCollapsible() {
|
|
2331
|
-
const ctx =
|
|
2300
|
+
const ctx = React38.useContext(CollapsibleContext);
|
|
2332
2301
|
if (!ctx) throw new Error("Collapsible parts must be used within <Collapsible>");
|
|
2333
2302
|
return ctx;
|
|
2334
2303
|
}
|
|
@@ -2376,7 +2345,7 @@ function CollapsibleContent({
|
|
|
2376
2345
|
}
|
|
2377
2346
|
|
|
2378
2347
|
// src/components/tabs.tsx
|
|
2379
|
-
import * as
|
|
2348
|
+
import * as React39 from "react";
|
|
2380
2349
|
|
|
2381
2350
|
// src/generated/tabs.ts
|
|
2382
2351
|
var TABS_ROOT = "flex flex-col gap-2";
|
|
@@ -2386,9 +2355,9 @@ var TABS_CONTENT = "flex-1 outline-none";
|
|
|
2386
2355
|
|
|
2387
2356
|
// src/components/tabs.tsx
|
|
2388
2357
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
2389
|
-
var TabsContext =
|
|
2358
|
+
var TabsContext = React39.createContext(null);
|
|
2390
2359
|
function useTabs() {
|
|
2391
|
-
const ctx =
|
|
2360
|
+
const ctx = React39.useContext(TabsContext);
|
|
2392
2361
|
if (!ctx) throw new Error("Tabs parts must be used within <Tabs>");
|
|
2393
2362
|
return ctx;
|
|
2394
2363
|
}
|
|
@@ -2424,7 +2393,7 @@ function TabsList({
|
|
|
2424
2393
|
...props
|
|
2425
2394
|
}) {
|
|
2426
2395
|
const { orientation } = useTabs();
|
|
2427
|
-
const items =
|
|
2396
|
+
const items = React39.Children.toArray(children);
|
|
2428
2397
|
const { activeIndex, setActiveIndex, onKeyDown: rovingKeyDown } = useRovingFocus({
|
|
2429
2398
|
count: items.length,
|
|
2430
2399
|
orientation: orientation === "vertical" ? "vertical" : "horizontal"
|
|
@@ -2442,7 +2411,7 @@ function TabsList({
|
|
|
2442
2411
|
},
|
|
2443
2412
|
...props,
|
|
2444
2413
|
children: items.map(
|
|
2445
|
-
(child, index) =>
|
|
2414
|
+
(child, index) => React39.isValidElement(child) ? React39.cloneElement(child, {
|
|
2446
2415
|
__index: index,
|
|
2447
2416
|
__isFocusItem: index === activeIndex,
|
|
2448
2417
|
__onFocusItem: () => setActiveIndex(index)
|
|
@@ -2563,9 +2532,9 @@ function Toggle({
|
|
|
2563
2532
|
}
|
|
2564
2533
|
|
|
2565
2534
|
// src/components/toggle-group.tsx
|
|
2566
|
-
import * as
|
|
2535
|
+
import * as React41 from "react";
|
|
2567
2536
|
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
2568
|
-
var ToggleGroupContext =
|
|
2537
|
+
var ToggleGroupContext = React41.createContext({
|
|
2569
2538
|
variant: "default",
|
|
2570
2539
|
size: "default",
|
|
2571
2540
|
value: [],
|
|
@@ -2592,7 +2561,7 @@ function ToggleGroup({
|
|
|
2592
2561
|
defaultValue: toArray(defaultValue),
|
|
2593
2562
|
onChange: (next) => onValueChange?.(type === "single" ? next[0] ?? "" : next)
|
|
2594
2563
|
});
|
|
2595
|
-
const toggle =
|
|
2564
|
+
const toggle = React41.useCallback(
|
|
2596
2565
|
(itemValue) => {
|
|
2597
2566
|
if (type === "single") {
|
|
2598
2567
|
setSelected(selected.includes(itemValue) ? [] : [itemValue]);
|
|
@@ -2628,7 +2597,7 @@ function ToggleGroupItem({
|
|
|
2628
2597
|
onClick,
|
|
2629
2598
|
...props
|
|
2630
2599
|
}) {
|
|
2631
|
-
const context =
|
|
2600
|
+
const context = React41.useContext(ToggleGroupContext);
|
|
2632
2601
|
const resolvedVariant = context.variant || variant || "default";
|
|
2633
2602
|
const resolvedSize = context.size || size || "default";
|
|
2634
2603
|
const on = context.value.includes(value);
|
|
@@ -2767,7 +2736,7 @@ function Checkbox({
|
|
|
2767
2736
|
}
|
|
2768
2737
|
|
|
2769
2738
|
// src/components/radio-group.tsx
|
|
2770
|
-
import * as
|
|
2739
|
+
import * as React44 from "react";
|
|
2771
2740
|
|
|
2772
2741
|
// src/generated/radio-group.ts
|
|
2773
2742
|
var RADIO_GROUP_ROOT = "grid gap-3";
|
|
@@ -2775,7 +2744,7 @@ var RADIO_GROUP_ITEM = "border-input text-primary focus-visible:border-ring focu
|
|
|
2775
2744
|
|
|
2776
2745
|
// src/components/radio-group.tsx
|
|
2777
2746
|
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
2778
|
-
var RadioGroupContext =
|
|
2747
|
+
var RadioGroupContext = React44.createContext(
|
|
2779
2748
|
null
|
|
2780
2749
|
);
|
|
2781
2750
|
function RadioGroup({
|
|
@@ -2792,10 +2761,10 @@ function RadioGroup({
|
|
|
2792
2761
|
defaultValue,
|
|
2793
2762
|
...onValueChange ? { onChange: onValueChange } : {}
|
|
2794
2763
|
});
|
|
2795
|
-
const itemsRef =
|
|
2796
|
-
const [count, setCount] =
|
|
2764
|
+
const itemsRef = React44.useRef([]);
|
|
2765
|
+
const [count, setCount] = React44.useState(0);
|
|
2797
2766
|
const { activeIndex, setActiveIndex, onKeyDown: rovingKeyDown } = useRovingFocus({ count, orientation: "vertical", loop: true });
|
|
2798
|
-
const register =
|
|
2767
|
+
const register = React44.useCallback((el) => {
|
|
2799
2768
|
const list = itemsRef.current;
|
|
2800
2769
|
let index = list.indexOf(el);
|
|
2801
2770
|
if (index === -1) {
|
|
@@ -2805,7 +2774,7 @@ function RadioGroup({
|
|
|
2805
2774
|
}
|
|
2806
2775
|
return index;
|
|
2807
2776
|
}, []);
|
|
2808
|
-
const ctx =
|
|
2777
|
+
const ctx = React44.useMemo(
|
|
2809
2778
|
() => ({ value: current, setValue: setCurrent, register, activeIndex, setActiveIndex }),
|
|
2810
2779
|
[current, setCurrent, register, activeIndex, setActiveIndex]
|
|
2811
2780
|
);
|
|
@@ -2831,11 +2800,11 @@ function RadioGroupItem({
|
|
|
2831
2800
|
onClick,
|
|
2832
2801
|
...props
|
|
2833
2802
|
}) {
|
|
2834
|
-
const ctx =
|
|
2803
|
+
const ctx = React44.useContext(RadioGroupContext);
|
|
2835
2804
|
if (!ctx) throw new Error("RadioGroupItem must be used within a RadioGroup");
|
|
2836
|
-
const indexRef =
|
|
2805
|
+
const indexRef = React44.useRef(-1);
|
|
2837
2806
|
const checked = ctx.value === value;
|
|
2838
|
-
|
|
2807
|
+
React44.useEffect(() => {
|
|
2839
2808
|
if (checked) ctx.setActiveIndex(indexRef.current);
|
|
2840
2809
|
}, [checked]);
|
|
2841
2810
|
return /* @__PURE__ */ jsx34(
|
|
@@ -2878,7 +2847,7 @@ function RadioGroupItem({
|
|
|
2878
2847
|
}
|
|
2879
2848
|
|
|
2880
2849
|
// src/components/slider.tsx
|
|
2881
|
-
import * as
|
|
2850
|
+
import * as React45 from "react";
|
|
2882
2851
|
|
|
2883
2852
|
// src/generated/slider.ts
|
|
2884
2853
|
var SLIDER_ROOT = "relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col";
|
|
@@ -2914,9 +2883,9 @@ function Slider({
|
|
|
2914
2883
|
const current = clampStep(raw, min, max, step);
|
|
2915
2884
|
const span = Math.max(max - min, Number.EPSILON);
|
|
2916
2885
|
const percent = Math.min(100, Math.max(0, (current - min) / span * 100));
|
|
2917
|
-
const trackRef =
|
|
2918
|
-
const draggingRef =
|
|
2919
|
-
const valueFromPointer =
|
|
2886
|
+
const trackRef = React45.useRef(null);
|
|
2887
|
+
const draggingRef = React45.useRef(false);
|
|
2888
|
+
const valueFromPointer = React45.useCallback(
|
|
2920
2889
|
(clientX, clientY) => {
|
|
2921
2890
|
const rect = trackRef.current?.getBoundingClientRect();
|
|
2922
2891
|
if (!rect) return current;
|
|
@@ -3059,7 +3028,7 @@ function ScrollBar({
|
|
|
3059
3028
|
}
|
|
3060
3029
|
|
|
3061
3030
|
// src/components/sidebar.tsx
|
|
3062
|
-
import * as
|
|
3031
|
+
import * as React47 from "react";
|
|
3063
3032
|
|
|
3064
3033
|
// src/generated/sidebar.ts
|
|
3065
3034
|
var SIDEBAR_MENU_BUTTON_BASE = "peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0";
|
|
@@ -3092,9 +3061,9 @@ var SIDEBAR_MENU_ITEM = "group/menu-item relative";
|
|
|
3092
3061
|
import { jsx as jsx37, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
3093
3062
|
var SIDEBAR_WIDTH = "16rem";
|
|
3094
3063
|
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
3095
|
-
var SidebarContext =
|
|
3064
|
+
var SidebarContext = React47.createContext(null);
|
|
3096
3065
|
function useSidebar() {
|
|
3097
|
-
const ctx =
|
|
3066
|
+
const ctx = React47.useContext(SidebarContext);
|
|
3098
3067
|
if (!ctx) throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
3099
3068
|
return ctx;
|
|
3100
3069
|
}
|
|
@@ -3112,12 +3081,12 @@ function SidebarProvider({
|
|
|
3112
3081
|
defaultValue: defaultOpen,
|
|
3113
3082
|
...onOpenChange ? { onChange: onOpenChange } : {}
|
|
3114
3083
|
});
|
|
3115
|
-
const toggleSidebar =
|
|
3084
|
+
const toggleSidebar = React47.useCallback(
|
|
3116
3085
|
() => setOpen(!open),
|
|
3117
3086
|
[open, setOpen]
|
|
3118
3087
|
);
|
|
3119
3088
|
const state = open ? "expanded" : "collapsed";
|
|
3120
|
-
const contextValue =
|
|
3089
|
+
const contextValue = React47.useMemo(
|
|
3121
3090
|
() => ({ state, open, setOpen, toggleSidebar }),
|
|
3122
3091
|
[state, open, setOpen, toggleSidebar]
|
|
3123
3092
|
);
|
|
@@ -3373,7 +3342,7 @@ function SidebarMenuButton({
|
|
|
3373
3342
|
}
|
|
3374
3343
|
|
|
3375
3344
|
// src/components/carousel.tsx
|
|
3376
|
-
import * as
|
|
3345
|
+
import * as React48 from "react";
|
|
3377
3346
|
|
|
3378
3347
|
// src/generated/carousel.ts
|
|
3379
3348
|
var CAROUSEL_CONTENT_VIEWPORT = "overflow-hidden";
|
|
@@ -3388,14 +3357,14 @@ var CAROUSEL_PREVIOUS_HORIZONTAL = "top-1/2 -left-12 -translate-y-1/2";
|
|
|
3388
3357
|
var CAROUSEL_PREVIOUS_VERTICAL = "-top-12 left-1/2 -translate-x-1/2 rotate-90";
|
|
3389
3358
|
var CAROUSEL_NEXT_HORIZONTAL = "top-1/2 -right-12 -translate-y-1/2";
|
|
3390
3359
|
var CAROUSEL_NEXT_VERTICAL = "-bottom-12 left-1/2 -translate-x-1/2 rotate-90";
|
|
3391
|
-
var CAROUSEL_EDGE_FADE_PREV = "pointer-events-none absolute inset-y-0 left-0 w-
|
|
3392
|
-
var CAROUSEL_EDGE_FADE_NEXT = "pointer-events-none absolute inset-y-0 right-0 w-
|
|
3360
|
+
var CAROUSEL_EDGE_FADE_PREV = "pointer-events-none absolute inset-y-0 left-0 w-24 bg-gradient-to-r from-background/45 via-background/20 to-transparent";
|
|
3361
|
+
var CAROUSEL_EDGE_FADE_NEXT = "pointer-events-none absolute inset-y-0 right-0 w-24 bg-gradient-to-l from-background/45 via-background/20 to-transparent";
|
|
3393
3362
|
|
|
3394
3363
|
// src/components/carousel.tsx
|
|
3395
|
-
import { Fragment as
|
|
3396
|
-
var CarouselContext =
|
|
3364
|
+
import { Fragment as Fragment4, jsx as jsx38, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3365
|
+
var CarouselContext = React48.createContext(null);
|
|
3397
3366
|
function useCarousel() {
|
|
3398
|
-
const context =
|
|
3367
|
+
const context = React48.useContext(CarouselContext);
|
|
3399
3368
|
if (!context) {
|
|
3400
3369
|
throw new Error("useCarousel must be used within a <Carousel />");
|
|
3401
3370
|
}
|
|
@@ -3416,13 +3385,13 @@ function Carousel({
|
|
|
3416
3385
|
defaultValue: defaultIndex,
|
|
3417
3386
|
onChange: onIndexChange
|
|
3418
3387
|
});
|
|
3419
|
-
const [count, setCount] =
|
|
3388
|
+
const [count, setCount] = React48.useState(0);
|
|
3420
3389
|
const canScrollPrev = index > 0;
|
|
3421
3390
|
const canScrollNext = index < count - 1;
|
|
3422
|
-
const scrollPrev =
|
|
3391
|
+
const scrollPrev = React48.useCallback(() => {
|
|
3423
3392
|
if (index > 0) setIndex(index - 1);
|
|
3424
3393
|
}, [index, setIndex]);
|
|
3425
|
-
const scrollNext =
|
|
3394
|
+
const scrollNext = React48.useCallback(() => {
|
|
3426
3395
|
if (index < count - 1) setIndex(index + 1);
|
|
3427
3396
|
}, [index, count, setIndex]);
|
|
3428
3397
|
const handleKeyDown = (event) => {
|
|
@@ -3470,8 +3439,8 @@ function CarouselContent({
|
|
|
3470
3439
|
...props
|
|
3471
3440
|
}) {
|
|
3472
3441
|
const { orientation, index, setCount } = useCarousel();
|
|
3473
|
-
const childCount =
|
|
3474
|
-
|
|
3442
|
+
const childCount = React48.Children.count(children);
|
|
3443
|
+
React48.useEffect(() => {
|
|
3475
3444
|
setCount(childCount);
|
|
3476
3445
|
}, [childCount, setCount]);
|
|
3477
3446
|
const transform = orientation === "horizontal" ? `translate3d(-${index * 100}%, 0, 0)` : `translate3d(0, -${index * 100}%, 0)`;
|
|
@@ -3513,7 +3482,7 @@ function CarouselEdgeFade({
|
|
|
3513
3482
|
className
|
|
3514
3483
|
}) {
|
|
3515
3484
|
const { canScrollPrev, canScrollNext } = useCarousel();
|
|
3516
|
-
return /* @__PURE__ */ jsxs11(
|
|
3485
|
+
return /* @__PURE__ */ jsxs11(Fragment4, { children: [
|
|
3517
3486
|
/* @__PURE__ */ jsx38(
|
|
3518
3487
|
"div",
|
|
3519
3488
|
{
|
|
@@ -3622,7 +3591,7 @@ function CarouselNext({
|
|
|
3622
3591
|
}
|
|
3623
3592
|
|
|
3624
3593
|
// src/components/input-otp.tsx
|
|
3625
|
-
import * as
|
|
3594
|
+
import * as React49 from "react";
|
|
3626
3595
|
|
|
3627
3596
|
// src/generated/input-otp.ts
|
|
3628
3597
|
var INPUT_OTP_CONTAINER = "relative flex items-center gap-2 has-disabled:opacity-50";
|
|
@@ -3634,9 +3603,9 @@ var INPUT_OTP_SLOT_CARET = "animate-caret-blink bg-foreground h-4 w-px duration-
|
|
|
3634
3603
|
|
|
3635
3604
|
// src/components/input-otp.tsx
|
|
3636
3605
|
import { jsx as jsx39, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
3637
|
-
var InputOTPContext =
|
|
3606
|
+
var InputOTPContext = React49.createContext(null);
|
|
3638
3607
|
function useInputOTP() {
|
|
3639
|
-
const context =
|
|
3608
|
+
const context = React49.useContext(InputOTPContext);
|
|
3640
3609
|
if (!context) {
|
|
3641
3610
|
throw new Error("InputOTP slots must be used within an <InputOTP />");
|
|
3642
3611
|
}
|
|
@@ -3658,7 +3627,7 @@ function InputOTP({
|
|
|
3658
3627
|
defaultValue,
|
|
3659
3628
|
onChange
|
|
3660
3629
|
});
|
|
3661
|
-
const [focused, setFocused] =
|
|
3630
|
+
const [focused, setFocused] = React49.useState(false);
|
|
3662
3631
|
const activeIndex = focused ? Math.min(value.length, maxLength - 1) : -1;
|
|
3663
3632
|
return /* @__PURE__ */ jsx39(InputOTPContext.Provider, { value: { value, maxLength, activeIndex }, children: /* @__PURE__ */ jsxs12(
|
|
3664
3633
|
"div",
|
|
@@ -3736,21 +3705,21 @@ function InputOTPSeparator({ ...props }) {
|
|
|
3736
3705
|
}
|
|
3737
3706
|
|
|
3738
3707
|
// src/components/tooltip.tsx
|
|
3739
|
-
import * as
|
|
3708
|
+
import * as React50 from "react";
|
|
3740
3709
|
|
|
3741
3710
|
// src/generated/tooltip.ts
|
|
3742
3711
|
var TOOLTIP_CONTENT = "bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 z-50 w-fit rounded-md px-3 py-1.5 text-xs text-balance";
|
|
3743
3712
|
|
|
3744
3713
|
// src/components/tooltip.tsx
|
|
3745
|
-
import { Fragment as
|
|
3746
|
-
var TooltipContext =
|
|
3714
|
+
import { Fragment as Fragment5, jsx as jsx40 } from "react/jsx-runtime";
|
|
3715
|
+
var TooltipContext = React50.createContext(null);
|
|
3747
3716
|
function useTooltip() {
|
|
3748
|
-
const ctx =
|
|
3717
|
+
const ctx = React50.useContext(TooltipContext);
|
|
3749
3718
|
if (!ctx) throw new Error("Tooltip parts must be used within <Tooltip>");
|
|
3750
3719
|
return ctx;
|
|
3751
3720
|
}
|
|
3752
3721
|
function TooltipProvider({ children }) {
|
|
3753
|
-
return /* @__PURE__ */ jsx40(
|
|
3722
|
+
return /* @__PURE__ */ jsx40(Fragment5, { children });
|
|
3754
3723
|
}
|
|
3755
3724
|
function Tooltip({ open, defaultOpen = false, onOpenChange, children }) {
|
|
3756
3725
|
const [isOpen, setOpen] = useControllableState({
|
|
@@ -3758,7 +3727,7 @@ function Tooltip({ open, defaultOpen = false, onOpenChange, children }) {
|
|
|
3758
3727
|
defaultValue: defaultOpen,
|
|
3759
3728
|
...onOpenChange ? { onChange: onOpenChange } : {}
|
|
3760
3729
|
});
|
|
3761
|
-
const anchorRef =
|
|
3730
|
+
const anchorRef = React50.useRef(null);
|
|
3762
3731
|
return /* @__PURE__ */ jsx40(TooltipProvider, { children: /* @__PURE__ */ jsx40(TooltipContext.Provider, { value: { open: isOpen, setOpen, anchorRef }, children }) });
|
|
3763
3732
|
}
|
|
3764
3733
|
function TooltipTrigger({
|
|
@@ -3829,16 +3798,16 @@ function TooltipContent({
|
|
|
3829
3798
|
}
|
|
3830
3799
|
|
|
3831
3800
|
// src/components/popover.tsx
|
|
3832
|
-
import * as
|
|
3801
|
+
import * as React51 from "react";
|
|
3833
3802
|
|
|
3834
3803
|
// src/generated/popover.ts
|
|
3835
3804
|
var POPOVER_CONTENT = "bg-popover text-popover-foreground 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 z-50 w-72 rounded-md border p-4 shadow-md outline-hidden";
|
|
3836
3805
|
|
|
3837
3806
|
// src/components/popover.tsx
|
|
3838
3807
|
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
3839
|
-
var PopoverContext =
|
|
3808
|
+
var PopoverContext = React51.createContext(null);
|
|
3840
3809
|
function usePopover() {
|
|
3841
|
-
const ctx =
|
|
3810
|
+
const ctx = React51.useContext(PopoverContext);
|
|
3842
3811
|
if (!ctx) throw new Error("Popover parts must be used within <Popover>");
|
|
3843
3812
|
return ctx;
|
|
3844
3813
|
}
|
|
@@ -3848,7 +3817,7 @@ function Popover({ open, defaultOpen = false, onOpenChange, children }) {
|
|
|
3848
3817
|
defaultValue: defaultOpen,
|
|
3849
3818
|
...onOpenChange ? { onChange: onOpenChange } : {}
|
|
3850
3819
|
});
|
|
3851
|
-
const anchorRef =
|
|
3820
|
+
const anchorRef = React51.useRef(null);
|
|
3852
3821
|
return /* @__PURE__ */ jsx41(PopoverContext.Provider, { value: { open: isOpen, setOpen, anchorRef }, children });
|
|
3853
3822
|
}
|
|
3854
3823
|
function PopoverTrigger({ asChild = false, onClick, ...props }) {
|
|
@@ -3922,63 +3891,119 @@ function PopoverContent({
|
|
|
3922
3891
|
) });
|
|
3923
3892
|
}
|
|
3924
3893
|
|
|
3925
|
-
// src/components/
|
|
3926
|
-
import * as
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
3933
|
-
var HoverCardContext = React51.createContext(null);
|
|
3934
|
-
function useHoverCard() {
|
|
3935
|
-
const ctx = React51.useContext(HoverCardContext);
|
|
3936
|
-
if (!ctx) throw new Error("HoverCard parts must be used within <HoverCard>");
|
|
3894
|
+
// src/components/info-tip.tsx
|
|
3895
|
+
import * as React52 from "react";
|
|
3896
|
+
import { jsx as jsx42, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
3897
|
+
var InfoTipContext = React52.createContext(null);
|
|
3898
|
+
function useInfoTip() {
|
|
3899
|
+
const ctx = React52.useContext(InfoTipContext);
|
|
3900
|
+
if (!ctx) throw new Error("InfoTip parts must be used within <InfoTip>");
|
|
3937
3901
|
return ctx;
|
|
3938
3902
|
}
|
|
3939
|
-
function
|
|
3903
|
+
function InfoTip({
|
|
3904
|
+
open,
|
|
3905
|
+
defaultOpen = false,
|
|
3906
|
+
onOpenChange,
|
|
3907
|
+
children
|
|
3908
|
+
}) {
|
|
3940
3909
|
const [isOpen, setOpen] = useControllableState({
|
|
3941
3910
|
...open !== void 0 ? { value: open } : {},
|
|
3942
3911
|
defaultValue: defaultOpen,
|
|
3943
3912
|
...onOpenChange ? { onChange: onOpenChange } : {}
|
|
3944
3913
|
});
|
|
3945
|
-
const anchorRef =
|
|
3946
|
-
|
|
3914
|
+
const anchorRef = React52.useRef(null);
|
|
3915
|
+
const contentId = React52.useId();
|
|
3916
|
+
return /* @__PURE__ */ jsx42(
|
|
3917
|
+
InfoTipContext.Provider,
|
|
3918
|
+
{
|
|
3919
|
+
value: { open: isOpen, setOpen, anchorRef, contentId },
|
|
3920
|
+
children
|
|
3921
|
+
}
|
|
3922
|
+
);
|
|
3947
3923
|
}
|
|
3948
|
-
function
|
|
3924
|
+
function InfoGlyph2({ className }) {
|
|
3925
|
+
return /* @__PURE__ */ jsxs13(
|
|
3926
|
+
"svg",
|
|
3927
|
+
{
|
|
3928
|
+
viewBox: "0 0 24 24",
|
|
3929
|
+
fill: "none",
|
|
3930
|
+
stroke: "currentColor",
|
|
3931
|
+
strokeWidth: 2,
|
|
3932
|
+
strokeLinecap: "round",
|
|
3933
|
+
strokeLinejoin: "round",
|
|
3934
|
+
"aria-hidden": true,
|
|
3935
|
+
className: cn("size-4", className),
|
|
3936
|
+
children: [
|
|
3937
|
+
/* @__PURE__ */ jsx42("circle", { cx: "12", cy: "12", r: "10" }),
|
|
3938
|
+
/* @__PURE__ */ jsx42("path", { d: "M12 16v-4" }),
|
|
3939
|
+
/* @__PURE__ */ jsx42("path", { d: "M12 8h.01" })
|
|
3940
|
+
]
|
|
3941
|
+
}
|
|
3942
|
+
);
|
|
3943
|
+
}
|
|
3944
|
+
function InfoTipTrigger({
|
|
3949
3945
|
asChild = false,
|
|
3946
|
+
label = "More information",
|
|
3947
|
+
hoverDelay = 500,
|
|
3948
|
+
className,
|
|
3949
|
+
onClick,
|
|
3950
|
+
onBlur,
|
|
3950
3951
|
onPointerEnter,
|
|
3951
3952
|
onPointerLeave,
|
|
3953
|
+
children,
|
|
3952
3954
|
...props
|
|
3953
3955
|
}) {
|
|
3954
|
-
const { setOpen, anchorRef } =
|
|
3955
|
-
const
|
|
3956
|
+
const { open, setOpen, anchorRef, contentId } = useInfoTip();
|
|
3957
|
+
const hover = useHoverIntent({
|
|
3958
|
+
onOpen: () => setOpen(true),
|
|
3959
|
+
onClose: () => setOpen(false),
|
|
3960
|
+
openDelay: hoverDelay
|
|
3961
|
+
});
|
|
3962
|
+
const Comp = asChild ? Slot : "button";
|
|
3956
3963
|
return /* @__PURE__ */ jsx42(
|
|
3957
3964
|
Comp,
|
|
3958
3965
|
{
|
|
3959
|
-
"data-slot": "
|
|
3966
|
+
"data-slot": "info-tip-trigger",
|
|
3967
|
+
"data-state": open ? "open" : "closed",
|
|
3968
|
+
type: asChild ? void 0 : "button",
|
|
3969
|
+
"aria-label": label,
|
|
3970
|
+
"aria-expanded": open,
|
|
3971
|
+
"aria-controls": contentId,
|
|
3960
3972
|
ref: anchorRef,
|
|
3973
|
+
className: cn(
|
|
3974
|
+
"inline-flex size-4 shrink-0 cursor-help items-center justify-center rounded-full align-middle text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring data-[state=open]:text-main-accent-t1",
|
|
3975
|
+
className
|
|
3976
|
+
),
|
|
3977
|
+
onClick: (e) => {
|
|
3978
|
+
onClick?.(e);
|
|
3979
|
+
setOpen(!open);
|
|
3980
|
+
},
|
|
3981
|
+
onBlur: (e) => {
|
|
3982
|
+
onBlur?.(e);
|
|
3983
|
+
setOpen(false);
|
|
3984
|
+
},
|
|
3961
3985
|
onPointerEnter: (e) => {
|
|
3962
3986
|
onPointerEnter?.(e);
|
|
3963
|
-
|
|
3987
|
+
hover.onPointerEnter(e);
|
|
3964
3988
|
},
|
|
3965
3989
|
onPointerLeave: (e) => {
|
|
3966
3990
|
onPointerLeave?.(e);
|
|
3967
|
-
|
|
3991
|
+
hover.onPointerLeave(e);
|
|
3968
3992
|
},
|
|
3969
|
-
...props
|
|
3993
|
+
...props,
|
|
3994
|
+
children: children ?? /* @__PURE__ */ jsx42(InfoGlyph2, {})
|
|
3970
3995
|
}
|
|
3971
3996
|
);
|
|
3972
3997
|
}
|
|
3973
|
-
function
|
|
3998
|
+
function InfoTipContent({
|
|
3974
3999
|
className,
|
|
3975
4000
|
side: sideProp = "bottom",
|
|
3976
4001
|
align = "center",
|
|
3977
|
-
sideOffset =
|
|
4002
|
+
sideOffset = 6,
|
|
3978
4003
|
children,
|
|
3979
4004
|
...props
|
|
3980
4005
|
}) {
|
|
3981
|
-
const { open, anchorRef } =
|
|
4006
|
+
const { open, setOpen, anchorRef, contentId } = useInfoTip();
|
|
3982
4007
|
const { isPresent, ref: presRef } = usePresence(open);
|
|
3983
4008
|
const { floatingRef, style, side } = useFloating({
|
|
3984
4009
|
anchorRef,
|
|
@@ -3987,63 +4012,153 @@ function HoverCardContent({
|
|
|
3987
4012
|
align,
|
|
3988
4013
|
offset: sideOffset
|
|
3989
4014
|
});
|
|
4015
|
+
const dismissRef = useDismissableLayer({
|
|
4016
|
+
enabled: open,
|
|
4017
|
+
onDismiss: () => setOpen(false),
|
|
4018
|
+
exclude: [anchorRef]
|
|
4019
|
+
});
|
|
3990
4020
|
if (!isPresent) return null;
|
|
3991
4021
|
return /* @__PURE__ */ jsx42(Portal, { children: /* @__PURE__ */ jsx42(
|
|
3992
4022
|
"div",
|
|
3993
4023
|
{
|
|
3994
|
-
|
|
4024
|
+
id: contentId,
|
|
4025
|
+
role: "status",
|
|
4026
|
+
"aria-live": "polite",
|
|
4027
|
+
"data-slot": "info-tip-content",
|
|
3995
4028
|
"data-state": open ? "open" : "closed",
|
|
3996
4029
|
"data-side": side,
|
|
3997
4030
|
"data-align": align,
|
|
3998
|
-
ref: mergeRefs(floatingRef, presRef),
|
|
4031
|
+
ref: mergeRefs(floatingRef, dismissRef, presRef),
|
|
3999
4032
|
style,
|
|
4000
|
-
className: cn(
|
|
4033
|
+
className: cn(POPOVER_CONTENT, "w-64 p-3 text-sm", className),
|
|
4001
4034
|
...props,
|
|
4002
4035
|
children
|
|
4003
4036
|
}
|
|
4004
4037
|
) });
|
|
4005
4038
|
}
|
|
4006
4039
|
|
|
4007
|
-
// src/components/
|
|
4008
|
-
import * as
|
|
4040
|
+
// src/components/hover-card.tsx
|
|
4041
|
+
import * as React53 from "react";
|
|
4009
4042
|
|
|
4010
|
-
// src/generated/
|
|
4011
|
-
var
|
|
4012
|
-
var DROPDOWN_MENU_SUB_CONTENT = "bg-popover text-popover-foreground 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 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg";
|
|
4013
|
-
var DROPDOWN_MENU_ITEM = "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";
|
|
4014
|
-
var DROPDOWN_MENU_CHECK_ITEM = "focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";
|
|
4015
|
-
var DROPDOWN_MENU_SUB_TRIGGER = "focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";
|
|
4016
|
-
var DROPDOWN_MENU_ITEM_INDICATOR = "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center";
|
|
4017
|
-
var DROPDOWN_MENU_LABEL = "px-2 py-1.5 text-sm font-medium data-[inset]:pl-8";
|
|
4018
|
-
var DROPDOWN_MENU_SEPARATOR = "bg-border -mx-1 my-1 h-px";
|
|
4019
|
-
var DROPDOWN_MENU_SHORTCUT = "text-muted-foreground ml-auto text-xs tracking-widest";
|
|
4043
|
+
// src/generated/hover-card.ts
|
|
4044
|
+
var HOVER_CARD_CONTENT = "bg-popover text-popover-foreground 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 z-50 w-64 rounded-md border p-4 shadow-md outline-hidden";
|
|
4020
4045
|
|
|
4021
|
-
// src/components/
|
|
4022
|
-
import { jsx as jsx43
|
|
4023
|
-
var
|
|
4024
|
-
|
|
4025
|
-
);
|
|
4026
|
-
|
|
4027
|
-
const ctx = React52.useContext(DropdownMenuContext);
|
|
4028
|
-
if (!ctx) throw new Error("DropdownMenu parts must be used within <DropdownMenu>");
|
|
4046
|
+
// src/components/hover-card.tsx
|
|
4047
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
4048
|
+
var HoverCardContext = React53.createContext(null);
|
|
4049
|
+
function useHoverCard() {
|
|
4050
|
+
const ctx = React53.useContext(HoverCardContext);
|
|
4051
|
+
if (!ctx) throw new Error("HoverCard parts must be used within <HoverCard>");
|
|
4029
4052
|
return ctx;
|
|
4030
4053
|
}
|
|
4031
|
-
function
|
|
4054
|
+
function HoverCard({ open, defaultOpen = false, onOpenChange, children }) {
|
|
4032
4055
|
const [isOpen, setOpen] = useControllableState({
|
|
4033
4056
|
...open !== void 0 ? { value: open } : {},
|
|
4034
4057
|
defaultValue: defaultOpen,
|
|
4035
4058
|
...onOpenChange ? { onChange: onOpenChange } : {}
|
|
4036
4059
|
});
|
|
4037
|
-
const anchorRef =
|
|
4038
|
-
return /* @__PURE__ */ jsx43(
|
|
4039
|
-
}
|
|
4040
|
-
function DropdownMenuPortal({ children }) {
|
|
4041
|
-
return /* @__PURE__ */ jsx43(Portal, { children });
|
|
4060
|
+
const anchorRef = React53.useRef(null);
|
|
4061
|
+
return /* @__PURE__ */ jsx43(HoverCardContext.Provider, { value: { open: isOpen, setOpen, anchorRef }, children });
|
|
4042
4062
|
}
|
|
4043
|
-
function
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4063
|
+
function HoverCardTrigger({
|
|
4064
|
+
asChild = false,
|
|
4065
|
+
onPointerEnter,
|
|
4066
|
+
onPointerLeave,
|
|
4067
|
+
...props
|
|
4068
|
+
}) {
|
|
4069
|
+
const { setOpen, anchorRef } = useHoverCard();
|
|
4070
|
+
const Comp = asChild ? Slot : "a";
|
|
4071
|
+
return /* @__PURE__ */ jsx43(
|
|
4072
|
+
Comp,
|
|
4073
|
+
{
|
|
4074
|
+
"data-slot": "hover-card-trigger",
|
|
4075
|
+
ref: anchorRef,
|
|
4076
|
+
onPointerEnter: (e) => {
|
|
4077
|
+
onPointerEnter?.(e);
|
|
4078
|
+
setOpen(true);
|
|
4079
|
+
},
|
|
4080
|
+
onPointerLeave: (e) => {
|
|
4081
|
+
onPointerLeave?.(e);
|
|
4082
|
+
setOpen(false);
|
|
4083
|
+
},
|
|
4084
|
+
...props
|
|
4085
|
+
}
|
|
4086
|
+
);
|
|
4087
|
+
}
|
|
4088
|
+
function HoverCardContent({
|
|
4089
|
+
className,
|
|
4090
|
+
side: sideProp = "bottom",
|
|
4091
|
+
align = "center",
|
|
4092
|
+
sideOffset = 4,
|
|
4093
|
+
children,
|
|
4094
|
+
...props
|
|
4095
|
+
}) {
|
|
4096
|
+
const { open, anchorRef } = useHoverCard();
|
|
4097
|
+
const { isPresent, ref: presRef } = usePresence(open);
|
|
4098
|
+
const { floatingRef, style, side } = useFloating({
|
|
4099
|
+
anchorRef,
|
|
4100
|
+
open,
|
|
4101
|
+
side: sideProp,
|
|
4102
|
+
align,
|
|
4103
|
+
offset: sideOffset
|
|
4104
|
+
});
|
|
4105
|
+
if (!isPresent) return null;
|
|
4106
|
+
return /* @__PURE__ */ jsx43(Portal, { children: /* @__PURE__ */ jsx43(
|
|
4107
|
+
"div",
|
|
4108
|
+
{
|
|
4109
|
+
"data-slot": "hover-card-content",
|
|
4110
|
+
"data-state": open ? "open" : "closed",
|
|
4111
|
+
"data-side": side,
|
|
4112
|
+
"data-align": align,
|
|
4113
|
+
ref: mergeRefs(floatingRef, presRef),
|
|
4114
|
+
style,
|
|
4115
|
+
className: cn(HOVER_CARD_CONTENT, className),
|
|
4116
|
+
...props,
|
|
4117
|
+
children
|
|
4118
|
+
}
|
|
4119
|
+
) });
|
|
4120
|
+
}
|
|
4121
|
+
|
|
4122
|
+
// src/components/dropdown-menu.tsx
|
|
4123
|
+
import * as React54 from "react";
|
|
4124
|
+
|
|
4125
|
+
// src/generated/dropdown-menu.ts
|
|
4126
|
+
var DROPDOWN_MENU_CONTENT = "bg-popover text-popover-foreground 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 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md";
|
|
4127
|
+
var DROPDOWN_MENU_SUB_CONTENT = "bg-popover text-popover-foreground 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 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg";
|
|
4128
|
+
var DROPDOWN_MENU_ITEM = "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";
|
|
4129
|
+
var DROPDOWN_MENU_CHECK_ITEM = "focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";
|
|
4130
|
+
var DROPDOWN_MENU_SUB_TRIGGER = "focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";
|
|
4131
|
+
var DROPDOWN_MENU_ITEM_INDICATOR = "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center";
|
|
4132
|
+
var DROPDOWN_MENU_LABEL = "px-2 py-1.5 text-sm font-medium data-[inset]:pl-8";
|
|
4133
|
+
var DROPDOWN_MENU_SEPARATOR = "bg-border -mx-1 my-1 h-px";
|
|
4134
|
+
var DROPDOWN_MENU_SHORTCUT = "text-muted-foreground ml-auto text-xs tracking-widest";
|
|
4135
|
+
|
|
4136
|
+
// src/components/dropdown-menu.tsx
|
|
4137
|
+
import { jsx as jsx44, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
4138
|
+
var DropdownMenuContext = React54.createContext(
|
|
4139
|
+
null
|
|
4140
|
+
);
|
|
4141
|
+
function useDropdownMenu() {
|
|
4142
|
+
const ctx = React54.useContext(DropdownMenuContext);
|
|
4143
|
+
if (!ctx) throw new Error("DropdownMenu parts must be used within <DropdownMenu>");
|
|
4144
|
+
return ctx;
|
|
4145
|
+
}
|
|
4146
|
+
function DropdownMenu({ open, defaultOpen = false, onOpenChange, children }) {
|
|
4147
|
+
const [isOpen, setOpen] = useControllableState({
|
|
4148
|
+
...open !== void 0 ? { value: open } : {},
|
|
4149
|
+
defaultValue: defaultOpen,
|
|
4150
|
+
...onOpenChange ? { onChange: onOpenChange } : {}
|
|
4151
|
+
});
|
|
4152
|
+
const anchorRef = React54.useRef(null);
|
|
4153
|
+
return /* @__PURE__ */ jsx44(DropdownMenuContext.Provider, { value: { open: isOpen, setOpen, anchorRef }, children: /* @__PURE__ */ jsx44("div", { "data-slot": "dropdown-menu", children }) });
|
|
4154
|
+
}
|
|
4155
|
+
function DropdownMenuPortal({ children }) {
|
|
4156
|
+
return /* @__PURE__ */ jsx44(Portal, { children });
|
|
4157
|
+
}
|
|
4158
|
+
function DropdownMenuTrigger({ asChild = false, onClick, ...props }) {
|
|
4159
|
+
const { open, setOpen, anchorRef } = useDropdownMenu();
|
|
4160
|
+
const Comp = asChild ? Slot : "button";
|
|
4161
|
+
return /* @__PURE__ */ jsx44(
|
|
4047
4162
|
Comp,
|
|
4048
4163
|
{
|
|
4049
4164
|
"data-slot": "dropdown-menu-trigger",
|
|
@@ -4079,7 +4194,7 @@ function DropdownMenuContent({
|
|
|
4079
4194
|
onDismiss: () => setOpen(false),
|
|
4080
4195
|
exclude: [anchorRef]
|
|
4081
4196
|
});
|
|
4082
|
-
const contentRef =
|
|
4197
|
+
const contentRef = React54.useRef(null);
|
|
4083
4198
|
const items = () => Array.from(
|
|
4084
4199
|
contentRef.current?.querySelectorAll("[role^='menuitem']") ?? []
|
|
4085
4200
|
).filter((el) => el.getAttribute("data-disabled") === null);
|
|
@@ -4088,13 +4203,13 @@ function DropdownMenuContent({
|
|
|
4088
4203
|
orientation: "vertical",
|
|
4089
4204
|
loop: true
|
|
4090
4205
|
});
|
|
4091
|
-
|
|
4206
|
+
React54.useEffect(() => {
|
|
4092
4207
|
if (!open) return;
|
|
4093
4208
|
items()[activeIndex]?.focus();
|
|
4094
4209
|
}, [open, activeIndex]);
|
|
4095
|
-
const close =
|
|
4210
|
+
const close = React54.useCallback(() => setOpen(false), [setOpen]);
|
|
4096
4211
|
if (!isPresent) return null;
|
|
4097
|
-
return /* @__PURE__ */
|
|
4212
|
+
return /* @__PURE__ */ jsx44(Portal, { children: /* @__PURE__ */ jsx44(DropdownMenuCloseContext.Provider, { value: close, children: /* @__PURE__ */ jsx44(
|
|
4098
4213
|
"div",
|
|
4099
4214
|
{
|
|
4100
4215
|
"data-slot": "dropdown-menu-content",
|
|
@@ -4117,10 +4232,10 @@ function DropdownMenuContent({
|
|
|
4117
4232
|
}
|
|
4118
4233
|
) }) });
|
|
4119
4234
|
}
|
|
4120
|
-
var DropdownMenuCloseContext =
|
|
4235
|
+
var DropdownMenuCloseContext = React54.createContext(() => {
|
|
4121
4236
|
});
|
|
4122
4237
|
function DropdownMenuGroup({ className, ...props }) {
|
|
4123
|
-
return /* @__PURE__ */
|
|
4238
|
+
return /* @__PURE__ */ jsx44("div", { "data-slot": "dropdown-menu-group", role: "group", className, ...props });
|
|
4124
4239
|
}
|
|
4125
4240
|
function DropdownMenuItem({
|
|
4126
4241
|
className,
|
|
@@ -4131,8 +4246,8 @@ function DropdownMenuItem({
|
|
|
4131
4246
|
onKeyDown,
|
|
4132
4247
|
...props
|
|
4133
4248
|
}) {
|
|
4134
|
-
const close =
|
|
4135
|
-
return /* @__PURE__ */
|
|
4249
|
+
const close = React54.useContext(DropdownMenuCloseContext);
|
|
4250
|
+
return /* @__PURE__ */ jsx44(
|
|
4136
4251
|
"div",
|
|
4137
4252
|
{
|
|
4138
4253
|
"data-slot": "dropdown-menu-item",
|
|
@@ -4169,8 +4284,8 @@ function DropdownMenuCheckboxItem({
|
|
|
4169
4284
|
onClick,
|
|
4170
4285
|
...props
|
|
4171
4286
|
}) {
|
|
4172
|
-
const close =
|
|
4173
|
-
return /* @__PURE__ */
|
|
4287
|
+
const close = React54.useContext(DropdownMenuCloseContext);
|
|
4288
|
+
return /* @__PURE__ */ jsxs14(
|
|
4174
4289
|
"div",
|
|
4175
4290
|
{
|
|
4176
4291
|
"data-slot": "dropdown-menu-checkbox-item",
|
|
@@ -4190,13 +4305,13 @@ function DropdownMenuCheckboxItem({
|
|
|
4190
4305
|
},
|
|
4191
4306
|
...props,
|
|
4192
4307
|
children: [
|
|
4193
|
-
/* @__PURE__ */
|
|
4308
|
+
/* @__PURE__ */ jsx44("span", { className: DROPDOWN_MENU_ITEM_INDICATOR, children: checked ? /* @__PURE__ */ jsx44("svg", { className: "size-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx44("path", { d: "M20 6 9 17l-5-5" }) }) : null }),
|
|
4194
4309
|
children
|
|
4195
4310
|
]
|
|
4196
4311
|
}
|
|
4197
4312
|
);
|
|
4198
4313
|
}
|
|
4199
|
-
var DropdownMenuRadioGroupContext =
|
|
4314
|
+
var DropdownMenuRadioGroupContext = React54.createContext(null);
|
|
4200
4315
|
function DropdownMenuRadioGroup({
|
|
4201
4316
|
className,
|
|
4202
4317
|
value,
|
|
@@ -4204,11 +4319,11 @@ function DropdownMenuRadioGroup({
|
|
|
4204
4319
|
children,
|
|
4205
4320
|
...props
|
|
4206
4321
|
}) {
|
|
4207
|
-
const ctx =
|
|
4322
|
+
const ctx = React54.useMemo(
|
|
4208
4323
|
() => ({ value, setValue: (next) => onValueChange?.(next) }),
|
|
4209
4324
|
[value, onValueChange]
|
|
4210
4325
|
);
|
|
4211
|
-
return /* @__PURE__ */
|
|
4326
|
+
return /* @__PURE__ */ jsx44(DropdownMenuRadioGroupContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx44("div", { "data-slot": "dropdown-menu-radio-group", role: "group", className, ...props, children }) });
|
|
4212
4327
|
}
|
|
4213
4328
|
function DropdownMenuRadioItem({
|
|
4214
4329
|
className,
|
|
@@ -4218,10 +4333,10 @@ function DropdownMenuRadioItem({
|
|
|
4218
4333
|
onClick,
|
|
4219
4334
|
...props
|
|
4220
4335
|
}) {
|
|
4221
|
-
const close =
|
|
4222
|
-
const group =
|
|
4336
|
+
const close = React54.useContext(DropdownMenuCloseContext);
|
|
4337
|
+
const group = React54.useContext(DropdownMenuRadioGroupContext);
|
|
4223
4338
|
const checked = group?.value === value;
|
|
4224
|
-
return /* @__PURE__ */
|
|
4339
|
+
return /* @__PURE__ */ jsxs14(
|
|
4225
4340
|
"div",
|
|
4226
4341
|
{
|
|
4227
4342
|
"data-slot": "dropdown-menu-radio-item",
|
|
@@ -4242,14 +4357,14 @@ function DropdownMenuRadioItem({
|
|
|
4242
4357
|
},
|
|
4243
4358
|
...props,
|
|
4244
4359
|
children: [
|
|
4245
|
-
/* @__PURE__ */
|
|
4360
|
+
/* @__PURE__ */ jsx44("span", { className: DROPDOWN_MENU_ITEM_INDICATOR, children: checked ? /* @__PURE__ */ jsx44("svg", { className: "size-2 fill-current", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ jsx44("circle", { cx: "12", cy: "12", r: "10" }) }) : null }),
|
|
4246
4361
|
children
|
|
4247
4362
|
]
|
|
4248
4363
|
}
|
|
4249
4364
|
);
|
|
4250
4365
|
}
|
|
4251
4366
|
function DropdownMenuLabel({ className, inset, ...props }) {
|
|
4252
|
-
return /* @__PURE__ */
|
|
4367
|
+
return /* @__PURE__ */ jsx44(
|
|
4253
4368
|
"div",
|
|
4254
4369
|
{
|
|
4255
4370
|
"data-slot": "dropdown-menu-label",
|
|
@@ -4260,7 +4375,7 @@ function DropdownMenuLabel({ className, inset, ...props }) {
|
|
|
4260
4375
|
);
|
|
4261
4376
|
}
|
|
4262
4377
|
function DropdownMenuSeparator({ className, ...props }) {
|
|
4263
|
-
return /* @__PURE__ */
|
|
4378
|
+
return /* @__PURE__ */ jsx44(
|
|
4264
4379
|
"div",
|
|
4265
4380
|
{
|
|
4266
4381
|
"data-slot": "dropdown-menu-separator",
|
|
@@ -4271,7 +4386,7 @@ function DropdownMenuSeparator({ className, ...props }) {
|
|
|
4271
4386
|
);
|
|
4272
4387
|
}
|
|
4273
4388
|
function DropdownMenuShortcut({ className, ...props }) {
|
|
4274
|
-
return /* @__PURE__ */
|
|
4389
|
+
return /* @__PURE__ */ jsx44(
|
|
4275
4390
|
"span",
|
|
4276
4391
|
{
|
|
4277
4392
|
"data-slot": "dropdown-menu-shortcut",
|
|
@@ -4280,18 +4395,18 @@ function DropdownMenuShortcut({ className, ...props }) {
|
|
|
4280
4395
|
}
|
|
4281
4396
|
);
|
|
4282
4397
|
}
|
|
4283
|
-
var DropdownMenuSubContext =
|
|
4398
|
+
var DropdownMenuSubContext = React54.createContext(null);
|
|
4284
4399
|
function DropdownMenuSub({ open, defaultOpen = false, onOpenChange, children }) {
|
|
4285
4400
|
const [isOpen, setOpen] = useControllableState({
|
|
4286
4401
|
...open !== void 0 ? { value: open } : {},
|
|
4287
4402
|
defaultValue: defaultOpen,
|
|
4288
4403
|
...onOpenChange ? { onChange: onOpenChange } : {}
|
|
4289
4404
|
});
|
|
4290
|
-
return /* @__PURE__ */
|
|
4405
|
+
return /* @__PURE__ */ jsx44(DropdownMenuSubContext.Provider, { value: { open: isOpen, setOpen }, children: /* @__PURE__ */ jsx44("div", { "data-slot": "dropdown-menu-sub", children }) });
|
|
4291
4406
|
}
|
|
4292
4407
|
function DropdownMenuSubTrigger({ className, inset, children, onClick, ...props }) {
|
|
4293
|
-
const ctx =
|
|
4294
|
-
return /* @__PURE__ */
|
|
4408
|
+
const ctx = React54.useContext(DropdownMenuSubContext);
|
|
4409
|
+
return /* @__PURE__ */ jsxs14(
|
|
4295
4410
|
"div",
|
|
4296
4411
|
{
|
|
4297
4412
|
"data-slot": "dropdown-menu-sub-trigger",
|
|
@@ -4312,15 +4427,15 @@ function DropdownMenuSubTrigger({ className, inset, children, onClick, ...props
|
|
|
4312
4427
|
...props,
|
|
4313
4428
|
children: [
|
|
4314
4429
|
children,
|
|
4315
|
-
/* @__PURE__ */
|
|
4430
|
+
/* @__PURE__ */ jsx44("svg", { className: "ml-auto size-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx44("path", { d: "m9 18 6-6-6-6" }) })
|
|
4316
4431
|
]
|
|
4317
4432
|
}
|
|
4318
4433
|
);
|
|
4319
4434
|
}
|
|
4320
4435
|
function DropdownMenuSubContent({ className, children, ...props }) {
|
|
4321
|
-
const ctx =
|
|
4436
|
+
const ctx = React54.useContext(DropdownMenuSubContext);
|
|
4322
4437
|
if (!ctx?.open) return null;
|
|
4323
|
-
return /* @__PURE__ */
|
|
4438
|
+
return /* @__PURE__ */ jsx44(
|
|
4324
4439
|
"div",
|
|
4325
4440
|
{
|
|
4326
4441
|
"data-slot": "dropdown-menu-sub-content",
|
|
@@ -4337,7 +4452,7 @@ function DropdownMenuSubContent({ className, children, ...props }) {
|
|
|
4337
4452
|
}
|
|
4338
4453
|
|
|
4339
4454
|
// src/components/context-menu.tsx
|
|
4340
|
-
import * as
|
|
4455
|
+
import * as React55 from "react";
|
|
4341
4456
|
|
|
4342
4457
|
// src/generated/context-menu.ts
|
|
4343
4458
|
var CONTEXT_MENU_CONTENT = "bg-popover text-popover-foreground 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 z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md";
|
|
@@ -4350,10 +4465,10 @@ var CONTEXT_MENU_SEPARATOR = "bg-border -mx-1 my-1 h-px";
|
|
|
4350
4465
|
var CONTEXT_MENU_SHORTCUT = "text-muted-foreground ml-auto text-xs tracking-widest";
|
|
4351
4466
|
|
|
4352
4467
|
// src/components/context-menu.tsx
|
|
4353
|
-
import { jsx as
|
|
4354
|
-
var ContextMenuContext =
|
|
4468
|
+
import { jsx as jsx45, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
4469
|
+
var ContextMenuContext = React55.createContext(null);
|
|
4355
4470
|
function useContextMenu() {
|
|
4356
|
-
const ctx =
|
|
4471
|
+
const ctx = React55.useContext(ContextMenuContext);
|
|
4357
4472
|
if (!ctx) throw new Error("ContextMenu parts must be used within <ContextMenu>");
|
|
4358
4473
|
return ctx;
|
|
4359
4474
|
}
|
|
@@ -4363,16 +4478,16 @@ function ContextMenu({ open, defaultOpen = false, onOpenChange, children }) {
|
|
|
4363
4478
|
defaultValue: defaultOpen,
|
|
4364
4479
|
...onOpenChange ? { onChange: onOpenChange } : {}
|
|
4365
4480
|
});
|
|
4366
|
-
const [point, setPoint] =
|
|
4367
|
-
return /* @__PURE__ */
|
|
4481
|
+
const [point, setPoint] = React55.useState({ x: 0, y: 0 });
|
|
4482
|
+
return /* @__PURE__ */ jsx45(ContextMenuContext.Provider, { value: { open: isOpen, setOpen, point, setPoint }, children: /* @__PURE__ */ jsx45("div", { "data-slot": "context-menu", children }) });
|
|
4368
4483
|
}
|
|
4369
4484
|
function ContextMenuPortal({ children }) {
|
|
4370
|
-
return /* @__PURE__ */
|
|
4485
|
+
return /* @__PURE__ */ jsx45(Portal, { children });
|
|
4371
4486
|
}
|
|
4372
4487
|
function ContextMenuTrigger({ asChild = false, onContextMenu, ...props }) {
|
|
4373
4488
|
const { setOpen, setPoint } = useContextMenu();
|
|
4374
4489
|
const Comp = asChild ? Slot : "div";
|
|
4375
|
-
return /* @__PURE__ */
|
|
4490
|
+
return /* @__PURE__ */ jsx45(
|
|
4376
4491
|
Comp,
|
|
4377
4492
|
{
|
|
4378
4493
|
"data-slot": "context-menu-trigger",
|
|
@@ -4387,9 +4502,9 @@ function ContextMenuTrigger({ asChild = false, onContextMenu, ...props }) {
|
|
|
4387
4502
|
);
|
|
4388
4503
|
}
|
|
4389
4504
|
function ContextMenuGroup({ className, ...props }) {
|
|
4390
|
-
return /* @__PURE__ */
|
|
4505
|
+
return /* @__PURE__ */ jsx45("div", { "data-slot": "context-menu-group", role: "group", className, ...props });
|
|
4391
4506
|
}
|
|
4392
|
-
var ContextMenuCloseContext =
|
|
4507
|
+
var ContextMenuCloseContext = React55.createContext(() => {
|
|
4393
4508
|
});
|
|
4394
4509
|
function ContextMenuContent({ className, children, ...props }) {
|
|
4395
4510
|
const { open, setOpen, point } = useContextMenu();
|
|
@@ -4398,7 +4513,7 @@ function ContextMenuContent({ className, children, ...props }) {
|
|
|
4398
4513
|
enabled: open,
|
|
4399
4514
|
onDismiss: () => setOpen(false)
|
|
4400
4515
|
});
|
|
4401
|
-
const contentRef =
|
|
4516
|
+
const contentRef = React55.useRef(null);
|
|
4402
4517
|
const items = () => Array.from(
|
|
4403
4518
|
contentRef.current?.querySelectorAll("[role^='menuitem']") ?? []
|
|
4404
4519
|
).filter((el) => el.getAttribute("data-disabled") === null);
|
|
@@ -4407,13 +4522,13 @@ function ContextMenuContent({ className, children, ...props }) {
|
|
|
4407
4522
|
orientation: "vertical",
|
|
4408
4523
|
loop: true
|
|
4409
4524
|
});
|
|
4410
|
-
|
|
4525
|
+
React55.useEffect(() => {
|
|
4411
4526
|
if (!open) return;
|
|
4412
4527
|
items()[activeIndex]?.focus();
|
|
4413
4528
|
}, [open, activeIndex]);
|
|
4414
|
-
const close =
|
|
4529
|
+
const close = React55.useCallback(() => setOpen(false), [setOpen]);
|
|
4415
4530
|
if (!isPresent) return null;
|
|
4416
|
-
return /* @__PURE__ */
|
|
4531
|
+
return /* @__PURE__ */ jsx45(Portal, { children: /* @__PURE__ */ jsx45(ContextMenuCloseContext.Provider, { value: close, children: /* @__PURE__ */ jsx45(
|
|
4417
4532
|
"div",
|
|
4418
4533
|
{
|
|
4419
4534
|
"data-slot": "context-menu-content",
|
|
@@ -4445,8 +4560,8 @@ function ContextMenuItem({
|
|
|
4445
4560
|
onKeyDown,
|
|
4446
4561
|
...props
|
|
4447
4562
|
}) {
|
|
4448
|
-
const close =
|
|
4449
|
-
return /* @__PURE__ */
|
|
4563
|
+
const close = React55.useContext(ContextMenuCloseContext);
|
|
4564
|
+
return /* @__PURE__ */ jsx45(
|
|
4450
4565
|
"div",
|
|
4451
4566
|
{
|
|
4452
4567
|
"data-slot": "context-menu-item",
|
|
@@ -4483,8 +4598,8 @@ function ContextMenuCheckboxItem({
|
|
|
4483
4598
|
onClick,
|
|
4484
4599
|
...props
|
|
4485
4600
|
}) {
|
|
4486
|
-
const close =
|
|
4487
|
-
return /* @__PURE__ */
|
|
4601
|
+
const close = React55.useContext(ContextMenuCloseContext);
|
|
4602
|
+
return /* @__PURE__ */ jsxs15(
|
|
4488
4603
|
"div",
|
|
4489
4604
|
{
|
|
4490
4605
|
"data-slot": "context-menu-checkbox-item",
|
|
@@ -4504,13 +4619,13 @@ function ContextMenuCheckboxItem({
|
|
|
4504
4619
|
},
|
|
4505
4620
|
...props,
|
|
4506
4621
|
children: [
|
|
4507
|
-
/* @__PURE__ */
|
|
4622
|
+
/* @__PURE__ */ jsx45("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: checked ? /* @__PURE__ */ jsx45("svg", { className: "size-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx45("path", { d: "M20 6 9 17l-5-5" }) }) : null }),
|
|
4508
4623
|
children
|
|
4509
4624
|
]
|
|
4510
4625
|
}
|
|
4511
4626
|
);
|
|
4512
4627
|
}
|
|
4513
|
-
var ContextMenuRadioGroupContext =
|
|
4628
|
+
var ContextMenuRadioGroupContext = React55.createContext(null);
|
|
4514
4629
|
function ContextMenuRadioGroup({
|
|
4515
4630
|
className,
|
|
4516
4631
|
value,
|
|
@@ -4518,11 +4633,11 @@ function ContextMenuRadioGroup({
|
|
|
4518
4633
|
children,
|
|
4519
4634
|
...props
|
|
4520
4635
|
}) {
|
|
4521
|
-
const ctx =
|
|
4636
|
+
const ctx = React55.useMemo(
|
|
4522
4637
|
() => ({ value, setValue: (next) => onValueChange?.(next) }),
|
|
4523
4638
|
[value, onValueChange]
|
|
4524
4639
|
);
|
|
4525
|
-
return /* @__PURE__ */
|
|
4640
|
+
return /* @__PURE__ */ jsx45(ContextMenuRadioGroupContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx45("div", { "data-slot": "context-menu-radio-group", role: "group", className, ...props, children }) });
|
|
4526
4641
|
}
|
|
4527
4642
|
function ContextMenuRadioItem({
|
|
4528
4643
|
className,
|
|
@@ -4532,10 +4647,10 @@ function ContextMenuRadioItem({
|
|
|
4532
4647
|
onClick,
|
|
4533
4648
|
...props
|
|
4534
4649
|
}) {
|
|
4535
|
-
const close =
|
|
4536
|
-
const group =
|
|
4650
|
+
const close = React55.useContext(ContextMenuCloseContext);
|
|
4651
|
+
const group = React55.useContext(ContextMenuRadioGroupContext);
|
|
4537
4652
|
const checked = group?.value === value;
|
|
4538
|
-
return /* @__PURE__ */
|
|
4653
|
+
return /* @__PURE__ */ jsxs15(
|
|
4539
4654
|
"div",
|
|
4540
4655
|
{
|
|
4541
4656
|
"data-slot": "context-menu-radio-item",
|
|
@@ -4556,14 +4671,14 @@ function ContextMenuRadioItem({
|
|
|
4556
4671
|
},
|
|
4557
4672
|
...props,
|
|
4558
4673
|
children: [
|
|
4559
|
-
/* @__PURE__ */
|
|
4674
|
+
/* @__PURE__ */ jsx45("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: checked ? /* @__PURE__ */ jsx45("svg", { className: "size-2 fill-current", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ jsx45("circle", { cx: "12", cy: "12", r: "10" }) }) : null }),
|
|
4560
4675
|
children
|
|
4561
4676
|
]
|
|
4562
4677
|
}
|
|
4563
4678
|
);
|
|
4564
4679
|
}
|
|
4565
4680
|
function ContextMenuLabel({ className, inset, ...props }) {
|
|
4566
|
-
return /* @__PURE__ */
|
|
4681
|
+
return /* @__PURE__ */ jsx45(
|
|
4567
4682
|
"div",
|
|
4568
4683
|
{
|
|
4569
4684
|
"data-slot": "context-menu-label",
|
|
@@ -4574,7 +4689,7 @@ function ContextMenuLabel({ className, inset, ...props }) {
|
|
|
4574
4689
|
);
|
|
4575
4690
|
}
|
|
4576
4691
|
function ContextMenuSeparator({ className, ...props }) {
|
|
4577
|
-
return /* @__PURE__ */
|
|
4692
|
+
return /* @__PURE__ */ jsx45(
|
|
4578
4693
|
"div",
|
|
4579
4694
|
{
|
|
4580
4695
|
"data-slot": "context-menu-separator",
|
|
@@ -4585,7 +4700,7 @@ function ContextMenuSeparator({ className, ...props }) {
|
|
|
4585
4700
|
);
|
|
4586
4701
|
}
|
|
4587
4702
|
function ContextMenuShortcut({ className, ...props }) {
|
|
4588
|
-
return /* @__PURE__ */
|
|
4703
|
+
return /* @__PURE__ */ jsx45(
|
|
4589
4704
|
"span",
|
|
4590
4705
|
{
|
|
4591
4706
|
"data-slot": "context-menu-shortcut",
|
|
@@ -4594,18 +4709,18 @@ function ContextMenuShortcut({ className, ...props }) {
|
|
|
4594
4709
|
}
|
|
4595
4710
|
);
|
|
4596
4711
|
}
|
|
4597
|
-
var ContextMenuSubContext =
|
|
4712
|
+
var ContextMenuSubContext = React55.createContext(null);
|
|
4598
4713
|
function ContextMenuSub({ open, defaultOpen = false, onOpenChange, children }) {
|
|
4599
4714
|
const [isOpen, setOpen] = useControllableState({
|
|
4600
4715
|
...open !== void 0 ? { value: open } : {},
|
|
4601
4716
|
defaultValue: defaultOpen,
|
|
4602
4717
|
...onOpenChange ? { onChange: onOpenChange } : {}
|
|
4603
4718
|
});
|
|
4604
|
-
return /* @__PURE__ */
|
|
4719
|
+
return /* @__PURE__ */ jsx45(ContextMenuSubContext.Provider, { value: { open: isOpen, setOpen }, children: /* @__PURE__ */ jsx45("div", { "data-slot": "context-menu-sub", children }) });
|
|
4605
4720
|
}
|
|
4606
4721
|
function ContextMenuSubTrigger({ className, inset, children, onClick, ...props }) {
|
|
4607
|
-
const ctx =
|
|
4608
|
-
return /* @__PURE__ */
|
|
4722
|
+
const ctx = React55.useContext(ContextMenuSubContext);
|
|
4723
|
+
return /* @__PURE__ */ jsxs15(
|
|
4609
4724
|
"div",
|
|
4610
4725
|
{
|
|
4611
4726
|
"data-slot": "context-menu-sub-trigger",
|
|
@@ -4626,15 +4741,15 @@ function ContextMenuSubTrigger({ className, inset, children, onClick, ...props }
|
|
|
4626
4741
|
...props,
|
|
4627
4742
|
children: [
|
|
4628
4743
|
children,
|
|
4629
|
-
/* @__PURE__ */
|
|
4744
|
+
/* @__PURE__ */ jsx45("svg", { className: "ml-auto", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx45("path", { d: "m9 18 6-6-6-6" }) })
|
|
4630
4745
|
]
|
|
4631
4746
|
}
|
|
4632
4747
|
);
|
|
4633
4748
|
}
|
|
4634
4749
|
function ContextMenuSubContent({ className, children, ...props }) {
|
|
4635
|
-
const ctx =
|
|
4750
|
+
const ctx = React55.useContext(ContextMenuSubContext);
|
|
4636
4751
|
if (!ctx?.open) return null;
|
|
4637
|
-
return /* @__PURE__ */
|
|
4752
|
+
return /* @__PURE__ */ jsx45(
|
|
4638
4753
|
"div",
|
|
4639
4754
|
{
|
|
4640
4755
|
"data-slot": "context-menu-sub-content",
|
|
@@ -4651,7 +4766,7 @@ function ContextMenuSubContent({ className, children, ...props }) {
|
|
|
4651
4766
|
}
|
|
4652
4767
|
|
|
4653
4768
|
// src/components/menubar.tsx
|
|
4654
|
-
import * as
|
|
4769
|
+
import * as React56 from "react";
|
|
4655
4770
|
|
|
4656
4771
|
// src/generated/menubar.ts
|
|
4657
4772
|
var MENUBAR_ROOT = "bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs";
|
|
@@ -4668,16 +4783,16 @@ var MENUBAR_SUB_TRIGGER = "focus:bg-accent focus:text-accent-foreground data-[st
|
|
|
4668
4783
|
var MENUBAR_SUB_CONTENT = "bg-popover text-popover-foreground 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 absolute z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-lg";
|
|
4669
4784
|
|
|
4670
4785
|
// src/components/menubar.tsx
|
|
4671
|
-
import { jsx as
|
|
4672
|
-
var MenubarMenuContext =
|
|
4786
|
+
import { jsx as jsx46, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
4787
|
+
var MenubarMenuContext = React56.createContext(null);
|
|
4673
4788
|
function useMenu() {
|
|
4674
|
-
const ctx =
|
|
4789
|
+
const ctx = React56.useContext(MenubarMenuContext);
|
|
4675
4790
|
if (!ctx) throw new Error("Menubar parts must be used within <MenubarMenu>");
|
|
4676
4791
|
return ctx;
|
|
4677
4792
|
}
|
|
4678
|
-
var MenubarRadioGroupContext =
|
|
4793
|
+
var MenubarRadioGroupContext = React56.createContext(null);
|
|
4679
4794
|
function Menubar({ className, ...props }) {
|
|
4680
|
-
return /* @__PURE__ */
|
|
4795
|
+
return /* @__PURE__ */ jsx46(
|
|
4681
4796
|
"div",
|
|
4682
4797
|
{
|
|
4683
4798
|
"data-slot": "menubar",
|
|
@@ -4693,12 +4808,12 @@ function MenubarMenu({ open, defaultOpen = false, onOpenChange, children }) {
|
|
|
4693
4808
|
defaultValue: defaultOpen,
|
|
4694
4809
|
onChange: onOpenChange
|
|
4695
4810
|
});
|
|
4696
|
-
const triggerRef =
|
|
4697
|
-
return /* @__PURE__ */
|
|
4811
|
+
const triggerRef = React56.useRef(null);
|
|
4812
|
+
return /* @__PURE__ */ jsx46(MenubarMenuContext.Provider, { value: { open: isOpen, setOpen, triggerRef }, children: /* @__PURE__ */ jsx46("div", { "data-slot": "menubar-menu", className: "relative", children }) });
|
|
4698
4813
|
}
|
|
4699
4814
|
function MenubarTrigger({ className, onClick, ...props }) {
|
|
4700
4815
|
const { open, setOpen, triggerRef } = useMenu();
|
|
4701
|
-
return /* @__PURE__ */
|
|
4816
|
+
return /* @__PURE__ */ jsx46(
|
|
4702
4817
|
"button",
|
|
4703
4818
|
{
|
|
4704
4819
|
ref: triggerRef,
|
|
@@ -4734,10 +4849,10 @@ function MenubarContent({
|
|
|
4734
4849
|
onDismiss: () => setOpen(false),
|
|
4735
4850
|
exclude: [triggerRef]
|
|
4736
4851
|
});
|
|
4737
|
-
const items =
|
|
4852
|
+
const items = React56.Children.toArray(children);
|
|
4738
4853
|
const { onKeyDown } = useRovingFocus({ count: items.length, orientation: "vertical" });
|
|
4739
4854
|
if (!isPresent) return null;
|
|
4740
|
-
return /* @__PURE__ */
|
|
4855
|
+
return /* @__PURE__ */ jsx46(Portal, { children: /* @__PURE__ */ jsx46(
|
|
4741
4856
|
"div",
|
|
4742
4857
|
{
|
|
4743
4858
|
ref: mergeRefs(presenceRef, floatingRef, dismissRef),
|
|
@@ -4754,7 +4869,7 @@ function MenubarContent({
|
|
|
4754
4869
|
) });
|
|
4755
4870
|
}
|
|
4756
4871
|
function MenubarGroup({ className, ...props }) {
|
|
4757
|
-
return /* @__PURE__ */
|
|
4872
|
+
return /* @__PURE__ */ jsx46("div", { "data-slot": "menubar-group", role: "group", className, ...props });
|
|
4758
4873
|
}
|
|
4759
4874
|
function MenubarItem({
|
|
4760
4875
|
className,
|
|
@@ -4762,7 +4877,7 @@ function MenubarItem({
|
|
|
4762
4877
|
variant = "default",
|
|
4763
4878
|
...props
|
|
4764
4879
|
}) {
|
|
4765
|
-
return /* @__PURE__ */
|
|
4880
|
+
return /* @__PURE__ */ jsx46(
|
|
4766
4881
|
"div",
|
|
4767
4882
|
{
|
|
4768
4883
|
"data-slot": "menubar-item",
|
|
@@ -4781,7 +4896,7 @@ function MenubarCheckboxItem({
|
|
|
4781
4896
|
checked,
|
|
4782
4897
|
...props
|
|
4783
4898
|
}) {
|
|
4784
|
-
return /* @__PURE__ */
|
|
4899
|
+
return /* @__PURE__ */ jsxs16(
|
|
4785
4900
|
"div",
|
|
4786
4901
|
{
|
|
4787
4902
|
"data-slot": "menubar-checkbox-item",
|
|
@@ -4791,7 +4906,7 @@ function MenubarCheckboxItem({
|
|
|
4791
4906
|
className: cn(MENUBAR_CHECKBOX_ITEM, className),
|
|
4792
4907
|
...props,
|
|
4793
4908
|
children: [
|
|
4794
|
-
/* @__PURE__ */
|
|
4909
|
+
/* @__PURE__ */ jsx46("span", { className: MENUBAR_ITEM_INDICATOR, children: checked && /* @__PURE__ */ jsx46(
|
|
4795
4910
|
"svg",
|
|
4796
4911
|
{
|
|
4797
4912
|
className: "size-4",
|
|
@@ -4801,7 +4916,7 @@ function MenubarCheckboxItem({
|
|
|
4801
4916
|
strokeWidth: "2",
|
|
4802
4917
|
strokeLinecap: "round",
|
|
4803
4918
|
strokeLinejoin: "round",
|
|
4804
|
-
children: /* @__PURE__ */
|
|
4919
|
+
children: /* @__PURE__ */ jsx46("path", { d: "M20 6 9 17l-5-5" })
|
|
4805
4920
|
}
|
|
4806
4921
|
) }),
|
|
4807
4922
|
children
|
|
@@ -4821,7 +4936,7 @@ function MenubarRadioGroup({
|
|
|
4821
4936
|
defaultValue,
|
|
4822
4937
|
onChange: onValueChange
|
|
4823
4938
|
});
|
|
4824
|
-
return /* @__PURE__ */
|
|
4939
|
+
return /* @__PURE__ */ jsx46(MenubarRadioGroupContext.Provider, { value: { value: current, onValueChange: setValue }, children: /* @__PURE__ */ jsx46("div", { "data-slot": "menubar-radio-group", role: "group", className, children }) });
|
|
4825
4940
|
}
|
|
4826
4941
|
function MenubarRadioItem({
|
|
4827
4942
|
className,
|
|
@@ -4829,9 +4944,9 @@ function MenubarRadioItem({
|
|
|
4829
4944
|
value,
|
|
4830
4945
|
...props
|
|
4831
4946
|
}) {
|
|
4832
|
-
const ctx =
|
|
4947
|
+
const ctx = React56.useContext(MenubarRadioGroupContext);
|
|
4833
4948
|
const checked = ctx?.value === value;
|
|
4834
|
-
return /* @__PURE__ */
|
|
4949
|
+
return /* @__PURE__ */ jsxs16(
|
|
4835
4950
|
"div",
|
|
4836
4951
|
{
|
|
4837
4952
|
"data-slot": "menubar-radio-item",
|
|
@@ -4842,7 +4957,7 @@ function MenubarRadioItem({
|
|
|
4842
4957
|
onClick: () => ctx?.onValueChange(value),
|
|
4843
4958
|
...props,
|
|
4844
4959
|
children: [
|
|
4845
|
-
/* @__PURE__ */
|
|
4960
|
+
/* @__PURE__ */ jsx46("span", { className: MENUBAR_ITEM_INDICATOR, children: checked && /* @__PURE__ */ jsx46("svg", { className: "size-2 fill-current", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx46("circle", { cx: "12", cy: "12", r: "10" }) }) }),
|
|
4846
4961
|
children
|
|
4847
4962
|
]
|
|
4848
4963
|
}
|
|
@@ -4853,7 +4968,7 @@ function MenubarLabel({
|
|
|
4853
4968
|
inset,
|
|
4854
4969
|
...props
|
|
4855
4970
|
}) {
|
|
4856
|
-
return /* @__PURE__ */
|
|
4971
|
+
return /* @__PURE__ */ jsx46(
|
|
4857
4972
|
"div",
|
|
4858
4973
|
{
|
|
4859
4974
|
"data-slot": "menubar-label",
|
|
@@ -4864,7 +4979,7 @@ function MenubarLabel({
|
|
|
4864
4979
|
);
|
|
4865
4980
|
}
|
|
4866
4981
|
function MenubarSeparator({ className, ...props }) {
|
|
4867
|
-
return /* @__PURE__ */
|
|
4982
|
+
return /* @__PURE__ */ jsx46(
|
|
4868
4983
|
"div",
|
|
4869
4984
|
{
|
|
4870
4985
|
"data-slot": "menubar-separator",
|
|
@@ -4875,7 +4990,7 @@ function MenubarSeparator({ className, ...props }) {
|
|
|
4875
4990
|
);
|
|
4876
4991
|
}
|
|
4877
4992
|
function MenubarShortcut({ className, ...props }) {
|
|
4878
|
-
return /* @__PURE__ */
|
|
4993
|
+
return /* @__PURE__ */ jsx46(
|
|
4879
4994
|
"span",
|
|
4880
4995
|
{
|
|
4881
4996
|
"data-slot": "menubar-shortcut",
|
|
@@ -4884,9 +4999,9 @@ function MenubarShortcut({ className, ...props }) {
|
|
|
4884
4999
|
}
|
|
4885
5000
|
);
|
|
4886
5001
|
}
|
|
4887
|
-
var MenubarSubContext =
|
|
5002
|
+
var MenubarSubContext = React56.createContext(null);
|
|
4888
5003
|
function useSub() {
|
|
4889
|
-
const ctx =
|
|
5004
|
+
const ctx = React56.useContext(MenubarSubContext);
|
|
4890
5005
|
if (!ctx) throw new Error("MenubarSub parts must be used within <MenubarSub>");
|
|
4891
5006
|
return ctx;
|
|
4892
5007
|
}
|
|
@@ -4896,7 +5011,7 @@ function MenubarSub({ open, defaultOpen = false, onOpenChange, children }) {
|
|
|
4896
5011
|
defaultValue: defaultOpen,
|
|
4897
5012
|
onChange: onOpenChange
|
|
4898
5013
|
});
|
|
4899
|
-
return /* @__PURE__ */
|
|
5014
|
+
return /* @__PURE__ */ jsx46(MenubarSubContext.Provider, { value: { open: isOpen, setOpen }, children: /* @__PURE__ */ jsx46("div", { "data-slot": "menubar-sub", className: "relative", children }) });
|
|
4900
5015
|
}
|
|
4901
5016
|
function MenubarSubTrigger({
|
|
4902
5017
|
className,
|
|
@@ -4906,7 +5021,7 @@ function MenubarSubTrigger({
|
|
|
4906
5021
|
...props
|
|
4907
5022
|
}) {
|
|
4908
5023
|
const { open, setOpen } = useSub();
|
|
4909
|
-
return /* @__PURE__ */
|
|
5024
|
+
return /* @__PURE__ */ jsxs16(
|
|
4910
5025
|
"div",
|
|
4911
5026
|
{
|
|
4912
5027
|
"data-slot": "menubar-sub-trigger",
|
|
@@ -4922,7 +5037,7 @@ function MenubarSubTrigger({
|
|
|
4922
5037
|
...props,
|
|
4923
5038
|
children: [
|
|
4924
5039
|
children,
|
|
4925
|
-
/* @__PURE__ */
|
|
5040
|
+
/* @__PURE__ */ jsx46(
|
|
4926
5041
|
"svg",
|
|
4927
5042
|
{
|
|
4928
5043
|
className: "ml-auto h-4 w-4",
|
|
@@ -4932,7 +5047,7 @@ function MenubarSubTrigger({
|
|
|
4932
5047
|
strokeWidth: "2",
|
|
4933
5048
|
strokeLinecap: "round",
|
|
4934
5049
|
strokeLinejoin: "round",
|
|
4935
|
-
children: /* @__PURE__ */
|
|
5050
|
+
children: /* @__PURE__ */ jsx46("path", { d: "m9 18 6-6-6-6" })
|
|
4936
5051
|
}
|
|
4937
5052
|
)
|
|
4938
5053
|
]
|
|
@@ -4943,7 +5058,7 @@ function MenubarSubContent({ className, children, ...props }) {
|
|
|
4943
5058
|
const { open } = useSub();
|
|
4944
5059
|
const { isPresent, ref } = usePresence(open);
|
|
4945
5060
|
if (!isPresent) return null;
|
|
4946
|
-
return /* @__PURE__ */
|
|
5061
|
+
return /* @__PURE__ */ jsx46(
|
|
4947
5062
|
"div",
|
|
4948
5063
|
{
|
|
4949
5064
|
ref,
|
|
@@ -4958,7 +5073,7 @@ function MenubarSubContent({ className, children, ...props }) {
|
|
|
4958
5073
|
}
|
|
4959
5074
|
|
|
4960
5075
|
// src/components/navigation-menu.tsx
|
|
4961
|
-
import * as
|
|
5076
|
+
import * as React57 from "react";
|
|
4962
5077
|
|
|
4963
5078
|
// src/generated/navigation-menu.ts
|
|
4964
5079
|
var NAVIGATION_MENU = "group/navigation-menu relative flex max-w-max flex-1 items-center justify-center";
|
|
@@ -4971,13 +5086,13 @@ var NAVIGATION_MENU_INDICATOR = "data-[state=visible]:animate-in data-[state=hid
|
|
|
4971
5086
|
var NAVIGATION_MENU_VIEWPORT = "origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border shadow md:w-[var(--radix-navigation-menu-viewport-width)]";
|
|
4972
5087
|
|
|
4973
5088
|
// src/components/navigation-menu.tsx
|
|
4974
|
-
import { jsx as
|
|
5089
|
+
import { jsx as jsx47, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
4975
5090
|
function navigationMenuTriggerStyle() {
|
|
4976
5091
|
return NAVIGATION_MENU_TRIGGER_STYLE;
|
|
4977
5092
|
}
|
|
4978
|
-
var NavigationMenuItemContext =
|
|
5093
|
+
var NavigationMenuItemContext = React57.createContext(null);
|
|
4979
5094
|
function useItem() {
|
|
4980
|
-
const ctx =
|
|
5095
|
+
const ctx = React57.useContext(NavigationMenuItemContext);
|
|
4981
5096
|
if (!ctx) throw new Error("NavigationMenu parts must be used within <NavigationMenuItem>");
|
|
4982
5097
|
return ctx;
|
|
4983
5098
|
}
|
|
@@ -4987,7 +5102,7 @@ function NavigationMenu({
|
|
|
4987
5102
|
viewport = true,
|
|
4988
5103
|
...props
|
|
4989
5104
|
}) {
|
|
4990
|
-
return /* @__PURE__ */
|
|
5105
|
+
return /* @__PURE__ */ jsxs17(
|
|
4991
5106
|
"nav",
|
|
4992
5107
|
{
|
|
4993
5108
|
"data-slot": "navigation-menu",
|
|
@@ -5000,13 +5115,13 @@ function NavigationMenu({
|
|
|
5000
5115
|
...props,
|
|
5001
5116
|
children: [
|
|
5002
5117
|
children,
|
|
5003
|
-
viewport && /* @__PURE__ */
|
|
5118
|
+
viewport && /* @__PURE__ */ jsx47(NavigationMenuViewport, {})
|
|
5004
5119
|
]
|
|
5005
5120
|
}
|
|
5006
5121
|
);
|
|
5007
5122
|
}
|
|
5008
5123
|
function NavigationMenuList({ className, ...props }) {
|
|
5009
|
-
return /* @__PURE__ */
|
|
5124
|
+
return /* @__PURE__ */ jsx47(
|
|
5010
5125
|
"ul",
|
|
5011
5126
|
{
|
|
5012
5127
|
"data-slot": "navigation-menu-list",
|
|
@@ -5032,8 +5147,8 @@ function NavigationMenuItem({
|
|
|
5032
5147
|
defaultValue: defaultOpen,
|
|
5033
5148
|
onChange: onOpenChange
|
|
5034
5149
|
});
|
|
5035
|
-
const triggerRef =
|
|
5036
|
-
return /* @__PURE__ */
|
|
5150
|
+
const triggerRef = React57.useRef(null);
|
|
5151
|
+
return /* @__PURE__ */ jsx47(NavigationMenuItemContext.Provider, { value: { open: isOpen, setOpen, triggerRef }, children: /* @__PURE__ */ jsx47("li", { "data-slot": "navigation-menu-item", className: cn(NAVIGATION_MENU_ITEM, className), ...props, children }) });
|
|
5037
5152
|
}
|
|
5038
5153
|
function NavigationMenuTrigger({
|
|
5039
5154
|
className,
|
|
@@ -5042,7 +5157,7 @@ function NavigationMenuTrigger({
|
|
|
5042
5157
|
...props
|
|
5043
5158
|
}) {
|
|
5044
5159
|
const { open, setOpen, triggerRef } = useItem();
|
|
5045
|
-
return /* @__PURE__ */
|
|
5160
|
+
return /* @__PURE__ */ jsxs17(
|
|
5046
5161
|
"button",
|
|
5047
5162
|
{
|
|
5048
5163
|
ref: triggerRef,
|
|
@@ -5058,7 +5173,7 @@ function NavigationMenuTrigger({
|
|
|
5058
5173
|
children: [
|
|
5059
5174
|
children,
|
|
5060
5175
|
" ",
|
|
5061
|
-
/* @__PURE__ */
|
|
5176
|
+
/* @__PURE__ */ jsx47(
|
|
5062
5177
|
"svg",
|
|
5063
5178
|
{
|
|
5064
5179
|
className: "relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180",
|
|
@@ -5069,7 +5184,7 @@ function NavigationMenuTrigger({
|
|
|
5069
5184
|
strokeLinecap: "round",
|
|
5070
5185
|
strokeLinejoin: "round",
|
|
5071
5186
|
"aria-hidden": "true",
|
|
5072
|
-
children: /* @__PURE__ */
|
|
5187
|
+
children: /* @__PURE__ */ jsx47("path", { d: "m6 9 6 6 6-6" })
|
|
5073
5188
|
}
|
|
5074
5189
|
)
|
|
5075
5190
|
]
|
|
@@ -5085,7 +5200,7 @@ function NavigationMenuContent({ className, children, ...props }) {
|
|
|
5085
5200
|
exclude: [triggerRef]
|
|
5086
5201
|
});
|
|
5087
5202
|
if (!isPresent) return null;
|
|
5088
|
-
return /* @__PURE__ */
|
|
5203
|
+
return /* @__PURE__ */ jsx47(
|
|
5089
5204
|
"div",
|
|
5090
5205
|
{
|
|
5091
5206
|
ref: mergeRefs(presenceRef, dismissRef),
|
|
@@ -5101,7 +5216,7 @@ function NavigationMenuContent({ className, children, ...props }) {
|
|
|
5101
5216
|
);
|
|
5102
5217
|
}
|
|
5103
5218
|
function NavigationMenuViewport({ className, ...props }) {
|
|
5104
|
-
return /* @__PURE__ */
|
|
5219
|
+
return /* @__PURE__ */ jsx47("div", { className: "absolute top-full left-0 isolate z-50 flex justify-center", children: /* @__PURE__ */ jsx47(
|
|
5105
5220
|
"div",
|
|
5106
5221
|
{
|
|
5107
5222
|
"data-slot": "navigation-menu-viewport",
|
|
@@ -5119,7 +5234,7 @@ function NavigationMenuLink({
|
|
|
5119
5234
|
...props
|
|
5120
5235
|
}) {
|
|
5121
5236
|
const Comp = asChild ? Slot : "a";
|
|
5122
|
-
return /* @__PURE__ */
|
|
5237
|
+
return /* @__PURE__ */ jsx47(
|
|
5123
5238
|
Comp,
|
|
5124
5239
|
{
|
|
5125
5240
|
"data-slot": "navigation-menu-link",
|
|
@@ -5132,7 +5247,7 @@ function NavigationMenuLink({
|
|
|
5132
5247
|
);
|
|
5133
5248
|
}
|
|
5134
5249
|
function NavigationMenuIndicator({ className, ...props }) {
|
|
5135
|
-
return /* @__PURE__ */
|
|
5250
|
+
return /* @__PURE__ */ jsx47(
|
|
5136
5251
|
"div",
|
|
5137
5252
|
{
|
|
5138
5253
|
"data-slot": "navigation-menu-indicator",
|
|
@@ -5141,13 +5256,13 @@ function NavigationMenuIndicator({ className, ...props }) {
|
|
|
5141
5256
|
className
|
|
5142
5257
|
),
|
|
5143
5258
|
...props,
|
|
5144
|
-
children: /* @__PURE__ */
|
|
5259
|
+
children: /* @__PURE__ */ jsx47("div", { className: "bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md" })
|
|
5145
5260
|
}
|
|
5146
5261
|
);
|
|
5147
5262
|
}
|
|
5148
5263
|
|
|
5149
5264
|
// src/components/dialog.tsx
|
|
5150
|
-
import * as
|
|
5265
|
+
import * as React58 from "react";
|
|
5151
5266
|
|
|
5152
5267
|
// src/generated/dialog.ts
|
|
5153
5268
|
var DIALOG_OVERLAY = "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50";
|
|
@@ -5159,10 +5274,10 @@ var DIALOG_TITLE = "text-lg leading-none font-semibold";
|
|
|
5159
5274
|
var DIALOG_DESCRIPTION = "text-muted-foreground text-sm";
|
|
5160
5275
|
|
|
5161
5276
|
// src/components/dialog.tsx
|
|
5162
|
-
import { Fragment as
|
|
5163
|
-
var DialogContext =
|
|
5277
|
+
import { Fragment as Fragment6, jsx as jsx48, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
5278
|
+
var DialogContext = React58.createContext(null);
|
|
5164
5279
|
function useDialog() {
|
|
5165
|
-
const ctx =
|
|
5280
|
+
const ctx = React58.useContext(DialogContext);
|
|
5166
5281
|
if (!ctx) throw new Error("Dialog parts must be used within <Dialog>");
|
|
5167
5282
|
return ctx;
|
|
5168
5283
|
}
|
|
@@ -5172,13 +5287,13 @@ function Dialog({ open, defaultOpen = false, onOpenChange, children }) {
|
|
|
5172
5287
|
defaultValue: defaultOpen,
|
|
5173
5288
|
...onOpenChange ? { onChange: onOpenChange } : {}
|
|
5174
5289
|
});
|
|
5175
|
-
const triggerRef =
|
|
5176
|
-
return /* @__PURE__ */
|
|
5290
|
+
const triggerRef = React58.useRef(null);
|
|
5291
|
+
return /* @__PURE__ */ jsx48(DialogContext.Provider, { value: { open: isOpen, setOpen, triggerRef }, children });
|
|
5177
5292
|
}
|
|
5178
5293
|
function DialogTrigger({ asChild = false, onClick, ...props }) {
|
|
5179
5294
|
const { open, setOpen, triggerRef } = useDialog();
|
|
5180
5295
|
const Comp = asChild ? Slot : "button";
|
|
5181
|
-
return /* @__PURE__ */
|
|
5296
|
+
return /* @__PURE__ */ jsx48(
|
|
5182
5297
|
Comp,
|
|
5183
5298
|
{
|
|
5184
5299
|
"data-slot": "dialog-trigger",
|
|
@@ -5193,11 +5308,11 @@ function DialogTrigger({ asChild = false, onClick, ...props }) {
|
|
|
5193
5308
|
);
|
|
5194
5309
|
}
|
|
5195
5310
|
function DialogPortal({ children }) {
|
|
5196
|
-
return /* @__PURE__ */
|
|
5311
|
+
return /* @__PURE__ */ jsx48(Fragment6, { children });
|
|
5197
5312
|
}
|
|
5198
5313
|
function DialogOverlay({ className, ...props }) {
|
|
5199
5314
|
const { open, setOpen } = useDialog();
|
|
5200
|
-
return /* @__PURE__ */
|
|
5315
|
+
return /* @__PURE__ */ jsx48(
|
|
5201
5316
|
"div",
|
|
5202
5317
|
{
|
|
5203
5318
|
"data-slot": "dialog-overlay",
|
|
@@ -5208,7 +5323,7 @@ function DialogOverlay({ className, ...props }) {
|
|
|
5208
5323
|
}
|
|
5209
5324
|
);
|
|
5210
5325
|
}
|
|
5211
|
-
var XIcon = (props) => /* @__PURE__ */
|
|
5326
|
+
var XIcon = (props) => /* @__PURE__ */ jsx48(
|
|
5212
5327
|
"svg",
|
|
5213
5328
|
{
|
|
5214
5329
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -5221,7 +5336,7 @@ var XIcon = (props) => /* @__PURE__ */ jsx47(
|
|
|
5221
5336
|
strokeLinecap: "round",
|
|
5222
5337
|
strokeLinejoin: "round",
|
|
5223
5338
|
...props,
|
|
5224
|
-
children: /* @__PURE__ */
|
|
5339
|
+
children: /* @__PURE__ */ jsx48("path", { d: "M18 6 6 18M6 6l12 12" })
|
|
5225
5340
|
}
|
|
5226
5341
|
);
|
|
5227
5342
|
function DialogContent({
|
|
@@ -5238,7 +5353,7 @@ function DialogContent({
|
|
|
5238
5353
|
onDismiss: () => setOpen(false),
|
|
5239
5354
|
exclude: [triggerRef]
|
|
5240
5355
|
});
|
|
5241
|
-
|
|
5356
|
+
React58.useEffect(() => {
|
|
5242
5357
|
if (!open) return;
|
|
5243
5358
|
const prev = document.body.style.overflow;
|
|
5244
5359
|
document.body.style.overflow = "hidden";
|
|
@@ -5247,9 +5362,9 @@ function DialogContent({
|
|
|
5247
5362
|
};
|
|
5248
5363
|
}, [open]);
|
|
5249
5364
|
if (!isPresent) return null;
|
|
5250
|
-
return /* @__PURE__ */
|
|
5251
|
-
/* @__PURE__ */
|
|
5252
|
-
/* @__PURE__ */
|
|
5365
|
+
return /* @__PURE__ */ jsxs18(Portal, { children: [
|
|
5366
|
+
/* @__PURE__ */ jsx48(DialogOverlay, {}),
|
|
5367
|
+
/* @__PURE__ */ jsxs18(
|
|
5253
5368
|
"div",
|
|
5254
5369
|
{
|
|
5255
5370
|
"data-slot": "dialog-content",
|
|
@@ -5261,7 +5376,7 @@ function DialogContent({
|
|
|
5261
5376
|
...props,
|
|
5262
5377
|
children: [
|
|
5263
5378
|
children,
|
|
5264
|
-
showCloseButton && /* @__PURE__ */
|
|
5379
|
+
showCloseButton && /* @__PURE__ */ jsxs18(
|
|
5265
5380
|
"button",
|
|
5266
5381
|
{
|
|
5267
5382
|
type: "button",
|
|
@@ -5269,8 +5384,8 @@ function DialogContent({
|
|
|
5269
5384
|
onClick: () => setOpen(false),
|
|
5270
5385
|
className: DIALOG_CLOSE,
|
|
5271
5386
|
children: [
|
|
5272
|
-
/* @__PURE__ */
|
|
5273
|
-
/* @__PURE__ */
|
|
5387
|
+
/* @__PURE__ */ jsx48(XIcon, {}),
|
|
5388
|
+
/* @__PURE__ */ jsx48("span", { className: "sr-only", children: "Close" })
|
|
5274
5389
|
]
|
|
5275
5390
|
}
|
|
5276
5391
|
)
|
|
@@ -5282,7 +5397,7 @@ function DialogContent({
|
|
|
5282
5397
|
function DialogClose({ asChild = false, onClick, ...props }) {
|
|
5283
5398
|
const { setOpen } = useDialog();
|
|
5284
5399
|
const Comp = asChild ? Slot : "button";
|
|
5285
|
-
return /* @__PURE__ */
|
|
5400
|
+
return /* @__PURE__ */ jsx48(
|
|
5286
5401
|
Comp,
|
|
5287
5402
|
{
|
|
5288
5403
|
"data-slot": "dialog-close",
|
|
@@ -5295,7 +5410,7 @@ function DialogClose({ asChild = false, onClick, ...props }) {
|
|
|
5295
5410
|
);
|
|
5296
5411
|
}
|
|
5297
5412
|
function DialogHeader({ className, ...props }) {
|
|
5298
|
-
return /* @__PURE__ */
|
|
5413
|
+
return /* @__PURE__ */ jsx48(
|
|
5299
5414
|
"div",
|
|
5300
5415
|
{
|
|
5301
5416
|
"data-slot": "dialog-header",
|
|
@@ -5305,7 +5420,7 @@ function DialogHeader({ className, ...props }) {
|
|
|
5305
5420
|
);
|
|
5306
5421
|
}
|
|
5307
5422
|
function DialogFooter({ className, ...props }) {
|
|
5308
|
-
return /* @__PURE__ */
|
|
5423
|
+
return /* @__PURE__ */ jsx48(
|
|
5309
5424
|
"div",
|
|
5310
5425
|
{
|
|
5311
5426
|
"data-slot": "dialog-footer",
|
|
@@ -5315,7 +5430,7 @@ function DialogFooter({ className, ...props }) {
|
|
|
5315
5430
|
);
|
|
5316
5431
|
}
|
|
5317
5432
|
function DialogTitle({ className, ...props }) {
|
|
5318
|
-
return /* @__PURE__ */
|
|
5433
|
+
return /* @__PURE__ */ jsx48(
|
|
5319
5434
|
"h2",
|
|
5320
5435
|
{
|
|
5321
5436
|
"data-slot": "dialog-title",
|
|
@@ -5325,7 +5440,7 @@ function DialogTitle({ className, ...props }) {
|
|
|
5325
5440
|
);
|
|
5326
5441
|
}
|
|
5327
5442
|
function DialogDescription({ className, ...props }) {
|
|
5328
|
-
return /* @__PURE__ */
|
|
5443
|
+
return /* @__PURE__ */ jsx48(
|
|
5329
5444
|
"p",
|
|
5330
5445
|
{
|
|
5331
5446
|
"data-slot": "dialog-description",
|
|
@@ -5336,7 +5451,7 @@ function DialogDescription({ className, ...props }) {
|
|
|
5336
5451
|
}
|
|
5337
5452
|
|
|
5338
5453
|
// src/components/alert-dialog.tsx
|
|
5339
|
-
import * as
|
|
5454
|
+
import * as React59 from "react";
|
|
5340
5455
|
|
|
5341
5456
|
// src/generated/alert-dialog.ts
|
|
5342
5457
|
var ALERT_DIALOG_OVERLAY = "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50";
|
|
@@ -5347,10 +5462,10 @@ var ALERT_DIALOG_TITLE = "text-lg font-semibold";
|
|
|
5347
5462
|
var ALERT_DIALOG_DESCRIPTION = "text-muted-foreground text-sm";
|
|
5348
5463
|
|
|
5349
5464
|
// src/components/alert-dialog.tsx
|
|
5350
|
-
import { jsx as
|
|
5351
|
-
var AlertDialogContext =
|
|
5465
|
+
import { jsx as jsx49, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
5466
|
+
var AlertDialogContext = React59.createContext(null);
|
|
5352
5467
|
function useAlertDialog() {
|
|
5353
|
-
const ctx =
|
|
5468
|
+
const ctx = React59.useContext(AlertDialogContext);
|
|
5354
5469
|
if (!ctx) throw new Error("AlertDialog parts must be used within <AlertDialog>");
|
|
5355
5470
|
return ctx;
|
|
5356
5471
|
}
|
|
@@ -5360,13 +5475,13 @@ function AlertDialog({ open, defaultOpen = false, onOpenChange, children }) {
|
|
|
5360
5475
|
defaultValue: defaultOpen,
|
|
5361
5476
|
...onOpenChange ? { onChange: onOpenChange } : {}
|
|
5362
5477
|
});
|
|
5363
|
-
const triggerRef =
|
|
5364
|
-
return /* @__PURE__ */
|
|
5478
|
+
const triggerRef = React59.useRef(null);
|
|
5479
|
+
return /* @__PURE__ */ jsx49(AlertDialogContext.Provider, { value: { open: isOpen, setOpen, triggerRef }, children });
|
|
5365
5480
|
}
|
|
5366
5481
|
function AlertDialogTrigger({ asChild = false, onClick, ...props }) {
|
|
5367
5482
|
const { open, setOpen, triggerRef } = useAlertDialog();
|
|
5368
5483
|
const Comp = asChild ? Slot : "button";
|
|
5369
|
-
return /* @__PURE__ */
|
|
5484
|
+
return /* @__PURE__ */ jsx49(
|
|
5370
5485
|
Comp,
|
|
5371
5486
|
{
|
|
5372
5487
|
"data-slot": "alert-dialog-trigger",
|
|
@@ -5382,7 +5497,7 @@ function AlertDialogTrigger({ asChild = false, onClick, ...props }) {
|
|
|
5382
5497
|
}
|
|
5383
5498
|
function AlertDialogOverlay({ className, ...props }) {
|
|
5384
5499
|
const { open, setOpen } = useAlertDialog();
|
|
5385
|
-
return /* @__PURE__ */
|
|
5500
|
+
return /* @__PURE__ */ jsx49(
|
|
5386
5501
|
"div",
|
|
5387
5502
|
{
|
|
5388
5503
|
"data-slot": "alert-dialog-overlay",
|
|
@@ -5403,9 +5518,9 @@ function AlertDialogContent({ className, children, ...props }) {
|
|
|
5403
5518
|
exclude: [triggerRef]
|
|
5404
5519
|
});
|
|
5405
5520
|
if (!isPresent) return null;
|
|
5406
|
-
return /* @__PURE__ */
|
|
5407
|
-
/* @__PURE__ */
|
|
5408
|
-
/* @__PURE__ */
|
|
5521
|
+
return /* @__PURE__ */ jsxs19(Portal, { children: [
|
|
5522
|
+
/* @__PURE__ */ jsx49(AlertDialogOverlay, {}),
|
|
5523
|
+
/* @__PURE__ */ jsx49(
|
|
5409
5524
|
"div",
|
|
5410
5525
|
{
|
|
5411
5526
|
"data-slot": "alert-dialog-content",
|
|
@@ -5421,7 +5536,7 @@ function AlertDialogContent({ className, children, ...props }) {
|
|
|
5421
5536
|
] });
|
|
5422
5537
|
}
|
|
5423
5538
|
function AlertDialogHeader({ className, ...props }) {
|
|
5424
|
-
return /* @__PURE__ */
|
|
5539
|
+
return /* @__PURE__ */ jsx49(
|
|
5425
5540
|
"div",
|
|
5426
5541
|
{
|
|
5427
5542
|
"data-slot": "alert-dialog-header",
|
|
@@ -5431,7 +5546,7 @@ function AlertDialogHeader({ className, ...props }) {
|
|
|
5431
5546
|
);
|
|
5432
5547
|
}
|
|
5433
5548
|
function AlertDialogFooter({ className, ...props }) {
|
|
5434
|
-
return /* @__PURE__ */
|
|
5549
|
+
return /* @__PURE__ */ jsx49(
|
|
5435
5550
|
"div",
|
|
5436
5551
|
{
|
|
5437
5552
|
"data-slot": "alert-dialog-footer",
|
|
@@ -5441,7 +5556,7 @@ function AlertDialogFooter({ className, ...props }) {
|
|
|
5441
5556
|
);
|
|
5442
5557
|
}
|
|
5443
5558
|
function AlertDialogTitle({ className, ...props }) {
|
|
5444
|
-
return /* @__PURE__ */
|
|
5559
|
+
return /* @__PURE__ */ jsx49(
|
|
5445
5560
|
"h2",
|
|
5446
5561
|
{
|
|
5447
5562
|
"data-slot": "alert-dialog-title",
|
|
@@ -5451,7 +5566,7 @@ function AlertDialogTitle({ className, ...props }) {
|
|
|
5451
5566
|
);
|
|
5452
5567
|
}
|
|
5453
5568
|
function AlertDialogDescription({ className, ...props }) {
|
|
5454
|
-
return /* @__PURE__ */
|
|
5569
|
+
return /* @__PURE__ */ jsx49(
|
|
5455
5570
|
"p",
|
|
5456
5571
|
{
|
|
5457
5572
|
"data-slot": "alert-dialog-description",
|
|
@@ -5462,7 +5577,7 @@ function AlertDialogDescription({ className, ...props }) {
|
|
|
5462
5577
|
}
|
|
5463
5578
|
function AlertDialogAction({ className, onClick, ...props }) {
|
|
5464
5579
|
const { setOpen } = useAlertDialog();
|
|
5465
|
-
return /* @__PURE__ */
|
|
5580
|
+
return /* @__PURE__ */ jsx49(
|
|
5466
5581
|
"button",
|
|
5467
5582
|
{
|
|
5468
5583
|
"data-slot": "alert-dialog-action",
|
|
@@ -5477,7 +5592,7 @@ function AlertDialogAction({ className, onClick, ...props }) {
|
|
|
5477
5592
|
}
|
|
5478
5593
|
function AlertDialogCancel({ className, onClick, ...props }) {
|
|
5479
5594
|
const { setOpen } = useAlertDialog();
|
|
5480
|
-
return /* @__PURE__ */
|
|
5595
|
+
return /* @__PURE__ */ jsx49(
|
|
5481
5596
|
"button",
|
|
5482
5597
|
{
|
|
5483
5598
|
"data-slot": "alert-dialog-cancel",
|
|
@@ -5492,7 +5607,7 @@ function AlertDialogCancel({ className, onClick, ...props }) {
|
|
|
5492
5607
|
}
|
|
5493
5608
|
|
|
5494
5609
|
// src/components/sheet.tsx
|
|
5495
|
-
import * as
|
|
5610
|
+
import * as React60 from "react";
|
|
5496
5611
|
|
|
5497
5612
|
// src/generated/sheet.ts
|
|
5498
5613
|
var SHEET_OVERLAY = "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50";
|
|
@@ -5508,10 +5623,10 @@ var SHEET_TITLE = "text-foreground font-semibold";
|
|
|
5508
5623
|
var SHEET_DESCRIPTION = "text-muted-foreground text-sm";
|
|
5509
5624
|
|
|
5510
5625
|
// src/components/sheet.tsx
|
|
5511
|
-
import { jsx as
|
|
5512
|
-
var SheetContext =
|
|
5626
|
+
import { jsx as jsx50, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
5627
|
+
var SheetContext = React60.createContext(null);
|
|
5513
5628
|
function useSheet() {
|
|
5514
|
-
const ctx =
|
|
5629
|
+
const ctx = React60.useContext(SheetContext);
|
|
5515
5630
|
if (!ctx) throw new Error("Sheet parts must be used within <Sheet>");
|
|
5516
5631
|
return ctx;
|
|
5517
5632
|
}
|
|
@@ -5521,13 +5636,13 @@ function Sheet({ open, defaultOpen = false, onOpenChange, children }) {
|
|
|
5521
5636
|
defaultValue: defaultOpen,
|
|
5522
5637
|
...onOpenChange ? { onChange: onOpenChange } : {}
|
|
5523
5638
|
});
|
|
5524
|
-
const triggerRef =
|
|
5525
|
-
return /* @__PURE__ */
|
|
5639
|
+
const triggerRef = React60.useRef(null);
|
|
5640
|
+
return /* @__PURE__ */ jsx50(SheetContext.Provider, { value: { open: isOpen, setOpen, triggerRef }, children });
|
|
5526
5641
|
}
|
|
5527
5642
|
function SheetTrigger({ asChild = false, onClick, ...props }) {
|
|
5528
5643
|
const { open, setOpen, triggerRef } = useSheet();
|
|
5529
5644
|
const Comp = asChild ? Slot : "button";
|
|
5530
|
-
return /* @__PURE__ */
|
|
5645
|
+
return /* @__PURE__ */ jsx50(
|
|
5531
5646
|
Comp,
|
|
5532
5647
|
{
|
|
5533
5648
|
"data-slot": "sheet-trigger",
|
|
@@ -5543,7 +5658,7 @@ function SheetTrigger({ asChild = false, onClick, ...props }) {
|
|
|
5543
5658
|
}
|
|
5544
5659
|
function SheetOverlay({ className, ...props }) {
|
|
5545
5660
|
const { open, setOpen } = useSheet();
|
|
5546
|
-
return /* @__PURE__ */
|
|
5661
|
+
return /* @__PURE__ */ jsx50(
|
|
5547
5662
|
"div",
|
|
5548
5663
|
{
|
|
5549
5664
|
"data-slot": "sheet-overlay",
|
|
@@ -5560,7 +5675,7 @@ var sheetSideClasses = {
|
|
|
5560
5675
|
top: SHEET_SIDE_TOP,
|
|
5561
5676
|
bottom: SHEET_SIDE_BOTTOM
|
|
5562
5677
|
};
|
|
5563
|
-
var XIcon2 = (props) => /* @__PURE__ */
|
|
5678
|
+
var XIcon2 = (props) => /* @__PURE__ */ jsx50(
|
|
5564
5679
|
"svg",
|
|
5565
5680
|
{
|
|
5566
5681
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -5573,7 +5688,7 @@ var XIcon2 = (props) => /* @__PURE__ */ jsx49(
|
|
|
5573
5688
|
strokeLinecap: "round",
|
|
5574
5689
|
strokeLinejoin: "round",
|
|
5575
5690
|
...props,
|
|
5576
|
-
children: /* @__PURE__ */
|
|
5691
|
+
children: /* @__PURE__ */ jsx50("path", { d: "M18 6 6 18M6 6l12 12" })
|
|
5577
5692
|
}
|
|
5578
5693
|
);
|
|
5579
5694
|
function SheetContent({ className, children, side = "right", ...props }) {
|
|
@@ -5586,9 +5701,9 @@ function SheetContent({ className, children, side = "right", ...props }) {
|
|
|
5586
5701
|
exclude: [triggerRef]
|
|
5587
5702
|
});
|
|
5588
5703
|
if (!isPresent) return null;
|
|
5589
|
-
return /* @__PURE__ */
|
|
5590
|
-
/* @__PURE__ */
|
|
5591
|
-
/* @__PURE__ */
|
|
5704
|
+
return /* @__PURE__ */ jsxs20(Portal, { children: [
|
|
5705
|
+
/* @__PURE__ */ jsx50(SheetOverlay, {}),
|
|
5706
|
+
/* @__PURE__ */ jsxs20(
|
|
5592
5707
|
"div",
|
|
5593
5708
|
{
|
|
5594
5709
|
"data-slot": "sheet-content",
|
|
@@ -5600,7 +5715,7 @@ function SheetContent({ className, children, side = "right", ...props }) {
|
|
|
5600
5715
|
...props,
|
|
5601
5716
|
children: [
|
|
5602
5717
|
children,
|
|
5603
|
-
/* @__PURE__ */
|
|
5718
|
+
/* @__PURE__ */ jsxs20(
|
|
5604
5719
|
"button",
|
|
5605
5720
|
{
|
|
5606
5721
|
type: "button",
|
|
@@ -5608,8 +5723,8 @@ function SheetContent({ className, children, side = "right", ...props }) {
|
|
|
5608
5723
|
onClick: () => setOpen(false),
|
|
5609
5724
|
className: SHEET_CLOSE,
|
|
5610
5725
|
children: [
|
|
5611
|
-
/* @__PURE__ */
|
|
5612
|
-
/* @__PURE__ */
|
|
5726
|
+
/* @__PURE__ */ jsx50(XIcon2, { className: "size-4" }),
|
|
5727
|
+
/* @__PURE__ */ jsx50("span", { className: "sr-only", children: "Close" })
|
|
5613
5728
|
]
|
|
5614
5729
|
}
|
|
5615
5730
|
)
|
|
@@ -5621,7 +5736,7 @@ function SheetContent({ className, children, side = "right", ...props }) {
|
|
|
5621
5736
|
function SheetClose({ asChild = false, onClick, ...props }) {
|
|
5622
5737
|
const { setOpen } = useSheet();
|
|
5623
5738
|
const Comp = asChild ? Slot : "button";
|
|
5624
|
-
return /* @__PURE__ */
|
|
5739
|
+
return /* @__PURE__ */ jsx50(
|
|
5625
5740
|
Comp,
|
|
5626
5741
|
{
|
|
5627
5742
|
"data-slot": "sheet-close",
|
|
@@ -5634,7 +5749,7 @@ function SheetClose({ asChild = false, onClick, ...props }) {
|
|
|
5634
5749
|
);
|
|
5635
5750
|
}
|
|
5636
5751
|
function SheetHeader({ className, ...props }) {
|
|
5637
|
-
return /* @__PURE__ */
|
|
5752
|
+
return /* @__PURE__ */ jsx50(
|
|
5638
5753
|
"div",
|
|
5639
5754
|
{
|
|
5640
5755
|
"data-slot": "sheet-header",
|
|
@@ -5644,7 +5759,7 @@ function SheetHeader({ className, ...props }) {
|
|
|
5644
5759
|
);
|
|
5645
5760
|
}
|
|
5646
5761
|
function SheetFooter({ className, ...props }) {
|
|
5647
|
-
return /* @__PURE__ */
|
|
5762
|
+
return /* @__PURE__ */ jsx50(
|
|
5648
5763
|
"div",
|
|
5649
5764
|
{
|
|
5650
5765
|
"data-slot": "sheet-footer",
|
|
@@ -5654,7 +5769,7 @@ function SheetFooter({ className, ...props }) {
|
|
|
5654
5769
|
);
|
|
5655
5770
|
}
|
|
5656
5771
|
function SheetTitle({ className, ...props }) {
|
|
5657
|
-
return /* @__PURE__ */
|
|
5772
|
+
return /* @__PURE__ */ jsx50(
|
|
5658
5773
|
"h2",
|
|
5659
5774
|
{
|
|
5660
5775
|
"data-slot": "sheet-title",
|
|
@@ -5664,7 +5779,7 @@ function SheetTitle({ className, ...props }) {
|
|
|
5664
5779
|
);
|
|
5665
5780
|
}
|
|
5666
5781
|
function SheetDescription({ className, ...props }) {
|
|
5667
|
-
return /* @__PURE__ */
|
|
5782
|
+
return /* @__PURE__ */ jsx50(
|
|
5668
5783
|
"p",
|
|
5669
5784
|
{
|
|
5670
5785
|
"data-slot": "sheet-description",
|
|
@@ -5675,7 +5790,7 @@ function SheetDescription({ className, ...props }) {
|
|
|
5675
5790
|
}
|
|
5676
5791
|
|
|
5677
5792
|
// src/components/drawer.tsx
|
|
5678
|
-
import * as
|
|
5793
|
+
import * as React61 from "react";
|
|
5679
5794
|
|
|
5680
5795
|
// src/generated/drawer.ts
|
|
5681
5796
|
var DRAWER_CONTENT_BASE = "bg-background fixed z-50 flex h-auto border";
|
|
@@ -5693,10 +5808,10 @@ var DRAWER_TITLE = "text-foreground font-semibold";
|
|
|
5693
5808
|
var DRAWER_DESCRIPTION = "text-muted-foreground text-sm";
|
|
5694
5809
|
|
|
5695
5810
|
// src/components/drawer.tsx
|
|
5696
|
-
import { jsx as
|
|
5697
|
-
var DrawerContext =
|
|
5811
|
+
import { jsx as jsx51, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
5812
|
+
var DrawerContext = React61.createContext(null);
|
|
5698
5813
|
function useDrawer() {
|
|
5699
|
-
const ctx =
|
|
5814
|
+
const ctx = React61.useContext(DrawerContext);
|
|
5700
5815
|
if (!ctx) throw new Error("Drawer parts must be used within <Drawer>");
|
|
5701
5816
|
return ctx;
|
|
5702
5817
|
}
|
|
@@ -5712,12 +5827,12 @@ function Drawer({
|
|
|
5712
5827
|
defaultValue: defaultOpen,
|
|
5713
5828
|
...onOpenChange ? { onChange: onOpenChange } : {}
|
|
5714
5829
|
});
|
|
5715
|
-
return /* @__PURE__ */
|
|
5830
|
+
return /* @__PURE__ */ jsx51(DrawerContext.Provider, { value: { open: isOpen, setOpen, direction }, children: /* @__PURE__ */ jsx51("div", { "data-slot": "drawer", children }) });
|
|
5716
5831
|
}
|
|
5717
5832
|
function DrawerTrigger({ asChild = false, onClick, ...props }) {
|
|
5718
5833
|
const { setOpen } = useDrawer();
|
|
5719
5834
|
const Comp = asChild ? Slot : "button";
|
|
5720
|
-
return /* @__PURE__ */
|
|
5835
|
+
return /* @__PURE__ */ jsx51(
|
|
5721
5836
|
Comp,
|
|
5722
5837
|
{
|
|
5723
5838
|
"data-slot": "drawer-trigger",
|
|
@@ -5732,7 +5847,7 @@ function DrawerTrigger({ asChild = false, onClick, ...props }) {
|
|
|
5732
5847
|
function DrawerClose({ asChild = false, onClick, ...props }) {
|
|
5733
5848
|
const { setOpen } = useDrawer();
|
|
5734
5849
|
const Comp = asChild ? Slot : "button";
|
|
5735
|
-
return /* @__PURE__ */
|
|
5850
|
+
return /* @__PURE__ */ jsx51(
|
|
5736
5851
|
Comp,
|
|
5737
5852
|
{
|
|
5738
5853
|
"data-slot": "drawer-close",
|
|
@@ -5747,7 +5862,7 @@ function DrawerClose({ asChild = false, onClick, ...props }) {
|
|
|
5747
5862
|
function DrawerOverlay({ className, ...props }) {
|
|
5748
5863
|
const { open, setOpen } = useDrawer();
|
|
5749
5864
|
if (!open) return null;
|
|
5750
|
-
return /* @__PURE__ */
|
|
5865
|
+
return /* @__PURE__ */ jsx51(
|
|
5751
5866
|
"div",
|
|
5752
5867
|
{
|
|
5753
5868
|
"data-slot": "drawer-overlay",
|
|
@@ -5762,8 +5877,8 @@ function DrawerContent({ className, children, ...props }) {
|
|
|
5762
5877
|
const { open, setOpen, direction } = useDrawer();
|
|
5763
5878
|
const scopeRef = useFocusScope(open);
|
|
5764
5879
|
if (!open) return null;
|
|
5765
|
-
return /* @__PURE__ */
|
|
5766
|
-
/* @__PURE__ */
|
|
5880
|
+
return /* @__PURE__ */ jsxs21(Portal, { children: [
|
|
5881
|
+
/* @__PURE__ */ jsx51(
|
|
5767
5882
|
"div",
|
|
5768
5883
|
{
|
|
5769
5884
|
"data-slot": "drawer-overlay",
|
|
@@ -5771,7 +5886,7 @@ function DrawerContent({ className, children, ...props }) {
|
|
|
5771
5886
|
onClick: () => setOpen(false)
|
|
5772
5887
|
}
|
|
5773
5888
|
),
|
|
5774
|
-
/* @__PURE__ */
|
|
5889
|
+
/* @__PURE__ */ jsxs21(
|
|
5775
5890
|
"div",
|
|
5776
5891
|
{
|
|
5777
5892
|
role: "dialog",
|
|
@@ -5786,7 +5901,7 @@ function DrawerContent({ className, children, ...props }) {
|
|
|
5786
5901
|
className: cn(DRAWER_CONTENT_BASE, drawerDirectionClasses[direction], className),
|
|
5787
5902
|
...props,
|
|
5788
5903
|
children: [
|
|
5789
|
-
direction === "bottom" ? /* @__PURE__ */
|
|
5904
|
+
direction === "bottom" ? /* @__PURE__ */ jsx51(
|
|
5790
5905
|
"div",
|
|
5791
5906
|
{
|
|
5792
5907
|
"data-slot": "drawer-handle",
|
|
@@ -5800,7 +5915,7 @@ function DrawerContent({ className, children, ...props }) {
|
|
|
5800
5915
|
] });
|
|
5801
5916
|
}
|
|
5802
5917
|
function DrawerHeader({ className, ...props }) {
|
|
5803
|
-
return /* @__PURE__ */
|
|
5918
|
+
return /* @__PURE__ */ jsx51(
|
|
5804
5919
|
"div",
|
|
5805
5920
|
{
|
|
5806
5921
|
"data-slot": "drawer-header",
|
|
@@ -5810,7 +5925,7 @@ function DrawerHeader({ className, ...props }) {
|
|
|
5810
5925
|
);
|
|
5811
5926
|
}
|
|
5812
5927
|
function DrawerFooter({ className, ...props }) {
|
|
5813
|
-
return /* @__PURE__ */
|
|
5928
|
+
return /* @__PURE__ */ jsx51(
|
|
5814
5929
|
"div",
|
|
5815
5930
|
{
|
|
5816
5931
|
"data-slot": "drawer-footer",
|
|
@@ -5820,7 +5935,7 @@ function DrawerFooter({ className, ...props }) {
|
|
|
5820
5935
|
);
|
|
5821
5936
|
}
|
|
5822
5937
|
function DrawerTitle({ className, ...props }) {
|
|
5823
|
-
return /* @__PURE__ */
|
|
5938
|
+
return /* @__PURE__ */ jsx51(
|
|
5824
5939
|
"div",
|
|
5825
5940
|
{
|
|
5826
5941
|
"data-slot": "drawer-title",
|
|
@@ -5830,7 +5945,7 @@ function DrawerTitle({ className, ...props }) {
|
|
|
5830
5945
|
);
|
|
5831
5946
|
}
|
|
5832
5947
|
function DrawerDescription({ className, ...props }) {
|
|
5833
|
-
return /* @__PURE__ */
|
|
5948
|
+
return /* @__PURE__ */ jsx51(
|
|
5834
5949
|
"div",
|
|
5835
5950
|
{
|
|
5836
5951
|
"data-slot": "drawer-description",
|
|
@@ -5841,11 +5956,11 @@ function DrawerDescription({ className, ...props }) {
|
|
|
5841
5956
|
}
|
|
5842
5957
|
|
|
5843
5958
|
// src/components/select.tsx
|
|
5844
|
-
import * as
|
|
5845
|
-
import { jsx as
|
|
5846
|
-
var SelectContext =
|
|
5959
|
+
import * as React62 from "react";
|
|
5960
|
+
import { jsx as jsx52, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
5961
|
+
var SelectContext = React62.createContext(null);
|
|
5847
5962
|
function useSelect() {
|
|
5848
|
-
const ctx =
|
|
5963
|
+
const ctx = React62.useContext(SelectContext);
|
|
5849
5964
|
if (!ctx) throw new Error("Select parts must be used within <Select>");
|
|
5850
5965
|
return ctx;
|
|
5851
5966
|
}
|
|
@@ -5868,8 +5983,8 @@ function Select({
|
|
|
5868
5983
|
defaultValue: defaultOpen,
|
|
5869
5984
|
...onOpenChange ? { onChange: onOpenChange } : {}
|
|
5870
5985
|
});
|
|
5871
|
-
const anchorRef =
|
|
5872
|
-
return /* @__PURE__ */
|
|
5986
|
+
const anchorRef = React62.useRef(null);
|
|
5987
|
+
return /* @__PURE__ */ jsx52(
|
|
5873
5988
|
SelectContext.Provider,
|
|
5874
5989
|
{
|
|
5875
5990
|
value: { value: currentValue, setValue, open: isOpen, setOpen, anchorRef },
|
|
@@ -5885,7 +6000,7 @@ function SelectTrigger({
|
|
|
5885
6000
|
...props
|
|
5886
6001
|
}) {
|
|
5887
6002
|
const { open, setOpen, anchorRef } = useSelect();
|
|
5888
|
-
return /* @__PURE__ */
|
|
6003
|
+
return /* @__PURE__ */ jsxs22(
|
|
5889
6004
|
"button",
|
|
5890
6005
|
{
|
|
5891
6006
|
type: "button",
|
|
@@ -5906,7 +6021,7 @@ function SelectTrigger({
|
|
|
5906
6021
|
...props,
|
|
5907
6022
|
children: [
|
|
5908
6023
|
children,
|
|
5909
|
-
/* @__PURE__ */
|
|
6024
|
+
/* @__PURE__ */ jsx52(
|
|
5910
6025
|
"svg",
|
|
5911
6026
|
{
|
|
5912
6027
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -5920,7 +6035,7 @@ function SelectTrigger({
|
|
|
5920
6035
|
strokeLinejoin: "round",
|
|
5921
6036
|
className: "size-4 opacity-50",
|
|
5922
6037
|
"aria-hidden": "true",
|
|
5923
|
-
children: /* @__PURE__ */
|
|
6038
|
+
children: /* @__PURE__ */ jsx52("path", { d: "m6 9 6 6 6-6" })
|
|
5924
6039
|
}
|
|
5925
6040
|
)
|
|
5926
6041
|
]
|
|
@@ -5930,7 +6045,7 @@ function SelectTrigger({
|
|
|
5930
6045
|
function SelectValue({ className, placeholder, ...props }) {
|
|
5931
6046
|
const { value } = useSelect();
|
|
5932
6047
|
const isEmpty = value === "";
|
|
5933
|
-
return /* @__PURE__ */
|
|
6048
|
+
return /* @__PURE__ */ jsx52(
|
|
5934
6049
|
"span",
|
|
5935
6050
|
{
|
|
5936
6051
|
"data-slot": "select-value",
|
|
@@ -5963,13 +6078,13 @@ function SelectContent({
|
|
|
5963
6078
|
onDismiss: () => setOpen(false),
|
|
5964
6079
|
exclude: [anchorRef]
|
|
5965
6080
|
});
|
|
5966
|
-
const items =
|
|
6081
|
+
const items = React62.Children.toArray(children).filter(React62.isValidElement);
|
|
5967
6082
|
const { activeIndex, setActiveIndex, onKeyDown } = useRovingFocus({
|
|
5968
6083
|
count: items.length,
|
|
5969
6084
|
orientation: "vertical"
|
|
5970
6085
|
});
|
|
5971
6086
|
if (!isPresent) return null;
|
|
5972
|
-
return /* @__PURE__ */
|
|
6087
|
+
return /* @__PURE__ */ jsx52(Portal, { children: /* @__PURE__ */ jsx52(
|
|
5973
6088
|
"div",
|
|
5974
6089
|
{
|
|
5975
6090
|
role: "listbox",
|
|
@@ -5985,8 +6100,8 @@ function SelectContent({
|
|
|
5985
6100
|
className
|
|
5986
6101
|
),
|
|
5987
6102
|
...props,
|
|
5988
|
-
children: /* @__PURE__ */
|
|
5989
|
-
(child, index) =>
|
|
6103
|
+
children: /* @__PURE__ */ jsx52("div", { className: "p-1", children: items.map(
|
|
6104
|
+
(child, index) => React62.cloneElement(child, {
|
|
5990
6105
|
__index: index,
|
|
5991
6106
|
__active: index === activeIndex,
|
|
5992
6107
|
__setActive: setActiveIndex
|
|
@@ -6006,7 +6121,7 @@ function SelectItem({
|
|
|
6006
6121
|
}) {
|
|
6007
6122
|
const { value: selectedValue, setValue, setOpen } = useSelect();
|
|
6008
6123
|
const selected = selectedValue === value;
|
|
6009
|
-
return /* @__PURE__ */
|
|
6124
|
+
return /* @__PURE__ */ jsxs22(
|
|
6010
6125
|
"div",
|
|
6011
6126
|
{
|
|
6012
6127
|
role: "option",
|
|
@@ -6031,7 +6146,7 @@ function SelectItem({
|
|
|
6031
6146
|
),
|
|
6032
6147
|
...props,
|
|
6033
6148
|
children: [
|
|
6034
|
-
selected ? /* @__PURE__ */
|
|
6149
|
+
selected ? /* @__PURE__ */ jsx52("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx52(
|
|
6035
6150
|
"svg",
|
|
6036
6151
|
{
|
|
6037
6152
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6045,19 +6160,19 @@ function SelectItem({
|
|
|
6045
6160
|
strokeLinejoin: "round",
|
|
6046
6161
|
className: "size-4",
|
|
6047
6162
|
"aria-hidden": "true",
|
|
6048
|
-
children: /* @__PURE__ */
|
|
6163
|
+
children: /* @__PURE__ */ jsx52("path", { d: "M20 6 9 17l-5-5" })
|
|
6049
6164
|
}
|
|
6050
6165
|
) }) : null,
|
|
6051
|
-
/* @__PURE__ */
|
|
6166
|
+
/* @__PURE__ */ jsx52("span", { children })
|
|
6052
6167
|
]
|
|
6053
6168
|
}
|
|
6054
6169
|
);
|
|
6055
6170
|
}
|
|
6056
6171
|
function SelectGroup({ className, ...props }) {
|
|
6057
|
-
return /* @__PURE__ */
|
|
6172
|
+
return /* @__PURE__ */ jsx52("div", { role: "group", "data-slot": "select-group", className, ...props });
|
|
6058
6173
|
}
|
|
6059
6174
|
function SelectLabel({ className, ...props }) {
|
|
6060
|
-
return /* @__PURE__ */
|
|
6175
|
+
return /* @__PURE__ */ jsx52(
|
|
6061
6176
|
"div",
|
|
6062
6177
|
{
|
|
6063
6178
|
"data-slot": "select-label",
|
|
@@ -6067,7 +6182,7 @@ function SelectLabel({ className, ...props }) {
|
|
|
6067
6182
|
);
|
|
6068
6183
|
}
|
|
6069
6184
|
function SelectSeparator({ className, ...props }) {
|
|
6070
|
-
return /* @__PURE__ */
|
|
6185
|
+
return /* @__PURE__ */ jsx52(
|
|
6071
6186
|
"div",
|
|
6072
6187
|
{
|
|
6073
6188
|
"data-slot": "select-separator",
|
|
@@ -6078,7 +6193,7 @@ function SelectSeparator({ className, ...props }) {
|
|
|
6078
6193
|
}
|
|
6079
6194
|
|
|
6080
6195
|
// src/components/command.tsx
|
|
6081
|
-
import * as
|
|
6196
|
+
import * as React63 from "react";
|
|
6082
6197
|
|
|
6083
6198
|
// src/generated/command.ts
|
|
6084
6199
|
var COMMAND_ROOT = "bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md";
|
|
@@ -6095,10 +6210,10 @@ var COMMAND_SEPARATOR = "bg-border -mx-1 h-px";
|
|
|
6095
6210
|
var COMMAND_SHORTCUT = "text-muted-foreground ml-auto text-xs tracking-widest";
|
|
6096
6211
|
|
|
6097
6212
|
// src/components/command.tsx
|
|
6098
|
-
import { jsx as
|
|
6099
|
-
var CommandContext =
|
|
6213
|
+
import { jsx as jsx53, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
6214
|
+
var CommandContext = React63.createContext(null);
|
|
6100
6215
|
function useCommand() {
|
|
6101
|
-
const ctx =
|
|
6216
|
+
const ctx = React63.useContext(CommandContext);
|
|
6102
6217
|
if (!ctx) throw new Error("Command parts must be used within <Command>");
|
|
6103
6218
|
return ctx;
|
|
6104
6219
|
}
|
|
@@ -6115,15 +6230,57 @@ function Command({
|
|
|
6115
6230
|
defaultValue: defaultSearch,
|
|
6116
6231
|
...onSearchChange ? { onChange: onSearchChange } : {}
|
|
6117
6232
|
});
|
|
6118
|
-
|
|
6119
|
-
|
|
6233
|
+
const [items, setItems] = React63.useState(
|
|
6234
|
+
() => /* @__PURE__ */ new Map()
|
|
6235
|
+
);
|
|
6236
|
+
const registerItem = React63.useCallback((id, value) => {
|
|
6237
|
+
setItems((prev) => {
|
|
6238
|
+
if (prev.get(id) === value) return prev;
|
|
6239
|
+
const next = new Map(prev);
|
|
6240
|
+
next.set(id, value);
|
|
6241
|
+
return next;
|
|
6242
|
+
});
|
|
6243
|
+
}, []);
|
|
6244
|
+
const unregisterItem = React63.useCallback((id) => {
|
|
6245
|
+
setItems((prev) => {
|
|
6246
|
+
if (!prev.has(id)) return prev;
|
|
6247
|
+
const next = new Map(prev);
|
|
6248
|
+
next.delete(id);
|
|
6249
|
+
return next;
|
|
6250
|
+
});
|
|
6251
|
+
}, []);
|
|
6252
|
+
const query = currentSearch.trim().toLowerCase();
|
|
6253
|
+
const matches = React63.useCallback(
|
|
6254
|
+
(value) => query === "" || value.toLowerCase().includes(query),
|
|
6255
|
+
[query]
|
|
6256
|
+
);
|
|
6257
|
+
const hasMatches = React63.useMemo(
|
|
6258
|
+
() => [...items.values()].some(matches),
|
|
6259
|
+
[items, matches]
|
|
6260
|
+
);
|
|
6261
|
+
return /* @__PURE__ */ jsx53(
|
|
6262
|
+
CommandContext.Provider,
|
|
6120
6263
|
{
|
|
6121
|
-
|
|
6122
|
-
|
|
6123
|
-
|
|
6124
|
-
|
|
6264
|
+
value: {
|
|
6265
|
+
search: currentSearch,
|
|
6266
|
+
setSearch,
|
|
6267
|
+
registerItem,
|
|
6268
|
+
unregisterItem,
|
|
6269
|
+
query,
|
|
6270
|
+
matches,
|
|
6271
|
+
hasMatches
|
|
6272
|
+
},
|
|
6273
|
+
children: /* @__PURE__ */ jsx53(
|
|
6274
|
+
"div",
|
|
6275
|
+
{
|
|
6276
|
+
"data-slot": "command",
|
|
6277
|
+
className: cn(COMMAND_ROOT, className),
|
|
6278
|
+
...props,
|
|
6279
|
+
children
|
|
6280
|
+
}
|
|
6281
|
+
)
|
|
6125
6282
|
}
|
|
6126
|
-
)
|
|
6283
|
+
);
|
|
6127
6284
|
}
|
|
6128
6285
|
function CommandDialog({
|
|
6129
6286
|
open,
|
|
@@ -6139,8 +6296,8 @@ function CommandDialog({
|
|
|
6139
6296
|
});
|
|
6140
6297
|
const scopeRef = useFocusScope(isOpen);
|
|
6141
6298
|
if (!isOpen) return null;
|
|
6142
|
-
return /* @__PURE__ */
|
|
6143
|
-
/* @__PURE__ */
|
|
6299
|
+
return /* @__PURE__ */ jsxs23(Portal, { children: [
|
|
6300
|
+
/* @__PURE__ */ jsx53(
|
|
6144
6301
|
"div",
|
|
6145
6302
|
{
|
|
6146
6303
|
"data-slot": "command-overlay",
|
|
@@ -6148,7 +6305,7 @@ function CommandDialog({
|
|
|
6148
6305
|
onClick: () => setOpen(false)
|
|
6149
6306
|
}
|
|
6150
6307
|
),
|
|
6151
|
-
/* @__PURE__ */
|
|
6308
|
+
/* @__PURE__ */ jsx53(
|
|
6152
6309
|
"div",
|
|
6153
6310
|
{
|
|
6154
6311
|
role: "dialog",
|
|
@@ -6159,7 +6316,7 @@ function CommandDialog({
|
|
|
6159
6316
|
if (e.key === "Escape") setOpen(false);
|
|
6160
6317
|
},
|
|
6161
6318
|
className: cn(COMMAND_DIALOG_CONTENT, className),
|
|
6162
|
-
children: /* @__PURE__ */
|
|
6319
|
+
children: /* @__PURE__ */ jsx53(Command, { className: COMMAND_DIALOG_COMMAND, children })
|
|
6163
6320
|
}
|
|
6164
6321
|
)
|
|
6165
6322
|
] });
|
|
@@ -6169,8 +6326,8 @@ function CommandInput({
|
|
|
6169
6326
|
...props
|
|
6170
6327
|
}) {
|
|
6171
6328
|
const { search, setSearch } = useCommand();
|
|
6172
|
-
return /* @__PURE__ */
|
|
6173
|
-
/* @__PURE__ */
|
|
6329
|
+
return /* @__PURE__ */ jsxs23("div", { className: COMMAND_INPUT_WRAPPER, "data-slot": "command-input-wrapper", children: [
|
|
6330
|
+
/* @__PURE__ */ jsxs23(
|
|
6174
6331
|
"svg",
|
|
6175
6332
|
{
|
|
6176
6333
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6185,12 +6342,12 @@ function CommandInput({
|
|
|
6185
6342
|
className: "size-4 shrink-0 opacity-50",
|
|
6186
6343
|
"aria-hidden": "true",
|
|
6187
6344
|
children: [
|
|
6188
|
-
/* @__PURE__ */
|
|
6189
|
-
/* @__PURE__ */
|
|
6345
|
+
/* @__PURE__ */ jsx53("circle", { cx: "11", cy: "11", r: "8" }),
|
|
6346
|
+
/* @__PURE__ */ jsx53("path", { d: "m21 21-4.3-4.3" })
|
|
6190
6347
|
]
|
|
6191
6348
|
}
|
|
6192
6349
|
),
|
|
6193
|
-
/* @__PURE__ */
|
|
6350
|
+
/* @__PURE__ */ jsx53(
|
|
6194
6351
|
"input",
|
|
6195
6352
|
{
|
|
6196
6353
|
type: "text",
|
|
@@ -6205,7 +6362,7 @@ function CommandInput({
|
|
|
6205
6362
|
] });
|
|
6206
6363
|
}
|
|
6207
6364
|
function CommandList({ className, ...props }) {
|
|
6208
|
-
return /* @__PURE__ */
|
|
6365
|
+
return /* @__PURE__ */ jsx53(
|
|
6209
6366
|
"div",
|
|
6210
6367
|
{
|
|
6211
6368
|
role: "listbox",
|
|
@@ -6216,10 +6373,9 @@ function CommandList({ className, ...props }) {
|
|
|
6216
6373
|
);
|
|
6217
6374
|
}
|
|
6218
6375
|
function CommandEmpty({ className, children, ...props }) {
|
|
6219
|
-
const {
|
|
6220
|
-
|
|
6221
|
-
|
|
6222
|
-
return /* @__PURE__ */ jsx52(
|
|
6376
|
+
const { query, hasMatches } = useCommand();
|
|
6377
|
+
if (query === "" || hasMatches) return null;
|
|
6378
|
+
return /* @__PURE__ */ jsx53(
|
|
6223
6379
|
"div",
|
|
6224
6380
|
{
|
|
6225
6381
|
"data-slot": "command-empty",
|
|
@@ -6230,7 +6386,7 @@ function CommandEmpty({ className, children, ...props }) {
|
|
|
6230
6386
|
);
|
|
6231
6387
|
}
|
|
6232
6388
|
function CommandGroup({ className, heading, children, ...props }) {
|
|
6233
|
-
return /* @__PURE__ */
|
|
6389
|
+
return /* @__PURE__ */ jsxs23(
|
|
6234
6390
|
"div",
|
|
6235
6391
|
{
|
|
6236
6392
|
role: "group",
|
|
@@ -6238,7 +6394,7 @@ function CommandGroup({ className, heading, children, ...props }) {
|
|
|
6238
6394
|
className: cn(COMMAND_GROUP, className),
|
|
6239
6395
|
...props,
|
|
6240
6396
|
children: [
|
|
6241
|
-
heading ? /* @__PURE__ */
|
|
6397
|
+
heading ? /* @__PURE__ */ jsx53("div", { "data-slot": "command-group-heading", children: heading }) : null,
|
|
6242
6398
|
children
|
|
6243
6399
|
]
|
|
6244
6400
|
}
|
|
@@ -6252,10 +6408,14 @@ function CommandItem({
|
|
|
6252
6408
|
children,
|
|
6253
6409
|
...props
|
|
6254
6410
|
}) {
|
|
6255
|
-
const {
|
|
6256
|
-
const
|
|
6257
|
-
|
|
6258
|
-
|
|
6411
|
+
const { registerItem, unregisterItem, matches } = useCommand();
|
|
6412
|
+
const id = React63.useId();
|
|
6413
|
+
React63.useEffect(() => {
|
|
6414
|
+
registerItem(id, value);
|
|
6415
|
+
return () => unregisterItem(id);
|
|
6416
|
+
}, [id, value, registerItem, unregisterItem]);
|
|
6417
|
+
if (!matches(value)) return null;
|
|
6418
|
+
return /* @__PURE__ */ jsx53(
|
|
6259
6419
|
"div",
|
|
6260
6420
|
{
|
|
6261
6421
|
role: "option",
|
|
@@ -6273,7 +6433,7 @@ function CommandItem({
|
|
|
6273
6433
|
);
|
|
6274
6434
|
}
|
|
6275
6435
|
function CommandSeparator({ className, ...props }) {
|
|
6276
|
-
return /* @__PURE__ */
|
|
6436
|
+
return /* @__PURE__ */ jsx53(
|
|
6277
6437
|
"div",
|
|
6278
6438
|
{
|
|
6279
6439
|
"data-slot": "command-separator",
|
|
@@ -6283,7 +6443,7 @@ function CommandSeparator({ className, ...props }) {
|
|
|
6283
6443
|
);
|
|
6284
6444
|
}
|
|
6285
6445
|
function CommandShortcut({ className, ...props }) {
|
|
6286
|
-
return /* @__PURE__ */
|
|
6446
|
+
return /* @__PURE__ */ jsx53(
|
|
6287
6447
|
"span",
|
|
6288
6448
|
{
|
|
6289
6449
|
"data-slot": "command-shortcut",
|
|
@@ -6294,7 +6454,7 @@ function CommandShortcut({ className, ...props }) {
|
|
|
6294
6454
|
}
|
|
6295
6455
|
|
|
6296
6456
|
// src/components/chart.tsx
|
|
6297
|
-
import * as
|
|
6457
|
+
import * as React64 from "react";
|
|
6298
6458
|
|
|
6299
6459
|
// src/generated/chart.ts
|
|
6300
6460
|
var CHART_CONTAINER = "flex aspect-video justify-center text-xs [&_.recharts-layer]:outline-hidden [&_.recharts-surface]:outline-hidden [&_svg]:outline-hidden";
|
|
@@ -6302,10 +6462,10 @@ var CHART_TOOLTIP = "border-border/50 bg-background grid min-w-[8rem] items-star
|
|
|
6302
6462
|
var CHART_LEGEND = "flex items-center justify-center gap-4";
|
|
6303
6463
|
|
|
6304
6464
|
// src/components/chart.tsx
|
|
6305
|
-
import { Fragment as
|
|
6306
|
-
var ChartContext =
|
|
6465
|
+
import { Fragment as Fragment7, jsx as jsx54, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
6466
|
+
var ChartContext = React64.createContext(null);
|
|
6307
6467
|
function useChart() {
|
|
6308
|
-
const context =
|
|
6468
|
+
const context = React64.useContext(ChartContext);
|
|
6309
6469
|
if (!context) {
|
|
6310
6470
|
throw new Error("useChart must be used within a <ChartContainer />");
|
|
6311
6471
|
}
|
|
@@ -6318,9 +6478,9 @@ function ChartContainer({
|
|
|
6318
6478
|
config,
|
|
6319
6479
|
...props
|
|
6320
6480
|
}) {
|
|
6321
|
-
const uniqueId =
|
|
6481
|
+
const uniqueId = React64.useId();
|
|
6322
6482
|
const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
|
|
6323
|
-
return /* @__PURE__ */
|
|
6483
|
+
return /* @__PURE__ */ jsx54(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxs24(
|
|
6324
6484
|
"div",
|
|
6325
6485
|
{
|
|
6326
6486
|
"data-slot": "chart",
|
|
@@ -6328,7 +6488,7 @@ function ChartContainer({
|
|
|
6328
6488
|
className: cn(CHART_CONTAINER, className),
|
|
6329
6489
|
...props,
|
|
6330
6490
|
children: [
|
|
6331
|
-
/* @__PURE__ */
|
|
6491
|
+
/* @__PURE__ */ jsx54(ChartStyle, { id: chartId, config }),
|
|
6332
6492
|
children
|
|
6333
6493
|
]
|
|
6334
6494
|
}
|
|
@@ -6339,7 +6499,7 @@ var ChartStyle = ({ id, config }) => {
|
|
|
6339
6499
|
if (!colorConfig.length) {
|
|
6340
6500
|
return null;
|
|
6341
6501
|
}
|
|
6342
|
-
return /* @__PURE__ */
|
|
6502
|
+
return /* @__PURE__ */ jsx54(
|
|
6343
6503
|
"style",
|
|
6344
6504
|
{
|
|
6345
6505
|
dangerouslySetInnerHTML: {
|
|
@@ -6350,7 +6510,7 @@ ${colorConfig.map(([key, itemConfig]) => ` --color-${key}: ${itemConfig.color};
|
|
|
6350
6510
|
}
|
|
6351
6511
|
);
|
|
6352
6512
|
};
|
|
6353
|
-
var ChartTooltip = ({ children }) => /* @__PURE__ */
|
|
6513
|
+
var ChartTooltip = ({ children }) => /* @__PURE__ */ jsx54(Fragment7, { children });
|
|
6354
6514
|
function ChartTooltipContent({
|
|
6355
6515
|
className,
|
|
6356
6516
|
items = [],
|
|
@@ -6363,21 +6523,21 @@ function ChartTooltipContent({
|
|
|
6363
6523
|
if (!items.length) {
|
|
6364
6524
|
return null;
|
|
6365
6525
|
}
|
|
6366
|
-
return /* @__PURE__ */
|
|
6526
|
+
return /* @__PURE__ */ jsxs24(
|
|
6367
6527
|
"div",
|
|
6368
6528
|
{
|
|
6369
6529
|
"data-slot": "chart-tooltip",
|
|
6370
6530
|
className: cn(CHART_TOOLTIP, className),
|
|
6371
6531
|
children: [
|
|
6372
|
-
!hideLabel && label ? /* @__PURE__ */
|
|
6373
|
-
/* @__PURE__ */
|
|
6532
|
+
!hideLabel && label ? /* @__PURE__ */ jsx54("div", { className: cn("font-medium", labelClassName), children: label }) : null,
|
|
6533
|
+
/* @__PURE__ */ jsx54("div", { className: "grid gap-1.5", children: items.map((item, index) => /* @__PURE__ */ jsxs24(
|
|
6374
6534
|
"div",
|
|
6375
6535
|
{
|
|
6376
6536
|
className: cn(
|
|
6377
6537
|
"[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 items-center"
|
|
6378
6538
|
),
|
|
6379
6539
|
children: [
|
|
6380
|
-
!hideIndicator && /* @__PURE__ */
|
|
6540
|
+
!hideIndicator && /* @__PURE__ */ jsx54(
|
|
6381
6541
|
"div",
|
|
6382
6542
|
{
|
|
6383
6543
|
className: "shrink-0 rounded-[2px] h-2.5 w-2.5",
|
|
@@ -6387,9 +6547,9 @@ function ChartTooltipContent({
|
|
|
6387
6547
|
}
|
|
6388
6548
|
}
|
|
6389
6549
|
),
|
|
6390
|
-
/* @__PURE__ */
|
|
6391
|
-
/* @__PURE__ */
|
|
6392
|
-
item.value !== void 0 && /* @__PURE__ */
|
|
6550
|
+
/* @__PURE__ */ jsxs24("div", { className: "flex flex-1 justify-between leading-none items-center", children: [
|
|
6551
|
+
/* @__PURE__ */ jsx54("span", { className: "text-muted-foreground", children: item.label }),
|
|
6552
|
+
item.value !== void 0 && /* @__PURE__ */ jsx54("span", { className: "text-foreground font-mono font-medium tabular-nums", children: item.value })
|
|
6393
6553
|
] })
|
|
6394
6554
|
]
|
|
6395
6555
|
},
|
|
@@ -6399,7 +6559,7 @@ function ChartTooltipContent({
|
|
|
6399
6559
|
}
|
|
6400
6560
|
);
|
|
6401
6561
|
}
|
|
6402
|
-
var ChartLegend = ({ children }) => /* @__PURE__ */
|
|
6562
|
+
var ChartLegend = ({ children }) => /* @__PURE__ */ jsx54(Fragment7, { children });
|
|
6403
6563
|
function ChartLegendContent({
|
|
6404
6564
|
className,
|
|
6405
6565
|
hideIcon = false,
|
|
@@ -6413,19 +6573,19 @@ function ChartLegendContent({
|
|
|
6413
6573
|
if (!rows.length) {
|
|
6414
6574
|
return null;
|
|
6415
6575
|
}
|
|
6416
|
-
return /* @__PURE__ */
|
|
6576
|
+
return /* @__PURE__ */ jsx54(
|
|
6417
6577
|
"div",
|
|
6418
6578
|
{
|
|
6419
6579
|
"data-slot": "chart-legend",
|
|
6420
6580
|
className: cn(CHART_LEGEND, className),
|
|
6421
|
-
children: rows.map((item, index) => /* @__PURE__ */
|
|
6581
|
+
children: rows.map((item, index) => /* @__PURE__ */ jsxs24(
|
|
6422
6582
|
"div",
|
|
6423
6583
|
{
|
|
6424
6584
|
className: cn(
|
|
6425
6585
|
"[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"
|
|
6426
6586
|
),
|
|
6427
6587
|
children: [
|
|
6428
|
-
!hideIcon && /* @__PURE__ */
|
|
6588
|
+
!hideIcon && /* @__PURE__ */ jsx54(
|
|
6429
6589
|
"div",
|
|
6430
6590
|
{
|
|
6431
6591
|
className: "h-2 w-2 shrink-0 rounded-[2px]",
|
|
@@ -6442,7 +6602,7 @@ function ChartLegendContent({
|
|
|
6442
6602
|
}
|
|
6443
6603
|
|
|
6444
6604
|
// src/components/calendar.tsx
|
|
6445
|
-
import * as
|
|
6605
|
+
import * as React65 from "react";
|
|
6446
6606
|
|
|
6447
6607
|
// src/generated/calendar.ts
|
|
6448
6608
|
var CALENDAR_ROOT = "bg-background p-3 w-fit";
|
|
@@ -6460,7 +6620,7 @@ var CALENDAR_DAY_SELECTED = "bg-primary text-primary-foreground";
|
|
|
6460
6620
|
var CALENDAR_DAY_TODAY = "bg-accent text-accent-foreground rounded-md";
|
|
6461
6621
|
|
|
6462
6622
|
// src/components/calendar.tsx
|
|
6463
|
-
import { jsx as
|
|
6623
|
+
import { jsx as jsx55, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
6464
6624
|
var MONTHS = [
|
|
6465
6625
|
"January",
|
|
6466
6626
|
"February",
|
|
@@ -6479,7 +6639,7 @@ var WEEKDAYS = ["Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"];
|
|
|
6479
6639
|
var CHEVRON_LEFT = "m15 18-6-6 6-6";
|
|
6480
6640
|
var CHEVRON_RIGHT = "m9 18 6-6-6-6";
|
|
6481
6641
|
function Chevron({ d }) {
|
|
6482
|
-
return /* @__PURE__ */
|
|
6642
|
+
return /* @__PURE__ */ jsx55(
|
|
6483
6643
|
"svg",
|
|
6484
6644
|
{
|
|
6485
6645
|
className: "size-4",
|
|
@@ -6493,7 +6653,7 @@ function Chevron({ d }) {
|
|
|
6493
6653
|
strokeLinecap: "round",
|
|
6494
6654
|
strokeLinejoin: "round",
|
|
6495
6655
|
"aria-hidden": true,
|
|
6496
|
-
children: /* @__PURE__ */
|
|
6656
|
+
children: /* @__PURE__ */ jsx55("path", { d })
|
|
6497
6657
|
}
|
|
6498
6658
|
);
|
|
6499
6659
|
}
|
|
@@ -6515,7 +6675,7 @@ function Calendar({
|
|
|
6515
6675
|
today = /* @__PURE__ */ new Date(),
|
|
6516
6676
|
className
|
|
6517
6677
|
}) {
|
|
6518
|
-
const [internal, setInternal] =
|
|
6678
|
+
const [internal, setInternal] = React65.useState(
|
|
6519
6679
|
() => startOfMonth(defaultMonth ?? /* @__PURE__ */ new Date())
|
|
6520
6680
|
);
|
|
6521
6681
|
const view = month ? startOfMonth(month) : internal;
|
|
@@ -6540,38 +6700,38 @@ function Calendar({
|
|
|
6540
6700
|
size: "icon",
|
|
6541
6701
|
className: CALENDAR_NAV_BUTTON
|
|
6542
6702
|
});
|
|
6543
|
-
return /* @__PURE__ */
|
|
6703
|
+
return /* @__PURE__ */ jsxs25(
|
|
6544
6704
|
"div",
|
|
6545
6705
|
{
|
|
6546
6706
|
"data-slot": "calendar",
|
|
6547
6707
|
role: "application",
|
|
6548
6708
|
className: cn(CALENDAR_ROOT, className),
|
|
6549
6709
|
children: [
|
|
6550
|
-
/* @__PURE__ */
|
|
6551
|
-
/* @__PURE__ */
|
|
6710
|
+
/* @__PURE__ */ jsxs25("div", { className: CALENDAR_NAV, children: [
|
|
6711
|
+
/* @__PURE__ */ jsx55(
|
|
6552
6712
|
"button",
|
|
6553
6713
|
{
|
|
6554
6714
|
type: "button",
|
|
6555
6715
|
className: navClass,
|
|
6556
6716
|
"aria-label": "Previous month",
|
|
6557
6717
|
onClick: () => go(-1),
|
|
6558
|
-
children: /* @__PURE__ */
|
|
6718
|
+
children: /* @__PURE__ */ jsx55(Chevron, { d: CHEVRON_LEFT })
|
|
6559
6719
|
}
|
|
6560
6720
|
),
|
|
6561
|
-
/* @__PURE__ */
|
|
6562
|
-
/* @__PURE__ */
|
|
6721
|
+
/* @__PURE__ */ jsx55("div", { className: CALENDAR_CAPTION, children: caption }),
|
|
6722
|
+
/* @__PURE__ */ jsx55(
|
|
6563
6723
|
"button",
|
|
6564
6724
|
{
|
|
6565
6725
|
type: "button",
|
|
6566
6726
|
className: navClass,
|
|
6567
6727
|
"aria-label": "Next month",
|
|
6568
6728
|
onClick: () => go(1),
|
|
6569
|
-
children: /* @__PURE__ */
|
|
6729
|
+
children: /* @__PURE__ */ jsx55(Chevron, { d: CHEVRON_RIGHT })
|
|
6570
6730
|
}
|
|
6571
6731
|
)
|
|
6572
6732
|
] }),
|
|
6573
|
-
/* @__PURE__ */
|
|
6574
|
-
/* @__PURE__ */
|
|
6733
|
+
/* @__PURE__ */ jsxs25("table", { className: CALENDAR_GRID, role: "grid", children: [
|
|
6734
|
+
/* @__PURE__ */ jsx55("thead", { children: /* @__PURE__ */ jsx55("tr", { className: CALENDAR_WEEKDAY_ROW, children: WEEKDAYS.map((wd) => /* @__PURE__ */ jsx55(
|
|
6575
6735
|
"th",
|
|
6576
6736
|
{
|
|
6577
6737
|
scope: "col",
|
|
@@ -6580,9 +6740,9 @@ function Calendar({
|
|
|
6580
6740
|
},
|
|
6581
6741
|
wd
|
|
6582
6742
|
)) }) }),
|
|
6583
|
-
/* @__PURE__ */
|
|
6743
|
+
/* @__PURE__ */ jsx55("tbody", { children: weeks.map((week, wi) => /* @__PURE__ */ jsx55("tr", { className: CALENDAR_WEEK, children: week.map((cell, ci) => {
|
|
6584
6744
|
if (cell === null) {
|
|
6585
|
-
return /* @__PURE__ */
|
|
6745
|
+
return /* @__PURE__ */ jsx55(
|
|
6586
6746
|
"td",
|
|
6587
6747
|
{
|
|
6588
6748
|
className: CALENDAR_DAY_EMPTY
|
|
@@ -6593,13 +6753,13 @@ function Calendar({
|
|
|
6593
6753
|
const date = new Date(year, monthIndex, cell);
|
|
6594
6754
|
const isSelected = sameDay(selected, date);
|
|
6595
6755
|
const isToday = sameDay(today, date);
|
|
6596
|
-
return /* @__PURE__ */
|
|
6756
|
+
return /* @__PURE__ */ jsx55(
|
|
6597
6757
|
"td",
|
|
6598
6758
|
{
|
|
6599
6759
|
role: "gridcell",
|
|
6600
6760
|
"aria-selected": isSelected,
|
|
6601
6761
|
className: CALENDAR_DAY_CELL,
|
|
6602
|
-
children: /* @__PURE__ */
|
|
6762
|
+
children: /* @__PURE__ */ jsx55(
|
|
6603
6763
|
"button",
|
|
6604
6764
|
{
|
|
6605
6765
|
type: "button",
|
|
@@ -6629,7 +6789,7 @@ function Calendar({
|
|
|
6629
6789
|
}
|
|
6630
6790
|
|
|
6631
6791
|
// src/components/sonner.tsx
|
|
6632
|
-
import * as
|
|
6792
|
+
import * as React66 from "react";
|
|
6633
6793
|
|
|
6634
6794
|
// src/generated/sonner.ts
|
|
6635
6795
|
var TOAST_BASE = "pointer-events-auto flex w-full items-start gap-3 rounded-md border p-4 text-sm shadow-lg";
|
|
@@ -6654,7 +6814,7 @@ var TOAST_CONTENT = "flex-1 space-y-1";
|
|
|
6654
6814
|
var TOAST_TITLE = "font-medium";
|
|
6655
6815
|
|
|
6656
6816
|
// src/components/sonner.tsx
|
|
6657
|
-
import { jsx as
|
|
6817
|
+
import { jsx as jsx56, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
6658
6818
|
var DEFAULT_DURATION = 4e3;
|
|
6659
6819
|
var SWIPE_THRESHOLD = 45;
|
|
6660
6820
|
var SWIPE_VELOCITY = 0.11;
|
|
@@ -6719,17 +6879,17 @@ function ToastItem({
|
|
|
6719
6879
|
reportHeight,
|
|
6720
6880
|
removeHeight
|
|
6721
6881
|
}) {
|
|
6722
|
-
const ref =
|
|
6723
|
-
const [height, setHeight] =
|
|
6724
|
-
const remainingRef =
|
|
6725
|
-
const startedRef =
|
|
6726
|
-
const flingRef =
|
|
6882
|
+
const ref = React66.useRef(null);
|
|
6883
|
+
const [height, setHeight] = React66.useState(0);
|
|
6884
|
+
const remainingRef = React66.useRef(t.duration);
|
|
6885
|
+
const startedRef = React66.useRef(0);
|
|
6886
|
+
const flingRef = React66.useRef(
|
|
6727
6887
|
void 0
|
|
6728
6888
|
);
|
|
6729
|
-
const dragRef =
|
|
6889
|
+
const dragRef = React66.useRef(
|
|
6730
6890
|
null
|
|
6731
6891
|
);
|
|
6732
|
-
|
|
6892
|
+
React66.useLayoutEffect(() => {
|
|
6733
6893
|
const el = ref.current;
|
|
6734
6894
|
if (!el) return;
|
|
6735
6895
|
el.style.height = "auto";
|
|
@@ -6740,8 +6900,12 @@ function ToastItem({
|
|
|
6740
6900
|
reportHeight(t.id, h);
|
|
6741
6901
|
}
|
|
6742
6902
|
}, [t.id, t.message, t.description, reportHeight]);
|
|
6743
|
-
|
|
6744
|
-
|
|
6903
|
+
React66.useEffect(() => () => removeHeight(t.id), [t.id, removeHeight]);
|
|
6904
|
+
const mountedClosing = React66.useRef(t.state === "closing");
|
|
6905
|
+
React66.useEffect(() => {
|
|
6906
|
+
if (mountedClosing.current) store.remove(t.id);
|
|
6907
|
+
}, [t.id]);
|
|
6908
|
+
React66.useEffect(() => {
|
|
6745
6909
|
if (t.duration === Infinity || t.state === "closing" || paused) return;
|
|
6746
6910
|
startedRef.current = Date.now();
|
|
6747
6911
|
const id = setTimeout(() => store.dismiss(t.id), remainingRef.current);
|
|
@@ -6753,7 +6917,7 @@ function ToastItem({
|
|
|
6753
6917
|
);
|
|
6754
6918
|
};
|
|
6755
6919
|
}, [paused, t.id, t.duration, t.state]);
|
|
6756
|
-
|
|
6920
|
+
React66.useEffect(
|
|
6757
6921
|
() => () => {
|
|
6758
6922
|
if (flingRef.current) clearTimeout(flingRef.current);
|
|
6759
6923
|
},
|
|
@@ -6812,7 +6976,7 @@ function ToastItem({
|
|
|
6812
6976
|
);
|
|
6813
6977
|
}
|
|
6814
6978
|
};
|
|
6815
|
-
return /* @__PURE__ */
|
|
6979
|
+
return /* @__PURE__ */ jsxs26(
|
|
6816
6980
|
"li",
|
|
6817
6981
|
{
|
|
6818
6982
|
ref,
|
|
@@ -6840,11 +7004,11 @@ function ToastItem({
|
|
|
6840
7004
|
toastVariantClasses[t.variant]
|
|
6841
7005
|
),
|
|
6842
7006
|
children: [
|
|
6843
|
-
/* @__PURE__ */
|
|
6844
|
-
/* @__PURE__ */
|
|
6845
|
-
t.description ? /* @__PURE__ */
|
|
7007
|
+
/* @__PURE__ */ jsxs26("div", { className: TOAST_CONTENT, children: [
|
|
7008
|
+
/* @__PURE__ */ jsx56("div", { className: TOAST_TITLE, children: t.message }),
|
|
7009
|
+
t.description ? /* @__PURE__ */ jsx56("div", { className: "text-muted-foreground text-sm", children: t.description }) : null
|
|
6846
7010
|
] }),
|
|
6847
|
-
/* @__PURE__ */
|
|
7011
|
+
/* @__PURE__ */ jsx56(
|
|
6848
7012
|
"button",
|
|
6849
7013
|
{
|
|
6850
7014
|
type: "button",
|
|
@@ -6852,7 +7016,7 @@ function ToastItem({
|
|
|
6852
7016
|
"data-slot": "toast-close",
|
|
6853
7017
|
onClick: () => store.dismiss(t.id),
|
|
6854
7018
|
className: TOAST_CLOSE,
|
|
6855
|
-
children: /* @__PURE__ */
|
|
7019
|
+
children: /* @__PURE__ */ jsx56(
|
|
6856
7020
|
"svg",
|
|
6857
7021
|
{
|
|
6858
7022
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6865,7 +7029,7 @@ function ToastItem({
|
|
|
6865
7029
|
strokeLinecap: "round",
|
|
6866
7030
|
strokeLinejoin: "round",
|
|
6867
7031
|
"aria-hidden": "true",
|
|
6868
|
-
children: /* @__PURE__ */
|
|
7032
|
+
children: /* @__PURE__ */ jsx56("path", { d: "M18 6 6 18M6 6l12 12" })
|
|
6869
7033
|
}
|
|
6870
7034
|
)
|
|
6871
7035
|
}
|
|
@@ -6879,17 +7043,17 @@ function Toaster({
|
|
|
6879
7043
|
className,
|
|
6880
7044
|
...props
|
|
6881
7045
|
}) {
|
|
6882
|
-
const [toasts, setToasts] =
|
|
6883
|
-
const [heights, setHeights] =
|
|
6884
|
-
const [paused, setPaused] =
|
|
6885
|
-
|
|
7046
|
+
const [toasts, setToasts] = React66.useState([]);
|
|
7047
|
+
const [heights, setHeights] = React66.useState(/* @__PURE__ */ new Map());
|
|
7048
|
+
const [paused, setPaused] = React66.useState(false);
|
|
7049
|
+
React66.useEffect(() => store.subscribe(setToasts), []);
|
|
6886
7050
|
const onEnter = () => setPaused(true);
|
|
6887
7051
|
const onLeave = (e) => {
|
|
6888
7052
|
if (!e.currentTarget.contains(e.relatedTarget)) {
|
|
6889
7053
|
setPaused(false);
|
|
6890
7054
|
}
|
|
6891
7055
|
};
|
|
6892
|
-
const reportHeight =
|
|
7056
|
+
const reportHeight = React66.useCallback((id, h) => {
|
|
6893
7057
|
setHeights((prev) => {
|
|
6894
7058
|
if (prev.get(id) === h) return prev;
|
|
6895
7059
|
const next = new Map(prev);
|
|
@@ -6897,7 +7061,7 @@ function Toaster({
|
|
|
6897
7061
|
return next;
|
|
6898
7062
|
});
|
|
6899
7063
|
}, []);
|
|
6900
|
-
const removeHeight =
|
|
7064
|
+
const removeHeight = React66.useCallback((id) => {
|
|
6901
7065
|
setHeights((prev) => {
|
|
6902
7066
|
if (!prev.has(id)) return prev;
|
|
6903
7067
|
const next = new Map(prev);
|
|
@@ -6915,7 +7079,7 @@ function Toaster({
|
|
|
6915
7079
|
sum += heights.get(t.id) ?? 0;
|
|
6916
7080
|
return o;
|
|
6917
7081
|
});
|
|
6918
|
-
return /* @__PURE__ */
|
|
7082
|
+
return /* @__PURE__ */ jsx56(
|
|
6919
7083
|
"ol",
|
|
6920
7084
|
{
|
|
6921
7085
|
"data-slot": "toaster",
|
|
@@ -6936,7 +7100,7 @@ function Toaster({
|
|
|
6936
7100
|
onPointerOut: onLeave,
|
|
6937
7101
|
onFocus: onEnter,
|
|
6938
7102
|
onBlur: onLeave,
|
|
6939
|
-
children: ordered.map((t, i) => /* @__PURE__ */
|
|
7103
|
+
children: ordered.map((t, i) => /* @__PURE__ */ jsx56(
|
|
6940
7104
|
ToastItem,
|
|
6941
7105
|
{
|
|
6942
7106
|
toast: t,
|
|
@@ -6954,7 +7118,7 @@ function Toaster({
|
|
|
6954
7118
|
}
|
|
6955
7119
|
|
|
6956
7120
|
// src/components/form.tsx
|
|
6957
|
-
import * as
|
|
7121
|
+
import * as React67 from "react";
|
|
6958
7122
|
|
|
6959
7123
|
// src/generated/form.ts
|
|
6960
7124
|
var FORM_ITEM = "grid gap-2";
|
|
@@ -6962,21 +7126,21 @@ var FORM_DESCRIPTION = "text-muted-foreground text-sm";
|
|
|
6962
7126
|
var FORM_MESSAGE = "text-destructive text-sm";
|
|
6963
7127
|
|
|
6964
7128
|
// src/components/form.tsx
|
|
6965
|
-
import { jsx as
|
|
6966
|
-
var FormItemContext =
|
|
7129
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
7130
|
+
var FormItemContext = React67.createContext(null);
|
|
6967
7131
|
function useFormItem() {
|
|
6968
|
-
const ctx =
|
|
7132
|
+
const ctx = React67.useContext(FormItemContext);
|
|
6969
7133
|
if (!ctx) {
|
|
6970
7134
|
throw new Error("Form parts must be used within <FormItem>");
|
|
6971
7135
|
}
|
|
6972
7136
|
return ctx;
|
|
6973
7137
|
}
|
|
6974
7138
|
function Form({ ...props }) {
|
|
6975
|
-
return /* @__PURE__ */
|
|
7139
|
+
return /* @__PURE__ */ jsx57("form", { "data-slot": "form", ...props });
|
|
6976
7140
|
}
|
|
6977
7141
|
function FormItem({ className, ...props }) {
|
|
6978
|
-
const id =
|
|
6979
|
-
const value =
|
|
7142
|
+
const id = React67.useId();
|
|
7143
|
+
const value = React67.useMemo(
|
|
6980
7144
|
() => ({
|
|
6981
7145
|
id,
|
|
6982
7146
|
formItemId: `${id}-form-item`,
|
|
@@ -6985,7 +7149,7 @@ function FormItem({ className, ...props }) {
|
|
|
6985
7149
|
}),
|
|
6986
7150
|
[id]
|
|
6987
7151
|
);
|
|
6988
|
-
return /* @__PURE__ */
|
|
7152
|
+
return /* @__PURE__ */ jsx57(FormItemContext.Provider, { value, children: /* @__PURE__ */ jsx57("div", { "data-slot": "form-item", className: cn(FORM_ITEM, className), ...props }) });
|
|
6989
7153
|
}
|
|
6990
7154
|
function FormLabel({
|
|
6991
7155
|
className,
|
|
@@ -6993,7 +7157,7 @@ function FormLabel({
|
|
|
6993
7157
|
...props
|
|
6994
7158
|
}) {
|
|
6995
7159
|
const { formItemId } = useFormItem();
|
|
6996
|
-
return /* @__PURE__ */
|
|
7160
|
+
return /* @__PURE__ */ jsx57(
|
|
6997
7161
|
Label,
|
|
6998
7162
|
{
|
|
6999
7163
|
"data-slot": "form-label",
|
|
@@ -7009,7 +7173,7 @@ function FormControl({
|
|
|
7009
7173
|
...props
|
|
7010
7174
|
}) {
|
|
7011
7175
|
const { formItemId, formDescriptionId, formMessageId } = useFormItem();
|
|
7012
|
-
return /* @__PURE__ */
|
|
7176
|
+
return /* @__PURE__ */ jsx57(
|
|
7013
7177
|
Slot,
|
|
7014
7178
|
{
|
|
7015
7179
|
"data-slot": "form-control",
|
|
@@ -7022,7 +7186,7 @@ function FormControl({
|
|
|
7022
7186
|
}
|
|
7023
7187
|
function FormDescription({ className, ...props }) {
|
|
7024
7188
|
const { formDescriptionId } = useFormItem();
|
|
7025
|
-
return /* @__PURE__ */
|
|
7189
|
+
return /* @__PURE__ */ jsx57(
|
|
7026
7190
|
"p",
|
|
7027
7191
|
{
|
|
7028
7192
|
"data-slot": "form-description",
|
|
@@ -7037,7 +7201,7 @@ function FormMessage({ className, children, ...props }) {
|
|
|
7037
7201
|
if (!children) {
|
|
7038
7202
|
return null;
|
|
7039
7203
|
}
|
|
7040
|
-
return /* @__PURE__ */
|
|
7204
|
+
return /* @__PURE__ */ jsx57(
|
|
7041
7205
|
"p",
|
|
7042
7206
|
{
|
|
7043
7207
|
"data-slot": "form-message",
|
|
@@ -7050,7 +7214,7 @@ function FormMessage({ className, children, ...props }) {
|
|
|
7050
7214
|
}
|
|
7051
7215
|
|
|
7052
7216
|
// src/components/resizable.tsx
|
|
7053
|
-
import * as
|
|
7217
|
+
import * as React68 from "react";
|
|
7054
7218
|
|
|
7055
7219
|
// src/generated/resizable.ts
|
|
7056
7220
|
var RESIZABLE_GROUP = "flex h-full w-full data-[panel-group-direction=vertical]:flex-col";
|
|
@@ -7059,10 +7223,10 @@ var RESIZABLE_HANDLE = "bg-border focus-visible:ring-ring relative flex w-px ite
|
|
|
7059
7223
|
var RESIZABLE_HANDLE_GRIP = "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border";
|
|
7060
7224
|
|
|
7061
7225
|
// src/components/resizable.tsx
|
|
7062
|
-
import { jsx as
|
|
7063
|
-
var ResizableContext =
|
|
7226
|
+
import { jsx as jsx58, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
7227
|
+
var ResizableContext = React68.createContext(null);
|
|
7064
7228
|
function useResizable() {
|
|
7065
|
-
const ctx =
|
|
7229
|
+
const ctx = React68.useContext(ResizableContext);
|
|
7066
7230
|
if (!ctx)
|
|
7067
7231
|
throw new Error("Resizable parts must be used within a ResizablePanelGroup");
|
|
7068
7232
|
return ctx;
|
|
@@ -7085,9 +7249,9 @@ function ResizablePanelGroup({
|
|
|
7085
7249
|
children,
|
|
7086
7250
|
...props
|
|
7087
7251
|
}) {
|
|
7088
|
-
const [sizes, setSizes] =
|
|
7089
|
-
const groupRef =
|
|
7090
|
-
const register =
|
|
7252
|
+
const [sizes, setSizes] = React68.useState([]);
|
|
7253
|
+
const groupRef = React68.useRef(null);
|
|
7254
|
+
const register = React68.useCallback((index, defaultSize) => {
|
|
7091
7255
|
setSizes((prev) => {
|
|
7092
7256
|
if (prev[index] !== void 0) return prev;
|
|
7093
7257
|
const next = prev.slice();
|
|
@@ -7096,14 +7260,14 @@ function ResizablePanelGroup({
|
|
|
7096
7260
|
return next;
|
|
7097
7261
|
});
|
|
7098
7262
|
}, []);
|
|
7099
|
-
|
|
7263
|
+
React68.useEffect(() => {
|
|
7100
7264
|
if (sizes.length) onLayout?.(sizes);
|
|
7101
7265
|
}, [sizes, onLayout]);
|
|
7102
|
-
const value =
|
|
7266
|
+
const value = React68.useMemo(
|
|
7103
7267
|
() => ({ sizes, setSizes, register, direction, keyboardStep, groupRef }),
|
|
7104
7268
|
[sizes, register, direction, keyboardStep]
|
|
7105
7269
|
);
|
|
7106
|
-
return /* @__PURE__ */
|
|
7270
|
+
return /* @__PURE__ */ jsx58(ResizableContext.Provider, { value, children: /* @__PURE__ */ jsx58(
|
|
7107
7271
|
"div",
|
|
7108
7272
|
{
|
|
7109
7273
|
ref: groupRef,
|
|
@@ -7124,11 +7288,11 @@ function ResizablePanel({
|
|
|
7124
7288
|
...props
|
|
7125
7289
|
}) {
|
|
7126
7290
|
const { sizes, register } = useResizable();
|
|
7127
|
-
|
|
7291
|
+
React68.useEffect(() => {
|
|
7128
7292
|
register(index, defaultSize);
|
|
7129
7293
|
}, [register, index, defaultSize]);
|
|
7130
7294
|
const basis = sizes[index] ?? defaultSize;
|
|
7131
|
-
return /* @__PURE__ */
|
|
7295
|
+
return /* @__PURE__ */ jsx58(
|
|
7132
7296
|
"div",
|
|
7133
7297
|
{
|
|
7134
7298
|
"data-slot": "resizable-panel",
|
|
@@ -7147,12 +7311,12 @@ function ResizableHandle({
|
|
|
7147
7311
|
...props
|
|
7148
7312
|
}) {
|
|
7149
7313
|
const { setSizes, direction, keyboardStep, groupRef } = useResizable();
|
|
7150
|
-
const draggingRef =
|
|
7151
|
-
const resize =
|
|
7314
|
+
const draggingRef = React68.useRef(false);
|
|
7315
|
+
const resize = React68.useCallback(
|
|
7152
7316
|
(delta) => setSizes((prev) => redistribute(prev, index, delta)),
|
|
7153
7317
|
[setSizes, index]
|
|
7154
7318
|
);
|
|
7155
|
-
const onPointerMove =
|
|
7319
|
+
const onPointerMove = React68.useCallback(
|
|
7156
7320
|
(event) => {
|
|
7157
7321
|
if (!draggingRef.current) return;
|
|
7158
7322
|
const rect = groupRef.current?.getBoundingClientRect();
|
|
@@ -7164,7 +7328,7 @@ function ResizableHandle({
|
|
|
7164
7328
|
},
|
|
7165
7329
|
[direction, resize, groupRef]
|
|
7166
7330
|
);
|
|
7167
|
-
const onPointerUp =
|
|
7331
|
+
const onPointerUp = React68.useCallback(() => {
|
|
7168
7332
|
draggingRef.current = false;
|
|
7169
7333
|
window.removeEventListener("pointermove", onPointerMove);
|
|
7170
7334
|
window.removeEventListener("pointerup", onPointerUp);
|
|
@@ -7175,7 +7339,7 @@ function ResizableHandle({
|
|
|
7175
7339
|
window.addEventListener("pointermove", onPointerMove);
|
|
7176
7340
|
window.addEventListener("pointerup", onPointerUp);
|
|
7177
7341
|
};
|
|
7178
|
-
|
|
7342
|
+
React68.useEffect(() => () => onPointerUp(), [onPointerUp]);
|
|
7179
7343
|
const onKeyDown = (event) => {
|
|
7180
7344
|
let delta;
|
|
7181
7345
|
switch (event.key) {
|
|
@@ -7195,7 +7359,7 @@ function ResizableHandle({
|
|
|
7195
7359
|
event.preventDefault();
|
|
7196
7360
|
resize(delta);
|
|
7197
7361
|
};
|
|
7198
|
-
return /* @__PURE__ */
|
|
7362
|
+
return /* @__PURE__ */ jsxs27(
|
|
7199
7363
|
"div",
|
|
7200
7364
|
{
|
|
7201
7365
|
"data-slot": "resizable-handle",
|
|
@@ -7208,7 +7372,7 @@ function ResizableHandle({
|
|
|
7208
7372
|
onKeyDown,
|
|
7209
7373
|
...props,
|
|
7210
7374
|
children: [
|
|
7211
|
-
withHandle && /* @__PURE__ */
|
|
7375
|
+
withHandle && /* @__PURE__ */ jsx58("div", { className: RESIZABLE_HANDLE_GRIP, children: /* @__PURE__ */ jsxs27(
|
|
7212
7376
|
"svg",
|
|
7213
7377
|
{
|
|
7214
7378
|
className: "size-2.5",
|
|
@@ -7223,12 +7387,12 @@ function ResizableHandle({
|
|
|
7223
7387
|
strokeLinejoin: "round",
|
|
7224
7388
|
"aria-hidden": "true",
|
|
7225
7389
|
children: [
|
|
7226
|
-
/* @__PURE__ */
|
|
7227
|
-
/* @__PURE__ */
|
|
7228
|
-
/* @__PURE__ */
|
|
7229
|
-
/* @__PURE__ */
|
|
7230
|
-
/* @__PURE__ */
|
|
7231
|
-
/* @__PURE__ */
|
|
7390
|
+
/* @__PURE__ */ jsx58("circle", { cx: "9", cy: "12", r: "1" }),
|
|
7391
|
+
/* @__PURE__ */ jsx58("circle", { cx: "9", cy: "5", r: "1" }),
|
|
7392
|
+
/* @__PURE__ */ jsx58("circle", { cx: "9", cy: "19", r: "1" }),
|
|
7393
|
+
/* @__PURE__ */ jsx58("circle", { cx: "15", cy: "12", r: "1" }),
|
|
7394
|
+
/* @__PURE__ */ jsx58("circle", { cx: "15", cy: "5", r: "1" }),
|
|
7395
|
+
/* @__PURE__ */ jsx58("circle", { cx: "15", cy: "19", r: "1" })
|
|
7232
7396
|
]
|
|
7233
7397
|
}
|
|
7234
7398
|
) }),
|
|
@@ -7377,10 +7541,12 @@ export {
|
|
|
7377
7541
|
FormItem,
|
|
7378
7542
|
FormLabel,
|
|
7379
7543
|
FormMessage,
|
|
7380
|
-
Header,
|
|
7381
7544
|
HoverCard,
|
|
7382
7545
|
HoverCardContent,
|
|
7383
7546
|
HoverCardTrigger,
|
|
7547
|
+
InfoTip,
|
|
7548
|
+
InfoTipContent,
|
|
7549
|
+
InfoTipTrigger,
|
|
7384
7550
|
Input,
|
|
7385
7551
|
InputGroup,
|
|
7386
7552
|
InputGroupAddon,
|
|
@@ -7450,6 +7616,7 @@ export {
|
|
|
7450
7616
|
ResizablePanelGroup,
|
|
7451
7617
|
ScrollArea,
|
|
7452
7618
|
ScrollBar,
|
|
7619
|
+
SectionDescriptor,
|
|
7453
7620
|
Select,
|
|
7454
7621
|
SelectContent,
|
|
7455
7622
|
SelectGroup,
|
|
@@ -7522,6 +7689,7 @@ export {
|
|
|
7522
7689
|
useDismissableLayer,
|
|
7523
7690
|
useFloating,
|
|
7524
7691
|
useFocusScope,
|
|
7692
|
+
useHoverIntent,
|
|
7525
7693
|
usePresence,
|
|
7526
7694
|
useRovingFocus,
|
|
7527
7695
|
useSidebar
|