@ndla/ui 56.0.90-alpha.0 → 56.0.92-alpha.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.
@@ -31,6 +31,13 @@ const StyledErrorWarningFill = styled(ErrorWarningFill, {
31
31
  fill: "icon.subtle"
32
32
  }
33
33
  });
34
+ const StyledPopoverContent = styled(PopoverContent, {
35
+ base: {
36
+ width: "surface.xlarge",
37
+ maxHeight: "50vh",
38
+ overflowY: "auto"
39
+ }
40
+ });
34
41
  const UuDisclaimerEmbed = _ref => {
35
42
  let {
36
43
  embed,
@@ -66,8 +73,10 @@ const UuDisclaimerEmbed = _ref => {
66
73
  children: /*#__PURE__*/_jsx(AccessibilityFill, {})
67
74
  })
68
75
  }), /*#__PURE__*/_jsx(Portal, {
69
- children: /*#__PURE__*/_jsx(PopoverContent, {
70
- children: transformedDisclaimer
76
+ children: /*#__PURE__*/_jsx(StyledPopoverContent, {
77
+ children: /*#__PURE__*/_jsx("div", {
78
+ children: transformedDisclaimer
79
+ })
71
80
  })
72
81
  })]
73
82
  }), /*#__PURE__*/_jsx("div", {
@@ -37,6 +37,13 @@ const StyledErrorWarningFill = (0, _jsx2.styled)(_icons.ErrorWarningFill, {
37
37
  fill: "icon.subtle"
38
38
  }
39
39
  });
40
+ const StyledPopoverContent = (0, _jsx2.styled)(_primitives.PopoverContent, {
41
+ base: {
42
+ width: "surface.xlarge",
43
+ maxHeight: "50vh",
44
+ overflowY: "auto"
45
+ }
46
+ });
40
47
  const UuDisclaimerEmbed = _ref => {
41
48
  let {
42
49
  embed,
@@ -72,8 +79,10 @@ const UuDisclaimerEmbed = _ref => {
72
79
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.AccessibilityFill, {})
73
80
  })
74
81
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_react.Portal, {
75
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.PopoverContent, {
76
- children: transformedDisclaimer
82
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledPopoverContent, {
83
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
84
+ children: transformedDisclaimer
85
+ })
77
86
  })
78
87
  })]
79
88
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ndla/ui",
3
- "version": "56.0.90-alpha.0",
3
+ "version": "56.0.92-alpha.0",
4
4
  "description": "UI component library for NDLA",
5
5
  "license": "GPL-3.0",
6
6
  "main": "lib/index.js",
@@ -58,5 +58,5 @@
58
58
  "publishConfig": {
59
59
  "access": "public"
60
60
  },
61
- "gitHead": "5f9b8e9db029204a71d9ba5fbd45e9f5ce4343ba"
61
+ "gitHead": "1c528e8987406a8e56d6bfa3a6ab1064684ef6ff"
62
62
  }
@@ -42,6 +42,14 @@ const StyledErrorWarningFill = styled(ErrorWarningFill, {
42
42
  },
43
43
  });
44
44
 
45
+ const StyledPopoverContent = styled(PopoverContent, {
46
+ base: {
47
+ width: "surface.xlarge",
48
+ maxHeight: "50vh",
49
+ overflowY: "auto",
50
+ },
51
+ });
52
+
45
53
  const UuDisclaimerEmbed = ({ embed, transformedDisclaimer, children }: Props) => {
46
54
  const { t } = useTranslation();
47
55
  if (embed.status === "error") {
@@ -70,7 +78,9 @@ const UuDisclaimerEmbed = ({ embed, transformedDisclaimer, children }: Props) =>
70
78
  </StyledIconButton>
71
79
  </PopoverTrigger>
72
80
  <Portal>
73
- <PopoverContent>{transformedDisclaimer}</PopoverContent>
81
+ <StyledPopoverContent>
82
+ <div>{transformedDisclaimer}</div>
83
+ </StyledPopoverContent>
74
84
  </Portal>
75
85
  </PopoverRoot>
76
86
  <div data-uu-content="">{children}</div>