@eightshift/ui-components 5.2.0 → 5.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/dist/{Button-RTwMSBs-.js → Button-npzfSoYo.js} +3 -3
  2. package/dist/{Dialog-Xf6AsnV-.js → Dialog-CQ8H6Noi.js} +77 -50
  3. package/dist/{FocusScope-BnwM-e8R.js → FocusScope-DJApHXhY.js} +1 -1
  4. package/dist/Form-Cq3fu75_.js +5 -0
  5. package/dist/{Group-C4cXobNT.js → Input-ChJaTNa5.js} +39 -39
  6. package/dist/{List-CwJTORxj.js → List-BiAnh5G5.js} +5 -5
  7. package/dist/{ListBox-BeC97FZ4.js → ListBox-D0Stb4wr.js} +13 -23
  8. package/dist/{OverlayArrow-EZ0v_ljk.js → OverlayArrow-DivvkAVb.js} +46 -25
  9. package/dist/{Separator-Fl7qSeN-.js → SearchField-jVsbJe1O.js} +151 -475
  10. package/dist/{Select-DEQf8ZWI.js → Select-ciHB1pub.js} +12 -11
  11. package/dist/{Select-ef7c0426.esm-D6WOCaYm.js → Select-ef7c0426.esm-CmTkSxDx.js} +3 -3
  12. package/dist/{Collection-D_KhdLDC.js → SelectionManager-CabSdgMq.js} +1801 -1777
  13. package/dist/Separator-BPvqJny4.js +344 -0
  14. package/dist/{Slider-BQFSEhvk.js → Slider-ChP04COa.js} +4 -4
  15. package/dist/{VisuallyHidden-D9s7FTtC.js → VisuallyHidden-X6SggVVO.js} +1 -1
  16. package/dist/assets/style-admin.css +315 -79
  17. package/dist/assets/style-editor.css +315 -79
  18. package/dist/assets/style.css +315 -79
  19. package/dist/assets/wp-font-enhancements.css +1 -1
  20. package/dist/assets/wp-ui-enhancements.css +5 -14
  21. package/dist/components/animated-visibility/animated-visibility.js +16 -16
  22. package/dist/components/button/button.js +7 -23
  23. package/dist/components/checkbox/checkbox.js +11 -10
  24. package/dist/components/color-pickers/color-picker.js +5 -4
  25. package/dist/components/color-pickers/color-swatch.js +1 -1
  26. package/dist/components/color-pickers/gradient-editor.js +7 -7
  27. package/dist/components/color-pickers/solid-color-picker.js +8 -8
  28. package/dist/components/component-toggle/component-toggle.js +1 -1
  29. package/dist/components/draggable/draggable-handle.js +1 -1
  30. package/dist/components/draggable/draggable.js +34 -17
  31. package/dist/components/draggable-list/draggable-list-item.js +1 -1
  32. package/dist/components/draggable-list/draggable-list.js +6 -4
  33. package/dist/components/expandable/expandable.js +5 -5
  34. package/dist/components/index.js +2 -1
  35. package/dist/components/input-field/input-field.js +139 -3
  36. package/dist/components/item-collection/item-collection.js +1 -1
  37. package/dist/components/link-input/link-input.js +16 -15
  38. package/dist/components/matrix-align/matrix-align.js +1 -1
  39. package/dist/components/menu/menu.js +94 -24
  40. package/dist/components/modal/modal.js +4 -4
  41. package/dist/components/notice/notice.js +6 -5
  42. package/dist/components/number-picker/number-picker.js +5 -5
  43. package/dist/components/option-select/option-select.js +1 -1
  44. package/dist/components/placeholders/file-placeholder.js +1 -1
  45. package/dist/components/popover/popover.js +7 -21
  46. package/dist/components/radio/radio.js +7 -6
  47. package/dist/components/repeater/repeater-item.js +1 -1
  48. package/dist/components/repeater/repeater.js +2 -2
  49. package/dist/components/responsive/mini-responsive.js +1 -1
  50. package/dist/components/responsive/responsive-legacy.js +1 -1
  51. package/dist/components/responsive/responsive.js +21 -20
  52. package/dist/components/responsive-preview/responsive-preview.js +1 -1
  53. package/dist/components/rich-label/rich-label.js +28 -15
  54. package/dist/components/select/async-multi-select.js +3 -3
  55. package/dist/components/select/async-single-select.js +2 -2
  56. package/dist/components/select/custom-select-default-components.js +1 -1
  57. package/dist/components/select/multi-select-components.js +1 -1
  58. package/dist/components/select/multi-select.js +3 -3
  59. package/dist/components/select/react-select-component-wrappers.js +1 -1
  60. package/dist/components/select/single-select.js +2 -2
  61. package/dist/components/select/styles.js +1 -1
  62. package/dist/components/select/v2/async-multi-select.js +24 -13
  63. package/dist/components/select/v2/async-select.js +24 -13
  64. package/dist/components/select/v2/multi-select.js +8 -8
  65. package/dist/components/select/v2/shared.js +1 -1
  66. package/dist/components/select/v2/single-select.js +8 -8
  67. package/dist/components/slider/column-config-slider.js +2 -2
  68. package/dist/components/slider/slider.js +1 -1
  69. package/dist/components/slider/utils.js +1 -1
  70. package/dist/components/tabs/tabs.js +13 -9
  71. package/dist/components/toggle/switch.js +5 -5
  72. package/dist/components/toggle-button/toggle-button.js +7 -7
  73. package/dist/components/tooltip/tooltip.js +12 -35
  74. package/dist/context-DCAZLyDS.js +7 -0
  75. package/dist/{default-i18n-DY6EfUSA.js → default-i18n-CN_q3KUs.js} +15 -56
  76. package/dist/icons/icons.js +3347 -30273
  77. package/dist/{index-641ee5b8.esm-Bu-mgopl.js → index-641ee5b8.esm-DVp0njHa.js} +10 -8
  78. package/dist/{index-CBHA_HDD.js → index-D8-Zjpbd.js} +18 -18
  79. package/dist/index.js +2 -1
  80. package/dist/{multi-select-components-rCCyCaKO.js → multi-select-components-CT_W0Cy9.js} +1 -1
  81. package/dist/{react-select-async.esm-XYrsKYb2.js → react-select-async.esm-Zl1LPaPb.js} +3 -3
  82. package/dist/{react-select.esm-CCSPY6XR.js → react-select.esm-Bu36HujU.js} +3 -3
  83. package/dist/{textSelection-D5tWX1rJ.js → textSelection-k0u64dDA.js} +1 -1
  84. package/dist/{useAsyncList-ZqaIH2gh.js → useAsyncList-D52mQcrH.js} +30 -0
  85. package/dist/{useButton-BtJSiQi3.js → useButton-Bn4ZT295.js} +4 -3
  86. package/dist/{useDragAndDrop-CddFteYC.js → useDragAndDrop-DVLrIdEn.js} +18 -10
  87. package/dist/{useFilter-Cl2ggwwq.js → useFilter-C4wo8Iii.js} +1 -1
  88. package/dist/{useFocusRing-D5BfOWag.js → useFocusRing-CUxgjvAY.js} +1 -1
  89. package/dist/{Form-BeMxJA29.js → useFormValidation-CUtZcedF.js} +5 -7
  90. package/dist/{useHover-44IApaa2.js → useHover-LmGemtHE.js} +24 -24
  91. package/dist/{useListState-BSkHuB7-.js → useListState-Xsk-aOvN.js} +8 -5
  92. package/dist/{useNumberField-JhWPy1JY.js → useNumberField-BCjjZWaz.js} +100 -99
  93. package/dist/{usePress-BnrkvZ7e.js → usePress-CBQIDzpQ.js} +12 -12
  94. package/dist/{useSingleSelectListState-CzJFsSHr.js → useSingleSelectListState-DattSD7d.js} +2 -2
  95. package/dist/{useToggle-OaIBlwRu.js → useToggle-C8CedY6Z.js} +2 -2
  96. package/dist/{useToggleState-BF8hvidm.js → useToggleState-CiAradXs.js} +1 -1
  97. package/package.json +25 -25
  98. package/dist/TextField-x_eEa_qR.js +0 -143
@@ -1,288 +1,19 @@
1
- import { p as $cc38e7bd3fc7b213$export$2bb74740c4e19def, q as $feb5ffebff200149$export$c3d8340acf92597f, i as $ae20dd8cbca75726$export$d6daf82dcd84e87c, m as $c5a24bc478652b5f$export$1005530eda016c13, r as $5671b20cf9b562b2$export$831c820ad60f9d12, s as $55f9b1ae81f22853$export$76e4e37e5339496d, t as $5671b20cf9b562b2$export$447a38995de2c711, u as $55f9b1ae81f22853$export$6c5dc7e81d2cc29a, n as $55f9b1ae81f22853$export$2b35b76d2e30e129, v as $21f1aa98acb08317$export$16792effe837dba3, w as $55f9b1ae81f22853$export$759df0d867455a91, d as $e1995378a142960e$export$18af5c7a9e9b3664 } from "./Collection-D_KhdLDC.js";
2
- import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-DMOmz986.js";
3
- import React__default, { useMemo, createContext, useRef, useEffect, useCallback, useState } from "react";
4
- import { d as $2d73ec29415bd339$export$712718f7aec83d5, b as $3985021b0ad6602f$export$37fb8590cf2c088c, a as $a049562f99e7db0e$export$f9c6924e160136d1 } from "./Group-C4cXobNT.js";
5
- import { p as $ff5963eb1fccf552$export$e08e3b67e392101e, a as $64fa3d84918910a7$export$29f1550f4b0d4415, $ as $64fa3d84918910a7$export$fabf2dc03a41866e, f as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, g as $64fa3d84918910a7$export$ef03459518577ad4, h as $64fa3d84918910a7$export$4d86445c2cf5e3, i as $64fa3d84918910a7$export$2881499e37b75b9a, b as $3ef42575df84b30b$export$9d1611c77c2fe928, d as $bdb11010cef70236$export$f680877a34711e37, e as $8ae05eaa5c114e9c$export$7f54fc3180508a52, l as $df56164dff5785e2$export$4338b53315abf666, m as $5dc95899b306f630$export$c9058316764c140e } from "./utils-cvK1vxO7.js";
6
- import { a as $d2b4bc8c273e7be6$export$24d547caef80ccd1 } from "./Button-RTwMSBs-.js";
1
+ import { $ as $8e6cc465cc68f603$export$698f465ec27e93df, a as $8e6cc465cc68f603$export$b0d3ecf7112093a7 } from "./context-DCAZLyDS.js";
2
+ import { p as $ff5963eb1fccf552$export$e08e3b67e392101e, j as $bdb11010cef70236$export$b4cc09c592e8fdb8, e as $8ae05eaa5c114e9c$export$7f54fc3180508a52, l as $df56164dff5785e2$export$4338b53315abf666, m as $5dc95899b306f630$export$c9058316764c140e, b as $3ef42575df84b30b$export$9d1611c77c2fe928, $ as $64fa3d84918910a7$export$fabf2dc03a41866e, g as $64fa3d84918910a7$export$ef03459518577ad4, i as $64fa3d84918910a7$export$2881499e37b75b9a, a as $64fa3d84918910a7$export$29f1550f4b0d4415, f as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, h as $64fa3d84918910a7$export$4d86445c2cf5e3 } from "./utils-cvK1vxO7.js";
3
+ import { u as $507fabe10e71c6fb$export$630ff653c5ada6a9, b as $c87311424ea30a05$export$fedb369cb70207f1, s as $c87311424ea30a05$export$a11b0059900ceec8, g as $d4ee10de306f2510$export$cd4e5573fbe2b576, c as $431fbd86ca7dc216$export$b204af158042fbac, a as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "./useHover-LmGemtHE.js";
4
+ import { $ as $313b98861ee5dd6c$export$d6875122194c7b44 } from "./useLabels-Cdxi6JSa.js";
5
+ import { $ as $e9faafb641e167db$export$90fc3a17d93f704c } from "./useEvent-BifIGnVS.js";
6
+ import { v as $5671b20cf9b562b2$export$831c820ad60f9d12, w as $55f9b1ae81f22853$export$76e4e37e5339496d, x as $5671b20cf9b562b2$export$447a38995de2c711, y as $55f9b1ae81f22853$export$6c5dc7e81d2cc29a, t as $55f9b1ae81f22853$export$2b35b76d2e30e129, z as $21f1aa98acb08317$export$16792effe837dba3, A as $55f9b1ae81f22853$export$759df0d867455a91 } from "./SelectionManager-CabSdgMq.js";
7
+ import React__default, { useRef, useEffect, useCallback, useMemo, useState, createContext } from "react";
8
+ import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-eaZiN2tE.js";
9
+ import { a as $d2b4bc8c273e7be6$export$24d547caef80ccd1 } from "./Button-npzfSoYo.js";
7
10
  import { $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "./FieldError-B8BgFmIQ.js";
8
- import { $ as $d3e0e05bdfcf66bd$export$c24727297075ec6a } from "./Form-BeMxJA29.js";
11
+ import { $ as $d3e0e05bdfcf66bd$export$c24727297075ec6a } from "./Form-Cq3fu75_.js";
12
+ import { d as $2d73ec29415bd339$export$712718f7aec83d5, b as $3985021b0ad6602f$export$37fb8590cf2c088c, a as $a049562f99e7db0e$export$f9c6924e160136d1 } from "./Input-ChJaTNa5.js";
9
13
  import { a as $01b77f81d0f07f68$export$75b6ee27786ba447 } from "./Label-DWVaNd2E.js";
10
14
  import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "./Text-AxKZjtFm.js";
11
15
  import { $ as $f39a9eba43920ace$export$86427a43e3e48ebb } from "./Hidden-rE6uR-lr.js";
12
16
  import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-D2C6R0DK.js";
13
- import { a as $458b0a5536c1a7cf$export$40bfa8c7b0832715, h as $d4ee10de306f2510$export$cd4e5573fbe2b576, c as $431fbd86ca7dc216$export$b204af158042fbac, v as $507fabe10e71c6fb$export$630ff653c5ada6a9 } from "./useHover-44IApaa2.js";
14
- import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-eaZiN2tE.js";
15
- import { b as $bcdf0525bf22703d$export$2129e27b3ef0d483 } from "./TextField-x_eEa_qR.js";
16
- import { $ as $313b98861ee5dd6c$export$d6875122194c7b44 } from "./useLabels-Cdxi6JSa.js";
17
- import { $ as $e9faafb641e167db$export$90fc3a17d93f704c } from "./useEvent-BifIGnVS.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
17
  var $03c9a1a10de12f06$exports = {};
287
18
  $03c9a1a10de12f06$exports = {
288
19
  "Clear search": `مسح البحث`
@@ -514,117 +245,6 @@ function $4d52238874b24f86$export$9bb30bbe003b82e0(props, state, inputRef) {
514
245
  ...validation
515
246
  };
516
247
  }
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
- global: true
575
- });
576
- delete DOMProps.id;
577
- return /* @__PURE__ */ React__default.createElement("div", {
578
- ...DOMProps,
579
- ...renderProps,
580
- ref,
581
- slot: props.slot || void 0,
582
- "data-empty": state.value === "" || void 0,
583
- "data-disabled": props.isDisabled || void 0,
584
- "data-invalid": validation.isInvalid || void 0
585
- }, /* @__PURE__ */ React__default.createElement($64fa3d84918910a7$export$2881499e37b75b9a, {
586
- values: [
587
- [
588
- $01b77f81d0f07f68$export$75b6ee27786ba447,
589
- {
590
- ...labelProps,
591
- ref: labelRef
592
- }
593
- ],
594
- [
595
- $3985021b0ad6602f$export$37fb8590cf2c088c,
596
- {
597
- ...$3ef42575df84b30b$export$9d1611c77c2fe928(inputProps, inputContextProps),
598
- ref: mergedInputRef
599
- }
600
- ],
601
- [
602
- $d2b4bc8c273e7be6$export$24d547caef80ccd1,
603
- clearButtonProps
604
- ],
605
- [
606
- $514c0188e459b4c0$export$9afb8bc826b033ea,
607
- {
608
- slots: {
609
- description: descriptionProps,
610
- errorMessage: errorMessageProps
611
- }
612
- }
613
- ],
614
- [
615
- $a049562f99e7db0e$export$f9c6924e160136d1,
616
- {
617
- isInvalid: validation.isInvalid,
618
- isDisabled: props.isDisabled || false
619
- }
620
- ],
621
- [
622
- $ee014567cb39d3f0$export$ff05c3ac10437e03,
623
- validation
624
- ]
625
- ]
626
- }, renderProps.children));
627
- });
628
248
  var $35cd24659c58727a$exports = {};
629
249
  $35cd24659c58727a$exports = {
630
250
  "collectionLabel": `مقترحات`
@@ -802,13 +422,14 @@ function $parcel$interopDefault(a) {
802
422
  return a && a.__esModule ? a.default : a;
803
423
  }
804
424
  function $48f6ba390f8c5b59$export$1e40b3ca02d92d21(props, state) {
805
- let { inputRef, collectionRef, filter, disableAutoFocusFirst = false } = props;
806
- let collectionId = $bdb11010cef70236$export$f680877a34711e37();
425
+ let { inputRef, collectionRef, filter, disableAutoFocusFirst = false, disableVirtualFocus = false } = props;
426
+ let collectionId = $bdb11010cef70236$export$b4cc09c592e8fdb8();
807
427
  let timeout = useRef(void 0);
808
428
  let delayNextActiveDescendant = useRef(false);
809
429
  let queuedActiveDescendant = useRef(null);
810
430
  let lastCollectionNode = useRef(null);
811
- let shouldUseVirtualFocus = $507fabe10e71c6fb$export$630ff653c5ada6a9() !== "virtual";
431
+ let isMobileScreenReader = $507fabe10e71c6fb$export$630ff653c5ada6a9() === "virtual" && ($c87311424ea30a05$export$fedb369cb70207f1() || $c87311424ea30a05$export$a11b0059900ceec8());
432
+ let shouldUseVirtualFocus = !isMobileScreenReader && !disableVirtualFocus;
812
433
  useEffect(() => {
813
434
  return () => clearTimeout(timeout.current);
814
435
  }, []);
@@ -827,7 +448,7 @@ function $48f6ba390f8c5b59$export$1e40b3ca02d92d21(props, state) {
827
448
  queuedActiveDescendant.current = target.id;
828
449
  state.setFocusedNodeId(target.id);
829
450
  }
830
- } else {
451
+ } else if (queuedActiveDescendant.current && !document.getElementById(queuedActiveDescendant.current)) {
831
452
  queuedActiveDescendant.current = null;
832
453
  state.setFocusedNodeId(null);
833
454
  }
@@ -882,7 +503,7 @@ function $48f6ba390f8c5b59$export$1e40b3ca02d92d21(props, state) {
882
503
  });
883
504
  let onChange = (value) => {
884
505
  if (lastInputType.current === "insertText" && !disableAutoFocusFirst) focusFirstItem();
885
- else if (lastInputType.current.includes("insert") || lastInputType.current.includes("delete") || lastInputType.current.includes("history")) {
506
+ else if (lastInputType.current && (lastInputType.current.includes("insert") || lastInputType.current.includes("delete") || lastInputType.current.includes("history"))) {
886
507
  clearVirtualFocus(true);
887
508
  if ($55f9b1ae81f22853$export$759df0d867455a91(document) === inputRef.current) $55f9b1ae81f22853$export$2b35b76d2e30e129(inputRef.current, null);
888
509
  }
@@ -890,7 +511,6 @@ function $48f6ba390f8c5b59$export$1e40b3ca02d92d21(props, state) {
890
511
  };
891
512
  let keyDownTarget = useRef(null);
892
513
  let onKeyDown = (e) => {
893
- var _collectionRef_current;
894
514
  keyDownTarget.current = e.target;
895
515
  if (e.nativeEvent.isComposing) return;
896
516
  let focusedNodeId = queuedActiveDescendant.current;
@@ -912,23 +532,26 @@ function $48f6ba390f8c5b59$export$1e40b3ca02d92d21(props, state) {
912
532
  case "PageUp":
913
533
  case "ArrowUp":
914
534
  case "ArrowDown": {
915
- var _collectionRef_current1;
535
+ var _collectionRef_current;
916
536
  if ((e.key === "Home" || e.key === "End") && focusedNodeId == null && e.shiftKey) return;
917
537
  e.preventDefault();
918
538
  let focusCollection = new CustomEvent($5671b20cf9b562b2$export$831c820ad60f9d12, {
919
539
  cancelable: true,
920
540
  bubbles: true
921
541
  });
922
- (_collectionRef_current1 = collectionRef.current) === null || _collectionRef_current1 === void 0 ? void 0 : _collectionRef_current1.dispatchEvent(focusCollection);
542
+ (_collectionRef_current = collectionRef.current) === null || _collectionRef_current === void 0 ? void 0 : _collectionRef_current.dispatchEvent(focusCollection);
923
543
  break;
924
544
  }
925
545
  }
926
546
  if (!e.isPropagationStopped()) e.stopPropagation();
927
547
  let shouldPerformDefaultAction = true;
928
- 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;
929
- else {
930
- let item = document.getElementById(focusedNodeId);
931
- shouldPerformDefaultAction = (item === null || item === void 0 ? void 0 : item.dispatchEvent(new KeyboardEvent(e.nativeEvent.type, e.nativeEvent))) || false;
548
+ if (collectionRef.current !== null) {
549
+ var _collectionRef_current1;
550
+ if (focusedNodeId == null) shouldPerformDefaultAction = ((_collectionRef_current1 = collectionRef.current) === null || _collectionRef_current1 === void 0 ? void 0 : _collectionRef_current1.dispatchEvent(new KeyboardEvent(e.nativeEvent.type, e.nativeEvent))) || false;
551
+ else {
552
+ let item = document.getElementById(focusedNodeId);
553
+ if (item) shouldPerformDefaultAction = (item === null || item === void 0 ? void 0 : item.dispatchEvent(new KeyboardEvent(e.nativeEvent.type, e.nativeEvent))) || false;
554
+ }
932
555
  }
933
556
  if (shouldPerformDefaultAction) switch (e.key) {
934
557
  case "ArrowLeft":
@@ -942,6 +565,8 @@ function $48f6ba390f8c5b59$export$1e40b3ca02d92d21(props, state) {
942
565
  }
943
566
  break;
944
567
  }
568
+ else
569
+ e.preventDefault();
945
570
  };
946
571
  let onKeyUpCapture = $8ae05eaa5c114e9c$export$7f54fc3180508a52((e) => {
947
572
  if (e.target === keyDownTarget.current) {
@@ -968,8 +593,8 @@ function $48f6ba390f8c5b59$export$1e40b3ca02d92d21(props, state) {
968
593
  id: collectionId,
969
594
  "aria-label": stringFormatter.format("collectionLabel")
970
595
  });
971
- let filterFn = useCallback((nodeTextValue) => {
972
- if (filter) return filter(nodeTextValue, state.inputValue);
596
+ let filterFn = useCallback((nodeTextValue, node) => {
597
+ if (filter) return filter(nodeTextValue, state.inputValue, node);
973
598
  return true;
974
599
  }, [
975
600
  state.inputValue,
@@ -986,31 +611,37 @@ function $48f6ba390f8c5b59$export$1e40b3ca02d92d21(props, state) {
986
611
  if (curFocusedNode) {
987
612
  let target = e.target;
988
613
  queueMicrotask(() => {
989
- $55f9b1ae81f22853$export$6c5dc7e81d2cc29a(target, curFocusedNode);
990
- $55f9b1ae81f22853$export$2b35b76d2e30e129(curFocusedNode, target);
614
+ $55f9b1ae81f22853$export$6c5dc7e81d2cc29a(target, collectionRef.current);
615
+ $55f9b1ae81f22853$export$2b35b76d2e30e129(collectionRef.current, target);
991
616
  });
992
617
  }
993
618
  };
619
+ let inputProps = {
620
+ value: state.inputValue,
621
+ onChange
622
+ };
994
623
  var _state_focusedNodeId;
624
+ let virtualFocusProps = {
625
+ onKeyDown,
626
+ "aria-activedescendant": (_state_focusedNodeId = state.focusedNodeId) !== null && _state_focusedNodeId !== void 0 ? _state_focusedNodeId : void 0,
627
+ onBlur,
628
+ onFocus
629
+ };
630
+ if (collectionId) inputProps = {
631
+ ...inputProps,
632
+ ...shouldUseVirtualFocus && virtualFocusProps,
633
+ enterKeyHint: "go",
634
+ "aria-controls": collectionId,
635
+ // TODO: readd proper logic for completionMode = complete (aria-autocomplete: both)
636
+ "aria-autocomplete": "list",
637
+ // This disable's iOS's autocorrect suggestions, since the autocomplete provides its own suggestions.
638
+ autoCorrect: "off",
639
+ // This disable's the macOS Safari spell check auto corrections.
640
+ spellCheck: "false",
641
+ autoComplete: "off"
642
+ };
995
643
  return {
996
- textFieldProps: {
997
- value: state.inputValue,
998
- onChange,
999
- onKeyDown,
1000
- autoComplete: "off",
1001
- "aria-haspopup": "listbox",
1002
- "aria-controls": collectionId,
1003
- // TODO: readd proper logic for completionMode = complete (aria-autocomplete: both)
1004
- "aria-autocomplete": "list",
1005
- "aria-activedescendant": (_state_focusedNodeId = state.focusedNodeId) !== null && _state_focusedNodeId !== void 0 ? _state_focusedNodeId : void 0,
1006
- // This disable's iOS's autocorrect suggestions, since the autocomplete provides its own suggestions.
1007
- autoCorrect: "off",
1008
- // This disable's the macOS Safari spell check auto corrections.
1009
- spellCheck: "false",
1010
- enterKeyHint: "go",
1011
- onBlur,
1012
- onFocus
1013
- },
644
+ inputProps,
1014
645
  collectionProps: $3ef42575df84b30b$export$9d1611c77c2fe928(collectionProps, {
1015
646
  shouldUseVirtualFocus,
1016
647
  disallowTypeAhead: true
@@ -1035,7 +666,6 @@ function $94680be9a48a8f2d$export$ce1595f6e1a63433(props) {
1035
666
  }
1036
667
  const $d2f53cda644affe3$export$36e687af51cd0967 = /* @__PURE__ */ createContext(null);
1037
668
  const $d2f53cda644affe3$export$68ee3368b6d68148 = /* @__PURE__ */ createContext(null);
1038
- const $d2f53cda644affe3$export$65d2a03b8800d6e3 = /* @__PURE__ */ createContext(null);
1039
669
  function $d2f53cda644affe3$export$2f2b9559550c7bbc(props) {
1040
670
  let ctx = $64fa3d84918910a7$export$fabf2dc03a41866e($d2f53cda644affe3$export$36e687af51cd0967, props.slot);
1041
671
  props = $3ef42575df84b30b$export$9d1611c77c2fe928(ctx, props);
@@ -1043,7 +673,7 @@ function $d2f53cda644affe3$export$2f2b9559550c7bbc(props) {
1043
673
  let state = $94680be9a48a8f2d$export$ce1595f6e1a63433(props);
1044
674
  let inputRef = useRef(null);
1045
675
  let collectionRef = useRef(null);
1046
- let { textFieldProps, collectionProps, collectionRef: mergedCollectionRef, filter: filterFn } = $48f6ba390f8c5b59$export$1e40b3ca02d92d21({
676
+ let { inputProps, collectionProps, collectionRef: mergedCollectionRef, filter: filterFn } = $48f6ba390f8c5b59$export$1e40b3ca02d92d21({
1047
677
  ...$64fa3d84918910a7$export$ef03459518577ad4(props),
1048
678
  filter,
1049
679
  disableAutoFocusFirst,
@@ -1057,72 +687,118 @@ function $d2f53cda644affe3$export$2f2b9559550c7bbc(props) {
1057
687
  state
1058
688
  ],
1059
689
  [
1060
- $440f4836bcb56932$export$d1c4e4c63cb03a11,
1061
- textFieldProps
1062
- ],
1063
- [
1064
- $bcdf0525bf22703d$export$2129e27b3ef0d483,
1065
- textFieldProps
1066
- ],
1067
- [
1068
- $3985021b0ad6602f$export$37fb8590cf2c088c,
690
+ $8e6cc465cc68f603$export$698f465ec27e93df,
1069
691
  {
692
+ ...inputProps,
1070
693
  ref: inputRef
1071
694
  }
1072
695
  ],
1073
696
  [
1074
- $d2f53cda644affe3$export$65d2a03b8800d6e3,
697
+ $8e6cc465cc68f603$export$b0d3ecf7112093a7,
1075
698
  {
699
+ ...collectionProps,
1076
700
  filter: filterFn,
1077
- collectionProps,
1078
- collectionRef: mergedCollectionRef
701
+ ref: mergedCollectionRef
1079
702
  }
1080
703
  ]
1081
704
  ]
1082
705
  }, props.children);
1083
706
  }
1084
- const $72a5793c14baf454$export$e0e4026c12a8bdbb = /* @__PURE__ */ createContext({});
1085
- const $72a5793c14baf454$export$8b251419efc915eb = /* @__PURE__ */ $e1995378a142960e$export$18af5c7a9e9b3664("header", function Header(props, ref) {
1086
- [props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $72a5793c14baf454$export$e0e4026c12a8bdbb);
1087
- return /* @__PURE__ */ React__default.createElement("header", {
1088
- className: "react-aria-Header",
707
+ function $0b2218c4e3fe7d7e$export$3f8be18b0f41eaf2(props) {
708
+ let [value, setValue] = $458b0a5536c1a7cf$export$40bfa8c7b0832715($0b2218c4e3fe7d7e$var$toString(props.value), $0b2218c4e3fe7d7e$var$toString(props.defaultValue) || "", props.onChange);
709
+ return {
710
+ value,
711
+ setValue
712
+ };
713
+ }
714
+ function $0b2218c4e3fe7d7e$var$toString(val) {
715
+ if (val == null) return;
716
+ return val.toString();
717
+ }
718
+ const $440f4836bcb56932$export$d1c4e4c63cb03a11 = /* @__PURE__ */ createContext(null);
719
+ const $440f4836bcb56932$export$b94867ecbd698f21 = /* @__PURE__ */ $f39a9eba43920ace$export$86427a43e3e48ebb(function SearchField(props, ref) {
720
+ [props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $440f4836bcb56932$export$d1c4e4c63cb03a11);
721
+ let { validationBehavior: formValidationBehavior } = $64fa3d84918910a7$export$fabf2dc03a41866e($d3e0e05bdfcf66bd$export$c24727297075ec6a) || {};
722
+ var _props_validationBehavior, _ref;
723
+ let validationBehavior = (_ref = (_props_validationBehavior = props.validationBehavior) !== null && _props_validationBehavior !== void 0 ? _props_validationBehavior : formValidationBehavior) !== null && _ref !== void 0 ? _ref : "native";
724
+ let inputRef = useRef(null);
725
+ [props, inputRef] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, inputRef, $8e6cc465cc68f603$export$698f465ec27e93df);
726
+ let [labelRef, label] = $64fa3d84918910a7$export$9d4c57ee4c6ffdd8(!props["aria-label"] && !props["aria-labelledby"]);
727
+ let state = $0b2218c4e3fe7d7e$export$3f8be18b0f41eaf2({
1089
728
  ...props,
1090
- ref
1091
- }, props.children);
1092
- });
1093
- const $431f98aba6844401$export$6615d83f6de245ce = /* @__PURE__ */ createContext({});
1094
- const $431f98aba6844401$export$1ff3c3f08ae963c0 = /* @__PURE__ */ $e1995378a142960e$export$18af5c7a9e9b3664("separator", function Separator(props, ref) {
1095
- [props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $431f98aba6844401$export$6615d83f6de245ce);
1096
- let { elementType, orientation, style, className, slot, ...otherProps } = props;
1097
- let Element = elementType || "hr";
1098
- if (Element === "hr" && orientation === "vertical") Element = "div";
1099
- let { separatorProps } = $f4b273590fab9f93$export$52210f68a14655d0({
1100
- ...otherProps,
1101
- elementType,
1102
- orientation
729
+ validationBehavior
730
+ });
731
+ let { labelProps, inputProps, clearButtonProps, descriptionProps, errorMessageProps, ...validation } = $4d52238874b24f86$export$9bb30bbe003b82e0({
732
+ ...$64fa3d84918910a7$export$ef03459518577ad4(props),
733
+ label,
734
+ validationBehavior
735
+ }, state, inputRef);
736
+ let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
737
+ ...props,
738
+ values: {
739
+ isEmpty: state.value === "",
740
+ isDisabled: props.isDisabled || false,
741
+ isInvalid: validation.isInvalid || false,
742
+ state
743
+ },
744
+ defaultClassName: "react-aria-SearchField"
1103
745
  });
1104
746
  let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
1105
747
  global: true
1106
748
  });
1107
- return /* @__PURE__ */ React__default.createElement(Element, {
1108
- ...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, separatorProps),
1109
- style,
1110
- className: className !== null && className !== void 0 ? className : "react-aria-Separator",
749
+ delete DOMProps.id;
750
+ return /* @__PURE__ */ React__default.createElement("div", {
751
+ ...DOMProps,
752
+ ...renderProps,
1111
753
  ref,
1112
- slot: slot || void 0
1113
- });
754
+ slot: props.slot || void 0,
755
+ "data-empty": state.value === "" || void 0,
756
+ "data-disabled": props.isDisabled || void 0,
757
+ "data-invalid": validation.isInvalid || void 0
758
+ }, /* @__PURE__ */ React__default.createElement($64fa3d84918910a7$export$2881499e37b75b9a, {
759
+ values: [
760
+ [
761
+ $01b77f81d0f07f68$export$75b6ee27786ba447,
762
+ {
763
+ ...labelProps,
764
+ ref: labelRef
765
+ }
766
+ ],
767
+ [
768
+ $3985021b0ad6602f$export$37fb8590cf2c088c,
769
+ {
770
+ ...inputProps,
771
+ ref: inputRef
772
+ }
773
+ ],
774
+ [
775
+ $d2b4bc8c273e7be6$export$24d547caef80ccd1,
776
+ clearButtonProps
777
+ ],
778
+ [
779
+ $514c0188e459b4c0$export$9afb8bc826b033ea,
780
+ {
781
+ slots: {
782
+ description: descriptionProps,
783
+ errorMessage: errorMessageProps
784
+ }
785
+ }
786
+ ],
787
+ [
788
+ $a049562f99e7db0e$export$f9c6924e160136d1,
789
+ {
790
+ isInvalid: validation.isInvalid,
791
+ isDisabled: props.isDisabled || false
792
+ }
793
+ ],
794
+ [
795
+ $ee014567cb39d3f0$export$ff05c3ac10437e03,
796
+ validation
797
+ ]
798
+ ]
799
+ }, renderProps.children));
1114
800
  });
1115
801
  export {
1116
- $72a5793c14baf454$export$8b251419efc915eb as $,
1117
- $431f98aba6844401$export$1ff3c3f08ae963c0 as a,
1118
- $d2f53cda644affe3$export$2f2b9559550c7bbc as b,
1119
- $440f4836bcb56932$export$b94867ecbd698f21 as c,
1120
- $325a3faab7a68acd$export$a16aca283550c30d as d,
1121
- $62d8ded9296f3872$export$cfa2225e87938781 as e,
1122
- $982254629710d113$export$b95089534ab7c1fd as f,
1123
- $453cc9f0df89c0a5$export$77d5aafae4e095b2 as g,
1124
- $d2f53cda644affe3$export$65d2a03b8800d6e3 as h,
1125
- $2a25aae57d74318e$export$a05409b8bb224a5a as i,
1126
- $431f98aba6844401$export$6615d83f6de245ce as j,
1127
- $72a5793c14baf454$export$e0e4026c12a8bdbb as k
802
+ $d2f53cda644affe3$export$2f2b9559550c7bbc as $,
803
+ $440f4836bcb56932$export$b94867ecbd698f21 as a
1128
804
  };