@ndla/ui 34.6.4 → 34.6.6

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 (90) hide show
  1. package/es/AudioPlayer/AudioPlayer.js +19 -19
  2. package/es/ErrorMessage/ErrorResourceAccessDenied.js +3 -3
  3. package/es/FactBox/FactBox.js +3 -3
  4. package/es/Figure/Figure.js +8 -10
  5. package/es/Filter/FilterButtons.js +20 -23
  6. package/es/Filter/FilterListPhone.js +7 -7
  7. package/es/Footer/FooterAuth.js +12 -11
  8. package/es/Frontpage/FrontpageProgramMenu.js +16 -16
  9. package/es/LearningPaths/LearningPathMenuModalWrapper.js +3 -3
  10. package/es/Navigation/NavigationTopicAbout.js +17 -17
  11. package/es/NoContentBox/NoContentBox.js +3 -3
  12. package/es/RelatedArticleList/RelatedArticleList.js +3 -3
  13. package/es/Search/ContentTypeResult.js +5 -4
  14. package/es/Search/ToggleSearchButton.js +4 -4
  15. package/es/SearchTypeResult/ActiveFilters.js +9 -10
  16. package/es/SearchTypeResult/PopupFilter.js +14 -14
  17. package/es/SearchTypeResult/ResultNavigation.js +9 -9
  18. package/es/SearchTypeResult/SearchHeader.js +11 -11
  19. package/es/SearchTypeResult/SearchNotionItem.js +18 -18
  20. package/es/SearchTypeResult/SearchTypeHeader.js +13 -13
  21. package/es/SearchTypeResult/SearchViewType.js +9 -8
  22. package/es/SearchTypeResult/components/SubjectFilters.js +5 -5
  23. package/es/User/AuthModal.js +9 -9
  24. package/es/locale/messages-en.js +3 -2
  25. package/es/locale/messages-nb.js +2 -1
  26. package/es/locale/messages-nn.js +2 -1
  27. package/es/locale/messages-se.js +2 -1
  28. package/es/locale/messages-sma.js +3 -2
  29. package/lib/AudioPlayer/AudioPlayer.js +19 -19
  30. package/lib/ErrorMessage/ErrorResourceAccessDenied.js +3 -3
  31. package/lib/FactBox/FactBox.js +3 -3
  32. package/lib/Figure/Figure.js +8 -10
  33. package/lib/Filter/FilterButtons.js +20 -23
  34. package/lib/Filter/FilterListPhone.js +7 -7
  35. package/lib/Footer/FooterAuth.js +12 -11
  36. package/lib/Frontpage/FrontpageProgramMenu.js +16 -16
  37. package/lib/LearningPaths/LearningPathMenuModalWrapper.js +3 -3
  38. package/lib/Navigation/NavigationTopicAbout.js +17 -17
  39. package/lib/NoContentBox/NoContentBox.js +3 -3
  40. package/lib/RelatedArticleList/RelatedArticleList.js +3 -3
  41. package/lib/Search/ContentTypeResult.js +5 -4
  42. package/lib/Search/ToggleSearchButton.js +4 -4
  43. package/lib/SearchTypeResult/ActiveFilters.js +9 -10
  44. package/lib/SearchTypeResult/PopupFilter.js +14 -14
  45. package/lib/SearchTypeResult/ResultNavigation.js +9 -9
  46. package/lib/SearchTypeResult/SearchHeader.js +11 -11
  47. package/lib/SearchTypeResult/SearchNotionItem.js +18 -18
  48. package/lib/SearchTypeResult/SearchTypeHeader.js +13 -13
  49. package/lib/SearchTypeResult/SearchViewType.js +9 -8
  50. package/lib/SearchTypeResult/components/SubjectFilters.js +5 -5
  51. package/lib/User/AuthModal.js +9 -9
  52. package/lib/locale/messages-en.d.ts +1 -0
  53. package/lib/locale/messages-en.js +3 -2
  54. package/lib/locale/messages-nb.d.ts +1 -0
  55. package/lib/locale/messages-nb.js +2 -1
  56. package/lib/locale/messages-nn.d.ts +1 -0
  57. package/lib/locale/messages-nn.js +2 -1
  58. package/lib/locale/messages-se.d.ts +1 -0
  59. package/lib/locale/messages-se.js +2 -1
  60. package/lib/locale/messages-sma.d.ts +1 -0
  61. package/lib/locale/messages-sma.js +3 -2
  62. package/package.json +2 -2
  63. package/src/AudioPlayer/AudioPlayer.tsx +9 -9
  64. package/src/ErrorMessage/ErrorResourceAccessDenied.tsx +3 -3
  65. package/src/FactBox/FactBox.tsx +3 -3
  66. package/src/Figure/Figure.tsx +7 -13
  67. package/src/Filter/FilterButtons.tsx +12 -14
  68. package/src/Filter/FilterListPhone.tsx +7 -7
  69. package/src/Footer/FooterAuth.tsx +4 -4
  70. package/src/Frontpage/FrontpageProgramMenu.tsx +13 -5
  71. package/src/LearningPaths/LearningPathMenuModalWrapper.tsx +3 -3
  72. package/src/Navigation/NavigationTopicAbout.tsx +4 -4
  73. package/src/NoContentBox/NoContentBox.tsx +3 -3
  74. package/src/RelatedArticleList/RelatedArticleList.tsx +4 -4
  75. package/src/Search/ContentTypeResult.tsx +5 -4
  76. package/src/Search/ToggleSearchButton.tsx +2 -2
  77. package/src/SearchTypeResult/ActiveFilters.tsx +4 -5
  78. package/src/SearchTypeResult/PopupFilter.tsx +9 -9
  79. package/src/SearchTypeResult/ResultNavigation.tsx +5 -5
  80. package/src/SearchTypeResult/SearchHeader.tsx +3 -3
  81. package/src/SearchTypeResult/SearchNotionItem.tsx +5 -5
  82. package/src/SearchTypeResult/SearchTypeHeader.tsx +5 -5
  83. package/src/SearchTypeResult/SearchViewType.tsx +5 -4
  84. package/src/SearchTypeResult/components/SubjectFilters.tsx +3 -3
  85. package/src/User/AuthModal.tsx +3 -3
  86. package/src/locale/messages-en.ts +3 -2
  87. package/src/locale/messages-nb.ts +2 -1
  88. package/src/locale/messages-nn.ts +2 -1
  89. package/src/locale/messages-se.ts +2 -1
  90. package/src/locale/messages-sma.ts +3 -2
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  import styled from '@emotion/styled';
10
- import Button from '@ndla/button';
10
+ import { ButtonV2 } from '@ndla/button';
11
11
  import { animations, colors, fonts, spacing } from '@ndla/core';
12
12
  import { ChevronDown, FeideText, LogIn, LogOut } from '@ndla/icons/common';
13
13
  import React from 'react';
@@ -44,7 +44,7 @@ const StyledButtonWrapper = styled.div`
44
44
  margin-top: ${spacing.normal};
45
45
  `;
46
46
 
47
- const LoginButton = styled(Button)`
47
+ const LoginButton = styled(ButtonV2)`
48
48
  background: #222222;
49
49
  border-color: ${colors.text.light};
50
50
  `;
@@ -53,7 +53,7 @@ const StyledLogInIconWrapper = styled.span`
53
53
  margin-left: ${spacing.xsmall};
54
54
  `;
55
55
 
56
- const AuthedButton = styled(Button)`
56
+ const AuthedButton = styled(ButtonV2)`
57
57
  color: #ffffff;
58
58
  transition: all ${animations.durations.fast} ease-in-out;
59
59
  &:hover,
@@ -79,7 +79,7 @@ const FooterAuth = ({ isAuthenticated, user, onAuthenticateClick, ...rest }: Aut
79
79
  user={user}
80
80
  onAuthenticateClick={onAuthenticateClick}
81
81
  activateButton={
82
- <AuthedButton ghostPill size="medium">
82
+ <AuthedButton variant="ghost" shape="pill" size="medium">
83
83
  {t('user.loggedInAsButton', { role: user?.eduPersonPrimaryAffiliation })}
84
84
  <ChevronDown />
85
85
  </AuthedButton>
@@ -1,6 +1,6 @@
1
1
  import React, { useEffect, useState } from 'react';
2
2
  import styled from '@emotion/styled';
3
- import Button from '@ndla/button';
3
+ import { ButtonV2 } from '@ndla/button';
4
4
  import { fonts, breakpoints, mq } from '@ndla/core';
5
5
  import { useTranslation } from 'react-i18next';
6
6
  import NavigationBox, { ItemProps } from '../Navigation/NavigationBox';
@@ -112,12 +112,20 @@ const FrontpageProgramMenu = ({ programItems, subjectCategories, showBetaCursor
112
112
  return (
113
113
  <StyledWrapper>
114
114
  <StyledMenu>
115
- <Button onClick={() => toggleSubjects(false)} lighter={showSubjects} size="medium" borderShape="rounded">
115
+ <ButtonV2
116
+ onClick={() => toggleSubjects(false)}
117
+ colorTheme={showSubjects ? 'lighter' : undefined}
118
+ size="medium"
119
+ shape="pill">
116
120
  <StyledMenuItem>{t('frontpageMenu.program')}</StyledMenuItem>
117
- </Button>
118
- <Button onClick={() => toggleSubjects(true)} lighter={!showSubjects} size="medium" borderShape="rounded">
121
+ </ButtonV2>
122
+ <ButtonV2
123
+ onClick={() => toggleSubjects(true)}
124
+ colorTheme={!showSubjects ? 'lighter' : undefined}
125
+ size="medium"
126
+ shape="pill">
119
127
  <StyledMenuItem>{t('frontpageMenu.allsubjects')}</StyledMenuItem>
120
- </Button>
128
+ </ButtonV2>
121
129
  {showBetaCursor && (
122
130
  <CursorPlaceholder aria-hidden="true">
123
131
  <CursorWrapper>
@@ -10,7 +10,7 @@ import React, { ReactChild, ReactChildren, ReactNode } from 'react';
10
10
  import { spacing, mq, breakpoints } from '@ndla/core';
11
11
  import Modal, { ModalHeader, ModalBody, ModalCloseButton } from '@ndla/modal';
12
12
  import { css } from '@emotion/react';
13
- import Button from '@ndla/button';
13
+ import { ButtonV2 } from '@ndla/button';
14
14
  import { LearningPath } from '@ndla/icons/contentType';
15
15
  import { useTranslation } from 'react-i18next';
16
16
 
@@ -43,10 +43,10 @@ const ModalWrapperComponent = ({ innerWidth, children }: ModalWrapperProps) => {
43
43
  animationDuration={200}
44
44
  size="fullscreen"
45
45
  activateButton={
46
- <Button css={buttonToggleCss}>
46
+ <ButtonV2 css={buttonToggleCss}>
47
47
  <LearningPath />
48
48
  <span>{t('learningPath.openMenuTooltip')}</span>
49
- </Button>
49
+ </ButtonV2>
50
50
  }>
51
51
  {(closeModal: VoidFunction) => (
52
52
  <>
@@ -3,7 +3,7 @@ import parse from 'html-react-parser';
3
3
  import styled from '@emotion/styled';
4
4
  import { breakpoints, colors, fonts, mq, spacing } from '@ndla/core';
5
5
  import { css } from '@emotion/react';
6
- import Button from '@ndla/button';
6
+ import { ButtonV2 } from '@ndla/button';
7
7
  import { ChevronDown, ChevronUp } from '@ndla/icons/common';
8
8
  import { useTranslation } from 'react-i18next';
9
9
 
@@ -145,9 +145,9 @@ export const NavigationTopicAbout = ({
145
145
  <StyledIngress invertedStyle={invertedStyle}>
146
146
  {parse(renderMarkdown(introduction))}
147
147
  <StyledButtonWrapper invertedStyle={invertedStyle}>
148
- <Button
148
+ <ButtonV2
149
149
  aria-expanded={!!showContent}
150
- link
150
+ variant="link"
151
151
  onClick={() => {
152
152
  onToggleShowContent();
153
153
  }}>
@@ -160,7 +160,7 @@ export const NavigationTopicAbout = ({
160
160
  {t('navigation.showLongerDescription')} <ChevronDown />
161
161
  </>
162
162
  )}
163
- </Button>
163
+ </ButtonV2>
164
164
  </StyledButtonWrapper>
165
165
  </StyledIngress>
166
166
  {showContent && <StyledContentWrapper invertedStyle={invertedStyle}>{children}</StyledContentWrapper>}
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  import React from 'react';
10
- import Button from '@ndla/button';
10
+ import { ButtonV2 } from '@ndla/button';
11
11
 
12
12
  interface Props {
13
13
  onClick?: () => void;
@@ -21,9 +21,9 @@ export const NoContentBox = ({ buttonText, text, onClick }: Props) => (
21
21
  <div>
22
22
  <p>{text}</p>
23
23
  {onClick && (
24
- <Button outline onClick={onClick}>
24
+ <ButtonV2 variant="outline" onClick={onClick}>
25
25
  {buttonText}
26
- </Button>
26
+ </ButtonV2>
27
27
  )}
28
28
  </div>
29
29
  </span>
@@ -1,6 +1,6 @@
1
1
  import React, { Children, cloneElement, ReactElement } from 'react';
2
2
  import BEMHelper from 'react-bem-helper';
3
- import Button from '@ndla/button';
3
+ import { ButtonV2 } from '@ndla/button';
4
4
  import SafeLink from '@ndla/safelink';
5
5
  import SectionHeading from '../SectionHeading';
6
6
  import { HeadingLevel } from '../types';
@@ -79,13 +79,13 @@ const RelatedArticleList = ({ messages, children, articleCount, dangerouslySetIn
79
79
  {clonedChildren}
80
80
  </div>
81
81
  {childrenCount > 2 && (
82
- <Button
82
+ <ButtonV2
83
83
  data-type="related-article-button"
84
84
  data-showmore={messages.showMore}
85
85
  data-showless={messages.showLess}
86
- outline>
86
+ variant="outline">
87
87
  {messages.showMore}
88
- </Button>
88
+ </ButtonV2>
89
89
  )}
90
90
  </section>
91
91
  );
@@ -1,4 +1,4 @@
1
- import Button from '@ndla/button';
1
+ import { ButtonV2 } from '@ndla/button';
2
2
  import { Additional, ChevronDown, ChevronUp } from '@ndla/icons/common';
3
3
  import SafeLink from '@ndla/safelink';
4
4
  import Tooltip from '@ndla/tooltip';
@@ -150,15 +150,16 @@ const ContentTypeResult = ({
150
150
  })}
151
151
  {displayShowAllButton && (
152
152
  <StyledListItem ref={showAllRef}>
153
- <Button
154
- ghostPill
153
+ <ButtonV2
154
+ variant="ghost"
155
+ shape="pill"
155
156
  css={[showAllButtonStyle, shouldHighlightShowAllButton && noWidthhighlightStyle]}
156
157
  data-highlighted={shouldHighlightShowAllButton}
157
158
  onClick={() => toggleShowAll(!showAll)}
158
159
  tabIndex={-1}>
159
160
  {showAll ? messages.showLessResultLabel : messages.allResultLabel}
160
161
  {showAll ? <ChevronUp /> : <ChevronDown />}
161
- </Button>
162
+ </ButtonV2>
162
163
  </StyledListItem>
163
164
  )}
164
165
  </StyledList>
@@ -9,7 +9,7 @@
9
9
  import React from 'react';
10
10
  import { spacing, spacingUnit, breakpoints, mq, misc, fonts, colors } from '@ndla/core';
11
11
  import { Search } from '@ndla/icons/common';
12
- import Button, { ButtonProps } from '@ndla/button';
12
+ import { ButtonProps, ButtonV2 } from '@ndla/button';
13
13
  import styled from '@emotion/styled';
14
14
 
15
15
  interface Props extends ButtonProps {
@@ -24,7 +24,7 @@ interface StyledButtonProps {
24
24
  ndlaFilm?: boolean;
25
25
  }
26
26
 
27
- const StyledButton = styled(Button)<StyledButtonProps>`
27
+ const StyledButton = styled(ButtonV2)<StyledButtonProps>`
28
28
  background: ${(p) => (p.ndlaFilm ? colors.ndlaFilm.filmColorBright : colors.brand.greyLighter)};
29
29
  border-radius: ${misc.borderRadius};
30
30
  border: 0;
@@ -12,7 +12,7 @@ import styled from '@emotion/styled';
12
12
  import { css } from '@emotion/react';
13
13
  import { spacing, mq, breakpoints } from '@ndla/core';
14
14
  import Tooltip from '@ndla/tooltip';
15
- import Button from '@ndla/button';
15
+ import { ButtonV2 } from '@ndla/button';
16
16
  import ActiveFilterContent, { FilterProps, StyledActiveFilterTitle } from './ActiveFilterContent';
17
17
 
18
18
  type StyledActiveFiltersProps = {
@@ -138,20 +138,19 @@ const ActiveFilters = ({
138
138
  {filterLength > showFilterCount && (
139
139
  <StyledActiveFilterWrapper>
140
140
  <Tooltip tooltip={t('searchPage.searchFilterMessages.noValuesButtonText')}>
141
- <Button
141
+ <ButtonV2
142
142
  aria-label={t('searchPage.searchFilterMessages.additionalSubjectFilters', {
143
143
  count: filterLength - showFilterCount + 1,
144
144
  })}
145
- type="button"
146
145
  size="normal"
147
- borderShape="rounded"
146
+ shape="pill"
148
147
  onClick={onClickShowHiddenSubjects}>
149
148
  <StyledActiveFilterTitle>
150
149
  {t('searchPage.searchFilterMessages.additionalSubjectFilters', {
151
150
  count: filterLength - showFilterCount + 1,
152
151
  })}
153
152
  </StyledActiveFilterTitle>
154
- </Button>
153
+ </ButtonV2>
155
154
  </Tooltip>
156
155
  </StyledActiveFilterWrapper>
157
156
  )}
@@ -10,7 +10,7 @@ import React, { useState } from 'react';
10
10
  import styled from '@emotion/styled';
11
11
  import Modal, { ModalCloseButton, ModalBody } from '@ndla/modal';
12
12
  import { breakpoints, fonts, mq, spacing } from '@ndla/core';
13
- import Button from '@ndla/button';
13
+ import { ButtonV2 } from '@ndla/button';
14
14
  import { useTranslation } from 'react-i18next';
15
15
  import { ToggleItem } from '../Filter';
16
16
 
@@ -113,23 +113,23 @@ const PopupFilter = ({
113
113
  </ModalHeaderWrapper>
114
114
  {subjectCategories && programmes && (
115
115
  <MainFilterButtonWrapper>
116
- <Button
116
+ <ButtonV2
117
117
  onClick={() => setSelectedMenu(MENU_ALL_SUBJECTS)}
118
- lighter={selectedMenu !== MENU_ALL_SUBJECTS}
118
+ colorTheme={selectedMenu !== MENU_ALL_SUBJECTS ? 'lighter' : undefined}
119
119
  size="normal"
120
- borderShape="rounded">
120
+ shape="pill">
121
121
  {t('frontpageMenu.allsubjects')}
122
- </Button>
122
+ </ButtonV2>
123
123
  </MainFilterButtonWrapper>
124
124
  )}
125
125
  {programmes && (
126
- <Button
126
+ <ButtonV2
127
127
  onClick={() => setSelectedMenu(MENU_PROGRAMMES)}
128
- lighter={selectedMenu !== MENU_PROGRAMMES}
128
+ colorTheme={selectedMenu !== MENU_PROGRAMMES ? 'lighter' : undefined}
129
129
  size="normal"
130
- borderShape="rounded">
130
+ shape="pill">
131
131
  {t('frontpageMenu.program')}
132
- </Button>
132
+ </ButtonV2>
133
133
  )}
134
134
  {selectedMenu === MENU_ALL_SUBJECTS && subjectCategories && (
135
135
  <FrontpageAllSubjects
@@ -8,7 +8,7 @@
8
8
 
9
9
  import React from 'react';
10
10
  import styled from '@emotion/styled';
11
- import Button from '@ndla/button';
11
+ import { ButtonV2 } from '@ndla/button';
12
12
  import { fonts, spacing, colors } from '@ndla/core';
13
13
  import { useTranslation } from 'react-i18next';
14
14
 
@@ -91,13 +91,13 @@ const ResultNavigation = ({ onShowMore, totalCount, toCount, contentType = '', t
91
91
  <Progress width={progress} />
92
92
  </ProgressBar>
93
93
  {isMore ? (
94
- <Button className="nav" outline onClick={onShowMore} aria-describedby={`searchitem-header-${type}`}>
94
+ <ButtonV2 className="nav" variant="outline" onClick={onShowMore} aria-describedby={`searchitem-header-${type}`}>
95
95
  {t('searchPage.resultType.showMore')}
96
- </Button>
96
+ </ButtonV2>
97
97
  ) : (
98
- <Button className="nav" outline onClick={onToTopHandler}>
98
+ <ButtonV2 className="nav" variant="outline" onClick={onToTopHandler}>
99
99
  {t('searchPage.resultType.toTopOfPage')}
100
- </Button>
100
+ </ButtonV2>
101
101
  )}
102
102
  </ResultNav>
103
103
  );
@@ -9,7 +9,7 @@ import React, { FormEvent, useEffect, useState } from 'react';
9
9
  import { useTranslation } from 'react-i18next';
10
10
  import styled from '@emotion/styled';
11
11
  import { breakpoints, fonts, mq, spacing } from '@ndla/core';
12
- import Button from '@ndla/button';
12
+ import { ButtonV2 } from '@ndla/button';
13
13
 
14
14
  import SearchFieldHeader from './SearchFieldHeader';
15
15
  import { CompetenceGoalsItemType } from '../types';
@@ -131,9 +131,9 @@ const SearchHeader = ({
131
131
  {searchPhraseSuggestion && (
132
132
  <PhraseSuggestionText>
133
133
  {t('searchPage.resultType.searchPhraseSuggestion')}{' '}
134
- <Button link onClick={searchPhraseSuggestionOnClick}>
134
+ <ButtonV2 variant="link" onClick={searchPhraseSuggestionOnClick}>
135
135
  [{searchPhraseSuggestion}]
136
- </Button>
136
+ </ButtonV2>
137
137
  </PhraseSuggestionText>
138
138
  )}
139
139
  {!!competenceGoals?.length && (
@@ -12,7 +12,7 @@ import parse from 'html-react-parser';
12
12
 
13
13
  import { breakpoints, colors, fonts, mq, spacing } from '@ndla/core';
14
14
  import { getLicenseByAbbreviation } from '@ndla/licenses';
15
- import Button from '@ndla/button';
15
+ import { ButtonV2 } from '@ndla/button';
16
16
  import { Play } from '@ndla/icons/common';
17
17
  import { ArrowExpand } from '@ndla/icons/editor';
18
18
  import Modal, { ModalCloseButton, ModalHeader, ModalBody } from '@ndla/modal';
@@ -147,13 +147,13 @@ const SearchNotionItem = ({
147
147
  <ShowMediaButtonWrapper>
148
148
  <Modal
149
149
  activateButton={
150
- <Button lighter size="xsmall" borderShape="rounded">
150
+ <ButtonV2 colorTheme="lighter" size="xsmall" shape="pill">
151
151
  <>
152
152
  {type === 'video' && <Play />}
153
153
  {type === 'other' && <ArrowExpand />}
154
154
  <ShowMediaButtonText>{t('searchPage.resultType.showVideo')}</ShowMediaButtonText>
155
155
  </>
156
- </Button>
156
+ </ButtonV2>
157
157
  }
158
158
  animation="subtle"
159
159
  animationDuration={50}
@@ -193,9 +193,9 @@ const SearchNotionItem = ({
193
193
  {authors.length > 0 && license && ' '}
194
194
  {license && `(${getLicenseByAbbreviation(license, locale).abbreviation})`}
195
195
  {onReferenceClick && (
196
- <Button link onClick={onReferenceClick}>
196
+ <ButtonV2 variant="link" onClick={onReferenceClick}>
197
197
  {t('article.cite')}
198
- </Button>
198
+ </ButtonV2>
199
199
  )}
200
200
  </p>
201
201
  }
@@ -8,7 +8,7 @@
8
8
 
9
9
  import React, { MouseEvent, memo } from 'react';
10
10
  import styled from '@emotion/styled';
11
- import Button from '@ndla/button';
11
+ import { ButtonV2 } from '@ndla/button';
12
12
  import { breakpoints, fonts, mq, spacing } from '@ndla/core';
13
13
  import { useTranslation } from 'react-i18next';
14
14
  import { Cross } from '@ndla/icons/action';
@@ -111,11 +111,11 @@ const SearchTypeHeader = ({ filters = [], onFilterClick, totalCount, type }: Pro
111
111
  <CategoryItems>
112
112
  {filters.map((option: FilterOptionsType) => (
113
113
  <CategoryTypeButtonWrapper key={option.id}>
114
- <Button
114
+ <ButtonV2
115
115
  aria-current={option.active}
116
116
  size="xsmall"
117
- borderShape="rounded"
118
- greyLighter={!option.active}
117
+ shape="pill"
118
+ colorTheme={!option.active ? 'greyLighter' : undefined}
119
119
  onClick={(e: MouseEvent<HTMLButtonElement>) => {
120
120
  if (e.currentTarget && option.active) {
121
121
  e.currentTarget.blur();
@@ -128,7 +128,7 @@ const SearchTypeHeader = ({ filters = [], onFilterClick, totalCount, type }: Pro
128
128
  <Cross />
129
129
  </CategoryTypeCrossWrapper>
130
130
  )}
131
- </Button>
131
+ </ButtonV2>
132
132
  </CategoryTypeButtonWrapper>
133
133
  ))}
134
134
  </CategoryItems>
@@ -8,7 +8,7 @@
8
8
 
9
9
  import React from 'react';
10
10
  import styled from '@emotion/styled';
11
- import Button from '@ndla/button';
11
+ import { ButtonV2 } from '@ndla/button';
12
12
  import { Grid } from '@ndla/icons/common';
13
13
  import { ListCircle } from '@ndla/icons/editor';
14
14
  import { animations, breakpoints, colors, mq } from '@ndla/core';
@@ -32,7 +32,7 @@ const ButtonContainer = styled.div`
32
32
  width: 44px;
33
33
  height: 44px;
34
34
  `;
35
- const ButtonElement = styled(Button)`
35
+ const ButtonElement = styled(ButtonV2)`
36
36
  border-radius: 50%;
37
37
  padding: 2px;
38
38
  width: 100%;
@@ -81,7 +81,8 @@ const SearchViewType = ({ viewType, onChangeViewType }: SearchViewTypeProps) =>
81
81
  <Wrapper>
82
82
  <ButtonContainer>
83
83
  <ButtonElement
84
- stripped
84
+ variant="stripped"
85
+ colorTheme="greyLighter"
85
86
  type="button"
86
87
  size="normal"
87
88
  title={t('searchPage.resultType.gridView')}
@@ -93,7 +94,7 @@ const SearchViewType = ({ viewType, onChangeViewType }: SearchViewTypeProps) =>
93
94
  </ButtonContainer>
94
95
  <ButtonContainer>
95
96
  <ButtonElement
96
- stripped
97
+ variant="stripped"
97
98
  size="normal"
98
99
  title={t('searchPage.resultType.listView')}
99
100
  onClick={() => onClickHandler('list')}>
@@ -9,7 +9,7 @@
9
9
  import React, { useEffect, useRef, useState } from 'react';
10
10
  import { useTranslation } from 'react-i18next';
11
11
  import styled from '@emotion/styled';
12
- import Button from '@ndla/button';
12
+ import { ButtonV2 } from '@ndla/button';
13
13
  import { Plus as PlusIcon } from '@ndla/icons/action';
14
14
 
15
15
  import PopupFilter, { PopupFilterProps } from '../PopupFilter';
@@ -106,10 +106,10 @@ const SubjectFilters = ({ filters, activeFilters, isNarrowScreen }: SubjectFilte
106
106
  };
107
107
 
108
108
  const OpenModalButton = () => (
109
- <Button type="button" size="normal" greyLighter borderShape="rounded" onClick={handlePopupOpen}>
109
+ <ButtonV2 type="button" size="normal" colorTheme="greyLighter" shape="pill" onClick={handlePopupOpen}>
110
110
  <FilterButtonText>{t('searchPage.searchFilterMessages.noValuesButtonText')}</FilterButtonText>
111
111
  <PlusIcon />
112
- </Button>
112
+ </ButtonV2>
113
113
  );
114
114
 
115
115
  const ActiveFiltersElement = ({ showModalButton }: { showModalButton?: boolean }) => {
@@ -10,7 +10,7 @@ import React, { ReactElement, ReactNode } from 'react';
10
10
  import styled from '@emotion/styled';
11
11
  import { useTranslation } from 'react-i18next';
12
12
  import Modal, { ModalCloseButton } from '@ndla/modal';
13
- import Button from '@ndla/button';
13
+ import { ButtonV2 } from '@ndla/button';
14
14
  import { FeideText, LogIn, LogOut, HumanMaleBoard } from '@ndla/icons/common';
15
15
  import { fonts, spacing } from '@ndla/core';
16
16
  import { UserInfo } from './UserInfo';
@@ -105,12 +105,12 @@ const AuthModal = ({
105
105
  </p>
106
106
  )}
107
107
  <StyledButtonWrapper>
108
- <Button size="medium" onClick={onAuthenticateClick}>
108
+ <ButtonV2 size="medium" onClick={onAuthenticateClick}>
109
109
  {isAuthenticated ? t('user.buttonLogOut') : t('user.buttonLogIn')}
110
110
  <StyledLogInIconWrapper aria-hidden>
111
111
  {isAuthenticated ? <LogOut className="c-icon--medium" /> : <LogIn className="c-icon--medium" />}
112
112
  </StyledLogInIconWrapper>
113
- </Button>
113
+ </ButtonV2>
114
114
  </StyledButtonWrapper>
115
115
  </StyledModalContent>
116
116
  </StyledModalBody>
@@ -1053,8 +1053,9 @@ const messages = {
1053
1053
  loggedInAs: 'You are logged in as {{role}}.',
1054
1054
  loggedInAsButton: 'You are logged in as {{role}}',
1055
1055
  role: {
1056
- employee: 'Teacher',
1057
- staff: 'Staff',
1056
+ employee: 'Employee',
1057
+ faculty: 'Employee',
1058
+ staff: 'Employee',
1058
1059
  student: 'Student',
1059
1060
  },
1060
1061
  buttonLogIn: 'Log in with Feide',
@@ -1052,7 +1052,8 @@ const messages = {
1052
1052
  loggedInAs: 'Du er pålogget som {{role}}.',
1053
1053
  loggedInAsButton: 'Du er pålogget som {{role}}',
1054
1054
  role: {
1055
- employee: 'lærer',
1055
+ employee: 'ansatt',
1056
+ faculty: 'ansatt',
1056
1057
  staff: 'ansatt',
1057
1058
  student: 'elev',
1058
1059
  },
@@ -1052,7 +1052,8 @@ const messages = {
1052
1052
  loggedInAs: 'Du er pålogga som {{role}}.',
1053
1053
  loggedInAsButton: 'Du er pålogga som {{role}}',
1054
1054
  role: {
1055
- employee: 'lærar',
1055
+ employee: 'tilsett',
1056
+ faculty: 'tilsett',
1056
1057
  staff: 'tilsett',
1057
1058
  student: 'elev',
1058
1059
  },
@@ -1053,7 +1053,8 @@ const messages = {
1053
1053
  loggedInAs: 'Don leat sisaloggejuvvon {{role}}.',
1054
1054
  loggedInAsButton: 'Don leat sisaloggejuvvon {{role}}',
1055
1055
  role: {
1056
- employee: 'oahpaheaddji',
1056
+ employee: 'bargi',
1057
+ faculty: 'bargi',
1057
1058
  staff: 'bargi',
1058
1059
  student: 'oahppi',
1059
1060
  },
@@ -1056,8 +1056,9 @@ const messages = {
1056
1056
  loggedInAs: 'Datne tjaangeme goh {{role}}.',
1057
1057
  loggedInAsButton: 'Datne tjaangeme goh {{role}}',
1058
1058
  role: {
1059
- employee: 'lohkehtæjja',
1060
- staff: 'ansatt',
1059
+ employee: 'barkije',
1060
+ faculty: 'barkije',
1061
+ staff: 'barkije',
1061
1062
  student: 'learohke',
1062
1063
  },
1063
1064
  buttonLogIn: 'Tjaangh Feidine',