release: WRNexusJS 0.6.0

This commit is contained in:
2026-08-01 01:09:58 +05:30
parent 3e565e8d03
commit 687d345882
502 changed files with 33038 additions and 11358 deletions
+29 -26
View File
@@ -1,33 +1,36 @@
component Switch {
outputs {
input(payload: { value?: string | number | boolean | null; values?: Array<string | number | boolean | null | object>; sourceEvent?: Event; [key: string]: string | number | boolean | null | object } | string | number | boolean | null)
change(payload: { value?: string | number | boolean | null; values?: Array<string | number | boolean | null | object>; sourceEvent?: Event; [key: string]: string | number | boolean | null | object } | string | number | boolean | null)
focus(payload: { sourceEvent?: Event; [key: string]: string | number | boolean | null | object })
blur(payload: { sourceEvent?: Event; [key: string]: string | number | boolean | null | object })
}
props {
@event input = function
@event change = function
@event focus = function
@event blur = function
size = "default"
color = "primary"
id = ""
name = ""
label = "Switch"
hiddenLabel = false
placeholder = ""
variant = "normal"
icon = ""
iconPosition = "start"
value = "on"
checked = false
helperText = ""
cornerHint = ""
error = ""
inline = false
readonly = false
disabled = false
required = false
class = ""
size: string = "default"
color: string = "primary"
id: string = ""
name: string = ""
label: string = "Switch"
hiddenLabel: boolean = false
placeholder: string = ""
variant: string = "normal"
icon: string = ""
iconPosition: string = "start"
value: string = "on"
checked: boolean = false
helperText: string = ""
cornerHint: string = ""
error: string = ""
inline: boolean = false
readonly: boolean = false
disabled: boolean = false
required: boolean = false
class: string = ""
}
functions {
function emitField(nameEvent, sourceEvent) { sourceEvent.stopPropagation(); $emit(nameEvent, { checked: sourceEvent.currentTarget.checked, value: value, name: name, sourceEvent: sourceEvent }) }
function preventReadonly(sourceEvent) { if (readonly) sourceEvent.preventDefault() }
client function emitField(nameEvent, sourceEvent) { sourceEvent.stopPropagation(); output[nameEvent]({ checked: sourceEvent.currentTarget.checked, value: value, name: name, sourceEvent: sourceEvent }) }
client function preventReadonly(sourceEvent) { if (readonly) sourceEvent.preventDefault() }
}
view {
<div {...attrs} class="wire-next wire-next--color-{color} wire-next--size-{size} wire-next--choice-field {class}" data-inline="{inline}" data-invalid="{error ? 'true' : 'false'}">