primer_view_components 0.0.37 → 0.0.42

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +260 -24
  3. data/app/assets/javascripts/primer_view_components.js +1 -1
  4. data/app/assets/javascripts/primer_view_components.js.map +1 -1
  5. data/app/components/primer/auto_complete.rb +4 -2
  6. data/app/components/primer/auto_complete/item.rb +1 -1
  7. data/app/components/primer/avatar_component.rb +22 -3
  8. data/app/components/primer/avatar_stack_component.rb +8 -5
  9. data/app/components/primer/base_button.rb +47 -0
  10. data/app/components/primer/base_component.rb +19 -12
  11. data/app/components/primer/blankslate_component.rb +10 -7
  12. data/app/components/primer/border_box_component.rb +1 -1
  13. data/app/components/primer/box_component.rb +1 -1
  14. data/app/components/primer/breadcrumb_component.rb +1 -1
  15. data/app/components/primer/button_component.html.erb +9 -0
  16. data/app/components/primer/button_component.rb +39 -21
  17. data/app/components/primer/{button_group_component.html.erb → button_group.html.erb} +0 -0
  18. data/app/components/primer/button_group.rb +61 -0
  19. data/app/components/primer/button_marketing_component.rb +4 -9
  20. data/app/components/primer/clipboard_copy.html.erb +8 -0
  21. data/app/components/primer/clipboard_copy.rb +26 -0
  22. data/app/components/primer/clipboard_copy_component.d.ts +1 -0
  23. data/app/components/primer/clipboard_copy_component.js +34 -0
  24. data/app/components/primer/clipboard_copy_component.ts +39 -0
  25. data/app/components/primer/close_button.rb +11 -2
  26. data/app/components/primer/component.rb +22 -3
  27. data/app/components/primer/counter_component.rb +6 -1
  28. data/app/components/primer/details_component.rb +1 -1
  29. data/app/components/primer/dropdown/menu_component.rb +1 -1
  30. data/app/components/primer/dropdown_component.rb +1 -1
  31. data/app/components/primer/flash_component.rb +3 -3
  32. data/app/components/primer/flex_component.rb +28 -1
  33. data/app/components/primer/flex_item_component.rb +20 -1
  34. data/app/components/primer/heading_component.rb +25 -4
  35. data/app/components/primer/hidden_text_expander.rb +4 -6
  36. data/app/components/primer/icon_button.rb +65 -0
  37. data/app/components/primer/image.rb +46 -0
  38. data/app/components/primer/image_crop.d.ts +1 -0
  39. data/app/components/primer/image_crop.html.erb +12 -0
  40. data/app/components/primer/image_crop.js +1 -0
  41. data/app/components/primer/image_crop.rb +36 -0
  42. data/app/components/primer/image_crop.ts +1 -0
  43. data/app/components/primer/label_component.rb +7 -3
  44. data/app/components/primer/layout_component.rb +1 -1
  45. data/app/components/primer/link_component.rb +1 -1
  46. data/app/components/primer/local_time.d.ts +1 -0
  47. data/app/components/primer/local_time.js +1 -0
  48. data/app/components/primer/local_time.rb +59 -0
  49. data/app/components/primer/local_time.ts +1 -0
  50. data/app/components/primer/{markdown_component.rb → markdown.rb} +12 -7
  51. data/app/components/primer/menu_component.rb +1 -1
  52. data/app/components/primer/navigation/tab_component.rb +8 -1
  53. data/app/components/primer/octicon_component.html.erb +7 -0
  54. data/app/components/primer/octicon_component.rb +53 -19
  55. data/app/components/primer/octicon_symbols_component.html.erb +3 -0
  56. data/app/components/primer/octicon_symbols_component.rb +61 -0
  57. data/app/components/primer/popover_component.rb +1 -1
  58. data/app/components/primer/primer.d.ts +3 -0
  59. data/app/components/primer/primer.js +3 -0
  60. data/app/components/primer/primer.ts +3 -0
  61. data/app/components/primer/progress_bar_component.rb +1 -1
  62. data/app/components/primer/spinner_component.rb +3 -3
  63. data/app/components/primer/state_component.rb +2 -2
  64. data/app/components/primer/subhead_component.rb +34 -4
  65. data/app/components/primer/tab_container_component.rb +1 -1
  66. data/app/components/primer/tab_nav_component.html.erb +4 -0
  67. data/app/components/primer/tab_nav_component.rb +45 -10
  68. data/app/components/primer/text_component.rb +6 -3
  69. data/app/components/primer/time_ago_component.rb +1 -1
  70. data/app/components/primer/timeline_item_component.rb +1 -1
  71. data/app/components/primer/{tooltip_component.rb → tooltip.rb} +11 -9
  72. data/app/components/primer/truncate.rb +7 -3
  73. data/app/components/primer/underline_nav_component.rb +1 -1
  74. data/app/lib/primer/classify.rb +21 -38
  75. data/app/lib/primer/classify/cache.rb +20 -15
  76. data/app/lib/primer/classify/flex.rb +111 -0
  77. data/app/lib/primer/classify/functional_border_colors.rb +1 -2
  78. data/app/lib/primer/fetch_or_fallback_helper.rb +2 -2
  79. data/app/lib/primer/octicon/cache.rb +42 -0
  80. data/app/lib/primer/view_helper.rb +2 -1
  81. data/lib/primer/view_components.rb +1 -1
  82. data/lib/primer/view_components/engine.rb +2 -0
  83. data/lib/primer/view_components/version.rb +1 -1
  84. data/lib/tasks/coverage.rake +14 -0
  85. data/lib/tasks/docs.rake +350 -0
  86. data/lib/tasks/statuses.rake +12 -0
  87. data/lib/yard/docs_helper.rb +57 -0
  88. data/static/statuses.json +54 -1
  89. metadata +51 -12
  90. data/app/components/primer/button_group_component.rb +0 -35
  91. data/app/components/primer/foo_bar.d.ts +0 -1
  92. data/app/components/primer/foo_bar.js +0 -1
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.0.37
4
+ version: 0.0.42
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: 2021-04-15 00:00:00.000000000 Z
11
+ date: 2021-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview
@@ -39,7 +39,7 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: 5.0.0
41
41
  - !ruby/object:Gem::Dependency
42
- name: octicons_helper
42
+ name: octicons
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
@@ -86,6 +86,20 @@ dependencies:
86
86
  - - "~>"
87
87
  - !ruby/object:Gem::Version
88
88
  version: 0.6.3
89
+ - !ruby/object:Gem::Dependency
90
+ name: axe-core-api
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - "~>"
94
+ - !ruby/object:Gem::Version
95
+ version: '4.1'
96
+ type: :development
97
+ prerelease: false
98
+ version_requirements: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - "~>"
101
+ - !ruby/object:Gem::Version
102
+ version: '4.1'
89
103
  - !ruby/object:Gem::Dependency
90
104
  name: benchmark-ips
91
105
  requirement: !ruby/object:Gem::Requirement
@@ -120,14 +134,14 @@ dependencies:
120
134
  requirements:
121
135
  - - '='
122
136
  - !ruby/object:Gem::Version
123
- version: '0.11'
137
+ version: '0.13'
124
138
  type: :development
125
139
  prerelease: false
126
140
  version_requirements: !ruby/object:Gem::Requirement
127
141
  requirements:
128
142
  - - '='
129
143
  - !ruby/object:Gem::Version
130
- version: '0.11'
144
+ version: '0.13'
131
145
  - !ruby/object:Gem::Dependency
132
146
  name: listen
133
147
  requirement: !ruby/object:Gem::Requirement
@@ -333,6 +347,7 @@ files:
333
347
  - app/components/primer/avatar_component.rb
334
348
  - app/components/primer/avatar_stack_component.html.erb
335
349
  - app/components/primer/avatar_stack_component.rb
350
+ - app/components/primer/base_button.rb
336
351
  - app/components/primer/base_component.rb
337
352
  - app/components/primer/blankslate_component.html.erb
338
353
  - app/components/primer/blankslate_component.rb
@@ -341,10 +356,16 @@ files:
341
356
  - app/components/primer/box_component.rb
342
357
  - app/components/primer/breadcrumb_component.html.erb
343
358
  - app/components/primer/breadcrumb_component.rb
359
+ - app/components/primer/button_component.html.erb
344
360
  - app/components/primer/button_component.rb
345
- - app/components/primer/button_group_component.html.erb
346
- - app/components/primer/button_group_component.rb
361
+ - app/components/primer/button_group.html.erb
362
+ - app/components/primer/button_group.rb
347
363
  - app/components/primer/button_marketing_component.rb
364
+ - app/components/primer/clipboard_copy.html.erb
365
+ - app/components/primer/clipboard_copy.rb
366
+ - app/components/primer/clipboard_copy_component.d.ts
367
+ - app/components/primer/clipboard_copy_component.js
368
+ - app/components/primer/clipboard_copy_component.ts
348
369
  - app/components/primer/close_button.rb
349
370
  - app/components/primer/component.rb
350
371
  - app/components/primer/counter_component.rb
@@ -360,20 +381,32 @@ files:
360
381
  - app/components/primer/flash_component.rb
361
382
  - app/components/primer/flex_component.rb
362
383
  - app/components/primer/flex_item_component.rb
363
- - app/components/primer/foo_bar.d.ts
364
- - app/components/primer/foo_bar.js
365
384
  - app/components/primer/heading_component.rb
366
385
  - app/components/primer/hidden_text_expander.rb
386
+ - app/components/primer/icon_button.rb
387
+ - app/components/primer/image.rb
388
+ - app/components/primer/image_crop.d.ts
389
+ - app/components/primer/image_crop.html.erb
390
+ - app/components/primer/image_crop.js
391
+ - app/components/primer/image_crop.rb
392
+ - app/components/primer/image_crop.ts
367
393
  - app/components/primer/label_component.rb
368
394
  - app/components/primer/layout_component.html.erb
369
395
  - app/components/primer/layout_component.rb
370
396
  - app/components/primer/link_component.rb
371
- - app/components/primer/markdown_component.rb
397
+ - app/components/primer/local_time.d.ts
398
+ - app/components/primer/local_time.js
399
+ - app/components/primer/local_time.rb
400
+ - app/components/primer/local_time.ts
401
+ - app/components/primer/markdown.rb
372
402
  - app/components/primer/menu_component.html.erb
373
403
  - app/components/primer/menu_component.rb
374
404
  - app/components/primer/navigation/tab_component.html.erb
375
405
  - app/components/primer/navigation/tab_component.rb
406
+ - app/components/primer/octicon_component.html.erb
376
407
  - app/components/primer/octicon_component.rb
408
+ - app/components/primer/octicon_symbols_component.html.erb
409
+ - app/components/primer/octicon_symbols_component.rb
377
410
  - app/components/primer/popover_component.html.erb
378
411
  - app/components/primer/popover_component.rb
379
412
  - app/components/primer/primer.d.ts
@@ -399,13 +432,14 @@ files:
399
432
  - app/components/primer/time_ago_component.ts
400
433
  - app/components/primer/timeline_item_component.html.erb
401
434
  - app/components/primer/timeline_item_component.rb
402
- - app/components/primer/tooltip_component.rb
435
+ - app/components/primer/tooltip.rb
403
436
  - app/components/primer/truncate.rb
404
437
  - app/components/primer/underline_nav_component.html.erb
405
438
  - app/components/primer/underline_nav_component.rb
406
439
  - app/lib/primer/class_name_helper.rb
407
440
  - app/lib/primer/classify.rb
408
441
  - app/lib/primer/classify/cache.rb
442
+ - app/lib/primer/classify/flex.rb
409
443
  - app/lib/primer/classify/functional_background_colors.rb
410
444
  - app/lib/primer/classify/functional_border_colors.rb
411
445
  - app/lib/primer/classify/functional_colors.rb
@@ -413,6 +447,7 @@ files:
413
447
  - app/lib/primer/classify/spacing.rb
414
448
  - app/lib/primer/fetch_or_fallback_helper.rb
415
449
  - app/lib/primer/join_style_arguments_helper.rb
450
+ - app/lib/primer/octicon/cache.rb
416
451
  - app/lib/primer/status/dsl.rb
417
452
  - app/lib/primer/tabbed_component_helper.rb
418
453
  - app/lib/primer/test_selector_helper.rb
@@ -420,6 +455,10 @@ files:
420
455
  - lib/primer/view_components.rb
421
456
  - lib/primer/view_components/engine.rb
422
457
  - lib/primer/view_components/version.rb
458
+ - lib/tasks/coverage.rake
459
+ - lib/tasks/docs.rake
460
+ - lib/tasks/statuses.rake
461
+ - lib/yard/docs_helper.rb
423
462
  - lib/yard/renders_many_handler.rb
424
463
  - lib/yard/renders_one_handler.rb
425
464
  - static/statuses.json
@@ -443,7 +482,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
443
482
  - !ruby/object:Gem::Version
444
483
  version: '0'
445
484
  requirements: []
446
- rubygems_version: 3.1.2
485
+ rubygems_version: 3.0.3
447
486
  signing_key:
448
487
  specification_version: 4
449
488
  summary: ViewComponents for the Primer Design System
@@ -1,35 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Primer
4
- # Use ButtonGroupComponent to render a series of buttons.
5
- class ButtonGroupComponent < Primer::Component
6
- # Required list of buttons to be rendered.
7
- #
8
- # @param kwargs [Hash] The same arguments as <%= link_to_component(Primer::ButtonComponent) %>.
9
- renders_many :buttons, ->(**kwargs) { Primer::ButtonComponent.new(group_item: true, **kwargs) }
10
-
11
- # @example Default
12
- # <%= render(Primer::ButtonGroupComponent.new) do |component|
13
- # component.button { "Default" }
14
- # component.button(scheme: :primary) { "Primary" }
15
- # component.button(scheme: :danger) { "Danger" }
16
- # component.button(scheme: :outline) { "Outline" }
17
- # component.button(classes: "my-class") { "Custom class" }
18
- # end %>
19
- #
20
- # @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
21
- def initialize(**system_arguments)
22
- @system_arguments = system_arguments
23
- @system_arguments[:tag] ||= :div
24
-
25
- @system_arguments[:classes] = class_names(
26
- "BtnGroup",
27
- system_arguments[:classes]
28
- )
29
- end
30
-
31
- def render?
32
- buttons.any?
33
- end
34
- end
35
- end
@@ -1 +0,0 @@
1
- import '@github/details-menu-element';
@@ -1 +0,0 @@
1
- import '@github/details-menu-element';