@ndla/ui 50.9.4 → 50.9.6
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/ArticleNotions.js +6 -6
- package/es/AudioPlayer/Controls.js +22 -22
- package/es/ContentPlaceholder/ContentPlaceholder.js +4 -12
- package/es/CopyParagraphButton/CopyParagraphButton.js +3 -3
- package/es/Embed/ConceptEmbed.js +13 -10
- package/es/Embed/conceptComponents.js +11 -11
- package/es/FactBox/FactBox.js +8 -24
- package/es/Filter/FilterCarousel.js +6 -5
- package/es/Footer/Footer.js +16 -20
- package/es/Footer/FooterLinks.js +12 -9
- package/es/Hero/HeroContent.js +3 -3
- package/es/LearningPaths/LearningPathMenuContent.js +6 -6
- package/es/LearningPaths/LearningPathMenuModalWrapper.js +3 -3
- package/es/LearningPaths/LearningPathSticky.js +4 -4
- package/es/Masthead/Masthead.js +4 -4
- package/es/Masthead/SkipToMainContent.js +2 -2
- package/es/MediaList/MediaList.js +10 -10
- package/es/MyNdla/Resource/Folder.js +8 -17
- package/es/NDLAFilm/FilmContentCardTags.js +3 -3
- package/es/Navigation/NavigationBox.js +14 -14
- package/es/Resource/BlockResource.js +7 -15
- package/es/Resource/ListResource.js +8 -8
- package/es/Resource/resourceComponents.js +12 -12
- package/es/ResourceGroup/ResourceItem.js +34 -37
- package/es/Search/SearchField.js +34 -13
- package/es/Search/SearchFieldForm.js +4 -4
- package/es/SearchTypeResult/SearchItem.js +7 -16
- package/es/SearchTypeResult/SearchTypeResult.js +3 -3
- package/es/SearchTypeResult/components/ItemContexts.js +6 -6
- package/es/SearchTypeResult/components/ItemResourceHeader.js +7 -7
- package/es/SnackBar/SnackbarProvider.js +3 -12
- package/es/all.css +1 -1
- package/es/locale/messages-en.js +31 -1
- package/es/locale/messages-nb.js +31 -1
- package/es/locale/messages-nn.js +31 -1
- package/es/locale/messages-se.js +31 -1
- package/es/locale/messages-sma.js +31 -1
- package/lib/Article/ArticleNotions.js +5 -5
- package/lib/AudioPlayer/Controls.js +21 -21
- package/lib/ContentPlaceholder/ContentPlaceholder.js +3 -11
- package/lib/CopyParagraphButton/CopyParagraphButton.js +2 -2
- package/lib/Embed/ConceptEmbed.js +12 -9
- package/lib/Embed/conceptComponents.js +10 -10
- package/lib/FactBox/FactBox.js +7 -23
- package/lib/Filter/FilterCarousel.js +6 -5
- package/lib/Footer/Footer.js +15 -19
- package/lib/Footer/FooterLinks.js +12 -9
- package/lib/Hero/HeroContent.js +2 -2
- package/lib/LearningPaths/LearningPathMenuContent.js +5 -5
- package/lib/LearningPaths/LearningPathMenuModalWrapper.js +2 -2
- package/lib/LearningPaths/LearningPathSticky.js +3 -3
- package/lib/Masthead/Masthead.js +3 -3
- package/lib/Masthead/SkipToMainContent.js +1 -1
- package/lib/MediaList/MediaList.js +9 -9
- package/lib/MyNdla/Resource/Folder.js +9 -16
- package/lib/NDLAFilm/FilmContentCardTags.js +2 -2
- package/lib/Navigation/NavigationBox.js +14 -14
- package/lib/Resource/BlockResource.js +6 -14
- package/lib/Resource/ListResource.js +7 -7
- package/lib/Resource/resourceComponents.js +11 -11
- package/lib/ResourceGroup/ResourceItem.js +34 -37
- package/lib/Search/SearchField.js +34 -13
- package/lib/Search/SearchFieldForm.js +3 -3
- package/lib/SearchTypeResult/SearchItem.js +8 -15
- package/lib/SearchTypeResult/SearchTypeResult.js +2 -2
- package/lib/SearchTypeResult/components/ItemContexts.js +5 -5
- package/lib/SearchTypeResult/components/ItemResourceHeader.js +6 -6
- package/lib/SnackBar/SnackbarProvider.js +4 -11
- package/lib/all.css +1 -1
- package/lib/locale/messages-en.d.ts +30 -0
- package/lib/locale/messages-en.js +31 -1
- package/lib/locale/messages-nb.d.ts +30 -0
- package/lib/locale/messages-nb.js +31 -1
- package/lib/locale/messages-nn.d.ts +30 -0
- package/lib/locale/messages-nn.js +31 -1
- package/lib/locale/messages-se.d.ts +30 -0
- package/lib/locale/messages-se.js +31 -1
- package/lib/locale/messages-sma.d.ts +30 -0
- package/lib/locale/messages-sma.js +31 -1
- package/package.json +17 -17
- package/src/Article/ArticleNotions.tsx +2 -2
- package/src/Article/component.article.scss +2 -2
- package/src/AudioPlayer/Controls.tsx +2 -2
- package/src/ContentPlaceholder/ContentPlaceholder.tsx +2 -2
- package/src/CopyParagraphButton/CopyParagraphButton.tsx +2 -2
- package/src/Embed/ConceptEmbed.tsx +9 -16
- package/src/Embed/conceptComponents.tsx +3 -3
- package/src/FactBox/FactBox.tsx +5 -5
- package/src/Figure/component.figure.scss +2 -2
- package/src/Filter/FilterCarousel.tsx +2 -1
- package/src/Filter/component.filter.scss +5 -5
- package/src/Footer/Footer.tsx +9 -6
- package/src/Footer/FooterLinks.tsx +6 -4
- package/src/Hero/HeroContent.tsx +2 -2
- package/src/LearningPaths/LearningPathMenuContent.tsx +3 -3
- package/src/LearningPaths/LearningPathMenuModalWrapper.tsx +2 -2
- package/src/LearningPaths/LearningPathSticky.tsx +2 -2
- package/src/Masthead/Masthead.tsx +2 -2
- package/src/Masthead/SkipToMainContent.tsx +2 -2
- package/src/MediaList/MediaList.tsx +3 -3
- package/src/MyNdla/Resource/Folder.tsx +2 -2
- package/src/NDLAFilm/FilmContentCardTags.tsx +3 -3
- package/src/Navigation/NavigationBox.tsx +2 -2
- package/src/Resource/BlockResource.tsx +2 -2
- package/src/Resource/ListResource.tsx +2 -2
- package/src/Resource/resourceComponents.tsx +2 -2
- package/src/ResourceGroup/ResourceItem.tsx +46 -43
- package/src/Search/SearchField.tsx +63 -15
- package/src/Search/SearchFieldForm.tsx +3 -12
- package/src/SearchTypeResult/SearchItem.tsx +3 -3
- package/src/SearchTypeResult/SearchTypeResult.tsx +2 -2
- package/src/SearchTypeResult/components/ItemContexts.tsx +2 -2
- package/src/SearchTypeResult/components/ItemResourceHeader.tsx +3 -5
- package/src/SnackBar/SnackbarProvider.tsx +2 -2
- package/src/locale/messages-en.ts +31 -0
- package/src/locale/messages-nb.ts +31 -0
- package/src/locale/messages-nn.ts +31 -0
- package/src/locale/messages-se.ts +31 -0
- package/src/locale/messages-sma.ts +31 -0
- package/src/main.scss +4 -5
- package/src/Search/component.search-field.scss +0 -122
- package/src/Search/component.search-result.scss +0 -355
- package/src/Search/component.search.scss +0 -2
|
@@ -12,7 +12,7 @@ import styled from "@emotion/styled";
|
|
|
12
12
|
import { Root as PopoverRoot, PopoverContent, PopoverTrigger, PopoverPortal } from "@radix-ui/react-popover";
|
|
13
13
|
import { Root as SliderRoot, Track, Range, SliderThumb } from "@radix-ui/react-slider";
|
|
14
14
|
import { ButtonV2, IconButtonV2 } from "@ndla/button";
|
|
15
|
-
import { breakpoints, colors, fonts, mq, spacing } from "@ndla/core";
|
|
15
|
+
import { breakpoints, colors, fonts, mq, spacing, stackOrder } from "@ndla/core";
|
|
16
16
|
import { DropdownMenu, DropdownContent, DropdownItem, DropdownTrigger } from "@ndla/dropdown-menu";
|
|
17
17
|
import { Back15, Forward15 } from "@ndla/icons/action";
|
|
18
18
|
import { Play, Pause, VolumeUp } from "@ndla/icons/common";
|
|
@@ -149,7 +149,7 @@ const VolumeList = styled(PopoverContent)`
|
|
|
149
149
|
padding: ${spacing.small};
|
|
150
150
|
border: 1px solid ${colors.brand.lighter};
|
|
151
151
|
height: 128px;
|
|
152
|
-
z-index:
|
|
152
|
+
z-index: ${stackOrder.offsetDouble};
|
|
153
153
|
`;
|
|
154
154
|
|
|
155
155
|
const VolumeSliderWrapper = styled(SliderRoot)`
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import styled from "@emotion/styled";
|
|
10
|
-
import { colors } from "@ndla/core";
|
|
10
|
+
import { colors, stackOrder } from "@ndla/core";
|
|
11
11
|
|
|
12
12
|
const Wrapper = styled.div`
|
|
13
13
|
position: fixed;
|
|
14
|
-
z-index:
|
|
14
|
+
z-index: ${stackOrder.dropdown - stackOrder.offsetSingle};
|
|
15
15
|
top: 0;
|
|
16
16
|
left: 0;
|
|
17
17
|
right: 0;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import { ReactNode, useCallback, useEffect, useMemo, useState } from "react";
|
|
10
10
|
import { useTranslation } from "react-i18next";
|
|
11
11
|
import styled from "@emotion/styled";
|
|
12
|
-
import { colors } from "@ndla/core";
|
|
12
|
+
import { colors, stackOrder } from "@ndla/core";
|
|
13
13
|
import { Link } from "@ndla/icons/common";
|
|
14
14
|
import Tooltip from "@ndla/tooltip";
|
|
15
15
|
import { copyTextToClipboard } from "@ndla/util";
|
|
@@ -23,7 +23,7 @@ const IconButton = styled.button`
|
|
|
23
23
|
top: 0.1em;
|
|
24
24
|
background: none;
|
|
25
25
|
border: 0;
|
|
26
|
-
z-index:
|
|
26
|
+
z-index: ${stackOrder.offsetSingle};
|
|
27
27
|
transition: 0.2s;
|
|
28
28
|
opacity: 0;
|
|
29
29
|
color: ${colors.brand.grey};
|
|
@@ -13,7 +13,7 @@ import { useTranslation } from "react-i18next";
|
|
|
13
13
|
import styled from "@emotion/styled";
|
|
14
14
|
import { Root, Trigger, Content, Anchor, Close, Portal } from "@radix-ui/react-popover";
|
|
15
15
|
import { IconButtonV2 } from "@ndla/button";
|
|
16
|
-
import { breakpoints, colors, mq, spacing } from "@ndla/core";
|
|
16
|
+
import { breakpoints, colors, mq, spacing, stackOrder } from "@ndla/core";
|
|
17
17
|
import { Cross } from "@ndla/icons/action";
|
|
18
18
|
import { COPYRIGHTED } from "@ndla/licenses";
|
|
19
19
|
import Tooltip from "@ndla/tooltip";
|
|
@@ -49,7 +49,7 @@ const PopoverWrapper = styled.div<PopoverPosition>`
|
|
|
49
49
|
top: 0 !important;
|
|
50
50
|
left: 0 !important;
|
|
51
51
|
width: 100vw;
|
|
52
|
-
z-index:
|
|
52
|
+
z-index: ${stackOrder.popover} !important;
|
|
53
53
|
height: 100vh;
|
|
54
54
|
min-width: 100vw !important;
|
|
55
55
|
}
|
|
@@ -196,19 +196,12 @@ const NotionButton = styled.button`
|
|
|
196
196
|
color: ${colors.notion.dark};
|
|
197
197
|
cursor: pointer;
|
|
198
198
|
&:focus,
|
|
199
|
-
&:hover
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
outline: none;
|
|
203
|
-
${BaselineIcon} {
|
|
204
|
-
border-color: transparent;
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
&:active {
|
|
199
|
+
&:hover,
|
|
200
|
+
&:active,
|
|
201
|
+
&[data-open="true"] {
|
|
209
202
|
color: ${colors.notion.dark};
|
|
210
203
|
background-color: ${colors.notion.light};
|
|
211
|
-
|
|
204
|
+
[data-baseline-icon] {
|
|
212
205
|
border-color: currentColor;
|
|
213
206
|
}
|
|
214
207
|
}
|
|
@@ -231,7 +224,7 @@ const getModalPosition = (anchor: HTMLElement) => {
|
|
|
231
224
|
const article = anchor.closest(".c-article");
|
|
232
225
|
const articlePos = article?.getBoundingClientRect();
|
|
233
226
|
const anchorPos = anchor.getBoundingClientRect();
|
|
234
|
-
return anchorPos.top - (articlePos?.top || -window.scrollY);
|
|
227
|
+
return anchorPos.top - (articlePos?.top || -window.scrollY) + 30; // add 30 so that position is under the word
|
|
235
228
|
};
|
|
236
229
|
|
|
237
230
|
export const InlineConcept = ({
|
|
@@ -272,9 +265,9 @@ export const InlineConcept = ({
|
|
|
272
265
|
<StyledAnchorSpan />
|
|
273
266
|
</StyledAnchor>
|
|
274
267
|
<Trigger asChild>
|
|
275
|
-
<NotionButton>
|
|
268
|
+
<NotionButton data-open={modalPos !== -9999}>
|
|
276
269
|
{linkText}
|
|
277
|
-
{<BaselineIcon />}
|
|
270
|
+
{<BaselineIcon data-baseline-icon />}
|
|
278
271
|
</NotionButton>
|
|
279
272
|
</Trigger>
|
|
280
273
|
<Portal container={(anchorRef.current?.closest(".c-article") as HTMLElement | null) || undefined}>
|
|
@@ -10,7 +10,7 @@ import { forwardRef, ReactNode, RefAttributes } from "react";
|
|
|
10
10
|
import { useTranslation } from "react-i18next";
|
|
11
11
|
import { css } from "@emotion/react";
|
|
12
12
|
import styled from "@emotion/styled";
|
|
13
|
-
import { breakpoints, colors, fonts, misc, mq, spacing } from "@ndla/core";
|
|
13
|
+
import { breakpoints, colors, fonts, misc, mq, spacing, stackOrder } from "@ndla/core";
|
|
14
14
|
import { COPYRIGHTED } from "@ndla/licenses";
|
|
15
15
|
import { ConceptData, ConceptVisualElementMeta } from "@ndla/types-embed";
|
|
16
16
|
import { ExternalEmbed, HeartButtonType, IframeEmbed } from ".";
|
|
@@ -87,7 +87,7 @@ const notionContentCss = css`
|
|
|
87
87
|
animation-name: animateIn;
|
|
88
88
|
animation-duration: 300ms;
|
|
89
89
|
background-color: white;
|
|
90
|
-
z-index:
|
|
90
|
+
z-index: ${stackOrder.offsetSingle};
|
|
91
91
|
box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
|
|
92
92
|
${mq.range({ from: breakpoints.tablet })} {
|
|
93
93
|
width: 500px;
|
|
@@ -98,7 +98,7 @@ const notionContentCss = css`
|
|
|
98
98
|
|
|
99
99
|
${mq.range({ until: breakpoints.tablet })} {
|
|
100
100
|
padding: ${spacing.small};
|
|
101
|
-
z-index:
|
|
101
|
+
z-index: ${stackOrder.popover};
|
|
102
102
|
height: 100%;
|
|
103
103
|
width: 100%;
|
|
104
104
|
overflow: auto;
|
package/src/FactBox/FactBox.tsx
CHANGED
|
@@ -11,7 +11,7 @@ import { useTranslation } from "react-i18next";
|
|
|
11
11
|
import { css } from "@emotion/react";
|
|
12
12
|
import styled from "@emotion/styled";
|
|
13
13
|
import { IconButtonV2 } from "@ndla/button";
|
|
14
|
-
import { breakpoints, colors, mq, spacing } from "@ndla/core";
|
|
14
|
+
import { breakpoints, colors, mq, spacing, stackOrder } from "@ndla/core";
|
|
15
15
|
import { ChevronDown, ChevronUp } from "@ndla/icons/common";
|
|
16
16
|
|
|
17
17
|
interface Props extends ComponentProps<"aside"> {
|
|
@@ -26,7 +26,7 @@ const StyledAside = styled.aside`
|
|
|
26
26
|
flex-direction: column;
|
|
27
27
|
align-items: center;
|
|
28
28
|
position: relative;
|
|
29
|
-
z-index:
|
|
29
|
+
z-index: ${stackOrder.offsetSingle};
|
|
30
30
|
margin: ${spacing.large} 0 calc(${spacing.large} - ${spacing.nsmall}) 0;
|
|
31
31
|
overflow: hidden;
|
|
32
32
|
padding-bottom: ${spacing.nsmall};
|
|
@@ -75,7 +75,7 @@ const StyledDiv = styled.div`
|
|
|
75
75
|
/* The 00 after our color is to set its opacity to 0 */
|
|
76
76
|
background: linear-gradient(${colors.brand.light}00, ${colors.white});
|
|
77
77
|
opacity: 1;
|
|
78
|
-
z-index:
|
|
78
|
+
z-index: ${stackOrder.base};
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
@media print {
|
|
@@ -102,7 +102,7 @@ const StyledDiv = styled.div`
|
|
|
102
102
|
|
|
103
103
|
const StyledIconButton = styled(IconButtonV2)`
|
|
104
104
|
margin-top: -20px;
|
|
105
|
-
z-index:
|
|
105
|
+
z-index: ${stackOrder.offsetSingle};
|
|
106
106
|
|
|
107
107
|
@media print {
|
|
108
108
|
display: none;
|
|
@@ -117,7 +117,7 @@ const expandedContentStyle = css`
|
|
|
117
117
|
max-height: 500vh;
|
|
118
118
|
&:after {
|
|
119
119
|
opacity: 0;
|
|
120
|
-
z-index:
|
|
120
|
+
z-index: ${stackOrder.hide};
|
|
121
121
|
}
|
|
122
122
|
`;
|
|
123
123
|
|
|
@@ -239,7 +239,7 @@
|
|
|
239
239
|
margin-top: $spacing--small;
|
|
240
240
|
|
|
241
241
|
[data-icon] {
|
|
242
|
-
margin-left: $spacing--
|
|
242
|
+
margin-left: $spacing--xsmall;
|
|
243
243
|
width: 18px;
|
|
244
244
|
height: 18px;
|
|
245
245
|
}
|
|
@@ -267,7 +267,7 @@
|
|
|
267
267
|
}
|
|
268
268
|
|
|
269
269
|
&__link-description {
|
|
270
|
-
margin-top: $spacing--
|
|
270
|
+
margin-top: $spacing--xsmall !important;
|
|
271
271
|
margin-bottom: 0;
|
|
272
272
|
@include font-size(14px, 25px);
|
|
273
273
|
}
|
|
@@ -11,6 +11,7 @@ import { useTranslation } from "react-i18next";
|
|
|
11
11
|
import { useSwipeable } from "react-swipeable";
|
|
12
12
|
import { css } from "@emotion/react";
|
|
13
13
|
import styled from "@emotion/styled";
|
|
14
|
+
import { stackOrder } from "@ndla/core";
|
|
14
15
|
import { ChevronLeft, ChevronRight } from "@ndla/icons/common";
|
|
15
16
|
|
|
16
17
|
interface Props {
|
|
@@ -47,7 +48,7 @@ const NavButton = styled("button")<{
|
|
|
47
48
|
position: absolute;
|
|
48
49
|
bottom: 0;
|
|
49
50
|
top: 4px;
|
|
50
|
-
z-index:
|
|
51
|
+
z-index: ${stackOrder.trigger};
|
|
51
52
|
left: 3px;
|
|
52
53
|
|
|
53
54
|
svg {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
&:not(:last-child) {
|
|
44
44
|
margin-bottom: $spacing--small;
|
|
45
45
|
@include mq(tabletWide) {
|
|
46
|
-
margin-bottom: $spacing--
|
|
46
|
+
margin-bottom: $spacing--xsmall;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
&:not(:first-child) {
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
@include mq($until: mobileWide) {
|
|
132
132
|
width: 100% !important;
|
|
133
133
|
margin: $spacing 0 0 0 !important;
|
|
134
|
-
padding: $spacing--
|
|
134
|
+
padding: $spacing--xsmall 20px;
|
|
135
135
|
background: $brand-grey--lighter;
|
|
136
136
|
flex-direction: row;
|
|
137
137
|
.c-filter__item label {
|
|
@@ -329,7 +329,7 @@
|
|
|
329
329
|
}
|
|
330
330
|
@include mq($until: mobileWide) {
|
|
331
331
|
width: 100%;
|
|
332
|
-
padding: $spacing--
|
|
332
|
+
padding: $spacing--xsmall 0;
|
|
333
333
|
justify-content: space-between;
|
|
334
334
|
min-height: 52px;
|
|
335
335
|
align-items: center;
|
|
@@ -430,7 +430,7 @@
|
|
|
430
430
|
}
|
|
431
431
|
@include mq($until: mobileWide) {
|
|
432
432
|
margin-top: 0;
|
|
433
|
-
padding: $spacing--
|
|
433
|
+
padding: $spacing--xsmall $spacing;
|
|
434
434
|
width: 100%;
|
|
435
435
|
justify-content: space-between;
|
|
436
436
|
min-height: 52px;
|
|
@@ -483,7 +483,7 @@
|
|
|
483
483
|
padding-bottom: 0;
|
|
484
484
|
flex-direction: row;
|
|
485
485
|
button {
|
|
486
|
-
margin-right: $spacing--
|
|
486
|
+
margin-right: $spacing--xsmall;
|
|
487
487
|
width: auto;
|
|
488
488
|
}
|
|
489
489
|
}
|
package/src/Footer/Footer.tsx
CHANGED
|
@@ -9,8 +9,9 @@
|
|
|
9
9
|
import { ReactNode } from "react";
|
|
10
10
|
import { useTranslation } from "react-i18next";
|
|
11
11
|
import styled from "@emotion/styled";
|
|
12
|
-
import { colors, spacing, fonts, mq, breakpoints, spacingUnit } from "@ndla/core";
|
|
12
|
+
import { colors, spacing, fonts, mq, breakpoints, spacingUnit, stackOrder } from "@ndla/core";
|
|
13
13
|
import { FooterHeaderIcon } from "@ndla/icons/common";
|
|
14
|
+
import { Text } from "@ndla/typography";
|
|
14
15
|
import FooterLinks from "./FooterLinks";
|
|
15
16
|
import FooterPrivacy from "./FooterPrivacy";
|
|
16
17
|
import { OneColumn } from "../Layout";
|
|
@@ -31,18 +32,18 @@ const StyledDiv = styled.div`
|
|
|
31
32
|
position: relative;
|
|
32
33
|
background: ${colors.brand.dark};
|
|
33
34
|
overflow: hidden;
|
|
34
|
-
z-index:
|
|
35
|
+
z-index: ${stackOrder.base};
|
|
35
36
|
&[data-margin="true"] {
|
|
36
37
|
margin-top: ${spacing.xxlarge};
|
|
37
38
|
}
|
|
38
39
|
`;
|
|
39
40
|
|
|
40
41
|
const StyledOneColumn = styled(OneColumn)`
|
|
41
|
-
z-index:
|
|
42
|
+
z-index: ${stackOrder.offsetSingle};
|
|
42
43
|
position: relative;
|
|
43
44
|
`;
|
|
44
45
|
|
|
45
|
-
const
|
|
46
|
+
const StyledText = styled(Text)`
|
|
46
47
|
${fonts.sizes(20, 1.5)};
|
|
47
48
|
margin: 0;
|
|
48
49
|
font-weight: ${fonts.weight.semibold};
|
|
@@ -101,7 +102,7 @@ const StyledHr = styled.hr`
|
|
|
101
102
|
|
|
102
103
|
const StyledLanguageWrapper = styled.div`
|
|
103
104
|
position: relative;
|
|
104
|
-
z-index:
|
|
105
|
+
z-index: ${stackOrder.offsetSingle};
|
|
105
106
|
margin-top: ${spacing.normal};
|
|
106
107
|
display: flex;
|
|
107
108
|
align-items: center;
|
|
@@ -147,7 +148,9 @@ const Footer = ({ children, commonLinks, links, languageSelector, auth, privacyL
|
|
|
147
148
|
<StyledFooterHeaderIcon />
|
|
148
149
|
</div>
|
|
149
150
|
<div>
|
|
150
|
-
<
|
|
151
|
+
<StyledText element="div" textStyle="content-alt" margin="none">
|
|
152
|
+
{t("footer.vision")}
|
|
153
|
+
</StyledText>
|
|
151
154
|
<FooterLinks commonLinks={commonLinks} links={links} />
|
|
152
155
|
</div>
|
|
153
156
|
</StyledColumns>
|
|
@@ -9,9 +9,10 @@
|
|
|
9
9
|
import { ReactNode } from "react";
|
|
10
10
|
import { useTranslation } from "react-i18next";
|
|
11
11
|
import styled from "@emotion/styled";
|
|
12
|
-
import { spacing, fonts, colors, mq, breakpoints
|
|
12
|
+
import { spacing, fonts, colors, mq, breakpoints } from "@ndla/core";
|
|
13
13
|
import { Forward, Launch } from "@ndla/icons/common";
|
|
14
14
|
import SafeLink from "@ndla/safelink";
|
|
15
|
+
import { Text } from "@ndla/typography";
|
|
15
16
|
|
|
16
17
|
const StyledLinksWrapper = styled.div`
|
|
17
18
|
display: flex;
|
|
@@ -85,10 +86,9 @@ const StyledSocialMediaLinkWrapper = styled.div`
|
|
|
85
86
|
align-items: center;
|
|
86
87
|
`;
|
|
87
88
|
|
|
88
|
-
const
|
|
89
|
+
const StyledTextLinks = styled(Text)`
|
|
89
90
|
${fonts.sizes(16, 1.5)};
|
|
90
91
|
font-weight: ${fonts.weight.semibold};
|
|
91
|
-
margin: ${spacing.xsmall} 0;
|
|
92
92
|
`;
|
|
93
93
|
|
|
94
94
|
const FooterLinks = ({ links, commonLinks }: FooterLinksProps) => {
|
|
@@ -97,7 +97,9 @@ const FooterLinks = ({ links, commonLinks }: FooterLinksProps) => {
|
|
|
97
97
|
<>
|
|
98
98
|
<StyledLinksWrapper>
|
|
99
99
|
<div>
|
|
100
|
-
<
|
|
100
|
+
<StyledTextLinks id="otherLinks" element="span" textStyle="content-alt">
|
|
101
|
+
{t("footer.linksHeader")}
|
|
102
|
+
</StyledTextLinks>
|
|
101
103
|
<StyledNav aria-labelledby="otherLinks">
|
|
102
104
|
{commonLinks?.map((link) => (
|
|
103
105
|
<div key={link.to}>
|
package/src/Hero/HeroContent.tsx
CHANGED
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import styled from "@emotion/styled";
|
|
10
|
-
import {
|
|
10
|
+
import { breakpoints, mq, spacing, stackOrder } from "@ndla/core";
|
|
11
11
|
|
|
12
12
|
export const HeroContent = styled.div`
|
|
13
13
|
display: flex;
|
|
14
14
|
flex-wrap: wrap;
|
|
15
15
|
align-items: flex-end;
|
|
16
16
|
padding: ${spacing.small} 0 ${spacing.small};
|
|
17
|
-
z-index:
|
|
17
|
+
z-index: ${stackOrder.trigger};
|
|
18
18
|
|
|
19
19
|
${mq.range({ from: breakpoints.tablet })} {
|
|
20
20
|
min-height: 90px;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
import { css } from "@emotion/react";
|
|
10
10
|
import styled from "@emotion/styled";
|
|
11
|
-
import { colors, spacing, spacingUnit, fonts, mq, breakpoints, animations, utils } from "@ndla/core";
|
|
11
|
+
import { colors, spacing, spacingUnit, fonts, mq, breakpoints, animations, utils, stackOrder } from "@ndla/core";
|
|
12
12
|
import { LearningPathRead } from "@ndla/icons/contentType";
|
|
13
13
|
import SafeLink from "@ndla/safelink";
|
|
14
14
|
import { StepProps } from "./LearningPathMenu";
|
|
@@ -136,7 +136,7 @@ const StyledMenuItem = styled.li<StyledMenuItemProps>`
|
|
|
136
136
|
|
|
137
137
|
const StyledContentType = styled.div`
|
|
138
138
|
position: relative;
|
|
139
|
-
z-index:
|
|
139
|
+
z-index: ${stackOrder.offsetSingle};
|
|
140
140
|
margin-right: ${spacingUnit * 0.75}px;
|
|
141
141
|
max-height: 35px;
|
|
142
142
|
`;
|
|
@@ -175,7 +175,7 @@ const StyledNavigation = styled.nav<StyledNavigationProps>`
|
|
|
175
175
|
a:hover,
|
|
176
176
|
a:focus {
|
|
177
177
|
position: relative;
|
|
178
|
-
z-index:
|
|
178
|
+
z-index: ${stackOrder.offsetSingle};
|
|
179
179
|
width: ${SIDE_NAV_WIDTH};
|
|
180
180
|
background: ${colors.brand.greyLighter};
|
|
181
181
|
span {
|
|
@@ -11,7 +11,7 @@ import { useTranslation } from "react-i18next";
|
|
|
11
11
|
import { css } from "@emotion/react";
|
|
12
12
|
import styled from "@emotion/styled";
|
|
13
13
|
import { ButtonV2 } from "@ndla/button";
|
|
14
|
-
import { spacing, mq, breakpoints, colors } from "@ndla/core";
|
|
14
|
+
import { spacing, mq, breakpoints, colors, stackOrder } from "@ndla/core";
|
|
15
15
|
import { LearningPath } from "@ndla/icons/contentType";
|
|
16
16
|
import { ModalHeader, ModalBody, ModalTrigger, ModalCloseButton, Modal, ModalContent } from "@ndla/modal";
|
|
17
17
|
|
|
@@ -21,7 +21,7 @@ const buttonToggleCss = css`
|
|
|
21
21
|
}
|
|
22
22
|
margin-right: auto;
|
|
23
23
|
margin-left: ${spacing.normal};
|
|
24
|
-
z-index:
|
|
24
|
+
z-index: ${stackOrder.popover};
|
|
25
25
|
svg {
|
|
26
26
|
width: 20px;
|
|
27
27
|
height: 20px;
|
|
@@ -10,7 +10,7 @@ import { ReactNode } from "react";
|
|
|
10
10
|
import { useTranslation } from "react-i18next";
|
|
11
11
|
import { css } from "@emotion/react";
|
|
12
12
|
import styled from "@emotion/styled";
|
|
13
|
-
import {
|
|
13
|
+
import { animations, breakpoints, colors, mq, spacing, stackOrder } from "@ndla/core";
|
|
14
14
|
import { Back, Forward } from "@ndla/icons/common";
|
|
15
15
|
import SafeLink from "@ndla/safelink";
|
|
16
16
|
|
|
@@ -27,7 +27,7 @@ const StyledFooter = styled.nav`
|
|
|
27
27
|
height: calc(${FOOTER_HEIGHT_MOBILE} + var(--safe-area-inset-bottom));
|
|
28
28
|
min-height: var(-webkit-fill-available);
|
|
29
29
|
position: fixed;
|
|
30
|
-
z-index:
|
|
30
|
+
z-index: ${stackOrder.offsetDouble};
|
|
31
31
|
bottom: 0;
|
|
32
32
|
left: 0;
|
|
33
33
|
right: 0;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import { ReactNode } from "react";
|
|
10
10
|
import { css } from "@emotion/react";
|
|
11
11
|
import styled from "@emotion/styled";
|
|
12
|
-
import { breakpoints, colors, fonts, mq, spacing } from "@ndla/core";
|
|
12
|
+
import { breakpoints, colors, fonts, mq, spacing, stackOrder } from "@ndla/core";
|
|
13
13
|
import SkipToMainContent from "./SkipToMainContent";
|
|
14
14
|
import { MessageBanner } from "../Messages";
|
|
15
15
|
|
|
@@ -35,7 +35,7 @@ interface StyledMastheadProps {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
const StyledMasthead = styled.div<StyledMastheadProps>`
|
|
38
|
-
z-index:
|
|
38
|
+
z-index: ${stackOrder.banner};
|
|
39
39
|
position: relative;
|
|
40
40
|
background: white;
|
|
41
41
|
border-bottom: 1px solid ${colors.brand.greyLighter};
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
import { useTranslation } from "react-i18next";
|
|
10
10
|
import styled from "@emotion/styled";
|
|
11
|
-
import { colors } from "@ndla/core";
|
|
11
|
+
import { colors, stackOrder } from "@ndla/core";
|
|
12
12
|
|
|
13
13
|
interface Props {
|
|
14
14
|
skipToMainContentId: string;
|
|
@@ -33,7 +33,7 @@ const StyledSkipToMainContent = styled.a`
|
|
|
33
33
|
border: 4px solid ${colors.brand.tertiary};
|
|
34
34
|
text-align: center;
|
|
35
35
|
font-size: 1.2em;
|
|
36
|
-
z-index:
|
|
36
|
+
z-index: ${stackOrder.popover};
|
|
37
37
|
animation-name: fadeIn;
|
|
38
38
|
animation-duration: 0.3s;
|
|
39
39
|
transform: translateY(-150%);
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
import { ComponentProps, ReactNode } from "react";
|
|
10
10
|
import styled from "@emotion/styled";
|
|
11
|
-
import { breakpoints, colors, fonts, mq, spacing } from "@ndla/core";
|
|
11
|
+
import { breakpoints, colors, fonts, mq, spacing, stackOrder } from "@ndla/core";
|
|
12
12
|
import { Launch } from "@ndla/icons/common";
|
|
13
13
|
import {
|
|
14
14
|
getLicenseByAbbreviation,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
import type { MetaType } from "@ndla/licenses";
|
|
20
20
|
import { LicenseDescription } from "@ndla/notion";
|
|
21
21
|
import SafeLink from "@ndla/safelink";
|
|
22
|
-
import {
|
|
22
|
+
import { Text } from "@ndla/typography";
|
|
23
23
|
import { uuid } from "@ndla/util";
|
|
24
24
|
|
|
25
25
|
const StyledMediaList = styled.ul`
|
|
@@ -90,7 +90,7 @@ const OpenIndicator = styled.div`
|
|
|
90
90
|
background-color: ${colors.brand.primary};
|
|
91
91
|
border-radius: 100%;
|
|
92
92
|
pointer-events: none;
|
|
93
|
-
z-index:
|
|
93
|
+
z-index: ${stackOrder.offsetSingle};
|
|
94
94
|
svg {
|
|
95
95
|
color: ${colors.white};
|
|
96
96
|
width: ${spacing.normal};
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import { ReactNode } from "react";
|
|
10
10
|
import { useTranslation } from "react-i18next";
|
|
11
11
|
import styled from "@emotion/styled";
|
|
12
|
-
import { fonts, spacing, colors, mq, breakpoints } from "@ndla/core";
|
|
12
|
+
import { fonts, spacing, colors, mq, breakpoints, stackOrder } from "@ndla/core";
|
|
13
13
|
import { FileDocumentOutline, Share } from "@ndla/icons/common";
|
|
14
14
|
import { FolderOutlined, FolderSharedOutlined } from "@ndla/icons/contentType";
|
|
15
15
|
import { ResourceTitleLink } from "../../Resource/resourceComponents";
|
|
@@ -91,7 +91,7 @@ const FolderTitle = styled.h2`
|
|
|
91
91
|
|
|
92
92
|
const MenuWrapper = styled.div`
|
|
93
93
|
display: flex;
|
|
94
|
-
z-index:
|
|
94
|
+
z-index: ${stackOrder.offsetSingle};
|
|
95
95
|
flex-direction: row;
|
|
96
96
|
align-items: center;
|
|
97
97
|
justify-content: space-between;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import styled from "@emotion/styled";
|
|
10
|
-
import { spacing, spacingUnit, colors, fonts, misc } from "@ndla/core";
|
|
10
|
+
import { spacing, spacingUnit, colors, fonts, misc, stackOrder } from "@ndla/core";
|
|
11
11
|
import { MovieResourceType } from "./types";
|
|
12
12
|
|
|
13
13
|
const StyledWrapperDiv = styled.div`
|
|
@@ -17,14 +17,14 @@ const StyledWrapperDiv = styled.div`
|
|
|
17
17
|
position: absolute;
|
|
18
18
|
bottom: 0px;
|
|
19
19
|
left: 0px;
|
|
20
|
-
z-index:
|
|
20
|
+
z-index: ${stackOrder.offsetSingle};
|
|
21
21
|
`;
|
|
22
22
|
|
|
23
23
|
const StyledMovieTags = styled.span`
|
|
24
24
|
${fonts.sizes("14px", "16px")};
|
|
25
25
|
font-weight: ${fonts.weight.semibold};
|
|
26
26
|
background: ${colors.brand.greyLight};
|
|
27
|
-
padding:
|
|
27
|
+
padding: ${spacing.xxsmall} ${spacing.xsmall};
|
|
28
28
|
border-radius: ${misc.borderRadius};
|
|
29
29
|
color: ${colors.text.primary};
|
|
30
30
|
margin-right: ${spacingUnit / 4}px;
|
|
@@ -37,11 +37,11 @@ const StyledHeading = styled(Heading)`
|
|
|
37
37
|
const StyledList = styled.ul`
|
|
38
38
|
list-style: none;
|
|
39
39
|
padding: 0;
|
|
40
|
-
display: flex;
|
|
41
|
-
flex-direction: column;
|
|
42
40
|
gap: ${spacing.xxsmall};
|
|
43
41
|
|
|
44
42
|
&[data-direction="horizontal"] {
|
|
43
|
+
display: flex;
|
|
44
|
+
flex-direction: column;
|
|
45
45
|
${mq.range({ from: breakpoints.tablet })} {
|
|
46
46
|
column-count: 2;
|
|
47
47
|
gap: 20px;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
import { ReactNode } from "react";
|
|
10
10
|
import styled from "@emotion/styled";
|
|
11
|
-
import { colors, spacing } from "@ndla/core";
|
|
11
|
+
import { colors, spacing, stackOrder } from "@ndla/core";
|
|
12
12
|
import { Text } from "@ndla/typography";
|
|
13
13
|
import {
|
|
14
14
|
CompressedTagList,
|
|
@@ -72,7 +72,7 @@ const TagsAndActionMenu = styled.div`
|
|
|
72
72
|
display: flex;
|
|
73
73
|
align-items: center;
|
|
74
74
|
justify-content: flex-end;
|
|
75
|
-
z-index:
|
|
75
|
+
z-index: ${stackOrder.offsetSingle};
|
|
76
76
|
`;
|
|
77
77
|
|
|
78
78
|
const BlockInfoWrapper = styled.div`
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
import { ReactNode } from "react";
|
|
10
10
|
import styled from "@emotion/styled";
|
|
11
|
-
import { spacing, colors, breakpoints, mq } from "@ndla/core";
|
|
11
|
+
import { spacing, colors, breakpoints, mq, stackOrder } from "@ndla/core";
|
|
12
12
|
import { Text } from "@ndla/typography";
|
|
13
13
|
import {
|
|
14
14
|
CompressedTagList,
|
|
@@ -101,7 +101,7 @@ const StyledResourceDescription = styled(Text)`
|
|
|
101
101
|
|
|
102
102
|
const TagsandActionMenu = styled.div`
|
|
103
103
|
grid-area: tags;
|
|
104
|
-
z-index:
|
|
104
|
+
z-index: ${stackOrder.offsetSingle};
|
|
105
105
|
box-sizing: content-box;
|
|
106
106
|
display: grid;
|
|
107
107
|
grid-template-columns: 1fr auto auto;
|
|
@@ -11,7 +11,7 @@ import { useTranslation } from "react-i18next";
|
|
|
11
11
|
import { css } from "@emotion/react";
|
|
12
12
|
import styled from "@emotion/styled";
|
|
13
13
|
import { IconButtonV2 } from "@ndla/button";
|
|
14
|
-
import { colors, fonts, spacing } from "@ndla/core";
|
|
14
|
+
import { colors, fonts, spacing, stackOrder } from "@ndla/core";
|
|
15
15
|
import { DropdownMenu, DropdownContent, DropdownTrigger, DropdownItem } from "@ndla/dropdown-menu";
|
|
16
16
|
import { HashTag } from "@ndla/icons/common";
|
|
17
17
|
import SafeLink, { SafeLinkButton } from "@ndla/safelink";
|
|
@@ -30,7 +30,7 @@ export const ResourceTitleLink = styled(SafeLink)`
|
|
|
30
30
|
:after {
|
|
31
31
|
content: "";
|
|
32
32
|
position: absolute;
|
|
33
|
-
z-index:
|
|
33
|
+
z-index: ${stackOrder.offsetSingle};
|
|
34
34
|
top: 0;
|
|
35
35
|
right: 0;
|
|
36
36
|
bottom: 0;
|