@kommo-crm/crm-react-ui-kit 1.1.1-beta.7 → 1.1.1-beta.9
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/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/components/ContextMenu/ContextMenu.js +84 -75
- package/dist/components/ContextMenu/ContextMenu.props.d.ts +8 -0
- package/dist/components/ContextMenu/ContextMenu.props.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/Arrow/Arrow.js +1 -1
- package/dist/components/ContextMenu/components/CheckboxItem/CheckboxItem.d.ts +3 -1
- package/dist/components/ContextMenu/components/CheckboxItem/CheckboxItem.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/CheckboxItem/CheckboxItem.js +61 -55
- package/dist/components/ContextMenu/components/CheckboxItem/CheckboxItem.props.d.ts +6 -2
- package/dist/components/ContextMenu/components/CheckboxItem/CheckboxItem.props.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/Content/Content.js +2 -2
- package/dist/components/ContextMenu/components/Content/index.js +1 -1
- package/dist/components/ContextMenu/components/Group/Group.js +1 -1
- package/dist/components/ContextMenu/components/Item/Item.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/Item/Item.js +69 -68
- package/dist/components/ContextMenu/components/Item/Item.props.d.ts +6 -0
- package/dist/components/ContextMenu/components/Item/Item.props.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/ItemIndicator/ItemIndicator.js +1 -1
- package/dist/components/ContextMenu/components/Label/Label.js +1 -1
- package/dist/components/ContextMenu/components/Portal/Portal.js +1 -1
- package/dist/components/ContextMenu/components/RadioGroup/RadioGroup.context.d.ts +5 -0
- package/dist/components/ContextMenu/components/RadioGroup/RadioGroup.context.d.ts.map +1 -0
- package/dist/components/ContextMenu/components/RadioGroup/RadioGroup.context.js +7 -0
- package/dist/components/ContextMenu/components/RadioGroup/RadioGroup.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/RadioGroup/RadioGroup.js +21 -11
- package/dist/components/ContextMenu/components/RadioGroup/RadioGroup.props.d.ts +8 -0
- package/dist/components/ContextMenu/components/RadioGroup/RadioGroup.props.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/RadioGroup/index.d.ts +1 -0
- package/dist/components/ContextMenu/components/RadioGroup/index.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/RadioGroup/index.js +6 -2
- package/dist/components/ContextMenu/components/RadioItem/RadioItem.d.ts +1 -0
- package/dist/components/ContextMenu/components/RadioItem/RadioItem.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/RadioItem/RadioItem.js +55 -46
- package/dist/components/ContextMenu/components/RadioItem/RadioItem.props.d.ts +4 -0
- package/dist/components/ContextMenu/components/RadioItem/RadioItem.props.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/Separator/Separator.js +1 -1
- package/dist/components/ContextMenu/components/Sub/Sub.d.ts +5 -5
- package/dist/components/ContextMenu/components/Sub/Sub.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/Sub/Sub.js +53 -55
- package/dist/components/ContextMenu/components/Sub/Sub.types.d.ts +7 -0
- package/dist/components/ContextMenu/components/Sub/Sub.types.d.ts.map +1 -0
- package/dist/components/ContextMenu/components/Sub/Sub.types.js +1 -0
- package/dist/components/ContextMenu/components/Sub/index.d.ts +1 -0
- package/dist/components/ContextMenu/components/Sub/index.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/SubContent/SubContent.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/SubContent/SubContent.js +26 -25
- package/dist/components/ContextMenu/components/SubRoot/SubRoot.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/SubRoot/SubRoot.js +45 -43
- package/dist/components/ContextMenu/components/SubRoot/SubRoot.props.d.ts +4 -0
- package/dist/components/ContextMenu/components/SubRoot/SubRoot.props.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/SubRoot/components/Content/Content.js +2 -2
- package/dist/components/ContextMenu/components/SubRoot/components/Trigger/Trigger.js +2 -2
- package/dist/components/ContextMenu/components/SubTrigger/SubTrigger.js +2 -2
- package/dist/components/ContextMenu/components/Trigger/Trigger.js +1 -1
- package/dist/components/ContextMenu/hooks/index.js +1 -1
- package/dist/components/ContextMenu/hooks/useContentPositioning/useContentPositioning.js +1 -1
- package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.js +1 -1
- package/dist/components/ContextMenu/hooks/useContextMenuSub/useContextMenuSub.js +1 -1
- package/dist/components/ContextMenu/hooks/useContextMenuSubMenu/useContextMenuSubMenu.js +1 -1
- package/dist/components/ContextMenu/index.d.ts +1 -0
- package/dist/components/ContextMenu/index.d.ts.map +1 -1
- package/dist/components/ContextMenu/index.js +1 -1
- package/dist/{index-BA3njR2k.mjs → index-CYWNqEqR.mjs} +1 -1
- package/dist/{useContentPositioning-DAKfbddS.mjs → useContentPositioning-BLEFxO0N.mjs} +1 -1
- package/package.json +1 -1
|
@@ -1,97 +1,98 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { I as
|
|
4
|
-
import { c as
|
|
5
|
-
import { mergeRefs as
|
|
6
|
-
import { useLevelContext as
|
|
7
|
-
import { useContextMenuContext as
|
|
8
|
-
import { hasItemIcon as
|
|
9
|
-
import "../../../../useContentPositioning-
|
|
1
|
+
import { jsx as b } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as G, useMemo as D, useId as J, useState as R, useRef as Q, useEffect as T } from "react";
|
|
3
|
+
import { I as U } from "../../../../index-CYWNqEqR.mjs";
|
|
4
|
+
import { c as F } from "../../../../index-L8X2o7IH.mjs";
|
|
5
|
+
import { mergeRefs as V } from "../../../../lib/utils.js";
|
|
6
|
+
import { useLevelContext as X } from "../../providers/LevelProvider/LevelProvider.js";
|
|
7
|
+
import { useContextMenuContext as Z } from "../../ContextMenu.context.js";
|
|
8
|
+
import { hasItemIcon as O } from "../../utils/hasItemIcon/hasItemIcon.js";
|
|
9
|
+
import "../../../../useContentPositioning-BLEFxO0N.mjs";
|
|
10
10
|
import "../Content/Content.utils.js";
|
|
11
|
-
import { useContextMenuItemFocus as
|
|
12
|
-
import { ContextMenuItemProvider as
|
|
13
|
-
import '../../../../assets/Item2.css';const
|
|
14
|
-
item:
|
|
15
|
-
}, s = "ContextMenu.Item",
|
|
16
|
-
const { hasItemWithIcon:
|
|
11
|
+
import { useContextMenuItemFocus as $ } from "../../hooks/useContextMenuItemFocus/useContextMenuItemFocus.js";
|
|
12
|
+
import { ContextMenuItemProvider as ee } from "./Item.context.js";
|
|
13
|
+
import '../../../../assets/Item2.css';const te = "_item_zkanf_1", _ = {
|
|
14
|
+
item: te
|
|
15
|
+
}, s = "ContextMenu.Item", ne = G((t, p) => {
|
|
16
|
+
const { hasItemWithIcon: M } = X(s);
|
|
17
17
|
if ("isSelectable" in t && t.isSelectable === !1) {
|
|
18
18
|
const {
|
|
19
19
|
className: e,
|
|
20
|
-
children:
|
|
21
|
-
isSelectable:
|
|
22
|
-
hasIconCheckFn:
|
|
23
|
-
...
|
|
24
|
-
} = t,
|
|
25
|
-
return /* @__PURE__ */
|
|
20
|
+
children: C,
|
|
21
|
+
isSelectable: B,
|
|
22
|
+
hasIconCheckFn: K = O,
|
|
23
|
+
...W
|
|
24
|
+
} = t, Y = D(() => K(C), [C]);
|
|
25
|
+
return /* @__PURE__ */ b(
|
|
26
26
|
"div",
|
|
27
27
|
{
|
|
28
|
-
ref:
|
|
29
|
-
className:
|
|
30
|
-
"data-not-selectable": !
|
|
31
|
-
"data-no-icon-align":
|
|
32
|
-
...
|
|
33
|
-
children:
|
|
28
|
+
ref: p,
|
|
29
|
+
className: F(_.item, e),
|
|
30
|
+
"data-not-selectable": !B,
|
|
31
|
+
"data-no-icon-align": Y || !M ? "" : void 0,
|
|
32
|
+
...W,
|
|
33
|
+
children: C
|
|
34
34
|
}
|
|
35
35
|
);
|
|
36
36
|
}
|
|
37
37
|
const {
|
|
38
|
-
className:
|
|
39
|
-
children:
|
|
40
|
-
isDisabled:
|
|
41
|
-
isDanger:
|
|
42
|
-
hasIconCheckFn:
|
|
43
|
-
onSelect:
|
|
38
|
+
className: w,
|
|
39
|
+
children: i,
|
|
40
|
+
isDisabled: x,
|
|
41
|
+
isDanger: A,
|
|
42
|
+
hasIconCheckFn: E = O,
|
|
43
|
+
onSelect: a,
|
|
44
44
|
onClick: r,
|
|
45
45
|
onFocus: c,
|
|
46
46
|
onMouseEnter: m,
|
|
47
47
|
onBlur: u,
|
|
48
48
|
onMouseLeave: l,
|
|
49
49
|
onKeyDown: d,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
isCloseMenuOnClick: S = !0,
|
|
51
|
+
...H
|
|
52
|
+
} = t, L = J(), [v, N] = R(!1), [n, P] = R(!1), o = Q(null), j = D(() => E(i), [i]), { closeMenuImmediately: k, isCloseOnClick: y } = Z(s), {
|
|
53
|
+
dataHighlighted: q,
|
|
53
54
|
onFocus: f,
|
|
54
55
|
onMouseEnter: h,
|
|
55
56
|
onBlur: g,
|
|
56
57
|
onMouseLeave: I
|
|
57
|
-
} =
|
|
58
|
+
} = $({
|
|
58
59
|
displayName: s,
|
|
59
|
-
id:
|
|
60
|
-
isDisabled:
|
|
61
|
-
hasSubmenu:
|
|
60
|
+
id: L,
|
|
61
|
+
isDisabled: x,
|
|
62
|
+
hasSubmenu: n
|
|
62
63
|
});
|
|
63
|
-
|
|
64
|
-
if (!
|
|
64
|
+
T(() => {
|
|
65
|
+
if (!o.current)
|
|
65
66
|
return;
|
|
66
|
-
const e =
|
|
67
|
-
|
|
68
|
-
}, [
|
|
69
|
-
const
|
|
70
|
-
|
|
67
|
+
const e = o.current.querySelector("[data-submenu-trigger]");
|
|
68
|
+
P(!!e);
|
|
69
|
+
}, [o]);
|
|
70
|
+
const z = (e) => {
|
|
71
|
+
n && e.key === "ArrowRight" && N(!0), d == null || d(e);
|
|
71
72
|
};
|
|
72
|
-
return /* @__PURE__ */
|
|
73
|
-
|
|
73
|
+
return /* @__PURE__ */ b(
|
|
74
|
+
ee,
|
|
74
75
|
{
|
|
75
|
-
hasSubmenu:
|
|
76
|
-
subMenuOpen:
|
|
77
|
-
setSubMenuOpen:
|
|
78
|
-
children: /* @__PURE__ */
|
|
79
|
-
|
|
76
|
+
hasSubmenu: n,
|
|
77
|
+
subMenuOpen: v,
|
|
78
|
+
setSubMenuOpen: N,
|
|
79
|
+
children: /* @__PURE__ */ b(
|
|
80
|
+
U,
|
|
80
81
|
{
|
|
81
|
-
ref:
|
|
82
|
-
className:
|
|
83
|
-
disabled:
|
|
82
|
+
ref: V(p, o),
|
|
83
|
+
className: F(_.item, w),
|
|
84
|
+
disabled: x,
|
|
84
85
|
"data-item": !0,
|
|
85
|
-
"data-danger":
|
|
86
|
-
"data-no-icon-align":
|
|
87
|
-
"data-has-submenu":
|
|
86
|
+
"data-danger": A ? "" : void 0,
|
|
87
|
+
"data-no-icon-align": j || !M ? "" : void 0,
|
|
88
|
+
"data-has-submenu": n ? "" : void 0,
|
|
88
89
|
onSelect: (e) => {
|
|
89
|
-
|
|
90
|
+
a == null || a(e), y && S && k(!0);
|
|
90
91
|
},
|
|
91
92
|
onClick: (e) => {
|
|
92
|
-
e.preventDefault(), r == null || r(e),
|
|
93
|
+
e.preventDefault(), r == null || r(e), y && S && k(!0);
|
|
93
94
|
},
|
|
94
|
-
"data-highlighted":
|
|
95
|
+
"data-highlighted": v || q,
|
|
95
96
|
onFocus: (e) => {
|
|
96
97
|
f == null || f(), c == null || c(e);
|
|
97
98
|
},
|
|
@@ -104,15 +105,15 @@ import '../../../../assets/Item2.css';const $ = "_item_zkanf_1", F = {
|
|
|
104
105
|
onMouseLeave: (e) => {
|
|
105
106
|
I == null || I(e), l == null || l(e);
|
|
106
107
|
},
|
|
107
|
-
onKeyDown:
|
|
108
|
-
...
|
|
109
|
-
children:
|
|
108
|
+
onKeyDown: z,
|
|
109
|
+
...H,
|
|
110
|
+
children: i
|
|
110
111
|
}
|
|
111
112
|
)
|
|
112
113
|
}
|
|
113
114
|
);
|
|
114
115
|
});
|
|
115
|
-
|
|
116
|
+
ne.displayName = s;
|
|
116
117
|
export {
|
|
117
|
-
|
|
118
|
+
ne as Item
|
|
118
119
|
};
|
|
@@ -15,6 +15,12 @@ export type SelectableItemProps = RadixItemProps & {
|
|
|
15
15
|
* By default, the `hasItemIcon` from utils is used.
|
|
16
16
|
*/
|
|
17
17
|
hasIconCheckFn?: (children: React.ReactNode) => boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Whether the item should close the menu when clicked.
|
|
20
|
+
*
|
|
21
|
+
* @default true
|
|
22
|
+
*/
|
|
23
|
+
isCloseMenuOnClick?: boolean;
|
|
18
24
|
};
|
|
19
25
|
export type NotSelectableItemProps = React.ComponentPropsWithRef<'div'> & {
|
|
20
26
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Item.props.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/Item/Item.props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAEnF,KAAK,cAAc,GAAG,IAAI,CACxB,KAAK,CAAC,qBAAqB,CAAC,OAAO,qBAAqB,CAAC,EACzD,UAAU,CACX,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,cAAc,GAAG;IACjD;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,KAAK,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Item.props.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/Item/Item.props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAEnF,KAAK,cAAc,GAAG,IAAI,CACxB,KAAK,CAAC,qBAAqB,CAAC,OAAO,qBAAqB,CAAC,EACzD,UAAU,CACX,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,cAAc,GAAG;IACjD;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,KAAK,OAAO,CAAC;IACxD;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,KAAK,CAAC,qBAAqB,CAAC,KAAK,CAAC,GAAG;IACxE;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB;;;;OAIG;IACH,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,KAAK,OAAO,CAAC;CACzD,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,mBAAmB,GAAG,sBAAsB,CAAC;AAErE,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CAC1C"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as c, useRef as f, useEffect as a } from "react";
|
|
3
|
-
import { e as d } from "../../../../index-
|
|
3
|
+
import { e as d } from "../../../../index-CYWNqEqR.mjs";
|
|
4
4
|
import { c as p } from "../../../../index-L8X2o7IH.mjs";
|
|
5
5
|
import { mergeRefs as I } from "../../../../lib/utils.js";
|
|
6
6
|
import { useLevelContext as l } from "../../providers/LevelProvider/LevelProvider.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as s } from "react";
|
|
3
|
-
import { L as n } from "../../../../index-
|
|
3
|
+
import { L as n } from "../../../../index-CYWNqEqR.mjs";
|
|
4
4
|
import { c } from "../../../../index-L8X2o7IH.mjs";
|
|
5
5
|
import { useLevelContext as i } from "../../providers/LevelProvider/LevelProvider.js";
|
|
6
6
|
import { hasItemIcon as b } from "../../utils/hasItemIcon/hasItemIcon.js";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { RadioGroupContextProps } from './RadioGroup.props';
|
|
2
|
+
declare const DISPLAY_NAME = "ContextMenu.RadioGroup";
|
|
3
|
+
declare const RadioGroupProvider: import('../../../../lib/react/createComponentContext').ContextProps<RadioGroupContextProps>, useRadioGroupContext: (consumerName: string) => RadioGroupContextProps;
|
|
4
|
+
export { RadioGroupProvider, useRadioGroupContext, DISPLAY_NAME };
|
|
5
|
+
//# sourceMappingURL=RadioGroup.context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioGroup.context.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/RadioGroup/RadioGroup.context.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,QAAA,MAAM,YAAY,2BAA2B,CAAC;AAE9C,QAAA,MAAO,kBAAkB,+FAAE,oBAAoB,kDACe,CAAC;AAE/D,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/RadioGroup/RadioGroup.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/RadioGroup/RadioGroup.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAGrD,eAAO,MAAM,UAAU;4BAGpB,eAAe,GAAG,GAAG,CAAC,OAAO;;CAmB/B,CAAC"}
|
|
@@ -1,14 +1,24 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { a as n } from "../../../../index-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { a as n } from "../../../../index-CYWNqEqR.mjs";
|
|
3
|
+
import { RadioGroupProvider as i, DISPLAY_NAME as p } from "./RadioGroup.context.js";
|
|
4
|
+
const s = ({
|
|
5
|
+
onChange: o,
|
|
5
6
|
...e
|
|
6
|
-
}) =>
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
7
|
+
}) => {
|
|
8
|
+
const r = (a) => {
|
|
9
|
+
o && o({
|
|
10
|
+
target: { value: a }
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
return /* @__PURE__ */ t(i, { onChange: r, children: /* @__PURE__ */ t(
|
|
14
|
+
n,
|
|
15
|
+
{
|
|
16
|
+
...e,
|
|
17
|
+
onValueChange: r
|
|
18
|
+
}
|
|
19
|
+
) });
|
|
20
|
+
};
|
|
21
|
+
s.displayName = p;
|
|
12
22
|
export {
|
|
13
|
-
|
|
23
|
+
s as RadioGroup
|
|
14
24
|
};
|
|
@@ -8,5 +8,13 @@ export type RadioGroupProps = RadixRadioGroupProps & {
|
|
|
8
8
|
*/
|
|
9
9
|
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
10
10
|
};
|
|
11
|
+
export type RadioGroupContextProps = {
|
|
12
|
+
/**
|
|
13
|
+
* Handler for the selected value.
|
|
14
|
+
*
|
|
15
|
+
* Automatically applied to all Radio buttons.
|
|
16
|
+
*/
|
|
17
|
+
onChange: (value: string) => void;
|
|
18
|
+
};
|
|
11
19
|
export {};
|
|
12
20
|
//# sourceMappingURL=RadioGroup.props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup.props.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/RadioGroup/RadioGroup.props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,IAAI,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAE/F,KAAK,oBAAoB,GAAG,IAAI,CAC9B,wBAAwB,CAAC,OAAO,2BAA2B,CAAC,EAC5D,eAAe,CAChB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,oBAAoB,GAAG;IACnD;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CACjE,CAAC"}
|
|
1
|
+
{"version":3,"file":"RadioGroup.props.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/RadioGroup/RadioGroup.props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,IAAI,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAE/F,KAAK,oBAAoB,GAAG,IAAI,CAC9B,wBAAwB,CAAC,OAAO,2BAA2B,CAAC,EAC5D,eAAe,CAChB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,oBAAoB,GAAG;IACnD;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CACjE,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC;;;;OAIG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/RadioGroup/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/RadioGroup/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,YAAY,GACb,MAAM,sBAAsB,CAAC"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import { RadioGroup as
|
|
1
|
+
import { RadioGroup as e } from "./RadioGroup.js";
|
|
2
|
+
import { DISPLAY_NAME as d, RadioGroupProvider as i, useRadioGroupContext as t } from "./RadioGroup.context.js";
|
|
2
3
|
export {
|
|
3
|
-
|
|
4
|
+
d as DISPLAY_NAME,
|
|
5
|
+
e as RadioGroup,
|
|
6
|
+
i as RadioGroupProvider,
|
|
7
|
+
t as useRadioGroupContext
|
|
4
8
|
};
|
|
@@ -275,5 +275,6 @@ export declare const RadioItem: React.ForwardRefExoticComponent<{
|
|
|
275
275
|
} & {
|
|
276
276
|
isDisabled?: boolean;
|
|
277
277
|
hasIconCheckFn?: (children: React.ReactNode) => boolean;
|
|
278
|
+
isCloseMenuOnClick?: boolean;
|
|
278
279
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
279
280
|
//# sourceMappingURL=RadioItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/RadioItem/RadioItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"RadioItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/RadioItem/RadioItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAoB1D,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sCAJO,SAAS;;wCAkGrC,CAAC"}
|
|
@@ -1,70 +1,79 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { f as
|
|
4
|
-
import { c as
|
|
5
|
-
import { useLevelContext as
|
|
6
|
-
import { useContextMenuContext as
|
|
7
|
-
import { hasItemIcon as
|
|
8
|
-
import "../../../../useContentPositioning-
|
|
1
|
+
import { jsx as G } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as H, useId as P, useMemo as W } from "react";
|
|
3
|
+
import { f as Y } from "../../../../index-CYWNqEqR.mjs";
|
|
4
|
+
import { c as b } from "../../../../index-L8X2o7IH.mjs";
|
|
5
|
+
import { useLevelContext as q } from "../../providers/LevelProvider/LevelProvider.js";
|
|
6
|
+
import { useContextMenuContext as z } from "../../ContextMenu.context.js";
|
|
7
|
+
import { hasItemIcon as J } from "../../utils/hasItemIcon/hasItemIcon.js";
|
|
8
|
+
import "../../../../useContentPositioning-BLEFxO0N.mjs";
|
|
9
9
|
import "../Content/Content.utils.js";
|
|
10
|
-
import { useContextMenuItemFocus as
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
import { useContextMenuItemFocus as K } from "../../hooks/useContextMenuItemFocus/useContextMenuItemFocus.js";
|
|
11
|
+
import "../RadioGroup/RadioGroup.js";
|
|
12
|
+
import { useRadioGroupContext as O } from "../RadioGroup/RadioGroup.context.js";
|
|
13
|
+
import '../../../../assets/RadioItem.css';const Q = "_radio_item_14d4r_1", T = {
|
|
14
|
+
radio_item: Q
|
|
15
|
+
}, o = "ContextMenu.RadioItem", U = H(
|
|
14
16
|
({
|
|
15
|
-
className:
|
|
17
|
+
className: h,
|
|
16
18
|
children: m,
|
|
17
|
-
isDisabled:
|
|
18
|
-
hasIconCheckFn:
|
|
19
|
-
onFocus:
|
|
20
|
-
onMouseEnter:
|
|
21
|
-
onBlur:
|
|
19
|
+
isDisabled: I,
|
|
20
|
+
hasIconCheckFn: u = J,
|
|
21
|
+
onFocus: i,
|
|
22
|
+
onMouseEnter: r,
|
|
23
|
+
onBlur: a,
|
|
22
24
|
onMouseLeave: s,
|
|
23
25
|
onSelect: d,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
26
|
+
onClick: p,
|
|
27
|
+
isCloseMenuOnClick: _ = !0,
|
|
28
|
+
value: g,
|
|
29
|
+
...C
|
|
30
|
+
}, N) => {
|
|
31
|
+
const y = P(), { hasItemWithIcon: A } = q(o), { closeMenuImmediately: n, isCloseOnClick: R } = z(o), {
|
|
32
|
+
dataHighlighted: j,
|
|
33
|
+
onFocus: f,
|
|
34
|
+
onMouseEnter: e,
|
|
35
|
+
onBlur: x,
|
|
36
|
+
onMouseLeave: c
|
|
37
|
+
} = K({
|
|
38
|
+
displayName: o,
|
|
39
|
+
id: y,
|
|
40
|
+
isDisabled: I
|
|
41
|
+
}), w = W(() => u(m), [m]), { onChange: D } = O(o);
|
|
42
|
+
return /* @__PURE__ */ G(
|
|
43
|
+
Y,
|
|
39
44
|
{
|
|
40
|
-
ref:
|
|
41
|
-
className:
|
|
42
|
-
disabled:
|
|
45
|
+
ref: N,
|
|
46
|
+
className: b(T.radio_item, h),
|
|
47
|
+
disabled: I,
|
|
43
48
|
"data-item": !0,
|
|
44
|
-
"data-no-icon-align":
|
|
45
|
-
"data-highlighted":
|
|
49
|
+
"data-no-icon-align": w || !A ? "" : void 0,
|
|
50
|
+
"data-highlighted": j,
|
|
46
51
|
onSelect: (t) => {
|
|
47
|
-
|
|
52
|
+
d == null || d(t), R && _ && n(!0);
|
|
53
|
+
},
|
|
54
|
+
onClick: (t) => {
|
|
55
|
+
t.preventDefault(), D(g), p == null || p(t), R && _ && n(!0);
|
|
48
56
|
},
|
|
49
57
|
onFocus: (t) => {
|
|
50
|
-
|
|
58
|
+
f == null || f(), i == null || i(t);
|
|
51
59
|
},
|
|
52
60
|
onMouseEnter: (t) => {
|
|
53
|
-
|
|
61
|
+
e == null || e(t), r == null || r(t);
|
|
54
62
|
},
|
|
55
63
|
onBlur: (t) => {
|
|
56
|
-
|
|
64
|
+
x == null || x(), a == null || a(t);
|
|
57
65
|
},
|
|
58
66
|
onMouseLeave: (t) => {
|
|
59
|
-
|
|
67
|
+
c == null || c(t), s == null || s(t);
|
|
60
68
|
},
|
|
61
|
-
|
|
69
|
+
value: g,
|
|
70
|
+
...C,
|
|
62
71
|
children: m
|
|
63
72
|
}
|
|
64
73
|
);
|
|
65
74
|
}
|
|
66
75
|
);
|
|
67
|
-
|
|
76
|
+
U.displayName = o;
|
|
68
77
|
export {
|
|
69
|
-
|
|
78
|
+
U as RadioItem
|
|
70
79
|
};
|
|
@@ -12,6 +12,10 @@ export type RadioItemProps = RadixRadioItemProps & {
|
|
|
12
12
|
* By default, the `hasItemIcon` from utils is used.
|
|
13
13
|
*/
|
|
14
14
|
hasIconCheckFn?: (children: React.ReactNode) => boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Whether the RadioItem should close the menu when clicked.
|
|
17
|
+
*/
|
|
18
|
+
isCloseMenuOnClick?: boolean;
|
|
15
19
|
};
|
|
16
20
|
export {};
|
|
17
21
|
//# sourceMappingURL=RadioItem.props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioItem.props.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/RadioItem/RadioItem.props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,IAAI,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAE7F,KAAK,mBAAmB,GAAG,IAAI,CAC7B,wBAAwB,CAAC,OAAO,0BAA0B,CAAC,EAC3D,UAAU,CACX,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,mBAAmB,GAAG;IACjD;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,KAAK,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"RadioItem.props.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/RadioItem/RadioItem.props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,IAAI,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAE7F,KAAK,mBAAmB,GAAG,IAAI,CAC7B,wBAAwB,CAAC,OAAO,0BAA0B,CAAC,EAC3D,UAAU,CACX,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,mBAAmB,GAAG;IACjD;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,KAAK,OAAO,CAAC;IACxD;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as e } from "react";
|
|
3
|
-
import { g as s } from "../../../../index-
|
|
3
|
+
import { g as s } from "../../../../index-CYWNqEqR.mjs";
|
|
4
4
|
import { c as p } from "../../../../index-L8X2o7IH.mjs";
|
|
5
5
|
import '../../../../assets/Separator.css';const m = "_separator_1k8lw_1", c = {
|
|
6
6
|
separator: m
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export declare const Sub: {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
2
|
+
import { ContextMenuSubHandle } from './Sub.types';
|
|
3
|
+
export declare const Sub: React.ForwardRefExoticComponent<Omit<import('@radix-ui/react-dropdown-menu').DropdownMenuSubProps, "onOpenChange"> & {
|
|
4
|
+
mode?: import('../..').ContextMenuModeType;
|
|
5
|
+
onOpen?: (open: boolean) => void;
|
|
6
|
+
} & React.RefAttributes<ContextMenuSubHandle>>;
|
|
7
7
|
//# sourceMappingURL=Sub.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sub.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/Sub/Sub.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Sub.d.ts","sourceRoot":"","sources":["../../../../../src/components/ContextMenu/components/Sub/Sub.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAQ/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,GAAG;;;8CAiDf,CAAC"}
|