@ndla/ui 56.0.25-alpha.0 → 56.0.27-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.
@@ -81,7 +81,9 @@ const ArticleHeader = exports.ArticleHeader = (0, _jsx2.styled)(_react2.ark.head
81
81
  gap: "medium",
82
82
  alignItems: "flex-start",
83
83
  width: "100%",
84
- paddingBlockStart: "xxlarge"
84
+ paddingBlockStart: "xxlarge",
85
+ overflowWrap: "break-word",
86
+ hyphens: "auto"
85
87
  }
86
88
  }, {
87
89
  baseComponent: true
@@ -148,7 +148,7 @@ const ArticleByline = _ref => {
148
148
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
149
149
  children: [t(`${bylineType}.lastUpdated`), " ", published]
150
150
  })]
151
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(StyledAccordionRoot, {
151
+ }), (!!licenseBox || !!footnotes?.length) && /*#__PURE__*/(0, _jsxRuntime.jsxs)(StyledAccordionRoot, {
152
152
  multiple: true,
153
153
  value: openAccordions,
154
154
  onValueChange: details => setOpenAccordions(details.value),
@@ -20,6 +20,13 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
20
20
  *
21
21
  */
22
22
 
23
+ const Wrapper = (0, _jsx2.styled)("div", {
24
+ base: {
25
+ width: "100%",
26
+ height: "100%",
27
+ containerType: "inline-size"
28
+ }
29
+ });
23
30
  const Container = (0, _jsx2.styled)("div", {
24
31
  base: {
25
32
  display: "grid",
@@ -35,13 +42,23 @@ const Container = (0, _jsx2.styled)("div", {
35
42
  variants: {
36
43
  imageSide: {
37
44
  left: {
38
- tabletWide: {
45
+ "@/tablet": {
39
46
  gridTemplateColumns: "minmax(230px, 455px) auto" //required for campaign block in myNdla
47
+ },
48
+ "@supports not (container-type: inline-size)": {
49
+ tabletWide: {
50
+ gridTemplateColumns: "minmax(230px, 455px) auto"
51
+ }
40
52
  }
41
53
  },
42
54
  right: {
43
- tabletWide: {
55
+ "@/tablet": {
44
56
  gridTemplateColumns: "auto minmax(230px, 455px)" //required for campaign block in myNdla
57
+ },
58
+ "@supports not (container-type: inline-size)": {
59
+ tabletWide: {
60
+ gridTemplateColumns: "auto minmax(230px, 455px)"
61
+ }
45
62
  }
46
63
  }
47
64
  }
@@ -76,11 +93,16 @@ const StyledImg = (0, _jsx2.styled)("img", {
76
93
  objectFit: "cover",
77
94
  width: "100%",
78
95
  height: "215px",
79
- tablet: {
80
- height: "265px"
81
- },
82
- tabletWide: {
96
+ "@/tablet": {
83
97
  height: "340px"
98
+ },
99
+ "@supports not (container-type: inline-size)": {
100
+ tablet: {
101
+ height: "265px"
102
+ },
103
+ tabletWide: {
104
+ height: "340px"
105
+ }
84
106
  }
85
107
  }
86
108
  });
@@ -93,13 +115,12 @@ const ContentWrapper = (0, _jsx2.styled)("div", {
93
115
  alignItems: "flex-start",
94
116
  justifyContent: "center",
95
117
  paddingBlock: "medium",
96
- paddingInline: "medium",
97
- minWidth: "270px" //required for campaign block in myNdla
118
+ paddingInline: "medium"
98
119
  }
99
120
  });
100
121
  const StyledText = (0, _jsx2.styled)(_primitives.Text, {
101
122
  base: {
102
- tabletWide: {
123
+ tablet: {
103
124
  display: "block",
104
125
  overflow: "hidden",
105
126
  position: "relative",
@@ -143,34 +164,36 @@ const CampaignBlock = _ref2 => {
143
164
  alt: image.alt
144
165
  });
145
166
  const HeaderComponent = url?.url ? LinkHeader : _primitives.Text;
146
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Container, {
147
- className: className,
148
- "data-embed-type": "campaign-block",
149
- imageSide: imageSide,
150
- children: [imageSide === "left" && imageComponent, /*#__PURE__*/(0, _jsxRuntime.jsxs)(ContentWrapper, {
151
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(MaybeLinkText, {
152
- url: url?.url,
153
- path: path,
154
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(HeaderComponent, {
155
- asChild: true,
156
- consumeCss: true,
157
- textStyle: "heading.small",
158
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(InternalHeading, {
159
- children: (0, _htmlReactParser.default)(title)
167
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(Wrapper, {
168
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(Container, {
169
+ className: className,
170
+ "data-embed-type": "campaign-block",
171
+ imageSide: imageSide,
172
+ children: [imageSide === "left" && imageComponent, /*#__PURE__*/(0, _jsxRuntime.jsxs)(ContentWrapper, {
173
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(MaybeLinkText, {
174
+ url: url?.url,
175
+ path: path,
176
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(HeaderComponent, {
177
+ asChild: true,
178
+ consumeCss: true,
179
+ textStyle: "heading.small",
180
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(InternalHeading, {
181
+ children: (0, _htmlReactParser.default)(title)
182
+ })
183
+ })
184
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledText, {
185
+ textStyle: "body.xlarge",
186
+ children: (0, _htmlReactParser.default)(description)
187
+ }), !!url?.url && /*#__PURE__*/(0, _jsxRuntime.jsx)(MaybeLinkText, {
188
+ url: url.url,
189
+ path: path,
190
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(LinkText, {
191
+ textStyle: "body.medium",
192
+ children: [(0, _htmlReactParser.default)(url.text ?? ""), /*#__PURE__*/(0, _jsxRuntime.jsx)(_common.ArrowRightLine, {})]
160
193
  })
161
- })
162
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledText, {
163
- textStyle: "body.xlarge",
164
- children: (0, _htmlReactParser.default)(description)
165
- }), !!url?.url && /*#__PURE__*/(0, _jsxRuntime.jsx)(MaybeLinkText, {
166
- url: url.url,
167
- path: path,
168
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(LinkText, {
169
- textStyle: "body.medium",
170
- children: [(0, _htmlReactParser.default)(url.text ?? ""), /*#__PURE__*/(0, _jsxRuntime.jsx)(_common.ArrowRightLine, {})]
171
- })
172
- })]
173
- }), imageSide !== "left" && imageComponent]
194
+ })]
195
+ }), imageSide !== "left" && imageComponent]
196
+ })
174
197
  });
175
198
  };
176
199
  var _default = exports.default = CampaignBlock;
@@ -29,7 +29,7 @@ const contentTypeToHeroMap = exports.contentTypeToHeroMap = {
29
29
  [contentTypes.LEARNING_PATH]: "primary",
30
30
  [contentTypes.TOPIC]: "neutral",
31
31
  [contentTypes.MULTIDISCIPLINARY]: "primary",
32
- [contentTypes.CONCEPT]: "brand1Subtle",
32
+ [contentTypes.CONCEPT]: "brand1Moderate",
33
33
  [contentTypes.EXTERNAL]: "primary",
34
34
  [contentTypes.IMAGE]: "primary",
35
35
  [contentTypes.AUDIO]: "primary",
@@ -29,6 +29,7 @@ const LinkedVideoButton = (0, _jsx2.styled)(_primitives.Button, {
29
29
  });
30
30
  const BrightcoveIframe = (0, _jsx2.styled)("iframe", {
31
31
  base: {
32
+ border: 0,
32
33
  height: "auto",
33
34
  width: "100%"
34
35
  }
@@ -94,9 +95,8 @@ const BrightcoveEmbed = _ref => {
94
95
  ref: iframeRef,
95
96
  title: embedData.alt ?? fallbackTitle,
96
97
  "aria-label": embedData.alt ?? fallbackTitle,
97
- frameBorder: "0",
98
98
  ...getIframeProps(embedData, []),
99
- allowFullScreen: true
99
+ allow: "fullscreen; encrypted-media"
100
100
  })
101
101
  });
102
102
  }
@@ -120,9 +120,8 @@ const BrightcoveEmbed = _ref => {
120
120
  className: "original",
121
121
  title: embedData.alt ?? data.name ?? fallbackTitle,
122
122
  "aria-label": embedData.alt ?? data.name ?? fallbackTitle,
123
- frameBorder: "0",
124
123
  ...(alternativeVideoProps && !showOriginalVideo ? alternativeVideoProps : originalVideoProps),
125
- allowFullScreen: true
124
+ allow: "fullscreen; encrypted-media"
126
125
  })
127
126
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_LicenseByline.EmbedByline, {
128
127
  type: "video",
@@ -160,6 +160,9 @@ const ExpandButton = (0, _jsx2.styled)("button", {
160
160
  transitionProperty: "transform",
161
161
  transitionDuration: "normal",
162
162
  transitionTimingFunction: "ease-out"
163
+ },
164
+ tabletDown: {
165
+ display: "none"
163
166
  }
164
167
  }
165
168
  }, {
@@ -207,11 +210,12 @@ const ImageEmbed = _ref => {
207
210
  setImageSizes(sizes => !sizes ? expandedSizes : undefined);
208
211
  };
209
212
  const licenseProps = (0, _licenseAttributes.licenseAttributes)(data.copyright.license.license, lang, embedData.url);
213
+ const figureSize = figureProps?.float ? figureProps?.size ?? "medium" : "full";
210
214
 
211
215
  // TODO: Check how this works with `children`. Will only be important for ED
212
216
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(StyledFigure, {
213
217
  float: figureProps?.float,
214
- size: imageSizes ? "full" : figureProps?.size ?? "medium",
218
+ size: imageSizes ? "full" : figureSize,
215
219
  "data-embed-type": "image",
216
220
  ...licenseProps,
217
221
  children: [children, /*#__PURE__*/(0, _jsxRuntime.jsxs)(ImageWrapper, {
@@ -227,16 +231,18 @@ const ImageEmbed = _ref => {
227
231
  lang: lang,
228
232
  onClick: figureProps?.float ? toggleImageSize : undefined,
229
233
  variant: "rounded"
230
- }), !!embedData.align && /*#__PURE__*/(0, _jsxRuntime.jsx)(ExpandButton, {
234
+ }), (embedData.align === "right" || embedData.align === "left") && /*#__PURE__*/(0, _jsxRuntime.jsx)(ExpandButton, {
231
235
  "aria-label": t(`license.images.itemImage.zoom${imageSizes ? "Out" : ""}ImageButtonLabel`),
232
236
  onClick: toggleImageSize,
233
237
  "data-expanded": !!imageSizes,
234
238
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_action.AddLine, {})
235
239
  })]
236
- }), embedData.hideByline === "true" ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)(_LicenseByline.EmbedByline, {
240
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_LicenseByline.EmbedByline, {
237
241
  type: "image",
238
242
  copyright: data.copyright,
239
- description: embedData.hideCaption === "true" ? "" : parsedDescription,
243
+ description: parsedDescription,
244
+ hideDescription: embedData.hideCaption === "true",
245
+ hideCopyright: embedData.hideByline === "true",
240
246
  visibleAlt: previewAlt ? embed.embedData.alt : ""
241
247
  })]
242
248
  });
@@ -16,6 +16,8 @@ interface BaseProps {
16
16
  children?: ReactNode;
17
17
  visibleAlt?: string;
18
18
  error?: true | false;
19
+ hideDescription?: boolean;
20
+ hideCopyright?: boolean;
19
21
  }
20
22
  export interface EmbedBylineErrorProps extends BaseProps {
21
23
  type: EmbedBylineTypeProps["type"] | "h5p" | "external";
@@ -47,7 +49,7 @@ interface CopyrightProps extends BaseProps {
47
49
  }
48
50
  export type EmbedBylineTypeProps = ImageProps | BrightcoveProps | AudioProps | PodcastProps | ConceptProps | CopyrightProps;
49
51
  type Props = EmbedBylineTypeProps | EmbedBylineErrorProps;
50
- export declare const EmbedByline: ({ type, description, children, visibleAlt, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
52
+ export declare const EmbedByline: ({ type, description, children, visibleAlt, hideCopyright, hideDescription, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
51
53
  interface LicenseContainerProps {
52
54
  children?: ReactNode;
53
55
  copyright: EmbedBylineTypeProps["copyright"];
@@ -26,7 +26,8 @@ const BylineWrapper = (0, _jsx2.styled)("figcaption", {
26
26
  flexDirection: "column",
27
27
  paddingBlock: "xsmall",
28
28
  background: "surface.default",
29
- textStyle: "label.medium"
29
+ textStyle: "label.medium",
30
+ color: "text.subtle"
30
31
  }
31
32
  });
32
33
  const ErrorBylineWrapper = (0, _jsx2.styled)(BylineWrapper, {
@@ -64,6 +65,8 @@ const EmbedByline = _ref => {
64
65
  description,
65
66
  children,
66
67
  visibleAlt,
68
+ hideCopyright,
69
+ hideDescription,
67
70
  ...props
68
71
  } = _ref;
69
72
  const {
@@ -86,13 +89,14 @@ const EmbedByline = _ref => {
86
89
  const {
87
90
  copyright
88
91
  } = props;
92
+ const bylineDescription = hideDescription ? "" : description;
89
93
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
90
94
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(BylineWrapper, {
91
95
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
92
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(LicenseContainerContent, {
96
+ children: [hideCopyright && bylineDescription, !hideCopyright && /*#__PURE__*/(0, _jsxRuntime.jsx)(LicenseContainerContent, {
93
97
  type: type,
94
98
  copyright: copyright,
95
- children: description
99
+ children: bylineDescription
96
100
  }), children]
97
101
  })
98
102
  }), visibleAlt ? /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledText, {
@@ -17,7 +17,7 @@ var _jsxRuntime = require("react/jsx-runtime");
17
17
 
18
18
  const StyledSafeLink = (0, _jsx2.styled)(_safelink.SafeLink, {
19
19
  base: {
20
- color: "primary",
20
+ color: "text.link",
21
21
  textDecoration: "underline",
22
22
  whiteSpace: "nowrap",
23
23
  _hover: {
package/lib/styles.css CHANGED
@@ -117,6 +117,11 @@
117
117
  padding-block-start: var(--spacing-xxlarge);
118
118
  }
119
119
 
120
+ .hy_auto {
121
+ hyphens: auto;
122
+ -webkit-hyphens: auto;
123
+ }
124
+
120
125
  .gap_xxlarge {
121
126
  gap: var(--spacing-xxlarge);
122
127
  }
@@ -334,6 +339,10 @@
334
339
  text-decoration: underline;
335
340
  }
336
341
 
342
+ .cq-t_inline-size {
343
+ container-type: inline-size;
344
+ }
345
+
337
346
  .d_grid {
338
347
  display: grid;
339
348
  }
@@ -342,10 +351,6 @@
342
351
  height: 215px;
343
352
  }
344
353
 
345
- .min-w_270px {
346
- min-width: 270px;
347
- }
348
-
349
354
  .bd-l_4px_solid {
350
355
  border-left: 4px solid;
351
356
  }
@@ -574,6 +579,10 @@
574
579
  min-height: 100vh;
575
580
  }
576
581
 
582
+ .c_text\.subtle {
583
+ color: var(--colors-text-subtle);
584
+ }
585
+
577
586
  .bg_surface\.dangerSubtle {
578
587
  background: var(--colors-surface-danger-subtle);
579
588
  }
@@ -582,8 +591,8 @@
582
591
  white-space: pre-wrap;
583
592
  }
584
593
 
585
- .c_primary {
586
- color: var(--colors-primary);
594
+ .c_text\.link {
595
+ color: var(--colors-text-link);
587
596
  }
588
597
 
589
598
  .white-space_nowrap {
@@ -1430,6 +1439,28 @@
1430
1439
  height: var(--sizes-large);
1431
1440
  }
1432
1441
 
1442
+ @supports not (container-type: inline-size) {
1443
+ @media screen and (min-width: 37.5625rem) {
1444
+ .\[\@supports_not_\(container-type\:_inline-size\)\]\:tablet\:h_265px {
1445
+ height: 265px;
1446
+ }
1447
+ }
1448
+ }
1449
+
1450
+ @supports not (container-type: inline-size) {
1451
+ @media screen and (min-width: 48rem) {
1452
+ .\[\@supports_not_\(container-type\:_inline-size\)\]\:tabletWide\:h_340px {
1453
+ height: 340px;
1454
+ }
1455
+ .\[\@supports_not_\(container-type\:_inline-size\)\]\:tabletWide\:grid-tc_minmax\(230px\,_455px\)_auto {
1456
+ grid-template-columns: minmax(230px, 455px) auto;
1457
+ }
1458
+ .\[\@supports_not_\(container-type\:_inline-size\)\]\:tabletWide\:grid-tc_auto_minmax\(230px\,_455px\) {
1459
+ grid-template-columns: auto minmax(230px, 455px);
1460
+ }
1461
+ }
1462
+ }
1463
+
1433
1464
  @media screen and (min-width: 29.75rem) {
1434
1465
  .mobileWide\:d_none {
1435
1466
  display: none;
@@ -1440,14 +1471,41 @@
1440
1471
  .mobileWide\:pr_medium {
1441
1472
  padding-right: var(--spacing-medium);
1442
1473
  }
1474
+ }
1475
+
1476
+ @container (min-width: 37.5625rem) {
1477
+ .\@\/tablet\:h_340px {
1478
+ height: 340px;
1479
+ }
1480
+ .\@\/tablet\:grid-tc_minmax\(230px\,_455px\)_auto {
1481
+ grid-template-columns: minmax(230px, 455px) auto;
1482
+ }
1483
+ .\@\/tablet\:grid-tc_auto_minmax\(230px\,_455px\) {
1484
+ grid-template-columns: auto minmax(230px, 455px);
1485
+ }
1443
1486
  }
1444
1487
 
1445
1488
  @media screen and (min-width: 37.5625rem) {
1446
1489
  .tablet\:px_medium {
1447
1490
  padding-inline: var(--spacing-medium);
1448
1491
  }
1449
- .tablet\:h_265px {
1450
- height: 265px;
1492
+ .tablet\:d_block {
1493
+ display: block;
1494
+ }
1495
+ .tablet\:ov_hidden {
1496
+ overflow: hidden;
1497
+ }
1498
+ .tablet\:pos_relative {
1499
+ position: relative;
1500
+ }
1501
+ .tablet\:lc_4 {
1502
+ overflow: hidden;
1503
+ display: -webkit-box;
1504
+ -webkit-line-clamp: 4;
1505
+ -webkit-box-orient: vertical;
1506
+ }
1507
+ .tablet\:box-orient_vertical {
1508
+ box-orient: vertical;
1451
1509
  }
1452
1510
  .tablet\:h_26px {
1453
1511
  height: 26px;
@@ -1526,39 +1584,12 @@
1526
1584
  }
1527
1585
  .tabletWide\:max-w_532px {
1528
1586
  max-width: 532px;
1529
- }
1530
- .tabletWide\:h_340px {
1531
- height: 340px;
1532
- }
1533
- .tabletWide\:d_block {
1534
- display: block;
1535
- }
1536
- .tabletWide\:ov_hidden {
1537
- overflow: hidden;
1538
- }
1539
- .tabletWide\:pos_relative {
1540
- position: relative;
1541
- }
1542
- .tabletWide\:lc_4 {
1543
- overflow: hidden;
1544
- display: -webkit-box;
1545
- -webkit-line-clamp: 4;
1546
- -webkit-box-orient: vertical;
1547
- }
1548
- .tabletWide\:box-orient_vertical {
1549
- box-orient: vertical;
1550
1587
  }
1551
1588
  .tabletWide\:flex-d_row {
1552
1589
  flex-direction: row;
1553
1590
  }
1554
1591
  .tabletWide\:jc_space-between {
1555
1592
  justify-content: space-between;
1556
- }
1557
- .tabletWide\:grid-tc_minmax\(230px\,_455px\)_auto {
1558
- grid-template-columns: minmax(230px, 455px) auto;
1559
- }
1560
- .tabletWide\:grid-tc_auto_minmax\(230px\,_455px\) {
1561
- grid-template-columns: auto minmax(230px, 455px);
1562
1593
  }
1563
1594
  }
1564
1595
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ndla/ui",
3
- "version": "56.0.25-alpha.0",
3
+ "version": "56.0.27-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.16-alpha.0",
38
- "@ndla/licenses": "^8.0.2-alpha.0",
39
- "@ndla/primitives": "^1.0.22-alpha.0",
40
- "@ndla/safelink": "^7.0.22-alpha.0",
41
- "@ndla/styled-system": "^0.0.18",
37
+ "@ndla/icons": "^8.0.18-alpha.0",
38
+ "@ndla/licenses": "^8.0.3-alpha.0",
39
+ "@ndla/primitives": "^1.0.24-alpha.0",
40
+ "@ndla/safelink": "^7.0.24-alpha.0",
41
+ "@ndla/styled-system": "^0.0.20",
42
42
  "@ndla/util": "^4.1.0",
43
43
  "html-react-parser": "^5.1.8",
44
44
  "i18next-browser-languagedetector": "^7.1.0"
@@ -53,7 +53,7 @@
53
53
  "react-router-dom": "> 6.0.0"
54
54
  },
55
55
  "devDependencies": {
56
- "@ndla/preset-panda": "^0.0.26",
56
+ "@ndla/preset-panda": "^0.0.28",
57
57
  "@ndla/types-backend": "^0.2.86",
58
58
  "@ndla/types-embed": "^5.0.1-alpha.0",
59
59
  "@pandacss/dev": "^0.46.0",
@@ -66,5 +66,5 @@
66
66
  "publishConfig": {
67
67
  "access": "public"
68
68
  },
69
- "gitHead": "19def84b2fdf322e30f85268906a572747fdc53c"
69
+ "gitHead": "45c12a953606ca3eb14c8d09c25401c8bc24ed22"
70
70
  }
@@ -80,6 +80,8 @@ export const ArticleHeader = styled(
80
80
  alignItems: "flex-start",
81
81
  width: "100%",
82
82
  paddingBlockStart: "xxlarge",
83
+ overflowWrap: "break-word",
84
+ hyphens: "auto",
83
85
  },
84
86
  },
85
87
  { baseComponent: true },
@@ -183,22 +183,24 @@ export const ArticleByline = ({
183
183
  </div>
184
184
  </TextWrapper>
185
185
  )}
186
- <StyledAccordionRoot
187
- multiple
188
- value={openAccordions}
189
- onValueChange={(details) => setOpenAccordions(details.value)}
190
- >
191
- {!!licenseBox && (
192
- <ArticleBylineAccordionItem value={accordionItemValue} accordionTitle={t("article.useContent")}>
193
- {licenseBox}
194
- </ArticleBylineAccordionItem>
195
- )}
196
- {!!footnotes?.length && (
197
- <ArticleBylineAccordionItem value={footnotesAccordionId} accordionTitle={t("article.footnotes")}>
198
- <ArticleFootNotes footNotes={footnotes} />
199
- </ArticleBylineAccordionItem>
200
- )}
201
- </StyledAccordionRoot>
186
+ {(!!licenseBox || !!footnotes?.length) && (
187
+ <StyledAccordionRoot
188
+ multiple
189
+ value={openAccordions}
190
+ onValueChange={(details) => setOpenAccordions(details.value)}
191
+ >
192
+ {!!licenseBox && (
193
+ <ArticleBylineAccordionItem value={accordionItemValue} accordionTitle={t("article.useContent")}>
194
+ {licenseBox}
195
+ </ArticleBylineAccordionItem>
196
+ )}
197
+ {!!footnotes?.length && (
198
+ <ArticleBylineAccordionItem value={footnotesAccordionId} accordionTitle={t("article.footnotes")}>
199
+ <ArticleFootNotes footNotes={footnotes} />
200
+ </ArticleBylineAccordionItem>
201
+ )}
202
+ </StyledAccordionRoot>
203
+ )}
202
204
  </Wrapper>
203
205
  );
204
206
  };