@ai-matrx/design-system 0.9.0 → 0.10.1
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 +244 -2
- package/README.md +15 -1
- package/dist/index.cjs +183 -82
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +161 -8
- package/dist/index.d.ts +161 -8
- package/dist/index.js +183 -82
- package/dist/index.js.map +1 -1
- package/dist/styles.css +483 -0
- package/dist/tokens.css +30 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -708,6 +708,47 @@ 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 CENTERED_DIALOG = "matrx-dialog-centered";
|
|
715
|
+
var POPPER_OFFSET = "matrx-popper-offset";
|
|
716
|
+
var MOTION_BOTTOM_SHEET = "matrx-motion-bottom-sheet";
|
|
717
|
+
var MOTION_POPPER = "matrx-motion-popper";
|
|
718
|
+
var MOTION_SHEET = {
|
|
719
|
+
top: "matrx-motion-sheet-top",
|
|
720
|
+
bottom: "matrx-motion-sheet-bottom",
|
|
721
|
+
left: "matrx-motion-sheet-left",
|
|
722
|
+
right: "matrx-motion-sheet-right",
|
|
723
|
+
center: "matrx-motion-sheet-center"
|
|
724
|
+
};
|
|
725
|
+
var MOTION_PULSE = "matrx-pulse";
|
|
726
|
+
var MOTION_SPIN = "matrx-spin";
|
|
727
|
+
var ALL_MOTION_CLASSES = [
|
|
728
|
+
MOTION_OVERLAY,
|
|
729
|
+
MOTION_DIALOG,
|
|
730
|
+
MOTION_BOTTOM_SHEET,
|
|
731
|
+
MOTION_POPPER,
|
|
732
|
+
...Object.values(MOTION_SHEET),
|
|
733
|
+
MOTION_PULSE,
|
|
734
|
+
MOTION_SPIN
|
|
735
|
+
];
|
|
736
|
+
var FORBIDDEN_HOST_MOTION_UTILITIES = [
|
|
737
|
+
"animate-in",
|
|
738
|
+
"animate-out",
|
|
739
|
+
"fade-in",
|
|
740
|
+
"fade-out",
|
|
741
|
+
"zoom-in",
|
|
742
|
+
"zoom-out",
|
|
743
|
+
"slide-in-from",
|
|
744
|
+
"slide-out-to",
|
|
745
|
+
"animate-accordion",
|
|
746
|
+
"animate-slide-down",
|
|
747
|
+
"animate-slide-up",
|
|
748
|
+
"animate-pulse",
|
|
749
|
+
"animate-spin"
|
|
750
|
+
];
|
|
751
|
+
|
|
711
752
|
// src/portal-container.tsx
|
|
712
753
|
import * as React6 from "react";
|
|
713
754
|
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
@@ -746,7 +787,8 @@ var AlertDialogOverlay = React7.forwardRef(({ className, ...props }, ref) => /*
|
|
|
746
787
|
ref,
|
|
747
788
|
"data-slot": "alert-dialog-overlay",
|
|
748
789
|
className: cn(
|
|
749
|
-
"fixed inset-0 z-[10000] bg-[var(--matrx-overlay-scrim)]
|
|
790
|
+
"fixed inset-0 z-[10000] bg-[var(--matrx-overlay-scrim)]",
|
|
791
|
+
MOTION_OVERLAY,
|
|
750
792
|
className
|
|
751
793
|
),
|
|
752
794
|
...props
|
|
@@ -765,7 +807,7 @@ var AlertDialogDescription = React7.forwardRef(({ className, ...props }, ref) =>
|
|
|
765
807
|
}
|
|
766
808
|
));
|
|
767
809
|
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
|
|
768
|
-
var AlertDialogContent = React7.forwardRef(({ className, children, container, ...props }, ref) => {
|
|
810
|
+
var AlertDialogContent = React7.forwardRef(({ className, children, container, animated = true, ...props }, ref) => {
|
|
769
811
|
const hasDescription = treeContainsComponent2(children, AlertDialogDescription) || treeContainsComponent2(children, AlertDialogPrimitive.Description);
|
|
770
812
|
return /* @__PURE__ */ jsxs5(AlertDialogPortal, { container, children: [
|
|
771
813
|
/* @__PURE__ */ jsx10(AlertDialogOverlay, {}),
|
|
@@ -775,11 +817,12 @@ var AlertDialogContent = React7.forwardRef(({ className, children, container, ..
|
|
|
775
817
|
ref,
|
|
776
818
|
"data-slot": "alert-dialog-content",
|
|
777
819
|
className: cn(
|
|
778
|
-
|
|
820
|
+
`fixed left-[50%] top-[50%] z-[10000] grid min-w-0 w-full max-w-lg ${CENTERED_DIALOG} gap-4 border bg-background p-6 shadow-lg`,
|
|
779
821
|
// Ruling 3 — never taller than the viewport, always scrollable, and
|
|
780
822
|
// the footer stays reachable via --dialog-pad like Dialog's.
|
|
781
823
|
"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
|
-
"
|
|
824
|
+
"sm:rounded-lg",
|
|
825
|
+
animated && MOTION_DIALOG,
|
|
783
826
|
className
|
|
784
827
|
),
|
|
785
828
|
...props,
|
|
@@ -1115,8 +1158,8 @@ var Command = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
1115
1158
|
}
|
|
1116
1159
|
));
|
|
1117
1160
|
Command.displayName = CommandPrimitive.displayName;
|
|
1118
|
-
var DIALOG_DESKTOP_CLASSES =
|
|
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
|
|
1161
|
+
var DIALOG_DESKTOP_CLASSES = `fixed left-[50%] top-[50%] z-[10000] grid min-w-0 w-full max-w-lg ${CENTERED_DIALOG} gap-4 overflow-x-clip border bg-background p-6 shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full sm:rounded-lg`;
|
|
1162
|
+
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
1163
|
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
1164
|
var CommandDialogContent = React13.forwardRef(({ className, children, container, ...props }, ref) => {
|
|
1122
1165
|
const isMobile = useIsMobile();
|
|
@@ -1126,7 +1169,10 @@ var CommandDialogContent = React13.forwardRef(({ className, children, container,
|
|
|
1126
1169
|
isModal ? /* @__PURE__ */ jsx15(
|
|
1127
1170
|
DialogPrimitive.Overlay,
|
|
1128
1171
|
{
|
|
1129
|
-
className:
|
|
1172
|
+
className: cn(
|
|
1173
|
+
"fixed inset-0 z-[10000] bg-[var(--matrx-overlay-scrim-soft)]",
|
|
1174
|
+
MOTION_OVERLAY
|
|
1175
|
+
)
|
|
1130
1176
|
}
|
|
1131
1177
|
) : null,
|
|
1132
1178
|
/* @__PURE__ */ jsxs6(
|
|
@@ -1137,6 +1183,7 @@ var CommandDialogContent = React13.forwardRef(({ className, children, container,
|
|
|
1137
1183
|
"aria-describedby": void 0,
|
|
1138
1184
|
className: cn(
|
|
1139
1185
|
isMobile ? DIALOG_MOBILE_SHEET_CLASSES : DIALOG_DESKTOP_CLASSES,
|
|
1186
|
+
isMobile ? MOTION_BOTTOM_SHEET : MOTION_DIALOG,
|
|
1140
1187
|
className,
|
|
1141
1188
|
isMobile && DIALOG_MOBILE_SHEET_OVERRIDE,
|
|
1142
1189
|
!isModal && "z-[900]"
|
|
@@ -1266,7 +1313,6 @@ var ContextMenuPortal = ContextMenuPrimitive.Portal;
|
|
|
1266
1313
|
var ContextMenuSub = ContextMenuPrimitive.Sub;
|
|
1267
1314
|
var ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
|
|
1268
1315
|
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
1316
|
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
1317
|
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
1318
|
var ContextMenuSubTrigger = React14.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs7(
|
|
@@ -1292,7 +1338,7 @@ var ContextMenuSubContent = React14.forwardRef(({ className, ...props }, ref) =>
|
|
|
1292
1338
|
{
|
|
1293
1339
|
ref,
|
|
1294
1340
|
"data-slot": "context-menu-sub-content",
|
|
1295
|
-
className: cn(SURFACE_CLASS, "shadow-lg",
|
|
1341
|
+
className: cn(SURFACE_CLASS, "shadow-lg", MOTION_POPPER, className),
|
|
1296
1342
|
...props
|
|
1297
1343
|
}
|
|
1298
1344
|
));
|
|
@@ -1304,7 +1350,7 @@ var ContextMenuContent = React14.forwardRef(({ className, container, ...props },
|
|
|
1304
1350
|
{
|
|
1305
1351
|
ref,
|
|
1306
1352
|
"data-slot": "context-menu-content",
|
|
1307
|
-
className: cn(SURFACE_CLASS, "shadow-md",
|
|
1353
|
+
className: cn(SURFACE_CLASS, "shadow-md", MOTION_POPPER, className),
|
|
1308
1354
|
...props
|
|
1309
1355
|
}
|
|
1310
1356
|
) });
|
|
@@ -1404,7 +1450,14 @@ var Popover = PopoverPrimitive.Root;
|
|
|
1404
1450
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
1405
1451
|
var PopoverAnchor = PopoverPrimitive.Anchor;
|
|
1406
1452
|
var PopoverContent = React15.forwardRef(
|
|
1407
|
-
({
|
|
1453
|
+
({
|
|
1454
|
+
className,
|
|
1455
|
+
align = "center",
|
|
1456
|
+
sideOffset = 4,
|
|
1457
|
+
container,
|
|
1458
|
+
animated = true,
|
|
1459
|
+
...props
|
|
1460
|
+
}, ref) => {
|
|
1408
1461
|
const portalContainer = usePortalContainer(container);
|
|
1409
1462
|
return /* @__PURE__ */ jsx17(PopoverPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ jsx17(
|
|
1410
1463
|
PopoverPrimitive.Content,
|
|
@@ -1419,7 +1472,8 @@ var PopoverContent = React15.forwardRef(
|
|
|
1419
1472
|
// z, DOM portal order decides, so a dialog opened FROM a popover stacks
|
|
1420
1473
|
// above it, and a popover opened from a dialog still stacks above the
|
|
1421
1474
|
// 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
|
|
1475
|
+
"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",
|
|
1476
|
+
animated && MOTION_POPPER,
|
|
1423
1477
|
className
|
|
1424
1478
|
),
|
|
1425
1479
|
...props
|
|
@@ -1591,7 +1645,7 @@ function CreatablePicker({
|
|
|
1591
1645
|
onClick: () => void create(typed),
|
|
1592
1646
|
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
1647
|
children: [
|
|
1594
|
-
busy ? /* @__PURE__ */ jsx18(Loader2Icon, { className: "size-3.5 shrink-0
|
|
1648
|
+
busy ? /* @__PURE__ */ jsx18(Loader2Icon, { className: "size-3.5 shrink-0 matrx-spin" }) : /* @__PURE__ */ jsx18(PlusIcon, { className: "size-3.5 shrink-0" }),
|
|
1595
1649
|
/* @__PURE__ */ jsx18("span", { className: "min-w-0 truncate", children: typed && !exactMatch ? `Create \u201C${typed}\u201D` : `Add ${article(noun)}\u2026` })
|
|
1596
1650
|
]
|
|
1597
1651
|
}
|
|
@@ -1700,7 +1754,8 @@ var DialogOverlay = React16.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
1700
1754
|
className: cn(
|
|
1701
1755
|
// Page context behind the modal stays readable; separation comes from a
|
|
1702
1756
|
// light token scrim, not a blur.
|
|
1703
|
-
"fixed inset-0 z-[10000] bg-[var(--matrx-overlay-scrim-soft)]
|
|
1757
|
+
"fixed inset-0 z-[10000] bg-[var(--matrx-overlay-scrim-soft)]",
|
|
1758
|
+
MOTION_OVERLAY,
|
|
1704
1759
|
className
|
|
1705
1760
|
),
|
|
1706
1761
|
...props
|
|
@@ -1719,14 +1774,15 @@ var DialogContentPrimitive = React16.forwardRef((props, ref) => {
|
|
|
1719
1774
|
);
|
|
1720
1775
|
});
|
|
1721
1776
|
DialogContentPrimitive.displayName = "DialogContentPrimitive";
|
|
1722
|
-
var DIALOG_DESKTOP_CLASSES2 =
|
|
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
|
|
1777
|
+
var DIALOG_DESKTOP_CLASSES2 = `fixed left-[50%] top-[50%] z-[10000] grid min-w-0 w-full max-w-lg ${CENTERED_DIALOG} 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`;
|
|
1778
|
+
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
1779
|
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
1780
|
var DialogContent = React16.forwardRef(
|
|
1726
1781
|
({
|
|
1727
1782
|
className,
|
|
1728
1783
|
children,
|
|
1729
1784
|
mobileSheet = true,
|
|
1785
|
+
animated = true,
|
|
1730
1786
|
showCloseButton = true,
|
|
1731
1787
|
container,
|
|
1732
1788
|
...props
|
|
@@ -1758,6 +1814,7 @@ var DialogContent = React16.forwardRef(
|
|
|
1758
1814
|
"data-slot": "dialog-content",
|
|
1759
1815
|
className: cn(
|
|
1760
1816
|
asSheet ? DIALOG_MOBILE_SHEET_CLASSES2 : DIALOG_DESKTOP_CLASSES2,
|
|
1817
|
+
animated && (asSheet ? MOTION_BOTTOM_SHEET : MOTION_DIALOG),
|
|
1761
1818
|
className,
|
|
1762
1819
|
asSheet && DIALOG_MOBILE_SHEET_OVERRIDE2,
|
|
1763
1820
|
// A non-modal dialog is the coexistence contract for content that
|
|
@@ -1862,7 +1919,6 @@ var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
|
1862
1919
|
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
1863
1920
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
1864
1921
|
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
1922
|
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
1923
|
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
1924
|
var DropdownMenuSubTrigger = React17.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs10(
|
|
@@ -1888,7 +1944,7 @@ var DropdownMenuSubContent = React17.forwardRef(({ className, ...props }, ref) =
|
|
|
1888
1944
|
{
|
|
1889
1945
|
ref,
|
|
1890
1946
|
"data-slot": "dropdown-menu-sub-content",
|
|
1891
|
-
className: cn(MENU_SURFACE_CLASS, "shadow-lg",
|
|
1947
|
+
className: cn(MENU_SURFACE_CLASS, "shadow-lg", MOTION_POPPER, className),
|
|
1892
1948
|
...props
|
|
1893
1949
|
}
|
|
1894
1950
|
));
|
|
@@ -1904,7 +1960,7 @@ var DropdownMenuContent = React17.forwardRef(({ className, sideOffset = 4, conta
|
|
|
1904
1960
|
className: cn(
|
|
1905
1961
|
MENU_SURFACE_CLASS,
|
|
1906
1962
|
"shadow-md",
|
|
1907
|
-
|
|
1963
|
+
MOTION_POPPER,
|
|
1908
1964
|
className
|
|
1909
1965
|
),
|
|
1910
1966
|
...props
|
|
@@ -2133,7 +2189,7 @@ function EditableLabel({
|
|
|
2133
2189
|
)
|
|
2134
2190
|
}
|
|
2135
2191
|
),
|
|
2136
|
-
busy && /* @__PURE__ */ jsx21(Loader2Icon, { className: "absolute right-1 h-3.5 w-3.5
|
|
2192
|
+
busy && /* @__PURE__ */ jsx21(Loader2Icon, { className: "absolute right-1 h-3.5 w-3.5 matrx-spin text-muted-foreground" }),
|
|
2137
2193
|
error && /* @__PURE__ */ jsx21("span", { className: "absolute left-0 top-full mt-0.5 whitespace-nowrap text-xs text-destructive", children: error })
|
|
2138
2194
|
] });
|
|
2139
2195
|
}
|
|
@@ -2318,7 +2374,7 @@ function ToolbarButton({
|
|
|
2318
2374
|
/* @__PURE__ */ jsx24(
|
|
2319
2375
|
Icon2,
|
|
2320
2376
|
{
|
|
2321
|
-
className: cn("w-3.5 h-3.5 shrink-0", action.running && "
|
|
2377
|
+
className: cn("w-3.5 h-3.5 shrink-0", action.running && "matrx-spin")
|
|
2322
2378
|
}
|
|
2323
2379
|
),
|
|
2324
2380
|
showLabel && /* @__PURE__ */ jsx24("span", { children: text })
|
|
@@ -2762,36 +2818,51 @@ var SelectScrollDownButton = React23.forwardRef(({ className, ...props }, ref) =
|
|
|
2762
2818
|
}
|
|
2763
2819
|
));
|
|
2764
2820
|
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
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2821
|
+
var SelectContent = React23.forwardRef(
|
|
2822
|
+
({
|
|
2823
|
+
className,
|
|
2824
|
+
children,
|
|
2825
|
+
position = "popper",
|
|
2826
|
+
container,
|
|
2827
|
+
animated = true,
|
|
2828
|
+
...props
|
|
2829
|
+
}, ref) => {
|
|
2830
|
+
const portalContainer = usePortalContainer(container);
|
|
2831
|
+
return /* @__PURE__ */ jsx29(SelectPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ jsxs16(
|
|
2832
|
+
SelectPrimitive.Content,
|
|
2833
|
+
{
|
|
2834
|
+
ref,
|
|
2835
|
+
className: cn(
|
|
2836
|
+
"relative z-[10001] max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md",
|
|
2837
|
+
animated && MOTION_POPPER,
|
|
2838
|
+
// The resting gap from the trigger. It is the `translate` property
|
|
2839
|
+
// (POPPER_OFFSET), never Tailwind translate utilities: those compose
|
|
2840
|
+
// with `transform` on a v4 host and are REPLACED by it on a v3 one,
|
|
2841
|
+
// so on v3 the animation ate the gap and the surface snapped 4px at
|
|
2842
|
+
// the end. Same law as the centred dialog card — see motion.ts.
|
|
2843
|
+
position === "popper" && POPPER_OFFSET,
|
|
2844
|
+
className
|
|
2789
2845
|
),
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2846
|
+
position,
|
|
2847
|
+
...props,
|
|
2848
|
+
children: [
|
|
2849
|
+
/* @__PURE__ */ jsx29(SelectScrollUpButton, {}),
|
|
2850
|
+
/* @__PURE__ */ jsx29(
|
|
2851
|
+
SelectPrimitive.Viewport,
|
|
2852
|
+
{
|
|
2853
|
+
className: cn(
|
|
2854
|
+
"p-0.5 overflow-y-auto",
|
|
2855
|
+
position === "popper" && "w-full min-w-[var(--radix-select-trigger-width)] max-h-[var(--radix-select-content-available-height)]"
|
|
2856
|
+
),
|
|
2857
|
+
children
|
|
2858
|
+
}
|
|
2859
|
+
),
|
|
2860
|
+
/* @__PURE__ */ jsx29(SelectScrollDownButton, {})
|
|
2861
|
+
]
|
|
2862
|
+
}
|
|
2863
|
+
) });
|
|
2864
|
+
}
|
|
2865
|
+
);
|
|
2795
2866
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
2796
2867
|
var SelectLabel = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
|
|
2797
2868
|
SelectPrimitive.Label,
|
|
@@ -2880,7 +2951,8 @@ var SheetOverlay = React25.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
2880
2951
|
SheetPrimitive.Overlay,
|
|
2881
2952
|
{
|
|
2882
2953
|
className: cn(
|
|
2883
|
-
"fixed inset-0 z-50 bg-[var(--matrx-overlay-scrim)]
|
|
2954
|
+
"fixed inset-0 z-50 bg-[var(--matrx-overlay-scrim)]",
|
|
2955
|
+
MOTION_OVERLAY,
|
|
2884
2956
|
className
|
|
2885
2957
|
),
|
|
2886
2958
|
...props,
|
|
@@ -2889,15 +2961,22 @@ var SheetOverlay = React25.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
2889
2961
|
));
|
|
2890
2962
|
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
|
|
2891
2963
|
var sheetVariants = cva5(
|
|
2892
|
-
|
|
2964
|
+
// Motion is NOT stated here (0.10.0). The `data-[state=*]:animate-in/out`
|
|
2965
|
+
// + `slide-in-from-*` pairs this base and its side variants used to carry
|
|
2966
|
+
// came from the `tailwindcss-animate` HOST plugin, which three of four
|
|
2967
|
+
// consumers never loaded — every sheet in them slammed open with no
|
|
2968
|
+
// animation and no error. `SheetContent` now applies the package-owned
|
|
2969
|
+
// `MOTION_SHEET[side]` class alongside these variants; the keyframes,
|
|
2970
|
+
// durations and reduced-motion handling all live in `styles.css`.
|
|
2971
|
+
"fixed z-50 gap-4 bg-background p-6 shadow-lg",
|
|
2893
2972
|
{
|
|
2894
2973
|
variants: {
|
|
2895
2974
|
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
|
|
2975
|
+
top: "inset-x-0 top-0 border-b",
|
|
2976
|
+
bottom: "inset-x-0 bottom-0 border-t",
|
|
2977
|
+
left: "inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
|
|
2978
|
+
right: "inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
|
|
2979
|
+
center: "inset-0 m-auto max-h-full max-w-full border rounded-lg"
|
|
2901
2980
|
}
|
|
2902
2981
|
},
|
|
2903
2982
|
defaultVariants: {
|
|
@@ -2922,6 +3001,7 @@ var SheetContent = React25.forwardRef(
|
|
|
2922
3001
|
hideCloseButton = false,
|
|
2923
3002
|
hideOverlay = false,
|
|
2924
3003
|
overlayClassName,
|
|
3004
|
+
animated = true,
|
|
2925
3005
|
...props
|
|
2926
3006
|
}, ref) => {
|
|
2927
3007
|
const hasDescription = treeContainsComponent4(children, SheetDescription) || treeContainsComponent4(children, SheetPrimitive.Description);
|
|
@@ -2931,7 +3011,11 @@ var SheetContent = React25.forwardRef(
|
|
|
2931
3011
|
SheetContentBase,
|
|
2932
3012
|
{
|
|
2933
3013
|
ref,
|
|
2934
|
-
className: cn(
|
|
3014
|
+
className: cn(
|
|
3015
|
+
sheetVariants({ side }),
|
|
3016
|
+
animated && MOTION_SHEET[side ?? "right"],
|
|
3017
|
+
className
|
|
3018
|
+
),
|
|
2935
3019
|
...hasDescription ? {} : { "aria-describedby": void 0 },
|
|
2936
3020
|
...props,
|
|
2937
3021
|
children: [
|
|
@@ -2987,14 +3071,16 @@ SheetTitle.displayName = SheetPrimitive.Title.displayName;
|
|
|
2987
3071
|
|
|
2988
3072
|
// src/skeleton.tsx
|
|
2989
3073
|
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
2990
|
-
function Skeleton({
|
|
2991
|
-
className,
|
|
2992
|
-
...props
|
|
2993
|
-
}) {
|
|
3074
|
+
function Skeleton({ className, animated = true, ...props }) {
|
|
2994
3075
|
return /* @__PURE__ */ jsx32(
|
|
2995
3076
|
"div",
|
|
2996
3077
|
{
|
|
2997
|
-
|
|
3078
|
+
"data-slot": "skeleton",
|
|
3079
|
+
className: cn(
|
|
3080
|
+
"rounded-md bg-primary/10",
|
|
3081
|
+
animated && MOTION_PULSE,
|
|
3082
|
+
className
|
|
3083
|
+
),
|
|
2998
3084
|
...props
|
|
2999
3085
|
}
|
|
3000
3086
|
);
|
|
@@ -3478,23 +3564,26 @@ import * as React30 from "react";
|
|
|
3478
3564
|
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
3479
3565
|
var HoverCard = HoverCardPrimitive.Root;
|
|
3480
3566
|
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
|
-
}
|
|
3567
|
+
var HoverCardContent = React30.forwardRef(
|
|
3568
|
+
({ className, align = "center", sideOffset = 4, container, animated = true, ...props }, ref) => {
|
|
3569
|
+
const resolved = usePortalContainer(container);
|
|
3570
|
+
return /* @__PURE__ */ jsx38(HoverCardPrimitive.Portal, { container: resolved ?? null, children: /* @__PURE__ */ jsx38(
|
|
3571
|
+
HoverCardPrimitive.Content,
|
|
3572
|
+
{
|
|
3573
|
+
ref,
|
|
3574
|
+
"data-slot": "hover-card-content",
|
|
3575
|
+
align,
|
|
3576
|
+
sideOffset,
|
|
3577
|
+
className: cn(
|
|
3578
|
+
"z-[10001] w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",
|
|
3579
|
+
animated && MOTION_POPPER,
|
|
3580
|
+
className
|
|
3581
|
+
),
|
|
3582
|
+
...props
|
|
3583
|
+
}
|
|
3584
|
+
) });
|
|
3585
|
+
}
|
|
3586
|
+
);
|
|
3498
3587
|
HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
|
|
3499
3588
|
|
|
3500
3589
|
// src/radio-group.tsx
|
|
@@ -3757,7 +3846,7 @@ import { jsx as jsx43 } from "react/jsx-runtime";
|
|
|
3757
3846
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
3758
3847
|
var Tooltip = TooltipPrimitive.Root;
|
|
3759
3848
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
3760
|
-
var TooltipContent = React34.forwardRef(({ className, sideOffset = 4, container, ...props }, ref) => {
|
|
3849
|
+
var TooltipContent = React34.forwardRef(({ className, sideOffset = 4, container, animated = true, ...props }, ref) => {
|
|
3761
3850
|
const resolved = usePortalContainer(container);
|
|
3762
3851
|
return /* @__PURE__ */ jsx43(TooltipPrimitive.Portal, { container: resolved ?? null, children: /* @__PURE__ */ jsx43(
|
|
3763
3852
|
TooltipPrimitive.Content,
|
|
@@ -3766,7 +3855,8 @@ var TooltipContent = React34.forwardRef(({ className, sideOffset = 4, container,
|
|
|
3766
3855
|
"data-slot": "tooltip-content",
|
|
3767
3856
|
sideOffset,
|
|
3768
3857
|
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
|
|
3858
|
+
"z-[10001] overflow-hidden rounded-md border border-border bg-popover px-3 py-1.5 text-xs text-popover-foreground shadow-md",
|
|
3859
|
+
animated && MOTION_POPPER,
|
|
3770
3860
|
className
|
|
3771
3861
|
),
|
|
3772
3862
|
...props
|
|
@@ -3775,6 +3865,7 @@ var TooltipContent = React34.forwardRef(({ className, sideOffset = 4, container,
|
|
|
3775
3865
|
});
|
|
3776
3866
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
3777
3867
|
export {
|
|
3868
|
+
ALL_MOTION_CLASSES,
|
|
3778
3869
|
Accordion,
|
|
3779
3870
|
AccordionContent,
|
|
3780
3871
|
AccordionItem,
|
|
@@ -3805,6 +3896,7 @@ export {
|
|
|
3805
3896
|
BottomSheetFooter,
|
|
3806
3897
|
BottomSheetHeader,
|
|
3807
3898
|
Button,
|
|
3899
|
+
CENTERED_DIALOG,
|
|
3808
3900
|
Card,
|
|
3809
3901
|
CardAction,
|
|
3810
3902
|
CardContent,
|
|
@@ -3882,6 +3974,7 @@ export {
|
|
|
3882
3974
|
DropdownMenuTrigger,
|
|
3883
3975
|
EditableLabel,
|
|
3884
3976
|
EnterInput,
|
|
3977
|
+
FORBIDDEN_HOST_MOTION_UTILITIES,
|
|
3885
3978
|
HoverCard,
|
|
3886
3979
|
HoverCardContent,
|
|
3887
3980
|
HoverCardTrigger,
|
|
@@ -3889,7 +3982,15 @@ export {
|
|
|
3889
3982
|
InputWithPrefix,
|
|
3890
3983
|
Label3 as Label,
|
|
3891
3984
|
MOBILE_BREAKPOINT,
|
|
3985
|
+
MOTION_BOTTOM_SHEET,
|
|
3986
|
+
MOTION_DIALOG,
|
|
3987
|
+
MOTION_OVERLAY,
|
|
3988
|
+
MOTION_POPPER,
|
|
3989
|
+
MOTION_PULSE,
|
|
3990
|
+
MOTION_SHEET,
|
|
3991
|
+
MOTION_SPIN,
|
|
3892
3992
|
OverflowToolbar,
|
|
3993
|
+
POPPER_OFFSET,
|
|
3893
3994
|
Popover,
|
|
3894
3995
|
PopoverAnchor,
|
|
3895
3996
|
PopoverContent,
|