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 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
- }), [e]);
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(), f) return _(void 0), p(!1);
2516
- e.target.closest(".qte") || e.target.closest(".card-action-menu button") || e.target.closest(".card-actions") || (d(!u), r && e.button !== 2 ? r(t) : (_({
2517
- top: e.clientY,
2518
- left: e.clientX
2519
- }), p(!0)));
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "kelt-ui-kit-react",
3
3
  "type": "module",
4
- "version": "2.1.5",
4
+ "version": "2.1.6",
5
5
  "private": false,
6
6
  "repository": {
7
7
  "type": "git",
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);
@@ -89,7 +89,7 @@ export const CardAction = ({
89
89
  ),
90
90
  };
91
91
  }) as MenuInterface[];
92
- }, [actions]);
92
+ }, [actions, item, closeOverlay]);
93
93
  return (
94
94
  <div className="card-actions">
95
95
  <div