@ndla/ui 56.0.110-alpha.0 → 56.0.112-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.
@@ -141,6 +141,7 @@ const FactBox = /*#__PURE__*/forwardRef((_ref, ref) => {
141
141
  children: [/*#__PURE__*/_jsx(StyledIconButton, {
142
142
  "data-state": state,
143
143
  onClick: onClick,
144
+ contentEditable: false,
144
145
  "aria-expanded": state === "open",
145
146
  "aria-controls": contentId,
146
147
  "aria-label": t(`factbox.${state === "open" ? "close" : "open"}`),
package/es/Grid/Grid.js CHANGED
@@ -79,7 +79,8 @@ export const Grid = _ref => {
79
79
  columns,
80
80
  border,
81
81
  children,
82
- background = "gray"
82
+ background = "gray",
83
+ ...rest
83
84
  } = _ref;
84
85
  const amountOfColumns = children?.length === 3 ? "3" : columns;
85
86
  return /*#__PURE__*/_jsx(GridContainer, {
@@ -87,6 +88,7 @@ export const Grid = _ref => {
87
88
  border: border === "none" ? undefined : border,
88
89
  columns: amountOfColumns,
89
90
  background: background,
91
+ ...rest,
90
92
  children: children
91
93
  });
92
94
  };
@@ -149,6 +149,7 @@ const FactBox = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
149
149
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(StyledIconButton, {
150
150
  "data-state": state,
151
151
  onClick: onClick,
152
+ contentEditable: false,
152
153
  "aria-expanded": state === "open",
153
154
  "aria-controls": contentId,
154
155
  "aria-label": t(`factbox.${state === "open" ? "close" : "open"}`),
@@ -5,11 +5,11 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  */
8
- import { type ReactNode } from "react";
9
- export interface GridProps {
8
+ import { type ComponentProps, type ReactNode } from "react";
9
+ export interface GridProps extends ComponentProps<"div"> {
10
10
  columns: "2" | "3" | "4" | "2x2";
11
11
  border?: "none" | "lightBlue";
12
12
  background?: "transparent" | "white" | "gray";
13
13
  children?: ReactNode[];
14
14
  }
15
- export declare const Grid: ({ columns, border, children, background }: GridProps) => import("react/jsx-runtime").JSX.Element;
15
+ export declare const Grid: ({ columns, border, children, background, ...rest }: GridProps) => import("react/jsx-runtime").JSX.Element;
package/lib/Grid/Grid.js CHANGED
@@ -85,7 +85,8 @@ const Grid = _ref => {
85
85
  columns,
86
86
  border,
87
87
  children,
88
- background = "gray"
88
+ background = "gray",
89
+ ...rest
89
90
  } = _ref;
90
91
  const amountOfColumns = children?.length === 3 ? "3" : columns;
91
92
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(GridContainer, {
@@ -93,6 +94,7 @@ const Grid = _ref => {
93
94
  border: border === "none" ? undefined : border,
94
95
  columns: amountOfColumns,
95
96
  background: background,
97
+ ...rest,
96
98
  children: children
97
99
  });
98
100
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ndla/ui",
3
- "version": "56.0.110-alpha.0",
3
+ "version": "56.0.112-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.3",
36
36
  "@ndla/icons": "^8.0.53-alpha.0",
37
37
  "@ndla/licenses": "^9.0.1",
38
- "@ndla/primitives": "^1.0.84-alpha.0",
39
- "@ndla/safelink": "^7.0.85-alpha.0",
38
+ "@ndla/primitives": "^1.0.85-alpha.0",
39
+ "@ndla/safelink": "^7.0.86-alpha.0",
40
40
  "@ndla/styled-system": "^0.0.33",
41
41
  "@ndla/util": "^5.0.7-alpha.0",
42
42
  "html-react-parser": "^5.1.19"
@@ -50,12 +50,12 @@
50
50
  },
51
51
  "devDependencies": {
52
52
  "@ndla/preset-panda": "^0.0.52",
53
- "@ndla/types-backend": "^1.0.1",
54
- "@ndla/types-embed": "^5.0.11-alpha.0",
53
+ "@ndla/types-backend": "^1.0.39",
54
+ "@ndla/types-embed": "^5.0.12-alpha.0",
55
55
  "@pandacss/dev": "^0.53.3"
56
56
  },
57
57
  "publishConfig": {
58
58
  "access": "public"
59
59
  },
60
- "gitHead": "352d4d92fe6170d27fabe400e76c5b9ecd92d7d5"
60
+ "gitHead": "db91aaa57493b901a25c927167614a9d1518be48"
61
61
  }
@@ -96,10 +96,10 @@ export default {
96
96
  description: "Creative Commons Attribution-ShareAlike 4.0 International",
97
97
  url: "https://creativecommons.org/licenses/by-sa/4.0/",
98
98
  },
99
- creators: [{ type: "Writer", name: "Sissel Paaske" }],
99
+ creators: [{ type: "writer", name: "Sissel Paaske" }],
100
100
  processors: [
101
- { type: "Processor", name: "Totaltekst" },
102
- { type: "Correction", name: "Arbeidets art" },
101
+ { type: "processor", name: "Totaltekst" },
102
+ { type: "correction", name: "Arbeidets art" },
103
103
  ],
104
104
  rightsholders: [],
105
105
  processed: false,
@@ -43,27 +43,20 @@ const conceptMetaData: ConceptData["concept"] = {
43
43
  description: "Creative Commons Attribution-ShareAlike 4.0 International",
44
44
  url: "https://creativecommons.org/licenses/by-sa/4.0/",
45
45
  },
46
- creators: [{ type: "Writer", name: "Sissel Paaske" }],
46
+ creators: [{ type: "writer", name: "Sissel Paaske" }],
47
47
  processors: [
48
- { type: "Processor", name: "Totaltekst" },
49
- { type: "Correction", name: "Arbeidets art" },
48
+ { type: "processor", name: "Totaltekst" },
49
+ { type: "correction", name: "Arbeidets art" },
50
50
  ],
51
51
  rightsholders: [],
52
52
  processed: false,
53
53
  },
54
54
  source: "",
55
- metaImage: {
56
- url: "https://api.test.ndla.no/image-api/raw/id/52863",
57
- alt: "Eksempel på hvordan borevæsken kan trenge ut i formasjonen fra borehullet og skade formasjonens permeabilitet. Illustrasjon.",
58
- language: "nb",
59
- },
60
55
  tags: { tags: ["Brønn:Reservoar:"], language: "nb" },
61
- subjectIds: ["urn:subject:6"],
62
56
  created: "2018-07-02T10:53:40Z",
63
57
  updated: "2020-11-18T08:58:33Z",
64
58
  updatedBy: ["sPHJn0BEtfxw2d2DUpIuS3iY", "KBAJskRqPXZUv9LFjAbz8btB", "eEIRDzflTh9oUp_3CgpuIMOg"],
65
59
  supportedLanguages: ["nb", "nn"],
66
- articleIds: [],
67
60
  status: { current: "PUBLISHED", other: [] },
68
61
  visualElement: {
69
62
  visualElement:
@@ -104,7 +97,7 @@ const visualElementData: ConceptData["visualElement"] = {
104
97
  origin: "",
105
98
  creators: [
106
99
  {
107
- type: "Illustrator",
100
+ type: "illustrator",
108
101
  name: "Sissel Paaske",
109
102
  },
110
103
  ],
@@ -43,16 +43,10 @@ const glossMetaData: ConceptData["concept"] = {
43
43
  processed: false,
44
44
  },
45
45
  source: "",
46
- metaImage: {
47
- url: "",
48
- alt: "",
49
- language: "und",
50
- },
51
46
  created: "2023-07-19T09:30:40.000Z",
52
47
  updated: "2023-09-19T17:13:56.573Z",
53
48
  updatedBy: ["XxnkdI7rApMl58MeG3p4g4B8", "hd5ZL5Lm4kKkumWgN2gjy9wx"],
54
49
  supportedLanguages: ["nb"],
55
- articleIds: [],
56
50
  status: {
57
51
  current: "IN_PROGRESS",
58
52
  other: [],
@@ -42,17 +42,17 @@ const filmResourceMeta: RelatedContentMetaData = {
42
42
  origin: "",
43
43
  creators: [
44
44
  {
45
- type: "Writer",
45
+ type: "writer",
46
46
  name: "Elisabeth Thoresen Olseng",
47
47
  },
48
48
  ],
49
49
  processors: [
50
50
  {
51
- type: "Processor",
51
+ type: "processor",
52
52
  name: "Tone Hadler-Olsen",
53
53
  },
54
54
  {
55
- type: "Correction",
55
+ type: "correction",
56
56
  name: "Totaltekst",
57
57
  },
58
58
  ],
@@ -231,7 +231,7 @@ const learningResourceMeta: RelatedContentMetaData = {
231
231
  origin: "",
232
232
  creators: [
233
233
  {
234
- type: "Writer",
234
+ type: "writer",
235
235
  name: "Albertine Aaberge",
236
236
  },
237
237
  ],
@@ -149,6 +149,7 @@ const FactBox = forwardRef<HTMLElement, Props>(
149
149
  <StyledIconButton
150
150
  data-state={state}
151
151
  onClick={onClick}
152
+ contentEditable={false}
152
153
  aria-expanded={state === "open"}
153
154
  aria-controls={contentId}
154
155
  aria-label={t(`factbox.${state === "open" ? "close" : "open"}`)}
package/src/Grid/Grid.tsx CHANGED
@@ -6,7 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
- import { type ReactNode } from "react";
9
+ import { type ComponentProps, type ReactNode } from "react";
10
10
  import { styled } from "@ndla/styled-system/jsx";
11
11
 
12
12
  const GridContainer = styled("div", {
@@ -63,14 +63,14 @@ const GridContainer = styled("div", {
63
63
  },
64
64
  });
65
65
 
66
- export interface GridProps {
66
+ export interface GridProps extends ComponentProps<"div"> {
67
67
  columns: "2" | "3" | "4" | "2x2";
68
68
  border?: "none" | "lightBlue";
69
69
  background?: "transparent" | "white" | "gray";
70
70
  children?: ReactNode[];
71
71
  }
72
72
 
73
- export const Grid = ({ columns, border, children, background = "gray" }: GridProps) => {
73
+ export const Grid = ({ columns, border, children, background = "gray", ...rest }: GridProps) => {
74
74
  const amountOfColumns = children?.length === 3 ? "3" : columns;
75
75
 
76
76
  return (
@@ -79,6 +79,7 @@ export const Grid = ({ columns, border, children, background = "gray" }: GridPro
79
79
  border={border === "none" ? undefined : border}
80
80
  columns={amountOfColumns}
81
81
  background={background}
82
+ {...rest}
82
83
  >
83
84
  {children}
84
85
  </GridContainer>