@ndla/ui 16.0.0 → 16.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 (86) hide show
  1. package/es/NDLAFilm/CategorySelect.js +51 -25
  2. package/es/NDLAFilm/FilmMovieList.js +14 -10
  3. package/es/NDLAFilm/FilmMovieSearch.js +23 -10
  4. package/es/NDLAFilm/FilmSlideshow.js +117 -19
  5. package/es/NDLAFilm/MovieGrid.js +23 -14
  6. package/es/NDLAFilm/NavigationArrow.js +33 -7
  7. package/es/NDLAFilm/SlideshowIndicator.js +27 -11
  8. package/es/NDLAFilm/filmStyles.js +23 -0
  9. package/es/Notion/ConceptNotion.js +1 -1
  10. package/es/Notion/index.js +2 -1
  11. package/es/RadioButtonGroup/RadioButtonGroup.js +28 -9
  12. package/es/Resource/resourceComponents.js +17 -9
  13. package/es/TreeStructure/FolderItem.js +39 -28
  14. package/es/TreeStructure/FolderItems.js +8 -5
  15. package/es/TreeStructure/TreeStructure.js +10 -11
  16. package/es/TreeStructure/TreeStructureWrapper.js +2 -2
  17. package/es/all.css +1 -1
  18. package/es/index.js +1 -1
  19. package/es/locale/messages-en.js +1 -1
  20. package/es/locale/messages-nb.js +1 -1
  21. package/es/locale/messages-nn.js +1 -1
  22. package/es/locale/messages-se.js +1 -1
  23. package/es/locale/messages-sma.js +1 -1
  24. package/lib/Breadcrumblist/index.d.ts +1 -0
  25. package/lib/NDLAFilm/CategorySelect.js +52 -30
  26. package/lib/NDLAFilm/FilmMovieList.js +17 -13
  27. package/lib/NDLAFilm/FilmMovieSearch.js +29 -17
  28. package/lib/NDLAFilm/FilmSlideshow.js +113 -24
  29. package/lib/NDLAFilm/MovieGrid.js +26 -16
  30. package/lib/NDLAFilm/NavigationArrow.d.ts +5 -1
  31. package/lib/NDLAFilm/NavigationArrow.js +34 -10
  32. package/lib/NDLAFilm/SlideshowIndicator.js +34 -13
  33. package/lib/NDLAFilm/filmStyles.d.ts +8 -0
  34. package/lib/NDLAFilm/filmStyles.js +38 -0
  35. package/lib/Notion/ConceptNotion.d.ts +1 -1
  36. package/lib/Notion/ConceptNotion.js +1 -1
  37. package/lib/Notion/index.d.ts +4 -1
  38. package/lib/Notion/index.js +11 -3
  39. package/lib/RadioButtonGroup/RadioButtonGroup.js +28 -13
  40. package/lib/Resource/resourceComponents.js +17 -9
  41. package/lib/TreeStructure/FolderItem.d.ts +3 -2
  42. package/lib/TreeStructure/FolderItem.js +38 -28
  43. package/lib/TreeStructure/FolderItems.d.ts +1 -1
  44. package/lib/TreeStructure/FolderItems.js +8 -5
  45. package/lib/TreeStructure/TreeStructure.d.ts +1 -1
  46. package/lib/TreeStructure/TreeStructure.js +10 -11
  47. package/lib/TreeStructure/TreeStructure.types.d.ts +6 -3
  48. package/lib/TreeStructure/TreeStructureWrapper.js +2 -2
  49. package/lib/all.css +1 -1
  50. package/lib/index.d.ts +6 -2
  51. package/lib/index.js +7 -0
  52. package/lib/locale/messages-en.js +1 -1
  53. package/lib/locale/messages-nb.js +1 -1
  54. package/lib/locale/messages-nn.js +1 -1
  55. package/lib/locale/messages-se.js +1 -1
  56. package/lib/locale/messages-sma.js +1 -1
  57. package/package.json +13 -13
  58. package/src/Breadcrumblist/{index.tsx → index.ts} +1 -0
  59. package/src/NDLAFilm/CategorySelect.tsx +110 -23
  60. package/src/NDLAFilm/FilmMovieList.tsx +13 -11
  61. package/src/NDLAFilm/FilmMovieSearch.tsx +45 -14
  62. package/src/NDLAFilm/FilmSlideshow.tsx +186 -25
  63. package/src/NDLAFilm/MovieGrid.tsx +33 -25
  64. package/src/NDLAFilm/NavigationArrow.tsx +76 -10
  65. package/src/NDLAFilm/SlideshowIndicator.tsx +53 -11
  66. package/src/NDLAFilm/component.film-movielist.scss +0 -46
  67. package/src/NDLAFilm/filmStyles.ts +33 -0
  68. package/src/Notion/ConceptNotion.tsx +2 -1
  69. package/src/Notion/index.ts +4 -1
  70. package/src/RadioButtonGroup/RadioButtonGroup.tsx +82 -11
  71. package/src/Resource/resourceComponents.tsx +1 -3
  72. package/src/TreeStructure/FolderItem.tsx +40 -19
  73. package/src/TreeStructure/FolderItems.tsx +3 -0
  74. package/src/TreeStructure/TreeStructure.tsx +7 -11
  75. package/src/TreeStructure/TreeStructure.types.ts +7 -3
  76. package/src/TreeStructure/TreeStructureWrapper.tsx +1 -1
  77. package/src/index.ts +15 -2
  78. package/src/locale/messages-en.ts +1 -1
  79. package/src/locale/messages-nb.ts +1 -1
  80. package/src/locale/messages-nn.ts +1 -1
  81. package/src/locale/messages-se.ts +1 -1
  82. package/src/locale/messages-sma.ts +1 -1
  83. package/src/main.scss +0 -3
  84. package/src/NDLAFilm/component.film-moviesearch.scss +0 -127
  85. package/src/NDLAFilm/component.film-slideshow.scss +0 -258
  86. package/src/RadioButtonGroup/component.radio-button-group.scss +0 -67
@@ -1,258 +0,0 @@
1
- .c-film-slideshow {
2
- &:hover {
3
- .c-film-slideshow__navigation-arrows {
4
- opacity: 1;
5
- transform: translate(0, 0);
6
- }
7
- }
8
- &__navigation-arrows {
9
- opacity: 0;
10
- transition: transform 800ms ease, opacity 800ms ease;
11
- display: flex;
12
- justify-content: center;
13
- flex-direction: column;
14
- position: absolute;
15
- align-items: center;
16
- z-index: 2;
17
- height: 70vw;
18
- @include mq(tablet) {
19
- height: 60vw;
20
- }
21
- @include mq(desktop) {
22
- height: 55vw;
23
- }
24
- @include mq(wide) {
25
- height: 40vw;
26
- }
27
- @include mq(ultraWide) {
28
- height: 36vw;
29
- }
30
- transform: translate($spacing--small / 2, 0);
31
- .c-icon {
32
- fill: #fff;
33
- width: 52px;
34
- height: 52px;
35
- @include mq(desktop) {
36
- width: 78px;
37
- height: 78px;
38
- }
39
- opacity: 0.7;
40
- transition: transform 400ms ease, opacity 400ms ease;
41
- }
42
- button {
43
- padding: $spacing 0;
44
- border-radius: $border-radius;
45
- outline: none;
46
- background: transparent;
47
- color: #fff;
48
- border: 0;
49
- &:hover,
50
- &:focus {
51
- .c-icon {
52
- opacity: 1;
53
- }
54
- background: rgba(0, 0, 0, 0.1);
55
- }
56
- }
57
- &--right {
58
- right: 0;
59
- transform: translate(-$spacing--small / 2, 0);
60
- }
61
- }
62
- &__slide-link-wrapper {
63
- margin: 0 auto;
64
- display: flex;
65
- justify-content: flex-start;
66
- align-items: flex-end;
67
- position: absolute;
68
- z-index: 2;
69
- height: 100vw;
70
- width: 100%;
71
- @include mq(mobileWide) {
72
- height: 100vw;
73
- }
74
- @include mq(tablet) {
75
- height: 75vw;
76
- }
77
- @include mq(desktop) {
78
- height: 55vw;
79
- }
80
- @include mq(wide) {
81
- height: 40vw;
82
- }
83
- @include mq(ultraWide) {
84
- height: 36vw;
85
- }
86
- }
87
- &__item-wrapper {
88
- display: flex;
89
- box-shadow: none;
90
- &--text {
91
- display: flex;
92
- transition: all 400ms ease;
93
- @include mq(mobileWide) {
94
- padding-bottom: $spacing--medium;
95
- }
96
- @include mq(tablet) {
97
- padding-bottom: $spacing--large;
98
- }
99
- @include mq(desktop) {
100
- padding-bottom: $spacing--large * 1.5;
101
- }
102
- &:hover {
103
- h1 {
104
- text-decoration: underline;
105
- }
106
- }
107
- &.out {
108
- opacity: 0;
109
- }
110
- &:not(.out) {
111
- animation: fadeInBottomFixed 600ms ease;
112
- }
113
- }
114
- }
115
- &__item {
116
- width: 100vw;
117
- height: 100vw;
118
- /* aspect ratios */
119
- @include mq(mobileWide) {
120
- height: 100vw;
121
- }
122
- @include mq(tablet) {
123
- height: 75vw;
124
- }
125
- @include mq(desktop) {
126
- height: 55vw;
127
- }
128
- @include mq(wide) {
129
- height: 40vw;
130
- }
131
- @include mq(ultraWide) {
132
- height: 36vw;
133
- }
134
- background-color: '#222';
135
- background-size: cover;
136
- background-position-x: center;
137
- background-position-y: center;
138
- border: 0;
139
- position: relative;
140
- &:before {
141
- content: '';
142
- opacity: 0.4;
143
- background: #091a2a;
144
- top: 0;
145
- left: 0;
146
- bottom: 0;
147
- right: 0;
148
- position: absolute;
149
- z-index: 1;
150
- }
151
- &--fade-over {
152
- position: absolute;
153
- z-index: 1;
154
- animation: fadeIn 400ms ease;
155
- }
156
- }
157
- &__slide-info {
158
- border: 0;
159
- background: none;
160
- background-color: rgba(3, 23, 43, 0.7);
161
- border-radius: $border-radius;
162
- padding: $spacing--medium $spacing--medium $spacing--medium $spacing;
163
- margin: 0 -20px;
164
- width: 100vw;
165
- @include mq(mobileWide) {
166
- margin: 0;
167
- width: 100%;
168
- padding: $spacing--medium $spacing--large * 2 $spacing--medium $spacing;
169
- }
170
- h1 {
171
- @include font-size(22px, 30px);
172
- color: $white;
173
- text-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
174
- margin: 0;
175
- font-weight: $font-weight-semibold;
176
- @include mq(mobileWide) {
177
- margin: 0 0 $spacing--small;
178
- @include font-size(26px, 30px);
179
- }
180
- @include mq(tablet) {
181
- @include font-size(40px, 44px);
182
- }
183
- @include mq(desktop) {
184
- @include font-size(48px, 54px);
185
- }
186
- }
187
-
188
- p {
189
- color: #fff;
190
- display: inline-block;
191
- margin: 0;
192
- padding: 0;
193
- border-radius: $border-radius;
194
- @include font-size(12px, 18px);
195
- @include mq(mobileWide) {
196
- @include font-size(15px, 20px);
197
- }
198
- @include mq(tablet) {
199
- @include font-size(18px, 24px);
200
- }
201
- @include mq(wide) {
202
- @include font-size(20px, 32px);
203
- }
204
- }
205
- }
206
- &__indicator-wrapper {
207
- display: flex;
208
- align-items: center;
209
- justify-content: center;
210
- margin: $spacing--small 0;
211
- @include mq(mobileWide) {
212
- margin: $spacing 0;
213
- }
214
- &--isMobile {
215
- pointer-events: none;
216
- }
217
- }
218
- &__indicator-dot {
219
- border: 0;
220
- display: flex;
221
- justify-content: center;
222
- background: transparent;
223
- span {
224
- background: $film-color-bright;
225
- transition: background 100ms ease;
226
- height: 8px;
227
- width: 8px;
228
- @include mq(mobileWide) {
229
- height: 10px;
230
- width: 10px;
231
- }
232
- @include mq(tablet) {
233
- height: $spacing--small;
234
- width: $spacing--small;
235
- }
236
- border-radius: 100%;
237
- }
238
- padding: $spacing--small / 2;
239
- @include mq(tablet) {
240
- padding: $spacing--small;
241
- }
242
- &:hover,
243
- &:focus,
244
- &--active {
245
- span {
246
- background: #fff;
247
- }
248
- }
249
- }
250
- &__slideshow {
251
- background: rgba(255, 255, 255, 0.08);
252
- margin-bottom: $spacing--large * 4;
253
- display: flex;
254
- align-items: center;
255
- justify-content: center;
256
- height: 40vw;
257
- }
258
- }
@@ -1,67 +0,0 @@
1
- .c-radio-button-group {
2
- &__wrapper {
3
- padding: $spacing--small 0;
4
- font-family: $font;
5
- display: flex;
6
- align-items: center;
7
- flex-flow: flow;
8
- }
9
- &__label-heading {
10
- @include font-size(16px, 20px);
11
- margin: 0 $spacing 0 0;
12
- font-weight: 600;
13
- }
14
- &__label {
15
- @include font-size(16px, 28px, $important: true);
16
- color: $brand-color;
17
- align-items: center;
18
- display: inline-flex;
19
- &:before {
20
- content: "";
21
- margin-right: $spacing--small;
22
- width: 20px;
23
- height: 20px;
24
- border-radius: 100%;
25
- border: 2px solid $brand-color--tertiary;
26
- transition: 200ms border-color ease;
27
- }
28
- &:after {
29
- content: "";
30
- background: transparent;
31
- width: 10px;
32
- height: 10px;
33
- border-radius: 100%;
34
- position: absolute;
35
- transform: translateX(5px) scale(0, 0);
36
- transition: 200ms all ease;
37
- }
38
- &:not(:last-child) {
39
- margin-right: $spacing--medium;
40
- }
41
- }
42
- &__input {
43
- opacity: 0;
44
- position: absolute;
45
- width: auto;
46
- &:hover, &:focus {
47
- + .c-radio-button-group__label {
48
- @include restore-outline();
49
- &:after {
50
- transform: translateX(5px) scale(1, 1);
51
- background: $brand-color--tertiary;
52
- }
53
- }
54
- }
55
- &:checked {
56
- + .c-radio-button-group__label {
57
- &:before {
58
- border-color: $brand-color;
59
- }
60
- &:after {
61
- transform: translateX(5px) scale(1, 1);
62
- background: $brand-color;
63
- }
64
- }
65
- }
66
- }
67
- }