najm-kit 2.1.22 → 2.1.23
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/index.mjs +107 -28
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -10283,20 +10283,65 @@ function NTableHeaderSkeleton() {
|
|
|
10283
10283
|
const hasToolbar = Boolean(useTableStore.use.renderToolbar());
|
|
10284
10284
|
const filterCount = Math.min(Math.max(filters?.length ?? 0, 1), 3);
|
|
10285
10285
|
const hasActions = showViewToggle || showColumnVisibility || showAddButton || hasHeaderSlot || hasToolbar;
|
|
10286
|
+
const hasSettings = showViewToggle || showColumnVisibility || hasHeaderSlot || hasToolbar;
|
|
10286
10287
|
if (!filters?.length && !hasActions) return null;
|
|
10287
|
-
return /* @__PURE__ */ jsxs(
|
|
10288
|
-
|
|
10289
|
-
|
|
10290
|
-
|
|
10291
|
-
|
|
10292
|
-
|
|
10293
|
-
|
|
10294
|
-
|
|
10295
|
-
|
|
10296
|
-
|
|
10297
|
-
|
|
10298
|
-
|
|
10299
|
-
|
|
10288
|
+
return /* @__PURE__ */ jsxs(
|
|
10289
|
+
"div",
|
|
10290
|
+
{
|
|
10291
|
+
"data-ntable-loading-header": true,
|
|
10292
|
+
className: "flex shrink-0 flex-wrap items-center justify-between gap-2",
|
|
10293
|
+
children: [
|
|
10294
|
+
filters?.length ? /* @__PURE__ */ jsx(
|
|
10295
|
+
"div",
|
|
10296
|
+
{
|
|
10297
|
+
"data-ntable-loading-desktop-filters": true,
|
|
10298
|
+
className: "hidden min-w-0 flex-1 flex-wrap gap-2 md:flex",
|
|
10299
|
+
children: Array.from({ length: filterCount }).map((_, index) => /* @__PURE__ */ jsx(
|
|
10300
|
+
NSkeleton,
|
|
10301
|
+
{
|
|
10302
|
+
className: cn("h-10 w-full rounded-lg", index < 2 ? "max-w-64" : "max-w-48")
|
|
10303
|
+
},
|
|
10304
|
+
index
|
|
10305
|
+
))
|
|
10306
|
+
}
|
|
10307
|
+
) : /* @__PURE__ */ jsx("span", { className: "hidden min-w-0 flex-1 md:block" }),
|
|
10308
|
+
/* @__PURE__ */ jsxs(
|
|
10309
|
+
"div",
|
|
10310
|
+
{
|
|
10311
|
+
"data-ntable-loading-mobile-toolbar": true,
|
|
10312
|
+
className: "flex w-full min-w-0 items-center gap-2 md:hidden",
|
|
10313
|
+
children: [
|
|
10314
|
+
filters?.length ? /* @__PURE__ */ jsx(
|
|
10315
|
+
NSkeleton,
|
|
10316
|
+
{
|
|
10317
|
+
"data-ntable-loading-mobile-primary": true,
|
|
10318
|
+
className: "h-10 min-w-0 flex-1 rounded-lg"
|
|
10319
|
+
}
|
|
10320
|
+
) : null,
|
|
10321
|
+
filters?.length > 1 ? /* @__PURE__ */ jsx(
|
|
10322
|
+
NSkeleton,
|
|
10323
|
+
{
|
|
10324
|
+
"data-ntable-loading-mobile-filter-button": true,
|
|
10325
|
+
className: "h-10 w-10 shrink-0 rounded-lg"
|
|
10326
|
+
}
|
|
10327
|
+
) : null,
|
|
10328
|
+
showAddButton ? /* @__PURE__ */ jsx(
|
|
10329
|
+
NSkeleton,
|
|
10330
|
+
{
|
|
10331
|
+
"data-ntable-loading-mobile-add-button": true,
|
|
10332
|
+
className: "h-10 w-10 shrink-0 rounded-lg"
|
|
10333
|
+
}
|
|
10334
|
+
) : null
|
|
10335
|
+
]
|
|
10336
|
+
}
|
|
10337
|
+
),
|
|
10338
|
+
hasActions && /* @__PURE__ */ jsxs("div", { className: "hidden shrink-0 gap-2 md:flex", children: [
|
|
10339
|
+
hasSettings && /* @__PURE__ */ jsx(NSkeleton, { className: "h-10 w-10 rounded-lg" }),
|
|
10340
|
+
showAddButton && /* @__PURE__ */ jsx(NSkeleton, { className: "h-10 w-10 rounded-lg" })
|
|
10341
|
+
] })
|
|
10342
|
+
]
|
|
10343
|
+
}
|
|
10344
|
+
);
|
|
10300
10345
|
}
|
|
10301
10346
|
function NTableLoadingSkeleton({ rows = DEFAULT_ROWS2 }) {
|
|
10302
10347
|
const columns = useTableStore.use.columns();
|
|
@@ -10379,21 +10424,55 @@ function NTableCardsLoadingSkeleton({ rows }) {
|
|
|
10379
10424
|
children: Array.from({ length: cardCount }).map((_, index) => /* @__PURE__ */ jsx(
|
|
10380
10425
|
Card,
|
|
10381
10426
|
{
|
|
10382
|
-
className: cn("rounded-lg bg-card p-
|
|
10383
|
-
children: /* @__PURE__ */ jsxs(
|
|
10384
|
-
|
|
10385
|
-
|
|
10386
|
-
|
|
10387
|
-
|
|
10388
|
-
|
|
10389
|
-
|
|
10390
|
-
|
|
10391
|
-
|
|
10392
|
-
|
|
10393
|
-
|
|
10394
|
-
|
|
10395
|
-
|
|
10396
|
-
|
|
10427
|
+
className: cn("rounded-lg bg-card p-3 shadow-none sm:p-4", surfaceBorderClasses(bordered)),
|
|
10428
|
+
children: /* @__PURE__ */ jsxs(
|
|
10429
|
+
"div",
|
|
10430
|
+
{
|
|
10431
|
+
"data-ntable-loading-card-layout": "responsive-avatar",
|
|
10432
|
+
className: "grid grid-cols-[80px_minmax(0,1fr)] gap-3 sm:grid-cols-[72px_minmax(0,1fr)]",
|
|
10433
|
+
children: [
|
|
10434
|
+
/* @__PURE__ */ jsx("div", { className: "col-start-1 row-start-1 flex items-start justify-center sm:justify-start", children: /* @__PURE__ */ jsx(
|
|
10435
|
+
NSkeleton,
|
|
10436
|
+
{
|
|
10437
|
+
"data-ntable-loading-card-avatar": true,
|
|
10438
|
+
className: "size-20 shrink-0 rounded-full sm:size-16"
|
|
10439
|
+
}
|
|
10440
|
+
) }),
|
|
10441
|
+
/* @__PURE__ */ jsxs("div", { className: "col-start-2 row-start-1 flex min-w-0 items-start justify-between gap-3", children: [
|
|
10442
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1 space-y-2", children: [
|
|
10443
|
+
/* @__PURE__ */ jsx(NSkeleton, { className: "h-5 w-36 max-w-full" }),
|
|
10444
|
+
/* @__PURE__ */ jsx(NSkeleton, { className: "hidden h-3 w-16 sm:block" })
|
|
10445
|
+
] }),
|
|
10446
|
+
/* @__PURE__ */ jsx(
|
|
10447
|
+
NSkeleton,
|
|
10448
|
+
{
|
|
10449
|
+
"data-ntable-loading-card-status": true,
|
|
10450
|
+
className: "hidden h-6 w-14 shrink-0 rounded-full sm:block"
|
|
10451
|
+
}
|
|
10452
|
+
)
|
|
10453
|
+
] }),
|
|
10454
|
+
/* @__PURE__ */ jsx(
|
|
10455
|
+
"div",
|
|
10456
|
+
{
|
|
10457
|
+
"data-ntable-loading-card-details": true,
|
|
10458
|
+
className: "col-start-2 row-start-2 space-y-1 sm:col-span-full sm:col-start-1 sm:space-y-2 sm:rounded-lg sm:bg-muted/50 sm:p-3",
|
|
10459
|
+
children: Array.from({ length: 3 }).map((_2, detailIndex) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 sm:gap-2", children: [
|
|
10460
|
+
/* @__PURE__ */ jsx(NSkeleton, { className: "size-3.5 shrink-0 rounded-sm sm:size-4" }),
|
|
10461
|
+
/* @__PURE__ */ jsx(
|
|
10462
|
+
NSkeleton,
|
|
10463
|
+
{
|
|
10464
|
+
className: cn(
|
|
10465
|
+
"h-3 max-w-full sm:h-4",
|
|
10466
|
+
detailIndex === 0 ? "w-full" : detailIndex === 1 ? "w-4/5" : "w-3/4"
|
|
10467
|
+
)
|
|
10468
|
+
}
|
|
10469
|
+
)
|
|
10470
|
+
] }, detailIndex))
|
|
10471
|
+
}
|
|
10472
|
+
)
|
|
10473
|
+
]
|
|
10474
|
+
}
|
|
10475
|
+
)
|
|
10397
10476
|
},
|
|
10398
10477
|
index
|
|
10399
10478
|
))
|