primer_view_components 0.0.110 → 0.0.111

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +20 -0
  3. data/app/assets/javascripts/primer_view_components.js.map +1 -1
  4. data/app/assets/styles/primer_view_components.css +1 -1
  5. data/app/assets/styles/primer_view_components.css.map +1 -1
  6. data/app/components/primer/alpha/action_list/item.rb +2 -2
  7. data/app/components/primer/alpha/x_banner.d.ts +2 -1
  8. data/app/components/primer/alpha/x_banner.js +0 -1
  9. data/app/components/primer/alpha/x_banner.ts +1 -1
  10. data/app/components/primer/beta/avatar.css +1 -0
  11. data/app/components/primer/beta/avatar.css.json +1 -0
  12. data/app/components/primer/beta/avatar.css.map +1 -0
  13. data/app/components/primer/beta/avatar.pcss +73 -0
  14. data/app/components/primer/beta/avatar_stack.css +1 -0
  15. data/app/components/primer/beta/avatar_stack.css.json +1 -0
  16. data/app/components/primer/beta/avatar_stack.css.map +1 -0
  17. data/app/components/primer/beta/avatar_stack.pcss +141 -0
  18. data/app/components/primer/beta/button.rb +1 -1
  19. data/app/components/primer/beta/flash.css +1 -0
  20. data/app/components/primer/beta/flash.css.json +1 -0
  21. data/app/components/primer/beta/flash.css.map +1 -0
  22. data/app/components/primer/beta/flash.pcss +143 -0
  23. data/app/components/primer/dropdown.css +1 -0
  24. data/app/components/primer/dropdown.css.json +1 -0
  25. data/app/components/primer/dropdown.css.map +1 -0
  26. data/app/components/primer/dropdown.pcss +260 -0
  27. data/app/components/primer/popover_component.css +1 -0
  28. data/app/components/primer/popover_component.css.json +1 -0
  29. data/app/components/primer/popover_component.css.map +1 -0
  30. data/app/components/primer/popover_component.pcss +225 -0
  31. data/app/components/primer/primer.pcss +6 -0
  32. data/app/components/primer/timeline_item_component.css +1 -0
  33. data/app/components/primer/timeline_item_component.css.json +1 -0
  34. data/app/components/primer/timeline_item_component.css.map +1 -0
  35. data/app/components/primer/timeline_item_component.pcss +93 -0
  36. data/lib/primer/deprecations.rb +0 -1
  37. data/lib/primer/view_components/version.rb +1 -1
  38. data/previews/primer/alpha/banner_preview.rb +1 -1
  39. data/previews/primer/beta/avatar_preview.rb +61 -5
  40. data/previews/primer/beta/avatar_stack_preview.rb +54 -12
  41. data/previews/primer/beta/blankslate_preview.rb +29 -5
  42. data/previews/primer/beta/flash_preview.rb +45 -8
  43. data/previews/primer/beta/label_preview.rb +86 -8
  44. data/previews/primer/dropdown_preview.rb +161 -10
  45. data/static/audited_at.json +0 -1
  46. data/static/constants.json +0 -2
  47. data/static/statuses.json +0 -1
  48. metadata +26 -3
  49. data/app/components/primer/counter_component.rb +0 -7
@@ -4,23 +4,101 @@ module Primer
4
4
  module Beta
5
5
  # @label Label
6
6
  class LabelPreview < ViewComponent::Preview
7
- # @label Default Options
7
+ # @label Playground
8
8
  #
9
9
  # @param size [Symbol] select [medium, large]
10
10
  # @param tag [Symbol] select [span, summary, a, div]
11
11
  # @param inline [Boolean] toggle
12
- def default(size: :medium, tag: :span, inline: false)
12
+ def playground(size: :medium, tag: :span, inline: false)
13
13
  render(Primer::Beta::Label.new(tag: tag, size: size, inline: inline)) { "Label" }
14
14
  end
15
15
 
16
- # @label Playground
16
+ # @label Default Options
17
+ def default
18
+ render(Primer::Beta::Label.new) { "Label" }
19
+ end
20
+
21
+ # @!group Color Schemes
17
22
  #
18
- # @param size [Symbol] select [medium, large]
19
- # @param tag [Symbol] select [span, summary, a, div]
20
- # @param inline [Boolean] toggle
21
- def playground(size: :medium, tag: :span, inline: false)
22
- render(Primer::Beta::Label.new(tag: tag, size: size, inline: inline)) { "Label" }
23
+ # @label Default
24
+ def color_scheme_default
25
+ render(Primer::Beta::Label.new) { "Default" }
26
+ end
27
+
28
+ # @label Primary
29
+ def color_scheme_primary
30
+ render(Primer::Beta::Label.new(scheme: :primary)) { "Primary" }
31
+ end
32
+
33
+ # @label Secondary
34
+ def color_scheme_secondary
35
+ render(Primer::Beta::Label.new(scheme: :secondary)) { "Secondary" }
36
+ end
37
+
38
+ # @label Accent
39
+ def color_scheme_accent
40
+ render(Primer::Beta::Label.new(scheme: :accent)) { "Accent" }
41
+ end
42
+
43
+ # @label Success
44
+ def color_scheme_success
45
+ render(Primer::Beta::Label.new(scheme: :success)) { "Success" }
46
+ end
47
+
48
+ # @label Attention
49
+ def color_scheme_attention
50
+ render(Primer::Beta::Label.new(scheme: :attention)) { "Attention" }
23
51
  end
52
+
53
+ # @label Danger
54
+ def color_scheme_danger
55
+ render(Primer::Beta::Label.new(scheme: :danger)) { "Danger" }
56
+ end
57
+
58
+ # @label Severe
59
+ def color_scheme_severe
60
+ render(Primer::Beta::Label.new(scheme: :severe)) { "Severe" }
61
+ end
62
+
63
+ # @label Done
64
+ def color_scheme_done
65
+ render(Primer::Beta::Label.new(scheme: :done)) { "Done" }
66
+ end
67
+
68
+ # @label Sponsors
69
+ def color_scheme_sponsors
70
+ render(Primer::Beta::Label.new(scheme: :sponsors)) { "Sponsors" }
71
+ end
72
+ #
73
+ # @!endgroup
74
+
75
+ # @!group Sizes
76
+ #
77
+ # @label Default
78
+ def size_default
79
+ render(Primer::Beta::Label.new) { "Default" }
80
+ end
81
+
82
+ # @label Large
83
+ def size_large
84
+ render(Primer::Beta::Label.new(size: :large)) { "Large" }
85
+ end
86
+ #
87
+ # @!endgroup
88
+
89
+ # @!group Inline
90
+ #
91
+ # @label Default
92
+ def inline_default
93
+ render(Primer::Beta::Label.new) { "Default" }
94
+ end
95
+
96
+ # @label Inline
97
+ def inline_inline
98
+ render(Primer::Beta::Label.new(inline: true)) { "Inline" }
99
+ end
100
+ #
101
+ # @!endgroup
24
102
  end
25
103
  end
26
104
  end
@@ -21,25 +21,20 @@ module Primer
21
21
  end
22
22
  end
23
23
 
24
- # @label Default Options
24
+ # @label Default
25
25
  #
26
- # @param with_caret [Boolean] toggle
27
- # @param overlay [Symbol] select [none, default, dark]
28
- def default(overlay: :default, with_caret: false)
29
- render(Primer::Dropdown.new(overlay: overlay, with_caret: with_caret)) do |c|
26
+ def default
27
+ render(Primer::Dropdown.new) do |c|
30
28
  c.with_button { "Dropdown" }
31
-
32
- c.with_menu(header: "Header") do |m|
29
+ c.with_menu do |m|
33
30
  m.with_item { "Item 1" }
34
31
  m.with_item { "Item 2" }
35
- m.with_item(divider: true)
36
32
  m.with_item { "Item 3" }
37
- m.with_item { "Item 4" }
38
33
  end
39
34
  end
40
35
  end
41
36
 
42
- # @label Menu Options
37
+ # @label Menu
43
38
  #
44
39
  # @param as [Symbol] select [list, default]
45
40
  # @param direction [Symbol] select [se, sw, w, e, ne, s]
@@ -53,5 +48,161 @@ module Primer
53
48
  m.with_item { "Item 4" }
54
49
  end
55
50
  end
51
+
52
+ # @!group Direction
53
+ #
54
+ # @label Direction e
55
+ def direction_e
56
+ render(Primer::Dropdown.new(display: :inline_block)) do |c|
57
+ c.with_button { "Dropdown" }
58
+ c.with_menu(direction: :e) do |m|
59
+ m.with_item { "Item 1" }
60
+ m.with_item { "Item 2" }
61
+ m.with_item { "Item 3" }
62
+ end
63
+ end
64
+ end
65
+
66
+ # @label Direction ne
67
+ def direction_ne
68
+ render(Primer::Dropdown.new(display: :inline_block)) do |c|
69
+ c.with_button { "Dropdown" }
70
+ c.with_menu(direction: :ne) do |m|
71
+ m.with_item { "Item 1" }
72
+ m.with_item { "Item 2" }
73
+ m.with_item { "Item 3" }
74
+ end
75
+ end
76
+ end
77
+
78
+ # @label Direction s
79
+ def direction_s
80
+ render(Primer::Dropdown.new(display: :inline_block)) do |c|
81
+ c.with_button { "Dropdown" }
82
+ c.with_menu(direction: :s) do |m|
83
+ m.with_item { "Item 1" }
84
+ m.with_item { "Item 2" }
85
+ m.with_item { "Item 3" }
86
+ end
87
+ end
88
+ end
89
+
90
+ # @label Direction se
91
+ def direction_se
92
+ render(Primer::Dropdown.new(display: :inline_block)) do |c|
93
+ c.with_button { "Dropdown" }
94
+ c.with_menu(direction: :se) do |m|
95
+ m.with_item { "Item 1" }
96
+ m.with_item { "Item 2" }
97
+ m.with_item { "Item 3" }
98
+ end
99
+ end
100
+ end
101
+
102
+ # @label Direction sw
103
+ def direction_sw
104
+ render(Primer::Dropdown.new(display: :inline_block)) do |c|
105
+ c.with_button { "Dropdown" }
106
+ c.with_menu(direction: :sw) do |m|
107
+ m.with_item { "Item 1" }
108
+ m.with_item { "Item 2" }
109
+ m.with_item { "Item 3" }
110
+ end
111
+ end
112
+ end
113
+
114
+ # @label Direction w
115
+ def direction_w
116
+ render(Primer::Dropdown.new(display: :inline_block)) do |c|
117
+ c.with_button { "Dropdown" }
118
+ c.with_menu(direction: :w) do |m|
119
+ m.with_item { "Item 1" }
120
+ m.with_item { "Item 2" }
121
+ m.with_item { "Item 3" }
122
+ end
123
+ end
124
+ end
125
+ #
126
+ # @!endgroup
127
+
128
+ # @!group Options
129
+ #
130
+ # @label With caret
131
+ def options_with_caret
132
+ render(Primer::Dropdown.new(with_caret: true)) do |c|
133
+ c.with_button { "Dropdown" }
134
+ c.with_menu do |m|
135
+ m.with_item { "Item 1" }
136
+ m.with_item { "Item 2" }
137
+ m.with_item { "Item 3" }
138
+ end
139
+ end
140
+ end
141
+
142
+ # @label With header
143
+ def options_with_header
144
+ render(Primer::Dropdown.new) do |c|
145
+ c.with_button { "Dropdown" }
146
+ c.with_menu(header: "Header") do |m|
147
+ m.with_item { "Item 1" }
148
+ m.with_item { "Item 2" }
149
+ m.with_item { "Item 3" }
150
+ end
151
+ end
152
+ end
153
+
154
+ # @label With dividers
155
+ def options_with_dividers
156
+ render(Primer::Dropdown.new) do |c|
157
+ c.with_button { "Dropdown" }
158
+ c.with_menu do |m|
159
+ m.with_item { "Item 1" }
160
+ m.with_item { "Item 2" }
161
+ m.with_item(divider: true)
162
+ m.with_item { "Item 3" }
163
+ m.with_item { "Item 4" }
164
+ m.with_item(divider: true)
165
+ m.with_item { "Item 5" }
166
+ end
167
+ end
168
+ end
169
+
170
+ # @label As list
171
+ def options_as_list
172
+ render(Primer::Dropdown.new) do |c|
173
+ c.with_button { "Dropdown" }
174
+ c.with_menu(as: :list) do |m|
175
+ m.with_item { "Item 1" }
176
+ m.with_item { "Item 2" }
177
+ m.with_item { "Item 3" }
178
+ end
179
+ end
180
+ end
181
+
182
+ # @label Overlay none
183
+ def options_overlay_none
184
+ render(Primer::Dropdown.new(overlay: :none)) do |c|
185
+ c.with_button { "Dropdown" }
186
+ c.with_menu do |m|
187
+ m.with_item { "Item 1" }
188
+ m.with_item { "Item 2" }
189
+ m.with_item { "Item 3" }
190
+ end
191
+ end
192
+ end
193
+
194
+ # @label Overlay dark
195
+ def options_overlay_dark
196
+ render(Primer::Dropdown.new(overlay: :dark)) do |c|
197
+ c.with_button { "Dropdown" }
198
+ c.with_menu do |m|
199
+ m.with_item { "Item 1" }
200
+ m.with_item { "Item 2" }
201
+ m.with_item { "Item 3" }
202
+ end
203
+ end
204
+ end
205
+ #
206
+ # @!endgroup
56
207
  end
57
208
  end
@@ -61,7 +61,6 @@
61
61
  "Primer::ClipboardCopy": "",
62
62
  "Primer::ConditionalWrapper": "",
63
63
  "Primer::Content": "",
64
- "Primer::CounterComponent": "",
65
64
  "Primer::Dropdown": "",
66
65
  "Primer::Dropdown::Menu": "",
67
66
  "Primer::Dropdown::Menu::Item": "",
@@ -732,8 +732,6 @@
732
732
  },
733
733
  "Primer::Content": {
734
734
  },
735
- "Primer::CounterComponent": {
736
- },
737
735
  "Primer::Dropdown": {
738
736
  "Menu": "Primer::Dropdown::Menu"
739
737
  },
data/static/statuses.json CHANGED
@@ -61,7 +61,6 @@
61
61
  "Primer::ClipboardCopy": "beta",
62
62
  "Primer::ConditionalWrapper": "alpha",
63
63
  "Primer::Content": "stable",
64
- "Primer::CounterComponent": "deprecated",
65
64
  "Primer::Dropdown": "alpha",
66
65
  "Primer::Dropdown::Menu": "alpha",
67
66
  "Primer::Dropdown::Menu::Item": "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.110
4
+ version: 0.0.111
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-14 00:00:00.000000000 Z
11
+ date: 2022-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview
@@ -500,8 +500,16 @@ files:
500
500
  - app/components/primer/beta/auto_complete/auto_complete.ts
501
501
  - app/components/primer/beta/auto_complete/item.html.erb
502
502
  - app/components/primer/beta/auto_complete/item.rb
503
+ - app/components/primer/beta/avatar.css
504
+ - app/components/primer/beta/avatar.css.json
505
+ - app/components/primer/beta/avatar.css.map
506
+ - app/components/primer/beta/avatar.pcss
503
507
  - app/components/primer/beta/avatar.rb
508
+ - app/components/primer/beta/avatar_stack.css
509
+ - app/components/primer/beta/avatar_stack.css.json
510
+ - app/components/primer/beta/avatar_stack.css.map
504
511
  - app/components/primer/beta/avatar_stack.html.erb
512
+ - app/components/primer/beta/avatar_stack.pcss
505
513
  - app/components/primer/beta/avatar_stack.rb
506
514
  - app/components/primer/beta/base_button.rb
507
515
  - app/components/primer/beta/blankslate.css
@@ -536,7 +544,11 @@ files:
536
544
  - app/components/primer/beta/counter.rb
537
545
  - app/components/primer/beta/details.html.erb
538
546
  - app/components/primer/beta/details.rb
547
+ - app/components/primer/beta/flash.css
548
+ - app/components/primer/beta/flash.css.json
549
+ - app/components/primer/beta/flash.css.map
539
550
  - app/components/primer/beta/flash.html.erb
551
+ - app/components/primer/beta/flash.pcss
540
552
  - app/components/primer/beta/flash.rb
541
553
  - app/components/primer/beta/heading.rb
542
554
  - app/components/primer/beta/icon_button.html.erb
@@ -574,10 +586,13 @@ files:
574
586
  - app/components/primer/component.rb
575
587
  - app/components/primer/conditional_wrapper.rb
576
588
  - app/components/primer/content.rb
577
- - app/components/primer/counter_component.rb
589
+ - app/components/primer/dropdown.css
590
+ - app/components/primer/dropdown.css.json
591
+ - app/components/primer/dropdown.css.map
578
592
  - app/components/primer/dropdown.d.ts
579
593
  - app/components/primer/dropdown.html.erb
580
594
  - app/components/primer/dropdown.js
595
+ - app/components/primer/dropdown.pcss
581
596
  - app/components/primer/dropdown.rb
582
597
  - app/components/primer/dropdown.ts
583
598
  - app/components/primer/dropdown/menu.d.ts
@@ -608,7 +623,11 @@ files:
608
623
  - app/components/primer/octicon_component.rb
609
624
  - app/components/primer/octicon_symbols_component.html.erb
610
625
  - app/components/primer/octicon_symbols_component.rb
626
+ - app/components/primer/popover_component.css
627
+ - app/components/primer/popover_component.css.json
628
+ - app/components/primer/popover_component.css.map
611
629
  - app/components/primer/popover_component.html.erb
630
+ - app/components/primer/popover_component.pcss
612
631
  - app/components/primer/popover_component.rb
613
632
  - app/components/primer/primer.d.ts
614
633
  - app/components/primer/primer.js
@@ -636,7 +655,11 @@ files:
636
655
  - app/components/primer/time_ago_component.js
637
656
  - app/components/primer/time_ago_component.rb
638
657
  - app/components/primer/time_ago_component.ts
658
+ - app/components/primer/timeline_item_component.css
659
+ - app/components/primer/timeline_item_component.css.json
660
+ - app/components/primer/timeline_item_component.css.map
639
661
  - app/components/primer/timeline_item_component.html.erb
662
+ - app/components/primer/timeline_item_component.pcss
640
663
  - app/components/primer/timeline_item_component.rb
641
664
  - app/components/primer/tooltip.rb
642
665
  - app/components/primer/truncate.css
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Primer
4
- class CounterComponent < Primer::Beta::Counter
5
- status :deprecated
6
- end
7
- end