design_system 0.8.0 → 0.9.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2df0ff381525e15513457d76f8d2a44852ee4e64fcca301ae96cdbfb207a98fc
4
- data.tar.gz: 2a8c01fee4df51855a47a996f1061132f01335e7df72fe9911867a4c5f01a668
3
+ metadata.gz: 6a27154f9503cab098bc4f790e861c134619fc3f814ed3699377061d664e14fd
4
+ data.tar.gz: b3308364164dd524ccecb580a3e6ecfb0ae2a3f7a236ebfe58e078880aa383ca
5
5
  SHA512:
6
- metadata.gz: fabfc45353d5c2148d201e98464277692146da0eecc46417aa7ad2ff46719fe00030823746cbeecbf63021702a85d5aafddfa12e267d671e8b3b786f4cd21a97
7
- data.tar.gz: aa747e752e7f645c15c4dcd62c18005a0144a1530ddb16b99b2aeb1208d7f816c7dec27fedc4fd85acf975c14d76fe9da8b94a0d76c5879a481ec7208dc10bdb
6
+ metadata.gz: 55bde2e4ed7155a66ae629ab79c86d19d51bd6e721fa5f607873a1376934b2469cba88ca08517edb4233c0927e734c5ddc6d68d61a3422c8f4d970d7c207741f
7
+ data.tar.gz: 2e18d73d24108f2b8b13155156f839da9e94188837675689814603c984d1332ef97579ea8ac961f336d1d811400927c6696042084dd5f500919e8c26f1c0c250
data/Rakefile CHANGED
@@ -15,6 +15,11 @@ class JsBuilder
15
15
  def self.build(watch: false)
16
16
  require 'fileutils'
17
17
 
18
+ sh 'npm install'
19
+
20
+ # Remove all old builds
21
+ FileUtils.rm_rf(Dir.glob('public/design_system/static/design_system-*'))
22
+
18
23
  output_dir = "public/design_system/static/design_system-#{DesignSystem::VERSION}"
19
24
  mkdir_p(output_dir)
20
25
 
@@ -45,3 +50,21 @@ namespace :js do
45
50
  JsBuilder.build(watch: true)
46
51
  end
47
52
  end
53
+
54
+ desc 'Deploy the gem to RubyGems.org'
55
+ task :deploy_to_rubygems do
56
+ # Raise an error if the static files are not built
57
+ unless Dir.exist?("public/design_system/static/design_system-#{DesignSystem::VERSION}")
58
+ raise "Static files not built. Please run `rake js:build` before deploying."
59
+ end
60
+
61
+ sh 'gem build'
62
+
63
+ filename = "design_system-#{DesignSystem::VERSION}.gem"
64
+ raise "Gem file #{filename} not found. Please ensure the gem was built successfully." unless File.exist?(filename)
65
+
66
+ sh "gem push #{filename}"
67
+
68
+ # remove the built gem file after pushing
69
+ rm filename
70
+ end
@@ -5,3 +5,65 @@
5
5
  );
6
6
 
7
7
  // Use extreme caution when making any design system level style changes or additions here.
8
+
9
+ .app-header-layout {
10
+ display: flex;
11
+ align-items: center;
12
+ justify-content: space-between;
13
+ width: 100%;
14
+ gap: 1rem;
15
+ }
16
+
17
+
18
+ .app-header-search {
19
+ margin-left: auto; // Pushes search to the right
20
+ }
21
+
22
+ // Center navigation items within their container
23
+ .app-header-layout .govuk-header__navigation {
24
+ flex: 1;
25
+ display: flex;
26
+ justify-content: center;
27
+ align-items: center;
28
+ margin-left: 0; // Remove any default margin
29
+ }
30
+
31
+ .app-site-search {
32
+ display: block !important;
33
+ position: relative;
34
+ width: 100%;
35
+ margin-top: 10px; // govuk-spacing(2)
36
+ margin-bottom: 10px; // govuk-spacing(2)
37
+
38
+ .govuk-frontend-supported & {
39
+ display: block;
40
+ }
41
+ }
42
+ .app-site-search__wrapper {
43
+ display: block;
44
+ position: relative;
45
+ }
46
+
47
+ .app-site-search__input {
48
+ box-sizing: border-box;
49
+ width: 100%;
50
+ height: 40px;
51
+ margin-bottom: 0; // BUG: Safari 10 on macOS seems to add an implicit margin.
52
+ padding: 5px;
53
+ border: 2px solid #ffffff;
54
+ border-radius: 0; // Safari 10 on iOS adds implicit border rounding.
55
+ font-size: 16px;
56
+ &::placeholder {
57
+ color: #505a5f;
58
+ }
59
+ }
60
+
61
+ .app-site-search__submit {
62
+ position: absolute;
63
+ right: 0.3rem;
64
+ top: 50%;
65
+ transform: translateY(-50%);
66
+ background: none;
67
+ border: none;
68
+ cursor: pointer;
69
+ }
@@ -77,31 +77,48 @@
77
77
  <circle class="govuk-logo-dot" cx="226" cy="36" r="7.3" />
78
78
  <path d="M93.94 41.25c.4 1.81 1.2 3.21 2.21 4.62 1 1.4 2.21 2.41 3.61 3.21s3.21 1.2 5.22 1.2 3.61-.4 4.82-1c1.4-.6 2.41-1.4 3.21-2.41.8-1 1.4-2.01 1.61-3.01s.4-2.01.4-3.01v.14h-10.86v-7.02h20.07v24.08h-8.03v-5.56c-.6.8-1.38 1.61-2.19 2.41-.8.8-1.81 1.2-2.81 1.81-1 .4-2.21.8-3.41 1.2s-2.41.4-3.81.4a18.56 18.56 0 0 1-14.65-6.63c-1.6-2.01-3.01-4.41-3.81-7.02s-1.4-5.62-1.4-8.83.4-6.02 1.4-8.83a20.45 20.45 0 0 1 19.46-13.65c3.21 0 4.01.2 5.82.8 1.81.4 3.61 1.2 5.02 2.01 1.61.8 2.81 2.01 4.01 3.21s2.21 2.61 2.81 4.21l-7.63 4.41c-.4-1-1-1.81-1.61-2.61-.6-.8-1.4-1.4-2.21-2.01-.8-.6-1.81-1-2.81-1.4-1-.4-2.21-.4-3.61-.4-2.01 0-3.81.4-5.22 1.2-1.4.8-2.61 1.81-3.61 3.21s-1.61 2.81-2.21 4.62c-.4 1.81-.6 3.71-.6 5.42s.8 5.22.8 5.22Zm57.8-27.9c3.21 0 6.22.6 8.63 1.81 2.41 1.2 4.82 2.81 6.62 4.82S170.2 24.39 171 27s1.4 5.62 1.4 8.83-.4 6.02-1.4 8.83-2.41 5.02-4.01 7.02-4.01 3.61-6.62 4.82-5.42 1.81-8.63 1.81-6.22-.6-8.63-1.81-4.82-2.81-6.42-4.82-3.21-4.41-4.01-7.02-1.4-5.62-1.4-8.83.4-6.02 1.4-8.83 2.41-5.02 4.01-7.02 4.01-3.61 6.42-4.82 5.42-1.81 8.63-1.81Zm0 36.73c1.81 0 3.61-.4 5.02-1s2.61-1.81 3.61-3.01 1.81-2.81 2.21-4.41c.4-1.81.8-3.61.8-5.62 0-2.21-.2-4.21-.8-6.02s-1.2-3.21-2.21-4.62c-1-1.2-2.21-2.21-3.61-3.01s-3.21-1-5.02-1-3.61.4-5.02 1c-1.4.8-2.61 1.81-3.61 3.01s-1.81 2.81-2.21 4.62c-.4 1.81-.8 3.61-.8 5.62 0 2.41.2 4.21.8 6.02.4 1.81 1.2 3.21 2.21 4.41s2.21 2.21 3.61 3.01c1.4.8 3.21 1 5.02 1Zm36.32 7.96-12.24-44.15h9.83l8.43 32.77h.4l8.23-32.77h9.83L200.3 58.04h-12.24Zm74.14-7.96c2.18 0 3.51-.6 3.51-.6 1.2-.6 2.01-1 2.81-1.81s1.4-1.81 1.81-2.81a13 13 0 0 0 .8-4.01V13.9h8.63v28.15c0 2.41-.4 4.62-1.4 6.62-.8 2.01-2.21 3.61-3.61 5.02s-3.41 2.41-5.62 3.21-4.62 1.2-7.02 1.2-5.02-.4-7.02-1.2c-2.21-.8-4.01-1.81-5.62-3.21s-2.81-3.01-3.61-5.02-1.4-4.21-1.4-6.62V13.9h8.63v26.95c0 1.61.2 3.01.8 4.01.4 1.2 1.2 2.21 2.01 2.81.8.8 1.81 1.4 2.81 1.81 0 0 1.34.6 3.51.6Zm34.22-36.18v18.92l15.65-18.92h10.82l-15.03 17.32 16.03 26.83h-10.21l-11.44-20.21-5.62 6.22v13.99h-8.83V13.9" />
79
79
  </svg>
80
+ <% if @service_name %>
81
+ <span class="govuk-header__product-name">
82
+ <%= @service_name %>
83
+ </span>
84
+ <% end %>
80
85
  </a>
81
86
  </div>
82
87
  <div class="govuk-header__content">
83
- <a href="#" class="govuk-header__link govuk-header__service-name">
84
- <%= @service_name %>
85
- </a>
86
- <%= render partial: 'govuk/navigation' %>
88
+ <div class="app-header-layout">
89
+ <%= render partial: 'govuk/navigation' %>
90
+
91
+ <% if @searchbar_url %>
92
+ <div class="app-header-search">
93
+ <div class="govuk-header__search">
94
+ <form action="<%= @searchbar_url %>" method="get" role="search" class="app-site-search">
95
+ <label class="govuk-visually-hidden" for="app-site-search__input">Search</label>
96
+ <div class="app-site-search__wrapper">
97
+ <input
98
+ class="app-site-search__input"
99
+ id="app-site-search__input"
100
+ name="q"
101
+ type="search"
102
+ placeholder="Search"
103
+ autocomplete="off"
104
+ >
105
+ <button class="app-site-search__submit" type="submit">
106
+ <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" aria-hidden="true" focusable="false">
107
+ <path fill="currentColor" d="M8.5 0C3.8 0 0 3.8 0 8.5S3.8 17 8.5 17c1.9 0 3.7-.6 5.1-1.7l4.6 4.6c.3.3.8.3 1.1 0 .3-.3.3-.8 0-1.1l-4.6-4.6C15.4 12.2 17 10.4 17 8.5 17 3.8 13.2 0 8.5 0zm0 1.5c3.6 0 6.5 2.9 6.5 6.5S12.1 15 8.5 15 2 12.1 2 8.5 4.9 1.5 8.5 1.5z"/>
108
+ </svg>
109
+ </button>
110
+ </div>
111
+ </form>
112
+ </div>
113
+ </div>
114
+ <% end %>
115
+ </div>
87
116
  </div>
88
117
  </div>
89
118
  </header>
90
119
  <div class="govuk-width-container">
91
- <div class="govuk-phase-banner">
92
- <p class="govuk-phase-banner__content">
93
- <strong class="govuk-tag govuk-phase-banner__content__tag">
94
- Alpha
95
- </strong>
96
- <span class="govuk-phase-banner__text">
97
- This is a new service – your <a class="govuk-link" href="#">feedback</a> will help us to improve it.
98
- </span>
99
- </p>
100
- </div>
101
120
  <a href="#" class="govuk-back-link">Back</a>
102
-
103
121
  <%= yield :breadcrumbs %>
104
-
105
122
  <main class="govuk-main-wrapper" id="main-content">
106
123
  <%= render :partial => 'layouts/alert_and_notice' %>
107
124
  <%= yield %>
@@ -48,24 +48,24 @@
48
48
  </span>
49
49
  </a>
50
50
  </div>
51
-
52
- <div class="nhsuk-header__content" id="content-header">
53
- <div class="nhsuk-header__search">
54
- <div class="nhsuk-header__search-wrap" id="wrap-search">
55
- <form class="nhsuk-header__search-form" id="search" action="https://www.nhs.uk/search/" method="get" role="search">
56
- <label class="nhsuk-u-visually-hidden" for="search-field">Search the NHS website</label>
57
- <input class="nhsuk-search__input" id="search-field" name="search-field" type="search" placeholder="Search" autocomplete="off">
58
- <button class="nhsuk-search__submit" type="submit">
59
- <svg class="nhsuk-icon nhsuk-icon__search" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
60
- <path d="M19.71 18.29l-4.11-4.1a7 7 0 1 0-1.41 1.41l4.1 4.11a1 1 0 0 0 1.42 0 1 1 0 0 0 0-1.42zM5 10a5 5 0 1 1 5 5 5 5 0 0 1-5-5z"></path>
61
- </svg>
62
- <span class="nhsuk-u-visually-hidden">Search</span>
63
- </button>
64
- </form>
51
+ <% if @searchbar_url %>
52
+ <div class="nhsuk-header__content" id="content-header">
53
+ <div class="nhsuk-header__search">
54
+ <div class="nhsuk-header__search-wrap" id="wrap-search">
55
+ <form class="nhsuk-header__search-form" id="search" action="<%= @searchbar_url %>" method="get" role="search">
56
+ <label class="nhsuk-u-visually-hidden" for="search-field">Search the NHS website</label>
57
+ <input class="nhsuk-search__input" id="search-field" name="search-field" type="search" placeholder="Search" autocomplete="off">
58
+ <button class="nhsuk-search__submit" type="submit">
59
+ <svg class="nhsuk-icon nhsuk-icon__search" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
60
+ <path d="M19.71 18.29l-4.11-4.1a7 7 0 1 0-1.41 1.41l4.1 4.11a1 1 0 0 0 1.42 0 1 1 0 0 0 0-1.42zM5 10a5 5 0 1 1 5 5 5 5 0 0 1-5-5z"></path>
61
+ </svg>
62
+ <span class="nhsuk-u-visually-hidden">Search</span>
63
+ </button>
64
+ </form>
65
+ </div>
65
66
  </div>
66
67
  </div>
67
- </div>
68
-
68
+ <% end %>
69
69
  </div>
70
70
 
71
71
  <%= render partial: 'nhsuk/navigation' %>
@@ -88,8 +88,7 @@ module GOVUKDesignSystemFormBuilder
88
88
  # Check if @html_attributes is defined and contains the suppress_error key.
89
89
  # This instance variable is typically set by other traits like Traits::Input or Traits::Field.
90
90
  if instance_variable_defined?(:@html_attributes) &&
91
- @html_attributes &&
92
- @html_attributes.key?(:suppress_error) &&
91
+ @html_attributes&.key?(:suppress_error) &&
93
92
  @html_attributes[:suppress_error]
94
93
  @error_element = NullErrorElement.new(*bound) # Suppress the error message
95
94
  else
@@ -11,7 +11,7 @@ module DesignSystem
11
11
 
12
12
  # Add a new row to the summary list.
13
13
  # Use this method to add rows containing single key-value pair
14
- def add_row(*args, key: nil, value: nil, &block)
14
+ def add_row(*args, key: nil, value: nil)
15
15
  key, value = args if args.any?
16
16
 
17
17
  row_builder = SummaryListRowBuilder.new
@@ -6,6 +6,7 @@ module DesignSystem
6
6
  # This class provides generic methods to display notifications.
7
7
  class Notification < Base
8
8
  include ActionView::Helpers::SanitizeHelper
9
+
9
10
  def render_alert(msg)
10
11
  content_tag(:div, class: "#{brand}-error-summary", 'aria-labelledby': 'error-summary-title', role: 'alert',
11
12
  tabindex: '-1') do
@@ -7,7 +7,7 @@ module DesignSystem
7
7
  delegate :content_tag, :tag, :safe_join, :link_to, :capture, to: :@template
8
8
 
9
9
  def self.brand
10
- self.name.split('::')[1].underscore
10
+ name.split('::')[1].underscore
11
11
  end
12
12
 
13
13
  private
@@ -61,7 +61,8 @@ module DesignSystem
61
61
 
62
62
  assert_form_group do
63
63
  assert_select("fieldset.#{@brand}-fieldset") do
64
- assert_select("legend.#{@brand}-fieldset__legend.#{@brand}-fieldset__legend--m", 'What do you want in your sandwich?')
64
+ assert_select("legend.#{@brand}-fieldset__legend.#{@brand}-fieldset__legend--m",
65
+ 'What do you want in your sandwich?')
65
66
 
66
67
  input = assert_select('input').first
67
68
  assert_equal 'assistant_desired_filling', input['id']
@@ -174,7 +175,8 @@ module DesignSystem
174
175
 
175
176
  test 'ds_collection_select with html options' do
176
177
  @output_buffer = ds_form_with(model: assistants(:one), builder: @builder) do |f|
177
- f.ds_collection_select(:department_id, Department.all, :id, :title, {}, { class: 'geoff', placeholder: 'bar' })
178
+ f.ds_collection_select(:department_id, Department.all, :id, :title, {},
179
+ { class: 'geoff', placeholder: 'bar' })
178
180
  end
179
181
 
180
182
  assert_form_group do
@@ -287,7 +289,7 @@ module DesignSystem
287
289
  assert_label :email, nil, 'What is your email?'
288
290
  assert_hint :email, nil, 'This is a hint'
289
291
  assert_input :email, type: :email, value: 'one@ex.com',
290
- attributes: { 'aria-describedby' => 'assistant_email_hint' }
292
+ attributes: { 'aria-describedby' => 'assistant_email_hint' }
291
293
  end
292
294
  end
293
295
 
@@ -299,8 +301,8 @@ module DesignSystem
299
301
  assert_form_group do
300
302
  assert_label :email, nil, 'What is your email?'
301
303
  assert_input :email, type: :email, value: 'one@ex.com',
302
- classes: ['geoff'],
303
- attributes: { placeholder: 'bar' }
304
+ classes: ['geoff'],
305
+ attributes: { placeholder: 'bar' }
304
306
  end
305
307
  end
306
308
 
@@ -326,9 +328,7 @@ module DesignSystem
326
328
  )
327
329
  assistant.valid?
328
330
 
329
- @output_buffer = ds_form_with(model: assistant, builder: @builder) do |f|
330
- f.ds_error_summary
331
- end
331
+ @output_buffer = ds_form_with(model: assistant, builder: @builder, &:ds_error_summary)
332
332
 
333
333
  assert_select("div.#{@brand}-error-summary[data-module='#{@brand}-error-summary']") do
334
334
  assert_select("div[role='alert']") do
@@ -526,7 +526,7 @@ module DesignSystem
526
526
  assert_label :age, nil, 'What is your age?'
527
527
  assert_hint :age, nil, 'This is a hint'
528
528
  assert_input :age, type: :number, value: '30',
529
- attributes: { 'aria-describedby' => 'assistant_age_hint' }
529
+ attributes: { 'aria-describedby' => 'assistant_age_hint' }
530
530
  end
531
531
  end
532
532
 
@@ -538,8 +538,8 @@ module DesignSystem
538
538
  assert_form_group do
539
539
  assert_label :age, nil, 'What is your age?'
540
540
  assert_input :age, type: :number, value: '30',
541
- classes: ['geoff'],
542
- attributes: { placeholder: 'bar' }
541
+ classes: ['geoff'],
542
+ attributes: { placeholder: 'bar' }
543
543
  end
544
544
  end
545
545
 
@@ -574,7 +574,8 @@ module DesignSystem
574
574
  assert_form_group do
575
575
  assert_label :phone, nil, 'What is your phone number?'
576
576
  assert_hint :phone, nil, 'This is a hint'
577
- assert_input :phone, type: :tel, value: '07700900001', attributes: { 'aria-describedby' => 'assistant_phone_hint' }
577
+ assert_input :phone, type: :tel, value: '07700900001',
578
+ attributes: { 'aria-describedby' => 'assistant_phone_hint' }
578
579
  end
579
580
  end
580
581
 
@@ -586,8 +587,8 @@ module DesignSystem
586
587
  assert_form_group do
587
588
  assert_label :phone, nil, 'What is your phone number?'
588
589
  assert_input :phone, type: :tel, value: '07700900001',
589
- classes: ["#{@brand}-input--width-20", 'geoff'],
590
- attributes: { placeholder: 'bar' }
590
+ classes: ["#{@brand}-input--width-20", 'geoff'],
591
+ attributes: { placeholder: 'bar' }
591
592
  end
592
593
  end
593
594
 
@@ -666,7 +667,8 @@ module DesignSystem
666
667
 
667
668
  assert_label :desired_filling, 'pastrami', classes: ["#{@brand}-radios__label"]
668
669
 
669
- assert_hint :desired_filling, 'pastrami', 'Brined, smoked, steamed and seasoned', classes: ["#{@brand}-radios__hint"]
670
+ assert_hint :desired_filling, 'pastrami', 'Brined, smoked, steamed and seasoned',
671
+ classes: ["#{@brand}-radios__hint"]
670
672
  end
671
673
 
672
674
  assert_select("div.#{@brand}-radios__item:nth-child(2)") do
@@ -678,7 +680,8 @@ module DesignSystem
678
680
 
679
681
  assert_label :desired_filling, 'cheddar', classes: ["#{@brand}-radios__label"]
680
682
 
681
- assert_hint :desired_filling, 'cheddar', 'A sharp, off-white natural cheese', classes: ["#{@brand}-radios__hint"]
683
+ assert_hint :desired_filling, 'cheddar', 'A sharp, off-white natural cheese',
684
+ classes: ["#{@brand}-radios__hint"]
682
685
  end
683
686
  end
684
687
  end
@@ -808,7 +811,8 @@ module DesignSystem
808
811
 
809
812
  test 'ds_collection_radio_buttons with html options' do
810
813
  @output_buffer = ds_form_with(model: assistants(:one), builder: @builder) do |f|
811
- f.ds_collection_radio_buttons(:department_id, Department.all, :id, :title, {}, { class: 'geoff', placeholder: 'bar' })
814
+ f.ds_collection_radio_buttons(:department_id, Department.all, :id, :title, {},
815
+ { class: 'geoff', placeholder: 'bar' })
812
816
  end
813
817
 
814
818
  assert_form_group do
@@ -858,7 +862,9 @@ module DesignSystem
858
862
 
859
863
  test 'ds_select with html options' do
860
864
  @output_buffer = ds_form_with(model: assistants(:one), builder: @builder) do |f|
861
- f.ds_select(:department_id, options_for_select(Department.all.map { |department| [department.title, department.id] }), {}, { class: 'geoff', placeholder: 'bar' })
865
+ f.ds_select(:department_id, options_for_select(Department.all.map do |department|
866
+ [department.title, department.id]
867
+ end), {}, { class: 'geoff', placeholder: 'bar' })
862
868
  end
863
869
 
864
870
  assert_form_group do
@@ -883,7 +889,9 @@ module DesignSystem
883
889
  test 'ds_select with locale' do
884
890
  I18n.with_locale :pirate do
885
891
  @output_buffer = ds_form_with(model: assistants(:one), builder: @builder) do |f|
886
- f.ds_select(:department_id, options_for_select(Department.all.map { |department| [department.title, department.id] }))
892
+ f.ds_select(:department_id, options_for_select(Department.all.map do |department|
893
+ [department.title, department.id]
894
+ end))
887
895
  end
888
896
  end
889
897
 
@@ -985,7 +993,7 @@ module DesignSystem
985
993
  assert_label :description, nil, 'Enter description'
986
994
  assert_hint :description, nil, 'This is a hint'
987
995
  assert_text_area :description,
988
- attributes: { 'aria-describedby' => 'assistant_description_hint' }
996
+ attributes: { 'aria-describedby' => 'assistant_description_hint' }
989
997
  end
990
998
  end
991
999
 
@@ -997,8 +1005,9 @@ module DesignSystem
997
1005
  assert_form_group(["#{@brand}-character-count[data-module='#{@brand}-character-count'][data-maxwords='20']"]) do
998
1006
  assert_label :description, nil, 'Enter description'
999
1007
  assert_text_area :description,
1000
- classes: ['geoff'],
1001
- attributes: { placeholder: 'bar', rows: 2, 'aria-describedby' => 'assistant_description-info' }
1008
+ classes: ['geoff'],
1009
+ attributes: { placeholder: 'bar', rows: 2,
1010
+ 'aria-describedby' => 'assistant_description-info' }
1002
1011
 
1003
1012
  info = assert_select("span.#{@brand}-hint.#{@brand}-character-count__message").first
1004
1013
  assert_includes info.text.strip, '20 words'
@@ -1037,7 +1046,8 @@ module DesignSystem
1037
1046
  assert_form_group do
1038
1047
  assert_label :title, nil, 'Title'
1039
1048
  assert_hint :title, nil, 'This is a hint'
1040
- assert_input :title, type: :text, value: 'Lorem ipsum dolor sit amet', attributes: { 'aria-describedby' => 'assistant_title_hint' }
1049
+ assert_input :title, type: :text, value: 'Lorem ipsum dolor sit amet',
1050
+ attributes: { 'aria-describedby' => 'assistant_title_hint' }
1041
1051
  end
1042
1052
  end
1043
1053
 
@@ -1048,7 +1058,8 @@ module DesignSystem
1048
1058
 
1049
1059
  assert_form_group do
1050
1060
  assert_label :title, nil, 'Title'
1051
- assert_input :title, type: :text, value: 'Lorem ipsum dolor sit amet', classes: ['geoff'], attributes: { placeholder: 'bar' }
1061
+ assert_input :title, type: :text, value: 'Lorem ipsum dolor sit amet', classes: ['geoff'],
1062
+ attributes: { placeholder: 'bar' }
1052
1063
  end
1053
1064
  end
1054
1065
 
@@ -1084,7 +1095,7 @@ module DesignSystem
1084
1095
  assert_label :website, nil, 'What is your website?'
1085
1096
  assert_hint :website, nil, 'This is a hint'
1086
1097
  assert_input :website, type: :url, value: 'https://www.ab.com',
1087
- attributes: { 'aria-describedby' => 'assistant_website_hint' }
1098
+ attributes: { 'aria-describedby' => 'assistant_website_hint' }
1088
1099
  end
1089
1100
  end
1090
1101
 
@@ -1096,8 +1107,8 @@ module DesignSystem
1096
1107
  assert_form_group do
1097
1108
  assert_label :website, nil, 'What is your website?'
1098
1109
  assert_input :website, type: :url, value: 'https://www.ab.com',
1099
- classes: ['geoff'],
1100
- attributes: { placeholder: 'bar' }
1110
+ classes: ['geoff'],
1111
+ attributes: { placeholder: 'bar' }
1101
1112
  end
1102
1113
  end
1103
1114
 
@@ -1208,7 +1219,8 @@ module DesignSystem
1208
1219
 
1209
1220
  rails_output = ds_form_with(model: assistants(:one)) do |f|
1210
1221
  choices.map do |value, text|
1211
- f.check_box(:desired_filling, { multiple: true }, value, '') + f.label(:desired_filling, text, value: value)
1222
+ f.check_box(:desired_filling, { multiple: true }, value,
1223
+ '') + f.label(:desired_filling, text, value: value)
1212
1224
  end.join.html_safe
1213
1225
  end
1214
1226
 
@@ -3,7 +3,7 @@
3
3
  module DesignSystem
4
4
  module Nhsuk
5
5
  module Builders
6
- # This generates html for rendering callout for Nhsuk
6
+ # This generates html for rendering callout for Nhsuk
7
7
  class Callout < ::DesignSystem::Generic::Builders::Callout
8
8
  end
9
9
  end
@@ -3,7 +3,7 @@
3
3
  module DesignSystem
4
4
  module Nhsuk
5
5
  module Builders
6
- # This generates html for rendering panel for Nhsuk
6
+ # This generates html for rendering panel for Nhsuk
7
7
  class Panel < ::DesignSystem::Generic::Builders::Panel
8
8
  end
9
9
  end
@@ -1,3 +1,3 @@
1
1
  module DesignSystem
2
- VERSION = '0.8.0'.freeze
2
+ VERSION = '0.9.0'.freeze
3
3
  end
data/lib/tasks/govuk.rake CHANGED
@@ -99,7 +99,7 @@ task :make_govuk, [:version] do |_t, args|
99
99
  temp_dir = Dir.mktmpdir("#{brand}-frontend")
100
100
  begin
101
101
  Dir.chdir(temp_dir) do
102
- system("npm install #{brand}-frontend#{version ? "@#{version}" : ''}")
102
+ system("npm install #{brand}-frontend#{"@#{version}" if version}")
103
103
  end
104
104
 
105
105
  GovukHelpers.setup_directories(version, brand)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: design_system
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Filis Liu
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2025-09-04 00:00:00.000000000 Z
14
+ date: 2025-10-06 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: govuk_design_system_formbuilder
@@ -446,7 +446,7 @@ files:
446
446
  - lib/tasks/design_system_tasks.rake
447
447
  - lib/tasks/govuk.rake
448
448
  - lib/tasks/nhsuk.rake
449
- - public/design_system/static/design_system-0.7.0/design_system.js
449
+ - public/design_system/static/design_system-0.9.0/design_system.js
450
450
  - public/design_system/static/govuk-frontend-5.11.1/fonts/bold-affa96571d-v2.woff
451
451
  - public/design_system/static/govuk-frontend-5.11.1/fonts/bold-b542beb274-v2.woff2
452
452
  - public/design_system/static/govuk-frontend-5.11.1/fonts/light-94a07e06a1-v2.woff2
@@ -509,7 +509,7 @@ metadata:
509
509
  allowed_push_host: https://rubygems.org
510
510
  homepage_uri: https://github.com/HealthDataInsight/design_system
511
511
  source_code_uri: https://github.com/HealthDataInsight/design_system
512
- changelog_uri: https://github.com/HealthDataInsight/design_system/CHANGELOG.md
512
+ changelog_uri: https://github.com/HealthDataInsight/design_system/blob/main/CHANGELOG.md
513
513
  rubygems_mfa_required: 'true'
514
514
  post_install_message:
515
515
  rdoc_options: []