govuk_publishing_components 29.14.0 → 29.15.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) 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 +9 -12
  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/javascripts/govuk_publishing_components/components/table.js +52 -0
  8. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_charts.scss +13 -2
  9. data/app/models/govuk_publishing_components/audit_applications.rb +31 -9
  10. data/app/models/govuk_publishing_components/audit_comparer.rb +15 -9
  11. data/app/views/govuk_publishing_components/audit/_components.html.erb +20 -2
  12. data/app/views/govuk_publishing_components/components/_table.html.erb +61 -30
  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 +36 -1
  32. data/app/views/govuk_publishing_components/components/docs/tabs.yml +4 -0
  33. data/config/locales/ar.yml +4 -0
  34. data/config/locales/az.yml +4 -0
  35. data/config/locales/be.yml +4 -0
  36. data/config/locales/bg.yml +4 -0
  37. data/config/locales/bn.yml +4 -0
  38. data/config/locales/cs.yml +4 -0
  39. data/config/locales/cy.yml +4 -0
  40. data/config/locales/da.yml +4 -0
  41. data/config/locales/de.yml +4 -0
  42. data/config/locales/dr.yml +4 -0
  43. data/config/locales/el.yml +4 -0
  44. data/config/locales/en.yml +4 -0
  45. data/config/locales/es-419.yml +4 -0
  46. data/config/locales/es.yml +4 -0
  47. data/config/locales/et.yml +4 -0
  48. data/config/locales/fa.yml +4 -0
  49. data/config/locales/fi.yml +4 -0
  50. data/config/locales/fr.yml +4 -0
  51. data/config/locales/gd.yml +4 -0
  52. data/config/locales/gu.yml +4 -0
  53. data/config/locales/he.yml +4 -0
  54. data/config/locales/hi.yml +4 -0
  55. data/config/locales/hr.yml +4 -0
  56. data/config/locales/hu.yml +4 -0
  57. data/config/locales/hy.yml +4 -0
  58. data/config/locales/id.yml +4 -0
  59. data/config/locales/is.yml +4 -0
  60. data/config/locales/it.yml +4 -0
  61. data/config/locales/ja.yml +4 -0
  62. data/config/locales/ka.yml +4 -0
  63. data/config/locales/kk.yml +4 -0
  64. data/config/locales/ko.yml +4 -0
  65. data/config/locales/lt.yml +4 -0
  66. data/config/locales/lv.yml +4 -0
  67. data/config/locales/ms.yml +4 -0
  68. data/config/locales/mt.yml +4 -0
  69. data/config/locales/nl.yml +4 -0
  70. data/config/locales/no.yml +4 -0
  71. data/config/locales/pa-pk.yml +4 -0
  72. data/config/locales/pa.yml +4 -0
  73. data/config/locales/pl.yml +4 -0
  74. data/config/locales/ps.yml +4 -0
  75. data/config/locales/pt.yml +4 -0
  76. data/config/locales/ro.yml +4 -0
  77. data/config/locales/ru.yml +4 -0
  78. data/config/locales/si.yml +4 -0
  79. data/config/locales/sk.yml +4 -0
  80. data/config/locales/sl.yml +4 -0
  81. data/config/locales/so.yml +4 -0
  82. data/config/locales/sq.yml +4 -0
  83. data/config/locales/sr.yml +4 -0
  84. data/config/locales/sv.yml +4 -0
  85. data/config/locales/sw.yml +4 -0
  86. data/config/locales/ta.yml +4 -0
  87. data/config/locales/th.yml +4 -0
  88. data/config/locales/tk.yml +4 -0
  89. data/config/locales/tr.yml +4 -0
  90. data/config/locales/uk.yml +4 -0
  91. data/config/locales/ur.yml +4 -0
  92. data/config/locales/uz.yml +4 -0
  93. data/config/locales/vi.yml +4 -0
  94. data/config/locales/zh-hk.yml +4 -0
  95. data/config/locales/zh-tw.yml +4 -0
  96. data/config/locales/zh.yml +4 -0
  97. data/lib/govuk_publishing_components/app_helpers/table_helper.rb +4 -2
  98. data/lib/govuk_publishing_components/version.rb +1 -1
  99. metadata +5 -3
@@ -2,9 +2,9 @@ name: "Breadcrumbs"
2
2
  description: "Navigational breadcrumbs, showing page hierarchy"
3
3
  body: |
4
4
  Accepts an array of breadcrumb objects. Each crumb must have a title and a URL.
5
- Links have tracking data but links to the homepage (any link with a url of `/`) will be tracked separately as `homeLinkClicked`
5
+ Links have tracking data but links to the homepage (any link with a url of `/`) will be tracked separately as `homeLinkClicked`.
6
6
 
7
- We recommend that if using the breadcrumbs for navigation purposes, you set `collapse_on_mobile` to `true` to make things more readable for mobile users. However, you can specify `collapse_on_mobile:``false` or remove the flag completely to stop this behaviour.
7
+ We recommend that if using the breadcrumbs for navigation purposes, you set `collapse_on_mobile` to `true` to make things more readable for mobile users. However, you can specify `collapse_on_mobile:``false` or remove the flag completely to stop this behaviour.
8
8
  shared_accessibility_criteria:
9
9
  - link
10
10
  accessibility_criteria:
@@ -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: