@ndla/ui 50.6.0 → 50.6.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": "50.6.0",
3
+ "version": "50.6.2",
4
4
  "description": "UI component library for NDLA.",
5
5
  "license": "GPL-3.0",
6
6
  "main": "lib/index.js",
@@ -31,23 +31,23 @@
31
31
  "types"
32
32
  ],
33
33
  "dependencies": {
34
- "@ndla/accordion": "^3.0.14",
35
- "@ndla/button": "^12.0.19",
36
- "@ndla/carousel": "^4.0.20",
37
- "@ndla/core": "^4.3.0",
38
- "@ndla/dropdown-menu": "^1.0.20",
39
- "@ndla/forms": "^5.2.9",
34
+ "@ndla/accordion": "^3.0.15",
35
+ "@ndla/button": "^12.0.20",
36
+ "@ndla/carousel": "^4.0.21",
37
+ "@ndla/core": "^4.3.1",
38
+ "@ndla/dropdown-menu": "^1.0.21",
39
+ "@ndla/forms": "^5.2.10",
40
40
  "@ndla/hooks": "^2.1.4",
41
- "@ndla/icons": "^4.2.6",
41
+ "@ndla/icons": "^5.0.0",
42
42
  "@ndla/licenses": "^7.2.4",
43
- "@ndla/modal": "^5.0.19",
44
- "@ndla/notion": "^6.0.20",
45
- "@ndla/safelink": "^4.1.44",
46
- "@ndla/select": "^3.2.6",
47
- "@ndla/switch": "^1.1.26",
48
- "@ndla/tabs": "^3.2.6",
49
- "@ndla/tooltip": "^6.0.8",
50
- "@ndla/typography": "^0.4.3",
43
+ "@ndla/modal": "^5.0.20",
44
+ "@ndla/notion": "^6.0.21",
45
+ "@ndla/safelink": "^4.1.45",
46
+ "@ndla/select": "^3.2.7",
47
+ "@ndla/switch": "^1.1.27",
48
+ "@ndla/tabs": "^3.2.7",
49
+ "@ndla/tooltip": "^6.0.9",
50
+ "@ndla/typography": "^0.4.4",
51
51
  "@ndla/util": "^4.0.3",
52
52
  "@radix-ui/react-popover": "^1.0.7",
53
53
  "@radix-ui/react-slider": "^1.1.2",
@@ -81,5 +81,5 @@
81
81
  "publishConfig": {
82
82
  "access": "public"
83
83
  },
84
- "gitHead": "3930fca2deff61ba578d6c17b8adf89604ccbe7c"
84
+ "gitHead": "01e39c5380bd6716fe0f0deaa0f095f6fc0f619c"
85
85
  }
@@ -41,7 +41,7 @@ const SearchButton = ({ url, isOembed, searchText }: SearchButtonProps) => {
41
41
  return (
42
42
  <GoalSearchWrapper>
43
43
  <SafeLinkButton variant="outline" to={url} target={isOembed ? '_blank' : '_self'}>
44
- <StyledSearch size="24" />
44
+ <StyledSearch size="normal" />
45
45
  <span>{searchText}</span>
46
46
  </SafeLinkButton>
47
47
  </GoalSearchWrapper>
@@ -30,12 +30,12 @@ const ErrorResourceAccessDenied = ({ onAuthenticateClick }: Props) => {
30
30
  back: t('errorMessage.back'),
31
31
  goToFrontPage: t('errorMessage.goToFrontPage'),
32
32
  }}
33
- illustrationElement={<HumanMaleBoard className="c-icon--large" />}
33
+ illustrationElement={<HumanMaleBoard size="large" />}
34
34
  customElement={
35
35
  <ButtonV2 size="medium" onClick={onAuthenticateClick}>
36
36
  {t('user.buttonLogIn')}
37
37
  <StyledLogInIconWrapper aria-hidden>
38
- <LogIn className="c-icon--medium" />
38
+ <LogIn size="normal" />
39
39
  </StyledLogInIconWrapper>
40
40
  </ButtonV2>
41
41
  }
@@ -37,7 +37,10 @@
37
37
  margin: $spacing 0 $spacing;
38
38
  position: relative;
39
39
  width: 100%;
40
- transition: transform 0.4s, width 0.4s, height 0.4s;
40
+ transition:
41
+ transform 0.4s,
42
+ width 0.4s,
43
+ height 0.4s;
41
44
 
42
45
  &--full-column {
43
46
  left: auto !important;
@@ -235,7 +238,7 @@
235
238
  &__link-wrapper {
236
239
  margin-top: $spacing--small;
237
240
 
238
- .c-icon {
241
+ [data-icon] {
239
242
  margin-left: $spacing--small/2;
240
243
  width: 18px;
241
244
  height: 18px;
@@ -21,6 +21,14 @@ const FileListSection = styled.section`
21
21
  padding: 0 0 ${spacing.normal} ${spacing.normal};
22
22
  border-left: 2px solid ${colors.brand.greyLightest};
23
23
  font-family: ${fonts.sans};
24
+
25
+ [data-icon] {
26
+ margin-top: 3px;
27
+ flex-shrink: 0;
28
+ margin-right: ${spacing.small};
29
+ height: 18px;
30
+ width: 18px;
31
+ }
24
32
  `;
25
33
 
26
34
  const FileListHeaderWrapper = styled.div`
@@ -292,7 +292,7 @@
292
292
  }
293
293
  }
294
294
 
295
- .c-icon {
295
+ [data-icon] {
296
296
  margin-left: $spacing--small;
297
297
  }
298
298
 
@@ -97,6 +97,7 @@ const StyledIntroHeader = styled.h1`
97
97
  const StyledRow = styled.div`
98
98
  display: flex;
99
99
  gap: ${spacing.small};
100
+ align-items: center;
100
101
  `;
101
102
 
102
103
  interface Props {
@@ -63,9 +63,6 @@ const SafeLinkCSS = css`
63
63
  padding: 0;
64
64
  }
65
65
  transition: background 200ms ease;
66
- > .c-icon--medium {
67
- transition: transform 200ms ease;
68
- }
69
66
  div {
70
67
  display: flex;
71
68
  flex-direction: column;
@@ -88,16 +85,6 @@ const SafeLinkCSS = css`
88
85
  box-shadow: none;
89
86
  }
90
87
  }
91
- ${mq.range({ from: breakpoints.tablet })} {
92
- > .c-icon--medium {
93
- transform: translateX(${spacing.xsmall});
94
- }
95
- &:first-of-type {
96
- > .c-icon--medium {
97
- transform: translateX(-${spacing.xsmall});
98
- }
99
- }
100
- }
101
88
  }
102
89
  `;
103
90
 
@@ -123,11 +110,11 @@ export const LearningPathStickySibling = ({ title, toLearningPathUrl, pathId, st
123
110
  css={SafeLinkCSS}
124
111
  aria-label={arrow === 'left' ? t('learningPath.previousArrow') : t('learningPath.nextArrow')}
125
112
  >
126
- {arrow === 'left' && <Back className="c-icon--medium" />}
113
+ {arrow === 'left' && <Back size="normal" />}
127
114
  <div>
128
115
  <StyledTitle>{title}</StyledTitle>
129
116
  </div>
130
- {arrow === 'right' && <Forward className="c-icon--medium" />}
117
+ {arrow === 'right' && <Forward size="normal" />}
131
118
  </SafeLink>
132
119
  );
133
120
  };
@@ -32,13 +32,13 @@ const renderAdditionalIcon = (label: string, isAdditional?: boolean): ReactEleme
32
32
  return (
33
33
  <Tooltip tooltip={label}>
34
34
  <div>
35
- <Additional className="c-icon--20" aria-hidden={false} />
35
+ <Additional size="normal" aria-hidden={false} />
36
36
  </div>
37
37
  </Tooltip>
38
38
  );
39
39
  }
40
40
  if (isAdditional) {
41
- return <Additional className="c-icon--20" />;
41
+ return <Additional size="normal" />;
42
42
  }
43
43
  return null;
44
44
  };
@@ -223,9 +223,9 @@ const StyledBreadcrumb = styled.div`
223
223
  ${mq.range({ from: breakpoints.desktop })} {
224
224
  ${fonts.sizes('16px', '24px')};
225
225
  }
226
- .c-icon {
227
- width: 12px;
228
- height: 12px;
226
+ [data-icon] {
227
+ width: ${spacing.small};
228
+ height: ${spacing.small};
229
229
  margin: 0 ${spacingUnit / 3}px;
230
230
 
231
231
  ${mq.range({ from: breakpoints.desktop })} {
@@ -298,7 +298,7 @@ const SearchResultSleeve = ({
298
298
  <StyledScrollableContent extendHeight={frontpage ? 0 : 52}>
299
299
  {infoText && (
300
300
  <StyledAside>
301
- <Wrench className="c-icon--22" />
301
+ <Wrench size="normal" />
302
302
  <span>{infoText}</span>
303
303
  </StyledAside>
304
304
  )}
@@ -309,7 +309,7 @@ const SearchResultSleeve = ({
309
309
  to={allResultUrl}
310
310
  tabIndex={-1}
311
311
  >
312
- <SearchIcon className="c-icon--22" />
312
+ <SearchIcon size="normal" />
313
313
  <strong ref={searchAllRef}>{searchString}</strong>
314
314
  <small>{t('welcomePage.searchAllInfo')}</small>
315
315
  </StyledSearchLink>
@@ -319,7 +319,7 @@ const SearchResultSleeve = ({
319
319
  to={suggestionUrl}
320
320
  tabIndex={-1}
321
321
  >
322
- <SearchIcon className="c-icon--22" />
322
+ <SearchIcon size="normal" />
323
323
  <small>{t('searchPage.resultType.searchPhraseSuggestion')}</small>
324
324
  <strong ref={searchSuggestionRef}>{suggestion}</strong>
325
325
  </StyledSearchLink>
@@ -259,7 +259,7 @@
259
259
  @include font-size(16px, 24px);
260
260
  }
261
261
 
262
- .c-icon {
262
+ [data-icon] {
263
263
  width: 12px;
264
264
  height: 12px;
265
265
  margin: 0 $spacing--small/3;
package/src/all.scss CHANGED
@@ -1,4 +1,3 @@
1
1
  @import '~@ndla/core/scss/core';
2
- @import '~@ndla/icons/scss/icons';
3
2
  @import './main';
4
3
  @import '~@ndla/core/scss/utilities';