@ndla/ui 56.0.77-alpha.0 → 56.0.79-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 +0 -1
- package/dist/styles.css +0 -12
- package/es/Article/ArticleByline.js +12 -12
- package/es/AudioPlayer/Controls.js +8 -6
- package/es/Breadcrumb/BreadcrumbItem.js +1 -1
- package/es/locale/messages-en.js +1 -0
- package/es/locale/messages-nb.js +1 -0
- package/es/locale/messages-nn.js +1 -0
- package/es/locale/messages-se.js +1 -0
- package/es/locale/messages-sma.js +1 -0
- package/lib/Article/Article.d.ts +4 -12
- package/lib/Article/ArticleByline.js +12 -12
- package/lib/AudioPlayer/Controls.js +8 -6
- package/lib/Breadcrumb/BreadcrumbItem.js +1 -1
- package/lib/Concept/Concept.d.ts +1 -1
- package/lib/ContactBlock/ContactBlock.d.ts +2 -2
- package/lib/Embed/ConceptInlineTriggerButton.d.ts +1 -3
- package/lib/Embed/InlineTriggerButton.d.ts +1 -3
- package/lib/Embed/types.d.ts +2 -2
- package/lib/FileList/FileList.d.ts +1 -3
- package/lib/Gloss/Gloss.d.ts +2 -2
- package/lib/Gloss/GlossExample.d.ts +2 -2
- package/lib/KeyFigure/KeyFigure.d.ts +1 -1
- package/lib/LicenseByline/EmbedByline.d.ts +4 -4
- package/lib/RelatedArticleList/RelatedArticleList.d.ts +2 -2
- package/lib/locale/messages-en.d.ts +1 -0
- package/lib/locale/messages-en.js +1 -0
- package/lib/locale/messages-nb.d.ts +1 -0
- package/lib/locale/messages-nb.js +1 -0
- package/lib/locale/messages-nn.d.ts +1 -0
- package/lib/locale/messages-nn.js +1 -0
- package/lib/locale/messages-se.d.ts +1 -0
- package/lib/locale/messages-se.js +1 -0
- package/lib/locale/messages-sma.d.ts +1 -0
- package/lib/locale/messages-sma.js +1 -0
- package/package.json +9 -9
- package/src/Article/ArticleByline.tsx +10 -8
- package/src/AudioPlayer/Controls.tsx +3 -3
- package/src/Breadcrumb/BreadcrumbItem.tsx +1 -1
- package/src/Concept/Concept.tsx +1 -1
- package/src/ContactBlock/ContactBlock.tsx +2 -2
- package/src/Embed/ImageEmbed.stories.tsx +2 -2
- package/src/Embed/types.ts +2 -2
- package/src/FactBox/FactBox.tsx +1 -1
- package/src/Gloss/Gloss.tsx +4 -4
- package/src/Gloss/GlossExample.tsx +2 -2
- package/src/KeyFigure/KeyFigure.stories.tsx +3 -3
- package/src/KeyFigure/KeyFigure.tsx +1 -1
- package/src/LicenseByline/EmbedByline.tsx +4 -4
- package/src/Pitch/Pitch.stories.tsx +2 -2
- package/src/RelatedArticleList/RelatedArticleList.tsx +2 -2
- package/src/locale/messages-en.ts +1 -0
- package/src/locale/messages-nb.ts +1 -0
- package/src/locale/messages-nn.ts +1 -0
- package/src/locale/messages-se.ts +1 -0
- package/src/locale/messages-sma.ts +1 -0
|
@@ -99,7 +99,6 @@
|
|
|
99
99
|
"height]___[value:surface.3xsmall",
|
|
100
100
|
"minWidth]___[value:small",
|
|
101
101
|
"paddingInline]___[value:small",
|
|
102
|
-
"srOnly]___[value:true",
|
|
103
102
|
"flexWrap]___[value:wrap",
|
|
104
103
|
"alignItems]___[value:flex-start]___[cond:mobileDown",
|
|
105
104
|
"justifyContent]___[value:center]___[cond:mobileDown",
|
package/dist/styles.css
CHANGED
|
@@ -321,18 +321,6 @@
|
|
|
321
321
|
padding-inline: var(--spacing-small);
|
|
322
322
|
}
|
|
323
323
|
|
|
324
|
-
.sr_true {
|
|
325
|
-
position: absolute;
|
|
326
|
-
width: 1px;
|
|
327
|
-
height: 1px;
|
|
328
|
-
padding: 0;
|
|
329
|
-
margin: -1px;
|
|
330
|
-
overflow: hidden;
|
|
331
|
-
clip: rect(0, 0, 0, 0);
|
|
332
|
-
white-space: nowrap;
|
|
333
|
-
border-width: 0;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
324
|
.c_inherit {
|
|
337
325
|
color: inherit;
|
|
338
326
|
}
|
|
@@ -160,19 +160,19 @@ export const ArticleBylineAccordionItem = /*#__PURE__*/forwardRef((_ref2, ref) =
|
|
|
160
160
|
value: value,
|
|
161
161
|
ref: ref,
|
|
162
162
|
...props,
|
|
163
|
-
children: [/*#__PURE__*/
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
children: /*#__PURE__*/
|
|
170
|
-
children: accordionTitle
|
|
163
|
+
children: [/*#__PURE__*/_jsx(Heading, {
|
|
164
|
+
asChild: true,
|
|
165
|
+
consumeCss: true,
|
|
166
|
+
textStyle: "label.medium",
|
|
167
|
+
fontWeight: "bold",
|
|
168
|
+
children: /*#__PURE__*/_jsx("h2", {
|
|
169
|
+
children: /*#__PURE__*/_jsxs(AccordionItemTrigger, {
|
|
170
|
+
children: [accordionTitle, /*#__PURE__*/_jsx(AccordionItemIndicator, {
|
|
171
|
+
asChild: true,
|
|
172
|
+
children: /*#__PURE__*/_jsx(ArrowDownShortLine, {})
|
|
173
|
+
})]
|
|
171
174
|
})
|
|
172
|
-
})
|
|
173
|
-
asChild: true,
|
|
174
|
-
children: /*#__PURE__*/_jsx(ArrowDownShortLine, {})
|
|
175
|
-
})]
|
|
175
|
+
})
|
|
176
176
|
}), /*#__PURE__*/_jsx(AccordionItemContent, {
|
|
177
177
|
children: children
|
|
178
178
|
})]
|
|
@@ -12,7 +12,6 @@ import { createListCollection } from "@ark-ui/react";
|
|
|
12
12
|
import { Replay15Line, Forward15Line, PlayFill, PauseLine, VolumeUpFill, CheckLine } from "@ndla/icons";
|
|
13
13
|
import { Button, FieldRoot, IconButton, PopoverContent, PopoverRoot, PopoverTrigger, SelectContent, SelectControl, SelectItem, SelectItemIndicator, SelectItemText, SelectLabel, SelectRoot, SelectTrigger, SliderControl, SliderHiddenInput, SliderLabel, SliderRange, SliderRoot, SliderThumb, SliderTrack, Text } from "@ndla/primitives";
|
|
14
14
|
import { styled } from "@ndla/styled-system/jsx";
|
|
15
|
-
import { visuallyHidden } from "@ndla/styled-system/patterns";
|
|
16
15
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
16
|
const ControlsWrapper = styled("div", {
|
|
18
17
|
base: {
|
|
@@ -230,7 +229,7 @@ const Controls = _ref => {
|
|
|
230
229
|
children: /*#__PURE__*/_jsx("div", {
|
|
231
230
|
children: formatTime(currentTime)
|
|
232
231
|
})
|
|
233
|
-
}), /*#__PURE__*/
|
|
232
|
+
}), /*#__PURE__*/_jsxs(SliderRoot, {
|
|
234
233
|
value: [audioRef.current?.currentTime ?? 0],
|
|
235
234
|
defaultValue: [0],
|
|
236
235
|
step: 1,
|
|
@@ -240,14 +239,17 @@ const Controls = _ref => {
|
|
|
240
239
|
start: formatTime(Math.round(value.value)),
|
|
241
240
|
end: formatTime(Math.round(audioRef.current?.duration ?? 0))
|
|
242
241
|
}),
|
|
243
|
-
children: /*#__PURE__*/
|
|
242
|
+
children: [/*#__PURE__*/_jsx(SliderLabel, {
|
|
243
|
+
srOnly: true,
|
|
244
|
+
children: t("audio.progressBar")
|
|
245
|
+
}), /*#__PURE__*/_jsxs(SliderControl, {
|
|
244
246
|
children: [/*#__PURE__*/_jsx(SliderTrack, {
|
|
245
247
|
children: /*#__PURE__*/_jsx(SliderRange, {})
|
|
246
248
|
}), /*#__PURE__*/_jsx(SliderThumb, {
|
|
247
249
|
index: 0,
|
|
248
250
|
children: /*#__PURE__*/_jsx(SliderHiddenInput, {})
|
|
249
251
|
})]
|
|
250
|
-
})
|
|
252
|
+
})]
|
|
251
253
|
}), /*#__PURE__*/_jsx(StyledText, {
|
|
252
254
|
textStyle: "label.medium",
|
|
253
255
|
asChild: true,
|
|
@@ -265,7 +267,7 @@ const Controls = _ref => {
|
|
|
265
267
|
placement: "top"
|
|
266
268
|
},
|
|
267
269
|
children: [/*#__PURE__*/_jsx(SelectLabel, {
|
|
268
|
-
|
|
270
|
+
srOnly: true,
|
|
269
271
|
children: t("audio.controls.selectSpeed")
|
|
270
272
|
}), /*#__PURE__*/_jsx(SelectControl, {
|
|
271
273
|
children: /*#__PURE__*/_jsx(SelectTrigger, {
|
|
@@ -311,7 +313,7 @@ const Controls = _ref => {
|
|
|
311
313
|
step: 1,
|
|
312
314
|
onValueChange: handleVolumeSliderChange,
|
|
313
315
|
children: [/*#__PURE__*/_jsx(SliderLabel, {
|
|
314
|
-
|
|
316
|
+
srOnly: true,
|
|
315
317
|
children: t("audio.controls.adjustVolume")
|
|
316
318
|
}), /*#__PURE__*/_jsxs(StyledSliderControl, {
|
|
317
319
|
children: [/*#__PURE__*/_jsx(SliderTrack, {
|
|
@@ -34,7 +34,7 @@ const BreadcrumbItem = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
34
34
|
item,
|
|
35
35
|
totalCount
|
|
36
36
|
} = _ref;
|
|
37
|
-
const liRef = useRef();
|
|
37
|
+
const liRef = useRef(null);
|
|
38
38
|
useImperativeHandle(ref, () => ({
|
|
39
39
|
setMaxWidth: maxWidth => {
|
|
40
40
|
liRef.current.children[0].style.maxWidth = maxWidth;
|
package/es/locale/messages-en.js
CHANGED
package/es/locale/messages-nb.js
CHANGED
|
@@ -817,6 +817,7 @@ const messages = {
|
|
|
817
817
|
pause: "Pause",
|
|
818
818
|
download: "Last ned lydfil",
|
|
819
819
|
reuse: "Bruk lydfil",
|
|
820
|
+
progressBar: "Fremdriftsindikator",
|
|
820
821
|
error: {
|
|
821
822
|
url: "Feil ved lasting av lydfil.",
|
|
822
823
|
caption: "Beklager, en feil oppstod ved lasting av lydfil."
|
package/es/locale/messages-nn.js
CHANGED
package/es/locale/messages-se.js
CHANGED
|
@@ -817,6 +817,7 @@ const messages = {
|
|
|
817
817
|
pause: "Boatkke",
|
|
818
818
|
download: "Viečča jietnafiilla",
|
|
819
819
|
reuse: "Geavat jietnafiilla",
|
|
820
|
+
progressBar: "Fremdriftsindikator",
|
|
820
821
|
error: {
|
|
821
822
|
url: "Boasttuvuohta jietnafiilla viežžamis.",
|
|
822
823
|
caption: "Šállošat, boasttuvuohta čuožžilii jietnafiilla viežžamis."
|
|
@@ -817,6 +817,7 @@ const messages = {
|
|
|
817
817
|
pause: "Pause",
|
|
818
818
|
download: "Veedtjh tjoeje-fijlem",
|
|
819
819
|
reuse: "Nuhtjh tjoeje-fijlem",
|
|
820
|
+
progressBar: "Fremdriftsindikator",
|
|
820
821
|
error: {
|
|
821
822
|
url: "Fiejlie tjoeje-veedtjemisnie.",
|
|
822
823
|
caption: "Gaatesjen, fiejlie sjïdti tjoeje-veedtjemisnie."
|
package/lib/Article/Article.d.ts
CHANGED
|
@@ -11,20 +11,12 @@ import type { Article as ArticleType } from "../types";
|
|
|
11
11
|
export declare const ArticleContent: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("@ark-ui/react").PolymorphicProps & {
|
|
12
12
|
consumeCss?: boolean;
|
|
13
13
|
} & import("@ndla/styled-system/types").WithCss & import("react").RefAttributes<HTMLElement>>;
|
|
14
|
-
export declare const ArticleWrapper: import("react").ForwardRefExoticComponent<Omit<
|
|
15
|
-
ref?: ((instance: HTMLElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLElement> | null | undefined;
|
|
16
|
-
} & {
|
|
14
|
+
export declare const ArticleWrapper: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLElement> & import("react").HTMLAttributes<HTMLElement> & {
|
|
17
15
|
consumeCss?: boolean;
|
|
18
16
|
} & import("@ndla/styled-system/types").WithCss, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
19
|
-
export declare const ArticleHGroup: import("@ndla/styled-system/types").StyledComponent<import("react").ForwardRefExoticComponent<
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
export declare const ArticleHeader: import("@ndla/styled-system/types").StyledComponent<import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
|
|
23
|
-
ref?: ((instance: HTMLElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLElement> | null | undefined;
|
|
24
|
-
} & import("@ark-ui/react").PolymorphicProps>, {}>;
|
|
25
|
-
export declare const ArticleFooter: import("@ndla/styled-system/types").StyledComponent<import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
|
|
26
|
-
ref?: ((instance: HTMLElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLElement> | null | undefined;
|
|
27
|
-
} & import("@ark-ui/react").PolymorphicProps>, {}>;
|
|
17
|
+
export declare const ArticleHGroup: import("@ndla/styled-system/types").StyledComponent<import("react").ForwardRefExoticComponent<import("react").ClassAttributes<HTMLElement> & import("react").HTMLAttributes<HTMLElement> & import("@ark-ui/react").PolymorphicProps>, {}>;
|
|
18
|
+
export declare const ArticleHeader: import("@ndla/styled-system/types").StyledComponent<import("react").ForwardRefExoticComponent<import("react").ClassAttributes<HTMLElement> & import("react").HTMLAttributes<HTMLElement> & import("@ark-ui/react").PolymorphicProps>, {}>;
|
|
19
|
+
export declare const ArticleFooter: import("@ndla/styled-system/types").StyledComponent<import("react").ForwardRefExoticComponent<import("react").ClassAttributes<HTMLElement> & import("react").HTMLAttributes<HTMLElement> & import("@ark-ui/react").PolymorphicProps>, {}>;
|
|
28
20
|
interface ArticleTitleProps {
|
|
29
21
|
heartButton?: ReactNode;
|
|
30
22
|
contentType?: ContentType;
|
|
@@ -167,19 +167,19 @@ const ArticleBylineAccordionItem = exports.ArticleBylineAccordionItem = /*#__PUR
|
|
|
167
167
|
value: value,
|
|
168
168
|
ref: ref,
|
|
169
169
|
...props,
|
|
170
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
children: /*#__PURE__*/(0, _jsxRuntime.
|
|
177
|
-
children: accordionTitle
|
|
170
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.Heading, {
|
|
171
|
+
asChild: true,
|
|
172
|
+
consumeCss: true,
|
|
173
|
+
textStyle: "label.medium",
|
|
174
|
+
fontWeight: "bold",
|
|
175
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("h2", {
|
|
176
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_primitives.AccordionItemTrigger, {
|
|
177
|
+
children: [accordionTitle, /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.AccordionItemIndicator, {
|
|
178
|
+
asChild: true,
|
|
179
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.ArrowDownShortLine, {})
|
|
180
|
+
})]
|
|
178
181
|
})
|
|
179
|
-
})
|
|
180
|
-
asChild: true,
|
|
181
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.ArrowDownShortLine, {})
|
|
182
|
-
})]
|
|
182
|
+
})
|
|
183
183
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.AccordionItemContent, {
|
|
184
184
|
children: children
|
|
185
185
|
})]
|
|
@@ -10,7 +10,6 @@ var _react2 = require("@ark-ui/react");
|
|
|
10
10
|
var _icons = require("@ndla/icons");
|
|
11
11
|
var _primitives = require("@ndla/primitives");
|
|
12
12
|
var _jsx2 = require("@ndla/styled-system/jsx");
|
|
13
|
-
var _patterns = require("@ndla/styled-system/patterns");
|
|
14
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
14
|
/**
|
|
16
15
|
* Copyright (c) 2021-present, NDLA.
|
|
@@ -236,7 +235,7 @@ const Controls = _ref => {
|
|
|
236
235
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
237
236
|
children: formatTime(currentTime)
|
|
238
237
|
})
|
|
239
|
-
}), /*#__PURE__*/(0, _jsxRuntime.
|
|
238
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_primitives.SliderRoot, {
|
|
240
239
|
value: [audioRef.current?.currentTime ?? 0],
|
|
241
240
|
defaultValue: [0],
|
|
242
241
|
step: 1,
|
|
@@ -246,14 +245,17 @@ const Controls = _ref => {
|
|
|
246
245
|
start: formatTime(Math.round(value.value)),
|
|
247
246
|
end: formatTime(Math.round(audioRef.current?.duration ?? 0))
|
|
248
247
|
}),
|
|
249
|
-
children: /*#__PURE__*/(0, _jsxRuntime.
|
|
248
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.SliderLabel, {
|
|
249
|
+
srOnly: true,
|
|
250
|
+
children: t("audio.progressBar")
|
|
251
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_primitives.SliderControl, {
|
|
250
252
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.SliderTrack, {
|
|
251
253
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.SliderRange, {})
|
|
252
254
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.SliderThumb, {
|
|
253
255
|
index: 0,
|
|
254
256
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.SliderHiddenInput, {})
|
|
255
257
|
})]
|
|
256
|
-
})
|
|
258
|
+
})]
|
|
257
259
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledText, {
|
|
258
260
|
textStyle: "label.medium",
|
|
259
261
|
asChild: true,
|
|
@@ -271,7 +273,7 @@ const Controls = _ref => {
|
|
|
271
273
|
placement: "top"
|
|
272
274
|
},
|
|
273
275
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.SelectLabel, {
|
|
274
|
-
|
|
276
|
+
srOnly: true,
|
|
275
277
|
children: t("audio.controls.selectSpeed")
|
|
276
278
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.SelectControl, {
|
|
277
279
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.SelectTrigger, {
|
|
@@ -317,7 +319,7 @@ const Controls = _ref => {
|
|
|
317
319
|
step: 1,
|
|
318
320
|
onValueChange: handleVolumeSliderChange,
|
|
319
321
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.SliderLabel, {
|
|
320
|
-
|
|
322
|
+
srOnly: true,
|
|
321
323
|
children: t("audio.controls.adjustVolume")
|
|
322
324
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(StyledSliderControl, {
|
|
323
325
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.SliderTrack, {
|
|
@@ -40,7 +40,7 @@ const BreadcrumbItem = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
40
40
|
item,
|
|
41
41
|
totalCount
|
|
42
42
|
} = _ref;
|
|
43
|
-
const liRef = (0, _react.useRef)();
|
|
43
|
+
const liRef = (0, _react.useRef)(null);
|
|
44
44
|
(0, _react.useImperativeHandle)(ref, () => ({
|
|
45
45
|
setMaxWidth: maxWidth => {
|
|
46
46
|
liRef.current.children[0].style.maxWidth = maxWidth;
|
package/lib/Concept/Concept.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
import { type ComponentPropsWithRef, type ReactNode } from "react";
|
|
9
|
-
import type {
|
|
9
|
+
import type { IDraftCopyrightDTO as ConceptCopyright } from "@ndla/types-backend/concept-api";
|
|
10
10
|
import type { ConceptVisualElementMeta } from "@ndla/types-embed";
|
|
11
11
|
export interface ConceptProps extends ComponentPropsWithRef<"figure"> {
|
|
12
12
|
copyright?: ConceptCopyright;
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import type {
|
|
8
|
+
import type { IImageMetaInformationV3DTO } from "@ndla/types-backend/image-api";
|
|
9
9
|
export type ContactBlockBackground = "strong" | "moderate" | "subtle";
|
|
10
10
|
export declare const contactBlockBackgrounds: ContactBlockBackground[];
|
|
11
11
|
interface Props {
|
|
12
|
-
image?:
|
|
12
|
+
image?: IImageMetaInformationV3DTO;
|
|
13
13
|
jobTitle: string;
|
|
14
14
|
description: string;
|
|
15
15
|
backgroundColor?: ContactBlockBackground;
|
|
@@ -5,6 +5,4 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
export declare const ConceptInlineTriggerButton: import("@ndla/styled-system/types").StyledComponent<import("react").ForwardRefExoticComponent<Omit<
|
|
9
|
-
ref?: ((instance: HTMLSpanElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
10
|
-
}, "ref"> & import("react").RefAttributes<HTMLSpanElement>>, {}>;
|
|
8
|
+
export declare const ConceptInlineTriggerButton: import("@ndla/styled-system/types").StyledComponent<import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>, {}>;
|
|
@@ -5,6 +5,4 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
export declare const InlineTriggerButton: import("react").ForwardRefExoticComponent<Omit<
|
|
9
|
-
ref?: ((instance: HTMLSpanElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
10
|
-
}, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
8
|
+
export declare const InlineTriggerButton: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
package/lib/Embed/types.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
import type { ElementType } from "react";
|
|
9
|
-
import type {
|
|
9
|
+
import type { IImageMetaInformationV3DTO } from "@ndla/types-backend/image-api";
|
|
10
10
|
import type { EmbedMetaData } from "@ndla/types-embed";
|
|
11
11
|
export type HeartButtonType = ElementType<{
|
|
12
12
|
embed: Extract<EmbedMetaData, {
|
|
@@ -18,6 +18,6 @@ export type EmbedParameter<T extends EmbedMetaData["resource"]> = Partial<Extrac
|
|
|
18
18
|
resource: T;
|
|
19
19
|
}>>;
|
|
20
20
|
export type CanonicalUrlFuncs = {
|
|
21
|
-
image?: (image:
|
|
21
|
+
image?: (image: IImageMetaInformationV3DTO) => string;
|
|
22
22
|
};
|
|
23
23
|
export type RenderContext = "article" | "embed";
|
|
@@ -9,8 +9,6 @@ import { type ComponentPropsWithoutRef } from "react";
|
|
|
9
9
|
interface Props extends ComponentPropsWithoutRef<"div"> {
|
|
10
10
|
}
|
|
11
11
|
export declare const FileListWrapper: import("@ndla/styled-system/types").StyledComponent<"div", {}>;
|
|
12
|
-
export declare const FileListItem: import("@ndla/styled-system/types").StyledComponent<import("react").ForwardRefExoticComponent<
|
|
13
|
-
ref?: ((instance: HTMLLIElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLLIElement> | null | undefined;
|
|
14
|
-
} & import("@ark-ui/react").PolymorphicProps>, {}>;
|
|
12
|
+
export declare const FileListItem: import("@ndla/styled-system/types").StyledComponent<import("react").ForwardRefExoticComponent<import("react").ClassAttributes<HTMLLIElement> & import("react").LiHTMLAttributes<HTMLLIElement> & import("@ark-ui/react").PolymorphicProps>, {}>;
|
|
15
13
|
export declare const FileListEmbed: ({ children, ...rest }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
16
14
|
export {};
|
package/lib/Gloss/Gloss.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
import type { StyledVariantProps } from "@ndla/styled-system/types";
|
|
9
|
-
import type {
|
|
9
|
+
import type { IGlossDataDTO } from "@ndla/types-backend/concept-api";
|
|
10
10
|
declare const StyledAccordionItem: import("@ndla/styled-system/types").StyledComponent<import("react").ForwardRefExoticComponent<import("@ndla/primitives").AccordionItemProps & import("react").RefAttributes<HTMLDivElement>>, {
|
|
11
11
|
variant?: "simple" | "bordered" | undefined;
|
|
12
12
|
}>;
|
|
@@ -16,7 +16,7 @@ export interface Props {
|
|
|
16
16
|
title: string;
|
|
17
17
|
language: string;
|
|
18
18
|
};
|
|
19
|
-
glossData?:
|
|
19
|
+
glossData?: IGlossDataDTO;
|
|
20
20
|
audio?: {
|
|
21
21
|
title: string;
|
|
22
22
|
src?: string;
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import type {
|
|
8
|
+
import type { IGlossExampleDTO } from "@ndla/types-backend/concept-api";
|
|
9
9
|
interface Props {
|
|
10
|
-
examples:
|
|
10
|
+
examples: IGlossExampleDTO[];
|
|
11
11
|
originalLanguage: string | undefined;
|
|
12
12
|
}
|
|
13
13
|
declare const GlossExample: ({ examples, originalLanguage }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
import { type ReactNode } from "react";
|
|
9
|
-
import type {
|
|
10
|
-
import type {
|
|
11
|
-
import type {
|
|
12
|
-
import type {
|
|
9
|
+
import type { ICopyrightDTO as ArticleCopyright } from "@ndla/types-backend/article-api";
|
|
10
|
+
import type { ICopyrightDTO as AudioCopyright } from "@ndla/types-backend/audio-api";
|
|
11
|
+
import type { IDraftCopyrightDTO as ConceptCopyright } from "@ndla/types-backend/concept-api";
|
|
12
|
+
import type { ICopyrightDTO as ImageCopyright } from "@ndla/types-backend/image-api";
|
|
13
13
|
import type { BrightcoveCopyright } from "@ndla/types-embed";
|
|
14
14
|
interface BaseProps {
|
|
15
15
|
description?: ReactNode;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
import { type ComponentPropsWithoutRef, type ReactNode } from "react";
|
|
8
|
+
import { type ComponentPropsWithoutRef, type ReactElement, type ReactNode } from "react";
|
|
9
9
|
import type { HeadingLevel } from "../types";
|
|
10
10
|
interface RelatedArticleProps {
|
|
11
11
|
title: string;
|
|
@@ -17,7 +17,7 @@ interface RelatedArticleProps {
|
|
|
17
17
|
}
|
|
18
18
|
export declare const RelatedArticle: ({ title, introduction, to, linkInfo, target, type, }: RelatedArticleProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
19
|
interface Props extends ComponentPropsWithoutRef<"section"> {
|
|
20
|
-
children?:
|
|
20
|
+
children?: ReactElement[];
|
|
21
21
|
articleCount?: number;
|
|
22
22
|
headingLevel?: HeadingLevel;
|
|
23
23
|
headingButtons?: ReactNode;
|
|
@@ -824,6 +824,7 @@ const messages = {
|
|
|
824
824
|
pause: "Pause",
|
|
825
825
|
download: "Last ned lydfil",
|
|
826
826
|
reuse: "Bruk lydfil",
|
|
827
|
+
progressBar: "Fremdriftsindikator",
|
|
827
828
|
error: {
|
|
828
829
|
url: "Feil ved lasting av lydfil.",
|
|
829
830
|
caption: "Beklager, en feil oppstod ved lasting av lydfil."
|
|
@@ -824,6 +824,7 @@ const messages = {
|
|
|
824
824
|
pause: "Boatkke",
|
|
825
825
|
download: "Viečča jietnafiilla",
|
|
826
826
|
reuse: "Geavat jietnafiilla",
|
|
827
|
+
progressBar: "Fremdriftsindikator",
|
|
827
828
|
error: {
|
|
828
829
|
url: "Boasttuvuohta jietnafiilla viežžamis.",
|
|
829
830
|
caption: "Šállošat, boasttuvuohta čuožžilii jietnafiilla viežžamis."
|
|
@@ -824,6 +824,7 @@ const messages = {
|
|
|
824
824
|
pause: "Pause",
|
|
825
825
|
download: "Veedtjh tjoeje-fijlem",
|
|
826
826
|
reuse: "Nuhtjh tjoeje-fijlem",
|
|
827
|
+
progressBar: "Fremdriftsindikator",
|
|
827
828
|
error: {
|
|
828
829
|
url: "Fiejlie tjoeje-veedtjemisnie.",
|
|
829
830
|
caption: "Gaatesjen, fiejlie sjïdti tjoeje-veedtjemisnie."
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ndla/ui",
|
|
3
|
-
"version": "56.0.
|
|
3
|
+
"version": "56.0.79-alpha.0",
|
|
4
4
|
"description": "UI component library for NDLA",
|
|
5
5
|
"license": "GPL-3.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@ndla/core": "^5.0.3",
|
|
36
|
-
"@ndla/icons": "^8.0.
|
|
36
|
+
"@ndla/icons": "^8.0.48-alpha.0",
|
|
37
37
|
"@ndla/licenses": "^8.0.5-alpha.0",
|
|
38
|
-
"@ndla/primitives": "^1.0.
|
|
39
|
-
"@ndla/safelink": "^7.0.
|
|
38
|
+
"@ndla/primitives": "^1.0.63-alpha.0",
|
|
39
|
+
"@ndla/safelink": "^7.0.64-alpha.0",
|
|
40
40
|
"@ndla/styled-system": "^0.0.29",
|
|
41
|
-
"@ndla/util": "^5.0.
|
|
42
|
-
"html-react-parser": "^5.1.
|
|
41
|
+
"@ndla/util": "^5.0.4-alpha.0",
|
|
42
|
+
"html-react-parser": "^5.1.19",
|
|
43
43
|
"i18next-browser-languagedetector": "^7.1.0"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
@@ -51,12 +51,12 @@
|
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@ndla/preset-panda": "^0.0.48",
|
|
54
|
-
"@ndla/types-backend": "^0.
|
|
55
|
-
"@ndla/types-embed": "^5.0.
|
|
54
|
+
"@ndla/types-backend": "^1.0.1",
|
|
55
|
+
"@ndla/types-embed": "^5.0.6-alpha.0",
|
|
56
56
|
"@pandacss/dev": "^0.48.0"
|
|
57
57
|
},
|
|
58
58
|
"publishConfig": {
|
|
59
59
|
"access": "public"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "e1109fda9f34b6ab504a45ce844b2f7fbfa374a9"
|
|
62
62
|
}
|
|
@@ -198,14 +198,16 @@ export const ArticleBylineAccordionItem = forwardRef<HTMLDivElement, ArticleByli
|
|
|
198
198
|
({ value, accordionTitle, children, ...props }, ref) => {
|
|
199
199
|
return (
|
|
200
200
|
<AccordionItem value={value} ref={ref} {...props}>
|
|
201
|
-
<
|
|
202
|
-
<
|
|
203
|
-
<
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
201
|
+
<Heading asChild consumeCss textStyle="label.medium" fontWeight="bold">
|
|
202
|
+
<h2>
|
|
203
|
+
<AccordionItemTrigger>
|
|
204
|
+
{accordionTitle}
|
|
205
|
+
<AccordionItemIndicator asChild>
|
|
206
|
+
<ArrowDownShortLine />
|
|
207
|
+
</AccordionItemIndicator>
|
|
208
|
+
</AccordionItemTrigger>
|
|
209
|
+
</h2>
|
|
210
|
+
</Heading>
|
|
209
211
|
<AccordionItemContent>{children}</AccordionItemContent>
|
|
210
212
|
</AccordionItem>
|
|
211
213
|
);
|
|
@@ -35,7 +35,6 @@ import {
|
|
|
35
35
|
Text,
|
|
36
36
|
} from "@ndla/primitives";
|
|
37
37
|
import { styled } from "@ndla/styled-system/jsx";
|
|
38
|
-
import { visuallyHidden } from "@ndla/styled-system/patterns";
|
|
39
38
|
|
|
40
39
|
const ControlsWrapper = styled("div", {
|
|
41
40
|
base: {
|
|
@@ -278,6 +277,7 @@ const Controls = ({ src, title }: Props) => {
|
|
|
278
277
|
})
|
|
279
278
|
}
|
|
280
279
|
>
|
|
280
|
+
<SliderLabel srOnly>{t("audio.progressBar")}</SliderLabel>
|
|
281
281
|
<SliderControl>
|
|
282
282
|
<SliderTrack>
|
|
283
283
|
<SliderRange />
|
|
@@ -298,7 +298,7 @@ const Controls = ({ src, title }: Props) => {
|
|
|
298
298
|
onValueChange={(details) => setSpeedValue(parseFloat(details.value[0]))}
|
|
299
299
|
positioning={{ placement: "top" }}
|
|
300
300
|
>
|
|
301
|
-
<SelectLabel
|
|
301
|
+
<SelectLabel srOnly>{t("audio.controls.selectSpeed")}</SelectLabel>
|
|
302
302
|
<SelectControl>
|
|
303
303
|
<SelectTrigger asChild>
|
|
304
304
|
<SpeedButton
|
|
@@ -338,7 +338,7 @@ const Controls = ({ src, title }: Props) => {
|
|
|
338
338
|
step={1}
|
|
339
339
|
onValueChange={handleVolumeSliderChange}
|
|
340
340
|
>
|
|
341
|
-
<SliderLabel
|
|
341
|
+
<SliderLabel srOnly>{t("audio.controls.adjustVolume")}</SliderLabel>
|
|
342
342
|
<StyledSliderControl>
|
|
343
343
|
<SliderTrack>
|
|
344
344
|
<SliderRange />
|
|
@@ -51,7 +51,7 @@ interface Props {
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
const BreadcrumbItem = forwardRef<any, Props>(({ renderItem, renderSeparator, item, totalCount }, ref) => {
|
|
54
|
-
const liRef = useRef<any>();
|
|
54
|
+
const liRef = useRef<any>(null);
|
|
55
55
|
|
|
56
56
|
useImperativeHandle(ref, () => ({
|
|
57
57
|
setMaxWidth: (maxWidth: number) => {
|
package/src/Concept/Concept.tsx
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import { type ComponentPropsWithRef, type ReactNode, forwardRef } from "react";
|
|
10
10
|
import { Figure } from "@ndla/primitives";
|
|
11
11
|
import { styled } from "@ndla/styled-system/jsx";
|
|
12
|
-
import type {
|
|
12
|
+
import type { IDraftCopyrightDTO as ConceptCopyright } from "@ndla/types-backend/concept-api";
|
|
13
13
|
import type { ConceptVisualElementMeta } from "@ndla/types-embed";
|
|
14
14
|
import { BrightcoveEmbed, ExternalEmbed, H5pEmbed, IframeEmbed, ImageEmbed } from "../Embed";
|
|
15
15
|
import { EmbedByline } from "../LicenseByline/EmbedByline";
|
|
@@ -10,7 +10,7 @@ import { useTranslation } from "react-i18next";
|
|
|
10
10
|
import { Text } from "@ndla/primitives";
|
|
11
11
|
import { styled } from "@ndla/styled-system/jsx";
|
|
12
12
|
import type { SystemStyleObject } from "@ndla/styled-system/types";
|
|
13
|
-
import type {
|
|
13
|
+
import type { IImageMetaInformationV3DTO } from "@ndla/types-backend/image-api";
|
|
14
14
|
import { LicenseContainerContent } from "../LicenseByline/EmbedByline";
|
|
15
15
|
|
|
16
16
|
export type ContactBlockBackground = "strong" | "moderate" | "subtle";
|
|
@@ -143,7 +143,7 @@ const StyledDescription = styled(Text, {
|
|
|
143
143
|
});
|
|
144
144
|
|
|
145
145
|
interface Props {
|
|
146
|
-
image?:
|
|
146
|
+
image?: IImageMetaInformationV3DTO;
|
|
147
147
|
jobTitle: string;
|
|
148
148
|
description: string;
|
|
149
149
|
backgroundColor?: ContactBlockBackground;
|
|
@@ -10,7 +10,7 @@ import type { ReactNode } from "react";
|
|
|
10
10
|
import type { Meta, StoryFn, StoryObj } from "@storybook/react";
|
|
11
11
|
import { PageContent, Text } from "@ndla/primitives";
|
|
12
12
|
import { styled } from "@ndla/styled-system/jsx";
|
|
13
|
-
import type {
|
|
13
|
+
import type { IImageMetaInformationV3DTO } from "@ndla/types-backend/image-api";
|
|
14
14
|
import type { ImageEmbedData } from "@ndla/types-embed";
|
|
15
15
|
import ImageEmbed from "./ImageEmbed";
|
|
16
16
|
import { ArticleWrapper, ArticleContent } from "../Article";
|
|
@@ -27,7 +27,7 @@ const embedData: ImageEmbedData = {
|
|
|
27
27
|
url: "https://api.test.ndla.no/image-api/v2/images/61181",
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
-
const metaData:
|
|
30
|
+
const metaData: IImageMetaInformationV3DTO = {
|
|
31
31
|
id: "61181",
|
|
32
32
|
metaUrl: "https://api.test.ndla.no/image-api/v3/images/61181",
|
|
33
33
|
title: {
|
package/src/Embed/types.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import type { ElementType } from "react";
|
|
10
|
-
import type {
|
|
10
|
+
import type { IImageMetaInformationV3DTO } from "@ndla/types-backend/image-api";
|
|
11
11
|
import type { EmbedMetaData } from "@ndla/types-embed";
|
|
12
12
|
|
|
13
13
|
export type HeartButtonType = ElementType<{
|
|
@@ -19,7 +19,7 @@ export type EmbedParameter<T extends EmbedMetaData["resource"]> = Partial<
|
|
|
19
19
|
>;
|
|
20
20
|
|
|
21
21
|
export type CanonicalUrlFuncs = {
|
|
22
|
-
image?: (image:
|
|
22
|
+
image?: (image: IImageMetaInformationV3DTO) => string;
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
export type RenderContext = "article" | "embed";
|
package/src/FactBox/FactBox.tsx
CHANGED
|
@@ -129,7 +129,7 @@ const FactBox = forwardRef<HTMLElement, Props>(
|
|
|
129
129
|
// TODO: Remove this hack when we upgrade to React 19.
|
|
130
130
|
const inertAttribute = useMemo(() => {
|
|
131
131
|
return state === "closed" ? { inert: "" } : {};
|
|
132
|
-
}, [state]);
|
|
132
|
+
}, [state]) as { inert?: boolean };
|
|
133
133
|
|
|
134
134
|
useEffect(() => {
|
|
135
135
|
if (open !== undefined) {
|
package/src/Gloss/Gloss.tsx
CHANGED
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
} from "@ndla/primitives";
|
|
21
21
|
import { styled } from "@ndla/styled-system/jsx";
|
|
22
22
|
import type { StyledVariantProps } from "@ndla/styled-system/types";
|
|
23
|
-
import type {
|
|
23
|
+
import type { IGlossDataDTO, IGlossExampleDTO } from "@ndla/types-backend/concept-api";
|
|
24
24
|
import GlossExample from "./GlossExample";
|
|
25
25
|
import SpeechControl from "../AudioPlayer/SpeechControl";
|
|
26
26
|
|
|
@@ -29,10 +29,10 @@ import SpeechControl from "../AudioPlayer/SpeechControl";
|
|
|
29
29
|
// When a gloss is bordered there's way too much padding.
|
|
30
30
|
|
|
31
31
|
const getFilteredExamples = (
|
|
32
|
-
glossData:
|
|
32
|
+
glossData: IGlossDataDTO | undefined,
|
|
33
33
|
exampleIds: string | undefined,
|
|
34
34
|
exampleLangs: string | undefined,
|
|
35
|
-
):
|
|
35
|
+
): IGlossExampleDTO[][] => {
|
|
36
36
|
if (exampleIds !== undefined || exampleLangs !== undefined) {
|
|
37
37
|
const exampleIdsList = exampleIds?.toString()?.split(",") ?? [];
|
|
38
38
|
const exampleLangsList = exampleLangs?.split(",") ?? [];
|
|
@@ -104,7 +104,7 @@ export interface Props {
|
|
|
104
104
|
title: string;
|
|
105
105
|
language: string;
|
|
106
106
|
};
|
|
107
|
-
glossData?:
|
|
107
|
+
glossData?: IGlossDataDTO;
|
|
108
108
|
audio?: {
|
|
109
109
|
title: string;
|
|
110
110
|
src?: string;
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
import { Fragment } from "react";
|
|
10
10
|
import { Text } from "@ndla/primitives";
|
|
11
11
|
import { styled } from "@ndla/styled-system/jsx";
|
|
12
|
-
import type {
|
|
12
|
+
import type { IGlossExampleDTO } from "@ndla/types-backend/concept-api";
|
|
13
13
|
|
|
14
14
|
interface Props {
|
|
15
|
-
examples:
|
|
15
|
+
examples: IGlossExampleDTO[];
|
|
16
16
|
originalLanguage: string | undefined;
|
|
17
17
|
}
|
|
18
18
|
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import type { Meta,
|
|
10
|
-
import KeyFigure from "./KeyFigure";
|
|
9
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
10
|
+
import KeyFigure, { type Props } from "./KeyFigure";
|
|
11
11
|
|
|
12
12
|
const args = {
|
|
13
13
|
title: "22 000+",
|
|
@@ -24,7 +24,7 @@ export default {
|
|
|
24
24
|
args,
|
|
25
25
|
} as Meta<typeof KeyFigure>;
|
|
26
26
|
|
|
27
|
-
export const Plain
|
|
27
|
+
export const Plain = ({ ...args }: Props) => {
|
|
28
28
|
return <KeyFigure {...args} />;
|
|
29
29
|
};
|
|
30
30
|
|
|
@@ -12,10 +12,10 @@ import { AlertLine } from "@ndla/icons";
|
|
|
12
12
|
import { getLicenseByAbbreviation, getLicenseCredits } from "@ndla/licenses";
|
|
13
13
|
import { Button, Text } from "@ndla/primitives";
|
|
14
14
|
import { styled } from "@ndla/styled-system/jsx";
|
|
15
|
-
import type {
|
|
16
|
-
import type {
|
|
17
|
-
import type {
|
|
18
|
-
import type {
|
|
15
|
+
import type { ICopyrightDTO as ArticleCopyright } from "@ndla/types-backend/article-api";
|
|
16
|
+
import type { ICopyrightDTO as AudioCopyright } from "@ndla/types-backend/audio-api";
|
|
17
|
+
import type { IDraftCopyrightDTO as ConceptCopyright } from "@ndla/types-backend/concept-api";
|
|
18
|
+
import type { ICopyrightDTO as ImageCopyright } from "@ndla/types-backend/image-api";
|
|
19
19
|
import type { BrightcoveCopyright } from "@ndla/types-embed";
|
|
20
20
|
import { LicenseLink } from "./LicenseLink";
|
|
21
21
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import type { Meta
|
|
9
|
+
import type { Meta } from "@storybook/react";
|
|
10
10
|
import { PageContent } from "@ndla/primitives";
|
|
11
11
|
import { Pitch, type Props } from "./Pitch";
|
|
12
12
|
import { ArticleContent, ArticleWrapper } from "../Article";
|
|
@@ -41,7 +41,7 @@ export default {
|
|
|
41
41
|
],
|
|
42
42
|
} as Meta<typeof Pitch>;
|
|
43
43
|
|
|
44
|
-
export const Default
|
|
44
|
+
export const Default = ({ ...args }: Props) => {
|
|
45
45
|
return (
|
|
46
46
|
<Grid columns="2" background="transparent">
|
|
47
47
|
<div data-type="grid-cell" data-parallax-cell="false">
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { Children, type ComponentPropsWithoutRef, type ReactNode, useMemo, useState } from "react";
|
|
9
|
+
import { Children, type ComponentPropsWithoutRef, type ReactElement, type ReactNode, useMemo, useState } from "react";
|
|
10
10
|
import { useTranslation } from "react-i18next";
|
|
11
11
|
import { ExternalLinkLine } from "@ndla/icons";
|
|
12
12
|
import { CardContent, CardHeading, CardRoot, Text, Heading, Button } from "@ndla/primitives";
|
|
@@ -108,7 +108,7 @@ const StyledButton = styled(Button, {
|
|
|
108
108
|
});
|
|
109
109
|
|
|
110
110
|
interface Props extends ComponentPropsWithoutRef<"section"> {
|
|
111
|
-
children?:
|
|
111
|
+
children?: ReactElement[];
|
|
112
112
|
articleCount?: number;
|
|
113
113
|
headingLevel?: HeadingLevel;
|
|
114
114
|
headingButtons?: ReactNode;
|
|
@@ -828,6 +828,7 @@ const messages = {
|
|
|
828
828
|
pause: "Pause",
|
|
829
829
|
download: "Last ned lydfil",
|
|
830
830
|
reuse: "Bruk lydfil",
|
|
831
|
+
progressBar: "Fremdriftsindikator",
|
|
831
832
|
error: {
|
|
832
833
|
url: "Feil ved lasting av lydfil.",
|
|
833
834
|
caption: "Beklager, en feil oppstod ved lasting av lydfil.",
|
|
@@ -829,6 +829,7 @@ const messages = {
|
|
|
829
829
|
pause: "Boatkke",
|
|
830
830
|
download: "Viečča jietnafiilla",
|
|
831
831
|
reuse: "Geavat jietnafiilla",
|
|
832
|
+
progressBar: "Fremdriftsindikator",
|
|
832
833
|
error: {
|
|
833
834
|
url: "Boasttuvuohta jietnafiilla viežžamis.",
|
|
834
835
|
caption: "Šállošat, boasttuvuohta čuožžilii jietnafiilla viežžamis.",
|
|
@@ -831,6 +831,7 @@ const messages = {
|
|
|
831
831
|
pause: "Pause",
|
|
832
832
|
download: "Veedtjh tjoeje-fijlem",
|
|
833
833
|
reuse: "Nuhtjh tjoeje-fijlem",
|
|
834
|
+
progressBar: "Fremdriftsindikator",
|
|
834
835
|
error: {
|
|
835
836
|
url: "Fiejlie tjoeje-veedtjemisnie.",
|
|
836
837
|
caption: "Gaatesjen, fiejlie sjïdti tjoeje-veedtjemisnie.",
|