openproject-primer_view_components 0.33.0 → 0.33.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- 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/breadcrumbs.css +1 -1
- data/app/components/primer/beta/breadcrumbs.css.map +1 -1
- data/app/components/primer/beta/breadcrumbs.pcss +0 -1
- data/app/components/primer/open_project/page_header.css +1 -1
- data/app/components/primer/open_project/page_header.css.json +3 -3
- data/app/components/primer/open_project/page_header.css.map +1 -1
- data/app/components/primer/open_project/page_header.pcss +6 -6
- data/app/components/primer/open_project/page_header.rb +1 -1
- data/lib/primer/view_components/version.rb +1 -1
- data/previews/primer/alpha/banner_preview.rb +1 -1
- data/previews/primer/beta/breadcrumbs_preview/with_beta_truncate.html.erb +15 -0
- data/previews/primer/beta/breadcrumbs_preview/with_deprecated_truncate.html.erb +14 -0
- data/previews/primer/beta/breadcrumbs_preview.rb +12 -0
- data/static/classes.json +1 -4
- data/static/info_arch.json +26 -0
- data/static/previews.json +26 -0
- metadata +4 -2
@@ -1 +1 @@
|
|
1
|
-
.breadcrumb-item{display:inline-block;list-style:none;margin-left:-.35em
|
1
|
+
.breadcrumb-item{display:inline-block;list-style:none;margin-left:-.35em}.breadcrumb-item:after{border-right:.1em solid var(--borderColor-neutral-emphasis);content:"";display:inline-block;height:.8em;margin:0 .5em;transform:rotate(15deg) translateY(.0625em)}.breadcrumb-item:first-child{margin-left:0}.breadcrumb-item-selected:after,.breadcrumb-item[aria-current]:not([aria-current=false]):after{content:none}.breadcrumb-item-selected a{color:var(--fgColor-default);cursor:default!important;-webkit-text-decoration:none!important;text-decoration:none!important}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["breadcrumbs.pcss"],"names":[],"mappings":"AAAA,iBACE,oBAAqB,
|
1
|
+
{"version":3,"sources":["breadcrumbs.pcss"],"names":[],"mappings":"AAAA,iBACE,oBAAqB,CAErB,eAAgB,CADhB,kBAeF,CAZE,uBAKE,2DAA6D,CAD7D,UAAW,CAHX,oBAAqB,CACrB,WAAa,CACb,aAAe,CAGf,2CACF,CAEA,6BACE,aACF,CAKA,+FACE,YACF,CAGF,4BACE,4BAA6B,CAC7B,wBAA0B,CAC1B,sCAAgC,CAAhC,8BACF","file":"breadcrumbs.css","sourcesContent":[".breadcrumb-item {\n display: inline-block;\n margin-left: -0.35em;\n list-style: none;\n\n &::after {\n display: inline-block;\n height: 0.8em;\n margin: 0 0.5em;\n content: '';\n border-right: 0.1em solid var(--borderColor-neutral-emphasis);\n transform: rotate(15deg) translateY(0.0625em);\n }\n\n &:first-child {\n margin-left: 0;\n }\n}\n\n.breadcrumb-item-selected,\n.breadcrumb-item[aria-current]:not([aria-current='false']) {\n &::after {\n content: none;\n }\n}\n\n.breadcrumb-item-selected a {\n color: var(--fgColor-default);\n cursor: default !important;\n text-decoration: none !important;\n}\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
.PageHeader{border-bottom:var(--borderWidth-thin) solid var(--borderColor-muted);display:flex;flex-flow:column;margin-bottom:var(--stack-gap-normal);padding-bottom:var(--stack-padding-condensed)}.PageHeader--
|
1
|
+
.PageHeader{border-bottom:var(--borderWidth-thin) solid var(--borderColor-muted);display:flex;flex-flow:column;margin-bottom:var(--stack-gap-normal);padding-bottom:var(--stack-padding-condensed)}.PageHeader--withTabNav{border-bottom:none;margin-bottom:0;padding-bottom:0}.PageHeader-contextBar{margin-bottom:var(--base-size-8)}.PageHeader-contextBar,.PageHeader-titleBar{align-items:center;display:flex;flex-flow:row;justify-content:flex-end}.PageHeader-titleBar{margin-bottom:var(--space-xsmall)}.PageHeader-title{flex:1 1 auto;font-size:var(--text-title-size-medium);font-weight:var(--base-text-weight-normal)}.PageHeader-title--large{font-size:var(--text-title-size-large)}.PageHeader-description{color:var(--fgColor-muted);flex:1 100%;font-size:var(--text-body-size-medium)}.PageHeader--withTabNav .PageHeader-description{margin-bottom:var(--space-xlarge)}.PageHeader-actions{align-items:center;display:flex;justify-content:flex-end}.PageHeader-breadcrumbs{display:block;width:100%}.PageHeader-leadingAction{margin-right:var(--base-size-4);margin-top:2px}.PageHeader-parentLink{flex:1 1 auto}
|
@@ -2,16 +2,16 @@
|
|
2
2
|
"name": "open_project/page_header",
|
3
3
|
"selectors": [
|
4
4
|
".PageHeader",
|
5
|
-
".PageHeader--
|
5
|
+
".PageHeader--withTabNav",
|
6
6
|
".PageHeader-contextBar",
|
7
7
|
".PageHeader-titleBar",
|
8
8
|
".PageHeader-title",
|
9
9
|
".PageHeader-title--large",
|
10
10
|
".PageHeader-description",
|
11
|
+
".PageHeader--withTabNav .PageHeader-description",
|
11
12
|
".PageHeader-actions",
|
12
13
|
".PageHeader-breadcrumbs",
|
13
14
|
".PageHeader-leadingAction",
|
14
|
-
".PageHeader-parentLink"
|
15
|
-
".PageHeader-tabNav"
|
15
|
+
".PageHeader-parentLink"
|
16
16
|
]
|
17
17
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["page_header.pcss"],"names":[],"mappings":"AAEA,YAIE,oEAAqE,CAHrE,YAAa,CAIb,gBAAiB,CAFjB,qCAAsC,CADtC,6CAIF,CAEA,
|
1
|
+
{"version":3,"sources":["page_header.pcss"],"names":[],"mappings":"AAEA,YAIE,oEAAqE,CAHrE,YAAa,CAIb,gBAAiB,CAFjB,qCAAsC,CADtC,6CAIF,CAEA,wBACE,kBAAmB,CAEnB,eAAgB,CADhB,gBAEF,CAEA,uBAKE,gCACF,CAEA,4CAJE,kBAAmB,CAHnB,YAAa,CACb,aAAc,CACd,wBAWF,CANA,qBAKE,iCACF,CAEA,kBAGE,aAAc,CAFd,uCAAwC,CACxC,0CAEF,CAEA,yBACE,sCACF,CAGA,wBAEE,0BAA2B,CAC3B,WAAY,CAFZ,sCAGF,CAEA,gDACE,iCACF,CAEA,oBAGE,kBAAmB,CADnB,YAAa,CADb,wBAGF,CAEA,wBACE,aAAc,CACd,UACF,CAEA,0BAEE,+BAAgC,CADhC,cAEF,CAEA,uBACE,aACF","file":"page_header.css","sourcesContent":["/* OP PageHeader */\n\n.PageHeader {\n display: flex;\n padding-bottom: var(--stack-padding-condensed);\n margin-bottom: var(--stack-gap-normal);\n border-bottom: var(--borderWidth-thin) solid var(--borderColor-muted);\n flex-flow: column;\n}\n\n.PageHeader--withTabNav {\n border-bottom: none;\n padding-bottom: 0;\n margin-bottom: 0;\n}\n\n.PageHeader-contextBar {\n display: flex;\n flex-flow: row;\n justify-content: flex-end;\n align-items: center;\n margin-bottom: var(--base-size-8);\n}\n\n.PageHeader-titleBar {\n display: flex;\n flex-flow: row;\n justify-content: flex-end;\n align-items: center; /* Keep back button vertically aligned. */\n margin-bottom: var(--space-xsmall);\n}\n\n.PageHeader-title {\n font-size: var(--text-title-size-medium);\n font-weight: var(--base-text-weight-normal);\n flex: 1 1 auto;\n}\n\n.PageHeader-title--large {\n font-size: var(--text-title-size-large);\n}\n\n/* One-liner of supporting text */\n.PageHeader-description {\n font-size: var(--text-body-size-medium);\n color: var(--fgColor-muted);\n flex: 1 100%;\n}\n\n.PageHeader--withTabNav .PageHeader-description {\n margin-bottom: var(--space-xlarge);\n}\n\n.PageHeader-actions {\n justify-content: flex-end;\n display: flex;\n align-items: center;\n}\n\n.PageHeader-breadcrumbs {\n display: block;\n width: 100%;\n}\n\n.PageHeader-leadingAction {\n margin-top: 2px; /* to center align with label */\n margin-right: var(--base-size-4);\n}\n\n.PageHeader-parentLink {\n flex: 1 1 auto;\n}\n"]}
|
@@ -8,9 +8,10 @@
|
|
8
8
|
flex-flow: column;
|
9
9
|
}
|
10
10
|
|
11
|
-
.PageHeader--
|
11
|
+
.PageHeader--withTabNav {
|
12
12
|
border-bottom: none;
|
13
13
|
padding-bottom: 0;
|
14
|
+
margin-bottom: 0;
|
14
15
|
}
|
15
16
|
|
16
17
|
.PageHeader-contextBar {
|
@@ -46,6 +47,10 @@
|
|
46
47
|
flex: 1 100%;
|
47
48
|
}
|
48
49
|
|
50
|
+
.PageHeader--withTabNav .PageHeader-description {
|
51
|
+
margin-bottom: var(--space-xlarge);
|
52
|
+
}
|
53
|
+
|
49
54
|
.PageHeader-actions {
|
50
55
|
justify-content: flex-end;
|
51
56
|
display: flex;
|
@@ -65,8 +70,3 @@
|
|
65
70
|
.PageHeader-parentLink {
|
66
71
|
flex: 1 1 auto;
|
67
72
|
}
|
68
|
-
|
69
|
-
.PageHeader-tabNav {
|
70
|
-
margin-top: var(--stack-gap-normal);
|
71
|
-
margin-bottom: 0;
|
72
|
-
}
|
@@ -209,7 +209,7 @@ module Primer
|
|
209
209
|
#
|
210
210
|
# @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
|
211
211
|
renders_one :tab_nav, lambda { |**system_arguments, &block|
|
212
|
-
@system_arguments[:classes] = class_names(@system_arguments[:classes], "PageHeader--
|
212
|
+
@system_arguments[:classes] = class_names(@system_arguments[:classes], "PageHeader--withTabNav")
|
213
213
|
|
214
214
|
system_arguments = deny_tag_argument(**system_arguments)
|
215
215
|
system_arguments[:tag] = :div
|
@@ -55,7 +55,7 @@ module Primer
|
|
55
55
|
# @label Dismissable
|
56
56
|
# @snapshot
|
57
57
|
def dismissible
|
58
|
-
render(Primer::Alpha::Banner.new(dismiss_scheme: :hide
|
58
|
+
render(Primer::Alpha::Banner.new(dismiss_scheme: :hide)) { "This is a dismissable banner." }
|
59
59
|
end
|
60
60
|
|
61
61
|
# @!group Full Width
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<% texts = [
|
2
|
+
"Breadcrumb Item 1",
|
3
|
+
"Breadcrumb Item 2 with a really long, long, long name",
|
4
|
+
"Breadcrumb Item 3 with an extremely long, long, long name"
|
5
|
+
] %>
|
6
|
+
|
7
|
+
<%= render(Primer::Beta::Breadcrumbs.new) do |breadcrumbs| %>
|
8
|
+
<% texts.each_with_index do |text, i| %>
|
9
|
+
<% breadcrumbs.with_item(href: "##{i}") do %>
|
10
|
+
<%= render(Primer::Beta::Truncate.new) do |truncate| %>
|
11
|
+
<% truncate.with_item(max_width: 135) { text } %>
|
12
|
+
<% end %>
|
13
|
+
<% end %>
|
14
|
+
<% end %>
|
15
|
+
<% end %>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<%# erblint:counter DeprecatedComponentsCounter 1 %>
|
2
|
+
<% texts = [
|
3
|
+
"Breadcrumb Item 1",
|
4
|
+
"Breadcrumb Item 2 with a really long, long, long name",
|
5
|
+
"Breadcrumb Item 3 with an extremely long, long, long name"
|
6
|
+
] %>
|
7
|
+
|
8
|
+
<%= render(Primer::Beta::Breadcrumbs.new) do |breadcrumbs| %>
|
9
|
+
<% texts.each_with_index do |text, i| %>
|
10
|
+
<% breadcrumbs.with_item(href: "##{i}") do %>
|
11
|
+
<%= render(Primer::Truncate.new(inline: true, max_width: 135)) { text } %>
|
12
|
+
<% end %>
|
13
|
+
<% end %>
|
14
|
+
<% end %>
|
@@ -26,6 +26,18 @@ module Primer
|
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
29
|
+
|
30
|
+
# @label WithBetaTruncate
|
31
|
+
# @snapshot
|
32
|
+
def with_beta_truncate
|
33
|
+
render_with_template
|
34
|
+
end
|
35
|
+
|
36
|
+
# @label WithDeprecatedTruncate
|
37
|
+
# @snapshot
|
38
|
+
def with_deprecated_truncate
|
39
|
+
render_with_template
|
40
|
+
end
|
29
41
|
end
|
30
42
|
end
|
31
43
|
end
|
data/static/classes.json
CHANGED
@@ -429,7 +429,7 @@
|
|
429
429
|
"PageHeader": [
|
430
430
|
"Primer::OpenProject::PageHeader"
|
431
431
|
],
|
432
|
-
"PageHeader--
|
432
|
+
"PageHeader--withTabNav": [
|
433
433
|
"Primer::OpenProject::PageHeader"
|
434
434
|
],
|
435
435
|
"PageHeader-actions": [
|
@@ -450,9 +450,6 @@
|
|
450
450
|
"PageHeader-parentLink": [
|
451
451
|
"Primer::OpenProject::PageHeader"
|
452
452
|
],
|
453
|
-
"PageHeader-tabNav": [
|
454
|
-
"Primer::OpenProject::PageHeader"
|
455
|
-
],
|
456
453
|
"PageHeader-title": [
|
457
454
|
"Primer::OpenProject::PageHeader"
|
458
455
|
],
|
data/static/info_arch.json
CHANGED
@@ -10921,6 +10921,32 @@
|
|
10921
10921
|
"color-contrast"
|
10922
10922
|
]
|
10923
10923
|
}
|
10924
|
+
},
|
10925
|
+
{
|
10926
|
+
"preview_path": "primer/beta/breadcrumbs/with_beta_truncate",
|
10927
|
+
"name": "with_beta_truncate",
|
10928
|
+
"snapshot": "true",
|
10929
|
+
"skip_rules": {
|
10930
|
+
"wont_fix": [
|
10931
|
+
"region"
|
10932
|
+
],
|
10933
|
+
"will_fix": [
|
10934
|
+
"color-contrast"
|
10935
|
+
]
|
10936
|
+
}
|
10937
|
+
},
|
10938
|
+
{
|
10939
|
+
"preview_path": "primer/beta/breadcrumbs/with_deprecated_truncate",
|
10940
|
+
"name": "with_deprecated_truncate",
|
10941
|
+
"snapshot": "true",
|
10942
|
+
"skip_rules": {
|
10943
|
+
"wont_fix": [
|
10944
|
+
"region"
|
10945
|
+
],
|
10946
|
+
"will_fix": [
|
10947
|
+
"color-contrast"
|
10948
|
+
]
|
10949
|
+
}
|
10924
10950
|
}
|
10925
10951
|
],
|
10926
10952
|
"subcomponents": [
|
data/static/previews.json
CHANGED
@@ -2058,6 +2058,32 @@
|
|
2058
2058
|
"color-contrast"
|
2059
2059
|
]
|
2060
2060
|
}
|
2061
|
+
},
|
2062
|
+
{
|
2063
|
+
"preview_path": "primer/beta/breadcrumbs/with_beta_truncate",
|
2064
|
+
"name": "with_beta_truncate",
|
2065
|
+
"snapshot": "true",
|
2066
|
+
"skip_rules": {
|
2067
|
+
"wont_fix": [
|
2068
|
+
"region"
|
2069
|
+
],
|
2070
|
+
"will_fix": [
|
2071
|
+
"color-contrast"
|
2072
|
+
]
|
2073
|
+
}
|
2074
|
+
},
|
2075
|
+
{
|
2076
|
+
"preview_path": "primer/beta/breadcrumbs/with_deprecated_truncate",
|
2077
|
+
"name": "with_deprecated_truncate",
|
2078
|
+
"snapshot": "true",
|
2079
|
+
"skip_rules": {
|
2080
|
+
"wont_fix": [
|
2081
|
+
"region"
|
2082
|
+
],
|
2083
|
+
"will_fix": [
|
2084
|
+
"color-contrast"
|
2085
|
+
]
|
2086
|
+
}
|
2061
2087
|
}
|
2062
2088
|
]
|
2063
2089
|
},
|
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.33.
|
4
|
+
version: 0.33.2
|
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-06-
|
12
|
+
date: 2024-06-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionview
|
@@ -867,6 +867,8 @@ files:
|
|
867
867
|
- previews/primer/beta/blankslate_preview/inside_flex_container.html.erb
|
868
868
|
- previews/primer/beta/border_box_preview.rb
|
869
869
|
- previews/primer/beta/breadcrumbs_preview.rb
|
870
|
+
- previews/primer/beta/breadcrumbs_preview/with_beta_truncate.html.erb
|
871
|
+
- previews/primer/beta/breadcrumbs_preview/with_deprecated_truncate.html.erb
|
870
872
|
- previews/primer/beta/button_group_preview.rb
|
871
873
|
- previews/primer/beta/button_group_preview/with_menu_button.html.erb
|
872
874
|
- previews/primer/beta/button_preview.rb
|