@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.
- package/es/ContactBlock/ContactBlock.js +13 -13
- package/es/LinkBlock/LinkBlock.js +6 -6
- package/es/Masthead/Masthead.js +13 -34
- package/es/Masthead/MastheadSearchModal.js +2 -4
- package/es/Masthead/index.js +2 -2
- package/es/Search/ToggleSearchButton.js +9 -24
- package/es/Table/Table.js +36 -30
- package/es/Table/index.js +1 -0
- package/es/User/UserInfo.js +6 -3
- package/es/User/parseUserObject.js +1 -1
- package/es/all.css +1 -1
- package/es/index.js +2 -2
- package/es/locale/messages-en.js +0 -2
- package/es/locale/messages-nb.js +0 -2
- package/es/locale/messages-nn.js +0 -2
- package/es/locale/messages-se.js +0 -2
- package/es/locale/messages-sma.js +0 -2
- package/lib/ContactBlock/ContactBlock.js +13 -13
- package/lib/LinkBlock/LinkBlock.js +6 -6
- package/lib/Masthead/Masthead.d.ts +0 -6
- package/lib/Masthead/Masthead.js +14 -36
- package/lib/Masthead/MastheadSearchModal.d.ts +1 -2
- package/lib/Masthead/MastheadSearchModal.js +2 -4
- package/lib/Masthead/index.d.ts +2 -2
- package/lib/Masthead/index.js +1 -10
- package/lib/Search/ToggleSearchButton.d.ts +0 -2
- package/lib/Search/ToggleSearchButton.js +8 -23
- package/lib/Table/Table.d.ts +1 -0
- package/lib/Table/Table.js +43 -36
- package/lib/Table/index.d.ts +1 -0
- package/lib/Table/index.js +10 -2
- package/lib/User/UserInfo.js +6 -3
- package/lib/User/parseUserObject.d.ts +1 -1
- package/lib/User/parseUserObject.js +1 -1
- package/lib/all.css +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.js +7 -7
- package/lib/locale/messages-en.d.ts +0 -2
- package/lib/locale/messages-en.js +0 -2
- package/lib/locale/messages-nb.d.ts +0 -2
- package/lib/locale/messages-nb.js +0 -2
- package/lib/locale/messages-nn.d.ts +0 -2
- package/lib/locale/messages-nn.js +0 -2
- package/lib/locale/messages-se.d.ts +0 -2
- package/lib/locale/messages-se.js +0 -2
- package/lib/locale/messages-sma.d.ts +0 -2
- package/lib/locale/messages-sma.js +0 -2
- package/package.json +16 -16
- package/src/ContactBlock/ContactBlock.tsx +1 -0
- package/src/LinkBlock/LinkBlock.tsx +1 -0
- package/src/Masthead/Masthead.tsx +6 -38
- package/src/Masthead/MastheadSearchModal.tsx +2 -3
- package/src/Masthead/index.ts +2 -2
- package/src/Search/ToggleSearchButton.tsx +21 -38
- package/src/Table/Table.tsx +166 -19
- package/src/Table/index.ts +1 -0
- package/src/User/UserInfo.tsx +3 -1
- package/src/User/__tests__/parseUserObject-test.ts +1 -1
- package/src/User/parseUserObject.ts +1 -1
- package/src/index.ts +2 -2
- package/src/locale/messages-en.ts +0 -2
- package/src/locale/messages-nb.ts +0 -2
- package/src/locale/messages-nn.ts +0 -2
- package/src/locale/messages-se.ts +0 -2
- package/src/locale/messages-sma.ts +0 -2
- package/src/main.scss +0 -1
- 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
|
-
|
|
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,
|
|
47
|
+
export { default as Masthead, getMastheadHeight, useMastheadHeight, SkipToMainContent } from './Masthead';
|
|
48
48
|
|
|
49
49
|
export { default as ContentLoader } from './ContentLoader';
|
|
50
50
|
|
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
|
-
}
|