diff --git a/src/InnerLoaders.jl b/src/InnerLoaders.jl new file mode 100644 index 00000000..6e2b44e7 --- /dev/null +++ b/src/InnerLoaders.jl @@ -0,0 +1,26 @@ +module InnerLoaders + +using Genie, Stipple, StippleUI, StippleUI.API +import Genie.Renderer.Html: HTMLString, normal_element, register_normal_element + +export innerloader + +register_normal_element("q__inner__loading", context = @__MODULE__) + +function innerloader(label::String = "", + state::Union{Symbol,Nothing} = nothing, + args...; + wrap::Function = StippleUI.DEFAULT_WRAPPER, + kwargs...) + + wrap() do + q__inner__loading( args...; + attributes( + [ Symbol(":state") => state, + :label => label, + kwargs... + ], StippleUI.API.ATTRIBUTES_MAPPINGS)...) + end +end + +end diff --git a/src/ScrollAreas.jl b/src/ScrollAreas.jl new file mode 100644 index 00000000..5ffe20cb --- /dev/null +++ b/src/ScrollAreas.jl @@ -0,0 +1,16 @@ +module ScrollAreas + +using Genie, Stipple, StippleUI, StippleUI.API +import Genie.Renderer.Html: HTMLString, normal_element, template, register_normal_element + +export scrollarea + +register_normal_element("q__scroll__area", context = @__MODULE__) + +function scrollarea(args...; wrap::Function = StippleUI.DEFAULT_WRAPPER, kwargs...) + wrap() do + q__scroll__area(args...; kwargs...) + end +end + +end diff --git a/src/Spinners.jl b/src/Spinners.jl index 3413613c..95192cb8 100644 --- a/src/Spinners.jl +++ b/src/Spinners.jl @@ -18,7 +18,7 @@ function spinner(spinner_type::Union{String,Symbol} = "", kwargs...) wrap() do - getfield(Genie.Renderer.Html, Symbol("q__spinner$(isempty(string(spinner_type)) ? "" : "__")$spinner_type"))(args...; kwargs...) + getfield(@__MODULE__, Symbol("q__spinner$(isempty(string(spinner_type)) ? "" : "__")$spinner_type"))(args...; kwargs...) end end diff --git a/src/StippleUI.jl b/src/StippleUI.jl index 3a9ae00f..5d14a118 100644 --- a/src/StippleUI.jl +++ b/src/StippleUI.jl @@ -70,6 +70,7 @@ include("Forms.jl") include("FormInputs.jl") include("Headings.jl") include("Icons.jl") +include("InnerLoaders.jl") include("Intersections.jl") include("Knobs.jl") include("Layouts.jl") @@ -77,6 +78,7 @@ include("Lists.jl") include("Menus.jl") include("Radios.jl") include("Ranges.jl") +include("ScrollAreas.jl") include("Selects.jl") include("Separators.jl") include("Spaces.jl") @@ -110,12 +112,14 @@ export quasar, quasar_pure, vue, vue_pure, xelem, xelem_pure, @click, csscolors @reexport using .FormInputs @reexport using .Headings @reexport using .Icons +@reexport using .InnerLoaders @reexport using .Intersections @reexport using .Knobs @reexport using .Lists @reexport using .Menus @reexport using .Radios @reexport using .Ranges +@reexport using .ScrollAreas @reexport using .Selects @reexport using .Separators @reexport using .Spaces