@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.cjs
CHANGED
|
@@ -31,6 +31,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
31
31
|
// src/index.ts
|
|
32
32
|
var src_exports = {};
|
|
33
33
|
__export(src_exports, {
|
|
34
|
+
ALL_MOTION_CLASSES: () => ALL_MOTION_CLASSES,
|
|
34
35
|
Accordion: () => Accordion,
|
|
35
36
|
AccordionContent: () => AccordionContent,
|
|
36
37
|
AccordionItem: () => AccordionItem,
|
|
@@ -138,6 +139,7 @@ __export(src_exports, {
|
|
|
138
139
|
DropdownMenuTrigger: () => DropdownMenuTrigger,
|
|
139
140
|
EditableLabel: () => EditableLabel,
|
|
140
141
|
EnterInput: () => EnterInput,
|
|
142
|
+
FORBIDDEN_HOST_MOTION_UTILITIES: () => FORBIDDEN_HOST_MOTION_UTILITIES,
|
|
141
143
|
HoverCard: () => HoverCard,
|
|
142
144
|
HoverCardContent: () => HoverCardContent,
|
|
143
145
|
HoverCardTrigger: () => HoverCardTrigger,
|
|
@@ -145,6 +147,13 @@ __export(src_exports, {
|
|
|
145
147
|
InputWithPrefix: () => InputWithPrefix,
|
|
146
148
|
Label: () => Label3,
|
|
147
149
|
MOBILE_BREAKPOINT: () => MOBILE_BREAKPOINT,
|
|
150
|
+
MOTION_BOTTOM_SHEET: () => MOTION_BOTTOM_SHEET,
|
|
151
|
+
MOTION_DIALOG: () => MOTION_DIALOG,
|
|
152
|
+
MOTION_OVERLAY: () => MOTION_OVERLAY,
|
|
153
|
+
MOTION_POPPER: () => MOTION_POPPER,
|
|
154
|
+
MOTION_PULSE: () => MOTION_PULSE,
|
|
155
|
+
MOTION_SHEET: () => MOTION_SHEET,
|
|
156
|
+
MOTION_SPIN: () => MOTION_SPIN,
|
|
148
157
|
OverflowToolbar: () => OverflowToolbar,
|
|
149
158
|
Popover: () => Popover,
|
|
150
159
|
PopoverAnchor: () => PopoverAnchor,
|
|
@@ -938,6 +947,45 @@ var Button = React5.forwardRef(
|
|
|
938
947
|
);
|
|
939
948
|
Button.displayName = "Button";
|
|
940
949
|
|
|
950
|
+
// src/motion.ts
|
|
951
|
+
var MOTION_OVERLAY = "matrx-motion-overlay";
|
|
952
|
+
var MOTION_DIALOG = "matrx-motion-dialog";
|
|
953
|
+
var MOTION_BOTTOM_SHEET = "matrx-motion-bottom-sheet";
|
|
954
|
+
var MOTION_POPPER = "matrx-motion-popper";
|
|
955
|
+
var MOTION_SHEET = {
|
|
956
|
+
top: "matrx-motion-sheet-top",
|
|
957
|
+
bottom: "matrx-motion-sheet-bottom",
|
|
958
|
+
left: "matrx-motion-sheet-left",
|
|
959
|
+
right: "matrx-motion-sheet-right",
|
|
960
|
+
center: "matrx-motion-sheet-center"
|
|
961
|
+
};
|
|
962
|
+
var MOTION_PULSE = "matrx-pulse";
|
|
963
|
+
var MOTION_SPIN = "matrx-spin";
|
|
964
|
+
var ALL_MOTION_CLASSES = [
|
|
965
|
+
MOTION_OVERLAY,
|
|
966
|
+
MOTION_DIALOG,
|
|
967
|
+
MOTION_BOTTOM_SHEET,
|
|
968
|
+
MOTION_POPPER,
|
|
969
|
+
...Object.values(MOTION_SHEET),
|
|
970
|
+
MOTION_PULSE,
|
|
971
|
+
MOTION_SPIN
|
|
972
|
+
];
|
|
973
|
+
var FORBIDDEN_HOST_MOTION_UTILITIES = [
|
|
974
|
+
"animate-in",
|
|
975
|
+
"animate-out",
|
|
976
|
+
"fade-in",
|
|
977
|
+
"fade-out",
|
|
978
|
+
"zoom-in",
|
|
979
|
+
"zoom-out",
|
|
980
|
+
"slide-in-from",
|
|
981
|
+
"slide-out-to",
|
|
982
|
+
"animate-accordion",
|
|
983
|
+
"animate-slide-down",
|
|
984
|
+
"animate-slide-up",
|
|
985
|
+
"animate-pulse",
|
|
986
|
+
"animate-spin"
|
|
987
|
+
];
|
|
988
|
+
|
|
941
989
|
// src/portal-container.tsx
|
|
942
990
|
var React6 = __toESM(require("react"), 1);
|
|
943
991
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
@@ -976,7 +1024,8 @@ var AlertDialogOverlay = React7.forwardRef(({ className, ...props }, ref) => /*
|
|
|
976
1024
|
ref,
|
|
977
1025
|
"data-slot": "alert-dialog-overlay",
|
|
978
1026
|
className: cn(
|
|
979
|
-
"fixed inset-0 z-[10000] bg-[var(--matrx-overlay-scrim)]
|
|
1027
|
+
"fixed inset-0 z-[10000] bg-[var(--matrx-overlay-scrim)]",
|
|
1028
|
+
MOTION_OVERLAY,
|
|
980
1029
|
className
|
|
981
1030
|
),
|
|
982
1031
|
...props
|
|
@@ -995,7 +1044,7 @@ var AlertDialogDescription = React7.forwardRef(({ className, ...props }, ref) =>
|
|
|
995
1044
|
}
|
|
996
1045
|
));
|
|
997
1046
|
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
|
|
998
|
-
var AlertDialogContent = React7.forwardRef(({ className, children, container, ...props }, ref) => {
|
|
1047
|
+
var AlertDialogContent = React7.forwardRef(({ className, children, container, animated = true, ...props }, ref) => {
|
|
999
1048
|
const hasDescription = (0, import_react_tree2.treeContainsComponent)(children, AlertDialogDescription) || (0, import_react_tree2.treeContainsComponent)(children, AlertDialogPrimitive.Description);
|
|
1000
1049
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(AlertDialogPortal, { container, children: [
|
|
1001
1050
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(AlertDialogOverlay, {}),
|
|
@@ -1005,11 +1054,12 @@ var AlertDialogContent = React7.forwardRef(({ className, children, container, ..
|
|
|
1005
1054
|
ref,
|
|
1006
1055
|
"data-slot": "alert-dialog-content",
|
|
1007
1056
|
className: cn(
|
|
1008
|
-
"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
|
|
1057
|
+
"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",
|
|
1009
1058
|
// Ruling 3 — never taller than the viewport, always scrollable, and
|
|
1010
1059
|
// the footer stays reachable via --dialog-pad like Dialog's.
|
|
1011
1060
|
"max-h-[85dvh] overflow-y-auto overscroll-contain [--dialog-pad:1.5rem] overflow-x-clip [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full",
|
|
1012
|
-
"
|
|
1061
|
+
"sm:rounded-lg",
|
|
1062
|
+
animated && MOTION_DIALOG,
|
|
1013
1063
|
className
|
|
1014
1064
|
),
|
|
1015
1065
|
...props,
|
|
@@ -1345,8 +1395,8 @@ var Command = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
1345
1395
|
}
|
|
1346
1396
|
));
|
|
1347
1397
|
Command.displayName = import_cmdk.Command.displayName;
|
|
1348
|
-
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
|
|
1349
|
-
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
|
|
1398
|
+
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";
|
|
1399
|
+
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";
|
|
1350
1400
|
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";
|
|
1351
1401
|
var CommandDialogContent = React13.forwardRef(({ className, children, container, ...props }, ref) => {
|
|
1352
1402
|
const isMobile = useIsMobile();
|
|
@@ -1356,7 +1406,10 @@ var CommandDialogContent = React13.forwardRef(({ className, children, container,
|
|
|
1356
1406
|
isModal ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1357
1407
|
DialogPrimitive.Overlay,
|
|
1358
1408
|
{
|
|
1359
|
-
className:
|
|
1409
|
+
className: cn(
|
|
1410
|
+
"fixed inset-0 z-[10000] bg-[var(--matrx-overlay-scrim-soft)]",
|
|
1411
|
+
MOTION_OVERLAY
|
|
1412
|
+
)
|
|
1360
1413
|
}
|
|
1361
1414
|
) : null,
|
|
1362
1415
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
@@ -1367,6 +1420,7 @@ var CommandDialogContent = React13.forwardRef(({ className, children, container,
|
|
|
1367
1420
|
"aria-describedby": void 0,
|
|
1368
1421
|
className: cn(
|
|
1369
1422
|
isMobile ? DIALOG_MOBILE_SHEET_CLASSES : DIALOG_DESKTOP_CLASSES,
|
|
1423
|
+
isMobile ? MOTION_BOTTOM_SHEET : MOTION_DIALOG,
|
|
1370
1424
|
className,
|
|
1371
1425
|
isMobile && DIALOG_MOBILE_SHEET_OVERRIDE,
|
|
1372
1426
|
!isModal && "z-[900]"
|
|
@@ -1496,7 +1550,6 @@ var ContextMenuPortal = ContextMenuPrimitive.Portal;
|
|
|
1496
1550
|
var ContextMenuSub = ContextMenuPrimitive.Sub;
|
|
1497
1551
|
var ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
|
|
1498
1552
|
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";
|
|
1499
|
-
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";
|
|
1500
1553
|
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";
|
|
1501
1554
|
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";
|
|
1502
1555
|
var ContextMenuSubTrigger = React14.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
@@ -1522,7 +1575,7 @@ var ContextMenuSubContent = React14.forwardRef(({ className, ...props }, ref) =>
|
|
|
1522
1575
|
{
|
|
1523
1576
|
ref,
|
|
1524
1577
|
"data-slot": "context-menu-sub-content",
|
|
1525
|
-
className: cn(SURFACE_CLASS, "shadow-lg",
|
|
1578
|
+
className: cn(SURFACE_CLASS, "shadow-lg", MOTION_POPPER, className),
|
|
1526
1579
|
...props
|
|
1527
1580
|
}
|
|
1528
1581
|
));
|
|
@@ -1534,7 +1587,7 @@ var ContextMenuContent = React14.forwardRef(({ className, container, ...props },
|
|
|
1534
1587
|
{
|
|
1535
1588
|
ref,
|
|
1536
1589
|
"data-slot": "context-menu-content",
|
|
1537
|
-
className: cn(SURFACE_CLASS, "shadow-md",
|
|
1590
|
+
className: cn(SURFACE_CLASS, "shadow-md", MOTION_POPPER, className),
|
|
1538
1591
|
...props
|
|
1539
1592
|
}
|
|
1540
1593
|
) });
|
|
@@ -1631,7 +1684,14 @@ var Popover = PopoverPrimitive.Root;
|
|
|
1631
1684
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
1632
1685
|
var PopoverAnchor = PopoverPrimitive.Anchor;
|
|
1633
1686
|
var PopoverContent = React15.forwardRef(
|
|
1634
|
-
({
|
|
1687
|
+
({
|
|
1688
|
+
className,
|
|
1689
|
+
align = "center",
|
|
1690
|
+
sideOffset = 4,
|
|
1691
|
+
container,
|
|
1692
|
+
animated = true,
|
|
1693
|
+
...props
|
|
1694
|
+
}, ref) => {
|
|
1635
1695
|
const portalContainer = usePortalContainer(container);
|
|
1636
1696
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(PopoverPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1637
1697
|
PopoverPrimitive.Content,
|
|
@@ -1646,7 +1706,8 @@ var PopoverContent = React15.forwardRef(
|
|
|
1646
1706
|
// z, DOM portal order decides, so a dialog opened FROM a popover stacks
|
|
1647
1707
|
// above it, and a popover opened from a dialog still stacks above the
|
|
1648
1708
|
// dialog. z-[10001] buried dialogs behind fullscreen popovers.
|
|
1649
|
-
"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
|
|
1709
|
+
"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",
|
|
1710
|
+
animated && MOTION_POPPER,
|
|
1650
1711
|
className
|
|
1651
1712
|
),
|
|
1652
1713
|
...props
|
|
@@ -1818,7 +1879,7 @@ function CreatablePicker({
|
|
|
1818
1879
|
onClick: () => void create(typed),
|
|
1819
1880
|
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",
|
|
1820
1881
|
children: [
|
|
1821
|
-
busy ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Loader2Icon, { className: "size-3.5 shrink-0
|
|
1882
|
+
busy ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Loader2Icon, { className: "size-3.5 shrink-0 matrx-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(PlusIcon, { className: "size-3.5 shrink-0" }),
|
|
1822
1883
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "min-w-0 truncate", children: typed && !exactMatch ? `Create \u201C${typed}\u201D` : `Add ${article(noun)}\u2026` })
|
|
1823
1884
|
]
|
|
1824
1885
|
}
|
|
@@ -1927,7 +1988,8 @@ var DialogOverlay = React16.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
1927
1988
|
className: cn(
|
|
1928
1989
|
// Page context behind the modal stays readable; separation comes from a
|
|
1929
1990
|
// light token scrim, not a blur.
|
|
1930
|
-
"fixed inset-0 z-[10000] bg-[var(--matrx-overlay-scrim-soft)]
|
|
1991
|
+
"fixed inset-0 z-[10000] bg-[var(--matrx-overlay-scrim-soft)]",
|
|
1992
|
+
MOTION_OVERLAY,
|
|
1931
1993
|
className
|
|
1932
1994
|
),
|
|
1933
1995
|
...props
|
|
@@ -1946,14 +2008,15 @@ var DialogContentPrimitive = React16.forwardRef((props, ref) => {
|
|
|
1946
2008
|
);
|
|
1947
2009
|
});
|
|
1948
2010
|
DialogContentPrimitive.displayName = "DialogContentPrimitive";
|
|
1949
|
-
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
|
|
1950
|
-
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
|
|
2011
|
+
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";
|
|
2012
|
+
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";
|
|
1951
2013
|
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";
|
|
1952
2014
|
var DialogContent = React16.forwardRef(
|
|
1953
2015
|
({
|
|
1954
2016
|
className,
|
|
1955
2017
|
children,
|
|
1956
2018
|
mobileSheet = true,
|
|
2019
|
+
animated = true,
|
|
1957
2020
|
showCloseButton = true,
|
|
1958
2021
|
container,
|
|
1959
2022
|
...props
|
|
@@ -1985,6 +2048,7 @@ var DialogContent = React16.forwardRef(
|
|
|
1985
2048
|
"data-slot": "dialog-content",
|
|
1986
2049
|
className: cn(
|
|
1987
2050
|
asSheet ? DIALOG_MOBILE_SHEET_CLASSES2 : DIALOG_DESKTOP_CLASSES2,
|
|
2051
|
+
animated && (asSheet ? MOTION_BOTTOM_SHEET : MOTION_DIALOG),
|
|
1988
2052
|
className,
|
|
1989
2053
|
asSheet && DIALOG_MOBILE_SHEET_OVERRIDE2,
|
|
1990
2054
|
// A non-modal dialog is the coexistence contract for content that
|
|
@@ -2089,7 +2153,6 @@ var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
|
2089
2153
|
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
2090
2154
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
2091
2155
|
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";
|
|
2092
|
-
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";
|
|
2093
2156
|
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";
|
|
2094
2157
|
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";
|
|
2095
2158
|
var DropdownMenuSubTrigger = React17.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
@@ -2115,7 +2178,7 @@ var DropdownMenuSubContent = React17.forwardRef(({ className, ...props }, ref) =
|
|
|
2115
2178
|
{
|
|
2116
2179
|
ref,
|
|
2117
2180
|
"data-slot": "dropdown-menu-sub-content",
|
|
2118
|
-
className: cn(MENU_SURFACE_CLASS, "shadow-lg",
|
|
2181
|
+
className: cn(MENU_SURFACE_CLASS, "shadow-lg", MOTION_POPPER, className),
|
|
2119
2182
|
...props
|
|
2120
2183
|
}
|
|
2121
2184
|
));
|
|
@@ -2131,7 +2194,7 @@ var DropdownMenuContent = React17.forwardRef(({ className, sideOffset = 4, conta
|
|
|
2131
2194
|
className: cn(
|
|
2132
2195
|
MENU_SURFACE_CLASS,
|
|
2133
2196
|
"shadow-md",
|
|
2134
|
-
|
|
2197
|
+
MOTION_POPPER,
|
|
2135
2198
|
className
|
|
2136
2199
|
),
|
|
2137
2200
|
...props
|
|
@@ -2360,7 +2423,7 @@ function EditableLabel({
|
|
|
2360
2423
|
)
|
|
2361
2424
|
}
|
|
2362
2425
|
),
|
|
2363
|
-
busy && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Loader2Icon, { className: "absolute right-1 h-3.5 w-3.5
|
|
2426
|
+
busy && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Loader2Icon, { className: "absolute right-1 h-3.5 w-3.5 matrx-spin text-muted-foreground" }),
|
|
2364
2427
|
error && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "absolute left-0 top-full mt-0.5 whitespace-nowrap text-xs text-destructive", children: error })
|
|
2365
2428
|
] });
|
|
2366
2429
|
}
|
|
@@ -2545,7 +2608,7 @@ function ToolbarButton({
|
|
|
2545
2608
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2546
2609
|
Icon2,
|
|
2547
2610
|
{
|
|
2548
|
-
className: cn("w-3.5 h-3.5 shrink-0", action.running && "
|
|
2611
|
+
className: cn("w-3.5 h-3.5 shrink-0", action.running && "matrx-spin")
|
|
2549
2612
|
}
|
|
2550
2613
|
),
|
|
2551
2614
|
showLabel && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: text })
|
|
@@ -2989,36 +3052,46 @@ var SelectScrollDownButton = React23.forwardRef(({ className, ...props }, ref) =
|
|
|
2989
3052
|
}
|
|
2990
3053
|
));
|
|
2991
3054
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
2992
|
-
var SelectContent = React23.forwardRef(
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
"p-0.5 overflow-y-auto",
|
|
3012
|
-
position === "popper" && "w-full min-w-[var(--radix-select-trigger-width)] max-h-[var(--radix-select-content-available-height)]"
|
|
3013
|
-
),
|
|
3014
|
-
children
|
|
3015
|
-
}
|
|
3055
|
+
var SelectContent = React23.forwardRef(
|
|
3056
|
+
({
|
|
3057
|
+
className,
|
|
3058
|
+
children,
|
|
3059
|
+
position = "popper",
|
|
3060
|
+
container,
|
|
3061
|
+
animated = true,
|
|
3062
|
+
...props
|
|
3063
|
+
}, ref) => {
|
|
3064
|
+
const portalContainer = usePortalContainer(container);
|
|
3065
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SelectPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
3066
|
+
SelectPrimitive.Content,
|
|
3067
|
+
{
|
|
3068
|
+
ref,
|
|
3069
|
+
className: cn(
|
|
3070
|
+
"relative z-[10001] max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md",
|
|
3071
|
+
animated && MOTION_POPPER,
|
|
3072
|
+
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",
|
|
3073
|
+
className
|
|
3016
3074
|
),
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3075
|
+
position,
|
|
3076
|
+
...props,
|
|
3077
|
+
children: [
|
|
3078
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SelectScrollUpButton, {}),
|
|
3079
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3080
|
+
SelectPrimitive.Viewport,
|
|
3081
|
+
{
|
|
3082
|
+
className: cn(
|
|
3083
|
+
"p-0.5 overflow-y-auto",
|
|
3084
|
+
position === "popper" && "w-full min-w-[var(--radix-select-trigger-width)] max-h-[var(--radix-select-content-available-height)]"
|
|
3085
|
+
),
|
|
3086
|
+
children
|
|
3087
|
+
}
|
|
3088
|
+
),
|
|
3089
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SelectScrollDownButton, {})
|
|
3090
|
+
]
|
|
3091
|
+
}
|
|
3092
|
+
) });
|
|
3093
|
+
}
|
|
3094
|
+
);
|
|
3022
3095
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
3023
3096
|
var SelectLabel = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3024
3097
|
SelectPrimitive.Label,
|
|
@@ -3107,7 +3180,8 @@ var SheetOverlay = React25.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
3107
3180
|
SheetPrimitive.Overlay,
|
|
3108
3181
|
{
|
|
3109
3182
|
className: cn(
|
|
3110
|
-
"fixed inset-0 z-50 bg-[var(--matrx-overlay-scrim)]
|
|
3183
|
+
"fixed inset-0 z-50 bg-[var(--matrx-overlay-scrim)]",
|
|
3184
|
+
MOTION_OVERLAY,
|
|
3111
3185
|
className
|
|
3112
3186
|
),
|
|
3113
3187
|
...props,
|
|
@@ -3116,15 +3190,22 @@ var SheetOverlay = React25.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
3116
3190
|
));
|
|
3117
3191
|
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
|
|
3118
3192
|
var sheetVariants = (0, import_class_variance_authority5.cva)(
|
|
3119
|
-
|
|
3193
|
+
// Motion is NOT stated here (0.10.0). The `data-[state=*]:animate-in/out`
|
|
3194
|
+
// + `slide-in-from-*` pairs this base and its side variants used to carry
|
|
3195
|
+
// came from the `tailwindcss-animate` HOST plugin, which three of four
|
|
3196
|
+
// consumers never loaded — every sheet in them slammed open with no
|
|
3197
|
+
// animation and no error. `SheetContent` now applies the package-owned
|
|
3198
|
+
// `MOTION_SHEET[side]` class alongside these variants; the keyframes,
|
|
3199
|
+
// durations and reduced-motion handling all live in `styles.css`.
|
|
3200
|
+
"fixed z-50 gap-4 bg-background p-6 shadow-lg",
|
|
3120
3201
|
{
|
|
3121
3202
|
variants: {
|
|
3122
3203
|
side: {
|
|
3123
|
-
top: "inset-x-0 top-0 border-b
|
|
3124
|
-
bottom: "inset-x-0 bottom-0 border-t
|
|
3125
|
-
left: "inset-y-0 left-0 h-full w-3/4 border-r
|
|
3126
|
-
right: "inset-y-0 right-0 h-full w-3/4 border-l
|
|
3127
|
-
center: "inset-0 m-auto max-h-full max-w-full border rounded-lg
|
|
3204
|
+
top: "inset-x-0 top-0 border-b",
|
|
3205
|
+
bottom: "inset-x-0 bottom-0 border-t",
|
|
3206
|
+
left: "inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
|
|
3207
|
+
right: "inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
|
|
3208
|
+
center: "inset-0 m-auto max-h-full max-w-full border rounded-lg"
|
|
3128
3209
|
}
|
|
3129
3210
|
},
|
|
3130
3211
|
defaultVariants: {
|
|
@@ -3149,6 +3230,7 @@ var SheetContent = React25.forwardRef(
|
|
|
3149
3230
|
hideCloseButton = false,
|
|
3150
3231
|
hideOverlay = false,
|
|
3151
3232
|
overlayClassName,
|
|
3233
|
+
animated = true,
|
|
3152
3234
|
...props
|
|
3153
3235
|
}, ref) => {
|
|
3154
3236
|
const hasDescription = (0, import_react_tree4.treeContainsComponent)(children, SheetDescription) || (0, import_react_tree4.treeContainsComponent)(children, SheetPrimitive.Description);
|
|
@@ -3158,7 +3240,11 @@ var SheetContent = React25.forwardRef(
|
|
|
3158
3240
|
SheetContentBase,
|
|
3159
3241
|
{
|
|
3160
3242
|
ref,
|
|
3161
|
-
className: cn(
|
|
3243
|
+
className: cn(
|
|
3244
|
+
sheetVariants({ side }),
|
|
3245
|
+
animated && MOTION_SHEET[side ?? "right"],
|
|
3246
|
+
className
|
|
3247
|
+
),
|
|
3162
3248
|
...hasDescription ? {} : { "aria-describedby": void 0 },
|
|
3163
3249
|
...props,
|
|
3164
3250
|
children: [
|
|
@@ -3214,14 +3300,16 @@ SheetTitle.displayName = SheetPrimitive.Title.displayName;
|
|
|
3214
3300
|
|
|
3215
3301
|
// src/skeleton.tsx
|
|
3216
3302
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
3217
|
-
function Skeleton({
|
|
3218
|
-
className,
|
|
3219
|
-
...props
|
|
3220
|
-
}) {
|
|
3303
|
+
function Skeleton({ className, animated = true, ...props }) {
|
|
3221
3304
|
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
3222
3305
|
"div",
|
|
3223
3306
|
{
|
|
3224
|
-
|
|
3307
|
+
"data-slot": "skeleton",
|
|
3308
|
+
className: cn(
|
|
3309
|
+
"rounded-md bg-primary/10",
|
|
3310
|
+
animated && MOTION_PULSE,
|
|
3311
|
+
className
|
|
3312
|
+
),
|
|
3225
3313
|
...props
|
|
3226
3314
|
}
|
|
3227
3315
|
);
|
|
@@ -3705,23 +3793,26 @@ var React30 = __toESM(require("react"), 1);
|
|
|
3705
3793
|
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3706
3794
|
var HoverCard = HoverCardPrimitive.Root;
|
|
3707
3795
|
var HoverCardTrigger = HoverCardPrimitive.Trigger;
|
|
3708
|
-
var HoverCardContent = React30.forwardRef(
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
HoverCardPrimitive.
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
}
|
|
3796
|
+
var HoverCardContent = React30.forwardRef(
|
|
3797
|
+
({ className, align = "center", sideOffset = 4, container, animated = true, ...props }, ref) => {
|
|
3798
|
+
const resolved = usePortalContainer(container);
|
|
3799
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(HoverCardPrimitive.Portal, { container: resolved ?? null, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3800
|
+
HoverCardPrimitive.Content,
|
|
3801
|
+
{
|
|
3802
|
+
ref,
|
|
3803
|
+
"data-slot": "hover-card-content",
|
|
3804
|
+
align,
|
|
3805
|
+
sideOffset,
|
|
3806
|
+
className: cn(
|
|
3807
|
+
"z-[10001] w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",
|
|
3808
|
+
animated && MOTION_POPPER,
|
|
3809
|
+
className
|
|
3810
|
+
),
|
|
3811
|
+
...props
|
|
3812
|
+
}
|
|
3813
|
+
) });
|
|
3814
|
+
}
|
|
3815
|
+
);
|
|
3725
3816
|
HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
|
|
3726
3817
|
|
|
3727
3818
|
// src/radio-group.tsx
|
|
@@ -3984,7 +4075,7 @@ var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
|
3984
4075
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
3985
4076
|
var Tooltip = TooltipPrimitive.Root;
|
|
3986
4077
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
3987
|
-
var TooltipContent = React34.forwardRef(({ className, sideOffset = 4, container, ...props }, ref) => {
|
|
4078
|
+
var TooltipContent = React34.forwardRef(({ className, sideOffset = 4, container, animated = true, ...props }, ref) => {
|
|
3988
4079
|
const resolved = usePortalContainer(container);
|
|
3989
4080
|
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(TooltipPrimitive.Portal, { container: resolved ?? null, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3990
4081
|
TooltipPrimitive.Content,
|
|
@@ -3993,7 +4084,8 @@ var TooltipContent = React34.forwardRef(({ className, sideOffset = 4, container,
|
|
|
3993
4084
|
"data-slot": "tooltip-content",
|
|
3994
4085
|
sideOffset,
|
|
3995
4086
|
className: cn(
|
|
3996
|
-
"z-[10001] overflow-hidden rounded-md border border-border bg-popover px-3 py-1.5 text-xs text-popover-foreground shadow-md
|
|
4087
|
+
"z-[10001] overflow-hidden rounded-md border border-border bg-popover px-3 py-1.5 text-xs text-popover-foreground shadow-md",
|
|
4088
|
+
animated && MOTION_POPPER,
|
|
3997
4089
|
className
|
|
3998
4090
|
),
|
|
3999
4091
|
...props
|