@ndla/ui 55.0.15-alpha.0 → 55.0.17-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 +125 -29
- package/dist/styles.css +453 -103
- package/es/Article/Article.js +101 -162
- package/es/Article/ArticleByline.js +89 -56
- package/es/Article/ArticleFootNotes.js +35 -23
- package/es/Article/ArticleParagraph.js +2 -2
- package/es/Article/index.js +3 -5
- package/es/AudioPlayer/AudioPlayer.js +20 -20
- package/es/AudioPlayer/Controls.js +45 -45
- package/es/AudioPlayer/SpeechControl.js +8 -8
- package/es/BlogPost/BlogPost.js +6 -6
- package/es/Breadcrumb/Breadcrumb.js +19 -29
- package/es/Breadcrumb/BreadcrumbItem.js +20 -49
- package/es/Breadcrumb/HomeBreadcrumb.js +36 -82
- package/es/CampaignBlock/CampaignBlock.js +12 -12
- package/es/CodeBlock/CodeBlock.js +2 -2
- package/es/Concept/Concept.js +11 -11
- package/es/ContactBlock/ContactBlock.js +170 -185
- package/es/ContactBlock/index.js +3 -3
- package/es/ContentLoader/index.js +12 -12
- package/es/ContentPlaceholder/ContentPlaceholder.js +3 -3
- package/es/ContentTypeBadge/ContentTypeBadge.js +81 -80
- package/es/ContentTypeBadge/ContentTypeBadgeNew.js +3 -2
- package/es/ContentTypeHero/ContentTypeHero.js +50 -0
- package/es/{Logo → ContentTypeHero}/index.js +2 -3
- package/es/CopyParagraphButton/CopyParagraphButton.js +13 -12
- package/es/Embed/AudioEmbed.js +7 -7
- package/es/Embed/BrightcoveEmbed.js +8 -8
- package/es/Embed/CodeEmbed.js +6 -6
- package/es/Embed/ConceptEmbed.js +13 -13
- package/es/Embed/ConceptListEmbed.js +9 -9
- package/es/Embed/ContentLinkEmbed.js +6 -6
- package/es/Embed/CopyrightEmbed.js +3 -3
- package/es/Embed/EmbedErrorPlaceholder.js +5 -5
- package/es/Embed/ExternalEmbed.js +5 -5
- package/es/Embed/FootnoteEmbed.js +5 -5
- package/es/Embed/GlossEmbed.js +11 -11
- package/es/Embed/H5pEmbed.js +5 -5
- package/es/Embed/IframeEmbed.js +6 -6
- package/es/Embed/ImageEmbed.js +10 -10
- package/es/Embed/InlineTriggerButton.js +2 -2
- package/es/Embed/RelatedContentEmbed.js +5 -5
- package/es/Embed/UnknownEmbed.js +3 -3
- package/es/Embed/UuDisclaimerEmbed.js +6 -6
- package/es/ErrorMessage/ErrorMessage.js +14 -14
- package/es/ErrorMessage/ErrorResourceAccessDenied.js +6 -6
- package/es/FactBox/FactBox.js +5 -5
- package/es/FileList/File.js +3 -3
- package/es/FileList/FileList.js +6 -6
- package/es/FileList/Format.js +6 -6
- package/es/FileList/PdfFile.js +5 -5
- package/es/FrontpageArticle/FrontpageArticle.js +7 -8
- package/es/Gloss/Gloss.js +23 -23
- package/es/Gloss/GlossExample.js +9 -9
- package/es/Grid/Grid.js +4 -4
- package/es/KeyFigure/KeyFigure.js +5 -5
- package/es/Layout/LayoutItem.js +25 -37
- package/es/Layout/OneColumn.js +33 -31
- package/es/Layout/PageContainer.js +21 -30
- package/es/LicenseByline/EmbedByline.js +21 -21
- package/es/LicenseByline/LicenseLink.js +3 -3
- package/es/LinkBlock/LinkBlock.js +8 -8
- package/es/LinkBlock/LinkBlockSection.js +4 -4
- package/es/Messages/MessageBox.js +11 -11
- package/es/Messages/index.js +1 -2
- package/es/ProgrammeCard/ProgrammeCard.js +5 -5
- package/es/RelatedArticleList/RelatedArticleList.js +15 -15
- package/es/ResourceBox/ResourceBox.js +9 -9
- package/es/SnackBar/DefaultSnackbar.js +5 -5
- package/es/SnackBar/SnackbarProvider.js +7 -7
- package/es/TagSelector/TagSelector.js +17 -17
- package/es/TreeStructure/AddFolderButton.js +4 -4
- package/es/TreeStructure/ComboboxButton.js +7 -7
- package/es/TreeStructure/FolderItem.js +13 -13
- package/es/TreeStructure/FolderItems.js +6 -6
- package/es/TreeStructure/TreeStructure.js +9 -9
- package/es/ZendeskButton/ZendeskButton.js +2 -2
- package/es/i18n/index.js +1 -1
- package/es/index.js +5 -12
- package/es/locale/messages-en.js +1 -1
- package/es/locale/messages-nb.js +1 -1
- package/es/locale/messages-nn.js +1 -1
- package/es/locale/messages-se.js +1 -1
- package/es/locale/messages-sma.js +1 -1
- package/es/model/ContentType.js +3 -1
- package/es/styles.css +453 -103
- package/lib/Article/Article.d.ts +9 -30
- package/lib/Article/Article.js +104 -164
- package/lib/Article/ArticleByline.d.ts +1 -3
- package/lib/Article/ArticleByline.js +89 -56
- package/lib/Article/ArticleFootNotes.js +35 -24
- package/lib/Article/ArticleParagraph.js +2 -2
- package/lib/Article/index.d.ts +2 -5
- package/lib/Article/index.js +18 -24
- package/lib/AudioPlayer/AudioPlayer.js +20 -20
- package/lib/AudioPlayer/Controls.js +45 -45
- package/lib/AudioPlayer/SpeechControl.js +8 -8
- package/lib/BlogPost/BlogPost.js +6 -6
- package/lib/Breadcrumb/Breadcrumb.js +21 -29
- package/lib/Breadcrumb/BreadcrumbItem.js +22 -50
- package/lib/Breadcrumb/HomeBreadcrumb.d.ts +1 -2
- package/lib/Breadcrumb/HomeBreadcrumb.js +38 -82
- package/lib/CampaignBlock/CampaignBlock.js +12 -12
- package/lib/CodeBlock/CodeBlock.js +2 -2
- package/lib/Concept/Concept.js +11 -11
- package/lib/ContactBlock/ContactBlock.d.ts +6 -7
- package/lib/ContactBlock/ContactBlock.js +173 -184
- package/lib/ContactBlock/index.d.ts +3 -3
- package/lib/ContactBlock/index.js +13 -11
- package/lib/ContentLoader/index.js +12 -12
- package/lib/ContentPlaceholder/ContentPlaceholder.js +3 -3
- package/lib/ContentTypeBadge/ContentTypeBadge.d.ts +11 -12
- package/lib/ContentTypeBadge/ContentTypeBadge.js +83 -80
- package/lib/ContentTypeBadge/ContentTypeBadgeNew.d.ts +1 -2
- package/lib/ContentTypeBadge/ContentTypeBadgeNew.js +3 -2
- package/lib/ContentTypeHero/ContentTypeHero.d.ts +15 -0
- package/lib/ContentTypeHero/ContentTypeHero.js +57 -0
- package/lib/ContentTypeHero/index.d.ts +9 -0
- package/lib/ContentTypeHero/index.js +12 -0
- package/lib/CopyParagraphButton/CopyParagraphButton.js +13 -12
- package/lib/Embed/AudioEmbed.js +7 -7
- package/lib/Embed/BrightcoveEmbed.js +8 -8
- package/lib/Embed/CodeEmbed.js +6 -6
- package/lib/Embed/ConceptEmbed.js +13 -13
- package/lib/Embed/ConceptListEmbed.js +9 -9
- package/lib/Embed/ContentLinkEmbed.js +6 -6
- package/lib/Embed/CopyrightEmbed.js +3 -3
- package/lib/Embed/EmbedErrorPlaceholder.js +5 -5
- package/lib/Embed/ExternalEmbed.js +5 -5
- package/lib/Embed/FootnoteEmbed.js +5 -5
- package/lib/Embed/GlossEmbed.js +11 -11
- package/lib/Embed/H5pEmbed.js +5 -5
- package/lib/Embed/IframeEmbed.js +6 -6
- package/lib/Embed/ImageEmbed.js +10 -10
- package/lib/Embed/InlineTriggerButton.js +2 -2
- package/lib/Embed/RelatedContentEmbed.js +5 -5
- package/lib/Embed/UnknownEmbed.js +3 -3
- package/lib/Embed/UuDisclaimerEmbed.js +6 -6
- package/lib/ErrorMessage/ErrorMessage.js +14 -14
- package/lib/ErrorMessage/ErrorResourceAccessDenied.js +6 -6
- package/lib/FactBox/FactBox.js +5 -5
- package/lib/FileList/File.js +3 -3
- package/lib/FileList/FileList.js +6 -6
- package/lib/FileList/Format.js +6 -6
- package/lib/FileList/PdfFile.js +5 -5
- package/lib/FrontpageArticle/FrontpageArticle.js +7 -8
- package/lib/Gloss/Gloss.js +23 -23
- package/lib/Gloss/GlossExample.js +9 -9
- package/lib/Grid/Grid.js +4 -4
- package/lib/KeyFigure/KeyFigure.js +5 -5
- package/lib/Layout/LayoutItem.d.ts +3 -7
- package/lib/Layout/LayoutItem.js +27 -38
- package/lib/Layout/OneColumn.d.ts +3 -6
- package/lib/Layout/OneColumn.js +36 -33
- package/lib/Layout/PageContainer.d.ts +3 -6
- package/lib/Layout/PageContainer.js +24 -32
- package/lib/LicenseByline/EmbedByline.js +21 -21
- package/lib/LicenseByline/LicenseLink.js +3 -3
- package/lib/LinkBlock/LinkBlock.js +8 -8
- package/lib/LinkBlock/LinkBlockSection.js +4 -4
- package/lib/Messages/MessageBox.js +11 -11
- package/lib/Messages/index.d.ts +1 -2
- package/lib/Messages/index.js +0 -7
- package/lib/ProgrammeCard/ProgrammeCard.js +5 -5
- package/lib/RelatedArticleList/RelatedArticleList.js +15 -15
- package/lib/ResourceBox/ResourceBox.js +9 -9
- package/lib/SnackBar/DefaultSnackbar.js +5 -5
- package/lib/SnackBar/SnackbarProvider.js +7 -7
- package/lib/TagSelector/TagSelector.js +17 -17
- package/lib/TreeStructure/AddFolderButton.js +4 -4
- package/lib/TreeStructure/ComboboxButton.js +7 -7
- package/lib/TreeStructure/FolderItem.js +13 -13
- package/lib/TreeStructure/FolderItems.js +6 -6
- package/lib/TreeStructure/TreeStructure.js +9 -9
- package/lib/ZendeskButton/ZendeskButton.js +2 -2
- package/lib/i18n/index.d.ts +1 -1
- package/lib/i18n/index.js +6 -0
- package/lib/index.d.ts +8 -15
- package/lib/index.js +30 -139
- package/lib/locale/messages-en.js +1 -1
- package/lib/locale/messages-nb.js +1 -1
- package/lib/locale/messages-nn.js +1 -1
- package/lib/locale/messages-se.js +1 -1
- package/lib/locale/messages-sma.js +1 -1
- package/lib/model/ContentType.d.ts +1 -0
- package/lib/model/ContentType.js +4 -2
- package/lib/styles.css +453 -103
- package/package.json +10 -11
- package/src/Article/Article.tsx +101 -229
- package/src/Article/ArticleByline.tsx +82 -69
- package/src/Article/ArticleFootNotes.tsx +32 -36
- package/src/Article/index.ts +3 -7
- package/src/Breadcrumb/Breadcrumb.tsx +20 -18
- package/src/Breadcrumb/BreadcrumbItem.tsx +36 -59
- package/src/Breadcrumb/HomeBreadcrumb.stories.tsx +0 -12
- package/src/Breadcrumb/HomeBreadcrumb.tsx +33 -46
- package/src/ContactBlock/{Contactblock.stories.tsx → ContactBlock.stories.tsx} +3 -4
- package/src/ContactBlock/ContactBlock.tsx +165 -199
- package/src/ContactBlock/index.ts +3 -3
- package/src/ContentTypeBadge/ContentTypeBadge.tsx +77 -77
- package/src/ContentTypeBadge/ContentTypeBadgeNew.tsx +3 -1
- package/src/ContentTypeHero/ContentTypeHero.stories.tsx +76 -0
- package/src/ContentTypeHero/ContentTypeHero.tsx +55 -0
- package/src/ContentTypeHero/index.ts +10 -0
- package/src/CopyParagraphButton/CopyParagraphButton.tsx +10 -3
- package/src/Embed/AudioEmbed.stories.tsx +6 -8
- package/src/Embed/BrightcoveEmbed.stories.tsx +6 -8
- package/src/Embed/ConceptEmbed.stories.tsx +6 -8
- package/src/Embed/ExternalEmbed.stories.tsx +5 -5
- package/src/Embed/H5pEmbed.stories.tsx +6 -8
- package/src/Embed/IframeEmbed.stories.tsx +6 -8
- package/src/Embed/ImageEmbed.stories.tsx +6 -8
- package/src/Embed/RelatedContentEmbed.stories.tsx +6 -8
- package/src/Embed/UuDisclaimerEmbed.stories.tsx +6 -8
- package/src/FrontpageArticle/FrontpageArticle.tsx +1 -1
- package/src/Layout/LayoutItem.tsx +25 -41
- package/src/Layout/OneColumn.tsx +33 -33
- package/src/Layout/PageContainer.tsx +22 -24
- package/src/Messages/index.ts +1 -2
- package/src/i18n/index.ts +1 -0
- package/src/index.ts +11 -35
- package/src/locale/messages-en.ts +1 -1
- package/src/locale/messages-nb.ts +1 -1
- package/src/locale/messages-nn.ts +1 -1
- package/src/locale/messages-se.ts +1 -1
- package/src/locale/messages-sma.ts +1 -1
- package/src/model/ContentType.ts +2 -0
- package/es/Article/ArticleHeaderWrapper.js +0 -33
- package/es/CreatedBy/CreatedBy.js +0 -73
- package/es/CreatedBy/index.js +0 -10
- package/es/Hero/Hero.js +0 -68
- package/es/Hero/HeroContent.js +0 -16
- package/es/Hero/index.js +0 -10
- package/es/LanguageSelector/LanguageSelector.js +0 -87
- package/es/LanguageSelector/index.js +0 -10
- package/es/Logo/Logo.js +0 -52
- package/es/Logo/SvgLogo.js +0 -54
- package/es/Messages/MessageBanner.js +0 -72
- package/es/Search/ActiveFilterContent.js +0 -40
- package/es/Search/ActiveFilters.js +0 -112
- package/es/Search/ContentTypeResult.js +0 -151
- package/es/Search/ContentTypeResultStyles.js +0 -51
- package/es/Search/IsPathToHighlight.js +0 -12
- package/es/Search/LoadingWrapper.js +0 -31
- package/es/Search/SearchField.js +0 -110
- package/es/Search/SearchFieldForm.js +0 -33
- package/es/Search/SearchResult.js +0 -185
- package/es/Search/SearchResultSleeve.js +0 -229
- package/es/Search/index.js +0 -12
- package/lib/Article/ArticleHeaderWrapper.d.ts +0 -14
- package/lib/Article/ArticleHeaderWrapper.js +0 -40
- package/lib/CreatedBy/CreatedBy.d.ts +0 -15
- package/lib/CreatedBy/CreatedBy.js +0 -78
- package/lib/CreatedBy/index.d.ts +0 -9
- package/lib/CreatedBy/index.js +0 -16
- package/lib/Hero/Hero.d.ts +0 -25
- package/lib/Hero/Hero.js +0 -83
- package/lib/Hero/HeroContent.d.ts +0 -12
- package/lib/Hero/HeroContent.js +0 -23
- package/lib/Hero/index.d.ts +0 -10
- package/lib/Hero/index.js +0 -61
- package/lib/LanguageSelector/LanguageSelector.d.ts +0 -15
- package/lib/LanguageSelector/LanguageSelector.js +0 -92
- package/lib/LanguageSelector/index.d.ts +0 -9
- package/lib/LanguageSelector/index.js +0 -13
- package/lib/Logo/Logo.d.ts +0 -20
- package/lib/Logo/Logo.js +0 -58
- package/lib/Logo/SvgLogo.d.ts +0 -14
- package/lib/Logo/SvgLogo.js +0 -62
- package/lib/Logo/index.d.ts +0 -9
- package/lib/Logo/index.js +0 -16
- package/lib/Messages/MessageBanner.d.ts +0 -16
- package/lib/Messages/MessageBanner.js +0 -77
- package/lib/Search/ActiveFilterContent.d.ts +0 -23
- package/lib/Search/ActiveFilterContent.js +0 -47
- package/lib/Search/ActiveFilters.d.ts +0 -19
- package/lib/Search/ActiveFilters.js +0 -119
- package/lib/Search/ContentTypeResult.d.ts +0 -29
- package/lib/Search/ContentTypeResult.js +0 -159
- package/lib/Search/ContentTypeResultStyles.d.ts +0 -45
- package/lib/Search/ContentTypeResultStyles.js +0 -58
- package/lib/Search/IsPathToHighlight.d.ts +0 -8
- package/lib/Search/IsPathToHighlight.js +0 -19
- package/lib/Search/LoadingWrapper.d.ts +0 -12
- package/lib/Search/LoadingWrapper.js +0 -38
- package/lib/Search/SearchField.d.ts +0 -25
- package/lib/Search/SearchField.js +0 -117
- package/lib/Search/SearchFieldForm.d.ts +0 -15
- package/lib/Search/SearchFieldForm.js +0 -41
- package/lib/Search/SearchResult.d.ts +0 -43
- package/lib/Search/SearchResult.js +0 -194
- package/lib/Search/SearchResultSleeve.d.ts +0 -25
- package/lib/Search/SearchResultSleeve.js +0 -237
- package/lib/Search/index.d.ts +0 -11
- package/lib/Search/index.js +0 -33
- package/src/Article/ArticleHeaderWrapper.tsx +0 -38
- package/src/CreatedBy/CreatedBy.stories.tsx +0 -36
- package/src/CreatedBy/CreatedBy.tsx +0 -63
- package/src/CreatedBy/index.ts +0 -11
- package/src/Hero/Hero.stories.tsx +0 -35
- package/src/Hero/Hero.tsx +0 -129
- package/src/Hero/HeroContent.tsx +0 -43
- package/src/Hero/index.ts +0 -21
- package/src/LanguageSelector/LanguageSelector.stories.tsx +0 -44
- package/src/LanguageSelector/LanguageSelector.tsx +0 -101
- package/src/LanguageSelector/index.ts +0 -11
- package/src/Logo/Logo.stories.tsx +0 -47
- package/src/Logo/Logo.tsx +0 -47
- package/src/Logo/SvgLogo.tsx +0 -48
- package/src/Logo/index.ts +0 -11
- package/src/Messages/MessageBanner.stories.tsx +0 -31
- package/src/Messages/MessageBanner.tsx +0 -67
- package/src/Search/ActiveFilterContent.tsx +0 -64
- package/src/Search/ActiveFilters.tsx +0 -145
- package/src/Search/ContentTypeResult.tsx +0 -190
- package/src/Search/ContentTypeResultStyles.tsx +0 -172
- package/src/Search/IsPathToHighlight.ts +0 -12
- package/src/Search/LoadingWrapper.tsx +0 -44
- package/src/Search/SearchField.tsx +0 -175
- package/src/Search/SearchFieldForm.tsx +0 -64
- package/src/Search/SearchResult.tsx +0 -368
- package/src/Search/SearchResultSleeve.tsx +0 -367
- package/src/Search/__tests__/Highlight-test.ts +0 -66
- package/src/Search/index.ts +0 -14
|
@@ -12,7 +12,7 @@ import { IconButtonV2 } from "@ndla/button";
|
|
|
12
12
|
import { breakpoints, colors, fonts, misc, mq, shadows, spacing } from "@ndla/core";
|
|
13
13
|
import { Cross } from "@ndla/icons/action";
|
|
14
14
|
import { useSnack } from "./SnackbarProvider";
|
|
15
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
15
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
16
|
const DefaultSnackContainer = /*#__PURE__*/_styled("div", {
|
|
17
17
|
target: "e1s2vq9x1",
|
|
18
18
|
label: "DefaultSnackContainer"
|
|
@@ -34,15 +34,15 @@ const DefaultSnack = snack => {
|
|
|
34
34
|
const {
|
|
35
35
|
closeSnack
|
|
36
36
|
} = useSnack();
|
|
37
|
-
return _jsxs(DefaultSnackContainer, {
|
|
38
|
-
children: [icon, snack.content, _jsx(ButtonWrapper, {
|
|
39
|
-
children: closable && _jsx(IconButtonV2, {
|
|
37
|
+
return /*#__PURE__*/_jsxs(DefaultSnackContainer, {
|
|
38
|
+
children: [icon, snack.content, /*#__PURE__*/_jsx(ButtonWrapper, {
|
|
39
|
+
children: closable && /*#__PURE__*/_jsx(IconButtonV2, {
|
|
40
40
|
size: "xsmall",
|
|
41
41
|
variant: "outline",
|
|
42
42
|
colorTheme: "greyLighter",
|
|
43
43
|
onClick: () => closeSnack(snack),
|
|
44
44
|
"aria-label": t("snackbar.close"),
|
|
45
|
-
children: _jsx(Cross, {})
|
|
45
|
+
children: /*#__PURE__*/_jsx(Cross, {})
|
|
46
46
|
})
|
|
47
47
|
})]
|
|
48
48
|
});
|
|
@@ -11,7 +11,7 @@ import { useCallback, useMemo, createContext, useState, useContext, useEffect }
|
|
|
11
11
|
import { keyframes } from "@emotion/react";
|
|
12
12
|
import { spacing, stackOrder } from "@ndla/core";
|
|
13
13
|
import DefaultSnack from "./DefaultSnackbar";
|
|
14
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
14
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
15
|
const SnackbarContext = /*#__PURE__*/createContext(undefined);
|
|
16
16
|
export const useSnack = () => {
|
|
17
17
|
const context = useContext(SnackbarContext);
|
|
@@ -49,9 +49,9 @@ export const SnackbarProvider = _ref => {
|
|
|
49
49
|
clearSnacks,
|
|
50
50
|
closeSnack
|
|
51
51
|
}), [addSnack, removeSnack, clearSnacks, closeSnack]);
|
|
52
|
-
return _jsxs(SnackbarContext.Provider, {
|
|
52
|
+
return /*#__PURE__*/_jsxs(SnackbarContext.Provider, {
|
|
53
53
|
value: value,
|
|
54
|
-
children: [children, _jsx(SnackbarContainer, {
|
|
54
|
+
children: [children, /*#__PURE__*/_jsx(SnackbarContainer, {
|
|
55
55
|
snacks: snacks
|
|
56
56
|
})]
|
|
57
57
|
});
|
|
@@ -92,7 +92,7 @@ export const BaseSnack = _ref3 => {
|
|
|
92
92
|
const timeout = setTimeout(() => setExpired(true), duration);
|
|
93
93
|
return () => clearTimeout(timeout);
|
|
94
94
|
}, [duration]);
|
|
95
|
-
return _jsx(BaseSnackContainer, {
|
|
95
|
+
return /*#__PURE__*/_jsx(BaseSnackContainer, {
|
|
96
96
|
expired: expired,
|
|
97
97
|
onAnimationEnd: () => expired && removeSnack(id),
|
|
98
98
|
children: children
|
|
@@ -106,12 +106,12 @@ const SnackbarContainer = _ref4 => {
|
|
|
106
106
|
let {
|
|
107
107
|
snacks
|
|
108
108
|
} = _ref4;
|
|
109
|
-
return _jsx(StyledSnackList, {
|
|
109
|
+
return /*#__PURE__*/_jsx(StyledSnackList, {
|
|
110
110
|
"aria-live": "polite",
|
|
111
111
|
role: "region",
|
|
112
|
-
children: snacks.map(snack => _jsx(BaseSnack, {
|
|
112
|
+
children: snacks.map(snack => /*#__PURE__*/_jsx(BaseSnack, {
|
|
113
113
|
...snack,
|
|
114
|
-
children: snack.render?.(snack.id) ?? _jsx(DefaultSnack, {
|
|
114
|
+
children: snack.render?.(snack.id) ?? /*#__PURE__*/_jsx(DefaultSnack, {
|
|
115
115
|
...snack
|
|
116
116
|
})
|
|
117
117
|
}, snack.id))
|
|
@@ -11,7 +11,7 @@ import { ComboboxContext, useTagsInputContext } from "@ark-ui/react";
|
|
|
11
11
|
import { Cross } from "@ndla/icons/action";
|
|
12
12
|
import { ComboboxClearTrigger, ComboboxControl, ComboboxInput, ComboboxLabel, ComboboxRoot, ComboboxTrigger, TagsInputControl, TagsInputInput, TagsInputItem, TagsInputItemDeleteTrigger, TagsInputItemPreview, TagsInputItemText, TagsInputRoot, TagsInputItemInput } from "@ndla/primitives";
|
|
13
13
|
import { contains } from "@ndla/util";
|
|
14
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "
|
|
14
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
15
15
|
export const TagSelectorRoot = _ref => {
|
|
16
16
|
let {
|
|
17
17
|
allowCustomValue = true,
|
|
@@ -36,7 +36,7 @@ export const TagSelectorRoot = _ref => {
|
|
|
36
36
|
controlRef.current = document.getElementById(ids.control);
|
|
37
37
|
}
|
|
38
38
|
}, [ids.control]);
|
|
39
|
-
return _jsx(ComboboxRoot, {
|
|
39
|
+
return /*#__PURE__*/_jsx(ComboboxRoot, {
|
|
40
40
|
ids: ids,
|
|
41
41
|
asChild: true,
|
|
42
42
|
allowCustomValue: allowCustomValue,
|
|
@@ -51,8 +51,8 @@ export const TagSelectorRoot = _ref => {
|
|
|
51
51
|
},
|
|
52
52
|
value: value,
|
|
53
53
|
...rest,
|
|
54
|
-
children: _jsx(ComboboxContext, {
|
|
55
|
-
children: api => _jsx(TagsInputRoot, {
|
|
54
|
+
children: /*#__PURE__*/_jsx(ComboboxContext, {
|
|
55
|
+
children: api => /*#__PURE__*/_jsx(TagsInputRoot, {
|
|
56
56
|
ids: ids,
|
|
57
57
|
value: value,
|
|
58
58
|
onInputValueChange: details => api.setInputValue(details.inputValue),
|
|
@@ -73,9 +73,9 @@ export const TagSelectorControl = /*#__PURE__*/forwardRef((_ref2, ref) => {
|
|
|
73
73
|
children,
|
|
74
74
|
...props
|
|
75
75
|
} = _ref2;
|
|
76
|
-
return _jsx(ComboboxControl, {
|
|
76
|
+
return /*#__PURE__*/_jsx(ComboboxControl, {
|
|
77
77
|
asChild: true,
|
|
78
|
-
children: _jsx(TagsInputControl, {
|
|
78
|
+
children: /*#__PURE__*/_jsx(TagsInputControl, {
|
|
79
79
|
...props,
|
|
80
80
|
ref: ref,
|
|
81
81
|
children: children
|
|
@@ -90,9 +90,9 @@ export const TagSelectorInputBase = /*#__PURE__*/forwardRef((_ref3, ref) => {
|
|
|
90
90
|
...props
|
|
91
91
|
} = _ref3;
|
|
92
92
|
const tagsApi = useTagsInputContext();
|
|
93
|
-
return _jsx(ComboboxInput, {
|
|
93
|
+
return /*#__PURE__*/_jsx(ComboboxInput, {
|
|
94
94
|
asChild: true,
|
|
95
|
-
children: _jsx(TagsInputInput, {
|
|
95
|
+
children: /*#__PURE__*/_jsx(TagsInputInput, {
|
|
96
96
|
...props,
|
|
97
97
|
onKeyDown: event => {
|
|
98
98
|
if (event.key === "Enter") {
|
|
@@ -110,20 +110,20 @@ export const TagSelectorInput = /*#__PURE__*/forwardRef((_ref4, ref) => {
|
|
|
110
110
|
...props
|
|
111
111
|
} = _ref4;
|
|
112
112
|
const tagsApi = useTagsInputContext();
|
|
113
|
-
return _jsxs(_Fragment, {
|
|
114
|
-
children: [tagsApi.value.map((value, index) => _jsxs(TagsInputItem, {
|
|
113
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
114
|
+
children: [tagsApi.value.map((value, index) => /*#__PURE__*/_jsxs(TagsInputItem, {
|
|
115
115
|
index: index,
|
|
116
116
|
value: value,
|
|
117
|
-
children: [_jsxs(TagsInputItemPreview, {
|
|
118
|
-
children: [_jsx(TagsInputItemText, {
|
|
117
|
+
children: [/*#__PURE__*/_jsxs(TagsInputItemPreview, {
|
|
118
|
+
children: [/*#__PURE__*/_jsx(TagsInputItemText, {
|
|
119
119
|
children: value
|
|
120
|
-
}), _jsx(TagsInputItemDeleteTrigger, {
|
|
121
|
-
children: _jsx(Cross, {})
|
|
120
|
+
}), /*#__PURE__*/_jsx(TagsInputItemDeleteTrigger, {
|
|
121
|
+
children: /*#__PURE__*/_jsx(Cross, {})
|
|
122
122
|
})]
|
|
123
|
-
}), _jsx(TagsInputItemInput, {})]
|
|
124
|
-
}, value)), _jsx(ComboboxInput, {
|
|
123
|
+
}), /*#__PURE__*/_jsx(TagsInputItemInput, {})]
|
|
124
|
+
}, value)), /*#__PURE__*/_jsx(ComboboxInput, {
|
|
125
125
|
asChild: true,
|
|
126
|
-
children: _jsx(TagsInputInput, {
|
|
126
|
+
children: /*#__PURE__*/_jsx(TagsInputInput, {
|
|
127
127
|
...props,
|
|
128
128
|
onKeyDown: event => {
|
|
129
129
|
if (event.key === "Enter") {
|
|
@@ -13,7 +13,7 @@ import { useTranslation } from "react-i18next";
|
|
|
13
13
|
import { ButtonV2 as Button } from "@ndla/button";
|
|
14
14
|
import { Plus } from "@ndla/icons/action";
|
|
15
15
|
import { Tooltip } from "@ndla/tooltip";
|
|
16
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
16
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
17
|
const StyledAddFolderButton = /*#__PURE__*/_styled(Button, {
|
|
18
18
|
target: "e1bj2d241",
|
|
19
19
|
label: "StyledAddFolderButton"
|
|
@@ -53,9 +53,9 @@ const AddFolderButton = _ref => {
|
|
|
53
53
|
const tooltip = loading ? t("loading") : canAddFolder ? t("myNdla.newFolderUnder", {
|
|
54
54
|
folderName: focusedFolder?.name
|
|
55
55
|
}) : t("treeStructure.maxFoldersAlreadyAdded");
|
|
56
|
-
return _jsx(Tooltip, {
|
|
56
|
+
return /*#__PURE__*/_jsx(Tooltip, {
|
|
57
57
|
tooltip: tooltip,
|
|
58
|
-
children: _jsxs(StyledAddFolderButton, {
|
|
58
|
+
children: /*#__PURE__*/_jsxs(StyledAddFolderButton, {
|
|
59
59
|
ref: ref,
|
|
60
60
|
variant: "outline",
|
|
61
61
|
shape: "pill",
|
|
@@ -76,7 +76,7 @@ const AddFolderButton = _ref => {
|
|
|
76
76
|
setNewFolderParentId(focusedFolder?.id);
|
|
77
77
|
setShowTree(true);
|
|
78
78
|
},
|
|
79
|
-
children: [_jsx(StyledPlus, {}), " ", t("myNdla.newFolder")]
|
|
79
|
+
children: [/*#__PURE__*/_jsx(StyledPlus, {}), " ", t("myNdla.newFolder")]
|
|
80
80
|
})
|
|
81
81
|
});
|
|
82
82
|
};
|
|
@@ -15,7 +15,7 @@ import { useForwardedRef } from "@ndla/util";
|
|
|
15
15
|
import { arrowNavigation } from "./arrowNavigation";
|
|
16
16
|
import { treestructureId } from "./helperFunctions";
|
|
17
17
|
import ContentLoader from "../ContentLoader";
|
|
18
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
18
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
19
|
const StyledRow = /*#__PURE__*/_styled("div", {
|
|
20
20
|
target: "e1g7ykt81",
|
|
21
21
|
label: "StyledRow"
|
|
@@ -64,7 +64,7 @@ const ComboboxButton = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
64
64
|
arrowNavigation(e, focusedFolder.id, flattenedFolders, setFocusedFolder, onOpenFolder, onCloseFolder);
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
|
-
return _jsxs(StyledRow, {
|
|
67
|
+
return /*#__PURE__*/_jsxs(StyledRow, {
|
|
68
68
|
"data-open": showTree,
|
|
69
69
|
onMouseDown: e => {
|
|
70
70
|
if (!e.defaultPrevented) {
|
|
@@ -74,10 +74,10 @@ const ComboboxButton = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
74
74
|
innerRef.current?.focus();
|
|
75
75
|
}
|
|
76
76
|
},
|
|
77
|
-
children: [loading && _jsx(ContentLoader, {
|
|
77
|
+
children: [loading && /*#__PURE__*/_jsx(ContentLoader, {
|
|
78
78
|
width: 1000,
|
|
79
79
|
height: 40,
|
|
80
|
-
children: _jsx("rect", {
|
|
80
|
+
children: /*#__PURE__*/_jsx("rect", {
|
|
81
81
|
x: "15",
|
|
82
82
|
y: "0",
|
|
83
83
|
width: "1000",
|
|
@@ -86,7 +86,7 @@ const ComboboxButton = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
86
86
|
r: "15",
|
|
87
87
|
height: "40"
|
|
88
88
|
})
|
|
89
|
-
}), !loading && _jsx(StyledSelectedFolder, {
|
|
89
|
+
}), !loading && /*#__PURE__*/_jsx(StyledSelectedFolder, {
|
|
90
90
|
ref: innerRef,
|
|
91
91
|
tabIndex: 0,
|
|
92
92
|
id: treestructureId(type, "combobox"),
|
|
@@ -107,7 +107,7 @@ const ComboboxButton = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
107
107
|
onToggleTree(showTree);
|
|
108
108
|
},
|
|
109
109
|
children: selectedFolder?.name
|
|
110
|
-
}), _jsx(IconButton, {
|
|
110
|
+
}), /*#__PURE__*/_jsx(IconButton, {
|
|
111
111
|
disabled: loading,
|
|
112
112
|
"aria-busy": loading,
|
|
113
113
|
"aria-hidden": true,
|
|
@@ -120,7 +120,7 @@ const ComboboxButton = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
120
120
|
innerRef.current?.focus();
|
|
121
121
|
onToggleTree(!showTree);
|
|
122
122
|
},
|
|
123
|
-
children: showTree ? _jsx(ChevronUp, {}) : _jsx(ChevronDown, {})
|
|
123
|
+
children: showTree ? /*#__PURE__*/_jsx(ChevronUp, {}) : /*#__PURE__*/_jsx(ChevronDown, {})
|
|
124
124
|
})]
|
|
125
125
|
});
|
|
126
126
|
});
|
|
@@ -18,7 +18,7 @@ import { Done } from "@ndla/icons/editor";
|
|
|
18
18
|
import { SafeLink } from "@ndla/safelink";
|
|
19
19
|
import { arrowNavigation } from "./arrowNavigation";
|
|
20
20
|
import { treestructureId } from "./helperFunctions";
|
|
21
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
21
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
22
|
const OpenButton = /*#__PURE__*/_styled("span", {
|
|
23
23
|
target: "e11ok6h86",
|
|
24
24
|
label: "OpenButton"
|
|
@@ -135,7 +135,7 @@ const FolderItem = _ref => {
|
|
|
135
135
|
const hideArrow = isMaxDepth || emptyFolder;
|
|
136
136
|
const FolderIcon = folder.status === "shared" ? FolderShared : FolderOutlined;
|
|
137
137
|
const tabable = selected || focused || !focusedFolder && !folder.parentId && index === 0;
|
|
138
|
-
return type === "navigation" ? _jsxs(FolderNameLink, {
|
|
138
|
+
return type === "navigation" ? /*#__PURE__*/_jsxs(FolderNameLink, {
|
|
139
139
|
role: "treeitem",
|
|
140
140
|
"aria-owns": folder.subfolders.length ? treestructureId(type, `subfolders-${folder.id}`) : undefined,
|
|
141
141
|
"aria-expanded": isMaxDepth || emptyFolder ? undefined : isOpen,
|
|
@@ -155,7 +155,7 @@ const FolderItem = _ref => {
|
|
|
155
155
|
"data-selected": selected,
|
|
156
156
|
onFocus: () => setFocusedFolder(folder),
|
|
157
157
|
onClick: handleClickFolder,
|
|
158
|
-
children: [_jsx(OpenButton, {
|
|
158
|
+
children: [/*#__PURE__*/_jsx(OpenButton, {
|
|
159
159
|
"aria-hidden": true,
|
|
160
160
|
tabIndex: -1,
|
|
161
161
|
"data-open": isOpen,
|
|
@@ -170,11 +170,11 @@ const FolderItem = _ref => {
|
|
|
170
170
|
onOpenFolder(id);
|
|
171
171
|
}
|
|
172
172
|
},
|
|
173
|
-
children: _jsx(ArrowDropDownRounded, {})
|
|
174
|
-
}), _jsx(StyledName, {
|
|
173
|
+
children: /*#__PURE__*/_jsx(ArrowDropDownRounded, {})
|
|
174
|
+
}), /*#__PURE__*/_jsx(StyledName, {
|
|
175
175
|
children: name
|
|
176
176
|
})]
|
|
177
|
-
}) : _jsxs(FolderName, {
|
|
177
|
+
}) : /*#__PURE__*/_jsxs(FolderName, {
|
|
178
178
|
tabIndex: -1,
|
|
179
179
|
role: "treeitem",
|
|
180
180
|
id: treestructureId(type, folder.id),
|
|
@@ -194,8 +194,8 @@ const FolderItem = _ref => {
|
|
|
194
194
|
onFocus: () => setFocusedFolder(focusedFolder || folder),
|
|
195
195
|
onClick: handleClickFolder,
|
|
196
196
|
"data-creating": isCreatingFolder,
|
|
197
|
-
children: [_jsxs(IconWrapper, {
|
|
198
|
-
children: [_jsx(OpenButton, {
|
|
197
|
+
children: [/*#__PURE__*/_jsxs(IconWrapper, {
|
|
198
|
+
children: [/*#__PURE__*/_jsx(OpenButton, {
|
|
199
199
|
"aria-hidden": true,
|
|
200
200
|
tabIndex: -1,
|
|
201
201
|
"data-open": isOpen,
|
|
@@ -209,13 +209,13 @@ const FolderItem = _ref => {
|
|
|
209
209
|
onOpenFolder(id);
|
|
210
210
|
}
|
|
211
211
|
},
|
|
212
|
-
children: _jsx(ArrowDropDownRounded, {})
|
|
213
|
-
}), _jsx(FolderIconWrapper, {
|
|
214
|
-
children: _jsx(FolderIcon, {})
|
|
212
|
+
children: /*#__PURE__*/_jsx(ArrowDropDownRounded, {})
|
|
213
|
+
}), /*#__PURE__*/_jsx(FolderIconWrapper, {
|
|
214
|
+
children: /*#__PURE__*/_jsx(FolderIcon, {})
|
|
215
215
|
})]
|
|
216
|
-
}), _jsx(StyledName, {
|
|
216
|
+
}), /*#__PURE__*/_jsx(StyledName, {
|
|
217
217
|
children: name
|
|
218
|
-
}), containsResource && _jsx(StyledDone, {
|
|
218
|
+
}), containsResource && /*#__PURE__*/_jsx(StyledDone, {
|
|
219
219
|
"aria-label": t("myNdla.alreadyInFolder"),
|
|
220
220
|
id: `alreadyAdded-${folder.id}`,
|
|
221
221
|
title: t("myNdla.alreadyInFolder")
|
|
@@ -11,7 +11,7 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
11
11
|
import { animations } from "@ndla/core";
|
|
12
12
|
import FolderItem from "./FolderItem";
|
|
13
13
|
import { treestructureId } from "./helperFunctions";
|
|
14
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
14
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
15
|
const StyledUL = /*#__PURE__*/_styled("ul", {
|
|
16
16
|
target: "ef48q151",
|
|
17
17
|
label: "StyledUL"
|
|
@@ -43,7 +43,7 @@ const FolderItems = _ref => {
|
|
|
43
43
|
newFolderInput,
|
|
44
44
|
...rest
|
|
45
45
|
} = _ref;
|
|
46
|
-
return _jsxs(StyledUL, {
|
|
46
|
+
return /*#__PURE__*/_jsxs(StyledUL, {
|
|
47
47
|
id: level === 0 && type === "picker" ? treestructureId(type, "popup") : parentFolder ? treestructureId(type, `subfolders-${parentFolder.id}`) : undefined,
|
|
48
48
|
tabIndex: -1,
|
|
49
49
|
"aria-labelledby": level === 0 && type === "picker" ? treestructureId(type, "label") : undefined,
|
|
@@ -54,11 +54,11 @@ const FolderItems = _ref => {
|
|
|
54
54
|
id
|
|
55
55
|
} = folder;
|
|
56
56
|
const isOpen = openFolders?.includes(id);
|
|
57
|
-
return _jsxs(StyledLI, {
|
|
57
|
+
return /*#__PURE__*/_jsxs(StyledLI, {
|
|
58
58
|
tabIndex: -1,
|
|
59
59
|
role: "none",
|
|
60
60
|
"data-type": type,
|
|
61
|
-
children: [_jsx(FolderItem, {
|
|
61
|
+
children: [/*#__PURE__*/_jsx(FolderItem, {
|
|
62
62
|
index: index,
|
|
63
63
|
folder: folder,
|
|
64
64
|
isOpen: isOpen,
|
|
@@ -67,7 +67,7 @@ const FolderItems = _ref => {
|
|
|
67
67
|
type: type,
|
|
68
68
|
isCreatingFolder: !!newFolderParentId,
|
|
69
69
|
...rest
|
|
70
|
-
}), (subfolders && isOpen || newFolderParentId === id) && _jsx(FolderItems, {
|
|
70
|
+
}), (subfolders && isOpen || newFolderParentId === id) && /*#__PURE__*/_jsx(FolderItems, {
|
|
71
71
|
parentFolder: folder,
|
|
72
72
|
folders: subfolders,
|
|
73
73
|
level: level + 1,
|
|
@@ -79,7 +79,7 @@ const FolderItems = _ref => {
|
|
|
79
79
|
newFolderInput: newFolderInput,
|
|
80
80
|
onCreate: onCreate,
|
|
81
81
|
...rest,
|
|
82
|
-
children: newFolderParentId === id && _jsx("li", {
|
|
82
|
+
children: newFolderParentId === id && /*#__PURE__*/_jsx("li", {
|
|
83
83
|
role: "none",
|
|
84
84
|
children: newFolderInput?.({
|
|
85
85
|
parentId: id,
|
|
@@ -14,7 +14,7 @@ import AddFolderButton from "./AddFolderButton";
|
|
|
14
14
|
import ComboboxButton from "./ComboboxButton";
|
|
15
15
|
import FolderItems from "./FolderItems";
|
|
16
16
|
import { flattenFolders, treestructureId } from "./helperFunctions";
|
|
17
|
-
import { jsx as _jsx, jsxs as _jsxs } from "
|
|
17
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
18
|
export const MAX_LEVEL_FOR_FOLDERS = 5;
|
|
19
19
|
const uniq = array => Array.from(new Set(array));
|
|
20
20
|
const StyledLabel = /*#__PURE__*/_styled("label", {
|
|
@@ -144,27 +144,27 @@ const TreeStructure = _ref => {
|
|
|
144
144
|
});
|
|
145
145
|
};
|
|
146
146
|
const canAddFolder = selectedFolder && selectedFolder?.breadcrumbs.length < (maxLevel || 1);
|
|
147
|
-
return _jsxs(StyledTreeStructure, {
|
|
147
|
+
return /*#__PURE__*/_jsxs(StyledTreeStructure, {
|
|
148
148
|
onBlur: e => {
|
|
149
149
|
if (type === "picker" && !e.currentTarget.contains(e.relatedTarget)) {
|
|
150
150
|
onToggleTree(false);
|
|
151
151
|
}
|
|
152
152
|
},
|
|
153
|
-
children: [_jsxs(Row, {
|
|
154
|
-
children: [label && _jsx(StyledLabel, {
|
|
153
|
+
children: [/*#__PURE__*/_jsxs(Row, {
|
|
154
|
+
children: [label && /*#__PURE__*/_jsx(StyledLabel, {
|
|
155
155
|
id: treestructureId(type, "label"),
|
|
156
156
|
children: label
|
|
157
|
-
}), type === "picker" && _jsx(AddFolderButton, {
|
|
157
|
+
}), type === "picker" && /*#__PURE__*/_jsx(AddFolderButton, {
|
|
158
158
|
loading: loading,
|
|
159
159
|
canAddFolder: !!canAddFolder,
|
|
160
160
|
focusedFolder: focusedFolder,
|
|
161
161
|
setNewFolderParentId: setNewFolderParentId,
|
|
162
162
|
setShowTree: setShowTree
|
|
163
163
|
})]
|
|
164
|
-
}), _jsxs(TreeStructureWrapper, {
|
|
164
|
+
}), /*#__PURE__*/_jsxs(TreeStructureWrapper, {
|
|
165
165
|
"aria-label": label,
|
|
166
166
|
"data-type": type,
|
|
167
|
-
children: [type === "picker" && _jsx(ComboboxButton, {
|
|
167
|
+
children: [type === "picker" && /*#__PURE__*/_jsx(ComboboxButton, {
|
|
168
168
|
ref: ref,
|
|
169
169
|
showTree: showTree,
|
|
170
170
|
type: type,
|
|
@@ -179,9 +179,9 @@ const TreeStructure = _ref => {
|
|
|
179
179
|
onCloseFolder: onCloseFolder,
|
|
180
180
|
onOpenFolder: onOpenFolder,
|
|
181
181
|
ariaDescribedby: ariaDescribedby
|
|
182
|
-
}), showTree && _jsx(ScrollableDiv, {
|
|
182
|
+
}), showTree && /*#__PURE__*/_jsx(ScrollableDiv, {
|
|
183
183
|
"data-type": type,
|
|
184
|
-
children: _jsx(FolderItems, {
|
|
184
|
+
children: /*#__PURE__*/_jsx(FolderItems, {
|
|
185
185
|
focusedFolder: focusedFolder,
|
|
186
186
|
folders: folders,
|
|
187
187
|
level: 0,
|
|
@@ -10,7 +10,7 @@ import { forwardRef, useState } from "react";
|
|
|
10
10
|
import { Button } from "@ndla/primitives";
|
|
11
11
|
|
|
12
12
|
// TODO: Let's consider abandoning `disabled` on the button here. It should instead just open/close the widget based on its current state.
|
|
13
|
-
import { jsx as _jsx } from "
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
14
|
export const ZendeskButton = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
15
15
|
let {
|
|
16
16
|
locale,
|
|
@@ -43,7 +43,7 @@ export const ZendeskButton = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
43
43
|
window.zE("webWidget", "open");
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
|
-
return _jsx(Button, {
|
|
46
|
+
return /*#__PURE__*/_jsx(Button, {
|
|
47
47
|
onClick: handleClick,
|
|
48
48
|
variant: variant,
|
|
49
49
|
id: "zendeskButton",
|
package/es/i18n/index.js
CHANGED
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
|
|
9
9
|
export { i18nInstance } from "./i18n";
|
|
10
10
|
export { formatNestedMessages } from "./formatNestedMessages";
|
|
11
|
-
export { useComboboxTranslations, useTagSelectorTranslations, useTagsInputTranslations } from "./useComponentTranslations";
|
|
11
|
+
export { useComboboxTranslations, useTagSelectorTranslations, useTagsInputTranslations, usePaginationTranslations } from "./useComponentTranslations";
|
package/es/index.js
CHANGED
|
@@ -11,23 +11,17 @@
|
|
|
11
11
|
|
|
12
12
|
export { ImageEmbed, getCrop, getFocalPoint, AudioEmbed, H5pEmbed, ExternalEmbed, IframeEmbed, FootnoteEmbed, BrightcoveEmbed, ContentLinkEmbed, RelatedContentEmbed, ConceptEmbed, ConceptListEmbed, UnknownEmbed, InlineConcept, BlockConcept, UuDisclaimerEmbed, CopyrightEmbed, CodeEmbed } from "./Embed";
|
|
13
13
|
export { LicenseLink, EmbedByline } from "./LicenseByline";
|
|
14
|
-
export { ArticleByline, ArticleFootNotes,
|
|
14
|
+
export { ArticleByline, ArticleFootNotes, ArticleWrapper, Article, ArticleParagraph, ArticleFooter, ArticleHeader, ArticleContent } from "./Article";
|
|
15
15
|
export { getPossiblyRelativeUrl } from "./utils/relativeUrl";
|
|
16
16
|
export { default as ContentLoader } from "./ContentLoader";
|
|
17
17
|
export { default as RelatedArticleList, RelatedArticle } from "./RelatedArticleList";
|
|
18
18
|
export { ErrorResourceAccessDenied, default as ErrorMessage } from "./ErrorMessage";
|
|
19
19
|
export { default as FileList, File, PdfFile, Format } from "./FileList";
|
|
20
|
-
export { default as Logo } from "./Logo";
|
|
21
20
|
export { default as FactBox } from "./FactBox";
|
|
22
|
-
export {
|
|
21
|
+
export { ContentTypeHero } from "./ContentTypeHero";
|
|
23
22
|
export { FooterBlock } from "./Footer";
|
|
24
|
-
export { LanguageSelector } from "./LanguageSelector";
|
|
25
|
-
export { default as SearchResultSleeve } from "./Search/SearchResultSleeve";
|
|
26
|
-
export { default as ContentTypeResult } from "./Search/ContentTypeResult";
|
|
27
|
-
export { SearchFieldForm } from "./Search/SearchFieldForm";
|
|
28
23
|
export { default as resourceTypeColor } from "./utils/resourceTypeColor";
|
|
29
|
-
export {
|
|
30
|
-
export { MessageBox, MessageBanner } from "./Messages";
|
|
24
|
+
export { MessageBox } from "./Messages";
|
|
31
25
|
export { ResourceBox } from "./ResourceBox";
|
|
32
26
|
export { default as AudioPlayer } from "./AudioPlayer";
|
|
33
27
|
export { default as constants } from "./model";
|
|
@@ -37,7 +31,7 @@ export { default as messagesEN } from "./locale/messages-en";
|
|
|
37
31
|
export { default as messagesSE } from "./locale/messages-se";
|
|
38
32
|
export { default as messagesSMA } from "./locale/messages-sma";
|
|
39
33
|
export { default as Breadcrumb, HomeBreadcrumb } from "./Breadcrumb";
|
|
40
|
-
export { i18nInstance, formatNestedMessages, useTagsInputTranslations, useTagSelectorTranslations, useComboboxTranslations } from "./i18n";
|
|
34
|
+
export { i18nInstance, formatNestedMessages, useTagsInputTranslations, useTagSelectorTranslations, useComboboxTranslations, usePaginationTranslations } from "./i18n";
|
|
41
35
|
export { default as LayoutItem, OneColumn, PageContainer } from "./Layout";
|
|
42
36
|
export { default as ContentTypeBadge, SubjectMaterialBadge, TasksAndActivitiesBadge, AssessmentResourcesBadge, LearningPathBadge, SubjectBadge, SourceMaterialBadge, ConceptBadge } from "./ContentTypeBadge";
|
|
43
37
|
export { ContentTypeBadge as ContentTypeBadgeNew, contentTypeToBadgeVariantMap } from "./ContentTypeBadge/ContentTypeBadgeNew";
|
|
@@ -46,11 +40,10 @@ export { default as ContentPlaceholder } from "./ContentPlaceholder";
|
|
|
46
40
|
export { TagSelectorRoot, TagSelectorLabel, TagSelectorItemInput, TagSelectorTrigger, TagSelectorControl, TagSelectorClearTrigger, TagSelectorInputBase, TagSelectorInput } from "./TagSelector/TagSelector";
|
|
47
41
|
export { SnackbarProvider, useSnack, BaseSnack, DefaultSnackbar } from "./SnackBar";
|
|
48
42
|
export { TreeStructure } from "./TreeStructure";
|
|
49
|
-
export { SearchField, SearchResultList, SearchResultItem, ActiveFilters } from "./Search";
|
|
50
43
|
export { BlogPostV2 } from "./BlogPost";
|
|
51
44
|
export { ProgrammeCard } from "./ProgrammeCard";
|
|
52
45
|
export { KeyFigure } from "./KeyFigure";
|
|
53
|
-
export {
|
|
46
|
+
export { ContactBlock, contactBlockBackgrounds } from "./ContactBlock";
|
|
54
47
|
export { CampaignBlock } from "./CampaignBlock";
|
|
55
48
|
export { Grid, GridParallaxItem } from "./Grid";
|
|
56
49
|
export { default as FrontpageArticle, FRONTPAGE_ARTICLE_MAX_WIDTH, WIDE_FRONTPAGE_ARTICLE_MAX_WIDTH } from "./FrontpageArticle";
|
package/es/locale/messages-en.js
CHANGED
|
@@ -1367,7 +1367,7 @@ const messages = {
|
|
|
1367
1367
|
header: "What do you want to learn today?",
|
|
1368
1368
|
description: "Choose a programme to see your subjects",
|
|
1369
1369
|
grades: "Grades",
|
|
1370
|
-
accordionHeader: "
|
|
1370
|
+
accordionHeader: "Find your programme"
|
|
1371
1371
|
},
|
|
1372
1372
|
embed: {
|
|
1373
1373
|
conceptListError: "Failed to show concept list",
|
package/es/locale/messages-nb.js
CHANGED
|
@@ -1367,7 +1367,7 @@ const messages = {
|
|
|
1367
1367
|
header: "Hva vil du lære om i dag?",
|
|
1368
1368
|
description: "Velg utdanningsprogram for å se dine fag",
|
|
1369
1369
|
grades: "Trinn",
|
|
1370
|
-
accordionHeader: "
|
|
1370
|
+
accordionHeader: "Finn ditt utdanningsprogram"
|
|
1371
1371
|
},
|
|
1372
1372
|
embed: {
|
|
1373
1373
|
conceptListError: "Klarte ikke å vise forklaringsliste",
|
package/es/locale/messages-nn.js
CHANGED
|
@@ -1367,7 +1367,7 @@ const messages = {
|
|
|
1367
1367
|
header: "Kva vil du lære om i dag?",
|
|
1368
1368
|
description: "Vel utdanningsprogram for å sjå faga dine",
|
|
1369
1369
|
grades: "Trinn",
|
|
1370
|
-
accordionHeader: "
|
|
1370
|
+
accordionHeader: "Finn utdanningsprogrammet ditt"
|
|
1371
1371
|
},
|
|
1372
1372
|
embed: {
|
|
1373
1373
|
conceptListError: "Klarte ikkje å vise forklaringsliste",
|
package/es/locale/messages-se.js
CHANGED
|
@@ -1367,7 +1367,7 @@ const messages = {
|
|
|
1367
1367
|
header: "Maid háliidat oahppat odne?",
|
|
1368
1368
|
description: "Vállje oahppoprográmma vai oainnát iežat fágaid",
|
|
1369
1369
|
grades: "Ceahkki",
|
|
1370
|
-
accordionHeader: "
|
|
1370
|
+
accordionHeader: "Finn ditt utdanningsprogram"
|
|
1371
1371
|
},
|
|
1372
1372
|
embed: {
|
|
1373
1373
|
conceptListError: "Ii sáhttán čájehit čilgehuslisttu",
|
|
@@ -1367,7 +1367,7 @@ const messages = {
|
|
|
1367
1367
|
header: "Maam sïjhth daan biejjien lïeredh ?",
|
|
1368
1368
|
description: "Veeljh ööhpehtimmieprogrammem juktie dov faagide vuartasjidh",
|
|
1369
1369
|
grades: "Daltesasse",
|
|
1370
|
-
accordionHeader: "
|
|
1370
|
+
accordionHeader: "Finn ditt utdanningsprogram"
|
|
1371
1371
|
},
|
|
1372
1372
|
embed: {
|
|
1373
1373
|
conceptListError: "Klarte ikkje å vise forklaringsliste",
|
package/es/model/ContentType.js
CHANGED
|
@@ -20,6 +20,7 @@ export const MISSING = "missing";
|
|
|
20
20
|
export const IMAGE = "image";
|
|
21
21
|
export const VIDEO = "video";
|
|
22
22
|
export const AUDIO = "audio";
|
|
23
|
+
export const PODCAST = "podcast";
|
|
23
24
|
export const contentTypes = {
|
|
24
25
|
SUBJECT_MATERIAL,
|
|
25
26
|
TASKS_AND_ACTIVITIES,
|
|
@@ -53,5 +54,6 @@ export const resourceEmbedTypeMapping = {
|
|
|
53
54
|
image: "image",
|
|
54
55
|
video: "video",
|
|
55
56
|
concept: "concept",
|
|
56
|
-
audio: "audio"
|
|
57
|
+
audio: "audio",
|
|
58
|
+
podcast: "podcast"
|
|
57
59
|
};
|