govuk_publishing_components 21.56.1 → 21.56.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3ae35a18ee87f9f8bdbc0b7f05b1874d04f3bcfbebed8eb0fd21dfb178bf1118
4
- data.tar.gz: e83b74f0187e3db2687dea59f3dc1f482b3400a7fe24f95d1ba5cb9b1377a94e
3
+ metadata.gz: c4c762079459f5284a3c2d8077bb92136586f9a3fb1bd41f38b5a37b8c557b04
4
+ data.tar.gz: 9a458d78da7c878aa9f1863e485b4b59bce139f5d4295d76df88a5da2144ede0
5
5
  SHA512:
6
- metadata.gz: 485ae5bca952be5d4bd237148436f7c165cf91aadafdc433cf1dec9a899cbcff4f78c9e9ede0509ffc79511902fcdeeff699ed73e918f2cbcbf08182e8d8da42
7
- data.tar.gz: fde1485cf2b9b1849993aa71fee949f39c3f4d08c996c1d9a61de520f3c44d0c25d3fd047d176032fd0c4e7c4862a0b4fe00b926b43e5898424c3e459355ada3
6
+ metadata.gz: '0879f5adc27997f08246bc8b8fc17a3538c1892fb90cfea51354aa2414d8b353fc5bc74287cb76299ecaf2f09c1f59f6306f7b7bff6362b4f22c21392ed79aaa'
7
+ data.tar.gz: 1cc60f11f0acfb2132922599454a1888663e4b5c864c092a77f84e44bea82559322812c6154d830db7163d3dc6aff8f1e1165e4576b4d96ce028ba7cf56cf69e
@@ -10,6 +10,7 @@
10
10
  // TODO: remove these styles once static is made less aggressive
11
11
  .gem-c-input.govuk-input {
12
12
  margin: 0;
13
+ min-width: 0;
13
14
  padding: govuk-spacing(1);
14
15
 
15
16
  &.gem-c-input--search-icon {
@@ -40,16 +41,19 @@
40
41
  box-sizing: border-box;
41
42
  cursor: default; // emphasise non-editable status of prefixes and suffixes
42
43
  display: inline-block;
43
- white-space: nowrap;
44
- width: auto;
45
- text-align: center;
44
+ flex: 0 0 auto;
46
45
  height: 40px;
47
- padding: govuk-spacing(1);
46
+ margin-top: 0;
48
47
  min-width: 40px;
48
+ padding: govuk-spacing(1);
49
+ text-align: center;
50
+ white-space: nowrap;
51
+ width: auto;
52
+
49
53
  @if $govuk-typography-use-rem {
54
+ height: govuk-px-to-rem(40px);
50
55
  min-width: govuk-px-to-rem(40px);
51
56
  }
52
- margin-top: 0;
53
57
  }
54
58
 
55
59
  .gem-c-input__prefix {
@@ -95,15 +95,14 @@
95
95
 
96
96
  <% if prefix && suffix %>
97
97
  <%= tag.div class: "gem-c-input__wrapper" do %>
98
- <%= tag.span prefix, class: "gem-c-input__prefix", aria: { hidden: true } %>
99
- <%= input_tag %>
100
- <%= tag.span suffix, class: "gem-c-input__suffix", aria: { hidden: true } %>
98
+ <% # The line below relies on in-line styling for legacy browsers and it's whitespace-sensitive %>
99
+ <%= tag.span prefix, class: "gem-c-input__prefix", aria: { hidden: true } %><%= input_tag %><%= tag.span suffix, class: "gem-c-input__suffix", aria: { hidden: true } %>
101
100
  <% end %>
102
101
  <% elsif prefix %>
103
102
  <%= tag.div class: "gem-c-input__wrapper" do %>
104
103
  <%= tag.span prefix, class: "gem-c-input__prefix", aria: { hidden: true } %><%= input_tag %>
105
104
  <% end %>
106
- <% elsif suffix %>
105
+ <% elsif suffix %>
107
106
  <%= tag.div class: "gem-c-input__wrapper" do %>
108
107
  <%= input_tag %><%= tag.span suffix, class: "gem-c-input__suffix", aria: { hidden: true } %>
109
108
  <% end %>
@@ -132,6 +132,14 @@ examples:
132
132
  text: "What is your name?"
133
133
  name: "name"
134
134
  heading_size: "l"
135
+ with_prefix:
136
+ description: To help users understand how the input should look like. Often used for units of measurement.
137
+ data:
138
+ label:
139
+ text: "Cost, in pounds"
140
+ name: "cost"
141
+ width: 10
142
+ prefix: "£"
135
143
  with_suffix:
136
144
  description: To help users understand how the input should look like. Often used for units of measurement.
137
145
  data:
@@ -145,7 +153,7 @@ examples:
145
153
  data:
146
154
  label:
147
155
  text: "Cost per item, in pounds"
148
- name: "Cost-per-item"
156
+ name: "cost-per-item"
149
157
  width: 10
150
158
  prefix: "£"
151
159
  suffix: "per item"
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "21.56.1".freeze
2
+ VERSION = "21.56.2".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_publishing_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 21.56.1
4
+ version: 21.56.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-18 00:00:00.000000000 Z
11
+ date: 2020-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gds-api-adapters