@povio/ui 3.2.2-rc.6 → 3.2.2

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 (31) hide show
  1. package/dist/components/inputs/DateTime/shared/DateField.js +80 -83
  2. package/dist/components/inputs/File/FileUpload.d.ts +1 -1
  3. package/dist/components/inputs/File/FileUpload.js +6 -1
  4. package/dist/components/inputs/File/fileUpload.types.d.ts +6 -0
  5. package/dist/components/inputs/File/shared/FileCard.d.ts +2 -2
  6. package/dist/components/inputs/File/shared/FileCard.js +46 -40
  7. package/dist/components/inputs/File/shared/FileCardList.d.ts +2 -2
  8. package/dist/components/inputs/File/shared/FileCardList.js +27 -21
  9. package/dist/components/inputs/File/shared/FileUploadContent.d.ts +1 -1
  10. package/dist/components/inputs/File/shared/FileUploadContent.js +98 -84
  11. package/dist/components/inputs/File/shared/FileUploadContentEmpty.d.ts +2 -2
  12. package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +157 -121
  13. package/dist/components/inputs/File/shared/FileUploadContentError.d.ts +2 -2
  14. package/dist/components/inputs/File/shared/FileUploadContentError.js +189 -153
  15. package/dist/components/inputs/File/shared/FileUploadContentFilled.d.ts +2 -2
  16. package/dist/components/inputs/File/shared/FileUploadContentFilled.js +181 -145
  17. package/dist/components/inputs/File/shared/FileUploadContentLoading.d.ts +2 -2
  18. package/dist/components/inputs/File/shared/FileUploadContentLoading.js +209 -168
  19. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +4 -2
  20. package/dist/components/inputs/Selection/Select/QuerySelect.js +42 -38
  21. package/dist/components/inputs/Selection/shared/SelectBase.d.ts +2 -0
  22. package/dist/components/inputs/Selection/shared/SelectBase.js +35 -32
  23. package/dist/components/inputs/Selection/shared/SelectDesktop.js +212 -191
  24. package/dist/components/inputs/Selection/shared/SelectInput.js +193 -154
  25. package/dist/components/inputs/Selection/shared/select.context.d.ts +3 -2
  26. package/dist/components/inputs/Selection/shared/select.context.js +4 -2
  27. package/dist/components/overlays/ResponsivePopover/ResponsivePopover.d.ts +4 -1
  28. package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +91 -64
  29. package/dist/config/uiConfig.context.d.ts +5 -1
  30. package/dist/config/uiConfig.context.js +12 -3
  31. package/package.json +1 -1
@@ -18,7 +18,7 @@ import { useFocusVisible, useFocusWithin, useHover } from "react-aria";
18
18
  import { useTranslation } from "react-i18next";
19
19
  //#region src/components/inputs/Selection/shared/SelectInput.tsx
20
20
  var SelectInput = (t0) => {
21
- const $0 = c(124);
21
+ const $0 = c(136);
22
22
  const { ref, placeholder, variant, as, size, isDisabled, isInvalid, className, hideDropdownIcon, isSearchable, isClearable, showSelectionContent, inputClassName, fieldProps, headerProps, selectedTagsType, collapseAfter, isRequired, isDirty, onCloseComboBox, onBlur, leadingContent, trailingContent, onMouseEnter, onFocusCapture, ...props } = t0;
23
23
  const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
24
24
  const inputBaseCva = UIOverrides.useCva("input.baseCva", inputBaseDefinition);
@@ -42,7 +42,7 @@ var SelectInput = (t0) => {
42
42
  const { focusWithinProps } = useFocusWithin(t2);
43
43
  const { isFocusVisible } = useFocusVisible();
44
44
  const inputRef = useRef(null);
45
- const { fieldState, isOpen, setIsOpen, listItems, selectedItems, onChange, onClear, onRemove, isMultiple, isLoading } = SelectContext.useSelect();
45
+ const { fieldState, isOpen, setIsOpen, selectableListItems, selectedItems, onChange, onClear, onRemove, isMultiple, multiSelectAutoConfirm, isLoading } = SelectContext.useSelect();
46
46
  const isEmpty = selectedItems.length === 0;
47
47
  const showTags = isMultiple && !isEmpty;
48
48
  const showClearButton = !isDisabled && isClearable && (selectedItems.length > 0 || isSearchable && fieldState.inputValue !== "");
@@ -79,91 +79,130 @@ var SelectInput = (t0) => {
79
79
  t3 = t7;
80
80
  }
81
81
  const labelProps = t3;
82
- const t4 = !isMultiple && !isLoading && listItems.length === 1 && !listItems[0].isDisabled;
82
+ let exactMatchItem;
83
+ if (isMultiple && multiSelectAutoConfirm && fieldState.inputValue !== "") {
84
+ let t4;
85
+ if ($0[10] !== fieldState.inputValue || $0[11] !== selectableListItems) {
86
+ let t5;
87
+ if ($0[13] !== fieldState.inputValue) {
88
+ t5 = (item) => item.label.toLowerCase() === fieldState.inputValue.toLowerCase();
89
+ $0[13] = fieldState.inputValue;
90
+ $0[14] = t5;
91
+ } else t5 = $0[14];
92
+ t4 = selectableListItems.find(t5);
93
+ $0[10] = fieldState.inputValue;
94
+ $0[11] = selectableListItems;
95
+ $0[12] = t4;
96
+ } else t4 = $0[12];
97
+ exactMatchItem = t4;
98
+ }
99
+ let singleRemainingItem;
100
+ if (!isLoading && selectableListItems.length === 1 && !selectableListItems[0].isDisabled) singleRemainingItem = selectableListItems[0];
101
+ let autoConfirmItem;
102
+ if ($0[15] !== exactMatchItem || $0[16] !== isMultiple || $0[17] !== multiSelectAutoConfirm || $0[18] !== singleRemainingItem) {
103
+ if (isMultiple) {
104
+ if (multiSelectAutoConfirm) autoConfirmItem = exactMatchItem ?? singleRemainingItem;
105
+ } else autoConfirmItem = singleRemainingItem;
106
+ $0[15] = exactMatchItem;
107
+ $0[16] = isMultiple;
108
+ $0[17] = multiSelectAutoConfirm;
109
+ $0[18] = singleRemainingItem;
110
+ $0[19] = autoConfirmItem;
111
+ } else autoConfirmItem = $0[19];
112
+ const t4 = !isLoading && !!autoConfirmItem;
83
113
  let t5;
84
- if ($0[10] !== listItems || $0[11] !== onChange || $0[12] !== onCloseComboBox || $0[13] !== state) {
114
+ if ($0[20] !== autoConfirmItem || $0[21] !== fieldState.value || $0[22] !== isMultiple || $0[23] !== onChange || $0[24] !== onCloseComboBox || $0[25] !== state) {
85
115
  t5 = () => {
86
- onChange(listItems[0].id);
116
+ if (!autoConfirmItem) return;
117
+ if (isMultiple) {
118
+ if (Array.isArray(fieldState.value)) if (fieldState.value.includes(autoConfirmItem.id)) onChange(fieldState.value.filter((id) => id !== autoConfirmItem.id));
119
+ else onChange(fieldState.value.concat(autoConfirmItem.id));
120
+ else onChange([autoConfirmItem.id]);
121
+ return;
122
+ }
123
+ onChange(autoConfirmItem.id);
87
124
  onCloseComboBox?.(state);
88
125
  };
89
- $0[10] = listItems;
90
- $0[11] = onChange;
91
- $0[12] = onCloseComboBox;
92
- $0[13] = state;
93
- $0[14] = t5;
94
- } else t5 = $0[14];
126
+ $0[20] = autoConfirmItem;
127
+ $0[21] = fieldState.value;
128
+ $0[22] = isMultiple;
129
+ $0[23] = onChange;
130
+ $0[24] = onCloseComboBox;
131
+ $0[25] = state;
132
+ $0[26] = t5;
133
+ } else t5 = $0[26];
95
134
  let t6;
96
- if ($0[15] !== t4 || $0[16] !== t5) {
135
+ if ($0[27] !== t4 || $0[28] !== t5) {
97
136
  t6 = {
98
137
  enabled: t4,
99
138
  preventDefault: true,
100
139
  callback: t5
101
140
  };
102
- $0[15] = t4;
103
- $0[16] = t5;
104
- $0[17] = t6;
105
- } else t6 = $0[17];
141
+ $0[27] = t4;
142
+ $0[28] = t5;
143
+ $0[29] = t6;
144
+ } else t6 = $0[29];
106
145
  const t7 = isMultiple && fieldState.inputValue === "" && Array.isArray(fieldState.value) && fieldState.value.length > 0;
107
146
  let t8;
108
- if ($0[18] !== fieldState.value || $0[19] !== onChange) {
147
+ if ($0[30] !== fieldState.value || $0[31] !== onChange) {
109
148
  t8 = () => {
110
149
  if (!Array.isArray(fieldState.value)) return;
111
150
  onChange(fieldState.value.slice(0, -1));
112
151
  };
113
- $0[18] = fieldState.value;
114
- $0[19] = onChange;
115
- $0[20] = t8;
116
- } else t8 = $0[20];
152
+ $0[30] = fieldState.value;
153
+ $0[31] = onChange;
154
+ $0[32] = t8;
155
+ } else t8 = $0[32];
117
156
  let t9;
118
- if ($0[21] !== t7 || $0[22] !== t8) {
157
+ if ($0[33] !== t7 || $0[34] !== t8) {
119
158
  t9 = {
120
159
  enabled: t7,
121
160
  callback: t8
122
161
  };
123
- $0[21] = t7;
124
- $0[22] = t8;
125
- $0[23] = t9;
126
- } else t9 = $0[23];
162
+ $0[33] = t7;
163
+ $0[34] = t8;
164
+ $0[35] = t9;
165
+ } else t9 = $0[35];
127
166
  let t10;
128
- if ($0[24] !== t6 || $0[25] !== t9) {
167
+ if ($0[36] !== t6 || $0[37] !== t9) {
129
168
  t10 = {
130
169
  enter: t6,
131
170
  backspace: t9
132
171
  };
133
- $0[24] = t6;
134
- $0[25] = t9;
135
- $0[26] = t10;
136
- } else t10 = $0[26];
172
+ $0[36] = t6;
173
+ $0[37] = t9;
174
+ $0[38] = t10;
175
+ } else t10 = $0[38];
137
176
  const { onKeyDown } = useKeyInteractions(t10);
138
177
  let t11;
139
- if ($0[27] === Symbol.for("react.memo_cache_sentinel")) {
178
+ if ($0[39] === Symbol.for("react.memo_cache_sentinel")) {
140
179
  t11 = ["up", "down"];
141
- $0[27] = t11;
142
- } else t11 = $0[27];
180
+ $0[39] = t11;
181
+ } else t11 = $0[39];
143
182
  const t12 = !isSearchable && !isDisabled && !isOpen;
144
183
  let t13;
145
- if ($0[28] !== setIsOpen) {
184
+ if ($0[40] !== setIsOpen) {
146
185
  t13 = () => {
147
186
  setIsOpen(true);
148
187
  };
149
- $0[28] = setIsOpen;
150
- $0[29] = t13;
151
- } else t13 = $0[29];
188
+ $0[40] = setIsOpen;
189
+ $0[41] = t13;
190
+ } else t13 = $0[41];
152
191
  let t14;
153
- if ($0[30] !== t12 || $0[31] !== t13) {
192
+ if ($0[42] !== t12 || $0[43] !== t13) {
154
193
  t14 = { interactions: [{
155
194
  actions: t11,
156
195
  enabled: t12,
157
196
  preventDefault: true,
158
197
  callback: t13
159
198
  }] };
160
- $0[30] = t12;
161
- $0[31] = t13;
162
- $0[32] = t14;
163
- } else t14 = $0[32];
199
+ $0[42] = t12;
200
+ $0[43] = t13;
201
+ $0[44] = t14;
202
+ } else t14 = $0[44];
164
203
  const { onKeyDown: onTriggerKeyDown } = useKeyInteractions(t14);
165
204
  let t15;
166
- if ($0[33] !== isDisabled || $0[34] !== isOpen || $0[35] !== isSearchable || $0[36] !== setIsOpen) {
205
+ if ($0[45] !== isDisabled || $0[46] !== isOpen || $0[47] !== isSearchable || $0[48] !== setIsOpen) {
167
206
  t15 = () => {
168
207
  if (isDisabled) return;
169
208
  if (!isSearchable) {
@@ -172,12 +211,12 @@ var SelectInput = (t0) => {
172
211
  }
173
212
  inputRef.current?.focus();
174
213
  };
175
- $0[33] = isDisabled;
176
- $0[34] = isOpen;
177
- $0[35] = isSearchable;
178
- $0[36] = setIsOpen;
179
- $0[37] = t15;
180
- } else t15 = $0[37];
214
+ $0[45] = isDisabled;
215
+ $0[46] = isOpen;
216
+ $0[47] = isSearchable;
217
+ $0[48] = setIsOpen;
218
+ $0[49] = t15;
219
+ } else t15 = $0[49];
181
220
  const onClick = t15;
182
221
  const t16 = inputBaseCva({
183
222
  variant,
@@ -207,28 +246,28 @@ var SelectInput = (t0) => {
207
246
  ...props
208
247
  }));
209
248
  let t34;
210
- if ($0[38] !== as || $0[39] !== headerProps || $0[40] !== labelProps) {
249
+ if ($0[50] !== as || $0[51] !== headerProps || $0[52] !== labelProps) {
211
250
  t34 = as && ["filter", "floating"].includes(as) && headerProps && /* @__PURE__ */ jsx(FormFieldLabel, {
212
251
  as,
213
252
  ...headerProps,
214
253
  labelProps
215
254
  });
216
- $0[38] = as;
217
- $0[39] = headerProps;
218
- $0[40] = labelProps;
219
- $0[41] = t34;
220
- } else t34 = $0[41];
255
+ $0[50] = as;
256
+ $0[51] = headerProps;
257
+ $0[52] = labelProps;
258
+ $0[53] = t34;
259
+ } else t34 = $0[53];
221
260
  let t35;
222
- if ($0[42] !== leadingContent) {
261
+ if ($0[54] !== leadingContent) {
223
262
  t35 = leadingContent && /* @__PURE__ */ jsx("div", {
224
263
  className: "ml-input-side-default flex shrink-0 items-center",
225
264
  children: leadingContent
226
265
  });
227
- $0[42] = leadingContent;
228
- $0[43] = t35;
229
- } else t35 = $0[43];
266
+ $0[54] = leadingContent;
267
+ $0[55] = t35;
268
+ } else t35 = $0[55];
230
269
  let t36;
231
- if ($0[44] !== as || $0[45] !== collapseAfter || $0[46] !== fieldProps || $0[47] !== inputClassName || $0[48] !== isDisabled || $0[49] !== isSearchable || $0[50] !== onBlur || $0[51] !== onKeyDown || $0[52] !== onRemove || $0[53] !== placeholder || $0[54] !== selectInputTagsContentWrapperCva || $0[55] !== selectedItems || $0[56] !== selectedTagsType || $0[57] !== showTags) {
270
+ if ($0[56] !== as || $0[57] !== collapseAfter || $0[58] !== fieldProps || $0[59] !== inputClassName || $0[60] !== isDisabled || $0[61] !== isSearchable || $0[62] !== onBlur || $0[63] !== onKeyDown || $0[64] !== onRemove || $0[65] !== placeholder || $0[66] !== selectInputTagsContentWrapperCva || $0[67] !== selectedItems || $0[68] !== selectedTagsType || $0[69] !== showTags) {
232
271
  t36 = (showTags || isSearchable) && /* @__PURE__ */ jsxs("div", {
233
272
  className: selectInputTagsContentWrapperCva({ isSearchable }),
234
273
  children: [showTags && /* @__PURE__ */ jsx(SelectInputTags, {
@@ -246,24 +285,24 @@ var SelectInput = (t0) => {
246
285
  ...fieldProps
247
286
  })]
248
287
  });
249
- $0[44] = as;
250
- $0[45] = collapseAfter;
251
- $0[46] = fieldProps;
252
- $0[47] = inputClassName;
253
- $0[48] = isDisabled;
254
- $0[49] = isSearchable;
255
- $0[50] = onBlur;
256
- $0[51] = onKeyDown;
257
- $0[52] = onRemove;
258
- $0[53] = placeholder;
259
- $0[54] = selectInputTagsContentWrapperCva;
260
- $0[55] = selectedItems;
261
- $0[56] = selectedTagsType;
262
- $0[57] = showTags;
263
- $0[58] = t36;
264
- } else t36 = $0[58];
288
+ $0[56] = as;
289
+ $0[57] = collapseAfter;
290
+ $0[58] = fieldProps;
291
+ $0[59] = inputClassName;
292
+ $0[60] = isDisabled;
293
+ $0[61] = isSearchable;
294
+ $0[62] = onBlur;
295
+ $0[63] = onKeyDown;
296
+ $0[64] = onRemove;
297
+ $0[65] = placeholder;
298
+ $0[66] = selectInputTagsContentWrapperCva;
299
+ $0[67] = selectedItems;
300
+ $0[68] = selectedTagsType;
301
+ $0[69] = showTags;
302
+ $0[70] = t36;
303
+ } else t36 = $0[70];
265
304
  let t37;
266
- if ($0[59] !== as || $0[60] !== fieldProps || $0[61] !== isDisabled || $0[62] !== isEmpty || $0[63] !== isMultiple || $0[64] !== isOpen || $0[65] !== isSearchable || $0[66] !== onBlur || $0[67] !== onTriggerKeyDown || $0[68] !== placeholder || $0[69] !== selectedItems[0] || $0[70] !== setIsOpen || $0[71] !== showSelectionContent || $0[72] !== showTags) {
305
+ if ($0[71] !== as || $0[72] !== fieldProps || $0[73] !== isDisabled || $0[74] !== isEmpty || $0[75] !== isMultiple || $0[76] !== isOpen || $0[77] !== isSearchable || $0[78] !== onBlur || $0[79] !== onTriggerKeyDown || $0[80] !== placeholder || $0[81] !== selectedItems[0] || $0[82] !== setIsOpen || $0[83] !== showSelectionContent || $0[84] !== showTags) {
267
306
  t37 = !isSearchable && /* @__PURE__ */ jsxs(Button, {
268
307
  isDisabled,
269
308
  onPress: () => setIsOpen(!isOpen),
@@ -278,24 +317,24 @@ var SelectInput = (t0) => {
278
317
  children: [isEmpty && placeholder, !isEmpty && (showSelectionContent ? selectedItems[0].content : selectedItems[0].label)]
279
318
  })]
280
319
  });
281
- $0[59] = as;
282
- $0[60] = fieldProps;
283
- $0[61] = isDisabled;
284
- $0[62] = isEmpty;
285
- $0[63] = isMultiple;
286
- $0[64] = isOpen;
287
- $0[65] = isSearchable;
288
- $0[66] = onBlur;
289
- $0[67] = onTriggerKeyDown;
290
- $0[68] = placeholder;
291
- $0[69] = selectedItems[0];
292
- $0[70] = setIsOpen;
293
- $0[71] = showSelectionContent;
294
- $0[72] = showTags;
295
- $0[73] = t37;
296
- } else t37 = $0[73];
320
+ $0[71] = as;
321
+ $0[72] = fieldProps;
322
+ $0[73] = isDisabled;
323
+ $0[74] = isEmpty;
324
+ $0[75] = isMultiple;
325
+ $0[76] = isOpen;
326
+ $0[77] = isSearchable;
327
+ $0[78] = onBlur;
328
+ $0[79] = onTriggerKeyDown;
329
+ $0[80] = placeholder;
330
+ $0[81] = selectedItems[0];
331
+ $0[82] = setIsOpen;
332
+ $0[83] = showSelectionContent;
333
+ $0[84] = showTags;
334
+ $0[85] = t37;
335
+ } else t37 = $0[85];
297
336
  let t38;
298
- if ($0[74] !== onClick || $0[75] !== t33 || $0[76] !== t34 || $0[77] !== t35 || $0[78] !== t36 || $0[79] !== t37) {
337
+ if ($0[86] !== onClick || $0[87] !== t33 || $0[88] !== t34 || $0[89] !== t35 || $0[90] !== t36 || $0[91] !== t37) {
299
338
  t38 = /* @__PURE__ */ jsxs("div", {
300
339
  className: t33,
301
340
  onClick,
@@ -306,16 +345,16 @@ var SelectInput = (t0) => {
306
345
  t37
307
346
  ]
308
347
  });
309
- $0[74] = onClick;
310
- $0[75] = t33;
311
- $0[76] = t34;
312
- $0[77] = t35;
313
- $0[78] = t36;
314
- $0[79] = t37;
315
- $0[80] = t38;
316
- } else t38 = $0[80];
348
+ $0[86] = onClick;
349
+ $0[87] = t33;
350
+ $0[88] = t34;
351
+ $0[89] = t35;
352
+ $0[90] = t36;
353
+ $0[91] = t37;
354
+ $0[92] = t38;
355
+ } else t38 = $0[92];
317
356
  let t39;
318
- if ($0[81] !== as || $0[82] !== inputClearClassCva || $0[83] !== isClearable || $0[84] !== isDisabled || $0[85] !== onClear || $0[86] !== showClearButton) {
357
+ if ($0[93] !== as || $0[94] !== inputClearClassCva || $0[95] !== isClearable || $0[96] !== isDisabled || $0[97] !== onClear || $0[98] !== showClearButton) {
319
358
  t39 = isClearable && !isDisabled && /* @__PURE__ */ jsx(InputClear, {
320
359
  onClear: () => {
321
360
  onClear();
@@ -323,25 +362,25 @@ var SelectInput = (t0) => {
323
362
  className: inputClearClassCva({ as }),
324
363
  show: showClearButton
325
364
  });
326
- $0[81] = as;
327
- $0[82] = inputClearClassCva;
328
- $0[83] = isClearable;
329
- $0[84] = isDisabled;
330
- $0[85] = onClear;
331
- $0[86] = showClearButton;
332
- $0[87] = t39;
333
- } else t39 = $0[87];
365
+ $0[93] = as;
366
+ $0[94] = inputClearClassCva;
367
+ $0[95] = isClearable;
368
+ $0[96] = isDisabled;
369
+ $0[97] = onClear;
370
+ $0[98] = showClearButton;
371
+ $0[99] = t39;
372
+ } else t39 = $0[99];
334
373
  let t40;
335
- if ($0[88] !== trailingContent) {
374
+ if ($0[100] !== trailingContent) {
336
375
  t40 = trailingContent && /* @__PURE__ */ jsx("div", {
337
376
  className: "flex shrink-0 items-center",
338
377
  children: trailingContent
339
378
  });
340
- $0[88] = trailingContent;
341
- $0[89] = t40;
342
- } else t40 = $0[89];
379
+ $0[100] = trailingContent;
380
+ $0[101] = t40;
381
+ } else t40 = $0[101];
343
382
  let t41;
344
- if ($0[90] !== hideDropdownIcon || $0[91] !== inputSizeCva || $0[92] !== isDisabled || $0[93] !== isOpen || $0[94] !== isSearchable || $0[95] !== setIsOpen || $0[96] !== size || $0[97] !== t) {
383
+ if ($0[102] !== hideDropdownIcon || $0[103] !== inputSizeCva || $0[104] !== isDisabled || $0[105] !== isOpen || $0[106] !== isSearchable || $0[107] !== setIsOpen || $0[108] !== size || $0[109] !== t) {
345
384
  t41 = !hideDropdownIcon && /* @__PURE__ */ jsx(Button, {
346
385
  excludeFromTabOrder: true,
347
386
  "aria-label": t(($) => isOpen ? $.ui.closeAlt : $.ui.openAlt),
@@ -355,18 +394,18 @@ var SelectInput = (t0) => {
355
394
  "aria-hidden": "true"
356
395
  })
357
396
  });
358
- $0[90] = hideDropdownIcon;
359
- $0[91] = inputSizeCva;
360
- $0[92] = isDisabled;
361
- $0[93] = isOpen;
362
- $0[94] = isSearchable;
363
- $0[95] = setIsOpen;
364
- $0[96] = size;
365
- $0[97] = t;
366
- $0[98] = t41;
367
- } else t41 = $0[98];
397
+ $0[102] = hideDropdownIcon;
398
+ $0[103] = inputSizeCva;
399
+ $0[104] = isDisabled;
400
+ $0[105] = isOpen;
401
+ $0[106] = isSearchable;
402
+ $0[107] = setIsOpen;
403
+ $0[108] = size;
404
+ $0[109] = t;
405
+ $0[110] = t41;
406
+ } else t41 = $0[110];
368
407
  let t42;
369
- if ($0[99] !== focusWithinProps || $0[100] !== hoverProps || $0[101] !== onFocusCapture || $0[102] !== onMouseEnter || $0[103] !== ref || $0[104] !== t16 || $0[105] !== t18 || $0[106] !== t19 || $0[107] !== t20 || $0[108] !== t21 || $0[109] !== t22 || $0[110] !== t23 || $0[111] !== t24 || $0[112] !== t25 || $0[113] !== t26 || $0[114] !== t27 || $0[115] !== t28 || $0[116] !== t29 || $0[117] !== t30 || $0[118] !== t31 || $0[119] !== t38 || $0[120] !== t39 || $0[121] !== t40 || $0[122] !== t41) {
408
+ if ($0[111] !== focusWithinProps || $0[112] !== hoverProps || $0[113] !== onFocusCapture || $0[114] !== onMouseEnter || $0[115] !== ref || $0[116] !== t16 || $0[117] !== t18 || $0[118] !== t19 || $0[119] !== t20 || $0[120] !== t21 || $0[121] !== t22 || $0[122] !== t23 || $0[123] !== t24 || $0[124] !== t25 || $0[125] !== t26 || $0[126] !== t27 || $0[127] !== t28 || $0[128] !== t29 || $0[129] !== t30 || $0[130] !== t31 || $0[131] !== t38 || $0[132] !== t39 || $0[133] !== t40 || $0[134] !== t41) {
370
409
  t42 = /* @__PURE__ */ jsxs("div", {
371
410
  ref,
372
411
  className: t16,
@@ -397,32 +436,32 @@ var SelectInput = (t0) => {
397
436
  t41
398
437
  ]
399
438
  });
400
- $0[99] = focusWithinProps;
401
- $0[100] = hoverProps;
402
- $0[101] = onFocusCapture;
403
- $0[102] = onMouseEnter;
404
- $0[103] = ref;
405
- $0[104] = t16;
406
- $0[105] = t18;
407
- $0[106] = t19;
408
- $0[107] = t20;
409
- $0[108] = t21;
410
- $0[109] = t22;
411
- $0[110] = t23;
412
- $0[111] = t24;
413
- $0[112] = t25;
414
- $0[113] = t26;
415
- $0[114] = t27;
416
- $0[115] = t28;
417
- $0[116] = t29;
418
- $0[117] = t30;
419
- $0[118] = t31;
420
- $0[119] = t38;
421
- $0[120] = t39;
422
- $0[121] = t40;
423
- $0[122] = t41;
424
- $0[123] = t42;
425
- } else t42 = $0[123];
439
+ $0[111] = focusWithinProps;
440
+ $0[112] = hoverProps;
441
+ $0[113] = onFocusCapture;
442
+ $0[114] = onMouseEnter;
443
+ $0[115] = ref;
444
+ $0[116] = t16;
445
+ $0[117] = t18;
446
+ $0[118] = t19;
447
+ $0[119] = t20;
448
+ $0[120] = t21;
449
+ $0[121] = t22;
450
+ $0[122] = t23;
451
+ $0[123] = t24;
452
+ $0[124] = t25;
453
+ $0[125] = t26;
454
+ $0[126] = t27;
455
+ $0[127] = t28;
456
+ $0[128] = t29;
457
+ $0[129] = t30;
458
+ $0[130] = t31;
459
+ $0[131] = t38;
460
+ $0[132] = t39;
461
+ $0[133] = t40;
462
+ $0[134] = t41;
463
+ $0[135] = t42;
464
+ } else t42 = $0[135];
426
465
  return t42;
427
466
  };
428
467
  //#endregion
@@ -23,9 +23,10 @@ export declare namespace SelectContext {
23
23
  selectedItems: SelectItem[];
24
24
  selectedIds: Key[];
25
25
  isMultiple: boolean;
26
+ multiSelectAutoConfirm: boolean;
26
27
  } & Pick<SelectBaseProps, "onInputChange" | "isLoading" | "hasLoadMore">;
27
- export type ProviderProps = GroupedSelectProps & Pick<SelectBaseProps, "items" | "onInputChange" | "onSearchChange" | "showSelectAllOption" | "showNewItemOption" | "newItemMinLength" | "onNewItemOption" | "isLoading" | "hasLoadMore" | "mapInitialToSelectItem" | "isSearchable" | "isClientSearchDisabled" | "ignoreInputValueFiltering" | "fireBlurOnChange" | "onBlur">;
28
- export const Provider: ({ items, onInputChange, onSearchChange, showSelectAllOption, showNewItemOption, newItemMinLength, onNewItemOption, isLoading, hasLoadMore, isClientSearchDisabled, ignoreInputValueFiltering, fireBlurOnChange, onBlur: fieldOnBlur, children, mapInitialToSelectItem, ...props }: PropsWithChildren<ProviderProps>) => import("react/jsx-runtime").JSX.Element;
28
+ export type ProviderProps = GroupedSelectProps & Pick<SelectBaseProps, "items" | "onInputChange" | "onSearchChange" | "showSelectAllOption" | "showNewItemOption" | "newItemMinLength" | "onNewItemOption" | "isLoading" | "hasLoadMore" | "mapInitialToSelectItem" | "isSearchable" | "isClientSearchDisabled" | "ignoreInputValueFiltering" | "fireBlurOnChange" | "searchDebounceDelay" | "multiSelectAutoConfirm" | "onBlur">;
29
+ export const Provider: ({ items, onInputChange, onSearchChange, showSelectAllOption, showNewItemOption, newItemMinLength, onNewItemOption, isLoading, hasLoadMore, isClientSearchDisabled, ignoreInputValueFiltering, fireBlurOnChange, searchDebounceDelay, multiSelectAutoConfirm, onBlur: fieldOnBlur, children, mapInitialToSelectItem, ...props }: PropsWithChildren<ProviderProps>) => import("react/jsx-runtime").JSX.Element;
29
30
  export const useSelect: () => Type;
30
31
  export {};
31
32
  }
@@ -10,7 +10,7 @@ var SelectContext;
10
10
  id: item.id,
11
11
  label: item.label ?? item.name ?? ""
12
12
  });
13
- _SelectContext.Provider = ({ items, onInputChange, onSearchChange, showSelectAllOption, showNewItemOption, newItemMinLength, onNewItemOption, isLoading, hasLoadMore, isClientSearchDisabled, ignoreInputValueFiltering, fireBlurOnChange, onBlur: fieldOnBlur, children, mapInitialToSelectItem = defaultMapInitialToSelectItem, ...props }) => {
13
+ _SelectContext.Provider = ({ items, onInputChange, onSearchChange, showSelectAllOption, showNewItemOption, newItemMinLength, onNewItemOption, isLoading, hasLoadMore, isClientSearchDisabled, ignoreInputValueFiltering, fireBlurOnChange, searchDebounceDelay, multiSelectAutoConfirm = false, onBlur: fieldOnBlur, children, mapInitialToSelectItem = defaultMapInitialToSelectItem, ...props }) => {
14
14
  const isMultiple = props.selectionMode === "multiple";
15
15
  const initialSelectedItems = useMemo(() => {
16
16
  if (!props.initialSelection) return null;
@@ -23,7 +23,7 @@ var SelectContext;
23
23
  inputValue: "",
24
24
  searchValue: ""
25
25
  });
26
- const { callback: onSearchChangeDebounced, isDebouncing } = useDebounceCallback(onSearchChange);
26
+ const { callback: onSearchChangeDebounced, isDebouncing } = useDebounceCallback(onSearchChange, { delay: searchDebounceDelay });
27
27
  const [showAll, setShowAll] = useState(false);
28
28
  const [cachedItems, setCachedItems] = useState(items);
29
29
  const valueRef = useRef(initialSelectedItems);
@@ -189,6 +189,7 @@ var SelectContext;
189
189
  selectedItems,
190
190
  selectedIds,
191
191
  isMultiple,
192
+ multiSelectAutoConfirm,
192
193
  isLoading,
193
194
  hasLoadMore
194
195
  }), [
@@ -207,6 +208,7 @@ var SelectContext;
207
208
  selectedIds,
208
209
  selectedItems,
209
210
  isMultiple,
211
+ multiSelectAutoConfirm,
210
212
  isLoading,
211
213
  hasLoadMore
212
214
  ]);
@@ -1,6 +1,8 @@
1
1
  import { ReactElement, ReactNode } from 'react';
2
+ import { PopoverProps } from 'react-aria-components';
2
3
  import { BottomSheetProps } from '../BottomSheet/BottomSheet';
3
4
  type ResponsivePopoverBottomSheetProps = Partial<Omit<BottomSheetProps, "children" | "isOpen" | "onOpenChange" | "trigger">>;
5
+ type ResponsivePopoverPopoverProps = Partial<Omit<PopoverProps, "children" | "className">>;
4
6
  export interface ResponsivePopoverProps {
5
7
  trigger: ReactElement;
6
8
  children: ReactNode;
@@ -9,6 +11,7 @@ export interface ResponsivePopoverProps {
9
11
  popoverClassName?: string;
10
12
  sheetLabel: string;
11
13
  bottomSheetProps?: ResponsivePopoverBottomSheetProps;
14
+ popoverProps?: ResponsivePopoverPopoverProps;
12
15
  }
13
- export declare const ResponsivePopover: ({ trigger, isOpen, onOpenChange, children, popoverClassName, sheetLabel, bottomSheetProps, }: ResponsivePopoverProps) => import("react/jsx-runtime").JSX.Element;
16
+ export declare const ResponsivePopover: ({ trigger, isOpen, onOpenChange, children, popoverClassName, sheetLabel, bottomSheetProps, popoverProps, }: ResponsivePopoverProps) => import("react/jsx-runtime").JSX.Element;
14
17
  export {};