ccs-frontend_helpers 2.1.0 → 2.3.0
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/.rubocop.yml +7 -4
- data/.ruby-version +1 -1
- data/CHANGELOG.md +23 -1
- data/Gemfile +5 -5
- data/Gemfile.lock +109 -100
- data/README.md +2 -0
- data/bun.lock +18 -0
- data/ccs-frontend_helpers.gemspec +2 -2
- data/lib/ccs/components/ccs/contact_us.rb +2 -2
- data/lib/ccs/components/ccs/dashboard_section/panel.rb +2 -2
- data/lib/ccs/components/ccs/dashboard_section.rb +2 -2
- data/lib/ccs/components/ccs/footer/link.rb +2 -2
- data/lib/ccs/components/ccs/footer.rb +2 -2
- data/lib/ccs/components/ccs/header/link.rb +23 -5
- data/lib/ccs/components/ccs/header.rb +2 -2
- data/lib/ccs/components/ccs/password_strength.rb +2 -2
- data/lib/ccs/components/govuk/back_link.rb +2 -2
- data/lib/ccs/components/govuk/breadcrumbs/link.rb +2 -2
- data/lib/ccs/components/govuk/breadcrumbs.rb +2 -2
- data/lib/ccs/components/govuk/button.rb +2 -2
- data/lib/ccs/components/govuk/cookie_banner/action.rb +2 -2
- data/lib/ccs/components/govuk/cookie_banner/message.rb +2 -2
- data/lib/ccs/components/govuk/cookie_banner.rb +2 -2
- data/lib/ccs/components/govuk/details.rb +2 -2
- data/lib/ccs/components/govuk/error_message.rb +2 -2
- data/lib/ccs/components/govuk/error_summary/item.rb +2 -2
- data/lib/ccs/components/govuk/error_summary.rb +2 -2
- data/lib/ccs/components/govuk/field/input/character_count.rb +2 -0
- data/lib/ccs/components/govuk/field/input/file_upload.rb +60 -4
- data/lib/ccs/components/govuk/field/input/select.rb +2 -2
- data/lib/ccs/components/govuk/field/input/text_input/fix.rb +2 -2
- data/lib/ccs/components/govuk/field/input/text_input.rb +2 -2
- data/lib/ccs/components/govuk/field/input/textarea.rb +2 -2
- data/lib/ccs/components/govuk/field/inputs/checkboxes.rb +2 -2
- data/lib/ccs/components/govuk/field/inputs/item/checkbox.rb +2 -2
- data/lib/ccs/components/govuk/field/inputs/item/radio.rb +2 -2
- data/lib/ccs/components/govuk/field/inputs/item.rb +2 -2
- data/lib/ccs/components/govuk/field/inputs/radios.rb +2 -2
- data/lib/ccs/components/govuk/field/inputs.rb +1 -1
- data/lib/ccs/components/govuk/field.rb +2 -2
- data/lib/ccs/components/govuk/fieldset/legend.rb +2 -2
- data/lib/ccs/components/govuk/fieldset.rb +2 -2
- data/lib/ccs/components/govuk/footer/link.rb +2 -2
- data/lib/ccs/components/govuk/footer.rb +2 -2
- data/lib/ccs/components/govuk/form_group.rb +2 -2
- data/lib/ccs/components/govuk/header/link.rb +2 -2
- data/lib/ccs/components/govuk/header.rb +2 -2
- data/lib/ccs/components/govuk/hint.rb +2 -2
- data/lib/ccs/components/govuk/inset_text.rb +2 -2
- data/lib/ccs/components/govuk/label.rb +2 -2
- data/lib/ccs/components/govuk/notification_banner.rb +2 -2
- data/lib/ccs/components/govuk/pagination/increment/next.rb +2 -2
- data/lib/ccs/components/govuk/pagination/increment/previous.rb +2 -2
- data/lib/ccs/components/govuk/pagination/increment.rb +2 -2
- data/lib/ccs/components/govuk/pagination/item/form.rb +2 -2
- data/lib/ccs/components/govuk/pagination/item/tag.rb +2 -2
- data/lib/ccs/components/govuk/pagination/item.rb +2 -2
- data/lib/ccs/components/govuk/pagination.rb +2 -2
- data/lib/ccs/components/govuk/panel.rb +2 -2
- data/lib/ccs/components/govuk/phase_banner.rb +2 -2
- data/lib/ccs/components/govuk/service_navigation.rb +2 -2
- data/lib/ccs/components/govuk/skip_link.rb +2 -2
- data/lib/ccs/components/govuk/step_by_step_navigation.rb +2 -2
- data/lib/ccs/components/govuk/summary_list/action/link.rb +2 -2
- data/lib/ccs/components/govuk/summary_list/card/actions.rb +2 -2
- data/lib/ccs/components/govuk/summary_list/card/title.rb +2 -2
- data/lib/ccs/components/govuk/summary_list/card.rb +2 -2
- data/lib/ccs/components/govuk/summary_list/row/actions.rb +2 -2
- data/lib/ccs/components/govuk/summary_list/row/key.rb +2 -2
- data/lib/ccs/components/govuk/summary_list/row/value.rb +2 -2
- data/lib/ccs/components/govuk/summary_list/row.rb +2 -2
- data/lib/ccs/components/govuk/summary_list.rb +2 -2
- data/lib/ccs/components/govuk/table/body/data_cell.rb +2 -2
- data/lib/ccs/components/govuk/table/body/head_cell.rb +2 -2
- data/lib/ccs/components/govuk/table/header/head_cell.rb +2 -2
- data/lib/ccs/components/govuk/table.rb +2 -2
- data/lib/ccs/components/govuk/tabs/panel.rb +2 -2
- data/lib/ccs/components/govuk/tabs/tab.rb +2 -2
- data/lib/ccs/components/govuk/tabs.rb +2 -2
- data/lib/ccs/components/govuk/tag.rb +2 -2
- data/lib/ccs/components/govuk/task_list/item/status.rb +2 -2
- data/lib/ccs/components/govuk/task_list/item/title.rb +2 -2
- data/lib/ccs/components/govuk/task_list/item.rb +2 -2
- data/lib/ccs/components/govuk/task_list.rb +2 -2
- data/lib/ccs/components/govuk/warning_text.rb +2 -2
- data/lib/ccs/frontend_helpers/ccs_frontend/contact_us.rb +2 -2
- data/lib/ccs/frontend_helpers/ccs_frontend/dashboard_section.rb +2 -2
- data/lib/ccs/frontend_helpers/ccs_frontend/footer.rb +2 -2
- data/lib/ccs/frontend_helpers/ccs_frontend/header.rb +2 -2
- data/lib/ccs/frontend_helpers/ccs_frontend/password_strength.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/accordion.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/back_link.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/breadcrumbs.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/button.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/character_count.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/checkboxes.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/cookie_banner.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/date_input.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/details.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/error_message.rb +4 -4
- data/lib/ccs/frontend_helpers/govuk_frontend/error_summary.rb +4 -4
- data/lib/ccs/frontend_helpers/govuk_frontend/exit_this_page.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/fieldset.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/file_upload.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/footer.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/header.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/hint.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/input.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/inset_text.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/label.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/notification_banner.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/pagination.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/panel.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/password_input.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/phase_banner.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/radios.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/select.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/service_navigation.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/skip_link.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/step_by_step_navigation.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/summary_list.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/table.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/tabs.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/tag.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/task_list.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/textarea.rb +2 -2
- data/lib/ccs/frontend_helpers/govuk_frontend/warning_text.rb +2 -2
- data/lib/ccs/frontend_helpers/version.rb +1 -1
- data/package.json +2 -2
- metadata +7 -11
- data/yarn.lock +0 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 49094b85d923314effa43d0c60f5c3c0bf9deeec030c435f0ec76ce22ddeb6b5
|
4
|
+
data.tar.gz: 21db12cad27d213e3fba7ff1ee192ed22769f873493bb66e3faf90440e12f5f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba87d6067fa4e5a5407e88358a082c19054d0c01a9e8b511f7d6106fa8ab3588395eda8b1f42353fa0faab2990003a97e7f026c61404b9255df524ea9e5cc745
|
7
|
+
data.tar.gz: 01d7b136401980959094793740ab9ea04cf868e24245ceaa7e35bcfc3de7de66f927cd3680372db5ad30234a44e28c1601a2437cadf22a6102bcf5618b64d93d
|
data/.rubocop.yml
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
- rubocop-capybara
|
4
|
-
- rubocop-rspec
|
2
|
+
plugins:
|
5
3
|
- rubocop-rails
|
6
4
|
- rubocop-rake
|
5
|
+
- rubocop-rspec
|
6
|
+
- rubocop-capybara
|
7
7
|
|
8
8
|
AllCops:
|
9
9
|
NewCops: enable
|
10
|
-
TargetRubyVersion: 3.
|
10
|
+
TargetRubyVersion: 3.2
|
11
11
|
Exclude:
|
12
12
|
- "bin/**/*"
|
13
13
|
- "tmp/**/*"
|
@@ -119,6 +119,9 @@ Layout/LineLength:
|
|
119
119
|
- "context .* do$"
|
120
120
|
- "scenario .* do$"
|
121
121
|
|
122
|
+
Lint/UselessConstantScoping:
|
123
|
+
Enabled: false
|
124
|
+
|
122
125
|
Metrics/ClassLength:
|
123
126
|
Enabled: false
|
124
127
|
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.
|
1
|
+
3.4.1
|
data/CHANGELOG.md
CHANGED
@@ -7,18 +7,40 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
7
7
|
|
8
8
|
## [Unreleased]
|
9
9
|
|
10
|
+
## [2.3.0] - 2025-04-17
|
11
|
+
|
12
|
+
### Added
|
13
|
+
|
14
|
+
- Added the ability have muttons instead of links for the header links.
|
15
|
+
This is because we need to send a delete request when signing out and this was previously done by Rails UJS which was removed in Rails 7.2
|
16
|
+
- Updated CCS Frontend to v1.4.0
|
17
|
+
|
18
|
+
### Changed
|
19
|
+
|
20
|
+
- Change from using Yarn to using Bun to manage the NodeJS packages (Internal only)
|
21
|
+
- Make Rails 7.2 the minimum required version for this Gem
|
22
|
+
|
23
|
+
## [2.2.0] - 2025-03-21
|
24
|
+
|
25
|
+
### Added
|
26
|
+
|
27
|
+
- Add support for to ruby v3.4
|
28
|
+
- Updated GOV.UK Frontend to v5.9.0
|
29
|
+
- Updated CCS Frontend to v1.3.3
|
30
|
+
|
10
31
|
## [2.1.0] - 2025-01-08
|
11
32
|
|
12
33
|
### Changed
|
13
34
|
|
14
35
|
- Updated CCS Frontend to v1.3.2 (update to the CCS logo)
|
36
|
+
- Updated minimum Ruby version to v3.2
|
15
37
|
|
16
38
|
## [2.0.0] - 2024-11-05
|
17
39
|
|
18
40
|
### Changed
|
19
41
|
|
20
42
|
- Update minimum required Rails version to v7.0
|
21
|
-
- Updated minimum Ruby version to
|
43
|
+
- Updated minimum Ruby version to v3.1
|
22
44
|
|
23
45
|
### Added
|
24
46
|
|
data/Gemfile
CHANGED
@@ -16,11 +16,11 @@ gem 'simplecov', '~> 0.21'
|
|
16
16
|
gem 'nokogiri-diff', '~> 0.3.0'
|
17
17
|
|
18
18
|
# Gems for linting/formatting the package
|
19
|
-
gem 'rubocop', '~> 1.
|
20
|
-
gem 'rubocop-capybara', '~> 2.
|
21
|
-
gem 'rubocop-rails', '~> 2.
|
22
|
-
gem 'rubocop-rake', '~> 0.
|
23
|
-
gem 'rubocop-rspec', '~> 3.
|
19
|
+
gem 'rubocop', '~> 1.75'
|
20
|
+
gem 'rubocop-capybara', '~> 2.22'
|
21
|
+
gem 'rubocop-rails', '~> 2.31'
|
22
|
+
gem 'rubocop-rake', '~> 0.7'
|
23
|
+
gem 'rubocop-rspec', '~> 3.5'
|
24
24
|
|
25
25
|
# Gems for documenting the package
|
26
26
|
gem 'yard', '~> 0.9'
|
data/Gemfile.lock
CHANGED
@@ -1,90 +1,88 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ccs-frontend_helpers (2.
|
5
|
-
rails (>= 7.
|
4
|
+
ccs-frontend_helpers (2.3.0)
|
5
|
+
rails (>= 7.2)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
actioncable (
|
11
|
-
actionpack (=
|
12
|
-
activesupport (=
|
10
|
+
actioncable (8.0.2)
|
11
|
+
actionpack (= 8.0.2)
|
12
|
+
activesupport (= 8.0.2)
|
13
13
|
nio4r (~> 2.0)
|
14
14
|
websocket-driver (>= 0.6.1)
|
15
15
|
zeitwerk (~> 2.6)
|
16
|
-
actionmailbox (
|
17
|
-
actionpack (=
|
18
|
-
activejob (=
|
19
|
-
activerecord (=
|
20
|
-
activestorage (=
|
21
|
-
activesupport (=
|
22
|
-
mail (>= 2.
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
activejob (= 7.1.4.2)
|
30
|
-
activesupport (= 7.1.4.2)
|
31
|
-
mail (~> 2.5, >= 2.5.4)
|
32
|
-
net-imap
|
33
|
-
net-pop
|
34
|
-
net-smtp
|
16
|
+
actionmailbox (8.0.2)
|
17
|
+
actionpack (= 8.0.2)
|
18
|
+
activejob (= 8.0.2)
|
19
|
+
activerecord (= 8.0.2)
|
20
|
+
activestorage (= 8.0.2)
|
21
|
+
activesupport (= 8.0.2)
|
22
|
+
mail (>= 2.8.0)
|
23
|
+
actionmailer (8.0.2)
|
24
|
+
actionpack (= 8.0.2)
|
25
|
+
actionview (= 8.0.2)
|
26
|
+
activejob (= 8.0.2)
|
27
|
+
activesupport (= 8.0.2)
|
28
|
+
mail (>= 2.8.0)
|
35
29
|
rails-dom-testing (~> 2.2)
|
36
|
-
actionpack (
|
37
|
-
actionview (=
|
38
|
-
activesupport (=
|
30
|
+
actionpack (8.0.2)
|
31
|
+
actionview (= 8.0.2)
|
32
|
+
activesupport (= 8.0.2)
|
39
33
|
nokogiri (>= 1.8.5)
|
40
|
-
racc
|
41
34
|
rack (>= 2.2.4)
|
42
35
|
rack-session (>= 1.0.1)
|
43
36
|
rack-test (>= 0.6.3)
|
44
37
|
rails-dom-testing (~> 2.2)
|
45
38
|
rails-html-sanitizer (~> 1.6)
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
39
|
+
useragent (~> 0.16)
|
40
|
+
actiontext (8.0.2)
|
41
|
+
actionpack (= 8.0.2)
|
42
|
+
activerecord (= 8.0.2)
|
43
|
+
activestorage (= 8.0.2)
|
44
|
+
activesupport (= 8.0.2)
|
51
45
|
globalid (>= 0.6.0)
|
52
46
|
nokogiri (>= 1.8.5)
|
53
|
-
actionview (
|
54
|
-
activesupport (=
|
47
|
+
actionview (8.0.2)
|
48
|
+
activesupport (= 8.0.2)
|
55
49
|
builder (~> 3.1)
|
56
50
|
erubi (~> 1.11)
|
57
51
|
rails-dom-testing (~> 2.2)
|
58
52
|
rails-html-sanitizer (~> 1.6)
|
59
|
-
activejob (
|
60
|
-
activesupport (=
|
53
|
+
activejob (8.0.2)
|
54
|
+
activesupport (= 8.0.2)
|
61
55
|
globalid (>= 0.3.6)
|
62
|
-
activemodel (
|
63
|
-
activesupport (=
|
64
|
-
activerecord (
|
65
|
-
activemodel (=
|
66
|
-
activesupport (=
|
56
|
+
activemodel (8.0.2)
|
57
|
+
activesupport (= 8.0.2)
|
58
|
+
activerecord (8.0.2)
|
59
|
+
activemodel (= 8.0.2)
|
60
|
+
activesupport (= 8.0.2)
|
67
61
|
timeout (>= 0.4.0)
|
68
|
-
activestorage (
|
69
|
-
actionpack (=
|
70
|
-
activejob (=
|
71
|
-
activerecord (=
|
72
|
-
activesupport (=
|
62
|
+
activestorage (8.0.2)
|
63
|
+
actionpack (= 8.0.2)
|
64
|
+
activejob (= 8.0.2)
|
65
|
+
activerecord (= 8.0.2)
|
66
|
+
activesupport (= 8.0.2)
|
73
67
|
marcel (~> 1.0)
|
74
|
-
activesupport (
|
68
|
+
activesupport (8.0.2)
|
75
69
|
base64
|
70
|
+
benchmark (>= 0.3)
|
76
71
|
bigdecimal
|
77
|
-
concurrent-ruby (~> 1.0, >= 1.
|
72
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
78
73
|
connection_pool (>= 2.2.5)
|
79
74
|
drb
|
80
75
|
i18n (>= 1.6, < 2)
|
76
|
+
logger (>= 1.4.2)
|
81
77
|
minitest (>= 5.1)
|
82
|
-
|
83
|
-
tzinfo (~> 2.0)
|
78
|
+
securerandom (>= 0.3)
|
79
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
80
|
+
uri (>= 0.13.1)
|
84
81
|
addressable (2.8.6)
|
85
82
|
public_suffix (>= 2.0.2, < 6.0)
|
86
|
-
ast (2.4.
|
83
|
+
ast (2.4.3)
|
87
84
|
base64 (0.2.0)
|
85
|
+
benchmark (0.4.0)
|
88
86
|
bigdecimal (3.1.9)
|
89
87
|
builder (3.3.0)
|
90
88
|
capybara (3.40.0)
|
@@ -96,8 +94,8 @@ GEM
|
|
96
94
|
rack-test (>= 0.6.3)
|
97
95
|
regexp_parser (>= 1.5, < 3.0)
|
98
96
|
xpath (~> 3.2)
|
99
|
-
concurrent-ruby (1.3.
|
100
|
-
connection_pool (2.
|
97
|
+
concurrent-ruby (1.3.5)
|
98
|
+
connection_pool (2.5.0)
|
101
99
|
crass (1.0.6)
|
102
100
|
date (3.3.4)
|
103
101
|
diff-lcs (1.5.1)
|
@@ -106,14 +104,16 @@ GEM
|
|
106
104
|
erubi (1.13.0)
|
107
105
|
globalid (1.2.1)
|
108
106
|
activesupport (>= 6.1)
|
109
|
-
i18n (1.14.
|
107
|
+
i18n (1.14.7)
|
110
108
|
concurrent-ruby (~> 1.0)
|
111
109
|
io-console (0.7.2)
|
112
110
|
irb (1.14.0)
|
113
111
|
rdoc (>= 4.0.0)
|
114
112
|
reline (>= 0.4.2)
|
115
|
-
json (2.
|
116
|
-
language_server-protocol (3.17.0.
|
113
|
+
json (2.10.2)
|
114
|
+
language_server-protocol (3.17.0.4)
|
115
|
+
lint_roller (1.1.0)
|
116
|
+
logger (1.7.0)
|
117
117
|
loofah (2.22.0)
|
118
118
|
crass (~> 1.0.2)
|
119
119
|
nokogiri (>= 1.12.0)
|
@@ -125,8 +125,7 @@ GEM
|
|
125
125
|
marcel (1.0.4)
|
126
126
|
matrix (0.4.2)
|
127
127
|
mini_mime (1.1.5)
|
128
|
-
minitest (5.25.
|
129
|
-
mutex_m (0.3.0)
|
128
|
+
minitest (5.25.5)
|
130
129
|
net-imap (0.4.15)
|
131
130
|
date
|
132
131
|
net-protocol
|
@@ -137,22 +136,23 @@ GEM
|
|
137
136
|
net-smtp (0.5.0)
|
138
137
|
net-protocol
|
139
138
|
nio4r (2.7.3)
|
140
|
-
nokogiri (1.
|
139
|
+
nokogiri (1.18.1-x86_64-darwin)
|
141
140
|
racc (~> 1.4)
|
142
|
-
nokogiri (1.
|
141
|
+
nokogiri (1.18.1-x86_64-linux-gnu)
|
143
142
|
racc (~> 1.4)
|
144
143
|
nokogiri-diff (0.3.0)
|
145
144
|
nokogiri (~> 1.5)
|
146
145
|
tdiff (~> 0.4)
|
147
146
|
parallel (1.26.3)
|
148
|
-
parser (3.3.
|
147
|
+
parser (3.3.7.4)
|
149
148
|
ast (~> 2.4.1)
|
150
149
|
racc
|
150
|
+
prism (1.4.0)
|
151
151
|
psych (5.1.2)
|
152
152
|
stringio
|
153
153
|
public_suffix (5.0.4)
|
154
154
|
racc (1.8.1)
|
155
|
-
rack (3.1.
|
155
|
+
rack (3.1.12)
|
156
156
|
rack-session (2.0.0)
|
157
157
|
rack (>= 3.0.0)
|
158
158
|
rack-test (2.1.0)
|
@@ -160,20 +160,20 @@ GEM
|
|
160
160
|
rackup (2.1.0)
|
161
161
|
rack (>= 3)
|
162
162
|
webrick (~> 1.8)
|
163
|
-
rails (
|
164
|
-
actioncable (=
|
165
|
-
actionmailbox (=
|
166
|
-
actionmailer (=
|
167
|
-
actionpack (=
|
168
|
-
actiontext (=
|
169
|
-
actionview (=
|
170
|
-
activejob (=
|
171
|
-
activemodel (=
|
172
|
-
activerecord (=
|
173
|
-
activestorage (=
|
174
|
-
activesupport (=
|
163
|
+
rails (8.0.2)
|
164
|
+
actioncable (= 8.0.2)
|
165
|
+
actionmailbox (= 8.0.2)
|
166
|
+
actionmailer (= 8.0.2)
|
167
|
+
actionpack (= 8.0.2)
|
168
|
+
actiontext (= 8.0.2)
|
169
|
+
actionview (= 8.0.2)
|
170
|
+
activejob (= 8.0.2)
|
171
|
+
activemodel (= 8.0.2)
|
172
|
+
activerecord (= 8.0.2)
|
173
|
+
activestorage (= 8.0.2)
|
174
|
+
activesupport (= 8.0.2)
|
175
175
|
bundler (>= 1.15.0)
|
176
|
-
railties (=
|
176
|
+
railties (= 8.0.2)
|
177
177
|
rails-dom-testing (2.2.0)
|
178
178
|
activesupport (>= 5.0.0)
|
179
179
|
minitest
|
@@ -181,10 +181,10 @@ GEM
|
|
181
181
|
rails-html-sanitizer (1.6.0)
|
182
182
|
loofah (~> 2.21)
|
183
183
|
nokogiri (~> 1.14)
|
184
|
-
railties (
|
185
|
-
actionpack (=
|
186
|
-
activesupport (=
|
187
|
-
irb
|
184
|
+
railties (8.0.2)
|
185
|
+
actionpack (= 8.0.2)
|
186
|
+
activesupport (= 8.0.2)
|
187
|
+
irb (~> 1.13)
|
188
188
|
rackup (>= 1.0.0)
|
189
189
|
rake (>= 12.2)
|
190
190
|
thor (~> 1.0, >= 1.2.2)
|
@@ -209,30 +209,37 @@ GEM
|
|
209
209
|
diff-lcs (>= 1.2.0, < 2.0)
|
210
210
|
rspec-support (~> 3.13.0)
|
211
211
|
rspec-support (3.13.1)
|
212
|
-
rubocop (1.
|
212
|
+
rubocop (1.75.2)
|
213
213
|
json (~> 2.3)
|
214
|
-
language_server-protocol (
|
214
|
+
language_server-protocol (~> 3.17.0.2)
|
215
|
+
lint_roller (~> 1.1.0)
|
215
216
|
parallel (~> 1.10)
|
216
217
|
parser (>= 3.3.0.2)
|
217
218
|
rainbow (>= 2.2.2, < 4.0)
|
218
219
|
regexp_parser (>= 2.9.3, < 3.0)
|
219
|
-
rubocop-ast (>= 1.
|
220
|
+
rubocop-ast (>= 1.44.0, < 2.0)
|
220
221
|
ruby-progressbar (~> 1.7)
|
221
222
|
unicode-display_width (>= 2.4.0, < 4.0)
|
222
|
-
rubocop-ast (1.
|
223
|
-
parser (>= 3.3.
|
224
|
-
|
225
|
-
|
226
|
-
|
223
|
+
rubocop-ast (1.44.0)
|
224
|
+
parser (>= 3.3.7.2)
|
225
|
+
prism (~> 1.4)
|
226
|
+
rubocop-capybara (2.22.1)
|
227
|
+
lint_roller (~> 1.1)
|
228
|
+
rubocop (~> 1.72, >= 1.72.1)
|
229
|
+
rubocop-rails (2.31.0)
|
227
230
|
activesupport (>= 4.2.0)
|
231
|
+
lint_roller (~> 1.1)
|
228
232
|
rack (>= 1.1)
|
229
|
-
rubocop (>= 1.
|
230
|
-
rubocop-ast (>= 1.
|
231
|
-
rubocop-rake (0.
|
232
|
-
|
233
|
-
|
234
|
-
|
233
|
+
rubocop (>= 1.75.0, < 2.0)
|
234
|
+
rubocop-ast (>= 1.38.0, < 2.0)
|
235
|
+
rubocop-rake (0.7.1)
|
236
|
+
lint_roller (~> 1.1)
|
237
|
+
rubocop (>= 1.72.1)
|
238
|
+
rubocop-rspec (3.5.0)
|
239
|
+
lint_roller (~> 1.1)
|
240
|
+
rubocop (~> 1.72, >= 1.72.1)
|
235
241
|
ruby-progressbar (1.13.0)
|
242
|
+
securerandom (0.4.1)
|
236
243
|
simplecov (0.22.0)
|
237
244
|
docile (~> 1.1)
|
238
245
|
simplecov-html (~> 0.11)
|
@@ -245,9 +252,11 @@ GEM
|
|
245
252
|
timeout (0.4.1)
|
246
253
|
tzinfo (2.0.6)
|
247
254
|
concurrent-ruby (~> 1.0)
|
248
|
-
unicode-display_width (3.1.
|
255
|
+
unicode-display_width (3.1.4)
|
249
256
|
unicode-emoji (~> 4.0, >= 4.0.4)
|
250
257
|
unicode-emoji (4.0.4)
|
258
|
+
uri (1.0.3)
|
259
|
+
useragent (0.16.11)
|
251
260
|
webrick (1.8.1)
|
252
261
|
websocket-driver (0.7.6)
|
253
262
|
websocket-extensions (>= 0.1.0)
|
@@ -271,11 +280,11 @@ DEPENDENCIES
|
|
271
280
|
nokogiri-diff (~> 0.3.0)
|
272
281
|
rake (~> 13.2)
|
273
282
|
rspec (~> 3.13)
|
274
|
-
rubocop (~> 1.
|
275
|
-
rubocop-capybara (~> 2.
|
276
|
-
rubocop-rails (~> 2.
|
277
|
-
rubocop-rake (~> 0.
|
278
|
-
rubocop-rspec (~> 3.
|
283
|
+
rubocop (~> 1.75)
|
284
|
+
rubocop-capybara (~> 2.22)
|
285
|
+
rubocop-rails (~> 2.31)
|
286
|
+
rubocop-rake (~> 0.7)
|
287
|
+
rubocop-rspec (~> 3.5)
|
279
288
|
simplecov (~> 0.21)
|
280
289
|
yard (~> 0.9)
|
281
290
|
|
data/README.md
CHANGED
@@ -14,6 +14,8 @@ The following table shows the version of CCS Frontend Helpers that you should us
|
|
14
14
|
|
15
15
|
| CCS Frontend Helpers Version | Target GOV.UK Frontend Version | Target CCS Frontend Version |
|
16
16
|
| ----------------------------- | ------------------------------ | --------------------------- |
|
17
|
+
| [2.3.0](https://github.com/Crown-Commercial-Service/ccs-frontend_helpers/releases/tag/v2.3.0) | [5.9.0](https://github.com/alphagov/govuk-frontend/releases/tag/v5.9.0) | [1.4.0](https://github.com/Crown-Commercial-Service/ccs-frontend-project/releases/tag/v1.4.0) |
|
18
|
+
| [2.2.0](https://github.com/Crown-Commercial-Service/ccs-frontend_helpers/releases/tag/v2.2.0) | [5.9.0](https://github.com/alphagov/govuk-frontend/releases/tag/v5.9.0) | [1.3.3](https://github.com/Crown-Commercial-Service/ccs-frontend-project/releases/tag/v1.3.3) |
|
17
19
|
| [2.1.0](https://github.com/Crown-Commercial-Service/ccs-frontend_helpers/releases/tag/v2.1.0) | [5.7.1](https://github.com/alphagov/govuk-frontend/releases/tag/v5.7.1) | [1.3.2](https://github.com/Crown-Commercial-Service/ccs-frontend-project/releases/tag/v1.3.2) |
|
18
20
|
| [2.0.0](https://github.com/Crown-Commercial-Service/ccs-frontend_helpers/releases/tag/v2.0.0) | [5.7.1](https://github.com/alphagov/govuk-frontend/releases/tag/v5.7.1) | [1.2.0](https://github.com/Crown-Commercial-Service/ccs-frontend-project/releases/tag/v1.2.0) |
|
19
21
|
| [1.2.0](https://github.com/Crown-Commercial-Service/ccs-frontend_helpers/releases/tag/v1.2.0) | [5.6.0](https://github.com/alphagov/govuk-frontend/releases/tag/v5.6.0) | [1.1.3](https://github.com/Crown-Commercial-Service/ccs-frontend-project/releases/tag/v1.1.3) |
|
data/bun.lock
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
{
|
2
|
+
"lockfileVersion": 0,
|
3
|
+
"workspaces": {
|
4
|
+
"": {
|
5
|
+
"devDependencies": {
|
6
|
+
"ccs-frontend": "^1.4.0",
|
7
|
+
"govuk-frontend": "^5.9.0",
|
8
|
+
},
|
9
|
+
},
|
10
|
+
},
|
11
|
+
"packages": {
|
12
|
+
"ccs-frontend": ["ccs-frontend@1.4.0", "", { "peerDependencies": { "govuk-frontend": "^5.9.0", "jquery": "^3.x" } }, "sha512-GX0wln6Tojcl7ZeLMPuq0uDh3jST2cV95HKLoOOYMsk783aCJXCaD9NANPHJClKGViuovw0piTIhPuM89nozBw=="],
|
13
|
+
|
14
|
+
"govuk-frontend": ["govuk-frontend@5.9.0", "", {}, "sha512-8NzmyoDtRFYyHs413DfNPR8Zo6qw6Q02Mruxml/Yfy+EueaOI/JZ4gVM8d0pqzJmTiMcJuHhvxqYEgBRmqeoyA=="],
|
15
|
+
|
16
|
+
"jquery": ["jquery@3.7.1", "", {}, "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg=="],
|
17
|
+
}
|
18
|
+
}
|
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
|
|
11
11
|
spec.description = 'Gem containing view helpers for CCS Ruby on Rails projects'
|
12
12
|
spec.homepage = 'https://github.com/Crown-Commercial-Service/ccs-frontend_helpers'
|
13
13
|
spec.license = 'MIT'
|
14
|
-
spec.required_ruby_version = '>= 3.
|
14
|
+
spec.required_ruby_version = '>= 3.2.0'
|
15
15
|
|
16
16
|
# spec.metadata["allowed_push_host"] = "TODO: Set to your gem server 'https://example.com'"
|
17
17
|
|
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
31
31
|
spec.require_paths = ['lib']
|
32
32
|
|
33
|
-
spec.add_dependency 'rails', '>= 7.
|
33
|
+
spec.add_dependency 'rails', '>= 7.2'
|
34
34
|
|
35
35
|
spec.metadata['rubygems_mfa_required'] = 'true'
|
36
36
|
end
|
@@ -32,8 +32,8 @@ module CCS
|
|
32
32
|
# @option options [String] :classes additional CSS classes for the contact us HTML
|
33
33
|
# @option options [Hash] :attributes additional attributes that will added as part of the contact us HTML
|
34
34
|
|
35
|
-
def initialize(contact_us_link_href:, having_problems_text: nil, contact_us_link_text: nil, contact_us_text: nil, **
|
36
|
-
super(**
|
35
|
+
def initialize(contact_us_link_href:, having_problems_text: nil, contact_us_link_text: nil, contact_us_text: nil, **)
|
36
|
+
super(**)
|
37
37
|
|
38
38
|
@contact_us_link_href = contact_us_link_href
|
39
39
|
@contact_us_link_text = contact_us_link_text || 'Contact us (opens in a new tab)'
|
@@ -30,8 +30,8 @@ module CCS
|
|
30
30
|
# @option options [String] :width (default: 'one-third') the width of the panel
|
31
31
|
# @option options [Hash] :attributes any additional attributes that will added as part of the HTML.
|
32
32
|
|
33
|
-
def initialize(title:, href:, description:, **
|
34
|
-
super(**
|
33
|
+
def initialize(title:, href:, description:, **)
|
34
|
+
super(**)
|
35
35
|
|
36
36
|
@options[:attributes][:class] << " govuk-grid-column-#{@options[:width] || 'one-third'}"
|
37
37
|
|
@@ -29,8 +29,8 @@ module CCS
|
|
29
29
|
# @option options [String] :width (default: 'full') the width of the dashboard section
|
30
30
|
# @option options [Hash] :attributes any additional attributes that will added as part of the HTML
|
31
31
|
|
32
|
-
def initialize(dashboard_section_panels:, title_text: nil, **
|
33
|
-
super(**
|
32
|
+
def initialize(dashboard_section_panels:, title_text: nil, **)
|
33
|
+
super(**)
|
34
34
|
|
35
35
|
@options[:width] ||= 'full'
|
36
36
|
|
@@ -29,8 +29,8 @@ module CCS
|
|
29
29
|
#
|
30
30
|
# @option options [Hash] :attributes any additional attributes that will added as part of the HTML
|
31
31
|
|
32
|
-
def initialize(text:, href:, li_class:, **
|
33
|
-
super(**
|
32
|
+
def initialize(text:, href:, li_class:, **)
|
33
|
+
super(**)
|
34
34
|
|
35
35
|
@text = text
|
36
36
|
@href = href
|
@@ -36,8 +36,8 @@ module CCS
|
|
36
36
|
# @option options [ActiveSupport::SafeBuffer,String] :copyright The copyright information, (default: '© Crown copyright')
|
37
37
|
# @option options [Hash] :attributes additional attributes that will added as part of the HTML
|
38
38
|
|
39
|
-
def initialize(navigation: nil, meta: nil, **
|
40
|
-
super(**
|
39
|
+
def initialize(navigation: nil, meta: nil, **)
|
40
|
+
super(**)
|
41
41
|
|
42
42
|
@options[:copyright] ||= '© Crown copyright'
|
43
43
|
|
@@ -14,30 +14,38 @@ module CCS
|
|
14
14
|
# @return [String] The class for the li elements
|
15
15
|
# @!attribute [r] href
|
16
16
|
# @return [String] The href for the header link
|
17
|
+
# @!attribute [r] method
|
18
|
+
# @return [String] The method for the header request which will make it a button
|
17
19
|
|
18
20
|
class Link < Base
|
21
|
+
include ActionView::Helpers::UrlHelper
|
22
|
+
|
19
23
|
private
|
20
24
|
|
21
|
-
attr_reader :text, :li_class, :href
|
25
|
+
attr_reader :text, :li_class, :href, :method
|
22
26
|
|
23
27
|
public
|
24
28
|
|
25
29
|
# @param text [String] the text for the header link
|
26
30
|
# @param li_class [String] class for the li elements
|
27
31
|
# @param href [String] the href for the header link
|
32
|
+
# @param method [String] the method for the header request which will make it a button
|
28
33
|
# @param options [Hash] options that will be used in customising the HTML
|
29
34
|
#
|
30
35
|
# @option options [Boolean] :active flag to mark the navigation item as active or not
|
31
36
|
# @option options [Hash] :attributes any additional attributes that will added as part of the HTML
|
32
37
|
|
33
|
-
def initialize(text:, li_class:, href: nil, **
|
34
|
-
super(**
|
38
|
+
def initialize(text:, li_class:, href: nil, method: nil, **)
|
39
|
+
super(**)
|
35
40
|
|
36
41
|
@text = text
|
37
42
|
@href = href
|
38
43
|
@li_class = li_class
|
44
|
+
@method = method
|
39
45
|
end
|
40
46
|
|
47
|
+
# rubocop:disable Metrics/AbcSize
|
48
|
+
|
41
49
|
# Generates the HTML for the CCS Header link
|
42
50
|
#
|
43
51
|
# @return [ActiveSupport::SafeBuffer]
|
@@ -45,14 +53,24 @@ module CCS
|
|
45
53
|
def render
|
46
54
|
tag.li(class: "#{li_class} #{'ccs-header__navigation-item--active' if options[:active]}".rstrip) do
|
47
55
|
if href
|
48
|
-
|
56
|
+
if method
|
57
|
+
options[:attributes][:class] = 'ccs-header__button_as_link'
|
49
58
|
|
50
|
-
|
59
|
+
button_to(href, method: method, **options[:attributes]) do
|
60
|
+
text
|
61
|
+
end
|
62
|
+
else
|
63
|
+
options[:attributes][:class] = 'ccs-header__link'
|
64
|
+
|
65
|
+
link_to(text, href, **options[:attributes])
|
66
|
+
end
|
51
67
|
else
|
52
68
|
text
|
53
69
|
end
|
54
70
|
end
|
55
71
|
end
|
72
|
+
|
73
|
+
# rubocop:enable Metrics/AbcSize
|
56
74
|
end
|
57
75
|
end
|
58
76
|
end
|
@@ -44,8 +44,8 @@ module CCS
|
|
44
44
|
# @option options [String] :homepage_url URL of the homepage. Defaults to +/https://www.crowncommercial.gov.uk+
|
45
45
|
# @option options [Hash] :attributes additional attributes that will added as part of the header HTML
|
46
46
|
|
47
|
-
def initialize(service_authentication_items: nil, navigation: nil, menu_button: nil, service: nil, **
|
48
|
-
super(**
|
47
|
+
def initialize(service_authentication_items: nil, navigation: nil, menu_button: nil, service: nil, **)
|
48
|
+
super(**)
|
49
49
|
|
50
50
|
@options[:container_classes] ||= 'govuk-width-container'
|
51
51
|
@options[:homepage_url] ||= 'https://www.crowncommercial.gov.uk'
|
@@ -26,8 +26,8 @@ module CCS
|
|
26
26
|
# @option options [String] :classes additional CSS classes for the password strength HTML
|
27
27
|
# @option options [Hash] :attributes any additional attributes that will added as part of the HTML
|
28
28
|
|
29
|
-
def initialize(password_id:, password_strength_tests:, **
|
30
|
-
super(**
|
29
|
+
def initialize(password_id:, password_strength_tests:, **)
|
30
|
+
super(**)
|
31
31
|
|
32
32
|
@options[:attributes][:data][:target] = password_id
|
33
33
|
|
@@ -27,8 +27,8 @@ module CCS
|
|
27
27
|
# @option options [String] :classes additional CSS classes for the back link HTML
|
28
28
|
# @option options [Hash] :attributes ({}) any additional attributes that will added as part of the HTML
|
29
29
|
|
30
|
-
def initialize(text:, href:, **
|
31
|
-
super(**
|
30
|
+
def initialize(text:, href:, **)
|
31
|
+
super(**)
|
32
32
|
|
33
33
|
@text = text
|
34
34
|
@href = href
|