primer_view_components 0.0.109 → 0.0.110
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +22 -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/{beta → alpha}/banner.css +0 -0
- data/app/components/primer/alpha/banner.css.json +1 -0
- data/app/components/primer/{beta → alpha}/banner.css.map +1 -1
- data/app/components/primer/{beta → alpha}/banner.html.erb +0 -0
- data/app/components/primer/{beta → alpha}/banner.pcss +1 -0
- data/app/components/primer/{beta → alpha}/banner.rb +12 -12
- data/app/components/primer/alpha/segmented_control.css.map +1 -1
- data/app/components/primer/alpha/segmented_control.pcss +1 -0
- data/app/components/primer/alpha/toggle_switch.css +1 -0
- data/app/components/primer/alpha/toggle_switch.css.json +1 -0
- data/app/components/primer/alpha/toggle_switch.css.map +1 -0
- data/app/components/primer/alpha/toggle_switch.pcss +244 -0
- data/app/components/primer/{beta → alpha}/x_banner.d.ts +0 -0
- data/app/components/primer/{beta → alpha}/x_banner.js +0 -0
- data/app/components/primer/{beta → alpha}/x_banner.ts +0 -0
- data/app/components/primer/beta/blankslate.css +1 -0
- data/app/components/primer/beta/blankslate.css.json +1 -0
- data/app/components/primer/beta/blankslate.css.map +1 -0
- data/app/components/primer/beta/blankslate.pcss +90 -0
- data/app/components/primer/beta/breadcrumbs.css +1 -0
- data/app/components/primer/beta/breadcrumbs.css.json +1 -0
- data/app/components/primer/beta/breadcrumbs.css.map +1 -0
- data/app/components/primer/beta/breadcrumbs.pcss +30 -0
- data/app/components/primer/beta/button.css.map +1 -1
- data/app/components/primer/beta/button.pcss +0 -4
- data/app/components/primer/beta/counter.css +1 -0
- data/app/components/primer/beta/counter.css.json +1 -0
- data/app/components/primer/beta/counter.css.map +1 -0
- data/app/components/primer/beta/counter.pcss +35 -0
- data/app/components/primer/beta/label.css +1 -0
- data/app/components/primer/beta/label.css.json +1 -0
- data/app/components/primer/beta/label.css.map +1 -0
- data/app/components/primer/beta/label.pcss +103 -0
- data/app/components/primer/beta/progress_bar.css +1 -0
- data/app/components/primer/beta/progress_bar.css.json +1 -0
- data/app/components/primer/beta/progress_bar.css.map +1 -0
- data/app/components/primer/{progress_bar_component.html.erb → beta/progress_bar.html.erb} +0 -0
- data/app/components/primer/beta/progress_bar.pcss +26 -0
- data/app/components/primer/beta/progress_bar.rb +72 -0
- data/app/components/primer/beta/truncate.css +1 -0
- data/app/components/primer/beta/truncate.css.json +1 -0
- data/app/components/primer/beta/truncate.css.map +1 -0
- data/app/components/primer/beta/truncate.pcss +31 -0
- data/app/components/primer/primer.d.ts +1 -1
- data/app/components/primer/primer.js +1 -1
- data/app/components/primer/primer.pcss +12 -2
- data/app/components/primer/primer.ts +1 -1
- data/app/components/primer/progress_bar_component.rb +2 -65
- data/app/components/primer/state_component.css +1 -0
- data/app/components/primer/state_component.css.json +1 -0
- data/app/components/primer/state_component.css.map +1 -0
- data/app/components/primer/state_component.pcss +50 -0
- data/app/components/primer/subhead_component.css +1 -0
- data/app/components/primer/subhead_component.css.json +1 -0
- data/app/components/primer/subhead_component.css.map +1 -0
- data/app/components/primer/subhead_component.pcss +49 -0
- data/app/components/primer/truncate.css +1 -0
- data/app/components/primer/truncate.css.json +1 -0
- data/app/components/primer/truncate.css.map +1 -0
- data/app/components/primer/truncate.pcss +30 -0
- data/lib/primer/deprecations.rb +2 -1
- data/lib/primer/view_components/version.rb +1 -1
- data/lib/tasks/docs.rake +3 -3
- data/lib/tasks/test.rake +8 -0
- data/previews/primer/alpha/banner_preview/with_action_button.html.erb +4 -0
- data/previews/primer/{beta → alpha}/banner_preview/with_action_content.html.erb +1 -1
- data/previews/primer/alpha/banner_preview.rb +97 -0
- data/previews/primer/alpha/segmented_control_preview.rb +106 -20
- data/previews/primer/beta/counter_preview.rb +55 -8
- data/previews/primer/beta/progress_bar_preview.rb +60 -0
- data/static/arguments.json +76 -76
- data/static/audited_at.json +2 -1
- data/static/constants.json +34 -32
- data/static/statuses.json +3 -2
- metadata +57 -16
- data/app/components/primer/beta/banner.css.json +0 -1
- data/previews/primer/beta/banner_preview/with_action_button.html.erb +0 -4
- data/previews/primer/beta/banner_preview.rb +0 -54
- data/previews/primer/progress_bar_component_preview.rb +0 -28
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.
|
4
|
+
version: 0.0.110
|
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-
|
11
|
+
date: 2022-11-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionview
|
@@ -422,6 +422,12 @@ files:
|
|
422
422
|
- app/components/primer/alpha/auto_complete.rb
|
423
423
|
- app/components/primer/alpha/auto_complete/auto_complete.html.erb
|
424
424
|
- app/components/primer/alpha/auto_complete/item.rb
|
425
|
+
- app/components/primer/alpha/banner.css
|
426
|
+
- app/components/primer/alpha/banner.css.json
|
427
|
+
- app/components/primer/alpha/banner.css.map
|
428
|
+
- app/components/primer/alpha/banner.html.erb
|
429
|
+
- app/components/primer/alpha/banner.pcss
|
430
|
+
- app/components/primer/alpha/banner.rb
|
425
431
|
- app/components/primer/alpha/button_marketing.rb
|
426
432
|
- app/components/primer/alpha/dialog.html.erb
|
427
433
|
- app/components/primer/alpha/dialog.rb
|
@@ -466,9 +472,13 @@ files:
|
|
466
472
|
- app/components/primer/alpha/tab_panels.html.erb
|
467
473
|
- app/components/primer/alpha/tab_panels.rb
|
468
474
|
- app/components/primer/alpha/text_field.rb
|
475
|
+
- app/components/primer/alpha/toggle_switch.css
|
476
|
+
- app/components/primer/alpha/toggle_switch.css.json
|
477
|
+
- app/components/primer/alpha/toggle_switch.css.map
|
469
478
|
- app/components/primer/alpha/toggle_switch.d.ts
|
470
479
|
- app/components/primer/alpha/toggle_switch.html.erb
|
471
480
|
- app/components/primer/alpha/toggle_switch.js
|
481
|
+
- app/components/primer/alpha/toggle_switch.pcss
|
472
482
|
- app/components/primer/alpha/toggle_switch.rb
|
473
483
|
- app/components/primer/alpha/toggle_switch.ts
|
474
484
|
- app/components/primer/alpha/tool_tip.d.ts
|
@@ -479,6 +489,9 @@ files:
|
|
479
489
|
- app/components/primer/alpha/underline_nav.rb
|
480
490
|
- app/components/primer/alpha/underline_panels.html.erb
|
481
491
|
- app/components/primer/alpha/underline_panels.rb
|
492
|
+
- app/components/primer/alpha/x_banner.d.ts
|
493
|
+
- app/components/primer/alpha/x_banner.js
|
494
|
+
- app/components/primer/alpha/x_banner.ts
|
482
495
|
- app/components/primer/base_component.rb
|
483
496
|
- app/components/primer/beta/auto_complete.rb
|
484
497
|
- app/components/primer/beta/auto_complete/auto_complete.d.ts
|
@@ -490,20 +503,22 @@ files:
|
|
490
503
|
- app/components/primer/beta/avatar.rb
|
491
504
|
- app/components/primer/beta/avatar_stack.html.erb
|
492
505
|
- app/components/primer/beta/avatar_stack.rb
|
493
|
-
- app/components/primer/beta/banner.css
|
494
|
-
- app/components/primer/beta/banner.css.json
|
495
|
-
- app/components/primer/beta/banner.css.map
|
496
|
-
- app/components/primer/beta/banner.html.erb
|
497
|
-
- app/components/primer/beta/banner.pcss
|
498
|
-
- app/components/primer/beta/banner.rb
|
499
506
|
- app/components/primer/beta/base_button.rb
|
507
|
+
- app/components/primer/beta/blankslate.css
|
508
|
+
- app/components/primer/beta/blankslate.css.json
|
509
|
+
- app/components/primer/beta/blankslate.css.map
|
500
510
|
- app/components/primer/beta/blankslate.html.erb
|
511
|
+
- app/components/primer/beta/blankslate.pcss
|
501
512
|
- app/components/primer/beta/blankslate.rb
|
502
513
|
- app/components/primer/beta/border_box.html.erb
|
503
514
|
- app/components/primer/beta/border_box.rb
|
504
515
|
- app/components/primer/beta/border_box/header.html.erb
|
505
516
|
- app/components/primer/beta/border_box/header.rb
|
517
|
+
- app/components/primer/beta/breadcrumbs.css
|
518
|
+
- app/components/primer/beta/breadcrumbs.css.json
|
519
|
+
- app/components/primer/beta/breadcrumbs.css.map
|
506
520
|
- app/components/primer/beta/breadcrumbs.html.erb
|
521
|
+
- app/components/primer/beta/breadcrumbs.pcss
|
507
522
|
- app/components/primer/beta/breadcrumbs.rb
|
508
523
|
- app/components/primer/beta/button.css
|
509
524
|
- app/components/primer/beta/button.css.json
|
@@ -514,6 +529,10 @@ files:
|
|
514
529
|
- app/components/primer/beta/button_group.html.erb
|
515
530
|
- app/components/primer/beta/button_group.rb
|
516
531
|
- app/components/primer/beta/close_button.rb
|
532
|
+
- app/components/primer/beta/counter.css
|
533
|
+
- app/components/primer/beta/counter.css.json
|
534
|
+
- app/components/primer/beta/counter.css.map
|
535
|
+
- app/components/primer/beta/counter.pcss
|
517
536
|
- app/components/primer/beta/counter.rb
|
518
537
|
- app/components/primer/beta/details.html.erb
|
519
538
|
- app/components/primer/beta/details.rb
|
@@ -522,14 +541,25 @@ files:
|
|
522
541
|
- app/components/primer/beta/heading.rb
|
523
542
|
- app/components/primer/beta/icon_button.html.erb
|
524
543
|
- app/components/primer/beta/icon_button.rb
|
544
|
+
- app/components/primer/beta/label.css
|
545
|
+
- app/components/primer/beta/label.css.json
|
546
|
+
- app/components/primer/beta/label.css.map
|
547
|
+
- app/components/primer/beta/label.pcss
|
525
548
|
- app/components/primer/beta/label.rb
|
526
549
|
- app/components/primer/beta/link.rb
|
550
|
+
- app/components/primer/beta/progress_bar.css
|
551
|
+
- app/components/primer/beta/progress_bar.css.json
|
552
|
+
- app/components/primer/beta/progress_bar.css.map
|
553
|
+
- app/components/primer/beta/progress_bar.html.erb
|
554
|
+
- app/components/primer/beta/progress_bar.pcss
|
555
|
+
- app/components/primer/beta/progress_bar.rb
|
527
556
|
- app/components/primer/beta/text.rb
|
557
|
+
- app/components/primer/beta/truncate.css
|
558
|
+
- app/components/primer/beta/truncate.css.json
|
559
|
+
- app/components/primer/beta/truncate.css.map
|
528
560
|
- app/components/primer/beta/truncate.html.erb
|
561
|
+
- app/components/primer/beta/truncate.pcss
|
529
562
|
- app/components/primer/beta/truncate.rb
|
530
|
-
- app/components/primer/beta/x_banner.d.ts
|
531
|
-
- app/components/primer/beta/x_banner.js
|
532
|
-
- app/components/primer/beta/x_banner.ts
|
533
563
|
- app/components/primer/blankslate_component.html.erb
|
534
564
|
- app/components/primer/blankslate_component.rb
|
535
565
|
- app/components/primer/box.rb
|
@@ -584,12 +614,19 @@ files:
|
|
584
614
|
- app/components/primer/primer.js
|
585
615
|
- app/components/primer/primer.pcss
|
586
616
|
- app/components/primer/primer.ts
|
587
|
-
- app/components/primer/progress_bar_component.html.erb
|
588
617
|
- app/components/primer/progress_bar_component.rb
|
589
618
|
- app/components/primer/spinner_component.html.erb
|
590
619
|
- app/components/primer/spinner_component.rb
|
620
|
+
- app/components/primer/state_component.css
|
621
|
+
- app/components/primer/state_component.css.json
|
622
|
+
- app/components/primer/state_component.css.map
|
623
|
+
- app/components/primer/state_component.pcss
|
591
624
|
- app/components/primer/state_component.rb
|
625
|
+
- app/components/primer/subhead_component.css
|
626
|
+
- app/components/primer/subhead_component.css.json
|
627
|
+
- app/components/primer/subhead_component.css.map
|
592
628
|
- app/components/primer/subhead_component.html.erb
|
629
|
+
- app/components/primer/subhead_component.pcss
|
593
630
|
- app/components/primer/subhead_component.rb
|
594
631
|
- app/components/primer/tab_container_component.d.ts
|
595
632
|
- app/components/primer/tab_container_component.js
|
@@ -602,6 +639,10 @@ files:
|
|
602
639
|
- app/components/primer/timeline_item_component.html.erb
|
603
640
|
- app/components/primer/timeline_item_component.rb
|
604
641
|
- app/components/primer/tooltip.rb
|
642
|
+
- app/components/primer/truncate.css
|
643
|
+
- app/components/primer/truncate.css.json
|
644
|
+
- app/components/primer/truncate.css.map
|
645
|
+
- app/components/primer/truncate.pcss
|
605
646
|
- app/components/primer/truncate.rb
|
606
647
|
- app/forms/after_content_form.rb
|
607
648
|
- app/forms/after_content_form/after_content.html.erb
|
@@ -777,6 +818,9 @@ files:
|
|
777
818
|
- previews/primer/alpha/action_list_preview.rb
|
778
819
|
- previews/primer/alpha/action_list_preview/heading.html.erb
|
779
820
|
- previews/primer/alpha/auto_complete_preview.rb
|
821
|
+
- previews/primer/alpha/banner_preview.rb
|
822
|
+
- previews/primer/alpha/banner_preview/with_action_button.html.erb
|
823
|
+
- previews/primer/alpha/banner_preview/with_action_content.html.erb
|
780
824
|
- previews/primer/alpha/button_marketing_preview.rb
|
781
825
|
- previews/primer/alpha/dialog_preview.rb
|
782
826
|
- previews/primer/alpha/dialog_preview/custom_header.html.erb
|
@@ -807,9 +851,6 @@ files:
|
|
807
851
|
- previews/primer/beta/auto_complete_preview/with_submit_button.html.erb
|
808
852
|
- previews/primer/beta/avatar_preview.rb
|
809
853
|
- previews/primer/beta/avatar_stack_preview.rb
|
810
|
-
- previews/primer/beta/banner_preview.rb
|
811
|
-
- previews/primer/beta/banner_preview/with_action_button.html.erb
|
812
|
-
- previews/primer/beta/banner_preview/with_action_content.html.erb
|
813
854
|
- previews/primer/beta/base_button_preview.rb
|
814
855
|
- previews/primer/beta/blankslate_preview.rb
|
815
856
|
- previews/primer/beta/border_box_preview.rb
|
@@ -830,6 +871,7 @@ files:
|
|
830
871
|
- previews/primer/beta/icon_button_preview.rb
|
831
872
|
- previews/primer/beta/label_preview.rb
|
832
873
|
- previews/primer/beta/link_preview.rb
|
874
|
+
- previews/primer/beta/progress_bar_preview.rb
|
833
875
|
- previews/primer/beta/text_preview.rb
|
834
876
|
- previews/primer/beta/truncate_preview.rb
|
835
877
|
- previews/primer/clipboard_copy_preview.rb
|
@@ -862,7 +904,6 @@ files:
|
|
862
904
|
- previews/primer/menu_component_preview/playground.html.erb
|
863
905
|
- previews/primer/octicon_component_preview.rb
|
864
906
|
- previews/primer/popover_component_preview.rb
|
865
|
-
- previews/primer/progress_bar_component_preview.rb
|
866
907
|
- previews/primer/spinner_component_preview.rb
|
867
908
|
- previews/primer/state_component_preview.rb
|
868
909
|
- previews/primer/subhead_component_preview.rb
|
@@ -1 +0,0 @@
|
|
1
|
-
{"name":"beta/banner","selectors":[".Banner",".Banner .Banner-actions",".Banner .Banner-visual",".Banner .Banner-visual>.octicon",".Banner .Banner-visual>*",".Banner .Banner-message",".Banner .Banner-message p:last-child",".Banner .Banner-message .Banner-title:not(:only-child)",".Banner .Banner-actions:last-child",".Banner .Banner-close",".Banner .Banner-visual .octicon",".Banner.Banner--warning",".Banner.Banner--warning .Banner-visual .octicon",".Banner.Banner--error",".Banner.Banner--error .Banner-visual .octicon",".Banner.Banner--success",".Banner.Banner--success .Banner-visual .octicon",".Banner.Banner--full",".Banner.Banner--full-whenNarrow"]}
|
@@ -1,54 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Primer
|
4
|
-
module Beta
|
5
|
-
# @label Banner
|
6
|
-
class BannerPreview < ViewComponent::Preview
|
7
|
-
# @label Playground
|
8
|
-
#
|
9
|
-
# @param full toggle
|
10
|
-
# @param full_when_narrow toggle
|
11
|
-
# @param dismissible toggle
|
12
|
-
# @param icon [Symbol] octicon
|
13
|
-
# @param scheme [Symbol] select [default, warning, danger, success]
|
14
|
-
# @param content text
|
15
|
-
# @param description text
|
16
|
-
# @param reappear [Boolean]
|
17
|
-
def playground(full: false, full_when_narrow: false, dismissible: false, icon: :people, scheme: Primer::Beta::Banner::DEFAULT_SCHEME, reappear: true, content: "This is a banner!", description: nil)
|
18
|
-
icon = nil if icon == :none
|
19
|
-
render(Primer::Beta::Banner.new(full: full, full_when_narrow: full_when_narrow, dismissible: dismissible, icon: icon == :none ? nil : icon, scheme: scheme, description: description, reappear: reappear)) { content }
|
20
|
-
end
|
21
|
-
|
22
|
-
# @label Default
|
23
|
-
def default
|
24
|
-
render(Primer::Beta::Banner.new) { "This is a banner!" }
|
25
|
-
end
|
26
|
-
|
27
|
-
# @label With action button
|
28
|
-
#
|
29
|
-
# @param full toggle
|
30
|
-
# @param dismissible toggle
|
31
|
-
# @param icon [Symbol] octicon
|
32
|
-
# @param scheme [Symbol] select [default, warning, danger, success]
|
33
|
-
# @param content text
|
34
|
-
# @param reappear [Boolean]
|
35
|
-
def with_action_button(full: false, dismissible: false, icon: :people, scheme: Primer::Beta::Banner::DEFAULT_SCHEME, reappear: true, content: "This is a banner with an action!")
|
36
|
-
icon = nil if icon == :none
|
37
|
-
render_with_template(locals: { full: full, dismissible: dismissible, icon: icon == :none ? nil : icon, scheme: scheme, content: content, reappear: reappear })
|
38
|
-
end
|
39
|
-
|
40
|
-
# @label With action content
|
41
|
-
#
|
42
|
-
# @param full toggle
|
43
|
-
# @param dismissible toggle
|
44
|
-
# @param icon [Symbol] octicon
|
45
|
-
# @param scheme [Symbol] select [default, warning, danger, success]
|
46
|
-
# @param content text
|
47
|
-
# @param reappear [Boolean]
|
48
|
-
def with_action_content(full: false, dismissible: false, icon: :people, scheme: Primer::Beta::Banner::DEFAULT_SCHEME, reappear: true, content: "Did you know? Comments can be edited.")
|
49
|
-
icon = nil if icon == :none
|
50
|
-
render_with_template(locals: { full: full, dismissible: dismissible, icon: icon == :none ? nil : icon, scheme: scheme, content: content, reappear: reappear })
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
@@ -1,28 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Primer
|
4
|
-
# @label ProgressBarComponent
|
5
|
-
class ProgressBarComponentPreview < ViewComponent::Preview
|
6
|
-
# @label Playground
|
7
|
-
#
|
8
|
-
# @param size [Symbol] select [default, small, large]
|
9
|
-
def playground(size: :default)
|
10
|
-
render(Primer::ProgressBarComponent.new(size: size)) do |component|
|
11
|
-
component.with_item(percentage: 10)
|
12
|
-
component.with_item(bg: :accent_emphasis, percentage: 20)
|
13
|
-
component.with_item(bg: :danger_emphasis, percentage: 30)
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
# @label Default
|
18
|
-
#
|
19
|
-
# @param size [Symbol] select [default, small, large]
|
20
|
-
def default(size: :default)
|
21
|
-
render(Primer::ProgressBarComponent.new(size: size)) do |component|
|
22
|
-
component.with_item(percentage: 10)
|
23
|
-
component.with_item(bg: :accent_emphasis, percentage: 20)
|
24
|
-
component.with_item(bg: :danger_emphasis, percentage: 30)
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|