@norges-domstoler/dds-components 0.0.0-dev-20241206132224 → 0.0.0-dev-20241209080734

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 CHANGED
@@ -1175,17 +1175,18 @@ declare const AccordionHeader: react.ForwardRefExoticComponent<AccordionHeaderPr
1175
1175
  type AccordionBodyProps = Omit<BaseComponentPropsWithChildren<HTMLDivElement>, 'id'>;
1176
1176
  declare const AccordionBody: react.ForwardRefExoticComponent<AccordionBodyProps & react.RefAttributes<HTMLDivElement>>;
1177
1177
 
1178
- interface BackLinkProps {
1178
+ type BackLinkProps = {
1179
1179
  /**
1180
1180
  * Ledetekst.
1181
1181
  */
1182
1182
  label: string;
1183
+ } & Pick<ComponentProps<'a'>, 'onClick' | 'href'>;
1184
+ declare const BackLink: react.ForwardRefExoticComponent<{
1183
1185
  /**
1184
- * URL til forrige nivå.
1186
+ * Ledetekst.
1185
1187
  */
1186
- href: string;
1187
- }
1188
- declare const BackLink: react.ForwardRefExoticComponent<BackLinkProps & react.RefAttributes<HTMLElement>>;
1188
+ label: string;
1189
+ } & Pick<react.DetailedHTMLProps<react.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "onClick" | "href"> & react.RefAttributes<HTMLElement>>;
1189
1190
 
1190
1191
  type BreadcrumbProps = HTMLAttributes<HTMLSpanElement> | AnchorHTMLAttributes<HTMLAnchorElement>;
1191
1192
  declare const Breadcrumb: react.ForwardRefExoticComponent<BreadcrumbProps & react.RefAttributes<HTMLElement>>;
@@ -2454,7 +2455,6 @@ type PopoverProps = BaseComponentPropsWithChildren<HTMLDivElement, {
2454
2455
  sizeProps?: PopoverSizeProps;
2455
2456
  /** **OBS!** Propen settes automatisk av `<PopoverGroup />`. Funksjon kjørt ved lukking. */
2456
2457
  onClose?: () => void;
2457
- withoutFocusOnBlur?: boolean;
2458
2458
  }>;
2459
2459
  declare const Popover: react.ForwardRefExoticComponent<Pick<react.HTMLAttributes<HTMLDivElement>, "id" | "className"> & {
2460
2460
  /**Tittel. */
@@ -2485,7 +2485,6 @@ declare const Popover: react.ForwardRefExoticComponent<Pick<react.HTMLAttributes
2485
2485
  sizeProps?: PopoverSizeProps;
2486
2486
  /** **OBS!** Propen settes automatisk av `<PopoverGroup />`. Funksjon kjørt ved lukking. */
2487
2487
  onClose?: () => void;
2488
- withoutFocusOnBlur?: boolean;
2489
2488
  } & {
2490
2489
  children?: ReactNode | undefined;
2491
2490
  } & {
package/dist/index.d.ts CHANGED
@@ -1175,17 +1175,18 @@ declare const AccordionHeader: react.ForwardRefExoticComponent<AccordionHeaderPr
1175
1175
  type AccordionBodyProps = Omit<BaseComponentPropsWithChildren<HTMLDivElement>, 'id'>;
1176
1176
  declare const AccordionBody: react.ForwardRefExoticComponent<AccordionBodyProps & react.RefAttributes<HTMLDivElement>>;
1177
1177
 
1178
- interface BackLinkProps {
1178
+ type BackLinkProps = {
1179
1179
  /**
1180
1180
  * Ledetekst.
1181
1181
  */
1182
1182
  label: string;
1183
+ } & Pick<ComponentProps<'a'>, 'onClick' | 'href'>;
1184
+ declare const BackLink: react.ForwardRefExoticComponent<{
1183
1185
  /**
1184
- * URL til forrige nivå.
1186
+ * Ledetekst.
1185
1187
  */
1186
- href: string;
1187
- }
1188
- declare const BackLink: react.ForwardRefExoticComponent<BackLinkProps & react.RefAttributes<HTMLElement>>;
1188
+ label: string;
1189
+ } & Pick<react.DetailedHTMLProps<react.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "onClick" | "href"> & react.RefAttributes<HTMLElement>>;
1189
1190
 
1190
1191
  type BreadcrumbProps = HTMLAttributes<HTMLSpanElement> | AnchorHTMLAttributes<HTMLAnchorElement>;
1191
1192
  declare const Breadcrumb: react.ForwardRefExoticComponent<BreadcrumbProps & react.RefAttributes<HTMLElement>>;
@@ -2454,7 +2455,6 @@ type PopoverProps = BaseComponentPropsWithChildren<HTMLDivElement, {
2454
2455
  sizeProps?: PopoverSizeProps;
2455
2456
  /** **OBS!** Propen settes automatisk av `<PopoverGroup />`. Funksjon kjørt ved lukking. */
2456
2457
  onClose?: () => void;
2457
- withoutFocusOnBlur?: boolean;
2458
2458
  }>;
2459
2459
  declare const Popover: react.ForwardRefExoticComponent<Pick<react.HTMLAttributes<HTMLDivElement>, "id" | "className"> & {
2460
2460
  /**Tittel. */
@@ -2485,7 +2485,6 @@ declare const Popover: react.ForwardRefExoticComponent<Pick<react.HTMLAttributes
2485
2485
  sizeProps?: PopoverSizeProps;
2486
2486
  /** **OBS!** Propen settes automatisk av `<PopoverGroup />`. Funksjon kjørt ved lukking. */
2487
2487
  onClose?: () => void;
2488
- withoutFocusOnBlur?: boolean;
2489
2488
  } & {
2490
2489
  children?: ReactNode | undefined;
2491
2490
  } & {
package/dist/index.js CHANGED
@@ -4911,19 +4911,21 @@ var BackLink_default = {
4911
4911
 
4912
4912
  // src/components/BackLink/BackLink.tsx
4913
4913
  var import_jsx_runtime181 = require("react/jsx-runtime");
4914
- var BackLink = (0, import_react30.forwardRef)((props, ref) => {
4915
- return /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("nav", { ref, "aria-label": "g\xE5 tilbake", children: /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(Link, { href: props.href, children: [
4916
- /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
4917
- Icon,
4918
- {
4919
- icon: ArrowLeftIcon,
4920
- iconSize: "small",
4921
- className: BackLink_default.icon
4922
- }
4923
- ),
4924
- props.label
4925
- ] }) });
4926
- });
4914
+ var BackLink = (0, import_react30.forwardRef)(
4915
+ ({ label, ...props }, ref) => {
4916
+ return /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("nav", { ref, "aria-label": "G\xE5 tilbake", children: /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(Link, { ...props, children: [
4917
+ /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
4918
+ Icon,
4919
+ {
4920
+ icon: ArrowLeftIcon,
4921
+ iconSize: "small",
4922
+ className: BackLink_default.icon
4923
+ }
4924
+ ),
4925
+ label
4926
+ ] }) });
4927
+ }
4928
+ );
4927
4929
  BackLink.displayName = "BackLink";
4928
4930
 
4929
4931
  // src/components/Breadcrumbs/Breadcrumb.tsx
@@ -11301,7 +11303,6 @@ var Popover = (0, import_react111.forwardRef)(
11301
11303
  id,
11302
11304
  className,
11303
11305
  htmlProps = {},
11304
- withoutFocusOnBlur = false,
11305
11306
  ...rest
11306
11307
  } = props;
11307
11308
  const hasTransitionedIn = useMountTransition(isOpen, 400);
@@ -11311,7 +11312,7 @@ var Popover = (0, import_react111.forwardRef)(
11311
11312
  });
11312
11313
  refs.setReference(anchorElement || null);
11313
11314
  const popoverRef = useReturnFocusOnBlur(
11314
- isOpen && hasTransitionedIn && !withoutFocusOnBlur,
11315
+ isOpen && hasTransitionedIn,
11315
11316
  () => {
11316
11317
  onClose && onClose();
11317
11318
  onBlur && onBlur();