dsfr-view-components 3.0.2 → 3.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ad464710e4c2bcddb1c49cab5cbc7fe7dac3508dc90e09b55be83adaf0302fc
|
4
|
+
data.tar.gz: a2c78fd736e9a21d0953e7205c9c0d62c3d9027d256d60035b0556da0e3de72a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3728eb72aeee052f246550071ec38f2f11dd7194a9ebfe001fe8dbef41e02494ec983626a262e9ef0b25dca64e1c2b48eecdd5be69260e9bb515f3f06ad6466
|
7
|
+
data.tar.gz: f08bdd10f57d02d956c128ff65304829488a4fe7d41138deeeafe8e15ac72bdd9f0d95803a6b08e1313aa1d9dff8c21bf69a3954d785f57aa3f4e3936ba48acd
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<%= content_tag(:div, class: "fr-connect-group", **html_attributes) do %>
|
2
|
+
<%= button_to(target, button_attributes) do %>
|
3
|
+
<span class="fr-connect__login">S'identifier avec</span>
|
4
|
+
<span class="fr-connect__brand">ProConnect</span>
|
5
|
+
<% end %>
|
6
|
+
|
7
|
+
<p>
|
8
|
+
<%= link_to "Qu'est-ce que ProConnect ?", "https://www.proconnect.gouv.fr/", target: "_blank", rel: "noopener", title: "Qu’est-ce que ProConnect ? - nouvelle fenêtre" %>
|
9
|
+
</p>
|
10
|
+
<% end %>
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module DsfrComponent
|
2
|
+
class ProconnectButtonComponent < DsfrComponent::Base
|
3
|
+
using HTMLAttributesUtils
|
4
|
+
|
5
|
+
# @param target [String] la cible où POST le formulaire/bouton
|
6
|
+
# @param button_overrides [Hash] attributs pour surcharger le bouton
|
7
|
+
def initialize(target:, button_overrides: {}, html_attributes: {})
|
8
|
+
@target = target
|
9
|
+
@button_overrides = button_overrides
|
10
|
+
|
11
|
+
super(html_attributes: html_attributes)
|
12
|
+
end
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
attr_reader :target, :button_overrides
|
17
|
+
|
18
|
+
def button_attributes
|
19
|
+
default_button_attributes
|
20
|
+
.deep_merge_html_attributes(button_overrides)
|
21
|
+
end
|
22
|
+
|
23
|
+
def default_button_attributes
|
24
|
+
{
|
25
|
+
method: :post,
|
26
|
+
remote: false,
|
27
|
+
class: "fr-connect fr-proconnect",
|
28
|
+
data: { turbo: false }
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
def default_attributes
|
33
|
+
{ class: "fr-connect-group" }
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -21,6 +21,7 @@ module DsfrComponentsHelper
|
|
21
21
|
dsfr_callout: 'DsfrComponent::CalloutComponent',
|
22
22
|
dsfr_notice: 'DsfrComponent::NoticeComponent',
|
23
23
|
dsfr_search: 'DsfrComponent::SearchComponent',
|
24
|
+
dsfr_proconnect_button: 'DsfrComponent::ProconnectButtonComponent',
|
24
25
|
# DO NOT REMOVE: new component mapping here
|
25
26
|
}.freeze
|
26
27
|
HELPER_NAME_TO_CLASS_NAME.each do |name, klass|
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dsfr-view-components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: '3.1'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BetaGouv developers
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date: 2025-
|
10
|
+
date: 2025-06-03 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: html-attributes-utils
|
@@ -44,14 +43,14 @@ dependencies:
|
|
44
43
|
requirements:
|
45
44
|
- - "~>"
|
46
45
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
46
|
+
version: 1.13.2
|
48
47
|
type: :runtime
|
49
48
|
prerelease: false
|
50
49
|
version_requirements: !ruby/object:Gem::Requirement
|
51
50
|
requirements:
|
52
51
|
- - "~>"
|
53
52
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
53
|
+
version: 1.13.2
|
55
54
|
- !ruby/object:Gem::Dependency
|
56
55
|
name: deep_merge
|
57
56
|
requirement: !ruby/object:Gem::Requirement
|
@@ -353,6 +352,8 @@ files:
|
|
353
352
|
- app/components/dsfr_component/modal_component.rb
|
354
353
|
- app/components/dsfr_component/notice_component.html.erb
|
355
354
|
- app/components/dsfr_component/notice_component.rb
|
355
|
+
- app/components/dsfr_component/proconnect_button_component.html.erb
|
356
|
+
- app/components/dsfr_component/proconnect_button_component.rb
|
356
357
|
- app/components/dsfr_component/search_component.html.erb
|
357
358
|
- app/components/dsfr_component/search_component.rb
|
358
359
|
- app/components/dsfr_component/skiplink_component.html.erb
|
@@ -393,7 +394,6 @@ metadata:
|
|
393
394
|
homepage_uri: https://github.com/betagouv/dsfr-view-components
|
394
395
|
source_code_uri: https://github.com/betagouv/dsfr-view-components
|
395
396
|
rubygems_mfa_required: 'true'
|
396
|
-
post_install_message:
|
397
397
|
rdoc_options: []
|
398
398
|
require_paths:
|
399
399
|
- lib
|
@@ -408,8 +408,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
408
408
|
- !ruby/object:Gem::Version
|
409
409
|
version: '0'
|
410
410
|
requirements: []
|
411
|
-
rubygems_version: 3.
|
412
|
-
signing_key:
|
411
|
+
rubygems_version: 3.6.2
|
413
412
|
specification_version: 4
|
414
413
|
summary: Composants ViewComponent pour le Système de Design de l'État (DSFR)
|
415
414
|
test_files: []
|