@iress-oss/ids-components 6.4.5 → 6.4.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.
@@ -54,22 +54,22 @@ var g = ({ children: t, displayMode: n, id: r, observerTarget: a, style: s, virt
54
54
  };
55
55
  g.displayName = "PopoverContentInner";
56
56
  var _ = ({ container: e, ...n }) => {
57
- let i = r(), { container: a } = u(), o = e === void 0 ? a : e, [c, l] = m();
57
+ let i = r(), { container: a } = u(), o = n.displayMode === "inline" ? void 0 : a, c = e === void 0 ? o : e, [l, f] = m();
58
58
  return d(() => {
59
- if (!o) {
60
- l(void 0);
59
+ if (!c) {
60
+ f(void 0);
61
61
  return;
62
62
  }
63
- let e = "current" in o ? o.current ?? void 0 : o ?? void 0;
64
- l(e);
65
- }, [o]), o ? /* @__PURE__ */ h(t, {
63
+ let e = "current" in c ? c.current ?? void 0 : c ?? void 0;
64
+ f(e);
65
+ }, [c]), c ? /* @__PURE__ */ h(t, {
66
66
  id: i,
67
67
  children: /* @__PURE__ */ h(s, {
68
- root: o,
68
+ root: c,
69
69
  preserveTabOrder: !0,
70
70
  children: /* @__PURE__ */ h(g, {
71
71
  ...n,
72
- observerTarget: c
72
+ observerTarget: l
73
73
  })
74
74
  })
75
75
  }) : /* @__PURE__ */ h(t, {
@@ -11,22 +11,30 @@ import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
11
11
  var g = (e) => {
12
12
  let [t, n] = f({}), r = d({}), i = c(a), o = d(null);
13
13
  return u(() => {
14
- let e = i?.hover;
15
- if (e && o.current) {
16
- let t = o.current.parentElement;
17
- if (t) {
14
+ let e = i?.hover, t = o.current?.parentElement, a = () => {
15
+ if (e && t) {
18
16
  let i = t.getBoundingClientRect(), a = e.getBoundingClientRect(), o = {
19
17
  opacity: 1,
20
18
  left: `${a.left - i.left + t.scrollLeft}px`,
21
19
  width: `${a.width}px`
22
20
  };
23
21
  n(o), r.current = o;
24
- }
25
- } else n({
26
- ...r.current,
27
- opacity: 0
28
- });
29
- }, [i?.hover]), /* @__PURE__ */ m("div", {
22
+ } else n({
23
+ ...r.current,
24
+ opacity: 0
25
+ });
26
+ };
27
+ a();
28
+ let s;
29
+ if (e && t && typeof ResizeObserver < "u") {
30
+ s = new ResizeObserver(a);
31
+ let e = s;
32
+ e.observe(t), t.querySelectorAll("[role=\"tab\"]").forEach((t) => e.observe(t));
33
+ }
34
+ return () => {
35
+ s?.disconnect();
36
+ };
37
+ }, [i?.hover, i?.layoutVersion]), /* @__PURE__ */ m("div", {
30
38
  ...e,
31
39
  ref: o,
32
40
  style: t
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iress-oss/ids-components",
3
- "version": "6.4.5",
3
+ "version": "6.4.6",
4
4
  "description": "Iress React Component Library",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",