@norges-domstoler/dds-components 0.0.0-dev-20240110151153 → 0.0.0-dev-20240112130219
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/index.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +36 -33
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +36 -33
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -10894,38 +10894,37 @@ import { jsx as jsx235, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
|
10894
10894
|
var refIsFocusable = (ref) => {
|
|
10895
10895
|
return typeof ref === "object" && ref !== null && "focus" in ref;
|
|
10896
10896
|
};
|
|
10897
|
-
|
|
10898
|
-
|
|
10899
|
-
|
|
10900
|
-
|
|
10901
|
-
|
|
10902
|
-
|
|
10903
|
-
|
|
10904
|
-
|
|
10905
|
-
|
|
10906
|
-
|
|
10907
|
-
|
|
10908
|
-
|
|
10909
|
-
|
|
10910
|
-
|
|
10911
|
-
|
|
10912
|
-
|
|
10913
|
-
|
|
10914
|
-
|
|
10915
|
-
|
|
10916
|
-
|
|
10917
|
-
|
|
10918
|
-
|
|
10919
|
-
|
|
10920
|
-
|
|
10921
|
-
|
|
10922
|
-
|
|
10923
|
-
|
|
10924
|
-
|
|
10925
|
-
|
|
10926
|
-
|
|
10927
|
-
|
|
10928
|
-
);
|
|
10897
|
+
function _DatePicker({ errorMessage, componentSize, tip, style, ...props }, forwardedRef) {
|
|
10898
|
+
const state = useDatePickerState(props);
|
|
10899
|
+
const domRef = useFocusManagerRef(
|
|
10900
|
+
refIsFocusable(forwardRef52) ? forwardedRef : null
|
|
10901
|
+
);
|
|
10902
|
+
const ref = useRef21(null);
|
|
10903
|
+
const combinedRef = useCombinedRef(ref, domRef);
|
|
10904
|
+
const { buttonProps, calendarProps, fieldProps } = useDatePicker2(
|
|
10905
|
+
{ ...props, granularity: "day" },
|
|
10906
|
+
state,
|
|
10907
|
+
ref
|
|
10908
|
+
);
|
|
10909
|
+
return /* @__PURE__ */ jsxs55(CalendarPopover, { isOpen: state.isOpen, onClose: state.close, children: [
|
|
10910
|
+
/* @__PURE__ */ jsx235(CalendarPopoverAnchor, { children: /* @__PURE__ */ jsx235(
|
|
10911
|
+
DateField,
|
|
10912
|
+
{
|
|
10913
|
+
...fieldProps,
|
|
10914
|
+
ref: combinedRef,
|
|
10915
|
+
componentSize,
|
|
10916
|
+
tip,
|
|
10917
|
+
label: props.label,
|
|
10918
|
+
errorMessage,
|
|
10919
|
+
buttonProps,
|
|
10920
|
+
isOpen: state.isOpen,
|
|
10921
|
+
style
|
|
10922
|
+
}
|
|
10923
|
+
) }),
|
|
10924
|
+
/* @__PURE__ */ jsx235(CalendarPopoverContent, { children: /* @__PURE__ */ jsx235(Calendar, { ...calendarProps }) })
|
|
10925
|
+
] });
|
|
10926
|
+
}
|
|
10927
|
+
var DatePicker = forwardRef52(_DatePicker);
|
|
10929
10928
|
DatePicker.displayName = "DatePicker";
|
|
10930
10929
|
|
|
10931
10930
|
// src/components/date-inputs/TimePicker/TimePicker.tsx
|
|
@@ -10947,7 +10946,11 @@ function _TimePicker({ componentSize = "medium", style, ...props }, forwardedRef
|
|
|
10947
10946
|
...props,
|
|
10948
10947
|
locale
|
|
10949
10948
|
});
|
|
10950
|
-
const { labelProps, fieldProps } = useTimeField(
|
|
10949
|
+
const { labelProps, fieldProps } = useTimeField(
|
|
10950
|
+
{ ...props, hideTimeZone: true, granularity: "hour" },
|
|
10951
|
+
state,
|
|
10952
|
+
ref
|
|
10953
|
+
);
|
|
10951
10954
|
const disabled = props.isDisabled || !!fieldProps["aria-disabled"];
|
|
10952
10955
|
return /* @__PURE__ */ jsx236(
|
|
10953
10956
|
DateInput,
|