@ndla/ui 44.0.12 → 44.0.13

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 (67) hide show
  1. package/es/ContactBlock/ContactBlock.js +13 -13
  2. package/es/LinkBlock/LinkBlock.js +6 -6
  3. package/es/Masthead/Masthead.js +13 -34
  4. package/es/Masthead/MastheadSearchModal.js +2 -4
  5. package/es/Masthead/index.js +2 -2
  6. package/es/Search/ToggleSearchButton.js +9 -24
  7. package/es/Table/Table.js +36 -30
  8. package/es/Table/index.js +1 -0
  9. package/es/User/UserInfo.js +6 -3
  10. package/es/User/parseUserObject.js +1 -1
  11. package/es/all.css +1 -1
  12. package/es/index.js +2 -2
  13. package/es/locale/messages-en.js +0 -2
  14. package/es/locale/messages-nb.js +0 -2
  15. package/es/locale/messages-nn.js +0 -2
  16. package/es/locale/messages-se.js +0 -2
  17. package/es/locale/messages-sma.js +0 -2
  18. package/lib/ContactBlock/ContactBlock.js +13 -13
  19. package/lib/LinkBlock/LinkBlock.js +6 -6
  20. package/lib/Masthead/Masthead.d.ts +0 -6
  21. package/lib/Masthead/Masthead.js +14 -36
  22. package/lib/Masthead/MastheadSearchModal.d.ts +1 -2
  23. package/lib/Masthead/MastheadSearchModal.js +2 -4
  24. package/lib/Masthead/index.d.ts +2 -2
  25. package/lib/Masthead/index.js +1 -10
  26. package/lib/Search/ToggleSearchButton.d.ts +0 -2
  27. package/lib/Search/ToggleSearchButton.js +8 -23
  28. package/lib/Table/Table.d.ts +1 -0
  29. package/lib/Table/Table.js +43 -36
  30. package/lib/Table/index.d.ts +1 -0
  31. package/lib/Table/index.js +10 -2
  32. package/lib/User/UserInfo.js +6 -3
  33. package/lib/User/parseUserObject.d.ts +1 -1
  34. package/lib/User/parseUserObject.js +1 -1
  35. package/lib/all.css +1 -1
  36. package/lib/index.d.ts +2 -2
  37. package/lib/index.js +7 -7
  38. package/lib/locale/messages-en.d.ts +0 -2
  39. package/lib/locale/messages-en.js +0 -2
  40. package/lib/locale/messages-nb.d.ts +0 -2
  41. package/lib/locale/messages-nb.js +0 -2
  42. package/lib/locale/messages-nn.d.ts +0 -2
  43. package/lib/locale/messages-nn.js +0 -2
  44. package/lib/locale/messages-se.d.ts +0 -2
  45. package/lib/locale/messages-se.js +0 -2
  46. package/lib/locale/messages-sma.d.ts +0 -2
  47. package/lib/locale/messages-sma.js +0 -2
  48. package/package.json +16 -16
  49. package/src/ContactBlock/ContactBlock.tsx +1 -0
  50. package/src/LinkBlock/LinkBlock.tsx +1 -0
  51. package/src/Masthead/Masthead.tsx +6 -38
  52. package/src/Masthead/MastheadSearchModal.tsx +2 -3
  53. package/src/Masthead/index.ts +2 -2
  54. package/src/Search/ToggleSearchButton.tsx +21 -38
  55. package/src/Table/Table.tsx +166 -19
  56. package/src/Table/index.ts +1 -0
  57. package/src/User/UserInfo.tsx +3 -1
  58. package/src/User/__tests__/parseUserObject-test.ts +1 -1
  59. package/src/User/parseUserObject.ts +1 -1
  60. package/src/index.ts +2 -2
  61. package/src/locale/messages-en.ts +0 -2
  62. package/src/locale/messages-nb.ts +0 -2
  63. package/src/locale/messages-nn.ts +0 -2
  64. package/src/locale/messages-se.ts +0 -2
  65. package/src/locale/messages-sma.ts +0 -2
  66. package/src/main.scss +0 -1
  67. package/src/Table/component.tables.scss +0 -223
@@ -80,7 +80,7 @@ export const parseUserObject = (user: FeideUserApiType) => {
80
80
 
81
81
  return {
82
82
  uid: user.uid,
83
- primaryAffiliation: user.eduPersonPrimaryAffiliation,
83
+ eduPersonAffiliation: user.eduPersonAffiliation,
84
84
  displayName: user.displayName,
85
85
  mail: user.mail,
86
86
  organizations: roots,
package/src/index.ts CHANGED
@@ -36,7 +36,7 @@ export {
36
36
  default as Article,
37
37
  } from './Article';
38
38
 
39
- export { default as Table } from './Table';
39
+ export { default as Table, TableStyling } from './Table';
40
40
 
41
41
  export { default as ResourcesWrapper, ResourcesTopicTitle } from './ResourcesWrapper';
42
42
 
@@ -44,7 +44,7 @@ export { createUniversalPortal } from './utils/createUniversalPortal';
44
44
 
45
45
  export { default as NoContentBox } from './NoContentBox';
46
46
 
47
- export { default as Masthead, MastheadItem, getMastheadHeight, useMastheadHeight, SkipToMainContent } from './Masthead';
47
+ export { default as Masthead, getMastheadHeight, useMastheadHeight, SkipToMainContent } from './Masthead';
48
48
 
49
49
  export { default as ContentLoader } from './ContentLoader';
50
50
 
@@ -1067,8 +1067,6 @@ const messages = {
1067
1067
  loggedInAsButton: 'You are logged in as {{role}}',
1068
1068
  role: {
1069
1069
  employee: 'Employee',
1070
- faculty: 'Employee',
1071
- staff: 'Employee',
1072
1070
  student: 'Student',
1073
1071
  },
1074
1072
  buttonLogIn: 'Log in with Feide',
@@ -1066,8 +1066,6 @@ const messages = {
1066
1066
  loggedInAsButton: 'Du er pålogget som {{role}}',
1067
1067
  role: {
1068
1068
  employee: 'ansatt',
1069
- faculty: 'ansatt',
1070
- staff: 'ansatt',
1071
1069
  student: 'elev',
1072
1070
  },
1073
1071
  buttonLogIn: 'Logg inn med Feide',
@@ -1066,8 +1066,6 @@ const messages = {
1066
1066
  loggedInAsButton: 'Du er pålogga som {{role}}',
1067
1067
  role: {
1068
1068
  employee: 'tilsett',
1069
- faculty: 'tilsett',
1070
- staff: 'tilsett',
1071
1069
  student: 'elev',
1072
1070
  },
1073
1071
  buttonLogIn: 'Logg inn med Feide',
@@ -1067,8 +1067,6 @@ const messages = {
1067
1067
  loggedInAsButton: 'Don leat sisaloggejuvvon {{role}}',
1068
1068
  role: {
1069
1069
  employee: 'bargi',
1070
- faculty: 'bargi',
1071
- staff: 'bargi',
1072
1070
  student: 'oahppi',
1073
1071
  },
1074
1072
  buttonLogIn: 'Logge sisa Feide bokte',
@@ -1070,8 +1070,6 @@ const messages = {
1070
1070
  loggedInAsButton: 'Datne tjaangeme goh {{role}}',
1071
1071
  role: {
1072
1072
  employee: 'barkije',
1073
- faculty: 'barkije',
1074
- staff: 'barkije',
1075
1073
  student: 'learohke',
1076
1074
  },
1077
1075
  buttonLogIn: 'Tjaangh Feidine',
package/src/main.scss CHANGED
@@ -16,7 +16,6 @@
16
16
  @import 'MediaList/component.medialist';
17
17
  @import 'RelatedArticleList/component.related-articles';
18
18
  @import 'ContentTypeBadge/component.content-type-badge';
19
- @import 'Table/component.tables';
20
19
  @import 'Filter/component.filter';
21
20
  @import 'Translation/component.translation';
22
21
  @import 'Search/component.search';
@@ -1,223 +0,0 @@
1
- /**
2
- ** TABLES
3
- ** Responsive styling for tables
4
- ** Applied for tables both with and without c-table class.
5
- **/
6
-
7
- .c-table {
8
- $scrollbar-height: 8px;
9
- margin: 0 0 $spacing--medium 0;
10
-
11
- &::-webkit-scrollbar {
12
- height: $scrollbar-height;
13
- }
14
- &::-webkit-scrollbar-track-piece {
15
- background: $brand-color--lighter;
16
- border-radius: $scrollbar-height;
17
- }
18
- &::-webkit-scrollbar-thumb {
19
- background: $brand-color--dark;
20
- border-radius: $scrollbar-height;
21
- }
22
-
23
- &__wrapper {
24
- margin: $spacing--small 0;
25
- }
26
-
27
- &__content {
28
- text-align: center;
29
- position: relative;
30
- }
31
-
32
- &__left-shadow,
33
- &__right-shadow {
34
- position: absolute;
35
- z-index: 1;
36
- top: 0;
37
- height: calc(100% - #{$spacing--large});
38
- width: 15px;
39
- background-attachment: scroll, scroll;
40
- background-repeat: no-repeat;
41
- display: none;
42
-
43
- &--active {
44
- display: block;
45
- }
46
- }
47
-
48
- &__left-shadow {
49
- left: 0;
50
- background: radial-gradient(ellipse at left, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0) 75%) 0 center;
51
- }
52
-
53
- &__right-shadow {
54
- right: 0;
55
- background: radial-gradient(ellipse at right, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0) 75%) 0 center;
56
- }
57
- }
58
-
59
- .c-article table:not(.c-table),
60
- article table:not(.c-table) {
61
- margin: $spacing--large 0 $spacing--large 0;
62
- }
63
-
64
- .c-table,
65
- .c-article table,
66
- article table {
67
- padding-left: 1px;
68
- padding-right: 1px;
69
- display: inline-block;
70
- vertical-align: top;
71
- font-size: 85%;
72
- table-layout: fixed;
73
-
74
- overflow-x: auto;
75
- max-width: 100%;
76
-
77
- // optional - enable iOS momentum scrolling
78
- -webkit-overflow-scrolling: touch;
79
-
80
- // scrolling shadows on left/right
81
-
82
- &:after,
83
- &:before {
84
- content: '';
85
- display: table;
86
- clear: both;
87
- }
88
-
89
- caption {
90
- background-color: transparent;
91
- font-weight: $font-weight-bold;
92
- @include font-size(16px, 20px);
93
- text-align: left;
94
- text-transform: uppercase;
95
- font-family: $font;
96
- margin-bottom: $spacing--small;
97
- }
98
-
99
- thead {
100
- overflow: hidden;
101
- }
102
-
103
- td,
104
- th {
105
- display: table-cell;
106
- padding: $spacing--small/2 $spacing--small;
107
- }
108
-
109
- th {
110
- font-weight: $font-weight-bold;
111
- border-bottom: 3px solid $brand-color--tertiary;
112
- font-family: $font;
113
-
114
- @include font-size(16px, 22px);
115
- @include mq(tablet) {
116
- @include font-size(16px, 30px);
117
- }
118
- }
119
-
120
- tbody th {
121
- border-bottom: 0;
122
- border-right: 3px solid $brand-color--tertiary;
123
- padding: $spacing--small/1.5;
124
- }
125
-
126
- thead tr:nth-child(2) th {
127
- border: 1px solid $brand-grey--lighter;
128
- text-transform: none;
129
- @include font-size(14px, 18px);
130
- @include mq(tablet) {
131
- @include font-size(15px, 26px);
132
- }
133
- font-weight: $font-weight-semibold;
134
- height: 40px;
135
- background-color: $brand-color--lighter;
136
- padding: $spacing/6 $spacing $spacing/6 $spacing/3;
137
-
138
- &:empty {
139
- background-color: transparent;
140
- }
141
- }
142
-
143
- td {
144
- border: 1px solid $brand-grey--lighter;
145
- vertical-align: top;
146
- line-height: 1.6em;
147
-
148
- @include font-size(14px, 22px);
149
- @include mq(tablet) {
150
- @include font-size(15px, 30px);
151
- }
152
-
153
- ol,
154
- ul {
155
- font-size: unset !important;
156
- }
157
-
158
- p {
159
- line-height: 1.6em;
160
- }
161
-
162
- p:last-child {
163
- margin: 0;
164
- }
165
-
166
- img {
167
- max-width: 100%;
168
- min-width: 120px;
169
- }
170
- }
171
-
172
- // Remove excess spacing on headings inside table
173
- h1,
174
- h2,
175
- h3,
176
- h4,
177
- h5 {
178
- margin-top: 0;
179
- }
180
-
181
- ul {
182
- margin: 0 0 0 $spacing--small * 1.4;
183
- }
184
-
185
- .c-figure {
186
- margin: 0;
187
- padding: 0;
188
- width: 100% !important;
189
- left: 0 !important;
190
- }
191
- }
192
-
193
- .c-styleguide-table {
194
- &__warning-cell {
195
- background: red;
196
- color: #fff;
197
- }
198
- }
199
-
200
- // Fix for tables in framed <details />
201
- details .frame .c-table__wrapper {
202
- position: static !important;
203
- width: 100% !important;
204
- padding-left: 0 !important;
205
- padding-right: 0 !important;
206
- }
207
-
208
- // Fix for tables in framed <details />
209
- details .c-table__wrapper {
210
- position: static !important;
211
- width: 100% !important;
212
- padding-left: 0 !important;
213
- padding-right: 0 !important;
214
- }
215
-
216
- // Removes excess padding from paragraphs in table headers.
217
- .c-article,
218
- .c-editor,
219
- .c-table {
220
- th p {
221
- margin: 0;
222
- }
223
- }