@ndla/ui 56.0.22-alpha.0 → 56.0.24-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 +7 -7
- package/dist/styles.css +22 -22
- package/es/AudioPlayer/Controls.js +16 -5
- package/es/Embed/ConceptEmbed.js +2 -0
- package/es/Embed/EmbedErrorPlaceholder.js +1 -0
- package/es/Embed/GlossEmbed.js +9 -6
- package/es/Embed/ImageEmbed.js +5 -4
- package/es/Embed/InlineTriggerButton.js +1 -1
- package/es/KeyFigure/KeyFigure.js +2 -1
- package/es/ResourceBox/ResourceBox.js +2 -1
- package/es/i18n/useComponentTranslations.js +18 -0
- package/es/locale/messages-en.js +12 -2
- package/es/locale/messages-nb.js +10 -0
- package/es/locale/messages-nn.js +10 -0
- package/es/locale/messages-se.js +10 -0
- package/es/locale/messages-sma.js +10 -0
- package/es/styles.css +22 -22
- package/lib/AudioPlayer/Controls.js +16 -5
- package/lib/Embed/ConceptEmbed.js +2 -0
- package/lib/Embed/EmbedErrorPlaceholder.js +1 -0
- package/lib/Embed/GlossEmbed.js +9 -6
- package/lib/Embed/ImageEmbed.js +5 -4
- package/lib/Embed/InlineTriggerButton.js +1 -1
- package/lib/KeyFigure/KeyFigure.js +2 -1
- package/lib/ResourceBox/ResourceBox.js +2 -1
- package/lib/i18n/useComponentTranslations.d.ts +13 -2
- package/lib/i18n/useComponentTranslations.js +21 -2
- package/lib/locale/messages-en.d.ts +10 -0
- package/lib/locale/messages-en.js +12 -2
- package/lib/locale/messages-nb.d.ts +10 -0
- package/lib/locale/messages-nb.js +10 -0
- package/lib/locale/messages-nn.d.ts +10 -0
- package/lib/locale/messages-nn.js +10 -0
- package/lib/locale/messages-se.d.ts +10 -0
- package/lib/locale/messages-se.js +10 -0
- package/lib/locale/messages-sma.d.ts +10 -0
- package/lib/locale/messages-sma.js +10 -0
- package/lib/styles.css +22 -22
- package/package.json +8 -8
- package/src/AudioPlayer/Controls.tsx +20 -7
- package/src/Embed/ConceptEmbed.tsx +9 -2
- package/src/Embed/EmbedErrorPlaceholder.tsx +1 -0
- package/src/Embed/GlossEmbed.tsx +8 -5
- package/src/Embed/ImageEmbed.tsx +4 -3
- package/src/Embed/InlineTriggerButton.tsx +1 -1
- package/src/KeyFigure/KeyFigure.tsx +1 -0
- package/src/ResourceBox/ResourceBox.tsx +1 -0
- package/src/i18n/useComponentTranslations.ts +28 -2
- package/src/locale/messages-en.ts +12 -2
- package/src/locale/messages-nb.ts +10 -0
- package/src/locale/messages-nn.ts +10 -0
- package/src/locale/messages-se.ts +10 -0
- package/src/locale/messages-sma.ts +10 -0
package/lib/Embed/ImageEmbed.js
CHANGED
|
@@ -104,10 +104,10 @@ const ImageWrapper = (0, _jsx2.styled)("div", {
|
|
|
104
104
|
true: {
|
|
105
105
|
border: "1px solid",
|
|
106
106
|
borderColor: "stroke.subtle",
|
|
107
|
-
borderBottom: "0",
|
|
108
107
|
borderRadius: "xsmall",
|
|
109
|
-
|
|
110
|
-
|
|
108
|
+
"& img": {
|
|
109
|
+
borderRadius: "0"
|
|
110
|
+
}
|
|
111
111
|
},
|
|
112
112
|
false: {}
|
|
113
113
|
},
|
|
@@ -225,7 +225,8 @@ const ImageEmbed = _ref => {
|
|
|
225
225
|
alt: altText,
|
|
226
226
|
src: data.image.imageUrl,
|
|
227
227
|
lang: lang,
|
|
228
|
-
onClick: figureProps?.float ? toggleImageSize : undefined
|
|
228
|
+
onClick: figureProps?.float ? toggleImageSize : undefined,
|
|
229
|
+
variant: "rounded"
|
|
229
230
|
}), !!embedData.align && /*#__PURE__*/(0, _jsxRuntime.jsx)(ExpandButton, {
|
|
230
231
|
"aria-label": t(`license.images.itemImage.zoom${imageSizes ? "Out" : ""}ImageButtonLabel`),
|
|
231
232
|
onClick: toggleImageSize,
|
|
@@ -23,7 +23,7 @@ const StyledSpan = (0, _jsx2.styled)("span", {
|
|
|
23
23
|
borderBottom: "1px solid",
|
|
24
24
|
borderStyle: "dashed",
|
|
25
25
|
borderColor: "stroke.hover",
|
|
26
|
-
|
|
26
|
+
paddingBlockStart: "5xsmall",
|
|
27
27
|
paddingInline: "4xsmall",
|
|
28
28
|
width: "fit-content",
|
|
29
29
|
cursor: "pointer",
|
|
@@ -27,7 +27,8 @@ const ContentWrapper = (0, _jsx2.styled)("div", {
|
|
|
27
27
|
const StyledImage = (0, _jsx2.styled)("img", {
|
|
28
28
|
base: {
|
|
29
29
|
height: "surface.3xsmall",
|
|
30
|
-
width: "surface.3xsmall"
|
|
30
|
+
width: "surface.3xsmall",
|
|
31
|
+
borderRadius: "xsmall"
|
|
31
32
|
}
|
|
32
33
|
});
|
|
33
34
|
const TitleWrapper = (0, _jsx2.styled)("div", {
|
|
@@ -79,7 +79,8 @@ const ResourceBox = _ref => {
|
|
|
79
79
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(StyledImage, {
|
|
80
80
|
src: image.src,
|
|
81
81
|
alt: image.alt,
|
|
82
|
-
sizes: `(min-width: ${_core.breakpoints.desktop}) 150px, (max-width: ${_core.breakpoints.tablet} ) 400px, 200px
|
|
82
|
+
sizes: `(min-width: ${_core.breakpoints.desktop}) 150px, (max-width: ${_core.breakpoints.tablet} ) 400px, 200px`,
|
|
83
|
+
variant: "rounded"
|
|
83
84
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(ContentWrapper, {
|
|
84
85
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.Heading, {
|
|
85
86
|
textStyle: "label.large",
|
|
@@ -22,7 +22,17 @@ interface AudioSearchTranslations {
|
|
|
22
22
|
noResults: string;
|
|
23
23
|
paginationTranslations: PaginationRootProps["translations"];
|
|
24
24
|
}
|
|
25
|
-
|
|
25
|
+
interface VideoTranslations {
|
|
26
|
+
searchPlaceholder: string;
|
|
27
|
+
searchButtonTitle: string;
|
|
28
|
+
loadMoreVideos: string;
|
|
29
|
+
noResults: string;
|
|
30
|
+
is360Video: string;
|
|
31
|
+
previewVideo: string;
|
|
32
|
+
addVideo: string;
|
|
33
|
+
close: string;
|
|
34
|
+
}
|
|
35
|
+
interface PreviewTranslations {
|
|
26
36
|
creatorsLabel: string;
|
|
27
37
|
license: string;
|
|
28
38
|
caption: string;
|
|
@@ -34,7 +44,7 @@ export interface PreviewTranslations {
|
|
|
34
44
|
missingTitleFallback?: string;
|
|
35
45
|
useImageTitle: string;
|
|
36
46
|
}
|
|
37
|
-
|
|
47
|
+
interface ImageSearchTranslations {
|
|
38
48
|
searchPlaceholder: string;
|
|
39
49
|
searchButtonTitle: string;
|
|
40
50
|
imagePreview: PreviewTranslations;
|
|
@@ -42,4 +52,5 @@ export interface ImageSearchTranslations {
|
|
|
42
52
|
}
|
|
43
53
|
export declare const useImageSearchTranslations: (translations?: DeepPartial<ImageSearchTranslations>) => ImageSearchTranslations;
|
|
44
54
|
export declare const useAudioSearchTranslations: (translations?: DeepPartial<AudioSearchTranslations>) => AudioSearchTranslations;
|
|
55
|
+
export declare const useVideoSearchTranslations: (translations?: Partial<VideoTranslations>) => VideoTranslations;
|
|
45
56
|
export {};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.useTagsInputTranslations = exports.useTagSelectorTranslations = exports.usePaginationTranslations = exports.useImageSearchTranslations = exports.useComboboxTranslations = exports.useAudioSearchTranslations = void 0;
|
|
6
|
+
exports.useVideoSearchTranslations = exports.useTagsInputTranslations = exports.useTagSelectorTranslations = exports.usePaginationTranslations = exports.useImageSearchTranslations = exports.useComboboxTranslations = exports.useAudioSearchTranslations = void 0;
|
|
7
7
|
var _reactI18next = require("react-i18next");
|
|
8
8
|
/**
|
|
9
9
|
* Copyright (c) 2024-present, NDLA.
|
|
@@ -153,4 +153,23 @@ const useAudioSearchTranslations = function () {
|
|
|
153
153
|
...remaining
|
|
154
154
|
};
|
|
155
155
|
};
|
|
156
|
-
exports.useAudioSearchTranslations = useAudioSearchTranslations;
|
|
156
|
+
exports.useAudioSearchTranslations = useAudioSearchTranslations;
|
|
157
|
+
const useVideoSearchTranslations = translations => {
|
|
158
|
+
const {
|
|
159
|
+
t
|
|
160
|
+
} = (0, _reactI18next.useTranslation)("translation", {
|
|
161
|
+
keyPrefix: "component.videoSearch"
|
|
162
|
+
});
|
|
163
|
+
return {
|
|
164
|
+
searchPlaceholder: t("searchPlaceholder"),
|
|
165
|
+
searchButtonTitle: t("searchButtonTitle"),
|
|
166
|
+
loadMoreVideos: t("loadMoreVideos"),
|
|
167
|
+
noResults: t("noResults"),
|
|
168
|
+
is360Video: t("is360Video"),
|
|
169
|
+
previewVideo: t("previewVideo"),
|
|
170
|
+
addVideo: t("addVideo"),
|
|
171
|
+
close: t("close"),
|
|
172
|
+
...translations
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
exports.useVideoSearchTranslations = useVideoSearchTranslations;
|
|
@@ -1449,6 +1449,16 @@ declare const messages: {
|
|
|
1449
1449
|
useAudio: string;
|
|
1450
1450
|
noResults: string;
|
|
1451
1451
|
};
|
|
1452
|
+
videoSearch: {
|
|
1453
|
+
searchPlaceholder: string;
|
|
1454
|
+
searchButtonTitle: string;
|
|
1455
|
+
loadMoreVideos: string;
|
|
1456
|
+
noResults: string;
|
|
1457
|
+
addVideo: string;
|
|
1458
|
+
previewVideo: string;
|
|
1459
|
+
is360Video: string;
|
|
1460
|
+
close: string;
|
|
1461
|
+
};
|
|
1452
1462
|
};
|
|
1453
1463
|
};
|
|
1454
1464
|
export default messages;
|
|
@@ -266,8 +266,8 @@ const messages = {
|
|
|
266
266
|
activateAdditionalResources: "Show additional content",
|
|
267
267
|
toggleFilterLabel: "Show additional content",
|
|
268
268
|
label: "Learning content",
|
|
269
|
-
tooltipCoreTopic: "Core content
|
|
270
|
-
tooltipAdditionalTopic: "Additional content
|
|
269
|
+
tooltipCoreTopic: "Core content",
|
|
270
|
+
tooltipAdditionalTopic: "Additional content",
|
|
271
271
|
additionalTooltip: "Additional content is not on the curriculum",
|
|
272
272
|
dialogTooltip: "What is core content and additional content?",
|
|
273
273
|
dialogHeading: "Core content and additional content",
|
|
@@ -1499,6 +1499,16 @@ const messages = {
|
|
|
1499
1499
|
searchButtonTitle: "Search",
|
|
1500
1500
|
useAudio: "Chose audio",
|
|
1501
1501
|
noResults: "No audio files found"
|
|
1502
|
+
},
|
|
1503
|
+
videoSearch: {
|
|
1504
|
+
searchPlaceholder: "Search videos",
|
|
1505
|
+
searchButtonTitle: "Search",
|
|
1506
|
+
loadMoreVideos: "Load more videos",
|
|
1507
|
+
noResults: "No videos found",
|
|
1508
|
+
addVideo: "Use video",
|
|
1509
|
+
previewVideo: "Preview",
|
|
1510
|
+
is360Video: "VR video",
|
|
1511
|
+
close: "Lukk"
|
|
1502
1512
|
}
|
|
1503
1513
|
}
|
|
1504
1514
|
};
|
|
@@ -1449,6 +1449,16 @@ declare const messages: {
|
|
|
1449
1449
|
useAudio: string;
|
|
1450
1450
|
noResults: string;
|
|
1451
1451
|
};
|
|
1452
|
+
videoSearch: {
|
|
1453
|
+
searchPlaceholder: string;
|
|
1454
|
+
searchButtonTitle: string;
|
|
1455
|
+
loadMoreVideos: string;
|
|
1456
|
+
noResults: string;
|
|
1457
|
+
addVideo: string;
|
|
1458
|
+
previewVideo: string;
|
|
1459
|
+
is360Video: string;
|
|
1460
|
+
close: string;
|
|
1461
|
+
};
|
|
1452
1462
|
};
|
|
1453
1463
|
};
|
|
1454
1464
|
export default messages;
|
|
@@ -1499,6 +1499,16 @@ const messages = {
|
|
|
1499
1499
|
searchButtonTitle: "Søk",
|
|
1500
1500
|
useAudio: "Velg lyd",
|
|
1501
1501
|
noResults: "Ingen resultater funnet"
|
|
1502
|
+
},
|
|
1503
|
+
videoSearch: {
|
|
1504
|
+
searchPlaceholder: "Søk i videoer",
|
|
1505
|
+
searchButtonTitle: "Søk",
|
|
1506
|
+
loadMoreVideos: "Last flere videoer",
|
|
1507
|
+
noResults: "Ingen videoer funnet",
|
|
1508
|
+
addVideo: "Bruk video",
|
|
1509
|
+
previewVideo: "Forhåndsvis",
|
|
1510
|
+
is360Video: "VR-video",
|
|
1511
|
+
close: "Lukk"
|
|
1502
1512
|
}
|
|
1503
1513
|
}
|
|
1504
1514
|
};
|
|
@@ -1449,6 +1449,16 @@ declare const messages: {
|
|
|
1449
1449
|
useAudio: string;
|
|
1450
1450
|
noResults: string;
|
|
1451
1451
|
};
|
|
1452
|
+
videoSearch: {
|
|
1453
|
+
searchPlaceholder: string;
|
|
1454
|
+
searchButtonTitle: string;
|
|
1455
|
+
loadMoreVideos: string;
|
|
1456
|
+
noResults: string;
|
|
1457
|
+
addVideo: string;
|
|
1458
|
+
previewVideo: string;
|
|
1459
|
+
is360Video: string;
|
|
1460
|
+
close: string;
|
|
1461
|
+
};
|
|
1452
1462
|
};
|
|
1453
1463
|
};
|
|
1454
1464
|
export default messages;
|
|
@@ -1499,6 +1499,16 @@ const messages = {
|
|
|
1499
1499
|
searchButtonTitle: "Søk",
|
|
1500
1500
|
useAudio: "Velg lyd",
|
|
1501
1501
|
noResults: "Ingen resultat funnet"
|
|
1502
|
+
},
|
|
1503
|
+
videoSearch: {
|
|
1504
|
+
searchPlaceholder: "Søk i videoar",
|
|
1505
|
+
searchButtonTitle: "Søk",
|
|
1506
|
+
loadMoreVideos: "Last fleire videoar",
|
|
1507
|
+
noResults: "Ingen videoar funnet",
|
|
1508
|
+
addVideo: "Bruk video",
|
|
1509
|
+
previewVideo: "Førehandsvis",
|
|
1510
|
+
is360Video: "VR-video",
|
|
1511
|
+
close: "Lukk"
|
|
1502
1512
|
}
|
|
1503
1513
|
}
|
|
1504
1514
|
};
|
|
@@ -1449,6 +1449,16 @@ declare const messages: {
|
|
|
1449
1449
|
useAudio: string;
|
|
1450
1450
|
noResults: string;
|
|
1451
1451
|
};
|
|
1452
|
+
videoSearch: {
|
|
1453
|
+
searchPlaceholder: string;
|
|
1454
|
+
searchButtonTitle: string;
|
|
1455
|
+
loadMoreVideos: string;
|
|
1456
|
+
noResults: string;
|
|
1457
|
+
addVideo: string;
|
|
1458
|
+
previewVideo: string;
|
|
1459
|
+
is360Video: string;
|
|
1460
|
+
close: string;
|
|
1461
|
+
};
|
|
1452
1462
|
};
|
|
1453
1463
|
};
|
|
1454
1464
|
export default messages;
|
|
@@ -1499,6 +1499,16 @@ const messages = {
|
|
|
1499
1499
|
searchButtonTitle: "Søk",
|
|
1500
1500
|
useAudio: "Velg lyd",
|
|
1501
1501
|
noResults: "Ingen resultater funnet"
|
|
1502
|
+
},
|
|
1503
|
+
videoSearch: {
|
|
1504
|
+
searchPlaceholder: "Søk i videoar",
|
|
1505
|
+
searchButtonTitle: "Søk",
|
|
1506
|
+
loadMoreVideos: "Last fleire videoar",
|
|
1507
|
+
noResults: "Ingen videoar funnet",
|
|
1508
|
+
addVideo: "Bruk video",
|
|
1509
|
+
previewVideo: "Forhåndsvis",
|
|
1510
|
+
is360Video: "VR-video",
|
|
1511
|
+
close: "Lukk"
|
|
1502
1512
|
}
|
|
1503
1513
|
}
|
|
1504
1514
|
};
|
|
@@ -1449,6 +1449,16 @@ declare const messages: {
|
|
|
1449
1449
|
useAudio: string;
|
|
1450
1450
|
noResults: string;
|
|
1451
1451
|
};
|
|
1452
|
+
videoSearch: {
|
|
1453
|
+
searchPlaceholder: string;
|
|
1454
|
+
searchButtonTitle: string;
|
|
1455
|
+
loadMoreVideos: string;
|
|
1456
|
+
noResults: string;
|
|
1457
|
+
addVideo: string;
|
|
1458
|
+
previewVideo: string;
|
|
1459
|
+
is360Video: string;
|
|
1460
|
+
close: string;
|
|
1461
|
+
};
|
|
1452
1462
|
};
|
|
1453
1463
|
};
|
|
1454
1464
|
export default messages;
|
|
@@ -1499,6 +1499,16 @@ const messages = {
|
|
|
1499
1499
|
searchButtonTitle: "Søk",
|
|
1500
1500
|
useAudio: "Velg lyd",
|
|
1501
1501
|
noResults: "Ingen resultater funnet"
|
|
1502
|
+
},
|
|
1503
|
+
videoSearch: {
|
|
1504
|
+
searchPlaceholder: "Søk i videoar",
|
|
1505
|
+
searchButtonTitle: "Søk",
|
|
1506
|
+
loadMoreVideos: "Last fleire videoar",
|
|
1507
|
+
noResults: "Ingen videoar funnet",
|
|
1508
|
+
addVideo: "Bruk video",
|
|
1509
|
+
previewVideo: "Forhåndsvis",
|
|
1510
|
+
is360Video: "VR-video",
|
|
1511
|
+
close: "Lukk"
|
|
1502
1512
|
}
|
|
1503
1513
|
}
|
|
1504
1514
|
};
|
package/lib/styles.css
CHANGED
|
@@ -230,10 +230,18 @@
|
|
|
230
230
|
flex: 1 1 0%;
|
|
231
231
|
}
|
|
232
232
|
|
|
233
|
+
.gap_xxsmall {
|
|
234
|
+
gap: var(--spacing-xxsmall);
|
|
235
|
+
}
|
|
236
|
+
|
|
233
237
|
.grid-area_track {
|
|
234
238
|
grid-area: track;
|
|
235
239
|
}
|
|
236
240
|
|
|
241
|
+
.min-w_xxlarge {
|
|
242
|
+
min-width: var(--sizes-xxlarge);
|
|
243
|
+
}
|
|
244
|
+
|
|
237
245
|
.grid-area_volume {
|
|
238
246
|
grid-area: volume;
|
|
239
247
|
}
|
|
@@ -254,10 +262,6 @@
|
|
|
254
262
|
max-height: var(--sizes-xxlarge);
|
|
255
263
|
}
|
|
256
264
|
|
|
257
|
-
.min-w_xxlarge {
|
|
258
|
-
min-width: var(--sizes-xxlarge);
|
|
259
|
-
}
|
|
260
|
-
|
|
261
265
|
.grid-area_speed {
|
|
262
266
|
grid-area: speed;
|
|
263
267
|
}
|
|
@@ -266,6 +270,14 @@
|
|
|
266
270
|
height: var(--sizes-surface-3xsmall);
|
|
267
271
|
}
|
|
268
272
|
|
|
273
|
+
.min-w_small {
|
|
274
|
+
min-width: var(--sizes-small);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.px_small {
|
|
278
|
+
padding-inline: var(--spacing-small);
|
|
279
|
+
}
|
|
280
|
+
|
|
269
281
|
.sr_true {
|
|
270
282
|
position: absolute;
|
|
271
283
|
width: 1px;
|
|
@@ -314,10 +326,6 @@
|
|
|
314
326
|
max-width: 8xl;
|
|
315
327
|
}
|
|
316
328
|
|
|
317
|
-
.gap_xxsmall {
|
|
318
|
-
gap: var(--spacing-xxsmall);
|
|
319
|
-
}
|
|
320
|
-
|
|
321
329
|
.c_inherit {
|
|
322
330
|
color: inherit;
|
|
323
331
|
}
|
|
@@ -454,10 +462,6 @@
|
|
|
454
462
|
color: var(--colors-text-error);
|
|
455
463
|
}
|
|
456
464
|
|
|
457
|
-
.bd-b_0 {
|
|
458
|
-
border-bottom: 0;
|
|
459
|
-
}
|
|
460
|
-
|
|
461
465
|
.p_0 {
|
|
462
466
|
padding: 0;
|
|
463
467
|
}
|
|
@@ -486,8 +490,8 @@
|
|
|
486
490
|
border-bottom: 1px solid;
|
|
487
491
|
}
|
|
488
492
|
|
|
489
|
-
.
|
|
490
|
-
padding-block: var(--spacing-
|
|
493
|
+
.pbs_5xsmall {
|
|
494
|
+
padding-block-start: var(--spacing-5xsmall);
|
|
491
495
|
}
|
|
492
496
|
|
|
493
497
|
.px_4xsmall {
|
|
@@ -729,14 +733,6 @@
|
|
|
729
733
|
background-color: var(--colors-surface-disabled);
|
|
730
734
|
}
|
|
731
735
|
|
|
732
|
-
.bdr-bl_0 {
|
|
733
|
-
border-bottom-left-radius: 0;
|
|
734
|
-
}
|
|
735
|
-
|
|
736
|
-
.bdr-br_0 {
|
|
737
|
-
border-bottom-right-radius: 0;
|
|
738
|
-
}
|
|
739
|
-
|
|
740
736
|
.top_xsmall {
|
|
741
737
|
top: var(--spacing-xsmall);
|
|
742
738
|
}
|
|
@@ -1079,6 +1075,10 @@
|
|
|
1079
1075
|
margin-inline-start: var(--spacing-1);
|
|
1080
1076
|
}
|
|
1081
1077
|
|
|
1078
|
+
.\[\&_img\]\:bdr_0 img {
|
|
1079
|
+
border-radius: 0;
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
1082
|
.\[\&_a\]\:c_text\.strong a {
|
|
1083
1083
|
color: var(--colors-text-strong);
|
|
1084
1084
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ndla/ui",
|
|
3
|
-
"version": "56.0.
|
|
3
|
+
"version": "56.0.24-alpha.0",
|
|
4
4
|
"description": "UI component library for NDLA",
|
|
5
5
|
"license": "GPL-3.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@ndla/core": "^5.0.2",
|
|
37
|
-
"@ndla/icons": "^8.0.
|
|
37
|
+
"@ndla/icons": "^8.0.16-alpha.0",
|
|
38
38
|
"@ndla/licenses": "^8.0.2-alpha.0",
|
|
39
|
-
"@ndla/primitives": "^1.0.
|
|
40
|
-
"@ndla/safelink": "^7.0.
|
|
41
|
-
"@ndla/styled-system": "^0.0.
|
|
39
|
+
"@ndla/primitives": "^1.0.22-alpha.0",
|
|
40
|
+
"@ndla/safelink": "^7.0.22-alpha.0",
|
|
41
|
+
"@ndla/styled-system": "^0.0.18",
|
|
42
42
|
"@ndla/util": "^4.1.0",
|
|
43
43
|
"html-react-parser": "^5.1.8",
|
|
44
44
|
"i18next-browser-languagedetector": "^7.1.0"
|
|
@@ -53,10 +53,10 @@
|
|
|
53
53
|
"react-router-dom": "> 6.0.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@ndla/preset-panda": "^0.0.
|
|
56
|
+
"@ndla/preset-panda": "^0.0.26",
|
|
57
57
|
"@ndla/types-backend": "^0.2.86",
|
|
58
58
|
"@ndla/types-embed": "^5.0.1-alpha.0",
|
|
59
|
-
"@pandacss/dev": "^0.
|
|
59
|
+
"@pandacss/dev": "^0.46.0",
|
|
60
60
|
"css-loader": "^6.7.3",
|
|
61
61
|
"mini-css-extract-plugin": "^2.7.5",
|
|
62
62
|
"sass-loader": "^13.2.2",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"publishConfig": {
|
|
67
67
|
"access": "public"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "7713c89290c9b308be47bce300ad7db4a52a42dd"
|
|
70
70
|
}
|
|
@@ -90,7 +90,7 @@ const ProgressWrapper = styled("div", {
|
|
|
90
90
|
flex: "1",
|
|
91
91
|
display: "flex",
|
|
92
92
|
alignItems: "center",
|
|
93
|
-
gap: "
|
|
93
|
+
gap: "xxsmall",
|
|
94
94
|
gridArea: "track",
|
|
95
95
|
paddingBlock: "xsmall",
|
|
96
96
|
mobileDown: {
|
|
@@ -99,6 +99,12 @@ const ProgressWrapper = styled("div", {
|
|
|
99
99
|
},
|
|
100
100
|
});
|
|
101
101
|
|
|
102
|
+
const StyledText = styled(Text, {
|
|
103
|
+
base: {
|
|
104
|
+
minWidth: "xxlarge",
|
|
105
|
+
},
|
|
106
|
+
});
|
|
107
|
+
|
|
102
108
|
const VolumeButton = styled(IconButton, {
|
|
103
109
|
base: {
|
|
104
110
|
gridArea: "volume",
|
|
@@ -128,6 +134,13 @@ const StyledSelectRoot = styled(SelectRoot, {
|
|
|
128
134
|
const StyledSliderControl = styled(SliderControl, {
|
|
129
135
|
base: {
|
|
130
136
|
height: "surface.3xsmall",
|
|
137
|
+
minWidth: "small",
|
|
138
|
+
},
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
const StyledPopoverContent = styled(PopoverContent, {
|
|
142
|
+
base: {
|
|
143
|
+
paddingInline: "small",
|
|
131
144
|
},
|
|
132
145
|
});
|
|
133
146
|
|
|
@@ -248,9 +261,9 @@ const Controls = ({ src, title }: Props) => {
|
|
|
248
261
|
<Forward15Line />
|
|
249
262
|
</Forward15SecButton>
|
|
250
263
|
<ProgressWrapper>
|
|
251
|
-
<
|
|
264
|
+
<StyledText textStyle="label.medium" asChild consumeCss>
|
|
252
265
|
<div>{formatTime(currentTime)}</div>
|
|
253
|
-
</
|
|
266
|
+
</StyledText>
|
|
254
267
|
<SliderRoot
|
|
255
268
|
value={[audioRef.current?.currentTime ?? 0]}
|
|
256
269
|
defaultValue={[0]}
|
|
@@ -273,9 +286,9 @@ const Controls = ({ src, title }: Props) => {
|
|
|
273
286
|
</SliderThumb>
|
|
274
287
|
</SliderControl>
|
|
275
288
|
</SliderRoot>
|
|
276
|
-
<
|
|
289
|
+
<StyledText textStyle="label.medium" asChild consumeCss>
|
|
277
290
|
<div>-{formatTime(remainingTime)}</div>
|
|
278
|
-
</
|
|
291
|
+
</StyledText>
|
|
279
292
|
</ProgressWrapper>
|
|
280
293
|
<StyledSelectRoot
|
|
281
294
|
items={speedValues}
|
|
@@ -314,7 +327,7 @@ const Controls = ({ src, title }: Props) => {
|
|
|
314
327
|
<VolumeUpFill />
|
|
315
328
|
</VolumeButton>
|
|
316
329
|
</PopoverTrigger>
|
|
317
|
-
<
|
|
330
|
+
<StyledPopoverContent>
|
|
318
331
|
<SliderRoot
|
|
319
332
|
orientation="vertical"
|
|
320
333
|
value={[volumeValue]}
|
|
@@ -334,7 +347,7 @@ const Controls = ({ src, title }: Props) => {
|
|
|
334
347
|
</SliderThumb>
|
|
335
348
|
</StyledSliderControl>
|
|
336
349
|
</SliderRoot>
|
|
337
|
-
</
|
|
350
|
+
</StyledPopoverContent>
|
|
338
351
|
</PopoverRoot>
|
|
339
352
|
</ControlsWrapper>
|
|
340
353
|
</div>
|
|
@@ -92,7 +92,7 @@ export interface InlineConceptProps extends ConceptProps, BaseProps {
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
export const InlineConcept = forwardRef<HTMLSpanElement, InlineConceptProps>(
|
|
95
|
-
({ linkText, copyright, visualElement, lang, children, title, source, ...rest }, ref) => (
|
|
95
|
+
({ linkText, copyright, visualElement, previewAlt, lang, children, title, source, ...rest }, ref) => (
|
|
96
96
|
<PopoverRoot>
|
|
97
97
|
{/* @ts-expect-error placing ref and rest on popover trigger somehow removes a bug where the popover target becomes a bit bigger */}
|
|
98
98
|
<PopoverTrigger asChild ref={ref} {...rest}>
|
|
@@ -100,7 +100,14 @@ export const InlineConcept = forwardRef<HTMLSpanElement, InlineConceptProps>(
|
|
|
100
100
|
</PopoverTrigger>
|
|
101
101
|
<Portal>
|
|
102
102
|
<StyledPopoverContent>
|
|
103
|
-
<Concept
|
|
103
|
+
<Concept
|
|
104
|
+
copyright={copyright}
|
|
105
|
+
visualElement={visualElement}
|
|
106
|
+
lang={lang}
|
|
107
|
+
title={title}
|
|
108
|
+
source={source}
|
|
109
|
+
previewAlt={previewAlt}
|
|
110
|
+
>
|
|
104
111
|
{children}
|
|
105
112
|
</Concept>
|
|
106
113
|
</StyledPopoverContent>
|
package/src/Embed/GlossEmbed.tsx
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
+
import { Portal } from "@ark-ui/react";
|
|
9
10
|
import { Figure, PopoverContent, PopoverRoot, PopoverTrigger } from "@ndla/primitives";
|
|
10
11
|
import { styled } from "@ndla/styled-system/jsx";
|
|
11
12
|
import { ConceptMetaData } from "@ndla/types-embed";
|
|
@@ -47,11 +48,13 @@ export const GlossEmbed = ({ embed }: Props) => {
|
|
|
47
48
|
<PopoverTrigger asChild>
|
|
48
49
|
<InlineTriggerButton>{embed.embedData.linkText}</InlineTriggerButton>
|
|
49
50
|
</PopoverTrigger>
|
|
50
|
-
<
|
|
51
|
-
<
|
|
52
|
-
<
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
<Portal>
|
|
52
|
+
<StyledPopoverContent>
|
|
53
|
+
<Figure>
|
|
54
|
+
<Gloss glossData={concept.glossData} title={concept.title} audio={audio} />
|
|
55
|
+
</Figure>
|
|
56
|
+
</StyledPopoverContent>
|
|
57
|
+
</Portal>
|
|
55
58
|
</PopoverRoot>
|
|
56
59
|
);
|
|
57
60
|
}
|
package/src/Embed/ImageEmbed.tsx
CHANGED
|
@@ -122,10 +122,10 @@ const ImageWrapper = styled("div", {
|
|
|
122
122
|
true: {
|
|
123
123
|
border: "1px solid",
|
|
124
124
|
borderColor: "stroke.subtle",
|
|
125
|
-
borderBottom: "0",
|
|
126
125
|
borderRadius: "xsmall",
|
|
127
|
-
|
|
128
|
-
|
|
126
|
+
"& img": {
|
|
127
|
+
borderRadius: "0",
|
|
128
|
+
},
|
|
129
129
|
},
|
|
130
130
|
false: {},
|
|
131
131
|
},
|
|
@@ -240,6 +240,7 @@ const ImageEmbed = ({ embed, previewAlt, lang, renderContext = "article", childr
|
|
|
240
240
|
src={data.image.imageUrl}
|
|
241
241
|
lang={lang}
|
|
242
242
|
onClick={figureProps?.float ? toggleImageSize : undefined}
|
|
243
|
+
variant="rounded"
|
|
243
244
|
/>
|
|
244
245
|
{!!embedData.align && (
|
|
245
246
|
<ExpandButton
|
|
@@ -17,7 +17,7 @@ const StyledSpan = styled("span", {
|
|
|
17
17
|
borderBottom: "1px solid",
|
|
18
18
|
borderStyle: "dashed",
|
|
19
19
|
borderColor: "stroke.hover",
|
|
20
|
-
|
|
20
|
+
paddingBlockStart: "5xsmall",
|
|
21
21
|
paddingInline: "4xsmall",
|
|
22
22
|
width: "fit-content",
|
|
23
23
|
cursor: "pointer",
|
|
@@ -85,6 +85,7 @@ export const ResourceBox = ({ image, title, caption, url, buttonText }: Props) =
|
|
|
85
85
|
src={image.src}
|
|
86
86
|
alt={image.alt}
|
|
87
87
|
sizes={`(min-width: ${breakpoints.desktop}) 150px, (max-width: ${breakpoints.tablet} ) 400px, 200px`}
|
|
88
|
+
variant="rounded"
|
|
88
89
|
/>
|
|
89
90
|
<ContentWrapper>
|
|
90
91
|
<Heading textStyle="label.large" fontWeight="bold" asChild consumeCss>
|