diff --git a/CHANGELOG.md b/CHANGELOG.md index d57e490..30e8bbf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,25 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +## Unreleased + +[Compare with latest](https://github.com/DataShades/ckanext-nswdesignsystem/compare/v0.1.6...HEAD) + +### Features + +- update nswdesignsystem to v3.11.2 ([89b0e35](https://github.com/DataShades/ckanext-nswdesignsystem/commit/89b0e357f71da317a85baca0299bd51bf3f5e2fc) by Sergey Motornyuk). +- add empty_label to facet macro ([4b43df6](https://github.com/DataShades/ckanext-nswdesignsystem/commit/4b43df629e4b425747bc7c432b400747c2a5e917) by Sergey Motornyuk). +- dialog macros ([a46d569](https://github.com/DataShades/ckanext-nswdesignsystem/commit/a46d569c2af7653d7ee21c10ad4d8c0fc02fe8d5) by Sergey Motornyuk). +- in-page-alert macros ([9efe927](https://github.com/DataShades/ckanext-nswdesignsystem/commit/9efe927ee5f118bf30b742787a14ca45d8e79dd6) by Sergey Motornyuk). +- update nsw-design-system to v3.10.0 ([d5cb25c](https://github.com/DataShades/ckanext-nswdesignsystem/commit/d5cb25c3d1b097d1d06383713441bea5a92dbccd) by Sergey Motornyuk). +- NavDict.open property for keeping inactive sidebar sections open ([023fb3a](https://github.com/DataShades/ckanext-nswdesignsystem/commit/023fb3a9dbafa0eed9ab2600c4dfde3bd843cd21) by Sergey Motornyuk). + +### Bug Fixes + +- header search redirects to search page ([dff8bb1](https://github.com/DataShades/ckanext-nswdesignsystem/commit/dff8bb1cde09d408fa97e7365fd1ebe656178937) by Sergey Motornyuk). +- fix expand label on accordion ([b0a710f](https://github.com/DataShades/ckanext-nswdesignsystem/commit/b0a710f8bfc0e67a7a02477e0057cdf827e738db) by Sergey Motornyuk). + ## [v0.1.6](https://github.com/DataShades/ckanext-nswdesignsystem/releases/tag/v0.1.6) - 2023-08-17 diff --git a/ckanext/nswdesignsystem/helpers.py b/ckanext/nswdesignsystem/helpers.py index c80db77..e4488b3 100644 --- a/ckanext/nswdesignsystem/helpers.py +++ b/ckanext/nswdesignsystem/helpers.py @@ -87,7 +87,7 @@ def nswdesignsystem_demo_links() -> list[types.NavDict]: "footer", "header", "main_navigation", "masthead", "side_navigation", "tabs", "accordion", "breadcrumbs", "buttons", "callout", "cards", "content_blocks", "dialog", "file_upload", "filters", "forms", "global_alert", "hero_banner", "hero_search", "in_page_alert", "in_page_navigation", - "link_list", "list_item", "loader", "pagination", "progress_indicator", "results_bar", + "link_list", "list_item", "loader", "pagination", "popover", "progress_indicator", "results_bar", "select", "status_labels", "steps", "table", "tags", "tooltip", ] diff --git a/ckanext/nswdesignsystem/templates/macros/nswdesignsystem/popover.html b/ckanext/nswdesignsystem/templates/macros/nswdesignsystem/popover.html new file mode 100644 index 0000000..06ce847 --- /dev/null +++ b/ckanext/nswdesignsystem/templates/macros/nswdesignsystem/popover.html @@ -0,0 +1,23 @@ +{% macro popover(id, label=null, position="top", gap=10, style="dark-outline") %} + {% with trigger = caller("trigger")|trim %} + + + + {% endwith %} + +
+ {{ caller("popover") }} +
+ +{% endmacro %} diff --git a/ckanext/nswdesignsystem/templates/nswdesignsystem/demo/popover.preview.html b/ckanext/nswdesignsystem/templates/nswdesignsystem/demo/popover.preview.html new file mode 100644 index 0000000..74f1a38 --- /dev/null +++ b/ckanext/nswdesignsystem/templates/nswdesignsystem/demo/popover.preview.html @@ -0,0 +1,92 @@ +{% from "macros/nswdesignsystem/popover.html" import popover with context %} + +
+ +{% call(part) popover("popover-top", "Open top", "top") %} +{% if part == "popover" %} +
+

Family rebate

+

Helps families with dependants to pay their energy bills. Applications opening late July for the 2019-20 rebate.

+

+ Get startedopen_in_new +

+
+{% endif %} +{% endcall %} + +{% call(part) popover("popover-top-start", "Open top start", "top-start", style="danger") %} +{% if part == "trigger" %} + Custom trigger + star +{% elif part == "popover" %} +
+

Family rebate

+

Helps families with dependants to pay their energy bills. Applications opening late July for the 2019-20 rebate.

+

+ Get startedopen_in_new +

+
+{% endif %} +{% endcall %} + +{% call(part) popover("popover-top-end", "Open top end", "top-end", style="dark") %} +{% if part == "popover" %} +
+

Family rebate

+

Helps families with dependants to pay their energy bills. Applications opening late July for the 2019-20 rebate.

+

+ Get startedopen_in_new +

+
+{% endif %} +{% endcall %} + +{% call(part) popover("popover-left", "Open left", "left") %} +{% if part == "popover" %} +
+

Family rebate

+

Helps families with dependants to pay their energy bills. Applications opening late July for the 2019-20 rebate.

+

+ Get startedopen_in_new +

+
+{% endif %} +{% endcall %} + +{% call(part) popover("popover-right", "Open right", "right") %} +{% if part == "popover" %} +
+

Family rebate

+

Helps families with dependants to pay their energy bills. Applications opening late July for the 2019-20 rebate.

+

+ Get startedopen_in_new +

+
+{% endif %} +{% endcall %} + +{% call(part) popover("popover-bottom", "Open bottom", "bottom") %} +{% if part == "popover" %} +
+

Family rebate

+

Helps families with dependants to pay their energy bills. Applications opening late July for the 2019-20 rebate.

+

+ Get startedopen_in_new +

+
+{% endif %} +{% endcall %} + +{% call(part) popover("popover-gap", "Open with gap", gap=100) %} +{% if part == "popover" %} +
+

Family rebate

+

Helps families with dependants to pay their energy bills. Applications opening late July for the 2019-20 rebate.

+

+ Get startedopen_in_new +

+
+{% endif %} +{% endcall %} + +