@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.
- 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/global/icons/index.d.ts +1 -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/global/icons/index.d.ts +1 -0
- package/dist/esm/types/index.d.ts +2 -1
- package/dist/index.d.ts +22 -4
- package/package.json +3 -1
- /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 @@
|
|
|
1
|
+
export {};
|
|
@@ -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 @@
|
|
|
1
|
+
export {};
|
|
@@ -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 {
|
|
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';
|
package/dist/index.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ import QuestionMark from '@mui/icons-material/QuestionMark';
|
|
|
40
40
|
import ShoppingCartOutlined from '@mui/icons-material/ShoppingCartOutlined';
|
|
41
41
|
import VisibilityOffOutlined from '@mui/icons-material/VisibilityOffOutlined';
|
|
42
42
|
import VisibilityOutlined from '@mui/icons-material/VisibilityOutlined';
|
|
43
|
+
import LocalOfferOutlined from '@mui/icons-material/LocalOfferOutlined';
|
|
43
44
|
import { TableProps as TableProps$1 } from '@mui/material/Table';
|
|
44
45
|
import { TableBodyProps as TableBodyProps$1 } from '@mui/material/TableBody';
|
|
45
46
|
import { TableCellProps as TableCellProps$1 } from '@mui/material/TableCell';
|
|
@@ -1864,6 +1865,7 @@ declare const icons_QuestionMark: typeof QuestionMark;
|
|
|
1864
1865
|
declare const icons_ShoppingCartOutlined: typeof ShoppingCartOutlined;
|
|
1865
1866
|
declare const icons_VisibilityOffOutlined: typeof VisibilityOffOutlined;
|
|
1866
1867
|
declare const icons_VisibilityOutlined: typeof VisibilityOutlined;
|
|
1868
|
+
declare const icons_LocalOfferOutlined: typeof LocalOfferOutlined;
|
|
1867
1869
|
declare namespace icons {
|
|
1868
1870
|
export {
|
|
1869
1871
|
SvgAlarmBell as AlarmBell,
|
|
@@ -1953,6 +1955,7 @@ declare namespace icons {
|
|
|
1953
1955
|
icons_ShoppingCartOutlined as ShoppingCartOutlined,
|
|
1954
1956
|
icons_VisibilityOffOutlined as VisibilityOffOutlined,
|
|
1955
1957
|
icons_VisibilityOutlined as VisibilityOutlined,
|
|
1958
|
+
icons_LocalOfferOutlined as LocalOfferOutlined,
|
|
1956
1959
|
};
|
|
1957
1960
|
}
|
|
1958
1961
|
|
|
@@ -2025,15 +2028,30 @@ declare type DocumentationPopoverProps = {
|
|
|
2025
2028
|
*/
|
|
2026
2029
|
declare const DocumentationPopover: ({ content, linkPath, linkText, heading, id }: DocumentationPopoverProps) => JSX.Element;
|
|
2027
2030
|
|
|
2028
|
-
interface
|
|
2031
|
+
interface CodeInlineProps {
|
|
2029
2032
|
text: string;
|
|
2030
2033
|
label?: string;
|
|
2031
2034
|
'data-testid'?: string;
|
|
2032
2035
|
}
|
|
2033
2036
|
/**
|
|
2034
|
-
* Documentation: https://up-components.up42.dev/?path=/docs/data-display-
|
|
2037
|
+
* Documentation: https://up-components.up42.dev/?path=/docs/data-display-codeinline
|
|
2035
2038
|
*/
|
|
2036
|
-
declare const
|
|
2039
|
+
declare const CodeInline: ({ label, text, "data-testid": dataTestId }: CodeInlineProps) => JSX.Element;
|
|
2040
|
+
|
|
2041
|
+
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';
|
|
2042
|
+
interface CodeSnippetProps {
|
|
2043
|
+
code: string;
|
|
2044
|
+
language: Languages;
|
|
2045
|
+
/**
|
|
2046
|
+
* limit the code height. defaults to 512px, **roughly** 22 lines
|
|
2047
|
+
*/
|
|
2048
|
+
maxCodeHeight?: string;
|
|
2049
|
+
sx?: SxProps<Theme>;
|
|
2050
|
+
}
|
|
2051
|
+
/**
|
|
2052
|
+
* Documentation: https://up-components.up42.dev/?path=/docs/data-display-CodeSnippet
|
|
2053
|
+
*/
|
|
2054
|
+
declare const CodeSnippet: ({ code, language, sx, maxCodeHeight }: CodeSnippetProps) => JSX.Element;
|
|
2037
2055
|
|
|
2038
2056
|
declare type TableProps = MUIGlobalOmit<TableProps$1>;
|
|
2039
2057
|
/**
|
|
@@ -2153,4 +2171,4 @@ declare type ContextState = {
|
|
|
2153
2171
|
*/
|
|
2154
2172
|
declare const useAlert: () => ContextState;
|
|
2155
2173
|
|
|
2156
|
-
export { Alert, AlertProps, Avatar, AvatarProps, Badge, BadgeProps, Banner, BannerProps, Box, BoxProps, Button, ButtonProps, Checkbox, CheckboxProps, Chip, ChipProps,
|
|
2174
|
+
export { Alert, AlertProps, Avatar, AvatarProps, Badge, BadgeProps, Banner, BannerProps, Box, BoxProps, Button, ButtonProps, Checkbox, CheckboxProps, Chip, ChipProps, CodeInline, CodeInlineProps, CodeSnippet, CodeSnippetProps, Container, ContainerProps, ControlButton, ControlButtonProps, CopyButton, CopyButtonProps, CreateAlertProps, DataGrid, DataGridProps, DatePickerDateType, DateTime, DateTimeProps, DocumentationPopover, DocumentationPopoverProps, EmptyState, EmptyStateProps, FormCheckbox, FormCheckboxProps, FormDatePicker, FormDatePickerProps, FormDateRangePicker, FormDateRangePickerProps, FormInput, FormInputProps, FormRadio, FormRadioProps, FormSelect, FormSelectProps, FormSwitch, FormSwitchProps, Icon, IconProps, InfoCard, InfoCardProps, InfoModal, InfoModalProps, InfoPopover, InfoPopoverProps, Input, InputProps, Link, LinkProps, Loading, LoadingProps, Menu, MenuItem, MenuItemProps, MenuProps, Modal, ModalProps, NotFound, PageHeader, PageHeaderProps, PaginatedResponse, Popover, PopoverProps, Radio, RadioProps, Select, SelectProps, Slider, SliderProps, Switch, SwitchProps, Tab, TabGroup, TabGroupProps, TabProps, Table, TableBody, TableBodyProps, TableCell, TableCellProps, TableContainer, TableContainerProps, TableFooter, TableFooterProps, TableHead, TableHeadProps, TablePagination, TablePaginationProps, TableProps, TableRow, TableRowProps, TableSortLabel, TableSortLabelProps, Tabs, TabsProps, Tag, TagProps, Tooltip, TooltipProps, Typography, TypographyProps, UpComponentsProvider, capitalize, copyToClipboard, formatDate, formatFileSize, formatNumber, theme, useAlert, useQueryParams, useRemotePagination };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@up42/up-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"description": "UP42 Component Library",
|
|
5
5
|
"author": "Axel Fuhrmann axel.fuhrmann@up42.com",
|
|
6
6
|
"license": "ISC",
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@up42/design-system-tokens": "^3.0.1",
|
|
29
29
|
"dayjs": "^1.11.7",
|
|
30
|
+
"prismjs": "^1.29.0",
|
|
30
31
|
"react-markdown": "^8.0.3"
|
|
31
32
|
},
|
|
32
33
|
"devDependencies": {
|
|
@@ -59,6 +60,7 @@
|
|
|
59
60
|
"@testing-library/react": "^12.1.2",
|
|
60
61
|
"@testing-library/react-hooks": "^8.0.1",
|
|
61
62
|
"@types/jest": "^27.4.0",
|
|
63
|
+
"@types/prismjs": "^1.26.0",
|
|
62
64
|
"@types/react": "^17.0.38",
|
|
63
65
|
"@typescript-eslint/eslint-plugin": "^5.10.0",
|
|
64
66
|
"@typescript-eslint/parser": "^5.10.0",
|
/package/dist/cjs/types/components/{CodeBox/CodeBox.test.d.ts → CodeInline/CodeInline.test.d.ts}
RENAMED
|
File without changes
|