diff --git a/src/Builtins.jl b/src/Builtins.jl index 3f63359a..a1ca73f4 100644 --- a/src/Builtins.jl +++ b/src/Builtins.jl @@ -394,10 +394,10 @@ begin """ struct Radio options::Vector{Pair{<:AbstractString,<:Any}} - default::Union{Missing, AbstractString} + default::Union{Nothing, AbstractString} end -Radio(options::AbstractVector{<:AbstractString}; default=missing) = Radio([o => o for o in options], default) -Radio(options::AbstractVector{<:Pair{<:AbstractString,<:Any}}; default=missing) = Radio(options, default) +Radio(options::AbstractVector{<:AbstractString}; default=nothing) = Radio([o => o for o in options], default) +Radio(options::AbstractVector{<:Pair{<:AbstractString,<:Any}}; default=nothing) = Radio(options, default) function Base.show(io::IO, m::MIME"text/html", radio::Radio) groupname = randstring('a':'z') @@ -543,9 +543,6 @@ end Base.get(colorStringPicker::ColorStringPicker) = colorStringPicker.default end -# ╔═╡ 98d251ff-67e7-4b16-b2e0-3e2102918ca2 -export Slider, NumberField, Button, CheckBox, TextField, PasswordField, Select, MultiSelect, Radio, FilePicker, DateField, TimeField, ColorStringPicker - # ╔═╡ ec870eea-36a4-48b6-95d7-f7c083e29856 bs = @bind s1 Slider(1:10) @@ -634,10 +631,10 @@ bf f1 # ╔═╡ a95684ea-4612-45d6-b63f-41c051b53ed8 -br = @bind r1 Radio(["a" => "default", teststr => teststr]) +br1 = @bind r1 Radio(["a" => "default", teststr => teststr]) # ╔═╡ a5612030-0781-4cf1-b8f0-409bd3886154 -br +br1 # ╔═╡ c2b3a7a4-8c9e-49cc-b5d0-85ad1c08fd72 r1 @@ -693,6 +690,22 @@ ColorStringPicker("#ffffff") # ╔═╡ 724125f3-7699-4103-a5d8-bc6a00fab0ff ColorStringPicker(default="#abbaff") +# ╔═╡ 9ade9240-1fea-4cb7-a571-a98b13cc29b2 +""" +Line break without creating a new paragraph. Useful inside the `md"` macro: + +# Example +```julia +md"\"" +Hello \$br world! +"\"" +``` +""" +const br = HTML("
") + +# ╔═╡ 98d251ff-67e7-4b16-b2e0-3e2102918ca2 +export Slider, NumberField, Button, CheckBox, TextField, PasswordField, Select, MultiSelect, Radio, FilePicker, DateField, TimeField, ColorStringPicker, br + # ╔═╡ Cell order: # ╟─e8c5ba24-10e9-49e8-8c11-0add092637f8 # ╟─e1bbe1d7-68ef-4ee1-8174-d1ae1f822acb @@ -775,3 +788,4 @@ ColorStringPicker(default="#abbaff") # ╠═78463563-4d1f-49f0-875f-8a30cf445a2d # ╠═1d95c38d-d336-436d-a62e-0a3786c321ca # ╠═724125f3-7699-4103-a5d8-bc6a00fab0ff +# ╠═9ade9240-1fea-4cb7-a571-a98b13cc29b2 diff --git a/src/PlutoUI.jl b/src/PlutoUI.jl index 4faf5598..be39f893 100644 --- a/src/PlutoUI.jl +++ b/src/PlutoUI.jl @@ -7,7 +7,9 @@ using Reexport const PKG_ROOT_DIR = normpath(joinpath(@__DIR__, "..")) -include("./Builtins.jl") +@reexport module BuiltinsNotebook + include("./Builtins.jl") +end include("./Resource.jl") include("./RangeSlider.jl") include("./DisplayTricks.jl") @@ -28,17 +30,4 @@ end include("./Scrubbable.jl") end -export br -""" -Line break without creating a new paragraph. Useful inside the `md"` macro: - -# Example -```julia -md"\"" -Hello \$br world! -"\"" -``` -""" -const br = HTML("
") - end