@up42/up-components 0.2.4 → 0.3.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.
Files changed (76) hide show
  1. package/dist/cjs/index.js +1 -1
  2. package/dist/cjs/types/components/Box/Box.stories.d.ts +2 -2
  3. package/dist/cjs/types/components/Button/Button.stories.d.ts +1 -0
  4. package/dist/cjs/types/components/Checkbox/Checkbox.stories.d.ts +1 -1
  5. package/dist/cjs/types/components/Chip/Chip.stories.d.ts +1 -1
  6. package/dist/cjs/types/components/EmptyState/EmptyState.d.ts +3 -3
  7. package/dist/cjs/types/components/EmptyState/EmptyState.stories.d.ts +3 -3
  8. package/dist/cjs/types/components/Form/Form.stories.d.ts +5 -0
  9. package/dist/cjs/types/components/FormCheckbox/FormCheckbox.d.ts +20 -8
  10. package/dist/cjs/types/components/FormCheckbox/FormCheckbox.stories.d.ts +3 -3
  11. package/dist/cjs/types/components/FormControl/FormControl.overrides.d.ts +3 -0
  12. package/dist/cjs/types/components/FormInput/FormInput.d.ts +14 -8
  13. package/dist/cjs/types/components/FormInput/FormInput.stories.d.ts +6 -3
  14. package/dist/cjs/types/components/FormLabel/FormLabel.d.ts +8 -0
  15. package/dist/cjs/types/components/FormLabel/FormLabel.test.d.ts +1 -0
  16. package/dist/cjs/types/components/FormRadio/FormRadio.d.ts +25 -9
  17. package/dist/cjs/types/components/FormRadio/FormRadio.stories.d.ts +4 -3
  18. package/dist/cjs/types/components/FormSelect/FormSelect.d.ts +20 -8
  19. package/dist/cjs/types/components/FormSelect/FormSelect.stories.d.ts +4 -3
  20. package/dist/cjs/types/components/FormSwitch/FormSwitch.d.ts +15 -7
  21. package/dist/cjs/types/components/FormSwitch/FormSwitch.stories.d.ts +1 -1
  22. package/dist/cjs/types/components/Input/Input.d.ts +3 -6
  23. package/dist/cjs/types/components/Input/Input.overrides.d.ts +1 -0
  24. package/dist/cjs/types/components/Radio/Radio.stories.d.ts +1 -1
  25. package/dist/cjs/types/components/Select/Select.stories.d.ts +3 -3
  26. package/dist/cjs/types/components/Switch/Switch.d.ts +2 -4
  27. package/dist/cjs/types/components/Switch/Switch.stories.d.ts +1 -2
  28. package/dist/cjs/types/components/Table/Table.d.ts +29 -0
  29. package/dist/cjs/types/components/Table/Table.overrides.d.ts +6 -0
  30. package/dist/cjs/types/components/Table/Table.stories.d.ts +6 -0
  31. package/dist/cjs/types/components/Table/Table.test.d.ts +1 -0
  32. package/dist/cjs/types/components/Tabs/Tabs.stories.d.ts +1 -1
  33. package/dist/cjs/types/components/Typography/Typography.d.ts +3 -4
  34. package/dist/cjs/types/components/Typography/Typography.stories.d.ts +1 -1
  35. package/dist/cjs/types/global/utils/types.d.ts +4 -6
  36. package/dist/cjs/types/index.d.ts +1 -0
  37. package/dist/esm/index.js +1 -1
  38. package/dist/esm/types/components/Box/Box.stories.d.ts +2 -2
  39. package/dist/esm/types/components/Button/Button.stories.d.ts +1 -0
  40. package/dist/esm/types/components/Checkbox/Checkbox.stories.d.ts +1 -1
  41. package/dist/esm/types/components/Chip/Chip.stories.d.ts +1 -1
  42. package/dist/esm/types/components/EmptyState/EmptyState.d.ts +3 -3
  43. package/dist/esm/types/components/EmptyState/EmptyState.stories.d.ts +3 -3
  44. package/dist/esm/types/components/Form/Form.stories.d.ts +5 -0
  45. package/dist/esm/types/components/FormCheckbox/FormCheckbox.d.ts +20 -8
  46. package/dist/esm/types/components/FormCheckbox/FormCheckbox.stories.d.ts +3 -3
  47. package/dist/esm/types/components/FormControl/FormControl.overrides.d.ts +3 -0
  48. package/dist/esm/types/components/FormInput/FormInput.d.ts +14 -8
  49. package/dist/esm/types/components/FormInput/FormInput.stories.d.ts +6 -3
  50. package/dist/esm/types/components/FormLabel/FormLabel.d.ts +8 -0
  51. package/dist/esm/types/components/FormLabel/FormLabel.test.d.ts +1 -0
  52. package/dist/esm/types/components/FormRadio/FormRadio.d.ts +25 -9
  53. package/dist/esm/types/components/FormRadio/FormRadio.stories.d.ts +4 -3
  54. package/dist/esm/types/components/FormSelect/FormSelect.d.ts +20 -8
  55. package/dist/esm/types/components/FormSelect/FormSelect.stories.d.ts +4 -3
  56. package/dist/esm/types/components/FormSwitch/FormSwitch.d.ts +15 -7
  57. package/dist/esm/types/components/FormSwitch/FormSwitch.stories.d.ts +1 -1
  58. package/dist/esm/types/components/Input/Input.d.ts +3 -6
  59. package/dist/esm/types/components/Input/Input.overrides.d.ts +1 -0
  60. package/dist/esm/types/components/Radio/Radio.stories.d.ts +1 -1
  61. package/dist/esm/types/components/Select/Select.stories.d.ts +3 -3
  62. package/dist/esm/types/components/Switch/Switch.d.ts +2 -4
  63. package/dist/esm/types/components/Switch/Switch.stories.d.ts +1 -2
  64. package/dist/esm/types/components/Table/Table.d.ts +29 -0
  65. package/dist/esm/types/components/Table/Table.overrides.d.ts +6 -0
  66. package/dist/esm/types/components/Table/Table.stories.d.ts +6 -0
  67. package/dist/esm/types/components/Table/Table.test.d.ts +1 -0
  68. package/dist/esm/types/components/Tabs/Tabs.stories.d.ts +1 -1
  69. package/dist/esm/types/components/Typography/Typography.d.ts +3 -4
  70. package/dist/esm/types/components/Typography/Typography.stories.d.ts +1 -1
  71. package/dist/esm/types/global/utils/types.d.ts +4 -6
  72. package/dist/esm/types/index.d.ts +1 -0
  73. package/dist/index.d.ts +130 -50
  74. package/package.json +1 -1
  75. package/dist/cjs/types/components/Select/Select.overrides.d.ts +0 -2
  76. package/dist/esm/types/components/Select/Select.overrides.d.ts +0 -2
package/dist/index.d.ts CHANGED
@@ -1,12 +1,23 @@
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 { SxProps, Theme, ChipProps as ChipProps$1, AvatarProps as AvatarProps$1, ContainerProps as ContainerProps$1, BoxProps as BoxProps$1, CheckboxProps as CheckboxProps$1, RadioProps as RadioProps$1, RadioGroupProps, SwitchProps as SwitchProps$1, SelectProps as SelectProps$1, TextFieldProps, LinkProps as LinkProps$1, TabsProps as TabsProps$1, TabProps as TabProps$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 } from '@mui/material';
5
5
  export * from '@mui/material';
6
6
  import { ThemeProviderProps } from '@mui/material/styles/ThemeProvider';
7
7
  import { ButtonProps as ButtonProps$1 } from '@mui/material/Button';
8
- import React, { HTMLInputTypeAttribute, ReactNode, ElementType } from 'react';
8
+ import React, { ReactNode, ElementType } from 'react';
9
9
  import { TypographyProps as TypographyProps$1 } from '@mui/material/Typography';
10
+ import * as _mui_material_OverridableComponent from '@mui/material/OverridableComponent';
11
+ import * as _mui_system from '@mui/system';
12
+ import { TableProps as TableProps$1 } from '@mui/material/Table';
13
+ import { TableBodyProps as TableBodyProps$1 } from '@mui/material/TableBody';
14
+ import { TableCellProps as TableCellProps$1 } from '@mui/material/TableCell';
15
+ import { TableContainerProps as TableContainerProps$1 } from '@mui/material/TableContainer';
16
+ import { TableHeadProps as TableHeadProps$1 } from '@mui/material/TableHead';
17
+ import { TableRowProps as TableRowProps$1 } from '@mui/material/TableRow';
18
+ import { TablePaginationProps as TablePaginationProps$1 } from '@mui/material/TablePagination';
19
+ import { TableSortLabelProps as TableSortLabelProps$1 } from '@mui/material/TableSortLabel';
20
+ import { TableFooterProps as TableFooterProps$1 } from '@mui/material/TableFooter';
10
21
 
11
22
  declare const UpComponentsProvider: (props: Omit<ThemeProviderProps, 'theme'>) => JSX.Element;
12
23
 
@@ -27,22 +38,25 @@ type MUIGlobalOmit<MuiProps, ComponentProps = unknown> = ComponentProps &
27
38
  | 'focusVisibleClassName'
28
39
  | 'LinkComponent'
29
40
  | 'TouchRippleProps'
41
+ | 'touchRippleRef'
30
42
  >
31
43
 
32
- type BaseProps<ComponentProps = unknown> = ComponentProps & {
33
- sx?: SxProps<Theme>
34
- ref?: React.Ref<unknown>
35
- }
44
+ type BaseProps<D extends React.ElementType = 'div', P = Record<string, unknown>> = BoxProps$1<D, P>
45
+
46
+ type FormBaseProps<C extends React.ElementType> = BaseProps<
47
+ C,
48
+ Pick<TextFieldProps, 'id' | 'label' | 'required' | 'error' | 'disabled' | 'focused' | 'helperText'>
49
+ >
36
50
 
37
51
  declare type ButtonProps = MUIGlobalOmit<ButtonProps$1, {
38
52
  loading?: boolean;
39
53
  }>;
40
54
  declare const Button: ({ color, variant, size, loading, children, ...props }: ButtonProps) => JSX.Element;
41
55
 
42
- declare type TypographyProps = MUIGlobalOmit<TypographyProps$1, {
43
- component?: React.ElementType;
56
+ declare type TypographyProps<C extends React.ElementType = 'p'> = TypographyProps$1<C, {
57
+ component?: C;
44
58
  }>;
45
- declare const Typography: ({ children, ...props }: TypographyProps) => JSX.Element;
59
+ declare const Typography: <C extends React.ElementType<any>>({ children, ...props }: TypographyProps<C>) => JSX.Element;
46
60
 
47
61
  declare type ChipProps = MUIGlobalOmit<Omit<ChipProps$1, 'size'>>;
48
62
  declare const Chip: ({ label, ...props }: ChipProps) => JSX.Element;
@@ -85,69 +99,116 @@ declare const Box: ({ children, ...props }: BoxProps) => JSX.Element;
85
99
  declare type CheckboxProps = MUIGlobalOmit<CheckboxProps$1>;
86
100
  declare const Checkbox: ({ ...props }: CheckboxProps) => JSX.Element;
87
101
 
88
- declare type FormCheckboxProps = MUIGlobalOmit<CheckboxProps, {
102
+ declare type FormCheckboxProps<C extends React.ElementType = 'div'> = CheckboxProps & FormBaseProps<C> & {
89
103
  data: {
90
104
  value: string | number;
91
105
  label?: string;
92
106
  }[];
93
- label?: string;
94
- error?: boolean;
95
- helperText?: string;
96
- }>;
97
- declare const FormCheckbox: ({ id, required, data, label, error, helperText }: FormCheckboxProps) => JSX.Element;
107
+ };
108
+ /**
109
+ * Documentation: https://up-components.up42.dev/?path=/story/patterns-form
110
+ */
111
+ declare const FormCheckbox: React.ForwardRefExoticComponent<Pick<Omit<_mui_material.CheckboxProps, "disableFocusRipple" | "disableRipple" | "classes" | "tabIndex" | "action" | "centerRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "disableElevation" | "touchRippleRef"> & Pick<_mui_material.TextFieldProps, "label" | "id" | "disabled" | "required" | "error" | "focused" | "helperText"> & _mui_system.SystemProps<_mui_material.Theme> & {
112
+ children?: React.ReactNode;
113
+ component?: React.ElementType<any> | undefined;
114
+ ref?: React.Ref<unknown> | undefined;
115
+ sx?: _mui_material.SxProps<_mui_material.Theme> | undefined;
116
+ } & _mui_material_OverridableComponent.CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
117
+ ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
118
+ }, keyof _mui_material_OverridableComponent.CommonProps | "label" | "id" | "children" | "disabled" | "sx" | "ref" | ("alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxShadow" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "typography" | "p" | "displayPrint" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "marginX" | "marginY" | "paddingX" | "paddingY") | "component" | "required" | "error" | "focused" | "helperText"> & {
119
+ data: {
120
+ value: string | number;
121
+ label?: string;
122
+ }[];
123
+ }, "translate" | "size" | keyof _mui_material_OverridableComponent.CommonProps | "data" | "form" | "label" | "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" | "disabled" | "onFocusVisible" | "sx" | "key" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "value" | ("alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxShadow" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "typography" | "p" | "displayPrint" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "marginX" | "marginY" | "paddingX" | "paddingY") | "component" | "required" | "error" | "focused" | "helperText" | "inputProps" | "inputRef" | "checked" | "readOnly" | "icon" | "checkedIcon" | "edge" | "indeterminate" | "indeterminateIcon"> & React.RefAttributes<unknown>>;
98
124
 
99
125
  declare type RadioProps = MUIGlobalOmit<RadioProps$1>;
100
126
  declare const Radio: (props: RadioProps) => JSX.Element;
101
127
 
102
- declare type FormRadioProps = MUIGlobalOmit<RadioGroupProps, {
128
+ declare type FormRadioProps<C extends React.ElementType = 'div'> = RadioGroupProps & FormBaseProps<C> & {
129
+ inputRef?: RadioProps['inputRef'];
103
130
  data: {
104
131
  value: string | number;
105
132
  label?: string;
133
+ message?: string;
106
134
  }[];
107
- helperText?: string;
108
- label?: string;
109
- error?: boolean;
110
- required?: boolean;
111
- }>;
112
- declare const FormRadio: ({ id, helperText, label, error, required, name, data }: FormRadioProps) => JSX.Element;
135
+ };
136
+ /**
137
+ * Documentation: https://up-components.up42.dev/?path=/story/patterns-form
138
+ */
139
+ declare const FormRadio: React.ForwardRefExoticComponent<Pick<RadioGroupProps & Pick<_mui_material.TextFieldProps, "label" | "id" | "disabled" | "required" | "error" | "focused" | "helperText"> & _mui_system.SystemProps<_mui_material.Theme> & {
140
+ children?: React.ReactNode;
141
+ component?: React.ElementType<any> | undefined;
142
+ ref?: React.Ref<unknown> | undefined;
143
+ sx?: _mui_material.SxProps<_mui_material.Theme> | undefined;
144
+ } & _mui_material_OverridableComponent.CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
145
+ ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
146
+ }, keyof _mui_material_OverridableComponent.CommonProps | "label" | "id" | "children" | "disabled" | "sx" | "ref" | ("alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxShadow" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "typography" | "p" | "displayPrint" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "marginX" | "marginY" | "paddingX" | "paddingY") | "component" | "required" | "error" | "focused" | "helperText"> & {
147
+ inputRef?: RadioProps['inputRef'];
148
+ data: {
149
+ value: string | number;
150
+ label?: string;
151
+ message?: string;
152
+ }[];
153
+ }, "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxShadow" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "translate" | "visibility" | "whiteSpace" | "width" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "typography" | "className" | "style" | "classes" | "data" | "label" | "p" | "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" | "disabled" | "sx" | "key" | "name" | "value" | "row" | "displayPrint" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "marginX" | "marginY" | "paddingX" | "paddingY" | "component" | "required" | "error" | "focused" | "helperText" | "inputRef"> & React.RefAttributes<unknown>>;
113
154
 
114
- declare type SwitchProps = MUIGlobalOmit<SwitchProps$1, {
115
- onChange?: (event: React.ChangeEvent<HTMLInputElement>, checked: boolean) => void;
116
- }>;
155
+ declare type SwitchProps = MUIGlobalOmit<SwitchProps$1>;
117
156
  declare const Switch: (props: SwitchProps) => JSX.Element;
118
157
 
119
- interface FormSwitchProps extends SwitchProps {
120
- label?: string;
121
- id?: string;
122
- checked?: boolean;
123
- }
124
- declare const FormSwitch: ({ id, label, checked }: FormSwitchProps) => JSX.Element;
158
+ declare type FormSwitchProps<C extends React.ElementType = 'div'> = SwitchProps & FormBaseProps<C>;
159
+ /**
160
+ * Documentation: https://up-components.up42.dev/?path=/story/patterns-form
161
+ */
162
+ declare const FormSwitch: React.ForwardRefExoticComponent<Pick<Omit<_mui_material.SwitchProps, "disableFocusRipple" | "disableRipple" | "classes" | "tabIndex" | "action" | "centerRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "disableElevation" | "touchRippleRef"> & Pick<_mui_material.TextFieldProps, "label" | "id" | "disabled" | "required" | "error" | "focused" | "helperText"> & _mui_system.SystemProps<_mui_material.Theme> & {
163
+ children?: React.ReactNode;
164
+ component?: React.ElementType<any> | undefined;
165
+ ref?: React.Ref<unknown> | undefined;
166
+ sx?: _mui_material.SxProps<_mui_material.Theme> | undefined;
167
+ } & _mui_material_OverridableComponent.CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
168
+ ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
169
+ }, keyof _mui_material_OverridableComponent.CommonProps | "label" | "id" | "children" | "disabled" | "sx" | "ref" | ("alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxShadow" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "typography" | "p" | "displayPrint" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "marginX" | "marginY" | "paddingX" | "paddingY") | "component" | "required" | "error" | "focused" | "helperText">, "translate" | "size" | keyof _mui_material_OverridableComponent.CommonProps | "form" | "label" | "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" | "disabled" | "onFocusVisible" | "sx" | "key" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "type" | "value" | ("alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxShadow" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "typography" | "p" | "displayPrint" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "marginX" | "marginY" | "paddingX" | "paddingY") | "component" | "required" | "error" | "focused" | "helperText" | "inputProps" | "inputRef" | "checked" | "readOnly" | "icon" | "checkedIcon" | "edge"> & React.RefAttributes<unknown>>;
125
170
 
126
171
  declare type SelectProps = MUIGlobalOmit<Omit<SelectProps$1, 'variant' | 'label'>>;
127
172
  declare const Select: (props: SelectProps) => JSX.Element;
128
173
 
129
- declare type FormSelectProps = MUIGlobalOmit<SelectProps, {
174
+ declare type FormSelectProps<C extends React.ElementType = 'div'> = SelectProps & FormBaseProps<C> & {
130
175
  options: {
131
176
  value: string | number;
132
177
  text: string;
133
178
  }[];
134
- label?: string;
135
- error?: boolean;
136
- helperText?: string;
137
- }>;
138
- declare const FormSelect: ({ id, required, options, label, error, placeholder, helperText, value, }: FormSelectProps) => JSX.Element;
139
-
140
- declare type InputProps = MUIGlobalOmit<TextFieldProps> & {
141
- type?: HTMLInputTypeAttribute;
142
179
  };
143
- declare const Input: ({ type, ...otherProps }: InputProps) => JSX.Element;
180
+ /**
181
+ * Documentation: https://up-components.up42.dev/?path=/story/patterns-form
182
+ */
183
+ declare const FormSelect: React.ForwardRefExoticComponent<Pick<Omit<Omit<_mui_material.SelectProps<unknown>, "label" | "variant">, "disableFocusRipple" | "disableRipple" | "classes" | "tabIndex" | "action" | "centerRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "disableElevation" | "touchRippleRef"> & Pick<_mui_material.TextFieldProps, "label" | "id" | "disabled" | "required" | "error" | "focused" | "helperText"> & _mui_system.SystemProps<_mui_material.Theme> & {
184
+ children?: React.ReactNode;
185
+ component?: React.ElementType<any> | undefined;
186
+ ref?: React.Ref<unknown> | undefined;
187
+ sx?: _mui_material.SxProps<_mui_material.Theme> | undefined;
188
+ } & _mui_material_OverridableComponent.CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
189
+ ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
190
+ }, keyof _mui_material_OverridableComponent.CommonProps | "label" | "id" | "children" | "disabled" | "sx" | "ref" | ("alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxShadow" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "typography" | "p" | "displayPrint" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "marginX" | "marginY" | "paddingX" | "paddingY") | "component" | "required" | "error" | "focused" | "helperText"> & {
191
+ options: {
192
+ value: string | number;
193
+ text: string;
194
+ }[];
195
+ }, "translate" | "input" | "size" | "components" | "fullWidth" | keyof _mui_material_OverridableComponent.CommonProps | "label" | "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" | "disabled" | "sx" | "key" | "autoFocus" | "name" | "type" | "value" | ("alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxShadow" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "typography" | "p" | "displayPrint" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "marginX" | "marginY" | "paddingX" | "paddingY") | "component" | "required" | "error" | "focused" | "helperText" | "autoComplete" | "inputProps" | "inputRef" | "multiline" | "rows" | "maxRows" | "minRows" | "multiple" | "readOnly" | "open" | "componentsProps" | "disableInjectingGlobalStyles" | "endAdornment" | "inputComponent" | "renderSuffix" | "startAdornment" | "disableUnderline" | "autoWidth" | "defaultOpen" | "displayEmpty" | "IconComponent" | "labelId" | "MenuProps" | "native" | "onClose" | "onOpen" | "renderValue" | "SelectDisplayProps" | "options"> & React.RefAttributes<unknown>>;
144
196
 
145
- declare type FormInputProps = MUIGlobalOmit<InputProps, {
146
- label?: string;
147
- error?: boolean;
148
- helperText?: string;
149
- }>;
150
- declare const FormInput: ({ id, required, label, error, helperText, ...props }: FormInputProps) => JSX.Element;
197
+ declare type InputProps = Omit<TextFieldProps, 'maxRows' | 'minRows' | 'multiline' | 'rows' | 'size' | 'variant'>;
198
+ declare const Input: ({ type, ...props }: InputProps) => JSX.Element;
199
+
200
+ declare type FormInputProps<C extends React.ElementType = 'div'> = InputProps & FormBaseProps<C>;
201
+ /**
202
+ * Documentation: https://up-components.up42.dev/?path=/story/patterns-form
203
+ */
204
+ declare const FormInput: React.ForwardRefExoticComponent<Pick<InputProps & Pick<_mui_material.TextFieldProps, "label" | "id" | "disabled" | "required" | "error" | "focused" | "helperText"> & _mui_system.SystemProps<_mui_material.Theme> & {
205
+ children?: React.ReactNode;
206
+ component?: React.ElementType<any> | undefined;
207
+ ref?: React.Ref<unknown> | undefined;
208
+ sx?: _mui_material.SxProps<_mui_material.Theme> | undefined;
209
+ } & _mui_material_OverridableComponent.CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
210
+ ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
211
+ }, keyof _mui_material_OverridableComponent.CommonProps | "label" | "id" | "children" | "disabled" | "sx" | "ref" | ("alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxShadow" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "typography" | "p" | "displayPrint" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "marginX" | "marginY" | "paddingX" | "paddingY") | "component" | "required" | "error" | "focused" | "helperText">, "translate" | "fullWidth" | keyof _mui_material_OverridableComponent.CommonProps | "label" | "slot" | "select" | "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" | "disabled" | "sx" | "key" | "autoFocus" | "name" | "type" | "value" | ("alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxShadow" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "typography" | "p" | "displayPrint" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "marginX" | "marginY" | "paddingX" | "paddingY") | "component" | "required" | "error" | "focused" | "helperText" | "hiddenLabel" | "InputProps" | "autoComplete" | "FormHelperTextProps" | "InputLabelProps" | "inputProps" | "inputRef" | "SelectProps"> & React.RefAttributes<unknown>>;
151
212
 
152
213
  declare type LinkProps<C extends React.ElementType> = LinkProps$1<C, {
153
214
  component?: C;
@@ -200,7 +261,7 @@ declare type TabGroupProps = {
200
261
  };
201
262
  declare const TabGroup: ({ tabs, nameSpace: _nameSpace, tabContentProps, tabsProps }: TabGroupProps) => JSX.Element;
202
263
 
203
- declare type EmptyStateProps = BaseProps<{
264
+ declare type EmptyStateProps<C extends React.ElementType = 'div'> = BaseProps<C, {
204
265
  /**
205
266
  * Helpful message that conveys the purpose of the screen and the next action to populate the space
206
267
  */
@@ -218,6 +279,25 @@ declare type EmptyStateProps = BaseProps<{
218
279
  */
219
280
  action?: ReactNode;
220
281
  }>;
221
- declare const EmptyState: ({ icon: Icon, title, subTitle, action, ...props }: EmptyStateProps & Omit<JSX.IntrinsicElements['div'], keyof EmptyStateProps>) => JSX.Element;
282
+ declare const EmptyState: <C extends React.ElementType<any>>({ icon: Icon, title, subTitle, action, ...props }: EmptyStateProps<C>) => JSX.Element;
283
+
284
+ declare type TableProps = MUIGlobalOmit<TableProps$1>;
285
+ declare const Table: ({ children, ...props }: TableProps) => JSX.Element;
286
+ declare type TableBodyProps = MUIGlobalOmit<TableBodyProps$1>;
287
+ declare const TableBody: ({ children, ...props }: TableBodyProps) => JSX.Element;
288
+ declare type TableCellProps = MUIGlobalOmit<TableCellProps$1>;
289
+ declare const TableCell: ({ children, ...props }: TableCellProps) => JSX.Element;
290
+ declare type TableContainerProps = MUIGlobalOmit<TableContainerProps$1>;
291
+ declare const TableContainer: ({ children, ...props }: TableContainerProps) => JSX.Element;
292
+ declare type TableHeadProps = MUIGlobalOmit<TableHeadProps$1>;
293
+ declare const TableHead: ({ children, ...props }: TableHeadProps) => JSX.Element;
294
+ declare type TableRowProps = MUIGlobalOmit<TableRowProps$1>;
295
+ declare const TableRow: ({ children, ...props }: TableRowProps) => JSX.Element;
296
+ declare type TablePaginationProps = MUIGlobalOmit<TablePaginationProps$1>;
297
+ declare const TablePagination: ({ ...props }: TablePaginationProps) => JSX.Element;
298
+ declare type TableSortLabelProps = MUIGlobalOmit<TableSortLabelProps$1>;
299
+ declare const TableSortLabel: ({ children, ...props }: TableSortLabelProps) => JSX.Element;
300
+ declare type TableFooterProps = MUIGlobalOmit<TableFooterProps$1>;
301
+ declare const TableFooter: ({ children, ...props }: TableFooterProps) => JSX.Element;
222
302
 
223
- export { Avatar, AvatarProps, 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, Radio, RadioProps, Select, SelectProps, Switch, SwitchProps, Tab, TabGroup, TabGroupProps, TabProps, Tabs, TabsProps, Typography, TypographyProps, UpComponentsProvider, theme };
303
+ export { Avatar, AvatarProps, 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, 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, Typography, TypographyProps, UpComponentsProvider, theme };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@up42/up-components",
3
- "version": "0.2.4",
3
+ "version": "0.3.1",
4
4
  "description": "UP42 Component Library",
5
5
  "author": "Axel Fuhrmann axel.fuhrmann@up42.com",
6
6
  "license": "ISC",
@@ -1,2 +0,0 @@
1
- import { OverridesStyleRules } from '@mui/material/styles/overrides';
2
- export declare const MuiSelect: OverridesStyleRules;
@@ -1,2 +0,0 @@
1
- import { OverridesStyleRules } from '@mui/material/styles/overrides';
2
- export declare const MuiSelect: OverridesStyleRules;