primer_view_components 0.0.112 → 0.0.113

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +38 -0
  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/assets/styles/primer_view_components.css +3 -1
  6. data/app/assets/styles/primer_view_components.css.map +1 -1
  7. data/app/components/primer/alpha/action_list.css +1 -1
  8. data/app/components/primer/alpha/action_list.css.json +1 -1
  9. data/app/components/primer/alpha/action_list.css.map +1 -1
  10. data/app/components/primer/alpha/action_list.pcss +0 -15
  11. data/app/components/primer/alpha/auto_complete.css +1 -1
  12. data/app/components/primer/alpha/auto_complete.css.map +1 -1
  13. data/app/components/primer/alpha/auto_complete.pcss +1 -1
  14. data/app/components/primer/alpha/banner.css +1 -1
  15. data/app/components/primer/alpha/banner.css.map +1 -1
  16. data/app/components/primer/alpha/banner.pcss +2 -2
  17. data/app/components/primer/alpha/dialog/body.rb +3 -0
  18. data/app/components/primer/alpha/dialog/footer.rb +3 -0
  19. data/app/components/primer/alpha/dialog/header.rb +3 -0
  20. data/app/components/primer/alpha/dialog.css +1 -0
  21. data/app/components/primer/alpha/dialog.css.json +1 -0
  22. data/app/components/primer/alpha/dialog.css.map +1 -0
  23. data/app/components/primer/alpha/dialog.pcss +484 -0
  24. data/app/components/primer/alpha/dialog.rb +3 -0
  25. data/app/components/primer/alpha/segmented_control.css +1 -1
  26. data/app/components/primer/alpha/segmented_control.css.map +1 -1
  27. data/app/components/primer/alpha/text_field.css +3 -0
  28. data/app/components/primer/alpha/text_field.css.json +1 -0
  29. data/app/components/primer/alpha/text_field.css.map +1 -0
  30. data/app/components/primer/alpha/text_field.pcss +683 -0
  31. data/app/components/primer/alpha/toggle_switch.d.ts +1 -1
  32. data/app/components/primer/alpha/toggle_switch.js +7 -4
  33. data/app/components/primer/alpha/toggle_switch.ts +7 -3
  34. data/app/components/primer/beta/button_group.css +1 -0
  35. data/app/components/primer/beta/button_group.css.json +1 -0
  36. data/app/components/primer/beta/button_group.css.map +1 -0
  37. data/app/components/primer/beta/button_group.pcss +92 -0
  38. data/app/components/primer/{clipboard_copy.d.ts → beta/clipboard_copy.d.ts} +0 -0
  39. data/app/components/primer/{clipboard_copy.html.erb → beta/clipboard_copy.html.erb} +0 -0
  40. data/app/components/primer/{clipboard_copy.js → beta/clipboard_copy.js} +0 -0
  41. data/app/components/primer/beta/clipboard_copy.rb +50 -0
  42. data/app/components/primer/{clipboard_copy.ts → beta/clipboard_copy.ts} +0 -0
  43. data/app/components/primer/beta/popover.css.map +1 -1
  44. data/app/components/primer/beta/popover.pcss +5 -5
  45. data/app/components/primer/beta/relative_time.rb +160 -0
  46. data/app/components/primer/button_component.css +1 -0
  47. data/app/components/primer/button_component.css.json +1 -0
  48. data/app/components/primer/button_component.css.map +1 -0
  49. data/app/components/primer/button_component.pcss +557 -0
  50. data/app/components/primer/button_component.rb +1 -1
  51. data/app/components/primer/clipboard_copy.rb +2 -43
  52. data/app/components/primer/component.rb +4 -0
  53. data/app/components/primer/local_time.d.ts +1 -1
  54. data/app/components/primer/local_time.js +1 -1
  55. data/app/components/primer/local_time.rb +3 -1
  56. data/app/components/primer/local_time.ts +1 -1
  57. data/app/components/primer/primer.d.ts +1 -1
  58. data/app/components/primer/primer.js +1 -1
  59. data/app/components/primer/primer.pcss +10 -0
  60. data/app/components/primer/primer.ts +1 -1
  61. data/app/components/primer/time_ago_component.d.ts +1 -1
  62. data/app/components/primer/time_ago_component.js +1 -1
  63. data/app/components/primer/time_ago_component.rb +2 -1
  64. data/app/components/primer/time_ago_component.ts +1 -1
  65. data/app/forms/submit_button_form.rb +8 -2
  66. data/app/helpers/primer/form_helper.rb +12 -0
  67. data/lib/postcss_mixins/clearfix.pcss +12 -0
  68. data/lib/primer/deprecations.rb +96 -26
  69. data/lib/primer/deprecations.yml +68 -0
  70. data/lib/primer/forms/base.rb +7 -20
  71. data/lib/primer/forms/base_component.rb +15 -1
  72. data/lib/primer/forms/button.html.erb +4 -0
  73. data/lib/primer/forms/button.rb +68 -0
  74. data/lib/primer/forms/check_box.html.erb +2 -2
  75. data/lib/primer/forms/check_box.rb +1 -1
  76. data/lib/primer/forms/check_box_group.html.erb +2 -2
  77. data/lib/primer/forms/dsl/button_input.rb +29 -0
  78. data/lib/primer/forms/dsl/input_methods.rb +7 -2
  79. data/lib/primer/forms/dsl/submit_button_input.rb +1 -0
  80. data/lib/primer/forms/dsl/text_field_input.rb +0 -7
  81. data/lib/primer/forms/radio_button.html.erb +2 -2
  82. data/lib/primer/forms/radio_button.rb +1 -1
  83. data/lib/primer/forms/radio_button_group.html.erb +2 -2
  84. data/lib/primer/forms/select_list.html.erb +1 -1
  85. data/lib/primer/forms/select_list.rb +4 -1
  86. data/lib/primer/forms/submit_button.html.erb +1 -4
  87. data/lib/primer/forms/submit_button.rb +1 -37
  88. data/lib/primer/forms/text_area.html.erb +1 -1
  89. data/lib/primer/forms/text_area.rb +5 -1
  90. data/lib/primer/forms/text_field.html.erb +1 -1
  91. data/lib/primer/forms/text_field.rb +11 -0
  92. data/lib/primer/forms/utils.rb +28 -0
  93. data/lib/primer/view_components/audited.rb +14 -0
  94. data/lib/primer/view_components/engine.rb +1 -0
  95. data/lib/primer/view_components/linters/clipboard_copy_component_migration_counter.rb +2 -2
  96. data/lib/primer/view_components/linters/helpers/deprecated_components_helpers.rb +3 -18
  97. data/lib/primer/view_components/version.rb +1 -1
  98. data/lib/rubocop/cop/primer/component_name_migration.rb +2 -2
  99. data/lib/tasks/docs.rake +3 -2
  100. data/previews/primer/alpha/auto_complete_preview.rb +12 -0
  101. data/previews/primer/alpha/segmented_control_preview.rb +9 -6
  102. data/previews/primer/alpha/text_field_preview.rb +77 -52
  103. data/previews/primer/beta/clipboard_copy_preview/element.html.erb +2 -0
  104. data/previews/primer/beta/clipboard_copy_preview.rb +39 -0
  105. data/previews/primer/beta/relative_time_preview.rb +271 -0
  106. data/previews/primer/forms/forms_preview.rb +1 -0
  107. data/static/arguments.json +143 -33
  108. data/static/audited_at.json +6 -4
  109. data/static/constants.json +124 -0
  110. data/static/statuses.json +4 -2
  111. metadata +34 -8
  112. data/previews/primer/clipboard_copy_preview/element.html.erb +0 -2
  113. data/previews/primer/clipboard_copy_preview.rb +0 -37
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.112
4
+ version: 0.0.113
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: 2022-11-28 00:00:00.000000000 Z
11
+ date: 2022-12-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview
@@ -437,7 +437,11 @@ files:
437
437
  - app/components/primer/alpha/button_marketing.css.map
438
438
  - app/components/primer/alpha/button_marketing.pcss
439
439
  - app/components/primer/alpha/button_marketing.rb
440
+ - app/components/primer/alpha/dialog.css
441
+ - app/components/primer/alpha/dialog.css.json
442
+ - app/components/primer/alpha/dialog.css.map
440
443
  - app/components/primer/alpha/dialog.html.erb
444
+ - app/components/primer/alpha/dialog.pcss
441
445
  - app/components/primer/alpha/dialog.rb
442
446
  - app/components/primer/alpha/dialog/body.rb
443
447
  - app/components/primer/alpha/dialog/footer.rb
@@ -497,6 +501,10 @@ files:
497
501
  - app/components/primer/alpha/tab_nav.rb
498
502
  - app/components/primer/alpha/tab_panels.html.erb
499
503
  - app/components/primer/alpha/tab_panels.rb
504
+ - app/components/primer/alpha/text_field.css
505
+ - app/components/primer/alpha/text_field.css.json
506
+ - app/components/primer/alpha/text_field.css.map
507
+ - app/components/primer/alpha/text_field.pcss
500
508
  - app/components/primer/alpha/text_field.rb
501
509
  - app/components/primer/alpha/toggle_switch.css
502
510
  - app/components/primer/alpha/toggle_switch.css.json
@@ -568,8 +576,17 @@ files:
568
576
  - app/components/primer/beta/button.html.erb
569
577
  - app/components/primer/beta/button.pcss
570
578
  - app/components/primer/beta/button.rb
579
+ - app/components/primer/beta/button_group.css
580
+ - app/components/primer/beta/button_group.css.json
581
+ - app/components/primer/beta/button_group.css.map
571
582
  - app/components/primer/beta/button_group.html.erb
583
+ - app/components/primer/beta/button_group.pcss
572
584
  - app/components/primer/beta/button_group.rb
585
+ - app/components/primer/beta/clipboard_copy.d.ts
586
+ - app/components/primer/beta/clipboard_copy.html.erb
587
+ - app/components/primer/beta/clipboard_copy.js
588
+ - app/components/primer/beta/clipboard_copy.rb
589
+ - app/components/primer/beta/clipboard_copy.ts
573
590
  - app/components/primer/beta/close_button.rb
574
591
  - app/components/primer/beta/counter.css
575
592
  - app/components/primer/beta/counter.css.json
@@ -609,6 +626,7 @@ files:
609
626
  - app/components/primer/beta/progress_bar.html.erb
610
627
  - app/components/primer/beta/progress_bar.pcss
611
628
  - app/components/primer/beta/progress_bar.rb
629
+ - app/components/primer/beta/relative_time.rb
612
630
  - app/components/primer/beta/text.rb
613
631
  - app/components/primer/beta/truncate.css
614
632
  - app/components/primer/beta/truncate.css.json
@@ -620,13 +638,13 @@ files:
620
638
  - app/components/primer/blankslate_component.rb
621
639
  - app/components/primer/box.rb
622
640
  - app/components/primer/box_component.rb
641
+ - app/components/primer/button_component.css
642
+ - app/components/primer/button_component.css.json
643
+ - app/components/primer/button_component.css.map
623
644
  - app/components/primer/button_component.html.erb
645
+ - app/components/primer/button_component.pcss
624
646
  - app/components/primer/button_component.rb
625
- - app/components/primer/clipboard_copy.d.ts
626
- - app/components/primer/clipboard_copy.html.erb
627
- - app/components/primer/clipboard_copy.js
628
647
  - app/components/primer/clipboard_copy.rb
629
- - app/components/primer/clipboard_copy.ts
630
648
  - app/components/primer/component.rb
631
649
  - app/components/primer/conditional_wrapper.rb
632
650
  - app/components/primer/content.rb
@@ -742,6 +760,7 @@ files:
742
760
  - app/lib/primer/underline_nav_helper.rb
743
761
  - app/lib/primer/view_helper.rb
744
762
  - lib/postcss_mixins/activeIndicatorLine.pcss
763
+ - lib/postcss_mixins/clearfix.pcss
745
764
  - lib/postcss_mixins/focusBoxShadowInset.pcss
746
765
  - lib/postcss_mixins/focusOutline.pcss
747
766
  - lib/postcss_mixins/focusOutlineOnEmphasis.pcss
@@ -752,6 +771,7 @@ files:
752
771
  - lib/primer/classify/utilities.yml
753
772
  - lib/primer/classify/validation.rb
754
773
  - lib/primer/deprecations.rb
774
+ - lib/primer/deprecations.yml
755
775
  - lib/primer/example_image.rb
756
776
  - lib/primer/form_components.rb
757
777
  - lib/primer/forms/acts_as_component.rb
@@ -760,12 +780,15 @@ files:
760
780
  - lib/primer/forms/base_component.rb
761
781
  - lib/primer/forms/buffer_rewriter.rb
762
782
  - lib/primer/forms/builder.rb
783
+ - lib/primer/forms/button.html.erb
784
+ - lib/primer/forms/button.rb
763
785
  - lib/primer/forms/caption.html.erb
764
786
  - lib/primer/forms/caption.rb
765
787
  - lib/primer/forms/check_box.html.erb
766
788
  - lib/primer/forms/check_box.rb
767
789
  - lib/primer/forms/check_box_group.html.erb
768
790
  - lib/primer/forms/check_box_group.rb
791
+ - lib/primer/forms/dsl/button_input.rb
769
792
  - lib/primer/forms/dsl/check_box_group_input.rb
770
793
  - lib/primer/forms/dsl/check_box_input.rb
771
794
  - lib/primer/forms/dsl/form_object.rb
@@ -809,7 +832,9 @@ files:
809
832
  - lib/primer/forms/text_area.rb
810
833
  - lib/primer/forms/text_field.html.erb
811
834
  - lib/primer/forms/text_field.rb
835
+ - lib/primer/forms/utils.rb
812
836
  - lib/primer/view_components.rb
837
+ - lib/primer/view_components/audited.rb
813
838
  - lib/primer/view_components/constants.rb
814
839
  - lib/primer/view_components/engine.rb
815
840
  - lib/primer/view_components/linters.rb
@@ -918,6 +943,8 @@ files:
918
943
  - previews/primer/beta/button_preview/trailing_action.html.erb
919
944
  - previews/primer/beta/button_preview/trailing_visual.html.erb
920
945
  - previews/primer/beta/button_preview/with_tooltip.html.erb
946
+ - previews/primer/beta/clipboard_copy_preview.rb
947
+ - previews/primer/beta/clipboard_copy_preview/element.html.erb
921
948
  - previews/primer/beta/close_button_preview.rb
922
949
  - previews/primer/beta/counter_preview.rb
923
950
  - previews/primer/beta/details_preview.rb
@@ -928,10 +955,9 @@ files:
928
955
  - previews/primer/beta/link_preview.rb
929
956
  - previews/primer/beta/popover_preview.rb
930
957
  - previews/primer/beta/progress_bar_preview.rb
958
+ - previews/primer/beta/relative_time_preview.rb
931
959
  - previews/primer/beta/text_preview.rb
932
960
  - previews/primer/beta/truncate_preview.rb
933
- - previews/primer/clipboard_copy_preview.rb
934
- - previews/primer/clipboard_copy_preview/element.html.erb
935
961
  - previews/primer/forms/forms_preview.rb
936
962
  - previews/primer/forms/forms_preview/after_content_form.html.erb
937
963
  - previews/primer/forms/forms_preview/array_check_box_group_form.html.erb
@@ -1,2 +0,0 @@
1
- <%= render(Primer::ClipboardCopy.new(for: "blob-path", "aria-label": aria_label)) %>
2
- <div id="blob-path">src/index.js</div>
@@ -1,37 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Primer
4
- # @label ClipboardCopy
5
- class ClipboardCopyPreview < ViewComponent::Preview
6
- # @label Playground
7
- #
8
- # @param aria_label [String]
9
- # @param value [String]
10
- def playground(value: "Text to copy", aria_label: "Copy text to the system clipboard")
11
- render(Primer::ClipboardCopy.new(value: value, "aria-label": aria_label))
12
- end
13
-
14
- # @label Default Options
15
- #
16
- # @param aria_label [String]
17
- # @param value [String]
18
- def default(value: "Text to copy", aria_label: "Copy text to the system clipboard")
19
- render(Primer::ClipboardCopy.new(value: value, "aria-label": aria_label))
20
- end
21
-
22
- # @label With text instead of icons
23
- #
24
- # @param aria_label [String]
25
- # @param value [String]
26
- def text(value: "Text to copy", aria_label: "Copy text to the system clipboard")
27
- render(Primer::ClipboardCopy.new(value: value, "aria-label": aria_label)) { "Click to copy!" }
28
- end
29
-
30
- # @label Copying from an element
31
- #
32
- # @param aria_label [String]
33
- def element(aria_label: "Copy text to the system clipboard")
34
- render_with_template(locals: { aria_label: aria_label })
35
- end
36
- end
37
- end