govuk_publishing_components 29.15.0 → 29.15.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/gtm-click-tracking.js +24 -13
  3. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/gtm-page-views.js +10 -13
  4. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/gtm-schemas.js +32 -0
  5. data/app/assets/javascripts/govuk_publishing_components/analytics-ga4.js +1 -0
  6. data/app/assets/javascripts/govuk_publishing_components/components/accordion.js +17 -22
  7. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_charts.scss +13 -2
  8. data/app/models/govuk_publishing_components/audit_applications.rb +49 -9
  9. data/app/models/govuk_publishing_components/audit_comparer.rb +47 -9
  10. data/app/views/govuk_publishing_components/audit/_components.html.erb +12 -31
  11. data/app/views/govuk_publishing_components/audit/_items_in_applications.html.erb +50 -0
  12. data/app/views/govuk_publishing_components/components/_table.html.erb +3 -2
  13. data/app/views/govuk_publishing_components/components/docs/back_link.yml +1 -1
  14. data/app/views/govuk_publishing_components/components/docs/big_number.yml +2 -2
  15. data/app/views/govuk_publishing_components/components/docs/breadcrumbs.yml +2 -2
  16. data/app/views/govuk_publishing_components/components/docs/button.yml +41 -40
  17. data/app/views/govuk_publishing_components/components/docs/cards.yml +2 -0
  18. data/app/views/govuk_publishing_components/components/docs/checkboxes.yml +216 -216
  19. data/app/views/govuk_publishing_components/components/docs/cookie_banner.yml +2 -1
  20. data/app/views/govuk_publishing_components/components/docs/copy_to_clipboard.yml +2 -2
  21. data/app/views/govuk_publishing_components/components/docs/details.yml +5 -1
  22. data/app/views/govuk_publishing_components/components/docs/document_list.yml +1 -2
  23. data/app/views/govuk_publishing_components/components/docs/error_alert.yml +4 -0
  24. data/app/views/govuk_publishing_components/components/docs/error_summary.yml +4 -6
  25. data/app/views/govuk_publishing_components/components/docs/govspeak.yml +6 -7
  26. data/app/views/govuk_publishing_components/components/docs/image_card.yml +3 -2
  27. data/app/views/govuk_publishing_components/components/docs/intervention.yml +25 -25
  28. data/app/views/govuk_publishing_components/components/docs/organisation_logo.yml +1 -2
  29. data/app/views/govuk_publishing_components/components/docs/print_link.yml +5 -1
  30. data/app/views/govuk_publishing_components/components/docs/select.yml +101 -98
  31. data/app/views/govuk_publishing_components/components/docs/table.yml +6 -1
  32. data/app/views/govuk_publishing_components/components/docs/tabs.yml +4 -0
  33. data/lib/govuk_publishing_components/app_helpers/table_helper.rb +4 -2
  34. data/lib/govuk_publishing_components/version.rb +1 -1
  35. metadata +5 -3
@@ -23,92 +23,93 @@ govuk_frontend_components:
23
23
  examples:
24
24
  default:
25
25
  data:
26
- text: "Submit"
26
+ text: Submit
27
27
  link_button:
28
28
  data:
29
- text: "I'm really a link sssh"
30
- href: "#"
29
+ text: I'm really a link sssh
30
+ href: '#'
31
31
  link_button_target_blank:
32
32
  data:
33
- text: "I'm really a link sssh"
34
- href: "http://www.gov.uk"
35
- target: "_blank"
33
+ text: I'm really a link sssh
34
+ href: http://www.gov.uk
35
+ target: _blank
36
36
  with_type:
37
37
  description: Buttons default to having a type of submit, but in some cases it may be desirable to have a different type.
38
38
  data:
39
- text: "Button type button"
40
- type: "button"
39
+ text: Button type button
40
+ type: button
41
41
  start_now_button:
42
42
  data:
43
- text: "Start now"
44
- href: "#"
43
+ text: Start now
44
+ href: '#'
45
45
  start: true
46
- rel: "external"
46
+ rel: external
47
47
  secondary_button:
48
48
  data:
49
- text: "Secondary button"
49
+ text: Secondary button
50
50
  secondary: true
51
51
  secondary_quiet_button:
52
52
  data:
53
- text: "Secondary quiet button"
53
+ text: Secondary quiet button
54
54
  secondary_quiet: true
55
55
  secondary_solid_button:
56
56
  data:
57
- text: "Secondary solid button"
57
+ text: Secondary solid button
58
58
  secondary_solid: true
59
59
  destructive_button:
60
60
  data:
61
- text: "Destructive button"
61
+ text: Destructive button
62
62
  destructive: true
63
63
  start_now_button_with_info_text:
64
64
  data:
65
- text: "Start now"
66
- href: "#"
65
+ text: Start now
66
+ href: '#'
67
67
  start: true
68
- info_text: "Sometimes you want to explain where a user is going to."
68
+ info_text: Sometimes you want to explain where a user is going to.
69
69
  with_margin_bottom:
70
70
  description: The component accepts a number for margin bottom from `0` to `9` (`0px` to `60px`) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). It defaults to having no margin bottom.
71
71
  data:
72
- text: "Submit"
72
+ text: Submit
73
73
  margin_bottom: 6
74
74
  start_now_button_with_info_text_and_margin_bottom:
75
75
  description: When the component requires margin bottom and has info text, the margin is applied to the info text.
76
76
  data:
77
- text: "Start now"
78
- href: "#"
77
+ text: Start now
78
+ href: '#'
79
79
  start: true
80
- info_text: "Sometimes you want to explain where a user is going to and have a margin bottom"
80
+ info_text: Sometimes you want to explain where a user is going to and have a margin bottom
81
81
  margin_bottom: 6
82
82
  extreme_text:
83
83
  data:
84
- text: "I'm a button with lots of text to test how the component scales at extremes."
85
- href: "#"
84
+ text: I'm a button with lots of text to test how the component scales at extremes.
85
+ href: '#'
86
86
  extreme_text_start_now_button:
87
87
  data:
88
- text: "I'm a start now button with lots of text to test how the component scales at extremes."
88
+ text: I'm a start now button with lots of text to test how the component scales at extremes.
89
89
  start: true
90
- href: "#"
90
+ href: '#'
91
91
  with_data_attributes:
92
+ description: Data attributes can be applied as required. Note that the component does not include built in tracking. If this is required consider using the [track click script](https://github.com/alphagov/govuk_publishing_components/blob/main/docs/analytics/track-click.md).
92
93
  data:
93
- text: "Track this!"
94
+ text: Track this!
94
95
  margin_bottom: true
95
96
  data_attributes: {
96
- "module": "cross-domain-tracking",
97
- "tracking-code": "GA-123ABC",
98
- "tracking-name": "transactionTracker"
97
+ module: cross-domain-tracking,
98
+ tracking-code: GA-123ABC,
99
+ tracking-name: transactionTracker
99
100
  }
100
101
  with_title_attribute:
101
102
  data:
102
- text: "Click me"
103
+ text: Click me
103
104
  margin_bottom: true
104
- title: "A button to click"
105
+ title: A button to click
105
106
  inline_layout:
106
107
  description: Buttons will display adjacent to each other until mobile view, when they will appear on top of each other.
107
108
  embed: |
108
109
  <button class="gem-c-button govuk-button gem-c-button--inline">First button</button>
109
110
  <%= component %>
110
111
  data:
111
- text: "Second button"
112
+ text: Second button
112
113
  inline_layout: true
113
114
  with_name_and_value_set:
114
115
  description: |
@@ -116,15 +117,15 @@ examples:
116
117
 
117
118
  Please note that Internet Explorer 6 and 7 have **breaking bugs** when submitting a form with multiple buttons - this can [change what value is submitted by the button](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#Notes). Make sure to check your user needs and browser usage.
118
119
  data:
119
- text: "This is the button text"
120
- value: "this_is_the_value"
121
- name: "this_is_the_name"
120
+ text: This is the button text
121
+ value: this_is_the_value
122
+ name: this_is_the_name
122
123
  with_js_classes:
123
124
  description: Use `js-` prefixed classes only as interaction hooks – to query and operate on elements via JavaScript
124
125
  data:
125
- text: "Button"
126
- classes: "js-selector-1 js-selector-2"
126
+ text: Button
127
+ classes: js-selector-1 js-selector-2
127
128
  with_aria_label:
128
129
  data:
129
- text: "Button"
130
- aria_label: "Button with custom label"
130
+ text: Button
131
+ aria_label: Button with custom label
@@ -119,6 +119,8 @@ examples:
119
119
  with_data_attributes:
120
120
  description: |
121
121
  Data attributes can be passed to individual links within the component as shown.
122
+
123
+ Note that the component does not include built in tracking. If this is required consider using the [track click script](https://github.com/alphagov/govuk_publishing_components/blob/main/docs/analytics/track-click.md).
122
124
  data:
123
125
  items:
124
126
  - link: