@povio/ui 3.2.4-rc.1 → 3.2.4-rc.10
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/buttons/Button/button.cva.d.ts +1 -1
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +2 -2
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +2 -2
- package/dist/components/inputs/DateTime/shared/useFirefoxDateSegmentSelectionGuard.d.ts +2 -0
- package/dist/components/inputs/DateTime/shared/useFirefoxDateSegmentSelectionGuard.js +33 -0
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +2 -1
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +2 -1
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +56 -2
- package/dist/components/inputs/Selection/Select/QuerySelect.js +69 -15
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +159 -390
- package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -1
- package/dist/components/inputs/Selection/shared/SelectInput.js +142 -131
- package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +1 -0
- package/dist/components/inputs/Selection/shared/querySelect.utils.js +1 -0
- package/dist/components/inputs/Selection/shared/select.context.js +19 -9
- package/dist/components/inputs/shared/input.cva.js +1 -1
- package/dist/components/shared/pagination/minWidth.cva.d.ts +1 -1
- package/dist/helpers/dynamicColumns.js +2 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -1
- package/dist/utils/date-time.utils.js +21 -11
- package/dist/utils/intl.utils.d.ts +7 -0
- package/dist/utils/intl.utils.js +38 -0
- package/dist/utils/intl.utils.spec.d.ts +1 -0
- package/package.json +1 -1
- package/dist/components/inputs/DateTime/shared/usePreserveExternalFocusOnUnmount.d.ts +0 -2
- package/dist/components/inputs/DateTime/shared/usePreserveExternalFocusOnUnmount.js +0 -32
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { c } from "react/compiler-runtime";
|
|
2
|
-
import { useLayoutEffect } from "react";
|
|
3
|
-
//#region src/components/inputs/DateTime/shared/usePreserveExternalFocusOnUnmount.ts
|
|
4
|
-
var usePreserveExternalFocusOnUnmount = (containerRef) => {
|
|
5
|
-
const $ = c(3);
|
|
6
|
-
let t0;
|
|
7
|
-
let t1;
|
|
8
|
-
if ($[0] !== containerRef) {
|
|
9
|
-
t0 = () => {
|
|
10
|
-
const container = containerRef.current;
|
|
11
|
-
return () => {
|
|
12
|
-
const activeElement = document.activeElement;
|
|
13
|
-
if (!(activeElement instanceof HTMLElement) || activeElement === document.body || container?.contains(activeElement)) return;
|
|
14
|
-
requestAnimationFrame(() => {
|
|
15
|
-
const nextActiveElement = document.activeElement;
|
|
16
|
-
const dateInputReclaimedFocus = Boolean(nextActiveElement instanceof HTMLElement && nextActiveElement.closest("[data-datetime-input]"));
|
|
17
|
-
if (activeElement.isConnected && (nextActiveElement === document.body || dateInputReclaimedFocus) && nextActiveElement !== activeElement) activeElement.focus({ preventScroll: true });
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
t1 = [containerRef];
|
|
22
|
-
$[0] = containerRef;
|
|
23
|
-
$[1] = t0;
|
|
24
|
-
$[2] = t1;
|
|
25
|
-
} else {
|
|
26
|
-
t0 = $[1];
|
|
27
|
-
t1 = $[2];
|
|
28
|
-
}
|
|
29
|
-
useLayoutEffect(t0, t1);
|
|
30
|
-
};
|
|
31
|
-
//#endregion
|
|
32
|
-
export { usePreserveExternalFocusOnUnmount };
|