@primer/view-components 0.45.1-rc.015a120e → 0.45.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/app/assets/styles/primer_view_components.css +6963 -1
  2. package/app/assets/styles/primer_view_components.css.map +1 -1
  3. package/app/components/primer/alpha/action_bar.css +49 -1
  4. package/app/components/primer/alpha/action_list.css +525 -1
  5. package/app/components/primer/alpha/action_list.css.json +64 -64
  6. package/app/components/primer/alpha/auto_complete.css +131 -1
  7. package/app/components/primer/alpha/auto_complete.css.json +3 -3
  8. package/app/components/primer/alpha/banner.css +146 -1
  9. package/app/components/primer/alpha/banner.css.json +2 -2
  10. package/app/components/primer/alpha/button_marketing.css +183 -1
  11. package/app/components/primer/alpha/button_marketing.css.json +6 -6
  12. package/app/components/primer/alpha/dialog.css +377 -1
  13. package/app/components/primer/alpha/dialog.css.json +2 -2
  14. package/app/components/primer/alpha/dropdown.css +296 -1
  15. package/app/components/primer/alpha/dropdown.css.json +19 -19
  16. package/app/components/primer/alpha/layout.css +374 -1
  17. package/app/components/primer/alpha/layout.css.json +10 -10
  18. package/app/components/primer/alpha/menu.css +124 -1
  19. package/app/components/primer/alpha/menu.css.json +5 -5
  20. package/app/components/primer/alpha/overlay.css +25 -1
  21. package/app/components/primer/alpha/segmented_control.css +161 -1
  22. package/app/components/primer/alpha/segmented_control.css.json +5 -5
  23. package/app/components/primer/alpha/select_panel.css +10 -1
  24. package/app/components/primer/alpha/skeleton_box.css +36 -1
  25. package/app/components/primer/alpha/stack.css +255 -1
  26. package/app/components/primer/alpha/stack.css.json +84 -84
  27. package/app/components/primer/alpha/stack_item.css +27 -1
  28. package/app/components/primer/alpha/stack_item.css.json +6 -6
  29. package/app/components/primer/alpha/tab_nav.css +112 -1
  30. package/app/components/primer/alpha/tab_nav.css.json +5 -5
  31. package/app/components/primer/alpha/text_field.css +792 -1
  32. package/app/components/primer/alpha/text_field.css.json +39 -39
  33. package/app/components/primer/alpha/toggle_switch.css +230 -1
  34. package/app/components/primer/alpha/toggle_switch.css.json +10 -10
  35. package/app/components/primer/alpha/tree_view.css +396 -1
  36. package/app/components/primer/alpha/tree_view.css.json +25 -25
  37. package/app/components/primer/alpha/underline_nav.css +150 -1
  38. package/app/components/primer/alpha/underline_nav.css.json +6 -6
  39. package/app/components/primer/beta/avatar.css +77 -1
  40. package/app/components/primer/beta/avatar_stack.css +134 -1
  41. package/app/components/primer/beta/avatar_stack.css.json +6 -7
  42. package/app/components/primer/beta/blankslate.css +168 -1
  43. package/app/components/primer/beta/border_box.css +218 -1
  44. package/app/components/primer/beta/border_box.css.json +3 -3
  45. package/app/components/primer/beta/breadcrumbs.css +29 -1
  46. package/app/components/primer/beta/breadcrumbs.css.json +2 -2
  47. package/app/components/primer/beta/button.css +359 -1
  48. package/app/components/primer/beta/button.css.json +17 -17
  49. package/app/components/primer/beta/button_group.css +20 -1
  50. package/app/components/primer/beta/button_group.css.json +3 -3
  51. package/app/components/primer/beta/counter.css +38 -1
  52. package/app/components/primer/beta/flash.css +152 -1
  53. package/app/components/primer/beta/label.css +109 -1
  54. package/app/components/primer/beta/label.css.json +3 -3
  55. package/app/components/primer/beta/link.css +79 -1
  56. package/app/components/primer/beta/link.css.json +1 -1
  57. package/app/components/primer/beta/popover.css +215 -1
  58. package/app/components/primer/beta/popover.css.json +23 -23
  59. package/app/components/primer/beta/progress_bar.css +38 -1
  60. package/app/components/primer/beta/progress_bar.css.json +1 -1
  61. package/app/components/primer/beta/state.css +60 -1
  62. package/app/components/primer/beta/state.css.json +1 -1
  63. package/app/components/primer/beta/subhead.css +64 -1
  64. package/app/components/primer/beta/subhead.css.json +1 -1
  65. package/app/components/primer/beta/timeline_item.css +106 -1
  66. package/app/components/primer/beta/timeline_item.css.json +1 -1
  67. package/app/components/primer/beta/truncate.css +30 -1
  68. package/app/components/primer/beta/truncate.css.json +6 -6
  69. package/app/components/primer/truncate.css +23 -1
  70. package/app/components/primer/truncate.css.json +4 -4
  71. package/package.json +1 -1
@@ -1 +1,49 @@
1
- .ActionBar{align-items:center;box-sizing:initial;display:flex!important;flex-grow:1;flex-shrink:1;justify-content:flex-end;min-width:calc(var(--control-medium-size)*3);overflow:hidden;position:relative}.ActionBar-item-container{box-sizing:initial;height:var(--control-medium-size);overflow:hidden}.ActionBar-item{float:left;position:relative}.ActionBar-more-menu{float:left}.ActionBar--small{min-width:calc(var(--control-small-size)*3)}.ActionBar--large{min-width:calc(var(--control-large-size)*3)}.ActionBar-divider{border-left:var(--borderWidth-thin) solid var(--borderColor-muted);bottom:50%;float:left;height:calc(var(--control-medium-size)/2);margin:0 var(--controlStack-medium-gap-condensed);top:50%;transform:translateY(-50%)}.ActionBar--small .ActionBar-divider{margin:0 var(--controlStack-small-gap-condensed)}.ActionBar--large .ActionBar-divider{margin:0 var(--controlStack-large-gap-condensed)}
1
+ /* CSS for ActionBar */
2
+ .ActionBar {
3
+ position: relative;
4
+ display: flex !important;
5
+ min-width: calc(var(--control-medium-size) * 3);
6
+ align-items: center;
7
+ flex-grow: 1;
8
+ flex-shrink: 1;
9
+ box-sizing: content-box;
10
+ overflow: hidden;
11
+ justify-content: flex-end;
12
+ }
13
+ .ActionBar-item-container {
14
+ height: var(--control-medium-size);
15
+ box-sizing: content-box;
16
+ overflow: hidden;
17
+ }
18
+ .ActionBar-item {
19
+ position: relative;
20
+ float: left;
21
+ }
22
+ .ActionBar-more-menu {
23
+ float: left;
24
+ }
25
+ .ActionBar--small {
26
+ min-width: calc(var(--control-small-size) * 3);
27
+ }
28
+ .ActionBar--large {
29
+ min-width: calc(var(--control-large-size) * 3);
30
+ }
31
+ /* Divider */
32
+ .ActionBar-divider {
33
+ top: 50%;
34
+ bottom: 50%;
35
+ float: left;
36
+ height: calc(var(--control-medium-size) / 2);
37
+ /* stylelint-disable-next-line primer/spacing */
38
+ margin: 0 var(--controlStack-medium-gap-condensed);
39
+ border-left: var(--borderWidth-thin) solid var(--borderColor-muted);
40
+ transform: translateY(-50%);
41
+ }
42
+ .ActionBar--small .ActionBar-divider {
43
+ /* stylelint-disable-next-line primer/spacing */
44
+ margin: 0 var(--controlStack-small-gap-condensed);
45
+ }
46
+ .ActionBar--large .ActionBar-divider {
47
+ /* stylelint-disable-next-line primer/spacing */
48
+ margin: 0 var(--controlStack-large-gap-condensed);
49
+ }
@@ -1 +1,525 @@
1
- :root{--actionListContent-paddingBlock:var(--control-medium-paddingBlock)}action-list,nav-list{display:block}.ActionListHeader{margin-bottom:var(--base-size-16);margin-left:var(--base-size-8)}.ActionListWrap{list-style:none}.ActionListWrap--inset,.ActionListWrap--inset[popover]{padding:var(--base-size-8)}.ActionListWrap--divided .ActionListItem-label:before{height:1px}.ActionListWrap--divided .ActionListItem-label:before,:is(.ActionListWrap--divided .ActionListItem-descriptionWrap--inline):before{background:var(--borderColor-muted);content:"";display:block;position:absolute;top:calc(var(--actionListContent-paddingBlock)*-1);width:100%}:is(.ActionListWrap--divided .ActionListItem-descriptionWrap--inline):before{height:var(--borderWidth-thin)}:is(.ActionListWrap--divided .ActionListItem-descriptionWrap--inline) .ActionListItem-label:before{content:unset}.ActionList-sectionDivider+.ActionListItem .ActionListItem-descriptionWrap--inline:before,.ActionList-sectionDivider+.ActionListItem .ActionListItem-label:before,.ActionListItem:first-of-type .ActionListItem-descriptionWrap--inline:before,.ActionListItem:first-of-type .ActionListItem-label:before,:is(.ActionListWrap--divided .ActionListItem--navActive) .ActionListItem-label:before,:is(.ActionListWrap--divided .ActionListItem--navActive)+.ActionListItem .ActionListItem-label:before{visibility:hidden}.ActionListItem{background-color:var(--control-transparent-bgColor-rest);border-radius:var(--borderRadius-medium);list-style:none;position:relative}.ActionListItem:active,.ActionListItem:hover{cursor:pointer}@media (hover:hover){.ActionListItem:hover .ActionListItem-descriptionWrap--inline:before,.ActionListItem:hover .ActionListItem-label:before,.ActionListItem:hover+.ActionListItem .ActionListItem-descriptionWrap--inline:before,.ActionListItem:hover+.ActionListItem .ActionListItem-label:before{visibility:hidden}}.ActionListItem[hidden]+.ActionList-sectionDivider{display:none}.ActionListItem.ActionListItem--hasSubItem>.ActionListContent{z-index:1}@media (hover:hover){:is(.ActionListItem.ActionListItem--hasSubItem>.ActionListContent):hover{background-color:var(--control-transparent-bgColor-hover)}}:is(.ActionListItem.ActionListItem--hasSubItem>.ActionListContent):active{background-color:var(--control-transparent-bgColor-active)}@media (hover:hover){:is(.ActionListItem:not(.ActionListItem--hasSubItem),.ActionListItem.ActionListItem--hasSubItem>.ActionListContent):hover{background-color:var(--control-transparent-bgColor-hover);cursor:pointer}:is(.ActionListItem:not(.ActionListItem--hasSubItem),.ActionListItem.ActionListItem--hasSubItem>.ActionListContent):hover:not(.ActionListItem--navActive,:focus-visible){box-shadow:var(--boxShadow-thin) var(--control-transparent-borderColor-active);outline:solid var(--borderWidth-thin) #0000;outline-offset:calc(var(--borderWidth-thin)*-1)}}:is(.ActionListItem:not(.ActionListItem--hasSubItem),.ActionListItem.ActionListItem--hasSubItem>.ActionListContent):active{background:var(--control-transparent-bgColor-active)}:is(.ActionListItem:not(.ActionListItem--hasSubItem),.ActionListItem.ActionListItem--hasSubItem>.ActionListContent):active:not(.ActionListItem--navActive){box-shadow:var(--boxShadow-thin) var(--control-transparent-borderColor-active);outline:solid var(--borderWidth-thin) #0000;outline-offset:calc(var(--borderWidth-thin)*-1)}:is(.ActionListItem:not(.ActionListItem--hasSubItem),.ActionListItem.ActionListItem--hasSubItem>.ActionListContent):active .ActionListItem-label:before,:is(.ActionListItem:not(.ActionListItem--hasSubItem),.ActionListItem.ActionListItem--hasSubItem>.ActionListContent):active+.ActionListItem .ActionListItem-label:before{visibility:hidden}.ActionListItem[aria-selected=true]{background:var(--control-transparent-bgColor-selected);font-weight:var(--base-text-weight-normal)}@media (hover:hover){.ActionListItem[aria-selected=true]:hover{background-color:var(--control-transparent-bgColor-hover)}}.ActionListItem[aria-selected=true]+.ActionListItem:before,.ActionListItem[aria-selected=true]:before{visibility:hidden}.ActionListItem[aria-selected=true]:after{background:var(--borderColor-accent-emphasis);border-radius:var(--borderRadius-medium);content:"";height:var(--base-size-24);left:calc(var(--base-size-4)*-1);position:absolute;top:calc(50% - 12px);width:var(--base-size-4)}.ActionListItem.ActionListItem--navActive{outline:2px solid #0000}.ActionListItem.ActionListItem--navActive:not(.ActionListItem--subItem) .ActionListItem-label{font-weight:var(--base-text-weight-semibold)}.ActionListItem.ActionListItem--navActive:not(.ActionListItem--danger){background:var(--control-transparent-bgColor-selected)}@media (hover:hover){.ActionListItem.ActionListItem--navActive:not(.ActionListItem--danger):hover{background-color:var(--control-transparent-bgColor-hover)}}.ActionListItem.ActionListItem--navActive:not(.ActionListItem--danger)+.ActionListItem:before,.ActionListItem.ActionListItem--navActive:not(.ActionListItem--danger):before{visibility:hidden}.ActionListItem.ActionListItem--navActive:not(.ActionListItem--danger):after{background:var(--borderColor-accent-emphasis);border-radius:var(--borderRadius-medium);content:"";height:var(--base-size-24);left:calc(var(--base-size-8)*-1);position:absolute;top:calc(50% - 12px);width:var(--base-size-4)}:is(:is(.ActionListItem.ActionListItem--disabled,.ActionListItem[aria-disabled=true]) .ActionListContent) .ActionListItem-description,:is(:is(.ActionListItem.ActionListItem--disabled,.ActionListItem[aria-disabled=true]) .ActionListContent) .ActionListItem-label{color:var(--control-fgColor-disabled)}:is(:is(.ActionListItem.ActionListItem--disabled,.ActionListItem[aria-disabled=true]) .ActionListContent) .ActionListItem-visual{fill:var(--control-fgColor-disabled)}@media (hover:hover){:is(.ActionListItem.ActionListItem--disabled,.ActionListItem[aria-disabled=true]):hover{background-color:initial;cursor:not-allowed}}.ActionListItem.ActionListItem--danger .ActionListItem-label,.ActionListItem.ActionListItem--danger .ActionListItem-visual{color:var(--control-danger-fgColor-rest)}@media (hover:hover){.ActionListItem.ActionListItem--danger:hover{background:var(--control-danger-bgColor-hover)}.ActionListItem.ActionListItem--danger:hover .ActionListItem-description,.ActionListItem.ActionListItem--danger:hover .ActionListItem-label,.ActionListItem.ActionListItem--danger:hover .ActionListItem-visual{color:var(--control-danger-fgColor-hover)}}:is(.ActionListItem.ActionListItem--danger .ActionListContent):active{background:var(--control-danger-bgColor-active)}:is(.ActionListItem.ActionListItem--danger .ActionListContent):active .ActionListItem-description,:is(.ActionListItem.ActionListItem--danger .ActionListContent):active .ActionListItem-label,:is(.ActionListItem.ActionListItem--danger .ActionListContent):active .ActionListItem-visual{color:var(--control-danger-fgColor-hover)}.ActionListContent{background-color:initial;border:none;border-radius:var(--borderRadius-medium);color:var(--control-fgColor-rest);display:grid;padding-block:var(--actionListContent-paddingBlock);padding-inline:var(--control-medium-paddingInline-condensed);position:relative;text-align:left;touch-action:manipulation;transition:background 33.333ms linear;-webkit-user-select:none;user-select:none;width:100%;-webkit-tap-highlight-color:transparent;align-items:start;grid-template-areas:"leadingAction leadingVisual label trailingVisual trailingAction";grid-template-columns:min-content min-content minmax(0,auto) min-content min-content;grid-template-rows:min-content}.ActionListContent>:not(:last-child){margin-right:var(--control-medium-gap)}.ActionListContent:hover{-webkit-text-decoration:none;text-decoration:none}.ActionListContent[aria-disabled=true] .ActionListItem-description,.ActionListContent[aria-disabled=true] .ActionListItem-label{color:var(--control-fgColor-disabled)}.ActionListContent[aria-disabled=true] .ActionListItem-visual{fill:var(--control-fgColor-disabled)}@media (hover:hover){.ActionListContent[aria-disabled=true]:hover{background-color:initial;cursor:not-allowed}}@media screen and (prefers-reduced-motion:no-preference){.ActionListContent[aria-expanded]+.ActionList--subGroup{transition:opacity .16s cubic-bezier(.25,1,.5,1),transform .16s cubic-bezier(.25,1,.5,1)}}:is(.ActionListContent[aria-expanded]+.ActionList--subGroup) .ActionListContent{padding-left:var(--base-size-24)}:is(.ActionListContent.ActionListContent--visual16[aria-expanded]+.ActionList--subGroup) .ActionListContent{padding-left:var(--base-size-32)}:is(.ActionListContent.ActionListContent--visual20[aria-expanded]+.ActionList--subGroup) .ActionListContent{padding-left:var(--base-size-36)}:is(.ActionListContent.ActionListContent--visual24[aria-expanded]+.ActionList--subGroup) .ActionListContent{padding-left:var(--base-size-40)}.ActionListContent[aria-expanded=true] .ActionListItem-collapseIcon{transform:scaleY(-1);transition:transform .12s linear}.ActionListContent[aria-expanded=true]+.ActionList--subGroup{height:auto;opacity:1;overflow:visible;transform:translateY(0);visibility:visible}.ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded=true]>.ActionListItem-label{font-weight:var(--base-text-weight-semibold)}.ActionListContent[aria-expanded=false] .ActionListItem-collapseIcon{transform:scaleY(1);transition:transform .12s linear}.ActionListContent[aria-expanded=false]+.ActionList--subGroup{height:0;opacity:0;overflow:hidden;transform:translateY(calc(var(--base-size-16)*-1));visibility:hidden}.ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded=false]{background:var(--control-transparent-bgColor-selected)}.ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded=false] .ActionListItem-label{font-weight:var(--base-text-weight-semibold)}.ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded=false]+.ActionListItem:before,.ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded=false]:before{visibility:hidden}.ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded=false]:after{background:var(--borderColor-accent-emphasis);border-radius:var(--borderRadius-medium);content:"";height:var(--base-size-24);left:calc(var(--base-size-8)*-1);position:absolute;top:calc(50% - 12px);width:var(--base-size-4)}:is(.ActionListContent[aria-checked=true],.ActionListContent[aria-selected=true]) .FormControl-checkbox{background:var(--control-checked-bgColor-rest);border-color:var(--control-checked-borderColor-rest);transition:background-color,border-color 80ms cubic-bezier(.32,0,.67,0) 0s}:is(:is(.ActionListContent[aria-checked=true],.ActionListContent[aria-selected=true]) .FormControl-checkbox):before{animation:checkmarkIn 80ms cubic-bezier(.65,0,.35,1) 80ms forwards;transition:visibility 0s linear 0s;visibility:visible}:is(.ActionListContent[aria-checked=true],.ActionListContent[aria-selected=true]) .ActionListItem-singleSelectCheckmark{visibility:visible}:is(.ActionListContent[aria-checked=false],.ActionListContent[aria-selected=false]) .ActionListItem-singleSelectCheckmark{transition:visibility 0s linear .2s;visibility:hidden}.ActionListContent.ActionListContent--sizeLarge{--actionListContent-paddingBlock:var(--control-large-paddingBlock)}.ActionListContent.ActionListContent--sizeXLarge{--actionListContent-paddingBlock:var(--control-xlarge-paddingBlock)}@media (pointer:coarse){.ActionListContent{--actionListContent-paddingBlock:var(--control-large-paddingBlock)}}.ActionListContent.ActionListContent--blockDescription .ActionListItem-visual{place-self:start}.ActionListItem-action--leading{grid-area:leadingAction}.ActionListItem-visual--leading{grid-area:leadingVisual}.ActionListItem-visual--trailing{grid-area:trailingVisual}.ActionListItem-action--trailing{grid-area:trailingAction}.ActionListItem-visual--leading svg{fill:currentcolor}.ActionListItem-descriptionWrap{display:flex;flex-direction:column;gap:var(--base-size-4);grid-area:label}.ActionListItem-descriptionWrap .ActionListItem-label{font-weight:var(--base-text-weight-semibold)}.ActionListItem-descriptionWrap--inline{align-items:baseline;flex-direction:row;gap:var(--base-size-8);position:relative}.ActionListItem-description{color:var(--fgColor-muted);font-size:var(--text-body-size-small);font-weight:var(--base-text-weight-normal);line-height:var(--text-body-lineHeight-small)}.ActionListItem-action,.ActionListItem-visual{color:var(--fgColor-muted);display:flex;min-height:var(--control-medium-lineBoxHeight);pointer-events:none;fill:var(--fgColor-muted);align-items:center}.ActionListItem-label{color:var(--fgColor-default);font-size:var(--text-body-size-medium);font-weight:var(--base-text-weight-normal);grid-area:label;line-height:var(--text-body-lineHeight-medium);position:relative}.ActionListItem-label--truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ActionListItem--subItem>.ActionListContent>.ActionListItem-label{font-size:var(--text-body-size-small);line-height:var(--text-body-lineHeight-small)}.ActionListItem--withActions{align-items:center;display:flex;flex-wrap:nowrap}.ActionListItem-trailingAction{border-bottom-left-radius:0;border-top-left-radius:0}.ActionListItem--trailingActionHover .ActionListItem-trailingAction{visibility:hidden}:is(.ActionListItem--trailingActionHover:hover,.ActionListItem--trailingActionHover:focus-within) .ActionListItem-trailingAction{visibility:visible}.ActionList-sectionDivider:not(:empty){color:var(--fgColor-muted);display:flex;flex-direction:column;font-size:var(--text-body-size-small);font-weight:var(--base-text-weight-semibold);line-height:var(--text-body-lineHeight-small);padding-block:var(--base-size-8);padding-inline:var(--actionListContent-paddingBlock)}.ActionList-sectionDivider:empty{background:var(--borderColor-muted);border:0;display:block;height:var(--borderWidth-thin);list-style:none;margin-block-end:var(--base-size-8);margin-block-start:calc(var(--base-size-8) - var(--borderWidth-thin));margin-inline:calc(var(--base-size-8)*-1);padding:0}.ActionList-sectionDivider .ActionList-sectionDivider-title{align-self:flex-start;color:var(--fgColor-muted);font-size:var(--text-body-size-small);font-weight:var(--base-text-weight-semibold)}.ActionList-sectionDivider--filled{background:var(--bgColor-muted);border-bottom:solid var(--borderWidth-thin) var(--borderColor-muted,var(--color-action-list-item-inline-divider));border-top:solid var(--borderWidth-thin) var(--borderColor-muted,var(--color-action-list-item-inline-divider));margin-block-end:var(--base-size-8);margin-block-start:calc(var(--base-size-8) - var(--borderWidth-thin));margin-inline:calc(var(--base-size-8)*-1)}.ActionList-sectionDivider--filled:empty{box-sizing:border-box;height:var(--base-size-8)}.ActionList-sectionDivider--filled:first-child{margin-block-start:0}
1
+ /* stylelint-disable selector-max-compound-selectors */
2
+ /* stylelint-disable selector-max-specificity */
3
+ /* stylelint-disable max-nesting-depth */
4
+ :root {
5
+ --actionListContent-paddingBlock: var(--control-medium-paddingBlock);
6
+ }
7
+ /* ActionList */
8
+ /* stylelint-disable-next-line selector-max-type */
9
+ action-list {
10
+ display: block;
11
+ }
12
+ /* stylelint-disable-next-line selector-max-type */
13
+ nav-list {
14
+ display: block;
15
+ }
16
+ .ActionListHeader {
17
+ margin-bottom: var(--base-size-16);
18
+ margin-left: var(--base-size-8);
19
+ }
20
+ /* <ul> */
21
+ .ActionListWrap {
22
+ list-style: none;
23
+ }
24
+ .ActionListWrap--inset,
25
+ .ActionListWrap--inset[popover] {
26
+ padding: var(--base-size-8);
27
+ }
28
+ /* list dividers */
29
+ .ActionListWrap--divided .ActionListItem-label::before {
30
+ position: absolute;
31
+ /* stylelint-disable-next-line primer/spacing */
32
+ top: calc(-1 * var(--actionListContent-paddingBlock));
33
+ display: block;
34
+ width: 100%;
35
+ height: 1px;
36
+ content: '';
37
+ /* stylelint-disable-next-line primer/colors */
38
+ background: var(--borderColor-muted);
39
+ }
40
+ /* if descriptionWrap--inline exists, move pseudo divider to wrapper */
41
+ :is(.ActionListWrap--divided .ActionListItem-descriptionWrap--inline)::before {
42
+ position: absolute;
43
+ /* stylelint-disable-next-line primer/spacing */
44
+ top: calc(-1 * var(--actionListContent-paddingBlock));
45
+ display: block;
46
+ width: 100%;
47
+ height: var(--borderWidth-thin);
48
+ content: '';
49
+ /* stylelint-disable-next-line primer/colors */
50
+ background: var(--borderColor-muted);
51
+ }
52
+ /* unset the default label pseudo */
53
+ :is(.ActionListWrap--divided .ActionListItem-descriptionWrap--inline) .ActionListItem-label::before {
54
+ content: unset;
55
+ }
56
+ /* hide divider if item is active */
57
+ :is(.ActionListWrap--divided .ActionListItem--navActive) .ActionListItem-label::before,:is(.ActionListWrap--divided .ActionListItem--navActive) + .ActionListItem .ActionListItem-label::before {
58
+ visibility: hidden;
59
+ }
60
+ /* hide if item is first of type with label::before, or is the first item after a sectionDivider */
61
+ .ActionListItem:first-of-type .ActionListItem-label::before,
62
+ .ActionList-sectionDivider + .ActionListItem .ActionListItem-label::before {
63
+ visibility: hidden;
64
+ }
65
+ /* hide if item is first of type with label::before, or is the first item after a sectionDivider */
66
+ .ActionListItem:first-of-type .ActionListItem-descriptionWrap--inline::before,
67
+ .ActionList-sectionDivider + .ActionListItem .ActionListItem-descriptionWrap--inline::before {
68
+ visibility: hidden;
69
+ }
70
+ /* ActionList::Item */
71
+ .ActionListItem {
72
+ position: relative;
73
+ list-style: none;
74
+ background-color: var(--control-transparent-bgColor-rest);
75
+ border-radius: var(--borderRadius-medium);
76
+
77
+ /* state */
78
+ }
79
+ .ActionListItem:hover,.ActionListItem:active {
80
+ cursor: pointer;
81
+ }
82
+ /* hide dividers */
83
+ @media (hover: hover) {
84
+ .ActionListItem:hover .ActionListItem-label::before,.ActionListItem:hover + .ActionListItem .ActionListItem-label::before {
85
+ visibility: hidden;
86
+ }
87
+
88
+ .ActionListItem:hover .ActionListItem-descriptionWrap--inline::before,.ActionListItem:hover + .ActionListItem .ActionListItem-descriptionWrap--inline::before {
89
+ visibility: hidden;
90
+ }
91
+ }
92
+ /* Make sure that the first visible item isn't a divider */
93
+ .ActionListItem[hidden] + .ActionList-sectionDivider {
94
+ display: none;
95
+ }
96
+ /* collapse styles here */
97
+ /* first child */
98
+ .ActionListItem.ActionListItem--hasSubItem > .ActionListContent {
99
+ z-index: 1;
100
+ }
101
+ @media (hover: hover) {
102
+ :is(.ActionListItem.ActionListItem--hasSubItem > .ActionListContent):hover {
103
+ background-color: var(--control-transparent-bgColor-hover);
104
+ }
105
+ }
106
+ :is(.ActionListItem.ActionListItem--hasSubItem > .ActionListContent):active {
107
+ background-color: var(--control-transparent-bgColor-active);
108
+ }
109
+ /* only hover li without list as children */
110
+ @media (hover: hover) {
111
+ :is(.ActionListItem:not(.ActionListItem--hasSubItem),.ActionListItem.ActionListItem--hasSubItem > .ActionListContent):hover {
112
+ cursor: pointer;
113
+ background-color: var(--control-transparent-bgColor-hover);
114
+ }
115
+
116
+ :is(.ActionListItem:not(.ActionListItem--hasSubItem),.ActionListItem.ActionListItem--hasSubItem > .ActionListContent):hover:not(.ActionListItem--navActive,:focus-visible) {
117
+ /* Support for "Windows high contrast mode" */
118
+ outline: solid var(--borderWidth-thin) transparent;
119
+ outline-offset: calc(-1 * var(--borderWidth-thin));
120
+ box-shadow: var(--boxShadow-thin) var(--control-transparent-borderColor-active);
121
+ }
122
+ }
123
+ :is(.ActionListItem:not(.ActionListItem--hasSubItem),.ActionListItem.ActionListItem--hasSubItem > .ActionListContent):active {
124
+ background: var(--control-transparent-bgColor-active);
125
+ }
126
+ :is(.ActionListItem:not(.ActionListItem--hasSubItem),.ActionListItem.ActionListItem--hasSubItem > .ActionListContent):active:not(.ActionListItem--navActive) {
127
+ /* Support for "Windows high contrast mode" https:sarahmhigley.com/writing/whcm-quick-tips/ */
128
+ outline: solid var(--borderWidth-thin) transparent;
129
+ outline-offset: calc(-1 * var(--borderWidth-thin));
130
+ box-shadow: var(--boxShadow-thin) var(--control-transparent-borderColor-active);
131
+ }
132
+ :is(.ActionListItem:not(.ActionListItem--hasSubItem),.ActionListItem.ActionListItem--hasSubItem > .ActionListContent):active .ActionListItem-label::before,:is(.ActionListItem:not(.ActionListItem--hasSubItem),.ActionListItem.ActionListItem--hasSubItem > .ActionListContent):active + .ActionListItem .ActionListItem-label::before {
133
+ visibility: hidden;
134
+ }
135
+ /* Autocomplete [aria-selected] items */
136
+ .ActionListItem[aria-selected='true'] {
137
+ font-weight: var(--base-text-weight-normal);
138
+ background: var(--control-transparent-bgColor-selected);
139
+ }
140
+ @media (hover: hover) {
141
+ .ActionListItem[aria-selected='true']:hover {
142
+ background-color: var(--control-transparent-bgColor-hover);
143
+ }
144
+ }
145
+ .ActionListItem[aria-selected='true']::before,.ActionListItem[aria-selected='true'] + .ActionListItem::before {
146
+ visibility: hidden;
147
+ }
148
+ /* blue accent line */
149
+ .ActionListItem[aria-selected='true']::after {
150
+ position: absolute;
151
+ top: calc(50% - 12px);
152
+ left: calc(-1 * var(--base-size-4));
153
+ width: var(--base-size-4);
154
+ height: var(--base-size-24);
155
+ content: '';
156
+ background: var(--borderColor-accent-emphasis);
157
+ border-radius: var(--borderRadius-medium);
158
+ }
159
+ /* active state [aria-current] */
160
+ .ActionListItem.ActionListItem--navActive {
161
+ /* provides a visual indication of the current item for Windows high-contrast mode */
162
+ outline: 2px solid transparent;
163
+ }
164
+ .ActionListItem.ActionListItem--navActive:not(.ActionListItem--subItem) .ActionListItem-label {
165
+ font-weight: var(--base-text-weight-semibold);
166
+ }
167
+ .ActionListItem.ActionListItem--navActive:not(.ActionListItem--danger) {
168
+ background: var(--control-transparent-bgColor-selected);
169
+ }
170
+ @media (hover: hover) {
171
+ .ActionListItem.ActionListItem--navActive:not(.ActionListItem--danger):hover {
172
+ background-color: var(--control-transparent-bgColor-hover);
173
+ }
174
+ }
175
+ .ActionListItem.ActionListItem--navActive:not(.ActionListItem--danger)::before,.ActionListItem.ActionListItem--navActive:not(.ActionListItem--danger) + .ActionListItem::before {
176
+ visibility: hidden;
177
+ }
178
+ /* blue accent line */
179
+ .ActionListItem.ActionListItem--navActive:not(.ActionListItem--danger)::after {
180
+ position: absolute;
181
+ top: calc(50% - 12px);
182
+ left: calc(-1 * var(--base-size-8));
183
+ width: var(--base-size-4);
184
+ height: var(--base-size-24);
185
+ content: '';
186
+ background: var(--borderColor-accent-emphasis);
187
+ border-radius: var(--borderRadius-medium);
188
+ }
189
+ /* disabled */
190
+ :is(:is(.ActionListItem.ActionListItem--disabled,.ActionListItem[aria-disabled='true']) .ActionListContent) .ActionListItem-label,:is(:is(.ActionListItem.ActionListItem--disabled,.ActionListItem[aria-disabled='true']) .ActionListContent) .ActionListItem-description {
191
+ color: var(--control-fgColor-disabled);
192
+ }
193
+ :is(:is(.ActionListItem.ActionListItem--disabled,.ActionListItem[aria-disabled='true']) .ActionListContent) .ActionListItem-visual {
194
+ fill: var(--control-fgColor-disabled);
195
+ }
196
+ @media (hover: hover) {
197
+ :is(.ActionListItem.ActionListItem--disabled,.ActionListItem[aria-disabled='true']):hover {
198
+ cursor: not-allowed;
199
+ background-color: transparent;
200
+ }
201
+ }
202
+ /* variants */
203
+ /* danger */
204
+ .ActionListItem.ActionListItem--danger .ActionListItem-label {
205
+ color: var(--control-danger-fgColor-rest);
206
+ }
207
+ .ActionListItem.ActionListItem--danger .ActionListItem-visual {
208
+ color: var(--control-danger-fgColor-rest);
209
+ }
210
+ @media (hover: hover) {
211
+ .ActionListItem.ActionListItem--danger:hover {
212
+ background: var(--control-danger-bgColor-hover);
213
+ }
214
+
215
+ .ActionListItem.ActionListItem--danger:hover .ActionListItem-label,.ActionListItem.ActionListItem--danger:hover .ActionListItem-visual,.ActionListItem.ActionListItem--danger:hover .ActionListItem-description {
216
+ color: var(--control-danger-fgColor-hover);
217
+ }
218
+ }
219
+ :is(.ActionListItem.ActionListItem--danger .ActionListContent):active {
220
+ background: var(--control-danger-bgColor-active);
221
+ }
222
+ :is(.ActionListItem.ActionListItem--danger .ActionListContent):active .ActionListItem-label,:is(.ActionListItem.ActionListItem--danger .ActionListContent):active .ActionListItem-visual,:is(.ActionListItem.ActionListItem--danger .ActionListContent):active .ActionListItem-description {
223
+ color: var(--control-danger-fgColor-hover);
224
+ }
225
+ /* button or a href */
226
+ .ActionListContent {
227
+ position: relative;
228
+ display: grid;
229
+ width: 100%;
230
+ /* stylelint-disable-next-line primer/spacing */
231
+ padding-block: var(--actionListContent-paddingBlock);
232
+ /* stylelint-disable-next-line primer/spacing */
233
+ padding-inline: var(--control-medium-paddingInline-condensed);
234
+ color: var(--control-fgColor-rest);
235
+ text-align: left;
236
+ -webkit-user-select: none;
237
+ user-select: none;
238
+ background-color: transparent;
239
+ border: none;
240
+ border-radius: var(--borderRadius-medium);
241
+ transition: background 33.333ms linear;
242
+ touch-action: manipulation;
243
+ -webkit-tap-highlight-color: transparent;
244
+ grid-template-rows: min-content;
245
+ grid-template-areas: 'leadingAction leadingVisual label trailingVisual trailingAction';
246
+ grid-template-columns: min-content min-content minmax(0, auto) min-content min-content;
247
+ align-items: start;
248
+
249
+ /* column-gap persists with empty grid-areas, margin applies only when children exist */
250
+ }
251
+ .ActionListContent > :not(:last-child) {
252
+ /* stylelint-disable-next-line primer/spacing */
253
+ margin-right: var(--control-medium-gap);
254
+ }
255
+ /* state */
256
+ .ActionListContent:hover {
257
+ -webkit-text-decoration: none;
258
+ text-decoration: none;
259
+ }
260
+ /* disabled */
261
+ .ActionListContent[aria-disabled='true'] .ActionListItem-label,.ActionListContent[aria-disabled='true'] .ActionListItem-description {
262
+ color: var(--control-fgColor-disabled);
263
+ }
264
+ .ActionListContent[aria-disabled='true'] .ActionListItem-visual {
265
+ fill: var(--control-fgColor-disabled);
266
+ }
267
+ @media (hover: hover) {
268
+ .ActionListContent[aria-disabled='true']:hover {
269
+ cursor: not-allowed;
270
+ background-color: transparent;
271
+ }
272
+ }
273
+ /* collapsible item [aria-expanded] */
274
+ /* nesting (single level)
275
+ target items inside expanded subgroups */
276
+ @media screen and (prefers-reduced-motion: no-preference) {
277
+ .ActionListContent[aria-expanded] + .ActionList--subGroup {
278
+ transition:
279
+ opacity 160ms cubic-bezier(0.25, 1, 0.5, 1),
280
+ transform 160ms cubic-bezier(0.25, 1, 0.5, 1);
281
+ }
282
+ }
283
+ :is(.ActionListContent[aria-expanded] + .ActionList--subGroup) .ActionListContent {
284
+ padding-left: var(--base-size-24);
285
+ }
286
+ /* has 16px leading visual */
287
+ :is(.ActionListContent.ActionListContent--visual16[aria-expanded] + .ActionList--subGroup) .ActionListContent {
288
+ padding-left: var(--base-size-32);
289
+ }
290
+ /* has 20px leading visual */
291
+ :is(.ActionListContent.ActionListContent--visual20[aria-expanded] + .ActionList--subGroup) .ActionListContent {
292
+ padding-left: var(--base-size-36);
293
+ }
294
+ /* has 24px leading visual */
295
+ :is(.ActionListContent.ActionListContent--visual24[aria-expanded] + .ActionList--subGroup) .ActionListContent {
296
+ padding-left: var(--base-size-40);
297
+ }
298
+ .ActionListContent[aria-expanded='true'] .ActionListItem-collapseIcon {
299
+ transition: transform 120ms linear;
300
+ transform: scaleY(-1);
301
+ }
302
+ .ActionListContent[aria-expanded='true'] + .ActionList--subGroup {
303
+ height: auto;
304
+ overflow: visible;
305
+ visibility: visible;
306
+ opacity: 1;
307
+ transform: translateY(0);
308
+ }
309
+ .ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded='true'] > .ActionListItem-label {
310
+ font-weight: var(--base-text-weight-semibold);
311
+ }
312
+ .ActionListContent[aria-expanded='false'] .ActionListItem-collapseIcon {
313
+ transition: transform 120ms linear;
314
+ transform: scaleY(1);
315
+ }
316
+ .ActionListContent[aria-expanded='false'] + .ActionList--subGroup {
317
+ height: 0;
318
+ overflow: hidden;
319
+ visibility: hidden;
320
+ opacity: 0;
321
+ transform: translateY(calc(-1 * var(--base-size-16)));
322
+ }
323
+ /* show active indicator on parent collapse if child is active */
324
+ .ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded='false'] {
325
+ background: var(--control-transparent-bgColor-selected);
326
+ }
327
+ .ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded='false'] .ActionListItem-label {
328
+ font-weight: var(--base-text-weight-semibold);
329
+ }
330
+ .ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded='false']::before,.ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded='false'] + .ActionListItem::before {
331
+ visibility: hidden;
332
+ }
333
+ /* blue accent line */
334
+ .ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded='false']::after {
335
+ position: absolute;
336
+ top: calc(50% - 12px);
337
+ left: calc(-1 * var(--base-size-8));
338
+ width: var(--base-size-4);
339
+ height: var(--base-size-24);
340
+ content: '';
341
+ background: var(--borderColor-accent-emphasis);
342
+ border-radius: var(--borderRadius-medium);
343
+ }
344
+ /*
345
+ * checkbox item [aria-checked]
346
+ * listbox [aria-selected]
347
+ */
348
+ :is(.ActionListContent[aria-checked='true'],.ActionListContent[aria-selected='true']) .FormControl-checkbox {
349
+ background: var(--control-checked-bgColor-rest);
350
+ border-color: var(--control-checked-borderColor-rest);
351
+ transition: background-color, border-color 80ms cubic-bezier(0.32, 0, 0.67, 0) 0ms; /* unchecked -> checked */
352
+ }
353
+ :is(:is(.ActionListContent[aria-checked='true'],.ActionListContent[aria-selected='true']) .FormControl-checkbox)::before {
354
+ visibility: visible;
355
+ transition: visibility 0s linear 0s;
356
+ animation: checkmarkIn 80ms cubic-bezier(0.65, 0, 0.35, 1) forwards 80ms;
357
+ }
358
+ /* singleselect checkmark */
359
+ :is(.ActionListContent[aria-checked='true'],.ActionListContent[aria-selected='true']) .ActionListItem-singleSelectCheckmark {
360
+ visibility: visible;
361
+ }
362
+ /* singleselect checkmark */
363
+ :is(.ActionListContent[aria-checked='false'],.ActionListContent[aria-selected='false']) .ActionListItem-singleSelectCheckmark {
364
+ visibility: hidden;
365
+ transition: visibility 0s linear 200ms;
366
+ }
367
+ /* sizes */
368
+ .ActionListContent.ActionListContent--sizeLarge {
369
+ --actionListContent-paddingBlock: var(--control-large-paddingBlock);
370
+ }
371
+ .ActionListContent.ActionListContent--sizeXLarge {
372
+ --actionListContent-paddingBlock: var(--control-xlarge-paddingBlock);
373
+ }
374
+ /* On pointer:coarse (mobile), all list items are large */
375
+ @media (pointer: coarse) {
376
+ .ActionListContent {
377
+ --actionListContent-paddingBlock: var(--control-large-paddingBlock);
378
+ }
379
+ }
380
+ /* if leading/trailing visual, align with first line of content */
381
+ .ActionListContent.ActionListContent--blockDescription .ActionListItem-visual {
382
+ place-self: start;
383
+ }
384
+ /* place children on grid */
385
+ .ActionListItem-action--leading {
386
+ grid-area: leadingAction;
387
+ }
388
+ .ActionListItem-visual--leading {
389
+ grid-area: leadingVisual;
390
+ }
391
+ .ActionListItem-visual--trailing {
392
+ grid-area: trailingVisual;
393
+ }
394
+ .ActionListItem-action--trailing {
395
+ grid-area: trailingAction;
396
+ }
397
+ /* have leading visual svg filled with chosen color */
398
+ /* stylelint-disable-next-line selector-max-type */
399
+ .ActionListItem-visual--leading svg {
400
+ fill: currentcolor;
401
+ }
402
+ /* wrapper span
403
+ default block */
404
+ .ActionListItem-descriptionWrap {
405
+ grid-area: label;
406
+ display: flex;
407
+ flex-direction: column;
408
+ gap: var(--base-size-4);
409
+ }
410
+ .ActionListItem-descriptionWrap .ActionListItem-label {
411
+ font-weight: var(--base-text-weight-semibold);
412
+ }
413
+ /* inline */
414
+ .ActionListItem-descriptionWrap--inline {
415
+ position: relative;
416
+ flex-direction: row;
417
+ align-items: baseline;
418
+ gap: var(--base-size-8);
419
+ }
420
+ /* description */
421
+ .ActionListItem-description {
422
+ font-size: var(--text-body-size-small);
423
+ font-weight: var(--base-text-weight-normal);
424
+ line-height: var(--text-body-lineHeight-small);
425
+ color: var(--fgColor-muted);
426
+ }
427
+ /* helper for grid alignment with multi-line content
428
+ span wrapping svg or text */
429
+ .ActionListItem-visual,
430
+ .ActionListItem-action {
431
+ display: flex;
432
+ min-height: var(--control-medium-lineBoxHeight);
433
+ color: var(--fgColor-muted);
434
+ pointer-events: none;
435
+ fill: var(--fgColor-muted);
436
+ align-items: center;
437
+ }
438
+ /* text */
439
+ .ActionListItem-label {
440
+ position: relative;
441
+ font-size: var(--text-body-size-medium);
442
+ font-weight: var(--base-text-weight-normal);
443
+ line-height: var(--text-body-lineHeight-medium);
444
+ color: var(--fgColor-default);
445
+ grid-area: label;
446
+ }
447
+ .ActionListItem-label--truncate {
448
+ overflow: hidden;
449
+ text-overflow: ellipsis;
450
+ white-space: nowrap;
451
+ }
452
+ /* nested lists (only supports 1 level currently)
453
+ target ActionListItem--subItem for padding-left to maintain :active :after state */
454
+ .ActionListItem--subItem > .ActionListContent > .ActionListItem-label {
455
+ font-size: var(--text-body-size-small);
456
+ line-height: var(--text-body-lineHeight-small);
457
+ }
458
+ /* trailing action icon button */
459
+ .ActionListItem--withActions {
460
+ display: flex;
461
+ flex-wrap: nowrap;
462
+ align-items: center;
463
+ }
464
+ .ActionListItem-trailingAction {
465
+ border-top-left-radius: 0;
466
+ border-bottom-left-radius: 0;
467
+ }
468
+ /* show trailing action button on hover */
469
+ .ActionListItem--trailingActionHover .ActionListItem-trailingAction {
470
+ visibility: hidden;
471
+ }
472
+ :is(.ActionListItem--trailingActionHover:hover,.ActionListItem--trailingActionHover:focus-within) .ActionListItem-trailingAction {
473
+ visibility: visible;
474
+ }
475
+ /* ActionList::Divider */
476
+ /* with children */
477
+ .ActionList-sectionDivider:not(:empty) {
478
+ display: flex;
479
+ font-size: var(--text-body-size-small);
480
+ font-weight: var(--base-text-weight-semibold);
481
+ line-height: var(--text-body-lineHeight-small);
482
+ color: var(--fgColor-muted);
483
+ flex-direction: column;
484
+ /* stylelint-disable-next-line primer/spacing */
485
+ padding-inline: var(--actionListContent-paddingBlock);
486
+ padding-block: var(--base-size-8);
487
+ }
488
+ /* no children */
489
+ .ActionList-sectionDivider:empty {
490
+ display: block;
491
+ height: var(--borderWidth-thin);
492
+ padding: 0;
493
+ /* stylelint-disable-next-line primer/spacing */
494
+ margin-block-start: calc(var(--base-size-8) - var(--borderWidth-thin));
495
+ margin-block-end: var(--base-size-8);
496
+ margin-inline: calc(-1 * var(--base-size-8));
497
+ list-style: none;
498
+ /* stylelint-disable-next-line primer/colors */
499
+ background: var(--borderColor-muted);
500
+ border: 0;
501
+ }
502
+ .ActionList-sectionDivider .ActionList-sectionDivider-title {
503
+ font-size: var(--text-body-size-small);
504
+ font-weight: var(--base-text-weight-semibold);
505
+ color: var(--fgColor-muted);
506
+ align-self: flex-start;
507
+ }
508
+ .ActionList-sectionDivider--filled {
509
+ /* stylelint-disable-next-line primer/spacing */
510
+ margin-block-start: calc(var(--base-size-8) - var(--borderWidth-thin));
511
+ margin-block-end: var(--base-size-8);
512
+ margin-inline: calc(-1 * var(--base-size-8));
513
+ background: var(--bgColor-muted);
514
+ border-top: solid var(--borderWidth-thin) var(--borderColor-muted, var(--color-action-list-item-inline-divider));
515
+ border-bottom: solid var(--borderWidth-thin) var(--borderColor-muted, var(--color-action-list-item-inline-divider));
516
+
517
+ /* if no children, treat as divider */
518
+ }
519
+ .ActionList-sectionDivider--filled:empty {
520
+ height: var(--base-size-8);
521
+ box-sizing: border-box;
522
+ }
523
+ .ActionList-sectionDivider--filled:first-child {
524
+ margin-block-start: 0;
525
+ }