@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.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,
|
|
@@ -61,6 +62,7 @@ __export(src_exports, {
|
|
|
61
62
|
BottomSheetFooter: () => BottomSheetFooter,
|
|
62
63
|
BottomSheetHeader: () => BottomSheetHeader,
|
|
63
64
|
Button: () => Button,
|
|
65
|
+
CENTERED_DIALOG: () => CENTERED_DIALOG,
|
|
64
66
|
Card: () => Card,
|
|
65
67
|
CardAction: () => CardAction,
|
|
66
68
|
CardContent: () => CardContent,
|
|
@@ -138,6 +140,7 @@ __export(src_exports, {
|
|
|
138
140
|
DropdownMenuTrigger: () => DropdownMenuTrigger,
|
|
139
141
|
EditableLabel: () => EditableLabel,
|
|
140
142
|
EnterInput: () => EnterInput,
|
|
143
|
+
FORBIDDEN_HOST_MOTION_UTILITIES: () => FORBIDDEN_HOST_MOTION_UTILITIES,
|
|
141
144
|
HoverCard: () => HoverCard,
|
|
142
145
|
HoverCardContent: () => HoverCardContent,
|
|
143
146
|
HoverCardTrigger: () => HoverCardTrigger,
|
|
@@ -145,7 +148,15 @@ __export(src_exports, {
|
|
|
145
148
|
InputWithPrefix: () => InputWithPrefix,
|
|
146
149
|
Label: () => Label3,
|
|
147
150
|
MOBILE_BREAKPOINT: () => MOBILE_BREAKPOINT,
|
|
151
|
+
MOTION_BOTTOM_SHEET: () => MOTION_BOTTOM_SHEET,
|
|
152
|
+
MOTION_DIALOG: () => MOTION_DIALOG,
|
|
153
|
+
MOTION_OVERLAY: () => MOTION_OVERLAY,
|
|
154
|
+
MOTION_POPPER: () => MOTION_POPPER,
|
|
155
|
+
MOTION_PULSE: () => MOTION_PULSE,
|
|
156
|
+
MOTION_SHEET: () => MOTION_SHEET,
|
|
157
|
+
MOTION_SPIN: () => MOTION_SPIN,
|
|
148
158
|
OverflowToolbar: () => OverflowToolbar,
|
|
159
|
+
POPPER_OFFSET: () => POPPER_OFFSET,
|
|
149
160
|
Popover: () => Popover,
|
|
150
161
|
PopoverAnchor: () => PopoverAnchor,
|
|
151
162
|
PopoverContent: () => PopoverContent,
|
|
@@ -938,6 +949,47 @@ var Button = React5.forwardRef(
|
|
|
938
949
|
);
|
|
939
950
|
Button.displayName = "Button";
|
|
940
951
|
|
|
952
|
+
// src/motion.ts
|
|
953
|
+
var MOTION_OVERLAY = "matrx-motion-overlay";
|
|
954
|
+
var MOTION_DIALOG = "matrx-motion-dialog";
|
|
955
|
+
var CENTERED_DIALOG = "matrx-dialog-centered";
|
|
956
|
+
var POPPER_OFFSET = "matrx-popper-offset";
|
|
957
|
+
var MOTION_BOTTOM_SHEET = "matrx-motion-bottom-sheet";
|
|
958
|
+
var MOTION_POPPER = "matrx-motion-popper";
|
|
959
|
+
var MOTION_SHEET = {
|
|
960
|
+
top: "matrx-motion-sheet-top",
|
|
961
|
+
bottom: "matrx-motion-sheet-bottom",
|
|
962
|
+
left: "matrx-motion-sheet-left",
|
|
963
|
+
right: "matrx-motion-sheet-right",
|
|
964
|
+
center: "matrx-motion-sheet-center"
|
|
965
|
+
};
|
|
966
|
+
var MOTION_PULSE = "matrx-pulse";
|
|
967
|
+
var MOTION_SPIN = "matrx-spin";
|
|
968
|
+
var ALL_MOTION_CLASSES = [
|
|
969
|
+
MOTION_OVERLAY,
|
|
970
|
+
MOTION_DIALOG,
|
|
971
|
+
MOTION_BOTTOM_SHEET,
|
|
972
|
+
MOTION_POPPER,
|
|
973
|
+
...Object.values(MOTION_SHEET),
|
|
974
|
+
MOTION_PULSE,
|
|
975
|
+
MOTION_SPIN
|
|
976
|
+
];
|
|
977
|
+
var FORBIDDEN_HOST_MOTION_UTILITIES = [
|
|
978
|
+
"animate-in",
|
|
979
|
+
"animate-out",
|
|
980
|
+
"fade-in",
|
|
981
|
+
"fade-out",
|
|
982
|
+
"zoom-in",
|
|
983
|
+
"zoom-out",
|
|
984
|
+
"slide-in-from",
|
|
985
|
+
"slide-out-to",
|
|
986
|
+
"animate-accordion",
|
|
987
|
+
"animate-slide-down",
|
|
988
|
+
"animate-slide-up",
|
|
989
|
+
"animate-pulse",
|
|
990
|
+
"animate-spin"
|
|
991
|
+
];
|
|
992
|
+
|
|
941
993
|
// src/portal-container.tsx
|
|
942
994
|
var React6 = __toESM(require("react"), 1);
|
|
943
995
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
@@ -976,7 +1028,8 @@ var AlertDialogOverlay = React7.forwardRef(({ className, ...props }, ref) => /*
|
|
|
976
1028
|
ref,
|
|
977
1029
|
"data-slot": "alert-dialog-overlay",
|
|
978
1030
|
className: cn(
|
|
979
|
-
"fixed inset-0 z-[10000] bg-[var(--matrx-overlay-scrim)]
|
|
1031
|
+
"fixed inset-0 z-[10000] bg-[var(--matrx-overlay-scrim)]",
|
|
1032
|
+
MOTION_OVERLAY,
|
|
980
1033
|
className
|
|
981
1034
|
),
|
|
982
1035
|
...props
|
|
@@ -995,7 +1048,7 @@ var AlertDialogDescription = React7.forwardRef(({ className, ...props }, ref) =>
|
|
|
995
1048
|
}
|
|
996
1049
|
));
|
|
997
1050
|
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
|
|
998
|
-
var AlertDialogContent = React7.forwardRef(({ className, children, container, ...props }, ref) => {
|
|
1051
|
+
var AlertDialogContent = React7.forwardRef(({ className, children, container, animated = true, ...props }, ref) => {
|
|
999
1052
|
const hasDescription = (0, import_react_tree2.treeContainsComponent)(children, AlertDialogDescription) || (0, import_react_tree2.treeContainsComponent)(children, AlertDialogPrimitive.Description);
|
|
1000
1053
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(AlertDialogPortal, { container, children: [
|
|
1001
1054
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(AlertDialogOverlay, {}),
|
|
@@ -1005,11 +1058,12 @@ var AlertDialogContent = React7.forwardRef(({ className, children, container, ..
|
|
|
1005
1058
|
ref,
|
|
1006
1059
|
"data-slot": "alert-dialog-content",
|
|
1007
1060
|
className: cn(
|
|
1008
|
-
|
|
1061
|
+
`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`,
|
|
1009
1062
|
// Ruling 3 — never taller than the viewport, always scrollable, and
|
|
1010
1063
|
// the footer stays reachable via --dialog-pad like Dialog's.
|
|
1011
1064
|
"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
|
-
"
|
|
1065
|
+
"sm:rounded-lg",
|
|
1066
|
+
animated && MOTION_DIALOG,
|
|
1013
1067
|
className
|
|
1014
1068
|
),
|
|
1015
1069
|
...props,
|
|
@@ -1345,8 +1399,8 @@ var Command = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
1345
1399
|
}
|
|
1346
1400
|
));
|
|
1347
1401
|
Command.displayName = import_cmdk.Command.displayName;
|
|
1348
|
-
var DIALOG_DESKTOP_CLASSES =
|
|
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
|
|
1402
|
+
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`;
|
|
1403
|
+
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
1404
|
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
1405
|
var CommandDialogContent = React13.forwardRef(({ className, children, container, ...props }, ref) => {
|
|
1352
1406
|
const isMobile = useIsMobile();
|
|
@@ -1356,7 +1410,10 @@ var CommandDialogContent = React13.forwardRef(({ className, children, container,
|
|
|
1356
1410
|
isModal ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1357
1411
|
DialogPrimitive.Overlay,
|
|
1358
1412
|
{
|
|
1359
|
-
className:
|
|
1413
|
+
className: cn(
|
|
1414
|
+
"fixed inset-0 z-[10000] bg-[var(--matrx-overlay-scrim-soft)]",
|
|
1415
|
+
MOTION_OVERLAY
|
|
1416
|
+
)
|
|
1360
1417
|
}
|
|
1361
1418
|
) : null,
|
|
1362
1419
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
@@ -1367,6 +1424,7 @@ var CommandDialogContent = React13.forwardRef(({ className, children, container,
|
|
|
1367
1424
|
"aria-describedby": void 0,
|
|
1368
1425
|
className: cn(
|
|
1369
1426
|
isMobile ? DIALOG_MOBILE_SHEET_CLASSES : DIALOG_DESKTOP_CLASSES,
|
|
1427
|
+
isMobile ? MOTION_BOTTOM_SHEET : MOTION_DIALOG,
|
|
1370
1428
|
className,
|
|
1371
1429
|
isMobile && DIALOG_MOBILE_SHEET_OVERRIDE,
|
|
1372
1430
|
!isModal && "z-[900]"
|
|
@@ -1496,7 +1554,6 @@ var ContextMenuPortal = ContextMenuPrimitive.Portal;
|
|
|
1496
1554
|
var ContextMenuSub = ContextMenuPrimitive.Sub;
|
|
1497
1555
|
var ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
|
|
1498
1556
|
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
1557
|
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
1558
|
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
1559
|
var ContextMenuSubTrigger = React14.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
@@ -1522,7 +1579,7 @@ var ContextMenuSubContent = React14.forwardRef(({ className, ...props }, ref) =>
|
|
|
1522
1579
|
{
|
|
1523
1580
|
ref,
|
|
1524
1581
|
"data-slot": "context-menu-sub-content",
|
|
1525
|
-
className: cn(SURFACE_CLASS, "shadow-lg",
|
|
1582
|
+
className: cn(SURFACE_CLASS, "shadow-lg", MOTION_POPPER, className),
|
|
1526
1583
|
...props
|
|
1527
1584
|
}
|
|
1528
1585
|
));
|
|
@@ -1534,7 +1591,7 @@ var ContextMenuContent = React14.forwardRef(({ className, container, ...props },
|
|
|
1534
1591
|
{
|
|
1535
1592
|
ref,
|
|
1536
1593
|
"data-slot": "context-menu-content",
|
|
1537
|
-
className: cn(SURFACE_CLASS, "shadow-md",
|
|
1594
|
+
className: cn(SURFACE_CLASS, "shadow-md", MOTION_POPPER, className),
|
|
1538
1595
|
...props
|
|
1539
1596
|
}
|
|
1540
1597
|
) });
|
|
@@ -1631,7 +1688,14 @@ var Popover = PopoverPrimitive.Root;
|
|
|
1631
1688
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
1632
1689
|
var PopoverAnchor = PopoverPrimitive.Anchor;
|
|
1633
1690
|
var PopoverContent = React15.forwardRef(
|
|
1634
|
-
({
|
|
1691
|
+
({
|
|
1692
|
+
className,
|
|
1693
|
+
align = "center",
|
|
1694
|
+
sideOffset = 4,
|
|
1695
|
+
container,
|
|
1696
|
+
animated = true,
|
|
1697
|
+
...props
|
|
1698
|
+
}, ref) => {
|
|
1635
1699
|
const portalContainer = usePortalContainer(container);
|
|
1636
1700
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(PopoverPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1637
1701
|
PopoverPrimitive.Content,
|
|
@@ -1646,7 +1710,8 @@ var PopoverContent = React15.forwardRef(
|
|
|
1646
1710
|
// z, DOM portal order decides, so a dialog opened FROM a popover stacks
|
|
1647
1711
|
// above it, and a popover opened from a dialog still stacks above the
|
|
1648
1712
|
// 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
|
|
1713
|
+
"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",
|
|
1714
|
+
animated && MOTION_POPPER,
|
|
1650
1715
|
className
|
|
1651
1716
|
),
|
|
1652
1717
|
...props
|
|
@@ -1818,7 +1883,7 @@ function CreatablePicker({
|
|
|
1818
1883
|
onClick: () => void create(typed),
|
|
1819
1884
|
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
1885
|
children: [
|
|
1821
|
-
busy ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Loader2Icon, { className: "size-3.5 shrink-0
|
|
1886
|
+
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
1887
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "min-w-0 truncate", children: typed && !exactMatch ? `Create \u201C${typed}\u201D` : `Add ${article(noun)}\u2026` })
|
|
1823
1888
|
]
|
|
1824
1889
|
}
|
|
@@ -1927,7 +1992,8 @@ var DialogOverlay = React16.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
1927
1992
|
className: cn(
|
|
1928
1993
|
// Page context behind the modal stays readable; separation comes from a
|
|
1929
1994
|
// light token scrim, not a blur.
|
|
1930
|
-
"fixed inset-0 z-[10000] bg-[var(--matrx-overlay-scrim-soft)]
|
|
1995
|
+
"fixed inset-0 z-[10000] bg-[var(--matrx-overlay-scrim-soft)]",
|
|
1996
|
+
MOTION_OVERLAY,
|
|
1931
1997
|
className
|
|
1932
1998
|
),
|
|
1933
1999
|
...props
|
|
@@ -1946,14 +2012,15 @@ var DialogContentPrimitive = React16.forwardRef((props, ref) => {
|
|
|
1946
2012
|
);
|
|
1947
2013
|
});
|
|
1948
2014
|
DialogContentPrimitive.displayName = "DialogContentPrimitive";
|
|
1949
|
-
var DIALOG_DESKTOP_CLASSES2 =
|
|
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
|
|
2015
|
+
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`;
|
|
2016
|
+
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
2017
|
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
2018
|
var DialogContent = React16.forwardRef(
|
|
1953
2019
|
({
|
|
1954
2020
|
className,
|
|
1955
2021
|
children,
|
|
1956
2022
|
mobileSheet = true,
|
|
2023
|
+
animated = true,
|
|
1957
2024
|
showCloseButton = true,
|
|
1958
2025
|
container,
|
|
1959
2026
|
...props
|
|
@@ -1985,6 +2052,7 @@ var DialogContent = React16.forwardRef(
|
|
|
1985
2052
|
"data-slot": "dialog-content",
|
|
1986
2053
|
className: cn(
|
|
1987
2054
|
asSheet ? DIALOG_MOBILE_SHEET_CLASSES2 : DIALOG_DESKTOP_CLASSES2,
|
|
2055
|
+
animated && (asSheet ? MOTION_BOTTOM_SHEET : MOTION_DIALOG),
|
|
1988
2056
|
className,
|
|
1989
2057
|
asSheet && DIALOG_MOBILE_SHEET_OVERRIDE2,
|
|
1990
2058
|
// A non-modal dialog is the coexistence contract for content that
|
|
@@ -2089,7 +2157,6 @@ var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
|
2089
2157
|
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
2090
2158
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
2091
2159
|
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
2160
|
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
2161
|
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
2162
|
var DropdownMenuSubTrigger = React17.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
@@ -2115,7 +2182,7 @@ var DropdownMenuSubContent = React17.forwardRef(({ className, ...props }, ref) =
|
|
|
2115
2182
|
{
|
|
2116
2183
|
ref,
|
|
2117
2184
|
"data-slot": "dropdown-menu-sub-content",
|
|
2118
|
-
className: cn(MENU_SURFACE_CLASS, "shadow-lg",
|
|
2185
|
+
className: cn(MENU_SURFACE_CLASS, "shadow-lg", MOTION_POPPER, className),
|
|
2119
2186
|
...props
|
|
2120
2187
|
}
|
|
2121
2188
|
));
|
|
@@ -2131,7 +2198,7 @@ var DropdownMenuContent = React17.forwardRef(({ className, sideOffset = 4, conta
|
|
|
2131
2198
|
className: cn(
|
|
2132
2199
|
MENU_SURFACE_CLASS,
|
|
2133
2200
|
"shadow-md",
|
|
2134
|
-
|
|
2201
|
+
MOTION_POPPER,
|
|
2135
2202
|
className
|
|
2136
2203
|
),
|
|
2137
2204
|
...props
|
|
@@ -2360,7 +2427,7 @@ function EditableLabel({
|
|
|
2360
2427
|
)
|
|
2361
2428
|
}
|
|
2362
2429
|
),
|
|
2363
|
-
busy && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Loader2Icon, { className: "absolute right-1 h-3.5 w-3.5
|
|
2430
|
+
busy && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Loader2Icon, { className: "absolute right-1 h-3.5 w-3.5 matrx-spin text-muted-foreground" }),
|
|
2364
2431
|
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
2432
|
] });
|
|
2366
2433
|
}
|
|
@@ -2545,7 +2612,7 @@ function ToolbarButton({
|
|
|
2545
2612
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2546
2613
|
Icon2,
|
|
2547
2614
|
{
|
|
2548
|
-
className: cn("w-3.5 h-3.5 shrink-0", action.running && "
|
|
2615
|
+
className: cn("w-3.5 h-3.5 shrink-0", action.running && "matrx-spin")
|
|
2549
2616
|
}
|
|
2550
2617
|
),
|
|
2551
2618
|
showLabel && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: text })
|
|
@@ -2989,36 +3056,51 @@ var SelectScrollDownButton = React23.forwardRef(({ className, ...props }, ref) =
|
|
|
2989
3056
|
}
|
|
2990
3057
|
));
|
|
2991
3058
|
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
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3059
|
+
var SelectContent = React23.forwardRef(
|
|
3060
|
+
({
|
|
3061
|
+
className,
|
|
3062
|
+
children,
|
|
3063
|
+
position = "popper",
|
|
3064
|
+
container,
|
|
3065
|
+
animated = true,
|
|
3066
|
+
...props
|
|
3067
|
+
}, ref) => {
|
|
3068
|
+
const portalContainer = usePortalContainer(container);
|
|
3069
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SelectPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
3070
|
+
SelectPrimitive.Content,
|
|
3071
|
+
{
|
|
3072
|
+
ref,
|
|
3073
|
+
className: cn(
|
|
3074
|
+
"relative z-[10001] max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md",
|
|
3075
|
+
animated && MOTION_POPPER,
|
|
3076
|
+
// The resting gap from the trigger. It is the `translate` property
|
|
3077
|
+
// (POPPER_OFFSET), never Tailwind translate utilities: those compose
|
|
3078
|
+
// with `transform` on a v4 host and are REPLACED by it on a v3 one,
|
|
3079
|
+
// so on v3 the animation ate the gap and the surface snapped 4px at
|
|
3080
|
+
// the end. Same law as the centred dialog card — see motion.ts.
|
|
3081
|
+
position === "popper" && POPPER_OFFSET,
|
|
3082
|
+
className
|
|
3016
3083
|
),
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3084
|
+
position,
|
|
3085
|
+
...props,
|
|
3086
|
+
children: [
|
|
3087
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SelectScrollUpButton, {}),
|
|
3088
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3089
|
+
SelectPrimitive.Viewport,
|
|
3090
|
+
{
|
|
3091
|
+
className: cn(
|
|
3092
|
+
"p-0.5 overflow-y-auto",
|
|
3093
|
+
position === "popper" && "w-full min-w-[var(--radix-select-trigger-width)] max-h-[var(--radix-select-content-available-height)]"
|
|
3094
|
+
),
|
|
3095
|
+
children
|
|
3096
|
+
}
|
|
3097
|
+
),
|
|
3098
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SelectScrollDownButton, {})
|
|
3099
|
+
]
|
|
3100
|
+
}
|
|
3101
|
+
) });
|
|
3102
|
+
}
|
|
3103
|
+
);
|
|
3022
3104
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
3023
3105
|
var SelectLabel = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3024
3106
|
SelectPrimitive.Label,
|
|
@@ -3107,7 +3189,8 @@ var SheetOverlay = React25.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
3107
3189
|
SheetPrimitive.Overlay,
|
|
3108
3190
|
{
|
|
3109
3191
|
className: cn(
|
|
3110
|
-
"fixed inset-0 z-50 bg-[var(--matrx-overlay-scrim)]
|
|
3192
|
+
"fixed inset-0 z-50 bg-[var(--matrx-overlay-scrim)]",
|
|
3193
|
+
MOTION_OVERLAY,
|
|
3111
3194
|
className
|
|
3112
3195
|
),
|
|
3113
3196
|
...props,
|
|
@@ -3116,15 +3199,22 @@ var SheetOverlay = React25.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
3116
3199
|
));
|
|
3117
3200
|
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
|
|
3118
3201
|
var sheetVariants = (0, import_class_variance_authority5.cva)(
|
|
3119
|
-
|
|
3202
|
+
// Motion is NOT stated here (0.10.0). The `data-[state=*]:animate-in/out`
|
|
3203
|
+
// + `slide-in-from-*` pairs this base and its side variants used to carry
|
|
3204
|
+
// came from the `tailwindcss-animate` HOST plugin, which three of four
|
|
3205
|
+
// consumers never loaded — every sheet in them slammed open with no
|
|
3206
|
+
// animation and no error. `SheetContent` now applies the package-owned
|
|
3207
|
+
// `MOTION_SHEET[side]` class alongside these variants; the keyframes,
|
|
3208
|
+
// durations and reduced-motion handling all live in `styles.css`.
|
|
3209
|
+
"fixed z-50 gap-4 bg-background p-6 shadow-lg",
|
|
3120
3210
|
{
|
|
3121
3211
|
variants: {
|
|
3122
3212
|
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
|
|
3213
|
+
top: "inset-x-0 top-0 border-b",
|
|
3214
|
+
bottom: "inset-x-0 bottom-0 border-t",
|
|
3215
|
+
left: "inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
|
|
3216
|
+
right: "inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
|
|
3217
|
+
center: "inset-0 m-auto max-h-full max-w-full border rounded-lg"
|
|
3128
3218
|
}
|
|
3129
3219
|
},
|
|
3130
3220
|
defaultVariants: {
|
|
@@ -3149,6 +3239,7 @@ var SheetContent = React25.forwardRef(
|
|
|
3149
3239
|
hideCloseButton = false,
|
|
3150
3240
|
hideOverlay = false,
|
|
3151
3241
|
overlayClassName,
|
|
3242
|
+
animated = true,
|
|
3152
3243
|
...props
|
|
3153
3244
|
}, ref) => {
|
|
3154
3245
|
const hasDescription = (0, import_react_tree4.treeContainsComponent)(children, SheetDescription) || (0, import_react_tree4.treeContainsComponent)(children, SheetPrimitive.Description);
|
|
@@ -3158,7 +3249,11 @@ var SheetContent = React25.forwardRef(
|
|
|
3158
3249
|
SheetContentBase,
|
|
3159
3250
|
{
|
|
3160
3251
|
ref,
|
|
3161
|
-
className: cn(
|
|
3252
|
+
className: cn(
|
|
3253
|
+
sheetVariants({ side }),
|
|
3254
|
+
animated && MOTION_SHEET[side ?? "right"],
|
|
3255
|
+
className
|
|
3256
|
+
),
|
|
3162
3257
|
...hasDescription ? {} : { "aria-describedby": void 0 },
|
|
3163
3258
|
...props,
|
|
3164
3259
|
children: [
|
|
@@ -3214,14 +3309,16 @@ SheetTitle.displayName = SheetPrimitive.Title.displayName;
|
|
|
3214
3309
|
|
|
3215
3310
|
// src/skeleton.tsx
|
|
3216
3311
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
3217
|
-
function Skeleton({
|
|
3218
|
-
className,
|
|
3219
|
-
...props
|
|
3220
|
-
}) {
|
|
3312
|
+
function Skeleton({ className, animated = true, ...props }) {
|
|
3221
3313
|
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
3222
3314
|
"div",
|
|
3223
3315
|
{
|
|
3224
|
-
|
|
3316
|
+
"data-slot": "skeleton",
|
|
3317
|
+
className: cn(
|
|
3318
|
+
"rounded-md bg-primary/10",
|
|
3319
|
+
animated && MOTION_PULSE,
|
|
3320
|
+
className
|
|
3321
|
+
),
|
|
3225
3322
|
...props
|
|
3226
3323
|
}
|
|
3227
3324
|
);
|
|
@@ -3705,23 +3802,26 @@ var React30 = __toESM(require("react"), 1);
|
|
|
3705
3802
|
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3706
3803
|
var HoverCard = HoverCardPrimitive.Root;
|
|
3707
3804
|
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
|
-
}
|
|
3805
|
+
var HoverCardContent = React30.forwardRef(
|
|
3806
|
+
({ className, align = "center", sideOffset = 4, container, animated = true, ...props }, ref) => {
|
|
3807
|
+
const resolved = usePortalContainer(container);
|
|
3808
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(HoverCardPrimitive.Portal, { container: resolved ?? null, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3809
|
+
HoverCardPrimitive.Content,
|
|
3810
|
+
{
|
|
3811
|
+
ref,
|
|
3812
|
+
"data-slot": "hover-card-content",
|
|
3813
|
+
align,
|
|
3814
|
+
sideOffset,
|
|
3815
|
+
className: cn(
|
|
3816
|
+
"z-[10001] w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",
|
|
3817
|
+
animated && MOTION_POPPER,
|
|
3818
|
+
className
|
|
3819
|
+
),
|
|
3820
|
+
...props
|
|
3821
|
+
}
|
|
3822
|
+
) });
|
|
3823
|
+
}
|
|
3824
|
+
);
|
|
3725
3825
|
HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
|
|
3726
3826
|
|
|
3727
3827
|
// src/radio-group.tsx
|
|
@@ -3984,7 +4084,7 @@ var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
|
3984
4084
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
3985
4085
|
var Tooltip = TooltipPrimitive.Root;
|
|
3986
4086
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
3987
|
-
var TooltipContent = React34.forwardRef(({ className, sideOffset = 4, container, ...props }, ref) => {
|
|
4087
|
+
var TooltipContent = React34.forwardRef(({ className, sideOffset = 4, container, animated = true, ...props }, ref) => {
|
|
3988
4088
|
const resolved = usePortalContainer(container);
|
|
3989
4089
|
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(TooltipPrimitive.Portal, { container: resolved ?? null, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3990
4090
|
TooltipPrimitive.Content,
|
|
@@ -3993,7 +4093,8 @@ var TooltipContent = React34.forwardRef(({ className, sideOffset = 4, container,
|
|
|
3993
4093
|
"data-slot": "tooltip-content",
|
|
3994
4094
|
sideOffset,
|
|
3995
4095
|
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
|
|
4096
|
+
"z-[10001] overflow-hidden rounded-md border border-border bg-popover px-3 py-1.5 text-xs text-popover-foreground shadow-md",
|
|
4097
|
+
animated && MOTION_POPPER,
|
|
3997
4098
|
className
|
|
3998
4099
|
),
|
|
3999
4100
|
...props
|