govuk_publishing_components 40.0.0 → 40.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb +1 -0
- data/app/views/govuk_publishing_components/components/_search.html.erb +3 -0
- data/app/views/govuk_publishing_components/components/docs/search.yml +12 -0
- data/app/views/govuk_publishing_components/components/layout_header/_search.html.erb +1 -0
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c5fc5e9c02a30ad0e7d1d21d034da01775c4f1f5a2f2a40e4b5d0693dae48033
|
4
|
+
data.tar.gz: 84697249d14727c29b934bf5fe9403f580711421da5f1b1172d1af734b8989b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9b3f9730f1636e7a5ae8f78227fd96ba87ba5f4365c1f6f624c4383be524a68aa414ba6091cdda40e46db5cfd9bb3fb7c695598dec75260a95417b89e96ac35
|
7
|
+
data.tar.gz: ecd0031c1d3a84d47cebc523bf34fc80554f12a843a3864b9ca1c05641380d8c1044532c876cf8f70cbb16665ba448438594c25e107334fe5c11161a5f33f5c4
|
data/app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb
CHANGED
@@ -347,6 +347,7 @@
|
|
347
347
|
label_custom_class: "gem-c-layout-super-navigation-header__search-label--large-navbar",
|
348
348
|
size: "large",
|
349
349
|
margin_bottom: 0,
|
350
|
+
disable_corrections: true,
|
350
351
|
data_attributes: {
|
351
352
|
track_category: "headerClicked",
|
352
353
|
track_action: "searchSubmitted",
|
@@ -6,6 +6,7 @@
|
|
6
6
|
|
7
7
|
aria_controls ||= nil
|
8
8
|
button_text ||= t("components.search_box.search_button")
|
9
|
+
correction_value = "off" if local_assigns[:disable_corrections]
|
9
10
|
id ||= "search-main-" + SecureRandom.hex(4)
|
10
11
|
wrap_label_in_a_heading ||= false
|
11
12
|
label_margin_bottom ||= nil
|
@@ -73,6 +74,8 @@
|
|
73
74
|
title: t("components.search_box.input_title"),
|
74
75
|
type: "search",
|
75
76
|
value: value,
|
77
|
+
autocorrect: correction_value,
|
78
|
+
autocapitalize: correction_value,
|
76
79
|
) %>
|
77
80
|
<div class="gem-c-search__item gem-c-search__submit-wrapper">
|
78
81
|
<%= tag.button class: "gem-c-search__submit", type: "submit", data: data_attributes, enterkeyhint: "search" do %>
|
@@ -113,3 +113,15 @@ examples:
|
|
113
113
|
Allows adding a custom class to the label of the component.
|
114
114
|
data:
|
115
115
|
label_custom_class: "govuk-heading-xl"
|
116
|
+
with_corrections_disabled:
|
117
|
+
description: |
|
118
|
+
Allows disabling mobile browser autocorrect features (`autocorrect` and `autocapitalize`
|
119
|
+
attributes) on the input field.
|
120
|
+
|
121
|
+
Mobile browser autocorrect and text substitution features can conflict with the built in
|
122
|
+
autocorrect features of some search engines, and will frequently correct domain-specific
|
123
|
+
search terms to something that is not what the user intended (for example, correcting "SORN"
|
124
|
+
to "sworn" or "HMRC" to "Hercules"). Capitalisation can also be significant for some search
|
125
|
+
engines such as that currently used by Search API v2.
|
126
|
+
data:
|
127
|
+
disable_corrections: true
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: govuk_publishing_components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 40.
|
4
|
+
version: 40.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GOV.UK Dev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-07-
|
11
|
+
date: 2024-07-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: govuk_app_config
|
@@ -1866,7 +1866,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1866
1866
|
- !ruby/object:Gem::Version
|
1867
1867
|
version: '0'
|
1868
1868
|
requirements: []
|
1869
|
-
rubygems_version: 3.5.
|
1869
|
+
rubygems_version: 3.5.16
|
1870
1870
|
signing_key:
|
1871
1871
|
specification_version: 4
|
1872
1872
|
summary: A gem to document components in GOV.UK frontend applications
|