@agentero/design-system 0.22.0 → 0.22.2
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/package.json
CHANGED
|
@@ -32,7 +32,7 @@ export declare const HoverCard: {
|
|
|
32
32
|
displayName: string;
|
|
33
33
|
};
|
|
34
34
|
Arrow: {
|
|
35
|
-
({ className, ...props }: ArrowProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
({ className, width, height, ...props }: ArrowProps): import("react/jsx-runtime").JSX.Element;
|
|
36
36
|
displayName: string;
|
|
37
37
|
};
|
|
38
38
|
};
|
|
@@ -1,52 +1,67 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../lib/utils.js";
|
|
3
3
|
import { tv as t } from "tailwind-variants";
|
|
4
|
-
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
-
import * as
|
|
4
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
|
+
import * as i from "@radix-ui/react-hover-card";
|
|
6
6
|
//#region src/hover-card/hover-card.tsx
|
|
7
|
-
var
|
|
7
|
+
var a = (e) => /* @__PURE__ */ n(i.Root, {
|
|
8
8
|
"data-slot": "hover-card-root",
|
|
9
9
|
...e
|
|
10
10
|
});
|
|
11
|
-
|
|
12
|
-
var
|
|
11
|
+
a.displayName = "HoverCard.Root";
|
|
12
|
+
var o = (e) => /* @__PURE__ */ n(i.Trigger, {
|
|
13
13
|
"data-slot": "hover-card-trigger",
|
|
14
14
|
...e
|
|
15
15
|
});
|
|
16
|
-
|
|
17
|
-
var
|
|
18
|
-
"z-(--z-index-flyover) rounded-lg bg-bg-default-base-primary p-4 shadow-xl",
|
|
16
|
+
o.displayName = "HoverCard.Trigger";
|
|
17
|
+
var s = i.Portal, c = t({ base: [
|
|
18
|
+
"z-(--z-index-flyover) max-w-80 rounded-lg bg-bg-default-base-primary p-4 shadow-xl",
|
|
19
19
|
"border border-border-default-base-primary",
|
|
20
20
|
"text-sm text-text-default-base-primary",
|
|
21
21
|
"will-change-[transform,opacity]",
|
|
22
22
|
"data-[side=bottom]:origin-top data-[side=left]:origin-right",
|
|
23
23
|
"data-[side=right]:origin-left data-[side=top]:origin-bottom",
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"data-[state=
|
|
27
|
-
"data-[state=
|
|
28
|
-
"data-[state=closed]:animate-
|
|
29
|
-
"motion-reduce:animate-none!"
|
|
30
|
-
] }),
|
|
24
|
+
"transition-[opacity,transform] duration-200 ease-out",
|
|
25
|
+
"starting:opacity-0 starting:[transform:scale(0.9)]",
|
|
26
|
+
"data-[state=closed]:opacity-0 data-[state=closed]:[transform:scale(0.9)]",
|
|
27
|
+
"data-[state=closed]:duration-150 data-[state=closed]:ease-in",
|
|
28
|
+
"data-[state=closed]:animate-presence-hold",
|
|
29
|
+
"motion-reduce:transition-none motion-reduce:animate-none!"
|
|
30
|
+
] }), l = ({ className: e, sideOffset: t = 8, collisionPadding: r = 8, ...a }) => /* @__PURE__ */ n(i.Content, {
|
|
31
31
|
"data-slot": "hover-card-content",
|
|
32
32
|
sideOffset: t,
|
|
33
|
-
collisionPadding:
|
|
34
|
-
className:
|
|
33
|
+
collisionPadding: r,
|
|
34
|
+
className: c({ className: e }),
|
|
35
35
|
...a
|
|
36
36
|
});
|
|
37
|
-
|
|
38
|
-
var
|
|
37
|
+
l.displayName = "HoverCard.Content";
|
|
38
|
+
var u = ({ className: t, width: a = 12, height: o = 6, ...s }) => /* @__PURE__ */ n(i.Arrow, {
|
|
39
39
|
"data-slot": "hover-card-arrow",
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
width: a,
|
|
41
|
+
height: o,
|
|
42
|
+
asChild: !0,
|
|
43
|
+
...s,
|
|
44
|
+
children: /* @__PURE__ */ r("svg", {
|
|
45
|
+
viewBox: "0 0 12 6",
|
|
46
|
+
className: e("fill-bg-default-base-primary stroke-border-default-base-primary", t),
|
|
47
|
+
children: [/* @__PURE__ */ n("polygon", {
|
|
48
|
+
points: "0,0 6,6 12,0",
|
|
49
|
+
stroke: "none"
|
|
50
|
+
}), /* @__PURE__ */ n("path", {
|
|
51
|
+
d: "M0 0 L6 6 L12 0",
|
|
52
|
+
fill: "none",
|
|
53
|
+
strokeLinejoin: "round",
|
|
54
|
+
vectorEffect: "non-scaling-stroke"
|
|
55
|
+
})]
|
|
56
|
+
})
|
|
42
57
|
});
|
|
43
|
-
|
|
44
|
-
var
|
|
45
|
-
Root:
|
|
46
|
-
Trigger:
|
|
47
|
-
Portal:
|
|
48
|
-
Content:
|
|
49
|
-
Arrow:
|
|
58
|
+
u.displayName = "HoverCard.Arrow";
|
|
59
|
+
var d = {
|
|
60
|
+
Root: a,
|
|
61
|
+
Trigger: o,
|
|
62
|
+
Portal: s,
|
|
63
|
+
Content: l,
|
|
64
|
+
Arrow: u
|
|
50
65
|
};
|
|
51
66
|
//#endregion
|
|
52
|
-
export {
|
|
67
|
+
export { d as HoverCard, c as hoverCardRecipe };
|
package/theme/base.css
CHANGED
|
@@ -800,6 +800,10 @@
|
|
|
800
800
|
--animate-fade-in: fadeIn 0.3s forwards;
|
|
801
801
|
--animate-dropdown-slide-in: dropdownSlideIn 200ms ease-out;
|
|
802
802
|
--animate-dropdown-slide-out: dropdownSlideOut 150ms ease-in;
|
|
803
|
+
/* Radix Presence unmounts as soon as a node's CSS animation ends, so a node
|
|
804
|
+
* whose exit is driven by a transition needs a placeholder animation to hold
|
|
805
|
+
* it mounted. Keep the duration in sync with any exit transition using it. */
|
|
806
|
+
--animate-presence-hold: presenceHold 150ms linear;
|
|
803
807
|
--animate-dropdown-slide-in-from-top: dropdownSlideInFromTop 200ms ease-out;
|
|
804
808
|
--animate-dropdown-slide-in-from-bottom: dropdownSlideInFromBottom 200ms ease-out;
|
|
805
809
|
--animate-dropdown-slide-in-from-left: dropdownSlideInFromLeft 200ms ease-out;
|
|
@@ -960,6 +964,17 @@
|
|
|
960
964
|
}
|
|
961
965
|
}
|
|
962
966
|
|
|
967
|
+
/* Animates nothing on purpose — it exists only so Radix Presence has an
|
|
968
|
+
* animation to wait on. The custom property is inert and never read. */
|
|
969
|
+
@keyframes presenceHold {
|
|
970
|
+
0% {
|
|
971
|
+
--presence-hold: 0;
|
|
972
|
+
}
|
|
973
|
+
100% {
|
|
974
|
+
--presence-hold: 1;
|
|
975
|
+
}
|
|
976
|
+
}
|
|
977
|
+
|
|
963
978
|
@keyframes dropdownSlideInFromTop {
|
|
964
979
|
0% {
|
|
965
980
|
opacity: 0;
|