@olenbetong/synergi-react 3.1.0 → 3.2.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.
@@ -11,7 +11,7 @@ const OPTIONS = [
11
11
  /** Icon-only color scheme toggle, shown at the bottom of the app menu rail. */
12
12
  export function AppMenuColorScheme() {
13
13
  let [preference, setPreference] = useColorSchemePreference();
14
- return (_jsx("div", { className: "ob-app-menu__color-scheme", children: _jsx(ToggleGroup, { "data-size": "sm", "data-toggle-group": getLocalizedString("Theme"), "aria-label": getLocalizedString("Theme"), value: preference, onChange: (value) => setPreference(value), children: OPTIONS.map(({ value, label, Icon }) => {
14
+ return (_jsx("div", { className: "ob-app-menu__color-scheme", children: _jsx(ToggleGroup, { "data-size": "sm", "aria-label": getLocalizedString("Theme"), value: preference, onChange: (value) => setPreference(value), children: OPTIONS.map(({ value, label, Icon }) => {
15
15
  let localizedLabel = getLocalizedString(label);
16
16
  return (_jsx(Tooltip, { content: localizedLabel, children: _jsxs(ToggleGroup.Item, { value: value, children: [_jsx(Icon, { "aria-hidden": true, fontSize: "1.25rem" }), _jsx("span", { className: "ob-app-menu__color-scheme-label", children: localizedLabel })] }) }, value));
17
17
  }) }) }));
@@ -2,10 +2,9 @@
2
2
  height: 100%;
3
3
  display: flex;
4
4
  flex-direction: column;
5
- /* The root carries data-color-scheme="dark": the editor chrome is always dark
6
- so the image stays the focus, and Designsystemet components inside pick up
7
- matching dark tokens. */
8
- background: var(--ds-color-neutral-background-default, #111);
5
+ /* Follow the page color scheme, but keep a neutral gray editor surface in light mode
6
+ so white scanned documents still stand out from the background. */
7
+ background: var(--ds-color-neutral-background-tinted, #f3f3f4);
9
8
  color: var(--ds-color-neutral-text-default, white);
10
9
  }
11
10
 
@@ -26,6 +25,7 @@
26
25
  justify-content: center;
27
26
  position: relative;
28
27
  overflow: hidden;
28
+ background: var(--ds-color-neutral-background-tinted, #f3f3f4);
29
29
  }
30
30
 
31
31
  .image-editor__replay-overlay {
@@ -157,7 +157,7 @@
157
157
  so they're never clipped at the edges. */
158
158
  padding: 16px;
159
159
  box-sizing: border-box;
160
- background: var(--ds-color-neutral-background-default, #111);
160
+ background: var(--ds-color-neutral-background-tinted, #f3f3f4);
161
161
  touch-action: none;
162
162
  }
163
163
 
@@ -73,7 +73,7 @@ export const ImageEditor = forwardRef(function ImageEditor({ imageUrl, onConfirm
73
73
  }
74
74
  let CanvasWrapper = viewPlugin?.CanvasWrapper;
75
75
  let TopBarControls = viewPlugin?.TopBarControls;
76
- let inner = (_jsxs("div", { className: "image-editor", "data-color-scheme": "dark", children: [_jsxs("div", { className: "image-editor__topbar", children: [_jsxs("div", { className: "image-editor__toolbar-group", children: [onCancel && (_jsxs(_Fragment, { children: [_jsx(ResponsiveButton, { icon: _jsx(ArrowLeftIcon, { "aria-hidden": true }), label: getLocalizedString("Back"), onClick: onCancel, isSmall: isSmall }), _jsx("span", { className: "image-editor__topbar-divider", "aria-hidden": true })] })), _jsx(ResponsiveButton, { icon: _jsx(ArrowUndoIcon, { "aria-hidden": true }), label: getLocalizedString("Undo"), onClick: history.undo, disabled: disabled || !history.canUndo || !!activePlugin, isSmall: isSmall }), _jsx(ResponsiveButton, { icon: _jsx(ArrowRedoIcon, { "aria-hidden": true }), label: getLocalizedString("Redo"), onClick: history.redo, disabled: disabled || !history.canRedo || !!activePlugin, isSmall: isSmall }), _jsx(ResponsiveButton, { icon: _jsx(ArrowCirclepathIcon, { "aria-hidden": true }), label: getLocalizedString("Reset"), onClick: history.reset, disabled: disabled || !history.canUndo || !!activePlugin, isSmall: isSmall })] }), TopBarControls && (_jsx("div", { className: "image-editor__toolbar-group", children: _jsx(TopBarControls, { disabled: disabled, isSmall: isSmall }) }))] }), _jsxs("div", { className: "image-editor__canvas", children: [CanvasWrapper ? (_jsx(CanvasWrapper, { panEnabled: !activePlugin, children: activePlugin ? (_jsx(ActiveOverlay, { plugin: activePlugin })) : (_jsx("img", { src: history.currentImageUrl, alt: getLocalizedString("Image to edit"), className: "image-editor__img" })) })) : activePlugin ? (_jsx(ActiveOverlay, { plugin: activePlugin })) : (_jsx("img", { src: history.currentImageUrl, alt: getLocalizedString("Image to edit"), className: "image-editor__img" })), !activePlugin && onConfirm && (_jsxs(Button, { className: "image-editor__done", variant: "primary", icon: isSmall, "aria-label": isSmall ? getLocalizedString("Done") : undefined, onClick: confirm, disabled: disabled, children: [_jsx(CheckmarkIcon, { "aria-hidden": true }), !isSmall && getLocalizedString("Done")] })), history.replaying && (_jsx("div", { className: "image-editor__replay-overlay", children: _jsx(Spinner, { "aria-label": getLocalizedString("Loading") }) }))] }), _jsx("div", { className: "image-editor__toolbar", children: activePlugin ? (_jsx(ActiveToolbar, { plugin: activePlugin })) : (_jsx("div", { className: "image-editor__toolbar-group", children: plugins.map((p) => p.type === "tool" ? (_jsx(ToolButton, { plugin: p, busy: disabled, onActivate: () => activateTool(p.id), isSmall: isSmall }, p.id)) : (_jsx(ActionButton, { plugin: p, busy: disabled, onExecute: () => enqueueAction(p), isSmall: isSmall }, p.id))) })) })] }));
76
+ let inner = (_jsxs("div", { className: "image-editor", children: [_jsxs("div", { className: "image-editor__topbar", children: [_jsxs("div", { className: "image-editor__toolbar-group", children: [onCancel && (_jsxs(_Fragment, { children: [_jsx(ResponsiveButton, { icon: _jsx(ArrowLeftIcon, { "aria-hidden": true }), label: getLocalizedString("Back"), onClick: onCancel, isSmall: isSmall }), _jsx("span", { className: "image-editor__topbar-divider", "aria-hidden": true })] })), _jsx(ResponsiveButton, { icon: _jsx(ArrowUndoIcon, { "aria-hidden": true }), label: getLocalizedString("Undo"), onClick: history.undo, disabled: disabled || !history.canUndo || !!activePlugin, isSmall: isSmall }), _jsx(ResponsiveButton, { icon: _jsx(ArrowRedoIcon, { "aria-hidden": true }), label: getLocalizedString("Redo"), onClick: history.redo, disabled: disabled || !history.canRedo || !!activePlugin, isSmall: isSmall }), _jsx(ResponsiveButton, { icon: _jsx(ArrowCirclepathIcon, { "aria-hidden": true }), label: getLocalizedString("Reset"), onClick: history.reset, disabled: disabled || !history.canUndo || !!activePlugin, isSmall: isSmall })] }), TopBarControls && (_jsx("div", { className: "image-editor__toolbar-group", children: _jsx(TopBarControls, { disabled: disabled, isSmall: isSmall }) }))] }), _jsxs("div", { className: "image-editor__canvas", children: [CanvasWrapper ? (_jsx(CanvasWrapper, { panEnabled: !activePlugin, children: activePlugin ? (_jsx(ActiveOverlay, { plugin: activePlugin })) : (_jsx("img", { src: history.currentImageUrl, alt: getLocalizedString("Image to edit"), className: "image-editor__img" })) })) : activePlugin ? (_jsx(ActiveOverlay, { plugin: activePlugin })) : (_jsx("img", { src: history.currentImageUrl, alt: getLocalizedString("Image to edit"), className: "image-editor__img" })), !activePlugin && onConfirm && (_jsxs(Button, { className: "image-editor__done", variant: "primary", icon: isSmall, "aria-label": isSmall ? getLocalizedString("Done") : undefined, onClick: confirm, disabled: disabled, children: [_jsx(CheckmarkIcon, { "aria-hidden": true }), !isSmall && getLocalizedString("Done")] })), history.replaying && (_jsx("div", { className: "image-editor__replay-overlay", children: _jsx(Spinner, { "aria-label": getLocalizedString("Loading") }) }))] }), _jsx("div", { className: "image-editor__toolbar", children: activePlugin ? (_jsx(ActiveToolbar, { plugin: activePlugin })) : (_jsx("div", { className: "image-editor__toolbar-group", children: plugins.map((p) => p.type === "tool" ? (_jsx(ToolButton, { plugin: p, busy: disabled, onActivate: () => activateTool(p.id), isSmall: isSmall }, p.id)) : (_jsx(ActionButton, { plugin: p, busy: disabled, onExecute: () => enqueueAction(p), isSmall: isSmall }, p.id))) })) })] }));
77
77
  // Wrap with the active tool's provider so Overlay and Toolbar share context.
78
78
  if (activePlugin) {
79
79
  let ActiveProvider = activePlugin.Provider;
@@ -1,5 +1,14 @@
1
1
  import "./Toolbar.css";
2
- export type ToolbarPortalSlot = "breadcrumbs" | "search" | "actions";
2
+ import { type To } from "react-router";
3
+ /**
4
+ * The named regions of the site toolbar an app can render into.
5
+ *
6
+ * `menu-toggle` sits at the very start of the toolbar, before the logo: it is where an app that
7
+ * has a navigation drawer of its own hangs the button that opens it. That belongs on the same
8
+ * edge as the drawer it controls — a toggle in `actions`, at the opposite end of the toolbar,
9
+ * reads as unrelated to the panel that slides in on the left.
10
+ */
11
+ export type ToolbarPortalSlot = "menu-toggle" | "breadcrumbs" | "search" | "actions";
3
12
  export type ToolbarPortalProps = {
4
13
  slot: ToolbarPortalSlot;
5
14
  children: React.ReactNode;
@@ -7,6 +16,17 @@ export type ToolbarPortalProps = {
7
16
  export declare function ToolbarPortal({ slot, children }: ToolbarPortalProps): import("react").ReactPortal | null;
8
17
  export type BreadcrumbItem = {
9
18
  label: string;
19
+ /**
20
+ * A route inside the app, followed without reloading the page. Resolved through the router, so
21
+ * it is relative to the app's basename — the article root is `"/"`, not `"/my-article"`.
22
+ *
23
+ * Requires the breadcrumbs to be rendered inside a router, which the portal preserves.
24
+ */
25
+ to?: To;
26
+ /**
27
+ * A plain URL, followed with a full page load. Use it to leave the app — the front page, or
28
+ * another article. `to` wins when both are given.
29
+ */
10
30
  href?: string;
11
31
  };
12
32
  export type ToolbarBreadcrumbsProps = {
@@ -2,13 +2,29 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import "./Toolbar.css";
3
3
  import { useEffect, useLayoutEffect, useRef, useState } from "react";
4
4
  import { createPortal } from "react-dom";
5
+ import { Link } from "react-router";
5
6
  export function ToolbarPortal({ slot, children }) {
6
- // Target element IDs: ob-toolbar-breadcrumbs, ob-toolbar-search, ob-toolbar-actions
7
+ // Target element IDs: ob-toolbar-menu-toggle, ob-toolbar-breadcrumbs, ob-toolbar-search,
8
+ // ob-toolbar-actions. Older templates do not render every slot, so a missing one is not an
9
+ // error — the app simply renders nothing there.
7
10
  const target = document.getElementById(`ob-toolbar-${slot}`);
8
11
  if (!target)
9
12
  return null;
10
13
  return createPortal(children, target);
11
14
  }
15
+ /**
16
+ * A crumb the user can follow. `to` goes through the router; `href` is an ordinary link.
17
+ *
18
+ * Either way it renders a real anchor with a real `href`, so ctrl-click, middle-click, "open in
19
+ * new tab" and the status bar all keep working — `Link` only intercepts a plain left click.
20
+ */
21
+ function BreadcrumbLink({ item }) {
22
+ if (item.to != null)
23
+ return _jsx(Link, { to: item.to, children: item.label });
24
+ if (item.href)
25
+ return _jsx("a", { href: item.href, children: item.label });
26
+ return _jsx("span", { children: item.label });
27
+ }
12
28
  function BreadcrumbsInner({ items }) {
13
29
  let [firstVisible, setFirstVisible] = useState(0);
14
30
  let [overflowOpen, setOverflowOpen] = useState(false);
@@ -53,10 +69,10 @@ function BreadcrumbsInner({ items }) {
53
69
  }, [overflowOpen]);
54
70
  let hiddenItems = items.slice(0, firstVisible);
55
71
  let visibleItems = items.slice(firstVisible);
56
- return (_jsx("nav", { className: "ob-breadcrumbs", "aria-label": "Breadcrumb", ref: navRef, children: _jsxs("ol", { className: "ob-breadcrumbs__list", ref: listRef, children: [firstVisible > 0 && (_jsxs("li", { className: "ob-breadcrumbs__item ob-breadcrumbs__overflow", ref: overflowItemRef, children: [_jsx("button", { type: "button", "aria-label": "Show hidden breadcrumbs", "aria-expanded": overflowOpen, "aria-haspopup": "true", onClick: () => setOverflowOpen((prev) => !prev), children: "\u2026" }), overflowOpen && (_jsx("ul", { className: "ob-breadcrumbs__overflow-menu", role: "menu", children: hiddenItems.map((item, index) => (_jsx("li", { role: "menuitem", children: item.href ? _jsx("a", { href: item.href, children: item.label }) : _jsx("span", { children: item.label }) }, index))) }))] })), visibleItems.map((item, index) => {
72
+ return (_jsx("nav", { className: "ob-breadcrumbs", "aria-label": "Breadcrumb", ref: navRef, children: _jsxs("ol", { className: "ob-breadcrumbs__list", ref: listRef, children: [firstVisible > 0 && (_jsxs("li", { className: "ob-breadcrumbs__item ob-breadcrumbs__overflow", ref: overflowItemRef, children: [_jsx("button", { type: "button", "aria-label": "Show hidden breadcrumbs", "aria-expanded": overflowOpen, "aria-haspopup": "true", onClick: () => setOverflowOpen((prev) => !prev), children: "\u2026" }), overflowOpen && (_jsx("ul", { className: "ob-breadcrumbs__overflow-menu", role: "menu", children: hiddenItems.map((item, index) => (_jsx("li", { role: "menuitem", children: _jsx(BreadcrumbLink, { item: item }) }, index))) }))] })), visibleItems.map((item, index) => {
57
73
  let actualIndex = firstVisible + index;
58
74
  let isCurrent = actualIndex === items.length - 1;
59
- return (_jsx("li", { className: "ob-breadcrumbs__item", children: isCurrent ? (_jsx("span", { "aria-current": "page", children: item.label })) : item.href ? (_jsx("a", { href: item.href, children: item.label })) : (_jsx("span", { children: item.label })) }, actualIndex));
75
+ return (_jsx("li", { className: "ob-breadcrumbs__item", children: isCurrent ? _jsx("span", { "aria-current": "page", children: item.label }) : _jsx(BreadcrumbLink, { item: item }) }, actualIndex));
60
76
  })] }) }));
61
77
  }
62
78
  export function ToolbarBreadcrumbs({ items }) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@olenbetong/synergi-react",
3
- "version": "3.1.0",
3
+ "version": "3.2.0",
4
4
  "description": "Standalone React component for SynergiWeb and Partner Portal",
5
5
  "type": "module",
6
6
  "exports": {
@@ -31,14 +31,16 @@
31
31
  "license": "MIT",
32
32
  "peerDependencies": {
33
33
  "@digdir/designsystemet-react": ">=1.18.0",
34
- "@mui/material": ">=9.0.0",
35
34
  "@navikt/aksel-icons": ">=8.16.1",
36
35
  "react": ">=19.2.8",
37
- "react-dom": ">=19.2.8"
36
+ "react-dom": ">=19.2.8",
37
+ "react-router": ">=8.3.0"
38
38
  },
39
39
  "sideEffects": false,
40
40
  "dependencies": {
41
41
  "@emotion/styled": "^11.14.1",
42
+ "@mui/icons-material": "9.4.0",
43
+ "@mui/material": "9.4.0",
42
44
  "clsx": "^2.1.1",
43
45
  "dynamsoft-javascript-barcode": "6.5.4",
44
46
  "filepond": "^4.32.12",
@@ -51,12 +53,12 @@
51
53
  "mitt": "^3.0.1",
52
54
  "pdf-lib": "^1.17.1",
53
55
  "pdfjs-dist": "5.7.284",
54
- "react-pdf": "^10.4.1",
55
- "@olenbetong/appframe-data": "1.6.1",
56
- "@olenbetong/appframe-core": "2.13.0",
57
- "@olenbetong/appframe-ds": "0.9.0",
58
- "@olenbetong/appframe-react": "2.1.1",
59
- "@olenbetong/appframe-mui": "6.6.2"
56
+ "react-pdf": "^10.5.0",
57
+ "@olenbetong/appframe-core": "2.13.1",
58
+ "@olenbetong/appframe-ds": "1.0.0",
59
+ "@olenbetong/appframe-react": "2.1.3",
60
+ "@olenbetong/appframe-mui": "7.0.0",
61
+ "@olenbetong/appframe-data": "1.7.0"
60
62
  },
61
63
  "repository": {
62
64
  "type": "git",
@@ -70,13 +72,13 @@
70
72
  ]
71
73
  },
72
74
  "devDependencies": {
73
- "@digdir/designsystemet-react": "1.18.0",
75
+ "@digdir/designsystemet-react": "1.21.0",
74
76
  "@navikt/aksel-icons": "8.16.1",
75
77
  "@testing-library/jest-dom": "^7.0.1",
76
78
  "@testing-library/dom": "^10.4.1",
77
- "@testing-library/react": "16.3.2",
78
- "@testing-library/user-event": "^14.6.3",
79
- "happy-dom": "^20.11.2",
79
+ "@testing-library/react": "16.3.3",
80
+ "@testing-library/user-event": "^14.6.6",
81
+ "happy-dom": "^20.12.0",
80
82
  "react": "19.2.8",
81
83
  "react-dom": "19.2.8",
82
84
  "replace-in-files": "^3.0.0"
@@ -18,7 +18,6 @@ export function AppMenuColorScheme() {
18
18
  <div className="ob-app-menu__color-scheme">
19
19
  <ToggleGroup
20
20
  data-size="sm"
21
- data-toggle-group={getLocalizedString("Theme")}
22
21
  aria-label={getLocalizedString("Theme")}
23
22
  value={preference}
24
23
  onChange={(value) => setPreference(value as ColorSchemePreference)}
@@ -2,8 +2,17 @@ import "./Toolbar.css";
2
2
 
3
3
  import { useEffect, useLayoutEffect, useRef, useState } from "react";
4
4
  import { createPortal } from "react-dom";
5
-
6
- export type ToolbarPortalSlot = "breadcrumbs" | "search" | "actions";
5
+ import { Link, type To } from "react-router";
6
+
7
+ /**
8
+ * The named regions of the site toolbar an app can render into.
9
+ *
10
+ * `menu-toggle` sits at the very start of the toolbar, before the logo: it is where an app that
11
+ * has a navigation drawer of its own hangs the button that opens it. That belongs on the same
12
+ * edge as the drawer it controls — a toggle in `actions`, at the opposite end of the toolbar,
13
+ * reads as unrelated to the panel that slides in on the left.
14
+ */
15
+ export type ToolbarPortalSlot = "menu-toggle" | "breadcrumbs" | "search" | "actions";
7
16
 
8
17
  export type ToolbarPortalProps = {
9
18
  slot: ToolbarPortalSlot;
@@ -11,7 +20,9 @@ export type ToolbarPortalProps = {
11
20
  };
12
21
 
13
22
  export function ToolbarPortal({ slot, children }: ToolbarPortalProps) {
14
- // Target element IDs: ob-toolbar-breadcrumbs, ob-toolbar-search, ob-toolbar-actions
23
+ // Target element IDs: ob-toolbar-menu-toggle, ob-toolbar-breadcrumbs, ob-toolbar-search,
24
+ // ob-toolbar-actions. Older templates do not render every slot, so a missing one is not an
25
+ // error — the app simply renders nothing there.
15
26
  const target = document.getElementById(`ob-toolbar-${slot}`);
16
27
  if (!target) return null;
17
28
  return createPortal(children, target);
@@ -19,9 +30,33 @@ export function ToolbarPortal({ slot, children }: ToolbarPortalProps) {
19
30
 
20
31
  export type BreadcrumbItem = {
21
32
  label: string;
33
+ /**
34
+ * A route inside the app, followed without reloading the page. Resolved through the router, so
35
+ * it is relative to the app's basename — the article root is `"/"`, not `"/my-article"`.
36
+ *
37
+ * Requires the breadcrumbs to be rendered inside a router, which the portal preserves.
38
+ */
39
+ to?: To;
40
+ /**
41
+ * A plain URL, followed with a full page load. Use it to leave the app — the front page, or
42
+ * another article. `to` wins when both are given.
43
+ */
22
44
  href?: string;
23
45
  };
24
46
 
47
+ /**
48
+ * A crumb the user can follow. `to` goes through the router; `href` is an ordinary link.
49
+ *
50
+ * Either way it renders a real anchor with a real `href`, so ctrl-click, middle-click, "open in
51
+ * new tab" and the status bar all keep working — `Link` only intercepts a plain left click.
52
+ */
53
+ function BreadcrumbLink({ item }: { item: BreadcrumbItem }) {
54
+ if (item.to != null) return <Link to={item.to}>{item.label}</Link>;
55
+ if (item.href) return <a href={item.href}>{item.label}</a>;
56
+
57
+ return <span>{item.label}</span>;
58
+ }
59
+
25
60
  export type ToolbarBreadcrumbsProps = {
26
61
  items: BreadcrumbItem[];
27
62
  };
@@ -96,7 +131,7 @@ function BreadcrumbsInner({ items }: ToolbarBreadcrumbsProps) {
96
131
  {hiddenItems.map((item, index) => (
97
132
  // oxlint-disable-next-line react/no-array-index-key -- stable list with no reordering
98
133
  <li key={index} role="menuitem">
99
- {item.href ? <a href={item.href}>{item.label}</a> : <span>{item.label}</span>}
134
+ <BreadcrumbLink item={item} />
100
135
  </li>
101
136
  ))}
102
137
  </ul>
@@ -108,13 +143,7 @@ function BreadcrumbsInner({ items }: ToolbarBreadcrumbsProps) {
108
143
  let isCurrent = actualIndex === items.length - 1;
109
144
  return (
110
145
  <li key={actualIndex} className="ob-breadcrumbs__item">
111
- {isCurrent ? (
112
- <span aria-current="page">{item.label}</span>
113
- ) : item.href ? (
114
- <a href={item.href}>{item.label}</a>
115
- ) : (
116
- <span>{item.label}</span>
117
- )}
146
+ {isCurrent ? <span aria-current="page">{item.label}</span> : <BreadcrumbLink item={item} />}
118
147
  </li>
119
148
  );
120
149
  })}
@@ -0,0 +1,24 @@
1
+ import type * as ReactModule from "react";
2
+
3
+ /**
4
+ * `@digdir/designsystemet-web` registers its custom elements (`ds-tabs`,
5
+ * `ds-field`, …) in `React.JSX.IntrinsicElements` and types them with
6
+ * `ReactTypes.*` — but its bundled `index.d.ts` lost the matching
7
+ * `import type * as ReactTypes from "react"`. Those entries therefore resolve
8
+ * to an error type, which `skipLibCheck` hides while `React.ElementType`
9
+ * (a mapped type over `keyof JSX.IntrinsicElements`) silently degrades.
10
+ *
11
+ * The fallout lands on MUI, which is only pulled into the same program here:
12
+ * `<Box component="…" />` stops accepting the element's own props, and MUI
13
+ * callback parameters (`sx` theme, `onClick` event, `Tabs onChange`) turn into
14
+ * implicit `any`.
15
+ *
16
+ * Declaring the `ReactTypes` namespace globally gives that file what it is
17
+ * missing. Remove this once Designsystemet ships the import in its `.d.ts`.
18
+ */
19
+ declare global {
20
+ namespace ReactTypes {
21
+ type HTMLAttributes<T> = ReactModule.HTMLAttributes<T>;
22
+ type DetailedHTMLProps<E extends ReactModule.HTMLAttributes<T>, T> = ReactModule.DetailedHTMLProps<E, T>;
23
+ }
24
+ }