kelt-ui-kit-react 2.1.5 → 2.1.6
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/index.js +12 -6
- package/package.json +1 -1
- package/src/card/Card.tsx +5 -0
- package/src/card/cardAction/CardAction.tsx +1 -1
package/dist/index.js
CHANGED
|
@@ -2472,7 +2472,11 @@ var Pr = a(({ value: e = "", locale: t = "fr-FR", currency: n = "EUR", allowDeci
|
|
|
2472
2472
|
title: r
|
|
2473
2473
|
}, t)
|
|
2474
2474
|
};
|
|
2475
|
-
}), [
|
|
2475
|
+
}), [
|
|
2476
|
+
e,
|
|
2477
|
+
n,
|
|
2478
|
+
v
|
|
2479
|
+
]);
|
|
2476
2480
|
return /* @__PURE__ */ b("div", {
|
|
2477
2481
|
className: "card-actions",
|
|
2478
2482
|
children: [/* @__PURE__ */ b("div", {
|
|
@@ -2512,11 +2516,13 @@ var Pr = a(({ value: e = "", locale: t = "fr-FR", currency: n = "EUR", allowDeci
|
|
|
2512
2516
|
let [u, d] = g(!1), [f, p] = g(!1), [h, _] = g(), x = (e, t) => {
|
|
2513
2517
|
e.stopPropagation(), i && i(t);
|
|
2514
2518
|
}, S = o((e, t) => {
|
|
2515
|
-
if (e.stopPropagation(),
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2519
|
+
if (e.stopPropagation(), e.currentTarget.contains(e.target)) {
|
|
2520
|
+
if (f) return _(void 0), p(!1);
|
|
2521
|
+
e.target.closest(".qte") || e.target.closest(".card-action-menu button") || e.target.closest(".card-actions") || (d(!u), r && e.button !== 2 ? r(t) : (_({
|
|
2522
|
+
top: e.clientY,
|
|
2523
|
+
left: e.clientX
|
|
2524
|
+
}), p(!0)));
|
|
2525
|
+
}
|
|
2520
2526
|
}, [
|
|
2521
2527
|
d,
|
|
2522
2528
|
_,
|
package/package.json
CHANGED
package/src/card/Card.tsx
CHANGED
|
@@ -44,6 +44,11 @@ export const Card = ({
|
|
|
44
44
|
const onClickCard = useCallback(
|
|
45
45
|
(e: React.MouseEvent, item: CardInterface) => {
|
|
46
46
|
e.stopPropagation();
|
|
47
|
+
// Clic dans le menu d'actions (rendu en portal) : l'événement remonte
|
|
48
|
+
// dans l'arbre React mais ne doit pas refermer/repositionner le menu
|
|
49
|
+
if (!e.currentTarget.contains(e.target as Node)) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
47
52
|
if (openActions) {
|
|
48
53
|
setPositions(undefined);
|
|
49
54
|
return setOpenActions(false);
|