@ndla/ui 34.3.0 → 34.3.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ndla/ui",
3
- "version": "34.3.0",
3
+ "version": "34.3.2",
4
4
  "description": "UI component library for NDLA.",
5
5
  "license": "GPL-3.0",
6
6
  "main": "lib/index.js",
@@ -35,14 +35,14 @@
35
35
  "@ndla/button": "^9.1.0",
36
36
  "@ndla/carousel": "^3.0.1",
37
37
  "@ndla/core": "^3.1.0",
38
- "@ndla/forms": "^4.2.2",
38
+ "@ndla/forms": "^4.2.3",
39
39
  "@ndla/hooks": "^1.2.0",
40
40
  "@ndla/icons": "^2.2.1",
41
41
  "@ndla/licenses": "^6.2.0",
42
42
  "@ndla/modal": "^2.2.4",
43
43
  "@ndla/notion": "^4.1.17",
44
44
  "@ndla/safelink": "^4.0.5",
45
- "@ndla/switch": "^1.0.4",
45
+ "@ndla/switch": "^1.0.5",
46
46
  "@ndla/tabs": "^2.1.3",
47
47
  "@ndla/tooltip": "^4.0.6",
48
48
  "@ndla/types-learningpath-api": "^0.0.17",
@@ -83,5 +83,5 @@
83
83
  "publishConfig": {
84
84
  "access": "public"
85
85
  },
86
- "gitHead": "088cbb476fa7226e798f349b6bdf8396cb81c6c9"
86
+ "gitHead": "5f444dfeaa65961315bb9444e39e871ade20e9ff"
87
87
  }
@@ -25,18 +25,18 @@ const PopoverContent = styled(Content)`
25
25
  display: flex;
26
26
  flex-direction: column;
27
27
  overflow: hidden;
28
- background-color: ${colors.brand.greyLightest};
28
+ background-color: ${colors.white};
29
29
  border-radius: ${spacing.small};
30
30
  border: 1px solid ${colors.brand.tertiary};
31
31
  fill: ${colors.brand.tertiary};
32
32
  `;
33
33
 
34
34
  const LanguageChoice = styled(ButtonV2)`
35
- padding: ${spacing.small};
36
- border-radius: 0;
37
- gap: ${spacing.normal};
38
- justify-content: space-between;
39
- border: 0;
35
+ padding: ${spacing.small} ${spacing.normal} ${spacing.small} ${spacing.nsmall};
36
+ justify-content: flex-start;
37
+ gap: ${spacing.small};
38
+ border: none;
39
+ outline: none;
40
40
  :not(:last-of-type) {
41
41
  border-bottom: 1px solid ${colors.brand.tertiary};
42
42
  }
@@ -74,7 +74,7 @@ const LanguageSelector = <T extends string>({ locales, onSelect, inverted }: Pro
74
74
  </ButtonV2>
75
75
  </Trigger>
76
76
  <Portal>
77
- <PopoverContent>
77
+ <PopoverContent sideOffset={4}>
78
78
  <Arrow aria-hidden />
79
79
  {locales.map((locale) => (
80
80
  <Item asChild key={locale}>
@@ -82,10 +82,11 @@ const LanguageSelector = <T extends string>({ locales, onSelect, inverted }: Pro
82
82
  role="link"
83
83
  aria-current={i18n.language === locale}
84
84
  variant="ghost"
85
+ shape="sharp"
85
86
  aria-label={t(`changeLanguage.${locale}`)}
86
87
  onClick={() => onSelect(locale)}>
87
- <Text>{t(`languages.${locale}`)}</Text>
88
88
  <ActivityIndicator>{i18n.language === locale && <ActiveIndicator />}</ActivityIndicator>
89
+ <Text>{t(`languages.${locale}`)}</Text>
89
90
  </LanguageChoice>
90
91
  </Item>
91
92
  ))}
@@ -1,4 +1,4 @@
1
- import React, { MouseEvent, ChangeEventHandler } from 'react';
1
+ import React, { MouseEvent } from 'react';
2
2
  import styled from '@emotion/styled';
3
3
  import { SafeLinkButton } from '@ndla/safelink';
4
4
  import { ButtonV2 } from '@ndla/button';
@@ -196,7 +196,7 @@ type Props = {
196
196
  showAdditionalResources?: boolean;
197
197
  listDirection?: listProps['direction'];
198
198
  invertedStyle?: boolean;
199
- onToggleAdditionalResources?: ChangeEventHandler<HTMLInputElement>;
199
+ onToggleAdditionalResources?: (checked: boolean) => void;
200
200
  };
201
201
 
202
202
  export const NavigationBox = ({