From 2c812798dd759176d04697cbc33478429458698a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 26 Apr 2023 13:03:11 +0100 Subject: [PATCH] Updates to support GOV.UK Frontend v4.6.0 Co-authored-by: github-actions[bot] --- govuk_frontend_django/components/accordion.py | 1 + govuk_frontend_django/components/button.py | 1 + .../components/character_count.py | 2 ++ .../components/file_upload.py | 1 + govuk_frontend_django/components/input.py | 1 + govuk_frontend_django/components/select.py | 1 + govuk_frontend_django/components/textarea.py | 1 + .../components/warning_text.py | 2 +- poetry.lock | 30 +++++++++---------- pyproject.toml | 2 +- 10 files changed, 25 insertions(+), 17 deletions(-) diff --git a/govuk_frontend_django/components/accordion.py b/govuk_frontend_django/components/accordion.py index f68a549..77fdce1 100644 --- a/govuk_frontend_django/components/accordion.py +++ b/govuk_frontend_django/components/accordion.py @@ -20,6 +20,7 @@ class GovUKAccordion(govuk_frontend_base.GovUKComponent): id: str headingLevel: Optional[int] = None + rememberExpanded: Optional[bool] = None hideAllSectionsText: Optional[str] = None hideSectionText: Optional[str] = None hideSectionAriaLabelText: Optional[str] = None diff --git a/govuk_frontend_django/components/button.py b/govuk_frontend_django/components/button.py index 305ce19..8266879 100644 --- a/govuk_frontend_django/components/button.py +++ b/govuk_frontend_django/components/button.py @@ -28,6 +28,7 @@ class GovUKButton(govuk_frontend_base.GovUKComponent): href: Optional[str] = None preventDoubleClick: Optional[bool] = None isStartButton: Optional[bool] = None + id: Optional[str] = None _jinja2_template = "govuk_frontend_jinja/components/button/macro.html" _macro_name = "govukButton" diff --git a/govuk_frontend_django/components/character_count.py b/govuk_frontend_django/components/character_count.py index 4e96890..5260ad9 100644 --- a/govuk_frontend_django/components/character_count.py +++ b/govuk_frontend_django/components/character_count.py @@ -39,8 +39,10 @@ class GovUKCharacterCount(govuk_frontend_base.GovUKComponent): textareaDescriptionText: Optional[str] = None charactersUnderLimitText: Optional[Any] = None charactersAtLimitText: Optional[str] = None + charactersOverLimitText: Optional[Any] = None wordsUnderLimitText: Optional[Any] = None wordsAtLimitText: Optional[str] = None + wordsOverLimitText: Optional[Any] = None _jinja2_template = "govuk_frontend_jinja/components/character-count/macro.html" _macro_name = "govukCharacterCount" diff --git a/govuk_frontend_django/components/file_upload.py b/govuk_frontend_django/components/file_upload.py index d52872e..5965bcd 100644 --- a/govuk_frontend_django/components/file_upload.py +++ b/govuk_frontend_django/components/file_upload.py @@ -21,6 +21,7 @@ class GovUKFileUpload(govuk_frontend_base.GovUKComponent): name: str id: 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 diff --git a/govuk_frontend_django/components/input.py b/govuk_frontend_django/components/input.py index 14c223d..64e10b4 100644 --- a/govuk_frontend_django/components/input.py +++ b/govuk_frontend_django/components/input.py @@ -39,6 +39,7 @@ class GovUKInput(govuk_frontend_base.GovUKComponent): type: Optional[str] = None inputmode: Optional[str] = None value: Optional[str] = None + disabled: Optional[bool] = None describedBy: Optional[str] = None label: govuk_frontend_label.GovUKLabel hint: Optional[govuk_frontend_hint.GovUKHint] = None diff --git a/govuk_frontend_django/components/select.py b/govuk_frontend_django/components/select.py index 1112ed8..b136c51 100644 --- a/govuk_frontend_django/components/select.py +++ b/govuk_frontend_django/components/select.py @@ -31,6 +31,7 @@ class GovUKSelect(govuk_frontend_base.GovUKComponent): name: str items: List[SelectItems] value: Optional[str] = None + disabled: Optional[bool] = None describedBy: Optional[str] = None label: Optional[govuk_frontend_label.GovUKLabel] = None hint: Optional[govuk_frontend_hint.GovUKHint] = None diff --git a/govuk_frontend_django/components/textarea.py b/govuk_frontend_django/components/textarea.py index b8d5c26..f6b6f36 100644 --- a/govuk_frontend_django/components/textarea.py +++ b/govuk_frontend_django/components/textarea.py @@ -23,6 +23,7 @@ class GovUKTextarea(govuk_frontend_base.GovUKComponent): spellcheck: Optional[bool] = None rows: Optional[str] = None value: Optional[str] = None + disabled: Optional[bool] = None describedBy: Optional[str] = None label: govuk_frontend_label.GovUKLabel hint: Optional[govuk_frontend_hint.GovUKHint] = None diff --git a/govuk_frontend_django/components/warning_text.py b/govuk_frontend_django/components/warning_text.py index e3d34fe..9a4601a 100644 --- a/govuk_frontend_django/components/warning_text.py +++ b/govuk_frontend_django/components/warning_text.py @@ -20,7 +20,7 @@ class GovUKWarningText(govuk_frontend_base.GovUKComponent): text: Optional[str] = None html: Optional[str] = None - iconFallbackText: str + iconFallbackText: Optional[str] = None _jinja2_template = "govuk_frontend_jinja/components/warning-text/macro.html" _macro_name = "govukWarningText" diff --git a/poetry.lock b/poetry.lock index 4fa3453..8b3177b 100644 --- a/poetry.lock +++ b/poetry.lock @@ -490,14 +490,14 @@ dev = ["flake8", "markdown", "twine", "wheel"] [[package]] name = "govuk-frontend-jinja" -version = "2.5.0" +version = "2.6.0" description = "GOV.UK Frontend Jinja Macros" category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "govuk-frontend-jinja-2.5.0.tar.gz", hash = "sha256:c74eb3638f7fbdffb87ec71f501ba4deba0066ed1778c88d8171ac21a909e4b9"}, - {file = "govuk_frontend_jinja-2.5.0-py3-none-any.whl", hash = "sha256:49a390b8445b4744be40e6b556a9b93626bdf7bb546171c6b90c2b414bb08e8a"}, + {file = "govuk-frontend-jinja-2.6.0.tar.gz", hash = "sha256:f8a4ae52897352b12c047acccbd9d5830123175f71edb22c93b70893803243c2"}, + {file = "govuk_frontend_jinja-2.6.0-py3-none-any.whl", hash = "sha256:68d7bc33188e7b62548feb8ff4c0def377eb2bfd698a7dfd90fcc4846e0119eb"}, ] [package.dependencies] @@ -546,14 +546,14 @@ files = [ [[package]] name = "importlib-metadata" -version = "6.5.0" +version = "6.6.0" description = "Read metadata from Python packages" category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "importlib_metadata-6.5.0-py3-none-any.whl", hash = "sha256:03ba783c3a2c69d751b109fc0c94a62c51f581b3d6acf8ed1331b6d5729321ff"}, - {file = "importlib_metadata-6.5.0.tar.gz", hash = "sha256:7a8bdf1bc3a726297f5cfbc999e6e7ff6b4fa41b26bba4afc580448624460045"}, + {file = "importlib_metadata-6.6.0-py3-none-any.whl", hash = "sha256:43dd286a2cd8995d5eaef7fee2066340423b818ed3fd70adf0bad5f1fac53fed"}, + {file = "importlib_metadata-6.6.0.tar.gz", hash = "sha256:92501cdf9cc66ebd3e612f1b4f0c0765dfa42f0fa38ffb319b6bd84dd675d705"}, ] [package.dependencies] @@ -765,14 +765,14 @@ wcmatch = ">=7" [[package]] name = "mkdocs-material" -version = "9.1.6" +version = "9.1.8" description = "Documentation that simply works" category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "mkdocs_material-9.1.6-py3-none-any.whl", hash = "sha256:f2eb1d40db89da9922944833c1387207408f8937e1c2b46ab86e0c8f170b71e0"}, - {file = "mkdocs_material-9.1.6.tar.gz", hash = "sha256:2e555152f9771646bfa62dc78a86052876183eff69ce30db03a33e85702b21fc"}, + {file = "mkdocs_material-9.1.8-py3-none-any.whl", hash = "sha256:ac76e31bf52b2742c08a9d6629d64878f32dda5c949cd371082e25106c9be7dd"}, + {file = "mkdocs_material-9.1.8.tar.gz", hash = "sha256:616ef98fc143b3ec8c559e2fec85f32103d2093e9c88333964d93105ea2d670b"}, ] [package.dependencies] @@ -1076,19 +1076,19 @@ tests = ["check-manifest", "coverage", "defusedxml", "markdown2", "olefile", "pa [[package]] name = "platformdirs" -version = "3.2.0" +version = "3.3.0" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "platformdirs-3.2.0-py3-none-any.whl", hash = "sha256:ebe11c0d7a805086e99506aa331612429a72ca7cd52a1f0d277dc4adc20cb10e"}, - {file = "platformdirs-3.2.0.tar.gz", hash = "sha256:d5b638ca397f25f979350ff789db335903d7ea010ab28903f57b27e1b16c2b08"}, + {file = "platformdirs-3.3.0-py3-none-any.whl", hash = "sha256:ea61fd7b85554beecbbd3e9b37fb26689b227ffae38f73353cbcc1cf8bd01878"}, + {file = "platformdirs-3.3.0.tar.gz", hash = "sha256:64370d47dc3fca65b4879f89bdead8197e93e05d696d6d1816243ebae8595da5"}, ] [package.extras] -docs = ["furo (>=2022.12.7)", "proselint (>=0.13)", "sphinx (>=6.1.3)", "sphinx-autodoc-typehints (>=1.22,!=1.23.4)"] -test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.2.2)", "pytest-cov (>=4)", "pytest-mock (>=3.10)"] +docs = ["furo (>=2023.3.27)", "proselint (>=0.13)", "sphinx (>=6.1.3)", "sphinx-autodoc-typehints (>=1.23,!=1.23.4)"] +test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.3.1)", "pytest-cov (>=4)", "pytest-mock (>=3.10)"] [[package]] name = "pycparser" @@ -1528,4 +1528,4 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more [metadata] lock-version = "2.0" python-versions = "^3.8" -content-hash = "36be3ec4a2e38898bae4af437825651a2099b40ac7081189bb83b5cbff791c21" +content-hash = "97b85e66b972473c2881f6a81e166290014ae55d3ccc087e12b42db561d1d19f" diff --git a/pyproject.toml b/pyproject.toml index c562a89..06fa901 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,7 @@ packages = [{include = "govuk_frontend_django"}] python = "^3.8" Django = "^4.1.7" jinja2 = "^3.1.2" -govuk-frontend-jinja = "2.5.0" +govuk-frontend-jinja = "2.6.0" [tool.poetry.group.dev.dependencies] black = "^23.3.0"