You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Input validation for floats and integers accept embedded underscores, e.g., "1_234_567" is valid. https://github.com/Textualize/textual/pull/4784
14
+
- Support for `"none"` value added to `dock`, `hatch` and `split` styles https://github.com/Textualize/textual/pull/4982
15
+
- Support for `"none"` added to box and border style properties (e.g `widget.style.border = "none"`) https://github.com/Textualize/textual/pull/4982
16
+
- Docstrings added to most style properties https://github.com/Textualize/textual/pull/4982
13
17
14
18
### Changed
15
19
16
20
- Input validation for integers no longer accepts scientific notation like '1.5e2'; must be castable to int. https://github.com/Textualize/textual/pull/4784
21
+
- Default `scrollbar-size-vertical` changed to `2` in inline styles to match Widget default CSS (unlikely to affect users) https://github.com/Textualize/textual/pull/4982
22
+
- Removed border-right from `Toast`https://github.com/Textualize/textual/pull/4984
23
+
- Some fixes in `RichLog` result in slightly different semantics, see docstrings for details https://github.com/Textualize/textual/pull/4978
17
24
18
25
### Fixed
19
26
20
27
- Input validation of floats no longer accepts NaN (not a number). https://github.com/Textualize/textual/pull/4784
21
28
- Fixed issues with screenshots by simplifying segments only for snapshot tests https://github.com/Textualize/textual/issues/4929
29
+
- Fixed `RichLog.write` not respecting `width` parameter https://github.com/Textualize/textual/pull/4978
30
+
- Fixed `RichLog` writing at wrong width when `write` occurs before width is known (e.g. in `compose` or `on_mount`) https://github.com/Textualize/textual/pull/4978
31
+
- Fixed `RichLog.write` incorrectly shrinking width to `RichLog.min_width` when `shrink=True` (now shrinks to fit content area instead) https://github.com/Textualize/textual/pull/4978
32
+
- Fixed flicker when setting `dark` reactive on startup https://github.com/Textualize/textual/pull/4989
22
33
23
34
## [0.79.1] - 2024-08-31
24
35
@@ -107,6 +118,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
107
118
108
119
- Fixed issue with Enter events causing unresponsive UI https://github.com/Textualize/textual/pull/4833
A masked input derived from `Input`, allowing to restrict user input and give visual aid via a simple template mask, which also acts as an implicit *[validator][textual.validation.Validator]*.
6
+
7
+
-[x] Focusable
8
+
-[ ] Container
9
+
10
+
## Example
11
+
12
+
The example below shows a masked input to ease entering a credit card number.
|`template`|`str`|`""`| The template mask string. |
30
+
31
+
### The template string format
32
+
33
+
A `MaskedInput` template length defines the maximum length of the input value. Each character of the mask defines a regular expression used to restrict what the user can insert in the corresponding position, and whether the presence of the character in the user input is required for the `MaskedInput` value to be considered valid, according to the following table:
34
+
35
+
| Mask character | Regular expression | Required? |
There are some special characters that can be used to control automatic case conversion during user input: `>` converts all subsequent user input to uppercase; `<` to lowercase; `!` disables automatic case conversion. Any other character that appears in the template mask is assumed to be a separator, which is a character that is automatically inserted when user reaches its position. All mask characters can be escaped by placing `\` in front of them, allowing any character to be used as separator.
54
+
The mask can be terminated by `;c`, where `c` is any character you want to be used as placeholder character. The `placeholder` parameter inherited by `Input` can be used to override this allowing finer grain tuning of the placeholder string.
0 commit comments