primer_view_components 0.0.119 → 0.0.121
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +60 -0
- data/app/assets/javascripts/primer_view_components.js +1 -1
- data/app/assets/javascripts/primer_view_components.js.map +1 -1
- data/app/components/primer/alpha/modal_dialog.js +2 -0
- data/app/components/primer/alpha/modal_dialog.ts +2 -0
- data/app/components/primer/alpha/segmented_control/item.rb +1 -0
- data/app/components/primer/alpha/segmented_control.rb +30 -0
- data/app/components/primer/alpha/text_field.rb +1 -0
- data/app/components/primer/base_component.rb +3 -3
- data/app/components/primer/beta/close_button.rb +1 -1
- data/app/components/primer/{local_time.d.ts → beta/relative_time.d.ts} +0 -0
- data/app/components/primer/{local_time.js → beta/relative_time.js} +0 -0
- data/app/components/primer/{local_time.ts → beta/relative_time.ts} +0 -0
- data/app/components/primer/component.rb +2 -1
- data/app/components/primer/primer.d.ts +1 -2
- data/app/components/primer/primer.js +1 -2
- data/app/components/primer/primer.ts +1 -2
- data/app/forms/example_toggle_switch_form.rb +1 -1
- data/app/lib/primer/view_helper.rb +0 -1
- data/lib/primer/deprecations.yml +0 -91
- data/lib/primer/forms/acts_as_component.rb +12 -1
- data/lib/primer/forms/toggle_switch_form.rb +10 -3
- data/lib/primer/view_components/linters/button_component_migration_counter.rb +2 -2
- data/lib/primer/view_components/version.rb +1 -1
- data/lib/primer/view_components.rb +5 -0
- data/lib/primer/yard/backend.rb +38 -0
- data/lib/primer/yard/component_manifest.rb +121 -0
- data/lib/primer/yard/docs_helper.rb +81 -0
- data/lib/primer/yard/legacy_gatsby_backend.rb +271 -0
- data/lib/primer/yard/registry.rb +146 -0
- data/lib/primer/yard/renders_many_handler.rb +23 -0
- data/lib/primer/yard/renders_one_handler.rb +23 -0
- data/lib/rubocop/config/default.yml +3 -0
- data/lib/rubocop/cop/primer/test_selector.rb +48 -0
- data/lib/tasks/docs.rake +37 -405
- data/lib/tasks/static.rake +22 -0
- data/previews/primer/alpha/auto_complete_preview.rb +6 -6
- data/previews/primer/alpha/dialog_preview/body_has_scrollbar_overflow.html.erb +9 -0
- data/previews/primer/alpha/dialog_preview.rb +15 -0
- data/previews/primer/alpha/segmented_control_preview/with_label_and_caption.html.erb +9 -0
- data/previews/primer/alpha/segmented_control_preview/with_subhead_actions.html.erb +11 -0
- data/previews/primer/alpha/segmented_control_preview.rb +7 -1
- data/previews/primer/alpha/text_field_preview.rb +14 -0
- data/previews/primer/alpha/toggle_switch_preview.rb +9 -9
- data/previews/primer/beta/auto_complete_preview.rb +17 -17
- data/previews/primer/url_helpers.rb +1 -1
- data/static/arguments.json +6 -132
- data/static/audited_at.json +2 -24
- data/static/constants.json +0 -71
- data/static/previews.json +1634 -0
- data/static/statuses.json +0 -22
- metadata +23 -40
- data/app/components/primer/box_component.rb +0 -7
- data/app/components/primer/clipboard_copy.rb +0 -7
- data/app/components/primer/dropdown/menu.rb +0 -14
- data/app/components/primer/dropdown.rb +0 -7
- data/app/components/primer/dropdown_menu_component.html.erb +0 -8
- data/app/components/primer/dropdown_menu_component.rb +0 -58
- data/app/components/primer/hellip_button.rb +0 -7
- data/app/components/primer/label_component.rb +0 -7
- data/app/components/primer/link_component.rb +0 -7
- data/app/components/primer/local_time.rb +0 -63
- data/app/components/primer/markdown.rb +0 -7
- data/app/components/primer/menu_component.rb +0 -7
- data/app/components/primer/octicon_component.rb +0 -7
- data/app/components/primer/octicon_symbols_component.rb +0 -7
- data/app/components/primer/popover_component.rb +0 -8
- data/app/components/primer/spinner_component.rb +0 -7
- data/app/components/primer/state_component.rb +0 -7
- data/app/components/primer/subhead_component.rb +0 -7
- data/app/components/primer/tab_container_component.rb +0 -7
- data/app/components/primer/time_ago_component.d.ts +0 -1
- data/app/components/primer/time_ago_component.js +0 -1
- data/app/components/primer/time_ago_component.rb +0 -51
- data/app/components/primer/time_ago_component.ts +0 -1
- data/app/components/primer/timeline_item_component.rb +0 -13
- data/lib/yard/docs_helper.rb +0 -79
- data/lib/yard/renders_many_handler.rb +0 -19
- data/lib/yard/renders_one_handler.rb +0 -19
- data/previews/primer/local_time_component_preview.rb +0 -57
- data/previews/primer/time_ago_component_preview.rb +0 -27
@@ -144,6 +144,20 @@ module Primer
|
|
144
144
|
end
|
145
145
|
#
|
146
146
|
# @!endgroup
|
147
|
+
|
148
|
+
# @!group Auto check
|
149
|
+
#
|
150
|
+
# @label Auto check request ok
|
151
|
+
def with_auto_check_ok
|
152
|
+
render(Primer::Alpha::TextField.new(auto_check_src: UrlHelpers.example_check_ok_path, name: "my-text-field", label: "My text field"))
|
153
|
+
end
|
154
|
+
|
155
|
+
# @label Auto check request error
|
156
|
+
def with_auto_check_error
|
157
|
+
render(Primer::Alpha::TextField.new(auto_check_src: UrlHelpers.example_check_error_path, name: "my-text-field", label: "My text field"))
|
158
|
+
end
|
159
|
+
#
|
160
|
+
# @!endgroup
|
147
161
|
end
|
148
162
|
end
|
149
163
|
end
|
@@ -9,31 +9,31 @@ module Primer
|
|
9
9
|
include ActionView::Helpers::FormTagHelper
|
10
10
|
|
11
11
|
def playground
|
12
|
-
render(ToggleSwitch.new(src:
|
12
|
+
render(ToggleSwitch.new(src: UrlHelpers.toggle_switch_index_path))
|
13
13
|
end
|
14
14
|
|
15
15
|
def default
|
16
|
-
render(ToggleSwitch.new(src:
|
16
|
+
render(ToggleSwitch.new(src: UrlHelpers.toggle_switch_index_path))
|
17
17
|
end
|
18
18
|
|
19
19
|
def checked
|
20
|
-
render(ToggleSwitch.new(src:
|
20
|
+
render(ToggleSwitch.new(src: UrlHelpers.toggle_switch_index_path, checked: true))
|
21
21
|
end
|
22
22
|
|
23
23
|
def disabled
|
24
|
-
render(ToggleSwitch.new(src:
|
24
|
+
render(ToggleSwitch.new(src: UrlHelpers.toggle_switch_index_path, enabled: false))
|
25
25
|
end
|
26
26
|
|
27
27
|
def checked_disabled
|
28
|
-
render(ToggleSwitch.new(src:
|
28
|
+
render(ToggleSwitch.new(src: UrlHelpers.toggle_switch_index_path, checked: true, enabled: false))
|
29
29
|
end
|
30
30
|
|
31
31
|
def small
|
32
|
-
render(ToggleSwitch.new(src:
|
32
|
+
render(ToggleSwitch.new(src: UrlHelpers.toggle_switch_index_path, size: :small))
|
33
33
|
end
|
34
34
|
|
35
35
|
def with_status_label_position_end
|
36
|
-
render(ToggleSwitch.new(src:
|
36
|
+
render(ToggleSwitch.new(src: UrlHelpers.toggle_switch_index_path, status_label_position: :end))
|
37
37
|
end
|
38
38
|
|
39
39
|
def with_a_bad_src
|
@@ -45,11 +45,11 @@ module Primer
|
|
45
45
|
end
|
46
46
|
|
47
47
|
def with_csrf_token
|
48
|
-
render(ToggleSwitch.new(src:
|
48
|
+
render(ToggleSwitch.new(src: UrlHelpers.toggle_switch_index_path, csrf_token: "let_me_in"))
|
49
49
|
end
|
50
50
|
|
51
51
|
def with_bad_csrf_token
|
52
|
-
render(ToggleSwitch.new(src:
|
52
|
+
render(ToggleSwitch.new(src: UrlHelpers.toggle_switch_index_path, csrf_token: "i_am_a_criminal"))
|
53
53
|
end
|
54
54
|
end
|
55
55
|
end
|
@@ -21,7 +21,7 @@ module Primer
|
|
21
21
|
# @param inset toggle
|
22
22
|
# @param monospace toggle
|
23
23
|
def playground(label_text: "Select a fruit", show_clear_button: false, visually_hide_label: false, placeholder: "Placeholder text", size: :medium, full_width: false, disabled: false, invalid: false, input_id: "input-id", list_id: "list-id", input_name: "input-id", inset: false, monospace: false)
|
24
|
-
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src:
|
24
|
+
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src: UrlHelpers.autocomplete_index_path, show_clear_button: show_clear_button, visually_hide_label: visually_hide_label, placeholder: placeholder, size: size, full_width: full_width, disabled: disabled, invalid: invalid, input_name: input_name, inset: inset, monospace: monospace)) do |component|
|
25
25
|
component.with_leading_visual_icon(icon: :search)
|
26
26
|
end
|
27
27
|
end
|
@@ -41,7 +41,7 @@ module Primer
|
|
41
41
|
# @param inset toggle
|
42
42
|
# @param monospace toggle
|
43
43
|
def default(label_text: "Select a fruit", show_clear_button: false, visually_hide_label: false, placeholder: "Placeholder text", size: :medium, full_width: false, disabled: false, invalid: false, input_id: "input-id", list_id: "list-id", input_name: "input-id", inset: false, monospace: false)
|
44
|
-
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src:
|
44
|
+
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src: UrlHelpers.autocomplete_index_path, show_clear_button: show_clear_button, visually_hide_label: visually_hide_label, placeholder: placeholder, size: size, full_width: full_width, disabled: disabled, invalid: invalid, input_name: input_name, inset: inset, monospace: monospace)) do |component|
|
45
45
|
component.with_leading_visual_icon(icon: :search)
|
46
46
|
end
|
47
47
|
end
|
@@ -87,7 +87,7 @@ module Primer
|
|
87
87
|
# @param list_id text
|
88
88
|
# @param input_name text
|
89
89
|
def leading_visual(label_text: "Select a fruit", show_clear_button: false, visually_hide_label: false, placeholder: "Placeholder text", size: :medium, full_width: false, disabled: false, invalid: false, input_id: "input-id", list_id: "list-id", input_name: "input-id")
|
90
|
-
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src:
|
90
|
+
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src: UrlHelpers.autocomplete_index_path, show_clear_button: show_clear_button, visually_hide_label: visually_hide_label, placeholder: placeholder, size: size, full_width: full_width, disabled: disabled, invalid: invalid, input_name: input_name)) do |component|
|
91
91
|
component.with_leading_visual_icon(icon: :search)
|
92
92
|
end
|
93
93
|
end
|
@@ -105,7 +105,7 @@ module Primer
|
|
105
105
|
# @param list_id text
|
106
106
|
# @param input_name text
|
107
107
|
def trailing_action(label_text: "Select a fruit", show_clear_button: true, visually_hide_label: false, placeholder: "Placeholder text", size: :medium, full_width: false, disabled: false, invalid: false, input_id: "input-id", list_id: "list-id", input_name: "input-id")
|
108
|
-
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src:
|
108
|
+
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src: UrlHelpers.autocomplete_index_path, show_clear_button: show_clear_button, visually_hide_label: visually_hide_label, placeholder: placeholder, size: size, full_width: full_width, disabled: disabled, invalid: invalid, input_name: input_name))
|
109
109
|
end
|
110
110
|
|
111
111
|
# @label Full width
|
@@ -121,7 +121,7 @@ module Primer
|
|
121
121
|
# @param list_id text
|
122
122
|
# @param input_name text
|
123
123
|
def full_width(label_text: "Select a fruit", show_clear_button: false, visually_hide_label: false, placeholder: "Placeholder text", size: :medium, full_width: true, disabled: false, invalid: false, input_id: "input-id", list_id: "list-id", input_name: "input-id")
|
124
|
-
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src:
|
124
|
+
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src: UrlHelpers.autocomplete_index_path, show_clear_button: show_clear_button, visually_hide_label: visually_hide_label, placeholder: placeholder, size: size, full_width: full_width, disabled: disabled, invalid: invalid, input_name: input_name)) do |component|
|
125
125
|
component.with_leading_visual_icon(icon: :search)
|
126
126
|
end
|
127
127
|
end
|
@@ -139,7 +139,7 @@ module Primer
|
|
139
139
|
# @param list_id text
|
140
140
|
# @param input_name text
|
141
141
|
def visually_hide_label(label_text: "Select a fruit", show_clear_button: false, visually_hide_label: true, placeholder: "Placeholder text", size: :medium, full_width: false, disabled: false, invalid: false, input_id: "input-id", list_id: "list-id", input_name: "input-id")
|
142
|
-
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src:
|
142
|
+
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src: UrlHelpers.autocomplete_index_path, show_clear_button: show_clear_button, visually_hide_label: visually_hide_label, placeholder: placeholder, size: size, full_width: full_width, disabled: disabled, invalid: invalid, input_name: input_name)) do |component|
|
143
143
|
component.with_leading_visual_icon(icon: :search)
|
144
144
|
end
|
145
145
|
end
|
@@ -158,7 +158,7 @@ module Primer
|
|
158
158
|
# @param list_id text
|
159
159
|
# @param input_name text
|
160
160
|
def small(label_text: "Select a fruit", show_clear_button: false, visually_hide_label: false, placeholder: "Placeholder text", size: :small, full_width: false, disabled: false, invalid: false, input_id: "input-id-1", list_id: "list-id-1", input_name: "input-id-1")
|
161
|
-
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src:
|
161
|
+
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src: UrlHelpers.autocomplete_index_path, show_clear_button: show_clear_button, visually_hide_label: visually_hide_label, placeholder: placeholder, size: size, full_width: full_width, disabled: disabled, invalid: invalid, input_name: input_name)) do |component|
|
162
162
|
component.with_leading_visual_icon(icon: :search)
|
163
163
|
end
|
164
164
|
end
|
@@ -175,7 +175,7 @@ module Primer
|
|
175
175
|
# @param list_id text
|
176
176
|
# @param input_name text
|
177
177
|
def medium(label_text: "Select a fruit", show_clear_button: false, visually_hide_label: false, placeholder: "Placeholder text", size: :medium, full_width: false, disabled: false, invalid: false, input_id: "input-id-2", list_id: "list-id-2", input_name: "input-id-2")
|
178
|
-
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src:
|
178
|
+
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src: UrlHelpers.autocomplete_index_path, show_clear_button: show_clear_button, visually_hide_label: visually_hide_label, placeholder: placeholder, size: size, full_width: full_width, disabled: disabled, invalid: invalid, input_name: input_name)) do |component|
|
179
179
|
component.with_leading_visual_icon(icon: :search)
|
180
180
|
end
|
181
181
|
end
|
@@ -192,7 +192,7 @@ module Primer
|
|
192
192
|
# @param list_id text
|
193
193
|
# @param input_name text
|
194
194
|
def large(label_text: "Select a fruit", show_clear_button: false, visually_hide_label: false, placeholder: "Placeholder text", size: :large, full_width: false, disabled: false, invalid: false, input_id: "input-id-3", list_id: "list-id-3", input_name: "input-id-3")
|
195
|
-
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src:
|
195
|
+
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src: UrlHelpers.autocomplete_index_path, show_clear_button: show_clear_button, visually_hide_label: visually_hide_label, placeholder: placeholder, size: size, full_width: full_width, disabled: disabled, invalid: invalid, input_name: input_name)) do |component|
|
196
196
|
component.with_leading_visual_icon(icon: :search)
|
197
197
|
end
|
198
198
|
end
|
@@ -212,7 +212,7 @@ module Primer
|
|
212
212
|
# @param list_id text
|
213
213
|
# @param input_name text
|
214
214
|
def leading_visual_in_results(label_text: "Select a fruit", show_clear_button: false, visually_hide_label: false, placeholder: "Placeholder text", size: :medium, full_width: false, disabled: false, invalid: false, input_id: "input-id", list_id: "list-id", input_name: "input-id")
|
215
|
-
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src:
|
215
|
+
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src: UrlHelpers.autocomplete_index_path(visual: "leading"), show_clear_button: show_clear_button, visually_hide_label: visually_hide_label, placeholder: placeholder, size: size, full_width: full_width, disabled: disabled, invalid: invalid, input_name: input_name))
|
216
216
|
end
|
217
217
|
|
218
218
|
# @label Trailing visual in results
|
@@ -228,39 +228,39 @@ module Primer
|
|
228
228
|
# @param list_id text
|
229
229
|
# @param input_name text
|
230
230
|
def trailing_visual_in_results(label_text: "Select a fruit", show_clear_button: false, visually_hide_label: false, placeholder: "Placeholder text", size: :medium, full_width: false, disabled: false, invalid: false, input_id: "input-id", list_id: "list-id", input_name: "input-id")
|
231
|
-
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src:
|
231
|
+
render(Primer::Beta::AutoComplete.new(label_text: label_text, input_id: input_id, list_id: list_id, src: UrlHelpers.autocomplete_index_path(visual: "trailing"), show_clear_button: show_clear_button, visually_hide_label: visually_hide_label, placeholder: placeholder, size: size, full_width: full_width, disabled: disabled, invalid: invalid, input_name: input_name))
|
232
232
|
end
|
233
233
|
|
234
234
|
# @hidden
|
235
235
|
def with_non_visible_label
|
236
|
-
render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", input_id: "input-id", list_id: "test-id", src:
|
236
|
+
render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", input_id: "input-id", list_id: "test-id", src: UrlHelpers.autocomplete_index_path, visually_hide_label: true))
|
237
237
|
end
|
238
238
|
|
239
239
|
# @hidden
|
240
240
|
def with_icon
|
241
|
-
render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", input_id: "input-id", list_id: "test-id", src:
|
241
|
+
render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", input_id: "input-id", list_id: "test-id", src: UrlHelpers.autocomplete_index_path)) do |component|
|
242
242
|
component.with_leading_visual_icon(icon: :search)
|
243
243
|
end
|
244
244
|
end
|
245
245
|
|
246
246
|
# @hidden
|
247
247
|
def show_clear_button
|
248
|
-
render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", input_id: "input-id", list_id: "test-id", src:
|
248
|
+
render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", input_id: "input-id", list_id: "test-id", src: UrlHelpers.autocomplete_index_path, show_clear_button: true))
|
249
249
|
end
|
250
250
|
|
251
251
|
# @hidden
|
252
252
|
def size_small
|
253
|
-
render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", input_id: "input-id", list_id: "test-id", src:
|
253
|
+
render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", input_id: "input-id", list_id: "test-id", src: UrlHelpers.autocomplete_index_path, show_clear_button: false, size: :small))
|
254
254
|
end
|
255
255
|
|
256
256
|
# @hidden
|
257
257
|
def monospace
|
258
|
-
render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", input_id: "input-id", list_id: "test-id", src:
|
258
|
+
render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", input_id: "input-id", list_id: "test-id", src: UrlHelpers.autocomplete_index_path, show_clear_button: false, monospace: true))
|
259
259
|
end
|
260
260
|
|
261
261
|
# @hidden
|
262
262
|
def inset
|
263
|
-
render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", input_id: "input-id", list_id: "test-id", src:
|
263
|
+
render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", input_id: "input-id", list_id: "test-id", src: UrlHelpers.autocomplete_index_path, show_clear_button: false, inset: true))
|
264
264
|
end
|
265
265
|
end
|
266
266
|
end
|
data/static/arguments.json
CHANGED
@@ -859,6 +859,12 @@
|
|
859
859
|
"default": "N/A",
|
860
860
|
"description": "System arugments passed to the Rails builder's `#label` method. These arguments will appear as HTML attributes on the `<label>` tag."
|
861
861
|
},
|
862
|
+
{
|
863
|
+
"name": "auto_check_src",
|
864
|
+
"type": "String",
|
865
|
+
"default": "N/A",
|
866
|
+
"description": "When provided, makes a request to the given URL whenever the contents of the text field changes. If the server responds with a non-2xx status code, the response body is used as the validation message."
|
867
|
+
},
|
862
868
|
{
|
863
869
|
"name": "system_arguments",
|
864
870
|
"type": "Hash",
|
@@ -2231,38 +2237,6 @@
|
|
2231
2237
|
}
|
2232
2238
|
]
|
2233
2239
|
},
|
2234
|
-
{
|
2235
|
-
"component": "DropdownMenu",
|
2236
|
-
"status": "deprecated",
|
2237
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/dropdown_menu_component.rb",
|
2238
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/dropdown_menu/default/",
|
2239
|
-
"parameters": [
|
2240
|
-
{
|
2241
|
-
"name": "direction",
|
2242
|
-
"type": "Symbol",
|
2243
|
-
"default": "`:se`",
|
2244
|
-
"description": "One of `:e`, `:ne`, `:s`, `:se`, `:sw`, or `:w`."
|
2245
|
-
},
|
2246
|
-
{
|
2247
|
-
"name": "scheme",
|
2248
|
-
"type": "Symbol",
|
2249
|
-
"default": "`:default`",
|
2250
|
-
"description": "Pass `:dark` for dark mode theming"
|
2251
|
-
},
|
2252
|
-
{
|
2253
|
-
"name": "header",
|
2254
|
-
"type": "String",
|
2255
|
-
"default": "`nil`",
|
2256
|
-
"description": "Optional string to display as the header"
|
2257
|
-
},
|
2258
|
-
{
|
2259
|
-
"name": "system_arguments",
|
2260
|
-
"type": "Hash",
|
2261
|
-
"default": "N/A",
|
2262
|
-
"description": "[System arguments](/system-arguments)"
|
2263
|
-
}
|
2264
|
-
]
|
2265
|
-
},
|
2266
2240
|
{
|
2267
2241
|
"component": "IconButton",
|
2268
2242
|
"status": "deprecated",
|
@@ -2357,80 +2331,6 @@
|
|
2357
2331
|
}
|
2358
2332
|
]
|
2359
2333
|
},
|
2360
|
-
{
|
2361
|
-
"component": "LocalTime",
|
2362
|
-
"status": "deprecated",
|
2363
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/local_time.rb",
|
2364
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/local_time/default/",
|
2365
|
-
"parameters": [
|
2366
|
-
{
|
2367
|
-
"name": "datetime",
|
2368
|
-
"type": "DateTime",
|
2369
|
-
"default": "N/A",
|
2370
|
-
"description": "The date to parse"
|
2371
|
-
},
|
2372
|
-
{
|
2373
|
-
"name": "initial_text",
|
2374
|
-
"type": "String",
|
2375
|
-
"default": "`nil`",
|
2376
|
-
"description": "Text to render before component is initialized"
|
2377
|
-
},
|
2378
|
-
{
|
2379
|
-
"name": "weekday",
|
2380
|
-
"type": "Symbol",
|
2381
|
-
"default": "`:short`",
|
2382
|
-
"description": "One of `:long` or `:short`."
|
2383
|
-
},
|
2384
|
-
{
|
2385
|
-
"name": "year",
|
2386
|
-
"type": "Symbol",
|
2387
|
-
"default": "`:numeric`",
|
2388
|
-
"description": "One of `:2-digit` or `:numeric`."
|
2389
|
-
},
|
2390
|
-
{
|
2391
|
-
"name": "month",
|
2392
|
-
"type": "Symbol",
|
2393
|
-
"default": "`:short`",
|
2394
|
-
"description": "One of `:long` or `:short`."
|
2395
|
-
},
|
2396
|
-
{
|
2397
|
-
"name": "day",
|
2398
|
-
"type": "Symbol",
|
2399
|
-
"default": "`:numeric`",
|
2400
|
-
"description": "One of `:2-digit` or `:numeric`."
|
2401
|
-
},
|
2402
|
-
{
|
2403
|
-
"name": "hour",
|
2404
|
-
"type": "Symbol",
|
2405
|
-
"default": "`:numeric`",
|
2406
|
-
"description": "One of `:2-digit` or `:numeric`."
|
2407
|
-
},
|
2408
|
-
{
|
2409
|
-
"name": "minute",
|
2410
|
-
"type": "Symbol",
|
2411
|
-
"default": "`:numeric`",
|
2412
|
-
"description": "One of `:2-digit` or `:numeric`."
|
2413
|
-
},
|
2414
|
-
{
|
2415
|
-
"name": "second",
|
2416
|
-
"type": "Symbol",
|
2417
|
-
"default": "`:numeric`",
|
2418
|
-
"description": "One of `:2-digit` or `:numeric`."
|
2419
|
-
},
|
2420
|
-
{
|
2421
|
-
"name": "time_zone_name",
|
2422
|
-
"type": "Symbol",
|
2423
|
-
"default": "`:short`",
|
2424
|
-
"description": "One of `:long` or `:short`."
|
2425
|
-
},
|
2426
|
-
{
|
2427
|
-
"name": "system_arguments",
|
2428
|
-
"type": "Hash",
|
2429
|
-
"default": "N/A",
|
2430
|
-
"description": "[System arguments](/system-arguments)"
|
2431
|
-
}
|
2432
|
-
]
|
2433
|
-
},
|
2434
2334
|
{
|
2435
2335
|
"component": "Navigation::Tab",
|
2436
2336
|
"status": "alpha",
|
@@ -2481,32 +2381,6 @@
|
|
2481
2381
|
}
|
2482
2382
|
]
|
2483
2383
|
},
|
2484
|
-
{
|
2485
|
-
"component": "TimeAgo",
|
2486
|
-
"status": "deprecated",
|
2487
|
-
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/time_ago_component.rb",
|
2488
|
-
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/time_ago/default/",
|
2489
|
-
"parameters": [
|
2490
|
-
{
|
2491
|
-
"name": "time",
|
2492
|
-
"type": "Time",
|
2493
|
-
"default": "N/A",
|
2494
|
-
"description": "The time to be formatted"
|
2495
|
-
},
|
2496
|
-
{
|
2497
|
-
"name": "micro",
|
2498
|
-
"type": "Boolean",
|
2499
|
-
"default": "`false`",
|
2500
|
-
"description": "If true then the text will be formatted in \"micro\" mode, using as few characters as possible"
|
2501
|
-
},
|
2502
|
-
{
|
2503
|
-
"name": "system_arguments",
|
2504
|
-
"type": "Hash",
|
2505
|
-
"default": "N/A",
|
2506
|
-
"description": "[System arguments](/system-arguments)"
|
2507
|
-
}
|
2508
|
-
]
|
2509
|
-
},
|
2510
2384
|
{
|
2511
2385
|
"component": "Tooltip",
|
2512
2386
|
"status": "deprecated",
|
data/static/audited_at.json
CHANGED
@@ -26,8 +26,8 @@
|
|
26
26
|
"Primer::Alpha::NavList::Item": "",
|
27
27
|
"Primer::Alpha::NavList::Section": "",
|
28
28
|
"Primer::Alpha::OcticonSymbols": "",
|
29
|
-
"Primer::Alpha::SegmentedControl": "",
|
30
|
-
"Primer::Alpha::SegmentedControl::Item": "",
|
29
|
+
"Primer::Alpha::SegmentedControl": "2023-02-01",
|
30
|
+
"Primer::Alpha::SegmentedControl::Item": "2023-02-01",
|
31
31
|
"Primer::Alpha::TabContainer": "",
|
32
32
|
"Primer::Alpha::TabNav": "",
|
33
33
|
"Primer::Alpha::TabPanels": "",
|
@@ -73,34 +73,12 @@
|
|
73
73
|
"Primer::Beta::Truncate::TruncateText": "",
|
74
74
|
"Primer::BlankslateComponent": "",
|
75
75
|
"Primer::Box": "",
|
76
|
-
"Primer::BoxComponent": "",
|
77
76
|
"Primer::ButtonComponent": "",
|
78
|
-
"Primer::ClipboardCopy": "",
|
79
77
|
"Primer::ConditionalWrapper": "",
|
80
78
|
"Primer::Content": "",
|
81
|
-
"Primer::Dropdown": "",
|
82
|
-
"Primer::Dropdown::Menu": "",
|
83
|
-
"Primer::Dropdown::Menu::Item": "",
|
84
|
-
"Primer::DropdownMenuComponent": "",
|
85
|
-
"Primer::HellipButton": "",
|
86
79
|
"Primer::IconButton": "",
|
87
|
-
"Primer::LabelComponent": "",
|
88
80
|
"Primer::LayoutComponent": "",
|
89
|
-
"Primer::LinkComponent": "",
|
90
|
-
"Primer::LocalTime": "",
|
91
|
-
"Primer::Markdown": "",
|
92
|
-
"Primer::MenuComponent": "",
|
93
81
|
"Primer::Navigation::TabComponent": "",
|
94
|
-
"Primer::OcticonComponent": "",
|
95
|
-
"Primer::OcticonSymbolsComponent": "",
|
96
|
-
"Primer::PopoverComponent": "",
|
97
|
-
"Primer::SpinnerComponent": "",
|
98
|
-
"Primer::StateComponent": "",
|
99
|
-
"Primer::SubheadComponent": "",
|
100
|
-
"Primer::TabContainerComponent": "",
|
101
|
-
"Primer::TimeAgoComponent": "",
|
102
|
-
"Primer::TimelineItemComponent": "",
|
103
|
-
"Primer::TimelineItemComponent::BadgeComponent": "",
|
104
82
|
"Primer::Tooltip": "",
|
105
83
|
"Primer::Truncate": ""
|
106
84
|
}
|
data/static/constants.json
CHANGED
@@ -1000,8 +1000,6 @@
|
|
1000
1000
|
},
|
1001
1001
|
"Primer::Box": {
|
1002
1002
|
},
|
1003
|
-
"Primer::BoxComponent": {
|
1004
|
-
},
|
1005
1003
|
"Primer::ButtonComponent": {
|
1006
1004
|
"DEFAULT_SCHEME": "default",
|
1007
1005
|
"DEFAULT_SIZE": "medium",
|
@@ -1031,38 +1029,10 @@
|
|
1031
1029
|
"medium"
|
1032
1030
|
]
|
1033
1031
|
},
|
1034
|
-
"Primer::ClipboardCopy": {
|
1035
|
-
},
|
1036
1032
|
"Primer::ConditionalWrapper": {
|
1037
1033
|
},
|
1038
1034
|
"Primer::Content": {
|
1039
1035
|
},
|
1040
|
-
"Primer::Dropdown": {
|
1041
|
-
"Menu": "Primer::Dropdown::Menu"
|
1042
|
-
},
|
1043
|
-
"Primer::Dropdown::Menu": {
|
1044
|
-
"Item": "Primer::Dropdown::Menu::Item"
|
1045
|
-
},
|
1046
|
-
"Primer::Dropdown::Menu::Item": {
|
1047
|
-
},
|
1048
|
-
"Primer::DropdownMenuComponent": {
|
1049
|
-
"DIRECTION_DEFAULT": "se",
|
1050
|
-
"DIRECTION_OPTIONS": [
|
1051
|
-
"se",
|
1052
|
-
"sw",
|
1053
|
-
"w",
|
1054
|
-
"e",
|
1055
|
-
"ne",
|
1056
|
-
"s"
|
1057
|
-
],
|
1058
|
-
"SCHEME_DEFAULT": "default",
|
1059
|
-
"SCHEME_MAPPINGS": {
|
1060
|
-
"default": "",
|
1061
|
-
"dark": "dropdown-menu-dark"
|
1062
|
-
}
|
1063
|
-
},
|
1064
|
-
"Primer::HellipButton": {
|
1065
|
-
},
|
1066
1036
|
"Primer::IconButton": {
|
1067
1037
|
"DEFAULT_SCHEME": "default",
|
1068
1038
|
"SCHEME_MAPPINGS": {
|
@@ -1074,8 +1044,6 @@
|
|
1074
1044
|
"danger"
|
1075
1045
|
]
|
1076
1046
|
},
|
1077
|
-
"Primer::LabelComponent": {
|
1078
|
-
},
|
1079
1047
|
"Primer::LayoutComponent": {
|
1080
1048
|
"ALLOWED_SIDEBAR_COLS": [
|
1081
1049
|
1,
|
@@ -1098,24 +1066,6 @@
|
|
1098
1066
|
"DEFAULT_SIDEBAR_COL": 3,
|
1099
1067
|
"MAX_COL": 12
|
1100
1068
|
},
|
1101
|
-
"Primer::LinkComponent": {
|
1102
|
-
},
|
1103
|
-
"Primer::LocalTime": {
|
1104
|
-
"DEFAULT_DIGIT_TYPE": "numeric",
|
1105
|
-
"DEFAULT_TEXT_TYPE": "short",
|
1106
|
-
"DIGIT_TYPE_OPTIONS": [
|
1107
|
-
"numeric",
|
1108
|
-
"2-digit"
|
1109
|
-
],
|
1110
|
-
"TEXT_TYPE_OPTIONS": [
|
1111
|
-
"short",
|
1112
|
-
"long"
|
1113
|
-
]
|
1114
|
-
},
|
1115
|
-
"Primer::Markdown": {
|
1116
|
-
},
|
1117
|
-
"Primer::MenuComponent": {
|
1118
|
-
},
|
1119
1069
|
"Primer::Navigation::TabComponent": {
|
1120
1070
|
"ARIA_CURRENT_OPTIONS_FOR_ANCHOR": [
|
1121
1071
|
true,
|
@@ -1123,27 +1073,6 @@
|
|
1123
1073
|
],
|
1124
1074
|
"DEFAULT_ARIA_CURRENT_FOR_ANCHOR": "page"
|
1125
1075
|
},
|
1126
|
-
"Primer::OcticonComponent": {
|
1127
|
-
},
|
1128
|
-
"Primer::OcticonSymbolsComponent": {
|
1129
|
-
},
|
1130
|
-
"Primer::PopoverComponent": {
|
1131
|
-
},
|
1132
|
-
"Primer::SpinnerComponent": {
|
1133
|
-
},
|
1134
|
-
"Primer::StateComponent": {
|
1135
|
-
},
|
1136
|
-
"Primer::SubheadComponent": {
|
1137
|
-
},
|
1138
|
-
"Primer::TabContainerComponent": {
|
1139
|
-
},
|
1140
|
-
"Primer::TimeAgoComponent": {
|
1141
|
-
},
|
1142
|
-
"Primer::TimelineItemComponent": {
|
1143
|
-
"BadgeComponent": "Primer::TimelineItemComponent::BadgeComponent"
|
1144
|
-
},
|
1145
|
-
"Primer::TimelineItemComponent::BadgeComponent": {
|
1146
|
-
},
|
1147
1076
|
"Primer::Tooltip": {
|
1148
1077
|
"ALIGN_DEFAULT": "default",
|
1149
1078
|
"ALIGN_MAPPING": {
|