@ndla/ui 56.0.88-alpha.0 → 56.0.90-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.
- package/dist/panda.buildinfo.json +2 -2
- package/dist/styles.css +9 -6
- package/es/Embed/ExternalEmbed.js +1 -2
- package/es/Embed/GlossEmbed.js +5 -1
- package/es/Embed/UuDisclaimerEmbed.js +3 -7
- package/lib/Embed/ExternalEmbed.js +1 -2
- package/lib/Embed/GlossEmbed.js +5 -1
- package/lib/Embed/UuDisclaimerEmbed.js +2 -6
- package/lib/types.d.ts +1 -0
- package/package.json +2 -2
- package/src/Embed/ExternalEmbed.tsx +1 -2
- package/src/Embed/GlossEmbed.tsx +15 -2
- package/src/Embed/UuDisclaimerEmbed.tsx +2 -5
- package/src/types.ts +1 -0
|
@@ -224,8 +224,7 @@
|
|
|
224
224
|
"backgroundColor]___[value:surface.brand.2.subtle",
|
|
225
225
|
"borderRadius]___[value:xxsmall",
|
|
226
226
|
"borderColor]___[value:stroke.info",
|
|
227
|
-
"
|
|
228
|
-
"whiteSpace]___[value:nowrap",
|
|
227
|
+
"lineClamp]___[value:1",
|
|
229
228
|
"inset]___[value:0]___[cond:_before",
|
|
230
229
|
"zIndex]___[value:0]___[cond:_before",
|
|
231
230
|
"textStyle]___[value:label.xsmall]___[cond:& a",
|
|
@@ -352,6 +351,7 @@
|
|
|
352
351
|
"whiteSpace]___[value:pre-wrap]___[cond:mobileWideDown<___>_open",
|
|
353
352
|
"maxHeight]___[value:none]___[cond:mobileWideDown<___>_open",
|
|
354
353
|
"display]___[value:none]___[cond:mobileWide",
|
|
354
|
+
"whiteSpace]___[value:nowrap",
|
|
355
355
|
"textDecoration]___[value:none]___[cond:_focusWithin",
|
|
356
356
|
"display]___[value:none]___[cond:mobileWideDown<___>_disabled",
|
|
357
357
|
"textDecoration]___[value:underline]___[cond:& h3",
|
package/dist/styles.css
CHANGED
|
@@ -453,12 +453,11 @@
|
|
|
453
453
|
border-radius: xxsmall;
|
|
454
454
|
}
|
|
455
455
|
|
|
456
|
-
.
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
white-space: nowrap;
|
|
456
|
+
.lc_1 {
|
|
457
|
+
overflow: hidden;
|
|
458
|
+
display: -webkit-box;
|
|
459
|
+
-webkit-line-clamp: 1;
|
|
460
|
+
-webkit-box-orient: vertical;
|
|
462
461
|
}
|
|
463
462
|
|
|
464
463
|
.z_docked {
|
|
@@ -545,6 +544,10 @@
|
|
|
545
544
|
white-space: pre-wrap;
|
|
546
545
|
}
|
|
547
546
|
|
|
547
|
+
.white-space_nowrap {
|
|
548
|
+
white-space: nowrap;
|
|
549
|
+
}
|
|
550
|
+
|
|
548
551
|
.c_icon\.strong {
|
|
549
552
|
color: var(--colors-icon-strong);
|
|
550
553
|
}
|
package/es/Embed/GlossEmbed.js
CHANGED
|
@@ -57,7 +57,9 @@ export const GlossEmbed = _ref => {
|
|
|
57
57
|
children: /*#__PURE__*/_jsx(Gloss, {
|
|
58
58
|
glossData: concept.glossData,
|
|
59
59
|
title: concept.title,
|
|
60
|
-
audio: audio
|
|
60
|
+
audio: audio,
|
|
61
|
+
exampleIds: embed.embedData.exampleIds,
|
|
62
|
+
exampleLangs: embed.embedData.exampleLangs
|
|
61
63
|
})
|
|
62
64
|
})
|
|
63
65
|
})
|
|
@@ -70,6 +72,8 @@ export const GlossEmbed = _ref => {
|
|
|
70
72
|
glossData: concept.glossData,
|
|
71
73
|
title: concept.title,
|
|
72
74
|
audio: audio,
|
|
75
|
+
exampleIds: embed.embedData.exampleIds,
|
|
76
|
+
exampleLangs: embed.embedData.exampleLangs,
|
|
73
77
|
variant: "bordered"
|
|
74
78
|
})
|
|
75
79
|
});
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import { useTranslation } from "react-i18next";
|
|
10
10
|
import { Portal } from "@ark-ui/react";
|
|
11
11
|
import { AccessibilityFill, ErrorWarningFill } from "@ndla/icons";
|
|
12
|
-
import { IconButton, PopoverContent, PopoverRoot, PopoverTrigger
|
|
12
|
+
import { IconButton, PopoverContent, PopoverRoot, PopoverTrigger } from "@ndla/primitives";
|
|
13
13
|
import { styled } from "@ndla/styled-system/jsx";
|
|
14
14
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
15
|
const DisclaimerWrapper = styled("div", {
|
|
@@ -66,12 +66,8 @@ const UuDisclaimerEmbed = _ref => {
|
|
|
66
66
|
children: /*#__PURE__*/_jsx(AccessibilityFill, {})
|
|
67
67
|
})
|
|
68
68
|
}), /*#__PURE__*/_jsx(Portal, {
|
|
69
|
-
children: /*#__PURE__*/
|
|
70
|
-
children:
|
|
71
|
-
children: t("uuDisclaimer.title")
|
|
72
|
-
}), /*#__PURE__*/_jsx("div", {
|
|
73
|
-
children: transformedDisclaimer
|
|
74
|
-
})]
|
|
69
|
+
children: /*#__PURE__*/_jsx(PopoverContent, {
|
|
70
|
+
children: transformedDisclaimer
|
|
75
71
|
})
|
|
76
72
|
})]
|
|
77
73
|
}), /*#__PURE__*/_jsx("div", {
|
package/lib/Embed/GlossEmbed.js
CHANGED
|
@@ -64,7 +64,9 @@ const GlossEmbed = _ref => {
|
|
|
64
64
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Gloss.Gloss, {
|
|
65
65
|
glossData: concept.glossData,
|
|
66
66
|
title: concept.title,
|
|
67
|
-
audio: audio
|
|
67
|
+
audio: audio,
|
|
68
|
+
exampleIds: embed.embedData.exampleIds,
|
|
69
|
+
exampleLangs: embed.embedData.exampleLangs
|
|
68
70
|
})
|
|
69
71
|
})
|
|
70
72
|
})
|
|
@@ -77,6 +79,8 @@ const GlossEmbed = _ref => {
|
|
|
77
79
|
glossData: concept.glossData,
|
|
78
80
|
title: concept.title,
|
|
79
81
|
audio: audio,
|
|
82
|
+
exampleIds: embed.embedData.exampleIds,
|
|
83
|
+
exampleLangs: embed.embedData.exampleLangs,
|
|
80
84
|
variant: "bordered"
|
|
81
85
|
})
|
|
82
86
|
});
|
|
@@ -72,12 +72,8 @@ const UuDisclaimerEmbed = _ref => {
|
|
|
72
72
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.AccessibilityFill, {})
|
|
73
73
|
})
|
|
74
74
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_react.Portal, {
|
|
75
|
-
children: /*#__PURE__*/(0, _jsxRuntime.
|
|
76
|
-
children:
|
|
77
|
-
children: t("uuDisclaimer.title")
|
|
78
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
79
|
-
children: transformedDisclaimer
|
|
80
|
-
})]
|
|
75
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.PopoverContent, {
|
|
76
|
+
children: transformedDisclaimer
|
|
81
77
|
})
|
|
82
78
|
})]
|
|
83
79
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
package/lib/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ndla/ui",
|
|
3
|
-
"version": "56.0.
|
|
3
|
+
"version": "56.0.90-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": "
|
|
61
|
+
"gitHead": "5f9b8e9db029204a71d9ba5fbd45e9f5ce4343ba"
|
|
62
62
|
}
|
package/src/Embed/GlossEmbed.tsx
CHANGED
|
@@ -53,7 +53,13 @@ export const GlossEmbed = ({ embed }: Props) => {
|
|
|
53
53
|
<Portal>
|
|
54
54
|
<StyledPopoverContent ref={contentRef}>
|
|
55
55
|
<Figure>
|
|
56
|
-
<Gloss
|
|
56
|
+
<Gloss
|
|
57
|
+
glossData={concept.glossData}
|
|
58
|
+
title={concept.title}
|
|
59
|
+
audio={audio}
|
|
60
|
+
exampleIds={embed.embedData.exampleIds}
|
|
61
|
+
exampleLangs={embed.embedData.exampleLangs}
|
|
62
|
+
/>
|
|
57
63
|
</Figure>
|
|
58
64
|
</StyledPopoverContent>
|
|
59
65
|
</Portal>
|
|
@@ -63,7 +69,14 @@ export const GlossEmbed = ({ embed }: Props) => {
|
|
|
63
69
|
|
|
64
70
|
return (
|
|
65
71
|
<Figure data-embed-type="gloss">
|
|
66
|
-
<Gloss
|
|
72
|
+
<Gloss
|
|
73
|
+
glossData={concept.glossData}
|
|
74
|
+
title={concept.title}
|
|
75
|
+
audio={audio}
|
|
76
|
+
exampleIds={embed.embedData.exampleIds}
|
|
77
|
+
exampleLangs={embed.embedData.exampleLangs}
|
|
78
|
+
variant="bordered"
|
|
79
|
+
/>
|
|
67
80
|
</Figure>
|
|
68
81
|
);
|
|
69
82
|
};
|
|
@@ -10,7 +10,7 @@ import { type ReactNode } from "react";
|
|
|
10
10
|
import { useTranslation } from "react-i18next";
|
|
11
11
|
import { Portal } from "@ark-ui/react";
|
|
12
12
|
import { AccessibilityFill, ErrorWarningFill } from "@ndla/icons";
|
|
13
|
-
import { IconButton, PopoverContent, PopoverRoot, PopoverTrigger
|
|
13
|
+
import { IconButton, PopoverContent, PopoverRoot, PopoverTrigger } from "@ndla/primitives";
|
|
14
14
|
import { styled } from "@ndla/styled-system/jsx";
|
|
15
15
|
import type { UuDisclaimerMetaData } from "@ndla/types-embed";
|
|
16
16
|
|
|
@@ -70,10 +70,7 @@ const UuDisclaimerEmbed = ({ embed, transformedDisclaimer, children }: Props) =>
|
|
|
70
70
|
</StyledIconButton>
|
|
71
71
|
</PopoverTrigger>
|
|
72
72
|
<Portal>
|
|
73
|
-
<PopoverContent>
|
|
74
|
-
<PopoverTitle>{t("uuDisclaimer.title")}</PopoverTitle>
|
|
75
|
-
<div>{transformedDisclaimer}</div>
|
|
76
|
-
</PopoverContent>
|
|
73
|
+
<PopoverContent>{transformedDisclaimer}</PopoverContent>
|
|
77
74
|
</Portal>
|
|
78
75
|
</PopoverRoot>
|
|
79
76
|
<div data-uu-content="">{children}</div>
|