@ndla/ui 56.0.56-alpha.0 → 56.0.56
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 +1 -2
- package/dist/styles.css +2 -6
- package/es/Embed/BrightcoveEmbed.js +8 -6
- package/es/locale/messages-en.js +1 -0
- package/es/locale/messages-nb.js +1 -0
- package/es/locale/messages-nn.js +1 -0
- package/es/locale/messages-se.js +1 -0
- package/es/locale/messages-sma.js +1 -0
- package/lib/Embed/BrightcoveEmbed.js +8 -6
- package/lib/locale/messages-en.d.ts +1 -0
- package/lib/locale/messages-en.js +1 -0
- package/lib/locale/messages-nb.d.ts +1 -0
- package/lib/locale/messages-nb.js +1 -0
- package/lib/locale/messages-nn.d.ts +1 -0
- package/lib/locale/messages-nn.js +1 -0
- package/lib/locale/messages-se.d.ts +1 -0
- package/lib/locale/messages-se.js +1 -0
- package/lib/locale/messages-sma.d.ts +1 -0
- package/lib/locale/messages-sma.js +1 -0
- package/package.json +2 -2
- package/src/Embed/BrightcoveEmbed.tsx +8 -6
- package/src/locale/messages-en.ts +1 -0
- package/src/locale/messages-nb.ts +1 -0
- package/src/locale/messages-nn.ts +1 -0
- package/src/locale/messages-se.ts +1 -0
- package/src/locale/messages-sma.ts +1 -0
|
@@ -196,7 +196,7 @@
|
|
|
196
196
|
"opacity]___[value:0",
|
|
197
197
|
"cursor]___[value:pointer",
|
|
198
198
|
"opacity]___[value:1]___[cond:&:focus, &:focus-visible, &:active",
|
|
199
|
-
"
|
|
199
|
+
"marginBlockStart]___[value:3xsmall",
|
|
200
200
|
"border]___[value:0",
|
|
201
201
|
"height]___[value:auto",
|
|
202
202
|
"textStyle]___[value:label.large",
|
|
@@ -315,7 +315,6 @@
|
|
|
315
315
|
"backgroundColor]___[value:surface.infoSubtle.hover]___[cond:_hover",
|
|
316
316
|
"gap]___[value:small",
|
|
317
317
|
"paddingInline]___[value:0",
|
|
318
|
-
"marginBlockStart]___[value:3xsmall",
|
|
319
318
|
"background]___[value:surface.brand.1.subtle]___[cond:_first",
|
|
320
319
|
"borderColor]___[value:stroke.default]___[cond:_first",
|
|
321
320
|
"fontWeight]___[value:bold]___[cond:_first<___>& p",
|
package/dist/styles.css
CHANGED
|
@@ -441,8 +441,8 @@
|
|
|
441
441
|
cursor: pointer;
|
|
442
442
|
}
|
|
443
443
|
|
|
444
|
-
.
|
|
445
|
-
margin-
|
|
444
|
+
.mbs_3xsmall {
|
|
445
|
+
margin-block-start: var(--spacing-3xsmall);
|
|
446
446
|
}
|
|
447
447
|
|
|
448
448
|
.bd_0 {
|
|
@@ -565,10 +565,6 @@
|
|
|
565
565
|
padding-inline: 0;
|
|
566
566
|
}
|
|
567
567
|
|
|
568
|
-
.mbs_3xsmall {
|
|
569
|
-
margin-block-start: var(--spacing-3xsmall);
|
|
570
|
-
}
|
|
571
|
-
|
|
572
568
|
.w_surface\.3xsmall {
|
|
573
569
|
width: var(--sizes-surface-3xsmall);
|
|
574
570
|
}
|
|
@@ -17,7 +17,7 @@ import { licenseAttributes } from "../utils/licenseAttributes";
|
|
|
17
17
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
18
|
const LinkedVideoButton = styled(Button, {
|
|
19
19
|
base: {
|
|
20
|
-
|
|
20
|
+
marginBlockStart: "3xsmall"
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
23
|
const BrightcoveIframe = styled("iframe", {
|
|
@@ -118,11 +118,13 @@ const BrightcoveEmbed = _ref => {
|
|
|
118
118
|
type: "video",
|
|
119
119
|
copyright: data.copyright,
|
|
120
120
|
description: parsedDescription,
|
|
121
|
-
children:
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
121
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
122
|
+
children: !!linkedVideoId && /*#__PURE__*/_jsx(LinkedVideoButton, {
|
|
123
|
+
size: "small",
|
|
124
|
+
variant: "secondary",
|
|
125
|
+
onClick: () => setShowOriginalVideo(p => !p),
|
|
126
|
+
children: t(`figure.button.${!showOriginalVideo ? "original" : "alternative"}`)
|
|
127
|
+
})
|
|
126
128
|
})
|
|
127
129
|
})]
|
|
128
130
|
});
|
package/es/locale/messages-en.js
CHANGED
package/es/locale/messages-nb.js
CHANGED
package/es/locale/messages-nn.js
CHANGED
package/es/locale/messages-se.js
CHANGED
|
@@ -24,7 +24,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
24
24
|
|
|
25
25
|
const LinkedVideoButton = (0, _jsx2.styled)(_primitives.Button, {
|
|
26
26
|
base: {
|
|
27
|
-
|
|
27
|
+
marginBlockStart: "3xsmall"
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
30
|
const BrightcoveIframe = (0, _jsx2.styled)("iframe", {
|
|
@@ -127,11 +127,13 @@ const BrightcoveEmbed = _ref => {
|
|
|
127
127
|
type: "video",
|
|
128
128
|
copyright: data.copyright,
|
|
129
129
|
description: parsedDescription,
|
|
130
|
-
children:
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
130
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
131
|
+
children: !!linkedVideoId && /*#__PURE__*/(0, _jsxRuntime.jsx)(LinkedVideoButton, {
|
|
132
|
+
size: "small",
|
|
133
|
+
variant: "secondary",
|
|
134
|
+
onClick: () => setShowOriginalVideo(p => !p),
|
|
135
|
+
children: t(`figure.button.${!showOriginalVideo ? "original" : "alternative"}`)
|
|
136
|
+
})
|
|
135
137
|
})
|
|
136
138
|
})]
|
|
137
139
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ndla/ui",
|
|
3
|
-
"version": "56.0.56
|
|
3
|
+
"version": "56.0.56",
|
|
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": "fd1693bd3ff76f41141c5057a1954d1dff9dc190"
|
|
62
62
|
}
|
|
@@ -25,7 +25,7 @@ interface Props {
|
|
|
25
25
|
|
|
26
26
|
const LinkedVideoButton = styled(Button, {
|
|
27
27
|
base: {
|
|
28
|
-
|
|
28
|
+
marginBlockStart: "3xsmall",
|
|
29
29
|
},
|
|
30
30
|
});
|
|
31
31
|
|
|
@@ -117,11 +117,13 @@ const BrightcoveEmbed = ({ embed, renderContext = "article", lang }: Props) => {
|
|
|
117
117
|
/>
|
|
118
118
|
</div>
|
|
119
119
|
<EmbedByline type="video" copyright={data.copyright!} description={parsedDescription}>
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
120
|
+
<div>
|
|
121
|
+
{!!linkedVideoId && (
|
|
122
|
+
<LinkedVideoButton size="small" variant="secondary" onClick={() => setShowOriginalVideo((p) => !p)}>
|
|
123
|
+
{t(`figure.button.${!showOriginalVideo ? "original" : "alternative"}`)}
|
|
124
|
+
</LinkedVideoButton>
|
|
125
|
+
)}
|
|
126
|
+
</div>
|
|
125
127
|
</EmbedByline>
|
|
126
128
|
</Figure>
|
|
127
129
|
);
|