@ndla/ui 56.0.78-alpha.0 → 56.0.80-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/Embed/AudioEmbed.js +1 -1
- package/es/locale/messages-en.js +5 -2
- package/es/locale/messages-nb.js +5 -2
- package/es/locale/messages-nn.js +5 -2
- package/es/locale/messages-se.js +5 -2
- package/es/locale/messages-sma.js +5 -2
- 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/AudioEmbed.js +1 -1
- 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 +4 -1
- package/lib/locale/messages-en.js +5 -2
- package/lib/locale/messages-nb.d.ts +4 -1
- package/lib/locale/messages-nb.js +5 -2
- package/lib/locale/messages-nn.d.ts +4 -1
- package/lib/locale/messages-nn.js +5 -2
- package/lib/locale/messages-se.d.ts +4 -1
- package/lib/locale/messages-se.js +5 -2
- package/lib/locale/messages-sma.d.ts +4 -1
- package/lib/locale/messages-sma.js +5 -2
- package/package.json +8 -8
- 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/AudioEmbed.tsx +1 -1
- package/src/Embed/ExternalEmbed.tsx +1 -1
- package/src/Embed/ImageEmbed.stories.tsx +2 -2
- package/src/Embed/ImageEmbed.tsx +1 -1
- 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/i18n/__tests__/formatNestedMessages-test.ts +0 -1
- package/src/locale/messages-en.ts +4 -1
- package/src/locale/messages-nb.ts +4 -1
- package/src/locale/messages-nn.ts +4 -1
- package/src/locale/messages-se.ts +4 -1
- package/src/locale/messages-sma.ts +4 -1
|
@@ -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/Embed/AudioEmbed.js
CHANGED
|
@@ -53,7 +53,7 @@ const AudioEmbed = _ref => {
|
|
|
53
53
|
description: data.podcastMeta?.introduction ?? "",
|
|
54
54
|
img: img,
|
|
55
55
|
src: data.audioFile.url,
|
|
56
|
-
textVersion: data.manuscript?.manuscript.length ? /*#__PURE__*/_jsx("
|
|
56
|
+
textVersion: data.manuscript?.manuscript.length ? /*#__PURE__*/_jsx("div", {
|
|
57
57
|
dangerouslySetInnerHTML: {
|
|
58
58
|
__html: data.manuscript.manuscript
|
|
59
59
|
}
|
package/es/locale/messages-en.js
CHANGED
|
@@ -269,8 +269,10 @@ const messages = {
|
|
|
269
269
|
dialogText2: "Additional content is content in the subject that you can choose in addition to the core material. Through the additional subject, you can immerse yourself in a topic or approach yourself in a different way.",
|
|
270
270
|
youAreHere: "You are here",
|
|
271
271
|
trait: {
|
|
272
|
-
|
|
273
|
-
h5p: "Interactive"
|
|
272
|
+
audio: "Audio",
|
|
273
|
+
h5p: "Interactive",
|
|
274
|
+
podcast: "Podcast",
|
|
275
|
+
video: "Video"
|
|
274
276
|
}
|
|
275
277
|
},
|
|
276
278
|
messageBoxInfo: {
|
|
@@ -817,6 +819,7 @@ const messages = {
|
|
|
817
819
|
pause: "Pause",
|
|
818
820
|
download: "Download audio",
|
|
819
821
|
reuse: "Use audio",
|
|
822
|
+
progressBar: "Progress bar",
|
|
820
823
|
error: {
|
|
821
824
|
url: "Error loading the audio.",
|
|
822
825
|
caption: "Sorry, an error occurred while loading the audio."
|
package/es/locale/messages-nb.js
CHANGED
|
@@ -269,8 +269,10 @@ const messages = {
|
|
|
269
269
|
dialogText2: "Tilleggsstoff er innhold i faget som du kan velge i tillegg til kjernestoffet. Gjennom tilleggsstoffet kan du fordype deg i et emne eller tilnærme deg emnet på en annen måte.",
|
|
270
270
|
youAreHere: "Du er her",
|
|
271
271
|
trait: {
|
|
272
|
-
|
|
273
|
-
h5p: "Interaktiv"
|
|
272
|
+
audio: "Lyd",
|
|
273
|
+
h5p: "Interaktiv",
|
|
274
|
+
podcast: "Podkast",
|
|
275
|
+
video: "Video"
|
|
274
276
|
}
|
|
275
277
|
},
|
|
276
278
|
messageBoxInfo: {
|
|
@@ -817,6 +819,7 @@ const messages = {
|
|
|
817
819
|
pause: "Pause",
|
|
818
820
|
download: "Last ned lydfil",
|
|
819
821
|
reuse: "Bruk lydfil",
|
|
822
|
+
progressBar: "Fremdriftsindikator",
|
|
820
823
|
error: {
|
|
821
824
|
url: "Feil ved lasting av lydfil.",
|
|
822
825
|
caption: "Beklager, en feil oppstod ved lasting av lydfil."
|
package/es/locale/messages-nn.js
CHANGED
|
@@ -269,8 +269,10 @@ const messages = {
|
|
|
269
269
|
dialogText2: "Tilleggsstoff er innhald du kan velje i tillegg til kjernestoffet. Gjennom dette kan du fordjupe deg i eit emne eller nærme deg emnet på ein annan måte.",
|
|
270
270
|
youAreHere: "Du er her",
|
|
271
271
|
trait: {
|
|
272
|
-
|
|
273
|
-
h5p: "Interaktiv"
|
|
272
|
+
audio: "Lyd",
|
|
273
|
+
h5p: "Interaktiv",
|
|
274
|
+
podcast: "Podkast",
|
|
275
|
+
video: "Video"
|
|
274
276
|
}
|
|
275
277
|
},
|
|
276
278
|
messageBoxInfo: {
|
|
@@ -817,6 +819,7 @@ const messages = {
|
|
|
817
819
|
pause: "Pause",
|
|
818
820
|
download: "Last ned lydfil",
|
|
819
821
|
reuse: "Bruk lydfil",
|
|
822
|
+
progressBar: "Framdriftsindikator",
|
|
820
823
|
error: {
|
|
821
824
|
url: "Feil ved lasting av lydfil.",
|
|
822
825
|
caption: "Orsak, ein feil oppstod ved lasting av lydfil."
|
package/es/locale/messages-se.js
CHANGED
|
@@ -269,8 +269,10 @@ const messages = {
|
|
|
269
269
|
dialogText2: "Lassiávnnas lea sisdoallu fágas maid sáhtát lassin válljet guovddášávdnasii. Lassiávdnasa bokte sáhtát čiekŋudit iežat muhtin fáddái dahje lahkonaddat fáddái eará vugiin.",
|
|
270
270
|
youAreHere: "Don leat dás",
|
|
271
271
|
trait: {
|
|
272
|
-
|
|
273
|
-
h5p: "Interaktiiva"
|
|
272
|
+
audio: "Jietna",
|
|
273
|
+
h5p: "Interaktiiva",
|
|
274
|
+
podcast: "Podkásta",
|
|
275
|
+
video: "Video"
|
|
274
276
|
}
|
|
275
277
|
},
|
|
276
278
|
messageBoxInfo: {
|
|
@@ -817,6 +819,7 @@ const messages = {
|
|
|
817
819
|
pause: "Boatkke",
|
|
818
820
|
download: "Viečča jietnafiilla",
|
|
819
821
|
reuse: "Geavat jietnafiilla",
|
|
822
|
+
progressBar: "Fremdriftsindikator",
|
|
820
823
|
error: {
|
|
821
824
|
url: "Boasttuvuohta jietnafiilla viežžamis.",
|
|
822
825
|
caption: "Šállošat, boasttuvuohta čuožžilii jietnafiilla viežžamis."
|
|
@@ -269,8 +269,10 @@ const messages = {
|
|
|
269
269
|
dialogText2: "Lissie-aamhtese lea faagesisvege maam maahtah lissine veeljedh jarnge-aamhtesasse. Maahtah veelebelaakan teemam goerehtidh jallh teemam jeatjahlaakan geatskanidh.",
|
|
270
270
|
youAreHere: "Datne daesnie",
|
|
271
271
|
trait: {
|
|
272
|
-
|
|
273
|
-
h5p: "Interaktijve"
|
|
272
|
+
audio: "Tjoeje",
|
|
273
|
+
h5p: "Interaktijve",
|
|
274
|
+
podcast: "Podkast",
|
|
275
|
+
video: "Videjove"
|
|
274
276
|
}
|
|
275
277
|
},
|
|
276
278
|
messageBoxInfo: {
|
|
@@ -817,6 +819,7 @@ const messages = {
|
|
|
817
819
|
pause: "Pause",
|
|
818
820
|
download: "Veedtjh tjoeje-fijlem",
|
|
819
821
|
reuse: "Nuhtjh tjoeje-fijlem",
|
|
822
|
+
progressBar: "Fremdriftsindikator",
|
|
820
823
|
error: {
|
|
821
824
|
url: "Fiejlie tjoeje-veedtjemisnie.",
|
|
822
825
|
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;
|
package/lib/Embed/AudioEmbed.js
CHANGED
|
@@ -61,7 +61,7 @@ const AudioEmbed = _ref => {
|
|
|
61
61
|
description: data.podcastMeta?.introduction ?? "",
|
|
62
62
|
img: img,
|
|
63
63
|
src: data.audioFile.url,
|
|
64
|
-
textVersion: data.manuscript?.manuscript.length ? /*#__PURE__*/(0, _jsxRuntime.jsx)("
|
|
64
|
+
textVersion: data.manuscript?.manuscript.length ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
65
65
|
dangerouslySetInnerHTML: {
|
|
66
66
|
__html: data.manuscript.manuscript
|
|
67
67
|
}
|
|
@@ -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;
|
|
@@ -259,8 +259,10 @@ declare const messages: {
|
|
|
259
259
|
dialogText2: string;
|
|
260
260
|
youAreHere: string;
|
|
261
261
|
trait: {
|
|
262
|
-
|
|
262
|
+
audio: string;
|
|
263
263
|
h5p: string;
|
|
264
|
+
podcast: string;
|
|
265
|
+
video: string;
|
|
264
266
|
};
|
|
265
267
|
};
|
|
266
268
|
messageBoxInfo: {
|
|
@@ -807,6 +809,7 @@ declare const messages: {
|
|
|
807
809
|
pause: string;
|
|
808
810
|
download: string;
|
|
809
811
|
reuse: string;
|
|
812
|
+
progressBar: string;
|
|
810
813
|
error: {
|
|
811
814
|
url: string;
|
|
812
815
|
caption: string;
|
|
@@ -276,8 +276,10 @@ const messages = {
|
|
|
276
276
|
dialogText2: "Additional content is content in the subject that you can choose in addition to the core material. Through the additional subject, you can immerse yourself in a topic or approach yourself in a different way.",
|
|
277
277
|
youAreHere: "You are here",
|
|
278
278
|
trait: {
|
|
279
|
-
|
|
280
|
-
h5p: "Interactive"
|
|
279
|
+
audio: "Audio",
|
|
280
|
+
h5p: "Interactive",
|
|
281
|
+
podcast: "Podcast",
|
|
282
|
+
video: "Video"
|
|
281
283
|
}
|
|
282
284
|
},
|
|
283
285
|
messageBoxInfo: {
|
|
@@ -824,6 +826,7 @@ const messages = {
|
|
|
824
826
|
pause: "Pause",
|
|
825
827
|
download: "Download audio",
|
|
826
828
|
reuse: "Use audio",
|
|
829
|
+
progressBar: "Progress bar",
|
|
827
830
|
error: {
|
|
828
831
|
url: "Error loading the audio.",
|
|
829
832
|
caption: "Sorry, an error occurred while loading the audio."
|
|
@@ -259,8 +259,10 @@ declare const messages: {
|
|
|
259
259
|
dialogText2: string;
|
|
260
260
|
youAreHere: string;
|
|
261
261
|
trait: {
|
|
262
|
-
|
|
262
|
+
audio: string;
|
|
263
263
|
h5p: string;
|
|
264
|
+
podcast: string;
|
|
265
|
+
video: string;
|
|
264
266
|
};
|
|
265
267
|
};
|
|
266
268
|
messageBoxInfo: {
|
|
@@ -807,6 +809,7 @@ declare const messages: {
|
|
|
807
809
|
pause: string;
|
|
808
810
|
download: string;
|
|
809
811
|
reuse: string;
|
|
812
|
+
progressBar: string;
|
|
810
813
|
error: {
|
|
811
814
|
url: string;
|
|
812
815
|
caption: string;
|
|
@@ -276,8 +276,10 @@ const messages = {
|
|
|
276
276
|
dialogText2: "Tilleggsstoff er innhold i faget som du kan velge i tillegg til kjernestoffet. Gjennom tilleggsstoffet kan du fordype deg i et emne eller tilnærme deg emnet på en annen måte.",
|
|
277
277
|
youAreHere: "Du er her",
|
|
278
278
|
trait: {
|
|
279
|
-
|
|
280
|
-
h5p: "Interaktiv"
|
|
279
|
+
audio: "Lyd",
|
|
280
|
+
h5p: "Interaktiv",
|
|
281
|
+
podcast: "Podkast",
|
|
282
|
+
video: "Video"
|
|
281
283
|
}
|
|
282
284
|
},
|
|
283
285
|
messageBoxInfo: {
|
|
@@ -824,6 +826,7 @@ const messages = {
|
|
|
824
826
|
pause: "Pause",
|
|
825
827
|
download: "Last ned lydfil",
|
|
826
828
|
reuse: "Bruk lydfil",
|
|
829
|
+
progressBar: "Fremdriftsindikator",
|
|
827
830
|
error: {
|
|
828
831
|
url: "Feil ved lasting av lydfil.",
|
|
829
832
|
caption: "Beklager, en feil oppstod ved lasting av lydfil."
|