@ndla/ui 44.0.11 → 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/Article/ArticleByline.js +8 -11
- package/es/BannerCard/BannerCard.js +7 -7
- 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 +1 -2
- package/es/locale/messages-nb.js +1 -2
- package/es/locale/messages-nn.js +1 -2
- package/es/locale/messages-se.js +1 -2
- package/es/locale/messages-sma.js +1 -2
- package/lib/Article/ArticleByline.js +8 -11
- package/lib/BannerCard/BannerCard.js +7 -7
- 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 +1 -2
- package/lib/locale/messages-en.js +1 -2
- package/lib/locale/messages-nb.d.ts +1 -2
- package/lib/locale/messages-nb.js +1 -2
- package/lib/locale/messages-nn.d.ts +1 -2
- package/lib/locale/messages-nn.js +1 -2
- package/lib/locale/messages-se.d.ts +1 -2
- package/lib/locale/messages-se.js +1 -2
- package/lib/locale/messages-sma.d.ts +1 -2
- package/lib/locale/messages-sma.js +1 -2
- package/package.json +16 -16
- package/src/Article/ArticleByline.tsx +6 -8
- package/src/BannerCard/BannerCard.tsx +1 -1
- 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 +1 -2
- package/src/locale/messages-nb.ts +1 -2
- package/src/locale/messages-nn.ts +1 -2
- package/src/locale/messages-se.ts +1 -2
- package/src/locale/messages-sma.ts +1 -2
- package/src/main.scss +0 -1
- package/src/Table/component.tables.scss +0 -218
package/src/Table/Table.tsx
CHANGED
|
@@ -6,16 +6,14 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
+
import { css } from '@emotion/react';
|
|
9
10
|
import styled from '@emotion/styled';
|
|
10
|
-
import { colors, spacing } from '@ndla/core';
|
|
11
|
+
import { breakpoints, colors, fonts, mq, spacing } from '@ndla/core';
|
|
11
12
|
import throttle from 'lodash/throttle';
|
|
12
13
|
import { ReactNode, UIEvent, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
13
|
-
import BEMHelper from 'react-bem-helper';
|
|
14
14
|
|
|
15
15
|
type ScrollPosition = 'start' | 'end' | 'center';
|
|
16
16
|
|
|
17
|
-
const classes = BEMHelper('c-table');
|
|
18
|
-
|
|
19
17
|
const MARGIN = 5;
|
|
20
18
|
|
|
21
19
|
interface Props {
|
|
@@ -26,17 +24,17 @@ interface Props {
|
|
|
26
24
|
};
|
|
27
25
|
}
|
|
28
26
|
|
|
29
|
-
|
|
30
|
-
show: boolean;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const ScrollBorder = styled.div<StyledProps>`
|
|
27
|
+
const ScrollBorder = styled.div`
|
|
34
28
|
position: absolute;
|
|
35
29
|
top: 0;
|
|
36
30
|
height: calc(100% - ${spacing.mediumlarge});
|
|
37
31
|
width: 3px;
|
|
38
32
|
background: ${colors.background.dark};
|
|
39
|
-
display:
|
|
33
|
+
display: none;
|
|
34
|
+
|
|
35
|
+
&[data-block='true'] {
|
|
36
|
+
display: block;
|
|
37
|
+
}
|
|
40
38
|
`;
|
|
41
39
|
|
|
42
40
|
const RightScrollBorder = styled(ScrollBorder)`
|
|
@@ -47,6 +45,158 @@ const LeftScrollBorder = styled(ScrollBorder)`
|
|
|
47
45
|
left: 0;
|
|
48
46
|
`;
|
|
49
47
|
|
|
48
|
+
export const TableStyling = css`
|
|
49
|
+
&::-webkit-scrollbar {
|
|
50
|
+
height: ${spacing.xsmall};
|
|
51
|
+
}
|
|
52
|
+
&::-webkit-scrollbar-track-piece {
|
|
53
|
+
background: ${colors.brand.lighter};
|
|
54
|
+
border-radius: ${spacing.xsmall};
|
|
55
|
+
}
|
|
56
|
+
&::-webkit-scrollbar-thumb {
|
|
57
|
+
background: ${colors.brand.dark};
|
|
58
|
+
border-radius: ${spacing.xsmall};
|
|
59
|
+
}
|
|
60
|
+
display: inline-block;
|
|
61
|
+
|
|
62
|
+
font-size: 85%;
|
|
63
|
+
max-width: 100%;
|
|
64
|
+
|
|
65
|
+
padding-left: ${spacing.xxsmall};
|
|
66
|
+
padding-right: ${spacing.xxsmall};
|
|
67
|
+
|
|
68
|
+
vertical-align: top;
|
|
69
|
+
table-layout: fixed;
|
|
70
|
+
overflow-x: auto;
|
|
71
|
+
|
|
72
|
+
// optional - enable iOS momentum scrolling
|
|
73
|
+
-webkit-overflow-scrolling: touch;
|
|
74
|
+
|
|
75
|
+
// scrolling shadows on left/right
|
|
76
|
+
&:after,
|
|
77
|
+
&:before {
|
|
78
|
+
content: '';
|
|
79
|
+
display: table;
|
|
80
|
+
clear: both;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
> caption {
|
|
84
|
+
background-color: transparent;
|
|
85
|
+
font-weight: ${fonts.weight.bold};
|
|
86
|
+
font-family: ${fonts.sans};
|
|
87
|
+
${fonts.sizes('16px', '20px')}
|
|
88
|
+
text-align: left;
|
|
89
|
+
text-transform: uppercase;
|
|
90
|
+
margin-bottom: ${spacing.small};
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
thead {
|
|
94
|
+
overflow: hidden;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
thead tr td,
|
|
98
|
+
th {
|
|
99
|
+
font-weight: ${fonts.weight.bold};
|
|
100
|
+
border-bottom: 3px solid ${colors.brand.tertiary};
|
|
101
|
+
font-family: ${fonts.sans};
|
|
102
|
+
vertical-align: text-top;
|
|
103
|
+
|
|
104
|
+
${fonts.sizes('16px', '22px')};
|
|
105
|
+
${mq.range({ from: breakpoints.tablet })} {
|
|
106
|
+
${fonts.sizes('16px', '30px')};
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
tbody th {
|
|
111
|
+
border-bottom: 0;
|
|
112
|
+
border-right: 3px solid ${colors.brand.tertiary};
|
|
113
|
+
padding: ${spacing.xsmall};
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
thead tr:nth-child(2) th {
|
|
117
|
+
border: 1px solid ${colors.brand.lighter};
|
|
118
|
+
text-transform: none;
|
|
119
|
+
|
|
120
|
+
${fonts.sizes('14px', '18px')};
|
|
121
|
+
${mq.range({ from: breakpoints.tablet })} {
|
|
122
|
+
${fonts.sizes('15px', '26px')};
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
font-weight: ${fonts.weight.semibold};
|
|
126
|
+
height: 40px;
|
|
127
|
+
background-color: ${colors.brand.lighter};
|
|
128
|
+
padding: ${spacing.xxsmall} ${spacing.normal} ${spacing.xxsmall} ${spacing.xsmall};
|
|
129
|
+
|
|
130
|
+
&:empty {
|
|
131
|
+
background-color: transparent;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
td {
|
|
136
|
+
border: 1px solid ${colors.brand.lighter};
|
|
137
|
+
vertical-align: top;
|
|
138
|
+
|
|
139
|
+
${fonts.sizes('14px', '22px')};
|
|
140
|
+
${mq.range({ from: breakpoints.tablet })} {
|
|
141
|
+
${fonts.sizes('15px', '30px')};
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
ol,
|
|
145
|
+
ul {
|
|
146
|
+
font-size: unset !important;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
p {
|
|
150
|
+
line-height: 1.6em;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
p:last-child {
|
|
154
|
+
margin: 0;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
img {
|
|
158
|
+
max-width: 100%;
|
|
159
|
+
min-width: 120px;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
td,
|
|
164
|
+
th {
|
|
165
|
+
display: table-cell;
|
|
166
|
+
padding: ${spacing.xsmall} ${spacing.small};
|
|
167
|
+
|
|
168
|
+
p {
|
|
169
|
+
margin: 0;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// Remove excess spacing on headings inside table
|
|
174
|
+
h1,
|
|
175
|
+
h2,
|
|
176
|
+
h3,
|
|
177
|
+
h4,
|
|
178
|
+
h5 {
|
|
179
|
+
margin-top: 0;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
ul {
|
|
183
|
+
margin: 0 0 0 ${spacing.nsmall};
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.c-figure {
|
|
187
|
+
margin: 0;
|
|
188
|
+
padding: 0;
|
|
189
|
+
width: 100% !important;
|
|
190
|
+
left: 0 !important;
|
|
191
|
+
}
|
|
192
|
+
`;
|
|
193
|
+
|
|
194
|
+
const TableWrapper = styled.div`
|
|
195
|
+
display: flex;
|
|
196
|
+
justify-content: center;
|
|
197
|
+
margin: ${spacing.small} 0;
|
|
198
|
+
`;
|
|
199
|
+
|
|
50
200
|
const Table = ({ children, id, ...rest }: Props) => {
|
|
51
201
|
const [scrollPosition, setScrollPosition] = useState<ScrollPosition | undefined>(undefined);
|
|
52
202
|
const tableRef = useRef<HTMLTableElement>(null);
|
|
@@ -91,18 +241,15 @@ const Table = ({ children, id, ...rest }: Props) => {
|
|
|
91
241
|
}, [checkScrollPosition]);
|
|
92
242
|
|
|
93
243
|
return (
|
|
94
|
-
<
|
|
95
|
-
<div
|
|
96
|
-
<LeftScrollBorder
|
|
97
|
-
<table ref={tableRef} id={id} onScroll={onScroll} {
|
|
244
|
+
<TableWrapper>
|
|
245
|
+
<div>
|
|
246
|
+
<LeftScrollBorder data-block={scrollPosition === 'end' || scrollPosition === 'center'} />
|
|
247
|
+
<table ref={tableRef} id={id} onScroll={onScroll} css={TableStyling} {...rest}>
|
|
98
248
|
{children}
|
|
99
249
|
</table>
|
|
100
|
-
<RightScrollBorder
|
|
101
|
-
show={scrollPosition === 'start' || scrollPosition === 'center'}
|
|
102
|
-
{...classes('right-shadow')}
|
|
103
|
-
/>
|
|
250
|
+
<RightScrollBorder data-block={scrollPosition === 'start' || scrollPosition === 'center'} />
|
|
104
251
|
</div>
|
|
105
|
-
</
|
|
252
|
+
</TableWrapper>
|
|
106
253
|
);
|
|
107
254
|
};
|
|
108
255
|
|
package/src/Table/index.ts
CHANGED
package/src/User/UserInfo.tsx
CHANGED
|
@@ -23,6 +23,8 @@ const ShortInfoDiv = styled.div`
|
|
|
23
23
|
margin: 2rem auto;
|
|
24
24
|
`;
|
|
25
25
|
|
|
26
|
+
const isTeacher = (affiliations: FeideUserApiType['eduPersonAffiliation']) => affiliations.includes('employee');
|
|
27
|
+
|
|
26
28
|
export const UserInfo = ({ user }: Props) => {
|
|
27
29
|
const { t } = useTranslation();
|
|
28
30
|
|
|
@@ -33,7 +35,7 @@ export const UserInfo = ({ user }: Props) => {
|
|
|
33
35
|
{
|
|
34
36
|
<p>
|
|
35
37
|
{t('user.loggedInAs', {
|
|
36
|
-
role: t(`user.role.${parsedUser.
|
|
38
|
+
role: t(`user.role.${isTeacher(parsedUser.eduPersonAffiliation) ? 'employee' : 'student'}`),
|
|
37
39
|
})}
|
|
38
40
|
</p>
|
|
39
41
|
}
|
|
@@ -162,9 +162,9 @@ describe('parseUserObject', () => {
|
|
|
162
162
|
it('Correctly parses Feide user', () => {
|
|
163
163
|
const expected = {
|
|
164
164
|
uid: ['david_laerervgs'],
|
|
165
|
-
primaryAffiliation: 'employee',
|
|
166
165
|
displayName: 'David LærerVGS Jonsen',
|
|
167
166
|
mail: ['david_laerervgs@feide.no'],
|
|
167
|
+
eduPersonAffiliation: ['member', 'employee', 'faculty'],
|
|
168
168
|
grepCodes: [],
|
|
169
169
|
organizations: [
|
|
170
170
|
{
|
|
@@ -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
|
|
|
@@ -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',
|
|
@@ -1197,6 +1195,7 @@ const messages = {
|
|
|
1197
1195
|
detailView: 'Detailed listview',
|
|
1198
1196
|
shortView: 'Card view',
|
|
1199
1197
|
sharedFolder: {
|
|
1198
|
+
folderCopied: 'The folder was copied.',
|
|
1200
1199
|
info: 'This folder contains learning resources and tasks from NDLA, gathered by a teacher.',
|
|
1201
1200
|
firstShared: 'The folder was shared for the first time {{date}}',
|
|
1202
1201
|
learningpathUnsupported:
|
|
@@ -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',
|
|
@@ -1194,6 +1192,7 @@ const messages = {
|
|
|
1194
1192
|
detailView: 'Detaljert listevisning',
|
|
1195
1193
|
shortView: 'Kort visning',
|
|
1196
1194
|
sharedFolder: {
|
|
1195
|
+
folderCopied: 'Mappen har blitt kopiert.',
|
|
1197
1196
|
info: 'Denne mappa inneholder fagstoff og oppgaver fra NDLA, samlet av en lærer. ',
|
|
1198
1197
|
firstShared: 'Mappa ble delt første gang {{date}}',
|
|
1199
1198
|
learningpathUnsupported:
|
|
@@ -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',
|
|
@@ -1194,6 +1192,7 @@ const messages = {
|
|
|
1194
1192
|
detailView: 'Detaljert listevisning',
|
|
1195
1193
|
shortView: 'Kortvisning',
|
|
1196
1194
|
sharedFolder: {
|
|
1195
|
+
folderCopied: 'Mappa vart kopiert.',
|
|
1197
1196
|
info: 'Denne mappa inneheld fagstoff og oppgåver frå NDLA, samla av ein lærar.',
|
|
1198
1197
|
firstShared: 'Mappa vart delt første gong {{date}}',
|
|
1199
1198
|
drawerButton: 'Vis mapper og ressursar',
|
|
@@ -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',
|
|
@@ -1195,6 +1193,7 @@ const messages = {
|
|
|
1195
1193
|
detailView: 'Bienalaš oppalašlistu',
|
|
1196
1194
|
shortView: 'Oanehis listu',
|
|
1197
1195
|
sharedFolder: {
|
|
1196
|
+
folderCopied: 'Mappen har blitt kopiert.',
|
|
1198
1197
|
info: 'Dán máhpas lea NDLA fágasisdoallu ja bargobihtát, čohkkejuvvon oahpaheaddjis.',
|
|
1199
1198
|
firstShared: 'Máhppa juogaduvvui vuosttaš geardde {{date}}',
|
|
1200
1199
|
drawerButton: 'Čájet máhpaid ja resurssaid',
|
|
@@ -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',
|
|
@@ -1199,6 +1197,7 @@ const messages = {
|
|
|
1199
1197
|
detailView: 'Detaljert listevisning',
|
|
1200
1198
|
shortView: 'Kort visning',
|
|
1201
1199
|
sharedFolder: {
|
|
1200
|
+
folderCopied: 'Mappen har blitt kopiert.',
|
|
1202
1201
|
info: 'Denne mappa inneheld fagstoff og oppgåver frå NDLA, samla av ein lærar.',
|
|
1203
1202
|
firstShared: 'Mappa vart delt første gong {{date}}',
|
|
1204
1203
|
drawerButton: 'Vis mapper og ressursar',
|
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,218 +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
|
-
p {
|
|
154
|
-
line-height: 1.6em;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
p:last-child {
|
|
158
|
-
margin: 0;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
img {
|
|
162
|
-
max-width: 100%;
|
|
163
|
-
min-width: 120px;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
// Remove excess spacing on headings inside table
|
|
168
|
-
h1,
|
|
169
|
-
h2,
|
|
170
|
-
h3,
|
|
171
|
-
h4,
|
|
172
|
-
h5 {
|
|
173
|
-
margin-top: 0;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
ul {
|
|
177
|
-
margin: 0 0 0 $spacing--small * 1.4;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
.c-figure {
|
|
181
|
-
margin: 0;
|
|
182
|
-
padding: 0;
|
|
183
|
-
width: 100% !important;
|
|
184
|
-
left: 0 !important;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.c-styleguide-table {
|
|
189
|
-
&__warning-cell {
|
|
190
|
-
background: red;
|
|
191
|
-
color: #fff;
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
// Fix for tables in framed <details />
|
|
196
|
-
details .frame .c-table__wrapper {
|
|
197
|
-
position: static !important;
|
|
198
|
-
width: 100% !important;
|
|
199
|
-
padding-left: 0 !important;
|
|
200
|
-
padding-right: 0 !important;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
// Fix for tables in framed <details />
|
|
204
|
-
details .c-table__wrapper {
|
|
205
|
-
position: static !important;
|
|
206
|
-
width: 100% !important;
|
|
207
|
-
padding-left: 0 !important;
|
|
208
|
-
padding-right: 0 !important;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
// Removes excess padding from paragraphs in table headers.
|
|
212
|
-
.c-article,
|
|
213
|
-
.c-editor,
|
|
214
|
-
.c-table {
|
|
215
|
-
th p {
|
|
216
|
-
margin: 0;
|
|
217
|
-
}
|
|
218
|
-
}
|