@ndla/ui 8.2.5 → 9.0.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/es/Article/ArticleNotions.js +9 -7
- package/es/Figure/Figure.js +6 -5
- package/es/Figure/FigureExpandButton.js +6 -6
- package/es/Figure/FigureOpenDialogButton.js +45 -0
- package/es/Figure/index.js +2 -1
- package/es/Image/Image.js +1 -1
- package/es/LearningPaths/LearningPathMobileHeader.js +3 -3
- package/es/MessageBox/MessageBox.js +8 -8
- package/es/Notion/ConceptNotion.js +79 -28
- package/es/Notion/FigureNotion.js +6 -7
- package/es/Notion/Notion.js +19 -98
- package/es/Notion/NotionImage.js +26 -6
- package/es/Notion/NotionVisualElement.js +49 -10
- package/es/Topic/Topic.js +21 -21
- package/es/all.css +1 -1
- package/es/index.js +2 -4
- package/es/locale/messages-en.js +1 -1
- package/es/locale/messages-nb.js +1 -1
- package/es/locale/messages-nn.js +1 -1
- package/lib/Article/ArticleNotions.d.ts +2 -1
- package/lib/Article/ArticleNotions.js +9 -7
- package/lib/Figure/Figure.d.ts +2 -1
- package/lib/Figure/Figure.js +6 -5
- package/lib/Figure/FigureExpandButton.js +6 -6
- package/lib/Figure/FigureOpenDialogButton.d.ts +16 -0
- package/lib/Figure/FigureOpenDialogButton.js +57 -0
- package/lib/Figure/index.d.ts +1 -0
- package/lib/Figure/index.js +8 -0
- package/lib/Image/Image.js +1 -1
- package/lib/LearningPaths/LearningPathMobileHeader.js +4 -4
- package/lib/MessageBox/MessageBox.js +9 -9
- package/lib/Notion/ConceptNotion.d.ts +6 -7
- package/lib/Notion/ConceptNotion.js +84 -30
- package/lib/Notion/FigureNotion.d.ts +3 -2
- package/lib/Notion/FigureNotion.js +9 -11
- package/lib/Notion/Notion.d.ts +1 -12
- package/lib/Notion/Notion.js +23 -105
- package/lib/Notion/NotionImage.d.ts +2 -1
- package/lib/Notion/NotionImage.js +28 -8
- package/lib/Notion/NotionVisualElement.d.ts +6 -7
- package/lib/Notion/NotionVisualElement.js +48 -18
- package/lib/Topic/Topic.js +21 -21
- package/lib/all.css +1 -1
- package/lib/index.d.ts +2 -4
- package/lib/index.js +7 -9
- package/lib/locale/messages-en.js +1 -1
- package/lib/locale/messages-nb.js +1 -1
- package/lib/locale/messages-nn.js +1 -1
- package/package.json +10 -9
- package/src/Article/ArticleNotions.tsx +3 -2
- package/src/Figure/Figure.tsx +49 -41
- package/src/Figure/FigureExpandButton.tsx +4 -4
- package/src/Figure/FigureOpenDialogButton.tsx +37 -0
- package/src/Figure/component.figure.scss +4 -0
- package/src/Figure/index.ts +1 -0
- package/src/Image/Image.tsx +1 -1
- package/src/LearningPaths/LearningPathMobileHeader.tsx +1 -1
- package/src/MessageBox/MessageBox.tsx +1 -1
- package/src/Notion/ConceptNotion.tsx +136 -37
- package/src/Notion/FigureNotion.tsx +7 -7
- package/src/Notion/Notion.tsx +7 -145
- package/src/Notion/NotionImage.tsx +45 -15
- package/src/Notion/NotionVisualElement.tsx +35 -8
- package/src/Topic/Topic.tsx +1 -1
- package/src/index.ts +3 -4
- package/src/locale/messages-en.ts +1 -1
- package/src/locale/messages-nb.ts +1 -1
- package/src/locale/messages-nn.ts +1 -1
- package/es/CloseButton/CloseButton.js +0 -46
- package/es/CloseButton/index.js +0 -10
- package/lib/CloseButton/CloseButton.d.ts +0 -10
- package/lib/CloseButton/CloseButton.js +0 -54
- package/lib/CloseButton/index.d.ts +0 -10
- package/lib/CloseButton/index.js +0 -26
- package/src/CloseButton/CloseButton.tsx +0 -36
- package/src/CloseButton/index.ts +0 -13
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2022-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
|
-
import React, { ButtonHTMLAttributes } from 'react';
|
|
9
|
-
import styled from '@emotion/styled';
|
|
10
|
-
import { Cross } from '@ndla/icons/action';
|
|
11
|
-
import { useTranslation } from 'react-i18next';
|
|
12
|
-
import { colors } from '@ndla/core';
|
|
13
|
-
|
|
14
|
-
const StyledButton = styled.button`
|
|
15
|
-
background-color: transparent;
|
|
16
|
-
border: none;
|
|
17
|
-
display: flex;
|
|
18
|
-
cursor: pointer;
|
|
19
|
-
`;
|
|
20
|
-
|
|
21
|
-
const StyledCross = styled(Cross)`
|
|
22
|
-
height: 24px;
|
|
23
|
-
width: 24px;
|
|
24
|
-
color: ${colors.text.primary};
|
|
25
|
-
`;
|
|
26
|
-
|
|
27
|
-
export const CloseButton = (props: ButtonHTMLAttributes<HTMLButtonElement>) => {
|
|
28
|
-
const { t } = useTranslation();
|
|
29
|
-
return (
|
|
30
|
-
<StyledButton aria-label={t('close')} {...props}>
|
|
31
|
-
<StyledCross />
|
|
32
|
-
</StyledButton>
|
|
33
|
-
);
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export default CloseButton;
|
package/src/CloseButton/index.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2019-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 CloseButton from './CloseButton';
|
|
10
|
-
|
|
11
|
-
export { CloseButton };
|
|
12
|
-
|
|
13
|
-
export default CloseButton;
|