Skip to content

Commit 5f69f8d

Browse files
authored
Update to latest shiny/bslib assets (#1874)
1 parent c56a659 commit 5f69f8d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+7595
-24599
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3131

3232
* Added a new `.add_sass_layer_file()` method to `ui.Theme` that supports reading a Sass file with layer boundary comments, e.g. `/*-- scss:defaults --*/`. This format [is supported by Quarto](https://quarto.org/docs/output-formats/html-themes-more.html#bootstrap-bootswatch-layering) and makes it easier to store Sass rules and declarations that need to be woven into Shiny's Sass Bootstrap files. (#1790)
3333

34+
* `ui.input_text()`, `ui.input_text_area()`, `ui.input_numeric()` and `ui.input_password()` all gain an `update_on` option. `update_on="change"` is the default and previous behavior, where the input value updates immediately whenever the value changes. With `update_on="blur"`, the input value will update only when the text input loses focus or when the user presses Enter (or Cmd/Ctrl + Enter for `ui.input_text_area()`). (#1874)
35+
3436
### Bug fixes
3537

3638
* `ui.Chat()` now correctly handles new `ollama.chat()` return value introduced in `ollama` v0.4. (#1787)

scripts/_pkg-sources.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
list(
2-
bslib = "rstudio/bslib@b54bfb5de82f76bc044c4c661995af3a63e7ab29",
3-
shiny = "rstudio/shiny@c489fef4ff46fc37eb2a7c447a7108afde7ad124",
2+
bslib = "rstudio/bslib@main",
3+
shiny = "rstudio/shiny@main",
44
sass = "sass",
55
htmltools = "rstudio/htmltools@main"
66
)

shiny/_versions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
shiny_html_deps = "1.9.1.9000"
2-
bslib = "0.8.0.9000"
1+
shiny_html_deps = "1.10.0.9000"
2+
bslib = "0.9.0.9000"
33
htmltools = "0.5.8.9000"
44
bootstrap = "5.3.1"
55
requirejs = "2.3.6"

shiny/ui/_input_numeric.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
__all__ = ("input_numeric",)
22

3-
from typing import Optional
3+
from typing import Literal, Optional
44

55
from htmltools import Tag, TagChild, css, div, tags
66

@@ -19,6 +19,7 @@ def input_numeric(
1919
max: Optional[float] = None,
2020
step: Optional[float] = None,
2121
width: Optional[str] = None,
22+
update_on: Literal["change", "blur"] = "change",
2223
) -> Tag:
2324
"""
2425
Create an input control for entry of numeric values.
@@ -39,6 +40,11 @@ def input_numeric(
3940
Interval to use when stepping between min and max.
4041
width
4142
The CSS width, e.g. '400px', or '100%'
43+
update_on
44+
When should the input value be updated? Options are `"change"` (default) and
45+
`"blur"`. Use `"change"` to update the input immediately whenever the value
46+
changes. Use `"blur"`to delay the input update until the input loses focus (the
47+
user moves away from the input), or when Enter is pressed.
4248
4349
Returns
4450
-------
@@ -67,6 +73,7 @@ def input_numeric(
6773
min=min,
6874
max=max,
6975
step=step,
76+
data_update_on=update_on,
7077
),
7178
class_="form-group shiny-input-container",
7279
style=css(width=width),

shiny/ui/_input_password.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
__all__ = ("input_password",)
22

3-
from typing import Optional
3+
from typing import Literal, Optional
44

55
from htmltools import Tag, TagChild, css, div, tags
66

@@ -17,6 +17,7 @@ def input_password(
1717
*,
1818
width: Optional[str] = None,
1919
placeholder: Optional[str] = None,
20+
update_on: Literal["change", "blur"] = "change",
2021
) -> Tag:
2122
"""
2223
Create an password control for entry of passwords.
@@ -33,6 +34,11 @@ def input_password(
3334
The CSS width, e.g., '400px', or '100%'.
3435
placeholder
3536
The placeholder of the input.
37+
update_on
38+
When should the input value be updated? Options are `"change"` (default) and
39+
`"blur"`. Use `"change"` to update the input immediately whenever the value
40+
changes. Use `"blur"`to delay the input update until the input loses focus (the
41+
user moves away from the input), or when Enter is pressed.
3642
3743
Returns
3844
-------
@@ -58,6 +64,7 @@ def input_password(
5864
value=value,
5965
class_="shiny-input-password form-control",
6066
placeholder=placeholder,
67+
data_update_on=update_on,
6168
),
6269
class_="form-group shiny-input-container",
6370
style=css(width=width),

shiny/ui/_input_text.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ def input_text(
2020
placeholder: Optional[str] = None,
2121
autocomplete: Optional[str] = "off",
2222
spellcheck: Optional[Literal["true", "false"]] = None,
23+
update_on: Literal["change", "blur"] = "change",
2324
) -> Tag:
2425
"""
2526
Create an input control for entry of text values.
@@ -45,6 +46,11 @@ def input_text(
4546
spellcheck
4647
Whether to enable browser spell checking of the text input (default is ``None``). If
4748
None, then it will use the browser's default behavior.
49+
update_on
50+
When should the input value be updated? Options are `"change"` (default) and
51+
`"blur"`. Use `"change"` to update the input immediately whenever the value
52+
changes. Use `"blur"`to delay the input update until the input loses focus (the
53+
user moves away from the input), or when Enter is pressed.
4854
4955
Returns
5056
-------
@@ -74,6 +80,7 @@ def input_text(
7480
placeholder=placeholder,
7581
autocomplete=autocomplete,
7682
spellcheck=spellcheck,
83+
data_update_on=update_on,
7784
),
7885
class_="form-group shiny-input-container",
7986
style=css(width=width),
@@ -95,6 +102,7 @@ def input_text_area(
95102
autoresize: bool = False,
96103
autocomplete: Optional[str] = None,
97104
spellcheck: Optional[Literal["true", "false"]] = None,
105+
update_on: Literal["change", "blur"] = "change",
98106
) -> Tag:
99107
"""
100108
Create a textarea input control for entry of unstructured text values.
@@ -137,6 +145,11 @@ def input_text_area(
137145
spellcheck
138146
Whether to enable browser spell checking of the text input (default is ``None``). If
139147
None, then it will use the browser's default behavior.
148+
update_on
149+
When should the input value be updated? Options are `"change"` (default) and
150+
`"blur"`. Use `"change"` to update the input immediately whenever the value
151+
changes. Use `"blur"`to delay the input update until the input loses focus (the
152+
user moves away from the input), or when Ctrl/Cmd + Enter is pressed.
140153
141154
Returns
142155
-------
@@ -176,6 +189,7 @@ def input_text_area(
176189
cols=cols,
177190
autocomplete=autocomplete,
178191
spellcheck=spellcheck,
192+
data_update_on=update_on,
179193
)
180194

181195
return div(

shiny/www/shared/_version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"note!": "Generated by scripts/htmlDependencies.R: do not edit by hand",
33
"package": "shiny",
4-
"version": "1.9.1.9000 (rstudio/shiny@c489fef4ff46fc37eb2a7c447a7108afde7ad124)"
4+
"version": "1.10.0.9000 (rstudio/shiny@531f31b66f0d83d07341b5e88e33386e4dc10f3e)"
55
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"note!": "Generated by scripts/htmlDependencies.R: do not edit by hand",
3-
"shiny_version": "1.9.1.9000 (rstudio/shiny@c489fef4ff46fc37eb2a7c447a7108afde7ad124)",
4-
"bslib_version": "0.8.0.9000 (rstudio/bslib@b54bfb5de82f76bc044c4c661995af3a63e7ab29)",
3+
"shiny_version": "1.10.0.9000 (rstudio/shiny@531f31b66f0d83d07341b5e88e33386e4dc10f3e)",
4+
"bslib_version": "0.9.0.9000 (rstudio/bslib@ee34398b1d93056c302560512a090c1326aff7cf)",
55
"htmltools_version": "0.5.8.9000 (rstudio/htmltools@487aa0bed7313d7597b6edd5810e53cab0061198)",
66
"bootstrap_version": "5.3.1"
77
}

shiny/www/shared/bootstrap/bootstrap.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"note!": "Generated by scripts/htmlDependencies.R: do not edit by hand",
33
"package": "bslib",
4-
"version": "0.8.0.9000 (rstudio/bslib@b54bfb5de82f76bc044c4c661995af3a63e7ab29)"
4+
"version": "0.9.0.9000 (rstudio/bslib@ee34398b1d93056c302560512a090c1326aff7cf)"
55
}

0 commit comments

Comments
 (0)