dsfr-view-components 5.0.0 → 5.0.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/lib/dsfr/components/engine.rb +0 -99
- data/lib/dsfr/components/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5095d1305a3f94fe5a01ee178af11833e291ad6ec0119b59e94b9170ee0acb0b
|
|
4
|
+
data.tar.gz: acf69b43c9330f356754a8592772287b5b2bdeb0db174cba46f5e2a35f780144
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 773981869125a91a17f51f3bcef476a59777e328157d0142ebff7ec0d54e4029a5922b5e987032ec34be0dce70bc54b5418bbb3ddb31ffeb72bc4c41e2e5b970
|
|
7
|
+
data.tar.gz: 1df1573b2231bb50d66c58e3e04adf1d4ba3f51ed21792810f0018e159d72ffd6a2fb5f1cea6c9beaebb20eb40ef07e8ecbd943aed2e568840457c21c76f982d
|
|
@@ -1,106 +1,7 @@
|
|
|
1
1
|
require "rails/engine"
|
|
2
|
-
require "active_support/configurable"
|
|
3
2
|
|
|
4
3
|
module Dsfr
|
|
5
4
|
module Components
|
|
6
|
-
include ActiveSupport::Configurable
|
|
7
|
-
|
|
8
|
-
class << self
|
|
9
|
-
# Configure the form builder in the usual manner. All of the
|
|
10
|
-
# keys in {DEFAULTS} can be configured as per the example below
|
|
11
|
-
#
|
|
12
|
-
# @example
|
|
13
|
-
# Dsfr::Components.configure do |conf|
|
|
14
|
-
# conf.do_some_things = 'yes'
|
|
15
|
-
# end
|
|
16
|
-
def configure
|
|
17
|
-
yield(config)
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
# Resets each of the configurable values to its default
|
|
21
|
-
#
|
|
22
|
-
# @note This method is only really intended for use to clean up
|
|
23
|
-
# during testing
|
|
24
|
-
def reset!
|
|
25
|
-
configure do |c|
|
|
26
|
-
DEFAULTS.each { |k, v| c.send("#{k}=", v) }
|
|
27
|
-
end
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
# @!group Defaults
|
|
32
|
-
#
|
|
33
|
-
# Default components configuration
|
|
34
|
-
#
|
|
35
|
-
# +:default_back_link_text+ Default text for the back link, defaults to +Back+
|
|
36
|
-
# +:default_breadcrumbs_collapse_on_mobile+ false
|
|
37
|
-
# +:default_breadcrumbs_hide_in_print+ false
|
|
38
|
-
# +:default_cookie_banner_aria_label+ "Cookie banner"
|
|
39
|
-
# +:default_cookie_banner_hide_in_print+ true
|
|
40
|
-
# +:default_header_navigation_label+ 'Navigation menu'
|
|
41
|
-
# +:default_header_menu_button_label+ 'Show or hide navigation menu'
|
|
42
|
-
# +:default_header_logotype+ 'GOV.UK'
|
|
43
|
-
# +:default_header_homepage_url+ '/'
|
|
44
|
-
# +:default_header_service_name+ nil
|
|
45
|
-
# +:default_header_service_url+ '/'
|
|
46
|
-
# +:default_footer_meta_text+ nil
|
|
47
|
-
# +:default_footer_copyright_text+ '© Crown copyright'
|
|
48
|
-
# +:default_footer_copyright_url+ "https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/"
|
|
49
|
-
# +:default_pagination_landmark_label+ "results"
|
|
50
|
-
# +:default_pagination_next_text+ Default 'next' text for pagination. An +Array+ where the first item is visible and the second visually hidden. Defaults to ["Next", "page"]
|
|
51
|
-
# +:default_pagination_previous_text+ Default 'previous' text for pagination. An +Array+ where the first item is visible and the second visually hidden. Defaults to ["Previous", "page"]
|
|
52
|
-
# +:default_phase_banner_tag+ nil
|
|
53
|
-
# +:default_phase_banner_text+ nil
|
|
54
|
-
# +:default_section_break_visible+ false
|
|
55
|
-
# +:default_section_break_size+ Size of the section break, possible values: +m+, +l+ and +xl+. Defaults to nil.
|
|
56
|
-
# +:default_tag_colour+ the default colour for tags, possible values: +grey+, +green+, +turquoise+, +blue+, +red+, +purple+, +pink+, +orange+, +yellow+. Defaults to +nil+
|
|
57
|
-
# +:default_start_button_as_button+ false
|
|
58
|
-
# +:default_summary_list_borders+ true
|
|
59
|
-
# +:default_notification_banner_title_id+ "govuk-notification-banner-title"
|
|
60
|
-
# +:default_notification_disable_auto_focus+ nil
|
|
61
|
-
# +:default_notification_title_heading_level+ 2
|
|
62
|
-
# +:default_notification_title_success+ false
|
|
63
|
-
# +:default_warning_text_icon_fallback_text+ "Warning"
|
|
64
|
-
# +:default_warning_text_icon+ "!"
|
|
65
|
-
#
|
|
66
|
-
# +:require_summary_list_action_visually_hidden_text+ when true forces visually hidden text to be set for every action. It can still be explicitly skipped by passing in +nil+. Defaults to +false+
|
|
67
|
-
DEFAULTS = {
|
|
68
|
-
default_back_link_text: 'Back',
|
|
69
|
-
default_breadcrumbs_collapse_on_mobile: false,
|
|
70
|
-
default_breadcrumbs_hide_in_print: false,
|
|
71
|
-
default_cookie_banner_aria_label: "Cookie banner",
|
|
72
|
-
default_cookie_banner_hide_in_print: true,
|
|
73
|
-
default_header_navigation_label: 'Navigation menu',
|
|
74
|
-
default_header_menu_button_label: 'Show or hide navigation menu',
|
|
75
|
-
default_header_logotype: 'GOV.UK',
|
|
76
|
-
default_header_homepage_url: '/',
|
|
77
|
-
default_header_service_name: nil,
|
|
78
|
-
default_header_service_url: '/',
|
|
79
|
-
default_footer_meta_text: nil,
|
|
80
|
-
default_footer_copyright_text: '© Crown copyright',
|
|
81
|
-
default_footer_copyright_url: "https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/",
|
|
82
|
-
default_pagination_landmark_label: "results",
|
|
83
|
-
default_pagination_next_text: %w(Next page),
|
|
84
|
-
default_pagination_previous_text: %w(Previous page),
|
|
85
|
-
default_phase_banner_tag: nil,
|
|
86
|
-
default_phase_banner_text: nil,
|
|
87
|
-
default_section_break_visible: false,
|
|
88
|
-
default_section_break_size: nil,
|
|
89
|
-
default_tag_colour: nil,
|
|
90
|
-
default_start_button_as_button: false,
|
|
91
|
-
default_summary_list_borders: true,
|
|
92
|
-
default_notification_banner_title_id: "govuk-notification-banner-title",
|
|
93
|
-
default_notification_disable_auto_focus: nil,
|
|
94
|
-
default_notification_title_heading_level: 2,
|
|
95
|
-
default_notification_title_success: false,
|
|
96
|
-
default_warning_text_icon_fallback_text: "Warning",
|
|
97
|
-
default_warning_text_icon: "!",
|
|
98
|
-
|
|
99
|
-
require_summary_list_action_visually_hidden_text: false,
|
|
100
|
-
}.freeze
|
|
101
|
-
|
|
102
|
-
DEFAULTS.each_key { |k| config_accessor(k) { DEFAULTS[k] } }
|
|
103
|
-
|
|
104
5
|
class Engine < ::Rails::Engine
|
|
105
6
|
isolate_namespace Dsfr::Components
|
|
106
7
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dsfr-view-components
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.0.
|
|
4
|
+
version: 5.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- BetaGouv developers
|
|
@@ -420,7 +420,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
420
420
|
- !ruby/object:Gem::Version
|
|
421
421
|
version: '0'
|
|
422
422
|
requirements: []
|
|
423
|
-
rubygems_version:
|
|
423
|
+
rubygems_version: 4.0.6
|
|
424
424
|
specification_version: 4
|
|
425
425
|
summary: Composants ViewComponent pour le Système de Design de l'État (DSFR)
|
|
426
426
|
test_files: []
|