diff --git a/src/API.jl b/src/API.jl index 1a2883c2..718fed80 100644 --- a/src/API.jl +++ b/src/API.jl @@ -39,6 +39,8 @@ const ATTRIBUTES_MAPPINGS = Dict{String,String}( "iconcolor" => "icon-color", "iconremove" => "icon-remove", "iconright" => "icon-right", + "imageclass" => "img-class", + "imagestyle" => "img-style", "indeterminateicon" => "indeterminate-icon", "indeterminatevalue" => "indeterminate-value", "inputclass" => "input-class", @@ -59,11 +61,13 @@ const ATTRIBUTES_MAPPINGS = Dict{String,String}( "minheight" => "min-height", "maxheight" => "max-height", "multiline" => "multi-line", + "nativecontextmenu" => "native-context-menu", "navmaxyearmonth" => "navigation-max-year-month", "navminyearmonth" => "navigation-min-year-month", "newvaluemode" => "new-value-mode", "nobackdrop" => "no-backdrop-dismiss", "nocaps" => "no-caps", + "nodefaultspinner" => "no-default-spinner", "noerrorfocus" => "no-error-focus", "noerroricon" => "no-error-icon", "noesc" => "no-esc-dismiss", @@ -74,12 +78,15 @@ const ATTRIBUTES_MAPPINGS = Dict{String,String}( "nowrap" => "no-wrap", "nounset" => "no-unset", "pagination" => ":pagination.sync", + "placeholdersrc" => "placeholder-src", "reactiverules" => "reactive-rules", "reversefillmask" => "reverse-fill-mask", "rules" => ":rules", "selected" => ":selected.sync", "shadowtext" => "shadow-text", "showifabove" => "show-if-above", + "spinnercolor" => "spinner-color", + "spinnersize" => "spinner-size", "stacked" => "stack", "stacklabel" => "stack-label", "textcolor" => "text-color", diff --git a/src/ImageViews.jl b/src/ImageViews.jl new file mode 100644 index 00000000..edce59cb --- /dev/null +++ b/src/ImageViews.jl @@ -0,0 +1,18 @@ +module ImageViews + +using Genie, Stipple, StippleUI, StippleUI.API +import Genie.Renderer.Html: HTMLString, normal_element, register_normal_element + +export imageview + +register_normal_element("q__img", context = @__MODULE__) + +function imageview(args...; + wrap::Function = StippleUI.DEFAULT_WRAPPER, + kwargs...) + wrap() do + q__img(args...; attributes([kwargs...], StippleUI.API.ATTRIBUTES_MAPPINGS)...) + end +end + +end diff --git a/src/StippleUI.jl b/src/StippleUI.jl index 8bb2133e..5d0bbeea 100644 --- a/src/StippleUI.jl +++ b/src/StippleUI.jl @@ -71,6 +71,7 @@ include("Forms.jl") include("FormInputs.jl") include("Headings.jl") include("Icons.jl") +include("ImageViews.jl") include("InnerLoaders.jl") include("Intersections.jl") include("Knobs.jl") @@ -114,6 +115,7 @@ export quasar, quasar_pure, vue, vue_pure, xelem, xelem_pure, @click, csscolors @reexport using .FormInputs @reexport using .Headings @reexport using .Icons +@reexport using .ImageViews @reexport using .InnerLoaders @reexport using .Intersections @reexport using .Knobs