@povio/ui 3.2.3-rc.1 → 3.2.3

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.
@@ -16,7 +16,7 @@ import { useLabel, usePreventScroll } from "react-aria";
16
16
  import { mergeRefs } from "@react-aria/utils";
17
17
  //#region src/components/inputs/Selection/shared/SelectDesktop.tsx
18
18
  var SelectDesktop = (t0) => {
19
- const $ = c(132);
19
+ const $ = c(129);
20
20
  let containerClassName;
21
21
  let customTrigger;
22
22
  let error;
@@ -105,7 +105,6 @@ var SelectDesktop = (t0) => {
105
105
  const closeComboBoxRef = useRef(null);
106
106
  const wrapperRef = useRef(null);
107
107
  const [popoverWidth, setPopoverWidth] = useState(void 0);
108
- const [shouldBlurAfterSingleSelection, setShouldBlurAfterSingleSelection] = useState(false);
109
108
  const { fieldState, isOpen, setIsOpen, onInputChange, onChange, onClear, onSelectAll, listItems, selectableListItems, selectedIds, isMultiple } = SelectContext.useSelect();
110
109
  const t4 = !isOpen;
111
110
  let t5;
@@ -149,7 +148,6 @@ var SelectDesktop = (t0) => {
149
148
  }
150
149
  if (!isMultiple) {
151
150
  onChange(value);
152
- setShouldBlurAfterSingleSelection(true);
153
151
  return;
154
152
  }
155
153
  if (!Array.isArray(fieldState.value)) {
@@ -264,44 +262,26 @@ var SelectDesktop = (t0) => {
264
262
  } else t18 = $[70];
265
263
  const showPopover = t18;
266
264
  let t19;
265
+ if ($[71] !== comboBoxProps || $[72] !== isSearchable) {
266
+ t19 = isSearchable ? comboBoxProps : {};
267
+ $[71] = comboBoxProps;
268
+ $[72] = isSearchable;
269
+ $[73] = t19;
270
+ } else t19 = $[73];
267
271
  let t20;
268
- if ($[71] !== shouldBlurAfterSingleSelection) {
269
- t19 = () => {
270
- if (!shouldBlurAfterSingleSelection) return;
271
- setShouldBlurAfterSingleSelection(false);
272
- const activeElement = document.activeElement;
273
- if (activeElement instanceof HTMLElement && triggerRef.current?.contains(activeElement)) activeElement.blur();
274
- };
275
- t20 = [shouldBlurAfterSingleSelection];
276
- $[71] = shouldBlurAfterSingleSelection;
277
- $[72] = t19;
278
- $[73] = t20;
279
- } else {
280
- t19 = $[72];
281
- t20 = $[73];
282
- }
283
- useLayoutEffect(t19, t20);
284
- let t21;
285
- if ($[74] !== comboBoxProps || $[75] !== isSearchable) {
286
- t21 = isSearchable ? comboBoxProps : {};
287
- $[74] = comboBoxProps;
288
- $[75] = isSearchable;
289
- $[76] = t21;
290
- } else t21 = $[76];
291
- let t22;
292
- if ($[77] !== containerClassName || $[78] !== isSearchable || $[79] !== labelProps) {
293
- t22 = !isSearchable && {
272
+ if ($[74] !== containerClassName || $[75] !== isSearchable || $[76] !== labelProps) {
273
+ t20 = !isSearchable && {
294
274
  labelProps,
295
275
  className: clsx("group w-full", containerClassName)
296
276
  };
297
- $[77] = containerClassName;
298
- $[78] = isSearchable;
299
- $[79] = labelProps;
300
- $[80] = t22;
301
- } else t22 = $[80];
302
- let t23;
303
- if ($[81] !== as || $[82] !== className || $[83] !== collapseAfter || $[84] !== customTrigger || $[85] !== dialogTriggerProps || $[86] !== error || $[87] !== fieldProps || $[88] !== headerProps || $[89] !== hideDropdownIcon || $[90] !== inputClassName || $[91] !== isClearable || $[92] !== isDirty || $[93] !== isDisabled || $[94] !== isRequired || $[95] !== isSearchable || $[96] !== leadingContent || $[97] !== onBlur || $[98] !== placeholder || $[99] !== ref || $[100] !== selectedTagsType || $[101] !== showSelectionContent || $[102] !== size || $[103] !== trailingContent || $[104] !== variant) {
304
- t23 = customTrigger ? /* @__PURE__ */ jsx(DialogTrigger, {
277
+ $[74] = containerClassName;
278
+ $[75] = isSearchable;
279
+ $[76] = labelProps;
280
+ $[77] = t20;
281
+ } else t20 = $[77];
282
+ let t21;
283
+ if ($[78] !== as || $[79] !== className || $[80] !== collapseAfter || $[81] !== customTrigger || $[82] !== dialogTriggerProps || $[83] !== error || $[84] !== fieldProps || $[85] !== headerProps || $[86] !== hideDropdownIcon || $[87] !== inputClassName || $[88] !== isClearable || $[89] !== isDirty || $[90] !== isDisabled || $[91] !== isRequired || $[92] !== isSearchable || $[93] !== leadingContent || $[94] !== onBlur || $[95] !== placeholder || $[96] !== ref || $[97] !== selectedTagsType || $[98] !== showSelectionContent || $[99] !== size || $[100] !== trailingContent || $[101] !== variant) {
284
+ t21 = customTrigger ? /* @__PURE__ */ jsx(DialogTrigger, {
305
285
  ...dialogTriggerProps,
306
286
  children: /* @__PURE__ */ jsx("div", {
307
287
  ...fieldProps,
@@ -335,35 +315,35 @@ var SelectDesktop = (t0) => {
335
315
  fieldProps,
336
316
  headerProps
337
317
  });
338
- $[81] = as;
339
- $[82] = className;
340
- $[83] = collapseAfter;
341
- $[84] = customTrigger;
342
- $[85] = dialogTriggerProps;
343
- $[86] = error;
344
- $[87] = fieldProps;
345
- $[88] = headerProps;
346
- $[89] = hideDropdownIcon;
347
- $[90] = inputClassName;
348
- $[91] = isClearable;
349
- $[92] = isDirty;
350
- $[93] = isDisabled;
351
- $[94] = isRequired;
352
- $[95] = isSearchable;
353
- $[96] = leadingContent;
354
- $[97] = onBlur;
355
- $[98] = placeholder;
356
- $[99] = ref;
357
- $[100] = selectedTagsType;
358
- $[101] = showSelectionContent;
359
- $[102] = size;
360
- $[103] = trailingContent;
361
- $[104] = variant;
362
- $[105] = t23;
363
- } else t23 = $[105];
364
- let t24;
365
- if ($[106] !== ignoreTriggerWidth || $[107] !== isOpen || $[108] !== isSearchable || $[109] !== popoverCva || $[110] !== popoverWidth || $[111] !== props || $[112] !== selectPopoverCva || $[113] !== setIsOpen || $[114] !== showPopover) {
366
- t24 = (!isSearchable || showPopover) && /* @__PURE__ */ jsx(Popover, {
318
+ $[78] = as;
319
+ $[79] = className;
320
+ $[80] = collapseAfter;
321
+ $[81] = customTrigger;
322
+ $[82] = dialogTriggerProps;
323
+ $[83] = error;
324
+ $[84] = fieldProps;
325
+ $[85] = headerProps;
326
+ $[86] = hideDropdownIcon;
327
+ $[87] = inputClassName;
328
+ $[88] = isClearable;
329
+ $[89] = isDirty;
330
+ $[90] = isDisabled;
331
+ $[91] = isRequired;
332
+ $[92] = isSearchable;
333
+ $[93] = leadingContent;
334
+ $[94] = onBlur;
335
+ $[95] = placeholder;
336
+ $[96] = ref;
337
+ $[97] = selectedTagsType;
338
+ $[98] = showSelectionContent;
339
+ $[99] = size;
340
+ $[100] = trailingContent;
341
+ $[101] = variant;
342
+ $[102] = t21;
343
+ } else t21 = $[102];
344
+ let t22;
345
+ if ($[103] !== ignoreTriggerWidth || $[104] !== isOpen || $[105] !== isSearchable || $[106] !== popoverCva || $[107] !== popoverWidth || $[108] !== props || $[109] !== selectPopoverCva || $[110] !== setIsOpen || $[111] !== showPopover) {
346
+ t22 = (!isSearchable || showPopover) && /* @__PURE__ */ jsx(Popover, {
367
347
  triggerRef,
368
348
  isOpen,
369
349
  onOpenChange: setIsOpen,
@@ -376,61 +356,61 @@ var SelectDesktop = (t0) => {
376
356
  autoFocus: !isSearchable
377
357
  })
378
358
  });
379
- $[106] = ignoreTriggerWidth;
380
- $[107] = isOpen;
381
- $[108] = isSearchable;
382
- $[109] = popoverCva;
383
- $[110] = popoverWidth;
384
- $[111] = props;
385
- $[112] = selectPopoverCva;
386
- $[113] = setIsOpen;
387
- $[114] = showPopover;
388
- $[115] = t24;
389
- } else t24 = $[115];
390
- let t25;
391
- if ($[116] !== as || $[117] !== formFieldProps || $[118] !== onFocusCapture || $[119] !== onMouseEnter || $[120] !== t22 || $[121] !== t23 || $[122] !== t24) {
392
- t25 = /* @__PURE__ */ jsxs(FormField, {
359
+ $[103] = ignoreTriggerWidth;
360
+ $[104] = isOpen;
361
+ $[105] = isSearchable;
362
+ $[106] = popoverCva;
363
+ $[107] = popoverWidth;
364
+ $[108] = props;
365
+ $[109] = selectPopoverCva;
366
+ $[110] = setIsOpen;
367
+ $[111] = showPopover;
368
+ $[112] = t22;
369
+ } else t22 = $[112];
370
+ let t23;
371
+ if ($[113] !== as || $[114] !== formFieldProps || $[115] !== onFocusCapture || $[116] !== onMouseEnter || $[117] !== t20 || $[118] !== t21 || $[119] !== t22) {
372
+ t23 = /* @__PURE__ */ jsxs(FormField, {
393
373
  ...formFieldProps,
394
- ...t22,
374
+ ...t20,
395
375
  as,
396
376
  onMouseEnter,
397
377
  onFocusCapture,
398
378
  ref: wrapperRef,
399
- children: [t23, t24]
379
+ children: [t21, t22]
400
380
  });
401
- $[116] = as;
402
- $[117] = formFieldProps;
403
- $[118] = onFocusCapture;
404
- $[119] = onMouseEnter;
405
- $[120] = t22;
406
- $[121] = t23;
407
- $[122] = t24;
408
- $[123] = t25;
409
- } else t25 = $[123];
410
- let t26;
411
- if ($[124] !== WrapperComponent || $[125] !== t21 || $[126] !== t25) {
412
- t26 = /* @__PURE__ */ jsx(WrapperComponent, {
413
- ...t21,
414
- children: t25
381
+ $[113] = as;
382
+ $[114] = formFieldProps;
383
+ $[115] = onFocusCapture;
384
+ $[116] = onMouseEnter;
385
+ $[117] = t20;
386
+ $[118] = t21;
387
+ $[119] = t22;
388
+ $[120] = t23;
389
+ } else t23 = $[120];
390
+ let t24;
391
+ if ($[121] !== WrapperComponent || $[122] !== t19 || $[123] !== t23) {
392
+ t24 = /* @__PURE__ */ jsx(WrapperComponent, {
393
+ ...t19,
394
+ children: t23
415
395
  });
416
- $[124] = WrapperComponent;
417
- $[125] = t21;
418
- $[126] = t25;
419
- $[127] = t26;
420
- } else t26 = $[127];
421
- let t27;
422
- if ($[128] !== as || $[129] !== error || $[130] !== t26) {
423
- t27 = /* @__PURE__ */ jsx(TooltipWrapper, {
396
+ $[121] = WrapperComponent;
397
+ $[122] = t19;
398
+ $[123] = t23;
399
+ $[124] = t24;
400
+ } else t24 = $[124];
401
+ let t25;
402
+ if ($[125] !== as || $[126] !== error || $[127] !== t24) {
403
+ t25 = /* @__PURE__ */ jsx(TooltipWrapper, {
424
404
  as,
425
405
  error,
426
- children: t26
406
+ children: t24
427
407
  });
428
- $[128] = as;
429
- $[129] = error;
430
- $[130] = t26;
431
- $[131] = t27;
432
- } else t27 = $[131];
433
- return t27;
408
+ $[125] = as;
409
+ $[126] = error;
410
+ $[127] = t24;
411
+ $[128] = t25;
412
+ } else t25 = $[128];
413
+ return t25;
434
414
  };
435
415
  function _temp(item) {
436
416
  return !item.isSelectAllItem;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@povio/ui",
3
- "version": "3.2.3-rc.1",
3
+ "version": "3.2.3",
4
4
  "type": "module",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",