@7onic-ui/react 0.1.1 → 0.2.1
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 +17 -12
- package/dist/chart.d.mts +163 -0
- package/dist/chart.d.ts +163 -0
- package/dist/chart.js +583 -0
- package/dist/chart.js.map +1 -0
- package/dist/chart.mjs +536 -0
- package/dist/chart.mjs.map +1 -0
- package/dist/index.d.mts +1 -161
- package/dist/index.d.ts +1 -161
- package/dist/index.js +360 -897
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +357 -880
- package/dist/index.mjs.map +1 -1
- package/llms.txt +1721 -243
- package/package.json +26 -8
package/dist/index.js
CHANGED
|
@@ -28,8 +28,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
30
|
// src/components/ui/index.ts
|
|
31
|
-
var
|
|
32
|
-
__export(
|
|
31
|
+
var ui_exports = {};
|
|
32
|
+
__export(ui_exports, {
|
|
33
33
|
Accordion: () => Accordion,
|
|
34
34
|
AccordionContent: () => AccordionContent,
|
|
35
35
|
AccordionItem: () => AccordionItem,
|
|
@@ -72,19 +72,6 @@ __export(index_exports, {
|
|
|
72
72
|
CardHeader: () => CardHeader,
|
|
73
73
|
CardImage: () => CardImage,
|
|
74
74
|
CardTitle: () => CardTitle,
|
|
75
|
-
Chart: () => Chart,
|
|
76
|
-
ChartArea: () => ChartArea,
|
|
77
|
-
ChartBar: () => ChartBar,
|
|
78
|
-
ChartContainer: () => ChartContainer,
|
|
79
|
-
ChartLegend: () => ChartLegend,
|
|
80
|
-
ChartLegendContent: () => ChartLegendContent,
|
|
81
|
-
ChartLine: () => ChartLine,
|
|
82
|
-
ChartPie: () => ChartPie,
|
|
83
|
-
ChartStyle: () => ChartStyle,
|
|
84
|
-
ChartTooltip: () => ChartTooltip,
|
|
85
|
-
ChartTooltipContent: () => ChartTooltipContent,
|
|
86
|
-
ChartXAxis: () => ChartXAxis,
|
|
87
|
-
ChartYAxis: () => ChartYAxis,
|
|
88
75
|
Checkbox: () => Checkbox,
|
|
89
76
|
Divider: () => Divider,
|
|
90
77
|
Drawer: () => Drawer,
|
|
@@ -198,7 +185,7 @@ __export(index_exports, {
|
|
|
198
185
|
Toggle: () => Toggle,
|
|
199
186
|
ToggleGroup: () => ToggleGroup,
|
|
200
187
|
ToggleGroupItem: () => ToggleGroupItem,
|
|
201
|
-
Tooltip: () =>
|
|
188
|
+
Tooltip: () => Tooltip,
|
|
202
189
|
TooltipArrow: () => TooltipArrow,
|
|
203
190
|
TooltipContent: () => TooltipContent,
|
|
204
191
|
TooltipPortal: () => TooltipPortal,
|
|
@@ -248,11 +235,10 @@ __export(index_exports, {
|
|
|
248
235
|
toggleVariants: () => toggleVariants,
|
|
249
236
|
tooltipContentVariants: () => tooltipContentVariants,
|
|
250
237
|
useButtonGroup: () => useButtonGroup,
|
|
251
|
-
useChart: () => useChart,
|
|
252
238
|
useFieldContext: () => useFieldContext,
|
|
253
239
|
usePagination: () => usePagination
|
|
254
240
|
});
|
|
255
|
-
module.exports = __toCommonJS(
|
|
241
|
+
module.exports = __toCommonJS(ui_exports);
|
|
256
242
|
|
|
257
243
|
// src/components/ui/accordion.tsx
|
|
258
244
|
var React = __toESM(require("react"));
|
|
@@ -3201,517 +3187,8 @@ var Avatar = Object.assign(AvatarRoot, {
|
|
|
3201
3187
|
Group: AvatarGroup
|
|
3202
3188
|
});
|
|
3203
3189
|
|
|
3204
|
-
// src/components/ui/chart.tsx
|
|
3205
|
-
var React20 = __toESM(require("react"));
|
|
3206
|
-
var RechartsPrimitive = __toESM(require("recharts"));
|
|
3207
|
-
var THEMES = { light: "", dark: ".dark" };
|
|
3208
|
-
var ChartContext = React20.createContext(null);
|
|
3209
|
-
function useChart() {
|
|
3210
|
-
const context = React20.useContext(ChartContext);
|
|
3211
|
-
if (!context) {
|
|
3212
|
-
throw new Error("useChart must be used within a <ChartContainer />");
|
|
3213
|
-
}
|
|
3214
|
-
return context;
|
|
3215
|
-
}
|
|
3216
|
-
function ChartContainer({
|
|
3217
|
-
id,
|
|
3218
|
-
className,
|
|
3219
|
-
children,
|
|
3220
|
-
config,
|
|
3221
|
-
hoverFade = false,
|
|
3222
|
-
...props
|
|
3223
|
-
}) {
|
|
3224
|
-
const uniqueId = React20.useId();
|
|
3225
|
-
const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
|
|
3226
|
-
const [activeIndex, setActiveIndex] = React20.useState(null);
|
|
3227
|
-
const [activeDataKey, setActiveDataKey] = React20.useState(null);
|
|
3228
|
-
return /* @__PURE__ */ React20.createElement(ChartContext.Provider, { value: { config, hoverFade, activeIndex, setActiveIndex, activeDataKey, setActiveDataKey } }, /* @__PURE__ */ React20.createElement(
|
|
3229
|
-
"div",
|
|
3230
|
-
{
|
|
3231
|
-
"data-slot": "chart",
|
|
3232
|
-
"data-chart": chartId,
|
|
3233
|
-
onMouseLeave: hoverFade ? () => {
|
|
3234
|
-
setActiveIndex(null);
|
|
3235
|
-
setActiveDataKey(null);
|
|
3236
|
-
} : void 0,
|
|
3237
|
-
className: cn(
|
|
3238
|
-
"flex aspect-video w-full justify-center text-xs outline-none [&_*]:outline-none",
|
|
3239
|
-
// Responsive axis tick font-size — consumed by ChartXAxis / ChartYAxis via var()
|
|
3240
|
-
"[--chart-axis-fs:var(--font-size-2xs)] sm:[--chart-axis-fs:var(--font-size-xs)]",
|
|
3241
|
-
// Recharts element overrides — use arbitrary properties for v3/v4 compat
|
|
3242
|
-
"[&_.recharts-cartesian-axis-tick_text]:[fill:var(--color-text-muted)]",
|
|
3243
|
-
"[&_.recharts-cartesian-grid_line[stroke='#ccc']]:[stroke:var(--color-border)]",
|
|
3244
|
-
"[&_.recharts-cartesian-grid_line]:[stroke-dasharray:3_3]",
|
|
3245
|
-
"[&_.recharts-curve.recharts-tooltip-cursor]:[stroke:var(--color-border)]",
|
|
3246
|
-
"[&_.recharts-dot[stroke='#fff']]:stroke-transparent",
|
|
3247
|
-
"[&_.recharts-layer]:outline-none",
|
|
3248
|
-
"[&_.recharts-polar-grid_[stroke='#ccc']]:[stroke:var(--color-border)]",
|
|
3249
|
-
"[&_.recharts-radial-bar-background-sector]:[fill:var(--color-background-muted)]",
|
|
3250
|
-
"[&_.recharts-rectangle.recharts-tooltip-cursor]:[fill:transparent]",
|
|
3251
|
-
"[&_.recharts-reference-line_[stroke='#ccc']]:[stroke:var(--color-border)]",
|
|
3252
|
-
"[&_.recharts-sector]:outline-none",
|
|
3253
|
-
"[&_.recharts-sector[stroke='#fff']]:stroke-transparent",
|
|
3254
|
-
"[&_.recharts-surface]:outline-none",
|
|
3255
|
-
className
|
|
3256
|
-
),
|
|
3257
|
-
...props
|
|
3258
|
-
},
|
|
3259
|
-
/* @__PURE__ */ React20.createElement(ChartStyle, { id: chartId, config }),
|
|
3260
|
-
/* @__PURE__ */ React20.createElement(RechartsPrimitive.ResponsiveContainer, null, children)
|
|
3261
|
-
));
|
|
3262
|
-
}
|
|
3263
|
-
var CHART_TOOLTIP_KEYFRAME = "@keyframes chart-tooltip-in{from{opacity:0}to{opacity:1}}";
|
|
3264
|
-
var ChartStyle = ({ id, config }) => {
|
|
3265
|
-
const colorConfig = Object.entries(config).filter(
|
|
3266
|
-
([, config2]) => config2.theme || config2.color
|
|
3267
|
-
);
|
|
3268
|
-
const colorCss = colorConfig.length ? Object.entries(THEMES).map(
|
|
3269
|
-
([theme, prefix]) => `
|
|
3270
|
-
${prefix} [data-chart=${id}] {
|
|
3271
|
-
${colorConfig.map(([key, itemConfig]) => {
|
|
3272
|
-
const color = itemConfig.theme?.[theme] || itemConfig.color;
|
|
3273
|
-
return color ? ` --color-${key}: ${color};` : null;
|
|
3274
|
-
}).join("\n")}
|
|
3275
|
-
}
|
|
3276
|
-
`
|
|
3277
|
-
).join("\n") : "";
|
|
3278
|
-
return /* @__PURE__ */ React20.createElement(
|
|
3279
|
-
"style",
|
|
3280
|
-
{
|
|
3281
|
-
dangerouslySetInnerHTML: {
|
|
3282
|
-
__html: CHART_TOOLTIP_KEYFRAME + colorCss
|
|
3283
|
-
}
|
|
3284
|
-
}
|
|
3285
|
-
);
|
|
3286
|
-
};
|
|
3287
|
-
var CHART_HOVER_FADE_OPACITY = 0.35;
|
|
3288
|
-
var CHART_FADE_TRANSITION = { transition: "fill-opacity var(--duration-fast) ease-out, stroke-opacity var(--duration-fast) ease-out" };
|
|
3289
|
-
var CHART_BAR_RADIUS_MAP = {
|
|
3290
|
-
none: 0,
|
|
3291
|
-
// --radius-none: 0px
|
|
3292
|
-
sm: 2,
|
|
3293
|
-
// --radius-sm: 2px
|
|
3294
|
-
base: 4,
|
|
3295
|
-
// --radius-base: 4px
|
|
3296
|
-
md: 6,
|
|
3297
|
-
// --radius-md: 6px
|
|
3298
|
-
lg: 8
|
|
3299
|
-
// --radius-lg: 8px
|
|
3300
|
-
};
|
|
3301
|
-
function ChartBar({
|
|
3302
|
-
radius = "none",
|
|
3303
|
-
layout = "vertical",
|
|
3304
|
-
stackPosition = "top",
|
|
3305
|
-
variant = "solid",
|
|
3306
|
-
fill,
|
|
3307
|
-
stackId,
|
|
3308
|
-
...props
|
|
3309
|
-
}) {
|
|
3310
|
-
const { hoverFade, activeIndex, setActiveIndex } = useChart();
|
|
3311
|
-
const r = CHART_BAR_RADIUS_MAP[radius];
|
|
3312
|
-
const isStacked = !!stackId || stackPosition === "bottom";
|
|
3313
|
-
const appliedRadius = r === 0 ? 0 : variant === "outline" && !isStacked ? r : layout === "horizontal" && stackPosition === "bottom" ? 0 : layout === "horizontal" ? [0, r, r, 0] : stackPosition === "bottom" ? 0 : [r, r, 0, 0];
|
|
3314
|
-
const outlineShape = React20.useCallback((shapeProps) => {
|
|
3315
|
-
const x = shapeProps.x ?? 0;
|
|
3316
|
-
const y = shapeProps.y ?? 0;
|
|
3317
|
-
const width = shapeProps.width ?? 0;
|
|
3318
|
-
const height = shapeProps.height ?? 0;
|
|
3319
|
-
if (!width || !height || width <= 0 || height <= 0) return /* @__PURE__ */ React20.createElement("g", null);
|
|
3320
|
-
const sw = 2;
|
|
3321
|
-
const inset = sw / 2;
|
|
3322
|
-
const rx = typeof appliedRadius === "number" ? Math.max(0, appliedRadius - inset) : 0;
|
|
3323
|
-
const fadeMultiplier = hoverFade && activeIndex !== null && shapeProps.index !== activeIndex ? CHART_HOVER_FADE_OPACITY : 1;
|
|
3324
|
-
return /* @__PURE__ */ React20.createElement(
|
|
3325
|
-
"rect",
|
|
3326
|
-
{
|
|
3327
|
-
x: x + inset,
|
|
3328
|
-
y: y + inset,
|
|
3329
|
-
width: Math.max(0, width - sw),
|
|
3330
|
-
height: Math.max(0, height - sw),
|
|
3331
|
-
rx,
|
|
3332
|
-
fill,
|
|
3333
|
-
fillOpacity: 0.4 * fadeMultiplier,
|
|
3334
|
-
stroke: fill,
|
|
3335
|
-
strokeOpacity: fadeMultiplier,
|
|
3336
|
-
strokeWidth: sw,
|
|
3337
|
-
style: hoverFade ? CHART_FADE_TRANSITION : void 0
|
|
3338
|
-
}
|
|
3339
|
-
);
|
|
3340
|
-
}, [appliedRadius, fill, hoverFade, activeIndex]);
|
|
3341
|
-
const solidHoverShape = React20.useCallback((shapeProps) => {
|
|
3342
|
-
const opacity = activeIndex === null ? 1 : shapeProps.index === activeIndex ? 1 : CHART_HOVER_FADE_OPACITY;
|
|
3343
|
-
return /* @__PURE__ */ React20.createElement(
|
|
3344
|
-
RechartsPrimitive.Rectangle,
|
|
3345
|
-
{
|
|
3346
|
-
...shapeProps,
|
|
3347
|
-
fillOpacity: opacity,
|
|
3348
|
-
style: CHART_FADE_TRANSITION
|
|
3349
|
-
}
|
|
3350
|
-
);
|
|
3351
|
-
}, [activeIndex]);
|
|
3352
|
-
const useOutline = variant === "outline" && !isStacked;
|
|
3353
|
-
const needsHoverShape = hoverFade && variant === "solid" && !useOutline;
|
|
3354
|
-
return /* @__PURE__ */ React20.createElement(
|
|
3355
|
-
RechartsPrimitive.Bar,
|
|
3356
|
-
{
|
|
3357
|
-
radius: appliedRadius,
|
|
3358
|
-
fill,
|
|
3359
|
-
stackId,
|
|
3360
|
-
...hoverFade && { isAnimationActive: false },
|
|
3361
|
-
...useOutline && { shape: outlineShape },
|
|
3362
|
-
...needsHoverShape && { shape: solidHoverShape },
|
|
3363
|
-
...hoverFade && { onMouseEnter: (_, index) => setActiveIndex(index) },
|
|
3364
|
-
...props
|
|
3365
|
-
}
|
|
3366
|
-
);
|
|
3367
|
-
}
|
|
3368
|
-
function ChartTooltip(props) {
|
|
3369
|
-
return /* @__PURE__ */ React20.createElement(RechartsPrimitive.Tooltip, { animationDuration: 0, ...props });
|
|
3370
|
-
}
|
|
3371
|
-
function ChartTooltipContent({
|
|
3372
|
-
active,
|
|
3373
|
-
payload,
|
|
3374
|
-
className,
|
|
3375
|
-
indicator = "dot",
|
|
3376
|
-
hideLabel = false,
|
|
3377
|
-
hideIndicator = false,
|
|
3378
|
-
label,
|
|
3379
|
-
labelFormatter,
|
|
3380
|
-
labelClassName,
|
|
3381
|
-
formatter,
|
|
3382
|
-
color,
|
|
3383
|
-
nameKey,
|
|
3384
|
-
labelKey
|
|
3385
|
-
}) {
|
|
3386
|
-
const { config } = useChart();
|
|
3387
|
-
const tooltipLabel = React20.useMemo(() => {
|
|
3388
|
-
if (hideLabel || !payload?.length) {
|
|
3389
|
-
return null;
|
|
3390
|
-
}
|
|
3391
|
-
const [item] = payload;
|
|
3392
|
-
const key = `${labelKey || item?.dataKey || item?.name || "value"}`;
|
|
3393
|
-
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
3394
|
-
const value = !labelKey && typeof label === "string" ? config[label]?.label || label : itemConfig?.label;
|
|
3395
|
-
if (labelFormatter) {
|
|
3396
|
-
return /* @__PURE__ */ React20.createElement("div", { className: cn("font-semibold", labelClassName) }, labelFormatter(value, payload));
|
|
3397
|
-
}
|
|
3398
|
-
if (!value) {
|
|
3399
|
-
return null;
|
|
3400
|
-
}
|
|
3401
|
-
return /* @__PURE__ */ React20.createElement("div", { className: cn("font-semibold", labelClassName) }, value);
|
|
3402
|
-
}, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey]);
|
|
3403
|
-
if (!active || !payload?.length) {
|
|
3404
|
-
return null;
|
|
3405
|
-
}
|
|
3406
|
-
const nestLabel = payload.length === 1 && indicator !== "dot";
|
|
3407
|
-
return /* @__PURE__ */ React20.createElement(
|
|
3408
|
-
"div",
|
|
3409
|
-
{
|
|
3410
|
-
className: cn(
|
|
3411
|
-
"grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border bg-background px-2.5 py-1.5 text-xs shadow-xl",
|
|
3412
|
-
className
|
|
3413
|
-
),
|
|
3414
|
-
style: { animation: "chart-tooltip-in var(--duration-slow) ease-out" }
|
|
3415
|
-
},
|
|
3416
|
-
!nestLabel ? tooltipLabel : null,
|
|
3417
|
-
/* @__PURE__ */ React20.createElement("div", { className: "grid gap-1.5" }, payload.filter((item) => item.type !== "none").map((item, index) => {
|
|
3418
|
-
const key = `${nameKey || item.name || item.dataKey || "value"}`;
|
|
3419
|
-
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
3420
|
-
const indicatorColor = color || item.payload?.fill || item.color;
|
|
3421
|
-
return /* @__PURE__ */ React20.createElement(
|
|
3422
|
-
"div",
|
|
3423
|
-
{
|
|
3424
|
-
key: item.dataKey,
|
|
3425
|
-
className: cn(
|
|
3426
|
-
"flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-text-muted",
|
|
3427
|
-
indicator === "dot" && "items-center"
|
|
3428
|
-
)
|
|
3429
|
-
},
|
|
3430
|
-
formatter && item?.value !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /* @__PURE__ */ React20.createElement(React20.Fragment, null, itemConfig?.icon ? /* @__PURE__ */ React20.createElement(itemConfig.icon, null) : !hideIndicator && /* @__PURE__ */ React20.createElement(
|
|
3431
|
-
"div",
|
|
3432
|
-
{
|
|
3433
|
-
className: cn(
|
|
3434
|
-
"shrink-0 rounded-sm",
|
|
3435
|
-
{
|
|
3436
|
-
"h-2.5 w-2.5": indicator === "dot",
|
|
3437
|
-
"w-1": indicator === "line",
|
|
3438
|
-
"w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
|
|
3439
|
-
"my-0.5": nestLabel && indicator === "dashed"
|
|
3440
|
-
}
|
|
3441
|
-
),
|
|
3442
|
-
style: {
|
|
3443
|
-
backgroundColor: indicator === "dashed" ? "transparent" : indicatorColor,
|
|
3444
|
-
borderColor: indicatorColor
|
|
3445
|
-
}
|
|
3446
|
-
}
|
|
3447
|
-
), /* @__PURE__ */ React20.createElement(
|
|
3448
|
-
"div",
|
|
3449
|
-
{
|
|
3450
|
-
className: cn(
|
|
3451
|
-
"flex flex-1 justify-between leading-none",
|
|
3452
|
-
nestLabel ? "items-end" : "items-center"
|
|
3453
|
-
)
|
|
3454
|
-
},
|
|
3455
|
-
/* @__PURE__ */ React20.createElement("div", { className: "grid gap-1.5" }, nestLabel ? tooltipLabel : null, /* @__PURE__ */ React20.createElement("span", { className: "text-text-muted" }, itemConfig?.label || item.name)),
|
|
3456
|
-
item.value && /* @__PURE__ */ React20.createElement("span", { className: "font-mono font-semibold text-foreground tabular-nums" }, item.value.toLocaleString())
|
|
3457
|
-
))
|
|
3458
|
-
);
|
|
3459
|
-
}))
|
|
3460
|
-
);
|
|
3461
|
-
}
|
|
3462
|
-
var ChartLegend = RechartsPrimitive.Legend;
|
|
3463
|
-
function ChartLegendContent({
|
|
3464
|
-
className,
|
|
3465
|
-
hideIcon = false,
|
|
3466
|
-
payload,
|
|
3467
|
-
verticalAlign = "bottom",
|
|
3468
|
-
align = "center",
|
|
3469
|
-
layout = "horizontal",
|
|
3470
|
-
nameKey
|
|
3471
|
-
}) {
|
|
3472
|
-
const { config } = useChart();
|
|
3473
|
-
if (!payload?.length) {
|
|
3474
|
-
return null;
|
|
3475
|
-
}
|
|
3476
|
-
const isVertical = layout === "vertical";
|
|
3477
|
-
return /* @__PURE__ */ React20.createElement(
|
|
3478
|
-
"div",
|
|
3479
|
-
{
|
|
3480
|
-
className: cn(
|
|
3481
|
-
"flex gap-4",
|
|
3482
|
-
isVertical ? "flex-col items-start gap-1.5" : [
|
|
3483
|
-
"items-center",
|
|
3484
|
-
align === "left" ? "justify-start" : align === "right" ? "justify-end" : "justify-center",
|
|
3485
|
-
verticalAlign === "top" ? "pb-3" : "pt-3"
|
|
3486
|
-
],
|
|
3487
|
-
className
|
|
3488
|
-
)
|
|
3489
|
-
},
|
|
3490
|
-
payload.filter((item) => item.type !== "none").map((item) => {
|
|
3491
|
-
const key = `${nameKey || item.dataKey || "value"}`;
|
|
3492
|
-
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
3493
|
-
return /* @__PURE__ */ React20.createElement(
|
|
3494
|
-
"div",
|
|
3495
|
-
{
|
|
3496
|
-
key: item.value,
|
|
3497
|
-
className: "flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-text-muted"
|
|
3498
|
-
},
|
|
3499
|
-
itemConfig?.icon && !hideIcon ? /* @__PURE__ */ React20.createElement(itemConfig.icon, null) : /* @__PURE__ */ React20.createElement(
|
|
3500
|
-
"div",
|
|
3501
|
-
{
|
|
3502
|
-
className: "h-2 w-2 shrink-0 rounded-sm",
|
|
3503
|
-
style: {
|
|
3504
|
-
backgroundColor: item.color
|
|
3505
|
-
}
|
|
3506
|
-
}
|
|
3507
|
-
),
|
|
3508
|
-
/* @__PURE__ */ React20.createElement("span", { className: "text-foreground" }, itemConfig?.label)
|
|
3509
|
-
);
|
|
3510
|
-
})
|
|
3511
|
-
);
|
|
3512
|
-
}
|
|
3513
|
-
function getPayloadConfigFromPayload(config, payload, key) {
|
|
3514
|
-
if (typeof payload !== "object" || payload === null) {
|
|
3515
|
-
return void 0;
|
|
3516
|
-
}
|
|
3517
|
-
const payloadPayload = "payload" in payload && typeof payload.payload === "object" && payload.payload !== null ? payload.payload : void 0;
|
|
3518
|
-
let configLabelKey = key;
|
|
3519
|
-
if (key in payload && typeof payload[key] === "string") {
|
|
3520
|
-
configLabelKey = payload[key];
|
|
3521
|
-
} else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key] === "string") {
|
|
3522
|
-
configLabelKey = payloadPayload[key];
|
|
3523
|
-
}
|
|
3524
|
-
return configLabelKey in config ? config[configLabelKey] : config[key];
|
|
3525
|
-
}
|
|
3526
|
-
var CHART_AXIS_TICK_STYLE = { style: { fontSize: "var(--chart-axis-fs)", fill: "var(--color-text-subtle)" } };
|
|
3527
|
-
var CHART_XAXIS_PADDING = { left: 16, right: 16 };
|
|
3528
|
-
function ChartXAxis({ tick, padding, ...props }) {
|
|
3529
|
-
return /* @__PURE__ */ React20.createElement(RechartsPrimitive.XAxis, { tick: tick ?? CHART_AXIS_TICK_STYLE, padding: padding ?? CHART_XAXIS_PADDING, ...props });
|
|
3530
|
-
}
|
|
3531
|
-
function ChartYAxis({ tick, width = "auto", ...props }) {
|
|
3532
|
-
return /* @__PURE__ */ React20.createElement(RechartsPrimitive.YAxis, { tick: tick ?? CHART_AXIS_TICK_STYLE, width, ...props });
|
|
3533
|
-
}
|
|
3534
|
-
var CHART_LINE_DASH = "5 5";
|
|
3535
|
-
var CHART_DOT_PROPS = { r: 3, strokeWidth: 2 };
|
|
3536
|
-
var CHART_ACTIVE_DOT_PROPS = { r: 5, strokeWidth: 2 };
|
|
3537
|
-
function ChartLine({
|
|
3538
|
-
type = "monotone",
|
|
3539
|
-
variant = "solid",
|
|
3540
|
-
dot: showDot = true,
|
|
3541
|
-
activeDot: showActiveDot = true,
|
|
3542
|
-
stroke,
|
|
3543
|
-
dataKey,
|
|
3544
|
-
...props
|
|
3545
|
-
}) {
|
|
3546
|
-
const { hoverFade, activeDataKey, setActiveDataKey } = useChart();
|
|
3547
|
-
const isFaded = hoverFade && activeDataKey !== null && activeDataKey !== dataKey;
|
|
3548
|
-
const opacity = isFaded ? CHART_HOVER_FADE_OPACITY : 1;
|
|
3549
|
-
const dotProps = showDot ? variant === "dashed" ? { ...CHART_DOT_PROPS, strokeDasharray: "0" } : CHART_DOT_PROPS : false;
|
|
3550
|
-
const activeDotProps = showActiveDot ? variant === "dashed" ? { ...CHART_ACTIVE_DOT_PROPS, strokeDasharray: "0" } : CHART_ACTIVE_DOT_PROPS : false;
|
|
3551
|
-
return /* @__PURE__ */ React20.createElement(
|
|
3552
|
-
RechartsPrimitive.Line,
|
|
3553
|
-
{
|
|
3554
|
-
type,
|
|
3555
|
-
dataKey,
|
|
3556
|
-
stroke,
|
|
3557
|
-
strokeWidth: 2,
|
|
3558
|
-
strokeDasharray: variant === "dashed" ? CHART_LINE_DASH : void 0,
|
|
3559
|
-
dot: dotProps,
|
|
3560
|
-
activeDot: activeDotProps,
|
|
3561
|
-
strokeOpacity: opacity,
|
|
3562
|
-
...hoverFade && { isAnimationActive: false },
|
|
3563
|
-
...hoverFade && { onMouseEnter: () => setActiveDataKey(dataKey) },
|
|
3564
|
-
style: hoverFade ? { transition: "stroke-opacity var(--duration-fast) ease-out" } : void 0,
|
|
3565
|
-
...props
|
|
3566
|
-
}
|
|
3567
|
-
);
|
|
3568
|
-
}
|
|
3569
|
-
var CHART_AREA_DEFAULT_OPACITY = 0.4;
|
|
3570
|
-
function ChartArea({
|
|
3571
|
-
type = "monotone",
|
|
3572
|
-
variant = "solid",
|
|
3573
|
-
dot: showDot = true,
|
|
3574
|
-
activeDot: showActiveDot = true,
|
|
3575
|
-
fillOpacity = CHART_AREA_DEFAULT_OPACITY,
|
|
3576
|
-
stroke,
|
|
3577
|
-
fill,
|
|
3578
|
-
dataKey,
|
|
3579
|
-
...props
|
|
3580
|
-
}) {
|
|
3581
|
-
const { hoverFade, activeDataKey, setActiveDataKey } = useChart();
|
|
3582
|
-
const isFaded = hoverFade && activeDataKey !== null && activeDataKey !== dataKey;
|
|
3583
|
-
const opacity = isFaded ? CHART_HOVER_FADE_OPACITY : 1;
|
|
3584
|
-
const dotProps = showDot ? CHART_DOT_PROPS : false;
|
|
3585
|
-
const activeDotProps = showActiveDot ? CHART_ACTIVE_DOT_PROPS : false;
|
|
3586
|
-
const gradientId = `area-gradient-${String(dataKey)}`;
|
|
3587
|
-
const effectiveFill = variant === "gradient" ? `url(#${gradientId})` : fill || stroke;
|
|
3588
|
-
const effectiveFillOpacity = variant === "gradient" ? 1 : fillOpacity;
|
|
3589
|
-
return /* @__PURE__ */ React20.createElement(React20.Fragment, null, variant === "gradient" && /* @__PURE__ */ React20.createElement("defs", null, /* @__PURE__ */ React20.createElement("linearGradient", { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1" }, /* @__PURE__ */ React20.createElement("stop", { offset: "5%", stopColor: fill || stroke, stopOpacity: 0.8 }), /* @__PURE__ */ React20.createElement("stop", { offset: "95%", stopColor: fill || stroke, stopOpacity: 0 }))), /* @__PURE__ */ React20.createElement(
|
|
3590
|
-
RechartsPrimitive.Area,
|
|
3591
|
-
{
|
|
3592
|
-
type,
|
|
3593
|
-
dataKey,
|
|
3594
|
-
stroke,
|
|
3595
|
-
fill: effectiveFill,
|
|
3596
|
-
fillOpacity: effectiveFillOpacity * opacity,
|
|
3597
|
-
strokeWidth: 2,
|
|
3598
|
-
dot: dotProps,
|
|
3599
|
-
activeDot: activeDotProps,
|
|
3600
|
-
strokeOpacity: opacity,
|
|
3601
|
-
...hoverFade && { isAnimationActive: false },
|
|
3602
|
-
...hoverFade && { onMouseEnter: () => setActiveDataKey(dataKey) },
|
|
3603
|
-
style: hoverFade ? { transition: "fill-opacity var(--duration-fast) ease-out, stroke-opacity var(--duration-fast) ease-out" } : void 0,
|
|
3604
|
-
...props
|
|
3605
|
-
}
|
|
3606
|
-
));
|
|
3607
|
-
}
|
|
3608
|
-
var CHART_PIE_ACTIVE_OFFSET = 8;
|
|
3609
|
-
var CHART_PIE_DONUT_INNER_RADIUS = 60;
|
|
3610
|
-
var CHART_PIE_LABEL_RADIAL = 16;
|
|
3611
|
-
var CHART_PIE_LABEL_HORIZ = 20;
|
|
3612
|
-
var CHART_PIE_SKIP_ANGLE = 15;
|
|
3613
|
-
function ChartPie({
|
|
3614
|
-
variant = "pie",
|
|
3615
|
-
label: labelMode = "none",
|
|
3616
|
-
labelContent = "value",
|
|
3617
|
-
activeShape: showActiveShape = true,
|
|
3618
|
-
innerRadius,
|
|
3619
|
-
paddingAngle = 0,
|
|
3620
|
-
cornerRadius = 0,
|
|
3621
|
-
startAngle = 90,
|
|
3622
|
-
endAngle = -270,
|
|
3623
|
-
...props
|
|
3624
|
-
}) {
|
|
3625
|
-
const resolvedInnerRadius = innerRadius ?? (variant === "donut" ? CHART_PIE_DONUT_INNER_RADIUS : 0);
|
|
3626
|
-
const activeShapeConfig = showActiveShape ? (props2) => /* @__PURE__ */ React20.createElement(
|
|
3627
|
-
RechartsPrimitive.Sector,
|
|
3628
|
-
{
|
|
3629
|
-
...props2,
|
|
3630
|
-
outerRadius: props2.outerRadius + CHART_PIE_ACTIVE_OFFSET
|
|
3631
|
-
}
|
|
3632
|
-
) : void 0;
|
|
3633
|
-
const getDisplayText = (entry) => labelContent === "percent" ? `${(entry.percent * 100).toFixed(0)}%` : entry.value;
|
|
3634
|
-
const labelConfig = labelMode === "outside" ? (entry) => {
|
|
3635
|
-
const RADIAN = Math.PI / 180;
|
|
3636
|
-
const { cx, cy, midAngle, outerRadius, fill } = entry;
|
|
3637
|
-
const sx = cx + outerRadius * Math.cos(-midAngle * RADIAN);
|
|
3638
|
-
const sy = cy + outerRadius * Math.sin(-midAngle * RADIAN);
|
|
3639
|
-
const mx = cx + (outerRadius + CHART_PIE_LABEL_RADIAL) * Math.cos(-midAngle * RADIAN);
|
|
3640
|
-
const my = cy + (outerRadius + CHART_PIE_LABEL_RADIAL) * Math.sin(-midAngle * RADIAN);
|
|
3641
|
-
const isRight = mx > cx;
|
|
3642
|
-
const ex = mx + (isRight ? CHART_PIE_LABEL_HORIZ : -CHART_PIE_LABEL_HORIZ);
|
|
3643
|
-
return /* @__PURE__ */ React20.createElement("g", null, /* @__PURE__ */ React20.createElement(
|
|
3644
|
-
"polyline",
|
|
3645
|
-
{
|
|
3646
|
-
points: `${sx},${sy} ${mx},${my} ${ex},${my}`,
|
|
3647
|
-
fill: "none",
|
|
3648
|
-
stroke: fill,
|
|
3649
|
-
strokeWidth: 1,
|
|
3650
|
-
strokeOpacity: 0.5
|
|
3651
|
-
}
|
|
3652
|
-
), /* @__PURE__ */ React20.createElement(
|
|
3653
|
-
"text",
|
|
3654
|
-
{
|
|
3655
|
-
x: ex + (isRight ? 4 : -4),
|
|
3656
|
-
y: my,
|
|
3657
|
-
textAnchor: isRight ? "start" : "end",
|
|
3658
|
-
dominantBaseline: "central",
|
|
3659
|
-
style: { fontSize: "var(--font-size-xs)", fill: "var(--color-text-muted)" }
|
|
3660
|
-
},
|
|
3661
|
-
getDisplayText(entry)
|
|
3662
|
-
));
|
|
3663
|
-
} : labelMode === "inside" ? (entry) => {
|
|
3664
|
-
const angle = Math.abs(entry.endAngle - entry.startAngle);
|
|
3665
|
-
if (angle < CHART_PIE_SKIP_ANGLE) return null;
|
|
3666
|
-
const RADIAN = Math.PI / 180;
|
|
3667
|
-
const { cx, cy, innerRadius: ir, outerRadius: or, midAngle } = entry;
|
|
3668
|
-
const ratio = ir > 0 ? 0.5 : 0.65;
|
|
3669
|
-
const radius = ir + (or - ir) * ratio;
|
|
3670
|
-
const x = cx + radius * Math.cos(-midAngle * RADIAN);
|
|
3671
|
-
const y = cy + radius * Math.sin(-midAngle * RADIAN);
|
|
3672
|
-
return /* @__PURE__ */ React20.createElement(
|
|
3673
|
-
"text",
|
|
3674
|
-
{
|
|
3675
|
-
x,
|
|
3676
|
-
y,
|
|
3677
|
-
textAnchor: "middle",
|
|
3678
|
-
dominantBaseline: "central",
|
|
3679
|
-
style: { fontSize: "var(--font-size-xs)", fill: "white", fontWeight: 600 }
|
|
3680
|
-
},
|
|
3681
|
-
getDisplayText(entry)
|
|
3682
|
-
);
|
|
3683
|
-
} : false;
|
|
3684
|
-
return /* @__PURE__ */ React20.createElement(
|
|
3685
|
-
RechartsPrimitive.Pie,
|
|
3686
|
-
{
|
|
3687
|
-
innerRadius: resolvedInnerRadius,
|
|
3688
|
-
paddingAngle,
|
|
3689
|
-
cornerRadius,
|
|
3690
|
-
startAngle,
|
|
3691
|
-
endAngle,
|
|
3692
|
-
label: labelConfig,
|
|
3693
|
-
labelLine: false,
|
|
3694
|
-
activeShape: activeShapeConfig,
|
|
3695
|
-
...props
|
|
3696
|
-
}
|
|
3697
|
-
);
|
|
3698
|
-
}
|
|
3699
|
-
var Chart = Object.assign(ChartContainer, {
|
|
3700
|
-
Bar: ChartBar,
|
|
3701
|
-
Line: ChartLine,
|
|
3702
|
-
Area: ChartArea,
|
|
3703
|
-
Pie: ChartPie,
|
|
3704
|
-
Tooltip: ChartTooltip,
|
|
3705
|
-
TooltipContent: ChartTooltipContent,
|
|
3706
|
-
Legend: ChartLegend,
|
|
3707
|
-
LegendContent: ChartLegendContent,
|
|
3708
|
-
XAxis: ChartXAxis,
|
|
3709
|
-
YAxis: ChartYAxis,
|
|
3710
|
-
Style: ChartStyle
|
|
3711
|
-
});
|
|
3712
|
-
|
|
3713
3190
|
// src/components/ui/metric-card.tsx
|
|
3714
|
-
var
|
|
3191
|
+
var React20 = __toESM(require("react"));
|
|
3715
3192
|
var import_class_variance_authority16 = require("class-variance-authority");
|
|
3716
3193
|
var metricCardVariants = (0, import_class_variance_authority16.cva)(
|
|
3717
3194
|
"transition-colors",
|
|
@@ -3771,11 +3248,11 @@ var trendConfig = {
|
|
|
3771
3248
|
down: { color: "text-text-error", srLabel: "Decreased" },
|
|
3772
3249
|
neutral: { color: "text-text-muted", srLabel: "No change" }
|
|
3773
3250
|
};
|
|
3774
|
-
var MetricCardContext =
|
|
3775
|
-
var MetricCardRoot =
|
|
3251
|
+
var MetricCardContext = React20.createContext({ size: "default", animated: false });
|
|
3252
|
+
var MetricCardRoot = React20.forwardRef(
|
|
3776
3253
|
({ className, variant, size, radius, animated = false, children, ...props }, ref) => {
|
|
3777
3254
|
const resolvedSize = size || "default";
|
|
3778
|
-
return /* @__PURE__ */
|
|
3255
|
+
return /* @__PURE__ */ React20.createElement(MetricCardContext.Provider, { value: { size: resolvedSize, animated } }, /* @__PURE__ */ React20.createElement(
|
|
3779
3256
|
"div",
|
|
3780
3257
|
{
|
|
3781
3258
|
ref,
|
|
@@ -3787,8 +3264,8 @@ var MetricCardRoot = React21.forwardRef(
|
|
|
3787
3264
|
}
|
|
3788
3265
|
);
|
|
3789
3266
|
MetricCardRoot.displayName = "MetricCard";
|
|
3790
|
-
var MetricCardHeader =
|
|
3791
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
3267
|
+
var MetricCardHeader = React20.forwardRef(
|
|
3268
|
+
({ className, ...props }, ref) => /* @__PURE__ */ React20.createElement(
|
|
3792
3269
|
"div",
|
|
3793
3270
|
{
|
|
3794
3271
|
ref,
|
|
@@ -3798,10 +3275,10 @@ var MetricCardHeader = React21.forwardRef(
|
|
|
3798
3275
|
)
|
|
3799
3276
|
);
|
|
3800
3277
|
MetricCardHeader.displayName = "MetricCardHeader";
|
|
3801
|
-
var MetricCardTitle =
|
|
3278
|
+
var MetricCardTitle = React20.forwardRef(
|
|
3802
3279
|
({ className, ...props }, ref) => {
|
|
3803
|
-
const { size } =
|
|
3804
|
-
return /* @__PURE__ */
|
|
3280
|
+
const { size } = React20.useContext(MetricCardContext);
|
|
3281
|
+
return /* @__PURE__ */ React20.createElement(
|
|
3805
3282
|
"p",
|
|
3806
3283
|
{
|
|
3807
3284
|
ref,
|
|
@@ -3812,11 +3289,11 @@ var MetricCardTitle = React21.forwardRef(
|
|
|
3812
3289
|
}
|
|
3813
3290
|
);
|
|
3814
3291
|
MetricCardTitle.displayName = "MetricCardTitle";
|
|
3815
|
-
var MetricCardValue =
|
|
3292
|
+
var MetricCardValue = React20.forwardRef(
|
|
3816
3293
|
({ className, children, ...props }, ref) => {
|
|
3817
|
-
const { size, animated } =
|
|
3818
|
-
const [display, setDisplay] =
|
|
3819
|
-
|
|
3294
|
+
const { size, animated } = React20.useContext(MetricCardContext);
|
|
3295
|
+
const [display, setDisplay] = React20.useState(children);
|
|
3296
|
+
React20.useEffect(() => {
|
|
3820
3297
|
if (!animated || typeof children !== "string") {
|
|
3821
3298
|
setDisplay(children);
|
|
3822
3299
|
return;
|
|
@@ -3851,7 +3328,7 @@ var MetricCardValue = React21.forwardRef(
|
|
|
3851
3328
|
}, duration / steps);
|
|
3852
3329
|
return () => clearInterval(timer);
|
|
3853
3330
|
}, [children, animated]);
|
|
3854
|
-
return /* @__PURE__ */
|
|
3331
|
+
return /* @__PURE__ */ React20.createElement(
|
|
3855
3332
|
"p",
|
|
3856
3333
|
{
|
|
3857
3334
|
ref,
|
|
@@ -3863,27 +3340,27 @@ var MetricCardValue = React21.forwardRef(
|
|
|
3863
3340
|
}
|
|
3864
3341
|
);
|
|
3865
3342
|
MetricCardValue.displayName = "MetricCardValue";
|
|
3866
|
-
var MetricCardTrend =
|
|
3343
|
+
var MetricCardTrend = React20.forwardRef(
|
|
3867
3344
|
({ className, direction, children, ...props }, ref) => {
|
|
3868
3345
|
const config = trendConfig[direction];
|
|
3869
|
-
return /* @__PURE__ */
|
|
3346
|
+
return /* @__PURE__ */ React20.createElement(
|
|
3870
3347
|
"p",
|
|
3871
3348
|
{
|
|
3872
3349
|
ref,
|
|
3873
3350
|
className: cn("flex items-center gap-1 text-sm mt-2", config.color, className),
|
|
3874
3351
|
...props
|
|
3875
3352
|
},
|
|
3876
|
-
direction === "up" && /* @__PURE__ */
|
|
3877
|
-
direction === "down" && /* @__PURE__ */
|
|
3878
|
-
direction === "neutral" && /* @__PURE__ */
|
|
3879
|
-
/* @__PURE__ */
|
|
3353
|
+
direction === "up" && /* @__PURE__ */ React20.createElement("svg", { className: "icon-xs", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2.5, "aria-hidden": "true" }, /* @__PURE__ */ React20.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4.5 15.75l7.5-7.5 7.5 7.5" })),
|
|
3354
|
+
direction === "down" && /* @__PURE__ */ React20.createElement("svg", { className: "icon-xs", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2.5, "aria-hidden": "true" }, /* @__PURE__ */ React20.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19.5 8.25l-7.5 7.5-7.5-7.5" })),
|
|
3355
|
+
direction === "neutral" && /* @__PURE__ */ React20.createElement("svg", { className: "icon-xs", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2.5, "aria-hidden": "true" }, /* @__PURE__ */ React20.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 12h14" })),
|
|
3356
|
+
/* @__PURE__ */ React20.createElement("span", { className: "sr-only" }, config.srLabel),
|
|
3880
3357
|
children
|
|
3881
3358
|
);
|
|
3882
3359
|
}
|
|
3883
3360
|
);
|
|
3884
3361
|
MetricCardTrend.displayName = "MetricCardTrend";
|
|
3885
|
-
var MetricCardDescription =
|
|
3886
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
3362
|
+
var MetricCardDescription = React20.forwardRef(
|
|
3363
|
+
({ className, ...props }, ref) => /* @__PURE__ */ React20.createElement(
|
|
3887
3364
|
"p",
|
|
3888
3365
|
{
|
|
3889
3366
|
ref,
|
|
@@ -3893,10 +3370,10 @@ var MetricCardDescription = React21.forwardRef(
|
|
|
3893
3370
|
)
|
|
3894
3371
|
);
|
|
3895
3372
|
MetricCardDescription.displayName = "MetricCardDescription";
|
|
3896
|
-
var MetricCardSymbol =
|
|
3373
|
+
var MetricCardSymbol = React20.forwardRef(
|
|
3897
3374
|
({ className, ...props }, ref) => {
|
|
3898
|
-
const { size } =
|
|
3899
|
-
return /* @__PURE__ */
|
|
3375
|
+
const { size } = React20.useContext(MetricCardContext);
|
|
3376
|
+
return /* @__PURE__ */ React20.createElement(
|
|
3900
3377
|
"div",
|
|
3901
3378
|
{
|
|
3902
3379
|
ref,
|
|
@@ -3917,7 +3394,7 @@ var MetricCard = Object.assign(MetricCardRoot, {
|
|
|
3917
3394
|
});
|
|
3918
3395
|
|
|
3919
3396
|
// src/components/ui/badge.tsx
|
|
3920
|
-
var
|
|
3397
|
+
var React21 = __toESM(require("react"));
|
|
3921
3398
|
var import_react_slot4 = require("@radix-ui/react-slot");
|
|
3922
3399
|
var import_class_variance_authority17 = require("class-variance-authority");
|
|
3923
3400
|
var colorMap = {
|
|
@@ -4004,7 +3481,7 @@ var dotColorMap = {
|
|
|
4004
3481
|
error: "bg-error",
|
|
4005
3482
|
info: "bg-info"
|
|
4006
3483
|
};
|
|
4007
|
-
var Badge =
|
|
3484
|
+
var Badge = React21.forwardRef(
|
|
4008
3485
|
({
|
|
4009
3486
|
className,
|
|
4010
3487
|
variant = "subtle",
|
|
@@ -4024,7 +3501,7 @@ var Badge = React22.forwardRef(
|
|
|
4024
3501
|
const colorClasses = colorMap[color][variant];
|
|
4025
3502
|
const outlineClasses = variant === "outline" ? "border bg-transparent" : "";
|
|
4026
3503
|
const dotColor = variant === "solid" ? "bg-current" : dotColorMap[color];
|
|
4027
|
-
return /* @__PURE__ */
|
|
3504
|
+
return /* @__PURE__ */ React21.createElement(
|
|
4028
3505
|
Comp,
|
|
4029
3506
|
{
|
|
4030
3507
|
ref,
|
|
@@ -4036,14 +3513,14 @@ var Badge = React22.forwardRef(
|
|
|
4036
3513
|
),
|
|
4037
3514
|
...props
|
|
4038
3515
|
},
|
|
4039
|
-
dot && /* @__PURE__ */
|
|
3516
|
+
dot && /* @__PURE__ */ React21.createElement(
|
|
4040
3517
|
"span",
|
|
4041
3518
|
{
|
|
4042
3519
|
className: cn("shrink-0 rounded-full", badgeDotSizes[resolvedSize], dotColor),
|
|
4043
3520
|
"aria-hidden": "true"
|
|
4044
3521
|
}
|
|
4045
3522
|
),
|
|
4046
|
-
icon && /* @__PURE__ */
|
|
3523
|
+
icon && /* @__PURE__ */ React21.createElement(
|
|
4047
3524
|
"span",
|
|
4048
3525
|
{
|
|
4049
3526
|
className: cn("shrink-0 [&>svg]:w-full [&>svg]:h-full", badgeIconSizes[resolvedSize]),
|
|
@@ -4052,7 +3529,7 @@ var Badge = React22.forwardRef(
|
|
|
4052
3529
|
icon
|
|
4053
3530
|
),
|
|
4054
3531
|
children,
|
|
4055
|
-
removable && /* @__PURE__ */
|
|
3532
|
+
removable && /* @__PURE__ */ React21.createElement(
|
|
4056
3533
|
"button",
|
|
4057
3534
|
{
|
|
4058
3535
|
type: "button",
|
|
@@ -4063,7 +3540,7 @@ var Badge = React22.forwardRef(
|
|
|
4063
3540
|
},
|
|
4064
3541
|
"aria-label": "Remove"
|
|
4065
3542
|
},
|
|
4066
|
-
/* @__PURE__ */
|
|
3543
|
+
/* @__PURE__ */ React21.createElement(
|
|
4067
3544
|
"svg",
|
|
4068
3545
|
{
|
|
4069
3546
|
className: "w-3 h-3",
|
|
@@ -4073,7 +3550,7 @@ var Badge = React22.forwardRef(
|
|
|
4073
3550
|
strokeWidth: 2,
|
|
4074
3551
|
"aria-hidden": "true"
|
|
4075
3552
|
},
|
|
4076
|
-
/* @__PURE__ */
|
|
3553
|
+
/* @__PURE__ */ React21.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" })
|
|
4077
3554
|
)
|
|
4078
3555
|
)
|
|
4079
3556
|
);
|
|
@@ -4082,15 +3559,15 @@ var Badge = React22.forwardRef(
|
|
|
4082
3559
|
Badge.displayName = "Badge";
|
|
4083
3560
|
|
|
4084
3561
|
// src/components/ui/card.tsx
|
|
4085
|
-
var
|
|
3562
|
+
var React22 = __toESM(require("react"));
|
|
4086
3563
|
var import_react_slot5 = require("@radix-ui/react-slot");
|
|
4087
3564
|
var import_class_variance_authority18 = require("class-variance-authority");
|
|
4088
|
-
var CardContext =
|
|
3565
|
+
var CardContext = React22.createContext({
|
|
4089
3566
|
size: "default",
|
|
4090
3567
|
direction: "vertical"
|
|
4091
3568
|
});
|
|
4092
3569
|
function useCard() {
|
|
4093
|
-
return
|
|
3570
|
+
return React22.useContext(CardContext);
|
|
4094
3571
|
}
|
|
4095
3572
|
var cardVariants = (0, import_class_variance_authority18.cva)(
|
|
4096
3573
|
"flex overflow-hidden transition-all duration-normal",
|
|
@@ -4133,7 +3610,7 @@ var cardVariants = (0, import_class_variance_authority18.cva)(
|
|
|
4133
3610
|
}
|
|
4134
3611
|
}
|
|
4135
3612
|
);
|
|
4136
|
-
var CardRoot =
|
|
3613
|
+
var CardRoot = React22.forwardRef(
|
|
4137
3614
|
({
|
|
4138
3615
|
className,
|
|
4139
3616
|
variant = "default",
|
|
@@ -4148,19 +3625,19 @@ var CardRoot = React23.forwardRef(
|
|
|
4148
3625
|
const Comp = asChild ? import_react_slot5.Slot : "div";
|
|
4149
3626
|
let content = children;
|
|
4150
3627
|
if (direction === "horizontal") {
|
|
4151
|
-
const childArray =
|
|
3628
|
+
const childArray = React22.Children.toArray(children);
|
|
4152
3629
|
const imageChildren = [];
|
|
4153
3630
|
const otherChildren = [];
|
|
4154
3631
|
childArray.forEach((child) => {
|
|
4155
|
-
if (
|
|
3632
|
+
if (React22.isValidElement(child) && child.type === CardImage) {
|
|
4156
3633
|
imageChildren.push(child);
|
|
4157
3634
|
} else {
|
|
4158
3635
|
otherChildren.push(child);
|
|
4159
3636
|
}
|
|
4160
3637
|
});
|
|
4161
|
-
content = /* @__PURE__ */
|
|
3638
|
+
content = /* @__PURE__ */ React22.createElement(React22.Fragment, null, imageChildren, /* @__PURE__ */ React22.createElement("div", { className: "flex-1 flex flex-col min-w-0" }, otherChildren));
|
|
4162
3639
|
}
|
|
4163
|
-
return /* @__PURE__ */
|
|
3640
|
+
return /* @__PURE__ */ React22.createElement(CardContext.Provider, { value: { size, direction } }, /* @__PURE__ */ React22.createElement(
|
|
4164
3641
|
Comp,
|
|
4165
3642
|
{
|
|
4166
3643
|
ref,
|
|
@@ -4227,13 +3704,13 @@ var overlayOpacityMap = {
|
|
|
4227
3704
|
80: "from-black/80",
|
|
4228
3705
|
90: "from-black/90"
|
|
4229
3706
|
};
|
|
4230
|
-
var CardImage =
|
|
3707
|
+
var CardImage = React22.forwardRef(
|
|
4231
3708
|
({ className, overlay = false, overlayOpacity = 60, overlayClassName, alt = "", ...props }, ref) => {
|
|
4232
3709
|
const { direction } = useCard();
|
|
4233
3710
|
const isHorizontal = direction === "horizontal";
|
|
4234
3711
|
if (isHorizontal) {
|
|
4235
3712
|
const opacityClass = overlay ? overlayOpacityMap[overlayOpacity] || "from-black/60" : null;
|
|
4236
|
-
return /* @__PURE__ */
|
|
3713
|
+
return /* @__PURE__ */ React22.createElement("div", { className: cn("relative shrink-0 w-48 overflow-hidden", className) }, /* @__PURE__ */ React22.createElement(
|
|
4237
3714
|
"img",
|
|
4238
3715
|
{
|
|
4239
3716
|
ref,
|
|
@@ -4241,11 +3718,11 @@ var CardImage = React23.forwardRef(
|
|
|
4241
3718
|
className: "absolute inset-0 w-full h-full object-cover",
|
|
4242
3719
|
...props
|
|
4243
3720
|
}
|
|
4244
|
-
), overlay && /* @__PURE__ */
|
|
3721
|
+
), overlay && /* @__PURE__ */ React22.createElement("div", { className: cn("absolute inset-0 bg-gradient-to-t to-transparent", overlayClassName || opacityClass) }));
|
|
4245
3722
|
}
|
|
4246
3723
|
if (overlay) {
|
|
4247
3724
|
const opacityClass = overlayOpacityMap[overlayOpacity] || "from-black/60";
|
|
4248
|
-
return /* @__PURE__ */
|
|
3725
|
+
return /* @__PURE__ */ React22.createElement("div", { className: "relative w-full shrink-0 overflow-hidden" }, /* @__PURE__ */ React22.createElement(
|
|
4249
3726
|
"img",
|
|
4250
3727
|
{
|
|
4251
3728
|
ref,
|
|
@@ -4253,9 +3730,9 @@ var CardImage = React23.forwardRef(
|
|
|
4253
3730
|
className: cn("w-full object-cover", className),
|
|
4254
3731
|
...props
|
|
4255
3732
|
}
|
|
4256
|
-
), /* @__PURE__ */
|
|
3733
|
+
), /* @__PURE__ */ React22.createElement("div", { className: cn("absolute inset-0 bg-gradient-to-t to-transparent", overlayClassName || opacityClass) }));
|
|
4257
3734
|
}
|
|
4258
|
-
return /* @__PURE__ */
|
|
3735
|
+
return /* @__PURE__ */ React22.createElement(
|
|
4259
3736
|
"img",
|
|
4260
3737
|
{
|
|
4261
3738
|
ref,
|
|
@@ -4267,20 +3744,20 @@ var CardImage = React23.forwardRef(
|
|
|
4267
3744
|
}
|
|
4268
3745
|
);
|
|
4269
3746
|
CardImage.displayName = "CardImage";
|
|
4270
|
-
var CardHeader =
|
|
3747
|
+
var CardHeader = React22.forwardRef(
|
|
4271
3748
|
({ className, children, ...props }, ref) => {
|
|
4272
3749
|
const { size } = useCard();
|
|
4273
|
-
const childArray =
|
|
3750
|
+
const childArray = React22.Children.toArray(children);
|
|
4274
3751
|
const actionChildren = [];
|
|
4275
3752
|
const otherChildren = [];
|
|
4276
3753
|
childArray.forEach((child) => {
|
|
4277
|
-
if (
|
|
3754
|
+
if (React22.isValidElement(child) && child.type === CardAction) {
|
|
4278
3755
|
actionChildren.push(child);
|
|
4279
3756
|
} else {
|
|
4280
3757
|
otherChildren.push(child);
|
|
4281
3758
|
}
|
|
4282
3759
|
});
|
|
4283
|
-
return /* @__PURE__ */
|
|
3760
|
+
return /* @__PURE__ */ React22.createElement(
|
|
4284
3761
|
"div",
|
|
4285
3762
|
{
|
|
4286
3763
|
ref,
|
|
@@ -4294,15 +3771,15 @@ var CardHeader = React23.forwardRef(
|
|
|
4294
3771
|
),
|
|
4295
3772
|
...props
|
|
4296
3773
|
},
|
|
4297
|
-
/* @__PURE__ */
|
|
3774
|
+
/* @__PURE__ */ React22.createElement("div", { className: "flex-1 min-w-0 space-y-3" }, otherChildren),
|
|
4298
3775
|
actionChildren
|
|
4299
3776
|
);
|
|
4300
3777
|
}
|
|
4301
3778
|
);
|
|
4302
3779
|
CardHeader.displayName = "CardHeader";
|
|
4303
|
-
var CardTitle =
|
|
3780
|
+
var CardTitle = React22.forwardRef(
|
|
4304
3781
|
({ className, icon, children, ...props }, ref) => {
|
|
4305
|
-
return /* @__PURE__ */
|
|
3782
|
+
return /* @__PURE__ */ React22.createElement(
|
|
4306
3783
|
"h3",
|
|
4307
3784
|
{
|
|
4308
3785
|
ref,
|
|
@@ -4313,15 +3790,15 @@ var CardTitle = React23.forwardRef(
|
|
|
4313
3790
|
),
|
|
4314
3791
|
...props
|
|
4315
3792
|
},
|
|
4316
|
-
icon && /* @__PURE__ */
|
|
3793
|
+
icon && /* @__PURE__ */ React22.createElement("span", { className: "shrink-0 icon-sm [&>svg]:w-full [&>svg]:h-full", "aria-hidden": "true" }, icon),
|
|
4317
3794
|
children
|
|
4318
3795
|
);
|
|
4319
3796
|
}
|
|
4320
3797
|
);
|
|
4321
3798
|
CardTitle.displayName = "CardTitle";
|
|
4322
|
-
var CardDescription =
|
|
3799
|
+
var CardDescription = React22.forwardRef(
|
|
4323
3800
|
({ className, ...props }, ref) => {
|
|
4324
|
-
return /* @__PURE__ */
|
|
3801
|
+
return /* @__PURE__ */ React22.createElement(
|
|
4325
3802
|
"p",
|
|
4326
3803
|
{
|
|
4327
3804
|
ref,
|
|
@@ -4332,9 +3809,9 @@ var CardDescription = React23.forwardRef(
|
|
|
4332
3809
|
}
|
|
4333
3810
|
);
|
|
4334
3811
|
CardDescription.displayName = "CardDescription";
|
|
4335
|
-
var CardAction =
|
|
3812
|
+
var CardAction = React22.forwardRef(
|
|
4336
3813
|
({ className, ...props }, ref) => {
|
|
4337
|
-
return /* @__PURE__ */
|
|
3814
|
+
return /* @__PURE__ */ React22.createElement(
|
|
4338
3815
|
"div",
|
|
4339
3816
|
{
|
|
4340
3817
|
ref,
|
|
@@ -4345,10 +3822,10 @@ var CardAction = React23.forwardRef(
|
|
|
4345
3822
|
}
|
|
4346
3823
|
);
|
|
4347
3824
|
CardAction.displayName = "CardAction";
|
|
4348
|
-
var CardContent =
|
|
3825
|
+
var CardContent = React22.forwardRef(
|
|
4349
3826
|
({ className, ...props }, ref) => {
|
|
4350
3827
|
const { size } = useCard();
|
|
4351
|
-
return /* @__PURE__ */
|
|
3828
|
+
return /* @__PURE__ */ React22.createElement(
|
|
4352
3829
|
"div",
|
|
4353
3830
|
{
|
|
4354
3831
|
ref,
|
|
@@ -4359,10 +3836,10 @@ var CardContent = React23.forwardRef(
|
|
|
4359
3836
|
}
|
|
4360
3837
|
);
|
|
4361
3838
|
CardContent.displayName = "CardContent";
|
|
4362
|
-
var CardFooter =
|
|
3839
|
+
var CardFooter = React22.forwardRef(
|
|
4363
3840
|
({ className, ...props }, ref) => {
|
|
4364
3841
|
const { size } = useCard();
|
|
4365
|
-
return /* @__PURE__ */
|
|
3842
|
+
return /* @__PURE__ */ React22.createElement(
|
|
4366
3843
|
"div",
|
|
4367
3844
|
{
|
|
4368
3845
|
ref,
|
|
@@ -4390,9 +3867,9 @@ var Card = Object.assign(CardRoot, {
|
|
|
4390
3867
|
});
|
|
4391
3868
|
|
|
4392
3869
|
// src/components/ui/table.tsx
|
|
4393
|
-
var
|
|
3870
|
+
var React23 = __toESM(require("react"));
|
|
4394
3871
|
var import_class_variance_authority19 = require("class-variance-authority");
|
|
4395
|
-
var TableContext =
|
|
3872
|
+
var TableContext = React23.createContext({ size: "default", variant: "default", stickyHeader: false });
|
|
4396
3873
|
var cellPaddingMap = {
|
|
4397
3874
|
sm: "px-3 py-2 text-sm",
|
|
4398
3875
|
default: "px-4 py-3 text-sm",
|
|
@@ -4423,8 +3900,8 @@ var tableVariants = (0, import_class_variance_authority19.cva)(
|
|
|
4423
3900
|
}
|
|
4424
3901
|
}
|
|
4425
3902
|
);
|
|
4426
|
-
var TableRoot =
|
|
4427
|
-
({ className, size = "default", variant = "default", stickyHeader = false, wrapperClassName, ...props }, ref) => /* @__PURE__ */
|
|
3903
|
+
var TableRoot = React23.forwardRef(
|
|
3904
|
+
({ className, size = "default", variant = "default", stickyHeader = false, wrapperClassName, ...props }, ref) => /* @__PURE__ */ React23.createElement(TableContext.Provider, { value: { size, variant, stickyHeader } }, /* @__PURE__ */ React23.createElement("div", { className: cn("relative w-full overflow-auto", wrapperClassName) }, /* @__PURE__ */ React23.createElement(
|
|
4428
3905
|
"table",
|
|
4429
3906
|
{
|
|
4430
3907
|
ref,
|
|
@@ -4434,9 +3911,9 @@ var TableRoot = React24.forwardRef(
|
|
|
4434
3911
|
)))
|
|
4435
3912
|
);
|
|
4436
3913
|
TableRoot.displayName = "Table";
|
|
4437
|
-
var TableHeader =
|
|
4438
|
-
const { stickyHeader } =
|
|
4439
|
-
return /* @__PURE__ */
|
|
3914
|
+
var TableHeader = React23.forwardRef(({ className, ...props }, ref) => {
|
|
3915
|
+
const { stickyHeader } = React23.useContext(TableContext);
|
|
3916
|
+
return /* @__PURE__ */ React23.createElement(
|
|
4440
3917
|
"thead",
|
|
4441
3918
|
{
|
|
4442
3919
|
ref,
|
|
@@ -4450,9 +3927,9 @@ var TableHeader = React24.forwardRef(({ className, ...props }, ref) => {
|
|
|
4450
3927
|
);
|
|
4451
3928
|
});
|
|
4452
3929
|
TableHeader.displayName = "TableHeader";
|
|
4453
|
-
var TableBody =
|
|
4454
|
-
const { variant } =
|
|
4455
|
-
return /* @__PURE__ */
|
|
3930
|
+
var TableBody = React23.forwardRef(({ className, ...props }, ref) => {
|
|
3931
|
+
const { variant } = React23.useContext(TableContext);
|
|
3932
|
+
return /* @__PURE__ */ React23.createElement(
|
|
4456
3933
|
"tbody",
|
|
4457
3934
|
{
|
|
4458
3935
|
ref,
|
|
@@ -4466,7 +3943,7 @@ var TableBody = React24.forwardRef(({ className, ...props }, ref) => {
|
|
|
4466
3943
|
);
|
|
4467
3944
|
});
|
|
4468
3945
|
TableBody.displayName = "TableBody";
|
|
4469
|
-
var TableFooter =
|
|
3946
|
+
var TableFooter = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(
|
|
4470
3947
|
"tfoot",
|
|
4471
3948
|
{
|
|
4472
3949
|
ref,
|
|
@@ -4478,8 +3955,8 @@ var TableFooter = React24.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
4478
3955
|
}
|
|
4479
3956
|
));
|
|
4480
3957
|
TableFooter.displayName = "TableFooter";
|
|
4481
|
-
var TableRow =
|
|
4482
|
-
({ className, interactive = false, selected = false, ...props }, ref) => /* @__PURE__ */
|
|
3958
|
+
var TableRow = React23.forwardRef(
|
|
3959
|
+
({ className, interactive = false, selected = false, ...props }, ref) => /* @__PURE__ */ React23.createElement(
|
|
4483
3960
|
"tr",
|
|
4484
3961
|
{
|
|
4485
3962
|
ref,
|
|
@@ -4495,15 +3972,15 @@ var TableRow = React24.forwardRef(
|
|
|
4495
3972
|
);
|
|
4496
3973
|
TableRow.displayName = "TableRow";
|
|
4497
3974
|
var defaultSortIcons = {
|
|
4498
|
-
asc: /* @__PURE__ */
|
|
4499
|
-
desc: /* @__PURE__ */
|
|
4500
|
-
default: /* @__PURE__ */
|
|
3975
|
+
asc: /* @__PURE__ */ React23.createElement("svg", { className: "icon-xs", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, "aria-hidden": "true" }, /* @__PURE__ */ React23.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 15l7-7 7 7" })),
|
|
3976
|
+
desc: /* @__PURE__ */ React23.createElement("svg", { className: "icon-xs", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, "aria-hidden": "true" }, /* @__PURE__ */ React23.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" })),
|
|
3977
|
+
default: /* @__PURE__ */ React23.createElement("svg", { className: "icon-xs", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, "aria-hidden": "true" }, /* @__PURE__ */ React23.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4" }))
|
|
4501
3978
|
};
|
|
4502
|
-
var TableHead =
|
|
3979
|
+
var TableHead = React23.forwardRef(
|
|
4503
3980
|
({ className, align = "left", sortable = false, sortDirection = null, onSort, sortIcon, children, ...props }, ref) => {
|
|
4504
|
-
const { size } =
|
|
3981
|
+
const { size } = React23.useContext(TableContext);
|
|
4505
3982
|
const icons = { ...defaultSortIcons, ...sortIcon };
|
|
4506
|
-
const content = sortable ? /* @__PURE__ */
|
|
3983
|
+
const content = sortable ? /* @__PURE__ */ React23.createElement(
|
|
4507
3984
|
"button",
|
|
4508
3985
|
{
|
|
4509
3986
|
type: "button",
|
|
@@ -4511,12 +3988,12 @@ var TableHead = React24.forwardRef(
|
|
|
4511
3988
|
onClick: onSort
|
|
4512
3989
|
},
|
|
4513
3990
|
children,
|
|
4514
|
-
/* @__PURE__ */
|
|
3991
|
+
/* @__PURE__ */ React23.createElement("span", { className: cn(
|
|
4515
3992
|
"shrink-0 transition-colors duration-fast",
|
|
4516
3993
|
sortDirection ? "text-foreground" : "text-text-muted"
|
|
4517
3994
|
) }, sortDirection === "asc" ? icons.asc : sortDirection === "desc" ? icons.desc : icons.default)
|
|
4518
3995
|
) : children;
|
|
4519
|
-
return /* @__PURE__ */
|
|
3996
|
+
return /* @__PURE__ */ React23.createElement(
|
|
4520
3997
|
"th",
|
|
4521
3998
|
{
|
|
4522
3999
|
ref,
|
|
@@ -4537,10 +4014,10 @@ var TableHead = React24.forwardRef(
|
|
|
4537
4014
|
}
|
|
4538
4015
|
);
|
|
4539
4016
|
TableHead.displayName = "TableHead";
|
|
4540
|
-
var TableCell =
|
|
4017
|
+
var TableCell = React23.forwardRef(
|
|
4541
4018
|
({ className, align = "left", ...props }, ref) => {
|
|
4542
|
-
const { size } =
|
|
4543
|
-
return /* @__PURE__ */
|
|
4019
|
+
const { size } = React23.useContext(TableContext);
|
|
4020
|
+
return /* @__PURE__ */ React23.createElement(
|
|
4544
4021
|
"td",
|
|
4545
4022
|
{
|
|
4546
4023
|
ref,
|
|
@@ -4558,7 +4035,7 @@ var TableCell = React24.forwardRef(
|
|
|
4558
4035
|
}
|
|
4559
4036
|
);
|
|
4560
4037
|
TableCell.displayName = "TableCell";
|
|
4561
|
-
var TableCaption =
|
|
4038
|
+
var TableCaption = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(
|
|
4562
4039
|
"caption",
|
|
4563
4040
|
{
|
|
4564
4041
|
ref,
|
|
@@ -4578,11 +4055,11 @@ var Table = Object.assign(TableRoot, {
|
|
|
4578
4055
|
});
|
|
4579
4056
|
|
|
4580
4057
|
// src/components/ui/tabs.tsx
|
|
4581
|
-
var
|
|
4058
|
+
var React24 = __toESM(require("react"));
|
|
4582
4059
|
var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"));
|
|
4583
4060
|
var import_class_variance_authority20 = require("class-variance-authority");
|
|
4584
|
-
var TabsStyleContext =
|
|
4585
|
-
var useTabsStyleContext = () =>
|
|
4061
|
+
var TabsStyleContext = React24.createContext({});
|
|
4062
|
+
var useTabsStyleContext = () => React24.useContext(TabsStyleContext);
|
|
4586
4063
|
var tabsListVariants = (0, import_class_variance_authority20.cva)(
|
|
4587
4064
|
"inline-flex items-center text-text-subtle",
|
|
4588
4065
|
{
|
|
@@ -4603,9 +4080,9 @@ var tabsListVariants = (0, import_class_variance_authority20.cva)(
|
|
|
4603
4080
|
}
|
|
4604
4081
|
}
|
|
4605
4082
|
);
|
|
4606
|
-
var TabsList =
|
|
4083
|
+
var TabsList = React24.forwardRef(({ className, variant, size, fitted, color, radius, ...props }, ref) => {
|
|
4607
4084
|
const resolvedVariant = variant || "line";
|
|
4608
|
-
return /* @__PURE__ */
|
|
4085
|
+
return /* @__PURE__ */ React24.createElement(TabsStyleContext.Provider, { value: { variant: resolvedVariant, size: size || "default", fitted: fitted ?? false, color: color || "default", radius: radius || "md" } }, /* @__PURE__ */ React24.createElement(
|
|
4609
4086
|
TabsPrimitive.List,
|
|
4610
4087
|
{
|
|
4611
4088
|
ref,
|
|
@@ -4727,10 +4204,10 @@ var pillItemRadiusClasses = {
|
|
|
4727
4204
|
"3xl": "rounded-2xl",
|
|
4728
4205
|
full: "rounded-full"
|
|
4729
4206
|
};
|
|
4730
|
-
var TabsTrigger =
|
|
4207
|
+
var TabsTrigger = React24.forwardRef(({ className, children, ...props }, ref) => {
|
|
4731
4208
|
const { variant, size, fitted, color, radius } = useTabsStyleContext();
|
|
4732
4209
|
const resolvedSize = size || "default";
|
|
4733
|
-
return /* @__PURE__ */
|
|
4210
|
+
return /* @__PURE__ */ React24.createElement(
|
|
4734
4211
|
TabsPrimitive.Trigger,
|
|
4735
4212
|
{
|
|
4736
4213
|
ref,
|
|
@@ -4748,7 +4225,7 @@ var TabsTrigger = React25.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
4748
4225
|
);
|
|
4749
4226
|
});
|
|
4750
4227
|
TabsTrigger.displayName = "TabsTrigger";
|
|
4751
|
-
var TabsContent =
|
|
4228
|
+
var TabsContent = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React24.createElement(
|
|
4752
4229
|
TabsPrimitive.Content,
|
|
4753
4230
|
{
|
|
4754
4231
|
ref,
|
|
@@ -4768,15 +4245,15 @@ var Tabs = Object.assign(TabsRoot, {
|
|
|
4768
4245
|
});
|
|
4769
4246
|
|
|
4770
4247
|
// src/components/ui/navigation-menu.tsx
|
|
4771
|
-
var
|
|
4248
|
+
var React25 = __toESM(require("react"));
|
|
4772
4249
|
var NavigationMenuPrimitive = __toESM(require("@radix-ui/react-navigation-menu"));
|
|
4773
4250
|
var CollapsiblePrimitive = __toESM(require("@radix-ui/react-collapsible"));
|
|
4774
4251
|
var import_react_slot6 = require("@radix-ui/react-slot");
|
|
4775
4252
|
function ChevronDownIcon({ className }) {
|
|
4776
|
-
return /* @__PURE__ */
|
|
4253
|
+
return /* @__PURE__ */ React25.createElement("svg", { className, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, "aria-hidden": "true" }, /* @__PURE__ */ React25.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" }));
|
|
4777
4254
|
}
|
|
4778
4255
|
function ChevronRightIcon2({ className }) {
|
|
4779
|
-
return /* @__PURE__ */
|
|
4256
|
+
return /* @__PURE__ */ React25.createElement("svg", { className, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, "aria-hidden": "true" }, /* @__PURE__ */ React25.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }));
|
|
4780
4257
|
}
|
|
4781
4258
|
var contentRadiusMap3 = {
|
|
4782
4259
|
sm: "rounded",
|
|
@@ -4798,15 +4275,15 @@ var itemRadiusMap3 = {
|
|
|
4798
4275
|
xl: "rounded-lg"
|
|
4799
4276
|
// 8px
|
|
4800
4277
|
};
|
|
4801
|
-
var NavigationMenuContext =
|
|
4278
|
+
var NavigationMenuContext = React25.createContext({
|
|
4802
4279
|
orientation: "horizontal",
|
|
4803
4280
|
size: "default",
|
|
4804
4281
|
collapsed: false,
|
|
4805
4282
|
radius: "lg",
|
|
4806
4283
|
fontWeight: "normal"
|
|
4807
4284
|
});
|
|
4808
|
-
var useNavigationMenuContext = () =>
|
|
4809
|
-
var ContentLevelContext =
|
|
4285
|
+
var useNavigationMenuContext = () => React25.useContext(NavigationMenuContext);
|
|
4286
|
+
var ContentLevelContext = React25.createContext(false);
|
|
4810
4287
|
var navigationMenuSizeMap = {
|
|
4811
4288
|
sm: {
|
|
4812
4289
|
trigger: "h-8 text-sm px-3 gap-2",
|
|
@@ -4853,7 +4330,7 @@ var navigationMenuSizeMap = {
|
|
|
4853
4330
|
groupMargin: "mt-6 first:mt-0"
|
|
4854
4331
|
}
|
|
4855
4332
|
};
|
|
4856
|
-
var NavigationMenuRoot =
|
|
4333
|
+
var NavigationMenuRoot = React25.forwardRef(
|
|
4857
4334
|
({
|
|
4858
4335
|
className,
|
|
4859
4336
|
orientation = "horizontal",
|
|
@@ -4872,12 +4349,12 @@ var NavigationMenuRoot = React26.forwardRef(
|
|
|
4872
4349
|
style,
|
|
4873
4350
|
...props
|
|
4874
4351
|
}, ref) => {
|
|
4875
|
-
const contextValue =
|
|
4352
|
+
const contextValue = React25.useMemo(
|
|
4876
4353
|
() => ({ orientation, size, collapsed: orientation === "vertical" ? collapsed : false, radius, fontWeight }),
|
|
4877
4354
|
[orientation, size, collapsed, radius, fontWeight]
|
|
4878
4355
|
);
|
|
4879
4356
|
if (orientation === "horizontal") {
|
|
4880
|
-
return /* @__PURE__ */
|
|
4357
|
+
return /* @__PURE__ */ React25.createElement(NavigationMenuContext.Provider, { value: contextValue }, /* @__PURE__ */ React25.createElement(
|
|
4881
4358
|
NavigationMenuPrimitive.Root,
|
|
4882
4359
|
{
|
|
4883
4360
|
ref,
|
|
@@ -4893,7 +4370,7 @@ var NavigationMenuRoot = React26.forwardRef(
|
|
|
4893
4370
|
}
|
|
4894
4371
|
const resolvedWidth = collapsed ? collapsedWidth ?? navigationMenuSizeMap[size].collapsedWidth : width ?? 256;
|
|
4895
4372
|
const widthValue = typeof resolvedWidth === "number" ? `${resolvedWidth}px` : resolvedWidth;
|
|
4896
|
-
return /* @__PURE__ */
|
|
4373
|
+
return /* @__PURE__ */ React25.createElement(NavigationMenuContext.Provider, { value: contextValue }, /* @__PURE__ */ React25.createElement(
|
|
4897
4374
|
"nav",
|
|
4898
4375
|
{
|
|
4899
4376
|
ref,
|
|
@@ -4911,11 +4388,11 @@ var NavigationMenuRoot = React26.forwardRef(
|
|
|
4911
4388
|
}
|
|
4912
4389
|
);
|
|
4913
4390
|
NavigationMenuRoot.displayName = "NavigationMenu";
|
|
4914
|
-
var NavigationMenuList =
|
|
4391
|
+
var NavigationMenuList = React25.forwardRef(
|
|
4915
4392
|
({ className, children, ...props }, ref) => {
|
|
4916
4393
|
const { orientation } = useNavigationMenuContext();
|
|
4917
4394
|
if (orientation === "horizontal") {
|
|
4918
|
-
return /* @__PURE__ */
|
|
4395
|
+
return /* @__PURE__ */ React25.createElement(
|
|
4919
4396
|
NavigationMenuPrimitive.List,
|
|
4920
4397
|
{
|
|
4921
4398
|
ref,
|
|
@@ -4925,7 +4402,7 @@ var NavigationMenuList = React26.forwardRef(
|
|
|
4925
4402
|
children
|
|
4926
4403
|
);
|
|
4927
4404
|
}
|
|
4928
|
-
return /* @__PURE__ */
|
|
4405
|
+
return /* @__PURE__ */ React25.createElement(
|
|
4929
4406
|
"ul",
|
|
4930
4407
|
{
|
|
4931
4408
|
ref,
|
|
@@ -4937,15 +4414,15 @@ var NavigationMenuList = React26.forwardRef(
|
|
|
4937
4414
|
}
|
|
4938
4415
|
);
|
|
4939
4416
|
NavigationMenuList.displayName = "NavigationMenuList";
|
|
4940
|
-
var NavigationMenuItem =
|
|
4417
|
+
var NavigationMenuItem = React25.forwardRef(
|
|
4941
4418
|
({ className, value, defaultOpen = false, children, ...props }, ref) => {
|
|
4942
4419
|
const { orientation, collapsed } = useNavigationMenuContext();
|
|
4943
|
-
const [open, setOpen] =
|
|
4944
|
-
|
|
4420
|
+
const [open, setOpen] = React25.useState(defaultOpen);
|
|
4421
|
+
React25.useEffect(() => {
|
|
4945
4422
|
if (collapsed) setOpen(false);
|
|
4946
4423
|
}, [collapsed]);
|
|
4947
4424
|
if (orientation === "horizontal") {
|
|
4948
|
-
return /* @__PURE__ */
|
|
4425
|
+
return /* @__PURE__ */ React25.createElement(
|
|
4949
4426
|
NavigationMenuPrimitive.Item,
|
|
4950
4427
|
{
|
|
4951
4428
|
ref,
|
|
@@ -4956,25 +4433,25 @@ var NavigationMenuItem = React26.forwardRef(
|
|
|
4956
4433
|
children
|
|
4957
4434
|
);
|
|
4958
4435
|
}
|
|
4959
|
-
return /* @__PURE__ */
|
|
4436
|
+
return /* @__PURE__ */ React25.createElement(
|
|
4960
4437
|
CollapsiblePrimitive.Root,
|
|
4961
4438
|
{
|
|
4962
4439
|
open: collapsed ? false : open,
|
|
4963
4440
|
onOpenChange: collapsed ? void 0 : setOpen,
|
|
4964
4441
|
asChild: true
|
|
4965
4442
|
},
|
|
4966
|
-
/* @__PURE__ */
|
|
4443
|
+
/* @__PURE__ */ React25.createElement("li", { ref, className: cn("", className), ...props }, children)
|
|
4967
4444
|
);
|
|
4968
4445
|
}
|
|
4969
4446
|
);
|
|
4970
4447
|
NavigationMenuItem.displayName = "NavigationMenuItem";
|
|
4971
|
-
var NavigationMenuTrigger =
|
|
4448
|
+
var NavigationMenuTrigger = React25.forwardRef(
|
|
4972
4449
|
({ className, children, icon, chevronIcon, ...props }, ref) => {
|
|
4973
4450
|
const { orientation, size, collapsed, radius, fontWeight: fw } = useNavigationMenuContext();
|
|
4974
4451
|
const s = navigationMenuSizeMap[size];
|
|
4975
4452
|
const fwClass = fw === "semibold" ? "font-semibold" : "font-normal";
|
|
4976
4453
|
if (orientation === "horizontal") {
|
|
4977
|
-
return /* @__PURE__ */
|
|
4454
|
+
return /* @__PURE__ */ React25.createElement(
|
|
4978
4455
|
NavigationMenuPrimitive.Trigger,
|
|
4979
4456
|
{
|
|
4980
4457
|
ref,
|
|
@@ -4993,12 +4470,12 @@ var NavigationMenuTrigger = React26.forwardRef(
|
|
|
4993
4470
|
),
|
|
4994
4471
|
...props
|
|
4995
4472
|
},
|
|
4996
|
-
icon && /* @__PURE__ */
|
|
4473
|
+
icon && /* @__PURE__ */ React25.createElement("span", { className: cn("shrink-0 mr-2", s.icon) }, icon),
|
|
4997
4474
|
children,
|
|
4998
|
-
/* @__PURE__ */
|
|
4475
|
+
/* @__PURE__ */ React25.createElement("span", { className: cn("shrink-0 ml-1 text-text-subtle transition-transform duration-fast group-data-[state=open]:rotate-180", s.icon) }, chevronIcon ?? /* @__PURE__ */ React25.createElement(ChevronDownIcon, { className: "size-full" }))
|
|
4999
4476
|
);
|
|
5000
4477
|
}
|
|
5001
|
-
return /* @__PURE__ */
|
|
4478
|
+
return /* @__PURE__ */ React25.createElement(
|
|
5002
4479
|
CollapsiblePrimitive.Trigger,
|
|
5003
4480
|
{
|
|
5004
4481
|
ref,
|
|
@@ -5017,8 +4494,8 @@ var NavigationMenuTrigger = React26.forwardRef(
|
|
|
5017
4494
|
...collapsed && typeof children === "string" ? { title: children } : {},
|
|
5018
4495
|
...props
|
|
5019
4496
|
},
|
|
5020
|
-
icon && /* @__PURE__ */
|
|
5021
|
-
!collapsed && /* @__PURE__ */
|
|
4497
|
+
icon && /* @__PURE__ */ React25.createElement("span", { className: cn("shrink-0", s.icon) }, icon),
|
|
4498
|
+
!collapsed && /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement("span", { className: "flex-1 text-left truncate" }, children), /* @__PURE__ */ React25.createElement(
|
|
5022
4499
|
"span",
|
|
5023
4500
|
{
|
|
5024
4501
|
className: cn(
|
|
@@ -5027,17 +4504,17 @@ var NavigationMenuTrigger = React26.forwardRef(
|
|
|
5027
4504
|
"group-data-[state=open]:rotate-90"
|
|
5028
4505
|
)
|
|
5029
4506
|
},
|
|
5030
|
-
chevronIcon ?? /* @__PURE__ */
|
|
4507
|
+
chevronIcon ?? /* @__PURE__ */ React25.createElement(ChevronRightIcon2, { className: "size-full" })
|
|
5031
4508
|
))
|
|
5032
4509
|
);
|
|
5033
4510
|
}
|
|
5034
4511
|
);
|
|
5035
4512
|
NavigationMenuTrigger.displayName = "NavigationMenuTrigger";
|
|
5036
|
-
var NavigationMenuContent =
|
|
4513
|
+
var NavigationMenuContent = React25.forwardRef(
|
|
5037
4514
|
({ className, children, ...props }, ref) => {
|
|
5038
4515
|
const { orientation, collapsed, radius } = useNavigationMenuContext();
|
|
5039
4516
|
if (orientation === "horizontal") {
|
|
5040
|
-
return /* @__PURE__ */
|
|
4517
|
+
return /* @__PURE__ */ React25.createElement(ContentLevelContext.Provider, { value: true }, /* @__PURE__ */ React25.createElement(
|
|
5041
4518
|
NavigationMenuPrimitive.Content,
|
|
5042
4519
|
{
|
|
5043
4520
|
ref,
|
|
@@ -5048,11 +4525,11 @@ var NavigationMenuContent = React26.forwardRef(
|
|
|
5048
4525
|
),
|
|
5049
4526
|
...props
|
|
5050
4527
|
},
|
|
5051
|
-
/* @__PURE__ */
|
|
4528
|
+
/* @__PURE__ */ React25.createElement("div", { className: cn("min-w-[180px] border border-border bg-background shadow-lg p-1.5 grid gap-0.5", contentRadiusMap3[radius]) }, children)
|
|
5052
4529
|
));
|
|
5053
4530
|
}
|
|
5054
4531
|
if (collapsed) return null;
|
|
5055
|
-
return /* @__PURE__ */
|
|
4532
|
+
return /* @__PURE__ */ React25.createElement(ContentLevelContext.Provider, { value: true }, /* @__PURE__ */ React25.createElement(
|
|
5056
4533
|
CollapsiblePrimitive.Content,
|
|
5057
4534
|
{
|
|
5058
4535
|
ref,
|
|
@@ -5062,7 +4539,7 @@ var NavigationMenuContent = React26.forwardRef(
|
|
|
5062
4539
|
),
|
|
5063
4540
|
...props
|
|
5064
4541
|
},
|
|
5065
|
-
/* @__PURE__ */
|
|
4542
|
+
/* @__PURE__ */ React25.createElement("div", { className: cn(
|
|
5066
4543
|
"flex flex-col gap-0.5 py-1",
|
|
5067
4544
|
className
|
|
5068
4545
|
) }, children)
|
|
@@ -5070,16 +4547,16 @@ var NavigationMenuContent = React26.forwardRef(
|
|
|
5070
4547
|
}
|
|
5071
4548
|
);
|
|
5072
4549
|
NavigationMenuContent.displayName = "NavigationMenuContent";
|
|
5073
|
-
var NavigationMenuLink =
|
|
4550
|
+
var NavigationMenuLink = React25.forwardRef(
|
|
5074
4551
|
({ className, active, asChild, icon, children, ...props }, ref) => {
|
|
5075
4552
|
const { orientation, size, collapsed, radius, fontWeight: fw } = useNavigationMenuContext();
|
|
5076
4553
|
const s = navigationMenuSizeMap[size];
|
|
5077
4554
|
const fwClass = fw === "semibold" ? "font-semibold" : "font-normal";
|
|
5078
|
-
const inContent =
|
|
4555
|
+
const inContent = React25.useContext(ContentLevelContext);
|
|
5079
4556
|
if (orientation === "horizontal") {
|
|
5080
4557
|
const { onSelect, ...radixSafeProps } = props;
|
|
5081
4558
|
if (inContent) {
|
|
5082
|
-
return /* @__PURE__ */
|
|
4559
|
+
return /* @__PURE__ */ React25.createElement(
|
|
5083
4560
|
NavigationMenuPrimitive.Link,
|
|
5084
4561
|
{
|
|
5085
4562
|
ref,
|
|
@@ -5098,10 +4575,10 @@ var NavigationMenuLink = React26.forwardRef(
|
|
|
5098
4575
|
onSelect,
|
|
5099
4576
|
...radixSafeProps
|
|
5100
4577
|
},
|
|
5101
|
-
asChild ? children : /* @__PURE__ */
|
|
4578
|
+
asChild ? children : /* @__PURE__ */ React25.createElement(React25.Fragment, null, icon && /* @__PURE__ */ React25.createElement("span", { className: cn("shrink-0", s.icon) }, icon), children)
|
|
5102
4579
|
);
|
|
5103
4580
|
}
|
|
5104
|
-
return /* @__PURE__ */
|
|
4581
|
+
return /* @__PURE__ */ React25.createElement(
|
|
5105
4582
|
NavigationMenuPrimitive.Link,
|
|
5106
4583
|
{
|
|
5107
4584
|
ref,
|
|
@@ -5121,12 +4598,12 @@ var NavigationMenuLink = React26.forwardRef(
|
|
|
5121
4598
|
onSelect,
|
|
5122
4599
|
...radixSafeProps
|
|
5123
4600
|
},
|
|
5124
|
-
asChild ? children : /* @__PURE__ */
|
|
4601
|
+
asChild ? children : /* @__PURE__ */ React25.createElement(React25.Fragment, null, icon && /* @__PURE__ */ React25.createElement("span", { className: cn("shrink-0", s.icon) }, icon), children)
|
|
5125
4602
|
);
|
|
5126
4603
|
}
|
|
5127
4604
|
const Comp = asChild ? import_react_slot6.Slot : "a";
|
|
5128
4605
|
if (inContent) {
|
|
5129
|
-
return /* @__PURE__ */
|
|
4606
|
+
return /* @__PURE__ */ React25.createElement(
|
|
5130
4607
|
Comp,
|
|
5131
4608
|
{
|
|
5132
4609
|
ref,
|
|
@@ -5143,11 +4620,11 @@ var NavigationMenuLink = React26.forwardRef(
|
|
|
5143
4620
|
...active ? { "aria-current": "page" } : {},
|
|
5144
4621
|
...props
|
|
5145
4622
|
},
|
|
5146
|
-
icon && /* @__PURE__ */
|
|
4623
|
+
icon && /* @__PURE__ */ React25.createElement("span", { className: cn("shrink-0", s.icon) }, icon),
|
|
5147
4624
|
!collapsed && children
|
|
5148
4625
|
);
|
|
5149
4626
|
}
|
|
5150
|
-
return /* @__PURE__ */
|
|
4627
|
+
return /* @__PURE__ */ React25.createElement(
|
|
5151
4628
|
Comp,
|
|
5152
4629
|
{
|
|
5153
4630
|
ref,
|
|
@@ -5165,28 +4642,28 @@ var NavigationMenuLink = React26.forwardRef(
|
|
|
5165
4642
|
...collapsed && typeof children === "string" ? { title: children } : {},
|
|
5166
4643
|
...props
|
|
5167
4644
|
},
|
|
5168
|
-
icon && /* @__PURE__ */
|
|
5169
|
-
!collapsed && /* @__PURE__ */
|
|
4645
|
+
icon && /* @__PURE__ */ React25.createElement("span", { className: cn("shrink-0", s.icon) }, icon),
|
|
4646
|
+
!collapsed && /* @__PURE__ */ React25.createElement("span", { className: "truncate" }, children)
|
|
5170
4647
|
);
|
|
5171
4648
|
}
|
|
5172
4649
|
);
|
|
5173
4650
|
NavigationMenuLink.displayName = "NavigationMenuLink";
|
|
5174
|
-
var NavigationMenuGroup =
|
|
4651
|
+
var NavigationMenuGroup = React25.forwardRef(
|
|
5175
4652
|
({ className, label, children, ...props }, ref) => {
|
|
5176
4653
|
const { size, collapsed } = useNavigationMenuContext();
|
|
5177
4654
|
const s = navigationMenuSizeMap[size];
|
|
5178
|
-
return /* @__PURE__ */
|
|
4655
|
+
return /* @__PURE__ */ React25.createElement("div", { ref, role: "group", className: cn(label && !collapsed && s.groupMargin, className), ...props }, label && !collapsed && /* @__PURE__ */ React25.createElement("div", { className: cn(
|
|
5179
4656
|
"font-semibold text-text-subtle uppercase tracking-wider select-none",
|
|
5180
4657
|
s.groupLabel
|
|
5181
|
-
) }, label), /* @__PURE__ */
|
|
4658
|
+
) }, label), /* @__PURE__ */ React25.createElement("ul", { className: "flex flex-col gap-0.5" }, children));
|
|
5182
4659
|
}
|
|
5183
4660
|
);
|
|
5184
4661
|
NavigationMenuGroup.displayName = "NavigationMenuGroup";
|
|
5185
|
-
var NavigationMenuIndicator =
|
|
4662
|
+
var NavigationMenuIndicator = React25.forwardRef(
|
|
5186
4663
|
({ className, color = "default", ...props }, ref) => {
|
|
5187
4664
|
const { orientation } = useNavigationMenuContext();
|
|
5188
4665
|
if (orientation === "vertical") return null;
|
|
5189
|
-
return /* @__PURE__ */
|
|
4666
|
+
return /* @__PURE__ */ React25.createElement(
|
|
5190
4667
|
NavigationMenuPrimitive.Indicator,
|
|
5191
4668
|
{
|
|
5192
4669
|
ref,
|
|
@@ -5198,7 +4675,7 @@ var NavigationMenuIndicator = React26.forwardRef(
|
|
|
5198
4675
|
),
|
|
5199
4676
|
...props
|
|
5200
4677
|
},
|
|
5201
|
-
/* @__PURE__ */
|
|
4678
|
+
/* @__PURE__ */ React25.createElement("div", { className: cn(
|
|
5202
4679
|
"relative h-full w-full rounded-full",
|
|
5203
4680
|
color === "default" ? "bg-foreground" : "bg-primary"
|
|
5204
4681
|
) })
|
|
@@ -5206,11 +4683,11 @@ var NavigationMenuIndicator = React26.forwardRef(
|
|
|
5206
4683
|
}
|
|
5207
4684
|
);
|
|
5208
4685
|
NavigationMenuIndicator.displayName = "NavigationMenuIndicator";
|
|
5209
|
-
var NavigationMenuViewport =
|
|
4686
|
+
var NavigationMenuViewport = React25.forwardRef(
|
|
5210
4687
|
({ className, ...props }, ref) => {
|
|
5211
4688
|
const { orientation } = useNavigationMenuContext();
|
|
5212
4689
|
if (orientation === "vertical") return null;
|
|
5213
|
-
return /* @__PURE__ */
|
|
4690
|
+
return /* @__PURE__ */ React25.createElement("div", { className: "absolute left-0 top-full z-dropdown w-auto pt-1" }, /* @__PURE__ */ React25.createElement(
|
|
5214
4691
|
NavigationMenuPrimitive.Viewport,
|
|
5215
4692
|
{
|
|
5216
4693
|
ref,
|
|
@@ -5242,10 +4719,10 @@ var NavigationMenu = Object.assign(NavigationMenuRoot, {
|
|
|
5242
4719
|
});
|
|
5243
4720
|
|
|
5244
4721
|
// src/components/ui/pagination.tsx
|
|
5245
|
-
var
|
|
4722
|
+
var React26 = __toESM(require("react"));
|
|
5246
4723
|
var import_class_variance_authority21 = require("class-variance-authority");
|
|
5247
4724
|
function ChevronLeftIcon({ className }) {
|
|
5248
|
-
return /* @__PURE__ */
|
|
4725
|
+
return /* @__PURE__ */ React26.createElement(
|
|
5249
4726
|
"svg",
|
|
5250
4727
|
{
|
|
5251
4728
|
className,
|
|
@@ -5254,11 +4731,11 @@ function ChevronLeftIcon({ className }) {
|
|
|
5254
4731
|
stroke: "currentColor",
|
|
5255
4732
|
strokeWidth: 2
|
|
5256
4733
|
},
|
|
5257
|
-
/* @__PURE__ */
|
|
4734
|
+
/* @__PURE__ */ React26.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 19l-7-7 7-7" })
|
|
5258
4735
|
);
|
|
5259
4736
|
}
|
|
5260
4737
|
function ChevronRightIcon3({ className }) {
|
|
5261
|
-
return /* @__PURE__ */
|
|
4738
|
+
return /* @__PURE__ */ React26.createElement(
|
|
5262
4739
|
"svg",
|
|
5263
4740
|
{
|
|
5264
4741
|
className,
|
|
@@ -5267,11 +4744,11 @@ function ChevronRightIcon3({ className }) {
|
|
|
5267
4744
|
stroke: "currentColor",
|
|
5268
4745
|
strokeWidth: 2
|
|
5269
4746
|
},
|
|
5270
|
-
/* @__PURE__ */
|
|
4747
|
+
/* @__PURE__ */ React26.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" })
|
|
5271
4748
|
);
|
|
5272
4749
|
}
|
|
5273
4750
|
function ChevronsLeftIcon({ className }) {
|
|
5274
|
-
return /* @__PURE__ */
|
|
4751
|
+
return /* @__PURE__ */ React26.createElement(
|
|
5275
4752
|
"svg",
|
|
5276
4753
|
{
|
|
5277
4754
|
className,
|
|
@@ -5280,11 +4757,11 @@ function ChevronsLeftIcon({ className }) {
|
|
|
5280
4757
|
stroke: "currentColor",
|
|
5281
4758
|
strokeWidth: 2
|
|
5282
4759
|
},
|
|
5283
|
-
/* @__PURE__ */
|
|
4760
|
+
/* @__PURE__ */ React26.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M11 17l-5-5 5-5M18 17l-5-5 5-5" })
|
|
5284
4761
|
);
|
|
5285
4762
|
}
|
|
5286
4763
|
function ChevronsRightIcon({ className }) {
|
|
5287
|
-
return /* @__PURE__ */
|
|
4764
|
+
return /* @__PURE__ */ React26.createElement(
|
|
5288
4765
|
"svg",
|
|
5289
4766
|
{
|
|
5290
4767
|
className,
|
|
@@ -5293,20 +4770,20 @@ function ChevronsRightIcon({ className }) {
|
|
|
5293
4770
|
stroke: "currentColor",
|
|
5294
4771
|
strokeWidth: 2
|
|
5295
4772
|
},
|
|
5296
|
-
/* @__PURE__ */
|
|
4773
|
+
/* @__PURE__ */ React26.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M13 7l5 5-5 5M6 7l5 5-5 5" })
|
|
5297
4774
|
);
|
|
5298
4775
|
}
|
|
5299
4776
|
function EllipsisIcon2({ className }) {
|
|
5300
|
-
return /* @__PURE__ */
|
|
4777
|
+
return /* @__PURE__ */ React26.createElement(
|
|
5301
4778
|
"svg",
|
|
5302
4779
|
{
|
|
5303
4780
|
className,
|
|
5304
4781
|
fill: "currentColor",
|
|
5305
4782
|
viewBox: "0 0 24 24"
|
|
5306
4783
|
},
|
|
5307
|
-
/* @__PURE__ */
|
|
5308
|
-
/* @__PURE__ */
|
|
5309
|
-
/* @__PURE__ */
|
|
4784
|
+
/* @__PURE__ */ React26.createElement("circle", { cx: "6", cy: "12", r: "1.5" }),
|
|
4785
|
+
/* @__PURE__ */ React26.createElement("circle", { cx: "12", cy: "12", r: "1.5" }),
|
|
4786
|
+
/* @__PURE__ */ React26.createElement("circle", { cx: "18", cy: "12", r: "1.5" })
|
|
5310
4787
|
);
|
|
5311
4788
|
}
|
|
5312
4789
|
function range(start, end) {
|
|
@@ -5347,9 +4824,9 @@ function usePagination({
|
|
|
5347
4824
|
...range(total - boundaries + 1, total)
|
|
5348
4825
|
];
|
|
5349
4826
|
}
|
|
5350
|
-
var PaginationContext =
|
|
4827
|
+
var PaginationContext = React26.createContext(null);
|
|
5351
4828
|
function usePaginationContext() {
|
|
5352
|
-
const ctx =
|
|
4829
|
+
const ctx = React26.useContext(PaginationContext);
|
|
5353
4830
|
if (!ctx) throw new Error("Pagination components must be used within <Pagination>");
|
|
5354
4831
|
return ctx;
|
|
5355
4832
|
}
|
|
@@ -5411,7 +4888,7 @@ function getItemClasses(variant, color, isActive, disabled) {
|
|
|
5411
4888
|
return "border border-transparent text-text-muted hover:bg-background-muted hover:text-foreground";
|
|
5412
4889
|
}
|
|
5413
4890
|
}
|
|
5414
|
-
var PaginationRoot =
|
|
4891
|
+
var PaginationRoot = React26.forwardRef(
|
|
5415
4892
|
({
|
|
5416
4893
|
className,
|
|
5417
4894
|
total = 1,
|
|
@@ -5433,17 +4910,17 @@ var PaginationRoot = React27.forwardRef(
|
|
|
5433
4910
|
children,
|
|
5434
4911
|
...props
|
|
5435
4912
|
}, ref) => {
|
|
5436
|
-
const [internalPage, setInternalPage] =
|
|
4913
|
+
const [internalPage, setInternalPage] = React26.useState(defaultValue);
|
|
5437
4914
|
const isControlled = value !== void 0;
|
|
5438
4915
|
const page = isControlled ? value : internalPage;
|
|
5439
|
-
const handlePageChange =
|
|
4916
|
+
const handlePageChange = React26.useCallback((newPage) => {
|
|
5440
4917
|
if (disabled) return;
|
|
5441
4918
|
const clamped = Math.max(1, Math.min(total, newPage));
|
|
5442
4919
|
if (!isControlled) setInternalPage(clamped);
|
|
5443
4920
|
onChange?.(clamped);
|
|
5444
4921
|
}, [disabled, total, isControlled, onChange]);
|
|
5445
4922
|
const paginationRange = usePagination({ total, siblings, boundaries, page });
|
|
5446
|
-
const contextValue =
|
|
4923
|
+
const contextValue = React26.useMemo(() => ({
|
|
5447
4924
|
page,
|
|
5448
4925
|
total,
|
|
5449
4926
|
siblings,
|
|
@@ -5457,7 +4934,7 @@ var PaginationRoot = React27.forwardRef(
|
|
|
5457
4934
|
onPageChange: handlePageChange,
|
|
5458
4935
|
paginationRange
|
|
5459
4936
|
}), [page, total, siblings, boundaries, size, variant, color, radius, disabled, loop, handlePageChange, paginationRange]);
|
|
5460
|
-
return /* @__PURE__ */
|
|
4937
|
+
return /* @__PURE__ */ React26.createElement(PaginationContext.Provider, { value: contextValue }, /* @__PURE__ */ React26.createElement(
|
|
5461
4938
|
"nav",
|
|
5462
4939
|
{
|
|
5463
4940
|
ref,
|
|
@@ -5471,11 +4948,11 @@ var PaginationRoot = React27.forwardRef(
|
|
|
5471
4948
|
}
|
|
5472
4949
|
);
|
|
5473
4950
|
PaginationRoot.displayName = "Pagination";
|
|
5474
|
-
var PaginationContent =
|
|
4951
|
+
var PaginationContent = React26.forwardRef(
|
|
5475
4952
|
({ className, ...props }, ref) => {
|
|
5476
4953
|
const { size } = usePaginationContext();
|
|
5477
4954
|
const sizeClass = paginationSizeMap[size];
|
|
5478
|
-
return /* @__PURE__ */
|
|
4955
|
+
return /* @__PURE__ */ React26.createElement(
|
|
5479
4956
|
"ul",
|
|
5480
4957
|
{
|
|
5481
4958
|
ref,
|
|
@@ -5486,16 +4963,16 @@ var PaginationContent = React27.forwardRef(
|
|
|
5486
4963
|
}
|
|
5487
4964
|
);
|
|
5488
4965
|
PaginationContent.displayName = "PaginationContent";
|
|
5489
|
-
var PaginationItem =
|
|
5490
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
4966
|
+
var PaginationItem = React26.forwardRef(
|
|
4967
|
+
({ className, ...props }, ref) => /* @__PURE__ */ React26.createElement("li", { ref, className: cn("", className), ...props })
|
|
5491
4968
|
);
|
|
5492
4969
|
PaginationItem.displayName = "PaginationItem";
|
|
5493
|
-
var PaginationLink =
|
|
4970
|
+
var PaginationLink = React26.forwardRef(
|
|
5494
4971
|
({ className, page: targetPage, isActive: isActiveProp, ...props }, ref) => {
|
|
5495
4972
|
const ctx = usePaginationContext();
|
|
5496
4973
|
const isActive = isActiveProp ?? ctx.page === targetPage;
|
|
5497
4974
|
const sizeClass = paginationSizeMap[ctx.size];
|
|
5498
|
-
return /* @__PURE__ */
|
|
4975
|
+
return /* @__PURE__ */ React26.createElement(
|
|
5499
4976
|
"button",
|
|
5500
4977
|
{
|
|
5501
4978
|
ref,
|
|
@@ -5517,7 +4994,7 @@ var PaginationLink = React27.forwardRef(
|
|
|
5517
4994
|
}
|
|
5518
4995
|
);
|
|
5519
4996
|
PaginationLink.displayName = "PaginationLink";
|
|
5520
|
-
var PaginationPrevious =
|
|
4997
|
+
var PaginationPrevious = React26.forwardRef(
|
|
5521
4998
|
({ className, icon, ...props }, ref) => {
|
|
5522
4999
|
const ctx = usePaginationContext();
|
|
5523
5000
|
const sizeClass = paginationSizeMap[ctx.size];
|
|
@@ -5529,7 +5006,7 @@ var PaginationPrevious = React27.forwardRef(
|
|
|
5529
5006
|
ctx.onPageChange(ctx.page - 1);
|
|
5530
5007
|
}
|
|
5531
5008
|
};
|
|
5532
|
-
return /* @__PURE__ */
|
|
5009
|
+
return /* @__PURE__ */ React26.createElement(
|
|
5533
5010
|
"button",
|
|
5534
5011
|
{
|
|
5535
5012
|
ref,
|
|
@@ -5545,12 +5022,12 @@ var PaginationPrevious = React27.forwardRef(
|
|
|
5545
5022
|
),
|
|
5546
5023
|
...props
|
|
5547
5024
|
},
|
|
5548
|
-
icon ?? /* @__PURE__ */
|
|
5025
|
+
icon ?? /* @__PURE__ */ React26.createElement(ChevronLeftIcon, { className: sizeClass.icon })
|
|
5549
5026
|
);
|
|
5550
5027
|
}
|
|
5551
5028
|
);
|
|
5552
5029
|
PaginationPrevious.displayName = "PaginationPrevious";
|
|
5553
|
-
var PaginationNext =
|
|
5030
|
+
var PaginationNext = React26.forwardRef(
|
|
5554
5031
|
({ className, icon, ...props }, ref) => {
|
|
5555
5032
|
const ctx = usePaginationContext();
|
|
5556
5033
|
const sizeClass = paginationSizeMap[ctx.size];
|
|
@@ -5562,7 +5039,7 @@ var PaginationNext = React27.forwardRef(
|
|
|
5562
5039
|
ctx.onPageChange(ctx.page + 1);
|
|
5563
5040
|
}
|
|
5564
5041
|
};
|
|
5565
|
-
return /* @__PURE__ */
|
|
5042
|
+
return /* @__PURE__ */ React26.createElement(
|
|
5566
5043
|
"button",
|
|
5567
5044
|
{
|
|
5568
5045
|
ref,
|
|
@@ -5578,17 +5055,17 @@ var PaginationNext = React27.forwardRef(
|
|
|
5578
5055
|
),
|
|
5579
5056
|
...props
|
|
5580
5057
|
},
|
|
5581
|
-
icon ?? /* @__PURE__ */
|
|
5058
|
+
icon ?? /* @__PURE__ */ React26.createElement(ChevronRightIcon3, { className: sizeClass.icon })
|
|
5582
5059
|
);
|
|
5583
5060
|
}
|
|
5584
5061
|
);
|
|
5585
5062
|
PaginationNext.displayName = "PaginationNext";
|
|
5586
|
-
var PaginationFirst =
|
|
5063
|
+
var PaginationFirst = React26.forwardRef(
|
|
5587
5064
|
({ className, icon, ...props }, ref) => {
|
|
5588
5065
|
const ctx = usePaginationContext();
|
|
5589
5066
|
const sizeClass = paginationSizeMap[ctx.size];
|
|
5590
5067
|
const isDisabled = ctx.disabled || ctx.page <= 1;
|
|
5591
|
-
return /* @__PURE__ */
|
|
5068
|
+
return /* @__PURE__ */ React26.createElement(
|
|
5592
5069
|
"button",
|
|
5593
5070
|
{
|
|
5594
5071
|
ref,
|
|
@@ -5604,17 +5081,17 @@ var PaginationFirst = React27.forwardRef(
|
|
|
5604
5081
|
),
|
|
5605
5082
|
...props
|
|
5606
5083
|
},
|
|
5607
|
-
icon ?? /* @__PURE__ */
|
|
5084
|
+
icon ?? /* @__PURE__ */ React26.createElement(ChevronsLeftIcon, { className: sizeClass.icon })
|
|
5608
5085
|
);
|
|
5609
5086
|
}
|
|
5610
5087
|
);
|
|
5611
5088
|
PaginationFirst.displayName = "PaginationFirst";
|
|
5612
|
-
var PaginationLast =
|
|
5089
|
+
var PaginationLast = React26.forwardRef(
|
|
5613
5090
|
({ className, icon, ...props }, ref) => {
|
|
5614
5091
|
const ctx = usePaginationContext();
|
|
5615
5092
|
const sizeClass = paginationSizeMap[ctx.size];
|
|
5616
5093
|
const isDisabled = ctx.disabled || ctx.page >= ctx.total;
|
|
5617
|
-
return /* @__PURE__ */
|
|
5094
|
+
return /* @__PURE__ */ React26.createElement(
|
|
5618
5095
|
"button",
|
|
5619
5096
|
{
|
|
5620
5097
|
ref,
|
|
@@ -5630,16 +5107,16 @@ var PaginationLast = React27.forwardRef(
|
|
|
5630
5107
|
),
|
|
5631
5108
|
...props
|
|
5632
5109
|
},
|
|
5633
|
-
icon ?? /* @__PURE__ */
|
|
5110
|
+
icon ?? /* @__PURE__ */ React26.createElement(ChevronsRightIcon, { className: sizeClass.icon })
|
|
5634
5111
|
);
|
|
5635
5112
|
}
|
|
5636
5113
|
);
|
|
5637
5114
|
PaginationLast.displayName = "PaginationLast";
|
|
5638
|
-
var PaginationEllipsis =
|
|
5115
|
+
var PaginationEllipsis = React26.forwardRef(
|
|
5639
5116
|
({ className, ...props }, ref) => {
|
|
5640
5117
|
const ctx = usePaginationContext();
|
|
5641
5118
|
const sizeClass = paginationSizeMap[ctx.size];
|
|
5642
|
-
return /* @__PURE__ */
|
|
5119
|
+
return /* @__PURE__ */ React26.createElement(
|
|
5643
5120
|
"span",
|
|
5644
5121
|
{
|
|
5645
5122
|
ref,
|
|
@@ -5651,16 +5128,16 @@ var PaginationEllipsis = React27.forwardRef(
|
|
|
5651
5128
|
),
|
|
5652
5129
|
...props
|
|
5653
5130
|
},
|
|
5654
|
-
/* @__PURE__ */
|
|
5655
|
-
/* @__PURE__ */
|
|
5131
|
+
/* @__PURE__ */ React26.createElement(EllipsisIcon2, { className: sizeClass.icon }),
|
|
5132
|
+
/* @__PURE__ */ React26.createElement("span", { className: "sr-only" }, "More pages")
|
|
5656
5133
|
);
|
|
5657
5134
|
}
|
|
5658
5135
|
);
|
|
5659
5136
|
PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
5660
|
-
var PaginationItems =
|
|
5137
|
+
var PaginationItems = React26.forwardRef(
|
|
5661
5138
|
({ className, ...props }, ref) => {
|
|
5662
5139
|
const ctx = usePaginationContext();
|
|
5663
|
-
return /* @__PURE__ */
|
|
5140
|
+
return /* @__PURE__ */ React26.createElement("div", { ref, className: cn("contents", className), ...props }, ctx.paginationRange.map((item, index) => /* @__PURE__ */ React26.createElement(PaginationItem, { key: `${item}-${index}` }, item === "dots" ? /* @__PURE__ */ React26.createElement(PaginationEllipsis, null) : /* @__PURE__ */ React26.createElement(PaginationLink, { page: item }))));
|
|
5664
5141
|
}
|
|
5665
5142
|
);
|
|
5666
5143
|
PaginationItems.displayName = "PaginationItems";
|
|
@@ -5677,11 +5154,11 @@ var Pagination = Object.assign(PaginationRoot, {
|
|
|
5677
5154
|
});
|
|
5678
5155
|
|
|
5679
5156
|
// src/components/ui/modal.tsx
|
|
5680
|
-
var
|
|
5157
|
+
var React27 = __toESM(require("react"));
|
|
5681
5158
|
var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
|
|
5682
5159
|
var AlertDialogPrimitive = __toESM(require("@radix-ui/react-alert-dialog"));
|
|
5683
5160
|
var import_class_variance_authority22 = require("class-variance-authority");
|
|
5684
|
-
var DefaultCloseIcon = ({ className }) => /* @__PURE__ */
|
|
5161
|
+
var DefaultCloseIcon = ({ className }) => /* @__PURE__ */ React27.createElement(
|
|
5685
5162
|
"svg",
|
|
5686
5163
|
{
|
|
5687
5164
|
className,
|
|
@@ -5691,18 +5168,18 @@ var DefaultCloseIcon = ({ className }) => /* @__PURE__ */ React28.createElement(
|
|
|
5691
5168
|
strokeWidth: 2,
|
|
5692
5169
|
"aria-hidden": "true"
|
|
5693
5170
|
},
|
|
5694
|
-
/* @__PURE__ */
|
|
5171
|
+
/* @__PURE__ */ React27.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" })
|
|
5695
5172
|
);
|
|
5696
|
-
var ModalStyleContext =
|
|
5173
|
+
var ModalStyleContext = React27.createContext({
|
|
5697
5174
|
scrollBehavior: "outside"
|
|
5698
5175
|
});
|
|
5699
5176
|
function ModalRoot(props) {
|
|
5700
|
-
return /* @__PURE__ */
|
|
5177
|
+
return /* @__PURE__ */ React27.createElement(DialogPrimitive.Root, { ...props });
|
|
5701
5178
|
}
|
|
5702
5179
|
var ModalTrigger = DialogPrimitive.Trigger;
|
|
5703
5180
|
var ModalPortal = DialogPrimitive.Portal;
|
|
5704
5181
|
var ModalClose = DialogPrimitive.Close;
|
|
5705
|
-
var ModalOverlay =
|
|
5182
|
+
var ModalOverlay = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
|
5706
5183
|
DialogPrimitive.Overlay,
|
|
5707
5184
|
{
|
|
5708
5185
|
ref,
|
|
@@ -5736,19 +5213,19 @@ var modalContentVariants = (0, import_class_variance_authority22.cva)("", {
|
|
|
5736
5213
|
size: "sm"
|
|
5737
5214
|
}
|
|
5738
5215
|
});
|
|
5739
|
-
var ModalContent =
|
|
5216
|
+
var ModalContent = React27.forwardRef(({ className, children, size = "sm", scrollBehavior = "outside", showCloseButton = true, closeIcon, ...props }, ref) => {
|
|
5740
5217
|
const isInside = scrollBehavior === "inside";
|
|
5741
5218
|
const isFull = size === "full";
|
|
5742
5219
|
const useInsideScroll = isInside || isFull;
|
|
5743
|
-
const closeButton = showCloseButton && /* @__PURE__ */
|
|
5220
|
+
const closeButton = showCloseButton && /* @__PURE__ */ React27.createElement(DialogPrimitive.Close, { className: cn(
|
|
5744
5221
|
"absolute right-4 top-4 rounded-md p-1",
|
|
5745
5222
|
"text-text-muted hover:text-foreground",
|
|
5746
5223
|
"transition-colors duration-fast",
|
|
5747
5224
|
"focus-visible:focus-ring focus-visible:outline-none",
|
|
5748
5225
|
"disabled:pointer-events-none"
|
|
5749
|
-
) }, closeIcon || /* @__PURE__ */
|
|
5226
|
+
) }, closeIcon || /* @__PURE__ */ React27.createElement(DefaultCloseIcon, { className: "icon-sm" }), /* @__PURE__ */ React27.createElement("span", { className: "sr-only" }, "Close"));
|
|
5750
5227
|
if (!useInsideScroll) {
|
|
5751
|
-
return /* @__PURE__ */
|
|
5228
|
+
return /* @__PURE__ */ React27.createElement(ModalPortal, null, /* @__PURE__ */ React27.createElement(ModalOverlay, null), /* @__PURE__ */ React27.createElement(ModalStyleContext.Provider, { value: { scrollBehavior: "outside" } }, /* @__PURE__ */ React27.createElement(
|
|
5752
5229
|
DialogPrimitive.Content,
|
|
5753
5230
|
{
|
|
5754
5231
|
ref,
|
|
@@ -5759,7 +5236,7 @@ var ModalContent = React28.forwardRef(({ className, children, size = "sm", scrol
|
|
|
5759
5236
|
),
|
|
5760
5237
|
...props
|
|
5761
5238
|
},
|
|
5762
|
-
/* @__PURE__ */
|
|
5239
|
+
/* @__PURE__ */ React27.createElement(DialogPrimitive.Close, { asChild: true }, /* @__PURE__ */ React27.createElement("div", { className: "flex min-h-full items-center justify-center p-4" }, /* @__PURE__ */ React27.createElement(
|
|
5763
5240
|
"div",
|
|
5764
5241
|
{
|
|
5765
5242
|
className: cn(
|
|
@@ -5774,7 +5251,7 @@ var ModalContent = React28.forwardRef(({ className, children, size = "sm", scrol
|
|
|
5774
5251
|
)))
|
|
5775
5252
|
)));
|
|
5776
5253
|
}
|
|
5777
|
-
return /* @__PURE__ */
|
|
5254
|
+
return /* @__PURE__ */ React27.createElement(ModalPortal, null, /* @__PURE__ */ React27.createElement(ModalOverlay, null), /* @__PURE__ */ React27.createElement(ModalStyleContext.Provider, { value: { scrollBehavior: "inside" } }, /* @__PURE__ */ React27.createElement("div", { className: "fixed inset-0 z-modal flex items-center justify-center p-4" }, /* @__PURE__ */ React27.createElement(
|
|
5778
5255
|
DialogPrimitive.Content,
|
|
5779
5256
|
{
|
|
5780
5257
|
ref,
|
|
@@ -5794,7 +5271,7 @@ var ModalContent = React28.forwardRef(({ className, children, size = "sm", scrol
|
|
|
5794
5271
|
))));
|
|
5795
5272
|
});
|
|
5796
5273
|
ModalContent.displayName = "ModalContent";
|
|
5797
|
-
var ModalHeader =
|
|
5274
|
+
var ModalHeader = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
|
5798
5275
|
"div",
|
|
5799
5276
|
{
|
|
5800
5277
|
ref,
|
|
@@ -5803,7 +5280,7 @@ var ModalHeader = React28.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
5803
5280
|
}
|
|
5804
5281
|
));
|
|
5805
5282
|
ModalHeader.displayName = "ModalHeader";
|
|
5806
|
-
var ModalTitle =
|
|
5283
|
+
var ModalTitle = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
|
5807
5284
|
DialogPrimitive.Title,
|
|
5808
5285
|
{
|
|
5809
5286
|
ref,
|
|
@@ -5812,7 +5289,7 @@ var ModalTitle = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
5812
5289
|
}
|
|
5813
5290
|
));
|
|
5814
5291
|
ModalTitle.displayName = "ModalTitle";
|
|
5815
|
-
var ModalDescription =
|
|
5292
|
+
var ModalDescription = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
|
5816
5293
|
DialogPrimitive.Description,
|
|
5817
5294
|
{
|
|
5818
5295
|
ref,
|
|
@@ -5821,9 +5298,9 @@ var ModalDescription = React28.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
5821
5298
|
}
|
|
5822
5299
|
));
|
|
5823
5300
|
ModalDescription.displayName = "ModalDescription";
|
|
5824
|
-
var ModalBody =
|
|
5825
|
-
const { scrollBehavior } =
|
|
5826
|
-
return /* @__PURE__ */
|
|
5301
|
+
var ModalBody = React27.forwardRef(({ className, ...props }, ref) => {
|
|
5302
|
+
const { scrollBehavior } = React27.useContext(ModalStyleContext);
|
|
5303
|
+
return /* @__PURE__ */ React27.createElement(
|
|
5827
5304
|
"div",
|
|
5828
5305
|
{
|
|
5829
5306
|
ref,
|
|
@@ -5837,7 +5314,7 @@ var ModalBody = React28.forwardRef(({ className, ...props }, ref) => {
|
|
|
5837
5314
|
);
|
|
5838
5315
|
});
|
|
5839
5316
|
ModalBody.displayName = "ModalBody";
|
|
5840
|
-
var ModalFooter =
|
|
5317
|
+
var ModalFooter = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
|
5841
5318
|
"div",
|
|
5842
5319
|
{
|
|
5843
5320
|
ref,
|
|
@@ -5852,7 +5329,7 @@ ModalFooter.displayName = "ModalFooter";
|
|
|
5852
5329
|
var AlertModalRoot = AlertDialogPrimitive.Root;
|
|
5853
5330
|
var AlertModalTrigger = AlertDialogPrimitive.Trigger;
|
|
5854
5331
|
var AlertModalPortal = AlertDialogPrimitive.Portal;
|
|
5855
|
-
var AlertModalOverlay =
|
|
5332
|
+
var AlertModalOverlay = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
|
5856
5333
|
AlertDialogPrimitive.Overlay,
|
|
5857
5334
|
{
|
|
5858
5335
|
ref,
|
|
@@ -5878,7 +5355,7 @@ var alertModalContentVariants = (0, import_class_variance_authority22.cva)("", {
|
|
|
5878
5355
|
size: "sm"
|
|
5879
5356
|
}
|
|
5880
5357
|
});
|
|
5881
|
-
var AlertModalContent =
|
|
5358
|
+
var AlertModalContent = React27.forwardRef(({ className, children, size = "sm", ...props }, ref) => /* @__PURE__ */ React27.createElement(AlertModalPortal, null, /* @__PURE__ */ React27.createElement(AlertModalOverlay, null), /* @__PURE__ */ React27.createElement("div", { className: "fixed inset-0 z-modal flex items-center justify-center p-4" }, /* @__PURE__ */ React27.createElement(
|
|
5882
5359
|
AlertDialogPrimitive.Content,
|
|
5883
5360
|
{
|
|
5884
5361
|
ref,
|
|
@@ -5894,7 +5371,7 @@ var AlertModalContent = React28.forwardRef(({ className, children, size = "sm",
|
|
|
5894
5371
|
children
|
|
5895
5372
|
))));
|
|
5896
5373
|
AlertModalContent.displayName = "AlertModalContent";
|
|
5897
|
-
var AlertModalHeader =
|
|
5374
|
+
var AlertModalHeader = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
|
5898
5375
|
"div",
|
|
5899
5376
|
{
|
|
5900
5377
|
ref,
|
|
@@ -5903,7 +5380,7 @@ var AlertModalHeader = React28.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
5903
5380
|
}
|
|
5904
5381
|
));
|
|
5905
5382
|
AlertModalHeader.displayName = "AlertModalHeader";
|
|
5906
|
-
var AlertModalTitle =
|
|
5383
|
+
var AlertModalTitle = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
|
5907
5384
|
AlertDialogPrimitive.Title,
|
|
5908
5385
|
{
|
|
5909
5386
|
ref,
|
|
@@ -5912,7 +5389,7 @@ var AlertModalTitle = React28.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
5912
5389
|
}
|
|
5913
5390
|
));
|
|
5914
5391
|
AlertModalTitle.displayName = "AlertModalTitle";
|
|
5915
|
-
var AlertModalDescription =
|
|
5392
|
+
var AlertModalDescription = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
|
5916
5393
|
AlertDialogPrimitive.Description,
|
|
5917
5394
|
{
|
|
5918
5395
|
ref,
|
|
@@ -5921,7 +5398,7 @@ var AlertModalDescription = React28.forwardRef(({ className, ...props }, ref) =>
|
|
|
5921
5398
|
}
|
|
5922
5399
|
));
|
|
5923
5400
|
AlertModalDescription.displayName = "AlertModalDescription";
|
|
5924
|
-
var AlertModalBody =
|
|
5401
|
+
var AlertModalBody = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
|
5925
5402
|
"div",
|
|
5926
5403
|
{
|
|
5927
5404
|
ref,
|
|
@@ -5930,7 +5407,7 @@ var AlertModalBody = React28.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
5930
5407
|
}
|
|
5931
5408
|
));
|
|
5932
5409
|
AlertModalBody.displayName = "AlertModalBody";
|
|
5933
|
-
var AlertModalFooter =
|
|
5410
|
+
var AlertModalFooter = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
|
5934
5411
|
"div",
|
|
5935
5412
|
{
|
|
5936
5413
|
ref,
|
|
@@ -5942,7 +5419,7 @@ var AlertModalFooter = React28.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
5942
5419
|
}
|
|
5943
5420
|
));
|
|
5944
5421
|
AlertModalFooter.displayName = "AlertModalFooter";
|
|
5945
|
-
var AlertModalAction =
|
|
5422
|
+
var AlertModalAction = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
|
5946
5423
|
AlertDialogPrimitive.Action,
|
|
5947
5424
|
{
|
|
5948
5425
|
ref,
|
|
@@ -5951,7 +5428,7 @@ var AlertModalAction = React28.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
5951
5428
|
}
|
|
5952
5429
|
));
|
|
5953
5430
|
AlertModalAction.displayName = "AlertModalAction";
|
|
5954
|
-
var AlertModalCancel =
|
|
5431
|
+
var AlertModalCancel = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
|
5955
5432
|
AlertDialogPrimitive.Cancel,
|
|
5956
5433
|
{
|
|
5957
5434
|
ref,
|
|
@@ -5987,10 +5464,10 @@ var AlertModal = Object.assign(AlertModalRoot, {
|
|
|
5987
5464
|
});
|
|
5988
5465
|
|
|
5989
5466
|
// src/components/ui/drawer.tsx
|
|
5990
|
-
var
|
|
5467
|
+
var React28 = __toESM(require("react"));
|
|
5991
5468
|
var DialogPrimitive2 = __toESM(require("@radix-ui/react-dialog"));
|
|
5992
5469
|
var import_class_variance_authority23 = require("class-variance-authority");
|
|
5993
|
-
var DefaultCloseIcon2 = ({ className }) => /* @__PURE__ */
|
|
5470
|
+
var DefaultCloseIcon2 = ({ className }) => /* @__PURE__ */ React28.createElement(
|
|
5994
5471
|
"svg",
|
|
5995
5472
|
{
|
|
5996
5473
|
className,
|
|
@@ -6000,7 +5477,7 @@ var DefaultCloseIcon2 = ({ className }) => /* @__PURE__ */ React29.createElement
|
|
|
6000
5477
|
strokeWidth: 2,
|
|
6001
5478
|
"aria-hidden": "true"
|
|
6002
5479
|
},
|
|
6003
|
-
/* @__PURE__ */
|
|
5480
|
+
/* @__PURE__ */ React28.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" })
|
|
6004
5481
|
);
|
|
6005
5482
|
var ANIMATION_CLASSES = {
|
|
6006
5483
|
right: "data-[state=open]:animate-drawer-right-enter data-[state=closed]:animate-drawer-right-exit",
|
|
@@ -6033,12 +5510,12 @@ var drawerSizeVertical = (0, import_class_variance_authority23.cva)("", {
|
|
|
6033
5510
|
defaultVariants: { size: "md" }
|
|
6034
5511
|
});
|
|
6035
5512
|
function DrawerRoot(props) {
|
|
6036
|
-
return /* @__PURE__ */
|
|
5513
|
+
return /* @__PURE__ */ React28.createElement(DialogPrimitive2.Root, { ...props });
|
|
6037
5514
|
}
|
|
6038
5515
|
var DrawerTrigger = DialogPrimitive2.Trigger;
|
|
6039
5516
|
var DrawerPortal = DialogPrimitive2.Portal;
|
|
6040
5517
|
var DrawerClose = DialogPrimitive2.Close;
|
|
6041
|
-
var DrawerOverlay =
|
|
5518
|
+
var DrawerOverlay = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React28.createElement(
|
|
6042
5519
|
DialogPrimitive2.Overlay,
|
|
6043
5520
|
{
|
|
6044
5521
|
ref,
|
|
@@ -6057,10 +5534,10 @@ var SIDE_POSITION = {
|
|
|
6057
5534
|
top: "inset-x-0 top-0",
|
|
6058
5535
|
bottom: "inset-x-0 bottom-0"
|
|
6059
5536
|
};
|
|
6060
|
-
var DrawerContent =
|
|
5537
|
+
var DrawerContent = React28.forwardRef(({ className, children, side = "right", size = "md", showCloseButton = true, closeIcon, ...props }, ref) => {
|
|
6061
5538
|
const isHorizontal = side === "left" || side === "right";
|
|
6062
5539
|
const sizeClass = isHorizontal ? drawerSizeHorizontal({ size }) : drawerSizeVertical({ size });
|
|
6063
|
-
return /* @__PURE__ */
|
|
5540
|
+
return /* @__PURE__ */ React28.createElement(DrawerPortal, null, /* @__PURE__ */ React28.createElement(DrawerOverlay, null), /* @__PURE__ */ React28.createElement(
|
|
6064
5541
|
DialogPrimitive2.Content,
|
|
6065
5542
|
{
|
|
6066
5543
|
ref,
|
|
@@ -6076,17 +5553,17 @@ var DrawerContent = React29.forwardRef(({ className, children, side = "right", s
|
|
|
6076
5553
|
...props
|
|
6077
5554
|
},
|
|
6078
5555
|
children,
|
|
6079
|
-
showCloseButton && /* @__PURE__ */
|
|
5556
|
+
showCloseButton && /* @__PURE__ */ React28.createElement(DialogPrimitive2.Close, { className: cn(
|
|
6080
5557
|
"absolute right-4 top-4 rounded-md p-1",
|
|
6081
5558
|
"text-text-muted hover:text-foreground",
|
|
6082
5559
|
"transition-colors duration-fast",
|
|
6083
5560
|
"focus-visible:focus-ring focus-visible:outline-none",
|
|
6084
5561
|
"disabled:pointer-events-none"
|
|
6085
|
-
) }, closeIcon || /* @__PURE__ */
|
|
5562
|
+
) }, closeIcon || /* @__PURE__ */ React28.createElement(DefaultCloseIcon2, { className: "icon-sm" }), /* @__PURE__ */ React28.createElement("span", { className: "sr-only" }, "Close"))
|
|
6086
5563
|
));
|
|
6087
5564
|
});
|
|
6088
5565
|
DrawerContent.displayName = "DrawerContent";
|
|
6089
|
-
var DrawerHeader =
|
|
5566
|
+
var DrawerHeader = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React28.createElement(
|
|
6090
5567
|
"div",
|
|
6091
5568
|
{
|
|
6092
5569
|
ref,
|
|
@@ -6095,7 +5572,7 @@ var DrawerHeader = React29.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
6095
5572
|
}
|
|
6096
5573
|
));
|
|
6097
5574
|
DrawerHeader.displayName = "DrawerHeader";
|
|
6098
|
-
var DrawerTitle =
|
|
5575
|
+
var DrawerTitle = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React28.createElement(
|
|
6099
5576
|
DialogPrimitive2.Title,
|
|
6100
5577
|
{
|
|
6101
5578
|
ref,
|
|
@@ -6104,7 +5581,7 @@ var DrawerTitle = React29.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
6104
5581
|
}
|
|
6105
5582
|
));
|
|
6106
5583
|
DrawerTitle.displayName = "DrawerTitle";
|
|
6107
|
-
var DrawerDescription =
|
|
5584
|
+
var DrawerDescription = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React28.createElement(
|
|
6108
5585
|
DialogPrimitive2.Description,
|
|
6109
5586
|
{
|
|
6110
5587
|
ref,
|
|
@@ -6113,7 +5590,7 @@ var DrawerDescription = React29.forwardRef(({ className, ...props }, ref) => /*
|
|
|
6113
5590
|
}
|
|
6114
5591
|
));
|
|
6115
5592
|
DrawerDescription.displayName = "DrawerDescription";
|
|
6116
|
-
var DrawerBody =
|
|
5593
|
+
var DrawerBody = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React28.createElement(
|
|
6117
5594
|
"div",
|
|
6118
5595
|
{
|
|
6119
5596
|
ref,
|
|
@@ -6122,7 +5599,7 @@ var DrawerBody = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
6122
5599
|
}
|
|
6123
5600
|
));
|
|
6124
5601
|
DrawerBody.displayName = "DrawerBody";
|
|
6125
|
-
var DrawerFooter =
|
|
5602
|
+
var DrawerFooter = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React28.createElement(
|
|
6126
5603
|
"div",
|
|
6127
5604
|
{
|
|
6128
5605
|
ref,
|
|
@@ -6148,7 +5625,7 @@ var Drawer = Object.assign(DrawerRoot, {
|
|
|
6148
5625
|
});
|
|
6149
5626
|
|
|
6150
5627
|
// src/components/ui/tooltip.tsx
|
|
6151
|
-
var
|
|
5628
|
+
var React29 = __toESM(require("react"));
|
|
6152
5629
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
|
|
6153
5630
|
var import_class_variance_authority24 = require("class-variance-authority");
|
|
6154
5631
|
var ANIMATION_CLASSES2 = {
|
|
@@ -6182,13 +5659,13 @@ var ARROW_FILL = {
|
|
|
6182
5659
|
};
|
|
6183
5660
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
6184
5661
|
function TooltipRoot({ delayDuration = 200, ...props }) {
|
|
6185
|
-
return /* @__PURE__ */
|
|
5662
|
+
return /* @__PURE__ */ React29.createElement(TooltipPrimitive.Root, { delayDuration, ...props });
|
|
6186
5663
|
}
|
|
6187
5664
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
6188
5665
|
var TooltipPortal = TooltipPrimitive.Portal;
|
|
6189
|
-
var TooltipContent =
|
|
5666
|
+
var TooltipContent = React29.forwardRef(({ className, variant = "default", size, side = "top", sideOffset = 6, showArrow = true, children, ...props }, ref) => {
|
|
6190
5667
|
const resolvedSide = side;
|
|
6191
|
-
return /* @__PURE__ */
|
|
5668
|
+
return /* @__PURE__ */ React29.createElement(TooltipPrimitive.Portal, null, /* @__PURE__ */ React29.createElement(
|
|
6192
5669
|
TooltipPrimitive.Content,
|
|
6193
5670
|
{
|
|
6194
5671
|
ref,
|
|
@@ -6202,7 +5679,7 @@ var TooltipContent = React30.forwardRef(({ className, variant = "default", size,
|
|
|
6202
5679
|
...props
|
|
6203
5680
|
},
|
|
6204
5681
|
children,
|
|
6205
|
-
showArrow && /* @__PURE__ */
|
|
5682
|
+
showArrow && /* @__PURE__ */ React29.createElement(
|
|
6206
5683
|
TooltipPrimitive.Arrow,
|
|
6207
5684
|
{
|
|
6208
5685
|
className: ARROW_FILL[variant || "default"],
|
|
@@ -6213,7 +5690,7 @@ var TooltipContent = React30.forwardRef(({ className, variant = "default", size,
|
|
|
6213
5690
|
));
|
|
6214
5691
|
});
|
|
6215
5692
|
TooltipContent.displayName = "TooltipContent";
|
|
6216
|
-
var TooltipArrow =
|
|
5693
|
+
var TooltipArrow = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React29.createElement(
|
|
6217
5694
|
TooltipPrimitive.Arrow,
|
|
6218
5695
|
{
|
|
6219
5696
|
ref,
|
|
@@ -6224,7 +5701,7 @@ var TooltipArrow = React30.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
6224
5701
|
}
|
|
6225
5702
|
));
|
|
6226
5703
|
TooltipArrow.displayName = "TooltipArrow";
|
|
6227
|
-
var
|
|
5704
|
+
var Tooltip = Object.assign(TooltipRoot, {
|
|
6228
5705
|
Trigger: TooltipTrigger,
|
|
6229
5706
|
Content: TooltipContent,
|
|
6230
5707
|
Arrow: TooltipArrow,
|
|
@@ -6233,10 +5710,10 @@ var Tooltip2 = Object.assign(TooltipRoot, {
|
|
|
6233
5710
|
});
|
|
6234
5711
|
|
|
6235
5712
|
// src/components/ui/popover.tsx
|
|
6236
|
-
var
|
|
5713
|
+
var React30 = __toESM(require("react"));
|
|
6237
5714
|
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"));
|
|
6238
5715
|
var import_class_variance_authority25 = require("class-variance-authority");
|
|
6239
|
-
var DefaultCloseIcon3 = ({ className }) => /* @__PURE__ */
|
|
5716
|
+
var DefaultCloseIcon3 = ({ className }) => /* @__PURE__ */ React30.createElement(
|
|
6240
5717
|
"svg",
|
|
6241
5718
|
{
|
|
6242
5719
|
className,
|
|
@@ -6246,7 +5723,7 @@ var DefaultCloseIcon3 = ({ className }) => /* @__PURE__ */ React31.createElement
|
|
|
6246
5723
|
strokeWidth: 2,
|
|
6247
5724
|
"aria-hidden": "true"
|
|
6248
5725
|
},
|
|
6249
|
-
/* @__PURE__ */
|
|
5726
|
+
/* @__PURE__ */ React30.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" })
|
|
6250
5727
|
);
|
|
6251
5728
|
var ANIMATION_CLASSES3 = {
|
|
6252
5729
|
top: "data-[state=open]:animate-popover-top-enter data-[state=closed]:animate-popover-top-exit",
|
|
@@ -6282,16 +5759,16 @@ var CSS_ARROW_CLASSES = {
|
|
|
6282
5759
|
};
|
|
6283
5760
|
var ARROW_ELEVATED = "fill-background-paper drop-shadow-sm";
|
|
6284
5761
|
function PopoverRoot(props) {
|
|
6285
|
-
return /* @__PURE__ */
|
|
5762
|
+
return /* @__PURE__ */ React30.createElement(PopoverPrimitive.Root, { ...props });
|
|
6286
5763
|
}
|
|
6287
5764
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
6288
5765
|
var PopoverPortal = PopoverPrimitive.Portal;
|
|
6289
5766
|
var PopoverAnchor = PopoverPrimitive.Anchor;
|
|
6290
5767
|
var PopoverClose = PopoverPrimitive.Close;
|
|
6291
|
-
var PopoverContent =
|
|
5768
|
+
var PopoverContent = React30.forwardRef(({ className, variant = "default", size, side = "bottom", sideOffset, showArrow = true, showClose = false, closeIcon, children, ...props }, ref) => {
|
|
6292
5769
|
const resolvedSide = side;
|
|
6293
5770
|
const resolvedOffset = sideOffset ?? (variant === "default" && showArrow ? 12 : 6);
|
|
6294
|
-
return /* @__PURE__ */
|
|
5771
|
+
return /* @__PURE__ */ React30.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ React30.createElement(
|
|
6295
5772
|
PopoverPrimitive.Content,
|
|
6296
5773
|
{
|
|
6297
5774
|
ref,
|
|
@@ -6304,16 +5781,16 @@ var PopoverContent = React31.forwardRef(({ className, variant = "default", size,
|
|
|
6304
5781
|
),
|
|
6305
5782
|
...props
|
|
6306
5783
|
},
|
|
6307
|
-
showClose && /* @__PURE__ */
|
|
5784
|
+
showClose && /* @__PURE__ */ React30.createElement(
|
|
6308
5785
|
PopoverPrimitive.Close,
|
|
6309
5786
|
{
|
|
6310
5787
|
className: "absolute top-3 right-3 rounded-md p-1 text-text-muted hover:text-foreground hover:bg-background-muted transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring",
|
|
6311
5788
|
"aria-label": "Close"
|
|
6312
5789
|
},
|
|
6313
|
-
closeIcon || /* @__PURE__ */
|
|
5790
|
+
closeIcon || /* @__PURE__ */ React30.createElement(DefaultCloseIcon3, { className: "icon-sm" })
|
|
6314
5791
|
),
|
|
6315
5792
|
children,
|
|
6316
|
-
showArrow && variant === "default" && /* @__PURE__ */
|
|
5793
|
+
showArrow && variant === "default" && /* @__PURE__ */ React30.createElement(
|
|
6317
5794
|
"div",
|
|
6318
5795
|
{
|
|
6319
5796
|
className: cn(
|
|
@@ -6322,7 +5799,7 @@ var PopoverContent = React31.forwardRef(({ className, variant = "default", size,
|
|
|
6322
5799
|
)
|
|
6323
5800
|
}
|
|
6324
5801
|
),
|
|
6325
|
-
showArrow && variant === "elevated" && /* @__PURE__ */
|
|
5802
|
+
showArrow && variant === "elevated" && /* @__PURE__ */ React30.createElement(
|
|
6326
5803
|
PopoverPrimitive.Arrow,
|
|
6327
5804
|
{
|
|
6328
5805
|
className: ARROW_ELEVATED,
|
|
@@ -6333,7 +5810,7 @@ var PopoverContent = React31.forwardRef(({ className, variant = "default", size,
|
|
|
6333
5810
|
));
|
|
6334
5811
|
});
|
|
6335
5812
|
PopoverContent.displayName = "PopoverContent";
|
|
6336
|
-
var PopoverArrow =
|
|
5813
|
+
var PopoverArrow = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React30.createElement(
|
|
6337
5814
|
PopoverPrimitive.Arrow,
|
|
6338
5815
|
{
|
|
6339
5816
|
ref,
|
|
@@ -6354,13 +5831,13 @@ var Popover = Object.assign(PopoverRoot, {
|
|
|
6354
5831
|
});
|
|
6355
5832
|
|
|
6356
5833
|
// src/components/ui/alert.tsx
|
|
6357
|
-
var
|
|
5834
|
+
var React31 = __toESM(require("react"));
|
|
6358
5835
|
var import_class_variance_authority26 = require("class-variance-authority");
|
|
6359
|
-
var InfoIcon = ({ className }) => /* @__PURE__ */
|
|
6360
|
-
var SuccessIcon = ({ className }) => /* @__PURE__ */
|
|
6361
|
-
var WarningIcon = ({ className }) => /* @__PURE__ */
|
|
6362
|
-
var ErrorIcon = ({ className }) => /* @__PURE__ */
|
|
6363
|
-
var DefaultCloseIcon4 = ({ className }) => /* @__PURE__ */
|
|
5836
|
+
var InfoIcon = ({ className }) => /* @__PURE__ */ React31.createElement("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true" }, /* @__PURE__ */ React31.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ React31.createElement("path", { d: "M12 16v-4" }), /* @__PURE__ */ React31.createElement("path", { d: "M12 8h.01" }));
|
|
5837
|
+
var SuccessIcon = ({ className }) => /* @__PURE__ */ React31.createElement("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true" }, /* @__PURE__ */ React31.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ React31.createElement("path", { d: "m9 12 2 2 4-4" }));
|
|
5838
|
+
var WarningIcon = ({ className }) => /* @__PURE__ */ React31.createElement("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true" }, /* @__PURE__ */ React31.createElement("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }), /* @__PURE__ */ React31.createElement("path", { d: "M12 9v4" }), /* @__PURE__ */ React31.createElement("path", { d: "M12 17h.01" }));
|
|
5839
|
+
var ErrorIcon = ({ className }) => /* @__PURE__ */ React31.createElement("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true" }, /* @__PURE__ */ React31.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ React31.createElement("path", { d: "M12 8v5" }), /* @__PURE__ */ React31.createElement("path", { d: "M12 16h.01" }));
|
|
5840
|
+
var DefaultCloseIcon4 = ({ className }) => /* @__PURE__ */ React31.createElement("svg", { className, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, "aria-hidden": "true" }, /* @__PURE__ */ React31.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" }));
|
|
6364
5841
|
var STATUS_ICONS = {
|
|
6365
5842
|
info: InfoIcon,
|
|
6366
5843
|
success: SuccessIcon,
|
|
@@ -6434,15 +5911,15 @@ var DESC_SIZE_MAP = {
|
|
|
6434
5911
|
default: "text-sm mt-1",
|
|
6435
5912
|
lg: "text-md mt-1.5"
|
|
6436
5913
|
};
|
|
6437
|
-
var AlertContext =
|
|
5914
|
+
var AlertContext = React31.createContext({
|
|
6438
5915
|
variant: "default",
|
|
6439
5916
|
color: "info",
|
|
6440
5917
|
size: "default"
|
|
6441
5918
|
});
|
|
6442
5919
|
function useAlertContext() {
|
|
6443
|
-
return
|
|
5920
|
+
return React31.useContext(AlertContext);
|
|
6444
5921
|
}
|
|
6445
|
-
var AlertRoot =
|
|
5922
|
+
var AlertRoot = React31.forwardRef(
|
|
6446
5923
|
({
|
|
6447
5924
|
className,
|
|
6448
5925
|
variant = "default",
|
|
@@ -6460,7 +5937,7 @@ var AlertRoot = React32.forwardRef(
|
|
|
6460
5937
|
const role = color === "error" ? "alert" : "status";
|
|
6461
5938
|
const colorClasses = colorMap2[color][variant];
|
|
6462
5939
|
const StatusIcon = STATUS_ICONS[color];
|
|
6463
|
-
return /* @__PURE__ */
|
|
5940
|
+
return /* @__PURE__ */ React31.createElement(AlertContext.Provider, { value: { variant, color, size } }, /* @__PURE__ */ React31.createElement(
|
|
6464
5941
|
"div",
|
|
6465
5942
|
{
|
|
6466
5943
|
ref,
|
|
@@ -6472,9 +5949,9 @@ var AlertRoot = React32.forwardRef(
|
|
|
6472
5949
|
),
|
|
6473
5950
|
...props
|
|
6474
5951
|
},
|
|
6475
|
-
!hideIcon && /* @__PURE__ */
|
|
6476
|
-
/* @__PURE__ */
|
|
6477
|
-
closable && /* @__PURE__ */
|
|
5952
|
+
!hideIcon && /* @__PURE__ */ React31.createElement("span", { className: "shrink-0" }, icon || /* @__PURE__ */ React31.createElement(StatusIcon, { className: ICON_SIZE_MAP[size] })),
|
|
5953
|
+
/* @__PURE__ */ React31.createElement("div", { className: "flex-1 min-w-0" }, children),
|
|
5954
|
+
closable && /* @__PURE__ */ React31.createElement(
|
|
6478
5955
|
"button",
|
|
6479
5956
|
{
|
|
6480
5957
|
type: "button",
|
|
@@ -6486,16 +5963,16 @@ var AlertRoot = React32.forwardRef(
|
|
|
6486
5963
|
onClick: onClose,
|
|
6487
5964
|
"aria-label": "Close"
|
|
6488
5965
|
},
|
|
6489
|
-
closeIcon || /* @__PURE__ */
|
|
5966
|
+
closeIcon || /* @__PURE__ */ React31.createElement(DefaultCloseIcon4, { className: "icon-sm" })
|
|
6490
5967
|
)
|
|
6491
5968
|
));
|
|
6492
5969
|
}
|
|
6493
5970
|
);
|
|
6494
5971
|
AlertRoot.displayName = "AlertRoot";
|
|
6495
|
-
var AlertTitle =
|
|
5972
|
+
var AlertTitle = React31.forwardRef(
|
|
6496
5973
|
({ className, ...props }, ref) => {
|
|
6497
5974
|
const { size } = useAlertContext();
|
|
6498
|
-
return /* @__PURE__ */
|
|
5975
|
+
return /* @__PURE__ */ React31.createElement(
|
|
6499
5976
|
"h5",
|
|
6500
5977
|
{
|
|
6501
5978
|
ref,
|
|
@@ -6506,10 +5983,10 @@ var AlertTitle = React32.forwardRef(
|
|
|
6506
5983
|
}
|
|
6507
5984
|
);
|
|
6508
5985
|
AlertTitle.displayName = "AlertTitle";
|
|
6509
|
-
var AlertDescription =
|
|
5986
|
+
var AlertDescription = React31.forwardRef(
|
|
6510
5987
|
({ className, ...props }, ref) => {
|
|
6511
5988
|
const { variant, size } = useAlertContext();
|
|
6512
|
-
return /* @__PURE__ */
|
|
5989
|
+
return /* @__PURE__ */ React31.createElement(
|
|
6513
5990
|
"p",
|
|
6514
5991
|
{
|
|
6515
5992
|
ref,
|
|
@@ -6531,14 +6008,14 @@ var Alert = Object.assign(AlertRoot, {
|
|
|
6531
6008
|
});
|
|
6532
6009
|
|
|
6533
6010
|
// src/components/ui/toast.tsx
|
|
6534
|
-
var
|
|
6011
|
+
var React32 = __toESM(require("react"));
|
|
6535
6012
|
var import_class_variance_authority27 = require("class-variance-authority");
|
|
6536
|
-
var InfoIcon2 = ({ className }) => /* @__PURE__ */
|
|
6537
|
-
var SuccessIcon2 = ({ className }) => /* @__PURE__ */
|
|
6538
|
-
var WarningIcon2 = ({ className }) => /* @__PURE__ */
|
|
6539
|
-
var ErrorIcon2 = ({ className }) => /* @__PURE__ */
|
|
6540
|
-
var DefaultCloseIcon5 = ({ className }) => /* @__PURE__ */
|
|
6541
|
-
var LoadingIcon = ({ className }) => /* @__PURE__ */
|
|
6013
|
+
var InfoIcon2 = ({ className }) => /* @__PURE__ */ React32.createElement("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true" }, /* @__PURE__ */ React32.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ React32.createElement("path", { d: "M12 16v-4" }), /* @__PURE__ */ React32.createElement("path", { d: "M12 8h.01" }));
|
|
6014
|
+
var SuccessIcon2 = ({ className }) => /* @__PURE__ */ React32.createElement("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true" }, /* @__PURE__ */ React32.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ React32.createElement("path", { d: "m9 12 2 2 4-4" }));
|
|
6015
|
+
var WarningIcon2 = ({ className }) => /* @__PURE__ */ React32.createElement("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true" }, /* @__PURE__ */ React32.createElement("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }), /* @__PURE__ */ React32.createElement("path", { d: "M12 9v4" }), /* @__PURE__ */ React32.createElement("path", { d: "M12 17h.01" }));
|
|
6016
|
+
var ErrorIcon2 = ({ className }) => /* @__PURE__ */ React32.createElement("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true" }, /* @__PURE__ */ React32.createElement("circle", { cx: "12", cy: "12", r: "10" }), /* @__PURE__ */ React32.createElement("path", { d: "M12 8v5" }), /* @__PURE__ */ React32.createElement("path", { d: "M12 16h.01" }));
|
|
6017
|
+
var DefaultCloseIcon5 = ({ className }) => /* @__PURE__ */ React32.createElement("svg", { className, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, "aria-hidden": "true" }, /* @__PURE__ */ React32.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" }));
|
|
6018
|
+
var LoadingIcon = ({ className }) => /* @__PURE__ */ React32.createElement("svg", { className: cn("animate-spin", className), viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, "aria-hidden": "true" }, /* @__PURE__ */ React32.createElement("path", { d: "M21 12a9 9 0 1 1-6.219-8.56", strokeLinecap: "round" }));
|
|
6542
6019
|
var STATUS_ICONS2 = {
|
|
6543
6020
|
default: InfoIcon2,
|
|
6544
6021
|
success: SuccessIcon2,
|
|
@@ -6617,8 +6094,8 @@ function createToastStore() {
|
|
|
6617
6094
|
}
|
|
6618
6095
|
var globalStore = createToastStore();
|
|
6619
6096
|
function useToastStore() {
|
|
6620
|
-
const [, forceUpdate] =
|
|
6621
|
-
|
|
6097
|
+
const [, forceUpdate] = React32.useState(0);
|
|
6098
|
+
React32.useEffect(() => {
|
|
6622
6099
|
return globalStore.subscribe(() => forceUpdate((n) => n + 1));
|
|
6623
6100
|
}, []);
|
|
6624
6101
|
return globalStore.toasts;
|
|
@@ -6712,7 +6189,7 @@ toast.custom = (render, opts) => {
|
|
|
6712
6189
|
});
|
|
6713
6190
|
return id;
|
|
6714
6191
|
};
|
|
6715
|
-
var ToastItem =
|
|
6192
|
+
var ToastItem = React32.memo(function ToastItem2({
|
|
6716
6193
|
data,
|
|
6717
6194
|
position,
|
|
6718
6195
|
size,
|
|
@@ -6721,13 +6198,13 @@ var ToastItem = React33.memo(function ToastItem2({
|
|
|
6721
6198
|
defaultDuration,
|
|
6722
6199
|
onRemove
|
|
6723
6200
|
}) {
|
|
6724
|
-
const [isExiting, setIsExiting] =
|
|
6725
|
-
const [isEntered, setIsEntered] =
|
|
6726
|
-
const [isPaused, setIsPaused] =
|
|
6727
|
-
const timerRef =
|
|
6728
|
-
const remainingRef =
|
|
6729
|
-
const startTimeRef =
|
|
6730
|
-
|
|
6201
|
+
const [isExiting, setIsExiting] = React32.useState(false);
|
|
6202
|
+
const [isEntered, setIsEntered] = React32.useState(false);
|
|
6203
|
+
const [isPaused, setIsPaused] = React32.useState(false);
|
|
6204
|
+
const timerRef = React32.useRef(null);
|
|
6205
|
+
const remainingRef = React32.useRef(0);
|
|
6206
|
+
const startTimeRef = React32.useRef(0);
|
|
6207
|
+
React32.useEffect(() => {
|
|
6731
6208
|
const timer = setTimeout(() => setIsEntered(true), TOAST_EXIT_DURATION);
|
|
6732
6209
|
return () => clearTimeout(timer);
|
|
6733
6210
|
}, []);
|
|
@@ -6740,18 +6217,18 @@ var ToastItem = React33.memo(function ToastItem2({
|
|
|
6740
6217
|
const StatusIcon = STATUS_ICONS2[data.type];
|
|
6741
6218
|
const enterAnim = position.includes("right") ? "animate-toast-slide-in-right" : position.includes("left") ? "animate-toast-slide-in-left" : position.includes("top") ? "animate-toast-slide-in-top" : "animate-toast-slide-in-bottom";
|
|
6742
6219
|
const exitAnim = position.includes("right") ? "animate-toast-slide-out-right" : position.includes("left") ? "animate-toast-slide-out-left" : position.includes("top") ? "animate-toast-slide-out-top" : "animate-toast-slide-out-bottom";
|
|
6743
|
-
const handleDismiss =
|
|
6220
|
+
const handleDismiss = React32.useCallback(() => {
|
|
6744
6221
|
if (!dismissible) return;
|
|
6745
6222
|
setIsExiting(true);
|
|
6746
6223
|
data.onDismiss?.(data);
|
|
6747
6224
|
setTimeout(() => onRemove(data.id), TOAST_EXIT_DURATION);
|
|
6748
6225
|
}, [data, dismissible, onRemove]);
|
|
6749
|
-
const handleAutoClose =
|
|
6226
|
+
const handleAutoClose = React32.useCallback(() => {
|
|
6750
6227
|
setIsExiting(true);
|
|
6751
6228
|
data.onAutoClose?.(data);
|
|
6752
6229
|
setTimeout(() => onRemove(data.id), TOAST_EXIT_DURATION);
|
|
6753
6230
|
}, [data, onRemove]);
|
|
6754
|
-
|
|
6231
|
+
React32.useEffect(() => {
|
|
6755
6232
|
if (duration <= 0) return;
|
|
6756
6233
|
remainingRef.current = duration;
|
|
6757
6234
|
startTimeRef.current = Date.now();
|
|
@@ -6760,7 +6237,7 @@ var ToastItem = React33.memo(function ToastItem2({
|
|
|
6760
6237
|
if (timerRef.current) clearTimeout(timerRef.current);
|
|
6761
6238
|
};
|
|
6762
6239
|
}, [duration, handleAutoClose]);
|
|
6763
|
-
const handleMouseEnter =
|
|
6240
|
+
const handleMouseEnter = React32.useCallback(() => {
|
|
6764
6241
|
if (duration <= 0) return;
|
|
6765
6242
|
setIsPaused(true);
|
|
6766
6243
|
if (timerRef.current) {
|
|
@@ -6768,13 +6245,13 @@ var ToastItem = React33.memo(function ToastItem2({
|
|
|
6768
6245
|
remainingRef.current -= Date.now() - startTimeRef.current;
|
|
6769
6246
|
}
|
|
6770
6247
|
}, [duration]);
|
|
6771
|
-
const handleMouseLeave =
|
|
6248
|
+
const handleMouseLeave = React32.useCallback(() => {
|
|
6772
6249
|
if (duration <= 0) return;
|
|
6773
6250
|
setIsPaused(false);
|
|
6774
6251
|
startTimeRef.current = Date.now();
|
|
6775
6252
|
timerRef.current = setTimeout(handleAutoClose, Math.max(remainingRef.current, TOAST_MIN_RESUME_MS));
|
|
6776
6253
|
}, [duration, handleAutoClose]);
|
|
6777
|
-
|
|
6254
|
+
React32.useEffect(() => {
|
|
6778
6255
|
if (data._promiseState === "success" || data._promiseState === "error") {
|
|
6779
6256
|
const newDuration = data.duration ?? defaultDuration;
|
|
6780
6257
|
if (newDuration > 0) {
|
|
@@ -6785,7 +6262,7 @@ var ToastItem = React33.memo(function ToastItem2({
|
|
|
6785
6262
|
}
|
|
6786
6263
|
}
|
|
6787
6264
|
}, [data._promiseState, data.duration, defaultDuration, handleAutoClose]);
|
|
6788
|
-
return /* @__PURE__ */
|
|
6265
|
+
return /* @__PURE__ */ React32.createElement(
|
|
6789
6266
|
"div",
|
|
6790
6267
|
{
|
|
6791
6268
|
role,
|
|
@@ -6801,9 +6278,9 @@ var ToastItem = React33.memo(function ToastItem2({
|
|
|
6801
6278
|
onMouseEnter: handleMouseEnter,
|
|
6802
6279
|
onMouseLeave: handleMouseLeave
|
|
6803
6280
|
},
|
|
6804
|
-
data.icon !== void 0 ? data.icon && /* @__PURE__ */
|
|
6805
|
-
/* @__PURE__ */
|
|
6806
|
-
(data.action || data.cancel) && /* @__PURE__ */
|
|
6281
|
+
data.icon !== void 0 ? data.icon && /* @__PURE__ */ React32.createElement("span", { className: "shrink-0" }, data.icon) : data.type !== "default" && /* @__PURE__ */ React32.createElement("span", { className: "shrink-0" }, /* @__PURE__ */ React32.createElement(StatusIcon, { className: "icon-sm" })),
|
|
6282
|
+
/* @__PURE__ */ React32.createElement("div", { className: "flex-1 min-w-0" }, /* @__PURE__ */ React32.createElement("div", { className: "font-semibold" }, data.message), data.description && /* @__PURE__ */ React32.createElement("div", { className: cn("mt-1 opacity-80", size === "sm" ? "text-xs" : "text-sm") }, data.description)),
|
|
6283
|
+
(data.action || data.cancel) && /* @__PURE__ */ React32.createElement("div", { className: "flex items-center gap-1.5 shrink-0" }, data.cancel && /* @__PURE__ */ React32.createElement(
|
|
6807
6284
|
"button",
|
|
6808
6285
|
{
|
|
6809
6286
|
type: "button",
|
|
@@ -6814,7 +6291,7 @@ var ToastItem = React33.memo(function ToastItem2({
|
|
|
6814
6291
|
}
|
|
6815
6292
|
},
|
|
6816
6293
|
data.cancel.label
|
|
6817
|
-
), data.action && /* @__PURE__ */
|
|
6294
|
+
), data.action && /* @__PURE__ */ React32.createElement(
|
|
6818
6295
|
"button",
|
|
6819
6296
|
{
|
|
6820
6297
|
type: "button",
|
|
@@ -6826,7 +6303,7 @@ var ToastItem = React33.memo(function ToastItem2({
|
|
|
6826
6303
|
},
|
|
6827
6304
|
data.action.label
|
|
6828
6305
|
)),
|
|
6829
|
-
showClose && dismissible && /* @__PURE__ */
|
|
6306
|
+
showClose && dismissible && /* @__PURE__ */ React32.createElement(
|
|
6830
6307
|
"button",
|
|
6831
6308
|
{
|
|
6832
6309
|
type: "button",
|
|
@@ -6834,7 +6311,7 @@ var ToastItem = React33.memo(function ToastItem2({
|
|
|
6834
6311
|
onClick: handleDismiss,
|
|
6835
6312
|
"aria-label": "Close"
|
|
6836
6313
|
},
|
|
6837
|
-
/* @__PURE__ */
|
|
6314
|
+
/* @__PURE__ */ React32.createElement(DefaultCloseIcon5, { className: "icon-sm" })
|
|
6838
6315
|
)
|
|
6839
6316
|
);
|
|
6840
6317
|
});
|
|
@@ -6851,8 +6328,8 @@ function Toaster({
|
|
|
6851
6328
|
className
|
|
6852
6329
|
}) {
|
|
6853
6330
|
const toasts = useToastStore();
|
|
6854
|
-
const [expanded, setExpanded] =
|
|
6855
|
-
const handleRemove =
|
|
6331
|
+
const [expanded, setExpanded] = React32.useState(false);
|
|
6332
|
+
const handleRemove = React32.useCallback((id) => {
|
|
6856
6333
|
globalStore.removeToast(id);
|
|
6857
6334
|
}, []);
|
|
6858
6335
|
const visible = toasts.slice(0, visibleToasts);
|
|
@@ -6864,7 +6341,7 @@ function Toaster({
|
|
|
6864
6341
|
isTop ? "top-0" : "bottom-0",
|
|
6865
6342
|
isCenter ? "left-1/2 -translate-x-1/2" : isRight ? "right-0" : "left-0"
|
|
6866
6343
|
);
|
|
6867
|
-
return /* @__PURE__ */
|
|
6344
|
+
return /* @__PURE__ */ React32.createElement(
|
|
6868
6345
|
"section",
|
|
6869
6346
|
{
|
|
6870
6347
|
"aria-label": "Notifications",
|
|
@@ -6880,7 +6357,7 @@ function Toaster({
|
|
|
6880
6357
|
},
|
|
6881
6358
|
visible.map((t, index) => {
|
|
6882
6359
|
const isStacked = !expand && !expanded && index > 0;
|
|
6883
|
-
return /* @__PURE__ */
|
|
6360
|
+
return /* @__PURE__ */ React32.createElement(
|
|
6884
6361
|
"div",
|
|
6885
6362
|
{
|
|
6886
6363
|
key: t.id,
|
|
@@ -6898,7 +6375,7 @@ function Toaster({
|
|
|
6898
6375
|
} : { zIndex: visibleToasts - index }
|
|
6899
6376
|
}
|
|
6900
6377
|
},
|
|
6901
|
-
/* @__PURE__ */
|
|
6378
|
+
/* @__PURE__ */ React32.createElement(
|
|
6902
6379
|
ToastItem,
|
|
6903
6380
|
{
|
|
6904
6381
|
data: t,
|
|
@@ -6917,7 +6394,7 @@ function Toaster({
|
|
|
6917
6394
|
Toaster.displayName = "Toaster";
|
|
6918
6395
|
|
|
6919
6396
|
// src/components/ui/progress.tsx
|
|
6920
|
-
var
|
|
6397
|
+
var React33 = __toESM(require("react"));
|
|
6921
6398
|
var ProgressPrimitive = __toESM(require("@radix-ui/react-progress"));
|
|
6922
6399
|
var import_class_variance_authority28 = require("class-variance-authority");
|
|
6923
6400
|
var CIRCULAR_VIEWBOX = 100;
|
|
@@ -6965,7 +6442,7 @@ var valueFontSizes = {
|
|
|
6965
6442
|
default: "text-sm",
|
|
6966
6443
|
lg: "text-base"
|
|
6967
6444
|
};
|
|
6968
|
-
var Progress =
|
|
6445
|
+
var Progress = React33.forwardRef(({
|
|
6969
6446
|
className,
|
|
6970
6447
|
type = "linear",
|
|
6971
6448
|
value = 0,
|
|
@@ -6991,7 +6468,7 @@ var Progress = React34.forwardRef(({
|
|
|
6991
6468
|
const r = (CIRCULAR_VIEWBOX - strokeWidth) / 2;
|
|
6992
6469
|
const circumference = 2 * Math.PI * r;
|
|
6993
6470
|
const offset = circumference * (1 - percentage / 100);
|
|
6994
|
-
return /* @__PURE__ */
|
|
6471
|
+
return /* @__PURE__ */ React33.createElement(
|
|
6995
6472
|
"div",
|
|
6996
6473
|
{
|
|
6997
6474
|
className: cn("inline-flex items-center gap-2", className),
|
|
@@ -7001,7 +6478,7 @@ var Progress = React34.forwardRef(({
|
|
|
7001
6478
|
"aria-valuemax": max,
|
|
7002
6479
|
"aria-label": label
|
|
7003
6480
|
},
|
|
7004
|
-
/* @__PURE__ */
|
|
6481
|
+
/* @__PURE__ */ React33.createElement("div", { className: "relative", style: { width: diameter, height: diameter } }, /* @__PURE__ */ React33.createElement(
|
|
7005
6482
|
"svg",
|
|
7006
6483
|
{
|
|
7007
6484
|
viewBox: `0 0 ${CIRCULAR_VIEWBOX} ${CIRCULAR_VIEWBOX}`,
|
|
@@ -7009,7 +6486,7 @@ var Progress = React34.forwardRef(({
|
|
|
7009
6486
|
width: diameter,
|
|
7010
6487
|
height: diameter
|
|
7011
6488
|
},
|
|
7012
|
-
/* @__PURE__ */
|
|
6489
|
+
/* @__PURE__ */ React33.createElement(
|
|
7013
6490
|
"circle",
|
|
7014
6491
|
{
|
|
7015
6492
|
cx: CIRCULAR_CENTER,
|
|
@@ -7020,7 +6497,7 @@ var Progress = React34.forwardRef(({
|
|
|
7020
6497
|
strokeWidth
|
|
7021
6498
|
}
|
|
7022
6499
|
),
|
|
7023
|
-
/* @__PURE__ */
|
|
6500
|
+
/* @__PURE__ */ React33.createElement(
|
|
7024
6501
|
"circle",
|
|
7025
6502
|
{
|
|
7026
6503
|
cx: CIRCULAR_CENTER,
|
|
@@ -7034,14 +6511,14 @@ var Progress = React34.forwardRef(({
|
|
|
7034
6511
|
strokeLinecap: "round"
|
|
7035
6512
|
}
|
|
7036
6513
|
)
|
|
7037
|
-
), showValue && resolvedSize !== "sm" && /* @__PURE__ */
|
|
6514
|
+
), showValue && resolvedSize !== "sm" && /* @__PURE__ */ React33.createElement("div", { className: cn(
|
|
7038
6515
|
"absolute inset-0 flex items-center justify-center font-semibold font-mono tabular-nums text-foreground",
|
|
7039
6516
|
CIRCULAR_FONT_SIZES[resolvedSize]
|
|
7040
6517
|
) }, valueLabel))
|
|
7041
6518
|
);
|
|
7042
6519
|
}
|
|
7043
6520
|
const stripedBg = variant === "striped" ? "bg-[length:1rem_1rem] bg-[linear-gradient(45deg,rgba(255,255,255,0.15)_25%,transparent_25%,transparent_50%,rgba(255,255,255,0.15)_50%,rgba(255,255,255,0.15)_75%,transparent_75%,transparent)]" : "";
|
|
7044
|
-
return /* @__PURE__ */
|
|
6521
|
+
return /* @__PURE__ */ React33.createElement("div", { className: cn("flex items-center gap-3", showValue && "w-full", className) }, /* @__PURE__ */ React33.createElement(
|
|
7045
6522
|
ProgressPrimitive.Root,
|
|
7046
6523
|
{
|
|
7047
6524
|
ref,
|
|
@@ -7051,7 +6528,7 @@ var Progress = React34.forwardRef(({
|
|
|
7051
6528
|
"aria-label": label,
|
|
7052
6529
|
...props
|
|
7053
6530
|
},
|
|
7054
|
-
/* @__PURE__ */
|
|
6531
|
+
/* @__PURE__ */ React33.createElement(
|
|
7055
6532
|
ProgressPrimitive.Indicator,
|
|
7056
6533
|
{
|
|
7057
6534
|
className: cn(
|
|
@@ -7063,7 +6540,7 @@ var Progress = React34.forwardRef(({
|
|
|
7063
6540
|
style: { width: `${percentage}%` }
|
|
7064
6541
|
}
|
|
7065
6542
|
)
|
|
7066
|
-
), showValue && /* @__PURE__ */
|
|
6543
|
+
), showValue && /* @__PURE__ */ React33.createElement("span", { className: cn(
|
|
7067
6544
|
"shrink-0 font-semibold font-mono tabular-nums text-foreground",
|
|
7068
6545
|
valueFontSizes[resolvedSize]
|
|
7069
6546
|
) }, valueLabel));
|
|
@@ -7071,7 +6548,7 @@ var Progress = React34.forwardRef(({
|
|
|
7071
6548
|
Progress.displayName = "Progress";
|
|
7072
6549
|
|
|
7073
6550
|
// src/components/ui/spinner.tsx
|
|
7074
|
-
var
|
|
6551
|
+
var React34 = __toESM(require("react"));
|
|
7075
6552
|
var import_class_variance_authority29 = require("class-variance-authority");
|
|
7076
6553
|
var RING_SIZES = {
|
|
7077
6554
|
sm: 16,
|
|
@@ -7149,7 +6626,7 @@ var spinnerVariants = (0, import_class_variance_authority29.cva)(
|
|
|
7149
6626
|
}
|
|
7150
6627
|
}
|
|
7151
6628
|
);
|
|
7152
|
-
var Spinner =
|
|
6629
|
+
var Spinner = React34.forwardRef(
|
|
7153
6630
|
({
|
|
7154
6631
|
className,
|
|
7155
6632
|
variant = "ring",
|
|
@@ -7168,7 +6645,7 @@ var Spinner = React35.forwardRef(
|
|
|
7168
6645
|
flip: OrbitFlipSpinner,
|
|
7169
6646
|
morph: OrbitMorphSpinner
|
|
7170
6647
|
};
|
|
7171
|
-
return /* @__PURE__ */
|
|
6648
|
+
return /* @__PURE__ */ React34.createElement(
|
|
7172
6649
|
"div",
|
|
7173
6650
|
{
|
|
7174
6651
|
ref,
|
|
@@ -7177,12 +6654,12 @@ var Spinner = React35.forwardRef(
|
|
|
7177
6654
|
className: cn(spinnerVariants({ size }), className),
|
|
7178
6655
|
...props
|
|
7179
6656
|
},
|
|
7180
|
-
variant === "ring" && /* @__PURE__ */
|
|
7181
|
-
variant === "dots" && /* @__PURE__ */
|
|
7182
|
-
variant === "bars" && /* @__PURE__ */
|
|
6657
|
+
variant === "ring" && /* @__PURE__ */ React34.createElement(RingSpinner, { size: resolvedSize, color, speed }),
|
|
6658
|
+
variant === "dots" && /* @__PURE__ */ React34.createElement(DotsSpinner, { size: resolvedSize, color, speed }),
|
|
6659
|
+
variant === "bars" && /* @__PURE__ */ React34.createElement(BarsSpinner, { size: resolvedSize, color, speed }),
|
|
7183
6660
|
variant === "orbit" && (() => {
|
|
7184
6661
|
const OrbitComponent = orbitMap[orbitStyle];
|
|
7185
|
-
return /* @__PURE__ */
|
|
6662
|
+
return /* @__PURE__ */ React34.createElement(OrbitComponent, { size: resolvedSize, color, speed });
|
|
7186
6663
|
})()
|
|
7187
6664
|
);
|
|
7188
6665
|
}
|
|
@@ -7193,7 +6670,7 @@ function RingSpinner({ size, color, speed }) {
|
|
|
7193
6670
|
const stroke = RING_STROKE[size];
|
|
7194
6671
|
const r = (RING_VIEWBOX - stroke) / 2;
|
|
7195
6672
|
const circumference = 2 * Math.PI * r;
|
|
7196
|
-
return /* @__PURE__ */
|
|
6673
|
+
return /* @__PURE__ */ React34.createElement(
|
|
7197
6674
|
"svg",
|
|
7198
6675
|
{
|
|
7199
6676
|
viewBox: `0 0 ${RING_VIEWBOX} ${RING_VIEWBOX}`,
|
|
@@ -7203,7 +6680,7 @@ function RingSpinner({ size, color, speed }) {
|
|
|
7203
6680
|
className: "animate-spin",
|
|
7204
6681
|
style: { animationDuration: `${SPEED_MS[speed]}ms` }
|
|
7205
6682
|
},
|
|
7206
|
-
/* @__PURE__ */
|
|
6683
|
+
/* @__PURE__ */ React34.createElement(
|
|
7207
6684
|
"circle",
|
|
7208
6685
|
{
|
|
7209
6686
|
cx: RING_CENTER,
|
|
@@ -7213,7 +6690,7 @@ function RingSpinner({ size, color, speed }) {
|
|
|
7213
6690
|
strokeWidth: stroke
|
|
7214
6691
|
}
|
|
7215
6692
|
),
|
|
7216
|
-
/* @__PURE__ */
|
|
6693
|
+
/* @__PURE__ */ React34.createElement(
|
|
7217
6694
|
"circle",
|
|
7218
6695
|
{
|
|
7219
6696
|
cx: RING_CENTER,
|
|
@@ -7231,7 +6708,7 @@ function RingSpinner({ size, color, speed }) {
|
|
|
7231
6708
|
function DotsSpinner({ size, color, speed }) {
|
|
7232
6709
|
const dotSize = DOT_SIZES[size];
|
|
7233
6710
|
const gap = DOT_GAP[size];
|
|
7234
|
-
return /* @__PURE__ */
|
|
6711
|
+
return /* @__PURE__ */ React34.createElement("div", { className: "inline-flex items-center", style: { gap } }, Array.from({ length: DOT_COUNT }, (_, i) => /* @__PURE__ */ React34.createElement(
|
|
7235
6712
|
"div",
|
|
7236
6713
|
{
|
|
7237
6714
|
key: i,
|
|
@@ -7252,7 +6729,7 @@ function BarsSpinner({ size, color, speed }) {
|
|
|
7252
6729
|
const barWidth = BAR_WIDTHS[size];
|
|
7253
6730
|
const barHeight = BAR_HEIGHTS[size];
|
|
7254
6731
|
const gap = BAR_GAP[size];
|
|
7255
|
-
return /* @__PURE__ */
|
|
6732
|
+
return /* @__PURE__ */ React34.createElement("div", { className: "inline-flex items-center", style: { gap, height: barHeight } }, Array.from({ length: BAR_COUNT }, (_, i) => /* @__PURE__ */ React34.createElement(
|
|
7256
6733
|
"div",
|
|
7257
6734
|
{
|
|
7258
6735
|
key: i,
|
|
@@ -7278,7 +6755,7 @@ function OrbitSpinner({ size, color, speed }) {
|
|
|
7278
6755
|
const diameter = ORBIT_SIZES[size];
|
|
7279
6756
|
const stroke = ORBIT_STROKE[size];
|
|
7280
6757
|
const r = (RING_VIEWBOX - stroke * 2) / 2;
|
|
7281
|
-
return /* @__PURE__ */
|
|
6758
|
+
return /* @__PURE__ */ React34.createElement(
|
|
7282
6759
|
"div",
|
|
7283
6760
|
{
|
|
7284
6761
|
className: cn(orbitTextColorMap[color]),
|
|
@@ -7289,7 +6766,7 @@ function OrbitSpinner({ size, color, speed }) {
|
|
|
7289
6766
|
position: "relative"
|
|
7290
6767
|
}
|
|
7291
6768
|
},
|
|
7292
|
-
/* @__PURE__ */
|
|
6769
|
+
/* @__PURE__ */ React34.createElement(
|
|
7293
6770
|
"svg",
|
|
7294
6771
|
{
|
|
7295
6772
|
viewBox: `0 0 ${RING_VIEWBOX} ${RING_VIEWBOX}`,
|
|
@@ -7299,7 +6776,7 @@ function OrbitSpinner({ size, color, speed }) {
|
|
|
7299
6776
|
className: "absolute inset-0 animate-spinner-orbit",
|
|
7300
6777
|
style: { animationDuration: `${ORBIT_SPEED_MS[speed]}ms` }
|
|
7301
6778
|
},
|
|
7302
|
-
/* @__PURE__ */
|
|
6779
|
+
/* @__PURE__ */ React34.createElement(
|
|
7303
6780
|
"circle",
|
|
7304
6781
|
{
|
|
7305
6782
|
cx: RING_CENTER,
|
|
@@ -7310,7 +6787,7 @@ function OrbitSpinner({ size, color, speed }) {
|
|
|
7310
6787
|
}
|
|
7311
6788
|
)
|
|
7312
6789
|
),
|
|
7313
|
-
/* @__PURE__ */
|
|
6790
|
+
/* @__PURE__ */ React34.createElement(
|
|
7314
6791
|
"svg",
|
|
7315
6792
|
{
|
|
7316
6793
|
viewBox: `0 0 ${RING_VIEWBOX} ${RING_VIEWBOX}`,
|
|
@@ -7326,7 +6803,7 @@ function OrbitSpinner({ size, color, speed }) {
|
|
|
7326
6803
|
opacity: 0.35
|
|
7327
6804
|
}
|
|
7328
6805
|
},
|
|
7329
|
-
/* @__PURE__ */
|
|
6806
|
+
/* @__PURE__ */ React34.createElement(
|
|
7330
6807
|
"circle",
|
|
7331
6808
|
{
|
|
7332
6809
|
cx: RING_CENTER,
|
|
@@ -7344,7 +6821,7 @@ function OrbitDotsSpinner({ size, color, speed }) {
|
|
|
7344
6821
|
const diameter = ORBIT_SIZES[size];
|
|
7345
6822
|
const dotSize = ORBIT_DOT_SIZE[size];
|
|
7346
6823
|
const orbitRadius = (diameter - dotSize) / 2;
|
|
7347
|
-
return /* @__PURE__ */
|
|
6824
|
+
return /* @__PURE__ */ React34.createElement(
|
|
7348
6825
|
"div",
|
|
7349
6826
|
{
|
|
7350
6827
|
className: cn(orbitTextColorMap[color]),
|
|
@@ -7355,7 +6832,7 @@ function OrbitDotsSpinner({ size, color, speed }) {
|
|
|
7355
6832
|
position: "relative"
|
|
7356
6833
|
}
|
|
7357
6834
|
},
|
|
7358
|
-
/* @__PURE__ */
|
|
6835
|
+
/* @__PURE__ */ React34.createElement(
|
|
7359
6836
|
"div",
|
|
7360
6837
|
{
|
|
7361
6838
|
className: "animate-spinner-orbit",
|
|
@@ -7367,7 +6844,7 @@ function OrbitDotsSpinner({ size, color, speed }) {
|
|
|
7367
6844
|
transformStyle: "preserve-3d"
|
|
7368
6845
|
}
|
|
7369
6846
|
},
|
|
7370
|
-
[0, 120, 240].map((angle) => /* @__PURE__ */
|
|
6847
|
+
[0, 120, 240].map((angle) => /* @__PURE__ */ React34.createElement(
|
|
7371
6848
|
"div",
|
|
7372
6849
|
{
|
|
7373
6850
|
key: angle,
|
|
@@ -7400,7 +6877,7 @@ function OrbitCubeSpinner({ size, color, speed }) {
|
|
|
7400
6877
|
top: -overlap,
|
|
7401
6878
|
left: -overlap
|
|
7402
6879
|
};
|
|
7403
|
-
return /* @__PURE__ */
|
|
6880
|
+
return /* @__PURE__ */ React34.createElement(
|
|
7404
6881
|
"div",
|
|
7405
6882
|
{
|
|
7406
6883
|
className: cn(orbitTextColorMap[color]),
|
|
@@ -7410,7 +6887,7 @@ function OrbitCubeSpinner({ size, color, speed }) {
|
|
|
7410
6887
|
perspective: cubeSize * 6
|
|
7411
6888
|
}
|
|
7412
6889
|
},
|
|
7413
|
-
/* @__PURE__ */
|
|
6890
|
+
/* @__PURE__ */ React34.createElement(
|
|
7414
6891
|
"div",
|
|
7415
6892
|
{
|
|
7416
6893
|
style: {
|
|
@@ -7420,7 +6897,7 @@ function OrbitCubeSpinner({ size, color, speed }) {
|
|
|
7420
6897
|
transformStyle: "preserve-3d"
|
|
7421
6898
|
}
|
|
7422
6899
|
},
|
|
7423
|
-
/* @__PURE__ */
|
|
6900
|
+
/* @__PURE__ */ React34.createElement(
|
|
7424
6901
|
"div",
|
|
7425
6902
|
{
|
|
7426
6903
|
className: "animate-spinner-orbit",
|
|
@@ -7432,12 +6909,12 @@ function OrbitCubeSpinner({ size, color, speed }) {
|
|
|
7432
6909
|
transformStyle: "preserve-3d"
|
|
7433
6910
|
}
|
|
7434
6911
|
},
|
|
7435
|
-
/* @__PURE__ */
|
|
7436
|
-
/* @__PURE__ */
|
|
7437
|
-
/* @__PURE__ */
|
|
7438
|
-
/* @__PURE__ */
|
|
7439
|
-
/* @__PURE__ */
|
|
7440
|
-
/* @__PURE__ */
|
|
6912
|
+
/* @__PURE__ */ React34.createElement("div", { style: { ...faceBase, transform: `translateZ(${half}px)`, opacity: 0.25 } }),
|
|
6913
|
+
/* @__PURE__ */ React34.createElement("div", { style: { ...faceBase, transform: `translateZ(${-half}px)`, opacity: 0.1 } }),
|
|
6914
|
+
/* @__PURE__ */ React34.createElement("div", { style: { ...faceBase, transform: `rotateY(-90deg) translateZ(${half}px)`, opacity: 0.2 } }),
|
|
6915
|
+
/* @__PURE__ */ React34.createElement("div", { style: { ...faceBase, transform: `rotateY(90deg) translateZ(${half}px)`, opacity: 0.2 } }),
|
|
6916
|
+
/* @__PURE__ */ React34.createElement("div", { style: { ...faceBase, transform: `rotateX(90deg) translateZ(${half}px)`, opacity: 0.15 } }),
|
|
6917
|
+
/* @__PURE__ */ React34.createElement("div", { style: { ...faceBase, transform: `rotateX(-90deg) translateZ(${half}px)`, opacity: 0.08 } })
|
|
7441
6918
|
)
|
|
7442
6919
|
)
|
|
7443
6920
|
);
|
|
@@ -7445,7 +6922,7 @@ function OrbitCubeSpinner({ size, color, speed }) {
|
|
|
7445
6922
|
var FLIP_SIZES = { sm: 14, default: 20, lg: 28 };
|
|
7446
6923
|
function OrbitFlipSpinner({ size, color, speed }) {
|
|
7447
6924
|
const sqSize = FLIP_SIZES[size];
|
|
7448
|
-
return /* @__PURE__ */
|
|
6925
|
+
return /* @__PURE__ */ React34.createElement(
|
|
7449
6926
|
"div",
|
|
7450
6927
|
{
|
|
7451
6928
|
className: cn(orbitTextColorMap[color]),
|
|
@@ -7455,7 +6932,7 @@ function OrbitFlipSpinner({ size, color, speed }) {
|
|
|
7455
6932
|
perspective: sqSize * 4
|
|
7456
6933
|
}
|
|
7457
6934
|
},
|
|
7458
|
-
/* @__PURE__ */
|
|
6935
|
+
/* @__PURE__ */ React34.createElement("div", { style: { transform: "rotateX(25deg)", transformStyle: "preserve-3d", width: "100%", height: "100%" } }, /* @__PURE__ */ React34.createElement(
|
|
7459
6936
|
"div",
|
|
7460
6937
|
{
|
|
7461
6938
|
className: "animate-spinner-orbit",
|
|
@@ -7474,7 +6951,7 @@ function OrbitFlipSpinner({ size, color, speed }) {
|
|
|
7474
6951
|
var MORPH_SIZES = { sm: 16, default: 24, lg: 34 };
|
|
7475
6952
|
function OrbitMorphSpinner({ size, color, speed }) {
|
|
7476
6953
|
const morphSize = MORPH_SIZES[size];
|
|
7477
|
-
return /* @__PURE__ */
|
|
6954
|
+
return /* @__PURE__ */ React34.createElement(
|
|
7478
6955
|
"div",
|
|
7479
6956
|
{
|
|
7480
6957
|
className: cn(orbitTextColorMap[color]),
|
|
@@ -7484,7 +6961,7 @@ function OrbitMorphSpinner({ size, color, speed }) {
|
|
|
7484
6961
|
perspective: morphSize * 3
|
|
7485
6962
|
}
|
|
7486
6963
|
},
|
|
7487
|
-
/* @__PURE__ */
|
|
6964
|
+
/* @__PURE__ */ React34.createElement(
|
|
7488
6965
|
"div",
|
|
7489
6966
|
{
|
|
7490
6967
|
className: "animate-spinner-morph",
|
|
@@ -7501,7 +6978,7 @@ function OrbitMorphSpinner({ size, color, speed }) {
|
|
|
7501
6978
|
}
|
|
7502
6979
|
|
|
7503
6980
|
// src/components/ui/skeleton.tsx
|
|
7504
|
-
var
|
|
6981
|
+
var React35 = __toESM(require("react"));
|
|
7505
6982
|
var import_class_variance_authority30 = require("class-variance-authority");
|
|
7506
6983
|
var PULSE_DURATION_MS = 2e3;
|
|
7507
6984
|
var WAVE_DURATION_MS = 1800;
|
|
@@ -7528,7 +7005,7 @@ var skeletonVariants = (0, import_class_variance_authority30.cva)(
|
|
|
7528
7005
|
}
|
|
7529
7006
|
}
|
|
7530
7007
|
);
|
|
7531
|
-
var SkeletonBlock =
|
|
7008
|
+
var SkeletonBlock = React35.forwardRef(
|
|
7532
7009
|
({
|
|
7533
7010
|
className,
|
|
7534
7011
|
variant = "text",
|
|
@@ -7539,7 +7016,7 @@ var SkeletonBlock = React36.forwardRef(
|
|
|
7539
7016
|
style,
|
|
7540
7017
|
...props
|
|
7541
7018
|
}, ref) => {
|
|
7542
|
-
return /* @__PURE__ */
|
|
7019
|
+
return /* @__PURE__ */ React35.createElement(
|
|
7543
7020
|
"div",
|
|
7544
7021
|
{
|
|
7545
7022
|
ref,
|
|
@@ -7559,7 +7036,7 @@ var SkeletonBlock = React36.forwardRef(
|
|
|
7559
7036
|
},
|
|
7560
7037
|
...props
|
|
7561
7038
|
},
|
|
7562
|
-
animation === "wave" && /* @__PURE__ */
|
|
7039
|
+
animation === "wave" && /* @__PURE__ */ React35.createElement(
|
|
7563
7040
|
"div",
|
|
7564
7041
|
{
|
|
7565
7042
|
className: "absolute inset-0 animate-skeleton-wave",
|
|
@@ -7573,7 +7050,7 @@ var SkeletonBlock = React36.forwardRef(
|
|
|
7573
7050
|
}
|
|
7574
7051
|
);
|
|
7575
7052
|
SkeletonBlock.displayName = "SkeletonBlock";
|
|
7576
|
-
var Skeleton =
|
|
7053
|
+
var Skeleton = React35.forwardRef(
|
|
7577
7054
|
({
|
|
7578
7055
|
count,
|
|
7579
7056
|
loading,
|
|
@@ -7582,13 +7059,13 @@ var Skeleton = React36.forwardRef(
|
|
|
7582
7059
|
...rest
|
|
7583
7060
|
}, ref) => {
|
|
7584
7061
|
if (loading !== void 0) {
|
|
7585
|
-
if (!loading) return /* @__PURE__ */
|
|
7062
|
+
if (!loading) return /* @__PURE__ */ React35.createElement(React35.Fragment, null, children);
|
|
7586
7063
|
}
|
|
7587
7064
|
if (count != null && count > 1 && variant === "text") {
|
|
7588
|
-
return /* @__PURE__ */
|
|
7065
|
+
return /* @__PURE__ */ React35.createElement("div", { ref, className: "space-y-2.5", "aria-hidden": "true" }, Array.from({ length: count }, (_, i) => {
|
|
7589
7066
|
const widthPattern = MULTI_LINE_WIDTHS[i % MULTI_LINE_WIDTHS.length];
|
|
7590
7067
|
const isLast = i === count - 1;
|
|
7591
|
-
return /* @__PURE__ */
|
|
7068
|
+
return /* @__PURE__ */ React35.createElement(
|
|
7592
7069
|
SkeletonBlock,
|
|
7593
7070
|
{
|
|
7594
7071
|
key: i,
|
|
@@ -7599,7 +7076,7 @@ var Skeleton = React36.forwardRef(
|
|
|
7599
7076
|
);
|
|
7600
7077
|
}));
|
|
7601
7078
|
}
|
|
7602
|
-
return /* @__PURE__ */
|
|
7079
|
+
return /* @__PURE__ */ React35.createElement(SkeletonBlock, { ref, variant, ...rest });
|
|
7603
7080
|
}
|
|
7604
7081
|
);
|
|
7605
7082
|
Skeleton.displayName = "Skeleton";
|
|
@@ -7647,19 +7124,6 @@ Skeleton.displayName = "Skeleton";
|
|
|
7647
7124
|
CardHeader,
|
|
7648
7125
|
CardImage,
|
|
7649
7126
|
CardTitle,
|
|
7650
|
-
Chart,
|
|
7651
|
-
ChartArea,
|
|
7652
|
-
ChartBar,
|
|
7653
|
-
ChartContainer,
|
|
7654
|
-
ChartLegend,
|
|
7655
|
-
ChartLegendContent,
|
|
7656
|
-
ChartLine,
|
|
7657
|
-
ChartPie,
|
|
7658
|
-
ChartStyle,
|
|
7659
|
-
ChartTooltip,
|
|
7660
|
-
ChartTooltipContent,
|
|
7661
|
-
ChartXAxis,
|
|
7662
|
-
ChartYAxis,
|
|
7663
7127
|
Checkbox,
|
|
7664
7128
|
Divider,
|
|
7665
7129
|
Drawer,
|
|
@@ -7823,7 +7287,6 @@ Skeleton.displayName = "Skeleton";
|
|
|
7823
7287
|
toggleVariants,
|
|
7824
7288
|
tooltipContentVariants,
|
|
7825
7289
|
useButtonGroup,
|
|
7826
|
-
useChart,
|
|
7827
7290
|
useFieldContext,
|
|
7828
7291
|
usePagination
|
|
7829
7292
|
});
|