diff --git a/components/step-by-step/step-by-step-overview/step-by-step-overview.component.yml b/components/step-by-step/step-by-step-overview/step-by-step-overview.component.yml
new file mode 100644
index 0000000..de6cf99
--- /dev/null
+++ b/components/step-by-step/step-by-step-overview/step-by-step-overview.component.yml
@@ -0,0 +1,15 @@
+$schema: https://git.drupalcode.org/project/drupal/-/raw/10.1.x/core/modules/sdc/src/metadata.schema.json
+name: Step by step
+props:
+ type: object
+ required:
+ - step_by_step_items
+ properties:
+ step_by_step_size:
+ type: boolean
+ title: Size
+ description: Size of the items.
+ step_by_step_items:
+ type: array
+ title: Step by step Items
+ description: The items for the step by step.
diff --git a/components/step-by-step/step-by-step-overview/step-by-step-overview.twig b/components/step-by-step/step-by-step-overview/step-by-step-overview.twig
new file mode 100644
index 0000000..0eac626
--- /dev/null
+++ b/components/step-by-step/step-by-step-overview/step-by-step-overview.twig
@@ -0,0 +1,8 @@
+{# Stepper
+ ## Variables ##
+ # step_by_step_size – Number of columns.
+ # step_by_step_items– List of tiles.
+#}
+
+
+
+ {{ step_by_step_item_content }}
+
+
diff --git a/config/install/block.block.csgov_theme_breadcrumbs.yml b/config/install/block.block.csgov_theme_breadcrumbs.yml
index 6861d86..f3296d6 100644
--- a/config/install/block.block.csgov_theme_breadcrumbs.yml
+++ b/config/install/block.block.csgov_theme_breadcrumbs.yml
@@ -13,7 +13,7 @@ provider: null
plugin: system_breadcrumb_block
settings:
id: system_breadcrumb_block
- label: 'Drobečková navigace'
+ label: 'Drobečkové menu'
label_display: '0'
provider: system
visibility: { }
diff --git a/config/install/block.block.csgov_theme_main_menu.yml b/config/install/block.block.csgov_theme_main_menu.yml
index c47007a..92f60df 100644
--- a/config/install/block.block.csgov_theme_main_menu.yml
+++ b/config/install/block.block.csgov_theme_main_menu.yml
@@ -15,7 +15,7 @@ provider: null
plugin: 'system_menu_block:main'
settings:
id: 'system_menu_block:main'
- label: 'Hlavní navigace'
+ label: 'Hlavní menu'
label_display: '0'
provider: system
level: 1
diff --git a/csgov_theme.libraries.yml b/csgov_theme.libraries.yml
index b50c56e..934e3f7 100644
--- a/csgov_theme.libraries.yml
+++ b/csgov_theme.libraries.yml
@@ -124,11 +124,6 @@ node:
theme:
templates/content-types/node.css: {}
-notification:
- css:
- theme:
- templates/content-types/notification/notification.css: {}
-
board:
css:
theme:
@@ -144,6 +139,22 @@ event:
theme:
templates/content-types/event/event.css: {}
+notification:
+ css:
+ theme:
+ templates/content-types/notification/notification.css: {}
+
+step-by-step:
+ css:
+ component:
+ templates/content-types/step-by-step/step-by-step.css: {}
+ dependencies:
+ - core/drupal
+ - core/once
+ - gov_cz/toggle-section
+ - gov_cz/gov-icon
+ - gov_cz/gov-stepper
+
# View modes
card:
css:
diff --git a/templates/_base/variables.css b/templates/_base/variables.css
index d03482e..05d71d9 100644
--- a/templates/_base/variables.css
+++ b/templates/_base/variables.css
@@ -193,8 +193,11 @@
/* Webform */
--csgov-feedback-background: var(--csgov-color-primary-2);
-}
+ /* Gov.cz colors A11Y fix */
+ --gov-wizard-warning-indicator-color: var(--csgov-color-grey-8);
+ --gov-button-warning-base-color: var(--csgov-color-grey-8);
+}
@media (min-width: 48em) {
:root {
diff --git a/templates/content-types/step-by-step/node--csgov-step-by-step--full.html.twig b/templates/content-types/step-by-step/node--csgov-step-by-step--full.html.twig
new file mode 100644
index 0000000..fb979b8
--- /dev/null
+++ b/templates/content-types/step-by-step/node--csgov-step-by-step--full.html.twig
@@ -0,0 +1,153 @@
+{#
+/**
+ * @file
+ * Theme override to display a node.
+ *
+ * Available variables:
+ * - node: The node entity with limited access to object properties and methods.
+ * Only method names starting with "get", "has", or "is" and a few common
+ * methods such as "id", "label", and "bundle" are available. For example:
+ * - node.getCreatedTime() will return the node creation timestamp.
+ * - node.hasField('field_example') returns TRUE if the node bundle includes
+ * field_example. (This does not indicate the presence of a value in this
+ * field.)
+ * - node.isPublished() will return whether the node is published or not.
+ * Calling other methods, such as node.delete(), will result in an exception.
+ * See \Drupal\node\Entity\Node for a full list of public properties and
+ * methods for the node object.
+ * - label: (optional) The title of the node.
+ * - content: All node items. Use {{ content }} to print them all,
+ * or print a subset such as {{ content.field_example }}. Use
+ * {{ content|without('field_example') }} to temporarily suppress the printing
+ * of a given child element.
+ * - author_picture: The node author user entity, rendered using the "compact"
+ * view mode.
+ * - metadata: Metadata for this node.
+ * - date: (optional) Themed creation date field.
+ * - author_name: (optional) Themed author name field.
+ * - url: Direct URL of the current node.
+ * - display_submitted: Whether submission information should be displayed.
+ * - attributes: HTML attributes for the containing element.
+ * The attributes.class element may contain one or more of the following
+ * classes:
+ * - node: The current template type (also known as a "theming hook").
+ * - node--type-[type]: The current node type. For example, if the node is an
+ * "Article" it would result in "node--type-article". Note that the machine
+ * name will often be in a short form of the human readable label.
+ * - node--view-mode-[view_mode]: The View Mode of the node; for example, a
+ * teaser would result in: "node--view-mode-teaser", and
+ * full: "node--view-mode-full".
+ * The following are controlled through the node publishing options.
+ * - node--promoted: Appears on nodes promoted to the front page.
+ * - node--sticky: Appears on nodes ordered above other non-sticky nodes in
+ * teaser listings.
+ * - node--unpublished: Appears on unpublished nodes visible only to site
+ * admins.
+ * - title_attributes: Same as attributes, except applied to the main title
+ * tag that appears in the template.
+ * - content_attributes: Same as attributes, except applied to the main
+ * content tag that appears in the template.
+ * - author_attributes: Same as attributes, except applied to the author of
+ * the node tag that appears in the template.
+ * - title_prefix: Additional output populated by modules, intended to be
+ * displayed in front of the main title tag that appears in the template.
+ * - title_suffix: Additional output populated by modules, intended to be
+ * displayed after the main title tag that appears in the template.
+ * - view_mode: View mode; for example, "teaser" or "full".
+ * - teaser: Flag for the teaser state. Will be true if view_mode is 'teaser'.
+ * - page: Flag for the full page state. Will be true if view_mode is 'full'.
+ * - readmore: Flag for more state. Will be true if the teaser content of the
+ * node cannot hold the main body content.
+ * - logged_in: Flag for authenticated user status. Will be true when the
+ * current user is a logged-in member.
+ * - is_admin: Flag for admin user status. Will be true when the current user
+ * is an administrator.
+ *
+ * @see template_preprocess_node()
+ *
+ */
+#}
+{%
+ set classes = [
+ extra_classes ? extra_classes|join(', '),
+ 'csgov-step-by-step',
+ 'node',
+ node.isPromoted() ? 'node--promoted',
+ node.isSticky() ? 'node--sticky',
+ not node.isPublished() ? 'node--unpublished',
+ view_mode ? 'node--view-mode-' ~ view_mode|clean_class,
+ ]
+%}
+{{ attach_library('csgov_theme/node') }}
+{{ attach_library('csgov_theme/step-by-step') }}
+
+ {{ include('csgov_theme:step-by-step-overview', {
+ step_by_step_items: content.field_csgov_sbs_items
+ })
+ }}
+
+
+
+ {{ parent() }}
+ {% endblock %}
+
+{% endembed %}
diff --git a/templates/content-types/step-by-step/readme.md b/templates/content-types/step-by-step/readme.md
new file mode 100644
index 0000000..64501da
--- /dev/null
+++ b/templates/content-types/step-by-step/readme.md
@@ -0,0 +1,3 @@
+# Krok za krokem
+
+Obsah i zjednodušená komponenta je inspirována systémem pro návody Step by Step z gov.uk. Pro potřeby CSGOV je upravena. Design pak používá kombinaci komponent z českého design systému – Stepper, Wizard a Accordion.
diff --git a/templates/content-types/step-by-step/step-by-step.css b/templates/content-types/step-by-step/step-by-step.css
new file mode 100644
index 0000000..12b6bd2
--- /dev/null
+++ b/templates/content-types/step-by-step/step-by-step.css
@@ -0,0 +1,43 @@
+.csgov-step-by-step__container {
+ padding-left: 0;
+}
+
+.csgov-step-by-step__navigation {
+ /* margin-top: var(--csgov-spacing-xl); */
+ padding-inline: var(--csgov-site-padding);
+}
+
+.csgov-step-by-step__navigation .gov-stepper-item .gov-stepper-item__label .gov-stepper-item__label__link {
+ font-size: var(--csgov-fs-m);
+ color: var(--csgov-color-secondary);
+}
+
+.csgov-step-by-step__navigation .gov-stepper-item.step-by-step--current .gov-stepper-item__prefix {
+ border: 2px solid var(--csgov-color-secondary);
+}
+
+.csgov-step-by-step__navigation .gov-stepper-item.step-by-step--current .gov-stepper-item__label .gov-stepper-item__label__link,
+.csgov-step-by-step__navigation .gov-stepper-item.step-by-step--current ~ * .gov-stepper-item__label .gov-stepper-item__label__link {
+ font-size: var(--csgov-fs-xl);
+ color: inherit;
+}
+
+.csgov-step-by-step__parent {
+ border-left: 5px solid var(--csgov-color-primary);
+ background: var(--csgov-color-primary-2);
+ border-radius: var(--border-radius);
+ padding: var(--csgov-spacing-s) var(--csgov-spacing);
+}
+
+.csgov-step-by-step__parent-label {
+ font-size: var(--csgov-fs-l);
+ font-weight: var(--csgov-fw-bold);
+}
+
+.csgov-step-by-step__parent-label__pretitle {
+ display: block;
+}
+
+.csgov-step-by-step__parent-label a {
+ font-weight: var(--csgov-fw-normal);
+}
diff --git a/templates/paragraphs/step-by-step/paragraph--csgov-step-by-step-item.html.twig b/templates/paragraphs/step-by-step/paragraph--csgov-step-by-step-item.html.twig
new file mode 100644
index 0000000..adab229
--- /dev/null
+++ b/templates/paragraphs/step-by-step/paragraph--csgov-step-by-step-item.html.twig
@@ -0,0 +1,25 @@
+{# If there is no icon we need to insert the current item number. #}
+{% set parent_items = paragraph._referringItem.parent.parent.entity.field_csgov_p_sbs_items %}
+{% set current_item = paragraph.id() %}
+
+{% set step_index = 0 %}
+{% for key, item in parent_items %}
+ {% if item.target_id == current_item %}
+ {% set step_index = key + 1 %}
+ {% endif %}
+{% endfor %}
+
+{{ include('csgov_theme:step-by-step', {
+ step_by_step_item_size: paragraph._referringItem.parent.parent.entity.field_csgov_p_size.value,
+ step_by_step_item_noprefix: paragraph._referringItem.parent.parent.entity.field_csgov_p_sbs_noprefix.value,
+ step_by_step_item_variant: paragraph.field_csgov_p_sbs_variant.value,
+ step_by_step_item_label_id: 'label-' ~ paragraph.id(),
+ step_by_step_item_content_id: 'content-' ~ paragraph.id(),
+ step_by_step_item_label: content.field_csgov_p_title,
+ step_by_step_item_content: content.field_csgov_p_content.0,
+ step_by_step_item_icon: paragraph.field_csgov_p_icon|file_url,
+ step_by_step_item_prefix: step_index,
+ step_by_step_item_annotation: content.field_csgov_p_annotation.0,
+ step_by_step_item_expanded: paragraph.field_csgov_p_expanded.value,
+ })
+}}
diff --git a/templates/paragraphs/step-by-step/paragraph--csgov-step-by-step.html.twig b/templates/paragraphs/step-by-step/paragraph--csgov-step-by-step.html.twig
new file mode 100644
index 0000000..f46570a
--- /dev/null
+++ b/templates/paragraphs/step-by-step/paragraph--csgov-step-by-step.html.twig
@@ -0,0 +1,33 @@
+{{ attach_library('csgov_theme/paragraphs') }}
+{{ attach_library('csgov_theme/step-by-step') }}
+
+{%
+ set classes = [
+ 'step-by-step',
+ 'paragraph',
+ 'paragraph--type--' ~ paragraph.bundle|clean_class,
+ view_mode ? 'paragraph--view-mode--' ~ view_mode|clean_class,
+ not paragraph.isPublished() ? 'paragraph--unpublished'
+ ]
+%}
+
+
+
+ {% if paragraph.field_csgov_p_title.value %}
+
+
{{ content.field_csgov_p_title }}
+
+ {% endif %}
+
+ {% if paragraph.field_csgov_p_content.value %}
+
+ {{ content.field_csgov_p_content }}
+
+ {% endif %}
+
+ {{ include('csgov_theme:step-by-step-overview', {
+ step_by_step_items: content.field_csgov_p_sbs_items
+ })
+}}
+
+
diff --git a/templates/view-modes/step-by-step/node--csgov-step-by-step--csgov-step-by-step.html.twig b/templates/view-modes/step-by-step/node--csgov-step-by-step--csgov-step-by-step.html.twig
new file mode 100644
index 0000000..ec78609
--- /dev/null
+++ b/templates/view-modes/step-by-step/node--csgov-step-by-step--csgov-step-by-step.html.twig
@@ -0,0 +1,29 @@
+{# If there is no icon we need to insert the current item number. #}
+{% set parent_items = node._referringItem.parent.parent.entity.field_csgov_sbs_items %}
+{% set current_item = node.id() %}
+
+{% set step_index = 0 %}
+{% for key, item in parent_items %}
+ {% if item.target_id == current_item %}
+ {% set step_index = key + 1 %}
+ {% endif %}
+{% endfor %}
+
+{% if path('