@ndla/ui 25.0.0 → 25.1.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 (95) hide show
  1. package/es/Frontpage/FrontpageSearch.js +5 -3
  2. package/es/Masthead/Masthead.js +7 -7
  3. package/es/NDLAFilm/FilmSlideshow.js +7 -7
  4. package/es/NDLAFilm/NavigationArrow.js +4 -4
  5. package/es/Notion/FigureNotion.js +4 -3
  6. package/es/Notion/NotionVisualElement.js +3 -2
  7. package/es/SectionHeading/SectionHeading.js +5 -4
  8. package/es/Subject/Subject.js +109 -64
  9. package/es/Subject/SubjectAbout.js +61 -23
  10. package/es/Subject/SubjectArchive.js +109 -67
  11. package/es/Subject/SubjectCarousel.js +39 -62
  12. package/es/Subject/SubjectHeader.js +55 -25
  13. package/es/Subject/SubjectLinks.js +30 -16
  14. package/es/Subject/SubjectNewContent.js +76 -21
  15. package/es/Subject/SubjectShortcuts.js +39 -24
  16. package/es/Subject/SubjectSocial.js +20 -18
  17. package/es/all.css +1 -1
  18. package/es/index.js +1 -0
  19. package/es/locale/messages-nb.js +21 -21
  20. package/es/locale/messages-nn.js +27 -27
  21. package/es/locale/messages-se.js +22 -22
  22. package/es/locale/messages-sma.js +22 -22
  23. package/lib/Frontpage/FrontpageMultidisciplinarySubject.d.ts +5 -5
  24. package/lib/Frontpage/FrontpageSearch.js +6 -3
  25. package/lib/Frontpage/illustrations/FrontpageIllustrations.d.ts +2 -2
  26. package/lib/Masthead/Masthead.js +16 -16
  27. package/lib/MultidisciplinarySubject/Illustrations.d.ts +7 -7
  28. package/lib/NDLAFilm/FilmSlideshow.js +7 -7
  29. package/lib/NDLAFilm/NavigationArrow.js +4 -4
  30. package/lib/Notion/FigureNotion.d.ts +2 -1
  31. package/lib/Notion/FigureNotion.js +4 -3
  32. package/lib/Notion/NotionVisualElement.d.ts +1 -0
  33. package/lib/Notion/NotionVisualElement.js +3 -2
  34. package/lib/Resource/resourceComponents.d.ts +2 -2
  35. package/lib/Search/ActiveFilterContent.d.ts +1 -1
  36. package/lib/Search/ContentTypeResultStyles.d.ts +3 -3
  37. package/lib/SearchTypeResult/ActiveFilterContent.d.ts +1 -1
  38. package/lib/SectionHeading/SectionHeading.js +10 -9
  39. package/lib/Subject/Subject.d.ts +30 -82
  40. package/lib/Subject/Subject.js +90 -62
  41. package/lib/Subject/SubjectAbout.d.ts +1 -15
  42. package/lib/Subject/SubjectAbout.js +56 -25
  43. package/lib/Subject/SubjectArchive.d.ts +0 -21
  44. package/lib/Subject/SubjectArchive.js +103 -73
  45. package/lib/Subject/SubjectCarousel.d.ts +1 -31
  46. package/lib/Subject/SubjectCarousel.js +47 -76
  47. package/lib/Subject/SubjectHeader.d.ts +1 -14
  48. package/lib/Subject/SubjectHeader.js +53 -28
  49. package/lib/Subject/SubjectLinks.d.ts +1 -11
  50. package/lib/Subject/SubjectLinks.js +29 -19
  51. package/lib/Subject/SubjectNewContent.d.ts +1 -13
  52. package/lib/Subject/SubjectNewContent.js +70 -24
  53. package/lib/Subject/SubjectShortcuts.d.ts +0 -13
  54. package/lib/Subject/SubjectShortcuts.js +38 -29
  55. package/lib/Subject/SubjectSocial.d.ts +7 -22
  56. package/lib/Subject/SubjectSocial.js +19 -21
  57. package/lib/all.css +1 -1
  58. package/lib/index.d.ts +1 -0
  59. package/lib/index.js +12 -3
  60. package/lib/locale/messages-nb.js +21 -21
  61. package/lib/locale/messages-nn.js +27 -27
  62. package/lib/locale/messages-se.js +22 -22
  63. package/lib/locale/messages-sma.js +22 -22
  64. package/package.json +14 -14
  65. package/src/Frontpage/FrontpageSearch.tsx +3 -1
  66. package/src/Masthead/Masthead.tsx +1 -1
  67. package/src/NDLAFilm/FilmSlideshow.tsx +2 -0
  68. package/src/NDLAFilm/NavigationArrow.tsx +4 -4
  69. package/src/Notion/FigureNotion.tsx +5 -2
  70. package/src/Notion/NotionVisualElement.tsx +2 -0
  71. package/src/SectionHeading/SectionHeading.tsx +7 -3
  72. package/src/Subject/Subject.tsx +151 -72
  73. package/src/Subject/SubjectAbout.tsx +97 -27
  74. package/src/Subject/SubjectArchive.tsx +129 -58
  75. package/src/Subject/SubjectCarousel.tsx +42 -36
  76. package/src/Subject/SubjectHeader.tsx +75 -34
  77. package/src/Subject/SubjectLinks.tsx +21 -19
  78. package/src/Subject/SubjectNewContent.tsx +87 -32
  79. package/src/Subject/SubjectShortcuts.tsx +67 -27
  80. package/src/Subject/SubjectSocial.tsx +19 -20
  81. package/src/index.ts +2 -0
  82. package/src/locale/messages-nb.ts +21 -22
  83. package/src/locale/messages-nn.ts +27 -27
  84. package/src/locale/messages-se.ts +22 -23
  85. package/src/locale/messages-sma.ts +22 -23
  86. package/src/main.scss +0 -1
  87. package/src/Subject/component.subject-about.scss +0 -73
  88. package/src/Subject/component.subject-archive.scss +0 -92
  89. package/src/Subject/component.subject-carousel.scss +0 -32
  90. package/src/Subject/component.subject-concepts.scss +0 -37
  91. package/src/Subject/component.subject-header.scss +0 -87
  92. package/src/Subject/component.subject-links.scss +0 -14
  93. package/src/Subject/component.subject-new-content.scss +0 -82
  94. package/src/Subject/component.subject-shortcut.scss +0 -57
  95. package/src/Subject/component.subject.scss +0 -213
package/src/main.scss CHANGED
@@ -27,6 +27,5 @@
27
27
  @import 'Translation/component.translation';
28
28
  @import 'Translation/component.translation-box';
29
29
  @import 'Search/component.search';
30
- @import 'Subject/component.subject';
31
30
  @import 'Carousel/component.carousel';
32
31
  @import 'NDLAFilm/component.film-movielist';
@@ -1,73 +0,0 @@
1
- .c-subject-about {
2
- margin-bottom: $spacing--large;
3
-
4
- @include mq(tablet) {
5
- border: 1px solid $brand-grey--light;
6
- }
7
-
8
- &--fixedWidth {
9
- max-width: 350px;
10
- }
11
-
12
- &__media-wrapper {
13
- width: 100%;
14
- display: flex;
15
- justify-content: center;
16
- align-items: center;
17
- text-align: center;
18
- & > *,
19
- img {
20
- width: 100%;
21
- }
22
- @include mq(tablet) {
23
- width: 50%;
24
- min-width: 50%;
25
- }
26
- @include mq(desktop) {
27
- width: 40%;
28
- min-width: 40%;
29
- }
30
- }
31
-
32
- &--wide {
33
- margin: 40px 0;
34
- @include mq(tablet) {
35
- display: flex;
36
- margin: 80px 0;
37
- }
38
- }
39
-
40
- &__content {
41
- padding: $spacing--small 0 0 0;
42
-
43
- @include mq(tablet) {
44
- padding: $spacing;
45
- }
46
- }
47
-
48
- &__top-heading {
49
- margin: 0 0 $spacing--small 0;
50
-
51
- @include mq(tablet) {
52
- display: none;
53
- }
54
- }
55
-
56
- &__main-heading {
57
- margin: 0 0 $spacing--small 0;
58
- @include font-size(14px, 32px);
59
- text-transform: uppercase;
60
- font-weight: $font-weight-bold;
61
-
62
- display: none;
63
-
64
- @include mq(tablet) {
65
- display: block;
66
- }
67
- }
68
-
69
- &__description {
70
- margin: 0;
71
- @include font-size(16px, 26px);
72
- }
73
- }
@@ -1,92 +0,0 @@
1
- .c-subject-archive {
2
- margin-bottom: $spacing--large;
3
- display: flex;
4
- flex-direction: column;
5
-
6
- @include mq(tablet) {
7
- border: 1px solid $brand-grey--light;
8
- }
9
-
10
- &--fixedWidth {
11
- max-width: 350px;
12
- }
13
-
14
- &--animate {
15
- .c-subject-archive {
16
- &__featuring,
17
- &__archive {
18
- animation: fadeIn 0.3s ease-in-out;
19
- }
20
- }
21
- }
22
-
23
- &__media-wrapper {
24
- width: 100%;
25
-
26
- & > * {
27
- width: 100%;
28
- }
29
- }
30
-
31
- &__wrapper {
32
- // flex: 1 1 auto;
33
- display: flex;
34
- flex-flow: column;
35
- // justify-content: space-between;
36
- }
37
-
38
- &__content {
39
- padding: $spacing--small 0 0 0;
40
-
41
- @include mq(tablet) {
42
- padding: $spacing;
43
- }
44
- }
45
-
46
- &__heading {
47
- @include font-size(20px, 32px);
48
- margin: 0 0 $spacing--small 0;
49
- flex: 0 0 auto;
50
- }
51
-
52
- &__section-heading {
53
- margin: 0 0 $spacing--small 0;
54
- @include mq(tablet) {
55
- @include visually-hidden();
56
- }
57
- }
58
-
59
- &__description {
60
- margin: 0;
61
- @include font-size(16px, 26px);
62
- }
63
-
64
- &__archive-button {
65
- display: none;
66
- @extend .o-text-link;
67
- margin: $spacing--small 0 0 0;
68
- padding: $spacing--small/2 0;
69
- @include mq(tablet) {
70
- margin: $spacing--small/2 $spacing $spacing;
71
- }
72
- }
73
-
74
- &__archive {
75
- padding: 0;
76
-
77
- @include mq(tablet) {
78
- padding: $spacing--large $spacing--large 0 $spacing--large;
79
- }
80
- }
81
-
82
- &__archive-articles {
83
- list-style: none;
84
- margin: 0;
85
- padding: 0;
86
-
87
- li {
88
- @include font-size(16px, 24px);
89
- margin-bottom: $spacing--small;
90
- }
91
- }
92
- }
@@ -1,32 +0,0 @@
1
- .c-subject-carousel {
2
- margin-bottom: $spacing--large;
3
-
4
- @include mq(tablet) {
5
- margin-bottom: $subject-section-padding;
6
- }
7
-
8
- &__title {
9
- // margin-left: $spacing !important;
10
-
11
- @include mq(tablet) {
12
- margin-left: $spacing--medium !important;
13
- }
14
-
15
- @include mq(desktop) {
16
- margin-left: $spacing--large + $spacing--small !important;
17
- }
18
- }
19
-
20
- &--wideScreen {
21
- display: none;
22
- @include mq(tablet) {
23
- display: block;
24
- }
25
- }
26
-
27
- &--narrowScreen {
28
- @include mq(tablet) {
29
- display: none;
30
- }
31
- }
32
- }
@@ -1,37 +0,0 @@
1
- .c-subject-concepts {
2
- position: relative;
3
- margin-bottom: $subject-section-padding;
4
- &__list {
5
- list-style: none;
6
- display: flex;
7
- flex-direction: row;
8
- border: 1px solid $brand-color--light;
9
- padding: $spacing;
10
- margin: 0;
11
- }
12
-
13
- &__item {
14
- flex-grow: 1;
15
- text-align: center;
16
- margin: 0;
17
- position: relative;
18
- margin-bottom: 0.5em;
19
-
20
- button {
21
- background: transparent;
22
- border-bottom: none;
23
-
24
- &:hover {
25
- border-bottom: none;
26
- }
27
-
28
- .c-concept__link {
29
- @include inuit-font-size(16px);
30
- color: $brand-color--dark;
31
- font-family: $font;
32
- font-weight: $font-weight-semibold;
33
- border-bottom-width: 2px;
34
- }
35
- }
36
- }
37
- }
@@ -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
- }