fina-react-ds 1.0.21 → 1.0.23
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/dist/components/alert-dialog.d.ts +1 -1
- package/dist/components/alert-dialog.js +65 -59
- package/dist/components/avatar.d.ts +1 -1
- package/dist/components/avatar.js +19 -19
- package/dist/components/badge.js +12 -11
- package/dist/components/button.js +12 -11
- package/dist/components/checkbox.d.ts +1 -1
- package/dist/components/checkbox.js +17 -17
- package/dist/components/dialog.d.ts +1 -1
- package/dist/components/dialog.js +60 -60
- package/dist/components/dropdown-menu.d.ts +1 -1
- package/dist/components/dropdown-menu.js +93 -93
- package/dist/components/form.d.ts +2 -3
- package/dist/components/form.js +2 -2
- package/dist/components/hover-card.d.ts +1 -1
- package/dist/components/hover-card.js +23 -23
- package/dist/components/label.d.ts +1 -1
- package/dist/components/label.js +12 -12
- package/dist/components/popover.d.ts +1 -1
- package/dist/components/popover.js +28 -28
- package/dist/components/separator.d.ts +1 -1
- package/dist/components/separator.js +10 -10
- package/dist/components/sheet.d.ts +1 -1
- package/dist/components/sheet.js +73 -73
- package/dist/components/sidebar.js +73 -69
- package/dist/components/switch.d.ts +1 -1
- package/dist/components/switch.js +13 -13
- package/dist/components/tabs.d.ts +1 -1
- package/dist/components/tabs.js +22 -22
- package/dist/components/tooltip.d.ts +1 -1
- package/dist/components/tooltip.js +27 -27
- package/dist/index.d.ts +6 -3
- package/dist/index.js +190 -172
- package/dist/lib/http.d.ts +13 -0
- package/dist/lib/http.js +59 -0
- package/dist/lib/utils.d.ts +15 -1
- package/dist/lib/utils.js +29 -9
- package/dist/lib/yup.d.ts +2 -0
- package/dist/lib/yup.js +88 -0
- package/package.json +6 -3
- package/dist/_virtual/index.js +0 -5
- package/dist/_virtual/index2.js +0 -4
- package/dist/_virtual/use-sync-external-store-shim.development.js +0 -4
- package/dist/_virtual/use-sync-external-store-shim.production.js +0 -4
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +0 -534
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +0 -430
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +0 -215
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -159
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +0 -149
- package/dist/node_modules/@radix-ui/primitive/dist/index.js +0 -12
- package/dist/node_modules/@radix-ui/react-alert-dialog/dist/index.js +0 -130
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.js +0 -24
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.js +0 -80
- package/dist/node_modules/@radix-ui/react-checkbox/dist/index.js +0 -258
- package/dist/node_modules/@radix-ui/react-collection/dist/index.js +0 -51
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +0 -34
- package/dist/node_modules/@radix-ui/react-context/dist/index.js +0 -76
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +0 -265
- package/dist/node_modules/@radix-ui/react-direction/dist/index.js +0 -12
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +0 -133
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +0 -230
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +0 -21
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +0 -149
- package/dist/node_modules/@radix-ui/react-hover-card/dist/index.js +0 -192
- package/dist/node_modules/@radix-ui/react-id/dist/index.js +0 -16
- package/dist/node_modules/@radix-ui/react-label/dist/index.js +0 -22
- package/dist/node_modules/@radix-ui/react-menu/dist/index.js +0 -663
- package/dist/node_modules/@radix-ui/react-popover/dist/index.js +0 -247
- package/dist/node_modules/@radix-ui/react-popper/dist/index.js +0 -224
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js +0 -16
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js +0 -77
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +0 -39
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js +0 -189
- package/dist/node_modules/@radix-ui/react-separator/dist/index.js +0 -27
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +0 -67
- package/dist/node_modules/@radix-ui/react-switch/dist/index.js +0 -136
- package/dist/node_modules/@radix-ui/react-tabs/dist/index.js +0 -168
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.js +0 -348
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +0 -16
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +0 -59
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +0 -17
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +0 -19
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +0 -6
- package/dist/node_modules/@radix-ui/react-use-previous/dist/index.js +0 -11
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.js +0 -30
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.js +0 -32
- package/dist/node_modules/aria-hidden/dist/es2015/index.js +0 -54
- package/dist/node_modules/get-nonce/dist/es2015/index.js +0 -9
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +0 -11
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +0 -116
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +0 -33
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +0 -18
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +0 -70
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +0 -5
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +0 -7
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +0 -73
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +0 -7
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +0 -27
- package/dist/node_modules/react-style-singleton/dist/es2015/component.js +0 -13
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +0 -17
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +0 -35
- package/dist/node_modules/tslib/tslib.es6.js +0 -31
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +0 -9
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +0 -29
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +0 -28
- package/dist/node_modules/use-sidecar/dist/es2015/exports.js +0 -21
- package/dist/node_modules/use-sidecar/dist/es2015/medium.js +0 -72
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +0 -73
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +0 -62
- package/dist/node_modules/use-sync-external-store/shim/index.js +0 -13
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
var U = Object.defineProperty;
|
|
2
|
-
var l = (t, e) => U(t, "name", { value: e, configurable: !0 });
|
|
3
|
-
import * as r from "react";
|
|
4
|
-
import { composeEventHandlers as y } from "../../primitive/dist/index.js";
|
|
5
|
-
import { Primitive as R, dispatchDiscreteCustomEvent as z } from "../../react-primitive/dist/index.js";
|
|
6
|
-
import { useComposedRefs as w } from "../../react-compose-refs/dist/index.js";
|
|
7
|
-
import { useCallbackRef as T } from "../../react-use-callback-ref/dist/index.js";
|
|
8
|
-
import { useEscapeKeydown as H } from "../../react-use-escape-keydown/dist/index.js";
|
|
9
|
-
import { jsx as B } from "react/jsx-runtime";
|
|
10
|
-
var M = "DismissableLayer", p = "dismissableLayer.update", j = "dismissableLayer.pointerDownOutside", X = "dismissableLayer.focusOutside", O, x = r.createContext({
|
|
11
|
-
layers: /* @__PURE__ */ new Set(),
|
|
12
|
-
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
13
|
-
branches: /* @__PURE__ */ new Set()
|
|
14
|
-
}), Y = r.forwardRef(
|
|
15
|
-
(t, e) => {
|
|
16
|
-
const {
|
|
17
|
-
disableOutsidePointerEvents: i = !1,
|
|
18
|
-
onEscapeKeyDown: o,
|
|
19
|
-
onPointerDownOutside: s,
|
|
20
|
-
onFocusOutside: a,
|
|
21
|
-
onInteractOutside: f,
|
|
22
|
-
onDismiss: d,
|
|
23
|
-
...E
|
|
24
|
-
} = t, c = r.useContext(x), [u, F] = r.useState(null), v = (u == null ? void 0 : u.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, W] = r.useState({}), A = w(e, (n) => F(n)), b = Array.from(c.layers), [N] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), I = b.indexOf(N), P = u ? b.indexOf(u) : -1, _ = c.layersWithOutsidePointerEventsDisabled.size > 0, D = P >= I, k = J((n) => {
|
|
25
|
-
const h = n.target, L = [...c.branches].some((m) => m.contains(h));
|
|
26
|
-
!D || L || (s == null || s(n), f == null || f(n), n.defaultPrevented || d == null || d());
|
|
27
|
-
}, v), C = K((n) => {
|
|
28
|
-
const h = n.target;
|
|
29
|
-
[...c.branches].some((m) => m.contains(h)) || (a == null || a(n), f == null || f(n), n.defaultPrevented || d == null || d());
|
|
30
|
-
}, v);
|
|
31
|
-
return H((n) => {
|
|
32
|
-
P === c.layers.size - 1 && (o == null || o(n), !n.defaultPrevented && d && (n.preventDefault(), d()));
|
|
33
|
-
}, v), r.useEffect(() => {
|
|
34
|
-
if (u)
|
|
35
|
-
return i && (c.layersWithOutsidePointerEventsDisabled.size === 0 && (O = v.body.style.pointerEvents, v.body.style.pointerEvents = "none"), c.layersWithOutsidePointerEventsDisabled.add(u)), c.layers.add(u), g(), () => {
|
|
36
|
-
i && c.layersWithOutsidePointerEventsDisabled.size === 1 && (v.body.style.pointerEvents = O);
|
|
37
|
-
};
|
|
38
|
-
}, [u, v, i, c]), r.useEffect(() => () => {
|
|
39
|
-
u && (c.layers.delete(u), c.layersWithOutsidePointerEventsDisabled.delete(u), g());
|
|
40
|
-
}, [u, c]), r.useEffect(() => {
|
|
41
|
-
const n = /* @__PURE__ */ l(() => W({}), "handleUpdate");
|
|
42
|
-
return document.addEventListener(p, n), () => document.removeEventListener(p, n);
|
|
43
|
-
}, []), /* @__PURE__ */ B(
|
|
44
|
-
R.div,
|
|
45
|
-
{
|
|
46
|
-
...E,
|
|
47
|
-
ref: A,
|
|
48
|
-
style: {
|
|
49
|
-
pointerEvents: _ ? D ? "auto" : "none" : void 0,
|
|
50
|
-
...t.style
|
|
51
|
-
},
|
|
52
|
-
onFocusCapture: y(t.onFocusCapture, C.onFocusCapture),
|
|
53
|
-
onBlurCapture: y(t.onBlurCapture, C.onBlurCapture),
|
|
54
|
-
onPointerDownCapture: y(
|
|
55
|
-
t.onPointerDownCapture,
|
|
56
|
-
k.onPointerDownCapture
|
|
57
|
-
)
|
|
58
|
-
}
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
);
|
|
62
|
-
Y.displayName = M;
|
|
63
|
-
var q = "DismissableLayerBranch", G = r.forwardRef((t, e) => {
|
|
64
|
-
const i = r.useContext(x), o = r.useRef(null), s = w(e, o);
|
|
65
|
-
return r.useEffect(() => {
|
|
66
|
-
const a = o.current;
|
|
67
|
-
if (a)
|
|
68
|
-
return i.branches.add(a), () => {
|
|
69
|
-
i.branches.delete(a);
|
|
70
|
-
};
|
|
71
|
-
}, [i.branches]), /* @__PURE__ */ B(R.div, { ...t, ref: s });
|
|
72
|
-
});
|
|
73
|
-
G.displayName = q;
|
|
74
|
-
function J(t, e = globalThis == null ? void 0 : globalThis.document) {
|
|
75
|
-
const i = T(t), o = r.useRef(!1), s = r.useRef(() => {
|
|
76
|
-
});
|
|
77
|
-
return r.useEffect(() => {
|
|
78
|
-
const a = /* @__PURE__ */ l((d) => {
|
|
79
|
-
if (d.target && !o.current) {
|
|
80
|
-
let E = /* @__PURE__ */ l(function() {
|
|
81
|
-
S(
|
|
82
|
-
j,
|
|
83
|
-
i,
|
|
84
|
-
c,
|
|
85
|
-
{ discrete: !0 }
|
|
86
|
-
);
|
|
87
|
-
}, "handleAndDispatchPointerDownOutsideEvent2");
|
|
88
|
-
const c = { originalEvent: d };
|
|
89
|
-
d.pointerType === "touch" ? (e.removeEventListener("click", s.current), s.current = E, e.addEventListener("click", s.current, { once: !0 })) : E();
|
|
90
|
-
} else
|
|
91
|
-
e.removeEventListener("click", s.current);
|
|
92
|
-
o.current = !1;
|
|
93
|
-
}, "handlePointerDown"), f = window.setTimeout(() => {
|
|
94
|
-
e.addEventListener("pointerdown", a);
|
|
95
|
-
}, 0);
|
|
96
|
-
return () => {
|
|
97
|
-
window.clearTimeout(f), e.removeEventListener("pointerdown", a), e.removeEventListener("click", s.current);
|
|
98
|
-
};
|
|
99
|
-
}, [e, i]), {
|
|
100
|
-
// ensures we check React component tree (not just DOM tree)
|
|
101
|
-
onPointerDownCapture: /* @__PURE__ */ l(() => o.current = !0, "onPointerDownCapture")
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
l(J, "usePointerDownOutside");
|
|
105
|
-
function K(t, e = globalThis == null ? void 0 : globalThis.document) {
|
|
106
|
-
const i = T(t), o = r.useRef(!1);
|
|
107
|
-
return r.useEffect(() => {
|
|
108
|
-
const s = /* @__PURE__ */ l((a) => {
|
|
109
|
-
a.target && !o.current && S(X, i, { originalEvent: a }, {
|
|
110
|
-
discrete: !1
|
|
111
|
-
});
|
|
112
|
-
}, "handleFocus");
|
|
113
|
-
return e.addEventListener("focusin", s), () => e.removeEventListener("focusin", s);
|
|
114
|
-
}, [e, i]), {
|
|
115
|
-
onFocusCapture: /* @__PURE__ */ l(() => o.current = !0, "onFocusCapture"),
|
|
116
|
-
onBlurCapture: /* @__PURE__ */ l(() => o.current = !1, "onBlurCapture")
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
l(K, "useFocusOutside");
|
|
120
|
-
function g() {
|
|
121
|
-
const t = new CustomEvent(p);
|
|
122
|
-
document.dispatchEvent(t);
|
|
123
|
-
}
|
|
124
|
-
l(g, "dispatchUpdate");
|
|
125
|
-
function S(t, e, i, { discrete: o }) {
|
|
126
|
-
const s = i.originalEvent.target, a = new CustomEvent(t, { bubbles: !1, cancelable: !0, detail: i });
|
|
127
|
-
e && s.addEventListener(t, e, { once: !0 }), o ? z(s, a) : s.dispatchEvent(a);
|
|
128
|
-
}
|
|
129
|
-
l(S, "handleAndDispatchCustomEvent");
|
|
130
|
-
export {
|
|
131
|
-
Y as DismissableLayer,
|
|
132
|
-
G as DismissableLayerBranch
|
|
133
|
-
};
|
|
@@ -1,230 +0,0 @@
|
|
|
1
|
-
var U = Object.defineProperty;
|
|
2
|
-
var m = (o, e) => U(o, "name", { value: e, configurable: !0 });
|
|
3
|
-
import * as u from "react";
|
|
4
|
-
import { composeEventHandlers as f } from "../../primitive/dist/index.js";
|
|
5
|
-
import { composeRefs as B } from "../../react-compose-refs/dist/index.js";
|
|
6
|
-
import { createContextScope as F } from "../../react-context/dist/index.js";
|
|
7
|
-
import { useControllableState as D } from "../../react-use-controllable-state/dist/index.js";
|
|
8
|
-
import { Primitive as H } from "../../react-primitive/dist/index.js";
|
|
9
|
-
import { createMenuScope as _, Root as W, Portal as $, Anchor as j, Content as X, Group as q, Label as z, Item as J, CheckboxItem as Q, ItemIndicator as V, RadioGroup as Y, RadioItem as Z, Separator as oo, Sub as eo, SubTrigger as ro, SubContent as no, Arrow as ao } from "../../react-menu/dist/index.js";
|
|
10
|
-
import { useId as g } from "../../react-id/dist/index.js";
|
|
11
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
12
|
-
var M = "DropdownMenu", [to, Eo] = F(
|
|
13
|
-
M,
|
|
14
|
-
[_]
|
|
15
|
-
), i = _(), [po, h] = to(M), R = /* @__PURE__ */ m((o) => {
|
|
16
|
-
const {
|
|
17
|
-
__scopeDropdownMenu: e,
|
|
18
|
-
children: n,
|
|
19
|
-
dir: r,
|
|
20
|
-
open: a,
|
|
21
|
-
defaultOpen: d,
|
|
22
|
-
onOpenChange: c,
|
|
23
|
-
modal: p = !0
|
|
24
|
-
} = o, s = i(e), v = u.useRef(null), [l, w] = D({
|
|
25
|
-
prop: a,
|
|
26
|
-
defaultProp: d ?? !1,
|
|
27
|
-
onChange: c,
|
|
28
|
-
caller: M
|
|
29
|
-
});
|
|
30
|
-
return /* @__PURE__ */ t(
|
|
31
|
-
po,
|
|
32
|
-
{
|
|
33
|
-
scope: e,
|
|
34
|
-
triggerId: g(),
|
|
35
|
-
triggerRef: v,
|
|
36
|
-
contentId: g(),
|
|
37
|
-
open: l,
|
|
38
|
-
onOpenChange: w,
|
|
39
|
-
onOpenToggle: u.useCallback(() => w((K) => !K), [w]),
|
|
40
|
-
modal: p,
|
|
41
|
-
children: /* @__PURE__ */ t(W, { ...s, open: l, onOpenChange: w, dir: r, modal: p, children: n })
|
|
42
|
-
}
|
|
43
|
-
);
|
|
44
|
-
}, "DropdownMenu");
|
|
45
|
-
R.displayName = M;
|
|
46
|
-
var b = "DropdownMenuTrigger", I = u.forwardRef(
|
|
47
|
-
(o, e) => {
|
|
48
|
-
const { __scopeDropdownMenu: n, disabled: r = !1, ...a } = o, d = h(b, n), c = i(n);
|
|
49
|
-
return /* @__PURE__ */ t(j, { asChild: !0, ...c, children: /* @__PURE__ */ t(
|
|
50
|
-
H.button,
|
|
51
|
-
{
|
|
52
|
-
type: "button",
|
|
53
|
-
id: d.triggerId,
|
|
54
|
-
"aria-haspopup": "menu",
|
|
55
|
-
"aria-expanded": d.open,
|
|
56
|
-
"aria-controls": d.open ? d.contentId : void 0,
|
|
57
|
-
"data-state": d.open ? "open" : "closed",
|
|
58
|
-
"data-disabled": r ? "" : void 0,
|
|
59
|
-
disabled: r,
|
|
60
|
-
...a,
|
|
61
|
-
ref: B(e, d.triggerRef),
|
|
62
|
-
onPointerDown: f(o.onPointerDown, (p) => {
|
|
63
|
-
!r && p.button === 0 && p.ctrlKey === !1 && (d.onOpenToggle(), d.open || p.preventDefault());
|
|
64
|
-
}),
|
|
65
|
-
onKeyDown: f(o.onKeyDown, (p) => {
|
|
66
|
-
r || (["Enter", " "].includes(p.key) && d.onOpenToggle(), p.key === "ArrowDown" && d.onOpenChange(!0), ["Enter", " ", "ArrowDown"].includes(p.key) && p.preventDefault());
|
|
67
|
-
})
|
|
68
|
-
}
|
|
69
|
-
) });
|
|
70
|
-
}
|
|
71
|
-
);
|
|
72
|
-
I.displayName = b;
|
|
73
|
-
var uo = "DropdownMenuPortal", S = /* @__PURE__ */ m((o) => {
|
|
74
|
-
const { __scopeDropdownMenu: e, ...n } = o, r = i(e);
|
|
75
|
-
return /* @__PURE__ */ t($, { ...r, ...n });
|
|
76
|
-
}, "DropdownMenuPortal");
|
|
77
|
-
S.displayName = uo;
|
|
78
|
-
var C = "DropdownMenuContent", N = u.forwardRef(
|
|
79
|
-
(o, e) => {
|
|
80
|
-
const { __scopeDropdownMenu: n, ...r } = o, a = h(C, n), d = i(n), c = u.useRef(!1);
|
|
81
|
-
return /* @__PURE__ */ t(
|
|
82
|
-
X,
|
|
83
|
-
{
|
|
84
|
-
id: a.contentId,
|
|
85
|
-
"aria-labelledby": a.triggerId,
|
|
86
|
-
...d,
|
|
87
|
-
...r,
|
|
88
|
-
ref: e,
|
|
89
|
-
onCloseAutoFocus: f(o.onCloseAutoFocus, (p) => {
|
|
90
|
-
var s;
|
|
91
|
-
c.current || (s = a.triggerRef.current) == null || s.focus(), c.current = !1, p.preventDefault();
|
|
92
|
-
}),
|
|
93
|
-
onInteractOutside: f(o.onInteractOutside, (p) => {
|
|
94
|
-
const s = p.detail.originalEvent, v = s.button === 0 && s.ctrlKey === !0, l = s.button === 2 || v;
|
|
95
|
-
(!a.modal || l) && (c.current = !0);
|
|
96
|
-
}),
|
|
97
|
-
style: {
|
|
98
|
-
...o.style,
|
|
99
|
-
"--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
100
|
-
"--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
|
|
101
|
-
"--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
|
|
102
|
-
"--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
|
|
103
|
-
"--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
);
|
|
107
|
-
}
|
|
108
|
-
);
|
|
109
|
-
N.displayName = C;
|
|
110
|
-
var io = "DropdownMenuGroup", x = u.forwardRef(
|
|
111
|
-
(o, e) => {
|
|
112
|
-
const { __scopeDropdownMenu: n, ...r } = o, a = i(n);
|
|
113
|
-
return /* @__PURE__ */ t(q, { ...a, ...r, ref: e });
|
|
114
|
-
}
|
|
115
|
-
);
|
|
116
|
-
x.displayName = io;
|
|
117
|
-
var so = "DropdownMenuLabel", A = u.forwardRef(
|
|
118
|
-
(o, e) => {
|
|
119
|
-
const { __scopeDropdownMenu: n, ...r } = o, a = i(n);
|
|
120
|
-
return /* @__PURE__ */ t(z, { ...a, ...r, ref: e });
|
|
121
|
-
}
|
|
122
|
-
);
|
|
123
|
-
A.displayName = so;
|
|
124
|
-
var co = "DropdownMenuItem", P = u.forwardRef(
|
|
125
|
-
(o, e) => {
|
|
126
|
-
const { __scopeDropdownMenu: n, ...r } = o, a = i(n);
|
|
127
|
-
return /* @__PURE__ */ t(J, { ...a, ...r, ref: e });
|
|
128
|
-
}
|
|
129
|
-
);
|
|
130
|
-
P.displayName = co;
|
|
131
|
-
var lo = "DropdownMenuCheckboxItem", E = u.forwardRef((o, e) => {
|
|
132
|
-
const { __scopeDropdownMenu: n, ...r } = o, a = i(n);
|
|
133
|
-
return /* @__PURE__ */ t(Q, { ...a, ...r, ref: e });
|
|
134
|
-
});
|
|
135
|
-
E.displayName = lo;
|
|
136
|
-
var wo = "DropdownMenuRadioGroup", O = u.forwardRef((o, e) => {
|
|
137
|
-
const { __scopeDropdownMenu: n, ...r } = o, a = i(n);
|
|
138
|
-
return /* @__PURE__ */ t(Y, { ...a, ...r, ref: e });
|
|
139
|
-
});
|
|
140
|
-
O.displayName = wo;
|
|
141
|
-
var mo = "DropdownMenuRadioItem", y = u.forwardRef((o, e) => {
|
|
142
|
-
const { __scopeDropdownMenu: n, ...r } = o, a = i(n);
|
|
143
|
-
return /* @__PURE__ */ t(Z, { ...a, ...r, ref: e });
|
|
144
|
-
});
|
|
145
|
-
y.displayName = mo;
|
|
146
|
-
var fo = "DropdownMenuItemIndicator", T = u.forwardRef((o, e) => {
|
|
147
|
-
const { __scopeDropdownMenu: n, ...r } = o, a = i(n);
|
|
148
|
-
return /* @__PURE__ */ t(V, { ...a, ...r, ref: e });
|
|
149
|
-
});
|
|
150
|
-
T.displayName = fo;
|
|
151
|
-
var Mo = "DropdownMenuSeparator", G = u.forwardRef((o, e) => {
|
|
152
|
-
const { __scopeDropdownMenu: n, ...r } = o, a = i(n);
|
|
153
|
-
return /* @__PURE__ */ t(oo, { ...a, ...r, ref: e });
|
|
154
|
-
});
|
|
155
|
-
G.displayName = Mo;
|
|
156
|
-
var vo = "DropdownMenuArrow", go = u.forwardRef(
|
|
157
|
-
(o, e) => {
|
|
158
|
-
const { __scopeDropdownMenu: n, ...r } = o, a = i(n);
|
|
159
|
-
return /* @__PURE__ */ t(ao, { ...a, ...r, ref: e });
|
|
160
|
-
}
|
|
161
|
-
);
|
|
162
|
-
go.displayName = vo;
|
|
163
|
-
var Do = /* @__PURE__ */ m((o) => {
|
|
164
|
-
const { __scopeDropdownMenu: e, children: n, open: r, onOpenChange: a, defaultOpen: d } = o, c = i(e), [p, s] = D({
|
|
165
|
-
prop: r,
|
|
166
|
-
defaultProp: d ?? !1,
|
|
167
|
-
onChange: a,
|
|
168
|
-
caller: "DropdownMenuSub"
|
|
169
|
-
});
|
|
170
|
-
return /* @__PURE__ */ t(eo, { ...c, open: p, onOpenChange: s, children: n });
|
|
171
|
-
}, "DropdownMenuSub"), _o = "DropdownMenuSubTrigger", k = u.forwardRef((o, e) => {
|
|
172
|
-
const { __scopeDropdownMenu: n, ...r } = o, a = i(n);
|
|
173
|
-
return /* @__PURE__ */ t(ro, { ...a, ...r, ref: e });
|
|
174
|
-
});
|
|
175
|
-
k.displayName = _o;
|
|
176
|
-
var ho = "DropdownMenuSubContent", L = u.forwardRef((o, e) => {
|
|
177
|
-
const { __scopeDropdownMenu: n, ...r } = o, a = i(n);
|
|
178
|
-
return /* @__PURE__ */ t(
|
|
179
|
-
no,
|
|
180
|
-
{
|
|
181
|
-
...a,
|
|
182
|
-
...r,
|
|
183
|
-
ref: e,
|
|
184
|
-
style: {
|
|
185
|
-
...o.style,
|
|
186
|
-
"--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
187
|
-
"--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
|
|
188
|
-
"--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
|
|
189
|
-
"--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
|
|
190
|
-
"--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
);
|
|
194
|
-
});
|
|
195
|
-
L.displayName = ho;
|
|
196
|
-
var Oo = R, yo = I, To = S, Go = N, ko = x, Lo = A, Ko = P, Uo = E, Bo = O, Fo = y, Ho = T, Wo = G, $o = Do, jo = k, Xo = L;
|
|
197
|
-
export {
|
|
198
|
-
Uo as CheckboxItem,
|
|
199
|
-
Go as Content,
|
|
200
|
-
R as DropdownMenu,
|
|
201
|
-
go as DropdownMenuArrow,
|
|
202
|
-
E as DropdownMenuCheckboxItem,
|
|
203
|
-
N as DropdownMenuContent,
|
|
204
|
-
x as DropdownMenuGroup,
|
|
205
|
-
P as DropdownMenuItem,
|
|
206
|
-
T as DropdownMenuItemIndicator,
|
|
207
|
-
A as DropdownMenuLabel,
|
|
208
|
-
S as DropdownMenuPortal,
|
|
209
|
-
O as DropdownMenuRadioGroup,
|
|
210
|
-
y as DropdownMenuRadioItem,
|
|
211
|
-
G as DropdownMenuSeparator,
|
|
212
|
-
Do as DropdownMenuSub,
|
|
213
|
-
L as DropdownMenuSubContent,
|
|
214
|
-
k as DropdownMenuSubTrigger,
|
|
215
|
-
I as DropdownMenuTrigger,
|
|
216
|
-
ko as Group,
|
|
217
|
-
Ko as Item,
|
|
218
|
-
Ho as ItemIndicator,
|
|
219
|
-
Lo as Label,
|
|
220
|
-
To as Portal,
|
|
221
|
-
Bo as RadioGroup,
|
|
222
|
-
Fo as RadioItem,
|
|
223
|
-
Oo as Root,
|
|
224
|
-
Wo as Separator,
|
|
225
|
-
$o as Sub,
|
|
226
|
-
Xo as SubContent,
|
|
227
|
-
jo as SubTrigger,
|
|
228
|
-
yo as Trigger,
|
|
229
|
-
Eo as createDropdownMenuScope
|
|
230
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
var a = Object.defineProperty;
|
|
2
|
-
var n = (e, t) => a(e, "name", { value: t, configurable: !0 });
|
|
3
|
-
import * as u from "react";
|
|
4
|
-
var o = 0;
|
|
5
|
-
function d() {
|
|
6
|
-
u.useEffect(() => {
|
|
7
|
-
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
8
|
-
return document.body.insertAdjacentElement("afterbegin", e[0] ?? r()), document.body.insertAdjacentElement("beforeend", e[1] ?? r()), o++, () => {
|
|
9
|
-
o === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), o--;
|
|
10
|
-
};
|
|
11
|
-
}, []);
|
|
12
|
-
}
|
|
13
|
-
n(d, "useFocusGuards");
|
|
14
|
-
function r() {
|
|
15
|
-
const e = document.createElement("span");
|
|
16
|
-
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
|
|
17
|
-
}
|
|
18
|
-
n(r, "createFocusGuard");
|
|
19
|
-
export {
|
|
20
|
-
d as useFocusGuards
|
|
21
|
-
};
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
var M = Object.defineProperty;
|
|
2
|
-
var r = (e, t) => M(e, "name", { value: t, configurable: !0 });
|
|
3
|
-
import * as l from "react";
|
|
4
|
-
import { useComposedRefs as _ } from "../../react-compose-refs/dist/index.js";
|
|
5
|
-
import { Primitive as K } from "../../react-primitive/dist/index.js";
|
|
6
|
-
import { useCallbackRef as N } from "../../react-use-callback-ref/dist/index.js";
|
|
7
|
-
import { jsx as k } from "react/jsx-runtime";
|
|
8
|
-
var T = "focusScope.autoFocusOnMount", h = "focusScope.autoFocusOnUnmount", O = { bubbles: !1, cancelable: !0 }, w = "FocusScope", x = l.forwardRef((e, t) => {
|
|
9
|
-
const {
|
|
10
|
-
loop: n = !1,
|
|
11
|
-
trapped: u = !1,
|
|
12
|
-
onMountAutoFocus: E,
|
|
13
|
-
onUnmountAutoFocus: g,
|
|
14
|
-
...U
|
|
15
|
-
} = e, [o, A] = l.useState(null), v = N(E), b = N(g), F = l.useRef(null), P = _(t, (s) => A(s)), f = l.useRef({
|
|
16
|
-
paused: !1,
|
|
17
|
-
pause() {
|
|
18
|
-
this.paused = !0;
|
|
19
|
-
},
|
|
20
|
-
resume() {
|
|
21
|
-
this.paused = !1;
|
|
22
|
-
}
|
|
23
|
-
}).current;
|
|
24
|
-
l.useEffect(() => {
|
|
25
|
-
if (u) {
|
|
26
|
-
let s = /* @__PURE__ */ r(function(a) {
|
|
27
|
-
if (f.paused || !o) return;
|
|
28
|
-
const i = a.target;
|
|
29
|
-
o.contains(i) ? F.current = i : d(F.current, { select: !0 });
|
|
30
|
-
}, "handleFocusIn2"), m = /* @__PURE__ */ r(function(a) {
|
|
31
|
-
if (f.paused || !o) return;
|
|
32
|
-
const i = a.relatedTarget;
|
|
33
|
-
i !== null && (o.contains(i) || d(F.current, { select: !0 }));
|
|
34
|
-
}, "handleFocusOut2"), c = /* @__PURE__ */ r(function(a) {
|
|
35
|
-
if (document.activeElement === document.body)
|
|
36
|
-
for (const y of a)
|
|
37
|
-
y.removedNodes.length > 0 && d(o);
|
|
38
|
-
}, "handleMutations2");
|
|
39
|
-
document.addEventListener("focusin", s), document.addEventListener("focusout", m);
|
|
40
|
-
const p = new MutationObserver(c);
|
|
41
|
-
return o && p.observe(o, { childList: !0, subtree: !0 }), () => {
|
|
42
|
-
document.removeEventListener("focusin", s), document.removeEventListener("focusout", m), p.disconnect();
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
}, [u, o, f.paused]), l.useEffect(() => {
|
|
46
|
-
if (o) {
|
|
47
|
-
C.add(f);
|
|
48
|
-
const s = document.activeElement;
|
|
49
|
-
if (!o.contains(s)) {
|
|
50
|
-
const c = new CustomEvent(T, O);
|
|
51
|
-
o.addEventListener(T, v), o.dispatchEvent(c), c.defaultPrevented || (D(q(L(o)), { select: !0 }), document.activeElement === s && d(o));
|
|
52
|
-
}
|
|
53
|
-
return () => {
|
|
54
|
-
o.removeEventListener(T, v), setTimeout(() => {
|
|
55
|
-
const c = new CustomEvent(h, O);
|
|
56
|
-
o.addEventListener(h, b), o.dispatchEvent(c), c.defaultPrevented || d(s ?? document.body, { select: !0 }), o.removeEventListener(h, b), C.remove(f);
|
|
57
|
-
}, 0);
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
}, [o, v, b, f]);
|
|
61
|
-
const R = l.useCallback(
|
|
62
|
-
(s) => {
|
|
63
|
-
if (!n && !u || f.paused) return;
|
|
64
|
-
const m = s.key === "Tab" && !s.altKey && !s.ctrlKey && !s.metaKey, c = document.activeElement;
|
|
65
|
-
if (m && c) {
|
|
66
|
-
const p = s.currentTarget, [a, i] = H(p);
|
|
67
|
-
a && i ? !s.shiftKey && c === i ? (s.preventDefault(), n && d(a, { select: !0 })) : s.shiftKey && c === a && (s.preventDefault(), n && d(i, { select: !0 })) : c === p && s.preventDefault();
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
[n, u, f.paused]
|
|
71
|
-
);
|
|
72
|
-
return /* @__PURE__ */ k(K.div, { tabIndex: -1, ...U, ref: P, onKeyDown: R });
|
|
73
|
-
});
|
|
74
|
-
x.displayName = w;
|
|
75
|
-
function D(e, { select: t = !1 } = {}) {
|
|
76
|
-
const n = document.activeElement;
|
|
77
|
-
for (const u of e)
|
|
78
|
-
if (d(u, { select: t }), document.activeElement !== n) return;
|
|
79
|
-
}
|
|
80
|
-
r(D, "focusFirst");
|
|
81
|
-
function H(e) {
|
|
82
|
-
const t = L(e), n = S(t, e), u = S(t.reverse(), e);
|
|
83
|
-
return [n, u];
|
|
84
|
-
}
|
|
85
|
-
r(H, "getTabbableEdges");
|
|
86
|
-
function L(e) {
|
|
87
|
-
const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
88
|
-
acceptNode: /* @__PURE__ */ r((u) => {
|
|
89
|
-
const E = u.tagName === "INPUT" && u.type === "hidden";
|
|
90
|
-
return u.disabled || u.hidden || E ? NodeFilter.FILTER_SKIP : u.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
91
|
-
}, "acceptNode")
|
|
92
|
-
});
|
|
93
|
-
for (; n.nextNode(); ) t.push(n.currentNode);
|
|
94
|
-
return t;
|
|
95
|
-
}
|
|
96
|
-
r(L, "getTabbableCandidates");
|
|
97
|
-
function S(e, t) {
|
|
98
|
-
for (const n of e)
|
|
99
|
-
if (!V(n, { upTo: t })) return n;
|
|
100
|
-
}
|
|
101
|
-
r(S, "findVisible");
|
|
102
|
-
function V(e, { upTo: t }) {
|
|
103
|
-
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
104
|
-
for (; e; ) {
|
|
105
|
-
if (t !== void 0 && e === t) return !1;
|
|
106
|
-
if (getComputedStyle(e).display === "none") return !0;
|
|
107
|
-
e = e.parentElement;
|
|
108
|
-
}
|
|
109
|
-
return !1;
|
|
110
|
-
}
|
|
111
|
-
r(V, "isHidden");
|
|
112
|
-
function W(e) {
|
|
113
|
-
return e instanceof HTMLInputElement && "select" in e;
|
|
114
|
-
}
|
|
115
|
-
r(W, "isSelectableInput");
|
|
116
|
-
function d(e, { select: t = !1 } = {}) {
|
|
117
|
-
if (e && e.focus) {
|
|
118
|
-
const n = document.activeElement;
|
|
119
|
-
e.focus({ preventScroll: !0 }), e !== n && W(e) && t && e.select();
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
r(d, "focus");
|
|
123
|
-
var C = j();
|
|
124
|
-
function j() {
|
|
125
|
-
let e = [];
|
|
126
|
-
return {
|
|
127
|
-
add(t) {
|
|
128
|
-
const n = e[0];
|
|
129
|
-
t !== n && (n == null || n.pause()), e = I(e, t), e.unshift(t);
|
|
130
|
-
},
|
|
131
|
-
remove(t) {
|
|
132
|
-
var n;
|
|
133
|
-
e = I(e, t), (n = e[0]) == null || n.resume();
|
|
134
|
-
}
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
r(j, "createFocusScopesStack");
|
|
138
|
-
function I(e, t) {
|
|
139
|
-
const n = [...e], u = n.indexOf(t);
|
|
140
|
-
return u !== -1 && n.splice(u, 1), n;
|
|
141
|
-
}
|
|
142
|
-
r(I, "arrayRemove");
|
|
143
|
-
function q(e) {
|
|
144
|
-
return e.filter((t) => t.tagName !== "A");
|
|
145
|
-
}
|
|
146
|
-
r(q, "removeLinks");
|
|
147
|
-
export {
|
|
148
|
-
x as FocusScope
|
|
149
|
-
};
|