primer_view_components 0.36.1 → 0.36.3
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 +20 -0
- data/app/assets/javascripts/components/primer/alpha/action_menu/action_menu_element.d.ts +2 -0
- data/app/assets/javascripts/components/primer/primer.d.ts +1 -0
- data/app/assets/javascripts/components/primer/utils.d.ts +1 -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/divider.rb +4 -0
- data/app/components/primer/alpha/action_list/item.html.erb +1 -4
- data/app/components/primer/alpha/action_list.css +1 -1
- data/app/components/primer/alpha/action_list.css.json +2 -6
- data/app/components/primer/alpha/action_list.css.map +1 -1
- data/app/components/primer/alpha/action_list.pcss +10 -43
- data/app/components/primer/alpha/action_menu/action_menu_element.d.ts +2 -0
- data/app/components/primer/alpha/action_menu/action_menu_element.js +31 -1
- data/app/components/primer/alpha/action_menu/action_menu_element.ts +37 -0
- data/app/components/primer/alpha/action_menu.rb +6 -0
- data/app/components/primer/alpha/dialog.css +1 -1
- data/app/components/primer/alpha/dialog.css.json +0 -1
- data/app/components/primer/alpha/dialog.css.map +1 -1
- data/app/components/primer/alpha/dialog.pcss +0 -5
- data/app/components/primer/alpha/select_panel_element.js +6 -19
- data/app/components/primer/alpha/select_panel_element.ts +9 -21
- data/app/components/primer/alpha/text_field.css +1 -1
- data/app/components/primer/alpha/text_field.css.json +30 -30
- data/app/components/primer/alpha/text_field.css.map +1 -1
- data/app/components/primer/alpha/text_field.pcss +2 -3
- 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/components/primer/utils.d.ts +1 -0
- data/app/components/primer/utils.js +16 -0
- data/app/components/primer/utils.ts +16 -0
- data/app/lib/primer/forms/acts_as_component.rb +9 -2
- data/app/lib/primer/forms/base.rb +0 -5
- data/app/lib/primer/forms/base_component.rb +5 -3
- data/app/lib/primer/forms/radio_button_group.html.erb +1 -1
- data/app/lib/primer/forms/utils.rb +16 -1
- data/lib/primer/view_components/version.rb +1 -1
- data/previews/primer/alpha/action_menu_preview/in_scroll_container.html.erb +3 -5
- data/static/classes.json +6 -0
- metadata +10 -6
@@ -14,13 +14,28 @@ module Primer
|
|
14
14
|
# for the file in the configured autoload paths. Doing so relies on Rails' autoloading
|
15
15
|
# conventions, so it should work ok. Zeitwerk also has this information but lacks a
|
16
16
|
# public API to map constants to source files.
|
17
|
+
#
|
18
|
+
# Now that the Ruby bug above has been fixed and released, this method should be used only
|
19
|
+
# as a fallback for older Rubies.
|
17
20
|
def const_source_location(class_name)
|
18
21
|
return nil unless class_name
|
19
22
|
|
23
|
+
if (location = Object.const_source_location(class_name)&.[](0))
|
24
|
+
return location
|
25
|
+
end
|
26
|
+
|
20
27
|
# NOTE: underscore respects namespacing, i.e. will convert Foo::Bar to foo/bar.
|
21
28
|
class_path = "#{class_name.underscore}.rb"
|
22
29
|
|
23
|
-
ActiveSupport::Dependencies
|
30
|
+
# Prefer Zeitwerk-managed paths, falling back to ActiveSupport::Dependencies if Zeitwerk
|
31
|
+
# is disabled or not in use (i.e. the case for older Rails versions).
|
32
|
+
autoload_paths = if Rails.respond_to?(:autoloaders) && Rails.autoloaders.zeitwerk_enabled?
|
33
|
+
Rails.autoloaders.main.dirs
|
34
|
+
else
|
35
|
+
ActiveSupport::Dependencies.autoload_paths
|
36
|
+
end
|
37
|
+
|
38
|
+
autoload_paths.each do |autoload_path|
|
24
39
|
absolute_path = File.join(autoload_path, class_path)
|
25
40
|
return absolute_path if File.exist?(absolute_path)
|
26
41
|
end
|
@@ -1,11 +1,9 @@
|
|
1
|
-
<div style="height:
|
2
|
-
|
3
|
-
<div style="position: relative">
|
1
|
+
<div style="height: 1000px; overflow: auto">
|
2
|
+
<div style="height: 400px"></div>
|
4
3
|
<%= render Primer::Alpha::ActionMenu.new(anchor_align: :end) do |c| %>
|
5
4
|
<% c.with_show_button { "Edit" } %>
|
6
5
|
<% c.with_item(tag: :button, type: "button", label: "Rename") %>
|
7
6
|
<% c.with_item(tag: :button, type: "button", scheme: :danger, label: "Remove") %>
|
8
7
|
<% end %>
|
8
|
+
<div style="height: 1400px"></div>
|
9
9
|
</div>
|
10
|
-
|
11
|
-
<div style="height: 1400px"></div>
|
data/static/classes.json
CHANGED
@@ -248,6 +248,9 @@
|
|
248
248
|
"FormControl-check-group-wrap": [
|
249
249
|
"Primer::Alpha::TextField"
|
250
250
|
],
|
251
|
+
"FormControl-checkbox": [
|
252
|
+
"Primer::Alpha::TextField"
|
253
|
+
],
|
251
254
|
"FormControl-checkbox-wrap": [
|
252
255
|
"Primer::Alpha::TextField"
|
253
256
|
],
|
@@ -290,6 +293,9 @@
|
|
290
293
|
"FormControl-monospace": [
|
291
294
|
"Primer::Alpha::TextField"
|
292
295
|
],
|
296
|
+
"FormControl-radio": [
|
297
|
+
"Primer::Alpha::TextField"
|
298
|
+
],
|
293
299
|
"FormControl-radio-group-wrap": [
|
294
300
|
"Primer::Alpha::TextField"
|
295
301
|
],
|
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.36.
|
4
|
+
version: 0.36.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitHub Open Source
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionview
|
@@ -72,7 +72,7 @@ dependencies:
|
|
72
72
|
- - "<"
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: '4.0'
|
75
|
-
description:
|
75
|
+
description:
|
76
76
|
email:
|
77
77
|
- opensource+primer_view_components@github.com
|
78
78
|
executables: []
|
@@ -105,6 +105,7 @@ files:
|
|
105
105
|
- app/assets/javascripts/components/primer/primer.d.ts
|
106
106
|
- app/assets/javascripts/components/primer/scrollable_region.d.ts
|
107
107
|
- app/assets/javascripts/components/primer/shared_events.d.ts
|
108
|
+
- app/assets/javascripts/components/primer/utils.d.ts
|
108
109
|
- app/assets/javascripts/lib/primer/forms/primer_multi_input.d.ts
|
109
110
|
- app/assets/javascripts/lib/primer/forms/primer_text_field.d.ts
|
110
111
|
- app/assets/javascripts/lib/primer/forms/toggle_switch_input.d.ts
|
@@ -496,6 +497,9 @@ files:
|
|
496
497
|
- app/components/primer/truncate.css.map
|
497
498
|
- app/components/primer/truncate.pcss
|
498
499
|
- app/components/primer/truncate.rb
|
500
|
+
- app/components/primer/utils.d.ts
|
501
|
+
- app/components/primer/utils.js
|
502
|
+
- app/components/primer/utils.ts
|
499
503
|
- app/forms/action_menu_form.rb
|
500
504
|
- app/forms/after_content_form.rb
|
501
505
|
- app/forms/after_content_form/after_content.html.erb
|
@@ -953,7 +957,7 @@ licenses:
|
|
953
957
|
- MIT
|
954
958
|
metadata:
|
955
959
|
allowed_push_host: https://rubygems.org
|
956
|
-
post_install_message:
|
960
|
+
post_install_message:
|
957
961
|
rdoc_options: []
|
958
962
|
require_paths:
|
959
963
|
- lib
|
@@ -969,7 +973,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
969
973
|
version: '0'
|
970
974
|
requirements: []
|
971
975
|
rubygems_version: 3.5.22
|
972
|
-
signing_key:
|
976
|
+
signing_key:
|
973
977
|
specification_version: 4
|
974
978
|
summary: ViewComponents for the Primer Design System
|
975
979
|
test_files: []
|