@up42/up-components 0.12.12 → 0.13.1

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.
@@ -1,10 +1,10 @@
1
1
  /// <reference types="react" />
2
- export interface CodeBoxProps {
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-codebox
8
+ * Documentation: https://up-components.up42.dev/?path=/docs/data-display-codeinline
9
9
  */
10
- export declare const CodeBox: ({ label, text, "data-testid": dataTestId }: CodeBoxProps) => JSX.Element;
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>, {}>;
@@ -85,3 +85,4 @@ export { default as QuestionMark } from '@mui/icons-material/QuestionMark';
85
85
  export { default as ShoppingCartOutlined } from '@mui/icons-material/ShoppingCartOutlined';
86
86
  export { default as VisibilityOffOutlined } from '@mui/icons-material/VisibilityOffOutlined';
87
87
  export { default as VisibilityOutlined } from '@mui/icons-material/VisibilityOutlined';
88
+ export { default as LocalOfferOutlined } from '@mui/icons-material/LocalOfferOutlined';
@@ -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 { CodeBox, type CodeBoxProps } from './components/CodeBox/CodeBox';
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';