rockin 0.0.16 → 0.0.17
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/chunk-MO55ECUZ.js +154 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.js +9 -1
- package/dist/ui/index.d.ts +28 -1
- package/dist/ui/index.js +848 -650
- package/dist/use-data-table-search-DY1swiC0.d.ts +68 -0
- package/package.json +1 -1
- package/dist/chunk-C3RGHTDI.js +0 -28
package/dist/ui/index.js
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
|
+
DataTableRoot,
|
|
4
|
+
useDataTable,
|
|
5
|
+
useDataTablePagination,
|
|
6
|
+
useDataTableRows,
|
|
7
|
+
useDataTableSearch,
|
|
3
8
|
useMediaQuery,
|
|
4
9
|
useMounted
|
|
5
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-MO55ECUZ.js";
|
|
6
11
|
import {
|
|
7
12
|
Tooltip,
|
|
8
13
|
TooltipContent,
|
|
@@ -2998,11 +3003,374 @@ function DashedSeparator({
|
|
|
2998
3003
|
);
|
|
2999
3004
|
}
|
|
3000
3005
|
|
|
3001
|
-
// src/ui/
|
|
3006
|
+
// src/ui/data-table/core/data-table.tsx
|
|
3002
3007
|
import { cn as cn26 } from "cn";
|
|
3008
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
3009
|
+
function DataTable({
|
|
3010
|
+
className,
|
|
3011
|
+
children,
|
|
3012
|
+
...props
|
|
3013
|
+
}) {
|
|
3014
|
+
return /* @__PURE__ */ jsx26(
|
|
3015
|
+
"div",
|
|
3016
|
+
{
|
|
3017
|
+
className: cn26("overflow-x-auto rounded-lg border", className),
|
|
3018
|
+
...props,
|
|
3019
|
+
children: /* @__PURE__ */ jsx26("table", { className: "w-full text-sm", children })
|
|
3020
|
+
}
|
|
3021
|
+
);
|
|
3022
|
+
}
|
|
3023
|
+
function DataTableCell({
|
|
3024
|
+
className,
|
|
3025
|
+
...props
|
|
3026
|
+
}) {
|
|
3027
|
+
return /* @__PURE__ */ jsx26("td", { className: cn26("px-3 py-2.5 align-middle", className), ...props });
|
|
3028
|
+
}
|
|
3029
|
+
function DataTableRow({
|
|
3030
|
+
className,
|
|
3031
|
+
...props
|
|
3032
|
+
}) {
|
|
3033
|
+
return /* @__PURE__ */ jsx26("tr", { className: cn26("border-b last:border-0", className), ...props });
|
|
3034
|
+
}
|
|
3035
|
+
function DataTableRows() {
|
|
3036
|
+
const { columns, pageData, getRowId } = useDataTable();
|
|
3037
|
+
return /* @__PURE__ */ jsx26("tbody", { children: pageData.map((row, rowIndex) => /* @__PURE__ */ jsx26(DataTableRow, { children: columns.map((column, columnIndex) => {
|
|
3038
|
+
const value = column.accessorFn ? column.accessorFn(row) : column.accessorKey ? row[column.accessorKey] : void 0;
|
|
3039
|
+
return /* @__PURE__ */ jsx26(
|
|
3040
|
+
DataTableCell,
|
|
3041
|
+
{
|
|
3042
|
+
children: column.cell ? column.cell(value, row, rowIndex) : String(value ?? "\u2014")
|
|
3043
|
+
},
|
|
3044
|
+
column.id ?? column.accessorKey ?? columnIndex
|
|
3045
|
+
);
|
|
3046
|
+
}) }, getRowId(row, rowIndex))) });
|
|
3047
|
+
}
|
|
3048
|
+
|
|
3049
|
+
// src/ui/data-table/core/data-table-structure.tsx
|
|
3050
|
+
import { cn as cn28 } from "cn";
|
|
3051
|
+
|
|
3052
|
+
// src/ui/skeleton.tsx
|
|
3053
|
+
import {
|
|
3054
|
+
forwardRef as forwardRef2,
|
|
3055
|
+
useLayoutEffect
|
|
3056
|
+
} from "react";
|
|
3057
|
+
import { cn as cn27 } from "cn";
|
|
3058
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
3059
|
+
var componentThemeClassName = "[--ic-background:#ffffff] [--ic-foreground:#111111] [--ic-primary:#111111] [--ic-secondary:#646b75] [--ic-surface-border:#e9edf2] [--ic-border:#e3e7ec] [--ic-card:#ffffff] [--ic-card-foreground:#111111] [--ic-muted:#f5f7fa] [--ic-muted-foreground:#6d7480] [--ic-accent:#f3f5f8] [--color-accent:var(--ic-accent)] [--color-accent-foreground:var(--ic-accent-foreground)] [--ic-accent-foreground:#111111] [--ic-input:#e3e7ec] [--ic-ring:rgba(17,17,17,0.16)] [--ic-destructive:#dc2626] [--ic-paper:#fcfcfd] [--ic-popover-foreground:#111111] [--ic-brand:#0ea5e9] [--ic-brand-soft:#bae6fd] [--ic-shadow-soft:0_18px_38px_-24px_rgba(15,23,42,0.35)] [--ic-chart-1:oklch(0.52_0.19_254)] [--ic-chart-2:oklch(0.74_0.11_232)] [--ic-chart-3:oklch(0.42_0.16_262)] [--ic-chart-4:oklch(0.84_0.07_228)] [--ic-chart-5:oklch(0.62_0.14_240)] [--color-background:var(--ic-background)] [--color-foreground:var(--ic-foreground)] [--color-primary:var(--ic-primary)] [--color-secondary:var(--ic-secondary)] [--color-border:var(--ic-border)] [--color-card:var(--ic-card)] [--color-card-foreground:var(--ic-card-foreground)] [--color-muted:var(--ic-muted)] [--color-muted-foreground:var(--ic-muted-foreground)] [--color-accent:var(--ic-accent)] [--color-accent-foreground:var(--ic-accent-foreground)] [--color-input:var(--ic-input)] [--color-ring:var(--ic-ring)] [--color-destructive:var(--ic-destructive)] [--color-paper:var(--ic-paper)] [--color-popover-foreground:var(--ic-popover-foreground)] [--color-brand:var(--ic-brand)] [--color-brand-soft:var(--ic-brand-soft)] [--color-chart-1:var(--ic-chart-1)] [--color-chart-2:var(--ic-chart-2)] [--color-chart-3:var(--ic-chart-3)] [--color-chart-4:var(--ic-chart-4)] [--color-chart-5:var(--ic-chart-5)] dark:[--ic-background:#111111] dark:[--ic-foreground:#f6f3ec] dark:[--ic-primary:#f6f3ec] dark:[--ic-secondary:#cbc6bb] dark:[--ic-surface-border:#2a2a25] dark:[--ic-border:#2b2a25] dark:[--ic-card:#111111] dark:[--ic-card-foreground:#f6f3ec] dark:[--ic-muted:#171716] dark:[--ic-muted-foreground:#9a958a] dark:[--ic-accent:#1a1a18] [--color-accent:var(--ic-accent)] [--color-accent-foreground:var(--ic-accent-foreground)] dark:[--ic-accent-foreground:#f6f3ec] dark:[--ic-input:#2b2a25] dark:[--ic-ring:rgba(246,243,236,0.18)] dark:[--ic-destructive:#f87171] dark:[--ic-paper:#171716] dark:[--ic-popover-foreground:#f6f3ec] dark:[--ic-brand:#38bdf8] dark:[--ic-brand-soft:#0c4a6e] dark:[--ic-shadow-soft:0_20px_44px_-28px_rgba(0,0,0,0.6)] dark:[--ic-chart-1:oklch(0.68_0.17_250)] dark:[--ic-chart-2:oklch(0.82_0.09_225)] dark:[--ic-chart-3:oklch(0.58_0.15_260)] dark:[--ic-chart-4:oklch(0.75_0.12_235)] dark:[--ic-chart-5:oklch(0.88_0.06_220)]";
|
|
3060
|
+
var STYLE_ID = "iconiq-skeleton-styles";
|
|
3061
|
+
var SKELETON_CSS = `
|
|
3062
|
+
@keyframes iconiq-skeleton-shimmer {
|
|
3063
|
+
to {
|
|
3064
|
+
transform: translateX(200%);
|
|
3065
|
+
}
|
|
3066
|
+
}
|
|
3067
|
+
|
|
3068
|
+
@keyframes iconiq-skeleton-fade {
|
|
3069
|
+
0%,
|
|
3070
|
+
100% {
|
|
3071
|
+
opacity: 1;
|
|
3072
|
+
}
|
|
3073
|
+
|
|
3074
|
+
50% {
|
|
3075
|
+
opacity: 0.38;
|
|
3076
|
+
}
|
|
3077
|
+
}
|
|
3078
|
+
|
|
3079
|
+
.iconiq-skeleton-surface {
|
|
3080
|
+
background-color: #f5f7fa;
|
|
3081
|
+
background-color: var(--ic-muted);
|
|
3082
|
+
}
|
|
3083
|
+
|
|
3084
|
+
.iconiq-skeleton-shimmer {
|
|
3085
|
+
background: linear-gradient(
|
|
3086
|
+
90deg,
|
|
3087
|
+
transparent 0%,
|
|
3088
|
+
rgba(17, 17, 17, 0.06) 50%,
|
|
3089
|
+
transparent 100%
|
|
3090
|
+
);
|
|
3091
|
+
background: linear-gradient(
|
|
3092
|
+
90deg,
|
|
3093
|
+
transparent 0%,
|
|
3094
|
+
color-mix(in srgb, var(--ic-foreground) 6%, transparent) 50%,
|
|
3095
|
+
transparent 100%
|
|
3096
|
+
);
|
|
3097
|
+
animation: iconiq-skeleton-shimmer var(--iconiq-skeleton-duration, 1.6s)
|
|
3098
|
+
ease-in-out infinite;
|
|
3099
|
+
}
|
|
3100
|
+
|
|
3101
|
+
.iconiq-skeleton-fade-root {
|
|
3102
|
+
animation: iconiq-skeleton-fade var(--iconiq-skeleton-duration, 2.4s)
|
|
3103
|
+
ease-in-out infinite;
|
|
3104
|
+
}
|
|
3105
|
+
|
|
3106
|
+
@media (prefers-reduced-motion: reduce) {
|
|
3107
|
+
.iconiq-skeleton-shimmer,
|
|
3108
|
+
.iconiq-skeleton-fade-root {
|
|
3109
|
+
animation: none;
|
|
3110
|
+
}
|
|
3111
|
+
}
|
|
3112
|
+
`;
|
|
3113
|
+
var skeletonRoundedClasses = {
|
|
3114
|
+
none: "rounded-none",
|
|
3115
|
+
sm: "rounded-sm",
|
|
3116
|
+
md: "rounded-md",
|
|
3117
|
+
lg: "rounded-lg",
|
|
3118
|
+
full: "rounded-full"
|
|
3119
|
+
};
|
|
3120
|
+
var skeletonVariantDefaultDuration = {
|
|
3121
|
+
shimmer: 1.6,
|
|
3122
|
+
fade: 2.4
|
|
3123
|
+
};
|
|
3124
|
+
function getSkeletonVariantDuration(variant, duration = 1.6) {
|
|
3125
|
+
if (duration !== 1.6) {
|
|
3126
|
+
return duration;
|
|
3127
|
+
}
|
|
3128
|
+
return skeletonVariantDefaultDuration[variant];
|
|
3129
|
+
}
|
|
3130
|
+
function ensureSkeletonStyles() {
|
|
3131
|
+
if (typeof document === "undefined") {
|
|
3132
|
+
return;
|
|
3133
|
+
}
|
|
3134
|
+
let style = document.getElementById(STYLE_ID);
|
|
3135
|
+
if (!style) {
|
|
3136
|
+
style = document.createElement("style");
|
|
3137
|
+
style.id = STYLE_ID;
|
|
3138
|
+
document.head.appendChild(style);
|
|
3139
|
+
}
|
|
3140
|
+
style.textContent = SKELETON_CSS;
|
|
3141
|
+
}
|
|
3142
|
+
function resolveSkeletonA11yProps({
|
|
3143
|
+
animate: animate2 = true,
|
|
3144
|
+
decorative = true,
|
|
3145
|
+
label
|
|
3146
|
+
}) {
|
|
3147
|
+
if (decorative || label === null) {
|
|
3148
|
+
return { "aria-hidden": true };
|
|
3149
|
+
}
|
|
3150
|
+
return {
|
|
3151
|
+
"aria-label": label ?? (animate2 ? "Loading" : "Placeholder"),
|
|
3152
|
+
"aria-live": "polite",
|
|
3153
|
+
role: "status"
|
|
3154
|
+
};
|
|
3155
|
+
}
|
|
3156
|
+
var Skeleton = forwardRef2(function Skeleton2({
|
|
3157
|
+
animate: animate2 = true,
|
|
3158
|
+
className,
|
|
3159
|
+
decorative = true,
|
|
3160
|
+
duration = 1.6,
|
|
3161
|
+
label,
|
|
3162
|
+
rounded = "md",
|
|
3163
|
+
style,
|
|
3164
|
+
variant = "shimmer",
|
|
3165
|
+
...props
|
|
3166
|
+
}, ref) {
|
|
3167
|
+
const variantDuration = getSkeletonVariantDuration(variant, duration);
|
|
3168
|
+
const showShimmer = animate2 && variant === "shimmer";
|
|
3169
|
+
const showFade = animate2 && variant === "fade";
|
|
3170
|
+
useLayoutEffect(() => {
|
|
3171
|
+
if (animate2) {
|
|
3172
|
+
ensureSkeletonStyles();
|
|
3173
|
+
}
|
|
3174
|
+
}, [animate2]);
|
|
3175
|
+
const animatedStyle = showShimmer || showFade ? {
|
|
3176
|
+
...style,
|
|
3177
|
+
"--iconiq-skeleton-duration": `${variantDuration}s`
|
|
3178
|
+
} : style;
|
|
3179
|
+
return /* @__PURE__ */ jsx27(
|
|
3180
|
+
"div",
|
|
3181
|
+
{
|
|
3182
|
+
className: cn27(
|
|
3183
|
+
componentThemeClassName,
|
|
3184
|
+
"iconiq-skeleton-surface relative block h-4 w-full overflow-hidden",
|
|
3185
|
+
showFade && "iconiq-skeleton-fade-root",
|
|
3186
|
+
skeletonRoundedClasses[rounded],
|
|
3187
|
+
className
|
|
3188
|
+
),
|
|
3189
|
+
ref,
|
|
3190
|
+
style: animatedStyle,
|
|
3191
|
+
...resolveSkeletonA11yProps({ animate: animate2, decorative, label }),
|
|
3192
|
+
...props,
|
|
3193
|
+
children: showShimmer ? /* @__PURE__ */ jsx27(
|
|
3194
|
+
"span",
|
|
3195
|
+
{
|
|
3196
|
+
"aria-hidden": "true",
|
|
3197
|
+
className: "iconiq-skeleton-shimmer pointer-events-none absolute inset-0 -translate-x-full"
|
|
3198
|
+
}
|
|
3199
|
+
) : null
|
|
3200
|
+
}
|
|
3201
|
+
);
|
|
3202
|
+
});
|
|
3203
|
+
Skeleton.displayName = "Skeleton";
|
|
3204
|
+
function SkeletonAvatar({
|
|
3205
|
+
className,
|
|
3206
|
+
...props
|
|
3207
|
+
}) {
|
|
3208
|
+
return /* @__PURE__ */ jsx27(
|
|
3209
|
+
Skeleton,
|
|
3210
|
+
{
|
|
3211
|
+
className: cn27("size-10", className),
|
|
3212
|
+
decorative: true,
|
|
3213
|
+
rounded: "full",
|
|
3214
|
+
...props
|
|
3215
|
+
}
|
|
3216
|
+
);
|
|
3217
|
+
}
|
|
3218
|
+
function SkeletonText({ className, ...props }) {
|
|
3219
|
+
return /* @__PURE__ */ jsx27(Skeleton, { className: cn27("h-3", className), decorative: true, ...props });
|
|
3220
|
+
}
|
|
3221
|
+
function SkeletonButton({
|
|
3222
|
+
className,
|
|
3223
|
+
...props
|
|
3224
|
+
}) {
|
|
3225
|
+
return /* @__PURE__ */ jsx27(
|
|
3226
|
+
Skeleton,
|
|
3227
|
+
{
|
|
3228
|
+
className: cn27("h-9 w-24", className),
|
|
3229
|
+
decorative: true,
|
|
3230
|
+
rounded: "lg",
|
|
3231
|
+
...props
|
|
3232
|
+
}
|
|
3233
|
+
);
|
|
3234
|
+
}
|
|
3235
|
+
var ShimmerSkeleton = Skeleton;
|
|
3236
|
+
|
|
3237
|
+
// src/ui/data-table/core/data-table-structure.tsx
|
|
3238
|
+
import { Fragment as Fragment2, jsx as jsx28, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
3239
|
+
function DataTableHeader({ className }) {
|
|
3240
|
+
const { columns } = useDataTable();
|
|
3241
|
+
return /* @__PURE__ */ jsx28("thead", { className: cn28("bg-muted/60", className), children: /* @__PURE__ */ jsx28(DataTableRow, { children: columns.map((column, index) => /* @__PURE__ */ jsx28(
|
|
3242
|
+
"th",
|
|
3243
|
+
{
|
|
3244
|
+
className: "px-3 py-2.5 text-left text-xs font-medium text-muted-foreground",
|
|
3245
|
+
children: typeof column.header === "function" ? column.header(column) : column.header
|
|
3246
|
+
},
|
|
3247
|
+
column.id ?? column.accessorKey ?? index
|
|
3248
|
+
)) }) });
|
|
3249
|
+
}
|
|
3250
|
+
function DataTableBody({ children }) {
|
|
3251
|
+
return /* @__PURE__ */ jsxs14(Fragment2, { children: [
|
|
3252
|
+
/* @__PURE__ */ jsx28(DataTableRows, {}),
|
|
3253
|
+
children
|
|
3254
|
+
] });
|
|
3255
|
+
}
|
|
3256
|
+
function DataTableSkeleton({ rows = 3 }) {
|
|
3257
|
+
const { columns, isLoading } = useDataTable();
|
|
3258
|
+
if (!isLoading) return null;
|
|
3259
|
+
return /* @__PURE__ */ jsx28("tbody", { "aria-label": "Loading rows", children: Array.from({ length: rows }, (_, rowIndex) => /* @__PURE__ */ jsx28(DataTableRow, { children: columns.map((column, columnIndex) => /* @__PURE__ */ jsx28(DataTableCell, { children: /* @__PURE__ */ jsx28(Skeleton, { className: "h-4" }) }, column.id ?? column.accessorKey ?? columnIndex)) }, rowIndex)) });
|
|
3260
|
+
}
|
|
3261
|
+
function DataTableEmptyBody({
|
|
3262
|
+
children = "No results found."
|
|
3263
|
+
}) {
|
|
3264
|
+
const { pageData, isLoading } = useDataTable();
|
|
3265
|
+
if (isLoading || pageData.length > 0) return null;
|
|
3266
|
+
return /* @__PURE__ */ jsx28("tbody", { children: /* @__PURE__ */ jsx28(DataTableRow, { children: /* @__PURE__ */ jsx28(
|
|
3267
|
+
DataTableCell,
|
|
3268
|
+
{
|
|
3269
|
+
className: "h-24 text-center text-muted-foreground",
|
|
3270
|
+
colSpan: 100,
|
|
3271
|
+
children
|
|
3272
|
+
}
|
|
3273
|
+
) }) });
|
|
3274
|
+
}
|
|
3275
|
+
|
|
3276
|
+
// src/ui/data-table/components/data-table-pagination.tsx
|
|
3277
|
+
import { ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight2 } from "lucide-react";
|
|
3278
|
+
import { jsx as jsx29, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3279
|
+
function DataTablePagination() {
|
|
3280
|
+
const { totalRows } = useDataTableRows();
|
|
3281
|
+
const {
|
|
3282
|
+
pageIndex,
|
|
3283
|
+
pageSize,
|
|
3284
|
+
pageCount,
|
|
3285
|
+
canPreviousPage,
|
|
3286
|
+
canNextPage,
|
|
3287
|
+
previousPage,
|
|
3288
|
+
nextPage
|
|
3289
|
+
} = useDataTablePagination();
|
|
3290
|
+
const first = totalRows === 0 ? 0 : pageIndex * pageSize + 1;
|
|
3291
|
+
const last = Math.min((pageIndex + 1) * pageSize, totalRows);
|
|
3292
|
+
return /* @__PURE__ */ jsxs15("div", { className: "flex items-center justify-between gap-3 text-sm text-muted-foreground", children: [
|
|
3293
|
+
/* @__PURE__ */ jsx29("span", { children: totalRows ? `${first}\u2013${last} of ${totalRows}` : "0 results" }),
|
|
3294
|
+
/* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-1", children: [
|
|
3295
|
+
/* @__PURE__ */ jsx29(
|
|
3296
|
+
Button,
|
|
3297
|
+
{
|
|
3298
|
+
"aria-label": "Previous page",
|
|
3299
|
+
disabled: !canPreviousPage,
|
|
3300
|
+
onClick: previousPage,
|
|
3301
|
+
size: "icon-sm",
|
|
3302
|
+
variant: "outline",
|
|
3303
|
+
children: /* @__PURE__ */ jsx29(ChevronLeft2, {})
|
|
3304
|
+
}
|
|
3305
|
+
),
|
|
3306
|
+
/* @__PURE__ */ jsxs15("span", { className: "min-w-16 text-center text-xs", children: [
|
|
3307
|
+
"Page ",
|
|
3308
|
+
pageIndex + 1,
|
|
3309
|
+
" of ",
|
|
3310
|
+
pageCount
|
|
3311
|
+
] }),
|
|
3312
|
+
/* @__PURE__ */ jsx29(
|
|
3313
|
+
Button,
|
|
3314
|
+
{
|
|
3315
|
+
"aria-label": "Next page",
|
|
3316
|
+
disabled: !canNextPage,
|
|
3317
|
+
onClick: nextPage,
|
|
3318
|
+
size: "icon-sm",
|
|
3319
|
+
variant: "outline",
|
|
3320
|
+
children: /* @__PURE__ */ jsx29(ChevronRight2, {})
|
|
3321
|
+
}
|
|
3322
|
+
)
|
|
3323
|
+
] })
|
|
3324
|
+
] });
|
|
3325
|
+
}
|
|
3326
|
+
|
|
3327
|
+
// src/ui/data-table/components/data-table-search-filter.tsx
|
|
3328
|
+
import { Search } from "lucide-react";
|
|
3329
|
+
import { jsx as jsx30, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3330
|
+
function DataTableSearchFilter({
|
|
3331
|
+
placeholder = "Search...",
|
|
3332
|
+
className
|
|
3333
|
+
}) {
|
|
3334
|
+
const { search, setSearch } = useDataTableSearch();
|
|
3335
|
+
return /* @__PURE__ */ jsxs16("div", { className: `relative w-full max-w-sm ${className ?? ""}`, children: [
|
|
3336
|
+
/* @__PURE__ */ jsx30(Search, { className: "pointer-events-none absolute top-1/2 left-2.5 size-4 -translate-y-1/2 text-muted-foreground" }),
|
|
3337
|
+
/* @__PURE__ */ jsx30(
|
|
3338
|
+
Input,
|
|
3339
|
+
{
|
|
3340
|
+
"aria-label": placeholder,
|
|
3341
|
+
className: "pl-8",
|
|
3342
|
+
onChange: (event) => setSearch(event.target.value),
|
|
3343
|
+
placeholder,
|
|
3344
|
+
value: search
|
|
3345
|
+
}
|
|
3346
|
+
)
|
|
3347
|
+
] });
|
|
3348
|
+
}
|
|
3349
|
+
|
|
3350
|
+
// src/ui/data-table/components/data-table-toolbar-section.tsx
|
|
3351
|
+
import { cn as cn29 } from "cn";
|
|
3352
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
3353
|
+
function DataTableToolbarSection({
|
|
3354
|
+
className,
|
|
3355
|
+
...props
|
|
3356
|
+
}) {
|
|
3357
|
+
return /* @__PURE__ */ jsx31(
|
|
3358
|
+
"div",
|
|
3359
|
+
{
|
|
3360
|
+
className: cn29(
|
|
3361
|
+
"flex flex-wrap items-center justify-between gap-2",
|
|
3362
|
+
className
|
|
3363
|
+
),
|
|
3364
|
+
...props
|
|
3365
|
+
}
|
|
3366
|
+
);
|
|
3367
|
+
}
|
|
3368
|
+
|
|
3369
|
+
// src/ui/dock.tsx
|
|
3370
|
+
import { cn as cn30 } from "cn";
|
|
3003
3371
|
import { motion as motion4 } from "motion/react";
|
|
3004
3372
|
import * as React8 from "react";
|
|
3005
|
-
import { jsx as
|
|
3373
|
+
import { jsx as jsx32, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3006
3374
|
var floatingAnimation = {
|
|
3007
3375
|
initial: { y: 0 },
|
|
3008
3376
|
animate: {
|
|
@@ -3016,24 +3384,24 @@ var floatingAnimation = {
|
|
|
3016
3384
|
};
|
|
3017
3385
|
var DockIconButton = React8.forwardRef(
|
|
3018
3386
|
({ icon: Icon, label, onClick, className }, ref) => {
|
|
3019
|
-
return /* @__PURE__ */
|
|
3387
|
+
return /* @__PURE__ */ jsxs17(
|
|
3020
3388
|
motion4.button,
|
|
3021
3389
|
{
|
|
3022
3390
|
ref,
|
|
3023
3391
|
whileHover: { scale: 1.1, y: -2 },
|
|
3024
3392
|
whileTap: { scale: 0.95 },
|
|
3025
3393
|
onClick,
|
|
3026
|
-
className:
|
|
3394
|
+
className: cn30(
|
|
3027
3395
|
"group relative rounded-lg p-3",
|
|
3028
3396
|
"transition-colors hover:bg-secondary",
|
|
3029
3397
|
className
|
|
3030
3398
|
),
|
|
3031
3399
|
children: [
|
|
3032
|
-
/* @__PURE__ */
|
|
3033
|
-
/* @__PURE__ */
|
|
3400
|
+
/* @__PURE__ */ jsx32(Icon, { className: "h-5 w-5 text-foreground" }),
|
|
3401
|
+
/* @__PURE__ */ jsx32(
|
|
3034
3402
|
"span",
|
|
3035
3403
|
{
|
|
3036
|
-
className:
|
|
3404
|
+
className: cn30(
|
|
3037
3405
|
"absolute -top-8 left-1/2 -translate-x-1/2",
|
|
3038
3406
|
"rounded px-2 py-1 text-xs",
|
|
3039
3407
|
"bg-background text-popover-foreground",
|
|
@@ -3051,27 +3419,27 @@ var DockIconButton = React8.forwardRef(
|
|
|
3051
3419
|
DockIconButton.displayName = "DockIconButton";
|
|
3052
3420
|
var Dock = React8.forwardRef(
|
|
3053
3421
|
({ items, className }, ref) => {
|
|
3054
|
-
return /* @__PURE__ */
|
|
3422
|
+
return /* @__PURE__ */ jsx32(
|
|
3055
3423
|
"div",
|
|
3056
3424
|
{
|
|
3057
3425
|
ref,
|
|
3058
|
-
className:
|
|
3426
|
+
className: cn30(
|
|
3059
3427
|
"flex h-64 w-full items-center justify-center p-2",
|
|
3060
3428
|
className
|
|
3061
3429
|
),
|
|
3062
|
-
children: /* @__PURE__ */
|
|
3430
|
+
children: /* @__PURE__ */ jsx32("div", { className: "relative flex h-64 w-full max-w-4xl items-center justify-center rounded-2xl", children: /* @__PURE__ */ jsx32(
|
|
3063
3431
|
motion4.div,
|
|
3064
3432
|
{
|
|
3065
3433
|
initial: "initial",
|
|
3066
3434
|
animate: "animate",
|
|
3067
3435
|
variants: floatingAnimation,
|
|
3068
|
-
className:
|
|
3436
|
+
className: cn30(
|
|
3069
3437
|
"flex items-center gap-1 rounded-2xl p-2",
|
|
3070
3438
|
"border shadow-lg backdrop-blur-lg",
|
|
3071
3439
|
"border-border bg-background/90",
|
|
3072
3440
|
"transition-shadow duration-300 hover:shadow-xl"
|
|
3073
3441
|
),
|
|
3074
|
-
children: items.map((item) => /* @__PURE__ */
|
|
3442
|
+
children: items.map((item) => /* @__PURE__ */ jsx32(DockIconButton, { ...item }, item.label))
|
|
3075
3443
|
}
|
|
3076
3444
|
) })
|
|
3077
3445
|
}
|
|
@@ -3083,8 +3451,8 @@ Dock.displayName = "Dock";
|
|
|
3083
3451
|
// src/ui/drawer.tsx
|
|
3084
3452
|
import { Drawer as DrawerPrimitive } from "@base-ui/react/drawer";
|
|
3085
3453
|
import * as React9 from "react";
|
|
3086
|
-
import { cn as
|
|
3087
|
-
import { jsx as
|
|
3454
|
+
import { cn as cn31 } from "cn";
|
|
3455
|
+
import { jsx as jsx33, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3088
3456
|
var DrawerContext = React9.createContext(null);
|
|
3089
3457
|
function useDrawer() {
|
|
3090
3458
|
const context = React9.useContext(DrawerContext);
|
|
@@ -3111,7 +3479,7 @@ function Drawer({
|
|
|
3111
3479
|
}),
|
|
3112
3480
|
[hasSnapPoints, modal, resolvedShowSwipeHandle, swipeDirection]
|
|
3113
3481
|
);
|
|
3114
|
-
return /* @__PURE__ */
|
|
3482
|
+
return /* @__PURE__ */ jsx33(DrawerContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx33(
|
|
3115
3483
|
DrawerPrimitive.Root,
|
|
3116
3484
|
{
|
|
3117
3485
|
"data-slot": "drawer",
|
|
@@ -3123,23 +3491,23 @@ function Drawer({
|
|
|
3123
3491
|
) });
|
|
3124
3492
|
}
|
|
3125
3493
|
function DrawerTrigger({ ...props }) {
|
|
3126
|
-
return /* @__PURE__ */
|
|
3494
|
+
return /* @__PURE__ */ jsx33(DrawerPrimitive.Trigger, { "data-slot": "drawer-trigger", ...props });
|
|
3127
3495
|
}
|
|
3128
3496
|
function DrawerPortal({ ...props }) {
|
|
3129
|
-
return /* @__PURE__ */
|
|
3497
|
+
return /* @__PURE__ */ jsx33(DrawerPrimitive.Portal, { "data-slot": "drawer-portal", ...props });
|
|
3130
3498
|
}
|
|
3131
3499
|
function DrawerClose({ ...props }) {
|
|
3132
|
-
return /* @__PURE__ */
|
|
3500
|
+
return /* @__PURE__ */ jsx33(DrawerPrimitive.Close, { "data-slot": "drawer-close", ...props });
|
|
3133
3501
|
}
|
|
3134
3502
|
function DrawerOverlay({
|
|
3135
3503
|
className,
|
|
3136
3504
|
...props
|
|
3137
3505
|
}) {
|
|
3138
|
-
return /* @__PURE__ */
|
|
3506
|
+
return /* @__PURE__ */ jsx33(
|
|
3139
3507
|
DrawerPrimitive.Backdrop,
|
|
3140
3508
|
{
|
|
3141
3509
|
"data-slot": "drawer-overlay",
|
|
3142
|
-
className:
|
|
3510
|
+
className: cn31(
|
|
3143
3511
|
"ease-out-fluid fixed inset-0 z-50 min-h-dvh bg-black/10 opacity-[max(var(--drawer-overlay-min-opacity,0),calc(1-var(--drawer-swipe-progress)))] transition-opacity duration-450 select-none data-ending-style:pointer-events-none data-ending-style:opacity-0 data-ending-style:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-snap-points:[--drawer-overlay-min-opacity:0.5] data-starting-style:opacity-0 data-swiping:duration-0 supports-backdrop-filter:backdrop-blur-xs supports-[-webkit-touch-callout:none]:absolute",
|
|
3144
3512
|
className
|
|
3145
3513
|
),
|
|
@@ -3151,12 +3519,12 @@ function DrawerSwipeHandle({
|
|
|
3151
3519
|
className,
|
|
3152
3520
|
...props
|
|
3153
3521
|
}) {
|
|
3154
|
-
return /* @__PURE__ */
|
|
3522
|
+
return /* @__PURE__ */ jsx33(
|
|
3155
3523
|
"div",
|
|
3156
3524
|
{
|
|
3157
3525
|
"data-slot": "drawer-swipe-handle",
|
|
3158
3526
|
"aria-hidden": "true",
|
|
3159
|
-
className:
|
|
3527
|
+
className: cn31(
|
|
3160
3528
|
"flex shrink-0 cursor-grab transition-opacity duration-200 group-data-nested-drawer-open/drawer-popup:opacity-0 group-data-nested-drawer-swiping/drawer-popup:opacity-100 group-data-[swipe-axis=x]/drawer-popup:h-full group-data-[swipe-axis=x]/drawer-popup:w-3 group-data-[swipe-axis=x]/drawer-popup:items-center group-data-[swipe-axis=y]/drawer-popup:h-3 group-data-[swipe-axis=y]/drawer-popup:w-full group-data-[swipe-axis=y]/drawer-popup:justify-center group-data-[swipe-direction=down]/drawer-popup:items-end group-data-[swipe-direction=left]/drawer-popup:order-last group-data-[swipe-direction=left]/drawer-popup:justify-start group-data-[swipe-direction=right]/drawer-popup:justify-end group-data-[swipe-direction=up]/drawer-popup:order-last group-data-[swipe-direction=up]/drawer-popup:items-start after:block after:shrink-0 after:rounded-full after:bg-muted group-data-[swipe-axis=x]/drawer-popup:after:h-24 group-data-[swipe-axis=x]/drawer-popup:after:w-1 group-data-[swipe-axis=y]/drawer-popup:after:h-1 group-data-[swipe-axis=y]/drawer-popup:after:w-20 active:cursor-grabbing",
|
|
3161
3529
|
className
|
|
3162
3530
|
),
|
|
@@ -3171,21 +3539,21 @@ function DrawerContent({
|
|
|
3171
3539
|
}) {
|
|
3172
3540
|
const { hasSnapPoints, modal, showSwipeHandle, swipeDirection } = useDrawer();
|
|
3173
3541
|
const swipeAxis = swipeDirection === "down" || swipeDirection === "up" ? "y" : "x";
|
|
3174
|
-
return /* @__PURE__ */
|
|
3175
|
-
modal === true && /* @__PURE__ */
|
|
3176
|
-
/* @__PURE__ */
|
|
3542
|
+
return /* @__PURE__ */ jsxs18(DrawerPortal, { "data-slot": "drawer-portal", children: [
|
|
3543
|
+
modal === true && /* @__PURE__ */ jsx33(DrawerOverlay, { "data-snap-points": hasSnapPoints ? "" : void 0 }),
|
|
3544
|
+
/* @__PURE__ */ jsx33(
|
|
3177
3545
|
DrawerPrimitive.Viewport,
|
|
3178
3546
|
{
|
|
3179
3547
|
"data-slot": "drawer-viewport",
|
|
3180
3548
|
"data-modal": modal,
|
|
3181
3549
|
className: "pointer-events-none fixed inset-0 z-50 select-none data-[modal=true]:pointer-events-auto",
|
|
3182
|
-
children: /* @__PURE__ */
|
|
3550
|
+
children: /* @__PURE__ */ jsxs18(
|
|
3183
3551
|
DrawerPrimitive.Popup,
|
|
3184
3552
|
{
|
|
3185
3553
|
"data-slot": "drawer-popup",
|
|
3186
3554
|
"data-swipe-axis": swipeAxis,
|
|
3187
3555
|
"data-snap-points": hasSnapPoints ? "" : void 0,
|
|
3188
|
-
className:
|
|
3556
|
+
className: cn31(
|
|
3189
3557
|
// Base.
|
|
3190
3558
|
"group/drawer-popup pointer-events-auto fixed z-50 m-(--drawer-inset,0px) flex h-(--drawer-content-height) max-h-(--drawer-content-max-height,none) min-h-0 w-(--drawer-content-width,auto) transform-[translate3d(var(--translate-x,0px),var(--translate-y,0px),0)_scale(var(--stack-scale))] flex-col rounded-4xl border bg-card text-sm text-popover-foreground transition-[transform,height,opacity,filter] duration-450 ease-[cubic-bezier(0.22,1,0.36,1)] will-change-transform outline-none select-none [--drawer-bleed-background:transparent] [--drawer-inset:--spacing(2)] [interpolate-size:allow-keywords] max-md:pb-(--app-safe-bottom) md:pb-0 dark:border-border",
|
|
3191
3559
|
// Nested.
|
|
@@ -3214,12 +3582,12 @@ function DrawerContent({
|
|
|
3214
3582
|
),
|
|
3215
3583
|
...props,
|
|
3216
3584
|
children: [
|
|
3217
|
-
showSwipeHandle && /* @__PURE__ */
|
|
3218
|
-
/* @__PURE__ */
|
|
3585
|
+
showSwipeHandle && /* @__PURE__ */ jsx33(DrawerSwipeHandle, {}),
|
|
3586
|
+
/* @__PURE__ */ jsx33(
|
|
3219
3587
|
DrawerPrimitive.Content,
|
|
3220
3588
|
{
|
|
3221
3589
|
"data-slot": "drawer-content",
|
|
3222
|
-
className:
|
|
3590
|
+
className: cn31(
|
|
3223
3591
|
"flex min-h-0 flex-1 flex-col overflow-hidden overscroll-contain rounded-[inherit] transition-opacity duration-300 ease-[cubic-bezier(0.45,1.005,0,1.005)] select-text group-data-nested-drawer-open/drawer-popup:opacity-0 group-data-nested-drawer-swiping/drawer-popup:opacity-100 group-data-swiping/drawer-popup:select-none"
|
|
3224
3592
|
),
|
|
3225
3593
|
children
|
|
@@ -3233,11 +3601,11 @@ function DrawerContent({
|
|
|
3233
3601
|
] });
|
|
3234
3602
|
}
|
|
3235
3603
|
function DrawerHeader({ className, ...props }) {
|
|
3236
|
-
return /* @__PURE__ */
|
|
3604
|
+
return /* @__PURE__ */ jsx33(
|
|
3237
3605
|
"div",
|
|
3238
3606
|
{
|
|
3239
3607
|
"data-slot": "drawer-header",
|
|
3240
|
-
className:
|
|
3608
|
+
className: cn31(
|
|
3241
3609
|
"flex shrink-0 flex-col gap-0.5 p-4 pb-0 group-data-[swipe-axis=y]/drawer-popup:text-center md:gap-1.5 md:text-left",
|
|
3242
3610
|
className
|
|
3243
3611
|
),
|
|
@@ -3246,21 +3614,21 @@ function DrawerHeader({ className, ...props }) {
|
|
|
3246
3614
|
);
|
|
3247
3615
|
}
|
|
3248
3616
|
function DrawerFooter({ className, ...props }) {
|
|
3249
|
-
return /* @__PURE__ */
|
|
3617
|
+
return /* @__PURE__ */ jsx33(
|
|
3250
3618
|
"div",
|
|
3251
3619
|
{
|
|
3252
3620
|
"data-slot": "drawer-footer",
|
|
3253
|
-
className:
|
|
3621
|
+
className: cn31("mt-auto flex shrink-0 flex-col gap-2 p-4 pt-0", className),
|
|
3254
3622
|
...props
|
|
3255
3623
|
}
|
|
3256
3624
|
);
|
|
3257
3625
|
}
|
|
3258
3626
|
function DrawerTitle({ className, ...props }) {
|
|
3259
|
-
return /* @__PURE__ */
|
|
3627
|
+
return /* @__PURE__ */ jsx33(
|
|
3260
3628
|
DrawerPrimitive.Title,
|
|
3261
3629
|
{
|
|
3262
3630
|
"data-slot": "drawer-title",
|
|
3263
|
-
className:
|
|
3631
|
+
className: cn31(
|
|
3264
3632
|
"font-heading text-base font-medium text-foreground",
|
|
3265
3633
|
className
|
|
3266
3634
|
),
|
|
@@ -3272,11 +3640,11 @@ function DrawerDescription({
|
|
|
3272
3640
|
className,
|
|
3273
3641
|
...props
|
|
3274
3642
|
}) {
|
|
3275
|
-
return /* @__PURE__ */
|
|
3643
|
+
return /* @__PURE__ */ jsx33(
|
|
3276
3644
|
DrawerPrimitive.Description,
|
|
3277
3645
|
{
|
|
3278
3646
|
"data-slot": "drawer-description",
|
|
3279
|
-
className:
|
|
3647
|
+
className: cn31("text-sm text-balance text-muted-foreground", className),
|
|
3280
3648
|
...props
|
|
3281
3649
|
}
|
|
3282
3650
|
);
|
|
@@ -3284,17 +3652,17 @@ function DrawerDescription({
|
|
|
3284
3652
|
|
|
3285
3653
|
// src/ui/dropdown-menu.tsx
|
|
3286
3654
|
import { Menu as MenuPrimitive } from "@base-ui/react/menu";
|
|
3287
|
-
import { cn as
|
|
3655
|
+
import { cn as cn32 } from "cn";
|
|
3288
3656
|
import { CheckIcon, ChevronRightIcon } from "lucide-react";
|
|
3289
|
-
import { jsx as
|
|
3657
|
+
import { jsx as jsx34, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3290
3658
|
function DropdownMenu({ ...props }) {
|
|
3291
|
-
return /* @__PURE__ */
|
|
3659
|
+
return /* @__PURE__ */ jsx34(MenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
3292
3660
|
}
|
|
3293
3661
|
function DropdownMenuPortal({ ...props }) {
|
|
3294
|
-
return /* @__PURE__ */
|
|
3662
|
+
return /* @__PURE__ */ jsx34(MenuPrimitive.Portal, { "data-slot": "dropdown-menu-portal", ...props });
|
|
3295
3663
|
}
|
|
3296
3664
|
function DropdownMenuTrigger({ ...props }) {
|
|
3297
|
-
return /* @__PURE__ */
|
|
3665
|
+
return /* @__PURE__ */ jsx34(MenuPrimitive.Trigger, { "data-slot": "dropdown-menu-trigger", ...props });
|
|
3298
3666
|
}
|
|
3299
3667
|
function DropdownMenuContent({
|
|
3300
3668
|
align = "start",
|
|
@@ -3304,7 +3672,7 @@ function DropdownMenuContent({
|
|
|
3304
3672
|
className,
|
|
3305
3673
|
...props
|
|
3306
3674
|
}) {
|
|
3307
|
-
return /* @__PURE__ */
|
|
3675
|
+
return /* @__PURE__ */ jsx34(MenuPrimitive.Portal, { children: /* @__PURE__ */ jsx34(
|
|
3308
3676
|
MenuPrimitive.Positioner,
|
|
3309
3677
|
{
|
|
3310
3678
|
className: "isolate z-50 outline-none",
|
|
@@ -3312,11 +3680,11 @@ function DropdownMenuContent({
|
|
|
3312
3680
|
alignOffset,
|
|
3313
3681
|
side,
|
|
3314
3682
|
sideOffset,
|
|
3315
|
-
children: /* @__PURE__ */
|
|
3683
|
+
children: /* @__PURE__ */ jsx34(
|
|
3316
3684
|
MenuPrimitive.Popup,
|
|
3317
3685
|
{
|
|
3318
3686
|
"data-slot": "dropdown-menu-content",
|
|
3319
|
-
className:
|
|
3687
|
+
className: cn32(
|
|
3320
3688
|
"z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-background p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
3321
3689
|
className
|
|
3322
3690
|
),
|
|
@@ -3327,19 +3695,19 @@ function DropdownMenuContent({
|
|
|
3327
3695
|
) });
|
|
3328
3696
|
}
|
|
3329
3697
|
function DropdownMenuGroup({ ...props }) {
|
|
3330
|
-
return /* @__PURE__ */
|
|
3698
|
+
return /* @__PURE__ */ jsx34(MenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props });
|
|
3331
3699
|
}
|
|
3332
3700
|
function DropdownMenuLabel({
|
|
3333
3701
|
className,
|
|
3334
3702
|
inset,
|
|
3335
3703
|
...props
|
|
3336
3704
|
}) {
|
|
3337
|
-
return /* @__PURE__ */
|
|
3705
|
+
return /* @__PURE__ */ jsx34(
|
|
3338
3706
|
MenuPrimitive.GroupLabel,
|
|
3339
3707
|
{
|
|
3340
3708
|
"data-slot": "dropdown-menu-label",
|
|
3341
3709
|
"data-inset": inset,
|
|
3342
|
-
className:
|
|
3710
|
+
className: cn32(
|
|
3343
3711
|
"px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7",
|
|
3344
3712
|
className
|
|
3345
3713
|
),
|
|
@@ -3353,13 +3721,13 @@ function DropdownMenuItem({
|
|
|
3353
3721
|
variant = "default",
|
|
3354
3722
|
...props
|
|
3355
3723
|
}) {
|
|
3356
|
-
return /* @__PURE__ */
|
|
3724
|
+
return /* @__PURE__ */ jsx34(
|
|
3357
3725
|
MenuPrimitive.Item,
|
|
3358
3726
|
{
|
|
3359
3727
|
"data-slot": "dropdown-menu-item",
|
|
3360
3728
|
"data-inset": inset,
|
|
3361
3729
|
"data-variant": variant,
|
|
3362
|
-
className:
|
|
3730
|
+
className: cn32(
|
|
3363
3731
|
"group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",
|
|
3364
3732
|
className
|
|
3365
3733
|
),
|
|
@@ -3368,7 +3736,7 @@ function DropdownMenuItem({
|
|
|
3368
3736
|
);
|
|
3369
3737
|
}
|
|
3370
3738
|
function DropdownMenuSub({ ...props }) {
|
|
3371
|
-
return /* @__PURE__ */
|
|
3739
|
+
return /* @__PURE__ */ jsx34(MenuPrimitive.SubmenuRoot, { "data-slot": "dropdown-menu-sub", ...props });
|
|
3372
3740
|
}
|
|
3373
3741
|
function DropdownMenuSubTrigger({
|
|
3374
3742
|
className,
|
|
@@ -3376,19 +3744,19 @@ function DropdownMenuSubTrigger({
|
|
|
3376
3744
|
children,
|
|
3377
3745
|
...props
|
|
3378
3746
|
}) {
|
|
3379
|
-
return /* @__PURE__ */
|
|
3747
|
+
return /* @__PURE__ */ jsxs19(
|
|
3380
3748
|
MenuPrimitive.SubmenuTrigger,
|
|
3381
3749
|
{
|
|
3382
3750
|
"data-slot": "dropdown-menu-sub-trigger",
|
|
3383
3751
|
"data-inset": inset,
|
|
3384
|
-
className:
|
|
3752
|
+
className: cn32(
|
|
3385
3753
|
"flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
3386
3754
|
className
|
|
3387
3755
|
),
|
|
3388
3756
|
...props,
|
|
3389
3757
|
children: [
|
|
3390
3758
|
children,
|
|
3391
|
-
/* @__PURE__ */
|
|
3759
|
+
/* @__PURE__ */ jsx34(ChevronRightIcon, { className: "ml-auto" })
|
|
3392
3760
|
]
|
|
3393
3761
|
}
|
|
3394
3762
|
);
|
|
@@ -3401,11 +3769,11 @@ function DropdownMenuSubContent({
|
|
|
3401
3769
|
className,
|
|
3402
3770
|
...props
|
|
3403
3771
|
}) {
|
|
3404
|
-
return /* @__PURE__ */
|
|
3772
|
+
return /* @__PURE__ */ jsx34(
|
|
3405
3773
|
DropdownMenuContent,
|
|
3406
3774
|
{
|
|
3407
3775
|
"data-slot": "dropdown-menu-sub-content",
|
|
3408
|
-
className:
|
|
3776
|
+
className: cn32(
|
|
3409
3777
|
"w-auto min-w-[96px] rounded-lg bg-background p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
3410
3778
|
className
|
|
3411
3779
|
),
|
|
@@ -3424,24 +3792,24 @@ function DropdownMenuCheckboxItem({
|
|
|
3424
3792
|
inset,
|
|
3425
3793
|
...props
|
|
3426
3794
|
}) {
|
|
3427
|
-
return /* @__PURE__ */
|
|
3795
|
+
return /* @__PURE__ */ jsxs19(
|
|
3428
3796
|
MenuPrimitive.CheckboxItem,
|
|
3429
3797
|
{
|
|
3430
3798
|
"data-slot": "dropdown-menu-checkbox-item",
|
|
3431
3799
|
"data-inset": inset,
|
|
3432
|
-
className:
|
|
3800
|
+
className: cn32(
|
|
3433
3801
|
"relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
3434
3802
|
className
|
|
3435
3803
|
),
|
|
3436
3804
|
checked,
|
|
3437
3805
|
...props,
|
|
3438
3806
|
children: [
|
|
3439
|
-
/* @__PURE__ */
|
|
3807
|
+
/* @__PURE__ */ jsx34(
|
|
3440
3808
|
"span",
|
|
3441
3809
|
{
|
|
3442
3810
|
className: "pointer-events-none absolute right-2 flex items-center justify-center",
|
|
3443
3811
|
"data-slot": "dropdown-menu-checkbox-item-indicator",
|
|
3444
|
-
children: /* @__PURE__ */
|
|
3812
|
+
children: /* @__PURE__ */ jsx34(MenuPrimitive.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx34(CheckIcon, {}) })
|
|
3445
3813
|
}
|
|
3446
3814
|
),
|
|
3447
3815
|
children
|
|
@@ -3450,7 +3818,7 @@ function DropdownMenuCheckboxItem({
|
|
|
3450
3818
|
);
|
|
3451
3819
|
}
|
|
3452
3820
|
function DropdownMenuRadioGroup({ ...props }) {
|
|
3453
|
-
return /* @__PURE__ */
|
|
3821
|
+
return /* @__PURE__ */ jsx34(
|
|
3454
3822
|
MenuPrimitive.RadioGroup,
|
|
3455
3823
|
{
|
|
3456
3824
|
"data-slot": "dropdown-menu-radio-group",
|
|
@@ -3464,23 +3832,23 @@ function DropdownMenuRadioItem({
|
|
|
3464
3832
|
inset,
|
|
3465
3833
|
...props
|
|
3466
3834
|
}) {
|
|
3467
|
-
return /* @__PURE__ */
|
|
3835
|
+
return /* @__PURE__ */ jsxs19(
|
|
3468
3836
|
MenuPrimitive.RadioItem,
|
|
3469
3837
|
{
|
|
3470
3838
|
"data-slot": "dropdown-menu-radio-item",
|
|
3471
3839
|
"data-inset": inset,
|
|
3472
|
-
className:
|
|
3840
|
+
className: cn32(
|
|
3473
3841
|
"relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
3474
3842
|
className
|
|
3475
3843
|
),
|
|
3476
3844
|
...props,
|
|
3477
3845
|
children: [
|
|
3478
|
-
/* @__PURE__ */
|
|
3846
|
+
/* @__PURE__ */ jsx34(
|
|
3479
3847
|
"span",
|
|
3480
3848
|
{
|
|
3481
3849
|
className: "pointer-events-none absolute right-2 flex items-center justify-center",
|
|
3482
3850
|
"data-slot": "dropdown-menu-radio-item-indicator",
|
|
3483
|
-
children: /* @__PURE__ */
|
|
3851
|
+
children: /* @__PURE__ */ jsx34(MenuPrimitive.RadioItemIndicator, { children: /* @__PURE__ */ jsx34(CheckIcon, {}) })
|
|
3484
3852
|
}
|
|
3485
3853
|
),
|
|
3486
3854
|
children
|
|
@@ -3492,11 +3860,11 @@ function DropdownMenuSeparator({
|
|
|
3492
3860
|
className,
|
|
3493
3861
|
...props
|
|
3494
3862
|
}) {
|
|
3495
|
-
return /* @__PURE__ */
|
|
3863
|
+
return /* @__PURE__ */ jsx34(
|
|
3496
3864
|
MenuPrimitive.Separator,
|
|
3497
3865
|
{
|
|
3498
3866
|
"data-slot": "dropdown-menu-separator",
|
|
3499
|
-
className:
|
|
3867
|
+
className: cn32("-mx-1 my-1 h-px bg-border", className),
|
|
3500
3868
|
...props
|
|
3501
3869
|
}
|
|
3502
3870
|
);
|
|
@@ -3505,11 +3873,11 @@ function DropdownMenuShortcut({
|
|
|
3505
3873
|
className,
|
|
3506
3874
|
...props
|
|
3507
3875
|
}) {
|
|
3508
|
-
return /* @__PURE__ */
|
|
3876
|
+
return /* @__PURE__ */ jsx34(
|
|
3509
3877
|
"span",
|
|
3510
3878
|
{
|
|
3511
3879
|
"data-slot": "dropdown-menu-shortcut",
|
|
3512
|
-
className:
|
|
3880
|
+
className: cn32(
|
|
3513
3881
|
"ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground",
|
|
3514
3882
|
className
|
|
3515
3883
|
),
|
|
@@ -3520,14 +3888,14 @@ function DropdownMenuShortcut({
|
|
|
3520
3888
|
|
|
3521
3889
|
// src/ui/empty.tsx
|
|
3522
3890
|
import { cva as cva6 } from "class-variance-authority";
|
|
3523
|
-
import { cn as
|
|
3524
|
-
import { jsx as
|
|
3891
|
+
import { cn as cn33 } from "cn";
|
|
3892
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
3525
3893
|
function Empty({ className, ...props }) {
|
|
3526
|
-
return /* @__PURE__ */
|
|
3894
|
+
return /* @__PURE__ */ jsx35(
|
|
3527
3895
|
"div",
|
|
3528
3896
|
{
|
|
3529
3897
|
"data-slot": "empty",
|
|
3530
|
-
className:
|
|
3898
|
+
className: cn33(
|
|
3531
3899
|
"flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance",
|
|
3532
3900
|
className
|
|
3533
3901
|
),
|
|
@@ -3536,11 +3904,11 @@ function Empty({ className, ...props }) {
|
|
|
3536
3904
|
);
|
|
3537
3905
|
}
|
|
3538
3906
|
function EmptyHeader({ className, ...props }) {
|
|
3539
|
-
return /* @__PURE__ */
|
|
3907
|
+
return /* @__PURE__ */ jsx35(
|
|
3540
3908
|
"div",
|
|
3541
3909
|
{
|
|
3542
3910
|
"data-slot": "empty-header",
|
|
3543
|
-
className:
|
|
3911
|
+
className: cn33("flex max-w-sm flex-col items-center gap-2", className),
|
|
3544
3912
|
...props
|
|
3545
3913
|
}
|
|
3546
3914
|
);
|
|
@@ -3564,32 +3932,32 @@ function EmptyMedia({
|
|
|
3564
3932
|
variant = "default",
|
|
3565
3933
|
...props
|
|
3566
3934
|
}) {
|
|
3567
|
-
return /* @__PURE__ */
|
|
3935
|
+
return /* @__PURE__ */ jsx35(
|
|
3568
3936
|
"div",
|
|
3569
3937
|
{
|
|
3570
3938
|
"data-slot": "empty-icon",
|
|
3571
3939
|
"data-variant": variant,
|
|
3572
|
-
className:
|
|
3940
|
+
className: cn33(emptyMediaVariants({ variant, className })),
|
|
3573
3941
|
...props
|
|
3574
3942
|
}
|
|
3575
3943
|
);
|
|
3576
3944
|
}
|
|
3577
3945
|
function EmptyTitle({ className, ...props }) {
|
|
3578
|
-
return /* @__PURE__ */
|
|
3946
|
+
return /* @__PURE__ */ jsx35(
|
|
3579
3947
|
"div",
|
|
3580
3948
|
{
|
|
3581
3949
|
"data-slot": "empty-title",
|
|
3582
|
-
className:
|
|
3950
|
+
className: cn33("text-sm font-medium tracking-tight", className),
|
|
3583
3951
|
...props
|
|
3584
3952
|
}
|
|
3585
3953
|
);
|
|
3586
3954
|
}
|
|
3587
3955
|
function EmptyDescription({ className, ...props }) {
|
|
3588
|
-
return /* @__PURE__ */
|
|
3956
|
+
return /* @__PURE__ */ jsx35(
|
|
3589
3957
|
"div",
|
|
3590
3958
|
{
|
|
3591
3959
|
"data-slot": "empty-description",
|
|
3592
|
-
className:
|
|
3960
|
+
className: cn33(
|
|
3593
3961
|
"text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
|
|
3594
3962
|
className
|
|
3595
3963
|
),
|
|
@@ -3598,11 +3966,11 @@ function EmptyDescription({ className, ...props }) {
|
|
|
3598
3966
|
);
|
|
3599
3967
|
}
|
|
3600
3968
|
function EmptyContent({ className, ...props }) {
|
|
3601
|
-
return /* @__PURE__ */
|
|
3969
|
+
return /* @__PURE__ */ jsx35(
|
|
3602
3970
|
"div",
|
|
3603
3971
|
{
|
|
3604
3972
|
"data-slot": "empty-content",
|
|
3605
|
-
className:
|
|
3973
|
+
className: cn33(
|
|
3606
3974
|
"flex w-full max-w-sm min-w-0 flex-col items-center gap-2.5 text-sm text-balance",
|
|
3607
3975
|
className
|
|
3608
3976
|
),
|
|
@@ -3614,12 +3982,12 @@ function EmptyContent({ className, ...props }) {
|
|
|
3614
3982
|
// src/ui/farmer/div.tsx
|
|
3615
3983
|
import { motion as motion5 } from "motion/react";
|
|
3616
3984
|
import React10 from "react";
|
|
3617
|
-
import { jsx as
|
|
3985
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
3618
3986
|
var AnimatedDiv = React10.forwardRef(
|
|
3619
3987
|
({ variants, mobileVariants, className, children, infinity, ...motionProps }, ref) => {
|
|
3620
3988
|
const isDesktop = useMediaQuery("(min-width: 768px)");
|
|
3621
3989
|
const selectedVariants = !isDesktop && mobileVariants ? mobileVariants : variants;
|
|
3622
|
-
return /* @__PURE__ */
|
|
3990
|
+
return /* @__PURE__ */ jsx36(
|
|
3623
3991
|
motion5.div,
|
|
3624
3992
|
{
|
|
3625
3993
|
ref,
|
|
@@ -3937,17 +4305,17 @@ var kanbanOrderCardLayoutTransition = {
|
|
|
3937
4305
|
// src/ui/field.tsx
|
|
3938
4306
|
import { cva as cva7 } from "class-variance-authority";
|
|
3939
4307
|
import { useMemo as useMemo3 } from "react";
|
|
3940
|
-
import { cn as
|
|
4308
|
+
import { cn as cn35 } from "cn";
|
|
3941
4309
|
|
|
3942
4310
|
// src/ui/label.tsx
|
|
3943
|
-
import { cn as
|
|
3944
|
-
import { jsx as
|
|
4311
|
+
import { cn as cn34 } from "cn";
|
|
4312
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
3945
4313
|
function Label({ className, ...props }) {
|
|
3946
|
-
return /* @__PURE__ */
|
|
4314
|
+
return /* @__PURE__ */ jsx37(
|
|
3947
4315
|
"label",
|
|
3948
4316
|
{
|
|
3949
4317
|
"data-slot": "label",
|
|
3950
|
-
className:
|
|
4318
|
+
className: cn34(
|
|
3951
4319
|
"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
3952
4320
|
className
|
|
3953
4321
|
),
|
|
@@ -3957,13 +4325,13 @@ function Label({ className, ...props }) {
|
|
|
3957
4325
|
}
|
|
3958
4326
|
|
|
3959
4327
|
// src/ui/field.tsx
|
|
3960
|
-
import { jsx as
|
|
4328
|
+
import { jsx as jsx38, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3961
4329
|
function FieldSet({ className, ...props }) {
|
|
3962
|
-
return /* @__PURE__ */
|
|
4330
|
+
return /* @__PURE__ */ jsx38(
|
|
3963
4331
|
"fieldset",
|
|
3964
4332
|
{
|
|
3965
4333
|
"data-slot": "field-set",
|
|
3966
|
-
className:
|
|
4334
|
+
className: cn35(
|
|
3967
4335
|
"flex flex-col gap-1 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",
|
|
3968
4336
|
className
|
|
3969
4337
|
),
|
|
@@ -3976,12 +4344,12 @@ function FieldLegend({
|
|
|
3976
4344
|
variant = "legend",
|
|
3977
4345
|
...props
|
|
3978
4346
|
}) {
|
|
3979
|
-
return /* @__PURE__ */
|
|
4347
|
+
return /* @__PURE__ */ jsx38(
|
|
3980
4348
|
"legend",
|
|
3981
4349
|
{
|
|
3982
4350
|
"data-slot": "field-legend",
|
|
3983
4351
|
"data-variant": variant,
|
|
3984
|
-
className:
|
|
4352
|
+
className: cn35(
|
|
3985
4353
|
"mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base",
|
|
3986
4354
|
className
|
|
3987
4355
|
),
|
|
@@ -3990,11 +4358,11 @@ function FieldLegend({
|
|
|
3990
4358
|
);
|
|
3991
4359
|
}
|
|
3992
4360
|
function FieldGroup({ className, ...props }) {
|
|
3993
|
-
return /* @__PURE__ */
|
|
4361
|
+
return /* @__PURE__ */ jsx38(
|
|
3994
4362
|
"div",
|
|
3995
4363
|
{
|
|
3996
4364
|
"data-slot": "field-group",
|
|
3997
|
-
className:
|
|
4365
|
+
className: cn35(
|
|
3998
4366
|
"group/field-group @container/field-group flex w-full flex-col gap-2 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4",
|
|
3999
4367
|
className
|
|
4000
4368
|
),
|
|
@@ -4022,23 +4390,23 @@ function Field({
|
|
|
4022
4390
|
orientation = "vertical",
|
|
4023
4391
|
...props
|
|
4024
4392
|
}) {
|
|
4025
|
-
return /* @__PURE__ */
|
|
4393
|
+
return /* @__PURE__ */ jsx38(
|
|
4026
4394
|
"div",
|
|
4027
4395
|
{
|
|
4028
4396
|
role: "group",
|
|
4029
4397
|
"data-slot": "field",
|
|
4030
4398
|
"data-orientation": orientation,
|
|
4031
|
-
className:
|
|
4399
|
+
className: cn35(fieldVariants({ orientation }), className),
|
|
4032
4400
|
...props
|
|
4033
4401
|
}
|
|
4034
4402
|
);
|
|
4035
4403
|
}
|
|
4036
4404
|
function FieldContent({ className, ...props }) {
|
|
4037
|
-
return /* @__PURE__ */
|
|
4405
|
+
return /* @__PURE__ */ jsx38(
|
|
4038
4406
|
"div",
|
|
4039
4407
|
{
|
|
4040
4408
|
"data-slot": "field-content",
|
|
4041
|
-
className:
|
|
4409
|
+
className: cn35(
|
|
4042
4410
|
"group/field-content flex flex-1 flex-col gap-0.5 leading-snug",
|
|
4043
4411
|
className
|
|
4044
4412
|
),
|
|
@@ -4050,11 +4418,11 @@ function FieldLabel({
|
|
|
4050
4418
|
className,
|
|
4051
4419
|
...props
|
|
4052
4420
|
}) {
|
|
4053
|
-
return /* @__PURE__ */
|
|
4421
|
+
return /* @__PURE__ */ jsx38(
|
|
4054
4422
|
Label,
|
|
4055
4423
|
{
|
|
4056
4424
|
"data-slot": "field-label",
|
|
4057
|
-
className:
|
|
4425
|
+
className: cn35(
|
|
4058
4426
|
"group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10",
|
|
4059
4427
|
"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",
|
|
4060
4428
|
className
|
|
@@ -4064,11 +4432,11 @@ function FieldLabel({
|
|
|
4064
4432
|
);
|
|
4065
4433
|
}
|
|
4066
4434
|
function FieldTitle({ className, ...props }) {
|
|
4067
|
-
return /* @__PURE__ */
|
|
4435
|
+
return /* @__PURE__ */ jsx38(
|
|
4068
4436
|
"div",
|
|
4069
4437
|
{
|
|
4070
4438
|
"data-slot": "field-label",
|
|
4071
|
-
className:
|
|
4439
|
+
className: cn35(
|
|
4072
4440
|
"flex w-fit items-center gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50",
|
|
4073
4441
|
className
|
|
4074
4442
|
),
|
|
@@ -4077,11 +4445,11 @@ function FieldTitle({ className, ...props }) {
|
|
|
4077
4445
|
);
|
|
4078
4446
|
}
|
|
4079
4447
|
function FieldDescription({ className, ...props }) {
|
|
4080
|
-
return /* @__PURE__ */
|
|
4448
|
+
return /* @__PURE__ */ jsx38(
|
|
4081
4449
|
"p",
|
|
4082
4450
|
{
|
|
4083
4451
|
"data-slot": "field-description",
|
|
4084
|
-
className:
|
|
4452
|
+
className: cn35(
|
|
4085
4453
|
"text-left text-[10px] leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5",
|
|
4086
4454
|
"last:mt-0 nth-last-2:-mt-1",
|
|
4087
4455
|
"[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
|
|
@@ -4096,19 +4464,19 @@ function FieldSeparator({
|
|
|
4096
4464
|
className,
|
|
4097
4465
|
...props
|
|
4098
4466
|
}) {
|
|
4099
|
-
return /* @__PURE__ */
|
|
4467
|
+
return /* @__PURE__ */ jsxs20(
|
|
4100
4468
|
"div",
|
|
4101
4469
|
{
|
|
4102
4470
|
"data-slot": "field-separator",
|
|
4103
4471
|
"data-content": !!children,
|
|
4104
|
-
className:
|
|
4472
|
+
className: cn35(
|
|
4105
4473
|
"relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",
|
|
4106
4474
|
className
|
|
4107
4475
|
),
|
|
4108
4476
|
...props,
|
|
4109
4477
|
children: [
|
|
4110
|
-
/* @__PURE__ */
|
|
4111
|
-
children && /* @__PURE__ */
|
|
4478
|
+
/* @__PURE__ */ jsx38(Separator, { className: "absolute inset-0 top-1/2" }),
|
|
4479
|
+
children && /* @__PURE__ */ jsx38(
|
|
4112
4480
|
"span",
|
|
4113
4481
|
{
|
|
4114
4482
|
className: "relative mx-auto block w-fit px-2 text-muted-foreground",
|
|
@@ -4139,19 +4507,19 @@ function FieldError({
|
|
|
4139
4507
|
if (uniqueErrors?.length == 1) {
|
|
4140
4508
|
return uniqueErrors[0]?.message;
|
|
4141
4509
|
}
|
|
4142
|
-
return /* @__PURE__ */
|
|
4143
|
-
(error, index) => error?.message && /* @__PURE__ */
|
|
4510
|
+
return /* @__PURE__ */ jsx38("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: uniqueErrors.map(
|
|
4511
|
+
(error, index) => error?.message && /* @__PURE__ */ jsx38("li", { children: error.message }, index)
|
|
4144
4512
|
) });
|
|
4145
4513
|
}, [children, errors]);
|
|
4146
4514
|
if (!content) {
|
|
4147
4515
|
return null;
|
|
4148
4516
|
}
|
|
4149
|
-
return /* @__PURE__ */
|
|
4517
|
+
return /* @__PURE__ */ jsx38(
|
|
4150
4518
|
"div",
|
|
4151
4519
|
{
|
|
4152
4520
|
role: "alert",
|
|
4153
4521
|
"data-slot": "field-error",
|
|
4154
|
-
className:
|
|
4522
|
+
className: cn35("text-sm font-normal text-destructive", className),
|
|
4155
4523
|
...props,
|
|
4156
4524
|
children: content
|
|
4157
4525
|
}
|
|
@@ -4173,14 +4541,14 @@ import {
|
|
|
4173
4541
|
} from "react";
|
|
4174
4542
|
|
|
4175
4543
|
// src/ui/kbd.tsx
|
|
4176
|
-
import { cn as
|
|
4177
|
-
import { jsx as
|
|
4544
|
+
import { cn as cn36 } from "cn";
|
|
4545
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
4178
4546
|
function Kbd({ className, ...props }) {
|
|
4179
|
-
return /* @__PURE__ */
|
|
4547
|
+
return /* @__PURE__ */ jsx39(
|
|
4180
4548
|
"kbd",
|
|
4181
4549
|
{
|
|
4182
4550
|
"data-slot": "kbd",
|
|
4183
|
-
className:
|
|
4551
|
+
className: cn36(
|
|
4184
4552
|
"pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 text-xs font-medium text-muted-foreground select-none in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 [&_svg:not([class*='size-'])]:size-3",
|
|
4185
4553
|
className
|
|
4186
4554
|
),
|
|
@@ -4189,20 +4557,20 @@ function Kbd({ className, ...props }) {
|
|
|
4189
4557
|
);
|
|
4190
4558
|
}
|
|
4191
4559
|
function KbdGroup({ className, ...props }) {
|
|
4192
|
-
return /* @__PURE__ */
|
|
4560
|
+
return /* @__PURE__ */ jsx39(
|
|
4193
4561
|
"kbd",
|
|
4194
4562
|
{
|
|
4195
4563
|
"data-slot": "kbd-group",
|
|
4196
|
-
className:
|
|
4564
|
+
className: cn36("inline-flex items-center gap-1", className),
|
|
4197
4565
|
...props
|
|
4198
4566
|
}
|
|
4199
4567
|
);
|
|
4200
4568
|
}
|
|
4201
4569
|
|
|
4202
4570
|
// src/ui/filters.tsx
|
|
4203
|
-
import { cn as
|
|
4571
|
+
import { cn as cn37 } from "cn";
|
|
4204
4572
|
import { AlertCircleIcon, CheckIcon as CheckIcon2, PlusIcon, XIcon } from "lucide-react";
|
|
4205
|
-
import { Fragment as
|
|
4573
|
+
import { Fragment as Fragment3, jsx as jsx40, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
4206
4574
|
var DEFAULT_I18N = {
|
|
4207
4575
|
// UI Labels
|
|
4208
4576
|
addFilter: "Filter",
|
|
@@ -4368,10 +4736,10 @@ function FilterInput({
|
|
|
4368
4736
|
}
|
|
4369
4737
|
onKeyDown?.(e);
|
|
4370
4738
|
};
|
|
4371
|
-
return /* @__PURE__ */
|
|
4739
|
+
return /* @__PURE__ */ jsxs21(
|
|
4372
4740
|
InputGroup,
|
|
4373
4741
|
{
|
|
4374
|
-
className:
|
|
4742
|
+
className: cn37(
|
|
4375
4743
|
"w-36",
|
|
4376
4744
|
// Height follows each style's own control ladder. `default` sets no
|
|
4377
4745
|
// height on purpose so the style's `.cn-input-group` applies (h-8 nova,
|
|
@@ -4386,8 +4754,8 @@ function FilterInput({
|
|
|
4386
4754
|
className
|
|
4387
4755
|
),
|
|
4388
4756
|
children: [
|
|
4389
|
-
field?.prefix && /* @__PURE__ */
|
|
4390
|
-
/* @__PURE__ */
|
|
4757
|
+
field?.prefix && /* @__PURE__ */ jsx40(InputGroupAddon, { children: /* @__PURE__ */ jsx40(InputGroupText, { children: field.prefix }) }),
|
|
4758
|
+
/* @__PURE__ */ jsx40(
|
|
4391
4759
|
InputGroupInput,
|
|
4392
4760
|
{
|
|
4393
4761
|
ref: inputRef,
|
|
@@ -4395,29 +4763,29 @@ function FilterInput({
|
|
|
4395
4763
|
"aria-describedby": !isValid && validationMessage ? `${field?.key || "input"}-error` : void 0,
|
|
4396
4764
|
onBlur: handleBlur,
|
|
4397
4765
|
onKeyDown: handleKeyDown,
|
|
4398
|
-
className:
|
|
4766
|
+
className: cn37(
|
|
4399
4767
|
context.size == "sm" && "h-7! text-xs",
|
|
4400
4768
|
context.size == "lg" && "h-9!"
|
|
4401
4769
|
),
|
|
4402
4770
|
...props
|
|
4403
4771
|
}
|
|
4404
4772
|
),
|
|
4405
|
-
!isValid && validationMessage && /* @__PURE__ */
|
|
4406
|
-
/* @__PURE__ */
|
|
4407
|
-
/* @__PURE__ */
|
|
4773
|
+
!isValid && validationMessage && /* @__PURE__ */ jsx40(InputGroupAddon, { align: "inline-end", children: /* @__PURE__ */ jsxs21(Tooltip, { children: [
|
|
4774
|
+
/* @__PURE__ */ jsx40(TooltipTrigger, { render: /* @__PURE__ */ jsx40(InputGroupButton, { size: "icon-xs" }), children: /* @__PURE__ */ jsx40(AlertCircleIcon, { className: "size-3.5 text-destructive" }) }),
|
|
4775
|
+
/* @__PURE__ */ jsx40(TooltipContent, { children: /* @__PURE__ */ jsx40("p", { className: "text-sm", children: validationMessage }) })
|
|
4408
4776
|
] }) }),
|
|
4409
|
-
field?.suffix && /* @__PURE__ */
|
|
4777
|
+
field?.suffix && /* @__PURE__ */ jsx40(InputGroupAddon, { align: "inline-end", children: /* @__PURE__ */ jsx40(InputGroupText, { children: field.suffix }) })
|
|
4410
4778
|
]
|
|
4411
4779
|
}
|
|
4412
4780
|
);
|
|
4413
4781
|
}
|
|
4414
4782
|
function FilterRemoveButton({
|
|
4415
4783
|
className,
|
|
4416
|
-
icon = /* @__PURE__ */
|
|
4784
|
+
icon = /* @__PURE__ */ jsx40(XIcon, {}),
|
|
4417
4785
|
...props
|
|
4418
4786
|
}) {
|
|
4419
4787
|
const context = useFilterContext();
|
|
4420
|
-
return /* @__PURE__ */
|
|
4788
|
+
return /* @__PURE__ */ jsx40(
|
|
4421
4789
|
Button,
|
|
4422
4790
|
{
|
|
4423
4791
|
variant: "outline",
|
|
@@ -4588,11 +4956,11 @@ function FilterOperatorDropdown({
|
|
|
4588
4956
|
[field, values, context.i18n]
|
|
4589
4957
|
);
|
|
4590
4958
|
const operatorLabel = operators.find((op) => op.value === operator)?.label || context.i18n.helpers.formatOperator(operator);
|
|
4591
|
-
return /* @__PURE__ */
|
|
4592
|
-
/* @__PURE__ */
|
|
4959
|
+
return /* @__PURE__ */ jsxs21(DropdownMenu, { children: [
|
|
4960
|
+
/* @__PURE__ */ jsx40(
|
|
4593
4961
|
DropdownMenuTrigger,
|
|
4594
4962
|
{
|
|
4595
|
-
render: /* @__PURE__ */
|
|
4963
|
+
render: /* @__PURE__ */ jsx40(
|
|
4596
4964
|
Button,
|
|
4597
4965
|
{
|
|
4598
4966
|
variant: "outline",
|
|
@@ -4603,19 +4971,19 @@ function FilterOperatorDropdown({
|
|
|
4603
4971
|
)
|
|
4604
4972
|
}
|
|
4605
4973
|
),
|
|
4606
|
-
/* @__PURE__ */
|
|
4974
|
+
/* @__PURE__ */ jsx40(DropdownMenuContent, { align: "start", className: "w-fit min-w-fit", children: operators.map((op) => /* @__PURE__ */ jsxs21(
|
|
4607
4975
|
DropdownMenuItem,
|
|
4608
4976
|
{
|
|
4609
4977
|
onClick: () => onChange(op.value),
|
|
4610
|
-
className:
|
|
4978
|
+
className: cn37(
|
|
4611
4979
|
"flex items-center justify-between data-highlighted:bg-accent data-highlighted:text-accent-foreground"
|
|
4612
4980
|
),
|
|
4613
4981
|
children: [
|
|
4614
|
-
/* @__PURE__ */
|
|
4615
|
-
/* @__PURE__ */
|
|
4982
|
+
/* @__PURE__ */ jsx40("span", { children: op.label }),
|
|
4983
|
+
/* @__PURE__ */ jsx40(
|
|
4616
4984
|
CheckIcon2,
|
|
4617
4985
|
{
|
|
4618
|
-
className:
|
|
4986
|
+
className: cn37(
|
|
4619
4987
|
"ms-auto text-primary",
|
|
4620
4988
|
op.value === operator ? "opacity-100" : "opacity-0"
|
|
4621
4989
|
)
|
|
@@ -4696,7 +5064,7 @@ function SelectOptionsPopover({
|
|
|
4696
5064
|
const isSelected = effectiveValues.includes(option.value);
|
|
4697
5065
|
const isHighlighted = highlightedIndex === overallIndex;
|
|
4698
5066
|
const itemId = `${baseId}-item-${overallIndex}`;
|
|
4699
|
-
return /* @__PURE__ */
|
|
5067
|
+
return /* @__PURE__ */ jsxs21(
|
|
4700
5068
|
DropdownMenuCheckboxItem,
|
|
4701
5069
|
{
|
|
4702
5070
|
id: itemId,
|
|
@@ -4705,7 +5073,7 @@ function SelectOptionsPopover({
|
|
|
4705
5073
|
"data-highlighted": isHighlighted || void 0,
|
|
4706
5074
|
onMouseEnter: () => setHighlightedIndex(overallIndex),
|
|
4707
5075
|
checked: isSelected,
|
|
4708
|
-
className:
|
|
5076
|
+
className: cn37(
|
|
4709
5077
|
"data-highlighted:bg-accent data-highlighted:text-accent-foreground",
|
|
4710
5078
|
option.className
|
|
4711
5079
|
),
|
|
@@ -4715,15 +5083,15 @@ function SelectOptionsPopover({
|
|
|
4715
5083
|
onCheckedChange: () => toggleOption(option),
|
|
4716
5084
|
children: [
|
|
4717
5085
|
option.icon && option.icon,
|
|
4718
|
-
/* @__PURE__ */
|
|
5086
|
+
/* @__PURE__ */ jsx40("span", { className: "truncate", children: option.label })
|
|
4719
5087
|
]
|
|
4720
5088
|
},
|
|
4721
5089
|
String(option.value)
|
|
4722
5090
|
);
|
|
4723
5091
|
};
|
|
4724
|
-
const renderMenuContent = () => /* @__PURE__ */
|
|
4725
|
-
field.searchable !== false && /* @__PURE__ */
|
|
4726
|
-
/* @__PURE__ */
|
|
5092
|
+
const renderMenuContent = () => /* @__PURE__ */ jsxs21(Fragment3, { children: [
|
|
5093
|
+
field.searchable !== false && /* @__PURE__ */ jsxs21(Fragment3, { children: [
|
|
5094
|
+
/* @__PURE__ */ jsx40(
|
|
4727
5095
|
Input,
|
|
4728
5096
|
{
|
|
4729
5097
|
ref: inputRef,
|
|
@@ -4736,7 +5104,7 @@ function SelectOptionsPopover({
|
|
|
4736
5104
|
placeholder: context.i18n.placeholders.searchField(
|
|
4737
5105
|
field.label || ""
|
|
4738
5106
|
),
|
|
4739
|
-
className:
|
|
5107
|
+
className: cn37(
|
|
4740
5108
|
"h-8 rounded-none border-0 border-input bg-transparent! px-2 text-sm shadow-none",
|
|
4741
5109
|
"focus-visible:border-border focus-visible:ring-0 focus-visible:ring-offset-0",
|
|
4742
5110
|
open && "placeholder:text-foreground"
|
|
@@ -4784,24 +5152,24 @@ function SelectOptionsPopover({
|
|
|
4784
5152
|
}
|
|
4785
5153
|
}
|
|
4786
5154
|
),
|
|
4787
|
-
/* @__PURE__ */
|
|
5155
|
+
/* @__PURE__ */ jsx40(DropdownMenuSeparator, {})
|
|
4788
5156
|
] }),
|
|
4789
|
-
/* @__PURE__ */
|
|
5157
|
+
/* @__PURE__ */ jsx40("div", { className: "relative flex max-h-full", children: /* @__PURE__ */ jsx40(
|
|
4790
5158
|
"div",
|
|
4791
5159
|
{
|
|
4792
5160
|
className: "flex max-h-[min(var(--available-height),24rem)] w-full scroll-pt-2 scroll-pb-2 flex-col overscroll-contain",
|
|
4793
5161
|
role: "listbox",
|
|
4794
5162
|
id: `${baseId}-listbox`,
|
|
4795
|
-
children: isAsync && loading && allFilteredOptions.length === 0 ? /* @__PURE__ */
|
|
5163
|
+
children: isAsync && loading && allFilteredOptions.length === 0 ? /* @__PURE__ */ jsx40("div", { className: "py-2 text-center text-sm text-muted-foreground", children: context.i18n.loadingOptions ?? DEFAULT_I18N.loadingOptions }) : isAsync && error ? /* @__PURE__ */ jsx40("div", { className: "py-2 text-center text-sm text-muted-foreground", children: context.i18n.errorLoadingOptions ?? DEFAULT_I18N.errorLoadingOptions }) : allFilteredOptions.length === 0 ? /* @__PURE__ */ jsx40("div", { className: "py-2 text-center text-sm text-muted-foreground", children: context.i18n.noResultsFound }) : field.renderOptionList ? field.renderOptionList({
|
|
4796
5164
|
options: allFilteredOptions,
|
|
4797
5165
|
highlightedIndex,
|
|
4798
5166
|
renderOption: renderOptionItem
|
|
4799
|
-
}) : /* @__PURE__ */
|
|
4800
|
-
filteredSelectedOptions.length > 0 && /* @__PURE__ */
|
|
5167
|
+
}) : /* @__PURE__ */ jsxs21(ScrollArea, { className: "size-full min-h-0 **:data-[slot=scroll-area-scrollbar]:m-0 **:data-[slot=scroll-area-viewport]:h-full **:data-[slot=scroll-area-viewport]:overscroll-contain", children: [
|
|
5168
|
+
filteredSelectedOptions.length > 0 && /* @__PURE__ */ jsx40(DropdownMenuGroup, { className: "px-1", children: filteredSelectedOptions.map(
|
|
4801
5169
|
(option, index) => renderOptionItem(option, index)
|
|
4802
5170
|
) }),
|
|
4803
|
-
filteredSelectedOptions.length > 0 && filteredUnselectedOptions.length > 0 && /* @__PURE__ */
|
|
4804
|
-
filteredUnselectedOptions.length > 0 && /* @__PURE__ */
|
|
5171
|
+
filteredSelectedOptions.length > 0 && filteredUnselectedOptions.length > 0 && /* @__PURE__ */ jsx40(DropdownMenuSeparator, { className: "mx-0" }),
|
|
5172
|
+
filteredUnselectedOptions.length > 0 && /* @__PURE__ */ jsx40(DropdownMenuGroup, { className: "px-1", children: filteredUnselectedOptions.map(
|
|
4805
5173
|
(option, index) => renderOptionItem(
|
|
4806
5174
|
option,
|
|
4807
5175
|
index + filteredSelectedOptions.length
|
|
@@ -4812,9 +5180,9 @@ function SelectOptionsPopover({
|
|
|
4812
5180
|
) })
|
|
4813
5181
|
] });
|
|
4814
5182
|
if (inline) {
|
|
4815
|
-
return /* @__PURE__ */
|
|
5183
|
+
return /* @__PURE__ */ jsx40("div", { className: "w-full", children: renderMenuContent() });
|
|
4816
5184
|
}
|
|
4817
|
-
return /* @__PURE__ */
|
|
5185
|
+
return /* @__PURE__ */ jsxs21(
|
|
4818
5186
|
DropdownMenu,
|
|
4819
5187
|
{
|
|
4820
5188
|
open,
|
|
@@ -4825,23 +5193,23 @@ function SelectOptionsPopover({
|
|
|
4825
5193
|
}
|
|
4826
5194
|
},
|
|
4827
5195
|
children: [
|
|
4828
|
-
/* @__PURE__ */
|
|
5196
|
+
/* @__PURE__ */ jsx40(
|
|
4829
5197
|
DropdownMenuTrigger,
|
|
4830
5198
|
{
|
|
4831
|
-
render: /* @__PURE__ */
|
|
5199
|
+
render: /* @__PURE__ */ jsx40(Button, { variant: "outline", size: context.size, children: /* @__PURE__ */ jsx40("div", { className: "flex items-center gap-1.5", children: field.customValueRenderer ? field.customValueRenderer(
|
|
4832
5200
|
values,
|
|
4833
5201
|
isAsync ? resolveSelected(values) : field.options || []
|
|
4834
|
-
) : /* @__PURE__ */
|
|
4835
|
-
selectedOptions.length > 0 && /* @__PURE__ */
|
|
5202
|
+
) : /* @__PURE__ */ jsxs21(Fragment3, { children: [
|
|
5203
|
+
selectedOptions.length > 0 && /* @__PURE__ */ jsx40("div", { className: "flex items-center -space-x-1.5", children: selectedOptions.slice(0, 3).map((option) => /* @__PURE__ */ jsx40("div", { children: option.icon }, String(option.value))) }),
|
|
4836
5204
|
selectedOptions.length === 1 ? selectedOptions[0].label : selectedOptions.length > 1 ? `${selectedOptions.length} ${context.i18n.selectedCount}` : context.i18n.select
|
|
4837
5205
|
] }) }) })
|
|
4838
5206
|
}
|
|
4839
5207
|
),
|
|
4840
|
-
/* @__PURE__ */
|
|
5208
|
+
/* @__PURE__ */ jsx40(
|
|
4841
5209
|
DropdownMenuContent,
|
|
4842
5210
|
{
|
|
4843
5211
|
align: "start",
|
|
4844
|
-
className:
|
|
5212
|
+
className: cn37("w-50 px-0", field.className),
|
|
4845
5213
|
children: renderMenuContent()
|
|
4846
5214
|
}
|
|
4847
5215
|
)
|
|
@@ -4860,10 +5228,10 @@ function FilterValueSelector({
|
|
|
4860
5228
|
return null;
|
|
4861
5229
|
}
|
|
4862
5230
|
if (field.customRenderer) {
|
|
4863
|
-
return /* @__PURE__ */
|
|
5231
|
+
return /* @__PURE__ */ jsx40(ButtonGroupText, { className: "bg-background text-start whitespace-nowrap outline-hidden hover:bg-accent aria-expanded:bg-accent dark:bg-input/30", children: field.customRenderer({ field, values, onChange, operator }) });
|
|
4864
5232
|
}
|
|
4865
5233
|
if (field.type === "text") {
|
|
4866
|
-
return /* @__PURE__ */
|
|
5234
|
+
return /* @__PURE__ */ jsx40(
|
|
4867
5235
|
FilterInput,
|
|
4868
5236
|
{
|
|
4869
5237
|
type: "text",
|
|
@@ -4872,15 +5240,15 @@ function FilterValueSelector({
|
|
|
4872
5240
|
placeholder: field.placeholder,
|
|
4873
5241
|
pattern: field.pattern,
|
|
4874
5242
|
field,
|
|
4875
|
-
className:
|
|
5243
|
+
className: cn37("w-36", field.className),
|
|
4876
5244
|
autoFocus
|
|
4877
5245
|
}
|
|
4878
5246
|
);
|
|
4879
5247
|
}
|
|
4880
5248
|
if (field.type === "select" || field.type === "multiselect") {
|
|
4881
|
-
return /* @__PURE__ */
|
|
5249
|
+
return /* @__PURE__ */ jsx40(SelectOptionsPopover, { field, values, onChange });
|
|
4882
5250
|
}
|
|
4883
|
-
return /* @__PURE__ */
|
|
5251
|
+
return /* @__PURE__ */ jsx40(SelectOptionsPopover, { field, values, onChange });
|
|
4884
5252
|
}
|
|
4885
5253
|
var FiltersContent = ({
|
|
4886
5254
|
filters,
|
|
@@ -4912,10 +5280,10 @@ var FiltersContent = ({
|
|
|
4912
5280
|
},
|
|
4913
5281
|
[filters, onChange]
|
|
4914
5282
|
);
|
|
4915
|
-
return /* @__PURE__ */
|
|
5283
|
+
return /* @__PURE__ */ jsx40(
|
|
4916
5284
|
"div",
|
|
4917
5285
|
{
|
|
4918
|
-
className:
|
|
5286
|
+
className: cn37(
|
|
4919
5287
|
filtersContainerVariants({
|
|
4920
5288
|
variant: context.variant,
|
|
4921
5289
|
size: context.size
|
|
@@ -4925,16 +5293,16 @@ var FiltersContent = ({
|
|
|
4925
5293
|
children: filters.map((filter) => {
|
|
4926
5294
|
const field = fieldsMap[filter.field];
|
|
4927
5295
|
if (!field) return null;
|
|
4928
|
-
return /* @__PURE__ */
|
|
5296
|
+
return /* @__PURE__ */ jsxs21(
|
|
4929
5297
|
ButtonGroup,
|
|
4930
5298
|
{
|
|
4931
5299
|
className: "",
|
|
4932
5300
|
children: [
|
|
4933
|
-
/* @__PURE__ */
|
|
5301
|
+
/* @__PURE__ */ jsxs21(ButtonGroupText, { children: [
|
|
4934
5302
|
field.icon && field.icon,
|
|
4935
5303
|
field.label
|
|
4936
5304
|
] }),
|
|
4937
|
-
/* @__PURE__ */
|
|
5305
|
+
/* @__PURE__ */ jsx40(
|
|
4938
5306
|
FilterOperatorDropdown,
|
|
4939
5307
|
{
|
|
4940
5308
|
field,
|
|
@@ -4943,7 +5311,7 @@ var FiltersContent = ({
|
|
|
4943
5311
|
onChange: (operator) => updateFilter(filter.id, { operator })
|
|
4944
5312
|
}
|
|
4945
5313
|
),
|
|
4946
|
-
/* @__PURE__ */
|
|
5314
|
+
/* @__PURE__ */ jsx40(
|
|
4947
5315
|
FilterValueSelector,
|
|
4948
5316
|
{
|
|
4949
5317
|
field,
|
|
@@ -4953,7 +5321,7 @@ var FiltersContent = ({
|
|
|
4953
5321
|
autoFocus: false
|
|
4954
5322
|
}
|
|
4955
5323
|
),
|
|
4956
|
-
/* @__PURE__ */
|
|
5324
|
+
/* @__PURE__ */ jsx40(FilterRemoveButton, { onClick: () => removeFilter(filter.id) })
|
|
4957
5325
|
]
|
|
4958
5326
|
},
|
|
4959
5327
|
filter.id
|
|
@@ -5031,7 +5399,7 @@ function FilterSubmenuContent({
|
|
|
5031
5399
|
const isSelected = currentValues.includes(option.value);
|
|
5032
5400
|
const isHighlighted = highlightedIndex === index;
|
|
5033
5401
|
const itemId = `${baseId}-item-${index}`;
|
|
5034
|
-
return /* @__PURE__ */
|
|
5402
|
+
return /* @__PURE__ */ jsxs21(
|
|
5035
5403
|
DropdownMenuCheckboxItem,
|
|
5036
5404
|
{
|
|
5037
5405
|
id: itemId,
|
|
@@ -5040,7 +5408,7 @@ function FilterSubmenuContent({
|
|
|
5040
5408
|
"data-highlighted": isHighlighted || void 0,
|
|
5041
5409
|
onMouseEnter: () => setHighlightedIndex(index),
|
|
5042
5410
|
checked: isSelected,
|
|
5043
|
-
className:
|
|
5411
|
+
className: cn37(
|
|
5044
5412
|
"data-highlighted:bg-accent data-highlighted:text-accent-foreground",
|
|
5045
5413
|
option.className
|
|
5046
5414
|
),
|
|
@@ -5050,7 +5418,7 @@ function FilterSubmenuContent({
|
|
|
5050
5418
|
onCheckedChange: () => onToggle(option.value, isSelected),
|
|
5051
5419
|
children: [
|
|
5052
5420
|
option.icon && option.icon,
|
|
5053
|
-
/* @__PURE__ */
|
|
5421
|
+
/* @__PURE__ */ jsx40("span", { className: "truncate", children: option.label })
|
|
5054
5422
|
]
|
|
5055
5423
|
},
|
|
5056
5424
|
String(option.value)
|
|
@@ -5061,9 +5429,9 @@ function FilterSubmenuContent({
|
|
|
5061
5429
|
setHighlightedIndex(0);
|
|
5062
5430
|
}
|
|
5063
5431
|
}, [isActive, filteredOptions.length]);
|
|
5064
|
-
return /* @__PURE__ */
|
|
5065
|
-
field.searchable !== false && /* @__PURE__ */
|
|
5066
|
-
/* @__PURE__ */
|
|
5432
|
+
return /* @__PURE__ */ jsxs21("div", { className: "flex flex-col", onMouseEnter: onActive, children: [
|
|
5433
|
+
field.searchable !== false && /* @__PURE__ */ jsxs21(Fragment3, { children: [
|
|
5434
|
+
/* @__PURE__ */ jsx40(
|
|
5067
5435
|
Input,
|
|
5068
5436
|
{
|
|
5069
5437
|
ref: inputRef,
|
|
@@ -5074,7 +5442,7 @@ function FilterSubmenuContent({
|
|
|
5074
5442
|
"aria-controls": `${baseId}-listbox`,
|
|
5075
5443
|
"aria-activedescendant": highlightedIndex >= 0 ? `${baseId}-item-${highlightedIndex}` : void 0,
|
|
5076
5444
|
placeholder: i18n.placeholders.searchField(field.label || ""),
|
|
5077
|
-
className:
|
|
5445
|
+
className: cn37(
|
|
5078
5446
|
"h-8 rounded-none border-0 bg-transparent! px-2 text-sm shadow-none",
|
|
5079
5447
|
"focus-visible:border-border focus-visible:ring-0 focus-visible:ring-offset-0",
|
|
5080
5448
|
isActive && "placeholder:text-foreground"
|
|
@@ -5126,9 +5494,9 @@ function FilterSubmenuContent({
|
|
|
5126
5494
|
}
|
|
5127
5495
|
}
|
|
5128
5496
|
),
|
|
5129
|
-
/* @__PURE__ */
|
|
5497
|
+
/* @__PURE__ */ jsx40(DropdownMenuSeparator, {})
|
|
5130
5498
|
] }),
|
|
5131
|
-
/* @__PURE__ */
|
|
5499
|
+
/* @__PURE__ */ jsx40("div", { className: "relative flex max-h-full", children: /* @__PURE__ */ jsx40(
|
|
5132
5500
|
"div",
|
|
5133
5501
|
{
|
|
5134
5502
|
className: "flex max-h-[min(var(--available-height),24rem)] w-full scroll-pt-2 scroll-pb-2 flex-col overscroll-contain outline-hidden",
|
|
@@ -5173,11 +5541,11 @@ function FilterSubmenuContent({
|
|
|
5173
5541
|
e.stopPropagation();
|
|
5174
5542
|
}
|
|
5175
5543
|
},
|
|
5176
|
-
children: isAsync && loading && filteredOptions.length === 0 ? /* @__PURE__ */
|
|
5544
|
+
children: isAsync && loading && filteredOptions.length === 0 ? /* @__PURE__ */ jsx40("div", { className: "py-2 text-center text-sm text-muted-foreground", children: i18n.loadingOptions ?? DEFAULT_I18N.loadingOptions }) : isAsync && error ? /* @__PURE__ */ jsx40("div", { className: "py-2 text-center text-sm text-muted-foreground", children: i18n.errorLoadingOptions ?? DEFAULT_I18N.errorLoadingOptions }) : filteredOptions.length === 0 ? /* @__PURE__ */ jsx40("div", { className: "py-2 text-center text-sm text-muted-foreground", children: i18n.noResultsFound }) : field.renderOptionList ? field.renderOptionList({
|
|
5177
5545
|
options: filteredOptions,
|
|
5178
5546
|
highlightedIndex,
|
|
5179
5547
|
renderOption: renderOptionItem
|
|
5180
|
-
}) : /* @__PURE__ */
|
|
5548
|
+
}) : /* @__PURE__ */ jsx40(ScrollArea, { className: "size-full min-h-0 **:data-[slot=scroll-area-scrollbar]:m-0 **:data-[slot=scroll-area-viewport]:h-full **:data-[slot=scroll-area-viewport]:overscroll-contain", children: /* @__PURE__ */ jsx40(DropdownMenuGroup, { children: filteredOptions.map(
|
|
5181
5549
|
(option, index) => renderOptionItem(option, index)
|
|
5182
5550
|
) }) })
|
|
5183
5551
|
}
|
|
@@ -5324,8 +5692,8 @@ function Filters({
|
|
|
5324
5692
|
}
|
|
5325
5693
|
}, [addFilterOpen, filteredFields.length]);
|
|
5326
5694
|
const triggerButton = useRender4({
|
|
5327
|
-
render: trigger ?? /* @__PURE__ */
|
|
5328
|
-
/* @__PURE__ */
|
|
5695
|
+
render: trigger ?? /* @__PURE__ */ jsxs21(Button, { variant: "outline", children: [
|
|
5696
|
+
/* @__PURE__ */ jsx40(PlusIcon, {}),
|
|
5329
5697
|
mergedI18n.addFilter
|
|
5330
5698
|
] }),
|
|
5331
5699
|
defaultTagName: "button"
|
|
@@ -5342,12 +5710,12 @@ function Filters({
|
|
|
5342
5710
|
}),
|
|
5343
5711
|
[variant, size, radius, mergedI18n, className, trigger, allowMultiple]
|
|
5344
5712
|
);
|
|
5345
|
-
return /* @__PURE__ */
|
|
5713
|
+
return /* @__PURE__ */ jsx40(FilterContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs21(
|
|
5346
5714
|
"div",
|
|
5347
5715
|
{
|
|
5348
|
-
className:
|
|
5716
|
+
className: cn37(filtersContainerVariants({ variant, size }), className),
|
|
5349
5717
|
children: [
|
|
5350
|
-
selectableFields.length > 0 && /* @__PURE__ */
|
|
5718
|
+
selectableFields.length > 0 && /* @__PURE__ */ jsxs21(
|
|
5351
5719
|
DropdownMenu,
|
|
5352
5720
|
{
|
|
5353
5721
|
open: addFilterOpen,
|
|
@@ -5361,16 +5729,16 @@ function Filters({
|
|
|
5361
5729
|
}
|
|
5362
5730
|
},
|
|
5363
5731
|
children: [
|
|
5364
|
-
/* @__PURE__ */
|
|
5365
|
-
/* @__PURE__ */
|
|
5732
|
+
/* @__PURE__ */ jsx40(DropdownMenuTrigger, { render: triggerButton }),
|
|
5733
|
+
/* @__PURE__ */ jsxs21(
|
|
5366
5734
|
DropdownMenuContent,
|
|
5367
5735
|
{
|
|
5368
|
-
className:
|
|
5736
|
+
className: cn37("w-55", menuPopupClassName),
|
|
5369
5737
|
align: "start",
|
|
5370
5738
|
children: [
|
|
5371
|
-
showSearchInput && /* @__PURE__ */
|
|
5372
|
-
/* @__PURE__ */
|
|
5373
|
-
/* @__PURE__ */
|
|
5739
|
+
showSearchInput && /* @__PURE__ */ jsxs21(Fragment3, { children: [
|
|
5740
|
+
/* @__PURE__ */ jsxs21("div", { className: "relative", children: [
|
|
5741
|
+
/* @__PURE__ */ jsx40(
|
|
5374
5742
|
Input,
|
|
5375
5743
|
{
|
|
5376
5744
|
ref: rootInputRef,
|
|
@@ -5378,7 +5746,7 @@ function Filters({
|
|
|
5378
5746
|
"aria-controls": `${rootId}-listbox`,
|
|
5379
5747
|
"aria-activedescendant": highlightedIndex >= 0 ? `${rootId}-item-${highlightedIndex}` : void 0,
|
|
5380
5748
|
placeholder: mergedI18n.searchFields,
|
|
5381
|
-
className:
|
|
5749
|
+
className: cn37(
|
|
5382
5750
|
"h-8 rounded-none border-0 bg-transparent! px-2 text-sm shadow-none",
|
|
5383
5751
|
"focus-visible:border-border focus-visible:ring-0 focus-visible:ring-offset-0",
|
|
5384
5752
|
activeMenu === "root" && "placeholder:text-foreground"
|
|
@@ -5442,20 +5810,20 @@ function Filters({
|
|
|
5442
5810
|
}
|
|
5443
5811
|
}
|
|
5444
5812
|
),
|
|
5445
|
-
enableShortcut && shortcutLabel && /* @__PURE__ */
|
|
5813
|
+
enableShortcut && shortcutLabel && /* @__PURE__ */ jsx40(Kbd, { className: "absolute top-1/2 right-2 -translate-y-1/2 border bg-background", children: shortcutLabel })
|
|
5446
5814
|
] }),
|
|
5447
|
-
/* @__PURE__ */
|
|
5815
|
+
/* @__PURE__ */ jsx40(DropdownMenuSeparator, {})
|
|
5448
5816
|
] }),
|
|
5449
|
-
/* @__PURE__ */
|
|
5817
|
+
/* @__PURE__ */ jsx40("div", { className: "relative flex max-h-full", children: /* @__PURE__ */ jsx40(
|
|
5450
5818
|
"div",
|
|
5451
5819
|
{
|
|
5452
5820
|
className: "flex max-h-[min(var(--available-height),24rem)] w-full scroll-pt-2 scroll-pb-2 flex-col overscroll-contain",
|
|
5453
5821
|
role: "listbox",
|
|
5454
5822
|
id: `${rootId}-listbox`,
|
|
5455
5823
|
onMouseEnter: () => setActiveMenu("root"),
|
|
5456
|
-
children: /* @__PURE__ */
|
|
5824
|
+
children: /* @__PURE__ */ jsx40(ScrollArea, { className: "**:data-[slot=scroll-area-scrollbar]:m-0", children: (() => {
|
|
5457
5825
|
if (filteredFields.length === 0) {
|
|
5458
|
-
return /* @__PURE__ */
|
|
5826
|
+
return /* @__PURE__ */ jsx40("div", { className: "py-2 text-center text-sm text-muted-foreground", children: mergedI18n.noFieldsFound });
|
|
5459
5827
|
}
|
|
5460
5828
|
return filteredFields.map((field, index) => {
|
|
5461
5829
|
const isHighlighted = highlightedIndex === index;
|
|
@@ -5467,7 +5835,7 @@ function Filters({
|
|
|
5467
5835
|
const sessionFilterId = sessionFilterIds[fieldKey];
|
|
5468
5836
|
const sessionFilter = sessionFilterId ? filters.find((f) => f.id === sessionFilterId) : null;
|
|
5469
5837
|
const currentValues = sessionFilter?.values || [];
|
|
5470
|
-
return /* @__PURE__ */
|
|
5838
|
+
return /* @__PURE__ */ jsxs21(
|
|
5471
5839
|
DropdownMenuSub,
|
|
5472
5840
|
{
|
|
5473
5841
|
open: openSubMenu === fieldKey,
|
|
@@ -5482,7 +5850,7 @@ function Filters({
|
|
|
5482
5850
|
}
|
|
5483
5851
|
},
|
|
5484
5852
|
children: [
|
|
5485
|
-
/* @__PURE__ */
|
|
5853
|
+
/* @__PURE__ */ jsxs21(
|
|
5486
5854
|
DropdownMenuSubTrigger,
|
|
5487
5855
|
{
|
|
5488
5856
|
id: itemId,
|
|
@@ -5496,16 +5864,16 @@ function Filters({
|
|
|
5496
5864
|
className: "data-highlighted:bg-accent data-highlighted:text-accent-foreground data-popup-open:bg-accent data-popup-open:text-accent-foreground",
|
|
5497
5865
|
children: [
|
|
5498
5866
|
field.icon,
|
|
5499
|
-
/* @__PURE__ */
|
|
5867
|
+
/* @__PURE__ */ jsx40("span", { children: field.label })
|
|
5500
5868
|
]
|
|
5501
5869
|
}
|
|
5502
5870
|
),
|
|
5503
|
-
/* @__PURE__ */
|
|
5871
|
+
/* @__PURE__ */ jsx40(
|
|
5504
5872
|
DropdownMenuSubContent,
|
|
5505
5873
|
{
|
|
5506
5874
|
className: "w-50",
|
|
5507
5875
|
side: "right",
|
|
5508
|
-
children: /* @__PURE__ */
|
|
5876
|
+
children: /* @__PURE__ */ jsx40(
|
|
5509
5877
|
FilterSubmenuContent,
|
|
5510
5878
|
{
|
|
5511
5879
|
field,
|
|
@@ -5578,7 +5946,7 @@ function Filters({
|
|
|
5578
5946
|
fieldKey
|
|
5579
5947
|
);
|
|
5580
5948
|
}
|
|
5581
|
-
return /* @__PURE__ */
|
|
5949
|
+
return /* @__PURE__ */ jsxs21(
|
|
5582
5950
|
DropdownMenuItem,
|
|
5583
5951
|
{
|
|
5584
5952
|
id: itemId,
|
|
@@ -5590,7 +5958,7 @@ function Filters({
|
|
|
5590
5958
|
className: "data-highlighted:bg-accent data-highlighted:text-accent-foreground",
|
|
5591
5959
|
children: [
|
|
5592
5960
|
field.icon,
|
|
5593
|
-
/* @__PURE__ */
|
|
5961
|
+
/* @__PURE__ */ jsx40("span", { children: field.label })
|
|
5594
5962
|
]
|
|
5595
5963
|
},
|
|
5596
5964
|
field.key
|
|
@@ -5608,16 +5976,16 @@ function Filters({
|
|
|
5608
5976
|
filters.map((filter) => {
|
|
5609
5977
|
const field = fieldsMap[filter.field];
|
|
5610
5978
|
if (!field) return null;
|
|
5611
|
-
return /* @__PURE__ */
|
|
5979
|
+
return /* @__PURE__ */ jsxs21(
|
|
5612
5980
|
ButtonGroup,
|
|
5613
5981
|
{
|
|
5614
5982
|
className: "",
|
|
5615
5983
|
children: [
|
|
5616
|
-
/* @__PURE__ */
|
|
5984
|
+
/* @__PURE__ */ jsxs21(ButtonGroupText, { className: "bg-background dark:bg-input/30", children: [
|
|
5617
5985
|
field.icon && field.icon,
|
|
5618
5986
|
field.label
|
|
5619
5987
|
] }),
|
|
5620
|
-
/* @__PURE__ */
|
|
5988
|
+
/* @__PURE__ */ jsx40(
|
|
5621
5989
|
FilterOperatorDropdown,
|
|
5622
5990
|
{
|
|
5623
5991
|
field,
|
|
@@ -5626,7 +5994,7 @@ function Filters({
|
|
|
5626
5994
|
onChange: (operator) => updateFilter(filter.id, { operator })
|
|
5627
5995
|
}
|
|
5628
5996
|
),
|
|
5629
|
-
/* @__PURE__ */
|
|
5997
|
+
/* @__PURE__ */ jsx40(
|
|
5630
5998
|
FilterValueSelector,
|
|
5631
5999
|
{
|
|
5632
6000
|
field,
|
|
@@ -5636,7 +6004,7 @@ function Filters({
|
|
|
5636
6004
|
autoFocus: filter.id === lastAddedFilterId
|
|
5637
6005
|
}
|
|
5638
6006
|
),
|
|
5639
|
-
/* @__PURE__ */
|
|
6007
|
+
/* @__PURE__ */ jsx40(FilterRemoveButton, { onClick: () => removeFilter(filter.id) })
|
|
5640
6008
|
]
|
|
5641
6009
|
},
|
|
5642
6010
|
filter.id
|
|
@@ -5662,8 +6030,8 @@ var createFilterGroup = (id, label, fields, initialFilters = []) => ({
|
|
|
5662
6030
|
// src/ui/image.tsx
|
|
5663
6031
|
import NextImage from "next/image";
|
|
5664
6032
|
import { useCallback as useCallback3, useState as useState6 } from "react";
|
|
5665
|
-
import { cn as
|
|
5666
|
-
import { jsx as
|
|
6033
|
+
import { cn as cn38 } from "cn";
|
|
6034
|
+
import { jsx as jsx41, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
5667
6035
|
function srcValue(src) {
|
|
5668
6036
|
if (!src) return null;
|
|
5669
6037
|
if (typeof src === "string") return src;
|
|
@@ -5683,7 +6051,7 @@ function Image({
|
|
|
5683
6051
|
onLoad,
|
|
5684
6052
|
onError,
|
|
5685
6053
|
children,
|
|
5686
|
-
fallback = /* @__PURE__ */
|
|
6054
|
+
fallback = /* @__PURE__ */ jsx41(JellyMini, { mood: "curious", className: "size-full p-4" }),
|
|
5687
6055
|
...props
|
|
5688
6056
|
}) {
|
|
5689
6057
|
const currentSrc = srcValue(src);
|
|
@@ -5703,9 +6071,9 @@ function Image({
|
|
|
5703
6071
|
if (!currentSrc) return;
|
|
5704
6072
|
setFailedSrc(currentSrc);
|
|
5705
6073
|
}, [currentSrc]);
|
|
5706
|
-
return /* @__PURE__ */
|
|
5707
|
-
showSkeleton && !loaded && !failed && hasSource && /* @__PURE__ */
|
|
5708
|
-
hasSource && !failed ? /* @__PURE__ */
|
|
6074
|
+
return /* @__PURE__ */ jsxs22("section", { className: cn38("relative block overflow-hidden", wrapper), children: [
|
|
6075
|
+
showSkeleton && !loaded && !failed && hasSource && /* @__PURE__ */ jsx41(Skeleton, { className: "absolute inset-0 size-full" }),
|
|
6076
|
+
hasSource && !failed ? /* @__PURE__ */ jsx41(
|
|
5709
6077
|
NextImage,
|
|
5710
6078
|
{
|
|
5711
6079
|
...props,
|
|
@@ -5715,7 +6083,7 @@ function Image({
|
|
|
5715
6083
|
loading: imageLoading,
|
|
5716
6084
|
preload: shouldPreload,
|
|
5717
6085
|
fetchPriority: fetchPriority ?? (imageLoading === "eager" ? "high" : void 0),
|
|
5718
|
-
className:
|
|
6086
|
+
className: cn38(
|
|
5719
6087
|
"transition-opacity duration-200",
|
|
5720
6088
|
loaded ? "opacity-100" : "opacity-0",
|
|
5721
6089
|
className
|
|
@@ -5737,34 +6105,34 @@ function Image({
|
|
|
5737
6105
|
// src/ui/input-otp.tsx
|
|
5738
6106
|
import * as React11 from "react";
|
|
5739
6107
|
import { OTPInput, OTPInputContext, REGEXP_ONLY_DIGITS } from "input-otp";
|
|
5740
|
-
import { cn as
|
|
6108
|
+
import { cn as cn39 } from "cn";
|
|
5741
6109
|
import { MinusIcon } from "lucide-react";
|
|
5742
|
-
import { jsx as
|
|
6110
|
+
import { jsx as jsx42, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
5743
6111
|
function InputOTP({
|
|
5744
6112
|
className,
|
|
5745
6113
|
containerClassName,
|
|
5746
6114
|
...props
|
|
5747
6115
|
}) {
|
|
5748
|
-
return /* @__PURE__ */
|
|
6116
|
+
return /* @__PURE__ */ jsx42(
|
|
5749
6117
|
OTPInput,
|
|
5750
6118
|
{
|
|
5751
6119
|
"data-slot": "input-otp",
|
|
5752
|
-
containerClassName:
|
|
6120
|
+
containerClassName: cn39(
|
|
5753
6121
|
"cn-input-otp flex items-center has-disabled:opacity-50",
|
|
5754
6122
|
containerClassName
|
|
5755
6123
|
),
|
|
5756
6124
|
spellCheck: false,
|
|
5757
|
-
className:
|
|
6125
|
+
className: cn39("disabled:cursor-not-allowed", className),
|
|
5758
6126
|
...props
|
|
5759
6127
|
}
|
|
5760
6128
|
);
|
|
5761
6129
|
}
|
|
5762
6130
|
function InputOTPGroup({ className, ...props }) {
|
|
5763
|
-
return /* @__PURE__ */
|
|
6131
|
+
return /* @__PURE__ */ jsx42(
|
|
5764
6132
|
"div",
|
|
5765
6133
|
{
|
|
5766
6134
|
"data-slot": "input-otp-group",
|
|
5767
|
-
className:
|
|
6135
|
+
className: cn39(
|
|
5768
6136
|
"flex items-center rounded-lg has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40",
|
|
5769
6137
|
className
|
|
5770
6138
|
),
|
|
@@ -5779,32 +6147,32 @@ function InputOTPSlot({
|
|
|
5779
6147
|
}) {
|
|
5780
6148
|
const inputOTPContext = React11.useContext(OTPInputContext);
|
|
5781
6149
|
const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
|
|
5782
|
-
return /* @__PURE__ */
|
|
6150
|
+
return /* @__PURE__ */ jsxs23(
|
|
5783
6151
|
"div",
|
|
5784
6152
|
{
|
|
5785
6153
|
"data-slot": "input-otp-slot",
|
|
5786
6154
|
"data-active": isActive,
|
|
5787
|
-
className:
|
|
6155
|
+
className: cn39(
|
|
5788
6156
|
"relative flex size-8 items-center justify-center border-y border-r border-input text-sm transition-[background-color,border-color,box-shadow,opacity] duration-150 ease-out outline-none first:rounded-l-lg first:border-l last:rounded-r-lg aria-invalid:border-destructive data-[active=true]:z-10 data-[active=true]:border-ring data-[active=true]:ring-3 data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 motion-reduce:transition-none dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40",
|
|
5789
6157
|
className
|
|
5790
6158
|
),
|
|
5791
6159
|
...props,
|
|
5792
6160
|
children: [
|
|
5793
6161
|
char,
|
|
5794
|
-
hasFakeCaret && /* @__PURE__ */
|
|
6162
|
+
hasFakeCaret && /* @__PURE__ */ jsx42("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx42("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" }) })
|
|
5795
6163
|
]
|
|
5796
6164
|
}
|
|
5797
6165
|
);
|
|
5798
6166
|
}
|
|
5799
6167
|
function InputOTPSeparator({ ...props }) {
|
|
5800
|
-
return /* @__PURE__ */
|
|
6168
|
+
return /* @__PURE__ */ jsx42(
|
|
5801
6169
|
"div",
|
|
5802
6170
|
{
|
|
5803
6171
|
"data-slot": "input-otp-separator",
|
|
5804
6172
|
className: "flex items-center [&_svg:not([class*='size-'])]:size-4",
|
|
5805
6173
|
role: "separator",
|
|
5806
6174
|
...props,
|
|
5807
|
-
children: /* @__PURE__ */
|
|
6175
|
+
children: /* @__PURE__ */ jsx42(MinusIcon, {})
|
|
5808
6176
|
}
|
|
5809
6177
|
);
|
|
5810
6178
|
}
|
|
@@ -5813,15 +6181,15 @@ function InputOTPSeparator({ ...props }) {
|
|
|
5813
6181
|
import { mergeProps as mergeProps4 } from "@base-ui/react/merge-props";
|
|
5814
6182
|
import { useRender as useRender5 } from "@base-ui/react/use-render";
|
|
5815
6183
|
import { cva as cva9 } from "class-variance-authority";
|
|
5816
|
-
import { cn as
|
|
5817
|
-
import { jsx as
|
|
6184
|
+
import { cn as cn40 } from "cn";
|
|
6185
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
5818
6186
|
function ItemGroup({ className, ...props }) {
|
|
5819
|
-
return /* @__PURE__ */
|
|
6187
|
+
return /* @__PURE__ */ jsx43(
|
|
5820
6188
|
"div",
|
|
5821
6189
|
{
|
|
5822
6190
|
role: "list",
|
|
5823
6191
|
"data-slot": "item-group",
|
|
5824
|
-
className:
|
|
6192
|
+
className: cn40(
|
|
5825
6193
|
"group/item-group flex w-full flex-col gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2",
|
|
5826
6194
|
className
|
|
5827
6195
|
),
|
|
@@ -5833,12 +6201,12 @@ function ItemSeparator({
|
|
|
5833
6201
|
className,
|
|
5834
6202
|
...props
|
|
5835
6203
|
}) {
|
|
5836
|
-
return /* @__PURE__ */
|
|
6204
|
+
return /* @__PURE__ */ jsx43(
|
|
5837
6205
|
Separator,
|
|
5838
6206
|
{
|
|
5839
6207
|
"data-slot": "item-separator",
|
|
5840
6208
|
orientation: "horizontal",
|
|
5841
|
-
className:
|
|
6209
|
+
className: cn40("my-2", className),
|
|
5842
6210
|
...props
|
|
5843
6211
|
}
|
|
5844
6212
|
);
|
|
@@ -5875,7 +6243,7 @@ function Item({
|
|
|
5875
6243
|
defaultTagName: "div",
|
|
5876
6244
|
props: mergeProps4(
|
|
5877
6245
|
{
|
|
5878
|
-
className:
|
|
6246
|
+
className: cn40(itemVariants({ variant, size, className }))
|
|
5879
6247
|
},
|
|
5880
6248
|
props
|
|
5881
6249
|
),
|
|
@@ -5907,22 +6275,22 @@ function ItemMedia({
|
|
|
5907
6275
|
variant = "default",
|
|
5908
6276
|
...props
|
|
5909
6277
|
}) {
|
|
5910
|
-
return /* @__PURE__ */
|
|
6278
|
+
return /* @__PURE__ */ jsx43(
|
|
5911
6279
|
"div",
|
|
5912
6280
|
{
|
|
5913
6281
|
"data-slot": "item-media",
|
|
5914
6282
|
"data-variant": variant,
|
|
5915
|
-
className:
|
|
6283
|
+
className: cn40(itemMediaVariants({ variant, className })),
|
|
5916
6284
|
...props
|
|
5917
6285
|
}
|
|
5918
6286
|
);
|
|
5919
6287
|
}
|
|
5920
6288
|
function ItemContent({ className, ...props }) {
|
|
5921
|
-
return /* @__PURE__ */
|
|
6289
|
+
return /* @__PURE__ */ jsx43(
|
|
5922
6290
|
"div",
|
|
5923
6291
|
{
|
|
5924
6292
|
"data-slot": "item-content",
|
|
5925
|
-
className:
|
|
6293
|
+
className: cn40(
|
|
5926
6294
|
"flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none",
|
|
5927
6295
|
className
|
|
5928
6296
|
),
|
|
@@ -5931,11 +6299,11 @@ function ItemContent({ className, ...props }) {
|
|
|
5931
6299
|
);
|
|
5932
6300
|
}
|
|
5933
6301
|
function ItemTitle({ className, ...props }) {
|
|
5934
|
-
return /* @__PURE__ */
|
|
6302
|
+
return /* @__PURE__ */ jsx43(
|
|
5935
6303
|
"div",
|
|
5936
6304
|
{
|
|
5937
6305
|
"data-slot": "item-title",
|
|
5938
|
-
className:
|
|
6306
|
+
className: cn40(
|
|
5939
6307
|
"line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4",
|
|
5940
6308
|
className
|
|
5941
6309
|
),
|
|
@@ -5944,11 +6312,11 @@ function ItemTitle({ className, ...props }) {
|
|
|
5944
6312
|
);
|
|
5945
6313
|
}
|
|
5946
6314
|
function ItemDescription({ className, ...props }) {
|
|
5947
|
-
return /* @__PURE__ */
|
|
6315
|
+
return /* @__PURE__ */ jsx43(
|
|
5948
6316
|
"p",
|
|
5949
6317
|
{
|
|
5950
6318
|
"data-slot": "item-description",
|
|
5951
|
-
className:
|
|
6319
|
+
className: cn40(
|
|
5952
6320
|
"line-clamp-2 text-left text-sm leading-normal font-normal text-muted-foreground group-data-[size=xs]/item:text-xs [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
|
|
5953
6321
|
className
|
|
5954
6322
|
),
|
|
@@ -5957,21 +6325,21 @@ function ItemDescription({ className, ...props }) {
|
|
|
5957
6325
|
);
|
|
5958
6326
|
}
|
|
5959
6327
|
function ItemActions({ className, ...props }) {
|
|
5960
|
-
return /* @__PURE__ */
|
|
6328
|
+
return /* @__PURE__ */ jsx43(
|
|
5961
6329
|
"div",
|
|
5962
6330
|
{
|
|
5963
6331
|
"data-slot": "item-actions",
|
|
5964
|
-
className:
|
|
6332
|
+
className: cn40("flex items-center gap-2", className),
|
|
5965
6333
|
...props
|
|
5966
6334
|
}
|
|
5967
6335
|
);
|
|
5968
6336
|
}
|
|
5969
6337
|
function ItemHeader({ className, ...props }) {
|
|
5970
|
-
return /* @__PURE__ */
|
|
6338
|
+
return /* @__PURE__ */ jsx43(
|
|
5971
6339
|
"div",
|
|
5972
6340
|
{
|
|
5973
6341
|
"data-slot": "item-header",
|
|
5974
|
-
className:
|
|
6342
|
+
className: cn40(
|
|
5975
6343
|
"flex basis-full items-center justify-between gap-2",
|
|
5976
6344
|
className
|
|
5977
6345
|
),
|
|
@@ -5980,11 +6348,11 @@ function ItemHeader({ className, ...props }) {
|
|
|
5980
6348
|
);
|
|
5981
6349
|
}
|
|
5982
6350
|
function ItemFooter({ className, ...props }) {
|
|
5983
|
-
return /* @__PURE__ */
|
|
6351
|
+
return /* @__PURE__ */ jsx43(
|
|
5984
6352
|
"div",
|
|
5985
6353
|
{
|
|
5986
6354
|
"data-slot": "item-footer",
|
|
5987
|
-
className:
|
|
6355
|
+
className: cn40(
|
|
5988
6356
|
"flex basis-full items-center justify-between gap-2",
|
|
5989
6357
|
className
|
|
5990
6358
|
),
|
|
@@ -5999,19 +6367,19 @@ import {
|
|
|
5999
6367
|
JellyBlobMascot
|
|
6000
6368
|
} from "feral-blob";
|
|
6001
6369
|
import * as React12 from "react";
|
|
6002
|
-
import { cn as
|
|
6370
|
+
import { cn as cn41 } from "cn";
|
|
6003
6371
|
import {
|
|
6004
6372
|
BlobSpeech as BlobSpeech2,
|
|
6005
6373
|
JellyBlobMascot as JellyBlobMascot2,
|
|
6006
6374
|
JellyBlobMascotDemo
|
|
6007
6375
|
} from "feral-blob";
|
|
6008
|
-
import { jsx as
|
|
6376
|
+
import { jsx as jsx44, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
6009
6377
|
function JellyBlob({ ...props }) {
|
|
6010
|
-
return /* @__PURE__ */
|
|
6378
|
+
return /* @__PURE__ */ jsx44("span", { className: "inline-block", children: /* @__PURE__ */ jsx44(
|
|
6011
6379
|
JellyBlobMascot,
|
|
6012
6380
|
{
|
|
6013
6381
|
...props,
|
|
6014
|
-
className:
|
|
6382
|
+
className: cn41("h-auto w-full", props.className)
|
|
6015
6383
|
}
|
|
6016
6384
|
) });
|
|
6017
6385
|
}
|
|
@@ -6037,15 +6405,15 @@ function JellyMini({
|
|
|
6037
6405
|
...props
|
|
6038
6406
|
}) {
|
|
6039
6407
|
const { mounted } = useMounted();
|
|
6040
|
-
return /* @__PURE__ */
|
|
6408
|
+
return /* @__PURE__ */ jsx44(
|
|
6041
6409
|
"span",
|
|
6042
6410
|
{
|
|
6043
6411
|
"aria-hidden": "true",
|
|
6044
|
-
className:
|
|
6412
|
+
className: cn41(
|
|
6045
6413
|
"inline-flex size-5 shrink-0 items-center justify-center select-none",
|
|
6046
6414
|
className
|
|
6047
6415
|
),
|
|
6048
|
-
children: mounted ? /* @__PURE__ */
|
|
6416
|
+
children: mounted ? /* @__PURE__ */ jsx44(
|
|
6049
6417
|
JellyBlobMascot,
|
|
6050
6418
|
{
|
|
6051
6419
|
...props,
|
|
@@ -6087,14 +6455,14 @@ function JellyAction({
|
|
|
6087
6455
|
...props
|
|
6088
6456
|
}) {
|
|
6089
6457
|
const preview = useJellyMood();
|
|
6090
|
-
return /* @__PURE__ */
|
|
6458
|
+
return /* @__PURE__ */ jsx44(Button, { ...props, ...withPreviewHandlers(preview, { ...props, mood }) });
|
|
6091
6459
|
}
|
|
6092
6460
|
function JellyLink({
|
|
6093
6461
|
mood,
|
|
6094
6462
|
...props
|
|
6095
6463
|
}) {
|
|
6096
6464
|
const preview = useJellyMood();
|
|
6097
|
-
return /* @__PURE__ */
|
|
6465
|
+
return /* @__PURE__ */ jsx44("a", { ...props, ...withPreviewHandlers(preview, { ...props, mood }) });
|
|
6098
6466
|
}
|
|
6099
6467
|
function JellyMascotProvider({
|
|
6100
6468
|
mood = "neutral",
|
|
@@ -6116,7 +6484,7 @@ function JellyMascotProvider({
|
|
|
6116
6484
|
blobProps,
|
|
6117
6485
|
setPreview: setPreviewMood
|
|
6118
6486
|
};
|
|
6119
|
-
return /* @__PURE__ */
|
|
6487
|
+
return /* @__PURE__ */ jsx44(JellyMascotContext.Provider, { value, children });
|
|
6120
6488
|
}
|
|
6121
6489
|
var SIZE_WRAPPER = {
|
|
6122
6490
|
sm: "w-20",
|
|
@@ -6130,24 +6498,24 @@ function JellyMascotFace({
|
|
|
6130
6498
|
}) {
|
|
6131
6499
|
const mascot = React12.useContext(JellyMascotContext);
|
|
6132
6500
|
if (!mascot) return null;
|
|
6133
|
-
return /* @__PURE__ */
|
|
6501
|
+
return /* @__PURE__ */ jsxs24(
|
|
6134
6502
|
"div",
|
|
6135
6503
|
{
|
|
6136
6504
|
"aria-hidden": "true",
|
|
6137
|
-
className:
|
|
6505
|
+
className: cn41(
|
|
6138
6506
|
"flex flex-col items-center select-none",
|
|
6139
6507
|
SIZE_WRAPPER[size],
|
|
6140
6508
|
className
|
|
6141
6509
|
),
|
|
6142
6510
|
children: [
|
|
6143
|
-
mascot.speech ? /* @__PURE__ */
|
|
6511
|
+
mascot.speech ? /* @__PURE__ */ jsx44(
|
|
6144
6512
|
BlobSpeech,
|
|
6145
6513
|
{
|
|
6146
6514
|
mood: mascot.mood,
|
|
6147
6515
|
messages: { [mascot.mood]: mascot.speech }
|
|
6148
6516
|
}
|
|
6149
6517
|
) : null,
|
|
6150
|
-
mascot.mounted ? /* @__PURE__ */
|
|
6518
|
+
mascot.mounted ? /* @__PURE__ */ jsx44(
|
|
6151
6519
|
JellyBlobMascot,
|
|
6152
6520
|
{
|
|
6153
6521
|
...mascot.blobProps,
|
|
@@ -6167,14 +6535,14 @@ function JellyMascot({
|
|
|
6167
6535
|
...config
|
|
6168
6536
|
}) {
|
|
6169
6537
|
const existing = React12.useContext(JellyMascotContext);
|
|
6170
|
-
if (existing) return /* @__PURE__ */
|
|
6171
|
-
return /* @__PURE__ */
|
|
6538
|
+
if (existing) return /* @__PURE__ */ jsx44(JellyMascotFace, { size, className });
|
|
6539
|
+
return /* @__PURE__ */ jsx44(JellyMascotProvider, { ...config, children: /* @__PURE__ */ jsx44(JellyMascotFace, { size, className }) });
|
|
6172
6540
|
}
|
|
6173
6541
|
function JellyGroup({
|
|
6174
6542
|
children,
|
|
6175
6543
|
...config
|
|
6176
6544
|
}) {
|
|
6177
|
-
return /* @__PURE__ */
|
|
6545
|
+
return /* @__PURE__ */ jsx44(JellyMascotProvider, { ...config, children });
|
|
6178
6546
|
}
|
|
6179
6547
|
function JellyEmpty({
|
|
6180
6548
|
title,
|
|
@@ -6184,25 +6552,25 @@ function JellyEmpty({
|
|
|
6184
6552
|
className,
|
|
6185
6553
|
...config
|
|
6186
6554
|
}) {
|
|
6187
|
-
return /* @__PURE__ */
|
|
6188
|
-
/* @__PURE__ */
|
|
6189
|
-
/* @__PURE__ */
|
|
6190
|
-
title ? /* @__PURE__ */
|
|
6191
|
-
description ? /* @__PURE__ */
|
|
6555
|
+
return /* @__PURE__ */ jsx44(JellyMascotProvider, { ...config, children: /* @__PURE__ */ jsxs24(Empty, { className: cn41("gap-4", className), children: [
|
|
6556
|
+
/* @__PURE__ */ jsxs24(EmptyHeader, { className: "gap-2", children: [
|
|
6557
|
+
/* @__PURE__ */ jsx44(JellyMascotFace, { size }),
|
|
6558
|
+
title ? /* @__PURE__ */ jsx44(EmptyTitle, { className: "text-base font-semibold sm:text-lg", children: title }) : null,
|
|
6559
|
+
description ? /* @__PURE__ */ jsx44(EmptyDescription, { className: "max-w-sm", children: description }) : null
|
|
6192
6560
|
] }),
|
|
6193
|
-
actions ? /* @__PURE__ */
|
|
6561
|
+
actions ? /* @__PURE__ */ jsx44(EmptyContent, { children: actions }) : null
|
|
6194
6562
|
] }) });
|
|
6195
6563
|
}
|
|
6196
6564
|
|
|
6197
6565
|
// src/ui/message.tsx
|
|
6198
|
-
import { cn as
|
|
6199
|
-
import { jsx as
|
|
6566
|
+
import { cn as cn42 } from "cn";
|
|
6567
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
6200
6568
|
function MessageGroup({ className, ...props }) {
|
|
6201
|
-
return /* @__PURE__ */
|
|
6569
|
+
return /* @__PURE__ */ jsx45(
|
|
6202
6570
|
"div",
|
|
6203
6571
|
{
|
|
6204
6572
|
"data-slot": "message-group",
|
|
6205
|
-
className:
|
|
6573
|
+
className: cn42("flex min-w-0 flex-col gap-2", className),
|
|
6206
6574
|
...props
|
|
6207
6575
|
}
|
|
6208
6576
|
);
|
|
@@ -6212,12 +6580,12 @@ function Message({
|
|
|
6212
6580
|
align = "start",
|
|
6213
6581
|
...props
|
|
6214
6582
|
}) {
|
|
6215
|
-
return /* @__PURE__ */
|
|
6583
|
+
return /* @__PURE__ */ jsx45(
|
|
6216
6584
|
"div",
|
|
6217
6585
|
{
|
|
6218
6586
|
"data-slot": "message",
|
|
6219
6587
|
"data-align": align,
|
|
6220
|
-
className:
|
|
6588
|
+
className: cn42(
|
|
6221
6589
|
"group/message relative flex w-full min-w-0 gap-2 text-sm data-[align=end]:flex-row-reverse",
|
|
6222
6590
|
className
|
|
6223
6591
|
),
|
|
@@ -6226,11 +6594,11 @@ function Message({
|
|
|
6226
6594
|
);
|
|
6227
6595
|
}
|
|
6228
6596
|
function MessageAvatar({ className, ...props }) {
|
|
6229
|
-
return /* @__PURE__ */
|
|
6597
|
+
return /* @__PURE__ */ jsx45(
|
|
6230
6598
|
"div",
|
|
6231
6599
|
{
|
|
6232
6600
|
"data-slot": "message-avatar",
|
|
6233
|
-
className:
|
|
6601
|
+
className: cn42(
|
|
6234
6602
|
"flex w-fit min-w-8 shrink-0 items-center justify-center self-end overflow-hidden rounded-full bg-muted group-has-data-[slot=message-footer]/message:-translate-y-8",
|
|
6235
6603
|
className
|
|
6236
6604
|
),
|
|
@@ -6239,11 +6607,11 @@ function MessageAvatar({ className, ...props }) {
|
|
|
6239
6607
|
);
|
|
6240
6608
|
}
|
|
6241
6609
|
function MessageContent({ className, ...props }) {
|
|
6242
|
-
return /* @__PURE__ */
|
|
6610
|
+
return /* @__PURE__ */ jsx45(
|
|
6243
6611
|
"div",
|
|
6244
6612
|
{
|
|
6245
6613
|
"data-slot": "message-content",
|
|
6246
|
-
className:
|
|
6614
|
+
className: cn42(
|
|
6247
6615
|
"flex w-full min-w-0 flex-col gap-2.5 wrap-break-word group-data-[align=end]/message:*:data-slot:self-end",
|
|
6248
6616
|
className
|
|
6249
6617
|
),
|
|
@@ -6252,11 +6620,11 @@ function MessageContent({ className, ...props }) {
|
|
|
6252
6620
|
);
|
|
6253
6621
|
}
|
|
6254
6622
|
function MessageHeader({ className, ...props }) {
|
|
6255
|
-
return /* @__PURE__ */
|
|
6623
|
+
return /* @__PURE__ */ jsx45(
|
|
6256
6624
|
"div",
|
|
6257
6625
|
{
|
|
6258
6626
|
"data-slot": "message-header",
|
|
6259
|
-
className:
|
|
6627
|
+
className: cn42(
|
|
6260
6628
|
"flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0",
|
|
6261
6629
|
className
|
|
6262
6630
|
),
|
|
@@ -6265,11 +6633,11 @@ function MessageHeader({ className, ...props }) {
|
|
|
6265
6633
|
);
|
|
6266
6634
|
}
|
|
6267
6635
|
function MessageFooter({ className, ...props }) {
|
|
6268
|
-
return /* @__PURE__ */
|
|
6636
|
+
return /* @__PURE__ */ jsx45(
|
|
6269
6637
|
"div",
|
|
6270
6638
|
{
|
|
6271
6639
|
"data-slot": "message-footer",
|
|
6272
|
-
className:
|
|
6640
|
+
className: cn42(
|
|
6273
6641
|
"flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0 group-data-[align=end]/message:justify-end",
|
|
6274
6642
|
className
|
|
6275
6643
|
),
|
|
@@ -6285,21 +6653,21 @@ import {
|
|
|
6285
6653
|
useMessageScrollerScrollable,
|
|
6286
6654
|
useMessageScrollerVisibility
|
|
6287
6655
|
} from "@shadcn/react/message-scroller";
|
|
6288
|
-
import { cn as
|
|
6656
|
+
import { cn as cn43 } from "cn";
|
|
6289
6657
|
import { ArrowDownIcon } from "lucide-react";
|
|
6290
|
-
import { Fragment as
|
|
6658
|
+
import { Fragment as Fragment4, jsx as jsx46, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
6291
6659
|
function MessageScrollerProvider(props) {
|
|
6292
|
-
return /* @__PURE__ */
|
|
6660
|
+
return /* @__PURE__ */ jsx46(MessageScrollerPrimitive.Provider, { ...props });
|
|
6293
6661
|
}
|
|
6294
6662
|
function MessageScroller({
|
|
6295
6663
|
className,
|
|
6296
6664
|
...props
|
|
6297
6665
|
}) {
|
|
6298
|
-
return /* @__PURE__ */
|
|
6666
|
+
return /* @__PURE__ */ jsx46(
|
|
6299
6667
|
MessageScrollerPrimitive.Root,
|
|
6300
6668
|
{
|
|
6301
6669
|
"data-slot": "message-scroller",
|
|
6302
|
-
className:
|
|
6670
|
+
className: cn43(
|
|
6303
6671
|
"group/message-scroller relative flex size-full min-h-0 flex-col overflow-hidden",
|
|
6304
6672
|
className
|
|
6305
6673
|
),
|
|
@@ -6311,11 +6679,11 @@ function MessageScrollerViewport({
|
|
|
6311
6679
|
className,
|
|
6312
6680
|
...props
|
|
6313
6681
|
}) {
|
|
6314
|
-
return /* @__PURE__ */
|
|
6682
|
+
return /* @__PURE__ */ jsx46(
|
|
6315
6683
|
MessageScrollerPrimitive.Viewport,
|
|
6316
6684
|
{
|
|
6317
6685
|
"data-slot": "message-scroller-viewport",
|
|
6318
|
-
className:
|
|
6686
|
+
className: cn43(
|
|
6319
6687
|
"size-full min-h-0 min-w-0 scroll-fade scrollbar-thin scrollbar-gutter-stable overflow-y-auto overscroll-contain contain-content data-autoscrolling:scrollbar-thumb-transparent data-autoscrolling:scrollbar-track-transparent",
|
|
6320
6688
|
className
|
|
6321
6689
|
),
|
|
@@ -6327,11 +6695,11 @@ function MessageScrollerContent({
|
|
|
6327
6695
|
className,
|
|
6328
6696
|
...props
|
|
6329
6697
|
}) {
|
|
6330
|
-
return /* @__PURE__ */
|
|
6698
|
+
return /* @__PURE__ */ jsx46(
|
|
6331
6699
|
MessageScrollerPrimitive.Content,
|
|
6332
6700
|
{
|
|
6333
6701
|
"data-slot": "message-scroller-content",
|
|
6334
|
-
className:
|
|
6702
|
+
className: cn43("flex h-max min-h-full flex-col gap-6", className),
|
|
6335
6703
|
...props
|
|
6336
6704
|
}
|
|
6337
6705
|
);
|
|
@@ -6341,12 +6709,12 @@ function MessageScrollerItem({
|
|
|
6341
6709
|
scrollAnchor = false,
|
|
6342
6710
|
...props
|
|
6343
6711
|
}) {
|
|
6344
|
-
return /* @__PURE__ */
|
|
6712
|
+
return /* @__PURE__ */ jsx46(
|
|
6345
6713
|
MessageScrollerPrimitive.Item,
|
|
6346
6714
|
{
|
|
6347
6715
|
"data-slot": "message-scroller-item",
|
|
6348
6716
|
scrollAnchor,
|
|
6349
|
-
className:
|
|
6717
|
+
className: cn43(
|
|
6350
6718
|
"min-w-0 shrink-0 [contain-intrinsic-size:auto_10rem] [content-visibility:auto]",
|
|
6351
6719
|
className
|
|
6352
6720
|
),
|
|
@@ -6363,7 +6731,7 @@ function MessageScrollerButton({
|
|
|
6363
6731
|
size = "icon-sm",
|
|
6364
6732
|
...props
|
|
6365
6733
|
}) {
|
|
6366
|
-
return /* @__PURE__ */
|
|
6734
|
+
return /* @__PURE__ */ jsx46(
|
|
6367
6735
|
MessageScrollerPrimitive.Button,
|
|
6368
6736
|
{
|
|
6369
6737
|
"data-slot": "message-scroller-button",
|
|
@@ -6371,32 +6739,32 @@ function MessageScrollerButton({
|
|
|
6371
6739
|
"data-variant": variant,
|
|
6372
6740
|
"data-size": size,
|
|
6373
6741
|
direction,
|
|
6374
|
-
className:
|
|
6742
|
+
className: cn43(
|
|
6375
6743
|
"data-[active=true]:ease-out-quint absolute inset-s-1/2 -translate-x-1/2 border-border bg-background text-foreground transition-[translate,scale,opacity] duration-200 hover:bg-muted hover:text-foreground data-[active=false]:pointer-events-none data-[active=false]:scale-95 data-[active=false]:opacity-0 data-[active=false]:duration-400 data-[active=false]:ease-[cubic-bezier(0.7,0,0.84,0)] data-[active=true]:translate-y-0 data-[active=true]:scale-100 data-[active=true]:opacity-100 data-[direction=end]:bottom-4 data-[direction=end]:data-[active=false]:translate-y-full data-[direction=start]:top-4 data-[direction=start]:data-[active=false]:-translate-y-full rtl:translate-x-1/2 data-[direction=start]:[&_svg]:rotate-180",
|
|
6376
6744
|
className
|
|
6377
6745
|
),
|
|
6378
|
-
render: render ?? /* @__PURE__ */
|
|
6746
|
+
render: render ?? /* @__PURE__ */ jsx46(Button, { variant, size }),
|
|
6379
6747
|
...props,
|
|
6380
|
-
children: children ?? /* @__PURE__ */
|
|
6381
|
-
/* @__PURE__ */
|
|
6382
|
-
/* @__PURE__ */
|
|
6748
|
+
children: children ?? /* @__PURE__ */ jsxs25(Fragment4, { children: [
|
|
6749
|
+
/* @__PURE__ */ jsx46(ArrowDownIcon, {}),
|
|
6750
|
+
/* @__PURE__ */ jsx46("span", { className: "sr-only", children: direction === "end" ? "Scroll to end" : "Scroll to start" })
|
|
6383
6751
|
] })
|
|
6384
6752
|
}
|
|
6385
6753
|
);
|
|
6386
6754
|
}
|
|
6387
6755
|
|
|
6388
6756
|
// src/ui/numberstepper.tsx
|
|
6389
|
-
import { cn as
|
|
6757
|
+
import { cn as cn44 } from "cn";
|
|
6390
6758
|
import { AnimatePresence as AnimatePresence2, motion as motion6, useReducedMotion } from "motion/react";
|
|
6391
6759
|
import {
|
|
6392
|
-
forwardRef as
|
|
6760
|
+
forwardRef as forwardRef4,
|
|
6393
6761
|
useEffect as useEffect6,
|
|
6394
6762
|
useId as useId3,
|
|
6395
|
-
useLayoutEffect,
|
|
6763
|
+
useLayoutEffect as useLayoutEffect2,
|
|
6396
6764
|
useRef as useRef4,
|
|
6397
6765
|
useState as useState8
|
|
6398
6766
|
} from "react";
|
|
6399
|
-
import { jsx as
|
|
6767
|
+
import { jsx as jsx47, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
6400
6768
|
var EASE_OUT = [0.23, 1, 0.32, 1];
|
|
6401
6769
|
var ROLL = { duration: 0.18, ease: EASE_OUT };
|
|
6402
6770
|
var SLIDE = { type: "spring", visualDuration: 0.2, bounce: 0 };
|
|
@@ -6450,15 +6818,15 @@ function RollingNumber({
|
|
|
6450
6818
|
}) {
|
|
6451
6819
|
const direction = useDirection(value);
|
|
6452
6820
|
const chars = [...format(value)];
|
|
6453
|
-
return /* @__PURE__ */
|
|
6821
|
+
return /* @__PURE__ */ jsx47(
|
|
6454
6822
|
"span",
|
|
6455
6823
|
{
|
|
6456
6824
|
"aria-hidden": true,
|
|
6457
|
-
className:
|
|
6458
|
-
children: /* @__PURE__ */
|
|
6825
|
+
className: cn44("relative inline-flex tabular-nums", className),
|
|
6826
|
+
children: /* @__PURE__ */ jsx47(AnimatePresence2, { mode: "popLayout", initial: false, custom: direction, children: chars.map((char, index) => {
|
|
6459
6827
|
const place = chars.length - index;
|
|
6460
6828
|
const digit = /\d/.test(char);
|
|
6461
|
-
return /* @__PURE__ */
|
|
6829
|
+
return /* @__PURE__ */ jsx47(Place, { digit, children: digit ? /* @__PURE__ */ jsx47(Digit, { char, direction }) : char }, digit ? `d${place}` : `s${place}${char}`);
|
|
6462
6830
|
}) })
|
|
6463
6831
|
}
|
|
6464
6832
|
);
|
|
@@ -6468,7 +6836,7 @@ function Place({
|
|
|
6468
6836
|
children
|
|
6469
6837
|
}) {
|
|
6470
6838
|
const reduceMotion = useReducedMotion();
|
|
6471
|
-
return /* @__PURE__ */
|
|
6839
|
+
return /* @__PURE__ */ jsx47(
|
|
6472
6840
|
motion6.span,
|
|
6473
6841
|
{
|
|
6474
6842
|
layout: reduceMotion ? false : "position",
|
|
@@ -6480,7 +6848,7 @@ function Place({
|
|
|
6480
6848
|
transition: { duration: 0.1 }
|
|
6481
6849
|
},
|
|
6482
6850
|
transition: { ...ROLL, layout: SLIDE },
|
|
6483
|
-
className:
|
|
6851
|
+
className: cn44("inline-grid", digit && "overflow-hidden"),
|
|
6484
6852
|
children
|
|
6485
6853
|
}
|
|
6486
6854
|
);
|
|
@@ -6488,7 +6856,7 @@ function Place({
|
|
|
6488
6856
|
function Digit({ char, direction }) {
|
|
6489
6857
|
const reduceMotion = useReducedMotion();
|
|
6490
6858
|
const offset = (value) => reduceMotion ? "0%" : `${value * 100}%`;
|
|
6491
|
-
return /* @__PURE__ */
|
|
6859
|
+
return /* @__PURE__ */ jsx47(AnimatePresence2, { initial: false, custom: direction, children: /* @__PURE__ */ jsx47(
|
|
6492
6860
|
motion6.span,
|
|
6493
6861
|
{
|
|
6494
6862
|
custom: direction,
|
|
@@ -6516,7 +6884,7 @@ function Digit({ char, direction }) {
|
|
|
6516
6884
|
char
|
|
6517
6885
|
) });
|
|
6518
6886
|
}
|
|
6519
|
-
var NumberStepper =
|
|
6887
|
+
var NumberStepper = forwardRef4(
|
|
6520
6888
|
function NumberStepper2({
|
|
6521
6889
|
label,
|
|
6522
6890
|
value,
|
|
@@ -6544,7 +6912,7 @@ var NumberStepper = forwardRef3(
|
|
|
6544
6912
|
max,
|
|
6545
6913
|
disabled
|
|
6546
6914
|
});
|
|
6547
|
-
|
|
6915
|
+
useLayoutEffect2(() => {
|
|
6548
6916
|
latest.current = {
|
|
6549
6917
|
value,
|
|
6550
6918
|
onChange,
|
|
@@ -6612,7 +6980,7 @@ var NumberStepper = forwardRef3(
|
|
|
6612
6980
|
if (Number.isNaN(parsed)) return;
|
|
6613
6981
|
setTo(parsed, parsed > latest.current.value ? 1 : -1);
|
|
6614
6982
|
};
|
|
6615
|
-
const button = (delta, atLimit, name, path) => /* @__PURE__ */
|
|
6983
|
+
const button = (delta, atLimit, name, path) => /* @__PURE__ */ jsx47(
|
|
6616
6984
|
"button",
|
|
6617
6985
|
{
|
|
6618
6986
|
type: "button",
|
|
@@ -6636,13 +7004,13 @@ var NumberStepper = forwardRef3(
|
|
|
6636
7004
|
stepBy(delta);
|
|
6637
7005
|
}
|
|
6638
7006
|
},
|
|
6639
|
-
className:
|
|
7007
|
+
className: cn44(
|
|
6640
7008
|
"flex shrink-0 touch-manipulation items-center justify-center rounded-full text-foreground outline-hidden select-none",
|
|
6641
7009
|
styles.button,
|
|
6642
7010
|
"transition-[scale,opacity,background-color] duration-150 ease-out hover:bg-foreground/6 active:scale-[0.96] motion-reduce:transition-[opacity,background-color]",
|
|
6643
7011
|
(disabled || atLimit) && "opacity-35 hover:bg-transparent"
|
|
6644
7012
|
),
|
|
6645
|
-
children: /* @__PURE__ */
|
|
7013
|
+
children: /* @__PURE__ */ jsx47(
|
|
6646
7014
|
"svg",
|
|
6647
7015
|
{
|
|
6648
7016
|
viewBox: "0 0 16 16",
|
|
@@ -6652,18 +7020,18 @@ var NumberStepper = forwardRef3(
|
|
|
6652
7020
|
stroke: "currentColor",
|
|
6653
7021
|
strokeWidth: 1.5,
|
|
6654
7022
|
strokeLinecap: "round",
|
|
6655
|
-
children: /* @__PURE__ */
|
|
7023
|
+
children: /* @__PURE__ */ jsx47("path", { d: path })
|
|
6656
7024
|
}
|
|
6657
7025
|
)
|
|
6658
7026
|
}
|
|
6659
7027
|
);
|
|
6660
7028
|
const editing = draft !== null;
|
|
6661
7029
|
const styles = sizeStyles[size];
|
|
6662
|
-
return /* @__PURE__ */
|
|
7030
|
+
return /* @__PURE__ */ jsxs26(
|
|
6663
7031
|
"div",
|
|
6664
7032
|
{
|
|
6665
7033
|
"data-slot": "input-group",
|
|
6666
|
-
className:
|
|
7034
|
+
className: cn44(
|
|
6667
7035
|
"shadow-raised inline-flex items-center rounded-full border",
|
|
6668
7036
|
disabled && "opacity-50",
|
|
6669
7037
|
styles.container,
|
|
@@ -6671,13 +7039,13 @@ var NumberStepper = forwardRef3(
|
|
|
6671
7039
|
),
|
|
6672
7040
|
children: [
|
|
6673
7041
|
button(-step, value <= min, "Decrease", "M3.5 8h9"),
|
|
6674
|
-
/* @__PURE__ */
|
|
7042
|
+
/* @__PURE__ */ jsxs26(
|
|
6675
7043
|
"span",
|
|
6676
7044
|
{
|
|
6677
7045
|
ref: valueRef,
|
|
6678
|
-
className:
|
|
7046
|
+
className: cn44("relative grid place-items-center", styles.value),
|
|
6679
7047
|
children: [
|
|
6680
|
-
/* @__PURE__ */
|
|
7048
|
+
/* @__PURE__ */ jsx47(
|
|
6681
7049
|
"input",
|
|
6682
7050
|
{
|
|
6683
7051
|
ref,
|
|
@@ -6728,18 +7096,18 @@ var NumberStepper = forwardRef3(
|
|
|
6728
7096
|
setDraft(null);
|
|
6729
7097
|
}
|
|
6730
7098
|
},
|
|
6731
|
-
className:
|
|
7099
|
+
className: cn44(
|
|
6732
7100
|
"col-start-1 row-start-1 w-full bg-transparent text-center font-medium tabular-nums caret-foreground outline-hidden",
|
|
6733
7101
|
styles.text,
|
|
6734
7102
|
editing ? "text-foreground" : "text-transparent"
|
|
6735
7103
|
)
|
|
6736
7104
|
}
|
|
6737
7105
|
),
|
|
6738
|
-
!editing && /* @__PURE__ */
|
|
7106
|
+
!editing && /* @__PURE__ */ jsx47(
|
|
6739
7107
|
RollingNumber,
|
|
6740
7108
|
{
|
|
6741
7109
|
value,
|
|
6742
|
-
className:
|
|
7110
|
+
className: cn44(
|
|
6743
7111
|
"pointer-events-none col-start-1 row-start-1 font-medium text-foreground",
|
|
6744
7112
|
styles.text
|
|
6745
7113
|
)
|
|
@@ -6756,15 +7124,15 @@ var NumberStepper = forwardRef3(
|
|
|
6756
7124
|
);
|
|
6757
7125
|
|
|
6758
7126
|
// src/ui/otp.tsx
|
|
6759
|
-
import { cn as
|
|
7127
|
+
import { cn as cn45 } from "cn";
|
|
6760
7128
|
import {
|
|
6761
7129
|
AnimatePresence as AnimatePresence3,
|
|
6762
7130
|
animate,
|
|
6763
7131
|
motion as motion7,
|
|
6764
7132
|
useReducedMotion as useReducedMotion2
|
|
6765
7133
|
} from "motion/react";
|
|
6766
|
-
import { Fragment as
|
|
6767
|
-
import { jsx as
|
|
7134
|
+
import { Fragment as Fragment5, useEffect as useEffect7, useId as useId4, useRef as useRef5, useState as useState9 } from "react";
|
|
7135
|
+
import { jsx as jsx48, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
6768
7136
|
var EASE_OUT2 = [0.16, 1, 0.3, 1];
|
|
6769
7137
|
var EASE_IN_OUT = [0.77, 0, 0.175, 1];
|
|
6770
7138
|
var EASE_DRAWER = [0.32, 0.72, 0, 1];
|
|
@@ -6929,8 +7297,8 @@ function OTPInput2({
|
|
|
6929
7297
|
const showSuccess = status === "success";
|
|
6930
7298
|
const activeIndex = focused ? active : -1;
|
|
6931
7299
|
const message = showSuccess ? successMessage : status === "error" ? errorMessage : hint;
|
|
6932
|
-
return /* @__PURE__ */
|
|
6933
|
-
label ? /* @__PURE__ */
|
|
7300
|
+
return /* @__PURE__ */ jsxs27("div", { className: cn45("inline-flex flex-col gap-2", className), children: [
|
|
7301
|
+
label ? /* @__PURE__ */ jsx48(
|
|
6934
7302
|
"label",
|
|
6935
7303
|
{
|
|
6936
7304
|
htmlFor: `${uid}-input`,
|
|
@@ -6938,7 +7306,7 @@ function OTPInput2({
|
|
|
6938
7306
|
children: label
|
|
6939
7307
|
}
|
|
6940
7308
|
) : null,
|
|
6941
|
-
/* @__PURE__ */
|
|
7309
|
+
/* @__PURE__ */ jsxs27(
|
|
6942
7310
|
"div",
|
|
6943
7311
|
{
|
|
6944
7312
|
className: "relative inline-flex w-max",
|
|
@@ -6951,7 +7319,7 @@ function OTPInput2({
|
|
|
6951
7319
|
inputRef.current?.focus();
|
|
6952
7320
|
},
|
|
6953
7321
|
children: [
|
|
6954
|
-
/* @__PURE__ */
|
|
7322
|
+
/* @__PURE__ */ jsx48(
|
|
6955
7323
|
"input",
|
|
6956
7324
|
{
|
|
6957
7325
|
ref: inputRef,
|
|
@@ -6978,24 +7346,24 @@ function OTPInput2({
|
|
|
6978
7346
|
className: "absolute inset-0 z-20 h-full w-full cursor-text bg-transparent text-transparent caret-transparent opacity-0 outline-none disabled:cursor-not-allowed"
|
|
6979
7347
|
}
|
|
6980
7348
|
),
|
|
6981
|
-
/* @__PURE__ */
|
|
7349
|
+
/* @__PURE__ */ jsx48("div", { ref: slotsRef, className: "flex items-center gap-3", children: Array.from({ length }, (_, i) => {
|
|
6982
7350
|
const char = slots[i] ?? "";
|
|
6983
7351
|
const isActive = i === activeIndex;
|
|
6984
|
-
return /* @__PURE__ */
|
|
6985
|
-
/* @__PURE__ */
|
|
7352
|
+
return /* @__PURE__ */ jsxs27(Fragment5, { children: [
|
|
7353
|
+
/* @__PURE__ */ jsxs27(
|
|
6986
7354
|
"div",
|
|
6987
7355
|
{
|
|
6988
7356
|
"data-otp-slot": true,
|
|
6989
7357
|
"data-active": isActive,
|
|
6990
7358
|
"data-filled": char !== "",
|
|
6991
|
-
className:
|
|
7359
|
+
className: cn45(
|
|
6992
7360
|
"relative grid size-11 place-items-center overflow-hidden rounded-xl border bg-card text-xl font-semibold tabular-nums transition-colors duration-200",
|
|
6993
7361
|
showSuccess ? "border-emerald-500/60 text-foreground" : status === "error" ? "border-destructive/60 text-foreground" : char ? "border-border-strong text-foreground" : "border-border text-muted-foreground",
|
|
6994
7362
|
isActive && !showSuccess && status !== "error" && "border-2 border-brand ring-0",
|
|
6995
7363
|
disabled && "opacity-50"
|
|
6996
7364
|
),
|
|
6997
7365
|
children: [
|
|
6998
|
-
isActive && !showSuccess ? /* @__PURE__ */
|
|
7366
|
+
isActive && !showSuccess ? /* @__PURE__ */ jsx48(
|
|
6999
7367
|
motion7.span,
|
|
7000
7368
|
{
|
|
7001
7369
|
"aria-hidden": true,
|
|
@@ -7005,13 +7373,13 @@ function OTPInput2({
|
|
|
7005
7373
|
repeat: Number.POSITIVE_INFINITY,
|
|
7006
7374
|
ease: "linear"
|
|
7007
7375
|
},
|
|
7008
|
-
className:
|
|
7376
|
+
className: cn45(
|
|
7009
7377
|
"pointer-events-none absolute top-1/2 h-6 w-px -translate-y-1/2 bg-brand",
|
|
7010
7378
|
char ? "right-3" : "left-1/2 -translate-x-1/2"
|
|
7011
7379
|
)
|
|
7012
7380
|
}
|
|
7013
7381
|
) : null,
|
|
7014
|
-
/* @__PURE__ */
|
|
7382
|
+
/* @__PURE__ */ jsx48(AnimatePresence3, { initial: false, children: char ? /* @__PURE__ */ jsx48(
|
|
7015
7383
|
motion7.span,
|
|
7016
7384
|
{
|
|
7017
7385
|
initial: reduce ? {
|
|
@@ -7049,10 +7417,10 @@ function OTPInput2({
|
|
|
7049
7417
|
]
|
|
7050
7418
|
}
|
|
7051
7419
|
),
|
|
7052
|
-
i === 2 ? /* @__PURE__ */
|
|
7420
|
+
i === 2 ? /* @__PURE__ */ jsx48("span", { "aria-hidden": "true", className: "h-0.5 w-4 bg-primary" }) : null
|
|
7053
7421
|
] }, `${uid}-${i}`);
|
|
7054
7422
|
}) }),
|
|
7055
|
-
/* @__PURE__ */
|
|
7423
|
+
/* @__PURE__ */ jsx48(AnimatePresence3, { children: showSuccess ? /* @__PURE__ */ jsx48(
|
|
7056
7424
|
motion7.span,
|
|
7057
7425
|
{
|
|
7058
7426
|
initial: reduce ? {
|
|
@@ -7082,7 +7450,7 @@ function OTPInput2({
|
|
|
7082
7450
|
},
|
|
7083
7451
|
className: "pointer-events-none absolute top-1/2 -right-7 -translate-y-1/2 text-emerald-500",
|
|
7084
7452
|
"aria-hidden": true,
|
|
7085
|
-
children: /* @__PURE__ */
|
|
7453
|
+
children: /* @__PURE__ */ jsxs27(
|
|
7086
7454
|
"svg",
|
|
7087
7455
|
{
|
|
7088
7456
|
width: "20",
|
|
@@ -7094,8 +7462,8 @@ function OTPInput2({
|
|
|
7094
7462
|
strokeLinecap: "round",
|
|
7095
7463
|
strokeLinejoin: "round",
|
|
7096
7464
|
children: [
|
|
7097
|
-
/* @__PURE__ */
|
|
7098
|
-
/* @__PURE__ */
|
|
7465
|
+
/* @__PURE__ */ jsx48("title", { children: "Verified" }),
|
|
7466
|
+
/* @__PURE__ */ jsx48(
|
|
7099
7467
|
motion7.path,
|
|
7100
7468
|
{
|
|
7101
7469
|
d: "M5 13l4 4L19 7",
|
|
@@ -7124,11 +7492,11 @@ function OTPInput2({
|
|
|
7124
7492
|
]
|
|
7125
7493
|
}
|
|
7126
7494
|
),
|
|
7127
|
-
message ? /* @__PURE__ */
|
|
7495
|
+
message ? /* @__PURE__ */ jsx48(
|
|
7128
7496
|
"p",
|
|
7129
7497
|
{
|
|
7130
7498
|
"aria-live": "polite",
|
|
7131
|
-
className:
|
|
7499
|
+
className: cn45(
|
|
7132
7500
|
"text-sm",
|
|
7133
7501
|
showSuccess ? "text-emerald-500" : status === "error" ? "text-destructive" : "text-muted-foreground"
|
|
7134
7502
|
),
|
|
@@ -7147,13 +7515,13 @@ function toSlots(raw, length) {
|
|
|
7147
7515
|
|
|
7148
7516
|
// src/ui/popover.tsx
|
|
7149
7517
|
import { Popover as PopoverPrimitive } from "@base-ui/react/popover";
|
|
7150
|
-
import { cn as
|
|
7151
|
-
import { jsx as
|
|
7518
|
+
import { cn as cn46 } from "cn";
|
|
7519
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
7152
7520
|
function Popover({ ...props }) {
|
|
7153
|
-
return /* @__PURE__ */
|
|
7521
|
+
return /* @__PURE__ */ jsx49(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
7154
7522
|
}
|
|
7155
7523
|
function PopoverTrigger({ ...props }) {
|
|
7156
|
-
return /* @__PURE__ */
|
|
7524
|
+
return /* @__PURE__ */ jsx49(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
7157
7525
|
}
|
|
7158
7526
|
function PopoverContent({
|
|
7159
7527
|
className,
|
|
@@ -7163,7 +7531,7 @@ function PopoverContent({
|
|
|
7163
7531
|
sideOffset = 4,
|
|
7164
7532
|
...props
|
|
7165
7533
|
}) {
|
|
7166
|
-
return /* @__PURE__ */
|
|
7534
|
+
return /* @__PURE__ */ jsx49(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx49(
|
|
7167
7535
|
PopoverPrimitive.Positioner,
|
|
7168
7536
|
{
|
|
7169
7537
|
align,
|
|
@@ -7171,11 +7539,11 @@ function PopoverContent({
|
|
|
7171
7539
|
side,
|
|
7172
7540
|
sideOffset,
|
|
7173
7541
|
className: "isolate z-50",
|
|
7174
|
-
children: /* @__PURE__ */
|
|
7542
|
+
children: /* @__PURE__ */ jsx49(
|
|
7175
7543
|
PopoverPrimitive.Popup,
|
|
7176
7544
|
{
|
|
7177
7545
|
"data-slot": "popover-content",
|
|
7178
|
-
className:
|
|
7546
|
+
className: cn46(
|
|
7179
7547
|
"z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-background p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
7180
7548
|
className
|
|
7181
7549
|
),
|
|
@@ -7186,21 +7554,21 @@ function PopoverContent({
|
|
|
7186
7554
|
) });
|
|
7187
7555
|
}
|
|
7188
7556
|
function PopoverHeader({ className, ...props }) {
|
|
7189
|
-
return /* @__PURE__ */
|
|
7557
|
+
return /* @__PURE__ */ jsx49(
|
|
7190
7558
|
"div",
|
|
7191
7559
|
{
|
|
7192
7560
|
"data-slot": "popover-header",
|
|
7193
|
-
className:
|
|
7561
|
+
className: cn46("flex flex-col gap-0.5 text-sm", className),
|
|
7194
7562
|
...props
|
|
7195
7563
|
}
|
|
7196
7564
|
);
|
|
7197
7565
|
}
|
|
7198
7566
|
function PopoverTitle({ className, ...props }) {
|
|
7199
|
-
return /* @__PURE__ */
|
|
7567
|
+
return /* @__PURE__ */ jsx49(
|
|
7200
7568
|
PopoverPrimitive.Title,
|
|
7201
7569
|
{
|
|
7202
7570
|
"data-slot": "popover-title",
|
|
7203
|
-
className:
|
|
7571
|
+
className: cn46("font-medium", className),
|
|
7204
7572
|
...props
|
|
7205
7573
|
}
|
|
7206
7574
|
);
|
|
@@ -7209,11 +7577,11 @@ function PopoverDescription({
|
|
|
7209
7577
|
className,
|
|
7210
7578
|
...props
|
|
7211
7579
|
}) {
|
|
7212
|
-
return /* @__PURE__ */
|
|
7580
|
+
return /* @__PURE__ */ jsx49(
|
|
7213
7581
|
PopoverPrimitive.Description,
|
|
7214
7582
|
{
|
|
7215
7583
|
"data-slot": "popover-description",
|
|
7216
|
-
className:
|
|
7584
|
+
className: cn46("text-muted-foreground", className),
|
|
7217
7585
|
...props
|
|
7218
7586
|
}
|
|
7219
7587
|
);
|
|
@@ -7223,11 +7591,11 @@ function PopoverDescription({
|
|
|
7223
7591
|
import { NumberField } from "@base-ui/react/number-field";
|
|
7224
7592
|
import { Minus, Plus } from "@gravity-ui/icons";
|
|
7225
7593
|
import * as React13 from "react";
|
|
7226
|
-
import { jsx as
|
|
7594
|
+
import { jsx as jsx50, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
7227
7595
|
var QuantityInput = React13.forwardRef(function QuantityInput2({ ...props }, ref) {
|
|
7228
7596
|
const id = React13.useId();
|
|
7229
|
-
return /* @__PURE__ */
|
|
7230
|
-
/* @__PURE__ */
|
|
7597
|
+
return /* @__PURE__ */ jsx50(NumberField.Root, { id, ...props, className: "flex flex-col items-start", children: /* @__PURE__ */ jsxs28(NumberField.Group, { className: "flex h-8 gap-1", children: [
|
|
7598
|
+
/* @__PURE__ */ jsx50(
|
|
7231
7599
|
NumberField.Decrement,
|
|
7232
7600
|
{
|
|
7233
7601
|
className: buttonVariants({
|
|
@@ -7235,10 +7603,10 @@ var QuantityInput = React13.forwardRef(function QuantityInput2({ ...props }, ref
|
|
|
7235
7603
|
size: "icon-sm",
|
|
7236
7604
|
className: "rounded-full! border-border!"
|
|
7237
7605
|
}),
|
|
7238
|
-
children: /* @__PURE__ */
|
|
7606
|
+
children: /* @__PURE__ */ jsx50(Minus, {})
|
|
7239
7607
|
}
|
|
7240
7608
|
),
|
|
7241
|
-
/* @__PURE__ */
|
|
7609
|
+
/* @__PURE__ */ jsx50(
|
|
7242
7610
|
NumberField.Input,
|
|
7243
7611
|
{
|
|
7244
7612
|
ref,
|
|
@@ -7246,7 +7614,7 @@ var QuantityInput = React13.forwardRef(function QuantityInput2({ ...props }, ref
|
|
|
7246
7614
|
"data-no-ring": true
|
|
7247
7615
|
}
|
|
7248
7616
|
),
|
|
7249
|
-
/* @__PURE__ */
|
|
7617
|
+
/* @__PURE__ */ jsx50(
|
|
7250
7618
|
NumberField.Increment,
|
|
7251
7619
|
{
|
|
7252
7620
|
className: buttonVariants({
|
|
@@ -7254,7 +7622,7 @@ var QuantityInput = React13.forwardRef(function QuantityInput2({ ...props }, ref
|
|
|
7254
7622
|
size: "icon-sm",
|
|
7255
7623
|
className: "rounded-full! border-border!"
|
|
7256
7624
|
}),
|
|
7257
|
-
children: /* @__PURE__ */
|
|
7625
|
+
children: /* @__PURE__ */ jsx50(Plus, {})
|
|
7258
7626
|
}
|
|
7259
7627
|
)
|
|
7260
7628
|
] }) });
|
|
@@ -7263,34 +7631,34 @@ var QuantityInput = React13.forwardRef(function QuantityInput2({ ...props }, ref
|
|
|
7263
7631
|
// src/ui/radio-group.tsx
|
|
7264
7632
|
import { Radio as RadioPrimitive } from "@base-ui/react/radio";
|
|
7265
7633
|
import { RadioGroup as RadioGroupPrimitive } from "@base-ui/react/radio-group";
|
|
7266
|
-
import { cn as
|
|
7267
|
-
import { jsx as
|
|
7634
|
+
import { cn as cn47 } from "cn";
|
|
7635
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
7268
7636
|
function RadioGroup({ className, ...props }) {
|
|
7269
|
-
return /* @__PURE__ */
|
|
7637
|
+
return /* @__PURE__ */ jsx51(
|
|
7270
7638
|
RadioGroupPrimitive,
|
|
7271
7639
|
{
|
|
7272
7640
|
"data-slot": "radio-group",
|
|
7273
|
-
className:
|
|
7641
|
+
className: cn47("grid w-full gap-2", className),
|
|
7274
7642
|
...props
|
|
7275
7643
|
}
|
|
7276
7644
|
);
|
|
7277
7645
|
}
|
|
7278
7646
|
function RadioGroupItem({ className, ...props }) {
|
|
7279
|
-
return /* @__PURE__ */
|
|
7647
|
+
return /* @__PURE__ */ jsx51(
|
|
7280
7648
|
RadioPrimitive.Root,
|
|
7281
7649
|
{
|
|
7282
7650
|
"data-slot": "radio-group-item",
|
|
7283
|
-
className:
|
|
7651
|
+
className: cn47(
|
|
7284
7652
|
"group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",
|
|
7285
7653
|
className
|
|
7286
7654
|
),
|
|
7287
7655
|
...props,
|
|
7288
|
-
children: /* @__PURE__ */
|
|
7656
|
+
children: /* @__PURE__ */ jsx51(
|
|
7289
7657
|
RadioPrimitive.Indicator,
|
|
7290
7658
|
{
|
|
7291
7659
|
"data-slot": "radio-group-indicator",
|
|
7292
7660
|
className: "flex size-4 items-center justify-center",
|
|
7293
|
-
children: /* @__PURE__ */
|
|
7661
|
+
children: /* @__PURE__ */ jsx51("span", { className: "absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground" })
|
|
7294
7662
|
}
|
|
7295
7663
|
)
|
|
7296
7664
|
}
|
|
@@ -7298,18 +7666,18 @@ function RadioGroupItem({ className, ...props }) {
|
|
|
7298
7666
|
}
|
|
7299
7667
|
|
|
7300
7668
|
// src/ui/resizable.tsx
|
|
7301
|
-
import { cn as
|
|
7669
|
+
import { cn as cn48 } from "cn";
|
|
7302
7670
|
import * as ResizablePrimitive from "react-resizable-panels";
|
|
7303
|
-
import { jsx as
|
|
7671
|
+
import { jsx as jsx52, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
7304
7672
|
function ResizablePanelGroup({
|
|
7305
7673
|
className,
|
|
7306
7674
|
...props
|
|
7307
7675
|
}) {
|
|
7308
|
-
return /* @__PURE__ */
|
|
7676
|
+
return /* @__PURE__ */ jsx52(
|
|
7309
7677
|
ResizablePrimitive.Group,
|
|
7310
7678
|
{
|
|
7311
7679
|
"data-slot": "resizable-panel-group",
|
|
7312
|
-
className:
|
|
7680
|
+
className: cn48(
|
|
7313
7681
|
"flex h-full w-full aria-[orientation=vertical]:flex-col",
|
|
7314
7682
|
className
|
|
7315
7683
|
),
|
|
@@ -7318,26 +7686,26 @@ function ResizablePanelGroup({
|
|
|
7318
7686
|
);
|
|
7319
7687
|
}
|
|
7320
7688
|
function ResizablePanel({ ...props }) {
|
|
7321
|
-
return /* @__PURE__ */
|
|
7689
|
+
return /* @__PURE__ */ jsx52(ResizablePrimitive.Panel, { "data-slot": "resizable-panel", ...props });
|
|
7322
7690
|
}
|
|
7323
7691
|
function ResizableHandle({
|
|
7324
7692
|
withHandle,
|
|
7325
7693
|
className,
|
|
7326
7694
|
...props
|
|
7327
7695
|
}) {
|
|
7328
|
-
return /* @__PURE__ */
|
|
7696
|
+
return /* @__PURE__ */ jsx52(
|
|
7329
7697
|
ResizablePrimitive.Separator,
|
|
7330
7698
|
{
|
|
7331
7699
|
"data-slot": "resizable-handle",
|
|
7332
|
-
className:
|
|
7700
|
+
className: cn48(
|
|
7333
7701
|
"relative mx-0.5 flex w-px items-center justify-center",
|
|
7334
7702
|
className
|
|
7335
7703
|
),
|
|
7336
7704
|
...props,
|
|
7337
|
-
children: withHandle && /* @__PURE__ */
|
|
7338
|
-
/* @__PURE__ */
|
|
7339
|
-
/* @__PURE__ */
|
|
7340
|
-
/* @__PURE__ */
|
|
7705
|
+
children: withHandle && /* @__PURE__ */ jsxs29("div", { className: "flex cursor-col-resize flex-col gap-[4px]", children: [
|
|
7706
|
+
/* @__PURE__ */ jsx52("span", { className: "size-[2px] rounded-full bg-muted-foreground/60" }),
|
|
7707
|
+
/* @__PURE__ */ jsx52("span", { className: "size-[2px] rounded-full bg-muted-foreground/60" }),
|
|
7708
|
+
/* @__PURE__ */ jsx52("span", { className: "size-[2px] rounded-full bg-muted-foreground/60" })
|
|
7341
7709
|
] })
|
|
7342
7710
|
}
|
|
7343
7711
|
);
|
|
@@ -7345,26 +7713,26 @@ function ResizableHandle({
|
|
|
7345
7713
|
|
|
7346
7714
|
// src/ui/select.tsx
|
|
7347
7715
|
import { Select as SelectPrimitive } from "@base-ui/react/select";
|
|
7348
|
-
import { cn as
|
|
7716
|
+
import { cn as cn49 } from "cn";
|
|
7349
7717
|
import { Check as Check3, ChevronDown as ChevronDown3, ChevronUp as ChevronUp2 } from "@gravity-ui/icons";
|
|
7350
|
-
import { jsx as
|
|
7718
|
+
import { jsx as jsx53, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
7351
7719
|
var Select = SelectPrimitive.Root;
|
|
7352
7720
|
function SelectGroup({ className, ...props }) {
|
|
7353
|
-
return /* @__PURE__ */
|
|
7721
|
+
return /* @__PURE__ */ jsx53(
|
|
7354
7722
|
SelectPrimitive.Group,
|
|
7355
7723
|
{
|
|
7356
7724
|
"data-slot": "select-group",
|
|
7357
|
-
className:
|
|
7725
|
+
className: cn49("scroll-my-1 p-1", className),
|
|
7358
7726
|
...props
|
|
7359
7727
|
}
|
|
7360
7728
|
);
|
|
7361
7729
|
}
|
|
7362
7730
|
function SelectValue({ className, ...props }) {
|
|
7363
|
-
return /* @__PURE__ */
|
|
7731
|
+
return /* @__PURE__ */ jsx53(
|
|
7364
7732
|
SelectPrimitive.Value,
|
|
7365
7733
|
{
|
|
7366
7734
|
"data-slot": "select-value",
|
|
7367
|
-
className:
|
|
7735
|
+
className: cn49("flex flex-1 text-left", className),
|
|
7368
7736
|
...props
|
|
7369
7737
|
}
|
|
7370
7738
|
);
|
|
@@ -7375,22 +7743,22 @@ function SelectTrigger({
|
|
|
7375
7743
|
children,
|
|
7376
7744
|
...props
|
|
7377
7745
|
}) {
|
|
7378
|
-
return /* @__PURE__ */
|
|
7746
|
+
return /* @__PURE__ */ jsxs30(
|
|
7379
7747
|
SelectPrimitive.Trigger,
|
|
7380
7748
|
{
|
|
7381
7749
|
"data-slot": "select-trigger",
|
|
7382
7750
|
"data-size": size,
|
|
7383
|
-
className:
|
|
7751
|
+
className: cn49(
|
|
7384
7752
|
"flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:ring-2 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-placeholder:text-muted-foreground data-[size=default]:h-8 *:data-[slot=select-value]:line-clamp-1 dark:hover:bg-input/50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
7385
7753
|
className
|
|
7386
7754
|
),
|
|
7387
7755
|
...props,
|
|
7388
7756
|
children: [
|
|
7389
7757
|
children,
|
|
7390
|
-
/* @__PURE__ */
|
|
7758
|
+
/* @__PURE__ */ jsx53(
|
|
7391
7759
|
SelectPrimitive.Icon,
|
|
7392
7760
|
{
|
|
7393
|
-
render: /* @__PURE__ */
|
|
7761
|
+
render: /* @__PURE__ */ jsx53(ChevronDown3, { className: "pointer-events-none size-4 text-muted-foreground" })
|
|
7394
7762
|
}
|
|
7395
7763
|
)
|
|
7396
7764
|
]
|
|
@@ -7407,7 +7775,7 @@ function SelectContent({
|
|
|
7407
7775
|
alignItemWithTrigger = true,
|
|
7408
7776
|
...props
|
|
7409
7777
|
}) {
|
|
7410
|
-
return /* @__PURE__ */
|
|
7778
|
+
return /* @__PURE__ */ jsx53(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsx53(
|
|
7411
7779
|
SelectPrimitive.Positioner,
|
|
7412
7780
|
{
|
|
7413
7781
|
side,
|
|
@@ -7416,20 +7784,20 @@ function SelectContent({
|
|
|
7416
7784
|
alignOffset,
|
|
7417
7785
|
alignItemWithTrigger,
|
|
7418
7786
|
className: "isolate z-50",
|
|
7419
|
-
children: /* @__PURE__ */
|
|
7787
|
+
children: /* @__PURE__ */ jsxs30(
|
|
7420
7788
|
SelectPrimitive.Popup,
|
|
7421
7789
|
{
|
|
7422
7790
|
"data-slot": "select-content",
|
|
7423
7791
|
"data-align-trigger": alignItemWithTrigger,
|
|
7424
|
-
className:
|
|
7792
|
+
className: cn49(
|
|
7425
7793
|
"relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-background text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-open:fade-in-0 data-open:zoom-in-95 data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
7426
7794
|
className
|
|
7427
7795
|
),
|
|
7428
7796
|
...props,
|
|
7429
7797
|
children: [
|
|
7430
|
-
/* @__PURE__ */
|
|
7431
|
-
/* @__PURE__ */
|
|
7432
|
-
/* @__PURE__ */
|
|
7798
|
+
/* @__PURE__ */ jsx53(SelectScrollUpButton, {}),
|
|
7799
|
+
/* @__PURE__ */ jsx53(SelectPrimitive.List, { className: "p-1", children }),
|
|
7800
|
+
/* @__PURE__ */ jsx53(SelectScrollDownButton, {})
|
|
7433
7801
|
]
|
|
7434
7802
|
}
|
|
7435
7803
|
)
|
|
@@ -7440,11 +7808,11 @@ function SelectLabel({
|
|
|
7440
7808
|
className,
|
|
7441
7809
|
...props
|
|
7442
7810
|
}) {
|
|
7443
|
-
return /* @__PURE__ */
|
|
7811
|
+
return /* @__PURE__ */ jsx53(
|
|
7444
7812
|
SelectPrimitive.GroupLabel,
|
|
7445
7813
|
{
|
|
7446
7814
|
"data-slot": "select-label",
|
|
7447
|
-
className:
|
|
7815
|
+
className: cn49("px-1.5 py-1 text-xs text-muted-foreground", className),
|
|
7448
7816
|
...props
|
|
7449
7817
|
}
|
|
7450
7818
|
);
|
|
@@ -7454,22 +7822,22 @@ function SelectItem({
|
|
|
7454
7822
|
children,
|
|
7455
7823
|
...props
|
|
7456
7824
|
}) {
|
|
7457
|
-
return /* @__PURE__ */
|
|
7825
|
+
return /* @__PURE__ */ jsxs30(
|
|
7458
7826
|
SelectPrimitive.Item,
|
|
7459
7827
|
{
|
|
7460
7828
|
"data-slot": "select-item",
|
|
7461
|
-
className:
|
|
7829
|
+
className: cn49(
|
|
7462
7830
|
"relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
7463
7831
|
className
|
|
7464
7832
|
),
|
|
7465
7833
|
...props,
|
|
7466
7834
|
children: [
|
|
7467
|
-
/* @__PURE__ */
|
|
7468
|
-
/* @__PURE__ */
|
|
7835
|
+
/* @__PURE__ */ jsx53(SelectPrimitive.ItemText, { className: "flex flex-1 shrink-0 gap-2 whitespace-nowrap", children }),
|
|
7836
|
+
/* @__PURE__ */ jsx53(
|
|
7469
7837
|
SelectPrimitive.ItemIndicator,
|
|
7470
7838
|
{
|
|
7471
|
-
render: /* @__PURE__ */
|
|
7472
|
-
children: /* @__PURE__ */
|
|
7839
|
+
render: /* @__PURE__ */ jsx53("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center" }),
|
|
7840
|
+
children: /* @__PURE__ */ jsx53(Check3, { className: "pointer-events-none" })
|
|
7473
7841
|
}
|
|
7474
7842
|
)
|
|
7475
7843
|
]
|
|
@@ -7480,11 +7848,11 @@ function SelectSeparator({
|
|
|
7480
7848
|
className,
|
|
7481
7849
|
...props
|
|
7482
7850
|
}) {
|
|
7483
|
-
return /* @__PURE__ */
|
|
7851
|
+
return /* @__PURE__ */ jsx53(
|
|
7484
7852
|
SelectPrimitive.Separator,
|
|
7485
7853
|
{
|
|
7486
7854
|
"data-slot": "select-separator",
|
|
7487
|
-
className:
|
|
7855
|
+
className: cn49("pointer-events-none -mx-1 my-1 h-px bg-border", className),
|
|
7488
7856
|
...props
|
|
7489
7857
|
}
|
|
7490
7858
|
);
|
|
@@ -7493,16 +7861,16 @@ function SelectScrollUpButton({
|
|
|
7493
7861
|
className,
|
|
7494
7862
|
...props
|
|
7495
7863
|
}) {
|
|
7496
|
-
return /* @__PURE__ */
|
|
7864
|
+
return /* @__PURE__ */ jsx53(
|
|
7497
7865
|
SelectPrimitive.ScrollUpArrow,
|
|
7498
7866
|
{
|
|
7499
7867
|
"data-slot": "select-scroll-up-button",
|
|
7500
|
-
className:
|
|
7868
|
+
className: cn49(
|
|
7501
7869
|
"top-0 z-10 flex w-full cursor-default items-center justify-center bg-background py-1 [&_svg:not([class*='size-'])]:size-4",
|
|
7502
7870
|
className
|
|
7503
7871
|
),
|
|
7504
7872
|
...props,
|
|
7505
|
-
children: /* @__PURE__ */
|
|
7873
|
+
children: /* @__PURE__ */ jsx53(ChevronUp2, {})
|
|
7506
7874
|
}
|
|
7507
7875
|
);
|
|
7508
7876
|
}
|
|
@@ -7510,213 +7878,28 @@ function SelectScrollDownButton({
|
|
|
7510
7878
|
className,
|
|
7511
7879
|
...props
|
|
7512
7880
|
}) {
|
|
7513
|
-
return /* @__PURE__ */
|
|
7881
|
+
return /* @__PURE__ */ jsx53(
|
|
7514
7882
|
SelectPrimitive.ScrollDownArrow,
|
|
7515
7883
|
{
|
|
7516
7884
|
"data-slot": "select-scroll-down-button",
|
|
7517
|
-
className:
|
|
7885
|
+
className: cn49(
|
|
7518
7886
|
"bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-background py-1 [&_svg:not([class*='size-'])]:size-4",
|
|
7519
7887
|
className
|
|
7520
7888
|
),
|
|
7521
7889
|
...props,
|
|
7522
|
-
children: /* @__PURE__ */
|
|
7523
|
-
}
|
|
7524
|
-
);
|
|
7525
|
-
}
|
|
7526
|
-
|
|
7527
|
-
// src/ui/skeleton.tsx
|
|
7528
|
-
import {
|
|
7529
|
-
forwardRef as forwardRef5,
|
|
7530
|
-
useLayoutEffect as useLayoutEffect2
|
|
7531
|
-
} from "react";
|
|
7532
|
-
import { cn as cn46 } from "cn";
|
|
7533
|
-
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
7534
|
-
var componentThemeClassName = "[--ic-background:#ffffff] [--ic-foreground:#111111] [--ic-primary:#111111] [--ic-secondary:#646b75] [--ic-surface-border:#e9edf2] [--ic-border:#e3e7ec] [--ic-card:#ffffff] [--ic-card-foreground:#111111] [--ic-muted:#f5f7fa] [--ic-muted-foreground:#6d7480] [--ic-accent:#f3f5f8] [--color-accent:var(--ic-accent)] [--color-accent-foreground:var(--ic-accent-foreground)] [--ic-accent-foreground:#111111] [--ic-input:#e3e7ec] [--ic-ring:rgba(17,17,17,0.16)] [--ic-destructive:#dc2626] [--ic-paper:#fcfcfd] [--ic-popover-foreground:#111111] [--ic-brand:#0ea5e9] [--ic-brand-soft:#bae6fd] [--ic-shadow-soft:0_18px_38px_-24px_rgba(15,23,42,0.35)] [--ic-chart-1:oklch(0.52_0.19_254)] [--ic-chart-2:oklch(0.74_0.11_232)] [--ic-chart-3:oklch(0.42_0.16_262)] [--ic-chart-4:oklch(0.84_0.07_228)] [--ic-chart-5:oklch(0.62_0.14_240)] [--color-background:var(--ic-background)] [--color-foreground:var(--ic-foreground)] [--color-primary:var(--ic-primary)] [--color-secondary:var(--ic-secondary)] [--color-border:var(--ic-border)] [--color-card:var(--ic-card)] [--color-card-foreground:var(--ic-card-foreground)] [--color-muted:var(--ic-muted)] [--color-muted-foreground:var(--ic-muted-foreground)] [--color-accent:var(--ic-accent)] [--color-accent-foreground:var(--ic-accent-foreground)] [--color-input:var(--ic-input)] [--color-ring:var(--ic-ring)] [--color-destructive:var(--ic-destructive)] [--color-paper:var(--ic-paper)] [--color-popover-foreground:var(--ic-popover-foreground)] [--color-brand:var(--ic-brand)] [--color-brand-soft:var(--ic-brand-soft)] [--color-chart-1:var(--ic-chart-1)] [--color-chart-2:var(--ic-chart-2)] [--color-chart-3:var(--ic-chart-3)] [--color-chart-4:var(--ic-chart-4)] [--color-chart-5:var(--ic-chart-5)] dark:[--ic-background:#111111] dark:[--ic-foreground:#f6f3ec] dark:[--ic-primary:#f6f3ec] dark:[--ic-secondary:#cbc6bb] dark:[--ic-surface-border:#2a2a25] dark:[--ic-border:#2b2a25] dark:[--ic-card:#111111] dark:[--ic-card-foreground:#f6f3ec] dark:[--ic-muted:#171716] dark:[--ic-muted-foreground:#9a958a] dark:[--ic-accent:#1a1a18] [--color-accent:var(--ic-accent)] [--color-accent-foreground:var(--ic-accent-foreground)] dark:[--ic-accent-foreground:#f6f3ec] dark:[--ic-input:#2b2a25] dark:[--ic-ring:rgba(246,243,236,0.18)] dark:[--ic-destructive:#f87171] dark:[--ic-paper:#171716] dark:[--ic-popover-foreground:#f6f3ec] dark:[--ic-brand:#38bdf8] dark:[--ic-brand-soft:#0c4a6e] dark:[--ic-shadow-soft:0_20px_44px_-28px_rgba(0,0,0,0.6)] dark:[--ic-chart-1:oklch(0.68_0.17_250)] dark:[--ic-chart-2:oklch(0.82_0.09_225)] dark:[--ic-chart-3:oklch(0.58_0.15_260)] dark:[--ic-chart-4:oklch(0.75_0.12_235)] dark:[--ic-chart-5:oklch(0.88_0.06_220)]";
|
|
7535
|
-
var STYLE_ID = "iconiq-skeleton-styles";
|
|
7536
|
-
var SKELETON_CSS = `
|
|
7537
|
-
@keyframes iconiq-skeleton-shimmer {
|
|
7538
|
-
to {
|
|
7539
|
-
transform: translateX(200%);
|
|
7540
|
-
}
|
|
7541
|
-
}
|
|
7542
|
-
|
|
7543
|
-
@keyframes iconiq-skeleton-fade {
|
|
7544
|
-
0%,
|
|
7545
|
-
100% {
|
|
7546
|
-
opacity: 1;
|
|
7547
|
-
}
|
|
7548
|
-
|
|
7549
|
-
50% {
|
|
7550
|
-
opacity: 0.38;
|
|
7551
|
-
}
|
|
7552
|
-
}
|
|
7553
|
-
|
|
7554
|
-
.iconiq-skeleton-surface {
|
|
7555
|
-
background-color: #f5f7fa;
|
|
7556
|
-
background-color: var(--ic-muted);
|
|
7557
|
-
}
|
|
7558
|
-
|
|
7559
|
-
.iconiq-skeleton-shimmer {
|
|
7560
|
-
background: linear-gradient(
|
|
7561
|
-
90deg,
|
|
7562
|
-
transparent 0%,
|
|
7563
|
-
rgba(17, 17, 17, 0.06) 50%,
|
|
7564
|
-
transparent 100%
|
|
7565
|
-
);
|
|
7566
|
-
background: linear-gradient(
|
|
7567
|
-
90deg,
|
|
7568
|
-
transparent 0%,
|
|
7569
|
-
color-mix(in srgb, var(--ic-foreground) 6%, transparent) 50%,
|
|
7570
|
-
transparent 100%
|
|
7571
|
-
);
|
|
7572
|
-
animation: iconiq-skeleton-shimmer var(--iconiq-skeleton-duration, 1.6s)
|
|
7573
|
-
ease-in-out infinite;
|
|
7574
|
-
}
|
|
7575
|
-
|
|
7576
|
-
.iconiq-skeleton-fade-root {
|
|
7577
|
-
animation: iconiq-skeleton-fade var(--iconiq-skeleton-duration, 2.4s)
|
|
7578
|
-
ease-in-out infinite;
|
|
7579
|
-
}
|
|
7580
|
-
|
|
7581
|
-
@media (prefers-reduced-motion: reduce) {
|
|
7582
|
-
.iconiq-skeleton-shimmer,
|
|
7583
|
-
.iconiq-skeleton-fade-root {
|
|
7584
|
-
animation: none;
|
|
7585
|
-
}
|
|
7586
|
-
}
|
|
7587
|
-
`;
|
|
7588
|
-
var skeletonRoundedClasses = {
|
|
7589
|
-
none: "rounded-none",
|
|
7590
|
-
sm: "rounded-sm",
|
|
7591
|
-
md: "rounded-md",
|
|
7592
|
-
lg: "rounded-lg",
|
|
7593
|
-
full: "rounded-full"
|
|
7594
|
-
};
|
|
7595
|
-
var skeletonVariantDefaultDuration = {
|
|
7596
|
-
shimmer: 1.6,
|
|
7597
|
-
fade: 2.4
|
|
7598
|
-
};
|
|
7599
|
-
function getSkeletonVariantDuration(variant, duration = 1.6) {
|
|
7600
|
-
if (duration !== 1.6) {
|
|
7601
|
-
return duration;
|
|
7602
|
-
}
|
|
7603
|
-
return skeletonVariantDefaultDuration[variant];
|
|
7604
|
-
}
|
|
7605
|
-
function ensureSkeletonStyles() {
|
|
7606
|
-
if (typeof document === "undefined") {
|
|
7607
|
-
return;
|
|
7608
|
-
}
|
|
7609
|
-
let style = document.getElementById(STYLE_ID);
|
|
7610
|
-
if (!style) {
|
|
7611
|
-
style = document.createElement("style");
|
|
7612
|
-
style.id = STYLE_ID;
|
|
7613
|
-
document.head.appendChild(style);
|
|
7614
|
-
}
|
|
7615
|
-
style.textContent = SKELETON_CSS;
|
|
7616
|
-
}
|
|
7617
|
-
function resolveSkeletonA11yProps({
|
|
7618
|
-
animate: animate2 = true,
|
|
7619
|
-
decorative = true,
|
|
7620
|
-
label
|
|
7621
|
-
}) {
|
|
7622
|
-
if (decorative || label === null) {
|
|
7623
|
-
return { "aria-hidden": true };
|
|
7624
|
-
}
|
|
7625
|
-
return {
|
|
7626
|
-
"aria-label": label ?? (animate2 ? "Loading" : "Placeholder"),
|
|
7627
|
-
"aria-live": "polite",
|
|
7628
|
-
role: "status"
|
|
7629
|
-
};
|
|
7630
|
-
}
|
|
7631
|
-
var Skeleton = forwardRef5(function Skeleton2({
|
|
7632
|
-
animate: animate2 = true,
|
|
7633
|
-
className,
|
|
7634
|
-
decorative = true,
|
|
7635
|
-
duration = 1.6,
|
|
7636
|
-
label,
|
|
7637
|
-
rounded = "md",
|
|
7638
|
-
style,
|
|
7639
|
-
variant = "shimmer",
|
|
7640
|
-
...props
|
|
7641
|
-
}, ref) {
|
|
7642
|
-
const variantDuration = getSkeletonVariantDuration(variant, duration);
|
|
7643
|
-
const showShimmer = animate2 && variant === "shimmer";
|
|
7644
|
-
const showFade = animate2 && variant === "fade";
|
|
7645
|
-
useLayoutEffect2(() => {
|
|
7646
|
-
if (animate2) {
|
|
7647
|
-
ensureSkeletonStyles();
|
|
7648
|
-
}
|
|
7649
|
-
}, [animate2]);
|
|
7650
|
-
const animatedStyle = showShimmer || showFade ? {
|
|
7651
|
-
...style,
|
|
7652
|
-
"--iconiq-skeleton-duration": `${variantDuration}s`
|
|
7653
|
-
} : style;
|
|
7654
|
-
return /* @__PURE__ */ jsx48(
|
|
7655
|
-
"div",
|
|
7656
|
-
{
|
|
7657
|
-
className: cn46(
|
|
7658
|
-
componentThemeClassName,
|
|
7659
|
-
"iconiq-skeleton-surface relative block h-4 w-full overflow-hidden",
|
|
7660
|
-
showFade && "iconiq-skeleton-fade-root",
|
|
7661
|
-
skeletonRoundedClasses[rounded],
|
|
7662
|
-
className
|
|
7663
|
-
),
|
|
7664
|
-
ref,
|
|
7665
|
-
style: animatedStyle,
|
|
7666
|
-
...resolveSkeletonA11yProps({ animate: animate2, decorative, label }),
|
|
7667
|
-
...props,
|
|
7668
|
-
children: showShimmer ? /* @__PURE__ */ jsx48(
|
|
7669
|
-
"span",
|
|
7670
|
-
{
|
|
7671
|
-
"aria-hidden": "true",
|
|
7672
|
-
className: "iconiq-skeleton-shimmer pointer-events-none absolute inset-0 -translate-x-full"
|
|
7673
|
-
}
|
|
7674
|
-
) : null
|
|
7675
|
-
}
|
|
7676
|
-
);
|
|
7677
|
-
});
|
|
7678
|
-
Skeleton.displayName = "Skeleton";
|
|
7679
|
-
function SkeletonAvatar({
|
|
7680
|
-
className,
|
|
7681
|
-
...props
|
|
7682
|
-
}) {
|
|
7683
|
-
return /* @__PURE__ */ jsx48(
|
|
7684
|
-
Skeleton,
|
|
7685
|
-
{
|
|
7686
|
-
className: cn46("size-10", className),
|
|
7687
|
-
decorative: true,
|
|
7688
|
-
rounded: "full",
|
|
7689
|
-
...props
|
|
7690
|
-
}
|
|
7691
|
-
);
|
|
7692
|
-
}
|
|
7693
|
-
function SkeletonText({ className, ...props }) {
|
|
7694
|
-
return /* @__PURE__ */ jsx48(Skeleton, { className: cn46("h-3", className), decorative: true, ...props });
|
|
7695
|
-
}
|
|
7696
|
-
function SkeletonButton({
|
|
7697
|
-
className,
|
|
7698
|
-
...props
|
|
7699
|
-
}) {
|
|
7700
|
-
return /* @__PURE__ */ jsx48(
|
|
7701
|
-
Skeleton,
|
|
7702
|
-
{
|
|
7703
|
-
className: cn46("h-9 w-24", className),
|
|
7704
|
-
decorative: true,
|
|
7705
|
-
rounded: "lg",
|
|
7706
|
-
...props
|
|
7890
|
+
children: /* @__PURE__ */ jsx53(ChevronDown3, {})
|
|
7707
7891
|
}
|
|
7708
7892
|
);
|
|
7709
7893
|
}
|
|
7710
|
-
var ShimmerSkeleton = Skeleton;
|
|
7711
7894
|
|
|
7712
7895
|
// src/ui/sonner.tsx
|
|
7713
7896
|
import { GooeyToaster } from "goey-toast";
|
|
7714
7897
|
import { useTheme as useTheme2 } from "next-themes";
|
|
7715
|
-
import { jsx as
|
|
7898
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
7716
7899
|
var Toaster = ({ closeButton = "top-left", ...props }) => {
|
|
7717
7900
|
const { theme = "system" } = useTheme2();
|
|
7718
7901
|
const toasterTheme = theme === "dark" ? "dark" : "light";
|
|
7719
|
-
return /* @__PURE__ */
|
|
7902
|
+
return /* @__PURE__ */ jsx54(
|
|
7720
7903
|
GooeyToaster,
|
|
7721
7904
|
{
|
|
7722
7905
|
theme: toasterTheme,
|
|
@@ -7802,8 +7985,8 @@ function useComposedRefs(...refs) {
|
|
|
7802
7985
|
}
|
|
7803
7986
|
|
|
7804
7987
|
// src/ui/sortable.tsx
|
|
7805
|
-
import { cn as
|
|
7806
|
-
import { jsx as
|
|
7988
|
+
import { cn as cn50 } from "cn";
|
|
7989
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
7807
7990
|
var orientationConfig = {
|
|
7808
7991
|
vertical: {
|
|
7809
7992
|
modifiers: [restrictToVerticalAxis, restrictToParentElement],
|
|
@@ -7988,11 +8171,11 @@ function Sortable(props) {
|
|
|
7988
8171
|
flatCursor
|
|
7989
8172
|
]
|
|
7990
8173
|
);
|
|
7991
|
-
return /* @__PURE__ */
|
|
8174
|
+
return /* @__PURE__ */ jsx55(
|
|
7992
8175
|
SortableRootContext.Provider,
|
|
7993
8176
|
{
|
|
7994
8177
|
value: contextValue,
|
|
7995
|
-
children: /* @__PURE__ */
|
|
8178
|
+
children: /* @__PURE__ */ jsx55(
|
|
7996
8179
|
DndContext,
|
|
7997
8180
|
{
|
|
7998
8181
|
collisionDetection: collisionDetection ?? config.collisionDetection,
|
|
@@ -8041,7 +8224,7 @@ function SortableContent(props) {
|
|
|
8041
8224
|
},
|
|
8042
8225
|
enabled: !withoutSlot
|
|
8043
8226
|
});
|
|
8044
|
-
return /* @__PURE__ */
|
|
8227
|
+
return /* @__PURE__ */ jsx55(SortableContentContext.Provider, { value: true, children: /* @__PURE__ */ jsx55(
|
|
8045
8228
|
SortableContext,
|
|
8046
8229
|
{
|
|
8047
8230
|
items: context.items,
|
|
@@ -8125,7 +8308,7 @@ function SortableItem(props) {
|
|
|
8125
8308
|
id,
|
|
8126
8309
|
ref: composedRef,
|
|
8127
8310
|
style: composedStyle,
|
|
8128
|
-
className:
|
|
8311
|
+
className: cn50(
|
|
8129
8312
|
"focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:outline-hidden",
|
|
8130
8313
|
{
|
|
8131
8314
|
"touch-none select-none": asHandle,
|
|
@@ -8148,7 +8331,7 @@ function SortableItem(props) {
|
|
|
8148
8331
|
...isDragging && { dragging: "" }
|
|
8149
8332
|
}
|
|
8150
8333
|
});
|
|
8151
|
-
return /* @__PURE__ */
|
|
8334
|
+
return /* @__PURE__ */ jsx55(SortableItemContext.Provider, { value: itemContext, children: element });
|
|
8152
8335
|
}
|
|
8153
8336
|
function SortableItemHandle(props) {
|
|
8154
8337
|
const { disabled, className, render, ref, ...itemHandleProps } = props;
|
|
@@ -8173,7 +8356,7 @@ function SortableItemHandle(props) {
|
|
|
8173
8356
|
"aria-controls": itemContext.id,
|
|
8174
8357
|
ref: composedRef,
|
|
8175
8358
|
disabled: isDisabled,
|
|
8176
|
-
className:
|
|
8359
|
+
className: cn50(
|
|
8177
8360
|
"select-none disabled:pointer-events-none disabled:opacity-50",
|
|
8178
8361
|
context.flatCursor ? "cursor-default" : "cursor-grab data-dragging:cursor-grabbing",
|
|
8179
8362
|
className
|
|
@@ -8208,14 +8391,14 @@ function SortableOverlay(props) {
|
|
|
8208
8391
|
const container = containerProp ?? (mounted ? globalThis.document?.body : null);
|
|
8209
8392
|
if (!container) return null;
|
|
8210
8393
|
return ReactDOM.createPortal(
|
|
8211
|
-
/* @__PURE__ */
|
|
8394
|
+
/* @__PURE__ */ jsx55(
|
|
8212
8395
|
DragOverlay,
|
|
8213
8396
|
{
|
|
8214
8397
|
dropAnimation,
|
|
8215
8398
|
modifiers: context.modifiers,
|
|
8216
|
-
className:
|
|
8399
|
+
className: cn50(!context.flatCursor && "cursor-grabbing"),
|
|
8217
8400
|
...overlayProps,
|
|
8218
|
-
children: /* @__PURE__ */
|
|
8401
|
+
children: /* @__PURE__ */ jsx55(SortableOverlayContext.Provider, { value: true, children: context.activeId ? typeof children === "function" ? children({ value: context.activeId }) : children : null })
|
|
8219
8402
|
}
|
|
8220
8403
|
),
|
|
8221
8404
|
container
|
|
@@ -8224,8 +8407,8 @@ function SortableOverlay(props) {
|
|
|
8224
8407
|
|
|
8225
8408
|
// src/ui/swipe-actions.tsx
|
|
8226
8409
|
import * as SwipeActionsPrimitive from "@ncdai/react-swipe-actions";
|
|
8227
|
-
import { cn as
|
|
8228
|
-
import { jsx as
|
|
8410
|
+
import { cn as cn51 } from "cn";
|
|
8411
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
8229
8412
|
var SwipeRoot2 = SwipeActionsPrimitive.SwipeRoot;
|
|
8230
8413
|
var SwipeItem2 = SwipeActionsPrimitive.SwipeItem;
|
|
8231
8414
|
var SwipeActions2 = SwipeActionsPrimitive.SwipeActions;
|
|
@@ -8234,15 +8417,15 @@ function SwipeAction2({
|
|
|
8234
8417
|
children,
|
|
8235
8418
|
...props
|
|
8236
8419
|
}) {
|
|
8237
|
-
return /* @__PURE__ */
|
|
8420
|
+
return /* @__PURE__ */ jsx56(
|
|
8238
8421
|
SwipeActionsPrimitive.SwipeAction,
|
|
8239
8422
|
{
|
|
8240
|
-
className:
|
|
8423
|
+
className: cn51(
|
|
8241
8424
|
"bg-secondary text-xs font-medium whitespace-nowrap text-secondary-foreground select-none focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-foreground data-armed:brightness-90 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
8242
8425
|
className
|
|
8243
8426
|
),
|
|
8244
8427
|
...props,
|
|
8245
|
-
children: /* @__PURE__ */
|
|
8428
|
+
children: /* @__PURE__ */ jsx56(SwipeActionsPrimitive.SwipeActionContent, { className: "min-w-20 flex-col items-center justify-center gap-1.5 px-4", children })
|
|
8246
8429
|
}
|
|
8247
8430
|
);
|
|
8248
8431
|
}
|
|
@@ -8250,10 +8433,10 @@ function SwipeContent2({
|
|
|
8250
8433
|
className,
|
|
8251
8434
|
...props
|
|
8252
8435
|
}) {
|
|
8253
|
-
return /* @__PURE__ */
|
|
8436
|
+
return /* @__PURE__ */ jsx56(
|
|
8254
8437
|
SwipeActionsPrimitive.SwipeContent,
|
|
8255
8438
|
{
|
|
8256
|
-
className:
|
|
8439
|
+
className: cn51("data-dragging:cursor-grabbing", className),
|
|
8257
8440
|
...props
|
|
8258
8441
|
}
|
|
8259
8442
|
);
|
|
@@ -8261,24 +8444,24 @@ function SwipeContent2({
|
|
|
8261
8444
|
|
|
8262
8445
|
// src/ui/switch.tsx
|
|
8263
8446
|
import { Switch as SwitchPrimitive } from "@base-ui/react/switch";
|
|
8264
|
-
import { cn as
|
|
8265
|
-
import { jsx as
|
|
8447
|
+
import { cn as cn52 } from "cn";
|
|
8448
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
8266
8449
|
function Switch({
|
|
8267
8450
|
className,
|
|
8268
8451
|
size = "default",
|
|
8269
8452
|
...props
|
|
8270
8453
|
}) {
|
|
8271
|
-
return /* @__PURE__ */
|
|
8454
|
+
return /* @__PURE__ */ jsx57(
|
|
8272
8455
|
SwitchPrimitive.Root,
|
|
8273
8456
|
{
|
|
8274
8457
|
"data-slot": "switch",
|
|
8275
8458
|
"data-size": size,
|
|
8276
|
-
className:
|
|
8459
|
+
className: cn52(
|
|
8277
8460
|
"peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-[background-color,border-color,box-shadow,opacity] duration-150 ease-out outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 motion-reduce:transition-none dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50",
|
|
8278
8461
|
className
|
|
8279
8462
|
),
|
|
8280
8463
|
...props,
|
|
8281
|
-
children: /* @__PURE__ */
|
|
8464
|
+
children: /* @__PURE__ */ jsx57(
|
|
8282
8465
|
SwitchPrimitive.Thumb,
|
|
8283
8466
|
{
|
|
8284
8467
|
"data-slot": "switch-thumb",
|
|
@@ -8290,11 +8473,11 @@ function Switch({
|
|
|
8290
8473
|
}
|
|
8291
8474
|
|
|
8292
8475
|
// src/ui/theme-toggle.tsx
|
|
8293
|
-
import { cn as
|
|
8476
|
+
import { cn as cn53 } from "cn";
|
|
8294
8477
|
import { motion as motion8, useReducedMotion as useReducedMotion3 } from "motion/react";
|
|
8295
8478
|
import { useTheme as useTheme3 } from "next-themes";
|
|
8296
8479
|
import { useId as useId7 } from "react";
|
|
8297
|
-
import { jsx as
|
|
8480
|
+
import { jsx as jsx58, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
8298
8481
|
var MORPH = { type: "spring", visualDuration: 0.4, bounce: 0 };
|
|
8299
8482
|
var RAY_STAGGER = 0.018;
|
|
8300
8483
|
var EASE_OUT3 = [0.23, 1, 0.32, 1];
|
|
@@ -8325,14 +8508,14 @@ function ThemeToggle({
|
|
|
8325
8508
|
const activeVariant = variant ?? "ghost";
|
|
8326
8509
|
const maskId = `moon-${useId7().replace(/[^\w-]/g, "")}`;
|
|
8327
8510
|
const morph = reduceMotion ? { duration: 0 } : MORPH;
|
|
8328
|
-
return /* @__PURE__ */
|
|
8511
|
+
return /* @__PURE__ */ jsx58(
|
|
8329
8512
|
"button",
|
|
8330
8513
|
{
|
|
8331
8514
|
type: "button",
|
|
8332
8515
|
"aria-label": "Toggle theme",
|
|
8333
8516
|
"aria-pressed": dark,
|
|
8334
8517
|
onClick: () => setTheme(dark ? "light" : "dark"),
|
|
8335
|
-
className:
|
|
8518
|
+
className: cn53(
|
|
8336
8519
|
buttonVariants({ variant: activeVariant }),
|
|
8337
8520
|
"shadow-raised relative touch-manipulation rounded-full outline-hidden select-none",
|
|
8338
8521
|
"transition-[scale,background-color] duration-150 ease-out active:scale-[0.96] motion-reduce:transition-[background-color]",
|
|
@@ -8343,7 +8526,7 @@ function ThemeToggle({
|
|
|
8343
8526
|
size === "lg" && "size-9",
|
|
8344
8527
|
className
|
|
8345
8528
|
),
|
|
8346
|
-
children: /* @__PURE__ */
|
|
8529
|
+
children: /* @__PURE__ */ jsxs31(
|
|
8347
8530
|
motion8.svg,
|
|
8348
8531
|
{
|
|
8349
8532
|
"aria-hidden": true,
|
|
@@ -8353,7 +8536,7 @@ function ThemeToggle({
|
|
|
8353
8536
|
animate: { rotate: dark ? MOON_TILT : 0 },
|
|
8354
8537
|
transition: morph,
|
|
8355
8538
|
children: [
|
|
8356
|
-
/* @__PURE__ */
|
|
8539
|
+
/* @__PURE__ */ jsx58("defs", { children: /* @__PURE__ */ jsxs31(
|
|
8357
8540
|
"mask",
|
|
8358
8541
|
{
|
|
8359
8542
|
id: maskId,
|
|
@@ -8363,8 +8546,8 @@ function ThemeToggle({
|
|
|
8363
8546
|
width: "24",
|
|
8364
8547
|
height: "24",
|
|
8365
8548
|
children: [
|
|
8366
|
-
/* @__PURE__ */
|
|
8367
|
-
/* @__PURE__ */
|
|
8549
|
+
/* @__PURE__ */ jsx58("rect", { width: "24", height: "24", fill: "white" }),
|
|
8550
|
+
/* @__PURE__ */ jsx58(
|
|
8368
8551
|
motion8.circle,
|
|
8369
8552
|
{
|
|
8370
8553
|
r: BITE_R,
|
|
@@ -8377,7 +8560,7 @@ function ThemeToggle({
|
|
|
8377
8560
|
]
|
|
8378
8561
|
}
|
|
8379
8562
|
) }),
|
|
8380
|
-
/* @__PURE__ */
|
|
8563
|
+
/* @__PURE__ */ jsx58(
|
|
8381
8564
|
motion8.circle,
|
|
8382
8565
|
{
|
|
8383
8566
|
cx: "12",
|
|
@@ -8389,10 +8572,10 @@ function ThemeToggle({
|
|
|
8389
8572
|
transition: morph
|
|
8390
8573
|
}
|
|
8391
8574
|
),
|
|
8392
|
-
/* @__PURE__ */
|
|
8575
|
+
/* @__PURE__ */ jsx58("g", { stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", children: RAYS.map((ray, i) => {
|
|
8393
8576
|
const { inner, outer } = dark ? RAY_IN : RAY_OUT;
|
|
8394
8577
|
const delay = reduceMotion ? 0 : dark ? i * RAY_STAGGER : 0.06 + (RAYS.length - 1 - i) * RAY_STAGGER;
|
|
8395
|
-
return /* @__PURE__ */
|
|
8578
|
+
return /* @__PURE__ */ jsx58(
|
|
8396
8579
|
motion8.line,
|
|
8397
8580
|
{
|
|
8398
8581
|
initial: false,
|
|
@@ -8526,6 +8709,17 @@ export {
|
|
|
8526
8709
|
DEFAULT_I18N,
|
|
8527
8710
|
DEFAULT_OPERATORS,
|
|
8528
8711
|
DashedSeparator,
|
|
8712
|
+
DataTable,
|
|
8713
|
+
DataTableBody,
|
|
8714
|
+
DataTableCell,
|
|
8715
|
+
DataTableEmptyBody,
|
|
8716
|
+
DataTableHeader,
|
|
8717
|
+
DataTablePagination,
|
|
8718
|
+
DataTableRoot,
|
|
8719
|
+
DataTableRow,
|
|
8720
|
+
DataTableSearchFilter,
|
|
8721
|
+
DataTableSkeleton,
|
|
8722
|
+
DataTableToolbarSection,
|
|
8529
8723
|
Dialog,
|
|
8530
8724
|
DialogClose,
|
|
8531
8725
|
DialogContent,
|
|
@@ -8721,6 +8915,10 @@ export {
|
|
|
8721
8915
|
useCarousel,
|
|
8722
8916
|
useComboboxAnchor,
|
|
8723
8917
|
useCommandState,
|
|
8918
|
+
useDataTable,
|
|
8919
|
+
useDataTablePagination,
|
|
8920
|
+
useDataTableRows,
|
|
8921
|
+
useDataTableSearch,
|
|
8724
8922
|
useJellyMood,
|
|
8725
8923
|
useMessageScroller,
|
|
8726
8924
|
useMessageScrollerScrollable,
|