@companix/uikit 0.1.40 → 0.1.42
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/dist/Popover/index.d.ts +2 -0
- package/dist/bundle.es11.js +41 -38
- package/package.json +1 -1
package/dist/Popover/index.d.ts
CHANGED
|
@@ -18,10 +18,12 @@ export interface PopoverProps {
|
|
|
18
18
|
showArrows?: boolean;
|
|
19
19
|
minimal?: boolean;
|
|
20
20
|
sideOffset?: number;
|
|
21
|
+
alignOffset?: number;
|
|
21
22
|
matchTarget?: 'width' | 'min-width';
|
|
22
23
|
className?: string;
|
|
23
24
|
fitMaxHeight?: boolean;
|
|
24
25
|
disabled?: boolean;
|
|
25
26
|
zIndex?: number;
|
|
27
|
+
style?: React.CSSProperties;
|
|
26
28
|
}
|
|
27
29
|
export declare const Popover: import('react').ForwardRefExoticComponent<PopoverProps & import('react').RefAttributes<HTMLDivElement>>;
|
package/dist/bundle.es11.js
CHANGED
|
@@ -1,58 +1,61 @@
|
|
|
1
1
|
import { jsxs as a, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import * as o from "@radix-ui/react-popover";
|
|
3
|
-
import { attr as
|
|
4
|
-
import
|
|
5
|
-
import { forwardRef as
|
|
6
|
-
const
|
|
3
|
+
import { attr as j } from "@companix/utils-browser";
|
|
4
|
+
import k from "classnames";
|
|
5
|
+
import { forwardRef as F, useRef as T } from "react";
|
|
6
|
+
const H = F((i, n) => {
|
|
7
7
|
const {
|
|
8
8
|
children: s,
|
|
9
9
|
sideOffset: l,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
alignOffset: c,
|
|
11
|
+
matchTarget: m,
|
|
12
|
+
onAnimationEnd: d,
|
|
13
|
+
onAnimationStart: f,
|
|
13
14
|
onOpenAutoFocus: p,
|
|
14
|
-
onCloseAutoFocus:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
15
|
+
onCloseAutoFocus: h,
|
|
16
|
+
style: g,
|
|
17
|
+
triggerRef: u,
|
|
18
|
+
triggerProps: v,
|
|
19
|
+
open: C,
|
|
20
|
+
content: x,
|
|
21
|
+
onOpenChange: w,
|
|
22
|
+
align: L,
|
|
23
|
+
disabled: O,
|
|
24
|
+
minimal: N,
|
|
25
|
+
className: P,
|
|
26
|
+
fitMaxHeight: y = !0,
|
|
27
|
+
zIndex: A = 9999,
|
|
28
|
+
side: b,
|
|
29
|
+
showArrows: R
|
|
30
|
+
} = i, e = T(null), B = () => {
|
|
29
31
|
e.current && e.current.click();
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
+
}, M = (t) => {
|
|
33
|
+
O && t.preventDefault();
|
|
32
34
|
};
|
|
33
|
-
return /* @__PURE__ */ a(o.Root, { open:
|
|
34
|
-
/* @__PURE__ */ r(o.Trigger, { ref:
|
|
35
|
+
return /* @__PURE__ */ a(o.Root, { open: C, onOpenChange: w, children: [
|
|
36
|
+
/* @__PURE__ */ r(o.Trigger, { ref: u, ...v, onClick: M, asChild: !0, children: s }),
|
|
35
37
|
/* @__PURE__ */ r(o.Portal, { children: /* @__PURE__ */ a(
|
|
36
38
|
o.Content,
|
|
37
39
|
{
|
|
38
40
|
ref: n,
|
|
39
|
-
className:
|
|
40
|
-
side:
|
|
41
|
-
align:
|
|
42
|
-
"data-appearance":
|
|
43
|
-
"data-match-target":
|
|
41
|
+
className: k("popover", P),
|
|
42
|
+
side: b,
|
|
43
|
+
align: L,
|
|
44
|
+
"data-appearance": N ? "minimal" : "default",
|
|
45
|
+
"data-match-target": m,
|
|
44
46
|
sideOffset: l ?? 6,
|
|
47
|
+
alignOffset: c,
|
|
45
48
|
avoidCollisions: !0,
|
|
46
49
|
arrowPadding: 10,
|
|
47
|
-
style: { zIndex:
|
|
48
|
-
onAnimationStart:
|
|
49
|
-
onAnimationEnd:
|
|
50
|
+
style: { zIndex: A, ...g },
|
|
51
|
+
onAnimationStart: f,
|
|
52
|
+
onAnimationEnd: d,
|
|
50
53
|
onOpenAutoFocus: p,
|
|
51
|
-
onCloseAutoFocus:
|
|
54
|
+
onCloseAutoFocus: h,
|
|
52
55
|
onWheel: (t) => t.stopPropagation(),
|
|
53
56
|
children: [
|
|
54
57
|
/* @__PURE__ */ r(o.Close, { ref: e, style: { display: "none" } }),
|
|
55
|
-
|
|
58
|
+
R && /* @__PURE__ */ r(o.Arrow, { width: 30, height: 11, asChild: !0, children: /* @__PURE__ */ r("div", { className: "popover-arrow", children: /* @__PURE__ */ a("svg", { className: "popover-arrow-icon", viewBox: "0 0 30 11", width: 30, height: 11, children: [
|
|
56
59
|
/* @__PURE__ */ r(
|
|
57
60
|
"path",
|
|
58
61
|
{
|
|
@@ -72,12 +75,12 @@ const D = j((i, n) => {
|
|
|
72
75
|
}
|
|
73
76
|
)
|
|
74
77
|
] }) }) }),
|
|
75
|
-
/* @__PURE__ */ r("div", { className: "popover-content", "data-fit-max-height":
|
|
78
|
+
/* @__PURE__ */ r("div", { className: "popover-content", "data-fit-max-height": j(y), children: x({ close: B }) })
|
|
76
79
|
]
|
|
77
80
|
}
|
|
78
81
|
) })
|
|
79
82
|
] });
|
|
80
83
|
});
|
|
81
84
|
export {
|
|
82
|
-
|
|
85
|
+
H as Popover
|
|
83
86
|
};
|