@ai-matrx/design-system 0.49.2 → 0.49.4
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 +12 -0
- package/dist/data-table/index.cjs +32 -6
- package/dist/data-table/index.cjs.map +1 -1
- package/dist/data-table/index.js +32 -6
- package/dist/data-table/index.js.map +1 -1
- package/dist/data-table/pagination.cjs +11 -1
- package/dist/data-table/pagination.cjs.map +1 -1
- package/dist/data-table/pagination.js +11 -1
- package/dist/data-table/pagination.js.map +1 -1
- package/dist/index.cjs +329 -324
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.js +329 -324
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/data-table/index.js
CHANGED
|
@@ -34934,6 +34934,16 @@ var selectTriggerVariants = cva2(
|
|
|
34934
34934
|
}
|
|
34935
34935
|
}
|
|
34936
34936
|
);
|
|
34937
|
+
function SelectChevron({ className, size = "default" }) {
|
|
34938
|
+
return /* @__PURE__ */ jsx11(
|
|
34939
|
+
RadixChevronDownIcon,
|
|
34940
|
+
{
|
|
34941
|
+
"aria-hidden": "true",
|
|
34942
|
+
"data-select-chevron": "",
|
|
34943
|
+
className: cn(size === "sm" ? "h-3.5 w-3.5" : "h-4 w-4", "shrink-0 opacity-50", className)
|
|
34944
|
+
}
|
|
34945
|
+
);
|
|
34946
|
+
}
|
|
34937
34947
|
var SelectTrigger = React8.forwardRef(({ className, children, hideArrow = false, size, ...props }, ref) => /* @__PURE__ */ jsxs7(
|
|
34938
34948
|
SelectPrimitive.Trigger,
|
|
34939
34949
|
{
|
|
@@ -34942,7 +34952,7 @@ var SelectTrigger = React8.forwardRef(({ className, children, hideArrow = false,
|
|
|
34942
34952
|
...props,
|
|
34943
34953
|
children: [
|
|
34944
34954
|
children,
|
|
34945
|
-
!hideArrow && /* @__PURE__ */ jsx11(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx11(
|
|
34955
|
+
!hideArrow && /* @__PURE__ */ jsx11(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx11(SelectChevron, { size: size === "sm" ? "sm" : "default" }) })
|
|
34946
34956
|
]
|
|
34947
34957
|
}
|
|
34948
34958
|
));
|
|
@@ -48163,6 +48173,17 @@ function MatrxDataTableCore(coreProps) {
|
|
|
48163
48173
|
const CHECKBOX_TAP_AREA = "h-4 w-4 touch-manipulation";
|
|
48164
48174
|
const mobileCardsClass = mobileCardsBreakpoint === "lg" ? "lg:hidden" : "sm:hidden";
|
|
48165
48175
|
const tableWithCardsClass = mobileCardsBreakpoint === "lg" ? "max-lg:hidden" : "max-sm:hidden";
|
|
48176
|
+
const cardsQuery = mobileCardsBreakpoint === "lg" ? "(max-width: 1023px)" : "(max-width: 639px)";
|
|
48177
|
+
const [cardsActive, setCardsActive] = useState25(null);
|
|
48178
|
+
useEffect20(() => {
|
|
48179
|
+
if (!mobileCards || typeof window === "undefined" || !window.matchMedia) return;
|
|
48180
|
+
const mql = window.matchMedia(cardsQuery);
|
|
48181
|
+
const read2 = () => setCardsActive(mql.matches);
|
|
48182
|
+
read2();
|
|
48183
|
+
mql.addEventListener?.("change", read2);
|
|
48184
|
+
return () => mql.removeEventListener?.("change", read2);
|
|
48185
|
+
}, [mobileCards, cardsQuery]);
|
|
48186
|
+
const inactiveProps = (active) => cardsActive === null || active ? {} : { inert: true, "aria-hidden": true };
|
|
48166
48187
|
const controlledQuery = query?.mode === "controlled" || query?.mode === "controlled-local" || query?.mode === "controlled-append" ? query : null;
|
|
48167
48188
|
const remoteQuery = query?.mode === "controlled" || query?.mode === "controlled-append" ? query : null;
|
|
48168
48189
|
const sourceProcessing = query?.mode === "controlled" || query?.mode === "controlled-local" ? query.sourceProcessing : appendQuery?.sourceProcessing;
|
|
@@ -50423,11 +50444,14 @@ function MatrxDataTableCore(coreProps) {
|
|
|
50423
50444
|
const footerEpoch = useRenderEpoch([
|
|
50424
50445
|
...chromeGeometry,
|
|
50425
50446
|
footerRows,
|
|
50426
|
-
|
|
50427
|
-
|
|
50428
|
-
|
|
50429
|
-
|
|
50430
|
-
|
|
50447
|
+
// A caller-owned footer changes through its `footerRows` identity. The page rows must
|
|
50448
|
+
// invalidate this chrome only when this table is drawing its own aggregate totals; otherwise
|
|
50449
|
+
// one edited record needlessly redraws every caller-owned footer cell and menu.
|
|
50450
|
+
hasSummaryTotals ? summaryContext.rows : null,
|
|
50451
|
+
hasSummaryTotals ? summaryContext.isFiltered : null,
|
|
50452
|
+
hasSummaryTotals ? summaryContext.coverage : null,
|
|
50453
|
+
hasSummaryTotals ? summaryCaption : null,
|
|
50454
|
+
hasSummaryTotals ? summaryUsesSource : null,
|
|
50431
50455
|
...summaryTotals.flatMap((total) => [total.id, total.value, total.unavailable])
|
|
50432
50456
|
]);
|
|
50433
50457
|
const paginationEpoch = useRenderEpoch([
|
|
@@ -51321,6 +51345,7 @@ function MatrxDataTableCore(coreProps) {
|
|
|
51321
51345
|
"div",
|
|
51322
51346
|
{
|
|
51323
51347
|
ref: cardsScrollRef,
|
|
51348
|
+
...inactiveProps(cardsActive === true),
|
|
51324
51349
|
"data-matrx-table-cards-scroll": true,
|
|
51325
51350
|
"aria-busy": isLoading || isFetching,
|
|
51326
51351
|
...appendQuery === null ? {} : { style: { containerType: "inline-size" } },
|
|
@@ -51429,6 +51454,7 @@ function MatrxDataTableCore(coreProps) {
|
|
|
51429
51454
|
"div",
|
|
51430
51455
|
{
|
|
51431
51456
|
ref: scrollRef,
|
|
51457
|
+
...mobileCards ? inactiveProps(cardsActive === false) : {},
|
|
51432
51458
|
"data-matrx-table-scroll": true,
|
|
51433
51459
|
onScroll: updateScrollHint,
|
|
51434
51460
|
...spreadsheetEnabled ? {
|