@ndla/ui 56.0.55-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 +3 -3
- package/dist/styles.css +7 -7
- package/es/Embed/BrightcoveEmbed.js +8 -6
- package/es/Grid/Grid.js +2 -1
- package/es/Pitch/Pitch.js +1 -1
- 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/Grid/Grid.js +2 -1
- package/lib/Pitch/Pitch.js +1 -1
- 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/Grid/Grid.tsx +3 -1
- package/src/Pitch/Pitch.stories.tsx +6 -2
- package/src/Pitch/Pitch.tsx +1 -1
- 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",
|
|
@@ -324,7 +323,8 @@
|
|
|
324
323
|
"gridColumnGap]___[value:medium",
|
|
325
324
|
"backgroundColor]___[value:background.subtle",
|
|
326
325
|
"gridTemplateColumns]___[value:repeat(2, minmax(0, 1fr))",
|
|
327
|
-
"
|
|
326
|
+
"height]___[value:100%]___[cond:& :not(div[data-parallax-cell='true']) > div[data-embed-type='pitch']",
|
|
327
|
+
"marginTop]___[value:auto]___[cond:& :not(div[data-parallax-cell='true']) > div[data-embed-type='pitch']<___>& > :last-child",
|
|
328
328
|
"gridTemplateColumns]___[value:repeat(1, minmax(0, 1fr))]___[cond:tabletDown",
|
|
329
329
|
"gridTemplateColumns]___[value:repeat(2, minmax(0, 1fr))]___[cond:tabletToDesktop",
|
|
330
330
|
"display]___[value:flex]___[cond:tabletToDesktop<___>& > div:nth-child(3):last-child",
|
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
|
}
|
|
@@ -1063,6 +1059,10 @@
|
|
|
1063
1059
|
background: var(--colors-surface-brand-1-subtle);
|
|
1064
1060
|
}
|
|
1065
1061
|
|
|
1062
|
+
.\[\&_\:not\(div\[data-parallax-cell\=\'true\'\]\)_\>_div\[data-embed-type\=\'pitch\'\]\]\:h_100\% :not(div[data-parallax-cell='true']) > div[data-embed-type='pitch'] {
|
|
1063
|
+
height: 100%;
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
1066
|
.\[\&_\>_div\]\:pos_sticky > div {
|
|
1067
1067
|
position: sticky;
|
|
1068
1068
|
}
|
|
@@ -1258,7 +1258,7 @@
|
|
|
1258
1258
|
font-weight: var(--font-weights-bold);
|
|
1259
1259
|
}
|
|
1260
1260
|
|
|
1261
|
-
.\[\&_\>
|
|
1261
|
+
.\[\&_\:not\(div\[data-parallax-cell\=\'true\'\]\)_\>_div\[data-embed-type\=\'pitch\'\]\]\:\[\&_\>_\:last-child\]\:mt_auto :not(div[data-parallax-cell='true']) > div[data-embed-type='pitch'] > :last-child {
|
|
1262
1262
|
margin-top: auto;
|
|
1263
1263
|
}
|
|
1264
1264
|
|
|
@@ -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/Grid/Grid.js
CHANGED
|
@@ -19,7 +19,8 @@ const GridContainer = styled("div", {
|
|
|
19
19
|
backgroundColor: "background.subtle",
|
|
20
20
|
minWidth: "surface.xxsmall",
|
|
21
21
|
gridTemplateColumns: "repeat(2, minmax(0, 1fr))",
|
|
22
|
-
"& > [data-embed-type='pitch']": {
|
|
22
|
+
"& :not(div[data-parallax-cell='true']) > div[data-embed-type='pitch']": {
|
|
23
|
+
height: "100%",
|
|
23
24
|
"& > :last-child": {
|
|
24
25
|
marginTop: "auto"
|
|
25
26
|
}
|
package/es/Pitch/Pitch.js
CHANGED
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/lib/Grid/Grid.js
CHANGED
|
@@ -25,7 +25,8 @@ const GridContainer = (0, _jsx2.styled)("div", {
|
|
|
25
25
|
backgroundColor: "background.subtle",
|
|
26
26
|
minWidth: "surface.xxsmall",
|
|
27
27
|
gridTemplateColumns: "repeat(2, minmax(0, 1fr))",
|
|
28
|
-
"& > [data-embed-type='pitch']": {
|
|
28
|
+
"& :not(div[data-parallax-cell='true']) > div[data-embed-type='pitch']": {
|
|
29
|
+
height: "100%",
|
|
29
30
|
"& > :last-child": {
|
|
30
31
|
marginTop: "auto"
|
|
31
32
|
}
|
package/lib/Pitch/Pitch.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ndla/ui",
|
|
3
|
-
"version": "56.0.
|
|
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
|
);
|
package/src/Grid/Grid.tsx
CHANGED
|
@@ -20,7 +20,9 @@ const GridContainer = styled("div", {
|
|
|
20
20
|
backgroundColor: "background.subtle",
|
|
21
21
|
minWidth: "surface.xxsmall",
|
|
22
22
|
gridTemplateColumns: "repeat(2, minmax(0, 1fr))",
|
|
23
|
-
|
|
23
|
+
|
|
24
|
+
"& :not(div[data-parallax-cell='true']) > div[data-embed-type='pitch']": {
|
|
25
|
+
height: "100%",
|
|
24
26
|
"& > :last-child": {
|
|
25
27
|
marginTop: "auto",
|
|
26
28
|
},
|
|
@@ -44,8 +44,12 @@ export default {
|
|
|
44
44
|
export const Default: StoryFn<typeof Pitch> = ({ ...args }) => {
|
|
45
45
|
return (
|
|
46
46
|
<Grid columns="2" background="transparent">
|
|
47
|
-
<
|
|
48
|
-
|
|
47
|
+
<div data-type="grid-cell" data-parallax-cell="false">
|
|
48
|
+
<Pitch {...args} />
|
|
49
|
+
</div>
|
|
50
|
+
<div data-type="grid-cell" data-parallax-cell="false">
|
|
51
|
+
<Pitch {...args} description="Kortere beskrivelse" />
|
|
52
|
+
</div>
|
|
49
53
|
</Grid>
|
|
50
54
|
);
|
|
51
55
|
};
|
package/src/Pitch/Pitch.tsx
CHANGED