@gobolt/genesis 0.0.11 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/ClockCircleOutlined-BaXQuLIn.js +13 -0
- package/dist/{Compact-DBh6nSYB.js → Compact-Du9689ax.js} +8 -8
- package/dist/{ContextIsolator-CwuJooYf.js → ContextIsolator-BmfhJgG0.js} +2 -2
- package/dist/{DownOutlined-5-15jS0h.js → DownOutlined-Dcq69ZKM.js} +9 -9
- package/dist/{EllipsisOutlined-CJ2pgE2d.js → EllipsisOutlined-DGMph0Bj.js} +110 -110
- package/dist/{Keyframes-sPZXYuXt.js → Keyframes-C9_aCDvn.js} +1 -1
- package/dist/{Overflow-DdNKJLQh.js → Overflow-DWf4XIal.js} +31 -31
- package/dist/{Skeleton-B3vg9CbL.js → Skeleton-BVN4pcVe.js} +2 -2
- package/dist/TextArea-Bkf9hh7l.js +708 -0
- package/dist/{Typography-DqI7RslA.js → Typography-CoZ5qD-t.js} +3 -3
- package/dist/{button-B2Rgggx2.js → button-BwqpCxVM.js} +5 -5
- package/dist/components/Avatar/Avatar.js +3 -3
- package/dist/components/Avatar/__tests__/Avatar.test.js +1 -1
- package/dist/components/Avatar/styles.js +42 -42
- package/dist/components/Badge/Badge.js +3 -3
- package/dist/components/Badge/__tests__/Badge.test.js +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/components/Breadcrumb/__tests__/Breadcrumb.test.js +1 -1
- package/dist/components/Breadcrumb/styles.js +4 -4
- package/dist/components/Button/__tests__/Button.test.js +1 -1
- package/dist/components/Button/styles.js +1 -1
- package/dist/components/Card/__tests__/Card.test.js +1 -1
- package/dist/components/Card/styles.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +3 -3
- package/dist/components/Checkbox/__tests__/Checkbox.test.js +1 -1
- package/dist/components/Checkbox/styles.js +1 -1
- package/dist/components/Dashboard/__stories__/DashboardLayoutContent.js +8 -8
- package/dist/components/Dashboard/__stories__/DashboardLayoutHeader.js +4 -4
- package/dist/components/Dashboard/__tests__/Dashboard.test.js +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +6 -0
- package/dist/components/DatePicker/DatePicker.js +5 -0
- package/dist/components/DatePicker/__stories__/DatePicker.stories.d.ts +10 -0
- package/dist/components/DatePicker/__tests__/DatePicker.test.d.ts +1 -0
- package/dist/components/DatePicker/__tests__/DatePicker.test.js +19 -0
- package/dist/components/DatePicker/index.d.ts +2 -0
- package/dist/components/DatePicker/index.js +4 -0
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +5 -0
- package/dist/components/DateRangePicker/DateRangePicker.js +5 -0
- package/dist/components/DateRangePicker/__stories__/DateRangePicker.stories.d.ts +9 -0
- package/dist/components/DateRangePicker/__tests__/DateRangePicker.test.d.ts +1 -0
- package/dist/components/DateRangePicker/__tests__/DateRangePicker.test.js +23 -0
- package/dist/components/DateRangePicker/index.d.ts +2 -0
- package/dist/components/DateRangePicker/index.js +4 -0
- package/dist/components/ErrorBoundary/ErrorBoundary.js +3 -3
- package/dist/components/ErrorBoundary/__tests__/ErrorBoundary.test.js +1 -1
- package/dist/components/ErrorBoundaryFallback/ErrorBoundaryFallback.js +3 -3
- package/dist/components/ErrorBoundaryFallback/styles.js +1 -1
- package/dist/components/Form/Form.js +2 -2
- package/dist/components/Form/__stories__/FormStory.js +4 -4
- package/dist/components/Form/__tests__/form.test.js +2 -2
- package/dist/components/Form/index.js +1 -1
- package/dist/components/Form/styles.js +1 -1
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Input/__tests__/Input.test.js +1 -1
- package/dist/components/Input/styles.js +1 -1
- package/dist/components/Layout/Content/ResponsiveContent.js +3 -3
- package/dist/components/Layout/MainLayout/MainLayout.js +1 -1
- package/dist/components/Layout/__tests__/Layout.test.js +1 -1
- package/dist/components/Message/Message.js +3 -3
- package/dist/components/Message/__tests__/Message.test.js +1 -1
- package/dist/components/Notification/Notification.js +3 -3
- package/dist/components/Notification/NotificationBadge/__tests__/NotificationBadge.test.js +1 -1
- package/dist/components/Notification/__tests__/Notification.test.js +1 -1
- package/dist/components/Popover/Popover.js +1 -1
- package/dist/components/Popover/__tests__/Popover.test.js +1 -1
- package/dist/components/Popover/styles.js +1 -1
- package/dist/components/Progress/Progress.js +3 -3
- package/dist/components/Progress/Progress.util.js +3 -3
- package/dist/components/Progress/ProgressText.js +3 -3
- package/dist/components/Progress/__tests__/Progress.test.js +1 -1
- package/dist/components/Progress/styles.js +3 -3
- package/dist/components/Radio/Radio.js +3 -3
- package/dist/components/Radio/RadioGroup.js +1 -1
- package/dist/components/Radio/__tests__/RadioGroup.test.js +1 -1
- package/dist/components/Row/Row.js +1 -1
- package/dist/components/Row/RowActions/RowActions.js +3 -3
- package/dist/components/Row/RowLabelValue/RowLabelValue.js +3 -3
- package/dist/components/Row/RowLabelValue/styles.js +1 -1
- package/dist/components/Row/__tests__/Row.test.js +1 -1
- package/dist/components/SegmentedControls/__tests__/SegmentedControls.test.js +1 -1
- package/dist/components/SegmentedControls/styles.js +27 -27
- package/dist/components/Select/Select.js +1 -1
- package/dist/components/Select/__tests__/Select.test.js +1 -1
- package/dist/components/Select/styles.js +1 -1
- package/dist/components/Shapes/__tests__/Shapes.test.js +1 -1
- package/dist/components/Switch/__tests__/Switch.test.js +1 -1
- package/dist/components/Switch/styles.js +15 -15
- package/dist/components/Table/Table.js +1 -1
- package/dist/components/Table/__mocks__/table-mocks.js +3 -3
- package/dist/components/Table/__tests__/Table.test.js +1 -1
- package/dist/components/Table/styles.js +1 -1
- package/dist/components/Tabs/__tests__/Tabs.test.js +1 -1
- package/dist/components/Tabs/styles.js +1 -1
- package/dist/components/Tile/__tests__/Tile.test.js +1 -1
- package/dist/components/Toast/Toast.js +3 -3
- package/dist/components/Toast/__tests__/Toast.test.js +2 -2
- package/dist/components/Toast/index.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +3 -3
- package/dist/components/Tooltip/__tests__/Tooltip.test.js +1 -1
- package/dist/components/Tooltip/styles.js +1 -1
- package/dist/components/Typography/Typography.js +1 -1
- package/dist/components/Typography/__tests__/Typography.test.js +2 -2
- package/dist/components/Typography/index.js +1 -1
- package/dist/components/Typography/styles.js +1 -1
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.js +46 -42
- package/dist/{context-Cx7GtZpz.js → context-DIFtNa4d.js} +70 -70
- package/dist/{dropdown-zGGFIyJ_.js → dropdown-Dp_PTQ2u.js} +60 -59
- package/dist/genesis/GenesisThemeBreakdown.js +86 -44
- package/dist/genesis/labs/Lab.stories.d.ts +6 -0
- package/dist/genesis/styles.js +2 -2
- package/dist/{index-CdiHBmVe.js → index-BPVue1Yd.js} +44 -44
- package/dist/{index-CRotrkWm.js → index-BQM5OniU.js} +7 -7
- package/dist/{index-BTGF--50.js → index-B_1Ge8na.js} +20 -19
- package/dist/{index-ByspLxrB.js → index-BbTV2Cw5.js} +32 -31
- package/dist/index-BeGv28kJ.js +5173 -0
- package/dist/{index-Dyl-ddV6.js → index-BpZSuIUV.js} +16 -16
- package/dist/{index-CodMmNWv.js → index-BvOLXELm.js} +3 -3
- package/dist/{index-hoPiccJv.js → index-CLSrpQRW.js} +9 -8
- package/dist/{index-D0P16DlX.js → index-CbVOl2U6.js} +26 -24
- package/dist/{index-DWUXwgXK.js → index-D0U6r5O7.js} +265 -294
- package/dist/{index-BW_7pvTr.js → index-DEu2PVzQ.js} +4 -4
- package/dist/{index-DmZOkMjs.js → index-DNQ-jnBx.js} +1207 -1514
- package/dist/index-DOsPeIWJ.js +1000 -0
- package/dist/{index-CSPlXIlA.js → index-DRGX1Wem.js} +7 -7
- package/dist/index-DWjq9XYj.js +899 -0
- package/dist/index.js +53 -49
- package/dist/motion-CUN72xsH.js +33 -0
- package/dist/providers/GenesisProvider.js +1 -1
- package/dist/providers/ToastProvider.js +3 -3
- package/dist/providers/index.js +1 -1
- package/dist/providers/useGenesis.js +1 -1
- package/dist/{responsiveObserver-O1kw80RG.js → responsiveObserver-dCkpy7Cb.js} +1 -1
- package/dist/roundedArrow-DI_Q-xdU.js +65 -0
- package/dist/{setup-CKu7-AfI.js → setup-CUbCc8fQ.js} +2 -2
- package/dist/styles/design-tokens/border-tokens/BorderTokenList.js +7 -7
- package/dist/styles/design-tokens/sizing-tokens/SizingTokenList.js +3 -3
- package/dist/styles/theme/genesis-theme.js +211 -349
- package/dist/styles/theme/theme-tree/ThemeTree.js +114 -113
- package/dist/{styles-BSD221S5.js → styles-CWdUpZom.js} +12 -12
- package/dist/{styles-BDbHpHsc.js → styles-D1vKDy9V.js} +9 -9
- package/dist/{styles-D9iYILpv.js → styles-qerRs7Rn.js} +493 -492
- package/dist/test/setup.js +2 -2
- package/dist/{toArray-DGvPoJP_.js → toArray-U3Az44CO.js} +1 -1
- package/dist/{useBreakpoint-CAMzKscx.js → useBreakpoint-TkMv121M.js} +2 -2
- package/dist/{useCSSVarCls-C-MlZC6a.js → useCSSVarCls-Dau77fzS.js} +1 -1
- package/dist/useIcons-Ck4JP1m9.js +321 -0
- package/dist/{useLocale-DWRfeMSS.js → useLocale-CTfNpakL.js} +1 -1
- package/dist/{useMergedState-BoELfaU9.js → useMergedState-D6toxSxh.js} +1 -1
- package/dist/{useSize-CPo2bUE3.js → useSize-DSq4r6zy.js} +1 -1
- package/dist/{useVariants-Cin23jEC.js → useVariants-DrLzUVLU.js} +2 -2
- package/dist/{useZIndex-D81lkWy4.js → useZIndex-DhyHuZTN.js} +1 -1
- package/dist/utils/icon-util.js +38 -44
- package/package.json +2 -1
- package/dist/TextArea-CKWbFr0u.js +0 -1698
- package/dist/index-CqqwGTME.js +0 -956
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { g as te, a as $, e as de, d as L, b as w, _ as
|
|
2
|
-
import { T as et } from "./index-
|
|
3
|
-
import {
|
|
1
|
+
import { g as te, a as $, e as de, d as L, b as w, _ as k, w as we, f as Gt } from "./presets-Djh_L_6R.js";
|
|
2
|
+
import { T as et } from "./index-D0U6r5O7.js";
|
|
3
|
+
import { F as xe, t as nt, A as tt, z as rt, Z as qt, $ as at, o as Me, B as Yt, x as Xt, y as Zt, e as Jt, _ as Qt, s as er, G as nr } from "./index-BbTV2Cw5.js";
|
|
4
4
|
import * as t from "react";
|
|
5
5
|
import J, { forwardRef as tr, useMemo as rr, useRef as Xe, useCallback as Re, useImperativeHandle as ar } from "react";
|
|
6
6
|
import { K as ie } from "./KeyCode-DM2sFh3-.js";
|
|
7
|
-
import { F as Te } from "./Overflow-
|
|
8
|
-
import { u as Ze } from "./useMergedState-
|
|
7
|
+
import { F as Te } from "./Overflow-DWf4XIal.js";
|
|
8
|
+
import { u as Ze } from "./useMergedState-D6toxSxh.js";
|
|
9
9
|
import { i as ir } from "./isVisible-D3-B85BJ.js";
|
|
10
|
-
import { o as
|
|
11
|
-
import { t as or } from "./toArray-
|
|
10
|
+
import { o as Sn } from "./omit-B_u6A-HL.js";
|
|
11
|
+
import { t as or } from "./toArray-U3Az44CO.js";
|
|
12
12
|
import { I as lr } from "./AntdIcon-nCNB0J1E.js";
|
|
13
13
|
var ur = ie.ESC, sr = ie.TAB;
|
|
14
14
|
function cr(e) {
|
|
@@ -50,54 +50,54 @@ var fr = /* @__PURE__ */ tr(function(e, r) {
|
|
|
50
50
|
}), /* @__PURE__ */ J.cloneElement(o, {
|
|
51
51
|
ref: rt(o) ? l : void 0
|
|
52
52
|
}));
|
|
53
|
-
}),
|
|
53
|
+
}), Se = {
|
|
54
54
|
adjustX: 1,
|
|
55
55
|
adjustY: 1
|
|
56
|
-
},
|
|
56
|
+
}, Ee = [0, 0], dr = {
|
|
57
57
|
topLeft: {
|
|
58
58
|
points: ["bl", "tl"],
|
|
59
|
-
overflow:
|
|
59
|
+
overflow: Se,
|
|
60
60
|
offset: [0, -4],
|
|
61
|
-
targetOffset:
|
|
61
|
+
targetOffset: Ee
|
|
62
62
|
},
|
|
63
63
|
top: {
|
|
64
64
|
points: ["bc", "tc"],
|
|
65
|
-
overflow:
|
|
65
|
+
overflow: Se,
|
|
66
66
|
offset: [0, -4],
|
|
67
|
-
targetOffset:
|
|
67
|
+
targetOffset: Ee
|
|
68
68
|
},
|
|
69
69
|
topRight: {
|
|
70
70
|
points: ["br", "tr"],
|
|
71
|
-
overflow:
|
|
71
|
+
overflow: Se,
|
|
72
72
|
offset: [0, -4],
|
|
73
|
-
targetOffset:
|
|
73
|
+
targetOffset: Ee
|
|
74
74
|
},
|
|
75
75
|
bottomLeft: {
|
|
76
76
|
points: ["tl", "bl"],
|
|
77
|
-
overflow:
|
|
77
|
+
overflow: Se,
|
|
78
78
|
offset: [0, 4],
|
|
79
|
-
targetOffset:
|
|
79
|
+
targetOffset: Ee
|
|
80
80
|
},
|
|
81
81
|
bottom: {
|
|
82
82
|
points: ["tc", "bc"],
|
|
83
|
-
overflow:
|
|
83
|
+
overflow: Se,
|
|
84
84
|
offset: [0, 4],
|
|
85
|
-
targetOffset:
|
|
85
|
+
targetOffset: Ee
|
|
86
86
|
},
|
|
87
87
|
bottomRight: {
|
|
88
88
|
points: ["tr", "br"],
|
|
89
|
-
overflow:
|
|
89
|
+
overflow: Se,
|
|
90
90
|
offset: [0, 4],
|
|
91
|
-
targetOffset:
|
|
91
|
+
targetOffset: Ee
|
|
92
92
|
}
|
|
93
93
|
}, vr = ["arrow", "prefixCls", "transitionName", "animation", "align", "placement", "placements", "getPopupContainer", "showAction", "hideAction", "overlayClassName", "overlayStyle", "visible", "trigger", "autoFocus", "overlay", "children", "onVisibleChange"];
|
|
94
94
|
function mr(e, r) {
|
|
95
|
-
var a, n = e.arrow, i = n === void 0 ? !1 : n, o = e.prefixCls, l = o === void 0 ? "rc-dropdown" : o, u = e.transitionName, d = e.animation, s = e.align, g = e.placement, c = g === void 0 ? "bottomLeft" : g, f = e.placements, b = f === void 0 ? dr : f, h = e.getPopupContainer,
|
|
95
|
+
var a, n = e.arrow, i = n === void 0 ? !1 : n, o = e.prefixCls, l = o === void 0 ? "rc-dropdown" : o, u = e.transitionName, d = e.animation, s = e.align, g = e.placement, c = g === void 0 ? "bottomLeft" : g, f = e.placements, b = f === void 0 ? dr : f, h = e.getPopupContainer, S = e.showAction, C = e.hideAction, I = e.overlayClassName, P = e.overlayStyle, v = e.visible, m = e.trigger, y = m === void 0 ? ["hover"] : m, p = e.autoFocus, R = e.overlay, _ = e.children, E = e.onVisibleChange, W = te(e, vr), O = J.useState(), K = $(O, 2), j = K[0], B = K[1], H = "visible" in e ? v : j, Y = J.useRef(null), T = J.useRef(null), q = J.useRef(null);
|
|
96
96
|
J.useImperativeHandle(r, function() {
|
|
97
97
|
return Y.current;
|
|
98
98
|
});
|
|
99
99
|
var V = function(D) {
|
|
100
|
-
B(D),
|
|
100
|
+
B(D), E == null || E(D);
|
|
101
101
|
};
|
|
102
102
|
cr({
|
|
103
103
|
visible: H,
|
|
@@ -136,7 +136,7 @@ function mr(e, r) {
|
|
|
136
136
|
popupClassName: de(I, w({}, "".concat(l, "-show-arrow"), i)),
|
|
137
137
|
popupStyle: P,
|
|
138
138
|
action: y,
|
|
139
|
-
showAction:
|
|
139
|
+
showAction: S,
|
|
140
140
|
hideAction: z,
|
|
141
141
|
popupPlacement: c,
|
|
142
142
|
popupAlign: s,
|
|
@@ -161,7 +161,7 @@ function lt(e) {
|
|
|
161
161
|
}
|
|
162
162
|
var pr = ["children", "locked"], ae = /* @__PURE__ */ t.createContext(null);
|
|
163
163
|
function gr(e, r) {
|
|
164
|
-
var a =
|
|
164
|
+
var a = k({}, e);
|
|
165
165
|
return Object.keys(r).forEach(function(n) {
|
|
166
166
|
var i = r[n];
|
|
167
167
|
i !== void 0 && (a[n] = i);
|
|
@@ -188,7 +188,7 @@ function Fe(e) {
|
|
|
188
188
|
return e !== void 0 ? [].concat(Me(r), [e]) : r;
|
|
189
189
|
}, [r, e]);
|
|
190
190
|
}
|
|
191
|
-
var ct = /* @__PURE__ */ t.createContext(null),
|
|
191
|
+
var ct = /* @__PURE__ */ t.createContext(null), En = /* @__PURE__ */ t.createContext({});
|
|
192
192
|
function qn(e) {
|
|
193
193
|
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
194
194
|
if (ir(e)) {
|
|
@@ -303,11 +303,11 @@ function Ir(e, r, a, n, i, o, l, u, d, s) {
|
|
|
303
303
|
}, []), function(b) {
|
|
304
304
|
var h = b.which;
|
|
305
305
|
if ([].concat(Yn, [Qe, ft, De, $e]).includes(h)) {
|
|
306
|
-
var
|
|
306
|
+
var S = o(), C = Mn(S, n), I = C, P = I.elements, v = I.key2element, m = I.element2key, y = v.get(r), p = Mr(y, P), R = m.get(p), _ = br(e, l(R, !0).length === 1, a, h);
|
|
307
307
|
if (!_ && h !== De && h !== $e)
|
|
308
308
|
return;
|
|
309
309
|
(Yn.includes(h) || [De, $e].includes(h)) && b.preventDefault();
|
|
310
|
-
var
|
|
310
|
+
var E = function(T) {
|
|
311
311
|
if (T) {
|
|
312
312
|
var q = T, V = T.querySelector("a");
|
|
313
313
|
V != null && V.getAttribute("href") && (q = V);
|
|
@@ -321,18 +321,18 @@ function Ir(e, r, a, n, i, o, l, u, d, s) {
|
|
|
321
321
|
var W;
|
|
322
322
|
!p || e === "inline" ? W = i.current : W = yr(p);
|
|
323
323
|
var O, K = xn(W, P);
|
|
324
|
-
h === De ? O = K[0] : h === $e ? O = K[K.length - 1] : O = Xn(W, P, p, _.offset),
|
|
324
|
+
h === De ? O = K[0] : h === $e ? O = K[K.length - 1] : O = Xn(W, P, p, _.offset), E(O);
|
|
325
325
|
} else if (_.inlineTrigger)
|
|
326
326
|
d(R);
|
|
327
327
|
else if (_.offset > 0)
|
|
328
328
|
d(R, !0), f(), g.current = xe(function() {
|
|
329
|
-
C = Mn(
|
|
329
|
+
C = Mn(S, n);
|
|
330
330
|
var Y = p.getAttribute("aria-controls"), T = document.getElementById(Y), q = Xn(T, C.elements);
|
|
331
|
-
|
|
331
|
+
E(q);
|
|
332
332
|
}, 5);
|
|
333
333
|
else if (_.offset < 0) {
|
|
334
334
|
var j = l(R, !0), B = j[j.length - 2], H = v.get(B);
|
|
335
|
-
d(B, !1),
|
|
335
|
+
d(B, !1), E(H);
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
338
|
s == null || s(b);
|
|
@@ -343,10 +343,10 @@ function Rr(e) {
|
|
|
343
343
|
}
|
|
344
344
|
var wn = "__RC_UTIL_PATH_SPLIT__", Zn = function(r) {
|
|
345
345
|
return r.join(wn);
|
|
346
|
-
},
|
|
346
|
+
}, Sr = function(r) {
|
|
347
347
|
return r.split(wn);
|
|
348
348
|
}, In = "rc-menu-more";
|
|
349
|
-
function
|
|
349
|
+
function Er() {
|
|
350
350
|
var e = t.useState({}), r = $(e, 2), a = r[1], n = Xe(/* @__PURE__ */ new Map()), i = Xe(/* @__PURE__ */ new Map()), o = t.useState([]), l = $(o, 2), u = l[0], d = l[1], s = Xe(0), g = Xe(!1), c = function() {
|
|
351
351
|
g.current || a({});
|
|
352
352
|
}, f = Re(function(v, m) {
|
|
@@ -362,17 +362,17 @@ function Sr() {
|
|
|
362
362
|
i.current.delete(y), n.current.delete(v);
|
|
363
363
|
}, []), h = Re(function(v) {
|
|
364
364
|
d(v);
|
|
365
|
-
}, []),
|
|
366
|
-
var y = n.current.get(v) || "", p =
|
|
365
|
+
}, []), S = Re(function(v, m) {
|
|
366
|
+
var y = n.current.get(v) || "", p = Sr(y);
|
|
367
367
|
return m && u.includes(p[0]) && p.unshift(In), p;
|
|
368
368
|
}, [u]), C = Re(function(v, m) {
|
|
369
369
|
return v.filter(function(y) {
|
|
370
370
|
return y !== void 0;
|
|
371
371
|
}).some(function(y) {
|
|
372
|
-
var p =
|
|
372
|
+
var p = S(y, !0);
|
|
373
373
|
return p.includes(m);
|
|
374
374
|
});
|
|
375
|
-
}, [
|
|
375
|
+
}, [S]), I = function() {
|
|
376
376
|
var m = Me(n.current.keys());
|
|
377
377
|
return u.length && m.push(In), m;
|
|
378
378
|
}, P = Re(function(v) {
|
|
@@ -392,7 +392,7 @@ function Sr() {
|
|
|
392
392
|
refreshOverflowKeys: h,
|
|
393
393
|
// Util
|
|
394
394
|
isSubPathKey: C,
|
|
395
|
-
getKeyPath:
|
|
395
|
+
getKeyPath: S,
|
|
396
396
|
getKeys: I,
|
|
397
397
|
getSubPathKeys: P
|
|
398
398
|
};
|
|
@@ -447,7 +447,7 @@ function vt(e) {
|
|
|
447
447
|
}
|
|
448
448
|
function mt(e) {
|
|
449
449
|
var r = e.icon, a = e.props, n = e.children, i;
|
|
450
|
-
return r === null || r === !1 ? null : (typeof r == "function" ? i = /* @__PURE__ */ t.createElement(r,
|
|
450
|
+
return r === null || r === !1 ? null : (typeof r == "function" ? i = /* @__PURE__ */ t.createElement(r, k({}, a)) : typeof r != "boolean" && (i = r), i || n || null);
|
|
451
451
|
}
|
|
452
452
|
var Pr = ["item"];
|
|
453
453
|
function en(e) {
|
|
@@ -467,7 +467,7 @@ var Nr = ["title", "attribute", "elementRef"], _r = ["style", "className", "even
|
|
|
467
467
|
return Qt(a, [{
|
|
468
468
|
key: "render",
|
|
469
469
|
value: function() {
|
|
470
|
-
var i = this.props, o = i.title, l = i.attribute, u = i.elementRef, d = te(i, Nr), s =
|
|
470
|
+
var i = this.props, o = i.title, l = i.attribute, u = i.elementRef, d = te(i, Nr), s = Sn(d, ["eventKey", "popupClassName", "popupOffset", "onTitleClick"]);
|
|
471
471
|
return we(!l, "`attribute` of Menu.Item is deprecated. Please pass attribute directly."), /* @__PURE__ */ t.createElement(Te.Item, L({}, l, {
|
|
472
472
|
title: typeof o == "string" ? o : void 0
|
|
473
473
|
}, s, {
|
|
@@ -475,8 +475,8 @@ var Nr = ["title", "attribute", "elementRef"], _r = ["style", "className", "even
|
|
|
475
475
|
}));
|
|
476
476
|
}
|
|
477
477
|
}]), a;
|
|
478
|
-
}(t.Component),
|
|
479
|
-
var a = e.style, n = e.className, i = e.eventKey, o = e.warnKey, l = e.disabled, u = e.itemIcon, d = e.children, s = e.role, g = e.onMouseEnter, c = e.onMouseLeave, f = e.onClick, b = e.onKeyDown, h = e.onFocus,
|
|
478
|
+
}(t.Component), Ar = /* @__PURE__ */ t.forwardRef(function(e, r) {
|
|
479
|
+
var a = e.style, n = e.className, i = e.eventKey, o = e.warnKey, l = e.disabled, u = e.itemIcon, d = e.children, s = e.role, g = e.onMouseEnter, c = e.onMouseLeave, f = e.onClick, b = e.onKeyDown, h = e.onFocus, S = te(e, _r), C = lt(i), I = t.useContext(ae), P = I.prefixCls, v = I.onItemClick, m = I.disabled, y = I.overflowDisabled, p = I.itemIcon, R = I.selectedKeys, _ = I.onActive, E = t.useContext(En), W = E._internalRenderMenuItem, O = "".concat(P, "-item"), K = t.useRef(), j = t.useRef(), B = m || l, H = Yt(r, j), Y = Fe(i);
|
|
480
480
|
process.env.NODE_ENV !== "production" && o && we(!1, "MenuItem should not leave undefined `key`.");
|
|
481
481
|
var T = function(G) {
|
|
482
482
|
return {
|
|
@@ -506,16 +506,16 @@ var Nr = ["title", "attribute", "elementRef"], _r = ["style", "className", "even
|
|
|
506
506
|
role: s === null ? "none" : s || "menuitem",
|
|
507
507
|
tabIndex: l ? null : -1,
|
|
508
508
|
"data-menu-id": y && C ? null : C
|
|
509
|
-
},
|
|
509
|
+
}, Sn(S, ["extra"]), oe, ee, {
|
|
510
510
|
component: "li",
|
|
511
511
|
"aria-disabled": l,
|
|
512
|
-
style:
|
|
512
|
+
style: k(k({}, se), a),
|
|
513
513
|
className: de(O, w(w(w({}, "".concat(O, "-active"), Q), "".concat(O, "-selected"), le), "".concat(O, "-disabled"), B), n),
|
|
514
514
|
onClick: ce,
|
|
515
515
|
onKeyDown: F,
|
|
516
516
|
onFocus: z
|
|
517
517
|
}), d, /* @__PURE__ */ t.createElement(mt, {
|
|
518
|
-
props:
|
|
518
|
+
props: k(k({}, e), {}, {
|
|
519
519
|
isSelected: le
|
|
520
520
|
}),
|
|
521
521
|
icon: q
|
|
@@ -524,18 +524,18 @@ var Nr = ["title", "attribute", "elementRef"], _r = ["style", "className", "even
|
|
|
524
524
|
selected: le
|
|
525
525
|
})), D;
|
|
526
526
|
});
|
|
527
|
-
function
|
|
527
|
+
function kr(e, r) {
|
|
528
528
|
var a = e.eventKey, n = nn(), i = Fe(a);
|
|
529
529
|
return t.useEffect(function() {
|
|
530
530
|
if (n)
|
|
531
531
|
return n.registerPath(a, i), function() {
|
|
532
532
|
n.unregisterPath(a, i);
|
|
533
533
|
};
|
|
534
|
-
}, [i]), n ? null : /* @__PURE__ */ t.createElement(
|
|
534
|
+
}, [i]), n ? null : /* @__PURE__ */ t.createElement(Ar, L({}, e, {
|
|
535
535
|
ref: r
|
|
536
536
|
}));
|
|
537
537
|
}
|
|
538
|
-
const Pn = /* @__PURE__ */ t.forwardRef(
|
|
538
|
+
const Pn = /* @__PURE__ */ t.forwardRef(kr);
|
|
539
539
|
var Dr = ["className", "children"], $r = function(r, a) {
|
|
540
540
|
var n = r.className, i = r.children, o = te(r, Dr), l = t.useContext(ae), u = l.prefixCls, d = l.mode, s = l.rtl;
|
|
541
541
|
return /* @__PURE__ */ t.createElement("ul", L({
|
|
@@ -644,16 +644,16 @@ var Vr = {
|
|
|
644
644
|
"vertical-right": "leftTop"
|
|
645
645
|
};
|
|
646
646
|
function Fr(e) {
|
|
647
|
-
var r = e.prefixCls, a = e.visible, n = e.children, i = e.popup, o = e.popupStyle, l = e.popupClassName, u = e.popupOffset, d = e.disabled, s = e.mode, g = e.onVisibleChange, c = t.useContext(ae), f = c.getPopupContainer, b = c.rtl, h = c.subMenuOpenDelay,
|
|
647
|
+
var r = e.prefixCls, a = e.visible, n = e.children, i = e.popup, o = e.popupStyle, l = e.popupClassName, u = e.popupOffset, d = e.disabled, s = e.mode, g = e.onVisibleChange, c = t.useContext(ae), f = c.getPopupContainer, b = c.rtl, h = c.subMenuOpenDelay, S = c.subMenuCloseDelay, C = c.builtinPlacements, I = c.triggerSubMenuAction, P = c.forceSubMenuRender, v = c.rootClassName, m = c.motion, y = c.defaultMotions, p = t.useState(!1), R = $(p, 2), _ = R[0], E = R[1], W = b ? k(k({}, Tr), C) : k(k({}, Lr), C), O = Vr[s], K = pt(s, m, y), j = t.useRef(K);
|
|
648
648
|
s !== "inline" && (j.current = K);
|
|
649
|
-
var B =
|
|
649
|
+
var B = k(k({}, j.current), {}, {
|
|
650
650
|
leavedClassName: "".concat(r, "-hidden"),
|
|
651
651
|
removeOnLeave: !1,
|
|
652
652
|
motionAppear: !0
|
|
653
653
|
}), H = t.useRef();
|
|
654
654
|
return t.useEffect(function() {
|
|
655
655
|
return H.current = xe(function() {
|
|
656
|
-
|
|
656
|
+
E(a);
|
|
657
657
|
}), function() {
|
|
658
658
|
xe.cancel(H.current);
|
|
659
659
|
};
|
|
@@ -672,7 +672,7 @@ function Fr(e) {
|
|
|
672
672
|
},
|
|
673
673
|
action: d ? [] : [I],
|
|
674
674
|
mouseEnterDelay: h,
|
|
675
|
-
mouseLeaveDelay:
|
|
675
|
+
mouseLeaveDelay: S,
|
|
676
676
|
onPopupVisibleChange: g,
|
|
677
677
|
forceRender: P,
|
|
678
678
|
popupMotion: B,
|
|
@@ -682,16 +682,16 @@ function Fr(e) {
|
|
|
682
682
|
function zr(e) {
|
|
683
683
|
var r = e.id, a = e.open, n = e.keyPath, i = e.children, o = "inline", l = t.useContext(ae), u = l.prefixCls, d = l.forceSubMenuRender, s = l.motion, g = l.defaultMotions, c = l.mode, f = t.useRef(!1);
|
|
684
684
|
f.current = c === o;
|
|
685
|
-
var b = t.useState(!f.current), h = $(b, 2),
|
|
685
|
+
var b = t.useState(!f.current), h = $(b, 2), S = h[0], C = h[1], I = f.current ? a : !1;
|
|
686
686
|
t.useEffect(function() {
|
|
687
687
|
f.current && C(!1);
|
|
688
688
|
}, [c]);
|
|
689
|
-
var P =
|
|
689
|
+
var P = k({}, pt(o, s, g));
|
|
690
690
|
n.length > 1 && (P.motionAppear = !1);
|
|
691
691
|
var v = P.onVisibleChanged;
|
|
692
692
|
return P.onVisibleChanged = function(m) {
|
|
693
693
|
return !f.current && !m && C(!0), v == null ? void 0 : v(m);
|
|
694
|
-
},
|
|
694
|
+
}, S ? null : /* @__PURE__ */ t.createElement(Ve, {
|
|
695
695
|
mode: o,
|
|
696
696
|
locked: !f.current
|
|
697
697
|
}, /* @__PURE__ */ t.createElement(er, L({
|
|
@@ -710,31 +710,31 @@ function zr(e) {
|
|
|
710
710
|
}));
|
|
711
711
|
}
|
|
712
712
|
var Ur = ["style", "className", "title", "eventKey", "warnKey", "disabled", "internalPopupClose", "children", "itemIcon", "expandIcon", "popupClassName", "popupOffset", "popupStyle", "onClick", "onMouseEnter", "onMouseLeave", "onTitleClick", "onTitleMouseEnter", "onTitleMouseLeave"], Wr = ["active"], jr = /* @__PURE__ */ t.forwardRef(function(e, r) {
|
|
713
|
-
var a = e.style, n = e.className, i = e.title, o = e.eventKey, l = e.warnKey, u = e.disabled, d = e.internalPopupClose, s = e.children, g = e.itemIcon, c = e.expandIcon, f = e.popupClassName, b = e.popupOffset, h = e.popupStyle,
|
|
713
|
+
var a = e.style, n = e.className, i = e.title, o = e.eventKey, l = e.warnKey, u = e.disabled, d = e.internalPopupClose, s = e.children, g = e.itemIcon, c = e.expandIcon, f = e.popupClassName, b = e.popupOffset, h = e.popupStyle, S = e.onClick, C = e.onMouseEnter, I = e.onMouseLeave, P = e.onTitleClick, v = e.onTitleMouseEnter, m = e.onTitleMouseLeave, y = te(e, Ur), p = lt(o), R = t.useContext(ae), _ = R.prefixCls, E = R.mode, W = R.openKeys, O = R.disabled, K = R.overflowDisabled, j = R.activeKey, B = R.selectedKeys, H = R.itemIcon, Y = R.expandIcon, T = R.onItemClick, q = R.onOpenChange, V = R.onActive, Q = t.useContext(En), oe = Q._internalRenderSubMenuItem, le = t.useContext(ct), se = le.isSubPathKey, ce = Fe(), F = "".concat(_, "-submenu"), z = O || u, ee = t.useRef(), D = t.useRef();
|
|
714
714
|
process.env.NODE_ENV !== "production" && l && we(!1, "SubMenu should not leave undefined `key`.");
|
|
715
|
-
var ne = g ?? H, G = c ?? Y, ue = W.includes(o), ve = !K && ue, ze = se(B, o), Ie = dt(o, z, v, m), ge = Ie.active, an = te(Ie, Wr), on = t.useState(!1), Ue = $(on, 2), Pe = Ue[0], We = Ue[1], Ne = function(
|
|
716
|
-
z || We(
|
|
717
|
-
}, ln = function(
|
|
715
|
+
var ne = g ?? H, G = c ?? Y, ue = W.includes(o), ve = !K && ue, ze = se(B, o), Ie = dt(o, z, v, m), ge = Ie.active, an = te(Ie, Wr), on = t.useState(!1), Ue = $(on, 2), Pe = Ue[0], We = Ue[1], Ne = function(A) {
|
|
716
|
+
z || We(A);
|
|
717
|
+
}, ln = function(A) {
|
|
718
718
|
Ne(!0), C == null || C({
|
|
719
719
|
key: o,
|
|
720
|
-
domEvent:
|
|
720
|
+
domEvent: A
|
|
721
721
|
});
|
|
722
|
-
}, un = function(
|
|
722
|
+
}, un = function(A) {
|
|
723
723
|
Ne(!1), I == null || I({
|
|
724
724
|
key: o,
|
|
725
|
-
domEvent:
|
|
725
|
+
domEvent: A
|
|
726
726
|
});
|
|
727
727
|
}, _e = t.useMemo(function() {
|
|
728
|
-
return ge || (
|
|
729
|
-
}, [
|
|
728
|
+
return ge || (E !== "inline" ? Pe || se([j], o) : !1);
|
|
729
|
+
}, [E, ge, j, Pe, o, se]), fe = vt(ce.length), sn = function(A) {
|
|
730
730
|
z || (P == null || P({
|
|
731
731
|
key: o,
|
|
732
|
-
domEvent:
|
|
733
|
-
}),
|
|
732
|
+
domEvent: A
|
|
733
|
+
}), E === "inline" && q(o, !ue));
|
|
734
734
|
}, cn = Le(function(re) {
|
|
735
|
-
|
|
736
|
-
}), je = function(
|
|
737
|
-
|
|
735
|
+
S == null || S(en(re)), T(re);
|
|
736
|
+
}), je = function(A) {
|
|
737
|
+
E !== "inline" && q(o, A);
|
|
738
738
|
}, Be = function() {
|
|
739
739
|
V(o);
|
|
740
740
|
}, Ke = p && "".concat(p, "-popup"), me = /* @__PURE__ */ t.createElement("div", L({
|
|
@@ -752,21 +752,21 @@ var Ur = ["style", "className", "title", "eventKey", "warnKey", "disabled", "int
|
|
|
752
752
|
onClick: sn,
|
|
753
753
|
onFocus: Be
|
|
754
754
|
}, an), i, /* @__PURE__ */ t.createElement(mt, {
|
|
755
|
-
icon:
|
|
756
|
-
props:
|
|
755
|
+
icon: E !== "horizontal" ? G : void 0,
|
|
756
|
+
props: k(k({}, e), {}, {
|
|
757
757
|
isOpen: ve,
|
|
758
758
|
// [Legacy] Not sure why need this mark
|
|
759
759
|
isSubMenu: !0
|
|
760
760
|
})
|
|
761
761
|
}, /* @__PURE__ */ t.createElement("i", {
|
|
762
762
|
className: "".concat(F, "-arrow")
|
|
763
|
-
}))), he = t.useRef(
|
|
764
|
-
if (
|
|
763
|
+
}))), he = t.useRef(E);
|
|
764
|
+
if (E !== "inline" && ce.length > 1 ? he.current = "vertical" : he.current = E, !K) {
|
|
765
765
|
var Ce = he.current;
|
|
766
766
|
me = /* @__PURE__ */ t.createElement(Fr, {
|
|
767
767
|
mode: Ce,
|
|
768
768
|
prefixCls: F,
|
|
769
|
-
visible: !d && ve &&
|
|
769
|
+
visible: !d && ve && E !== "inline",
|
|
770
770
|
popupClassName: f,
|
|
771
771
|
popupOffset: b,
|
|
772
772
|
popupStyle: h,
|
|
@@ -790,7 +790,7 @@ var Ur = ["style", "className", "title", "eventKey", "warnKey", "disabled", "int
|
|
|
790
790
|
}, y, {
|
|
791
791
|
component: "li",
|
|
792
792
|
style: a,
|
|
793
|
-
className: de(F, "".concat(F, "-").concat(
|
|
793
|
+
className: de(F, "".concat(F, "-").concat(E), n, w(w(w(w({}, "".concat(F, "-open"), ve), "".concat(F, "-active"), _e), "".concat(F, "-selected"), ze), "".concat(F, "-disabled"), z)),
|
|
794
794
|
onMouseEnter: ln,
|
|
795
795
|
onMouseLeave: un
|
|
796
796
|
}), me, !K && /* @__PURE__ */ t.createElement(zr, {
|
|
@@ -805,7 +805,7 @@ var Ur = ["style", "className", "title", "eventKey", "warnKey", "disabled", "int
|
|
|
805
805
|
disabled: z
|
|
806
806
|
})), /* @__PURE__ */ t.createElement(Ve, {
|
|
807
807
|
onItemClick: cn,
|
|
808
|
-
mode:
|
|
808
|
+
mode: E === "horizontal" ? "vertical" : E,
|
|
809
809
|
itemIcon: ne,
|
|
810
810
|
expandIcon: G
|
|
811
811
|
}, Oe);
|
|
@@ -857,7 +857,7 @@ var Br = ["className", "title", "eventKey", "children"], Hr = /* @__PURE__ */ t.
|
|
|
857
857
|
var a = e.eventKey, n = e.children, i = Fe(a), o = _n(n, i), l = nn();
|
|
858
858
|
return l ? o : /* @__PURE__ */ t.createElement(Hr, L({
|
|
859
859
|
ref: r
|
|
860
|
-
},
|
|
860
|
+
}, Sn(e, ["warnKey"])), o);
|
|
861
861
|
});
|
|
862
862
|
process.env.NODE_ENV !== "production" && (Kn.displayName = "MenuItemGroup");
|
|
863
863
|
var Gr = ["label", "children", "key", "type", "extra"];
|
|
@@ -865,20 +865,20 @@ function Rn(e, r, a) {
|
|
|
865
865
|
var n = r.item, i = r.group, o = r.submenu, l = r.divider;
|
|
866
866
|
return (e || []).map(function(u, d) {
|
|
867
867
|
if (u && Gt(u) === "object") {
|
|
868
|
-
var s = u, g = s.label, c = s.children, f = s.key, b = s.type, h = s.extra,
|
|
868
|
+
var s = u, g = s.label, c = s.children, f = s.key, b = s.type, h = s.extra, S = te(s, Gr), C = f ?? "tmp-".concat(d);
|
|
869
869
|
return c || b === "group" ? b === "group" ? /* @__PURE__ */ t.createElement(i, L({
|
|
870
870
|
key: C
|
|
871
|
-
},
|
|
871
|
+
}, S, {
|
|
872
872
|
title: g
|
|
873
873
|
}), Rn(c, r, a)) : /* @__PURE__ */ t.createElement(o, L({
|
|
874
874
|
key: C
|
|
875
|
-
},
|
|
875
|
+
}, S, {
|
|
876
876
|
title: g
|
|
877
877
|
}), Rn(c, r, a)) : b === "divider" ? /* @__PURE__ */ t.createElement(l, L({
|
|
878
878
|
key: C
|
|
879
|
-
},
|
|
879
|
+
}, S)) : /* @__PURE__ */ t.createElement(n, L({
|
|
880
880
|
key: C
|
|
881
|
-
},
|
|
881
|
+
}, S, {
|
|
882
882
|
extra: h
|
|
883
883
|
}), g, (!!h || h === 0) && /* @__PURE__ */ t.createElement("span", {
|
|
884
884
|
className: "".concat(a, "-item-extra")
|
|
@@ -890,7 +890,7 @@ function Rn(e, r, a) {
|
|
|
890
890
|
});
|
|
891
891
|
}
|
|
892
892
|
function Qn(e, r, a, n, i) {
|
|
893
|
-
var o = e, l =
|
|
893
|
+
var o = e, l = k({
|
|
894
894
|
divider: gt,
|
|
895
895
|
item: Pn,
|
|
896
896
|
group: Kn,
|
|
@@ -899,36 +899,36 @@ function Qn(e, r, a, n, i) {
|
|
|
899
899
|
return r && (o = Rn(r, l, i)), _n(o, a);
|
|
900
900
|
}
|
|
901
901
|
var qr = ["prefixCls", "rootClassName", "style", "className", "tabIndex", "items", "children", "direction", "id", "mode", "inlineCollapsed", "disabled", "disabledOverflow", "subMenuOpenDelay", "subMenuCloseDelay", "forceSubMenuRender", "defaultOpenKeys", "openKeys", "activeKey", "defaultActiveFirst", "selectable", "multiple", "defaultSelectedKeys", "selectedKeys", "onSelect", "onDeselect", "inlineIndent", "motion", "defaultMotions", "triggerSubMenuAction", "builtinPlacements", "itemIcon", "expandIcon", "overflowedIndicator", "overflowedIndicatorPopupClassName", "getPopupContainer", "onClick", "onOpenChange", "onKeyDown", "openAnimation", "openTransitionName", "_internalRenderMenuItem", "_internalRenderSubMenuItem", "_internalComponents"], ye = [], Yr = /* @__PURE__ */ t.forwardRef(function(e, r) {
|
|
902
|
-
var a, n = e, i = n.prefixCls, o = i === void 0 ? "rc-menu" : i, l = n.rootClassName, u = n.style, d = n.className, s = n.tabIndex, g = s === void 0 ? 0 : s, c = n.items, f = n.children, b = n.direction, h = n.id,
|
|
902
|
+
var a, n = e, i = n.prefixCls, o = i === void 0 ? "rc-menu" : i, l = n.rootClassName, u = n.style, d = n.className, s = n.tabIndex, g = s === void 0 ? 0 : s, c = n.items, f = n.children, b = n.direction, h = n.id, S = n.mode, C = S === void 0 ? "vertical" : S, I = n.inlineCollapsed, P = n.disabled, v = n.disabledOverflow, m = n.subMenuOpenDelay, y = m === void 0 ? 0.1 : m, p = n.subMenuCloseDelay, R = p === void 0 ? 0.1 : p, _ = n.forceSubMenuRender, E = n.defaultOpenKeys, W = n.openKeys, O = n.activeKey, K = n.defaultActiveFirst, j = n.selectable, B = j === void 0 ? !0 : j, H = n.multiple, Y = H === void 0 ? !1 : H, T = n.defaultSelectedKeys, q = n.selectedKeys, V = n.onSelect, Q = n.onDeselect, oe = n.inlineIndent, le = oe === void 0 ? 24 : oe, se = n.motion, ce = n.defaultMotions, F = n.triggerSubMenuAction, z = F === void 0 ? "hover" : F, ee = n.builtinPlacements, D = n.itemIcon, ne = n.expandIcon, G = n.overflowedIndicator, ue = G === void 0 ? "..." : G, ve = n.overflowedIndicatorPopupClassName, ze = n.getPopupContainer, Ie = n.onClick, ge = n.onOpenChange, an = n.onKeyDown, on = n.openAnimation, Ue = n.openTransitionName, Pe = n._internalRenderMenuItem, We = n._internalRenderSubMenuItem, Ne = n._internalComponents, ln = te(n, qr), un = t.useMemo(function() {
|
|
903
903
|
return [Qn(f, c, ye, Ne, o), Qn(f, c, ye, {}, o)];
|
|
904
904
|
}, [f, c, Ne]), _e = $(un, 2), fe = _e[0], sn = _e[1], cn = t.useState(!1), je = $(cn, 2), Be = je[0], Ke = je[1], me = t.useRef(), he = wr(h), Ce = b === "rtl";
|
|
905
905
|
process.env.NODE_ENV !== "production" && we(!on && !Ue, "`openAnimation` and `openTransitionName` is removed. Please use `motion` or `defaultMotion` instead.");
|
|
906
|
-
var Oe = Ze(
|
|
906
|
+
var Oe = Ze(E, {
|
|
907
907
|
value: W,
|
|
908
908
|
postState: function(M) {
|
|
909
909
|
return M || ye;
|
|
910
910
|
}
|
|
911
|
-
}), re = $(Oe, 2),
|
|
911
|
+
}), re = $(Oe, 2), A = re[0], On = re[1], fn = function(M) {
|
|
912
912
|
var x = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
913
913
|
function X() {
|
|
914
914
|
On(M), ge == null || ge(M);
|
|
915
915
|
}
|
|
916
916
|
x ? nr.flushSync(X) : X();
|
|
917
|
-
}, ht = t.useState(
|
|
917
|
+
}, ht = t.useState(A), An = $(ht, 2), Ct = An[0], bt = An[1], dn = t.useRef(!1), yt = t.useMemo(function() {
|
|
918
918
|
return (C === "inline" || C === "vertical") && I ? ["vertical", I] : [C, !1];
|
|
919
|
-
}, [C, I]),
|
|
919
|
+
}, [C, I]), kn = $(yt, 2), He = kn[0], vn = kn[1], Dn = He === "inline", Mt = t.useState(He), $n = $(Mt, 2), pe = $n[0], It = $n[1], Rt = t.useState(vn), Ln = $(Rt, 2), St = Ln[0], Et = Ln[1];
|
|
920
920
|
t.useEffect(function() {
|
|
921
|
-
It(He),
|
|
921
|
+
It(He), Et(vn), dn.current && (Dn ? On(Ct) : fn(ye));
|
|
922
922
|
}, [He, vn]);
|
|
923
923
|
var xt = t.useState(0), Tn = $(xt, 2), Ge = Tn[0], wt = Tn[1], mn = Ge >= fe.length - 1 || pe !== "horizontal" || v;
|
|
924
924
|
t.useEffect(function() {
|
|
925
|
-
Dn && bt(
|
|
926
|
-
}, [
|
|
925
|
+
Dn && bt(A);
|
|
926
|
+
}, [A]), t.useEffect(function() {
|
|
927
927
|
return dn.current = !0, function() {
|
|
928
928
|
dn.current = !1;
|
|
929
929
|
};
|
|
930
930
|
}, []);
|
|
931
|
-
var be =
|
|
931
|
+
var be = Er(), Vn = be.registerPath, Fn = be.unregisterPath, Pt = be.refreshOverflowKeys, zn = be.isSubPathKey, Nt = be.getKeyPath, Un = be.getKeys, _t = be.getSubPathKeys, Kt = t.useMemo(function() {
|
|
932
932
|
return {
|
|
933
933
|
registerPath: Vn,
|
|
934
934
|
unregisterPath: Fn
|
|
@@ -943,9 +943,9 @@ var qr = ["prefixCls", "rootClassName", "style", "className", "tabIndex", "items
|
|
|
943
943
|
return N.key;
|
|
944
944
|
}));
|
|
945
945
|
}, [Ge, mn]);
|
|
946
|
-
var
|
|
946
|
+
var At = Ze(O || K && ((a = fe[0]) === null || a === void 0 ? void 0 : a.key), {
|
|
947
947
|
value: O
|
|
948
|
-
}), Wn = $(
|
|
948
|
+
}), Wn = $(At, 2), Ae = Wn[0], pn = Wn[1], kt = Le(function(N) {
|
|
949
949
|
pn(N);
|
|
950
950
|
}), Dt = Le(function() {
|
|
951
951
|
pn(void 0);
|
|
@@ -954,12 +954,12 @@ var qr = ["prefixCls", "rootClassName", "style", "className", "tabIndex", "items
|
|
|
954
954
|
return {
|
|
955
955
|
list: me.current,
|
|
956
956
|
focus: function(M) {
|
|
957
|
-
var x, X = Un(), Z = Mn(X, he), Ye = Z.elements, gn = Z.key2element, Bt = Z.element2key, Hn = xn(me.current, Ye), Gn =
|
|
957
|
+
var x, X = Un(), Z = Mn(X, he), Ye = Z.elements, gn = Z.key2element, Bt = Z.element2key, Hn = xn(me.current, Ye), Gn = Ae ?? (Hn[0] ? Bt.get(Hn[0]) : (x = fe.find(function(Ht) {
|
|
958
958
|
return !Ht.props.disabled;
|
|
959
|
-
})) === null || x === void 0 ? void 0 : x.key),
|
|
960
|
-
if (Gn &&
|
|
959
|
+
})) === null || x === void 0 ? void 0 : x.key), ke = gn.get(Gn);
|
|
960
|
+
if (Gn && ke) {
|
|
961
961
|
var hn;
|
|
962
|
-
|
|
962
|
+
ke == null || (hn = ke.focus) === null || hn === void 0 || hn.call(ke, M);
|
|
963
963
|
}
|
|
964
964
|
}
|
|
965
965
|
};
|
|
@@ -976,16 +976,16 @@ var qr = ["prefixCls", "rootClassName", "style", "className", "tabIndex", "items
|
|
|
976
976
|
Y ? X ? Z = qe.filter(function(gn) {
|
|
977
977
|
return gn !== x;
|
|
978
978
|
}) : Z = [].concat(Me(qe), [x]) : Z = [x], Lt(Z);
|
|
979
|
-
var Ye =
|
|
979
|
+
var Ye = k(k({}, M), {}, {
|
|
980
980
|
selectedKeys: Z
|
|
981
981
|
});
|
|
982
982
|
X ? Q == null || Q(Ye) : V == null || V(Ye);
|
|
983
983
|
}
|
|
984
|
-
!Y &&
|
|
984
|
+
!Y && A.length && pe !== "inline" && fn(ye);
|
|
985
985
|
}, Vt = Le(function(N) {
|
|
986
986
|
Ie == null || Ie(en(N)), Tt(N);
|
|
987
987
|
}), Bn = Le(function(N, M) {
|
|
988
|
-
var x =
|
|
988
|
+
var x = A.filter(function(Z) {
|
|
989
989
|
return Z !== N;
|
|
990
990
|
});
|
|
991
991
|
if (M)
|
|
@@ -996,11 +996,11 @@ var qr = ["prefixCls", "rootClassName", "style", "className", "tabIndex", "items
|
|
|
996
996
|
return !X.has(Z);
|
|
997
997
|
});
|
|
998
998
|
}
|
|
999
|
-
at(
|
|
999
|
+
at(A, x, !0) || fn(x, !0);
|
|
1000
1000
|
}), Ft = function(M, x) {
|
|
1001
|
-
var X = x ?? !
|
|
1001
|
+
var X = x ?? !A.includes(M);
|
|
1002
1002
|
Bn(M, X);
|
|
1003
|
-
}, zt = Ir(pe,
|
|
1003
|
+
}, zt = Ir(pe, Ae, Ce, he, me, Un, Nt, pn, Ft, an);
|
|
1004
1004
|
t.useEffect(function() {
|
|
1005
1005
|
Ke(!0);
|
|
1006
1006
|
}, []);
|
|
@@ -1026,7 +1026,7 @@ var qr = ["prefixCls", "rootClassName", "style", "className", "tabIndex", "items
|
|
|
1026
1026
|
prefixCls: "".concat(o, "-overflow"),
|
|
1027
1027
|
component: "ul",
|
|
1028
1028
|
itemComponent: Pn,
|
|
1029
|
-
className: de(o, "".concat(o, "-root"), "".concat(o, "-").concat(pe), d, w(w({}, "".concat(o, "-inline-collapsed"),
|
|
1029
|
+
className: de(o, "".concat(o, "-root"), "".concat(o, "-").concat(pe), d, w(w({}, "".concat(o, "-inline-collapsed"), St), "".concat(o, "-rtl"), Ce), l),
|
|
1030
1030
|
dir: b,
|
|
1031
1031
|
style: u,
|
|
1032
1032
|
role: "menu",
|
|
@@ -1053,7 +1053,7 @@ var qr = ["prefixCls", "rootClassName", "style", "className", "tabIndex", "items
|
|
|
1053
1053
|
},
|
|
1054
1054
|
onKeyDown: zt
|
|
1055
1055
|
}, ln));
|
|
1056
|
-
return /* @__PURE__ */ t.createElement(
|
|
1056
|
+
return /* @__PURE__ */ t.createElement(En.Provider, {
|
|
1057
1057
|
value: Ut
|
|
1058
1058
|
}, /* @__PURE__ */ t.createElement(it.Provider, {
|
|
1059
1059
|
value: he
|
|
@@ -1061,13 +1061,13 @@ var qr = ["prefixCls", "rootClassName", "style", "className", "tabIndex", "items
|
|
|
1061
1061
|
prefixCls: o,
|
|
1062
1062
|
rootClassName: l,
|
|
1063
1063
|
mode: pe,
|
|
1064
|
-
openKeys:
|
|
1064
|
+
openKeys: A,
|
|
1065
1065
|
rtl: Ce,
|
|
1066
1066
|
disabled: P,
|
|
1067
1067
|
motion: Be ? se : null,
|
|
1068
1068
|
defaultMotions: Be ? ce : null,
|
|
1069
|
-
activeKey:
|
|
1070
|
-
onActive:
|
|
1069
|
+
activeKey: Ae,
|
|
1070
|
+
onActive: kt,
|
|
1071
1071
|
onInactive: Dt,
|
|
1072
1072
|
selectedKeys: qe,
|
|
1073
1073
|
inlineIndent: le,
|