@apify/ui-library 0.57.3 → 0.58.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.
- package/.eslintrc +1 -0
- package/CHANGELOG.md +11 -0
- package/dist/src/components/action_link.d.ts +1 -1
- package/dist/src/components/action_link.d.ts.map +1 -1
- package/dist/src/components/{action_link.jsx → action_link.js} +6 -12
- package/dist/src/components/action_link.js.map +1 -0
- package/dist/src/components/{actor_template_card.jsx → actor_template_card.js} +5 -13
- package/dist/src/components/actor_template_card.js.map +1 -0
- package/dist/src/components/badge.d.ts +1 -1
- package/dist/src/components/badge.d.ts.map +1 -1
- package/dist/src/components/{badge.jsx → badge.js} +5 -7
- package/dist/src/components/badge.js.map +1 -0
- package/dist/src/components/{banner.jsx → banner.js} +3 -5
- package/dist/src/components/banner.js.map +1 -0
- package/dist/src/components/blog_article.d.ts +1 -1
- package/dist/src/components/blog_article.d.ts.map +1 -1
- package/dist/src/components/{blog_article.jsx → blog_article.js} +3 -7
- package/dist/src/components/blog_article.js.map +1 -0
- package/dist/src/components/{box.jsx → box.js} +4 -3
- package/dist/src/components/box.js.map +1 -0
- package/dist/src/components/button.d.ts +2 -2
- package/dist/src/components/button.d.ts.map +1 -1
- package/dist/src/components/{button.jsx → button.js} +12 -19
- package/dist/src/components/button.js.map +1 -0
- package/dist/src/components/chip.d.ts +1 -1
- package/dist/src/components/chip.d.ts.map +1 -1
- package/dist/src/components/{chip.jsx → chip.js} +9 -8
- package/dist/src/components/chip.js.map +1 -0
- package/dist/src/components/code/action_button.d.ts +2 -2
- package/dist/src/components/code/action_button.d.ts.map +1 -1
- package/dist/src/components/code/{action_button.jsx → action_button.js} +4 -8
- package/dist/src/components/code/action_button.js.map +1 -0
- package/dist/src/components/code/code_block/code_block.d.ts +2 -2
- package/dist/src/components/code/code_block/code_block.d.ts.map +1 -1
- package/dist/src/components/code/code_block/code_block.js +69 -0
- package/dist/src/components/code/code_block/code_block.js.map +1 -0
- package/dist/src/components/code/code_block/code_block.styled.d.ts +2 -2
- package/dist/src/components/code/code_block/code_block.styled.d.ts.map +1 -1
- package/dist/src/components/code/code_block/{code_block.styled.jsx → code_block.styled.js} +2 -2
- package/dist/src/components/code/code_block/code_block.styled.js.map +1 -0
- package/dist/src/components/code/index.d.ts +3 -3
- package/dist/src/components/code/index.d.ts.map +1 -1
- package/dist/src/components/code/index.js +3 -3
- package/dist/src/components/code/index.js.map +1 -1
- package/dist/src/components/code/inline_code/inline_code.d.ts +2 -2
- package/dist/src/components/code/inline_code/inline_code.d.ts.map +1 -1
- package/dist/src/components/code/inline_code/{inline_code.jsx → inline_code.js} +3 -7
- package/dist/src/components/code/inline_code/inline_code.js.map +1 -0
- package/dist/src/components/code/one_line_code/one_line_code.d.ts +3 -4
- package/dist/src/components/code/one_line_code/one_line_code.d.ts.map +1 -1
- package/dist/src/components/code/one_line_code/{one_line_code.jsx → one_line_code.js} +6 -26
- package/dist/src/components/code/one_line_code/one_line_code.js.map +1 -0
- package/dist/src/components/code/syntax_highlighter.d.ts +3 -4
- package/dist/src/components/code/syntax_highlighter.d.ts.map +1 -1
- package/dist/src/components/code/{syntax_highlighter.jsx → syntax_highlighter.js} +7 -8
- package/dist/src/components/code/syntax_highlighter.js.map +1 -0
- package/dist/src/components/{color_wheel_gradient.jsx → color_wheel_gradient.js} +1 -1
- package/dist/src/components/color_wheel_gradient.js.map +1 -0
- package/dist/src/components/floating/index.d.ts +3 -3
- package/dist/src/components/floating/index.d.ts.map +1 -1
- package/dist/src/components/floating/index.js +3 -3
- package/dist/src/components/floating/index.js.map +1 -1
- package/dist/src/components/floating/menu.d.ts +2 -2
- package/dist/src/components/floating/menu.d.ts.map +1 -1
- package/dist/src/components/floating/{menu.jsx → menu.js} +22 -34
- package/dist/src/components/floating/menu.js.map +1 -0
- package/dist/src/components/floating/{menu_common.jsx → menu_common.js} +1 -1
- package/dist/src/components/floating/menu_common.js.map +1 -0
- package/dist/src/components/floating/menu_components.d.ts +4 -5
- package/dist/src/components/floating/menu_components.d.ts.map +1 -1
- package/dist/src/components/floating/{menu_components.jsx → menu_components.js} +5 -7
- package/dist/src/components/floating/menu_components.js.map +1 -0
- package/dist/src/components/image.d.ts +2 -3
- package/dist/src/components/image.d.ts.map +1 -1
- package/dist/src/components/image.js +9 -0
- package/dist/src/components/image.js.map +1 -0
- package/dist/src/components/index.d.ts +14 -14
- package/dist/src/components/index.d.ts.map +1 -1
- package/dist/src/components/index.js +14 -14
- package/dist/src/components/index.js.map +1 -1
- package/dist/src/components/link.d.ts +1 -1
- package/dist/src/components/link.d.ts.map +1 -1
- package/dist/src/components/{link.jsx → link.js} +9 -9
- package/dist/src/components/link.js.map +1 -0
- package/dist/src/components/message.d.ts +5 -5
- package/dist/src/components/message.d.ts.map +1 -1
- package/dist/src/components/{message.jsx → message.js} +9 -19
- package/dist/src/components/message.js.map +1 -0
- package/dist/src/components/rating.d.ts +1 -1
- package/dist/src/components/rating.d.ts.map +1 -1
- package/dist/src/components/{rating.jsx → rating.js} +10 -16
- package/dist/src/components/rating.js.map +1 -0
- package/dist/src/components/readme_renderer/index.d.ts +2 -2
- package/dist/src/components/readme_renderer/index.d.ts.map +1 -1
- package/dist/src/components/readme_renderer/index.js +2 -2
- package/dist/src/components/readme_renderer/index.js.map +1 -1
- package/dist/src/components/readme_renderer/table_of_contents.d.ts +1 -1
- package/dist/src/components/readme_renderer/{table_of_contents.jsx → table_of_contents.js} +44 -49
- package/dist/src/components/readme_renderer/{table_of_contents.jsx.map → table_of_contents.js.map} +1 -1
- package/dist/src/components/readme_renderer/{utils.jsx → utils.js} +1 -1
- package/dist/src/components/readme_renderer/utils.js.map +1 -0
- package/dist/src/components/simple_markdown/index.d.ts +2 -2
- package/dist/src/components/simple_markdown/index.d.ts.map +1 -1
- package/dist/src/components/simple_markdown/index.js +2 -2
- package/dist/src/components/simple_markdown/index.js.map +1 -1
- package/dist/src/components/simple_markdown/simple_markdown.js +136 -0
- package/dist/src/components/simple_markdown/simple_markdown.js.map +1 -0
- package/dist/src/components/simple_markdown/simple_markdown_components.d.ts +4 -4
- package/dist/src/components/simple_markdown/simple_markdown_components.d.ts.map +1 -1
- package/dist/src/components/simple_markdown/{simple_markdown_components.jsx → simple_markdown_components.js} +13 -26
- package/dist/src/components/simple_markdown/simple_markdown_components.js.map +1 -0
- package/dist/src/components/tag.d.ts +3 -3
- package/dist/src/components/tag.d.ts.map +1 -1
- package/dist/src/components/{tag.jsx → tag.js} +6 -9
- package/dist/src/components/tag.js.map +1 -0
- package/dist/src/components/text/heading_content.d.ts +1 -1
- package/dist/src/components/text/heading_content.d.ts.map +1 -1
- package/dist/src/components/text/{heading_content.jsx → heading_content.js} +4 -4
- package/dist/src/components/text/heading_content.js.map +1 -0
- package/dist/src/components/text/heading_marketing.d.ts +1 -1
- package/dist/src/components/text/heading_marketing.d.ts.map +1 -1
- package/dist/src/components/text/{heading_marketing.jsx → heading_marketing.js} +4 -4
- package/dist/src/components/text/heading_marketing.js.map +1 -0
- package/dist/src/components/text/heading_shared.d.ts +1 -1
- package/dist/src/components/text/heading_shared.d.ts.map +1 -1
- package/dist/src/components/text/{heading_shared.jsx → heading_shared.js} +4 -4
- package/dist/src/components/text/heading_shared.js.map +1 -0
- package/dist/src/components/text/index.d.ts +8 -8
- package/dist/src/components/text/index.d.ts.map +1 -1
- package/dist/src/components/text/index.js +7 -7
- package/dist/src/components/text/index.js.map +1 -1
- package/dist/src/components/text/text_base.d.ts +1 -1
- package/dist/src/components/text/text_base.d.ts.map +1 -1
- package/dist/src/components/text/{text_base.jsx → text_base.js} +4 -4
- package/dist/src/components/text/text_base.js.map +1 -0
- package/dist/src/components/text/text_content.d.ts +2 -3
- package/dist/src/components/text/text_content.d.ts.map +1 -1
- package/dist/src/components/text/{text_content.jsx → text_content.js} +10 -9
- package/dist/src/components/text/text_content.js.map +1 -0
- package/dist/src/components/text/text_marketing.d.ts +2 -3
- package/dist/src/components/text/text_marketing.d.ts.map +1 -1
- package/dist/src/components/text/{text_marketing.jsx → text_marketing.js} +10 -9
- package/dist/src/components/text/text_marketing.js.map +1 -0
- package/dist/src/components/text/text_shared.d.ts +2 -3
- package/dist/src/components/text/text_shared.d.ts.map +1 -1
- package/dist/src/components/text/{text_shared.jsx → text_shared.js} +10 -9
- package/dist/src/components/text/text_shared.js.map +1 -0
- package/dist/src/components/tile/{horizontal_tile.jsx → horizontal_tile.js} +3 -7
- package/dist/src/components/tile/horizontal_tile.js.map +1 -0
- package/dist/src/components/tile/index.d.ts +2 -2
- package/dist/src/components/tile/index.d.ts.map +1 -1
- package/dist/src/components/tile/index.js +2 -2
- package/dist/src/components/tile/index.js.map +1 -1
- package/dist/src/components/tile/{vertical_tile.jsx → vertical_tile.js} +3 -5
- package/dist/src/components/tile/vertical_tile.js.map +1 -0
- package/dist/src/components/to_consolidate/card.d.ts +1 -1
- package/dist/src/components/to_consolidate/card.d.ts.map +1 -1
- package/dist/src/components/to_consolidate/{card.jsx → card.js} +5 -13
- package/dist/src/components/to_consolidate/card.js.map +1 -0
- package/dist/src/components/to_consolidate/index.d.ts +4 -4
- package/dist/src/components/to_consolidate/index.d.ts.map +1 -1
- package/dist/src/components/to_consolidate/index.js +4 -4
- package/dist/src/components/to_consolidate/index.js.map +1 -1
- package/dist/src/components/to_consolidate/markdown.d.ts +1 -1
- package/dist/src/components/to_consolidate/markdown.d.ts.map +1 -1
- package/dist/src/components/to_consolidate/{markdown.jsx → markdown.js} +21 -33
- package/dist/src/components/to_consolidate/markdown.js.map +1 -0
- package/dist/src/components/to_consolidate/{pagination.jsx → pagination.js} +14 -27
- package/dist/src/components/to_consolidate/pagination.js.map +1 -0
- package/dist/src/components/to_consolidate/{tab_number_chip.jsx → tab_number_chip.js} +3 -5
- package/dist/src/components/to_consolidate/tab_number_chip.js.map +1 -0
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/{ui_dependency_provider.jsx → ui_dependency_provider.js} +4 -5
- package/dist/src/ui_dependency_provider.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/components/action_link.tsx +2 -2
- package/src/components/actor_template_card.tsx +1 -1
- package/src/components/badge.tsx +1 -1
- package/src/components/button.tsx +3 -3
- package/src/components/chip.tsx +1 -1
- package/src/components/code/code_block/code_block.styled.tsx +2 -2
- package/src/components/code/code_block/code_block.tsx +6 -6
- package/src/components/code/index.ts +3 -3
- package/src/components/code/inline_code/inline_code.tsx +2 -2
- package/src/components/code/one_line_code/one_line_code.tsx +6 -6
- package/src/components/code/syntax_highlighter.tsx +4 -4
- package/src/components/floating/index.ts +3 -3
- package/src/components/floating/menu.tsx +3 -3
- package/src/components/floating/menu_components.tsx +2 -2
- package/src/components/image.tsx +3 -3
- package/src/components/index.ts +14 -14
- package/src/components/link.tsx +2 -2
- package/src/components/message.tsx +2 -2
- package/src/components/rating.tsx +3 -3
- package/src/components/readme_renderer/index.ts +2 -2
- package/src/components/readme_renderer/table_of_contents.tsx +2 -2
- package/src/components/simple_markdown/index.ts +2 -2
- package/src/components/simple_markdown/simple_markdown.tsx +7 -7
- package/src/components/simple_markdown/simple_markdown_components.tsx +6 -6
- package/src/components/tag.tsx +2 -2
- package/src/components/text/heading_content.tsx +2 -2
- package/src/components/text/heading_marketing.tsx +2 -2
- package/src/components/text/heading_shared.tsx +2 -2
- package/src/components/text/index.ts +8 -8
- package/src/components/text/text_base.tsx +2 -2
- package/src/components/text/text_content.tsx +3 -3
- package/src/components/text/text_marketing.tsx +3 -3
- package/src/components/text/text_shared.tsx +3 -3
- package/src/components/tile/index.ts +2 -2
- package/src/components/to_consolidate/card.tsx +2 -2
- package/src/components/to_consolidate/index.ts +4 -4
- package/src/components/to_consolidate/markdown.tsx +1 -1
- package/src/components/to_consolidate/pagination.tsx +3 -3
- package/src/index.ts +1 -1
- package/tsconfig.build.json +1 -1
- package/tsconfig.json +1 -1
- package/dist/src/components/action_link.jsx.map +0 -1
- package/dist/src/components/actor_template_card.jsx.map +0 -1
- package/dist/src/components/badge.jsx.map +0 -1
- package/dist/src/components/banner.jsx.map +0 -1
- package/dist/src/components/blog_article.jsx.map +0 -1
- package/dist/src/components/box.jsx.map +0 -1
- package/dist/src/components/button.jsx.map +0 -1
- package/dist/src/components/chip.jsx.map +0 -1
- package/dist/src/components/code/action_button.jsx.map +0 -1
- package/dist/src/components/code/code_block/code_block.jsx +0 -99
- package/dist/src/components/code/code_block/code_block.jsx.map +0 -1
- package/dist/src/components/code/code_block/code_block.styled.jsx.map +0 -1
- package/dist/src/components/code/inline_code/inline_code.jsx.map +0 -1
- package/dist/src/components/code/one_line_code/one_line_code.jsx.map +0 -1
- package/dist/src/components/code/syntax_highlighter.jsx.map +0 -1
- package/dist/src/components/color_wheel_gradient.jsx.map +0 -1
- package/dist/src/components/floating/menu.jsx.map +0 -1
- package/dist/src/components/floating/menu_common.jsx.map +0 -1
- package/dist/src/components/floating/menu_components.jsx.map +0 -1
- package/dist/src/components/image.jsx +0 -8
- package/dist/src/components/image.jsx.map +0 -1
- package/dist/src/components/link.jsx.map +0 -1
- package/dist/src/components/message.jsx.map +0 -1
- package/dist/src/components/rating.jsx.map +0 -1
- package/dist/src/components/readme_renderer/utils.jsx.map +0 -1
- package/dist/src/components/simple_markdown/simple_markdown.jsx +0 -137
- package/dist/src/components/simple_markdown/simple_markdown.jsx.map +0 -1
- package/dist/src/components/simple_markdown/simple_markdown_components.jsx.map +0 -1
- package/dist/src/components/tag.jsx.map +0 -1
- package/dist/src/components/text/heading_content.jsx.map +0 -1
- package/dist/src/components/text/heading_marketing.jsx.map +0 -1
- package/dist/src/components/text/heading_shared.jsx.map +0 -1
- package/dist/src/components/text/text_base.jsx.map +0 -1
- package/dist/src/components/text/text_content.jsx.map +0 -1
- package/dist/src/components/text/text_marketing.jsx.map +0 -1
- package/dist/src/components/text/text_shared.jsx.map +0 -1
- package/dist/src/components/tile/horizontal_tile.jsx.map +0 -1
- package/dist/src/components/tile/vertical_tile.jsx.map +0 -1
- package/dist/src/components/to_consolidate/card.jsx.map +0 -1
- package/dist/src/components/to_consolidate/markdown.jsx.map +0 -1
- package/dist/src/components/to_consolidate/pagination.jsx.map +0 -1
- package/dist/src/components/to_consolidate/tab_number_chip.jsx.map +0 -1
- package/dist/src/ui_dependency_provider.jsx.map +0 -1
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useMemo, useRef } from 'react';
|
|
3
|
+
import ReactMarkdown, { uriTransformer } from 'react-markdown';
|
|
4
|
+
import rehypeRaw from 'rehype-raw';
|
|
5
|
+
import rehypeSanitize from 'rehype-sanitize';
|
|
6
|
+
import remarkGfm from 'remark-gfm';
|
|
7
|
+
import styled from 'styled-components';
|
|
8
|
+
import { theme } from '../../design_system/theme.js';
|
|
9
|
+
import { useSharedUiDependencies } from '../../ui_dependency_provider.js';
|
|
10
|
+
import { Box } from '../box.js';
|
|
11
|
+
import { isUrlExternal } from '../link.js';
|
|
12
|
+
import { cleanMarkdown } from '../readme_renderer/utils.js';
|
|
13
|
+
import { HeadingContent } from '../text/heading_content.js';
|
|
14
|
+
import { Heading, Text } from '../text/index.js';
|
|
15
|
+
import { TextContent } from '../text/text_content.js';
|
|
16
|
+
import { MarkdownBlockQuote, MarkdownCode, MarkdownLink, MarkdownTable, } from './simple_markdown_components.js';
|
|
17
|
+
const StyledMarkdown = styled(ReactMarkdown) `
|
|
18
|
+
scroll-margin-top: 10px;
|
|
19
|
+
|
|
20
|
+
@font-face {
|
|
21
|
+
font-family: "ellipsis-font";
|
|
22
|
+
src: local("Courier");
|
|
23
|
+
unicode-range: U+2026;
|
|
24
|
+
size-adjust: 0%;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
img {
|
|
28
|
+
max-width: 100%;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
hr {
|
|
32
|
+
color: ${theme.color.neutral.border};
|
|
33
|
+
}
|
|
34
|
+
`;
|
|
35
|
+
export const defaultRehypePlugins = [rehypeRaw];
|
|
36
|
+
export const defaultRemarkPlugins = [remarkGfm];
|
|
37
|
+
export const defaultAllowedElements = [
|
|
38
|
+
'a',
|
|
39
|
+
'b',
|
|
40
|
+
'blockquote',
|
|
41
|
+
'br',
|
|
42
|
+
'center',
|
|
43
|
+
'code',
|
|
44
|
+
'del',
|
|
45
|
+
'em',
|
|
46
|
+
'h1',
|
|
47
|
+
'h2',
|
|
48
|
+
'h3',
|
|
49
|
+
'h4',
|
|
50
|
+
'h5',
|
|
51
|
+
'hr',
|
|
52
|
+
'i',
|
|
53
|
+
'img',
|
|
54
|
+
'li',
|
|
55
|
+
'ol',
|
|
56
|
+
'p',
|
|
57
|
+
'pre',
|
|
58
|
+
'span',
|
|
59
|
+
'strong',
|
|
60
|
+
'table',
|
|
61
|
+
'tbody',
|
|
62
|
+
'td',
|
|
63
|
+
'tfoot',
|
|
64
|
+
'th',
|
|
65
|
+
'thead',
|
|
66
|
+
'tr',
|
|
67
|
+
'u',
|
|
68
|
+
'ul',
|
|
69
|
+
];
|
|
70
|
+
// TODO: Add Image component
|
|
71
|
+
const regularMarkdownSizeComponents = {
|
|
72
|
+
h1: ({ children }) => _jsx(HeadingContent, { mt: 'space32', mb: 'space16', type: 'heading1', children: children }),
|
|
73
|
+
h2: ({ children }) => _jsx(HeadingContent, { mt: 'space32', mb: 'space16', type: 'heading2', children: children }),
|
|
74
|
+
h3: ({ children }) => _jsx(HeadingContent, { mt: 'space32', mb: 'space16', type: 'heading3', children: children }),
|
|
75
|
+
h4: ({ children }) => _jsx(HeadingContent, { mt: 'space32', mb: 'space16', type: 'heading4', children: children }),
|
|
76
|
+
h5: ({ children }) => _jsx(HeadingContent, { mt: 'space32', mb: 'space16', type: 'heading5', children: children }),
|
|
77
|
+
h6: ({ children }) => _jsx(HeadingContent, { mt: 'space32', mb: 'space16', type: 'heading6', children: children }),
|
|
78
|
+
p: ({ children }) => (_jsx(TextContent, { my: 'space16', children: children })),
|
|
79
|
+
strong: ({ children }) => _jsx(TextContent, { as: 'strong', weight: 'bold', children: children }),
|
|
80
|
+
b: ({ children }) => _jsx(TextContent, { as: 'b', weight: 'bold', children: children }),
|
|
81
|
+
th: ({ children }) => _jsx(TextContent, { as: 'th', weight: 'bold', children: children }),
|
|
82
|
+
blockquote: ({ children }) => _jsx(MarkdownBlockQuote, { children: children }),
|
|
83
|
+
table: ({ children }) => _jsx(MarkdownTable, { children: children }),
|
|
84
|
+
ul: ({ children }) => _jsx(Box, { as: 'ul', pl: 'space32', children: children }),
|
|
85
|
+
ol: ({ children, start }) => _jsx(Box, { as: 'ol', pl: 'space32', start: start, children: children }),
|
|
86
|
+
li: ({ children }) => _jsx(Box, { as: 'li', mt: 'space4', children: children }),
|
|
87
|
+
a: ({ children, href }) => _jsx(MarkdownLink, { to: href, children: children }),
|
|
88
|
+
code: ({ children, inline }) => _jsx(MarkdownCode, { inline: inline, size: 'regular', children: children }),
|
|
89
|
+
};
|
|
90
|
+
const smallMarkdownSizeComponents = {
|
|
91
|
+
h1: ({ children }) => _jsx(Heading, { mt: 'space32', mb: 'space16', type: 'title2xl', children: children }),
|
|
92
|
+
h2: ({ children }) => _jsx(Heading, { mt: 'space32', mb: 'space16', type: 'titleXl', children: children }),
|
|
93
|
+
h3: ({ children }) => _jsx(Heading, { mt: 'space32', mb: 'space16', type: 'titleL', children: children }),
|
|
94
|
+
h4: ({ children }) => _jsx(Heading, { mt: 'space32', mb: 'space16', type: 'titleM', children: children }),
|
|
95
|
+
h5: ({ children }) => _jsx(Heading, { mt: 'space32', mb: 'space16', type: 'titleS', children: children }),
|
|
96
|
+
h6: ({ children }) => _jsx(Heading, { mt: 'space32', mb: 'space16', type: 'titleXs', children: children }),
|
|
97
|
+
p: ({ children }) => (_jsx(Text, { my: 'space16', children: children })),
|
|
98
|
+
strong: ({ children }) => _jsx(Text, { as: 'strong', weight: 'bold', children: children }),
|
|
99
|
+
b: ({ children }) => _jsx(Text, { as: 'b', weight: 'bold', children: children }),
|
|
100
|
+
th: ({ children }) => _jsx(Text, { as: 'th', weight: 'bold', children: children }),
|
|
101
|
+
blockquote: ({ children }) => _jsx(MarkdownBlockQuote, { children: children }),
|
|
102
|
+
table: ({ children }) => _jsx(MarkdownTable, { children: children }),
|
|
103
|
+
ul: ({ children }) => _jsx(Box, { as: 'ul', pl: 'space32', children: children }),
|
|
104
|
+
ol: ({ children, start }) => _jsx(Box, { as: 'ol', pl: 'space32', start: start, children: children }),
|
|
105
|
+
li: ({ children }) => _jsx(Box, { as: 'li', mt: 'space4', children: children }),
|
|
106
|
+
a: ({ children, href }) => _jsx(MarkdownLink, { to: href, children: children }),
|
|
107
|
+
code: ({ children, inline }) => _jsx(MarkdownCode, { inline: inline, size: 'small', children: children }),
|
|
108
|
+
};
|
|
109
|
+
const useDefaultUrlTransform = () => {
|
|
110
|
+
const { windowLocationHost } = useSharedUiDependencies();
|
|
111
|
+
return useCallback((url) => {
|
|
112
|
+
if (!isUrlExternal(url, windowLocationHost)) {
|
|
113
|
+
// We want to make sure internal links will be relative links without https://host at the beginning because Link doesn't work with these
|
|
114
|
+
return url.replace(/^(https?:\/\/)?(www\.)?[^/]+/, '') || '/';
|
|
115
|
+
}
|
|
116
|
+
return url;
|
|
117
|
+
}, [windowLocationHost]);
|
|
118
|
+
};
|
|
119
|
+
export const SimpleMarkdown = ({ size = 'regular', // small is default for console
|
|
120
|
+
children: markdown, components, rehypePlugins, remarkPlugins, transformLinkUri, allowedElements, ...rest }) => {
|
|
121
|
+
const cleanedMarkdown = useMemo(() => cleanMarkdown(markdown), [markdown]);
|
|
122
|
+
const effectiveComponents = useRef({
|
|
123
|
+
...(size === 'regular' ? regularMarkdownSizeComponents : smallMarkdownSizeComponents),
|
|
124
|
+
...components,
|
|
125
|
+
});
|
|
126
|
+
const rehypePluginsRef = useRef([
|
|
127
|
+
...(rehypePlugins || defaultRehypePlugins),
|
|
128
|
+
rehypeSanitize, // lets always sanitize the output
|
|
129
|
+
]);
|
|
130
|
+
const defaultUrlTransform = useDefaultUrlTransform();
|
|
131
|
+
return (_jsx(StyledMarkdown, { components: effectiveComponents.current, rehypePlugins: rehypePluginsRef.current, remarkPlugins: remarkPlugins || defaultRemarkPlugins, allowedElements: allowedElements || defaultAllowedElements, transformLinkUri: (href, children, title) => {
|
|
132
|
+
const transformed = transformLinkUri ? transformLinkUri(href, children, title) : defaultUrlTransform(href);
|
|
133
|
+
return uriTransformer(transformed);
|
|
134
|
+
}, ...rest, children: cleanedMarkdown }));
|
|
135
|
+
};
|
|
136
|
+
//# sourceMappingURL=simple_markdown.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simple_markdown.js","sourceRoot":"","sources":["../../../../src/components/simple_markdown/simple_markdown.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE5D,OAAO,aAAa,EAAE,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAE/D,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,cAAc,MAAM,iBAAiB,CAAC;AAC7C,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;A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YAEP,eAAe,GACH,CACpB,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { CodeProps, ReactMarkdownProps } from 'react-markdown/lib/ast-to-react';
|
|
3
3
|
import type { WithOptional } from '../../type_utils.js';
|
|
4
|
-
import type { LinkProps } from '../link.
|
|
5
|
-
import type { HeadingSharedProps } from '../text/heading_shared.
|
|
6
|
-
import type { SharedTextProps, SharedTextSize } from '../text/text_shared.
|
|
4
|
+
import type { LinkProps } from '../link.js';
|
|
5
|
+
import type { HeadingSharedProps } from '../text/heading_shared.js';
|
|
6
|
+
import type { SharedTextProps, SharedTextSize } from '../text/text_shared.js';
|
|
7
7
|
export declare const MarkdownPlainHeading: React.FC<HeadingSharedProps>;
|
|
8
8
|
/**
|
|
9
9
|
* Default markdown heading that renders copy icon next to it.
|
|
@@ -16,7 +16,7 @@ export declare const MarkdownCode: React.FC<MarkdownCodeProps & {
|
|
|
16
16
|
size: SharedTextSize;
|
|
17
17
|
}>;
|
|
18
18
|
export declare const MarkdownLink: React.FC<WithOptional<LinkProps, 'to'>>;
|
|
19
|
-
export declare const MarkdownBlockQuote: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<import("../box.
|
|
19
|
+
export declare const MarkdownBlockQuote: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<import("../box.js").BoxProps & React.RefAttributes<HTMLElement>>, any, {
|
|
20
20
|
my: "space16";
|
|
21
21
|
py: "none";
|
|
22
22
|
forwardedAs: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simple_markdown_components.d.ts","sourceRoot":"","sources":["../../../../src/components/simple_markdown/simple_markdown_components.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAMrF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAIxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"simple_markdown_components.d.ts","sourceRoot":"","sources":["../../../../src/components/simple_markdown/simple_markdown_components.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAMrF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAIxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAG5C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAM9E,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAgB7D,CAAC;AAuBF;;;GAGG;AAEH,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA2C/D,CAAC;AAGF,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,GAAG,IAAI,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAYjG,CAAC;AAeF,KAAK,iBAAiB,GAAG,IAAI,CAAC,SAAS,EAAE,QAAQ,GAAG,WAAW,GAAG,UAAU,CAAC,CAAA;AAE7E,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,GAAG;IAAE,IAAI,EAAE,cAAc,CAAA;CAAE,CAwC/E,CAAC;AAoEF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,SAAS,EAAE,IAAI,CAAC,CAWhE,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;+BAa9B,CAAC;AAEF,eAAO,MAAM,aAAa,sEAgBzB,CAAC"}
|
|
@@ -1,22 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import qs from 'query-string';
|
|
2
|
-
import React from 'react';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
import { CheckIcon, LinkIcon } from '@apify/ui-icons';
|
|
5
5
|
import { theme } from '../../design_system/theme.js';
|
|
6
6
|
import { useCopyToClipboard } from '../../utils/index.js';
|
|
7
|
-
import { Box } from '../box.
|
|
7
|
+
import { Box } from '../box.js';
|
|
8
8
|
import { CodeBlock, InlineCode, OneLineCode } from '../code/index.js';
|
|
9
|
-
import { Link } from '../link.
|
|
10
|
-
import { slugifyHeadingChildren } from '../readme_renderer/utils.
|
|
9
|
+
import { Link } from '../link.js';
|
|
10
|
+
import { slugifyHeadingChildren } from '../readme_renderer/utils.js';
|
|
11
11
|
import { Heading } from '../text/index.js';
|
|
12
12
|
const simpleMarkdownClassNames = {
|
|
13
13
|
HEADING_ICON_LINK: 'headingIconLink',
|
|
14
14
|
};
|
|
15
15
|
export const MarkdownPlainHeading = ({ children, ...rest }) => {
|
|
16
16
|
const id = slugifyHeadingChildren(children);
|
|
17
|
-
return (
|
|
18
|
-
{children}
|
|
19
|
-
</Heading>);
|
|
17
|
+
return (_jsx(Heading, { mt: 'space32', mb: 'space16', id: id, ...rest, children: children }));
|
|
20
18
|
};
|
|
21
19
|
const StyledMarkdownHeading = styled(Box) `
|
|
22
20
|
display: flex;
|
|
@@ -54,12 +52,7 @@ export const MarkdownHeadingWrapper = ({ children, ...rest }) => {
|
|
|
54
52
|
return url.toString();
|
|
55
53
|
},
|
|
56
54
|
});
|
|
57
|
-
return (
|
|
58
|
-
{children}
|
|
59
|
-
<Link className={simpleMarkdownClassNames.HEADING_ICON_LINK} onClick={handleClick} to={`#${id}`}>
|
|
60
|
-
{isCopied ? (<CheckIcon size="16" color={theme.color.success.action}/>) : (<LinkIcon size="16" color={theme.color.primary.text}/>)}
|
|
61
|
-
</Link>
|
|
62
|
-
</StyledMarkdownHeading>);
|
|
55
|
+
return (_jsxs(StyledMarkdownHeading, { mt: 'space32', mb: 'space16', id: id, ...rest, children: [children, _jsx(Link, { className: simpleMarkdownClassNames.HEADING_ICON_LINK, onClick: handleClick, to: `#${id}`, children: isCopied ? (_jsx(CheckIcon, { size: "16", color: theme.color.success.action })) : (_jsx(LinkIcon, { size: "16", color: theme.color.primary.text })) })] }));
|
|
63
56
|
};
|
|
64
57
|
// TODO: This should be used for readmes
|
|
65
58
|
export const MarkdownParagraphContent = ({ children, node, }) => {
|
|
@@ -67,7 +60,7 @@ export const MarkdownParagraphContent = ({ children, node, }) => {
|
|
|
67
60
|
const isText = child?.type === 'text';
|
|
68
61
|
const videoSrc = isText && getVideoSrc(child.value);
|
|
69
62
|
if (videoSrc)
|
|
70
|
-
return
|
|
63
|
+
return _jsx(MarkdownVideo, { src: videoSrc });
|
|
71
64
|
// the || null part is important because non-supported elements will fall back to this paragraph component;
|
|
72
65
|
return children || null;
|
|
73
66
|
};
|
|
@@ -85,19 +78,17 @@ const StyledInlineCode = styled(InlineCode) `
|
|
|
85
78
|
`;
|
|
86
79
|
export const MarkdownCode = ({ inline, className, children, size, }) => {
|
|
87
80
|
if (inline) {
|
|
88
|
-
return
|
|
81
|
+
return _jsx(StyledInlineCode, { size: size, className: className, children: children });
|
|
89
82
|
}
|
|
90
83
|
const code = String(children).replace(/\n$/, '').trim();
|
|
91
84
|
const match = /language-(\w+)/.exec(className || '');
|
|
92
85
|
const language = match?.[1]?.toLowerCase();
|
|
93
86
|
const isOneLineCode = code.split('\n').length <= 1;
|
|
94
87
|
if (isOneLineCode) {
|
|
95
|
-
return (
|
|
96
|
-
{code}
|
|
97
|
-
</OneLineCode>);
|
|
88
|
+
return (_jsx(OneLineCode, { language: language, size: size, fullWidth: true, children: code }));
|
|
98
89
|
}
|
|
99
90
|
if (!inline) {
|
|
100
|
-
return (
|
|
91
|
+
return (_jsx(CodeBlock, { content: code, language: language, size: size, hideLineNumbers: true, fullWidth: true, hideBashHeader: true, hideBashPromptPrefixes: true }));
|
|
101
92
|
}
|
|
102
93
|
};
|
|
103
94
|
const youtubeRegex = /^(?:https?:\/\/)?(?:www\.)?(?:m\.)?(?:youtube(?:-nocookie)?\.com|youtu\.be)\/(?:watch\?v=|embed\/|v\/)?([a-zA-Z0-9\-_]+)(?:\S*)?$/;
|
|
@@ -137,11 +128,7 @@ const StyledVideo = styled.div `
|
|
|
137
128
|
}
|
|
138
129
|
`;
|
|
139
130
|
const MarkdownVideo = ({ src }) => {
|
|
140
|
-
return (
|
|
141
|
-
<div>
|
|
142
|
-
<iframe loading="lazy" allowFullScreen src={src}/>
|
|
143
|
-
</div>
|
|
144
|
-
</StyledVideo>);
|
|
131
|
+
return (_jsx(StyledVideo, { children: _jsx("div", { children: _jsx("iframe", { loading: "lazy", allowFullScreen: true, src: src }) }) }));
|
|
145
132
|
};
|
|
146
133
|
const StyledMarkdownLink = styled(Link) `
|
|
147
134
|
overflow-wrap: break-word;
|
|
@@ -156,7 +143,7 @@ const StyledMarkdownLink = styled(Link) `
|
|
|
156
143
|
}
|
|
157
144
|
`;
|
|
158
145
|
export const MarkdownLink = ({ to, children, rel, className, }) => {
|
|
159
|
-
return (to && typeof to === 'string') ? (
|
|
146
|
+
return (to && typeof to === 'string') ? (_jsx(StyledMarkdownLink, { to: to, hideExternalIcon: true, rel: rel, className: className, children: children })) : ((_jsx("span", { children: children })) // Invalid links can be rendered as a regular span instead
|
|
160
147
|
);
|
|
161
148
|
};
|
|
162
149
|
export const MarkdownBlockQuote = styled(Box).attrs({
|
|
@@ -190,4 +177,4 @@ export const MarkdownTable = styled.table `
|
|
|
190
177
|
}
|
|
191
178
|
}
|
|
192
179
|
`;
|
|
193
|
-
//# sourceMappingURL=simple_markdown_components.
|
|
180
|
+
//# sourceMappingURL=simple_markdown_components.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simple_markdown_components.js","sourceRoot":"","sources":["../../../../src/components/simple_markdown/simple_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AAE,IAAI,OAAO,EAAE,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CACpC,KAAC,kBAAkB,IAAC,EAAE,EAAE,EAAE,EAAE,gBAAgB,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,SAAS,YAAG,QAAQ,GAAsB,CACtH,CAAC,CAAC,CAAC,CACA,CAAC,yBAAO,QAAQ,GAAQ,CAAC,CAAC,0DAA0D;KACvF,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC;IAChD,EAAE,EAAE,SAAS;IACb,EAAE,EAAE,MAAM;IACV,WAAW,EAAE,YAAY;CAC5B,CAAC,CAAA;6BAC2B,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,eAAe;oBAC5C,KAAK,CAAC,KAAK,CAAC,OAAO;;aAE1B,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS;;;;;CAKzC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAA;;;;;;4BAMb,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM;mBACnC,KAAK,CAAC,KAAK,CAAC,OAAO;;;;;;;;;CASrC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { type ForwardedRef } from 'react';
|
|
2
2
|
import type { IconComponent } from '@apify/ui-icons';
|
|
3
|
-
import { type MarginSpacingProps, type RegularBoxProps } from './box.
|
|
4
|
-
import { type RegularLinkProps } from './link.
|
|
3
|
+
import { type MarginSpacingProps, type RegularBoxProps } from './box.js';
|
|
4
|
+
import { type RegularLinkProps } from './link.js';
|
|
5
5
|
type TagSize = typeof TAG_SIZES[number];
|
|
6
6
|
export declare const TAG_SIZES: readonly ["large", "medium", "small"];
|
|
7
7
|
type TagVariant = typeof TAG_VARIANTS[number];
|
|
@@ -27,7 +27,7 @@ export type TagProps<T extends TagNodeType> = RegularBoxProps & MarginSpacingPro
|
|
|
27
27
|
/**
|
|
28
28
|
* Component for displaying inherenly interactive chip descendant
|
|
29
29
|
*/
|
|
30
|
-
declare function TagWrapper<T extends TagNodeType>({ as, size, variant, LeadingIcon, TrailingIcon, children, ...props }: TagProps<T>, ref: ForwardedRef<TagNodePropsMap[T]['element']>):
|
|
30
|
+
declare function TagWrapper<T extends TagNodeType>({ as, size, variant, LeadingIcon, TrailingIcon, children, ...props }: TagProps<T>, ref: ForwardedRef<TagNodePropsMap[T]['element']>): import("react/jsx-runtime").JSX.Element;
|
|
31
31
|
declare namespace TagWrapper {
|
|
32
32
|
var displayName: string;
|
|
33
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag.d.ts","sourceRoot":"","sources":["../../../src/components/tag.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,YAAY,EAAc,MAAM,OAAO,CAAC;AAG7D,OAAO,KAAK,EAAE,aAAa,EAAY,MAAM,iBAAiB,CAAC;AAI/D,OAAO,EAAO,KAAK,kBAAkB,EAAE,KAAK,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"tag.d.ts","sourceRoot":"","sources":["../../../src/components/tag.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,YAAY,EAAc,MAAM,OAAO,CAAC;AAG7D,OAAO,KAAK,EAAE,aAAa,EAAY,MAAM,iBAAiB,CAAC;AAI/D,OAAO,EAAO,KAAK,kBAAkB,EAAE,KAAK,eAAe,EAAE,MAAM,UAAU,CAAC;AAC9E,OAAO,EAAQ,KAAK,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAExD,KAAK,OAAO,GAAG,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC;AAExC,eAAO,MAAM,SAAS,uCAAwC,CAAC;AAiC/D,KAAK,UAAU,GAAG,OAAO,YAAY,CAAC,MAAM,CAAC,CAAC;AAE9C,eAAO,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CAAE,KACzE,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
2
3
|
import styled, { css } from 'styled-components';
|
|
3
4
|
import { theme } from '../design_system/theme.js';
|
|
4
|
-
import { Box } from './box.
|
|
5
|
-
import { Link } from './link.
|
|
5
|
+
import { Box } from './box.js';
|
|
6
|
+
import { Link } from './link.js';
|
|
6
7
|
export const TAG_SIZES = ['large', 'medium', 'small'];
|
|
7
8
|
const TAG_ICON_SIZES = {
|
|
8
9
|
large: '20',
|
|
@@ -113,14 +114,10 @@ const StyledTag = styled(Box) `
|
|
|
113
114
|
*/
|
|
114
115
|
function TagWrapper({ as, size = 'small', variant = 'primary', LeadingIcon, TrailingIcon, children, ...props }, ref) {
|
|
115
116
|
const component = (as === 'a' ? Link : as ?? 'button');
|
|
116
|
-
return (
|
|
117
|
-
{LeadingIcon && <LeadingIcon size={TAG_ICON_SIZES[size]}/>}
|
|
118
|
-
{children}
|
|
119
|
-
{TrailingIcon && <TrailingIcon size={TAG_ICON_SIZES[size]}/>}
|
|
120
|
-
</StyledTag>);
|
|
117
|
+
return (_jsxs(StyledTag, { as: component, ref: ref, "$variant": variant, "$size": size, ...props, children: [LeadingIcon && _jsx(LeadingIcon, { size: TAG_ICON_SIZES[size] }), children, TrailingIcon && _jsx(TrailingIcon, { size: TAG_ICON_SIZES[size] })] }));
|
|
121
118
|
}
|
|
122
119
|
;
|
|
123
120
|
TagWrapper.displayName = 'Tag';
|
|
124
121
|
// `forwardRef` can't handle generic types, should be fixable with React 19
|
|
125
122
|
export const Tag = forwardRef(TagWrapper);
|
|
126
|
-
//# sourceMappingURL=tag.
|
|
123
|
+
//# sourceMappingURL=tag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tag.js","sourceRoot":"","sources":["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,CAAC,WAAW,GAAG,KAAK,CAAC;AAE/B,2EAA2E;AAC3E,MAAM,CAAC,MAAM,GAAG,GAAG,UAAU,CAAC,UAAU,CAEN,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { TextBaseProps } from './text_base.
|
|
2
|
+
import type { TextBaseProps } from './text_base.js';
|
|
3
3
|
type HeadingContentType = 'heading1' | 'heading2' | 'heading3' | 'heading4' | 'heading5' | 'heading6';
|
|
4
4
|
interface HeadingContentTransientProps {
|
|
5
5
|
type?: HeadingContentType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heading_content.d.ts","sourceRoot":"","sources":["../../../../src/components/text/heading_content.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"heading_content.d.ts","sourceRoot":"","sources":["../../../../src/components/text/heading_content.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAGpD,KAAK,kBAAkB,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,CAAC;AAEtG,UAAU,4BAA4B;IAClC,IAAI,CAAC,EAAE,kBAAkB,CAAC;CAC7B;AAeD,MAAM,MAAM,mBAAmB,GAAG,4BAA4B,GAAG,aAAa,CAAC;AAe/E,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAaxD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import styled, { css } from 'styled-components';
|
|
3
3
|
import { theme } from '../../design_system/theme.js';
|
|
4
|
-
import { TextBaseComponent } from './text_base.
|
|
4
|
+
import { TextBaseComponent } from './text_base.js';
|
|
5
5
|
;
|
|
6
6
|
const getContentHeadingStyles = (headingType) => css `
|
|
7
7
|
${theme.typography.content.mobile[headingType]}
|
|
@@ -26,6 +26,6 @@ const StyledHeadingContent = styled(TextBaseComponent) `
|
|
|
26
26
|
${(props) => getContentHeadingStyles(props.$type || 'heading1')}
|
|
27
27
|
`;
|
|
28
28
|
export const HeadingContent = ({ type, as, ...rest }) => {
|
|
29
|
-
return (
|
|
29
|
+
return (_jsx(StyledHeadingContent, { "$type": type, forwardedAs: as || HEADING_CONTENT_DEFAULT_ELEMENTS[type || 'heading1'], m: 'none', ...rest }));
|
|
30
30
|
};
|
|
31
|
-
//# sourceMappingURL=heading_content.
|
|
31
|
+
//# sourceMappingURL=heading_content.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"heading_content.js","sourceRoot":"","sources":["../../../../src/components/text/heading_content.tsx"],"names":[],"mappings":";AACA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAGrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAMlD,CAAC;AAEF,MAAM,uBAAuB,GAAG,CAAC,WAA+B,EAAE,EAAE,CAAC,GAAG,CAAA;MAClE,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC;;yBAEzB,KAAK,CAAC,MAAM,CAAC,MAAM;UAClC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC;;;yBAG7B,KAAK,CAAC,MAAM,CAAC,OAAO;UACnC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC;;CAEtD,CAAC;AAKF,MAAM,gCAAgC,GAAG;IACrC,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;CACR,CAAC;AAEX,MAAM,oBAAoB,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAA2B;MAC3E,CAAC,KAAK,EAAE,EAAE,CAAC,uBAAuB,CAAC,KAAK,CAAC,KAAK,IAAI,UAAU,CAAC;CAClE,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAkC,CAAC,EAC1D,IAAI,EACJ,EAAE,EACF,GAAG,IAAI,EACV,EAAE,EAAE;IACD,OAAO,CACH,KAAC,oBAAoB,aACV,IAAI,EACX,WAAW,EAAE,EAAE,IAAI,gCAAgC,CAAC,IAAI,IAAI,UAAU,CAAC,EACvE,CAAC,EAAC,MAAM,KACJ,IAAI,GACV,CACL,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { TextBaseProps } from './text_base.
|
|
2
|
+
import type { TextBaseProps } from './text_base.js';
|
|
3
3
|
type HeadingMarketingType = 'titleXs' | 'titleS' | 'titleM' | 'titleL' | 'titleXl' | 'title2xl' | 'title3xl';
|
|
4
4
|
interface HeadingMarketingTransientProps {
|
|
5
5
|
type?: HeadingMarketingType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heading_marketing.d.ts","sourceRoot":"","sources":["../../../../src/components/text/heading_marketing.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"heading_marketing.d.ts","sourceRoot":"","sources":["../../../../src/components/text/heading_marketing.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAGpD,KAAK,oBAAoB,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;AAE7G,UAAU,8BAA8B;IACpC,IAAI,CAAC,EAAE,oBAAoB,CAAC;CAC/B;AAGD,MAAM,MAAM,qBAAqB,GAAG,8BAA8B,GAAG,aAAa,CAAC;AA0BnF,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAa5D,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
import { theme } from '../../design_system/theme.js';
|
|
4
|
-
import { TextBaseComponent } from './text_base.
|
|
4
|
+
import { TextBaseComponent } from './text_base.js';
|
|
5
5
|
;
|
|
6
6
|
const HEADING_MARKETING_DEFAULT_ELEMENTS = {
|
|
7
7
|
titleXs: 'h6',
|
|
@@ -26,6 +26,6 @@ const StyledHeadingMarketing = styled(TextBaseComponent) `
|
|
|
26
26
|
`}
|
|
27
27
|
`;
|
|
28
28
|
export const HeadingMarketing = ({ type, as, ...rest }) => {
|
|
29
|
-
return (
|
|
29
|
+
return (_jsx(StyledHeadingMarketing, { "$type": type, forwardedAs: as || HEADING_MARKETING_DEFAULT_ELEMENTS[type || 'titleL'], m: 'none', ...rest }));
|
|
30
30
|
};
|
|
31
|
-
//# sourceMappingURL=heading_marketing.
|
|
31
|
+
//# sourceMappingURL=heading_marketing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"heading_marketing.js","sourceRoot":"","sources":["../../../../src/components/text/heading_marketing.tsx"],"names":[],"mappings":";AACA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAGrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAMlD,CAAC;AAKF,MAAM,kCAAkC,GAA+C;IACnF,OAAO,EAAE,IAAI;IACb,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,IAAI;IACZ,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;CACjB,CAAC;AAEF,MAAM,sBAAsB,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAA6B;MAC/E,CAAC,KAAK,EAAE,EAAE,CAAC;UACP,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,IAAI,QAAQ,CAAC;;mBAEjD,KAAK,CAAC,MAAM,CAAC,MAAM;cACxB,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,IAAI,QAAQ,CAAC;;;kBAGtD,KAAK,CAAC,MAAM,CAAC,OAAO;cACxB,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,IAAI,QAAQ,CAAC;;KAEpE;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAoC,CAAC,EAC9D,IAAI,EACJ,EAAE,EACF,GAAG,IAAI,EACV,EAAE,EAAE;IACD,OAAO,CACH,KAAC,sBAAsB,aACZ,IAAI,EACX,WAAW,EAAE,EAAE,IAAI,kCAAkC,CAAC,IAAI,IAAI,QAAQ,CAAC,EACvE,CAAC,EAAC,MAAM,KACJ,IAAI,GACV,CACL,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { TextBaseProps } from './text_base.
|
|
2
|
+
import type { TextBaseProps } from './text_base.js';
|
|
3
3
|
type HeadingSharedType = 'titleXs' | 'titleS' | 'titleM' | 'titleL' | 'titleXl' | 'title2xl' | 'title3xl';
|
|
4
4
|
interface HeadingSharedTransientProps {
|
|
5
5
|
type?: HeadingSharedType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heading_shared.d.ts","sourceRoot":"","sources":["../../../../src/components/text/heading_shared.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"heading_shared.d.ts","sourceRoot":"","sources":["../../../../src/components/text/heading_shared.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAGpD,KAAK,iBAAiB,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;AAE1G,UAAU,2BAA2B;IACjC,IAAI,CAAC,EAAE,iBAAiB,CAAC;CAC5B;AAGD,MAAM,MAAM,kBAAkB,GAAG,2BAA2B,GAAG,aAAa,CAAC;AA0B7E,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAa/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
import { theme } from '../../design_system/theme.js';
|
|
4
|
-
import { TextBaseComponent } from './text_base.
|
|
4
|
+
import { TextBaseComponent } from './text_base.js';
|
|
5
5
|
;
|
|
6
6
|
const HEADING_SHARED_DEFAULT_ELEMENTS = {
|
|
7
7
|
titleXs: 'h6',
|
|
@@ -26,7 +26,7 @@ const StyledHeadingShared = styled(TextBaseComponent) `
|
|
|
26
26
|
`}
|
|
27
27
|
`;
|
|
28
28
|
const HeadingShared = ({ type, as, ...rest }) => {
|
|
29
|
-
return (
|
|
29
|
+
return (_jsx(StyledHeadingShared, { "$type": type, forwardedAs: as || HEADING_SHARED_DEFAULT_ELEMENTS[type || 'titleL'], m: 'none', ...rest }));
|
|
30
30
|
};
|
|
31
31
|
export default HeadingShared;
|
|
32
|
-
//# sourceMappingURL=heading_shared.
|
|
32
|
+
//# sourceMappingURL=heading_shared.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"heading_shared.js","sourceRoot":"","sources":["../../../../src/components/text/heading_shared.tsx"],"names":[],"mappings":";AACA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAGrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAMlD,CAAC;AAKF,MAAM,+BAA+B,GAA4C;IAC7E,OAAO,EAAE,IAAI;IACb,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,IAAI;IACZ,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;CACjB,CAAC;AAEF,MAAM,mBAAmB,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAA0B;MACzE,CAAC,KAAK,EAAE,EAAE,CAAC;UACP,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,IAAI,QAAQ,CAAC;;kBAE/C,KAAK,CAAC,MAAM,CAAC,MAAM;cACvB,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,IAAI,QAAQ,CAAC;;;kBAGnD,KAAK,CAAC,MAAM,CAAC,OAAO;cACxB,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,IAAI,QAAQ,CAAC;;KAEjE;CACJ,CAAC;AAEF,MAAM,aAAa,GAAiC,CAAC,EACjD,IAAI,EACJ,EAAE,EACF,GAAG,IAAI,EACV,EAAE,EAAE;IACD,OAAO,CACH,KAAC,mBAAmB,aACT,IAAI,EACX,WAAW,EAAE,EAAE,IAAI,+BAA+B,CAAC,IAAI,IAAI,QAAQ,CAAC,EACpE,CAAC,EAAC,MAAM,KACJ,IAAI,GACV,CACL,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import HeadingShared from './heading_shared.
|
|
2
|
-
import type { SharedTextProps } from './text_shared.
|
|
3
|
-
import TextShared from './text_shared.
|
|
4
|
-
export * from './text_base.
|
|
5
|
-
export * from './text_content.
|
|
6
|
-
export * from './text_marketing.
|
|
7
|
-
export * from './heading_content.
|
|
8
|
-
export * from './heading_marketing.
|
|
1
|
+
import HeadingShared from './heading_shared.js';
|
|
2
|
+
import type { SharedTextProps } from './text_shared.js';
|
|
3
|
+
import TextShared from './text_shared.js';
|
|
4
|
+
export * from './text_base.js';
|
|
5
|
+
export * from './text_content.js';
|
|
6
|
+
export * from './text_marketing.js';
|
|
7
|
+
export * from './heading_content.js';
|
|
8
|
+
export * from './heading_marketing.js';
|
|
9
9
|
export { TextShared as Text, // Shared typography is the default
|
|
10
10
|
HeadingShared as Heading, };
|
|
11
11
|
export type { SharedTextProps, };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/text/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/text/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,UAAU,MAAM,kBAAkB,CAAC;AAE1C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AAEvC,OAAO,EACH,UAAU,IAAI,IAAI,EAAE,mCAAmC;AACvD,aAAa,IAAI,OAAO,GAC3B,CAAC;AAEF,YAAY,EACR,eAAe,GAClB,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import HeadingShared from './heading_shared.
|
|
2
|
-
import TextShared from './text_shared.
|
|
3
|
-
export * from './text_base.
|
|
4
|
-
export * from './text_content.
|
|
5
|
-
export * from './text_marketing.
|
|
6
|
-
export * from './heading_content.
|
|
7
|
-
export * from './heading_marketing.
|
|
1
|
+
import HeadingShared from './heading_shared.js';
|
|
2
|
+
import TextShared from './text_shared.js';
|
|
3
|
+
export * from './text_base.js';
|
|
4
|
+
export * from './text_content.js';
|
|
5
|
+
export * from './text_marketing.js';
|
|
6
|
+
export * from './heading_content.js';
|
|
7
|
+
export * from './heading_marketing.js';
|
|
8
8
|
export { TextShared as Text, // Shared typography is the default
|
|
9
9
|
HeadingShared as Heading, // Shared typography is the default
|
|
10
10
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/text/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/text/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,qBAAqB,CAAC;AAEhD,OAAO,UAAU,MAAM,kBAAkB,CAAC;AAE1C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AAEvC,OAAO,EACH,UAAU,IAAI,IAAI,EAAE,mCAAmC;AACvD,aAAa,IAAI,OAAO,EAAE,mCAAmC;EAChE,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { WithTransientProps } from '../../type_utils.js';
|
|
3
|
-
import type { BoxProps } from '../box.
|
|
3
|
+
import type { BoxProps } from '../box.js';
|
|
4
4
|
export interface TransientTextBaseProps {
|
|
5
5
|
italic?: boolean;
|
|
6
6
|
uppercase?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text_base.d.ts","sourceRoot":"","sources":["../../../../src/components/text/text_base.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"text_base.d.ts","sourceRoot":"","sources":["../../../../src/components/text/text_base.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAG1C,MAAM,WAAW,sBAAsB;IACnC,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAA;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,MAAM,mBAAmB,GAAG,kBAAkB,CAAC,sBAAsB,CAAC,CAAC;AAC7E,MAAM,MAAM,aAAa,GAAG,sBAAsB,GAAG,QAAQ,CAAC;AAoB9D,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAgBrD,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import styled, { css } from 'styled-components';
|
|
3
|
-
import { Box } from '../box.
|
|
3
|
+
import { Box } from '../box.js';
|
|
4
4
|
;
|
|
5
5
|
const StyledText = styled(Box) `
|
|
6
6
|
${(props) => props.$italic && css `
|
|
@@ -19,5 +19,5 @@ const StyledText = styled(Box) `
|
|
|
19
19
|
color: ${props.$color};
|
|
20
20
|
`}
|
|
21
21
|
`;
|
|
22
|
-
export const TextBaseComponent = ({ italic, align, color, uppercase, as, ...rest }) => (
|
|
23
|
-
//# sourceMappingURL=text_base.
|
|
22
|
+
export const TextBaseComponent = ({ italic, align, color, uppercase, as, ...rest }) => (_jsx(StyledText, { "$italic": italic, "$align": align, "$color": color, "$uppercase": uppercase, forwardedAs: as, ...rest }));
|
|
23
|
+
//# sourceMappingURL=text_base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text_base.js","sourceRoot":"","sources":["../../../../src/components/text/text_base.tsx"],"names":[],"mappings":";AACA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAIhD,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAO/B,CAAC;AAKF,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,CAAqB;MAC7C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,IAAI,GAAG,CAAA;;KAEhC;;MAEC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,IAAI,GAAG,CAAA;;KAEnC;;MAEC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,IAAI,GAAG,CAAA;sBACd,KAAK,CAAC,MAAM;KAC7B;;MAEC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,IAAI,GAAG,CAAA;iBACnB,KAAK,CAAC,MAAM;KACxB;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAA4B,CAAC,EACvD,MAAM,EACN,KAAK,EACL,KAAK,EACL,SAAS,EACT,EAAE,EACF,GAAG,IAAI,EACV,EAAE,EAAE,CAAC,CACF,KAAC,UAAU,eACE,MAAM,YACP,KAAK,YACL,KAAK,gBACD,SAAS,EACrB,WAAW,EAAE,EAAE,KACX,IAAI,GACV,CACL,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { TextBaseProps } from './text_base.jsx';
|
|
1
|
+
import type { TextBaseProps } from './text_base.js';
|
|
3
2
|
export type ContentTextType = 'paragraph' | 'snippet';
|
|
4
3
|
export type ContentTextWeight = 'normal' | 'bold';
|
|
5
4
|
export interface TransientContentTextProps {
|
|
@@ -7,5 +6,5 @@ export interface TransientContentTextProps {
|
|
|
7
6
|
weight?: ContentTextWeight;
|
|
8
7
|
}
|
|
9
8
|
export type ContentTextProps = TransientContentTextProps & TextBaseProps;
|
|
10
|
-
export declare const TextContent:
|
|
9
|
+
export declare const TextContent: import("react").ForwardRefExoticComponent<ContentTextProps & import("react").RefAttributes<HTMLElement | undefined>>;
|
|
11
10
|
//# sourceMappingURL=text_content.d.ts.map
|