@ai-matrx/design-system 0.49.2 → 0.49.3
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 +6 -0
- package/dist/data-table/index.cjs +24 -1
- package/dist/data-table/index.cjs.map +1 -1
- package/dist/data-table/index.js +24 -1
- 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;
|
|
@@ -51321,6 +51342,7 @@ function MatrxDataTableCore(coreProps) {
|
|
|
51321
51342
|
"div",
|
|
51322
51343
|
{
|
|
51323
51344
|
ref: cardsScrollRef,
|
|
51345
|
+
...inactiveProps(cardsActive === true),
|
|
51324
51346
|
"data-matrx-table-cards-scroll": true,
|
|
51325
51347
|
"aria-busy": isLoading || isFetching,
|
|
51326
51348
|
...appendQuery === null ? {} : { style: { containerType: "inline-size" } },
|
|
@@ -51429,6 +51451,7 @@ function MatrxDataTableCore(coreProps) {
|
|
|
51429
51451
|
"div",
|
|
51430
51452
|
{
|
|
51431
51453
|
ref: scrollRef,
|
|
51454
|
+
...mobileCards ? inactiveProps(cardsActive === false) : {},
|
|
51432
51455
|
"data-matrx-table-scroll": true,
|
|
51433
51456
|
onScroll: updateScrollHint,
|
|
51434
51457
|
...spreadsheetEnabled ? {
|