Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions packages/rescript-mui-material/src/components/ButtonBase.res
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,6 @@ type publicProps = {
* The rel attribute for the link.
*/
rel?: string,
/**
* @default 0
*/
tabIndex?: int,
/**
* The target attribute of the link.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type classes = {
}

type props = {
...CommonProps.t,
...CommonProps.t_NoTitle,
/**
* The action to display in the card header.
*/
Expand Down
4 changes: 0 additions & 4 deletions packages/rescript-mui-material/src/components/Slider.res
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,6 @@ type sliderProps<'value> = {
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
sx?: Sx.props,
/**
* Tab index attribute of the hidden `input` element.
*/
tabIndex?: int,
/**
* The track presentation:
*
Expand Down
55 changes: 53 additions & 2 deletions packages/rescript-mui-material/src/types/CommonProps.res
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ type t_NoId = {
style?: ReactDOM.Style.t,
ref?: ReactDOM.domRef,
@as("data-testid") dataTestId?: string,
/**
* @default 0
*/
tabIndex?: int,
}

type classNameOnly = {className: string}
Expand All @@ -117,27 +121,74 @@ type t_NoRef = {
id?: string,
}

type t_NoTitle = {
...t_NoId,
id?: string,
}

type t = {
...t_NoId,
id?: string,
title?: string,
}

type clickableProps = {
...t,
// Focus Events
onBlur?: ReactEvent.Focus.t => unit,
onContextMenu?: ReactEvent.Mouse.t => unit,
onDragLeave?: ReactEvent.Mouse.t => unit,
onFocus?: ReactEvent.Focus.t => unit,

// Keyboard Events
onKeyDown?: ReactEvent.Keyboard.t => unit,
onKeyPress?: ReactEvent.Keyboard.t => unit,
onKeyUp?: ReactEvent.Keyboard.t => unit,

// Mouse Events
onContextMenu?: ReactEvent.Mouse.t => unit,
onDrag?: ReactEvent.Mouse.t => unit,
onDragEnd?: ReactEvent.Mouse.t => unit,
onDragEnter?: ReactEvent.Mouse.t => unit,
onDragExit?: ReactEvent.Mouse.t => unit,
onDragLeave?: ReactEvent.Mouse.t => unit,
onDragOver?: ReactEvent.Mouse.t => unit,
onDragStart?: ReactEvent.Mouse.t => unit,
onDrop?: ReactEvent.Mouse.t => unit,
onMouseDown?: ReactEvent.Mouse.t => unit,
onMouseEnter?: ReactEvent.Mouse.t => unit,
onMouseLeave?: ReactEvent.Mouse.t => unit,
onMouseUp?: ReactEvent.Mouse.t => unit,

// Touch Events
onTouchCancel?: ReactEvent.Touch.t => unit,
onTouchCancelCapture?: ReactEvent.Touch.t => unit,
onTouchEnd?: ReactEvent.Touch.t => unit,
onTouchEndCapture?: ReactEvent.Touch.t => unit,
onTouchMove?: ReactEvent.Touch.t => unit,
onTouchMoveCapture?: ReactEvent.Touch.t => unit,
onTouchStart?: ReactEvent.Touch.t => unit,
onTouchStartCapture?: ReactEvent.Touch.t => unit,

// Pointer Events
onGotPointerCapture?: ReactEvent.Pointer.t => unit,
onGotPointerCaptureCapture?: ReactEvent.Pointer.t => unit,
onLostPointerCapture?: ReactEvent.Pointer.t => unit,
onLostPointerCaptureCapture?: ReactEvent.Pointer.t => unit,
onPointerCancel?: ReactEvent.Pointer.t => unit,
onPointerCancelCapture?: ReactEvent.Pointer.t => unit,
onPointerDown?: ReactEvent.Pointer.t => unit,
onPointerDownCapture?: ReactEvent.Pointer.t => unit,
onPointerEnter?: ReactEvent.Pointer.t => unit,
onPointerEnterCapture?: ReactEvent.Pointer.t => unit,
onPointerLeave?: ReactEvent.Pointer.t => unit,
onPointerLeaveCapture?: ReactEvent.Pointer.t => unit,
onPointerMove?: ReactEvent.Pointer.t => unit,
onPointerMoveCapture?: ReactEvent.Pointer.t => unit,
onPointerOut?: ReactEvent.Pointer.t => unit,
onPointerOutCapture?: ReactEvent.Pointer.t => unit,
onPointerOver?: ReactEvent.Pointer.t => unit,
onPointerOverCapture?: ReactEvent.Pointer.t => unit,
onPointerUp?: ReactEvent.Pointer.t => unit,
onPointerUpCapture?: ReactEvent.Pointer.t => unit,
}

type clickablePropsWithOnClick = {
Expand Down