primer_view_components 0.0.104 → 0.0.105
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +20 -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/item.rb +2 -2
- data/app/components/primer/alpha/action_list.rb +2 -0
- data/app/components/primer/alpha/image.rb +50 -0
- data/app/components/primer/{image_crop.d.ts → alpha/image_crop.d.ts} +0 -0
- data/app/components/primer/{image_crop.html.erb → alpha/image_crop.html.erb} +0 -0
- data/app/components/primer/{image_crop.js → alpha/image_crop.js} +0 -0
- data/app/components/primer/alpha/image_crop.rb +39 -0
- data/app/components/primer/{image_crop.ts → alpha/image_crop.ts} +0 -0
- data/app/components/primer/alpha/nav_list/item.rb +2 -0
- data/app/components/primer/alpha/nav_list/section.rb +2 -0
- data/app/components/primer/alpha/segmented_control/item.html.erb +13 -0
- data/app/components/primer/alpha/segmented_control/item.rb +29 -0
- data/app/components/primer/alpha/segmented_control.css +1 -0
- data/app/components/primer/alpha/segmented_control.css.map +1 -0
- data/app/components/primer/alpha/segmented_control.d.ts +11 -0
- data/app/components/primer/alpha/segmented_control.html.erb +7 -0
- data/app/components/primer/alpha/segmented_control.js +48 -0
- data/app/components/primer/alpha/segmented_control.pcss +121 -0
- data/app/components/primer/alpha/segmented_control.rb +92 -0
- data/app/components/primer/alpha/segmented_control.ts +41 -0
- data/app/components/primer/alpha/tooltip.rb +2 -2
- data/app/components/primer/beta/auto_complete/item.rb +2 -2
- data/app/components/primer/beta/avatar.rb +1 -1
- data/app/components/primer/beta/blankslate.rb +4 -4
- data/app/components/primer/beta/breadcrumbs.rb +1 -1
- data/app/components/primer/beta/button.rb +1 -1
- data/app/components/primer/beta/label.rb +100 -0
- data/app/components/primer/beta/link.rb +99 -0
- data/app/components/primer/component.rb +1 -0
- data/app/components/primer/image.rb +2 -41
- data/app/components/primer/image_crop.rb +2 -32
- data/app/components/primer/label_component.rb +2 -93
- data/app/components/primer/link_component.rb +2 -92
- data/app/components/primer/primer.d.ts +2 -1
- data/app/components/primer/primer.js +2 -1
- data/app/components/primer/primer.pcss +1 -0
- data/app/components/primer/primer.ts +2 -1
- data/app/components/primer/subhead_component.rb +1 -1
- data/app/components/primer/time_ago_component.rb +2 -0
- data/app/helpers/primer/form_helper.rb +1 -0
- data/app/lib/primer/view_helper.rb +1 -1
- data/lib/primer/deprecations.rb +4 -0
- data/lib/primer/form_components.rb +1 -0
- data/lib/primer/view_components/linters/argument_mappers/label.rb +4 -4
- data/lib/primer/view_components/linters/label_component_migration_counter.rb +3 -3
- data/lib/primer/view_components/version.rb +1 -1
- data/lib/rubocop/config/default.yml +0 -3
- data/lib/rubocop/cop/primer/deprecated_label_schemes.rb +3 -3
- data/lib/rubocop/cop/primer/deprecated_label_variants.rb +5 -5
- data/lib/tasks/docs.rake +12 -7
- data/lib/tasks/test.rake +23 -26
- data/previews/primer/alpha/action_list_preview.rb +29 -0
- data/previews/primer/alpha/auto_complete_preview.rb +10 -0
- data/previews/primer/alpha/button_marketing_preview.rb +9 -0
- data/previews/primer/alpha/dialog_preview.rb +18 -1
- data/previews/primer/alpha/hidden_text_expander_preview.rb +7 -0
- data/previews/primer/alpha/image_crop_preview.rb +31 -0
- data/previews/primer/alpha/layout_preview.rb +15 -0
- data/previews/primer/alpha/nav_list_preview.rb +29 -0
- data/previews/primer/alpha/segmented_control_preview.rb +75 -0
- data/previews/primer/alpha/tab_panels_preview.rb +15 -0
- data/previews/primer/alpha/text_field_preview.rb +58 -0
- data/previews/primer/alpha/toggle_switch_preview.rb +4 -0
- data/previews/primer/alpha/tooltip_preview.rb +13 -3
- data/previews/primer/alpha/underline_nav_preview/playground.html.erb +8 -0
- data/previews/primer/alpha/underline_nav_preview.rb +15 -0
- data/previews/primer/alpha/underline_panels_preview.rb +15 -0
- data/previews/primer/beta/auto_complete_item_preview/playground.html.erb +9 -0
- data/previews/primer/beta/auto_complete_item_preview.rb +14 -0
- data/previews/primer/beta/auto_complete_preview.rb +20 -0
- data/previews/primer/beta/avatar_preview.rb +9 -0
- data/previews/primer/beta/avatar_stack_preview.rb +15 -0
- data/previews/primer/beta/base_button_preview.rb +9 -0
- data/previews/primer/beta/blankslate_preview.rb +12 -0
- data/previews/primer/beta/border_box_preview.rb +14 -0
- data/previews/primer/beta/breadcrumbs_preview.rb +11 -0
- data/previews/primer/beta/button_group_preview.rb +12 -0
- data/previews/primer/beta/close_button_preview.rb +7 -0
- data/previews/primer/beta/counter_preview.rb +11 -0
- data/previews/primer/beta/details_preview.rb +15 -0
- data/previews/primer/beta/flash_preview.rb +12 -0
- data/previews/primer/beta/heading_preview.rb +8 -0
- data/previews/primer/beta/label_preview.rb +26 -0
- data/previews/primer/beta/link_preview.rb +41 -0
- data/previews/primer/beta/text_preview.rb +8 -0
- data/previews/primer/beta/truncate_preview.rb +7 -0
- data/previews/primer/clipboard_copy_preview.rb +8 -0
- data/previews/primer/dropdown_preview.rb +18 -0
- data/previews/primer/hellip_button_preview.rb +8 -0
- data/previews/primer/layout_component_preview.rb +13 -1
- data/previews/primer/local_time_component_preview.rb +13 -0
- data/previews/primer/markdown_preview.rb +277 -266
- data/previews/primer/menu_component_preview/playground.html.erb +17 -0
- data/previews/primer/menu_component_preview.rb +4 -1
- data/previews/primer/octicon_component_preview.rb +8 -0
- data/previews/primer/popover_component_preview.rb +15 -1
- data/previews/primer/progress_bar_component_preview.rb +12 -1
- data/previews/primer/spinner_component_preview.rb +7 -0
- data/previews/primer/state_component_preview.rb +11 -1
- data/previews/primer/subhead_component_preview.rb +17 -0
- data/previews/primer/time_ago_component_preview.rb +8 -0
- data/previews/primer/timeline_item_component_preview.rb +12 -1
- data/static/arguments.json +300 -138
- data/static/audited_at.json +6 -0
- data/static/constants.json +86 -71
- data/static/statuses.json +10 -4
- metadata +27 -9
- data/previews/primer/image_crop_preview.rb +0 -22
- data/previews/primer/label_component_preview.rb +0 -15
- data/previews/primer/link_component_preview.rb +0 -29
data/static/audited_at.json
CHANGED
@@ -11,12 +11,16 @@
|
|
11
11
|
"Primer::Alpha::Dialog::Footer": "",
|
12
12
|
"Primer::Alpha::Dialog::Header": "",
|
13
13
|
"Primer::Alpha::HiddenTextExpander": "",
|
14
|
+
"Primer::Alpha::Image": "",
|
15
|
+
"Primer::Alpha::ImageCrop": "",
|
14
16
|
"Primer::Alpha::Layout": "",
|
15
17
|
"Primer::Alpha::Layout::Main": "",
|
16
18
|
"Primer::Alpha::Layout::Sidebar": "",
|
17
19
|
"Primer::Alpha::NavList": "",
|
18
20
|
"Primer::Alpha::NavList::Item": "",
|
19
21
|
"Primer::Alpha::NavList::Section": "",
|
22
|
+
"Primer::Alpha::SegmentedControl": "",
|
23
|
+
"Primer::Alpha::SegmentedControl::Item": "",
|
20
24
|
"Primer::Alpha::TabNav": "",
|
21
25
|
"Primer::Alpha::TabPanels": "",
|
22
26
|
"Primer::Alpha::TextField": "",
|
@@ -43,6 +47,8 @@
|
|
43
47
|
"Primer::Beta::Flash": "",
|
44
48
|
"Primer::Beta::Heading": "",
|
45
49
|
"Primer::Beta::IconButton": "",
|
50
|
+
"Primer::Beta::Label": "",
|
51
|
+
"Primer::Beta::Link": "",
|
46
52
|
"Primer::Beta::Text": "",
|
47
53
|
"Primer::Beta::Truncate": "",
|
48
54
|
"Primer::Beta::Truncate::TruncateText": "",
|
data/static/constants.json
CHANGED
@@ -160,6 +160,10 @@
|
|
160
160
|
},
|
161
161
|
"Primer::Alpha::HiddenTextExpander": {
|
162
162
|
},
|
163
|
+
"Primer::Alpha::Image": {
|
164
|
+
},
|
165
|
+
"Primer::Alpha::ImageCrop": {
|
166
|
+
},
|
163
167
|
"Primer::Alpha::Layout": {
|
164
168
|
"FIRST_IN_SOURCE_DEFAULT": "sidebar",
|
165
169
|
"FIRST_IN_SOURCE_OPTIONS": [
|
@@ -246,6 +250,13 @@
|
|
246
250
|
},
|
247
251
|
"Primer::Alpha::NavList::Section": {
|
248
252
|
},
|
253
|
+
"Primer::Alpha::SegmentedControl": {
|
254
|
+
"FULL_WIDTH_DEFAULT": false,
|
255
|
+
"HIDE_LABELS_DEFAULT": false,
|
256
|
+
"Item": "Primer::Alpha::SegmentedControl::Item"
|
257
|
+
},
|
258
|
+
"Primer::Alpha::SegmentedControl::Item": {
|
259
|
+
},
|
249
260
|
"Primer::Alpha::TabNav": {
|
250
261
|
"BODY_TAG_DEFAULT": "ul",
|
251
262
|
"TAG_DEFAULT": "nav",
|
@@ -563,6 +574,81 @@
|
|
563
574
|
"invisible"
|
564
575
|
]
|
565
576
|
},
|
577
|
+
"Primer::Beta::Label": {
|
578
|
+
"DEFAULT_SCHEME": "default",
|
579
|
+
"DEFAULT_SIZE": "medium",
|
580
|
+
"DEFAULT_TAG": "span",
|
581
|
+
"DEFAULT_VARIANT": "none",
|
582
|
+
"DEPRECATED_SCHEME_OPTIONS": [
|
583
|
+
"info",
|
584
|
+
"warning",
|
585
|
+
"orange",
|
586
|
+
"purple"
|
587
|
+
],
|
588
|
+
"DEPRECATED_VARIANT_OPTIONS": [
|
589
|
+
"large",
|
590
|
+
"inline"
|
591
|
+
],
|
592
|
+
"INLINE_CLASS": "Label--inline",
|
593
|
+
"SCHEME_MAPPINGS": {
|
594
|
+
"default": "",
|
595
|
+
"primary": "Label--primary",
|
596
|
+
"secondary": "Label--secondary",
|
597
|
+
"accent": "Label--accent",
|
598
|
+
"success": "Label--success",
|
599
|
+
"attention": "Label--attention",
|
600
|
+
"danger": "Label--danger",
|
601
|
+
"severe": "Label--severe",
|
602
|
+
"done": "Label--done",
|
603
|
+
"sponsors": "Label--sponsors",
|
604
|
+
"info": "Label--info",
|
605
|
+
"warning": "Label--warning",
|
606
|
+
"orange": "Label--orange",
|
607
|
+
"purple": "Label--purple"
|
608
|
+
},
|
609
|
+
"SCHEME_OPTIONS": [
|
610
|
+
"default",
|
611
|
+
"primary",
|
612
|
+
"secondary",
|
613
|
+
"accent",
|
614
|
+
"success",
|
615
|
+
"attention",
|
616
|
+
"danger",
|
617
|
+
"severe",
|
618
|
+
"done",
|
619
|
+
"sponsors"
|
620
|
+
],
|
621
|
+
"SIZE_MAPPINGS": {
|
622
|
+
"medium": null,
|
623
|
+
"large": "Label--large"
|
624
|
+
},
|
625
|
+
"SIZE_OPTIONS": [
|
626
|
+
"medium",
|
627
|
+
"large"
|
628
|
+
],
|
629
|
+
"TAG_OPTIONS": [
|
630
|
+
"span",
|
631
|
+
"summary",
|
632
|
+
"a",
|
633
|
+
"div"
|
634
|
+
],
|
635
|
+
"VARIANT_OPTIONS": [
|
636
|
+
"none"
|
637
|
+
]
|
638
|
+
},
|
639
|
+
"Primer::Beta::Link": {
|
640
|
+
"DEFAULT_SCHEME": "default",
|
641
|
+
"DEFAULT_TAG": "a",
|
642
|
+
"SCHEME_MAPPINGS": {
|
643
|
+
"default": "",
|
644
|
+
"primary": "Link--primary",
|
645
|
+
"secondary": "Link--secondary"
|
646
|
+
},
|
647
|
+
"TAG_OPTIONS": [
|
648
|
+
"a",
|
649
|
+
"span"
|
650
|
+
]
|
651
|
+
},
|
566
652
|
"Primer::Beta::Text": {
|
567
653
|
"DEFAULT_TAG": "span"
|
568
654
|
},
|
@@ -685,66 +771,6 @@
|
|
685
771
|
"Primer::ImageCrop": {
|
686
772
|
},
|
687
773
|
"Primer::LabelComponent": {
|
688
|
-
"DEFAULT_SCHEME": "default",
|
689
|
-
"DEFAULT_SIZE": "medium",
|
690
|
-
"DEFAULT_TAG": "span",
|
691
|
-
"DEFAULT_VARIANT": "none",
|
692
|
-
"DEPRECATED_SCHEME_OPTIONS": [
|
693
|
-
"info",
|
694
|
-
"warning",
|
695
|
-
"orange",
|
696
|
-
"purple"
|
697
|
-
],
|
698
|
-
"DEPRECATED_VARIANT_OPTIONS": [
|
699
|
-
"large",
|
700
|
-
"inline"
|
701
|
-
],
|
702
|
-
"INLINE_CLASS": "Label--inline",
|
703
|
-
"SCHEME_MAPPINGS": {
|
704
|
-
"default": "",
|
705
|
-
"primary": "Label--primary",
|
706
|
-
"secondary": "Label--secondary",
|
707
|
-
"accent": "Label--accent",
|
708
|
-
"success": "Label--success",
|
709
|
-
"attention": "Label--attention",
|
710
|
-
"danger": "Label--danger",
|
711
|
-
"severe": "Label--severe",
|
712
|
-
"done": "Label--done",
|
713
|
-
"sponsors": "Label--sponsors",
|
714
|
-
"info": "Label--info",
|
715
|
-
"warning": "Label--warning",
|
716
|
-
"orange": "Label--orange",
|
717
|
-
"purple": "Label--purple"
|
718
|
-
},
|
719
|
-
"SCHEME_OPTIONS": [
|
720
|
-
"default",
|
721
|
-
"primary",
|
722
|
-
"secondary",
|
723
|
-
"accent",
|
724
|
-
"success",
|
725
|
-
"attention",
|
726
|
-
"danger",
|
727
|
-
"severe",
|
728
|
-
"done",
|
729
|
-
"sponsors"
|
730
|
-
],
|
731
|
-
"SIZE_MAPPINGS": {
|
732
|
-
"medium": null,
|
733
|
-
"large": "Label--large"
|
734
|
-
},
|
735
|
-
"SIZE_OPTIONS": [
|
736
|
-
"medium",
|
737
|
-
"large"
|
738
|
-
],
|
739
|
-
"TAG_OPTIONS": [
|
740
|
-
"span",
|
741
|
-
"summary",
|
742
|
-
"a",
|
743
|
-
"div"
|
744
|
-
],
|
745
|
-
"VARIANT_OPTIONS": [
|
746
|
-
"none"
|
747
|
-
]
|
748
774
|
},
|
749
775
|
"Primer::LayoutComponent": {
|
750
776
|
"ALLOWED_SIDEBAR_COLS": [
|
@@ -769,17 +795,6 @@
|
|
769
795
|
"MAX_COL": 12
|
770
796
|
},
|
771
797
|
"Primer::LinkComponent": {
|
772
|
-
"DEFAULT_SCHEME": "default",
|
773
|
-
"DEFAULT_TAG": "a",
|
774
|
-
"SCHEME_MAPPINGS": {
|
775
|
-
"default": "",
|
776
|
-
"primary": "Link--primary",
|
777
|
-
"secondary": "Link--secondary"
|
778
|
-
},
|
779
|
-
"TAG_OPTIONS": [
|
780
|
-
"a",
|
781
|
-
"span"
|
782
|
-
]
|
783
798
|
},
|
784
799
|
"Primer::LocalTime": {
|
785
800
|
"DEFAULT_DIGIT_TYPE": "numeric",
|
data/static/statuses.json
CHANGED
@@ -11,12 +11,16 @@
|
|
11
11
|
"Primer::Alpha::Dialog::Footer": "alpha",
|
12
12
|
"Primer::Alpha::Dialog::Header": "alpha",
|
13
13
|
"Primer::Alpha::HiddenTextExpander": "alpha",
|
14
|
+
"Primer::Alpha::Image": "alpha",
|
15
|
+
"Primer::Alpha::ImageCrop": "alpha",
|
14
16
|
"Primer::Alpha::Layout": "alpha",
|
15
17
|
"Primer::Alpha::Layout::Main": "alpha",
|
16
18
|
"Primer::Alpha::Layout::Sidebar": "alpha",
|
17
19
|
"Primer::Alpha::NavList": "alpha",
|
18
20
|
"Primer::Alpha::NavList::Item": "alpha",
|
19
21
|
"Primer::Alpha::NavList::Section": "alpha",
|
22
|
+
"Primer::Alpha::SegmentedControl": "alpha",
|
23
|
+
"Primer::Alpha::SegmentedControl::Item": "alpha",
|
20
24
|
"Primer::Alpha::TabNav": "alpha",
|
21
25
|
"Primer::Alpha::TabPanels": "alpha",
|
22
26
|
"Primer::Alpha::TextField": "alpha",
|
@@ -43,6 +47,8 @@
|
|
43
47
|
"Primer::Beta::Flash": "beta",
|
44
48
|
"Primer::Beta::Heading": "beta",
|
45
49
|
"Primer::Beta::IconButton": "beta",
|
50
|
+
"Primer::Beta::Label": "beta",
|
51
|
+
"Primer::Beta::Link": "beta",
|
46
52
|
"Primer::Beta::Text": "beta",
|
47
53
|
"Primer::Beta::Truncate": "beta",
|
48
54
|
"Primer::Beta::Truncate::TruncateText": "alpha",
|
@@ -60,11 +66,11 @@
|
|
60
66
|
"Primer::DropdownMenuComponent": "deprecated",
|
61
67
|
"Primer::HellipButton": "alpha",
|
62
68
|
"Primer::IconButton": "deprecated",
|
63
|
-
"Primer::Image": "
|
64
|
-
"Primer::ImageCrop": "
|
65
|
-
"Primer::LabelComponent": "
|
69
|
+
"Primer::Image": "deprecated",
|
70
|
+
"Primer::ImageCrop": "deprecated",
|
71
|
+
"Primer::LabelComponent": "deprecated",
|
66
72
|
"Primer::LayoutComponent": "alpha",
|
67
|
-
"Primer::LinkComponent": "
|
73
|
+
"Primer::LinkComponent": "deprecated",
|
68
74
|
"Primer::LocalTime": "alpha",
|
69
75
|
"Primer::Markdown": "beta",
|
70
76
|
"Primer::MenuComponent": "alpha",
|
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.105
|
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-10-
|
11
|
+
date: 2022-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionview
|
@@ -432,6 +432,12 @@ files:
|
|
432
432
|
- app/components/primer/alpha/dialog/header.html.erb
|
433
433
|
- app/components/primer/alpha/dialog/header.rb
|
434
434
|
- app/components/primer/alpha/hidden_text_expander.rb
|
435
|
+
- app/components/primer/alpha/image.rb
|
436
|
+
- app/components/primer/alpha/image_crop.d.ts
|
437
|
+
- app/components/primer/alpha/image_crop.html.erb
|
438
|
+
- app/components/primer/alpha/image_crop.js
|
439
|
+
- app/components/primer/alpha/image_crop.rb
|
440
|
+
- app/components/primer/alpha/image_crop.ts
|
435
441
|
- app/components/primer/alpha/layout.html.erb
|
436
442
|
- app/components/primer/alpha/layout.rb
|
437
443
|
- app/components/primer/alpha/modal_dialog.d.ts
|
@@ -446,6 +452,16 @@ files:
|
|
446
452
|
- app/components/primer/alpha/nav_list/item.rb
|
447
453
|
- app/components/primer/alpha/nav_list/section.html.erb
|
448
454
|
- app/components/primer/alpha/nav_list/section.rb
|
455
|
+
- app/components/primer/alpha/segmented_control.css
|
456
|
+
- app/components/primer/alpha/segmented_control.css.map
|
457
|
+
- app/components/primer/alpha/segmented_control.d.ts
|
458
|
+
- app/components/primer/alpha/segmented_control.html.erb
|
459
|
+
- app/components/primer/alpha/segmented_control.js
|
460
|
+
- app/components/primer/alpha/segmented_control.pcss
|
461
|
+
- app/components/primer/alpha/segmented_control.rb
|
462
|
+
- app/components/primer/alpha/segmented_control.ts
|
463
|
+
- app/components/primer/alpha/segmented_control/item.html.erb
|
464
|
+
- app/components/primer/alpha/segmented_control/item.rb
|
449
465
|
- app/components/primer/alpha/tab_nav.html.erb
|
450
466
|
- app/components/primer/alpha/tab_nav.rb
|
451
467
|
- app/components/primer/alpha/tab_panels.html.erb
|
@@ -500,6 +516,8 @@ files:
|
|
500
516
|
- app/components/primer/beta/heading.rb
|
501
517
|
- app/components/primer/beta/icon_button.html.erb
|
502
518
|
- app/components/primer/beta/icon_button.rb
|
519
|
+
- app/components/primer/beta/label.rb
|
520
|
+
- app/components/primer/beta/link.rb
|
503
521
|
- app/components/primer/beta/text.rb
|
504
522
|
- app/components/primer/beta/truncate.html.erb
|
505
523
|
- app/components/primer/beta/truncate.rb
|
@@ -534,11 +552,7 @@ files:
|
|
534
552
|
- app/components/primer/icon_button.html.erb
|
535
553
|
- app/components/primer/icon_button.rb
|
536
554
|
- app/components/primer/image.rb
|
537
|
-
- app/components/primer/image_crop.d.ts
|
538
|
-
- app/components/primer/image_crop.html.erb
|
539
|
-
- app/components/primer/image_crop.js
|
540
555
|
- app/components/primer/image_crop.rb
|
541
|
-
- app/components/primer/image_crop.ts
|
542
556
|
- app/components/primer/label_component.rb
|
543
557
|
- app/components/primer/layout_component.html.erb
|
544
558
|
- app/components/primer/layout_component.rb
|
@@ -756,8 +770,10 @@ files:
|
|
756
770
|
- previews/primer/alpha/dialog_preview/with_footer.html.erb
|
757
771
|
- previews/primer/alpha/dialog_preview/with_form.html.erb
|
758
772
|
- previews/primer/alpha/hidden_text_expander_preview.rb
|
773
|
+
- previews/primer/alpha/image_crop_preview.rb
|
759
774
|
- previews/primer/alpha/layout_preview.rb
|
760
775
|
- previews/primer/alpha/nav_list_preview.rb
|
776
|
+
- previews/primer/alpha/segmented_control_preview.rb
|
761
777
|
- previews/primer/alpha/tab_panels_preview.rb
|
762
778
|
- previews/primer/alpha/text_field_preview.rb
|
763
779
|
- previews/primer/alpha/toggle_switch_preview.rb
|
@@ -766,9 +782,11 @@ files:
|
|
766
782
|
- previews/primer/alpha/tooltip_preview/with_right_most_position.html.erb
|
767
783
|
- previews/primer/alpha/underline_nav_preview.rb
|
768
784
|
- previews/primer/alpha/underline_nav_preview/default.html.erb
|
785
|
+
- previews/primer/alpha/underline_nav_preview/playground.html.erb
|
769
786
|
- previews/primer/alpha/underline_panels_preview.rb
|
770
787
|
- previews/primer/beta/auto_complete_item_preview.rb
|
771
788
|
- previews/primer/beta/auto_complete_item_preview/default.html.erb
|
789
|
+
- previews/primer/beta/auto_complete_item_preview/playground.html.erb
|
772
790
|
- previews/primer/beta/auto_complete_item_preview/with_description.html.erb
|
773
791
|
- previews/primer/beta/auto_complete_preview.rb
|
774
792
|
- previews/primer/beta/auto_complete_preview/with_submit_button.html.erb
|
@@ -792,6 +810,8 @@ files:
|
|
792
810
|
- previews/primer/beta/flash_preview.rb
|
793
811
|
- previews/primer/beta/heading_preview.rb
|
794
812
|
- previews/primer/beta/icon_button_preview.rb
|
813
|
+
- previews/primer/beta/label_preview.rb
|
814
|
+
- previews/primer/beta/link_preview.rb
|
795
815
|
- previews/primer/beta/text_preview.rb
|
796
816
|
- previews/primer/beta/truncate_preview.rb
|
797
817
|
- previews/primer/clipboard_copy_preview.rb
|
@@ -815,14 +835,12 @@ files:
|
|
815
835
|
- previews/primer/forms/forms_preview/submit_button_form.html.erb
|
816
836
|
- previews/primer/forms/forms_preview/text_field_and_checkbox_form.html.erb
|
817
837
|
- previews/primer/hellip_button_preview.rb
|
818
|
-
- previews/primer/image_crop_preview.rb
|
819
|
-
- previews/primer/label_component_preview.rb
|
820
838
|
- previews/primer/layout_component_preview.rb
|
821
|
-
- previews/primer/link_component_preview.rb
|
822
839
|
- previews/primer/local_time_component_preview.rb
|
823
840
|
- previews/primer/markdown_preview.rb
|
824
841
|
- previews/primer/menu_component_preview.rb
|
825
842
|
- previews/primer/menu_component_preview/default.html.erb
|
843
|
+
- previews/primer/menu_component_preview/playground.html.erb
|
826
844
|
- previews/primer/octicon_component_preview.rb
|
827
845
|
- previews/primer/popover_component_preview.rb
|
828
846
|
- previews/primer/progress_bar_component_preview.rb
|
@@ -1,22 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Primer
|
4
|
-
# @label ImageCrop
|
5
|
-
class ImageCropPreview < ViewComponent::Preview
|
6
|
-
# @label Default Options
|
7
|
-
#
|
8
|
-
# @param rounded [Boolean]
|
9
|
-
def default(rounded: false)
|
10
|
-
render(Primer::ImageCrop.new(src: Primer::ExampleImage::BASE64_SRC, rounded: rounded))
|
11
|
-
end
|
12
|
-
|
13
|
-
# @label Custom loading slot
|
14
|
-
#
|
15
|
-
# @param rounded [Boolean]
|
16
|
-
def loading(rounded: false)
|
17
|
-
render(Primer::ImageCrop.new(src: Primer::ExampleImage::BASE64_SRC, rounded: rounded)) do |c|
|
18
|
-
c.with_loading { "Loading..." }
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Primer
|
4
|
-
# @label LabelComponent
|
5
|
-
class LabelComponentPreview < ViewComponent::Preview
|
6
|
-
# @label Default Options
|
7
|
-
#
|
8
|
-
# @param size [Symbol] select [medium, large]
|
9
|
-
# @param tag [Symbol] select [span, summary, a, div]
|
10
|
-
# @param inline [Boolean] toggle
|
11
|
-
def default(size: :medium, tag: :span, inline: false)
|
12
|
-
render(Primer::LabelComponent.new(tag: tag, size: size, inline: inline)) { "Label" }
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
@@ -1,29 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Primer
|
4
|
-
# @label LinkComponent
|
5
|
-
class LinkComponentPreview < ViewComponent::Preview
|
6
|
-
# @label Default Options
|
7
|
-
#
|
8
|
-
# @param underline [Boolean]
|
9
|
-
# @param muted [Boolean]
|
10
|
-
# @param tag [Symbol] select [a, span]
|
11
|
-
# @param scheme [Symbol] select [default, primary, secondary]
|
12
|
-
def default(tag: :a, scheme: :default, muted: false, underline: true)
|
13
|
-
render(Primer::LinkComponent.new(href: "#", tag: tag, scheme: scheme, muted: muted, underline: underline)) { "This is a link!" }
|
14
|
-
end
|
15
|
-
|
16
|
-
# @label with Tooltip
|
17
|
-
#
|
18
|
-
# @param underline [Boolean]
|
19
|
-
# @param muted [Boolean]
|
20
|
-
# @param tag [Symbol] select [a, span]
|
21
|
-
# @param scheme [Symbol] select [default, primary, secondary]
|
22
|
-
def tooltip(tag: :a, scheme: :default, muted: false, underline: true)
|
23
|
-
render(Primer::LinkComponent.new(href: "#", id: "tooltip-link", tag: tag, scheme: scheme, muted: muted, underline: underline)) do |component|
|
24
|
-
component.with_tooltip(text: "Tooltip text")
|
25
|
-
"Link with tooltip"
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|