@ndla/ui 22.1.0 → 23.0.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/es/Animation/DisplayOnPageYOffset.js +1 -1
- package/es/Article/Article.js +3 -3
- package/es/Article/ArticleByline.js +5 -6
- package/es/Breadcrumb/ActionBreadcrumb.js +3 -3
- package/es/Figure/FigureOpenDialogButton.js +1 -2
- package/es/Filter/FilterListPhone.js +1 -1
- package/es/Frontpage/FrontpageProgramMenu.js +10 -11
- package/es/NDLAFilm/AllMoviesAlphabetically.js +12 -12
- package/es/ResourceBox/ResourceBox.js +7 -35
- package/es/ResourceGroup/ResourceItem.js +13 -13
- package/es/ResourceGroup/ResourceList.js +3 -3
- package/es/Search/ActiveFilters.js +18 -18
- package/es/Search/SearchPage.js +1 -1
- package/es/SearchTypeResult/ActiveFilters.js +18 -18
- package/es/SearchTypeResult/SearchFieldHeader.js +5 -6
- package/es/TopicMenu/TopicMenu.js +1 -1
- package/es/TreeStructure/FolderItem.js +34 -29
- package/es/TreeStructure/TreeStructure.js +5 -3
- package/es/TreeStructure/TreeStructureWrapper.js +2 -2
- package/es/all.css +1 -1
- package/es/locale/messages-en.js +2 -0
- package/es/locale/messages-nb.js +2 -0
- package/es/locale/messages-nn.js +2 -0
- package/es/locale/messages-se.js +2 -0
- package/es/locale/messages-sma.js +2 -0
- package/lib/Animation/DisplayOnPageYOffset.js +2 -2
- package/lib/Article/Article.js +4 -4
- package/lib/Article/ArticleByline.js +4 -4
- package/lib/Breadcrumb/ActionBreadcrumb.js +3 -3
- package/lib/Filter/FilterListPhone.js +2 -2
- package/lib/Frontpage/FrontpageProgramMenu.js +9 -9
- package/lib/NDLAFilm/AllMoviesAlphabetically.js +13 -13
- package/lib/ResourceBox/ResourceBox.d.ts +1 -4
- package/lib/ResourceBox/ResourceBox.js +15 -35
- package/lib/ResourceGroup/ResourceItem.js +12 -14
- package/lib/ResourceGroup/ResourceList.js +2 -4
- package/lib/Search/ActiveFilters.js +30 -32
- package/lib/Search/SearchPage.js +2 -2
- package/lib/SearchTypeResult/ActiveFilters.js +37 -39
- package/lib/SearchTypeResult/SearchFieldHeader.js +6 -6
- package/lib/TopicMenu/TopicMenu.js +2 -2
- package/lib/TreeStructure/FolderItem.d.ts +1 -1
- package/lib/TreeStructure/FolderItem.js +34 -29
- package/lib/TreeStructure/TreeStructure.d.ts +0 -1
- package/lib/TreeStructure/TreeStructure.js +5 -3
- package/lib/TreeStructure/TreeStructureWrapper.js +2 -2
- package/lib/TreeStructure/types.d.ts +1 -0
- package/lib/all.css +1 -1
- package/lib/locale/messages-en.d.ts +2 -0
- package/lib/locale/messages-en.js +2 -0
- package/lib/locale/messages-nb.d.ts +2 -0
- package/lib/locale/messages-nb.js +2 -0
- package/lib/locale/messages-nn.d.ts +2 -0
- package/lib/locale/messages-nn.js +2 -0
- package/lib/locale/messages-se.d.ts +2 -0
- package/lib/locale/messages-se.js +2 -0
- package/lib/locale/messages-sma.d.ts +2 -0
- package/lib/locale/messages-sma.js +2 -0
- package/package.json +17 -16
- package/src/Animation/DisplayOnPageYOffset.tsx +1 -1
- package/src/Article/Article.tsx +1 -1
- package/src/Article/ArticleByline.tsx +1 -2
- package/src/Breadcrumb/ActionBreadcrumb.tsx +1 -2
- package/src/Figure/FigureOpenDialogButton.tsx +1 -2
- package/src/Filter/FilterListPhone.jsx +1 -1
- package/src/Frontpage/FrontpageProgramMenu.tsx +1 -2
- package/src/NDLAFilm/AllMoviesAlphabetically.tsx +1 -1
- package/src/ResourceBox/ResourceBox.tsx +1 -20
- package/src/ResourceGroup/ResourceItem.tsx +1 -1
- package/src/ResourceGroup/ResourceList.tsx +1 -1
- package/src/Search/ActiveFilters.jsx +1 -1
- package/src/Search/SearchPage.jsx +1 -1
- package/src/SearchTypeResult/ActiveFilters.tsx +1 -1
- package/src/SearchTypeResult/SearchFieldHeader.tsx +1 -2
- package/src/TopicMenu/TopicMenu.jsx +1 -1
- package/src/TreeStructure/FolderItem.tsx +7 -2
- package/src/TreeStructure/TreeStructure.tsx +2 -1
- package/src/TreeStructure/TreeStructureWrapper.tsx +9 -12
- package/src/TreeStructure/types.ts +1 -0
- package/src/locale/messages-en.ts +2 -0
- package/src/locale/messages-nb.ts +2 -0
- package/src/locale/messages-nn.ts +2 -0
- package/src/locale/messages-se.ts +2 -0
- package/src/locale/messages-sma.ts +2 -0
- package/src/main.scss +0 -1
- package/es/BackgroundImage/BackgroundImage.js +0 -27
- package/es/BackgroundImage/index.js +0 -2
- package/lib/BackgroundImage/BackgroundImage.d.ts +0 -12
- package/lib/BackgroundImage/BackgroundImage.js +0 -40
- package/lib/BackgroundImage/index.d.ts +0 -2
- package/lib/BackgroundImage/index.js +0 -13
- package/src/BackgroundImage/BackgroundImage.tsx +0 -32
- package/src/BackgroundImage/component.background-image.scss +0 -52
- package/src/BackgroundImage/index.ts +0 -3
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import BEMHelper from 'react-bem-helper';
|
|
3
|
-
|
|
4
|
-
const classes = BEMHelper('c-background-image');
|
|
5
|
-
|
|
6
|
-
type ImageType = 'mobile' | 'tablet' | 'desktop' | 'wide';
|
|
7
|
-
|
|
8
|
-
interface Props {
|
|
9
|
-
showOverlay?: boolean;
|
|
10
|
-
className?: string;
|
|
11
|
-
images: {
|
|
12
|
-
url: string;
|
|
13
|
-
types: ImageType[];
|
|
14
|
-
}[];
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const BackgroundImage = ({ images, showOverlay = false }: Props) => (
|
|
18
|
-
<div {...classes('', { showOverlay })}>
|
|
19
|
-
{images &&
|
|
20
|
-
images.map((image) =>
|
|
21
|
-
image.types.map((type) => (
|
|
22
|
-
<div
|
|
23
|
-
key={`${image.url}${type}`}
|
|
24
|
-
{...classes('background', type)}
|
|
25
|
-
style={{ backgroundImage: `url(${image.url})` }}
|
|
26
|
-
/>
|
|
27
|
-
)),
|
|
28
|
-
)}
|
|
29
|
-
</div>
|
|
30
|
-
);
|
|
31
|
-
|
|
32
|
-
export default BackgroundImage;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
.c-background-image {
|
|
2
|
-
position: absolute;
|
|
3
|
-
top: 0;
|
|
4
|
-
bottom: 0;
|
|
5
|
-
left: 0;
|
|
6
|
-
right: 0;
|
|
7
|
-
|
|
8
|
-
&--showOverlay {
|
|
9
|
-
.c-background-image__background:after {
|
|
10
|
-
content: '';
|
|
11
|
-
position: absolute;
|
|
12
|
-
width: 100%;
|
|
13
|
-
height: 100%;
|
|
14
|
-
background: rgba(0, 0, 0, 0.3);
|
|
15
|
-
z-index: 0;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
&__background {
|
|
20
|
-
position: absolute;
|
|
21
|
-
width: 100%;
|
|
22
|
-
height: 100%;
|
|
23
|
-
background-size: cover;
|
|
24
|
-
background-repeat: no-repeat;
|
|
25
|
-
background-position: center;
|
|
26
|
-
|
|
27
|
-
&--mobile {
|
|
28
|
-
display: none;
|
|
29
|
-
@include mq($from: mobile, $until: tablet) {
|
|
30
|
-
display: block;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
&--tablet {
|
|
34
|
-
display: none;
|
|
35
|
-
@include mq($from: tablet, $until: desktop) {
|
|
36
|
-
display: block;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
&--desktop {
|
|
40
|
-
display: none;
|
|
41
|
-
@include mq($from: desktop, $until: wide) {
|
|
42
|
-
display: block;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
&--wide {
|
|
46
|
-
display: none;
|
|
47
|
-
@include mq($from: wide) {
|
|
48
|
-
display: block;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|