@up42/up-components 0.3.5 → 0.3.8
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 +1 -1
- package/dist/cjs/types/components/Button/Button.overrides.d.ts +0 -11
- package/dist/cjs/types/components/CodeBox/CodeBox.d.ts +6 -0
- package/dist/cjs/types/components/CodeBox/CodeBox.stories.d.ts +7 -0
- package/dist/cjs/types/components/CodeBox/CodeBox.test.d.ts +1 -0
- package/dist/cjs/types/components/ControlButton/ControlButton.d.ts +14 -0
- package/dist/cjs/types/components/ControlButton/ControlButton.stories.d.ts +6 -0
- package/dist/cjs/types/components/ControlButton/ControlButton.test.d.ts +1 -0
- package/dist/cjs/types/components/DocumentationPopover/DocumentationPopover.d.ts +25 -0
- package/dist/cjs/types/components/DocumentationPopover/DocumentationPopover.stories.d.ts +5 -0
- package/dist/cjs/types/components/DocumentationPopover/DocumentationPopover.test.d.ts +1 -0
- package/dist/cjs/types/components/InfoCard/InfoCard.d.ts +58 -0
- package/dist/cjs/types/components/InfoCard/InfoCard.stories.d.ts +7 -0
- package/dist/cjs/types/components/InfoCard/InfoCard.test.d.ts +1 -0
- package/dist/cjs/types/components/InfoModal/InfoModal.d.ts +14 -0
- package/dist/cjs/types/components/InfoModal/InfoModal.stories.d.ts +6 -0
- package/dist/cjs/types/components/InfoModal/InfoModal.test.d.ts +1 -0
- package/dist/cjs/types/components/InfoPopover/InfoPopover.d.ts +9 -0
- package/dist/cjs/types/components/InfoPopover/InfoPopover.stories.d.ts +6 -0
- package/dist/cjs/types/components/InfoPopover/InfoPopover.test.d.ts +1 -0
- package/dist/cjs/types/components/Modal/Modal.d.ts +3 -8
- package/dist/cjs/types/components/Modal/Modal.stories.d.ts +1 -2
- package/dist/cjs/types/components/Popover/Popover.d.ts +8 -0
- package/dist/cjs/types/components/Popover/Popover.stories.d.ts +5 -0
- package/dist/cjs/types/components/Popover/Popover.test.d.ts +1 -0
- package/dist/cjs/types/global/icons/index.d.ts +6 -6
- package/dist/cjs/types/index.d.ts +7 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/types/components/Button/Button.overrides.d.ts +0 -11
- package/dist/esm/types/components/CodeBox/CodeBox.d.ts +6 -0
- package/dist/esm/types/components/CodeBox/CodeBox.stories.d.ts +7 -0
- package/dist/esm/types/components/CodeBox/CodeBox.test.d.ts +1 -0
- package/dist/esm/types/components/ControlButton/ControlButton.d.ts +14 -0
- package/dist/esm/types/components/ControlButton/ControlButton.stories.d.ts +6 -0
- package/dist/esm/types/components/ControlButton/ControlButton.test.d.ts +1 -0
- package/dist/esm/types/components/DocumentationPopover/DocumentationPopover.d.ts +25 -0
- package/dist/esm/types/components/DocumentationPopover/DocumentationPopover.stories.d.ts +5 -0
- package/dist/esm/types/components/DocumentationPopover/DocumentationPopover.test.d.ts +1 -0
- package/dist/esm/types/components/InfoCard/InfoCard.d.ts +58 -0
- package/dist/esm/types/components/InfoCard/InfoCard.stories.d.ts +7 -0
- package/dist/esm/types/components/InfoCard/InfoCard.test.d.ts +1 -0
- package/dist/esm/types/components/InfoModal/InfoModal.d.ts +14 -0
- package/dist/esm/types/components/InfoModal/InfoModal.stories.d.ts +6 -0
- package/dist/esm/types/components/InfoModal/InfoModal.test.d.ts +1 -0
- package/dist/esm/types/components/InfoPopover/InfoPopover.d.ts +9 -0
- package/dist/esm/types/components/InfoPopover/InfoPopover.stories.d.ts +6 -0
- package/dist/esm/types/components/InfoPopover/InfoPopover.test.d.ts +1 -0
- package/dist/esm/types/components/Modal/Modal.d.ts +3 -8
- package/dist/esm/types/components/Modal/Modal.stories.d.ts +1 -2
- package/dist/esm/types/components/Popover/Popover.d.ts +8 -0
- package/dist/esm/types/components/Popover/Popover.stories.d.ts +5 -0
- package/dist/esm/types/components/Popover/Popover.test.d.ts +1 -0
- package/dist/esm/types/global/icons/index.d.ts +6 -6
- package/dist/esm/types/index.d.ts +7 -0
- package/dist/index.d.ts +105 -6
- package/package.json +3 -2
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, ChipProps as ChipProps$1, 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, LinkProps as LinkProps$1, TabsProps as TabsProps$1, TabProps as TabProps$1, ModalProps as ModalProps$1, AlertProps as AlertProps$1, TooltipProps as TooltipProps$1 } from '@mui/material';
|
|
4
|
+
import { BoxProps as BoxProps$1, TextFieldProps, ChipProps as ChipProps$1, 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, 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, IconButtonProps, PopoverProps as PopoverProps$1 } from '@mui/material';
|
|
5
5
|
export * from '@mui/material';
|
|
6
6
|
import { ThemeProviderProps } from '@mui/material/styles/ThemeProvider';
|
|
7
7
|
import React, { ReactNode, ElementType } from 'react';
|
|
@@ -296,16 +296,58 @@ declare type EmptyStateProps<C extends React.ElementType = 'div'> = BaseProps<C,
|
|
|
296
296
|
}>;
|
|
297
297
|
declare const EmptyState: <C extends React.ElementType<any>>({ icon: Icon, title, subTitle, action, ...props }: EmptyStateProps<C>) => JSX.Element;
|
|
298
298
|
|
|
299
|
-
declare type ModalProps = MUIGlobalOmit<
|
|
299
|
+
declare type ModalProps = MUIGlobalOmit<ModalProps$1>;
|
|
300
|
+
/**
|
|
301
|
+
* Documentation: https://up-components.up42.dev/?path=/docs/feedback-modal
|
|
302
|
+
*/
|
|
303
|
+
declare const Modal: ({ children, ...props }: ModalProps) => JSX.Element;
|
|
304
|
+
|
|
305
|
+
declare type InfoCardProps = {
|
|
300
306
|
title: string;
|
|
301
307
|
subtitle?: string;
|
|
302
|
-
|
|
308
|
+
/**
|
|
309
|
+
* The content action section aka. card footer.
|
|
310
|
+
*/
|
|
311
|
+
actions?: React.ReactNode;
|
|
312
|
+
/**
|
|
313
|
+
* The content of the header action, usually an icon with a close event.
|
|
314
|
+
*/
|
|
315
|
+
headerAction?: React.ReactNode;
|
|
316
|
+
/**
|
|
317
|
+
* The Card's title typography variant.
|
|
318
|
+
*/
|
|
319
|
+
titleVariant?: 'h2' | 'h3' | 'overline';
|
|
320
|
+
} & Omit<CardProps, 'variant' | 'square' | 'raised'>;
|
|
321
|
+
/**
|
|
322
|
+
* Documentation: https://up-components.up42.dev/?path=/docs/patterns-infocard
|
|
323
|
+
*/
|
|
324
|
+
declare const InfoCard: React.ForwardRefExoticComponent<Pick<{
|
|
325
|
+
title: string;
|
|
326
|
+
subtitle?: string | undefined;
|
|
327
|
+
/**
|
|
328
|
+
* The content action section aka. card footer.
|
|
329
|
+
*/
|
|
330
|
+
actions?: React.ReactNode;
|
|
331
|
+
/**
|
|
332
|
+
* The content of the header action, usually an icon with a close event.
|
|
333
|
+
*/
|
|
334
|
+
headerAction?: React.ReactNode;
|
|
335
|
+
/**
|
|
336
|
+
* The Card's title typography variant.
|
|
337
|
+
*/
|
|
338
|
+
titleVariant?: "h2" | "h3" | "overline" | undefined;
|
|
339
|
+
} & Omit<CardProps<"div", {}>, "variant" | "square" | "raised">, "color" | "translate" | keyof _mui_material_OverridableComponent.CommonProps | "slot" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "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" | "children" | "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" | "css" | "sx" | "key" | "elevation" | "titleVariant" | "subtitle" | "actions" | "headerAction"> & React.RefAttributes<unknown>>;
|
|
340
|
+
|
|
341
|
+
declare type InfoModalProps = MUIGlobalOmit<Omit<ModalProps, 'BackdropProps' | 'BackdropComponent' | 'onBackdropClick'>, Omit<InfoCardProps, 'headerAction'> & {
|
|
342
|
+
/**
|
|
343
|
+
* Maximun width of the modal, in pixels.
|
|
344
|
+
*/
|
|
303
345
|
maxWidth?: number;
|
|
304
346
|
}>;
|
|
305
347
|
/**
|
|
306
|
-
* Documentation: https://up-components.up42.dev/?path=/docs/
|
|
348
|
+
* Documentation: https://up-components.up42.dev/?path=/docs/patterns-infomodal
|
|
307
349
|
*/
|
|
308
|
-
declare const
|
|
350
|
+
declare const InfoModal: ({ title, subtitle, children, actions, open, maxWidth, onClose, ...props }: InfoModalProps) => JSX.Element;
|
|
309
351
|
|
|
310
352
|
declare type AlertColor = 'info' | 'error' | 'success';
|
|
311
353
|
declare type AlertProps = Omit<AlertProps$1, 'color' | 'elevation' | 'iconMapping' | 'severity' | 'square' | 'variant' | 'action'> & {
|
|
@@ -350,6 +392,63 @@ declare type TooltipProps = Omit<TooltipProps$1, 'TransitionComponent' | 'Transi
|
|
|
350
392
|
*/
|
|
351
393
|
declare const Tooltip: ({ children, ...props }: TooltipProps) => JSX.Element;
|
|
352
394
|
|
|
395
|
+
declare type ControlButtonProps = MUIGlobalOmit<IconButtonProps, {
|
|
396
|
+
size?: 'medium' | 'small';
|
|
397
|
+
/**
|
|
398
|
+
* Remove default padding when using icons with built-in padding (Like MUI icons)
|
|
399
|
+
*/
|
|
400
|
+
removePadding?: boolean;
|
|
401
|
+
}>;
|
|
402
|
+
/**
|
|
403
|
+
* Documentation: https://up-components.up42.dev/?path=/data-entry-controlbutton--default
|
|
404
|
+
*/
|
|
405
|
+
declare const ControlButton: ({ size, removePadding, children, ...props }: ControlButtonProps) => JSX.Element;
|
|
406
|
+
|
|
407
|
+
declare type PopoverProps = MUIGlobalOmit<PopoverProps$1>;
|
|
408
|
+
/**
|
|
409
|
+
* Documentation: https://up-components.up42.dev/?path=/docs/data-display-popover
|
|
410
|
+
*/
|
|
411
|
+
declare const Popover: ({ children, ...props }: PopoverProps) => JSX.Element;
|
|
412
|
+
|
|
413
|
+
declare type InfoPopoverProps = InfoCardProps & {
|
|
414
|
+
icon?: React.ElementType;
|
|
415
|
+
};
|
|
416
|
+
/**
|
|
417
|
+
* Documentation: https://up-components.up42.dev/?path=/docs/patterns-popovers-infopopover
|
|
418
|
+
*/
|
|
419
|
+
declare const InfoPopover: ({ id, icon: Icon, actions, title, children, sx, ...props }: InfoPopoverProps) => JSX.Element;
|
|
420
|
+
|
|
421
|
+
declare type DocumentationPopoverProps = {
|
|
422
|
+
heading: string;
|
|
423
|
+
/**
|
|
424
|
+
* The main content of the Popover.
|
|
425
|
+
*/
|
|
426
|
+
content: string;
|
|
427
|
+
/**
|
|
428
|
+
* The label of the CTA button, usually *View Documentation*.
|
|
429
|
+
*/
|
|
430
|
+
linkText?: string;
|
|
431
|
+
/**
|
|
432
|
+
* The link of the CTA button. A pathname relative to the documentation base URL.
|
|
433
|
+
* i.e: `/getting-started/workflows/catalog`
|
|
434
|
+
*/
|
|
435
|
+
linkPath?: string;
|
|
436
|
+
/**
|
|
437
|
+
* Contentful entry ID.
|
|
438
|
+
*/
|
|
439
|
+
contentfulId: string;
|
|
440
|
+
};
|
|
441
|
+
/**
|
|
442
|
+
* Documentation: https://up-components.up42.dev/?path=/docs/patterns-popovers-documentationpopover
|
|
443
|
+
*/
|
|
444
|
+
declare const DocumentationPopover: ({ content, linkPath, linkText, heading, contentfulId, }: DocumentationPopoverProps) => JSX.Element;
|
|
445
|
+
|
|
446
|
+
interface CodeBoxProps {
|
|
447
|
+
text: string;
|
|
448
|
+
label?: string;
|
|
449
|
+
}
|
|
450
|
+
declare const CodeBox: ({ label, text }: CodeBoxProps) => JSX.Element;
|
|
451
|
+
|
|
353
452
|
declare type TableProps = MUIGlobalOmit<TableProps$1>;
|
|
354
453
|
declare const Table: ({ children, ...props }: TableProps) => JSX.Element;
|
|
355
454
|
declare type TableBodyProps = MUIGlobalOmit<TableBodyProps$1>;
|
|
@@ -369,4 +468,4 @@ declare const TableSortLabel: ({ children, ...props }: TableSortLabelProps) => J
|
|
|
369
468
|
declare type TableFooterProps = MUIGlobalOmit<TableFooterProps$1>;
|
|
370
469
|
declare const TableFooter: ({ children, ...props }: TableFooterProps) => JSX.Element;
|
|
371
470
|
|
|
372
|
-
export { Alert, AlertProps, Avatar, AvatarProps, Banner, BannerProps, Box, BoxProps, Button, ButtonProps, Checkbox, CheckboxProps, Chip, ChipProps, Container, ContainerProps, EmptyState, EmptyStateProps, FormCheckbox, FormCheckboxProps, FormInput, FormInputProps, FormRadio, FormRadioProps, FormSelect, FormSelectProps, FormSwitch, FormSwitchProps, Input, InputProps, Link, LinkProps, Modal, ModalProps, Radio, RadioProps, Select, SelectProps, 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, Tooltip, TooltipProps, Typography, TypographyProps, UpComponentsProvider, theme };
|
|
471
|
+
export { Alert, AlertProps, Avatar, AvatarProps, Banner, BannerProps, Box, BoxProps, Button, ButtonProps, Checkbox, CheckboxProps, Chip, ChipProps, CodeBox, CodeBoxProps, Container, ContainerProps, ControlButton, ControlButtonProps, DocumentationPopover, DocumentationPopoverProps, EmptyState, EmptyStateProps, FormCheckbox, FormCheckboxProps, FormInput, FormInputProps, FormRadio, FormRadioProps, FormSelect, FormSelectProps, FormSwitch, FormSwitchProps, InfoCard, InfoCardProps, InfoModal, InfoModalProps, InfoPopover, InfoPopoverProps, Input, InputProps, Link, LinkProps, Modal, ModalProps, Popover, PopoverProps, Radio, RadioProps, Select, SelectProps, 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, Tooltip, TooltipProps, Typography, TypographyProps, UpComponentsProvider, theme };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@up42/up-components",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.8",
|
|
4
4
|
"description": "UP42 Component Library",
|
|
5
5
|
"author": "Axel Fuhrmann axel.fuhrmann@up42.com",
|
|
6
6
|
"license": "ISC",
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
"prepare": "husky install"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@up42/design-system-tokens": "^3.0.0"
|
|
27
|
+
"@up42/design-system-tokens": "^3.0.0",
|
|
28
|
+
"react-markdown": "^8.0.3"
|
|
28
29
|
},
|
|
29
30
|
"devDependencies": {
|
|
30
31
|
"@babel/core": "^7.16.10",
|