openproject-primer_view_components 0.95.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +32 -0
- data/app/assets/javascripts/primer_view_components.js +11 -1
- data/app/assets/javascripts/primer_view_components.js.map +1 -1
- data/app/assets/styles/primer_view_components.css +1 -1
- data/app/assets/styles/primer_view_components.css.map +1 -1
- data/app/components/primer/alpha/action_bar.css +1 -1
- data/app/components/primer/alpha/action_bar.css.map +1 -1
- data/app/components/primer/alpha/action_list/item.rb +7 -2
- data/app/components/primer/alpha/action_list.css +1 -1
- data/app/components/primer/alpha/action_list.css.json +16 -27
- data/app/components/primer/alpha/action_list.css.map +1 -1
- data/app/components/primer/alpha/action_list.html.erb +1 -5
- data/app/components/primer/alpha/action_list.pcss +55 -81
- data/app/components/primer/alpha/action_list.rb +9 -7
- data/app/components/primer/alpha/action_menu/action_menu_element.d.ts +6 -0
- data/app/components/primer/alpha/action_menu/action_menu_element.js +239 -84
- data/app/components/primer/alpha/action_menu/action_menu_element.ts +261 -81
- data/app/components/primer/alpha/action_menu/action_menu_focus_zone_stack.d.ts +4 -1
- data/app/components/primer/alpha/action_menu/action_menu_focus_zone_stack.js +38 -14
- data/app/components/primer/alpha/action_menu/action_menu_focus_zone_stack.ts +42 -13
- data/app/components/primer/alpha/action_menu/menu.html.erb +27 -19
- data/app/components/primer/alpha/action_menu/menu.rb +7 -0
- data/app/components/primer/alpha/action_menu/menu_loader.d.ts +21 -0
- data/app/components/primer/alpha/action_menu/menu_loader.js +221 -0
- data/app/components/primer/alpha/action_menu/menu_loader.ts +269 -0
- data/app/components/primer/alpha/action_menu/primary_menu.rb +15 -0
- data/app/components/primer/alpha/action_menu.rb +55 -0
- data/app/components/primer/alpha/auto_complete.css +1 -1
- data/app/components/primer/alpha/auto_complete.css.map +1 -1
- data/app/components/primer/alpha/banner.css +1 -1
- data/app/components/primer/alpha/banner.css.map +1 -1
- data/app/components/primer/alpha/button_marketing.css +1 -1
- data/app/components/primer/alpha/button_marketing.css.map +1 -1
- data/app/components/primer/alpha/dialog.css +1 -1
- data/app/components/primer/alpha/dialog.css.map +1 -1
- data/app/components/primer/alpha/dropdown/menu.rb +1 -1
- data/app/components/primer/alpha/dropdown.css +1 -1
- data/app/components/primer/alpha/dropdown.css.json +1 -1
- data/app/components/primer/alpha/dropdown.css.map +1 -1
- data/app/components/primer/alpha/layout.css +1 -1
- data/app/components/primer/alpha/layout.css.json +3 -3
- data/app/components/primer/alpha/layout.css.map +1 -1
- data/app/components/primer/alpha/menu.css +1 -1
- data/app/components/primer/alpha/menu.css.json +3 -3
- data/app/components/primer/alpha/menu.css.map +1 -1
- data/app/components/primer/alpha/overlay.css +1 -1
- data/app/components/primer/alpha/overlay.css.map +1 -1
- data/app/components/primer/alpha/segmented_control.css +1 -1
- data/app/components/primer/alpha/segmented_control.css.json +1 -1
- data/app/components/primer/alpha/segmented_control.css.map +1 -1
- data/app/components/primer/alpha/select_panel.css +1 -1
- data/app/components/primer/alpha/select_panel.css.map +1 -1
- data/app/components/primer/alpha/skeleton_box.css +1 -1
- data/app/components/primer/alpha/skeleton_box.css.map +1 -1
- data/app/components/primer/alpha/stack.css +1 -1
- data/app/components/primer/alpha/stack.css.map +1 -1
- data/app/components/primer/alpha/stack_item.css +1 -1
- data/app/components/primer/alpha/stack_item.css.map +1 -1
- data/app/components/primer/alpha/tab_nav.css +1 -1
- data/app/components/primer/alpha/tab_nav.css.map +1 -1
- data/app/components/primer/alpha/text_field.css +1 -1
- data/app/components/primer/alpha/text_field.css.map +1 -1
- data/app/components/primer/alpha/toggle_switch.css +1 -1
- data/app/components/primer/alpha/toggle_switch.css.map +1 -1
- data/app/components/primer/alpha/tree_view.css +1 -1
- data/app/components/primer/alpha/tree_view.css.json +3 -3
- data/app/components/primer/alpha/tree_view.css.map +1 -1
- data/app/components/primer/alpha/underline_nav.css +1 -1
- data/app/components/primer/alpha/underline_nav.css.map +1 -1
- data/app/components/primer/beta/border_box.css +1 -1
- data/app/components/primer/beta/border_box.css.json +5 -5
- data/app/components/primer/beta/border_box.css.map +1 -1
- data/app/components/primer/beta/button.css +1 -1
- data/app/components/primer/beta/button.css.map +1 -1
- data/app/components/primer/beta/button.pcss +97 -0
- data/app/components/primer/beta/button.rb +15 -3
- data/app/components/primer/beta/counter.css +1 -1
- data/app/components/primer/beta/counter.css.map +1 -1
- data/app/components/primer/beta/flash.css +1 -1
- data/app/components/primer/beta/flash.css.map +1 -1
- data/app/components/primer/beta/link.css +1 -1
- data/app/components/primer/beta/link.css.json +1 -1
- data/app/components/primer/beta/link.css.map +1 -1
- data/app/components/primer/beta/popover.css +1 -1
- data/app/components/primer/beta/popover.css.map +1 -1
- data/app/components/primer/beta/progress_bar.css +1 -1
- data/app/components/primer/beta/progress_bar.css.map +1 -1
- data/app/components/primer/beta/relative_time.rb +7 -1
- data/app/components/primer/beta/state.css +1 -1
- data/app/components/primer/beta/state.css.json +2 -2
- data/app/components/primer/beta/state.css.map +1 -1
- data/app/components/primer/beta/timeline_item.css +1 -1
- data/app/components/primer/beta/timeline_item.css.map +1 -1
- data/app/components/primer/open_project/border_grid.css +1 -1
- data/app/components/primer/open_project/border_grid.css.map +1 -1
- data/app/components/primer/open_project/color_field.css +1 -1
- data/app/components/primer/open_project/color_field.css.map +1 -1
- data/app/components/primer/open_project/inline_message.css +1 -1
- data/app/components/primer/open_project/inline_message.css.map +1 -1
- data/app/components/primer/open_project/input_group.css +1 -1
- data/app/components/primer/open_project/input_group.css.map +1 -1
- data/app/components/primer/open_project/keybinding_hint/chords.d.ts +5 -0
- data/app/components/primer/open_project/keybinding_hint/chords.js +29 -0
- data/app/components/primer/open_project/keybinding_hint/chords.ts +38 -0
- data/app/components/primer/open_project/keybinding_hint/key_names.d.ts +16 -0
- data/app/components/primer/open_project/keybinding_hint/key_names.js +107 -0
- data/app/components/primer/open_project/keybinding_hint/key_names.ts +116 -0
- data/app/components/primer/open_project/keybinding_hint/localized_names.d.ts +22 -0
- data/app/components/primer/open_project/keybinding_hint/localized_names.js +47 -0
- data/app/components/primer/open_project/keybinding_hint/localized_names.ts +71 -0
- data/app/components/primer/open_project/keybinding_hint/names.rb +92 -0
- data/app/components/primer/open_project/keybinding_hint/names_from_scope.d.ts +21 -0
- data/app/components/primer/open_project/keybinding_hint/names_from_scope.js +81 -0
- data/app/components/primer/open_project/keybinding_hint/names_from_scope.ts +96 -0
- data/app/components/primer/open_project/keybinding_hint/platform.d.ts +10 -0
- data/app/components/primer/open_project/keybinding_hint/platform.js +24 -0
- data/app/components/primer/open_project/keybinding_hint/platform.ts +34 -0
- data/app/components/primer/open_project/keybinding_hint/platform_override.d.ts +2 -0
- data/app/components/primer/open_project/keybinding_hint/platform_override.js +4 -0
- data/app/components/primer/open_project/keybinding_hint/platform_override.ts +7 -0
- data/app/components/primer/open_project/keybinding_hint.css +1 -0
- data/app/components/primer/open_project/keybinding_hint.css.json +10 -0
- data/app/components/primer/open_project/keybinding_hint.css.map +1 -0
- data/app/components/primer/open_project/keybinding_hint.html.erb +4 -0
- data/app/components/primer/open_project/keybinding_hint.pcss +65 -0
- data/app/components/primer/open_project/keybinding_hint.rb +112 -0
- data/app/components/primer/open_project/keybinding_hint_element.d.ts +31 -0
- data/app/components/primer/open_project/keybinding_hint_element.js +183 -0
- data/app/components/primer/open_project/keybinding_hint_element.ts +152 -0
- data/app/components/primer/open_project/page_header.css +1 -1
- data/app/components/primer/open_project/page_header.css.json +2 -2
- data/app/components/primer/open_project/page_header.css.map +1 -1
- data/app/components/primer/open_project/pagination.css +1 -1
- data/app/components/primer/open_project/pagination.css.json +1 -1
- data/app/components/primer/open_project/pagination.css.map +1 -1
- data/app/components/primer/open_project/sub_header.css +1 -1
- data/app/components/primer/open_project/sub_header.css.map +1 -1
- data/app/components/primer/primer.d.ts +1 -0
- data/app/components/primer/primer.js +1 -0
- data/app/components/primer/primer.pcss +1 -0
- data/app/components/primer/primer.ts +1 -0
- data/app/components/primer/truncate.css +1 -1
- data/app/components/primer/truncate.css.json +3 -4
- data/app/components/primer/truncate.css.map +1 -1
- data/app/controllers/primer/view_components/action_menu_controller.rb +35 -0
- data/app/views/primer/view_components/action_menu/deferred.html.erb +25 -11
- data/app/views/primer/view_components/action_menu/deferred_form.html.erb +10 -0
- data/app/views/primer/view_components/action_menu/deferred_preload.html.erb +7 -1
- data/config/locales/en.yml +179 -0
- data/config/routes.rb +1 -0
- data/lib/primer/accessibility.rb +1 -2
- data/lib/primer/classify.rb +1 -2
- data/lib/primer/view_components/version.rb +1 -1
- data/previews/primer/alpha/action_list_preview.rb +46 -1
- data/previews/primer/alpha/action_menu_preview/deferred_refresh.html.erb +34 -0
- data/previews/primer/alpha/action_menu_preview/deferred_refresh_form.html.erb +9 -0
- data/previews/primer/alpha/action_menu_preview/sub_menus.html.erb +1 -1
- data/previews/primer/alpha/action_menu_preview.rb +19 -2
- data/previews/primer/open_project/keybinding_hint_preview/full_format.html.erb +3 -0
- data/previews/primer/open_project/keybinding_hint_preview/in_action_list.html.erb +12 -0
- data/previews/primer/open_project/keybinding_hint_preview/in_button.html.erb +24 -0
- data/previews/primer/open_project/keybinding_hint_preview/platforms.html.erb +8 -0
- data/previews/primer/open_project/keybinding_hint_preview/playground.html.erb +4 -0
- data/previews/primer/open_project/keybinding_hint_preview/prose.html.erb +3 -0
- data/previews/primer/open_project/keybinding_hint_preview/schemes.html.erb +6 -0
- data/previews/primer/open_project/keybinding_hint_preview/sequence.html.erb +1 -0
- data/previews/primer/open_project/keybinding_hint_preview/sizes.html.erb +4 -0
- data/previews/primer/open_project/keybinding_hint_preview.rb +71 -0
- data/static/arguments.json +55 -3
- data/static/audited_at.json +1 -0
- data/static/classes.json +15 -3
- data/static/classnames.cjs +5 -1
- data/static/classnames.js +5 -1
- data/static/constants.json +35 -0
- data/static/info_arch.json +255 -10
- data/static/previews.json +177 -0
- data/static/statuses.json +1 -0
- metadata +45 -5
- data/app/components/primer/alpha/text_field.css.json +0 -134
- data/app/components/primer/alpha/toggle_switch.css.json +0 -40
- data/app/components/primer/alpha/underline_nav.css.json +0 -26
- data/app/components/primer/beta/button.css.json +0 -86
|
@@ -1 +1 @@
|
|
|
1
|
-
.ActionBar{position:relative;display:flex!important;min-width:calc(var(--control-medium-size)*3);align-items:center;flex-grow:1;flex-shrink:1;box-sizing:initial;overflow:hidden;justify-content:flex-end}.ActionBar-item-container{height:var(--control-medium-size);box-sizing:initial;overflow:hidden}.ActionBar-item{position:relative;float:left}.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{top:50%;bottom:50%;float:left;height:calc(var(--control-medium-size)/2);margin:0 var(--controlStack-medium-gap-condensed);border-left:var(--borderWidth-thin) solid var(--borderColor-muted);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
|
+
.ActionBar{position:relative;display:flex!important;min-width:calc(var(--control-medium-size) * 3);align-items:center;flex-grow:1;flex-shrink:1;box-sizing:initial;overflow:hidden;justify-content:flex-end}.ActionBar-item-container{height:var(--control-medium-size);box-sizing:initial;overflow:hidden}.ActionBar-item{position:relative;float:left}.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{top:50%;bottom:50%;float:left;height:calc(var(--control-medium-size) / 2);margin:0 var(--controlStack-medium-gap-condensed);border-left:var(--borderWidth-thin) solid var(--borderColor-muted);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 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["action_bar.pcss"],"names":[],"mappings":"AACA,WACE,iBAAkB,CAClB,sBAAwB,CACxB,
|
|
1
|
+
{"version":3,"sources":["action_bar.pcss"],"names":[],"mappings":"AACA,WACE,iBAAkB,CAClB,sBAAwB,CACxB,8CAA+C,CAC/C,kBAAmB,CACnB,WAAY,CACZ,aAAc,CACd,kBAAuB,CACvB,eAAgB,CAChB,wBACF,CAEA,0BACE,iCAAkC,CAClC,kBAAuB,CACvB,eACF,CAEA,gBACE,iBAAkB,CAClB,UACF,CAEA,qBACE,UACF,CAEA,kBACE,6CACF,CAEA,kBACE,6CACF,CAIA,mBACE,OAAQ,CACR,UAAW,CACX,UAAW,CACX,2CAA4C,CAC5C,iDAAkD,CAClD,kEAAmE,CACnE,0BACF,CAEA,qCACE,gDACF,CAEA,qCACE,gDACF","file":"action_bar.css","sourcesContent":["/* CSS for ActionBar */\n.ActionBar {\n position: relative;\n display: flex !important;\n min-width: calc(var(--control-medium-size) * 3);\n align-items: center;\n flex-grow: 1;\n flex-shrink: 1;\n box-sizing: content-box;\n overflow: hidden;\n justify-content: flex-end;\n}\n\n.ActionBar-item-container {\n height: var(--control-medium-size);\n box-sizing: content-box;\n overflow: hidden;\n}\n\n.ActionBar-item {\n position: relative;\n float: left;\n}\n\n.ActionBar-more-menu {\n float: left;\n}\n\n.ActionBar--small {\n min-width: calc(var(--control-small-size) * 3);\n}\n\n.ActionBar--large {\n min-width: calc(var(--control-large-size) * 3);\n}\n\n/* Divider */\n\n.ActionBar-divider {\n top: 50%;\n bottom: 50%;\n float: left;\n height: calc(var(--control-medium-size) / 2);\n margin: 0 var(--controlStack-medium-gap-condensed);\n border-left: var(--borderWidth-thin) solid var(--borderColor-muted);\n transform: translateY(-50%);\n}\n\n.ActionBar--small .ActionBar-divider {\n margin: 0 var(--controlStack-small-gap-condensed);\n}\n\n.ActionBar--large .ActionBar-divider {\n margin: 0 var(--controlStack-large-gap-condensed);\n}\n"]}
|
|
@@ -97,11 +97,15 @@ module Primer
|
|
|
97
97
|
# ```ruby
|
|
98
98
|
# with_leading_visual_text { "Text here" }
|
|
99
99
|
# ```
|
|
100
|
+
#
|
|
101
|
+
# To render a keyboard shortcut hint, call the `with_trailing_visual_keybinding_hint` method, e.g. `with_trailing_visual_keybinding_hint(keys: "Mod+Enter")`. It accepts the arguments accepted by <%= link_to_component(Primer::OpenProject::KeybindingHint) %>.
|
|
100
102
|
renders_one :trailing_visual, types: {
|
|
101
103
|
icon: Primer::Beta::Octicon,
|
|
102
104
|
label: Primer::Beta::Label,
|
|
103
105
|
counter: Primer::Beta::Counter,
|
|
104
|
-
text: ->(text) { text }
|
|
106
|
+
text: ->(text) { text },
|
|
107
|
+
# NOTE: OpenProject addition, see DREAM-867
|
|
108
|
+
keybinding_hint: Primer::OpenProject::KeybindingHint
|
|
105
109
|
}
|
|
106
110
|
|
|
107
111
|
# Used internally.
|
|
@@ -222,7 +226,8 @@ module Primer
|
|
|
222
226
|
@system_arguments[:classes],
|
|
223
227
|
SCHEME_MAPPINGS[@scheme],
|
|
224
228
|
"ActionListItem",
|
|
225
|
-
"ActionListItem--disabled" => @disabled
|
|
229
|
+
"ActionListItem--disabled" => @disabled,
|
|
230
|
+
"ActionListItem--divided" => @list&.show_dividers
|
|
226
231
|
)
|
|
227
232
|
|
|
228
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(var(--actionListContent-paddingBlock)*-1);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}}.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(var(--borderWidth-thin)*-1);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(var(--borderWidth-thin)*-1);box-shadow:var(--boxShadow-thin) var(--control-transparent-borderColor-active)}: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]+.ActionListItem:before,.ActionListItem[aria-selected=true]:before{visibility:hidden}.ActionListItem[aria-selected=true]:after{position:absolute;top:calc(50% - 12px);left:calc(var(--base-size-4)*-1);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}.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{position:absolute;top:calc(50% - 12px);left:calc(var(--base-size-8)*-1);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)}: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{cursor:not-allowed;background-color:initial}}.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 :is(.ActionListItem-description,.ActionListItem-label,.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 :is(.ActionListItem-description,.ActionListItem-label,.ActionListItem-visual){color:var(--control-danger-fgColor-hover)}.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)}.ActionListContent[aria-disabled=true] .ActionListItem-visual{fill: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.ActionListContent--hasActiveSubItem[aria-expanded=true]>.ActionListItem-label{font-weight:var(--base-text-weight-semibold)}.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(var(--base-size-16)*-1))}.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{position:absolute;top:calc(50% - 12px);left:calc(var(--base-size-8)*-1);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) 0s}:is(:is(.ActionListContent[aria-checked=true],.ActionListContent[aria-selected=true]) .FormControl-checkbox):before{visibility:visible;transition:visibility 0s linear 0s;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 .ActionListItem-label{font-weight:var(--base-text-weight-semibold)}.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}.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-size:var(--text-body-size-small);font-weight:var(--base-text-weight-semibold);line-height:var(--text-body-lineHeight-small);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(var(--base-size-8)*-1);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(var(--base-size-8)*-1);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,22 +8,17 @@
|
|
|
8
8
|
".ActionListWrap",
|
|
9
9
|
".ActionListWrap--inset",
|
|
10
10
|
".ActionListWrap--inset[popover]",
|
|
11
|
-
".
|
|
12
|
-
":
|
|
13
|
-
":
|
|
14
|
-
".
|
|
15
|
-
".
|
|
16
|
-
".ActionListItem:
|
|
17
|
-
".ActionListItem:
|
|
18
|
-
"
|
|
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
22
|
".ActionListItem[hidden]+.ActionList-sectionDivider",
|
|
28
23
|
".ActionListItem.ActionListItem--hasSubItem>.ActionListContent",
|
|
29
24
|
":is(.ActionListItem.ActionListItem--hasSubItem>.ActionListContent):hover",
|
|
@@ -32,34 +27,33 @@
|
|
|
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
|
-
":is(.ActionListItem:not(.ActionListItem--hasSubItem),.ActionListItem.ActionListItem--hasSubItem>.ActionListContent):active .ActionListItem-label:before",
|
|
36
|
-
":is(.ActionListItem:not(.ActionListItem--hasSubItem),.ActionListItem.ActionListItem--hasSubItem>.ActionListContent):active+.ActionListItem .ActionListItem-label:before",
|
|
37
30
|
".ActionListItem[aria-selected=true]",
|
|
38
31
|
".ActionListItem[aria-selected=true]:hover",
|
|
39
|
-
".ActionListItem[aria-selected=true]+.ActionListItem:before",
|
|
40
|
-
".ActionListItem[aria-selected=true]:before",
|
|
41
32
|
".ActionListItem[aria-selected=true]:after",
|
|
42
33
|
".ActionListItem.ActionListItem--navActive",
|
|
34
|
+
".ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded=false] .ActionListItem-label",
|
|
35
|
+
".ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded=true]>.ActionListItem-label",
|
|
36
|
+
".ActionListItem-descriptionWrap .ActionListItem-label",
|
|
43
37
|
".ActionListItem.ActionListItem--navActive:not(.ActionListItem--subItem) .ActionListItem-label",
|
|
44
38
|
".ActionListItem.ActionListItem--navActive:not(.ActionListItem--danger)",
|
|
45
39
|
".ActionListItem.ActionListItem--navActive:not(.ActionListItem--danger):hover",
|
|
46
|
-
".ActionListItem.ActionListItem--navActive:not(.ActionListItem--danger)+.ActionListItem:before",
|
|
47
|
-
".ActionListItem.ActionListItem--navActive:not(.ActionListItem--danger):before",
|
|
48
40
|
".ActionListItem.ActionListItem--navActive:not(.ActionListItem--danger):after",
|
|
49
41
|
":is(:is(.ActionListItem.ActionListItem--disabled,.ActionListItem[aria-disabled=true]) .ActionListContent) :is(.ActionListItem-description,.ActionListItem-label)",
|
|
42
|
+
".ActionListContent[aria-disabled=true] .ActionListItem-visual",
|
|
50
43
|
":is(:is(.ActionListItem.ActionListItem--disabled,.ActionListItem[aria-disabled=true]) .ActionListContent) .ActionListItem-visual",
|
|
51
|
-
":is(.ActionListItem.ActionListItem--disabled,.ActionListItem[aria-disabled=true]):hover",
|
|
52
44
|
".ActionListItem.ActionListItem--danger .ActionListItem-label",
|
|
53
45
|
".ActionListItem.ActionListItem--danger .ActionListItem-visual",
|
|
46
|
+
":is(.ActionListItem.ActionListItem--disabled,.ActionListItem[aria-disabled=true]):hover",
|
|
54
47
|
".ActionListItem.ActionListItem--danger:hover",
|
|
55
48
|
".ActionListItem.ActionListItem--danger:hover :is(.ActionListItem-description,.ActionListItem-label,.ActionListItem-visual)",
|
|
49
|
+
".ActionListItem.ActionListItem--danger:hover [data-kbd-chord]",
|
|
56
50
|
":is(.ActionListItem.ActionListItem--danger .ActionListContent):active",
|
|
57
51
|
":is(.ActionListItem.ActionListItem--danger .ActionListContent):active :is(.ActionListItem-description,.ActionListItem-label,.ActionListItem-visual)",
|
|
52
|
+
":is(.ActionListItem.ActionListItem--danger .ActionListContent):active [data-kbd-chord]",
|
|
58
53
|
".ActionListContent",
|
|
59
54
|
".ActionListContent>:not(:last-child)",
|
|
60
55
|
".ActionListContent:hover",
|
|
61
56
|
".ActionListContent[aria-disabled=true] :is(.ActionListItem-description,.ActionListItem-label)",
|
|
62
|
-
".ActionListContent[aria-disabled=true] .ActionListItem-visual",
|
|
63
57
|
".ActionListContent[aria-disabled=true]:hover",
|
|
64
58
|
".ActionListContent[aria-expanded]+.ActionList--subGroup",
|
|
65
59
|
":is(.ActionListContent[aria-expanded]+.ActionList--subGroup) .ActionListContent",
|
|
@@ -68,13 +62,9 @@
|
|
|
68
62
|
":is(.ActionListContent.ActionListContent--visual24[aria-expanded]+.ActionList--subGroup) .ActionListContent",
|
|
69
63
|
".ActionListContent[aria-expanded=true] .ActionListItem-collapseIcon",
|
|
70
64
|
".ActionListContent[aria-expanded=true]+.ActionList--subGroup",
|
|
71
|
-
".ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded=true]>.ActionListItem-label",
|
|
72
65
|
".ActionListContent[aria-expanded=false] .ActionListItem-collapseIcon",
|
|
73
66
|
".ActionListContent[aria-expanded=false]+.ActionList--subGroup",
|
|
74
67
|
".ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded=false]",
|
|
75
|
-
".ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded=false] .ActionListItem-label",
|
|
76
|
-
".ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded=false]+.ActionListItem:before",
|
|
77
|
-
".ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded=false]:before",
|
|
78
68
|
".ActionListContent.ActionListContent--hasActiveSubItem[aria-expanded=false]:after",
|
|
79
69
|
":is(.ActionListContent[aria-checked=true],.ActionListContent[aria-selected=true]) .FormControl-checkbox",
|
|
80
70
|
":is(:is(.ActionListContent[aria-checked=true],.ActionListContent[aria-selected=true]) .FormControl-checkbox):before",
|
|
@@ -89,19 +79,18 @@
|
|
|
89
79
|
".ActionListItem-action--trailing",
|
|
90
80
|
".ActionListItem-visual--leading svg",
|
|
91
81
|
".ActionListItem-descriptionWrap",
|
|
92
|
-
".ActionListItem-descriptionWrap .ActionListItem-label",
|
|
93
82
|
".ActionListItem-descriptionWrap--inline",
|
|
94
83
|
".ActionListItem-description",
|
|
95
84
|
".ActionListItem-action",
|
|
96
85
|
".ActionListItem-visual",
|
|
97
86
|
".ActionListItem-label",
|
|
98
87
|
".ActionListItem-label--truncate",
|
|
88
|
+
".ActionList-sectionDivider:not(:empty)",
|
|
99
89
|
".ActionListItem--subItem>.ActionListContent>.ActionListItem-label",
|
|
100
90
|
".ActionListItem--withActions",
|
|
101
91
|
".ActionListItem-trailingAction",
|
|
102
92
|
".ActionListItem--trailingActionHover .ActionListItem-trailingAction",
|
|
103
93
|
":is(.ActionListItem--trailingActionHover:hover,.ActionListItem--trailingActionHover:focus-within) .ActionListItem-trailingAction",
|
|
104
|
-
".ActionList-sectionDivider:not(:empty)",
|
|
105
94
|
".ActionList-sectionDivider:empty",
|
|
106
95
|
".ActionList-sectionDivider .ActionList-sectionDivider-title",
|
|
107
96
|
".ActionList-sectionDivider--filled",
|
|
@@ -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 }\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 }\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.
|
|
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
|
-
/*
|
|
34
|
+
/* List dividers. Behaviour is pinned by test/playwright/action_list_dividers.test.ts. */
|
|
36
35
|
|
|
37
|
-
.
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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
|
-
|
|
51
|
-
|
|
52
|
-
|
|
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
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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
|
-
/*
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
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
|
-
|
|
80
|
-
.ActionListItem:
|
|
81
|
-
|
|
82
|
-
|
|
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
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
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;
|
|
@@ -277,6 +244,12 @@ nav-list {
|
|
|
277
244
|
& .ActionListItem-description {
|
|
278
245
|
color: var(--control-danger-fgColor-hover);
|
|
279
246
|
}
|
|
247
|
+
|
|
248
|
+
/* NOTE: OpenProject addition, see DREAM-867 */
|
|
249
|
+
& [data-kbd-chord] {
|
|
250
|
+
background-color: var(--bgColor-default);
|
|
251
|
+
transition: none;
|
|
252
|
+
}
|
|
280
253
|
}
|
|
281
254
|
}
|
|
282
255
|
|
|
@@ -289,6 +262,12 @@ nav-list {
|
|
|
289
262
|
& .ActionListItem-description {
|
|
290
263
|
color: var(--control-danger-fgColor-hover);
|
|
291
264
|
}
|
|
265
|
+
|
|
266
|
+
/* NOTE: OpenProject addition, see DREAM-867 */
|
|
267
|
+
& [data-kbd-chord] {
|
|
268
|
+
background-color: var(--bgColor-default);
|
|
269
|
+
transition: none;
|
|
270
|
+
}
|
|
292
271
|
}
|
|
293
272
|
}
|
|
294
273
|
}
|
|
@@ -428,11 +407,6 @@ nav-list {
|
|
|
428
407
|
font-weight: var(--base-text-weight-semibold);
|
|
429
408
|
}
|
|
430
409
|
|
|
431
|
-
&::before,
|
|
432
|
-
& + .ActionListItem::before {
|
|
433
|
-
visibility: hidden;
|
|
434
|
-
}
|
|
435
|
-
|
|
436
410
|
/* blue accent line */
|
|
437
411
|
&::after {
|
|
438
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
247
|
+
[:menu, :group].include?(@system_arguments[:role])
|
|
246
248
|
end
|
|
247
249
|
|
|
248
250
|
def required_form_arguments_given?
|
|
@@ -12,6 +12,10 @@ export declare class ActionMenuElement extends HTMLElement {
|
|
|
12
12
|
includeFragment: IncludeFragmentElement;
|
|
13
13
|
overlay: AnchoredPositionElement;
|
|
14
14
|
list: HTMLElement;
|
|
15
|
+
overlayBody: HTMLElement | undefined;
|
|
16
|
+
loaderTemplate: HTMLTemplateElement | undefined;
|
|
17
|
+
constructor();
|
|
18
|
+
static observedAttributes: string[];
|
|
15
19
|
static validItemRoles: string[];
|
|
16
20
|
static validSelectors: string[];
|
|
17
21
|
static menuItemSelectors: string[];
|
|
@@ -28,6 +32,8 @@ export declare class ActionMenuElement extends HTMLElement {
|
|
|
28
32
|
get selectedItems(): SelectedItem[];
|
|
29
33
|
connectedCallback(): void;
|
|
30
34
|
disconnectedCallback(): void;
|
|
35
|
+
attributeChangedCallback(name: string): void;
|
|
36
|
+
refresh(): void;
|
|
31
37
|
handleEvent(event: Event): void;
|
|
32
38
|
get items(): HTMLElement[];
|
|
33
39
|
getItemById(itemId: string): HTMLElement | null;
|