@up42/up-components 0.12.11 → 0.13.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/dist/cjs/index.js +9 -1
- package/dist/cjs/types/components/{CodeBox/CodeBox.d.ts → CodeInline/CodeInline.d.ts} +3 -3
- package/dist/cjs/types/components/CodeSnippet/CodeSnippet.d.ts +23 -0
- package/dist/cjs/types/components/CodeSnippet/Pre.d.ts +2 -0
- package/dist/cjs/types/index.d.ts +2 -1
- package/dist/esm/index.js +9 -1
- package/dist/esm/types/components/{CodeBox/CodeBox.d.ts → CodeInline/CodeInline.d.ts} +3 -3
- package/dist/esm/types/components/CodeInline/CodeInline.test.d.ts +1 -0
- package/dist/esm/types/components/CodeSnippet/CodeSnippet.d.ts +23 -0
- package/dist/esm/types/components/CodeSnippet/CodeSnippet.test.d.ts +1 -0
- package/dist/esm/types/components/CodeSnippet/Pre.d.ts +2 -0
- package/dist/esm/types/index.d.ts +2 -1
- package/dist/index.d.ts +19 -4
- package/package.json +4 -2
- package/dist/cjs/types/components/Modal/Modal.overrides.d.ts +0 -2
- package/dist/esm/types/components/Modal/Modal.overrides.d.ts +0 -2
- /package/dist/cjs/types/components/{CodeBox/CodeBox.test.d.ts → CodeInline/CodeInline.test.d.ts} +0 -0
- /package/dist/{esm/types/components/CodeBox/CodeBox.test.d.ts → cjs/types/components/CodeSnippet/CodeSnippet.test.d.ts} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export interface
|
|
2
|
+
export interface CodeInlineProps {
|
|
3
3
|
text: string;
|
|
4
4
|
label?: string;
|
|
5
5
|
'data-testid'?: string;
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
|
-
* Documentation: https://up-components.up42.dev/?path=/docs/data-display-
|
|
8
|
+
* Documentation: https://up-components.up42.dev/?path=/docs/data-display-codeinline
|
|
9
9
|
*/
|
|
10
|
-
export declare const
|
|
10
|
+
export declare const CodeInline: ({ label, text, "data-testid": dataTestId }: CodeInlineProps) => JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SxProps, Theme } from '@mui/material';
|
|
3
|
+
import 'prismjs/plugins/line-numbers/prism-line-numbers';
|
|
4
|
+
import 'prismjs/components/prism-json';
|
|
5
|
+
import 'prismjs/components/prism-python';
|
|
6
|
+
import 'prismjs/components/prism-kotlin';
|
|
7
|
+
import 'prismjs/components/prism-java';
|
|
8
|
+
import 'prismjs/components/prism-julia';
|
|
9
|
+
import 'prismjs/components/prism-bash';
|
|
10
|
+
export declare type Languages = 'DFS' | 'atom' | 'bash' | 'clike' | 'css' | 'extend' | 'html' | 'insertBefore' | 'java' | 'javascript' | 'js' | 'json' | 'julia' | 'kotlin' | 'kt' | 'kts' | 'markup' | 'mathml' | 'plain' | 'plaintext' | 'py' | 'python' | 'rss' | 'sh' | 'shell' | 'ssml' | 'svg' | 'text' | 'txt' | 'webmanifest' | 'xml';
|
|
11
|
+
export interface CodeSnippetProps {
|
|
12
|
+
code: string;
|
|
13
|
+
language: Languages;
|
|
14
|
+
/**
|
|
15
|
+
* limit the code height. defaults to 512px, **roughly** 22 lines
|
|
16
|
+
*/
|
|
17
|
+
maxCodeHeight?: string;
|
|
18
|
+
sx?: SxProps<Theme>;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Documentation: https://up-components.up42.dev/?path=/docs/data-display-CodeSnippet
|
|
22
|
+
*/
|
|
23
|
+
export declare const CodeSnippet: ({ code, language, sx, maxCodeHeight }: CodeSnippetProps) => JSX.Element;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Pre: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLPreElement>, HTMLPreElement>, {}>;
|
|
@@ -45,7 +45,8 @@ export { Badge, type BadgeProps } from './components/Badge/Badge';
|
|
|
45
45
|
export { Tag, type TagProps } from './components/Tag/Tag';
|
|
46
46
|
export { DateTime, type DateTimeProps } from './components/DateTime/DateTime';
|
|
47
47
|
export { DocumentationPopover, type DocumentationPopoverProps, } from './components/DocumentationPopover/DocumentationPopover';
|
|
48
|
-
export {
|
|
48
|
+
export { CodeInline, type CodeInlineProps } from './components/CodeInline/CodeInline';
|
|
49
|
+
export { CodeSnippet, type CodeSnippetProps } from './components/CodeSnippet/CodeSnippet';
|
|
49
50
|
export { Table, TableBody, TableCell, TableHead, TableContainer, TableRow, TableFooter, TablePagination, TableSortLabel, type TableProps, type TableBodyProps, type TableCellProps, type TableHeadProps, type TableContainerProps, type TableRowProps, type TableFooterProps, type TablePaginationProps, type TableSortLabelProps, } from './components/Table/Table';
|
|
50
51
|
export { DataGrid, type DataGridProps, type GridColDef, type GridRenderCellParams, type GridRowId, type GridSelectionModel, type GridSortModel, } from './components/DataGrid/DataGrid';
|
|
51
52
|
export { capitalize } from './utils/helpers/capitalize';
|