@ndla/ui 39.0.4 → 40.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 (55) hide show
  1. package/README.md +0 -18
  2. package/es/Article/Article.js +6 -3
  3. package/es/Frontpage/FrontpageAllSubjects.js +17 -10
  4. package/es/LearningPaths/LearningPathInformation.js +10 -6
  5. package/es/MultidisciplinarySubject/MultidisciplinarySubject.js +32 -28
  6. package/es/MultidisciplinarySubject/MultidisciplinarySubjectHeader.js +15 -10
  7. package/es/Navigation/index.js +1 -2
  8. package/es/Programme/Programme.js +13 -8
  9. package/es/ToolboxPage/ToolboxInfo.js +4 -9
  10. package/es/Topic/Topic.js +21 -18
  11. package/es/Translation/index.js +0 -1
  12. package/es/all.css +1 -1
  13. package/es/index.js +2 -2
  14. package/lib/Article/Article.js +6 -3
  15. package/lib/Frontpage/FrontpageAllSubjects.js +17 -10
  16. package/lib/LearningPaths/LearningPathInformation.js +9 -5
  17. package/lib/MultidisciplinarySubject/MultidisciplinarySubject.d.ts +3 -1
  18. package/lib/MultidisciplinarySubject/MultidisciplinarySubject.js +31 -27
  19. package/lib/MultidisciplinarySubject/MultidisciplinarySubjectHeader.d.ts +3 -1
  20. package/lib/MultidisciplinarySubject/MultidisciplinarySubjectHeader.js +14 -9
  21. package/lib/Navigation/index.d.ts +1 -2
  22. package/lib/Navigation/index.js +0 -7
  23. package/lib/Programme/Programme.js +12 -7
  24. package/lib/ToolboxPage/ToolboxInfo.js +5 -10
  25. package/lib/Topic/Topic.js +21 -18
  26. package/lib/Translation/index.d.ts +0 -1
  27. package/lib/Translation/index.js +0 -7
  28. package/lib/all.css +1 -1
  29. package/lib/index.d.ts +2 -2
  30. package/lib/index.js +0 -12
  31. package/package.json +14 -14
  32. package/src/Article/Article.tsx +4 -1
  33. package/src/Dialog/component.dialog.scss +0 -4
  34. package/src/Frontpage/FrontpageAllSubjects.tsx +3 -21
  35. package/src/LearningPaths/LearningPathInformation.tsx +6 -12
  36. package/src/MultidisciplinarySubject/MultidisciplinarySubject.tsx +15 -25
  37. package/src/MultidisciplinarySubject/MultidisciplinarySubjectHeader.tsx +8 -2
  38. package/src/Navigation/index.ts +1 -2
  39. package/src/Programme/Programme.tsx +4 -2
  40. package/src/Search/component.search-result.scss +0 -8
  41. package/src/ToolboxPage/ToolboxInfo.tsx +2 -13
  42. package/src/Topic/Topic.tsx +3 -2
  43. package/src/Translation/index.ts +0 -1
  44. package/src/all.scss +0 -1
  45. package/src/index.ts +2 -2
  46. package/src/main.scss +0 -1
  47. package/es/Navigation/NavigationHeading.js +0 -50
  48. package/es/Translation/TranslationBox.js +0 -16
  49. package/lib/Navigation/NavigationHeading.d.ts +0 -9
  50. package/lib/Navigation/NavigationHeading.js +0 -58
  51. package/lib/Translation/TranslationBox.d.ts +0 -10
  52. package/lib/Translation/TranslationBox.js +0 -24
  53. package/src/Navigation/NavigationHeading.tsx +0 -49
  54. package/src/Translation/TranslationBox.tsx +0 -19
  55. package/src/Translation/component.translation-box.scss +0 -9
@@ -1,24 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _tabs = require("@ndla/tabs");
9
- var _jsxRuntime = require("@emotion/react/jsx-runtime");
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
- var TranslationBox = function TranslationBox(_ref) {
12
- var tabs = _ref.tabs;
13
- return (0, _jsxRuntime.jsx)("div", {
14
- className: "c-translation-box",
15
- children: (0, _jsxRuntime.jsx)("div", {
16
- className: "c-bodybox c-bodybox--translation",
17
- children: (0, _jsxRuntime.jsx)(_tabs.ArticleTabs, {
18
- tabs: tabs
19
- })
20
- })
21
- });
22
- };
23
- var _default = TranslationBox;
24
- exports["default"] = _default;
@@ -1,49 +0,0 @@
1
- import React, { ReactNode } from 'react';
2
- import styled from '@emotion/styled';
3
- import { breakpoints, colors, fonts, mq } from '@ndla/core';
4
- import { Heading } from '../Typography';
5
-
6
- const StyledHeading = styled(Heading)`
7
- &[data-inverted='true'] {
8
- color: ${colors.white};
9
- }
10
- `;
11
- const StyledMainText = styled.span`
12
- display: block;
13
- `;
14
- const StyledSubText = styled.span`
15
- display: block;
16
- font-weight: bold;
17
- text-transform: uppercase;
18
- margin-bottom: 6px;
19
-
20
- ${fonts.sizes('14px', '24px')};
21
-
22
- ${mq.range({ from: breakpoints.tablet })} {
23
- ${fonts.sizes('18px', '32px')};
24
- }
25
- `;
26
-
27
- type Props = {
28
- subHeading?: string;
29
- children: ReactNode;
30
- invertedStyle?: boolean;
31
- headingId?: string;
32
- };
33
-
34
- export const NavigationHeading = ({ subHeading, children, invertedStyle, headingId }: Props) => (
35
- <StyledHeading
36
- element="h1"
37
- margin="xlarge"
38
- headingStyle="h1"
39
- serif
40
- data-inverted={invertedStyle}
41
- id={headingId}
42
- tabIndex={-1}
43
- >
44
- {subHeading && <StyledSubText>{subHeading}</StyledSubText>}
45
- <StyledMainText>{children}</StyledMainText>
46
- </StyledHeading>
47
- );
48
-
49
- export default NavigationHeading;
@@ -1,19 +0,0 @@
1
- import React, { ReactNode } from 'react';
2
- import { ArticleTabs } from '@ndla/tabs';
3
-
4
- interface Props {
5
- tabs: {
6
- id: string;
7
- title: string;
8
- content: (() => ReactNode) | ReactNode;
9
- }[];
10
- }
11
- const TranslationBox = ({ tabs }: Props) => (
12
- <div className="c-translation-box">
13
- <div className="c-bodybox c-bodybox--translation">
14
- <ArticleTabs tabs={tabs} />
15
- </div>
16
- </div>
17
- );
18
-
19
- export default TranslationBox;
@@ -1,9 +0,0 @@
1
- .c-translation-box {
2
- .c-tabs {
3
- margin-left: 0;
4
-
5
- &__list {
6
- margin-bottom: $spacing--large;
7
- }
8
- }
9
- }