Skip to content

Commit

Permalink
Wrappers pre.730
Browse files Browse the repository at this point in the history
  • Loading branch information
aerialist7 committed Apr 16, 2024
1 parent 9476002 commit 3a07b33
Show file tree
Hide file tree
Showing 7 changed files with 270 additions and 253 deletions.
4 changes: 2 additions & 2 deletions buildSrc/src/main/kotlin/karakum/mui/FunctionType.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ internal fun String.toFunctionType(): String? {

return replace(" => ", "->")
.replace("{\n matches: boolean;\n}", DYNAMIC)
.replace("MouseEvent | TouchEvent", "web.uievents.UIEvent<*>")
.replace("MouseEvent | TouchEvent", "web.uievents.UIEvent")
.replace("React.MouseEvent | React.KeyboardEvent | React.FocusEvent", "react.dom.events.SyntheticEvent<*, *>")
.replace("React.SyntheticEvent | Event", "react.dom.events.SyntheticEvent<*, *>")
.replace("React.SyntheticEvent<any> | Event", "react.dom.events.SyntheticEvent<*, *>")
Expand Down Expand Up @@ -49,7 +49,7 @@ internal fun String.toFunctionType(): String? {
"?: React.HTMLAttributes<HTMLInputElement>",
": react.dom.html.HTMLAttributes<web.html.HTMLInputElement>?"
)
.replace(": Event", ": Event<*>")
.replace(": Event", ": Event")
.replace("?: any", ": Any?")
.replace("?: string", ": String?")
.replace("?: boolean", ": Boolean?")
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/karakum/mui/Generator.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ private val DEFAULT_IMPORTS = listOf(
"InputType" to "web.html.InputType",

" ClassName" to "web.cssom.ClassName",
"Event<*>" to "web.events.Event",
"Event" to "web.events.Event",
"HTMLElement" to "web.html.HTMLElement",

"BoxProps" to "mui.system.BoxProps",
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ mui-system.version=5.15.11
mui-lab.version=5.0.0-alpha.166
mui-x-date-pickers.version=5.0.20
mui-x-tree-view.version=6.17.0
kotlin-wrappers.version=1.0.0-pre.703
kotlin-wrappers.version=1.0.0-pre.730
2 changes: 1 addition & 1 deletion mui-kotlin/src/jsMain/kotlin/mui/base/ClickAwayListener.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ external interface ClickAwayListenerProps : react.PropsWithChildren {
/**
* Callback fired when a "click away" event is detected.
*/
var onClickAway: (event: web.uievents.UIEvent<*>) -> Unit
var onClickAway: (event: web.uievents.UIEvent) -> Unit

/**
* The touch event to listen to. You can disable the listener by providing `false`.
Expand Down
2 changes: 1 addition & 1 deletion mui-kotlin/src/jsMain/kotlin/mui/base/useSlider.types.kt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ external interface UseSliderParameters {
* @param {number | number[]} value The new value.
* @param {number} activeThumb Index of the currently moved thumb.
*/
var onChange: ((event: Event<*>, value: dynamic, activeThumb: Number) -> Unit)?
var onChange: ((event: Event, value: dynamic, activeThumb: Number) -> Unit)?

/**
* Callback function that is fired when the `mouseup` is triggered.
Expand Down
2 changes: 1 addition & 1 deletion mui-kotlin/src/jsMain/kotlin/mui/material/Slider.kt
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ external interface SliderOwnProps :
* @param {number | number[]} value The new value.
* @param {number} activeThumb Index of the currently moved thumb.
*/
var onChange: ((event: Event<*>, value: dynamic, activeThumb: Number) -> Unit)?
var onChange: ((event: Event, value: dynamic, activeThumb: Number) -> Unit)?

/**
* Callback function that is fired when the `mouseup` is triggered.
Expand Down
509 changes: 263 additions & 246 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit 3a07b33

Please sign in to comment.