@helsenorge/datepicker 10.0.1 → 10.1.0
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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
## [10.0.3](https://github.com/helsenorge/designsystem/branchCompare?baseVersion=GTv10.0.2&targetVersion=GTv10.0.3) (2025-01-30)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **datepicker:** locale setter tekst språk igjen ([921efcb](https://github.com/helsenorge/designsystem/commit/921efcb9040a2d790e965a009b28b3b4b3593a9b)), closes [#343367](https://github.com/helsenorge/designsystem/issues/343367)
|
|
7
|
+
|
|
8
|
+
## [10.0.2](https://github.com/helsenorge/designsystem/branchCompare?baseVersion=GTv10.0.1&targetVersion=GTv10.0.2) (2025-01-29)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* hvis icon har hover prop skal denne ikke overstyres ([f4956aa](https://github.com/helsenorge/designsystem/commit/f4956aacf26d462b2ffccc24fbce5b0946bd6de4)), closes [#336117](https://github.com/helsenorge/designsystem/issues/336117)
|
|
14
|
+
* **listheader:** title margin resettes riktig ([1b50bc0](https://github.com/helsenorge/designsystem/commit/1b50bc0e3229b2d351b2df17b79798dfd95a9fb8)), closes [#343414](https://github.com/helsenorge/designsystem/issues/343414)
|
|
15
|
+
|
|
16
|
+
## [10.0.1](https://github.com/helsenorge/designsystem/branchCompare?baseVersion=GTv10.0.0&targetVersion=GTv10.0.1) (2025-01-28)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* feil letterspacing for title5 ([f1391bd](https://github.com/helsenorge/designsystem/commit/f1391bd18a30b8b2da737c6687e55b61b752a1fa)), closes [#342902](https://github.com/helsenorge/designsystem/issues/342902)
|
|
22
|
+
|
|
1
23
|
## [10.0.0](https://github.com/helsenorge/designsystem/branchCompare?baseVersion=GTv9.7.0&targetVersion=GTv10.0.0) (2025-01-27)
|
|
2
24
|
|
|
3
25
|
|
|
@@ -16,7 +16,6 @@ import { isMutableRefObject, mergeRefs } from "@helsenorge/designsystem-react/ut
|
|
|
16
16
|
import classNames from "classnames";
|
|
17
17
|
import { enUS as enUS$1 } from "date-fns/locale/en-US";
|
|
18
18
|
import reactdaypickerstyles from "react-day-picker/dist/style.module.css";
|
|
19
|
-
import { useFocusTrap } from "@helsenorge/designsystem-react/hooks/useFocusTrap";
|
|
20
19
|
import { useInterval } from "@helsenorge/designsystem-react/hooks/useInterval";
|
|
21
20
|
import { useIsVisible } from "@helsenorge/designsystem-react/hooks/useIsVisible";
|
|
22
21
|
import { useLayoutEvent } from "@helsenorge/designsystem-react/hooks/useLayoutEvent";
|
|
@@ -1884,7 +1883,6 @@ const DatePickerPopup = (props) => {
|
|
|
1884
1883
|
const [controllerSize, setControllerSize] = useState();
|
|
1885
1884
|
const bubbleSize = useSize(datepickerWrapperRef);
|
|
1886
1885
|
const controllerisVisible = useIsVisible(datepickerWrapperRef, 0);
|
|
1887
|
-
useFocusTrap(datepickerWrapperRef, true);
|
|
1888
1886
|
function getDateFnsLocale(dayPickerLocale) {
|
|
1889
1887
|
return dayPickerLocale ?? nb;
|
|
1890
1888
|
}
|
|
@@ -1959,6 +1957,7 @@ const DatePickerPopup = (props) => {
|
|
|
1959
1957
|
labels: buildAriaLabels(ariaLabels),
|
|
1960
1958
|
startMonth: startMonth ?? new Date(today.getFullYear() - 100, today.getMonth(), 1),
|
|
1961
1959
|
endMonth: endMonth ?? new Date(today.getFullYear() + 100, today.getMonth(), 1),
|
|
1960
|
+
locale,
|
|
1962
1961
|
...rest
|
|
1963
1962
|
}
|
|
1964
1963
|
) }),
|
|
@@ -2011,11 +2010,15 @@ const DatePicker = React.forwardRef((props, ref) => {
|
|
|
2011
2010
|
const { refObject } = usePseudoClasses(isMutableRefObject(ref) ? ref : null);
|
|
2012
2011
|
const mergedRefs = mergeRefs([ref, refObject]);
|
|
2013
2012
|
const isTyping = useRef(false);
|
|
2014
|
-
useOutsideEvent(
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2013
|
+
useOutsideEvent(
|
|
2014
|
+
[inputContainerRef, datepickerWrapperRef],
|
|
2015
|
+
(e) => {
|
|
2016
|
+
if (inputContainerRef.current && datepickerWrapperRef.current && !(e == null ? void 0 : e.composedPath().includes(inputContainerRef.current)) && !(e == null ? void 0 : e.composedPath().includes(datepickerWrapperRef.current))) {
|
|
2017
|
+
setDatePickerOpen(false);
|
|
2018
|
+
}
|
|
2019
|
+
},
|
|
2020
|
+
["mousedown", "focusin", "blur"]
|
|
2021
|
+
);
|
|
2019
2022
|
useEffect(() => {
|
|
2020
2023
|
if (isValid(dateValue)) {
|
|
2021
2024
|
setInputValue(dateValue ? format(dateValue, dateFormat) : "");
|