@midas-ds/components 1.0.3 → 1.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/{Button-B4vMZbC6.js → Button-DL6nqUco.js} +22 -22
- package/CHANGELOG.md +6 -1
- package/{Checkbox-DnKWanep.js → Checkbox-q0dugR2t.js} +8 -8
- package/{Collection-COLWgm24.js → Collection-KMFfVuzU.js} +2 -2
- package/{Dialog-Cb6toyXO.js → Dialog-D6Bqrpn-.js} +170 -169
- package/Disclosure-dAZYXyTH.js +225 -0
- package/Disclosure.css +1 -0
- package/{FocusScope-C8i7CH6y.js → FocusScope-B7CkxXNC.js} +1 -1
- package/{Form-BQQs3jUk.js → Form-BWBjJC6v.js} +42 -42
- package/{Group-CdwXhx8Q.js → Group-D7_8007y.js} +10 -10
- package/Heading-RCRHv6hd.js +15 -0
- package/{Hidden-DngIphiL.js → Hidden-CVlUgUJM.js} +1 -1
- package/{Link-iAZLB3RI.js → Link-BnQvB-hH.js} +8 -8
- package/{ListBox-BKWkIIm6.js → ListBox-DBBiqvcR.js} +72 -72
- package/{ListKeyboardDelegate-BH-K5hyq.js → ListKeyboardDelegate-gCXy-Xnn.js} +2 -2
- package/{PressResponder-Cz-TRBHO.js → PressResponder-B4g56kDz.js} +5 -5
- package/{RSPContexts-EOiWkKOf.js → RSPContexts-BW2SEIqe.js} +2 -2
- package/{SelectionManager-8o40f7mx.js → SelectionManager-BfXUE1qg.js} +113 -129
- package/{Separator-BlvmQjwz.js → Separator-BBX9m2O2.js} +2 -2
- package/{Tag--W5TgxmK.js → Tag-DWt0koFj.js} +74 -74
- package/Text-BCF0xvqL.js +15 -0
- package/{TextField-DeK_yiK-.js → TextField-CX4eOQf6.js} +33 -33
- package/{TextField.module-0-u4LVPp.js → TextField.module-DdICj682.js} +7 -7
- package/{VisuallyHidden-CFx06Bae.js → VisuallyHidden-Dhr5caPC.js} +1 -1
- package/accordion/Accordion.d.ts +8 -8
- package/accordion/AccordionItem.d.ts +11 -3
- package/accordion/index.d.ts +0 -3
- package/{context-Bnqknrce.js → context-BpJLnOuu.js} +11 -11
- package/global.css +1 -0
- package/index.d.ts +1 -0
- package/index.js +105 -110
- package/index10.js +1 -1
- package/index11.js +1 -1
- package/index12.js +1 -1
- package/index13.js +1 -1
- package/index14.js +1 -1
- package/index15.js +2 -2
- package/index16.js +2 -2
- package/index17.js +1 -1
- package/index18.js +1 -1
- package/index19.js +2 -2
- package/index2.js +1 -1
- package/index20.js +2 -2
- package/index21.js +1 -1
- package/index22.js +1 -1
- package/index23.js +1 -1
- package/index24.js +1 -1
- package/index25.js +2 -2
- package/index26.js +2 -2
- package/index27.js +2 -2
- package/index28.js +1 -1
- package/index29.js +2 -8
- package/index3.js +1 -1
- package/index30.js +17 -16
- package/index31.js +1 -1
- package/index32.js +1 -1
- package/index33.js +1 -1
- package/index34.js +2 -2
- package/index36.js +1 -1
- package/index37.js +1 -1
- package/index38.js +1 -1
- package/index39.js +1 -1
- package/index4.js +1 -1
- package/index40.js +19 -12
- package/index41.js +61 -14
- package/index42.js +44 -22
- package/index43.js +13 -11
- package/index44.js +25 -4
- package/index45.js +16 -51
- package/index46.js +19 -16
- package/index47.js +49 -27
- package/index48.js +5 -18
- package/index49.js +25 -21
- package/index5.js +1 -1
- package/index50.js +16 -47
- package/index51.js +7 -3
- package/index52.js +18 -18
- package/index53.js +16 -16
- package/index54.js +5 -3
- package/index55.js +7 -20
- package/index56.js +13 -16
- package/index57.js +6 -8
- package/index58.js +5 -8
- package/index59.js +17 -13
- package/index6.js +1 -1
- package/index60.js +20 -7
- package/index61.js +59 -7
- package/index62.js +13 -17
- package/index63.js +9 -20
- package/index64.js +38 -46
- package/index65.js +85 -15
- package/index66.js +74 -11
- package/index67.js +23 -62
- package/index68.js +64 -80
- package/index69.js +68 -62
- package/index7.js +1 -1
- package/index70.js +138 -22
- package/index71.js +66 -65
- package/index72.js +40 -78
- package/index73.js +75 -133
- package/index74.js +69 -68
- package/index75.js +96 -34
- package/index76.js +258 -65
- package/index77.js +715 -63
- package/index78.js +478 -93
- package/index79.js +303 -263
- package/index8.js +1 -1
- package/index80.js +343 -677
- package/index81.js +242 -479
- package/index82.js +1332 -282
- package/index83.js +966 -346
- package/index84.js +344 -210
- package/index85.js +2024 -1286
- package/index86.js +2314 -955
- package/index87.js +6785 -340
- package/index88.js +15 -2099
- package/index89.js +12 -2367
- package/index9.js +1 -1
- package/index90.js +4 -6834
- package/index91.js +7 -15
- package/package.json +1 -1
- package/useControlledState-Kv9K2AYu.js +30 -0
- package/{useDescription-BPs7eRff.js → useDescription-B7stiK3j.js} +1 -1
- package/useEvent-Xk5kn5Ns.js +21 -0
- package/{useField-Dz62UHCP.js → useField-DMzJIIN4.js} +5 -5
- package/{useFilter-ViwzkzZe.js → useFilter-Bt9dbV1U.js} +1 -1
- package/{useFocusRing-BKGhL91C.js → useFocusRing-9PXyKy2A.js} +26 -26
- package/{useFocusable-CRSmYEQc.js → useFocusable-CcEBZe40.js} +1 -1
- package/{useGridSelectionCheckbox-CVEvUCJL.js → useGridSelectionCheckbox-DYgEnElE.js} +3 -3
- package/{useHasTabbableChild-C8y4fwiY.js → useHasTabbableChild-D6DwR81L.js} +5 -5
- package/{useHighlightSelectionDescription-CD74uzLh.js → useHighlightSelectionDescription-WYAbP4No.js} +4 -4
- package/useLabels-9zaZ9oa0.js +17 -0
- package/{useListState-DKnP5TB5.js → useListState-BfTeKTk5.js} +1 -1
- package/{useLocalizedStringFormatter-DsZ-ZWSk.js → useLocalizedStringFormatter-BlCbn-hX.js} +1 -1
- package/{useSingleSelectListState-BHTLh8Ob.js → useSingleSelectListState-DPkaL0la.js} +2 -2
- package/Text-CQPW6xs7.js +0 -15
- package/accordion/AccordionContent.d.ts +0 -3
- package/accordion/AccordionTagContext.d.ts +0 -3
- package/accordion/AccordionTrigger.d.ts +0 -3
- package/index-DK9ZACEc.js +0 -642
- package/index.css +0 -1
- package/index92.js +0 -14
- package/index93.js +0 -6
- package/index94.js +0 -9
- package/useControlledState-DrAoodI6.js +0 -45
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { $ as ne, a as re, b as W, e as
|
|
2
|
-
import {
|
|
1
|
+
import { $ as ne, a as re, b as W, e as de, c as le } from "./Collection-KMFfVuzU.js";
|
|
2
|
+
import { o as C, f as ie, k as j, e as E, C as G, G as se, H as ce, I as ue, b as Q, J, q as fe, a as pe, i as R, F as be, c as $e, d as T, B as X, z as ge } from "./useFocusRing-9PXyKy2A.js";
|
|
3
3
|
import { $ as _, a as ve, b as he, c as Y } from "./DragAndDrop-B0T3WgjL.js";
|
|
4
|
-
import { $ as me, a as Pe, b as De, c as xe, d as ye } from "./Separator-
|
|
5
|
-
import { $ as Se } from "./Text-
|
|
4
|
+
import { $ as me, a as Pe, b as De, c as xe, d as ye } from "./Separator-BBX9m2O2.js";
|
|
5
|
+
import { $ as Se } from "./Text-BCF0xvqL.js";
|
|
6
6
|
import c, { forwardRef as Z, useContext as h, useMemo as K, useRef as N, useEffect as ee, createContext as oe } from "react";
|
|
7
|
-
import { $ as ke } from "./useListState-
|
|
8
|
-
import { $ as Fe } from "./context-
|
|
9
|
-
import { $ as He, a as we } from "./ListKeyboardDelegate-
|
|
10
|
-
import { c as Be } from "./useField-
|
|
11
|
-
import { d as Ee } from "./SelectionManager-
|
|
12
|
-
import { a as Ie } from "./FocusScope-
|
|
7
|
+
import { $ as ke } from "./useListState-BfTeKTk5.js";
|
|
8
|
+
import { $ as Fe } from "./context-BpJLnOuu.js";
|
|
9
|
+
import { $ as He, a as we } from "./ListKeyboardDelegate-gCXy-Xnn.js";
|
|
10
|
+
import { c as Be } from "./useField-DMzJIIN4.js";
|
|
11
|
+
import { d as Ee } from "./SelectionManager-BfXUE1qg.js";
|
|
12
|
+
import { a as Ie } from "./FocusScope-B7CkxXNC.js";
|
|
13
13
|
const q = /* @__PURE__ */ new WeakMap();
|
|
14
14
|
function Me(o) {
|
|
15
15
|
return typeof o == "string" ? o.replace(/\s*/g, "") : "" + o;
|
|
@@ -20,10 +20,10 @@ function Ve(o, e) {
|
|
|
20
20
|
return `${n.id}-option-${Me(e)}`;
|
|
21
21
|
}
|
|
22
22
|
function Ae(o, e, n) {
|
|
23
|
-
let a =
|
|
23
|
+
let a = C(o, {
|
|
24
24
|
labelable: !0
|
|
25
|
-
}),
|
|
26
|
-
|
|
25
|
+
}), d = o.selectionBehavior || "toggle", r = o.linkBehavior || (d === "replace" ? "action" : "override");
|
|
26
|
+
d === "toggle" && r === "action" && (r = "override");
|
|
27
27
|
let { listProps: t } = me({
|
|
28
28
|
...o,
|
|
29
29
|
ref: n,
|
|
@@ -31,11 +31,11 @@ function Ae(o, e, n) {
|
|
|
31
31
|
collection: e.collection,
|
|
32
32
|
disabledKeys: e.disabledKeys,
|
|
33
33
|
linkBehavior: r
|
|
34
|
-
}), { focusWithinProps:
|
|
34
|
+
}), { focusWithinProps: l } = ie({
|
|
35
35
|
onFocusWithin: o.onFocus,
|
|
36
36
|
onBlurWithin: o.onBlur,
|
|
37
37
|
onFocusWithinChange: o.onFocusChange
|
|
38
|
-
}), i =
|
|
38
|
+
}), i = j(o.id);
|
|
39
39
|
q.set(e, {
|
|
40
40
|
id: i,
|
|
41
41
|
shouldUseVirtualFocus: o.shouldUseVirtualFocus,
|
|
@@ -54,7 +54,7 @@ function Ae(o, e, n) {
|
|
|
54
54
|
});
|
|
55
55
|
return {
|
|
56
56
|
labelProps: f,
|
|
57
|
-
listBoxProps: E(a,
|
|
57
|
+
listBoxProps: E(a, l, e.selectionManager.selectionMode === "multiple" ? {
|
|
58
58
|
"aria-multiselectable": "true"
|
|
59
59
|
} : {}, {
|
|
60
60
|
role: "listbox",
|
|
@@ -62,11 +62,11 @@ function Ae(o, e, n) {
|
|
|
62
62
|
})
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
-
function
|
|
66
|
-
var a,
|
|
65
|
+
function Ce(o, e, n) {
|
|
66
|
+
var a, d;
|
|
67
67
|
let { key: r } = o, t = q.get(e);
|
|
68
|
-
var
|
|
69
|
-
let i = (
|
|
68
|
+
var l;
|
|
69
|
+
let i = (l = o.isDisabled) !== null && l !== void 0 ? l : e.selectionManager.isDisabled(r);
|
|
70
70
|
var f;
|
|
71
71
|
let p = (f = o.isSelected) !== null && f !== void 0 ? f : e.selectionManager.isSelected(r);
|
|
72
72
|
var g;
|
|
@@ -99,21 +99,21 @@ function Te(o, e, n) {
|
|
|
99
99
|
isVirtualized: x,
|
|
100
100
|
shouldUseVirtualFocus: b,
|
|
101
101
|
isDisabled: i,
|
|
102
|
-
onAction: m || !(s == null || (a = s.props) === null || a === void 0) && a.onAction ? ue(s == null || (
|
|
102
|
+
onAction: m || !(s == null || (a = s.props) === null || a === void 0) && a.onAction ? ue(s == null || (d = s.props) === null || d === void 0 ? void 0 : d.onAction, m) : void 0,
|
|
103
103
|
linkBehavior: t == null ? void 0 : t.linkBehavior,
|
|
104
104
|
id: k
|
|
105
105
|
}), { hoverProps: A } = Q({
|
|
106
106
|
isDisabled: i || !S,
|
|
107
107
|
onHoverStart() {
|
|
108
|
-
|
|
108
|
+
J() || (e.selectionManager.setFocused(!0), e.selectionManager.setFocusedKey(r));
|
|
109
109
|
}
|
|
110
|
-
}), B =
|
|
110
|
+
}), B = C(s == null ? void 0 : s.props);
|
|
111
111
|
delete B.id;
|
|
112
|
-
let
|
|
112
|
+
let z = fe(s == null ? void 0 : s.props);
|
|
113
113
|
return {
|
|
114
114
|
optionProps: {
|
|
115
115
|
...y,
|
|
116
|
-
...E(B, H, A,
|
|
116
|
+
...E(B, H, A, z),
|
|
117
117
|
id: k
|
|
118
118
|
},
|
|
119
119
|
labelProps: {
|
|
@@ -123,7 +123,7 @@ function Te(o, e, n) {
|
|
|
123
123
|
id: I
|
|
124
124
|
},
|
|
125
125
|
isFocused: w,
|
|
126
|
-
isFocusVisible: w &&
|
|
126
|
+
isFocusVisible: w && J(),
|
|
127
127
|
isSelected: p,
|
|
128
128
|
isDisabled: i,
|
|
129
129
|
isPressed: M,
|
|
@@ -131,8 +131,8 @@ function Te(o, e, n) {
|
|
|
131
131
|
hasAction: U
|
|
132
132
|
};
|
|
133
133
|
}
|
|
134
|
-
function
|
|
135
|
-
let { heading: e, "aria-label": n } = o, a =
|
|
134
|
+
function Te(o) {
|
|
135
|
+
let { heading: e, "aria-label": n } = o, a = j();
|
|
136
136
|
return {
|
|
137
137
|
itemProps: {
|
|
138
138
|
role: "presentation"
|
|
@@ -160,10 +160,10 @@ const ae = /* @__PURE__ */ oe(null), L = /* @__PURE__ */ oe(null), eo = /* @__PU
|
|
|
160
160
|
listBoxRef: n
|
|
161
161
|
}) : /* @__PURE__ */ c.createElement(ne, {
|
|
162
162
|
content: /* @__PURE__ */ c.createElement(re, e)
|
|
163
|
-
}, (
|
|
163
|
+
}, (d) => /* @__PURE__ */ c.createElement(_e, {
|
|
164
164
|
props: e,
|
|
165
165
|
listBoxRef: n,
|
|
166
|
-
collection:
|
|
166
|
+
collection: d
|
|
167
167
|
}));
|
|
168
168
|
});
|
|
169
169
|
function _e({ props: o, listBoxRef: e, collection: n }) {
|
|
@@ -173,17 +173,17 @@ function _e({ props: o, listBoxRef: e, collection: n }) {
|
|
|
173
173
|
children: null,
|
|
174
174
|
items: null
|
|
175
175
|
};
|
|
176
|
-
let { layoutDelegate: a } = h(W), { filterFn:
|
|
176
|
+
let { layoutDelegate: a } = h(W), { filterFn: d, collectionProps: r, collectionRef: t } = h(De) || {};
|
|
177
177
|
e = R(K(() => be(e, t !== void 0 ? t : null), [
|
|
178
178
|
t,
|
|
179
179
|
e
|
|
180
180
|
]));
|
|
181
|
-
let
|
|
181
|
+
let l = K(() => d ? n.filter(d) : n, [
|
|
182
182
|
n,
|
|
183
|
-
|
|
183
|
+
d
|
|
184
184
|
]), i = ke({
|
|
185
185
|
...o,
|
|
186
|
-
collection:
|
|
186
|
+
collection: l,
|
|
187
187
|
layoutDelegate: a
|
|
188
188
|
});
|
|
189
189
|
return /* @__PURE__ */ c.createElement(te, {
|
|
@@ -196,7 +196,7 @@ function _e({ props: o, listBoxRef: e, collection: n }) {
|
|
|
196
196
|
});
|
|
197
197
|
}
|
|
198
198
|
function te({ state: o, props: e, listBoxRef: n }) {
|
|
199
|
-
let { dragAndDropHooks: a, layout:
|
|
199
|
+
let { dragAndDropHooks: a, layout: d = "stack", orientation: r = "vertical" } = e, { collection: t, selectionManager: l } = o, i = !!(a != null && a.useDraggableCollectionState), f = !!(a != null && a.useDroppableCollectionState), { direction: p } = Fe(), { disabledBehavior: g, disabledKeys: u } = l, v = He({
|
|
200
200
|
usage: "search",
|
|
201
201
|
sensitivity: "base"
|
|
202
202
|
}), { isVirtualized: S, layoutDelegate: $, dropTargetDelegate: b, CollectionRoot: D } = h(W), x = K(() => e.keyboardDelegate || new we({
|
|
@@ -205,7 +205,7 @@ function te({ state: o, props: e, listBoxRef: n }) {
|
|
|
205
205
|
ref: n,
|
|
206
206
|
disabledKeys: u,
|
|
207
207
|
disabledBehavior: g,
|
|
208
|
-
layout:
|
|
208
|
+
layout: d,
|
|
209
209
|
orientation: r,
|
|
210
210
|
direction: p,
|
|
211
211
|
layoutDelegate: $
|
|
@@ -218,7 +218,7 @@ function te({ state: o, props: e, listBoxRef: n }) {
|
|
|
218
218
|
r,
|
|
219
219
|
p,
|
|
220
220
|
e.keyboardDelegate,
|
|
221
|
-
|
|
221
|
+
d,
|
|
222
222
|
$
|
|
223
223
|
]), { listBoxProps: F } = Ae({
|
|
224
224
|
...e,
|
|
@@ -236,27 +236,27 @@ function te({ state: o, props: e, listBoxRef: n }) {
|
|
|
236
236
|
if (i && a) {
|
|
237
237
|
s = a.useDraggableCollectionState({
|
|
238
238
|
collection: t,
|
|
239
|
-
selectionManager:
|
|
239
|
+
selectionManager: l,
|
|
240
240
|
preview: a.renderDragPreview ? w : void 0
|
|
241
241
|
}), a.useDraggableCollection({}, s, n);
|
|
242
|
-
let
|
|
243
|
-
M = a.renderDragPreview ? /* @__PURE__ */ c.createElement(
|
|
242
|
+
let O = a.DragPreview;
|
|
243
|
+
M = a.renderDragPreview ? /* @__PURE__ */ c.createElement(O, {
|
|
244
244
|
ref: w
|
|
245
245
|
}, a.renderDragPreview) : null;
|
|
246
246
|
}
|
|
247
247
|
if (f && a) {
|
|
248
248
|
m = a.useDroppableCollectionState({
|
|
249
249
|
collection: t,
|
|
250
|
-
selectionManager:
|
|
250
|
+
selectionManager: l
|
|
251
251
|
});
|
|
252
|
-
let
|
|
252
|
+
let O = a.dropTargetDelegate || b || new a.ListDropTargetDelegate(t, n, {
|
|
253
253
|
orientation: r,
|
|
254
|
-
layout:
|
|
254
|
+
layout: d,
|
|
255
255
|
direction: p
|
|
256
256
|
});
|
|
257
257
|
k = a.useDroppableCollection({
|
|
258
258
|
keyboardDelegate: x,
|
|
259
|
-
dropTargetDelegate:
|
|
259
|
+
dropTargetDelegate: O
|
|
260
260
|
}, m, n), H = m.isDropTarget({
|
|
261
261
|
type: "root"
|
|
262
262
|
});
|
|
@@ -268,7 +268,7 @@ function te({ state: o, props: e, listBoxRef: n }) {
|
|
|
268
268
|
isFocusVisible: A,
|
|
269
269
|
layout: e.layout || "stack",
|
|
270
270
|
state: o
|
|
271
|
-
},
|
|
271
|
+
}, z = T({
|
|
272
272
|
className: e.className,
|
|
273
273
|
style: e.style,
|
|
274
274
|
defaultClassName: "react-aria-ListBox",
|
|
@@ -281,9 +281,9 @@ function te({ state: o, props: e, listBoxRef: n }) {
|
|
|
281
281
|
display: "contents"
|
|
282
282
|
}
|
|
283
283
|
}, e.renderEmptyState(B))), /* @__PURE__ */ c.createElement(Ie, null, /* @__PURE__ */ c.createElement("div", {
|
|
284
|
-
...
|
|
284
|
+
...C(e),
|
|
285
285
|
...E(F, U, k == null ? void 0 : k.collectionProps),
|
|
286
|
-
...
|
|
286
|
+
...z,
|
|
287
287
|
ref: n,
|
|
288
288
|
slot: e.slot || void 0,
|
|
289
289
|
onScroll: e.onScroll,
|
|
@@ -324,7 +324,7 @@ function te({ state: o, props: e, listBoxRef: n }) {
|
|
|
324
324
|
}
|
|
325
325
|
],
|
|
326
326
|
[
|
|
327
|
-
|
|
327
|
+
de,
|
|
328
328
|
{
|
|
329
329
|
name: "ListBoxSection",
|
|
330
330
|
render: Le
|
|
@@ -334,24 +334,24 @@ function te({ state: o, props: e, listBoxRef: n }) {
|
|
|
334
334
|
}, /* @__PURE__ */ c.createElement(D, {
|
|
335
335
|
collection: t,
|
|
336
336
|
scrollRef: n,
|
|
337
|
-
persistedKeys: he(
|
|
337
|
+
persistedKeys: he(l, a, m),
|
|
338
338
|
renderDropIndicator: Y(a, m)
|
|
339
339
|
})), P, M));
|
|
340
340
|
}
|
|
341
341
|
function Le(o, e, n, a = "react-aria-ListBoxSection") {
|
|
342
|
-
let
|
|
342
|
+
let d = h(L), { dragAndDropHooks: r, dropState: t } = h(_), { CollectionBranch: l } = h(W), [i, f] = ge();
|
|
343
343
|
var p;
|
|
344
|
-
let { headingProps: g, groupProps: u } =
|
|
344
|
+
let { headingProps: g, groupProps: u } = Te({
|
|
345
345
|
heading: f,
|
|
346
346
|
"aria-label": (p = o["aria-label"]) !== null && p !== void 0 ? p : void 0
|
|
347
|
-
}), v =
|
|
347
|
+
}), v = T({
|
|
348
348
|
defaultClassName: a,
|
|
349
349
|
className: o.className,
|
|
350
350
|
style: o.style,
|
|
351
351
|
values: {}
|
|
352
352
|
});
|
|
353
353
|
return /* @__PURE__ */ c.createElement("section", {
|
|
354
|
-
...
|
|
354
|
+
...C(o),
|
|
355
355
|
...u,
|
|
356
356
|
...v,
|
|
357
357
|
ref: e
|
|
@@ -360,25 +360,25 @@ function Le(o, e, n, a = "react-aria-ListBoxSection") {
|
|
|
360
360
|
...g,
|
|
361
361
|
ref: i
|
|
362
362
|
}
|
|
363
|
-
}, /* @__PURE__ */ c.createElement(
|
|
364
|
-
collection:
|
|
363
|
+
}, /* @__PURE__ */ c.createElement(l, {
|
|
364
|
+
collection: d.collection,
|
|
365
365
|
parent: n,
|
|
366
366
|
renderDropIndicator: Y(r, t)
|
|
367
367
|
})));
|
|
368
368
|
}
|
|
369
|
-
const oo = /* @__PURE__ */
|
|
370
|
-
let
|
|
369
|
+
const oo = /* @__PURE__ */ le("item", function(e, n, a) {
|
|
370
|
+
let d = R(n), r = h(L), { dragAndDropHooks: t, dragState: l, dropState: i } = h(_), { optionProps: f, labelProps: p, descriptionProps: g, ...u } = Ce({
|
|
371
371
|
key: a.key,
|
|
372
372
|
"aria-label": e == null ? void 0 : e["aria-label"]
|
|
373
|
-
}, r,
|
|
373
|
+
}, r, d), { hoverProps: v, isHovered: S } = Q({
|
|
374
374
|
isDisabled: !u.allowsSelection && !u.hasAction,
|
|
375
375
|
onHoverStart: a.props.onHoverStart,
|
|
376
376
|
onHoverChange: a.props.onHoverChange,
|
|
377
377
|
onHoverEnd: a.props.onHoverEnd
|
|
378
378
|
}), $ = null;
|
|
379
|
-
|
|
379
|
+
l && t && ($ = t.useDraggableItem({
|
|
380
380
|
key: a.key
|
|
381
|
-
},
|
|
381
|
+
}, l));
|
|
382
382
|
let b = null;
|
|
383
383
|
i && t && (b = t.useDroppableItem({
|
|
384
384
|
target: {
|
|
@@ -386,8 +386,8 @@ const oo = /* @__PURE__ */ de("item", function(e, n, a) {
|
|
|
386
386
|
key: a.key,
|
|
387
387
|
dropPosition: "on"
|
|
388
388
|
}
|
|
389
|
-
}, i,
|
|
390
|
-
let D =
|
|
389
|
+
}, i, d));
|
|
390
|
+
let D = l && l.isDragging(a.key), x = T({
|
|
391
391
|
...e,
|
|
392
392
|
id: void 0,
|
|
393
393
|
children: e.children,
|
|
@@ -397,7 +397,7 @@ const oo = /* @__PURE__ */ de("item", function(e, n, a) {
|
|
|
397
397
|
isHovered: S,
|
|
398
398
|
selectionMode: r.selectionManager.selectionMode,
|
|
399
399
|
selectionBehavior: r.selectionManager.selectionBehavior,
|
|
400
|
-
allowsDragging: !!
|
|
400
|
+
allowsDragging: !!l,
|
|
401
401
|
isDragging: D,
|
|
402
402
|
isDropTarget: b == null ? void 0 : b.isDropTarget
|
|
403
403
|
}
|
|
@@ -411,8 +411,8 @@ const oo = /* @__PURE__ */ de("item", function(e, n, a) {
|
|
|
411
411
|
return /* @__PURE__ */ c.createElement(F, {
|
|
412
412
|
...E(f, v, $ == null ? void 0 : $.dragProps, b == null ? void 0 : b.dropProps),
|
|
413
413
|
...x,
|
|
414
|
-
ref:
|
|
415
|
-
"data-allows-dragging": !!
|
|
414
|
+
ref: d,
|
|
415
|
+
"data-allows-dragging": !!l || void 0,
|
|
416
416
|
"data-selected": u.isSelected || void 0,
|
|
417
417
|
"data-disabled": u.isDisabled || void 0,
|
|
418
418
|
"data-hovered": S || void 0,
|
|
@@ -438,17 +438,17 @@ const oo = /* @__PURE__ */ de("item", function(e, n, a) {
|
|
|
438
438
|
});
|
|
439
439
|
function Ue(o, e) {
|
|
440
440
|
e = R(e);
|
|
441
|
-
let { dragAndDropHooks: n, dropState: a } = h(_), { dropIndicatorProps:
|
|
442
|
-
return r ? null : /* @__PURE__ */ c.createElement(
|
|
441
|
+
let { dragAndDropHooks: n, dropState: a } = h(_), { dropIndicatorProps: d, isHidden: r, isDropTarget: t } = n.useDropIndicator(o, a, e);
|
|
442
|
+
return r ? null : /* @__PURE__ */ c.createElement(Oe, {
|
|
443
443
|
...o,
|
|
444
|
-
dropIndicatorProps:
|
|
444
|
+
dropIndicatorProps: d,
|
|
445
445
|
isDropTarget: t,
|
|
446
446
|
ref: e
|
|
447
447
|
});
|
|
448
448
|
}
|
|
449
|
-
function
|
|
450
|
-
let { dropIndicatorProps: n, isDropTarget: a, ...
|
|
451
|
-
...
|
|
449
|
+
function ze(o, e) {
|
|
450
|
+
let { dropIndicatorProps: n, isDropTarget: a, ...d } = o, r = T({
|
|
451
|
+
...d,
|
|
452
452
|
defaultClassName: "react-aria-DropIndicator",
|
|
453
453
|
values: {
|
|
454
454
|
isDropTarget: a
|
|
@@ -463,7 +463,7 @@ function Oe(o, e) {
|
|
|
463
463
|
"data-drop-target": a || void 0
|
|
464
464
|
});
|
|
465
465
|
}
|
|
466
|
-
const
|
|
466
|
+
const Oe = /* @__PURE__ */ Z(ze);
|
|
467
467
|
export {
|
|
468
468
|
L as $,
|
|
469
469
|
ae as a,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as o } from "./SelectionManager-
|
|
2
|
-
import { $ as u } from "./context-
|
|
1
|
+
import { c as o } from "./SelectionManager-BfXUE1qg.js";
|
|
2
|
+
import { $ as u } from "./context-BpJLnOuu.js";
|
|
3
3
|
function f(r, e) {
|
|
4
4
|
let t = r;
|
|
5
5
|
for (o(t, e) && (t = t.parentElement); t && !o(t, e); ) t = t.parentElement;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { h as s, i as c, e as d, j as
|
|
2
|
-
import f, { useRef as
|
|
1
|
+
import { h as s, i as c, e as d, j as b } from "./useFocusRing-9PXyKy2A.js";
|
|
2
|
+
import f, { useRef as i, useContext as u, useEffect as $, useMemo as l } from "react";
|
|
3
3
|
const h = /* @__PURE__ */ f.forwardRef(({ children: t, ...a }, r) => {
|
|
4
|
-
let o =
|
|
4
|
+
let o = i(!1), e = u(s);
|
|
5
5
|
r = c(r || (e == null ? void 0 : e.ref));
|
|
6
6
|
let n = d(e || {}, {
|
|
7
7
|
...a,
|
|
@@ -10,14 +10,14 @@ const h = /* @__PURE__ */ f.forwardRef(({ children: t, ...a }, r) => {
|
|
|
10
10
|
o.current = !0, e && e.register();
|
|
11
11
|
}
|
|
12
12
|
});
|
|
13
|
-
return
|
|
13
|
+
return b(e, r), $(() => {
|
|
14
14
|
o.current || (console.warn("A PressResponder was rendered without a pressable child. Either call the usePress hook, or wrap your DOM node with <Pressable> component."), o.current = !0);
|
|
15
15
|
}, []), /* @__PURE__ */ f.createElement(s.Provider, {
|
|
16
16
|
value: n
|
|
17
17
|
}, t);
|
|
18
18
|
});
|
|
19
19
|
function m({ children: t }) {
|
|
20
|
-
let a =
|
|
20
|
+
let a = l(() => ({
|
|
21
21
|
register: () => {
|
|
22
22
|
}
|
|
23
23
|
}), []);
|