Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@
## Latest Changes


## Version 6.0.2

### Features

* Add `bool` type for `download` attribute in `HyperlinkAttrs`. Type is now `str | bool`
* Add `delete` and `| str` types for `hx_swap_oob` in `HtmxAttrs`. Type is now `Literal["true", "false", "delete"] | str`
* Add `str` type for `max` attribute in `InputAttrs`. Type is now `str | int`
* Add `str` type for `min` attribute in `InputAttrs`. Type is now `str | int`

## Version 6.0.1

### Fix
Expand Down
10 changes: 6 additions & 4 deletions hypermedia/types/attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ class HtmxAttrs(Attrs, total=False):
| str,
Alias("hx-swap"),
]
hx_swap_oob: Annotated[Literal["true", "false"], Alias("hx-swap-oob")]
hx_swap_oob: Annotated[
Literal["true", "false", "delete"] | str, Alias("hx-swap-oob")
]
hx_vals: Annotated[str, Alias("hx-vals")] # TODO: dict
hx_sync: Annotated[str, Alias("hx-sync")]
hx_boost: Annotated[Literal["true", "false"], Alias("hx-boost")]
Expand Down Expand Up @@ -315,9 +317,9 @@ class InputAttrs(GlobalAttrs, total=False):
formtarget: str
height: int
list: str
max: int
max: str | int
maxlength: int
min: int
min: str | int
minlength: int
multiple: bool
name: str
Expand Down Expand Up @@ -457,7 +459,7 @@ class FormAttrs(GlobalAttrs, total=False):
class HyperlinkAttrs(GlobalAttrs, total=False):
"""Attributes for `<a>` elements."""

download: str
download: str | bool
href: str
hreflang: str
media: str
Expand Down
Loading