@up42/up-components 1.6.2 → 1.7.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.
@@ -25,5 +25,6 @@ export declare type ContainerProps = MUIGlobalOmit<Omit<MUIContainerProps, 'maxW
25
25
  * To now more about the requirements please check here: https://up42.atlassian.net/browse/B2B-215.
26
26
  *
27
27
  * Documentation: https://up-components.up42.com/?path=/docs/layout-container--docs
28
+ * @deprecated Use `PageContainer` instead.
28
29
  */
29
30
  export declare const Container: ({ component, size, children, ...props }: ContainerProps) => JSX.Element;
@@ -0,0 +1,17 @@
1
+ /// <reference types="react" />
2
+ import { GridProps } from '@mui/material';
3
+ export declare type GridContainerProps = Omit<GridProps, 'container' | 'item' | 'xs' | 'columnSpacing'>;
4
+ /**
5
+ * Documentation: https://up-components.up42.com/?path=/docs/layout-grid--docs
6
+ */
7
+ export declare const GridContainer: ({ children, ...props }: GridContainerProps) => JSX.Element;
8
+ export declare type GridItemProps = GridContainerProps & {
9
+ /**
10
+ * `span` prop is used to set the column span.
11
+ */
12
+ span?: GridProps['xs'];
13
+ };
14
+ /**
15
+ * Documentation: https://up-components.up42.com/?path=/docs/layout-grid--docs
16
+ */
17
+ export declare const GridItem: ({ children, span, ...props }: GridItemProps) => JSX.Element;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ import { ContainerProps } from '@mui/material';
3
+ export declare type PageContainerProps = Omit<ContainerProps, 'fixed' | 'maxWidth'> & {
4
+ /**
5
+ * The number of `columns` to use in the grid system
6
+ */
7
+ columns?: number | 'auto';
8
+ /**
9
+ * If `true`, the container will be `fluid`, taking the full width of the screen
10
+ */
11
+ fluid?: boolean;
12
+ };
13
+ /**
14
+ * Documentation: https://up-components.up42.com/?path=/docs/layout-pagecontainer--docs
15
+ */
16
+ export declare const PageContainer: ({ children, fluid, columns, ...props }: PageContainerProps) => JSX.Element;
@@ -6,7 +6,8 @@ export { theme } from './global/theme';
6
6
  export { Button, type ButtonProps } from './components/Button/Button';
7
7
  export { Typography, type TypographyProps } from './components/Typography/Typography';
8
8
  export { Avatar, type AvatarProps } from './components/Avatar/Avatar';
9
- export { Container, type ContainerProps } from './components/Container/Container';
9
+ export { GridContainer, type GridContainerProps, GridItem, type GridItemProps } from './components/Grid/Grid';
10
+ export { PageContainer, type PageContainerProps } from './components/PageContainer/PageContainer';
10
11
  export { Box, type BoxProps } from './components/Box/Box';
11
12
  export { Checkbox, type CheckboxProps } from './components/Checkbox/Checkbox';
12
13
  export { FormCheckbox, type FormCheckboxProps } from './components/FormCheckbox/FormCheckbox';
@@ -58,3 +59,4 @@ export { formatFileSize } from './utils/helpers/formatFileSize';
58
59
  export { useQueryParams } from './utils/hooks/useQueryParams';
59
60
  export { useRemotePagination, type PaginatedResponse } from './utils/hooks/useRemotePagination';
60
61
  export { useAlert, type CreateAlertProps } from './global/providers/AlertProvider/AlertProvider';
62
+ export { Container, type ContainerProps } from './components/Container/Container';
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  export { default as tokens } from '@up42/design-system-tokens/dist/json/tokens.json';
3
3
  import * as _mui_material from '@mui/material';
4
- import { BoxProps as BoxProps$1, TextFieldProps, AvatarProps as AvatarProps$1, ContainerProps as ContainerProps$1, CheckboxProps as CheckboxProps$1, RadioProps as RadioProps$1, RadioGroupProps, SwitchProps as SwitchProps$1, SelectProps as SelectProps$1, SliderProps as SliderProps$1, LinkProps as LinkProps$1, TabsProps as TabsProps$1, TabProps as TabProps$1, ModalProps as ModalProps$1, CardProps, AlertProps as AlertProps$1, TooltipProps as TooltipProps$1, SxProps, Theme, MenuProps as MenuProps$1, MenuItemProps as MenuItemProps$1, IconButtonProps, PopoverProps as PopoverProps$1, SvgIconProps, BadgeProps as BadgeProps$1, ChipProps, DividerProps as DividerProps$1 } from '@mui/material';
4
+ import { BoxProps as BoxProps$1, TextFieldProps, AvatarProps as AvatarProps$1, GridProps, ContainerProps as ContainerProps$1, CheckboxProps as CheckboxProps$1, RadioProps as RadioProps$1, RadioGroupProps, SwitchProps as SwitchProps$1, SelectProps as SelectProps$1, SliderProps as SliderProps$1, LinkProps as LinkProps$1, TabsProps as TabsProps$1, TabProps as TabProps$1, ModalProps as ModalProps$1, CardProps, AlertProps as AlertProps$1, TooltipProps as TooltipProps$1, SxProps, Theme, MenuProps as MenuProps$1, MenuItemProps as MenuItemProps$1, IconButtonProps, PopoverProps as PopoverProps$1, SvgIconProps, BadgeProps as BadgeProps$1, ChipProps, DividerProps as DividerProps$1 } from '@mui/material';
5
5
  export * from '@mui/material';
6
6
  import { ThemeProviderProps } from '@mui/material/styles/ThemeProvider';
7
7
  import * as React from 'react';
@@ -148,32 +148,36 @@ declare const Avatar: React__default.ForwardRefExoticComponent<Pick<{
148
148
  icon?: React__default.ReactNode;
149
149
  } & Omit<Omit<AvatarProps$1<"div", {}>, "children" | "sizes" | "alt" | "src" | "srcSet" | "variant" | "imgProps">, "classes" | "tabIndex" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple">, "className" | "style" | "color" | "sx" | "slot" | "title" | "id" | "lang" | "role" | "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" | "icon" | "firstName" | "lastName"> & React__default.RefAttributes<unknown>>;
150
150
 
151
- declare type ContainerProps = MUIGlobalOmit<Omit<ContainerProps$1, 'maxWidth'>, {
151
+ declare type GridContainerProps = Omit<GridProps, 'container' | 'item' | 'xs' | 'columnSpacing'>;
152
+ /**
153
+ * Documentation: https://up-components.up42.com/?path=/docs/layout-grid--docs
154
+ */
155
+ declare const GridContainer: ({ children, ...props }: GridContainerProps) => JSX.Element;
156
+ declare type GridItemProps = GridContainerProps & {
152
157
  /**
153
- * Determine the max-width of the container.
158
+ * `span` prop is used to set the column span.
154
159
  */
155
- size?: 'small' | 'medium' | 'large' | 'fluid';
160
+ span?: GridProps['xs'];
161
+ };
162
+ /**
163
+ * Documentation: https://up-components.up42.com/?path=/docs/layout-grid--docs
164
+ */
165
+ declare const GridItem: ({ children, span, ...props }: GridItemProps) => JSX.Element;
166
+
167
+ declare type PageContainerProps = Omit<ContainerProps$1, 'fixed' | 'maxWidth'> & {
156
168
  /**
157
- * The component used for the root node.
158
- * Either a string to use a HTML element or a component.
169
+ * The number of `columns` to use in the grid system
159
170
  */
160
- component?: React__default.ElementType;
161
- }>;
171
+ columns?: number | 'auto';
172
+ /**
173
+ * If `true`, the container will be `fluid`, taking the full width of the screen
174
+ */
175
+ fluid?: boolean;
176
+ };
162
177
  /**
163
- * In order to maximize the available horizontal space of the UI we use a central column system layout.
164
- *
165
- * The header of a page is always `fluid`. The content section will use one of the following layouts:
166
- *
167
- * - `small`: 6 columns.
168
- * - `medium`: 8 columns.
169
- * - `large`: 12 columns.
170
- * - `fluid`: full width (maps).
171
- *
172
- * To now more about the requirements please check here: https://up42.atlassian.net/browse/B2B-215.
173
- *
174
- * Documentation: https://up-components.up42.com/?path=/docs/layout-container--docs
178
+ * Documentation: https://up-components.up42.com/?path=/docs/layout-pagecontainer--docs
175
179
  */
176
- declare const Container: ({ component, size, children, ...props }: ContainerProps) => JSX.Element;
180
+ declare const PageContainer: ({ children, fluid, columns, ...props }: PageContainerProps) => JSX.Element;
177
181
 
178
182
  declare type BoxProps = MUIGlobalOmit<BoxProps$1>;
179
183
  /**
@@ -2261,4 +2265,32 @@ declare type ContextState = {
2261
2265
  */
2262
2266
  declare const useAlert: () => ContextState;
2263
2267
 
2264
- export { Alert, AlertProps, Avatar, AvatarProps, Badge, BadgeProps, Banner, BannerProps, Box, BoxProps, Button, ButtonProps, Checkbox, CheckboxProps, CodeInline, CodeInlineProps, CodeSnippet, CodeSnippetItemProps, CodeSnippetProps, ContactBox, ContactBoxProps, Container, ContainerProps, ControlButton, ControlButtonProps, CopyButton, CopyButtonProps, CreateAlertProps, DataGrid, DataGridProps, DatePickerDateType, DateTime, DateTimeProps, Divider, DividerProps, 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, NotFoundProps, 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 };
2268
+ declare type ContainerProps = MUIGlobalOmit<Omit<ContainerProps$1, 'maxWidth'>, {
2269
+ /**
2270
+ * Determine the max-width of the container.
2271
+ */
2272
+ size?: 'small' | 'medium' | 'large' | 'fluid';
2273
+ /**
2274
+ * The component used for the root node.
2275
+ * Either a string to use a HTML element or a component.
2276
+ */
2277
+ component?: React__default.ElementType;
2278
+ }>;
2279
+ /**
2280
+ * In order to maximize the available horizontal space of the UI we use a central column system layout.
2281
+ *
2282
+ * The header of a page is always `fluid`. The content section will use one of the following layouts:
2283
+ *
2284
+ * - `small`: 6 columns.
2285
+ * - `medium`: 8 columns.
2286
+ * - `large`: 12 columns.
2287
+ * - `fluid`: full width (maps).
2288
+ *
2289
+ * To now more about the requirements please check here: https://up42.atlassian.net/browse/B2B-215.
2290
+ *
2291
+ * Documentation: https://up-components.up42.com/?path=/docs/layout-container--docs
2292
+ * @deprecated Use `PageContainer` instead.
2293
+ */
2294
+ declare const Container: ({ component, size, children, ...props }: ContainerProps) => JSX.Element;
2295
+
2296
+ export { Alert, AlertProps, Avatar, AvatarProps, Badge, BadgeProps, Banner, BannerProps, Box, BoxProps, Button, ButtonProps, Checkbox, CheckboxProps, CodeInline, CodeInlineProps, CodeSnippet, CodeSnippetItemProps, CodeSnippetProps, ContactBox, ContactBoxProps, Container, ContainerProps, ControlButton, ControlButtonProps, CopyButton, CopyButtonProps, CreateAlertProps, DataGrid, DataGridProps, DatePickerDateType, DateTime, DateTimeProps, Divider, DividerProps, DocumentationPopover, DocumentationPopoverProps, EmptyState, EmptyStateProps, FormCheckbox, FormCheckboxProps, FormDatePicker, FormDatePickerProps, FormDateRangePicker, FormDateRangePickerProps, FormInput, FormInputProps, FormRadio, FormRadioProps, FormSelect, FormSelectProps, FormSwitch, FormSwitchProps, GridContainer, GridContainerProps, GridItem, GridItemProps, Icon, IconProps, InfoCard, InfoCardProps, InfoModal, InfoModalProps, InfoPopover, InfoPopoverProps, Input, InputProps, Link, LinkProps, Loading, LoadingProps, Menu, MenuItem, MenuItemProps, MenuProps, Modal, ModalProps, NotFound, NotFoundProps, PageContainer, PageContainerProps, 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": "1.6.2",
3
+ "version": "1.7.0",
4
4
  "description": "UP42 Component Library",
5
5
  "author": "Axel Fuhrmann axel.fuhrmann@up42.com",
6
6
  "license": "ISC",