primer_view_components 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/app/forms/select_form.rb +2 -2
- data/lib/primer/classify/utilities.yml +60 -0
- data/lib/primer/forms/form_control.html.erb +1 -1
- data/lib/primer/forms/form_control.rb +5 -1
- data/lib/primer/forms/multi.html.erb +6 -8
- data/lib/primer/forms/text_field.html.erb +15 -17
- data/lib/primer/view_components/version.rb +1 -1
- data/lib/tasks/custom_utilities.yml +60 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95202a9f56eb3628d554ce3b16f89042465dd91ad9fb4a08df6ab20b18240a93
|
4
|
+
data.tar.gz: 70a7b1e0f4fa4955f007f52ffaca6a5eb18338daebe49ed223189cc652a2e50e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9edab351da16983c31fee3178b81abcf69347c506dc3bead36bc3529cbc8a3bc8a3b795f18b5de56a7f54741b9ad82aa10fe6e2c35443510a7e9db2fd01c4aed
|
7
|
+
data.tar.gz: a54dee217b6d46790bc06a58007bd0608042ea1e7d123fb6cd6debd5abb3274b38184d4a5a4318d4f95b7fa43271672e6658837ff473d1199ddc7c274b04fd63
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 0.1.4
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- [#1829](https://github.com/primer/view_components/pull/1829) [`bb54d982`](https://github.com/primer/view_components/commit/bb54d982433910ae28005b72de73ca69a6f8a8f3) Thanks [@josepmartins](https://github.com/josepmartins)! - Add responsive values for `border` and `border-radius` system argument
|
8
|
+
|
9
|
+
* [#1897](https://github.com/primer/view_components/pull/1897) [`eae7a7f8`](https://github.com/primer/view_components/commit/eae7a7f8a4891efa4873558d380eabb638272095) Thanks [@camertron](https://github.com/camertron)! - Fix widths of text fields and multi inputs.
|
10
|
+
|
3
11
|
## 0.1.3
|
4
12
|
|
5
13
|
### Patch Changes
|
data/app/forms/select_form.rb
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
# :nodoc:
|
4
4
|
class SelectForm < ApplicationForm
|
5
|
-
form do |
|
6
|
-
|
5
|
+
form do |select_form|
|
6
|
+
select_form.select_list(name: "cities", label: "Cool cities", caption: "Select your favorite!", include_blank: true) do |city_list|
|
7
7
|
city_list.option(label: "Lopez Island", value: "lopez_island")
|
8
8
|
city_list.option(label: "Bellevue", value: "bellevue")
|
9
9
|
city_list.option(label: "Seattle", value: "seattle")
|
@@ -1606,45 +1606,105 @@
|
|
1606
1606
|
:border:
|
1607
1607
|
:left:
|
1608
1608
|
- border-left
|
1609
|
+
- border-sm-left
|
1610
|
+
- border-md-left
|
1611
|
+
- border-lg-left
|
1612
|
+
- border-xl-left
|
1609
1613
|
:top:
|
1610
1614
|
- border-top
|
1615
|
+
- border-sm-top
|
1616
|
+
- border-md-top
|
1617
|
+
- border-lg-top
|
1618
|
+
- border-xl-top
|
1611
1619
|
:bottom:
|
1612
1620
|
- border-bottom
|
1621
|
+
- border-sm-bottom
|
1622
|
+
- border-md-bottom
|
1623
|
+
- border-lg-bottom
|
1624
|
+
- border-xl-bottom
|
1613
1625
|
:right:
|
1614
1626
|
- border-right
|
1627
|
+
- border-sm-right
|
1628
|
+
- border-md-right
|
1629
|
+
- border-lg-right
|
1630
|
+
- border-xl-right
|
1615
1631
|
:y:
|
1616
1632
|
- border-y
|
1617
1633
|
:x:
|
1618
1634
|
- border-x
|
1619
1635
|
true:
|
1620
1636
|
- border
|
1637
|
+
- border-sm
|
1638
|
+
- border-md
|
1639
|
+
- border-lg
|
1640
|
+
- border-xl
|
1621
1641
|
0:
|
1622
1642
|
- border-0
|
1643
|
+
- border-sm-0
|
1644
|
+
- border-md-0
|
1645
|
+
- border-lg-0
|
1646
|
+
- border-xl-0
|
1623
1647
|
false:
|
1624
1648
|
- border-0
|
1649
|
+
- border-sm-0
|
1650
|
+
- border-md-0
|
1651
|
+
- border-lg-0
|
1652
|
+
- border-xl-0
|
1625
1653
|
:dashed:
|
1626
1654
|
- border-dashed
|
1627
1655
|
:border_top:
|
1628
1656
|
0:
|
1629
1657
|
- border-top-0
|
1658
|
+
- border-sm-top-0
|
1659
|
+
- border-md-top-0
|
1660
|
+
- border-lg-top-0
|
1661
|
+
- border-xl-top-0
|
1630
1662
|
:border_bottom:
|
1631
1663
|
0:
|
1632
1664
|
- border-bottom-0
|
1665
|
+
- border-sm-bottom-0
|
1666
|
+
- border-md-bottom-0
|
1667
|
+
- border-lg-bottom-0
|
1668
|
+
- border-xl-bottom-0
|
1633
1669
|
:border_left:
|
1634
1670
|
0:
|
1635
1671
|
- border-left-0
|
1672
|
+
- border-sm-left-0
|
1673
|
+
- border-md-left-0
|
1674
|
+
- border-lg-left-0
|
1675
|
+
- border-xl-left-0
|
1636
1676
|
:border_right:
|
1637
1677
|
0:
|
1638
1678
|
- border-right-0
|
1679
|
+
- border-sm-right-0
|
1680
|
+
- border-md-right-0
|
1681
|
+
- border-lg-right-0
|
1682
|
+
- border-xl-right-0
|
1639
1683
|
:border_radius:
|
1640
1684
|
0:
|
1641
1685
|
- rounded-0
|
1686
|
+
- rounded-sm-0
|
1687
|
+
- rounded-md-0
|
1688
|
+
- rounded-lg-0
|
1689
|
+
- rounded-xl-0
|
1642
1690
|
1:
|
1643
1691
|
- rounded-1
|
1692
|
+
- rounded-sm-1
|
1693
|
+
- rounded-md-1
|
1694
|
+
- rounded-lg-1
|
1695
|
+
- rounded-xl-1
|
1644
1696
|
2:
|
1645
1697
|
- rounded-2
|
1698
|
+
- rounded-sm-2
|
1699
|
+
- rounded-md-2
|
1700
|
+
- rounded-lg-2
|
1701
|
+
- rounded-xl-2
|
1646
1702
|
3:
|
1647
1703
|
- rounded-3
|
1704
|
+
- rounded-sm-3
|
1705
|
+
- rounded-md-3
|
1706
|
+
- rounded-lg-3
|
1707
|
+
- rounded-xl-3
|
1648
1708
|
:justify_content:
|
1649
1709
|
:flex_start:
|
1650
1710
|
- flex-justify-start
|
@@ -6,11 +6,15 @@ module Primer
|
|
6
6
|
class FormControl < BaseComponent
|
7
7
|
delegate :builder, :form, to: :@input
|
8
8
|
|
9
|
-
def initialize(input:)
|
9
|
+
def initialize(input:, tag: :div, **system_arguments)
|
10
10
|
@input = input
|
11
|
+
@tag = tag
|
11
12
|
@input.add_label_classes("FormControl-label")
|
12
13
|
@form_group_arguments = {
|
14
|
+
**system_arguments,
|
13
15
|
class: class_names(
|
16
|
+
system_arguments[:class],
|
17
|
+
system_arguments[:classes],
|
14
18
|
"FormControl",
|
15
19
|
"width-full",
|
16
20
|
"FormControl--fullWidth" => @input.full_width?
|
@@ -1,9 +1,7 @@
|
|
1
|
-
<%=
|
2
|
-
<%=
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
</primer-multi-input>
|
8
|
-
<% end %>
|
1
|
+
<%= render(FormControl.new(input: @input, **@input.input_arguments)) do %>
|
2
|
+
<primer-multi-input data-name="<%= @input.name %>">
|
3
|
+
<% @input.inputs.each do |child_input| %>
|
4
|
+
<%= render(child_input.to_component) %>
|
5
|
+
<% end %>
|
6
|
+
</primer-multi-input>
|
9
7
|
<% end %>
|
@@ -1,19 +1,17 @@
|
|
1
|
-
|
2
|
-
<%=
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
<%=
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
</button>
|
16
|
-
<% end %>
|
1
|
+
<%= render(FormControl.new(input: @input, tag: :"primer-text-field")) do %>
|
2
|
+
<%= content_tag(:div, **@field_wrap_arguments) do %>
|
3
|
+
<% if @input.leading_visual %>
|
4
|
+
<span class="FormControl-input-leadingVisualWrap">
|
5
|
+
<%= render(Primer::Beta::Octicon.new(**@input.leading_visual)) %>
|
6
|
+
</span>
|
7
|
+
<% end %>
|
8
|
+
<%= render Primer::ConditionalWrapper.new(condition: @input.auto_check_src, tag: "auto-check", csrf: auto_check_authenticity_token, src: @input.auto_check_src) do %>
|
9
|
+
<%= builder.text_field(@input.name, **@input.input_arguments) %>
|
10
|
+
<% end %>
|
11
|
+
<% if @input.show_clear_button? %>
|
12
|
+
<button type="button" id="<%= @input.clear_button_id %>" class="FormControl-input-trailingAction" aria-label="Clear" data-action="click:primer-text-field#clearContents">
|
13
|
+
<%= render(Primer::Beta::Octicon.new(icon: :"x-circle-fill")) %>
|
14
|
+
</button>
|
17
15
|
<% end %>
|
18
16
|
<% end %>
|
19
|
-
|
17
|
+
<% end %>
|
@@ -99,45 +99,105 @@
|
|
99
99
|
:border:
|
100
100
|
:left:
|
101
101
|
- border-left
|
102
|
+
- border-sm-left
|
103
|
+
- border-md-left
|
104
|
+
- border-lg-left
|
105
|
+
- border-xl-left
|
102
106
|
:top:
|
103
107
|
- border-top
|
108
|
+
- border-sm-top
|
109
|
+
- border-md-top
|
110
|
+
- border-lg-top
|
111
|
+
- border-xl-top
|
104
112
|
:bottom:
|
105
113
|
- border-bottom
|
114
|
+
- border-sm-bottom
|
115
|
+
- border-md-bottom
|
116
|
+
- border-lg-bottom
|
117
|
+
- border-xl-bottom
|
106
118
|
:right:
|
107
119
|
- border-right
|
120
|
+
- border-sm-right
|
121
|
+
- border-md-right
|
122
|
+
- border-lg-right
|
123
|
+
- border-xl-right
|
108
124
|
:y:
|
109
125
|
- border-y
|
110
126
|
:x:
|
111
127
|
- border-x
|
112
128
|
true:
|
113
129
|
- border
|
130
|
+
- border-sm
|
131
|
+
- border-md
|
132
|
+
- border-lg
|
133
|
+
- border-xl
|
114
134
|
0:
|
115
135
|
- border-0
|
136
|
+
- border-sm-0
|
137
|
+
- border-md-0
|
138
|
+
- border-lg-0
|
139
|
+
- border-xl-0
|
116
140
|
false:
|
117
141
|
- border-0
|
142
|
+
- border-sm-0
|
143
|
+
- border-md-0
|
144
|
+
- border-lg-0
|
145
|
+
- border-xl-0
|
118
146
|
:dashed:
|
119
147
|
- border-dashed
|
120
148
|
:border_top:
|
121
149
|
0:
|
122
150
|
- border-top-0
|
151
|
+
- border-sm-top-0
|
152
|
+
- border-md-top-0
|
153
|
+
- border-lg-top-0
|
154
|
+
- border-xl-top-0
|
123
155
|
:border_bottom:
|
124
156
|
0:
|
125
157
|
- border-bottom-0
|
158
|
+
- border-sm-bottom-0
|
159
|
+
- border-md-bottom-0
|
160
|
+
- border-lg-bottom-0
|
161
|
+
- border-xl-bottom-0
|
126
162
|
:border_left:
|
127
163
|
0:
|
128
164
|
- border-left-0
|
165
|
+
- border-sm-left-0
|
166
|
+
- border-md-left-0
|
167
|
+
- border-lg-left-0
|
168
|
+
- border-xl-left-0
|
129
169
|
:border_right:
|
130
170
|
0:
|
131
171
|
- border-right-0
|
172
|
+
- border-sm-right-0
|
173
|
+
- border-md-right-0
|
174
|
+
- border-lg-right-0
|
175
|
+
- border-xl-right-0
|
132
176
|
:border_radius:
|
133
177
|
0:
|
134
178
|
- rounded-0
|
179
|
+
- rounded-sm-0
|
180
|
+
- rounded-md-0
|
181
|
+
- rounded-lg-0
|
182
|
+
- rounded-xl-0
|
135
183
|
1:
|
136
184
|
- rounded-1
|
185
|
+
- rounded-sm-1
|
186
|
+
- rounded-md-1
|
187
|
+
- rounded-lg-1
|
188
|
+
- rounded-xl-1
|
137
189
|
2:
|
138
190
|
- rounded-2
|
191
|
+
- rounded-sm-2
|
192
|
+
- rounded-md-2
|
193
|
+
- rounded-lg-2
|
194
|
+
- rounded-xl-2
|
139
195
|
3:
|
140
196
|
- rounded-3
|
197
|
+
- rounded-sm-3
|
198
|
+
- rounded-md-3
|
199
|
+
- rounded-lg-3
|
200
|
+
- rounded-xl-3
|
141
201
|
:justify_content:
|
142
202
|
:flex_start:
|
143
203
|
- flex-justify-start
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: primer_view_components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitHub Open Source
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-03-
|
11
|
+
date: 2023-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionview
|