openproject-primer_view_components 0.28.1 → 0.29.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +25 -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_bar.css +1 -1
- data/app/components/primer/alpha/action_bar.css.map +1 -1
- data/app/components/primer/alpha/action_list/item.html.erb +1 -1
- data/app/components/primer/alpha/action_list.css +1 -1
- data/app/components/primer/alpha/action_list.css.map +1 -1
- data/app/components/primer/alpha/auto_complete.css +1 -1
- data/app/components/primer/alpha/auto_complete.css.map +1 -1
- data/app/components/primer/alpha/banner.css +1 -1
- data/app/components/primer/alpha/banner.css.map +1 -1
- data/app/components/primer/alpha/button_marketing.css +1 -1
- data/app/components/primer/alpha/button_marketing.css.map +1 -1
- data/app/components/primer/alpha/dialog.css +1 -1
- data/app/components/primer/alpha/dialog.css.map +1 -1
- data/app/components/primer/alpha/dropdown.css +1 -1
- data/app/components/primer/alpha/dropdown.css.map +1 -1
- data/app/components/primer/alpha/layout.css +1 -1
- data/app/components/primer/alpha/layout.css.map +1 -1
- data/app/components/primer/alpha/menu.css +1 -1
- data/app/components/primer/alpha/menu.css.map +1 -1
- data/app/components/primer/alpha/segmented_control.css +1 -1
- data/app/components/primer/alpha/segmented_control.css.json +2 -0
- data/app/components/primer/alpha/segmented_control.css.map +1 -1
- data/app/components/primer/alpha/segmented_control.pcss +13 -0
- data/app/components/primer/alpha/tab_nav.css +1 -1
- data/app/components/primer/alpha/tab_nav.css.map +1 -1
- data/app/components/primer/alpha/text_field.css +1 -1
- data/app/components/primer/alpha/text_field.css.map +1 -1
- data/app/components/primer/alpha/toggle_switch.css +1 -1
- data/app/components/primer/alpha/toggle_switch.css.map +1 -1
- data/app/components/primer/alpha/underline_nav.css +1 -1
- data/app/components/primer/alpha/underline_nav.css.map +1 -1
- data/app/components/primer/beta/avatar.css +1 -1
- data/app/components/primer/beta/avatar.css.map +1 -1
- data/app/components/primer/beta/avatar_stack.css +1 -1
- data/app/components/primer/beta/avatar_stack.css.map +1 -1
- data/app/components/primer/beta/blankslate.css +1 -1
- data/app/components/primer/beta/blankslate.css.map +1 -1
- data/app/components/primer/beta/border_box.css +1 -1
- data/app/components/primer/beta/border_box.css.json +1 -1
- data/app/components/primer/beta/border_box.css.map +1 -1
- data/app/components/primer/beta/breadcrumbs.css +1 -1
- data/app/components/primer/beta/breadcrumbs.css.map +1 -1
- data/app/components/primer/beta/button.css +1 -1
- data/app/components/primer/beta/button.css.json +8 -0
- data/app/components/primer/beta/button.css.map +1 -1
- data/app/components/primer/beta/button.pcss +42 -0
- data/app/components/primer/beta/button.rb +5 -1
- data/app/components/primer/beta/button_group.css +1 -1
- data/app/components/primer/beta/button_group.css.map +1 -1
- data/app/components/primer/beta/counter.css +1 -1
- data/app/components/primer/beta/counter.css.map +1 -1
- data/app/components/primer/beta/flash.css +1 -1
- data/app/components/primer/beta/flash.css.map +1 -1
- data/app/components/primer/beta/label.css +1 -1
- data/app/components/primer/beta/label.css.map +1 -1
- data/app/components/primer/beta/link.css +1 -1
- data/app/components/primer/beta/link.css.map +1 -1
- data/app/components/primer/beta/popover.css +1 -1
- data/app/components/primer/beta/popover.css.map +1 -1
- data/app/components/primer/beta/progress_bar.css +1 -1
- data/app/components/primer/beta/progress_bar.css.map +1 -1
- data/app/components/primer/beta/state.css +1 -1
- data/app/components/primer/beta/state.css.map +1 -1
- data/app/components/primer/beta/subhead.css +1 -1
- data/app/components/primer/beta/subhead.css.map +1 -1
- data/app/components/primer/beta/timeline_item.css +1 -1
- data/app/components/primer/beta/timeline_item.css.map +1 -1
- data/app/components/primer/beta/truncate.css +1 -1
- data/app/components/primer/beta/truncate.css.map +1 -1
- data/app/components/primer/open_project/border_grid.css +1 -1
- data/app/components/primer/open_project/border_grid.css.map +1 -1
- data/app/components/primer/open_project/drag_handle.css +1 -1
- data/app/components/primer/open_project/drag_handle.css.map +1 -1
- data/app/components/primer/open_project/page_header.css +1 -1
- data/app/components/primer/open_project/page_header.css.json +0 -1
- data/app/components/primer/open_project/page_header.css.map +1 -1
- data/app/components/primer/open_project/page_header.html.erb +3 -1
- data/app/components/primer/open_project/page_header.pcss +1 -12
- data/app/components/primer/open_project/page_header.rb +65 -33
- data/app/components/primer/open_project/zen_mode_button.html.erb +1 -0
- data/app/components/primer/open_project/zen_mode_button.rb +2 -0
- data/lib/primer/view_components/version.rb +1 -1
- data/previews/primer/alpha/action_list_preview.rb +1 -1
- data/previews/primer/alpha/select_preview.rb +3 -0
- data/previews/primer/beta/button_preview/label_wrap.html.erb +9 -0
- data/previews/primer/beta/button_preview/link_scheme_label_wrap.html.erb +8 -0
- data/previews/primer/beta/button_preview.rb +31 -2
- data/previews/primer/beta/nav_list_preview.rb +15 -1
- data/previews/primer/open_project/page_header_preview.rb +20 -5
- data/static/arguments.json +6 -0
- data/static/classes.json +3 -3
- data/static/constants.json +1 -1
- data/static/info_arch.json +60 -2
- data/static/previews.json +54 -2
- metadata +4 -2
@@ -120,6 +120,21 @@ module Primer
|
|
120
120
|
end
|
121
121
|
end
|
122
122
|
|
123
|
+
|
124
|
+
# @label With a single action
|
125
|
+
# The single action will not be transformed into a menu on mobile, but remains in a smaller variant
|
126
|
+
def single_action
|
127
|
+
render(Primer::OpenProject::PageHeader.new) do |component|
|
128
|
+
component.with_title { "Great news" }
|
129
|
+
component.with_breadcrumbs([{ href: "/foo", text: "Foo" }, { href: "/bar", text: "Bar" }, "Baz"])
|
130
|
+
|
131
|
+
component.with_action_button(mobile_icon: "plus", mobile_label: "Meeting", scheme: :primary) do |button|
|
132
|
+
button.with_leading_visual_icon(icon: "plus")
|
133
|
+
"Meeting"
|
134
|
+
end
|
135
|
+
end
|
136
|
+
end
|
137
|
+
|
123
138
|
# @label With leading action (on wide)
|
124
139
|
# **Leading action** is only shown on **wide screens** by default.
|
125
140
|
# If you want to override that behaviour please use the system_argument: **display**
|
@@ -137,19 +152,19 @@ module Primer
|
|
137
152
|
end
|
138
153
|
end
|
139
154
|
|
140
|
-
# @label With breadcrumbs
|
155
|
+
# @label With non-bold breadcrumbs
|
141
156
|
# **Breadcrumbs** are only shown on **wider than narrow screens** by default.
|
142
157
|
# A parent link is shown instead in narrow screens
|
143
|
-
#
|
144
|
-
def
|
158
|
+
# Per default, the last element is shown in bold, but that can be disabled, e.g if only parts of the string should be bold.
|
159
|
+
def non_bold_breadcrumbs
|
145
160
|
breadcrumb_items = [
|
146
161
|
{ href: "/foo", text: "Foo" },
|
147
162
|
"\u003ca href=\"/foo/bar\"\u003eBar\u003c/a\u003e",
|
148
|
-
"Baz"
|
163
|
+
"Test: <b>Baz</b>".html_safe
|
149
164
|
]
|
150
165
|
render(Primer::OpenProject::PageHeader.new) do |header|
|
151
166
|
header.with_title { "A title" }
|
152
|
-
header.with_breadcrumbs(breadcrumb_items)
|
167
|
+
header.with_breadcrumbs(breadcrumb_items, selected_item_font_weight: :normal)
|
153
168
|
end
|
154
169
|
end
|
155
170
|
end
|
data/static/arguments.json
CHANGED
@@ -3400,6 +3400,12 @@
|
|
3400
3400
|
"default": "`false`",
|
3401
3401
|
"description": "Whether or not the button is disabled. If true, this option forces `tag:` to `:button`."
|
3402
3402
|
},
|
3403
|
+
{
|
3404
|
+
"name": "label_wrap",
|
3405
|
+
"type": "Boolean",
|
3406
|
+
"default": "`false`",
|
3407
|
+
"description": "Whether or not the button label text wraps and the button height expands."
|
3408
|
+
},
|
3403
3409
|
{
|
3404
3410
|
"name": "system_arguments",
|
3405
3411
|
"type": "Hash",
|
data/static/classes.json
CHANGED
@@ -197,6 +197,9 @@
|
|
197
197
|
"Button--invisible": [
|
198
198
|
"Primer::Beta::Button"
|
199
199
|
],
|
200
|
+
"Button--labelWrap": [
|
201
|
+
"Primer::Beta::Button"
|
202
|
+
],
|
200
203
|
"Button--large": [
|
201
204
|
"Primer::Beta::Button"
|
202
205
|
],
|
@@ -426,9 +429,6 @@
|
|
426
429
|
"PageHeader": [
|
427
430
|
"Primer::OpenProject::PageHeader"
|
428
431
|
],
|
429
|
-
"PageHeader--singleAction": [
|
430
|
-
"Primer::OpenProject::PageHeader"
|
431
|
-
],
|
432
432
|
"PageHeader-actions": [
|
433
433
|
"Primer::OpenProject::PageHeader"
|
434
434
|
],
|
data/static/constants.json
CHANGED
data/static/info_arch.json
CHANGED
@@ -10967,6 +10967,12 @@
|
|
10967
10967
|
"default": "`false`",
|
10968
10968
|
"description": "Whether or not the button is disabled. If true, this option forces `tag:` to `:button`."
|
10969
10969
|
},
|
10970
|
+
{
|
10971
|
+
"name": "label_wrap",
|
10972
|
+
"type": "Boolean",
|
10973
|
+
"default": "`false`",
|
10974
|
+
"description": "Whether or not the button label text wraps and the button height expands."
|
10975
|
+
},
|
10970
10976
|
{
|
10971
10977
|
"name": "system_arguments",
|
10972
10978
|
"type": "Hash",
|
@@ -11151,6 +11157,19 @@
|
|
11151
11157
|
]
|
11152
11158
|
}
|
11153
11159
|
},
|
11160
|
+
{
|
11161
|
+
"preview_path": "primer/beta/button/label_wrap",
|
11162
|
+
"name": "label_wrap",
|
11163
|
+
"snapshot": "true",
|
11164
|
+
"skip_rules": {
|
11165
|
+
"wont_fix": [
|
11166
|
+
"region"
|
11167
|
+
],
|
11168
|
+
"will_fix": [
|
11169
|
+
"color-contrast"
|
11170
|
+
]
|
11171
|
+
}
|
11172
|
+
},
|
11154
11173
|
{
|
11155
11174
|
"preview_path": "primer/beta/button/link_as_button",
|
11156
11175
|
"name": "link_as_button",
|
@@ -11254,6 +11273,19 @@
|
|
11254
11273
|
"color-contrast"
|
11255
11274
|
]
|
11256
11275
|
}
|
11276
|
+
},
|
11277
|
+
{
|
11278
|
+
"preview_path": "primer/beta/button/link_scheme_label_wrap",
|
11279
|
+
"name": "link_scheme_label_wrap",
|
11280
|
+
"snapshot": "true",
|
11281
|
+
"skip_rules": {
|
11282
|
+
"wont_fix": [
|
11283
|
+
"region"
|
11284
|
+
],
|
11285
|
+
"will_fix": [
|
11286
|
+
"color-contrast"
|
11287
|
+
]
|
11288
|
+
}
|
11257
11289
|
}
|
11258
11290
|
],
|
11259
11291
|
"subcomponents": [
|
@@ -13438,6 +13470,19 @@
|
|
13438
13470
|
"color-contrast"
|
13439
13471
|
]
|
13440
13472
|
}
|
13473
|
+
},
|
13474
|
+
{
|
13475
|
+
"preview_path": "primer/beta/nav_list/group_long_label_with_tooltip",
|
13476
|
+
"name": "group_long_label_with_tooltip",
|
13477
|
+
"snapshot": "false",
|
13478
|
+
"skip_rules": {
|
13479
|
+
"wont_fix": [
|
13480
|
+
"region"
|
13481
|
+
],
|
13482
|
+
"will_fix": [
|
13483
|
+
"color-contrast"
|
13484
|
+
]
|
13485
|
+
}
|
13441
13486
|
}
|
13442
13487
|
],
|
13443
13488
|
"subcomponents": [
|
@@ -16644,6 +16689,19 @@
|
|
16644
16689
|
]
|
16645
16690
|
}
|
16646
16691
|
},
|
16692
|
+
{
|
16693
|
+
"preview_path": "primer/open_project/page_header/single_action",
|
16694
|
+
"name": "single_action",
|
16695
|
+
"snapshot": "false",
|
16696
|
+
"skip_rules": {
|
16697
|
+
"wont_fix": [
|
16698
|
+
"region"
|
16699
|
+
],
|
16700
|
+
"will_fix": [
|
16701
|
+
"color-contrast"
|
16702
|
+
]
|
16703
|
+
}
|
16704
|
+
},
|
16647
16705
|
{
|
16648
16706
|
"preview_path": "primer/open_project/page_header/leading_action",
|
16649
16707
|
"name": "leading_action",
|
@@ -16658,8 +16716,8 @@
|
|
16658
16716
|
}
|
16659
16717
|
},
|
16660
16718
|
{
|
16661
|
-
"preview_path": "primer/open_project/page_header/
|
16662
|
-
"name": "
|
16719
|
+
"preview_path": "primer/open_project/page_header/non_bold_breadcrumbs",
|
16720
|
+
"name": "non_bold_breadcrumbs",
|
16663
16721
|
"snapshot": "false",
|
16664
16722
|
"skip_rules": {
|
16665
16723
|
"wont_fix": [
|
data/static/previews.json
CHANGED
@@ -2184,6 +2184,19 @@
|
|
2184
2184
|
]
|
2185
2185
|
}
|
2186
2186
|
},
|
2187
|
+
{
|
2188
|
+
"preview_path": "primer/beta/button/label_wrap",
|
2189
|
+
"name": "label_wrap",
|
2190
|
+
"snapshot": "true",
|
2191
|
+
"skip_rules": {
|
2192
|
+
"wont_fix": [
|
2193
|
+
"region"
|
2194
|
+
],
|
2195
|
+
"will_fix": [
|
2196
|
+
"color-contrast"
|
2197
|
+
]
|
2198
|
+
}
|
2199
|
+
},
|
2187
2200
|
{
|
2188
2201
|
"preview_path": "primer/beta/button/link_as_button",
|
2189
2202
|
"name": "link_as_button",
|
@@ -2287,6 +2300,19 @@
|
|
2287
2300
|
"color-contrast"
|
2288
2301
|
]
|
2289
2302
|
}
|
2303
|
+
},
|
2304
|
+
{
|
2305
|
+
"preview_path": "primer/beta/button/link_scheme_label_wrap",
|
2306
|
+
"name": "link_scheme_label_wrap",
|
2307
|
+
"snapshot": "true",
|
2308
|
+
"skip_rules": {
|
2309
|
+
"wont_fix": [
|
2310
|
+
"region"
|
2311
|
+
],
|
2312
|
+
"will_fix": [
|
2313
|
+
"color-contrast"
|
2314
|
+
]
|
2315
|
+
}
|
2290
2316
|
}
|
2291
2317
|
]
|
2292
2318
|
},
|
@@ -4955,6 +4981,19 @@
|
|
4955
4981
|
"color-contrast"
|
4956
4982
|
]
|
4957
4983
|
}
|
4984
|
+
},
|
4985
|
+
{
|
4986
|
+
"preview_path": "primer/beta/nav_list/group_long_label_with_tooltip",
|
4987
|
+
"name": "group_long_label_with_tooltip",
|
4988
|
+
"snapshot": "false",
|
4989
|
+
"skip_rules": {
|
4990
|
+
"wont_fix": [
|
4991
|
+
"region"
|
4992
|
+
],
|
4993
|
+
"will_fix": [
|
4994
|
+
"color-contrast"
|
4995
|
+
]
|
4996
|
+
}
|
4958
4997
|
}
|
4959
4998
|
]
|
4960
4999
|
},
|
@@ -5235,6 +5274,19 @@
|
|
5235
5274
|
]
|
5236
5275
|
}
|
5237
5276
|
},
|
5277
|
+
{
|
5278
|
+
"preview_path": "primer/open_project/page_header/single_action",
|
5279
|
+
"name": "single_action",
|
5280
|
+
"snapshot": "false",
|
5281
|
+
"skip_rules": {
|
5282
|
+
"wont_fix": [
|
5283
|
+
"region"
|
5284
|
+
],
|
5285
|
+
"will_fix": [
|
5286
|
+
"color-contrast"
|
5287
|
+
]
|
5288
|
+
}
|
5289
|
+
},
|
5238
5290
|
{
|
5239
5291
|
"preview_path": "primer/open_project/page_header/leading_action",
|
5240
5292
|
"name": "leading_action",
|
@@ -5249,8 +5301,8 @@
|
|
5249
5301
|
}
|
5250
5302
|
},
|
5251
5303
|
{
|
5252
|
-
"preview_path": "primer/open_project/page_header/
|
5253
|
-
"name": "
|
5304
|
+
"preview_path": "primer/open_project/page_header/non_bold_breadcrumbs",
|
5305
|
+
"name": "non_bold_breadcrumbs",
|
5254
5306
|
"snapshot": "false",
|
5255
5307
|
"skip_rules": {
|
5256
5308
|
"wont_fix": [
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openproject-primer_view_components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.29.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitHub Open Source
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-04-
|
12
|
+
date: 2024-04-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionview
|
@@ -860,8 +860,10 @@ files:
|
|
860
860
|
- previews/primer/beta/button_preview.rb
|
861
861
|
- previews/primer/beta/button_preview/all_schemes.html.erb
|
862
862
|
- previews/primer/beta/button_preview/invisible_all_visuals.html.erb
|
863
|
+
- previews/primer/beta/button_preview/label_wrap.html.erb
|
863
864
|
- previews/primer/beta/button_preview/leading_visual.html.erb
|
864
865
|
- previews/primer/beta/button_preview/leading_visual_svg.html.erb
|
866
|
+
- previews/primer/beta/button_preview/link_scheme_label_wrap.html.erb
|
865
867
|
- previews/primer/beta/button_preview/trailing_action.html.erb
|
866
868
|
- previews/primer/beta/button_preview/trailing_counter.html.erb
|
867
869
|
- previews/primer/beta/button_preview/trailing_visual.html.erb
|