@ndla/ui 55.0.12-alpha.0 → 55.0.13-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.
Files changed (192) hide show
  1. package/dist/all-aout.js +0 -0
  2. package/dist/all.css +1 -0
  3. package/dist/panda.buildinfo.json +170 -0
  4. package/dist/styles.css +686 -0
  5. package/es/Article/Article.js +3 -4
  6. package/es/Article/ArticleByline.js +9 -9
  7. package/es/Article/ArticleFootNotes.js +4 -4
  8. package/es/AudioPlayer/AudioPlayer.js +142 -163
  9. package/es/AudioPlayer/Controls.js +187 -203
  10. package/es/AudioPlayer/SpeechControl.js +13 -11
  11. package/es/BlogPost/BlogPost.js +85 -23
  12. package/es/CampaignBlock/CampaignBlock.js +3 -4
  13. package/es/CodeBlock/CodeBlock.js +88 -96
  14. package/es/ContactBlock/ContactBlock.js +54 -40
  15. package/es/ContentLoader/index.js +7 -7
  16. package/es/CopyParagraphButton/CopyParagraphButton.js +4 -4
  17. package/es/Embed/AudioEmbed.js +5 -9
  18. package/es/Embed/BrightcoveEmbed.js +12 -15
  19. package/es/Embed/CodeEmbed.js +58 -10
  20. package/es/Embed/ConceptEmbed.js +15 -20
  21. package/es/Embed/ContentLinkEmbed.js +1 -1
  22. package/es/Embed/EmbedErrorPlaceholder.js +32 -17
  23. package/es/Embed/ExternalEmbed.js +7 -10
  24. package/es/Embed/FootnoteEmbed.js +3 -3
  25. package/es/Embed/H5pEmbed.js +1 -2
  26. package/es/Embed/IframeEmbed.js +8 -9
  27. package/es/Embed/ImageEmbed.js +167 -122
  28. package/es/Embed/RelatedContentEmbed.js +8 -10
  29. package/es/Embed/UuDisclaimerEmbed.js +2 -2
  30. package/es/Embed/conceptComponents.js +9 -9
  31. package/es/ErrorMessage/ErrorMessage.js +1 -1
  32. package/es/FactBox/FactBox.js +2 -2
  33. package/es/FileList/File.js +1 -1
  34. package/es/FileList/Format.js +3 -3
  35. package/es/FrontpageArticle/FrontpageArticle.js +1 -1
  36. package/es/Gloss/Gloss.js +9 -11
  37. package/es/Gloss/GlossExample.js +3 -4
  38. package/es/Grid/Grid.js +1 -1
  39. package/es/Image/Image.js +7 -8
  40. package/es/Image/ImageLink.js +1 -1
  41. package/es/KeyFigure/KeyFigure.js +2 -2
  42. package/es/LanguageSelector/LanguageSelector.js +2 -2
  43. package/es/LetterFilter/LetterFilter.js +1 -1
  44. package/es/LicenseByline/EmbedByline.js +5 -6
  45. package/es/LicenseByline/LicenseDescription.js +1 -1
  46. package/es/LicenseByline/LicenseLink.js +1 -2
  47. package/es/Messages/MessageBox.js +1 -1
  48. package/es/Notion/Notion.js +2 -2
  49. package/es/Notion/NotionImage.js +12 -57
  50. package/es/RelatedArticleList/RelatedArticleList.js +3 -3
  51. package/es/ResourceBox/ResourceBox.js +12 -17
  52. package/es/Search/ActiveFilters.js +1 -1
  53. package/es/Search/ContentTypeResult.js +9 -6
  54. package/es/Search/ContentTypeResultStyles.js +1 -1
  55. package/es/Search/IsPathToHighlight.js +1 -1
  56. package/es/Search/SearchField.js +6 -8
  57. package/es/Search/SearchResult.js +14 -19
  58. package/es/Search/SearchResultSleeve.js +14 -16
  59. package/es/SnackBar/SnackbarProvider.js +8 -11
  60. package/es/TagSelector/TagSelector.js +1 -1
  61. package/es/TagSelector/ariaMessages.js +6 -6
  62. package/es/TreeStructure/AddFolderButton.js +4 -6
  63. package/es/TreeStructure/ComboboxButton.js +4 -7
  64. package/es/TreeStructure/FolderItem.js +12 -15
  65. package/es/TreeStructure/FolderItems.js +3 -3
  66. package/es/TreeStructure/TreeStructure.js +9 -12
  67. package/es/TreeStructure/helperFunctions.js +1 -1
  68. package/es/ZendeskButton/ZendeskButton.js +55 -0
  69. package/es/i18n/formatNestedMessages.js +1 -1
  70. package/es/index.js +2 -1
  71. package/es/locale/messages-en.js +9 -8
  72. package/es/locale/messages-nb.js +9 -8
  73. package/es/locale/messages-nn.js +9 -8
  74. package/es/locale/messages-se.js +9 -8
  75. package/es/locale/messages-sma.js +9 -8
  76. package/es/styles.css +686 -0
  77. package/es/utils/relativeUrl.js +3 -3
  78. package/lib/Article/Article.js +3 -4
  79. package/lib/Article/ArticleByline.js +9 -9
  80. package/lib/Article/ArticleFootNotes.js +4 -4
  81. package/lib/AudioPlayer/AudioPlayer.d.ts +1 -2
  82. package/lib/AudioPlayer/AudioPlayer.js +142 -162
  83. package/lib/AudioPlayer/Controls.js +190 -205
  84. package/lib/AudioPlayer/SpeechControl.js +13 -11
  85. package/lib/BlogPost/BlogPost.d.ts +2 -2
  86. package/lib/BlogPost/BlogPost.js +85 -24
  87. package/lib/CampaignBlock/CampaignBlock.js +3 -4
  88. package/lib/CodeBlock/CodeBlock.d.ts +5 -8
  89. package/lib/CodeBlock/CodeBlock.js +88 -96
  90. package/lib/ContactBlock/ContactBlock.js +55 -43
  91. package/lib/ContentLoader/index.js +7 -7
  92. package/lib/CopyParagraphButton/CopyParagraphButton.js +4 -4
  93. package/lib/Embed/AudioEmbed.js +5 -9
  94. package/lib/Embed/BrightcoveEmbed.js +12 -15
  95. package/lib/Embed/CodeEmbed.js +56 -8
  96. package/lib/Embed/ConceptEmbed.js +15 -20
  97. package/lib/Embed/ContentLinkEmbed.js +1 -1
  98. package/lib/Embed/EmbedErrorPlaceholder.d.ts +4 -3
  99. package/lib/Embed/EmbedErrorPlaceholder.js +32 -18
  100. package/lib/Embed/ExternalEmbed.js +7 -10
  101. package/lib/Embed/FootnoteEmbed.js +3 -3
  102. package/lib/Embed/H5pEmbed.js +1 -2
  103. package/lib/Embed/IframeEmbed.js +8 -9
  104. package/lib/Embed/ImageEmbed.d.ts +1 -2
  105. package/lib/Embed/ImageEmbed.js +167 -123
  106. package/lib/Embed/RelatedContentEmbed.js +8 -10
  107. package/lib/Embed/UuDisclaimerEmbed.js +2 -2
  108. package/lib/Embed/conceptComponents.js +9 -9
  109. package/lib/ErrorMessage/ErrorMessage.js +1 -1
  110. package/lib/FactBox/FactBox.js +2 -2
  111. package/lib/FileList/File.js +1 -1
  112. package/lib/FileList/Format.js +3 -3
  113. package/lib/FrontpageArticle/FrontpageArticle.js +1 -1
  114. package/lib/Gloss/Gloss.js +9 -11
  115. package/lib/Gloss/GlossExample.js +3 -4
  116. package/lib/Grid/Grid.js +1 -1
  117. package/lib/Image/Image.js +7 -8
  118. package/lib/Image/ImageLink.js +1 -1
  119. package/lib/KeyFigure/KeyFigure.js +2 -2
  120. package/lib/LanguageSelector/LanguageSelector.js +2 -2
  121. package/lib/LetterFilter/LetterFilter.js +1 -1
  122. package/lib/LicenseByline/EmbedByline.js +5 -6
  123. package/lib/LicenseByline/LicenseDescription.js +1 -1
  124. package/lib/LicenseByline/LicenseLink.js +1 -2
  125. package/lib/Messages/MessageBox.js +1 -1
  126. package/lib/Notion/Notion.js +2 -2
  127. package/lib/Notion/NotionImage.d.ts +1 -11
  128. package/lib/Notion/NotionImage.js +12 -59
  129. package/lib/RelatedArticleList/RelatedArticleList.js +3 -3
  130. package/lib/ResourceBox/ResourceBox.js +13 -18
  131. package/lib/Search/ActiveFilters.js +1 -1
  132. package/lib/Search/ContentTypeResult.js +9 -6
  133. package/lib/Search/ContentTypeResultStyles.js +1 -1
  134. package/lib/Search/IsPathToHighlight.js +1 -1
  135. package/lib/Search/SearchField.js +6 -8
  136. package/lib/Search/SearchResult.js +14 -19
  137. package/lib/Search/SearchResultSleeve.js +14 -16
  138. package/lib/SnackBar/SnackbarProvider.js +8 -11
  139. package/lib/TagSelector/TagSelector.js +1 -1
  140. package/lib/TagSelector/ariaMessages.js +6 -6
  141. package/lib/TreeStructure/AddFolderButton.js +4 -6
  142. package/lib/TreeStructure/ComboboxButton.js +4 -7
  143. package/lib/TreeStructure/FolderItem.js +12 -15
  144. package/lib/TreeStructure/FolderItems.js +3 -3
  145. package/lib/TreeStructure/TreeStructure.js +9 -12
  146. package/lib/TreeStructure/helperFunctions.js +1 -1
  147. package/lib/ZendeskButton/ZendeskButton.d.ts +19 -0
  148. package/lib/ZendeskButton/ZendeskButton.js +61 -0
  149. package/lib/i18n/formatNestedMessages.js +1 -1
  150. package/lib/index.d.ts +2 -0
  151. package/lib/index.js +7 -0
  152. package/lib/locale/messages-en.d.ts +1 -0
  153. package/lib/locale/messages-en.js +9 -8
  154. package/lib/locale/messages-nb.d.ts +1 -0
  155. package/lib/locale/messages-nb.js +9 -8
  156. package/lib/locale/messages-nn.d.ts +1 -0
  157. package/lib/locale/messages-nn.js +9 -8
  158. package/lib/locale/messages-se.d.ts +1 -0
  159. package/lib/locale/messages-se.js +9 -8
  160. package/lib/locale/messages-sma.d.ts +1 -0
  161. package/lib/locale/messages-sma.js +9 -8
  162. package/lib/styles.css +686 -0
  163. package/lib/types.d.ts +1 -0
  164. package/lib/utils/relativeUrl.js +3 -3
  165. package/package.json +17 -12
  166. package/src/AudioPlayer/AudioPlayer.tsx +139 -176
  167. package/src/AudioPlayer/Controls.tsx +210 -250
  168. package/src/AudioPlayer/SpeechControl.tsx +9 -7
  169. package/src/BlogPost/BlogPost.tsx +82 -58
  170. package/src/CodeBlock/CodeBlock.stories.tsx +0 -43
  171. package/src/CodeBlock/CodeBlock.tsx +91 -202
  172. package/src/ContactBlock/ContactBlock.tsx +10 -2
  173. package/src/Embed/CodeEmbed.stories.tsx +95 -0
  174. package/src/Embed/CodeEmbed.tsx +62 -7
  175. package/src/Embed/ConceptEmbed.tsx +1 -9
  176. package/src/Embed/EmbedErrorPlaceholder.tsx +31 -28
  177. package/src/Embed/ImageEmbed.stories.tsx +53 -11
  178. package/src/Embed/ImageEmbed.tsx +162 -166
  179. package/src/Notion/NotionImage.tsx +4 -54
  180. package/src/ResourceBox/ResourceBox.tsx +3 -15
  181. package/src/Search/ContentTypeResult.tsx +9 -3
  182. package/src/Search/SearchResultSleeve.tsx +5 -2
  183. package/src/ZendeskButton/ZendeskButton.tsx +58 -0
  184. package/src/index.ts +4 -0
  185. package/src/locale/messages-en.ts +1 -0
  186. package/src/locale/messages-nb.ts +1 -0
  187. package/src/locale/messages-nn.ts +1 -0
  188. package/src/locale/messages-se.ts +1 -0
  189. package/src/locale/messages-sma.ts +1 -0
  190. package/src/types.ts +2 -0
  191. package/src/Image/__tests__/Image-test.tsx +0 -66
  192. package/src/Image/__tests__/__snapshots__/Image-test.tsx.snap +0 -194
package/es/styles.css ADDED
@@ -0,0 +1,686 @@
1
+ @layer utilities {
2
+ @layer compositions {
3
+ .textStyle_body\.large {
4
+ font-family: var(--fonts-sans);
5
+ font-weight: var(--font-weights-normal);
6
+ font-size: var(--font-sizes-medium);
7
+ line-height: var(--line-heights-medium);
8
+ }
9
+
10
+ .textStyle_body\.large:where([lang='zh'], [lang='zh-Hans'], [lang='zh-Hant']):not([data-pinyin]) {
11
+ font-size: calc(var(--font-sizes-medium) * 1.11);
12
+ line-height: calc(var(--line-heights-medium) * 1.11);
13
+ }
14
+
15
+ .textStyle_label\.medium {
16
+ font-family: var(--fonts-sans);
17
+ font-weight: var(--font-weights-normal);
18
+ font-size: var(--font-sizes-small);
19
+ line-height: var(--line-heights-small);
20
+ }
21
+
22
+ .textStyle_label\.medium:where([lang='zh'], [lang='zh-Hans'], [lang='zh-Hant']):not([data-pinyin]) {
23
+ font-size: calc(var(--font-sizes-small) * 1.11);
24
+ line-height: calc(var(--line-heights-small) * 1.11);
25
+ }
26
+
27
+ .textStyle_label\.large {
28
+ font-family: var(--fonts-sans);
29
+ font-weight: var(--font-weights-normal);
30
+ font-size: var(--font-sizes-medium);
31
+ line-height: var(--line-heights-medium);
32
+ }
33
+
34
+ .textStyle_label\.large:where([lang='zh'], [lang='zh-Hans'], [lang='zh-Hant']):not([data-pinyin]) {
35
+ font-size: calc(var(--font-sizes-medium) * 1.11);
36
+ line-height: calc(var(--line-heights-medium) * 1.11);
37
+ }
38
+ }
39
+
40
+ .bd_1px_solid {
41
+ border: 1px solid;
42
+ }
43
+
44
+ .bdr_xsmall {
45
+ border-radius: var(--radii-xsmall);
46
+ }
47
+
48
+ .bx-sh_full {
49
+ box-shadow: var(--shadows-full);
50
+ }
51
+
52
+ .ov_hidden {
53
+ overflow: hidden;
54
+ }
55
+
56
+ .d_flex {
57
+ display: flex;
58
+ }
59
+
60
+ .flex_1_0_auto {
61
+ flex: 1 0 auto;
62
+ }
63
+
64
+ .w_surface\.4xsmall {
65
+ width: var(--sizes-surface-4xsmall);
66
+ }
67
+
68
+ .h_surface\.4xsmall {
69
+ height: var(--sizes-surface-4xsmall);
70
+ }
71
+
72
+ .gap_xsmall {
73
+ gap: var(--spacing-xsmall);
74
+ }
75
+
76
+ .p_xsmall {
77
+ padding: var(--spacing-xsmall);
78
+ }
79
+
80
+ .w_100\% {
81
+ width: 100%;
82
+ }
83
+
84
+ .bd-bs_1px_solid {
85
+ border-block-start: 1px solid;
86
+ }
87
+
88
+ .py_medium {
89
+ padding-block: var(--spacing-medium);
90
+ }
91
+
92
+ .px_xsmall {
93
+ padding-inline: var(--spacing-xsmall);
94
+ }
95
+
96
+ .max-w_surface\.xlarge {
97
+ max-width: var(--sizes-surface-xlarge);
98
+ }
99
+
100
+ .bdr-b_xsmall {
101
+ border-bottom-left-radius: var(--radii-xsmall);
102
+ border-bottom-right-radius: var(--radii-xsmall);
103
+ }
104
+
105
+ .bg_background\.default {
106
+ background: var(--colors-background-default);
107
+ }
108
+
109
+ .py_xsmall {
110
+ padding-block: var(--spacing-xsmall);
111
+ }
112
+
113
+ .px_medium {
114
+ padding-inline: var(--spacing-medium);
115
+ }
116
+
117
+ .grid-area_play {
118
+ grid-area: play;
119
+ }
120
+
121
+ .grid-area_forwards {
122
+ grid-area: forwards;
123
+ }
124
+
125
+ .grid-area_backwards {
126
+ grid-area: backwards;
127
+ }
128
+
129
+ .flex_1 {
130
+ flex: 1 1 0%;
131
+ }
132
+
133
+ .grid-area_track {
134
+ grid-area: track;
135
+ }
136
+
137
+ .grid-area_volume {
138
+ grid-area: volume;
139
+ }
140
+
141
+ .py_auto {
142
+ padding-block: auto;
143
+ }
144
+
145
+ .px_auto {
146
+ padding-inline: auto;
147
+ }
148
+
149
+ .max-w_xxlarge {
150
+ max-width: var(--sizes-xxlarge);
151
+ }
152
+
153
+ .max-h_xxlarge {
154
+ max-height: var(--sizes-xxlarge);
155
+ }
156
+
157
+ .min-w_xxlarge {
158
+ min-width: var(--sizes-xxlarge);
159
+ }
160
+
161
+ .min-h_xxlarge {
162
+ min-height: var(--sizes-xxlarge);
163
+ }
164
+
165
+ .grid-area_speed {
166
+ grid-area: speed;
167
+ }
168
+
169
+ .h_surface\.3xsmall {
170
+ height: var(--sizes-surface-3xsmall);
171
+ }
172
+
173
+ .sr_true {
174
+ position: absolute;
175
+ width: 1px;
176
+ height: 1px;
177
+ padding: 0;
178
+ margin: -1px;
179
+ overflow: hidden;
180
+ clip: rect(0, 0, 0, 0);
181
+ white-space: nowrap;
182
+ border-width: 0;
183
+ }
184
+
185
+ .c_text\.default {
186
+ color: var(--colors-text-default);
187
+ }
188
+
189
+ .gap_medium {
190
+ gap: var(--spacing-medium);
191
+ }
192
+
193
+ .h_100\% {
194
+ height: 100%;
195
+ }
196
+
197
+ .py_xlarge {
198
+ padding-block: var(--spacing-xlarge);
199
+ }
200
+
201
+ .px_xxlarge {
202
+ padding-inline: var(--spacing-xxlarge);
203
+ }
204
+
205
+ .tt_uppercase {
206
+ text-transform: uppercase;
207
+ }
208
+
209
+ .obj-f_cover {
210
+ object-fit: cover;
211
+ }
212
+
213
+ .bd_0 {
214
+ border: 0;
215
+ }
216
+
217
+ .d_inline-block {
218
+ display: inline-block;
219
+ }
220
+
221
+ .w_fit-content {
222
+ width: fit-content;
223
+ }
224
+
225
+ .pos_relative {
226
+ position: relative;
227
+ }
228
+
229
+ .max-w_8xl {
230
+ max-width: 8xl;
231
+ }
232
+
233
+ .bd-l_4px_solid {
234
+ border-left: 4px solid;
235
+ }
236
+
237
+ .bx-s_border-box {
238
+ box-sizing: border-box;
239
+ }
240
+
241
+ .d_block {
242
+ display: block;
243
+ }
244
+
245
+ .white-space_pre {
246
+ white-space: pre;
247
+ }
248
+
249
+ .h_surface\.xsmall {
250
+ height: var(--sizes-surface-xsmall);
251
+ }
252
+
253
+ .bd-b_0 {
254
+ border-bottom: 0;
255
+ }
256
+
257
+ .cursor_pointer {
258
+ cursor: pointer;
259
+ }
260
+
261
+ .pos_absolute {
262
+ position: absolute;
263
+ }
264
+
265
+ .z_base {
266
+ z-index: var(--z-index-base);
267
+ }
268
+
269
+ .bg_background\.default\/20 {
270
+ --mix-background: color-mix(in srgb, var(--colors-background-default) 20%, transparent);
271
+ background: var(--mix-background, var(--colors-background-default));
272
+ }
273
+
274
+ .p_0 {
275
+ padding: 0;
276
+ }
277
+
278
+ .w_medium {
279
+ width: var(--sizes-medium);
280
+ }
281
+
282
+ .h_medium {
283
+ height: var(--sizes-medium);
284
+ }
285
+
286
+ .bd_2px_solid {
287
+ border: 2px solid;
288
+ }
289
+
290
+ .c_background\.default {
291
+ color: var(--colors-background-default);
292
+ }
293
+
294
+ .bdr_large {
295
+ border-radius: var(--radii-large);
296
+ }
297
+
298
+ .bd-c_stroke\.default {
299
+ border-color: var(--colors-stroke-default);
300
+ }
301
+
302
+ .ai_center {
303
+ align-items: center;
304
+ }
305
+
306
+ .ai_flex-start {
307
+ align-items: flex-start;
308
+ }
309
+
310
+ .flex-d_column {
311
+ flex-direction: column;
312
+ }
313
+
314
+ .as_flex-start {
315
+ align-self: flex-start;
316
+ }
317
+
318
+ .jc_center {
319
+ justify-content: center;
320
+ }
321
+
322
+ .bg-c_background\.default {
323
+ background-color: var(--colors-background-default);
324
+ }
325
+
326
+ .bd-c_stroke\.subtle {
327
+ border-color: var(--colors-stroke-subtle);
328
+ }
329
+
330
+ .trs-dur_fast {
331
+ --transition-duration: var(--durations-fast);
332
+ transition-duration: var(--durations-fast);
333
+ }
334
+
335
+ .trs-prop_background-color\,_border-color\,_max-width {
336
+ --transition-prop: background-color, border-color, max-width;
337
+ transition-property: background-color, border-color, max-width;
338
+ }
339
+
340
+ .trs-tmf_default {
341
+ --transition-easing: var(--easings-default);
342
+ transition-timing-function: var(--easings-default);
343
+ }
344
+
345
+ .bd-l-c_stroke\.default {
346
+ border-left-color: var(--colors-stroke-default);
347
+ }
348
+
349
+ .ov-x_auto {
350
+ overflow-x: auto;
351
+ }
352
+
353
+ .ff_code {
354
+ font-family: var(--fonts-code);
355
+ }
356
+
357
+ .fw_bold {
358
+ font-weight: var(--font-weights-bold);
359
+ }
360
+
361
+ .bg-c_surface\.disabled {
362
+ background-color: var(--colors-surface-disabled);
363
+ }
364
+
365
+ .bd-c_surface\.brand\.1\.strong {
366
+ border-color: var(--colors-surface-brand-1-strong);
367
+ }
368
+
369
+ .bdr-bl_0 {
370
+ border-bottom-left-radius: 0;
371
+ }
372
+
373
+ .bdr-br_0 {
374
+ border-bottom-right-radius: 0;
375
+ }
376
+
377
+ .bottom_0 {
378
+ bottom: 0;
379
+ }
380
+
381
+ .right_0 {
382
+ right: 0;
383
+ }
384
+
385
+ .trs-prop_transform\,_background-color\,_color {
386
+ --transition-prop: transform, background-color, color;
387
+ transition-property: transform, background-color, color;
388
+ }
389
+
390
+ .trs-dur_normal {
391
+ --transition-duration: var(--durations-normal);
392
+ transition-duration: var(--durations-normal);
393
+ }
394
+
395
+ .trs-tmf_ease-out {
396
+ --transition-easing: ease-out;
397
+ transition-timing-function: ease-out;
398
+ }
399
+
400
+ .top_xsmall {
401
+ top: var(--spacing-xsmall);
402
+ }
403
+
404
+ .right_xsmall {
405
+ right: var(--spacing-xsmall);
406
+ }
407
+
408
+ .bd-c_background\.default {
409
+ border-color: var(--colors-background-default);
410
+ }
411
+
412
+ .bg-c_surface\.action {
413
+ background-color: var(--colors-surface-action);
414
+ }
415
+
416
+ .\[\&_img\]\:w_100\% img {
417
+ width: 100%;
418
+ }
419
+
420
+ .\[\&_img\]\:h_100\% img {
421
+ height: 100%;
422
+ }
423
+
424
+ .\[\&_img\]\:obj-f_cover img {
425
+ object-fit: cover;
426
+ }
427
+
428
+ .\[\&_span_\>_\*\]\:white-space_pre-wrap span > * {
429
+ white-space: pre-wrap;
430
+ }
431
+
432
+ .\[\&_span\]\:flex_1 span {
433
+ flex: 1 1 0%;
434
+ }
435
+
436
+ .\[\&_\.linenumber\]\:d_inline-block .linenumber {
437
+ display: inline-block;
438
+ }
439
+
440
+ .\[\&_\.linenumber\]\:py_0 .linenumber {
441
+ padding-block: 0;
442
+ }
443
+
444
+ .\[\&_\.linenumber\]\:px_small .linenumber {
445
+ padding-inline: var(--spacing-small);
446
+ }
447
+
448
+ .\[\&_\.linenumber\]\:bd-r_1px_solid .linenumber {
449
+ border-right: 1px solid;
450
+ }
451
+
452
+ .\[\&_\.linenumber\]\:w_xxlarge .linenumber {
453
+ width: var(--sizes-xxlarge);
454
+ }
455
+
456
+ .\[\&_\.linenumber\]\:ta_right .linenumber {
457
+ text-align: right;
458
+ }
459
+
460
+ .\[\&_\.linenumber\]\:me_xsmall .linenumber {
461
+ margin-inline-end: var(--spacing-xsmall);
462
+ }
463
+
464
+ .\[\&_\.linenumber\[data-first\]\]\:pbs_xsmall .linenumber[data-first] {
465
+ padding-block-start: var(--spacing-xsmall);
466
+ }
467
+
468
+ .\[\&_\.linenumber\[data-last\]\]\:pbe_xsmall .linenumber[data-last] {
469
+ padding-block-end: var(--spacing-xsmall);
470
+ }
471
+
472
+ .\[\&_\.token\.comment\,_\.token\.block-comment\,_\.token\.prolog\,_\.token\.doctype\,_\.token\.cdata\]\:c_\#7d8b99 .token.comment,.\[\&_\.token\.comment\,_\.token\.block-comment\,_\.token\.prolog\,_\.token\.doctype\,_\.token\.cdata\]\:c_\#7d8b99 .token.block-comment,.\[\&_\.token\.comment\,_\.token\.block-comment\,_\.token\.prolog\,_\.token\.doctype\,_\.token\.cdata\]\:c_\#7d8b99 .token.prolog,.\[\&_\.token\.comment\,_\.token\.block-comment\,_\.token\.prolog\,_\.token\.doctype\,_\.token\.cdata\]\:c_\#7d8b99 .token.doctype,.\[\&_\.token\.comment\,_\.token\.block-comment\,_\.token\.prolog\,_\.token\.doctype\,_\.token\.cdata\]\:c_\#7d8b99 .token.cdata {
473
+ color: #7d8b99;
474
+ }
475
+
476
+ .\[\&_\.token\.punctuation\]\:c_\#5f6364 .token.punctuation {
477
+ color: #5f6364;
478
+ }
479
+
480
+ .\[\&_\.token\.property\,_\.token\.tag\,_\.token\.boolean\,_\.token\.number\,_\.token\.function-name\,_\.token\.constant\,_\.token\.symbol\,_\.token\.deleted\]\:c_\#c92c2c .token.property,.\[\&_\.token\.property\,_\.token\.tag\,_\.token\.boolean\,_\.token\.number\,_\.token\.function-name\,_\.token\.constant\,_\.token\.symbol\,_\.token\.deleted\]\:c_\#c92c2c .token.tag,.\[\&_\.token\.property\,_\.token\.tag\,_\.token\.boolean\,_\.token\.number\,_\.token\.function-name\,_\.token\.constant\,_\.token\.symbol\,_\.token\.deleted\]\:c_\#c92c2c .token.boolean,.\[\&_\.token\.property\,_\.token\.tag\,_\.token\.boolean\,_\.token\.number\,_\.token\.function-name\,_\.token\.constant\,_\.token\.symbol\,_\.token\.deleted\]\:c_\#c92c2c .token.number,.\[\&_\.token\.property\,_\.token\.tag\,_\.token\.boolean\,_\.token\.number\,_\.token\.function-name\,_\.token\.constant\,_\.token\.symbol\,_\.token\.deleted\]\:c_\#c92c2c .token.function-name,.\[\&_\.token\.property\,_\.token\.tag\,_\.token\.boolean\,_\.token\.number\,_\.token\.function-name\,_\.token\.constant\,_\.token\.symbol\,_\.token\.deleted\]\:c_\#c92c2c .token.constant,.\[\&_\.token\.property\,_\.token\.tag\,_\.token\.boolean\,_\.token\.number\,_\.token\.function-name\,_\.token\.constant\,_\.token\.symbol\,_\.token\.deleted\]\:c_\#c92c2c .token.symbol,.\[\&_\.token\.property\,_\.token\.tag\,_\.token\.boolean\,_\.token\.number\,_\.token\.function-name\,_\.token\.constant\,_\.token\.symbol\,_\.token\.deleted\]\:c_\#c92c2c .token.deleted {
481
+ color: #c92c2c;
482
+ }
483
+
484
+ .\[\&_\.token\.selector\,_\.token\.attr-name\,_\.token\.string\,_\.token\.char\,_\.token\.function\,_\.token\.builtin\,_\.token\.inserted\]\:c_\#2f9c0a .token.selector,.\[\&_\.token\.selector\,_\.token\.attr-name\,_\.token\.string\,_\.token\.char\,_\.token\.function\,_\.token\.builtin\,_\.token\.inserted\]\:c_\#2f9c0a .token.attr-name,.\[\&_\.token\.selector\,_\.token\.attr-name\,_\.token\.string\,_\.token\.char\,_\.token\.function\,_\.token\.builtin\,_\.token\.inserted\]\:c_\#2f9c0a .token.string,.\[\&_\.token\.selector\,_\.token\.attr-name\,_\.token\.string\,_\.token\.char\,_\.token\.function\,_\.token\.builtin\,_\.token\.inserted\]\:c_\#2f9c0a .token.char,.\[\&_\.token\.selector\,_\.token\.attr-name\,_\.token\.string\,_\.token\.char\,_\.token\.function\,_\.token\.builtin\,_\.token\.inserted\]\:c_\#2f9c0a .token.function,.\[\&_\.token\.selector\,_\.token\.attr-name\,_\.token\.string\,_\.token\.char\,_\.token\.function\,_\.token\.builtin\,_\.token\.inserted\]\:c_\#2f9c0a .token.builtin,.\[\&_\.token\.selector\,_\.token\.attr-name\,_\.token\.string\,_\.token\.char\,_\.token\.function\,_\.token\.builtin\,_\.token\.inserted\]\:c_\#2f9c0a .token.inserted {
485
+ color: #2f9c0a;
486
+ }
487
+
488
+ .\[\&_\.token\.operator\,_\.token\.entity\,_\.token\.url\,_\.token\.variable\]\:c_\#a67f59 .token.operator,.\[\&_\.token\.operator\,_\.token\.entity\,_\.token\.url\,_\.token\.variable\]\:c_\#a67f59 .token.entity,.\[\&_\.token\.operator\,_\.token\.entity\,_\.token\.url\,_\.token\.variable\]\:c_\#a67f59 .token.url,.\[\&_\.token\.operator\,_\.token\.entity\,_\.token\.url\,_\.token\.variable\]\:c_\#a67f59 .token.variable {
489
+ color: #a67f59;
490
+ }
491
+
492
+ .\[\&_\.token\.operator\,_\.token\.entity\,_\.token\.url\,_\.token\.variable\]\:bg_rgba\(255\,_255\,_255\,_0\.5\) .token.operator,.\[\&_\.token\.operator\,_\.token\.entity\,_\.token\.url\,_\.token\.variable\]\:bg_rgba\(255\,_255\,_255\,_0\.5\) .token.entity,.\[\&_\.token\.operator\,_\.token\.entity\,_\.token\.url\,_\.token\.variable\]\:bg_rgba\(255\,_255\,_255\,_0\.5\) .token.url,.\[\&_\.token\.operator\,_\.token\.entity\,_\.token\.url\,_\.token\.variable\]\:bg_rgba\(255\,_255\,_255\,_0\.5\) .token.variable {
493
+ background: rgba(255, 255, 255, 0.5);
494
+ }
495
+
496
+ .\[\&_\.token\.atrule\,_\.token\.attr-value\,_\.token\.keyword\,_\.token\.class-name\]\:c_\#1990b8 .token.atrule,.\[\&_\.token\.atrule\,_\.token\.attr-value\,_\.token\.keyword\,_\.token\.class-name\]\:c_\#1990b8 .token.attr-value,.\[\&_\.token\.atrule\,_\.token\.attr-value\,_\.token\.keyword\,_\.token\.class-name\]\:c_\#1990b8 .token.keyword,.\[\&_\.token\.atrule\,_\.token\.attr-value\,_\.token\.keyword\,_\.token\.class-name\]\:c_\#1990b8 .token.class-name {
497
+ color: #1990b8;
498
+ }
499
+
500
+ .\[\&_\.token\.regex\,_\.token\.important\]\:c_\#e90 .token.regex,.\[\&_\.token\.regex\,_\.token\.important\]\:c_\#e90 .token.important {
501
+ color: #e90;
502
+ }
503
+
504
+ .\[\&_\.language-css_\.token\.string\,_\.style_\.token\.string\]\:c_\#a67f59 .language-css .token.string,.\[\&_\.language-css_\.token\.string\,_\.style_\.token\.string\]\:c_\#a67f59 .style .token.string {
505
+ color: #a67f59;
506
+ }
507
+
508
+ .\[\&_\.language-css_\.token\.string\,_\.style_\.token\.string\]\:bg_rgba\(255\,_255\,_255\,_0\.5\) .language-css .token.string,.\[\&_\.language-css_\.token\.string\,_\.style_\.token\.string\]\:bg_rgba\(255\,_255\,_255\,_0\.5\) .style .token.string {
509
+ background: rgba(255, 255, 255, 0.5);
510
+ }
511
+
512
+ .\[\&_\.token\.entity\]\:cursor_help .token.entity {
513
+ cursor: help;
514
+ }
515
+
516
+ .\[\&_\.token\.namespace\]\:op_0\.7 .token.namespace {
517
+ opacity: 0.7;
518
+ }
519
+
520
+ .\[\&_\>_\*\:not\(\:where\(\:first-child\)\)\]\:mbs_xsmall > *:not(:where(:first-child)) {
521
+ margin-block-start: var(--spacing-xsmall);
522
+ }
523
+
524
+ .\[\&_svg\]\:fill_text\.subtle svg {
525
+ fill: var(--colors-text-subtle);
526
+ }
527
+
528
+ .\[\&_svg\]\:h_90\% svg {
529
+ height: 90%;
530
+ }
531
+
532
+ .\[\&_svg\]\:w_90\% svg {
533
+ width: 90%;
534
+ }
535
+
536
+ .\[\&\[data-embed-type\=\'audio\'\]\]\:h_surface\.3xsmall[data-embed-type='audio'] {
537
+ height: var(--sizes-surface-3xsmall);
538
+ }
539
+
540
+ .\[\&_\>_\*\:not\(\:first-child\)\]\:mbs_3xsmall > *:not(:first-child) {
541
+ margin-block-start: var(--spacing-3xsmall);
542
+ }
543
+
544
+ .\[\&_svg\]\:fill_primary svg {
545
+ fill: var(--colors-primary);
546
+ }
547
+
548
+ .\[\&_\.linenumber\]\:bd-c_stroke\.subtle .linenumber {
549
+ border-color: var(--colors-stroke-subtle);
550
+ }
551
+
552
+ .\[\&_\.token\.important\]\:fw_normal .token.important {
553
+ font-weight: var(--font-weights-normal);
554
+ }
555
+
556
+ .\[\&_\.token\.bold\]\:fw_bold .token.bold {
557
+ font-weight: var(--font-weights-bold);
558
+ }
559
+
560
+ .\[\&_\.token\.italic\]\:font-style_italic .token.italic {
561
+ font-style: italic;
562
+ }
563
+
564
+ .\[\&_svg\]\:trs-prop_transform svg {
565
+ --transition-prop: transform;
566
+ transition-property: transform;
567
+ }
568
+
569
+ .\[\&_svg\]\:trs-dur_normal svg {
570
+ --transition-duration: var(--durations-normal);
571
+ transition-duration: var(--durations-normal);
572
+ }
573
+
574
+ .\[\&_svg\]\:trs-tmf_ease-out svg {
575
+ --transition-easing: ease-out;
576
+ transition-timing-function: ease-out;
577
+ }
578
+
579
+ .\[\&\:hover\,_\&\:focus-visible\]\:bd-c_stroke\.hover:hover,.\[\&\:hover\,_\&\:focus-visible\]\:bd-c_stroke\.hover:focus-visible {
580
+ border-color: var(--colors-stroke-hover);
581
+ }
582
+
583
+ .\[\&\:hover\,_\&\:focus-visible\]\:bg-c_surface\.actionSubtle\.hover:hover,.\[\&\:hover\,_\&\:focus-visible\]\:bg-c_surface\.actionSubtle\.hover:focus-visible {
584
+ background-color: var(--colors-surface-action-subtle-hover);
585
+ }
586
+
587
+ .\[\&_button\[data-expanded\=\'true\'\]\]\:\[\&_svg\]\:trf_rotate\(-45deg\) button[data-expanded='true'] svg {
588
+ transform: rotate(-45deg);
589
+ }
590
+
591
+ .\[\&\:hover\,_\&\:focus-visible\]\:\[\&_h1\,_h2\,_h3\,_h4\,_h5\,_h6\]\:td_underline:hover h1,.\[\&\:hover\,_\&\:focus-visible\]\:\[\&_h1\,_h2\,_h3\,_h4\,_h5\,_h6\]\:td_underline:hover h2,.\[\&\:hover\,_\&\:focus-visible\]\:\[\&_h1\,_h2\,_h3\,_h4\,_h5\,_h6\]\:td_underline:hover h3,.\[\&\:hover\,_\&\:focus-visible\]\:\[\&_h1\,_h2\,_h3\,_h4\,_h5\,_h6\]\:td_underline:hover h4,.\[\&\:hover\,_\&\:focus-visible\]\:\[\&_h1\,_h2\,_h3\,_h4\,_h5\,_h6\]\:td_underline:hover h5,.\[\&\:hover\,_\&\:focus-visible\]\:\[\&_h1\,_h2\,_h3\,_h4\,_h5\,_h6\]\:td_underline:hover h6,.\[\&\:hover\,_\&\:focus-visible\]\:\[\&_h1\,_h2\,_h3\,_h4\,_h5\,_h6\]\:td_underline:focus-visible h1,.\[\&\:hover\,_\&\:focus-visible\]\:\[\&_h1\,_h2\,_h3\,_h4\,_h5\,_h6\]\:td_underline:focus-visible h2,.\[\&\:hover\,_\&\:focus-visible\]\:\[\&_h1\,_h2\,_h3\,_h4\,_h5\,_h6\]\:td_underline:focus-visible h3,.\[\&\:hover\,_\&\:focus-visible\]\:\[\&_h1\,_h2\,_h3\,_h4\,_h5\,_h6\]\:td_underline:focus-visible h4,.\[\&\:hover\,_\&\:focus-visible\]\:\[\&_h1\,_h2\,_h3\,_h4\,_h5\,_h6\]\:td_underline:focus-visible h5,.\[\&\:hover\,_\&\:focus-visible\]\:\[\&_h1\,_h2\,_h3\,_h4\,_h5\,_h6\]\:td_underline:focus-visible h6 {
592
+ text-decoration: underline;
593
+ }
594
+
595
+ .hover\:\[\&_\[data-byline-button\]\]\:bg_background\.default:is(:hover, [data-hover]) [data-byline-button] {
596
+ background: var(--colors-background-default);
597
+ }
598
+
599
+ .hover\:\[\&_button\[data-expanded\]\]\:trf_scale\(1\.2\):is(:hover, [data-hover]) button[data-expanded] {
600
+ transform: scale(1.2);
601
+ }
602
+
603
+ @media screen and (min-width: 37.5625rem) {
604
+ .tablet\:px_medium {
605
+ padding-inline: var(--spacing-medium);
606
+ }
607
+ .\[\&\[data-has-image\=\'true\'\]\]\:tablet\:py_xsmall[data-has-image='true'] {
608
+ padding-block: var(--spacing-xsmall);
609
+ }
610
+ .\[\&\[data-has-image\=\'true\'\]\]\:tablet\:px_medium[data-has-image='true'] {
611
+ padding-inline: var(--spacing-medium);
612
+ }
613
+ }
614
+
615
+ @media screen and (min-width: 48rem) {
616
+ .tabletWide\:w_100\% {
617
+ width: 100%;
618
+ }
619
+ .tabletWide\:max-w_350px {
620
+ max-width: 350px;
621
+ }
622
+ .tabletWide\:max-w_532px {
623
+ max-width: 532px;
624
+ }
625
+ .tabletWide\:flex-d_row {
626
+ flex-direction: row;
627
+ }
628
+ .tabletWide\:jc_space-between {
629
+ justify-content: space-between;
630
+ }
631
+ }
632
+
633
+ @media screen and (min-width: 61.3125rem) {
634
+ .desktop\:w_260px {
635
+ width: 260px;
636
+ }
637
+ .desktop\:h_260px {
638
+ height: 260px;
639
+ }
640
+ }
641
+
642
+ @media screen and (max-width: 47.9975rem) {
643
+ .tabletWideDown\:d_block {
644
+ display: block;
645
+ }
646
+ .tabletWideDown\:max-h_surface\.small {
647
+ max-height: var(--sizes-surface-small);
648
+ }
649
+ .tabletWideDown\:max-w_100\% {
650
+ max-width: 100%;
651
+ }
652
+ .tabletWideDown\:w_100\% {
653
+ width: 100%;
654
+ }
655
+ .tabletWideDown\:h_auto {
656
+ height: auto;
657
+ }
658
+ .tabletWideDown\:d_grid {
659
+ display: grid;
660
+ }
661
+ .tabletWideDown\:py_xsmall {
662
+ padding-block: var(--spacing-xsmall);
663
+ }
664
+ .tabletWideDown\:px_xsmall {
665
+ padding-inline: var(--spacing-xsmall);
666
+ }
667
+ .tabletWideDown\:grid-tc_1fr_repeat\(5\,_auto\)_1fr {
668
+ grid-template-columns: 1fr repeat(5, auto) 1fr;
669
+ }
670
+ .tabletWideDown\:grid-template-areas_\"track_track_track_track_track_track_track\"_\"\._speed_backwards_play_forwards_volume_\.\" {
671
+ grid-template-areas: "track track track track track track track" ". speed backwards play forwards volume .";
672
+ }
673
+ }
674
+
675
+ @media screen and (max-width: 29.7475rem) {
676
+ .mobileWideDown\:cg_3xsmall {
677
+ column-gap: var(--spacing-3xsmall);
678
+ }
679
+ }
680
+
681
+ @media screen and (max-width: 19.9975rem) {
682
+ .mobileDown\:px_xsmall {
683
+ padding-inline: var(--spacing-xsmall);
684
+ }
685
+ }
686
+ }
@@ -8,7 +8,7 @@
8
8
 
9
9
  import { supportedTranslationLanguages } from "../i18n/i18n";
10
10
  const ENV_REGEX = /(staging|test)\.?/;
11
- const LANGUAGE_REGEX = new RegExp("^\\/((?:".concat(supportedTranslationLanguages.join("|"), ")(?:$|\\/))"), "");
11
+ const LANGUAGE_REGEX = new RegExp(`^\\/((?:${supportedTranslationLanguages.join("|")})(?:$|\\/))`, "");
12
12
  const NDLA_URL = /(.*\.)?ndla.no.*/;
13
13
  const REPLACE_WWW = /^www\./;
14
14
  export const getPossiblyRelativeUrl = (url, path) => {
@@ -26,8 +26,8 @@ export const getPossiblyRelativeUrl = (url, path) => {
26
26
  // If the path language part does not exist, remove it.
27
27
  const urlMatch = urlObj.pathname.match(LANGUAGE_REGEX);
28
28
  const pathMatch = pathObj.pathname.match(LANGUAGE_REGEX);
29
- if (urlMatch !== null && urlMatch !== void 0 && urlMatch[1] && (urlMatch === null || urlMatch === void 0 ? void 0 : urlMatch[1]) !== (pathMatch === null || pathMatch === void 0 ? void 0 : pathMatch[1])) {
30
- return urlObj.pathname.replace(urlMatch[1], (pathMatch === null || pathMatch === void 0 ? void 0 : pathMatch[1]) || "");
29
+ if (urlMatch?.[1] && urlMatch?.[1] !== pathMatch?.[1]) {
30
+ return urlObj.pathname.replace(urlMatch[1], pathMatch?.[1] || "");
31
31
  }
32
32
  return urlObj.pathname;
33
33
  }