@karakuri-ui/react 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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/package.json +11 -1
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"));
|
|
@@ -3198,517 +3184,8 @@ var Avatar = Object.assign(AvatarRoot, {
|
|
|
3198
3184
|
Group: AvatarGroup
|
|
3199
3185
|
});
|
|
3200
3186
|
|
|
3201
|
-
// src/components/ui/chart.tsx
|
|
3202
|
-
var React20 = __toESM(require("react"));
|
|
3203
|
-
var RechartsPrimitive = __toESM(require("recharts"));
|
|
3204
|
-
var THEMES = { light: "", dark: ".dark" };
|
|
3205
|
-
var ChartContext = React20.createContext(null);
|
|
3206
|
-
function useChart() {
|
|
3207
|
-
const context = React20.useContext(ChartContext);
|
|
3208
|
-
if (!context) {
|
|
3209
|
-
throw new Error("useChart must be used within a <ChartContainer />");
|
|
3210
|
-
}
|
|
3211
|
-
return context;
|
|
3212
|
-
}
|
|
3213
|
-
function ChartContainer({
|
|
3214
|
-
id,
|
|
3215
|
-
className,
|
|
3216
|
-
children,
|
|
3217
|
-
config,
|
|
3218
|
-
hoverFade = false,
|
|
3219
|
-
...props
|
|
3220
|
-
}) {
|
|
3221
|
-
const uniqueId = React20.useId();
|
|
3222
|
-
const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
|
|
3223
|
-
const [activeIndex, setActiveIndex] = React20.useState(null);
|
|
3224
|
-
const [activeDataKey, setActiveDataKey] = React20.useState(null);
|
|
3225
|
-
return /* @__PURE__ */ React20.createElement(ChartContext.Provider, { value: { config, hoverFade, activeIndex, setActiveIndex, activeDataKey, setActiveDataKey } }, /* @__PURE__ */ React20.createElement(
|
|
3226
|
-
"div",
|
|
3227
|
-
{
|
|
3228
|
-
"data-slot": "chart",
|
|
3229
|
-
"data-chart": chartId,
|
|
3230
|
-
onMouseLeave: hoverFade ? () => {
|
|
3231
|
-
setActiveIndex(null);
|
|
3232
|
-
setActiveDataKey(null);
|
|
3233
|
-
} : void 0,
|
|
3234
|
-
className: cn(
|
|
3235
|
-
"flex aspect-video w-full justify-center text-xs outline-none [&_*]:outline-none",
|
|
3236
|
-
// Responsive axis tick font-size — consumed by ChartXAxis / ChartYAxis via var()
|
|
3237
|
-
"[--chart-axis-fs:var(--font-size-2xs)] sm:[--chart-axis-fs:var(--font-size-xs)]",
|
|
3238
|
-
// Recharts element overrides — use arbitrary properties for v3/v4 compat
|
|
3239
|
-
"[&_.recharts-cartesian-axis-tick_text]:[fill:var(--color-text-muted)]",
|
|
3240
|
-
"[&_.recharts-cartesian-grid_line[stroke='#ccc']]:[stroke:var(--color-border)]",
|
|
3241
|
-
"[&_.recharts-cartesian-grid_line]:[stroke-dasharray:3_3]",
|
|
3242
|
-
"[&_.recharts-curve.recharts-tooltip-cursor]:[stroke:var(--color-border)]",
|
|
3243
|
-
"[&_.recharts-dot[stroke='#fff']]:stroke-transparent",
|
|
3244
|
-
"[&_.recharts-layer]:outline-none",
|
|
3245
|
-
"[&_.recharts-polar-grid_[stroke='#ccc']]:[stroke:var(--color-border)]",
|
|
3246
|
-
"[&_.recharts-radial-bar-background-sector]:[fill:var(--color-background-muted)]",
|
|
3247
|
-
"[&_.recharts-rectangle.recharts-tooltip-cursor]:[fill:transparent]",
|
|
3248
|
-
"[&_.recharts-reference-line_[stroke='#ccc']]:[stroke:var(--color-border)]",
|
|
3249
|
-
"[&_.recharts-sector]:outline-none",
|
|
3250
|
-
"[&_.recharts-sector[stroke='#fff']]:stroke-transparent",
|
|
3251
|
-
"[&_.recharts-surface]:outline-none",
|
|
3252
|
-
className
|
|
3253
|
-
),
|
|
3254
|
-
...props
|
|
3255
|
-
},
|
|
3256
|
-
/* @__PURE__ */ React20.createElement(ChartStyle, { id: chartId, config }),
|
|
3257
|
-
/* @__PURE__ */ React20.createElement(RechartsPrimitive.ResponsiveContainer, null, children)
|
|
3258
|
-
));
|
|
3259
|
-
}
|
|
3260
|
-
var CHART_TOOLTIP_KEYFRAME = "@keyframes chart-tooltip-in{from{opacity:0}to{opacity:1}}";
|
|
3261
|
-
var ChartStyle = ({ id, config }) => {
|
|
3262
|
-
const colorConfig = Object.entries(config).filter(
|
|
3263
|
-
([, config2]) => config2.theme || config2.color
|
|
3264
|
-
);
|
|
3265
|
-
const colorCss = colorConfig.length ? Object.entries(THEMES).map(
|
|
3266
|
-
([theme, prefix]) => `
|
|
3267
|
-
${prefix} [data-chart=${id}] {
|
|
3268
|
-
${colorConfig.map(([key, itemConfig]) => {
|
|
3269
|
-
const color = itemConfig.theme?.[theme] || itemConfig.color;
|
|
3270
|
-
return color ? ` --color-${key}: ${color};` : null;
|
|
3271
|
-
}).join("\n")}
|
|
3272
|
-
}
|
|
3273
|
-
`
|
|
3274
|
-
).join("\n") : "";
|
|
3275
|
-
return /* @__PURE__ */ React20.createElement(
|
|
3276
|
-
"style",
|
|
3277
|
-
{
|
|
3278
|
-
dangerouslySetInnerHTML: {
|
|
3279
|
-
__html: CHART_TOOLTIP_KEYFRAME + colorCss
|
|
3280
|
-
}
|
|
3281
|
-
}
|
|
3282
|
-
);
|
|
3283
|
-
};
|
|
3284
|
-
var CHART_HOVER_FADE_OPACITY = 0.35;
|
|
3285
|
-
var CHART_FADE_TRANSITION = { transition: "fill-opacity var(--duration-fast) ease-out, stroke-opacity var(--duration-fast) ease-out" };
|
|
3286
|
-
var CHART_BAR_RADIUS_MAP = {
|
|
3287
|
-
none: 0,
|
|
3288
|
-
// --radius-none: 0px
|
|
3289
|
-
sm: 2,
|
|
3290
|
-
// --radius-sm: 2px
|
|
3291
|
-
base: 4,
|
|
3292
|
-
// --radius-base: 4px
|
|
3293
|
-
md: 6,
|
|
3294
|
-
// --radius-md: 6px
|
|
3295
|
-
lg: 8
|
|
3296
|
-
// --radius-lg: 8px
|
|
3297
|
-
};
|
|
3298
|
-
function ChartBar({
|
|
3299
|
-
radius = "none",
|
|
3300
|
-
layout = "vertical",
|
|
3301
|
-
stackPosition = "top",
|
|
3302
|
-
variant = "solid",
|
|
3303
|
-
fill,
|
|
3304
|
-
stackId,
|
|
3305
|
-
...props
|
|
3306
|
-
}) {
|
|
3307
|
-
const { hoverFade, activeIndex, setActiveIndex } = useChart();
|
|
3308
|
-
const r = CHART_BAR_RADIUS_MAP[radius];
|
|
3309
|
-
const isStacked = !!stackId || stackPosition === "bottom";
|
|
3310
|
-
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];
|
|
3311
|
-
const outlineShape = React20.useCallback((shapeProps) => {
|
|
3312
|
-
const x = shapeProps.x ?? 0;
|
|
3313
|
-
const y = shapeProps.y ?? 0;
|
|
3314
|
-
const width = shapeProps.width ?? 0;
|
|
3315
|
-
const height = shapeProps.height ?? 0;
|
|
3316
|
-
if (!width || !height || width <= 0 || height <= 0) return /* @__PURE__ */ React20.createElement("g", null);
|
|
3317
|
-
const sw = 2;
|
|
3318
|
-
const inset = sw / 2;
|
|
3319
|
-
const rx = typeof appliedRadius === "number" ? Math.max(0, appliedRadius - inset) : 0;
|
|
3320
|
-
const fadeMultiplier = hoverFade && activeIndex !== null && shapeProps.index !== activeIndex ? CHART_HOVER_FADE_OPACITY : 1;
|
|
3321
|
-
return /* @__PURE__ */ React20.createElement(
|
|
3322
|
-
"rect",
|
|
3323
|
-
{
|
|
3324
|
-
x: x + inset,
|
|
3325
|
-
y: y + inset,
|
|
3326
|
-
width: Math.max(0, width - sw),
|
|
3327
|
-
height: Math.max(0, height - sw),
|
|
3328
|
-
rx,
|
|
3329
|
-
fill,
|
|
3330
|
-
fillOpacity: 0.4 * fadeMultiplier,
|
|
3331
|
-
stroke: fill,
|
|
3332
|
-
strokeOpacity: fadeMultiplier,
|
|
3333
|
-
strokeWidth: sw,
|
|
3334
|
-
style: hoverFade ? CHART_FADE_TRANSITION : void 0
|
|
3335
|
-
}
|
|
3336
|
-
);
|
|
3337
|
-
}, [appliedRadius, fill, hoverFade, activeIndex]);
|
|
3338
|
-
const solidHoverShape = React20.useCallback((shapeProps) => {
|
|
3339
|
-
const opacity = activeIndex === null ? 1 : shapeProps.index === activeIndex ? 1 : CHART_HOVER_FADE_OPACITY;
|
|
3340
|
-
return /* @__PURE__ */ React20.createElement(
|
|
3341
|
-
RechartsPrimitive.Rectangle,
|
|
3342
|
-
{
|
|
3343
|
-
...shapeProps,
|
|
3344
|
-
fillOpacity: opacity,
|
|
3345
|
-
style: CHART_FADE_TRANSITION
|
|
3346
|
-
}
|
|
3347
|
-
);
|
|
3348
|
-
}, [activeIndex]);
|
|
3349
|
-
const useOutline = variant === "outline" && !isStacked;
|
|
3350
|
-
const needsHoverShape = hoverFade && variant === "solid" && !useOutline;
|
|
3351
|
-
return /* @__PURE__ */ React20.createElement(
|
|
3352
|
-
RechartsPrimitive.Bar,
|
|
3353
|
-
{
|
|
3354
|
-
radius: appliedRadius,
|
|
3355
|
-
fill,
|
|
3356
|
-
stackId,
|
|
3357
|
-
...hoverFade && { isAnimationActive: false },
|
|
3358
|
-
...useOutline && { shape: outlineShape },
|
|
3359
|
-
...needsHoverShape && { shape: solidHoverShape },
|
|
3360
|
-
...hoverFade && { onMouseEnter: (_, index) => setActiveIndex(index) },
|
|
3361
|
-
...props
|
|
3362
|
-
}
|
|
3363
|
-
);
|
|
3364
|
-
}
|
|
3365
|
-
function ChartTooltip(props) {
|
|
3366
|
-
return /* @__PURE__ */ React20.createElement(RechartsPrimitive.Tooltip, { animationDuration: 0, ...props });
|
|
3367
|
-
}
|
|
3368
|
-
function ChartTooltipContent({
|
|
3369
|
-
active,
|
|
3370
|
-
payload,
|
|
3371
|
-
className,
|
|
3372
|
-
indicator = "dot",
|
|
3373
|
-
hideLabel = false,
|
|
3374
|
-
hideIndicator = false,
|
|
3375
|
-
label,
|
|
3376
|
-
labelFormatter,
|
|
3377
|
-
labelClassName,
|
|
3378
|
-
formatter,
|
|
3379
|
-
color,
|
|
3380
|
-
nameKey,
|
|
3381
|
-
labelKey
|
|
3382
|
-
}) {
|
|
3383
|
-
const { config } = useChart();
|
|
3384
|
-
const tooltipLabel = React20.useMemo(() => {
|
|
3385
|
-
if (hideLabel || !payload?.length) {
|
|
3386
|
-
return null;
|
|
3387
|
-
}
|
|
3388
|
-
const [item] = payload;
|
|
3389
|
-
const key = `${labelKey || item?.dataKey || item?.name || "value"}`;
|
|
3390
|
-
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
3391
|
-
const value = !labelKey && typeof label === "string" ? config[label]?.label || label : itemConfig?.label;
|
|
3392
|
-
if (labelFormatter) {
|
|
3393
|
-
return /* @__PURE__ */ React20.createElement("div", { className: cn("font-semibold", labelClassName) }, labelFormatter(value, payload));
|
|
3394
|
-
}
|
|
3395
|
-
if (!value) {
|
|
3396
|
-
return null;
|
|
3397
|
-
}
|
|
3398
|
-
return /* @__PURE__ */ React20.createElement("div", { className: cn("font-semibold", labelClassName) }, value);
|
|
3399
|
-
}, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey]);
|
|
3400
|
-
if (!active || !payload?.length) {
|
|
3401
|
-
return null;
|
|
3402
|
-
}
|
|
3403
|
-
const nestLabel = payload.length === 1 && indicator !== "dot";
|
|
3404
|
-
return /* @__PURE__ */ React20.createElement(
|
|
3405
|
-
"div",
|
|
3406
|
-
{
|
|
3407
|
-
className: cn(
|
|
3408
|
-
"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",
|
|
3409
|
-
className
|
|
3410
|
-
),
|
|
3411
|
-
style: { animation: "chart-tooltip-in var(--duration-slow) ease-out" }
|
|
3412
|
-
},
|
|
3413
|
-
!nestLabel ? tooltipLabel : null,
|
|
3414
|
-
/* @__PURE__ */ React20.createElement("div", { className: "grid gap-1.5" }, payload.filter((item) => item.type !== "none").map((item, index) => {
|
|
3415
|
-
const key = `${nameKey || item.name || item.dataKey || "value"}`;
|
|
3416
|
-
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
3417
|
-
const indicatorColor = color || item.payload?.fill || item.color;
|
|
3418
|
-
return /* @__PURE__ */ React20.createElement(
|
|
3419
|
-
"div",
|
|
3420
|
-
{
|
|
3421
|
-
key: item.dataKey,
|
|
3422
|
-
className: cn(
|
|
3423
|
-
"flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-text-muted",
|
|
3424
|
-
indicator === "dot" && "items-center"
|
|
3425
|
-
)
|
|
3426
|
-
},
|
|
3427
|
-
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(
|
|
3428
|
-
"div",
|
|
3429
|
-
{
|
|
3430
|
-
className: cn(
|
|
3431
|
-
"shrink-0 rounded-sm",
|
|
3432
|
-
{
|
|
3433
|
-
"h-2.5 w-2.5": indicator === "dot",
|
|
3434
|
-
"w-1": indicator === "line",
|
|
3435
|
-
"w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
|
|
3436
|
-
"my-0.5": nestLabel && indicator === "dashed"
|
|
3437
|
-
}
|
|
3438
|
-
),
|
|
3439
|
-
style: {
|
|
3440
|
-
backgroundColor: indicator === "dashed" ? "transparent" : indicatorColor,
|
|
3441
|
-
borderColor: indicatorColor
|
|
3442
|
-
}
|
|
3443
|
-
}
|
|
3444
|
-
), /* @__PURE__ */ React20.createElement(
|
|
3445
|
-
"div",
|
|
3446
|
-
{
|
|
3447
|
-
className: cn(
|
|
3448
|
-
"flex flex-1 justify-between leading-none",
|
|
3449
|
-
nestLabel ? "items-end" : "items-center"
|
|
3450
|
-
)
|
|
3451
|
-
},
|
|
3452
|
-
/* @__PURE__ */ React20.createElement("div", { className: "grid gap-1.5" }, nestLabel ? tooltipLabel : null, /* @__PURE__ */ React20.createElement("span", { className: "text-text-muted" }, itemConfig?.label || item.name)),
|
|
3453
|
-
item.value && /* @__PURE__ */ React20.createElement("span", { className: "font-mono font-semibold text-foreground tabular-nums" }, item.value.toLocaleString())
|
|
3454
|
-
))
|
|
3455
|
-
);
|
|
3456
|
-
}))
|
|
3457
|
-
);
|
|
3458
|
-
}
|
|
3459
|
-
var ChartLegend = RechartsPrimitive.Legend;
|
|
3460
|
-
function ChartLegendContent({
|
|
3461
|
-
className,
|
|
3462
|
-
hideIcon = false,
|
|
3463
|
-
payload,
|
|
3464
|
-
verticalAlign = "bottom",
|
|
3465
|
-
align = "center",
|
|
3466
|
-
layout = "horizontal",
|
|
3467
|
-
nameKey
|
|
3468
|
-
}) {
|
|
3469
|
-
const { config } = useChart();
|
|
3470
|
-
if (!payload?.length) {
|
|
3471
|
-
return null;
|
|
3472
|
-
}
|
|
3473
|
-
const isVertical = layout === "vertical";
|
|
3474
|
-
return /* @__PURE__ */ React20.createElement(
|
|
3475
|
-
"div",
|
|
3476
|
-
{
|
|
3477
|
-
className: cn(
|
|
3478
|
-
"flex gap-4",
|
|
3479
|
-
isVertical ? "flex-col items-start gap-1.5" : [
|
|
3480
|
-
"items-center",
|
|
3481
|
-
align === "left" ? "justify-start" : align === "right" ? "justify-end" : "justify-center",
|
|
3482
|
-
verticalAlign === "top" ? "pb-3" : "pt-3"
|
|
3483
|
-
],
|
|
3484
|
-
className
|
|
3485
|
-
)
|
|
3486
|
-
},
|
|
3487
|
-
payload.filter((item) => item.type !== "none").map((item) => {
|
|
3488
|
-
const key = `${nameKey || item.dataKey || "value"}`;
|
|
3489
|
-
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
3490
|
-
return /* @__PURE__ */ React20.createElement(
|
|
3491
|
-
"div",
|
|
3492
|
-
{
|
|
3493
|
-
key: item.value,
|
|
3494
|
-
className: "flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-text-muted"
|
|
3495
|
-
},
|
|
3496
|
-
itemConfig?.icon && !hideIcon ? /* @__PURE__ */ React20.createElement(itemConfig.icon, null) : /* @__PURE__ */ React20.createElement(
|
|
3497
|
-
"div",
|
|
3498
|
-
{
|
|
3499
|
-
className: "h-2 w-2 shrink-0 rounded-sm",
|
|
3500
|
-
style: {
|
|
3501
|
-
backgroundColor: item.color
|
|
3502
|
-
}
|
|
3503
|
-
}
|
|
3504
|
-
),
|
|
3505
|
-
/* @__PURE__ */ React20.createElement("span", { className: "text-foreground" }, itemConfig?.label)
|
|
3506
|
-
);
|
|
3507
|
-
})
|
|
3508
|
-
);
|
|
3509
|
-
}
|
|
3510
|
-
function getPayloadConfigFromPayload(config, payload, key) {
|
|
3511
|
-
if (typeof payload !== "object" || payload === null) {
|
|
3512
|
-
return void 0;
|
|
3513
|
-
}
|
|
3514
|
-
const payloadPayload = "payload" in payload && typeof payload.payload === "object" && payload.payload !== null ? payload.payload : void 0;
|
|
3515
|
-
let configLabelKey = key;
|
|
3516
|
-
if (key in payload && typeof payload[key] === "string") {
|
|
3517
|
-
configLabelKey = payload[key];
|
|
3518
|
-
} else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key] === "string") {
|
|
3519
|
-
configLabelKey = payloadPayload[key];
|
|
3520
|
-
}
|
|
3521
|
-
return configLabelKey in config ? config[configLabelKey] : config[key];
|
|
3522
|
-
}
|
|
3523
|
-
var CHART_AXIS_TICK_STYLE = { style: { fontSize: "var(--chart-axis-fs)", fill: "var(--color-text-subtle)" } };
|
|
3524
|
-
var CHART_XAXIS_PADDING = { left: 16, right: 16 };
|
|
3525
|
-
function ChartXAxis({ tick, padding, ...props }) {
|
|
3526
|
-
return /* @__PURE__ */ React20.createElement(RechartsPrimitive.XAxis, { tick: tick ?? CHART_AXIS_TICK_STYLE, padding: padding ?? CHART_XAXIS_PADDING, ...props });
|
|
3527
|
-
}
|
|
3528
|
-
function ChartYAxis({ tick, width = "auto", ...props }) {
|
|
3529
|
-
return /* @__PURE__ */ React20.createElement(RechartsPrimitive.YAxis, { tick: tick ?? CHART_AXIS_TICK_STYLE, width, ...props });
|
|
3530
|
-
}
|
|
3531
|
-
var CHART_LINE_DASH = "5 5";
|
|
3532
|
-
var CHART_DOT_PROPS = { r: 3, strokeWidth: 2 };
|
|
3533
|
-
var CHART_ACTIVE_DOT_PROPS = { r: 5, strokeWidth: 2 };
|
|
3534
|
-
function ChartLine({
|
|
3535
|
-
type = "monotone",
|
|
3536
|
-
variant = "solid",
|
|
3537
|
-
dot: showDot = true,
|
|
3538
|
-
activeDot: showActiveDot = true,
|
|
3539
|
-
stroke,
|
|
3540
|
-
dataKey,
|
|
3541
|
-
...props
|
|
3542
|
-
}) {
|
|
3543
|
-
const { hoverFade, activeDataKey, setActiveDataKey } = useChart();
|
|
3544
|
-
const isFaded = hoverFade && activeDataKey !== null && activeDataKey !== dataKey;
|
|
3545
|
-
const opacity = isFaded ? CHART_HOVER_FADE_OPACITY : 1;
|
|
3546
|
-
const dotProps = showDot ? variant === "dashed" ? { ...CHART_DOT_PROPS, strokeDasharray: "0" } : CHART_DOT_PROPS : false;
|
|
3547
|
-
const activeDotProps = showActiveDot ? variant === "dashed" ? { ...CHART_ACTIVE_DOT_PROPS, strokeDasharray: "0" } : CHART_ACTIVE_DOT_PROPS : false;
|
|
3548
|
-
return /* @__PURE__ */ React20.createElement(
|
|
3549
|
-
RechartsPrimitive.Line,
|
|
3550
|
-
{
|
|
3551
|
-
type,
|
|
3552
|
-
dataKey,
|
|
3553
|
-
stroke,
|
|
3554
|
-
strokeWidth: 2,
|
|
3555
|
-
strokeDasharray: variant === "dashed" ? CHART_LINE_DASH : void 0,
|
|
3556
|
-
dot: dotProps,
|
|
3557
|
-
activeDot: activeDotProps,
|
|
3558
|
-
strokeOpacity: opacity,
|
|
3559
|
-
...hoverFade && { isAnimationActive: false },
|
|
3560
|
-
...hoverFade && { onMouseEnter: () => setActiveDataKey(dataKey) },
|
|
3561
|
-
style: hoverFade ? { transition: "stroke-opacity var(--duration-fast) ease-out" } : void 0,
|
|
3562
|
-
...props
|
|
3563
|
-
}
|
|
3564
|
-
);
|
|
3565
|
-
}
|
|
3566
|
-
var CHART_AREA_DEFAULT_OPACITY = 0.4;
|
|
3567
|
-
function ChartArea({
|
|
3568
|
-
type = "monotone",
|
|
3569
|
-
variant = "solid",
|
|
3570
|
-
dot: showDot = true,
|
|
3571
|
-
activeDot: showActiveDot = true,
|
|
3572
|
-
fillOpacity = CHART_AREA_DEFAULT_OPACITY,
|
|
3573
|
-
stroke,
|
|
3574
|
-
fill,
|
|
3575
|
-
dataKey,
|
|
3576
|
-
...props
|
|
3577
|
-
}) {
|
|
3578
|
-
const { hoverFade, activeDataKey, setActiveDataKey } = useChart();
|
|
3579
|
-
const isFaded = hoverFade && activeDataKey !== null && activeDataKey !== dataKey;
|
|
3580
|
-
const opacity = isFaded ? CHART_HOVER_FADE_OPACITY : 1;
|
|
3581
|
-
const dotProps = showDot ? CHART_DOT_PROPS : false;
|
|
3582
|
-
const activeDotProps = showActiveDot ? CHART_ACTIVE_DOT_PROPS : false;
|
|
3583
|
-
const gradientId = `area-gradient-${String(dataKey)}`;
|
|
3584
|
-
const effectiveFill = variant === "gradient" ? `url(#${gradientId})` : fill || stroke;
|
|
3585
|
-
const effectiveFillOpacity = variant === "gradient" ? 1 : fillOpacity;
|
|
3586
|
-
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(
|
|
3587
|
-
RechartsPrimitive.Area,
|
|
3588
|
-
{
|
|
3589
|
-
type,
|
|
3590
|
-
dataKey,
|
|
3591
|
-
stroke,
|
|
3592
|
-
fill: effectiveFill,
|
|
3593
|
-
fillOpacity: effectiveFillOpacity * opacity,
|
|
3594
|
-
strokeWidth: 2,
|
|
3595
|
-
dot: dotProps,
|
|
3596
|
-
activeDot: activeDotProps,
|
|
3597
|
-
strokeOpacity: opacity,
|
|
3598
|
-
...hoverFade && { isAnimationActive: false },
|
|
3599
|
-
...hoverFade && { onMouseEnter: () => setActiveDataKey(dataKey) },
|
|
3600
|
-
style: hoverFade ? { transition: "fill-opacity var(--duration-fast) ease-out, stroke-opacity var(--duration-fast) ease-out" } : void 0,
|
|
3601
|
-
...props
|
|
3602
|
-
}
|
|
3603
|
-
));
|
|
3604
|
-
}
|
|
3605
|
-
var CHART_PIE_ACTIVE_OFFSET = 8;
|
|
3606
|
-
var CHART_PIE_DONUT_INNER_RADIUS = 60;
|
|
3607
|
-
var CHART_PIE_LABEL_RADIAL = 16;
|
|
3608
|
-
var CHART_PIE_LABEL_HORIZ = 20;
|
|
3609
|
-
var CHART_PIE_SKIP_ANGLE = 15;
|
|
3610
|
-
function ChartPie({
|
|
3611
|
-
variant = "pie",
|
|
3612
|
-
label: labelMode = "none",
|
|
3613
|
-
labelContent = "value",
|
|
3614
|
-
activeShape: showActiveShape = true,
|
|
3615
|
-
innerRadius,
|
|
3616
|
-
paddingAngle = 0,
|
|
3617
|
-
cornerRadius = 0,
|
|
3618
|
-
startAngle = 90,
|
|
3619
|
-
endAngle = -270,
|
|
3620
|
-
...props
|
|
3621
|
-
}) {
|
|
3622
|
-
const resolvedInnerRadius = innerRadius ?? (variant === "donut" ? CHART_PIE_DONUT_INNER_RADIUS : 0);
|
|
3623
|
-
const activeShapeConfig = showActiveShape ? (props2) => /* @__PURE__ */ React20.createElement(
|
|
3624
|
-
RechartsPrimitive.Sector,
|
|
3625
|
-
{
|
|
3626
|
-
...props2,
|
|
3627
|
-
outerRadius: props2.outerRadius + CHART_PIE_ACTIVE_OFFSET
|
|
3628
|
-
}
|
|
3629
|
-
) : void 0;
|
|
3630
|
-
const getDisplayText = (entry) => labelContent === "percent" ? `${(entry.percent * 100).toFixed(0)}%` : entry.value;
|
|
3631
|
-
const labelConfig = labelMode === "outside" ? (entry) => {
|
|
3632
|
-
const RADIAN = Math.PI / 180;
|
|
3633
|
-
const { cx, cy, midAngle, outerRadius, fill } = entry;
|
|
3634
|
-
const sx = cx + outerRadius * Math.cos(-midAngle * RADIAN);
|
|
3635
|
-
const sy = cy + outerRadius * Math.sin(-midAngle * RADIAN);
|
|
3636
|
-
const mx = cx + (outerRadius + CHART_PIE_LABEL_RADIAL) * Math.cos(-midAngle * RADIAN);
|
|
3637
|
-
const my = cy + (outerRadius + CHART_PIE_LABEL_RADIAL) * Math.sin(-midAngle * RADIAN);
|
|
3638
|
-
const isRight = mx > cx;
|
|
3639
|
-
const ex = mx + (isRight ? CHART_PIE_LABEL_HORIZ : -CHART_PIE_LABEL_HORIZ);
|
|
3640
|
-
return /* @__PURE__ */ React20.createElement("g", null, /* @__PURE__ */ React20.createElement(
|
|
3641
|
-
"polyline",
|
|
3642
|
-
{
|
|
3643
|
-
points: `${sx},${sy} ${mx},${my} ${ex},${my}`,
|
|
3644
|
-
fill: "none",
|
|
3645
|
-
stroke: fill,
|
|
3646
|
-
strokeWidth: 1,
|
|
3647
|
-
strokeOpacity: 0.5
|
|
3648
|
-
}
|
|
3649
|
-
), /* @__PURE__ */ React20.createElement(
|
|
3650
|
-
"text",
|
|
3651
|
-
{
|
|
3652
|
-
x: ex + (isRight ? 4 : -4),
|
|
3653
|
-
y: my,
|
|
3654
|
-
textAnchor: isRight ? "start" : "end",
|
|
3655
|
-
dominantBaseline: "central",
|
|
3656
|
-
style: { fontSize: "var(--font-size-xs)", fill: "var(--color-text-muted)" }
|
|
3657
|
-
},
|
|
3658
|
-
getDisplayText(entry)
|
|
3659
|
-
));
|
|
3660
|
-
} : labelMode === "inside" ? (entry) => {
|
|
3661
|
-
const angle = Math.abs(entry.endAngle - entry.startAngle);
|
|
3662
|
-
if (angle < CHART_PIE_SKIP_ANGLE) return null;
|
|
3663
|
-
const RADIAN = Math.PI / 180;
|
|
3664
|
-
const { cx, cy, innerRadius: ir, outerRadius: or, midAngle } = entry;
|
|
3665
|
-
const ratio = ir > 0 ? 0.5 : 0.65;
|
|
3666
|
-
const radius = ir + (or - ir) * ratio;
|
|
3667
|
-
const x = cx + radius * Math.cos(-midAngle * RADIAN);
|
|
3668
|
-
const y = cy + radius * Math.sin(-midAngle * RADIAN);
|
|
3669
|
-
return /* @__PURE__ */ React20.createElement(
|
|
3670
|
-
"text",
|
|
3671
|
-
{
|
|
3672
|
-
x,
|
|
3673
|
-
y,
|
|
3674
|
-
textAnchor: "middle",
|
|
3675
|
-
dominantBaseline: "central",
|
|
3676
|
-
style: { fontSize: "var(--font-size-xs)", fill: "white", fontWeight: 600 }
|
|
3677
|
-
},
|
|
3678
|
-
getDisplayText(entry)
|
|
3679
|
-
);
|
|
3680
|
-
} : false;
|
|
3681
|
-
return /* @__PURE__ */ React20.createElement(
|
|
3682
|
-
RechartsPrimitive.Pie,
|
|
3683
|
-
{
|
|
3684
|
-
innerRadius: resolvedInnerRadius,
|
|
3685
|
-
paddingAngle,
|
|
3686
|
-
cornerRadius,
|
|
3687
|
-
startAngle,
|
|
3688
|
-
endAngle,
|
|
3689
|
-
label: labelConfig,
|
|
3690
|
-
labelLine: false,
|
|
3691
|
-
activeShape: activeShapeConfig,
|
|
3692
|
-
...props
|
|
3693
|
-
}
|
|
3694
|
-
);
|
|
3695
|
-
}
|
|
3696
|
-
var Chart = Object.assign(ChartContainer, {
|
|
3697
|
-
Bar: ChartBar,
|
|
3698
|
-
Line: ChartLine,
|
|
3699
|
-
Area: ChartArea,
|
|
3700
|
-
Pie: ChartPie,
|
|
3701
|
-
Tooltip: ChartTooltip,
|
|
3702
|
-
TooltipContent: ChartTooltipContent,
|
|
3703
|
-
Legend: ChartLegend,
|
|
3704
|
-
LegendContent: ChartLegendContent,
|
|
3705
|
-
XAxis: ChartXAxis,
|
|
3706
|
-
YAxis: ChartYAxis,
|
|
3707
|
-
Style: ChartStyle
|
|
3708
|
-
});
|
|
3709
|
-
|
|
3710
3187
|
// src/components/ui/metric-card.tsx
|
|
3711
|
-
var
|
|
3188
|
+
var React20 = __toESM(require("react"));
|
|
3712
3189
|
var import_class_variance_authority16 = require("class-variance-authority");
|
|
3713
3190
|
var metricCardVariants = (0, import_class_variance_authority16.cva)(
|
|
3714
3191
|
"transition-colors",
|
|
@@ -3768,11 +3245,11 @@ var trendConfig = {
|
|
|
3768
3245
|
down: { color: "text-text-error", srLabel: "Decreased" },
|
|
3769
3246
|
neutral: { color: "text-text-muted", srLabel: "No change" }
|
|
3770
3247
|
};
|
|
3771
|
-
var MetricCardContext =
|
|
3772
|
-
var MetricCardRoot =
|
|
3248
|
+
var MetricCardContext = React20.createContext({ size: "default", animated: false });
|
|
3249
|
+
var MetricCardRoot = React20.forwardRef(
|
|
3773
3250
|
({ className, variant, size, radius, animated = false, children, ...props }, ref) => {
|
|
3774
3251
|
const resolvedSize = size || "default";
|
|
3775
|
-
return /* @__PURE__ */
|
|
3252
|
+
return /* @__PURE__ */ React20.createElement(MetricCardContext.Provider, { value: { size: resolvedSize, animated } }, /* @__PURE__ */ React20.createElement(
|
|
3776
3253
|
"div",
|
|
3777
3254
|
{
|
|
3778
3255
|
ref,
|
|
@@ -3784,8 +3261,8 @@ var MetricCardRoot = React21.forwardRef(
|
|
|
3784
3261
|
}
|
|
3785
3262
|
);
|
|
3786
3263
|
MetricCardRoot.displayName = "MetricCard";
|
|
3787
|
-
var MetricCardHeader =
|
|
3788
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
3264
|
+
var MetricCardHeader = React20.forwardRef(
|
|
3265
|
+
({ className, ...props }, ref) => /* @__PURE__ */ React20.createElement(
|
|
3789
3266
|
"div",
|
|
3790
3267
|
{
|
|
3791
3268
|
ref,
|
|
@@ -3795,10 +3272,10 @@ var MetricCardHeader = React21.forwardRef(
|
|
|
3795
3272
|
)
|
|
3796
3273
|
);
|
|
3797
3274
|
MetricCardHeader.displayName = "MetricCardHeader";
|
|
3798
|
-
var MetricCardTitle =
|
|
3275
|
+
var MetricCardTitle = React20.forwardRef(
|
|
3799
3276
|
({ className, ...props }, ref) => {
|
|
3800
|
-
const { size } =
|
|
3801
|
-
return /* @__PURE__ */
|
|
3277
|
+
const { size } = React20.useContext(MetricCardContext);
|
|
3278
|
+
return /* @__PURE__ */ React20.createElement(
|
|
3802
3279
|
"p",
|
|
3803
3280
|
{
|
|
3804
3281
|
ref,
|
|
@@ -3809,11 +3286,11 @@ var MetricCardTitle = React21.forwardRef(
|
|
|
3809
3286
|
}
|
|
3810
3287
|
);
|
|
3811
3288
|
MetricCardTitle.displayName = "MetricCardTitle";
|
|
3812
|
-
var MetricCardValue =
|
|
3289
|
+
var MetricCardValue = React20.forwardRef(
|
|
3813
3290
|
({ className, children, ...props }, ref) => {
|
|
3814
|
-
const { size, animated } =
|
|
3815
|
-
const [display, setDisplay] =
|
|
3816
|
-
|
|
3291
|
+
const { size, animated } = React20.useContext(MetricCardContext);
|
|
3292
|
+
const [display, setDisplay] = React20.useState(children);
|
|
3293
|
+
React20.useEffect(() => {
|
|
3817
3294
|
if (!animated || typeof children !== "string") {
|
|
3818
3295
|
setDisplay(children);
|
|
3819
3296
|
return;
|
|
@@ -3848,7 +3325,7 @@ var MetricCardValue = React21.forwardRef(
|
|
|
3848
3325
|
}, duration / steps);
|
|
3849
3326
|
return () => clearInterval(timer);
|
|
3850
3327
|
}, [children, animated]);
|
|
3851
|
-
return /* @__PURE__ */
|
|
3328
|
+
return /* @__PURE__ */ React20.createElement(
|
|
3852
3329
|
"p",
|
|
3853
3330
|
{
|
|
3854
3331
|
ref,
|
|
@@ -3860,27 +3337,27 @@ var MetricCardValue = React21.forwardRef(
|
|
|
3860
3337
|
}
|
|
3861
3338
|
);
|
|
3862
3339
|
MetricCardValue.displayName = "MetricCardValue";
|
|
3863
|
-
var MetricCardTrend =
|
|
3340
|
+
var MetricCardTrend = React20.forwardRef(
|
|
3864
3341
|
({ className, direction, children, ...props }, ref) => {
|
|
3865
3342
|
const config = trendConfig[direction];
|
|
3866
|
-
return /* @__PURE__ */
|
|
3343
|
+
return /* @__PURE__ */ React20.createElement(
|
|
3867
3344
|
"p",
|
|
3868
3345
|
{
|
|
3869
3346
|
ref,
|
|
3870
3347
|
className: cn("flex items-center gap-1 text-sm mt-2", config.color, className),
|
|
3871
3348
|
...props
|
|
3872
3349
|
},
|
|
3873
|
-
direction === "up" && /* @__PURE__ */
|
|
3874
|
-
direction === "down" && /* @__PURE__ */
|
|
3875
|
-
direction === "neutral" && /* @__PURE__ */
|
|
3876
|
-
/* @__PURE__ */
|
|
3350
|
+
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" })),
|
|
3351
|
+
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" })),
|
|
3352
|
+
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" })),
|
|
3353
|
+
/* @__PURE__ */ React20.createElement("span", { className: "sr-only" }, config.srLabel),
|
|
3877
3354
|
children
|
|
3878
3355
|
);
|
|
3879
3356
|
}
|
|
3880
3357
|
);
|
|
3881
3358
|
MetricCardTrend.displayName = "MetricCardTrend";
|
|
3882
|
-
var MetricCardDescription =
|
|
3883
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
3359
|
+
var MetricCardDescription = React20.forwardRef(
|
|
3360
|
+
({ className, ...props }, ref) => /* @__PURE__ */ React20.createElement(
|
|
3884
3361
|
"p",
|
|
3885
3362
|
{
|
|
3886
3363
|
ref,
|
|
@@ -3890,10 +3367,10 @@ var MetricCardDescription = React21.forwardRef(
|
|
|
3890
3367
|
)
|
|
3891
3368
|
);
|
|
3892
3369
|
MetricCardDescription.displayName = "MetricCardDescription";
|
|
3893
|
-
var MetricCardSymbol =
|
|
3370
|
+
var MetricCardSymbol = React20.forwardRef(
|
|
3894
3371
|
({ className, ...props }, ref) => {
|
|
3895
|
-
const { size } =
|
|
3896
|
-
return /* @__PURE__ */
|
|
3372
|
+
const { size } = React20.useContext(MetricCardContext);
|
|
3373
|
+
return /* @__PURE__ */ React20.createElement(
|
|
3897
3374
|
"div",
|
|
3898
3375
|
{
|
|
3899
3376
|
ref,
|
|
@@ -3914,7 +3391,7 @@ var MetricCard = Object.assign(MetricCardRoot, {
|
|
|
3914
3391
|
});
|
|
3915
3392
|
|
|
3916
3393
|
// src/components/ui/badge.tsx
|
|
3917
|
-
var
|
|
3394
|
+
var React21 = __toESM(require("react"));
|
|
3918
3395
|
var import_react_slot4 = require("@radix-ui/react-slot");
|
|
3919
3396
|
var import_class_variance_authority17 = require("class-variance-authority");
|
|
3920
3397
|
var colorMap = {
|
|
@@ -4001,7 +3478,7 @@ var dotColorMap = {
|
|
|
4001
3478
|
error: "bg-error",
|
|
4002
3479
|
info: "bg-info"
|
|
4003
3480
|
};
|
|
4004
|
-
var Badge =
|
|
3481
|
+
var Badge = React21.forwardRef(
|
|
4005
3482
|
({
|
|
4006
3483
|
className,
|
|
4007
3484
|
variant = "subtle",
|
|
@@ -4021,7 +3498,7 @@ var Badge = React22.forwardRef(
|
|
|
4021
3498
|
const colorClasses = colorMap[color][variant];
|
|
4022
3499
|
const outlineClasses = variant === "outline" ? "border bg-transparent" : "";
|
|
4023
3500
|
const dotColor = variant === "solid" ? "bg-current" : dotColorMap[color];
|
|
4024
|
-
return /* @__PURE__ */
|
|
3501
|
+
return /* @__PURE__ */ React21.createElement(
|
|
4025
3502
|
Comp,
|
|
4026
3503
|
{
|
|
4027
3504
|
ref,
|
|
@@ -4033,14 +3510,14 @@ var Badge = React22.forwardRef(
|
|
|
4033
3510
|
),
|
|
4034
3511
|
...props
|
|
4035
3512
|
},
|
|
4036
|
-
dot && /* @__PURE__ */
|
|
3513
|
+
dot && /* @__PURE__ */ React21.createElement(
|
|
4037
3514
|
"span",
|
|
4038
3515
|
{
|
|
4039
3516
|
className: cn("shrink-0 rounded-full", badgeDotSizes[resolvedSize], dotColor),
|
|
4040
3517
|
"aria-hidden": "true"
|
|
4041
3518
|
}
|
|
4042
3519
|
),
|
|
4043
|
-
icon && /* @__PURE__ */
|
|
3520
|
+
icon && /* @__PURE__ */ React21.createElement(
|
|
4044
3521
|
"span",
|
|
4045
3522
|
{
|
|
4046
3523
|
className: cn("shrink-0 [&>svg]:w-full [&>svg]:h-full", badgeIconSizes[resolvedSize]),
|
|
@@ -4049,7 +3526,7 @@ var Badge = React22.forwardRef(
|
|
|
4049
3526
|
icon
|
|
4050
3527
|
),
|
|
4051
3528
|
children,
|
|
4052
|
-
removable && /* @__PURE__ */
|
|
3529
|
+
removable && /* @__PURE__ */ React21.createElement(
|
|
4053
3530
|
"button",
|
|
4054
3531
|
{
|
|
4055
3532
|
type: "button",
|
|
@@ -4060,7 +3537,7 @@ var Badge = React22.forwardRef(
|
|
|
4060
3537
|
},
|
|
4061
3538
|
"aria-label": "Remove"
|
|
4062
3539
|
},
|
|
4063
|
-
/* @__PURE__ */
|
|
3540
|
+
/* @__PURE__ */ React21.createElement(
|
|
4064
3541
|
"svg",
|
|
4065
3542
|
{
|
|
4066
3543
|
className: "w-3 h-3",
|
|
@@ -4070,7 +3547,7 @@ var Badge = React22.forwardRef(
|
|
|
4070
3547
|
strokeWidth: 2,
|
|
4071
3548
|
"aria-hidden": "true"
|
|
4072
3549
|
},
|
|
4073
|
-
/* @__PURE__ */
|
|
3550
|
+
/* @__PURE__ */ React21.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" })
|
|
4074
3551
|
)
|
|
4075
3552
|
)
|
|
4076
3553
|
);
|
|
@@ -4079,15 +3556,15 @@ var Badge = React22.forwardRef(
|
|
|
4079
3556
|
Badge.displayName = "Badge";
|
|
4080
3557
|
|
|
4081
3558
|
// src/components/ui/card.tsx
|
|
4082
|
-
var
|
|
3559
|
+
var React22 = __toESM(require("react"));
|
|
4083
3560
|
var import_react_slot5 = require("@radix-ui/react-slot");
|
|
4084
3561
|
var import_class_variance_authority18 = require("class-variance-authority");
|
|
4085
|
-
var CardContext =
|
|
3562
|
+
var CardContext = React22.createContext({
|
|
4086
3563
|
size: "default",
|
|
4087
3564
|
direction: "vertical"
|
|
4088
3565
|
});
|
|
4089
3566
|
function useCard() {
|
|
4090
|
-
return
|
|
3567
|
+
return React22.useContext(CardContext);
|
|
4091
3568
|
}
|
|
4092
3569
|
var cardVariants = (0, import_class_variance_authority18.cva)(
|
|
4093
3570
|
"flex overflow-hidden transition-all duration-normal",
|
|
@@ -4130,7 +3607,7 @@ var cardVariants = (0, import_class_variance_authority18.cva)(
|
|
|
4130
3607
|
}
|
|
4131
3608
|
}
|
|
4132
3609
|
);
|
|
4133
|
-
var CardRoot =
|
|
3610
|
+
var CardRoot = React22.forwardRef(
|
|
4134
3611
|
({
|
|
4135
3612
|
className,
|
|
4136
3613
|
variant = "default",
|
|
@@ -4145,19 +3622,19 @@ var CardRoot = React23.forwardRef(
|
|
|
4145
3622
|
const Comp = asChild ? import_react_slot5.Slot : "div";
|
|
4146
3623
|
let content = children;
|
|
4147
3624
|
if (direction === "horizontal") {
|
|
4148
|
-
const childArray =
|
|
3625
|
+
const childArray = React22.Children.toArray(children);
|
|
4149
3626
|
const imageChildren = [];
|
|
4150
3627
|
const otherChildren = [];
|
|
4151
3628
|
childArray.forEach((child) => {
|
|
4152
|
-
if (
|
|
3629
|
+
if (React22.isValidElement(child) && child.type === CardImage) {
|
|
4153
3630
|
imageChildren.push(child);
|
|
4154
3631
|
} else {
|
|
4155
3632
|
otherChildren.push(child);
|
|
4156
3633
|
}
|
|
4157
3634
|
});
|
|
4158
|
-
content = /* @__PURE__ */
|
|
3635
|
+
content = /* @__PURE__ */ React22.createElement(React22.Fragment, null, imageChildren, /* @__PURE__ */ React22.createElement("div", { className: "flex-1 flex flex-col min-w-0" }, otherChildren));
|
|
4159
3636
|
}
|
|
4160
|
-
return /* @__PURE__ */
|
|
3637
|
+
return /* @__PURE__ */ React22.createElement(CardContext.Provider, { value: { size, direction } }, /* @__PURE__ */ React22.createElement(
|
|
4161
3638
|
Comp,
|
|
4162
3639
|
{
|
|
4163
3640
|
ref,
|
|
@@ -4224,13 +3701,13 @@ var overlayOpacityMap = {
|
|
|
4224
3701
|
80: "from-black/80",
|
|
4225
3702
|
90: "from-black/90"
|
|
4226
3703
|
};
|
|
4227
|
-
var CardImage =
|
|
3704
|
+
var CardImage = React22.forwardRef(
|
|
4228
3705
|
({ className, overlay = false, overlayOpacity = 60, overlayClassName, alt = "", ...props }, ref) => {
|
|
4229
3706
|
const { direction } = useCard();
|
|
4230
3707
|
const isHorizontal = direction === "horizontal";
|
|
4231
3708
|
if (isHorizontal) {
|
|
4232
3709
|
const opacityClass = overlay ? overlayOpacityMap[overlayOpacity] || "from-black/60" : null;
|
|
4233
|
-
return /* @__PURE__ */
|
|
3710
|
+
return /* @__PURE__ */ React22.createElement("div", { className: cn("relative shrink-0 w-48 overflow-hidden", className) }, /* @__PURE__ */ React22.createElement(
|
|
4234
3711
|
"img",
|
|
4235
3712
|
{
|
|
4236
3713
|
ref,
|
|
@@ -4238,11 +3715,11 @@ var CardImage = React23.forwardRef(
|
|
|
4238
3715
|
className: "absolute inset-0 w-full h-full object-cover",
|
|
4239
3716
|
...props
|
|
4240
3717
|
}
|
|
4241
|
-
), overlay && /* @__PURE__ */
|
|
3718
|
+
), overlay && /* @__PURE__ */ React22.createElement("div", { className: cn("absolute inset-0 bg-gradient-to-t to-transparent", overlayClassName || opacityClass) }));
|
|
4242
3719
|
}
|
|
4243
3720
|
if (overlay) {
|
|
4244
3721
|
const opacityClass = overlayOpacityMap[overlayOpacity] || "from-black/60";
|
|
4245
|
-
return /* @__PURE__ */
|
|
3722
|
+
return /* @__PURE__ */ React22.createElement("div", { className: "relative w-full shrink-0 overflow-hidden" }, /* @__PURE__ */ React22.createElement(
|
|
4246
3723
|
"img",
|
|
4247
3724
|
{
|
|
4248
3725
|
ref,
|
|
@@ -4250,9 +3727,9 @@ var CardImage = React23.forwardRef(
|
|
|
4250
3727
|
className: cn("w-full object-cover", className),
|
|
4251
3728
|
...props
|
|
4252
3729
|
}
|
|
4253
|
-
), /* @__PURE__ */
|
|
3730
|
+
), /* @__PURE__ */ React22.createElement("div", { className: cn("absolute inset-0 bg-gradient-to-t to-transparent", overlayClassName || opacityClass) }));
|
|
4254
3731
|
}
|
|
4255
|
-
return /* @__PURE__ */
|
|
3732
|
+
return /* @__PURE__ */ React22.createElement(
|
|
4256
3733
|
"img",
|
|
4257
3734
|
{
|
|
4258
3735
|
ref,
|
|
@@ -4264,20 +3741,20 @@ var CardImage = React23.forwardRef(
|
|
|
4264
3741
|
}
|
|
4265
3742
|
);
|
|
4266
3743
|
CardImage.displayName = "CardImage";
|
|
4267
|
-
var CardHeader =
|
|
3744
|
+
var CardHeader = React22.forwardRef(
|
|
4268
3745
|
({ className, children, ...props }, ref) => {
|
|
4269
3746
|
const { size } = useCard();
|
|
4270
|
-
const childArray =
|
|
3747
|
+
const childArray = React22.Children.toArray(children);
|
|
4271
3748
|
const actionChildren = [];
|
|
4272
3749
|
const otherChildren = [];
|
|
4273
3750
|
childArray.forEach((child) => {
|
|
4274
|
-
if (
|
|
3751
|
+
if (React22.isValidElement(child) && child.type === CardAction) {
|
|
4275
3752
|
actionChildren.push(child);
|
|
4276
3753
|
} else {
|
|
4277
3754
|
otherChildren.push(child);
|
|
4278
3755
|
}
|
|
4279
3756
|
});
|
|
4280
|
-
return /* @__PURE__ */
|
|
3757
|
+
return /* @__PURE__ */ React22.createElement(
|
|
4281
3758
|
"div",
|
|
4282
3759
|
{
|
|
4283
3760
|
ref,
|
|
@@ -4291,15 +3768,15 @@ var CardHeader = React23.forwardRef(
|
|
|
4291
3768
|
),
|
|
4292
3769
|
...props
|
|
4293
3770
|
},
|
|
4294
|
-
/* @__PURE__ */
|
|
3771
|
+
/* @__PURE__ */ React22.createElement("div", { className: "flex-1 min-w-0 space-y-3" }, otherChildren),
|
|
4295
3772
|
actionChildren
|
|
4296
3773
|
);
|
|
4297
3774
|
}
|
|
4298
3775
|
);
|
|
4299
3776
|
CardHeader.displayName = "CardHeader";
|
|
4300
|
-
var CardTitle =
|
|
3777
|
+
var CardTitle = React22.forwardRef(
|
|
4301
3778
|
({ className, icon, children, ...props }, ref) => {
|
|
4302
|
-
return /* @__PURE__ */
|
|
3779
|
+
return /* @__PURE__ */ React22.createElement(
|
|
4303
3780
|
"h3",
|
|
4304
3781
|
{
|
|
4305
3782
|
ref,
|
|
@@ -4310,15 +3787,15 @@ var CardTitle = React23.forwardRef(
|
|
|
4310
3787
|
),
|
|
4311
3788
|
...props
|
|
4312
3789
|
},
|
|
4313
|
-
icon && /* @__PURE__ */
|
|
3790
|
+
icon && /* @__PURE__ */ React22.createElement("span", { className: "shrink-0 icon-sm [&>svg]:w-full [&>svg]:h-full", "aria-hidden": "true" }, icon),
|
|
4314
3791
|
children
|
|
4315
3792
|
);
|
|
4316
3793
|
}
|
|
4317
3794
|
);
|
|
4318
3795
|
CardTitle.displayName = "CardTitle";
|
|
4319
|
-
var CardDescription =
|
|
3796
|
+
var CardDescription = React22.forwardRef(
|
|
4320
3797
|
({ className, ...props }, ref) => {
|
|
4321
|
-
return /* @__PURE__ */
|
|
3798
|
+
return /* @__PURE__ */ React22.createElement(
|
|
4322
3799
|
"p",
|
|
4323
3800
|
{
|
|
4324
3801
|
ref,
|
|
@@ -4329,9 +3806,9 @@ var CardDescription = React23.forwardRef(
|
|
|
4329
3806
|
}
|
|
4330
3807
|
);
|
|
4331
3808
|
CardDescription.displayName = "CardDescription";
|
|
4332
|
-
var CardAction =
|
|
3809
|
+
var CardAction = React22.forwardRef(
|
|
4333
3810
|
({ className, ...props }, ref) => {
|
|
4334
|
-
return /* @__PURE__ */
|
|
3811
|
+
return /* @__PURE__ */ React22.createElement(
|
|
4335
3812
|
"div",
|
|
4336
3813
|
{
|
|
4337
3814
|
ref,
|
|
@@ -4342,10 +3819,10 @@ var CardAction = React23.forwardRef(
|
|
|
4342
3819
|
}
|
|
4343
3820
|
);
|
|
4344
3821
|
CardAction.displayName = "CardAction";
|
|
4345
|
-
var CardContent =
|
|
3822
|
+
var CardContent = React22.forwardRef(
|
|
4346
3823
|
({ className, ...props }, ref) => {
|
|
4347
3824
|
const { size } = useCard();
|
|
4348
|
-
return /* @__PURE__ */
|
|
3825
|
+
return /* @__PURE__ */ React22.createElement(
|
|
4349
3826
|
"div",
|
|
4350
3827
|
{
|
|
4351
3828
|
ref,
|
|
@@ -4356,10 +3833,10 @@ var CardContent = React23.forwardRef(
|
|
|
4356
3833
|
}
|
|
4357
3834
|
);
|
|
4358
3835
|
CardContent.displayName = "CardContent";
|
|
4359
|
-
var CardFooter =
|
|
3836
|
+
var CardFooter = React22.forwardRef(
|
|
4360
3837
|
({ className, ...props }, ref) => {
|
|
4361
3838
|
const { size } = useCard();
|
|
4362
|
-
return /* @__PURE__ */
|
|
3839
|
+
return /* @__PURE__ */ React22.createElement(
|
|
4363
3840
|
"div",
|
|
4364
3841
|
{
|
|
4365
3842
|
ref,
|
|
@@ -4387,9 +3864,9 @@ var Card = Object.assign(CardRoot, {
|
|
|
4387
3864
|
});
|
|
4388
3865
|
|
|
4389
3866
|
// src/components/ui/table.tsx
|
|
4390
|
-
var
|
|
3867
|
+
var React23 = __toESM(require("react"));
|
|
4391
3868
|
var import_class_variance_authority19 = require("class-variance-authority");
|
|
4392
|
-
var TableContext =
|
|
3869
|
+
var TableContext = React23.createContext({ size: "default", variant: "default", stickyHeader: false });
|
|
4393
3870
|
var cellPaddingMap = {
|
|
4394
3871
|
sm: "px-3 py-2 text-sm",
|
|
4395
3872
|
default: "px-4 py-3 text-sm",
|
|
@@ -4420,8 +3897,8 @@ var tableVariants = (0, import_class_variance_authority19.cva)(
|
|
|
4420
3897
|
}
|
|
4421
3898
|
}
|
|
4422
3899
|
);
|
|
4423
|
-
var TableRoot =
|
|
4424
|
-
({ className, size = "default", variant = "default", stickyHeader = false, wrapperClassName, ...props }, ref) => /* @__PURE__ */
|
|
3900
|
+
var TableRoot = React23.forwardRef(
|
|
3901
|
+
({ 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(
|
|
4425
3902
|
"table",
|
|
4426
3903
|
{
|
|
4427
3904
|
ref,
|
|
@@ -4431,9 +3908,9 @@ var TableRoot = React24.forwardRef(
|
|
|
4431
3908
|
)))
|
|
4432
3909
|
);
|
|
4433
3910
|
TableRoot.displayName = "Table";
|
|
4434
|
-
var TableHeader =
|
|
4435
|
-
const { stickyHeader } =
|
|
4436
|
-
return /* @__PURE__ */
|
|
3911
|
+
var TableHeader = React23.forwardRef(({ className, ...props }, ref) => {
|
|
3912
|
+
const { stickyHeader } = React23.useContext(TableContext);
|
|
3913
|
+
return /* @__PURE__ */ React23.createElement(
|
|
4437
3914
|
"thead",
|
|
4438
3915
|
{
|
|
4439
3916
|
ref,
|
|
@@ -4447,9 +3924,9 @@ var TableHeader = React24.forwardRef(({ className, ...props }, ref) => {
|
|
|
4447
3924
|
);
|
|
4448
3925
|
});
|
|
4449
3926
|
TableHeader.displayName = "TableHeader";
|
|
4450
|
-
var TableBody =
|
|
4451
|
-
const { variant } =
|
|
4452
|
-
return /* @__PURE__ */
|
|
3927
|
+
var TableBody = React23.forwardRef(({ className, ...props }, ref) => {
|
|
3928
|
+
const { variant } = React23.useContext(TableContext);
|
|
3929
|
+
return /* @__PURE__ */ React23.createElement(
|
|
4453
3930
|
"tbody",
|
|
4454
3931
|
{
|
|
4455
3932
|
ref,
|
|
@@ -4463,7 +3940,7 @@ var TableBody = React24.forwardRef(({ className, ...props }, ref) => {
|
|
|
4463
3940
|
);
|
|
4464
3941
|
});
|
|
4465
3942
|
TableBody.displayName = "TableBody";
|
|
4466
|
-
var TableFooter =
|
|
3943
|
+
var TableFooter = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(
|
|
4467
3944
|
"tfoot",
|
|
4468
3945
|
{
|
|
4469
3946
|
ref,
|
|
@@ -4475,8 +3952,8 @@ var TableFooter = React24.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
4475
3952
|
}
|
|
4476
3953
|
));
|
|
4477
3954
|
TableFooter.displayName = "TableFooter";
|
|
4478
|
-
var TableRow =
|
|
4479
|
-
({ className, interactive = false, selected = false, ...props }, ref) => /* @__PURE__ */
|
|
3955
|
+
var TableRow = React23.forwardRef(
|
|
3956
|
+
({ className, interactive = false, selected = false, ...props }, ref) => /* @__PURE__ */ React23.createElement(
|
|
4480
3957
|
"tr",
|
|
4481
3958
|
{
|
|
4482
3959
|
ref,
|
|
@@ -4492,15 +3969,15 @@ var TableRow = React24.forwardRef(
|
|
|
4492
3969
|
);
|
|
4493
3970
|
TableRow.displayName = "TableRow";
|
|
4494
3971
|
var defaultSortIcons = {
|
|
4495
|
-
asc: /* @__PURE__ */
|
|
4496
|
-
desc: /* @__PURE__ */
|
|
4497
|
-
default: /* @__PURE__ */
|
|
3972
|
+
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" })),
|
|
3973
|
+
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" })),
|
|
3974
|
+
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" }))
|
|
4498
3975
|
};
|
|
4499
|
-
var TableHead =
|
|
3976
|
+
var TableHead = React23.forwardRef(
|
|
4500
3977
|
({ className, align = "left", sortable = false, sortDirection = null, onSort, sortIcon, children, ...props }, ref) => {
|
|
4501
|
-
const { size } =
|
|
3978
|
+
const { size } = React23.useContext(TableContext);
|
|
4502
3979
|
const icons = { ...defaultSortIcons, ...sortIcon };
|
|
4503
|
-
const content = sortable ? /* @__PURE__ */
|
|
3980
|
+
const content = sortable ? /* @__PURE__ */ React23.createElement(
|
|
4504
3981
|
"button",
|
|
4505
3982
|
{
|
|
4506
3983
|
type: "button",
|
|
@@ -4508,12 +3985,12 @@ var TableHead = React24.forwardRef(
|
|
|
4508
3985
|
onClick: onSort
|
|
4509
3986
|
},
|
|
4510
3987
|
children,
|
|
4511
|
-
/* @__PURE__ */
|
|
3988
|
+
/* @__PURE__ */ React23.createElement("span", { className: cn(
|
|
4512
3989
|
"shrink-0 transition-colors duration-fast",
|
|
4513
3990
|
sortDirection ? "text-foreground" : "text-text-muted"
|
|
4514
3991
|
) }, sortDirection === "asc" ? icons.asc : sortDirection === "desc" ? icons.desc : icons.default)
|
|
4515
3992
|
) : children;
|
|
4516
|
-
return /* @__PURE__ */
|
|
3993
|
+
return /* @__PURE__ */ React23.createElement(
|
|
4517
3994
|
"th",
|
|
4518
3995
|
{
|
|
4519
3996
|
ref,
|
|
@@ -4534,10 +4011,10 @@ var TableHead = React24.forwardRef(
|
|
|
4534
4011
|
}
|
|
4535
4012
|
);
|
|
4536
4013
|
TableHead.displayName = "TableHead";
|
|
4537
|
-
var TableCell =
|
|
4014
|
+
var TableCell = React23.forwardRef(
|
|
4538
4015
|
({ className, align = "left", ...props }, ref) => {
|
|
4539
|
-
const { size } =
|
|
4540
|
-
return /* @__PURE__ */
|
|
4016
|
+
const { size } = React23.useContext(TableContext);
|
|
4017
|
+
return /* @__PURE__ */ React23.createElement(
|
|
4541
4018
|
"td",
|
|
4542
4019
|
{
|
|
4543
4020
|
ref,
|
|
@@ -4555,7 +4032,7 @@ var TableCell = React24.forwardRef(
|
|
|
4555
4032
|
}
|
|
4556
4033
|
);
|
|
4557
4034
|
TableCell.displayName = "TableCell";
|
|
4558
|
-
var TableCaption =
|
|
4035
|
+
var TableCaption = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React23.createElement(
|
|
4559
4036
|
"caption",
|
|
4560
4037
|
{
|
|
4561
4038
|
ref,
|
|
@@ -4575,11 +4052,11 @@ var Table = Object.assign(TableRoot, {
|
|
|
4575
4052
|
});
|
|
4576
4053
|
|
|
4577
4054
|
// src/components/ui/tabs.tsx
|
|
4578
|
-
var
|
|
4055
|
+
var React24 = __toESM(require("react"));
|
|
4579
4056
|
var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"));
|
|
4580
4057
|
var import_class_variance_authority20 = require("class-variance-authority");
|
|
4581
|
-
var TabsStyleContext =
|
|
4582
|
-
var useTabsStyleContext = () =>
|
|
4058
|
+
var TabsStyleContext = React24.createContext({});
|
|
4059
|
+
var useTabsStyleContext = () => React24.useContext(TabsStyleContext);
|
|
4583
4060
|
var tabsListVariants = (0, import_class_variance_authority20.cva)(
|
|
4584
4061
|
"inline-flex items-center text-text-subtle",
|
|
4585
4062
|
{
|
|
@@ -4600,9 +4077,9 @@ var tabsListVariants = (0, import_class_variance_authority20.cva)(
|
|
|
4600
4077
|
}
|
|
4601
4078
|
}
|
|
4602
4079
|
);
|
|
4603
|
-
var TabsList =
|
|
4080
|
+
var TabsList = React24.forwardRef(({ className, variant, size, fitted, color, radius, ...props }, ref) => {
|
|
4604
4081
|
const resolvedVariant = variant || "line";
|
|
4605
|
-
return /* @__PURE__ */
|
|
4082
|
+
return /* @__PURE__ */ React24.createElement(TabsStyleContext.Provider, { value: { variant: resolvedVariant, size: size || "default", fitted: fitted ?? false, color: color || "default", radius: radius || "md" } }, /* @__PURE__ */ React24.createElement(
|
|
4606
4083
|
TabsPrimitive.List,
|
|
4607
4084
|
{
|
|
4608
4085
|
ref,
|
|
@@ -4724,10 +4201,10 @@ var pillItemRadiusClasses = {
|
|
|
4724
4201
|
"3xl": "rounded-2xl",
|
|
4725
4202
|
full: "rounded-full"
|
|
4726
4203
|
};
|
|
4727
|
-
var TabsTrigger =
|
|
4204
|
+
var TabsTrigger = React24.forwardRef(({ className, children, ...props }, ref) => {
|
|
4728
4205
|
const { variant, size, fitted, color, radius } = useTabsStyleContext();
|
|
4729
4206
|
const resolvedSize = size || "default";
|
|
4730
|
-
return /* @__PURE__ */
|
|
4207
|
+
return /* @__PURE__ */ React24.createElement(
|
|
4731
4208
|
TabsPrimitive.Trigger,
|
|
4732
4209
|
{
|
|
4733
4210
|
ref,
|
|
@@ -4745,7 +4222,7 @@ var TabsTrigger = React25.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
4745
4222
|
);
|
|
4746
4223
|
});
|
|
4747
4224
|
TabsTrigger.displayName = "TabsTrigger";
|
|
4748
|
-
var TabsContent =
|
|
4225
|
+
var TabsContent = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React24.createElement(
|
|
4749
4226
|
TabsPrimitive.Content,
|
|
4750
4227
|
{
|
|
4751
4228
|
ref,
|
|
@@ -4765,15 +4242,15 @@ var Tabs = Object.assign(TabsRoot, {
|
|
|
4765
4242
|
});
|
|
4766
4243
|
|
|
4767
4244
|
// src/components/ui/navigation-menu.tsx
|
|
4768
|
-
var
|
|
4245
|
+
var React25 = __toESM(require("react"));
|
|
4769
4246
|
var NavigationMenuPrimitive = __toESM(require("@radix-ui/react-navigation-menu"));
|
|
4770
4247
|
var CollapsiblePrimitive = __toESM(require("@radix-ui/react-collapsible"));
|
|
4771
4248
|
var import_react_slot6 = require("@radix-ui/react-slot");
|
|
4772
4249
|
function ChevronDownIcon({ className }) {
|
|
4773
|
-
return /* @__PURE__ */
|
|
4250
|
+
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" }));
|
|
4774
4251
|
}
|
|
4775
4252
|
function ChevronRightIcon2({ 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: "M9 5l7 7-7 7" }));
|
|
4777
4254
|
}
|
|
4778
4255
|
var contentRadiusMap3 = {
|
|
4779
4256
|
sm: "rounded",
|
|
@@ -4795,15 +4272,15 @@ var itemRadiusMap3 = {
|
|
|
4795
4272
|
xl: "rounded-lg"
|
|
4796
4273
|
// 8px
|
|
4797
4274
|
};
|
|
4798
|
-
var NavigationMenuContext =
|
|
4275
|
+
var NavigationMenuContext = React25.createContext({
|
|
4799
4276
|
orientation: "horizontal",
|
|
4800
4277
|
size: "default",
|
|
4801
4278
|
collapsed: false,
|
|
4802
4279
|
radius: "lg",
|
|
4803
4280
|
fontWeight: "normal"
|
|
4804
4281
|
});
|
|
4805
|
-
var useNavigationMenuContext = () =>
|
|
4806
|
-
var ContentLevelContext =
|
|
4282
|
+
var useNavigationMenuContext = () => React25.useContext(NavigationMenuContext);
|
|
4283
|
+
var ContentLevelContext = React25.createContext(false);
|
|
4807
4284
|
var navigationMenuSizeMap = {
|
|
4808
4285
|
sm: {
|
|
4809
4286
|
trigger: "h-8 text-sm px-3 gap-2",
|
|
@@ -4850,7 +4327,7 @@ var navigationMenuSizeMap = {
|
|
|
4850
4327
|
groupMargin: "mt-6 first:mt-0"
|
|
4851
4328
|
}
|
|
4852
4329
|
};
|
|
4853
|
-
var NavigationMenuRoot =
|
|
4330
|
+
var NavigationMenuRoot = React25.forwardRef(
|
|
4854
4331
|
({
|
|
4855
4332
|
className,
|
|
4856
4333
|
orientation = "horizontal",
|
|
@@ -4869,12 +4346,12 @@ var NavigationMenuRoot = React26.forwardRef(
|
|
|
4869
4346
|
style,
|
|
4870
4347
|
...props
|
|
4871
4348
|
}, ref) => {
|
|
4872
|
-
const contextValue =
|
|
4349
|
+
const contextValue = React25.useMemo(
|
|
4873
4350
|
() => ({ orientation, size, collapsed: orientation === "vertical" ? collapsed : false, radius, fontWeight }),
|
|
4874
4351
|
[orientation, size, collapsed, radius, fontWeight]
|
|
4875
4352
|
);
|
|
4876
4353
|
if (orientation === "horizontal") {
|
|
4877
|
-
return /* @__PURE__ */
|
|
4354
|
+
return /* @__PURE__ */ React25.createElement(NavigationMenuContext.Provider, { value: contextValue }, /* @__PURE__ */ React25.createElement(
|
|
4878
4355
|
NavigationMenuPrimitive.Root,
|
|
4879
4356
|
{
|
|
4880
4357
|
ref,
|
|
@@ -4890,7 +4367,7 @@ var NavigationMenuRoot = React26.forwardRef(
|
|
|
4890
4367
|
}
|
|
4891
4368
|
const resolvedWidth = collapsed ? collapsedWidth ?? navigationMenuSizeMap[size].collapsedWidth : width ?? 256;
|
|
4892
4369
|
const widthValue = typeof resolvedWidth === "number" ? `${resolvedWidth}px` : resolvedWidth;
|
|
4893
|
-
return /* @__PURE__ */
|
|
4370
|
+
return /* @__PURE__ */ React25.createElement(NavigationMenuContext.Provider, { value: contextValue }, /* @__PURE__ */ React25.createElement(
|
|
4894
4371
|
"nav",
|
|
4895
4372
|
{
|
|
4896
4373
|
ref,
|
|
@@ -4908,11 +4385,11 @@ var NavigationMenuRoot = React26.forwardRef(
|
|
|
4908
4385
|
}
|
|
4909
4386
|
);
|
|
4910
4387
|
NavigationMenuRoot.displayName = "NavigationMenu";
|
|
4911
|
-
var NavigationMenuList =
|
|
4388
|
+
var NavigationMenuList = React25.forwardRef(
|
|
4912
4389
|
({ className, children, ...props }, ref) => {
|
|
4913
4390
|
const { orientation } = useNavigationMenuContext();
|
|
4914
4391
|
if (orientation === "horizontal") {
|
|
4915
|
-
return /* @__PURE__ */
|
|
4392
|
+
return /* @__PURE__ */ React25.createElement(
|
|
4916
4393
|
NavigationMenuPrimitive.List,
|
|
4917
4394
|
{
|
|
4918
4395
|
ref,
|
|
@@ -4922,7 +4399,7 @@ var NavigationMenuList = React26.forwardRef(
|
|
|
4922
4399
|
children
|
|
4923
4400
|
);
|
|
4924
4401
|
}
|
|
4925
|
-
return /* @__PURE__ */
|
|
4402
|
+
return /* @__PURE__ */ React25.createElement(
|
|
4926
4403
|
"ul",
|
|
4927
4404
|
{
|
|
4928
4405
|
ref,
|
|
@@ -4934,15 +4411,15 @@ var NavigationMenuList = React26.forwardRef(
|
|
|
4934
4411
|
}
|
|
4935
4412
|
);
|
|
4936
4413
|
NavigationMenuList.displayName = "NavigationMenuList";
|
|
4937
|
-
var NavigationMenuItem =
|
|
4414
|
+
var NavigationMenuItem = React25.forwardRef(
|
|
4938
4415
|
({ className, value, defaultOpen = false, children, ...props }, ref) => {
|
|
4939
4416
|
const { orientation, collapsed } = useNavigationMenuContext();
|
|
4940
|
-
const [open, setOpen] =
|
|
4941
|
-
|
|
4417
|
+
const [open, setOpen] = React25.useState(defaultOpen);
|
|
4418
|
+
React25.useEffect(() => {
|
|
4942
4419
|
if (collapsed) setOpen(false);
|
|
4943
4420
|
}, [collapsed]);
|
|
4944
4421
|
if (orientation === "horizontal") {
|
|
4945
|
-
return /* @__PURE__ */
|
|
4422
|
+
return /* @__PURE__ */ React25.createElement(
|
|
4946
4423
|
NavigationMenuPrimitive.Item,
|
|
4947
4424
|
{
|
|
4948
4425
|
ref,
|
|
@@ -4953,25 +4430,25 @@ var NavigationMenuItem = React26.forwardRef(
|
|
|
4953
4430
|
children
|
|
4954
4431
|
);
|
|
4955
4432
|
}
|
|
4956
|
-
return /* @__PURE__ */
|
|
4433
|
+
return /* @__PURE__ */ React25.createElement(
|
|
4957
4434
|
CollapsiblePrimitive.Root,
|
|
4958
4435
|
{
|
|
4959
4436
|
open: collapsed ? false : open,
|
|
4960
4437
|
onOpenChange: collapsed ? void 0 : setOpen,
|
|
4961
4438
|
asChild: true
|
|
4962
4439
|
},
|
|
4963
|
-
/* @__PURE__ */
|
|
4440
|
+
/* @__PURE__ */ React25.createElement("li", { ref, className: cn("", className), ...props }, children)
|
|
4964
4441
|
);
|
|
4965
4442
|
}
|
|
4966
4443
|
);
|
|
4967
4444
|
NavigationMenuItem.displayName = "NavigationMenuItem";
|
|
4968
|
-
var NavigationMenuTrigger =
|
|
4445
|
+
var NavigationMenuTrigger = React25.forwardRef(
|
|
4969
4446
|
({ className, children, icon, chevronIcon, ...props }, ref) => {
|
|
4970
4447
|
const { orientation, size, collapsed, radius, fontWeight: fw } = useNavigationMenuContext();
|
|
4971
4448
|
const s = navigationMenuSizeMap[size];
|
|
4972
4449
|
const fwClass = fw === "semibold" ? "font-semibold" : "font-normal";
|
|
4973
4450
|
if (orientation === "horizontal") {
|
|
4974
|
-
return /* @__PURE__ */
|
|
4451
|
+
return /* @__PURE__ */ React25.createElement(
|
|
4975
4452
|
NavigationMenuPrimitive.Trigger,
|
|
4976
4453
|
{
|
|
4977
4454
|
ref,
|
|
@@ -4990,12 +4467,12 @@ var NavigationMenuTrigger = React26.forwardRef(
|
|
|
4990
4467
|
),
|
|
4991
4468
|
...props
|
|
4992
4469
|
},
|
|
4993
|
-
icon && /* @__PURE__ */
|
|
4470
|
+
icon && /* @__PURE__ */ React25.createElement("span", { className: cn("shrink-0 mr-2", s.icon) }, icon),
|
|
4994
4471
|
children,
|
|
4995
|
-
/* @__PURE__ */
|
|
4472
|
+
/* @__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" }))
|
|
4996
4473
|
);
|
|
4997
4474
|
}
|
|
4998
|
-
return /* @__PURE__ */
|
|
4475
|
+
return /* @__PURE__ */ React25.createElement(
|
|
4999
4476
|
CollapsiblePrimitive.Trigger,
|
|
5000
4477
|
{
|
|
5001
4478
|
ref,
|
|
@@ -5014,8 +4491,8 @@ var NavigationMenuTrigger = React26.forwardRef(
|
|
|
5014
4491
|
...collapsed && typeof children === "string" ? { title: children } : {},
|
|
5015
4492
|
...props
|
|
5016
4493
|
},
|
|
5017
|
-
icon && /* @__PURE__ */
|
|
5018
|
-
!collapsed && /* @__PURE__ */
|
|
4494
|
+
icon && /* @__PURE__ */ React25.createElement("span", { className: cn("shrink-0", s.icon) }, icon),
|
|
4495
|
+
!collapsed && /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement("span", { className: "flex-1 text-left truncate" }, children), /* @__PURE__ */ React25.createElement(
|
|
5019
4496
|
"span",
|
|
5020
4497
|
{
|
|
5021
4498
|
className: cn(
|
|
@@ -5024,18 +4501,18 @@ var NavigationMenuTrigger = React26.forwardRef(
|
|
|
5024
4501
|
"group-data-[state=open]:rotate-90"
|
|
5025
4502
|
)
|
|
5026
4503
|
},
|
|
5027
|
-
chevronIcon ?? /* @__PURE__ */
|
|
4504
|
+
chevronIcon ?? /* @__PURE__ */ React25.createElement(ChevronRightIcon2, { className: "size-full" })
|
|
5028
4505
|
))
|
|
5029
4506
|
);
|
|
5030
4507
|
}
|
|
5031
4508
|
);
|
|
5032
4509
|
NavigationMenuTrigger.displayName = "NavigationMenuTrigger";
|
|
5033
|
-
var NavigationMenuContent =
|
|
4510
|
+
var NavigationMenuContent = React25.forwardRef(
|
|
5034
4511
|
({ className, children, ...props }, ref) => {
|
|
5035
4512
|
const { orientation, size, collapsed, radius } = useNavigationMenuContext();
|
|
5036
4513
|
const s = navigationMenuSizeMap[size];
|
|
5037
4514
|
if (orientation === "horizontal") {
|
|
5038
|
-
return /* @__PURE__ */
|
|
4515
|
+
return /* @__PURE__ */ React25.createElement(ContentLevelContext.Provider, { value: true }, /* @__PURE__ */ React25.createElement(
|
|
5039
4516
|
NavigationMenuPrimitive.Content,
|
|
5040
4517
|
{
|
|
5041
4518
|
ref,
|
|
@@ -5046,11 +4523,11 @@ var NavigationMenuContent = React26.forwardRef(
|
|
|
5046
4523
|
),
|
|
5047
4524
|
...props
|
|
5048
4525
|
},
|
|
5049
|
-
/* @__PURE__ */
|
|
4526
|
+
/* @__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)
|
|
5050
4527
|
));
|
|
5051
4528
|
}
|
|
5052
4529
|
if (collapsed) return null;
|
|
5053
|
-
return /* @__PURE__ */
|
|
4530
|
+
return /* @__PURE__ */ React25.createElement(ContentLevelContext.Provider, { value: true }, /* @__PURE__ */ React25.createElement(
|
|
5054
4531
|
CollapsiblePrimitive.Content,
|
|
5055
4532
|
{
|
|
5056
4533
|
ref,
|
|
@@ -5060,7 +4537,7 @@ var NavigationMenuContent = React26.forwardRef(
|
|
|
5060
4537
|
),
|
|
5061
4538
|
...props
|
|
5062
4539
|
},
|
|
5063
|
-
/* @__PURE__ */
|
|
4540
|
+
/* @__PURE__ */ React25.createElement("div", { className: cn(
|
|
5064
4541
|
"flex flex-col gap-0.5 py-1",
|
|
5065
4542
|
className
|
|
5066
4543
|
) }, children)
|
|
@@ -5068,16 +4545,16 @@ var NavigationMenuContent = React26.forwardRef(
|
|
|
5068
4545
|
}
|
|
5069
4546
|
);
|
|
5070
4547
|
NavigationMenuContent.displayName = "NavigationMenuContent";
|
|
5071
|
-
var NavigationMenuLink =
|
|
4548
|
+
var NavigationMenuLink = React25.forwardRef(
|
|
5072
4549
|
({ className, active, asChild, icon, children, ...props }, ref) => {
|
|
5073
4550
|
const { orientation, size, collapsed, radius, fontWeight: fw } = useNavigationMenuContext();
|
|
5074
4551
|
const s = navigationMenuSizeMap[size];
|
|
5075
4552
|
const fwClass = fw === "semibold" ? "font-semibold" : "font-normal";
|
|
5076
|
-
const inContent =
|
|
4553
|
+
const inContent = React25.useContext(ContentLevelContext);
|
|
5077
4554
|
if (orientation === "horizontal") {
|
|
5078
4555
|
const { onSelect, ...radixSafeProps } = props;
|
|
5079
4556
|
if (inContent) {
|
|
5080
|
-
return /* @__PURE__ */
|
|
4557
|
+
return /* @__PURE__ */ React25.createElement(
|
|
5081
4558
|
NavigationMenuPrimitive.Link,
|
|
5082
4559
|
{
|
|
5083
4560
|
ref,
|
|
@@ -5096,10 +4573,10 @@ var NavigationMenuLink = React26.forwardRef(
|
|
|
5096
4573
|
onSelect,
|
|
5097
4574
|
...radixSafeProps
|
|
5098
4575
|
},
|
|
5099
|
-
asChild ? children : /* @__PURE__ */
|
|
4576
|
+
asChild ? children : /* @__PURE__ */ React25.createElement(React25.Fragment, null, icon && /* @__PURE__ */ React25.createElement("span", { className: cn("shrink-0", s.icon) }, icon), children)
|
|
5100
4577
|
);
|
|
5101
4578
|
}
|
|
5102
|
-
return /* @__PURE__ */
|
|
4579
|
+
return /* @__PURE__ */ React25.createElement(
|
|
5103
4580
|
NavigationMenuPrimitive.Link,
|
|
5104
4581
|
{
|
|
5105
4582
|
ref,
|
|
@@ -5119,12 +4596,12 @@ var NavigationMenuLink = React26.forwardRef(
|
|
|
5119
4596
|
onSelect,
|
|
5120
4597
|
...radixSafeProps
|
|
5121
4598
|
},
|
|
5122
|
-
asChild ? children : /* @__PURE__ */
|
|
4599
|
+
asChild ? children : /* @__PURE__ */ React25.createElement(React25.Fragment, null, icon && /* @__PURE__ */ React25.createElement("span", { className: cn("shrink-0", s.icon) }, icon), children)
|
|
5123
4600
|
);
|
|
5124
4601
|
}
|
|
5125
4602
|
const Comp = asChild ? import_react_slot6.Slot : "a";
|
|
5126
4603
|
if (inContent) {
|
|
5127
|
-
return /* @__PURE__ */
|
|
4604
|
+
return /* @__PURE__ */ React25.createElement(
|
|
5128
4605
|
Comp,
|
|
5129
4606
|
{
|
|
5130
4607
|
ref,
|
|
@@ -5141,11 +4618,11 @@ var NavigationMenuLink = React26.forwardRef(
|
|
|
5141
4618
|
...active ? { "aria-current": "page" } : {},
|
|
5142
4619
|
...props
|
|
5143
4620
|
},
|
|
5144
|
-
icon && /* @__PURE__ */
|
|
4621
|
+
icon && /* @__PURE__ */ React25.createElement("span", { className: cn("shrink-0", s.icon) }, icon),
|
|
5145
4622
|
!collapsed && children
|
|
5146
4623
|
);
|
|
5147
4624
|
}
|
|
5148
|
-
return /* @__PURE__ */
|
|
4625
|
+
return /* @__PURE__ */ React25.createElement(
|
|
5149
4626
|
Comp,
|
|
5150
4627
|
{
|
|
5151
4628
|
ref,
|
|
@@ -5163,28 +4640,28 @@ var NavigationMenuLink = React26.forwardRef(
|
|
|
5163
4640
|
...collapsed && typeof children === "string" ? { title: children } : {},
|
|
5164
4641
|
...props
|
|
5165
4642
|
},
|
|
5166
|
-
icon && /* @__PURE__ */
|
|
5167
|
-
!collapsed && /* @__PURE__ */
|
|
4643
|
+
icon && /* @__PURE__ */ React25.createElement("span", { className: cn("shrink-0", s.icon) }, icon),
|
|
4644
|
+
!collapsed && /* @__PURE__ */ React25.createElement("span", { className: "truncate" }, children)
|
|
5168
4645
|
);
|
|
5169
4646
|
}
|
|
5170
4647
|
);
|
|
5171
4648
|
NavigationMenuLink.displayName = "NavigationMenuLink";
|
|
5172
|
-
var NavigationMenuGroup =
|
|
4649
|
+
var NavigationMenuGroup = React25.forwardRef(
|
|
5173
4650
|
({ className, label, children, ...props }, ref) => {
|
|
5174
4651
|
const { size, collapsed } = useNavigationMenuContext();
|
|
5175
4652
|
const s = navigationMenuSizeMap[size];
|
|
5176
|
-
return /* @__PURE__ */
|
|
4653
|
+
return /* @__PURE__ */ React25.createElement("div", { ref, role: "group", className: cn(label && !collapsed && s.groupMargin, className), ...props }, label && !collapsed && /* @__PURE__ */ React25.createElement("div", { className: cn(
|
|
5177
4654
|
"font-semibold text-text-subtle uppercase tracking-wider select-none",
|
|
5178
4655
|
s.groupLabel
|
|
5179
|
-
) }, label), /* @__PURE__ */
|
|
4656
|
+
) }, label), /* @__PURE__ */ React25.createElement("ul", { className: "flex flex-col gap-0.5" }, children));
|
|
5180
4657
|
}
|
|
5181
4658
|
);
|
|
5182
4659
|
NavigationMenuGroup.displayName = "NavigationMenuGroup";
|
|
5183
|
-
var NavigationMenuIndicator =
|
|
4660
|
+
var NavigationMenuIndicator = React25.forwardRef(
|
|
5184
4661
|
({ className, color = "default", ...props }, ref) => {
|
|
5185
4662
|
const { orientation } = useNavigationMenuContext();
|
|
5186
4663
|
if (orientation === "vertical") return null;
|
|
5187
|
-
return /* @__PURE__ */
|
|
4664
|
+
return /* @__PURE__ */ React25.createElement(
|
|
5188
4665
|
NavigationMenuPrimitive.Indicator,
|
|
5189
4666
|
{
|
|
5190
4667
|
ref,
|
|
@@ -5196,7 +4673,7 @@ var NavigationMenuIndicator = React26.forwardRef(
|
|
|
5196
4673
|
),
|
|
5197
4674
|
...props
|
|
5198
4675
|
},
|
|
5199
|
-
/* @__PURE__ */
|
|
4676
|
+
/* @__PURE__ */ React25.createElement("div", { className: cn(
|
|
5200
4677
|
"relative h-full w-full rounded-full",
|
|
5201
4678
|
color === "default" ? "bg-foreground" : "bg-primary"
|
|
5202
4679
|
) })
|
|
@@ -5204,11 +4681,11 @@ var NavigationMenuIndicator = React26.forwardRef(
|
|
|
5204
4681
|
}
|
|
5205
4682
|
);
|
|
5206
4683
|
NavigationMenuIndicator.displayName = "NavigationMenuIndicator";
|
|
5207
|
-
var NavigationMenuViewport =
|
|
4684
|
+
var NavigationMenuViewport = React25.forwardRef(
|
|
5208
4685
|
({ className, ...props }, ref) => {
|
|
5209
4686
|
const { orientation } = useNavigationMenuContext();
|
|
5210
4687
|
if (orientation === "vertical") return null;
|
|
5211
|
-
return /* @__PURE__ */
|
|
4688
|
+
return /* @__PURE__ */ React25.createElement("div", { className: "absolute left-0 top-full z-dropdown w-auto pt-1" }, /* @__PURE__ */ React25.createElement(
|
|
5212
4689
|
NavigationMenuPrimitive.Viewport,
|
|
5213
4690
|
{
|
|
5214
4691
|
ref,
|
|
@@ -5240,10 +4717,10 @@ var NavigationMenu = Object.assign(NavigationMenuRoot, {
|
|
|
5240
4717
|
});
|
|
5241
4718
|
|
|
5242
4719
|
// src/components/ui/pagination.tsx
|
|
5243
|
-
var
|
|
4720
|
+
var React26 = __toESM(require("react"));
|
|
5244
4721
|
var import_class_variance_authority21 = require("class-variance-authority");
|
|
5245
4722
|
function ChevronLeftIcon({ className }) {
|
|
5246
|
-
return /* @__PURE__ */
|
|
4723
|
+
return /* @__PURE__ */ React26.createElement(
|
|
5247
4724
|
"svg",
|
|
5248
4725
|
{
|
|
5249
4726
|
className,
|
|
@@ -5252,11 +4729,11 @@ function ChevronLeftIcon({ className }) {
|
|
|
5252
4729
|
stroke: "currentColor",
|
|
5253
4730
|
strokeWidth: 2
|
|
5254
4731
|
},
|
|
5255
|
-
/* @__PURE__ */
|
|
4732
|
+
/* @__PURE__ */ React26.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 19l-7-7 7-7" })
|
|
5256
4733
|
);
|
|
5257
4734
|
}
|
|
5258
4735
|
function ChevronRightIcon3({ className }) {
|
|
5259
|
-
return /* @__PURE__ */
|
|
4736
|
+
return /* @__PURE__ */ React26.createElement(
|
|
5260
4737
|
"svg",
|
|
5261
4738
|
{
|
|
5262
4739
|
className,
|
|
@@ -5265,11 +4742,11 @@ function ChevronRightIcon3({ className }) {
|
|
|
5265
4742
|
stroke: "currentColor",
|
|
5266
4743
|
strokeWidth: 2
|
|
5267
4744
|
},
|
|
5268
|
-
/* @__PURE__ */
|
|
4745
|
+
/* @__PURE__ */ React26.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" })
|
|
5269
4746
|
);
|
|
5270
4747
|
}
|
|
5271
4748
|
function ChevronsLeftIcon({ className }) {
|
|
5272
|
-
return /* @__PURE__ */
|
|
4749
|
+
return /* @__PURE__ */ React26.createElement(
|
|
5273
4750
|
"svg",
|
|
5274
4751
|
{
|
|
5275
4752
|
className,
|
|
@@ -5278,11 +4755,11 @@ function ChevronsLeftIcon({ className }) {
|
|
|
5278
4755
|
stroke: "currentColor",
|
|
5279
4756
|
strokeWidth: 2
|
|
5280
4757
|
},
|
|
5281
|
-
/* @__PURE__ */
|
|
4758
|
+
/* @__PURE__ */ React26.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M11 17l-5-5 5-5M18 17l-5-5 5-5" })
|
|
5282
4759
|
);
|
|
5283
4760
|
}
|
|
5284
4761
|
function ChevronsRightIcon({ className }) {
|
|
5285
|
-
return /* @__PURE__ */
|
|
4762
|
+
return /* @__PURE__ */ React26.createElement(
|
|
5286
4763
|
"svg",
|
|
5287
4764
|
{
|
|
5288
4765
|
className,
|
|
@@ -5291,20 +4768,20 @@ function ChevronsRightIcon({ className }) {
|
|
|
5291
4768
|
stroke: "currentColor",
|
|
5292
4769
|
strokeWidth: 2
|
|
5293
4770
|
},
|
|
5294
|
-
/* @__PURE__ */
|
|
4771
|
+
/* @__PURE__ */ React26.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M13 7l5 5-5 5M6 7l5 5-5 5" })
|
|
5295
4772
|
);
|
|
5296
4773
|
}
|
|
5297
4774
|
function EllipsisIcon2({ className }) {
|
|
5298
|
-
return /* @__PURE__ */
|
|
4775
|
+
return /* @__PURE__ */ React26.createElement(
|
|
5299
4776
|
"svg",
|
|
5300
4777
|
{
|
|
5301
4778
|
className,
|
|
5302
4779
|
fill: "currentColor",
|
|
5303
4780
|
viewBox: "0 0 24 24"
|
|
5304
4781
|
},
|
|
5305
|
-
/* @__PURE__ */
|
|
5306
|
-
/* @__PURE__ */
|
|
5307
|
-
/* @__PURE__ */
|
|
4782
|
+
/* @__PURE__ */ React26.createElement("circle", { cx: "6", cy: "12", r: "1.5" }),
|
|
4783
|
+
/* @__PURE__ */ React26.createElement("circle", { cx: "12", cy: "12", r: "1.5" }),
|
|
4784
|
+
/* @__PURE__ */ React26.createElement("circle", { cx: "18", cy: "12", r: "1.5" })
|
|
5308
4785
|
);
|
|
5309
4786
|
}
|
|
5310
4787
|
function range(start, end) {
|
|
@@ -5345,9 +4822,9 @@ function usePagination({
|
|
|
5345
4822
|
...range(total - boundaries + 1, total)
|
|
5346
4823
|
];
|
|
5347
4824
|
}
|
|
5348
|
-
var PaginationContext =
|
|
4825
|
+
var PaginationContext = React26.createContext(null);
|
|
5349
4826
|
function usePaginationContext() {
|
|
5350
|
-
const ctx =
|
|
4827
|
+
const ctx = React26.useContext(PaginationContext);
|
|
5351
4828
|
if (!ctx) throw new Error("Pagination components must be used within <Pagination>");
|
|
5352
4829
|
return ctx;
|
|
5353
4830
|
}
|
|
@@ -5409,7 +4886,7 @@ function getItemClasses(variant, color, isActive, disabled) {
|
|
|
5409
4886
|
return "border border-transparent text-text-muted hover:bg-background-muted hover:text-foreground";
|
|
5410
4887
|
}
|
|
5411
4888
|
}
|
|
5412
|
-
var PaginationRoot =
|
|
4889
|
+
var PaginationRoot = React26.forwardRef(
|
|
5413
4890
|
({
|
|
5414
4891
|
className,
|
|
5415
4892
|
total = 1,
|
|
@@ -5429,17 +4906,17 @@ var PaginationRoot = React27.forwardRef(
|
|
|
5429
4906
|
children,
|
|
5430
4907
|
...props
|
|
5431
4908
|
}, ref) => {
|
|
5432
|
-
const [internalPage, setInternalPage] =
|
|
4909
|
+
const [internalPage, setInternalPage] = React26.useState(defaultValue);
|
|
5433
4910
|
const isControlled = value !== void 0;
|
|
5434
4911
|
const page = isControlled ? value : internalPage;
|
|
5435
|
-
const handlePageChange =
|
|
4912
|
+
const handlePageChange = React26.useCallback((newPage) => {
|
|
5436
4913
|
if (disabled) return;
|
|
5437
4914
|
const clamped = Math.max(1, Math.min(total, newPage));
|
|
5438
4915
|
if (!isControlled) setInternalPage(clamped);
|
|
5439
4916
|
onChange?.(clamped);
|
|
5440
4917
|
}, [disabled, total, isControlled, onChange]);
|
|
5441
4918
|
const paginationRange = usePagination({ total, siblings, boundaries, page });
|
|
5442
|
-
const contextValue =
|
|
4919
|
+
const contextValue = React26.useMemo(() => ({
|
|
5443
4920
|
page,
|
|
5444
4921
|
total,
|
|
5445
4922
|
siblings,
|
|
@@ -5453,7 +4930,7 @@ var PaginationRoot = React27.forwardRef(
|
|
|
5453
4930
|
onPageChange: handlePageChange,
|
|
5454
4931
|
paginationRange
|
|
5455
4932
|
}), [page, total, siblings, boundaries, size, variant, color, radius, disabled, loop, handlePageChange, paginationRange]);
|
|
5456
|
-
return /* @__PURE__ */
|
|
4933
|
+
return /* @__PURE__ */ React26.createElement(PaginationContext.Provider, { value: contextValue }, /* @__PURE__ */ React26.createElement(
|
|
5457
4934
|
"nav",
|
|
5458
4935
|
{
|
|
5459
4936
|
ref,
|
|
@@ -5467,11 +4944,11 @@ var PaginationRoot = React27.forwardRef(
|
|
|
5467
4944
|
}
|
|
5468
4945
|
);
|
|
5469
4946
|
PaginationRoot.displayName = "Pagination";
|
|
5470
|
-
var PaginationContent =
|
|
4947
|
+
var PaginationContent = React26.forwardRef(
|
|
5471
4948
|
({ className, ...props }, ref) => {
|
|
5472
4949
|
const { size } = usePaginationContext();
|
|
5473
4950
|
const sizeClass = paginationSizeMap[size];
|
|
5474
|
-
return /* @__PURE__ */
|
|
4951
|
+
return /* @__PURE__ */ React26.createElement(
|
|
5475
4952
|
"ul",
|
|
5476
4953
|
{
|
|
5477
4954
|
ref,
|
|
@@ -5482,16 +4959,16 @@ var PaginationContent = React27.forwardRef(
|
|
|
5482
4959
|
}
|
|
5483
4960
|
);
|
|
5484
4961
|
PaginationContent.displayName = "PaginationContent";
|
|
5485
|
-
var PaginationItem =
|
|
5486
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
4962
|
+
var PaginationItem = React26.forwardRef(
|
|
4963
|
+
({ className, ...props }, ref) => /* @__PURE__ */ React26.createElement("li", { ref, className: cn("", className), ...props })
|
|
5487
4964
|
);
|
|
5488
4965
|
PaginationItem.displayName = "PaginationItem";
|
|
5489
|
-
var PaginationLink =
|
|
4966
|
+
var PaginationLink = React26.forwardRef(
|
|
5490
4967
|
({ className, page: targetPage, isActive: isActiveProp, ...props }, ref) => {
|
|
5491
4968
|
const ctx = usePaginationContext();
|
|
5492
4969
|
const isActive = isActiveProp ?? ctx.page === targetPage;
|
|
5493
4970
|
const sizeClass = paginationSizeMap[ctx.size];
|
|
5494
|
-
return /* @__PURE__ */
|
|
4971
|
+
return /* @__PURE__ */ React26.createElement(
|
|
5495
4972
|
"button",
|
|
5496
4973
|
{
|
|
5497
4974
|
ref,
|
|
@@ -5513,7 +4990,7 @@ var PaginationLink = React27.forwardRef(
|
|
|
5513
4990
|
}
|
|
5514
4991
|
);
|
|
5515
4992
|
PaginationLink.displayName = "PaginationLink";
|
|
5516
|
-
var PaginationPrevious =
|
|
4993
|
+
var PaginationPrevious = React26.forwardRef(
|
|
5517
4994
|
({ className, icon, ...props }, ref) => {
|
|
5518
4995
|
const ctx = usePaginationContext();
|
|
5519
4996
|
const sizeClass = paginationSizeMap[ctx.size];
|
|
@@ -5525,7 +5002,7 @@ var PaginationPrevious = React27.forwardRef(
|
|
|
5525
5002
|
ctx.onPageChange(ctx.page - 1);
|
|
5526
5003
|
}
|
|
5527
5004
|
};
|
|
5528
|
-
return /* @__PURE__ */
|
|
5005
|
+
return /* @__PURE__ */ React26.createElement(
|
|
5529
5006
|
"button",
|
|
5530
5007
|
{
|
|
5531
5008
|
ref,
|
|
@@ -5541,12 +5018,12 @@ var PaginationPrevious = React27.forwardRef(
|
|
|
5541
5018
|
),
|
|
5542
5019
|
...props
|
|
5543
5020
|
},
|
|
5544
|
-
icon ?? /* @__PURE__ */
|
|
5021
|
+
icon ?? /* @__PURE__ */ React26.createElement(ChevronLeftIcon, { className: sizeClass.icon })
|
|
5545
5022
|
);
|
|
5546
5023
|
}
|
|
5547
5024
|
);
|
|
5548
5025
|
PaginationPrevious.displayName = "PaginationPrevious";
|
|
5549
|
-
var PaginationNext =
|
|
5026
|
+
var PaginationNext = React26.forwardRef(
|
|
5550
5027
|
({ className, icon, ...props }, ref) => {
|
|
5551
5028
|
const ctx = usePaginationContext();
|
|
5552
5029
|
const sizeClass = paginationSizeMap[ctx.size];
|
|
@@ -5558,7 +5035,7 @@ var PaginationNext = React27.forwardRef(
|
|
|
5558
5035
|
ctx.onPageChange(ctx.page + 1);
|
|
5559
5036
|
}
|
|
5560
5037
|
};
|
|
5561
|
-
return /* @__PURE__ */
|
|
5038
|
+
return /* @__PURE__ */ React26.createElement(
|
|
5562
5039
|
"button",
|
|
5563
5040
|
{
|
|
5564
5041
|
ref,
|
|
@@ -5574,17 +5051,17 @@ var PaginationNext = React27.forwardRef(
|
|
|
5574
5051
|
),
|
|
5575
5052
|
...props
|
|
5576
5053
|
},
|
|
5577
|
-
icon ?? /* @__PURE__ */
|
|
5054
|
+
icon ?? /* @__PURE__ */ React26.createElement(ChevronRightIcon3, { className: sizeClass.icon })
|
|
5578
5055
|
);
|
|
5579
5056
|
}
|
|
5580
5057
|
);
|
|
5581
5058
|
PaginationNext.displayName = "PaginationNext";
|
|
5582
|
-
var PaginationFirst =
|
|
5059
|
+
var PaginationFirst = React26.forwardRef(
|
|
5583
5060
|
({ className, icon, ...props }, ref) => {
|
|
5584
5061
|
const ctx = usePaginationContext();
|
|
5585
5062
|
const sizeClass = paginationSizeMap[ctx.size];
|
|
5586
5063
|
const isDisabled = ctx.disabled || ctx.page <= 1;
|
|
5587
|
-
return /* @__PURE__ */
|
|
5064
|
+
return /* @__PURE__ */ React26.createElement(
|
|
5588
5065
|
"button",
|
|
5589
5066
|
{
|
|
5590
5067
|
ref,
|
|
@@ -5600,17 +5077,17 @@ var PaginationFirst = React27.forwardRef(
|
|
|
5600
5077
|
),
|
|
5601
5078
|
...props
|
|
5602
5079
|
},
|
|
5603
|
-
icon ?? /* @__PURE__ */
|
|
5080
|
+
icon ?? /* @__PURE__ */ React26.createElement(ChevronsLeftIcon, { className: sizeClass.icon })
|
|
5604
5081
|
);
|
|
5605
5082
|
}
|
|
5606
5083
|
);
|
|
5607
5084
|
PaginationFirst.displayName = "PaginationFirst";
|
|
5608
|
-
var PaginationLast =
|
|
5085
|
+
var PaginationLast = React26.forwardRef(
|
|
5609
5086
|
({ className, icon, ...props }, ref) => {
|
|
5610
5087
|
const ctx = usePaginationContext();
|
|
5611
5088
|
const sizeClass = paginationSizeMap[ctx.size];
|
|
5612
5089
|
const isDisabled = ctx.disabled || ctx.page >= ctx.total;
|
|
5613
|
-
return /* @__PURE__ */
|
|
5090
|
+
return /* @__PURE__ */ React26.createElement(
|
|
5614
5091
|
"button",
|
|
5615
5092
|
{
|
|
5616
5093
|
ref,
|
|
@@ -5626,16 +5103,16 @@ var PaginationLast = React27.forwardRef(
|
|
|
5626
5103
|
),
|
|
5627
5104
|
...props
|
|
5628
5105
|
},
|
|
5629
|
-
icon ?? /* @__PURE__ */
|
|
5106
|
+
icon ?? /* @__PURE__ */ React26.createElement(ChevronsRightIcon, { className: sizeClass.icon })
|
|
5630
5107
|
);
|
|
5631
5108
|
}
|
|
5632
5109
|
);
|
|
5633
5110
|
PaginationLast.displayName = "PaginationLast";
|
|
5634
|
-
var PaginationEllipsis =
|
|
5111
|
+
var PaginationEllipsis = React26.forwardRef(
|
|
5635
5112
|
({ className, ...props }, ref) => {
|
|
5636
5113
|
const ctx = usePaginationContext();
|
|
5637
5114
|
const sizeClass = paginationSizeMap[ctx.size];
|
|
5638
|
-
return /* @__PURE__ */
|
|
5115
|
+
return /* @__PURE__ */ React26.createElement(
|
|
5639
5116
|
"span",
|
|
5640
5117
|
{
|
|
5641
5118
|
ref,
|
|
@@ -5647,16 +5124,16 @@ var PaginationEllipsis = React27.forwardRef(
|
|
|
5647
5124
|
),
|
|
5648
5125
|
...props
|
|
5649
5126
|
},
|
|
5650
|
-
/* @__PURE__ */
|
|
5651
|
-
/* @__PURE__ */
|
|
5127
|
+
/* @__PURE__ */ React26.createElement(EllipsisIcon2, { className: sizeClass.icon }),
|
|
5128
|
+
/* @__PURE__ */ React26.createElement("span", { className: "sr-only" }, "More pages")
|
|
5652
5129
|
);
|
|
5653
5130
|
}
|
|
5654
5131
|
);
|
|
5655
5132
|
PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
5656
|
-
var PaginationItems =
|
|
5133
|
+
var PaginationItems = React26.forwardRef(
|
|
5657
5134
|
({ className, ...props }, ref) => {
|
|
5658
5135
|
const ctx = usePaginationContext();
|
|
5659
|
-
return /* @__PURE__ */
|
|
5136
|
+
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 }))));
|
|
5660
5137
|
}
|
|
5661
5138
|
);
|
|
5662
5139
|
PaginationItems.displayName = "PaginationItems";
|
|
@@ -5673,11 +5150,11 @@ var Pagination = Object.assign(PaginationRoot, {
|
|
|
5673
5150
|
});
|
|
5674
5151
|
|
|
5675
5152
|
// src/components/ui/modal.tsx
|
|
5676
|
-
var
|
|
5153
|
+
var React27 = __toESM(require("react"));
|
|
5677
5154
|
var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
|
|
5678
5155
|
var AlertDialogPrimitive = __toESM(require("@radix-ui/react-alert-dialog"));
|
|
5679
5156
|
var import_class_variance_authority22 = require("class-variance-authority");
|
|
5680
|
-
var DefaultCloseIcon = ({ className }) => /* @__PURE__ */
|
|
5157
|
+
var DefaultCloseIcon = ({ className }) => /* @__PURE__ */ React27.createElement(
|
|
5681
5158
|
"svg",
|
|
5682
5159
|
{
|
|
5683
5160
|
className,
|
|
@@ -5687,18 +5164,18 @@ var DefaultCloseIcon = ({ className }) => /* @__PURE__ */ React28.createElement(
|
|
|
5687
5164
|
strokeWidth: 2,
|
|
5688
5165
|
"aria-hidden": "true"
|
|
5689
5166
|
},
|
|
5690
|
-
/* @__PURE__ */
|
|
5167
|
+
/* @__PURE__ */ React27.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" })
|
|
5691
5168
|
);
|
|
5692
|
-
var ModalStyleContext =
|
|
5169
|
+
var ModalStyleContext = React27.createContext({
|
|
5693
5170
|
scrollBehavior: "outside"
|
|
5694
5171
|
});
|
|
5695
5172
|
function ModalRoot(props) {
|
|
5696
|
-
return /* @__PURE__ */
|
|
5173
|
+
return /* @__PURE__ */ React27.createElement(DialogPrimitive.Root, { ...props });
|
|
5697
5174
|
}
|
|
5698
5175
|
var ModalTrigger = DialogPrimitive.Trigger;
|
|
5699
5176
|
var ModalPortal = DialogPrimitive.Portal;
|
|
5700
5177
|
var ModalClose = DialogPrimitive.Close;
|
|
5701
|
-
var ModalOverlay =
|
|
5178
|
+
var ModalOverlay = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
|
5702
5179
|
DialogPrimitive.Overlay,
|
|
5703
5180
|
{
|
|
5704
5181
|
ref,
|
|
@@ -5732,19 +5209,19 @@ var modalContentVariants = (0, import_class_variance_authority22.cva)("", {
|
|
|
5732
5209
|
size: "sm"
|
|
5733
5210
|
}
|
|
5734
5211
|
});
|
|
5735
|
-
var ModalContent =
|
|
5212
|
+
var ModalContent = React27.forwardRef(({ className, children, size = "sm", scrollBehavior = "outside", showCloseButton = true, closeIcon, ...props }, ref) => {
|
|
5736
5213
|
const isInside = scrollBehavior === "inside";
|
|
5737
5214
|
const isFull = size === "full";
|
|
5738
5215
|
const useInsideScroll = isInside || isFull;
|
|
5739
|
-
const closeButton = showCloseButton && /* @__PURE__ */
|
|
5216
|
+
const closeButton = showCloseButton && /* @__PURE__ */ React27.createElement(DialogPrimitive.Close, { className: cn(
|
|
5740
5217
|
"absolute right-4 top-4 rounded-md p-1",
|
|
5741
5218
|
"text-text-muted hover:text-foreground",
|
|
5742
5219
|
"transition-colors duration-fast",
|
|
5743
5220
|
"focus-visible:focus-ring focus-visible:outline-none",
|
|
5744
5221
|
"disabled:pointer-events-none"
|
|
5745
|
-
) }, closeIcon || /* @__PURE__ */
|
|
5222
|
+
) }, closeIcon || /* @__PURE__ */ React27.createElement(DefaultCloseIcon, { className: "icon-sm" }), /* @__PURE__ */ React27.createElement("span", { className: "sr-only" }, "Close"));
|
|
5746
5223
|
if (!useInsideScroll) {
|
|
5747
|
-
return /* @__PURE__ */
|
|
5224
|
+
return /* @__PURE__ */ React27.createElement(ModalPortal, null, /* @__PURE__ */ React27.createElement(ModalOverlay, null), /* @__PURE__ */ React27.createElement(ModalStyleContext.Provider, { value: { scrollBehavior: "outside" } }, /* @__PURE__ */ React27.createElement(
|
|
5748
5225
|
DialogPrimitive.Content,
|
|
5749
5226
|
{
|
|
5750
5227
|
ref,
|
|
@@ -5755,7 +5232,7 @@ var ModalContent = React28.forwardRef(({ className, children, size = "sm", scrol
|
|
|
5755
5232
|
),
|
|
5756
5233
|
...props
|
|
5757
5234
|
},
|
|
5758
|
-
/* @__PURE__ */
|
|
5235
|
+
/* @__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(
|
|
5759
5236
|
"div",
|
|
5760
5237
|
{
|
|
5761
5238
|
className: cn(
|
|
@@ -5770,7 +5247,7 @@ var ModalContent = React28.forwardRef(({ className, children, size = "sm", scrol
|
|
|
5770
5247
|
)))
|
|
5771
5248
|
)));
|
|
5772
5249
|
}
|
|
5773
|
-
return /* @__PURE__ */
|
|
5250
|
+
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(
|
|
5774
5251
|
DialogPrimitive.Content,
|
|
5775
5252
|
{
|
|
5776
5253
|
ref,
|
|
@@ -5790,7 +5267,7 @@ var ModalContent = React28.forwardRef(({ className, children, size = "sm", scrol
|
|
|
5790
5267
|
))));
|
|
5791
5268
|
});
|
|
5792
5269
|
ModalContent.displayName = "ModalContent";
|
|
5793
|
-
var ModalHeader =
|
|
5270
|
+
var ModalHeader = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
|
5794
5271
|
"div",
|
|
5795
5272
|
{
|
|
5796
5273
|
ref,
|
|
@@ -5799,7 +5276,7 @@ var ModalHeader = React28.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
5799
5276
|
}
|
|
5800
5277
|
));
|
|
5801
5278
|
ModalHeader.displayName = "ModalHeader";
|
|
5802
|
-
var ModalTitle =
|
|
5279
|
+
var ModalTitle = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
|
5803
5280
|
DialogPrimitive.Title,
|
|
5804
5281
|
{
|
|
5805
5282
|
ref,
|
|
@@ -5808,7 +5285,7 @@ var ModalTitle = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
5808
5285
|
}
|
|
5809
5286
|
));
|
|
5810
5287
|
ModalTitle.displayName = "ModalTitle";
|
|
5811
|
-
var ModalDescription =
|
|
5288
|
+
var ModalDescription = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
|
5812
5289
|
DialogPrimitive.Description,
|
|
5813
5290
|
{
|
|
5814
5291
|
ref,
|
|
@@ -5817,9 +5294,9 @@ var ModalDescription = React28.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
5817
5294
|
}
|
|
5818
5295
|
));
|
|
5819
5296
|
ModalDescription.displayName = "ModalDescription";
|
|
5820
|
-
var ModalBody =
|
|
5821
|
-
const { scrollBehavior } =
|
|
5822
|
-
return /* @__PURE__ */
|
|
5297
|
+
var ModalBody = React27.forwardRef(({ className, ...props }, ref) => {
|
|
5298
|
+
const { scrollBehavior } = React27.useContext(ModalStyleContext);
|
|
5299
|
+
return /* @__PURE__ */ React27.createElement(
|
|
5823
5300
|
"div",
|
|
5824
5301
|
{
|
|
5825
5302
|
ref,
|
|
@@ -5833,7 +5310,7 @@ var ModalBody = React28.forwardRef(({ className, ...props }, ref) => {
|
|
|
5833
5310
|
);
|
|
5834
5311
|
});
|
|
5835
5312
|
ModalBody.displayName = "ModalBody";
|
|
5836
|
-
var ModalFooter =
|
|
5313
|
+
var ModalFooter = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
|
5837
5314
|
"div",
|
|
5838
5315
|
{
|
|
5839
5316
|
ref,
|
|
@@ -5848,7 +5325,7 @@ ModalFooter.displayName = "ModalFooter";
|
|
|
5848
5325
|
var AlertModalRoot = AlertDialogPrimitive.Root;
|
|
5849
5326
|
var AlertModalTrigger = AlertDialogPrimitive.Trigger;
|
|
5850
5327
|
var AlertModalPortal = AlertDialogPrimitive.Portal;
|
|
5851
|
-
var AlertModalOverlay =
|
|
5328
|
+
var AlertModalOverlay = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
|
5852
5329
|
AlertDialogPrimitive.Overlay,
|
|
5853
5330
|
{
|
|
5854
5331
|
ref,
|
|
@@ -5874,7 +5351,7 @@ var alertModalContentVariants = (0, import_class_variance_authority22.cva)("", {
|
|
|
5874
5351
|
size: "sm"
|
|
5875
5352
|
}
|
|
5876
5353
|
});
|
|
5877
|
-
var AlertModalContent =
|
|
5354
|
+
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(
|
|
5878
5355
|
AlertDialogPrimitive.Content,
|
|
5879
5356
|
{
|
|
5880
5357
|
ref,
|
|
@@ -5890,7 +5367,7 @@ var AlertModalContent = React28.forwardRef(({ className, children, size = "sm",
|
|
|
5890
5367
|
children
|
|
5891
5368
|
))));
|
|
5892
5369
|
AlertModalContent.displayName = "AlertModalContent";
|
|
5893
|
-
var AlertModalHeader =
|
|
5370
|
+
var AlertModalHeader = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
|
5894
5371
|
"div",
|
|
5895
5372
|
{
|
|
5896
5373
|
ref,
|
|
@@ -5899,7 +5376,7 @@ var AlertModalHeader = React28.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
5899
5376
|
}
|
|
5900
5377
|
));
|
|
5901
5378
|
AlertModalHeader.displayName = "AlertModalHeader";
|
|
5902
|
-
var AlertModalTitle =
|
|
5379
|
+
var AlertModalTitle = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
|
5903
5380
|
AlertDialogPrimitive.Title,
|
|
5904
5381
|
{
|
|
5905
5382
|
ref,
|
|
@@ -5908,7 +5385,7 @@ var AlertModalTitle = React28.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
5908
5385
|
}
|
|
5909
5386
|
));
|
|
5910
5387
|
AlertModalTitle.displayName = "AlertModalTitle";
|
|
5911
|
-
var AlertModalDescription =
|
|
5388
|
+
var AlertModalDescription = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
|
5912
5389
|
AlertDialogPrimitive.Description,
|
|
5913
5390
|
{
|
|
5914
5391
|
ref,
|
|
@@ -5917,7 +5394,7 @@ var AlertModalDescription = React28.forwardRef(({ className, ...props }, ref) =>
|
|
|
5917
5394
|
}
|
|
5918
5395
|
));
|
|
5919
5396
|
AlertModalDescription.displayName = "AlertModalDescription";
|
|
5920
|
-
var AlertModalBody =
|
|
5397
|
+
var AlertModalBody = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
|
5921
5398
|
"div",
|
|
5922
5399
|
{
|
|
5923
5400
|
ref,
|
|
@@ -5926,7 +5403,7 @@ var AlertModalBody = React28.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
5926
5403
|
}
|
|
5927
5404
|
));
|
|
5928
5405
|
AlertModalBody.displayName = "AlertModalBody";
|
|
5929
|
-
var AlertModalFooter =
|
|
5406
|
+
var AlertModalFooter = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
|
5930
5407
|
"div",
|
|
5931
5408
|
{
|
|
5932
5409
|
ref,
|
|
@@ -5938,7 +5415,7 @@ var AlertModalFooter = React28.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
5938
5415
|
}
|
|
5939
5416
|
));
|
|
5940
5417
|
AlertModalFooter.displayName = "AlertModalFooter";
|
|
5941
|
-
var AlertModalAction =
|
|
5418
|
+
var AlertModalAction = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
|
5942
5419
|
AlertDialogPrimitive.Action,
|
|
5943
5420
|
{
|
|
5944
5421
|
ref,
|
|
@@ -5947,7 +5424,7 @@ var AlertModalAction = React28.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
5947
5424
|
}
|
|
5948
5425
|
));
|
|
5949
5426
|
AlertModalAction.displayName = "AlertModalAction";
|
|
5950
|
-
var AlertModalCancel =
|
|
5427
|
+
var AlertModalCancel = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React27.createElement(
|
|
5951
5428
|
AlertDialogPrimitive.Cancel,
|
|
5952
5429
|
{
|
|
5953
5430
|
ref,
|
|
@@ -5983,10 +5460,10 @@ var AlertModal = Object.assign(AlertModalRoot, {
|
|
|
5983
5460
|
});
|
|
5984
5461
|
|
|
5985
5462
|
// src/components/ui/drawer.tsx
|
|
5986
|
-
var
|
|
5463
|
+
var React28 = __toESM(require("react"));
|
|
5987
5464
|
var DialogPrimitive2 = __toESM(require("@radix-ui/react-dialog"));
|
|
5988
5465
|
var import_class_variance_authority23 = require("class-variance-authority");
|
|
5989
|
-
var DefaultCloseIcon2 = ({ className }) => /* @__PURE__ */
|
|
5466
|
+
var DefaultCloseIcon2 = ({ className }) => /* @__PURE__ */ React28.createElement(
|
|
5990
5467
|
"svg",
|
|
5991
5468
|
{
|
|
5992
5469
|
className,
|
|
@@ -5996,7 +5473,7 @@ var DefaultCloseIcon2 = ({ className }) => /* @__PURE__ */ React29.createElement
|
|
|
5996
5473
|
strokeWidth: 2,
|
|
5997
5474
|
"aria-hidden": "true"
|
|
5998
5475
|
},
|
|
5999
|
-
/* @__PURE__ */
|
|
5476
|
+
/* @__PURE__ */ React28.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" })
|
|
6000
5477
|
);
|
|
6001
5478
|
var ANIMATION_CLASSES = {
|
|
6002
5479
|
right: "data-[state=open]:animate-drawer-right-enter data-[state=closed]:animate-drawer-right-exit",
|
|
@@ -6029,12 +5506,12 @@ var drawerSizeVertical = (0, import_class_variance_authority23.cva)("", {
|
|
|
6029
5506
|
defaultVariants: { size: "md" }
|
|
6030
5507
|
});
|
|
6031
5508
|
function DrawerRoot(props) {
|
|
6032
|
-
return /* @__PURE__ */
|
|
5509
|
+
return /* @__PURE__ */ React28.createElement(DialogPrimitive2.Root, { ...props });
|
|
6033
5510
|
}
|
|
6034
5511
|
var DrawerTrigger = DialogPrimitive2.Trigger;
|
|
6035
5512
|
var DrawerPortal = DialogPrimitive2.Portal;
|
|
6036
5513
|
var DrawerClose = DialogPrimitive2.Close;
|
|
6037
|
-
var DrawerOverlay =
|
|
5514
|
+
var DrawerOverlay = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React28.createElement(
|
|
6038
5515
|
DialogPrimitive2.Overlay,
|
|
6039
5516
|
{
|
|
6040
5517
|
ref,
|
|
@@ -6053,10 +5530,10 @@ var SIDE_POSITION = {
|
|
|
6053
5530
|
top: "inset-x-0 top-0",
|
|
6054
5531
|
bottom: "inset-x-0 bottom-0"
|
|
6055
5532
|
};
|
|
6056
|
-
var DrawerContent =
|
|
5533
|
+
var DrawerContent = React28.forwardRef(({ className, children, side = "right", size = "md", showCloseButton = true, closeIcon, ...props }, ref) => {
|
|
6057
5534
|
const isHorizontal = side === "left" || side === "right";
|
|
6058
5535
|
const sizeClass = isHorizontal ? drawerSizeHorizontal({ size }) : drawerSizeVertical({ size });
|
|
6059
|
-
return /* @__PURE__ */
|
|
5536
|
+
return /* @__PURE__ */ React28.createElement(DrawerPortal, null, /* @__PURE__ */ React28.createElement(DrawerOverlay, null), /* @__PURE__ */ React28.createElement(
|
|
6060
5537
|
DialogPrimitive2.Content,
|
|
6061
5538
|
{
|
|
6062
5539
|
ref,
|
|
@@ -6072,17 +5549,17 @@ var DrawerContent = React29.forwardRef(({ className, children, side = "right", s
|
|
|
6072
5549
|
...props
|
|
6073
5550
|
},
|
|
6074
5551
|
children,
|
|
6075
|
-
showCloseButton && /* @__PURE__ */
|
|
5552
|
+
showCloseButton && /* @__PURE__ */ React28.createElement(DialogPrimitive2.Close, { className: cn(
|
|
6076
5553
|
"absolute right-4 top-4 rounded-md p-1",
|
|
6077
5554
|
"text-text-muted hover:text-foreground",
|
|
6078
5555
|
"transition-colors duration-fast",
|
|
6079
5556
|
"focus-visible:focus-ring focus-visible:outline-none",
|
|
6080
5557
|
"disabled:pointer-events-none"
|
|
6081
|
-
) }, closeIcon || /* @__PURE__ */
|
|
5558
|
+
) }, closeIcon || /* @__PURE__ */ React28.createElement(DefaultCloseIcon2, { className: "icon-sm" }), /* @__PURE__ */ React28.createElement("span", { className: "sr-only" }, "Close"))
|
|
6082
5559
|
));
|
|
6083
5560
|
});
|
|
6084
5561
|
DrawerContent.displayName = "DrawerContent";
|
|
6085
|
-
var DrawerHeader =
|
|
5562
|
+
var DrawerHeader = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React28.createElement(
|
|
6086
5563
|
"div",
|
|
6087
5564
|
{
|
|
6088
5565
|
ref,
|
|
@@ -6091,7 +5568,7 @@ var DrawerHeader = React29.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
6091
5568
|
}
|
|
6092
5569
|
));
|
|
6093
5570
|
DrawerHeader.displayName = "DrawerHeader";
|
|
6094
|
-
var DrawerTitle =
|
|
5571
|
+
var DrawerTitle = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React28.createElement(
|
|
6095
5572
|
DialogPrimitive2.Title,
|
|
6096
5573
|
{
|
|
6097
5574
|
ref,
|
|
@@ -6100,7 +5577,7 @@ var DrawerTitle = React29.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
6100
5577
|
}
|
|
6101
5578
|
));
|
|
6102
5579
|
DrawerTitle.displayName = "DrawerTitle";
|
|
6103
|
-
var DrawerDescription =
|
|
5580
|
+
var DrawerDescription = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React28.createElement(
|
|
6104
5581
|
DialogPrimitive2.Description,
|
|
6105
5582
|
{
|
|
6106
5583
|
ref,
|
|
@@ -6109,7 +5586,7 @@ var DrawerDescription = React29.forwardRef(({ className, ...props }, ref) => /*
|
|
|
6109
5586
|
}
|
|
6110
5587
|
));
|
|
6111
5588
|
DrawerDescription.displayName = "DrawerDescription";
|
|
6112
|
-
var DrawerBody =
|
|
5589
|
+
var DrawerBody = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React28.createElement(
|
|
6113
5590
|
"div",
|
|
6114
5591
|
{
|
|
6115
5592
|
ref,
|
|
@@ -6118,7 +5595,7 @@ var DrawerBody = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
6118
5595
|
}
|
|
6119
5596
|
));
|
|
6120
5597
|
DrawerBody.displayName = "DrawerBody";
|
|
6121
|
-
var DrawerFooter =
|
|
5598
|
+
var DrawerFooter = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React28.createElement(
|
|
6122
5599
|
"div",
|
|
6123
5600
|
{
|
|
6124
5601
|
ref,
|
|
@@ -6144,7 +5621,7 @@ var Drawer = Object.assign(DrawerRoot, {
|
|
|
6144
5621
|
});
|
|
6145
5622
|
|
|
6146
5623
|
// src/components/ui/tooltip.tsx
|
|
6147
|
-
var
|
|
5624
|
+
var React29 = __toESM(require("react"));
|
|
6148
5625
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
|
|
6149
5626
|
var import_class_variance_authority24 = require("class-variance-authority");
|
|
6150
5627
|
var ANIMATION_CLASSES2 = {
|
|
@@ -6178,13 +5655,13 @@ var ARROW_FILL = {
|
|
|
6178
5655
|
};
|
|
6179
5656
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
6180
5657
|
function TooltipRoot({ delayDuration = 200, ...props }) {
|
|
6181
|
-
return /* @__PURE__ */
|
|
5658
|
+
return /* @__PURE__ */ React29.createElement(TooltipPrimitive.Root, { delayDuration, ...props });
|
|
6182
5659
|
}
|
|
6183
5660
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
6184
5661
|
var TooltipPortal = TooltipPrimitive.Portal;
|
|
6185
|
-
var TooltipContent =
|
|
5662
|
+
var TooltipContent = React29.forwardRef(({ className, variant = "default", size, side = "top", sideOffset = 6, showArrow = true, children, ...props }, ref) => {
|
|
6186
5663
|
const resolvedSide = side;
|
|
6187
|
-
return /* @__PURE__ */
|
|
5664
|
+
return /* @__PURE__ */ React29.createElement(TooltipPrimitive.Portal, null, /* @__PURE__ */ React29.createElement(
|
|
6188
5665
|
TooltipPrimitive.Content,
|
|
6189
5666
|
{
|
|
6190
5667
|
ref,
|
|
@@ -6198,7 +5675,7 @@ var TooltipContent = React30.forwardRef(({ className, variant = "default", size,
|
|
|
6198
5675
|
...props
|
|
6199
5676
|
},
|
|
6200
5677
|
children,
|
|
6201
|
-
showArrow && /* @__PURE__ */
|
|
5678
|
+
showArrow && /* @__PURE__ */ React29.createElement(
|
|
6202
5679
|
TooltipPrimitive.Arrow,
|
|
6203
5680
|
{
|
|
6204
5681
|
className: ARROW_FILL[variant || "default"],
|
|
@@ -6209,7 +5686,7 @@ var TooltipContent = React30.forwardRef(({ className, variant = "default", size,
|
|
|
6209
5686
|
));
|
|
6210
5687
|
});
|
|
6211
5688
|
TooltipContent.displayName = "TooltipContent";
|
|
6212
|
-
var TooltipArrow =
|
|
5689
|
+
var TooltipArrow = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React29.createElement(
|
|
6213
5690
|
TooltipPrimitive.Arrow,
|
|
6214
5691
|
{
|
|
6215
5692
|
ref,
|
|
@@ -6220,7 +5697,7 @@ var TooltipArrow = React30.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
6220
5697
|
}
|
|
6221
5698
|
));
|
|
6222
5699
|
TooltipArrow.displayName = "TooltipArrow";
|
|
6223
|
-
var
|
|
5700
|
+
var Tooltip = Object.assign(TooltipRoot, {
|
|
6224
5701
|
Trigger: TooltipTrigger,
|
|
6225
5702
|
Content: TooltipContent,
|
|
6226
5703
|
Arrow: TooltipArrow,
|
|
@@ -6229,10 +5706,10 @@ var Tooltip2 = Object.assign(TooltipRoot, {
|
|
|
6229
5706
|
});
|
|
6230
5707
|
|
|
6231
5708
|
// src/components/ui/popover.tsx
|
|
6232
|
-
var
|
|
5709
|
+
var React30 = __toESM(require("react"));
|
|
6233
5710
|
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"));
|
|
6234
5711
|
var import_class_variance_authority25 = require("class-variance-authority");
|
|
6235
|
-
var DefaultCloseIcon3 = ({ className }) => /* @__PURE__ */
|
|
5712
|
+
var DefaultCloseIcon3 = ({ className }) => /* @__PURE__ */ React30.createElement(
|
|
6236
5713
|
"svg",
|
|
6237
5714
|
{
|
|
6238
5715
|
className,
|
|
@@ -6242,7 +5719,7 @@ var DefaultCloseIcon3 = ({ className }) => /* @__PURE__ */ React31.createElement
|
|
|
6242
5719
|
strokeWidth: 2,
|
|
6243
5720
|
"aria-hidden": "true"
|
|
6244
5721
|
},
|
|
6245
|
-
/* @__PURE__ */
|
|
5722
|
+
/* @__PURE__ */ React30.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" })
|
|
6246
5723
|
);
|
|
6247
5724
|
var ANIMATION_CLASSES3 = {
|
|
6248
5725
|
top: "data-[state=open]:animate-popover-top-enter data-[state=closed]:animate-popover-top-exit",
|
|
@@ -6278,16 +5755,16 @@ var CSS_ARROW_CLASSES = {
|
|
|
6278
5755
|
};
|
|
6279
5756
|
var ARROW_ELEVATED = "fill-background-paper drop-shadow-sm";
|
|
6280
5757
|
function PopoverRoot(props) {
|
|
6281
|
-
return /* @__PURE__ */
|
|
5758
|
+
return /* @__PURE__ */ React30.createElement(PopoverPrimitive.Root, { ...props });
|
|
6282
5759
|
}
|
|
6283
5760
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
6284
5761
|
var PopoverPortal = PopoverPrimitive.Portal;
|
|
6285
5762
|
var PopoverAnchor = PopoverPrimitive.Anchor;
|
|
6286
5763
|
var PopoverClose = PopoverPrimitive.Close;
|
|
6287
|
-
var PopoverContent =
|
|
5764
|
+
var PopoverContent = React30.forwardRef(({ className, variant = "default", size, side = "bottom", sideOffset, showArrow = true, showClose = false, closeIcon, children, ...props }, ref) => {
|
|
6288
5765
|
const resolvedSide = side;
|
|
6289
5766
|
const resolvedOffset = sideOffset ?? (variant === "default" && showArrow ? 12 : 6);
|
|
6290
|
-
return /* @__PURE__ */
|
|
5767
|
+
return /* @__PURE__ */ React30.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ React30.createElement(
|
|
6291
5768
|
PopoverPrimitive.Content,
|
|
6292
5769
|
{
|
|
6293
5770
|
ref,
|
|
@@ -6300,16 +5777,16 @@ var PopoverContent = React31.forwardRef(({ className, variant = "default", size,
|
|
|
6300
5777
|
),
|
|
6301
5778
|
...props
|
|
6302
5779
|
},
|
|
6303
|
-
showClose && /* @__PURE__ */
|
|
5780
|
+
showClose && /* @__PURE__ */ React30.createElement(
|
|
6304
5781
|
PopoverPrimitive.Close,
|
|
6305
5782
|
{
|
|
6306
5783
|
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",
|
|
6307
5784
|
"aria-label": "Close"
|
|
6308
5785
|
},
|
|
6309
|
-
closeIcon || /* @__PURE__ */
|
|
5786
|
+
closeIcon || /* @__PURE__ */ React30.createElement(DefaultCloseIcon3, { className: "icon-sm" })
|
|
6310
5787
|
),
|
|
6311
5788
|
children,
|
|
6312
|
-
showArrow && variant === "default" && /* @__PURE__ */
|
|
5789
|
+
showArrow && variant === "default" && /* @__PURE__ */ React30.createElement(
|
|
6313
5790
|
"div",
|
|
6314
5791
|
{
|
|
6315
5792
|
className: cn(
|
|
@@ -6318,7 +5795,7 @@ var PopoverContent = React31.forwardRef(({ className, variant = "default", size,
|
|
|
6318
5795
|
)
|
|
6319
5796
|
}
|
|
6320
5797
|
),
|
|
6321
|
-
showArrow && variant === "elevated" && /* @__PURE__ */
|
|
5798
|
+
showArrow && variant === "elevated" && /* @__PURE__ */ React30.createElement(
|
|
6322
5799
|
PopoverPrimitive.Arrow,
|
|
6323
5800
|
{
|
|
6324
5801
|
className: ARROW_ELEVATED,
|
|
@@ -6329,7 +5806,7 @@ var PopoverContent = React31.forwardRef(({ className, variant = "default", size,
|
|
|
6329
5806
|
));
|
|
6330
5807
|
});
|
|
6331
5808
|
PopoverContent.displayName = "PopoverContent";
|
|
6332
|
-
var PopoverArrow =
|
|
5809
|
+
var PopoverArrow = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React30.createElement(
|
|
6333
5810
|
PopoverPrimitive.Arrow,
|
|
6334
5811
|
{
|
|
6335
5812
|
ref,
|
|
@@ -6350,13 +5827,13 @@ var Popover = Object.assign(PopoverRoot, {
|
|
|
6350
5827
|
});
|
|
6351
5828
|
|
|
6352
5829
|
// src/components/ui/alert.tsx
|
|
6353
|
-
var
|
|
5830
|
+
var React31 = __toESM(require("react"));
|
|
6354
5831
|
var import_class_variance_authority26 = require("class-variance-authority");
|
|
6355
|
-
var InfoIcon = ({ className }) => /* @__PURE__ */
|
|
6356
|
-
var SuccessIcon = ({ className }) => /* @__PURE__ */
|
|
6357
|
-
var WarningIcon = ({ className }) => /* @__PURE__ */
|
|
6358
|
-
var ErrorIcon = ({ className }) => /* @__PURE__ */
|
|
6359
|
-
var DefaultCloseIcon4 = ({ className }) => /* @__PURE__ */
|
|
5832
|
+
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" }));
|
|
5833
|
+
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" }));
|
|
5834
|
+
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" }));
|
|
5835
|
+
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" }));
|
|
5836
|
+
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" }));
|
|
6360
5837
|
var STATUS_ICONS = {
|
|
6361
5838
|
info: InfoIcon,
|
|
6362
5839
|
success: SuccessIcon,
|
|
@@ -6430,15 +5907,15 @@ var DESC_SIZE_MAP = {
|
|
|
6430
5907
|
default: "text-sm mt-1",
|
|
6431
5908
|
lg: "text-md mt-1.5"
|
|
6432
5909
|
};
|
|
6433
|
-
var AlertContext =
|
|
5910
|
+
var AlertContext = React31.createContext({
|
|
6434
5911
|
variant: "default",
|
|
6435
5912
|
color: "info",
|
|
6436
5913
|
size: "default"
|
|
6437
5914
|
});
|
|
6438
5915
|
function useAlertContext() {
|
|
6439
|
-
return
|
|
5916
|
+
return React31.useContext(AlertContext);
|
|
6440
5917
|
}
|
|
6441
|
-
var AlertRoot =
|
|
5918
|
+
var AlertRoot = React31.forwardRef(
|
|
6442
5919
|
({
|
|
6443
5920
|
className,
|
|
6444
5921
|
variant = "default",
|
|
@@ -6456,7 +5933,7 @@ var AlertRoot = React32.forwardRef(
|
|
|
6456
5933
|
const role = color === "error" ? "alert" : "status";
|
|
6457
5934
|
const colorClasses = colorMap2[color][variant];
|
|
6458
5935
|
const StatusIcon = STATUS_ICONS[color];
|
|
6459
|
-
return /* @__PURE__ */
|
|
5936
|
+
return /* @__PURE__ */ React31.createElement(AlertContext.Provider, { value: { variant, color, size } }, /* @__PURE__ */ React31.createElement(
|
|
6460
5937
|
"div",
|
|
6461
5938
|
{
|
|
6462
5939
|
ref,
|
|
@@ -6468,9 +5945,9 @@ var AlertRoot = React32.forwardRef(
|
|
|
6468
5945
|
),
|
|
6469
5946
|
...props
|
|
6470
5947
|
},
|
|
6471
|
-
!hideIcon && /* @__PURE__ */
|
|
6472
|
-
/* @__PURE__ */
|
|
6473
|
-
closable && /* @__PURE__ */
|
|
5948
|
+
!hideIcon && /* @__PURE__ */ React31.createElement("span", { className: "shrink-0" }, icon || /* @__PURE__ */ React31.createElement(StatusIcon, { className: ICON_SIZE_MAP[size] })),
|
|
5949
|
+
/* @__PURE__ */ React31.createElement("div", { className: "flex-1 min-w-0" }, children),
|
|
5950
|
+
closable && /* @__PURE__ */ React31.createElement(
|
|
6474
5951
|
"button",
|
|
6475
5952
|
{
|
|
6476
5953
|
type: "button",
|
|
@@ -6482,16 +5959,16 @@ var AlertRoot = React32.forwardRef(
|
|
|
6482
5959
|
onClick: onClose,
|
|
6483
5960
|
"aria-label": "Close"
|
|
6484
5961
|
},
|
|
6485
|
-
closeIcon || /* @__PURE__ */
|
|
5962
|
+
closeIcon || /* @__PURE__ */ React31.createElement(DefaultCloseIcon4, { className: "icon-sm" })
|
|
6486
5963
|
)
|
|
6487
5964
|
));
|
|
6488
5965
|
}
|
|
6489
5966
|
);
|
|
6490
5967
|
AlertRoot.displayName = "AlertRoot";
|
|
6491
|
-
var AlertTitle =
|
|
5968
|
+
var AlertTitle = React31.forwardRef(
|
|
6492
5969
|
({ className, ...props }, ref) => {
|
|
6493
5970
|
const { size } = useAlertContext();
|
|
6494
|
-
return /* @__PURE__ */
|
|
5971
|
+
return /* @__PURE__ */ React31.createElement(
|
|
6495
5972
|
"h5",
|
|
6496
5973
|
{
|
|
6497
5974
|
ref,
|
|
@@ -6502,10 +5979,10 @@ var AlertTitle = React32.forwardRef(
|
|
|
6502
5979
|
}
|
|
6503
5980
|
);
|
|
6504
5981
|
AlertTitle.displayName = "AlertTitle";
|
|
6505
|
-
var AlertDescription =
|
|
5982
|
+
var AlertDescription = React31.forwardRef(
|
|
6506
5983
|
({ className, ...props }, ref) => {
|
|
6507
5984
|
const { variant, size } = useAlertContext();
|
|
6508
|
-
return /* @__PURE__ */
|
|
5985
|
+
return /* @__PURE__ */ React31.createElement(
|
|
6509
5986
|
"p",
|
|
6510
5987
|
{
|
|
6511
5988
|
ref,
|
|
@@ -6527,14 +6004,14 @@ var Alert = Object.assign(AlertRoot, {
|
|
|
6527
6004
|
});
|
|
6528
6005
|
|
|
6529
6006
|
// src/components/ui/toast.tsx
|
|
6530
|
-
var
|
|
6007
|
+
var React32 = __toESM(require("react"));
|
|
6531
6008
|
var import_class_variance_authority27 = require("class-variance-authority");
|
|
6532
|
-
var InfoIcon2 = ({ className }) => /* @__PURE__ */
|
|
6533
|
-
var SuccessIcon2 = ({ className }) => /* @__PURE__ */
|
|
6534
|
-
var WarningIcon2 = ({ className }) => /* @__PURE__ */
|
|
6535
|
-
var ErrorIcon2 = ({ className }) => /* @__PURE__ */
|
|
6536
|
-
var DefaultCloseIcon5 = ({ className }) => /* @__PURE__ */
|
|
6537
|
-
var LoadingIcon = ({ className }) => /* @__PURE__ */
|
|
6009
|
+
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" }));
|
|
6010
|
+
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" }));
|
|
6011
|
+
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" }));
|
|
6012
|
+
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" }));
|
|
6013
|
+
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" }));
|
|
6014
|
+
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" }));
|
|
6538
6015
|
var STATUS_ICONS2 = {
|
|
6539
6016
|
default: InfoIcon2,
|
|
6540
6017
|
success: SuccessIcon2,
|
|
@@ -6613,8 +6090,8 @@ function createToastStore() {
|
|
|
6613
6090
|
}
|
|
6614
6091
|
var globalStore = createToastStore();
|
|
6615
6092
|
function useToastStore() {
|
|
6616
|
-
const [, forceUpdate] =
|
|
6617
|
-
|
|
6093
|
+
const [, forceUpdate] = React32.useState(0);
|
|
6094
|
+
React32.useEffect(() => {
|
|
6618
6095
|
return globalStore.subscribe(() => forceUpdate((n) => n + 1));
|
|
6619
6096
|
}, []);
|
|
6620
6097
|
return globalStore.toasts;
|
|
@@ -6708,7 +6185,7 @@ toast.custom = (render, opts) => {
|
|
|
6708
6185
|
});
|
|
6709
6186
|
return id;
|
|
6710
6187
|
};
|
|
6711
|
-
var ToastItem =
|
|
6188
|
+
var ToastItem = React32.memo(function ToastItem2({
|
|
6712
6189
|
data,
|
|
6713
6190
|
position,
|
|
6714
6191
|
size,
|
|
@@ -6717,13 +6194,13 @@ var ToastItem = React33.memo(function ToastItem2({
|
|
|
6717
6194
|
defaultDuration,
|
|
6718
6195
|
onRemove
|
|
6719
6196
|
}) {
|
|
6720
|
-
const [isExiting, setIsExiting] =
|
|
6721
|
-
const [isEntered, setIsEntered] =
|
|
6722
|
-
const [isPaused, setIsPaused] =
|
|
6723
|
-
const timerRef =
|
|
6724
|
-
const remainingRef =
|
|
6725
|
-
const startTimeRef =
|
|
6726
|
-
|
|
6197
|
+
const [isExiting, setIsExiting] = React32.useState(false);
|
|
6198
|
+
const [isEntered, setIsEntered] = React32.useState(false);
|
|
6199
|
+
const [isPaused, setIsPaused] = React32.useState(false);
|
|
6200
|
+
const timerRef = React32.useRef(null);
|
|
6201
|
+
const remainingRef = React32.useRef(0);
|
|
6202
|
+
const startTimeRef = React32.useRef(0);
|
|
6203
|
+
React32.useEffect(() => {
|
|
6727
6204
|
const timer = setTimeout(() => setIsEntered(true), TOAST_EXIT_DURATION);
|
|
6728
6205
|
return () => clearTimeout(timer);
|
|
6729
6206
|
}, []);
|
|
@@ -6736,18 +6213,18 @@ var ToastItem = React33.memo(function ToastItem2({
|
|
|
6736
6213
|
const StatusIcon = STATUS_ICONS2[data.type];
|
|
6737
6214
|
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";
|
|
6738
6215
|
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";
|
|
6739
|
-
const handleDismiss =
|
|
6216
|
+
const handleDismiss = React32.useCallback(() => {
|
|
6740
6217
|
if (!dismissible) return;
|
|
6741
6218
|
setIsExiting(true);
|
|
6742
6219
|
data.onDismiss?.(data);
|
|
6743
6220
|
setTimeout(() => onRemove(data.id), TOAST_EXIT_DURATION);
|
|
6744
6221
|
}, [data, dismissible, onRemove]);
|
|
6745
|
-
const handleAutoClose =
|
|
6222
|
+
const handleAutoClose = React32.useCallback(() => {
|
|
6746
6223
|
setIsExiting(true);
|
|
6747
6224
|
data.onAutoClose?.(data);
|
|
6748
6225
|
setTimeout(() => onRemove(data.id), TOAST_EXIT_DURATION);
|
|
6749
6226
|
}, [data, onRemove]);
|
|
6750
|
-
|
|
6227
|
+
React32.useEffect(() => {
|
|
6751
6228
|
if (duration <= 0) return;
|
|
6752
6229
|
remainingRef.current = duration;
|
|
6753
6230
|
startTimeRef.current = Date.now();
|
|
@@ -6756,7 +6233,7 @@ var ToastItem = React33.memo(function ToastItem2({
|
|
|
6756
6233
|
if (timerRef.current) clearTimeout(timerRef.current);
|
|
6757
6234
|
};
|
|
6758
6235
|
}, [duration, handleAutoClose]);
|
|
6759
|
-
const handleMouseEnter =
|
|
6236
|
+
const handleMouseEnter = React32.useCallback(() => {
|
|
6760
6237
|
if (duration <= 0) return;
|
|
6761
6238
|
setIsPaused(true);
|
|
6762
6239
|
if (timerRef.current) {
|
|
@@ -6764,13 +6241,13 @@ var ToastItem = React33.memo(function ToastItem2({
|
|
|
6764
6241
|
remainingRef.current -= Date.now() - startTimeRef.current;
|
|
6765
6242
|
}
|
|
6766
6243
|
}, [duration]);
|
|
6767
|
-
const handleMouseLeave =
|
|
6244
|
+
const handleMouseLeave = React32.useCallback(() => {
|
|
6768
6245
|
if (duration <= 0) return;
|
|
6769
6246
|
setIsPaused(false);
|
|
6770
6247
|
startTimeRef.current = Date.now();
|
|
6771
6248
|
timerRef.current = setTimeout(handleAutoClose, Math.max(remainingRef.current, TOAST_MIN_RESUME_MS));
|
|
6772
6249
|
}, [duration, handleAutoClose]);
|
|
6773
|
-
|
|
6250
|
+
React32.useEffect(() => {
|
|
6774
6251
|
if (data._promiseState === "success" || data._promiseState === "error") {
|
|
6775
6252
|
const newDuration = data.duration ?? defaultDuration;
|
|
6776
6253
|
if (newDuration > 0) {
|
|
@@ -6781,7 +6258,7 @@ var ToastItem = React33.memo(function ToastItem2({
|
|
|
6781
6258
|
}
|
|
6782
6259
|
}
|
|
6783
6260
|
}, [data._promiseState, data.duration, defaultDuration, handleAutoClose]);
|
|
6784
|
-
return /* @__PURE__ */
|
|
6261
|
+
return /* @__PURE__ */ React32.createElement(
|
|
6785
6262
|
"div",
|
|
6786
6263
|
{
|
|
6787
6264
|
role,
|
|
@@ -6797,9 +6274,9 @@ var ToastItem = React33.memo(function ToastItem2({
|
|
|
6797
6274
|
onMouseEnter: handleMouseEnter,
|
|
6798
6275
|
onMouseLeave: handleMouseLeave
|
|
6799
6276
|
},
|
|
6800
|
-
data.icon !== void 0 ? data.icon && /* @__PURE__ */
|
|
6801
|
-
/* @__PURE__ */
|
|
6802
|
-
(data.action || data.cancel) && /* @__PURE__ */
|
|
6277
|
+
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" })),
|
|
6278
|
+
/* @__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)),
|
|
6279
|
+
(data.action || data.cancel) && /* @__PURE__ */ React32.createElement("div", { className: "flex items-center gap-1.5 shrink-0" }, data.cancel && /* @__PURE__ */ React32.createElement(
|
|
6803
6280
|
"button",
|
|
6804
6281
|
{
|
|
6805
6282
|
type: "button",
|
|
@@ -6810,7 +6287,7 @@ var ToastItem = React33.memo(function ToastItem2({
|
|
|
6810
6287
|
}
|
|
6811
6288
|
},
|
|
6812
6289
|
data.cancel.label
|
|
6813
|
-
), data.action && /* @__PURE__ */
|
|
6290
|
+
), data.action && /* @__PURE__ */ React32.createElement(
|
|
6814
6291
|
"button",
|
|
6815
6292
|
{
|
|
6816
6293
|
type: "button",
|
|
@@ -6822,7 +6299,7 @@ var ToastItem = React33.memo(function ToastItem2({
|
|
|
6822
6299
|
},
|
|
6823
6300
|
data.action.label
|
|
6824
6301
|
)),
|
|
6825
|
-
showClose && dismissible && /* @__PURE__ */
|
|
6302
|
+
showClose && dismissible && /* @__PURE__ */ React32.createElement(
|
|
6826
6303
|
"button",
|
|
6827
6304
|
{
|
|
6828
6305
|
type: "button",
|
|
@@ -6830,7 +6307,7 @@ var ToastItem = React33.memo(function ToastItem2({
|
|
|
6830
6307
|
onClick: handleDismiss,
|
|
6831
6308
|
"aria-label": "Close"
|
|
6832
6309
|
},
|
|
6833
|
-
/* @__PURE__ */
|
|
6310
|
+
/* @__PURE__ */ React32.createElement(DefaultCloseIcon5, { className: "icon-sm" })
|
|
6834
6311
|
)
|
|
6835
6312
|
);
|
|
6836
6313
|
});
|
|
@@ -6847,8 +6324,8 @@ function Toaster({
|
|
|
6847
6324
|
className
|
|
6848
6325
|
}) {
|
|
6849
6326
|
const toasts = useToastStore();
|
|
6850
|
-
const [expanded, setExpanded] =
|
|
6851
|
-
const handleRemove =
|
|
6327
|
+
const [expanded, setExpanded] = React32.useState(false);
|
|
6328
|
+
const handleRemove = React32.useCallback((id) => {
|
|
6852
6329
|
globalStore.removeToast(id);
|
|
6853
6330
|
}, []);
|
|
6854
6331
|
const visible = toasts.slice(0, visibleToasts);
|
|
@@ -6861,7 +6338,7 @@ function Toaster({
|
|
|
6861
6338
|
isTop ? "top-0" : "bottom-0",
|
|
6862
6339
|
isCenter ? "left-1/2 -translate-x-1/2" : isRight ? "right-0" : "left-0"
|
|
6863
6340
|
);
|
|
6864
|
-
return /* @__PURE__ */
|
|
6341
|
+
return /* @__PURE__ */ React32.createElement(
|
|
6865
6342
|
"section",
|
|
6866
6343
|
{
|
|
6867
6344
|
"aria-label": "Notifications",
|
|
@@ -6877,7 +6354,7 @@ function Toaster({
|
|
|
6877
6354
|
},
|
|
6878
6355
|
visible.map((t, index) => {
|
|
6879
6356
|
const isStacked = !expand && !expanded && index > 0;
|
|
6880
|
-
return /* @__PURE__ */
|
|
6357
|
+
return /* @__PURE__ */ React32.createElement(
|
|
6881
6358
|
"div",
|
|
6882
6359
|
{
|
|
6883
6360
|
key: t.id,
|
|
@@ -6895,7 +6372,7 @@ function Toaster({
|
|
|
6895
6372
|
} : { zIndex: visibleToasts - index }
|
|
6896
6373
|
}
|
|
6897
6374
|
},
|
|
6898
|
-
/* @__PURE__ */
|
|
6375
|
+
/* @__PURE__ */ React32.createElement(
|
|
6899
6376
|
ToastItem,
|
|
6900
6377
|
{
|
|
6901
6378
|
data: t,
|
|
@@ -6914,7 +6391,7 @@ function Toaster({
|
|
|
6914
6391
|
Toaster.displayName = "Toaster";
|
|
6915
6392
|
|
|
6916
6393
|
// src/components/ui/progress.tsx
|
|
6917
|
-
var
|
|
6394
|
+
var React33 = __toESM(require("react"));
|
|
6918
6395
|
var ProgressPrimitive = __toESM(require("@radix-ui/react-progress"));
|
|
6919
6396
|
var import_class_variance_authority28 = require("class-variance-authority");
|
|
6920
6397
|
var CIRCULAR_VIEWBOX = 100;
|
|
@@ -6962,7 +6439,7 @@ var valueFontSizes = {
|
|
|
6962
6439
|
default: "text-sm",
|
|
6963
6440
|
lg: "text-base"
|
|
6964
6441
|
};
|
|
6965
|
-
var Progress =
|
|
6442
|
+
var Progress = React33.forwardRef(({
|
|
6966
6443
|
className,
|
|
6967
6444
|
type = "linear",
|
|
6968
6445
|
value = 0,
|
|
@@ -6988,7 +6465,7 @@ var Progress = React34.forwardRef(({
|
|
|
6988
6465
|
const r = (CIRCULAR_VIEWBOX - strokeWidth) / 2;
|
|
6989
6466
|
const circumference = 2 * Math.PI * r;
|
|
6990
6467
|
const offset = circumference * (1 - percentage / 100);
|
|
6991
|
-
return /* @__PURE__ */
|
|
6468
|
+
return /* @__PURE__ */ React33.createElement(
|
|
6992
6469
|
"div",
|
|
6993
6470
|
{
|
|
6994
6471
|
className: cn("inline-flex items-center gap-2", className),
|
|
@@ -6998,7 +6475,7 @@ var Progress = React34.forwardRef(({
|
|
|
6998
6475
|
"aria-valuemax": max,
|
|
6999
6476
|
"aria-label": label
|
|
7000
6477
|
},
|
|
7001
|
-
/* @__PURE__ */
|
|
6478
|
+
/* @__PURE__ */ React33.createElement("div", { className: "relative", style: { width: diameter, height: diameter } }, /* @__PURE__ */ React33.createElement(
|
|
7002
6479
|
"svg",
|
|
7003
6480
|
{
|
|
7004
6481
|
viewBox: `0 0 ${CIRCULAR_VIEWBOX} ${CIRCULAR_VIEWBOX}`,
|
|
@@ -7006,7 +6483,7 @@ var Progress = React34.forwardRef(({
|
|
|
7006
6483
|
width: diameter,
|
|
7007
6484
|
height: diameter
|
|
7008
6485
|
},
|
|
7009
|
-
/* @__PURE__ */
|
|
6486
|
+
/* @__PURE__ */ React33.createElement(
|
|
7010
6487
|
"circle",
|
|
7011
6488
|
{
|
|
7012
6489
|
cx: CIRCULAR_CENTER,
|
|
@@ -7017,7 +6494,7 @@ var Progress = React34.forwardRef(({
|
|
|
7017
6494
|
strokeWidth
|
|
7018
6495
|
}
|
|
7019
6496
|
),
|
|
7020
|
-
/* @__PURE__ */
|
|
6497
|
+
/* @__PURE__ */ React33.createElement(
|
|
7021
6498
|
"circle",
|
|
7022
6499
|
{
|
|
7023
6500
|
cx: CIRCULAR_CENTER,
|
|
@@ -7031,14 +6508,14 @@ var Progress = React34.forwardRef(({
|
|
|
7031
6508
|
strokeLinecap: "round"
|
|
7032
6509
|
}
|
|
7033
6510
|
)
|
|
7034
|
-
), showValue && resolvedSize !== "sm" && /* @__PURE__ */
|
|
6511
|
+
), showValue && resolvedSize !== "sm" && /* @__PURE__ */ React33.createElement("div", { className: cn(
|
|
7035
6512
|
"absolute inset-0 flex items-center justify-center font-semibold font-mono tabular-nums text-foreground",
|
|
7036
6513
|
CIRCULAR_FONT_SIZES[resolvedSize]
|
|
7037
6514
|
) }, valueLabel))
|
|
7038
6515
|
);
|
|
7039
6516
|
}
|
|
7040
6517
|
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)]" : "";
|
|
7041
|
-
return /* @__PURE__ */
|
|
6518
|
+
return /* @__PURE__ */ React33.createElement("div", { className: cn("flex items-center gap-3", showValue && "w-full", className) }, /* @__PURE__ */ React33.createElement(
|
|
7042
6519
|
ProgressPrimitive.Root,
|
|
7043
6520
|
{
|
|
7044
6521
|
ref,
|
|
@@ -7048,7 +6525,7 @@ var Progress = React34.forwardRef(({
|
|
|
7048
6525
|
"aria-label": label,
|
|
7049
6526
|
...props
|
|
7050
6527
|
},
|
|
7051
|
-
/* @__PURE__ */
|
|
6528
|
+
/* @__PURE__ */ React33.createElement(
|
|
7052
6529
|
ProgressPrimitive.Indicator,
|
|
7053
6530
|
{
|
|
7054
6531
|
className: cn(
|
|
@@ -7060,7 +6537,7 @@ var Progress = React34.forwardRef(({
|
|
|
7060
6537
|
style: { width: `${percentage}%` }
|
|
7061
6538
|
}
|
|
7062
6539
|
)
|
|
7063
|
-
), showValue && /* @__PURE__ */
|
|
6540
|
+
), showValue && /* @__PURE__ */ React33.createElement("span", { className: cn(
|
|
7064
6541
|
"shrink-0 font-semibold font-mono tabular-nums text-foreground",
|
|
7065
6542
|
valueFontSizes[resolvedSize]
|
|
7066
6543
|
) }, valueLabel));
|
|
@@ -7068,7 +6545,7 @@ var Progress = React34.forwardRef(({
|
|
|
7068
6545
|
Progress.displayName = "Progress";
|
|
7069
6546
|
|
|
7070
6547
|
// src/components/ui/spinner.tsx
|
|
7071
|
-
var
|
|
6548
|
+
var React34 = __toESM(require("react"));
|
|
7072
6549
|
var import_class_variance_authority29 = require("class-variance-authority");
|
|
7073
6550
|
var RING_SIZES = {
|
|
7074
6551
|
sm: 16,
|
|
@@ -7146,7 +6623,7 @@ var spinnerVariants = (0, import_class_variance_authority29.cva)(
|
|
|
7146
6623
|
}
|
|
7147
6624
|
}
|
|
7148
6625
|
);
|
|
7149
|
-
var Spinner =
|
|
6626
|
+
var Spinner = React34.forwardRef(
|
|
7150
6627
|
({
|
|
7151
6628
|
className,
|
|
7152
6629
|
variant = "ring",
|
|
@@ -7165,7 +6642,7 @@ var Spinner = React35.forwardRef(
|
|
|
7165
6642
|
flip: OrbitFlipSpinner,
|
|
7166
6643
|
morph: OrbitMorphSpinner
|
|
7167
6644
|
};
|
|
7168
|
-
return /* @__PURE__ */
|
|
6645
|
+
return /* @__PURE__ */ React34.createElement(
|
|
7169
6646
|
"div",
|
|
7170
6647
|
{
|
|
7171
6648
|
ref,
|
|
@@ -7174,12 +6651,12 @@ var Spinner = React35.forwardRef(
|
|
|
7174
6651
|
className: cn(spinnerVariants({ size }), className),
|
|
7175
6652
|
...props
|
|
7176
6653
|
},
|
|
7177
|
-
variant === "ring" && /* @__PURE__ */
|
|
7178
|
-
variant === "dots" && /* @__PURE__ */
|
|
7179
|
-
variant === "bars" && /* @__PURE__ */
|
|
6654
|
+
variant === "ring" && /* @__PURE__ */ React34.createElement(RingSpinner, { size: resolvedSize, color, speed }),
|
|
6655
|
+
variant === "dots" && /* @__PURE__ */ React34.createElement(DotsSpinner, { size: resolvedSize, color, speed }),
|
|
6656
|
+
variant === "bars" && /* @__PURE__ */ React34.createElement(BarsSpinner, { size: resolvedSize, color, speed }),
|
|
7180
6657
|
variant === "orbit" && (() => {
|
|
7181
6658
|
const OrbitComponent = orbitMap[orbitStyle];
|
|
7182
|
-
return /* @__PURE__ */
|
|
6659
|
+
return /* @__PURE__ */ React34.createElement(OrbitComponent, { size: resolvedSize, color, speed });
|
|
7183
6660
|
})()
|
|
7184
6661
|
);
|
|
7185
6662
|
}
|
|
@@ -7190,7 +6667,7 @@ function RingSpinner({ size, color, speed }) {
|
|
|
7190
6667
|
const stroke = RING_STROKE[size];
|
|
7191
6668
|
const r = (RING_VIEWBOX - stroke) / 2;
|
|
7192
6669
|
const circumference = 2 * Math.PI * r;
|
|
7193
|
-
return /* @__PURE__ */
|
|
6670
|
+
return /* @__PURE__ */ React34.createElement(
|
|
7194
6671
|
"svg",
|
|
7195
6672
|
{
|
|
7196
6673
|
viewBox: `0 0 ${RING_VIEWBOX} ${RING_VIEWBOX}`,
|
|
@@ -7200,7 +6677,7 @@ function RingSpinner({ size, color, speed }) {
|
|
|
7200
6677
|
className: "animate-spin",
|
|
7201
6678
|
style: { animationDuration: `${SPEED_MS[speed]}ms` }
|
|
7202
6679
|
},
|
|
7203
|
-
/* @__PURE__ */
|
|
6680
|
+
/* @__PURE__ */ React34.createElement(
|
|
7204
6681
|
"circle",
|
|
7205
6682
|
{
|
|
7206
6683
|
cx: RING_CENTER,
|
|
@@ -7210,7 +6687,7 @@ function RingSpinner({ size, color, speed }) {
|
|
|
7210
6687
|
strokeWidth: stroke
|
|
7211
6688
|
}
|
|
7212
6689
|
),
|
|
7213
|
-
/* @__PURE__ */
|
|
6690
|
+
/* @__PURE__ */ React34.createElement(
|
|
7214
6691
|
"circle",
|
|
7215
6692
|
{
|
|
7216
6693
|
cx: RING_CENTER,
|
|
@@ -7228,7 +6705,7 @@ function RingSpinner({ size, color, speed }) {
|
|
|
7228
6705
|
function DotsSpinner({ size, color, speed }) {
|
|
7229
6706
|
const dotSize = DOT_SIZES[size];
|
|
7230
6707
|
const gap = DOT_GAP[size];
|
|
7231
|
-
return /* @__PURE__ */
|
|
6708
|
+
return /* @__PURE__ */ React34.createElement("div", { className: "inline-flex items-center", style: { gap } }, Array.from({ length: DOT_COUNT }, (_, i) => /* @__PURE__ */ React34.createElement(
|
|
7232
6709
|
"div",
|
|
7233
6710
|
{
|
|
7234
6711
|
key: i,
|
|
@@ -7249,7 +6726,7 @@ function BarsSpinner({ size, color, speed }) {
|
|
|
7249
6726
|
const barWidth = BAR_WIDTHS[size];
|
|
7250
6727
|
const barHeight = BAR_HEIGHTS[size];
|
|
7251
6728
|
const gap = BAR_GAP[size];
|
|
7252
|
-
return /* @__PURE__ */
|
|
6729
|
+
return /* @__PURE__ */ React34.createElement("div", { className: "inline-flex items-center", style: { gap, height: barHeight } }, Array.from({ length: BAR_COUNT }, (_, i) => /* @__PURE__ */ React34.createElement(
|
|
7253
6730
|
"div",
|
|
7254
6731
|
{
|
|
7255
6732
|
key: i,
|
|
@@ -7276,7 +6753,7 @@ function OrbitSpinner({ size, color, speed }) {
|
|
|
7276
6753
|
const stroke = ORBIT_STROKE[size];
|
|
7277
6754
|
const r = (RING_VIEWBOX - stroke * 2) / 2;
|
|
7278
6755
|
const circumference = 2 * Math.PI * r;
|
|
7279
|
-
return /* @__PURE__ */
|
|
6756
|
+
return /* @__PURE__ */ React34.createElement(
|
|
7280
6757
|
"div",
|
|
7281
6758
|
{
|
|
7282
6759
|
className: cn(orbitTextColorMap[color]),
|
|
@@ -7287,7 +6764,7 @@ function OrbitSpinner({ size, color, speed }) {
|
|
|
7287
6764
|
position: "relative"
|
|
7288
6765
|
}
|
|
7289
6766
|
},
|
|
7290
|
-
/* @__PURE__ */
|
|
6767
|
+
/* @__PURE__ */ React34.createElement(
|
|
7291
6768
|
"svg",
|
|
7292
6769
|
{
|
|
7293
6770
|
viewBox: `0 0 ${RING_VIEWBOX} ${RING_VIEWBOX}`,
|
|
@@ -7297,7 +6774,7 @@ function OrbitSpinner({ size, color, speed }) {
|
|
|
7297
6774
|
className: "absolute inset-0 animate-spinner-orbit",
|
|
7298
6775
|
style: { animationDuration: `${ORBIT_SPEED_MS[speed]}ms` }
|
|
7299
6776
|
},
|
|
7300
|
-
/* @__PURE__ */
|
|
6777
|
+
/* @__PURE__ */ React34.createElement(
|
|
7301
6778
|
"circle",
|
|
7302
6779
|
{
|
|
7303
6780
|
cx: RING_CENTER,
|
|
@@ -7308,7 +6785,7 @@ function OrbitSpinner({ size, color, speed }) {
|
|
|
7308
6785
|
}
|
|
7309
6786
|
)
|
|
7310
6787
|
),
|
|
7311
|
-
/* @__PURE__ */
|
|
6788
|
+
/* @__PURE__ */ React34.createElement(
|
|
7312
6789
|
"svg",
|
|
7313
6790
|
{
|
|
7314
6791
|
viewBox: `0 0 ${RING_VIEWBOX} ${RING_VIEWBOX}`,
|
|
@@ -7324,7 +6801,7 @@ function OrbitSpinner({ size, color, speed }) {
|
|
|
7324
6801
|
opacity: 0.35
|
|
7325
6802
|
}
|
|
7326
6803
|
},
|
|
7327
|
-
/* @__PURE__ */
|
|
6804
|
+
/* @__PURE__ */ React34.createElement(
|
|
7328
6805
|
"circle",
|
|
7329
6806
|
{
|
|
7330
6807
|
cx: RING_CENTER,
|
|
@@ -7342,7 +6819,7 @@ function OrbitDotsSpinner({ size, color, speed }) {
|
|
|
7342
6819
|
const diameter = ORBIT_SIZES[size];
|
|
7343
6820
|
const dotSize = ORBIT_DOT_SIZE[size];
|
|
7344
6821
|
const orbitRadius = (diameter - dotSize) / 2;
|
|
7345
|
-
return /* @__PURE__ */
|
|
6822
|
+
return /* @__PURE__ */ React34.createElement(
|
|
7346
6823
|
"div",
|
|
7347
6824
|
{
|
|
7348
6825
|
className: cn(orbitTextColorMap[color]),
|
|
@@ -7353,7 +6830,7 @@ function OrbitDotsSpinner({ size, color, speed }) {
|
|
|
7353
6830
|
position: "relative"
|
|
7354
6831
|
}
|
|
7355
6832
|
},
|
|
7356
|
-
/* @__PURE__ */
|
|
6833
|
+
/* @__PURE__ */ React34.createElement(
|
|
7357
6834
|
"div",
|
|
7358
6835
|
{
|
|
7359
6836
|
className: "animate-spinner-orbit",
|
|
@@ -7365,7 +6842,7 @@ function OrbitDotsSpinner({ size, color, speed }) {
|
|
|
7365
6842
|
transformStyle: "preserve-3d"
|
|
7366
6843
|
}
|
|
7367
6844
|
},
|
|
7368
|
-
[0, 120, 240].map((angle) => /* @__PURE__ */
|
|
6845
|
+
[0, 120, 240].map((angle) => /* @__PURE__ */ React34.createElement(
|
|
7369
6846
|
"div",
|
|
7370
6847
|
{
|
|
7371
6848
|
key: angle,
|
|
@@ -7398,7 +6875,7 @@ function OrbitCubeSpinner({ size, color, speed }) {
|
|
|
7398
6875
|
top: -overlap,
|
|
7399
6876
|
left: -overlap
|
|
7400
6877
|
};
|
|
7401
|
-
return /* @__PURE__ */
|
|
6878
|
+
return /* @__PURE__ */ React34.createElement(
|
|
7402
6879
|
"div",
|
|
7403
6880
|
{
|
|
7404
6881
|
className: cn(orbitTextColorMap[color]),
|
|
@@ -7408,7 +6885,7 @@ function OrbitCubeSpinner({ size, color, speed }) {
|
|
|
7408
6885
|
perspective: cubeSize * 6
|
|
7409
6886
|
}
|
|
7410
6887
|
},
|
|
7411
|
-
/* @__PURE__ */
|
|
6888
|
+
/* @__PURE__ */ React34.createElement(
|
|
7412
6889
|
"div",
|
|
7413
6890
|
{
|
|
7414
6891
|
style: {
|
|
@@ -7418,7 +6895,7 @@ function OrbitCubeSpinner({ size, color, speed }) {
|
|
|
7418
6895
|
transformStyle: "preserve-3d"
|
|
7419
6896
|
}
|
|
7420
6897
|
},
|
|
7421
|
-
/* @__PURE__ */
|
|
6898
|
+
/* @__PURE__ */ React34.createElement(
|
|
7422
6899
|
"div",
|
|
7423
6900
|
{
|
|
7424
6901
|
className: "animate-spinner-orbit",
|
|
@@ -7430,12 +6907,12 @@ function OrbitCubeSpinner({ size, color, speed }) {
|
|
|
7430
6907
|
transformStyle: "preserve-3d"
|
|
7431
6908
|
}
|
|
7432
6909
|
},
|
|
7433
|
-
/* @__PURE__ */
|
|
7434
|
-
/* @__PURE__ */
|
|
7435
|
-
/* @__PURE__ */
|
|
7436
|
-
/* @__PURE__ */
|
|
7437
|
-
/* @__PURE__ */
|
|
7438
|
-
/* @__PURE__ */
|
|
6910
|
+
/* @__PURE__ */ React34.createElement("div", { style: { ...faceBase, transform: `translateZ(${half}px)`, opacity: 0.25 } }),
|
|
6911
|
+
/* @__PURE__ */ React34.createElement("div", { style: { ...faceBase, transform: `translateZ(${-half}px)`, opacity: 0.1 } }),
|
|
6912
|
+
/* @__PURE__ */ React34.createElement("div", { style: { ...faceBase, transform: `rotateY(-90deg) translateZ(${half}px)`, opacity: 0.2 } }),
|
|
6913
|
+
/* @__PURE__ */ React34.createElement("div", { style: { ...faceBase, transform: `rotateY(90deg) translateZ(${half}px)`, opacity: 0.2 } }),
|
|
6914
|
+
/* @__PURE__ */ React34.createElement("div", { style: { ...faceBase, transform: `rotateX(90deg) translateZ(${half}px)`, opacity: 0.15 } }),
|
|
6915
|
+
/* @__PURE__ */ React34.createElement("div", { style: { ...faceBase, transform: `rotateX(-90deg) translateZ(${half}px)`, opacity: 0.08 } })
|
|
7439
6916
|
)
|
|
7440
6917
|
)
|
|
7441
6918
|
);
|
|
@@ -7443,7 +6920,7 @@ function OrbitCubeSpinner({ size, color, speed }) {
|
|
|
7443
6920
|
var FLIP_SIZES = { sm: 14, default: 20, lg: 28 };
|
|
7444
6921
|
function OrbitFlipSpinner({ size, color, speed }) {
|
|
7445
6922
|
const sqSize = FLIP_SIZES[size];
|
|
7446
|
-
return /* @__PURE__ */
|
|
6923
|
+
return /* @__PURE__ */ React34.createElement(
|
|
7447
6924
|
"div",
|
|
7448
6925
|
{
|
|
7449
6926
|
className: cn(orbitTextColorMap[color]),
|
|
@@ -7453,7 +6930,7 @@ function OrbitFlipSpinner({ size, color, speed }) {
|
|
|
7453
6930
|
perspective: sqSize * 4
|
|
7454
6931
|
}
|
|
7455
6932
|
},
|
|
7456
|
-
/* @__PURE__ */
|
|
6933
|
+
/* @__PURE__ */ React34.createElement("div", { style: { transform: "rotateX(25deg)", transformStyle: "preserve-3d", width: "100%", height: "100%" } }, /* @__PURE__ */ React34.createElement(
|
|
7457
6934
|
"div",
|
|
7458
6935
|
{
|
|
7459
6936
|
className: "animate-spinner-orbit",
|
|
@@ -7472,7 +6949,7 @@ function OrbitFlipSpinner({ size, color, speed }) {
|
|
|
7472
6949
|
var MORPH_SIZES = { sm: 16, default: 24, lg: 34 };
|
|
7473
6950
|
function OrbitMorphSpinner({ size, color, speed }) {
|
|
7474
6951
|
const morphSize = MORPH_SIZES[size];
|
|
7475
|
-
return /* @__PURE__ */
|
|
6952
|
+
return /* @__PURE__ */ React34.createElement(
|
|
7476
6953
|
"div",
|
|
7477
6954
|
{
|
|
7478
6955
|
className: cn(orbitTextColorMap[color]),
|
|
@@ -7482,7 +6959,7 @@ function OrbitMorphSpinner({ size, color, speed }) {
|
|
|
7482
6959
|
perspective: morphSize * 3
|
|
7483
6960
|
}
|
|
7484
6961
|
},
|
|
7485
|
-
/* @__PURE__ */
|
|
6962
|
+
/* @__PURE__ */ React34.createElement(
|
|
7486
6963
|
"div",
|
|
7487
6964
|
{
|
|
7488
6965
|
className: "animate-spinner-morph",
|
|
@@ -7499,7 +6976,7 @@ function OrbitMorphSpinner({ size, color, speed }) {
|
|
|
7499
6976
|
}
|
|
7500
6977
|
|
|
7501
6978
|
// src/components/ui/skeleton.tsx
|
|
7502
|
-
var
|
|
6979
|
+
var React35 = __toESM(require("react"));
|
|
7503
6980
|
var import_class_variance_authority30 = require("class-variance-authority");
|
|
7504
6981
|
var PULSE_DURATION_MS = 2e3;
|
|
7505
6982
|
var WAVE_DURATION_MS = 1800;
|
|
@@ -7526,7 +7003,7 @@ var skeletonVariants = (0, import_class_variance_authority30.cva)(
|
|
|
7526
7003
|
}
|
|
7527
7004
|
}
|
|
7528
7005
|
);
|
|
7529
|
-
var SkeletonBlock =
|
|
7006
|
+
var SkeletonBlock = React35.forwardRef(
|
|
7530
7007
|
({
|
|
7531
7008
|
className,
|
|
7532
7009
|
variant = "text",
|
|
@@ -7537,7 +7014,7 @@ var SkeletonBlock = React36.forwardRef(
|
|
|
7537
7014
|
style,
|
|
7538
7015
|
...props
|
|
7539
7016
|
}, ref) => {
|
|
7540
|
-
return /* @__PURE__ */
|
|
7017
|
+
return /* @__PURE__ */ React35.createElement(
|
|
7541
7018
|
"div",
|
|
7542
7019
|
{
|
|
7543
7020
|
ref,
|
|
@@ -7557,7 +7034,7 @@ var SkeletonBlock = React36.forwardRef(
|
|
|
7557
7034
|
},
|
|
7558
7035
|
...props
|
|
7559
7036
|
},
|
|
7560
|
-
animation === "wave" && /* @__PURE__ */
|
|
7037
|
+
animation === "wave" && /* @__PURE__ */ React35.createElement(
|
|
7561
7038
|
"div",
|
|
7562
7039
|
{
|
|
7563
7040
|
className: "absolute inset-0 animate-skeleton-wave",
|
|
@@ -7571,7 +7048,7 @@ var SkeletonBlock = React36.forwardRef(
|
|
|
7571
7048
|
}
|
|
7572
7049
|
);
|
|
7573
7050
|
SkeletonBlock.displayName = "SkeletonBlock";
|
|
7574
|
-
var Skeleton =
|
|
7051
|
+
var Skeleton = React35.forwardRef(
|
|
7575
7052
|
({
|
|
7576
7053
|
count,
|
|
7577
7054
|
loading,
|
|
@@ -7580,13 +7057,13 @@ var Skeleton = React36.forwardRef(
|
|
|
7580
7057
|
...rest
|
|
7581
7058
|
}, ref) => {
|
|
7582
7059
|
if (loading !== void 0) {
|
|
7583
|
-
if (!loading) return /* @__PURE__ */
|
|
7060
|
+
if (!loading) return /* @__PURE__ */ React35.createElement(React35.Fragment, null, children);
|
|
7584
7061
|
}
|
|
7585
7062
|
if (count != null && count > 1 && variant === "text") {
|
|
7586
|
-
return /* @__PURE__ */
|
|
7063
|
+
return /* @__PURE__ */ React35.createElement("div", { ref, className: "space-y-2.5", "aria-hidden": "true" }, Array.from({ length: count }, (_, i) => {
|
|
7587
7064
|
const widthPattern = MULTI_LINE_WIDTHS[i % MULTI_LINE_WIDTHS.length];
|
|
7588
7065
|
const isLast = i === count - 1;
|
|
7589
|
-
return /* @__PURE__ */
|
|
7066
|
+
return /* @__PURE__ */ React35.createElement(
|
|
7590
7067
|
SkeletonBlock,
|
|
7591
7068
|
{
|
|
7592
7069
|
key: i,
|
|
@@ -7597,7 +7074,7 @@ var Skeleton = React36.forwardRef(
|
|
|
7597
7074
|
);
|
|
7598
7075
|
}));
|
|
7599
7076
|
}
|
|
7600
|
-
return /* @__PURE__ */
|
|
7077
|
+
return /* @__PURE__ */ React35.createElement(SkeletonBlock, { ref, variant, ...rest });
|
|
7601
7078
|
}
|
|
7602
7079
|
);
|
|
7603
7080
|
Skeleton.displayName = "Skeleton";
|
|
@@ -7645,19 +7122,6 @@ Skeleton.displayName = "Skeleton";
|
|
|
7645
7122
|
CardHeader,
|
|
7646
7123
|
CardImage,
|
|
7647
7124
|
CardTitle,
|
|
7648
|
-
Chart,
|
|
7649
|
-
ChartArea,
|
|
7650
|
-
ChartBar,
|
|
7651
|
-
ChartContainer,
|
|
7652
|
-
ChartLegend,
|
|
7653
|
-
ChartLegendContent,
|
|
7654
|
-
ChartLine,
|
|
7655
|
-
ChartPie,
|
|
7656
|
-
ChartStyle,
|
|
7657
|
-
ChartTooltip,
|
|
7658
|
-
ChartTooltipContent,
|
|
7659
|
-
ChartXAxis,
|
|
7660
|
-
ChartYAxis,
|
|
7661
7125
|
Checkbox,
|
|
7662
7126
|
Divider,
|
|
7663
7127
|
Drawer,
|
|
@@ -7821,7 +7285,6 @@ Skeleton.displayName = "Skeleton";
|
|
|
7821
7285
|
toggleVariants,
|
|
7822
7286
|
tooltipContentVariants,
|
|
7823
7287
|
useButtonGroup,
|
|
7824
|
-
useChart,
|
|
7825
7288
|
useFieldContext,
|
|
7826
7289
|
usePagination
|
|
7827
7290
|
});
|