@povio/ui 5.0.0-rc.3 → 5.0.0-rc.4
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/README.md +6 -2
- package/dist/{Breadcrumbs-CbKzAq1v.js → Breadcrumbs-FF8hMfXd.js} +1 -1
- package/dist/{Calendar-CVSQH-rC.js → Calendar-BTjajO6i.js} +6 -136
- package/dist/{Checkbox-BU0d702K.js → Checkbox-CV1ILXXO.js} +1 -1
- package/dist/{CheckboxCheckmark-usHsolNj.js → CheckboxCheckmark-CpC3wlMs.js} +1 -1
- package/dist/{ComponentGallery-DIFeJqGx.js → ComponentGallery-BWiPGUL8.js} +1343 -206
- package/dist/{DatePicker-D95gDPhg.js → DatePicker-DOLL7mkc.js} +12 -12
- package/dist/{DatePickerInput-CX6NYim4.js → DatePickerInput-BLBcySA2.js} +8 -7
- package/dist/{DateRangePicker-_uTQk_ae.js → DateRangePicker-BF-1CztH.js} +13 -185
- package/dist/{DateTimePicker-BB058Z34.js → DateTimePicker-Cj0qvJUz.js} +12 -12
- package/dist/{FileInput-C0-6bw4w.js → FileInput-Br5DQaGQ.js} +3 -2
- package/dist/{FileTrigger-CDXcQthK.js → FileTrigger-Cthk5_Wp.js} +1 -30
- package/dist/{FileUpload-DDpYMn8f.js → FileUpload--7ub3EZO.js} +3 -2
- package/dist/{FormField-U_-d4V_g.js → FormField-B99dLt8o.js} +1 -1
- package/dist/{FormFieldHeaderTooltip-DXbuu88v.js → FormFieldHeaderTooltip-BV2Ju4oB.js} +1 -1
- package/dist/{InlineTooltipWrapper-Bpmd--e7.js → InlineTooltipWrapper-BpApaGXV.js} +1 -1
- package/dist/{InputItem-D-KuiNSc.js → InputItem-CIxbTxZu.js} +10 -10
- package/dist/{Inputs-j3JmcLWR.js → Inputs-DJSKiaWY.js} +1 -1
- package/dist/NumberFormatter-CLDS_LRZ.js +265 -0
- package/dist/{NumberRangeInput-C-8U05wF.js → NumberRangeInput-B8-LHfg3.js} +6 -5
- package/dist/{RadioGroup-B7_pNwn9.js → RadioGroup-DOw3PRoX.js} +1 -1
- package/dist/{RichTextEditor-D9-B1Cze.js → RichTextEditor-D4yN7Wj7.js} +2 -2
- package/dist/{Select-CkujlTjm.js → Select-UR0ec2Ux.js} +2 -2
- package/dist/{Slider-BHPl0OPy.js → Slider-CzEmKYBF.js} +1 -1
- package/dist/{Table-BDNSuEWc.js → Table-piX1SWvN.js} +1 -1
- package/dist/{TextArea-DqHDiRGJ.js → TextArea-D8WkKsGn.js} +3 -3
- package/dist/{TimePicker-DQ6JCkGB.js → TimePicker-C4taAOFQ.js} +10 -9
- package/dist/{ToggleGroup-DX0VYXwP.js → ToggleGroup-DOk27fgI.js} +5 -66
- package/dist/{Tooltip-B9DKcYvr.js → Tooltip-CpG1nz7Y.js} +2 -2
- package/dist/{TooltipWrapper-DznDgVJB.js → TooltipWrapper-3jyN0Wss.js} +1 -1
- package/dist/components/autocomplete.js +2 -2
- package/dist/components/breadcrumbs.js +1 -1
- package/dist/components/checkbox-group.js +3 -3
- package/dist/components/checkbox.js +1 -1
- package/dist/components/date-picker.js +1 -1
- package/dist/components/date-range-picker.js +1 -1
- package/dist/components/date-time-picker.js +1 -1
- package/dist/components/file-input.js +1 -1
- package/dist/components/file-upload-container.js +1 -1
- package/dist/components/file-upload.js +1 -1
- package/dist/components/form-field.js +1 -1
- package/dist/components/icon-button.js +1 -1
- package/dist/components/input.js +4 -4
- package/dist/components/number-field.js +7 -6
- package/dist/components/number-range-input.js +1 -1
- package/dist/components/pagination.js +32 -28
- package/dist/components/query-autocomplete.js +1 -1
- package/dist/components/query-select.js +2 -2
- package/dist/components/radio-group.js +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/slider.js +1 -1
- package/dist/components/text-area.js +1 -1
- package/dist/components/time-picker.js +1 -1
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/tooltip-ellipsis.js +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/config/ui-configurator-theme.js +1 -1
- package/dist/config/ui-configurator.js +1081 -257
- package/dist/config/ui-router.js +1 -1
- package/dist/{datePickerValue.utils-CUzkWie8.js → datePickerValue.utils-DCgoSrP3.js} +5 -5
- package/dist/hooks/use-filters.js +1 -1
- package/dist/index.js +15 -15
- package/dist/numberStatic.utils-BX50PSee.js +421 -0
- package/dist/rhf/checkbox.js +1 -1
- package/dist/rhf/date-picker.js +1 -1
- package/dist/rhf/date-range-picker.js +1 -1
- package/dist/rhf/date-time-picker.js +1 -1
- package/dist/rhf/file-input.js +1 -1
- package/dist/rhf/file-upload.js +1 -1
- package/dist/rhf/number-range-input.js +1 -1
- package/dist/rhf/radio-group.js +1 -1
- package/dist/rhf/rich-text-editor.js +1 -1
- package/dist/rhf/select.js +1 -1
- package/dist/rhf/slider.js +1 -1
- package/dist/rhf/text-area.js +1 -1
- package/dist/rhf/time-picker.js +1 -1
- package/dist/rhf/toggle-group.js +1 -1
- package/dist/rhf.js +15 -15
- package/dist/rich-text-editor.js +1 -1
- package/dist/{router.context-B0jTMtE0.js → router.context-B4FvsTim.js} +2 -2
- package/dist/staticDateTimeSegments-DtU63_dw.js +1764 -0
- package/dist/{staticSelect.utils-BemUyaaA.js → staticSelect.utils-uHa8f_c6.js} +5 -144
- package/dist/styles/configurator.css +731 -218
- package/dist/{table.cva-BikE8qJH.js → table.cva-DlMT-zLD.js} +2 -3
- package/dist/tanstack/checkbox.js +1 -1
- package/dist/tanstack/date-picker.js +1 -1
- package/dist/tanstack/date-range-picker.js +1 -1
- package/dist/tanstack/date-time-picker.js +1 -1
- package/dist/tanstack/file-input.js +1 -1
- package/dist/tanstack/file-upload.js +1 -1
- package/dist/tanstack/form.js +1 -1
- package/dist/tanstack/inputs.js +1 -1
- package/dist/tanstack/number-range-input.js +1 -1
- package/dist/tanstack/radio-group.js +1 -1
- package/dist/tanstack/rich-text-editor.js +1 -1
- package/dist/tanstack/select.js +1 -1
- package/dist/tanstack/slider.js +1 -1
- package/dist/tanstack/table.js +2 -2
- package/dist/tanstack/text-area.js +1 -1
- package/dist/tanstack/time-picker.js +1 -1
- package/dist/tanstack/toggle-group.js +1 -1
- package/dist/tanstack.js +27 -27
- package/dist/theme-model-DtYPxNvH.js +406 -0
- package/dist/upload-CXU83BJ4.js +30 -0
- package/dist/useControlledState-CzXkZCX8.js +30 -0
- package/dist/{useFieldAccessibility-B4MVL6fz.js → useFieldAccessibility-ScC6Mtd5.js} +2 -2
- package/dist/{useFilters-kkEUFKmQ.js → useFilters-XNH27Md2.js} +1 -1
- package/dist/{useFormAutosave-Mg-tdwMh.js → useFormAutosave-DfuP7drj.js} +1 -1
- package/dist/{useStaticInputHandoff-CvSBPUB3.js → useStaticInputHandoff-NeZVnci-.js} +3 -3
- package/dist/{useTableColumnConfig-gfVame8v.js → useTableColumnConfig-BTGZiluz.js} +3 -3
- package/package.json +1 -1
- package/src/configurator/README.md +3 -3
- package/dist/FocusScope-CO9oJ1sc.js +0 -343
- package/dist/chain-DIXr2VAT.js +0 -10
- package/dist/focusSafely-DCGrr2bb.js +0 -447
- package/dist/getScrollParent-kSR7EtoT.js +0 -47
- package/dist/numberStatic.utils-BMgRzyd3.js +0 -902
- package/dist/openLink-CQhMhfzO.js +0 -121
- package/dist/platform-BXNIIAfU.js +0 -42
- package/dist/staticDateTimeSegments-CsCE9Buo.js +0 -3604
- package/dist/theme-model-C-QMCksE.js +0 -136
- package/dist/useControlledState-DQxX6LMN.js +0 -189
- package/dist/useFocusable-Bd0UsrQ7.js +0 -63
- package/dist/useFormValidationState-D3z-gafz.js +0 -1341
- package/dist/useLayoutEffect-B2-1tbPJ.js +0 -83
- package/dist/useSyncRef-RGMv0rXK.js +0 -338
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as UIConfig } from "./uiConfig.context-BS3r_kTS.js";
|
|
2
2
|
import { t as ChevronDown } from "./chevron-down-B4Pr8bD3.js";
|
|
3
|
-
import { t as CheckboxCheckmark } from "./CheckboxCheckmark-
|
|
3
|
+
import { t as CheckboxCheckmark } from "./CheckboxCheckmark-CpC3wlMs.js";
|
|
4
4
|
import { i as Search, n as selectListBoxItemDefinition, r as selectInputTagsContentWrapperDefinition, t as selectPopoverDefinition } from "./selectDesktop.cva-CHAMxhfO.js";
|
|
5
5
|
import { t as X } from "./x-B6vfz8Ps.js";
|
|
6
6
|
import { t as clsx } from "./clsx-CnD0nOiA.js";
|
|
@@ -16,20 +16,16 @@ import { n as $41fb335299a4a39e$export$f5b8910cec6cf069, t as $41fb335299a4a39e$
|
|
|
16
16
|
import { i as $928221da08ecbc62$export$a11e76429ed99b4, n as $928221da08ecbc62$export$7c5906fe4f1f2af2, r as $928221da08ecbc62$export$7ff8f37d2d81a48d, t as $928221da08ecbc62$export$41f133550aa26f48 } from "./ListBox-CL8Ar4Q_.js";
|
|
17
17
|
import { i as $a3be900807531178$re_export$useFilter, n as $a3be900807531178$re_export$ListLayout, r as $a3be900807531178$re_export$Rect } from "./exports-BNrTn8Tj.js";
|
|
18
18
|
import "./popoverAnimation-DEZSvKP8.js";
|
|
19
|
-
import { a as $d447af545b77c9f1$export$37a5fde709c1db82, i as $23f2114a1b82827e$export$e58f029f0fbfdb29, l as $d447af545b77c9f1$export$f531f92e2a15358f, r as $23f2114a1b82827e$export$cd4e5573fbe2b576, t as $c4867b2f328c2698$export$e5c5a5f917a5871c } from "./useLayoutEffect-B2-1tbPJ.js";
|
|
20
|
-
import { n as $2add3ce32c6007eb$export$78551043582a6a98, s as $2add3ce32c6007eb$export$fedb369cb70207f1 } from "./platform-BXNIIAfU.js";
|
|
21
|
-
import { t as $a4e76a5424781910$export$e08e3b67e392101e } from "./chain-DIXr2VAT.js";
|
|
22
|
-
import { n as $901761b40e390936$export$2bb74740c4e19def, r as $2b2d34ff061957fb$export$2b85b721e524d74b, t as $3578607fe3d4b096$export$cfa2225e87938781 } from "./getScrollParent-kSR7EtoT.js";
|
|
23
19
|
import { t as Spinner } from "./Spinner-BeVTUzzx.js";
|
|
24
20
|
import { BottomSheet } from "./components/bottom-sheet.js";
|
|
25
21
|
import { t as useBreakpoint } from "./useBreakpoint-DQoMN-BG.js";
|
|
26
22
|
import { TextButton } from "./components/text-button.js";
|
|
27
23
|
import { r as $a8ea2faf2ebe4d2f$re_export$mergeRefs } from "./import-BE0r63d8.js";
|
|
28
|
-
import { r as FormFieldLabel, t as FormField } from "./FormField-
|
|
24
|
+
import { r as FormFieldLabel, t as FormField } from "./FormField-B99dLt8o.js";
|
|
29
25
|
import { t as Tag } from "./Tag-DPg5sL1Z.js";
|
|
30
26
|
import "./i18n-CX2EjhJI.js";
|
|
31
27
|
import { a as inputSizeDefinition, t as inputBaseDefinition } from "./input.cva-DJA8ovm_.js";
|
|
32
|
-
import { n as InputClear, t as TooltipWrapper } from "./TooltipWrapper-
|
|
28
|
+
import { n as InputClear, t as TooltipWrapper } from "./TooltipWrapper-3jyN0Wss.js";
|
|
33
29
|
import { t as useIntersectionObserver } from "./useIntersectionObserver-DYfHnGGU.js";
|
|
34
30
|
import { t as popoverDefinition } from "./popover.cva-Bhud1wnp.js";
|
|
35
31
|
import { Input } from "./components/input.js";
|
|
@@ -50,6 +46,7 @@ import "react-aria/useListFormatter";
|
|
|
50
46
|
import { useVirtualizerState } from "react-stately/useVirtualizerState";
|
|
51
47
|
import { useScrollView } from "react-aria/private/virtualizer/ScrollView";
|
|
52
48
|
import { VirtualizerItem } from "react-aria/private/virtualizer/VirtualizerItem";
|
|
49
|
+
import { usePreventScroll } from "react-aria";
|
|
53
50
|
import { useLabel } from "@react-aria/label";
|
|
54
51
|
import { useFocusVisible, useFocusWithin, useHover as useHover$1 } from "@react-aria/interactions";
|
|
55
52
|
import { useTranslation } from "react-i18next";
|
|
@@ -334,142 +331,6 @@ function $143fb904d86051ce$var$renderDropIndicatorWrapper(parent, reusableView,
|
|
|
334
331
|
return indicator;
|
|
335
332
|
}
|
|
336
333
|
//#endregion
|
|
337
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/utils/keyboard.mjs
|
|
338
|
-
const $bb39c0fc1c19b34c$var$nonTextInputTypes = /* @__PURE__ */ new Set([
|
|
339
|
-
"checkbox",
|
|
340
|
-
"radio",
|
|
341
|
-
"range",
|
|
342
|
-
"color",
|
|
343
|
-
"file",
|
|
344
|
-
"image",
|
|
345
|
-
"button",
|
|
346
|
-
"submit",
|
|
347
|
-
"reset"
|
|
348
|
-
]);
|
|
349
|
-
function $bb39c0fc1c19b34c$export$c57958e35f31ed73(target) {
|
|
350
|
-
return target instanceof HTMLInputElement && !$bb39c0fc1c19b34c$var$nonTextInputTypes.has(target.type) || target instanceof HTMLTextAreaElement || target instanceof HTMLElement && target.isContentEditable;
|
|
351
|
-
}
|
|
352
|
-
//#endregion
|
|
353
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/overlays/usePreventScroll.mjs
|
|
354
|
-
const $0644e3663365bfe5$var$visualViewport = typeof document !== "undefined" && window.visualViewport;
|
|
355
|
-
let $0644e3663365bfe5$var$preventScrollCount = 0;
|
|
356
|
-
let $0644e3663365bfe5$var$restore;
|
|
357
|
-
function $0644e3663365bfe5$export$ee0f7cc6afcd1c18(options = {}) {
|
|
358
|
-
let { isDisabled } = options;
|
|
359
|
-
$c4867b2f328c2698$export$e5c5a5f917a5871c(() => {
|
|
360
|
-
if (isDisabled) return;
|
|
361
|
-
$0644e3663365bfe5$var$preventScrollCount++;
|
|
362
|
-
if ($0644e3663365bfe5$var$preventScrollCount === 1) {
|
|
363
|
-
if ($2add3ce32c6007eb$export$fedb369cb70207f1() && $2add3ce32c6007eb$export$78551043582a6a98()) $0644e3663365bfe5$var$restore = $0644e3663365bfe5$var$preventScrollMobileWebKit();
|
|
364
|
-
else $0644e3663365bfe5$var$restore = $0644e3663365bfe5$var$preventScrollStandard();
|
|
365
|
-
}
|
|
366
|
-
return () => {
|
|
367
|
-
$0644e3663365bfe5$var$preventScrollCount--;
|
|
368
|
-
if ($0644e3663365bfe5$var$preventScrollCount === 0) $0644e3663365bfe5$var$restore();
|
|
369
|
-
};
|
|
370
|
-
}, [isDisabled]);
|
|
371
|
-
}
|
|
372
|
-
function $0644e3663365bfe5$var$preventScrollStandard() {
|
|
373
|
-
let scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;
|
|
374
|
-
return $a4e76a5424781910$export$e08e3b67e392101e(scrollbarWidth > 0 && ("scrollbarGutter" in document.documentElement.style ? $d447af545b77c9f1$export$37a5fde709c1db82(document.documentElement, "scrollbar-gutter", "stable") : $d447af545b77c9f1$export$37a5fde709c1db82(document.documentElement, "padding-right", `${scrollbarWidth}px`)), $d447af545b77c9f1$export$37a5fde709c1db82(document.documentElement, "overflow", "hidden"));
|
|
375
|
-
}
|
|
376
|
-
function $0644e3663365bfe5$var$preventScrollMobileWebKit() {
|
|
377
|
-
let restoreOverflow = $d447af545b77c9f1$export$37a5fde709c1db82(document.documentElement, "overflow", "hidden");
|
|
378
|
-
let scrollable;
|
|
379
|
-
let allowTouchMove = false;
|
|
380
|
-
let onTouchStart = (e) => {
|
|
381
|
-
let target = $23f2114a1b82827e$export$e58f029f0fbfdb29(e);
|
|
382
|
-
scrollable = $901761b40e390936$export$2bb74740c4e19def(target) ? target : $3578607fe3d4b096$export$cfa2225e87938781(target, true);
|
|
383
|
-
allowTouchMove = false;
|
|
384
|
-
let selection = target.ownerDocument.defaultView.getSelection();
|
|
385
|
-
if (selection && !selection.isCollapsed && selection.containsNode(target, true)) allowTouchMove = true;
|
|
386
|
-
if (e.composedPath().some((el) => el instanceof HTMLInputElement && el.type === "range")) allowTouchMove = true;
|
|
387
|
-
if ("selectionStart" in target && "selectionEnd" in target && target.selectionStart < target.selectionEnd && target.ownerDocument.activeElement === target) allowTouchMove = true;
|
|
388
|
-
};
|
|
389
|
-
let style = document.createElement("style");
|
|
390
|
-
let nonce = $2b2d34ff061957fb$export$2b85b721e524d74b();
|
|
391
|
-
if (nonce) style.nonce = nonce;
|
|
392
|
-
style.textContent = `
|
|
393
|
-
@layer {
|
|
394
|
-
* {
|
|
395
|
-
overscroll-behavior: contain;
|
|
396
|
-
}
|
|
397
|
-
}`.trim();
|
|
398
|
-
document.head.prepend(style);
|
|
399
|
-
let onTouchMove = (e) => {
|
|
400
|
-
if (e.touches.length === 2 || allowTouchMove) return;
|
|
401
|
-
if (!scrollable || scrollable === document.documentElement || scrollable === document.body) {
|
|
402
|
-
e.preventDefault();
|
|
403
|
-
return;
|
|
404
|
-
}
|
|
405
|
-
if (scrollable.scrollHeight === scrollable.clientHeight && scrollable.scrollWidth === scrollable.clientWidth) e.preventDefault();
|
|
406
|
-
};
|
|
407
|
-
let onBlur = (e) => {
|
|
408
|
-
let target = $23f2114a1b82827e$export$e58f029f0fbfdb29(e);
|
|
409
|
-
let relatedTarget = e.relatedTarget;
|
|
410
|
-
if (relatedTarget && $bb39c0fc1c19b34c$export$c57958e35f31ed73(relatedTarget)) {
|
|
411
|
-
relatedTarget.focus({ preventScroll: true });
|
|
412
|
-
$0644e3663365bfe5$var$scrollIntoViewWhenReady(relatedTarget, $bb39c0fc1c19b34c$export$c57958e35f31ed73(target));
|
|
413
|
-
} else if (!relatedTarget) (target.parentElement?.closest("[tabindex]"))?.focus({ preventScroll: true });
|
|
414
|
-
};
|
|
415
|
-
let focus = HTMLElement.prototype.focus;
|
|
416
|
-
Reflect.defineProperty(HTMLElement.prototype, "focus", {
|
|
417
|
-
configurable: true,
|
|
418
|
-
writable: true,
|
|
419
|
-
value: function(opts) {
|
|
420
|
-
let activeElement = $23f2114a1b82827e$export$cd4e5573fbe2b576();
|
|
421
|
-
let wasKeyboardVisible = activeElement != null && $bb39c0fc1c19b34c$export$c57958e35f31ed73(activeElement);
|
|
422
|
-
focus.call(this, {
|
|
423
|
-
...opts,
|
|
424
|
-
preventScroll: true
|
|
425
|
-
});
|
|
426
|
-
if (!opts || !opts.preventScroll) $0644e3663365bfe5$var$scrollIntoViewWhenReady(this, wasKeyboardVisible);
|
|
427
|
-
}
|
|
428
|
-
});
|
|
429
|
-
let removeEvents = $a4e76a5424781910$export$e08e3b67e392101e($d447af545b77c9f1$export$f531f92e2a15358f(document, "touchstart", onTouchStart, {
|
|
430
|
-
passive: false,
|
|
431
|
-
capture: true
|
|
432
|
-
}), $d447af545b77c9f1$export$f531f92e2a15358f(document, "touchmove", onTouchMove, {
|
|
433
|
-
passive: false,
|
|
434
|
-
capture: true
|
|
435
|
-
}), $d447af545b77c9f1$export$f531f92e2a15358f(document, "blur", onBlur, true));
|
|
436
|
-
return () => {
|
|
437
|
-
restoreOverflow();
|
|
438
|
-
removeEvents();
|
|
439
|
-
style.remove();
|
|
440
|
-
Reflect.defineProperty(HTMLElement.prototype, "focus", {
|
|
441
|
-
configurable: true,
|
|
442
|
-
writable: true,
|
|
443
|
-
value: focus
|
|
444
|
-
});
|
|
445
|
-
};
|
|
446
|
-
}
|
|
447
|
-
function $0644e3663365bfe5$var$scrollIntoViewWhenReady(target, wasKeyboardVisible) {
|
|
448
|
-
if (wasKeyboardVisible || !$0644e3663365bfe5$var$visualViewport) $0644e3663365bfe5$var$scrollIntoView(target);
|
|
449
|
-
else $0644e3663365bfe5$var$visualViewport.addEventListener("resize", () => $0644e3663365bfe5$var$scrollIntoView(target), { once: true });
|
|
450
|
-
}
|
|
451
|
-
function $0644e3663365bfe5$var$scrollIntoView(target) {
|
|
452
|
-
let root = document.scrollingElement || document.documentElement;
|
|
453
|
-
let nextTarget = target;
|
|
454
|
-
while (nextTarget && nextTarget !== root) {
|
|
455
|
-
let scrollable = $3578607fe3d4b096$export$cfa2225e87938781(nextTarget);
|
|
456
|
-
if (scrollable !== document.documentElement && scrollable !== document.body && scrollable !== nextTarget) {
|
|
457
|
-
let scrollableRect = scrollable.getBoundingClientRect();
|
|
458
|
-
let targetRect = nextTarget.getBoundingClientRect();
|
|
459
|
-
if (targetRect.top < scrollableRect.top || targetRect.bottom > scrollableRect.top + nextTarget.clientHeight) {
|
|
460
|
-
let bottom = scrollableRect.bottom;
|
|
461
|
-
if ($0644e3663365bfe5$var$visualViewport) bottom = Math.min(bottom, $0644e3663365bfe5$var$visualViewport.offsetTop + $0644e3663365bfe5$var$visualViewport.height);
|
|
462
|
-
let adjustment = targetRect.top - scrollableRect.top - ((bottom - scrollableRect.top) / 2 - targetRect.height / 2);
|
|
463
|
-
scrollable.scrollTo({
|
|
464
|
-
top: Math.max(0, Math.min(scrollable.scrollHeight - scrollable.clientHeight, scrollable.scrollTop + adjustment)),
|
|
465
|
-
behavior: "smooth"
|
|
466
|
-
});
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
nextTarget = scrollable.parentElement;
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
|
-
//#endregion
|
|
473
334
|
//#region src/components/inputs/Selection/shared/SelectInputTags.tsx
|
|
474
335
|
const SelectInputTags = ({ selectedItems, isDisabled, selectedTagsType, collapseAfter, onRemove }) => {
|
|
475
336
|
const { displayedItems, remainingCount } = useMemo(() => {
|
|
@@ -1385,7 +1246,7 @@ const SelectDesktop = ({ ref, error, ignoreTriggerWidth, showSelectionContent, i
|
|
|
1385
1246
|
const [popoverWidth, setPopoverWidth] = useState(void 0);
|
|
1386
1247
|
const [isPopoverAbove, setIsPopoverAbove] = useState(false);
|
|
1387
1248
|
const { fieldState, isOpen, setIsOpen, onInputChange, onChange, onClear, onSelectAll, listItems, selectableListItems, selectedIds, isMultiple } = SelectContext.useSelect();
|
|
1388
|
-
|
|
1249
|
+
usePreventScroll({ isDisabled: !isOpen });
|
|
1389
1250
|
useLayoutEffect(() => {
|
|
1390
1251
|
if (!isOpen || !wrapperRef.current) return;
|
|
1391
1252
|
setPopoverWidth(wrapperRef.current.getBoundingClientRect().width);
|