@tedi-design-system/react 18.1.0-rc.20 → 18.1.0-rc.22
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/bundle-stats.html +1 -1
- package/external/hoist-non-react-statics/external/react-is/cjs/react-is.development.cjs.js +1 -1
- package/external/hoist-non-react-statics/external/react-is/cjs/react-is.development.es.js +1 -1
- package/external/hoist-non-react-statics/external/react-is/cjs/react-is.production.min.cjs.js +1 -1
- package/external/hoist-non-react-statics/external/react-is/cjs/react-is.production.min.es.js +1 -1
- package/external/hoist-non-react-statics/external/react-is/index.cjs.js +1 -1
- package/external/hoist-non-react-statics/external/react-is/index.es.js +1 -1
- package/external/prop-types/external/react-is/cjs/react-is.development.cjs.js +1 -1
- package/external/prop-types/external/react-is/cjs/react-is.development.es.js +1 -1
- package/external/prop-types/external/react-is/cjs/react-is.production.min.cjs.js +1 -1
- package/external/prop-types/external/react-is/cjs/react-is.production.min.es.js +1 -1
- package/external/prop-types/external/react-is/index.cjs.js +1 -1
- package/external/prop-types/external/react-is/index.es.js +1 -1
- package/package.json +1 -1
- package/src/tedi/components/buttons/button-content/button-content.cjs.js +1 -1
- package/src/tedi/components/buttons/button-content/button-content.es.js +31 -30
- package/src/tedi/components/form/number-field/number-field.cjs.js +1 -1
- package/src/tedi/components/form/number-field/number-field.es.js +117 -112
- package/src/tedi/components/loaders/spinner/spinner.cjs.js +1 -1
- package/src/tedi/components/loaders/spinner/spinner.d.ts +7 -0
- package/src/tedi/components/loaders/spinner/spinner.es.js +29 -18
- package/src/tedi/components/overlays/overlay/overlay-content.cjs.js +1 -1
- package/src/tedi/components/overlays/overlay/overlay-content.es.js +14 -12
- package/src/tedi/components/overlays/overlay/overlay-trigger.cjs.js +1 -1
- package/src/tedi/components/overlays/overlay/overlay-trigger.es.js +16 -16
- package/src/tedi/components/overlays/overlay/overlay.cjs.js +1 -1
- package/src/tedi/components/overlays/overlay/overlay.d.ts +10 -0
- package/src/tedi/components/overlays/overlay/overlay.es.js +74 -71
- package/src/tedi/providers/label-provider/labels-map.cjs.js +1 -1
- package/src/tedi/providers/label-provider/labels-map.d.ts +6 -6
- package/src/tedi/providers/label-provider/labels-map.es.js +9 -9
|
@@ -1,27 +1,38 @@
|
|
|
1
1
|
import { jsxs as m, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import f from "../../../../../external/classnames/index.es.js";
|
|
3
3
|
import e from "./spinner.module.scss.es.js";
|
|
4
|
-
import { useLabels as
|
|
4
|
+
import { useLabels as v } from "../../../providers/label-provider/use-labels.es.js";
|
|
5
5
|
import { useBreakpointProps as u } from "../../../helpers/hooks/use-breakpoint-props.es.js";
|
|
6
|
-
const
|
|
7
|
-
const { getLabel:
|
|
8
|
-
className:
|
|
9
|
-
size:
|
|
10
|
-
color:
|
|
11
|
-
label:
|
|
12
|
-
position: t
|
|
13
|
-
|
|
6
|
+
const y = (s) => {
|
|
7
|
+
const { getLabel: a } = v(), { getCurrentBreakpointProps: l } = u(s.defaultServerBreakpoint), {
|
|
8
|
+
className: p,
|
|
9
|
+
size: n = 16,
|
|
10
|
+
color: o = "primary",
|
|
11
|
+
label: d = a("spinner.loading"),
|
|
12
|
+
position: t,
|
|
13
|
+
decorative: i = !1
|
|
14
|
+
} = l(s), c = f(
|
|
14
15
|
e["tedi-spinner"],
|
|
15
|
-
|
|
16
|
+
p,
|
|
16
17
|
t && e[`tedi-spinner--${t}`],
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
n && e[`tedi-spinner--size-${n}`],
|
|
19
|
+
o && e[`tedi-spinner--color-${o}`]
|
|
20
|
+
);
|
|
21
|
+
return /* @__PURE__ */ m(
|
|
22
|
+
"span",
|
|
23
|
+
{
|
|
24
|
+
className: c,
|
|
25
|
+
role: i ? void 0 : "status",
|
|
26
|
+
"aria-live": i ? void 0 : "polite",
|
|
27
|
+
"aria-hidden": i || void 0,
|
|
28
|
+
"data-testid": "tedi-spinner",
|
|
29
|
+
children: [
|
|
30
|
+
/* @__PURE__ */ r("svg", { viewBox: "22 22 44 44", "aria-hidden": "true", children: /* @__PURE__ */ r("circle", { className: e["tedi-spinner__inner"], cx: "44", cy: "44", r: "20", fill: "none" }) }),
|
|
31
|
+
!i && /* @__PURE__ */ r("span", { className: "sr-only", children: d })
|
|
32
|
+
]
|
|
33
|
+
}
|
|
19
34
|
);
|
|
20
|
-
return /* @__PURE__ */ m("span", { className: c, role: "status", "aria-live": "polite", "data-testid": "tedi-spinner", children: [
|
|
21
|
-
/* @__PURE__ */ r("svg", { viewBox: "22 22 44 44", "aria-hidden": "true", children: /* @__PURE__ */ r("circle", { className: e["tedi-spinner__inner"], cx: "44", cy: "44", r: "20", fill: "none" }) }),
|
|
22
|
-
/* @__PURE__ */ r("span", { className: "sr-only", children: p })
|
|
23
|
-
] });
|
|
24
35
|
};
|
|
25
36
|
export {
|
|
26
|
-
|
|
37
|
+
y as Spinner
|
|
27
38
|
};
|
|
@@ -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"),s=require("react"),
|
|
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"),C=require("./overlay.cjs.js"),E=u=>{const{children:y,classNames:e,labelledBy:f,describedBy:h}=u,{open:l,x:m,y:g,strategy:b,focusManager:o,floating:v,arrowRef:x,getFloatingProps:w,placement:p,context:i,arrow:t,scrollLock:d,contentId:j,role:F,ariaHidden:q}=s.useContext(C.OverlayContext);if(s.useEffect(()=>{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=""))},[l,d]),!l)return null;const a=n.jsxs("div",{...w({ref:v,tabIndex:-1,id:j,"aria-hidden":q||void 0,"aria-labelledby":f,"aria-describedby":h,style:{position:b,left:m,top:g},className:e==null?void 0:e.content}),"data-placement":p,"data-testid":"overlay-content",children:[n.jsx(r.FloatingArrow,{ref:c=>x.current=c,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=E;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { FloatingArrow as
|
|
3
|
-
import { useContext as B, useEffect as
|
|
4
|
-
import { OverlayContext as
|
|
5
|
-
const
|
|
1
|
+
import { jsxs as E, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { FloatingArrow as C, FloatingPortal as H, FloatingFocusManager as j } from "../../../../../external/@floating-ui/react/dist/floating-ui.react.es.js";
|
|
3
|
+
import { useContext as B, useEffect as I } from "react";
|
|
4
|
+
import { OverlayContext as O } from "./overlay.es.js";
|
|
5
|
+
const L = (c) => {
|
|
6
6
|
const { children: s, classNames: e, labelledBy: m, describedBy: f } = c, {
|
|
7
7
|
open: l,
|
|
8
8
|
x: y,
|
|
@@ -17,18 +17,20 @@ const A = (c) => {
|
|
|
17
17
|
arrow: t,
|
|
18
18
|
scrollLock: i,
|
|
19
19
|
contentId: w,
|
|
20
|
-
role: x
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
role: x,
|
|
21
|
+
ariaHidden: F
|
|
22
|
+
} = B(O);
|
|
23
|
+
if (I(() => {
|
|
23
24
|
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
25
|
}, [l, i]), !l) return null;
|
|
25
|
-
const d = /* @__PURE__ */
|
|
26
|
+
const d = /* @__PURE__ */ E(
|
|
26
27
|
"div",
|
|
27
28
|
{
|
|
28
29
|
...b({
|
|
29
30
|
ref: g,
|
|
30
31
|
tabIndex: -1,
|
|
31
32
|
id: w,
|
|
33
|
+
"aria-hidden": F || void 0,
|
|
32
34
|
"aria-labelledby": m,
|
|
33
35
|
"aria-describedby": f,
|
|
34
36
|
style: {
|
|
@@ -42,7 +44,7 @@ const A = (c) => {
|
|
|
42
44
|
"data-testid": "overlay-content",
|
|
43
45
|
children: [
|
|
44
46
|
/* @__PURE__ */ n(
|
|
45
|
-
|
|
47
|
+
C,
|
|
46
48
|
{
|
|
47
49
|
ref: (a) => p.current = a,
|
|
48
50
|
context: r,
|
|
@@ -56,8 +58,8 @@ const A = (c) => {
|
|
|
56
58
|
]
|
|
57
59
|
}
|
|
58
60
|
);
|
|
59
|
-
return /* @__PURE__ */ n(
|
|
61
|
+
return /* @__PURE__ */ n(H, { children: x === "tooltip" ? d : /* @__PURE__ */ n(j, { modal: (o == null ? void 0 : o.modal) || !1, ...o, context: r, children: d }) });
|
|
60
62
|
};
|
|
61
63
|
export {
|
|
62
|
-
|
|
64
|
+
L as OverlayContent
|
|
63
65
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react/jsx-runtime"),b=require("../../../../../external/@floating-ui/react/dist/floating-ui.react.cjs.js"),p=require("../../../../../external/classnames/index.cjs.js"),r=require("react"),x=require("../../base/icon/icon.cjs.js"),q=require("./overlay.cjs.js"),t=require("./overlay.module.scss.cjs.js"),_=require("../../../providers/label-provider/use-labels.cjs.js"),m=s=>{const{children:e,className:l}=s,{getLabel:a}=_.useLabels(),{getReferenceProps:o,reference:c,openWith:d,open:u,role:g,ariaHidden:f,contentId:v}=r.useContext(q.OverlayContext),i=b.useMergeRefs([c,e.ref]),n=g==="tooltip"&&!f?{"aria-describedby":u?v:void 0}:{};return r.isValidElement(e)?r.cloneElement(e,o({ref:i,tabIndex:0,...n,label:e.type===x.Icon?a("tooltip.icon-trigger"):void 0,...e.props})):y.jsx("div",{...o({ref:i,tabIndex:0,className:p.default(t.default["tedi-overlay__trigger"],t.default["tedi-overlay__trigger--text"],{[t.default["tedi-overlay__trigger--click"]]:d==="click"},l),...n}),children:e})};exports.OverlayTrigger=m;
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useMergeRefs as
|
|
3
|
-
import
|
|
4
|
-
import { useContext as
|
|
5
|
-
import { Icon as
|
|
6
|
-
import { OverlayContext as
|
|
1
|
+
import { jsx as g } from "react/jsx-runtime";
|
|
2
|
+
import { useMergeRefs as v } from "../../../../../external/@floating-ui/react/dist/floating-ui.react.es.js";
|
|
3
|
+
import x from "../../../../../external/classnames/index.es.js";
|
|
4
|
+
import { useContext as y, isValidElement as b, cloneElement as _ } from "react";
|
|
5
|
+
import { Icon as u } from "../../base/icon/icon.es.js";
|
|
6
|
+
import { OverlayContext as I } from "./overlay.es.js";
|
|
7
7
|
import r from "./overlay.module.scss.es.js";
|
|
8
|
-
import { useLabels as
|
|
9
|
-
const
|
|
10
|
-
const { children: e, className: n } = s, { getLabel: l } =
|
|
11
|
-
"aria-describedby":
|
|
8
|
+
import { useLabels as N } from "../../../providers/label-provider/use-labels.es.js";
|
|
9
|
+
const j = (s) => {
|
|
10
|
+
const { children: e, className: n } = s, { getLabel: l } = N(), { getReferenceProps: t, reference: a, openWith: c, open: m, role: p, ariaHidden: f, contentId: d } = y(I), o = v([a, e.ref]), i = p === "tooltip" && !f ? {
|
|
11
|
+
"aria-describedby": m ? d : void 0
|
|
12
12
|
} : {};
|
|
13
|
-
return
|
|
13
|
+
return b(e) ? _(
|
|
14
14
|
e,
|
|
15
15
|
t({
|
|
16
16
|
ref: o,
|
|
17
17
|
tabIndex: 0,
|
|
18
18
|
...i,
|
|
19
|
-
label: e.type ===
|
|
19
|
+
label: e.type === u ? l("tooltip.icon-trigger") : void 0,
|
|
20
20
|
...e.props
|
|
21
21
|
})
|
|
22
|
-
) : /* @__PURE__ */
|
|
22
|
+
) : /* @__PURE__ */ g(
|
|
23
23
|
"div",
|
|
24
24
|
{
|
|
25
25
|
...t({
|
|
26
26
|
ref: o,
|
|
27
27
|
tabIndex: 0,
|
|
28
|
-
className:
|
|
28
|
+
className: x(
|
|
29
29
|
r["tedi-overlay__trigger"],
|
|
30
30
|
r["tedi-overlay__trigger--text"],
|
|
31
31
|
{
|
|
32
|
-
[r["tedi-overlay__trigger--click"]]:
|
|
32
|
+
[r["tedi-overlay__trigger--click"]]: c === "click"
|
|
33
33
|
},
|
|
34
34
|
n
|
|
35
35
|
),
|
|
@@ -40,5 +40,5 @@ const R = (s) => {
|
|
|
40
40
|
);
|
|
41
41
|
};
|
|
42
42
|
export {
|
|
43
|
-
|
|
43
|
+
j as OverlayTrigger
|
|
44
44
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const Q=require("react/jsx-runtime"),t=require("../../../../../external/@floating-ui/react/dist/floating-ui.react.cjs.js"),n=require("react"),X=require("./overlay-content.cjs.js"),Y=require("./overlay-trigger.cjs.js"),Z=require("../../../helpers/hooks/use-is-touch-device.cjs.js"),$=require("../../../helpers/hooks/use-is-mounted.cjs.js"),S=require("../../../../../external/@floating-ui/dom/dist/floating-ui.dom.cjs.js"),i=require("../../../../../external/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs.js"),D=3,E=n.createContext({open:!1,onOpenChange:()=>{},isMounted:!1,openWith:"hover",reference:()=>{},floating:()=>{},focusManager:{},arrowRef:{current:null},x:0,y:0,strategy:"absolute",getReferenceProps:()=>({}),getFloatingProps:()=>({}),arrow:{width:0,height:0,x:0,y:0,centerOffset:0},placement:"top",context:{},scrollLock:void 0,contentId:""}),u=H=>{const L=Z.useIsTouchDevice(),{children:W,placement:A="top",openWith:s=L?"click":"hover",defaultOpen:G=!1,open:a,onToggle:r,role:d="tooltip",ariaHidden:f=!1,arrowDimensions:e,offset:V=D+((e==null?void 0:e.height)??0),arrowPadding:z=4,focusManager:g,dismissible:O,scrollLock:M,trackReferencePosition:B=!1}=H,{order:m=["reference","content"],initialFocus:x,modal:p,...C}=g??{},F=x!==void 0?x:p?0:void 0,[P,R]=n.useState(G),h=n.useRef(null),b=$.useIsMounted(),v=n.useMemo(()=>r&&typeof a<"u"?a:P,[r,a,P]),y=n.useCallback(l=>{typeof a>"u"&&R(l),r==null||r(l)},[a,R,r]),{x:q,y:I,refs:c,strategy:w,context:o,middlewareData:k,placement:T}=t.useFloating({placement:A,open:v,onOpenChange:y,middleware:[i.offset(V),i.flip(),i.shift({padding:8}),i.arrow({element:h,padding:z})],whileElementsMounted:B?(l,K,N)=>S.autoUpdate(l,K,N,{animationFrame:!0}):S.autoUpdate}),{getReferenceProps:U,getFloatingProps:_}=t.useInteractions([t.useHover(o,{enabled:s==="hover",handleClose:t.safePolygon()}),t.useClick(o,{toggle:O}),t.useFocus(o,{enabled:s==="hover"}),t.useRole(o,{role:d,enabled:!f}),t.useDismiss(o,{enabled:O,outsidePressEvent:s==="click"?"mousedown":"pointerdown"})]),j=n.useId(),J=n.useMemo(()=>({open:v,onOpenChange:y,isMounted:b,openWith:s,focusManager:g?{order:m,modal:p,initialFocus:F,...C}:void 0,reference:c.setReference,floating:c.setFloating,arrowRef:h,x:q,y:I,strategy:w,getReferenceProps:U,getFloatingProps:_,arrow:{width:e==null?void 0:e.width,height:e==null?void 0:e.height,...k.arrow},context:o,placement:T,scrollLock:M,role:d,ariaHidden:f,contentId:j}),[v,y,b,s,g,c.setReference,c.setFloating,h,q,I,w,U,_,e==null?void 0:e.width,e==null?void 0:e.height,k.arrow,o,T,M,d,f,j,p,m,F,C]);return Q.jsx(E.Provider,{value:J,children:W})};u.Trigger=Y.OverlayTrigger;u.Content=X.OverlayContent;exports.Overlay=u;exports.OverlayContext=E;exports.default=u;
|
|
@@ -46,6 +46,15 @@ export interface OverlayProps {
|
|
|
46
46
|
* @default tooltip
|
|
47
47
|
*/
|
|
48
48
|
role?: UseRoleProps['role'];
|
|
49
|
+
/**
|
|
50
|
+
* Renders the overlay purely visually: no `useRole` aria wiring on the trigger
|
|
51
|
+
* (so no `aria-describedby`) and the content is `aria-hidden`. Use when the
|
|
52
|
+
* trigger already conveys the same text through its accessible name — e.g. an
|
|
53
|
+
* icon-only button whose visible tooltip merely mirrors its label — so screen
|
|
54
|
+
* readers don't announce it twice.
|
|
55
|
+
* @default false
|
|
56
|
+
*/
|
|
57
|
+
ariaHidden?: boolean;
|
|
49
58
|
/**
|
|
50
59
|
* Content overlay arrow dimensions.
|
|
51
60
|
*/
|
|
@@ -108,6 +117,7 @@ export interface OverlayContextType {
|
|
|
108
117
|
context: FloatingContext<ReferenceType>;
|
|
109
118
|
scrollLock?: boolean;
|
|
110
119
|
role?: UseRoleProps['role'];
|
|
120
|
+
ariaHidden?: boolean;
|
|
111
121
|
contentId: string;
|
|
112
122
|
}
|
|
113
123
|
export declare const OverlayContext: import('react').Context<OverlayContextType>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useFloating as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { OverlayContent as
|
|
5
|
-
import { OverlayTrigger as
|
|
6
|
-
import { useIsTouchDevice as
|
|
1
|
+
import { jsx as K } from "react/jsx-runtime";
|
|
2
|
+
import { useFloating as N, useInteractions as Q, useHover as X, safePolygon as Y, useClick as Z, useFocus as _, useRole as $, useDismiss as D } from "../../../../../external/@floating-ui/react/dist/floating-ui.react.es.js";
|
|
3
|
+
import { useState as ee, useRef as te, useMemo as E, useCallback as oe, useId as ne, createContext as re } from "react";
|
|
4
|
+
import { OverlayContent as se } from "./overlay-content.es.js";
|
|
5
|
+
import { OverlayTrigger as ae } from "./overlay-trigger.es.js";
|
|
6
|
+
import { useIsTouchDevice as le } from "../../../helpers/hooks/use-is-touch-device.es.js";
|
|
7
7
|
import { useIsMounted as ce } from "../../../helpers/hooks/use-is-mounted.es.js";
|
|
8
|
-
import { autoUpdate as
|
|
9
|
-
import { offset as
|
|
10
|
-
const
|
|
8
|
+
import { autoUpdate as H } from "../../../../../external/@floating-ui/dom/dist/floating-ui.dom.es.js";
|
|
9
|
+
import { offset as ie, flip as fe, shift as de, arrow as ue } from "../../../../../external/@floating-ui/react-dom/dist/floating-ui.react-dom.es.js";
|
|
10
|
+
const pe = 3, ge = re({
|
|
11
11
|
open: !1,
|
|
12
12
|
onOpenChange: () => {
|
|
13
13
|
},
|
|
@@ -36,121 +36,124 @@ const de = 3, pe = ne({
|
|
|
36
36
|
scrollLock: void 0,
|
|
37
37
|
contentId: ""
|
|
38
38
|
}), L = (W) => {
|
|
39
|
-
const j =
|
|
39
|
+
const j = le(), {
|
|
40
40
|
children: A,
|
|
41
41
|
placement: G = "top",
|
|
42
42
|
openWith: n = j ? "click" : "hover",
|
|
43
|
-
defaultOpen:
|
|
43
|
+
defaultOpen: S = !1,
|
|
44
44
|
open: r,
|
|
45
45
|
onToggle: o,
|
|
46
|
-
role:
|
|
46
|
+
role: l = "tooltip",
|
|
47
|
+
ariaHidden: c = !1,
|
|
47
48
|
arrowDimensions: e,
|
|
48
|
-
offset:
|
|
49
|
-
arrowPadding:
|
|
50
|
-
focusManager:
|
|
51
|
-
dismissible:
|
|
52
|
-
scrollLock:
|
|
53
|
-
trackReferencePosition:
|
|
54
|
-
} = W, { order:
|
|
49
|
+
offset: U = pe + ((e == null ? void 0 : e.height) ?? 0),
|
|
50
|
+
arrowPadding: V = 4,
|
|
51
|
+
focusManager: i,
|
|
52
|
+
dismissible: g,
|
|
53
|
+
scrollLock: h,
|
|
54
|
+
trackReferencePosition: q = !1
|
|
55
|
+
} = W, { order: m = ["reference", "content"], initialFocus: v, modal: f, ...y } = i ?? {}, O = v !== void 0 ? v : f ? 0 : void 0, [x, F] = ee(S), d = te(null), P = ce(), u = E(() => o && typeof r < "u" ? r : x, [o, r, x]), p = oe(
|
|
55
56
|
(a) => {
|
|
56
|
-
typeof r > "u" &&
|
|
57
|
+
typeof r > "u" && F(a), o == null || o(a);
|
|
57
58
|
},
|
|
58
|
-
[r,
|
|
59
|
-
), { x:
|
|
59
|
+
[r, F, o]
|
|
60
|
+
), { x: C, y: M, refs: s, strategy: R, context: t, middlewareData: w, placement: b } = N({
|
|
60
61
|
placement: G,
|
|
61
62
|
open: u,
|
|
62
|
-
onOpenChange:
|
|
63
|
+
onOpenChange: p,
|
|
63
64
|
middleware: [
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
ie(U),
|
|
66
|
+
fe(),
|
|
67
|
+
de({ padding: 8 }),
|
|
67
68
|
ue({
|
|
68
|
-
element:
|
|
69
|
-
padding:
|
|
69
|
+
element: d,
|
|
70
|
+
padding: V
|
|
70
71
|
})
|
|
71
72
|
],
|
|
72
|
-
whileElementsMounted:
|
|
73
|
-
}), { getReferenceProps: k, getFloatingProps: I } =
|
|
74
|
-
|
|
73
|
+
whileElementsMounted: q ? (a, B, J) => H(a, B, J, { animationFrame: !0 }) : H
|
|
74
|
+
}), { getReferenceProps: k, getFloatingProps: I } = Q([
|
|
75
|
+
X(t, {
|
|
75
76
|
enabled: n === "hover",
|
|
76
|
-
handleClose:
|
|
77
|
-
}),
|
|
78
|
-
Y(t, {
|
|
79
|
-
toggle: p
|
|
77
|
+
handleClose: Y()
|
|
80
78
|
}),
|
|
81
79
|
Z(t, {
|
|
80
|
+
toggle: g
|
|
81
|
+
}),
|
|
82
|
+
_(t, {
|
|
82
83
|
enabled: n === "hover"
|
|
83
84
|
}),
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
enabled:
|
|
85
|
+
$(t, { role: l, enabled: !c }),
|
|
86
|
+
D(t, {
|
|
87
|
+
enabled: g,
|
|
87
88
|
outsidePressEvent: n === "click" ? "mousedown" : "pointerdown"
|
|
88
89
|
})
|
|
89
|
-
]),
|
|
90
|
+
]), T = ne(), z = E(
|
|
90
91
|
() => ({
|
|
91
92
|
open: u,
|
|
92
|
-
onOpenChange:
|
|
93
|
-
isMounted:
|
|
93
|
+
onOpenChange: p,
|
|
94
|
+
isMounted: P,
|
|
94
95
|
openWith: n,
|
|
95
|
-
focusManager:
|
|
96
|
-
order:
|
|
97
|
-
modal:
|
|
98
|
-
initialFocus:
|
|
99
|
-
...
|
|
96
|
+
focusManager: i ? {
|
|
97
|
+
order: m,
|
|
98
|
+
modal: f,
|
|
99
|
+
initialFocus: O,
|
|
100
|
+
...y
|
|
100
101
|
} : void 0,
|
|
101
102
|
reference: s.setReference,
|
|
102
103
|
floating: s.setFloating,
|
|
103
|
-
arrowRef:
|
|
104
|
-
x:
|
|
105
|
-
y:
|
|
106
|
-
strategy:
|
|
104
|
+
arrowRef: d,
|
|
105
|
+
x: C,
|
|
106
|
+
y: M,
|
|
107
|
+
strategy: R,
|
|
107
108
|
getReferenceProps: k,
|
|
108
109
|
getFloatingProps: I,
|
|
109
110
|
arrow: {
|
|
110
111
|
width: e == null ? void 0 : e.width,
|
|
111
112
|
height: e == null ? void 0 : e.height,
|
|
112
|
-
...
|
|
113
|
+
...w.arrow
|
|
113
114
|
},
|
|
114
115
|
context: t,
|
|
115
|
-
placement:
|
|
116
|
-
scrollLock:
|
|
117
|
-
role:
|
|
118
|
-
|
|
116
|
+
placement: b,
|
|
117
|
+
scrollLock: h,
|
|
118
|
+
role: l,
|
|
119
|
+
ariaHidden: c,
|
|
120
|
+
contentId: T
|
|
119
121
|
}),
|
|
120
122
|
[
|
|
121
123
|
u,
|
|
122
|
-
|
|
123
|
-
|
|
124
|
+
p,
|
|
125
|
+
P,
|
|
124
126
|
n,
|
|
125
|
-
|
|
127
|
+
i,
|
|
126
128
|
s.setReference,
|
|
127
129
|
s.setFloating,
|
|
128
|
-
|
|
129
|
-
P,
|
|
130
|
+
d,
|
|
130
131
|
C,
|
|
131
132
|
M,
|
|
133
|
+
R,
|
|
132
134
|
k,
|
|
133
135
|
I,
|
|
134
136
|
e == null ? void 0 : e.width,
|
|
135
137
|
e == null ? void 0 : e.height,
|
|
136
|
-
|
|
138
|
+
w.arrow,
|
|
137
139
|
t,
|
|
138
|
-
w,
|
|
139
|
-
g,
|
|
140
|
-
c,
|
|
141
140
|
b,
|
|
142
|
-
i,
|
|
143
141
|
h,
|
|
144
|
-
|
|
145
|
-
|
|
142
|
+
l,
|
|
143
|
+
c,
|
|
144
|
+
T,
|
|
145
|
+
f,
|
|
146
|
+
m,
|
|
147
|
+
O,
|
|
148
|
+
y
|
|
146
149
|
]
|
|
147
150
|
);
|
|
148
|
-
return /* @__PURE__ */
|
|
151
|
+
return /* @__PURE__ */ K(ge.Provider, { value: z, children: A });
|
|
149
152
|
};
|
|
150
|
-
L.Trigger =
|
|
151
|
-
L.Content =
|
|
153
|
+
L.Trigger = ae;
|
|
154
|
+
L.Content = se;
|
|
152
155
|
export {
|
|
153
156
|
L as Overlay,
|
|
154
|
-
|
|
157
|
+
ge as OverlayContext,
|
|
155
158
|
L as default
|
|
156
159
|
};
|