@up42/up-components 1.8.1 → 1.8.3

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.
@@ -22,4 +22,4 @@ export declare type EmptyStateProps = MUIGlobalOmit<Omit<BoxProps, 'component'>,
22
22
  /**
23
23
  * Documentation: https://up-components.up42.com/?path=/docs/patterns-emptystate--docs
24
24
  */
25
- export declare const EmptyState: ({ icon: Icon, title, subTitle, action, sx, ...props }: EmptyStateProps) => JSX.Element;
25
+ export declare const EmptyState: ({ icon: CustomIcon, title, subTitle, action, sx, ...props }: EmptyStateProps) => JSX.Element;
@@ -6,4 +6,4 @@ export declare type InfoPopoverProps = InfoCardProps & {
6
6
  /**
7
7
  * Documentation: https://up-components.up42.com/?path=/docs/patterns-popovers-infopopover--docs
8
8
  */
9
- export declare const InfoPopover: ({ id, icon: Icon, actions, title, children, sx, ...props }: InfoPopoverProps) => JSX.Element;
9
+ export declare const InfoPopover: ({ id, icon: CustomIcon, actions, title, children, sx, ...props }: InfoPopoverProps) => JSX.Element;
@@ -1,17 +1,21 @@
1
1
  import React from 'react';
2
2
  import { TypographyProps as MUITypographyProps } from '@mui/material/Typography';
3
- export declare type TypographyProps<C extends React.ElementType = 'p'> = MUITypographyProps<C, {
4
- component?: C;
5
- innerRef?: TypographyProps['ref'];
6
- }>;
3
+ export declare type TypographyProps = MUITypographyProps & {
4
+ component?: React.ElementType;
5
+ };
7
6
  /**
8
- * Tokens: https://up-components.up42.com/?path=/docs/tokens-typography--docs
7
+ * Douglas `variant` prop migration helper:
8
+ * - `h1` -> `heading`
9
+ * - `h2` -> `headingSmall`
10
+ * - `h3` -> `headingXSmall`
11
+ * - `body1` -> `body`
12
+ * - `caption` ->`note`
13
+ * - `overline` -> `label`
14
+ * - (no variant) -> `body`
15
+ *
9
16
  * Documentation: https://up-components.up42.com/?path=/docs/data-display-typography--docs
10
17
  */
11
- export declare const Typography: React.ForwardRefExoticComponent<Pick<{
12
- component?: React.ElementType<any> | undefined;
13
- innerRef?: TypographyProps['ref'];
14
- } & import("@mui/system").SystemProps<import("@mui/material").Theme> & {
18
+ export declare const Typography: React.ForwardRefExoticComponent<Pick<import("@mui/system").SystemProps<import("@mui/material").Theme> & {
15
19
  align?: "inherit" | "left" | "center" | "right" | "justify" | undefined;
16
20
  children?: React.ReactNode;
17
21
  classes?: Partial<import("@mui/material/Typography").TypographyClasses> | undefined;
@@ -19,6 +23,10 @@ export declare const Typography: React.ForwardRefExoticComponent<Pick<{
19
23
  noWrap?: boolean | undefined;
20
24
  paragraph?: boolean | undefined;
21
25
  sx?: import("@mui/system").SxProps<import("@mui/material").Theme> | undefined;
22
- variant?: "button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "overline" | "body1" | "body2" | "subtitle1" | "subtitle2" | undefined;
23
- variantMapping?: Partial<Record<"button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "overline" | "body1" | "body2" | "subtitle1" | "subtitle2", string>> | undefined;
24
- } & import("@mui/material/OverridableComponent").CommonProps & Omit<any, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "align" | "component" | "variant" | "innerRef" | ("color" | "fontSize" | "p" | "height" | "width" | "display" | "fontFamily" | "fontStyle" | "fontWeight" | "letterSpacing" | "order" | "overflow" | "visibility" | "left" | "right" | "top" | "bottom" | "border" | "boxShadow" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "boxSizing" | "columnGap" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "justifyContent" | "justifyItems" | "justifySelf" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "whiteSpace" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping">, string | number | symbol> & React.RefAttributes<HTMLParagraphElement>>;
26
+ variant?: "body" | "button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "label" | "heading" | "note" | "inherit" | "overline" | "subtitle1" | "subtitle2" | "body1" | "body2" | "headingSmall" | "headingXSmall" | undefined;
27
+ variantMapping?: Partial<Record<"body" | "button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "label" | "heading" | "note" | "inherit" | "overline" | "subtitle1" | "subtitle2" | "body1" | "body2" | "headingSmall" | "headingXSmall", string>> | undefined;
28
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & {
29
+ ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
30
+ }, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "align" | "variant" | "variantMapping" | ("color" | "fontSize" | "p" | "height" | "width" | "display" | "fontFamily" | "fontStyle" | "fontWeight" | "letterSpacing" | "order" | "overflow" | "visibility" | "left" | "right" | "top" | "bottom" | "border" | "boxShadow" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "boxSizing" | "columnGap" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "justifyContent" | "justifyItems" | "justifySelf" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "whiteSpace" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "gutterBottom" | "noWrap" | "paragraph"> & {
31
+ component?: React.ElementType<any> | undefined;
32
+ }, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "slot" | "title" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "align" | "component" | "variant" | "variantMapping" | ("color" | "fontSize" | "p" | "height" | "width" | "display" | "fontFamily" | "fontStyle" | "fontWeight" | "letterSpacing" | "order" | "overflow" | "visibility" | "left" | "right" | "top" | "bottom" | "border" | "boxShadow" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "boxSizing" | "columnGap" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "justifyContent" | "justifyItems" | "justifySelf" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "whiteSpace" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "gutterBottom" | "noWrap" | "paragraph"> & React.RefAttributes<unknown>>;
@@ -1,2 +1,72 @@
1
+ /// <reference types="react" />
1
2
  import { OverridesStyleRules } from '@mui/material/styles/overrides';
2
- export declare const typographyOverrides: OverridesStyleRules;
3
+ import { TypographyOptions } from '@mui/material/styles/createTypography';
4
+ /**
5
+ * Adds new variants to the Typography component
6
+ * @see https://mui.com/material-ui/customization/typography/#adding-amp-disabling-variants
7
+ */
8
+ declare module '@mui/material/styles' {
9
+ interface TypographyVariants {
10
+ heading: React.CSSProperties;
11
+ headingSmall: React.CSSProperties;
12
+ headingXSmall: React.CSSProperties;
13
+ body: React.CSSProperties;
14
+ label: React.CSSProperties;
15
+ note: React.CSSProperties;
16
+ }
17
+ /** Allow using new properties in `createTheme` */
18
+ interface TypographyVariantsOptions {
19
+ heading?: React.CSSProperties;
20
+ headingSmall?: React.CSSProperties;
21
+ headingXSmall?: React.CSSProperties;
22
+ body?: React.CSSProperties;
23
+ label?: React.CSSProperties;
24
+ note?: React.CSSProperties;
25
+ }
26
+ }
27
+ /**
28
+ * Typography's variant prop options
29
+ * The properties will be merged with the existing variants
30
+ * @see https://github.com/mui/material-ui/blob/master/packages/mui-material/src/Typography/Typography.d.ts#L51
31
+ */
32
+ declare module '@mui/material/Typography' {
33
+ interface TypographyPropsVariantOverrides {
34
+ heading: true;
35
+ headingSmall: true;
36
+ headingXSmall: true;
37
+ body: true;
38
+ label: true;
39
+ note: true;
40
+ }
41
+ }
42
+ export declare const MuiTypography: OverridesStyleRules;
43
+ export declare const typographyTheme: TypographyOptions;
44
+ export declare const typographyOverrides: {
45
+ heading?: import("react").CSSProperties | undefined;
46
+ headingSmall?: import("react").CSSProperties | undefined;
47
+ headingXSmall?: import("react").CSSProperties | undefined;
48
+ body?: import("react").CSSProperties | undefined;
49
+ label?: import("react").CSSProperties | undefined;
50
+ note?: import("react").CSSProperties | undefined;
51
+ button?: import("@mui/material/styles/createTypography").TypographyStyleOptions | undefined;
52
+ caption?: import("@mui/material/styles/createTypography").TypographyStyleOptions | undefined;
53
+ h1?: import("@mui/material/styles/createTypography").TypographyStyleOptions | undefined;
54
+ h2?: import("@mui/material/styles/createTypography").TypographyStyleOptions | undefined;
55
+ h3?: import("@mui/material/styles/createTypography").TypographyStyleOptions | undefined;
56
+ h4?: import("@mui/material/styles/createTypography").TypographyStyleOptions | undefined;
57
+ h5?: import("@mui/material/styles/createTypography").TypographyStyleOptions | undefined;
58
+ h6?: import("@mui/material/styles/createTypography").TypographyStyleOptions | undefined;
59
+ overline?: import("@mui/material/styles/createTypography").TypographyStyleOptions | undefined;
60
+ subtitle1?: import("@mui/material/styles/createTypography").TypographyStyleOptions | undefined;
61
+ subtitle2?: import("@mui/material/styles/createTypography").TypographyStyleOptions | undefined;
62
+ body1?: import("@mui/material/styles/createTypography").TypographyStyleOptions | undefined;
63
+ body2?: import("@mui/material/styles/createTypography").TypographyStyleOptions | undefined;
64
+ allVariants?: import("react").CSSProperties | undefined;
65
+ fontFamily?: import("csstype").Property.FontFamily | undefined;
66
+ fontSize?: number | undefined;
67
+ fontWeightLight?: import("csstype").Property.FontWeight | undefined;
68
+ fontWeightRegular?: import("csstype").Property.FontWeight | undefined;
69
+ fontWeightMedium?: import("csstype").Property.FontWeight | undefined;
70
+ fontWeightBold?: import("csstype").Property.FontWeight | undefined;
71
+ htmlFontSize?: number | undefined;
72
+ };
@@ -71,30 +71,30 @@ export { default as Cloud } from './cloud.svg';
71
71
  export { default as BoxesGrid } from './boxes-grid.svg';
72
72
  export { default as DottedLines } from './dotted-lines.svg';
73
73
  export { default as Add } from './add.svg';
74
- export { default as AccessTime } from '@mui/icons-material/AccessTime';
75
- export { default as ArrowBack } from '@mui/icons-material/ArrowBack';
76
- export { default as ArrowDownward } from '@mui/icons-material/ArrowDownward';
77
- export { default as ArrowForward } from '@mui/icons-material/ArrowForward';
78
- export { default as ArrowUpward } from '@mui/icons-material/ArrowUpward';
79
- export { default as ArrowBackIos } from '@mui/icons-material/ArrowBackIos';
80
- export { default as AutoStoriesOutlined } from '@mui/icons-material/AutoStoriesOutlined';
81
- export { default as Balance } from '@mui/icons-material/Balance';
82
- export { default as Brightness1 } from '@mui/icons-material/Brightness1';
83
- export { default as CampaignOutlined } from '@mui/icons-material/CampaignOutlined';
84
- export { default as ContactSupportOutlined } from '@mui/icons-material/ContactSupportOutlined';
85
- export { default as ContentCopy } from '@mui/icons-material/ContentCopy';
86
- export { default as ContentCut } from '@mui/icons-material/ContentCut';
87
- export { default as ContentPaste } from '@mui/icons-material/ContentPaste';
88
- export { default as InfoOutlined } from '@mui/icons-material/InfoOutlined';
89
- export { default as KeyboardArrowDown } from '@mui/icons-material/KeyboardArrowDown';
90
- export { default as KeyboardArrowLeft } from '@mui/icons-material/KeyboardArrowLeft';
91
- export { default as KeyboardArrowRight } from '@mui/icons-material/KeyboardArrowRight';
92
- export { default as KeyboardArrowUp } from '@mui/icons-material/KeyboardArrowUp';
93
- export { default as LightbulbOutlined } from '@mui/icons-material/LightbulbOutlined';
94
- export { default as MoreHoriz } from '@mui/icons-material/MoreHoriz';
95
- export { default as Person } from '@mui/icons-material/Person';
96
- export { default as QuestionMark } from '@mui/icons-material/QuestionMark';
97
- export { default as ShoppingCartOutlined } from '@mui/icons-material/ShoppingCartOutlined';
98
- export { default as VisibilityOffOutlined } from '@mui/icons-material/VisibilityOffOutlined';
99
- export { default as VisibilityOutlined } from '@mui/icons-material/VisibilityOutlined';
100
- export { default as LocalOfferOutlined } from '@mui/icons-material/LocalOfferOutlined';
74
+ export { default as AccessTime } from './access-time-clock.svg';
75
+ export { default as ArrowBack } from './arrow-left-back.svg';
76
+ export { default as ArrowDownward } from './arrow-down.svg';
77
+ export { default as ArrowForward } from './arrow-right-forward.svg';
78
+ export { default as ArrowUpward } from './arrow-up.svg';
79
+ export { default as ArrowBackIos } from './chevron-left-back.svg';
80
+ export { default as AutoStoriesOutlined } from './book-flip-page-documentation.svg';
81
+ export { default as Balance } from './balance-scale.svg';
82
+ export { default as Brightness1 } from './brightness-dot-circle-filled.svg';
83
+ export { default as CampaignOutlined } from './megaphone-campaign-announcement.svg';
84
+ export { default as ContactSupportOutlined } from './question-contact-support-bubble.svg';
85
+ export { default as ContentCopy } from './copy.svg';
86
+ export { default as ContentCut } from './scissors-cut.svg';
87
+ export { default as ContentPaste } from './copy-paste.svg';
88
+ export { default as InfoOutlined } from './information-circle.svg';
89
+ export { default as KeyboardArrowDown } from './chevron-down.svg';
90
+ export { default as KeyboardArrowLeft } from './chevron-left-back.svg';
91
+ export { default as KeyboardArrowRight } from './chevron-right-forward.svg';
92
+ export { default as KeyboardArrowUp } from './chevron-up.svg';
93
+ export { default as LightbulbOutlined } from './lightbulb.svg';
94
+ export { default as MoreHoriz } from './menu-three-dot-filled-horizontal.svg';
95
+ export { default as Person } from './user-single.svg';
96
+ export { default as QuestionMark } from './question-mark.svg';
97
+ export { default as ShoppingCartOutlined } from './shopping-cart.svg';
98
+ export { default as VisibilityOffOutlined } from './close-eye-visibility.svg';
99
+ export { default as VisibilityOutlined } from './open-eye-visibility.svg';
100
+ export { default as LocalOfferOutlined } from './tag.svg';