@eightshift/ui-components 5.0.0 → 5.0.1
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/Button-wERNNG0T.js +185 -0
- package/dist/Collection-CKsHTyhc.js +2363 -0
- package/dist/Color-BhgbJF5x.js +2452 -0
- package/dist/ColorSwatch-Bcn6oRSg.js +64 -0
- package/dist/ComboBox-D1LPUwWP.js +1906 -0
- package/dist/Dialog-D190gMbE.js +2298 -0
- package/dist/FieldError-DeUh5Wkw.js +42 -0
- package/dist/FocusScope-C-plSxbS.js +831 -0
- package/dist/Form-Cq3fu75_.js +5 -0
- package/dist/Group-C5iZpSAM.js +48 -0
- package/dist/Heading-D-Pboe4p.js +16 -0
- package/dist/Hidden-rE6uR-lr.js +41 -0
- package/dist/Input--mF4XVE1.js +133 -0
- package/dist/Label-Fp6AwSRn.js +17 -0
- package/dist/List-CZMUbkFU.js +593 -0
- package/dist/ListBox-4oW9kh3R.js +582 -0
- package/dist/NumberFormatter-DA8u1Ot7.js +140 -0
- package/dist/OverlayArrow-BpB9uB_I.js +637 -0
- package/dist/RSPContexts-2lR5GG9p.js +14 -0
- package/dist/Select-aab027f3.esm-BKIJGje-.js +2469 -0
- package/dist/Separator-B88tj5YD.js +323 -0
- package/dist/Slider-CyJzC1bp.js +853 -0
- package/dist/Text-DRpwWot2.js +16 -0
- package/dist/VisuallyHidden-DsKYcRQ_.js +48 -0
- package/dist/_commonjsHelpers-CUmg6egw.js +6 -0
- package/dist/assets/index.css +57 -0
- package/dist/assets/style-admin.css +5864 -0
- package/dist/assets/style-editor.css +5864 -0
- package/dist/assets/style.css +5870 -0
- package/dist/assets/wp-font-enhancements.css +8 -0
- package/dist/assets/wp-ui-enhancements.css +377 -0
- package/dist/components/animated-visibility/animated-visibility.js +105 -0
- package/dist/components/base-control/base-control.js +86 -0
- package/dist/components/breakpoint-preview/breakpoint-preview.js +161 -0
- package/dist/components/button/button.js +387 -0
- package/dist/components/checkbox/checkbox.js +320 -0
- package/dist/components/color-pickers/color-picker.js +272 -0
- package/dist/components/color-pickers/color-swatch.js +59 -0
- package/dist/components/color-pickers/gradient-editor.js +534 -0
- package/dist/components/color-pickers/solid-color-picker.js +1567 -0
- package/dist/components/component-toggle/component-toggle.js +161 -0
- package/dist/components/container-panel/container-panel.js +131 -0
- package/dist/components/draggable/draggable-context.js +5 -0
- package/dist/components/draggable/draggable-handle.js +46 -0
- package/dist/components/draggable/draggable.js +6979 -0
- package/dist/components/draggable-list/draggable-list-context.js +5 -0
- package/dist/components/draggable-list/draggable-list-item.js +77 -0
- package/dist/components/draggable-list/draggable-list.js +151 -0
- package/dist/components/expandable/expandable.js +342 -0
- package/dist/components/index.js +137 -0
- package/dist/components/input-field/input-field.js +231 -0
- package/dist/components/item-collection/item-collection.js +59 -0
- package/dist/components/layout/hstack.js +30 -0
- package/dist/components/layout/vstack.js +30 -0
- package/dist/components/link-input/link-input.js +291 -0
- package/dist/components/matrix-align/matrix-align.js +134 -0
- package/dist/components/menu/menu.js +285 -0
- package/dist/components/modal/modal.js +305 -0
- package/dist/components/notice/notice.js +123 -0
- package/dist/components/number-picker/number-picker.js +292 -0
- package/dist/components/option-select/option-select.js +264 -0
- package/dist/components/options-panel/options-panel.js +158 -0
- package/dist/components/placeholders/file-placeholder.js +42 -0
- package/dist/components/placeholders/image-placeholder.js +88 -0
- package/dist/components/placeholders/media-placeholder.js +63 -0
- package/dist/components/popover/popover.js +207 -0
- package/dist/components/radio/radio.js +579 -0
- package/dist/components/repeater/repeater-context.js +5 -0
- package/dist/components/repeater/repeater-item.js +119 -0
- package/dist/components/repeater/repeater.js +280 -0
- package/dist/components/responsive/mini-responsive.js +498 -0
- package/dist/components/responsive/responsive-legacy.js +343 -0
- package/dist/components/responsive/responsive.js +583 -0
- package/dist/components/responsive-preview/responsive-preview.js +123 -0
- package/dist/components/rich-label/rich-label.js +66 -0
- package/dist/components/select/async-multi-select.js +157 -0
- package/dist/components/select/async-single-select.js +137 -0
- package/dist/components/select/custom-select-default-components.js +38 -0
- package/dist/components/select/multi-select-components.js +8 -0
- package/dist/components/select/multi-select.js +151 -0
- package/dist/components/select/react-select-component-wrappers.js +90 -0
- package/dist/components/select/shared.js +26 -0
- package/dist/components/select/single-select.js +131 -0
- package/dist/components/select/styles.js +49 -0
- package/dist/components/select/v2/async-select.js +297 -0
- package/dist/components/select/v2/shared.js +24 -0
- package/dist/components/select/v2/single-select.js +991 -0
- package/dist/components/slider/column-config-slider.js +210 -0
- package/dist/components/slider/slider.js +345 -0
- package/dist/components/slider/utils.js +94 -0
- package/dist/components/spacer/spacer.js +97 -0
- package/dist/components/tabs/tabs.js +704 -0
- package/dist/components/toggle/switch.js +156 -0
- package/dist/components/toggle/toggle.js +64 -0
- package/dist/components/toggle-button/toggle-button.js +343 -0
- package/dist/components/tooltip/tooltip.js +527 -0
- package/dist/context-BYWrbm1z.js +92 -0
- package/dist/default-i18n-CT_oS1Fy.js +922 -0
- package/dist/filterDOMProps-EDDcM64A.js +28 -0
- package/dist/icons/block-icon.js +42 -0
- package/dist/icons/generic-color-swatch.js +113 -0
- package/dist/icons/icons.js +30371 -0
- package/dist/icons/index.js +11 -0
- package/dist/icons/jsx-svg.js +50 -0
- package/dist/index-641ee5b8.esm-BPU8rMZr.js +3137 -0
- package/dist/index-CFozsmNS.js +28321 -0
- package/dist/index-wl5606BX.js +44 -0
- package/dist/index.js +139 -0
- package/dist/lite-DVmmD_-j.js +7 -0
- package/dist/modifiers.esm-BuJQPI1X.js +31 -0
- package/dist/multi-select-components-Sp-JEFEX.js +3744 -0
- package/dist/number-GajL10e1.js +36 -0
- package/dist/react-jsx-parser.min-DZCiis5V.js +11753 -0
- package/dist/react-select-async.esm-D937XTWW.js +107 -0
- package/dist/react-select.esm-Ciai3aKf.js +15 -0
- package/dist/style-admin.js +1 -0
- package/dist/style-editor.js +1 -0
- package/dist/style.js +1 -0
- package/dist/textSelection-CCcyjiRP.js +46 -0
- package/dist/useButton-BOHxkGQF.js +50 -0
- package/dist/useEvent-D5o_CqDH.js +23 -0
- package/dist/useFocusRing-nMG2uzxS.js +107 -0
- package/dist/useFormReset-DlmRL87g.js +22 -0
- package/dist/useFormValidation-D0_aaK-e.js +224 -0
- package/dist/useHover-VO5tcIli.js +890 -0
- package/dist/useLabel-BKH4fVA4.js +27 -0
- package/dist/useLabels-ntF3rFY0.js +23 -0
- package/dist/useListState-Cq2Nvr-v.js +161 -0
- package/dist/useLocalizedStringFormatter-CGzwx1a0.js +121 -0
- package/dist/useNumberField-C9dmERhP.js +1207 -0
- package/dist/useNumberFormatter-MrRLgvhj.js +13 -0
- package/dist/usePress-DjNo5790.js +677 -0
- package/dist/useSingleSelectListState--r3AAhRj.js +38 -0
- package/dist/useToggle-CQaXLe-O.js +59 -0
- package/dist/useToggleState-C3DLdez5.js +19 -0
- package/dist/utilities/array-helpers.js +56 -0
- package/dist/utilities/debounce-throttle.js +123 -0
- package/dist/utilities/es-dash.js +382 -0
- package/dist/utilities/index.js +27 -0
- package/dist/utilities/text-helpers.js +136 -0
- package/dist/utils-B94NDG0v.js +370 -0
- package/dist/wp/wp-font-enhancements.js +1 -0
- package/dist/wp/wp-ui-enhancements.js +1 -0
- package/package.json +8 -8
|
@@ -0,0 +1,582 @@
|
|
|
1
|
+
import { c as $880e95eb8b93ba9a$export$ecf600387e221c37, d as $e1995378a142960e$export$18af5c7a9e9b3664, e as $e1995378a142960e$export$bf788dd355e3a401, f as $e1995378a142960e$export$fb8073518f34e6ec, g as $7135fc7d473fd974$export$4feb769f8ddf26c5, h as $7135fc7d473fd974$export$d40e14dec8b060a8 } from "./Collection-CKsHTyhc.js";
|
|
2
|
+
import { e as $bdb11010cef70236$export$f680877a34711e37, d as $3ef42575df84b30b$export$9d1611c77c2fe928, j as $bdb11010cef70236$export$b4cc09c592e8fdb8, p as $ff5963eb1fccf552$export$e08e3b67e392101e, a as $64fa3d84918910a7$export$29f1550f4b0d4415, l as $df56164dff5785e2$export$4338b53315abf666, b as $64fa3d84918910a7$export$4d86445c2cf5e3, i as $64fa3d84918910a7$export$2881499e37b75b9a, o as $64fa3d84918910a7$export$c62b8e45d58ddad9, m as $5dc95899b306f630$export$c9058316764c140e, g as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8 } from "./utils-B94NDG0v.js";
|
|
3
|
+
import React__default, { createContext, useCallback, forwardRef, useMemo, useContext, useEffect, useRef } from "react";
|
|
4
|
+
import { b as $982254629710d113$export$b95089534ab7c1fd, c as $453cc9f0df89c0a5$export$77d5aafae4e095b2, d as $d2f53cda644affe3$export$65d2a03b8800d6e3, e as $325a3faab7a68acd$export$a16aca283550c30d, f as $2a25aae57d74318e$export$a05409b8bb224a5a, g as $431f98aba6844401$export$6615d83f6de245ce, h as $72a5793c14baf454$export$e0e4026c12a8bdbb } from "./Separator-B88tj5YD.js";
|
|
5
|
+
import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "./Text-DRpwWot2.js";
|
|
6
|
+
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-EDDcM64A.js";
|
|
7
|
+
import { a as $ea8dcbcb9ea1b556$export$7e924b3091a3bd18 } from "./usePress-DjNo5790.js";
|
|
8
|
+
import { B as $c87311424ea30a05$export$9ac100e40613ea10, C as $c87311424ea30a05$export$78551043582a6a98, $ as $6179b936705e76d3$export$ae780daf29e6d456, n as $507fabe10e71c6fb$export$b9b3dfddab17db27 } from "./useHover-VO5tcIli.js";
|
|
9
|
+
import { a as $9ab94262bd0047c7$export$420e68273165f4ec, $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "./useFocusRing-nMG2uzxS.js";
|
|
10
|
+
import { $ as $d191a55c9702f145$export$8467354a121f1b9f } from "./useLabel-BKH4fVA4.js";
|
|
11
|
+
import { a as $e72dd72e1c76a225$export$ba9d38c0f1bf2b36, $ as $e72dd72e1c76a225$export$2f645645f7bca764 } from "./useListState-Cq2Nvr-v.js";
|
|
12
|
+
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-BYWrbm1z.js";
|
|
13
|
+
import { b as $9bf71ea28793e738$export$20e40289641fbbb6 } from "./FocusScope-C-plSxbS.js";
|
|
14
|
+
const $b1f0cad8af73213b$export$3585ede4d035bf14 = /* @__PURE__ */ new WeakMap();
|
|
15
|
+
function $b1f0cad8af73213b$var$normalizeKey(key) {
|
|
16
|
+
if (typeof key === "string") return key.replace(/\s*/g, "");
|
|
17
|
+
return "" + key;
|
|
18
|
+
}
|
|
19
|
+
function $b1f0cad8af73213b$export$9145995848b05025(state, itemKey) {
|
|
20
|
+
let data = $b1f0cad8af73213b$export$3585ede4d035bf14.get(state);
|
|
21
|
+
if (!data) throw new Error("Unknown list");
|
|
22
|
+
return `${data.id}-option-${$b1f0cad8af73213b$var$normalizeKey(itemKey)}`;
|
|
23
|
+
}
|
|
24
|
+
function $c132121280ec012d$export$50eacbbf140a3141(props, state, ref) {
|
|
25
|
+
let domProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
|
|
26
|
+
labelable: true
|
|
27
|
+
});
|
|
28
|
+
let selectionBehavior = props.selectionBehavior || "toggle";
|
|
29
|
+
let linkBehavior = props.linkBehavior || (selectionBehavior === "replace" ? "action" : "override");
|
|
30
|
+
if (selectionBehavior === "toggle" && linkBehavior === "action")
|
|
31
|
+
linkBehavior = "override";
|
|
32
|
+
let { listProps } = $982254629710d113$export$b95089534ab7c1fd({
|
|
33
|
+
...props,
|
|
34
|
+
ref,
|
|
35
|
+
selectionManager: state.selectionManager,
|
|
36
|
+
collection: state.collection,
|
|
37
|
+
disabledKeys: state.disabledKeys,
|
|
38
|
+
linkBehavior
|
|
39
|
+
});
|
|
40
|
+
let { focusWithinProps } = $9ab94262bd0047c7$export$420e68273165f4ec({
|
|
41
|
+
onFocusWithin: props.onFocus,
|
|
42
|
+
onBlurWithin: props.onBlur,
|
|
43
|
+
onFocusWithinChange: props.onFocusChange
|
|
44
|
+
});
|
|
45
|
+
let id = $bdb11010cef70236$export$f680877a34711e37(props.id);
|
|
46
|
+
$b1f0cad8af73213b$export$3585ede4d035bf14.set(state, {
|
|
47
|
+
id,
|
|
48
|
+
shouldUseVirtualFocus: props.shouldUseVirtualFocus,
|
|
49
|
+
shouldSelectOnPressUp: props.shouldSelectOnPressUp,
|
|
50
|
+
shouldFocusOnHover: props.shouldFocusOnHover,
|
|
51
|
+
isVirtualized: props.isVirtualized,
|
|
52
|
+
onAction: props.onAction,
|
|
53
|
+
linkBehavior
|
|
54
|
+
});
|
|
55
|
+
let { labelProps, fieldProps } = $d191a55c9702f145$export$8467354a121f1b9f({
|
|
56
|
+
...props,
|
|
57
|
+
id,
|
|
58
|
+
// listbox is not an HTML input element so it
|
|
59
|
+
// shouldn't be labeled by a <label> element.
|
|
60
|
+
labelElementType: "span"
|
|
61
|
+
});
|
|
62
|
+
return {
|
|
63
|
+
labelProps,
|
|
64
|
+
listBoxProps: $3ef42575df84b30b$export$9d1611c77c2fe928(domProps, focusWithinProps, state.selectionManager.selectionMode === "multiple" ? {
|
|
65
|
+
"aria-multiselectable": "true"
|
|
66
|
+
} : {}, {
|
|
67
|
+
role: "listbox",
|
|
68
|
+
...$3ef42575df84b30b$export$9d1611c77c2fe928(fieldProps, listProps)
|
|
69
|
+
})
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
function $293f70390ea03370$export$497855f14858aa34(props, state, ref) {
|
|
73
|
+
var _item_props, _item_props1;
|
|
74
|
+
let { key } = props;
|
|
75
|
+
let data = $b1f0cad8af73213b$export$3585ede4d035bf14.get(state);
|
|
76
|
+
var _props_isDisabled;
|
|
77
|
+
let isDisabled = (_props_isDisabled = props.isDisabled) !== null && _props_isDisabled !== void 0 ? _props_isDisabled : state.selectionManager.isDisabled(key);
|
|
78
|
+
var _props_isSelected;
|
|
79
|
+
let isSelected = (_props_isSelected = props.isSelected) !== null && _props_isSelected !== void 0 ? _props_isSelected : state.selectionManager.isSelected(key);
|
|
80
|
+
var _props_shouldSelectOnPressUp;
|
|
81
|
+
let shouldSelectOnPressUp = (_props_shouldSelectOnPressUp = props.shouldSelectOnPressUp) !== null && _props_shouldSelectOnPressUp !== void 0 ? _props_shouldSelectOnPressUp : data === null || data === void 0 ? void 0 : data.shouldSelectOnPressUp;
|
|
82
|
+
var _props_shouldFocusOnHover;
|
|
83
|
+
let shouldFocusOnHover = (_props_shouldFocusOnHover = props.shouldFocusOnHover) !== null && _props_shouldFocusOnHover !== void 0 ? _props_shouldFocusOnHover : data === null || data === void 0 ? void 0 : data.shouldFocusOnHover;
|
|
84
|
+
var _props_shouldUseVirtualFocus;
|
|
85
|
+
let shouldUseVirtualFocus = (_props_shouldUseVirtualFocus = props.shouldUseVirtualFocus) !== null && _props_shouldUseVirtualFocus !== void 0 ? _props_shouldUseVirtualFocus : data === null || data === void 0 ? void 0 : data.shouldUseVirtualFocus;
|
|
86
|
+
var _props_isVirtualized;
|
|
87
|
+
let isVirtualized = (_props_isVirtualized = props.isVirtualized) !== null && _props_isVirtualized !== void 0 ? _props_isVirtualized : data === null || data === void 0 ? void 0 : data.isVirtualized;
|
|
88
|
+
let labelId = $bdb11010cef70236$export$b4cc09c592e8fdb8();
|
|
89
|
+
let descriptionId = $bdb11010cef70236$export$b4cc09c592e8fdb8();
|
|
90
|
+
let optionProps = {
|
|
91
|
+
role: "option",
|
|
92
|
+
"aria-disabled": isDisabled || void 0,
|
|
93
|
+
"aria-selected": state.selectionManager.selectionMode !== "none" ? isSelected : void 0
|
|
94
|
+
};
|
|
95
|
+
if (!($c87311424ea30a05$export$9ac100e40613ea10() && $c87311424ea30a05$export$78551043582a6a98())) {
|
|
96
|
+
optionProps["aria-label"] = props["aria-label"];
|
|
97
|
+
optionProps["aria-labelledby"] = labelId;
|
|
98
|
+
optionProps["aria-describedby"] = descriptionId;
|
|
99
|
+
}
|
|
100
|
+
let item = state.collection.getItem(key);
|
|
101
|
+
if (isVirtualized) {
|
|
102
|
+
let index = Number(item === null || item === void 0 ? void 0 : item.index);
|
|
103
|
+
optionProps["aria-posinset"] = Number.isNaN(index) ? void 0 : index + 1;
|
|
104
|
+
optionProps["aria-setsize"] = $453cc9f0df89c0a5$export$77d5aafae4e095b2(state.collection);
|
|
105
|
+
}
|
|
106
|
+
let onAction = (data === null || data === void 0 ? void 0 : data.onAction) ? () => {
|
|
107
|
+
var _data_onAction;
|
|
108
|
+
return data === null || data === void 0 ? void 0 : (_data_onAction = data.onAction) === null || _data_onAction === void 0 ? void 0 : _data_onAction.call(data, key);
|
|
109
|
+
} : void 0;
|
|
110
|
+
let id = $b1f0cad8af73213b$export$9145995848b05025(state, key);
|
|
111
|
+
let { itemProps, isPressed, isFocused, hasAction, allowsSelection } = $880e95eb8b93ba9a$export$ecf600387e221c37({
|
|
112
|
+
selectionManager: state.selectionManager,
|
|
113
|
+
key,
|
|
114
|
+
ref,
|
|
115
|
+
shouldSelectOnPressUp,
|
|
116
|
+
allowsDifferentPressOrigin: shouldSelectOnPressUp && shouldFocusOnHover,
|
|
117
|
+
isVirtualized,
|
|
118
|
+
shouldUseVirtualFocus,
|
|
119
|
+
isDisabled,
|
|
120
|
+
onAction: onAction || (item === null || item === void 0 ? void 0 : (_item_props = item.props) === null || _item_props === void 0 ? void 0 : _item_props.onAction) ? $ff5963eb1fccf552$export$e08e3b67e392101e(item === null || item === void 0 ? void 0 : (_item_props1 = item.props) === null || _item_props1 === void 0 ? void 0 : _item_props1.onAction, onAction) : void 0,
|
|
121
|
+
linkBehavior: data === null || data === void 0 ? void 0 : data.linkBehavior,
|
|
122
|
+
id
|
|
123
|
+
});
|
|
124
|
+
let { hoverProps } = $6179b936705e76d3$export$ae780daf29e6d456({
|
|
125
|
+
isDisabled: isDisabled || !shouldFocusOnHover,
|
|
126
|
+
onHoverStart() {
|
|
127
|
+
if (!$507fabe10e71c6fb$export$b9b3dfddab17db27()) {
|
|
128
|
+
state.selectionManager.setFocused(true);
|
|
129
|
+
state.selectionManager.setFocusedKey(key);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
let domProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(item === null || item === void 0 ? void 0 : item.props);
|
|
134
|
+
delete domProps.id;
|
|
135
|
+
let linkProps = $ea8dcbcb9ea1b556$export$7e924b3091a3bd18(item === null || item === void 0 ? void 0 : item.props);
|
|
136
|
+
return {
|
|
137
|
+
optionProps: {
|
|
138
|
+
...optionProps,
|
|
139
|
+
...$3ef42575df84b30b$export$9d1611c77c2fe928(domProps, itemProps, hoverProps, linkProps),
|
|
140
|
+
id
|
|
141
|
+
},
|
|
142
|
+
labelProps: {
|
|
143
|
+
id: labelId
|
|
144
|
+
},
|
|
145
|
+
descriptionProps: {
|
|
146
|
+
id: descriptionId
|
|
147
|
+
},
|
|
148
|
+
isFocused,
|
|
149
|
+
isFocusVisible: isFocused && state.selectionManager.isFocused && $507fabe10e71c6fb$export$b9b3dfddab17db27(),
|
|
150
|
+
isSelected,
|
|
151
|
+
isDisabled,
|
|
152
|
+
isPressed,
|
|
153
|
+
allowsSelection,
|
|
154
|
+
hasAction
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
function $af383d3bef1cfdc9$export$c3f9f39876e4bc7(props) {
|
|
158
|
+
let { heading, "aria-label": ariaLabel } = props;
|
|
159
|
+
let headingId = $bdb11010cef70236$export$f680877a34711e37();
|
|
160
|
+
return {
|
|
161
|
+
itemProps: {
|
|
162
|
+
role: "presentation"
|
|
163
|
+
},
|
|
164
|
+
headingProps: heading ? {
|
|
165
|
+
// Techincally, listbox cannot contain headings according to ARIA.
|
|
166
|
+
// We hide the heading from assistive technology, using role="presentation",
|
|
167
|
+
// and only use it as a visual label for the nested group.
|
|
168
|
+
id: headingId,
|
|
169
|
+
role: "presentation"
|
|
170
|
+
} : {},
|
|
171
|
+
groupProps: {
|
|
172
|
+
role: "group",
|
|
173
|
+
"aria-label": ariaLabel,
|
|
174
|
+
"aria-labelledby": heading ? headingId : void 0
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
const $612b8eb6cb90e02d$export$d188a835a7bc5783 = /* @__PURE__ */ createContext({});
|
|
179
|
+
const $612b8eb6cb90e02d$export$f55761759794cf55 = /* @__PURE__ */ createContext(null);
|
|
180
|
+
const $612b8eb6cb90e02d$export$62ed72bc21f6b8a6 = /* @__PURE__ */ forwardRef(function DropIndicator(props, ref) {
|
|
181
|
+
let { render } = useContext($612b8eb6cb90e02d$export$f55761759794cf55);
|
|
182
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, render(props, ref));
|
|
183
|
+
});
|
|
184
|
+
function $612b8eb6cb90e02d$export$971707d8a129a1f7(dragAndDropHooks, dropState) {
|
|
185
|
+
var _dragAndDropHooks_isVirtualDragging;
|
|
186
|
+
let renderDropIndicator = dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.renderDropIndicator;
|
|
187
|
+
let isVirtualDragging = dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : (_dragAndDropHooks_isVirtualDragging = dragAndDropHooks.isVirtualDragging) === null || _dragAndDropHooks_isVirtualDragging === void 0 ? void 0 : _dragAndDropHooks_isVirtualDragging.call(dragAndDropHooks);
|
|
188
|
+
let fn = useCallback((target) => {
|
|
189
|
+
if (isVirtualDragging || (dropState === null || dropState === void 0 ? void 0 : dropState.isDropTarget(target))) return renderDropIndicator ? renderDropIndicator(target) : /* @__PURE__ */ React__default.createElement($612b8eb6cb90e02d$export$62ed72bc21f6b8a6, {
|
|
190
|
+
target
|
|
191
|
+
});
|
|
192
|
+
}, [
|
|
193
|
+
dropState === null || dropState === void 0 ? void 0 : dropState.target,
|
|
194
|
+
isVirtualDragging,
|
|
195
|
+
renderDropIndicator
|
|
196
|
+
]);
|
|
197
|
+
return (dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.useDropIndicator) ? fn : void 0;
|
|
198
|
+
}
|
|
199
|
+
function $612b8eb6cb90e02d$export$d1e8e3fbb7461f6(selectionManager, dragAndDropHooks, dropState) {
|
|
200
|
+
var _dragAndDropHooks_isVirtualDragging, _dropState_target;
|
|
201
|
+
let focusedKey = selectionManager.focusedKey;
|
|
202
|
+
let dropTargetKey = null;
|
|
203
|
+
if ((dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : (_dragAndDropHooks_isVirtualDragging = dragAndDropHooks.isVirtualDragging) === null || _dragAndDropHooks_isVirtualDragging === void 0 ? void 0 : _dragAndDropHooks_isVirtualDragging.call(dragAndDropHooks)) && (dropState === null || dropState === void 0 ? void 0 : (_dropState_target = dropState.target) === null || _dropState_target === void 0 ? void 0 : _dropState_target.type) === "item") {
|
|
204
|
+
dropTargetKey = dropState.target.key;
|
|
205
|
+
var _dropState_collection_getKeyAfter;
|
|
206
|
+
if (dropState.target.dropPosition === "after")
|
|
207
|
+
dropTargetKey = (_dropState_collection_getKeyAfter = dropState.collection.getKeyAfter(dropTargetKey)) !== null && _dropState_collection_getKeyAfter !== void 0 ? _dropState_collection_getKeyAfter : dropTargetKey;
|
|
208
|
+
}
|
|
209
|
+
return useMemo(() => {
|
|
210
|
+
return new Set([
|
|
211
|
+
focusedKey,
|
|
212
|
+
dropTargetKey
|
|
213
|
+
].filter((k) => k != null));
|
|
214
|
+
}, [
|
|
215
|
+
focusedKey,
|
|
216
|
+
dropTargetKey
|
|
217
|
+
]);
|
|
218
|
+
}
|
|
219
|
+
const $eed445e0843c11d0$export$7ff8f37d2d81a48d = /* @__PURE__ */ createContext(null);
|
|
220
|
+
const $eed445e0843c11d0$export$7c5906fe4f1f2af2 = /* @__PURE__ */ createContext(null);
|
|
221
|
+
const $eed445e0843c11d0$export$41f133550aa26f48 = /* @__PURE__ */ forwardRef(function ListBox(props, ref) {
|
|
222
|
+
[props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $eed445e0843c11d0$export$7ff8f37d2d81a48d);
|
|
223
|
+
let state = useContext($eed445e0843c11d0$export$7c5906fe4f1f2af2);
|
|
224
|
+
if (state) return /* @__PURE__ */ React__default.createElement($eed445e0843c11d0$var$ListBoxInner, {
|
|
225
|
+
state,
|
|
226
|
+
props,
|
|
227
|
+
listBoxRef: ref
|
|
228
|
+
});
|
|
229
|
+
return /* @__PURE__ */ React__default.createElement($e1995378a142960e$export$bf788dd355e3a401, {
|
|
230
|
+
content: /* @__PURE__ */ React__default.createElement($e1995378a142960e$export$fb8073518f34e6ec, props)
|
|
231
|
+
}, (collection) => /* @__PURE__ */ React__default.createElement($eed445e0843c11d0$var$StandaloneListBox, {
|
|
232
|
+
props,
|
|
233
|
+
listBoxRef: ref,
|
|
234
|
+
collection
|
|
235
|
+
}));
|
|
236
|
+
});
|
|
237
|
+
function $eed445e0843c11d0$var$StandaloneListBox({ props, listBoxRef, collection }) {
|
|
238
|
+
props = {
|
|
239
|
+
...props,
|
|
240
|
+
collection,
|
|
241
|
+
children: null,
|
|
242
|
+
items: null
|
|
243
|
+
};
|
|
244
|
+
let { layoutDelegate } = useContext($7135fc7d473fd974$export$4feb769f8ddf26c5);
|
|
245
|
+
let state = $e72dd72e1c76a225$export$2f645645f7bca764({
|
|
246
|
+
...props,
|
|
247
|
+
layoutDelegate
|
|
248
|
+
});
|
|
249
|
+
return /* @__PURE__ */ React__default.createElement($eed445e0843c11d0$var$ListBoxInner, {
|
|
250
|
+
state,
|
|
251
|
+
props,
|
|
252
|
+
listBoxRef
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
function $eed445e0843c11d0$var$ListBoxInner({ state: inputState, props, listBoxRef }) {
|
|
256
|
+
let { filter, collectionProps, collectionRef } = useContext($d2f53cda644affe3$export$65d2a03b8800d6e3) || {};
|
|
257
|
+
props = useMemo(() => collectionProps ? {
|
|
258
|
+
...props,
|
|
259
|
+
...collectionProps
|
|
260
|
+
} : props, [
|
|
261
|
+
props,
|
|
262
|
+
collectionProps
|
|
263
|
+
]);
|
|
264
|
+
let { dragAndDropHooks, layout = "stack", orientation = "vertical" } = props;
|
|
265
|
+
listBoxRef = $df56164dff5785e2$export$4338b53315abf666(useMemo(() => $5dc95899b306f630$export$c9058316764c140e(listBoxRef, collectionRef !== void 0 ? collectionRef : null), [
|
|
266
|
+
collectionRef,
|
|
267
|
+
listBoxRef
|
|
268
|
+
]));
|
|
269
|
+
let state = $e72dd72e1c76a225$export$ba9d38c0f1bf2b36(inputState, filter);
|
|
270
|
+
let { collection, selectionManager } = state;
|
|
271
|
+
let isListDraggable = !!(dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.useDraggableCollectionState);
|
|
272
|
+
let isListDroppable = !!(dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.useDroppableCollectionState);
|
|
273
|
+
let { direction } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7();
|
|
274
|
+
let { disabledBehavior, disabledKeys } = selectionManager;
|
|
275
|
+
let collator = $325a3faab7a68acd$export$a16aca283550c30d({
|
|
276
|
+
usage: "search",
|
|
277
|
+
sensitivity: "base"
|
|
278
|
+
});
|
|
279
|
+
let { isVirtualized, layoutDelegate, dropTargetDelegate: ctxDropTargetDelegate, CollectionRoot } = useContext($7135fc7d473fd974$export$4feb769f8ddf26c5);
|
|
280
|
+
let keyboardDelegate = useMemo(() => props.keyboardDelegate || new $2a25aae57d74318e$export$a05409b8bb224a5a({
|
|
281
|
+
collection,
|
|
282
|
+
collator,
|
|
283
|
+
ref: listBoxRef,
|
|
284
|
+
disabledKeys,
|
|
285
|
+
disabledBehavior,
|
|
286
|
+
layout,
|
|
287
|
+
orientation,
|
|
288
|
+
direction,
|
|
289
|
+
layoutDelegate
|
|
290
|
+
}), [
|
|
291
|
+
collection,
|
|
292
|
+
collator,
|
|
293
|
+
listBoxRef,
|
|
294
|
+
disabledBehavior,
|
|
295
|
+
disabledKeys,
|
|
296
|
+
orientation,
|
|
297
|
+
direction,
|
|
298
|
+
props.keyboardDelegate,
|
|
299
|
+
layout,
|
|
300
|
+
layoutDelegate
|
|
301
|
+
]);
|
|
302
|
+
let { listBoxProps } = $c132121280ec012d$export$50eacbbf140a3141({
|
|
303
|
+
...props,
|
|
304
|
+
shouldSelectOnPressUp: isListDraggable || props.shouldSelectOnPressUp,
|
|
305
|
+
keyboardDelegate,
|
|
306
|
+
isVirtualized
|
|
307
|
+
}, state, listBoxRef);
|
|
308
|
+
let dragHooksProvided = useRef(isListDraggable);
|
|
309
|
+
let dropHooksProvided = useRef(isListDroppable);
|
|
310
|
+
useEffect(() => {
|
|
311
|
+
if (process.env.NODE_ENV === "production") return;
|
|
312
|
+
if (dragHooksProvided.current !== isListDraggable) console.warn("Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.");
|
|
313
|
+
if (dropHooksProvided.current !== isListDroppable) console.warn("Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.");
|
|
314
|
+
}, [
|
|
315
|
+
isListDraggable,
|
|
316
|
+
isListDroppable
|
|
317
|
+
]);
|
|
318
|
+
let dragState = void 0;
|
|
319
|
+
let dropState = void 0;
|
|
320
|
+
let droppableCollection = void 0;
|
|
321
|
+
let isRootDropTarget = false;
|
|
322
|
+
let dragPreview = null;
|
|
323
|
+
let preview = useRef(null);
|
|
324
|
+
if (isListDraggable && dragAndDropHooks) {
|
|
325
|
+
dragState = dragAndDropHooks.useDraggableCollectionState({
|
|
326
|
+
collection,
|
|
327
|
+
selectionManager,
|
|
328
|
+
preview: dragAndDropHooks.renderDragPreview ? preview : void 0
|
|
329
|
+
});
|
|
330
|
+
dragAndDropHooks.useDraggableCollection({}, dragState, listBoxRef);
|
|
331
|
+
let DragPreview = dragAndDropHooks.DragPreview;
|
|
332
|
+
dragPreview = dragAndDropHooks.renderDragPreview ? /* @__PURE__ */ React__default.createElement(DragPreview, {
|
|
333
|
+
ref: preview
|
|
334
|
+
}, dragAndDropHooks.renderDragPreview) : null;
|
|
335
|
+
}
|
|
336
|
+
if (isListDroppable && dragAndDropHooks) {
|
|
337
|
+
dropState = dragAndDropHooks.useDroppableCollectionState({
|
|
338
|
+
collection,
|
|
339
|
+
selectionManager
|
|
340
|
+
});
|
|
341
|
+
let dropTargetDelegate = dragAndDropHooks.dropTargetDelegate || ctxDropTargetDelegate || new dragAndDropHooks.ListDropTargetDelegate(collection, listBoxRef, {
|
|
342
|
+
orientation,
|
|
343
|
+
layout,
|
|
344
|
+
direction
|
|
345
|
+
});
|
|
346
|
+
droppableCollection = dragAndDropHooks.useDroppableCollection({
|
|
347
|
+
keyboardDelegate,
|
|
348
|
+
dropTargetDelegate
|
|
349
|
+
}, dropState, listBoxRef);
|
|
350
|
+
isRootDropTarget = dropState.isDropTarget({
|
|
351
|
+
type: "root"
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
let { focusProps, isFocused, isFocusVisible } = $f7dceffc5ad7768b$export$4e328f61c538687f();
|
|
355
|
+
let renderValues = {
|
|
356
|
+
isDropTarget: isRootDropTarget,
|
|
357
|
+
isEmpty: state.collection.size === 0,
|
|
358
|
+
isFocused,
|
|
359
|
+
isFocusVisible,
|
|
360
|
+
layout: props.layout || "stack",
|
|
361
|
+
state
|
|
362
|
+
};
|
|
363
|
+
let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
|
|
364
|
+
className: props.className,
|
|
365
|
+
style: props.style,
|
|
366
|
+
defaultClassName: "react-aria-ListBox",
|
|
367
|
+
values: renderValues
|
|
368
|
+
});
|
|
369
|
+
let emptyState = null;
|
|
370
|
+
if (state.collection.size === 0 && props.renderEmptyState) emptyState = /* @__PURE__ */ React__default.createElement("div", {
|
|
371
|
+
// eslint-disable-next-line
|
|
372
|
+
role: "option",
|
|
373
|
+
style: {
|
|
374
|
+
display: "contents"
|
|
375
|
+
}
|
|
376
|
+
}, props.renderEmptyState(renderValues));
|
|
377
|
+
return /* @__PURE__ */ React__default.createElement($9bf71ea28793e738$export$20e40289641fbbb6, null, /* @__PURE__ */ React__default.createElement("div", {
|
|
378
|
+
...$65484d02dcb7eb3e$export$457c3d6518dd4c6f(props),
|
|
379
|
+
...$3ef42575df84b30b$export$9d1611c77c2fe928(listBoxProps, focusProps, droppableCollection === null || droppableCollection === void 0 ? void 0 : droppableCollection.collectionProps),
|
|
380
|
+
...renderProps,
|
|
381
|
+
ref: listBoxRef,
|
|
382
|
+
slot: props.slot || void 0,
|
|
383
|
+
onScroll: props.onScroll,
|
|
384
|
+
"data-drop-target": isRootDropTarget || void 0,
|
|
385
|
+
"data-empty": state.collection.size === 0 || void 0,
|
|
386
|
+
"data-focused": isFocused || void 0,
|
|
387
|
+
"data-focus-visible": isFocusVisible || void 0,
|
|
388
|
+
"data-layout": props.layout || "stack",
|
|
389
|
+
"data-orientation": props.orientation || "vertical"
|
|
390
|
+
}, /* @__PURE__ */ React__default.createElement($64fa3d84918910a7$export$2881499e37b75b9a, {
|
|
391
|
+
values: [
|
|
392
|
+
[
|
|
393
|
+
$eed445e0843c11d0$export$7ff8f37d2d81a48d,
|
|
394
|
+
props
|
|
395
|
+
],
|
|
396
|
+
[
|
|
397
|
+
$eed445e0843c11d0$export$7c5906fe4f1f2af2,
|
|
398
|
+
state
|
|
399
|
+
],
|
|
400
|
+
[
|
|
401
|
+
$612b8eb6cb90e02d$export$d188a835a7bc5783,
|
|
402
|
+
{
|
|
403
|
+
dragAndDropHooks,
|
|
404
|
+
dragState,
|
|
405
|
+
dropState
|
|
406
|
+
}
|
|
407
|
+
],
|
|
408
|
+
[
|
|
409
|
+
$431f98aba6844401$export$6615d83f6de245ce,
|
|
410
|
+
{
|
|
411
|
+
elementType: "div"
|
|
412
|
+
}
|
|
413
|
+
],
|
|
414
|
+
[
|
|
415
|
+
$612b8eb6cb90e02d$export$f55761759794cf55,
|
|
416
|
+
{
|
|
417
|
+
render: $eed445e0843c11d0$var$ListBoxDropIndicatorWrapper
|
|
418
|
+
}
|
|
419
|
+
],
|
|
420
|
+
[
|
|
421
|
+
$7135fc7d473fd974$export$d40e14dec8b060a8,
|
|
422
|
+
{
|
|
423
|
+
name: "ListBoxSection",
|
|
424
|
+
render: $eed445e0843c11d0$var$ListBoxSectionInner
|
|
425
|
+
}
|
|
426
|
+
]
|
|
427
|
+
]
|
|
428
|
+
}, /* @__PURE__ */ React__default.createElement(CollectionRoot, {
|
|
429
|
+
collection,
|
|
430
|
+
scrollRef: listBoxRef,
|
|
431
|
+
persistedKeys: $612b8eb6cb90e02d$export$d1e8e3fbb7461f6(selectionManager, dragAndDropHooks, dropState),
|
|
432
|
+
renderDropIndicator: $612b8eb6cb90e02d$export$971707d8a129a1f7(dragAndDropHooks, dropState)
|
|
433
|
+
})), emptyState, dragPreview));
|
|
434
|
+
}
|
|
435
|
+
function $eed445e0843c11d0$var$ListBoxSectionInner(props, ref, section, className = "react-aria-ListBoxSection") {
|
|
436
|
+
let state = useContext($eed445e0843c11d0$export$7c5906fe4f1f2af2);
|
|
437
|
+
let { dragAndDropHooks, dropState } = useContext($612b8eb6cb90e02d$export$d188a835a7bc5783);
|
|
438
|
+
let { CollectionBranch } = useContext($7135fc7d473fd974$export$4feb769f8ddf26c5);
|
|
439
|
+
let [headingRef, heading] = $64fa3d84918910a7$export$9d4c57ee4c6ffdd8();
|
|
440
|
+
var _props_arialabel;
|
|
441
|
+
let { headingProps, groupProps } = $af383d3bef1cfdc9$export$c3f9f39876e4bc7({
|
|
442
|
+
heading,
|
|
443
|
+
"aria-label": (_props_arialabel = props["aria-label"]) !== null && _props_arialabel !== void 0 ? _props_arialabel : void 0
|
|
444
|
+
});
|
|
445
|
+
let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
|
|
446
|
+
defaultClassName: className,
|
|
447
|
+
className: props.className,
|
|
448
|
+
style: props.style,
|
|
449
|
+
values: {}
|
|
450
|
+
});
|
|
451
|
+
return /* @__PURE__ */ React__default.createElement("section", {
|
|
452
|
+
...$65484d02dcb7eb3e$export$457c3d6518dd4c6f(props),
|
|
453
|
+
...groupProps,
|
|
454
|
+
...renderProps,
|
|
455
|
+
ref
|
|
456
|
+
}, /* @__PURE__ */ React__default.createElement($72a5793c14baf454$export$e0e4026c12a8bdbb.Provider, {
|
|
457
|
+
value: {
|
|
458
|
+
...headingProps,
|
|
459
|
+
ref: headingRef
|
|
460
|
+
}
|
|
461
|
+
}, /* @__PURE__ */ React__default.createElement(CollectionBranch, {
|
|
462
|
+
collection: state.collection,
|
|
463
|
+
parent: section,
|
|
464
|
+
renderDropIndicator: $612b8eb6cb90e02d$export$971707d8a129a1f7(dragAndDropHooks, dropState)
|
|
465
|
+
})));
|
|
466
|
+
}
|
|
467
|
+
const $eed445e0843c11d0$export$a11e76429ed99b4 = /* @__PURE__ */ $e1995378a142960e$export$18af5c7a9e9b3664("item", function ListBoxItem(props, forwardedRef, item) {
|
|
468
|
+
let ref = $df56164dff5785e2$export$4338b53315abf666(forwardedRef);
|
|
469
|
+
let state = useContext($eed445e0843c11d0$export$7c5906fe4f1f2af2);
|
|
470
|
+
let { dragAndDropHooks, dragState, dropState } = useContext($612b8eb6cb90e02d$export$d188a835a7bc5783);
|
|
471
|
+
let { optionProps, labelProps, descriptionProps, ...states } = $293f70390ea03370$export$497855f14858aa34({
|
|
472
|
+
key: item.key,
|
|
473
|
+
"aria-label": props === null || props === void 0 ? void 0 : props["aria-label"]
|
|
474
|
+
}, state, ref);
|
|
475
|
+
let { hoverProps, isHovered } = $6179b936705e76d3$export$ae780daf29e6d456({
|
|
476
|
+
isDisabled: !states.allowsSelection && !states.hasAction,
|
|
477
|
+
onHoverStart: item.props.onHoverStart,
|
|
478
|
+
onHoverChange: item.props.onHoverChange,
|
|
479
|
+
onHoverEnd: item.props.onHoverEnd
|
|
480
|
+
});
|
|
481
|
+
let draggableItem = null;
|
|
482
|
+
if (dragState && dragAndDropHooks) draggableItem = dragAndDropHooks.useDraggableItem({
|
|
483
|
+
key: item.key
|
|
484
|
+
}, dragState);
|
|
485
|
+
let droppableItem = null;
|
|
486
|
+
if (dropState && dragAndDropHooks) droppableItem = dragAndDropHooks.useDroppableItem({
|
|
487
|
+
target: {
|
|
488
|
+
type: "item",
|
|
489
|
+
key: item.key,
|
|
490
|
+
dropPosition: "on"
|
|
491
|
+
}
|
|
492
|
+
}, dropState, ref);
|
|
493
|
+
let isDragging = dragState && dragState.isDragging(item.key);
|
|
494
|
+
let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
|
|
495
|
+
...props,
|
|
496
|
+
id: void 0,
|
|
497
|
+
children: props.children,
|
|
498
|
+
defaultClassName: "react-aria-ListBoxItem",
|
|
499
|
+
values: {
|
|
500
|
+
...states,
|
|
501
|
+
isHovered,
|
|
502
|
+
selectionMode: state.selectionManager.selectionMode,
|
|
503
|
+
selectionBehavior: state.selectionManager.selectionBehavior,
|
|
504
|
+
allowsDragging: !!dragState,
|
|
505
|
+
isDragging,
|
|
506
|
+
isDropTarget: droppableItem === null || droppableItem === void 0 ? void 0 : droppableItem.isDropTarget
|
|
507
|
+
}
|
|
508
|
+
});
|
|
509
|
+
useEffect(() => {
|
|
510
|
+
if (!item.textValue && process.env.NODE_ENV !== "production") console.warn("A `textValue` prop is required for <ListBoxItem> elements with non-plain text children in order to support accessibility features such as type to select.");
|
|
511
|
+
}, [
|
|
512
|
+
item.textValue
|
|
513
|
+
]);
|
|
514
|
+
let ElementType = props.href ? "a" : "div";
|
|
515
|
+
return /* @__PURE__ */ React__default.createElement(ElementType, {
|
|
516
|
+
...$3ef42575df84b30b$export$9d1611c77c2fe928(optionProps, hoverProps, draggableItem === null || draggableItem === void 0 ? void 0 : draggableItem.dragProps, droppableItem === null || droppableItem === void 0 ? void 0 : droppableItem.dropProps),
|
|
517
|
+
...renderProps,
|
|
518
|
+
ref,
|
|
519
|
+
"data-allows-dragging": !!dragState || void 0,
|
|
520
|
+
"data-selected": states.isSelected || void 0,
|
|
521
|
+
"data-disabled": states.isDisabled || void 0,
|
|
522
|
+
"data-hovered": isHovered || void 0,
|
|
523
|
+
"data-focused": states.isFocused || void 0,
|
|
524
|
+
"data-focus-visible": states.isFocusVisible || void 0,
|
|
525
|
+
"data-pressed": states.isPressed || void 0,
|
|
526
|
+
"data-dragging": isDragging || void 0,
|
|
527
|
+
"data-drop-target": (droppableItem === null || droppableItem === void 0 ? void 0 : droppableItem.isDropTarget) || void 0,
|
|
528
|
+
"data-selection-mode": state.selectionManager.selectionMode === "none" ? void 0 : state.selectionManager.selectionMode
|
|
529
|
+
}, /* @__PURE__ */ React__default.createElement($64fa3d84918910a7$export$2881499e37b75b9a, {
|
|
530
|
+
values: [
|
|
531
|
+
[
|
|
532
|
+
$514c0188e459b4c0$export$9afb8bc826b033ea,
|
|
533
|
+
{
|
|
534
|
+
slots: {
|
|
535
|
+
[$64fa3d84918910a7$export$c62b8e45d58ddad9]: labelProps,
|
|
536
|
+
label: labelProps,
|
|
537
|
+
description: descriptionProps
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
]
|
|
541
|
+
]
|
|
542
|
+
}, renderProps.children));
|
|
543
|
+
});
|
|
544
|
+
function $eed445e0843c11d0$var$ListBoxDropIndicatorWrapper(props, ref) {
|
|
545
|
+
ref = $df56164dff5785e2$export$4338b53315abf666(ref);
|
|
546
|
+
let { dragAndDropHooks, dropState } = useContext($612b8eb6cb90e02d$export$d188a835a7bc5783);
|
|
547
|
+
let { dropIndicatorProps, isHidden, isDropTarget } = dragAndDropHooks.useDropIndicator(props, dropState, ref);
|
|
548
|
+
if (isHidden) return null;
|
|
549
|
+
return /* @__PURE__ */ React__default.createElement($eed445e0843c11d0$var$ListBoxDropIndicatorForwardRef, {
|
|
550
|
+
...props,
|
|
551
|
+
dropIndicatorProps,
|
|
552
|
+
isDropTarget,
|
|
553
|
+
ref
|
|
554
|
+
});
|
|
555
|
+
}
|
|
556
|
+
function $eed445e0843c11d0$var$ListBoxDropIndicator(props, ref) {
|
|
557
|
+
let { dropIndicatorProps, isDropTarget, ...otherProps } = props;
|
|
558
|
+
let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
|
|
559
|
+
...otherProps,
|
|
560
|
+
defaultClassName: "react-aria-DropIndicator",
|
|
561
|
+
values: {
|
|
562
|
+
isDropTarget
|
|
563
|
+
}
|
|
564
|
+
});
|
|
565
|
+
return /* @__PURE__ */ React__default.createElement("div", {
|
|
566
|
+
...dropIndicatorProps,
|
|
567
|
+
...renderProps,
|
|
568
|
+
// eslint-disable-next-line
|
|
569
|
+
role: "option",
|
|
570
|
+
ref,
|
|
571
|
+
"data-drop-target": isDropTarget || void 0
|
|
572
|
+
});
|
|
573
|
+
}
|
|
574
|
+
const $eed445e0843c11d0$var$ListBoxDropIndicatorForwardRef = /* @__PURE__ */ forwardRef($eed445e0843c11d0$var$ListBoxDropIndicator);
|
|
575
|
+
export {
|
|
576
|
+
$eed445e0843c11d0$export$41f133550aa26f48 as $,
|
|
577
|
+
$eed445e0843c11d0$export$a11e76429ed99b4 as a,
|
|
578
|
+
$eed445e0843c11d0$export$7ff8f37d2d81a48d as b,
|
|
579
|
+
$eed445e0843c11d0$export$7c5906fe4f1f2af2 as c,
|
|
580
|
+
$b1f0cad8af73213b$export$3585ede4d035bf14 as d,
|
|
581
|
+
$b1f0cad8af73213b$export$9145995848b05025 as e
|
|
582
|
+
};
|