@ndla/ui 10.1.0 → 11.0.1
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/es/Article/ArticleSideBar.js +5 -5
- package/es/CompetenceGoalTab/CompetenceGoalTab.js +5 -5
- package/es/ComponentCursor/ComponentCursor.js +9 -9
- package/es/Figure/FigureOpenDialogButton.js +3 -4
- package/es/Frontpage/FrontpageProgramMenu.js +10 -10
- package/es/Notion/ConceptNotion.js +3 -5
- package/es/Notion/NotionImage.js +19 -31
- package/lib/Article/ArticleSideBar.js +5 -5
- package/lib/CompetenceGoalTab/CompetenceGoalTab.js +5 -5
- package/lib/ComponentCursor/ComponentCursor.js +9 -9
- package/lib/Figure/FigureOpenDialogButton.d.ts +1 -1
- package/lib/Figure/FigureOpenDialogButton.js +6 -5
- package/lib/Frontpage/FrontpageProgramMenu.js +10 -10
- package/lib/Notion/ConceptNotion.js +3 -5
- package/lib/Notion/NotionImage.d.ts +1 -3
- package/lib/Notion/NotionImage.js +18 -31
- package/package.json +2 -2
- package/src/Article/ArticleSideBar.tsx +2 -1
- package/src/CompetenceGoalTab/CompetenceGoalTab.tsx +2 -1
- package/src/ComponentCursor/ComponentCursor.tsx +2 -1
- package/src/Figure/FigureOpenDialogButton.tsx +4 -5
- package/src/Frontpage/FrontpageProgramMenu.tsx +2 -1
- package/src/Notion/ConceptNotion.tsx +0 -2
- package/src/Notion/NotionImage.tsx +26 -37
|
@@ -17,8 +17,6 @@ var _Image = _interopRequireDefault(require("../Image"));
|
|
|
17
17
|
|
|
18
18
|
var _Figure = require("../Figure");
|
|
19
19
|
|
|
20
|
-
var _FigureNotion = _interopRequireDefault(require("./FigureNotion"));
|
|
21
|
-
|
|
22
20
|
var _core2 = require("@emotion/core");
|
|
23
21
|
|
|
24
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -34,50 +32,39 @@ var StyledImageWrapper = (0, _styledBase["default"])("div", {
|
|
|
34
32
|
label: "StyledImageWrapper"
|
|
35
33
|
})("overflow:hidden;width:260px;padding-top:", _core.spacing.small, ";", _core.mq.range({
|
|
36
34
|
until: _core.breakpoints.tabletWide
|
|
37
|
-
}), "{margin:0 auto;}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
35
|
+
}), "{margin:0 auto;}&:hover{img{transform:scale(1.1);opacity:1.1;transition-duration:0.5s;}}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIk5vdGlvbkltYWdlLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFjcUMiLCJmaWxlIjoiTm90aW9uSW1hZ2UudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb3B5cmlnaHQgKGMpIDIwMjItcHJlc2VudCwgTkRMQS5cbiAqXG4gKiBUaGlzIHNvdXJjZSBjb2RlIGlzIGxpY2Vuc2VkIHVuZGVyIHRoZSBHUEx2MyBsaWNlbnNlIGZvdW5kIGluIHRoZVxuICogTElDRU5TRSBmaWxlIGluIHRoZSByb290IGRpcmVjdG9yeSBvZiB0aGlzIHNvdXJjZSB0cmVlLiAqXG4gKi9cblxuaW1wb3J0IFJlYWN0IGZyb20gJ3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGFuaW1hdGlvbnMsIGJyZWFrcG9pbnRzLCBtcSwgc3BhY2luZyB9IGZyb20gJ0BuZGxhL2NvcmUnO1xuaW1wb3J0IHsgdXNlVHJhbnNsYXRpb24gfSBmcm9tICdyZWFjdC1pMThuZXh0JztcbmltcG9ydCBJbWFnZSBmcm9tICcuLi9JbWFnZSc7XG5pbXBvcnQgeyBGaWd1cmUsIEZpZ3VyZU9wZW5EaWFsb2dCdXR0b24gfSBmcm9t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VyZUlkID0gYGltYWdlLWZpZ3VyZS0ke2lkfWA7XG5cbiAgcmV0dXJuIChcbiAgICA8RmlndXJlIHJlc2l6ZUlmcmFtZSBpZD17aW1hZ2VGaWd1cmVJZH0gdHlwZT17J2Z1bGwtY29sdW1uJ30+XG4gICAgICA8U3R5bGVkSW1hZ2VXcmFwcGVyPlxuICAgICAgICA8U3R5bGVkSW1hZ2VcbiAgICAgICAgICBhbHQ9e2FsdH1cbiAgICAgICAgICBzcmM9e3NyY31cbiAgICAgICAgICBleHBhbmRCdXR0b249e1xuICAgICAgICAgICAgPEZpZ3VyZU9wZW5EaWFsb2dCdXR0b25cbiAgICAgICAgICAgICAgdHlwZT17dHlwZX1cbiAgICAgICAgICAgICAgbWVzc2FnZXM9e3tcbiAgICAgICAgICAgICAgICB6b29tSW1hZ2VCdXR0b25MYWJlbDogdCgnbGljZW5zZS5pbWFnZXMuaXRlbUltYWdlLnpvb21JbWFnZUJ1dHRvbkxhYmVsJyksXG4gICAgICAgICAgICAgICAgem9vbU91dEltYWdlQnV0dG9uTGFiZWw6IHQoJ2xpY2Vuc2UuaW1hZ2UuaXRlbUltYWdlLnpvb21PdXRJbWFnZUJ1dHRvbkxhYmVsJyksXG4gICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAvPlxuICAgICAgICAgIH1cbiAgICAgICAgLz5cbiAgICAgIDwvU3R5bGVkSW1hZ2VXcmFwcGVyPlxuICAgIDwvRmlndXJlPlxuICApO1xufTtcbiJdfQ== */"));
|
|
38
36
|
var StyledImage = ( /*#__PURE__*/0, _styledBase["default"])(_Image["default"], {
|
|
39
37
|
target: "e1beccco1",
|
|
40
38
|
label: "StyledImage"
|
|
41
|
-
})("object-fit:cover;max-height:162px;transition:transform ", _core.animations.durations.fast, "
|
|
39
|
+
})("object-fit:cover;max-height:162px;transition:transform ", _core.animations.durations.fast, ";", _core.mq.range({
|
|
42
40
|
until: _core.breakpoints.tabletWide
|
|
43
|
-
}), "{min-width:260px;}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
41
|
+
}), "{min-width:260px;}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIk5vdGlvbkltYWdlLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE4QmlDIiwiZmlsZSI6Ik5vdGlvbkltYWdlLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQ29weXJpZ2h0IChjKSAyMDIyLXByZXNlbnQsIE5ETEEuXG4gKlxuICogVGhpcyBzb3VyY2UgY29kZSBpcyBsaWNlbnNlZCB1bmRlciB0aGUgR1BMdjMgbGljZW5zZSBmb3VuZCBpbiB0aGVcbiAqIExJQ0VOU0UgZmlsZSBpbiB0aGUgcm9vdCBkaXJlY3Rvcnkgb2YgdGhpcyBzb3VyY2UgdHJlZS4gKlxuICovXG5cbmltcG9ydCBSZWFjdCBmcm9tICdyZWFjdCc7XG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgeyBhbmltYXRpb25zLCBicmVha3BvaW50cywgbXEsIHNwYWNpbmcgfSBmcm9tICdAbmRsYS9jb3JlJztcbmltcG9ydCB7IHVzZVRyYW5zbGF0aW9uIH0gZnJvbSAncmVhY3QtaTE4bmV4dCc7XG5pbXBvcnQgSW1hZ2UgZnJvbSAnLi4vSW1hZ2UnO1xuaW1wb3J0IHsgRmlndXJlLCBGaWd1cmVPcGVuRGlhbG9nQnV0dG9uIH0gZnJvbSAnLi4vRmlndXJlJztcblxuY29uc3QgU3R5bGVkSW1hZ2VXcmFwcGVyID0gc3R5bGVkLmRpdmBcbiAgb3ZlcmZsb3c6IGhpZGRlbjtcbiAgd2lkdGg6IDI2MHB4O1xuICBwYWRkaW5nLXRvcDogJHtzcGFjaW5nLnNtYWxsfTtcbiAgJHttcS5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3JhcHBlcj5cbiAgICAgICAgPFN0eWxlZEltYWdlXG4gICAgICAgICAgYWx0PXthbHR9XG4gICAgICAgICAgc3JjPXtzcmN9XG4gICAgICAgICAgZXhwYW5kQnV0dG9uPXtcbiAgICAgICAgICAgIDxGaWd1cmVPcGVuRGlhbG9nQnV0dG9uXG4gICAgICAgICAgICAgIHR5cGU9e3R5cGV9XG4gICAgICAgICAgICAgIG1lc3NhZ2VzPXt7XG4gICAgICAgICAgICAgICAgem9vbUltYWdlQnV0dG9uTGFiZWw6IHQoJ2xpY2Vuc2UuaW1hZ2VzLml0ZW1JbWFnZS56b29tSW1hZ2VCdXR0b25MYWJlbCcpLFxuICAgICAgICAgICAgICAgIHpvb21PdXRJbWFnZUJ1dHRvbkxhYmVsOiB0KCdsaWNlbnNlLmltYWdlLml0ZW1JbWFnZS56b29tT3V0SW1hZ2VCdXR0b25MYWJlbCcpLFxuICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgLz5cbiAgICAgICAgICB9XG4gICAgICAgIC8+XG4gICAgICA8L1N0eWxlZEltYWdlV3JhcHBlcj5cbiAgICA8L0ZpZ3VyZT5cbiAgKTtcbn07XG4iXX0= */"));
|
|
44
42
|
|
|
45
43
|
var NotionImage = function NotionImage(_ref) {
|
|
46
|
-
var _imageCopyright$licen, _imageCopyright$licen2;
|
|
47
|
-
|
|
48
44
|
var id = _ref.id,
|
|
49
45
|
src = _ref.src,
|
|
50
46
|
alt = _ref.alt,
|
|
51
|
-
imageCopyright = _ref.imageCopyright,
|
|
52
47
|
type = _ref.type;
|
|
53
48
|
|
|
54
49
|
var _useTranslation = (0, _reactI18next.useTranslation)(),
|
|
55
50
|
t = _useTranslation.t;
|
|
56
51
|
|
|
57
|
-
var imageId = "image-".concat(id);
|
|
58
52
|
var imageFigureId = "image-figure-".concat(id);
|
|
59
|
-
return (0, _core2.jsx)(
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
messages: {
|
|
75
|
-
zoomImageButtonLabel: t('license.images.itemImage.zoomImageButtonLabel'),
|
|
76
|
-
zoomOutImageButtonLabel: t('license.image.itemImage.zoomOutImageButtonLabel')
|
|
77
|
-
}
|
|
78
|
-
})
|
|
79
|
-
}));
|
|
80
|
-
});
|
|
53
|
+
return (0, _core2.jsx)(_Figure.Figure, {
|
|
54
|
+
resizeIframe: true,
|
|
55
|
+
id: imageFigureId,
|
|
56
|
+
type: 'full-column'
|
|
57
|
+
}, (0, _core2.jsx)(StyledImageWrapper, null, (0, _core2.jsx)(StyledImage, {
|
|
58
|
+
alt: alt,
|
|
59
|
+
src: src,
|
|
60
|
+
expandButton: (0, _core2.jsx)(_Figure.FigureOpenDialogButton, {
|
|
61
|
+
type: type,
|
|
62
|
+
messages: {
|
|
63
|
+
zoomImageButtonLabel: t('license.images.itemImage.zoomImageButtonLabel'),
|
|
64
|
+
zoomOutImageButtonLabel: t('license.image.itemImage.zoomOutImageButtonLabel')
|
|
65
|
+
}
|
|
66
|
+
})
|
|
67
|
+
})));
|
|
81
68
|
};
|
|
82
69
|
|
|
83
70
|
exports.NotionImage = NotionImage;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ndla/ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.0.1",
|
|
4
4
|
"description": "UI component library for NDLA.",
|
|
5
5
|
"license": "GPL-3.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
"publishConfig": {
|
|
82
82
|
"access": "public"
|
|
83
83
|
},
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "d1b3670f9f578ba1da7d49db2b9e577a4b0433cb"
|
|
85
85
|
}
|
|
@@ -24,7 +24,8 @@ type CursorWrapperProps = {
|
|
|
24
24
|
hide: boolean;
|
|
25
25
|
};
|
|
26
26
|
const CursorWrapper = styled.div<CursorWrapperProps>`
|
|
27
|
-
|
|
27
|
+
font-family: 'Shadows Into Light Two';
|
|
28
|
+
font-display: swap;
|
|
28
29
|
width: 120px;
|
|
29
30
|
font-family: 'Shadows Into Light Two', cursive;
|
|
30
31
|
margin-top: 40px;
|
|
@@ -68,7 +68,8 @@ const HighlightWrapper = styled.div`
|
|
|
68
68
|
`;
|
|
69
69
|
|
|
70
70
|
const HighlightText = styled.span`
|
|
71
|
-
|
|
71
|
+
font-family: 'Shadows Into Light Two';
|
|
72
|
+
font-display: swap;
|
|
72
73
|
display: inline-block;
|
|
73
74
|
color: ${colors.text.light};
|
|
74
75
|
transform: rotate(14deg);
|
|
@@ -10,7 +10,8 @@ type CursorStyleProps = {
|
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
const Wrapper = styled.div<CursorStyleProps>`
|
|
13
|
-
|
|
13
|
+
font-family: 'Shadows Into Light Two';
|
|
14
|
+
font-display: swap;
|
|
14
15
|
position: absolute;
|
|
15
16
|
top: -5px;
|
|
16
17
|
max-width: 155px;
|
|
@@ -19,11 +19,10 @@ interface Props {
|
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
export
|
|
22
|
+
export const FigureOpenDialogButton = ({ messages, type }: Props) => {
|
|
23
23
|
return (
|
|
24
|
-
<
|
|
24
|
+
<div
|
|
25
25
|
className="c-figure__fullscreen-btn"
|
|
26
|
-
type="button"
|
|
27
26
|
data-aria={messages.zoomImageButtonLabel}
|
|
28
27
|
data-ariaexpanded={messages.zoomOutImageButtonLabel}
|
|
29
28
|
aria-label={messages.zoomImageButtonLabel}>
|
|
@@ -32,6 +31,6 @@ export function FigureOpenDialogButton({ messages, type }: Props) {
|
|
|
32
31
|
{type === 'iframe' && <CursorClick style={{ width: '24px', height: '24px' }} />}
|
|
33
32
|
{type === 'external' && <CursorClick style={{ width: '24px', height: '24px' }} />}
|
|
34
33
|
{type === 'video' && <Play style={{ width: '24px', height: '24px' }} />}
|
|
35
|
-
</
|
|
34
|
+
</div>
|
|
36
35
|
);
|
|
37
|
-
}
|
|
36
|
+
};
|
|
@@ -36,7 +36,8 @@ const CursorPlaceholder = styled.div`
|
|
|
36
36
|
`;
|
|
37
37
|
|
|
38
38
|
const CursorWrapper = styled.div`
|
|
39
|
-
|
|
39
|
+
font-family: 'Shadows Into Light Two';
|
|
40
|
+
font-display: swap;
|
|
40
41
|
position: absolute;
|
|
41
42
|
top: -55px;
|
|
42
43
|
left: 38px;
|
|
@@ -100,7 +100,6 @@ const ConceptNotion = ({ concept, disableScripts, type, hideIconsAndAuthors }: P
|
|
|
100
100
|
id={visualElementId}
|
|
101
101
|
src={concept.visualElement.image.src}
|
|
102
102
|
alt={concept.visualElement.image.alt ?? ''}
|
|
103
|
-
imageCopyright={concept.visualElement.copyright}
|
|
104
103
|
/>
|
|
105
104
|
)}
|
|
106
105
|
</Notion>
|
|
@@ -136,7 +135,6 @@ const ConceptNotion = ({ concept, disableScripts, type, hideIconsAndAuthors }: P
|
|
|
136
135
|
id={visualElementId}
|
|
137
136
|
src={concept.image?.src}
|
|
138
137
|
alt={concept.image?.alt ?? ''}
|
|
139
|
-
imageCopyright={concept.visualElement.copyright}
|
|
140
138
|
/>
|
|
141
139
|
)}
|
|
142
140
|
</Notion>
|
|
@@ -10,9 +10,7 @@ import styled from '@emotion/styled';
|
|
|
10
10
|
import { animations, breakpoints, mq, spacing } from '@ndla/core';
|
|
11
11
|
import { useTranslation } from 'react-i18next';
|
|
12
12
|
import Image from '../Image';
|
|
13
|
-
import { FigureOpenDialogButton } from '../Figure';
|
|
14
|
-
import { Copyright } from '../types';
|
|
15
|
-
import FigureNotion from './FigureNotion';
|
|
13
|
+
import { Figure, FigureOpenDialogButton } from '../Figure';
|
|
16
14
|
|
|
17
15
|
const StyledImageWrapper = styled.div`
|
|
18
16
|
overflow: hidden;
|
|
@@ -21,17 +19,19 @@ const StyledImageWrapper = styled.div`
|
|
|
21
19
|
${mq.range({ until: breakpoints.tabletWide })} {
|
|
22
20
|
margin: 0 auto;
|
|
23
21
|
}
|
|
22
|
+
&:hover {
|
|
23
|
+
img {
|
|
24
|
+
transform: scale(1.1);
|
|
25
|
+
opacity: 1.1;
|
|
26
|
+
transition-duration: 0.5s;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
24
29
|
`;
|
|
25
30
|
|
|
26
31
|
const StyledImage = styled(Image)`
|
|
27
32
|
object-fit: cover;
|
|
28
33
|
max-height: 162px;
|
|
29
34
|
transition: transform ${animations.durations.fast};
|
|
30
|
-
&:hover {
|
|
31
|
-
transform: scale(1.1);
|
|
32
|
-
opacity: 1.1;
|
|
33
|
-
transition-duration: 0.5s;
|
|
34
|
-
}
|
|
35
35
|
${mq.range({ until: breakpoints.tabletWide })} {
|
|
36
36
|
min-width: 260px;
|
|
37
37
|
}
|
|
@@ -42,40 +42,29 @@ interface Props {
|
|
|
42
42
|
id: string;
|
|
43
43
|
src: string;
|
|
44
44
|
alt: string;
|
|
45
|
-
imageCopyright?: Partial<Copyright>;
|
|
46
45
|
}
|
|
47
|
-
export const NotionImage = ({ id, src, alt,
|
|
46
|
+
export const NotionImage = ({ id, src, alt, type }: Props) => {
|
|
48
47
|
const { t } = useTranslation();
|
|
49
48
|
|
|
50
|
-
const imageId = `image-${id}`;
|
|
51
49
|
const imageFigureId = `image-figure-${id}`;
|
|
52
50
|
|
|
53
51
|
return (
|
|
54
|
-
<
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
zoomImageButtonLabel: t('license.images.itemImage.zoomImageButtonLabel'),
|
|
72
|
-
zoomOutImageButtonLabel: t('license.image.itemImage.zoomOutImageButtonLabel'),
|
|
73
|
-
}}
|
|
74
|
-
/>
|
|
75
|
-
}
|
|
76
|
-
/>
|
|
77
|
-
</StyledImageWrapper>
|
|
78
|
-
)}
|
|
79
|
-
</FigureNotion>
|
|
52
|
+
<Figure resizeIframe id={imageFigureId} type={'full-column'}>
|
|
53
|
+
<StyledImageWrapper>
|
|
54
|
+
<StyledImage
|
|
55
|
+
alt={alt}
|
|
56
|
+
src={src}
|
|
57
|
+
expandButton={
|
|
58
|
+
<FigureOpenDialogButton
|
|
59
|
+
type={type}
|
|
60
|
+
messages={{
|
|
61
|
+
zoomImageButtonLabel: t('license.images.itemImage.zoomImageButtonLabel'),
|
|
62
|
+
zoomOutImageButtonLabel: t('license.image.itemImage.zoomOutImageButtonLabel'),
|
|
63
|
+
}}
|
|
64
|
+
/>
|
|
65
|
+
}
|
|
66
|
+
/>
|
|
67
|
+
</StyledImageWrapper>
|
|
68
|
+
</Figure>
|
|
80
69
|
);
|
|
81
70
|
};
|