basefn 1.6.0 → 1.7.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/package.json +1 -1
- package/src/components/Basefn__ContextMenu.css +2 -2
- package/src/components/Basefn__Dropdown.css +7 -1
- package/src/components/Basefn__Dropdown.res +5 -0
- package/src/components/Basefn__Dropdown.res.mjs +9 -2
- package/src/components/Basefn__HoverCard.css +1 -1
- package/src/components/Basefn__Popover.css +2 -2
- package/src/components/Basefn__Tooltip.css +1 -1
package/package.json
CHANGED
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
.basefn-context-menu__backdrop {
|
|
8
8
|
position: fixed;
|
|
9
9
|
inset: 0;
|
|
10
|
-
z-index:
|
|
10
|
+
z-index: 1009;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.basefn-context-menu__menu {
|
|
14
14
|
position: fixed;
|
|
15
|
-
z-index:
|
|
15
|
+
z-index: 1010;
|
|
16
16
|
min-width: 180px;
|
|
17
17
|
background: var(--basefn-surface-elevated);
|
|
18
18
|
border: var(--basefn-border-width) solid var(--basefn-border-primary);
|
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
display: inline-block;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
+
.basefn-dropdown__backdrop {
|
|
7
|
+
position: fixed;
|
|
8
|
+
inset: 0;
|
|
9
|
+
z-index: 1009;
|
|
10
|
+
}
|
|
11
|
+
|
|
6
12
|
.basefn-dropdown__menu {
|
|
7
13
|
position: absolute;
|
|
8
14
|
top: calc(100% + 4px);
|
|
@@ -12,7 +18,7 @@
|
|
|
12
18
|
border: 1px solid #e5e7eb;
|
|
13
19
|
border-radius: 0.5rem;
|
|
14
20
|
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
|
|
15
|
-
z-index:
|
|
21
|
+
z-index: 1010;
|
|
16
22
|
animation: basefn-dropdown-fade-in 0.15s ease-out;
|
|
17
23
|
overflow: hidden;
|
|
18
24
|
}
|
|
@@ -44,9 +44,14 @@ let make = (
|
|
|
44
44
|
baseClass ++ alignClass
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
let handleBackdropClick = _ => {
|
|
48
|
+
Signal.set(isOpen, false)
|
|
49
|
+
}
|
|
50
|
+
|
|
47
51
|
let menuContent = Computed.make(() => {
|
|
48
52
|
if Signal.get(isOpen) {
|
|
49
53
|
[
|
|
54
|
+
<div class="basefn-dropdown__backdrop" onClick={handleBackdropClick} />,
|
|
50
55
|
<div class={getMenuClass()}>
|
|
51
56
|
{items
|
|
52
57
|
->Array.mapWithIndex((item, index) => {
|
|
@@ -17,9 +17,15 @@ function Basefn__Dropdown(props) {
|
|
|
17
17
|
let alignClass = align === "right" ? " basefn-dropdown__menu--right" : "";
|
|
18
18
|
return "basefn-dropdown__menu" + alignClass;
|
|
19
19
|
};
|
|
20
|
+
let handleBackdropClick = param => Xote.Signal.set(isOpen, false);
|
|
20
21
|
let menuContent = Xote.Computed.make(() => {
|
|
21
22
|
if (Xote.Signal.get(isOpen)) {
|
|
22
|
-
return [
|
|
23
|
+
return [
|
|
24
|
+
Xote__JSX.Elements.jsx("div", {
|
|
25
|
+
class: "basefn-dropdown__backdrop",
|
|
26
|
+
onClick: handleBackdropClick
|
|
27
|
+
}),
|
|
28
|
+
Xote__JSX.Elements.jsx("div", {
|
|
23
29
|
class: getMenuClass(),
|
|
24
30
|
children: Xote.Component.fragment(items.map((item, index) => {
|
|
25
31
|
if (typeof item !== "object") {
|
|
@@ -50,7 +56,8 @@ function Basefn__Dropdown(props) {
|
|
|
50
56
|
children: Xote.Component.text(match.label)
|
|
51
57
|
}, index.toString(), undefined);
|
|
52
58
|
}))
|
|
53
|
-
})
|
|
59
|
+
})
|
|
60
|
+
];
|
|
54
61
|
} else {
|
|
55
62
|
return [];
|
|
56
63
|
}
|
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
.basefn-popover__backdrop {
|
|
13
13
|
position: fixed;
|
|
14
14
|
inset: 0;
|
|
15
|
-
z-index:
|
|
15
|
+
z-index: 1009;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
.basefn-popover__content {
|
|
19
19
|
position: absolute;
|
|
20
|
-
z-index:
|
|
20
|
+
z-index: 1010;
|
|
21
21
|
background: var(--basefn-surface-elevated);
|
|
22
22
|
border: var(--basefn-border-width) solid var(--basefn-border-primary);
|
|
23
23
|
border-radius: var(--basefn-radius-lg);
|