govuk-components 5.11.3 → 5.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +29 -29
- data/app/components/govuk_component/pagination_component/item.rb +1 -1
- data/app/components/govuk_component/service_navigation_component/navigation_item_component.rb +7 -2
- data/lib/govuk/components/engine.rb +23 -5
- data/lib/govuk/components/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 123b830a78e9d652ef53388d242717a0f547e175dedf4e2af5e88bcbc170d7f7
|
|
4
|
+
data.tar.gz: 3d70addb10c631e0d6327b5e6716cd7f9e419f85276d527d362ae76dc0dc4fbb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eb94a5a0ee9cfc3f964a53a0c4aa44fb841697240c4c80b7f420a7a0c2b73e06243df7be949813777f7d9a455ac57fb51706b51a9b7be73782dd4849b95023a2
|
|
7
|
+
data.tar.gz: bc0163e115016dac5c6fc62640d8d62f2e4e7b28fbaef143acaff086a4e1abbd3737dacfd4089d47526763d09bfa444d76b27e2a93085e87bed93c04b3f13316
|
data/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
[](https://badge.fury.io/rb/govuk-components)
|
|
5
5
|
[](https://rubygems.org/gems/govuk-components)
|
|
6
6
|
[](https://github.com/x-govuk/govuk-components/blob/main/LICENSE.txt)
|
|
7
|
-
[](https://design-system.service.gov.uk)
|
|
8
8
|
[](https://viewcomponent.org/)
|
|
9
9
|
[](https://weblog.rubyonrails.org/releases/)
|
|
10
10
|
[](https://www.ruby-lang.org/en/downloads/)
|
|
@@ -15,41 +15,41 @@ It aims to implement the functionality from the original Nunjucks macros in a wa
|
|
|
15
15
|
|
|
16
16
|
## Documentation
|
|
17
17
|
|
|
18
|
-
The gem comes with [a full guide](https://govuk-components.
|
|
18
|
+
The gem comes with [a full guide](https://govuk-components.x-govuk.org/) that covers most aspects of day-to-day use, along with code and output examples. The examples in the guide (and the guide itself) are built using the components, so it will always be up to date.
|
|
19
19
|
|
|
20
20
|
[](https://app.netlify.com/sites/govuk-components/deploys)
|
|
21
21
|
|
|
22
22
|
## What’s included?
|
|
23
23
|
|
|
24
|
-
All of the non-form components from the GOV.UK Design System are implemented by this library as ViewComponents. Form components are implemented by the [GOV.UK Form Builder](https://govuk-form-builder.
|
|
24
|
+
All of the non-form components from the GOV.UK Design System are implemented by this library as ViewComponents. Form components are implemented by the [GOV.UK Form Builder](https://govuk-form-builder.x-govuk.org/).
|
|
25
25
|
|
|
26
26
|
The provided components are:
|
|
27
27
|
|
|
28
|
-
* [Accordion](https://govuk-components.
|
|
29
|
-
* [Back link](https://govuk-components.
|
|
30
|
-
* [Breadcrumbs](https://govuk-components.
|
|
31
|
-
* [Cookie banner](https://govuk-components.
|
|
32
|
-
* [Details](https://govuk-components.
|
|
33
|
-
* [Exit this page](https://govuk-components.
|
|
34
|
-
* [GOV.UK footer](https://govuk-components.
|
|
35
|
-
* [GOV.UK header](https://govuk-components.
|
|
36
|
-
* [Inset text](https://govuk-components.
|
|
37
|
-
* [Notification banner](https://govuk-components.
|
|
38
|
-
* [Panel](https://govuk-components.
|
|
39
|
-
* [Pagination](https://govuk-components.
|
|
40
|
-
* [Phase banner](https://govuk-components.
|
|
41
|
-
* [Section break](https://govuk-components.
|
|
42
|
-
* [Start button](https://govuk-components.
|
|
43
|
-
* [Summary list](https://govuk-components.
|
|
44
|
-
* [Tabs](https://govuk-components.
|
|
45
|
-
* [Tables](https://govuk-components.
|
|
46
|
-
* [Tags](https://govuk-components.
|
|
47
|
-
* [Task list](https://govuk-components.
|
|
48
|
-
* [Warning text](https://govuk-components.
|
|
49
|
-
|
|
50
|
-
This library also provides helpers for creating [links](https://govuk-components.
|
|
51
|
-
[buttons](https://govuk-components.
|
|
52
|
-
and [back to top links](https://govuk-components.
|
|
28
|
+
* [Accordion](https://govuk-components.x-govuk.org/components/accordion)
|
|
29
|
+
* [Back link](https://govuk-components.x-govuk.org/components/back-link)
|
|
30
|
+
* [Breadcrumbs](https://govuk-components.x-govuk.org/components/breadcrumbs)
|
|
31
|
+
* [Cookie banner](https://govuk-components.x-govuk.org/components/cookie-banner)
|
|
32
|
+
* [Details](https://govuk-components.x-govuk.org/components/details)
|
|
33
|
+
* [Exit this page](https://govuk-components.x-govuk.org/components/exit-this-page)
|
|
34
|
+
* [GOV.UK footer](https://govuk-components.x-govuk.org/components/footer)
|
|
35
|
+
* [GOV.UK header](https://govuk-components.x-govuk.org/components/header)
|
|
36
|
+
* [Inset text](https://govuk-components.x-govuk.org/components/inset-text)
|
|
37
|
+
* [Notification banner](https://govuk-components.x-govuk.org/components/notification-banner)
|
|
38
|
+
* [Panel](https://govuk-components.x-govuk.org/components/panel)
|
|
39
|
+
* [Pagination](https://govuk-components.x-govuk.org/components/pagination)
|
|
40
|
+
* [Phase banner](https://govuk-components.x-govuk.org/components/phase-banner)
|
|
41
|
+
* [Section break](https://govuk-components.x-govuk.org/components/section-break)
|
|
42
|
+
* [Start button](https://govuk-components.x-govuk.org/components/start-button)
|
|
43
|
+
* [Summary list](https://govuk-components.x-govuk.org/components/summary-list)
|
|
44
|
+
* [Tabs](https://govuk-components.x-govuk.org/components/tabs)
|
|
45
|
+
* [Tables](https://govuk-components.x-govuk.org/components/table)
|
|
46
|
+
* [Tags](https://govuk-components.x-govuk.org/components/tag)
|
|
47
|
+
* [Task list](https://govuk-components.x-govuk.org/components/task-list)
|
|
48
|
+
* [Warning text](https://govuk-components.x-govuk.org/components/warning-text)
|
|
49
|
+
|
|
50
|
+
This library also provides helpers for creating [links](https://govuk-components.x-govuk.org/helpers/link),
|
|
51
|
+
[buttons](https://govuk-components.x-govuk.org/helpers/button), [skip links](https://govuk-components.x-govuk.org/helpers/skip-link)
|
|
52
|
+
and [back to top links](https://govuk-components.x-govuk.org/helpers/back-to-top-link).
|
|
53
53
|
|
|
54
54
|
## Alternative syntax
|
|
55
55
|
|
|
@@ -97,7 +97,7 @@ Here are the rendered tabs:
|
|
|
97
97
|
|
|
98
98
|

|
|
99
99
|
|
|
100
|
-
For examples on usage see the [guide page](https://govuk-components.
|
|
100
|
+
For examples on usage see the [guide page](https://govuk-components.x-govuk.org/).
|
|
101
101
|
|
|
102
102
|
## Setup
|
|
103
103
|
|
data/app/components/govuk_component/service_navigation_component/navigation_item_component.rb
CHANGED
|
@@ -76,8 +76,13 @@ private
|
|
|
76
76
|
end
|
|
77
77
|
|
|
78
78
|
def aria_current
|
|
79
|
-
|
|
79
|
+
{ aria: { current: aria_current_value } }
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
def aria_current_value
|
|
83
|
+
return 'page' if current?
|
|
84
|
+
return true if active?
|
|
80
85
|
|
|
81
|
-
|
|
86
|
+
nil
|
|
82
87
|
end
|
|
83
88
|
end
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
require "rails/engine"
|
|
2
|
-
require "active_support/
|
|
2
|
+
require "active_support/ordered_options"
|
|
3
3
|
|
|
4
4
|
module Govuk
|
|
5
5
|
module Components
|
|
6
|
-
include ActiveSupport::Configurable
|
|
7
|
-
|
|
8
6
|
class << self
|
|
7
|
+
class_attribute :config,
|
|
8
|
+
instance_predicate: false,
|
|
9
|
+
default: ActiveSupport::OrderedOptions.new
|
|
10
|
+
|
|
11
|
+
def inherited(klass) # :nodoc:
|
|
12
|
+
klass.config = ActiveSupport::InheritableOptions.new(config)
|
|
13
|
+
super
|
|
14
|
+
end
|
|
15
|
+
|
|
9
16
|
# Configure the form builder in the usual manner. All of the
|
|
10
17
|
# keys in {DEFAULTS} can be configured as per the example below
|
|
11
18
|
#
|
|
@@ -14,7 +21,7 @@ module Govuk
|
|
|
14
21
|
# conf.do_some_things = 'yes'
|
|
15
22
|
# end
|
|
16
23
|
def configure
|
|
17
|
-
yield
|
|
24
|
+
yield config
|
|
18
25
|
end
|
|
19
26
|
|
|
20
27
|
# Resets each of the configurable values to its default
|
|
@@ -142,7 +149,18 @@ module Govuk
|
|
|
142
149
|
enable_auto_table_scopes: true,
|
|
143
150
|
}.freeze
|
|
144
151
|
|
|
145
|
-
DEFAULTS.
|
|
152
|
+
DEFAULTS.each do |key, value|
|
|
153
|
+
reader, reader_line = "def #{key}; config.#{key}; end", __LINE__
|
|
154
|
+
writer, writer_line = "def #{key}=(value); config.#{key} = value; end", __LINE__
|
|
155
|
+
|
|
156
|
+
singleton_class.class_eval reader, __FILE__, reader_line
|
|
157
|
+
singleton_class.class_eval writer, __FILE__, writer_line
|
|
158
|
+
|
|
159
|
+
class_eval reader, __FILE__, reader_line
|
|
160
|
+
class_eval writer, __FILE__, writer_line
|
|
161
|
+
|
|
162
|
+
send("#{key}=", value)
|
|
163
|
+
end
|
|
146
164
|
|
|
147
165
|
class Engine < ::Rails::Engine
|
|
148
166
|
isolate_namespace Govuk::Components
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: govuk-components
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.
|
|
4
|
+
version: 5.13.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- DfE developers
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-
|
|
11
|
+
date: 2025-11-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: html-attributes-utils
|
|
@@ -59,7 +59,7 @@ dependencies:
|
|
|
59
59
|
version: '4.0'
|
|
60
60
|
- - "<"
|
|
61
61
|
- !ruby/object:Gem::Version
|
|
62
|
-
version: '4.
|
|
62
|
+
version: '4.2'
|
|
63
63
|
type: :runtime
|
|
64
64
|
prerelease: false
|
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -69,7 +69,7 @@ dependencies:
|
|
|
69
69
|
version: '4.0'
|
|
70
70
|
- - "<"
|
|
71
71
|
- !ruby/object:Gem::Version
|
|
72
|
-
version: '4.
|
|
72
|
+
version: '4.2'
|
|
73
73
|
- !ruby/object:Gem::Dependency
|
|
74
74
|
name: deep_merge
|
|
75
75
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -146,14 +146,14 @@ dependencies:
|
|
|
146
146
|
requirements:
|
|
147
147
|
- - '='
|
|
148
148
|
- !ruby/object:Gem::Version
|
|
149
|
-
version: 5.1.
|
|
149
|
+
version: 5.1.20
|
|
150
150
|
type: :development
|
|
151
151
|
prerelease: false
|
|
152
152
|
version_requirements: !ruby/object:Gem::Requirement
|
|
153
153
|
requirements:
|
|
154
154
|
- - '='
|
|
155
155
|
- !ruby/object:Gem::Version
|
|
156
|
-
version: 5.1.
|
|
156
|
+
version: 5.1.20
|
|
157
157
|
- !ruby/object:Gem::Dependency
|
|
158
158
|
name: sassc-rails
|
|
159
159
|
requirement: !ruby/object:Gem::Requirement
|