@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.
- package/dist/components/inputs/File/fileUpload.types.d.ts +2 -4
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +80 -85
- package/dist/components/inputs/File/shared/FileUploadContentError.js +97 -102
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +93 -98
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +109 -114
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +91 -111
- package/package.json +1 -1
|
@@ -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(
|
|
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 ($[
|
|
269
|
-
|
|
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
|
-
$[
|
|
298
|
-
$[
|
|
299
|
-
$[
|
|
300
|
-
$[
|
|
301
|
-
} else
|
|
302
|
-
let
|
|
303
|
-
if ($[
|
|
304
|
-
|
|
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
|
-
$[
|
|
339
|
-
$[
|
|
340
|
-
$[
|
|
341
|
-
$[
|
|
342
|
-
$[
|
|
343
|
-
$[
|
|
344
|
-
$[
|
|
345
|
-
$[
|
|
346
|
-
$[
|
|
347
|
-
$[
|
|
348
|
-
$[
|
|
349
|
-
$[
|
|
350
|
-
$[
|
|
351
|
-
$[
|
|
352
|
-
$[
|
|
353
|
-
$[
|
|
354
|
-
$[
|
|
355
|
-
$[
|
|
356
|
-
$[
|
|
357
|
-
$[
|
|
358
|
-
$[
|
|
359
|
-
$[
|
|
360
|
-
$[
|
|
361
|
-
$[
|
|
362
|
-
$[
|
|
363
|
-
} else
|
|
364
|
-
let
|
|
365
|
-
if ($[
|
|
366
|
-
|
|
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
|
-
$[
|
|
380
|
-
$[
|
|
381
|
-
$[
|
|
382
|
-
$[
|
|
383
|
-
$[
|
|
384
|
-
$[
|
|
385
|
-
$[
|
|
386
|
-
$[
|
|
387
|
-
$[
|
|
388
|
-
$[
|
|
389
|
-
} else
|
|
390
|
-
let
|
|
391
|
-
if ($[
|
|
392
|
-
|
|
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
|
-
...
|
|
374
|
+
...t20,
|
|
395
375
|
as,
|
|
396
376
|
onMouseEnter,
|
|
397
377
|
onFocusCapture,
|
|
398
378
|
ref: wrapperRef,
|
|
399
|
-
children: [
|
|
379
|
+
children: [t21, t22]
|
|
400
380
|
});
|
|
401
|
-
$[
|
|
402
|
-
$[
|
|
403
|
-
$[
|
|
404
|
-
$[
|
|
405
|
-
$[
|
|
406
|
-
$[
|
|
407
|
-
$[
|
|
408
|
-
$[
|
|
409
|
-
} else
|
|
410
|
-
let
|
|
411
|
-
if ($[
|
|
412
|
-
|
|
413
|
-
...
|
|
414
|
-
children:
|
|
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
|
-
$[
|
|
417
|
-
$[
|
|
418
|
-
$[
|
|
419
|
-
$[
|
|
420
|
-
} else
|
|
421
|
-
let
|
|
422
|
-
if ($[
|
|
423
|
-
|
|
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:
|
|
406
|
+
children: t24
|
|
427
407
|
});
|
|
428
|
-
$[
|
|
429
|
-
$[
|
|
430
|
-
$[
|
|
431
|
-
$[
|
|
432
|
-
} else
|
|
433
|
-
return
|
|
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;
|