@ndla/ui 56.0.70-alpha.0 → 56.0.72-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/es/AudioPlayer/Controls.js +10 -12
- package/es/locale/messages-en.js +2 -1
- package/es/locale/messages-nb.js +2 -1
- package/es/locale/messages-nn.js +2 -1
- package/es/locale/messages-se.js +2 -1
- package/es/locale/messages-sma.js +2 -1
- package/es/model/ContentType.js +8 -2
- package/lib/AudioPlayer/Controls.js +9 -11
- package/lib/locale/messages-en.d.ts +1 -0
- package/lib/locale/messages-en.js +2 -1
- package/lib/locale/messages-nb.d.ts +1 -0
- package/lib/locale/messages-nb.js +2 -1
- package/lib/locale/messages-nn.d.ts +1 -0
- package/lib/locale/messages-nn.js +2 -1
- package/lib/locale/messages-se.d.ts +1 -0
- package/lib/locale/messages-se.js +2 -1
- package/lib/locale/messages-sma.d.ts +1 -0
- package/lib/locale/messages-sma.js +2 -1
- package/lib/model/ContentType.d.ts +5 -0
- package/lib/model/ContentType.js +9 -3
- package/lib/model/index.d.ts +2 -0
- package/package.json +4 -4
- package/src/AudioPlayer/Controls.tsx +10 -13
- package/src/TagSelector/TagSelector.stories.tsx +10 -13
- 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
- package/src/model/ContentType.ts +6 -0
|
@@ -12,7 +12,7 @@ import { createListCollection } from "@ark-ui/react";
|
|
|
12
12
|
import { Replay15Line, Forward15Line } from "@ndla/icons/action";
|
|
13
13
|
import { PlayFill, PauseLine, VolumeUpFill } from "@ndla/icons/common";
|
|
14
14
|
import { CheckLine } from "@ndla/icons/editor";
|
|
15
|
-
import { Button, IconButton, PopoverContent, PopoverRoot, PopoverTrigger, SelectContent, SelectControl, SelectItem, SelectItemIndicator, SelectItemText, SelectLabel,
|
|
15
|
+
import { Button, IconButton, PopoverContent, PopoverRoot, PopoverTrigger, SelectContent, SelectControl, SelectItem, SelectItemIndicator, SelectItemText, SelectLabel, SelectRoot, SelectTrigger, SliderControl, SliderHiddenInput, SliderLabel, SliderRange, SliderRoot, SliderThumb, SliderTrack, Text } from "@ndla/primitives";
|
|
16
16
|
import { styled } from "@ndla/styled-system/jsx";
|
|
17
17
|
import { visuallyHidden } from "@ndla/styled-system/patterns";
|
|
18
18
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -278,17 +278,15 @@ const Controls = _ref => {
|
|
|
278
278
|
})
|
|
279
279
|
})
|
|
280
280
|
})
|
|
281
|
-
}), /*#__PURE__*/_jsx(
|
|
282
|
-
children: /*#__PURE__*/
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
children: [
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
}, speed))
|
|
291
|
-
})
|
|
281
|
+
}), /*#__PURE__*/_jsx(SelectContent, {
|
|
282
|
+
children: speedValues.items.map(speed => /*#__PURE__*/_jsxs(SelectItem, {
|
|
283
|
+
item: speed,
|
|
284
|
+
children: [/*#__PURE__*/_jsxs(SelectItemText, {
|
|
285
|
+
children: [speed, "x"]
|
|
286
|
+
}), /*#__PURE__*/_jsx(SelectItemIndicator, {
|
|
287
|
+
children: /*#__PURE__*/_jsx(CheckLine, {})
|
|
288
|
+
})]
|
|
289
|
+
}, speed))
|
|
292
290
|
})]
|
|
293
291
|
}), /*#__PURE__*/_jsxs(PopoverRoot, {
|
|
294
292
|
positioning: {
|
package/es/locale/messages-en.js
CHANGED
package/es/locale/messages-nb.js
CHANGED
package/es/locale/messages-nn.js
CHANGED
package/es/locale/messages-se.js
CHANGED
package/es/model/ContentType.js
CHANGED
|
@@ -21,6 +21,9 @@ export const IMAGE = "image";
|
|
|
21
21
|
export const VIDEO = "video";
|
|
22
22
|
export const AUDIO = "audio";
|
|
23
23
|
export const PODCAST = "podcast";
|
|
24
|
+
export const GLOSS = "gloss";
|
|
25
|
+
export const PROGRAMME = "programme";
|
|
26
|
+
export const PODCAST_SERIES = "podcast-series";
|
|
24
27
|
export const contentTypes = {
|
|
25
28
|
SUBJECT_MATERIAL,
|
|
26
29
|
TASKS_AND_ACTIVITIES,
|
|
@@ -32,7 +35,9 @@ export const contentTypes = {
|
|
|
32
35
|
MULTIDISCIPLINARY,
|
|
33
36
|
CONCEPT,
|
|
34
37
|
EXTERNAL,
|
|
35
|
-
MISSING
|
|
38
|
+
MISSING,
|
|
39
|
+
PROGRAMME,
|
|
40
|
+
PODCAST_SERIES
|
|
36
41
|
};
|
|
37
42
|
export const RESOURCE_TYPE_LEARNING_PATH = "urn:resourcetype:learningPath";
|
|
38
43
|
export const RESOURCE_TYPE_SUBJECT_MATERIAL = "urn:resourcetype:subjectMaterial";
|
|
@@ -55,5 +60,6 @@ export const resourceEmbedTypeMapping = {
|
|
|
55
60
|
video: "video",
|
|
56
61
|
concept: "concept",
|
|
57
62
|
audio: "audio",
|
|
58
|
-
podcast: "podcast"
|
|
63
|
+
podcast: "podcast",
|
|
64
|
+
gloss: "gloss"
|
|
59
65
|
};
|
|
@@ -284,17 +284,15 @@ const Controls = _ref => {
|
|
|
284
284
|
})
|
|
285
285
|
})
|
|
286
286
|
})
|
|
287
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.
|
|
288
|
-
children: /*#__PURE__*/(0, _jsxRuntime.
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
children: [
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
}, speed))
|
|
297
|
-
})
|
|
287
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.SelectContent, {
|
|
288
|
+
children: speedValues.items.map(speed => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_primitives.SelectItem, {
|
|
289
|
+
item: speed,
|
|
290
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_primitives.SelectItemText, {
|
|
291
|
+
children: [speed, "x"]
|
|
292
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.SelectItemIndicator, {
|
|
293
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_editor.CheckLine, {})
|
|
294
|
+
})]
|
|
295
|
+
}, speed))
|
|
298
296
|
})]
|
|
299
297
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_primitives.PopoverRoot, {
|
|
300
298
|
positioning: {
|
|
@@ -20,6 +20,9 @@ export declare const IMAGE = "image";
|
|
|
20
20
|
export declare const VIDEO = "video";
|
|
21
21
|
export declare const AUDIO = "audio";
|
|
22
22
|
export declare const PODCAST = "podcast";
|
|
23
|
+
export declare const GLOSS = "gloss";
|
|
24
|
+
export declare const PROGRAMME = "programme";
|
|
25
|
+
export declare const PODCAST_SERIES = "podcast-series";
|
|
23
26
|
export declare const contentTypes: {
|
|
24
27
|
SUBJECT_MATERIAL: string;
|
|
25
28
|
TASKS_AND_ACTIVITIES: string;
|
|
@@ -32,6 +35,8 @@ export declare const contentTypes: {
|
|
|
32
35
|
CONCEPT: string;
|
|
33
36
|
EXTERNAL: string;
|
|
34
37
|
MISSING: string;
|
|
38
|
+
PROGRAMME: string;
|
|
39
|
+
PODCAST_SERIES: string;
|
|
35
40
|
};
|
|
36
41
|
export declare const RESOURCE_TYPE_LEARNING_PATH = "urn:resourcetype:learningPath";
|
|
37
42
|
export declare const RESOURCE_TYPE_SUBJECT_MATERIAL = "urn:resourcetype:subjectMaterial";
|
package/lib/model/ContentType.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.resourceEmbedTypeMapping = exports.contentTypes = exports.contentTypeMapping = exports.VIDEO = exports.TOPIC = exports.TASKS_AND_ACTIVITIES = exports.SUBJECT_MATERIAL = exports.SUBJECT = exports.SOURCE_MATERIAL = exports.RESOURCE_TYPE_TASKS_AND_ACTIVITIES = exports.RESOURCE_TYPE_SUBJECT_MATERIAL = exports.RESOURCE_TYPE_SOURCE_MATERIAL = exports.RESOURCE_TYPE_LEARNING_PATH = exports.RESOURCE_TYPE_CONCEPT = exports.RESOURCE_TYPE_ASSESSMENT_RESOURCES = exports.PODCAST = exports.MULTIDISCIPLINARY = exports.MISSING = exports.LEARNING_PATH = exports.IMAGE = exports.EXTERNAL = exports.CONCEPT = exports.AUDIO = exports.ASSESSMENT_RESOURCES = void 0;
|
|
6
|
+
exports.resourceEmbedTypeMapping = exports.contentTypes = exports.contentTypeMapping = exports.VIDEO = exports.TOPIC = exports.TASKS_AND_ACTIVITIES = exports.SUBJECT_MATERIAL = exports.SUBJECT = exports.SOURCE_MATERIAL = exports.RESOURCE_TYPE_TASKS_AND_ACTIVITIES = exports.RESOURCE_TYPE_SUBJECT_MATERIAL = exports.RESOURCE_TYPE_SOURCE_MATERIAL = exports.RESOURCE_TYPE_LEARNING_PATH = exports.RESOURCE_TYPE_CONCEPT = exports.RESOURCE_TYPE_ASSESSMENT_RESOURCES = exports.PROGRAMME = exports.PODCAST_SERIES = exports.PODCAST = exports.MULTIDISCIPLINARY = exports.MISSING = exports.LEARNING_PATH = exports.IMAGE = exports.GLOSS = exports.EXTERNAL = exports.CONCEPT = exports.AUDIO = exports.ASSESSMENT_RESOURCES = void 0;
|
|
7
7
|
/**
|
|
8
8
|
* Copyright (c) 2017-present, NDLA.
|
|
9
9
|
*
|
|
@@ -27,6 +27,9 @@ const IMAGE = exports.IMAGE = "image";
|
|
|
27
27
|
const VIDEO = exports.VIDEO = "video";
|
|
28
28
|
const AUDIO = exports.AUDIO = "audio";
|
|
29
29
|
const PODCAST = exports.PODCAST = "podcast";
|
|
30
|
+
const GLOSS = exports.GLOSS = "gloss";
|
|
31
|
+
const PROGRAMME = exports.PROGRAMME = "programme";
|
|
32
|
+
const PODCAST_SERIES = exports.PODCAST_SERIES = "podcast-series";
|
|
30
33
|
const contentTypes = exports.contentTypes = {
|
|
31
34
|
SUBJECT_MATERIAL,
|
|
32
35
|
TASKS_AND_ACTIVITIES,
|
|
@@ -38,7 +41,9 @@ const contentTypes = exports.contentTypes = {
|
|
|
38
41
|
MULTIDISCIPLINARY,
|
|
39
42
|
CONCEPT,
|
|
40
43
|
EXTERNAL,
|
|
41
|
-
MISSING
|
|
44
|
+
MISSING,
|
|
45
|
+
PROGRAMME,
|
|
46
|
+
PODCAST_SERIES
|
|
42
47
|
};
|
|
43
48
|
const RESOURCE_TYPE_LEARNING_PATH = exports.RESOURCE_TYPE_LEARNING_PATH = "urn:resourcetype:learningPath";
|
|
44
49
|
const RESOURCE_TYPE_SUBJECT_MATERIAL = exports.RESOURCE_TYPE_SUBJECT_MATERIAL = "urn:resourcetype:subjectMaterial";
|
|
@@ -61,5 +66,6 @@ const resourceEmbedTypeMapping = exports.resourceEmbedTypeMapping = {
|
|
|
61
66
|
video: "video",
|
|
62
67
|
concept: "concept",
|
|
63
68
|
audio: "audio",
|
|
64
|
-
podcast: "podcast"
|
|
69
|
+
podcast: "podcast",
|
|
70
|
+
gloss: "gloss"
|
|
65
71
|
};
|
package/lib/model/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ndla/ui",
|
|
3
|
-
"version": "56.0.
|
|
3
|
+
"version": "56.0.72-alpha.0",
|
|
4
4
|
"description": "UI component library for NDLA",
|
|
5
5
|
"license": "GPL-3.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"@ndla/core": "^5.0.2",
|
|
36
36
|
"@ndla/icons": "^8.0.43-alpha.0",
|
|
37
37
|
"@ndla/licenses": "^8.0.3-alpha.0",
|
|
38
|
-
"@ndla/primitives": "^1.0.
|
|
39
|
-
"@ndla/safelink": "^7.0.
|
|
38
|
+
"@ndla/primitives": "^1.0.56-alpha.0",
|
|
39
|
+
"@ndla/safelink": "^7.0.57-alpha.0",
|
|
40
40
|
"@ndla/styled-system": "^0.0.27",
|
|
41
41
|
"@ndla/util": "^5.0.0-alpha.0",
|
|
42
42
|
"html-react-parser": "^5.1.8",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"publishConfig": {
|
|
59
59
|
"access": "public"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "9977b1ca38cb32c54458378b13fea3f7ca19a187"
|
|
62
62
|
}
|
|
@@ -24,7 +24,6 @@ import {
|
|
|
24
24
|
SelectItemIndicator,
|
|
25
25
|
SelectItemText,
|
|
26
26
|
SelectLabel,
|
|
27
|
-
SelectPositioner,
|
|
28
27
|
SelectRoot,
|
|
29
28
|
SelectTrigger,
|
|
30
29
|
SliderControl,
|
|
@@ -309,18 +308,16 @@ const Controls = ({ src, title }: Props) => {
|
|
|
309
308
|
</SpeedButton>
|
|
310
309
|
</SelectTrigger>
|
|
311
310
|
</SelectControl>
|
|
312
|
-
<
|
|
313
|
-
|
|
314
|
-
{
|
|
315
|
-
<
|
|
316
|
-
|
|
317
|
-
<
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
</SelectContent>
|
|
323
|
-
</SelectPositioner>
|
|
311
|
+
<SelectContent>
|
|
312
|
+
{speedValues.items.map((speed) => (
|
|
313
|
+
<SelectItem key={speed} item={speed}>
|
|
314
|
+
<SelectItemText>{speed}x</SelectItemText>
|
|
315
|
+
<SelectItemIndicator>
|
|
316
|
+
<CheckLine />
|
|
317
|
+
</SelectItemIndicator>
|
|
318
|
+
</SelectItem>
|
|
319
|
+
))}
|
|
320
|
+
</SelectContent>
|
|
324
321
|
</StyledSelectRoot>
|
|
325
322
|
<PopoverRoot positioning={{ placement: "top" }}>
|
|
326
323
|
<PopoverTrigger asChild>
|
|
@@ -18,7 +18,6 @@ import {
|
|
|
18
18
|
ComboboxItem,
|
|
19
19
|
ComboboxItemIndicator,
|
|
20
20
|
ComboboxItemText,
|
|
21
|
-
ComboboxPositioner,
|
|
22
21
|
IconButton,
|
|
23
22
|
Input,
|
|
24
23
|
InputContainer,
|
|
@@ -95,18 +94,16 @@ export const Default: StoryFn<typeof TagSelectorRoot> = ({ translations, ...args
|
|
|
95
94
|
</IconButton>
|
|
96
95
|
</TagSelectorTrigger>
|
|
97
96
|
</HStack>
|
|
98
|
-
<
|
|
99
|
-
|
|
100
|
-
{
|
|
101
|
-
<
|
|
102
|
-
|
|
103
|
-
<
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
</ComboboxContent>
|
|
109
|
-
</ComboboxPositioner>
|
|
97
|
+
<ComboboxContent>
|
|
98
|
+
{options.map((item) => (
|
|
99
|
+
<ComboboxItem key={item} item={item}>
|
|
100
|
+
<ComboboxItemText>{item}</ComboboxItemText>
|
|
101
|
+
<ComboboxItemIndicator>
|
|
102
|
+
<CheckLine />
|
|
103
|
+
</ComboboxItemIndicator>
|
|
104
|
+
</ComboboxItem>
|
|
105
|
+
))}
|
|
106
|
+
</ComboboxContent>
|
|
110
107
|
</TagSelectorRoot>
|
|
111
108
|
);
|
|
112
109
|
};
|
package/src/model/ContentType.ts
CHANGED
|
@@ -21,6 +21,9 @@ export const IMAGE = "image";
|
|
|
21
21
|
export const VIDEO = "video";
|
|
22
22
|
export const AUDIO = "audio";
|
|
23
23
|
export const PODCAST = "podcast";
|
|
24
|
+
export const GLOSS = "gloss";
|
|
25
|
+
export const PROGRAMME = "programme";
|
|
26
|
+
export const PODCAST_SERIES = "podcast-series";
|
|
24
27
|
|
|
25
28
|
export const contentTypes = {
|
|
26
29
|
SUBJECT_MATERIAL,
|
|
@@ -34,6 +37,8 @@ export const contentTypes = {
|
|
|
34
37
|
CONCEPT,
|
|
35
38
|
EXTERNAL,
|
|
36
39
|
MISSING,
|
|
40
|
+
PROGRAMME,
|
|
41
|
+
PODCAST_SERIES,
|
|
37
42
|
};
|
|
38
43
|
|
|
39
44
|
export const RESOURCE_TYPE_LEARNING_PATH = "urn:resourcetype:learningPath";
|
|
@@ -60,4 +65,5 @@ export const resourceEmbedTypeMapping: Record<string, string> = {
|
|
|
60
65
|
concept: "concept",
|
|
61
66
|
audio: "audio",
|
|
62
67
|
podcast: "podcast",
|
|
68
|
+
gloss: "gloss",
|
|
63
69
|
};
|