@iress-oss/ids-components 6.0.0-alpha.25 → 6.0.0-alpha.26

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 (167) hide show
  1. package/dist/Autocomplete-BRMDwwwT.js +402 -0
  2. package/dist/components/Alert/Alert.styles.d.ts +1 -1
  3. package/dist/components/Autocomplete/Autocomplete.d.ts +1 -1
  4. package/dist/components/Autocomplete/Autocomplete.js +12 -10
  5. package/dist/components/Autocomplete/hooks/useAutocompleteSearch.d.ts +7 -1
  6. package/dist/components/Autocomplete/hooks/useAutocompleteSearch.js +140 -135
  7. package/dist/components/Autocomplete/index.js +1 -1
  8. package/dist/components/Button/Button.d.ts +1 -1
  9. package/dist/components/Card/Card.styles.d.ts +1 -1
  10. package/dist/components/Checkbox/Checkbox.d.ts +26 -23
  11. package/dist/components/Checkbox/Checkbox.js +95 -81
  12. package/dist/components/Checkbox/Checkbox.styles.d.ts +37 -28
  13. package/dist/components/Checkbox/Checkbox.styles.js +48 -54
  14. package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +7 -8
  15. package/dist/components/CheckboxGroup/CheckboxGroup.js +53 -55
  16. package/dist/components/Expander/Expander.js +16 -16
  17. package/dist/components/Expander/Expander.styles.d.ts +15 -12
  18. package/dist/components/Expander/Expander.styles.js +23 -20
  19. package/dist/components/Field/Field.styles.d.ts +1 -1
  20. package/dist/components/Filter/Filter.d.ts +1 -1
  21. package/dist/components/Filter/Filter.js +51 -49
  22. package/dist/components/Filter/Filter.styles.js +5 -5
  23. package/dist/components/Input/Input.styles.d.ts +2 -0
  24. package/dist/components/Input/Input.styles.js +2 -0
  25. package/dist/components/Link/Link.styles.d.ts +1 -1
  26. package/dist/components/Menu/Menu.d.ts +9 -1
  27. package/dist/components/Menu/Menu.js +45 -42
  28. package/dist/components/Menu/Menu.styles.d.ts +29 -14
  29. package/dist/components/Menu/Menu.styles.js +55 -39
  30. package/dist/components/Menu/MenuItem/MenuItem.js +110 -95
  31. package/dist/components/Menu/MenuText/MenuText.js +29 -29
  32. package/dist/components/Modal/Modal.styles.d.ts +1 -0
  33. package/dist/components/Modal/Modal.styles.js +7 -4
  34. package/dist/components/Pill/Pill.d.ts +18 -0
  35. package/dist/components/Pill/Pill.js +29 -0
  36. package/dist/components/Pill/Pill.styles.d.ts +40 -0
  37. package/dist/components/Pill/Pill.styles.js +66 -0
  38. package/dist/components/Pill/index.d.ts +2 -0
  39. package/dist/components/Pill/index.js +6 -0
  40. package/dist/components/Placeholder/Placeholder.js +14 -6
  41. package/dist/components/Placeholder/Placeholder.styles.d.ts +1 -1
  42. package/dist/components/Placeholder/Placeholder.styles.js +8 -5
  43. package/dist/components/Popover/InputPopover/InputPopover.js +30 -30
  44. package/dist/components/Popover/Popover.d.ts +0 -1
  45. package/dist/components/Popover/Popover.js +25 -25
  46. package/dist/components/Popover/Popover.styles.js +3 -3
  47. package/dist/components/Popover/hooks/useFloatingPopover.d.ts +2 -2
  48. package/dist/components/Progress/Progress.js +1 -1
  49. package/dist/components/Radio/Radio.d.ts +10 -7
  50. package/dist/components/Radio/Radio.js +86 -90
  51. package/dist/components/Radio/Radio.styles.d.ts +37 -41
  52. package/dist/components/Radio/Radio.styles.js +54 -160
  53. package/dist/components/RadioGroup/RadioGroup.d.ts +7 -7
  54. package/dist/components/RadioGroup/RadioGroup.js +68 -70
  55. package/dist/components/RadioGroup/RadioGroup.styles.d.ts +0 -9
  56. package/dist/components/RadioGroup/RadioGroup.styles.js +2 -11
  57. package/dist/components/RadioMark/RadioMark.d.ts +19 -0
  58. package/dist/components/RadioMark/RadioMark.js +31 -0
  59. package/dist/components/RadioMark/RadioMark.styles.d.ts +15 -0
  60. package/dist/components/RadioMark/RadioMark.styles.js +45 -0
  61. package/dist/components/RadioMark/index.d.ts +2 -0
  62. package/dist/components/RadioMark/index.js +6 -0
  63. package/dist/components/Select/Select.d.ts +145 -19
  64. package/dist/components/Select/Select.js +22 -95
  65. package/dist/components/Select/Select.styles.d.ts +12 -47
  66. package/dist/components/Select/Select.styles.js +41 -73
  67. package/dist/components/{RichSelect → Select}/SelectBody/SelectBody.js +8 -12
  68. package/dist/components/{RichSelect → Select}/SelectBody/SelectBody.styles.js +3 -3
  69. package/dist/components/{RichSelect → Select}/SelectHeading/SelectHeading.js +24 -27
  70. package/dist/components/{RichSelect → Select}/SelectLabel/SelectLabel.js +5 -5
  71. package/dist/components/{RichSelect → Select}/SelectLabel/SelectLabel.styles.d.ts +1 -1
  72. package/dist/components/{RichSelect → Select}/SelectLabel/SelectLabel.styles.js +7 -14
  73. package/dist/components/{RichSelect → Select}/SelectMenu/SelectMenu.d.ts +1 -1
  74. package/dist/components/{RichSelect → Select}/SelectMenu/SelectMenu.js +1 -1
  75. package/dist/components/{RichSelect → Select}/SelectMenu/SelectMenuItem.js +5 -5
  76. package/dist/components/{RichSelect → Select}/SelectSearch/SelectSearch.js +9 -13
  77. package/dist/components/{RichSelect → Select}/SelectSearch/SelectSearch.styles.js +2 -2
  78. package/dist/components/{RichSelect → Select}/SelectSearchInput/SelectSearchInput.js +9 -9
  79. package/dist/components/{RichSelect → Select}/SelectSearchInput/SelectSearchInput.styles.js +2 -3
  80. package/dist/components/{RichSelect → Select}/SelectTags/SelectTags.js +31 -30
  81. package/dist/components/{RichSelect → Select}/SelectTags/SelectTags.styles.d.ts +1 -1
  82. package/dist/components/{RichSelect → Select}/SelectTags/SelectTags.styles.js +3 -7
  83. package/dist/components/Select/components/NativeSelect.d.ts +50 -0
  84. package/dist/components/Select/components/NativeSelect.js +89 -0
  85. package/dist/components/Select/components/NativeSelect.styles.d.ts +101 -0
  86. package/dist/components/Select/components/NativeSelect.styles.js +133 -0
  87. package/dist/components/{RichSelect → Select}/components/SelectActivator.d.ts +3 -3
  88. package/dist/components/Select/components/SelectActivator.js +69 -0
  89. package/dist/components/{RichSelect → Select}/components/SelectHiddenInput.d.ts +3 -2
  90. package/dist/components/Select/components/SelectHiddenInput.js +32 -0
  91. package/dist/components/{RichSelect → Select}/components/SelectOptions.d.ts +2 -2
  92. package/dist/components/{RichSelect → Select}/components/SelectOptions.js +20 -20
  93. package/dist/components/{RichSelect/hooks/useRichSelectState.d.ts → Select/hooks/useSelectState.d.ts} +2 -2
  94. package/dist/components/{RichSelect/hooks/useRichSelectState.js → Select/hooks/useSelectState.js} +2 -2
  95. package/dist/components/Select/index.d.ts +10 -2
  96. package/dist/components/Select/index.js +22 -6
  97. package/dist/components/Slideout/hooks/usePushElement.js +1 -1
  98. package/dist/components/TabSet/Tab/Tab.styles.js +2 -1
  99. package/dist/components/Table/Table.styles.js +4 -4
  100. package/dist/components/Table/components/TableSortButton.d.ts +1 -1
  101. package/dist/components/Table/components/TableSortButton.js +47 -30
  102. package/dist/components/Tag/Tag.d.ts +6 -0
  103. package/dist/components/Tag/Tag.js +42 -39
  104. package/dist/components/Tag/Tag.styles.d.ts +66 -3
  105. package/dist/components/Tag/Tag.styles.js +73 -9
  106. package/dist/components/Tag/TagInput/TagInput.styles.js +11 -8
  107. package/dist/enums.d.ts +12 -12
  108. package/dist/enums.js +1 -1
  109. package/dist/hooks/useBreakpoint.d.ts +9 -1
  110. package/dist/hooks/useBreakpoint.js +12 -11
  111. package/dist/hooks/useResponsiveProps.d.ts +15 -2
  112. package/dist/hooks/useResponsiveProps.js +18 -18
  113. package/dist/{index-7z9nAsjZ.js → index-BD6y-Q5p.js} +13 -9
  114. package/dist/interfaces.d.ts +10 -0
  115. package/dist/main.d.ts +3 -2
  116. package/dist/main.js +197 -197
  117. package/dist/patterns/Form/Form.styles.d.ts +1 -1
  118. package/dist/patterns/Form/FormField/hooks/useFieldRenderProps.js +16 -16
  119. package/dist/patterns/Loading/Loading.styles.d.ts +2 -2
  120. package/dist/patterns/Loading/Loading.styles.js +2 -2
  121. package/dist/patterns/Shadow/Shadow.js +825 -831
  122. package/dist/style.css +1 -1
  123. package/dist/styled-system/recipes/table.d.ts +1 -1
  124. package/dist/styled-system/tokens/tokens.d.ts +1 -1
  125. package/dist/styled-system/types/prop-type.d.ts +2 -2
  126. package/package.json +2 -2
  127. package/dist/Autocomplete-DUsna_OY.js +0 -353
  128. package/dist/components/Badge/Badge.d.ts +0 -20
  129. package/dist/components/Badge/Badge.js +0 -35
  130. package/dist/components/Badge/Badge.styles.d.ts +0 -101
  131. package/dist/components/Badge/Badge.styles.js +0 -140
  132. package/dist/components/Badge/index.d.ts +0 -2
  133. package/dist/components/Badge/index.js +0 -6
  134. package/dist/components/RichSelect/RichSelect.d.ts +0 -164
  135. package/dist/components/RichSelect/RichSelect.js +0 -30
  136. package/dist/components/RichSelect/RichSelect.styles.d.ts +0 -59
  137. package/dist/components/RichSelect/RichSelect.styles.js +0 -98
  138. package/dist/components/RichSelect/components/SelectActivator.js +0 -66
  139. package/dist/components/RichSelect/components/SelectHiddenInput.js +0 -30
  140. package/dist/components/RichSelect/index.d.ts +0 -10
  141. package/dist/components/RichSelect/index.js +0 -22
  142. package/dist/components/RichSelect/meta/Thumbnail.d.ts +0 -2
  143. package/dist/components/RichSelect/meta/index.d.ts +0 -7
  144. package/dist/components/Select/SelectOption/SelectOption.d.ts +0 -9
  145. package/dist/components/Select/SelectOption/SelectOption.js +0 -10
  146. package/dist/components/Select/components/SelectControl.d.ts +0 -26
  147. package/dist/components/Select/components/SelectControl.js +0 -42
  148. package/dist/components/Select/components/SelectReadonly.d.ts +0 -18
  149. package/dist/components/Select/components/SelectReadonly.js +0 -40
  150. package/dist/components/Select/helpers/nodesToSelectOptions.d.ts +0 -16
  151. package/dist/components/Select/helpers/nodesToSelectOptions.js +0 -41
  152. /package/dist/components/{Badge → Pill}/meta/Thumbnail.d.ts +0 -0
  153. /package/dist/components/{Badge → Pill}/meta/index.d.ts +0 -0
  154. /package/dist/components/{RichSelect → Select}/SelectBody/SelectBody.d.ts +0 -0
  155. /package/dist/components/{RichSelect → Select}/SelectBody/SelectBody.styles.d.ts +0 -0
  156. /package/dist/components/{RichSelect → Select}/SelectCreate/SelectCreate.d.ts +0 -0
  157. /package/dist/components/{RichSelect → Select}/SelectCreate/SelectCreate.js +0 -0
  158. /package/dist/components/{RichSelect → Select}/SelectHeading/SelectHeading.d.ts +0 -0
  159. /package/dist/components/{RichSelect → Select}/SelectLabel/SelectLabel.d.ts +0 -0
  160. /package/dist/components/{RichSelect → Select}/SelectMenu/SelectMenu.styles.d.ts +0 -0
  161. /package/dist/components/{RichSelect → Select}/SelectMenu/SelectMenu.styles.js +0 -0
  162. /package/dist/components/{RichSelect → Select}/SelectMenu/SelectMenuItem.d.ts +0 -0
  163. /package/dist/components/{RichSelect → Select}/SelectSearch/SelectSearch.d.ts +0 -0
  164. /package/dist/components/{RichSelect → Select}/SelectSearch/SelectSearch.styles.d.ts +0 -0
  165. /package/dist/components/{RichSelect → Select}/SelectSearchInput/SelectSearchInput.d.ts +0 -0
  166. /package/dist/components/{RichSelect → Select}/SelectSearchInput/SelectSearchInput.styles.d.ts +0 -0
  167. /package/dist/components/{RichSelect → Select}/SelectTags/SelectTags.d.ts +0 -0
@@ -0,0 +1,402 @@
1
+ import { jsx as o, jsxs as O, Fragment as pe } from "react/jsx-runtime";
2
+ import { c as A } from "./cx-DN21T1EH.js";
3
+ import { autoComplete as we } from "./components/Autocomplete/Autocomplete.styles.js";
4
+ import { IressPopover as Ne } from "./components/Popover/Popover.js";
5
+ import "./components/Popover/Popover.styles.js";
6
+ import { IressInputPopover as De } from "./components/Popover/InputPopover/InputPopover.js";
7
+ import { forwardRef as me, useState as B, useRef as ne, useImperativeHandle as xe, useEffect as ae, useCallback as Re } from "react";
8
+ import "./components/Popover/hooks/useFloatingPopover.js";
9
+ import { IressInput as Fe } from "./components/Input/Input.js";
10
+ import "./components/Input/Input.styles.js";
11
+ import { useControlledState as Te } from "./hooks/useControlledState.js";
12
+ import { propagateTestid as ie } from "./helpers/utility/propagateTestid.js";
13
+ import { toArray as Ee } from "./helpers/formatting/toArray.js";
14
+ import { getValueAsEvent as Pe } from "./helpers/form/getValueAsEvent.js";
15
+ import { getFormControlValueAsStringIfDefined as Le } from "./helpers/form/getFormControlValueAsStringIfDefined.js";
16
+ import { useAutocompleteSearch as fe } from "./components/Autocomplete/hooks/useAutocompleteSearch.js";
17
+ import { IressIcon as Ve } from "./components/Icon/Icon.js";
18
+ import { AutocompleteInstructions as ke } from "./components/Autocomplete/components/AutocompleteInstructions.js";
19
+ import { select as Ke } from "./components/Select/Select.styles.js";
20
+ import "./components/Select/SelectBody/SelectBody.js";
21
+ import "./components/Select/SelectCreate/SelectCreate.js";
22
+ import "./components/Select/SelectHeading/SelectHeading.js";
23
+ import "./components/Select/SelectLabel/SelectLabel.js";
24
+ import { IressSelectMenu as Qe } from "./components/Select/SelectMenu/SelectMenu.js";
25
+ import "./components/Select/SelectSearch/SelectSearch.js";
26
+ import "./components/Select/SelectSearchInput/SelectSearchInput.js";
27
+ import "./components/Select/SelectTags/SelectTags.js";
28
+ import "./components/Select/components/NativeSelect.styles.js";
29
+ import { IressReadonly as de } from "./components/Readonly/Readonly.js";
30
+ import "./components/Readonly/Readonly.styles.js";
31
+ import { IressAlert as je } from "./components/Alert/Alert.js";
32
+ import "./components/Alert/Alert.styles.js";
33
+ import { GlobalCSSClass as ce } from "./enums.js";
34
+ import { SelectActivator as qe } from "./components/Select/components/SelectActivator.js";
35
+ import { SelectOptions as He } from "./components/Select/components/SelectOptions.js";
36
+ import { SelectHiddenInput as Me } from "./components/Select/components/SelectHiddenInput.js";
37
+ import { useNoDefaultValueInForms as Oe } from "./patterns/Form/hooks/useNoDefaultValueInForms.js";
38
+ import { useResponsiveProps as Be } from "./hooks/useResponsiveProps.js";
39
+ import { NativeSelect as Ge } from "./components/Select/components/NativeSelect.js";
40
+ import { useSelectState as ze } from "./components/Select/hooks/useSelectState.js";
41
+ const Je = ({
42
+ align: R = "bottom-start",
43
+ autoHighlight: G = !0,
44
+ className: F,
45
+ defaultValue: T,
46
+ disabled: d,
47
+ footer: z,
48
+ header: C,
49
+ id: E,
50
+ matchActivatorWidth: J = !0,
51
+ multiSelect: h,
52
+ name: w,
53
+ onChange: N,
54
+ onBlur: D,
55
+ options: u,
56
+ native: m,
57
+ placeholder: v,
58
+ readOnly: U,
59
+ renderHiddenInput: W,
60
+ renderLabel: X,
61
+ renderOptions: Y,
62
+ required: Z,
63
+ type: _,
64
+ value: g,
65
+ virtualFocus: $,
66
+ width: P,
67
+ ...L
68
+ }, ee) => {
69
+ Oe({
70
+ component: "IressSelect",
71
+ defaultValue: T
72
+ });
73
+ const [e, t] = B(!1), a = e && !d, [I, S] = B(""), { value: l, setValue: x, getValuesString: V, getLabelsString: i } = ze({
74
+ component: "IressSelect",
75
+ defaultValue: T,
76
+ multiple: h,
77
+ value: g
78
+ }), f = ne(null), s = ne(null), c = ne(null), { value: y } = Be(
79
+ typeof m == "string" ? { xs: !0, [m]: !1 } : { xs: m },
80
+ {
81
+ disabled: !m
82
+ }
83
+ ), {
84
+ append: k,
85
+ debounceThreshold: K,
86
+ initialOptions: Q,
87
+ minSearchLength: j,
88
+ onActivated: q,
89
+ onDeactivated: H,
90
+ prepend: te,
91
+ selectedOptionsText: re,
92
+ ...p
93
+ } = L, {
94
+ debouncedQuery: r,
95
+ error: n,
96
+ results: he,
97
+ stopSearch: ve,
98
+ loading: le,
99
+ shouldShowInstructions: ge,
100
+ shouldShowNoResults: Ie
101
+ } = fe({
102
+ debounceThreshold: K,
103
+ disabled: !e || !!y,
104
+ initialOptions: Q,
105
+ minSearchLength: j,
106
+ options: u,
107
+ query: I
108
+ });
109
+ xe(ee, () => y ? {
110
+ focus: () => s.current?.focus(),
111
+ blur: () => s.current?.blur(),
112
+ input: s.current ?? null
113
+ } : f.current ? {
114
+ ...f.current,
115
+ focus: () => f.current?.getActivator()?.focus(),
116
+ blur: () => f.current?.getActivator()?.blur(),
117
+ hiddenInput: c.current ?? void 0,
118
+ input: c.current ?? null
119
+ } : {
120
+ hiddenInput: c.current ?? void 0,
121
+ input: c.current ?? null,
122
+ focus: () => c.current?.focus(),
123
+ blur: () => c.current?.blur()
124
+ }, [y]), ae(() => {
125
+ e ? q?.() : H?.();
126
+ }, [q, H, e]);
127
+ const Se = Re(
128
+ (b) => {
129
+ if (!D) return;
130
+ const M = b.currentTarget, ue = b.relatedTarget;
131
+ !e && (!ue || !M.contains(ue)) && D(b), b.stopPropagation();
132
+ },
133
+ [D, e]
134
+ );
135
+ if (U)
136
+ return /* @__PURE__ */ o(de, { value: V(), ref: c, children: i(", ") });
137
+ if (y) {
138
+ if (u instanceof Function)
139
+ throw new Error(
140
+ "[IressSelect] The native select does not support asynchronous options. Please provide options as an array."
141
+ );
142
+ if (h)
143
+ throw new Error(
144
+ "[IressSelect] The native select does not support multiple selection. Please remove the multiSelect prop or use the non-native select."
145
+ );
146
+ return /* @__PURE__ */ o(
147
+ Ge,
148
+ {
149
+ className: A(F, ce.Select),
150
+ "data-testid": p["data-testid"],
151
+ disabled: d,
152
+ id: E,
153
+ name: w,
154
+ onChange: (b, M) => {
155
+ N?.(b, M), x(M);
156
+ },
157
+ options: u,
158
+ placeholder: typeof m == "string" ? v ?? "" : v,
159
+ style: p.style,
160
+ value: l,
161
+ width: P,
162
+ ref: s
163
+ }
164
+ );
165
+ }
166
+ const oe = typeof u == "function", ye = $ ?? !oe, be = _ ?? (oe ? void 0 : "listbox"), se = Ke({ width: P }), Ae = () => {
167
+ t(!0);
168
+ }, Ce = () => {
169
+ t(!1), ve();
170
+ };
171
+ return /* @__PURE__ */ O(pe, { children: [
172
+ /* @__PURE__ */ o(
173
+ Me,
174
+ {
175
+ "data-testid": p["data-testid"],
176
+ getValuesString: V,
177
+ name: w,
178
+ renderHiddenInput: W,
179
+ required: Z,
180
+ value: l,
181
+ disabled: d,
182
+ ref: c
183
+ }
184
+ ),
185
+ /* @__PURE__ */ o(
186
+ Ne,
187
+ {
188
+ ...p,
189
+ activator: /* @__PURE__ */ o(
190
+ qe,
191
+ {
192
+ append: k,
193
+ async: oe,
194
+ disabled: d,
195
+ error: n,
196
+ id: E,
197
+ loading: le,
198
+ multiSelect: h,
199
+ onChange: N,
200
+ placeholder: v,
201
+ prepend: te,
202
+ renderLabel: X,
203
+ selectedOptionsText: re,
204
+ setValue: x,
205
+ setShow: t,
206
+ show: e,
207
+ value: l
208
+ }
209
+ ),
210
+ align: R,
211
+ className: A(F, se.root, ce.Select),
212
+ contentClassName: A(se.popoverContent),
213
+ matchActivatorWidth: J,
214
+ onActivated: Ae,
215
+ onDeactivated: Ce,
216
+ ref: f,
217
+ show: a,
218
+ type: be,
219
+ virtualFocus: ye,
220
+ onBlur: Se,
221
+ children: /* @__PURE__ */ O("div", { className: se.wrapper, children: [
222
+ C,
223
+ /* @__PURE__ */ o(
224
+ He,
225
+ {
226
+ autoHighlight: G,
227
+ debouncedQuery: r,
228
+ error: n,
229
+ initialOptions: Q,
230
+ loading: le,
231
+ minSearchLength: j,
232
+ multiSelect: h,
233
+ onChange: N,
234
+ options: u,
235
+ query: I,
236
+ renderOptions: Y,
237
+ results: he,
238
+ setQuery: S,
239
+ setShow: t,
240
+ setValue: x,
241
+ shouldShowInstructions: ge,
242
+ shouldShowNoResults: Ie,
243
+ show: a,
244
+ value: l
245
+ }
246
+ ),
247
+ z
248
+ ] })
249
+ }
250
+ )
251
+ ] });
252
+ }, Ue = me(Je);
253
+ Ue.displayName = "IressSelect";
254
+ const We = me(
255
+ ({
256
+ alwaysShowOnFocus: R,
257
+ append: G = /* @__PURE__ */ o(Ve, { name: "search" }),
258
+ autoComplete: F = "off",
259
+ autoSelect: T = !0,
260
+ className: d,
261
+ clearable: z = !0,
262
+ "data-testid": C,
263
+ debounceThreshold: E,
264
+ defaultValue: J,
265
+ errorText: h = /* @__PURE__ */ o(je, { status: "danger", mb: "none", borderRadius: "radius.system.form", children: "An unknown error occurred. Please contact support if the error persists." }),
266
+ initialOptions: w,
267
+ limitDesktop: N = 12,
268
+ limitMobile: D = 6,
269
+ minSearchLength: u,
270
+ noResultsText: m,
271
+ onChange: v,
272
+ onClear: U,
273
+ onFocus: W,
274
+ options: X,
275
+ popoverProps: {
276
+ autoHighlight: Y = !1,
277
+ append: Z,
278
+ prepend: _,
279
+ ...g
280
+ } = {},
281
+ readOnly: $,
282
+ value: P,
283
+ ...L
284
+ }, ee) => {
285
+ const [e, t] = B(!1), { value: a, setValue: I } = Te({
286
+ component: "IressAutocomplete",
287
+ defaultValue: J,
288
+ value: P
289
+ }), [S, l] = B(!1), {
290
+ clearError: x,
291
+ debouncedQuery: V,
292
+ error: i,
293
+ loading: f,
294
+ results: s,
295
+ startSearch: c,
296
+ stopSearch: y,
297
+ shouldShowInstructions: k,
298
+ shouldShowNoResults: K
299
+ } = fe({
300
+ debounceThreshold: E,
301
+ initialOptions: w,
302
+ minSearchLength: u,
303
+ options: X,
304
+ query: Le(a)
305
+ });
306
+ if (ae(() => {
307
+ S && !e && s.length > 0 && a && t(!0);
308
+ }, [s.length, e, S, a]), ae(() => {
309
+ i && t(!0);
310
+ }, [i]), $)
311
+ return /* @__PURE__ */ o(de, { value: a });
312
+ const Q = (r, n) => {
313
+ v?.(r, n), I(n), l(!!n);
314
+ }, j = (r) => {
315
+ U?.(r), I("");
316
+ }, q = (r) => {
317
+ W?.(r), w?.length && t(!0);
318
+ }, H = (r) => {
319
+ const n = Ee(r)?.[0];
320
+ v?.(
321
+ Pe(n?.label),
322
+ n?.label,
323
+ n
324
+ ), I(n?.label), t(!1), l(!1);
325
+ }, te = () => {
326
+ (!R || !a) && y(), x(), t(!1), a && l(!1);
327
+ }, re = (r) => {
328
+ L.onKeyDown?.(r), r.key === "ArrowDown" && (!e || !S) && (s.length || c(!0), l(!0), t(!0));
329
+ }, p = we({
330
+ isEmpty: s.length === 0 && !i && !k && !K
331
+ });
332
+ return /* @__PURE__ */ O(
333
+ De,
334
+ {
335
+ ...g,
336
+ activator: /* @__PURE__ */ o(
337
+ Fe,
338
+ {
339
+ ...L,
340
+ append: G,
341
+ autoComplete: F,
342
+ clearable: z,
343
+ "data-testid": ie(C, "input"),
344
+ loading: f,
345
+ onChange: Q,
346
+ onClear: j,
347
+ onFocus: q,
348
+ onKeyDown: re,
349
+ value: a,
350
+ ref: ee
351
+ }
352
+ ),
353
+ autoHighlight: Y,
354
+ className: A(
355
+ d,
356
+ g.className,
357
+ p.root,
358
+ ce.Autocomplete
359
+ ),
360
+ contentClassName: A(
361
+ g.contentClassName,
362
+ p.popoverContent
363
+ ),
364
+ contentStyle: g.contentStyle,
365
+ "data-testid": C,
366
+ minLength: 0,
367
+ onActivated: () => (S || R) && t(!0),
368
+ onDeactivated: te,
369
+ show: e,
370
+ type: "listbox",
371
+ focusStartIndex: 0,
372
+ children: [
373
+ s.length > 0 && /* @__PURE__ */ O(pe, { children: [
374
+ _,
375
+ /* @__PURE__ */ o(
376
+ Qe,
377
+ {
378
+ changeOnBlur: T,
379
+ className: A(p.optionList),
380
+ "data-testid": ie(C, "menu"),
381
+ items: s,
382
+ limitDesktop: N,
383
+ limitMobile: D,
384
+ onChange: H,
385
+ selected: { label: V }
386
+ }
387
+ ),
388
+ Z
389
+ ] }),
390
+ i && h,
391
+ k && !i && /* @__PURE__ */ o(ke, { minSearchLength: u ?? 1 }),
392
+ K && !i && m
393
+ ]
394
+ }
395
+ );
396
+ }
397
+ );
398
+ We.displayName = "IressAutocomplete";
399
+ export {
400
+ Ue as I,
401
+ We as a
402
+ };
@@ -1,4 +1,4 @@
1
- export declare const alert: import('../../styled-system/types').SlotRecipeRuntimeFn<"footer" | "alert" | "children" | "heading" | "icon" | "wrapper" | "footerActions" | "action" | "dismiss", {
1
+ export declare const alert: import('../../styled-system/types').SlotRecipeRuntimeFn<"children" | "footer" | "alert" | "heading" | "icon" | "wrapper" | "footerActions" | "action" | "dismiss", {
2
2
  hasFooter: {
3
3
  true: {
4
4
  dismiss: {
@@ -3,7 +3,7 @@ import { InputBaseElement, IressInputProps } from '../Input';
3
3
  import { AutocompleteSearchHookProps } from './hooks/useAutocompleteSearch';
4
4
  import { ReactNode, SyntheticEvent } from 'react';
5
5
  import { InputRef } from '../Input/InputBase/InputBase';
6
- import { IressSelectMenuProps } from '../RichSelect';
6
+ import { IressSelectMenuProps } from '../Select';
7
7
  import { LabelValueMeta } from '../../interfaces';
8
8
  import { FormControlValue } from '../../types';
9
9
  export interface IressAutocompleteProps<T extends FormControlValue = string> extends Omit<IressInputProps<T>, 'children' | 'onChange'>, Omit<AutocompleteSearchHookProps, 'query'>, Pick<IressSelectMenuProps, 'limitMobile' | 'limitDesktop'> {
@@ -16,20 +16,22 @@ import "../../helpers/form/getFormControlValueAsStringIfDefined.js";
16
16
  import "./hooks/useAutocompleteSearch.js";
17
17
  import "../Icon/Icon.js";
18
18
  import "./components/AutocompleteInstructions.js";
19
- import { a as G } from "../../Autocomplete-DUsna_OY.js";
20
- import "../RichSelect/SelectBody/SelectBody.js";
21
- import "../RichSelect/SelectCreate/SelectCreate.js";
22
- import "../RichSelect/SelectHeading/SelectHeading.js";
23
- import "../RichSelect/SelectLabel/SelectLabel.js";
24
- import "../RichSelect/SelectMenu/SelectMenu.js";
25
- import "../RichSelect/SelectSearch/SelectSearch.js";
26
- import "../RichSelect/SelectSearchInput/SelectSearchInput.js";
27
- import "../RichSelect/SelectTags/SelectTags.js";
19
+ import { a as J } from "../../Autocomplete-BRMDwwwT.js";
20
+ import "../Select/SelectBody/SelectBody.js";
21
+ import "../Select/SelectCreate/SelectCreate.js";
22
+ import "../Select/SelectHeading/SelectHeading.js";
23
+ import "../Select/SelectLabel/SelectLabel.js";
24
+ import "../Select/SelectMenu/SelectMenu.js";
25
+ import "../Select/SelectSearch/SelectSearch.js";
26
+ import "../Select/SelectSearchInput/SelectSearchInput.js";
27
+ import "../Select/SelectTags/SelectTags.js";
28
+ import "../Select/Select.styles.js";
29
+ import "../Select/components/NativeSelect.styles.js";
28
30
  import "../Readonly/Readonly.js";
29
31
  import "../Readonly/Readonly.styles.js";
30
32
  import "../Alert/Alert.js";
31
33
  import "../Alert/Alert.styles.js";
32
34
  import "../../enums.js";
33
35
  export {
34
- G as IressAutocomplete
36
+ J as IressAutocomplete
35
37
  };
@@ -5,6 +5,12 @@ export interface AutocompleteSearchHookProps {
5
5
  * @default 500
6
6
  */
7
7
  debounceThreshold?: number;
8
+ /**
9
+ * Disables the hook from running any effects or search operations.
10
+ * When disabled, the hook returns empty results and default state.
11
+ * @default false
12
+ */
13
+ disabled?: boolean;
8
14
  /**
9
15
  * Initial options data set, shown when the input is empty.
10
16
  */
@@ -74,4 +80,4 @@ export interface AutocompleteSearchHookReturn {
74
80
  * Advanced autocomplete search hook with debouncing and race condition protection
75
81
  * Supports both sync array search and async function search
76
82
  */
77
- export declare const useAutocompleteSearch: ({ debounceThreshold, initialOptions, minSearchLength, options, query, }: AutocompleteSearchHookProps) => AutocompleteSearchHookReturn;
83
+ export declare const useAutocompleteSearch: ({ debounceThreshold, disabled, initialOptions, minSearchLength, options, query, }: AutocompleteSearchHookProps) => AutocompleteSearchHookReturn;