@televet/kibble-ui 4.0.0-beta.41 → 4.0.0-beta.43
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/chunks/button.component-BWlRjD5a.js.map +1 -1
- package/dist/chunks/button.component-ytAmAAJg.js.map +1 -1
- package/dist/chunks/{buttonGroup.component-DBpnBBOa.js → buttonGroup.component-BCCxeFx_.js} +2 -2
- package/dist/chunks/{buttonGroup.component-DBpnBBOa.js.map → buttonGroup.component-BCCxeFx_.js.map} +1 -1
- package/dist/chunks/{buttonGroup.component-Bw_Wcpsd.js → buttonGroup.component-Cpwnw5G3.js} +2 -2
- package/dist/chunks/{buttonGroup.component-Bw_Wcpsd.js.map → buttonGroup.component-Cpwnw5G3.js.map} +1 -1
- package/dist/chunks/{checkbox.component-BTG2oHN_.js → checkbox.component-C8IPf20R.js} +2 -2
- package/dist/chunks/{checkbox.component-BTG2oHN_.js.map → checkbox.component-C8IPf20R.js.map} +1 -1
- package/dist/chunks/{checkbox.component-WA8Y2Cfq.js → checkbox.component-CvuE1PVR.js} +2 -2
- package/dist/chunks/{checkbox.component-WA8Y2Cfq.js.map → checkbox.component-CvuE1PVR.js.map} +1 -1
- package/dist/chunks/{checkboxGroup.component-DMSg9Hzt.js → checkboxGroup.component-CQEwY2Fu.js} +2 -2
- package/dist/chunks/{checkboxGroup.component-DMSg9Hzt.js.map → checkboxGroup.component-CQEwY2Fu.js.map} +1 -1
- package/dist/chunks/{checkboxGroup.component-CoUMqdnh.js → checkboxGroup.component-CaHesQT7.js} +3 -3
- package/dist/chunks/{checkboxGroup.component-CoUMqdnh.js.map → checkboxGroup.component-CaHesQT7.js.map} +1 -1
- package/dist/chunks/{conversationCard.component-D2k7g7wc.js → conversationCard.component-C_gj2TZd.js} +2 -2
- package/dist/chunks/{conversationCard.component-D2k7g7wc.js.map → conversationCard.component-C_gj2TZd.js.map} +1 -1
- package/dist/chunks/{conversationCard.component-CMudlOxC.js → conversationCard.component-p1vrl1L3.js} +2 -2
- package/dist/chunks/{conversationCard.component-CMudlOxC.js.map → conversationCard.component-p1vrl1L3.js.map} +1 -1
- package/dist/chunks/{datePicker.component-CAd5ouvo.js → datePicker.component-CwQ7lbgj.js} +2 -2
- package/dist/chunks/{datePicker.component-CAd5ouvo.js.map → datePicker.component-CwQ7lbgj.js.map} +1 -1
- package/dist/chunks/{datePicker.component-Btc-TcGV.js → datePicker.component-DLbm9VYf.js} +3 -3
- package/dist/chunks/{datePicker.component-Btc-TcGV.js.map → datePicker.component-DLbm9VYf.js.map} +1 -1
- package/dist/chunks/icon.component-4aaCABoX.js.map +1 -1
- package/dist/chunks/icon.component-BmcWaysM.js.map +1 -1
- package/dist/chunks/menu.component-D_eoL8VD.js +2 -0
- package/dist/chunks/menu.component-D_eoL8VD.js.map +1 -0
- package/dist/chunks/{menu.component-B5OYYpa8.js → menu.component-toq-fDY8.js} +188 -180
- package/dist/chunks/menu.component-toq-fDY8.js.map +1 -0
- package/dist/chunks/{modal.types-0p23sZIR.js → modal.types-BhM9guMA.js} +2 -2
- package/dist/chunks/{modal.types-0p23sZIR.js.map → modal.types-BhM9guMA.js.map} +1 -1
- package/dist/chunks/{modal.types-BGqtuJeQ.js → modal.types-Dz2IFuc7.js} +2 -1
- package/dist/chunks/{modal.types-BGqtuJeQ.js.map → modal.types-Dz2IFuc7.js.map} +1 -1
- package/dist/chunks/{pinInput.types-PLeb9Wy4.js → pinInput.types-BPnWNbwp.js} +2 -2
- package/dist/chunks/{pinInput.types-PLeb9Wy4.js.map → pinInput.types-BPnWNbwp.js.map} +1 -1
- package/dist/chunks/{pinInput.types-DDODRsaX.js → pinInput.types-GAEfMLAv.js} +2 -2
- package/dist/chunks/{pinInput.types-DDODRsaX.js.map → pinInput.types-GAEfMLAv.js.map} +1 -1
- package/dist/chunks/{radioGroup.component-aQ5WaHHz.js → radioGroup.component-B3pl5h2h.js} +2 -2
- package/dist/chunks/{radioGroup.component-aQ5WaHHz.js.map → radioGroup.component-B3pl5h2h.js.map} +1 -1
- package/dist/chunks/{radioGroup.component-BqJ9MJq_.js → radioGroup.component-DyE_o-Fx.js} +3 -3
- package/dist/chunks/{radioGroup.component-BqJ9MJq_.js.map → radioGroup.component-DyE_o-Fx.js.map} +1 -1
- package/dist/chunks/{ratingDots.component-Bgh1iv_C.js → ratingDots.component-BesDpg8x.js} +2 -2
- package/dist/chunks/{ratingDots.component-Bgh1iv_C.js.map → ratingDots.component-BesDpg8x.js.map} +1 -1
- package/dist/chunks/{ratingDots.component-3aUZ-7-n.js → ratingDots.component-C8eBoN9v.js} +2 -2
- package/dist/chunks/{ratingDots.component-3aUZ-7-n.js.map → ratingDots.component-C8eBoN9v.js.map} +1 -1
- package/dist/chunks/{select.component-C-D415HK.js → select.component-BCFraNbc.js} +2 -2
- package/dist/chunks/{select.component-C-D415HK.js.map → select.component-BCFraNbc.js.map} +1 -1
- package/dist/chunks/{select.component-CceQLD7L.js → select.component-GTm2laeB.js} +2 -2
- package/dist/chunks/{select.component-CceQLD7L.js.map → select.component-GTm2laeB.js.map} +1 -1
- package/dist/chunks/{switch.component-8Ksb8br3.js → switch.component-CSGFEF3I.js} +2 -2
- package/dist/chunks/{switch.component-8Ksb8br3.js.map → switch.component-CSGFEF3I.js.map} +1 -1
- package/dist/chunks/{switch.component-BkifDkJ0.js → switch.component-DjHknb_4.js} +2 -2
- package/dist/chunks/{switch.component-BkifDkJ0.js.map → switch.component-DjHknb_4.js.map} +1 -1
- package/dist/chunks/{tagBlock.component-D_3b0Ebn.js → tagBlock.component-BWbEe9VL.js} +2 -2
- package/dist/chunks/{tagBlock.component-D_3b0Ebn.js.map → tagBlock.component-BWbEe9VL.js.map} +1 -1
- package/dist/chunks/{tagBlock.component-DjIgrPCX.js → tagBlock.component-DGGkSE8s.js} +2 -2
- package/dist/chunks/{tagBlock.component-DjIgrPCX.js.map → tagBlock.component-DGGkSE8s.js.map} +1 -1
- package/dist/chunks/{textInput.component-c9ySCd-c.js → textInput.component-D2StzwsH.js} +2 -2
- package/dist/chunks/{textInput.component-c9ySCd-c.js.map → textInput.component-D2StzwsH.js.map} +1 -1
- package/dist/chunks/{textInput.component-7QTnQmYu.js → textInput.component-db5JWDOn.js} +2 -2
- package/dist/chunks/{textInput.component-7QTnQmYu.js.map → textInput.component-db5JWDOn.js.map} +1 -1
- package/dist/chunks/{textarea.component-7yXlR6OD.js → textarea.component-DvA5vzjS.js} +2 -2
- package/dist/chunks/{textarea.component-7yXlR6OD.js.map → textarea.component-DvA5vzjS.js.map} +1 -1
- package/dist/chunks/{textarea.component-Bbf7OmgY.js → textarea.component-VN5A4zVD.js} +2 -2
- package/dist/chunks/{textarea.component-Bbf7OmgY.js.map → textarea.component-VN5A4zVD.js.map} +1 -1
- package/dist/chunks/{theme.provider-DHyAAmb8.js → theme.provider-C1ydkJtd.js} +143 -146
- package/dist/chunks/{theme.provider-DHyAAmb8.js.map → theme.provider-C1ydkJtd.js.map} +1 -1
- package/dist/chunks/{theme.provider-CGOc_ofu.js → theme.provider-CUQEVC68.js} +2 -2
- package/dist/chunks/{theme.provider-CGOc_ofu.js.map → theme.provider-CUQEVC68.js.map} +1 -1
- package/dist/chunks/{timePicker.component-CWQsy1FJ.js → timePicker.component-Cm2roPxJ.js} +2 -2
- package/dist/chunks/{timePicker.component-CWQsy1FJ.js.map → timePicker.component-Cm2roPxJ.js.map} +1 -1
- package/dist/chunks/{timePicker.component-DayAeaAE.js → timePicker.component-sttSyiVV.js} +2 -2
- package/dist/chunks/{timePicker.component-DayAeaAE.js.map → timePicker.component-sttSyiVV.js.map} +1 -1
- package/dist/chunks/{timeRange.component-kKGWfXnG.js → timeRange.component-BuLsK6ed.js} +2 -2
- package/dist/chunks/{timeRange.component-kKGWfXnG.js.map → timeRange.component-BuLsK6ed.js.map} +1 -1
- package/dist/chunks/{timeRange.component-BMIZhDDZ.js → timeRange.component-OH7hVSwj.js} +2 -2
- package/dist/chunks/{timeRange.component-BMIZhDDZ.js.map → timeRange.component-OH7hVSwj.js.map} +1 -1
- package/dist/chunks/{withFormControl-BldbKXiV.js → withFormControl-Chelruxy.js} +55 -55
- package/dist/chunks/{withFormControl-BldbKXiV.js.map → withFormControl-Chelruxy.js.map} +1 -1
- package/dist/chunks/{withFormControl-C35JkDEH.js → withFormControl-CvsBPk94.js} +2 -2
- package/dist/chunks/{withFormControl-C35JkDEH.js.map → withFormControl-CvsBPk94.js.map} +1 -1
- package/dist/cjs/chakra/index.cjs +1 -1
- package/dist/cjs/chakra/index.cjs.map +1 -1
- package/dist/cjs/components/ButtonGroup/index.cjs +1 -1
- package/dist/cjs/components/Checkbox/index.cjs +1 -1
- package/dist/cjs/components/CheckboxGroup/index.cjs +1 -1
- package/dist/cjs/components/ConversationCard/index.cjs +1 -1
- package/dist/cjs/components/DatePicker/index.cjs +1 -1
- package/dist/cjs/components/Menu/index.cjs +1 -1
- package/dist/cjs/components/Modal/index.cjs +1 -1
- package/dist/cjs/components/PinInput/index.cjs +1 -1
- package/dist/cjs/components/RadioGroup/index.cjs +1 -1
- package/dist/cjs/components/RatingDots/index.cjs +1 -1
- package/dist/cjs/components/Select/index.cjs +1 -1
- package/dist/cjs/components/Switch/index.cjs +1 -1
- package/dist/cjs/components/TagBlock/index.cjs +1 -1
- package/dist/cjs/components/TextInput/index.cjs +1 -1
- package/dist/cjs/components/Textarea/index.cjs +1 -1
- package/dist/cjs/components/TimePicker/index.cjs +1 -1
- package/dist/cjs/components/TimeRange/index.cjs +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/theme/index.cjs +1 -1
- package/dist/esm/chakra/index.js +101 -95
- package/dist/esm/chakra/index.js.map +1 -1
- package/dist/esm/components/ButtonGroup/index.js +1 -1
- package/dist/esm/components/Checkbox/index.js +1 -1
- package/dist/esm/components/CheckboxGroup/index.js +1 -1
- package/dist/esm/components/ConversationCard/index.js +1 -1
- package/dist/esm/components/DatePicker/index.js +1 -1
- package/dist/esm/components/Menu/index.js +1 -1
- package/dist/esm/components/Modal/index.js +1 -1
- package/dist/esm/components/PinInput/index.js +1 -1
- package/dist/esm/components/RadioGroup/index.js +1 -1
- package/dist/esm/components/RatingDots/index.js +1 -1
- package/dist/esm/components/Select/index.js +1 -1
- package/dist/esm/components/Switch/index.js +1 -1
- package/dist/esm/components/TagBlock/index.js +1 -1
- package/dist/esm/components/TextInput/index.js +1 -1
- package/dist/esm/components/Textarea/index.js +1 -1
- package/dist/esm/components/TimePicker/index.js +1 -1
- package/dist/esm/components/TimeRange/index.js +1 -1
- package/dist/esm/components/index.js +17 -17
- package/dist/esm/index.js +18 -18
- package/dist/esm/theme/index.js +1 -1
- package/dist/types/chakra/index.d.ts +1 -1
- package/dist/types/components/Menu/components/MenuItem/menuItem.component.d.ts +3 -2
- package/dist/types/components/Menu/menu.component.d.ts +1 -1
- package/dist/types/hocs/withFormControl/withFormControl.d.ts +1 -1
- package/package.json +1 -1
- package/dist/chunks/menu.component-B5OYYpa8.js.map +0 -1
- package/dist/chunks/menu.component-BsPmuH77.js +0 -2
- package/dist/chunks/menu.component-BsPmuH77.js.map +0 -1
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
-
import De, { forwardRef as x, useEffect as
|
|
3
|
-
import { B as
|
|
4
|
-
import { I as
|
|
5
|
-
import { W as
|
|
6
|
-
import { F as
|
|
7
|
-
import { W as Ee } from "./textInput.component-
|
|
2
|
+
import De, { forwardRef as x, useEffect as B, useId as F, useRef as X, useCallback as j, useState as Y, useMemo as y } from "react";
|
|
3
|
+
import { B as L } from "./button.component-BWlRjD5a.js";
|
|
4
|
+
import { I as ne } from "./icon.component-BmcWaysM.js";
|
|
5
|
+
import { W as V } from "./text.component-DZkwd4C0.js";
|
|
6
|
+
import { F as T } from "./flex-C2d2LH-K.js";
|
|
7
|
+
import { W as Ee } from "./textInput.component-D2StzwsH.js";
|
|
8
8
|
import { S as He } from "./spinner.component-DRQDBF8j.js";
|
|
9
9
|
import { B as A } from "./box-y05hq0PT.js";
|
|
10
|
-
import { W as Ke, u as Ue } from "./checkbox.component-
|
|
11
|
-
import { a as k, f as g, b as S, u as
|
|
10
|
+
import { W as Ke, u as Ue } from "./checkbox.component-C8IPf20R.js";
|
|
11
|
+
import { a as k, f as g, b as S, u as z, h as qe, i as Je, j as Qe, k as Xe, n as Ye, s as oe, l as se, m as re, P as Ze } from "./use-locale-context-zakBNK5b.js";
|
|
12
12
|
import { c as et } from "./create-slot-recipe-context-DJkLYvCT.js";
|
|
13
13
|
import { b as tt } from "./icons-grAfs3Oz.js";
|
|
14
14
|
import { c as nt, m as ot } from "./index-sWaESJRS.js";
|
|
15
15
|
import { U as d } from "./index-DLvqBeH6.js";
|
|
16
|
-
const [
|
|
16
|
+
const [ae, m] = k({
|
|
17
17
|
name: "MenuContext",
|
|
18
18
|
hookName: "useMenuContext",
|
|
19
19
|
providerName: "<MenuProvider />",
|
|
20
20
|
strict: !1
|
|
21
|
-
}),
|
|
21
|
+
}), ce = x((o, n) => {
|
|
22
22
|
const t = m(), s = d(t.getArrowProps(), o);
|
|
23
23
|
return /* @__PURE__ */ e.jsx(g.div, { ...s, ref: n });
|
|
24
24
|
});
|
|
25
|
-
|
|
26
|
-
const
|
|
25
|
+
ce.displayName = "MenuArrow";
|
|
26
|
+
const ue = x((o, n) => {
|
|
27
27
|
const t = m(), s = d(t.getArrowTipProps(), o);
|
|
28
28
|
return /* @__PURE__ */ e.jsx(g.div, { ...s, ref: n });
|
|
29
29
|
});
|
|
30
|
-
|
|
31
|
-
const [
|
|
30
|
+
ue.displayName = "MenuArrowTip";
|
|
31
|
+
const [W, Bt] = k({
|
|
32
32
|
name: "MenuItemContext",
|
|
33
33
|
hookName: "useMenuItemContext",
|
|
34
34
|
providerName: "<MenuItemProvider />"
|
|
35
|
-
}), [
|
|
35
|
+
}), [ie, le] = k({
|
|
36
36
|
name: "MenuOptionItemPropsContext",
|
|
37
37
|
hookName: "useMenuOptionItemPropsContext",
|
|
38
38
|
providerName: "<MenuOptionItemPropsProvider />"
|
|
39
|
-
}),
|
|
39
|
+
}), de = x((o, n) => {
|
|
40
40
|
const [t, s] = S()(o, [
|
|
41
41
|
"checked",
|
|
42
42
|
"closeOnSelect",
|
|
@@ -48,25 +48,25 @@ const [z, Bt] = k({
|
|
|
48
48
|
...t,
|
|
49
49
|
type: "checkbox"
|
|
50
50
|
}, u = m(), c = d(u.getOptionItemProps(r), s), l = u.getOptionItemState(r);
|
|
51
|
-
return /* @__PURE__ */ e.jsx(
|
|
51
|
+
return /* @__PURE__ */ e.jsx(ie, { value: r, children: /* @__PURE__ */ e.jsx(W, { value: l, children: /* @__PURE__ */ e.jsx(g.div, { ...c, ref: n }) }) });
|
|
52
52
|
});
|
|
53
|
-
|
|
54
|
-
const
|
|
55
|
-
const t = m(), s =
|
|
53
|
+
de.displayName = "MenuCheckboxItem";
|
|
54
|
+
const me = x((o, n) => {
|
|
55
|
+
const t = m(), s = z(), r = d(t.getContentProps(), s.getPresenceProps(), o);
|
|
56
56
|
return s.unmounted ? null : /* @__PURE__ */ e.jsx(g.div, { ...r, ref: qe(s.ref, n) });
|
|
57
57
|
});
|
|
58
|
-
|
|
59
|
-
const
|
|
58
|
+
me.displayName = "MenuContent";
|
|
59
|
+
const pe = x((o, n) => {
|
|
60
60
|
const t = m(), s = d(t.getContextTriggerProps(), o);
|
|
61
61
|
return /* @__PURE__ */ e.jsx(g.button, { ...s, ref: n });
|
|
62
62
|
});
|
|
63
|
-
|
|
64
|
-
const
|
|
63
|
+
pe.displayName = "MenuContextTrigger";
|
|
64
|
+
const he = x((o, n) => {
|
|
65
65
|
const t = m(), s = d(t.getIndicatorProps(), o);
|
|
66
66
|
return /* @__PURE__ */ e.jsx(g.div, { ...s, ref: n });
|
|
67
67
|
});
|
|
68
|
-
|
|
69
|
-
const
|
|
68
|
+
he.displayName = "MenuIndicator";
|
|
69
|
+
const xe = x((o, n) => {
|
|
70
70
|
const [t, s] = S()(o, [
|
|
71
71
|
"closeOnSelect",
|
|
72
72
|
"disabled",
|
|
@@ -74,89 +74,89 @@ const he = x((o, n) => {
|
|
|
74
74
|
"valueText",
|
|
75
75
|
"onSelect"
|
|
76
76
|
]), r = m(), u = d(r.getItemProps(t), s), c = r.getItemState(t);
|
|
77
|
-
return
|
|
77
|
+
return B(() => r.addItemListener({ id: c.id, onSelect: t.onSelect }), [c.id, t.onSelect]), /* @__PURE__ */ e.jsx(W, { value: c, children: /* @__PURE__ */ e.jsx(g.div, { ...u, ref: n }) });
|
|
78
78
|
});
|
|
79
|
-
|
|
80
|
-
const [
|
|
79
|
+
xe.displayName = "MenuItem";
|
|
80
|
+
const [ge, Me] = k({
|
|
81
81
|
name: "MenuItemGroupContext",
|
|
82
82
|
hookName: "useMenuItemGroupContext",
|
|
83
83
|
providerName: "<MenuItemGroupProvider />"
|
|
84
|
-
}),
|
|
85
|
-
const [t, s] = S()(o, ["id"]), r = m(), c = { id:
|
|
86
|
-
return /* @__PURE__ */ e.jsx(
|
|
84
|
+
}), fe = x((o, n) => {
|
|
85
|
+
const [t, s] = S()(o, ["id"]), r = m(), c = { id: F(), ...t }, l = d(r.getItemGroupProps(c), s);
|
|
86
|
+
return /* @__PURE__ */ e.jsx(ge, { value: c, children: /* @__PURE__ */ e.jsx(g.div, { ...l, ref: n }) });
|
|
87
87
|
});
|
|
88
|
-
|
|
89
|
-
const fe = x((o, n) => {
|
|
90
|
-
const t = m(), s = ge(), r = d(t.getItemGroupLabelProps({ htmlFor: s.id }), o);
|
|
91
|
-
return /* @__PURE__ */ e.jsx(g.div, { ...r, ref: n });
|
|
92
|
-
});
|
|
93
|
-
fe.displayName = "MenuItemGroupLabel";
|
|
88
|
+
fe.displayName = "MenuItemGroup";
|
|
94
89
|
const Pe = x((o, n) => {
|
|
95
|
-
const t = m(), s =
|
|
90
|
+
const t = m(), s = Me(), r = d(t.getItemGroupLabelProps({ htmlFor: s.id }), o);
|
|
96
91
|
return /* @__PURE__ */ e.jsx(g.div, { ...r, ref: n });
|
|
97
92
|
});
|
|
98
|
-
Pe.displayName = "
|
|
93
|
+
Pe.displayName = "MenuItemGroupLabel";
|
|
99
94
|
const Ie = x((o, n) => {
|
|
100
|
-
const t = m(), s =
|
|
95
|
+
const t = m(), s = le(), r = d(t.getItemIndicatorProps(s), o);
|
|
101
96
|
return /* @__PURE__ */ e.jsx(g.div, { ...r, ref: n });
|
|
102
97
|
});
|
|
103
|
-
Ie.displayName = "
|
|
98
|
+
Ie.displayName = "MenuItemIndicator";
|
|
104
99
|
const ve = x((o, n) => {
|
|
105
|
-
const t = m(), s = d(t.
|
|
106
|
-
return
|
|
100
|
+
const t = m(), s = le(), r = d(t.getItemTextProps(s), o);
|
|
101
|
+
return /* @__PURE__ */ e.jsx(g.div, { ...r, ref: n });
|
|
107
102
|
});
|
|
108
|
-
ve.displayName = "
|
|
103
|
+
ve.displayName = "MenuItemText";
|
|
109
104
|
const Ce = x((o, n) => {
|
|
105
|
+
const t = m(), s = d(t.getPositionerProps(), o);
|
|
106
|
+
return z().unmounted ? null : /* @__PURE__ */ e.jsx(g.div, { ...s, ref: n });
|
|
107
|
+
});
|
|
108
|
+
Ce.displayName = "MenuPositioner";
|
|
109
|
+
const je = x((o, n) => {
|
|
110
110
|
const [t, s] = S()(o, [
|
|
111
111
|
"closeOnSelect",
|
|
112
112
|
"disabled",
|
|
113
113
|
"value",
|
|
114
114
|
"valueText"
|
|
115
|
-
]), r = m(), u =
|
|
115
|
+
]), r = m(), u = Me(), c = {
|
|
116
116
|
...t,
|
|
117
117
|
checked: u.value === t.value,
|
|
118
118
|
type: "radio",
|
|
119
119
|
onCheckedChange: () => u.onValueChange?.({ value: t.value })
|
|
120
|
-
}, l = d(r.getOptionItemProps(c), s),
|
|
121
|
-
return /* @__PURE__ */ e.jsx(
|
|
120
|
+
}, l = d(r.getOptionItemProps(c), s), M = r.getOptionItemState(c);
|
|
121
|
+
return /* @__PURE__ */ e.jsx(ie, { value: c, children: /* @__PURE__ */ e.jsx(W, { value: M, children: /* @__PURE__ */ e.jsx(g.div, { ...l, ref: n }) }) });
|
|
122
122
|
});
|
|
123
|
-
|
|
124
|
-
const
|
|
123
|
+
je.displayName = "MenuRadioItem";
|
|
124
|
+
const be = x((o, n) => {
|
|
125
125
|
const [t, s] = S()(o, [
|
|
126
126
|
"id",
|
|
127
127
|
"onValueChange",
|
|
128
128
|
"value"
|
|
129
|
-
]), r = m(), c = { id:
|
|
130
|
-
return /* @__PURE__ */ e.jsx(
|
|
129
|
+
]), r = m(), c = { id: F(), ...t }, l = d(r.getItemGroupProps({ id: c.id }), s);
|
|
130
|
+
return /* @__PURE__ */ e.jsx(ge, { value: c, children: /* @__PURE__ */ e.jsx(g.div, { ...l, ref: n }) });
|
|
131
131
|
});
|
|
132
|
-
|
|
133
|
-
const
|
|
134
|
-
const n =
|
|
135
|
-
|
|
132
|
+
be.displayName = "MenuRadioItemGroup";
|
|
133
|
+
const ke = (o) => {
|
|
134
|
+
const n = X(o), t = X(!1);
|
|
135
|
+
B(() => {
|
|
136
136
|
n.current = o;
|
|
137
|
-
}),
|
|
137
|
+
}), B(() => {
|
|
138
138
|
t.current !== !0 && (t.current = !0, n.current());
|
|
139
139
|
}, []);
|
|
140
140
|
}, st = (o) => {
|
|
141
|
-
const n =
|
|
141
|
+
const n = F(), { getRootNode: t } = Je(), { dir: s } = Qe(), r = {
|
|
142
142
|
id: n,
|
|
143
143
|
dir: s,
|
|
144
144
|
getRootNode: t,
|
|
145
145
|
...o
|
|
146
146
|
}, u = Xe(ot, r);
|
|
147
147
|
return { api: nt(u, Ye), service: u };
|
|
148
|
-
}, [
|
|
148
|
+
}, [Se, Ne] = k({
|
|
149
149
|
name: "MenuMachineContext",
|
|
150
150
|
hookName: "useMenuMachineContext",
|
|
151
151
|
providerName: "<MenuMachineProvider />",
|
|
152
152
|
strict: !1
|
|
153
|
-
}), [
|
|
153
|
+
}), [Te, rt] = k({
|
|
154
154
|
name: "MenuMachineContext",
|
|
155
155
|
hookName: "useMenuMachineContext",
|
|
156
156
|
providerName: "<MenuMachineProvider />",
|
|
157
157
|
strict: !1
|
|
158
158
|
}), at = (o) => {
|
|
159
|
-
const [n, t] =
|
|
159
|
+
const [n, t] = oe(o), [s, r] = S()(t, [
|
|
160
160
|
"anchorPoint",
|
|
161
161
|
"aria-label",
|
|
162
162
|
"closeOnSelect",
|
|
@@ -178,26 +178,26 @@ const be = (o) => {
|
|
|
178
178
|
"open",
|
|
179
179
|
"positioning",
|
|
180
180
|
"typeahead"
|
|
181
|
-
]), u = m(), c =
|
|
182
|
-
|
|
183
|
-
c && u && (u.setChild(
|
|
181
|
+
]), u = m(), c = Ne(), { api: l, service: M } = st(s), I = se(d({ present: l.open }, n));
|
|
182
|
+
ke(() => {
|
|
183
|
+
c && u && (u.setChild(M), l.setParent(c));
|
|
184
184
|
});
|
|
185
185
|
const P = j(() => u?.getTriggerItemProps(l), [l, u]);
|
|
186
|
-
return /* @__PURE__ */ e.jsx(
|
|
186
|
+
return /* @__PURE__ */ e.jsx(Te, { value: P, children: /* @__PURE__ */ e.jsx(Se, { value: M, children: /* @__PURE__ */ e.jsx(ae, { value: l, children: /* @__PURE__ */ e.jsx(re, { value: I, ...r }) }) }) });
|
|
187
187
|
}, ct = (o) => {
|
|
188
|
-
const n = m(), t =
|
|
189
|
-
|
|
188
|
+
const n = m(), t = Ne(), [s, { value: r, children: u }] = oe(o), { api: c, service: l } = r, M = se(d({ present: c.open }, s));
|
|
189
|
+
ke(() => {
|
|
190
190
|
t && n && (n.setChild(l), c.setParent(t));
|
|
191
191
|
});
|
|
192
|
-
const
|
|
193
|
-
return /* @__PURE__ */ e.jsx(
|
|
192
|
+
const I = j(() => n?.getTriggerItemProps(c), [c, n]);
|
|
193
|
+
return /* @__PURE__ */ e.jsx(Te, { value: I, children: /* @__PURE__ */ e.jsx(Se, { value: l, children: /* @__PURE__ */ e.jsx(ae, { value: c, children: /* @__PURE__ */ e.jsx(re, { value: M, children: u }) }) }) });
|
|
194
194
|
}, we = x((o, n) => {
|
|
195
195
|
const t = m(), s = d(t.getSeparatorProps(), o);
|
|
196
196
|
return /* @__PURE__ */ e.jsx(g.hr, { ...s, ref: n });
|
|
197
197
|
});
|
|
198
198
|
we.displayName = "MenuSeparator";
|
|
199
|
-
const
|
|
200
|
-
const t = m(), s =
|
|
199
|
+
const ye = x((o, n) => {
|
|
200
|
+
const t = m(), s = z(), r = d(
|
|
201
201
|
{
|
|
202
202
|
...t.getTriggerProps(),
|
|
203
203
|
"aria-controls": s.unmounted ? void 0 : t.getTriggerProps()["aria-controls"]
|
|
@@ -206,29 +206,29 @@ const Te = x((o, n) => {
|
|
|
206
206
|
);
|
|
207
207
|
return /* @__PURE__ */ e.jsx(g.button, { ...r, ref: n });
|
|
208
208
|
});
|
|
209
|
-
|
|
210
|
-
const
|
|
209
|
+
ye.displayName = "MenuTrigger";
|
|
210
|
+
const Ae = x((o, n) => {
|
|
211
211
|
const t = rt(), s = d(t?.() ?? {}, o);
|
|
212
212
|
return /* @__PURE__ */ e.jsx(g.div, { ...s, ref: n });
|
|
213
213
|
});
|
|
214
|
-
|
|
214
|
+
Ae.displayName = "MenuTriggerItem";
|
|
215
215
|
const {
|
|
216
|
-
withRootProvider:
|
|
216
|
+
withRootProvider: Ge,
|
|
217
217
|
withContext: p
|
|
218
218
|
} = et({ key: "menu" });
|
|
219
|
-
|
|
219
|
+
Ge(
|
|
220
220
|
ct
|
|
221
221
|
);
|
|
222
|
-
const ut =
|
|
222
|
+
const ut = Ge(at, {
|
|
223
223
|
defaultProps: { lazyMount: !0, unmountOnExit: !0 }
|
|
224
224
|
}), it = p(
|
|
225
|
-
|
|
225
|
+
ye,
|
|
226
226
|
"trigger",
|
|
227
227
|
{ forwardAsChild: !0 }
|
|
228
228
|
);
|
|
229
|
-
p(
|
|
229
|
+
p(pe, "contextTrigger", { forwardAsChild: !0 });
|
|
230
230
|
const lt = p(
|
|
231
|
-
|
|
231
|
+
Ce,
|
|
232
232
|
"positioner",
|
|
233
233
|
{ forwardAsChild: !0 }
|
|
234
234
|
);
|
|
@@ -238,35 +238,35 @@ p(
|
|
|
238
238
|
{ forwardAsChild: !0 }
|
|
239
239
|
);
|
|
240
240
|
const dt = p(
|
|
241
|
-
|
|
241
|
+
me,
|
|
242
242
|
"content",
|
|
243
243
|
{ forwardAsChild: !0 }
|
|
244
244
|
), mt = p(
|
|
245
|
-
|
|
245
|
+
ue,
|
|
246
246
|
"arrowTip",
|
|
247
247
|
{ forwardAsChild: !0 }
|
|
248
248
|
);
|
|
249
249
|
p(
|
|
250
|
-
|
|
250
|
+
ce,
|
|
251
251
|
"arrow",
|
|
252
252
|
{ forwardAsChild: !0, defaultProps: { children: /* @__PURE__ */ e.jsx(mt, {}) } }
|
|
253
253
|
);
|
|
254
254
|
p(
|
|
255
|
-
|
|
255
|
+
he,
|
|
256
256
|
"indicator",
|
|
257
257
|
{ forwardAsChild: !0 }
|
|
258
258
|
);
|
|
259
259
|
const pt = p(
|
|
260
|
-
|
|
260
|
+
fe,
|
|
261
261
|
"itemGroup",
|
|
262
262
|
{ forwardAsChild: !0 }
|
|
263
|
-
), ht = p(
|
|
264
|
-
|
|
263
|
+
), ht = p(Pe, "itemGroupLabel", { forwardAsChild: !0 }), xt = p(
|
|
264
|
+
xe,
|
|
265
265
|
"item",
|
|
266
266
|
{ forwardAsChild: !0 }
|
|
267
|
-
), gt = p(
|
|
267
|
+
), gt = p(Ae, "item", { forwardAsChild: !0 });
|
|
268
268
|
p(
|
|
269
|
-
|
|
269
|
+
ve,
|
|
270
270
|
"itemText",
|
|
271
271
|
{ forwardAsChild: !0 }
|
|
272
272
|
);
|
|
@@ -274,14 +274,14 @@ p(
|
|
|
274
274
|
"kbd",
|
|
275
275
|
"itemCommand"
|
|
276
276
|
);
|
|
277
|
-
p(
|
|
277
|
+
p(Ie, "itemIndicator", {
|
|
278
278
|
forwardAsChild: !0,
|
|
279
279
|
defaultProps: { children: /* @__PURE__ */ e.jsx(tt, { boxSize: "4" }) }
|
|
280
280
|
});
|
|
281
|
-
const Mt = p(
|
|
282
|
-
p(
|
|
281
|
+
const Mt = p(de, "item", { forwardAsChild: !0 });
|
|
282
|
+
p(be, "itemGroup", { forwardAsChild: !0 });
|
|
283
283
|
p(
|
|
284
|
-
|
|
284
|
+
je,
|
|
285
285
|
"item",
|
|
286
286
|
{ forwardAsChild: !0 }
|
|
287
287
|
);
|
|
@@ -293,7 +293,7 @@ const ft = ({
|
|
|
293
293
|
variant: r,
|
|
294
294
|
...u
|
|
295
295
|
}) => /* @__PURE__ */ e.jsxs(
|
|
296
|
-
|
|
296
|
+
L,
|
|
297
297
|
{
|
|
298
298
|
className: "Menu__Button",
|
|
299
299
|
"data-testid": "kibble-menu-button",
|
|
@@ -302,7 +302,7 @@ const ft = ({
|
|
|
302
302
|
...u,
|
|
303
303
|
children: [
|
|
304
304
|
t && /* @__PURE__ */ e.jsx(
|
|
305
|
-
|
|
305
|
+
V,
|
|
306
306
|
{
|
|
307
307
|
className: "Menu__ButtonText",
|
|
308
308
|
"data-testid": "kibble-menu-button-text",
|
|
@@ -315,11 +315,11 @@ const ft = ({
|
|
|
315
315
|
}
|
|
316
316
|
),
|
|
317
317
|
!o && /* @__PURE__ */ e.jsx(
|
|
318
|
-
|
|
318
|
+
T,
|
|
319
319
|
{
|
|
320
320
|
className: "Menu__ButtonCaret",
|
|
321
321
|
"data-testid": "kibble-menu-button-caret",
|
|
322
|
-
children: /* @__PURE__ */ e.jsx(
|
|
322
|
+
children: /* @__PURE__ */ e.jsx(ne, { name: "chevronDown", size: n === "lg" ? "sm" : "xs" })
|
|
323
323
|
}
|
|
324
324
|
)
|
|
325
325
|
]
|
|
@@ -336,7 +336,8 @@ const ft = ({
|
|
|
336
336
|
const l = j(() => {
|
|
337
337
|
t && t(c.value);
|
|
338
338
|
}, [t, c.value]);
|
|
339
|
-
if (r === "submenu")
|
|
339
|
+
if (r === "submenu") {
|
|
340
|
+
const { valueText: M, listProps: I } = c;
|
|
340
341
|
return /* @__PURE__ */ e.jsx(
|
|
341
342
|
It,
|
|
342
343
|
{
|
|
@@ -346,9 +347,10 @@ const ft = ({
|
|
|
346
347
|
className: "Menu__Item--Submenu",
|
|
347
348
|
"data-testid": "kibble-menu-item-submenu",
|
|
348
349
|
justifyContent: "space-between",
|
|
350
|
+
"aria-valuetext": M,
|
|
349
351
|
children: [
|
|
350
352
|
/* @__PURE__ */ e.jsx(
|
|
351
|
-
|
|
353
|
+
$,
|
|
352
354
|
{
|
|
353
355
|
label: o,
|
|
354
356
|
leftElement: n,
|
|
@@ -356,30 +358,32 @@ const ft = ({
|
|
|
356
358
|
variant: u
|
|
357
359
|
}
|
|
358
360
|
),
|
|
359
|
-
/* @__PURE__ */ e.jsx(
|
|
361
|
+
/* @__PURE__ */ e.jsx(ne, { name: "chevronRight", size: "sm" })
|
|
360
362
|
]
|
|
361
363
|
}
|
|
362
364
|
),
|
|
363
|
-
|
|
365
|
+
portalled: !0,
|
|
366
|
+
listProps: I
|
|
364
367
|
}
|
|
365
368
|
);
|
|
369
|
+
}
|
|
366
370
|
if (r === "checkbox") {
|
|
367
|
-
const { checked:
|
|
371
|
+
const { checked: M, value: I, closeOnSelect: P, ...G } = c;
|
|
368
372
|
return /* @__PURE__ */ e.jsxs(
|
|
369
373
|
Mt,
|
|
370
374
|
{
|
|
371
375
|
className: "Menu__Item--Checkbox",
|
|
372
376
|
"data-testid": "kibble-menu-item-checkbox",
|
|
373
|
-
value:
|
|
374
|
-
checked: !!
|
|
377
|
+
value: I,
|
|
378
|
+
checked: !!M,
|
|
375
379
|
onCheckedChange: l,
|
|
376
|
-
closeOnSelect:
|
|
380
|
+
closeOnSelect: P || !1,
|
|
377
381
|
gap: 3,
|
|
378
|
-
...
|
|
382
|
+
...G,
|
|
379
383
|
children: [
|
|
380
|
-
/* @__PURE__ */ e.jsx(Ke, { checked: !!
|
|
384
|
+
/* @__PURE__ */ e.jsx(Ke, { checked: !!M, size: "md" }),
|
|
381
385
|
/* @__PURE__ */ e.jsx(
|
|
382
|
-
|
|
386
|
+
$,
|
|
383
387
|
{
|
|
384
388
|
label: o,
|
|
385
389
|
leftElement: n,
|
|
@@ -392,38 +396,42 @@ const ft = ({
|
|
|
392
396
|
);
|
|
393
397
|
}
|
|
394
398
|
if (r === "default") {
|
|
395
|
-
const {
|
|
399
|
+
const {
|
|
400
|
+
selected: M = !1,
|
|
401
|
+
value: I,
|
|
402
|
+
...P
|
|
403
|
+
} = c;
|
|
396
404
|
return /* @__PURE__ */ e.jsx(
|
|
397
405
|
xt,
|
|
398
406
|
{
|
|
399
407
|
className: "Menu__Item--Default",
|
|
400
408
|
"data-testid": "kibble-menu-item-default",
|
|
401
|
-
value:
|
|
409
|
+
value: I,
|
|
402
410
|
onSelect: l,
|
|
403
|
-
...
|
|
411
|
+
...M && { bgColor: "background.secondaryAlpha.hover" },
|
|
404
412
|
...P,
|
|
405
413
|
children: /* @__PURE__ */ e.jsx(
|
|
406
|
-
|
|
414
|
+
$,
|
|
407
415
|
{
|
|
408
416
|
label: o,
|
|
409
417
|
leftElement: n,
|
|
410
418
|
shouldTruncateText: s,
|
|
411
|
-
variant:
|
|
419
|
+
variant: M ? "info" : u
|
|
412
420
|
}
|
|
413
421
|
)
|
|
414
422
|
}
|
|
415
423
|
);
|
|
416
424
|
}
|
|
417
425
|
return /* @__PURE__ */ e.jsx(e.Fragment, {});
|
|
418
|
-
},
|
|
426
|
+
}, $ = ({
|
|
419
427
|
label: o,
|
|
420
428
|
leftElement: n,
|
|
421
429
|
shouldTruncateText: t,
|
|
422
430
|
variant: s
|
|
423
|
-
}) => /* @__PURE__ */ e.jsxs(
|
|
431
|
+
}) => /* @__PURE__ */ e.jsxs(T, { className: "Menu__ItemLabel", alignItems: "center", gap: 3, children: [
|
|
424
432
|
n,
|
|
425
|
-
typeof o == "string" ? /* @__PURE__ */ e.jsx(
|
|
426
|
-
] }),
|
|
433
|
+
typeof o == "string" ? /* @__PURE__ */ e.jsx(V, { size: "sm", truncated: t, variant: s, children: o }) : o
|
|
434
|
+
] }), Z = ({
|
|
427
435
|
groupName: o,
|
|
428
436
|
hasSelectedItems: n = !1,
|
|
429
437
|
onToggle: t
|
|
@@ -436,16 +444,16 @@ const ft = ({
|
|
|
436
444
|
"data-testid": "kibble-menu-toggle-buttons",
|
|
437
445
|
...s ? { textAlign: "right", w: "50%" } : { mt: 2 },
|
|
438
446
|
children: s ? /* @__PURE__ */ e.jsx(e.Fragment, { children: n ? /* @__PURE__ */ e.jsx(
|
|
439
|
-
|
|
447
|
+
te,
|
|
440
448
|
{
|
|
441
449
|
hasSelectedItems: n,
|
|
442
450
|
groupName: o,
|
|
443
451
|
onToggle: t
|
|
444
452
|
}
|
|
445
|
-
) : /* @__PURE__ */ e.jsx(
|
|
446
|
-
/* @__PURE__ */ e.jsx(
|
|
453
|
+
) : /* @__PURE__ */ e.jsx(ee, { groupName: o, onToggle: t }) }) : /* @__PURE__ */ e.jsxs(T, { justifyContent: "space-between", children: [
|
|
454
|
+
/* @__PURE__ */ e.jsx(ee, { groupName: o, onToggle: t }),
|
|
447
455
|
/* @__PURE__ */ e.jsx(
|
|
448
|
-
|
|
456
|
+
te,
|
|
449
457
|
{
|
|
450
458
|
hasSelectedItems: n,
|
|
451
459
|
groupName: o,
|
|
@@ -455,23 +463,23 @@ const ft = ({
|
|
|
455
463
|
] })
|
|
456
464
|
}
|
|
457
465
|
);
|
|
458
|
-
},
|
|
466
|
+
}, ee = ({
|
|
459
467
|
groupName: o,
|
|
460
468
|
onToggle: n
|
|
461
469
|
}) => /* @__PURE__ */ e.jsx(
|
|
462
|
-
|
|
470
|
+
L,
|
|
463
471
|
{
|
|
464
472
|
variant: "ghost",
|
|
465
473
|
size: "xs",
|
|
466
474
|
onClick: () => n({ groupName: o, clear: !1 }),
|
|
467
475
|
children: "Select All"
|
|
468
476
|
}
|
|
469
|
-
),
|
|
477
|
+
), te = ({
|
|
470
478
|
hasSelectedItems: o,
|
|
471
479
|
groupName: n,
|
|
472
480
|
onToggle: t
|
|
473
481
|
}) => /* @__PURE__ */ e.jsx(
|
|
474
|
-
|
|
482
|
+
L,
|
|
475
483
|
{
|
|
476
484
|
variant: "ghostNeutral",
|
|
477
485
|
iconName: "arrowCircle",
|
|
@@ -491,65 +499,65 @@ const ft = ({
|
|
|
491
499
|
canSelectAll: u,
|
|
492
500
|
canSelectGroups: c,
|
|
493
501
|
emptyStateText: l = "No results found",
|
|
494
|
-
loading:
|
|
495
|
-
maxH:
|
|
502
|
+
loading: M,
|
|
503
|
+
maxH: I = "480px",
|
|
496
504
|
menuItems: P = [],
|
|
497
|
-
minW:
|
|
498
|
-
onSearch:
|
|
499
|
-
onSelect:
|
|
500
|
-
onSelectAll:
|
|
501
|
-
searchable:
|
|
505
|
+
minW: G = "240px",
|
|
506
|
+
onSearch: O,
|
|
507
|
+
onSelect: D,
|
|
508
|
+
onSelectAll: E,
|
|
509
|
+
searchable: H,
|
|
502
510
|
searchPlaceholder: Oe = "Search...",
|
|
503
511
|
shouldTruncateText: _e,
|
|
504
512
|
...Re
|
|
505
|
-
} = n || {}, [$e,
|
|
513
|
+
} = n || {}, [$e, _] = Y(""), [K, R] = Y(P), U = y(() => {
|
|
506
514
|
const a = {};
|
|
507
|
-
return
|
|
508
|
-
const h = i.groupLabel || "default",
|
|
509
|
-
a[h] || (a[h] = {}), a[h][
|
|
515
|
+
return K?.forEach((i) => {
|
|
516
|
+
const h = i.groupLabel || "default", f = i.type === "checkbox" ? "checkbox" : "default";
|
|
517
|
+
a[h] || (a[h] = {}), a[h][f] || (a[h][f] = []), a[h][f].push(i);
|
|
510
518
|
}), a;
|
|
511
|
-
}, [
|
|
519
|
+
}, [K]), q = y(() => Object.entries(U), [U]), b = y(
|
|
512
520
|
() => P?.filter((a) => a.type === "checkbox") || [],
|
|
513
521
|
[P]
|
|
514
|
-
), Be = y(() => (b?.filter((i) => i.checked) || []).map((i) => i.value), [b]),
|
|
522
|
+
), Be = y(() => (b?.filter((i) => i.checked) || []).map((i) => i.value), [b]), v = Ue({
|
|
515
523
|
defaultValue: Be
|
|
516
|
-
}),
|
|
524
|
+
}), J = j(
|
|
517
525
|
(a) => {
|
|
518
526
|
const i = a.target.value;
|
|
519
|
-
if (
|
|
520
|
-
|
|
527
|
+
if (_(i), O)
|
|
528
|
+
O(a);
|
|
521
529
|
else if (i === "" || !i)
|
|
522
|
-
|
|
530
|
+
R(P);
|
|
523
531
|
else {
|
|
524
|
-
const h = P.filter((
|
|
525
|
-
|
|
532
|
+
const h = P.filter((f) => !!(typeof f.label == "string" ? f.label : f.valueText)?.toLowerCase().includes(i.toLowerCase()));
|
|
533
|
+
R(h);
|
|
526
534
|
}
|
|
527
535
|
},
|
|
528
|
-
[P,
|
|
529
|
-
),
|
|
536
|
+
[P, O]
|
|
537
|
+
), Q = j(
|
|
530
538
|
({ groupName: a, clear: i }) => {
|
|
531
539
|
let h = [];
|
|
532
540
|
if (a) {
|
|
533
|
-
const
|
|
534
|
-
h = i ?
|
|
541
|
+
const f = b.filter((C) => C.groupLabel === a).map((C) => C.value);
|
|
542
|
+
h = i ? v.value.filter((C) => !f.includes(C)) : [...v.value, ...f];
|
|
535
543
|
} else
|
|
536
|
-
h = i ? [] : b.map((
|
|
537
|
-
|
|
544
|
+
h = i ? [] : b.map((f) => f.value);
|
|
545
|
+
E?.(h), v.setValue(h);
|
|
538
546
|
},
|
|
539
|
-
[b,
|
|
547
|
+
[b, E, v]
|
|
540
548
|
), Fe = j(
|
|
541
549
|
(a) => {
|
|
542
550
|
a.onSelect?.(a.value);
|
|
543
|
-
const i =
|
|
544
|
-
|
|
551
|
+
const i = v.value, h = v.isChecked(a.value);
|
|
552
|
+
D?.(
|
|
545
553
|
a.value,
|
|
546
|
-
h ? i.filter((
|
|
547
|
-
), a.type === "checkbox" &&
|
|
554
|
+
h ? i.filter((f) => f !== a.value) : [...i, a.value]
|
|
555
|
+
), a.type === "checkbox" && v.toggleValue(a.value);
|
|
548
556
|
},
|
|
549
|
-
[
|
|
557
|
+
[D, v]
|
|
550
558
|
), Le = j(
|
|
551
559
|
(a) => {
|
|
552
|
-
a || (
|
|
560
|
+
a || (_(""), R(P));
|
|
553
561
|
},
|
|
554
562
|
[P]
|
|
555
563
|
);
|
|
@@ -575,29 +583,29 @@ const ft = ({
|
|
|
575
583
|
{
|
|
576
584
|
className: "Menu__Content",
|
|
577
585
|
"data-testid": "kibble-menu-content",
|
|
578
|
-
maxH:
|
|
579
|
-
minW:
|
|
586
|
+
maxH: I,
|
|
587
|
+
minW: G,
|
|
580
588
|
...Re,
|
|
581
589
|
children: [
|
|
582
|
-
(
|
|
590
|
+
(H || u) && /* @__PURE__ */ e.jsxs(
|
|
583
591
|
A,
|
|
584
592
|
{
|
|
585
593
|
className: "Menu__Header",
|
|
586
594
|
"data-testid": "kibble-menu-header",
|
|
587
595
|
m: "0 12px 8px",
|
|
588
596
|
children: [
|
|
589
|
-
|
|
597
|
+
H && /* @__PURE__ */ e.jsx(
|
|
590
598
|
Ee,
|
|
591
599
|
{
|
|
592
600
|
className: "Menu__SearchBar",
|
|
593
601
|
"data-testid": "kibble-menu-search-bar",
|
|
594
602
|
placeholder: Oe,
|
|
595
|
-
onChange:
|
|
603
|
+
onChange: J,
|
|
596
604
|
size: "sm",
|
|
597
605
|
value: $e,
|
|
598
606
|
clearable: !0,
|
|
599
607
|
onClear: () => {
|
|
600
|
-
|
|
608
|
+
_(""), J({
|
|
601
609
|
target: { value: "" }
|
|
602
610
|
});
|
|
603
611
|
},
|
|
@@ -605,34 +613,34 @@ const ft = ({
|
|
|
605
613
|
}
|
|
606
614
|
),
|
|
607
615
|
u && !!b.length && /* @__PURE__ */ e.jsx(
|
|
608
|
-
|
|
616
|
+
Z,
|
|
609
617
|
{
|
|
610
|
-
onToggle:
|
|
611
|
-
hasSelectedItems: !!
|
|
618
|
+
onToggle: Q,
|
|
619
|
+
hasSelectedItems: !!v.value.length
|
|
612
620
|
}
|
|
613
621
|
)
|
|
614
622
|
]
|
|
615
623
|
}
|
|
616
624
|
),
|
|
617
|
-
|
|
618
|
-
const h = a === "default",
|
|
625
|
+
M ? /* @__PURE__ */ e.jsx(T, { justifyContent: "center", py: 5, children: /* @__PURE__ */ e.jsx(He, {}) }) : /* @__PURE__ */ e.jsx(A, { className: "Menu__List", "data-testid": "kibble-menu-list", children: q.length ? /* @__PURE__ */ e.jsx(e.Fragment, { children: q.map(([a, i]) => {
|
|
626
|
+
const h = a === "default", f = Object.keys(i), C = h ? De.Fragment : pt, Ve = i.checkbox?.map(
|
|
619
627
|
(N) => N.value
|
|
620
628
|
)?.some(
|
|
621
|
-
(N) =>
|
|
629
|
+
(N) => v.value.includes(N)
|
|
622
630
|
);
|
|
623
631
|
return /* @__PURE__ */ e.jsxs(C, { children: [
|
|
624
632
|
!h && /* @__PURE__ */ e.jsx(ht, { children: /* @__PURE__ */ e.jsxs(
|
|
625
|
-
|
|
633
|
+
T,
|
|
626
634
|
{
|
|
627
635
|
alignItems: "center",
|
|
628
636
|
justifyContent: "space-between",
|
|
629
637
|
children: [
|
|
630
638
|
a,
|
|
631
|
-
c &&
|
|
632
|
-
|
|
639
|
+
c && f.includes("checkbox") && /* @__PURE__ */ e.jsx(
|
|
640
|
+
Z,
|
|
633
641
|
{
|
|
634
642
|
groupName: a,
|
|
635
|
-
onToggle:
|
|
643
|
+
onToggle: Q,
|
|
636
644
|
hasSelectedItems: Ve
|
|
637
645
|
}
|
|
638
646
|
)
|
|
@@ -640,21 +648,21 @@ const ft = ({
|
|
|
640
648
|
}
|
|
641
649
|
) }),
|
|
642
650
|
Object.entries(i).map(
|
|
643
|
-
([N, ze]) => ze.map((
|
|
651
|
+
([N, ze]) => ze.map((w, We) => /* @__PURE__ */ e.jsx(
|
|
644
652
|
Pt,
|
|
645
653
|
{
|
|
646
|
-
...
|
|
654
|
+
...w,
|
|
647
655
|
shouldTruncateText: _e,
|
|
648
|
-
...
|
|
649
|
-
checked:
|
|
656
|
+
...w.type === "checkbox" && {
|
|
657
|
+
checked: v.isChecked(w.value)
|
|
650
658
|
},
|
|
651
|
-
onSelect: () => Fe(
|
|
659
|
+
onSelect: () => Fe(w)
|
|
652
660
|
},
|
|
653
661
|
`menu-item-${a}-${N}-${We}`
|
|
654
662
|
))
|
|
655
663
|
)
|
|
656
664
|
] }, a);
|
|
657
|
-
}) }) : /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(A, { textAlign: "center", p: 3, children: /* @__PURE__ */ e.jsx(
|
|
665
|
+
}) }) : /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(A, { textAlign: "center", p: 3, children: /* @__PURE__ */ e.jsx(V, { size: "sm", variant: "subtle", children: l }) }) }) })
|
|
658
666
|
]
|
|
659
667
|
}
|
|
660
668
|
) }) })
|
|
@@ -665,4 +673,4 @@ const ft = ({
|
|
|
665
673
|
export {
|
|
666
674
|
It as M
|
|
667
675
|
};
|
|
668
|
-
//# sourceMappingURL=menu.component-
|
|
676
|
+
//# sourceMappingURL=menu.component-toq-fDY8.js.map
|