@ndla/ui 55.0.14-alpha.0 → 55.0.15-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 +22 -0
- package/dist/styles.css +86 -0
- package/es/Article/ArticleByline.js +7 -7
- package/es/AudioPlayer/AudioPlayer.js +1 -0
- package/es/Concept/Concept.js +2 -2
- package/es/ContactBlock/ContactBlock.js +17 -17
- package/es/Embed/BrightcoveEmbed.js +0 -1
- package/es/Embed/CopyrightEmbed.js +1 -2
- package/es/LicenseByline/EmbedByline.js +143 -33
- package/es/LicenseByline/LicenseLink.js +16 -9
- package/es/LicenseByline/index.js +2 -2
- package/es/index.js +0 -1
- package/es/styles.css +86 -0
- package/lib/Article/ArticleByline.js +8 -8
- package/lib/AudioPlayer/AudioPlayer.js +1 -0
- package/lib/Concept/Concept.js +1 -1
- package/lib/ContactBlock/ContactBlock.js +18 -18
- package/lib/Embed/BrightcoveEmbed.js +0 -1
- package/lib/Embed/CopyrightEmbed.js +1 -2
- package/lib/LicenseByline/EmbedByline.d.ts +2 -4
- package/lib/LicenseByline/EmbedByline.js +145 -35
- package/lib/LicenseByline/LicenseLink.d.ts +2 -2
- package/lib/LicenseByline/LicenseLink.js +16 -9
- package/lib/LicenseByline/index.d.ts +2 -2
- package/lib/LicenseByline/index.js +4 -5
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -13
- package/lib/styles.css +86 -0
- package/package.json +5 -5
- package/src/Article/ArticleByline.tsx +1 -1
- package/src/AudioPlayer/AudioPlayer.tsx +1 -0
- package/src/Concept/Concept.tsx +2 -2
- package/src/ContactBlock/ContactBlock.tsx +1 -1
- package/src/Embed/BrightcoveEmbed.tsx +1 -1
- package/src/Embed/CopyrightEmbed.tsx +1 -1
- package/src/LicenseByline/EmbedByline.stories.tsx +9 -4
- package/src/LicenseByline/EmbedByline.tsx +139 -53
- package/src/LicenseByline/LicenseLink.tsx +15 -15
- package/src/LicenseByline/index.tsx +2 -2
- package/src/index.ts +0 -1
- package/es/LicenseByline/LicenseDescription.js +0 -63
- package/es/List/OrderedList.js +0 -41
- package/es/List/UnOrderedList.js +0 -28
- package/es/List/index.js +0 -10
- package/lib/LicenseByline/LicenseDescription.d.ts +0 -15
- package/lib/LicenseByline/LicenseDescription.js +0 -70
- package/lib/List/OrderedList.d.ts +0 -16
- package/lib/List/OrderedList.js +0 -48
- package/lib/List/UnOrderedList.d.ts +0 -10
- package/lib/List/UnOrderedList.js +0 -35
- package/lib/List/index.d.ts +0 -9
- package/lib/List/index.js +0 -20
- package/src/LicenseByline/LicenseDescription.tsx +0 -100
- package/src/List/OrderedList.stories.tsx +0 -135
- package/src/List/OrderedList.tsx +0 -158
- package/src/List/UnOrderedList.tsx +0 -43
- package/src/List/UnorderedList.stories.tsx +0 -72
- package/src/List/index.ts +0 -10
|
@@ -123,7 +123,6 @@ const BrightcoveEmbed = _ref => {
|
|
|
123
123
|
type: "video",
|
|
124
124
|
copyright: data.copyright,
|
|
125
125
|
description: parsedDescription,
|
|
126
|
-
bottomRounded: true,
|
|
127
126
|
children: !!linkedVideoId && (0, _jsxRuntime.jsx)(LinkedVideoButton, {
|
|
128
127
|
size: "small",
|
|
129
128
|
variant: "secondary",
|
|
@@ -22,8 +22,7 @@ const CopyrightEmbed = _ref => {
|
|
|
22
22
|
return (0, _jsxRuntime.jsxs)("figure", {
|
|
23
23
|
children: [children, (0, _jsxRuntime.jsx)(_LicenseByline.EmbedByline, {
|
|
24
24
|
type: "copyright",
|
|
25
|
-
copyright: embed.embedData.copyright
|
|
26
|
-
bottomRounded: true
|
|
25
|
+
copyright: embed.embedData.copyright
|
|
27
26
|
})]
|
|
28
27
|
});
|
|
29
28
|
};
|
|
@@ -12,8 +12,6 @@ import { IDraftCopyright as ConceptCopyright } from "@ndla/types-backend/concept
|
|
|
12
12
|
import { ICopyright as ImageCopyright } from "@ndla/types-backend/image-api";
|
|
13
13
|
import { BrightcoveCopyright } from "@ndla/types-embed";
|
|
14
14
|
interface BaseProps {
|
|
15
|
-
topRounded?: boolean;
|
|
16
|
-
bottomRounded?: boolean;
|
|
17
15
|
description?: ReactNode;
|
|
18
16
|
children?: ReactNode;
|
|
19
17
|
visibleAlt?: string;
|
|
@@ -49,11 +47,11 @@ interface CopyrightProps extends BaseProps {
|
|
|
49
47
|
}
|
|
50
48
|
export type EmbedBylineTypeProps = ImageProps | BrightcoveProps | AudioProps | PodcastProps | ConceptProps | CopyrightProps;
|
|
51
49
|
type Props = EmbedBylineTypeProps | EmbedBylineErrorProps;
|
|
52
|
-
declare const EmbedByline: ({ type,
|
|
50
|
+
export declare const EmbedByline: ({ type, description, children, visibleAlt, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
53
51
|
interface LicenseContainerProps {
|
|
54
52
|
children?: ReactNode;
|
|
55
53
|
copyright: EmbedBylineTypeProps["copyright"];
|
|
56
54
|
type: Props["type"];
|
|
57
55
|
}
|
|
58
56
|
export declare const LicenseContainerContent: ({ children, copyright, type }: LicenseContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
59
|
-
export
|
|
57
|
+
export {};
|
|
@@ -3,16 +3,15 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
var
|
|
6
|
+
exports.LicenseContainerContent = exports.EmbedByline = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
8
|
var _reactI18next = require("react-i18next");
|
|
9
|
-
var _core = require("@ndla/core");
|
|
10
9
|
var _common = require("@ndla/icons/common");
|
|
11
10
|
var _licenses = require("@ndla/licenses");
|
|
12
|
-
var
|
|
13
|
-
var
|
|
11
|
+
var _primitives = require("@ndla/primitives");
|
|
12
|
+
var _jsx2 = require("@ndla/styled-system/jsx");
|
|
13
|
+
var _LicenseLink = require("./LicenseLink");
|
|
14
14
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
15
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
15
|
/**
|
|
17
16
|
* Copyright (c) 2023-present, NDLA.
|
|
18
17
|
*
|
|
@@ -21,19 +20,47 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
21
20
|
*
|
|
22
21
|
*/
|
|
23
22
|
|
|
24
|
-
const BylineWrapper =
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
23
|
+
const BylineWrapper = (0, _jsx2.styled)("figcaption", {
|
|
24
|
+
base: {
|
|
25
|
+
display: "flex",
|
|
26
|
+
flexDirection: "column",
|
|
27
|
+
paddingBlock: "xsmall",
|
|
28
|
+
background: "surface.default",
|
|
29
|
+
textStyle: "label.medium"
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
const ErrorBylineWrapper = (0, _jsx2.styled)(BylineWrapper, {
|
|
33
|
+
base: {
|
|
34
|
+
border: "1px solid",
|
|
35
|
+
borderColor: "stroke.error",
|
|
36
|
+
borderRadius: "xsmall",
|
|
37
|
+
background: "surface.dangerSubtle",
|
|
38
|
+
paddingInline: "medium",
|
|
39
|
+
paddingBlock: "medium"
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
const StyledText = (0, _jsx2.styled)(_primitives.Text, {
|
|
43
|
+
base: {
|
|
44
|
+
fontStyle: "italic"
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
const ContentWrapper = (0, _jsx2.styled)("div", {
|
|
48
|
+
base: {
|
|
49
|
+
display: "flex",
|
|
50
|
+
gap: "xsmall",
|
|
51
|
+
alignItems: "center",
|
|
52
|
+
textStyle: "label.medium"
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
const BaseDescription = (0, _jsx2.styled)("div", {
|
|
56
|
+
base: {
|
|
57
|
+
display: "inline-flex",
|
|
58
|
+
whiteSpace: "pre-wrap"
|
|
59
|
+
}
|
|
60
|
+
});
|
|
32
61
|
const EmbedByline = _ref => {
|
|
33
62
|
let {
|
|
34
63
|
type,
|
|
35
|
-
topRounded,
|
|
36
|
-
bottomRounded,
|
|
37
64
|
description,
|
|
38
65
|
children,
|
|
39
66
|
visibleAlt,
|
|
@@ -44,16 +71,15 @@ const EmbedByline = _ref => {
|
|
|
44
71
|
} = (0, _reactI18next.useTranslation)();
|
|
45
72
|
if (props.error) {
|
|
46
73
|
const typeString = type === "h5p" ? "H5P" : t(`embed.type.${type}`).toLowerCase();
|
|
47
|
-
return (0, _jsxRuntime.jsx)(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
})
|
|
74
|
+
return (0, _jsxRuntime.jsx)(ErrorBylineWrapper, {
|
|
75
|
+
children: (0, _jsxRuntime.jsxs)(ContentWrapper, {
|
|
76
|
+
children: [(0, _jsxRuntime.jsx)(_common.WarningOutline, {}), (0, _jsxRuntime.jsx)(BaseDescription, {
|
|
77
|
+
children: (0, _jsxRuntime.jsx)("span", {
|
|
78
|
+
children: t("embed.embedError", {
|
|
79
|
+
type: typeString
|
|
80
|
+
})
|
|
81
|
+
})
|
|
82
|
+
})]
|
|
57
83
|
})
|
|
58
84
|
});
|
|
59
85
|
}
|
|
@@ -69,17 +95,90 @@ const EmbedByline = _ref => {
|
|
|
69
95
|
children: description
|
|
70
96
|
}), children]
|
|
71
97
|
})
|
|
72
|
-
}), visibleAlt ? (0, _jsxRuntime.jsx)(
|
|
73
|
-
|
|
98
|
+
}), visibleAlt ? (0, _jsxRuntime.jsx)(StyledText, {
|
|
99
|
+
color: "text.subtle",
|
|
100
|
+
textStyle: "label.medium",
|
|
101
|
+
asChild: true,
|
|
102
|
+
consumeCss: true,
|
|
103
|
+
children: (0, _jsxRuntime.jsx)("span", {
|
|
104
|
+
children: `Alt: ${visibleAlt}`
|
|
105
|
+
})
|
|
74
106
|
}) : null]
|
|
75
107
|
});
|
|
76
108
|
};
|
|
77
|
-
|
|
109
|
+
exports.EmbedByline = EmbedByline;
|
|
110
|
+
const StyledDescription = (0, _jsx2.styled)(BaseDescription, {
|
|
111
|
+
base: {
|
|
112
|
+
mobileWideDown: {
|
|
113
|
+
display: "grid",
|
|
114
|
+
gridTemplateColumns: "1fr auto",
|
|
115
|
+
alignItems: "center",
|
|
116
|
+
overflow: "hidden",
|
|
117
|
+
_open: {
|
|
118
|
+
display: "inline"
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
const TextContent = (0, _jsx2.styled)("span", {
|
|
124
|
+
base: {
|
|
125
|
+
mobileWideDown: {
|
|
126
|
+
whiteSpace: "nowrap",
|
|
127
|
+
maxHeight: "large",
|
|
128
|
+
overflow: "hidden",
|
|
129
|
+
textOverflow: "ellipsis",
|
|
130
|
+
transitionProperty: "max-height",
|
|
131
|
+
transitionDuration: "slow",
|
|
132
|
+
transitionTimingFunction: "ease-in",
|
|
133
|
+
_open: {
|
|
134
|
+
whiteSpace: "pre-wrap",
|
|
135
|
+
maxHeight: "none"
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
const StyledButton = (0, _jsx2.styled)(_primitives.Button, {
|
|
141
|
+
base: {
|
|
142
|
+
mobileWide: {
|
|
143
|
+
display: "none"
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
const LicenseDescription = _ref2 => {
|
|
148
|
+
let {
|
|
149
|
+
children
|
|
150
|
+
} = _ref2;
|
|
151
|
+
const [isOpen, setIsOpen] = (0, _react.useState)(false);
|
|
152
|
+
const open = isOpen ? {
|
|
153
|
+
"data-open": ""
|
|
154
|
+
} : {};
|
|
155
|
+
const {
|
|
156
|
+
t
|
|
157
|
+
} = (0, _reactI18next.useTranslation)();
|
|
158
|
+
const handleToggle = () => {
|
|
159
|
+
setIsOpen(!isOpen);
|
|
160
|
+
};
|
|
161
|
+
return (0, _jsxRuntime.jsx)(ContentWrapper, {
|
|
162
|
+
children: (0, _jsxRuntime.jsxs)(StyledDescription, {
|
|
163
|
+
...open,
|
|
164
|
+
children: [(0, _jsxRuntime.jsx)(TextContent, {
|
|
165
|
+
...open,
|
|
166
|
+
children: children
|
|
167
|
+
}), (0, _jsxRuntime.jsx)(StyledButton, {
|
|
168
|
+
variant: "link",
|
|
169
|
+
size: "small",
|
|
170
|
+
onClick: handleToggle,
|
|
171
|
+
children: isOpen ? `${t("audio.readLessDescriptionLabel")}` : `${t("audio.readMoreDescriptionLabel")}`
|
|
172
|
+
})]
|
|
173
|
+
})
|
|
174
|
+
});
|
|
175
|
+
};
|
|
176
|
+
const LicenseContainerContent = _ref3 => {
|
|
78
177
|
let {
|
|
79
178
|
children,
|
|
80
179
|
copyright,
|
|
81
180
|
type
|
|
82
|
-
} =
|
|
181
|
+
} = _ref3;
|
|
83
182
|
const {
|
|
84
183
|
t,
|
|
85
184
|
i18n
|
|
@@ -87,14 +186,25 @@ const LicenseContainerContent = _ref2 => {
|
|
|
87
186
|
const license = copyright ? (0, _licenses.getLicenseByAbbreviation)(copyright.license?.license ?? "", i18n.language) : undefined;
|
|
88
187
|
const authors = (0, _licenses.getLicenseCredits)(copyright);
|
|
89
188
|
const captionAuthors = Object.values(authors).find(i => i.length > 0) ?? [];
|
|
90
|
-
const
|
|
91
|
-
return (0, _jsxRuntime.jsxs)(Component, {
|
|
189
|
+
const content = (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
92
190
|
children: [children, ` ${t(`embed.type.${type}`)}${captionAuthors.length ? ": " : ""}`, captionAuthors.map(author => author.name).join(", "), license ? (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
93
|
-
children: [" / ", (0, _jsxRuntime.jsx)(_LicenseLink.
|
|
191
|
+
children: [" / ", (0, _jsxRuntime.jsx)(_LicenseLink.LicenseLink, {
|
|
94
192
|
license: license
|
|
95
193
|
})]
|
|
96
194
|
}) : null]
|
|
97
195
|
});
|
|
196
|
+
if (children) {
|
|
197
|
+
return (0, _jsxRuntime.jsx)(LicenseDescription, {
|
|
198
|
+
children: content
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
return (0, _jsxRuntime.jsx)(_primitives.Text, {
|
|
202
|
+
textStyle: "label.medium",
|
|
203
|
+
asChild: true,
|
|
204
|
+
consumeCss: true,
|
|
205
|
+
children: (0, _jsxRuntime.jsx)("span", {
|
|
206
|
+
children: content
|
|
207
|
+
})
|
|
208
|
+
});
|
|
98
209
|
};
|
|
99
|
-
exports.LicenseContainerContent = LicenseContainerContent;
|
|
100
|
-
var _default = exports.default = EmbedByline;
|
|
210
|
+
exports.LicenseContainerContent = LicenseContainerContent;
|
|
@@ -9,5 +9,5 @@ import { LicenseLocaleType } from "@ndla/licenses";
|
|
|
9
9
|
interface Props {
|
|
10
10
|
license: LicenseLocaleType;
|
|
11
11
|
}
|
|
12
|
-
declare const LicenseLink: ({ license }: Props) => import("react/jsx-runtime").JSX.Element | null;
|
|
13
|
-
export
|
|
12
|
+
export declare const LicenseLink: ({ license }: Props) => import("react/jsx-runtime").JSX.Element | null;
|
|
13
|
+
export {};
|
|
@@ -3,12 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
var _base = _interopRequireDefault(require("@emotion/styled/base"));
|
|
8
|
-
var _core = require("@ndla/core");
|
|
6
|
+
exports.LicenseLink = void 0;
|
|
9
7
|
var _safelink = require("@ndla/safelink");
|
|
8
|
+
var _jsx2 = require("@ndla/styled-system/jsx");
|
|
10
9
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
11
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
10
|
/**
|
|
13
11
|
* Copyright (c) 2023-present, NDLA.
|
|
14
12
|
*
|
|
@@ -17,10 +15,19 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
17
15
|
*
|
|
18
16
|
*/
|
|
19
17
|
|
|
20
|
-
const StyledSafeLink =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
const StyledSafeLink = (0, _jsx2.styled)(_safelink.SafeLink, {
|
|
19
|
+
base: {
|
|
20
|
+
color: "primary",
|
|
21
|
+
textDecoration: "underline",
|
|
22
|
+
whiteSpace: "nowrap",
|
|
23
|
+
_hover: {
|
|
24
|
+
textDecoration: "none"
|
|
25
|
+
},
|
|
26
|
+
_focusWithin: {
|
|
27
|
+
textDecoration: "none"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
});
|
|
24
31
|
const LicenseLink = _ref => {
|
|
25
32
|
let {
|
|
26
33
|
license
|
|
@@ -39,4 +46,4 @@ const LicenseLink = _ref => {
|
|
|
39
46
|
children: license.abbreviation
|
|
40
47
|
});
|
|
41
48
|
};
|
|
42
|
-
|
|
49
|
+
exports.LicenseLink = LicenseLink;
|
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
8
|
+
export { EmbedByline } from "./EmbedByline";
|
|
9
|
+
export { LicenseLink } from "./LicenseLink";
|
|
@@ -6,15 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
Object.defineProperty(exports, "EmbedByline", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function () {
|
|
9
|
-
return _EmbedByline.
|
|
9
|
+
return _EmbedByline.EmbedByline;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "LicenseLink", {
|
|
13
13
|
enumerable: true,
|
|
14
14
|
get: function () {
|
|
15
|
-
return _LicenseLink.
|
|
15
|
+
return _LicenseLink.LicenseLink;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
var _EmbedByline =
|
|
19
|
-
var _LicenseLink =
|
|
20
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
|
+
var _EmbedByline = require("./EmbedByline");
|
|
19
|
+
var _LicenseLink = require("./LicenseLink");
|
package/lib/index.d.ts
CHANGED
|
@@ -49,7 +49,6 @@ export type { Snack, SnackContext } from "./SnackBar";
|
|
|
49
49
|
export { TreeStructure } from "./TreeStructure";
|
|
50
50
|
export type { TreeStructureProps } from "./TreeStructure";
|
|
51
51
|
export { SearchField, SearchResultList, SearchResultItem, ActiveFilters } from "./Search";
|
|
52
|
-
export { OrderedList, UnOrderedList } from "./List";
|
|
53
52
|
export { BlogPostV2 } from "./BlogPost";
|
|
54
53
|
export { ProgrammeCard } from "./ProgrammeCard";
|
|
55
54
|
export { KeyFigure } from "./KeyFigure";
|
package/lib/index.js
CHANGED
|
@@ -429,12 +429,6 @@ Object.defineProperty(exports, "OneColumn", {
|
|
|
429
429
|
return _Layout.OneColumn;
|
|
430
430
|
}
|
|
431
431
|
});
|
|
432
|
-
Object.defineProperty(exports, "OrderedList", {
|
|
433
|
-
enumerable: true,
|
|
434
|
-
get: function () {
|
|
435
|
-
return _List.OrderedList;
|
|
436
|
-
}
|
|
437
|
-
});
|
|
438
432
|
Object.defineProperty(exports, "PageContainer", {
|
|
439
433
|
enumerable: true,
|
|
440
434
|
get: function () {
|
|
@@ -615,12 +609,6 @@ Object.defineProperty(exports, "TreeStructure", {
|
|
|
615
609
|
return _TreeStructure.TreeStructure;
|
|
616
610
|
}
|
|
617
611
|
});
|
|
618
|
-
Object.defineProperty(exports, "UnOrderedList", {
|
|
619
|
-
enumerable: true,
|
|
620
|
-
get: function () {
|
|
621
|
-
return _List.UnOrderedList;
|
|
622
|
-
}
|
|
623
|
-
});
|
|
624
612
|
Object.defineProperty(exports, "UnknownEmbed", {
|
|
625
613
|
enumerable: true,
|
|
626
614
|
get: function () {
|
|
@@ -791,7 +779,6 @@ var _TagSelector = require("./TagSelector/TagSelector");
|
|
|
791
779
|
var _SnackBar = require("./SnackBar");
|
|
792
780
|
var _TreeStructure = require("./TreeStructure");
|
|
793
781
|
var _Search = require("./Search");
|
|
794
|
-
var _List = require("./List");
|
|
795
782
|
var _BlogPost = require("./BlogPost");
|
|
796
783
|
var _ProgrammeCard = require("./ProgrammeCard");
|
|
797
784
|
var _KeyFigure = require("./KeyFigure");
|
package/lib/styles.css
CHANGED
|
@@ -73,6 +73,10 @@
|
|
|
73
73
|
box-shadow: var(--shadows-full);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
+
.mbe_4xsmall {
|
|
77
|
+
margin-block-end: var(--spacing-4xsmall);
|
|
78
|
+
}
|
|
79
|
+
|
|
76
80
|
.ov_hidden {
|
|
77
81
|
overflow: hidden;
|
|
78
82
|
}
|
|
@@ -415,6 +419,26 @@
|
|
|
415
419
|
background: var(--colors-surface-default);
|
|
416
420
|
}
|
|
417
421
|
|
|
422
|
+
.bg_surface\.dangerSubtle {
|
|
423
|
+
background: var(--colors-surface-danger-subtle);
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
.d_inline-flex {
|
|
427
|
+
display: inline-flex;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
.white-space_pre-wrap {
|
|
431
|
+
white-space: pre-wrap;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
.c_primary {
|
|
435
|
+
color: var(--colors-primary);
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
.white-space_nowrap {
|
|
439
|
+
white-space: nowrap;
|
|
440
|
+
}
|
|
441
|
+
|
|
418
442
|
.c_icon\.strong {
|
|
419
443
|
color: var(--colors-icon-strong);
|
|
420
444
|
}
|
|
@@ -604,6 +628,10 @@
|
|
|
604
628
|
font-style: italic;
|
|
605
629
|
}
|
|
606
630
|
|
|
631
|
+
.bd-c_stroke\.error {
|
|
632
|
+
border-color: var(--colors-stroke-error);
|
|
633
|
+
}
|
|
634
|
+
|
|
607
635
|
.grid-tc_repeat\(2\,_1fr\) {
|
|
608
636
|
grid-template-columns: repeat(2, 1fr);
|
|
609
637
|
}
|
|
@@ -926,6 +954,10 @@
|
|
|
926
954
|
content: "";
|
|
927
955
|
}
|
|
928
956
|
|
|
957
|
+
.focusWithin\:td_none:focus-within {
|
|
958
|
+
text-decoration: none;
|
|
959
|
+
}
|
|
960
|
+
|
|
929
961
|
.focusVisible\:ring_none:is(:focus-visible, [data-focus-visible]) {
|
|
930
962
|
outline: 2px solid transparent;
|
|
931
963
|
outline-offset: 2px;
|
|
@@ -1042,6 +1074,9 @@
|
|
|
1042
1074
|
@media screen and (min-width: 29.75rem) {
|
|
1043
1075
|
.mobileWide\:max-w_surface\.medium {
|
|
1044
1076
|
max-width: var(--sizes-surface-medium);
|
|
1077
|
+
}
|
|
1078
|
+
.mobileWide\:d_none {
|
|
1079
|
+
display: none;
|
|
1045
1080
|
}
|
|
1046
1081
|
}
|
|
1047
1082
|
|
|
@@ -1157,8 +1192,59 @@
|
|
|
1157
1192
|
}
|
|
1158
1193
|
|
|
1159
1194
|
@media screen and (max-width: 29.7475rem) {
|
|
1195
|
+
.mobileWideDown\:d_grid {
|
|
1196
|
+
display: grid;
|
|
1197
|
+
}
|
|
1198
|
+
.mobileWideDown\:ov_hidden {
|
|
1199
|
+
overflow: hidden;
|
|
1200
|
+
}
|
|
1201
|
+
.mobileWideDown\:white-space_nowrap {
|
|
1202
|
+
white-space: nowrap;
|
|
1203
|
+
}
|
|
1204
|
+
.mobileWideDown\:max-h_large {
|
|
1205
|
+
max-height: var(--sizes-large);
|
|
1206
|
+
}
|
|
1207
|
+
.mobileWideDown\:tov_ellipsis {
|
|
1208
|
+
text-overflow: ellipsis;
|
|
1209
|
+
}
|
|
1160
1210
|
.mobileWideDown\:cg_3xsmall {
|
|
1161
1211
|
column-gap: var(--spacing-3xsmall);
|
|
1212
|
+
}
|
|
1213
|
+
.mobileWideDown\:grid-tc_1fr_auto {
|
|
1214
|
+
grid-template-columns: 1fr auto;
|
|
1215
|
+
}
|
|
1216
|
+
.mobileWideDown\:ai_center {
|
|
1217
|
+
align-items: center;
|
|
1218
|
+
}
|
|
1219
|
+
.mobileWideDown\:trs-prop_max-height {
|
|
1220
|
+
--transition-prop: max-height;
|
|
1221
|
+
transition-property: max-height;
|
|
1222
|
+
}
|
|
1223
|
+
.mobileWideDown\:trs-dur_slow {
|
|
1224
|
+
--transition-duration: var(--durations-slow);
|
|
1225
|
+
transition-duration: var(--durations-slow);
|
|
1226
|
+
}
|
|
1227
|
+
.mobileWideDown\:trs-tmf_ease-in {
|
|
1228
|
+
--transition-easing: ease-in;
|
|
1229
|
+
transition-timing-function: ease-in;
|
|
1230
|
+
}
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
@media screen and (max-width: 29.7475rem) {
|
|
1234
|
+
.mobileWideDown\:open\:d_inline:is([open], [data-open], [data-state="open"]) {
|
|
1235
|
+
display: inline;
|
|
1236
|
+
}
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
@media screen and (max-width: 29.7475rem) {
|
|
1240
|
+
.mobileWideDown\:open\:white-space_pre-wrap:is([open], [data-open], [data-state="open"]) {
|
|
1241
|
+
white-space: pre-wrap;
|
|
1242
|
+
}
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
@media screen and (max-width: 29.7475rem) {
|
|
1246
|
+
.mobileWideDown\:open\:max-h_none:is([open], [data-open], [data-state="open"]) {
|
|
1247
|
+
max-height: none;
|
|
1162
1248
|
}
|
|
1163
1249
|
}
|
|
1164
1250
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ndla/ui",
|
|
3
|
-
"version": "55.0.
|
|
3
|
+
"version": "55.0.15-alpha.0",
|
|
4
4
|
"description": "UI component library for NDLA",
|
|
5
5
|
"license": "GPL-3.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -37,13 +37,13 @@
|
|
|
37
37
|
"@ndla/button": "^14.0.7-alpha.0",
|
|
38
38
|
"@ndla/core": "^5.0.1",
|
|
39
39
|
"@ndla/dropdown-menu": "^1.0.38",
|
|
40
|
-
"@ndla/forms": "^9.0.
|
|
40
|
+
"@ndla/forms": "^9.0.8-alpha.0",
|
|
41
41
|
"@ndla/hooks": "^2.1.8",
|
|
42
42
|
"@ndla/icons": "^7.0.8-alpha.0",
|
|
43
43
|
"@ndla/licenses": "^8.0.0-alpha.0",
|
|
44
44
|
"@ndla/modal": "^7.0.7-alpha.0",
|
|
45
|
-
"@ndla/primitives": "^0.0.
|
|
46
|
-
"@ndla/safelink": "^6.0.
|
|
45
|
+
"@ndla/primitives": "^0.0.19",
|
|
46
|
+
"@ndla/safelink": "^6.0.2-alpha.0",
|
|
47
47
|
"@ndla/styled-system": "^0.0.8",
|
|
48
48
|
"@ndla/tooltip": "^8.0.1",
|
|
49
49
|
"@ndla/typography": "^0.4.23",
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
"publishConfig": {
|
|
80
80
|
"access": "public"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "3675a902b9f44f5afb37c648038b8d90f1ccd7d0"
|
|
83
83
|
}
|
|
@@ -15,7 +15,7 @@ import { AccordionRoot, AccordionHeader, AccordionContent, AccordionItem } from
|
|
|
15
15
|
import { breakpoints, colors, fonts, mq, spacing } from "@ndla/core";
|
|
16
16
|
import { getLicenseByAbbreviation } from "@ndla/licenses";
|
|
17
17
|
import ArticleFootNotes from "./ArticleFootNotes";
|
|
18
|
-
import LicenseLink from "../LicenseByline/LicenseLink";
|
|
18
|
+
import { LicenseLink } from "../LicenseByline/LicenseLink";
|
|
19
19
|
import { FootNote } from "../types";
|
|
20
20
|
|
|
21
21
|
const Wrapper = styled.div`
|
package/src/Concept/Concept.tsx
CHANGED
|
@@ -12,7 +12,7 @@ import { styled } from "@ndla/styled-system/jsx";
|
|
|
12
12
|
import { IDraftCopyright as ConceptCopyright } from "@ndla/types-backend/concept-api";
|
|
13
13
|
import { ConceptVisualElementMeta } from "@ndla/types-embed";
|
|
14
14
|
import { BrightcoveEmbed, ExternalEmbed, H5pEmbed, IframeEmbed, ImageEmbed } from "../Embed";
|
|
15
|
-
import { LicenseContainerContent } from "../LicenseByline/EmbedByline";
|
|
15
|
+
import { EmbedByline, LicenseContainerContent } from "../LicenseByline/EmbedByline";
|
|
16
16
|
|
|
17
17
|
export interface ConceptProps extends ComponentPropsWithRef<"figure"> {
|
|
18
18
|
copyright?: ConceptCopyright;
|
|
@@ -66,7 +66,7 @@ export const Concept = forwardRef<HTMLElement, ConceptProps>(
|
|
|
66
66
|
) : visualElement?.resource === "external" ? (
|
|
67
67
|
<ExternalEmbed embed={visualElement} />
|
|
68
68
|
) : null}
|
|
69
|
-
{copyright && <
|
|
69
|
+
{copyright && <EmbedByline copyright={copyright} type="concept" />}
|
|
70
70
|
</StyledFigure>
|
|
71
71
|
);
|
|
72
72
|
},
|
|
@@ -18,7 +18,7 @@ import { Image } from "@ndla/primitives";
|
|
|
18
18
|
import { IAuthor, IImageMetaInformationV3 } from "@ndla/types-backend/image-api";
|
|
19
19
|
import { CanonicalUrlFuncs } from "../Embed";
|
|
20
20
|
import { errorSvgSrc } from "../Embed/ImageEmbed";
|
|
21
|
-
import LicenseLink from "../LicenseByline/LicenseLink";
|
|
21
|
+
import { LicenseLink } from "../LicenseByline/LicenseLink";
|
|
22
22
|
|
|
23
23
|
const BLOB_WIDTH = 90;
|
|
24
24
|
|
|
@@ -113,7 +113,7 @@ const BrightcoveEmbed = ({ embed, renderContext = "article" }: Props) => {
|
|
|
113
113
|
allowFullScreen
|
|
114
114
|
/>
|
|
115
115
|
</div>
|
|
116
|
-
<EmbedByline type="video" copyright={data.copyright!} description={parsedDescription}
|
|
116
|
+
<EmbedByline type="video" copyright={data.copyright!} description={parsedDescription}>
|
|
117
117
|
{/* TODO: Figure out if this button should still be here. If yes, figure out what it should look like. */}
|
|
118
118
|
{!!linkedVideoId && (
|
|
119
119
|
<LinkedVideoButton size="small" variant="secondary" onClick={() => setShowOriginalVideo((p) => !p)}>
|
|
@@ -19,7 +19,7 @@ const CopyrightEmbed = ({ embed, children }: Props) => {
|
|
|
19
19
|
return (
|
|
20
20
|
<figure>
|
|
21
21
|
{children}
|
|
22
|
-
<EmbedByline type="copyright" copyright={embed.embedData.copyright}
|
|
22
|
+
<EmbedByline type="copyright" copyright={embed.embedData.copyright} />
|
|
23
23
|
</figure>
|
|
24
24
|
);
|
|
25
25
|
};
|