@norges-domstoler/dds-components 17.6.0 → 17.7.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/dist/index.css +3 -3
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +14 -5
- package/dist/index.d.ts +14 -5
- package/dist/index.js +17 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
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
|
-
|
|
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
|
-
*
|
|
1186
|
+
* Ledetekst.
|
|
1185
1187
|
*/
|
|
1186
|
-
|
|
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,6 +2455,10 @@ 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;
|
|
2458
|
+
/** Om focus skal returneres ved `blur`
|
|
2459
|
+
* @default true
|
|
2460
|
+
*/
|
|
2461
|
+
returnFocusOnBlur?: boolean;
|
|
2457
2462
|
}>;
|
|
2458
2463
|
declare const Popover: react.ForwardRefExoticComponent<Pick<react.HTMLAttributes<HTMLDivElement>, "id" | "className"> & {
|
|
2459
2464
|
/**Tittel. */
|
|
@@ -2484,6 +2489,10 @@ declare const Popover: react.ForwardRefExoticComponent<Pick<react.HTMLAttributes
|
|
|
2484
2489
|
sizeProps?: PopoverSizeProps;
|
|
2485
2490
|
/** **OBS!** Propen settes automatisk av `<PopoverGroup />`. Funksjon kjørt ved lukking. */
|
|
2486
2491
|
onClose?: () => void;
|
|
2492
|
+
/** Om focus skal returneres ved `blur`
|
|
2493
|
+
* @default true
|
|
2494
|
+
*/
|
|
2495
|
+
returnFocusOnBlur?: boolean;
|
|
2487
2496
|
} & {
|
|
2488
2497
|
children?: ReactNode | undefined;
|
|
2489
2498
|
} & {
|
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
|
-
|
|
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
|
-
*
|
|
1186
|
+
* Ledetekst.
|
|
1185
1187
|
*/
|
|
1186
|
-
|
|
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,6 +2455,10 @@ 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;
|
|
2458
|
+
/** Om focus skal returneres ved `blur`
|
|
2459
|
+
* @default true
|
|
2460
|
+
*/
|
|
2461
|
+
returnFocusOnBlur?: boolean;
|
|
2457
2462
|
}>;
|
|
2458
2463
|
declare const Popover: react.ForwardRefExoticComponent<Pick<react.HTMLAttributes<HTMLDivElement>, "id" | "className"> & {
|
|
2459
2464
|
/**Tittel. */
|
|
@@ -2484,6 +2489,10 @@ declare const Popover: react.ForwardRefExoticComponent<Pick<react.HTMLAttributes
|
|
|
2484
2489
|
sizeProps?: PopoverSizeProps;
|
|
2485
2490
|
/** **OBS!** Propen settes automatisk av `<PopoverGroup />`. Funksjon kjørt ved lukking. */
|
|
2486
2491
|
onClose?: () => void;
|
|
2492
|
+
/** Om focus skal returneres ved `blur`
|
|
2493
|
+
* @default true
|
|
2494
|
+
*/
|
|
2495
|
+
returnFocusOnBlur?: boolean;
|
|
2487
2496
|
} & {
|
|
2488
2497
|
children?: ReactNode | undefined;
|
|
2489
2498
|
} & {
|
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)(
|
|
4915
|
-
|
|
4916
|
-
/* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
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
|
|
@@ -11298,6 +11300,7 @@ var Popover = (0, import_react111.forwardRef)(
|
|
|
11298
11300
|
placement = "bottom",
|
|
11299
11301
|
offset = import_dds_design_tokens16.ddsTokens.ddsSpacingX05NumberPx,
|
|
11300
11302
|
sizeProps,
|
|
11303
|
+
returnFocusOnBlur = true,
|
|
11301
11304
|
id,
|
|
11302
11305
|
className,
|
|
11303
11306
|
htmlProps = {},
|
|
@@ -11310,7 +11313,7 @@ var Popover = (0, import_react111.forwardRef)(
|
|
|
11310
11313
|
});
|
|
11311
11314
|
refs.setReference(anchorElement || null);
|
|
11312
11315
|
const popoverRef = useReturnFocusOnBlur(
|
|
11313
|
-
isOpen && hasTransitionedIn,
|
|
11316
|
+
isOpen && hasTransitionedIn && returnFocusOnBlur,
|
|
11314
11317
|
() => {
|
|
11315
11318
|
onClose && onClose();
|
|
11316
11319
|
onBlur && onBlur();
|