@primer/view-components 0.23.0 → 0.24.0-rc.293e3bae
Sign up to get free protection for your applications and to get access to all the features.
- package/app/assets/javascripts/primer_view_components.js +1 -1
- package/app/assets/javascripts/primer_view_components.js.map +1 -1
- package/app/assets/styles/primer_view_components.css +1 -1
- package/app/assets/styles/primer_view_components.css.map +1 -1
- package/app/components/primer/alpha/overlay.css +1 -1
- package/app/components/primer/alpha/overlay.css.json +4 -1
- package/app/components/primer/alpha/tab_nav.css +1 -1
- package/app/components/primer/alpha/tab_nav.css.json +2 -0
- package/app/components/primer/alpha/underline_nav.css +1 -1
- package/app/components/primer/alpha/underline_nav.css.json +2 -0
- package/app/components/primer/alpha/underline_panels.css +1 -0
- package/app/components/primer/alpha/underline_panels.css.json +6 -0
- package/app/components/primer/anchored_position.js +2 -0
- package/package.json +2 -2
- package/static/arguments.json +6 -12
- package/static/classes.json +6 -0
- package/static/info_arch.json +34 -14
- package/static/previews.json +13 -0
@@ -1 +1 @@
|
|
1
|
-
anchored-position[popover]{border-width:0;min-width:192px;overflow:visible;padding:0;position:absolute}anchored-position:not(.Overlay){background:none}.Overlay[popover]:not(:popover-open){display:none}anchored-position.not-anchored::backdrop,dialog::backdrop{background-color:var(--overlay-backdrop-bgColor,var(--color-neutral-muted))}@media (forced-colors:active){.Overlay{outline:1px solid #0000}}
|
1
|
+
anchored-position[popover]{border-width:0;min-width:192px;overflow:visible;padding:0;position:absolute}anchored-position:not(.Overlay){background:none}.Overlay[popover]:not(:popover-open){display:none}anchored-position.not-anchored::backdrop,dialog::backdrop{background-color:var(--overlay-backdrop-bgColor,var(--color-neutral-muted))}@media (forced-colors:active){.Overlay{outline:1px solid #0000}}.Overlay-tabPanels{display:flex;flex-direction:column;overflow-y:hidden}.Overlay-tabPanels::part(tablist-wrapper){margin:var(--base-size-8) 0;padding:0 var(--base-size-8)}.Overlay-tabPanel{display:flex;overflow:hidden}
|
@@ -1 +1 @@
|
|
1
|
-
.tabnav{border-bottom:var(--borderWidth-thin) solid var(--borderColor-default);margin-bottom:var(--stack-gap-normal);margin-top:0}.tabnav-tabs{display:flex;margin-bottom:calc(var(--borderWidth-thin)*-1);overflow:auto}.tabnav-tab{background-color:initial;border:var(--borderWidth-thin) solid #0000;border-bottom:0;color:var(--fgColor-muted);display:inline-block;flex-shrink:0;font-size:var(--text-body-size-medium);line-height:23px;padding:var(--base-size-8) var(--control-medium-paddingInline-spacious);-webkit-text-decoration:none;text-decoration:none;transition:color .2s cubic-bezier(.3,0,.5,1)}.tabnav-tab.selected,.tabnav-tab[aria-current]:not([aria-current=false]),.tabnav-tab[aria-selected=true]{background-color:var(--bgColor-default);border-color:var(--borderColor-default);border-radius:var(--borderRadius-medium) var(--borderRadius-medium) 0 0;color:var(--fgColor-default)}.tabnav-tab.selected .octicon,.tabnav-tab[aria-current]:not([aria-current=false]) .octicon,.tabnav-tab[aria-selected=true] .octicon{color:inherit}.tabnav-tab:hover{color:var(--fgColor-default);-webkit-text-decoration:none;text-decoration:none;transition-duration:.1s}.tabnav-tab:focus,.tabnav-tab:focus-visible{border-radius:var(--borderRadius-medium) var(--borderRadius-medium) 0 0!important;outline-offset:-6px}.tabnav-tab .octicon,.tabnav-tab:active{color:var(--fgColor-muted)}.tabnav-tab .octicon{margin-right:var(--control-small-gap)}.tabnav-tab .Counter{color:inherit;margin-left:var(--control-small-gap)}.tabnav-extra{color:var(--fgColor-muted);display:inline-block;font-size:var(--text-body-size-small);margin-left:10px;padding-top:10px}.tabnav-extra>.octicon{margin-right:2px}a.tabnav-extra:hover{color:var(--fgColor-accent);-webkit-text-decoration:none;text-decoration:none}.tabnav-btn{margin-left:var(--controlStack-medium-gap-condensed)}
|
1
|
+
.tabnav{border-bottom:var(--borderWidth-thin) solid var(--borderColor-default);margin-bottom:var(--stack-gap-normal);margin-top:0}.tabnav-tabs{display:flex;margin-bottom:calc(var(--borderWidth-thin)*-1);overflow:auto}.tabnav::part(tablist-wrapper){border-bottom:var(--borderWidth-thin) solid var(--borderColor-default);margin-bottom:var(--stack-gap-normal)}.tabnav-tab{background-color:initial;border:var(--borderWidth-thin) solid #0000;border-bottom:0;color:var(--fgColor-muted);display:inline-block;flex-shrink:0;font-size:var(--text-body-size-medium);line-height:23px;padding:var(--base-size-8) var(--control-medium-paddingInline-spacious);-webkit-text-decoration:none;text-decoration:none;transition:color .2s cubic-bezier(.3,0,.5,1)}.tabnav-tab.selected,.tabnav-tab[aria-current]:not([aria-current=false]),.tabnav-tab[aria-selected=true]{background-color:var(--bgColor-default);border-color:var(--borderColor-default);border-radius:var(--borderRadius-medium) var(--borderRadius-medium) 0 0;color:var(--fgColor-default)}.tabnav-tab.selected .octicon,.tabnav-tab[aria-current]:not([aria-current=false]) .octicon,.tabnav-tab[aria-selected=true] .octicon{color:inherit}.tabnav-tab:hover{color:var(--fgColor-default);-webkit-text-decoration:none;text-decoration:none;transition-duration:.1s}.tabnav-tab:focus,.tabnav-tab:focus-visible{border-radius:var(--borderRadius-medium) var(--borderRadius-medium) 0 0!important;outline-offset:-6px}.tabnav-tab .octicon,.tabnav-tab:active{color:var(--fgColor-muted)}.tabnav-tab .octicon{margin-right:var(--control-small-gap)}.tabnav-tab .Counter{color:inherit;margin-left:var(--control-small-gap)}tab-container .tabnav-tab{margin-bottom:-1px}.tabnav-extra{color:var(--fgColor-muted);display:inline-block;font-size:var(--text-body-size-small);margin-left:10px;padding-top:10px}.tabnav-extra>.octicon{margin-right:2px}a.tabnav-extra:hover{color:var(--fgColor-accent);-webkit-text-decoration:none;text-decoration:none}.tabnav-btn{margin-left:var(--controlStack-medium-gap-condensed)}
|
@@ -3,6 +3,7 @@
|
|
3
3
|
"selectors": [
|
4
4
|
".tabnav",
|
5
5
|
".tabnav-tabs",
|
6
|
+
".tabnav::part(tablist-wrapper)",
|
6
7
|
".tabnav-tab",
|
7
8
|
".tabnav-tab.selected",
|
8
9
|
".tabnav-tab[aria-current]:not([aria-current=false])",
|
@@ -16,6 +17,7 @@
|
|
16
17
|
".tabnav-tab .octicon",
|
17
18
|
".tabnav-tab:active",
|
18
19
|
".tabnav-tab .Counter",
|
20
|
+
"tab-container .tabnav-tab",
|
19
21
|
".tabnav-extra",
|
20
22
|
".tabnav-extra>.octicon",
|
21
23
|
"a.tabnav-extra:hover",
|
@@ -1 +1 @@
|
|
1
|
-
.UnderlineNav{box-shadow:inset 0 -1px 0 var(--borderColor-muted);display:flex;min-height:var(--base-size-48);overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:auto;justify-content:space-between}.UnderlineNav .Counter{background-color:var(--bgColor-neutral-muted,var(--color-neutral-muted));color:var(--fgColor-default);margin-left:var(--control-medium-gap)}.UnderlineNav .Counter--primary{background-color:var(--bgColor-neutral-emphasis);color:var(--fgColor-onEmphasis)}.UnderlineNav-body{align-items:center;display:flex;gap:var(--control-medium-gap);list-style:none}.UnderlineNav-item{align-items:center;background-color:initial;border:0;border-radius:var(--borderRadius-medium);color:var(--fgColor-default);cursor:pointer;display:flex;font-size:var(--text-body-size-medium);line-height:30px;padding:0 var(--control-medium-paddingInline-condensed);position:relative;text-align:center;white-space:nowrap}.UnderlineNav-item:focus,.UnderlineNav-item:focus-visible,.UnderlineNav-item:hover{border-bottom-color:var(--borderColor-neutral-muted);color:var(--fgColor-default);outline-offset:-2px;-webkit-text-decoration:none;text-decoration:none;transition:border-bottom-color .12s ease-out}.UnderlineNav-item [data-content]:before{content:attr(data-content);display:block;font-weight:var(--base-text-weight-semibold);height:0;visibility:hidden}.UnderlineNav-item:before{content:"";height:100%;left:50%;min-height:48px;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%);width:100%}@media (pointer:fine){.UnderlineNav-item:hover{background:var(--control-transparent-bgColor-hover);color:var(--fgColor-default);-webkit-text-decoration:none;text-decoration:none;transition:background .12s ease-out}}.UnderlineNav-item.selected,.UnderlineNav-item[aria-current]:not([aria-current=false]),.UnderlineNav-item[role=tab][aria-selected=true]{border-bottom-color:var(--underlineNav-borderColor-active);color:var(--fgColor-default);font-weight:var(--base-text-weight-semibold)}.UnderlineNav-item.selected:after,.UnderlineNav-item[aria-current]:not([aria-current=false]):after,.UnderlineNav-item[role=tab][aria-selected=true]:after{background:var(--underlineNav-borderColor-active);border-radius:var(--borderRadius-medium);bottom:calc(50% - 25px);content:"";height:2px;position:absolute;right:50%;transform:translate(50%,-50%);width:100%;z-index:1}.UnderlineNav--right{justify-content:flex-end}.UnderlineNav--right .UnderlineNav-actions{flex:1 1 auto}.UnderlineNav-actions{align-self:center}.UnderlineNav--full{display:block}.UnderlineNav--full .UnderlineNav-body{min-height:var(--base-size-48)}.UnderlineNav-octicon{color:var(--fgColor-muted);display:inline!important;margin-right:var(--control-medium-gap);fill:var(--fgColor-muted)}.UnderlineNav-container{display:flex;justify-content:space-between}
|
1
|
+
.UnderlineNav{box-shadow:inset 0 -1px 0 var(--borderColor-muted);display:flex;min-height:var(--base-size-48);overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:auto;justify-content:space-between}.UnderlineNav .Counter{background-color:var(--bgColor-neutral-muted,var(--color-neutral-muted));color:var(--fgColor-default);margin-left:var(--control-medium-gap)}.UnderlineNav .Counter--primary{background-color:var(--bgColor-neutral-emphasis);color:var(--fgColor-onEmphasis)}.UnderlineNav::part(tablist-wrapper){box-shadow:inset 0 -1px 0 var(--borderColor-muted);padding:var(--control-medium-gap) 0;width:100%}.UnderlineNav-body,.UnderlineNav::part(tablist){align-items:center;display:flex;gap:var(--control-medium-gap);list-style:none}.UnderlineNav-item{align-items:center;background-color:initial;border:0;border-radius:var(--borderRadius-medium);color:var(--fgColor-default);cursor:pointer;display:flex;font-size:var(--text-body-size-medium);line-height:30px;padding:0 var(--control-medium-paddingInline-condensed);position:relative;text-align:center;white-space:nowrap}.UnderlineNav-item:focus,.UnderlineNav-item:focus-visible,.UnderlineNav-item:hover{border-bottom-color:var(--borderColor-neutral-muted);color:var(--fgColor-default);outline-offset:-2px;-webkit-text-decoration:none;text-decoration:none;transition:border-bottom-color .12s ease-out}.UnderlineNav-item [data-content]:before{content:attr(data-content);display:block;font-weight:var(--base-text-weight-semibold);height:0;visibility:hidden}.UnderlineNav-item:before{content:"";height:100%;left:50%;min-height:48px;position:absolute;top:50%;transform:translateX(-50%) translateY(-50%);width:100%}@media (pointer:fine){.UnderlineNav-item:hover{background:var(--control-transparent-bgColor-hover);color:var(--fgColor-default);-webkit-text-decoration:none;text-decoration:none;transition:background .12s ease-out}}.UnderlineNav-item.selected,.UnderlineNav-item[aria-current]:not([aria-current=false]),.UnderlineNav-item[role=tab][aria-selected=true]{border-bottom-color:var(--underlineNav-borderColor-active);color:var(--fgColor-default);font-weight:var(--base-text-weight-semibold)}.UnderlineNav-item.selected:after,.UnderlineNav-item[aria-current]:not([aria-current=false]):after,.UnderlineNav-item[role=tab][aria-selected=true]:after{background:var(--underlineNav-borderColor-active);border-radius:var(--borderRadius-medium);bottom:calc(50% - 25px);content:"";height:2px;position:absolute;right:50%;transform:translate(50%,-50%);width:100%;z-index:1}.UnderlineNav--right{justify-content:flex-end}.UnderlineNav--right .UnderlineNav-actions{flex:1 1 auto}.UnderlineNav-actions{align-self:center}.UnderlineNav--full{display:block}.UnderlineNav--full .UnderlineNav-body{min-height:var(--base-size-48)}.UnderlineNav-octicon{color:var(--fgColor-muted);display:inline!important;margin-right:var(--control-medium-gap);fill:var(--fgColor-muted)}.UnderlineNav-container{display:flex;justify-content:space-between}
|
@@ -4,7 +4,9 @@
|
|
4
4
|
".UnderlineNav",
|
5
5
|
".UnderlineNav .Counter",
|
6
6
|
".UnderlineNav .Counter--primary",
|
7
|
+
".UnderlineNav::part(tablist-wrapper)",
|
7
8
|
".UnderlineNav-body",
|
9
|
+
".UnderlineNav::part(tablist)",
|
8
10
|
".UnderlineNav-item",
|
9
11
|
".UnderlineNav-item:focus",
|
10
12
|
".UnderlineNav-item:focus-visible",
|
@@ -0,0 +1 @@
|
|
1
|
+
tab-container.UnderlineNav{box-shadow:none;flex-direction:column}
|
@@ -23,6 +23,8 @@ const updateWhenVisible = (() => {
|
|
23
23
|
return (el) => {
|
24
24
|
// eslint-disable-next-line github/prefer-observers
|
25
25
|
window.addEventListener('resize', updateVisibleAnchors);
|
26
|
+
// eslint-disable-next-line github/prefer-observers
|
27
|
+
window.addEventListener('scroll', updateVisibleAnchors);
|
26
28
|
intersectionObserver || (intersectionObserver = new IntersectionObserver(entries => {
|
27
29
|
for (const entry of entries) {
|
28
30
|
const target = entry.target;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@primer/view-components",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.24.0-rc.293e3bae",
|
4
4
|
"description": "ViewComponents for the Primer Design System",
|
5
5
|
"main": "app/assets/javascripts/primer_view_components.js",
|
6
6
|
"module": "app/components/primer/primer.js",
|
@@ -50,7 +50,7 @@
|
|
50
50
|
"@github/image-crop-element": "^5.0.0",
|
51
51
|
"@github/include-fragment-element": "^6.1.1",
|
52
52
|
"@github/relative-time-element": "^4.0.0",
|
53
|
-
"@github/tab-container-element": "^
|
53
|
+
"@github/tab-container-element": "^4.5.0",
|
54
54
|
"@oddbird/popover-polyfill": "^0.4.0",
|
55
55
|
"@primer/behaviors": "^1.3.4"
|
56
56
|
},
|
package/static/arguments.json
CHANGED
@@ -1866,6 +1866,12 @@
|
|
1866
1866
|
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/overlay/body.rb",
|
1867
1867
|
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/overlay/body/default/",
|
1868
1868
|
"parameters": [
|
1869
|
+
{
|
1870
|
+
"name": "tab_arguments",
|
1871
|
+
"type": "Hash",
|
1872
|
+
"default": "`{}`",
|
1873
|
+
"description": "Arguments passed to TabPanels component"
|
1874
|
+
},
|
1869
1875
|
{
|
1870
1876
|
"name": "system_arguments",
|
1871
1877
|
"type": "Hash",
|
@@ -2462,18 +2468,6 @@
|
|
2462
2468
|
"default": "N/A",
|
2463
2469
|
"description": "One of `:left` or `:right`. - Defaults to left"
|
2464
2470
|
},
|
2465
|
-
{
|
2466
|
-
"name": "body_arguments",
|
2467
|
-
"type": "Hash",
|
2468
|
-
"default": "`{}`",
|
2469
|
-
"description": "[System arguments](/system-arguments) for the body wrapper."
|
2470
|
-
},
|
2471
|
-
{
|
2472
|
-
"name": "wrapper_arguments",
|
2473
|
-
"type": "Hash",
|
2474
|
-
"default": "`{}`",
|
2475
|
-
"description": "[System arguments](/system-arguments) for the `TabContainer` wrapper."
|
2476
|
-
},
|
2477
2471
|
{
|
2478
2472
|
"name": "system_arguments",
|
2479
2473
|
"type": "Hash",
|
package/static/classes.json
CHANGED
package/static/info_arch.json
CHANGED
@@ -5951,8 +5951,8 @@
|
|
5951
5951
|
]
|
5952
5952
|
},
|
5953
5953
|
{
|
5954
|
-
"name": "
|
5955
|
-
"description": "Required body content.",
|
5954
|
+
"name": "bodies",
|
5955
|
+
"description": "Required body content.\nwhen multiple bodies are passed, they will be rendered in a TabPanels component.",
|
5956
5956
|
"parameters": [
|
5957
5957
|
{
|
5958
5958
|
"name": "padding",
|
@@ -6094,6 +6094,19 @@
|
|
6094
6094
|
"color-contrast"
|
6095
6095
|
]
|
6096
6096
|
}
|
6097
|
+
},
|
6098
|
+
{
|
6099
|
+
"preview_path": "primer/alpha/overlay/overlay_with_three_bodies",
|
6100
|
+
"name": "overlay_with_three_bodies",
|
6101
|
+
"snapshot": "false",
|
6102
|
+
"skip_rules": {
|
6103
|
+
"wont_fix": [
|
6104
|
+
"region"
|
6105
|
+
],
|
6106
|
+
"will_fix": [
|
6107
|
+
"color-contrast"
|
6108
|
+
]
|
6109
|
+
}
|
6097
6110
|
}
|
6098
6111
|
],
|
6099
6112
|
"subcomponents": [
|
@@ -6238,6 +6251,12 @@
|
|
6238
6251
|
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/alpha/overlay/body.rb",
|
6239
6252
|
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/overlay/body/default/",
|
6240
6253
|
"parameters": [
|
6254
|
+
{
|
6255
|
+
"name": "tab_arguments",
|
6256
|
+
"type": "Hash",
|
6257
|
+
"default": "`{}`",
|
6258
|
+
"description": "Arguments passed to TabPanels component"
|
6259
|
+
},
|
6241
6260
|
{
|
6242
6261
|
"name": "system_arguments",
|
6243
6262
|
"type": "Hash",
|
@@ -6249,7 +6268,20 @@
|
|
6249
6268
|
|
6250
6269
|
],
|
6251
6270
|
"methods": [
|
6271
|
+
{
|
6272
|
+
"name": "tab_arguments",
|
6273
|
+
"description": "Returns the value of attribute tab_arguments.",
|
6274
|
+
"parameters": [
|
6252
6275
|
|
6276
|
+
]
|
6277
|
+
},
|
6278
|
+
{
|
6279
|
+
"name": "tab_label",
|
6280
|
+
"description": "Returns the value of attribute tab_label.",
|
6281
|
+
"parameters": [
|
6282
|
+
|
6283
|
+
]
|
6284
|
+
}
|
6253
6285
|
],
|
6254
6286
|
"previews": [
|
6255
6287
|
|
@@ -7541,18 +7573,6 @@
|
|
7541
7573
|
"default": "N/A",
|
7542
7574
|
"description": "One of `:left` or `:right`. - Defaults to left"
|
7543
7575
|
},
|
7544
|
-
{
|
7545
|
-
"name": "body_arguments",
|
7546
|
-
"type": "Hash",
|
7547
|
-
"default": "`{}`",
|
7548
|
-
"description": "{{link_to_system_arguments_docs}} for the body wrapper."
|
7549
|
-
},
|
7550
|
-
{
|
7551
|
-
"name": "wrapper_arguments",
|
7552
|
-
"type": "Hash",
|
7553
|
-
"default": "`{}`",
|
7554
|
-
"description": "{{link_to_system_arguments_docs}} for the `TabContainer` wrapper."
|
7555
|
-
},
|
7556
7576
|
{
|
7557
7577
|
"name": "system_arguments",
|
7558
7578
|
"type": "Hash",
|
package/static/previews.json
CHANGED
@@ -4926,6 +4926,19 @@
|
|
4926
4926
|
"color-contrast"
|
4927
4927
|
]
|
4928
4928
|
}
|
4929
|
+
},
|
4930
|
+
{
|
4931
|
+
"preview_path": "primer/alpha/overlay/overlay_with_three_bodies",
|
4932
|
+
"name": "overlay_with_three_bodies",
|
4933
|
+
"snapshot": "false",
|
4934
|
+
"skip_rules": {
|
4935
|
+
"wont_fix": [
|
4936
|
+
"region"
|
4937
|
+
],
|
4938
|
+
"will_fix": [
|
4939
|
+
"color-contrast"
|
4940
|
+
]
|
4941
|
+
}
|
4929
4942
|
}
|
4930
4943
|
]
|
4931
4944
|
},
|