Skip to content

Commit a428087

Browse files
authored
prepare release (#169)
1 parent 387597f commit a428087

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ jobs:
3636
- run: julia --project=@. -e '
3737
ENV["JULIA_PKG_SERVER"] = "";
3838
using Pkg;
39-
Pkg.add(PackageSpec(url="https://github.com/piever/Widgets.jl", rev="master"));
4039
Pkg.build();
4140
Pkg.test(coverage=true)'
4241
- uses: julia-actions/julia-processcoverage@v1

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "InteractBase"
22
uuid = "d3863d7c-f0c8-5437-a7b4-3ae773c01009"
3-
version = "0.10.7"
3+
version = "0.10.8"
44

55
[deps]
66
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
@@ -25,7 +25,7 @@ Knockout = "0.2.1"
2525
Observables = "0.4"
2626
OrderedCollections = "1"
2727
WebIO = "0.3,0.4,0.5,0.6,0.7,0.8"
28-
Widgets = "0.6.4"
28+
Widgets = "0.6.5"
2929
julia = "1"
3030

3131
[extras]

src/input.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -179,12 +179,12 @@ end
179179
180180
Create a widget to select colors.
181181
"""
182-
function colorpicker(::WidgetTheme, val=colorant"#000000"; value=val, kwargs...)
182+
function colorpicker(theme::WidgetTheme, val=colorant"#000000"; value=val, kwargs...)
183183
(value isa AbstractObservable) || (value = Observable{Color}(value))
184184
f = t -> "#"*hex(t)
185185
g = t -> parse(Colorant,t)
186186
pair = ObservablePair(value, f=f, g=g)
187-
ui = input(pair.second; typ="color", kwargs...)
187+
ui = input(theme, pair.second; typ="color", kwargs...)
188188
Widget{:colorpicker}(ui, output = value)
189189
end
190190

@@ -262,15 +262,15 @@ as initial value.
262262
Widget{:input}(data, scope = ui, output = ui[bindto], layout = node(:div, className = "field interact-widget")Widgets.scope)
263263
end
264264

265-
@noinline function input(::WidgetTheme; typ="text", kwargs...)
265+
@noinline function input(theme::WidgetTheme; typ="text", kwargs...)
266266
if typ in ["checkbox", "radio"]
267267
o = false
268268
elseif typ in ["number", "range"]
269269
o = 0.0
270270
else
271271
o = ""
272272
end
273-
input(o; typ=typ, kwargs...)
273+
input(theme, o; typ=typ, kwargs...)
274274
end
275275

276276
"""
@@ -318,7 +318,7 @@ for wdg in [:toggle, :checkbox]
318318
widgettype = $(Expr(:quote, wdg))
319319
wdgtyp = string(widgettype)
320320
labelclass = mergeclasses(getclass(theme, :input, wdgtyp, "label"), labelclass)
321-
ui = input(value; bind=bind, typ="checkbox", valueUpdate="change", wdgtyp=wdgtyp, id=s, kwargs...)
321+
ui = input(theme, value; bind=bind, typ="checkbox", valueUpdate="change", wdgtyp=wdgtyp, id=s, kwargs...)
322322
Widgets.scope(ui).dom = node(:div, className = "field interact-widget")(Widgets.scope(ui).dom, dom"label[className=$labelclass, for=$s]"(label...))
323323
Widget{widgettype}(ui)
324324
end
@@ -351,7 +351,7 @@ several lines.
351351
"""
352352
function textbox(theme::WidgetTheme, hint=""; multiline=false, placeholder=hint, value="", typ="text", kwargs...)
353353
multiline && return textarea(theme; placeholder=placeholder, value=value, kwargs...)
354-
Widget{:textbox}(input(value; typ=typ, placeholder=placeholder, kwargs...))
354+
Widget{:textbox}(input(theme, value; typ=typ, placeholder=placeholder, kwargs...))
355355
end
356356

357357
"""

0 commit comments

Comments
 (0)