@ndla/ui 33.4.5 → 34.0.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 (56) hide show
  1. package/es/Article/Article.js +7 -7
  2. package/es/Article/ArticleByline.js +14 -14
  3. package/es/Article/ArticleHeaderWrapper.js +4 -2
  4. package/es/BannerCard/BannerCard.js +13 -10
  5. package/es/CompetenceGoalTab/CompetenceGoalItem.js +69 -51
  6. package/es/CompetenceGoalTab/CompetenceGoalTab.js +25 -47
  7. package/es/CompetenceGoalTab/CompetenceItem.js +38 -90
  8. package/es/CompetenceGoals/CompetenceGoalsDialog.js +4 -4
  9. package/es/locale/messages-en.js +6 -3
  10. package/es/locale/messages-nb.js +6 -3
  11. package/es/locale/messages-nn.js +6 -3
  12. package/es/locale/messages-se.js +6 -3
  13. package/es/locale/messages-sma.js +6 -3
  14. package/lib/Article/Article.d.ts +3 -3
  15. package/lib/Article/Article.js +7 -7
  16. package/lib/Article/ArticleByline.js +14 -14
  17. package/lib/Article/ArticleHeaderWrapper.d.ts +2 -2
  18. package/lib/Article/ArticleHeaderWrapper.js +4 -2
  19. package/lib/BannerCard/BannerCard.d.ts +12 -3
  20. package/lib/BannerCard/BannerCard.js +13 -10
  21. package/lib/CompetenceGoalTab/CompetenceGoalItem.js +69 -51
  22. package/lib/CompetenceGoalTab/CompetenceGoalTab.d.ts +1 -2
  23. package/lib/CompetenceGoalTab/CompetenceGoalTab.js +23 -46
  24. package/lib/CompetenceGoalTab/CompetenceItem.d.ts +6 -2
  25. package/lib/CompetenceGoalTab/CompetenceItem.js +37 -89
  26. package/lib/CompetenceGoals/CompetenceGoalsDialog.js +4 -4
  27. package/lib/locale/messages-en.d.ts +4 -1
  28. package/lib/locale/messages-en.js +6 -3
  29. package/lib/locale/messages-nb.d.ts +4 -1
  30. package/lib/locale/messages-nb.js +6 -3
  31. package/lib/locale/messages-nn.d.ts +4 -1
  32. package/lib/locale/messages-nn.js +6 -3
  33. package/lib/locale/messages-se.d.ts +4 -1
  34. package/lib/locale/messages-se.js +6 -3
  35. package/lib/locale/messages-sma.d.ts +4 -1
  36. package/lib/locale/messages-sma.js +6 -3
  37. package/lib/types.d.ts +1 -1
  38. package/package.json +2 -2
  39. package/src/Article/Article.tsx +6 -6
  40. package/src/Article/ArticleByline.tsx +12 -12
  41. package/src/Article/ArticleHeaderWrapper.tsx +9 -3
  42. package/src/BannerCard/BannerCard.tsx +7 -7
  43. package/src/CompetenceGoalTab/CompetenceGoalItem.tsx +36 -39
  44. package/src/CompetenceGoalTab/CompetenceGoalTab.tsx +32 -76
  45. package/src/CompetenceGoalTab/CompetenceItem.tsx +55 -74
  46. package/src/CompetenceGoals/CompetenceGoalsDialog.tsx +1 -1
  47. package/src/locale/messages-en.ts +7 -3
  48. package/src/locale/messages-nb.ts +7 -3
  49. package/src/locale/messages-nn.ts +7 -3
  50. package/src/locale/messages-se.ts +7 -3
  51. package/src/locale/messages-sma.ts +7 -3
  52. package/src/types.ts +1 -1
  53. package/es/CompetenceGoalTab/SearchButton.js +0 -46
  54. package/lib/CompetenceGoalTab/SearchButton.d.ts +0 -14
  55. package/lib/CompetenceGoalTab/SearchButton.js +0 -53
  56. package/src/CompetenceGoalTab/SearchButton.tsx +0 -54
@@ -1,54 +0,0 @@
1
- /**
2
- * Copyright (c) 2021-present, NDLA.
3
- *
4
- * This source code is licensed under the GPLv3 license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- */
8
-
9
- import React from 'react';
10
- import styled from '@emotion/styled';
11
- import SafeLink from '@ndla/safelink';
12
- import { colors, fonts, misc, spacing } from '@ndla/core';
13
- import { Search } from '@ndla/icons/common';
14
-
15
- const Wrapper = styled.div`
16
- a {
17
- border: 2px solid ${colors.brand.tertiary};
18
- border-radius: 5px;
19
- font-weight: 600;
20
- ${fonts.sizes('16px', '24px')};
21
- padding: 10px 16px;
22
- box-shadow: none;
23
- transition: ${misc.transition.default};
24
- display: inline-flex;
25
- &:hover {
26
- border: 2px solid ${colors.brand.primary};
27
- color: ${colors.white};
28
- background: ${colors.brand.primary};
29
- }
30
- }
31
- `;
32
-
33
- const IconWrapper = styled.span`
34
- margin-right: ${spacing.xsmall};
35
- `;
36
-
37
- type Props = {
38
- to: string;
39
- text: string;
40
- target?: string;
41
- };
42
-
43
- const SearchButton = ({ to, text, target = '_self' }: Props) => (
44
- <Wrapper>
45
- <SafeLink to={to} target={target}>
46
- <IconWrapper>
47
- <Search style={{ width: '24px', height: '24px' }} />
48
- </IconWrapper>
49
- <span>{text}</span>
50
- </SafeLink>
51
- </Wrapper>
52
- );
53
-
54
- export default SearchButton;