@slotted/react 0.1.0-beta.26 → 0.1.0-beta.27
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/{action-bar-DckD0Sug.js → action-bar-CAtXzym2.js} +1 -1
- package/dist/action-bar.js +1 -1
- package/dist/{cascader-47GYpojH.js → cascader-CwwtJs3W.js} +189 -189
- package/dist/cascader.js +1 -1
- package/dist/{color-picker-BbyW5ALf.js → color-picker-2i3A60vD.js} +1 -1
- package/dist/color-picker.js +1 -1
- package/dist/{column-manager-Bz0bb4mq.js → column-manager-D4HIwXPi.js} +1 -1
- package/dist/column-manager.js +1 -1
- package/dist/{combobox-BA2nvbnA.js → combobox-BpZ8i-61.js} +86 -86
- package/dist/combobox.js +1 -1
- package/dist/{command-palette-DEKWsUFR.js → command-palette-BxbhO044.js} +11 -11
- package/dist/command-palette.js +1 -1
- package/dist/{context-menu-CfEEqDKr.js → context-menu-BJyDD17g.js} +1 -1
- package/dist/context-menu.js +1 -1
- package/dist/{dashboard-grid-WinSY-q3.js → dashboard-grid-De6al1Mj.js} +1 -1
- package/dist/dashboard-grid.js +1 -1
- package/dist/{data-grid-BWWvixwB.js → data-grid-CuHnCT01.js} +33 -33
- package/dist/data-grid.js +1 -1
- package/dist/{data-list-iw9K_oiz.js → data-list-CuzWmmGp.js} +5 -5
- package/dist/data-list.js +1 -1
- package/dist/docs/chart.json +2 -0
- package/dist/docs/chart.md +1 -1
- package/dist/docs/combobox.json +1 -0
- package/dist/docs/combobox.md +1 -1
- package/dist/docs/dialog.json +23 -4
- package/dist/docs/dialog.md +2 -60
- package/dist/docs/dialog.props.md +68 -0
- package/dist/docs/drawer.json +2 -0
- package/dist/docs/drawer.md +1 -1
- package/dist/docs/menu.json +1 -0
- package/dist/docs/menu.md +1 -1
- package/dist/docs/multi-select.json +1 -0
- package/dist/docs/multi-select.md +1 -1
- package/dist/docs/select.json +1 -0
- package/dist/docs/select.md +1 -1
- package/dist/docs/skills/theme-app/SKILL.md +4 -1
- package/dist/{entity-picker-WkBLvR2T.js → entity-picker-BYAlDJL-.js} +25 -25
- package/dist/entity-picker.js +1 -1
- package/dist/{event-calendar-BaPllnNk.js → event-calendar-BuZg4ghj.js} +2 -2
- package/dist/event-calendar.js +1 -1
- package/dist/{filter-bar-DRQEl4-J.js → filter-bar-DeBYLpbg.js} +3 -3
- package/dist/filter-bar.js +1 -1
- package/dist/{import-export-center-C1t2tkzg.js → import-export-center-CTliNoT9.js} +1 -1
- package/dist/import-export-center.js +1 -1
- package/dist/index.js +26 -26
- package/dist/{listbox-B9cBuitS.js → listbox-BSx90S2g.js} +10 -10
- package/dist/listbox.js +1 -1
- package/dist/{menu-parts-7F8syoFE.js → menu-parts-DNQDoJnd.js} +203 -204
- package/dist/menu.js +1 -1
- package/dist/{menubar-DzVGFn_I.js → menubar-CY8oxV0V.js} +1 -1
- package/dist/menubar.js +1 -1
- package/dist/{multi-select-DnOAXeuF.js → multi-select-Dh2gOp42.js} +68 -68
- package/dist/multi-select.js +1 -1
- package/dist/{saved-views-CsVRZTwK.js → saved-views-BKhAqvhI.js} +1 -1
- package/dist/saved-views.js +1 -1
- package/dist/{select-De77allF.js → select-BcTau8q3.js} +263 -263
- package/dist/select.js +1 -1
- package/dist/{split-button-DA1wcDJB.js → split-button-CgfY606Z.js} +1 -1
- package/dist/split-button.js +1 -1
- package/dist/styles/action-bar.css +1 -1
- package/dist/styles/action-sheet.css +1 -1
- package/dist/styles/card.css +1 -1
- package/dist/styles/cascader.css +1 -1
- package/dist/styles/chart.css +1 -1
- package/dist/styles/checkbox-group.css +1 -1
- package/dist/styles/checkbox.css +1 -1
- package/dist/styles/color-picker.css +3 -3
- package/dist/styles/column-manager.css +4 -4
- package/dist/styles/combobox.css +2 -2
- package/dist/styles/command-palette.css +1 -1
- package/dist/styles/context-menu.css +1 -1
- package/dist/styles/currency-field.css +1 -1
- package/dist/styles/dashboard-grid.css +2 -2
- package/dist/styles/data-grid.css +5 -5
- package/dist/styles/data-list.css +2 -2
- package/dist/styles/date-field.css +1 -1
- package/dist/styles/date-picker.css +1 -1
- package/dist/styles/date-range-picker.css +1 -1
- package/dist/styles/datetime-field.css +1 -1
- package/dist/styles/datetime-picker.css +1 -1
- package/dist/styles/datetime-range-picker.css +1 -1
- package/dist/styles/dialog.css +1 -1
- package/dist/styles/drawer.css +1 -1
- package/dist/styles/entity-picker.css +2 -2
- package/dist/styles/event-calendar.css +4 -4
- package/dist/styles/field-group.css +1 -1
- package/dist/styles/field.css +1 -1
- package/dist/styles/filter-bar.css +6 -6
- package/dist/styles/hover-card.css +1 -1
- package/dist/styles/import-export-center.css +3 -3
- package/dist/styles/index.css +10 -10
- package/dist/styles/listbox.css +1 -1
- package/dist/styles/markdown.css +1 -1
- package/dist/styles/menu.css +1 -1
- package/dist/styles/menubar.css +1 -1
- package/dist/styles/multi-select.css +2 -2
- package/dist/styles/notification-center.css +1 -1
- package/dist/styles/number-field.css +1 -1
- package/dist/styles/otp-input.css +1 -1
- package/dist/styles/popover.css +1 -1
- package/dist/styles/prompt-composer.css +1 -1
- package/dist/styles/radio-group.css +1 -1
- package/dist/styles/rating.css +1 -1
- package/dist/styles/saved-views.css +3 -3
- package/dist/styles/segmented-control.css +1 -1
- package/dist/styles/select.css +2 -2
- package/dist/styles/side-navigation.css +1 -1
- package/dist/styles/slider.css +1 -1
- package/dist/styles/split-button.css +1 -1
- package/dist/styles/switch.css +1 -1
- package/dist/styles/table.css +3 -3
- package/dist/styles/tags-input.css +1 -1
- package/dist/styles/text-field.css +1 -1
- package/dist/styles/textarea.css +1 -1
- package/dist/styles/time-field.css +1 -1
- package/dist/styles/time-picker.css +1 -1
- package/dist/styles/time-range-picker.css +1 -1
- package/dist/styles/toggle-group.css +1 -1
- package/dist/styles/toolbar.css +1 -1
- package/dist/styles/tooltip.css +1 -1
- package/dist/styles/top-navigation.css +1 -1
- package/dist/styles/transfer.css +1 -1
- package/dist/styles/upload.css +2 -2
- package/dist/styles.css +1 -1
- package/dist/{table-C3cjkzps.js → table-Dx-RQ64i.js} +208 -208
- package/dist/table.js +1 -1
- package/dist/{tags-input-DEhtpizX.js → tags-input-hZs5oaT1.js} +9 -9
- package/dist/tags-input.js +1 -1
- package/dist/{toolbar-CtSZ88HI.js → toolbar-CSiDqC8L.js} +1 -1
- package/dist/toolbar.js +1 -1
- package/dist/{transfer-BMRyopEw.js → transfer-DHjPhRlH.js} +5 -5
- package/dist/transfer.js +1 -1
- package/dist/{tree-DBirM2v9.js → tree-D-y-0TrL.js} +14 -14
- package/dist/tree.js +1 -1
- package/dist/types/menu/menu-parts.d.ts.map +1 -1
- package/package.json +6 -6
|
@@ -14,15 +14,15 @@ import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
|
14
14
|
import { createPresence as b } from "@slotted/core/presence";
|
|
15
15
|
import { cascaderMessages as ie } from "@slotted/core/i18n";
|
|
16
16
|
import { createPortalRoot as ae } from "@slotted/core/portal";
|
|
17
|
+
import { cascadeSelection as oe, createTreeCollection as se } from "@slotted/core/collection";
|
|
17
18
|
import { createDismissableLayer as x } from "@slotted/core/dismissable-layer";
|
|
18
19
|
import { createPositioner as S } from "@slotted/core/positioner";
|
|
19
|
-
import { createTypeahead as
|
|
20
|
-
import { createPortal as
|
|
21
|
-
import { cascaderFit as
|
|
22
|
-
import {
|
|
23
|
-
import { matchRanges as E } from "@slotted/core/highlight";
|
|
20
|
+
import { createTypeahead as C, isPrintable as w } from "@slotted/core/typeahead";
|
|
21
|
+
import { createPortal as T } from "react-dom";
|
|
22
|
+
import { cascaderFit as ce, cascaderKey as le, cascaderLayout as ue, cascaderMeasure as E, cascaderSelection as de, cascaderValue as fe, cascaderView as pe, flatToTree as me, pathTo as he } from "@slotted/core/cascader";
|
|
23
|
+
import { matchRanges as D } from "@slotted/core/highlight";
|
|
24
24
|
//#region src/cascader/cascader-defaults.tsx
|
|
25
|
-
var
|
|
25
|
+
var O = {
|
|
26
26
|
size: "md",
|
|
27
27
|
variant: "outline",
|
|
28
28
|
fullWidth: !0,
|
|
@@ -43,21 +43,21 @@ var D = {
|
|
|
43
43
|
hoverDelay: 150,
|
|
44
44
|
maxColumns: 3,
|
|
45
45
|
maxCrumbs: 4
|
|
46
|
-
},
|
|
47
|
-
function
|
|
48
|
-
return d(
|
|
46
|
+
}, k = te(O);
|
|
47
|
+
function A() {
|
|
48
|
+
return d(k);
|
|
49
49
|
}
|
|
50
|
-
function
|
|
51
|
-
let n = { ...
|
|
50
|
+
function ge({ children: e, ...t }) {
|
|
51
|
+
let n = { ...A() };
|
|
52
52
|
for (let [e, r] of Object.entries(t)) r !== void 0 && (n[e] = r);
|
|
53
|
-
return /* @__PURE__ */ v(
|
|
53
|
+
return /* @__PURE__ */ v(k.Provider, {
|
|
54
54
|
value: n,
|
|
55
55
|
children: e
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
58
|
//#endregion
|
|
59
59
|
//#region src/cascader/cascader-state.ts
|
|
60
|
-
function
|
|
60
|
+
function j(e, t, n, r) {
|
|
61
61
|
let [i, a] = g(t), o = e === void 0 ? i : e, s = h({
|
|
62
62
|
controlled: e,
|
|
63
63
|
current: o,
|
|
@@ -77,17 +77,17 @@ function A(e, t, n, r) {
|
|
|
77
77
|
}).request(e, t, n) ? (a(e), !0) : i.controlled !== void 0;
|
|
78
78
|
}, [])];
|
|
79
79
|
}
|
|
80
|
-
var
|
|
81
|
-
function
|
|
80
|
+
var _e = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]), ve = (e, t) => Array.isArray(e) && Array.isArray(t) ? _e(e, t) : e === t, ye = (e, t) => e === t;
|
|
81
|
+
function be(e) {
|
|
82
82
|
return e == null ? [] : typeof e == "string" ? [e] : e;
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function xe(n) {
|
|
85
85
|
let { defaults: r, getKey: i, getLabel: a, getChildren: o, getParent: s, hasChildren: c, getChildrenCount: l } = n, ee = t(ie, n.messages), te = e(), d = n.locale ?? te, re = ne(), p = m(() => {
|
|
86
|
-
let e = s === void 0 ? void 0 :
|
|
86
|
+
let e = s === void 0 ? void 0 : me(n.nodes, {
|
|
87
87
|
getKey: i,
|
|
88
88
|
getParent: s
|
|
89
89
|
});
|
|
90
|
-
return
|
|
90
|
+
return se({
|
|
91
91
|
roots: e?.roots ?? n.nodes,
|
|
92
92
|
getKey: i,
|
|
93
93
|
getLabel: a,
|
|
@@ -112,28 +112,28 @@ function Se(n) {
|
|
|
112
112
|
p,
|
|
113
113
|
_,
|
|
114
114
|
v
|
|
115
|
-
]), [
|
|
115
|
+
]), [C, w] = j(n.value, n.defaultValue ?? (_ ? [] : null), n.onValueChange, ve), [T, E] = j(n.path, n.defaultPath ?? [], n.onPathChange, _e), [D, O] = j(n.activeKey, n.defaultActiveKey ?? null, n.onActiveKeyChange, ye), [k, A] = j(n.expandedKeys, n.defaultExpandedKeys ?? [], n.onExpandedKeysChange, _e), [ge, xe] = j(n.searchValue, n.defaultSearchValue ?? "", n.onSearchValueChange, ye), M = x ? ge : "", N = be(C), P = m(() => _ ? de(p, N) : N, [
|
|
116
116
|
p,
|
|
117
117
|
_,
|
|
118
|
-
|
|
119
|
-
]),
|
|
118
|
+
N.join("\0")
|
|
119
|
+
]), F = ue({
|
|
120
120
|
layout: n.layout ?? r.layout,
|
|
121
121
|
available: n.available,
|
|
122
122
|
columnMeasure: n.columnMeasure,
|
|
123
123
|
inset: n.inset
|
|
124
|
-
}),
|
|
124
|
+
}), Se = ce({
|
|
125
125
|
available: n.available,
|
|
126
126
|
columnMeasure: n.columnMeasure,
|
|
127
127
|
inset: n.inset,
|
|
128
128
|
maxColumns: n.maxColumns ?? r.maxColumns
|
|
129
|
-
}),
|
|
129
|
+
}), Ce = n.filter, I = m(() => pe({
|
|
130
130
|
collection: p,
|
|
131
|
-
layout:
|
|
132
|
-
path:
|
|
133
|
-
activeKey:
|
|
134
|
-
expandedKeys:
|
|
135
|
-
query:
|
|
136
|
-
selected:
|
|
131
|
+
layout: F,
|
|
132
|
+
path: T,
|
|
133
|
+
activeKey: D,
|
|
134
|
+
expandedKeys: k,
|
|
135
|
+
query: M,
|
|
136
|
+
selected: P,
|
|
137
137
|
selectionMode: _ ? "multiple" : "single",
|
|
138
138
|
isSelectable: S,
|
|
139
139
|
isLoading: (e) => {
|
|
@@ -144,80 +144,80 @@ function Se(n) {
|
|
|
144
144
|
let t = p.nodeFor(e)?.item;
|
|
145
145
|
return t !== void 0 && (n.isNodeFailed?.(t) ?? !1);
|
|
146
146
|
},
|
|
147
|
-
fit:
|
|
147
|
+
fit: Se,
|
|
148
148
|
maxCrumbs: n.maxCrumbs ?? r.maxCrumbs,
|
|
149
|
-
filter:
|
|
149
|
+
filter: Ce === void 0 ? void 0 : (e, t) => {
|
|
150
150
|
let n = p.nodeFor(e)?.item;
|
|
151
|
-
return n !== void 0 &&
|
|
151
|
+
return n !== void 0 && Ce(n, t);
|
|
152
152
|
},
|
|
153
153
|
locale: d
|
|
154
154
|
}), [
|
|
155
|
-
|
|
155
|
+
D,
|
|
156
156
|
p,
|
|
157
157
|
r.maxCrumbs,
|
|
158
|
-
|
|
159
|
-
F,
|
|
158
|
+
k,
|
|
160
159
|
Ce,
|
|
160
|
+
Se,
|
|
161
161
|
S,
|
|
162
|
-
|
|
162
|
+
F,
|
|
163
163
|
_,
|
|
164
164
|
n.isNodeFailed,
|
|
165
165
|
n.isNodeLoading,
|
|
166
166
|
d,
|
|
167
167
|
n.maxCrumbs,
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
168
|
+
T,
|
|
169
|
+
M,
|
|
170
|
+
P
|
|
171
171
|
]), we = u((e) => `${re}node-${encodeURIComponent(e)}`, [re]), L = h({
|
|
172
172
|
options: n,
|
|
173
173
|
view: I,
|
|
174
|
-
selected:
|
|
174
|
+
selected: P,
|
|
175
175
|
multiple: _,
|
|
176
176
|
strategy: y,
|
|
177
|
-
path:
|
|
178
|
-
emitted:
|
|
179
|
-
layout:
|
|
177
|
+
path: T,
|
|
178
|
+
emitted: N,
|
|
179
|
+
layout: F
|
|
180
180
|
});
|
|
181
181
|
L.current = {
|
|
182
182
|
options: n,
|
|
183
183
|
view: I,
|
|
184
|
-
selected:
|
|
184
|
+
selected: P,
|
|
185
185
|
multiple: _,
|
|
186
186
|
strategy: y,
|
|
187
|
-
path:
|
|
188
|
-
emitted:
|
|
189
|
-
layout:
|
|
187
|
+
path: T,
|
|
188
|
+
emitted: N,
|
|
189
|
+
layout: F
|
|
190
190
|
};
|
|
191
191
|
let Te = u((e, t, n) => {
|
|
192
|
-
|
|
193
|
-
}, [
|
|
194
|
-
|
|
195
|
-
}, [p,
|
|
196
|
-
let r = e === void 0 ? [] :
|
|
197
|
-
|
|
192
|
+
O(e, t, n);
|
|
193
|
+
}, [O]), R = u((e, t, n) => {
|
|
194
|
+
E(he(p, e), t, n);
|
|
195
|
+
}, [p, E]), Ee = u((e, t, n) => {
|
|
196
|
+
let r = e === void 0 ? [] : he(p, e), i = L.current.path[r.length];
|
|
197
|
+
E(r, t === "pointer" ? "pointer" : "back", n), i !== void 0 && O(i, t, n);
|
|
198
198
|
}, [
|
|
199
199
|
p,
|
|
200
|
-
|
|
201
|
-
|
|
200
|
+
O,
|
|
201
|
+
E
|
|
202
202
|
]), z = u((e, t, n) => {
|
|
203
|
-
let r = L.current.options.expandedKeys ??
|
|
204
|
-
|
|
205
|
-
}, [
|
|
206
|
-
|
|
207
|
-
}, [
|
|
203
|
+
let r = L.current.options.expandedKeys ?? k;
|
|
204
|
+
A(r.includes(e) ? r.filter((t) => t !== e) : [...r, e], t, n);
|
|
205
|
+
}, [k, A]), De = u((e, t, n) => {
|
|
206
|
+
xe(e, t, n);
|
|
207
|
+
}, [xe]), B = u((e, t, n, i = {}) => {
|
|
208
208
|
let a = L.current;
|
|
209
209
|
if (!S(e) || (a.options.readOnly ?? r.readOnly)) return;
|
|
210
210
|
if (!a.multiple) {
|
|
211
|
-
|
|
211
|
+
w(e, t === "keyboard" ? "keyboard" : "pointer", n), a.options.closeOnSelect && i.close !== !1 && a.options.onCommitted?.();
|
|
212
212
|
return;
|
|
213
213
|
}
|
|
214
|
-
let o =
|
|
214
|
+
let o = oe({
|
|
215
215
|
collection: p,
|
|
216
216
|
selected: a.selected,
|
|
217
217
|
key: e,
|
|
218
218
|
action: "toggle"
|
|
219
219
|
});
|
|
220
|
-
o.changed &&
|
|
220
|
+
o.changed && w(fe({
|
|
221
221
|
collection: p,
|
|
222
222
|
selected: o.selected,
|
|
223
223
|
strategy: a.strategy
|
|
@@ -226,79 +226,79 @@ function Se(n) {
|
|
|
226
226
|
p,
|
|
227
227
|
r.readOnly,
|
|
228
228
|
S,
|
|
229
|
-
|
|
229
|
+
w
|
|
230
230
|
]), Oe = u((e, t) => {
|
|
231
231
|
let n = L.current;
|
|
232
232
|
if (!n.multiple) {
|
|
233
|
-
|
|
233
|
+
w(null, "remove", t);
|
|
234
234
|
return;
|
|
235
235
|
}
|
|
236
|
-
let r =
|
|
236
|
+
let r = oe({
|
|
237
237
|
collection: p,
|
|
238
238
|
selected: n.selected,
|
|
239
239
|
key: e,
|
|
240
240
|
action: "deselect"
|
|
241
241
|
});
|
|
242
|
-
|
|
242
|
+
w(fe({
|
|
243
243
|
collection: p,
|
|
244
244
|
selected: r.selected,
|
|
245
245
|
strategy: n.strategy
|
|
246
246
|
}), "remove", t);
|
|
247
|
-
}, [p,
|
|
247
|
+
}, [p, w]), V = u((e) => w(L.current.multiple ? [] : null, "clear", e), [w]), ke = u(() => {
|
|
248
248
|
let e = L.current.emitted[0];
|
|
249
249
|
if (e === void 0 || p.nodeFor(e) === void 0) {
|
|
250
|
-
|
|
250
|
+
O(p.roots[0] ?? null, "programmatic");
|
|
251
251
|
return;
|
|
252
252
|
}
|
|
253
|
-
let t =
|
|
254
|
-
|
|
253
|
+
let t = he(p, e);
|
|
254
|
+
E(t.slice(0, -1), "programmatic"), A(t.slice(0, -1), "programmatic"), O(e, "programmatic");
|
|
255
255
|
}, [
|
|
256
256
|
p,
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
257
|
+
O,
|
|
258
|
+
A,
|
|
259
|
+
E
|
|
260
260
|
]), Ae = u((e, t, n) => {
|
|
261
261
|
let r = L.current, i = r.view.searching;
|
|
262
262
|
if (n && i) {
|
|
263
|
-
let t = r.view.results.map((e) => e.key), n =
|
|
263
|
+
let t = r.view.results.map((e) => e.key), n = D === null ? -1 : t.indexOf(D);
|
|
264
264
|
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
|
265
265
|
let r = e.key === "ArrowDown" ? 1 : -1, i = t[Math.min(t.length - 1, Math.max(0, n + r))];
|
|
266
|
-
return i !== void 0 &&
|
|
266
|
+
return i !== void 0 && O(i, "keyboard", e.source), { type: "handled" };
|
|
267
267
|
}
|
|
268
|
-
if (e.key === "Enter" &&
|
|
269
|
-
if (S(
|
|
270
|
-
else if (p.nodeFor(
|
|
271
|
-
De("", "select", e.source), R(
|
|
272
|
-
let t = p.nodeFor(
|
|
273
|
-
t !== void 0 &&
|
|
268
|
+
if (e.key === "Enter" && D !== null) {
|
|
269
|
+
if (S(D)) B(D, "keyboard", e.source);
|
|
270
|
+
else if (p.nodeFor(D)?.hasChildren) {
|
|
271
|
+
De("", "select", e.source), R(D, "keyboard", e.source);
|
|
272
|
+
let t = p.nodeFor(D)?.children[0];
|
|
273
|
+
t !== void 0 && O(t, "keyboard", e.source);
|
|
274
274
|
}
|
|
275
275
|
return { type: "handled" };
|
|
276
276
|
}
|
|
277
277
|
return { type: "none" };
|
|
278
278
|
}
|
|
279
|
-
let a =
|
|
279
|
+
let a = le({
|
|
280
280
|
key: e.key,
|
|
281
281
|
dir: t,
|
|
282
282
|
layout: r.layout,
|
|
283
283
|
open: n,
|
|
284
|
-
active:
|
|
284
|
+
active: D ?? void 0,
|
|
285
285
|
path: r.path,
|
|
286
|
-
expandedKeys:
|
|
286
|
+
expandedKeys: k,
|
|
287
287
|
collection: p,
|
|
288
288
|
selectionMode: r.multiple ? "multiple" : "single",
|
|
289
289
|
isSelectable: S,
|
|
290
290
|
search: x,
|
|
291
|
-
hasQuery:
|
|
291
|
+
hasQuery: M !== ""
|
|
292
292
|
});
|
|
293
293
|
switch (a.type) {
|
|
294
294
|
case "move":
|
|
295
|
-
|
|
295
|
+
O(a.key, "keyboard", e.source);
|
|
296
296
|
break;
|
|
297
297
|
case "enter":
|
|
298
|
-
|
|
298
|
+
E(a.path, "keyboard", e.source), a.key !== void 0 && O(a.key, "keyboard", e.source);
|
|
299
299
|
break;
|
|
300
300
|
case "back":
|
|
301
|
-
|
|
301
|
+
E(a.path, "back", e.source), O(a.key, "keyboard", e.source);
|
|
302
302
|
break;
|
|
303
303
|
case "expand":
|
|
304
304
|
case "collapse":
|
|
@@ -309,19 +309,19 @@ function Se(n) {
|
|
|
309
309
|
}
|
|
310
310
|
return a;
|
|
311
311
|
}, [
|
|
312
|
-
|
|
312
|
+
D,
|
|
313
313
|
B,
|
|
314
314
|
p,
|
|
315
|
-
|
|
315
|
+
k,
|
|
316
316
|
S,
|
|
317
|
-
|
|
317
|
+
M,
|
|
318
318
|
x,
|
|
319
|
-
|
|
320
|
-
|
|
319
|
+
O,
|
|
320
|
+
E,
|
|
321
321
|
De,
|
|
322
322
|
R,
|
|
323
323
|
z
|
|
324
|
-
]), H = h(/* @__PURE__ */ new Map()), je = (n.showing ? I.columns.filter((e) => e.pending && !e.failed && e.parent !== void 0).map((e) => e.parent).concat(
|
|
324
|
+
]), H = h(/* @__PURE__ */ new Map()), je = (n.showing ? I.columns.filter((e) => e.pending && !e.failed && e.parent !== void 0).map((e) => e.parent).concat(F === "tree" ? k.filter((e) => {
|
|
325
325
|
let t = p.nodeFor(e);
|
|
326
326
|
return t !== void 0 && t.hasChildren && t.children.length === 0;
|
|
327
327
|
}) : []) : []).join("\0");
|
|
@@ -347,7 +347,7 @@ function Se(n) {
|
|
|
347
347
|
itemFor: g,
|
|
348
348
|
t: ee,
|
|
349
349
|
locale: d,
|
|
350
|
-
layout:
|
|
350
|
+
layout: F,
|
|
351
351
|
multiple: _,
|
|
352
352
|
disabled: b,
|
|
353
353
|
readOnly: ae,
|
|
@@ -366,11 +366,11 @@ function Se(n) {
|
|
|
366
366
|
n.loading,
|
|
367
367
|
I
|
|
368
368
|
]),
|
|
369
|
-
value:
|
|
370
|
-
emitted:
|
|
371
|
-
path:
|
|
372
|
-
activeKey:
|
|
373
|
-
query:
|
|
369
|
+
value: C,
|
|
370
|
+
emitted: N,
|
|
371
|
+
path: T,
|
|
372
|
+
activeKey: D,
|
|
373
|
+
query: M,
|
|
374
374
|
nodeId: we,
|
|
375
375
|
setActive: Te,
|
|
376
376
|
setQuery: De,
|
|
@@ -386,7 +386,7 @@ function Se(n) {
|
|
|
386
386
|
}
|
|
387
387
|
//#endregion
|
|
388
388
|
//#region src/cascader/cascader-surface.tsx
|
|
389
|
-
function
|
|
389
|
+
function M({ data: e, expandOn: t, hoverDelay: o, label: s, labelledBy: ee, separator: te, state: u, treeId: d, treeProps: ne, treeRef: re }) {
|
|
390
390
|
let { t: p, view: m } = u, g = h(void 0);
|
|
391
391
|
f(() => () => clearTimeout(g.current), []);
|
|
392
392
|
let b = (e) => e === void 0 ? p("root") : u.collection.nodeFor(e)?.label ?? e, ie = (e, t) => {
|
|
@@ -415,16 +415,16 @@ function j({ data: e, expandOn: t, hoverDelay: o, label: s, labelledBy: ee, sepa
|
|
|
415
415
|
u.choose(e.key, n, t.nativeEvent);
|
|
416
416
|
}, ae = (e) => {
|
|
417
417
|
clearTimeout(g.current), t === "hover" && e.branch && !e.disabled && u.layout !== "tree" && (m.searching || (g.current = setTimeout(() => u.showLevel(e.key, "pointer"), o)));
|
|
418
|
-
},
|
|
418
|
+
}, oe = (t) => {
|
|
419
419
|
let n = u.itemFor(t.key);
|
|
420
420
|
if (n !== void 0 && e.renderNode !== void 0) return e.renderNode(n, t);
|
|
421
421
|
if (!m.searching || u.query === "") return t.label;
|
|
422
|
-
let r =
|
|
422
|
+
let r = D(t.label, u.query, { locale: u.locale });
|
|
423
423
|
return /* @__PURE__ */ v(c, {
|
|
424
424
|
ranges: r,
|
|
425
425
|
text: t.label
|
|
426
426
|
});
|
|
427
|
-
},
|
|
427
|
+
}, se = (t) => {
|
|
428
428
|
let a = u.itemFor(t.key), o = m.searching ? t.trail.map(b).join(` ${te} `) : a === void 0 ? void 0 : e.getDescription?.(a), s = a === void 0 ? void 0 : e.renderIcon?.(a), c = t.branch ? u.multiple && t.selectedInside > 0 ? t.selectedInside : t.childrenCount : void 0, l = u.layout === "tree" && !m.searching ? { "--slotted-cascader-depth": t.depth } : void 0;
|
|
429
429
|
return /* @__PURE__ */ y("div", {
|
|
430
430
|
"aria-busy": t.loading ? !0 : void 0,
|
|
@@ -466,7 +466,7 @@ function j({ data: e, expandOn: t, hoverDelay: o, label: s, labelledBy: ee, sepa
|
|
|
466
466
|
/* @__PURE__ */ v("span", {
|
|
467
467
|
"data-part": "label",
|
|
468
468
|
"data-part-label": "",
|
|
469
|
-
children:
|
|
469
|
+
children: oe(t)
|
|
470
470
|
}),
|
|
471
471
|
o === void 0 || o === "" ? null : /* @__PURE__ */ v("span", {
|
|
472
472
|
"data-part": "description",
|
|
@@ -500,7 +500,7 @@ function j({ data: e, expandOn: t, hoverDelay: o, label: s, labelledBy: ee, sepa
|
|
|
500
500
|
})
|
|
501
501
|
]
|
|
502
502
|
}, t.key);
|
|
503
|
-
},
|
|
503
|
+
}, x = (t, n) => {
|
|
504
504
|
let r = b(t.parent), i = t.parent === void 0 ? void 0 : u.itemFor(t.parent);
|
|
505
505
|
return /* @__PURE__ */ y("div", {
|
|
506
506
|
"aria-busy": t.pending && !t.failed ? !0 : void 0,
|
|
@@ -509,7 +509,7 @@ function j({ data: e, expandOn: t, hoverDelay: o, label: s, labelledBy: ee, sepa
|
|
|
509
509
|
"data-part-column": "",
|
|
510
510
|
role: "group",
|
|
511
511
|
children: [
|
|
512
|
-
t.nodes.map(
|
|
512
|
+
t.nodes.map(se),
|
|
513
513
|
t.pending && !t.failed ? [
|
|
514
514
|
0,
|
|
515
515
|
1,
|
|
@@ -548,7 +548,7 @@ function j({ data: e, expandOn: t, hoverDelay: o, label: s, labelledBy: ee, sepa
|
|
|
548
548
|
}) : null
|
|
549
549
|
]
|
|
550
550
|
}, t.parent ?? `root-${n}`);
|
|
551
|
-
},
|
|
551
|
+
}, S = (e, t) => {
|
|
552
552
|
let i = t === 0 ? null : /* @__PURE__ */ v(r, {
|
|
553
553
|
directional: !0,
|
|
554
554
|
children: /* @__PURE__ */ v(n, { name: "chevron-right" })
|
|
@@ -571,12 +571,12 @@ function j({ data: e, expandOn: t, hoverDelay: o, label: s, labelledBy: ee, sepa
|
|
|
571
571
|
type: "button",
|
|
572
572
|
children: b(e.key)
|
|
573
573
|
}, e.key ?? "root")];
|
|
574
|
-
},
|
|
575
|
-
return /* @__PURE__ */ y(_, { children: [
|
|
574
|
+
}, C = m.crumbs;
|
|
575
|
+
return /* @__PURE__ */ y(_, { children: [C.length > 0 ? /* @__PURE__ */ y("nav", {
|
|
576
576
|
"aria-label": p("breadcrumb"),
|
|
577
577
|
"data-part": "breadcrumb",
|
|
578
578
|
"data-part-breadcrumb": "",
|
|
579
|
-
children: [
|
|
579
|
+
children: [C.flatMap(S), u.layout === "columns" ? /* @__PURE__ */ v(r, {
|
|
580
580
|
directional: !0,
|
|
581
581
|
children: /* @__PURE__ */ v(n, { name: "chevron-right" })
|
|
582
582
|
}) : null]
|
|
@@ -595,7 +595,7 @@ function j({ data: e, expandOn: t, hoverDelay: o, label: s, labelledBy: ee, sepa
|
|
|
595
595
|
"data-part-column": "",
|
|
596
596
|
role: "group",
|
|
597
597
|
children: [
|
|
598
|
-
m.results.map(
|
|
598
|
+
m.results.map(se),
|
|
599
599
|
m.results.length === 0 ? /* @__PURE__ */ v("div", {
|
|
600
600
|
"data-part": "empty",
|
|
601
601
|
"data-part-empty": "",
|
|
@@ -608,28 +608,28 @@ function j({ data: e, expandOn: t, hoverDelay: o, label: s, labelledBy: ee, sepa
|
|
|
608
608
|
children: m.results.length === 0 ? "" : p("results", { count: m.results.length })
|
|
609
609
|
})
|
|
610
610
|
]
|
|
611
|
-
}) : m.columns.map(
|
|
611
|
+
}) : m.columns.map(x)
|
|
612
612
|
})] });
|
|
613
613
|
}
|
|
614
|
-
function
|
|
614
|
+
function N(e, t) {
|
|
615
615
|
f(() => {
|
|
616
616
|
e !== null && t !== null && e.ownerDocument.getElementById(t)?.scrollIntoView?.({ block: "nearest" });
|
|
617
617
|
}, [e, t]);
|
|
618
618
|
}
|
|
619
619
|
//#endregion
|
|
620
620
|
//#region src/cascader/cascader.tsx
|
|
621
|
-
var
|
|
622
|
-
function
|
|
621
|
+
var P = (e) => e !== null && e.ownerDocument.defaultView?.getComputedStyle(e).direction === "rtl" ? "rtl" : "ltr";
|
|
622
|
+
function F(e) {
|
|
623
623
|
let t = h(null);
|
|
624
|
-
return f(() => (t.current =
|
|
624
|
+
return f(() => (t.current = C({ timeout: 500 }), () => t.current?.destroy()), []), (n, r) => {
|
|
625
625
|
let i = t.current;
|
|
626
|
-
if (i === null || !
|
|
626
|
+
if (i === null || !w(n, i.query.length > 0)) return !1;
|
|
627
627
|
let a = e.activeKey, o = a === null ? void 0 : e.collection.nodeFor(a), s = e.layout === "tree" ? e.view.columns[0]?.nodes.map((e) => e.key) ?? [] : o === void 0 ? e.collection.roots : e.collection.siblingsOf(o.key), c = s.map((t) => e.collection.nodeFor(t)?.label ?? ""), l = s[i.match(n, c, a === null ? -1 : s.indexOf(a))];
|
|
628
628
|
return l !== void 0 && e.setActive(l, "keyboard", r), !0;
|
|
629
629
|
};
|
|
630
630
|
}
|
|
631
|
-
function
|
|
632
|
-
let { nodes: t, getKey: a, getLabel: c, getChildren: ee, getParent: te, hasChildren: d, getChildrenCount: m, isNodeDisabled: _, isNodeLoading: ie, isNodeFailed: oe, loading:
|
|
631
|
+
function Se(e) {
|
|
632
|
+
let { nodes: t, getKey: a, getLabel: c, getChildren: ee, getParent: te, hasChildren: d, getChildrenCount: m, isNodeDisabled: _, isNodeLoading: ie, isNodeFailed: oe, loading: se, getDescription: C, renderIcon: le, renderNode: ue, onLoadChildren: de, onRetry: fe, filter: pe, locale: me, selectionMode: D, value: O, defaultValue: k, onValueChange: ge, path: j, defaultPath: _e, onPathChange: ve, activeKey: ye, defaultActiveKey: be, onActiveKeyChange: Se, expandedKeys: Ce, defaultExpandedKeys: I, onExpandedKeysChange: we, searchValue: L, defaultSearchValue: Te, onSearchValueChange: R, layout: Ee, selectable: z, checkedStrategy: De, expandOn: B, search: Oe, size: V, maxColumns: ke, maxCrumbs: Ae, hoverDelay: H, disabled: je, readOnly: Me, messages: Ne, open: Pe, defaultOpen: Fe, onOpenChange: Ie, closeOnSelect: Le, clearable: Re, variant: ze, fullWidth: Be, portal: Ve, required: He, invalid: Ue, separator: We, renderValue: Ge, name: Ke, form: qe, handleRef: Je, ref: Ye, "aria-label": Xe, "aria-labelledby": Ze, ...Qe } = e, U = A(), W = o(), $e = ne(), et = `${$e}content`, tt = `${$e}tree`, [nt, rt] = g(Fe ?? !1), G = je ?? W?.disabled ?? U.disabled, it = Me ?? W?.readOnly ?? U.readOnly, K = (Pe ?? nt) && !G, at = Le ?? U.closeOnSelect, [ot, st] = g(null), [q, ct] = g(null), [J, lt] = g(null), [ut, dt] = g(null), [ft, pt] = g(null), [mt, ht] = g(null), [gt, _t] = g("unmounted"), [vt, yt] = g(!1), [bt, xt] = g(!1), [Y, St] = g({
|
|
633
633
|
available: void 0,
|
|
634
634
|
columnMeasure: 192,
|
|
635
635
|
inset: 2
|
|
@@ -661,7 +661,7 @@ function Ce(e) {
|
|
|
661
661
|
i = !0;
|
|
662
662
|
}
|
|
663
663
|
}), !(i || r.open !== void 0) && rt(e);
|
|
664
|
-
}, []), Q =
|
|
664
|
+
}, []), Q = xe({
|
|
665
665
|
nodes: t,
|
|
666
666
|
getKey: a,
|
|
667
667
|
getLabel: c,
|
|
@@ -672,25 +672,25 @@ function Ce(e) {
|
|
|
672
672
|
isNodeDisabled: _,
|
|
673
673
|
isNodeLoading: ie,
|
|
674
674
|
isNodeFailed: oe,
|
|
675
|
-
loading:
|
|
676
|
-
getDescription:
|
|
677
|
-
renderIcon:
|
|
678
|
-
renderNode:
|
|
679
|
-
onLoadChildren:
|
|
680
|
-
onRetry:
|
|
681
|
-
filter:
|
|
682
|
-
locale:
|
|
683
|
-
selectionMode:
|
|
684
|
-
value:
|
|
685
|
-
defaultValue:
|
|
686
|
-
onValueChange:
|
|
687
|
-
path:
|
|
688
|
-
defaultPath:
|
|
689
|
-
onPathChange:
|
|
690
|
-
activeKey:
|
|
691
|
-
defaultActiveKey:
|
|
692
|
-
onActiveKeyChange:
|
|
693
|
-
expandedKeys:
|
|
675
|
+
loading: se,
|
|
676
|
+
getDescription: C,
|
|
677
|
+
renderIcon: le,
|
|
678
|
+
renderNode: ue,
|
|
679
|
+
onLoadChildren: de,
|
|
680
|
+
onRetry: fe,
|
|
681
|
+
filter: pe,
|
|
682
|
+
locale: me,
|
|
683
|
+
selectionMode: D,
|
|
684
|
+
value: O,
|
|
685
|
+
defaultValue: k,
|
|
686
|
+
onValueChange: ge,
|
|
687
|
+
path: j,
|
|
688
|
+
defaultPath: _e,
|
|
689
|
+
onPathChange: ve,
|
|
690
|
+
activeKey: ye,
|
|
691
|
+
defaultActiveKey: be,
|
|
692
|
+
onActiveKeyChange: Se,
|
|
693
|
+
expandedKeys: Ce,
|
|
694
694
|
defaultExpandedKeys: I,
|
|
695
695
|
onExpandedKeysChange: we,
|
|
696
696
|
searchValue: L,
|
|
@@ -717,7 +717,7 @@ function Ce(e) {
|
|
|
717
717
|
onCommitted: () => {
|
|
718
718
|
Z(!1, "select"), X.current.trigger?.focus({ preventScroll: !0 });
|
|
719
719
|
}
|
|
720
|
-
}), Ct = V ?? W?.size ?? U.size, $ = Q.search, wt = We ?? U.separator, Tt =
|
|
720
|
+
}), Ct = V ?? W?.size ?? U.size, $ = Q.search, wt = We ?? U.separator, Tt = F(Q), Et = h(!1);
|
|
721
721
|
p(() => {
|
|
722
722
|
K && !Et.current && Q.reveal(), !K && Et.current && Q.setQuery("", "clear"), Et.current = K;
|
|
723
723
|
});
|
|
@@ -756,7 +756,7 @@ function Ce(e) {
|
|
|
756
756
|
q
|
|
757
757
|
]), p(() => {
|
|
758
758
|
if (ut === null) return;
|
|
759
|
-
let e =
|
|
759
|
+
let e = E(ut);
|
|
760
760
|
St((t) => t.columnMeasure === e.columnMeasure && t.inset === e.inset ? t : {
|
|
761
761
|
...t,
|
|
762
762
|
...e
|
|
@@ -803,7 +803,7 @@ function Ce(e) {
|
|
|
803
803
|
J.style.removeProperty("inline-size");
|
|
804
804
|
return;
|
|
805
805
|
}
|
|
806
|
-
let e =
|
|
806
|
+
let e = ce({
|
|
807
807
|
...Y,
|
|
808
808
|
maxColumns: ke ?? U.maxColumns
|
|
809
809
|
});
|
|
@@ -846,7 +846,7 @@ function Ce(e) {
|
|
|
846
846
|
K,
|
|
847
847
|
$,
|
|
848
848
|
ft
|
|
849
|
-
]),
|
|
849
|
+
]), N(ut, Q.activeKey === null ? null : Q.nodeId(Q.activeKey)), re(Je, () => ({
|
|
850
850
|
open: () => Z(!0, "programmatic"),
|
|
851
851
|
close: () => Z(!1, "programmatic"),
|
|
852
852
|
focus: () => X.current.trigger?.focus({ preventScroll: !0 }),
|
|
@@ -867,13 +867,13 @@ function Ce(e) {
|
|
|
867
867
|
e.preventDefault();
|
|
868
868
|
return;
|
|
869
869
|
}
|
|
870
|
-
(!t || e.key !== "Home" && e.key !== "End") && (!t || e.key !== " " && !
|
|
870
|
+
(!t || e.key !== "Home" && e.key !== "End") && (!t || e.key !== " " && !w(e.key, !1)) && Q.handleKey({
|
|
871
871
|
key: e.key,
|
|
872
872
|
source: e.nativeEvent
|
|
873
|
-
},
|
|
873
|
+
}, P(e.currentTarget), !0).type !== "none" && e.preventDefault();
|
|
874
874
|
}
|
|
875
875
|
}
|
|
876
|
-
}, It = Q.emitted.length === 1 && !Q.multiple ?
|
|
876
|
+
}, It = Q.emitted.length === 1 && !Q.multiple ? he(Q.collection, Q.emitted[0]).map((e) => Q.itemFor(e)).filter((e) => e !== void 0) : [], Lt = Q.multiple ? /* @__PURE__ */ v("span", {
|
|
877
877
|
"data-part": "value",
|
|
878
878
|
"data-part-value": "",
|
|
879
879
|
children: /* @__PURE__ */ v("span", {
|
|
@@ -906,7 +906,7 @@ function Ce(e) {
|
|
|
906
906
|
"data-part": "value",
|
|
907
907
|
"data-part-value": "",
|
|
908
908
|
children: Ge(It)
|
|
909
|
-
}), Rt = (Re ?? U.clearable) && Q.emitted.length > 0 && !G && !it, zt = [Qe["aria-describedby"], W?.describedBy].filter(Boolean).join(" "), Bt = Ue ?? W?.invalid ?? U.invalid, Vt = He ?? W?.required ?? U.required, Ht =
|
|
909
|
+
}), Rt = (Re ?? U.clearable) && Q.emitted.length > 0 && !G && !it, zt = [Qe["aria-describedby"], W?.describedBy].filter(Boolean).join(" "), Bt = Ue ?? W?.invalid ?? U.invalid, Vt = He ?? W?.required ?? U.required, Ht = se === !0, Ut = (e) => {
|
|
910
910
|
G || Z(!K, e.detail === 0 ? "keyboard" : "pointer", e.nativeEvent);
|
|
911
911
|
}, Wt = /* @__PURE__ */ y("div", {
|
|
912
912
|
"aria-label": $ ? Xe ?? Q.t("search") : void 0,
|
|
@@ -933,7 +933,7 @@ function Ce(e) {
|
|
|
933
933
|
role: "combobox",
|
|
934
934
|
value: Q.query
|
|
935
935
|
})]
|
|
936
|
-
}) : null, /* @__PURE__ */ v(
|
|
936
|
+
}) : null, /* @__PURE__ */ v(M, {
|
|
937
937
|
data: e,
|
|
938
938
|
expandOn: B ?? U.expandOn,
|
|
939
939
|
hoverDelay: H ?? U.hoverDelay,
|
|
@@ -1034,12 +1034,12 @@ function Ce(e) {
|
|
|
1034
1034
|
type: "hidden",
|
|
1035
1035
|
value: e
|
|
1036
1036
|
}, e)),
|
|
1037
|
-
Gt === null ? null : mt === null ? Gt :
|
|
1037
|
+
Gt === null ? null : mt === null ? Gt : T(Gt, mt)
|
|
1038
1038
|
]
|
|
1039
1039
|
});
|
|
1040
1040
|
}
|
|
1041
|
-
function
|
|
1042
|
-
let { nodes: t, getKey: n, getLabel: r, getChildren: i, getParent: a, hasChildren: o, getChildrenCount: s, isNodeDisabled: c, isNodeLoading: ee, isNodeFailed: te, loading: u, getDescription: d, renderIcon: f, renderNode: re, onLoadChildren: m, onRetry: _, filter: y, locale: b, selectionMode: ie, value: ae, defaultValue:
|
|
1041
|
+
function Ce(e) {
|
|
1042
|
+
let { nodes: t, getKey: n, getLabel: r, getChildren: i, getParent: a, hasChildren: o, getChildrenCount: s, isNodeDisabled: c, isNodeLoading: ee, isNodeFailed: te, loading: u, getDescription: d, renderIcon: f, renderNode: re, onLoadChildren: m, onRetry: _, filter: y, locale: b, selectionMode: ie, value: ae, defaultValue: oe, onValueChange: se, path: x, defaultPath: S, onPathChange: C, activeKey: w, defaultActiveKey: T, onActiveKeyChange: ce, expandedKeys: le, defaultExpandedKeys: ue, onExpandedKeysChange: de, searchValue: fe, defaultSearchValue: pe, onSearchValueChange: me, layout: he, selectable: D, checkedStrategy: O, expandOn: k, search: ge, size: j, maxColumns: _e, maxCrumbs: ve, hoverDelay: ye, disabled: be, readOnly: Se, messages: Ce, ref: I, "aria-label": we, "aria-labelledby": L, ...Te } = e, R = A(), Ee = `${ne()}tree`, [z, De] = g(null), [B, Oe] = g({
|
|
1043
1043
|
available: void 0,
|
|
1044
1044
|
columnMeasure: 192,
|
|
1045
1045
|
inset: 2
|
|
@@ -1047,7 +1047,7 @@ function F(e) {
|
|
|
1047
1047
|
p(() => {
|
|
1048
1048
|
if (z === null) return;
|
|
1049
1049
|
let e = z.parentElement ?? z, t = () => {
|
|
1050
|
-
let t =
|
|
1050
|
+
let t = E(z), n = e.getBoundingClientRect().width;
|
|
1051
1051
|
Oe((e) => e.available === n && e.columnMeasure === t.columnMeasure && e.inset === t.inset ? e : {
|
|
1052
1052
|
available: n,
|
|
1053
1053
|
...t
|
|
@@ -1057,7 +1057,7 @@ function F(e) {
|
|
|
1057
1057
|
let n = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(t);
|
|
1058
1058
|
return n?.observe(e), () => n?.disconnect();
|
|
1059
1059
|
}, [z]);
|
|
1060
|
-
let V =
|
|
1060
|
+
let V = xe({
|
|
1061
1061
|
nodes: t,
|
|
1062
1062
|
getKey: n,
|
|
1063
1063
|
getLabel: r,
|
|
@@ -1078,42 +1078,42 @@ function F(e) {
|
|
|
1078
1078
|
locale: b,
|
|
1079
1079
|
selectionMode: ie,
|
|
1080
1080
|
value: ae,
|
|
1081
|
-
defaultValue:
|
|
1082
|
-
onValueChange:
|
|
1083
|
-
path:
|
|
1084
|
-
defaultPath:
|
|
1085
|
-
onPathChange:
|
|
1086
|
-
activeKey:
|
|
1087
|
-
defaultActiveKey:
|
|
1088
|
-
onActiveKeyChange:
|
|
1089
|
-
expandedKeys:
|
|
1090
|
-
defaultExpandedKeys:
|
|
1091
|
-
onExpandedKeysChange:
|
|
1092
|
-
searchValue:
|
|
1093
|
-
defaultSearchValue:
|
|
1094
|
-
onSearchValueChange:
|
|
1095
|
-
layout:
|
|
1096
|
-
selectable:
|
|
1097
|
-
checkedStrategy:
|
|
1098
|
-
expandOn:
|
|
1099
|
-
search:
|
|
1100
|
-
size:
|
|
1101
|
-
maxColumns:
|
|
1102
|
-
maxCrumbs:
|
|
1103
|
-
hoverDelay:
|
|
1104
|
-
disabled:
|
|
1105
|
-
readOnly:
|
|
1106
|
-
messages:
|
|
1081
|
+
defaultValue: oe,
|
|
1082
|
+
onValueChange: se,
|
|
1083
|
+
path: x,
|
|
1084
|
+
defaultPath: S,
|
|
1085
|
+
onPathChange: C,
|
|
1086
|
+
activeKey: w,
|
|
1087
|
+
defaultActiveKey: T,
|
|
1088
|
+
onActiveKeyChange: ce,
|
|
1089
|
+
expandedKeys: le,
|
|
1090
|
+
defaultExpandedKeys: ue,
|
|
1091
|
+
onExpandedKeysChange: de,
|
|
1092
|
+
searchValue: fe,
|
|
1093
|
+
defaultSearchValue: pe,
|
|
1094
|
+
onSearchValueChange: me,
|
|
1095
|
+
layout: he,
|
|
1096
|
+
selectable: D,
|
|
1097
|
+
checkedStrategy: O,
|
|
1098
|
+
expandOn: k,
|
|
1099
|
+
search: ge,
|
|
1100
|
+
size: j,
|
|
1101
|
+
maxColumns: _e,
|
|
1102
|
+
maxCrumbs: ve,
|
|
1103
|
+
hoverDelay: ye,
|
|
1104
|
+
disabled: be,
|
|
1105
|
+
readOnly: Se,
|
|
1106
|
+
messages: Ce,
|
|
1107
1107
|
defaults: R,
|
|
1108
1108
|
showing: !0,
|
|
1109
1109
|
available: B.available,
|
|
1110
1110
|
columnMeasure: B.columnMeasure,
|
|
1111
1111
|
inset: B.inset,
|
|
1112
1112
|
closeOnSelect: !1
|
|
1113
|
-
}), ke =
|
|
1113
|
+
}), ke = F(V), Ae = h(!1);
|
|
1114
1114
|
p(() => {
|
|
1115
1115
|
Ae.current || (Ae.current = !0, V.activeKey === null && V.reveal());
|
|
1116
|
-
}),
|
|
1116
|
+
}), N(z, V.activeKey === null ? null : V.nodeId(V.activeKey));
|
|
1117
1117
|
let H = (e) => {
|
|
1118
1118
|
if (V.disabled) return;
|
|
1119
1119
|
if (ke(e.key, e.nativeEvent)) {
|
|
@@ -1123,7 +1123,7 @@ function F(e) {
|
|
|
1123
1123
|
let t = V.handleKey({
|
|
1124
1124
|
key: e.key,
|
|
1125
1125
|
source: e.nativeEvent
|
|
1126
|
-
},
|
|
1126
|
+
}, P(e.currentTarget), !0);
|
|
1127
1127
|
t.type !== "none" && t.type !== "close" && e.preventDefault();
|
|
1128
1128
|
};
|
|
1129
1129
|
return /* @__PURE__ */ v("div", {
|
|
@@ -1131,16 +1131,16 @@ function F(e) {
|
|
|
1131
1131
|
"data-disabled": V.disabled ? "" : void 0,
|
|
1132
1132
|
"data-layout": V.layout,
|
|
1133
1133
|
"data-selection": V.multiple ? "multiple" : void 0,
|
|
1134
|
-
"data-size":
|
|
1134
|
+
"data-size": j ?? R.size,
|
|
1135
1135
|
"data-ui": "cascader",
|
|
1136
1136
|
"data-ui-cascader": "",
|
|
1137
1137
|
ref: (e) => {
|
|
1138
1138
|
De(e), typeof I == "function" ? I(e) : I != null && (I.current = e);
|
|
1139
1139
|
},
|
|
1140
|
-
children: /* @__PURE__ */ v(
|
|
1140
|
+
children: /* @__PURE__ */ v(M, {
|
|
1141
1141
|
data: e,
|
|
1142
|
-
expandOn:
|
|
1143
|
-
hoverDelay:
|
|
1142
|
+
expandOn: k ?? R.expandOn,
|
|
1143
|
+
hoverDelay: ye ?? R.hoverDelay,
|
|
1144
1144
|
label: we,
|
|
1145
1145
|
labelledBy: L,
|
|
1146
1146
|
separator: R.separator,
|
|
@@ -1154,4 +1154,4 @@ function F(e) {
|
|
|
1154
1154
|
});
|
|
1155
1155
|
}
|
|
1156
1156
|
//#endregion
|
|
1157
|
-
export {
|
|
1157
|
+
export { A as a, ge as i, Ce as n, O as r, Se as t };
|