react-aria-components 1.0.0-alpha.3 → 1.0.0-alpha.5
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/import.mjs +873 -285
- package/dist/main.js +876 -281
- package/dist/main.js.map +1 -1
- package/dist/module.js +873 -285
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +239 -72
- package/dist/types.d.ts.map +1 -1
- package/package.json +14 -12
- package/src/Button.tsx +31 -3
- package/src/Calendar.tsx +15 -9
- package/src/Checkbox.tsx +13 -7
- package/src/Collection.tsx +118 -65
- package/src/ComboBox.tsx +32 -9
- package/src/DateField.tsx +13 -11
- package/src/DatePicker.tsx +9 -6
- package/src/Dialog.tsx +3 -3
- package/src/DropZone.tsx +108 -0
- package/src/FileTrigger.tsx +71 -0
- package/src/GridList.tsx +35 -14
- package/src/Link.tsx +8 -5
- package/src/ListBox.tsx +69 -26
- package/src/Menu.tsx +8 -4
- package/src/Meter.tsx +2 -2
- package/src/Modal.tsx +14 -12
- package/src/NumberField.tsx +7 -5
- package/src/OverlayArrow.tsx +2 -2
- package/src/Popover.tsx +22 -10
- package/src/RadioGroup.tsx +14 -7
- package/src/SearchField.tsx +7 -2
- package/src/Select.tsx +39 -13
- package/src/Slider.tsx +15 -8
- package/src/Switch.tsx +14 -6
- package/src/Table.tsx +97 -51
- package/src/Tabs.tsx +86 -81
- package/src/TagGroup.tsx +249 -0
- package/src/ToggleButton.tsx +2 -2
- package/src/Tooltip.tsx +2 -2
- package/src/index.ts +11 -5
- package/src/utils.tsx +56 -32
package/dist/import.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {DIRECTORY_DRAG_TYPE as $67da31f5140672c4$re_export$DIRECTORY_DRAG_TYPE, isDirectoryDropItem as $67da31f5140672c4$re_export$isDirectoryDropItem, isFileDropItem as $67da31f5140672c4$re_export$isFileDropItem, isTextDropItem as $67da31f5140672c4$re_export$isTextDropItem, SSRProvider as $67da31f5140672c4$re_export$SSRProvider, useBreadcrumbs as $dGqE5$useBreadcrumbs, useIsSSR as $dGqE5$useIsSSR, mergeProps as $dGqE5$mergeProps, useLink as $dGqE5$useLink, useHover as $dGqE5$useHover, useFocusRing as $dGqE5$useFocusRing, useButton as $dGqE5$useButton, useLocale as $dGqE5$useLocale, useCalendar as $dGqE5$useCalendar, VisuallyHidden as $dGqE5$VisuallyHidden, useRangeCalendar as $dGqE5$useRangeCalendar, useCalendarGrid as $dGqE5$useCalendarGrid, useCalendarCell as $dGqE5$useCalendarCell, useCheckboxGroup as $dGqE5$useCheckboxGroup, useCheckboxGroupItem as $dGqE5$useCheckboxGroupItem, useCheckbox as $dGqE5$useCheckbox, usePress as $dGqE5$usePress, useFilter as $dGqE5$useFilter, useComboBox as $dGqE5$useComboBox,
|
|
2
|
-
import {filterDOMProps as $dGqE5$filterDOMProps,
|
|
1
|
+
import {DIRECTORY_DRAG_TYPE as $67da31f5140672c4$re_export$DIRECTORY_DRAG_TYPE, isDirectoryDropItem as $67da31f5140672c4$re_export$isDirectoryDropItem, isFileDropItem as $67da31f5140672c4$re_export$isFileDropItem, isTextDropItem as $67da31f5140672c4$re_export$isTextDropItem, SSRProvider as $67da31f5140672c4$re_export$SSRProvider, useBreadcrumbs as $dGqE5$useBreadcrumbs, useIsSSR as $dGqE5$useIsSSR, mergeProps as $dGqE5$mergeProps, useLink as $dGqE5$useLink, useHover as $dGqE5$useHover, useFocusRing as $dGqE5$useFocusRing, useButton as $dGqE5$useButton, useLocale as $dGqE5$useLocale, useCalendar as $dGqE5$useCalendar, VisuallyHidden as $dGqE5$VisuallyHidden, useRangeCalendar as $dGqE5$useRangeCalendar, useCalendarGrid as $dGqE5$useCalendarGrid, useCalendarCell as $dGqE5$useCalendarCell, useCheckboxGroup as $dGqE5$useCheckboxGroup, useCheckboxGroupItem as $dGqE5$useCheckboxGroupItem, useCheckbox as $dGqE5$useCheckbox, usePress as $dGqE5$usePress, useFilter as $dGqE5$useFilter, useComboBox as $dGqE5$useComboBox, ListKeyboardDelegate as $dGqE5$ListKeyboardDelegate, useListBox as $dGqE5$useListBox, FocusScope as $dGqE5$FocusScope, useListBoxSection as $dGqE5$useListBoxSection, useOption as $dGqE5$useOption, useDraggableCollection as $dGqE5$useDraggableCollection, useDraggableItem as $dGqE5$useDraggableItem, DragPreview as $dGqE5$DragPreview, useDroppableItem as $dGqE5$useDroppableItem, useDroppableCollection as $dGqE5$useDroppableCollection, useDropIndicator as $dGqE5$useDropIndicator, ListDropTargetDelegate as $dGqE5$ListDropTargetDelegate, useSeparator as $dGqE5$useSeparator, usePopover as $dGqE5$usePopover, Overlay as $dGqE5$Overlay, DismissButton as $dGqE5$DismissButton, useDateField as $dGqE5$useDateField, useTimeField as $dGqE5$useTimeField, useDateSegment as $dGqE5$useDateSegment, useDatePicker as $dGqE5$useDatePicker, useDateRangePicker as $dGqE5$useDateRangePicker, useOverlayTrigger as $dGqE5$useOverlayTrigger, useDialog as $dGqE5$useDialog, useModalOverlay as $dGqE5$useModalOverlay, useDrop as $dGqE5$useDrop, useId as $dGqE5$useId, useClipboard as $dGqE5$useClipboard, useGridList as $dGqE5$useGridList, useGridListItem as $dGqE5$useGridListItem, useGridListSelectionCheckbox as $dGqE5$useGridListSelectionCheckbox, useVisuallyHidden as $dGqE5$useVisuallyHidden, useMenuTrigger as $dGqE5$useMenuTrigger, useMenu as $dGqE5$useMenu, useMenuSection as $dGqE5$useMenuSection, useMenuItem as $dGqE5$useMenuItem, useMeter as $dGqE5$useMeter, useNumberField as $dGqE5$useNumberField, useProgressBar as $dGqE5$useProgressBar, useRadioGroup as $dGqE5$useRadioGroup, useRadio as $dGqE5$useRadio, useSearchField as $dGqE5$useSearchField, useSelect as $dGqE5$useSelect, HiddenSelect as $dGqE5$HiddenSelect, useNumberFormatter as $dGqE5$useNumberFormatter, useSlider as $dGqE5$useSlider, useSliderThumb as $dGqE5$useSliderThumb, useSwitch as $dGqE5$useSwitch, useTable as $dGqE5$useTable, useTableRowGroup as $dGqE5$useTableRowGroup, useTableHeaderRow as $dGqE5$useTableHeaderRow, useTableSelectAllCheckbox as $dGqE5$useTableSelectAllCheckbox, useTableColumnHeader as $dGqE5$useTableColumnHeader, useTableRow as $dGqE5$useTableRow, useTableSelectionCheckbox as $dGqE5$useTableSelectionCheckbox, useTableCell as $dGqE5$useTableCell, useTabList as $dGqE5$useTabList, useTab as $dGqE5$useTab, useTabPanel as $dGqE5$useTabPanel, useTagGroup as $dGqE5$useTagGroup, useTag as $dGqE5$useTag, useTextField as $dGqE5$useTextField, useToggleButton as $dGqE5$useToggleButton, useTooltipTrigger as $dGqE5$useTooltipTrigger, OverlayContainer as $dGqE5$OverlayContainer, useOverlayPosition as $dGqE5$useOverlayPosition, useTooltip as $dGqE5$useTooltip} from "react-aria";
|
|
2
|
+
import {filterDOMProps as $dGqE5$filterDOMProps, useObjectRef as $dGqE5$useObjectRef, mergeRefs as $dGqE5$mergeRefs, mergeProps as $dGqE5$mergeProps1, useLayoutEffect as $dGqE5$useLayoutEffect, useResizeObserver as $dGqE5$useResizeObserver, useViewportSize as $dGqE5$useViewportSize, useLabels as $dGqE5$useLabels, isWebKit as $dGqE5$isWebKit, isIOS as $dGqE5$isIOS} from "@react-aria/utils";
|
|
3
3
|
import $dGqE5$react, {createContext as $dGqE5$createContext, forwardRef as $dGqE5$forwardRef, useMemo as $dGqE5$useMemo, cloneElement as $dGqE5$cloneElement, useCallback as $dGqE5$useCallback, useContext as $dGqE5$useContext, useEffect as $dGqE5$useEffect, useState as $dGqE5$useState, useRef as $dGqE5$useRef} from "react";
|
|
4
|
-
import $dGqE5$
|
|
5
|
-
import {createPortal as $dGqE5$createPortal} from "react-dom";
|
|
4
|
+
import $dGqE5$reactdom, {createPortal as $dGqE5$createPortal} from "react-dom";
|
|
6
5
|
import {useSyncExternalStore as $dGqE5$useSyncExternalStore} from "use-sync-external-store/shim/index.js";
|
|
7
6
|
import {createCalendar as $dGqE5$createCalendar, endOfMonth as $dGqE5$endOfMonth, getWeeksInMonth as $dGqE5$getWeeksInMonth, isSameMonth as $dGqE5$isSameMonth, isSameDay as $dGqE5$isSameDay} from "@internationalized/date";
|
|
8
|
-
import {useCalendarState as $dGqE5$useCalendarState, useRangeCalendarState as $dGqE5$useRangeCalendarState, useCheckboxGroupState as $dGqE5$useCheckboxGroupState, useToggleState as $dGqE5$useToggleState, useComboBoxState as $dGqE5$useComboBoxState, useListState as $dGqE5$useListState, useDraggableCollectionState as $dGqE5$useDraggableCollectionState, useDroppableCollectionState as $dGqE5$useDroppableCollectionState, useDateFieldState as $dGqE5$useDateFieldState, useTimeFieldState as $dGqE5$useTimeFieldState, useDatePickerState as $dGqE5$useDatePickerState, useDateRangePickerState as $dGqE5$useDateRangePickerState,
|
|
7
|
+
import {useCalendarState as $dGqE5$useCalendarState, useRangeCalendarState as $dGqE5$useRangeCalendarState, useCheckboxGroupState as $dGqE5$useCheckboxGroupState, useToggleState as $dGqE5$useToggleState, useComboBoxState as $dGqE5$useComboBoxState, useListState as $dGqE5$useListState, useDraggableCollectionState as $dGqE5$useDraggableCollectionState, useDroppableCollectionState as $dGqE5$useDroppableCollectionState, useOverlayTriggerState as $dGqE5$useOverlayTriggerState, useDateFieldState as $dGqE5$useDateFieldState, useTimeFieldState as $dGqE5$useTimeFieldState, useDatePickerState as $dGqE5$useDatePickerState, useDateRangePickerState as $dGqE5$useDateRangePickerState, useMenuTriggerState as $dGqE5$useMenuTriggerState, useTreeState as $dGqE5$useTreeState, useNumberFieldState as $dGqE5$useNumberFieldState, useRadioGroupState as $dGqE5$useRadioGroupState, useSearchFieldState as $dGqE5$useSearchFieldState, useSelectState as $dGqE5$useSelectState, useSliderState as $dGqE5$useSliderState, useTableState as $dGqE5$useTableState, useTabListState as $dGqE5$useTabListState, useTooltipTriggerState as $dGqE5$useTooltipTriggerState} from "react-stately";
|
|
8
|
+
import {PressResponder as $dGqE5$PressResponder} from "@react-aria/interactions";
|
|
9
9
|
import {buildHeaderRows as $dGqE5$buildHeaderRows} from "@react-stately/table";
|
|
10
10
|
import {FocusableProvider as $dGqE5$FocusableProvider} from "@react-aria/focus";
|
|
11
11
|
|
|
@@ -44,8 +44,6 @@ import {FocusableProvider as $dGqE5$FocusableProvider} from "@react-aria/focus";
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
49
47
|
class $7135fc7d473fd974$export$f5d856d854e74713 {
|
|
50
48
|
get childNodes() {
|
|
51
49
|
throw new Error("childNodes is not supported");
|
|
@@ -68,29 +66,28 @@ class $7135fc7d473fd974$export$f5d856d854e74713 {
|
|
|
68
66
|
return node;
|
|
69
67
|
}
|
|
70
68
|
constructor(type, key){
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
69
|
+
this.value = null;
|
|
70
|
+
this.level = 0;
|
|
71
|
+
this.hasChildNodes = false;
|
|
72
|
+
this.rendered = null;
|
|
73
|
+
this.textValue = "";
|
|
74
|
+
this["aria-label"] = undefined;
|
|
75
|
+
this.index = 0;
|
|
76
|
+
this.parentKey = null;
|
|
77
|
+
this.prevKey = null;
|
|
78
|
+
this.nextKey = null;
|
|
79
|
+
this.firstChildKey = null;
|
|
80
|
+
this.lastChildKey = null;
|
|
81
|
+
this.props = {};
|
|
84
82
|
this.type = type;
|
|
85
83
|
this.key = key;
|
|
86
84
|
}
|
|
87
85
|
}
|
|
88
|
-
let $7135fc7d473fd974$var$_Symbol_iterator = Symbol.iterator;
|
|
89
86
|
/**
|
|
90
87
|
* A mutable node in the fake DOM tree. When mutated, it marks itself as dirty
|
|
91
88
|
* and queues an update with the owner document.
|
|
92
89
|
*/ class $7135fc7d473fd974$var$BaseNode {
|
|
93
|
-
*[
|
|
90
|
+
*[Symbol.iterator]() {
|
|
94
91
|
let node = this.firstChild;
|
|
95
92
|
while(node){
|
|
96
93
|
yield node;
|
|
@@ -102,37 +99,38 @@ let $7135fc7d473fd974$var$_Symbol_iterator = Symbol.iterator;
|
|
|
102
99
|
}
|
|
103
100
|
set firstChild(firstChild) {
|
|
104
101
|
this._firstChild = firstChild;
|
|
105
|
-
this.ownerDocument.
|
|
102
|
+
this.ownerDocument.markDirty(this);
|
|
106
103
|
}
|
|
107
104
|
get lastChild() {
|
|
108
105
|
return this._lastChild;
|
|
109
106
|
}
|
|
110
107
|
set lastChild(lastChild) {
|
|
111
108
|
this._lastChild = lastChild;
|
|
112
|
-
this.ownerDocument.
|
|
109
|
+
this.ownerDocument.markDirty(this);
|
|
113
110
|
}
|
|
114
111
|
get previousSibling() {
|
|
115
112
|
return this._previousSibling;
|
|
116
113
|
}
|
|
117
114
|
set previousSibling(previousSibling) {
|
|
118
115
|
this._previousSibling = previousSibling;
|
|
119
|
-
this.ownerDocument.
|
|
116
|
+
this.ownerDocument.markDirty(this);
|
|
120
117
|
}
|
|
121
118
|
get nextSibling() {
|
|
122
119
|
return this._nextSibling;
|
|
123
120
|
}
|
|
124
121
|
set nextSibling(nextSibling) {
|
|
125
122
|
this._nextSibling = nextSibling;
|
|
126
|
-
this.ownerDocument.
|
|
123
|
+
this.ownerDocument.markDirty(this);
|
|
127
124
|
}
|
|
128
125
|
get parentNode() {
|
|
129
126
|
return this._parentNode;
|
|
130
127
|
}
|
|
131
128
|
set parentNode(parentNode) {
|
|
132
129
|
this._parentNode = parentNode;
|
|
133
|
-
this.ownerDocument.
|
|
130
|
+
this.ownerDocument.markDirty(this);
|
|
134
131
|
}
|
|
135
132
|
appendChild(child) {
|
|
133
|
+
this.ownerDocument.startTransaction();
|
|
136
134
|
if (child.parentNode) child.parentNode.removeChild(child);
|
|
137
135
|
if (this.firstChild == null) this.firstChild = child;
|
|
138
136
|
if (this.lastChild) {
|
|
@@ -146,11 +144,16 @@ let $7135fc7d473fd974$var$_Symbol_iterator = Symbol.iterator;
|
|
|
146
144
|
child.parentNode = this;
|
|
147
145
|
child.nextSibling = null;
|
|
148
146
|
this.lastChild = child;
|
|
149
|
-
this.ownerDocument.
|
|
147
|
+
this.ownerDocument.markDirty(this);
|
|
148
|
+
if (child.hasSetProps) // Only add the node to the collection if we already received props for it.
|
|
149
|
+
// Otherwise wait until then so we have the correct id for the node.
|
|
150
150
|
this.ownerDocument.addNode(child);
|
|
151
|
+
this.ownerDocument.endTransaction();
|
|
152
|
+
this.ownerDocument.queueUpdate();
|
|
151
153
|
}
|
|
152
154
|
insertBefore(newNode, referenceNode) {
|
|
153
155
|
if (referenceNode == null) return this.appendChild(newNode);
|
|
156
|
+
this.ownerDocument.startTransaction();
|
|
154
157
|
if (newNode.parentNode) newNode.parentNode.removeChild(newNode);
|
|
155
158
|
newNode.nextSibling = referenceNode;
|
|
156
159
|
newNode.previousSibling = referenceNode.previousSibling;
|
|
@@ -164,10 +167,13 @@ let $7135fc7d473fd974$var$_Symbol_iterator = Symbol.iterator;
|
|
|
164
167
|
node.index++;
|
|
165
168
|
node = node.nextSibling;
|
|
166
169
|
}
|
|
167
|
-
this.ownerDocument.addNode(newNode);
|
|
170
|
+
if (newNode.hasSetProps) this.ownerDocument.addNode(newNode);
|
|
171
|
+
this.ownerDocument.endTransaction();
|
|
172
|
+
this.ownerDocument.queueUpdate();
|
|
168
173
|
}
|
|
169
174
|
removeChild(child) {
|
|
170
175
|
if (child.parentNode !== this) return;
|
|
176
|
+
this.ownerDocument.startTransaction();
|
|
171
177
|
let node = child.nextSibling;
|
|
172
178
|
while(node){
|
|
173
179
|
node.index--;
|
|
@@ -182,31 +188,28 @@ let $7135fc7d473fd974$var$_Symbol_iterator = Symbol.iterator;
|
|
|
182
188
|
child.previousSibling = null;
|
|
183
189
|
child.index = 0;
|
|
184
190
|
this.ownerDocument.removeNode(child);
|
|
191
|
+
this.ownerDocument.endTransaction();
|
|
192
|
+
this.ownerDocument.queueUpdate();
|
|
185
193
|
}
|
|
186
194
|
addEventListener() {}
|
|
187
195
|
removeEventListener() {}
|
|
188
196
|
constructor(ownerDocument){
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
197
|
+
this._firstChild = null;
|
|
198
|
+
this._lastChild = null;
|
|
199
|
+
this._previousSibling = null;
|
|
200
|
+
this._nextSibling = null;
|
|
201
|
+
this._parentNode = null;
|
|
194
202
|
this.ownerDocument = ownerDocument;
|
|
195
203
|
}
|
|
196
204
|
}
|
|
197
205
|
let $7135fc7d473fd974$var$id = 0;
|
|
198
|
-
const $7135fc7d473fd974$var$TYPE_MAP = {
|
|
199
|
-
hr: "separator",
|
|
200
|
-
optgroup: "section",
|
|
201
|
-
option: "item"
|
|
202
|
-
};
|
|
203
206
|
class $7135fc7d473fd974$export$dc064fe9e59310fd extends $7135fc7d473fd974$var$BaseNode {
|
|
204
207
|
get index() {
|
|
205
208
|
return this._index;
|
|
206
209
|
}
|
|
207
210
|
set index(index) {
|
|
208
211
|
this._index = index;
|
|
209
|
-
this.ownerDocument.
|
|
212
|
+
this.ownerDocument.markDirty(this);
|
|
210
213
|
}
|
|
211
214
|
get level() {
|
|
212
215
|
if (this.parentNode instanceof $7135fc7d473fd974$export$dc064fe9e59310fd) return this.parentNode.level + (this.node.type === "item" ? 1 : 0);
|
|
@@ -228,41 +231,47 @@ class $7135fc7d473fd974$export$dc064fe9e59310fd extends $7135fc7d473fd974$var$Ba
|
|
|
228
231
|
var _this_lastChild_node_key;
|
|
229
232
|
node.lastChildKey = (_this_lastChild_node_key = (_this_lastChild = this.lastChild) === null || _this_lastChild === void 0 ? void 0 : _this_lastChild.node.key) !== null && _this_lastChild_node_key !== void 0 ? _this_lastChild_node_key : null;
|
|
230
233
|
}
|
|
231
|
-
|
|
232
|
-
// See below for details.
|
|
233
|
-
set multiple(obj) {
|
|
234
|
+
setProps(obj, ref, rendered) {
|
|
234
235
|
let node = this.ownerDocument.getMutableNode(this);
|
|
235
|
-
let {
|
|
236
|
+
let { value: value , textValue: textValue , id: id , ...props } = obj;
|
|
237
|
+
props.ref = ref;
|
|
236
238
|
node.props = props;
|
|
237
239
|
node.rendered = rendered;
|
|
238
240
|
node.value = value;
|
|
239
241
|
node.textValue = textValue || (typeof rendered === "string" ? rendered : "") || obj["aria-label"] || "";
|
|
240
242
|
if (id != null && id !== node.key) {
|
|
241
|
-
if (this.
|
|
243
|
+
if (this.hasSetProps) throw new Error("Cannot change the id of an item");
|
|
242
244
|
node.key = id;
|
|
243
245
|
}
|
|
246
|
+
// If this is the first time props have been set, end the transaction started in the constructor
|
|
247
|
+
// so this node can be emitted.
|
|
248
|
+
if (!this.hasSetProps) {
|
|
249
|
+
this.ownerDocument.addNode(this);
|
|
250
|
+
this.ownerDocument.endTransaction();
|
|
251
|
+
this.hasSetProps = true;
|
|
252
|
+
}
|
|
253
|
+
this.ownerDocument.queueUpdate();
|
|
244
254
|
}
|
|
245
255
|
get style() {
|
|
246
|
-
|
|
247
|
-
if (!node.props.style) node.props.style = {};
|
|
248
|
-
return node.props.style;
|
|
256
|
+
return {};
|
|
249
257
|
}
|
|
250
258
|
hasAttribute() {}
|
|
251
|
-
setAttribute(
|
|
252
|
-
let node = this.ownerDocument.getMutableNode(this);
|
|
253
|
-
if (key in node) node[key] = value;
|
|
254
|
-
}
|
|
259
|
+
setAttribute() {}
|
|
255
260
|
setAttributeNS() {}
|
|
256
261
|
removeAttribute() {}
|
|
257
262
|
constructor(type, ownerDocument){
|
|
258
263
|
super(ownerDocument);
|
|
259
|
-
|
|
264
|
+
this.nodeType = 8 // COMMENT_NODE (we'd use ELEMENT_NODE but React DevTools will fail to get its dimensions)
|
|
260
265
|
;
|
|
261
|
-
|
|
262
|
-
this.
|
|
266
|
+
this._index = 0;
|
|
267
|
+
this.hasSetProps = false;
|
|
268
|
+
this.node = new $7135fc7d473fd974$export$f5d856d854e74713(type, `react-aria-${++$7135fc7d473fd974$var$id}`);
|
|
269
|
+
// Start a transaction so that no updates are emitted from the collection
|
|
270
|
+
// until the props for this node are set. We don't know the real id for the
|
|
271
|
+
// node until then, so we need to avoid emitting collections in an inconsistent state.
|
|
272
|
+
this.ownerDocument.startTransaction();
|
|
263
273
|
}
|
|
264
274
|
}
|
|
265
|
-
let $7135fc7d473fd974$var$_Symbol_iterator1 = Symbol.iterator;
|
|
266
275
|
class $7135fc7d473fd974$export$408d25a4e12db025 {
|
|
267
276
|
get size() {
|
|
268
277
|
return this.keyMap.size;
|
|
@@ -270,7 +279,7 @@ class $7135fc7d473fd974$export$408d25a4e12db025 {
|
|
|
270
279
|
getKeys() {
|
|
271
280
|
return this.keyMap.keys();
|
|
272
281
|
}
|
|
273
|
-
*[
|
|
282
|
+
*[Symbol.iterator]() {
|
|
274
283
|
let node = this.firstKey != null ? this.keyMap.get(this.firstKey) : undefined;
|
|
275
284
|
while(node){
|
|
276
285
|
yield node;
|
|
@@ -354,10 +363,10 @@ class $7135fc7d473fd974$export$408d25a4e12db025 {
|
|
|
354
363
|
this.frozen = true;
|
|
355
364
|
}
|
|
356
365
|
constructor(){
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
366
|
+
this.keyMap = new Map();
|
|
367
|
+
this.firstKey = null;
|
|
368
|
+
this.lastKey = null;
|
|
369
|
+
this.frozen = false;
|
|
361
370
|
}
|
|
362
371
|
}
|
|
363
372
|
class $7135fc7d473fd974$export$b34a105447964f9f extends $7135fc7d473fd974$var$BaseNode {
|
|
@@ -374,7 +383,7 @@ class $7135fc7d473fd974$export$b34a105447964f9f extends $7135fc7d473fd974$var$Ba
|
|
|
374
383
|
this.mutatedNodes.add(element);
|
|
375
384
|
element.node = node;
|
|
376
385
|
}
|
|
377
|
-
this.
|
|
386
|
+
this.markDirty(element);
|
|
378
387
|
return node;
|
|
379
388
|
}
|
|
380
389
|
getMutableCollection() {
|
|
@@ -384,13 +393,22 @@ class $7135fc7d473fd974$export$b34a105447964f9f extends $7135fc7d473fd974$var$Ba
|
|
|
384
393
|
}
|
|
385
394
|
return this.collection;
|
|
386
395
|
}
|
|
396
|
+
markDirty(node) {
|
|
397
|
+
this.dirtyNodes.add(node);
|
|
398
|
+
}
|
|
399
|
+
startTransaction() {
|
|
400
|
+
this.transactionCount++;
|
|
401
|
+
}
|
|
402
|
+
endTransaction() {
|
|
403
|
+
this.transactionCount--;
|
|
404
|
+
}
|
|
387
405
|
addNode(element) {
|
|
388
406
|
let collection = this.getMutableCollection();
|
|
389
407
|
if (!collection.getItem(element.node.key)) {
|
|
390
408
|
collection.addNode(element.node);
|
|
391
409
|
for (let child of element)this.addNode(child);
|
|
392
410
|
}
|
|
393
|
-
this.
|
|
411
|
+
this.markDirty(element);
|
|
394
412
|
}
|
|
395
413
|
removeNode(node) {
|
|
396
414
|
for (let child of node){
|
|
@@ -399,15 +417,16 @@ class $7135fc7d473fd974$export$b34a105447964f9f extends $7135fc7d473fd974$var$Ba
|
|
|
399
417
|
}
|
|
400
418
|
let collection = this.getMutableCollection();
|
|
401
419
|
collection.removeNode(node.node.key);
|
|
402
|
-
this.
|
|
420
|
+
this.markDirty(node);
|
|
403
421
|
}
|
|
404
422
|
/** Finalizes the collection update, updating all nodes and freezing the collection. */ getCollection() {
|
|
423
|
+
if (this.transactionCount > 0) return this.collection;
|
|
405
424
|
for (let element of this.dirtyNodes)if (element instanceof $7135fc7d473fd974$export$dc064fe9e59310fd && element.parentNode) element.updateNode();
|
|
406
425
|
this.dirtyNodes.clear();
|
|
407
426
|
if (this.mutatedNodes.size) {
|
|
408
427
|
var _this_firstChild, _this_lastChild;
|
|
409
428
|
let collection = this.getMutableCollection();
|
|
410
|
-
for (let
|
|
429
|
+
for (let element of this.mutatedNodes)if (element.parentNode) collection.addNode(element.node);
|
|
411
430
|
var _this_firstChild_node_key, _this_lastChild_node_key;
|
|
412
431
|
collection.commit((_this_firstChild_node_key = (_this_firstChild = this.firstChild) === null || _this_firstChild === void 0 ? void 0 : _this_firstChild.node.key) !== null && _this_firstChild_node_key !== void 0 ? _this_firstChild_node_key : null, (_this_lastChild_node_key = (_this_lastChild = this.lastChild) === null || _this_lastChild === void 0 ? void 0 : _this_lastChild.node.key) !== null && _this_lastChild_node_key !== void 0 ? _this_lastChild_node_key : null);
|
|
413
432
|
this.mutatedNodes.clear();
|
|
@@ -416,6 +435,9 @@ class $7135fc7d473fd974$export$b34a105447964f9f extends $7135fc7d473fd974$var$Ba
|
|
|
416
435
|
return this.collection;
|
|
417
436
|
}
|
|
418
437
|
queueUpdate() {
|
|
438
|
+
// Don't emit any updates if there is a transaction in progress.
|
|
439
|
+
// queueUpdate should be called again after the transaction.
|
|
440
|
+
if (this.dirtyNodes.size === 0 || this.transactionCount > 0) return;
|
|
419
441
|
for (let fn of this.subscriptions)fn();
|
|
420
442
|
}
|
|
421
443
|
subscribe(fn) {
|
|
@@ -425,12 +447,13 @@ class $7135fc7d473fd974$export$b34a105447964f9f extends $7135fc7d473fd974$var$Ba
|
|
|
425
447
|
constructor(collection){
|
|
426
448
|
// @ts-ignore
|
|
427
449
|
super(null);
|
|
428
|
-
|
|
450
|
+
this.nodeType = 11 // DOCUMENT_FRAGMENT_NODE
|
|
429
451
|
;
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
452
|
+
this.ownerDocument = this;
|
|
453
|
+
this.dirtyNodes = new Set();
|
|
454
|
+
this.mutatedNodes = new Set();
|
|
455
|
+
this.subscriptions = new Set();
|
|
456
|
+
this.transactionCount = 0;
|
|
434
457
|
this.collection = collection;
|
|
435
458
|
this.collectionMutated = true;
|
|
436
459
|
}
|
|
@@ -467,7 +490,7 @@ function $7135fc7d473fd974$export$727c8fc270210f13(props) {
|
|
|
467
490
|
res.push(rendered);
|
|
468
491
|
}
|
|
469
492
|
return res;
|
|
470
|
-
} else return children;
|
|
493
|
+
} else if (typeof children !== "function") return children;
|
|
471
494
|
}, [
|
|
472
495
|
children,
|
|
473
496
|
items,
|
|
@@ -484,6 +507,14 @@ function $7135fc7d473fd974$export$901dbff4e54a6dd0(props) {
|
|
|
484
507
|
}
|
|
485
508
|
const $7135fc7d473fd974$var$ShallowRenderContext = /*#__PURE__*/ (0, $dGqE5$createContext)(false);
|
|
486
509
|
function $7135fc7d473fd974$export$6cd28814d92fa9c9(props, initialCollection) {
|
|
510
|
+
let { collection: collection , document: document } = $7135fc7d473fd974$export$7cd71aa5ddd6dc4e(initialCollection);
|
|
511
|
+
let portal = $7135fc7d473fd974$export$ad42d5efb4461b31(props, document);
|
|
512
|
+
return {
|
|
513
|
+
portal: portal,
|
|
514
|
+
collection: collection
|
|
515
|
+
};
|
|
516
|
+
}
|
|
517
|
+
function $7135fc7d473fd974$export$7cd71aa5ddd6dc4e(initialCollection) {
|
|
487
518
|
// The document instance is mutable, and should never change between renders.
|
|
488
519
|
// useSyncExternalStore is used to subscribe to updates, which vends immutable Collection objects.
|
|
489
520
|
let document = (0, $dGqE5$useMemo)(()=>new $7135fc7d473fd974$export$b34a105447964f9f(initialCollection || new $7135fc7d473fd974$export$408d25a4e12db025()), [
|
|
@@ -496,57 +527,54 @@ function $7135fc7d473fd974$export$6cd28814d92fa9c9(props, initialCollection) {
|
|
|
496
527
|
document
|
|
497
528
|
]);
|
|
498
529
|
let collection = (0, $dGqE5$useSyncExternalStore)(subscribe, getSnapshot, getSnapshot);
|
|
530
|
+
return {
|
|
531
|
+
collection: collection,
|
|
532
|
+
document: document
|
|
533
|
+
};
|
|
534
|
+
}
|
|
535
|
+
function $7135fc7d473fd974$export$ad42d5efb4461b31(props, document) {
|
|
499
536
|
let children = $7135fc7d473fd974$export$901dbff4e54a6dd0(props);
|
|
500
537
|
let wrappedChildren = (0, $dGqE5$useMemo)(()=>/*#__PURE__*/ (0, $dGqE5$react).createElement($7135fc7d473fd974$var$ShallowRenderContext.Provider, {
|
|
501
538
|
value: true
|
|
502
539
|
}, children), [
|
|
503
540
|
children
|
|
504
541
|
]);
|
|
505
|
-
|
|
506
|
-
(0, $dGqE5$useLayoutEffect)(()=>{
|
|
507
|
-
if (document.dirtyNodes.size > 0) document.queueUpdate();
|
|
508
|
-
});
|
|
509
|
-
return {
|
|
510
|
-
portal: portal,
|
|
511
|
-
collection: collection
|
|
512
|
-
};
|
|
542
|
+
return (0, $dGqE5$useIsSSR)() ? null : /*#__PURE__*/ (0, $dGqE5$createPortal)(wrappedChildren, document);
|
|
513
543
|
}
|
|
514
544
|
function $7135fc7d473fd974$export$aeba0b1fb3dcd8b8(Element, props, ref) {
|
|
515
545
|
let isShallow = (0, $dGqE5$useContext)($7135fc7d473fd974$var$ShallowRenderContext);
|
|
546
|
+
ref = $7135fc7d473fd974$export$636783d3732b5559(props, ref, props.children);
|
|
516
547
|
if (isShallow) // @ts-ignore
|
|
517
548
|
return /*#__PURE__*/ (0, $dGqE5$react).createElement(Element, {
|
|
518
|
-
|
|
519
|
-
...props,
|
|
520
|
-
ref: ref,
|
|
521
|
-
rendered: props.children
|
|
522
|
-
}
|
|
549
|
+
ref: ref
|
|
523
550
|
});
|
|
524
551
|
return null;
|
|
525
552
|
}
|
|
526
|
-
function $7135fc7d473fd974$export$
|
|
527
|
-
//
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
553
|
+
function $7135fc7d473fd974$export$636783d3732b5559(props, ref, rendered) {
|
|
554
|
+
// Return a callback ref that sets the props object on the fake DOM node.
|
|
555
|
+
return (0, $dGqE5$useCallback)((element)=>{
|
|
556
|
+
element === null || element === void 0 ? void 0 : element.setProps(props, ref, rendered);
|
|
557
|
+
}, [
|
|
558
|
+
props,
|
|
559
|
+
ref,
|
|
560
|
+
rendered
|
|
561
|
+
]);
|
|
562
|
+
}
|
|
563
|
+
function $7135fc7d473fd974$var$Item(props, ref) {
|
|
532
564
|
// @ts-ignore
|
|
533
565
|
return /*#__PURE__*/ (0, $dGqE5$react).createElement("item", {
|
|
534
|
-
|
|
535
|
-
...props,
|
|
536
|
-
rendered: props.children
|
|
537
|
-
}
|
|
566
|
+
ref: $7135fc7d473fd974$export$636783d3732b5559(props, ref, props.children)
|
|
538
567
|
});
|
|
539
568
|
}
|
|
540
|
-
|
|
569
|
+
const $7135fc7d473fd974$export$6d08773d2e66f8f2 = /*#__PURE__*/ (0, $dGqE5$forwardRef)($7135fc7d473fd974$var$Item);
|
|
570
|
+
function $7135fc7d473fd974$var$Section(props, ref) {
|
|
541
571
|
let children = $7135fc7d473fd974$export$901dbff4e54a6dd0(props);
|
|
542
572
|
// @ts-ignore
|
|
543
573
|
return /*#__PURE__*/ (0, $dGqE5$react).createElement("section", {
|
|
544
|
-
|
|
545
|
-
...props,
|
|
546
|
-
rendered: props.title
|
|
547
|
-
}
|
|
574
|
+
ref: $7135fc7d473fd974$export$636783d3732b5559(props, ref)
|
|
548
575
|
}, children);
|
|
549
576
|
}
|
|
577
|
+
const $7135fc7d473fd974$export$6e2c8f0811a474ce = /*#__PURE__*/ (0, $dGqE5$forwardRef)($7135fc7d473fd974$var$Section);
|
|
550
578
|
const $7135fc7d473fd974$export$db36075d98ba73d3 = /*#__PURE__*/ (0, $dGqE5$createContext)(null);
|
|
551
579
|
const $7135fc7d473fd974$export$4feb769f8ddf26c5 = /*#__PURE__*/ (0, $dGqE5$createContext)(null);
|
|
552
580
|
function $7135fc7d473fd974$export$fb8073518f34e6ec(props) {
|
|
@@ -571,6 +599,7 @@ function $7135fc7d473fd974$export$fb8073518f34e6ec(props) {
|
|
|
571
599
|
* governing permissions and limitations under the License.
|
|
572
600
|
*/
|
|
573
601
|
|
|
602
|
+
|
|
574
603
|
const $64fa3d84918910a7$export$91172ebb93c441a2 = Symbol("callback");
|
|
575
604
|
const $64fa3d84918910a7$export$8e0ef2c5844bfb6b = Symbol("default");
|
|
576
605
|
function $64fa3d84918910a7$export$2881499e37b75b9a({ values: values , children: children }) {
|
|
@@ -580,18 +609,32 @@ function $64fa3d84918910a7$export$2881499e37b75b9a({ values: values , children:
|
|
|
580
609
|
}, children);
|
|
581
610
|
return children;
|
|
582
611
|
}
|
|
583
|
-
function $64fa3d84918910a7$export$4d86445c2cf5e3(
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
children
|
|
594
|
-
|
|
612
|
+
function $64fa3d84918910a7$export$4d86445c2cf5e3(props) {
|
|
613
|
+
let { className: className , style: style , children: children , defaultClassName: defaultClassName , defaultChildren: defaultChildren , values: values } = props;
|
|
614
|
+
return (0, $dGqE5$useMemo)(()=>{
|
|
615
|
+
let computedClassName;
|
|
616
|
+
let computedStyle;
|
|
617
|
+
let computedChildren;
|
|
618
|
+
if (typeof className === "function") computedClassName = className(values);
|
|
619
|
+
else computedClassName = className;
|
|
620
|
+
if (typeof style === "function") computedStyle = style(values);
|
|
621
|
+
else computedStyle = style;
|
|
622
|
+
if (typeof children === "function") computedChildren = children(values);
|
|
623
|
+
else if (children == null) computedChildren = defaultChildren;
|
|
624
|
+
else computedChildren = children;
|
|
625
|
+
return {
|
|
626
|
+
className: computedClassName !== null && computedClassName !== void 0 ? computedClassName : defaultClassName,
|
|
627
|
+
style: computedStyle,
|
|
628
|
+
children: computedChildren
|
|
629
|
+
};
|
|
630
|
+
}, [
|
|
631
|
+
className,
|
|
632
|
+
style,
|
|
633
|
+
children,
|
|
634
|
+
defaultClassName,
|
|
635
|
+
defaultChildren,
|
|
636
|
+
values
|
|
637
|
+
]);
|
|
595
638
|
}
|
|
596
639
|
function $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, context) {
|
|
597
640
|
let ctx = (0, $dGqE5$useContext)(context) || {};
|
|
@@ -604,7 +647,10 @@ function $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, context) {
|
|
|
604
647
|
}
|
|
605
648
|
// @ts-ignore - TS says "Type 'unique symbol' cannot be used as an index type." but not sure why.
|
|
606
649
|
let { ref: contextRef , [$64fa3d84918910a7$export$91172ebb93c441a2]: callback , ...contextProps } = ctx;
|
|
607
|
-
let mergedRef = (0, $dGqE5$useObjectRef)((0, $dGqE5$mergeRefs)(ref, contextRef)
|
|
650
|
+
let mergedRef = (0, $dGqE5$useObjectRef)((0, $dGqE5$useMemo)(()=>(0, $dGqE5$mergeRefs)(ref, contextRef), [
|
|
651
|
+
ref,
|
|
652
|
+
contextRef
|
|
653
|
+
]));
|
|
608
654
|
let mergedProps = (0, $dGqE5$mergeProps1)(contextProps, props);
|
|
609
655
|
// A parent component might need the props from a child, so call slot callback if needed.
|
|
610
656
|
(0, $dGqE5$useEffect)(()=>{
|
|
@@ -646,24 +692,28 @@ function $64fa3d84918910a7$export$45fda7c47f93fd48(ref, isOpen) {
|
|
|
646
692
|
// State to trigger a re-render after animation is complete, which causes the element to be removed from the DOM.
|
|
647
693
|
// Ref to track the state we're in, so we don't immediately reset isExiting to true after the animation.
|
|
648
694
|
let [isExiting, setExiting] = (0, $dGqE5$useState)(false);
|
|
649
|
-
let exitState = (0, $dGqE5$
|
|
695
|
+
let [exitState, setExitState] = (0, $dGqE5$useState)("idle");
|
|
650
696
|
// If isOpen becomes false, set isExiting to true.
|
|
651
|
-
if (!isOpen && ref.current && exitState
|
|
697
|
+
if (!isOpen && ref.current && exitState === "idle") {
|
|
652
698
|
isExiting = true;
|
|
653
699
|
setExiting(true);
|
|
654
|
-
|
|
700
|
+
setExitState("exiting");
|
|
655
701
|
}
|
|
656
702
|
// If we exited, and the element has been removed, reset exit state to idle.
|
|
657
|
-
if (!ref.current && exitState
|
|
703
|
+
if (!ref.current && exitState === "exited") setExitState("idle");
|
|
658
704
|
$64fa3d84918910a7$var$useAnimation(ref, isExiting, (0, $dGqE5$useCallback)(()=>{
|
|
659
|
-
|
|
705
|
+
setExitState("exited");
|
|
660
706
|
setExiting(false);
|
|
661
707
|
}, []));
|
|
662
708
|
return isExiting;
|
|
663
709
|
}
|
|
664
710
|
function $64fa3d84918910a7$var$useAnimation(ref, isActive, onEnd) {
|
|
665
711
|
let prevAnimation = (0, $dGqE5$useRef)(null);
|
|
666
|
-
if (isActive && ref.current)
|
|
712
|
+
if (isActive && ref.current) // This is ok because we only read it in the layout effect below, immediately after the commit phase.
|
|
713
|
+
// We could move this to another effect that runs every render, but this would be unnecessarily slow.
|
|
714
|
+
// We only need the computed style right before the animation becomes active.
|
|
715
|
+
// eslint-disable-next-line rulesdir/pure-render
|
|
716
|
+
prevAnimation.current = window.getComputedStyle(ref.current).animation;
|
|
667
717
|
(0, $dGqE5$useLayoutEffect)(()=>{
|
|
668
718
|
if (isActive && ref.current) {
|
|
669
719
|
// Make sure there's actually an animation, and it wasn't there before we triggered the update.
|
|
@@ -672,7 +722,9 @@ function $64fa3d84918910a7$var$useAnimation(ref, isActive, onEnd) {
|
|
|
672
722
|
let onAnimationEnd = (e)=>{
|
|
673
723
|
if (e.target === ref.current) {
|
|
674
724
|
element.removeEventListener("animationend", onAnimationEnd);
|
|
675
|
-
|
|
725
|
+
(0, $dGqE5$reactdom).flushSync(()=>{
|
|
726
|
+
onEnd();
|
|
727
|
+
});
|
|
676
728
|
}
|
|
677
729
|
};
|
|
678
730
|
let element = ref.current;
|
|
@@ -734,7 +786,7 @@ const $5cb03073d3f54797$export$a8a3e93435678ff9 = /*#__PURE__*/ (0, $dGqE5$forwa
|
|
|
734
786
|
const $4f118338184dc1d9$export$e2509388b49734e7 = /*#__PURE__*/ (0, $dGqE5$createContext)(null);
|
|
735
787
|
function $4f118338184dc1d9$var$Link(props, ref) {
|
|
736
788
|
[props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $4f118338184dc1d9$export$e2509388b49734e7);
|
|
737
|
-
let elementType = typeof props.children === "string" ? "span" : "a";
|
|
789
|
+
let elementType = typeof props.children === "string" || typeof props.children === "function" ? "span" : "a";
|
|
738
790
|
let { linkProps: linkProps , isPressed: isPressed } = (0, $dGqE5$useLink)({
|
|
739
791
|
...props,
|
|
740
792
|
elementType: elementType
|
|
@@ -753,6 +805,8 @@ function $4f118338184dc1d9$var$Link(props, ref) {
|
|
|
753
805
|
isFocusVisible: isFocusVisible
|
|
754
806
|
}
|
|
755
807
|
});
|
|
808
|
+
let DOMProps = (0, $dGqE5$filterDOMProps)(props);
|
|
809
|
+
delete DOMProps.id;
|
|
756
810
|
let element = typeof renderProps.children === "string" ? /*#__PURE__*/ (0, $dGqE5$react).createElement("span", null, renderProps.children) : (0, $dGqE5$react).Children.only(renderProps.children);
|
|
757
811
|
return /*#__PURE__*/ (0, $dGqE5$react).cloneElement(element, {
|
|
758
812
|
ref: (0, $dGqE5$useMemo)(()=>element.ref ? (0, $dGqE5$mergeRefs)(element.ref, ref) : ref, [
|
|
@@ -760,7 +814,7 @@ function $4f118338184dc1d9$var$Link(props, ref) {
|
|
|
760
814
|
ref
|
|
761
815
|
]),
|
|
762
816
|
slot: props.slot,
|
|
763
|
-
...(0, $dGqE5$mergeProps)(renderProps, linkProps, hoverProps, focusProps, {
|
|
817
|
+
...(0, $dGqE5$mergeProps)(DOMProps, renderProps, linkProps, hoverProps, focusProps, {
|
|
764
818
|
children: element.props.children,
|
|
765
819
|
"data-hovered": isHovered || undefined,
|
|
766
820
|
"data-pressed": isPressed || undefined,
|
|
@@ -842,6 +896,17 @@ function $778035c5624f61e7$var$BreadcrumbItem({ node: node , isCurrent: isCurren
|
|
|
842
896
|
*/
|
|
843
897
|
|
|
844
898
|
|
|
899
|
+
|
|
900
|
+
const $d2b4bc8c273e7be6$var$additionalButtonHTMLAttributes = new Set([
|
|
901
|
+
"form",
|
|
902
|
+
"formAction",
|
|
903
|
+
"formEncType",
|
|
904
|
+
"formMethod",
|
|
905
|
+
"formNoValidate",
|
|
906
|
+
"formTarget",
|
|
907
|
+
"name",
|
|
908
|
+
"value"
|
|
909
|
+
]);
|
|
845
910
|
const $d2b4bc8c273e7be6$export$24d547caef80ccd1 = /*#__PURE__*/ (0, $dGqE5$createContext)({});
|
|
846
911
|
function $d2b4bc8c273e7be6$var$Button(props, ref) {
|
|
847
912
|
[props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $d2b4bc8c273e7be6$export$24d547caef80ccd1);
|
|
@@ -861,6 +926,9 @@ function $d2b4bc8c273e7be6$var$Button(props, ref) {
|
|
|
861
926
|
defaultClassName: "react-aria-Button"
|
|
862
927
|
});
|
|
863
928
|
return /*#__PURE__*/ (0, $dGqE5$react).createElement("button", {
|
|
929
|
+
...(0, $dGqE5$filterDOMProps)(props, {
|
|
930
|
+
propNames: $d2b4bc8c273e7be6$var$additionalButtonHTMLAttributes
|
|
931
|
+
}),
|
|
864
932
|
...(0, $dGqE5$mergeProps)(buttonProps, focusProps, hoverProps),
|
|
865
933
|
...renderProps,
|
|
866
934
|
ref: ref,
|
|
@@ -893,7 +961,6 @@ function $d2b4bc8c273e7be6$var$Button(props, ref) {
|
|
|
893
961
|
|
|
894
962
|
|
|
895
963
|
|
|
896
|
-
|
|
897
964
|
/*
|
|
898
965
|
* Copyright 2022 Adobe. All rights reserved.
|
|
899
966
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -1051,7 +1118,8 @@ function $dfd62f934fc76fed$var$CalendarGrid(props, ref) {
|
|
|
1051
1118
|
if (props.offset) startDate = startDate.add(props.offset);
|
|
1052
1119
|
let { gridProps: gridProps , headerProps: headerProps , weekDays: weekDays } = (0, $dGqE5$useCalendarGrid)({
|
|
1053
1120
|
startDate: startDate,
|
|
1054
|
-
endDate: (0, $dGqE5$endOfMonth)(startDate)
|
|
1121
|
+
endDate: (0, $dGqE5$endOfMonth)(startDate),
|
|
1122
|
+
weekdayStyle: props.weekdayStyle
|
|
1055
1123
|
}, state);
|
|
1056
1124
|
var _props_className;
|
|
1057
1125
|
return /*#__PURE__*/ (0, $dGqE5$react).createElement($dfd62f934fc76fed$var$InternalCalendarGridContext.Provider, {
|
|
@@ -1169,7 +1237,7 @@ function $dfd62f934fc76fed$var$CalendarCell({ date: date , ...otherProps }, ref)
|
|
|
1169
1237
|
"data-selection-end": isSelectionEnd || undefined
|
|
1170
1238
|
};
|
|
1171
1239
|
return /*#__PURE__*/ (0, $dGqE5$react).createElement("td", cellProps, /*#__PURE__*/ (0, $dGqE5$react).createElement("div", {
|
|
1172
|
-
...(0, $dGqE5$mergeProps)(buttonProps, focusProps, hoverProps, dataAttrs, renderProps),
|
|
1240
|
+
...(0, $dGqE5$mergeProps)((0, $dGqE5$filterDOMProps)(otherProps), buttonProps, focusProps, hoverProps, dataAttrs, renderProps),
|
|
1173
1241
|
ref: objectRef
|
|
1174
1242
|
}));
|
|
1175
1243
|
}
|
|
@@ -1191,6 +1259,7 @@ function $dfd62f934fc76fed$var$CalendarCell({ date: date , ...otherProps }, ref)
|
|
|
1191
1259
|
*/
|
|
1192
1260
|
|
|
1193
1261
|
|
|
1262
|
+
|
|
1194
1263
|
/*
|
|
1195
1264
|
* Copyright 2022 Adobe. All rights reserved.
|
|
1196
1265
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -1281,8 +1350,13 @@ function $bc237834342dbd75$var$Checkbox(props, ref) {
|
|
|
1281
1350
|
// Value is optional for standalone checkboxes, but required for CheckboxGroup items;
|
|
1282
1351
|
// it's passed explicitly here to avoid typescript error (requires ignore).
|
|
1283
1352
|
// @ts-ignore
|
|
1284
|
-
value: props.value
|
|
1285
|
-
|
|
1353
|
+
value: props.value,
|
|
1354
|
+
// ReactNode type doesn't allow function children.
|
|
1355
|
+
children: typeof props.children === "function" ? true : props.children
|
|
1356
|
+
}, groupState, ref) : (0, $dGqE5$useCheckbox)({
|
|
1357
|
+
...props,
|
|
1358
|
+
children: typeof props.children === "function" ? true : props.children
|
|
1359
|
+
}, (0, $dGqE5$useToggleState)(props), ref);
|
|
1286
1360
|
let { isFocused: isFocused , isFocusVisible: isFocusVisible , focusProps: focusProps } = (0, $dGqE5$useFocusRing)();
|
|
1287
1361
|
let isInteractionDisabled = isDisabled || isReadOnly;
|
|
1288
1362
|
// Handle press state for full label. Keyboard press state is returned by useCheckbox
|
|
@@ -1318,8 +1392,10 @@ function $bc237834342dbd75$var$Checkbox(props, ref) {
|
|
|
1318
1392
|
isRequired: props.isRequired || false
|
|
1319
1393
|
}
|
|
1320
1394
|
});
|
|
1395
|
+
let DOMProps = (0, $dGqE5$filterDOMProps)(props);
|
|
1396
|
+
delete DOMProps.id;
|
|
1321
1397
|
return /*#__PURE__*/ (0, $dGqE5$react).createElement("label", {
|
|
1322
|
-
...(0, $dGqE5$mergeProps)(pressProps, hoverProps, renderProps),
|
|
1398
|
+
...(0, $dGqE5$mergeProps)(DOMProps, pressProps, hoverProps, renderProps),
|
|
1323
1399
|
slot: props.slot,
|
|
1324
1400
|
"data-selected": isSelected || undefined,
|
|
1325
1401
|
"data-indeterminate": props.isIndeterminate || undefined,
|
|
@@ -1331,7 +1407,9 @@ function $bc237834342dbd75$var$Checkbox(props, ref) {
|
|
|
1331
1407
|
"data-readonly": isReadOnly || undefined,
|
|
1332
1408
|
"data-validation-state": props.validationState || (groupState === null || groupState === void 0 ? void 0 : groupState.validationState) || undefined,
|
|
1333
1409
|
"data-required": props.isRequired || undefined
|
|
1334
|
-
}, /*#__PURE__*/ (0, $dGqE5$react).createElement((0, $dGqE5$VisuallyHidden),
|
|
1410
|
+
}, /*#__PURE__*/ (0, $dGqE5$react).createElement((0, $dGqE5$VisuallyHidden), {
|
|
1411
|
+
elementType: "span"
|
|
1412
|
+
}, /*#__PURE__*/ (0, $dGqE5$react).createElement("input", {
|
|
1335
1413
|
...inputProps,
|
|
1336
1414
|
...focusProps,
|
|
1337
1415
|
ref: ref
|
|
@@ -1590,13 +1668,33 @@ function $eed445e0843c11d0$var$ListBoxPortal({ props: props , listBoxRef: listBo
|
|
|
1590
1668
|
* A listbox displays a list of options and allows a user to select one or more of them.
|
|
1591
1669
|
*/ const $eed445e0843c11d0$export$41f133550aa26f48 = /*#__PURE__*/ (0, $dGqE5$forwardRef)($eed445e0843c11d0$var$ListBox);
|
|
1592
1670
|
function $eed445e0843c11d0$var$ListBoxInner({ state: state , props: props , listBoxRef: listBoxRef }) {
|
|
1593
|
-
let { dragAndDropHooks: dragAndDropHooks } = props;
|
|
1671
|
+
let { dragAndDropHooks: dragAndDropHooks , layout: layout = "stack" , orientation: orientation = "vertical" } = props;
|
|
1594
1672
|
let { collection: collection , selectionManager: selectionManager } = state;
|
|
1595
1673
|
let isListDraggable = !!(dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.useDraggableCollectionState);
|
|
1596
1674
|
let isListDroppable = !!(dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.useDroppableCollectionState);
|
|
1675
|
+
let { direction: direction } = (0, $dGqE5$useLocale)();
|
|
1676
|
+
let { disabledBehavior: disabledBehavior , disabledKeys: disabledKeys } = selectionManager;
|
|
1677
|
+
let keyboardDelegate = (0, $dGqE5$useMemo)(()=>props.keyboardDelegate || new (0, $dGqE5$ListKeyboardDelegate)({
|
|
1678
|
+
collection: collection,
|
|
1679
|
+
ref: listBoxRef,
|
|
1680
|
+
disabledKeys: disabledBehavior === "selection" ? new Set() : disabledKeys,
|
|
1681
|
+
layout: layout,
|
|
1682
|
+
orientation: orientation,
|
|
1683
|
+
direction: direction
|
|
1684
|
+
}), [
|
|
1685
|
+
collection,
|
|
1686
|
+
listBoxRef,
|
|
1687
|
+
disabledBehavior,
|
|
1688
|
+
disabledKeys,
|
|
1689
|
+
orientation,
|
|
1690
|
+
direction,
|
|
1691
|
+
props.keyboardDelegate,
|
|
1692
|
+
layout
|
|
1693
|
+
]);
|
|
1597
1694
|
let { listBoxProps: listBoxProps } = (0, $dGqE5$useListBox)({
|
|
1598
1695
|
...props,
|
|
1599
|
-
shouldSelectOnPressUp: isListDraggable || props.shouldSelectOnPressUp
|
|
1696
|
+
shouldSelectOnPressUp: isListDraggable || props.shouldSelectOnPressUp,
|
|
1697
|
+
keyboardDelegate: keyboardDelegate
|
|
1600
1698
|
}, state, listBoxRef);
|
|
1601
1699
|
let children = (0, $7135fc7d473fd974$export$727c8fc270210f13)({
|
|
1602
1700
|
items: collection,
|
|
@@ -1619,8 +1717,13 @@ function $eed445e0843c11d0$var$ListBoxInner({ state: state , props: props , list
|
|
|
1619
1717
|
});
|
|
1620
1718
|
let dragHooksProvided = (0, $dGqE5$useRef)(isListDraggable);
|
|
1621
1719
|
let dropHooksProvided = (0, $dGqE5$useRef)(isListDroppable);
|
|
1622
|
-
|
|
1623
|
-
|
|
1720
|
+
(0, $dGqE5$useEffect)(()=>{
|
|
1721
|
+
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.");
|
|
1722
|
+
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.");
|
|
1723
|
+
}, [
|
|
1724
|
+
isListDraggable,
|
|
1725
|
+
isListDroppable
|
|
1726
|
+
]);
|
|
1624
1727
|
let dragState = undefined;
|
|
1625
1728
|
let dropState = undefined;
|
|
1626
1729
|
let droppableCollection = undefined;
|
|
@@ -1644,8 +1747,11 @@ function $eed445e0843c11d0$var$ListBoxInner({ state: state , props: props , list
|
|
|
1644
1747
|
collection: collection,
|
|
1645
1748
|
selectionManager: selectionManager
|
|
1646
1749
|
});
|
|
1647
|
-
let
|
|
1648
|
-
|
|
1750
|
+
let dropTargetDelegate = dragAndDropHooks.dropTargetDelegate || new dragAndDropHooks.ListDropTargetDelegate(collection, listBoxRef, {
|
|
1751
|
+
orientation: orientation,
|
|
1752
|
+
layout: layout,
|
|
1753
|
+
direction: direction
|
|
1754
|
+
});
|
|
1649
1755
|
droppableCollection = dragAndDropHooks.useDroppableCollection({
|
|
1650
1756
|
keyboardDelegate: keyboardDelegate,
|
|
1651
1757
|
dropTargetDelegate: dropTargetDelegate
|
|
@@ -1683,7 +1789,9 @@ function $eed445e0843c11d0$var$ListBoxInner({ state: state , props: props , list
|
|
|
1683
1789
|
"data-drop-target": isRootDropTarget || undefined,
|
|
1684
1790
|
"data-empty": state.collection.size === 0 || undefined,
|
|
1685
1791
|
"data-focused": isFocused || undefined,
|
|
1686
|
-
"data-focus-visible": isFocusVisible || undefined
|
|
1792
|
+
"data-focus-visible": isFocusVisible || undefined,
|
|
1793
|
+
"data-layout": props.layout || "stack",
|
|
1794
|
+
"data-orientation": props.orientation || "vertical"
|
|
1687
1795
|
}, /*#__PURE__*/ (0, $dGqE5$react).createElement((0, $64fa3d84918910a7$export$2881499e37b75b9a), {
|
|
1688
1796
|
values: [
|
|
1689
1797
|
[
|
|
@@ -1705,7 +1813,7 @@ function $eed445e0843c11d0$var$ListBoxInner({ state: state , props: props , list
|
|
|
1705
1813
|
[
|
|
1706
1814
|
(0, $d8f176866e6dc039$export$f55761759794cf55),
|
|
1707
1815
|
{
|
|
1708
|
-
render: $eed445e0843c11d0$var$
|
|
1816
|
+
render: $eed445e0843c11d0$var$ListBoxDropIndicatorWrapper
|
|
1709
1817
|
}
|
|
1710
1818
|
]
|
|
1711
1819
|
]
|
|
@@ -1746,11 +1854,12 @@ function $eed445e0843c11d0$var$ListBoxSection({ section: section , className: cl
|
|
|
1746
1854
|
...(0, $dGqE5$filterDOMProps)(otherProps),
|
|
1747
1855
|
...groupProps,
|
|
1748
1856
|
className: className || ((_section_props = section.props) === null || _section_props === void 0 ? void 0 : _section_props.className) || "react-aria-Section",
|
|
1749
|
-
style: style || ((_section_props1 = section.props) === null || _section_props1 === void 0 ? void 0 : _section_props1.style)
|
|
1857
|
+
style: style || ((_section_props1 = section.props) === null || _section_props1 === void 0 ? void 0 : _section_props1.style),
|
|
1858
|
+
ref: section.props.ref
|
|
1750
1859
|
}, children);
|
|
1751
1860
|
}
|
|
1752
1861
|
function $eed445e0843c11d0$var$Option({ item: item }) {
|
|
1753
|
-
let ref = (0, $dGqE5$
|
|
1862
|
+
let ref = (0, $dGqE5$useObjectRef)(item.props.ref);
|
|
1754
1863
|
let { state: state , shouldFocusOnHover: shouldFocusOnHover , dragAndDropHooks: dragAndDropHooks , dragState: dragState , dropState: dropState } = (0, $dGqE5$useContext)($eed445e0843c11d0$var$InternalListBoxContext);
|
|
1755
1864
|
let { optionProps: optionProps , labelProps: labelProps , descriptionProps: descriptionProps , ...states } = (0, $dGqE5$useOption)({
|
|
1756
1865
|
key: item.key
|
|
@@ -1804,7 +1913,7 @@ function $eed445e0843c11d0$var$Option({ item: item }) {
|
|
|
1804
1913
|
key: item.key,
|
|
1805
1914
|
dropPosition: "before"
|
|
1806
1915
|
}), /*#__PURE__*/ (0, $dGqE5$react).createElement("div", {
|
|
1807
|
-
...(0, $dGqE5$mergeProps)(optionProps, hoverProps, draggableItem === null || draggableItem === void 0 ? void 0 : draggableItem.dragProps, droppableItem === null || droppableItem === void 0 ? void 0 : droppableItem.dropProps),
|
|
1916
|
+
...(0, $dGqE5$mergeProps)((0, $dGqE5$filterDOMProps)(props), optionProps, hoverProps, draggableItem === null || draggableItem === void 0 ? void 0 : draggableItem.dragProps, droppableItem === null || droppableItem === void 0 ? void 0 : droppableItem.dropProps),
|
|
1808
1917
|
...renderProps,
|
|
1809
1918
|
ref: ref,
|
|
1810
1919
|
"data-hovered": isHovered || undefined,
|
|
@@ -1831,14 +1940,22 @@ function $eed445e0843c11d0$var$Option({ item: item }) {
|
|
|
1831
1940
|
dropPosition: "after"
|
|
1832
1941
|
}));
|
|
1833
1942
|
}
|
|
1834
|
-
function $eed445e0843c11d0$var$
|
|
1943
|
+
function $eed445e0843c11d0$var$ListBoxDropIndicatorWrapper(props, ref) {
|
|
1835
1944
|
ref = (0, $dGqE5$useObjectRef)(ref);
|
|
1836
1945
|
let { dragAndDropHooks: dragAndDropHooks , dropState: dropState } = (0, $dGqE5$useContext)($eed445e0843c11d0$var$InternalListBoxContext);
|
|
1837
1946
|
let { dropIndicatorProps: dropIndicatorProps , isHidden: isHidden , isDropTarget: isDropTarget } = dragAndDropHooks.useDropIndicator(props, dropState, ref);
|
|
1838
1947
|
if (isHidden) return null;
|
|
1839
|
-
|
|
1840
|
-
let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
1948
|
+
return /*#__PURE__*/ (0, $dGqE5$react).createElement($eed445e0843c11d0$var$ListBoxtDropIndicatorForwardRef, {
|
|
1841
1949
|
...props,
|
|
1950
|
+
dropIndicatorProps: dropIndicatorProps,
|
|
1951
|
+
isDropTarget: isDropTarget,
|
|
1952
|
+
ref: ref
|
|
1953
|
+
});
|
|
1954
|
+
}
|
|
1955
|
+
function $eed445e0843c11d0$var$ListBoxtDropIndicator(props, ref) {
|
|
1956
|
+
let { dropIndicatorProps: dropIndicatorProps , isDropTarget: isDropTarget , ...otherProps } = props;
|
|
1957
|
+
let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
1958
|
+
...otherProps,
|
|
1842
1959
|
defaultClassName: "react-aria-DropIndicator",
|
|
1843
1960
|
values: {
|
|
1844
1961
|
isDropTarget: isDropTarget
|
|
@@ -1853,6 +1970,7 @@ function $eed445e0843c11d0$var$ListBoxDropIndicator(props, ref) {
|
|
|
1853
1970
|
"data-drop-target": isDropTarget || undefined
|
|
1854
1971
|
});
|
|
1855
1972
|
}
|
|
1973
|
+
const $eed445e0843c11d0$var$ListBoxtDropIndicatorForwardRef = /*#__PURE__*/ (0, $dGqE5$forwardRef)($eed445e0843c11d0$var$ListBoxtDropIndicator);
|
|
1856
1974
|
|
|
1857
1975
|
|
|
1858
1976
|
/*
|
|
@@ -1867,6 +1985,7 @@ function $eed445e0843c11d0$var$ListBoxDropIndicator(props, ref) {
|
|
|
1867
1985
|
* governing permissions and limitations under the License.
|
|
1868
1986
|
*/
|
|
1869
1987
|
|
|
1988
|
+
|
|
1870
1989
|
/*
|
|
1871
1990
|
* Copyright 2022 Adobe. All rights reserved.
|
|
1872
1991
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -1914,17 +2033,28 @@ function $44f671af83e7d9e0$var$OverlayArrow(props, ref) {
|
|
|
1914
2033
|
|
|
1915
2034
|
|
|
1916
2035
|
|
|
2036
|
+
|
|
1917
2037
|
const $07b14b47974efb58$export$9b9a0cd73afb7ca4 = /*#__PURE__*/ (0, $dGqE5$createContext)(null);
|
|
1918
2038
|
function $07b14b47974efb58$var$Popover(props, ref) {
|
|
1919
2039
|
[props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $07b14b47974efb58$export$9b9a0cd73afb7ca4);
|
|
1920
|
-
let
|
|
2040
|
+
let ctx = props;
|
|
2041
|
+
let localState = (0, $dGqE5$useOverlayTriggerState)(props);
|
|
2042
|
+
let state = props.isOpen != null || props.defaultOpen != null || !(ctx === null || ctx === void 0 ? void 0 : ctx.state) ? localState : ctx.state;
|
|
1921
2043
|
let isExiting = (0, $64fa3d84918910a7$export$45fda7c47f93fd48)(ref, state.isOpen);
|
|
1922
|
-
if (state && !state.isOpen && !isExiting)
|
|
1923
|
-
|
|
1924
|
-
|
|
2044
|
+
if (state && !state.isOpen && !isExiting) {
|
|
2045
|
+
let children = props.children;
|
|
2046
|
+
if (typeof children === "function") children = children({
|
|
2047
|
+
placement: "bottom",
|
|
2048
|
+
isEntering: false,
|
|
2049
|
+
isExiting: false
|
|
2050
|
+
});
|
|
2051
|
+
return ctx.preserveChildren ? /*#__PURE__*/ (0, $dGqE5$react).createElement((0, $64fa3d84918910a7$export$94b6d0abf7d33e8c).Provider, {
|
|
2052
|
+
value: true
|
|
2053
|
+
}, children) : null;
|
|
2054
|
+
}
|
|
1925
2055
|
return /*#__PURE__*/ (0, $dGqE5$react).createElement($07b14b47974efb58$var$PopoverInner, {
|
|
1926
2056
|
...props,
|
|
1927
|
-
triggerRef: triggerRef,
|
|
2057
|
+
triggerRef: ctx.triggerRef,
|
|
1928
2058
|
state: state,
|
|
1929
2059
|
popoverRef: ref,
|
|
1930
2060
|
isExiting: isExiting
|
|
@@ -1933,7 +2063,7 @@ function $07b14b47974efb58$var$Popover(props, ref) {
|
|
|
1933
2063
|
/**
|
|
1934
2064
|
* A popover is an overlay element positioned relative to a trigger.
|
|
1935
2065
|
*/ const $07b14b47974efb58$export$5b6b19405a83ff9d = /*#__PURE__*/ (0, $dGqE5$forwardRef)($07b14b47974efb58$var$Popover);
|
|
1936
|
-
function $07b14b47974efb58$var$PopoverInner({
|
|
2066
|
+
function $07b14b47974efb58$var$PopoverInner({ state: state , isExiting: isExiting , ...props }) {
|
|
1937
2067
|
var _props_offset;
|
|
1938
2068
|
let { popoverProps: popoverProps , underlayProps: underlayProps , arrowProps: arrowProps , placement: placement } = (0, $dGqE5$usePopover)({
|
|
1939
2069
|
...props,
|
|
@@ -1961,7 +2091,7 @@ function $07b14b47974efb58$var$PopoverInner({ children: children , state: state
|
|
|
1961
2091
|
inset: 0
|
|
1962
2092
|
}
|
|
1963
2093
|
}), /*#__PURE__*/ (0, $dGqE5$react).createElement("div", {
|
|
1964
|
-
...popoverProps,
|
|
2094
|
+
...(0, $dGqE5$mergeProps1)((0, $dGqE5$filterDOMProps)(props), popoverProps),
|
|
1965
2095
|
...renderProps,
|
|
1966
2096
|
ref: ref,
|
|
1967
2097
|
slot: props.slot,
|
|
@@ -1976,7 +2106,7 @@ function $07b14b47974efb58$var$PopoverInner({ children: children , state: state
|
|
|
1976
2106
|
arrowProps: arrowProps,
|
|
1977
2107
|
placement: placement
|
|
1978
2108
|
}
|
|
1979
|
-
}, children), /*#__PURE__*/ (0, $dGqE5$react).createElement((0, $dGqE5$DismissButton), {
|
|
2109
|
+
}, renderProps.children), /*#__PURE__*/ (0, $dGqE5$react).createElement((0, $dGqE5$DismissButton), {
|
|
1980
2110
|
onDismiss: state.close
|
|
1981
2111
|
})));
|
|
1982
2112
|
}
|
|
@@ -2000,14 +2130,22 @@ function $d01f2c01039c0eec$var$ComboBox(props, ref) {
|
|
|
2000
2130
|
items: (_ref = (_props_items = props.items) !== null && _props_items !== void 0 ? _props_items : props.defaultItems) !== null && _ref !== void 0 ? _ref : propsFromListBox.items,
|
|
2001
2131
|
children: propsFromListBox.children
|
|
2002
2132
|
});
|
|
2003
|
-
var _props_items1;
|
|
2004
2133
|
let state = (0, $dGqE5$useComboBoxState)({
|
|
2005
2134
|
defaultFilter: props.defaultFilter || contains,
|
|
2006
2135
|
...props,
|
|
2007
|
-
|
|
2136
|
+
// If props.items isn't provided, rely on collection filtering (aka listbox.items is provided or defaultItems provided to Combobox)
|
|
2137
|
+
items: props.items,
|
|
2008
2138
|
children: undefined,
|
|
2009
2139
|
collection: collection
|
|
2010
2140
|
});
|
|
2141
|
+
// Only expose a subset of state to renderProps function to avoid infinite render loop
|
|
2142
|
+
let renderPropsState = (0, $dGqE5$useMemo)(()=>({
|
|
2143
|
+
isOpen: state.isOpen,
|
|
2144
|
+
isFocused: state.isFocused
|
|
2145
|
+
}), [
|
|
2146
|
+
state.isOpen,
|
|
2147
|
+
state.isFocused
|
|
2148
|
+
]);
|
|
2011
2149
|
let buttonRef = (0, $dGqE5$useRef)(null);
|
|
2012
2150
|
let inputRef = (0, $dGqE5$useRef)(null);
|
|
2013
2151
|
let listBoxRef = (0, $dGqE5$useRef)(null);
|
|
@@ -2043,9 +2181,11 @@ function $d01f2c01039c0eec$var$ComboBox(props, ref) {
|
|
|
2043
2181
|
});
|
|
2044
2182
|
let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
2045
2183
|
...props,
|
|
2046
|
-
values:
|
|
2184
|
+
values: renderPropsState,
|
|
2047
2185
|
defaultClassName: "react-aria-ComboBox"
|
|
2048
2186
|
});
|
|
2187
|
+
let DOMProps = (0, $dGqE5$filterDOMProps)(props);
|
|
2188
|
+
delete DOMProps.id;
|
|
2049
2189
|
return /*#__PURE__*/ (0, $dGqE5$react).createElement((0, $64fa3d84918910a7$export$2881499e37b75b9a), {
|
|
2050
2190
|
values: [
|
|
2051
2191
|
[
|
|
@@ -2104,10 +2244,13 @@ function $d01f2c01039c0eec$var$ComboBox(props, ref) {
|
|
|
2104
2244
|
]
|
|
2105
2245
|
]
|
|
2106
2246
|
}, /*#__PURE__*/ (0, $dGqE5$react).createElement("div", {
|
|
2247
|
+
...DOMProps,
|
|
2107
2248
|
...renderProps,
|
|
2108
2249
|
ref: ref,
|
|
2109
|
-
slot: props.slot
|
|
2110
|
-
|
|
2250
|
+
slot: props.slot,
|
|
2251
|
+
"data-focused": state.isFocused || undefined,
|
|
2252
|
+
"data-open": state.isOpen || undefined
|
|
2253
|
+
}), portal);
|
|
2111
2254
|
}
|
|
2112
2255
|
/**
|
|
2113
2256
|
* A combo box combines a text input with a listbox, allowing users to filter a list of options to items matching a query.
|
|
@@ -2154,6 +2297,8 @@ function $40825cdb76e74f70$var$DateField(props, ref) {
|
|
|
2154
2297
|
values: state,
|
|
2155
2298
|
defaultClassName: "react-aria-DateField"
|
|
2156
2299
|
});
|
|
2300
|
+
let DOMProps = (0, $dGqE5$filterDOMProps)(props);
|
|
2301
|
+
delete DOMProps.id;
|
|
2157
2302
|
return /*#__PURE__*/ (0, $dGqE5$react).createElement((0, $64fa3d84918910a7$export$2881499e37b75b9a), {
|
|
2158
2303
|
values: [
|
|
2159
2304
|
[
|
|
@@ -2182,10 +2327,11 @@ function $40825cdb76e74f70$var$DateField(props, ref) {
|
|
|
2182
2327
|
]
|
|
2183
2328
|
]
|
|
2184
2329
|
}, /*#__PURE__*/ (0, $dGqE5$react).createElement("div", {
|
|
2330
|
+
...DOMProps,
|
|
2185
2331
|
...renderProps,
|
|
2186
2332
|
ref: ref,
|
|
2187
2333
|
slot: props.slot
|
|
2188
|
-
}
|
|
2334
|
+
}));
|
|
2189
2335
|
}
|
|
2190
2336
|
/**
|
|
2191
2337
|
* A date field allows users to enter and edit date and time values using a keyboard.
|
|
@@ -2209,6 +2355,8 @@ function $40825cdb76e74f70$var$TimeField(props, ref) {
|
|
|
2209
2355
|
values: state,
|
|
2210
2356
|
defaultClassName: "react-aria-TimeField"
|
|
2211
2357
|
});
|
|
2358
|
+
let DOMProps = (0, $dGqE5$filterDOMProps)(props);
|
|
2359
|
+
delete DOMProps.id;
|
|
2212
2360
|
return /*#__PURE__*/ (0, $dGqE5$react).createElement((0, $64fa3d84918910a7$export$2881499e37b75b9a), {
|
|
2213
2361
|
values: [
|
|
2214
2362
|
[
|
|
@@ -2238,10 +2386,11 @@ function $40825cdb76e74f70$var$TimeField(props, ref) {
|
|
|
2238
2386
|
]
|
|
2239
2387
|
]
|
|
2240
2388
|
}, /*#__PURE__*/ (0, $dGqE5$react).createElement("div", {
|
|
2389
|
+
...DOMProps,
|
|
2241
2390
|
...renderProps,
|
|
2242
2391
|
ref: ref,
|
|
2243
2392
|
slot: props.slot
|
|
2244
|
-
}
|
|
2393
|
+
}));
|
|
2245
2394
|
}
|
|
2246
2395
|
/**
|
|
2247
2396
|
* A time field allows users to enter and edit time values using a keyboard.
|
|
@@ -2270,7 +2419,7 @@ function $40825cdb76e74f70$var$DateInput({ children: children , slot: slot , ...
|
|
|
2270
2419
|
return /*#__PURE__*/ (0, $dGqE5$react).createElement($40825cdb76e74f70$var$InternalDateInputContext.Provider, {
|
|
2271
2420
|
value: state
|
|
2272
2421
|
}, /*#__PURE__*/ (0, $dGqE5$react).createElement("div", {
|
|
2273
|
-
...(0, $dGqE5$mergeProps)(fieldProps, focusProps, hoverProps),
|
|
2422
|
+
...(0, $dGqE5$mergeProps)((0, $dGqE5$filterDOMProps)(otherProps), fieldProps, focusProps, hoverProps),
|
|
2274
2423
|
...renderProps,
|
|
2275
2424
|
ref: fieldRef,
|
|
2276
2425
|
slot: slot,
|
|
@@ -2299,7 +2448,7 @@ function $40825cdb76e74f70$var$DateSegment({ segment: segment , ...otherProps },
|
|
|
2299
2448
|
defaultClassName: "react-aria-DateSegment"
|
|
2300
2449
|
});
|
|
2301
2450
|
return /*#__PURE__*/ (0, $dGqE5$react).createElement("div", {
|
|
2302
|
-
...segmentProps,
|
|
2451
|
+
...(0, $dGqE5$mergeProps)((0, $dGqE5$filterDOMProps)(otherProps), segmentProps),
|
|
2303
2452
|
...renderProps,
|
|
2304
2453
|
ref: domRef,
|
|
2305
2454
|
"data-type": segment.type
|
|
@@ -2381,11 +2530,10 @@ function $f3f84453ead64de5$var$Modal(props, ref) {
|
|
|
2381
2530
|
/**
|
|
2382
2531
|
* A modal is an overlay element which blocks interaction with elements outside it.
|
|
2383
2532
|
*/ const $f3f84453ead64de5$export$2b77a92f1a5ad772 = /*#__PURE__*/ (0, $dGqE5$forwardRef)($f3f84453ead64de5$var$Modal);
|
|
2384
|
-
|
|
2533
|
+
function $f3f84453ead64de5$var$ModalOverlayWithForwardRef(props, ref) {
|
|
2385
2534
|
let ctx = (0, $dGqE5$useContext)($f3f84453ead64de5$export$ab57792b9b6974a6);
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
let state = (_ctx_state = ctx === null || ctx === void 0 ? void 0 : ctx.state) !== null && _ctx_state !== void 0 ? _ctx_state : (0, $dGqE5$useOverlayTriggerState)(props);
|
|
2535
|
+
let localState = (0, $dGqE5$useOverlayTriggerState)(props);
|
|
2536
|
+
let state = props.isOpen != null || props.defaultOpen != null || !(ctx === null || ctx === void 0 ? void 0 : ctx.state) ? localState : ctx.state;
|
|
2389
2537
|
let objectRef = (0, $dGqE5$useObjectRef)(ref);
|
|
2390
2538
|
let modalRef = (0, $dGqE5$useRef)(null);
|
|
2391
2539
|
let isOverlayExiting = (0, $64fa3d84918910a7$export$45fda7c47f93fd48)(objectRef, state.isOpen);
|
|
@@ -2399,7 +2547,8 @@ const $f3f84453ead64de5$export$8948f78d83984c69 = /*#__PURE__*/ (0, $dGqE5$forwa
|
|
|
2399
2547
|
overlayRef: objectRef,
|
|
2400
2548
|
modalRef: modalRef
|
|
2401
2549
|
});
|
|
2402
|
-
}
|
|
2550
|
+
}
|
|
2551
|
+
const $f3f84453ead64de5$export$8948f78d83984c69 = /*#__PURE__*/ (0, $dGqE5$forwardRef)($f3f84453ead64de5$var$ModalOverlayWithForwardRef);
|
|
2403
2552
|
function $f3f84453ead64de5$var$ModalOverlayInner(props) {
|
|
2404
2553
|
let modalRef = props.modalRef;
|
|
2405
2554
|
let { state: state } = props;
|
|
@@ -2419,7 +2568,7 @@ function $f3f84453ead64de5$var$ModalOverlayInner(props) {
|
|
|
2419
2568
|
"--visual-viewport-height": viewport.height + "px"
|
|
2420
2569
|
};
|
|
2421
2570
|
return /*#__PURE__*/ (0, $dGqE5$react).createElement((0, $dGqE5$Overlay), null, /*#__PURE__*/ (0, $dGqE5$react).createElement("div", {
|
|
2422
|
-
...underlayProps,
|
|
2571
|
+
...(0, $dGqE5$mergeProps1)((0, $dGqE5$filterDOMProps)(props), underlayProps),
|
|
2423
2572
|
...renderProps,
|
|
2424
2573
|
style: style,
|
|
2425
2574
|
ref: props.overlayRef,
|
|
@@ -2452,7 +2601,7 @@ function $f3f84453ead64de5$var$ModalContent(props) {
|
|
|
2452
2601
|
}
|
|
2453
2602
|
});
|
|
2454
2603
|
return /*#__PURE__*/ (0, $dGqE5$react).createElement("div", {
|
|
2455
|
-
...modalProps,
|
|
2604
|
+
...(0, $dGqE5$mergeProps1)((0, $dGqE5$filterDOMProps)(props), modalProps),
|
|
2456
2605
|
...renderProps,
|
|
2457
2606
|
ref: ref,
|
|
2458
2607
|
"data-entering": entering || undefined,
|
|
@@ -2543,6 +2692,7 @@ function $de32f1b87079253c$var$Dialog(props, ref) {
|
|
|
2543
2692
|
*/ const $de32f1b87079253c$export$3ddf2d174ce01153 = /*#__PURE__*/ (0, $dGqE5$forwardRef)($de32f1b87079253c$var$Dialog);
|
|
2544
2693
|
|
|
2545
2694
|
|
|
2695
|
+
|
|
2546
2696
|
/*
|
|
2547
2697
|
* Copyright 2022 Adobe. All rights reserved.
|
|
2548
2698
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -2616,6 +2766,8 @@ function $06d5b8ec9ee5d538$var$DatePicker(props, ref) {
|
|
|
2616
2766
|
values: state,
|
|
2617
2767
|
defaultClassName: "react-aria-DatePicker"
|
|
2618
2768
|
});
|
|
2769
|
+
let DOMProps = (0, $dGqE5$filterDOMProps)(props);
|
|
2770
|
+
delete DOMProps.id;
|
|
2619
2771
|
return /*#__PURE__*/ (0, $dGqE5$react).createElement((0, $64fa3d84918910a7$export$2881499e37b75b9a), {
|
|
2620
2772
|
values: [
|
|
2621
2773
|
[
|
|
@@ -2675,10 +2827,11 @@ function $06d5b8ec9ee5d538$var$DatePicker(props, ref) {
|
|
|
2675
2827
|
]
|
|
2676
2828
|
]
|
|
2677
2829
|
}, /*#__PURE__*/ (0, $dGqE5$react).createElement("div", {
|
|
2830
|
+
...DOMProps,
|
|
2678
2831
|
...renderProps,
|
|
2679
2832
|
ref: ref,
|
|
2680
2833
|
slot: props.slot
|
|
2681
|
-
}
|
|
2834
|
+
}));
|
|
2682
2835
|
}
|
|
2683
2836
|
/**
|
|
2684
2837
|
* A date picker combines a DateField and a Calendar popover to allow users to enter or select a date and time value.
|
|
@@ -2718,6 +2871,8 @@ function $06d5b8ec9ee5d538$var$DateRangePicker(props, ref) {
|
|
|
2718
2871
|
values: state,
|
|
2719
2872
|
defaultClassName: "react-aria-DateRangePicker"
|
|
2720
2873
|
});
|
|
2874
|
+
let DOMProps = (0, $dGqE5$filterDOMProps)(props);
|
|
2875
|
+
delete DOMProps.id;
|
|
2721
2876
|
return /*#__PURE__*/ (0, $dGqE5$react).createElement((0, $64fa3d84918910a7$export$2881499e37b75b9a), {
|
|
2722
2877
|
values: [
|
|
2723
2878
|
[
|
|
@@ -2786,10 +2941,11 @@ function $06d5b8ec9ee5d538$var$DateRangePicker(props, ref) {
|
|
|
2786
2941
|
]
|
|
2787
2942
|
]
|
|
2788
2943
|
}, /*#__PURE__*/ (0, $dGqE5$react).createElement("div", {
|
|
2944
|
+
...DOMProps,
|
|
2789
2945
|
...renderProps,
|
|
2790
2946
|
ref: ref,
|
|
2791
2947
|
slot: props.slot
|
|
2792
|
-
}
|
|
2948
|
+
}));
|
|
2793
2949
|
}
|
|
2794
2950
|
/**
|
|
2795
2951
|
* A date range picker combines two DateFields and a RangeCalendar popover to allow
|
|
@@ -2798,6 +2954,148 @@ function $06d5b8ec9ee5d538$var$DateRangePicker(props, ref) {
|
|
|
2798
2954
|
|
|
2799
2955
|
|
|
2800
2956
|
|
|
2957
|
+
/*
|
|
2958
|
+
* Copyright 2023 Adobe. All rights reserved.
|
|
2959
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
2960
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
2961
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
2962
|
+
*
|
|
2963
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
2964
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
2965
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
2966
|
+
* governing permissions and limitations under the License.
|
|
2967
|
+
*/
|
|
2968
|
+
|
|
2969
|
+
/*
|
|
2970
|
+
* Copyright 2023 Adobe. All rights reserved.
|
|
2971
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
2972
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
2973
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
2974
|
+
*
|
|
2975
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
2976
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
2977
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
2978
|
+
* governing permissions and limitations under the License.
|
|
2979
|
+
*/
|
|
2980
|
+
|
|
2981
|
+
|
|
2982
|
+
|
|
2983
|
+
|
|
2984
|
+
const $1e2864c73f66a4da$export$9106743a055caed1 = /*#__PURE__*/ (0, $dGqE5$createContext)(null);
|
|
2985
|
+
function $1e2864c73f66a4da$var$FileTrigger(props, ref) {
|
|
2986
|
+
[props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $1e2864c73f66a4da$export$9106743a055caed1);
|
|
2987
|
+
let { onChange: onChange , acceptedFileTypes: acceptedFileTypes , className: className , allowsMultiple: allowsMultiple , defaultCamera: defaultCamera , children: children , ...otherProps } = props;
|
|
2988
|
+
let inputRef = (0, $dGqE5$useRef)(null);
|
|
2989
|
+
return /*#__PURE__*/ (0, $dGqE5$react).createElement("div", {
|
|
2990
|
+
className: className || "react-aria-FileTrigger",
|
|
2991
|
+
...(0, $dGqE5$filterDOMProps)(otherProps),
|
|
2992
|
+
ref: ref,
|
|
2993
|
+
slot: props.slot
|
|
2994
|
+
}, /*#__PURE__*/ (0, $dGqE5$react).createElement((0, $dGqE5$PressResponder), {
|
|
2995
|
+
onPress: ()=>{
|
|
2996
|
+
var _inputRef_current;
|
|
2997
|
+
return (_inputRef_current = inputRef.current) === null || _inputRef_current === void 0 ? void 0 : _inputRef_current.click();
|
|
2998
|
+
}
|
|
2999
|
+
}, children), /*#__PURE__*/ (0, $dGqE5$react).createElement((0, $3985021b0ad6602f$export$f5b8910cec6cf069), {
|
|
3000
|
+
type: "file",
|
|
3001
|
+
ref: inputRef,
|
|
3002
|
+
style: {
|
|
3003
|
+
display: "none"
|
|
3004
|
+
},
|
|
3005
|
+
accept: acceptedFileTypes === null || acceptedFileTypes === void 0 ? void 0 : acceptedFileTypes.toString(),
|
|
3006
|
+
onChange: (e)=>{
|
|
3007
|
+
return onChange === null || onChange === void 0 ? void 0 : onChange(e.target.files);
|
|
3008
|
+
},
|
|
3009
|
+
capture: defaultCamera,
|
|
3010
|
+
multiple: allowsMultiple
|
|
3011
|
+
}));
|
|
3012
|
+
}
|
|
3013
|
+
/**
|
|
3014
|
+
* A FileTrigger allows a user to access the file system with either a Button or Link.
|
|
3015
|
+
*/ const $1e2864c73f66a4da$export$6fb4a10d2c950550 = /*#__PURE__*/ (0, $dGqE5$forwardRef)($1e2864c73f66a4da$var$FileTrigger);
|
|
3016
|
+
|
|
3017
|
+
|
|
3018
|
+
|
|
3019
|
+
|
|
3020
|
+
|
|
3021
|
+
const $cb088e721efb9218$export$14a72053295ff9a6 = /*#__PURE__*/ (0, $dGqE5$createContext)(null);
|
|
3022
|
+
function $cb088e721efb9218$var$DropZone(props, ref) {
|
|
3023
|
+
[props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $cb088e721efb9218$export$14a72053295ff9a6);
|
|
3024
|
+
let buttonRef = (0, $dGqE5$useRef)(null);
|
|
3025
|
+
let { dropProps: dropProps , dropButtonProps: dropButtonProps , isDropTarget: isDropTarget } = (0, $dGqE5$useDrop)({
|
|
3026
|
+
...props,
|
|
3027
|
+
ref: buttonRef,
|
|
3028
|
+
hasDropButton: true
|
|
3029
|
+
});
|
|
3030
|
+
let { hoverProps: hoverProps , isHovered: isHovered } = (0, $dGqE5$useHover)({});
|
|
3031
|
+
let { focusProps: focusProps , isFocused: isFocused , isFocusVisible: isFocusVisible } = (0, $dGqE5$useFocusRing)();
|
|
3032
|
+
let textId = (0, $dGqE5$useId)();
|
|
3033
|
+
let labelProps = (0, $dGqE5$useLabels)({
|
|
3034
|
+
"aria-labelledby": textId
|
|
3035
|
+
});
|
|
3036
|
+
let { clipboardProps: clipboardProps } = (0, $dGqE5$useClipboard)({
|
|
3037
|
+
onPaste: (items)=>{
|
|
3038
|
+
var _props_onDrop;
|
|
3039
|
+
return (_props_onDrop = props.onDrop) === null || _props_onDrop === void 0 ? void 0 : _props_onDrop.call(props, {
|
|
3040
|
+
type: "drop",
|
|
3041
|
+
items: items,
|
|
3042
|
+
x: 0,
|
|
3043
|
+
y: 0,
|
|
3044
|
+
dropOperation: "copy"
|
|
3045
|
+
});
|
|
3046
|
+
}
|
|
3047
|
+
});
|
|
3048
|
+
let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
3049
|
+
...props,
|
|
3050
|
+
values: {
|
|
3051
|
+
isHovered: isHovered,
|
|
3052
|
+
isFocused: isFocused,
|
|
3053
|
+
isFocusVisible: isFocusVisible,
|
|
3054
|
+
isDropTarget: isDropTarget
|
|
3055
|
+
},
|
|
3056
|
+
defaultClassName: "react-aria-DropZone"
|
|
3057
|
+
});
|
|
3058
|
+
let DOMProps = (0, $dGqE5$filterDOMProps)(props);
|
|
3059
|
+
delete DOMProps.id;
|
|
3060
|
+
return /*#__PURE__*/ (0, $dGqE5$react).createElement((0, $64fa3d84918910a7$export$2881499e37b75b9a), {
|
|
3061
|
+
values: [
|
|
3062
|
+
[
|
|
3063
|
+
(0, $1e2864c73f66a4da$export$9106743a055caed1),
|
|
3064
|
+
{}
|
|
3065
|
+
],
|
|
3066
|
+
[
|
|
3067
|
+
(0, $514c0188e459b4c0$export$9afb8bc826b033ea),
|
|
3068
|
+
{
|
|
3069
|
+
id: textId,
|
|
3070
|
+
slot: "heading"
|
|
3071
|
+
}
|
|
3072
|
+
]
|
|
3073
|
+
]
|
|
3074
|
+
}, /*#__PURE__*/ (0, $dGqE5$react).createElement("div", {
|
|
3075
|
+
...(0, $dGqE5$mergeProps)(dropProps, hoverProps, DOMProps),
|
|
3076
|
+
...renderProps,
|
|
3077
|
+
slot: props.slot,
|
|
3078
|
+
onClick: ()=>{
|
|
3079
|
+
var _buttonRef_current;
|
|
3080
|
+
return (_buttonRef_current = buttonRef.current) === null || _buttonRef_current === void 0 ? void 0 : _buttonRef_current.focus();
|
|
3081
|
+
},
|
|
3082
|
+
"data-hovered": isHovered || undefined,
|
|
3083
|
+
"data-focused": isFocused || undefined,
|
|
3084
|
+
"data-focus-visible": isFocusVisible || undefined,
|
|
3085
|
+
"data-drop-target": isDropTarget || undefined
|
|
3086
|
+
}, /*#__PURE__*/ (0, $dGqE5$react).createElement((0, $dGqE5$VisuallyHidden), null, /*#__PURE__*/ (0, $dGqE5$react).createElement("button", {
|
|
3087
|
+
...(0, $dGqE5$mergeProps)(dropButtonProps, focusProps, clipboardProps, labelProps),
|
|
3088
|
+
"aria-label": "DropZone" // will need to update with string formatter
|
|
3089
|
+
,
|
|
3090
|
+
ref: buttonRef
|
|
3091
|
+
})), renderProps.children));
|
|
3092
|
+
}
|
|
3093
|
+
/**
|
|
3094
|
+
* A dropzone is an area into which one or multiple objects can be dragged and dropped.
|
|
3095
|
+
*/ const $cb088e721efb9218$export$3c6489d84dc98b6 = /*#__PURE__*/ (0, $dGqE5$forwardRef)($cb088e721efb9218$var$DropZone);
|
|
3096
|
+
|
|
3097
|
+
|
|
3098
|
+
|
|
2801
3099
|
/*
|
|
2802
3100
|
* Copyright 2022 Adobe. All rights reserved.
|
|
2803
3101
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -2848,8 +3146,13 @@ function $72e60046c03fbe42$var$GridList(props, ref) {
|
|
|
2848
3146
|
let isListDroppable = !!(dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.useDroppableCollectionState);
|
|
2849
3147
|
let dragHooksProvided = (0, $dGqE5$useRef)(isListDraggable);
|
|
2850
3148
|
let dropHooksProvided = (0, $dGqE5$useRef)(isListDroppable);
|
|
2851
|
-
|
|
2852
|
-
|
|
3149
|
+
(0, $dGqE5$useEffect)(()=>{
|
|
3150
|
+
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.");
|
|
3151
|
+
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.");
|
|
3152
|
+
}, [
|
|
3153
|
+
isListDraggable,
|
|
3154
|
+
isListDroppable
|
|
3155
|
+
]);
|
|
2853
3156
|
let dragState = undefined;
|
|
2854
3157
|
let dropState = undefined;
|
|
2855
3158
|
let droppableCollection = undefined;
|
|
@@ -2949,7 +3252,7 @@ function $72e60046c03fbe42$var$GridList(props, ref) {
|
|
|
2949
3252
|
[
|
|
2950
3253
|
(0, $d8f176866e6dc039$export$f55761759794cf55),
|
|
2951
3254
|
{
|
|
2952
|
-
render: $72e60046c03fbe42$var$
|
|
3255
|
+
render: $72e60046c03fbe42$var$GridListDropIndicatorWrapper
|
|
2953
3256
|
}
|
|
2954
3257
|
]
|
|
2955
3258
|
]
|
|
@@ -2961,7 +3264,7 @@ function $72e60046c03fbe42$var$GridList(props, ref) {
|
|
|
2961
3264
|
*/ const $72e60046c03fbe42$export$a7bfbda1311ca015 = /*#__PURE__*/ (0, $dGqE5$forwardRef)($72e60046c03fbe42$var$GridList);
|
|
2962
3265
|
function $72e60046c03fbe42$var$GridListItem({ item: item }) {
|
|
2963
3266
|
let { state: state , dragAndDropHooks: dragAndDropHooks , dragState: dragState , dropState: dropState } = (0, $dGqE5$useContext)($72e60046c03fbe42$var$InternalGridListContext);
|
|
2964
|
-
let ref = (0, $dGqE5$
|
|
3267
|
+
let ref = (0, $dGqE5$useObjectRef)(item.props.ref);
|
|
2965
3268
|
let { rowProps: rowProps , gridCellProps: gridCellProps , descriptionProps: descriptionProps , ...states } = (0, $dGqE5$useGridListItem)({
|
|
2966
3269
|
node: item,
|
|
2967
3270
|
shouldSelectOnPressUp: !!dragState
|
|
@@ -3036,7 +3339,7 @@ function $72e60046c03fbe42$var$GridListItem({ item: item }) {
|
|
|
3036
3339
|
...dropIndicator === null || dropIndicator === void 0 ? void 0 : dropIndicator.dropIndicatorProps,
|
|
3037
3340
|
ref: dropIndicatorRef
|
|
3038
3341
|
}))), /*#__PURE__*/ (0, $dGqE5$react).createElement("div", {
|
|
3039
|
-
...(0, $dGqE5$mergeProps)(rowProps, focusProps, hoverProps, draggableItem === null || draggableItem === void 0 ? void 0 : draggableItem.dragProps),
|
|
3342
|
+
...(0, $dGqE5$mergeProps)((0, $dGqE5$filterDOMProps)(props), rowProps, focusProps, hoverProps, draggableItem === null || draggableItem === void 0 ? void 0 : draggableItem.dragProps),
|
|
3040
3343
|
...renderProps,
|
|
3041
3344
|
ref: ref,
|
|
3042
3345
|
"data-hovered": isHovered || undefined,
|
|
@@ -3081,16 +3384,25 @@ function $72e60046c03fbe42$var$GridListItem({ item: item }) {
|
|
|
3081
3384
|
dropPosition: "after"
|
|
3082
3385
|
}));
|
|
3083
3386
|
}
|
|
3084
|
-
function $72e60046c03fbe42$var$
|
|
3387
|
+
function $72e60046c03fbe42$var$GridListDropIndicatorWrapper(props, ref) {
|
|
3085
3388
|
ref = (0, $dGqE5$useObjectRef)(ref);
|
|
3086
3389
|
let { dragAndDropHooks: dragAndDropHooks , dropState: dropState } = (0, $dGqE5$useContext)($72e60046c03fbe42$var$InternalGridListContext);
|
|
3087
3390
|
let buttonRef = (0, $dGqE5$useRef)(null);
|
|
3088
3391
|
let { dropIndicatorProps: dropIndicatorProps , isHidden: isHidden , isDropTarget: isDropTarget } = dragAndDropHooks.useDropIndicator(props, dropState, buttonRef);
|
|
3089
|
-
let { visuallyHiddenProps: visuallyHiddenProps } = (0, $dGqE5$useVisuallyHidden)();
|
|
3090
3392
|
if (isHidden) return null;
|
|
3091
|
-
|
|
3092
|
-
let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
3393
|
+
return /*#__PURE__*/ (0, $dGqE5$react).createElement($72e60046c03fbe42$var$GridListDropIndicatorForwardRef, {
|
|
3093
3394
|
...props,
|
|
3395
|
+
dropIndicatorProps: dropIndicatorProps,
|
|
3396
|
+
isDropTarget: isDropTarget,
|
|
3397
|
+
buttonRef: buttonRef,
|
|
3398
|
+
ref: ref
|
|
3399
|
+
});
|
|
3400
|
+
}
|
|
3401
|
+
function $72e60046c03fbe42$var$GridListDropIndicator(props, ref) {
|
|
3402
|
+
let { dropIndicatorProps: dropIndicatorProps , isDropTarget: isDropTarget , buttonRef: buttonRef , ...otherProps } = props;
|
|
3403
|
+
let { visuallyHiddenProps: visuallyHiddenProps } = (0, $dGqE5$useVisuallyHidden)();
|
|
3404
|
+
let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
3405
|
+
...otherProps,
|
|
3094
3406
|
defaultClassName: "react-aria-DropIndicator",
|
|
3095
3407
|
values: {
|
|
3096
3408
|
isDropTarget: isDropTarget
|
|
@@ -3110,6 +3422,7 @@ function $72e60046c03fbe42$var$GridListDropIndicator(props, ref) {
|
|
|
3110
3422
|
ref: buttonRef
|
|
3111
3423
|
})));
|
|
3112
3424
|
}
|
|
3425
|
+
const $72e60046c03fbe42$var$GridListDropIndicatorForwardRef = /*#__PURE__*/ (0, $dGqE5$forwardRef)($72e60046c03fbe42$var$GridListDropIndicator);
|
|
3113
3426
|
function $72e60046c03fbe42$var$RootDropIndicator() {
|
|
3114
3427
|
let { dragAndDropHooks: dragAndDropHooks , dropState: dropState } = (0, $dGqE5$useContext)($72e60046c03fbe42$var$InternalGridListContext);
|
|
3115
3428
|
let ref = (0, $dGqE5$useRef)(null);
|
|
@@ -3325,12 +3638,13 @@ function $3674c52c6b3c5bce$var$MenuSection({ section: section , className: class
|
|
|
3325
3638
|
...(0, $dGqE5$filterDOMProps)(otherProps),
|
|
3326
3639
|
...groupProps,
|
|
3327
3640
|
className: className || ((_section_props = section.props) === null || _section_props === void 0 ? void 0 : _section_props.className) || "react-aria-Section",
|
|
3328
|
-
style: style || ((_section_props1 = section.props) === null || _section_props1 === void 0 ? void 0 : _section_props1.style)
|
|
3641
|
+
style: style || ((_section_props1 = section.props) === null || _section_props1 === void 0 ? void 0 : _section_props1.style),
|
|
3642
|
+
ref: section.props.ref
|
|
3329
3643
|
}, children);
|
|
3330
3644
|
}
|
|
3331
3645
|
function $3674c52c6b3c5bce$var$MenuItem({ item: item }) {
|
|
3332
3646
|
let state = (0, $dGqE5$useContext)($3674c52c6b3c5bce$var$InternalMenuContext);
|
|
3333
|
-
let ref = (0, $dGqE5$
|
|
3647
|
+
let ref = (0, $dGqE5$useObjectRef)(item.props.ref);
|
|
3334
3648
|
let { menuItemProps: menuItemProps , labelProps: labelProps , descriptionProps: descriptionProps , keyboardShortcutProps: keyboardShortcutProps , ...states } = (0, $dGqE5$useMenuItem)({
|
|
3335
3649
|
key: item.key
|
|
3336
3650
|
}, state, ref);
|
|
@@ -3349,8 +3663,10 @@ function $3674c52c6b3c5bce$var$MenuItem({ item: item }) {
|
|
|
3349
3663
|
selectionBehavior: state.selectionManager.selectionBehavior
|
|
3350
3664
|
}
|
|
3351
3665
|
});
|
|
3666
|
+
let DOMProps = (0, $dGqE5$filterDOMProps)(props);
|
|
3667
|
+
delete DOMProps.id;
|
|
3352
3668
|
return /*#__PURE__*/ (0, $dGqE5$react).createElement("div", {
|
|
3353
|
-
...(0, $dGqE5$mergeProps)(menuItemProps, focusProps),
|
|
3669
|
+
...(0, $dGqE5$mergeProps)(DOMProps, menuItemProps, focusProps),
|
|
3354
3670
|
...renderProps,
|
|
3355
3671
|
ref: ref,
|
|
3356
3672
|
"data-hovered": states.isFocused || undefined,
|
|
@@ -3448,6 +3764,7 @@ function $c0c9ced265f3594c$var$Meter(props, ref) {
|
|
|
3448
3764
|
|
|
3449
3765
|
|
|
3450
3766
|
|
|
3767
|
+
|
|
3451
3768
|
const $b91743d66a0ed188$export$b414a48cf5dcbc11 = /*#__PURE__*/ (0, $dGqE5$createContext)(null);
|
|
3452
3769
|
function $b91743d66a0ed188$var$NumberField(props, ref) {
|
|
3453
3770
|
[props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $b91743d66a0ed188$export$b414a48cf5dcbc11);
|
|
@@ -3467,6 +3784,8 @@ function $b91743d66a0ed188$var$NumberField(props, ref) {
|
|
|
3467
3784
|
values: state,
|
|
3468
3785
|
defaultClassName: "react-aria-NumberField"
|
|
3469
3786
|
});
|
|
3787
|
+
let DOMProps = (0, $dGqE5$filterDOMProps)(props);
|
|
3788
|
+
delete DOMProps.id;
|
|
3470
3789
|
return /*#__PURE__*/ (0, $dGqE5$react).createElement((0, $64fa3d84918910a7$export$2881499e37b75b9a), {
|
|
3471
3790
|
values: [
|
|
3472
3791
|
[
|
|
@@ -3507,10 +3826,11 @@ function $b91743d66a0ed188$var$NumberField(props, ref) {
|
|
|
3507
3826
|
]
|
|
3508
3827
|
]
|
|
3509
3828
|
}, /*#__PURE__*/ (0, $dGqE5$react).createElement("div", {
|
|
3829
|
+
...DOMProps,
|
|
3510
3830
|
...renderProps,
|
|
3511
3831
|
ref: ref,
|
|
3512
3832
|
slot: props.slot
|
|
3513
|
-
}
|
|
3833
|
+
}));
|
|
3514
3834
|
}
|
|
3515
3835
|
/**
|
|
3516
3836
|
* A number field allows a user to enter a number, and increment or decrement the value using stepper buttons.
|
|
@@ -3644,7 +3964,11 @@ function $b6c3ddc6086f204d$var$RadioGroup(props, ref) {
|
|
|
3644
3964
|
function $b6c3ddc6086f204d$var$Radio(props, ref) {
|
|
3645
3965
|
let state = (0, $dGqE5$react).useContext($b6c3ddc6086f204d$var$InternalRadioContext);
|
|
3646
3966
|
let domRef = (0, $dGqE5$useObjectRef)(ref);
|
|
3647
|
-
let { inputProps: inputProps , isSelected: isSelected , isDisabled: isDisabled , isPressed: isPressedKeyboard } = (0, $dGqE5$useRadio)(
|
|
3967
|
+
let { inputProps: inputProps , isSelected: isSelected , isDisabled: isDisabled , isPressed: isPressedKeyboard } = (0, $dGqE5$useRadio)({
|
|
3968
|
+
...props,
|
|
3969
|
+
// ReactNode type doesn't allow function children.
|
|
3970
|
+
children: typeof props.children === "function" ? true : props.children
|
|
3971
|
+
}, state, domRef);
|
|
3648
3972
|
let { isFocused: isFocused , isFocusVisible: isFocusVisible , focusProps: focusProps } = (0, $dGqE5$useFocusRing)();
|
|
3649
3973
|
let interactionDisabled = isDisabled || state.isReadOnly;
|
|
3650
3974
|
// Handle press state for full label. Keyboard press state is returned by useCheckbox
|
|
@@ -3678,8 +4002,10 @@ function $b6c3ddc6086f204d$var$Radio(props, ref) {
|
|
|
3678
4002
|
isRequired: state.isRequired
|
|
3679
4003
|
}
|
|
3680
4004
|
});
|
|
4005
|
+
let DOMProps = (0, $dGqE5$filterDOMProps)(props);
|
|
4006
|
+
delete DOMProps.id;
|
|
3681
4007
|
return /*#__PURE__*/ (0, $dGqE5$react).createElement("label", {
|
|
3682
|
-
...(0, $dGqE5$mergeProps1)(pressProps, hoverProps, renderProps),
|
|
4008
|
+
...(0, $dGqE5$mergeProps1)(DOMProps, pressProps, hoverProps, renderProps),
|
|
3683
4009
|
"data-selected": isSelected || undefined,
|
|
3684
4010
|
"data-pressed": pressed || undefined,
|
|
3685
4011
|
"data-hovered": isHovered || undefined,
|
|
@@ -3689,7 +4015,9 @@ function $b6c3ddc6086f204d$var$Radio(props, ref) {
|
|
|
3689
4015
|
"data-readonly": state.isReadOnly || undefined,
|
|
3690
4016
|
"data-validation-state": state.validationState || undefined,
|
|
3691
4017
|
"data-required": state.isRequired || undefined
|
|
3692
|
-
}, /*#__PURE__*/ (0, $dGqE5$react).createElement((0, $dGqE5$VisuallyHidden),
|
|
4018
|
+
}, /*#__PURE__*/ (0, $dGqE5$react).createElement((0, $dGqE5$VisuallyHidden), {
|
|
4019
|
+
elementType: "span"
|
|
4020
|
+
}, /*#__PURE__*/ (0, $dGqE5$react).createElement("input", {
|
|
3693
4021
|
...inputProps,
|
|
3694
4022
|
...focusProps,
|
|
3695
4023
|
ref: domRef
|
|
@@ -3721,6 +4049,7 @@ function $b6c3ddc6086f204d$var$Radio(props, ref) {
|
|
|
3721
4049
|
|
|
3722
4050
|
|
|
3723
4051
|
|
|
4052
|
+
|
|
3724
4053
|
const $440f4836bcb56932$export$d1c4e4c63cb03a11 = /*#__PURE__*/ (0, $dGqE5$createContext)(null);
|
|
3725
4054
|
function $440f4836bcb56932$var$SearchField(props, ref) {
|
|
3726
4055
|
[props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $440f4836bcb56932$export$d1c4e4c63cb03a11);
|
|
@@ -3736,7 +4065,10 @@ function $440f4836bcb56932$var$SearchField(props, ref) {
|
|
|
3736
4065
|
values: state,
|
|
3737
4066
|
defaultClassName: "react-aria-SearchField"
|
|
3738
4067
|
});
|
|
4068
|
+
let DOMProps = (0, $dGqE5$filterDOMProps)(props);
|
|
4069
|
+
delete DOMProps.id;
|
|
3739
4070
|
return /*#__PURE__*/ (0, $dGqE5$react).createElement("div", {
|
|
4071
|
+
...DOMProps,
|
|
3740
4072
|
...renderProps,
|
|
3741
4073
|
ref: ref,
|
|
3742
4074
|
slot: props.slot,
|
|
@@ -3799,7 +4131,6 @@ function $440f4836bcb56932$var$SearchField(props, ref) {
|
|
|
3799
4131
|
|
|
3800
4132
|
|
|
3801
4133
|
|
|
3802
|
-
|
|
3803
4134
|
const $82d7e5349645de74$export$7540cee5be7dc19b = /*#__PURE__*/ (0, $dGqE5$createContext)(null);
|
|
3804
4135
|
const $82d7e5349645de74$var$InternalSelectContext = /*#__PURE__*/ (0, $dGqE5$createContext)(null);
|
|
3805
4136
|
function $82d7e5349645de74$var$Select(props, ref) {
|
|
@@ -3817,6 +4148,14 @@ function $82d7e5349645de74$var$Select(props, ref) {
|
|
|
3817
4148
|
collection: collection,
|
|
3818
4149
|
children: undefined
|
|
3819
4150
|
});
|
|
4151
|
+
// Only expose a subset of state to renderProps function to avoid infinite render loop
|
|
4152
|
+
let renderPropsState = (0, $dGqE5$useMemo)(()=>({
|
|
4153
|
+
isOpen: state.isOpen,
|
|
4154
|
+
isFocused: state.isFocused
|
|
4155
|
+
}), [
|
|
4156
|
+
state.isOpen,
|
|
4157
|
+
state.isFocused
|
|
4158
|
+
]);
|
|
3820
4159
|
// Get props for child elements from useSelect
|
|
3821
4160
|
let buttonRef = (0, $dGqE5$useRef)(null);
|
|
3822
4161
|
let [labelRef, label] = (0, $64fa3d84918910a7$export$9d4c57ee4c6ffdd8)();
|
|
@@ -3837,16 +4176,19 @@ function $82d7e5349645de74$var$Select(props, ref) {
|
|
|
3837
4176
|
});
|
|
3838
4177
|
let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
3839
4178
|
...props,
|
|
3840
|
-
values:
|
|
4179
|
+
values: renderPropsState,
|
|
3841
4180
|
defaultClassName: "react-aria-Select"
|
|
3842
4181
|
});
|
|
4182
|
+
let DOMProps = (0, $dGqE5$filterDOMProps)(props);
|
|
4183
|
+
delete DOMProps.id;
|
|
3843
4184
|
return /*#__PURE__*/ (0, $dGqE5$react).createElement((0, $64fa3d84918910a7$export$2881499e37b75b9a), {
|
|
3844
4185
|
values: [
|
|
3845
4186
|
[
|
|
3846
4187
|
$82d7e5349645de74$var$InternalSelectContext,
|
|
3847
4188
|
{
|
|
3848
4189
|
state: state,
|
|
3849
|
-
valueProps: valueProps
|
|
4190
|
+
valueProps: valueProps,
|
|
4191
|
+
placeholder: props.placeholder
|
|
3850
4192
|
}
|
|
3851
4193
|
],
|
|
3852
4194
|
[
|
|
@@ -3896,10 +4238,13 @@ function $82d7e5349645de74$var$Select(props, ref) {
|
|
|
3896
4238
|
]
|
|
3897
4239
|
]
|
|
3898
4240
|
}, /*#__PURE__*/ (0, $dGqE5$react).createElement("div", {
|
|
4241
|
+
...DOMProps,
|
|
3899
4242
|
...renderProps,
|
|
3900
4243
|
ref: ref,
|
|
3901
|
-
slot: props.slot
|
|
3902
|
-
|
|
4244
|
+
slot: props.slot,
|
|
4245
|
+
"data-focused": state.isFocused || undefined,
|
|
4246
|
+
"data-open": state.isOpen || undefined
|
|
4247
|
+
}), portal, /*#__PURE__*/ (0, $dGqE5$react).createElement((0, $dGqE5$HiddenSelect), {
|
|
3903
4248
|
state: state,
|
|
3904
4249
|
triggerRef: buttonRef,
|
|
3905
4250
|
label: label,
|
|
@@ -3911,7 +4256,7 @@ function $82d7e5349645de74$var$Select(props, ref) {
|
|
|
3911
4256
|
*/ const $82d7e5349645de74$export$ef9b1a59e592288f = /*#__PURE__*/ (0, $dGqE5$forwardRef)($82d7e5349645de74$var$Select);
|
|
3912
4257
|
function $82d7e5349645de74$var$SelectValue(props, ref) {
|
|
3913
4258
|
var _state_selectedItem, _state_selectedItem1, _state_selectedItem2;
|
|
3914
|
-
let { state: state , valueProps: valueProps } = (0, $dGqE5$useContext)($82d7e5349645de74$var$InternalSelectContext);
|
|
4259
|
+
let { state: state , valueProps: valueProps , placeholder: placeholder } = (0, $dGqE5$useContext)($82d7e5349645de74$var$InternalSelectContext);
|
|
3915
4260
|
let rendered = (_state_selectedItem = state.selectedItem) === null || _state_selectedItem === void 0 ? void 0 : _state_selectedItem.rendered;
|
|
3916
4261
|
if (typeof rendered === "function") {
|
|
3917
4262
|
// If the selected item has a function as a child, we need to call it to render to JSX.
|
|
@@ -3931,7 +4276,7 @@ function $82d7e5349645de74$var$SelectValue(props, ref) {
|
|
|
3931
4276
|
let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
3932
4277
|
...props,
|
|
3933
4278
|
// TODO: localize this.
|
|
3934
|
-
defaultChildren: rendered || "Select an item",
|
|
4279
|
+
defaultChildren: rendered || placeholder || "Select an item",
|
|
3935
4280
|
defaultClassName: "react-aria-SelectValue",
|
|
3936
4281
|
values: {
|
|
3937
4282
|
selectedItem: (_state_selectedItem_value = (_state_selectedItem1 = state.selectedItem) === null || _state_selectedItem1 === void 0 ? void 0 : _state_selectedItem1.value) !== null && _state_selectedItem_value !== void 0 ? _state_selectedItem_value : null,
|
|
@@ -3939,8 +4284,11 @@ function $82d7e5349645de74$var$SelectValue(props, ref) {
|
|
|
3939
4284
|
isPlaceholder: !state.selectedItem
|
|
3940
4285
|
}
|
|
3941
4286
|
});
|
|
4287
|
+
let DOMProps = (0, $dGqE5$filterDOMProps)(props);
|
|
4288
|
+
delete DOMProps.id;
|
|
3942
4289
|
return /*#__PURE__*/ (0, $dGqE5$react).createElement("span", {
|
|
3943
4290
|
ref: ref,
|
|
4291
|
+
...DOMProps,
|
|
3944
4292
|
...valueProps,
|
|
3945
4293
|
...renderProps,
|
|
3946
4294
|
"data-placeholder": !state.selectedItem || undefined
|
|
@@ -3991,6 +4339,8 @@ function $6f909507e6374d18$var$Slider(props, ref) {
|
|
|
3991
4339
|
values: state,
|
|
3992
4340
|
defaultClassName: "react-aria-Slider"
|
|
3993
4341
|
});
|
|
4342
|
+
let DOMProps = (0, $dGqE5$filterDOMProps)(props);
|
|
4343
|
+
delete DOMProps.id;
|
|
3994
4344
|
return /*#__PURE__*/ (0, $dGqE5$react).createElement((0, $64fa3d84918910a7$export$2881499e37b75b9a), {
|
|
3995
4345
|
values: [
|
|
3996
4346
|
[
|
|
@@ -4011,6 +4361,7 @@ function $6f909507e6374d18$var$Slider(props, ref) {
|
|
|
4011
4361
|
]
|
|
4012
4362
|
]
|
|
4013
4363
|
}, /*#__PURE__*/ (0, $dGqE5$react).createElement("div", {
|
|
4364
|
+
...DOMProps,
|
|
4014
4365
|
...groupProps,
|
|
4015
4366
|
...renderProps,
|
|
4016
4367
|
ref: ref,
|
|
@@ -4022,7 +4373,7 @@ function $6f909507e6374d18$var$Slider(props, ref) {
|
|
|
4022
4373
|
/**
|
|
4023
4374
|
* A slider allows a user to select one or more values within a range.
|
|
4024
4375
|
*/ const $6f909507e6374d18$export$472062a354075cee = /*#__PURE__*/ (0, $dGqE5$forwardRef)($6f909507e6374d18$var$Slider);
|
|
4025
|
-
function $6f909507e6374d18$var$SliderOutput({ children: children , style: style , className: className
|
|
4376
|
+
function $6f909507e6374d18$var$SliderOutput({ children: children , style: style , className: className , ...otherProps }, ref) {
|
|
4026
4377
|
let { state: state , outputProps: outputProps } = (0, $dGqE5$useContext)($6f909507e6374d18$var$InternalSliderContext);
|
|
4027
4378
|
let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
4028
4379
|
className: className,
|
|
@@ -4033,7 +4384,7 @@ function $6f909507e6374d18$var$SliderOutput({ children: children , style: style
|
|
|
4033
4384
|
values: state
|
|
4034
4385
|
});
|
|
4035
4386
|
return /*#__PURE__*/ (0, $dGqE5$react).createElement("output", {
|
|
4036
|
-
...outputProps,
|
|
4387
|
+
...(0, $dGqE5$mergeProps)((0, $dGqE5$filterDOMProps)(otherProps), outputProps),
|
|
4037
4388
|
...renderProps,
|
|
4038
4389
|
ref: ref
|
|
4039
4390
|
});
|
|
@@ -4050,7 +4401,7 @@ function $6f909507e6374d18$var$SliderTrack(props, ref) {
|
|
|
4050
4401
|
values: state
|
|
4051
4402
|
});
|
|
4052
4403
|
return /*#__PURE__*/ (0, $dGqE5$react).createElement("div", {
|
|
4053
|
-
...trackProps,
|
|
4404
|
+
...(0, $dGqE5$mergeProps)((0, $dGqE5$filterDOMProps)(props), trackProps),
|
|
4054
4405
|
...renderProps,
|
|
4055
4406
|
ref: domRef
|
|
4056
4407
|
});
|
|
@@ -4084,8 +4435,10 @@ function $6f909507e6374d18$var$SliderThumb(props, ref) {
|
|
|
4084
4435
|
isDisabled: isDisabled
|
|
4085
4436
|
}
|
|
4086
4437
|
});
|
|
4438
|
+
let DOMProps = (0, $dGqE5$filterDOMProps)(props);
|
|
4439
|
+
delete DOMProps.id;
|
|
4087
4440
|
return /*#__PURE__*/ (0, $dGqE5$react).createElement("div", {
|
|
4088
|
-
...(0, $dGqE5$mergeProps)(thumbProps, hoverProps),
|
|
4441
|
+
...(0, $dGqE5$mergeProps)(DOMProps, thumbProps, hoverProps),
|
|
4089
4442
|
...renderProps,
|
|
4090
4443
|
ref: ref,
|
|
4091
4444
|
style: {
|
|
@@ -4131,11 +4484,16 @@ function $6f909507e6374d18$var$SliderThumb(props, ref) {
|
|
|
4131
4484
|
|
|
4132
4485
|
|
|
4133
4486
|
|
|
4487
|
+
|
|
4134
4488
|
const $8e59e948500a8fe1$export$8699e3b644d5a28a = /*#__PURE__*/ (0, $dGqE5$createContext)(null);
|
|
4135
4489
|
function $8e59e948500a8fe1$var$Switch(props, ref) {
|
|
4136
4490
|
[props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $8e59e948500a8fe1$export$8699e3b644d5a28a);
|
|
4137
4491
|
let state = (0, $dGqE5$useToggleState)(props);
|
|
4138
|
-
let { inputProps: inputProps , isSelected: isSelected , isDisabled: isDisabled , isReadOnly: isReadOnly , isPressed: isPressedKeyboard } = (0, $dGqE5$useSwitch)(
|
|
4492
|
+
let { inputProps: inputProps , isSelected: isSelected , isDisabled: isDisabled , isReadOnly: isReadOnly , isPressed: isPressedKeyboard } = (0, $dGqE5$useSwitch)({
|
|
4493
|
+
...props,
|
|
4494
|
+
// ReactNode type doesn't allow function children.
|
|
4495
|
+
children: typeof props.children === "function" ? true : props.children
|
|
4496
|
+
}, state, ref);
|
|
4139
4497
|
let { isFocused: isFocused , isFocusVisible: isFocusVisible , focusProps: focusProps } = (0, $dGqE5$useFocusRing)();
|
|
4140
4498
|
let isInteractionDisabled = props.isDisabled || props.isReadOnly;
|
|
4141
4499
|
// Handle press state for full label. Keyboard press state is returned by useSwitch
|
|
@@ -4167,8 +4525,10 @@ function $8e59e948500a8fe1$var$Switch(props, ref) {
|
|
|
4167
4525
|
isReadOnly: isReadOnly
|
|
4168
4526
|
}
|
|
4169
4527
|
});
|
|
4528
|
+
let DOMProps = (0, $dGqE5$filterDOMProps)(props);
|
|
4529
|
+
delete DOMProps.id;
|
|
4170
4530
|
return /*#__PURE__*/ (0, $dGqE5$react).createElement("label", {
|
|
4171
|
-
...(0, $dGqE5$mergeProps)(pressProps, hoverProps, renderProps),
|
|
4531
|
+
...(0, $dGqE5$mergeProps)(DOMProps, pressProps, hoverProps, renderProps),
|
|
4172
4532
|
slot: props.slot,
|
|
4173
4533
|
"data-selected": isSelected || undefined,
|
|
4174
4534
|
"data-pressed": pressed || undefined,
|
|
@@ -4177,7 +4537,9 @@ function $8e59e948500a8fe1$var$Switch(props, ref) {
|
|
|
4177
4537
|
"data-focus-visible": isFocusVisible || undefined,
|
|
4178
4538
|
"data-disabled": isDisabled || undefined,
|
|
4179
4539
|
"data-readonly": isReadOnly || undefined
|
|
4180
|
-
}, /*#__PURE__*/ (0, $dGqE5$react).createElement((0, $dGqE5$VisuallyHidden),
|
|
4540
|
+
}, /*#__PURE__*/ (0, $dGqE5$react).createElement((0, $dGqE5$VisuallyHidden), {
|
|
4541
|
+
elementType: "span"
|
|
4542
|
+
}, /*#__PURE__*/ (0, $dGqE5$react).createElement("input", {
|
|
4181
4543
|
...inputProps,
|
|
4182
4544
|
...focusProps,
|
|
4183
4545
|
ref: ref
|
|
@@ -4198,8 +4560,6 @@ function $8e59e948500a8fe1$var$Switch(props, ref) {
|
|
|
4198
4560
|
|
|
4199
4561
|
|
|
4200
4562
|
|
|
4201
|
-
|
|
4202
|
-
let $1910c06f0ca9905e$var$_Symbol_iterator = Symbol.iterator;
|
|
4203
4563
|
class $1910c06f0ca9905e$var$TableCollection extends (0, $7135fc7d473fd974$export$408d25a4e12db025) {
|
|
4204
4564
|
addNode(node) {
|
|
4205
4565
|
super.addNode(node);
|
|
@@ -4242,7 +4602,7 @@ class $1910c06f0ca9905e$var$TableCollection extends (0, $7135fc7d473fd974$export
|
|
|
4242
4602
|
...this.getChildren(this.body.key)
|
|
4243
4603
|
];
|
|
4244
4604
|
}
|
|
4245
|
-
*[
|
|
4605
|
+
*[Symbol.iterator]() {
|
|
4246
4606
|
yield* this.getChildren(this.body.key);
|
|
4247
4607
|
}
|
|
4248
4608
|
get size() {
|
|
@@ -4310,12 +4670,12 @@ class $1910c06f0ca9905e$var$TableCollection extends (0, $7135fc7d473fd974$export
|
|
|
4310
4670
|
}
|
|
4311
4671
|
constructor(...args){
|
|
4312
4672
|
super(...args);
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4673
|
+
this.headerRows = [];
|
|
4674
|
+
this.columns = [];
|
|
4675
|
+
this.rowHeaderColumnKeys = new Set();
|
|
4676
|
+
this.head = new (0, $7135fc7d473fd974$export$f5d856d854e74713)("tableheader", -1);
|
|
4677
|
+
this.body = new (0, $7135fc7d473fd974$export$f5d856d854e74713)("tablebody", -2);
|
|
4678
|
+
this.columnsDirty = true;
|
|
4319
4679
|
}
|
|
4320
4680
|
}
|
|
4321
4681
|
const $1910c06f0ca9905e$export$93e4b0b2cc49b648 = /*#__PURE__*/ (0, $dGqE5$createContext)(null);
|
|
@@ -4336,8 +4696,13 @@ function $1910c06f0ca9905e$var$Table(props, ref) {
|
|
|
4336
4696
|
let isListDroppable = !!(dragAndDropHooks === null || dragAndDropHooks === void 0 ? void 0 : dragAndDropHooks.useDroppableCollectionState);
|
|
4337
4697
|
let dragHooksProvided = (0, $dGqE5$useRef)(isListDraggable);
|
|
4338
4698
|
let dropHooksProvided = (0, $dGqE5$useRef)(isListDroppable);
|
|
4339
|
-
|
|
4340
|
-
|
|
4699
|
+
(0, $dGqE5$useEffect)(()=>{
|
|
4700
|
+
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.");
|
|
4701
|
+
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.");
|
|
4702
|
+
}, [
|
|
4703
|
+
isListDraggable,
|
|
4704
|
+
isListDroppable
|
|
4705
|
+
]);
|
|
4341
4706
|
let dragState = undefined;
|
|
4342
4707
|
let dropState = undefined;
|
|
4343
4708
|
let droppableCollection = undefined;
|
|
@@ -4408,7 +4773,7 @@ function $1910c06f0ca9905e$var$Table(props, ref) {
|
|
|
4408
4773
|
[
|
|
4409
4774
|
(0, $d8f176866e6dc039$export$f55761759794cf55),
|
|
4410
4775
|
{
|
|
4411
|
-
render: $1910c06f0ca9905e$var$
|
|
4776
|
+
render: $1910c06f0ca9905e$var$TableDropIndicatorWrapper
|
|
4412
4777
|
}
|
|
4413
4778
|
]
|
|
4414
4779
|
]
|
|
@@ -4438,7 +4803,7 @@ const $1910c06f0ca9905e$var$TableOptionsContext = /*#__PURE__*/ (0, $dGqE5$creat
|
|
|
4438
4803
|
function $1910c06f0ca9905e$export$fddc468cd8cb4db9() {
|
|
4439
4804
|
return (0, $dGqE5$useContext)($1910c06f0ca9905e$var$TableOptionsContext);
|
|
4440
4805
|
}
|
|
4441
|
-
function $1910c06f0ca9905e$
|
|
4806
|
+
function $1910c06f0ca9905e$var$TableHeader(props, ref) {
|
|
4442
4807
|
let children = (0, $7135fc7d473fd974$export$901dbff4e54a6dd0)({
|
|
4443
4808
|
children: props.children,
|
|
4444
4809
|
items: props.columns
|
|
@@ -4447,12 +4812,17 @@ function $1910c06f0ca9905e$export$f850895b287ef28e(props) {
|
|
|
4447
4812
|
return /*#__PURE__*/ (0, $dGqE5$react).createElement((0, $7135fc7d473fd974$export$4feb769f8ddf26c5).Provider, {
|
|
4448
4813
|
value: renderer
|
|
4449
4814
|
}, /*#__PURE__*/ (0, $dGqE5$react).createElement("tableheader", {
|
|
4450
|
-
|
|
4815
|
+
ref: (0, $7135fc7d473fd974$export$636783d3732b5559)(props, ref)
|
|
4451
4816
|
}, children));
|
|
4452
4817
|
}
|
|
4453
|
-
|
|
4818
|
+
/**
|
|
4819
|
+
* A header within a `<Table>`, containing the table columns.
|
|
4820
|
+
*/ const $1910c06f0ca9905e$export$f850895b287ef28e = /*#__PURE__*/ (0, $dGqE5$forwardRef)($1910c06f0ca9905e$var$TableHeader);
|
|
4821
|
+
function $1910c06f0ca9905e$var$Column(props, ref) {
|
|
4454
4822
|
let render = (0, $dGqE5$useContext)((0, $7135fc7d473fd974$export$4feb769f8ddf26c5));
|
|
4455
|
-
let childColumns
|
|
4823
|
+
let childColumns;
|
|
4824
|
+
if (typeof render === "function") childColumns = render;
|
|
4825
|
+
else if (typeof props.children !== "function") childColumns = props.children;
|
|
4456
4826
|
let children = (0, $7135fc7d473fd974$export$901dbff4e54a6dd0)({
|
|
4457
4827
|
children: props.title || props.childColumns ? childColumns : null,
|
|
4458
4828
|
items: props.childColumns
|
|
@@ -4460,20 +4830,23 @@ function $1910c06f0ca9905e$export$816b5d811295e6bc(props) {
|
|
|
4460
4830
|
var _props_title;
|
|
4461
4831
|
// @ts-ignore
|
|
4462
4832
|
return /*#__PURE__*/ (0, $dGqE5$react).createElement("column", {
|
|
4463
|
-
|
|
4464
|
-
...props,
|
|
4465
|
-
rendered: (_props_title = props.title) !== null && _props_title !== void 0 ? _props_title : props.children
|
|
4466
|
-
}
|
|
4833
|
+
ref: (0, $7135fc7d473fd974$export$636783d3732b5559)(props, ref, (_props_title = props.title) !== null && _props_title !== void 0 ? _props_title : props.children)
|
|
4467
4834
|
}, children);
|
|
4468
4835
|
}
|
|
4469
|
-
|
|
4836
|
+
/**
|
|
4837
|
+
* A column within a `<Table>`.
|
|
4838
|
+
*/ const $1910c06f0ca9905e$export$816b5d811295e6bc = /*#__PURE__*/ (0, $dGqE5$forwardRef)($1910c06f0ca9905e$var$Column);
|
|
4839
|
+
function $1910c06f0ca9905e$var$TableBody(props, ref) {
|
|
4470
4840
|
let children = (0, $7135fc7d473fd974$export$901dbff4e54a6dd0)(props);
|
|
4471
4841
|
// @ts-ignore
|
|
4472
4842
|
return /*#__PURE__*/ (0, $dGqE5$react).createElement("tablebody", {
|
|
4473
|
-
|
|
4843
|
+
ref: (0, $7135fc7d473fd974$export$636783d3732b5559)(props, ref)
|
|
4474
4844
|
}, children);
|
|
4475
4845
|
}
|
|
4476
|
-
|
|
4846
|
+
/**
|
|
4847
|
+
* The body of a `<Table>`, containing the table rows.
|
|
4848
|
+
*/ const $1910c06f0ca9905e$export$76ccd210b9029917 = /*#__PURE__*/ (0, $dGqE5$forwardRef)($1910c06f0ca9905e$var$TableBody);
|
|
4849
|
+
function $1910c06f0ca9905e$var$Row(props, ref) {
|
|
4477
4850
|
let children = (0, $7135fc7d473fd974$export$901dbff4e54a6dd0)({
|
|
4478
4851
|
children: props.children,
|
|
4479
4852
|
items: props.columns,
|
|
@@ -4486,20 +4859,23 @@ function $1910c06f0ca9905e$export$b59bdbef9ce70de2(props) {
|
|
|
4486
4859
|
]);
|
|
4487
4860
|
return(// @ts-ignore
|
|
4488
4861
|
/*#__PURE__*/ (0, $dGqE5$react).createElement("item", {
|
|
4489
|
-
|
|
4862
|
+
ref: (0, $7135fc7d473fd974$export$636783d3732b5559)(props, ref)
|
|
4490
4863
|
}, /*#__PURE__*/ (0, $dGqE5$react).createElement((0, $7135fc7d473fd974$export$db36075d98ba73d3).Provider, {
|
|
4491
4864
|
value: ctx
|
|
4492
4865
|
}, children)));
|
|
4493
4866
|
}
|
|
4494
|
-
|
|
4867
|
+
/**
|
|
4868
|
+
* A row within a `<Table>`.
|
|
4869
|
+
*/ const $1910c06f0ca9905e$export$b59bdbef9ce70de2 = /*#__PURE__*/ (0, $dGqE5$forwardRef)($1910c06f0ca9905e$var$Row);
|
|
4870
|
+
function $1910c06f0ca9905e$var$Cell(props, ref) {
|
|
4495
4871
|
// @ts-ignore
|
|
4496
4872
|
return /*#__PURE__*/ (0, $dGqE5$react).createElement("cell", {
|
|
4497
|
-
|
|
4498
|
-
...props,
|
|
4499
|
-
rendered: props.children
|
|
4500
|
-
}
|
|
4873
|
+
ref: (0, $7135fc7d473fd974$export$636783d3732b5559)(props, ref, props.children)
|
|
4501
4874
|
});
|
|
4502
4875
|
}
|
|
4876
|
+
/**
|
|
4877
|
+
* A cell within a table row.
|
|
4878
|
+
*/ const $1910c06f0ca9905e$export$f6f0c3fe4ec306ea = /*#__PURE__*/ (0, $dGqE5$forwardRef)($1910c06f0ca9905e$var$Cell);
|
|
4503
4879
|
function $1910c06f0ca9905e$var$TableHeaderRowGroup({ collection: collection }) {
|
|
4504
4880
|
let headerRows = (0, $7135fc7d473fd974$export$727c8fc270210f13)({
|
|
4505
4881
|
items: collection.headerRows,
|
|
@@ -4519,6 +4895,7 @@ function $1910c06f0ca9905e$var$TableHeaderRowGroup({ collection: collection })
|
|
|
4519
4895
|
return /*#__PURE__*/ (0, $dGqE5$react).createElement("thead", {
|
|
4520
4896
|
...(0, $dGqE5$filterDOMProps)(collection.head.props),
|
|
4521
4897
|
...rowGroupProps,
|
|
4898
|
+
ref: collection.head.props.ref,
|
|
4522
4899
|
className: (_collection_head_props_className = collection.head.props.className) !== null && _collection_head_props_className !== void 0 ? _collection_head_props_className : "react-aria-TableHeader",
|
|
4523
4900
|
style: collection.head.props.style
|
|
4524
4901
|
}, headerRows);
|
|
@@ -4556,8 +4933,9 @@ function $1910c06f0ca9905e$var$TableBodyRowGroup({ collection: collection , isDr
|
|
|
4556
4933
|
}, props.renderEmptyState()));
|
|
4557
4934
|
let { rowGroupProps: rowGroupProps } = (0, $dGqE5$useTableRowGroup)();
|
|
4558
4935
|
return /*#__PURE__*/ (0, $dGqE5$react).createElement("tbody", {
|
|
4936
|
+
...(0, $dGqE5$mergeProps)((0, $dGqE5$filterDOMProps)(props), rowGroupProps),
|
|
4559
4937
|
...renderProps,
|
|
4560
|
-
|
|
4938
|
+
ref: collection.body.props.ref,
|
|
4561
4939
|
"data-empty": collection.size === 0 || undefined
|
|
4562
4940
|
}, isDroppable && /*#__PURE__*/ (0, $dGqE5$react).createElement($1910c06f0ca9905e$var$RootDropIndicator, null), bodyRows, emptyState);
|
|
4563
4941
|
}
|
|
@@ -4599,7 +4977,7 @@ function $1910c06f0ca9905e$var$TableHeaderRow({ item: item }) {
|
|
|
4599
4977
|
}
|
|
4600
4978
|
function $1910c06f0ca9905e$var$TableColumnHeader({ column: column }) {
|
|
4601
4979
|
var _state_sortDescriptor;
|
|
4602
|
-
let ref = (0, $dGqE5$
|
|
4980
|
+
let ref = (0, $dGqE5$useObjectRef)(column.props.ref);
|
|
4603
4981
|
let { state: state } = (0, $dGqE5$useContext)($1910c06f0ca9905e$var$InternalTableContext);
|
|
4604
4982
|
let { columnHeaderProps: columnHeaderProps } = (0, $dGqE5$useTableColumnHeader)({
|
|
4605
4983
|
node: column
|
|
@@ -4619,7 +4997,7 @@ function $1910c06f0ca9905e$var$TableColumnHeader({ column: column }) {
|
|
|
4619
4997
|
}
|
|
4620
4998
|
});
|
|
4621
4999
|
return /*#__PURE__*/ (0, $dGqE5$react).createElement("th", {
|
|
4622
|
-
...(0, $dGqE5$mergeProps)(columnHeaderProps, focusProps),
|
|
5000
|
+
...(0, $dGqE5$mergeProps)((0, $dGqE5$filterDOMProps)(props), columnHeaderProps, focusProps),
|
|
4623
5001
|
...renderProps,
|
|
4624
5002
|
colSpan: column.colspan,
|
|
4625
5003
|
ref: ref,
|
|
@@ -4628,7 +5006,7 @@ function $1910c06f0ca9905e$var$TableColumnHeader({ column: column }) {
|
|
|
4628
5006
|
}, renderProps.children);
|
|
4629
5007
|
}
|
|
4630
5008
|
function $1910c06f0ca9905e$var$TableRow({ item: item }) {
|
|
4631
|
-
let ref = (0, $dGqE5$
|
|
5009
|
+
let ref = (0, $dGqE5$useObjectRef)(item.props.ref);
|
|
4632
5010
|
let { state: state , dragAndDropHooks: dragAndDropHooks , dragState: dragState , dropState: dropState } = (0, $dGqE5$useContext)($1910c06f0ca9905e$var$InternalTableContext);
|
|
4633
5011
|
let { rowProps: rowProps , ...states } = (0, $dGqE5$useTableRow)({
|
|
4634
5012
|
node: item,
|
|
@@ -4715,7 +5093,7 @@ function $1910c06f0ca9905e$var$TableRow({ item: item }) {
|
|
|
4715
5093
|
...dropIndicator.dropIndicatorProps,
|
|
4716
5094
|
ref: dropIndicatorRef
|
|
4717
5095
|
}))), /*#__PURE__*/ (0, $dGqE5$react).createElement("tr", {
|
|
4718
|
-
...(0, $dGqE5$mergeProps)(rowProps, focusProps, hoverProps, draggableItem === null || draggableItem === void 0 ? void 0 : draggableItem.dragProps),
|
|
5096
|
+
...(0, $dGqE5$mergeProps)((0, $dGqE5$filterDOMProps)(props), rowProps, focusProps, hoverProps, draggableItem === null || draggableItem === void 0 ? void 0 : draggableItem.dragProps),
|
|
4719
5097
|
...renderProps,
|
|
4720
5098
|
ref: ref,
|
|
4721
5099
|
"data-hovered": isHovered || undefined,
|
|
@@ -4757,7 +5135,7 @@ function $1910c06f0ca9905e$var$TableRow({ item: item }) {
|
|
|
4757
5135
|
}));
|
|
4758
5136
|
}
|
|
4759
5137
|
function $1910c06f0ca9905e$var$TableCell({ cell: cell }) {
|
|
4760
|
-
let ref = (0, $dGqE5$
|
|
5138
|
+
let ref = (0, $dGqE5$useObjectRef)(cell.props.ref);
|
|
4761
5139
|
let { state: state , dragState: dragState } = (0, $dGqE5$useContext)($1910c06f0ca9905e$var$InternalTableContext);
|
|
4762
5140
|
// @ts-ignore
|
|
4763
5141
|
cell.column = state.collection.columns[cell.index];
|
|
@@ -4778,30 +5156,41 @@ function $1910c06f0ca9905e$var$TableCell({ cell: cell }) {
|
|
|
4778
5156
|
}
|
|
4779
5157
|
});
|
|
4780
5158
|
return /*#__PURE__*/ (0, $dGqE5$react).createElement("td", {
|
|
4781
|
-
...(0, $dGqE5$mergeProps)(gridCellProps, focusProps),
|
|
5159
|
+
...(0, $dGqE5$mergeProps)((0, $dGqE5$filterDOMProps)(props), gridCellProps, focusProps),
|
|
4782
5160
|
...renderProps,
|
|
4783
5161
|
ref: ref,
|
|
4784
5162
|
"data-focused": isFocused || undefined,
|
|
4785
5163
|
"data-focus-visible": isFocusVisible || undefined,
|
|
4786
5164
|
"data-pressed": isPressed || undefined
|
|
4787
|
-
},
|
|
5165
|
+
}, renderProps.children);
|
|
4788
5166
|
}
|
|
4789
|
-
function $1910c06f0ca9905e$var$
|
|
5167
|
+
function $1910c06f0ca9905e$var$TableDropIndicatorWrapper(props, ref) {
|
|
4790
5168
|
ref = (0, $dGqE5$useObjectRef)(ref);
|
|
4791
|
-
let {
|
|
5169
|
+
let { dragAndDropHooks: dragAndDropHooks , dropState: dropState } = (0, $dGqE5$useContext)($1910c06f0ca9905e$var$InternalTableContext);
|
|
4792
5170
|
let buttonRef = (0, $dGqE5$useRef)(null);
|
|
4793
5171
|
let { dropIndicatorProps: dropIndicatorProps , isHidden: isHidden , isDropTarget: isDropTarget } = dragAndDropHooks.useDropIndicator(props, dropState, buttonRef);
|
|
4794
|
-
let { visuallyHiddenProps: visuallyHiddenProps } = (0, $dGqE5$useVisuallyHidden)();
|
|
4795
5172
|
if (isHidden) return null;
|
|
4796
|
-
|
|
4797
|
-
let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
5173
|
+
return /*#__PURE__*/ (0, $dGqE5$react).createElement($1910c06f0ca9905e$var$TableDropIndicatorForwardRef, {
|
|
4798
5174
|
...props,
|
|
5175
|
+
dropIndicatorProps: dropIndicatorProps,
|
|
5176
|
+
isDropTarget: isDropTarget,
|
|
5177
|
+
buttonRef: buttonRef,
|
|
5178
|
+
ref: ref
|
|
5179
|
+
});
|
|
5180
|
+
}
|
|
5181
|
+
function $1910c06f0ca9905e$var$TableDropIndicator(props, ref) {
|
|
5182
|
+
let { dropIndicatorProps: dropIndicatorProps , isDropTarget: isDropTarget , buttonRef: buttonRef , ...otherProps } = props;
|
|
5183
|
+
let { state: state } = (0, $dGqE5$useContext)($1910c06f0ca9905e$var$InternalTableContext);
|
|
5184
|
+
let { visuallyHiddenProps: visuallyHiddenProps } = (0, $dGqE5$useVisuallyHidden)();
|
|
5185
|
+
let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
5186
|
+
...otherProps,
|
|
4799
5187
|
defaultClassName: "react-aria-DropIndicator",
|
|
4800
5188
|
values: {
|
|
4801
5189
|
isDropTarget: isDropTarget
|
|
4802
5190
|
}
|
|
4803
5191
|
});
|
|
4804
5192
|
return /*#__PURE__*/ (0, $dGqE5$react).createElement("tr", {
|
|
5193
|
+
...(0, $dGqE5$filterDOMProps)(props),
|
|
4805
5194
|
...renderProps,
|
|
4806
5195
|
role: "row",
|
|
4807
5196
|
ref: ref,
|
|
@@ -4819,6 +5208,7 @@ function $1910c06f0ca9905e$var$TableDropIndicator(props, ref) {
|
|
|
4819
5208
|
ref: buttonRef
|
|
4820
5209
|
})));
|
|
4821
5210
|
}
|
|
5211
|
+
const $1910c06f0ca9905e$var$TableDropIndicatorForwardRef = /*#__PURE__*/ (0, $dGqE5$forwardRef)($1910c06f0ca9905e$var$TableDropIndicator);
|
|
4822
5212
|
function $1910c06f0ca9905e$var$RootDropIndicator() {
|
|
4823
5213
|
let { state: state , dragAndDropHooks: dragAndDropHooks , dropState: dropState } = (0, $dGqE5$useContext)($1910c06f0ca9905e$var$InternalTableContext);
|
|
4824
5214
|
let ref = (0, $dGqE5$useRef)(null);
|
|
@@ -4873,16 +5263,25 @@ const $5e8ad37a45e1c704$export$cfa7aa87c26e7d1f = /*#__PURE__*/ (0, $dGqE5$creat
|
|
|
4873
5263
|
const $5e8ad37a45e1c704$var$InternalTabsContext = /*#__PURE__*/ (0, $dGqE5$createContext)(null);
|
|
4874
5264
|
function $5e8ad37a45e1c704$var$Tabs(props, ref) {
|
|
4875
5265
|
[props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $5e8ad37a45e1c704$export$cfa7aa87c26e7d1f);
|
|
4876
|
-
let { orientation: orientation = "horizontal" } = props;
|
|
4877
|
-
let
|
|
5266
|
+
let { orientation: orientation = "horizontal" , keyboardActivation: keyboardActivation = "automatic" } = props;
|
|
5267
|
+
let values = (0, $dGqE5$useMemo)(()=>({
|
|
5268
|
+
orientation: orientation
|
|
5269
|
+
}), [
|
|
5270
|
+
orientation
|
|
5271
|
+
]);
|
|
5272
|
+
let { collection: collection , document: document } = (0, $7135fc7d473fd974$export$7cd71aa5ddd6dc4e)();
|
|
5273
|
+
let state = (0, $dGqE5$useTabListState)({
|
|
5274
|
+
...props,
|
|
5275
|
+
collection: collection,
|
|
5276
|
+
children: undefined
|
|
5277
|
+
});
|
|
4878
5278
|
let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
4879
5279
|
...props,
|
|
4880
5280
|
defaultClassName: "react-aria-Tabs",
|
|
4881
|
-
values:
|
|
4882
|
-
orientation: orientation
|
|
4883
|
-
}
|
|
5281
|
+
values: values
|
|
4884
5282
|
});
|
|
4885
5283
|
return /*#__PURE__*/ (0, $dGqE5$react).createElement("div", {
|
|
5284
|
+
...(0, $dGqE5$filterDOMProps)(props),
|
|
4886
5285
|
...renderProps,
|
|
4887
5286
|
ref: ref,
|
|
4888
5287
|
slot: props.slot,
|
|
@@ -4890,34 +5289,24 @@ function $5e8ad37a45e1c704$var$Tabs(props, ref) {
|
|
|
4890
5289
|
}, /*#__PURE__*/ (0, $dGqE5$react).createElement($5e8ad37a45e1c704$var$InternalTabsContext.Provider, {
|
|
4891
5290
|
value: {
|
|
4892
5291
|
state: state,
|
|
4893
|
-
|
|
4894
|
-
orientation: orientation
|
|
5292
|
+
document: document,
|
|
5293
|
+
orientation: orientation,
|
|
5294
|
+
keyboardActivation: keyboardActivation
|
|
4895
5295
|
}
|
|
4896
|
-
},
|
|
5296
|
+
}, renderProps.children));
|
|
4897
5297
|
}
|
|
4898
5298
|
/**
|
|
4899
5299
|
* Tabs organize content into multiple sections and allow users to navigate between them.
|
|
4900
5300
|
*/ const $5e8ad37a45e1c704$export$b2539bed5023c21c = /*#__PURE__*/ (0, $dGqE5$forwardRef)($5e8ad37a45e1c704$var$Tabs);
|
|
4901
5301
|
function $5e8ad37a45e1c704$var$TabList(props, ref) {
|
|
4902
|
-
let {
|
|
5302
|
+
let { state: state , document: document , orientation: orientation , keyboardActivation: keyboardActivation } = (0, $dGqE5$useContext)($5e8ad37a45e1c704$var$InternalTabsContext);
|
|
4903
5303
|
let objectRef = (0, $dGqE5$useObjectRef)(ref);
|
|
4904
|
-
let
|
|
4905
|
-
let state = (0, $dGqE5$useTabListState)({
|
|
4906
|
-
...props,
|
|
4907
|
-
collection: collection,
|
|
4908
|
-
children: undefined
|
|
4909
|
-
});
|
|
5304
|
+
let portal = (0, $7135fc7d473fd974$export$ad42d5efb4461b31)(props, document);
|
|
4910
5305
|
let { tabListProps: tabListProps } = (0, $dGqE5$useTabList)({
|
|
4911
5306
|
...props,
|
|
4912
|
-
orientation: orientation
|
|
5307
|
+
orientation: orientation,
|
|
5308
|
+
keyboardActivation: keyboardActivation
|
|
4913
5309
|
}, state, objectRef);
|
|
4914
|
-
(0, $dGqE5$useEffect)(()=>{
|
|
4915
|
-
setState(state);
|
|
4916
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4917
|
-
}, [
|
|
4918
|
-
collection,
|
|
4919
|
-
state.selectedKey
|
|
4920
|
-
]);
|
|
4921
5310
|
let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
4922
5311
|
...props,
|
|
4923
5312
|
children: null,
|
|
@@ -4926,7 +5315,10 @@ function $5e8ad37a45e1c704$var$TabList(props, ref) {
|
|
|
4926
5315
|
orientation: orientation
|
|
4927
5316
|
}
|
|
4928
5317
|
});
|
|
5318
|
+
let DOMProps = (0, $dGqE5$filterDOMProps)(props);
|
|
5319
|
+
delete DOMProps.id;
|
|
4929
5320
|
return /*#__PURE__*/ (0, $dGqE5$react).createElement((0, $dGqE5$react).Fragment, null, /*#__PURE__*/ (0, $dGqE5$react).createElement("div", {
|
|
5321
|
+
...DOMProps,
|
|
4930
5322
|
...tabListProps,
|
|
4931
5323
|
ref: objectRef,
|
|
4932
5324
|
...renderProps
|
|
@@ -4942,13 +5334,19 @@ function $5e8ad37a45e1c704$var$TabList(props, ref) {
|
|
|
4942
5334
|
* A TabList is used within Tabs to group tabs that a user can switch between.
|
|
4943
5335
|
* The ids of the items within the <TabList> must match up with a corresponding item inside the <TabPanels>.
|
|
4944
5336
|
*/ const $5e8ad37a45e1c704$export$e51a686c67fdaa2d = /*#__PURE__*/ (0, $dGqE5$forwardRef)($5e8ad37a45e1c704$var$TabList);
|
|
4945
|
-
function $5e8ad37a45e1c704$
|
|
5337
|
+
function $5e8ad37a45e1c704$var$Tab(props, ref) {
|
|
4946
5338
|
// @ts-ignore
|
|
4947
|
-
return (0, $7135fc7d473fd974$export$6d08773d2e66f8f2)
|
|
5339
|
+
return /*#__PURE__*/ (0, $dGqE5$react).createElement((0, $7135fc7d473fd974$export$6d08773d2e66f8f2), {
|
|
5340
|
+
...props,
|
|
5341
|
+
ref: ref
|
|
5342
|
+
});
|
|
4948
5343
|
}
|
|
5344
|
+
/**
|
|
5345
|
+
* A Tab provides a title for an individual item within a TabList.
|
|
5346
|
+
*/ const $5e8ad37a45e1c704$export$3e41faf802a29e71 = /*#__PURE__*/ (0, $dGqE5$forwardRef)($5e8ad37a45e1c704$var$Tab);
|
|
4949
5347
|
function $5e8ad37a45e1c704$var$TabInner({ item: item , state: state }) {
|
|
4950
5348
|
let { key: key } = item;
|
|
4951
|
-
let ref = (0, $dGqE5$
|
|
5349
|
+
let ref = (0, $dGqE5$useObjectRef)(item.props.ref);
|
|
4952
5350
|
let { tabProps: tabProps , isSelected: isSelected , isDisabled: isDisabled , isPressed: isPressed } = (0, $dGqE5$useTab)({
|
|
4953
5351
|
key: key
|
|
4954
5352
|
}, state, ref);
|
|
@@ -4969,44 +5367,234 @@ function $5e8ad37a45e1c704$var$TabInner({ item: item , state: state }) {
|
|
|
4969
5367
|
isHovered: isHovered
|
|
4970
5368
|
}
|
|
4971
5369
|
});
|
|
5370
|
+
let DOMProps = (0, $dGqE5$filterDOMProps)(item.props);
|
|
5371
|
+
delete DOMProps.id;
|
|
4972
5372
|
return /*#__PURE__*/ (0, $dGqE5$react).createElement("div", {
|
|
4973
|
-
...(0, $dGqE5$mergeProps)(tabProps, focusProps, hoverProps, renderProps),
|
|
5373
|
+
...(0, $dGqE5$mergeProps)(DOMProps, tabProps, focusProps, hoverProps, renderProps),
|
|
4974
5374
|
ref: ref,
|
|
4975
5375
|
"data-focus-visible": isFocusVisible || undefined,
|
|
4976
5376
|
"data-pressed": isPressed || undefined,
|
|
4977
5377
|
"data-hovered": isHovered || undefined
|
|
4978
5378
|
});
|
|
4979
5379
|
}
|
|
4980
|
-
function $5e8ad37a45e1c704$
|
|
5380
|
+
function $5e8ad37a45e1c704$var$TabPanel(props, forwardedRef) {
|
|
4981
5381
|
const { state: state } = (0, $dGqE5$useContext)($5e8ad37a45e1c704$var$InternalTabsContext);
|
|
4982
|
-
let
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
5382
|
+
let ref = (0, $dGqE5$useObjectRef)(forwardedRef);
|
|
5383
|
+
let { tabPanelProps: tabPanelProps } = (0, $dGqE5$useTabPanel)(props, state, ref);
|
|
5384
|
+
let { focusProps: focusProps , isFocused: isFocused , isFocusVisible: isFocusVisible } = (0, $dGqE5$useFocusRing)();
|
|
5385
|
+
let isSelected = state.selectedKey === props.id;
|
|
5386
|
+
let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
5387
|
+
...props,
|
|
5388
|
+
defaultClassName: "react-aria-TabPanel",
|
|
5389
|
+
values: {
|
|
5390
|
+
isFocused: isFocused,
|
|
5391
|
+
isFocusVisible: isFocusVisible,
|
|
5392
|
+
isInert: !isSelected
|
|
5393
|
+
}
|
|
5394
|
+
});
|
|
5395
|
+
if (!isSelected && !props.shouldForceMount) return null;
|
|
5396
|
+
let DOMProps = (0, $dGqE5$filterDOMProps)(props);
|
|
5397
|
+
delete DOMProps.id;
|
|
5398
|
+
let domProps = isSelected ? (0, $dGqE5$mergeProps)(DOMProps, tabPanelProps, focusProps, renderProps) : renderProps;
|
|
5399
|
+
return /*#__PURE__*/ (0, $dGqE5$react).createElement("div", {
|
|
5400
|
+
...domProps,
|
|
5401
|
+
ref: ref,
|
|
5402
|
+
"data-focus-visible": isFocusVisible || undefined,
|
|
5403
|
+
// @ts-ignore
|
|
5404
|
+
inert: !isSelected ? "true" : undefined
|
|
5405
|
+
});
|
|
4987
5406
|
}
|
|
4988
|
-
|
|
4989
|
-
|
|
5407
|
+
/**
|
|
5408
|
+
* A TabPanel provides the content for a tab.
|
|
5409
|
+
*/ const $5e8ad37a45e1c704$export$3d96ec278d3efce4 = /*#__PURE__*/ (0, $dGqE5$forwardRef)($5e8ad37a45e1c704$var$TabPanel);
|
|
5410
|
+
|
|
5411
|
+
|
|
5412
|
+
/*
|
|
5413
|
+
* Copyright 2022 Adobe. All rights reserved.
|
|
5414
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
5415
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5416
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
5417
|
+
*
|
|
5418
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
5419
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
5420
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
5421
|
+
* governing permissions and limitations under the License.
|
|
5422
|
+
*/
|
|
5423
|
+
|
|
5424
|
+
|
|
5425
|
+
|
|
5426
|
+
|
|
5427
|
+
|
|
5428
|
+
|
|
5429
|
+
|
|
5430
|
+
|
|
5431
|
+
const $eaf9e70818b436db$export$5b07b5dd2cbd96e3 = /*#__PURE__*/ (0, $dGqE5$createContext)(null);
|
|
5432
|
+
const $eaf9e70818b436db$var$InternalTagGroupContext = /*#__PURE__*/ (0, $dGqE5$createContext)(null);
|
|
5433
|
+
function $eaf9e70818b436db$var$TagGroup(props, ref) {
|
|
5434
|
+
[props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $eaf9e70818b436db$export$5b07b5dd2cbd96e3);
|
|
5435
|
+
let tagListRef = (0, $dGqE5$useRef)(null);
|
|
5436
|
+
let [labelRef, label] = (0, $64fa3d84918910a7$export$9d4c57ee4c6ffdd8)();
|
|
5437
|
+
let { collection: collection , document: document } = (0, $7135fc7d473fd974$export$7cd71aa5ddd6dc4e)();
|
|
5438
|
+
let state = (0, $dGqE5$useListState)({
|
|
5439
|
+
...props,
|
|
5440
|
+
children: undefined,
|
|
5441
|
+
collection: collection
|
|
5442
|
+
});
|
|
5443
|
+
// Prevent DOM props from going to two places.
|
|
5444
|
+
let domProps = (0, $dGqE5$filterDOMProps)(props);
|
|
5445
|
+
let domPropOverrides = Object.fromEntries(Object.entries(domProps).map(([k])=>[
|
|
5446
|
+
k,
|
|
5447
|
+
undefined
|
|
5448
|
+
]));
|
|
5449
|
+
let { gridProps: gridProps , labelProps: labelProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = (0, $dGqE5$useTagGroup)({
|
|
5450
|
+
...props,
|
|
5451
|
+
...domPropOverrides,
|
|
5452
|
+
label: label
|
|
5453
|
+
}, state, tagListRef);
|
|
5454
|
+
var _props_className;
|
|
5455
|
+
return /*#__PURE__*/ (0, $dGqE5$react).createElement("div", {
|
|
5456
|
+
...domProps,
|
|
5457
|
+
ref: ref,
|
|
5458
|
+
slot: props.slot,
|
|
5459
|
+
className: (_props_className = props.className) !== null && _props_className !== void 0 ? _props_className : "react-aria-TagGroup",
|
|
5460
|
+
style: props.style
|
|
5461
|
+
}, /*#__PURE__*/ (0, $dGqE5$react).createElement((0, $64fa3d84918910a7$export$2881499e37b75b9a), {
|
|
5462
|
+
values: [
|
|
5463
|
+
[
|
|
5464
|
+
(0, $01b77f81d0f07f68$export$75b6ee27786ba447),
|
|
5465
|
+
{
|
|
5466
|
+
...labelProps,
|
|
5467
|
+
elementType: "span",
|
|
5468
|
+
ref: labelRef
|
|
5469
|
+
}
|
|
5470
|
+
],
|
|
5471
|
+
[
|
|
5472
|
+
$eaf9e70818b436db$var$InternalTagGroupContext,
|
|
5473
|
+
{
|
|
5474
|
+
state: state,
|
|
5475
|
+
document: document,
|
|
5476
|
+
gridProps: gridProps,
|
|
5477
|
+
tagListRef: tagListRef
|
|
5478
|
+
}
|
|
5479
|
+
],
|
|
5480
|
+
[
|
|
5481
|
+
(0, $514c0188e459b4c0$export$9afb8bc826b033ea),
|
|
5482
|
+
{
|
|
5483
|
+
slots: {
|
|
5484
|
+
description: descriptionProps,
|
|
5485
|
+
errorMessage: errorMessageProps
|
|
5486
|
+
}
|
|
5487
|
+
}
|
|
5488
|
+
]
|
|
5489
|
+
]
|
|
5490
|
+
}, props.children));
|
|
4990
5491
|
}
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
5492
|
+
/**
|
|
5493
|
+
* A tag group is a focusable list of labels, categories, keywords, filters, or other items, with support for keyboard navigation, selection, and removal.
|
|
5494
|
+
*/ const $eaf9e70818b436db$export$67ea30858aaf75e3 = /*#__PURE__*/ (0, $dGqE5$forwardRef)($eaf9e70818b436db$var$TagGroup);
|
|
5495
|
+
function $eaf9e70818b436db$var$TagList(props, forwardedRef) {
|
|
5496
|
+
let { state: state , document: document , gridProps: gridProps , tagListRef: tagListRef } = (0, $dGqE5$useContext)($eaf9e70818b436db$var$InternalTagGroupContext);
|
|
5497
|
+
let portal = (0, $7135fc7d473fd974$export$ad42d5efb4461b31)(props, document);
|
|
5498
|
+
let ref = (0, $dGqE5$mergeRefs)(tagListRef, forwardedRef);
|
|
5499
|
+
let children = (0, $7135fc7d473fd974$export$727c8fc270210f13)({
|
|
5500
|
+
items: state.collection,
|
|
5501
|
+
children: (item)=>{
|
|
5502
|
+
switch(item.type){
|
|
5503
|
+
case "item":
|
|
5504
|
+
return /*#__PURE__*/ (0, $dGqE5$react).createElement($eaf9e70818b436db$var$TagItem, {
|
|
5505
|
+
item: item
|
|
5506
|
+
});
|
|
5507
|
+
default:
|
|
5508
|
+
throw new Error("Unsupported node type in TagList: " + item.type);
|
|
5509
|
+
}
|
|
5510
|
+
}
|
|
5511
|
+
});
|
|
4995
5512
|
let { focusProps: focusProps , isFocused: isFocused , isFocusVisible: isFocusVisible } = (0, $dGqE5$useFocusRing)();
|
|
4996
5513
|
let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
defaultClassName: "react-aria-
|
|
5514
|
+
className: props.className,
|
|
5515
|
+
style: props.style,
|
|
5516
|
+
defaultClassName: "react-aria-TagList",
|
|
5000
5517
|
values: {
|
|
5518
|
+
isEmpty: state.collection.size === 0,
|
|
5001
5519
|
isFocused: isFocused,
|
|
5002
5520
|
isFocusVisible: isFocusVisible
|
|
5003
5521
|
}
|
|
5004
5522
|
});
|
|
5005
|
-
return /*#__PURE__*/ (0, $dGqE5$react).createElement("div", {
|
|
5006
|
-
...(0, $dGqE5$
|
|
5523
|
+
return /*#__PURE__*/ (0, $dGqE5$react).createElement((0, $dGqE5$react).Fragment, null, /*#__PURE__*/ (0, $dGqE5$react).createElement("div", {
|
|
5524
|
+
...(0, $dGqE5$mergeProps1)(gridProps, focusProps),
|
|
5525
|
+
...renderProps,
|
|
5526
|
+
...(0, $dGqE5$filterDOMProps)(props),
|
|
5007
5527
|
ref: ref,
|
|
5528
|
+
"data-empty": state.collection.size === 0 || undefined,
|
|
5529
|
+
"data-focused": isFocused || undefined,
|
|
5008
5530
|
"data-focus-visible": isFocusVisible || undefined
|
|
5531
|
+
}, state.collection.size === 0 && props.renderEmptyState ? props.renderEmptyState() : children), portal);
|
|
5532
|
+
}
|
|
5533
|
+
/**
|
|
5534
|
+
* A tag list is a container for tags within a TagGroup.
|
|
5535
|
+
*/ const $eaf9e70818b436db$export$f9fef0f55402315b = /*#__PURE__*/ (0, $dGqE5$forwardRef)($eaf9e70818b436db$var$TagList);
|
|
5536
|
+
function $eaf9e70818b436db$var$Tag(props, ref) {
|
|
5537
|
+
// @ts-ignore
|
|
5538
|
+
return /*#__PURE__*/ (0, $dGqE5$react).createElement((0, $7135fc7d473fd974$export$6d08773d2e66f8f2), {
|
|
5539
|
+
...props,
|
|
5540
|
+
ref: ref
|
|
5541
|
+
});
|
|
5542
|
+
}
|
|
5543
|
+
/**
|
|
5544
|
+
* A Tag is an individual item within a TagList.
|
|
5545
|
+
*/ const $eaf9e70818b436db$export$3288d34c523a1192 = /*#__PURE__*/ (0, $dGqE5$forwardRef)($eaf9e70818b436db$var$Tag);
|
|
5546
|
+
function $eaf9e70818b436db$var$TagItem({ item: item }) {
|
|
5547
|
+
let { state: state } = (0, $dGqE5$useContext)($eaf9e70818b436db$var$InternalTagGroupContext);
|
|
5548
|
+
let ref = (0, $dGqE5$useObjectRef)(item.props.ref);
|
|
5549
|
+
let { focusProps: focusProps , isFocusVisible: isFocusVisible } = (0, $dGqE5$useFocusRing)({
|
|
5550
|
+
within: true
|
|
5551
|
+
});
|
|
5552
|
+
let { rowProps: rowProps , gridCellProps: gridCellProps , removeButtonProps: removeButtonProps , ...states } = (0, $dGqE5$useTag)({
|
|
5553
|
+
item: item
|
|
5554
|
+
}, state, ref);
|
|
5555
|
+
let { hoverProps: hoverProps , isHovered: isHovered } = (0, $dGqE5$useHover)({
|
|
5556
|
+
isDisabled: !states.allowsSelection
|
|
5557
|
+
});
|
|
5558
|
+
let props = item.props;
|
|
5559
|
+
let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({
|
|
5560
|
+
...props,
|
|
5561
|
+
id: undefined,
|
|
5562
|
+
children: item.rendered,
|
|
5563
|
+
defaultClassName: "react-aria-Tag",
|
|
5564
|
+
values: {
|
|
5565
|
+
...states,
|
|
5566
|
+
isFocusVisible: isFocusVisible,
|
|
5567
|
+
isHovered: isHovered,
|
|
5568
|
+
selectionMode: state.selectionManager.selectionMode,
|
|
5569
|
+
selectionBehavior: state.selectionManager.selectionBehavior
|
|
5570
|
+
}
|
|
5009
5571
|
});
|
|
5572
|
+
(0, $dGqE5$useEffect)(()=>{
|
|
5573
|
+
if (!item.textValue) console.warn("A `textValue` prop is required for <Tag> elements with non-plain text children for accessibility.");
|
|
5574
|
+
}, [
|
|
5575
|
+
item.textValue
|
|
5576
|
+
]);
|
|
5577
|
+
return /*#__PURE__*/ (0, $dGqE5$react).createElement("div", {
|
|
5578
|
+
ref: ref,
|
|
5579
|
+
...renderProps,
|
|
5580
|
+
...(0, $dGqE5$mergeProps1)((0, $dGqE5$filterDOMProps)(props), rowProps, focusProps, hoverProps),
|
|
5581
|
+
"data-hovered": isHovered || undefined,
|
|
5582
|
+
"data-focused": states.isFocused || undefined,
|
|
5583
|
+
"data-focus-visible": isFocusVisible || undefined,
|
|
5584
|
+
"data-pressed": states.isPressed || undefined,
|
|
5585
|
+
"data-allows-removing": states.allowsRemoving || undefined
|
|
5586
|
+
}, /*#__PURE__*/ (0, $dGqE5$react).createElement("div", gridCellProps, /*#__PURE__*/ (0, $dGqE5$react).createElement((0, $64fa3d84918910a7$export$2881499e37b75b9a), {
|
|
5587
|
+
values: [
|
|
5588
|
+
[
|
|
5589
|
+
(0, $d2b4bc8c273e7be6$export$24d547caef80ccd1),
|
|
5590
|
+
{
|
|
5591
|
+
slots: {
|
|
5592
|
+
remove: removeButtonProps
|
|
5593
|
+
}
|
|
5594
|
+
}
|
|
5595
|
+
]
|
|
5596
|
+
]
|
|
5597
|
+
}, renderProps.children)));
|
|
5010
5598
|
}
|
|
5011
5599
|
|
|
5012
5600
|
|
|
@@ -5219,5 +5807,5 @@ function $4e3b923658d69c60$var$TooltipInner(props) {
|
|
|
5219
5807
|
|
|
5220
5808
|
|
|
5221
5809
|
|
|
5222
|
-
export {$778035c5624f61e7$export$2dc68d50d56fbbd as Breadcrumbs, $778035c5624f61e7$export$65596d3621b0a4a0 as BreadcrumbsContext, $d2b4bc8c273e7be6$export$353f5b6fc5456de1 as Button, $d2b4bc8c273e7be6$export$24d547caef80ccd1 as ButtonContext, $dfd62f934fc76fed$export$e1aef45b828286de as Calendar, $dfd62f934fc76fed$export$5bd780d491cfc46c as CalendarGrid, $dfd62f934fc76fed$export$22e2d15eaa4d2377 as CalendarGridHeader, $dfd62f934fc76fed$export$e11f8ba65d857bff as CalendarGridBody, $dfd62f934fc76fed$export$ad2135cac3a11b3d as CalendarHeaderCell, $dfd62f934fc76fed$export$5d847498420df57b as CalendarCell, $dfd62f934fc76fed$export$a4f5c8b89d277a8d as RangeCalendar, $dfd62f934fc76fed$export$3b805cea1f178355 as CalendarContext, $dfd62f934fc76fed$export$233dd9682e1ad64b as RangeCalendarContext, $bc237834342dbd75$export$48513f6b9f8ce62d as Checkbox, $bc237834342dbd75$export$4aa08d5625cb8ead as CheckboxGroup, $bc237834342dbd75$export$baf37c4be89255b8 as CheckboxGroupContext, $bc237834342dbd75$export$b085522c77523c51 as CheckboxContext, $d01f2c01039c0eec$export$72b9695b8216309a as ComboBox, $d01f2c01039c0eec$export$d414ccceff7063c3 as ComboBoxContext, $40825cdb76e74f70$export$d9781c7894a82487 as DateField, $40825cdb76e74f70$export$7edc06cf1783b30f as DateInput, $40825cdb76e74f70$export$336ab7fa954c4b5f as DateSegment, $40825cdb76e74f70$export$5eaee2322dd727eb as TimeField, $40825cdb76e74f70$export$7b3e670c86da5fe8 as DateFieldContext, $40825cdb76e74f70$export$8e17ddc448e87c1e as TimeFieldContext, $06d5b8ec9ee5d538$export$5109c6dd95d8fb00 as DatePicker, $06d5b8ec9ee5d538$export$17334619f3ac2224 as DateRangePicker, $06d5b8ec9ee5d538$export$cf316c7f3b44c11e as DatePickerContext, $06d5b8ec9ee5d538$export$8282edba42ee28a as DateRangePickerContext, $de32f1b87079253c$export$2e1e1122cf0cba88 as DialogTrigger, $de32f1b87079253c$export$3ddf2d174ce01153 as Dialog, $de32f1b87079253c$export$8b93a07348a7730c as DialogContext, $72e60046c03fbe42$export$a7bfbda1311ca015 as GridList, $72e60046c03fbe42$export$54fe942636b6416d as GridListContext, $a049562f99e7db0e$export$eb2fcfdbd7ba97d4 as Group, $a049562f99e7db0e$export$f9c6924e160136d1 as GroupContext, $72a5793c14baf454$export$8b251419efc915eb as Header, $5cb03073d3f54797$export$a8a3e93435678ff9 as Heading, $5cb03073d3f54797$export$d688439359537581 as HeadingContext, $3985021b0ad6602f$export$f5b8910cec6cf069 as Input, $3985021b0ad6602f$export$37fb8590cf2c088c as InputContext, $7135fc7d473fd974$export$6d08773d2e66f8f2 as Item, $7135fc7d473fd974$export$6e2c8f0811a474ce as Section, $7135fc7d473fd974$export$fb8073518f34e6ec as Collection, $63df2425e2108aa8$export$16e4d70cc375e707 as Keyboard, $63df2425e2108aa8$export$744d98a3b8a94e1c as KeyboardContext, $01b77f81d0f07f68$export$b04be29aa201d4f5 as Label, $01b77f81d0f07f68$export$75b6ee27786ba447 as LabelContext, $4f118338184dc1d9$export$a6c7ac8248d6e38a as Link, $4f118338184dc1d9$export$e2509388b49734e7 as LinkContext, $eed445e0843c11d0$export$41f133550aa26f48 as ListBox, $eed445e0843c11d0$export$7ff8f37d2d81a48d as ListBoxContext, $3674c52c6b3c5bce$export$d9b273488cd8ce6f as Menu, $3674c52c6b3c5bce$export$27d2ad3c5815583e as MenuTrigger, $3674c52c6b3c5bce$export$c7e742effb1c51e2 as MenuContext, $c0c9ced265f3594c$export$62e3ae2a4090b879 as Meter, $c0c9ced265f3594c$export$8b645da15a96b44f as MeterContext, $f3f84453ead64de5$export$2b77a92f1a5ad772 as Modal, $f3f84453ead64de5$export$8948f78d83984c69 as ModalOverlay, $f3f84453ead64de5$export$ab57792b9b6974a6 as ModalContext, $b91743d66a0ed188$export$63c5fa0b2fdccd2e as NumberField, $b91743d66a0ed188$export$b414a48cf5dcbc11 as NumberFieldContext, $44f671af83e7d9e0$export$746d02f47f4d381 as OverlayArrow, $07b14b47974efb58$export$5b6b19405a83ff9d as Popover, $07b14b47974efb58$export$9b9a0cd73afb7ca4 as PopoverContext, $0393f8ab869a0f1a$export$c17561cb55d4db30 as ProgressBar, $0393f8ab869a0f1a$export$e9f3bf65a26ce129 as ProgressBarContext, $64fa3d84918910a7$export$2881499e37b75b9a as Provider, $64fa3d84918910a7$export$29f1550f4b0d4415 as useContextProps, $b6c3ddc6086f204d$export$a98f0dcb43a68a25 as RadioGroup, $b6c3ddc6086f204d$export$d7b12c4107be0d61 as Radio, $b6c3ddc6086f204d$export$a79eda4ff50e30b6 as RadioGroupContext, $440f4836bcb56932$export$b94867ecbd698f21 as SearchField, $440f4836bcb56932$export$d1c4e4c63cb03a11 as SearchFieldContext, $82d7e5349645de74$export$ef9b1a59e592288f as Select, $82d7e5349645de74$export$e288731fd71264f0 as SelectValue, $82d7e5349645de74$export$7540cee5be7dc19b as SelectContext, $431f98aba6844401$export$1ff3c3f08ae963c0 as Separator, $431f98aba6844401$export$6615d83f6de245ce as SeparatorContext, $6f909507e6374d18$export$472062a354075cee as Slider, $6f909507e6374d18$export$a590f758a961cb5b as SliderOutput, $6f909507e6374d18$export$105594979f116971 as SliderTrack, $6f909507e6374d18$export$2c1b491743890dec as SliderThumb, $6f909507e6374d18$export$e99164f0030f3bff as SliderContext, $8e59e948500a8fe1$export$b5d5cf8927ab7262 as Switch, $8e59e948500a8fe1$export$8699e3b644d5a28a as SwitchContext, $1910c06f0ca9905e$export$54ec01a60f47d33d as Table, $1910c06f0ca9905e$export$b59bdbef9ce70de2 as Row, $1910c06f0ca9905e$export$f6f0c3fe4ec306ea as Cell, $1910c06f0ca9905e$export$816b5d811295e6bc as Column, $1910c06f0ca9905e$export$f850895b287ef28e as TableHeader, $1910c06f0ca9905e$export$76ccd210b9029917 as TableBody, $1910c06f0ca9905e$export$93e4b0b2cc49b648 as TableContext, $1910c06f0ca9905e$export$fddc468cd8cb4db9 as useTableOptions, $5e8ad37a45e1c704$export$b2539bed5023c21c as Tabs, $5e8ad37a45e1c704$export$e51a686c67fdaa2d as TabList, $5e8ad37a45e1c704$export$
|
|
5810
|
+
export {$778035c5624f61e7$export$2dc68d50d56fbbd as Breadcrumbs, $778035c5624f61e7$export$65596d3621b0a4a0 as BreadcrumbsContext, $d2b4bc8c273e7be6$export$353f5b6fc5456de1 as Button, $d2b4bc8c273e7be6$export$24d547caef80ccd1 as ButtonContext, $dfd62f934fc76fed$export$e1aef45b828286de as Calendar, $dfd62f934fc76fed$export$5bd780d491cfc46c as CalendarGrid, $dfd62f934fc76fed$export$22e2d15eaa4d2377 as CalendarGridHeader, $dfd62f934fc76fed$export$e11f8ba65d857bff as CalendarGridBody, $dfd62f934fc76fed$export$ad2135cac3a11b3d as CalendarHeaderCell, $dfd62f934fc76fed$export$5d847498420df57b as CalendarCell, $dfd62f934fc76fed$export$a4f5c8b89d277a8d as RangeCalendar, $dfd62f934fc76fed$export$3b805cea1f178355 as CalendarContext, $dfd62f934fc76fed$export$233dd9682e1ad64b as RangeCalendarContext, $bc237834342dbd75$export$48513f6b9f8ce62d as Checkbox, $bc237834342dbd75$export$4aa08d5625cb8ead as CheckboxGroup, $bc237834342dbd75$export$baf37c4be89255b8 as CheckboxGroupContext, $bc237834342dbd75$export$b085522c77523c51 as CheckboxContext, $d01f2c01039c0eec$export$72b9695b8216309a as ComboBox, $d01f2c01039c0eec$export$d414ccceff7063c3 as ComboBoxContext, $40825cdb76e74f70$export$d9781c7894a82487 as DateField, $40825cdb76e74f70$export$7edc06cf1783b30f as DateInput, $40825cdb76e74f70$export$336ab7fa954c4b5f as DateSegment, $40825cdb76e74f70$export$5eaee2322dd727eb as TimeField, $40825cdb76e74f70$export$7b3e670c86da5fe8 as DateFieldContext, $40825cdb76e74f70$export$8e17ddc448e87c1e as TimeFieldContext, $06d5b8ec9ee5d538$export$5109c6dd95d8fb00 as DatePicker, $06d5b8ec9ee5d538$export$17334619f3ac2224 as DateRangePicker, $06d5b8ec9ee5d538$export$cf316c7f3b44c11e as DatePickerContext, $06d5b8ec9ee5d538$export$8282edba42ee28a as DateRangePickerContext, $de32f1b87079253c$export$2e1e1122cf0cba88 as DialogTrigger, $de32f1b87079253c$export$3ddf2d174ce01153 as Dialog, $de32f1b87079253c$export$8b93a07348a7730c as DialogContext, $cb088e721efb9218$export$3c6489d84dc98b6 as DropZone, $cb088e721efb9218$export$14a72053295ff9a6 as DropZoneContext, $1e2864c73f66a4da$export$6fb4a10d2c950550 as FileTrigger, $1e2864c73f66a4da$export$9106743a055caed1 as FileTriggerContext, $72e60046c03fbe42$export$a7bfbda1311ca015 as GridList, $72e60046c03fbe42$export$54fe942636b6416d as GridListContext, $a049562f99e7db0e$export$eb2fcfdbd7ba97d4 as Group, $a049562f99e7db0e$export$f9c6924e160136d1 as GroupContext, $72a5793c14baf454$export$8b251419efc915eb as Header, $5cb03073d3f54797$export$a8a3e93435678ff9 as Heading, $5cb03073d3f54797$export$d688439359537581 as HeadingContext, $3985021b0ad6602f$export$f5b8910cec6cf069 as Input, $3985021b0ad6602f$export$37fb8590cf2c088c as InputContext, $7135fc7d473fd974$export$6d08773d2e66f8f2 as Item, $7135fc7d473fd974$export$6e2c8f0811a474ce as Section, $7135fc7d473fd974$export$fb8073518f34e6ec as Collection, $63df2425e2108aa8$export$16e4d70cc375e707 as Keyboard, $63df2425e2108aa8$export$744d98a3b8a94e1c as KeyboardContext, $01b77f81d0f07f68$export$b04be29aa201d4f5 as Label, $01b77f81d0f07f68$export$75b6ee27786ba447 as LabelContext, $4f118338184dc1d9$export$a6c7ac8248d6e38a as Link, $4f118338184dc1d9$export$e2509388b49734e7 as LinkContext, $eed445e0843c11d0$export$41f133550aa26f48 as ListBox, $eed445e0843c11d0$export$7ff8f37d2d81a48d as ListBoxContext, $3674c52c6b3c5bce$export$d9b273488cd8ce6f as Menu, $3674c52c6b3c5bce$export$27d2ad3c5815583e as MenuTrigger, $3674c52c6b3c5bce$export$c7e742effb1c51e2 as MenuContext, $c0c9ced265f3594c$export$62e3ae2a4090b879 as Meter, $c0c9ced265f3594c$export$8b645da15a96b44f as MeterContext, $f3f84453ead64de5$export$2b77a92f1a5ad772 as Modal, $f3f84453ead64de5$export$8948f78d83984c69 as ModalOverlay, $f3f84453ead64de5$export$ab57792b9b6974a6 as ModalContext, $b91743d66a0ed188$export$63c5fa0b2fdccd2e as NumberField, $b91743d66a0ed188$export$b414a48cf5dcbc11 as NumberFieldContext, $44f671af83e7d9e0$export$746d02f47f4d381 as OverlayArrow, $07b14b47974efb58$export$5b6b19405a83ff9d as Popover, $07b14b47974efb58$export$9b9a0cd73afb7ca4 as PopoverContext, $0393f8ab869a0f1a$export$c17561cb55d4db30 as ProgressBar, $0393f8ab869a0f1a$export$e9f3bf65a26ce129 as ProgressBarContext, $64fa3d84918910a7$export$2881499e37b75b9a as Provider, $64fa3d84918910a7$export$29f1550f4b0d4415 as useContextProps, $b6c3ddc6086f204d$export$a98f0dcb43a68a25 as RadioGroup, $b6c3ddc6086f204d$export$d7b12c4107be0d61 as Radio, $b6c3ddc6086f204d$export$a79eda4ff50e30b6 as RadioGroupContext, $440f4836bcb56932$export$b94867ecbd698f21 as SearchField, $440f4836bcb56932$export$d1c4e4c63cb03a11 as SearchFieldContext, $82d7e5349645de74$export$ef9b1a59e592288f as Select, $82d7e5349645de74$export$e288731fd71264f0 as SelectValue, $82d7e5349645de74$export$7540cee5be7dc19b as SelectContext, $431f98aba6844401$export$1ff3c3f08ae963c0 as Separator, $431f98aba6844401$export$6615d83f6de245ce as SeparatorContext, $6f909507e6374d18$export$472062a354075cee as Slider, $6f909507e6374d18$export$a590f758a961cb5b as SliderOutput, $6f909507e6374d18$export$105594979f116971 as SliderTrack, $6f909507e6374d18$export$2c1b491743890dec as SliderThumb, $6f909507e6374d18$export$e99164f0030f3bff as SliderContext, $8e59e948500a8fe1$export$b5d5cf8927ab7262 as Switch, $8e59e948500a8fe1$export$8699e3b644d5a28a as SwitchContext, $1910c06f0ca9905e$export$54ec01a60f47d33d as Table, $1910c06f0ca9905e$export$b59bdbef9ce70de2 as Row, $1910c06f0ca9905e$export$f6f0c3fe4ec306ea as Cell, $1910c06f0ca9905e$export$816b5d811295e6bc as Column, $1910c06f0ca9905e$export$f850895b287ef28e as TableHeader, $1910c06f0ca9905e$export$76ccd210b9029917 as TableBody, $1910c06f0ca9905e$export$93e4b0b2cc49b648 as TableContext, $1910c06f0ca9905e$export$fddc468cd8cb4db9 as useTableOptions, $5e8ad37a45e1c704$export$b2539bed5023c21c as Tabs, $5e8ad37a45e1c704$export$e51a686c67fdaa2d as TabList, $5e8ad37a45e1c704$export$3d96ec278d3efce4 as TabPanel, $5e8ad37a45e1c704$export$3e41faf802a29e71 as Tab, $5e8ad37a45e1c704$export$cfa7aa87c26e7d1f as TabsContext, $eaf9e70818b436db$export$67ea30858aaf75e3 as TagGroup, $eaf9e70818b436db$export$5b07b5dd2cbd96e3 as TagGroupContext, $eaf9e70818b436db$export$f9fef0f55402315b as TagList, $eaf9e70818b436db$export$3288d34c523a1192 as Tag, $514c0188e459b4c0$export$5f1af8db9871e1d6 as Text, $514c0188e459b4c0$export$9afb8bc826b033ea as TextContext, $bcdf0525bf22703d$export$2c73285ae9390cec as TextField, $bcdf0525bf22703d$export$2129e27b3ef0d483 as TextFieldContext, $efde0372d7a700fe$export$d2b052e7b4be1756 as ToggleButton, $efde0372d7a700fe$export$43506d75ebd2e218 as ToggleButtonContext, $4e3b923658d69c60$export$8c610744efcf8a1d as TooltipTrigger, $4e3b923658d69c60$export$28c660c63b792dea as Tooltip, $d8f176866e6dc039$export$2cfc5be7a55829f6 as useDragAndDrop, $d8f176866e6dc039$export$62ed72bc21f6b8a6 as DropIndicator, $d8f176866e6dc039$export$f55761759794cf55 as DropIndicatorContext, $67da31f5140672c4$re_export$DIRECTORY_DRAG_TYPE as DIRECTORY_DRAG_TYPE, $67da31f5140672c4$re_export$isDirectoryDropItem as isDirectoryDropItem, $67da31f5140672c4$re_export$isFileDropItem as isFileDropItem, $67da31f5140672c4$re_export$isTextDropItem as isTextDropItem, $67da31f5140672c4$re_export$SSRProvider as SSRProvider};
|
|
5223
5811
|
//# sourceMappingURL=module.js.map
|