primer_view_components 0.0.117 → 0.0.119
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 +4 -4
- data/CHANGELOG.md +28 -0
- data/app/assets/javascripts/primer_view_components.js +1 -1
- data/app/assets/javascripts/primer_view_components.js.map +1 -1
- data/app/assets/styles/primer_view_components.css +1 -1
- data/app/assets/styles/primer_view_components.css.map +1 -1
- data/app/components/primer/alpha/action_list/item.rb +3 -3
- data/app/components/primer/alpha/action_list.rb +1 -1
- data/app/components/primer/alpha/dialog.rb +6 -5
- data/app/components/primer/alpha/modal_dialog.js +24 -12
- data/app/components/primer/alpha/modal_dialog.ts +29 -15
- data/app/components/primer/alpha/text_field.css +1 -1
- data/app/components/primer/alpha/text_field.css.json +1 -1
- data/app/components/primer/alpha/text_field.css.map +1 -1
- data/app/components/primer/alpha/text_field.pcss +6 -0
- data/app/components/primer/alpha/toggle_switch.css +1 -1
- data/app/components/primer/alpha/toggle_switch.css.json +1 -1
- data/app/components/primer/alpha/toggle_switch.css.map +1 -1
- data/app/components/primer/alpha/toggle_switch.html.erb +4 -2
- data/app/components/primer/alpha/toggle_switch.js +23 -11
- data/app/components/primer/alpha/toggle_switch.pcss +6 -0
- data/app/components/primer/alpha/toggle_switch.ts +27 -11
- data/app/components/primer/alpha/tool_tip.js +0 -3
- data/app/components/primer/alpha/tool_tip.ts +0 -4
- data/app/components/primer/alpha/tooltip.rb +4 -3
- data/app/components/primer/beta/button.css +1 -1
- data/app/components/primer/beta/button.css.map +1 -1
- data/app/components/primer/beta/button.pcss +1 -1
- data/app/components/primer/beta/icon_button.rb +1 -1
- data/app/components/primer/beta/relative_time.rb +6 -0
- data/app/components/primer/component.rb +4 -0
- data/app/components/primer/icon_button.rb +1 -1
- data/app/components/primer/primer.d.ts +1 -0
- data/app/components/primer/primer.js +1 -0
- data/app/components/primer/primer.ts +1 -0
- data/app/forms/example_toggle_switch_form.rb +1 -1
- data/lib/primer/forms/dsl/input.rb +1 -1
- data/lib/primer/forms/toggle_switch.html.erb +7 -2
- data/lib/primer/forms/toggle_switch.rb +2 -4
- data/lib/primer/forms/toggle_switch_input.d.ts +5 -0
- data/lib/primer/forms/toggle_switch_input.js +29 -0
- data/lib/primer/forms/toggle_switch_input.ts +19 -0
- data/lib/primer/view_components/version.rb +1 -1
- data/lib/tasks/docs.rake +1 -1
- data/previews/primer/alpha/dialog_preview/with_text_input.html.erb +10 -0
- data/previews/primer/alpha/dialog_preview.rb +15 -0
- data/previews/primer/alpha/tooltip_preview.rb +8 -8
- data/previews/primer/beta/clipboard_copy_preview.rb +1 -1
- data/previews/primer/beta/relative_time_preview.rb +15 -0
- data/previews/primer/forms/forms_preview/example_toggle_switch_form.html.erb +3 -1
- data/static/arguments.json +78 -72
- data/static/constants.json +11 -2
- metadata +8 -18
@@ -21,6 +21,7 @@ module Primer
|
|
21
21
|
# @param time_zone_name [Symbol] select [~, long, short, short_offset, long_offset, short_generic, long_generic]
|
22
22
|
# @param precision [Symbol] select [~, second, minute, hour, day, month, year]
|
23
23
|
# @param format [Symbol] select [~, auto, micro, elapsed]
|
24
|
+
# @param format_style [Symbol] select [~, long, short, narrow]
|
24
25
|
# @param lang [String] text
|
25
26
|
# @param title [String] text
|
26
27
|
def playground(
|
@@ -37,6 +38,7 @@ module Primer
|
|
37
38
|
threshold: nil,
|
38
39
|
precision: nil,
|
39
40
|
format: nil,
|
41
|
+
format_style: nil,
|
40
42
|
datetime: Time.utc(2020, 1, 1, 0, 0, 0),
|
41
43
|
lang: nil,
|
42
44
|
title: nil
|
@@ -55,6 +57,7 @@ module Primer
|
|
55
57
|
threshold: threshold,
|
56
58
|
precision: precision,
|
57
59
|
format: format,
|
60
|
+
format_style: format_style,
|
58
61
|
datetime: datetime,
|
59
62
|
lang: lang,
|
60
63
|
title: title
|
@@ -75,6 +78,7 @@ module Primer
|
|
75
78
|
# @param time_zone_name [Symbol] select [~, long, short, short_offset, long_offset, short_generic, long_generic]
|
76
79
|
# @param precision [Symbol] select [~, second, minute, hour, day, month, year]
|
77
80
|
# @param format [Symbol] select [~, auto, micro, elapsed]
|
81
|
+
# @param format_style [Symbol] select [~, long, short, narrow]
|
78
82
|
# @param lang [String] text
|
79
83
|
# @param title [String] text
|
80
84
|
def default(
|
@@ -91,6 +95,7 @@ module Primer
|
|
91
95
|
threshold: nil,
|
92
96
|
precision: nil,
|
93
97
|
format: nil,
|
98
|
+
format_style: nil,
|
94
99
|
datetime: Time.now.utc,
|
95
100
|
lang: nil,
|
96
101
|
title: nil
|
@@ -109,6 +114,7 @@ module Primer
|
|
109
114
|
threshold: threshold,
|
110
115
|
precision: precision,
|
111
116
|
format: format,
|
117
|
+
format_style: format_style,
|
112
118
|
datetime: datetime,
|
113
119
|
lang: lang,
|
114
120
|
title: title
|
@@ -128,6 +134,7 @@ module Primer
|
|
128
134
|
# @param year [Symbol] select [~, numeric, two_digit]
|
129
135
|
# @param time_zone_name [Symbol] select [~, long, short, short_offset, long_offset, short_generic, long_generic]
|
130
136
|
# @param precision [Symbol] select [~, second, minute, hour, day, month, year]
|
137
|
+
# @param format_style [Symbol] select [~, long, short, narrow]
|
131
138
|
# @param lang [String] text
|
132
139
|
# @param title [String] text
|
133
140
|
def micro_format(
|
@@ -143,6 +150,7 @@ module Primer
|
|
143
150
|
time_zone_name: nil,
|
144
151
|
threshold: nil,
|
145
152
|
precision: nil,
|
153
|
+
format_style: nil,
|
146
154
|
datetime: Time.now.iso8601,
|
147
155
|
lang: nil,
|
148
156
|
title: nil
|
@@ -161,6 +169,7 @@ module Primer
|
|
161
169
|
threshold: threshold,
|
162
170
|
precision: precision,
|
163
171
|
format: :micro,
|
172
|
+
format_style: format_style,
|
164
173
|
datetime: datetime,
|
165
174
|
lang: lang,
|
166
175
|
title: title
|
@@ -181,6 +190,7 @@ module Primer
|
|
181
190
|
# @param time_zone_name [Symbol] select [~, long, short, short_offset, long_offset, short_generic, long_generic]
|
182
191
|
# @param precision [Symbol] select [~, second, minute, hour, day, month, year]
|
183
192
|
# @param format [Symbol] select [~, auto, micro, elapsed]
|
193
|
+
# @param format_style [Symbol] select [~, long, short, narrow]
|
184
194
|
# @param lang [String] text
|
185
195
|
# @param title [String] text
|
186
196
|
def recent_time(
|
@@ -197,6 +207,7 @@ module Primer
|
|
197
207
|
threshold: nil,
|
198
208
|
precision: nil,
|
199
209
|
format: nil,
|
210
|
+
format_style: nil,
|
200
211
|
datetime: Time.now.iso8601,
|
201
212
|
lang: nil,
|
202
213
|
title: nil
|
@@ -215,6 +226,7 @@ module Primer
|
|
215
226
|
threshold: threshold,
|
216
227
|
precision: precision,
|
217
228
|
format: format,
|
229
|
+
format_style: format_style,
|
218
230
|
datetime: datetime,
|
219
231
|
lang: lang,
|
220
232
|
title: title
|
@@ -232,6 +244,7 @@ module Primer
|
|
232
244
|
# @param year [Symbol] select [~, numeric, two_digit]
|
233
245
|
# @param time_zone_name [Symbol] select [~, long, short, short_offset, long_offset, short_generic, long_generic]
|
234
246
|
# @param precision [Symbol] select [~, second, minute, hour, day, month, year]
|
247
|
+
# @param format_style [Symbol] select [~, long, short, narrow]
|
235
248
|
# @param lang [String] text
|
236
249
|
# @param title [String] text
|
237
250
|
def count_down_timer(
|
@@ -245,6 +258,7 @@ module Primer
|
|
245
258
|
time_zone_name: nil,
|
246
259
|
threshold: nil,
|
247
260
|
precision: nil,
|
261
|
+
format_style: nil,
|
248
262
|
datetime: Time.utc(2038, 1, 19, 0o3, 14, 8),
|
249
263
|
lang: nil,
|
250
264
|
title: nil
|
@@ -261,6 +275,7 @@ module Primer
|
|
261
275
|
threshold: threshold,
|
262
276
|
precision: precision,
|
263
277
|
format: :elapsed,
|
278
|
+
format_style: format_style,
|
264
279
|
datetime: datetime,
|
265
280
|
lang: lang,
|
266
281
|
title: title
|
@@ -1 +1,3 @@
|
|
1
|
-
<%= render(ExampleToggleSwitchForm.new(csrf: "let_me_in", src: toggle_switch_index_path)) %>
|
1
|
+
<%= render(ExampleToggleSwitchForm.new(csrf: "let_me_in", src: toggle_switch_index_path, id: "success-toggle")) %>
|
2
|
+
<hr>
|
3
|
+
<%= render(ExampleToggleSwitchForm.new(csrf: "a_bad_value", src: toggle_switch_index_path, id: "error-toggle")) %>
|