@ndla/ui 56.0.6-alpha.0 → 56.0.8-alpha.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.
- package/dist/panda.buildinfo.json +10 -8
- package/dist/styles.css +28 -22
- package/es/Article/Article.js +85 -17
- package/es/Article/ArticleByline.js +40 -40
- package/es/Article/ArticleFootNotes.js +2 -3
- package/es/Article/index.js +3 -4
- package/es/ContactBlock/ContactBlock.js +0 -1
- package/es/Grid/Grid.js +1 -1
- package/es/index.js +1 -1
- package/es/styles.css +28 -22
- package/lib/Article/Article.d.ts +25 -5
- package/lib/Article/Article.js +87 -20
- package/lib/Article/ArticleByline.d.ts +7 -2
- package/lib/Article/ArticleByline.js +40 -40
- package/lib/Article/ArticleFootNotes.d.ts +2 -2
- package/lib/Article/ArticleFootNotes.js +2 -2
- package/lib/Article/index.d.ts +3 -4
- package/lib/Article/index.js +17 -6
- package/lib/ContactBlock/ContactBlock.js +0 -1
- package/lib/Gloss/Gloss.d.ts +1 -3
- package/lib/Grid/Grid.js +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +6 -0
- package/lib/styles.css +28 -22
- package/lib/types.d.ts +0 -22
- package/package.json +7 -8
- package/src/Article/Article.tsx +160 -73
- package/src/Article/ArticleByline.stories.tsx +1 -1
- package/src/Article/ArticleByline.tsx +32 -30
- package/src/Article/ArticleFootNotes.tsx +1 -3
- package/src/Article/index.ts +4 -4
- package/src/ContactBlock/ContactBlock.tsx +0 -1
- package/src/Grid/Grid.tsx +1 -1
- package/src/index.ts +1 -0
- package/src/types.ts +0 -24
|
@@ -2,19 +2,21 @@
|
|
|
2
2
|
"schemaVersion": "0.44.0",
|
|
3
3
|
"styles": {
|
|
4
4
|
"atomic": [
|
|
5
|
+
"paddingInline]___[value:8%",
|
|
6
|
+
"paddingBlockStart]___[value:xsmall",
|
|
7
|
+
"paddingBlockStart]___[value:medium]___[cond:tablet",
|
|
8
|
+
"paddingBlockStart]___[value:xxlarge]___[cond:desktop",
|
|
9
|
+
"paddingBlockEnd]___[value:xsmall",
|
|
10
|
+
"paddingBlockEnd]___[value:medium]___[cond:tablet",
|
|
11
|
+
"paddingBlockEnd]___[value:xxlarge]___[cond:desktop",
|
|
12
|
+
"background]___[value:surface.default",
|
|
5
13
|
"display]___[value:flex",
|
|
6
14
|
"flexDirection]___[value:column",
|
|
7
15
|
"color]___[value:text.default",
|
|
8
|
-
"gap]___[value:xxlarge",
|
|
9
|
-
"background]___[value:surface.default",
|
|
10
|
-
"paddingBlock]___[value:xsmall",
|
|
11
|
-
"paddingInline]___[value:8%",
|
|
12
16
|
"alignItems]___[value:center",
|
|
13
17
|
"width]___[value:100%",
|
|
14
18
|
"overflowWrap]___[value:break-word",
|
|
15
19
|
"position]___[value:relative",
|
|
16
|
-
"paddingBlock]___[value:medium]___[cond:tablet",
|
|
17
|
-
"paddingBlock]___[value:xxlarge]___[cond:desktop",
|
|
18
20
|
"transform]___[value:scaleY(100) translateY(0.075em)]___[cond:& mjx-stretchy-v > mjx-ext > mjx-c",
|
|
19
21
|
"content]___[value:]___[cond:_after",
|
|
20
22
|
"display]___[value:table]___[cond:_after",
|
|
@@ -28,13 +30,14 @@
|
|
|
28
30
|
"top]___[value:medium]___[cond:tablet",
|
|
29
31
|
"top]___[value:xxlarge]___[cond:desktop",
|
|
30
32
|
"gap]___[value:medium",
|
|
33
|
+
"gap]___[value:xxlarge",
|
|
31
34
|
"marginBlockStart]___[value:medium",
|
|
32
|
-
"paddingBlockStart]___[value:xsmall",
|
|
33
35
|
"borderTop]___[value:1px solid",
|
|
34
36
|
"borderColor]___[value:stroke.subtle",
|
|
35
37
|
"flexDirection]___[value:column-reverse",
|
|
36
38
|
"gap]___[value:3xsmall",
|
|
37
39
|
"justifyContent]___[value:space-between",
|
|
40
|
+
"paddingBlock]___[value:xsmall",
|
|
38
41
|
"textStyle]___[value:body.medium",
|
|
39
42
|
"flexDirection]___[value:row]___[cond:tabletWide",
|
|
40
43
|
"paddingBlockStart]___[value:xxlarge",
|
|
@@ -168,7 +171,6 @@
|
|
|
168
171
|
"opacity]___[value:0.7]___[cond:& .token.namespace",
|
|
169
172
|
"display]___[value:inline",
|
|
170
173
|
"display]___[value:inline]___[cond:& p",
|
|
171
|
-
"maxWidth]___[value:744px",
|
|
172
174
|
"minWidth]___[value:surface.xxsmall",
|
|
173
175
|
"padding]___[value:medium",
|
|
174
176
|
"alignItems]___[value:unset]___[cond:tablet",
|
package/dist/styles.css
CHANGED
|
@@ -85,28 +85,28 @@
|
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
.
|
|
89
|
-
|
|
88
|
+
.px_8\% {
|
|
89
|
+
padding-inline: 8%;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
.
|
|
93
|
-
|
|
92
|
+
.pbs_xsmall {
|
|
93
|
+
padding-block-start: var(--spacing-xsmall);
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
.
|
|
97
|
-
|
|
96
|
+
.pbe_xsmall {
|
|
97
|
+
padding-block-end: var(--spacing-xsmall);
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
.bg_surface\.default {
|
|
101
101
|
background: var(--colors-surface-default);
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
.
|
|
105
|
-
|
|
104
|
+
.d_flex {
|
|
105
|
+
display: flex;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
.
|
|
109
|
-
|
|
108
|
+
.c_text\.default {
|
|
109
|
+
color: var(--colors-text-default);
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
.w_100\% {
|
|
@@ -133,12 +133,12 @@
|
|
|
133
133
|
gap: var(--spacing-medium);
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
.
|
|
137
|
-
|
|
136
|
+
.gap_xxlarge {
|
|
137
|
+
gap: var(--spacing-xxlarge);
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
.
|
|
141
|
-
|
|
140
|
+
.mbs_medium {
|
|
141
|
+
margin-block-start: var(--spacing-medium);
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
.bd-t_1px_solid {
|
|
@@ -149,6 +149,10 @@
|
|
|
149
149
|
gap: var(--spacing-3xsmall);
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
+
.py_xsmall {
|
|
153
|
+
padding-block: var(--spacing-xsmall);
|
|
154
|
+
}
|
|
155
|
+
|
|
152
156
|
.pbs_xxlarge {
|
|
153
157
|
padding-block-start: var(--spacing-xxlarge);
|
|
154
158
|
}
|
|
@@ -362,10 +366,6 @@
|
|
|
362
366
|
display: inline;
|
|
363
367
|
}
|
|
364
368
|
|
|
365
|
-
.max-w_744px {
|
|
366
|
-
max-width: 744px;
|
|
367
|
-
}
|
|
368
|
-
|
|
369
369
|
.min-w_surface\.xxsmall {
|
|
370
370
|
min-width: var(--sizes-surface-xxsmall);
|
|
371
371
|
}
|
|
@@ -1424,8 +1424,11 @@
|
|
|
1424
1424
|
}
|
|
1425
1425
|
|
|
1426
1426
|
@media screen and (min-width: 37.5625rem) {
|
|
1427
|
-
.tablet\:
|
|
1428
|
-
padding-block: var(--spacing-medium);
|
|
1427
|
+
.tablet\:pbs_medium {
|
|
1428
|
+
padding-block-start: var(--spacing-medium);
|
|
1429
|
+
}
|
|
1430
|
+
.tablet\:pbe_medium {
|
|
1431
|
+
padding-block-end: var(--spacing-medium);
|
|
1429
1432
|
}
|
|
1430
1433
|
.tablet\:px_medium {
|
|
1431
1434
|
padding-inline: var(--spacing-medium);
|
|
@@ -1520,8 +1523,11 @@
|
|
|
1520
1523
|
}
|
|
1521
1524
|
|
|
1522
1525
|
@media screen and (min-width: 61.3125rem) {
|
|
1523
|
-
.desktop\:
|
|
1524
|
-
padding-block: var(--spacing-xxlarge);
|
|
1526
|
+
.desktop\:pbs_xxlarge {
|
|
1527
|
+
padding-block-start: var(--spacing-xxlarge);
|
|
1528
|
+
}
|
|
1529
|
+
.desktop\:pbe_xxlarge {
|
|
1530
|
+
padding-block-end: var(--spacing-xxlarge);
|
|
1525
1531
|
}
|
|
1526
1532
|
.desktop\:w_260px {
|
|
1527
1533
|
width: 260px;
|
package/es/Article/Article.js
CHANGED
|
@@ -11,10 +11,57 @@ import { ark } from "@ark-ui/react";
|
|
|
11
11
|
import { Heading, Text } from "@ndla/primitives";
|
|
12
12
|
import { cx } from "@ndla/styled-system/css";
|
|
13
13
|
import { styled } from "@ndla/styled-system/jsx";
|
|
14
|
-
import ArticleByline from "./ArticleByline";
|
|
14
|
+
import { ArticleByline } from "./ArticleByline";
|
|
15
15
|
import { ContentTypeBadgeNew } from "..";
|
|
16
16
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
|
-
const
|
|
17
|
+
const articlePadding = {
|
|
18
|
+
paddingInline: "8%"
|
|
19
|
+
};
|
|
20
|
+
const paddingBlockEnd = {
|
|
21
|
+
paddingBlockEnd: "xsmall",
|
|
22
|
+
tablet: {
|
|
23
|
+
paddingBlockEnd: "medium"
|
|
24
|
+
},
|
|
25
|
+
desktop: {
|
|
26
|
+
paddingBlockEnd: "xxlarge"
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
const paddingBlockStart = {
|
|
30
|
+
paddingBlockStart: "xsmall",
|
|
31
|
+
tablet: {
|
|
32
|
+
paddingBlockStart: "medium"
|
|
33
|
+
},
|
|
34
|
+
desktop: {
|
|
35
|
+
paddingBlockStart: "xxlarge"
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
export const ArticlePadding = styled(ark.div, {
|
|
39
|
+
base: articlePadding,
|
|
40
|
+
variants: {
|
|
41
|
+
padStart: {
|
|
42
|
+
true: paddingBlockStart
|
|
43
|
+
},
|
|
44
|
+
padEnd: {
|
|
45
|
+
true: paddingBlockEnd
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}, {
|
|
49
|
+
baseComponent: true
|
|
50
|
+
});
|
|
51
|
+
const StyledArticleContent = styled(ark.section, {
|
|
52
|
+
base: {
|
|
53
|
+
background: "surface.default"
|
|
54
|
+
},
|
|
55
|
+
variants: {
|
|
56
|
+
padded: {
|
|
57
|
+
true: {
|
|
58
|
+
...articlePadding,
|
|
59
|
+
...paddingBlockStart,
|
|
60
|
+
...paddingBlockEnd
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}, {
|
|
18
65
|
baseComponent: true
|
|
19
66
|
});
|
|
20
67
|
export const ArticleContent = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
@@ -28,25 +75,15 @@ export const ArticleContent = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
28
75
|
ref: ref
|
|
29
76
|
});
|
|
30
77
|
});
|
|
31
|
-
const StyledArticleWrapper = styled(
|
|
78
|
+
const StyledArticleWrapper = styled(ark.article, {
|
|
32
79
|
base: {
|
|
33
80
|
display: "flex",
|
|
34
81
|
flexDirection: "column",
|
|
35
82
|
color: "text.default",
|
|
36
|
-
gap: "xxlarge",
|
|
37
|
-
background: "surface.default",
|
|
38
|
-
paddingBlock: "xsmall",
|
|
39
|
-
paddingInline: "8%",
|
|
40
83
|
alignItems: "center",
|
|
41
84
|
width: "100%",
|
|
42
85
|
overflowWrap: "break-word",
|
|
43
86
|
position: "relative",
|
|
44
|
-
tablet: {
|
|
45
|
-
paddingBlock: "medium"
|
|
46
|
-
},
|
|
47
|
-
desktop: {
|
|
48
|
-
paddingBlock: "xxlarge"
|
|
49
|
-
},
|
|
50
87
|
"& mjx-stretchy-v > mjx-ext > mjx-c": {
|
|
51
88
|
transform: "scaleY(100) translateY(0.075em)"
|
|
52
89
|
},
|
|
@@ -56,13 +93,15 @@ const StyledArticleWrapper = styled("article", {
|
|
|
56
93
|
clear: "both"
|
|
57
94
|
}
|
|
58
95
|
}
|
|
96
|
+
}, {
|
|
97
|
+
baseComponent: true
|
|
59
98
|
});
|
|
60
99
|
export const ArticleWrapper = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/_jsx(StyledArticleWrapper, {
|
|
61
100
|
"data-ndla-article": "",
|
|
62
101
|
ref: ref,
|
|
63
102
|
...props
|
|
64
103
|
}));
|
|
65
|
-
export const ArticleHGroup = styled(
|
|
104
|
+
export const ArticleHGroup = styled(ark.hgroup, {
|
|
66
105
|
base: {
|
|
67
106
|
display: "flex",
|
|
68
107
|
width: "100%",
|
|
@@ -73,8 +112,10 @@ export const ArticleHGroup = styled("hgroup", {
|
|
|
73
112
|
overflowWrap: "anywhere"
|
|
74
113
|
}
|
|
75
114
|
}
|
|
115
|
+
}, {
|
|
116
|
+
baseComponent: true
|
|
76
117
|
});
|
|
77
|
-
export const ArticleActionWrapper = styled(
|
|
118
|
+
export const ArticleActionWrapper = styled(ark.div, {
|
|
78
119
|
base: {
|
|
79
120
|
position: "absolute",
|
|
80
121
|
right: "8%",
|
|
@@ -86,23 +127,47 @@ export const ArticleActionWrapper = styled("div", {
|
|
|
86
127
|
top: "xxlarge"
|
|
87
128
|
}
|
|
88
129
|
}
|
|
130
|
+
}, {
|
|
131
|
+
baseComponent: true
|
|
89
132
|
});
|
|
90
|
-
export const ArticleHeader = styled(
|
|
133
|
+
export const ArticleHeader = styled(ark.header, {
|
|
91
134
|
base: {
|
|
92
135
|
display: "flex",
|
|
93
136
|
flexDirection: "column",
|
|
137
|
+
background: "surface.default",
|
|
94
138
|
gap: "medium",
|
|
95
139
|
alignItems: "flex-start",
|
|
96
140
|
width: "100%"
|
|
141
|
+
},
|
|
142
|
+
variants: {
|
|
143
|
+
padded: {
|
|
144
|
+
true: {
|
|
145
|
+
...articlePadding,
|
|
146
|
+
...paddingBlockStart
|
|
147
|
+
}
|
|
148
|
+
}
|
|
97
149
|
}
|
|
150
|
+
}, {
|
|
151
|
+
baseComponent: true
|
|
98
152
|
});
|
|
99
|
-
export const ArticleFooter = styled(
|
|
153
|
+
export const ArticleFooter = styled(ark.footer, {
|
|
100
154
|
base: {
|
|
101
155
|
display: "flex",
|
|
102
156
|
flexDirection: "column",
|
|
157
|
+
background: "surface.default",
|
|
103
158
|
gap: "xxlarge",
|
|
104
159
|
width: "100%"
|
|
160
|
+
},
|
|
161
|
+
variants: {
|
|
162
|
+
padded: {
|
|
163
|
+
true: {
|
|
164
|
+
...articlePadding,
|
|
165
|
+
...paddingBlockEnd
|
|
166
|
+
}
|
|
167
|
+
}
|
|
105
168
|
}
|
|
169
|
+
}, {
|
|
170
|
+
baseComponent: true
|
|
106
171
|
});
|
|
107
172
|
export const ArticleTitle = _ref2 => {
|
|
108
173
|
let {
|
|
@@ -115,6 +180,7 @@ export const ArticleTitle = _ref2 => {
|
|
|
115
180
|
competenceGoals
|
|
116
181
|
} = _ref2;
|
|
117
182
|
return /*#__PURE__*/_jsxs(ArticleHeader, {
|
|
183
|
+
padded: true,
|
|
118
184
|
children: [/*#__PURE__*/_jsxs(ArticleHGroup, {
|
|
119
185
|
children: [!!contentType && /*#__PURE__*/_jsx(ContentTypeBadgeNew, {
|
|
120
186
|
contentType: contentType
|
|
@@ -167,8 +233,10 @@ export const Article = _ref3 => {
|
|
|
167
233
|
competenceGoals: competenceGoals,
|
|
168
234
|
lang: lang
|
|
169
235
|
}), /*#__PURE__*/_jsx(ArticleContent, {
|
|
236
|
+
padded: true,
|
|
170
237
|
children: content
|
|
171
238
|
}), /*#__PURE__*/_jsxs(ArticleFooter, {
|
|
239
|
+
padded: true,
|
|
172
240
|
children: [/*#__PURE__*/_jsx(ArticleByline, {
|
|
173
241
|
footnotes: footNotes,
|
|
174
242
|
authors: authors,
|
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { useCallback, useEffect, useState } from "react";
|
|
9
|
+
import { forwardRef, useCallback, useEffect, useState } from "react";
|
|
10
10
|
import { useTranslation } from "react-i18next";
|
|
11
11
|
import { useLocation } from "react-router-dom";
|
|
12
12
|
import { ArrowDownShortLine } from "@ndla/icons/common";
|
|
13
13
|
import { getLicenseByAbbreviation } from "@ndla/licenses";
|
|
14
14
|
import { AccordionItem, AccordionItemContent, AccordionItemIndicator, AccordionItemTrigger, AccordionRoot, Heading } from "@ndla/primitives";
|
|
15
15
|
import { styled } from "@ndla/styled-system/jsx";
|
|
16
|
-
import ArticleFootNotes from "./ArticleFootNotes";
|
|
16
|
+
import { ArticleFootNotes } from "./ArticleFootNotes";
|
|
17
17
|
import { LicenseLink } from "../LicenseByline/LicenseLink";
|
|
18
18
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
19
|
const Wrapper = styled("div", {
|
|
@@ -86,7 +86,7 @@ const StyledAccordionRoot = styled(AccordionRoot, {
|
|
|
86
86
|
});
|
|
87
87
|
const refRegexp = /note\d/;
|
|
88
88
|
const footnotesAccordionId = "footnotes";
|
|
89
|
-
const ArticleByline = _ref => {
|
|
89
|
+
export const ArticleByline = _ref => {
|
|
90
90
|
let {
|
|
91
91
|
authors = [],
|
|
92
92
|
suppliers = [],
|
|
@@ -145,46 +145,46 @@ const ArticleByline = _ref => {
|
|
|
145
145
|
multiple: true,
|
|
146
146
|
value: openAccordions,
|
|
147
147
|
onValueChange: details => setOpenAccordions(details.value),
|
|
148
|
-
children: [licenseBox && /*#__PURE__*/
|
|
148
|
+
children: [!!licenseBox && /*#__PURE__*/_jsx(ArticleBylineAccordionItem, {
|
|
149
149
|
value: accordionItemValue,
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
consumeCss: true,
|
|
154
|
-
textStyle: "label.medium",
|
|
155
|
-
fontWeight: "bold",
|
|
156
|
-
children: /*#__PURE__*/_jsx("h2", {
|
|
157
|
-
children: t("article.useContent")
|
|
158
|
-
})
|
|
159
|
-
}), /*#__PURE__*/_jsx(AccordionItemIndicator, {
|
|
160
|
-
asChild: true,
|
|
161
|
-
children: /*#__PURE__*/_jsx(ArrowDownShortLine, {})
|
|
162
|
-
})]
|
|
163
|
-
}), /*#__PURE__*/_jsx(AccordionItemContent, {
|
|
164
|
-
children: licenseBox
|
|
165
|
-
})]
|
|
166
|
-
}), !!footnotes?.length && /*#__PURE__*/_jsxs(AccordionItem, {
|
|
150
|
+
accordionTitle: t("article.useContent"),
|
|
151
|
+
children: licenseBox
|
|
152
|
+
}), !!footnotes?.length && /*#__PURE__*/_jsx(ArticleBylineAccordionItem, {
|
|
167
153
|
value: footnotesAccordionId,
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
textStyle: "label.medium",
|
|
173
|
-
fontWeight: "bold",
|
|
174
|
-
children: /*#__PURE__*/_jsx("h2", {
|
|
175
|
-
children: t("article.footnotes")
|
|
176
|
-
})
|
|
177
|
-
}), /*#__PURE__*/_jsx(AccordionItemIndicator, {
|
|
178
|
-
asChild: true,
|
|
179
|
-
children: /*#__PURE__*/_jsx(ArrowDownShortLine, {})
|
|
180
|
-
})]
|
|
181
|
-
}), /*#__PURE__*/_jsx(AccordionItemContent, {
|
|
182
|
-
children: /*#__PURE__*/_jsx(ArticleFootNotes, {
|
|
183
|
-
footNotes: footnotes
|
|
184
|
-
})
|
|
185
|
-
})]
|
|
154
|
+
accordionTitle: t("article.footnotes"),
|
|
155
|
+
children: /*#__PURE__*/_jsx(ArticleFootNotes, {
|
|
156
|
+
footNotes: footnotes
|
|
157
|
+
})
|
|
186
158
|
})]
|
|
187
159
|
})]
|
|
188
160
|
});
|
|
189
161
|
};
|
|
190
|
-
export
|
|
162
|
+
export const ArticleBylineAccordionItem = /*#__PURE__*/forwardRef((_ref2, ref) => {
|
|
163
|
+
let {
|
|
164
|
+
value,
|
|
165
|
+
accordionTitle,
|
|
166
|
+
children,
|
|
167
|
+
...props
|
|
168
|
+
} = _ref2;
|
|
169
|
+
return /*#__PURE__*/_jsxs(AccordionItem, {
|
|
170
|
+
value: value,
|
|
171
|
+
ref: ref,
|
|
172
|
+
...props,
|
|
173
|
+
children: [/*#__PURE__*/_jsxs(AccordionItemTrigger, {
|
|
174
|
+
children: [/*#__PURE__*/_jsx(Heading, {
|
|
175
|
+
asChild: true,
|
|
176
|
+
consumeCss: true,
|
|
177
|
+
textStyle: "label.medium",
|
|
178
|
+
fontWeight: "bold",
|
|
179
|
+
children: /*#__PURE__*/_jsx("h2", {
|
|
180
|
+
children: accordionTitle
|
|
181
|
+
})
|
|
182
|
+
}), /*#__PURE__*/_jsx(AccordionItemIndicator, {
|
|
183
|
+
asChild: true,
|
|
184
|
+
children: /*#__PURE__*/_jsx(ArrowDownShortLine, {})
|
|
185
|
+
})]
|
|
186
|
+
}), /*#__PURE__*/_jsx(AccordionItemContent, {
|
|
187
|
+
children: children
|
|
188
|
+
})]
|
|
189
|
+
});
|
|
190
|
+
});
|
|
@@ -48,7 +48,7 @@ const FootnoteList = styled("ol", {
|
|
|
48
48
|
listStyle: "none"
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
|
-
const ArticleFootNotes = _ref2 => {
|
|
51
|
+
export const ArticleFootNotes = _ref2 => {
|
|
52
52
|
let {
|
|
53
53
|
footNotes
|
|
54
54
|
} = _ref2;
|
|
@@ -57,5 +57,4 @@ const ArticleFootNotes = _ref2 => {
|
|
|
57
57
|
footNote: footNote
|
|
58
58
|
}, footNote.ref))
|
|
59
59
|
});
|
|
60
|
-
};
|
|
61
|
-
export default ArticleFootNotes;
|
|
60
|
+
};
|
package/es/Article/index.js
CHANGED
|
@@ -6,8 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export {
|
|
12
|
-
export { ArticleByline, ArticleFootNotes };
|
|
9
|
+
export { Article, ArticleWrapper, ArticleHeader, ArticleFooter, ArticleTitle, ArticleActionWrapper, ArticleHGroup, ArticleContent, ArticlePadding } from "./Article";
|
|
10
|
+
export { ArticleByline, ArticleBylineAccordionItem } from "./ArticleByline";
|
|
11
|
+
export { ArticleFootNotes } from "./ArticleFootNotes";
|
|
13
12
|
export { ArticleParagraph } from "./ArticleParagraph";
|
package/es/Grid/Grid.js
CHANGED
|
@@ -13,7 +13,6 @@ const GridContainer = styled("div", {
|
|
|
13
13
|
display: "grid",
|
|
14
14
|
justifyContent: "center",
|
|
15
15
|
borderRadius: "xsmall",
|
|
16
|
-
padding: "xsmall",
|
|
17
16
|
gridRowGap: "large",
|
|
18
17
|
gridColumnGap: "medium",
|
|
19
18
|
width: "100%",
|
|
@@ -63,6 +62,7 @@ const GridContainer = styled("div", {
|
|
|
63
62
|
},
|
|
64
63
|
border: {
|
|
65
64
|
lightBlue: {
|
|
65
|
+
padding: "xsmall",
|
|
66
66
|
border: "1px solid",
|
|
67
67
|
borderColor: "surface.brand.2"
|
|
68
68
|
}
|
package/es/index.js
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
export { ImageEmbed, getCrop, getFocalPoint, AudioEmbed, H5pEmbed, ExternalEmbed, IframeEmbed, FootnoteEmbed, BrightcoveEmbed, ContentLinkEmbed, RelatedContentEmbed, ConceptEmbed, ConceptListEmbed, UnknownEmbed, InlineConcept, BlockConcept, UuDisclaimerEmbed, CopyrightEmbed, CodeEmbed } from "./Embed";
|
|
13
13
|
export { LicenseLink, EmbedByline } from "./LicenseByline";
|
|
14
|
-
export { ArticleByline, ArticleFootNotes, ArticleWrapper, Article, ArticleParagraph, ArticleFooter, ArticleHeader, ArticleContent, ArticleHGroup, ArticleActionWrapper, ArticleTitle } from "./Article";
|
|
14
|
+
export { ArticleByline, ArticleFootNotes, ArticleWrapper, Article, ArticleParagraph, ArticleFooter, ArticleHeader, ArticleContent, ArticleHGroup, ArticleActionWrapper, ArticleTitle, ArticlePadding } from "./Article";
|
|
15
15
|
export { getPossiblyRelativeUrl } from "./utils/relativeUrl";
|
|
16
16
|
export { default as ContentLoader } from "./ContentLoader";
|
|
17
17
|
export { default as RelatedArticleList, RelatedArticle } from "./RelatedArticleList";
|
package/es/styles.css
CHANGED
|
@@ -85,28 +85,28 @@
|
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
.
|
|
89
|
-
|
|
88
|
+
.px_8\% {
|
|
89
|
+
padding-inline: 8%;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
.
|
|
93
|
-
|
|
92
|
+
.pbs_xsmall {
|
|
93
|
+
padding-block-start: var(--spacing-xsmall);
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
.
|
|
97
|
-
|
|
96
|
+
.pbe_xsmall {
|
|
97
|
+
padding-block-end: var(--spacing-xsmall);
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
.bg_surface\.default {
|
|
101
101
|
background: var(--colors-surface-default);
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
.
|
|
105
|
-
|
|
104
|
+
.d_flex {
|
|
105
|
+
display: flex;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
.
|
|
109
|
-
|
|
108
|
+
.c_text\.default {
|
|
109
|
+
color: var(--colors-text-default);
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
.w_100\% {
|
|
@@ -133,12 +133,12 @@
|
|
|
133
133
|
gap: var(--spacing-medium);
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
.
|
|
137
|
-
|
|
136
|
+
.gap_xxlarge {
|
|
137
|
+
gap: var(--spacing-xxlarge);
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
.
|
|
141
|
-
|
|
140
|
+
.mbs_medium {
|
|
141
|
+
margin-block-start: var(--spacing-medium);
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
.bd-t_1px_solid {
|
|
@@ -149,6 +149,10 @@
|
|
|
149
149
|
gap: var(--spacing-3xsmall);
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
+
.py_xsmall {
|
|
153
|
+
padding-block: var(--spacing-xsmall);
|
|
154
|
+
}
|
|
155
|
+
|
|
152
156
|
.pbs_xxlarge {
|
|
153
157
|
padding-block-start: var(--spacing-xxlarge);
|
|
154
158
|
}
|
|
@@ -362,10 +366,6 @@
|
|
|
362
366
|
display: inline;
|
|
363
367
|
}
|
|
364
368
|
|
|
365
|
-
.max-w_744px {
|
|
366
|
-
max-width: 744px;
|
|
367
|
-
}
|
|
368
|
-
|
|
369
369
|
.min-w_surface\.xxsmall {
|
|
370
370
|
min-width: var(--sizes-surface-xxsmall);
|
|
371
371
|
}
|
|
@@ -1424,8 +1424,11 @@
|
|
|
1424
1424
|
}
|
|
1425
1425
|
|
|
1426
1426
|
@media screen and (min-width: 37.5625rem) {
|
|
1427
|
-
.tablet\:
|
|
1428
|
-
padding-block: var(--spacing-medium);
|
|
1427
|
+
.tablet\:pbs_medium {
|
|
1428
|
+
padding-block-start: var(--spacing-medium);
|
|
1429
|
+
}
|
|
1430
|
+
.tablet\:pbe_medium {
|
|
1431
|
+
padding-block-end: var(--spacing-medium);
|
|
1429
1432
|
}
|
|
1430
1433
|
.tablet\:px_medium {
|
|
1431
1434
|
padding-inline: var(--spacing-medium);
|
|
@@ -1520,8 +1523,11 @@
|
|
|
1520
1523
|
}
|
|
1521
1524
|
|
|
1522
1525
|
@media screen and (min-width: 61.3125rem) {
|
|
1523
|
-
.desktop\:
|
|
1524
|
-
padding-block: var(--spacing-xxlarge);
|
|
1526
|
+
.desktop\:pbs_xxlarge {
|
|
1527
|
+
padding-block-start: var(--spacing-xxlarge);
|
|
1528
|
+
}
|
|
1529
|
+
.desktop\:pbe_xxlarge {
|
|
1530
|
+
padding-block-end: var(--spacing-xxlarge);
|
|
1525
1531
|
}
|
|
1526
1532
|
.desktop\:w_260px {
|
|
1527
1533
|
width: 260px;
|
package/lib/Article/Article.d.ts
CHANGED
|
@@ -8,18 +8,38 @@
|
|
|
8
8
|
import { ReactNode } from "react";
|
|
9
9
|
import { ContentType } from "../ContentTypeBadge/ContentTypeBadgeNew";
|
|
10
10
|
import { Article as ArticleType } from "../types";
|
|
11
|
+
export declare const ArticlePadding: import("@ndla/styled-system/types").StyledComponent<import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
12
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
13
|
+
} & import("@ark-ui/react").PolymorphicProps>, {
|
|
14
|
+
padStart?: boolean | undefined;
|
|
15
|
+
padEnd?: boolean | undefined;
|
|
16
|
+
}>;
|
|
11
17
|
export declare const ArticleContent: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("@ark-ui/react").PolymorphicProps & {
|
|
12
18
|
consumeCss?: boolean | undefined;
|
|
13
|
-
} & import("@ndla/styled-system/types").WithCss &
|
|
19
|
+
} & import("@ndla/styled-system/types").WithCss & {
|
|
20
|
+
padded?: boolean | undefined;
|
|
21
|
+
} & import("react").RefAttributes<HTMLElement>>;
|
|
14
22
|
export declare const ArticleWrapper: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
|
|
15
23
|
ref?: ((instance: HTMLElement | null) => void) | import("react").RefObject<HTMLElement> | null | undefined;
|
|
16
24
|
} & {
|
|
17
25
|
consumeCss?: boolean | undefined;
|
|
18
26
|
} & import("@ndla/styled-system/types").WithCss, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
19
|
-
export declare const ArticleHGroup: import("@ndla/styled-system/types").StyledComponent<"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
export declare const
|
|
27
|
+
export declare const ArticleHGroup: import("@ndla/styled-system/types").StyledComponent<import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
|
|
28
|
+
ref?: ((instance: HTMLElement | null) => void) | import("react").RefObject<HTMLElement> | null | undefined;
|
|
29
|
+
} & import("@ark-ui/react").PolymorphicProps>, {}>;
|
|
30
|
+
export declare const ArticleActionWrapper: import("@ndla/styled-system/types").StyledComponent<import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
31
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
32
|
+
} & import("@ark-ui/react").PolymorphicProps>, {}>;
|
|
33
|
+
export declare const ArticleHeader: import("@ndla/styled-system/types").StyledComponent<import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
|
|
34
|
+
ref?: ((instance: HTMLElement | null) => void) | import("react").RefObject<HTMLElement> | null | undefined;
|
|
35
|
+
} & import("@ark-ui/react").PolymorphicProps>, {
|
|
36
|
+
padded?: boolean | undefined;
|
|
37
|
+
}>;
|
|
38
|
+
export declare const ArticleFooter: import("@ndla/styled-system/types").StyledComponent<import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
|
|
39
|
+
ref?: ((instance: HTMLElement | null) => void) | import("react").RefObject<HTMLElement> | null | undefined;
|
|
40
|
+
} & import("@ark-ui/react").PolymorphicProps>, {
|
|
41
|
+
padded?: boolean | undefined;
|
|
42
|
+
}>;
|
|
23
43
|
interface ArticleTitleProps {
|
|
24
44
|
heartButton?: ReactNode;
|
|
25
45
|
contentType?: ContentType;
|