@runlume/admin-ui 0.2.2 → 0.2.3
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.en.md +40 -0
- package/README.md +34 -0
- package/dist-package/components/calendar.cjs +1 -1
- package/dist-package/components/calendar.d.ts.map +1 -1
- package/dist-package/components/calendar.js +1 -1
- package/dist-package/components/charts.cjs +1 -1
- package/dist-package/components/charts.d.ts.map +1 -1
- package/dist-package/components/charts.js +3 -2
- package/dist-package/components/rate.cjs +1 -1
- package/dist-package/components/rate.d.ts.map +1 -1
- package/dist-package/components/rate.js +13 -11
- package/dist-package/components/transfer.cjs +1 -1
- package/dist-package/components/transfer.d.ts.map +1 -1
- package/dist-package/components/transfer.js +2 -1
- package/dist-package/components/ui/alert-dialog.cjs +1 -1
- package/dist-package/components/ui/alert-dialog.d.ts +1 -1
- package/dist-package/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist-package/components/ui/alert-dialog.js +42 -39
- package/dist-package/components/ui/context-menu.cjs +1 -1
- package/dist-package/components/ui/context-menu.d.ts +7 -6
- package/dist-package/components/ui/context-menu.d.ts.map +1 -1
- package/dist-package/components/ui/context-menu.js +28 -24
- package/dist-package/components/ui/dialog.cjs +1 -1
- package/dist-package/components/ui/dialog.d.ts +1 -1
- package/dist-package/components/ui/dialog.d.ts.map +1 -1
- package/dist-package/components/ui/dialog.js +85 -84
- package/dist-package/components/ui/dropdown-menu.cjs +1 -1
- package/dist-package/components/ui/dropdown-menu.d.ts +2 -2
- package/dist-package/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist-package/components/ui/dropdown-menu.js +74 -69
- package/dist-package/components/ui/native-select.cjs +1 -1
- package/dist-package/components/ui/native-select.d.ts.map +1 -1
- package/dist-package/components/ui/native-select.js +73 -70
- package/dist-package/components/ui/scroll-area.cjs +1 -1
- package/dist-package/components/ui/scroll-area.d.ts.map +1 -1
- package/dist-package/components/ui/scroll-area.js +1 -0
- package/dist-package/components/ui/sheet.cjs +1 -1
- package/dist-package/components/ui/sheet.d.ts +1 -1
- package/dist-package/components/ui/sheet.d.ts.map +1 -1
- package/dist-package/components/ui/sheet.js +45 -42
- package/dist-package/lib/overlay-suppression.cjs +1 -0
- package/dist-package/lib/overlay-suppression.d.ts +25 -0
- package/dist-package/lib/overlay-suppression.d.ts.map +1 -0
- package/dist-package/lib/overlay-suppression.js +36 -0
- package/dist-package/styles.css +1 -1
- package/package.json +5 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs");let
|
|
1
|
+
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/overlay-suppression.cjs"),n=require("../../lib/utils.cjs");let r=require("react");r=e.__toESM(r,1);let i=require("radix-ui"),a=require("lucide-react"),o=require("react/jsx-runtime");function s(e,t,n=!1){return r.Children.toArray(e).flatMap(e=>r.isValidElement(e)?e.type===r.Fragment?s(e.props.children,t,n):e.type===`optgroup`||e.type===u?s(e.props.children,e.props.label,e.props.disabled):[{value:String(e.props.value??e.props.children??``),label:e.props.children,disabled:n||e.props.disabled,group:t}]:[])}function c({className:e,size:c=`default`,children:l,value:u,defaultValue:d,onChange:f,ref:p,id:m,name:h,disabled:g,required:_,onInvalid:v,...y}){let b=s(l),x=String(d??b.find(e=>!e.disabled)?.value??``),[S,C]=r.useState(x),w=u===void 0?S:String(u),T=b.findIndex(e=>e.value===w),E=T>=0?T:b.findIndex(e=>!e.disabled),D=b[E]?.value??``,O=r.useRef(u===void 0?x:D);r.useLayoutEffect(()=>{O.current=u===void 0?x:D},[u,x,D]);let k=r.useRef(!1),A=r.useRef(null),j=r.useRef(null),[M,N]=r.useState(!1),P=t.useOverlayBackgroundSuppression(M);r.useImperativeHandle(p,()=>A.current),r.useEffect(()=>{let e=A.current;e.focus=e=>j.current?.focus(e);let t=t=>{k.current=!0,queueMicrotask(()=>{t.defaultPrevented||(C(x),e.value=O.current),k.current=!1})},n=e.form;return n?.addEventListener(`reset`,t,!0),()=>n?.removeEventListener(`reset`,t,!0)},[x]);function F(e){if(k.current||e===``||b[Number(e)]?.value===D)return;let t=A.current,n=b[Number(e)]?.value;n!==void 0&&(Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype,`value`).set.call(t,n),t.dispatchEvent(new Event(`change`,{bubbles:!0})))}return(0,o.jsxs)(`div`,{"data-slot":`native-select-wrapper`,className:`relative w-full min-w-0`,children:[(0,o.jsxs)(i.Select.Root,{value:E<0?``:String(E),onValueChange:F,onOpenChange:N,disabled:g,children:[(0,o.jsxs)(i.Select.Trigger,{value:D,ref:j,id:m,onBlur:()=>A.current?.dispatchEvent(new FocusEvent(`focusout`,{bubbles:!0})),"aria-label":y[`aria-label`],"aria-labelledby":y[`aria-labelledby`],"aria-describedby":y[`aria-describedby`],"aria-invalid":y[`aria-invalid`],"aria-required":_,"data-slot":`select-trigger`,"data-size":c,className:n.cn(`flex h-10 w-full min-w-0 items-center justify-between gap-2 rounded-lg border border-input bg-card px-3.5 text-sm font-normal shadow-none outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/20 disabled:cursor-not-allowed disabled:opacity-50 data-[size=sm]:h-8 aria-invalid:border-destructive [&>span:first-child]:truncate`,e),children:[(0,o.jsx)(`span`,{children:b[E]?.label}),(0,o.jsx)(i.Select.Icon,{children:(0,o.jsx)(a.ChevronDown,{"data-slot":`native-select-icon`,className:`size-4 shrink-0 text-muted-foreground`})})]}),(0,o.jsx)(i.Select.Portal,{children:(0,o.jsxs)(i.Select.Content,{position:`popper`,sideOffset:4,ref:P,"data-slot":`select-content`,className:`z-50 max-h-[min(20rem,var(--radix-select-content-available-height))] min-w-[var(--radix-select-trigger-width)] max-w-[calc(100vw-2rem)] overflow-hidden rounded-lg border bg-popover text-popover-foreground shadow-md`,children:[(0,o.jsx)(i.Select.ScrollUpButton,{className:`flex justify-center py-1`,children:(0,o.jsx)(a.ChevronUp,{className:`size-4`})}),(0,o.jsx)(i.Select.Viewport,{className:`p-1`,children:b.map((e,t)=>(0,o.jsxs)(r.Fragment,{children:[e.group&&b[t-1]?.group!==e.group&&(0,o.jsx)(`div`,{className:`px-3 py-2 text-xs font-medium text-muted-foreground`,children:e.group}),(0,o.jsxs)(i.Select.Item,{value:String(t),"data-value":e.value,disabled:e.disabled,className:`relative flex min-h-9 cursor-default items-center rounded-md py-2 pl-8 pr-3 text-sm outline-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[state=checked]:text-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,children:[(0,o.jsx)(i.Select.ItemIndicator,{className:`absolute left-2`,children:(0,o.jsx)(a.Check,{className:`size-4`})}),(0,o.jsx)(i.Select.ItemText,{children:e.label})]})]},e.value))}),(0,o.jsx)(i.Select.ScrollDownButton,{className:`flex justify-center py-1`,children:(0,o.jsx)(a.ChevronDown,{className:`size-4`})})]})})]}),(0,o.jsx)(`select`,{...y,ref:A,name:h,disabled:g,required:_,value:D,tabIndex:-1,"aria-label":void 0,"aria-labelledby":void 0,"aria-hidden":`true`,className:`sr-only pointer-events-none`,onInvalid:e=>{e.preventDefault(),j.current?.focus(),v?.(e)},onChange:e=>{C(e.target.value),f?.(e)},children:l})]})}function l(e){return(0,o.jsx)(`option`,{...e})}function u(e){return(0,o.jsx)(`optgroup`,{...e})}exports.NativeSelect=c,exports.NativeSelectOptGroup=u,exports.NativeSelectOption=l;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native-select.d.ts","sourceRoot":"","sources":["../../../src/components/ui/native-select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"native-select.d.ts","sourceRoot":"","sources":["../../../src/components/ui/native-select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,KAAK,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC,GAAG;IAAE,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,CAAA;CAAE,CAAA;AA2BpG,qGAAqG;AACrG,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,IAAgB,EAChB,QAAQ,EACR,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,GAAG,EACH,EAAE,EACF,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,qBAiJP;AACD,iBAAS,kBAAkB,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,qBAEhE;AACD,iBAAS,oBAAoB,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,UAAU,CAAC,qBAEpE;AACD,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,CAAA"}
|
|
@@ -1,125 +1,128 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { useOverlayBackgroundSuppression as e } from "../../lib/overlay-suppression.js";
|
|
2
|
+
import { cn as t } from "../../lib/utils.js";
|
|
3
|
+
import * as n from "react";
|
|
4
|
+
import { Select as r } from "radix-ui";
|
|
5
|
+
import { Check as i, ChevronDown as a, ChevronUp as o } from "lucide-react";
|
|
6
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
6
7
|
//#region src/components/ui/native-select.tsx
|
|
7
|
-
function
|
|
8
|
-
return
|
|
8
|
+
function l(e, t, r = !1) {
|
|
9
|
+
return n.Children.toArray(e).flatMap((e) => n.isValidElement(e) ? e.type === n.Fragment ? l(e.props.children, t, r) : e.type === "optgroup" || e.type === f ? l(e.props.children, e.props.label, e.props.disabled) : [{
|
|
9
10
|
value: String(e.props.value ?? e.props.children ?? ""),
|
|
10
11
|
label: e.props.children,
|
|
11
12
|
disabled: r || e.props.disabled,
|
|
12
|
-
group:
|
|
13
|
+
group: t
|
|
13
14
|
}] : []);
|
|
14
15
|
}
|
|
15
|
-
function
|
|
16
|
-
let
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
function u({ className: u, size: d = "default", children: f, value: p, defaultValue: m, onChange: h, ref: g, id: _, name: v, disabled: y, required: b, onInvalid: x, ...S }) {
|
|
17
|
+
let C = l(f), w = String(m ?? C.find((e) => !e.disabled)?.value ?? ""), [T, E] = n.useState(w), D = p === void 0 ? T : String(p), O = C.findIndex((e) => e.value === D), k = O >= 0 ? O : C.findIndex((e) => !e.disabled), A = C[k]?.value ?? "", j = n.useRef(p === void 0 ? w : A);
|
|
18
|
+
n.useLayoutEffect(() => {
|
|
19
|
+
j.current = p === void 0 ? w : A;
|
|
19
20
|
}, [
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
p,
|
|
22
|
+
w,
|
|
23
|
+
A
|
|
23
24
|
]);
|
|
24
|
-
let
|
|
25
|
-
|
|
26
|
-
let e =
|
|
27
|
-
e.focus = (e) =>
|
|
25
|
+
let M = n.useRef(!1), N = n.useRef(null), P = n.useRef(null), [F, I] = n.useState(!1), L = e(F);
|
|
26
|
+
n.useImperativeHandle(g, () => N.current), n.useEffect(() => {
|
|
27
|
+
let e = N.current;
|
|
28
|
+
e.focus = (e) => P.current?.focus(e);
|
|
28
29
|
let t = (t) => {
|
|
29
|
-
|
|
30
|
-
t.defaultPrevented || (
|
|
30
|
+
M.current = !0, queueMicrotask(() => {
|
|
31
|
+
t.defaultPrevented || (E(w), e.value = j.current), M.current = !1;
|
|
31
32
|
});
|
|
32
33
|
}, n = e.form;
|
|
33
34
|
return n?.addEventListener("reset", t, !0), () => n?.removeEventListener("reset", t, !0);
|
|
34
|
-
}, [
|
|
35
|
-
function
|
|
36
|
-
if (
|
|
37
|
-
let t =
|
|
35
|
+
}, [w]);
|
|
36
|
+
function R(e) {
|
|
37
|
+
if (M.current || e === "" || C[Number(e)]?.value === A) return;
|
|
38
|
+
let t = N.current, n = C[Number(e)]?.value;
|
|
38
39
|
n !== void 0 && (Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype, "value").set.call(t, n), t.dispatchEvent(new Event("change", { bubbles: !0 })));
|
|
39
40
|
}
|
|
40
|
-
return /* @__PURE__ */
|
|
41
|
+
return /* @__PURE__ */ c("div", {
|
|
41
42
|
"data-slot": "native-select-wrapper",
|
|
42
43
|
className: "relative w-full min-w-0",
|
|
43
|
-
children: [/* @__PURE__ */
|
|
44
|
-
value:
|
|
45
|
-
onValueChange:
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
"aria-
|
|
54
|
-
"aria-
|
|
55
|
-
"aria-
|
|
56
|
-
"aria-
|
|
44
|
+
children: [/* @__PURE__ */ c(r.Root, {
|
|
45
|
+
value: k < 0 ? "" : String(k),
|
|
46
|
+
onValueChange: R,
|
|
47
|
+
onOpenChange: I,
|
|
48
|
+
disabled: y,
|
|
49
|
+
children: [/* @__PURE__ */ c(r.Trigger, {
|
|
50
|
+
value: A,
|
|
51
|
+
ref: P,
|
|
52
|
+
id: _,
|
|
53
|
+
onBlur: () => N.current?.dispatchEvent(new FocusEvent("focusout", { bubbles: !0 })),
|
|
54
|
+
"aria-label": S["aria-label"],
|
|
55
|
+
"aria-labelledby": S["aria-labelledby"],
|
|
56
|
+
"aria-describedby": S["aria-describedby"],
|
|
57
|
+
"aria-invalid": S["aria-invalid"],
|
|
58
|
+
"aria-required": b,
|
|
57
59
|
"data-slot": "select-trigger",
|
|
58
|
-
"data-size":
|
|
59
|
-
className:
|
|
60
|
-
children: [/* @__PURE__ */
|
|
60
|
+
"data-size": d,
|
|
61
|
+
className: t("flex h-10 w-full min-w-0 items-center justify-between gap-2 rounded-lg border border-input bg-card px-3.5 text-sm font-normal shadow-none outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/20 disabled:cursor-not-allowed disabled:opacity-50 data-[size=sm]:h-8 aria-invalid:border-destructive [&>span:first-child]:truncate", u),
|
|
62
|
+
children: [/* @__PURE__ */ s("span", { children: C[k]?.label }), /* @__PURE__ */ s(r.Icon, { children: /* @__PURE__ */ s(a, {
|
|
61
63
|
"data-slot": "native-select-icon",
|
|
62
64
|
className: "size-4 shrink-0 text-muted-foreground"
|
|
63
65
|
}) })]
|
|
64
|
-
}), /* @__PURE__ */
|
|
66
|
+
}), /* @__PURE__ */ s(r.Portal, { children: /* @__PURE__ */ c(r.Content, {
|
|
65
67
|
position: "popper",
|
|
66
68
|
sideOffset: 4,
|
|
69
|
+
ref: L,
|
|
67
70
|
"data-slot": "select-content",
|
|
68
71
|
className: "z-50 max-h-[min(20rem,var(--radix-select-content-available-height))] min-w-[var(--radix-select-trigger-width)] max-w-[calc(100vw-2rem)] overflow-hidden rounded-lg border bg-popover text-popover-foreground shadow-md",
|
|
69
72
|
children: [
|
|
70
|
-
/* @__PURE__ */
|
|
73
|
+
/* @__PURE__ */ s(r.ScrollUpButton, {
|
|
71
74
|
className: "flex justify-center py-1",
|
|
72
|
-
children: /* @__PURE__ */ o
|
|
75
|
+
children: /* @__PURE__ */ s(o, { className: "size-4" })
|
|
73
76
|
}),
|
|
74
|
-
/* @__PURE__ */
|
|
77
|
+
/* @__PURE__ */ s(r.Viewport, {
|
|
75
78
|
className: "p-1",
|
|
76
|
-
children:
|
|
79
|
+
children: C.map((e, t) => /* @__PURE__ */ c(n.Fragment, { children: [e.group && C[t - 1]?.group !== e.group && /* @__PURE__ */ s("div", {
|
|
77
80
|
className: "px-3 py-2 text-xs font-medium text-muted-foreground",
|
|
78
81
|
children: e.group
|
|
79
|
-
}), /* @__PURE__ */
|
|
80
|
-
value: String(
|
|
82
|
+
}), /* @__PURE__ */ c(r.Item, {
|
|
83
|
+
value: String(t),
|
|
81
84
|
"data-value": e.value,
|
|
82
85
|
disabled: e.disabled,
|
|
83
86
|
className: "relative flex min-h-9 cursor-default items-center rounded-md py-2 pl-8 pr-3 text-sm outline-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[state=checked]:text-primary data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
84
|
-
children: [/* @__PURE__ */
|
|
87
|
+
children: [/* @__PURE__ */ s(r.ItemIndicator, {
|
|
85
88
|
className: "absolute left-2",
|
|
86
|
-
children: /* @__PURE__ */
|
|
87
|
-
}), /* @__PURE__ */
|
|
89
|
+
children: /* @__PURE__ */ s(i, { className: "size-4" })
|
|
90
|
+
}), /* @__PURE__ */ s(r.ItemText, { children: e.label })]
|
|
88
91
|
})] }, e.value))
|
|
89
92
|
}),
|
|
90
|
-
/* @__PURE__ */
|
|
93
|
+
/* @__PURE__ */ s(r.ScrollDownButton, {
|
|
91
94
|
className: "flex justify-center py-1",
|
|
92
|
-
children: /* @__PURE__ */
|
|
95
|
+
children: /* @__PURE__ */ s(a, { className: "size-4" })
|
|
93
96
|
})
|
|
94
97
|
]
|
|
95
98
|
}) })]
|
|
96
|
-
}), /* @__PURE__ */
|
|
97
|
-
...
|
|
98
|
-
ref:
|
|
99
|
-
name:
|
|
100
|
-
disabled:
|
|
101
|
-
required:
|
|
102
|
-
value:
|
|
99
|
+
}), /* @__PURE__ */ s("select", {
|
|
100
|
+
...S,
|
|
101
|
+
ref: N,
|
|
102
|
+
name: v,
|
|
103
|
+
disabled: y,
|
|
104
|
+
required: b,
|
|
105
|
+
value: A,
|
|
103
106
|
tabIndex: -1,
|
|
104
107
|
"aria-label": void 0,
|
|
105
108
|
"aria-labelledby": void 0,
|
|
106
109
|
"aria-hidden": "true",
|
|
107
110
|
className: "sr-only pointer-events-none",
|
|
108
111
|
onInvalid: (e) => {
|
|
109
|
-
e.preventDefault(),
|
|
112
|
+
e.preventDefault(), P.current?.focus(), x?.(e);
|
|
110
113
|
},
|
|
111
114
|
onChange: (e) => {
|
|
112
|
-
|
|
115
|
+
E(e.target.value), h?.(e);
|
|
113
116
|
},
|
|
114
|
-
children:
|
|
117
|
+
children: f
|
|
115
118
|
})]
|
|
116
119
|
});
|
|
117
120
|
}
|
|
118
|
-
function u(e) {
|
|
119
|
-
return /* @__PURE__ */ o("option", { ...e });
|
|
120
|
-
}
|
|
121
121
|
function d(e) {
|
|
122
|
-
return /* @__PURE__ */
|
|
122
|
+
return /* @__PURE__ */ s("option", { ...e });
|
|
123
|
+
}
|
|
124
|
+
function f(e) {
|
|
125
|
+
return /* @__PURE__ */ s("optgroup", { ...e });
|
|
123
126
|
}
|
|
124
127
|
//#endregion
|
|
125
|
-
export {
|
|
128
|
+
export { u as NativeSelect, f as NativeSelectOptGroup, d as NativeSelectOption };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../lib/utils.cjs");let t=require("radix-ui"),n=require("react/jsx-runtime");function r({className:r,children:i,...a}){return(0,n.jsxs)(t.ScrollArea.Root,{"data-slot":`scroll-area`,className:e.cn(`relative overflow-hidden`,r),...a,children:[(0,n.jsx)(t.ScrollArea.Viewport,{className:`size-full rounded-[inherit]`,children:i}),(0,n.jsx)(t.ScrollArea.Scrollbar,{orientation:`vertical`,className:`flex w-2 touch-none select-none p-0.5 transition-colors`,children:(0,n.jsx)(t.ScrollArea.Thumb,{className:`relative flex-1 rounded-full bg-border`})}),(0,n.jsx)(t.ScrollArea.Corner,{})]})}exports.ScrollArea=r;
|
|
1
|
+
const e=require("../../lib/utils.cjs");let t=require("radix-ui"),n=require("react/jsx-runtime");function r({className:r,children:i,...a}){return(0,n.jsxs)(t.ScrollArea.Root,{"data-slot":`scroll-area`,className:e.cn(`relative overflow-hidden`,r),...a,children:[(0,n.jsx)(t.ScrollArea.Viewport,{className:`size-full rounded-[inherit]`,tabIndex:0,children:i}),(0,n.jsx)(t.ScrollArea.Scrollbar,{orientation:`vertical`,className:`flex w-2 touch-none select-none p-0.5 transition-colors`,children:(0,n.jsx)(t.ScrollArea.Thumb,{className:`relative flex-1 rounded-full bg-border`})}),(0,n.jsx)(t.ScrollArea.Corner,{})]})}exports.ScrollArea=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll-area.d.ts","sourceRoot":"","sources":["../../../src/components/ui/scroll-area.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAG5D,6BAA6B;AAC7B,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC,+
|
|
1
|
+
{"version":3,"file":"scroll-area.d.ts","sourceRoot":"","sources":["../../../src/components/ui/scroll-area.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAG5D,6BAA6B;AAC7B,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC,+BAoBvD;AAED,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/
|
|
1
|
+
const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/overlay-suppression.cjs"),n=require("../../lib/utils.cjs"),r=require("../../lib/dialog-focus.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("radix-ui"),o=require("lucide-react"),s=require("react/jsx-runtime");function c({...e}){return(0,s.jsx)(a.Dialog.Root,{"data-slot":`sheet`,...e})}function l({...e}){return(0,s.jsx)(a.Dialog.Trigger,{"data-slot":`sheet-trigger`,...e})}function u({...e}){return(0,s.jsx)(a.Dialog.Close,{"data-slot":`sheet-close`,...e})}function d({...e}){return(0,s.jsx)(a.Dialog.Portal,{"data-slot":`sheet-portal`,...e})}function f({className:e,...t}){return(0,s.jsx)(a.Dialog.Overlay,{"data-slot":`sheet-overlay`,className:n.cn(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function p({className:e,children:c,side:l=`right`,showCloseButton:u=!0,onOpenAutoFocus:p,ref:m,...h}){let g=i.useRef(null),_=t.useOverlayBackgroundSuppression(),v=i.useMemo(()=>t.composeRefs(g,_,m),[_,m]);return(0,s.jsxs)(d,{children:[(0,s.jsx)(f,{}),(0,s.jsxs)(a.Dialog.Content,{"data-slot":`sheet-content`,ref:v,className:n.cn(`fixed z-50 flex flex-col gap-4 bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:animate-in data-[state=open]:duration-500`,l===`right`&&`inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm`,l===`left`&&`inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm`,l===`top`&&`inset-x-0 top-0 h-auto border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top`,l===`bottom`&&`inset-x-0 bottom-0 h-auto border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom`,e),...h,onOpenAutoFocus:e=>{p?.(e),e.defaultPrevented||r.avoidInitialCloseFocus(e)},children:[c,u&&(0,s.jsxs)(a.Dialog.Close,{"data-slot":`sheet-close`,className:`absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-secondary`,children:[(0,s.jsx)(o.XIcon,{className:`size-4`}),(0,s.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function m({className:e,...t}){return(0,s.jsx)(`div`,{"data-slot":`sheet-header`,className:n.cn(`flex flex-col gap-1.5 p-4`,e),...t})}function h({className:e,...t}){return(0,s.jsx)(`div`,{"data-slot":`sheet-footer`,className:n.cn(`mt-auto flex flex-col gap-2 p-4`,e),...t})}function g({className:e,...t}){return(0,s.jsx)(a.Dialog.Title,{"data-slot":`sheet-title`,className:n.cn(`font-semibold text-foreground`,e),...t})}function _({className:e,...t}){return(0,s.jsx)(a.Dialog.Description,{"data-slot":`sheet-description`,className:n.cn(`text-sm text-muted-foreground`,e),...t})}exports.Sheet=c,exports.SheetClose=u,exports.SheetContent=p,exports.SheetDescription=_,exports.SheetFooter=h,exports.SheetHeader=m,exports.SheetTitle=g,exports.SheetTrigger=l;
|
|
@@ -3,7 +3,7 @@ import { Dialog as SheetPrimitive } from 'radix-ui';
|
|
|
3
3
|
declare function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>): React.JSX.Element;
|
|
4
4
|
declare function SheetTrigger({ ...props }: React.ComponentProps<typeof SheetPrimitive.Trigger>): React.JSX.Element;
|
|
5
5
|
declare function SheetClose({ ...props }: React.ComponentProps<typeof SheetPrimitive.Close>): React.JSX.Element;
|
|
6
|
-
declare function SheetContent({ className, children, side, showCloseButton, onOpenAutoFocus, ...props }: React.ComponentProps<typeof SheetPrimitive.Content> & {
|
|
6
|
+
declare function SheetContent({ className, children, side, showCloseButton, onOpenAutoFocus, ref, ...props }: React.ComponentProps<typeof SheetPrimitive.Content> & {
|
|
7
7
|
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
8
8
|
showCloseButton?: boolean;
|
|
9
9
|
}): React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sheet.d.ts","sourceRoot":"","sources":["../../../src/components/ui/sheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"sheet.d.ts","sourceRoot":"","sources":["../../../src/components/ui/sheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,OAAO,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,UAAU,CAAA;AAEnD,iBAAS,KAAK,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,IAAI,CAAC,qBAE5E;AAED,iBAAS,YAAY,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,OAAO,CAAC,qBAEtF;AAED,iBAAS,UAAU,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,KAAK,CAAC,qBAElF;AAsBD,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,QAAQ,EACR,IAAc,EACd,eAAsB,EACtB,eAAe,EACf,GAAG,EACH,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,OAAO,CAAC,GAAG;IACvD,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAA;IAC1C,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,qBAyCA;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQxE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQxE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,KAAK,CAAC,qBAQ7F;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,WAAW,CAAC,qBAQzD;AAED,OAAO,EACL,KAAK,EACL,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,WAAW,EACX,WAAW,EACX,UAAU,EACV,gBAAgB,GACjB,CAAA"}
|
|
@@ -1,86 +1,89 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import "
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { composeRefs as e, useOverlayBackgroundSuppression as t } from "../../lib/overlay-suppression.js";
|
|
2
|
+
import { cn as n } from "../../lib/utils.js";
|
|
3
|
+
import { avoidInitialCloseFocus as r } from "../../lib/dialog-focus.js";
|
|
4
|
+
import * as i from "react";
|
|
5
|
+
import { Dialog as a } from "radix-ui";
|
|
6
|
+
import { XIcon as o } from "lucide-react";
|
|
7
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
7
8
|
//#region src/components/ui/sheet.tsx
|
|
8
|
-
function
|
|
9
|
-
return /* @__PURE__ */
|
|
9
|
+
function l({ ...e }) {
|
|
10
|
+
return /* @__PURE__ */ s(a.Root, {
|
|
10
11
|
"data-slot": "sheet",
|
|
11
12
|
...e
|
|
12
13
|
});
|
|
13
14
|
}
|
|
14
|
-
function
|
|
15
|
-
return /* @__PURE__ */
|
|
15
|
+
function u({ ...e }) {
|
|
16
|
+
return /* @__PURE__ */ s(a.Trigger, {
|
|
16
17
|
"data-slot": "sheet-trigger",
|
|
17
18
|
...e
|
|
18
19
|
});
|
|
19
20
|
}
|
|
20
|
-
function
|
|
21
|
-
return /* @__PURE__ */
|
|
21
|
+
function d({ ...e }) {
|
|
22
|
+
return /* @__PURE__ */ s(a.Close, {
|
|
22
23
|
"data-slot": "sheet-close",
|
|
23
24
|
...e
|
|
24
25
|
});
|
|
25
26
|
}
|
|
26
|
-
function
|
|
27
|
-
return /* @__PURE__ */
|
|
27
|
+
function f({ ...e }) {
|
|
28
|
+
return /* @__PURE__ */ s(a.Portal, {
|
|
28
29
|
"data-slot": "sheet-portal",
|
|
29
30
|
...e
|
|
30
31
|
});
|
|
31
32
|
}
|
|
32
|
-
function
|
|
33
|
-
return /* @__PURE__ */
|
|
33
|
+
function p({ className: e, ...t }) {
|
|
34
|
+
return /* @__PURE__ */ s(a.Overlay, {
|
|
34
35
|
"data-slot": "sheet-overlay",
|
|
35
|
-
className:
|
|
36
|
-
...
|
|
36
|
+
className: n("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0", e),
|
|
37
|
+
...t
|
|
37
38
|
});
|
|
38
39
|
}
|
|
39
|
-
function
|
|
40
|
-
|
|
40
|
+
function m({ className: l, children: u, side: d = "right", showCloseButton: m = !0, onOpenAutoFocus: h, ref: g, ..._ }) {
|
|
41
|
+
let v = i.useRef(null), y = t(), b = i.useMemo(() => e(v, y, g), [y, g]);
|
|
42
|
+
return /* @__PURE__ */ c(f, { children: [/* @__PURE__ */ s(p, {}), /* @__PURE__ */ c(a.Content, {
|
|
41
43
|
"data-slot": "sheet-content",
|
|
42
|
-
|
|
43
|
-
|
|
44
|
+
ref: b,
|
|
45
|
+
className: n("fixed z-50 flex flex-col gap-4 bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:animate-in data-[state=open]:duration-500", d === "right" && "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm", d === "left" && "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm", d === "top" && "inset-x-0 top-0 h-auto border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top", d === "bottom" && "inset-x-0 bottom-0 h-auto border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom", l),
|
|
46
|
+
..._,
|
|
44
47
|
onOpenAutoFocus: (e) => {
|
|
45
|
-
|
|
48
|
+
h?.(e), e.defaultPrevented || r(e);
|
|
46
49
|
},
|
|
47
|
-
children: [
|
|
50
|
+
children: [u, m && /* @__PURE__ */ c(a.Close, {
|
|
48
51
|
"data-slot": "sheet-close",
|
|
49
52
|
className: "absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-secondary",
|
|
50
|
-
children: [/* @__PURE__ */
|
|
53
|
+
children: [/* @__PURE__ */ s(o, { className: "size-4" }), /* @__PURE__ */ s("span", {
|
|
51
54
|
className: "sr-only",
|
|
52
55
|
children: "Close"
|
|
53
56
|
})]
|
|
54
57
|
})]
|
|
55
58
|
})] });
|
|
56
59
|
}
|
|
57
|
-
function
|
|
58
|
-
return /* @__PURE__ */
|
|
60
|
+
function h({ className: e, ...t }) {
|
|
61
|
+
return /* @__PURE__ */ s("div", {
|
|
59
62
|
"data-slot": "sheet-header",
|
|
60
|
-
className:
|
|
61
|
-
...
|
|
63
|
+
className: n("flex flex-col gap-1.5 p-4", e),
|
|
64
|
+
...t
|
|
62
65
|
});
|
|
63
66
|
}
|
|
64
|
-
function
|
|
65
|
-
return /* @__PURE__ */
|
|
67
|
+
function g({ className: e, ...t }) {
|
|
68
|
+
return /* @__PURE__ */ s("div", {
|
|
66
69
|
"data-slot": "sheet-footer",
|
|
67
|
-
className:
|
|
68
|
-
...
|
|
70
|
+
className: n("mt-auto flex flex-col gap-2 p-4", e),
|
|
71
|
+
...t
|
|
69
72
|
});
|
|
70
73
|
}
|
|
71
|
-
function
|
|
72
|
-
return /* @__PURE__ */
|
|
74
|
+
function _({ className: e, ...t }) {
|
|
75
|
+
return /* @__PURE__ */ s(a.Title, {
|
|
73
76
|
"data-slot": "sheet-title",
|
|
74
|
-
className:
|
|
75
|
-
...
|
|
77
|
+
className: n("font-semibold text-foreground", e),
|
|
78
|
+
...t
|
|
76
79
|
});
|
|
77
80
|
}
|
|
78
|
-
function
|
|
79
|
-
return /* @__PURE__ */
|
|
81
|
+
function v({ className: e, ...t }) {
|
|
82
|
+
return /* @__PURE__ */ s(a.Description, {
|
|
80
83
|
"data-slot": "sheet-description",
|
|
81
|
-
className:
|
|
82
|
-
...
|
|
84
|
+
className: n("text-sm text-muted-foreground", e),
|
|
85
|
+
...t
|
|
83
86
|
});
|
|
84
87
|
}
|
|
85
88
|
//#endregion
|
|
86
|
-
export {
|
|
89
|
+
export { l as Sheet, d as SheetClose, m as SheetContent, v as SheetDescription, g as SheetFooter, h as SheetHeader, _ as SheetTitle, u as SheetTrigger };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("../_virtual/_rolldown/runtime.cjs");let t=require("react");t=e.__toESM(t,1);function n(...e){return t=>{for(let n of e)typeof n==`function`?n(t):n&&(n.current=t)}}var r=new WeakMap;function i(e){let t=new Set;for(let n=e;n;n=n.parentElement)t.add(n);let n=[],i=e=>{let t=r.get(e)??{count:0,added:!1};t.count===0&&!e.hasAttribute(`inert`)&&(e.setAttribute(`inert`,``),t.added=!0),t.count+=1,r.set(e,t),n.push(e)},a=n=>{if(n!==e)for(let e of Array.from(n.children))t.has(e)?a(e):i(e)};return a(e.ownerDocument.body),console.debug(`[suppress] start`,e.getAttribute(`data-slot`),n.length),()=>{console.debug(`[suppress] undo`,e.getAttribute(`data-slot`),n.length);for(let e of n){let t=r.get(e);t&&(--t.count,t.count<=0&&(t.added&&e.removeAttribute(`inert`),r.delete(e)))}}}function a(e=!0){let[n,r]=t.useState(null);return t.useEffect(()=>{if(n&&e)return i(n)},[n,e]),t.useCallback(e=>r(e),[])}exports.composeRefs=n,exports.useOverlayBackgroundSuppression=a;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type AnyRef<T> = React.Ref<T> | undefined;
|
|
3
|
+
export declare function composeRefs<T>(...refs: AnyRef<T>[]): (node: T | null) => void;
|
|
4
|
+
/**
|
|
5
|
+
* 模态浮层打开时让背景真正不可交互。
|
|
6
|
+
*
|
|
7
|
+
* Radix 只用 `aria-hidden` 把背景移出无障碍树,背景里的输入框、链接、按钮仍然留在
|
|
8
|
+
* Tab 顺序里:屏幕阅读器看不到、键盘却能走过去,axe 的 `aria-hidden-focus` 也会报错。
|
|
9
|
+
* 原生 `<dialog>.showModal()` 的做法是把背景设为 `inert`,这里补齐同一语义。
|
|
10
|
+
*
|
|
11
|
+
* 只补 `inert`,不改动 Radix 自己写入的 `aria-hidden`;两者范围一致,叠加后背景
|
|
12
|
+
* 既不在无障碍树里、也不在 Tab 顺序里,浮层卸载时按引用计数撤销自己的 `inert`。
|
|
13
|
+
* 仅用于模态浮层;非模态浮层(如 Popover 默认行为)不应使用。
|
|
14
|
+
*
|
|
15
|
+
* 返回的是回调 ref:我们的封装外面还套着 Radix 的 `Presence`,组件挂载时浮层内容
|
|
16
|
+
* 往往还没渲染,必须等内容节点真正出现(以及卸载时置空)才能施加与撤销。
|
|
17
|
+
* 调用方应把它与其它 ref 用 `useMemo` 组合,避免每次渲染重建导致反复摘挂。
|
|
18
|
+
*
|
|
19
|
+
* @param active 浮层是否处于打开态,默认按内容节点挂载/卸载判断。Radix Select 关闭时
|
|
20
|
+
* 只把内容节点移出文档、并不卸载 React 组件(拿不到 ref 置空),必须显式传入打开态,
|
|
21
|
+
* 否则背景会一直停在 `inert` 上,页面再也点不动。
|
|
22
|
+
*/
|
|
23
|
+
export declare function useOverlayBackgroundSuppression<T extends HTMLElement>(active?: boolean): (next: T | null) => void;
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=overlay-suppression.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overlay-suppression.d.ts","sourceRoot":"","sources":["../../src/lib/overlay-suppression.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,KAAK,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,SAAS,CAAA;AAEzC,wBAAgB,WAAW,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,IACzC,MAAM,CAAC,GAAG,IAAI,UAMvB;AA0DD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,+BAA+B,CAAC,CAAC,SAAS,WAAW,EAAE,MAAM,UAAO,UAMlD,CAAC,GAAG,IAAI,UACzC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
//#region src/lib/overlay-suppression.ts
|
|
3
|
+
function t(...e) {
|
|
4
|
+
return (t) => {
|
|
5
|
+
for (let n of e) typeof n == "function" ? n(t) : n && (n.current = t);
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
var n = /* @__PURE__ */ new WeakMap();
|
|
9
|
+
function r(e) {
|
|
10
|
+
let t = /* @__PURE__ */ new Set();
|
|
11
|
+
for (let n = e; n; n = n.parentElement) t.add(n);
|
|
12
|
+
let r = [], i = (e) => {
|
|
13
|
+
let t = n.get(e) ?? {
|
|
14
|
+
count: 0,
|
|
15
|
+
added: !1
|
|
16
|
+
};
|
|
17
|
+
t.count === 0 && !e.hasAttribute("inert") && (e.setAttribute("inert", ""), t.added = !0), t.count += 1, n.set(e, t), r.push(e);
|
|
18
|
+
}, a = (n) => {
|
|
19
|
+
if (n !== e) for (let e of Array.from(n.children)) t.has(e) ? a(e) : i(e);
|
|
20
|
+
};
|
|
21
|
+
return a(e.ownerDocument.body), console.debug("[suppress] start", e.getAttribute("data-slot"), r.length), () => {
|
|
22
|
+
console.debug("[suppress] undo", e.getAttribute("data-slot"), r.length);
|
|
23
|
+
for (let e of r) {
|
|
24
|
+
let t = n.get(e);
|
|
25
|
+
t && (--t.count, t.count <= 0 && (t.added && e.removeAttribute("inert"), n.delete(e)));
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function i(t = !0) {
|
|
30
|
+
let [n, i] = e.useState(null);
|
|
31
|
+
return e.useEffect(() => {
|
|
32
|
+
if (n && t) return r(n);
|
|
33
|
+
}, [n, t]), e.useCallback((e) => i(e), []);
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
export { t as composeRefs, i as useOverlayBackgroundSuppression };
|