From c1269c50ee5dc183aa4bc69c5e0f1020a8b767c6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 17 Jun 2024 13:07:06 +0100 Subject: [PATCH] Release 0.9.1 for GOV.UK Frontend v5.4.0 and GOV.UK Frontend Jinja 3.1.0 (#57) * Updates * Bump version to 0.9.1 * Update example project --------- Co-authored-by: github-actions[bot] Co-authored-by: Cameron Lamb --- README.md | 2 +- docs/index.md | 2 +- example_project/poetry.lock | 10 ++-- .../components/password_input.py | 48 +++++++++++++++++++ poetry.lock | 8 ++-- pyproject.toml | 4 +- 6 files changed, 61 insertions(+), 13 deletions(-) create mode 100644 govuk_frontend_django/components/password_input.py diff --git a/README.md b/README.md index 79f8818..43a70e7 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ Below is a list of the versions of this package and the versions of the GOV.UK F | Package Version | GOV.UK Frontend Version | | --------------- | ----------------------- | -| [0.9.0](https://github.com/uktrade/govuk-frontend-django/releases/tag/0.9.0) - [0.9.0](https://github.com/uktrade/govuk-frontend-django/releases/tag/0.9.0) | [v5.4.0](https://github.com/alphagov/govuk-frontend/releases/tag/v5.4.0) | +| [0.9.0](https://github.com/uktrade/govuk-frontend-django/releases/tag/0.9.0) - [0.9.1](https://github.com/uktrade/govuk-frontend-django/releases/tag/0.9.1) | [v5.4.0](https://github.com/alphagov/govuk-frontend/releases/tag/v5.4.0) | | [0.8.0](https://github.com/uktrade/govuk-frontend-django/releases/tag/0.8.0) - [0.8.0](https://github.com/uktrade/govuk-frontend-django/releases/tag/0.8.0) | [v5.3.1](https://github.com/alphagov/govuk-frontend/releases/tag/v5.3.1) | | [0.7.0](https://github.com/uktrade/govuk-frontend-django/releases/tag/0.7.0) - [0.7.0](https://github.com/uktrade/govuk-frontend-django/releases/tag/0.7.0) | [v5.3.0](https://github.com/alphagov/govuk-frontend/releases/tag/v5.3.0) | | [0.6.0](https://github.com/uktrade/govuk-frontend-django/releases/tag/0.6.0) - [0.6.0](https://github.com/uktrade/govuk-frontend-django/releases/tag/0.6.0) | [v5.2.0](https://github.com/alphagov/govuk-frontend/releases/tag/v5.2.0) | diff --git a/docs/index.md b/docs/index.md index 956f39a..c853b8b 100644 --- a/docs/index.md +++ b/docs/index.md @@ -44,7 +44,7 @@ Below is a list of the versions of this package and the versions of the GOV.UK F | Package Version | GOV.UK Frontend Version | | --------------- | ----------------------- | -| [0.9.0](https://github.com/uktrade/govuk-frontend-django/releases/tag/0.9.0) - [0.9.0](https://github.com/uktrade/govuk-frontend-django/releases/tag/0.9.0) | [v5.4.0](https://github.com/alphagov/govuk-frontend/releases/tag/v5.4.0) | +| [0.9.0](https://github.com/uktrade/govuk-frontend-django/releases/tag/0.9.0) - [0.9.1](https://github.com/uktrade/govuk-frontend-django/releases/tag/0.9.1) | [v5.4.0](https://github.com/alphagov/govuk-frontend/releases/tag/v5.4.0) | | [0.8.0](https://github.com/uktrade/govuk-frontend-django/releases/tag/0.8.0) - [0.8.0](https://github.com/uktrade/govuk-frontend-django/releases/tag/0.8.0) | [v5.3.1](https://github.com/alphagov/govuk-frontend/releases/tag/v5.3.1) | | [0.7.0](https://github.com/uktrade/govuk-frontend-django/releases/tag/0.7.0) - [0.7.0](https://github.com/uktrade/govuk-frontend-django/releases/tag/0.7.0) | [v5.3.0](https://github.com/alphagov/govuk-frontend/releases/tag/v5.3.0) | | [0.6.0](https://github.com/uktrade/govuk-frontend-django/releases/tag/0.6.0) - [0.6.0](https://github.com/uktrade/govuk-frontend-django/releases/tag/0.6.0) | [v5.2.0](https://github.com/alphagov/govuk-frontend/releases/tag/v5.2.0) | diff --git a/example_project/poetry.lock b/example_project/poetry.lock index 116e410..094e792 100644 --- a/example_project/poetry.lock +++ b/example_project/poetry.lock @@ -39,7 +39,7 @@ bcrypt = ["bcrypt"] [[package]] name = "govuk-frontend-django" -version = "0.9.0" +version = "0.9.1" description = "Django functionality to help when building a GOV.UK website." optional = false python-versions = "^3.8" @@ -48,7 +48,7 @@ develop = true [package.dependencies] Django = "^4.1.9" -govuk-frontend-jinja = "3.0.0" +govuk-frontend-jinja = "3.1.0" jinja2 = "^3.1.2" [package.source] @@ -57,13 +57,13 @@ url = ".." [[package]] name = "govuk-frontend-jinja" -version = "3.0.0" +version = "3.1.0" description = "GOV.UK Frontend Jinja Macros" optional = false python-versions = ">=3.8" files = [ - {file = "govuk-frontend-jinja-3.0.0.tar.gz", hash = "sha256:0675860c60158f57f24406a22fbea43ddcfce7b93346af098868b4999f8918ed"}, - {file = "govuk_frontend_jinja-3.0.0-py3-none-any.whl", hash = "sha256:fd8cb0b08be013b1bef893da46a364367b6bacc1c1e535083f5693c7bf6f698f"}, + {file = "govuk_frontend_jinja-3.1.0-py3-none-any.whl", hash = "sha256:e7402c4cb3e658933da049b0b37060ff3fc20356df7268fdd8aa7ffcff35cce7"}, + {file = "govuk_frontend_jinja-3.1.0.tar.gz", hash = "sha256:6853b9697154452eabc3c6b876d3aa6cc454bb874444904cb14dac757eedf4a5"}, ] [package.dependencies] diff --git a/govuk_frontend_django/components/password_input.py b/govuk_frontend_django/components/password_input.py new file mode 100644 index 0000000..4628668 --- /dev/null +++ b/govuk_frontend_django/components/password_input.py @@ -0,0 +1,48 @@ +from dataclasses import dataclass +from typing import Optional + +from govuk_frontend_django.components import base as govuk_frontend_base +from govuk_frontend_django.components import ( + error_message as govuk_frontend_error_message, +) +from govuk_frontend_django.components import fieldset as govuk_frontend_fieldset +from govuk_frontend_django.components import hint as govuk_frontend_hint +from govuk_frontend_django.components import label as govuk_frontend_label +from govuk_frontend_django.components import tag as govuk_frontend_tag + + +@dataclass(kw_only=True) +class PasswordInputButton: + classes: Optional[str] = None + + +@dataclass(kw_only=True) +class GovUKPasswordInput(govuk_frontend_base.GovUKComponent): + """GOV.UK Password Input + + See: https://design-system.service.gov.uk/components/password-input/ + """ + + id: str + name: str + value: Optional[str] = None + disabled: Optional[bool] = None + describedBy: Optional[str] = None + label: govuk_frontend_label.GovUKLabel + hint: Optional[govuk_frontend_hint.GovUKHint] = None + errorMessage: Optional[govuk_frontend_error_message.GovUKErrorMessage] = None + formGroup: Optional[govuk_frontend_base.FormGroup] = None + autocomplete: Optional[str] = None + showPasswordText: Optional[str] = None + hidePasswordText: Optional[str] = None + showPasswordAriaLabelText: Optional[str] = None + hidePasswordAriaLabelText: Optional[str] = None + passwordShownAnnouncementText: Optional[str] = None + passwordHiddenAnnouncementText: Optional[str] = None + button: Optional[PasswordInputButton] = None + + _jinja2_template = "govuk_frontend_jinja/components/password-input/macro.html" + _macro_name = "govukPasswordInput" + + +COMPONENT = GovUKPasswordInput diff --git a/poetry.lock b/poetry.lock index ceba617..429b776 100644 --- a/poetry.lock +++ b/poetry.lock @@ -603,13 +603,13 @@ dev = ["flake8", "markdown", "twine", "wheel"] [[package]] name = "govuk-frontend-jinja" -version = "3.0.0" +version = "3.1.0" description = "GOV.UK Frontend Jinja Macros" optional = false python-versions = ">=3.8" files = [ - {file = "govuk-frontend-jinja-3.0.0.tar.gz", hash = "sha256:0675860c60158f57f24406a22fbea43ddcfce7b93346af098868b4999f8918ed"}, - {file = "govuk_frontend_jinja-3.0.0-py3-none-any.whl", hash = "sha256:fd8cb0b08be013b1bef893da46a364367b6bacc1c1e535083f5693c7bf6f698f"}, + {file = "govuk_frontend_jinja-3.1.0-py3-none-any.whl", hash = "sha256:e7402c4cb3e658933da049b0b37060ff3fc20356df7268fdd8aa7ffcff35cce7"}, + {file = "govuk_frontend_jinja-3.1.0.tar.gz", hash = "sha256:6853b9697154452eabc3c6b876d3aa6cc454bb874444904cb14dac757eedf4a5"}, ] [package.dependencies] @@ -1866,4 +1866,4 @@ test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", [metadata] lock-version = "2.0" python-versions = "^3.8" -content-hash = "a91d48a439685b4c686d3cbb432451e59c93d70ebb40cfe85fd5eeacf5f4cdc8" +content-hash = "d9c1869208c43af22453818da08948b4eabe20b2381f0888141a28fa176f052a" diff --git a/pyproject.toml b/pyproject.toml index 3e8b4bd..5c56497 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "govuk-frontend-django" -version = "0.9.0" +version = "0.9.1" description = "Django functionality to help when building a GOV.UK website." authors = [ "DBT Live Service Team ", @@ -25,7 +25,7 @@ packages = [ python = "^3.8" Django = "^4.1.9" jinja2 = "^3.1.2" -govuk-frontend-jinja = "3.0.0" +govuk-frontend-jinja = "3.1.0" [tool.poetry.group.testing] optional = true