@memobit/libs 3.17.0 → 3.18.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/dist/components/NotificationPanel/NotificationPanel.css +1 -1
- package/dist/components/NotificationPanel/NotificationPanel2.js +1 -1
- package/dist/components/Toolbar/Toolbar.css +1 -1
- package/dist/components/Toolbar/Toolbar2.js +69 -65
- package/dist/components/Tooltip/Tooltip2.js +67 -57
- package/dist/helpers/VersionInfo.js +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/version.js +2 -2
- package/dist/version.json +4 -4
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
.NotificationPanel{position:relative}.NotificationPanel__button{align-items:center;gap:var(--spacing-8);border:1px solid var(--border-color);border-radius:var(--radius);background:var(--card-background-color);color:var(--body-title-color);padding:var(--spacing-8) var(--spacing-12);cursor:pointer;font-size:var(--font-size-sm);font-weight:var(--font-weight-medium);display:inline-flex}.NotificationPanel__button--critical{border-color:color-mix(in srgb, var(--button-danger-border-color) 55%, var(--border-color));background:color-mix(in srgb, var(--button-danger-border-color) 12%, transparent)}.NotificationPanel__badge{min-width:var(--spacing-20);height:var(--spacing-20);border-radius:var(--radius-full);font-size:var(--font-size-xs);background:var(--button-danger-background-color);color:var(--button-danger-color);padding:0 var(--spacing-4);justify-content:center;align-items:center;display:inline-flex}.NotificationPanel__backdrop{z-index:9998;position:fixed;inset:0}.NotificationPanel__panel{z-index:9999;background:var(--card-background-color);border:1px solid var(--border-color);border-radius:var(--radius);width:min(420px,80vw);box-shadow:var(--card-box-shadow);padding:var(--spacing-12);position:fixed;top:0;left:0}.NotificationPanel__title{margin:0 0 var(--spacing-8) 0;font-size:var(--font-size-sm);color:var(--body-title-color);font-weight:var(--font-weight-medium)}.NotificationPanel__list{gap:var(--spacing-4);flex-direction:column;max-height:260px;margin:0;padding:0;list-style:none;display:flex;overflow-y:auto}.NotificationPanel__list::-webkit-scrollbar{width:var(--scrollbar-size)}.NotificationPanel__list::-webkit-scrollbar-track{background:var(--scrollbar-track-color)}.NotificationPanel__list::-webkit-scrollbar-thumb{background:var(--scrollbar-thumb-color);border-radius:var(--scrollbar-radius)}.NotificationPanel__list::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-thumb-hover-color)}.NotificationPanel__list{scrollbar-width:thin;scrollbar-color:var(--scrollbar-thumb-color) var(--scrollbar-track-color)}.NotificationPanel__item{font-size:var(--font-size-sm);color:var(--body-color);padding:var(--spacing-8);border-radius:var(--radius-sm);border:1px solid #0000}.NotificationPanel__item--critical{border-color:color-mix(in srgb, var(--button-danger-border-color) 50%, var(--border-color));background:color-mix(in srgb, var(--button-danger-border-color) 10%, transparent)}.NotificationPanel__item--clickable{cursor:pointer;transition:background-color var(--transition-fast)}.NotificationPanel__item--clickable:hover{background:color-mix(in srgb, var(--body-accent-color) 14%, transparent)}.NotificationPanel__empty{color:var(--body-sub-title-color);font-size:var(--font-size-sm);margin:0}
|
|
1
|
+
.NotificationPanel{position:relative}.NotificationPanel__button{align-items:center;gap:var(--spacing-8);border:1px solid var(--border-color);border-radius:var(--radius);background:var(--card-background-color);color:var(--body-title-color);padding:var(--spacing-8) var(--spacing-12);cursor:pointer;font-size:var(--font-size-sm);font-weight:var(--font-weight-medium);display:inline-flex}.NotificationPanel__button--critical{border-color:color-mix(in srgb, var(--button-danger-border-color) 55%, var(--border-color));background:color-mix(in srgb, var(--button-danger-border-color) 12%, transparent)}.NotificationPanel__badge{min-width:var(--spacing-20);height:var(--spacing-20);border-radius:var(--radius-full);font-size:var(--font-size-xs);background:var(--button-danger-background-color);color:var(--button-danger-color);padding:0 var(--spacing-4);justify-content:center;align-items:center;display:inline-flex}.NotificationPanel__backdrop{z-index:9998;position:fixed;inset:0}.NotificationPanel__panel{z-index:9999;background:var(--card-background-color);border:1px solid var(--border-color);border-radius:var(--radius);width:min(420px,80vw);box-shadow:var(--card-box-shadow);padding:var(--spacing-12);position:fixed;top:0;left:0}.NotificationPanel__title{margin:0 0 var(--spacing-8) 0;font-size:var(--font-size-sm);color:var(--body-title-color);font-weight:var(--font-weight-medium)}.NotificationPanel__list{gap:var(--spacing-4);flex-direction:column;max-height:260px;margin:0;padding:0;list-style:none;display:flex;overflow-y:auto}.NotificationPanel__list::-webkit-scrollbar{width:var(--scrollbar-size)}.NotificationPanel__list::-webkit-scrollbar-track{background:var(--scrollbar-track-color)}.NotificationPanel__list::-webkit-scrollbar-thumb{background:var(--scrollbar-thumb-color);border-radius:var(--scrollbar-radius)}.NotificationPanel__list::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-thumb-hover-color)}.NotificationPanel__list{scrollbar-width:thin;scrollbar-color:var(--scrollbar-thumb-color) var(--scrollbar-track-color)}.NotificationPanel__item{font-size:var(--font-size-sm);color:var(--body-color);padding:var(--spacing-8);border-radius:var(--radius-sm);border:1px solid #0000}.NotificationPanel__item--critical{border-color:color-mix(in srgb, var(--button-danger-border-color) 50%, var(--border-color));background:color-mix(in srgb, var(--button-danger-border-color) 10%, transparent)}.NotificationPanel__item--warning{border-color:color-mix(in srgb, var(--button-warning-border-color) 50%, var(--border-color));background:color-mix(in srgb, var(--button-warning-border-color) 8%, transparent)}.NotificationPanel__item--clickable{cursor:pointer;transition:background-color var(--transition-fast)}.NotificationPanel__item--clickable:hover{background:color-mix(in srgb, var(--body-accent-color) 14%, transparent)}.NotificationPanel__empty{color:var(--body-sub-title-color);font-size:var(--font-size-sm);margin:0}
|
|
@@ -56,7 +56,7 @@ var B = ({ items: i, buttonLabel: y = "Alerts", panelTitle: P = "Notifications",
|
|
|
56
56
|
children: i.map((t) => /* @__PURE__ */ n("li", {
|
|
57
57
|
className: [
|
|
58
58
|
"NotificationPanel__item",
|
|
59
|
-
t.severity
|
|
59
|
+
`NotificationPanel__item--${t.severity}`,
|
|
60
60
|
m ? "NotificationPanel__item--clickable" : ""
|
|
61
61
|
].filter(Boolean).join(" "),
|
|
62
62
|
onClick: m ? () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.memobit-toolbar{background-color:var(--header-background-color);border-bottom:var(--spacing-1) solid var(--header-border-bottom-color);border-radius:var(--spacing-16);align-items:flex-end;gap:var(--spacing-16);padding:var(--spacing-16);flex-wrap:wrap;display:flex}.memobit-toolbar__control-panel-toggle,.memobit-
|
|
1
|
+
.memobit-toolbar{background-color:var(--header-background-color);border-bottom:var(--spacing-1) solid var(--header-border-bottom-color);border-radius:var(--spacing-16);align-items:flex-end;gap:var(--spacing-16);padding:var(--spacing-16);flex-wrap:wrap;display:flex}.memobit-toolbar__control-panel-toggle,.memobit-toolbar__sort{flex:none}.memobit-toolbar__control-panel-toggle-count{min-width:var(--spacing-20);height:var(--spacing-20);padding:0 var(--spacing-6);background:var(--body-accent-color);color:var(--button-info-color);font-size:var(--font-size-xs);font-weight:var(--font-weight-semibold);border-radius:999px;justify-content:center;align-items:center;display:inline-flex}.memobit-toolbar__heading{align-items:center;gap:var(--spacing-8);flex:0 auto;align-self:center;min-width:0;display:flex}.memobit-toolbar__heading--clickable{cursor:pointer}.memobit-toolbar__heading-icon{flex:none;align-items:center;display:inline-flex}.memobit-toolbar__heading-copy{gap:var(--spacing-2);flex-direction:column;min-width:0;display:flex}.memobit-toolbar__heading-title{color:var(--body-title-color);font-family:var(--font-family-display);font-size:var(--font-size-lg);font-weight:var(--font-weight-bold);line-height:1.2}.memobit-toolbar__heading-description{color:var(--body-color-muted);font-size:var(--font-size-sm);text-transform:uppercase;letter-spacing:.05em;line-height:1.3}.memobit-toolbar__content{display:contents}.memobit-toolbar__search{flex:1000 280px;min-width:180px}.memobit-toolbar__search-input,.memobit-toolbar__search-input .input-text{width:100%}.memobit-toolbar__sort{min-width:220px}.memobit-toolbar__custom{align-self:stretch;align-items:flex-end;gap:var(--spacing-16);flex:auto;min-width:0;display:flex}.memobit-toolbar__end{align-items:flex-end;gap:var(--spacing-16);flex:auto;min-width:0;display:flex}.memobit-toolbar__actions{align-items:center;gap:var(--spacing-8);flex:0 auto;min-width:0;margin-left:auto;display:flex}.memobit-toolbar__actions>.NotificationPanel{align-self:stretch}.memobit-toolbar__actions>.NotificationPanel>.NotificationPanel__button{height:100%}.memobit-toolbar--no-card{background-color:#0000;border-bottom:0;border-radius:0;padding:0}@media (width<=768px){.memobit-toolbar{align-items:center;gap:var(--spacing-8);padding:var(--spacing-8)}.memobit-toolbar__control-panel-toggle{order:1}.memobit-toolbar__heading{flex:auto;order:1}.memobit-toolbar__actions{order:2;margin-left:auto}.memobit-toolbar__end{display:contents}.memobit-toolbar__content{align-items:stretch;gap:var(--spacing-8);flex-direction:column;flex:100%;order:3;width:100%;display:flex}.memobit-toolbar__search,.memobit-toolbar__custom{flex:auto;width:100%;min-width:0}.memobit-toolbar__sort{flex:100%;order:4;min-width:0}.memobit-toolbar__custom{gap:var(--spacing-8);flex-wrap:wrap}.memobit-toolbar__custom>*{flex:auto;min-width:0;max-width:100%}}
|
|
@@ -1,73 +1,73 @@
|
|
|
1
1
|
import './Toolbar.css';
|
|
2
|
-
import { Icon as
|
|
3
|
-
import { Button as
|
|
4
|
-
import { Tooltip as
|
|
5
|
-
import { Dropdown as
|
|
6
|
-
import { InputSearch as
|
|
7
|
-
import { useControlPanelContext as
|
|
8
|
-
import { MenuHamburger as
|
|
9
|
-
import { NotificationPanel as
|
|
2
|
+
import { Icon as S } from "../Icon/Icon2.js";
|
|
3
|
+
import { Button as w } from "../Button/Button2.js";
|
|
4
|
+
import { Tooltip as x } from "../Tooltip/Tooltip2.js";
|
|
5
|
+
import { Dropdown as k } from "../Dropdown/Dropdown2.js";
|
|
6
|
+
import { InputSearch as y } from "../InputSearch/InputSearch2.js";
|
|
7
|
+
import { useControlPanelContext as B } from "../ControlPanel/useControlPanel.js";
|
|
8
|
+
import { MenuHamburger as $ } from "../MenuHamburger/MenuHamburger2.js";
|
|
9
|
+
import { NotificationPanel as R } from "../NotificationPanel/NotificationPanel2.js";
|
|
10
10
|
/* empty css */
|
|
11
11
|
import "react";
|
|
12
|
-
import { jsx as a, jsxs as
|
|
13
|
-
var c = "::",
|
|
14
|
-
value: `${
|
|
15
|
-
label:
|
|
12
|
+
import { jsx as a, jsxs as i } from "react/jsx-runtime";
|
|
13
|
+
var c = "::", M = (o) => typeof o == "object" ? o.label : void 0, O = (o) => "fields" in o ? o.fields.flatMap((t) => [{
|
|
14
|
+
value: `${t.value}${c}asc`,
|
|
15
|
+
label: t.label,
|
|
16
16
|
suffixIcon: "arrow-up"
|
|
17
17
|
}, {
|
|
18
|
-
value: `${
|
|
19
|
-
label:
|
|
18
|
+
value: `${t.value}${c}desc`,
|
|
19
|
+
label: t.label,
|
|
20
20
|
suffixIcon: "arrow-down"
|
|
21
|
-
}]) :
|
|
22
|
-
const u =
|
|
21
|
+
}]) : o.options, A = (o) => "fields" in o ? o.value ? `${o.value.field}${c}${o.value.direction}` : null : o.value, K = ({ actions: o, children: t, className: f = "", controlPanelToggle: r, heading: l, noCard: _ = !1, menuItems: v, notifications: n, search: s, sort: e }) => {
|
|
22
|
+
const u = B(), h = !!(r && u?.isMobile), d = typeof r == "object" ? r.count ?? 0 : 0, N = [
|
|
23
23
|
"memobit-toolbar",
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
].filter(Boolean).join(" "),
|
|
27
|
-
if (
|
|
24
|
+
_ ? "memobit-toolbar--no-card" : "",
|
|
25
|
+
f
|
|
26
|
+
].filter(Boolean).join(" "), C = !!(s || t), g = (m) => {
|
|
27
|
+
if (e) {
|
|
28
28
|
if (!m || Array.isArray(m)) {
|
|
29
|
-
"fields" in
|
|
29
|
+
"fields" in e || e.onChange("", null);
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
32
|
-
if ("fields" in
|
|
33
|
-
const b = String(m.value), p = b.lastIndexOf(c),
|
|
34
|
-
|
|
35
|
-
field:
|
|
36
|
-
direction:
|
|
32
|
+
if ("fields" in e) {
|
|
33
|
+
const b = String(m.value), p = b.lastIndexOf(c), j = b.substring(0, p), I = b.substring(p + 2);
|
|
34
|
+
e.onChange({
|
|
35
|
+
field: j,
|
|
36
|
+
direction: I
|
|
37
37
|
});
|
|
38
38
|
return;
|
|
39
39
|
}
|
|
40
|
-
|
|
40
|
+
e.onChange(String(m.value), m);
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
|
-
return /* @__PURE__ */
|
|
44
|
-
className:
|
|
43
|
+
return /* @__PURE__ */ i("div", {
|
|
44
|
+
className: N,
|
|
45
45
|
children: [
|
|
46
|
-
|
|
46
|
+
h && /* @__PURE__ */ a(x, {
|
|
47
47
|
title: "Filters",
|
|
48
|
-
children: /* @__PURE__ */
|
|
48
|
+
children: /* @__PURE__ */ i(w, {
|
|
49
49
|
className: "memobit-toolbar__control-panel-toggle",
|
|
50
50
|
icon: "tune",
|
|
51
51
|
onClick: u?.toggle,
|
|
52
52
|
size: "medium",
|
|
53
53
|
variant: "default",
|
|
54
|
-
children: [r &&
|
|
54
|
+
children: [r && M(r), d > 0 && /* @__PURE__ */ a("span", {
|
|
55
55
|
className: "memobit-toolbar__control-panel-toggle-count",
|
|
56
56
|
children: d
|
|
57
57
|
})]
|
|
58
58
|
})
|
|
59
59
|
}),
|
|
60
|
-
l && /* @__PURE__ */
|
|
60
|
+
l && /* @__PURE__ */ i("div", {
|
|
61
61
|
className: ["memobit-toolbar__heading", l.onClick ? "memobit-toolbar__heading--clickable" : ""].filter(Boolean).join(" "),
|
|
62
62
|
onClick: l.onClick,
|
|
63
|
-
children: [(l.svg || l.icon || l.emoji) && /* @__PURE__ */
|
|
63
|
+
children: [(l.svg || l.icon || l.emoji) && /* @__PURE__ */ i("span", {
|
|
64
64
|
className: "memobit-toolbar__heading-icon",
|
|
65
65
|
children: [
|
|
66
66
|
l.svg,
|
|
67
|
-
l.icon && /* @__PURE__ */ a(
|
|
67
|
+
l.icon && /* @__PURE__ */ a(S, { name: l.icon }),
|
|
68
68
|
l.emoji
|
|
69
69
|
]
|
|
70
|
-
}), /* @__PURE__ */
|
|
70
|
+
}), /* @__PURE__ */ i("div", {
|
|
71
71
|
className: "memobit-toolbar__heading-copy",
|
|
72
72
|
children: [/* @__PURE__ */ a("span", {
|
|
73
73
|
className: "memobit-toolbar__heading-title",
|
|
@@ -78,52 +78,56 @@ var c = "::", R = (e) => typeof e == "object" ? e.label : void 0, M = (e) => "fi
|
|
|
78
78
|
})]
|
|
79
79
|
})]
|
|
80
80
|
}),
|
|
81
|
-
|
|
81
|
+
C && /* @__PURE__ */ i("div", {
|
|
82
82
|
className: "memobit-toolbar__content",
|
|
83
83
|
children: [s && /* @__PURE__ */ a("div", {
|
|
84
84
|
className: "memobit-toolbar__search",
|
|
85
|
-
children: /* @__PURE__ */ a(
|
|
85
|
+
children: /* @__PURE__ */ a(y, {
|
|
86
86
|
...s,
|
|
87
87
|
className: ["memobit-toolbar__search-input", s.className].filter(Boolean).join(" ")
|
|
88
88
|
})
|
|
89
|
-
}),
|
|
89
|
+
}), t && /* @__PURE__ */ a("div", {
|
|
90
90
|
className: "memobit-toolbar__custom",
|
|
91
|
-
children:
|
|
91
|
+
children: t
|
|
92
92
|
})]
|
|
93
93
|
}),
|
|
94
|
-
/* @__PURE__ */
|
|
94
|
+
/* @__PURE__ */ i("div", {
|
|
95
95
|
className: "memobit-toolbar__end",
|
|
96
|
-
children: [
|
|
97
|
-
className: ["memobit-toolbar__sort",
|
|
98
|
-
children: /* @__PURE__ */ a(
|
|
99
|
-
highlighted:
|
|
100
|
-
label:
|
|
101
|
-
name:
|
|
102
|
-
onChange:
|
|
103
|
-
options:
|
|
104
|
-
placeholder:
|
|
105
|
-
searchable:
|
|
96
|
+
children: [e && /* @__PURE__ */ a("div", {
|
|
97
|
+
className: ["memobit-toolbar__sort", e.className].filter(Boolean).join(" "),
|
|
98
|
+
children: /* @__PURE__ */ a(k, {
|
|
99
|
+
highlighted: e.highlighted,
|
|
100
|
+
label: e.label,
|
|
101
|
+
name: e.name ?? "toolbar-sort",
|
|
102
|
+
onChange: g,
|
|
103
|
+
options: O(e),
|
|
104
|
+
placeholder: e.placeholder,
|
|
105
|
+
searchable: e.searchable ?? !1,
|
|
106
106
|
usePortal: !1,
|
|
107
|
-
value:
|
|
107
|
+
value: A(e)
|
|
108
108
|
})
|
|
109
|
-
}), /* @__PURE__ */
|
|
109
|
+
}), /* @__PURE__ */ i("div", {
|
|
110
110
|
className: "memobit-toolbar__actions",
|
|
111
|
-
children: [
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
111
|
+
children: [
|
|
112
|
+
o,
|
|
113
|
+
n && /* @__PURE__ */ a(R, {
|
|
114
|
+
items: n.items,
|
|
115
|
+
buttonLabel: n.buttonLabel,
|
|
116
|
+
panelTitle: n.panelTitle,
|
|
117
|
+
emptyMessage: n.emptyMessage,
|
|
118
|
+
onItemClick: n.onItemClick
|
|
119
|
+
}),
|
|
120
|
+
/* @__PURE__ */ a($, {
|
|
121
|
+
items: v,
|
|
122
|
+
disableResponsive: !0,
|
|
123
|
+
showLabel: !1
|
|
124
|
+
})
|
|
125
|
+
]
|
|
122
126
|
})]
|
|
123
127
|
})
|
|
124
128
|
]
|
|
125
129
|
});
|
|
126
130
|
};
|
|
127
131
|
export {
|
|
128
|
-
|
|
132
|
+
K as Toolbar
|
|
129
133
|
};
|
|
@@ -1,98 +1,108 @@
|
|
|
1
1
|
import './Tooltip.css';
|
|
2
2
|
/* empty css */
|
|
3
|
-
import { useCallback as
|
|
4
|
-
import { Fragment as
|
|
5
|
-
import { createPortal as
|
|
6
|
-
var
|
|
7
|
-
const [
|
|
3
|
+
import { createContext as U, useCallback as F, useContext as W, useEffect as C, useRef as d, useState as M } from "react";
|
|
4
|
+
import { Fragment as X, jsx as $, jsxs as I } from "react/jsx-runtime";
|
|
5
|
+
import { createPortal as Y } from "react-dom";
|
|
6
|
+
var j = U(null), re = ({ title: y, position: h = "top", delay: z = 200, children: V, disabled: E = !1, className: O = "", maxWidth: p, maxHeight: a }) => {
|
|
7
|
+
const [g, u] = M(!1), [D, q] = M(0), w = W(j), [x, A] = M({
|
|
8
8
|
top: 0,
|
|
9
9
|
left: 0
|
|
10
|
-
}), c =
|
|
11
|
-
|
|
10
|
+
}), c = d(null), n = d(null), l = d(null), f = d(null), m = d(!1), v = a !== void 0, b = v ? 150 : 0, B = !!y && !E, L = g && B && D === 0, N = g && B || D > 0, G = F((t) => {
|
|
11
|
+
q((e) => Math.max(0, e + (t ? 1 : -1)));
|
|
12
|
+
}, []);
|
|
13
|
+
C(() => {
|
|
14
|
+
if (!(!w || !N))
|
|
15
|
+
return w(!0), () => w(!1);
|
|
16
|
+
}, [N, w]);
|
|
17
|
+
const T = F(() => {
|
|
18
|
+
if (!l.current || !f.current) return;
|
|
12
19
|
const t = l.current.firstElementChild?.getBoundingClientRect();
|
|
13
20
|
let e = t && t.width > 0 ? t : l.current.getBoundingClientRect();
|
|
14
21
|
if (e.width === 0 && e.height === 0) {
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
const
|
|
18
|
-
(
|
|
22
|
+
const _ = document.createRange();
|
|
23
|
+
_.selectNodeContents(l.current);
|
|
24
|
+
const P = _.getBoundingClientRect();
|
|
25
|
+
(P.width > 0 || P.height > 0) && (e = P);
|
|
19
26
|
}
|
|
20
|
-
const
|
|
27
|
+
const r = f.current.getBoundingClientRect(), R = 8;
|
|
21
28
|
let o = 0, i = 0;
|
|
22
|
-
switch (
|
|
29
|
+
switch (h) {
|
|
23
30
|
case "top":
|
|
24
|
-
o = e.top -
|
|
31
|
+
o = e.top - r.height - R, i = e.left + e.width / 2 - r.width / 2;
|
|
25
32
|
break;
|
|
26
33
|
case "bottom":
|
|
27
|
-
o = e.bottom +
|
|
34
|
+
o = e.bottom + R, i = e.left + e.width / 2 - r.width / 2;
|
|
28
35
|
break;
|
|
29
36
|
case "left":
|
|
30
|
-
o = e.top + e.height / 2 -
|
|
37
|
+
o = e.top + e.height / 2 - r.height / 2, i = e.left - r.width - R;
|
|
31
38
|
break;
|
|
32
39
|
case "right":
|
|
33
|
-
o = e.top + e.height / 2 -
|
|
40
|
+
o = e.top + e.height / 2 - r.height / 2, i = e.right + R;
|
|
34
41
|
}
|
|
35
|
-
const
|
|
36
|
-
i <
|
|
42
|
+
const s = 8;
|
|
43
|
+
i < s && (i = s), i + r.width > window.innerWidth - s && (i = window.innerWidth - r.width - s), o < s && (o = s), o + r.height > window.innerHeight - s && (o = window.innerHeight - r.height - s), A({
|
|
37
44
|
top: o,
|
|
38
45
|
left: i
|
|
39
46
|
});
|
|
40
|
-
}, [
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
},
|
|
47
|
-
t.pointerType !== "touch" && t.pointerType !== "pen" ||
|
|
47
|
+
}, [h]), S = () => {
|
|
48
|
+
E || m.current || (n.current && (clearTimeout(n.current), n.current = null), c.current = setTimeout(() => {
|
|
49
|
+
u(!0);
|
|
50
|
+
}, z));
|
|
51
|
+
}, k = () => {
|
|
52
|
+
m.current || (c.current && clearTimeout(c.current), b > 0 ? n.current = setTimeout(() => u(!1), b) : u(!1));
|
|
53
|
+
}, J = (t) => {
|
|
54
|
+
t.pointerType !== "touch" && t.pointerType !== "pen" || E || (m.current = !0, c.current && (clearTimeout(c.current), c.current = null), t.stopPropagation(), u((e) => !e));
|
|
48
55
|
};
|
|
49
|
-
|
|
50
|
-
if (!
|
|
56
|
+
C(() => {
|
|
57
|
+
if (!L) return;
|
|
51
58
|
const t = (e) => {
|
|
52
|
-
e.target instanceof Node &&
|
|
59
|
+
e.target instanceof Node && f.current?.contains(e.target) || u(!1);
|
|
53
60
|
};
|
|
54
61
|
return T(), window.addEventListener("scroll", t, !0), window.addEventListener("resize", T), () => {
|
|
55
62
|
window.removeEventListener("scroll", t, !0), window.removeEventListener("resize", T);
|
|
56
63
|
};
|
|
57
|
-
}, [
|
|
58
|
-
if (!
|
|
64
|
+
}, [L, T]), C(() => {
|
|
65
|
+
if (!g) return;
|
|
59
66
|
const t = (e) => {
|
|
60
|
-
l.current?.contains(e.target) ||
|
|
67
|
+
l.current?.contains(e.target) || f.current?.contains(e.target) || u(!1);
|
|
61
68
|
};
|
|
62
69
|
return document.addEventListener("pointerdown", t), () => {
|
|
63
|
-
document.removeEventListener("pointerdown", t),
|
|
70
|
+
document.removeEventListener("pointerdown", t), m.current = !1;
|
|
64
71
|
};
|
|
65
|
-
}, [
|
|
66
|
-
c.current && clearTimeout(c.current),
|
|
72
|
+
}, [g]), C(() => () => {
|
|
73
|
+
c.current && clearTimeout(c.current), n.current && clearTimeout(n.current);
|
|
67
74
|
}, []);
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
},
|
|
71
|
-
|
|
75
|
+
const K = () => {
|
|
76
|
+
v && n.current && (clearTimeout(n.current), n.current = null);
|
|
77
|
+
}, Q = () => {
|
|
78
|
+
v && (n.current = setTimeout(() => u(!1), b));
|
|
72
79
|
};
|
|
73
|
-
return /* @__PURE__ */
|
|
80
|
+
return /* @__PURE__ */ I(X, { children: [/* @__PURE__ */ $("span", {
|
|
74
81
|
ref: l,
|
|
75
82
|
className: "tooltip-trigger",
|
|
76
|
-
onMouseEnter:
|
|
77
|
-
onMouseLeave:
|
|
78
|
-
onFocus:
|
|
79
|
-
onBlur:
|
|
80
|
-
onPointerDown:
|
|
81
|
-
children:
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
onMouseEnter: S,
|
|
84
|
+
onMouseLeave: k,
|
|
85
|
+
onFocus: S,
|
|
86
|
+
onBlur: k,
|
|
87
|
+
onPointerDown: J,
|
|
88
|
+
children: /* @__PURE__ */ $(j.Provider, {
|
|
89
|
+
value: G,
|
|
90
|
+
children: V
|
|
91
|
+
})
|
|
92
|
+
}), L && Y(/* @__PURE__ */ I("div", {
|
|
93
|
+
ref: f,
|
|
94
|
+
className: `tooltip tooltip--${h} ${v ? "tooltip--scrollable" : ""} ${O}`,
|
|
85
95
|
style: {
|
|
86
|
-
top: `${
|
|
87
|
-
left: `${
|
|
88
|
-
...
|
|
96
|
+
top: `${x.top}px`,
|
|
97
|
+
left: `${x.left}px`,
|
|
98
|
+
...p !== void 0 && { maxWidth: typeof p == "number" ? `${p}px` : p },
|
|
89
99
|
...a !== void 0 && { maxHeight: typeof a == "number" ? `${a}px` : a }
|
|
90
100
|
},
|
|
91
|
-
onMouseEnter:
|
|
92
|
-
onMouseLeave:
|
|
93
|
-
children: [
|
|
101
|
+
onMouseEnter: K,
|
|
102
|
+
onMouseLeave: Q,
|
|
103
|
+
children: [y, /* @__PURE__ */ $("div", { className: `tooltip__arrow tooltip__arrow--${h}` })]
|
|
94
104
|
}), document.body)] });
|
|
95
105
|
};
|
|
96
106
|
export {
|
|
97
|
-
|
|
107
|
+
re as Tooltip
|
|
98
108
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -3576,6 +3576,9 @@ export declare interface ToolbarNotificationsConfig {
|
|
|
3576
3576
|
}
|
|
3577
3577
|
|
|
3578
3578
|
export declare interface ToolbarProps {
|
|
3579
|
+
/** Buttons or status shown beside the menu: at the right on desktop, in the top row on mobile. */
|
|
3580
|
+
actions?: ReactNode;
|
|
3581
|
+
/** Extra filters or controls, laid out with the search. */
|
|
3579
3582
|
children?: ReactNode;
|
|
3580
3583
|
className?: string;
|
|
3581
3584
|
controlPanelToggle?: boolean | ToolbarControlPanelToggleConfig;
|
package/dist/version.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var I = "3.
|
|
1
|
+
var I = "3.18.0", B = 576, L = "3b68c0a", _ = "2026-10-25T17:20:25.367Z", a = "576";
|
|
2
2
|
export {
|
|
3
3
|
_ as LIB_BUILD_DATE,
|
|
4
|
-
|
|
4
|
+
a as LIB_BUILD_ID,
|
|
5
5
|
B as LIB_BUILD_NUMBER,
|
|
6
6
|
L as LIB_COMMIT,
|
|
7
7
|
I as LIB_VERSION
|
package/dist/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memobit/libs",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.18.0",
|
|
4
4
|
"description": "React component library powering the Memobit apps — 100+ components, helpers and hooks. Icons ship as @memobit/icons and themes as @memobit/themes. TypeScript-first, ESM-only, React 19.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|