@ai-matrx/design-system 0.9.0 → 0.10.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 +149 -0
- package/README.md +15 -1
- package/dist/index.cjs +174 -82
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +133 -8
- package/dist/index.d.ts +133 -8
- package/dist/index.js +174 -82
- package/dist/index.js.map +1 -1
- package/dist/styles.css +434 -0
- package/dist/tokens.css +25 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -708,6 +708,45 @@ var Button = React5.forwardRef(
|
|
|
708
708
|
);
|
|
709
709
|
Button.displayName = "Button";
|
|
710
710
|
|
|
711
|
+
// src/motion.ts
|
|
712
|
+
var MOTION_OVERLAY = "matrx-motion-overlay";
|
|
713
|
+
var MOTION_DIALOG = "matrx-motion-dialog";
|
|
714
|
+
var MOTION_BOTTOM_SHEET = "matrx-motion-bottom-sheet";
|
|
715
|
+
var MOTION_POPPER = "matrx-motion-popper";
|
|
716
|
+
var MOTION_SHEET = {
|
|
717
|
+
top: "matrx-motion-sheet-top",
|
|
718
|
+
bottom: "matrx-motion-sheet-bottom",
|
|
719
|
+
left: "matrx-motion-sheet-left",
|
|
720
|
+
right: "matrx-motion-sheet-right",
|
|
721
|
+
center: "matrx-motion-sheet-center"
|
|
722
|
+
};
|
|
723
|
+
var MOTION_PULSE = "matrx-pulse";
|
|
724
|
+
var MOTION_SPIN = "matrx-spin";
|
|
725
|
+
var ALL_MOTION_CLASSES = [
|
|
726
|
+
MOTION_OVERLAY,
|
|
727
|
+
MOTION_DIALOG,
|
|
728
|
+
MOTION_BOTTOM_SHEET,
|
|
729
|
+
MOTION_POPPER,
|
|
730
|
+
...Object.values(MOTION_SHEET),
|
|
731
|
+
MOTION_PULSE,
|
|
732
|
+
MOTION_SPIN
|
|
733
|
+
];
|
|
734
|
+
var FORBIDDEN_HOST_MOTION_UTILITIES = [
|
|
735
|
+
"animate-in",
|
|
736
|
+
"animate-out",
|
|
737
|
+
"fade-in",
|
|
738
|
+
"fade-out",
|
|
739
|
+
"zoom-in",
|
|
740
|
+
"zoom-out",
|
|
741
|
+
"slide-in-from",
|
|
742
|
+
"slide-out-to",
|
|
743
|
+
"animate-accordion",
|
|
744
|
+
"animate-slide-down",
|
|
745
|
+
"animate-slide-up",
|
|
746
|
+
"animate-pulse",
|
|
747
|
+
"animate-spin"
|
|
748
|
+
];
|
|
749
|
+
|
|
711
750
|
// src/portal-container.tsx
|
|
712
751
|
import * as React6 from "react";
|
|
713
752
|
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
@@ -746,7 +785,8 @@ var AlertDialogOverlay = React7.forwardRef(({ className, ...props }, ref) => /*
|
|
|
746
785
|
ref,
|
|
747
786
|
"data-slot": "alert-dialog-overlay",
|
|
748
787
|
className: cn(
|
|
749
|
-
"fixed inset-0 z-[10000] bg-[var(--matrx-overlay-scrim)]
|
|
788
|
+
"fixed inset-0 z-[10000] bg-[var(--matrx-overlay-scrim)]",
|
|
789
|
+
MOTION_OVERLAY,
|
|
750
790
|
className
|
|
751
791
|
),
|
|
752
792
|
...props
|
|
@@ -765,7 +805,7 @@ var AlertDialogDescription = React7.forwardRef(({ className, ...props }, ref) =>
|
|
|
765
805
|
}
|
|
766
806
|
));
|
|
767
807
|
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
|
|
768
|
-
var AlertDialogContent = React7.forwardRef(({ className, children, container, ...props }, ref) => {
|
|
808
|
+
var AlertDialogContent = React7.forwardRef(({ className, children, container, animated = true, ...props }, ref) => {
|
|
769
809
|
const hasDescription = treeContainsComponent2(children, AlertDialogDescription) || treeContainsComponent2(children, AlertDialogPrimitive.Description);
|
|
770
810
|
return /* @__PURE__ */ jsxs5(AlertDialogPortal, { container, children: [
|
|
771
811
|
/* @__PURE__ */ jsx10(AlertDialogOverlay, {}),
|
|
@@ -775,11 +815,12 @@ var AlertDialogContent = React7.forwardRef(({ className, children, container, ..
|
|
|
775
815
|
ref,
|
|
776
816
|
"data-slot": "alert-dialog-content",
|
|
777
817
|
className: cn(
|
|
778
|
-
"fixed left-[50%] top-[50%] z-[10000] grid min-w-0 w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg
|
|
818
|
+
"fixed left-[50%] top-[50%] z-[10000] grid min-w-0 w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg",
|
|
779
819
|
// Ruling 3 — never taller than the viewport, always scrollable, and
|
|
780
820
|
// the footer stays reachable via --dialog-pad like Dialog's.
|
|
781
821
|
"max-h-[85dvh] overflow-y-auto overscroll-contain [--dialog-pad:1.5rem] overflow-x-clip [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full",
|
|
782
|
-
"
|
|
822
|
+
"sm:rounded-lg",
|
|
823
|
+
animated && MOTION_DIALOG,
|
|
783
824
|
className
|
|
784
825
|
),
|
|
785
826
|
...props,
|
|
@@ -1115,8 +1156,8 @@ var Command = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
1115
1156
|
}
|
|
1116
1157
|
));
|
|
1117
1158
|
Command.displayName = CommandPrimitive.displayName;
|
|
1118
|
-
var DIALOG_DESKTOP_CLASSES = "fixed left-[50%] top-[50%] z-[10000] grid min-w-0 w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 overflow-x-clip border bg-background p-6 shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full
|
|
1119
|
-
var DIALOG_MOBILE_SHEET_CLASSES = "fixed inset-x-0 bottom-0 left-0 right-0 top-auto z-[10000] flex min-w-0 flex-col w-full max-w-full max-h-[90dvh] translate-x-0 translate-y-0 gap-4 overflow-x-clip border-t bg-background p-4 pb-safe shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full
|
|
1159
|
+
var DIALOG_DESKTOP_CLASSES = "fixed left-[50%] top-[50%] z-[10000] grid min-w-0 w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 overflow-x-clip border bg-background p-6 shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full sm:rounded-lg";
|
|
1160
|
+
var DIALOG_MOBILE_SHEET_CLASSES = "fixed inset-x-0 bottom-0 left-0 right-0 top-auto z-[10000] flex min-w-0 flex-col w-full max-w-full max-h-[90dvh] translate-x-0 translate-y-0 gap-4 overflow-x-clip border-t bg-background p-4 pb-safe shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full rounded-t-2xl rounded-b-none overflow-y-auto overscroll-contain";
|
|
1120
1161
|
var DIALOG_MOBILE_SHEET_OVERRIDE = "inset-x-0 bottom-0 left-0 right-0 top-auto translate-x-0 translate-y-0 w-full max-w-full max-h-[90dvh] rounded-b-none rounded-t-2xl overflow-y-auto";
|
|
1121
1162
|
var CommandDialogContent = React13.forwardRef(({ className, children, container, ...props }, ref) => {
|
|
1122
1163
|
const isMobile = useIsMobile();
|
|
@@ -1126,7 +1167,10 @@ var CommandDialogContent = React13.forwardRef(({ className, children, container,
|
|
|
1126
1167
|
isModal ? /* @__PURE__ */ jsx15(
|
|
1127
1168
|
DialogPrimitive.Overlay,
|
|
1128
1169
|
{
|
|
1129
|
-
className:
|
|
1170
|
+
className: cn(
|
|
1171
|
+
"fixed inset-0 z-[10000] bg-[var(--matrx-overlay-scrim-soft)]",
|
|
1172
|
+
MOTION_OVERLAY
|
|
1173
|
+
)
|
|
1130
1174
|
}
|
|
1131
1175
|
) : null,
|
|
1132
1176
|
/* @__PURE__ */ jsxs6(
|
|
@@ -1137,6 +1181,7 @@ var CommandDialogContent = React13.forwardRef(({ className, children, container,
|
|
|
1137
1181
|
"aria-describedby": void 0,
|
|
1138
1182
|
className: cn(
|
|
1139
1183
|
isMobile ? DIALOG_MOBILE_SHEET_CLASSES : DIALOG_DESKTOP_CLASSES,
|
|
1184
|
+
isMobile ? MOTION_BOTTOM_SHEET : MOTION_DIALOG,
|
|
1140
1185
|
className,
|
|
1141
1186
|
isMobile && DIALOG_MOBILE_SHEET_OVERRIDE,
|
|
1142
1187
|
!isModal && "z-[900]"
|
|
@@ -1266,7 +1311,6 @@ var ContextMenuPortal = ContextMenuPrimitive.Portal;
|
|
|
1266
1311
|
var ContextMenuSub = ContextMenuPrimitive.Sub;
|
|
1267
1312
|
var ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
|
|
1268
1313
|
var SURFACE_CLASS = "z-50 min-w-[8rem] max-h-[var(--radix-context-menu-content-available-height)] overflow-y-auto overflow-x-hidden overscroll-contain rounded-md border bg-popover p-1 text-popover-foreground";
|
|
1269
|
-
var MOTION_CLASS = "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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";
|
|
1270
1314
|
var ITEM_CLASS = "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50";
|
|
1271
1315
|
var INDICATOR_ITEM_CLASS = "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50";
|
|
1272
1316
|
var ContextMenuSubTrigger = React14.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs7(
|
|
@@ -1292,7 +1336,7 @@ var ContextMenuSubContent = React14.forwardRef(({ className, ...props }, ref) =>
|
|
|
1292
1336
|
{
|
|
1293
1337
|
ref,
|
|
1294
1338
|
"data-slot": "context-menu-sub-content",
|
|
1295
|
-
className: cn(SURFACE_CLASS, "shadow-lg",
|
|
1339
|
+
className: cn(SURFACE_CLASS, "shadow-lg", MOTION_POPPER, className),
|
|
1296
1340
|
...props
|
|
1297
1341
|
}
|
|
1298
1342
|
));
|
|
@@ -1304,7 +1348,7 @@ var ContextMenuContent = React14.forwardRef(({ className, container, ...props },
|
|
|
1304
1348
|
{
|
|
1305
1349
|
ref,
|
|
1306
1350
|
"data-slot": "context-menu-content",
|
|
1307
|
-
className: cn(SURFACE_CLASS, "shadow-md",
|
|
1351
|
+
className: cn(SURFACE_CLASS, "shadow-md", MOTION_POPPER, className),
|
|
1308
1352
|
...props
|
|
1309
1353
|
}
|
|
1310
1354
|
) });
|
|
@@ -1404,7 +1448,14 @@ var Popover = PopoverPrimitive.Root;
|
|
|
1404
1448
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
1405
1449
|
var PopoverAnchor = PopoverPrimitive.Anchor;
|
|
1406
1450
|
var PopoverContent = React15.forwardRef(
|
|
1407
|
-
({
|
|
1451
|
+
({
|
|
1452
|
+
className,
|
|
1453
|
+
align = "center",
|
|
1454
|
+
sideOffset = 4,
|
|
1455
|
+
container,
|
|
1456
|
+
animated = true,
|
|
1457
|
+
...props
|
|
1458
|
+
}, ref) => {
|
|
1408
1459
|
const portalContainer = usePortalContainer(container);
|
|
1409
1460
|
return /* @__PURE__ */ jsx17(PopoverPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ jsx17(
|
|
1410
1461
|
PopoverPrimitive.Content,
|
|
@@ -1419,7 +1470,8 @@ var PopoverContent = React15.forwardRef(
|
|
|
1419
1470
|
// z, DOM portal order decides, so a dialog opened FROM a popover stacks
|
|
1420
1471
|
// above it, and a popover opened from a dialog still stacks above the
|
|
1421
1472
|
// dialog. z-[10001] buried dialogs behind fullscreen popovers.
|
|
1422
|
-
"z-[10000] w-72 max-h-[var(--radix-popover-content-available-height)] overflow-y-auto overscroll-contain rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none
|
|
1473
|
+
"z-[10000] w-72 max-h-[var(--radix-popover-content-available-height)] overflow-y-auto overscroll-contain rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",
|
|
1474
|
+
animated && MOTION_POPPER,
|
|
1423
1475
|
className
|
|
1424
1476
|
),
|
|
1425
1477
|
...props
|
|
@@ -1591,7 +1643,7 @@ function CreatablePicker({
|
|
|
1591
1643
|
onClick: () => void create(typed),
|
|
1592
1644
|
className: "flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-left text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground disabled:opacity-50",
|
|
1593
1645
|
children: [
|
|
1594
|
-
busy ? /* @__PURE__ */ jsx18(Loader2Icon, { className: "size-3.5 shrink-0
|
|
1646
|
+
busy ? /* @__PURE__ */ jsx18(Loader2Icon, { className: "size-3.5 shrink-0 matrx-spin" }) : /* @__PURE__ */ jsx18(PlusIcon, { className: "size-3.5 shrink-0" }),
|
|
1595
1647
|
/* @__PURE__ */ jsx18("span", { className: "min-w-0 truncate", children: typed && !exactMatch ? `Create \u201C${typed}\u201D` : `Add ${article(noun)}\u2026` })
|
|
1596
1648
|
]
|
|
1597
1649
|
}
|
|
@@ -1700,7 +1752,8 @@ var DialogOverlay = React16.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
1700
1752
|
className: cn(
|
|
1701
1753
|
// Page context behind the modal stays readable; separation comes from a
|
|
1702
1754
|
// light token scrim, not a blur.
|
|
1703
|
-
"fixed inset-0 z-[10000] bg-[var(--matrx-overlay-scrim-soft)]
|
|
1755
|
+
"fixed inset-0 z-[10000] bg-[var(--matrx-overlay-scrim-soft)]",
|
|
1756
|
+
MOTION_OVERLAY,
|
|
1704
1757
|
className
|
|
1705
1758
|
),
|
|
1706
1759
|
...props
|
|
@@ -1719,14 +1772,15 @@ var DialogContentPrimitive = React16.forwardRef((props, ref) => {
|
|
|
1719
1772
|
);
|
|
1720
1773
|
});
|
|
1721
1774
|
DialogContentPrimitive.displayName = "DialogContentPrimitive";
|
|
1722
|
-
var DIALOG_DESKTOP_CLASSES2 = "fixed left-[50%] top-[50%] z-[10000] grid min-w-0 w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 max-h-[85dvh] overflow-y-auto overscroll-contain [--dialog-pad:1.5rem] overflow-x-clip border bg-background p-6 shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full
|
|
1723
|
-
var DIALOG_MOBILE_SHEET_CLASSES2 = "matrx-mobile-sheet fixed inset-x-0 bottom-0 left-0 right-0 top-auto z-[10000] flex min-w-0 flex-col w-full max-w-full max-h-[90dvh] translate-x-0 translate-y-0 gap-4 [--dialog-pad:1rem] overflow-x-clip border-t bg-background p-4 pb-safe shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full
|
|
1775
|
+
var DIALOG_DESKTOP_CLASSES2 = "fixed left-[50%] top-[50%] z-[10000] grid min-w-0 w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 max-h-[85dvh] overflow-y-auto overscroll-contain [--dialog-pad:1.5rem] overflow-x-clip border bg-background p-6 shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full sm:rounded-lg";
|
|
1776
|
+
var DIALOG_MOBILE_SHEET_CLASSES2 = "matrx-mobile-sheet fixed inset-x-0 bottom-0 left-0 right-0 top-auto z-[10000] flex min-w-0 flex-col w-full max-w-full max-h-[90dvh] translate-x-0 translate-y-0 gap-4 [--dialog-pad:1rem] overflow-x-clip border-t bg-background p-4 pb-safe shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full rounded-t-2xl rounded-b-none overflow-y-auto overscroll-contain";
|
|
1724
1777
|
var DIALOG_MOBILE_SHEET_OVERRIDE2 = "inset-x-0 bottom-0 left-0 right-0 top-auto translate-x-0 translate-y-0 w-full max-w-full max-h-[90dvh] rounded-b-none rounded-t-2xl overflow-y-auto";
|
|
1725
1778
|
var DialogContent = React16.forwardRef(
|
|
1726
1779
|
({
|
|
1727
1780
|
className,
|
|
1728
1781
|
children,
|
|
1729
1782
|
mobileSheet = true,
|
|
1783
|
+
animated = true,
|
|
1730
1784
|
showCloseButton = true,
|
|
1731
1785
|
container,
|
|
1732
1786
|
...props
|
|
@@ -1758,6 +1812,7 @@ var DialogContent = React16.forwardRef(
|
|
|
1758
1812
|
"data-slot": "dialog-content",
|
|
1759
1813
|
className: cn(
|
|
1760
1814
|
asSheet ? DIALOG_MOBILE_SHEET_CLASSES2 : DIALOG_DESKTOP_CLASSES2,
|
|
1815
|
+
animated && (asSheet ? MOTION_BOTTOM_SHEET : MOTION_DIALOG),
|
|
1761
1816
|
className,
|
|
1762
1817
|
asSheet && DIALOG_MOBILE_SHEET_OVERRIDE2,
|
|
1763
1818
|
// A non-modal dialog is the coexistence contract for content that
|
|
@@ -1862,7 +1917,6 @@ var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
|
1862
1917
|
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
1863
1918
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
1864
1919
|
var MENU_SURFACE_CLASS = "z-[10001] min-w-[8rem] max-h-[var(--radix-dropdown-menu-content-available-height)] overflow-y-auto overflow-x-hidden overscroll-contain rounded-md border bg-popover p-1 text-popover-foreground";
|
|
1865
|
-
var MENU_MOTION_CLASS = "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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";
|
|
1866
1920
|
var MENU_ITEM_CLASS = "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50";
|
|
1867
1921
|
var MENU_INDICATOR_ITEM_CLASS = "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50";
|
|
1868
1922
|
var DropdownMenuSubTrigger = React17.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs10(
|
|
@@ -1888,7 +1942,7 @@ var DropdownMenuSubContent = React17.forwardRef(({ className, ...props }, ref) =
|
|
|
1888
1942
|
{
|
|
1889
1943
|
ref,
|
|
1890
1944
|
"data-slot": "dropdown-menu-sub-content",
|
|
1891
|
-
className: cn(MENU_SURFACE_CLASS, "shadow-lg",
|
|
1945
|
+
className: cn(MENU_SURFACE_CLASS, "shadow-lg", MOTION_POPPER, className),
|
|
1892
1946
|
...props
|
|
1893
1947
|
}
|
|
1894
1948
|
));
|
|
@@ -1904,7 +1958,7 @@ var DropdownMenuContent = React17.forwardRef(({ className, sideOffset = 4, conta
|
|
|
1904
1958
|
className: cn(
|
|
1905
1959
|
MENU_SURFACE_CLASS,
|
|
1906
1960
|
"shadow-md",
|
|
1907
|
-
|
|
1961
|
+
MOTION_POPPER,
|
|
1908
1962
|
className
|
|
1909
1963
|
),
|
|
1910
1964
|
...props
|
|
@@ -2133,7 +2187,7 @@ function EditableLabel({
|
|
|
2133
2187
|
)
|
|
2134
2188
|
}
|
|
2135
2189
|
),
|
|
2136
|
-
busy && /* @__PURE__ */ jsx21(Loader2Icon, { className: "absolute right-1 h-3.5 w-3.5
|
|
2190
|
+
busy && /* @__PURE__ */ jsx21(Loader2Icon, { className: "absolute right-1 h-3.5 w-3.5 matrx-spin text-muted-foreground" }),
|
|
2137
2191
|
error && /* @__PURE__ */ jsx21("span", { className: "absolute left-0 top-full mt-0.5 whitespace-nowrap text-xs text-destructive", children: error })
|
|
2138
2192
|
] });
|
|
2139
2193
|
}
|
|
@@ -2318,7 +2372,7 @@ function ToolbarButton({
|
|
|
2318
2372
|
/* @__PURE__ */ jsx24(
|
|
2319
2373
|
Icon2,
|
|
2320
2374
|
{
|
|
2321
|
-
className: cn("w-3.5 h-3.5 shrink-0", action.running && "
|
|
2375
|
+
className: cn("w-3.5 h-3.5 shrink-0", action.running && "matrx-spin")
|
|
2322
2376
|
}
|
|
2323
2377
|
),
|
|
2324
2378
|
showLabel && /* @__PURE__ */ jsx24("span", { children: text })
|
|
@@ -2762,36 +2816,46 @@ var SelectScrollDownButton = React23.forwardRef(({ className, ...props }, ref) =
|
|
|
2762
2816
|
}
|
|
2763
2817
|
));
|
|
2764
2818
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
2765
|
-
var SelectContent = React23.forwardRef(
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
"p-0.5 overflow-y-auto",
|
|
2785
|
-
position === "popper" && "w-full min-w-[var(--radix-select-trigger-width)] max-h-[var(--radix-select-content-available-height)]"
|
|
2786
|
-
),
|
|
2787
|
-
children
|
|
2788
|
-
}
|
|
2819
|
+
var SelectContent = React23.forwardRef(
|
|
2820
|
+
({
|
|
2821
|
+
className,
|
|
2822
|
+
children,
|
|
2823
|
+
position = "popper",
|
|
2824
|
+
container,
|
|
2825
|
+
animated = true,
|
|
2826
|
+
...props
|
|
2827
|
+
}, ref) => {
|
|
2828
|
+
const portalContainer = usePortalContainer(container);
|
|
2829
|
+
return /* @__PURE__ */ jsx29(SelectPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ jsxs16(
|
|
2830
|
+
SelectPrimitive.Content,
|
|
2831
|
+
{
|
|
2832
|
+
ref,
|
|
2833
|
+
className: cn(
|
|
2834
|
+
"relative z-[10001] max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md",
|
|
2835
|
+
animated && MOTION_POPPER,
|
|
2836
|
+
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
2837
|
+
className
|
|
2789
2838
|
),
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2839
|
+
position,
|
|
2840
|
+
...props,
|
|
2841
|
+
children: [
|
|
2842
|
+
/* @__PURE__ */ jsx29(SelectScrollUpButton, {}),
|
|
2843
|
+
/* @__PURE__ */ jsx29(
|
|
2844
|
+
SelectPrimitive.Viewport,
|
|
2845
|
+
{
|
|
2846
|
+
className: cn(
|
|
2847
|
+
"p-0.5 overflow-y-auto",
|
|
2848
|
+
position === "popper" && "w-full min-w-[var(--radix-select-trigger-width)] max-h-[var(--radix-select-content-available-height)]"
|
|
2849
|
+
),
|
|
2850
|
+
children
|
|
2851
|
+
}
|
|
2852
|
+
),
|
|
2853
|
+
/* @__PURE__ */ jsx29(SelectScrollDownButton, {})
|
|
2854
|
+
]
|
|
2855
|
+
}
|
|
2856
|
+
) });
|
|
2857
|
+
}
|
|
2858
|
+
);
|
|
2795
2859
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
2796
2860
|
var SelectLabel = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
|
|
2797
2861
|
SelectPrimitive.Label,
|
|
@@ -2880,7 +2944,8 @@ var SheetOverlay = React25.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
2880
2944
|
SheetPrimitive.Overlay,
|
|
2881
2945
|
{
|
|
2882
2946
|
className: cn(
|
|
2883
|
-
"fixed inset-0 z-50 bg-[var(--matrx-overlay-scrim)]
|
|
2947
|
+
"fixed inset-0 z-50 bg-[var(--matrx-overlay-scrim)]",
|
|
2948
|
+
MOTION_OVERLAY,
|
|
2884
2949
|
className
|
|
2885
2950
|
),
|
|
2886
2951
|
...props,
|
|
@@ -2889,15 +2954,22 @@ var SheetOverlay = React25.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
2889
2954
|
));
|
|
2890
2955
|
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
|
|
2891
2956
|
var sheetVariants = cva5(
|
|
2892
|
-
|
|
2957
|
+
// Motion is NOT stated here (0.10.0). The `data-[state=*]:animate-in/out`
|
|
2958
|
+
// + `slide-in-from-*` pairs this base and its side variants used to carry
|
|
2959
|
+
// came from the `tailwindcss-animate` HOST plugin, which three of four
|
|
2960
|
+
// consumers never loaded — every sheet in them slammed open with no
|
|
2961
|
+
// animation and no error. `SheetContent` now applies the package-owned
|
|
2962
|
+
// `MOTION_SHEET[side]` class alongside these variants; the keyframes,
|
|
2963
|
+
// durations and reduced-motion handling all live in `styles.css`.
|
|
2964
|
+
"fixed z-50 gap-4 bg-background p-6 shadow-lg",
|
|
2893
2965
|
{
|
|
2894
2966
|
variants: {
|
|
2895
2967
|
side: {
|
|
2896
|
-
top: "inset-x-0 top-0 border-b
|
|
2897
|
-
bottom: "inset-x-0 bottom-0 border-t
|
|
2898
|
-
left: "inset-y-0 left-0 h-full w-3/4 border-r
|
|
2899
|
-
right: "inset-y-0 right-0 h-full w-3/4 border-l
|
|
2900
|
-
center: "inset-0 m-auto max-h-full max-w-full border rounded-lg
|
|
2968
|
+
top: "inset-x-0 top-0 border-b",
|
|
2969
|
+
bottom: "inset-x-0 bottom-0 border-t",
|
|
2970
|
+
left: "inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
|
|
2971
|
+
right: "inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
|
|
2972
|
+
center: "inset-0 m-auto max-h-full max-w-full border rounded-lg"
|
|
2901
2973
|
}
|
|
2902
2974
|
},
|
|
2903
2975
|
defaultVariants: {
|
|
@@ -2922,6 +2994,7 @@ var SheetContent = React25.forwardRef(
|
|
|
2922
2994
|
hideCloseButton = false,
|
|
2923
2995
|
hideOverlay = false,
|
|
2924
2996
|
overlayClassName,
|
|
2997
|
+
animated = true,
|
|
2925
2998
|
...props
|
|
2926
2999
|
}, ref) => {
|
|
2927
3000
|
const hasDescription = treeContainsComponent4(children, SheetDescription) || treeContainsComponent4(children, SheetPrimitive.Description);
|
|
@@ -2931,7 +3004,11 @@ var SheetContent = React25.forwardRef(
|
|
|
2931
3004
|
SheetContentBase,
|
|
2932
3005
|
{
|
|
2933
3006
|
ref,
|
|
2934
|
-
className: cn(
|
|
3007
|
+
className: cn(
|
|
3008
|
+
sheetVariants({ side }),
|
|
3009
|
+
animated && MOTION_SHEET[side ?? "right"],
|
|
3010
|
+
className
|
|
3011
|
+
),
|
|
2935
3012
|
...hasDescription ? {} : { "aria-describedby": void 0 },
|
|
2936
3013
|
...props,
|
|
2937
3014
|
children: [
|
|
@@ -2987,14 +3064,16 @@ SheetTitle.displayName = SheetPrimitive.Title.displayName;
|
|
|
2987
3064
|
|
|
2988
3065
|
// src/skeleton.tsx
|
|
2989
3066
|
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
2990
|
-
function Skeleton({
|
|
2991
|
-
className,
|
|
2992
|
-
...props
|
|
2993
|
-
}) {
|
|
3067
|
+
function Skeleton({ className, animated = true, ...props }) {
|
|
2994
3068
|
return /* @__PURE__ */ jsx32(
|
|
2995
3069
|
"div",
|
|
2996
3070
|
{
|
|
2997
|
-
|
|
3071
|
+
"data-slot": "skeleton",
|
|
3072
|
+
className: cn(
|
|
3073
|
+
"rounded-md bg-primary/10",
|
|
3074
|
+
animated && MOTION_PULSE,
|
|
3075
|
+
className
|
|
3076
|
+
),
|
|
2998
3077
|
...props
|
|
2999
3078
|
}
|
|
3000
3079
|
);
|
|
@@ -3478,23 +3557,26 @@ import * as React30 from "react";
|
|
|
3478
3557
|
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
3479
3558
|
var HoverCard = HoverCardPrimitive.Root;
|
|
3480
3559
|
var HoverCardTrigger = HoverCardPrimitive.Trigger;
|
|
3481
|
-
var HoverCardContent = React30.forwardRef(
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
HoverCardPrimitive.
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
}
|
|
3560
|
+
var HoverCardContent = React30.forwardRef(
|
|
3561
|
+
({ className, align = "center", sideOffset = 4, container, animated = true, ...props }, ref) => {
|
|
3562
|
+
const resolved = usePortalContainer(container);
|
|
3563
|
+
return /* @__PURE__ */ jsx38(HoverCardPrimitive.Portal, { container: resolved ?? null, children: /* @__PURE__ */ jsx38(
|
|
3564
|
+
HoverCardPrimitive.Content,
|
|
3565
|
+
{
|
|
3566
|
+
ref,
|
|
3567
|
+
"data-slot": "hover-card-content",
|
|
3568
|
+
align,
|
|
3569
|
+
sideOffset,
|
|
3570
|
+
className: cn(
|
|
3571
|
+
"z-[10001] w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",
|
|
3572
|
+
animated && MOTION_POPPER,
|
|
3573
|
+
className
|
|
3574
|
+
),
|
|
3575
|
+
...props
|
|
3576
|
+
}
|
|
3577
|
+
) });
|
|
3578
|
+
}
|
|
3579
|
+
);
|
|
3498
3580
|
HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
|
|
3499
3581
|
|
|
3500
3582
|
// src/radio-group.tsx
|
|
@@ -3757,7 +3839,7 @@ import { jsx as jsx43 } from "react/jsx-runtime";
|
|
|
3757
3839
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
3758
3840
|
var Tooltip = TooltipPrimitive.Root;
|
|
3759
3841
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
3760
|
-
var TooltipContent = React34.forwardRef(({ className, sideOffset = 4, container, ...props }, ref) => {
|
|
3842
|
+
var TooltipContent = React34.forwardRef(({ className, sideOffset = 4, container, animated = true, ...props }, ref) => {
|
|
3761
3843
|
const resolved = usePortalContainer(container);
|
|
3762
3844
|
return /* @__PURE__ */ jsx43(TooltipPrimitive.Portal, { container: resolved ?? null, children: /* @__PURE__ */ jsx43(
|
|
3763
3845
|
TooltipPrimitive.Content,
|
|
@@ -3766,7 +3848,8 @@ var TooltipContent = React34.forwardRef(({ className, sideOffset = 4, container,
|
|
|
3766
3848
|
"data-slot": "tooltip-content",
|
|
3767
3849
|
sideOffset,
|
|
3768
3850
|
className: cn(
|
|
3769
|
-
"z-[10001] overflow-hidden rounded-md border border-border bg-popover px-3 py-1.5 text-xs text-popover-foreground shadow-md
|
|
3851
|
+
"z-[10001] overflow-hidden rounded-md border border-border bg-popover px-3 py-1.5 text-xs text-popover-foreground shadow-md",
|
|
3852
|
+
animated && MOTION_POPPER,
|
|
3770
3853
|
className
|
|
3771
3854
|
),
|
|
3772
3855
|
...props
|
|
@@ -3775,6 +3858,7 @@ var TooltipContent = React34.forwardRef(({ className, sideOffset = 4, container,
|
|
|
3775
3858
|
});
|
|
3776
3859
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
3777
3860
|
export {
|
|
3861
|
+
ALL_MOTION_CLASSES,
|
|
3778
3862
|
Accordion,
|
|
3779
3863
|
AccordionContent,
|
|
3780
3864
|
AccordionItem,
|
|
@@ -3882,6 +3966,7 @@ export {
|
|
|
3882
3966
|
DropdownMenuTrigger,
|
|
3883
3967
|
EditableLabel,
|
|
3884
3968
|
EnterInput,
|
|
3969
|
+
FORBIDDEN_HOST_MOTION_UTILITIES,
|
|
3885
3970
|
HoverCard,
|
|
3886
3971
|
HoverCardContent,
|
|
3887
3972
|
HoverCardTrigger,
|
|
@@ -3889,6 +3974,13 @@ export {
|
|
|
3889
3974
|
InputWithPrefix,
|
|
3890
3975
|
Label3 as Label,
|
|
3891
3976
|
MOBILE_BREAKPOINT,
|
|
3977
|
+
MOTION_BOTTOM_SHEET,
|
|
3978
|
+
MOTION_DIALOG,
|
|
3979
|
+
MOTION_OVERLAY,
|
|
3980
|
+
MOTION_POPPER,
|
|
3981
|
+
MOTION_PULSE,
|
|
3982
|
+
MOTION_SHEET,
|
|
3983
|
+
MOTION_SPIN,
|
|
3892
3984
|
OverflowToolbar,
|
|
3893
3985
|
Popover,
|
|
3894
3986
|
PopoverAnchor,
|