@ai-matrx/design-system 0.18.21 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/content-transfer/alchemy.svg +1 -1
- package/dist/content-transfer/copy-transform.svg +1 -0
- package/dist/content-transfer/icon.cjs +8 -2
- package/dist/content-transfer/icon.cjs.map +1 -1
- package/dist/content-transfer/icon.d.cts +5 -3
- package/dist/content-transfer/icon.d.ts +5 -3
- package/dist/content-transfer/icon.js +8 -2
- package/dist/content-transfer/icon.js.map +1 -1
- package/dist/content-transfer/portal.svg +1 -0
- package/dist/content-transfer.cjs +923 -304
- package/dist/content-transfer.cjs.map +1 -1
- package/dist/content-transfer.css +17 -74
- package/dist/content-transfer.d.cts +14 -3
- package/dist/content-transfer.d.ts +14 -3
- package/dist/content-transfer.js +929 -305
- package/dist/content-transfer.js.map +1 -1
- package/dist/data-table/copy-helpers.d.cts +1 -1
- package/dist/data-table/copy-helpers.d.ts +1 -1
- package/dist/data-table/data-row-inspector.cjs +990 -397
- package/dist/data-table/data-row-inspector.cjs.map +1 -1
- package/dist/data-table/data-row-inspector.js +988 -390
- package/dist/data-table/data-row-inspector.js.map +1 -1
- package/dist/data-table/data-row-window.cjs +989 -396
- package/dist/data-table/data-row-window.cjs.map +1 -1
- package/dist/data-table/data-row-window.js +987 -389
- package/dist/data-table/data-row-window.js.map +1 -1
- package/dist/data-table/filter-engine.d.cts +1 -1
- package/dist/data-table/filter-engine.d.ts +1 -1
- package/dist/data-table/host.cjs.map +1 -1
- package/dist/data-table/host.d.cts +3 -2
- package/dist/data-table/host.d.ts +3 -2
- package/dist/data-table/host.js.map +1 -1
- package/dist/data-table/index.cjs +2733 -1441
- package/dist/data-table/index.cjs.map +1 -1
- package/dist/data-table/index.d.cts +2 -2
- package/dist/data-table/index.d.ts +2 -2
- package/dist/data-table/index.js +2742 -1440
- package/dist/data-table/index.js.map +1 -1
- package/dist/data-table/infer-filter.d.cts +1 -1
- package/dist/data-table/infer-filter.d.ts +1 -1
- package/dist/data-table/layered-filters.d.cts +1 -1
- package/dist/data-table/layered-filters.d.ts +1 -1
- package/dist/data-table/pagination.cjs +135 -97
- package/dist/data-table/pagination.cjs.map +1 -1
- package/dist/data-table/pagination.d.cts +8 -1
- package/dist/data-table/pagination.d.ts +8 -1
- package/dist/data-table/pagination.js +130 -92
- package/dist/data-table/pagination.js.map +1 -1
- package/dist/data-table/query-control.d.cts +1 -1
- package/dist/data-table/query-control.d.ts +1 -1
- package/dist/data-table/scroll-pagination.cjs +82 -54
- package/dist/data-table/scroll-pagination.cjs.map +1 -1
- package/dist/data-table/scroll-pagination.js +82 -54
- package/dist/data-table/scroll-pagination.js.map +1 -1
- package/dist/data-table/types.cjs.map +1 -1
- package/dist/data-table/types.d.cts +1 -1
- package/dist/data-table/types.d.ts +1 -1
- package/dist/data-table/url-state.cjs +7 -1
- package/dist/data-table/url-state.cjs.map +1 -1
- package/dist/data-table/url-state.d.cts +1 -1
- package/dist/data-table/url-state.d.ts +1 -1
- package/dist/data-table/url-state.js +7 -1
- package/dist/data-table/url-state.js.map +1 -1
- package/dist/data-table/uuid-cell.cjs +1 -1
- package/dist/data-table/uuid-cell.cjs.map +1 -1
- package/dist/data-table/uuid-cell.js +1 -1
- package/dist/data-table/uuid-cell.js.map +1 -1
- package/dist/data-table/xlsx.d.cts +1 -1
- package/dist/data-table/xlsx.d.ts +1 -1
- package/dist/index.cjs +527 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +531 -0
- package/dist/index.js.map +1 -1
- package/dist/tap-target.cjs +636 -0
- package/dist/tap-target.cjs.map +1 -0
- package/dist/tap-target.css +151 -0
- package/dist/tap-target.d.cts +131 -0
- package/dist/tap-target.d.ts +131 -0
- package/dist/tap-target.js +608 -0
- package/dist/tap-target.js.map +1 -0
- package/dist/{types-BuDKVpeF.d.ts → types-D1m14boM.d.ts} +49 -3
- package/dist/{types-Dqcb7jXO.d.cts → types-Di6QT0P1.d.cts} +49 -3
- package/package.json +14 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { E as LAYERED_FILTER_OPERATORS, F as LAYERED_FILTER_OPERATOR_LABELS, G as LayeredFilterField, H as LayeredFilterOperator, L as LayeredFilterRule, I as columnFiltersToLayeredRules, J as completeLayeredFilterRules, K as decodeLayeredFilterRules, N as encodeLayeredFilterRules, O as isCompleteLayeredFilterRule, P as isLayeredFilterOperator, Q as layeredFilterMatchesValue, R as layeredFilterNeedsValue, U as layeredFilterRuleSummary, V as operatorsForLayeredField } from '../types-
|
|
1
|
+
export { E as LAYERED_FILTER_OPERATORS, F as LAYERED_FILTER_OPERATOR_LABELS, G as LayeredFilterField, H as LayeredFilterOperator, L as LayeredFilterRule, I as columnFiltersToLayeredRules, J as completeLayeredFilterRules, K as decodeLayeredFilterRules, N as encodeLayeredFilterRules, O as isCompleteLayeredFilterRule, P as isLayeredFilterOperator, Q as layeredFilterMatchesValue, R as layeredFilterNeedsValue, U as layeredFilterRuleSummary, V as operatorsForLayeredField } from '../types-Di6QT0P1.cjs';
|
|
2
2
|
import 'react';
|
|
3
3
|
import './copy-types.cjs';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { E as LAYERED_FILTER_OPERATORS, F as LAYERED_FILTER_OPERATOR_LABELS, G as LayeredFilterField, H as LayeredFilterOperator, L as LayeredFilterRule, I as columnFiltersToLayeredRules, J as completeLayeredFilterRules, K as decodeLayeredFilterRules, N as encodeLayeredFilterRules, O as isCompleteLayeredFilterRule, P as isLayeredFilterOperator, Q as layeredFilterMatchesValue, R as layeredFilterNeedsValue, U as layeredFilterRuleSummary, V as operatorsForLayeredField } from '../types-
|
|
1
|
+
export { E as LAYERED_FILTER_OPERATORS, F as LAYERED_FILTER_OPERATOR_LABELS, G as LayeredFilterField, H as LayeredFilterOperator, L as LayeredFilterRule, I as columnFiltersToLayeredRules, J as completeLayeredFilterRules, K as decodeLayeredFilterRules, N as encodeLayeredFilterRules, O as isCompleteLayeredFilterRule, P as isLayeredFilterOperator, Q as layeredFilterMatchesValue, R as layeredFilterNeedsValue, U as layeredFilterRuleSummary, V as operatorsForLayeredField } from '../types-D1m14boM.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import './copy-types.js';
|
|
@@ -186,7 +186,7 @@ TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
|
186
186
|
// src/data-table/icons.tsx
|
|
187
187
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
188
188
|
function Icon({ children, ...props }) {
|
|
189
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", "aria-hidden": "true", ...props, children });
|
|
189
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", ...props, children });
|
|
190
190
|
}
|
|
191
191
|
var ChevronLeft = (p) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { ...p, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "m15 18-6-6 6-6" }) });
|
|
192
192
|
var ChevronRight = (p) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { ...p, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "m9 18 6-6-6-6" }) });
|
|
@@ -386,8 +386,18 @@ var SelectSeparator = React4.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
386
386
|
));
|
|
387
387
|
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
388
388
|
|
|
389
|
-
// src/data-table/
|
|
389
|
+
// src/data-table/host.tsx
|
|
390
|
+
var import_react = require("react");
|
|
390
391
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
392
|
+
var HOST_SLOT = /* @__PURE__ */ Symbol.for("ai-matrx.design-system.table-host-context");
|
|
393
|
+
var hostRegistry = globalThis;
|
|
394
|
+
var HostContext = hostRegistry[HOST_SLOT] ??= (0, import_react.createContext)({});
|
|
395
|
+
function useMatrxDataTableHost() {
|
|
396
|
+
return (0, import_react.useContext)(HostContext);
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
// src/data-table/pagination.tsx
|
|
400
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
391
401
|
function PageNavigationControl({
|
|
392
402
|
label,
|
|
393
403
|
disabledHint,
|
|
@@ -396,17 +406,17 @@ function PageNavigationControl({
|
|
|
396
406
|
className,
|
|
397
407
|
...props
|
|
398
408
|
}) {
|
|
399
|
-
const button = /* @__PURE__ */ (0,
|
|
409
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
400
410
|
Button,
|
|
401
411
|
{
|
|
402
412
|
...props,
|
|
403
413
|
disabled,
|
|
404
414
|
"aria-label": label,
|
|
405
|
-
className: cn(visibilityClassName, className)
|
|
415
|
+
className: cn(visibilityClassName, className, "[&_svg]:size-3.5")
|
|
406
416
|
}
|
|
407
417
|
);
|
|
408
|
-
return /* @__PURE__ */ (0,
|
|
409
|
-
/* @__PURE__ */ (0,
|
|
418
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(Tooltip, { children: [
|
|
419
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TooltipTrigger, { asChild: true, children: disabled ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
410
420
|
"span",
|
|
411
421
|
{
|
|
412
422
|
className: cn(visibilityClassName, "rounded-md outline-none focus-visible:ring-2 focus-visible:ring-ring"),
|
|
@@ -415,9 +425,49 @@ function PageNavigationControl({
|
|
|
415
425
|
children: button
|
|
416
426
|
}
|
|
417
427
|
) : button }),
|
|
418
|
-
/* @__PURE__ */ (0,
|
|
428
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TooltipContent, { children: disabled ? disabledHint : label })
|
|
419
429
|
] });
|
|
420
430
|
}
|
|
431
|
+
function PaginationAction({
|
|
432
|
+
HostAction,
|
|
433
|
+
active = false,
|
|
434
|
+
disabledHint,
|
|
435
|
+
visibilityClassName = "inline-flex",
|
|
436
|
+
fallbackClassName,
|
|
437
|
+
...props
|
|
438
|
+
}) {
|
|
439
|
+
if (HostAction) {
|
|
440
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: visibilityClassName, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
441
|
+
HostAction,
|
|
442
|
+
{
|
|
443
|
+
...props,
|
|
444
|
+
active,
|
|
445
|
+
tooltip: props.disabled ? disabledHint : props.tooltip ?? props.ariaLabel
|
|
446
|
+
}
|
|
447
|
+
) });
|
|
448
|
+
}
|
|
449
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
450
|
+
PageNavigationControl,
|
|
451
|
+
{
|
|
452
|
+
variant: "outline",
|
|
453
|
+
size: "icon",
|
|
454
|
+
visibilityClassName,
|
|
455
|
+
label: props.ariaLabel,
|
|
456
|
+
disabledHint,
|
|
457
|
+
disabled: props.disabled,
|
|
458
|
+
onClick: props.onClick,
|
|
459
|
+
className: cn(
|
|
460
|
+
PAGINATION_ACTION_CLASS,
|
|
461
|
+
active && PAGINATION_ACTIVE_CLASS,
|
|
462
|
+
fallbackClassName
|
|
463
|
+
),
|
|
464
|
+
"aria-current": active ? "page" : void 0,
|
|
465
|
+
children: props.children
|
|
466
|
+
}
|
|
467
|
+
);
|
|
468
|
+
}
|
|
469
|
+
var PAGINATION_ACTION_CLASS = "relative isolate h-11 w-11 min-h-11 min-w-11 border-0 bg-transparent p-0 text-xs shadow-none before:absolute before:inset-1.5 before:z-0 before:rounded-md before:border before:border-border before:bg-card before:content-[''] hover:bg-transparent hover:before:bg-accent disabled:bg-transparent disabled:before:opacity-40 [&>*]:relative [&>*]:z-10";
|
|
470
|
+
var PAGINATION_ACTIVE_CLASS = "text-primary-foreground before:border-primary before:bg-primary hover:before:bg-primary/90";
|
|
421
471
|
function GenericTablePagination({
|
|
422
472
|
totalItems,
|
|
423
473
|
itemsPerPage,
|
|
@@ -443,8 +493,10 @@ function GenericTablePagination({
|
|
|
443
493
|
layoutType = "grid",
|
|
444
494
|
labelFormat,
|
|
445
495
|
compact = false,
|
|
446
|
-
hideEntriesInfo = false
|
|
496
|
+
hideEntriesInfo = false,
|
|
497
|
+
progressive
|
|
447
498
|
}) {
|
|
499
|
+
const host = useMatrxDataTableHost();
|
|
448
500
|
const positivePageSizes = pageSizeOptions.filter((size) => size > 0);
|
|
449
501
|
const availablePageSizes = itemsPerPage > 0 && !positivePageSizes.includes(itemsPerPage) ? [...positivePageSizes, itemsPerPage].sort((a, b) => a - b) : positivePageSizes;
|
|
450
502
|
const effectiveItemsPerPage = itemsPerPage === 0 ? Math.max(totalItems, 1) : Math.max(itemsPerPage, 1);
|
|
@@ -460,24 +512,22 @@ function GenericTablePagination({
|
|
|
460
512
|
};
|
|
461
513
|
const isFirstPageDisabled = currentPage <= 1;
|
|
462
514
|
const isLastPageDisabled = currentPage >= totalPages;
|
|
463
|
-
const startItem = totalItems === 0 ? 0 : (currentPage - 1) * effectiveItemsPerPage + 1;
|
|
464
|
-
const endItem = Math.min(currentPage * effectiveItemsPerPage, totalItems);
|
|
515
|
+
const startItem = totalItems === 0 ? 0 : progressive ? 1 : (currentPage - 1) * effectiveItemsPerPage + 1;
|
|
516
|
+
const endItem = Math.min(progressive?.shownCount ?? currentPage * effectiveItemsPerPage, totalItems);
|
|
465
517
|
const defaultLabelFormat = (start, end, total) => {
|
|
466
518
|
return compact ? `${start}-${end} of ${total}` : `Showing ${start} to ${end} of ${total} entries`;
|
|
467
519
|
};
|
|
468
520
|
const formatLabel = labelFormat || defaultLabelFormat;
|
|
469
|
-
const buttonSize = compact ? "sm" : "icon";
|
|
470
|
-
const compactButtonClass = "relative isolate h-11 w-11 min-w-11 border-0 bg-transparent p-0 text-xs shadow-none before:absolute before:inset-1.5 before:z-0 before:rounded-md before:border before:border-border before:bg-card before:content-[''] hover:bg-transparent hover:before:bg-accent disabled:bg-transparent disabled:before:opacity-40 [&_svg]:relative [&_svg]:z-10 lg:h-7 lg:min-h-7 lg:w-7 lg:min-w-7 lg:border lg:border-input lg:bg-background lg:before:hidden lg:hover:bg-accent";
|
|
471
|
-
const compactActiveButtonClass = "text-primary-foreground before:border-primary before:bg-primary hover:before:bg-primary/90 lg:border-primary lg:bg-primary lg:hover:bg-primary/90";
|
|
472
521
|
const containerClass = cn(
|
|
473
|
-
"w-full items-center
|
|
522
|
+
"w-full items-center",
|
|
523
|
+
!compact && "border-t border-border",
|
|
474
524
|
layoutType === "grid" ? "grid grid-cols-[auto_minmax(0,1fr)_auto]" : "flex flex-nowrap justify-between",
|
|
475
|
-
compact ? "h-11 gap-0 px-0 py-0
|
|
525
|
+
compact ? "box-border h-11 gap-0 px-0 py-0" : "gap-1 px-2 py-1 sm:gap-4 sm:px-3",
|
|
476
526
|
className,
|
|
477
527
|
containerClassName
|
|
478
528
|
);
|
|
479
|
-
return /* @__PURE__ */ (0,
|
|
480
|
-
showItemsPerPageSelect && /* @__PURE__ */ (0,
|
|
529
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { "data-matrx-table-footer": true, className: containerClass, children: [
|
|
530
|
+
showItemsPerPageSelect && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
481
531
|
"div",
|
|
482
532
|
{
|
|
483
533
|
className: cn(
|
|
@@ -485,45 +535,45 @@ function GenericTablePagination({
|
|
|
485
535
|
!compact && "sm:p-1",
|
|
486
536
|
selectContainerClassName
|
|
487
537
|
),
|
|
488
|
-
children: /* @__PURE__ */ (0,
|
|
538
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
489
539
|
Select,
|
|
490
540
|
{
|
|
491
541
|
value: itemsPerPage.toString(),
|
|
492
542
|
onValueChange: (value) => onItemsPerPageChange(parseInt(value)),
|
|
493
543
|
children: [
|
|
494
|
-
/* @__PURE__ */ (0,
|
|
544
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
495
545
|
SelectTrigger,
|
|
496
546
|
{
|
|
497
547
|
"aria-label": "Rows per page",
|
|
498
548
|
className: cn(
|
|
499
549
|
"focus:ring-0",
|
|
500
|
-
compact ? "relative isolate h-11 w-
|
|
550
|
+
compact ? "relative isolate h-11 w-16 border-0 bg-transparent px-1 text-xs before:absolute before:inset-1.5 before:z-0 before:rounded-md before:border before:border-border before:bg-card before:content-[''] hover:before:bg-accent [&>*]:relative [&>*]:z-10 [&_svg]:h-3.5 [&_svg]:w-3.5" : "h-8 w-[3.75rem] text-xs sm:w-36 sm:text-sm"
|
|
501
551
|
),
|
|
502
|
-
children: /* @__PURE__ */ (0,
|
|
552
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SelectValue, { placeholder: itemsPerPage.toString() })
|
|
503
553
|
}
|
|
504
554
|
),
|
|
505
|
-
/* @__PURE__ */ (0,
|
|
506
|
-
availablePageSizes.map((size) => /* @__PURE__ */ (0,
|
|
507
|
-
showAllOption ? /* @__PURE__ */ (0,
|
|
555
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(SelectContent, { children: [
|
|
556
|
+
availablePageSizes.map((size) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SelectItem, { value: size.toString(), children: size }, size)),
|
|
557
|
+
showAllOption ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SelectItem, { value: allValue.toString(), children: allOptionLabel }) : null
|
|
508
558
|
] })
|
|
509
559
|
]
|
|
510
560
|
}
|
|
511
561
|
)
|
|
512
562
|
}
|
|
513
563
|
),
|
|
514
|
-
/* @__PURE__ */ (0,
|
|
564
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
515
565
|
"div",
|
|
516
566
|
{
|
|
517
567
|
className: cn("flex min-w-0 justify-center", infoContainerClassName),
|
|
518
|
-
children: showPageInfo && !hideEntriesInfo && /* @__PURE__ */ (0,
|
|
519
|
-
/* @__PURE__ */ (0,
|
|
568
|
+
children: showPageInfo && !hideEntriesInfo && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
|
|
569
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { className: "truncate text-[10px] tabular-nums text-muted-foreground sm:hidden", children: [
|
|
520
570
|
startItem,
|
|
521
571
|
"-",
|
|
522
572
|
endItem,
|
|
523
573
|
" / ",
|
|
524
574
|
totalItems
|
|
525
575
|
] }),
|
|
526
|
-
/* @__PURE__ */ (0,
|
|
576
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
527
577
|
"span",
|
|
528
578
|
{
|
|
529
579
|
className: `hidden whitespace-nowrap ${compact ? "text-xs" : "text-sm"} text-muted-foreground sm:inline`,
|
|
@@ -533,7 +583,17 @@ function GenericTablePagination({
|
|
|
533
583
|
] })
|
|
534
584
|
}
|
|
535
585
|
),
|
|
536
|
-
|
|
586
|
+
progressive ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
587
|
+
PaginationAction,
|
|
588
|
+
{
|
|
589
|
+
HostAction: host.ToolbarAction,
|
|
590
|
+
ariaLabel: progressive.hasMore ? "Show more rows" : "All rows shown",
|
|
591
|
+
disabledHint: "All rows shown",
|
|
592
|
+
disabled: !progressive.hasMore,
|
|
593
|
+
onClick: progressive.onShowMore,
|
|
594
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ChevronRight, { className: "h-3.5 w-3.5 rotate-90" })
|
|
595
|
+
}
|
|
596
|
+
) : showPageControls && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
537
597
|
"div",
|
|
538
598
|
{
|
|
539
599
|
className: cn(
|
|
@@ -542,107 +602,85 @@ function GenericTablePagination({
|
|
|
542
602
|
controlsContainerClassName
|
|
543
603
|
),
|
|
544
604
|
children: [
|
|
545
|
-
/* @__PURE__ */ (0,
|
|
546
|
-
|
|
605
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
606
|
+
PaginationAction,
|
|
547
607
|
{
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
visibilityClassName: "hidden sm:inline-flex",
|
|
551
|
-
label: "First page",
|
|
608
|
+
HostAction: host.ToolbarAction,
|
|
609
|
+
ariaLabel: "First page",
|
|
552
610
|
disabledHint: "Already on the first page",
|
|
611
|
+
visibilityClassName: "hidden sm:inline-flex",
|
|
612
|
+
fallbackClassName: navButtonClassName,
|
|
553
613
|
onClick: () => onPageChange(1),
|
|
554
614
|
disabled: isFirstPageDisabled,
|
|
555
|
-
className:
|
|
556
|
-
compact ? compactButtonClass : "h-8 w-8 p-0",
|
|
557
|
-
navButtonClassName
|
|
558
|
-
),
|
|
559
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ChevronsLeft, { className: compact ? "h-3.5 w-3.5" : "h-4 w-4" })
|
|
615
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ChevronsLeft, { className: "h-3.5 w-3.5" })
|
|
560
616
|
}
|
|
561
617
|
),
|
|
562
|
-
/* @__PURE__ */ (0,
|
|
563
|
-
|
|
618
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
619
|
+
PaginationAction,
|
|
564
620
|
{
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
label: "Previous page",
|
|
621
|
+
HostAction: host.ToolbarAction,
|
|
622
|
+
ariaLabel: "Previous page",
|
|
568
623
|
disabledHint: "Already on the first page",
|
|
624
|
+
fallbackClassName: navButtonClassName,
|
|
569
625
|
onClick: () => onPageChange(currentPage - 1),
|
|
570
626
|
disabled: isFirstPageDisabled,
|
|
571
|
-
className:
|
|
572
|
-
compact ? compactButtonClass : "h-8 w-8 p-0",
|
|
573
|
-
navButtonClassName
|
|
574
|
-
),
|
|
575
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ChevronLeft, { className: compact ? "h-3.5 w-3.5" : "h-4 w-4" })
|
|
627
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ChevronLeft, { className: "h-3.5 w-3.5" })
|
|
576
628
|
}
|
|
577
629
|
),
|
|
578
|
-
getPageNumbers(3).map((page) => /* @__PURE__ */ (0,
|
|
579
|
-
|
|
630
|
+
getPageNumbers(3).map((page) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
631
|
+
PaginationAction,
|
|
580
632
|
{
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
className: cn(
|
|
633
|
+
HostAction: host.ToolbarAction,
|
|
634
|
+
ariaLabel: `Page ${page}`,
|
|
635
|
+
active: currentPage === page,
|
|
636
|
+
disabledHint: `Already on page ${page}`,
|
|
637
|
+
visibilityClassName: cn(
|
|
587
638
|
"sm:hidden",
|
|
588
|
-
page === currentPage ? "inline-flex" : "hidden min-[360px]:inline-flex"
|
|
589
|
-
compact ? compactButtonClass : "h-8 w-8 p-0",
|
|
590
|
-
compact && page === currentPage && compactActiveButtonClass,
|
|
591
|
-
page === currentPage ? pageActiveButtonClassName : pageButtonClassName
|
|
639
|
+
page === currentPage ? "inline-flex" : "hidden min-[360px]:inline-flex"
|
|
592
640
|
),
|
|
593
|
-
|
|
641
|
+
fallbackClassName: page === currentPage ? pageActiveButtonClassName : pageButtonClassName,
|
|
642
|
+
onClick: () => onPageChange(page),
|
|
643
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: page })
|
|
594
644
|
},
|
|
595
645
|
`mobile-${page}`
|
|
596
646
|
)),
|
|
597
|
-
getPageNumbers().map((page) => /* @__PURE__ */ (0,
|
|
598
|
-
|
|
647
|
+
getPageNumbers().map((page) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
648
|
+
PaginationAction,
|
|
599
649
|
{
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
650
|
+
HostAction: host.ToolbarAction,
|
|
651
|
+
ariaLabel: `Page ${page}`,
|
|
652
|
+
active: currentPage === page,
|
|
653
|
+
disabledHint: `Already on page ${page}`,
|
|
654
|
+
visibilityClassName: "hidden sm:inline-flex",
|
|
655
|
+
fallbackClassName: currentPage === page ? pageActiveButtonClassName : pageButtonClassName,
|
|
604
656
|
onClick: () => onPageChange(page),
|
|
605
|
-
|
|
606
|
-
"hidden sm:inline-flex",
|
|
607
|
-
compact ? compactButtonClass : "h-8 w-8 p-0",
|
|
608
|
-
compact && page === currentPage && compactActiveButtonClass,
|
|
609
|
-
currentPage === page ? pageActiveButtonClassName : pageButtonClassName
|
|
610
|
-
),
|
|
611
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "relative z-10", children: page })
|
|
657
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: page })
|
|
612
658
|
},
|
|
613
659
|
`desktop-${page}`
|
|
614
660
|
)),
|
|
615
|
-
/* @__PURE__ */ (0,
|
|
616
|
-
|
|
661
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
662
|
+
PaginationAction,
|
|
617
663
|
{
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
label: "Next page",
|
|
664
|
+
HostAction: host.ToolbarAction,
|
|
665
|
+
ariaLabel: "Next page",
|
|
621
666
|
disabledHint: "Already on the last page",
|
|
667
|
+
fallbackClassName: navButtonClassName,
|
|
622
668
|
onClick: () => onPageChange(currentPage + 1),
|
|
623
669
|
disabled: isLastPageDisabled,
|
|
624
|
-
className:
|
|
625
|
-
compact ? compactButtonClass : "h-8 w-8 p-0",
|
|
626
|
-
navButtonClassName
|
|
627
|
-
),
|
|
628
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ChevronRight, { className: compact ? "h-3.5 w-3.5" : "h-4 w-4" })
|
|
670
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ChevronRight, { className: "h-3.5 w-3.5" })
|
|
629
671
|
}
|
|
630
672
|
),
|
|
631
|
-
/* @__PURE__ */ (0,
|
|
632
|
-
|
|
673
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
674
|
+
PaginationAction,
|
|
633
675
|
{
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
visibilityClassName: "hidden sm:inline-flex",
|
|
637
|
-
label: "Last page",
|
|
676
|
+
HostAction: host.ToolbarAction,
|
|
677
|
+
ariaLabel: "Last page",
|
|
638
678
|
disabledHint: "Already on the last page",
|
|
679
|
+
visibilityClassName: "hidden sm:inline-flex",
|
|
680
|
+
fallbackClassName: navButtonClassName,
|
|
639
681
|
onClick: () => onPageChange(totalPages),
|
|
640
682
|
disabled: isLastPageDisabled,
|
|
641
|
-
className:
|
|
642
|
-
compact ? compactButtonClass : "h-8 w-8 p-0",
|
|
643
|
-
navButtonClassName
|
|
644
|
-
),
|
|
645
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ChevronsRight, { className: compact ? "h-3.5 w-3.5" : "h-4 w-4" })
|
|
683
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ChevronsRight, { className: "h-3.5 w-3.5" })
|
|
646
684
|
}
|
|
647
685
|
)
|
|
648
686
|
]
|