mirror of
https://github.com/rio-labs/rio.git
synced 2026-01-06 05:09:43 -06:00
renamed v0.9.3 to v0.10 & initial pill shape for text inputs
This commit is contained in:
@@ -95,12 +95,12 @@ You'll have your first app up and running in seconds!
|
||||
|
||||
## Status: Beta 🚧
|
||||
|
||||
Rio is rapidly approaching its first stable release. Version 0.9.3 incoroparates
|
||||
Rio is rapidly approaching its first stable release. Version 0.10 incoroparates
|
||||
all _planned_ breaking changes. Minor changes may still occur, but we are
|
||||
actively trying to avoid them.
|
||||
|
||||
If you encounter any issues or would like to provide feedback, please let us
|
||||
know on [our Discord server](https://discord.gg/7ejXaPwhyH). -->
|
||||
know on [our Discord server](https://discord.gg/7ejXaPwhyH).
|
||||
|
||||
1.0 is expected later this year.
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Changelog
|
||||
|
||||
- `rio.Dropdown` will now open a fullscreen popup on mobile devices
|
||||
- `riol.MediaPlayer` now also triggers the `on_playback_end` event when the
|
||||
- `rio.MediaPlayer` now also triggers the `on_playback_end` event when the
|
||||
video loops
|
||||
- experimental support for base-URL
|
||||
- dialogs!
|
||||
|
||||
@@ -8,6 +8,7 @@ export type TextInputState = ComponentState & {
|
||||
text?: string;
|
||||
label?: string;
|
||||
accessibility_label?: string;
|
||||
style?: 'rectangular' | 'pill';
|
||||
prefix_text?: string;
|
||||
suffix_text?: string;
|
||||
is_secret?: boolean;
|
||||
@@ -152,6 +153,21 @@ export class TextInputComponent extends ComponentBase {
|
||||
if (deltaState.is_valid !== undefined) {
|
||||
this.inputBox.isValid = deltaState.is_valid;
|
||||
}
|
||||
|
||||
// TODO: This isn't exposed to Python yet, so pretend the attribute
|
||||
// exists by setting it here.
|
||||
deltaState.style = 'rectangular';
|
||||
|
||||
if (deltaState.style !== undefined) {
|
||||
this.element.classList.remove(
|
||||
'rio-input-box-style-rectangle',
|
||||
'rio-input-box-style-pill'
|
||||
);
|
||||
|
||||
this.element.classList.add(
|
||||
`rio-input-box-style-${this.state.style}`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
grabKeyboardFocus(): void {
|
||||
|
||||
@@ -556,12 +556,24 @@ $rio-input-box-small-label-spacing-top: 0.5rem;
|
||||
align-items: stretch;
|
||||
|
||||
background-color: var(--rio-local-bg-variant);
|
||||
border-radius: var(--rio-global-corner-radius-small)
|
||||
var(--rio-global-corner-radius-small) 0 0;
|
||||
|
||||
transition: background-color 0.1s linear;
|
||||
}
|
||||
|
||||
.rio-input-box-style-rectangular {
|
||||
border-radius: var(--rio-global-corner-radius-small)
|
||||
var(--rio-global-corner-radius-small) 0 0;
|
||||
}
|
||||
|
||||
.rio-input-box-style-pill {
|
||||
border-radius: $infinite-corner-radius;
|
||||
|
||||
& > .rio-input-box-plain-bar,
|
||||
& > .rio-input-box-color-bar {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.rio-input-box:hover:not(.rio-insensitive) {
|
||||
background-color: var(--rio-local-bg-active);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
__version__ = "0.9.3rc3"
|
||||
__version__ = "0.10"
|
||||
|
||||
|
||||
# There is an issue with `rye test`. rye passes a `--rootdir` argument to
|
||||
|
||||
@@ -218,7 +218,7 @@ class _ButtonInternal(FundamentalComponent):
|
||||
def _custom_serialize_(self) -> JsonDoc:
|
||||
if self.style == "plain":
|
||||
deprecations.warn(
|
||||
since="0.9.3",
|
||||
since="0.10",
|
||||
message=(
|
||||
"The `plain` button style has been renamed to `plain-text`. Please use the new name instead."
|
||||
),
|
||||
|
||||
@@ -340,7 +340,7 @@ class Component(abc.ABC, metaclass=ComponentMeta):
|
||||
pass
|
||||
else:
|
||||
deprecations.warn(
|
||||
since="0.9.3",
|
||||
since="0.10",
|
||||
message="The `width` attribute of `rio.Component` has been removed. Please use `min_width` and `grow_x` instead.",
|
||||
)
|
||||
|
||||
@@ -359,7 +359,7 @@ class Component(abc.ABC, metaclass=ComponentMeta):
|
||||
pass
|
||||
else:
|
||||
deprecations.warn(
|
||||
since="0.9.3",
|
||||
since="0.10",
|
||||
message="The `height` attribute of `rio.Component` has been removed. Please use `min_height` and `grow_y` instead.",
|
||||
)
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ __all__ = ["IconButton"]
|
||||
|
||||
@final
|
||||
@deprecations.component_kwarg_renamed(
|
||||
since="0.9.3",
|
||||
since="0.10",
|
||||
old_name="size",
|
||||
new_name="min_size",
|
||||
)
|
||||
@@ -197,7 +197,7 @@ class _IconButtonInternal(FundamentalComponent):
|
||||
def _custom_serialize_(self) -> JsonDoc:
|
||||
if self.style == "plain":
|
||||
deprecations.warn(
|
||||
since="0.9.3",
|
||||
since="0.10",
|
||||
message=(
|
||||
"The `plain` button style has been renamed to `plain-text`. Please use the new name instead."
|
||||
),
|
||||
|
||||
@@ -76,7 +76,7 @@ class Markdown(FundamentalComponent):
|
||||
# value.
|
||||
if self.wrap is not True:
|
||||
deprecations.warn_parameter_renamed(
|
||||
since="0.9.3",
|
||||
since="0.10",
|
||||
old_name="wrap",
|
||||
new_name="overflow",
|
||||
owner="rio.Markdown",
|
||||
|
||||
@@ -14,7 +14,7 @@ __all__ = [
|
||||
|
||||
@final
|
||||
@deprecations.component_kwarg_renamed(
|
||||
since="0.9.3",
|
||||
since="0.10",
|
||||
old_name="size",
|
||||
new_name="min_size",
|
||||
)
|
||||
|
||||
@@ -94,7 +94,7 @@ class Text(FundamentalComponent):
|
||||
# value.
|
||||
if self.wrap is not False:
|
||||
deprecations.warn_parameter_renamed(
|
||||
since="0.9.3",
|
||||
since="0.10",
|
||||
old_name="wrap",
|
||||
new_name="overflow",
|
||||
owner="rio.Markdown",
|
||||
|
||||
@@ -272,9 +272,7 @@ def register_icon_set(
|
||||
See the docs of `Icon.register_icon_set`.
|
||||
"""
|
||||
if set_name in icon_set_archives:
|
||||
raise ValueError(
|
||||
f"There is already an icon set named `{set_name}`"
|
||||
)
|
||||
raise ValueError(f"There is already an icon set named `{set_name}`")
|
||||
|
||||
icon_set_archives[set_name] = set_archive_path
|
||||
|
||||
|
||||
@@ -197,7 +197,7 @@ def _new_component_page_init(self, *args, **kwargs) -> None:
|
||||
# Rename the parameter
|
||||
if "page_url" in kwargs:
|
||||
deprecations.warn_parameter_renamed(
|
||||
since="0.9.3",
|
||||
since="0.10",
|
||||
old_name="page_url",
|
||||
new_name="url_segment",
|
||||
owner="rio.ComponentPage",
|
||||
@@ -214,7 +214,7 @@ ComponentPage.__init__ = _new_component_page_init
|
||||
@introspection.set_signature(ComponentPage)
|
||||
def Page(*args, **kwargs):
|
||||
deprecations.warn(
|
||||
since="0.9.3",
|
||||
since="0.10",
|
||||
message="`rio.Page` has been renamed to `rio.ComponentPage`",
|
||||
)
|
||||
return ComponentPage(*args, **kwargs)
|
||||
|
||||
@@ -2042,7 +2042,7 @@ window.history.{method}(null, "", {json.dumps(active_page_url.path)})
|
||||
) -> list[utils.FileInfo]: ...
|
||||
|
||||
@deprecations.function_kwarg_renamed(
|
||||
since="0.9.3",
|
||||
since="0.10",
|
||||
old_name="file_extension",
|
||||
new_name="file_types",
|
||||
)
|
||||
@@ -2113,7 +2113,7 @@ window.history.{method}(null, "", {json.dumps(active_page_url.path)})
|
||||
) -> list[utils.FileInfo]: ...
|
||||
|
||||
@deprecations.function_kwarg_renamed(
|
||||
since="0.9.3",
|
||||
since="0.10",
|
||||
old_name="file_extension",
|
||||
new_name="file_types",
|
||||
)
|
||||
@@ -2127,7 +2127,7 @@ window.history.{method}(null, "", {json.dumps(active_page_url.path)})
|
||||
"""
|
||||
# Warn
|
||||
deprecations.warn(
|
||||
since="0.9.3",
|
||||
since="0.10",
|
||||
message="`file_chooser` has been renamed to `pick_file`. Please use the new name instead.",
|
||||
)
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ class TicTacToePage(rio.Component):
|
||||
for index, field in enumerate(self.fields):
|
||||
field_components.append(
|
||||
comps.Field(
|
||||
value=field,
|
||||
value=field,
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user