@brightlocal/ui-components 2.19.0 → 2.20.0
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/README.md +1 -1
- package/component-meta.json +8 -2
- package/dist/alert-dialog.cjs +1 -1
- package/dist/alert-dialog.d.ts.map +1 -1
- package/dist/alert-dialog.js +34 -33
- package/dist/blocks/sidebar.cjs +1 -1
- package/dist/blocks/sidebar.d.ts +18 -0
- package/dist/blocks/sidebar.d.ts.map +1 -1
- package/dist/blocks/sidebar.js +84 -74
- package/dist/browser-entry.d.ts +2 -0
- package/dist/browser-entry.d.ts.map +1 -1
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.d.ts.map +1 -1
- package/dist/context-menu.js +47 -46
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.d.ts.map +1 -1
- package/dist/dialog.js +35 -34
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.d.ts.map +1 -1
- package/dist/dropdown-menu.js +48 -47
- package/dist/hooks/use-overlay-pointer-lock.cjs +1 -0
- package/dist/hooks/use-overlay-pointer-lock.d.ts +20 -0
- package/dist/hooks/use-overlay-pointer-lock.d.ts.map +1 -0
- package/dist/hooks/use-overlay-pointer-lock.js +39 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +88 -86
- package/dist/popover.cjs +1 -1
- package/dist/popover.d.ts.map +1 -1
- package/dist/popover.js +21 -20
- package/dist/select.cjs +1 -1
- package/dist/select.d.ts.map +1 -1
- package/dist/select.js +25 -23
- package/dist/separator.cjs +1 -1
- package/dist/separator.d.ts +14 -0
- package/dist/separator.d.ts.map +1 -1
- package/dist/separator.js +90 -44
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.d.ts.map +1 -1
- package/dist/sheet.js +29 -28
- package/package.json +3 -3
- package/src/blocks/sidebar.tsx +35 -8
- package/src/browser-entry.ts +10 -0
- package/src/components/alert-dialog.tsx +20 -14
- package/src/components/context-menu.tsx +19 -13
- package/src/components/dialog.tsx +4 -0
- package/src/components/dropdown-menu.tsx +4 -0
- package/src/components/popover.tsx +22 -16
- package/src/components/select.tsx +4 -0
- package/src/components/separator.tsx +91 -23
- package/src/components/sheet.tsx +4 -0
- package/src/hooks/use-overlay-pointer-lock.ts +128 -0
- package/src/index.ts +1 -0
package/dist/context-menu.js
CHANGED
|
@@ -3,11 +3,12 @@ import * as r from "react";
|
|
|
3
3
|
import * as n from "@radix-ui/react-context-menu";
|
|
4
4
|
import { Check as p, Circle as f, ChevronRight as x } from "@brightlocal/icons";
|
|
5
5
|
import { cn as s } from "@brightlocal/ui-components/lib/utils";
|
|
6
|
-
|
|
6
|
+
import { useOverlayPointerLock as b } from "@brightlocal/ui-components/hooks/use-overlay-pointer-lock";
|
|
7
|
+
function g({ ...e }) {
|
|
7
8
|
return /* @__PURE__ */ t(n.Root, { "data-slot": "context-menu", ...e });
|
|
8
9
|
}
|
|
9
|
-
|
|
10
|
-
const
|
|
10
|
+
g.displayName = "ContextMenu";
|
|
11
|
+
const C = r.forwardRef(({ dataHook: e, ...a }, o) => /* @__PURE__ */ t(
|
|
11
12
|
n.Trigger,
|
|
12
13
|
{
|
|
13
14
|
ref: o,
|
|
@@ -16,20 +17,20 @@ const g = r.forwardRef(({ dataHook: e, ...a }, o) => /* @__PURE__ */ t(
|
|
|
16
17
|
...a
|
|
17
18
|
}
|
|
18
19
|
));
|
|
19
|
-
|
|
20
|
-
function
|
|
20
|
+
C.displayName = "ContextMenuTrigger";
|
|
21
|
+
function h({ ...e }) {
|
|
21
22
|
return /* @__PURE__ */ t(n.Group, { "data-slot": "context-menu-group", ...e });
|
|
22
23
|
}
|
|
23
|
-
|
|
24
|
-
function
|
|
24
|
+
h.displayName = "ContextMenuGroup";
|
|
25
|
+
function M({ ...e }) {
|
|
25
26
|
return /* @__PURE__ */ t(n.Portal, { "data-slot": "context-menu-portal", ...e });
|
|
26
27
|
}
|
|
27
|
-
|
|
28
|
-
function
|
|
28
|
+
M.displayName = "ContextMenuPortal";
|
|
29
|
+
function N({ ...e }) {
|
|
29
30
|
return /* @__PURE__ */ t(n.Sub, { "data-slot": "context-menu-sub", ...e });
|
|
30
31
|
}
|
|
31
|
-
|
|
32
|
-
function
|
|
32
|
+
N.displayName = "ContextMenuSub";
|
|
33
|
+
function y({ ...e }) {
|
|
33
34
|
return /* @__PURE__ */ t(
|
|
34
35
|
n.RadioGroup,
|
|
35
36
|
{
|
|
@@ -38,8 +39,8 @@ function N({ ...e }) {
|
|
|
38
39
|
}
|
|
39
40
|
);
|
|
40
41
|
}
|
|
41
|
-
|
|
42
|
-
const
|
|
42
|
+
y.displayName = "ContextMenuRadioGroup";
|
|
43
|
+
const k = r.forwardRef(
|
|
43
44
|
({
|
|
44
45
|
className: e,
|
|
45
46
|
inset: a,
|
|
@@ -69,8 +70,8 @@ const y = r.forwardRef(
|
|
|
69
70
|
}
|
|
70
71
|
)
|
|
71
72
|
);
|
|
72
|
-
|
|
73
|
-
const
|
|
73
|
+
k.displayName = "ContextMenuSubTrigger";
|
|
74
|
+
const R = r.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ t(
|
|
74
75
|
n.SubContent,
|
|
75
76
|
{
|
|
76
77
|
ref: o,
|
|
@@ -82,8 +83,8 @@ const k = r.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ t(
|
|
|
82
83
|
...a
|
|
83
84
|
}
|
|
84
85
|
));
|
|
85
|
-
|
|
86
|
-
const
|
|
86
|
+
R.displayName = "ContextMenuSubContent";
|
|
87
|
+
const w = r.forwardRef(({ className: e, ...a }, o) => (b(), /* @__PURE__ */ t(n.Portal, { children: /* @__PURE__ */ t(
|
|
87
88
|
n.Content,
|
|
88
89
|
{
|
|
89
90
|
ref: o,
|
|
@@ -94,9 +95,9 @@ const R = r.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ t(n.Portal
|
|
|
94
95
|
"data-slot": "context-menu-content",
|
|
95
96
|
...a
|
|
96
97
|
}
|
|
97
|
-
) }));
|
|
98
|
-
|
|
99
|
-
const
|
|
98
|
+
) })));
|
|
99
|
+
w.displayName = "ContextMenuContent";
|
|
100
|
+
const v = r.forwardRef(
|
|
100
101
|
({ className: e, inset: a, dataHook: o, trackingEl: d, trackingLabel: i, ...l }, c) => /* @__PURE__ */ t(
|
|
101
102
|
n.Item,
|
|
102
103
|
{
|
|
@@ -114,8 +115,8 @@ const w = r.forwardRef(
|
|
|
114
115
|
}
|
|
115
116
|
)
|
|
116
117
|
);
|
|
117
|
-
|
|
118
|
-
const
|
|
118
|
+
v.displayName = "ContextMenuItem";
|
|
119
|
+
const S = r.forwardRef(
|
|
119
120
|
({
|
|
120
121
|
className: e,
|
|
121
122
|
children: a,
|
|
@@ -145,8 +146,8 @@ const v = r.forwardRef(
|
|
|
145
146
|
}
|
|
146
147
|
)
|
|
147
148
|
);
|
|
148
|
-
|
|
149
|
-
const
|
|
149
|
+
S.displayName = "ContextMenuCheckboxItem";
|
|
150
|
+
const I = r.forwardRef(
|
|
150
151
|
({ className: e, children: a, dataHook: o, trackingEl: d, trackingLabel: i, ...l }, c) => /* @__PURE__ */ m(
|
|
151
152
|
n.RadioItem,
|
|
152
153
|
{
|
|
@@ -167,8 +168,8 @@ const S = r.forwardRef(
|
|
|
167
168
|
}
|
|
168
169
|
)
|
|
169
170
|
);
|
|
170
|
-
|
|
171
|
-
const
|
|
171
|
+
I.displayName = "ContextMenuRadioItem";
|
|
172
|
+
const z = r.forwardRef(({ className: e, inset: a, ...o }, d) => /* @__PURE__ */ t(
|
|
172
173
|
n.Label,
|
|
173
174
|
{
|
|
174
175
|
ref: d,
|
|
@@ -181,8 +182,8 @@ const I = r.forwardRef(({ className: e, inset: a, ...o }, d) => /* @__PURE__ */
|
|
|
181
182
|
...o
|
|
182
183
|
}
|
|
183
184
|
));
|
|
184
|
-
|
|
185
|
-
const
|
|
185
|
+
z.displayName = "ContextMenuLabel";
|
|
186
|
+
const G = r.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ t(
|
|
186
187
|
n.Separator,
|
|
187
188
|
{
|
|
188
189
|
ref: o,
|
|
@@ -191,8 +192,8 @@ const z = r.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ t(
|
|
|
191
192
|
...a
|
|
192
193
|
}
|
|
193
194
|
));
|
|
194
|
-
|
|
195
|
-
const
|
|
195
|
+
G.displayName = "ContextMenuSeparator";
|
|
196
|
+
const P = r.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ t(
|
|
196
197
|
"span",
|
|
197
198
|
{
|
|
198
199
|
ref: o,
|
|
@@ -204,21 +205,21 @@ const G = r.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ t(
|
|
|
204
205
|
...a
|
|
205
206
|
}
|
|
206
207
|
));
|
|
207
|
-
|
|
208
|
+
P.displayName = "ContextMenuShortcut";
|
|
208
209
|
export {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
210
|
+
g as ContextMenu,
|
|
211
|
+
S as ContextMenuCheckboxItem,
|
|
212
|
+
w as ContextMenuContent,
|
|
213
|
+
h as ContextMenuGroup,
|
|
214
|
+
v as ContextMenuItem,
|
|
215
|
+
z as ContextMenuLabel,
|
|
216
|
+
M as ContextMenuPortal,
|
|
217
|
+
y as ContextMenuRadioGroup,
|
|
218
|
+
I as ContextMenuRadioItem,
|
|
219
|
+
G as ContextMenuSeparator,
|
|
220
|
+
P as ContextMenuShortcut,
|
|
221
|
+
N as ContextMenuSub,
|
|
222
|
+
R as ContextMenuSubContent,
|
|
223
|
+
k as ContextMenuSubTrigger,
|
|
224
|
+
C as ContextMenuTrigger
|
|
224
225
|
};
|
package/dist/dialog.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),h=require("react"),w=require("@radix-ui/react-dialog"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),h=require("react"),w=require("@radix-ui/react-dialog"),k=require("@brightlocal/icons"),r=require("@brightlocal/ui-components/lib/utils"),O=require("@brightlocal/ui-components/hooks/use-overlay-pointer-lock");function c(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const l=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,l.get?l:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const s=c(h),i=c(w),g=i.Root;g.displayName="Dialog";const f=s.forwardRef(({dataHook:e,...a},t)=>o.jsx(i.Trigger,{ref:t,"data-slot":"dialog-trigger",...e!=null&&{"data-hook":e},...a}));f.displayName="DialogTrigger";function n({...e}){return o.jsx(i.Portal,{...e})}n.displayName="DialogPortal";const u=s.forwardRef(({...e},a)=>o.jsx(i.Close,{ref:a,"data-slot":"dialog-close",...e}));u.displayName="DialogClose";const d=s.forwardRef(({className:e,...a},t)=>o.jsx(i.Overlay,{ref:t,className:r.cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),"data-slot":"dialog-overlay",...a}));d.displayName="DialogOverlay";const m=s.forwardRef(({className:e,children:a,dataHook:t,trackingEl:l,trackingLabel:b,closeLabel:j,...v},N)=>(O.useOverlayPointerLock(),o.jsxs(n,{children:[o.jsx(d,{}),o.jsxs(i.Content,{ref:N,className:r.cn("bg-background text-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 border-card-border fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-8 rounded-xl border p-8 shadow-lg duration-200 sm:max-w-lg",e),"data-hook":t,"data-slot":"dialog-content","data-tracking-el":l,"data-tracking-label":b,...v,children:[a,o.jsxs(i.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-8 right-8 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0",children:[o.jsx(k.X,{}),o.jsx("span",{className:"sr-only",children:j??"Close"})]})]})]})));m.displayName="DialogContent";const p=s.forwardRef(({className:e,...a},t)=>o.jsx("div",{ref:t,className:r.cn("flex flex-col gap-2 text-center sm:text-left",e),"data-slot":"dialog-header",...a}));p.displayName="DialogHeader";const D=s.forwardRef(({className:e,...a},t)=>o.jsx("div",{ref:t,className:r.cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),"data-slot":"dialog-footer",...a}));D.displayName="DialogFooter";const x=s.forwardRef(({className:e,dataHook:a,...t},l)=>o.jsx(i.Title,{ref:l,className:r.cn("text-lg leading-none font-semibold",e),"data-hook":a,"data-slot":"dialog-title",...t}));x.displayName="DialogTitle";const y=s.forwardRef(({className:e,dataHook:a,...t},l)=>o.jsx(i.Description,{ref:l,className:r.cn("text-muted-foreground text-sm",e),"data-hook":a,"data-slot":"dialog-description",...t}));y.displayName="DialogDescription";exports.Dialog=g;exports.DialogClose=u;exports.DialogContent=m;exports.DialogDescription=y;exports.DialogFooter=D;exports.DialogHeader=p;exports.DialogOverlay=d;exports.DialogPortal=n;exports.DialogTitle=x;exports.DialogTrigger=f;
|
package/dist/dialog.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/components/dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAA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CACrD,OAAO,eAAe,CAAC,KAAK,CAC7B;IACC;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,QAAA,MAAM,WAAW,0GAWf,CAAC;AAGH;;GAEG;AACH,UAAU,sBAAuB,SAAQ,KAAK,CAAC,cAAc,CAC3D,OAAO,eAAe,CAAC,WAAW,CACnC;IACC;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,QAAA,MAAM,iBAAiB,kHAWrB,CAAC;AAGH,OAAO,EACL,MAAM,EACN,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,GACd,CAAC;AAEF,YAAY,EACV,kBAAkB,EAClB,sBAAsB,EACtB,gBAAgB,EAChB,kBAAkB,GACnB,CAAC"}
|
package/dist/dialog.js
CHANGED
|
@@ -2,10 +2,11 @@ import { jsx as t, jsxs as d } from "react/jsx-runtime";
|
|
|
2
2
|
import * as i from "react";
|
|
3
3
|
import * as l from "@radix-ui/react-dialog";
|
|
4
4
|
import { X as u } from "@brightlocal/icons";
|
|
5
|
-
import { cn as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
import { cn as r } from "@brightlocal/ui-components/lib/utils";
|
|
6
|
+
import { useOverlayPointerLock as D } from "@brightlocal/ui-components/hooks/use-overlay-pointer-lock";
|
|
7
|
+
const x = l.Root;
|
|
8
|
+
x.displayName = "Dialog";
|
|
9
|
+
const y = i.forwardRef(({ dataHook: a, ...o }, e) => /* @__PURE__ */ t(
|
|
9
10
|
l.Trigger,
|
|
10
11
|
{
|
|
11
12
|
ref: e,
|
|
@@ -14,20 +15,20 @@ const x = i.forwardRef(({ dataHook: a, ...o }, e) => /* @__PURE__ */ t(
|
|
|
14
15
|
...o
|
|
15
16
|
}
|
|
16
17
|
));
|
|
17
|
-
|
|
18
|
+
y.displayName = "DialogTrigger";
|
|
18
19
|
function n({
|
|
19
20
|
...a
|
|
20
21
|
}) {
|
|
21
22
|
return /* @__PURE__ */ t(l.Portal, { ...a });
|
|
22
23
|
}
|
|
23
24
|
n.displayName = "DialogPortal";
|
|
24
|
-
const
|
|
25
|
-
|
|
25
|
+
const N = i.forwardRef(({ ...a }, o) => /* @__PURE__ */ t(l.Close, { ref: o, "data-slot": "dialog-close", ...a }));
|
|
26
|
+
N.displayName = "DialogClose";
|
|
26
27
|
const g = i.forwardRef(({ className: a, ...o }, e) => /* @__PURE__ */ t(
|
|
27
28
|
l.Overlay,
|
|
28
29
|
{
|
|
29
30
|
ref: e,
|
|
30
|
-
className:
|
|
31
|
+
className: r(
|
|
31
32
|
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
32
33
|
a
|
|
33
34
|
),
|
|
@@ -36,28 +37,28 @@ const g = i.forwardRef(({ className: a, ...o }, e) => /* @__PURE__ */ t(
|
|
|
36
37
|
}
|
|
37
38
|
));
|
|
38
39
|
g.displayName = "DialogOverlay";
|
|
39
|
-
const
|
|
40
|
+
const h = i.forwardRef(
|
|
40
41
|
({
|
|
41
42
|
className: a,
|
|
42
43
|
children: o,
|
|
43
44
|
dataHook: e,
|
|
44
|
-
trackingEl:
|
|
45
|
+
trackingEl: s,
|
|
45
46
|
trackingLabel: c,
|
|
46
47
|
closeLabel: f,
|
|
47
48
|
...m
|
|
48
|
-
}, p) => /* @__PURE__ */ d(n, { children: [
|
|
49
|
+
}, p) => (D(), /* @__PURE__ */ d(n, { children: [
|
|
49
50
|
/* @__PURE__ */ t(g, {}),
|
|
50
51
|
/* @__PURE__ */ d(
|
|
51
52
|
l.Content,
|
|
52
53
|
{
|
|
53
54
|
ref: p,
|
|
54
|
-
className:
|
|
55
|
+
className: r(
|
|
55
56
|
"bg-background text-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 border-card-border fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-8 rounded-xl border p-8 shadow-lg duration-200 sm:max-w-lg",
|
|
56
57
|
a
|
|
57
58
|
),
|
|
58
59
|
"data-hook": e,
|
|
59
60
|
"data-slot": "dialog-content",
|
|
60
|
-
"data-tracking-el":
|
|
61
|
+
"data-tracking-el": s,
|
|
61
62
|
"data-tracking-label": c,
|
|
62
63
|
...m,
|
|
63
64
|
children: [
|
|
@@ -69,24 +70,24 @@ const N = i.forwardRef(
|
|
|
69
70
|
]
|
|
70
71
|
}
|
|
71
72
|
)
|
|
72
|
-
] })
|
|
73
|
+
] }))
|
|
73
74
|
);
|
|
74
|
-
|
|
75
|
-
const
|
|
75
|
+
h.displayName = "DialogContent";
|
|
76
|
+
const v = i.forwardRef(({ className: a, ...o }, e) => /* @__PURE__ */ t(
|
|
76
77
|
"div",
|
|
77
78
|
{
|
|
78
79
|
ref: e,
|
|
79
|
-
className:
|
|
80
|
+
className: r("flex flex-col gap-2 text-center sm:text-left", a),
|
|
80
81
|
"data-slot": "dialog-header",
|
|
81
82
|
...o
|
|
82
83
|
}
|
|
83
84
|
));
|
|
84
|
-
|
|
85
|
+
v.displayName = "DialogHeader";
|
|
85
86
|
const b = i.forwardRef(({ className: a, ...o }, e) => /* @__PURE__ */ t(
|
|
86
87
|
"div",
|
|
87
88
|
{
|
|
88
89
|
ref: e,
|
|
89
|
-
className:
|
|
90
|
+
className: r(
|
|
90
91
|
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
|
|
91
92
|
a
|
|
92
93
|
),
|
|
@@ -95,37 +96,37 @@ const b = i.forwardRef(({ className: a, ...o }, e) => /* @__PURE__ */ t(
|
|
|
95
96
|
}
|
|
96
97
|
));
|
|
97
98
|
b.displayName = "DialogFooter";
|
|
98
|
-
const
|
|
99
|
+
const w = i.forwardRef(({ className: a, dataHook: o, ...e }, s) => /* @__PURE__ */ t(
|
|
99
100
|
l.Title,
|
|
100
101
|
{
|
|
101
|
-
ref:
|
|
102
|
-
className:
|
|
102
|
+
ref: s,
|
|
103
|
+
className: r("text-lg leading-none font-semibold", a),
|
|
103
104
|
"data-hook": o,
|
|
104
105
|
"data-slot": "dialog-title",
|
|
105
106
|
...e
|
|
106
107
|
}
|
|
107
108
|
));
|
|
108
|
-
|
|
109
|
-
const
|
|
109
|
+
w.displayName = "DialogTitle";
|
|
110
|
+
const k = i.forwardRef(({ className: a, dataHook: o, ...e }, s) => /* @__PURE__ */ t(
|
|
110
111
|
l.Description,
|
|
111
112
|
{
|
|
112
|
-
ref:
|
|
113
|
-
className:
|
|
113
|
+
ref: s,
|
|
114
|
+
className: r("text-muted-foreground text-sm", a),
|
|
114
115
|
"data-hook": o,
|
|
115
116
|
"data-slot": "dialog-description",
|
|
116
117
|
...e
|
|
117
118
|
}
|
|
118
119
|
));
|
|
119
|
-
|
|
120
|
+
k.displayName = "DialogDescription";
|
|
120
121
|
export {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
122
|
+
x as Dialog,
|
|
123
|
+
N as DialogClose,
|
|
124
|
+
h as DialogContent,
|
|
125
|
+
k as DialogDescription,
|
|
125
126
|
b as DialogFooter,
|
|
126
|
-
|
|
127
|
+
v as DialogHeader,
|
|
127
128
|
g as DialogOverlay,
|
|
128
129
|
n as DialogPortal,
|
|
129
|
-
|
|
130
|
-
|
|
130
|
+
w as DialogTitle,
|
|
131
|
+
y as DialogTrigger
|
|
131
132
|
};
|
package/dist/dropdown-menu.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),P=require("react"),z=require("@radix-ui/react-dropdown-menu"),p=require("@brightlocal/icons"),l=require("@brightlocal/ui-components/lib/utils"),G=require("@brightlocal/ui-components/hooks/use-overlay-pointer-lock");function m(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const u=m(P),r=m(z);function f({...e}){return o.jsx(r.Root,{...e})}f.displayName="DropdownMenu";function g({...e}){return o.jsx(r.Portal,{...e})}g.displayName="DropdownMenuPortal";const w=u.forwardRef(({className:e,dataHook:t,trackingEl:n,trackingLabel:a,...d},s)=>o.jsx(r.Trigger,{ref:s,className:e,"data-slot":"dropdown-menu-trigger","data-tracking-el":n,"data-tracking-label":a,...t!=null&&{"data-hook":t},...d}));w.displayName="DropdownMenuTrigger";const x=u.forwardRef(({className:e,sideOffset:t=4,align:n="start",dataHook:a,trackingEl:d,trackingLabel:s,...i},c)=>(G.useOverlayPointerLock(),o.jsx(r.Portal,{children:o.jsx(r.Content,{ref:c,align:n,className:l.cn(["bg-popover text-popover-foreground","z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem]","origin-(--radix-dropdown-menu-content-transform-origin)","overflow-x-hidden overflow-y-auto","rounded-md border p-1 shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2","data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2","data-[side=top]:slide-in-from-bottom-2"],e),"data-hook":a,"data-slot":"dropdown-menu-content","data-tracking-el":d,"data-tracking-label":s,sideOffset:t,...i})})));x.displayName="DropdownMenuContent";function b({...e}){return o.jsx(r.Group,{...e})}b.displayName="DropdownMenuGroup";const h=u.forwardRef(({className:e,inset:t,dataHook:n,trackingEl:a,trackingLabel:d,...s},i)=>o.jsx(r.Item,{ref:i,className:l.cn(["relative flex cursor-default items-center gap-2 self-stretch select-none","rounded-sm px-2 py-1.5 text-sm leading-normal outline-hidden","[&>span]:overflow-hidden [&>span]:text-ellipsis [&>span]:whitespace-nowrap","focus:bg-accent focus:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","data-[inset]:pl-8","[&_svg]:pointer-events-none [&_svg]:shrink-0"],e),"data-hook":n,"data-inset":t,"data-slot":"dropdown-menu-item","data-tracking-el":a,"data-tracking-label":d,...s}));h.displayName="DropdownMenuItem";const D=u.forwardRef(({className:e,children:t,checked:n,dataHook:a,trackingEl:d,trackingLabel:s,...i},c)=>o.jsxs(r.CheckboxItem,{ref:c,checked:n,className:l.cn(["relative flex cursor-default items-center gap-2 select-none","rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden","focus:bg-accent focus:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","[&_svg]:pointer-events-none [&_svg]:shrink-0"],e),"data-hook":a,"data-slot":"dropdown-menu-checkbox-item","data-tracking-el":d,"data-tracking-label":s,...i,children:[o.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:o.jsx(r.ItemIndicator,{children:o.jsx(p.Check,{})})}),t]}));D.displayName="DropdownMenuCheckboxItem";function M({...e}){return o.jsx(r.RadioGroup,{...e})}M.displayName="DropdownMenuRadioGroup";const v=u.forwardRef(({className:e,children:t,dataHook:n,trackingEl:a,trackingLabel:d,...s},i)=>o.jsxs(r.RadioItem,{ref:i,className:l.cn(["relative flex cursor-default items-center gap-2 select-none","rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden","focus:bg-accent focus:text-accent-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","[&_svg]:pointer-events-none [&_svg]:shrink-0"],e),"data-hook":n,"data-slot":"dropdown-menu-radio-item","data-tracking-el":a,"data-tracking-label":d,...s,children:[o.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:o.jsx(r.ItemIndicator,{children:o.jsx(p.Circle,{className:"fill-current",size:8})})}),t]}));v.displayName="DropdownMenuRadioItem";const y=u.forwardRef(({className:e,inset:t,dataHook:n,...a},d)=>o.jsx(r.Label,{ref:d,className:l.cn(["px-2 py-1.5 text-sm leading-normal font-semibold","data-[inset]:pl-8"],e),"data-hook":n,"data-inset":t,"data-slot":"dropdown-menu-label",...a}));y.displayName="DropdownMenuLabel";const j=u.forwardRef(({className:e,...t},n)=>o.jsx(r.Separator,{ref:n,className:l.cn(["bg-border -mx-1 my-1 h-px"],e),"data-slot":"dropdown-menu-separator",...t}));j.displayName="DropdownMenuSeparator";function N({className:e,...t}){return o.jsx("span",{className:l.cn(["text-popover-foreground ml-auto text-xs leading-normal opacity-60"],e),"data-slot":"dropdown-menu-shortcut",...t})}N.displayName="DropdownMenuShortcut";function k({...e}){return o.jsx(r.Sub,{...e})}k.displayName="DropdownMenuSub";const R=u.forwardRef(({className:e,inset:t,children:n,dataHook:a,trackingEl:d,trackingLabel:s,...i},c)=>o.jsxs(r.SubTrigger,{ref:c,className:l.cn(["flex cursor-default items-center gap-2 select-none","rounded-sm px-2 py-1.5 text-sm outline-hidden","focus:bg-accent focus:text-accent-foreground","data-[state=open]:bg-accent data-[state=open]:text-accent-foreground","data-[inset]:pl-8","[&_svg]:pointer-events-none [&_svg]:shrink-0"],e),"data-hook":a,"data-inset":t,"data-slot":"dropdown-menu-sub-trigger","data-tracking-el":d,"data-tracking-label":s,...i,children:[n,o.jsx(p.ChevronRight,{className:"ml-auto"})]}));R.displayName="DropdownMenuSubTrigger";const S=u.forwardRef(({className:e,...t},n)=>o.jsx(r.SubContent,{ref:n,className:l.cn(["bg-popover text-popover-foreground","z-50 min-w-[8rem]","origin-(--radix-dropdown-menu-content-transform-origin)","overflow-hidden rounded-md border p-1 shadow-lg","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2","data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2","data-[side=top]:slide-in-from-bottom-2"],e),"data-slot":"dropdown-menu-sub-content",...t}));S.displayName="DropdownMenuSubContent";const C=u.forwardRef(({className:e,dataHook:t,trackingEl:n,trackingLabel:a,avatar:d,title:s,description:i,disabled:c,ariaLabel:I,...T},_)=>o.jsxs(r.Trigger,{ref:_,"aria-label":I??s,className:l.cn(["flex items-center gap-2 rounded-lg border px-3 py-2","bg-popover shadow-sm","outline-none","hover:bg-accent","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","disabled:pointer-events-none disabled:opacity-50"],e),"data-hook":t,"data-slot":"dropdown-menu-trigger-avatar","data-tracking-el":n,"data-tracking-label":a,disabled:c,...T,children:[d,o.jsxs("div",{className:"flex min-w-0 flex-1 flex-col items-start",children:[o.jsx("span",{className:"w-full overflow-hidden text-sm leading-normal font-semibold text-ellipsis whitespace-nowrap",children:s}),i&&o.jsx("span",{className:"text-muted-foreground w-full overflow-hidden text-xs leading-normal text-ellipsis whitespace-nowrap",children:i})]}),o.jsx(p.ChevronsUpDown,{className:"text-muted-foreground opacity-50"})]}));C.displayName="DropdownMenuTriggerAvatar";exports.DropdownMenu=f;exports.DropdownMenuCheckboxItem=D;exports.DropdownMenuContent=x;exports.DropdownMenuGroup=b;exports.DropdownMenuItem=h;exports.DropdownMenuLabel=y;exports.DropdownMenuPortal=g;exports.DropdownMenuRadioGroup=M;exports.DropdownMenuRadioItem=v;exports.DropdownMenuSeparator=j;exports.DropdownMenuShortcut=N;exports.DropdownMenuSub=k;exports.DropdownMenuSubContent=S;exports.DropdownMenuSubTrigger=R;exports.DropdownMenuTrigger=w;exports.DropdownMenuTriggerAvatar=C;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-menu.d.ts","sourceRoot":"","sources":["../../src/components/dropdown-men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tB,sBAAsB,EACtB,mBAAmB,EACnB,yBAAyB,GAC1B,CAAC;AAEF,YAAY,EACV,wBAAwB,EACxB,wBAAwB,EACxB,qBAAqB,EACrB,6BAA6B,EAC7B,0BAA0B,EAC1B,sBAAsB,EACtB,2BAA2B,EAC3B,8BAA8B,GAC/B,CAAC"}
|
package/dist/dropdown-menu.js
CHANGED
|
@@ -3,19 +3,20 @@ import * as l from "react";
|
|
|
3
3
|
import * as n from "@radix-ui/react-dropdown-menu";
|
|
4
4
|
import { Check as w, Circle as b, ChevronRight as h, ChevronsUpDown as x } from "@brightlocal/icons";
|
|
5
5
|
import { cn as p } from "@brightlocal/ui-components/lib/utils";
|
|
6
|
-
|
|
6
|
+
import { useOverlayPointerLock as v } from "@brightlocal/ui-components/hooks/use-overlay-pointer-lock";
|
|
7
|
+
function D({
|
|
7
8
|
...e
|
|
8
9
|
}) {
|
|
9
10
|
return /* @__PURE__ */ t(n.Root, { ...e });
|
|
10
11
|
}
|
|
11
|
-
|
|
12
|
-
function
|
|
12
|
+
D.displayName = "DropdownMenu";
|
|
13
|
+
function N({
|
|
13
14
|
...e
|
|
14
15
|
}) {
|
|
15
16
|
return /* @__PURE__ */ t(n.Portal, { ...e });
|
|
16
17
|
}
|
|
17
|
-
|
|
18
|
-
const
|
|
18
|
+
N.displayName = "DropdownMenuPortal";
|
|
19
|
+
const y = l.forwardRef(({ className: e, dataHook: o, trackingEl: a, trackingLabel: r, ...d }, s) => /* @__PURE__ */ t(
|
|
19
20
|
n.Trigger,
|
|
20
21
|
{
|
|
21
22
|
ref: s,
|
|
@@ -27,7 +28,7 @@ const N = l.forwardRef(({ className: e, dataHook: o, trackingEl: a, trackingLabe
|
|
|
27
28
|
...d
|
|
28
29
|
}
|
|
29
30
|
));
|
|
30
|
-
|
|
31
|
+
y.displayName = "DropdownMenuTrigger";
|
|
31
32
|
const M = l.forwardRef(
|
|
32
33
|
({
|
|
33
34
|
className: e,
|
|
@@ -37,7 +38,7 @@ const M = l.forwardRef(
|
|
|
37
38
|
trackingEl: d,
|
|
38
39
|
trackingLabel: s,
|
|
39
40
|
...i
|
|
40
|
-
}, u) => /* @__PURE__ */ t(n.Portal, { children: /* @__PURE__ */ t(
|
|
41
|
+
}, u) => (v(), /* @__PURE__ */ t(n.Portal, { children: /* @__PURE__ */ t(
|
|
41
42
|
n.Content,
|
|
42
43
|
{
|
|
43
44
|
ref: u,
|
|
@@ -67,16 +68,16 @@ const M = l.forwardRef(
|
|
|
67
68
|
sideOffset: o,
|
|
68
69
|
...i
|
|
69
70
|
}
|
|
70
|
-
) })
|
|
71
|
+
) }))
|
|
71
72
|
);
|
|
72
73
|
M.displayName = "DropdownMenuContent";
|
|
73
|
-
function
|
|
74
|
+
function k({
|
|
74
75
|
...e
|
|
75
76
|
}) {
|
|
76
77
|
return /* @__PURE__ */ t(n.Group, { ...e });
|
|
77
78
|
}
|
|
78
|
-
|
|
79
|
-
const
|
|
79
|
+
k.displayName = "DropdownMenuGroup";
|
|
80
|
+
const R = l.forwardRef(
|
|
80
81
|
({ className: e, inset: o, dataHook: a, trackingEl: r, trackingLabel: d, ...s }, i) => /* @__PURE__ */ t(
|
|
81
82
|
n.Item,
|
|
82
83
|
{
|
|
@@ -105,8 +106,8 @@ const k = l.forwardRef(
|
|
|
105
106
|
}
|
|
106
107
|
)
|
|
107
108
|
);
|
|
108
|
-
|
|
109
|
-
const
|
|
109
|
+
R.displayName = "DropdownMenuItem";
|
|
110
|
+
const S = l.forwardRef(
|
|
110
111
|
({
|
|
111
112
|
className: e,
|
|
112
113
|
children: o,
|
|
@@ -143,14 +144,14 @@ const R = l.forwardRef(
|
|
|
143
144
|
}
|
|
144
145
|
)
|
|
145
146
|
);
|
|
146
|
-
|
|
147
|
-
function
|
|
147
|
+
S.displayName = "DropdownMenuCheckboxItem";
|
|
148
|
+
function C({
|
|
148
149
|
...e
|
|
149
150
|
}) {
|
|
150
151
|
return /* @__PURE__ */ t(n.RadioGroup, { ...e });
|
|
151
152
|
}
|
|
152
|
-
|
|
153
|
-
const
|
|
153
|
+
C.displayName = "DropdownMenuRadioGroup";
|
|
154
|
+
const I = l.forwardRef(
|
|
154
155
|
({ className: e, children: o, dataHook: a, trackingEl: r, trackingLabel: d, ...s }, i) => /* @__PURE__ */ c(
|
|
155
156
|
n.RadioItem,
|
|
156
157
|
{
|
|
@@ -178,8 +179,8 @@ const C = l.forwardRef(
|
|
|
178
179
|
}
|
|
179
180
|
)
|
|
180
181
|
);
|
|
181
|
-
|
|
182
|
-
const
|
|
182
|
+
I.displayName = "DropdownMenuRadioItem";
|
|
183
|
+
const z = l.forwardRef(({ className: e, inset: o, dataHook: a, ...r }, d) => /* @__PURE__ */ t(
|
|
183
184
|
n.Label,
|
|
184
185
|
{
|
|
185
186
|
ref: d,
|
|
@@ -196,8 +197,8 @@ const I = l.forwardRef(({ className: e, inset: o, dataHook: a, ...r }, d) => /*
|
|
|
196
197
|
...r
|
|
197
198
|
}
|
|
198
199
|
));
|
|
199
|
-
|
|
200
|
-
const
|
|
200
|
+
z.displayName = "DropdownMenuLabel";
|
|
201
|
+
const T = l.forwardRef(({ className: e, ...o }, a) => /* @__PURE__ */ t(
|
|
201
202
|
n.Separator,
|
|
202
203
|
{
|
|
203
204
|
ref: a,
|
|
@@ -206,8 +207,8 @@ const z = l.forwardRef(({ className: e, ...o }, a) => /* @__PURE__ */ t(
|
|
|
206
207
|
...o
|
|
207
208
|
}
|
|
208
209
|
));
|
|
209
|
-
|
|
210
|
-
function
|
|
210
|
+
T.displayName = "DropdownMenuSeparator";
|
|
211
|
+
function _({
|
|
211
212
|
className: e,
|
|
212
213
|
...o
|
|
213
214
|
}) {
|
|
@@ -223,14 +224,14 @@ function T({
|
|
|
223
224
|
}
|
|
224
225
|
);
|
|
225
226
|
}
|
|
226
|
-
|
|
227
|
-
function
|
|
227
|
+
_.displayName = "DropdownMenuShortcut";
|
|
228
|
+
function G({
|
|
228
229
|
...e
|
|
229
230
|
}) {
|
|
230
231
|
return /* @__PURE__ */ t(n.Sub, { ...e });
|
|
231
232
|
}
|
|
232
|
-
|
|
233
|
-
const
|
|
233
|
+
G.displayName = "DropdownMenuSub";
|
|
234
|
+
const P = l.forwardRef(
|
|
234
235
|
({
|
|
235
236
|
className: e,
|
|
236
237
|
inset: o,
|
|
@@ -268,8 +269,8 @@ const G = l.forwardRef(
|
|
|
268
269
|
}
|
|
269
270
|
)
|
|
270
271
|
);
|
|
271
|
-
|
|
272
|
-
const
|
|
272
|
+
P.displayName = "DropdownMenuSubTrigger";
|
|
273
|
+
const j = l.forwardRef(({ className: e, ...o }, a) => /* @__PURE__ */ t(
|
|
273
274
|
n.SubContent,
|
|
274
275
|
{
|
|
275
276
|
ref: a,
|
|
@@ -294,8 +295,8 @@ const P = l.forwardRef(({ className: e, ...o }, a) => /* @__PURE__ */ t(
|
|
|
294
295
|
...o
|
|
295
296
|
}
|
|
296
297
|
));
|
|
297
|
-
|
|
298
|
-
const
|
|
298
|
+
j.displayName = "DropdownMenuSubContent";
|
|
299
|
+
const L = l.forwardRef(
|
|
299
300
|
({
|
|
300
301
|
className: e,
|
|
301
302
|
dataHook: o,
|
|
@@ -340,22 +341,22 @@ const j = l.forwardRef(
|
|
|
340
341
|
}
|
|
341
342
|
)
|
|
342
343
|
);
|
|
343
|
-
|
|
344
|
+
L.displayName = "DropdownMenuTriggerAvatar";
|
|
344
345
|
export {
|
|
345
|
-
|
|
346
|
-
|
|
346
|
+
D as DropdownMenu,
|
|
347
|
+
S as DropdownMenuCheckboxItem,
|
|
347
348
|
M as DropdownMenuContent,
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
349
|
+
k as DropdownMenuGroup,
|
|
350
|
+
R as DropdownMenuItem,
|
|
351
|
+
z as DropdownMenuLabel,
|
|
352
|
+
N as DropdownMenuPortal,
|
|
353
|
+
C as DropdownMenuRadioGroup,
|
|
354
|
+
I as DropdownMenuRadioItem,
|
|
355
|
+
T as DropdownMenuSeparator,
|
|
356
|
+
_ as DropdownMenuShortcut,
|
|
357
|
+
G as DropdownMenuSub,
|
|
358
|
+
j as DropdownMenuSubContent,
|
|
359
|
+
P as DropdownMenuSubTrigger,
|
|
360
|
+
y as DropdownMenuTrigger,
|
|
361
|
+
L as DropdownMenuTriggerAvatar
|
|
361
362
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react");function d(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const u=d(i),l=['[data-slot="dialog-content"][data-state="open"]','[data-slot="alert-dialog-content"][data-state="open"]','[data-slot="sheet-content"][data-state="open"]','[data-slot="dropdown-menu-content"][data-state="open"]','[data-slot="dropdown-menu-sub-content"][data-state="open"]','[data-slot="context-menu-content"][data-state="open"]','[data-slot="context-menu-sub-content"][data-state="open"]','[data-slot="popover-content"][data-state="open"]','[data-slot="select-content"][data-state="open"]','[role="dialog"][data-state="open"]','[role="alertdialog"][data-state="open"]','[role="menu"][data-state="open"]','[role="listbox"][data-state="open"]'].join(",");let r=!1;function n(){typeof document>"u"||document.body.style.pointerEvents==="none"&&document.querySelector(l)===null&&(document.body.style.pointerEvents="")}function c(){typeof requestAnimationFrame=="function"?requestAnimationFrame(n):typeof setTimeout=="function"&&setTimeout(n,0)}function s(){typeof document>"u"||document.visibilityState==="visible"&&n()}function f(){r||typeof document>"u"||(r=!0,document.addEventListener("visibilitychange",s),window.addEventListener("pageshow",s),typeof MutationObserver<"u"&&new MutationObserver(n).observe(document.body,{attributes:!0,attributeFilter:["style"]}))}function p(){u.useEffect(()=>(f(),c),[])}exports.useOverlayPointerLock=p;
|