@ndla/ui 25.0.1 → 25.2.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.
Files changed (159) hide show
  1. package/es/Article/ArticleFavoritesButton.js +2 -1
  2. package/es/Frontpage/FrontpageHeader.js +7 -5
  3. package/es/Frontpage/FrontpageProgramMenu.js +12 -10
  4. package/es/Frontpage/FrontpageSearch.js +5 -3
  5. package/es/Image/Image.js +5 -4
  6. package/es/LanguageSelector/LanguageSelector.js +31 -26
  7. package/es/Masthead/Masthead.js +8 -8
  8. package/es/Masthead/MastheadAuthModal.js +11 -11
  9. package/es/Masthead/MastheadSearchModal.js +9 -11
  10. package/es/NDLAFilm/AboutNdlaFilm.js +3 -3
  11. package/es/NDLAFilm/FilmSlideshow.js +7 -7
  12. package/es/NDLAFilm/NavigationArrow.js +4 -4
  13. package/es/Navigation/NavigationHeading.js +9 -6
  14. package/es/Navigation/NavigationTopicAbout.js +15 -14
  15. package/es/Notion/FigureNotion.js +4 -3
  16. package/es/Notion/NotionVisualElement.js +3 -2
  17. package/es/Programme/Programme.js +10 -7
  18. package/es/Search/SearchField.js +4 -3
  19. package/es/Search/SearchFieldForm.js +4 -3
  20. package/es/Search/ToggleSearchButton.js +3 -3
  21. package/es/SectionHeading/SectionHeading.js +4 -3
  22. package/es/Subject/Subject.js +109 -64
  23. package/es/Subject/SubjectAbout.js +61 -23
  24. package/es/Subject/SubjectArchive.js +109 -67
  25. package/es/Subject/SubjectCarousel.js +39 -62
  26. package/es/Subject/SubjectHeader.js +55 -25
  27. package/es/Subject/SubjectLinks.js +30 -16
  28. package/es/Subject/SubjectNewContent.js +76 -21
  29. package/es/Subject/SubjectShortcuts.js +39 -24
  30. package/es/Subject/SubjectSocial.js +20 -18
  31. package/es/TagSelector/SuggestionInput.js +8 -8
  32. package/es/Topic/Topic.js +21 -20
  33. package/es/TopicMenu/TopicMenu.js +22 -13
  34. package/es/TopicMenu/TopicMenuButton.js +5 -5
  35. package/es/all.css +1 -1
  36. package/es/index.js +1 -0
  37. package/es/locale/messages-nb.js +23 -23
  38. package/es/locale/messages-nn.js +29 -29
  39. package/es/locale/messages-se.js +24 -24
  40. package/es/locale/messages-sma.js +24 -24
  41. package/lib/Article/ArticleFavoritesButton.js +2 -1
  42. package/lib/Frontpage/FrontpageHeader.js +7 -5
  43. package/lib/Frontpage/FrontpageMultidisciplinarySubject.d.ts +5 -5
  44. package/lib/Frontpage/FrontpageProgramMenu.js +12 -10
  45. package/lib/Frontpage/FrontpageSearch.js +6 -3
  46. package/lib/Frontpage/illustrations/FrontpageIllustrations.d.ts +2 -2
  47. package/lib/Image/Image.d.ts +1 -1
  48. package/lib/Image/Image.js +5 -4
  49. package/lib/LanguageSelector/LanguageSelector.d.ts +1 -1
  50. package/lib/LanguageSelector/LanguageSelector.js +31 -26
  51. package/lib/Masthead/Masthead.js +8 -8
  52. package/lib/Masthead/MastheadAuthModal.js +11 -11
  53. package/lib/Masthead/MastheadSearchModal.js +9 -11
  54. package/lib/MultidisciplinarySubject/Illustrations.d.ts +7 -7
  55. package/lib/NDLAFilm/AboutNdlaFilm.js +4 -4
  56. package/lib/NDLAFilm/FilmSlideshow.js +7 -7
  57. package/lib/NDLAFilm/NavigationArrow.js +4 -4
  58. package/lib/Navigation/NavigationHeading.d.ts +2 -1
  59. package/lib/Navigation/NavigationHeading.js +9 -6
  60. package/lib/Navigation/NavigationTopicAbout.js +15 -14
  61. package/lib/Notion/FigureNotion.d.ts +2 -1
  62. package/lib/Notion/FigureNotion.js +4 -3
  63. package/lib/Notion/NotionVisualElement.d.ts +1 -0
  64. package/lib/Notion/NotionVisualElement.js +3 -2
  65. package/lib/Programme/Programme.d.ts +2 -1
  66. package/lib/Programme/Programme.js +10 -7
  67. package/lib/Resource/resourceComponents.d.ts +2 -2
  68. package/lib/Search/ActiveFilterContent.d.ts +1 -1
  69. package/lib/Search/ContentTypeResultStyles.d.ts +3 -3
  70. package/lib/Search/SearchField.js +4 -3
  71. package/lib/Search/SearchFieldForm.js +4 -3
  72. package/lib/Search/ToggleSearchButton.js +3 -3
  73. package/lib/SearchTypeResult/ActiveFilterContent.d.ts +1 -1
  74. package/lib/SectionHeading/SectionHeading.js +4 -3
  75. package/lib/Subject/Subject.d.ts +30 -82
  76. package/lib/Subject/Subject.js +90 -62
  77. package/lib/Subject/SubjectAbout.d.ts +1 -15
  78. package/lib/Subject/SubjectAbout.js +56 -25
  79. package/lib/Subject/SubjectArchive.d.ts +0 -21
  80. package/lib/Subject/SubjectArchive.js +103 -73
  81. package/lib/Subject/SubjectCarousel.d.ts +1 -31
  82. package/lib/Subject/SubjectCarousel.js +47 -76
  83. package/lib/Subject/SubjectHeader.d.ts +1 -14
  84. package/lib/Subject/SubjectHeader.js +53 -28
  85. package/lib/Subject/SubjectLinks.d.ts +1 -11
  86. package/lib/Subject/SubjectLinks.js +29 -19
  87. package/lib/Subject/SubjectNewContent.d.ts +1 -13
  88. package/lib/Subject/SubjectNewContent.js +70 -24
  89. package/lib/Subject/SubjectShortcuts.d.ts +0 -13
  90. package/lib/Subject/SubjectShortcuts.js +38 -29
  91. package/lib/Subject/SubjectSocial.d.ts +7 -22
  92. package/lib/Subject/SubjectSocial.js +19 -21
  93. package/lib/TagSelector/SuggestionInput.js +8 -8
  94. package/lib/Topic/Topic.js +21 -20
  95. package/lib/TopicMenu/TopicMenu.js +47 -39
  96. package/lib/TopicMenu/TopicMenuButton.js +6 -6
  97. package/lib/all.css +1 -1
  98. package/lib/index.d.ts +1 -0
  99. package/lib/index.js +12 -3
  100. package/lib/locale/messages-nb.js +23 -23
  101. package/lib/locale/messages-nn.js +29 -29
  102. package/lib/locale/messages-se.js +24 -24
  103. package/lib/locale/messages-sma.js +24 -24
  104. package/package.json +14 -14
  105. package/src/Article/ArticleFavoritesButton.tsx +2 -1
  106. package/src/Frontpage/FrontpageHeader.tsx +1 -1
  107. package/src/Frontpage/FrontpageProgramMenu.tsx +1 -1
  108. package/src/Frontpage/FrontpageSearch.tsx +3 -1
  109. package/src/Image/Image.tsx +1 -1
  110. package/src/LanguageSelector/LanguageSelector.tsx +21 -23
  111. package/src/Masthead/Masthead.tsx +2 -0
  112. package/src/Masthead/MastheadAuthModal.tsx +16 -16
  113. package/src/Masthead/MastheadSearchModal.tsx +6 -23
  114. package/src/NDLAFilm/AboutNdlaFilm.tsx +2 -2
  115. package/src/NDLAFilm/FilmSlideshow.tsx +2 -0
  116. package/src/NDLAFilm/NavigationArrow.tsx +4 -4
  117. package/src/Navigation/NavigationHeading.tsx +3 -2
  118. package/src/Navigation/NavigationTopicAbout.tsx +1 -0
  119. package/src/Notion/FigureNotion.tsx +5 -2
  120. package/src/Notion/NotionVisualElement.tsx +2 -0
  121. package/src/Programme/Programme.tsx +11 -2
  122. package/src/Search/SearchField.tsx +6 -1
  123. package/src/Search/SearchFieldForm.tsx +1 -1
  124. package/src/Search/ToggleSearchButton.tsx +2 -2
  125. package/src/SectionHeading/SectionHeading.tsx +6 -2
  126. package/src/Subject/Subject.tsx +151 -72
  127. package/src/Subject/SubjectAbout.tsx +97 -27
  128. package/src/Subject/SubjectArchive.tsx +129 -58
  129. package/src/Subject/SubjectCarousel.tsx +42 -36
  130. package/src/Subject/SubjectHeader.tsx +75 -34
  131. package/src/Subject/SubjectLinks.tsx +21 -19
  132. package/src/Subject/SubjectNewContent.tsx +87 -32
  133. package/src/Subject/SubjectShortcuts.tsx +67 -27
  134. package/src/Subject/SubjectSocial.tsx +19 -20
  135. package/src/TagSelector/SuggestionInput.tsx +1 -1
  136. package/src/Topic/Topic.tsx +1 -0
  137. package/src/TopicMenu/TopicMenu.jsx +23 -17
  138. package/src/TopicMenu/TopicMenuButton.jsx +6 -7
  139. package/src/index.ts +2 -0
  140. package/src/locale/messages-nb.ts +22 -23
  141. package/src/locale/messages-nn.ts +28 -28
  142. package/src/locale/messages-se.ts +23 -24
  143. package/src/locale/messages-sma.ts +23 -24
  144. package/src/main.scss +0 -2
  145. package/es/Article/ArticleAuthorContent.js +0 -71
  146. package/lib/Article/ArticleAuthorContent.d.ts +0 -28
  147. package/lib/Article/ArticleAuthorContent.js +0 -88
  148. package/src/.DS_Store +0 -0
  149. package/src/Article/ArticleAuthorContent.tsx +0 -107
  150. package/src/Article/component.article-author-popup.scss +0 -90
  151. package/src/Subject/component.subject-about.scss +0 -73
  152. package/src/Subject/component.subject-archive.scss +0 -92
  153. package/src/Subject/component.subject-carousel.scss +0 -32
  154. package/src/Subject/component.subject-concepts.scss +0 -37
  155. package/src/Subject/component.subject-header.scss +0 -87
  156. package/src/Subject/component.subject-links.scss +0 -14
  157. package/src/Subject/component.subject-new-content.scss +0 -82
  158. package/src/Subject/component.subject-shortcut.scss +0 -57
  159. package/src/Subject/component.subject.scss +0 -213
@@ -1,87 +0,0 @@
1
- .c-subject-header {
2
- width: 100%;
3
- position: relative;
4
- min-height: 180px;
5
- display: flex;
6
- justify-content: flex-start;
7
- background: $brand-color;
8
-
9
- @include mq(tablet) {
10
- height: 320px;
11
- align-items: center;
12
- }
13
-
14
- &__background {
15
- position: absolute;
16
- width: 100%;
17
- height: 100%;
18
- top: 0%;
19
- background-size: cover;
20
- background-repeat: no-repeat;
21
- background-position: center right;
22
- opacity: 0.5;
23
-
24
- &--mobile {
25
- display: none;
26
- @include mq($from: mobile, $until: tablet) {
27
- display: block;
28
- }
29
- }
30
- &--tablet {
31
- display: none;
32
- @include mq($from: tablet, $until: desktop) {
33
- display: block;
34
- }
35
- }
36
- &--desktop {
37
- display: none;
38
- @include mq($from: desktop, $until: wide) {
39
- display: block;
40
- }
41
- }
42
- &--wide {
43
- display: none;
44
- @include mq($from: wide) {
45
- display: block;
46
- }
47
- }
48
- /*
49
- &:after {
50
- content: '';
51
- position: absolute;
52
- width: 100%;
53
- height: 100%;
54
- background: rgba(0, 0, 0, 0.4);
55
- z-index: 0;
56
- }
57
- */
58
- }
59
-
60
- &__heading {
61
- @include font-size(24px, 28px);
62
- color: $white;
63
- text-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
64
- margin: $spacing--medium 0 $spacing 0;
65
- font-weight: $font-weight-bold;
66
- padding: 0 $spacing;
67
-
68
- @include mq(tablet) {
69
- margin: 0;
70
- @include font-size(40px, 40px);
71
- padding: 0 0 0 $subject-margin;
72
- }
73
-
74
- @include mq(desktop) {
75
- margin: 0;
76
- @include font-size(52px, 52px);
77
- padding: 0 0 0 $subject-margin;
78
- }
79
- }
80
- &__badge {
81
- margin:$spacing--medium $spacing $spacing--medium;
82
- @include mq(tablet) {
83
- margin: 0 0 $spacing--medium;
84
- padding: 0 0 0 $subject-margin;
85
- }
86
- }
87
- }
@@ -1,14 +0,0 @@
1
- .c-subject-links {
2
- margin-bottom: $spacing--large;
3
-
4
- .c-subject-links__heading {
5
- margin: 0 0 $spacing--small 0;
6
- }
7
-
8
- &__list {
9
- margin: 0;
10
- padding: 0;
11
-
12
- list-style: none;
13
- }
14
- }
@@ -1,82 +0,0 @@
1
- .c-subject-new-content {
2
- @include mq($until: tablet) {
3
- margin-bottom: $spacing--large;
4
- }
5
-
6
- &__heading {
7
- @include mq(tabletWide) {
8
- margin-left: $spacing--large !important;
9
- }
10
- }
11
-
12
- &__list {
13
- margin: 0;
14
- padding: 0;
15
- }
16
-
17
- &__item {
18
- display: flex;
19
- align-items: center;
20
- justify-content: space-between;
21
-
22
- &:last-child {
23
- margin-bottom: 0;
24
- }
25
- }
26
-
27
- &__left-wrapper {
28
- display: flex;
29
- justify-content: flex-start;
30
- align-items: flex-start;
31
-
32
- .c-icon {
33
- width: 14px;
34
- height: 14px;
35
- margin-left: $spacing--small/2;
36
- margin-right: $spacing--small/2;
37
- }
38
-
39
- .c-content-type-badge {
40
- margin-top: 23px;
41
- @include mq($until: tabletWide) {
42
- display: none;
43
- }
44
- }
45
-
46
- .c-subject-new-content__content-link {
47
- @include mq(tabletWide) {
48
- padding-left: $spacing;
49
- }
50
- padding-bottom: $spacing--small;
51
- }
52
- }
53
-
54
- &__link {
55
- color: $brand-color--dark;
56
- font-weight: 600;
57
- @include font-size(16px, 20px);
58
- margin-bottom: $spacing--small/2;
59
-
60
- @include mq(tablet) {
61
- @include font-size(18px, 30px);
62
- }
63
- }
64
-
65
- &__topic-name,
66
- &__date {
67
- color: $text-light-color;
68
- @include font-size(14px, 18px);
69
-
70
- @include mq(tablet) {
71
- @include font-size(16px, 20px);
72
- }
73
- }
74
-
75
- &__date {
76
- align-self: flex-end;
77
-
78
- @include mq(tablet) {
79
- align-self: center;
80
- }
81
- }
82
- }
@@ -1,57 +0,0 @@
1
- .c-subject-shortcuts {
2
- margin-bottom: $spacing--large;
3
-
4
- &__list {
5
- display: flex;
6
- flex-wrap: wrap;
7
- list-style: none;
8
- margin: 0;
9
- padding: 0;
10
- }
11
-
12
- &__item {
13
- display: block;
14
- margin-right: 9px;
15
- margin-bottom: 9px;
16
-
17
- a {
18
- display: block;
19
- background: $brand-color--light;
20
- box-shadow: none;
21
- border-radius: 5px;
22
- @include font-size(18px, 23px);
23
- font-weight: 600;
24
-
25
- color: $brand-color--dark;
26
- padding: 9px 20px;
27
-
28
- &:hover,
29
- &:active,
30
- &:focus {
31
- background-color: $brand-color;
32
- color: $white;
33
- }
34
- }
35
- }
36
-
37
- &__expand-button {
38
- display: flex;
39
- background: none;
40
- border: 0;
41
- align-items: center;
42
- padding: 0;
43
- color: $brand-color;
44
- margin-top: $spacing;
45
- cursor: pointer;
46
-
47
- .c-icon {
48
- width: 18px;
49
- height: 18px;
50
- margin-right: $spacing--small/2;
51
- }
52
-
53
- span {
54
- @include font-size(14px, 18px);
55
- }
56
- }
57
- }
@@ -1,213 +0,0 @@
1
- $subject-margin: $spacing--medium + $spacing--large;
2
- $subject-section-padding: 100px;
3
-
4
- @import './component.subject-header';
5
- @import './component.subject-shortcut';
6
- @import './component.subject-links';
7
- @import './component.subject-archive';
8
- @import './component.subject-carousel';
9
- @import './component.subject-concepts';
10
- @import './component.subject-about';
11
- @import './component.subject-new-content';
12
-
13
- .c-subject-content {
14
- @include mq(tablet) {
15
- margin-bottom: $subject-section-padding;
16
- }
17
-
18
- &__breadcrumb {
19
- display: none;
20
- margin: $spacing--medium 0 0 0;
21
-
22
- @include mq(tablet) {
23
- margin-left: $subject-margin;
24
- }
25
-
26
- @include mq(tablet) {
27
- display: block;
28
- }
29
- }
30
-
31
- &__content {
32
- display: block;
33
- flex-flow: column;
34
- margin-top: $spacing--small;
35
-
36
- @include mq($from: tablet) {
37
- display: flex;
38
- > *:not(:only-child):last-child {
39
- padding-left: $subject-margin;
40
- }
41
- }
42
-
43
- // Two children or more children
44
- &:not(.c-subject-content__content--twoColumns) {
45
- @include mq(desktop) {
46
- > *:not(:only-child) {
47
- max-width: 50%;
48
- }
49
- }
50
- @include mq($until: desktop) {
51
- flex-direction: column;
52
- }
53
- @include mq($from: tablet, $until: desktop) {
54
- > *:not(:only-child):last-child {
55
- padding-left: $subject-margin;
56
- }
57
- }
58
- }
59
-
60
- @include mq(tablet) {
61
- flex-flow: row;
62
- margin-top: $spacing--large;
63
- }
64
-
65
- & > *:first-child {
66
- margin-bottom: $spacing--large;
67
- @include mq(tablet) {
68
- margin-right: 80px;
69
- }
70
- }
71
-
72
- &--twoColumns {
73
- flex-flow: column;
74
-
75
- & > *:first-child {
76
- @include mq(tablet) {
77
- margin-right: 0;
78
- }
79
- }
80
- }
81
- }
82
- }
83
-
84
- .c-subject-secondary-content {
85
- background: $brand-grey--lightest;
86
- padding: $spacing--large 0;
87
- margin-top: $spacing--large;
88
-
89
- @include mq(tablet) {
90
- padding: $subject-section-padding 0 $spacing--large;
91
- margin-bottom: 100px;
92
- margin-top: 0;
93
- }
94
- }
95
-
96
- .c-subject-sidebar-wrapper {
97
- display: block;
98
-
99
- @include mq(tablet) {
100
- flex-basis: 50%;
101
- flex-basis: 390px;
102
- flex-shrink: 0;
103
- margin: 9px 0 0 0;
104
- }
105
-
106
- margin: 0 $spacing;
107
-
108
- & > *:last-child {
109
- margin-bottom: 0;
110
- }
111
- }
112
-
113
- .c-subject-social {
114
- &__content {
115
- display: none;
116
-
117
- @include mq(tabletWide) {
118
- display: flex;
119
- }
120
- }
121
-
122
- &__section {
123
- flex-basis: 50%;
124
- &:nth-child(odd) {
125
- margin-right: $spacing;
126
- }
127
- }
128
-
129
- .fb-embedded {
130
- width: 100% !important;
131
- overflow: hidden;
132
- display: block;
133
- }
134
- }
135
-
136
- .c-subject-flex {
137
- display: flex;
138
- flex-direction: column;
139
- margin-bottom: $spacing--large;
140
-
141
- @include mq(tablet) {
142
- flex-direction: row;
143
- }
144
-
145
- &--noMargin {
146
- margin-bottom: 0;
147
- }
148
-
149
- &__child {
150
- box-sizing: border-box;
151
- padding: 0 $spacing--small;
152
-
153
- @include mq(tablet) {
154
- flex-basis: 50%;
155
- flex-grow: 1;
156
- flex-direction: row;
157
- }
158
-
159
- &:last-child {
160
- & > * {
161
- @include mq($until: tablet) {
162
- margin-bottom: 0;
163
- }
164
- }
165
- }
166
-
167
- & > * {
168
- @include mq(tablet) {
169
- margin-bottom: 0;
170
- }
171
- }
172
- }
173
- }
174
-
175
- .c-subject-section-title {
176
- margin: 0 0 $spacing--small 0;
177
-
178
- @include mq(tablet) {
179
- margin: 0 0 $spacing 0;
180
- }
181
- }
182
-
183
- .c-subject-child-content {
184
- padding: 0 $spacing;
185
- }
186
-
187
- .c-subject-topic-language-container {
188
- background: $brand-grey--lightest;
189
- padding: $spacing;
190
- margin-top: $spacing;
191
- .c-topic-shortcuts__button {
192
- background: none;
193
- }
194
- &__heading {
195
- text-transform: uppercase;
196
- @include font-size(22px, 24px);
197
- font-weight: $font-weight-bold;
198
- letter-spacing: 0.05em;
199
- margin: $spacing--small 0;
200
- }
201
- .c-topic-introduction__item {
202
- &:last-child,
203
- &:nth-last-child(2):nth-child(even) {
204
- border-bottom: 0;
205
- }
206
- }
207
- @include mq($until: tablet) {
208
- .c-topic-introduction__list {
209
- padding-left: 0;
210
- padding-right: 0;
211
- }
212
- }
213
- }