openproject-primer_view_components 0.96.0 → 0.97.0

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 (31) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -0
  3. data/app/assets/javascripts/primer_view_components.js +5 -5
  4. data/app/assets/javascripts/primer_view_components.js.map +1 -1
  5. data/app/assets/styles/primer_view_components.css +1 -1
  6. data/app/assets/styles/primer_view_components.css.map +1 -1
  7. data/app/components/primer/alpha/action_list/item.rb +2 -1
  8. data/app/components/primer/alpha/action_list.css +1 -1
  9. data/app/components/primer/alpha/action_list.css.json +9 -22
  10. data/app/components/primer/alpha/action_list.css.map +1 -1
  11. data/app/components/primer/alpha/action_list.html.erb +1 -5
  12. data/app/components/primer/alpha/action_list.pcss +43 -81
  13. data/app/components/primer/alpha/action_list.rb +9 -7
  14. data/app/components/primer/alpha/action_menu/action_menu_element.js +84 -234
  15. data/app/components/primer/alpha/action_menu/action_menu_element.ts +92 -273
  16. data/app/components/primer/alpha/action_menu/action_menu_focus_zone_stack.js +1 -1
  17. data/app/components/primer/alpha/action_menu/action_menu_focus_zone_stack.ts +1 -1
  18. data/app/components/primer/alpha/action_menu/menu_loader.d.ts +21 -0
  19. data/app/components/primer/alpha/action_menu/menu_loader.js +221 -0
  20. data/app/components/primer/alpha/action_menu/menu_loader.ts +269 -0
  21. data/lib/primer/view_components/version.rb +1 -1
  22. data/previews/primer/alpha/action_list_preview.rb +46 -1
  23. data/previews/primer/alpha/action_menu_preview/sub_menus.html.erb +1 -1
  24. data/previews/primer/alpha/action_menu_preview.rb +5 -2
  25. data/static/arguments.json +2 -2
  26. data/static/classes.json +3 -3
  27. data/static/classnames.cjs +1 -1
  28. data/static/classnames.js +1 -1
  29. data/static/info_arch.json +21 -2
  30. data/static/previews.json +13 -0
  31. metadata +4 -1
@@ -226,7 +226,8 @@ module Primer
226
226
  @system_arguments[:classes],
227
227
  SCHEME_MAPPINGS[@scheme],
228
228
  "ActionListItem",
229
- "ActionListItem--disabled" => @disabled
229
+ "ActionListItem--disabled" => @disabled,
230
+ "ActionListItem--divided" => @list&.show_dividers
230
231
  )
231
232
 
232
233
  @system_arguments[:data] = merge_data(
@@ -1 +1 @@
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{position:absolute;top:calc(-1 * var(--actionListContent-paddingBlock));display:block;width:100%;content:"";background:var(--borderColor-muted)}: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{position:relative;list-style:none;background-color:var(--control-transparent-bgColor-rest);border-radius:var(--borderRadius-medium)}.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}:is(.ActionListItem.ActionListItem--hasSubItem>.ActionListContent):hover{background-color:var(--control-transparent-bgColor-hover)}}.ActionListItem[hidden]+.ActionList-sectionDivider{display:none}.ActionListItem.ActionListItem--hasSubItem>.ActionListContent{z-index:1}: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{cursor:pointer;background-color:var(--control-transparent-bgColor-hover)}:is(.ActionListItem:not(.ActionListItem--hasSubItem),.ActionListItem.ActionListItem--hasSubItem>.ActionListContent):hover:not(.ActionListItem--navActive,:focus-visible){outline:solid var(--borderWidth-thin) #0000;outline-offset:calc(-1 * var(--borderWidth-thin));box-shadow:var(--boxShadow-thin) var(--control-transparent-borderColor-active)}}: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){outline:solid var(--borderWidth-thin) #0000;outline-offset:calc(-1 * var(--borderWidth-thin));box-shadow:var(--boxShadow-thin) var(--control-transparent-borderColor-active)}.ActionListItem.ActionListItem--navActive:not(.ActionListItem--danger)+.ActionListItem:before,.ActionListItem.ActionListItem--navActive:not(.ActionListItem--danger):before,.ActionListItem[aria-selected=true]+.ActionListItem:before,.ActionListItem[aria-selected=true]:before,: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]{font-weight:var(--base-text-weight-normal);background:var(--control-transparent-bgColor-selected)}@media(hover:hover){.ActionListItem[aria-selected=true]:hover{background-color:var(--control-transparent-bgColor-hover)}}.ActionListItem[aria-selected=true]:after{position:absolute;top:calc(50% - 12px);left:calc(-1 * var(--base-size-4));width:var(--base-size-4);height:var(--base-size-24);content:"";background:var(--borderColor-accent-emphasis);border-radius:var(--borderRadius-medium)}.ActionListItem.ActionListItem--navActive{outline:2px solid #0000}.ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded=false] .ActionListItem-label,.ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded=true]>.ActionListItem-label,.ActionListItem-descriptionWrap .ActionListItem-label,.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):after{position:absolute;top:calc(50% - 12px);left:calc(-1 * var(--base-size-8));width:var(--base-size-4);height:var(--base-size-24);content:"";background:var(--borderColor-accent-emphasis);border-radius:var(--borderRadius-medium)}:is(:is(.ActionListItem.ActionListItem--disabled,.ActionListItem[aria-disabled=true]) .ActionListContent) :is(.ActionListItem-description,.ActionListItem-label){color:var(--control-fgColor-disabled)}.ActionListContent[aria-disabled=true] .ActionListItem-visual,:is(:is(.ActionListItem.ActionListItem--disabled,.ActionListItem[aria-disabled=true]) .ActionListContent) .ActionListItem-visual{fill:var(--control-fgColor-disabled)}.ActionListItem.ActionListItem--danger .ActionListItem-label,.ActionListItem.ActionListItem--danger .ActionListItem-visual{color:var(--control-danger-fgColor-rest)}@media(hover:hover){:is(.ActionListItem.ActionListItem--disabled,.ActionListItem[aria-disabled=true]):hover{cursor:not-allowed;background-color:initial}.ActionListItem.ActionListItem--danger:hover{background:var(--control-danger-bgColor-hover)}.ActionListItem.ActionListItem--danger:hover :is(.ActionListItem-description,.ActionListItem-label,.ActionListItem-visual){color:var(--control-danger-fgColor-hover)}.ActionListItem.ActionListItem--danger:hover [data-kbd-chord]{background-color:var(--bgColor-default);transition:none}}:is(.ActionListItem.ActionListItem--danger .ActionListContent):active{background:var(--control-danger-bgColor-active)}:is(.ActionListItem.ActionListItem--danger .ActionListContent):active :is(.ActionListItem-description,.ActionListItem-label,.ActionListItem-visual){color:var(--control-danger-fgColor-hover)}:is(.ActionListItem.ActionListItem--danger .ActionListContent):active [data-kbd-chord]{background-color:var(--bgColor-default);transition:none}.ActionListContent{position:relative;display:grid;width:100%;padding-block:var(--actionListContent-paddingBlock);padding-inline:var(--control-medium-paddingInline-condensed);color:var(--control-fgColor-rest);text-align:left;-webkit-user-select:none;user-select:none;background-color:initial;border:none;border-radius:var(--borderRadius-medium);transition:background 33.333ms linear;touch-action:manipulation;-webkit-tap-highlight-color:transparent;grid-template-rows:min-content;grid-template-areas:"leadingAction leadingVisual label trailingVisual trailingAction";grid-template-columns:min-content min-content minmax(0,auto) min-content min-content;align-items:start}.ActionListContent>:not(:last-child){margin-right:var(--control-medium-gap)}.ActionListContent:hover{-webkit-text-decoration:none;text-decoration:none}.ActionListContent[aria-disabled=true] :is(.ActionListItem-description,.ActionListItem-label){color:var(--control-fgColor-disabled)}@media(hover:hover){.ActionListContent[aria-disabled=true]:hover{cursor:not-allowed;background-color:initial}}@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{transition:transform .12s linear;transform:scaleY(-1)}.ActionListContent[aria-expanded=true]+.ActionList--subGroup{height:auto;overflow:visible;visibility:visible;opacity:1;transform:translateY(0)}.ActionListContent[aria-expanded=false] .ActionListItem-collapseIcon{transition:transform .12s linear;transform:scaleY(1)}.ActionListContent[aria-expanded=false]+.ActionList--subGroup{height:0;overflow:hidden;visibility:hidden;opacity:0;transform:translateY(calc(-1 * var(--base-size-16)))}.ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded=false]{background:var(--control-transparent-bgColor-selected)}.ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded=false]+.ActionListItem:before,.ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded=false]:before{visibility:hidden}.ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded=false]:after{position:absolute;top:calc(50% - 12px);left:calc(-1 * var(--base-size-8));width:var(--base-size-4);height:var(--base-size-24);content:"";background:var(--borderColor-accent-emphasis);border-radius:var(--borderRadius-medium)}: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)}:is(:is(.ActionListContent[aria-checked=true],.ActionListContent[aria-selected=true]) .FormControl-checkbox):before{visibility:visible;transition:visibility linear;animation:checkmarkIn 80ms cubic-bezier(.65,0,.35,1) 80ms forwards}:is(.ActionListContent[aria-checked=true],.ActionListContent[aria-selected=true]) .ActionListItem-singleSelectCheckmark{visibility:visible}:is(.ActionListContent[aria-checked=false],.ActionListContent[aria-selected=false]) .ActionListItem-singleSelectCheckmark{visibility:hidden;transition:visibility 0s linear .2s}.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{grid-area:label;display:flex;flex-direction:column;gap:var(--base-size-4)}.ActionListItem-descriptionWrap--inline{position:relative;flex-direction:row;align-items:baseline;gap:var(--base-size-8)}.ActionListItem-description{font-size:var(--text-body-size-small);font-weight:var(--base-text-weight-normal);line-height:var(--text-body-lineHeight-small);color:var(--fgColor-muted)}.ActionListItem-action,.ActionListItem-visual{display:flex;min-height:var(--base-size-20);color:var(--fgColor-muted);pointer-events:none;fill:var(--fgColor-muted);align-items:center}.ActionListItem-label{position:relative;font-size:var(--text-body-size-medium);font-weight:var(--base-text-weight-normal);line-height:var(--text-body-lineHeight-medium);color:var(--fgColor-default);grid-area:label}.ActionListItem-label--truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ActionList-sectionDivider:not(:empty),.ActionListItem--subItem>.ActionListContent>.ActionListItem-label{font-size:var(--text-body-size-small);line-height:var(--text-body-lineHeight-small)}.ActionListItem--withActions{display:flex;flex-wrap:nowrap;align-items:center}.ActionListItem-trailingAction{border-top-left-radius:0;border-bottom-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){display:flex;font-weight:var(--base-text-weight-semibold);color:var(--fgColor-muted);flex-direction:column;padding-inline:var(--actionListContent-paddingBlock);padding-block:var(--base-size-8)}.ActionList-sectionDivider:empty{display:block;height:var(--borderWidth-thin);padding:0;margin-block-start:calc(var(--base-size-8) - var(--borderWidth-thin));margin-block-end:var(--base-size-8);margin-inline:calc(-1 * var(--base-size-8));list-style:none;background:var(--borderColor-muted);border:0}.ActionList-sectionDivider .ActionList-sectionDivider-title{font-size:var(--text-body-size-small);font-weight:var(--base-text-weight-semibold);color:var(--fgColor-muted);align-self:flex-start}.ActionList-sectionDivider--filled{margin-block-start:calc(var(--base-size-8) - var(--borderWidth-thin));margin-block-end:var(--base-size-8);margin-inline:calc(-1 * var(--base-size-8));background:var(--bgColor-muted);border-top:solid var(--borderWidth-thin) var(--borderColor-muted,var(--color-action-list-item-inline-divider));border-bottom:solid var(--borderWidth-thin) var(--borderColor-muted,var(--color-action-list-item-inline-divider))}.ActionList-sectionDivider--filled:empty{height:var(--base-size-8);box-sizing:border-box}.ActionList-sectionDivider--filled:first-child{margin-block-start:0}
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)}.ActionListItem--divided{--actionListItem-dividerVisibility:hidden}.ActionListItem--divided:where(.ActionListItem--divided:not([hidden])~.ActionListItem--divided){--actionListItem-dividerVisibility:visible}.ActionListItem--divided:where(.ActionList-sectionDivider:not([hidden],.ActionListItem--divided[hidden]+.ActionList-sectionDivider)+.ActionListItem--divided){--actionListItem-dividerVisibility:hidden}@media(hover:hover){.ActionListItem--divided:where(.ActionListItem:hover,.ActionListItem:hover+.ActionListItem--divided){--actionListItem-dividerVisibility:hidden}}.ActionListItem--divided:where(.ActionListItem:active,.ActionListItem:active+.ActionListItem--divided),.ActionListItem--divided:where(.ActionListItem:has(:focus-visible),.ActionListItem:has(:focus-visible)+.ActionListItem--divided){--actionListItem-dividerVisibility:hidden}.ActionListItem--divided>.ActionListContent:before,.ActionListItem--divided>form>.ActionListContent:before{position:absolute;top:0;right:0;left:0;height:var(--borderWidth-thin);grid-column:label-start/trailingAction-end;visibility:var(--actionListItem-dividerVisibility);content:"";background:var(--borderColor-muted)}.ActionListItem{position:relative;list-style:none;background-color:var(--control-transparent-bgColor-rest);border-radius:var(--borderRadius-medium)}.ActionListItem:active,.ActionListItem:hover{cursor:pointer}.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{cursor:pointer;background-color:var(--control-transparent-bgColor-hover)}:is(.ActionListItem:not(.ActionListItem--hasSubItem),.ActionListItem.ActionListItem--hasSubItem>.ActionListContent):hover:not(.ActionListItem--navActive,:focus-visible){outline:solid var(--borderWidth-thin) #0000;outline-offset:calc(-1 * var(--borderWidth-thin));box-shadow:var(--boxShadow-thin) var(--control-transparent-borderColor-active)}}: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){outline:solid var(--borderWidth-thin) #0000;outline-offset:calc(-1 * var(--borderWidth-thin));box-shadow:var(--boxShadow-thin) var(--control-transparent-borderColor-active)}.ActionListItem[aria-selected=true]{font-weight:var(--base-text-weight-normal);background:var(--control-transparent-bgColor-selected)}@media(hover:hover){.ActionListItem[aria-selected=true]:hover{background-color:var(--control-transparent-bgColor-hover)}}.ActionListItem[aria-selected=true]:after{position:absolute;top:calc(50% - 12px);left:calc(-1 * var(--base-size-4));width:var(--base-size-4);height:var(--base-size-24);content:"";background:var(--borderColor-accent-emphasis);border-radius:var(--borderRadius-medium)}.ActionListItem.ActionListItem--navActive{outline:2px solid #0000}.ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded=false] .ActionListItem-label,.ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded=true]>.ActionListItem-label,.ActionListItem-descriptionWrap .ActionListItem-label,.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):after{position:absolute;top:calc(50% - 12px);left:calc(-1 * var(--base-size-8));width:var(--base-size-4);height:var(--base-size-24);content:"";background:var(--borderColor-accent-emphasis);border-radius:var(--borderRadius-medium)}:is(:is(.ActionListItem.ActionListItem--disabled,.ActionListItem[aria-disabled=true]) .ActionListContent) :is(.ActionListItem-description,.ActionListItem-label){color:var(--control-fgColor-disabled)}.ActionListContent[aria-disabled=true] .ActionListItem-visual,:is(:is(.ActionListItem.ActionListItem--disabled,.ActionListItem[aria-disabled=true]) .ActionListContent) .ActionListItem-visual{fill:var(--control-fgColor-disabled)}.ActionListItem.ActionListItem--danger .ActionListItem-label,.ActionListItem.ActionListItem--danger .ActionListItem-visual{color:var(--control-danger-fgColor-rest)}@media(hover:hover){:is(.ActionListItem.ActionListItem--disabled,.ActionListItem[aria-disabled=true]):hover{cursor:not-allowed;background-color:initial}.ActionListItem.ActionListItem--danger:hover{background:var(--control-danger-bgColor-hover)}.ActionListItem.ActionListItem--danger:hover :is(.ActionListItem-description,.ActionListItem-label,.ActionListItem-visual){color:var(--control-danger-fgColor-hover)}.ActionListItem.ActionListItem--danger:hover [data-kbd-chord]{background-color:var(--bgColor-default);transition:none}}:is(.ActionListItem.ActionListItem--danger .ActionListContent):active{background:var(--control-danger-bgColor-active)}:is(.ActionListItem.ActionListItem--danger .ActionListContent):active :is(.ActionListItem-description,.ActionListItem-label,.ActionListItem-visual){color:var(--control-danger-fgColor-hover)}:is(.ActionListItem.ActionListItem--danger .ActionListContent):active [data-kbd-chord]{background-color:var(--bgColor-default);transition:none}.ActionListContent{position:relative;display:grid;width:100%;padding-block:var(--actionListContent-paddingBlock);padding-inline:var(--control-medium-paddingInline-condensed);color:var(--control-fgColor-rest);text-align:left;-webkit-user-select:none;user-select:none;background-color:initial;border:none;border-radius:var(--borderRadius-medium);transition:background 33.333ms linear;touch-action:manipulation;-webkit-tap-highlight-color:transparent;grid-template-rows:min-content;grid-template-areas:"leadingAction leadingVisual label trailingVisual trailingAction";grid-template-columns:min-content min-content minmax(0,auto) min-content min-content;align-items:start}.ActionListContent>:not(:last-child){margin-right:var(--control-medium-gap)}.ActionListContent:hover{-webkit-text-decoration:none;text-decoration:none}.ActionListContent[aria-disabled=true] :is(.ActionListItem-description,.ActionListItem-label){color:var(--control-fgColor-disabled)}@media(hover:hover){.ActionListContent[aria-disabled=true]:hover{cursor:not-allowed;background-color:initial}}@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{transition:transform .12s linear;transform:scaleY(-1)}.ActionListContent[aria-expanded=true]+.ActionList--subGroup{height:auto;overflow:visible;visibility:visible;opacity:1;transform:translateY(0)}.ActionListContent[aria-expanded=false] .ActionListItem-collapseIcon{transition:transform .12s linear;transform:scaleY(1)}.ActionListContent[aria-expanded=false]+.ActionList--subGroup{height:0;overflow:hidden;visibility:hidden;opacity:0;transform:translateY(calc(-1 * var(--base-size-16)))}.ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded=false]{background:var(--control-transparent-bgColor-selected)}.ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded=false]:after{position:absolute;top:calc(50% - 12px);left:calc(-1 * var(--base-size-8));width:var(--base-size-4);height:var(--base-size-24);content:"";background:var(--borderColor-accent-emphasis);border-radius:var(--borderRadius-medium)}: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)}:is(:is(.ActionListContent[aria-checked=true],.ActionListContent[aria-selected=true]) .FormControl-checkbox):before{visibility:visible;transition:visibility linear;animation:checkmarkIn 80ms cubic-bezier(.65,0,.35,1) 80ms forwards}:is(.ActionListContent[aria-checked=true],.ActionListContent[aria-selected=true]) .ActionListItem-singleSelectCheckmark{visibility:visible}:is(.ActionListContent[aria-checked=false],.ActionListContent[aria-selected=false]) .ActionListItem-singleSelectCheckmark{visibility:hidden;transition:visibility 0s linear .2s}.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{grid-area:label;display:flex;flex-direction:column;gap:var(--base-size-4)}.ActionListItem-descriptionWrap--inline{position:relative;flex-direction:row;align-items:baseline;gap:var(--base-size-8)}.ActionListItem-description{font-size:var(--text-body-size-small);font-weight:var(--base-text-weight-normal);line-height:var(--text-body-lineHeight-small);color:var(--fgColor-muted)}.ActionListItem-action,.ActionListItem-visual{display:flex;min-height:var(--base-size-20);color:var(--fgColor-muted);pointer-events:none;fill:var(--fgColor-muted);align-items:center}.ActionListItem-label{position:relative;font-size:var(--text-body-size-medium);font-weight:var(--base-text-weight-normal);line-height:var(--text-body-lineHeight-medium);color:var(--fgColor-default);grid-area:label}.ActionListItem-label--truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ActionList-sectionDivider:not(:empty),.ActionListItem--subItem>.ActionListContent>.ActionListItem-label{font-size:var(--text-body-size-small);line-height:var(--text-body-lineHeight-small)}.ActionListItem--withActions{display:flex;flex-wrap:nowrap;align-items:center}.ActionListItem-trailingAction{border-top-left-radius:0;border-bottom-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){display:flex;font-weight:var(--base-text-weight-semibold);color:var(--fgColor-muted);flex-direction:column;padding-inline:var(--actionListContent-paddingBlock);padding-block:var(--base-size-8)}.ActionList-sectionDivider:empty{display:block;height:var(--borderWidth-thin);padding:0;margin-block-start:calc(var(--base-size-8) - var(--borderWidth-thin));margin-block-end:var(--base-size-8);margin-inline:calc(-1 * var(--base-size-8));list-style:none;background:var(--borderColor-muted);border:0}.ActionList-sectionDivider .ActionList-sectionDivider-title{font-size:var(--text-body-size-small);font-weight:var(--base-text-weight-semibold);color:var(--fgColor-muted);align-self:flex-start}.ActionList-sectionDivider--filled{margin-block-start:calc(var(--base-size-8) - var(--borderWidth-thin));margin-block-end:var(--base-size-8);margin-inline:calc(-1 * var(--base-size-8));background:var(--bgColor-muted);border-top:solid var(--borderWidth-thin) var(--borderColor-muted,var(--color-action-list-item-inline-divider));border-bottom:solid var(--borderWidth-thin) var(--borderColor-muted,var(--color-action-list-item-inline-divider))}.ActionList-sectionDivider--filled:empty{height:var(--base-size-8);box-sizing:border-box}.ActionList-sectionDivider--filled:first-child{margin-block-start:0}
@@ -8,36 +8,25 @@
8
8
  ".ActionListWrap",
9
9
  ".ActionListWrap--inset",
10
10
  ".ActionListWrap--inset[popover]",
11
- ".ActionListWrap--divided .ActionListItem-label:before",
12
- ":is(.ActionListWrap--divided .ActionListItem-descriptionWrap--inline):before",
13
- ":is(.ActionListWrap--divided .ActionListItem-descriptionWrap--inline) .ActionListItem-label:before",
14
- ".ActionList-sectionDivider+.ActionListItem .ActionListItem-descriptionWrap--inline:before",
15
- ".ActionList-sectionDivider+.ActionListItem .ActionListItem-label:before",
16
- ".ActionListItem:first-of-type .ActionListItem-descriptionWrap--inline:before",
17
- ".ActionListItem:first-of-type .ActionListItem-label:before",
18
- ":is(.ActionListWrap--divided .ActionListItem--navActive) .ActionListItem-label:before",
19
- ":is(.ActionListWrap--divided .ActionListItem--navActive)+.ActionListItem .ActionListItem-label:before",
11
+ ".ActionListItem--divided",
12
+ ".ActionListItem--divided:where(.ActionListItem--divided:not([hidden])~.ActionListItem--divided)",
13
+ ".ActionListItem--divided:where(.ActionList-sectionDivider:not([hidden],.ActionListItem--divided[hidden]+.ActionList-sectionDivider)+.ActionListItem--divided)",
14
+ ".ActionListItem--divided:where(.ActionListItem:hover,.ActionListItem:hover+.ActionListItem--divided)",
15
+ ".ActionListItem--divided:where(.ActionListItem:active,.ActionListItem:active+.ActionListItem--divided)",
16
+ ".ActionListItem--divided:where(.ActionListItem:has(:focus-visible),.ActionListItem:has(:focus-visible)+.ActionListItem--divided)",
17
+ ".ActionListItem--divided>.ActionListContent:before",
18
+ ".ActionListItem--divided>form>.ActionListContent:before",
20
19
  ".ActionListItem",
21
20
  ".ActionListItem:active",
22
21
  ".ActionListItem:hover",
23
- ".ActionListItem:hover .ActionListItem-descriptionWrap--inline:before",
24
- ".ActionListItem:hover .ActionListItem-label:before",
25
- ".ActionListItem:hover+.ActionListItem .ActionListItem-descriptionWrap--inline:before",
26
- ".ActionListItem:hover+.ActionListItem .ActionListItem-label:before",
27
- ":is(.ActionListItem.ActionListItem--hasSubItem>.ActionListContent):hover",
28
22
  ".ActionListItem[hidden]+.ActionList-sectionDivider",
29
23
  ".ActionListItem.ActionListItem--hasSubItem>.ActionListContent",
24
+ ":is(.ActionListItem.ActionListItem--hasSubItem>.ActionListContent):hover",
30
25
  ":is(.ActionListItem.ActionListItem--hasSubItem>.ActionListContent):active",
31
26
  ":is(.ActionListItem:not(.ActionListItem--hasSubItem),.ActionListItem.ActionListItem--hasSubItem>.ActionListContent):hover",
32
27
  ":is(.ActionListItem:not(.ActionListItem--hasSubItem),.ActionListItem.ActionListItem--hasSubItem>.ActionListContent):hover:not(.ActionListItem--navActive,:focus-visible)",
33
28
  ":is(.ActionListItem:not(.ActionListItem--hasSubItem),.ActionListItem.ActionListItem--hasSubItem>.ActionListContent):active",
34
29
  ":is(.ActionListItem:not(.ActionListItem--hasSubItem),.ActionListItem.ActionListItem--hasSubItem>.ActionListContent):active:not(.ActionListItem--navActive)",
35
- ".ActionListItem.ActionListItem--navActive:not(.ActionListItem--danger)+.ActionListItem:before",
36
- ".ActionListItem.ActionListItem--navActive:not(.ActionListItem--danger):before",
37
- ".ActionListItem[aria-selected=true]+.ActionListItem:before",
38
- ".ActionListItem[aria-selected=true]:before",
39
- ":is(.ActionListItem:not(.ActionListItem--hasSubItem),.ActionListItem.ActionListItem--hasSubItem>.ActionListContent):active .ActionListItem-label:before",
40
- ":is(.ActionListItem:not(.ActionListItem--hasSubItem),.ActionListItem.ActionListItem--hasSubItem>.ActionListContent):active+.ActionListItem .ActionListItem-label:before",
41
30
  ".ActionListItem[aria-selected=true]",
42
31
  ".ActionListItem[aria-selected=true]:hover",
43
32
  ".ActionListItem[aria-selected=true]:after",
@@ -76,8 +65,6 @@
76
65
  ".ActionListContent[aria-expanded=false] .ActionListItem-collapseIcon",
77
66
  ".ActionListContent[aria-expanded=false]+.ActionList--subGroup",
78
67
  ".ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded=false]",
79
- ".ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded=false]+.ActionListItem:before",
80
- ".ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded=false]:before",
81
68
  ".ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded=false]:after",
82
69
  ":is(.ActionListContent[aria-checked=true],.ActionListContent[aria-selected=true]) .FormControl-checkbox",
83
70
  ":is(:is(.ActionListContent[aria-checked=true],.ActionListContent[aria-selected=true]) .FormControl-checkbox):before",
@@ -1 +1 @@
1
- {"version":3,"sources":["action_list.pcss","../../../../lib/postcss_mixins/activeIndicatorLine.pcss"],"names":[],"mappings":"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","file":"action_list.css","sourcesContent":["/* stylelint-disable selector-max-compound-selectors */\n/* stylelint-disable selector-max-specificity */\n/* stylelint-disable max-nesting-depth */\n:root {\n --actionListContent-paddingBlock: var(--control-medium-paddingBlock);\n}\n\n/* ActionList */\n\n/* stylelint-disable-next-line selector-max-type */\naction-list {\n display: block;\n}\n\n/* stylelint-disable-next-line selector-max-type */\nnav-list {\n display: block;\n}\n\n.ActionListHeader {\n margin-bottom: var(--base-size-16);\n margin-left: var(--base-size-8);\n}\n\n/* <ul> */\n.ActionListWrap {\n list-style: none;\n}\n\n.ActionListWrap--inset,\n.ActionListWrap--inset[popover] {\n padding: var(--base-size-8);\n}\n\n/* list dividers */\n\n.ActionListWrap--divided {\n & .ActionListItem-label::before {\n position: absolute;\n /* stylelint-disable-next-line primer/spacing */\n top: calc(-1 * var(--actionListContent-paddingBlock));\n display: block;\n width: 100%;\n height: 1px;\n content: '';\n /* stylelint-disable-next-line primer/colors */\n background: var(--borderColor-muted);\n }\n\n /* if descriptionWrap--inline exists, move pseudo divider to wrapper */\n & .ActionListItem-descriptionWrap--inline {\n &::before {\n position: absolute;\n /* stylelint-disable-next-line primer/spacing */\n top: calc(-1 * var(--actionListContent-paddingBlock));\n display: block;\n width: 100%;\n height: var(--borderWidth-thin);\n content: '';\n /* stylelint-disable-next-line primer/colors */\n background: var(--borderColor-muted);\n }\n\n /* unset the default label pseudo */\n & .ActionListItem-label::before {\n content: unset;\n }\n }\n\n /* hide divider if item is active */\n & .ActionListItem--navActive {\n & .ActionListItem-label::before,\n & + .ActionListItem .ActionListItem-label::before {\n visibility: hidden;\n }\n }\n}\n\n/* hide if item is first of type with label::before, or is the first item after a sectionDivider */\n.ActionListItem:first-of-type .ActionListItem-label::before,\n.ActionList-sectionDivider + .ActionListItem .ActionListItem-label::before {\n visibility: hidden;\n}\n\n/* hide if item is first of type with label::before, or is the first item after a sectionDivider */\n.ActionListItem:first-of-type .ActionListItem-descriptionWrap--inline::before,\n.ActionList-sectionDivider + .ActionListItem .ActionListItem-descriptionWrap--inline::before {\n visibility: hidden;\n}\n\n/* ActionList::Item */\n\n.ActionListItem {\n position: relative;\n list-style: none;\n background-color: var(--control-transparent-bgColor-rest);\n border-radius: var(--borderRadius-medium);\n\n /* state */\n\n &:hover,\n &:active {\n cursor: pointer;\n }\n\n /* hide dividers */\n @media (hover: hover) {\n &:hover {\n & .ActionListItem-label::before,\n & + .ActionListItem .ActionListItem-label::before {\n visibility: hidden;\n }\n\n & .ActionListItem-descriptionWrap--inline::before,\n & + .ActionListItem .ActionListItem-descriptionWrap--inline::before {\n visibility: hidden;\n }\n }\n }\n\n /* Make sure that the first visible item isn't a divider */\n &[hidden] + .ActionList-sectionDivider {\n display: none;\n }\n\n /* collapse styles here */\n &.ActionListItem--hasSubItem {\n /* first child */\n & > .ActionListContent {\n z-index: 1;\n\n @media (hover: hover) {\n &:hover {\n background-color: var(--control-transparent-bgColor-hover);\n }\n }\n\n &:active {\n background-color: var(--control-transparent-bgColor-active);\n }\n }\n }\n\n /* only hover li without list as children */\n &:not(.ActionListItem--hasSubItem),\n /* target contents of first child li if sub-item (li wraps item label + nested ul) */\n &.ActionListItem--hasSubItem > .ActionListContent {\n @media (hover: hover) {\n &:hover {\n cursor: pointer;\n background-color: var(--control-transparent-bgColor-hover);\n\n &:not(.ActionListItem--navActive, :focus-visible) {\n /* Support for \"Windows high contrast mode\" */\n outline: solid var(--borderWidth-thin) transparent;\n outline-offset: calc(-1 * var(--borderWidth-thin));\n box-shadow: var(--boxShadow-thin) var(--control-transparent-borderColor-active);\n }\n }\n }\n\n &:active {\n background: var(--control-transparent-bgColor-active);\n\n &:not(.ActionListItem--navActive) {\n /* Support for \"Windows high contrast mode\" https:sarahmhigley.com/writing/whcm-quick-tips/ */\n outline: solid var(--borderWidth-thin) transparent;\n outline-offset: calc(-1 * var(--borderWidth-thin));\n box-shadow: var(--boxShadow-thin) var(--control-transparent-borderColor-active);\n }\n\n & .ActionListItem-label::before,\n & + .ActionListItem .ActionListItem-label::before {\n visibility: hidden;\n }\n }\n }\n\n /* Autocomplete [aria-selected] items */\n\n &[aria-selected='true'] {\n font-weight: var(--base-text-weight-normal);\n background: var(--control-transparent-bgColor-selected);\n\n @media (hover: hover) {\n &:hover {\n background-color: var(--control-transparent-bgColor-hover);\n }\n }\n\n &::before,\n & + .ActionListItem::before {\n visibility: hidden;\n }\n\n /* blue accent line */\n\n &::after {\n @mixin activeIndicatorLine calc(-1 * var(--base-size-4));\n }\n }\n\n /* active state [aria-current] */\n\n &.ActionListItem--navActive {\n /* provides a visual indication of the current item for Windows high-contrast mode */\n outline: 2px solid transparent;\n\n &:not(.ActionListItem--subItem) {\n & .ActionListItem-label {\n font-weight: var(--base-text-weight-semibold);\n }\n }\n\n &:not(.ActionListItem--danger) {\n background: var(--control-transparent-bgColor-selected);\n\n @media (hover: hover) {\n &:hover {\n background-color: var(--control-transparent-bgColor-hover);\n }\n }\n\n &::before,\n & + .ActionListItem::before {\n visibility: hidden;\n }\n\n /* blue accent line */\n &::after {\n @mixin activeIndicatorLine;\n }\n }\n }\n\n /* disabled */\n\n &.ActionListItem--disabled,\n &[aria-disabled='true'] {\n & .ActionListContent {\n & .ActionListItem-label,\n & .ActionListItem-description {\n color: var(--control-fgColor-disabled);\n }\n\n & .ActionListItem-visual {\n fill: var(--control-fgColor-disabled);\n }\n }\n\n @media (hover: hover) {\n &:hover {\n cursor: not-allowed;\n background-color: transparent;\n }\n }\n }\n\n /* variants */\n\n /* danger */\n &.ActionListItem--danger {\n & .ActionListItem-label {\n color: var(--control-danger-fgColor-rest);\n }\n\n & .ActionListItem-visual {\n color: var(--control-danger-fgColor-rest);\n }\n\n @media (hover: hover) {\n &:hover {\n background: var(--control-danger-bgColor-hover);\n\n & .ActionListItem-label,\n & .ActionListItem-visual,\n & .ActionListItem-description {\n color: var(--control-danger-fgColor-hover);\n }\n\n /* NOTE: OpenProject addition, see DREAM-867 */\n & [data-kbd-chord] {\n background-color: var(--bgColor-default);\n transition: none;\n }\n }\n }\n\n & .ActionListContent {\n &:active {\n background: var(--control-danger-bgColor-active);\n\n & .ActionListItem-label,\n & .ActionListItem-visual,\n & .ActionListItem-description {\n color: var(--control-danger-fgColor-hover);\n }\n\n /* NOTE: OpenProject addition, see DREAM-867 */\n & [data-kbd-chord] {\n background-color: var(--bgColor-default);\n transition: none;\n }\n }\n }\n }\n}\n\n/* button or a href */\n.ActionListContent {\n position: relative;\n display: grid;\n width: 100%;\n /* stylelint-disable-next-line primer/spacing */\n padding-block: var(--actionListContent-paddingBlock);\n padding-inline: var(--control-medium-paddingInline-condensed);\n color: var(--control-fgColor-rest);\n text-align: left;\n user-select: none;\n background-color: transparent;\n border: none;\n border-radius: var(--borderRadius-medium);\n transition: background 33.333ms linear;\n touch-action: manipulation;\n -webkit-tap-highlight-color: transparent;\n grid-template-rows: min-content;\n grid-template-areas: 'leadingAction leadingVisual label trailingVisual trailingAction';\n grid-template-columns: min-content min-content minmax(0, auto) min-content min-content;\n align-items: start;\n\n /* column-gap persists with empty grid-areas, margin applies only when children exist */\n & > :not(:last-child) {\n margin-right: var(--control-medium-gap);\n }\n\n /* state */\n\n &:hover {\n text-decoration: none;\n }\n\n /* disabled */\n &[aria-disabled='true'] {\n & .ActionListItem-label,\n & .ActionListItem-description {\n color: var(--control-fgColor-disabled);\n }\n\n & .ActionListItem-visual {\n fill: var(--control-fgColor-disabled);\n }\n\n @media (hover: hover) {\n &:hover {\n cursor: not-allowed;\n background-color: transparent;\n }\n }\n }\n\n /* collapsible item [aria-expanded] */\n\n /* nesting (single level)\n target items inside expanded subgroups */\n &[aria-expanded] {\n & + .ActionList--subGroup {\n @media screen and (prefers-reduced-motion: no-preference) {\n transition:\n opacity 160ms cubic-bezier(0.25, 1, 0.5, 1),\n transform 160ms cubic-bezier(0.25, 1, 0.5, 1);\n }\n\n & .ActionListContent {\n padding-left: var(--base-size-24);\n }\n }\n\n /* has 16px leading visual */\n &.ActionListContent--visual16 + .ActionList--subGroup {\n & .ActionListContent {\n padding-left: var(--base-size-32);\n }\n }\n\n /* has 20px leading visual */\n &.ActionListContent--visual20 + .ActionList--subGroup {\n & .ActionListContent {\n padding-left: var(--base-size-36);\n }\n }\n\n /* has 24px leading visual */\n &.ActionListContent--visual24 + .ActionList--subGroup {\n & .ActionListContent {\n padding-left: var(--base-size-40);\n }\n }\n }\n\n &[aria-expanded='true'] {\n & .ActionListItem-collapseIcon {\n transition: transform 120ms linear;\n transform: scaleY(-1);\n }\n\n & + .ActionList--subGroup {\n height: auto;\n overflow: visible;\n visibility: visible;\n opacity: 1;\n transform: translateY(0);\n }\n\n &.ActionListContent--hasActiveSubItem {\n & > .ActionListItem-label {\n font-weight: var(--base-text-weight-semibold);\n }\n }\n }\n\n &[aria-expanded='false'] {\n & .ActionListItem-collapseIcon {\n transition: transform 120ms linear;\n transform: scaleY(1);\n }\n\n & + .ActionList--subGroup {\n height: 0;\n overflow: hidden;\n visibility: hidden;\n opacity: 0;\n transform: translateY(calc(-1 * var(--base-size-16)));\n }\n\n /* show active indicator on parent collapse if child is active */\n &.ActionListContent--hasActiveSubItem {\n background: var(--control-transparent-bgColor-selected);\n\n & .ActionListItem-label {\n font-weight: var(--base-text-weight-semibold);\n }\n\n &::before,\n & + .ActionListItem::before {\n visibility: hidden;\n }\n\n /* blue accent line */\n &::after {\n @mixin activeIndicatorLine;\n }\n }\n }\n\n /*\n * checkbox item [aria-checked]\n * listbox [aria-selected]\n */\n &[aria-checked='true'],\n &[aria-selected='true'] {\n & .FormControl-checkbox {\n background: var(--control-checked-bgColor-rest);\n border-color: var(--control-checked-borderColor-rest);\n transition: background-color, border-color 80ms cubic-bezier(0.32, 0, 0.67, 0) 0ms; /* unchecked -> checked */\n\n &::before {\n visibility: visible;\n transition: visibility 0s linear 0s;\n animation: checkmarkIn 80ms cubic-bezier(0.65, 0, 0.35, 1) forwards 80ms;\n }\n }\n\n /* singleselect checkmark */\n & .ActionListItem-singleSelectCheckmark {\n visibility: visible;\n }\n }\n\n &[aria-checked='false'],\n &[aria-selected='false'] {\n /* singleselect checkmark */\n & .ActionListItem-singleSelectCheckmark {\n visibility: hidden;\n transition: visibility 0s linear 200ms;\n }\n }\n\n /* sizes */\n\n &.ActionListContent--sizeLarge {\n --actionListContent-paddingBlock: var(--control-large-paddingBlock);\n }\n\n &.ActionListContent--sizeXLarge {\n --actionListContent-paddingBlock: var(--control-xlarge-paddingBlock);\n }\n\n /* On pointer:coarse (mobile), all list items are large */\n @media (pointer: coarse) {\n --actionListContent-paddingBlock: var(--control-large-paddingBlock);\n }\n\n &.ActionListContent--blockDescription {\n /* if leading/trailing visual, align with first line of content */\n & .ActionListItem-visual {\n place-self: start;\n }\n }\n}\n\n/* place children on grid */\n\n.ActionListItem-action--leading {\n grid-area: leadingAction;\n}\n\n.ActionListItem-visual--leading {\n grid-area: leadingVisual;\n}\n\n.ActionListItem-visual--trailing {\n grid-area: trailingVisual;\n}\n\n.ActionListItem-action--trailing {\n grid-area: trailingAction;\n}\n\n/* have leading visual svg filled with chosen color */\n\n/* stylelint-disable-next-line selector-max-type */\n.ActionListItem-visual--leading svg {\n fill: currentcolor;\n}\n\n/* wrapper span\n default block */\n.ActionListItem-descriptionWrap {\n grid-area: label;\n display: flex;\n flex-direction: column;\n gap: var(--base-size-4);\n\n & .ActionListItem-label {\n font-weight: var(--base-text-weight-semibold);\n }\n}\n\n/* inline */\n.ActionListItem-descriptionWrap--inline {\n position: relative;\n flex-direction: row;\n align-items: baseline;\n gap: var(--base-size-8);\n}\n\n/* description */\n.ActionListItem-description {\n font-size: var(--text-body-size-small);\n font-weight: var(--base-text-weight-normal);\n line-height: var(--text-body-lineHeight-small);\n color: var(--fgColor-muted);\n}\n\n/* helper for grid alignment with multi-line content\n span wrapping svg or text */\n.ActionListItem-visual,\n.ActionListItem-action {\n display: flex;\n min-height: var(--base-size-20);\n color: var(--fgColor-muted);\n pointer-events: none;\n fill: var(--fgColor-muted);\n align-items: center;\n}\n\n/* text */\n.ActionListItem-label {\n position: relative;\n font-size: var(--text-body-size-medium);\n font-weight: var(--base-text-weight-normal);\n line-height: var(--text-body-lineHeight-medium);\n color: var(--fgColor-default);\n grid-area: label;\n}\n\n.ActionListItem-label--truncate {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n/* nested lists (only supports 1 level currently)\n target ActionListItem--subItem for padding-left to maintain :active :after state */\n\n.ActionListItem--subItem > .ActionListContent > .ActionListItem-label {\n font-size: var(--text-body-size-small);\n line-height: var(--text-body-lineHeight-small);\n}\n\n/* trailing action icon button */\n\n.ActionListItem--withActions {\n display: flex;\n flex-wrap: nowrap;\n align-items: center;\n}\n\n.ActionListItem-trailingAction {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n\n/* show trailing action button on hover */\n\n.ActionListItem--trailingActionHover {\n & .ActionListItem-trailingAction {\n visibility: hidden;\n }\n\n &:hover,\n &:focus-within {\n & .ActionListItem-trailingAction {\n visibility: visible;\n }\n }\n}\n\n/* ActionList::Divider */\n\n.ActionList-sectionDivider {\n /* with children */\n &:not(:empty) {\n display: flex;\n font-size: var(--text-body-size-small);\n font-weight: var(--base-text-weight-semibold);\n line-height: var(--text-body-lineHeight-small);\n color: var(--fgColor-muted);\n flex-direction: column;\n /* stylelint-disable-next-line primer/spacing */\n padding-inline: var(--actionListContent-paddingBlock);\n padding-block: var(--base-size-8);\n }\n\n /* no children */\n &:empty {\n display: block;\n height: var(--borderWidth-thin);\n padding: 0;\n /* stylelint-disable-next-line primer/spacing */\n margin-block-start: calc(var(--base-size-8) - var(--borderWidth-thin));\n margin-block-end: var(--base-size-8);\n margin-inline: calc(-1 * var(--base-size-8));\n list-style: none;\n /* stylelint-disable-next-line primer/colors */\n background: var(--borderColor-muted);\n border: 0;\n }\n\n & .ActionList-sectionDivider-title {\n font-size: var(--text-body-size-small);\n font-weight: var(--base-text-weight-semibold);\n color: var(--fgColor-muted);\n align-self: flex-start;\n }\n}\n\n.ActionList-sectionDivider--filled {\n /* stylelint-disable-next-line primer/spacing */\n margin-block-start: calc(var(--base-size-8) - var(--borderWidth-thin));\n margin-block-end: var(--base-size-8);\n margin-inline: calc(-1 * var(--base-size-8));\n background: var(--bgColor-muted);\n border-top: solid var(--borderWidth-thin) var(--borderColor-muted, var(--color-action-list-item-inline-divider));\n border-bottom: solid var(--borderWidth-thin) var(--borderColor-muted, var(--color-action-list-item-inline-divider));\n\n /* if no children, treat as divider */\n &:empty {\n height: var(--base-size-8);\n box-sizing: border-box;\n }\n\n &:first-child {\n margin-block-start: 0;\n }\n}\n","/* active indicator line for navlist items */\n@define-mixin activeIndicatorLine $padding-left: calc(-1 * var(--base-size-8)) {\n position: absolute;\n top: calc(50% - 12px);\n left: $padding-left;\n width: var(--base-size-4);\n height: var(--base-size-24);\n content: '';\n background: var(--borderColor-accent-emphasis);\n border-radius: var(--borderRadius-medium);\n}\n"]}
1
+ {"version":3,"sources":["action_list.pcss","../../../../lib/postcss_mixins/activeIndicatorLine.pcss"],"names":[],"mappings":"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","file":"action_list.css","sourcesContent":["/* stylelint-disable selector-max-specificity */\n/* stylelint-disable max-nesting-depth */\n:root {\n --actionListContent-paddingBlock: var(--control-medium-paddingBlock);\n}\n\n/* ActionList */\n\n/* stylelint-disable-next-line selector-max-type */\naction-list {\n display: block;\n}\n\n/* stylelint-disable-next-line selector-max-type */\nnav-list {\n display: block;\n}\n\n.ActionListHeader {\n margin-bottom: var(--base-size-16);\n margin-left: var(--base-size-8);\n}\n\n/* <ul> */\n.ActionListWrap {\n list-style: none;\n}\n\n.ActionListWrap--inset,\n.ActionListWrap--inset[popover] {\n padding: var(--base-size-8);\n}\n\n/* List dividers. Behaviour is pinned by test/playwright/action_list_dividers.test.ts. */\n\n/* Hides the line above $item and the line above the item after it. */\n@define-mixin dividerHiddenAround $item {\n &:where($(item), $(item) + .ActionListItem--divided) {\n --actionListItem-dividerVisibility: hidden;\n }\n}\n\n/* Only `Primer::Alpha::ActionList` itself supports dividers, see `show_dividers` there. */\n.ActionListItem--divided {\n --actionListItem-dividerVisibility: hidden;\n\n /* Only items with a visible item before them get a line */\n &:where(.ActionListItem--divided:not([hidden]) ~ .ActionListItem--divided) {\n --actionListItem-dividerVisibility: visible;\n }\n\n /*\n * A manually added divider already separates the items. A divider that follows a hidden item\n * is collapsed (see `&[hidden] + .ActionList-sectionDivider` below) and separates nothing.\n */\n &:where(.ActionList-sectionDivider:not([hidden], .ActionListItem--divided[hidden] + .ActionList-sectionDivider) + .ActionListItem--divided) {\n --actionListItem-dividerVisibility: hidden;\n }\n\n @media (hover: hover) {\n @mixin dividerHiddenAround .ActionListItem:hover;\n }\n\n @mixin dividerHiddenAround .ActionListItem:active;\n @mixin dividerHiddenAround .ActionListItem:has(:focus-visible);\n\n & > .ActionListContent::before,\n /* Items with non-GET form_arguments wrap their content in a form */\n /* stylelint-disable-next-line selector-max-type */\n & > form > .ActionListContent::before {\n position: absolute;\n top: 0;\n right: 0;\n left: 0;\n height: var(--borderWidth-thin);\n /*\n * The line starts at the label, so it does not divide leading visuals. A `trailing_action`\n * button sits outside this grid, so the line stops short of it.\n */\n grid-column: label-start / trailingAction-end;\n visibility: var(--actionListItem-dividerVisibility);\n content: '';\n /* stylelint-disable-next-line primer/colors */\n background: var(--borderColor-muted);\n }\n}\n\n/* ActionList::Item */\n\n.ActionListItem {\n position: relative;\n list-style: none;\n background-color: var(--control-transparent-bgColor-rest);\n border-radius: var(--borderRadius-medium);\n\n /* state */\n\n &:hover,\n &:active {\n cursor: pointer;\n }\n\n /* Make sure that the first visible item isn't a divider */\n &[hidden] + .ActionList-sectionDivider {\n display: none;\n }\n\n /* collapse styles here */\n &.ActionListItem--hasSubItem {\n /* first child */\n & > .ActionListContent {\n z-index: 1;\n\n @media (hover: hover) {\n &:hover {\n background-color: var(--control-transparent-bgColor-hover);\n }\n }\n\n &:active {\n background-color: var(--control-transparent-bgColor-active);\n }\n }\n }\n\n /* only hover li without list as children */\n &:not(.ActionListItem--hasSubItem),\n /* target contents of first child li if sub-item (li wraps item label + nested ul) */\n &.ActionListItem--hasSubItem > .ActionListContent {\n @media (hover: hover) {\n &:hover {\n cursor: pointer;\n background-color: var(--control-transparent-bgColor-hover);\n\n &:not(.ActionListItem--navActive, :focus-visible) {\n /* Support for \"Windows high contrast mode\" */\n outline: solid var(--borderWidth-thin) transparent;\n outline-offset: calc(-1 * var(--borderWidth-thin));\n box-shadow: var(--boxShadow-thin) var(--control-transparent-borderColor-active);\n }\n }\n }\n\n &:active {\n background: var(--control-transparent-bgColor-active);\n\n &:not(.ActionListItem--navActive) {\n /* Support for \"Windows high contrast mode\" https:sarahmhigley.com/writing/whcm-quick-tips/ */\n outline: solid var(--borderWidth-thin) transparent;\n outline-offset: calc(-1 * var(--borderWidth-thin));\n box-shadow: var(--boxShadow-thin) var(--control-transparent-borderColor-active);\n }\n }\n }\n\n /* Autocomplete [aria-selected] items */\n\n &[aria-selected='true'] {\n font-weight: var(--base-text-weight-normal);\n background: var(--control-transparent-bgColor-selected);\n\n @media (hover: hover) {\n &:hover {\n background-color: var(--control-transparent-bgColor-hover);\n }\n }\n\n /* blue accent line */\n\n &::after {\n @mixin activeIndicatorLine calc(-1 * var(--base-size-4));\n }\n }\n\n /* active state [aria-current] */\n\n &.ActionListItem--navActive {\n /* provides a visual indication of the current item for Windows high-contrast mode */\n outline: 2px solid transparent;\n\n &:not(.ActionListItem--subItem) {\n & .ActionListItem-label {\n font-weight: var(--base-text-weight-semibold);\n }\n }\n\n &:not(.ActionListItem--danger) {\n background: var(--control-transparent-bgColor-selected);\n\n @media (hover: hover) {\n &:hover {\n background-color: var(--control-transparent-bgColor-hover);\n }\n }\n\n /* blue accent line */\n &::after {\n @mixin activeIndicatorLine;\n }\n }\n }\n\n /* disabled */\n\n &.ActionListItem--disabled,\n &[aria-disabled='true'] {\n & .ActionListContent {\n & .ActionListItem-label,\n & .ActionListItem-description {\n color: var(--control-fgColor-disabled);\n }\n\n & .ActionListItem-visual {\n fill: var(--control-fgColor-disabled);\n }\n }\n\n @media (hover: hover) {\n &:hover {\n cursor: not-allowed;\n background-color: transparent;\n }\n }\n }\n\n /* variants */\n\n /* danger */\n &.ActionListItem--danger {\n & .ActionListItem-label {\n color: var(--control-danger-fgColor-rest);\n }\n\n & .ActionListItem-visual {\n color: var(--control-danger-fgColor-rest);\n }\n\n @media (hover: hover) {\n &:hover {\n background: var(--control-danger-bgColor-hover);\n\n & .ActionListItem-label,\n & .ActionListItem-visual,\n & .ActionListItem-description {\n color: var(--control-danger-fgColor-hover);\n }\n\n /* NOTE: OpenProject addition, see DREAM-867 */\n & [data-kbd-chord] {\n background-color: var(--bgColor-default);\n transition: none;\n }\n }\n }\n\n & .ActionListContent {\n &:active {\n background: var(--control-danger-bgColor-active);\n\n & .ActionListItem-label,\n & .ActionListItem-visual,\n & .ActionListItem-description {\n color: var(--control-danger-fgColor-hover);\n }\n\n /* NOTE: OpenProject addition, see DREAM-867 */\n & [data-kbd-chord] {\n background-color: var(--bgColor-default);\n transition: none;\n }\n }\n }\n }\n}\n\n/* button or a href */\n.ActionListContent {\n position: relative;\n display: grid;\n width: 100%;\n /* stylelint-disable-next-line primer/spacing */\n padding-block: var(--actionListContent-paddingBlock);\n padding-inline: var(--control-medium-paddingInline-condensed);\n color: var(--control-fgColor-rest);\n text-align: left;\n user-select: none;\n background-color: transparent;\n border: none;\n border-radius: var(--borderRadius-medium);\n transition: background 33.333ms linear;\n touch-action: manipulation;\n -webkit-tap-highlight-color: transparent;\n grid-template-rows: min-content;\n grid-template-areas: 'leadingAction leadingVisual label trailingVisual trailingAction';\n grid-template-columns: min-content min-content minmax(0, auto) min-content min-content;\n align-items: start;\n\n /* column-gap persists with empty grid-areas, margin applies only when children exist */\n & > :not(:last-child) {\n margin-right: var(--control-medium-gap);\n }\n\n /* state */\n\n &:hover {\n text-decoration: none;\n }\n\n /* disabled */\n &[aria-disabled='true'] {\n & .ActionListItem-label,\n & .ActionListItem-description {\n color: var(--control-fgColor-disabled);\n }\n\n & .ActionListItem-visual {\n fill: var(--control-fgColor-disabled);\n }\n\n @media (hover: hover) {\n &:hover {\n cursor: not-allowed;\n background-color: transparent;\n }\n }\n }\n\n /* collapsible item [aria-expanded] */\n\n /* nesting (single level)\n target items inside expanded subgroups */\n &[aria-expanded] {\n & + .ActionList--subGroup {\n @media screen and (prefers-reduced-motion: no-preference) {\n transition:\n opacity 160ms cubic-bezier(0.25, 1, 0.5, 1),\n transform 160ms cubic-bezier(0.25, 1, 0.5, 1);\n }\n\n & .ActionListContent {\n padding-left: var(--base-size-24);\n }\n }\n\n /* has 16px leading visual */\n &.ActionListContent--visual16 + .ActionList--subGroup {\n & .ActionListContent {\n padding-left: var(--base-size-32);\n }\n }\n\n /* has 20px leading visual */\n &.ActionListContent--visual20 + .ActionList--subGroup {\n & .ActionListContent {\n padding-left: var(--base-size-36);\n }\n }\n\n /* has 24px leading visual */\n &.ActionListContent--visual24 + .ActionList--subGroup {\n & .ActionListContent {\n padding-left: var(--base-size-40);\n }\n }\n }\n\n &[aria-expanded='true'] {\n & .ActionListItem-collapseIcon {\n transition: transform 120ms linear;\n transform: scaleY(-1);\n }\n\n & + .ActionList--subGroup {\n height: auto;\n overflow: visible;\n visibility: visible;\n opacity: 1;\n transform: translateY(0);\n }\n\n &.ActionListContent--hasActiveSubItem {\n & > .ActionListItem-label {\n font-weight: var(--base-text-weight-semibold);\n }\n }\n }\n\n &[aria-expanded='false'] {\n & .ActionListItem-collapseIcon {\n transition: transform 120ms linear;\n transform: scaleY(1);\n }\n\n & + .ActionList--subGroup {\n height: 0;\n overflow: hidden;\n visibility: hidden;\n opacity: 0;\n transform: translateY(calc(-1 * var(--base-size-16)));\n }\n\n /* show active indicator on parent collapse if child is active */\n &.ActionListContent--hasActiveSubItem {\n background: var(--control-transparent-bgColor-selected);\n\n & .ActionListItem-label {\n font-weight: var(--base-text-weight-semibold);\n }\n\n /* blue accent line */\n &::after {\n @mixin activeIndicatorLine;\n }\n }\n }\n\n /*\n * checkbox item [aria-checked]\n * listbox [aria-selected]\n */\n &[aria-checked='true'],\n &[aria-selected='true'] {\n & .FormControl-checkbox {\n background: var(--control-checked-bgColor-rest);\n border-color: var(--control-checked-borderColor-rest);\n transition: background-color, border-color 80ms cubic-bezier(0.32, 0, 0.67, 0) 0ms; /* unchecked -> checked */\n\n &::before {\n visibility: visible;\n transition: visibility 0s linear 0s;\n animation: checkmarkIn 80ms cubic-bezier(0.65, 0, 0.35, 1) forwards 80ms;\n }\n }\n\n /* singleselect checkmark */\n & .ActionListItem-singleSelectCheckmark {\n visibility: visible;\n }\n }\n\n &[aria-checked='false'],\n &[aria-selected='false'] {\n /* singleselect checkmark */\n & .ActionListItem-singleSelectCheckmark {\n visibility: hidden;\n transition: visibility 0s linear 200ms;\n }\n }\n\n /* sizes */\n\n &.ActionListContent--sizeLarge {\n --actionListContent-paddingBlock: var(--control-large-paddingBlock);\n }\n\n &.ActionListContent--sizeXLarge {\n --actionListContent-paddingBlock: var(--control-xlarge-paddingBlock);\n }\n\n /* On pointer:coarse (mobile), all list items are large */\n @media (pointer: coarse) {\n --actionListContent-paddingBlock: var(--control-large-paddingBlock);\n }\n\n &.ActionListContent--blockDescription {\n /* if leading/trailing visual, align with first line of content */\n & .ActionListItem-visual {\n place-self: start;\n }\n }\n}\n\n/* place children on grid */\n\n.ActionListItem-action--leading {\n grid-area: leadingAction;\n}\n\n.ActionListItem-visual--leading {\n grid-area: leadingVisual;\n}\n\n.ActionListItem-visual--trailing {\n grid-area: trailingVisual;\n}\n\n.ActionListItem-action--trailing {\n grid-area: trailingAction;\n}\n\n/* have leading visual svg filled with chosen color */\n\n/* stylelint-disable-next-line selector-max-type */\n.ActionListItem-visual--leading svg {\n fill: currentcolor;\n}\n\n/* wrapper span\n default block */\n.ActionListItem-descriptionWrap {\n grid-area: label;\n display: flex;\n flex-direction: column;\n gap: var(--base-size-4);\n\n & .ActionListItem-label {\n font-weight: var(--base-text-weight-semibold);\n }\n}\n\n/* inline */\n.ActionListItem-descriptionWrap--inline {\n position: relative;\n flex-direction: row;\n align-items: baseline;\n gap: var(--base-size-8);\n}\n\n/* description */\n.ActionListItem-description {\n font-size: var(--text-body-size-small);\n font-weight: var(--base-text-weight-normal);\n line-height: var(--text-body-lineHeight-small);\n color: var(--fgColor-muted);\n}\n\n/* helper for grid alignment with multi-line content\n span wrapping svg or text */\n.ActionListItem-visual,\n.ActionListItem-action {\n display: flex;\n min-height: var(--base-size-20);\n color: var(--fgColor-muted);\n pointer-events: none;\n fill: var(--fgColor-muted);\n align-items: center;\n}\n\n/* text */\n.ActionListItem-label {\n position: relative;\n font-size: var(--text-body-size-medium);\n font-weight: var(--base-text-weight-normal);\n line-height: var(--text-body-lineHeight-medium);\n color: var(--fgColor-default);\n grid-area: label;\n}\n\n.ActionListItem-label--truncate {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n/* nested lists (only supports 1 level currently)\n target ActionListItem--subItem for padding-left to maintain :active :after state */\n\n.ActionListItem--subItem > .ActionListContent > .ActionListItem-label {\n font-size: var(--text-body-size-small);\n line-height: var(--text-body-lineHeight-small);\n}\n\n/* trailing action icon button */\n\n.ActionListItem--withActions {\n display: flex;\n flex-wrap: nowrap;\n align-items: center;\n}\n\n.ActionListItem-trailingAction {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n\n/* show trailing action button on hover */\n\n.ActionListItem--trailingActionHover {\n & .ActionListItem-trailingAction {\n visibility: hidden;\n }\n\n &:hover,\n &:focus-within {\n & .ActionListItem-trailingAction {\n visibility: visible;\n }\n }\n}\n\n/* ActionList::Divider */\n\n.ActionList-sectionDivider {\n /* with children */\n &:not(:empty) {\n display: flex;\n font-size: var(--text-body-size-small);\n font-weight: var(--base-text-weight-semibold);\n line-height: var(--text-body-lineHeight-small);\n color: var(--fgColor-muted);\n flex-direction: column;\n /* stylelint-disable-next-line primer/spacing */\n padding-inline: var(--actionListContent-paddingBlock);\n padding-block: var(--base-size-8);\n }\n\n /* no children */\n &:empty {\n display: block;\n height: var(--borderWidth-thin);\n padding: 0;\n /* stylelint-disable-next-line primer/spacing */\n margin-block-start: calc(var(--base-size-8) - var(--borderWidth-thin));\n margin-block-end: var(--base-size-8);\n margin-inline: calc(-1 * var(--base-size-8));\n list-style: none;\n /* stylelint-disable-next-line primer/colors */\n background: var(--borderColor-muted);\n border: 0;\n }\n\n & .ActionList-sectionDivider-title {\n font-size: var(--text-body-size-small);\n font-weight: var(--base-text-weight-semibold);\n color: var(--fgColor-muted);\n align-self: flex-start;\n }\n}\n\n.ActionList-sectionDivider--filled {\n /* stylelint-disable-next-line primer/spacing */\n margin-block-start: calc(var(--base-size-8) - var(--borderWidth-thin));\n margin-block-end: var(--base-size-8);\n margin-inline: calc(-1 * var(--base-size-8));\n background: var(--bgColor-muted);\n border-top: solid var(--borderWidth-thin) var(--borderColor-muted, var(--color-action-list-item-inline-divider));\n border-bottom: solid var(--borderWidth-thin) var(--borderColor-muted, var(--color-action-list-item-inline-divider));\n\n /* if no children, treat as divider */\n &:empty {\n height: var(--base-size-8);\n box-sizing: border-box;\n }\n\n &:first-child {\n margin-block-start: 0;\n }\n}\n","/* active indicator line for navlist items */\n@define-mixin activeIndicatorLine $padding-left: calc(-1 * var(--base-size-8)) {\n position: absolute;\n top: calc(50% - 12px);\n left: $padding-left;\n width: var(--base-size-4);\n height: var(--base-size-24);\n content: '';\n background: var(--borderColor-accent-emphasis);\n border-radius: var(--borderRadius-medium);\n}\n"]}
@@ -9,11 +9,7 @@
9
9
  <%= heading %>
10
10
  <% end %>
11
11
  <%= render(Primer::BaseComponent.new(tag: :ul, **@system_arguments)) do %>
12
- <% items.each_with_index do |item, index| %>
13
- <%# the conditions here make sure two dividers are never rendered one after the other %>
14
- <% if index > 0 && @show_dividers && !item.is_a?(Divider) && !items[index - 1].is_a?(Divider) %>
15
- <%= render(Primer::Alpha::ActionList::Divider.new) %>
16
- <% end %>
12
+ <% items.each do |item| %>
17
13
  <%= item %>
18
14
  <% end %>
19
15
  <% end %>
@@ -1,4 +1,3 @@
1
- /* stylelint-disable selector-max-compound-selectors */
2
1
  /* stylelint-disable selector-max-specificity */
3
2
  /* stylelint-disable max-nesting-depth */
4
3
  :root {
@@ -32,60 +31,58 @@ nav-list {
32
31
  padding: var(--base-size-8);
33
32
  }
34
33
 
35
- /* list dividers */
34
+ /* List dividers. Behaviour is pinned by test/playwright/action_list_dividers.test.ts. */
36
35
 
37
- .ActionListWrap--divided {
38
- & .ActionListItem-label::before {
39
- position: absolute;
40
- /* stylelint-disable-next-line primer/spacing */
41
- top: calc(-1 * var(--actionListContent-paddingBlock));
42
- display: block;
43
- width: 100%;
44
- height: 1px;
45
- content: '';
46
- /* stylelint-disable-next-line primer/colors */
47
- background: var(--borderColor-muted);
36
+ /* Hides the line above $item and the line above the item after it. */
37
+ @define-mixin dividerHiddenAround $item {
38
+ &:where($(item), $(item) + .ActionListItem--divided) {
39
+ --actionListItem-dividerVisibility: hidden;
48
40
  }
41
+ }
49
42
 
50
- /* if descriptionWrap--inline exists, move pseudo divider to wrapper */
51
- & .ActionListItem-descriptionWrap--inline {
52
- &::before {
53
- position: absolute;
54
- /* stylelint-disable-next-line primer/spacing */
55
- top: calc(-1 * var(--actionListContent-paddingBlock));
56
- display: block;
57
- width: 100%;
58
- height: var(--borderWidth-thin);
59
- content: '';
60
- /* stylelint-disable-next-line primer/colors */
61
- background: var(--borderColor-muted);
62
- }
43
+ /* Only `Primer::Alpha::ActionList` itself supports dividers, see `show_dividers` there. */
44
+ .ActionListItem--divided {
45
+ --actionListItem-dividerVisibility: hidden;
63
46
 
64
- /* unset the default label pseudo */
65
- & .ActionListItem-label::before {
66
- content: unset;
67
- }
47
+ /* Only items with a visible item before them get a line */
48
+ &:where(.ActionListItem--divided:not([hidden]) ~ .ActionListItem--divided) {
49
+ --actionListItem-dividerVisibility: visible;
68
50
  }
69
51
 
70
- /* hide divider if item is active */
71
- & .ActionListItem--navActive {
72
- & .ActionListItem-label::before,
73
- & + .ActionListItem .ActionListItem-label::before {
74
- visibility: hidden;
75
- }
52
+ /*
53
+ * A manually added divider already separates the items. A divider that follows a hidden item
54
+ * is collapsed (see `&[hidden] + .ActionList-sectionDivider` below) and separates nothing.
55
+ */
56
+ &:where(.ActionList-sectionDivider:not([hidden], .ActionListItem--divided[hidden] + .ActionList-sectionDivider) + .ActionListItem--divided) {
57
+ --actionListItem-dividerVisibility: hidden;
76
58
  }
77
- }
78
59
 
79
- /* hide if item is first of type with label::before, or is the first item after a sectionDivider */
80
- .ActionListItem:first-of-type .ActionListItem-label::before,
81
- .ActionList-sectionDivider + .ActionListItem .ActionListItem-label::before {
82
- visibility: hidden;
83
- }
60
+ @media (hover: hover) {
61
+ @mixin dividerHiddenAround .ActionListItem:hover;
62
+ }
63
+
64
+ @mixin dividerHiddenAround .ActionListItem:active;
65
+ @mixin dividerHiddenAround .ActionListItem:has(:focus-visible);
84
66
 
85
- /* hide if item is first of type with label::before, or is the first item after a sectionDivider */
86
- .ActionListItem:first-of-type .ActionListItem-descriptionWrap--inline::before,
87
- .ActionList-sectionDivider + .ActionListItem .ActionListItem-descriptionWrap--inline::before {
88
- visibility: hidden;
67
+ & > .ActionListContent::before,
68
+ /* Items with non-GET form_arguments wrap their content in a form */
69
+ /* stylelint-disable-next-line selector-max-type */
70
+ & > form > .ActionListContent::before {
71
+ position: absolute;
72
+ top: 0;
73
+ right: 0;
74
+ left: 0;
75
+ height: var(--borderWidth-thin);
76
+ /*
77
+ * The line starts at the label, so it does not divide leading visuals. A `trailing_action`
78
+ * button sits outside this grid, so the line stops short of it.
79
+ */
80
+ grid-column: label-start / trailingAction-end;
81
+ visibility: var(--actionListItem-dividerVisibility);
82
+ content: '';
83
+ /* stylelint-disable-next-line primer/colors */
84
+ background: var(--borderColor-muted);
85
+ }
89
86
  }
90
87
 
91
88
  /* ActionList::Item */
@@ -103,21 +100,6 @@ nav-list {
103
100
  cursor: pointer;
104
101
  }
105
102
 
106
- /* hide dividers */
107
- @media (hover: hover) {
108
- &:hover {
109
- & .ActionListItem-label::before,
110
- & + .ActionListItem .ActionListItem-label::before {
111
- visibility: hidden;
112
- }
113
-
114
- & .ActionListItem-descriptionWrap--inline::before,
115
- & + .ActionListItem .ActionListItem-descriptionWrap--inline::before {
116
- visibility: hidden;
117
- }
118
- }
119
- }
120
-
121
103
  /* Make sure that the first visible item isn't a divider */
122
104
  &[hidden] + .ActionList-sectionDivider {
123
105
  display: none;
@@ -168,11 +150,6 @@ nav-list {
168
150
  outline-offset: calc(-1 * var(--borderWidth-thin));
169
151
  box-shadow: var(--boxShadow-thin) var(--control-transparent-borderColor-active);
170
152
  }
171
-
172
- & .ActionListItem-label::before,
173
- & + .ActionListItem .ActionListItem-label::before {
174
- visibility: hidden;
175
- }
176
153
  }
177
154
  }
178
155
 
@@ -188,11 +165,6 @@ nav-list {
188
165
  }
189
166
  }
190
167
 
191
- &::before,
192
- & + .ActionListItem::before {
193
- visibility: hidden;
194
- }
195
-
196
168
  /* blue accent line */
197
169
 
198
170
  &::after {
@@ -221,11 +193,6 @@ nav-list {
221
193
  }
222
194
  }
223
195
 
224
- &::before,
225
- & + .ActionListItem::before {
226
- visibility: hidden;
227
- }
228
-
229
196
  /* blue accent line */
230
197
  &::after {
231
198
  @mixin activeIndicatorLine;
@@ -440,11 +407,6 @@ nav-list {
440
407
  font-weight: var(--base-text-weight-semibold);
441
408
  }
442
409
 
443
- &::before,
444
- & + .ActionListItem::before {
445
- visibility: hidden;
446
- }
447
-
448
410
  /* blue accent line */
449
411
  &::after {
450
412
  @mixin activeIndicatorLine;
@@ -120,13 +120,15 @@ module Primer
120
120
  }
121
121
  }
122
122
 
123
- attr_reader :id, :select_variant, :role, :aria_selection_variant
123
+ attr_reader :id, :select_variant, :role, :aria_selection_variant, :show_dividers
124
124
 
125
125
  # @param id [String] HTML ID value.
126
126
  # @param role [Boolean] ARIA role describing the function of the list. listbox and menu are a common values.
127
127
  # @param item_classes [String] Additional CSS classes to attach to items.
128
128
  # @param scheme [Symbol] <%= one_of(Primer::Alpha::ActionList::SCHEME_OPTIONS) %> `inset` children are offset (vertically and horizontally) from list edges. `full` (default) children are flush (vertically and horizontally) with list edges.
129
- # @param show_dividers [Boolean] Display a divider above each item in the list when it does not follow a header or divider.
129
+ # @param show_dividers [Boolean] Display a dividing line above each item in the list when it does not follow a header or divider. These are more subtle than manually inserted dividers.
130
+ # Only supported by `ActionList` itself so far. Menus have too many special cases.
131
+ # Hidden items are not supported, whether they are rendered with `hidden: true` or hidden later, eg. by filtering: the lines are placed with CSS sibling selectors. To leave items out, don't render them, or remove them from the DOM rather than setting `hidden`.
130
132
  # @param select_variant [Symbol] How items may be selected in the list. <%= one_of(Primer::Alpha::ActionList::SELECT_VARIANT_OPTIONS) %>
131
133
  # @param aria_selection_variant [Symbol] Specifies which aria selection to use. <%= one_of(Primer::Alpha::ActionList::ARIA_SELECTION_VARIANT_OPTIONS) %>
132
134
  # @param form_arguments [Hash] Allows an `ActionList` to act as a select list in multi- and single-select modes. Pass the `builder:` and `name:` options to this hash. `builder:` should be an instance of `ActionView::Helpers::FormBuilder`, which are created by the standard Rails `#form_with` and `#form_for` helpers. The `name:` option is the desired name of the field that will be included in the params sent to the server on form submission. *NOTE*: Consider using an <%= link_to_component(Primer::Alpha::ActionMenu) %> instead of using this feature directly.
@@ -148,14 +150,14 @@ module Primer
148
150
  @system_arguments[:tag] = :ul
149
151
  @item_classes = item_classes
150
152
  @scheme = fetch_or_fallback(SCHEME_OPTIONS, scheme, DEFAULT_SCHEME)
151
- @show_dividers = show_dividers
153
+ # Subclasses render items in shapes the divider CSS does not handle, so they ignore it
154
+ @show_dividers = show_dividers && instance_of?(Primer::Alpha::ActionList)
152
155
  @select_variant = select_variant
153
156
  @aria_selection_variant = aria_selection_variant
154
157
  @system_arguments[:classes] = class_names(
155
158
  SCHEME_MAPPINGS[@scheme],
156
159
  system_arguments[:classes],
157
- "ActionListWrap",
158
- "ActionListWrap--divided" => @show_dividers
160
+ "ActionListWrap"
159
161
  )
160
162
 
161
163
  @role = role || (allows_selection? ? MENU_ROLE : DEFAULT_ROLE)
@@ -230,7 +232,7 @@ module Primer
230
232
  end
231
233
 
232
234
  def multi_select?
233
- select_variant == :multiple || select_variant == :multiple_checkbox
235
+ [:multiple, :multiple_checkbox].include?(select_variant)
234
236
  end
235
237
 
236
238
  def allows_selection?
@@ -242,7 +244,7 @@ module Primer
242
244
  end
243
245
 
244
246
  def acts_as_menu?
245
- @system_arguments[:role] == :menu || @system_arguments[:role] == :group
247
+ [:menu, :group].include?(@system_arguments[:role])
246
248
  end
247
249
 
248
250
  def required_form_arguments_given?