govuk_publishing_components 62.0.0 → 62.1.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.
Files changed (190) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/components/option-select.js +4 -3
  3. data/app/assets/javascripts/govuk_publishing_components/lib/filter-list.js +48 -0
  4. data/app/assets/javascripts/govuk_publishing_components/vendor/lux/lux-reporter.js +373 -245
  5. data/app/assets/stylesheets/component_guide/application.scss +1 -42
  6. data/app/assets/stylesheets/govuk_publishing_components/components/_button.scss +5 -1
  7. data/app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss +6 -11
  8. data/app/assets/stylesheets/govuk_publishing_components/components/_option-select.scss +2 -2
  9. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_button.scss +6 -38
  10. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_warning-callout.scss +2 -3
  11. data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_markdown-typography.scss +6 -1
  12. data/app/controllers/govuk_publishing_components/applications_page_controller.rb +50 -0
  13. data/app/models/govuk_publishing_components/applications_page.rb +64 -0
  14. data/app/views/govuk_publishing_components/applications_page/_table-content.html.erb +39 -0
  15. data/app/views/govuk_publishing_components/applications_page/show.html.erb +37 -0
  16. data/app/views/govuk_publishing_components/audit/show.html.erb +5 -1
  17. data/app/views/govuk_publishing_components/component_guide/_component_list.html.erb +14 -0
  18. data/app/views/govuk_publishing_components/component_guide/example.html.erb +3 -3
  19. data/app/views/govuk_publishing_components/component_guide/index.html.erb +50 -75
  20. data/app/views/govuk_publishing_components/component_guide/show.html.erb +7 -7
  21. data/app/views/govuk_publishing_components/components/contextual_sidebar/_ukraine_cta.html.erb +27 -25
  22. data/app/views/govuk_publishing_components/components/docs/govspeak.yml +6 -0
  23. data/app/views/govuk_publishing_components/components/docs/organisation_logo.yml +7 -1
  24. data/config/routes.rb +1 -0
  25. data/lib/govuk_publishing_components/minitest/component_guide_test.rb +1 -1
  26. data/lib/govuk_publishing_components/presenters/organisation_logo_helper.rb +7 -1
  27. data/lib/govuk_publishing_components/version.rb +1 -1
  28. data/node_modules/govuk-frontend/dist/govuk/all.bundle.js +37 -133
  29. data/node_modules/govuk-frontend/dist/govuk/all.bundle.js.map +1 -1
  30. data/node_modules/govuk-frontend/dist/govuk/all.bundle.mjs +37 -133
  31. data/node_modules/govuk-frontend/dist/govuk/all.bundle.mjs.map +1 -1
  32. data/node_modules/govuk-frontend/dist/govuk/common/govuk-frontend-version.mjs +1 -1
  33. data/node_modules/govuk-frontend/dist/govuk/components/accordion/_index.scss +4 -4
  34. data/node_modules/govuk-frontend/dist/govuk/components/accordion/_index.scss.map +1 -1
  35. data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.js +1 -126
  36. data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.js.map +1 -1
  37. data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.mjs +1 -126
  38. data/node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.bundle.mjs.map +1 -1
  39. data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_index.scss +1 -1
  40. data/node_modules/govuk-frontend/dist/govuk/components/breadcrumbs/_index.scss.map +1 -1
  41. data/node_modules/govuk-frontend/dist/govuk/components/button/_index.scss +2 -2
  42. data/node_modules/govuk-frontend/dist/govuk/components/button/_index.scss.map +1 -1
  43. data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.js +1 -126
  44. data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.js.map +1 -1
  45. data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.mjs +1 -126
  46. data/node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.bundle.mjs.map +1 -1
  47. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/fixtures.json +34 -29
  48. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/macro-options.json +1 -1
  49. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-default.html +23 -23
  50. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-small-with-conditional-reveal.html +21 -21
  51. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-small-with-divider-and-none.html +30 -30
  52. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-small-with-error.html +26 -26
  53. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-small-with-hint.html +25 -25
  54. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-small-with-long-text.html +23 -23
  55. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-small.html +23 -23
  56. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-conditional-items.html +35 -35
  57. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-divider-and-none.html +30 -30
  58. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-divider-none-and-conditional-items.html +40 -40
  59. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-error-message.html +32 -32
  60. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-hint.html +25 -25
  61. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-hints-on-items.html +21 -21
  62. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-legend-as-a-page-heading.html +27 -27
  63. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-optional-form-group-classes-showing-group-error.html +36 -36
  64. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-pre-checked-values.html +35 -35
  65. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template-with-very-long-option-text.html +25 -25
  66. data/node_modules/govuk-frontend/dist/govuk/components/checkboxes/template.njk +1 -1
  67. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_index.scss +1 -1
  68. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/_index.scss.map +1 -1
  69. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.js +1 -126
  70. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.js.map +1 -1
  71. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.mjs +1 -126
  72. data/node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.bundle.mjs.map +1 -1
  73. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_index.scss +2 -1
  74. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/_index.scss.map +1 -1
  75. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.js +36 -132
  76. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.js.map +1 -1
  77. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.mjs +36 -132
  78. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.bundle.mjs.map +1 -1
  79. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.mjs +35 -6
  80. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/file-upload.mjs.map +1 -1
  81. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/fixtures.json +17 -0
  82. data/node_modules/govuk-frontend/dist/govuk/components/file-upload/template-enhanced-multiple-files.html +10 -0
  83. data/node_modules/govuk-frontend/dist/govuk/components/footer/_index.scss +4 -4
  84. data/node_modules/govuk-frontend/dist/govuk/components/footer/_index.scss.map +1 -1
  85. data/node_modules/govuk-frontend/dist/govuk/components/header/_index.scss +20 -20
  86. data/node_modules/govuk-frontend/dist/govuk/components/header/_index.scss.map +1 -1
  87. data/node_modules/govuk-frontend/dist/govuk/components/input/_index.scss +7 -15
  88. data/node_modules/govuk-frontend/dist/govuk/components/input/_index.scss.map +1 -1
  89. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_index.scss +2 -2
  90. data/node_modules/govuk-frontend/dist/govuk/components/notification-banner/_index.scss.map +1 -1
  91. data/node_modules/govuk-frontend/dist/govuk/components/pagination/_index.scss +4 -2
  92. data/node_modules/govuk-frontend/dist/govuk/components/pagination/_index.scss.map +1 -1
  93. data/node_modules/govuk-frontend/dist/govuk/components/pagination/fixtures.json +1 -1
  94. data/node_modules/govuk-frontend/dist/govuk/components/pagination/template-with-many-pages.html +2 -2
  95. data/node_modules/govuk-frontend/dist/govuk/components/pagination/template.njk +1 -1
  96. data/node_modules/govuk-frontend/dist/govuk/components/panel/_index.scss +2 -2
  97. data/node_modules/govuk-frontend/dist/govuk/components/panel/_index.scss.map +1 -1
  98. data/node_modules/govuk-frontend/dist/govuk/components/password-input/_index.scss +2 -2
  99. data/node_modules/govuk-frontend/dist/govuk/components/password-input/_index.scss.map +1 -1
  100. data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.js +1 -126
  101. data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.js.map +1 -1
  102. data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.mjs +1 -126
  103. data/node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.bundle.mjs.map +1 -1
  104. data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/_index.scss +1 -1
  105. data/node_modules/govuk-frontend/dist/govuk/components/phase-banner/_index.scss.map +1 -1
  106. data/node_modules/govuk-frontend/dist/govuk/components/radios/_index.scss +1 -1
  107. data/node_modules/govuk-frontend/dist/govuk/components/radios/_index.scss.map +1 -1
  108. data/node_modules/govuk-frontend/dist/govuk/components/radios/fixtures.json +36 -31
  109. data/node_modules/govuk-frontend/dist/govuk/components/radios/macro-options.json +3 -3
  110. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-default.html +17 -17
  111. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-inline.html +19 -19
  112. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-small-inline.html +23 -23
  113. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-small-with-a-divider.html +24 -24
  114. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-small-with-conditional-reveal.html +27 -27
  115. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-small-with-error.html +26 -26
  116. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-small-with-hint.html +25 -25
  117. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-small-with-long-text.html +23 -23
  118. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-small.html +23 -23
  119. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-a-divider.html +24 -24
  120. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-conditional-item-checked.html +35 -35
  121. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-conditional-items-and-pre-checked-value.html +35 -35
  122. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-conditional-items.html +35 -35
  123. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-fieldset-and-error-message.html +20 -20
  124. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-hint.html +19 -19
  125. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-hints-on-items.html +23 -23
  126. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-legend-as-page-heading.html +21 -21
  127. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-optional-form-group-classes-showing-group-error.html +36 -36
  128. data/node_modules/govuk-frontend/dist/govuk/components/radios/template-with-very-long-option-text.html +28 -28
  129. data/node_modules/govuk-frontend/dist/govuk/components/radios/template.njk +1 -1
  130. data/node_modules/govuk-frontend/dist/govuk/components/select/_index.scss +1 -7
  131. data/node_modules/govuk-frontend/dist/govuk/components/select/_index.scss.map +1 -1
  132. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_index.scss +5 -5
  133. data/node_modules/govuk-frontend/dist/govuk/components/service-navigation/_index.scss.map +1 -1
  134. data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_index.scss +16 -16
  135. data/node_modules/govuk-frontend/dist/govuk/components/summary-list/_index.scss.map +1 -1
  136. data/node_modules/govuk-frontend/dist/govuk/components/table/_index.scss +1 -1
  137. data/node_modules/govuk-frontend/dist/govuk/components/table/_index.scss.map +1 -1
  138. data/node_modules/govuk-frontend/dist/govuk/components/tabs/_index.scss +1 -1
  139. data/node_modules/govuk-frontend/dist/govuk/components/tabs/_index.scss.map +1 -1
  140. data/node_modules/govuk-frontend/dist/govuk/components/task-list/fixtures.json +46 -0
  141. data/node_modules/govuk-frontend/dist/govuk/components/task-list/template-forced-hover-state.html +37 -0
  142. data/node_modules/govuk-frontend/dist/govuk/components/textarea/_index.scss +1 -7
  143. data/node_modules/govuk-frontend/dist/govuk/components/textarea/_index.scss.map +1 -1
  144. data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_index.scss +1 -1
  145. data/node_modules/govuk-frontend/dist/govuk/components/warning-text/_index.scss.map +1 -1
  146. data/node_modules/govuk-frontend/dist/govuk/core/_govuk-frontend-properties.scss +1 -1
  147. data/node_modules/govuk-frontend/dist/govuk/core/_lists.scss +2 -2
  148. data/node_modules/govuk-frontend/dist/govuk/core/_lists.scss.map +1 -1
  149. data/node_modules/govuk-frontend/dist/govuk/core/_typography.scss +3 -3
  150. data/node_modules/govuk-frontend/dist/govuk/core/_typography.scss.map +1 -1
  151. data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.css +2 -2
  152. data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.css.map +1 -1
  153. data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.js +1 -1
  154. data/node_modules/govuk-frontend/dist/govuk/govuk-frontend.min.js.map +1 -1
  155. data/node_modules/govuk-frontend/dist/govuk/helpers/_focused.scss +34 -0
  156. data/node_modules/govuk-frontend/dist/govuk/helpers/_focused.scss.map +1 -1
  157. data/node_modules/govuk-frontend/dist/govuk/helpers/_grid.scss +1 -1
  158. data/node_modules/govuk-frontend/dist/govuk/helpers/_grid.scss.map +1 -1
  159. data/node_modules/govuk-frontend/dist/govuk/helpers/_links.scss +1 -1
  160. data/node_modules/govuk-frontend/dist/govuk/helpers/_links.scss.map +1 -1
  161. data/node_modules/govuk-frontend/dist/govuk/helpers/_media-queries.scss +172 -33
  162. data/node_modules/govuk-frontend/dist/govuk/helpers/_media-queries.scss.map +1 -1
  163. data/node_modules/govuk-frontend/dist/govuk/helpers/_spacing.scss +1 -1
  164. data/node_modules/govuk-frontend/dist/govuk/helpers/_spacing.scss.map +1 -1
  165. data/node_modules/govuk-frontend/dist/govuk/helpers/_typography.scss +4 -4
  166. data/node_modules/govuk-frontend/dist/govuk/helpers/_typography.scss.map +1 -1
  167. data/node_modules/govuk-frontend/dist/govuk/i18n.mjs +1 -126
  168. data/node_modules/govuk-frontend/dist/govuk/i18n.mjs.map +1 -1
  169. data/node_modules/govuk-frontend/dist/govuk/objects/_button-group.scss +1 -1
  170. data/node_modules/govuk-frontend/dist/govuk/objects/_button-group.scss.map +1 -1
  171. data/node_modules/govuk-frontend/dist/govuk/objects/_main-wrapper.scss +1 -1
  172. data/node_modules/govuk-frontend/dist/govuk/objects/_main-wrapper.scss.map +1 -1
  173. data/node_modules/govuk-frontend/dist/govuk/objects/_template.scss +1 -1
  174. data/node_modules/govuk-frontend/dist/govuk/objects/_template.scss.map +1 -1
  175. data/node_modules/govuk-frontend/dist/govuk/objects/_width-container.scss +2 -2
  176. data/node_modules/govuk-frontend/dist/govuk/objects/_width-container.scss.map +1 -1
  177. data/node_modules/govuk-frontend/dist/govuk/overrides/_display.scss +1 -1
  178. data/node_modules/govuk-frontend/dist/govuk/overrides/_display.scss.map +1 -1
  179. data/node_modules/govuk-frontend/dist/govuk/overrides/_width.scss +5 -5
  180. data/node_modules/govuk-frontend/dist/govuk/overrides/_width.scss.map +1 -1
  181. data/node_modules/govuk-frontend/dist/govuk/settings/_media-queries.scss +7 -0
  182. data/node_modules/govuk-frontend/dist/govuk/settings/_media-queries.scss.map +1 -1
  183. data/node_modules/govuk-frontend/dist/govuk/tools/_px-to-em.scss +4 -2
  184. data/node_modules/govuk-frontend/dist/govuk/tools/_px-to-em.scss.map +1 -1
  185. data/node_modules/govuk-frontend/govuk-prototype-kit.config.json +1 -1
  186. data/node_modules/govuk-frontend/package.json +9 -8
  187. metadata +9 -4
  188. data/app/assets/javascripts/component_guide/filter-components.js +0 -35
  189. data/node_modules/govuk-frontend/dist/govuk/vendor/_sass-mq.scss +0 -349
  190. data/node_modules/govuk-frontend/dist/govuk/vendor/_sass-mq.scss.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/govuk/helpers/_typography.scss"],"names":[],"mappings":"AAAA,GAAG;AACH,4BAA4B;AAC5B,GAAG;;AAEH,4BAA4B;;AAE5B,6BAA6B;AAC7B,EAAE;AACF,+EAA+E;AAC/E,gCAAgC;AAChC,EAAE;AACF,qEAAqE;AACrE,iBAAiB;;AAEjB;EACE,yBAAyB;EACzB,mCAAmC;EACnC,kCAAkC;;EAElC,wEAAwE;EACxE,6BAA6B;EAC7B;IACE,uCAAuC;EACzC;;EAEA;IACE,qCAAqC;EACvC;AACF;;AAEA,qBAAqB;AACrB,EAAE;AACF,iEAAiE;AACjE,EAAE;AACF,iBAAiB;;AAEjB;EACE,yBAAyB;;EAEzB;IACE,+BAA+B;EACjC;AACF;;AAEA,6BAA6B;AAC7B,EAAE;AACF,wEAAwE;AACxE,6DAA6D;AAC7D,iBAAiB;;AAEjB;EACE,wEAAwE;AAC1E;;AAEA,0BAA0B;AAC1B,EAAE;AACF,wEAAwE;AACxE,6DAA6D;AAC7D,iBAAiB;;AAEjB;EACE,qEAAqE;AACvE;;AAEA,wBAAwB;AACxB,EAAE;AACF,kEAAkE;AAClE,sEAAsE;AACtE,oEAAoE;AACpE,sEAAsE;AACtE,uEAAuE;AACvE,oDAAoD;AACpD,EAAE;AACF,wEAAwE;AACxE,6DAA6D;AAC7D,iBAAiB;;AAEjB;EACE,mEAAmE;AACrE;;AAEA,oBAAoB;AACpB,EAAE;AACF,wEAAwE;AACxE,0DAA0D;AAC1D,EAAE;AACF,wEAAwE;AACxE,6DAA6D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C,+CAA+C;;EAE/C;IACE,+DAA+D;IAC/D;MACE,iFAAiF;IACnF;;IAEA,0EAA0E;IAC1E,+CAA+C;EACjD;;EAEA;IACE,iDAAiD;IACjD,2CAA2C;;IAE3C,mEAAmE;IACnE,+DAA+D;IAC/D,sCAAsC;IACtC,CAAC;IACD,wEAAwE;IACxE,yBAAyB;IACzB;;;KAGC;;IAED,sEAAsE;IACtE,wEAAwE;IACxE,0BAA0B;IAC1B,uDAAuD;IACvD,+DAA+D;IAC/D,iFAAiF;;IAEjF;MACE,yBAAyB;MACzB,oCAAoC;IACtC,EAAE;MACA;QACE,qBAAqB;QACrB,oCAAoC;MACtC;IACF,EAAE;MACA;QACE,yBAAyB;QACzB,oCAAoC;MACtC;IACF;EACF;AACF;;AAEA,cAAc;AACd,EAAE;AACF,0EAA0E;AAC1E,+EAA+E;AAC/E,YAAY;AACZ,kEAAkE;AAClE,4EAA4E;AAC5E,wEAAwE;AACxE,YAAY;AACZ,EAAE;AACF,wEAAwE;AACxE,EAAE;AACF,iBAAiB;;AAEjB;EACE,gCAAgC;;EAEhC;IACE,mCAAmC;EACrC;;EAEA;IACE,wCAAwC;EAC1C,EAAE;IACA,qCAAqC;EACvC;;EAEA;IACE,6CAA6C;EAC/C;AACF","file":"_typography.scss","sourcesContent":["////\n/// @group helpers/typography\n////\n\n@import \"../tools/px-to-rem\";\n\n/// 'Common typography' helper\n///\n/// Sets the font family and associated properties, such as font smoothing. Also\n/// overrides the font for print.\n///\n/// @param {List} $font-family [$govuk-font-family] Font family to use\n/// @access public\n\n@mixin govuk-typography-common($font-family: $govuk-font-family) {\n font-family: $font-family;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n\n // If the user is using the default GDS Transport font we need to include\n // the font-face declarations.\n @if $govuk-include-default-font-face {\n @include _govuk-font-face-gds-transport;\n }\n\n @include govuk-media-query($media-type: print) {\n font-family: $govuk-font-family-print;\n }\n}\n\n/// Text colour helper\n///\n/// Sets the text colour, including a suitable override for print.\n///\n/// @access public\n\n@mixin govuk-text-colour {\n color: $govuk-text-colour;\n\n @include govuk-media-query($media-type: print) {\n color: $govuk-print-text-colour;\n }\n}\n\n/// Regular font weight helper\n///\n/// @param {Boolean} $important [false] - Whether to mark declarations as\n/// `!important`. Generally Used to create override classes.\n/// @access public\n\n@mixin govuk-typography-weight-regular($important: false) {\n font-weight: $govuk-font-weight-regular if($important, !important, null);\n}\n\n/// Bold font weight helper\n///\n/// @param {Boolean} $important [false] - Whether to mark declarations as\n/// `!important`. Generally Used to create override classes.\n/// @access public\n\n@mixin govuk-typography-weight-bold($important: false) {\n font-weight: $govuk-font-weight-bold if($important, !important, null);\n}\n\n/// Tabular number helper\n///\n/// Switches numerical glyphs (0–9) to use alternative forms with a\n/// monospaced bounding box. This ensures that columns of numbers, such\n/// as those in tables, remain horizontally aligned with one another.\n/// This also has the useful side effect of making numbers more legible\n/// in some situations, such as reference codes, as the numbers are more\n/// distinct and visually separated from one another.\n///\n/// @param {Boolean} $important [false] - Whether to mark declarations as\n/// `!important`. Generally Used to create override classes.\n/// @access public\n\n@mixin govuk-font-tabular-numbers($important: false) {\n font-variant-numeric: tabular-nums if($important, !important, null);\n}\n\n/// Word break helper\n///\n/// Forcibly breaks long words that lack spaces, such as email addresses,\n/// across multiple lines when they wouldn't otherwise fit.\n///\n/// @param {Boolean} $important [false] - Whether to mark declarations as\n/// `!important`. Generally used to create override classes.\n/// @access public\n\n@mixin govuk-text-break-word($important: false) {\n // IE 11 and Edge 16–17 only support the non-standard `word-wrap` property\n word-wrap: break-word if($important, !important, null);\n\n // All other browsers support `overflow-wrap`\n overflow-wrap: break-word if($important, !important, null);\n}\n\n/// Convert line-heights specified in pixels into a relative value, unless\n/// they are already unit-less (and thus already treated as relative values)\n/// or the units do not match the units used for the font size.\n///\n/// @param {Number} $line-height Line height\n/// @param {Number} $font-size Font size\n/// @return {Number} The line height as either a relative value or unmodified\n///\n/// @access private\n\n@function _govuk-line-height($line-height, $font-size) {\n @if not unitless($line-height) and unit($line-height) == unit($font-size) {\n $line-height: $line-height / $font-size;\n }\n\n @return $line-height;\n}\n\n/// Font size and line height helper\n///\n/// @param {Number} $size - Point from the type scale (the size as it would\n/// appear on tablet and above)\n/// @param {Number} $override-line-height [false] - Non responsive custom line\n/// height. Omit to use the line height from the font map.\n/// @param {Boolean} $important [false] - Whether to mark declarations as\n/// `!important`.\n///\n/// @throw if `$size` is not a valid point from the type scale\n///\n/// @access public\n///\n/// @alias govuk-font-size\n/// @deprecated Use `govuk-font-size` instead\n\n@mixin govuk-typography-responsive($size, $override-line-height: false, $important: false) {\n @include _warning(\n \"govuk-typography-responsive\",\n \"govuk-typography-responsive is deprecated. Use govuk-font-size instead.\"\n );\n @include govuk-font-size($size, $override-line-height, $important);\n}\n\n/// Font size and line height helper\n///\n/// Takes a point from the responsive 'font map' as an argument (the size as it\n/// would appear on tablet and above), and uses it to create font-size and\n/// line-height declarations for different breakpoints, and print.\n///\n/// Example font map:\n///\n/// ```scss\n/// 19: (\n/// null: (\n/// font-size: 16px,\n/// line-height: 20px\n/// ),\n/// tablet: (\n/// font-size: 19px,\n/// line-height: 25px\n/// ),\n/// print: (\n/// font-size: 14pt,\n/// line-height: 1.15\n/// )\n/// );\n/// ```\n///\n/// @param {Number | String} $size - Point from the type scale (the size as\n/// it would appear on tablet and above)\n/// @param {Number} $line-height [false] - Non responsive custom line\n/// height. Omit to use the line height from the font map.\n/// @param {Boolean} $important [false] - Whether to mark declarations as\n/// `!important`.\n///\n/// @throw if `$size` is not a valid point from the type scale\n///\n/// @access public\n\n@mixin govuk-font-size($size, $line-height: false, $important: false) {\n // Flag font sizes that start with underscores so we can suppress warnings on\n // deprecated sizes used internally, for example `govuk-font($size: \"_14\")`\n $size-internal-use-only: str-slice(#{$size}, 1, 1) == \"_\";\n\n // Remove underscore from font sizes flagged for internal use\n @if $size-internal-use-only {\n $size: str-slice(#{$size}, 2);\n }\n\n // Check for a font map exactly matching the given size\n $font-map: map-get($govuk-typography-scale, $size);\n\n // No match? Try with string type (e.g. $size: \"16\" not 16)\n @if not $font-map {\n @each $font-size in map-keys($govuk-typography-scale) {\n @if not $font-map and \"#{$font-size}\" == \"#{$size}\" {\n $font-map: map-get($govuk-typography-scale, $font-size);\n }\n }\n }\n\n // Still no match? Throw error\n @if not $font-map {\n @error \"Unknown font size `#{$size}` - expected a point from the type scale.\";\n }\n\n // Check for a deprecation within the type scale\n $deprecation: map-get($font-map, \"deprecation\");\n\n @if $deprecation {\n // Warn on deprecated font sizes unless flagged for internal use\n @if not $size-internal-use-only {\n @include _warning(map-get($deprecation, \"key\"), map-get($deprecation, \"message\"));\n }\n\n // remove the deprecation map keys so they do not break the breakpoint loop\n $font-map: map-remove($font-map, \"deprecation\");\n }\n\n @each $breakpoint, $breakpoint-map in $font-map {\n $font-size: map-get($breakpoint-map, \"font-size\");\n $font-size-rem: govuk-px-to-rem($font-size);\n\n // $calculated-line-height is a separate variable from $line-height,\n // as otherwise the value would get redefined with each loop and\n // eventually break _govuk-line-height.\n //\n // We continue to call the param $line-height to stay consistent with the\n // naming with govuk-font.\n $calculated-line-height: _govuk-line-height(\n $line-height: if($line-height, $line-height, map-get($breakpoint-map, \"line-height\")),\n $font-size: $font-size\n );\n\n // Mark rules as !important if $important is true - this will result in\n // these variables becoming strings, so this needs to happen *after* they\n // are used in calculations\n $font-size: $font-size if($important, !important, null);\n $font-size-rem: $font-size-rem if($important, !important, null);\n $calculated-line-height: $calculated-line-height if($important, !important, null);\n\n @if not $breakpoint {\n font-size: $font-size-rem;\n line-height: $calculated-line-height;\n } @else if $breakpoint == \"print\" {\n @include govuk-media-query($media-type: print) {\n font-size: $font-size;\n line-height: $calculated-line-height;\n }\n } @else {\n @include govuk-media-query($from: $breakpoint) {\n font-size: $font-size-rem;\n line-height: $calculated-line-height;\n }\n }\n }\n}\n\n/// Font helper\n///\n/// @param {Number | Boolean | String} $size Point from the type scale (the\n/// size as it would appear on tablet and above). Use `false` to avoid setting\n/// a size.\n/// @param {String} $weight [regular] - Weight: `bold` or `regular`\n/// @param {Boolean} $tabular [false] - Whether to use tabular numbers or not\n/// @param {Number} $line-height [false] - Line-height, if overriding the\n/// default\n///\n/// @throw if `$size` is not a valid point from the type scale (or false)\n///\n/// @access public\n\n@mixin govuk-font($size, $weight: regular, $tabular: false, $line-height: false) {\n @include govuk-typography-common;\n\n @if $tabular {\n @include govuk-font-tabular-numbers;\n }\n\n @if $weight == regular {\n @include govuk-typography-weight-regular;\n } @else if $weight == bold {\n @include govuk-typography-weight-bold;\n }\n\n @if $size {\n @include govuk-font-size($size, $line-height);\n }\n}\n"]}
1
+ {"version":3,"sources":["../../../src/govuk/helpers/_typography.scss"],"names":[],"mappings":"AAAA,GAAG;AACH,4BAA4B;AAC5B,GAAG;;AAEH,4BAA4B;;AAE5B,6BAA6B;AAC7B,EAAE;AACF,+EAA+E;AAC/E,gCAAgC;AAChC,EAAE;AACF,qEAAqE;AACrE,iBAAiB;;AAEjB;EACE,yBAAyB;EACzB,mCAAmC;EACnC,kCAAkC;;EAElC,wEAAwE;EACxE,6BAA6B;EAC7B;IACE,uCAAuC;EACzC;;EAEA;IACE,qCAAqC;EACvC;AACF;;AAEA,qBAAqB;AACrB,EAAE;AACF,iEAAiE;AACjE,EAAE;AACF,iBAAiB;;AAEjB;EACE,yBAAyB;;EAEzB;IACE,+BAA+B;EACjC;AACF;;AAEA,6BAA6B;AAC7B,EAAE;AACF,wEAAwE;AACxE,6DAA6D;AAC7D,iBAAiB;;AAEjB;EACE,wEAAwE;AAC1E;;AAEA,0BAA0B;AAC1B,EAAE;AACF,wEAAwE;AACxE,6DAA6D;AAC7D,iBAAiB;;AAEjB;EACE,qEAAqE;AACvE;;AAEA,wBAAwB;AACxB,EAAE;AACF,kEAAkE;AAClE,sEAAsE;AACtE,oEAAoE;AACpE,sEAAsE;AACtE,uEAAuE;AACvE,oDAAoD;AACpD,EAAE;AACF,wEAAwE;AACxE,6DAA6D;AAC7D,iBAAiB;;AAEjB;EAC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D;EAC1D;IACE;MACE;QACE,uDAAuD;MACzD;IACF;EACF;;EAEA,6BAA6B;EAC7B;IACE,6EAA6E;EAC/E;;EAEA,+CAA+C;EAC/C,+CAA+C;;EAE/C;IACE,+DAA+D;IAC/D;MACE,iFAAiF;IACnF;;IAEA,0EAA0E;IAC1E,+CAA+C;EACjD;;EAEA;IACE,iDAAiD;IACjD,2CAA2C;;IAE3C,mEAAmE;IACnE,+DAA+D;IAC/D,sCAAsC;IACtC,CAAC;IACD,wEAAwE;IACxE,yBAAyB;IACzB;;;KAGC;;IAED,sEAAsE;IACtE,wEAAwE;IACxE,0BAA0B;IAC1B,uDAAuD;IACvD,+DAA+D;IAC/D,iFAAiF;;IAEjF;MACE,yBAAyB;MACzB,oCAAoC;IACtC,EAAE;MACA;QACE,qBAAqB;QACrB,oCAAoC;MACtC;IACF,EAAE;MACA;QACE,yBAAyB;QACzB,oCAAoC;MACtC;IACF;EACF;AACF;;AAEA,cAAc;AACd,EAAE;AACF,0EAA0E;AAC1E,+EAA+E;AAC/E,YAAY;AACZ,kEAAkE;AAClE,4EAA4E;AAC5E,wEAAwE;AACxE,YAAY;AACZ,EAAE;AACF,wEAAwE;AACxE,EAAE;AACF,iBAAiB;;AAEjB;EACE,gCAAgC;;EAEhC;IACE,mCAAmC;EACrC;;EAEA;IACE,wCAAwC;EAC1C,EAAE;IACA,qCAAqC;EACvC;;EAEA;IACE,6CAA6C;EAC/C;AACF","file":"_typography.scss","sourcesContent":["////\n/// @group helpers/typography\n////\n\n@import \"../tools/px-to-rem\";\n\n/// 'Common typography' helper\n///\n/// Sets the font family and associated properties, such as font smoothing. Also\n/// overrides the font for print.\n///\n/// @param {List} $font-family [$govuk-font-family] Font family to use\n/// @access public\n\n@mixin govuk-typography-common($font-family: $govuk-font-family) {\n font-family: $font-family;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n\n // If the user is using the default GDS Transport font we need to include\n // the font-face declarations.\n @if $govuk-include-default-font-face {\n @include _govuk-font-face-gds-transport;\n }\n\n @media print {\n font-family: $govuk-font-family-print;\n }\n}\n\n/// Text colour helper\n///\n/// Sets the text colour, including a suitable override for print.\n///\n/// @access public\n\n@mixin govuk-text-colour {\n color: $govuk-text-colour;\n\n @media print {\n color: $govuk-print-text-colour;\n }\n}\n\n/// Regular font weight helper\n///\n/// @param {Boolean} $important [false] - Whether to mark declarations as\n/// `!important`. Generally Used to create override classes.\n/// @access public\n\n@mixin govuk-typography-weight-regular($important: false) {\n font-weight: $govuk-font-weight-regular if($important, !important, null);\n}\n\n/// Bold font weight helper\n///\n/// @param {Boolean} $important [false] - Whether to mark declarations as\n/// `!important`. Generally Used to create override classes.\n/// @access public\n\n@mixin govuk-typography-weight-bold($important: false) {\n font-weight: $govuk-font-weight-bold if($important, !important, null);\n}\n\n/// Tabular number helper\n///\n/// Switches numerical glyphs (0–9) to use alternative forms with a\n/// monospaced bounding box. This ensures that columns of numbers, such\n/// as those in tables, remain horizontally aligned with one another.\n/// This also has the useful side effect of making numbers more legible\n/// in some situations, such as reference codes, as the numbers are more\n/// distinct and visually separated from one another.\n///\n/// @param {Boolean} $important [false] - Whether to mark declarations as\n/// `!important`. Generally Used to create override classes.\n/// @access public\n\n@mixin govuk-font-tabular-numbers($important: false) {\n font-variant-numeric: tabular-nums if($important, !important, null);\n}\n\n/// Word break helper\n///\n/// Forcibly breaks long words that lack spaces, such as email addresses,\n/// across multiple lines when they wouldn't otherwise fit.\n///\n/// @param {Boolean} $important [false] - Whether to mark declarations as\n/// `!important`. Generally used to create override classes.\n/// @access public\n\n@mixin govuk-text-break-word($important: false) {\n // IE 11 and Edge 16–17 only support the non-standard `word-wrap` property\n word-wrap: break-word if($important, !important, null);\n\n // All other browsers support `overflow-wrap`\n overflow-wrap: break-word if($important, !important, null);\n}\n\n/// Convert line-heights specified in pixels into a relative value, unless\n/// they are already unit-less (and thus already treated as relative values)\n/// or the units do not match the units used for the font size.\n///\n/// @param {Number} $line-height Line height\n/// @param {Number} $font-size Font size\n/// @return {Number} The line height as either a relative value or unmodified\n///\n/// @access private\n\n@function _govuk-line-height($line-height, $font-size) {\n @if not unitless($line-height) and unit($line-height) == unit($font-size) {\n $line-height: $line-height / $font-size;\n }\n\n @return $line-height;\n}\n\n/// Font size and line height helper\n///\n/// @param {Number} $size - Point from the type scale (the size as it would\n/// appear on tablet and above)\n/// @param {Number} $override-line-height [false] - Non responsive custom line\n/// height. Omit to use the line height from the font map.\n/// @param {Boolean} $important [false] - Whether to mark declarations as\n/// `!important`.\n///\n/// @throw if `$size` is not a valid point from the type scale\n///\n/// @access public\n///\n/// @alias govuk-font-size\n/// @deprecated Use `govuk-font-size` instead\n\n@mixin govuk-typography-responsive($size, $override-line-height: false, $important: false) {\n @include _warning(\n \"govuk-typography-responsive\",\n \"govuk-typography-responsive is deprecated. Use govuk-font-size instead.\"\n );\n @include govuk-font-size($size, $override-line-height, $important);\n}\n\n/// Font size and line height helper\n///\n/// Takes a point from the responsive 'font map' as an argument (the size as it\n/// would appear on tablet and above), and uses it to create font-size and\n/// line-height declarations for different breakpoints, and print.\n///\n/// Example font map:\n///\n/// ```scss\n/// 19: (\n/// null: (\n/// font-size: 16px,\n/// line-height: 20px\n/// ),\n/// tablet: (\n/// font-size: 19px,\n/// line-height: 25px\n/// ),\n/// print: (\n/// font-size: 14pt,\n/// line-height: 1.15\n/// )\n/// );\n/// ```\n///\n/// @param {Number | String} $size - Point from the type scale (the size as\n/// it would appear on tablet and above)\n/// @param {Number} $line-height [false] - Non responsive custom line\n/// height. Omit to use the line height from the font map.\n/// @param {Boolean} $important [false] - Whether to mark declarations as\n/// `!important`.\n///\n/// @throw if `$size` is not a valid point from the type scale\n///\n/// @access public\n\n@mixin govuk-font-size($size, $line-height: false, $important: false) {\n // Flag font sizes that start with underscores so we can suppress warnings on\n // deprecated sizes used internally, for example `govuk-font($size: \"_14\")`\n $size-internal-use-only: str-slice(#{$size}, 1, 1) == \"_\";\n\n // Remove underscore from font sizes flagged for internal use\n @if $size-internal-use-only {\n $size: str-slice(#{$size}, 2);\n }\n\n // Check for a font map exactly matching the given size\n $font-map: map-get($govuk-typography-scale, $size);\n\n // No match? Try with string type (e.g. $size: \"16\" not 16)\n @if not $font-map {\n @each $font-size in map-keys($govuk-typography-scale) {\n @if not $font-map and \"#{$font-size}\" == \"#{$size}\" {\n $font-map: map-get($govuk-typography-scale, $font-size);\n }\n }\n }\n\n // Still no match? Throw error\n @if not $font-map {\n @error \"Unknown font size `#{$size}` - expected a point from the type scale.\";\n }\n\n // Check for a deprecation within the type scale\n $deprecation: map-get($font-map, \"deprecation\");\n\n @if $deprecation {\n // Warn on deprecated font sizes unless flagged for internal use\n @if not $size-internal-use-only {\n @include _warning(map-get($deprecation, \"key\"), map-get($deprecation, \"message\"));\n }\n\n // remove the deprecation map keys so they do not break the breakpoint loop\n $font-map: map-remove($font-map, \"deprecation\");\n }\n\n @each $breakpoint, $breakpoint-map in $font-map {\n $font-size: map-get($breakpoint-map, \"font-size\");\n $font-size-rem: govuk-px-to-rem($font-size);\n\n // $calculated-line-height is a separate variable from $line-height,\n // as otherwise the value would get redefined with each loop and\n // eventually break _govuk-line-height.\n //\n // We continue to call the param $line-height to stay consistent with the\n // naming with govuk-font.\n $calculated-line-height: _govuk-line-height(\n $line-height: if($line-height, $line-height, map-get($breakpoint-map, \"line-height\")),\n $font-size: $font-size\n );\n\n // Mark rules as !important if $important is true - this will result in\n // these variables becoming strings, so this needs to happen *after* they\n // are used in calculations\n $font-size: $font-size if($important, !important, null);\n $font-size-rem: $font-size-rem if($important, !important, null);\n $calculated-line-height: $calculated-line-height if($important, !important, null);\n\n @if not $breakpoint {\n font-size: $font-size-rem;\n line-height: $calculated-line-height;\n } @else if $breakpoint == \"print\" {\n @media print {\n font-size: $font-size;\n line-height: $calculated-line-height;\n }\n } @else {\n @media #{govuk-from-breakpoint($breakpoint)} {\n font-size: $font-size-rem;\n line-height: $calculated-line-height;\n }\n }\n }\n}\n\n/// Font helper\n///\n/// @param {Number | Boolean | String} $size Point from the type scale (the\n/// size as it would appear on tablet and above). Use `false` to avoid setting\n/// a size.\n/// @param {String} $weight [regular] - Weight: `bold` or `regular`\n/// @param {Boolean} $tabular [false] - Whether to use tabular numbers or not\n/// @param {Number} $line-height [false] - Line-height, if overriding the\n/// default\n///\n/// @throw if `$size` is not a valid point from the type scale (or false)\n///\n/// @access public\n\n@mixin govuk-font($size, $weight: regular, $tabular: false, $line-height: false) {\n @include govuk-typography-common;\n\n @if $tabular {\n @include govuk-font-tabular-numbers;\n }\n\n @if $weight == regular {\n @include govuk-typography-weight-regular;\n } @else if $weight == bold {\n @include govuk-typography-weight-bold;\n }\n\n @if $size {\n @include govuk-font-size($size, $line-height);\n }\n}\n"]}
@@ -55,7 +55,7 @@ class I18n {
55
55
  return 'other';
56
56
  }
57
57
  const translation = this.translations[lookupKey];
58
- const preferredForm = this.hasIntlPluralRulesSupport() ? new Intl.PluralRules(this.locale).select(count) : this.selectPluralFormUsingFallbackRules(count);
58
+ const preferredForm = this.hasIntlPluralRulesSupport() ? new Intl.PluralRules(this.locale).select(count) : 'other';
59
59
  if (isObject(translation)) {
60
60
  if (preferredForm in translation) {
61
61
  return preferredForm;
@@ -66,132 +66,7 @@ class I18n {
66
66
  }
67
67
  throw new Error(`i18n: Plural form ".other" is required for "${this.locale}" locale`);
68
68
  }
69
- selectPluralFormUsingFallbackRules(count) {
70
- count = Math.abs(Math.floor(count));
71
- const ruleset = this.getPluralRulesForLocale();
72
- if (ruleset) {
73
- return I18n.pluralRules[ruleset](count);
74
- }
75
- return 'other';
76
- }
77
- getPluralRulesForLocale() {
78
- const localeShort = this.locale.split('-')[0];
79
- for (const pluralRule in I18n.pluralRulesMap) {
80
- const languages = I18n.pluralRulesMap[pluralRule];
81
- if (languages.includes(this.locale) || languages.includes(localeShort)) {
82
- return pluralRule;
83
- }
84
- }
85
- }
86
69
  }
87
- I18n.pluralRulesMap = {
88
- arabic: ['ar'],
89
- chinese: ['my', 'zh', 'id', 'ja', 'jv', 'ko', 'ms', 'th', 'vi'],
90
- french: ['hy', 'bn', 'fr', 'gu', 'hi', 'fa', 'pa', 'zu'],
91
- german: ['af', 'sq', 'az', 'eu', 'bg', 'ca', 'da', 'nl', 'en', 'et', 'fi', 'ka', 'de', 'el', 'hu', 'lb', 'no', 'so', 'sw', 'sv', 'ta', 'te', 'tr', 'ur'],
92
- irish: ['ga'],
93
- russian: ['ru', 'uk'],
94
- scottish: ['gd'],
95
- spanish: ['pt-PT', 'it', 'es'],
96
- welsh: ['cy']
97
- };
98
- I18n.pluralRules = {
99
- arabic(n) {
100
- if (n === 0) {
101
- return 'zero';
102
- }
103
- if (n === 1) {
104
- return 'one';
105
- }
106
- if (n === 2) {
107
- return 'two';
108
- }
109
- if (n % 100 >= 3 && n % 100 <= 10) {
110
- return 'few';
111
- }
112
- if (n % 100 >= 11 && n % 100 <= 99) {
113
- return 'many';
114
- }
115
- return 'other';
116
- },
117
- chinese() {
118
- return 'other';
119
- },
120
- french(n) {
121
- return n === 0 || n === 1 ? 'one' : 'other';
122
- },
123
- german(n) {
124
- return n === 1 ? 'one' : 'other';
125
- },
126
- irish(n) {
127
- if (n === 1) {
128
- return 'one';
129
- }
130
- if (n === 2) {
131
- return 'two';
132
- }
133
- if (n >= 3 && n <= 6) {
134
- return 'few';
135
- }
136
- if (n >= 7 && n <= 10) {
137
- return 'many';
138
- }
139
- return 'other';
140
- },
141
- russian(n) {
142
- const lastTwo = n % 100;
143
- const last = lastTwo % 10;
144
- if (last === 1 && lastTwo !== 11) {
145
- return 'one';
146
- }
147
- if (last >= 2 && last <= 4 && !(lastTwo >= 12 && lastTwo <= 14)) {
148
- return 'few';
149
- }
150
- if (last === 0 || last >= 5 && last <= 9 || lastTwo >= 11 && lastTwo <= 14) {
151
- return 'many';
152
- }
153
- return 'other';
154
- },
155
- scottish(n) {
156
- if (n === 1 || n === 11) {
157
- return 'one';
158
- }
159
- if (n === 2 || n === 12) {
160
- return 'two';
161
- }
162
- if (n >= 3 && n <= 10 || n >= 13 && n <= 19) {
163
- return 'few';
164
- }
165
- return 'other';
166
- },
167
- spanish(n) {
168
- if (n === 1) {
169
- return 'one';
170
- }
171
- if (n % 1000000 === 0 && n !== 0) {
172
- return 'many';
173
- }
174
- return 'other';
175
- },
176
- welsh(n) {
177
- if (n === 0) {
178
- return 'zero';
179
- }
180
- if (n === 1) {
181
- return 'one';
182
- }
183
- if (n === 2) {
184
- return 'two';
185
- }
186
- if (n === 3) {
187
- return 'few';
188
- }
189
- if (n === 6) {
190
- return 'many';
191
- }
192
- return 'other';
193
- }
194
- };
195
70
 
196
71
  export { I18n };
197
72
  //# sourceMappingURL=i18n.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"i18n.mjs","sources":["../../src/govuk/i18n.mjs"],"sourcesContent":["import { isObject } from './common/index.mjs'\n\n/**\n * Internal support for selecting messages to render, with placeholder\n * interpolation and locale-aware number formatting and pluralisation\n *\n * @internal\n */\nexport class I18n {\n translations\n locale\n\n /**\n * @internal\n * @param {{ [key: string]: string | TranslationPluralForms }} translations - Key-value pairs of the translation strings to use.\n * @param {object} [config] - Configuration options for the function.\n * @param {string | null} [config.locale] - An overriding locale for the PluralRules functionality.\n */\n constructor(translations = {}, config = {}) {\n // Make list of translations available throughout function\n this.translations = translations\n\n // The locale to use for PluralRules and NumberFormat\n this.locale = config.locale ?? (document.documentElement.lang || 'en')\n }\n\n /**\n * The most used function - takes the key for a given piece of UI text and\n * returns the appropriate string.\n *\n * @internal\n * @param {string} lookupKey - The lookup key of the string to use.\n * @param {{ [key: string]: unknown }} [options] - Any options passed with the translation string, e.g: for string interpolation.\n * @returns {string} The appropriate translation string.\n * @throws {Error} Lookup key required\n * @throws {Error} Options required for `${}` placeholders\n */\n t(lookupKey, options) {\n if (!lookupKey) {\n // Print a console error if no lookup key has been provided\n throw new Error('i18n: lookup key missing')\n }\n\n // Fetch the translation for that lookup key\n let translation = this.translations[lookupKey]\n\n // If the `count` option is set, determine which plural suffix is needed and\n // change the lookupKey to match. We check to see if it's numeric instead of\n // falsy, as this could legitimately be 0.\n if (typeof options?.count === 'number' && isObject(translation)) {\n const translationPluralForm =\n translation[this.getPluralSuffix(lookupKey, options.count)]\n\n // Update translation with plural suffix\n if (translationPluralForm) {\n translation = translationPluralForm\n }\n }\n\n if (typeof translation === 'string') {\n // Check for ${} placeholders in the translation string\n // eslint-disable-next-line @typescript-eslint/prefer-regexp-exec\n if (translation.match(/%{(.\\S+)}/)) {\n if (!options) {\n throw new Error(\n 'i18n: cannot replace placeholders in string if no option data provided'\n )\n }\n\n return this.replacePlaceholders(translation, options)\n }\n\n return translation\n }\n\n // If the key wasn't found in our translations object,\n // return the lookup key itself as the fallback\n return lookupKey\n }\n\n /**\n * Takes a translation string with placeholders, and replaces the placeholders\n * with the provided data\n *\n * @internal\n * @param {string} translationString - The translation string\n * @param {{ [key: string]: unknown }} options - Any options passed with the translation string, e.g: for string interpolation.\n * @returns {string} The translation string to output, with $\\{\\} placeholders replaced\n */\n replacePlaceholders(translationString, options) {\n const formatter = Intl.NumberFormat.supportedLocalesOf(this.locale).length\n ? new Intl.NumberFormat(this.locale)\n : undefined\n\n return translationString.replace(\n /%{(.\\S+)}/g,\n\n /**\n * Replace translation string placeholders\n *\n * @internal\n * @param {string} placeholderWithBraces - Placeholder with braces\n * @param {string} placeholderKey - Placeholder key\n * @returns {string} Placeholder value\n */\n function (placeholderWithBraces, placeholderKey) {\n if (Object.prototype.hasOwnProperty.call(options, placeholderKey)) {\n const placeholderValue = options[placeholderKey]\n\n // If a user has passed `false` as the value for the placeholder\n // treat it as though the value should not be displayed\n if (\n placeholderValue === false ||\n (typeof placeholderValue !== 'number' &&\n typeof placeholderValue !== 'string')\n ) {\n return ''\n }\n\n // If the placeholder's value is a number, localise the number formatting\n if (typeof placeholderValue === 'number') {\n return formatter\n ? formatter.format(placeholderValue)\n : `${placeholderValue}`\n }\n\n return placeholderValue\n }\n\n throw new Error(\n `i18n: no data found to replace ${placeholderWithBraces} placeholder in string`\n )\n }\n )\n }\n\n /**\n * Check to see if the browser supports Intl.PluralRules\n *\n * It requires all conditions to be met in order to be supported:\n * - The implementation of Intl supports PluralRules (NOT true in Safari 10–12)\n * - The browser/OS has plural rules for the current locale (browser dependent)\n *\n * {@link https://browsersl.ist/#q=supports+es6-module+and+not+supports+intl-pluralrules}\n *\n * @internal\n * @returns {boolean} Returns true if all conditions are met. Returns false otherwise.\n */\n hasIntlPluralRulesSupport() {\n return Boolean(\n 'PluralRules' in window.Intl &&\n Intl.PluralRules.supportedLocalesOf(this.locale).length\n )\n }\n\n /**\n * Get the appropriate suffix for the plural form.\n *\n * Uses Intl.PluralRules (or our own fallback implementation) to get the\n * 'preferred' form to use for the given count.\n *\n * Checks that a translation has been provided for that plural form – if it\n * hasn't, it'll fall back to the 'other' plural form (unless that doesn't exist\n * either, in which case an error will be thrown)\n *\n * @internal\n * @param {string} lookupKey - The lookup key of the string to use.\n * @param {number} count - Number used to determine which pluralisation to use.\n * @returns {PluralRule} The suffix associated with the correct pluralisation for this locale.\n * @throws {Error} Plural form `.other` required when preferred plural form is missing\n */\n getPluralSuffix(lookupKey, count) {\n // Validate that the number is actually a number.\n //\n // Number(count) will turn anything that can't be converted to a Number type\n // into 'NaN'. isFinite filters out NaN, as it isn't a finite number.\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-conversion\n count = Number(count)\n if (!isFinite(count)) {\n return 'other'\n }\n\n // Fetch the translation for that lookup key\n const translation = this.translations[lookupKey]\n\n // Check to verify that all the requirements for Intl.PluralRules are met.\n // If so, we can use that instead of our custom implementation. Otherwise,\n // use the hardcoded fallback.\n const preferredForm = this.hasIntlPluralRulesSupport()\n ? new Intl.PluralRules(this.locale).select(count)\n : this.selectPluralFormUsingFallbackRules(count)\n\n // Use the correct plural form if provided\n if (isObject(translation)) {\n if (preferredForm in translation) {\n return preferredForm\n // Fall back to `other` if the plural form is missing, but log a warning\n // to the console\n } else if ('other' in translation) {\n console.warn(\n `i18n: Missing plural form \".${preferredForm}\" for \"${this.locale}\" locale. Falling back to \".other\".`\n )\n\n return 'other'\n }\n }\n\n // If the required `other` plural form is missing, all we can do is error\n throw new Error(\n `i18n: Plural form \".other\" is required for \"${this.locale}\" locale`\n )\n }\n\n /**\n * Get the plural form using our fallback implementation\n *\n * This is split out into a separate function to make it easier to test the\n * fallback behaviour in an environment where Intl.PluralRules exists.\n *\n * @internal\n * @param {number} count - Number used to determine which pluralisation to use.\n * @returns {PluralRule} The pluralisation form for count in this locale.\n */\n selectPluralFormUsingFallbackRules(count) {\n // Currently our custom code can only handle positive integers, so let's\n // make sure our number is one of those.\n count = Math.abs(Math.floor(count))\n\n const ruleset = this.getPluralRulesForLocale()\n\n if (ruleset) {\n return I18n.pluralRules[ruleset](count)\n }\n\n return 'other'\n }\n\n /**\n * Work out which pluralisation rules to use for the current locale\n *\n * The locale may include a regional indicator (such as en-GB), but we don't\n * usually care about this part, as pluralisation rules are usually the same\n * regardless of region. There are exceptions, however, (e.g. Portuguese) so\n * this searches by both the full and shortened locale codes, just to be sure.\n *\n * @internal\n * @returns {string | undefined} The name of the pluralisation rule to use (a key for one\n * of the functions in this.pluralRules)\n */\n getPluralRulesForLocale() {\n const localeShort = this.locale.split('-')[0]\n\n // Look through the plural rules map to find which `pluralRule` is\n // appropriate for our current `locale`.\n for (const pluralRule in I18n.pluralRulesMap) {\n const languages = I18n.pluralRulesMap[pluralRule]\n if (languages.includes(this.locale) || languages.includes(localeShort)) {\n return pluralRule\n }\n }\n }\n\n /**\n * Map of plural rules to languages where those rules apply.\n *\n * Note: These groups are named for the most dominant or recognisable language\n * that uses each system. The groupings do not imply that the languages are\n * related to one another. Many languages have evolved the same systems\n * independently of one another.\n *\n * Code to support more languages can be found in the i18n spike:\n * {@link https://github.com/alphagov/govuk-frontend/blob/spike-i18n-support/src/govuk/i18n.mjs}\n *\n * Languages currently supported:\n *\n * Arabic: Arabic (ar)\n * Chinese: Burmese (my), Chinese (zh), Indonesian (id), Japanese (ja),\n * Javanese (jv), Korean (ko), Malay (ms), Thai (th), Vietnamese (vi)\n * French: Armenian (hy), Bangla (bn), French (fr), Gujarati (gu), Hindi (hi),\n * Persian Farsi (fa), Punjabi (pa), Zulu (zu)\n * German: Afrikaans (af), Albanian (sq), Azerbaijani (az), Basque (eu),\n * Bulgarian (bg), Catalan (ca), Danish (da), Dutch (nl), English (en),\n * Estonian (et), Finnish (fi), Georgian (ka), German (de), Greek (el),\n * Hungarian (hu), Luxembourgish (lb), Norwegian (no), Somali (so),\n * Swahili (sw), Swedish (sv), Tamil (ta), Telugu (te), Turkish (tr),\n * Urdu (ur)\n * Irish: Irish Gaelic (ga)\n * Russian: Russian (ru), Ukrainian (uk)\n * Scottish: Scottish Gaelic (gd)\n * Spanish: European Portuguese (pt-PT), Italian (it), Spanish (es)\n * Welsh: Welsh (cy)\n *\n * @internal\n * @type {{ [key: string]: string[] }}\n */\n static pluralRulesMap = {\n arabic: ['ar'],\n chinese: ['my', 'zh', 'id', 'ja', 'jv', 'ko', 'ms', 'th', 'vi'],\n french: ['hy', 'bn', 'fr', 'gu', 'hi', 'fa', 'pa', 'zu'],\n german: [\n 'af',\n 'sq',\n 'az',\n 'eu',\n 'bg',\n 'ca',\n 'da',\n 'nl',\n 'en',\n 'et',\n 'fi',\n 'ka',\n 'de',\n 'el',\n 'hu',\n 'lb',\n 'no',\n 'so',\n 'sw',\n 'sv',\n 'ta',\n 'te',\n 'tr',\n 'ur'\n ],\n irish: ['ga'],\n russian: ['ru', 'uk'],\n scottish: ['gd'],\n spanish: ['pt-PT', 'it', 'es'],\n welsh: ['cy']\n }\n\n /**\n * Different pluralisation rule sets\n *\n * Returns the appropriate suffix for the plural form associated with `n`.\n * Possible suffixes: 'zero', 'one', 'two', 'few', 'many', 'other' (the actual\n * meaning of each differs per locale). 'other' should always exist, even in\n * languages without plurals, such as Chinese.\n * {@link https://cldr.unicode.org/index/cldr-spec/plural-rules}\n *\n * The count must be a positive integer. Negative numbers and decimals aren't accounted for\n *\n * @internal\n * @type {{ [key: string]: (count: number) => PluralRule }}\n */\n static pluralRules = {\n arabic(n) {\n if (n === 0) {\n return 'zero'\n }\n if (n === 1) {\n return 'one'\n }\n if (n === 2) {\n return 'two'\n }\n if (n % 100 >= 3 && n % 100 <= 10) {\n return 'few'\n }\n if (n % 100 >= 11 && n % 100 <= 99) {\n return 'many'\n }\n return 'other'\n },\n chinese() {\n return 'other'\n },\n french(n) {\n return n === 0 || n === 1 ? 'one' : 'other'\n },\n german(n) {\n return n === 1 ? 'one' : 'other'\n },\n irish(n) {\n if (n === 1) {\n return 'one'\n }\n if (n === 2) {\n return 'two'\n }\n if (n >= 3 && n <= 6) {\n return 'few'\n }\n if (n >= 7 && n <= 10) {\n return 'many'\n }\n return 'other'\n },\n russian(n) {\n const lastTwo = n % 100\n const last = lastTwo % 10\n if (last === 1 && lastTwo !== 11) {\n return 'one'\n }\n if (last >= 2 && last <= 4 && !(lastTwo >= 12 && lastTwo <= 14)) {\n return 'few'\n }\n if (\n last === 0 ||\n (last >= 5 && last <= 9) ||\n (lastTwo >= 11 && lastTwo <= 14)\n ) {\n return 'many'\n }\n // Note: The 'other' suffix is only used by decimal numbers in Russian.\n // We don't anticipate it being used, but it's here for consistency.\n return 'other'\n },\n scottish(n) {\n if (n === 1 || n === 11) {\n return 'one'\n }\n if (n === 2 || n === 12) {\n return 'two'\n }\n if ((n >= 3 && n <= 10) || (n >= 13 && n <= 19)) {\n return 'few'\n }\n return 'other'\n },\n spanish(n) {\n if (n === 1) {\n return 'one'\n }\n if (n % 1000000 === 0 && n !== 0) {\n return 'many'\n }\n return 'other'\n },\n welsh(n) {\n if (n === 0) {\n return 'zero'\n }\n if (n === 1) {\n return 'one'\n }\n if (n === 2) {\n return 'two'\n }\n if (n === 3) {\n return 'few'\n }\n if (n === 6) {\n return 'many'\n }\n return 'other'\n }\n }\n}\n\n/**\n * Plural rule category mnemonic tags\n *\n * @internal\n * @typedef {'zero' | 'one' | 'two' | 'few' | 'many' | 'other'} PluralRule\n */\n\n/**\n * Translated message by plural rule they correspond to.\n *\n * Allows to group pluralised messages under a single key when passing\n * translations to a component's constructor\n *\n * @internal\n * @typedef {object} TranslationPluralForms\n * @property {string} [other] - General plural form\n * @property {string} [zero] - Plural form used with 0\n * @property {string} [one] - Plural form used with 1\n * @property {string} [two] - Plural form used with 2\n * @property {string} [few] - Plural form used for a few\n * @property {string} [many] - Plural form used for many\n */\n"],"names":["I18n","constructor","translations","config","_config$locale","locale","document","documentElement","lang","t","lookupKey","options","Error","translation","count","isObject","translationPluralForm","getPluralSuffix","match","replacePlaceholders","translationString","formatter","Intl","NumberFormat","supportedLocalesOf","length","undefined","replace","placeholderWithBraces","placeholderKey","Object","prototype","hasOwnProperty","call","placeholderValue","format","hasIntlPluralRulesSupport","Boolean","window","PluralRules","Number","isFinite","preferredForm","select","selectPluralFormUsingFallbackRules","console","warn","Math","abs","floor","ruleset","getPluralRulesForLocale","pluralRules","localeShort","split","pluralRule","pluralRulesMap","languages","includes","arabic","chinese","french","german","irish","russian","scottish","spanish","welsh","n","lastTwo","last"],"mappings":";;AAQO,MAAMA,IAAI,CAAC;EAUhBC,WAAWA,CAACC,YAAY,GAAG,EAAE,EAAEC,MAAM,GAAG,EAAE,EAAE;AAAA,IAAA,IAAAC,cAAA;AAAA,IAAA,IAAA,CAT5CF,YAAY,GAAA,MAAA;AAAA,IAAA,IAAA,CACZG,MAAM,GAAA,MAAA;IAUJ,IAAI,CAACH,YAAY,GAAGA,YAAY;AAGhC,IAAA,IAAI,CAACG,MAAM,GAAA,CAAAD,cAAA,GAAGD,MAAM,CAACE,MAAM,KAAA,IAAA,GAAAD,cAAA,GAAKE,QAAQ,CAACC,eAAe,CAACC,IAAI,IAAI,IAAK;AACxE,EAAA;AAaAC,EAAAA,CAACA,CAACC,SAAS,EAAEC,OAAO,EAAE;IACpB,IAAI,CAACD,SAAS,EAAE;AAEd,MAAA,MAAM,IAAIE,KAAK,CAAC,0BAA0B,CAAC;AAC7C,IAAA;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AAK,CAAC,EAAE;AACX,MAAA,OAAO,MAAM;AACf,IAAA;AACA,IAAA,OAAO,OAAO;AAChB,EAAA;AACF,CAAC;;;;"}
1
+ {"version":3,"file":"i18n.mjs","sources":["../../src/govuk/i18n.mjs"],"sourcesContent":["import { isObject } from './common/index.mjs'\n\n/**\n * Internal support for selecting messages to render, with placeholder\n * interpolation and locale-aware number formatting and pluralisation\n *\n * @internal\n */\nexport class I18n {\n translations\n locale\n\n /**\n * @internal\n * @param {{ [key: string]: string | TranslationPluralForms }} translations - Key-value pairs of the translation strings to use.\n * @param {object} [config] - Configuration options for the function.\n * @param {string | null} [config.locale] - An overriding locale for the PluralRules functionality.\n */\n constructor(translations = {}, config = {}) {\n // Make list of translations available throughout function\n this.translations = translations\n\n // The locale to use for PluralRules and NumberFormat\n this.locale = config.locale ?? (document.documentElement.lang || 'en')\n }\n\n /**\n * The most used function - takes the key for a given piece of UI text and\n * returns the appropriate string.\n *\n * @internal\n * @param {string} lookupKey - The lookup key of the string to use.\n * @param {{ [key: string]: unknown }} [options] - Any options passed with the translation string, e.g: for string interpolation.\n * @returns {string} The appropriate translation string.\n * @throws {Error} Lookup key required\n * @throws {Error} Options required for `${}` placeholders\n */\n t(lookupKey, options) {\n if (!lookupKey) {\n // Print a console error if no lookup key has been provided\n throw new Error('i18n: lookup key missing')\n }\n\n // Fetch the translation for that lookup key\n let translation = this.translations[lookupKey]\n\n // If the `count` option is set, determine which plural suffix is needed and\n // change the lookupKey to match. We check to see if it's numeric instead of\n // falsy, as this could legitimately be 0.\n if (typeof options?.count === 'number' && isObject(translation)) {\n const translationPluralForm =\n translation[this.getPluralSuffix(lookupKey, options.count)]\n\n // Update translation with plural suffix\n if (translationPluralForm) {\n translation = translationPluralForm\n }\n }\n\n if (typeof translation === 'string') {\n // Check for ${} placeholders in the translation string\n // eslint-disable-next-line @typescript-eslint/prefer-regexp-exec\n if (translation.match(/%{(.\\S+)}/)) {\n if (!options) {\n throw new Error(\n 'i18n: cannot replace placeholders in string if no option data provided'\n )\n }\n\n return this.replacePlaceholders(translation, options)\n }\n\n return translation\n }\n\n // If the key wasn't found in our translations object,\n // return the lookup key itself as the fallback\n return lookupKey\n }\n\n /**\n * Takes a translation string with placeholders, and replaces the placeholders\n * with the provided data\n *\n * @internal\n * @param {string} translationString - The translation string\n * @param {{ [key: string]: unknown }} options - Any options passed with the translation string, e.g: for string interpolation.\n * @returns {string} The translation string to output, with $\\{\\} placeholders replaced\n */\n replacePlaceholders(translationString, options) {\n const formatter = Intl.NumberFormat.supportedLocalesOf(this.locale).length\n ? new Intl.NumberFormat(this.locale)\n : undefined\n\n return translationString.replace(\n /%{(.\\S+)}/g,\n\n /**\n * Replace translation string placeholders\n *\n * @internal\n * @param {string} placeholderWithBraces - Placeholder with braces\n * @param {string} placeholderKey - Placeholder key\n * @returns {string} Placeholder value\n */\n function (placeholderWithBraces, placeholderKey) {\n if (Object.prototype.hasOwnProperty.call(options, placeholderKey)) {\n const placeholderValue = options[placeholderKey]\n\n // If a user has passed `false` as the value for the placeholder\n // treat it as though the value should not be displayed\n if (\n placeholderValue === false ||\n (typeof placeholderValue !== 'number' &&\n typeof placeholderValue !== 'string')\n ) {\n return ''\n }\n\n // If the placeholder's value is a number, localise the number formatting\n if (typeof placeholderValue === 'number') {\n return formatter\n ? formatter.format(placeholderValue)\n : `${placeholderValue}`\n }\n\n return placeholderValue\n }\n\n throw new Error(\n `i18n: no data found to replace ${placeholderWithBraces} placeholder in string`\n )\n }\n )\n }\n\n /**\n * Check to see if the browser supports Intl.PluralRules\n *\n * It requires all conditions to be met in order to be supported:\n * - The implementation of Intl supports PluralRules (NOT true in Safari 10–12)\n * - The browser/OS has plural rules for the current locale (browser dependent)\n *\n * {@link https://browsersl.ist/#q=supports+es6-module+and+not+supports+intl-pluralrules}\n *\n * @internal\n * @returns {boolean} Returns true if all conditions are met. Returns false otherwise.\n */\n hasIntlPluralRulesSupport() {\n return Boolean(\n 'PluralRules' in window.Intl &&\n Intl.PluralRules.supportedLocalesOf(this.locale).length\n )\n }\n\n /**\n * Get the appropriate suffix for the plural form.\n *\n * Uses Intl.PluralRules (or our own fallback implementation) to get the\n * 'preferred' form to use for the given count.\n *\n * Checks that a translation has been provided for that plural form – if it\n * hasn't, it'll fall back to the 'other' plural form (unless that doesn't exist\n * either, in which case an error will be thrown)\n *\n * @internal\n * @param {string} lookupKey - The lookup key of the string to use.\n * @param {number} count - Number used to determine which pluralisation to use.\n * @returns {PluralRule} The suffix associated with the correct pluralisation for this locale.\n * @throws {Error} Plural form `.other` required when preferred plural form is missing\n */\n getPluralSuffix(lookupKey, count) {\n // Validate that the number is actually a number.\n //\n // Number(count) will turn anything that can't be converted to a Number type\n // into 'NaN'. isFinite filters out NaN, as it isn't a finite number.\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-conversion\n count = Number(count)\n if (!isFinite(count)) {\n return 'other'\n }\n\n // Fetch the translation for that lookup key\n const translation = this.translations[lookupKey]\n\n // Check to verify that all the requirements for Intl.PluralRules are met.\n // If so, we can use that instead of our custom implementation. Otherwise,\n // use the hardcoded fallback.\n const preferredForm = this.hasIntlPluralRulesSupport()\n ? new Intl.PluralRules(this.locale).select(count)\n : 'other'\n\n // Use the correct plural form if provided\n if (isObject(translation)) {\n if (preferredForm in translation) {\n return preferredForm\n // Fall back to `other` if the plural form is missing, but log a warning\n // to the console\n } else if ('other' in translation) {\n console.warn(\n `i18n: Missing plural form \".${preferredForm}\" for \"${this.locale}\" locale. Falling back to \".other\".`\n )\n\n return 'other'\n }\n }\n\n // If the required `other` plural form is missing, all we can do is error\n throw new Error(\n `i18n: Plural form \".other\" is required for \"${this.locale}\" locale`\n )\n }\n}\n\n/**\n * Plural rule category mnemonic tags\n *\n * @internal\n * @typedef {'zero' | 'one' | 'two' | 'few' | 'many' | 'other'} PluralRule\n */\n\n/**\n * Translated message by plural rule they correspond to.\n *\n * Allows to group pluralised messages under a single key when passing\n * translations to a component's constructor\n *\n * @internal\n * @typedef {object} TranslationPluralForms\n * @property {string} [other] - General plural form\n * @property {string} [zero] - Plural form used with 0\n * @property {string} [one] - Plural form used with 1\n * @property {string} [two] - Plural form used with 2\n * @property {string} [few] - Plural form used for a few\n * @property {string} [many] - Plural form used for many\n */\n"],"names":["I18n","constructor","translations","config","_config$locale","locale","document","documentElement","lang","t","lookupKey","options","Error","translation","count","isObject","translationPluralForm","getPluralSuffix","match","replacePlaceholders","translationString","formatter","Intl","NumberFormat","supportedLocalesOf","length","undefined","replace","placeholderWithBraces","placeholderKey","Object","prototype","hasOwnProperty","call","placeholderValue","format","hasIntlPluralRulesSupport","Boolean","window","PluralRules","Number","isFinite","preferredForm","select","console","warn"],"mappings":";;AAQO,MAAMA,IAAI,CAAC;EAUhBC,WAAWA,CAACC,YAAY,GAAG,EAAE,EAAEC,MAAM,GAAG,EAAE,EAAE;AAAA,IAAA,IAAAC,cAAA;AAAA,IAAA,IAAA,CAT5CF,YAAY,GAAA,MAAA;AAAA,IAAA,IAAA,CACZG,MAAM,GAAA,MAAA;IAUJ,IAAI,CAACH,YAAY,GAAGA,YAAY;AAGhC,IAAA,IAAI,CAACG,MAAM,GAAA,CAAAD,cAAA,GAAGD,MAAM,CAACE,MAAM,KAAA,IAAA,GAAAD,cAAA,GAAKE,QAAQ,CAACC,eAAe,CAACC,IAAI,IAAI,IAAK;AACxE,EAAA;AAaAC,EAAAA,CAACA,CAACC,SAAS,EAAEC,OAAO,EAAE;IACpB,IAAI,CAACD,SAAS,EAAE;AAEd,MAAA,MAAM,IAAIE,KAAK,CAAC,0BAA0B,CAAC;AAC7C,IAAA;AAGA,IAAA,IAAIC,WAAW,GAAG,IAAI,CAACX,YAAY,CAACQ,SAAS,CAAC;AAK9C,IAAA,IAAI,QAAOC,OAAO,IAAA,IAAA,GAAA,MAAA,GAAPA,OAAO,CAAEG,KAAK,CAAA,KAAK,QAAQ,IAAIC,QAAQ,CAACF,WAAW,CAAC,EAAE;AAC/D,MAAA,MAAMG,qBAAqB,GACzBH,WAAW,CA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O,KAAK,CACb,CAAA,4CAAA,EAA+C,IAAI,CAACP,MAAM,UAC5D,CAAC;AACH,EAAA;AACF;;;;"}
@@ -57,7 +57,7 @@
57
57
 
58
58
  // On tablet and above, we also introduce a 'column gap' between the
59
59
  // buttons and links in each row and left align links
60
- @include govuk-media-query($from: tablet) {
60
+ @media #{govuk-from-breakpoint(tablet)} {
61
61
  // Cancel out the column gap for the last item in each row
62
62
  margin-right: ($horizontal-gap * -1);
63
63
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/govuk/objects/_button-group.scss"],"names":[],"mappings":"AAAA,iBAAiB;;AAEjB;EACE,2EAA2E;EAC3E,CAAC;EACD,wBAAwB;EACxB,CAAC;EACD,0EAA0E;EAC1E,4BAA4B;EAC5B,6EAA6E;EAC7E,wCAAwC;EACxC;IACE,iCAAiC;IACjC,+BAA+B;;IAE/B,kEAAkE;IAClE,iCAAiC;IACjC,qDAAqD;;IAErD,+BAA+B;;IAE/B,8EAA8E;;IAE9E,yEAAyE;IACzE,wEAAwE;IACxE,uEAAuE;IACvE,CAAC;IACD,0EAA0E;IAC1E,wEAAwE;IACxE,6BAA6B;IAC7B,mDAAmD;IACnD,aAAa;IACb,sBAAsB;IACtB,mBAAmB;;IAEnB,uEAAuE;IACvE,aAAa;IACb,CAAC;IACD,0EAA0E;IAC1E,8CAA8C;IAC9C;MACE,kDAAkD;MAClD,qBAAqB;MACrB,qEAAqE;MACrE,0BAA0B;MAC1B,eAAe;MACf,yBAAyB;MACzB,4CAA4C;MAC5C,kBAAkB;IACpB;;IAEA,yEAAyE;IACzE,sEAAsE;IACtE;MACE,kDAAkD;IACpD;;IAEA,mEAAmE;IACnE,oDAAoD;IACpD;MACE,yDAAyD;MACzD,oCAAoC;;MAEpC,mBAAmB;MACnB,eAAe;MACf,qBAAqB;;MAErB;;QAEE,6BAA6B;MAC/B;;MAEA;QACE,gBAAgB;MAClB;IACF;EACF;AACF","file":"_button-group.scss","sourcesContent":["@import \"../base\";\n\n@include govuk-exports(\"govuk/objects/button-group\") {\n // Button groups can be used to group buttons and links together as a group.\n //\n // Within a button group:\n //\n // - links are styled to line up visually with the buttons, including being\n // centre-aligned on mobile\n // - spacing between the buttons and links is handled automatically, including\n // when they wrap across multiple lines\n .govuk-button-group {\n $horizontal-gap: govuk-spacing(3);\n $vertical-gap: govuk-spacing(3);\n\n // These need to be kept in sync with the button component's styles\n $button-padding: govuk-spacing(2);\n $button-shadow-size: $govuk-border-width-form-element;\n\n $link-spacing: govuk-spacing(1);\n\n @include govuk-responsive-margin(6, \"bottom\", $adjustment: $vertical-gap * -1);\n\n // Flexbox is used to center-align links on mobile, align everything along\n // the baseline on tablet and above, and to removes extra whitespace that\n // we'd get between the buttons and links because they're inline-blocks.\n //\n // Ideally we'd use `gap` with flexbox rather than having to do it all with\n // margins, but unfortunately the support isn't there (yet) and @supports\n // doesn't play nicely with it\n // (https://github.com/w3c/csswg-drafts/issues/3559)\n display: flex;\n flex-direction: column;\n align-items: center;\n\n // Give links within the button group the same font-size and line-height\n // as buttons.\n //\n // Because we want the focus state to be tight around the link text, we use\n // margins where the buttons would use padding.\n .govuk-link {\n @include govuk-font($size: 19, $line-height: 19px);\n display: inline-block;\n // Prevent links overflowing their container in IE10/11 because of bug\n // with align-items: center\n max-width: 100%;\n margin-top: $link-spacing;\n margin-bottom: $link-spacing + $vertical-gap;\n text-align: center;\n }\n\n // Reduce the bottom margin to the size of the vertical gap (accommodating\n // the button shadow) – the 'lost' margin is moved to the button-group.\n .govuk-button {\n margin-bottom: $vertical-gap + $button-shadow-size;\n }\n\n // On tablet and above, we also introduce a 'column gap' between the\n // buttons and links in each row and left align links\n @include govuk-media-query($from: tablet) {\n // Cancel out the column gap for the last item in each row\n margin-right: ($horizontal-gap * -1);\n\n flex-direction: row;\n flex-wrap: wrap;\n align-items: baseline;\n\n .govuk-button,\n .govuk-link {\n margin-right: $horizontal-gap;\n }\n\n .govuk-link {\n text-align: left;\n }\n }\n }\n}\n"]}
1
+ {"version":3,"sources":["../../../src/govuk/objects/_button-group.scss"],"names":[],"mappings":"AAAA,iBAAiB;;AAEjB;EACE,2EAA2E;EAC3E,CAAC;EACD,wBAAwB;EACxB,CAAC;EACD,0EAA0E;EAC1E,4BAA4B;EAC5B,6EAA6E;EAC7E,wCAAwC;EACxC;IACE,iCAAiC;IACjC,+BAA+B;;IAE/B,kEAAkE;IAClE,iCAAiC;IACjC,qDAAqD;;IAErD,+BAA+B;;IAE/B,8EAA8E;;IAE9E,yEAAyE;IACzE,wEAAwE;IACxE,uEAAuE;IACvE,CAAC;IACD,0EAA0E;IAC1E,wEAAwE;IACxE,6BAA6B;IAC7B,mDAAmD;IACnD,aAAa;IACb,sBAAsB;IACtB,mBAAmB;;IAEnB,uEAAuE;IACvE,aAAa;IACb,CAAC;IACD,0EAA0E;IAC1E,8CAA8C;IAC9C;MACE,kDAAkD;MAClD,qBAAqB;MACrB,qEAAqE;MACrE,0BAA0B;MAC1B,eAAe;MACf,yBAAyB;MACzB,4CAA4C;MAC5C,kBAAkB;IACpB;;IAEA,yEAAyE;IACzE,sEAAsE;IACtE;MACE,kDAAkD;IACpD;;IAEA,mEAAmE;IACnE,oDAAoD;IACpD;MACE,yDAAyD;MACzD,oCAAoC;;MAEpC,mBAAmB;MACnB,eAAe;MACf,qBAAqB;;MAErB;;QAEE,6BAA6B;MAC/B;;MAEA;QACE,gBAAgB;MAClB;IACF;EACF;AACF","file":"_button-group.scss","sourcesContent":["@import \"../base\";\n\n@include govuk-exports(\"govuk/objects/button-group\") {\n // Button groups can be used to group buttons and links together as a group.\n //\n // Within a button group:\n //\n // - links are styled to line up visually with the buttons, including being\n // centre-aligned on mobile\n // - spacing between the buttons and links is handled automatically, including\n // when they wrap across multiple lines\n .govuk-button-group {\n $horizontal-gap: govuk-spacing(3);\n $vertical-gap: govuk-spacing(3);\n\n // These need to be kept in sync with the button component's styles\n $button-padding: govuk-spacing(2);\n $button-shadow-size: $govuk-border-width-form-element;\n\n $link-spacing: govuk-spacing(1);\n\n @include govuk-responsive-margin(6, \"bottom\", $adjustment: $vertical-gap * -1);\n\n // Flexbox is used to center-align links on mobile, align everything along\n // the baseline on tablet and above, and to removes extra whitespace that\n // we'd get between the buttons and links because they're inline-blocks.\n //\n // Ideally we'd use `gap` with flexbox rather than having to do it all with\n // margins, but unfortunately the support isn't there (yet) and @supports\n // doesn't play nicely with it\n // (https://github.com/w3c/csswg-drafts/issues/3559)\n display: flex;\n flex-direction: column;\n align-items: center;\n\n // Give links within the button group the same font-size and line-height\n // as buttons.\n //\n // Because we want the focus state to be tight around the link text, we use\n // margins where the buttons would use padding.\n .govuk-link {\n @include govuk-font($size: 19, $line-height: 19px);\n display: inline-block;\n // Prevent links overflowing their container in IE10/11 because of bug\n // with align-items: center\n max-width: 100%;\n margin-top: $link-spacing;\n margin-bottom: $link-spacing + $vertical-gap;\n text-align: center;\n }\n\n // Reduce the bottom margin to the size of the vertical gap (accommodating\n // the button shadow) – the 'lost' margin is moved to the button-group.\n .govuk-button {\n margin-bottom: $vertical-gap + $button-shadow-size;\n }\n\n // On tablet and above, we also introduce a 'column gap' between the\n // buttons and links in each row and left align links\n @media #{govuk-from-breakpoint(tablet)} {\n // Cancel out the column gap for the last item in each row\n margin-right: ($horizontal-gap * -1);\n\n flex-direction: row;\n flex-wrap: wrap;\n align-items: baseline;\n\n .govuk-button,\n .govuk-link {\n margin-right: $horizontal-gap;\n }\n\n .govuk-link {\n text-align: left;\n }\n }\n }\n}\n"]}
@@ -30,7 +30,7 @@
30
30
  padding-top: govuk-spacing(4);
31
31
  padding-bottom: govuk-spacing(4);
32
32
 
33
- @include govuk-media-query($from: tablet) {
33
+ @media #{govuk-from-breakpoint(tablet)} {
34
34
  // This spacing is manually adjusted to replicate the margin of
35
35
  // govuk-heading-xl (50px) minus the spacing of back link and
36
36
  // breadcrumbs (10px)
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/govuk/objects/_main-wrapper.scss"],"names":[],"mappings":"AAAA,iBAAiB;;AAEjB,GAAG;AACH,wBAAwB;AACxB,GAAG;;AAEH,4DAA4D;AAC5D,qCAAqC;AACrC,uEAAuE;AACvE,oCAAoC;AACpC,4EAA4E;AAC5E,oCAAoC;AACpC,UAAU;AACV,QAAQ;AACR,CAAC;AACD,+DAA+D;AAC/D,qCAAqC;AACrC,0DAA0D;AAC1D,4EAA4E;AAC5E,oCAAoC;AACpC,UAAU;AACV,QAAQ;;AAER;EACE;IACE,kEAAkE;IAClE,uDAAuD;IACvD,gDAAgD;IAChD,cAAc;IACd,6BAA6B;IAC7B,gCAAgC;;IAEhC;MACE,8DAA8D;MAC9D,4DAA4D;MAC5D,oBAAoB;MACpB,6BAA6B;MAC7B,gCAAgC;IAClC;EACF;;EAEA,yEAAyE;EACzE,6DAA6D;EAC7D,yEAAyE;EACzE,uDAAuD;EACvD,CAAC;EACD,sDAAsD;EACtD,2CAA2C;EAC3C;;IAEE,2CAA2C;EAC7C;AACF","file":"_main-wrapper.scss","sourcesContent":["@import \"../base\";\n\n////\n/// @group objects/layout\n////\n\n// Example usage with Breadcrumbs, phase banners, back links:\n// <div class=\"govuk-width-container\">\n// <!-- Breadcrumbs, phase banners, back links are placed in here. -->\n// <div class=\"govuk-main-wrapper\">\n// <!-- Wrapper for the main content of your page which applies padding\n// to the top / bottom -->\n// </div>\n// </div>\n//\n// Example usage without Breadcrumbs, phase banners, back links:\n// <div class=\"govuk-width-container\">\n// <div class=\"govuk-main-wrapper govuk-main-wrapper--l\">\n// <!-- Wrapper for the main content of your page which applies padding\n// to the top / bottom -->\n// </div>\n// </div>\n\n@include govuk-exports(\"govuk/objects/main-wrapper\") {\n .govuk-main-wrapper {\n // In IE11 the `main` element can be used, but is not recognized –\n // meaning it's not defined in IE's default style sheet,\n // so it uses CSS initial value, which is inline.\n display: block;\n padding-top: govuk-spacing(4);\n padding-bottom: govuk-spacing(4);\n\n @include govuk-media-query($from: tablet) {\n // This spacing is manually adjusted to replicate the margin of\n // govuk-heading-xl (50px) minus the spacing of back link and\n // breadcrumbs (10px)\n padding-top: govuk-spacing(7);\n padding-bottom: govuk-spacing(7);\n }\n }\n\n // Using the `.govuk-main-wrapper--auto-spacing` modifier should apply the\n // correct spacing depending on whether there are any elements\n // (such the back link, breadcrumbs or phase banner components) before the\n // `.govuk-main-wrapper` in the `govuk-width-container`.\n //\n // If you need to control the spacing manually, use the\n // `govuk-main-wrapper--l` modifier instead.\n .govuk-main-wrapper--auto-spacing:first-child,\n .govuk-main-wrapper--l {\n @include govuk-responsive-padding(8, \"top\");\n }\n}\n"]}
1
+ {"version":3,"sources":["../../../src/govuk/objects/_main-wrapper.scss"],"names":[],"mappings":"AAAA,iBAAiB;;AAEjB,GAAG;AACH,wBAAwB;AACxB,GAAG;;AAEH,4DAA4D;AAC5D,qCAAqC;AACrC,uEAAuE;AACvE,oCAAoC;AACpC,4EAA4E;AAC5E,oCAAoC;AACpC,UAAU;AACV,QAAQ;AACR,CAAC;AACD,+DAA+D;AAC/D,qCAAqC;AACrC,0DAA0D;AAC1D,4EAA4E;AAC5E,oCAAoC;AACpC,UAAU;AACV,QAAQ;;AAER;EACE;IACE,kEAAkE;IAClE,uDAAuD;IACvD,gDAAgD;IAChD,cAAc;IACd,6BAA6B;IAC7B,gCAAgC;;IAEhC;MACE,8DAA8D;MAC9D,4DAA4D;MAC5D,oBAAoB;MACpB,6BAA6B;MAC7B,gCAAgC;IAClC;EACF;;EAEA,yEAAyE;EACzE,6DAA6D;EAC7D,yEAAyE;EACzE,uDAAuD;EACvD,CAAC;EACD,sDAAsD;EACtD,2CAA2C;EAC3C;;IAEE,2CAA2C;EAC7C;AACF","file":"_main-wrapper.scss","sourcesContent":["@import \"../base\";\n\n////\n/// @group objects/layout\n////\n\n// Example usage with Breadcrumbs, phase banners, back links:\n// <div class=\"govuk-width-container\">\n// <!-- Breadcrumbs, phase banners, back links are placed in here. -->\n// <div class=\"govuk-main-wrapper\">\n// <!-- Wrapper for the main content of your page which applies padding\n// to the top / bottom -->\n// </div>\n// </div>\n//\n// Example usage without Breadcrumbs, phase banners, back links:\n// <div class=\"govuk-width-container\">\n// <div class=\"govuk-main-wrapper govuk-main-wrapper--l\">\n// <!-- Wrapper for the main content of your page which applies padding\n// to the top / bottom -->\n// </div>\n// </div>\n\n@include govuk-exports(\"govuk/objects/main-wrapper\") {\n .govuk-main-wrapper {\n // In IE11 the `main` element can be used, but is not recognized –\n // meaning it's not defined in IE's default style sheet,\n // so it uses CSS initial value, which is inline.\n display: block;\n padding-top: govuk-spacing(4);\n padding-bottom: govuk-spacing(4);\n\n @media #{govuk-from-breakpoint(tablet)} {\n // This spacing is manually adjusted to replicate the margin of\n // govuk-heading-xl (50px) minus the spacing of back link and\n // breadcrumbs (10px)\n padding-top: govuk-spacing(7);\n padding-bottom: govuk-spacing(7);\n }\n }\n\n // Using the `.govuk-main-wrapper--auto-spacing` modifier should apply the\n // correct spacing depending on whether there are any elements\n // (such the back link, breadcrumbs or phase banner components) before the\n // `.govuk-main-wrapper` in the `govuk-width-container`.\n //\n // If you need to control the spacing manually, use the\n // `govuk-main-wrapper--l` modifier instead.\n .govuk-main-wrapper--auto-spacing:first-child,\n .govuk-main-wrapper--l {\n @include govuk-responsive-padding(8, \"top\");\n }\n}\n"]}
@@ -39,7 +39,7 @@
39
39
 
40
40
  // Force the scrollbar to always display in IE, to prevent horizontal page
41
41
  // jumps as content height changes (e.g. autocomplete results open).
42
- @include govuk-media-query($media-type: screen) {
42
+ @media screen {
43
43
  overflow-y: scroll;
44
44
  }
45
45
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/govuk/objects/_template.scss"],"names":[],"mappings":"AAAA,iBAAiB;;AAEjB;EACE,+BAA+B;EAC/B;IACE,0EAA0E;IAC1E,+CAA+C;IAC/C;;;;KAIC;;IAED,0EAA0E;IAC1E,8DAA8D;IAC9D,8BAAsB;OAAtB,2BAAsB;YAAtB,sBAAsB;;IAEtB,sEAAsE;IACtE,sCAAsC;IACtC,CAAC;IACD,0EAA0E;IAC1E,kGAAkG;IAClG,iCAAiC;IACjC,CAAC;IACD,4EAA4E;IAC5E,yEAAyE;IACzE,oEAAoE;IACpE,+EAA+E;IAC/E,+CAA+C;IAC/C;MACE,oCAAoC;;MAEpC;QACE,qBAAqB;MACvB;IACF;;IAEA,yEAAyE;IACzE,mEAAmE;IACnE;MACE,kBAAkB;IACpB;EACF;;EAEA,+BAA+B;EAC/B;IACE,2EAA2E;IAC3E,iBAAiB;IACjB,SAAS;IACT,yEAAyE;IACzE,+CAA+C;EACjD;AACF","file":"_template.scss","sourcesContent":["@import \"../base\";\n\n@include govuk-exports(\"govuk/objects/template\") {\n // Applied to the <html> element\n .govuk-template {\n // Set the overall page background colour to the same colour as used by the\n // footer to give the illusion of a long footer.\n @include _govuk-rebrand(\n background-color,\n $from: $govuk-template-background-colour,\n $to: $_govuk-rebrand-template-background-colour\n );\n\n // Prevent automatic text sizing, as we already cater for small devices and\n // would like the browser to stay on 100% text zoom by default.\n text-size-adjust: 100%;\n\n // Add scroll padding to the top of govuk-template but remove it if the\n // exit this page component is present.\n //\n // This is a solution to exit this page potentially failing WCAG SC 2.4.12:\n // Focus Not Obscured (https://www.w3.org/WAI/WCAG22/Understanding/focus-not-obscured-minimum.html)\n // due to it's sticky positioning.\n //\n // This will apply scroll-padding-top in any browsers that don't support :has\n // (https://caniuse.com/css-has). This is part of the reason we do this in\n // a \"wrong way round\" way as we hypothesise that the risks of having\n // scroll-padding unnecessarily is better than risking not having scroll-padding\n // and needing it to account for exit this page.\n @supports (position: sticky) {\n scroll-padding-top: govuk-spacing(9);\n\n &:not(:has(.govuk-exit-this-page)) {\n scroll-padding-top: 0;\n }\n }\n\n // Force the scrollbar to always display in IE, to prevent horizontal page\n // jumps as content height changes (e.g. autocomplete results open).\n @include govuk-media-query($media-type: screen) {\n overflow-y: scroll;\n }\n }\n\n // Applied to the <body> element\n .govuk-template__body {\n // The default margins set by user-agents are not required since we have our\n // own containers.\n margin: 0;\n // Set the overall body of the page back to the typical background colour.\n background-color: $govuk-body-background-colour;\n }\n}\n"]}
1
+ {"version":3,"sources":["../../../src/govuk/objects/_template.scss"],"names":[],"mappings":"AAAA,iBAAiB;;AAEjB;EACE,+BAA+B;EAC/B;IACE,0EAA0E;IAC1E,+CAA+C;IAC/C;;;;KAIC;;IAED,0EAA0E;IAC1E,8DAA8D;IAC9D,8BAAsB;OAAtB,2BAAsB;YAAtB,sBAAsB;;IAEtB,sEAAsE;IACtE,sCAAsC;IACtC,CAAC;IACD,0EAA0E;IAC1E,kGAAkG;IAClG,iCAAiC;IACjC,CAAC;IACD,4EAA4E;IAC5E,yEAAyE;IACzE,oEAAoE;IACpE,+EAA+E;IAC/E,+CAA+C;IAC/C;MACE,oCAAoC;;MAEpC;QACE,qBAAqB;MACvB;IACF;;IAEA,yEAAyE;IACzE,mEAAmE;IACnE;MACE,kBAAkB;IACpB;EACF;;EAEA,+BAA+B;EAC/B;IACE,2EAA2E;IAC3E,iBAAiB;IACjB,SAAS;IACT,yEAAyE;IACzE,+CAA+C;EACjD;AACF","file":"_template.scss","sourcesContent":["@import \"../base\";\n\n@include govuk-exports(\"govuk/objects/template\") {\n // Applied to the <html> element\n .govuk-template {\n // Set the overall page background colour to the same colour as used by the\n // footer to give the illusion of a long footer.\n @include _govuk-rebrand(\n background-color,\n $from: $govuk-template-background-colour,\n $to: $_govuk-rebrand-template-background-colour\n );\n\n // Prevent automatic text sizing, as we already cater for small devices and\n // would like the browser to stay on 100% text zoom by default.\n text-size-adjust: 100%;\n\n // Add scroll padding to the top of govuk-template but remove it if the\n // exit this page component is present.\n //\n // This is a solution to exit this page potentially failing WCAG SC 2.4.12:\n // Focus Not Obscured (https://www.w3.org/WAI/WCAG22/Understanding/focus-not-obscured-minimum.html)\n // due to it's sticky positioning.\n //\n // This will apply scroll-padding-top in any browsers that don't support :has\n // (https://caniuse.com/css-has). This is part of the reason we do this in\n // a \"wrong way round\" way as we hypothesise that the risks of having\n // scroll-padding unnecessarily is better than risking not having scroll-padding\n // and needing it to account for exit this page.\n @supports (position: sticky) {\n scroll-padding-top: govuk-spacing(9);\n\n &:not(:has(.govuk-exit-this-page)) {\n scroll-padding-top: 0;\n }\n }\n\n // Force the scrollbar to always display in IE, to prevent horizontal page\n // jumps as content height changes (e.g. autocomplete results open).\n @media screen {\n overflow-y: scroll;\n }\n }\n\n // Applied to the <body> element\n .govuk-template__body {\n // The default margins set by user-agents are not required since we have our\n // own containers.\n margin: 0;\n // Set the overall body of the page back to the typical background colour.\n background-color: $govuk-body-background-colour;\n }\n}\n"]}
@@ -37,7 +37,7 @@
37
37
  }
38
38
 
39
39
  // On tablet, add full width gutters
40
- @include govuk-media-query($from: tablet) {
40
+ @media #{govuk-from-breakpoint(tablet)} {
41
41
  margin-right: $govuk-gutter;
42
42
  margin-left: $govuk-gutter;
43
43
 
@@ -55,7 +55,7 @@
55
55
 
56
56
  // As soon as the viewport is greater than the width of the page plus the
57
57
  // gutters, just centre the content instead of adding gutters.
58
- @include govuk-media-query($and: "(min-width: #{($width + $govuk-gutter * 2)})") {
58
+ @media (min-width: #{($width + $govuk-gutter * 2)}) {
59
59
  margin-right: auto;
60
60
  margin-left: auto;
61
61
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/govuk/objects/_width-container.scss"],"names":[],"mappings":"AAAA,iBAAiB;;AAEjB,GAAG;AACH,wBAAwB;AACxB,GAAG;;AAEH,wBAAwB;AACxB,EAAE;AACF,gEAAgE;AAChE,EAAE;AACF,+DAA+D;AAC/D,EAAE;AACF,yDAAyD;AACzD,gCAAgC;AAChC,6CAA6C;AAC7C,KAAK;AACL,EAAE;AACF,iBAAiB;;AAEjB;EACE,gEAAgE;EAChE,iBAAiB;;EAEjB,mCAAmC;EACnC,gCAAgC;EAChC,+BAA+B;;EAE/B,yEAAyE;EACzE;IACE,iFAAiF;IACjF,+EAA+E;;IAE/E,6DAA6D;IAC7D,gDAAgD;IAChD,+EAA+E;IAC/E,6EAA6E;EAC/E;;EAEA,mCAAmC;EACnC;IACE,2BAA2B;IAC3B,0BAA0B;;IAE1B,yEAAyE;IACzE;MACE,iFAAiF;MACjF,+EAA+E;;MAE/E,6DAA6D;MAC7D,gDAAgD;MAChD,0EAA0E;MAC1E,wEAAwE;IAC1E;EACF;;EAEA,wEAAwE;EACxE,6DAA6D;EAC7D;IACE,kBAAkB;IAClB,iBAAiB;;IAEjB,uDAAuD;IACvD,yDAAyD;IACzD;MACE,kBAAkB;MAClB,iBAAiB;IACnB;EACF;AACF;;AAEA;EACE;IACE,8BAA8B;EAChC;AACF","file":"_width-container.scss","sourcesContent":["@import \"../base\";\n\n////\n/// @group objects/layout\n////\n\n/// Width container mixin\n///\n/// Used to create page width and custom width container classes.\n///\n/// @param {String} $width [$govuk-page-width] - Width in pixels\n///\n/// @example scss - Creating a 1200px wide container class\n/// .app-width-container--wide {\n/// @include govuk-width-container(1200px);\n/// }\n///\n/// @access public\n\n@mixin govuk-width-container($width: $govuk-page-width) {\n // By default, limit the width of the container to the page width\n max-width: $width;\n\n // On mobile, add half width gutters\n margin-right: $govuk-gutter-half;\n margin-left: $govuk-gutter-half;\n\n // Respect 'display cutout' safe area (avoids notches and rounded corners)\n @supports (margin: unquote(\"max(calc(0px))\")) {\n $gutter-safe-area-right: calc(#{$govuk-gutter-half} + env(safe-area-inset-right));\n $gutter-safe-area-left: calc(#{$govuk-gutter-half} + env(safe-area-inset-left));\n\n // Use max() to pick largest margin, default or with safe area\n // Escaped due to Sass max() vs. CSS native max()\n margin-right: unquote(\"max(#{$govuk-gutter-half}, #{$gutter-safe-area-right})\");\n margin-left: unquote(\"max(#{$govuk-gutter-half}, #{$gutter-safe-area-left})\");\n }\n\n // On tablet, add full width gutters\n @include govuk-media-query($from: tablet) {\n margin-right: $govuk-gutter;\n margin-left: $govuk-gutter;\n\n // Respect 'display cutout' safe area (avoids notches and rounded corners)\n @supports (margin: unquote(\"max(calc(0px))\")) {\n $gutter-safe-area-right: calc(#{$govuk-gutter-half} + env(safe-area-inset-right));\n $gutter-safe-area-left: calc(#{$govuk-gutter-half} + env(safe-area-inset-left));\n\n // Use max() to pick largest margin, default or with safe area\n // Escaped due to Sass max() vs. CSS native max()\n margin-right: unquote(\"max(#{$govuk-gutter}, #{$gutter-safe-area-right})\");\n margin-left: unquote(\"max(#{$govuk-gutter}, #{$gutter-safe-area-left})\");\n }\n }\n\n // As soon as the viewport is greater than the width of the page plus the\n // gutters, just centre the content instead of adding gutters.\n @include govuk-media-query($and: \"(min-width: #{($width + $govuk-gutter * 2)})\") {\n margin-right: auto;\n margin-left: auto;\n\n // Since a safe area may have previously been set above,\n // we need to duplicate this margin that centers the page.\n @supports (margin: unquote(\"max(calc(0px))\")) {\n margin-right: auto;\n margin-left: auto;\n }\n }\n}\n\n@include govuk-exports(\"govuk/objects/width-container\") {\n .govuk-width-container {\n @include govuk-width-container;\n }\n}\n"]}
1
+ {"version":3,"sources":["../../../src/govuk/objects/_width-container.scss"],"names":[],"mappings":"AAAA,iBAAiB;;AAEjB,GAAG;AACH,wBAAwB;AACxB,GAAG;;AAEH,wBAAwB;AACxB,EAAE;AACF,gEAAgE;AAChE,EAAE;AACF,+DAA+D;AAC/D,EAAE;AACF,yDAAyD;AACzD,gCAAgC;AAChC,6CAA6C;AAC7C,KAAK;AACL,EAAE;AACF,iBAAiB;;AAEjB;EACE,gEAAgE;EAChE,iBAAiB;;EAEjB,mCAAmC;EACnC,gCAAgC;EAChC,+BAA+B;;EAE/B,yEAAyE;EACzE;IACE,iFAAiF;IACjF,+EAA+E;;IAE/E,6DAA6D;IAC7D,gDAAgD;IAChD,+EAA+E;IAC/E,6EAA6E;EAC/E;;EAEA,mCAAmC;EACnC;IACE,2BAA2B;IAC3B,0BAA0B;;IAE1B,yEAAyE;IACzE;MACE,iFAAiF;MACjF,+EAA+E;;MAE/E,6DAA6D;MAC7D,gDAAgD;MAChD,0EAA0E;MAC1E,wEAAwE;IAC1E;EACF;;EAEA,wEAAwE;EACxE,6DAA6D;EAC7D;IACE,kBAAkB;IAClB,iBAAiB;;IAEjB,uDAAuD;IACvD,yDAAyD;IACzD;MACE,kBAAkB;MAClB,iBAAiB;IACnB;EACF;AACF;;AAEA;EACE;IACE,8BAA8B;EAChC;AACF","file":"_width-container.scss","sourcesContent":["@import \"../base\";\n\n////\n/// @group objects/layout\n////\n\n/// Width container mixin\n///\n/// Used to create page width and custom width container classes.\n///\n/// @param {String} $width [$govuk-page-width] - Width in pixels\n///\n/// @example scss - Creating a 1200px wide container class\n/// .app-width-container--wide {\n/// @include govuk-width-container(1200px);\n/// }\n///\n/// @access public\n\n@mixin govuk-width-container($width: $govuk-page-width) {\n // By default, limit the width of the container to the page width\n max-width: $width;\n\n // On mobile, add half width gutters\n margin-right: $govuk-gutter-half;\n margin-left: $govuk-gutter-half;\n\n // Respect 'display cutout' safe area (avoids notches and rounded corners)\n @supports (margin: unquote(\"max(calc(0px))\")) {\n $gutter-safe-area-right: calc(#{$govuk-gutter-half} + env(safe-area-inset-right));\n $gutter-safe-area-left: calc(#{$govuk-gutter-half} + env(safe-area-inset-left));\n\n // Use max() to pick largest margin, default or with safe area\n // Escaped due to Sass max() vs. CSS native max()\n margin-right: unquote(\"max(#{$govuk-gutter-half}, #{$gutter-safe-area-right})\");\n margin-left: unquote(\"max(#{$govuk-gutter-half}, #{$gutter-safe-area-left})\");\n }\n\n // On tablet, add full width gutters\n @media #{govuk-from-breakpoint(tablet)} {\n margin-right: $govuk-gutter;\n margin-left: $govuk-gutter;\n\n // Respect 'display cutout' safe area (avoids notches and rounded corners)\n @supports (margin: unquote(\"max(calc(0px))\")) {\n $gutter-safe-area-right: calc(#{$govuk-gutter-half} + env(safe-area-inset-right));\n $gutter-safe-area-left: calc(#{$govuk-gutter-half} + env(safe-area-inset-left));\n\n // Use max() to pick largest margin, default or with safe area\n // Escaped due to Sass max() vs. CSS native max()\n margin-right: unquote(\"max(#{$govuk-gutter}, #{$gutter-safe-area-right})\");\n margin-left: unquote(\"max(#{$govuk-gutter}, #{$gutter-safe-area-left})\");\n }\n }\n\n // As soon as the viewport is greater than the width of the page plus the\n // gutters, just centre the content instead of adding gutters.\n @media (min-width: #{($width + $govuk-gutter * 2)}) {\n margin-right: auto;\n margin-left: auto;\n\n // Since a safe area may have previously been set above,\n // we need to duplicate this margin that centers the page.\n @supports (margin: unquote(\"max(calc(0px))\")) {\n margin-right: auto;\n margin-left: auto;\n }\n }\n}\n\n@include govuk-exports(\"govuk/objects/width-container\") {\n .govuk-width-container {\n @include govuk-width-container;\n }\n}\n"]}
@@ -16,7 +16,7 @@
16
16
  display: none !important;
17
17
  }
18
18
 
19
- @include govuk-media-query($media-type: print) {
19
+ @media print {
20
20
  .govuk-\!-display-none-print {
21
21
  display: none !important;
22
22
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/govuk/overrides/_display.scss"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C;EACE;IACE,0BAA0B;EAC5B;;EAEA;IACE,gCAAgC;EAClC;;EAEA;IACE,yBAAyB;EAC3B;;EAEA;IACE,wBAAwB;EAC1B;;EAEA;IACE;MACE,wBAAwB;IAC1B;EACF;AACF","file":"_display.scss","sourcesContent":["// stylelint-disable declaration-no-important\n@include govuk-exports(\"govuk/overrides/display\") {\n .govuk-\\!-display-inline {\n display: inline !important;\n }\n\n .govuk-\\!-display-inline-block {\n display: inline-block !important;\n }\n\n .govuk-\\!-display-block {\n display: block !important;\n }\n\n .govuk-\\!-display-none {\n display: none !important;\n }\n\n @include govuk-media-query($media-type: print) {\n .govuk-\\!-display-none-print {\n display: none !important;\n }\n }\n}\n"]}
1
+ {"version":3,"sources":["../../../src/govuk/overrides/_display.scss"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C;EACE;IACE,0BAA0B;EAC5B;;EAEA;IACE,gCAAgC;EAClC;;EAEA;IACE,yBAAyB;EAC3B;;EAEA;IACE,wBAAwB;EAC1B;;EAEA;IACE;MACE,wBAAwB;IAC1B;EACF;AACF","file":"_display.scss","sourcesContent":["// stylelint-disable declaration-no-important\n@include govuk-exports(\"govuk/overrides/display\") {\n .govuk-\\!-display-inline {\n display: inline !important;\n }\n\n .govuk-\\!-display-inline-block {\n display: inline-block !important;\n }\n\n .govuk-\\!-display-block {\n display: block !important;\n }\n\n .govuk-\\!-display-none {\n display: none !important;\n }\n\n @media print {\n .govuk-\\!-display-none-print {\n display: none !important;\n }\n }\n}\n"]}
@@ -7,7 +7,7 @@
7
7
  .govuk-\!-width-three-quarters {
8
8
  width: 100% !important;
9
9
 
10
- @include govuk-media-query($from: tablet) {
10
+ @media #{govuk-from-breakpoint(tablet)} {
11
11
  width: 75% !important;
12
12
  }
13
13
  }
@@ -15,7 +15,7 @@
15
15
  .govuk-\!-width-two-thirds {
16
16
  width: 100% !important;
17
17
 
18
- @include govuk-media-query($from: tablet) {
18
+ @media #{govuk-from-breakpoint(tablet)} {
19
19
  width: 66.66% !important;
20
20
  }
21
21
  }
@@ -23,7 +23,7 @@
23
23
  .govuk-\!-width-one-half {
24
24
  width: 100% !important;
25
25
 
26
- @include govuk-media-query($from: tablet) {
26
+ @media #{govuk-from-breakpoint(tablet)} {
27
27
  width: 50% !important;
28
28
  }
29
29
  }
@@ -31,7 +31,7 @@
31
31
  .govuk-\!-width-one-third {
32
32
  width: 100% !important;
33
33
 
34
- @include govuk-media-query($from: tablet) {
34
+ @media #{govuk-from-breakpoint(tablet)} {
35
35
  width: 33.33% !important;
36
36
  }
37
37
  }
@@ -39,7 +39,7 @@
39
39
  .govuk-\!-width-one-quarter {
40
40
  width: 100% !important;
41
41
 
42
- @include govuk-media-query($from: tablet) {
42
+ @media #{govuk-from-breakpoint(tablet)} {
43
43
  width: 25% !important;
44
44
  }
45
45
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/govuk/overrides/_width.scss"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C;EACE;IACE,sBAAsB;EACxB;;EAEA;IACE,sBAAsB;;IAEtB;MACE,qBAAqB;IACvB;EACF;;EAEA;IACE,sBAAsB;;IAEtB;MACE,wBAAwB;IAC1B;EACF;;EAEA;IACE,sBAAsB;;IAEtB;MACE,qBAAqB;IACvB;EACF;;EAEA;IACE,sBAAsB;;IAEtB;MACE,wBAAwB;IAC1B;EACF;;EAEA;IACE,sBAAsB;;IAEtB;MACE,qBAAqB;IACvB;EACF;AACF","file":"_width.scss","sourcesContent":["// stylelint-disable declaration-no-important\n@include govuk-exports(\"govuk/overrides/width\") {\n .govuk-\\!-width-full {\n width: 100% !important;\n }\n\n .govuk-\\!-width-three-quarters {\n width: 100% !important;\n\n @include govuk-media-query($from: tablet) {\n width: 75% !important;\n }\n }\n\n .govuk-\\!-width-two-thirds {\n width: 100% !important;\n\n @include govuk-media-query($from: tablet) {\n width: 66.66% !important;\n }\n }\n\n .govuk-\\!-width-one-half {\n width: 100% !important;\n\n @include govuk-media-query($from: tablet) {\n width: 50% !important;\n }\n }\n\n .govuk-\\!-width-one-third {\n width: 100% !important;\n\n @include govuk-media-query($from: tablet) {\n width: 33.33% !important;\n }\n }\n\n .govuk-\\!-width-one-quarter {\n width: 100% !important;\n\n @include govuk-media-query($from: tablet) {\n width: 25% !important;\n }\n }\n}\n"]}
1
+ {"version":3,"sources":["../../../src/govuk/overrides/_width.scss"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C;EACE;IACE,sBAAsB;EACxB;;EAEA;IACE,sBAAsB;;IAEtB;MACE,qBAAqB;IACvB;EACF;;EAEA;IACE,sBAAsB;;IAEtB;MACE,wBAAwB;IAC1B;EACF;;EAEA;IACE,sBAAsB;;IAEtB;MACE,qBAAqB;IACvB;EACF;;EAEA;IACE,sBAAsB;;IAEtB;MACE,wBAAwB;IAC1B;EACF;;EAEA;IACE,sBAAsB;;IAEtB;MACE,qBAAqB;IACvB;EACF;AACF","file":"_width.scss","sourcesContent":["// stylelint-disable declaration-no-important\n@include govuk-exports(\"govuk/overrides/width\") {\n .govuk-\\!-width-full {\n width: 100% !important;\n }\n\n .govuk-\\!-width-three-quarters {\n width: 100% !important;\n\n @media #{govuk-from-breakpoint(tablet)} {\n width: 75% !important;\n }\n }\n\n .govuk-\\!-width-two-thirds {\n width: 100% !important;\n\n @media #{govuk-from-breakpoint(tablet)} {\n width: 66.66% !important;\n }\n }\n\n .govuk-\\!-width-one-half {\n width: 100% !important;\n\n @media #{govuk-from-breakpoint(tablet)} {\n width: 50% !important;\n }\n }\n\n .govuk-\\!-width-one-third {\n width: 100% !important;\n\n @media #{govuk-from-breakpoint(tablet)} {\n width: 33.33% !important;\n }\n }\n\n .govuk-\\!-width-one-quarter {\n width: 100% !important;\n\n @media #{govuk-from-breakpoint(tablet)} {\n width: 25% !important;\n }\n }\n}\n"]}
@@ -2,6 +2,8 @@
2
2
  /// @group settings/layout
3
3
  ////
4
4
 
5
+ @import "../settings/warnings";
6
+
5
7
  /// Breakpoint definitions
6
8
  ///
7
9
  /// @type Map
@@ -19,7 +21,12 @@ $govuk-breakpoints: (
19
21
  ///
20
22
  /// @type Boolean
21
23
  /// @access public
24
+ /// @deprecated The variable is non-operational and will be removed in Frontend v6.0.
22
25
 
23
26
  $govuk-show-breakpoints: false !default;
24
27
 
28
+ @if $govuk-show-breakpoints and _should-warn("govuk-show-breakpoints") {
29
+ @warn _warning-text("govuk-show-breakpoints", "The `$govuk-show-breakpoints` variable is deprecated and is non-operational. It will be removed in the next major version.");
30
+ }
31
+
25
32
  /*# sourceMappingURL=_media-queries.scss.map */
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/govuk/settings/_media-queries.scss"],"names":[],"mappings":"AAAA,GAAG;AACH,yBAAyB;AACzB,GAAG;;AAEH,yBAAyB;AACzB,EAAE;AACF,YAAY;AACZ,iBAAiB;;AAEjB;;;;UAIU;;AAEV,8CAA8C;AAC9C,EAAE;AACF,0CAA0C;AAC1C,EAAE;AACF,gBAAgB;AAChB,iBAAiB;;AAEjB,uCAAuC","file":"_media-queries.scss","sourcesContent":["////\n/// @group settings/layout\n////\n\n/// Breakpoint definitions\n///\n/// @type Map\n/// @access public\n\n$govuk-breakpoints: (\n mobile: 320px,\n tablet: 641px,\n desktop: 769px\n) !default;\n\n/// Show active breakpoint in top-right corner.\n///\n/// Only use this during local development.\n///\n/// @type Boolean\n/// @access public\n\n$govuk-show-breakpoints: false !default;\n"]}
1
+ {"version":3,"sources":["../../../src/govuk/settings/_media-queries.scss"],"names":[],"mappings":"AAAA,GAAG;AACH,yBAAyB;AACzB,GAAG;;AAEH,8BAA8B;;AAE9B,yBAAyB;AACzB,EAAE;AACF,YAAY;AACZ,iBAAiB;;AAEjB;;;;UAIU;;AAEV,8CAA8C;AAC9C,EAAE;AACF,0CAA0C;AAC1C,EAAE;AACF,gBAAgB;AAChB,iBAAiB;AACjB,oFAAoF;;AAEpF,uCAAuC;;AAEvC;EACE,2KAA2K;AAC7K","file":"_media-queries.scss","sourcesContent":["////\n/// @group settings/layout\n////\n\n@import \"../settings/warnings\";\n\n/// Breakpoint definitions\n///\n/// @type Map\n/// @access public\n\n$govuk-breakpoints: (\n mobile: 320px,\n tablet: 641px,\n desktop: 769px\n) !default;\n\n/// Show active breakpoint in top-right corner.\n///\n/// Only use this during local development.\n///\n/// @type Boolean\n/// @access public\n/// @deprecated The variable is non-operational and will be removed in Frontend v6.0.\n\n$govuk-show-breakpoints: false !default;\n\n@if $govuk-show-breakpoints and _should-warn(\"govuk-show-breakpoints\") {\n @warn _warning-text(\"govuk-show-breakpoints\", \"The `$govuk-show-breakpoints` variable is deprecated and is non-operational. It will be removed in the next major version.\");\n}\n"]}
@@ -2,14 +2,16 @@
2
2
  /// @group tools/unit-conversion
3
3
  ////
4
4
 
5
+ @import "../settings/typography-responsive";
6
+
5
7
  /// Convert pixels to em
6
8
  ///
7
9
  /// @param {Number} $value - Length in pixels
8
- /// @param {Number} $context-font-size - Font size of element
10
+ /// @param {Number} $context-font-size [$govuk-root-font-size] - Font size of element
9
11
  /// @return {Number} Length in ems
10
12
  /// @access public
11
13
 
12
- @function govuk-em($value, $context-font-size) {
14
+ @function govuk-em($value, $context-font-size: $govuk-root-font-size) {
13
15
  @if unitless($value) {
14
16
  $value: $value * 1px;
15
17
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/govuk/tools/_px-to-em.scss"],"names":[],"mappings":"AAAA,GAAG;AACH,+BAA+B;AAC/B,GAAG;;AAEH,uBAAuB;AACvB,EAAE;AACF,4CAA4C;AAC5C,4DAA4D;AAC5D,iCAAiC;AACjC,iBAAiB;;AAEjB;EACE;IACE,oBAAoB;EACtB;EACA;IACE,4CAA4C;EAC9C;EACA,yCAAyC;AAC3C","file":"_px-to-em.scss","sourcesContent":["////\n/// @group tools/unit-conversion\n////\n\n/// Convert pixels to em\n///\n/// @param {Number} $value - Length in pixels\n/// @param {Number} $context-font-size - Font size of element\n/// @return {Number} Length in ems\n/// @access public\n\n@function govuk-em($value, $context-font-size) {\n @if unitless($value) {\n $value: $value * 1px;\n }\n @if unitless($context-font-size) {\n $context-font-size: $context-font-size * 1px;\n }\n @return $value / $context-font-size * 1em;\n}\n"]}
1
+ {"version":3,"sources":["../../../src/govuk/tools/_px-to-em.scss"],"names":[],"mappings":"AAAA,GAAG;AACH,+BAA+B;AAC/B,GAAG;;AAEH,2CAA2C;;AAE3C,uBAAuB;AACvB,EAAE;AACF,4CAA4C;AAC5C,oFAAoF;AACpF,iCAAiC;AACjC,iBAAiB;;AAEjB;EACE;IACE,oBAAoB;EACtB;EACA;IACE,4CAA4C;EAC9C;EACA,yCAAyC;AAC3C","file":"_px-to-em.scss","sourcesContent":["////\n/// @group tools/unit-conversion\n////\n\n@import \"../settings/typography-responsive\";\n\n/// Convert pixels to em\n///\n/// @param {Number} $value - Length in pixels\n/// @param {Number} $context-font-size [$govuk-root-font-size] - Font size of element\n/// @return {Number} Length in ems\n/// @access public\n\n@function govuk-em($value, $context-font-size: $govuk-root-font-size) {\n @if unitless($value) {\n $value: $value * 1px;\n }\n @if unitless($context-font-size) {\n $context-font-size: $context-font-size * 1px;\n }\n @return $value / $context-font-size * 1em;\n}\n"]}
@@ -3,7 +3,7 @@
3
3
  "description": "GOV.UK Frontend contains the code you need to start building a user interface for government platforms and services.",
4
4
  "urls": {
5
5
  "documentation": "https://design-system.service.gov.uk/",
6
- "releaseNotes": "https://github.com/alphagov/govuk-frontend/releases/tag/v5.11.2",
6
+ "releaseNotes": "https://github.com/alphagov/govuk-frontend/releases/tag/v5.13.0",
7
7
  "versionHistory": "https://github.com/alphagov/govuk-frontend/releases"
8
8
  }
9
9
  },