Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
aerialist7 committed May 7, 2024
1 parent 197309f commit 2ba9749
Show file tree
Hide file tree
Showing 22 changed files with 100 additions and 87 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

package mui.base

import web.html.HTMLElement

external interface TablePaginationProps :
TablePaginationOwnProps,
react.dom.html.HTMLAttributes<web.html.HTMLTableCellElement>
Expand Down Expand Up @@ -103,7 +105,7 @@ external interface TablePaginationOwnProps : react.Props {
*
* @param {React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>} event The event source of the callback.
*/
var onRowsPerPageChange: react.dom.events.ChangeEventHandler<web.html.HTMLElement>?
var onRowsPerPageChange: react.dom.events.ChangeEventHandler<HTMLElement>?

/**
* The zero-based index of the current page.
Expand Down
6 changes: 4 additions & 2 deletions mui-kotlin/src/jsMain/kotlin/mui/base/useButton.types.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

package mui.base

import web.dom.Element

external interface UseButtonParameters {
/**
* If `true`, the component is disabled.
Expand All @@ -19,7 +21,7 @@ external interface UseButtonParameters {

var onFocusVisible: react.dom.events.FocusEventHandler<*>?

var rootRef: react.Ref<web.dom.Element>?
var rootRef: react.Ref<Element>?

var tabIndex: Int?

Expand Down Expand Up @@ -88,5 +90,5 @@ external interface UseButtonReturnValue {
/**
* A ref to the component's root DOM element.
*/
var rootRef: react.RefCallback<web.dom.Element>?
var rootRef: react.RefCallback<Element>?
}
14 changes: 8 additions & 6 deletions mui-kotlin/src/jsMain/kotlin/mui/base/useInput.types.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

package mui.base

import web.html.HTMLElement

external interface UseInputParameters {
/**
* The default value. Use when the component is not controlled.
Expand All @@ -20,13 +22,13 @@ external interface UseInputParameters {
*/
var error: Boolean?

var onBlur: react.dom.events.FocusEventHandler<web.html.HTMLElement>?
var onBlur: react.dom.events.FocusEventHandler<HTMLElement>?

var onClick: react.dom.events.MouseEventHandler<*>?

var onChange: react.dom.events.ChangeEventHandler<web.html.HTMLElement>?
var onChange: react.dom.events.ChangeEventHandler<HTMLElement>?

var onFocus: react.dom.events.FocusEventHandler<web.html.HTMLElement>?
var onFocus: react.dom.events.FocusEventHandler<HTMLElement>?

var inputRef: react.Ref<web.html.HTMLInputElement /* or web.html.HTMLTextAreaElement*/>?

Expand All @@ -50,11 +52,11 @@ external interface UseInputInputSlotOwnProps : react.Props {

var value: dynamic

var onBlur: react.dom.events.FocusEventHandler<web.html.HTMLElement>
var onBlur: react.dom.events.FocusEventHandler<HTMLElement>

var onChange: react.dom.events.ChangeEventHandler<web.html.HTMLElement>
var onChange: react.dom.events.ChangeEventHandler<HTMLElement>

var onFocus: react.dom.events.FocusEventHandler<web.html.HTMLElement>
var onFocus: react.dom.events.FocusEventHandler<HTMLElement>

var required: Boolean

Expand Down
5 changes: 3 additions & 2 deletions mui-kotlin/src/jsMain/kotlin/mui/base/useList.types.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
package mui.base

import js.array.ReadonlyArray
import web.dom.Element
import web.html.HTMLElement

external interface ListState<ItemValue> {
Expand Down Expand Up @@ -79,7 +80,7 @@ external interface UseListParameters<ItemValue, State, CustomAction, CustomActio
/**
* Ref to the list root DOM element.
*/
var rootRef: react.Ref<web.dom.Element>?
var rootRef: react.Ref<Element>?

/**
* Callback fired when the selected value changes.
Expand Down Expand Up @@ -192,7 +193,7 @@ external interface UseListReturnValue {
*/
var getRootProps: react.Props /* <ExternalProps extends Record<string, unknown> = {}>(externalProps?: ExternalProps) => UseListRootSlotProps<ExternalProps> */

var rootRef: react.RefCallback<web.dom.Element>?
var rootRef: react.RefCallback<Element>?

var state: dynamic
}
8 changes: 5 additions & 3 deletions mui-kotlin/src/jsMain/kotlin/mui/base/useMenu.types.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
package mui.base

import js.array.ReadonlyArray
import web.dom.Element
import web.html.HTMLElement

external interface UseMenuParameters {
/**
Expand Down Expand Up @@ -38,7 +40,7 @@ external interface UseMenuParameters {
/**
* The ref to the menu's listbox node.
*/
var listboxRef: react.Ref<web.dom.Element>?
var listboxRef: react.Ref<Element>?

/**
* The name of the component using useMenu.
Expand Down Expand Up @@ -75,7 +77,7 @@ external interface UseMenuReturnValue {
/**
* The ref to the menu's listbox node.
*/
var listboxRef: react.RefCallback<web.dom.Element>?
var listboxRef: react.RefCallback<Element>?

/**
* Items in the menu listbox.
Expand All @@ -90,5 +92,5 @@ external interface UseMenuReturnValue {
/**
* An element that triggers the visibility of the menu.
*/
var triggerElement: web.html.HTMLElement?
var triggerElement: HTMLElement?
}
7 changes: 5 additions & 2 deletions mui-kotlin/src/jsMain/kotlin/mui/base/useMenuButton.types.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

package mui.base

import web.dom.Element
import web.html.HTMLElement

external interface UseMenuButtonParameters {
/**
* If `true`, the component is disabled.
Expand All @@ -18,7 +21,7 @@ external interface UseMenuButtonParameters {
/**
* The ref to the root element.
*/
var rootRef: react.Ref<web.html.HTMLElement>?
var rootRef: react.Ref<HTMLElement>?
}

external interface UseMenuButtonReturnValue {
Expand All @@ -39,5 +42,5 @@ external interface UseMenuButtonReturnValue {
/**
* The ref to the root element.
*/
var rootRef: react.RefCallback<web.dom.Element>?
var rootRef: react.RefCallback<Element>?
}
6 changes: 4 additions & 2 deletions mui-kotlin/src/jsMain/kotlin/mui/base/useMenuItem.types.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

package mui.base

import web.dom.Element

external interface MenuItemMetadata {
var id: String

Expand All @@ -19,7 +21,7 @@ external interface UseMenuItemParameters {

var onClick: react.dom.events.MouseEventHandler<*>?

var rootRef: react.Ref<web.dom.Element>
var rootRef: react.Ref<Element>

/**
* If `true`, the menu item won't receive focus when the mouse moves over it.
Expand Down Expand Up @@ -60,7 +62,7 @@ external interface UseMenuItemReturnValue {
/**
* The ref to the component's root DOM element.
*/
var rootRef: react.RefCallback<web.dom.Element>?
var rootRef: react.RefCallback<Element>?

/**
* Total number of items in the menu.
Expand Down
6 changes: 4 additions & 2 deletions mui-kotlin/src/jsMain/kotlin/mui/base/useOption.types.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

package mui.base

import web.dom.Element

external interface SelectOption<Value> {
var value: Value

Expand All @@ -19,7 +21,7 @@ external interface UseOptionParameters<Value> {

var label: react.ReactNode

var rootRef: react.Ref<web.dom.Element>?
var rootRef: react.Ref<Element>?

var value: Value
}
Expand Down Expand Up @@ -47,5 +49,5 @@ external interface UseOptionReturnValue {
/**
* Ref to the root slot DOM node.
*/
var rootRef: react.RefCallback<web.dom.Element>?
var rootRef: react.RefCallback<Element>?
}
10 changes: 6 additions & 4 deletions mui-kotlin/src/jsMain/kotlin/mui/base/useSelect.types.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

package mui.base

import web.dom.Element

external interface SelectOptionDefinition<Value> {
var value: Value

Expand Down Expand Up @@ -40,7 +42,7 @@ external interface UseSelectParameters<OptionValue, Multiple> {
/**
* The ref of the trigger button element.
*/
var buttonRef: react.Ref<web.dom.Element>?
var buttonRef: react.Ref<Element>?

/**
* The `id` attribute of the listbox element.
Expand All @@ -50,7 +52,7 @@ external interface UseSelectParameters<OptionValue, Multiple> {
/**
* The ref of the listbox element.
*/
var listboxRef: react.Ref<web.dom.Element>?
var listboxRef: react.Ref<Element>?

/**
* If `true`, the end user can select multiple values.
Expand Down Expand Up @@ -143,7 +145,7 @@ external interface UseSelectReturnValue<Value, Multiple> {
/**
* Ref to the button slot DOM node.
*/
var buttonRef: react.RefCallback<web.dom.Element>?
var buttonRef: react.RefCallback<Element>?

/**
* If `true`, the select is disabled.
Expand Down Expand Up @@ -198,7 +200,7 @@ external interface UseSelectReturnValue<Value, Multiple> {
/**
* Ref to the listbox slot DOM node.
*/
var listboxRef: react.RefCallback<web.dom.Element>?
var listboxRef: react.RefCallback<Element>?

/**
* If `true`, the listbox is open.
Expand Down
5 changes: 3 additions & 2 deletions mui-kotlin/src/jsMain/kotlin/mui/base/useSlider.types.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

package mui.base

import web.dom.Element
import web.events.Event

external interface UseSliderParameters {
Expand Down Expand Up @@ -88,7 +89,7 @@ external interface UseSliderParameters {
/**
* The ref attached to the root of the Slider.
*/
var rootRef: react.Ref<web.dom.Element>?
var rootRef: react.Ref<Element>?

/**
* A transformation function, to change the scale of the slider.
Expand Down Expand Up @@ -206,7 +207,7 @@ external interface UseSliderReturnValue {
/**
* Ref to the root slot's DOM node.
*/
var rootRef: react.RefCallback<web.dom.Element>?
var rootRef: react.RefCallback<Element>?

/**
* The track leap for the current value of the slider.
Expand Down
6 changes: 4 additions & 2 deletions mui-kotlin/src/jsMain/kotlin/mui/base/useTab.types.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

package mui.base

import web.dom.Element

external interface UseTabParameters {
/**
* The value of the tab.
Expand Down Expand Up @@ -34,7 +36,7 @@ external interface UseTabParameters {
/**
* Ref to the root slot's DOM element.
*/
var rootRef: react.Ref<web.dom.Element>?
var rootRef: react.Ref<Element>?
}

external interface UseTabReturnValue {
Expand Down Expand Up @@ -69,7 +71,7 @@ external interface UseTabReturnValue {
/**
* Ref to the root slot's DOM element.
*/
var rootRef: react.RefCallback<web.dom.Element>?
var rootRef: react.RefCallback<Element>?

/**
* If `true`, the tab is selected.
Expand Down
6 changes: 4 additions & 2 deletions mui-kotlin/src/jsMain/kotlin/mui/base/useTabPanel.types.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

package mui.base

import web.html.HTMLElement

external interface UseTabPanelParameters {
/**
* The id of the TabPanel.
Expand All @@ -11,7 +13,7 @@ external interface UseTabPanelParameters {
/**
* The ref of the TabPanel.
*/
var rootRef: react.Ref<web.html.HTMLElement>?
var rootRef: react.Ref<HTMLElement>?

/**
* The value of the TabPanel. It will be shown when the Tab with the corresponding value is selected.
Expand All @@ -32,5 +34,5 @@ external interface UseTabPanelReturnValue {
*/
var getRootProps: react.Props /* <ExternalProps extends Record<string, unknown> = {}>(externalProps?: ExternalProps) => UseTabPanelRootSlotProps<ExternalProps> */

var rootRef: react.Ref<web.html.HTMLElement>
var rootRef: react.Ref<HTMLElement>
}
6 changes: 4 additions & 2 deletions mui-kotlin/src/jsMain/kotlin/mui/base/useTabsList.types.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

package mui.base

import web.dom.Element

external interface UseTabsListParameters {
/**
* Ref to the root element.
*/
var rootRef: react.Ref<web.dom.Element>
var rootRef: react.Ref<Element>
}

external interface UseTabsListReturnValue {
Expand Down Expand Up @@ -43,7 +45,7 @@ external interface UseTabsListReturnValue {
*/
var orientation: Orientation

var rootRef: react.RefCallback<web.dom.Element>?
var rootRef: react.RefCallback<Element>?

/**
* The value of the currently selected tab.
Expand Down
3 changes: 2 additions & 1 deletion mui-kotlin/src/jsMain/kotlin/mui/material/Pagination.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ package mui.material

import mui.material.styles.Theme
import mui.system.SxProps
import web.html.HTMLElement

external interface PaginationProps :
UsePaginationProps,
mui.system.StandardProps,
react.dom.html.HTMLAttributes<web.html.HTMLElement>,
react.dom.html.HTMLAttributes<HTMLElement>,
mui.system.PropsWithSx {
/**
* Override or extend the styles applied to the component.
Expand Down
3 changes: 2 additions & 1 deletion mui-kotlin/src/jsMain/kotlin/mui/material/TablePagination.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package mui.material

import mui.material.styles.Theme
import mui.system.SxProps
import web.html.HTMLElement

external interface TablePaginationProps :
TablePaginationOwnProps,
Expand Down Expand Up @@ -108,7 +109,7 @@ external interface TablePaginationOwnProps : mui.system.PropsWithSx {
*
* @param {React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>} event The event source of the callback.
*/
var onRowsPerPageChange: react.dom.events.ChangeEventHandler<web.html.HTMLElement>?
var onRowsPerPageChange: react.dom.events.ChangeEventHandler<HTMLElement>?

/**
* The zero-based index of the current page.
Expand Down
Loading

0 comments on commit 2ba9749

Please sign in to comment.