@up42/up-components 6.1.0 → 7.0.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.
@@ -9,7 +9,7 @@ export type EmptyStateProps = MUIGlobalOmit<Omit<BoxProps, 'component'>, {
9
9
  /**
10
10
  * Helpful message that conveys the purpose of the screen and the next action to populate the space
11
11
  */
12
- subTitle: string;
12
+ subTitle?: string;
13
13
  /**
14
14
  * An imported SVG icon component
15
15
  */
@@ -1,10 +1,10 @@
1
1
  import React from 'react';
2
- import { SvgIconProps } from '@mui/material';
2
+ import { BoxProps } from '@mui/material';
3
3
  import * as illustrations from '@global/illustrations';
4
4
  export type IllustrationProps = {
5
5
  name: keyof typeof illustrations;
6
- size?: SvgIconProps['width'];
7
- } & Omit<SvgIconProps, 'children' | 'inheritViewBox' | 'shapeRendering' | 'viewBox' | 'fontSize'>;
6
+ size?: number;
7
+ } & BoxProps;
8
8
  /**
9
9
  * Documentation: https://up-components.up42.com/?path=/docs/data-display-illustrations--docs
10
10
  * Illustrations: https://up-components.up42.com/?path=/docs/illustrations--docs
@@ -7,7 +7,16 @@ export interface PopoverButtonProps extends Omit<ButtonProps, 'onClick' | 'start
7
7
  onClick?: (e: React.MouseEvent<HTMLButtonElement>) => Promise<void>;
8
8
  startIcon?: IconProps['name'];
9
9
  }
10
- export type PopoverProps = Omit<MUIPopoverProps, 'open' | 'onClose'> & {
10
+ export declare const POPOVER_SIZE: {
11
+ readonly extraSmall: "256px";
12
+ readonly small: "320px";
13
+ readonly medium: "512px";
14
+ readonly large: "768px";
15
+ readonly extraLarge: "1200px";
16
+ readonly auto: "auto";
17
+ };
18
+ export type PopoverSize = keyof typeof POPOVER_SIZE;
19
+ export type PopoverProps = Omit<MUIPopoverProps, 'content' | 'open' | 'onClose'> & {
11
20
  /**
12
21
  * Opens the modal if true, closes it if false
13
22
  * This is optional for compatibility purposes
@@ -37,35 +46,30 @@ export type PopoverProps = Omit<MUIPopoverProps, 'open' | 'onClose'> & {
37
46
  * Primarily used to indicate that the anchor is the built in button icon.
38
47
  * @default false
39
48
  */
40
- isIconAnchor?: boolean;
49
+ showControlButton?: boolean;
41
50
  /**
42
51
  * Alternative icon to display as the built in button's icon (only applicable if isIconAnchor is true)
43
52
  */
44
- icon?: IconProps['name'];
45
- /**
46
- * Custom styles for the icon anchor button (only applicable if isIconAnchor is true)
47
- */
48
- iconButtonSx?: SxProps<Theme>;
53
+ controlButtonIcon?: IconProps['name'];
49
54
  /**
50
55
  * Whether to show dividers between sections
51
56
  * @default false
52
57
  */
53
- hasDivider?: boolean;
58
+ showDividers?: boolean;
54
59
  /**
55
60
  * Whether to show a connector line between the popover and anchor
56
61
  * @default false
57
62
  */
58
- hasConnector?: boolean;
63
+ showConnector?: boolean;
59
64
  /**
60
- * Whether to show padding inside the content section(For backwards compatibility purposes)
61
- * @default false
65
+ * Content to be displayed inside the popover, with padding applied by default
62
66
  */
63
- hasContentPadding?: boolean;
67
+ content?: React.ReactElement;
64
68
  /**
65
- * Whether to use the default min and max width for the popover(For backwards compatibility purposes)
69
+ * Size of the popover
66
70
  * @default false
67
71
  */
68
- hasDefaultWidth?: boolean;
72
+ size?: PopoverSize;
69
73
  /**
70
74
  * Custom styles for the popover
71
75
  */
@@ -77,7 +81,7 @@ export type PopoverProps = Omit<MUIPopoverProps, 'open' | 'onClose'> & {
77
81
  *
78
82
  * Documentation: https://up-components.up42.com/?path=/docs-patterns-popovers-popover--docs
79
83
  */
80
- export declare const Popover: React.ForwardRefExoticComponent<Omit<Omit<MUIPopoverProps, "open" | "onClose"> & {
84
+ export declare const Popover: React.ForwardRefExoticComponent<Omit<Omit<MUIPopoverProps, "content" | "open" | "onClose"> & {
81
85
  /**
82
86
  * Opens the modal if true, closes it if false
83
87
  * This is optional for compatibility purposes
@@ -107,35 +111,30 @@ export declare const Popover: React.ForwardRefExoticComponent<Omit<Omit<MUIPopov
107
111
  * Primarily used to indicate that the anchor is the built in button icon.
108
112
  * @default false
109
113
  */
110
- isIconAnchor?: boolean | undefined;
114
+ showControlButton?: boolean | undefined;
111
115
  /**
112
116
  * Alternative icon to display as the built in button's icon (only applicable if isIconAnchor is true)
113
117
  */
114
- icon?: "AccessTime" | "Add" | "AddCircleFilled" | "AddPlusCircle" | "AlarmBell" | "AlertCircleFilled" | "AlertTriangle" | "Angle" | "AppWindowCode" | "ArrowBack" | "ArrowBackIos" | "ArrowDownLeft" | "ArrowDownRight" | "ArrowDownward" | "ArrowForward" | "ArrowTopLeft" | "ArrowTopRight" | "ArrowUpward" | "Attachment" | "AutoStoriesOutlined" | "Balance" | "Bin" | "Block" | "Blocked" | "Boxes" | "BoxesGrid" | "Brightness1" | "Calendar" | "CalendarAdd" | "CalendarCheck" | "CalendarDate" | "CalendarEdit" | "CalendarRemove" | "CalendarSearchDate" | "CampaignOutlined" | "CaretCircleFilledDown" | "CaretCircleFilledLeft" | "CaretCircleFilledRight" | "CaretCircleFilledUp" | "Catalog" | "CheckCircle" | "CheckCircleFilled" | "CheckList" | "CheckMark" | "ChevronCircleFilledDown" | "ChevronCircleFilledLeft" | "ChevronCircleFilledRight" | "ChevronCircleFilledUp" | "Close" | "CloseCircle" | "CloseCircleFilled" | "Cloud" | "CloudCheck" | "CloudDownload" | "CloudOff" | "CloudRemove" | "CloudSearch" | "CloudSync" | "CloudUpload" | "CloudWarning" | "Coin" | "CoinEuro" | "Compass" | "ContactSupportOutlined" | "ContentCut" | "ContentPaste" | "Copy" | "Credit" | "Dashboard" | "DataTransferVertical" | "Delivery" | "DollarCoinCircleFilled" | "DottedLines" | "Download" | "DownloadCircle" | "EditPencil" | "EuroCoinCircleFilled" | "ExitLeaveBack" | "ExternalLink" | "EyeCircleFilled" | "FlagQuestion" | "FolderEmpty" | "Footprint" | "HeadphonesQuestion" | "Heart" | "HeartCircleFilled" | "Hyperlink" | "ImageResolution" | "Invoice" | "KeyboardArrowDown" | "KeyboardArrowLeft" | "KeyboardArrowRight" | "KeyboardArrowUp" | "Layers" | "Library" | "Lightbulb" | "LightbulbOutlined" | "LocalOfferOutlined" | "Lock" | "LockCircleFilled" | "LockShield" | "Logo" | "LogoKSA" | "Map" | "MapPin" | "MapSearch" | "Marketplace" | "MarketplaceExternal" | "MenuCircleFilledHorizontal" | "MenuCircleFilledVertical" | "MenuOpenHorizontal" | "MenuOpenVertical" | "MinusCircleFilled" | "Module" | "Module2" | "ModuleThree" | "MoreHoriz" | "MultipleUsers" | "NotificationError" | "NotificationInfo" | "NotificationSuccess" | "NotificationWarning" | "PenCircleFilled" | "Pencil" | "PercentCircle" | "Person" | "Pin" | "Polygon" | "Projects" | "QuestionBubble" | "QuestionCircle" | "QuestionCircleFilled" | "QuestionMark" | "Rectangle" | "RectangleAOI" | "Redo" | "Remove" | "Resolution" | "Satellite" | "Save" | "Scissors" | "Search" | "SelectedIndicator" | "SelectedIndicatorWide" | "ServerCheck" | "ServerDeny" | "ServerDownload" | "ServerEdit" | "ServerError" | "ServerLock" | "ServerMinus" | "ServerQuestion" | "ServerRefresh" | "ServerSearch" | "ServerSync" | "ServerUpload" | "ServerWarning" | "SettingsCog" | "SettingsCog2" | "SettingsSliderHorizontal" | "SettingsVertical" | "Share" | "ShareNetwork" | "Shield" | "ShieldWithLock" | "ShoppingCartCheck" | "ShoppingCartClose" | "ShoppingCartMinus" | "ShoppingCartOutlined" | "ShoppingCartPlus" | "Storage" | "Support" | "SupportClear" | "SupportHeadphones" | "System" | "Tag" | "TagAlert" | "TagCheck" | "TagDouble" | "TagEdit" | "TagMinus" | "TagPlus" | "TagSearch" | "TagX" | "Target" | "Transaction" | "TrashBin" | "Undo" | "Unlock" | "UpgradeShield" | "Upload" | "UploadCircle" | "User" | "VisibilityOffOutlined" | "VisibilityOutlined" | "WeatherCloud" | "Webhooks" | "Workflow" | "WorkflowPencil" | "ZoomIn" | "ZoomOut" | undefined;
115
- /**
116
- * Custom styles for the icon anchor button (only applicable if isIconAnchor is true)
117
- */
118
- iconButtonSx?: SxProps<Theme> | undefined;
118
+ controlButtonIcon?: "AccessTime" | "Add" | "AddCircleFilled" | "AddPlusCircle" | "AlarmBell" | "AlertCircleFilled" | "AlertTriangle" | "Angle" | "AppWindowCode" | "ArrowBack" | "ArrowBackIos" | "ArrowDownLeft" | "ArrowDownRight" | "ArrowDownward" | "ArrowForward" | "ArrowTopLeft" | "ArrowTopRight" | "ArrowUpward" | "Attachment" | "AutoStoriesOutlined" | "Balance" | "Bin" | "Block" | "Blocked" | "Boxes" | "BoxesGrid" | "Brightness1" | "Calendar" | "CalendarAdd" | "CalendarCheck" | "CalendarDate" | "CalendarEdit" | "CalendarRemove" | "CalendarSearchDate" | "CampaignOutlined" | "CaretCircleFilledDown" | "CaretCircleFilledLeft" | "CaretCircleFilledRight" | "CaretCircleFilledUp" | "Catalog" | "CheckCircle" | "CheckCircleFilled" | "CheckList" | "CheckMark" | "ChevronCircleFilledDown" | "ChevronCircleFilledLeft" | "ChevronCircleFilledRight" | "ChevronCircleFilledUp" | "Close" | "CloseCircle" | "CloseCircleFilled" | "Cloud" | "CloudCheck" | "CloudDownload" | "CloudOff" | "CloudRemove" | "CloudSearch" | "CloudSync" | "CloudUpload" | "CloudWarning" | "Coin" | "CoinEuro" | "Compass" | "ContactSupportOutlined" | "ContentCut" | "ContentPaste" | "Copy" | "Credit" | "Dashboard" | "DataTransferVertical" | "Delivery" | "DollarCoinCircleFilled" | "DottedLines" | "Download" | "DownloadCircle" | "EditPencil" | "EuroCoinCircleFilled" | "ExitLeaveBack" | "ExternalLink" | "EyeCircleFilled" | "FlagQuestion" | "FolderEmpty" | "Footprint" | "HeadphonesQuestion" | "Heart" | "HeartCircleFilled" | "Hyperlink" | "ImageResolution" | "Invoice" | "KeyboardArrowDown" | "KeyboardArrowLeft" | "KeyboardArrowRight" | "KeyboardArrowUp" | "Layers" | "Library" | "Lightbulb" | "LightbulbOutlined" | "LocalOfferOutlined" | "Lock" | "LockCircleFilled" | "LockShield" | "Logo" | "LogoKSA" | "Map" | "MapPin" | "MapSearch" | "Marketplace" | "MarketplaceExternal" | "MenuCircleFilledHorizontal" | "MenuCircleFilledVertical" | "MenuOpenHorizontal" | "MenuOpenVertical" | "MinusCircleFilled" | "Module" | "Module2" | "ModuleThree" | "MoreHoriz" | "MultipleUsers" | "NotificationError" | "NotificationInfo" | "NotificationSuccess" | "NotificationWarning" | "PenCircleFilled" | "Pencil" | "PercentCircle" | "Person" | "Pin" | "Polygon" | "Projects" | "QuestionBubble" | "QuestionCircle" | "QuestionCircleFilled" | "QuestionMark" | "Rectangle" | "RectangleAOI" | "Redo" | "Remove" | "Resolution" | "Satellite" | "Save" | "Scissors" | "Search" | "SelectedIndicator" | "SelectedIndicatorWide" | "ServerCheck" | "ServerDeny" | "ServerDownload" | "ServerEdit" | "ServerError" | "ServerLock" | "ServerMinus" | "ServerQuestion" | "ServerRefresh" | "ServerSearch" | "ServerSync" | "ServerUpload" | "ServerWarning" | "SettingsCog" | "SettingsCog2" | "SettingsSliderHorizontal" | "SettingsVertical" | "Share" | "ShareNetwork" | "Shield" | "ShieldWithLock" | "ShoppingCartCheck" | "ShoppingCartClose" | "ShoppingCartMinus" | "ShoppingCartOutlined" | "ShoppingCartPlus" | "Storage" | "Support" | "SupportClear" | "SupportHeadphones" | "System" | "Tag" | "TagAlert" | "TagCheck" | "TagDouble" | "TagEdit" | "TagMinus" | "TagPlus" | "TagSearch" | "TagX" | "Target" | "Transaction" | "TrashBin" | "Undo" | "Unlock" | "UpgradeShield" | "Upload" | "UploadCircle" | "User" | "VisibilityOffOutlined" | "VisibilityOutlined" | "WeatherCloud" | "Webhooks" | "Workflow" | "WorkflowPencil" | "ZoomIn" | "ZoomOut" | undefined;
119
119
  /**
120
120
  * Whether to show dividers between sections
121
121
  * @default false
122
122
  */
123
- hasDivider?: boolean | undefined;
123
+ showDividers?: boolean | undefined;
124
124
  /**
125
125
  * Whether to show a connector line between the popover and anchor
126
126
  * @default false
127
127
  */
128
- hasConnector?: boolean | undefined;
128
+ showConnector?: boolean | undefined;
129
129
  /**
130
- * Whether to show padding inside the content section(For backwards compatibility purposes)
131
- * @default false
130
+ * Content to be displayed inside the popover, with padding applied by default
132
131
  */
133
- hasContentPadding?: boolean | undefined;
132
+ content?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
134
133
  /**
135
- * Whether to use the default min and max width for the popover(For backwards compatibility purposes)
134
+ * Size of the popover
136
135
  * @default false
137
136
  */
138
- hasDefaultWidth?: boolean | undefined;
137
+ size?: "small" | "large" | "medium" | "auto" | "extraSmall" | "extraLarge" | undefined;
139
138
  /**
140
139
  * Custom styles for the popover
141
140
  */
@@ -1,5 +1,27 @@
1
+ export { default as Aoi } from './aoi.svg';
2
+ export { default as ApproveDoc } from './approve-doc.svg';
3
+ export { default as Catalog } from './catalog.svg';
4
+ export { default as Certified } from './certified.svg';
5
+ export { default as CertifiedDocuments } from './certified-documents.svg';
6
+ export { default as CloudRain } from './cloud-rain.svg';
7
+ export { default as Credits } from './credits.svg';
8
+ export { default as CreditsFall } from './credits-fall.svg';
9
+ export { default as DataTransfer } from './data-transfer.svg';
10
+ export { default as Discovery } from './discovery.svg';
11
+ export { default as EmailCheck } from './email-check.svg';
12
+ export { default as EmailVerification } from './email-verification.svg';
13
+ export { default as Enterprise } from './enterprise.svg';
1
14
  export { default as FloppyDisk } from './floppy-disk.svg';
2
- export { default as Satellite } from './satellite.svg';
15
+ export { default as Invoice } from './invoice.svg';
16
+ export { default as MediaGlobe } from './media-globe.svg';
17
+ export { default as NoResults } from './no-results.svg';
18
+ export { default as Rocket } from './rocket.svg';
3
19
  export { default as RocketFixing } from './rocket-fixing.svg';
4
- export { default as EmailCheck } from './email-check.svg';
5
- export { default as ApproveDoc } from './approve-doc.svg';
20
+ export { default as Satellite } from './satellite.svg';
21
+ export { default as SatelliteFaceDown } from './satellite-face-down.svg';
22
+ export { default as SatelliteOrbit } from './satellite-orbit.svg';
23
+ export { default as SearchImage } from './search-image.svg';
24
+ export { default as SearchPlanet } from './search-planet.svg';
25
+ export { default as TermsConditions } from './terms-conditions.svg';
26
+ export { default as Webhooks } from './webhooks.svg';
27
+ export { default as Wmts } from './wmts.svg';