@eightshift/ui-components 5.0.10 → 5.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Collection-uTAXq9Br.js → Collection-BRJOMbOa.js} +12 -7
- package/dist/{Dialog-CmAxaSUv.js → Dialog-D6EdDPeu.js} +8 -8
- package/dist/{useFormValidation-Dy0PXJg5.js → Form-Bnyyv3Im.js} +6 -4
- package/dist/{Group-DDPhPPTQ.js → Group-LBogWgyp.js} +2 -2
- package/dist/{Input-BmDS8Juy.js → Input-DfSBLhDx.js} +1 -1
- package/dist/List-BLeHBkfx.js +590 -0
- package/dist/{ListBox-_nDFq8-H.js → ListBox-BY3gwI8c.js} +3 -3
- package/dist/Select-BebwUgKB.js +764 -0
- package/dist/Separator-CTQWg_HO.js +1111 -0
- package/dist/TextField-o2U-uBWv.js +133 -0
- package/dist/assets/style-admin.css +264 -150
- package/dist/assets/style-editor.css +264 -150
- package/dist/assets/style.css +264 -150
- package/dist/assets/wp-font-enhancements.css +1 -1
- package/dist/assets/wp-ui-enhancements.css +1 -1
- package/dist/components/base-control/base-control.js +1 -1
- package/dist/components/breakpoint-preview/breakpoint-preview.js +3 -4
- package/dist/components/button/button.js +3 -3
- package/dist/components/checkbox/checkbox.js +1 -2
- package/dist/components/color-pickers/color-picker.js +7 -9
- package/dist/components/color-pickers/color-swatch.js +1 -1
- package/dist/components/color-pickers/gradient-editor.js +19 -25
- package/dist/components/color-pickers/solid-color-picker.js +27 -27
- package/dist/components/component-toggle/component-toggle.js +1 -1
- package/dist/components/draggable/draggable-handle.js +2 -2
- package/dist/components/draggable/draggable.js +5 -5
- package/dist/components/draggable-list/draggable-list-item.js +2 -2
- package/dist/components/draggable-list/draggable-list.js +5 -5
- package/dist/components/expandable/expandable.js +1 -1
- package/dist/components/index.js +5 -5
- package/dist/components/input-field/input-field.js +14 -129
- package/dist/components/item-collection/item-collection.js +1 -1
- package/dist/components/link-input/link-input.js +1463 -17
- package/dist/components/matrix-align/matrix-align.js +11 -14
- package/dist/components/menu/menu.js +4 -8
- package/dist/components/modal/modal.js +30 -31
- package/dist/components/number-picker/number-picker.js +9 -10
- package/dist/components/option-select/option-select.js +140 -156
- package/dist/components/placeholders/file-placeholder.js +1 -1
- package/dist/components/placeholders/image-placeholder.js +3 -3
- package/dist/components/placeholders/media-placeholder.js +2 -2
- package/dist/components/popover/popover.js +10 -5
- package/dist/components/radio/radio.js +4 -5
- package/dist/components/repeater/repeater-item.js +1 -1
- package/dist/components/repeater/repeater.js +6 -6
- package/dist/components/responsive/mini-responsive.js +45 -47
- package/dist/components/responsive/responsive-legacy.js +51 -55
- package/dist/components/responsive/responsive.js +47 -49
- package/dist/components/responsive-preview/responsive-preview.js +12 -15
- package/dist/components/select/async-multi-select.js +4 -4
- package/dist/components/select/async-single-select.js +1 -1
- package/dist/components/select/multi-select-components.js +1 -1
- package/dist/components/select/multi-select.js +4 -4
- package/dist/components/select/shared.js +2 -2
- package/dist/components/select/single-select.js +1 -1
- package/dist/components/select/styles.js +3 -3
- package/dist/components/select/v2/async-select.js +216 -158
- package/dist/components/select/v2/shared.js +29 -20
- package/dist/components/select/v2/single-select.js +203 -851
- package/dist/components/slider/column-config-slider.js +2 -2
- package/dist/components/slider/slider.js +2 -2
- package/dist/components/slider/utils.js +1 -1
- package/dist/components/tabs/tabs.js +7 -8
- package/dist/components/toggle/switch.js +4 -3
- package/dist/components/toggle-button/toggle-button.js +1 -1
- package/dist/{default-i18n-CT_oS1Fy.js → default-i18n-OFa3zAyB.js} +5 -9
- package/dist/icons/icons.js +141 -141
- package/dist/icons/jsx-svg.js +3 -4
- package/dist/index.js +4 -4
- package/dist/{multi-select-components-Sp-JEFEX.js → multi-select-components-BcKzA24f.js} +3 -3
- package/dist/{react-jsx-parser.min-DZCiis5V.js → react-jsx-parser.min-LF707GK8.js} +312 -332
- package/dist/useAsyncList-fLtZMvJO.js +420 -0
- package/dist/useFilter-BR5z1A4Q.js +50 -0
- package/dist/{useListState-9Hq_FiRF.js → useListState-BrZ2XvDS.js} +1 -1
- package/dist/{useNumberField-D0u2bh8g.js → useNumberField-y0dLc_6m.js} +2 -2
- package/dist/{useSingleSelectListState-DqhemUIh.js → useSingleSelectListState-Bh46cRXs.js} +1 -1
- package/dist/utilities/array-helpers.js +4 -7
- package/dist/utilities/es-dash.js +21 -3
- package/dist/utilities/index.js +2 -1
- package/dist/utilities/text-helpers.js +3 -3
- package/package.json +9 -9
- package/dist/ComboBox-BANSEKnb.js +0 -1915
- package/dist/Form-Cq3fu75_.js +0 -5
- package/dist/List-CZMUbkFU.js +0 -593
- package/dist/Separator-BN3mjL6q.js +0 -332
|
@@ -0,0 +1,1111 @@
|
|
|
1
|
+
import { o as $cc38e7bd3fc7b213$export$2bb74740c4e19def, p as $feb5ffebff200149$export$c3d8340acf92597f, i as $ae20dd8cbca75726$export$d6daf82dcd84e87c, m as $c5a24bc478652b5f$export$1005530eda016c13, q as $5671b20cf9b562b2$export$831c820ad60f9d12, r as $55f9b1ae81f22853$export$76e4e37e5339496d, s as $5671b20cf9b562b2$export$447a38995de2c711, t as $55f9b1ae81f22853$export$6c5dc7e81d2cc29a, n as $55f9b1ae81f22853$export$2b35b76d2e30e129, u as $21f1aa98acb08317$export$16792effe837dba3, d as $e1995378a142960e$export$18af5c7a9e9b3664 } from "./Collection-BRJOMbOa.js";
|
|
2
|
+
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-BbYZoHvX.js";
|
|
3
|
+
import React__default, { useMemo, createContext, useRef, useEffect, useCallback, useState } from "react";
|
|
4
|
+
import { b as $2d73ec29415bd339$export$712718f7aec83d5, a as $3985021b0ad6602f$export$37fb8590cf2c088c } from "./Input-DfSBLhDx.js";
|
|
5
|
+
import { p as $ff5963eb1fccf552$export$e08e3b67e392101e, a as $64fa3d84918910a7$export$29f1550f4b0d4415, $ as $64fa3d84918910a7$export$fabf2dc03a41866e, g as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, h as $64fa3d84918910a7$export$ef03459518577ad4, b as $64fa3d84918910a7$export$4d86445c2cf5e3, i as $64fa3d84918910a7$export$2881499e37b75b9a, d as $3ef42575df84b30b$export$9d1611c77c2fe928, e as $bdb11010cef70236$export$f680877a34711e37, f as $8ae05eaa5c114e9c$export$7f54fc3180508a52, l as $df56164dff5785e2$export$4338b53315abf666, m as $5dc95899b306f630$export$c9058316764c140e } from "./utils-CZt7LCbO.js";
|
|
6
|
+
import { a as $d2b4bc8c273e7be6$export$24d547caef80ccd1 } from "./Button-DH22t_SM.js";
|
|
7
|
+
import { $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "./FieldError-DHrSdE_Q.js";
|
|
8
|
+
import { $ as $d3e0e05bdfcf66bd$export$c24727297075ec6a } from "./Form-Bnyyv3Im.js";
|
|
9
|
+
import { $ as $a049562f99e7db0e$export$f9c6924e160136d1 } from "./Group-LBogWgyp.js";
|
|
10
|
+
import { a as $01b77f81d0f07f68$export$75b6ee27786ba447 } from "./Label-JS_ob-kh.js";
|
|
11
|
+
import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "./Text-BuJgePCv.js";
|
|
12
|
+
import { $ as $f39a9eba43920ace$export$86427a43e3e48ebb } from "./Hidden-rE6uR-lr.js";
|
|
13
|
+
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-EDDcM64A.js";
|
|
14
|
+
import { b as $458b0a5536c1a7cf$export$40bfa8c7b0832715, i as $d4ee10de306f2510$export$cd4e5573fbe2b576, d as $431fbd86ca7dc216$export$b204af158042fbac, x as $507fabe10e71c6fb$export$630ff653c5ada6a9 } from "./useHover-C2SkI1Fn.js";
|
|
15
|
+
import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-C9GO0IDB.js";
|
|
16
|
+
import { b as $bcdf0525bf22703d$export$2129e27b3ef0d483 } from "./TextField-o2U-uBWv.js";
|
|
17
|
+
import { $ as $313b98861ee5dd6c$export$d6875122194c7b44 } from "./useLabels-B7-lUnAF.js";
|
|
18
|
+
function $62d8ded9296f3872$export$cfa2225e87938781(node, checkForOverflow) {
|
|
19
|
+
let scrollableNode = node;
|
|
20
|
+
if ($cc38e7bd3fc7b213$export$2bb74740c4e19def(scrollableNode, checkForOverflow)) scrollableNode = scrollableNode.parentElement;
|
|
21
|
+
while (scrollableNode && !$cc38e7bd3fc7b213$export$2bb74740c4e19def(scrollableNode, checkForOverflow)) scrollableNode = scrollableNode.parentElement;
|
|
22
|
+
return scrollableNode || document.scrollingElement || document.documentElement;
|
|
23
|
+
}
|
|
24
|
+
let $325a3faab7a68acd$var$cache = /* @__PURE__ */ new Map();
|
|
25
|
+
function $325a3faab7a68acd$export$a16aca283550c30d(options) {
|
|
26
|
+
let { locale } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7();
|
|
27
|
+
let cacheKey = locale + (options ? Object.entries(options).sort((a, b) => a[0] < b[0] ? -1 : 1).join() : "");
|
|
28
|
+
if ($325a3faab7a68acd$var$cache.has(cacheKey)) return $325a3faab7a68acd$var$cache.get(cacheKey);
|
|
29
|
+
let formatter = new Intl.Collator(locale, options);
|
|
30
|
+
$325a3faab7a68acd$var$cache.set(cacheKey, formatter);
|
|
31
|
+
return formatter;
|
|
32
|
+
}
|
|
33
|
+
class $657e4dc4a6e88df0$export$8f5ed9ff9f511381 {
|
|
34
|
+
getItemRect(key) {
|
|
35
|
+
let container = this.ref.current;
|
|
36
|
+
if (!container) return null;
|
|
37
|
+
let item = key != null ? $feb5ffebff200149$export$c3d8340acf92597f(this.ref, key) : null;
|
|
38
|
+
if (!item) return null;
|
|
39
|
+
let containerRect = container.getBoundingClientRect();
|
|
40
|
+
let itemRect = item.getBoundingClientRect();
|
|
41
|
+
return {
|
|
42
|
+
x: itemRect.left - containerRect.left + container.scrollLeft,
|
|
43
|
+
y: itemRect.top - containerRect.top + container.scrollTop,
|
|
44
|
+
width: itemRect.width,
|
|
45
|
+
height: itemRect.height
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
getContentSize() {
|
|
49
|
+
let container = this.ref.current;
|
|
50
|
+
var _container_scrollWidth, _container_scrollHeight;
|
|
51
|
+
return {
|
|
52
|
+
width: (_container_scrollWidth = container === null || container === void 0 ? void 0 : container.scrollWidth) !== null && _container_scrollWidth !== void 0 ? _container_scrollWidth : 0,
|
|
53
|
+
height: (_container_scrollHeight = container === null || container === void 0 ? void 0 : container.scrollHeight) !== null && _container_scrollHeight !== void 0 ? _container_scrollHeight : 0
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
getVisibleRect() {
|
|
57
|
+
let container = this.ref.current;
|
|
58
|
+
var _container_scrollLeft, _container_scrollTop, _container_offsetWidth, _container_offsetHeight;
|
|
59
|
+
return {
|
|
60
|
+
x: (_container_scrollLeft = container === null || container === void 0 ? void 0 : container.scrollLeft) !== null && _container_scrollLeft !== void 0 ? _container_scrollLeft : 0,
|
|
61
|
+
y: (_container_scrollTop = container === null || container === void 0 ? void 0 : container.scrollTop) !== null && _container_scrollTop !== void 0 ? _container_scrollTop : 0,
|
|
62
|
+
width: (_container_offsetWidth = container === null || container === void 0 ? void 0 : container.offsetWidth) !== null && _container_offsetWidth !== void 0 ? _container_offsetWidth : 0,
|
|
63
|
+
height: (_container_offsetHeight = container === null || container === void 0 ? void 0 : container.offsetHeight) !== null && _container_offsetHeight !== void 0 ? _container_offsetHeight : 0
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
constructor(ref) {
|
|
67
|
+
this.ref = ref;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
class $2a25aae57d74318e$export$a05409b8bb224a5a {
|
|
71
|
+
isDisabled(item) {
|
|
72
|
+
var _item_props;
|
|
73
|
+
return this.disabledBehavior === "all" && (((_item_props = item.props) === null || _item_props === void 0 ? void 0 : _item_props.isDisabled) || this.disabledKeys.has(item.key));
|
|
74
|
+
}
|
|
75
|
+
findNextNonDisabled(key, getNext) {
|
|
76
|
+
let nextKey = key;
|
|
77
|
+
while (nextKey != null) {
|
|
78
|
+
let item = this.collection.getItem(nextKey);
|
|
79
|
+
if ((item === null || item === void 0 ? void 0 : item.type) === "item" && !this.isDisabled(item)) return nextKey;
|
|
80
|
+
nextKey = getNext(nextKey);
|
|
81
|
+
}
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
getNextKey(key) {
|
|
85
|
+
let nextKey = key;
|
|
86
|
+
nextKey = this.collection.getKeyAfter(nextKey);
|
|
87
|
+
return this.findNextNonDisabled(nextKey, (key2) => this.collection.getKeyAfter(key2));
|
|
88
|
+
}
|
|
89
|
+
getPreviousKey(key) {
|
|
90
|
+
let nextKey = key;
|
|
91
|
+
nextKey = this.collection.getKeyBefore(nextKey);
|
|
92
|
+
return this.findNextNonDisabled(nextKey, (key2) => this.collection.getKeyBefore(key2));
|
|
93
|
+
}
|
|
94
|
+
findKey(key, nextKey, shouldSkip) {
|
|
95
|
+
let tempKey = key;
|
|
96
|
+
let itemRect = this.layoutDelegate.getItemRect(tempKey);
|
|
97
|
+
if (!itemRect || tempKey == null) return null;
|
|
98
|
+
let prevRect = itemRect;
|
|
99
|
+
do {
|
|
100
|
+
tempKey = nextKey(tempKey);
|
|
101
|
+
if (tempKey == null) break;
|
|
102
|
+
itemRect = this.layoutDelegate.getItemRect(tempKey);
|
|
103
|
+
} while (itemRect && shouldSkip(prevRect, itemRect) && tempKey != null);
|
|
104
|
+
return tempKey;
|
|
105
|
+
}
|
|
106
|
+
isSameRow(prevRect, itemRect) {
|
|
107
|
+
return prevRect.y === itemRect.y || prevRect.x !== itemRect.x;
|
|
108
|
+
}
|
|
109
|
+
isSameColumn(prevRect, itemRect) {
|
|
110
|
+
return prevRect.x === itemRect.x || prevRect.y !== itemRect.y;
|
|
111
|
+
}
|
|
112
|
+
getKeyBelow(key) {
|
|
113
|
+
if (this.layout === "grid" && this.orientation === "vertical") return this.findKey(key, (key2) => this.getNextKey(key2), this.isSameRow);
|
|
114
|
+
else return this.getNextKey(key);
|
|
115
|
+
}
|
|
116
|
+
getKeyAbove(key) {
|
|
117
|
+
if (this.layout === "grid" && this.orientation === "vertical") return this.findKey(key, (key2) => this.getPreviousKey(key2), this.isSameRow);
|
|
118
|
+
else return this.getPreviousKey(key);
|
|
119
|
+
}
|
|
120
|
+
getNextColumn(key, right) {
|
|
121
|
+
return right ? this.getPreviousKey(key) : this.getNextKey(key);
|
|
122
|
+
}
|
|
123
|
+
getKeyRightOf(key) {
|
|
124
|
+
let layoutDelegateMethod = this.direction === "ltr" ? "getKeyRightOf" : "getKeyLeftOf";
|
|
125
|
+
if (this.layoutDelegate[layoutDelegateMethod]) {
|
|
126
|
+
key = this.layoutDelegate[layoutDelegateMethod](key);
|
|
127
|
+
return this.findNextNonDisabled(key, (key2) => this.layoutDelegate[layoutDelegateMethod](key2));
|
|
128
|
+
}
|
|
129
|
+
if (this.layout === "grid") {
|
|
130
|
+
if (this.orientation === "vertical") return this.getNextColumn(key, this.direction === "rtl");
|
|
131
|
+
else return this.findKey(key, (key2) => this.getNextColumn(key2, this.direction === "rtl"), this.isSameColumn);
|
|
132
|
+
} else if (this.orientation === "horizontal") return this.getNextColumn(key, this.direction === "rtl");
|
|
133
|
+
return null;
|
|
134
|
+
}
|
|
135
|
+
getKeyLeftOf(key) {
|
|
136
|
+
let layoutDelegateMethod = this.direction === "ltr" ? "getKeyLeftOf" : "getKeyRightOf";
|
|
137
|
+
if (this.layoutDelegate[layoutDelegateMethod]) {
|
|
138
|
+
key = this.layoutDelegate[layoutDelegateMethod](key);
|
|
139
|
+
return this.findNextNonDisabled(key, (key2) => this.layoutDelegate[layoutDelegateMethod](key2));
|
|
140
|
+
}
|
|
141
|
+
if (this.layout === "grid") {
|
|
142
|
+
if (this.orientation === "vertical") return this.getNextColumn(key, this.direction === "ltr");
|
|
143
|
+
else return this.findKey(key, (key2) => this.getNextColumn(key2, this.direction === "ltr"), this.isSameColumn);
|
|
144
|
+
} else if (this.orientation === "horizontal") return this.getNextColumn(key, this.direction === "ltr");
|
|
145
|
+
return null;
|
|
146
|
+
}
|
|
147
|
+
getFirstKey() {
|
|
148
|
+
let key = this.collection.getFirstKey();
|
|
149
|
+
return this.findNextNonDisabled(key, (key2) => this.collection.getKeyAfter(key2));
|
|
150
|
+
}
|
|
151
|
+
getLastKey() {
|
|
152
|
+
let key = this.collection.getLastKey();
|
|
153
|
+
return this.findNextNonDisabled(key, (key2) => this.collection.getKeyBefore(key2));
|
|
154
|
+
}
|
|
155
|
+
getKeyPageAbove(key) {
|
|
156
|
+
let menu = this.ref.current;
|
|
157
|
+
let itemRect = this.layoutDelegate.getItemRect(key);
|
|
158
|
+
if (!itemRect) return null;
|
|
159
|
+
if (menu && !$cc38e7bd3fc7b213$export$2bb74740c4e19def(menu)) return this.getFirstKey();
|
|
160
|
+
let nextKey = key;
|
|
161
|
+
if (this.orientation === "horizontal") {
|
|
162
|
+
let pageX = Math.max(0, itemRect.x + itemRect.width - this.layoutDelegate.getVisibleRect().width);
|
|
163
|
+
while (itemRect && itemRect.x > pageX && nextKey != null) {
|
|
164
|
+
nextKey = this.getKeyAbove(nextKey);
|
|
165
|
+
itemRect = nextKey == null ? null : this.layoutDelegate.getItemRect(nextKey);
|
|
166
|
+
}
|
|
167
|
+
} else {
|
|
168
|
+
let pageY = Math.max(0, itemRect.y + itemRect.height - this.layoutDelegate.getVisibleRect().height);
|
|
169
|
+
while (itemRect && itemRect.y > pageY && nextKey != null) {
|
|
170
|
+
nextKey = this.getKeyAbove(nextKey);
|
|
171
|
+
itemRect = nextKey == null ? null : this.layoutDelegate.getItemRect(nextKey);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
return nextKey !== null && nextKey !== void 0 ? nextKey : this.getFirstKey();
|
|
175
|
+
}
|
|
176
|
+
getKeyPageBelow(key) {
|
|
177
|
+
let menu = this.ref.current;
|
|
178
|
+
let itemRect = this.layoutDelegate.getItemRect(key);
|
|
179
|
+
if (!itemRect) return null;
|
|
180
|
+
if (menu && !$cc38e7bd3fc7b213$export$2bb74740c4e19def(menu)) return this.getLastKey();
|
|
181
|
+
let nextKey = key;
|
|
182
|
+
if (this.orientation === "horizontal") {
|
|
183
|
+
let pageX = Math.min(this.layoutDelegate.getContentSize().width, itemRect.y - itemRect.width + this.layoutDelegate.getVisibleRect().width);
|
|
184
|
+
while (itemRect && itemRect.x < pageX && nextKey != null) {
|
|
185
|
+
nextKey = this.getKeyBelow(nextKey);
|
|
186
|
+
itemRect = nextKey == null ? null : this.layoutDelegate.getItemRect(nextKey);
|
|
187
|
+
}
|
|
188
|
+
} else {
|
|
189
|
+
let pageY = Math.min(this.layoutDelegate.getContentSize().height, itemRect.y - itemRect.height + this.layoutDelegate.getVisibleRect().height);
|
|
190
|
+
while (itemRect && itemRect.y < pageY && nextKey != null) {
|
|
191
|
+
nextKey = this.getKeyBelow(nextKey);
|
|
192
|
+
itemRect = nextKey == null ? null : this.layoutDelegate.getItemRect(nextKey);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
return nextKey !== null && nextKey !== void 0 ? nextKey : this.getLastKey();
|
|
196
|
+
}
|
|
197
|
+
getKeyForSearch(search, fromKey) {
|
|
198
|
+
if (!this.collator) return null;
|
|
199
|
+
let collection = this.collection;
|
|
200
|
+
let key = fromKey || this.getFirstKey();
|
|
201
|
+
while (key != null) {
|
|
202
|
+
let item = collection.getItem(key);
|
|
203
|
+
if (!item) return null;
|
|
204
|
+
let substring = item.textValue.slice(0, search.length);
|
|
205
|
+
if (item.textValue && this.collator.compare(substring, search) === 0) return key;
|
|
206
|
+
key = this.getNextKey(key);
|
|
207
|
+
}
|
|
208
|
+
return null;
|
|
209
|
+
}
|
|
210
|
+
constructor(...args) {
|
|
211
|
+
if (args.length === 1) {
|
|
212
|
+
let opts = args[0];
|
|
213
|
+
this.collection = opts.collection;
|
|
214
|
+
this.ref = opts.ref;
|
|
215
|
+
this.collator = opts.collator;
|
|
216
|
+
this.disabledKeys = opts.disabledKeys || /* @__PURE__ */ new Set();
|
|
217
|
+
this.disabledBehavior = opts.disabledBehavior || "all";
|
|
218
|
+
this.orientation = opts.orientation || "vertical";
|
|
219
|
+
this.direction = opts.direction;
|
|
220
|
+
this.layout = opts.layout || "stack";
|
|
221
|
+
this.layoutDelegate = opts.layoutDelegate || new $657e4dc4a6e88df0$export$8f5ed9ff9f511381(opts.ref);
|
|
222
|
+
} else {
|
|
223
|
+
this.collection = args[0];
|
|
224
|
+
this.disabledKeys = args[1];
|
|
225
|
+
this.ref = args[2];
|
|
226
|
+
this.collator = args[3];
|
|
227
|
+
this.layout = "stack";
|
|
228
|
+
this.orientation = "vertical";
|
|
229
|
+
this.disabledBehavior = "all";
|
|
230
|
+
this.layoutDelegate = new $657e4dc4a6e88df0$export$8f5ed9ff9f511381(this.ref);
|
|
231
|
+
}
|
|
232
|
+
if (this.layout === "stack" && this.orientation === "vertical") {
|
|
233
|
+
this.getKeyLeftOf = void 0;
|
|
234
|
+
this.getKeyRightOf = void 0;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
function $982254629710d113$export$b95089534ab7c1fd(props) {
|
|
239
|
+
let { selectionManager, collection, disabledKeys, ref, keyboardDelegate, layoutDelegate } = props;
|
|
240
|
+
let collator = $325a3faab7a68acd$export$a16aca283550c30d({
|
|
241
|
+
usage: "search",
|
|
242
|
+
sensitivity: "base"
|
|
243
|
+
});
|
|
244
|
+
let disabledBehavior = selectionManager.disabledBehavior;
|
|
245
|
+
let delegate = useMemo(() => keyboardDelegate || new $2a25aae57d74318e$export$a05409b8bb224a5a({
|
|
246
|
+
collection,
|
|
247
|
+
disabledKeys,
|
|
248
|
+
disabledBehavior,
|
|
249
|
+
ref,
|
|
250
|
+
collator,
|
|
251
|
+
layoutDelegate
|
|
252
|
+
}), [
|
|
253
|
+
keyboardDelegate,
|
|
254
|
+
layoutDelegate,
|
|
255
|
+
collection,
|
|
256
|
+
disabledKeys,
|
|
257
|
+
ref,
|
|
258
|
+
collator,
|
|
259
|
+
disabledBehavior
|
|
260
|
+
]);
|
|
261
|
+
let { collectionProps } = $ae20dd8cbca75726$export$d6daf82dcd84e87c({
|
|
262
|
+
...props,
|
|
263
|
+
ref,
|
|
264
|
+
selectionManager,
|
|
265
|
+
keyboardDelegate: delegate
|
|
266
|
+
});
|
|
267
|
+
return {
|
|
268
|
+
listProps: collectionProps
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
const $453cc9f0df89c0a5$var$cache = /* @__PURE__ */ new WeakMap();
|
|
272
|
+
function $453cc9f0df89c0a5$export$77d5aafae4e095b2(collection) {
|
|
273
|
+
let count = $453cc9f0df89c0a5$var$cache.get(collection);
|
|
274
|
+
if (count != null) return count;
|
|
275
|
+
let counter = 0;
|
|
276
|
+
let countItems = (items) => {
|
|
277
|
+
for (let item of items) {
|
|
278
|
+
if (item.type === "section") countItems($c5a24bc478652b5f$export$1005530eda016c13(item, collection));
|
|
279
|
+
else if (item.type === "item") counter++;
|
|
280
|
+
}
|
|
281
|
+
};
|
|
282
|
+
countItems(collection);
|
|
283
|
+
$453cc9f0df89c0a5$var$cache.set(collection, counter);
|
|
284
|
+
return counter;
|
|
285
|
+
}
|
|
286
|
+
var $03c9a1a10de12f06$exports = {};
|
|
287
|
+
$03c9a1a10de12f06$exports = {
|
|
288
|
+
"Clear search": `مسح البحث`
|
|
289
|
+
};
|
|
290
|
+
var $4da0c2ffa4ba4159$exports = {};
|
|
291
|
+
$4da0c2ffa4ba4159$exports = {
|
|
292
|
+
"Clear search": `Изчистване на търсене`
|
|
293
|
+
};
|
|
294
|
+
var $8c59fd0c2c96821b$exports = {};
|
|
295
|
+
$8c59fd0c2c96821b$exports = {
|
|
296
|
+
"Clear search": `Vymazat hledání`
|
|
297
|
+
};
|
|
298
|
+
var $0a371f9c1df8120f$exports = {};
|
|
299
|
+
$0a371f9c1df8120f$exports = {
|
|
300
|
+
"Clear search": `Ryd søgning`
|
|
301
|
+
};
|
|
302
|
+
var $67f4d0b0de9f8a52$exports = {};
|
|
303
|
+
$67f4d0b0de9f8a52$exports = {
|
|
304
|
+
"Clear search": `Suche zurücksetzen`
|
|
305
|
+
};
|
|
306
|
+
var $72a312d948f0214b$exports = {};
|
|
307
|
+
$72a312d948f0214b$exports = {
|
|
308
|
+
"Clear search": `Απαλοιφή αναζήτησης`
|
|
309
|
+
};
|
|
310
|
+
var $5012d21d933388c1$exports = {};
|
|
311
|
+
$5012d21d933388c1$exports = {
|
|
312
|
+
"Clear search": `Clear search`
|
|
313
|
+
};
|
|
314
|
+
var $0159854399308e2e$exports = {};
|
|
315
|
+
$0159854399308e2e$exports = {
|
|
316
|
+
"Clear search": `Borrar búsqueda`
|
|
317
|
+
};
|
|
318
|
+
var $390613981d970276$exports = {};
|
|
319
|
+
$390613981d970276$exports = {
|
|
320
|
+
"Clear search": `Tühjenda otsing`
|
|
321
|
+
};
|
|
322
|
+
var $961ae0833f811705$exports = {};
|
|
323
|
+
$961ae0833f811705$exports = {
|
|
324
|
+
"Clear search": `Tyhjennä haku`
|
|
325
|
+
};
|
|
326
|
+
var $26d76742decfd829$exports = {};
|
|
327
|
+
$26d76742decfd829$exports = {
|
|
328
|
+
"Clear search": `Effacer la recherche`
|
|
329
|
+
};
|
|
330
|
+
var $92ef254c82a5c769$exports = {};
|
|
331
|
+
$92ef254c82a5c769$exports = {
|
|
332
|
+
"Clear search": `נקה חיפוש`
|
|
333
|
+
};
|
|
334
|
+
var $e0321b43bdefb8b3$exports = {};
|
|
335
|
+
$e0321b43bdefb8b3$exports = {
|
|
336
|
+
"Clear search": `Obriši pretragu`
|
|
337
|
+
};
|
|
338
|
+
var $0c1ee0b8d50940d9$exports = {};
|
|
339
|
+
$0c1ee0b8d50940d9$exports = {
|
|
340
|
+
"Clear search": `Keresés törlése`
|
|
341
|
+
};
|
|
342
|
+
var $b09198915a38946f$exports = {};
|
|
343
|
+
$b09198915a38946f$exports = {
|
|
344
|
+
"Clear search": `Cancella ricerca`
|
|
345
|
+
};
|
|
346
|
+
var $3a9a3d180c3145c0$exports = {};
|
|
347
|
+
$3a9a3d180c3145c0$exports = {
|
|
348
|
+
"Clear search": `検索をクリア`
|
|
349
|
+
};
|
|
350
|
+
var $b7a611726449f4a3$exports = {};
|
|
351
|
+
$b7a611726449f4a3$exports = {
|
|
352
|
+
"Clear search": `검색 지우기`
|
|
353
|
+
};
|
|
354
|
+
var $d9a3d49db610dd5c$exports = {};
|
|
355
|
+
$d9a3d49db610dd5c$exports = {
|
|
356
|
+
"Clear search": `Išvalyti iešką`
|
|
357
|
+
};
|
|
358
|
+
var $3ab64b73ea27c23a$exports = {};
|
|
359
|
+
$3ab64b73ea27c23a$exports = {
|
|
360
|
+
"Clear search": `Notīrīt meklēšanu`
|
|
361
|
+
};
|
|
362
|
+
var $bf5cce1b47d23baf$exports = {};
|
|
363
|
+
$bf5cce1b47d23baf$exports = {
|
|
364
|
+
"Clear search": `Tøm søk`
|
|
365
|
+
};
|
|
366
|
+
var $4e0c9a9a010e4598$exports = {};
|
|
367
|
+
$4e0c9a9a010e4598$exports = {
|
|
368
|
+
"Clear search": `Zoekactie wissen`
|
|
369
|
+
};
|
|
370
|
+
var $63cf4a75ec270508$exports = {};
|
|
371
|
+
$63cf4a75ec270508$exports = {
|
|
372
|
+
"Clear search": `Wyczyść zawartość wyszukiwania`
|
|
373
|
+
};
|
|
374
|
+
var $083b0cad27fdbd06$exports = {};
|
|
375
|
+
$083b0cad27fdbd06$exports = {
|
|
376
|
+
"Clear search": `Limpar pesquisa`
|
|
377
|
+
};
|
|
378
|
+
var $1b7f0864d830ba6d$exports = {};
|
|
379
|
+
$1b7f0864d830ba6d$exports = {
|
|
380
|
+
"Clear search": `Limpar pesquisa`
|
|
381
|
+
};
|
|
382
|
+
var $d6d2588377fc9718$exports = {};
|
|
383
|
+
$d6d2588377fc9718$exports = {
|
|
384
|
+
"Clear search": `Ştergeţi căutarea`
|
|
385
|
+
};
|
|
386
|
+
var $701c918a4653e946$exports = {};
|
|
387
|
+
$701c918a4653e946$exports = {
|
|
388
|
+
"Clear search": `Очистить поиск`
|
|
389
|
+
};
|
|
390
|
+
var $7cacc29a1e5f4fbe$exports = {};
|
|
391
|
+
$7cacc29a1e5f4fbe$exports = {
|
|
392
|
+
"Clear search": `Vymazať vyhľadávanie`
|
|
393
|
+
};
|
|
394
|
+
var $c63231bcc300d0df$exports = {};
|
|
395
|
+
$c63231bcc300d0df$exports = {
|
|
396
|
+
"Clear search": `Počisti iskanje`
|
|
397
|
+
};
|
|
398
|
+
var $b61510478bc0e6f6$exports = {};
|
|
399
|
+
$b61510478bc0e6f6$exports = {
|
|
400
|
+
"Clear search": `Obriši pretragu`
|
|
401
|
+
};
|
|
402
|
+
var $ce325e6dd3f9c37a$exports = {};
|
|
403
|
+
$ce325e6dd3f9c37a$exports = {
|
|
404
|
+
"Clear search": `Rensa sökning`
|
|
405
|
+
};
|
|
406
|
+
var $1f7e1cf2285af2b2$exports = {};
|
|
407
|
+
$1f7e1cf2285af2b2$exports = {
|
|
408
|
+
"Clear search": `Aramayı temizle`
|
|
409
|
+
};
|
|
410
|
+
var $2d999353ca652e34$exports = {};
|
|
411
|
+
$2d999353ca652e34$exports = {
|
|
412
|
+
"Clear search": `Очистити пошук`
|
|
413
|
+
};
|
|
414
|
+
var $117b536bfb1ae554$exports = {};
|
|
415
|
+
$117b536bfb1ae554$exports = {
|
|
416
|
+
"Clear search": `清除搜索`
|
|
417
|
+
};
|
|
418
|
+
var $525f6fa4ac26e278$exports = {};
|
|
419
|
+
$525f6fa4ac26e278$exports = {
|
|
420
|
+
"Clear search": `清除搜尋條件`
|
|
421
|
+
};
|
|
422
|
+
var $8112f8b883c0272d$exports = {};
|
|
423
|
+
$8112f8b883c0272d$exports = {
|
|
424
|
+
"ar-AE": $03c9a1a10de12f06$exports,
|
|
425
|
+
"bg-BG": $4da0c2ffa4ba4159$exports,
|
|
426
|
+
"cs-CZ": $8c59fd0c2c96821b$exports,
|
|
427
|
+
"da-DK": $0a371f9c1df8120f$exports,
|
|
428
|
+
"de-DE": $67f4d0b0de9f8a52$exports,
|
|
429
|
+
"el-GR": $72a312d948f0214b$exports,
|
|
430
|
+
"en-US": $5012d21d933388c1$exports,
|
|
431
|
+
"es-ES": $0159854399308e2e$exports,
|
|
432
|
+
"et-EE": $390613981d970276$exports,
|
|
433
|
+
"fi-FI": $961ae0833f811705$exports,
|
|
434
|
+
"fr-FR": $26d76742decfd829$exports,
|
|
435
|
+
"he-IL": $92ef254c82a5c769$exports,
|
|
436
|
+
"hr-HR": $e0321b43bdefb8b3$exports,
|
|
437
|
+
"hu-HU": $0c1ee0b8d50940d9$exports,
|
|
438
|
+
"it-IT": $b09198915a38946f$exports,
|
|
439
|
+
"ja-JP": $3a9a3d180c3145c0$exports,
|
|
440
|
+
"ko-KR": $b7a611726449f4a3$exports,
|
|
441
|
+
"lt-LT": $d9a3d49db610dd5c$exports,
|
|
442
|
+
"lv-LV": $3ab64b73ea27c23a$exports,
|
|
443
|
+
"nb-NO": $bf5cce1b47d23baf$exports,
|
|
444
|
+
"nl-NL": $4e0c9a9a010e4598$exports,
|
|
445
|
+
"pl-PL": $63cf4a75ec270508$exports,
|
|
446
|
+
"pt-BR": $083b0cad27fdbd06$exports,
|
|
447
|
+
"pt-PT": $1b7f0864d830ba6d$exports,
|
|
448
|
+
"ro-RO": $d6d2588377fc9718$exports,
|
|
449
|
+
"ru-RU": $701c918a4653e946$exports,
|
|
450
|
+
"sk-SK": $7cacc29a1e5f4fbe$exports,
|
|
451
|
+
"sl-SI": $c63231bcc300d0df$exports,
|
|
452
|
+
"sr-SP": $b61510478bc0e6f6$exports,
|
|
453
|
+
"sv-SE": $ce325e6dd3f9c37a$exports,
|
|
454
|
+
"tr-TR": $1f7e1cf2285af2b2$exports,
|
|
455
|
+
"uk-UA": $2d999353ca652e34$exports,
|
|
456
|
+
"zh-CN": $117b536bfb1ae554$exports,
|
|
457
|
+
"zh-TW": $525f6fa4ac26e278$exports
|
|
458
|
+
};
|
|
459
|
+
function $parcel$interopDefault$1(a) {
|
|
460
|
+
return a && a.__esModule ? a.default : a;
|
|
461
|
+
}
|
|
462
|
+
function $4d52238874b24f86$export$9bb30bbe003b82e0(props, state, inputRef) {
|
|
463
|
+
let stringFormatter = $fca6afa0e843324b$export$f12b703ca79dfbb1($parcel$interopDefault$1($8112f8b883c0272d$exports), "@react-aria/searchfield");
|
|
464
|
+
let { isDisabled, isReadOnly, onSubmit, onClear, type = "search" } = props;
|
|
465
|
+
let onKeyDown = (e) => {
|
|
466
|
+
const key = e.key;
|
|
467
|
+
if (key === "Enter" && (isDisabled || isReadOnly)) e.preventDefault();
|
|
468
|
+
if (isDisabled || isReadOnly) return;
|
|
469
|
+
if (key === "Enter" && onSubmit) {
|
|
470
|
+
e.preventDefault();
|
|
471
|
+
onSubmit(state.value);
|
|
472
|
+
}
|
|
473
|
+
if (key === "Escape") {
|
|
474
|
+
if (state.value === "" && (!inputRef.current || inputRef.current.value === "")) e.continuePropagation();
|
|
475
|
+
else {
|
|
476
|
+
e.preventDefault();
|
|
477
|
+
state.setValue("");
|
|
478
|
+
if (onClear) onClear();
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
};
|
|
482
|
+
let onClearButtonClick = () => {
|
|
483
|
+
state.setValue("");
|
|
484
|
+
if (onClear) onClear();
|
|
485
|
+
};
|
|
486
|
+
let onPressStart = () => {
|
|
487
|
+
var _inputRef_current;
|
|
488
|
+
(_inputRef_current = inputRef.current) === null || _inputRef_current === void 0 ? void 0 : _inputRef_current.focus();
|
|
489
|
+
};
|
|
490
|
+
let { labelProps, inputProps, descriptionProps, errorMessageProps, ...validation } = $2d73ec29415bd339$export$712718f7aec83d5({
|
|
491
|
+
...props,
|
|
492
|
+
value: state.value,
|
|
493
|
+
onChange: state.setValue,
|
|
494
|
+
onKeyDown: !isReadOnly ? $ff5963eb1fccf552$export$e08e3b67e392101e(onKeyDown, props.onKeyDown) : props.onKeyDown,
|
|
495
|
+
type
|
|
496
|
+
}, inputRef);
|
|
497
|
+
return {
|
|
498
|
+
labelProps,
|
|
499
|
+
inputProps: {
|
|
500
|
+
...inputProps,
|
|
501
|
+
// already handled by useSearchFieldState
|
|
502
|
+
defaultValue: void 0
|
|
503
|
+
},
|
|
504
|
+
clearButtonProps: {
|
|
505
|
+
"aria-label": stringFormatter.format("Clear search"),
|
|
506
|
+
excludeFromTabOrder: true,
|
|
507
|
+
preventFocusOnPress: true,
|
|
508
|
+
isDisabled: isDisabled || isReadOnly,
|
|
509
|
+
onPress: onClearButtonClick,
|
|
510
|
+
onPressStart
|
|
511
|
+
},
|
|
512
|
+
descriptionProps,
|
|
513
|
+
errorMessageProps,
|
|
514
|
+
...validation
|
|
515
|
+
};
|
|
516
|
+
}
|
|
517
|
+
function $f4b273590fab9f93$export$52210f68a14655d0(props) {
|
|
518
|
+
let domProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
|
|
519
|
+
labelable: true
|
|
520
|
+
});
|
|
521
|
+
let ariaOrientation;
|
|
522
|
+
if (props.orientation === "vertical") ariaOrientation = "vertical";
|
|
523
|
+
if (props.elementType !== "hr") return {
|
|
524
|
+
separatorProps: {
|
|
525
|
+
...domProps,
|
|
526
|
+
role: "separator",
|
|
527
|
+
"aria-orientation": ariaOrientation
|
|
528
|
+
}
|
|
529
|
+
};
|
|
530
|
+
return {
|
|
531
|
+
separatorProps: domProps
|
|
532
|
+
};
|
|
533
|
+
}
|
|
534
|
+
function $0b2218c4e3fe7d7e$export$3f8be18b0f41eaf2(props) {
|
|
535
|
+
let [value, setValue] = $458b0a5536c1a7cf$export$40bfa8c7b0832715($0b2218c4e3fe7d7e$var$toString(props.value), $0b2218c4e3fe7d7e$var$toString(props.defaultValue) || "", props.onChange);
|
|
536
|
+
return {
|
|
537
|
+
value,
|
|
538
|
+
setValue
|
|
539
|
+
};
|
|
540
|
+
}
|
|
541
|
+
function $0b2218c4e3fe7d7e$var$toString(val) {
|
|
542
|
+
if (val == null) return;
|
|
543
|
+
return val.toString();
|
|
544
|
+
}
|
|
545
|
+
const $440f4836bcb56932$export$d1c4e4c63cb03a11 = /* @__PURE__ */ createContext(null);
|
|
546
|
+
const $440f4836bcb56932$export$b94867ecbd698f21 = /* @__PURE__ */ $f39a9eba43920ace$export$86427a43e3e48ebb(function SearchField(props, ref) {
|
|
547
|
+
[props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $440f4836bcb56932$export$d1c4e4c63cb03a11);
|
|
548
|
+
let { validationBehavior: formValidationBehavior } = $64fa3d84918910a7$export$fabf2dc03a41866e($d3e0e05bdfcf66bd$export$c24727297075ec6a) || {};
|
|
549
|
+
var _props_validationBehavior, _ref;
|
|
550
|
+
let validationBehavior = (_ref = (_props_validationBehavior = props.validationBehavior) !== null && _props_validationBehavior !== void 0 ? _props_validationBehavior : formValidationBehavior) !== null && _ref !== void 0 ? _ref : "native";
|
|
551
|
+
let inputRef = useRef(null);
|
|
552
|
+
let [inputContextProps, mergedInputRef] = $64fa3d84918910a7$export$29f1550f4b0d4415({}, inputRef, $3985021b0ad6602f$export$37fb8590cf2c088c);
|
|
553
|
+
let [labelRef, label] = $64fa3d84918910a7$export$9d4c57ee4c6ffdd8(!props["aria-label"] && !props["aria-labelledby"]);
|
|
554
|
+
let state = $0b2218c4e3fe7d7e$export$3f8be18b0f41eaf2({
|
|
555
|
+
...props,
|
|
556
|
+
validationBehavior
|
|
557
|
+
});
|
|
558
|
+
let { labelProps, inputProps, clearButtonProps, descriptionProps, errorMessageProps, ...validation } = $4d52238874b24f86$export$9bb30bbe003b82e0({
|
|
559
|
+
...$64fa3d84918910a7$export$ef03459518577ad4(props),
|
|
560
|
+
label,
|
|
561
|
+
validationBehavior
|
|
562
|
+
}, state, mergedInputRef);
|
|
563
|
+
let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
|
|
564
|
+
...props,
|
|
565
|
+
values: {
|
|
566
|
+
isEmpty: state.value === "",
|
|
567
|
+
isDisabled: props.isDisabled || false,
|
|
568
|
+
isInvalid: validation.isInvalid || false,
|
|
569
|
+
state
|
|
570
|
+
},
|
|
571
|
+
defaultClassName: "react-aria-SearchField"
|
|
572
|
+
});
|
|
573
|
+
let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props);
|
|
574
|
+
delete DOMProps.id;
|
|
575
|
+
return /* @__PURE__ */ React__default.createElement("div", {
|
|
576
|
+
...DOMProps,
|
|
577
|
+
...renderProps,
|
|
578
|
+
ref,
|
|
579
|
+
slot: props.slot || void 0,
|
|
580
|
+
"data-empty": state.value === "" || void 0,
|
|
581
|
+
"data-disabled": props.isDisabled || void 0,
|
|
582
|
+
"data-invalid": validation.isInvalid || void 0
|
|
583
|
+
}, /* @__PURE__ */ React__default.createElement($64fa3d84918910a7$export$2881499e37b75b9a, {
|
|
584
|
+
values: [
|
|
585
|
+
[
|
|
586
|
+
$01b77f81d0f07f68$export$75b6ee27786ba447,
|
|
587
|
+
{
|
|
588
|
+
...labelProps,
|
|
589
|
+
ref: labelRef
|
|
590
|
+
}
|
|
591
|
+
],
|
|
592
|
+
[
|
|
593
|
+
$3985021b0ad6602f$export$37fb8590cf2c088c,
|
|
594
|
+
{
|
|
595
|
+
...$3ef42575df84b30b$export$9d1611c77c2fe928(inputProps, inputContextProps),
|
|
596
|
+
ref: mergedInputRef
|
|
597
|
+
}
|
|
598
|
+
],
|
|
599
|
+
[
|
|
600
|
+
$d2b4bc8c273e7be6$export$24d547caef80ccd1,
|
|
601
|
+
clearButtonProps
|
|
602
|
+
],
|
|
603
|
+
[
|
|
604
|
+
$514c0188e459b4c0$export$9afb8bc826b033ea,
|
|
605
|
+
{
|
|
606
|
+
slots: {
|
|
607
|
+
description: descriptionProps,
|
|
608
|
+
errorMessage: errorMessageProps
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
],
|
|
612
|
+
[
|
|
613
|
+
$a049562f99e7db0e$export$f9c6924e160136d1,
|
|
614
|
+
{
|
|
615
|
+
isInvalid: validation.isInvalid,
|
|
616
|
+
isDisabled: props.isDisabled || false
|
|
617
|
+
}
|
|
618
|
+
],
|
|
619
|
+
[
|
|
620
|
+
$ee014567cb39d3f0$export$ff05c3ac10437e03,
|
|
621
|
+
validation
|
|
622
|
+
]
|
|
623
|
+
]
|
|
624
|
+
}, renderProps.children));
|
|
625
|
+
});
|
|
626
|
+
var $35cd24659c58727a$exports = {};
|
|
627
|
+
$35cd24659c58727a$exports = {
|
|
628
|
+
"collectionLabel": `مقترحات`
|
|
629
|
+
};
|
|
630
|
+
var $cf76f2b22038d1dc$exports = {};
|
|
631
|
+
$cf76f2b22038d1dc$exports = {
|
|
632
|
+
"collectionLabel": `Предложения`
|
|
633
|
+
};
|
|
634
|
+
var $d0ef36edb6b10634$exports = {};
|
|
635
|
+
$d0ef36edb6b10634$exports = {
|
|
636
|
+
"collectionLabel": `Návrhy`
|
|
637
|
+
};
|
|
638
|
+
var $9746cad167cf365e$exports = {};
|
|
639
|
+
$9746cad167cf365e$exports = {
|
|
640
|
+
"collectionLabel": `Forslag`
|
|
641
|
+
};
|
|
642
|
+
var $e096aa0a23f85b04$exports = {};
|
|
643
|
+
$e096aa0a23f85b04$exports = {
|
|
644
|
+
"collectionLabel": `Empfehlungen`
|
|
645
|
+
};
|
|
646
|
+
var $0e9f1c25f5631e6c$exports = {};
|
|
647
|
+
$0e9f1c25f5631e6c$exports = {
|
|
648
|
+
"collectionLabel": `Προτάσεις`
|
|
649
|
+
};
|
|
650
|
+
var $f195635a1f9154fe$exports = {};
|
|
651
|
+
$f195635a1f9154fe$exports = {
|
|
652
|
+
"collectionLabel": `Suggestions`
|
|
653
|
+
};
|
|
654
|
+
var $0ab437f467150cd9$exports = {};
|
|
655
|
+
$0ab437f467150cd9$exports = {
|
|
656
|
+
"collectionLabel": `Sugerencias`
|
|
657
|
+
};
|
|
658
|
+
var $5978f02f4e2f5026$exports = {};
|
|
659
|
+
$5978f02f4e2f5026$exports = {
|
|
660
|
+
"collectionLabel": `Soovitused`
|
|
661
|
+
};
|
|
662
|
+
var $7ceabaf205d867a4$exports = {};
|
|
663
|
+
$7ceabaf205d867a4$exports = {
|
|
664
|
+
"collectionLabel": `Ehdotukset`
|
|
665
|
+
};
|
|
666
|
+
var $9153fe570822488b$exports = {};
|
|
667
|
+
$9153fe570822488b$exports = {
|
|
668
|
+
"collectionLabel": `Suggestions`
|
|
669
|
+
};
|
|
670
|
+
var $b353f6056f620327$exports = {};
|
|
671
|
+
$b353f6056f620327$exports = {
|
|
672
|
+
"collectionLabel": `הצעות`
|
|
673
|
+
};
|
|
674
|
+
var $75f34cf3de3b71c1$exports = {};
|
|
675
|
+
$75f34cf3de3b71c1$exports = {
|
|
676
|
+
"collectionLabel": `Prijedlozi`
|
|
677
|
+
};
|
|
678
|
+
var $315984f57113734f$exports = {};
|
|
679
|
+
$315984f57113734f$exports = {
|
|
680
|
+
"collectionLabel": `Javaslatok`
|
|
681
|
+
};
|
|
682
|
+
var $f114a6a0dcc9e764$exports = {};
|
|
683
|
+
$f114a6a0dcc9e764$exports = {
|
|
684
|
+
"collectionLabel": `Suggerimenti`
|
|
685
|
+
};
|
|
686
|
+
var $da9ccdb501807c66$exports = {};
|
|
687
|
+
$da9ccdb501807c66$exports = {
|
|
688
|
+
"collectionLabel": `候補`
|
|
689
|
+
};
|
|
690
|
+
var $ee4f74cff6d185d7$exports = {};
|
|
691
|
+
$ee4f74cff6d185d7$exports = {
|
|
692
|
+
"collectionLabel": `제안`
|
|
693
|
+
};
|
|
694
|
+
var $9f921d880c5b9f0f$exports = {};
|
|
695
|
+
$9f921d880c5b9f0f$exports = {
|
|
696
|
+
"collectionLabel": `Pasiūlymai`
|
|
697
|
+
};
|
|
698
|
+
var $2516f8bc94df6b6f$exports = {};
|
|
699
|
+
$2516f8bc94df6b6f$exports = {
|
|
700
|
+
"collectionLabel": `Ieteikumi`
|
|
701
|
+
};
|
|
702
|
+
var $2f701b767fa6559c$exports = {};
|
|
703
|
+
$2f701b767fa6559c$exports = {
|
|
704
|
+
"collectionLabel": `Forslag`
|
|
705
|
+
};
|
|
706
|
+
var $1397b38c000e3e4b$exports = {};
|
|
707
|
+
$1397b38c000e3e4b$exports = {
|
|
708
|
+
"collectionLabel": `Suggesties`
|
|
709
|
+
};
|
|
710
|
+
var $25bedea7b332a070$exports = {};
|
|
711
|
+
$25bedea7b332a070$exports = {
|
|
712
|
+
"collectionLabel": `Sugestie`
|
|
713
|
+
};
|
|
714
|
+
var $1e398002a8be3d02$exports = {};
|
|
715
|
+
$1e398002a8be3d02$exports = {
|
|
716
|
+
"collectionLabel": `Sugestões`
|
|
717
|
+
};
|
|
718
|
+
var $ae2286b176a3af67$exports = {};
|
|
719
|
+
$ae2286b176a3af67$exports = {
|
|
720
|
+
"collectionLabel": `Sugestões`
|
|
721
|
+
};
|
|
722
|
+
var $42d5bcc619a7aaac$exports = {};
|
|
723
|
+
$42d5bcc619a7aaac$exports = {
|
|
724
|
+
"collectionLabel": `Sugestii`
|
|
725
|
+
};
|
|
726
|
+
var $bafcc9870f83af97$exports = {};
|
|
727
|
+
$bafcc9870f83af97$exports = {
|
|
728
|
+
"collectionLabel": `Предложения`
|
|
729
|
+
};
|
|
730
|
+
var $a59a67776704c670$exports = {};
|
|
731
|
+
$a59a67776704c670$exports = {
|
|
732
|
+
"collectionLabel": `Návrhy`
|
|
733
|
+
};
|
|
734
|
+
var $070e1709fddbf199$exports = {};
|
|
735
|
+
$070e1709fddbf199$exports = {
|
|
736
|
+
"collectionLabel": `Predlogi`
|
|
737
|
+
};
|
|
738
|
+
var $4ed19d2fc07f94be$exports = {};
|
|
739
|
+
$4ed19d2fc07f94be$exports = {
|
|
740
|
+
"collectionLabel": `Predlozi`
|
|
741
|
+
};
|
|
742
|
+
var $bb4efe76ac2ad6af$exports = {};
|
|
743
|
+
$bb4efe76ac2ad6af$exports = {
|
|
744
|
+
"collectionLabel": `Förslag`
|
|
745
|
+
};
|
|
746
|
+
var $ecc6dce838a94ce1$exports = {};
|
|
747
|
+
$ecc6dce838a94ce1$exports = {
|
|
748
|
+
"collectionLabel": `Öneriler`
|
|
749
|
+
};
|
|
750
|
+
var $61d6a54fe0f4cb76$exports = {};
|
|
751
|
+
$61d6a54fe0f4cb76$exports = {
|
|
752
|
+
"collectionLabel": `Пропозиції`
|
|
753
|
+
};
|
|
754
|
+
var $e98983e40b8886ed$exports = {};
|
|
755
|
+
$e98983e40b8886ed$exports = {
|
|
756
|
+
"collectionLabel": `建议`
|
|
757
|
+
};
|
|
758
|
+
var $5bfd172db1a18268$exports = {};
|
|
759
|
+
$5bfd172db1a18268$exports = {
|
|
760
|
+
"collectionLabel": `建議`
|
|
761
|
+
};
|
|
762
|
+
var $957f4f2fd749edef$exports = {};
|
|
763
|
+
$957f4f2fd749edef$exports = {
|
|
764
|
+
"ar-AE": $35cd24659c58727a$exports,
|
|
765
|
+
"bg-BG": $cf76f2b22038d1dc$exports,
|
|
766
|
+
"cs-CZ": $d0ef36edb6b10634$exports,
|
|
767
|
+
"da-DK": $9746cad167cf365e$exports,
|
|
768
|
+
"de-DE": $e096aa0a23f85b04$exports,
|
|
769
|
+
"el-GR": $0e9f1c25f5631e6c$exports,
|
|
770
|
+
"en-US": $f195635a1f9154fe$exports,
|
|
771
|
+
"es-ES": $0ab437f467150cd9$exports,
|
|
772
|
+
"et-EE": $5978f02f4e2f5026$exports,
|
|
773
|
+
"fi-FI": $7ceabaf205d867a4$exports,
|
|
774
|
+
"fr-FR": $9153fe570822488b$exports,
|
|
775
|
+
"he-IL": $b353f6056f620327$exports,
|
|
776
|
+
"hr-HR": $75f34cf3de3b71c1$exports,
|
|
777
|
+
"hu-HU": $315984f57113734f$exports,
|
|
778
|
+
"it-IT": $f114a6a0dcc9e764$exports,
|
|
779
|
+
"ja-JP": $da9ccdb501807c66$exports,
|
|
780
|
+
"ko-KR": $ee4f74cff6d185d7$exports,
|
|
781
|
+
"lt-LT": $9f921d880c5b9f0f$exports,
|
|
782
|
+
"lv-LV": $2516f8bc94df6b6f$exports,
|
|
783
|
+
"nb-NO": $2f701b767fa6559c$exports,
|
|
784
|
+
"nl-NL": $1397b38c000e3e4b$exports,
|
|
785
|
+
"pl-PL": $25bedea7b332a070$exports,
|
|
786
|
+
"pt-BR": $1e398002a8be3d02$exports,
|
|
787
|
+
"pt-PT": $ae2286b176a3af67$exports,
|
|
788
|
+
"ro-RO": $42d5bcc619a7aaac$exports,
|
|
789
|
+
"ru-RU": $bafcc9870f83af97$exports,
|
|
790
|
+
"sk-SK": $a59a67776704c670$exports,
|
|
791
|
+
"sl-SI": $070e1709fddbf199$exports,
|
|
792
|
+
"sr-SP": $4ed19d2fc07f94be$exports,
|
|
793
|
+
"sv-SE": $bb4efe76ac2ad6af$exports,
|
|
794
|
+
"tr-TR": $ecc6dce838a94ce1$exports,
|
|
795
|
+
"uk-UA": $61d6a54fe0f4cb76$exports,
|
|
796
|
+
"zh-CN": $e98983e40b8886ed$exports,
|
|
797
|
+
"zh-TW": $5bfd172db1a18268$exports
|
|
798
|
+
};
|
|
799
|
+
function $parcel$interopDefault(a) {
|
|
800
|
+
return a && a.__esModule ? a.default : a;
|
|
801
|
+
}
|
|
802
|
+
function $48f6ba390f8c5b59$export$1e40b3ca02d92d21(props, state) {
|
|
803
|
+
let { inputRef, collectionRef, filter, disableAutoFocusFirst = false } = props;
|
|
804
|
+
let collectionId = $bdb11010cef70236$export$f680877a34711e37();
|
|
805
|
+
let timeout = useRef(void 0);
|
|
806
|
+
let delayNextActiveDescendant = useRef(false);
|
|
807
|
+
let queuedActiveDescendant = useRef(null);
|
|
808
|
+
let lastCollectionNode = useRef(null);
|
|
809
|
+
let shouldUseVirtualFocus = $507fabe10e71c6fb$export$630ff653c5ada6a9() !== "virtual";
|
|
810
|
+
useEffect(() => {
|
|
811
|
+
return () => clearTimeout(timeout.current);
|
|
812
|
+
}, []);
|
|
813
|
+
let updateActiveDescendant = $8ae05eaa5c114e9c$export$7f54fc3180508a52((e) => {
|
|
814
|
+
if (!e.isTrusted && shouldUseVirtualFocus && inputRef.current && $d4ee10de306f2510$export$cd4e5573fbe2b576($431fbd86ca7dc216$export$b204af158042fbac(inputRef.current)) !== inputRef.current) inputRef.current.focus();
|
|
815
|
+
let target = e.target;
|
|
816
|
+
if (e.isTrusted || !target || queuedActiveDescendant.current === target.id) return;
|
|
817
|
+
clearTimeout(timeout.current);
|
|
818
|
+
if (target !== collectionRef.current) {
|
|
819
|
+
if (delayNextActiveDescendant.current) {
|
|
820
|
+
queuedActiveDescendant.current = target.id;
|
|
821
|
+
timeout.current = setTimeout(() => {
|
|
822
|
+
state.setFocusedNodeId(target.id);
|
|
823
|
+
}, 500);
|
|
824
|
+
} else {
|
|
825
|
+
queuedActiveDescendant.current = target.id;
|
|
826
|
+
state.setFocusedNodeId(target.id);
|
|
827
|
+
}
|
|
828
|
+
} else {
|
|
829
|
+
queuedActiveDescendant.current = null;
|
|
830
|
+
state.setFocusedNodeId(null);
|
|
831
|
+
}
|
|
832
|
+
delayNextActiveDescendant.current = false;
|
|
833
|
+
});
|
|
834
|
+
let callbackRef = useCallback((collectionNode) => {
|
|
835
|
+
var _lastCollectionNode_current;
|
|
836
|
+
if (collectionNode != null) {
|
|
837
|
+
var _lastCollectionNode_current1;
|
|
838
|
+
(_lastCollectionNode_current1 = lastCollectionNode.current) === null || _lastCollectionNode_current1 === void 0 ? void 0 : _lastCollectionNode_current1.removeEventListener("focusin", updateActiveDescendant);
|
|
839
|
+
lastCollectionNode.current = collectionNode;
|
|
840
|
+
collectionNode.addEventListener("focusin", updateActiveDescendant);
|
|
841
|
+
} else (_lastCollectionNode_current = lastCollectionNode.current) === null || _lastCollectionNode_current === void 0 ? void 0 : _lastCollectionNode_current.removeEventListener("focusin", updateActiveDescendant);
|
|
842
|
+
}, [
|
|
843
|
+
updateActiveDescendant
|
|
844
|
+
]);
|
|
845
|
+
let mergedCollectionRef = $df56164dff5785e2$export$4338b53315abf666(useMemo(() => $5dc95899b306f630$export$c9058316764c140e(collectionRef, callbackRef), [
|
|
846
|
+
collectionRef,
|
|
847
|
+
callbackRef
|
|
848
|
+
]));
|
|
849
|
+
let focusFirstItem = $8ae05eaa5c114e9c$export$7f54fc3180508a52(() => {
|
|
850
|
+
var _collectionRef_current;
|
|
851
|
+
delayNextActiveDescendant.current = true;
|
|
852
|
+
(_collectionRef_current = collectionRef.current) === null || _collectionRef_current === void 0 ? void 0 : _collectionRef_current.dispatchEvent(new CustomEvent($5671b20cf9b562b2$export$831c820ad60f9d12, {
|
|
853
|
+
cancelable: true,
|
|
854
|
+
bubbles: true,
|
|
855
|
+
detail: {
|
|
856
|
+
focusStrategy: "first"
|
|
857
|
+
}
|
|
858
|
+
}));
|
|
859
|
+
});
|
|
860
|
+
let clearVirtualFocus = $8ae05eaa5c114e9c$export$7f54fc3180508a52((clearFocusKey) => {
|
|
861
|
+
var _collectionRef_current;
|
|
862
|
+
$55f9b1ae81f22853$export$76e4e37e5339496d($d4ee10de306f2510$export$cd4e5573fbe2b576());
|
|
863
|
+
queuedActiveDescendant.current = null;
|
|
864
|
+
state.setFocusedNodeId(null);
|
|
865
|
+
let clearFocusEvent = new CustomEvent($5671b20cf9b562b2$export$447a38995de2c711, {
|
|
866
|
+
cancelable: true,
|
|
867
|
+
bubbles: true,
|
|
868
|
+
detail: {
|
|
869
|
+
clearFocusKey
|
|
870
|
+
}
|
|
871
|
+
});
|
|
872
|
+
clearTimeout(timeout.current);
|
|
873
|
+
delayNextActiveDescendant.current = false;
|
|
874
|
+
(_collectionRef_current = collectionRef.current) === null || _collectionRef_current === void 0 ? void 0 : _collectionRef_current.dispatchEvent(clearFocusEvent);
|
|
875
|
+
});
|
|
876
|
+
let onChange = (value) => {
|
|
877
|
+
if (state.inputValue !== value && state.inputValue.length <= value.length && !disableAutoFocusFirst) focusFirstItem();
|
|
878
|
+
else
|
|
879
|
+
clearVirtualFocus(true);
|
|
880
|
+
state.setInputValue(value);
|
|
881
|
+
};
|
|
882
|
+
let keyDownTarget = useRef(null);
|
|
883
|
+
let onKeyDown = (e) => {
|
|
884
|
+
var _collectionRef_current;
|
|
885
|
+
keyDownTarget.current = e.target;
|
|
886
|
+
if (e.nativeEvent.isComposing) return;
|
|
887
|
+
let focusedNodeId = queuedActiveDescendant.current;
|
|
888
|
+
switch (e.key) {
|
|
889
|
+
case "a":
|
|
890
|
+
if ($21f1aa98acb08317$export$16792effe837dba3(e)) return;
|
|
891
|
+
break;
|
|
892
|
+
case "Escape":
|
|
893
|
+
if (e.isDefaultPrevented()) return;
|
|
894
|
+
break;
|
|
895
|
+
case " ":
|
|
896
|
+
return;
|
|
897
|
+
case "Tab":
|
|
898
|
+
if ("continuePropagation" in e) e.continuePropagation();
|
|
899
|
+
return;
|
|
900
|
+
case "Home":
|
|
901
|
+
case "End":
|
|
902
|
+
case "PageDown":
|
|
903
|
+
case "PageUp":
|
|
904
|
+
case "ArrowUp":
|
|
905
|
+
case "ArrowDown": {
|
|
906
|
+
var _collectionRef_current1;
|
|
907
|
+
if ((e.key === "Home" || e.key === "End") && focusedNodeId == null && e.shiftKey) return;
|
|
908
|
+
e.preventDefault();
|
|
909
|
+
let focusCollection = new CustomEvent($5671b20cf9b562b2$export$831c820ad60f9d12, {
|
|
910
|
+
cancelable: true,
|
|
911
|
+
bubbles: true
|
|
912
|
+
});
|
|
913
|
+
(_collectionRef_current1 = collectionRef.current) === null || _collectionRef_current1 === void 0 ? void 0 : _collectionRef_current1.dispatchEvent(focusCollection);
|
|
914
|
+
break;
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
if (!e.isPropagationStopped()) e.stopPropagation();
|
|
918
|
+
let shouldPerformDefaultAction = true;
|
|
919
|
+
if (focusedNodeId == null) shouldPerformDefaultAction = ((_collectionRef_current = collectionRef.current) === null || _collectionRef_current === void 0 ? void 0 : _collectionRef_current.dispatchEvent(new KeyboardEvent(e.nativeEvent.type, e.nativeEvent))) || false;
|
|
920
|
+
else {
|
|
921
|
+
let item = document.getElementById(focusedNodeId);
|
|
922
|
+
shouldPerformDefaultAction = (item === null || item === void 0 ? void 0 : item.dispatchEvent(new KeyboardEvent(e.nativeEvent.type, e.nativeEvent))) || false;
|
|
923
|
+
}
|
|
924
|
+
if (shouldPerformDefaultAction) switch (e.key) {
|
|
925
|
+
case "ArrowLeft":
|
|
926
|
+
case "ArrowRight":
|
|
927
|
+
clearVirtualFocus();
|
|
928
|
+
break;
|
|
929
|
+
}
|
|
930
|
+
};
|
|
931
|
+
let onKeyUpCapture = $8ae05eaa5c114e9c$export$7f54fc3180508a52((e) => {
|
|
932
|
+
if (e.target === keyDownTarget.current) {
|
|
933
|
+
var _collectionRef_current;
|
|
934
|
+
e.stopImmediatePropagation();
|
|
935
|
+
let focusedNodeId = queuedActiveDescendant.current;
|
|
936
|
+
if (focusedNodeId == null) (_collectionRef_current = collectionRef.current) === null || _collectionRef_current === void 0 ? void 0 : _collectionRef_current.dispatchEvent(new KeyboardEvent(e.type, e));
|
|
937
|
+
else {
|
|
938
|
+
let item = document.getElementById(focusedNodeId);
|
|
939
|
+
item === null || item === void 0 ? void 0 : item.dispatchEvent(new KeyboardEvent(e.type, e));
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
});
|
|
943
|
+
useEffect(() => {
|
|
944
|
+
document.addEventListener("keyup", onKeyUpCapture, true);
|
|
945
|
+
return () => {
|
|
946
|
+
document.removeEventListener("keyup", onKeyUpCapture, true);
|
|
947
|
+
};
|
|
948
|
+
}, [
|
|
949
|
+
onKeyUpCapture
|
|
950
|
+
]);
|
|
951
|
+
let stringFormatter = $fca6afa0e843324b$export$f12b703ca79dfbb1($parcel$interopDefault($957f4f2fd749edef$exports), "@react-aria/autocomplete");
|
|
952
|
+
let collectionProps = $313b98861ee5dd6c$export$d6875122194c7b44({
|
|
953
|
+
id: collectionId,
|
|
954
|
+
"aria-label": stringFormatter.format("collectionLabel")
|
|
955
|
+
});
|
|
956
|
+
let filterFn = useCallback((nodeTextValue) => {
|
|
957
|
+
if (filter) return filter(nodeTextValue, state.inputValue);
|
|
958
|
+
return true;
|
|
959
|
+
}, [
|
|
960
|
+
state.inputValue,
|
|
961
|
+
filter
|
|
962
|
+
]);
|
|
963
|
+
let onBlur = (e) => {
|
|
964
|
+
if (!e.isTrusted) return;
|
|
965
|
+
let lastFocusedNode = queuedActiveDescendant.current ? document.getElementById(queuedActiveDescendant.current) : null;
|
|
966
|
+
if (lastFocusedNode) $55f9b1ae81f22853$export$6c5dc7e81d2cc29a(lastFocusedNode, e.relatedTarget);
|
|
967
|
+
};
|
|
968
|
+
let onFocus = (e) => {
|
|
969
|
+
if (!e.isTrusted) return;
|
|
970
|
+
let curFocusedNode = queuedActiveDescendant.current ? document.getElementById(queuedActiveDescendant.current) : null;
|
|
971
|
+
if (curFocusedNode) {
|
|
972
|
+
let target = e.target;
|
|
973
|
+
queueMicrotask(() => {
|
|
974
|
+
$55f9b1ae81f22853$export$6c5dc7e81d2cc29a(target, curFocusedNode);
|
|
975
|
+
$55f9b1ae81f22853$export$2b35b76d2e30e129(curFocusedNode, target);
|
|
976
|
+
});
|
|
977
|
+
}
|
|
978
|
+
};
|
|
979
|
+
var _state_focusedNodeId;
|
|
980
|
+
return {
|
|
981
|
+
textFieldProps: {
|
|
982
|
+
value: state.inputValue,
|
|
983
|
+
onChange,
|
|
984
|
+
onKeyDown,
|
|
985
|
+
autoComplete: "off",
|
|
986
|
+
"aria-haspopup": "listbox",
|
|
987
|
+
"aria-controls": collectionId,
|
|
988
|
+
// TODO: readd proper logic for completionMode = complete (aria-autocomplete: both)
|
|
989
|
+
"aria-autocomplete": "list",
|
|
990
|
+
"aria-activedescendant": (_state_focusedNodeId = state.focusedNodeId) !== null && _state_focusedNodeId !== void 0 ? _state_focusedNodeId : void 0,
|
|
991
|
+
// This disable's iOS's autocorrect suggestions, since the autocomplete provides its own suggestions.
|
|
992
|
+
autoCorrect: "off",
|
|
993
|
+
// This disable's the macOS Safari spell check auto corrections.
|
|
994
|
+
spellCheck: "false",
|
|
995
|
+
enterKeyHint: "go",
|
|
996
|
+
onBlur,
|
|
997
|
+
onFocus
|
|
998
|
+
},
|
|
999
|
+
collectionProps: $3ef42575df84b30b$export$9d1611c77c2fe928(collectionProps, {
|
|
1000
|
+
shouldUseVirtualFocus,
|
|
1001
|
+
disallowTypeAhead: true
|
|
1002
|
+
}),
|
|
1003
|
+
collectionRef: mergedCollectionRef,
|
|
1004
|
+
filter: filter != null ? filterFn : void 0
|
|
1005
|
+
};
|
|
1006
|
+
}
|
|
1007
|
+
function $94680be9a48a8f2d$export$ce1595f6e1a63433(props) {
|
|
1008
|
+
let { onInputChange: propsOnInputChange, inputValue: propsInputValue, defaultInputValue: propsDefaultInputValue = "" } = props;
|
|
1009
|
+
let onInputChange = (value) => {
|
|
1010
|
+
if (propsOnInputChange) propsOnInputChange(value);
|
|
1011
|
+
};
|
|
1012
|
+
let [focusedNodeId, setFocusedNodeId] = useState(null);
|
|
1013
|
+
let [inputValue, setInputValue] = $458b0a5536c1a7cf$export$40bfa8c7b0832715(propsInputValue, propsDefaultInputValue, onInputChange);
|
|
1014
|
+
return {
|
|
1015
|
+
inputValue,
|
|
1016
|
+
setInputValue,
|
|
1017
|
+
focusedNodeId,
|
|
1018
|
+
setFocusedNodeId
|
|
1019
|
+
};
|
|
1020
|
+
}
|
|
1021
|
+
const $d2f53cda644affe3$export$36e687af51cd0967 = /* @__PURE__ */ createContext(null);
|
|
1022
|
+
const $d2f53cda644affe3$export$68ee3368b6d68148 = /* @__PURE__ */ createContext(null);
|
|
1023
|
+
const $d2f53cda644affe3$export$65d2a03b8800d6e3 = /* @__PURE__ */ createContext(null);
|
|
1024
|
+
function $d2f53cda644affe3$export$2f2b9559550c7bbc(props) {
|
|
1025
|
+
let ctx = $64fa3d84918910a7$export$fabf2dc03a41866e($d2f53cda644affe3$export$36e687af51cd0967, props.slot);
|
|
1026
|
+
props = $3ef42575df84b30b$export$9d1611c77c2fe928(ctx, props);
|
|
1027
|
+
let { filter, disableAutoFocusFirst } = props;
|
|
1028
|
+
let state = $94680be9a48a8f2d$export$ce1595f6e1a63433(props);
|
|
1029
|
+
let inputRef = useRef(null);
|
|
1030
|
+
let collectionRef = useRef(null);
|
|
1031
|
+
let { textFieldProps, collectionProps, collectionRef: mergedCollectionRef, filter: filterFn } = $48f6ba390f8c5b59$export$1e40b3ca02d92d21({
|
|
1032
|
+
...$64fa3d84918910a7$export$ef03459518577ad4(props),
|
|
1033
|
+
filter,
|
|
1034
|
+
disableAutoFocusFirst,
|
|
1035
|
+
inputRef,
|
|
1036
|
+
collectionRef
|
|
1037
|
+
}, state);
|
|
1038
|
+
return /* @__PURE__ */ React__default.createElement($64fa3d84918910a7$export$2881499e37b75b9a, {
|
|
1039
|
+
values: [
|
|
1040
|
+
[
|
|
1041
|
+
$d2f53cda644affe3$export$68ee3368b6d68148,
|
|
1042
|
+
state
|
|
1043
|
+
],
|
|
1044
|
+
[
|
|
1045
|
+
$440f4836bcb56932$export$d1c4e4c63cb03a11,
|
|
1046
|
+
textFieldProps
|
|
1047
|
+
],
|
|
1048
|
+
[
|
|
1049
|
+
$bcdf0525bf22703d$export$2129e27b3ef0d483,
|
|
1050
|
+
textFieldProps
|
|
1051
|
+
],
|
|
1052
|
+
[
|
|
1053
|
+
$3985021b0ad6602f$export$37fb8590cf2c088c,
|
|
1054
|
+
{
|
|
1055
|
+
ref: inputRef
|
|
1056
|
+
}
|
|
1057
|
+
],
|
|
1058
|
+
[
|
|
1059
|
+
$d2f53cda644affe3$export$65d2a03b8800d6e3,
|
|
1060
|
+
{
|
|
1061
|
+
filter: filterFn,
|
|
1062
|
+
collectionProps,
|
|
1063
|
+
collectionRef: mergedCollectionRef
|
|
1064
|
+
}
|
|
1065
|
+
]
|
|
1066
|
+
]
|
|
1067
|
+
}, props.children);
|
|
1068
|
+
}
|
|
1069
|
+
const $72a5793c14baf454$export$e0e4026c12a8bdbb = /* @__PURE__ */ createContext({});
|
|
1070
|
+
const $72a5793c14baf454$export$8b251419efc915eb = /* @__PURE__ */ $e1995378a142960e$export$18af5c7a9e9b3664("header", function Header(props, ref) {
|
|
1071
|
+
[props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $72a5793c14baf454$export$e0e4026c12a8bdbb);
|
|
1072
|
+
return /* @__PURE__ */ React__default.createElement("header", {
|
|
1073
|
+
className: "react-aria-Header",
|
|
1074
|
+
...props,
|
|
1075
|
+
ref
|
|
1076
|
+
}, props.children);
|
|
1077
|
+
});
|
|
1078
|
+
const $431f98aba6844401$export$6615d83f6de245ce = /* @__PURE__ */ createContext({});
|
|
1079
|
+
const $431f98aba6844401$export$1ff3c3f08ae963c0 = /* @__PURE__ */ $e1995378a142960e$export$18af5c7a9e9b3664("separator", function Separator(props, ref) {
|
|
1080
|
+
[props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $431f98aba6844401$export$6615d83f6de245ce);
|
|
1081
|
+
let { elementType, orientation, style, className, slot, ...otherProps } = props;
|
|
1082
|
+
let Element = elementType || "hr";
|
|
1083
|
+
if (Element === "hr" && orientation === "vertical") Element = "div";
|
|
1084
|
+
let { separatorProps } = $f4b273590fab9f93$export$52210f68a14655d0({
|
|
1085
|
+
...otherProps,
|
|
1086
|
+
elementType,
|
|
1087
|
+
orientation
|
|
1088
|
+
});
|
|
1089
|
+
return /* @__PURE__ */ React__default.createElement(Element, {
|
|
1090
|
+
...$65484d02dcb7eb3e$export$457c3d6518dd4c6f(props),
|
|
1091
|
+
...separatorProps,
|
|
1092
|
+
style,
|
|
1093
|
+
className: className !== null && className !== void 0 ? className : "react-aria-Separator",
|
|
1094
|
+
ref,
|
|
1095
|
+
slot: slot || void 0
|
|
1096
|
+
});
|
|
1097
|
+
});
|
|
1098
|
+
export {
|
|
1099
|
+
$72a5793c14baf454$export$8b251419efc915eb as $,
|
|
1100
|
+
$431f98aba6844401$export$1ff3c3f08ae963c0 as a,
|
|
1101
|
+
$d2f53cda644affe3$export$2f2b9559550c7bbc as b,
|
|
1102
|
+
$440f4836bcb56932$export$b94867ecbd698f21 as c,
|
|
1103
|
+
$325a3faab7a68acd$export$a16aca283550c30d as d,
|
|
1104
|
+
$62d8ded9296f3872$export$cfa2225e87938781 as e,
|
|
1105
|
+
$982254629710d113$export$b95089534ab7c1fd as f,
|
|
1106
|
+
$453cc9f0df89c0a5$export$77d5aafae4e095b2 as g,
|
|
1107
|
+
$d2f53cda644affe3$export$65d2a03b8800d6e3 as h,
|
|
1108
|
+
$2a25aae57d74318e$export$a05409b8bb224a5a as i,
|
|
1109
|
+
$431f98aba6844401$export$6615d83f6de245ce as j,
|
|
1110
|
+
$72a5793c14baf454$export$e0e4026c12a8bdbb as k
|
|
1111
|
+
};
|