@tedi-design-system/react 18.0.0-rc.6 → 18.0.0-rc.7

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.
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../../../../_virtual/react-is.development.cjs.js");/** @license React v16.13.1
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../../../../_virtual/react-is.development.cjs2.js");/** @license React v16.13.1
2
2
  * react-is.development.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -1,4 +1,4 @@
1
- import { __exports as r } from "../../../../../_virtual/react-is.development.es.js";
1
+ import { __exports as r } from "../../../../../_virtual/react-is.development.es2.js";
2
2
  /** @license React v16.13.1
3
3
  * react-is.development.js
4
4
  *
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../../../../_virtual/react-is.production.min.cjs.js");/** @license React v16.13.1
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../../../../_virtual/react-is.production.min.cjs2.js");/** @license React v16.13.1
2
2
  * react-is.production.min.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -1,4 +1,4 @@
1
- import { __exports as r } from "../../../../../_virtual/react-is.production.min.es.js";
1
+ import { __exports as r } from "../../../../../_virtual/react-is.production.min.es2.js";
2
2
  /** @license React v16.13.1
3
3
  * react-is.production.min.js
4
4
  *
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../../_virtual/index.cjs3.js"),r=require("./cjs/react-is.production.min.cjs.js"),o=require("./cjs/react-is.development.cjs.js");process.env.NODE_ENV==="production"?e.__module.exports=r.__require():e.__module.exports=o.__require();var t=e.__module.exports;exports.reactIsExports=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../../_virtual/index.cjs4.js"),r=require("./cjs/react-is.production.min.cjs.js"),o=require("./cjs/react-is.development.cjs.js");process.env.NODE_ENV==="production"?e.__module.exports=r.__require():e.__module.exports=o.__require();var t=e.__module.exports;exports.reactIsExports=t;
@@ -1,4 +1,4 @@
1
- import { __module as r } from "../../../../_virtual/index.es3.js";
1
+ import { __module as r } from "../../../../_virtual/index.es4.js";
2
2
  import { __require as e } from "./cjs/react-is.production.min.es.js";
3
3
  import { __require as o } from "./cjs/react-is.development.es.js";
4
4
  process.env.NODE_ENV === "production" ? r.exports = e() : r.exports = o();
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../../../../_virtual/react-is.development.cjs2.js");/** @license React v16.13.1
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../../../../_virtual/react-is.development.cjs.js");/** @license React v16.13.1
2
2
  * react-is.development.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -1,4 +1,4 @@
1
- import { __exports as r } from "../../../../../_virtual/react-is.development.es2.js";
1
+ import { __exports as r } from "../../../../../_virtual/react-is.development.es.js";
2
2
  /** @license React v16.13.1
3
3
  * react-is.development.js
4
4
  *
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../../../../_virtual/react-is.production.min.cjs2.js");/** @license React v16.13.1
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../../../../_virtual/react-is.production.min.cjs.js");/** @license React v16.13.1
2
2
  * react-is.production.min.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -1,4 +1,4 @@
1
- import { __exports as r } from "../../../../../_virtual/react-is.production.min.es2.js";
1
+ import { __exports as r } from "../../../../../_virtual/react-is.production.min.es.js";
2
2
  /** @license React v16.13.1
3
3
  * react-is.production.min.js
4
4
  *
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../../_virtual/index.cjs4.js"),t=require("./cjs/react-is.production.min.cjs.js"),o=require("./cjs/react-is.development.cjs.js");var r;function u(){return r||(r=1,process.env.NODE_ENV==="production"?e.__module.exports=t.__require():e.__module.exports=o.__require()),e.__module.exports}exports.__require=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../../_virtual/index.cjs3.js"),t=require("./cjs/react-is.production.min.cjs.js"),o=require("./cjs/react-is.development.cjs.js");var r;function u(){return r||(r=1,process.env.NODE_ENV==="production"?e.__module.exports=t.__require():e.__module.exports=o.__require()),e.__module.exports}exports.__require=u;
@@ -1,4 +1,4 @@
1
- import { __module as e } from "../../../../_virtual/index.es4.js";
1
+ import { __module as e } from "../../../../_virtual/index.es3.js";
2
2
  import { __require as o } from "./cjs/react-is.production.min.es.js";
3
3
  import { __require as t } from "./cjs/react-is.development.es.js";
4
4
  var r;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tedi-design-system/react",
3
- "version": "18.0.0-rc.6",
3
+ "version": "18.0.0-rc.7",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "exports": {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),r=require("../../../../../external/@floating-ui/react/dist/floating-ui.react.cjs.js"),d=require("react"),j=require("./overlay.cjs.js"),F=s=>{const{children:u,classNames:e,labelledBy:y,describedBy:f}=s,{open:l,x:m,y:h,strategy:g,focusManager:o,floating:b,arrowRef:v,getFloatingProps:x,placement:w,context:i,arrow:t,scrollLock:c,contentId:p}=d.useContext(j.OverlayContext);return d.useEffect(()=>{c&&(l?(document.documentElement.style.overflow="hidden",document.documentElement.scrollHeight>window.innerHeight&&(document.body.style.overflow="scroll")):(document.documentElement.style.overflow="",document.body.style.overflow=""))},[l,c]),l?n.jsx(r.FloatingPortal,{children:n.jsx(r.FloatingFocusManager,{modal:(o==null?void 0:o.modal)||!1,...o,context:i,children:n.jsxs("div",{...x({ref:b,tabIndex:-1,id:p,"aria-labelledby":y,"aria-describedby":f,style:{position:g,left:m,top:h},className:e==null?void 0:e.content}),"data-placement":w,"data-testid":"overlay-content",children:[n.jsx(r.FloatingArrow,{ref:a=>v.current=a,context:i,className:e==null?void 0:e.arrow,height:t==null?void 0:t.height,width:t==null?void 0:t.width,"data-testid":"overlay-arrow"}),u]})})}):null};exports.OverlayContent=F;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),r=require("../../../../../external/@floating-ui/react/dist/floating-ui.react.cjs.js"),s=require("react"),q=require("./overlay.cjs.js"),C=u=>{const{children:y,classNames:e,labelledBy:f,describedBy:m}=u,{open:l,x:g,y:h,strategy:b,focusManager:o,floating:v,arrowRef:x,getFloatingProps:w,placement:p,context:i,arrow:t,scrollLock:c,contentId:j,role:F}=s.useContext(q.OverlayContext);if(s.useEffect(()=>{c&&(l?(document.documentElement.style.overflow="hidden",document.documentElement.scrollHeight>window.innerHeight&&(document.body.style.overflow="scroll")):(document.documentElement.style.overflow="",document.body.style.overflow=""))},[l,c]),!l)return null;const a=n.jsxs("div",{...w({ref:v,tabIndex:-1,id:j,"aria-labelledby":f,"aria-describedby":m,style:{position:b,left:g,top:h},className:e==null?void 0:e.content}),"data-placement":p,"data-testid":"overlay-content",children:[n.jsx(r.FloatingArrow,{ref:d=>x.current=d,context:i,className:e==null?void 0:e.arrow,height:t==null?void 0:t.height,width:t==null?void 0:t.width,"data-testid":"overlay-arrow"}),y]});return n.jsx(r.FloatingPortal,{children:F==="tooltip"?a:n.jsx(r.FloatingFocusManager,{modal:(o==null?void 0:o.modal)||!1,...o,context:i,children:a})})};exports.OverlayContent=C;
@@ -1,48 +1,50 @@
1
- import { jsx as n, jsxs as w } from "react/jsx-runtime";
2
- import { FloatingPortal as x, FloatingFocusManager as F, FloatingArrow as E } from "../../../../../external/@floating-ui/react/dist/floating-ui.react.es.js";
3
- import { useContext as C, useEffect as j } from "react";
4
- import { OverlayContext as B } from "./overlay.es.js";
5
- const S = (a) => {
6
- const { children: c, classNames: e, labelledBy: s, describedBy: m } = a, {
1
+ import { jsxs as F, jsx as n } from "react/jsx-runtime";
2
+ import { FloatingArrow as E, FloatingPortal as C, FloatingFocusManager as j } from "../../../../../external/@floating-ui/react/dist/floating-ui.react.es.js";
3
+ import { useContext as B, useEffect as H } from "react";
4
+ import { OverlayContext as I } from "./overlay.es.js";
5
+ const A = (c) => {
6
+ const { children: s, classNames: e, labelledBy: m, describedBy: f } = c, {
7
7
  open: l,
8
- x: f,
9
- y,
10
- strategy: h,
8
+ x: y,
9
+ y: h,
10
+ strategy: u,
11
11
  focusManager: o,
12
- floating: u,
13
- arrowRef: b,
14
- getFloatingProps: g,
15
- placement: p,
12
+ floating: g,
13
+ arrowRef: p,
14
+ getFloatingProps: b,
15
+ placement: v,
16
16
  context: r,
17
17
  arrow: t,
18
- scrollLock: d,
19
- contentId: v
20
- } = C(B);
21
- return j(() => {
22
- d && (l ? (document.documentElement.style.overflow = "hidden", document.documentElement.scrollHeight > window.innerHeight && (document.body.style.overflow = "scroll")) : (document.documentElement.style.overflow = "", document.body.style.overflow = ""));
23
- }, [l, d]), l ? /* @__PURE__ */ n(x, { children: /* @__PURE__ */ n(F, { modal: (o == null ? void 0 : o.modal) || !1, ...o, context: r, children: /* @__PURE__ */ w(
18
+ scrollLock: i,
19
+ contentId: w,
20
+ role: x
21
+ } = B(I);
22
+ if (H(() => {
23
+ i && (l ? (document.documentElement.style.overflow = "hidden", document.documentElement.scrollHeight > window.innerHeight && (document.body.style.overflow = "scroll")) : (document.documentElement.style.overflow = "", document.body.style.overflow = ""));
24
+ }, [l, i]), !l) return null;
25
+ const d = /* @__PURE__ */ F(
24
26
  "div",
25
27
  {
26
- ...g({
27
- ref: u,
28
+ ...b({
29
+ ref: g,
28
30
  tabIndex: -1,
29
- id: v,
30
- "aria-labelledby": s,
31
- "aria-describedby": m,
31
+ id: w,
32
+ "aria-labelledby": m,
33
+ "aria-describedby": f,
32
34
  style: {
33
- position: h,
34
- left: f,
35
- top: y
35
+ position: u,
36
+ left: y,
37
+ top: h
36
38
  },
37
39
  className: e == null ? void 0 : e.content
38
40
  }),
39
- "data-placement": p,
41
+ "data-placement": v,
40
42
  "data-testid": "overlay-content",
41
43
  children: [
42
44
  /* @__PURE__ */ n(
43
45
  E,
44
46
  {
45
- ref: (i) => b.current = i,
47
+ ref: (a) => p.current = a,
46
48
  context: r,
47
49
  className: e == null ? void 0 : e.arrow,
48
50
  height: t == null ? void 0 : t.height,
@@ -50,11 +52,12 @@ const S = (a) => {
50
52
  "data-testid": "overlay-arrow"
51
53
  }
52
54
  ),
53
- c
55
+ s
54
56
  ]
55
57
  }
56
- ) }) }) : null;
58
+ );
59
+ return /* @__PURE__ */ n(C, { children: x === "tooltip" ? d : /* @__PURE__ */ n(j, { modal: (o == null ? void 0 : o.modal) || !1, ...o, context: r, children: d }) });
57
60
  };
58
61
  export {
59
- S as OverlayContent
62
+ A as OverlayContent
60
63
  };