@ndla/ui 56.0.106-alpha.0 → 56.0.108-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/Article/Article.js +1 -1
- package/es/CampaignBlock/CampaignBlock.js +0 -1
- package/lib/Article/Article.js +2 -2
- package/lib/CampaignBlock/CampaignBlock.js +0 -1
- package/lib/TagSelector/TagSelector.d.ts +1 -1
- package/lib/i18n/useComponentTranslations.d.ts +2 -2
- package/package.json +6 -6
- package/src/Article/Article.tsx +1 -2
- package/src/AudioPlayer/Controls.tsx +1 -1
- package/src/CampaignBlock/CampaignBlock.tsx +1 -6
package/es/Article/Article.js
CHANGED
|
@@ -11,8 +11,8 @@ import { ark } from "@ark-ui/react";
|
|
|
11
11
|
import { Heading, Text } from "@ndla/primitives";
|
|
12
12
|
import { cx } from "@ndla/styled-system/css";
|
|
13
13
|
import { Stack, styled } from "@ndla/styled-system/jsx";
|
|
14
|
-
import { ContentTypeBadge } from "..";
|
|
15
14
|
import { ArticleByline } from "./ArticleByline";
|
|
15
|
+
import { ContentTypeBadge } from "../ContentTypeBadge/ContentTypeBadge";
|
|
16
16
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
17
|
const StyledArticleContent = styled(ark.section, {}, {
|
|
18
18
|
baseComponent: true
|
package/lib/Article/Article.js
CHANGED
|
@@ -9,8 +9,8 @@ var _react2 = require("@ark-ui/react");
|
|
|
9
9
|
var _primitives = require("@ndla/primitives");
|
|
10
10
|
var _css = require("@ndla/styled-system/css");
|
|
11
11
|
var _jsx2 = require("@ndla/styled-system/jsx");
|
|
12
|
-
var _ = require("..");
|
|
13
12
|
var _ArticleByline = require("./ArticleByline");
|
|
13
|
+
var _ContentTypeBadge = require("../ContentTypeBadge/ContentTypeBadge");
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
15
|
/**
|
|
16
16
|
* Copyright (c) 2016-present, NDLA.
|
|
@@ -133,7 +133,7 @@ const ArticleTitle = _ref2 => {
|
|
|
133
133
|
align: "center",
|
|
134
134
|
direction: "row",
|
|
135
135
|
gap: "small",
|
|
136
|
-
children: [!!contentType && /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
136
|
+
children: [!!contentType && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ContentTypeBadge.ContentTypeBadge, {
|
|
137
137
|
contentType: contentType,
|
|
138
138
|
children: contentTypeLabel
|
|
139
139
|
}), heartButton]
|
|
@@ -134,7 +134,6 @@ const LinkButton = _ref => {
|
|
|
134
134
|
} = _ref;
|
|
135
135
|
if (url) return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledSafeLinkButton, {
|
|
136
136
|
to: (0, _relativeUrl.getPossiblyRelativeUrl)(url, path),
|
|
137
|
-
target: "_blank",
|
|
138
137
|
variant: "secondary",
|
|
139
138
|
rel: "noopener noreferrer",
|
|
140
139
|
children: children
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { type CollectionItem } from "@ark-ui/react";
|
|
9
9
|
import { type ComboboxControlProps, type ComboboxInputProps, type ComboboxRootProps, type TagsInputControlProps, type TagsInputInputProps, type TagsInputRootProps } from "@ndla/primitives";
|
|
10
10
|
export type TagSelectorRootProps<T extends CollectionItem> = ComboboxRootProps<T> & TagsInputRootProps;
|
|
11
|
-
export declare const TagSelectorRoot: <T extends
|
|
11
|
+
export declare const TagSelectorRoot: <T extends CollectionItem>({ allowCustomValue, multiple, selectionBehavior, editable, addOnPaste, onValueChange, children, value, translations, ...rest }: TagSelectorRootProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export type TagSelectorControlProps = ComboboxControlProps & TagsInputControlProps;
|
|
13
13
|
export declare const TagSelectorLabel: ({ textStyle, fontWeight, ...props }: import("@ndla/primitives").ComboboxLabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
export declare const TagSelectorItemInput: import("react").ForwardRefExoticComponent<import("@ark-ui/react").TagsInputItemInputProps & {
|
|
@@ -12,8 +12,8 @@ type DeepPartial<T> = {
|
|
|
12
12
|
[K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K];
|
|
13
13
|
};
|
|
14
14
|
export declare const useTagsInputTranslations: (translations?: Partial<TagsInputRootProps["translations"]>) => TagsInputRootProps["translations"];
|
|
15
|
-
export declare const useComboboxTranslations: <T extends
|
|
16
|
-
export declare const useTagSelectorTranslations: <T extends
|
|
15
|
+
export declare const useComboboxTranslations: <T extends CollectionItem>(translations?: Partial<ComboboxRootProps<T>["translations"]>) => ComboboxRootProps<T>["translations"];
|
|
16
|
+
export declare const useTagSelectorTranslations: <T extends CollectionItem>(translations?: Partial<TagSelectorRootProps<T>["translations"]>) => TagSelectorRootProps<T>["translations"];
|
|
17
17
|
export declare const usePaginationTranslations: (translations?: Partial<PaginationRootProps["translations"]>) => PaginationRootProps["translations"];
|
|
18
18
|
interface AudioSearchTranslations {
|
|
19
19
|
searchPlaceholder: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ndla/ui",
|
|
3
|
-
"version": "56.0.
|
|
3
|
+
"version": "56.0.108-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
|
"dependencies": {
|
|
35
35
|
"@ndla/core": "^5.0.3",
|
|
36
36
|
"@ndla/icons": "^8.0.52-alpha.0",
|
|
37
|
-
"@ndla/licenses": "^9.0.
|
|
38
|
-
"@ndla/primitives": "^1.0.
|
|
39
|
-
"@ndla/safelink": "^7.0.
|
|
37
|
+
"@ndla/licenses": "^9.0.1",
|
|
38
|
+
"@ndla/primitives": "^1.0.83-alpha.0",
|
|
39
|
+
"@ndla/safelink": "^7.0.84-alpha.0",
|
|
40
40
|
"@ndla/styled-system": "^0.0.32",
|
|
41
|
-
"@ndla/util": "^5.0.
|
|
41
|
+
"@ndla/util": "^5.0.6-alpha.0",
|
|
42
42
|
"html-react-parser": "^5.1.19"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"publishConfig": {
|
|
58
58
|
"access": "public"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "59445cfbbeaebe42e7208a941e400e49df017ddb"
|
|
61
61
|
}
|
package/src/Article/Article.tsx
CHANGED
|
@@ -12,9 +12,8 @@ import { Heading, Text } from "@ndla/primitives";
|
|
|
12
12
|
import { cx } from "@ndla/styled-system/css";
|
|
13
13
|
import { Stack, styled } from "@ndla/styled-system/jsx";
|
|
14
14
|
import type { JsxStyleProps } from "@ndla/styled-system/types";
|
|
15
|
-
import { ContentTypeBadge } from "..";
|
|
16
15
|
import { ArticleByline } from "./ArticleByline";
|
|
17
|
-
import { type ContentType } from "../ContentTypeBadge/ContentTypeBadge";
|
|
16
|
+
import { ContentTypeBadge, type ContentType } from "../ContentTypeBadge/ContentTypeBadge";
|
|
18
17
|
import type { Article as ArticleType } from "../types";
|
|
19
18
|
|
|
20
19
|
const StyledArticleContent = styled(ark.section, {}, { baseComponent: true });
|
|
@@ -157,12 +157,7 @@ const StyledSafeLinkButton = styled(SafeLinkButton, {
|
|
|
157
157
|
const LinkButton = ({ url, children, path }: LinkButtonProps) => {
|
|
158
158
|
if (url)
|
|
159
159
|
return (
|
|
160
|
-
<StyledSafeLinkButton
|
|
161
|
-
to={getPossiblyRelativeUrl(url, path)}
|
|
162
|
-
target="_blank"
|
|
163
|
-
variant="secondary"
|
|
164
|
-
rel="noopener noreferrer"
|
|
165
|
-
>
|
|
160
|
+
<StyledSafeLinkButton to={getPossiblyRelativeUrl(url, path)} variant="secondary" rel="noopener noreferrer">
|
|
166
161
|
{children}
|
|
167
162
|
</StyledSafeLinkButton>
|
|
168
163
|
);
|